import{_ as t,a as n,b as s,s as a,c,S as r,w as e,x as o,z as i,C as u,B as l,D as f,E as p,e as h,t as v,d,f as m,g as y,k as E,j as g,h as P,l as $,m as b,n as x,r as D,u as k,v as w,J as I,F as R,O as S,P as V,Q as H,ad as C,V as j,X as B,Y as N,ay as T}from"./client.44146e9a.js";function U(t){return function(){var n,s=S(t);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()){var a=S(this).constructor;n=Reflect.construct(s,arguments,a)}else n=s.apply(this,arguments);return V(this,n)}}function z(t){var n,s=new H({props:{icon:C,spin:!0,class:"icon"}});return{c:function(){e(s.$$.fragment)},l:function(t){o(s.$$.fragment,t)},m:function(t,a){i(s,t,a),n=!0},p:u,i:function(t){n||(l(s.$$.fragment,t),n=!0)},o:function(t){f(s.$$.fragment,t),n=!1},d:function(t){p(s,t)}}}function A(t){var n,s,a,c,r,e,o,i,u,p,S,V,H,C,B,N,T,U,A,F,J,O,Q,X,Y,_,q,G=t[2]&&z();return{c:function(){n=h("h1"),s=v("Settings"),a=d(),c=h("br"),r=d(),e=h("h2"),o=v("Snapcast server"),i=d(),u=h("div"),p=h("div"),S=h("p"),V=v("Hostname:"),H=d(),C=h("input"),B=d(),N=h("div"),T=h("p"),U=v("Port:"),A=d(),F=h("input"),J=d(),O=h("div"),Q=h("a"),X=v("Connect"),Y=d(),G&&G.c(),this.h()},l:function(t){n=m(t,"H1",{class:!0});var l=y(n);s=E(l,"Settings"),l.forEach(g),a=P(t),c=m(t,"BR",{}),r=P(t),e=m(t,"H2",{class:!0});var f=y(e);o=E(f,"Snapcast server"),f.forEach(g),i=P(t),u=m(t,"DIV",{class:!0});var h=y(u);p=m(h,"DIV",{class:!0});var v=y(p);S=m(v,"P",{});var d=y(S);V=E(d,"Hostname:"),d.forEach(g),H=P(v),C=m(v,"INPUT",{class:!0,type:!0,placeholder:!0}),v.forEach(g),B=P(h),N=m(h,"DIV",{class:!0});var $=y(N);T=m($,"P",{});var b=y(T);U=E(b,"Port:"),b.forEach(g),A=P($),F=m($,"INPUT",{class:!0,type:!0,placeholder:!0}),$.forEach(g),J=P(h),O=m(h,"DIV",{class:!0});var x=y(O);Q=m(x,"A",{class:!0,href:!0});var D=y(Q);X=E(D,"Connect"),D.forEach(g),Y=P(x),G&&G.l(x),x.forEach(g),h.forEach(g),this.h()},h:function(){$(n,"class","title"),$(e,"class","subtitle"),$(C,"class","input is-rounded"),$(C,"type","text"),$(C,"placeholder","host:port"),$(p,"class","column is-12-mobile is-6-desktop"),$(F,"class","input is-rounded"),$(F,"type","text"),$(F,"placeholder","host:port"),$(N,"class","column is-12-mobile is-6-desktop"),$(Q,"class","button"),$(Q,"href",null),$(O,"class","column is-6-mobile is-3-desktop"),$(u,"class","columns is-multiline")},m:function(l,f,h){b(l,n,f),x(n,s),b(l,a,f),b(l,c,f),b(l,r,f),b(l,e,f),x(e,o),b(l,i,f),b(l,u,f),x(u,p),x(p,S),x(S,V),x(p,H),x(p,C),D(C,t[0]),x(u,B),x(u,N),x(N,T),x(T,U),x(N,A),x(N,F),D(F,t[1]),x(u,J),x(u,O),x(O,Q),x(Q,X),x(O,Y),G&&G.m(O,null),_=!0,h&&k(q),q=[w(C,"input",t[4]),w(F,"input",t[5]),w(Q,"click",t[3])]},p:function(t,n){var s=I(n,1)[0];1&s&&C.value!==t[0]&&D(C,t[0]),2&s&&F.value!==t[1]&&D(F,t[1]),t[2]?G?(G.p(t,s),l(G,1)):((G=z()).c(),l(G,1),G.m(O,null)):G&&(j(),f(G,1,1,function(){G=null}),R())},i:function(t){_||(l(G),_=!0)},o:function(t){f(G),_=!1},d:function(t){t&&g(n),t&&g(a),t&&g(c),t&&g(r),t&&g(e),t&&g(i),t&&g(u),G&&G.d(),k(q)}}}function F(t,n,s){var a,c=window.location.hostname,r="1780",e=function(){var t=B(N.mark(function t(){return N.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return s(2,a=!0),t.next=3,T({host:c,port:r});case 3:s(2,a=!1);case 4:case"end":return t.stop()}},t)}));return function(){return t.apply(this,arguments)}}();return[c,r,a,e,function(){c=this.value,s(0,c)},function(){r=this.value,s(1,r)}]}export default(function(e){t(i,r);var o=U(i);function i(t){var r;return n(this,i),r=o.call(this),s(c(r),t,F,A,a,{}),r}return i}());
