import{S as t,i as s,a as e,b as o,u as n,s as a,h as i,j as u,t as l,n as r,k as c,l as d,m,d as p,r as h,g as f,o as g,f as b}from"./index-0d9f0c09.js";import*as w from"../../../../../../../../../js/libraries/authTools.js";function y(t){let s,e,n,a,f,g,b,w,y,I,k,v,E,$,j,C,L,T,P,B,G,H,M,N,R,z;return{c(){s=i("div"),e=i("h2"),e.textContent="LOG IN",n=u(),a=i("label"),a.textContent="Email ",f=i("span"),g=u(),b=i("input"),w=u(),y=i("div"),I=i("label"),I.textContent="Password ",k=i("span"),v=u(),E=i("input"),$=u(),j=i("button"),j.innerHTML='<object type="image/svg+xml" data="/img/auth/eye_icon.svg" title="eye icon"></object>',C=u(),L=i("div"),T=i("input"),P=i("label"),P.textContent="remember me",B=u(),G=i("button"),G.textContent="Log in",H=u(),M=i("a"),N=l("Forgot password?"),this.c=r,c(e,"class","auth-title"),c(a,"class","auth-label"),c(a,"for","emailInput"),c(f,"id","email-msg"),c(b,"id","emailInput"),c(b,"class","authEmailInput"),c(b,"type","email"),c(I,"class","auth-label"),c(I,"for","passwordInput"),c(k,"id","password-msg"),c(E,"id","passwordInput"),c(E,"class","authPasswordInput"),c(E,"type","password"),c(j,"class","eye-icon"),c(y,"class","password-field"),c(T,"type","checkbox"),c(T,"id","remember-me-checkbox"),c(P,"id","remember-me-label"),c(P,"for","passwordInput"),c(L,"id","remember-me"),c(G,"class","auth-button"),c(M,"id","forgot-password"),c(M,"href","/"+x+"/reset-password"),c(s,"id","login-group"),c(s,"class","pane auth-pane")},m(i,u){o(i,s,u),d(s,e),d(s,n),d(s,a),d(s,f),t[9](f),d(s,g),d(s,b),t[10](b),d(s,w),d(s,y),d(y,I),d(y,k),t[11](k),d(y,v),d(y,E),t[12](E),d(y,$),d(y,j),t[13](j),d(s,C),d(s,L),d(L,T),t[15](T),d(L,P),d(s,B),d(s,G),d(s,H),d(s,M),d(M,N),R||(z=[m(j,"click",t[14]),m(G,"click",t[16])],R=!0)},p:r,i:r,o:r,d(e){e&&p(s),t[9](null),t[10](null),t[11](null),t[12](null),t[13](null),t[15](null),R=!1,h(z)}}}let x="en";function I(t,s,e){let o,n,a,i,u,l,r,c,d,{focused:m=!1}=s,p=f("auth");function h(){if(p.googleInit){google.accounts.id.renderButton(d,{theme:"outline",size:"large"});let t=d.getElementsByTagName("iframe")[0];t.style.height="5rem",t.style.width="5rem"}else setTimeout(h,100)}g((()=>{e(7,c.checked=!0,c),e(2,a={email:o,password:n,remember:c}),e(6,r={email:u,password:l}),p.msgs=r,p.remember=c,p.loginGoogle=d,document.addEventListener("keypress",(function(t){"Enter"==t.code&&m&&w.login(r,a)})),h()}));return t.$$set=t=>{"focused"in t&&e(8,m=t.focused)},[o,n,a,i,u,l,r,c,m,function(t){b[t?"unshift":"push"]((()=>{u=t,e(4,u)}))},function(t){b[t?"unshift":"push"]((()=>{o=t,e(0,o)}))},function(t){b[t?"unshift":"push"]((()=>{l=t,e(5,l)}))},function(t){b[t?"unshift":"push"]((()=>{n=t,e(1,n)}))},function(t){b[t?"unshift":"push"]((()=>{i=t,e(3,i)}))},()=>w.changePasswordVisibility(i),function(t){b[t?"unshift":"push"]((()=>{c=t,e(7,c)}))},()=>w.login(r,a)]}class k extends t{constructor(t){super(),this.shadowRoot.innerHTML="<style>@import '/css/common.css';@import '/css/auth.css';</style>",s(this,{target:this.shadowRoot,props:e(this.attributes),customElement:!0},I,y,a,{focused:8},null),t&&(t.target&&o(t.target,this,t.anchor),t.props&&(this.$set(t.props),n()))}static get observedAttributes(){return["focused"]}get focused(){return this.$$.ctx[8]}set focused(t){this.$$set({focused:t}),n()}}customElements.define("login-component",k);export{k as default};
