import{S as t,i as e,a as n,b as s,u as i,s as r,h as a,j as o,n as l,k as u,l as d,m as p,d as c,r as m,g as f,o as h,v as g,f as b}from"./index-0d9f0c09.js";import*as w from"../../../../../../../../../js/libraries/authTools.js";function v(t){let e,n,i,r,f,h,b,v,x,y,k,E,I,C,P,L,j,$,T,S,z,H,M,B,R,N,A,G,U,V,W,X,_,q,D,F,J,K,O,Q,Y,Z;return{c(){e=a("div"),n=a("h2"),n.textContent="SIGN UP",i=o(),r=a("label"),r.textContent="Email ",f=a("span"),h=o(),b=a("input"),v=o(),x=a("div"),y=a("label"),y.textContent="Password ",k=a("span"),E=o(),I=a("input"),C=o(),P=a("button"),P.innerHTML='',L=o(),j=a("div"),$=a("input"),T=a("label"),T.textContent="remember me",S=o(),z=a("button"),z.textContent="Sign up",H=o(),M=a("p"),B=o(),R=a("div"),N=a("button"),A=o(),G=a("div"),U=a("h2"),U.textContent="Registration is closed",V=o(),W=a("p"),W.textContent="We are still in the process of opening.",X=o(),_=a("p"),_.textContent="Sign up for updates to know when it becomes available:",q=o(),D=a("div"),F=a("input"),J=o(),K=a("button"),K.textContent="sign up",O=o(),Q=a("button"),Q.textContent="No thanks",this.c=l,u(n,"class","auth-title"),u(r,"class","auth-label"),u(r,"for","emailInput"),u(f,"id","email-msg"),u(b,"id","emailInput"),u(b,"class","authEmailInput"),u(b,"type","email"),u(y,"class","auth-label"),u(y,"for","emailInput"),u(k,"id","password-msg"),u(I,"id","passwordInput"),u(I,"class","authPasswordInput"),u(I,"type","password"),u(P,"class","eye-icon"),u(x,"class","password-field"),u($,"type","checkbox"),u($,"id","remember-me-checkbox"),u(T,"id","remember-me-label"),u(T,"for","passwordInput"),u(j,"id","remember-me"),u(z,"class","auth-button"),u(M,"id","forgot-password"),u(e,"id","signup-group"),u(e,"class","pane auth-pane"),u(N,"id","shadow"),u(F,"id","newsletterEmailInput"),u(F,"type","text"),u(K,"id","newsletterEmailButton"),u(D,"id","newsletter-container"),u(Q,"id","no-button"),u(G,"id","wrapper"),u(G,"class","pane"),u(R,"id","dialog")},m(a,o){s(a,e,o),d(e,n),d(e,i),d(e,r),d(e,f),t[16](f),d(e,h),d(e,b),t[18](b),d(e,v),d(e,x),d(x,y),d(x,k),t[19](k),d(x,E),d(x,I),t[20](I),d(x,C),d(x,P),t[22](P),d(e,L),d(e,j),d(j,$),t[24]($),d(j,T),d(e,S),d(e,z),d(e,H),d(e,M),t[25](e),s(a,B,o),s(a,R,o),d(R,N),d(R,A),d(R,G),d(G,U),d(G,V),d(G,W),d(G,X),d(G,_),d(G,q),d(G,D),d(D,F),t[26](F),d(D,J),d(D,K),t[27](K),d(G,O),d(G,Q),t[28](R),Y||(Z=[p(f,"change",t[17]),p(I,"change",t[21]),p(P,"click",t[23]),p(z,"click",(function(){g(w.signup(t[7],t[4],w.toLandingPage))&&w.signup(t[7],t[4],w.toLandingPage).apply(this,arguments)})),p(N,"click",t[12]),p(F,"click",t[14]),p(K,"click",t[13]),p(Q,"click",t[12])],Y=!0)},p(e,n){t=e},i:l,o:l,d(n){n&&c(e),t[16](null),t[18](null),t[19](null),t[20](null),t[22](null),t[24](null),t[25](null),n&&c(B),n&&c(R),t[26](null),t[27](null),t[28](null),Y=!1,m(Z)}}}function x(t){""!=t.innerHTML&&(t.innerHTML="")}function y(t,e,n){let s,i,r,a,o,l,u,d,p,c,m,g,{focused:v=!1}=e;f("auth"),h((()=>{n(8,p.checked=!0,p),n(4,o={email:i,password:r}),n(7,d={email:l,password:u}),document.addEventListener("keypress",(function(t){"Enter"==t.code&&v&&w.signup(d,o,toLandingPage)}))}));return t.$$set=t=>{"focused"in t&&n(15,v=t.focused)},[s,i,r,a,o,l,u,d,p,c,m,g,function(){null!=c&&n(9,c.style.display="none",c)},function(){let t=g.value;t.includes("@")?(sendText("/get-email",t),n(11,g.value="",g),n(11,g.placeholder="Subscribed!",g),g.style.setProperty("--c","hsl(147, 33%, 60%)")):(n(11,g.value="",g),n(11,g.placeholder="must contain '@'",g),g.style.setProperty("--c","hsl(0, 100%, 60%)"))},function(){n(11,g.placeholder="",g)},v,function(t){b[t?"unshift":"push"]((()=>{l=t,n(5,l)}))},()=>x(l),function(t){b[t?"unshift":"push"]((()=>{i=t,n(1,i)}))},function(t){b[t?"unshift":"push"]((()=>{u=t,n(6,u)}))},function(t){b[t?"unshift":"push"]((()=>{r=t,n(2,r)}))},()=>x(u),function(t){b[t?"unshift":"push"]((()=>{a=t,n(3,a)}))},()=>w.changePasswordVisibility(a),function(t){b[t?"unshift":"push"]((()=>{p=t,n(8,p)}))},function(t){b[t?"unshift":"push"]((()=>{s=t,n(0,s)}))},function(t){b[t?"unshift":"push"]((()=>{g=t,n(11,g)}))},function(t){b[t?"unshift":"push"]((()=>{m=t,n(10,m)}))},function(t){b[t?"unshift":"push"]((()=>{c=t,n(9,c)}))}]}class k extends t{constructor(t){super(),this.shadowRoot.innerHTML="",e(this,{target:this.shadowRoot,props:n(this.attributes),customElement:!0},y,v,r,{focused:15},null,[-1,-1]),t&&(t.target&&s(t.target,this,t.anchor),t.props&&(this.$set(t.props),i()))}static get observedAttributes(){return["focused"]}get focused(){return this.$$.ctx[15]}set focused(t){this.$$set({focused:t}),i()}}customElements.define("signup-component",k);export{k as default};