@everymatrix/user-login 1.33.4 → 1.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1042,7 +1042,11 @@ const connectedCallback = (elm) => {
1042
1042
  };
1043
1043
  const disconnectedCallback = (elm) => {
1044
1044
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1045
- getHostRef(elm);
1045
+ const hostRef = getHostRef(elm);
1046
+ const instance = hostRef.$lazyInstance$ ;
1047
+ {
1048
+ safeCall(instance, 'disconnectedCallback');
1049
+ }
1046
1050
  }
1047
1051
  };
1048
1052
  const bootstrapLazy = (lazyBundles, options = {}) => {
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-c277c06d.js');
5
+ const index = require('./index-5d65f61a.js');
6
6
 
7
7
  /*
8
8
  Stencil Client Patch Esm v2.15.2 | MIT Licensed | https://stenciljs.com
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-c277c06d.js');
5
+ const index = require('./index-5d65f61a.js');
6
6
 
7
7
  const DEFAULT_LANGUAGE = 'en';
8
8
  const SUPPORTED_LANGUAGES = ['ro', 'en', 'cz', 'de', 'hr'];
@@ -176,10 +176,7 @@ const UserLogin = class {
176
176
  this.autofillCredentialsHandler = (e) => {
177
177
  this.userNameEmail = e.detail.userNameEmail;
178
178
  this.userPassword = e.detail.userPassword;
179
- this.userLogin({
180
- username: this.userNameEmail,
181
- password: this.userPassword
182
- });
179
+ this.handleLogin();
183
180
  };
184
181
  this.userLogin = async ({ username, password }) => {
185
182
  let headers = {
@@ -275,6 +272,7 @@ const UserLogin = class {
275
272
  }
276
273
  componentDidLoad() {
277
274
  window.addEventListener('LoginCredentials', this.autofillCredentialsHandler);
275
+ window.postMessage({ type: 'UserLoginDidLoad' });
278
276
  }
279
277
  componentDidRender() {
280
278
  // start custom styling area
@@ -287,6 +285,9 @@ const UserLogin = class {
287
285
  }
288
286
  // end custom styling area
289
287
  }
288
+ disconnectedCallback() {
289
+ window.removeEventListener('LoginCredentials', this.autofillCredentialsHandler);
290
+ }
290
291
  sendErrorNotification(errorMessage) {
291
292
  window.postMessage({ type: "HasError", error: errorMessage }, window.location.href);
292
293
  window.postMessage({ type: 'WidgetNotification', data: {
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const index = require('./index-c277c06d.js');
3
+ const index = require('./index-5d65f61a.js');
4
4
 
5
5
  /*
6
6
  Stencil Client Patch Browser v2.15.2 | MIT Licensed | https://stenciljs.com
@@ -66,10 +66,7 @@ export class UserLogin {
66
66
  this.autofillCredentialsHandler = (e) => {
67
67
  this.userNameEmail = e.detail.userNameEmail;
68
68
  this.userPassword = e.detail.userPassword;
69
- this.userLogin({
70
- username: this.userNameEmail,
71
- password: this.userPassword
72
- });
69
+ this.handleLogin();
73
70
  };
74
71
  this.userLogin = async ({ username, password }) => {
75
72
  let headers = {
@@ -165,6 +162,7 @@ export class UserLogin {
165
162
  }
166
163
  componentDidLoad() {
167
164
  window.addEventListener('LoginCredentials', this.autofillCredentialsHandler);
165
+ window.postMessage({ type: 'UserLoginDidLoad' });
168
166
  }
169
167
  componentDidRender() {
170
168
  // start custom styling area
@@ -177,6 +175,9 @@ export class UserLogin {
177
175
  }
178
176
  // end custom styling area
179
177
  }
178
+ disconnectedCallback() {
179
+ window.removeEventListener('LoginCredentials', this.autofillCredentialsHandler);
180
+ }
180
181
  sendErrorNotification(errorMessage) {
181
182
  window.postMessage({ type: "HasError", error: errorMessage }, window.location.href);
182
183
  window.postMessage({ type: 'WidgetNotification', data: {
@@ -174,10 +174,7 @@ const UserLogin$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
174
174
  this.autofillCredentialsHandler = (e) => {
175
175
  this.userNameEmail = e.detail.userNameEmail;
176
176
  this.userPassword = e.detail.userPassword;
177
- this.userLogin({
178
- username: this.userNameEmail,
179
- password: this.userPassword
180
- });
177
+ this.handleLogin();
181
178
  };
182
179
  this.userLogin = async ({ username, password }) => {
183
180
  let headers = {
@@ -273,6 +270,7 @@ const UserLogin$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
273
270
  }
274
271
  componentDidLoad() {
275
272
  window.addEventListener('LoginCredentials', this.autofillCredentialsHandler);
273
+ window.postMessage({ type: 'UserLoginDidLoad' });
276
274
  }
277
275
  componentDidRender() {
278
276
  // start custom styling area
@@ -285,6 +283,9 @@ const UserLogin$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
285
283
  }
286
284
  // end custom styling area
287
285
  }
286
+ disconnectedCallback() {
287
+ window.removeEventListener('LoginCredentials', this.autofillCredentialsHandler);
288
+ }
288
289
  sendErrorNotification(errorMessage) {
289
290
  window.postMessage({ type: "HasError", error: errorMessage }, window.location.href);
290
291
  window.postMessage({ type: 'WidgetNotification', data: {
@@ -1020,7 +1020,11 @@ const connectedCallback = (elm) => {
1020
1020
  };
1021
1021
  const disconnectedCallback = (elm) => {
1022
1022
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1023
- getHostRef(elm);
1023
+ const hostRef = getHostRef(elm);
1024
+ const instance = hostRef.$lazyInstance$ ;
1025
+ {
1026
+ safeCall(instance, 'disconnectedCallback');
1027
+ }
1024
1028
  }
1025
1029
  };
1026
1030
  const bootstrapLazy = (lazyBundles, options = {}) => {
@@ -1,4 +1,4 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-adf399de.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-20da8fd1.js';
2
2
 
3
3
  /*
4
4
  Stencil Client Patch Esm v2.15.2 | MIT Licensed | https://stenciljs.com
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, h } from './index-adf399de.js';
1
+ import { r as registerInstance, h } from './index-20da8fd1.js';
2
2
 
3
3
  const DEFAULT_LANGUAGE = 'en';
4
4
  const SUPPORTED_LANGUAGES = ['ro', 'en', 'cz', 'de', 'hr'];
@@ -172,10 +172,7 @@ const UserLogin = class {
172
172
  this.autofillCredentialsHandler = (e) => {
173
173
  this.userNameEmail = e.detail.userNameEmail;
174
174
  this.userPassword = e.detail.userPassword;
175
- this.userLogin({
176
- username: this.userNameEmail,
177
- password: this.userPassword
178
- });
175
+ this.handleLogin();
179
176
  };
180
177
  this.userLogin = async ({ username, password }) => {
181
178
  let headers = {
@@ -271,6 +268,7 @@ const UserLogin = class {
271
268
  }
272
269
  componentDidLoad() {
273
270
  window.addEventListener('LoginCredentials', this.autofillCredentialsHandler);
271
+ window.postMessage({ type: 'UserLoginDidLoad' });
274
272
  }
275
273
  componentDidRender() {
276
274
  // start custom styling area
@@ -283,6 +281,9 @@ const UserLogin = class {
283
281
  }
284
282
  // end custom styling area
285
283
  }
284
+ disconnectedCallback() {
285
+ window.removeEventListener('LoginCredentials', this.autofillCredentialsHandler);
286
+ }
286
287
  sendErrorNotification(errorMessage) {
287
288
  window.postMessage({ type: "HasError", error: errorMessage }, window.location.href);
288
289
  window.postMessage({ type: 'WidgetNotification', data: {
@@ -1,4 +1,4 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-adf399de.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-20da8fd1.js';
2
2
 
3
3
  /*
4
4
  Stencil Client Patch Browser v2.15.2 | MIT Licensed | https://stenciljs.com
@@ -59,6 +59,7 @@ export declare class UserLogin {
59
59
  componentWillLoad(): Promise<void>;
60
60
  componentDidLoad(): void;
61
61
  componentDidRender(): void;
62
+ disconnectedCallback(): void;
62
63
  setClientStyling: () => void;
63
64
  setClientStylingURL: () => void;
64
65
  autofillCredentialsHandler: (e: any) => void;
@@ -0,0 +1 @@
1
+ import{r as s,h as i}from"./p-55726395.js";const t=["ro","en","cz","de","hr"],o={en:{invalidField:"This field is invalid",forgotPassword:"Forgot Password",userEmail:"Username or Email",password:"Password",login:"Login",genericError:"An unexpected error has occured",successMessage:"Login successful"},ro:{invalidField:"This field is invalid",forgotPassword:"Forgot Password",userEmail:"Username or Email",password:"Password",login:"Login",genericError:"An unexpected error has occured",successMessage:"Login successful"},hr:{invalidField:"Ovo polje je nevažeće",forgotPassword:"Zaboravljena lozinka",userEmail:"Korisničko ime ili email",password:"Lozinka",login:"Prijava",genericError:"Došlo je do neočekivane pogreške",successMessage:"Prijava uspješna"},fr:{invalidField:"This field is invalid",forgotPassword:"Forgot Password",userEmail:"Username or Email",password:"Password",login:"Login",genericError:"An unexpected error has occured",successMessage:"Login successful"},cs:{invalidField:"Ovo polje je nevažeće.",forgotPassword:"Zaboravio sam lozinku ",userEmail:"Korisničko ime ili email",password:"Lozinka",login:"Prijava",genericError:"An unexpected error has occured",successMessage:"Login successful"},de:{invalidField:"This field is invalid",forgotPassword:"Forgot Password",userEmail:"Username or Email",password:"Password",login:"Login",genericError:"An unexpected error has occured",successMessage:"Login successful"},"pt-br":{invalidField:"O campo é inválido",forgotPassword:"Esqueceu sua senha",userEmail:"Usuário ou e-mail",Password:"Senha",login:"Entrem",genericError:"Ocorreu um erro inesperado",successMessage:"Você fez login com sucesso"},"es-mx":{invalidField:"El campo es inválido",forgotPassword:"Olvidó contraseña",userEmail:"Usuario o Correo Electrónico",Password:"Contraseña",login:"Entrar",genericError:"Ha ocurrido un error inesperado",successMessage:"Ha ingreasado de forma exitosa"}},e=s=>new Promise((i=>{fetch(s).then((s=>s.json())).then((s=>{Object.keys(s).forEach((i=>{for(let t in s[i])o[i][t]=s[i][t]})),i(!0)}))})),r=(s,i,e)=>{const r=i;let n=o[void 0!==r&&t.includes(r)?r:"en"][s];if(void 0!==e)for(const[s,i]of Object.entries(e.values)){const t=new RegExp(`{${s}}`,"g");n=n.replace(t,i)}return n},n=class{constructor(i){s(this,i),this.endpoint="",this.lang="en",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.passwordReset="false",this.userEmailRegexOptions="i",this.passwordRegexOptions="",this.userNameEmail="",this.userPassword="",this.isValidUserEmail=!0,this.isValidPassword=!0,this.isPasswordVisible=!1,this.limitStylingAppends=!1,this.errorMessage="",this.hasError=!1,this.setClientStyling=()=>{let s=document.createElement("style");s.innerHTML=this.clientStyling,this.stylingContainer.appendChild(s)},this.setClientStylingURL=()=>{let s=new URL(this.clientStylingUrl),i=document.createElement("style");fetch(s.href).then((s=>s.text())).then((s=>{i.innerHTML=s,setTimeout((()=>{this.stylingContainer.appendChild(i)}),1)}))},this.autofillCredentialsHandler=s=>{this.userNameEmail=s.detail.userNameEmail,this.userPassword=s.detail.userPassword,this.handleLogin()},this.userLogin=async({username:s,password:i})=>{let t={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:s,password:i})};fetch(`${this.endpoint}/v1/player/legislation/login`,t).then((s=>s.json())).then((s=>{var i,t;(null===(i=s.sessionBlockers)||void 0===i?void 0:i.includes("has-to-set-consents"))&&window.postMessage({type:"PlayerActions",gmversion:"gm16"},window.location.href),!0===(null==s?void 0:s.hasToSetPass)&&window.postMessage({type:"HasToSetPass"},window.location.href),s.sessionId?(window.postMessage({type:"UserSessionID",session:s.sessionId,userid:s.userId},window.location.href),window.postMessage({type:"WidgetNotification",data:{type:"success",message:r("successMessage",this.lang)}},window.location.href),this.hasError=!1):(this.hasError=!0,this.errorMessage=null===(t=null==s?void 0:s.thirdPartyResponse)||void 0===t?void 0:t.message,this.errorMessage&&(console.error(this.errorMessage),this.sendErrorNotification(this.errorMessage)))})).catch((s=>{console.error(s),this.hasError=!0,this.errorMessage=r("genericError",this.lang),this.sendErrorNotification(this.errorMessage)}))},this.debouncedUserLogin=this.debounce(this.userLogin,850),this.handleLogin=()=>{this.debouncedUserLogin({username:this.userNameEmail,password:this.userPassword}),this.dispatchUpdateLoginCredentialsEvent()},this.handleInputChange=(s,i)=>{this.hasError=!1;const t=s.target.value;"user"===i?(this.userNameEmail=t,this.isValidUserEmail=this.userEmailValidation(this.userNameEmail)):(this.userPassword=t,this.isValidPassword=this.passwordValidation(t))},this.userEmailValidation=s=>new RegExp(this.userEmailRegex,this.userEmailRegexOptions).test(s),this.passwordValidation=s=>new RegExp(this.passwordRegex,this.passwordRegexOptions).test(s),this.togglePassword=()=>{this.isPasswordVisible=!this.isPasswordVisible},this.resetPassword=()=>{window.postMessage({type:"NavForgotPassword"},window.location.href)}}handleNewTranslations(){e(this.translationUrl)}async componentWillLoad(){this.translationUrl.length>2&&await e(this.translationUrl)}componentDidLoad(){window.addEventListener("LoginCredentials",this.autofillCredentialsHandler),window.postMessage({type:"UserLoginDidLoad"})}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}disconnectedCallback(){window.removeEventListener("LoginCredentials",this.autofillCredentialsHandler)}sendErrorNotification(s){window.postMessage({type:"HasError",error:s},window.location.href),window.postMessage({type:"WidgetNotification",data:{type:"error",message:s}},window.location.href)}debounce(s,i){let t;return function(...o){clearTimeout(t),t=setTimeout((()=>{s.apply(this,o)}),i)}}dispatchUpdateLoginCredentialsEvent(){this.hasError||(this.updateLoginCredentialsEvent=new CustomEvent("UpdateLoginCredentials",{bubbles:!0,detail:{userNameEmail:this.userNameEmail,userPassword:this.userPassword}}),window.dispatchEvent(this.updateLoginCredentialsEvent))}render(){let s=i("span",{class:"InputIcon"},this.isPasswordVisible&&i("svg",{onClick:()=>this.togglePassword(),class:"TogglePasswordVisibility",part:"TogglePasswordVisibility",xmlns:"http://www.w3.org/2000/svg",width:"18.844",height:"12.887",viewBox:"0 0 18.844 12.887"},i("g",{transform:"translate(-110.856 -23.242)"},i("circle",{class:"PasswordVisibilityIcon",cx:"0.05",cy:"0.05",r:"0.05",transform:"translate(121.017 31.148)"}),i("g",{transform:"translate(117.499 27.37)"},i("path",{class:"PasswordVisibilityIcon",d:"M147.413,43.174a2.774,2.774,0,0,0-3.229-3.943Z",transform:"translate(-142.164 -39.123)"}),i("path",{class:"PasswordVisibilityIcon",d:"M137.031,43.1a2.778,2.778,0,0,0,3.447,4.209Z",transform:"translate(-136.413 -42.068)"})),i("g",{transform:"translate(110.856 24.899)"},i("path",{class:"PasswordVisibilityIcon",d:"M122.538,42.061a7.043,7.043,0,0,1-2.325.53,10.373,10.373,0,0,1-4.393-1.482,36.509,36.509,0,0,1-3.873-2.391.13.13,0,0,1,0-.208,44.141,44.141,0,0,1,3.873-2.651c.394-.233.768-.437,1.13-.622l-.686-.838c-.322.167-.651.347-.99.55a37.989,37.989,0,0,0-3.977,2.729,1.21,1.21,0,0,0-.442.962,1.1,1.1,0,0,0,.494.936,34.416,34.416,0,0,0,3.977,2.469,11.468,11.468,0,0,0,4.886,1.611,8.427,8.427,0,0,0,3.039-.725Z",transform:"translate(-110.856 -33.157)"}),i("path",{class:"PasswordVisibilityIcon",d:"M149.119,34.14a45.875,45.875,0,0,0-4.055-2.729,20.541,20.541,0,0,0-2.547-1.248,5.6,5.6,0,0,0-4.79-.017l.7.856a5.254,5.254,0,0,1,1.672-.346,10.072,10.072,0,0,1,4.445,1.663,34.132,34.132,0,0,1,3.925,2.651.13.13,0,0,1,0,.208,40.2,40.2,0,0,1-3.925,2.391c-.179.092-.352.176-.525.26l.684.835c.1-.054.2-.1.309-.159a36.356,36.356,0,0,0,4.055-2.469,1.067,1.067,0,0,0,.52-.936A1.159,1.159,0,0,0,149.119,34.14Z",transform:"translate(-130.743 -29.617)"})),i("rect",{class:"PasswordVisibilityIcon",width:"0.972",height:"15.861",rx:"0.486",transform:"translate(114.827 23.858) rotate(-39.315)"}))),!this.isPasswordVisible&&i("svg",{onClick:()=>this.togglePassword(),class:"TogglePasswordVisibility PasswordVisible",part:"TogglePasswordVisibility",xmlns:"http://www.w3.org/2000/svg",width:"18.843",height:"10.5",viewBox:"0 0 18.843 10.5"},i("g",{transform:"translate(-14.185 -27.832)"},i("path",{class:"PasswordVisibilityIcon",d:"M23.541,38.332a11.467,11.467,0,0,1-4.886-1.611,34.413,34.413,0,0,1-3.976-2.469,1.1,1.1,0,0,1-.494-.936,1.21,1.21,0,0,1,.442-.962A37.986,37.986,0,0,1,18.6,29.625a16.06,16.06,0,0,1,2.521-1.248,6.862,6.862,0,0,1,2.417-.546,6.862,6.862,0,0,1,2.417.546,20.541,20.541,0,0,1,2.547,1.248,45.872,45.872,0,0,1,4.054,2.729,1.159,1.159,0,0,1,.468.962,1.067,1.067,0,0,1-.52.936,36.353,36.353,0,0,1-4.054,2.469A11.2,11.2,0,0,1,23.541,38.332Zm0-9.46a9.813,9.813,0,0,0-4.392,1.663,44.138,44.138,0,0,0-3.873,2.651.13.13,0,0,0,0,.208,36.5,36.5,0,0,0,3.873,2.391,10.372,10.372,0,0,0,4.392,1.481,11.051,11.051,0,0,0,4.444-1.481,40.2,40.2,0,0,0,3.925-2.391.13.13,0,0,0,0-.208h0a34.132,34.132,0,0,0-3.925-2.651A10.072,10.072,0,0,0,23.541,28.872Z",transform:"translate(0)"}),i("circle",{class:"PasswordVisibilityIcon",cx:"2.779",cy:"2.779",r:"2.779",transform:"translate(20.827 30.303)"})))),t=i("div",{class:"FormBox"},i("div",{class:"FormValue"},i("div",{class:!this.isValidUserEmail||this.hasError?"InputBox InputInvalidBox":"InputBox"},i("input",{type:"text",placeholder:"",value:this.userNameEmail,onFocus:s=>this.handleInputChange(s,"user"),onInput:s=>this.handleInputChange(s,"user"),required:!0}),i("label",{class:(this.userNameEmail?"FieldFilledIn":"")+" "+(!this.isValidUserEmail||this.hasError?"FieldInvalid":"")},r("userEmail",this.lang)),!this.isValidUserEmail&&i("p",{class:"InvalidField"},r("invalidField",this.lang))),i("div",{class:!this.isValidPassword||this.hasError?"InputBox InputInvalidBox":"InputBox"},s,i("input",{type:this.isPasswordVisible?"text":"password",placeholder:"",value:this.userPassword,onFocus:s=>this.handleInputChange(s,"password"),onInput:s=>this.handleInputChange(s,"password"),required:!0}),i("label",{class:(this.userPassword?"FieldFilledIn":"")+" "+(!this.isValidPassword||this.hasError?"FieldInvalid":"")},r("password",this.lang)),!this.isValidPassword&&i("p",{class:"InvalidField"},r("invalidField",this.lang))),"true"==this.passwordReset&&i("div",{class:"ForgotPassword"},i("button",{onClick:()=>this.resetPassword()},r("forgotPassword",this.lang))),i("button",{disabled:!(this.isValidUserEmail&&this.isValidPassword&&this.userNameEmail&&this.userPassword),class:"SubmitCredentials",onClick:()=>this.handleLogin()},r("login",this.lang)),this.hasError&&i("p",{class:"CredentialsError"},this.errorMessage?this.errorMessage:r("genericError",this.lang))));return i("section",{ref:s=>this.stylingContainer=s},t)}static get watchers(){return{translationUrl:["handleNewTranslations"]}}};n.style=':host{display:block;font-family:"Roboto", sans-serif}section{height:100%;width:100%;background-position:center;background-size:cover}.FormBox{height:100%;display:flex;position:relative;background:none;border:none;backdrop-filter:blur(15px) brightness(80%);justify-content:center;align-items:center}.InputBox{position:relative;margin:30px 0;width:310px;border-bottom:2px solid #0797B9}.InputBox.InputInvalidBox::after{content:"";height:2px;width:100%;transition:width 0.6s linear;background:#C23135}.InputBox::after{content:"";display:block;width:0;height:2px;position:relative;top:2px}.InputBox .PasswordVisibilityIcon{fill:#0797B9}.InputBox .InputIcon .TogglePasswordVisibility{cursor:pointer;position:absolute;top:18px;right:0}.InputBox .InputIcon .TogglePasswordVisibility.PasswordVisible{top:19.5px}.InputBox label{position:absolute;top:50%;left:5px;transform:translateY(-50%);color:#0797B9;font-size:1em;pointer-events:none;transition:0.5s}.InputBox label.FieldInvalid{color:#C23135}.InputBox input{width:100%;height:50px;background:transparent;border:none;outline:none;font-size:1em;padding:0 35px 0 5px;color:#fff;box-sizing:border-box}input:focus~label,label.FieldFilledIn{top:-3px;font-size:0.7em}.ForgotPassword button{margin:-10px 0 17px;font-size:0.9em;color:#0797B9;display:flex;justify-content:space-between;background-color:transparent;padding:0;height:unset;border:0;cursor:pointer}.ForgotPassword button:hover{color:#fff}.SubmitCredentials{display:block;margin:0 auto;padding:10px 20px;border-radius:5px;color:var(--emfe-w-button-typography, var(--emfe-w-color-white, #FFFFFF));background:linear-gradient(to right, #EA0C66, #77318F);border:none;outline:none;cursor:pointer;font-size:1em}.SubmitCredentials:disabled{background:#707070}.Register{font-size:0.9em;color:#fff;text-align:center;margin:25px 0 10px}.Register p a{text-decoration:none;color:#fff;font-weight:600}.Register p a:hover{text-decoration:underline}.InvalidField{position:absolute;top:45px;color:#C23135;font-size:0.7em}.SubmitCredentials{margin-bottom:20px}.CredentialsError{color:#C23135;font-size:0.7em;padding:0 0 20px 0;margin:0}@media screen and (max-width: 480px){.FormBox{width:100%;border-radius:0px}}';export{n as user_login}
@@ -0,0 +1 @@
1
+ let e,t,n=!1,l=!1;const s="undefined"!=typeof window?window:{},o=s.document||{head:{}},r={t:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},i=e=>Promise.resolve(e),c=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1})(),u=new WeakMap,a=e=>"sc-"+e.o,f={},h=e=>"object"==(e=typeof e)||"function"===e,d=(e,t,...n)=>{let l=null,s=!1,o=!1,r=[];const i=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?i(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!h(l))&&(l+=""),s&&o?r[r.length-1].i+=l:r.push(s?$(null,l):l),o=s)};if(i(n),t){const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}const c=$(e,null);return c.u=t,r.length>0&&(c.h=r),c},$=(e,t)=>({t:0,$:e,i:t,p:null,h:null,u:null}),p={},m=(e,t,n,l,o,i)=>{if(n!==l){let c=V(e,t),u=t.toLowerCase();if("class"===t){const t=e.classList,s=w(n),o=w(l);t.remove(...s.filter((e=>e&&!o.includes(e)))),t.add(...o.filter((e=>e&&!s.includes(e))))}else if("ref"===t)l&&l(e);else if(c||"o"!==t[0]||"n"!==t[1]){const s=h(l);if((c||s&&null!==l)&&!o)try{if(e.tagName.includes("-"))e[t]=l;else{let s=null==l?"":l;"list"===t?c=!1:null!=n&&e[t]==s||(e[t]=s)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!c||4&i||o)&&!s&&e.setAttribute(t,l=!0===l?"":l)}else t="-"===t[2]?t.slice(3):V(s,u)?u.slice(2):u[2]+t.slice(3),n&&r.rel(e,t,n,!1),l&&r.ael(e,t,l,!1)}},y=/\s/,w=e=>e?e.split(y):[],b=(e,t,n,l)=>{const s=11===t.p.nodeType&&t.p.host?t.p.host:t.p,o=e&&e.u||f,r=t.u||f;for(l in o)l in r||m(s,l,o[l],void 0,n,t.t);for(l in r)m(s,l,o[l],r[l],n,t.t)},g=(t,l,s)=>{let r,i,c=l.h[s],u=0;if(null!==c.i)r=c.p=o.createTextNode(c.i);else{if(n||(n="svg"===c.$),r=c.p=o.createElementNS(n?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",c.$),n&&"foreignObject"===c.$&&(n=!1),b(null,c,n),null!=e&&r["s-si"]!==e&&r.classList.add(r["s-si"]=e),c.h)for(u=0;u<c.h.length;++u)i=g(t,c,u),i&&r.appendChild(i);"svg"===c.$?n=!1:"foreignObject"===r.tagName&&(n=!0)}return r},S=(e,n,l,s,o,r)=>{let i,c=e;for(c.shadowRoot&&c.tagName===t&&(c=c.shadowRoot);o<=r;++o)s[o]&&(i=g(null,l,o),i&&(s[o].p=i,c.insertBefore(i,n)))},j=(e,t,n,l,s)=>{for(;t<=n;++t)(l=e[t])&&(s=l.p,M(l),s.remove())},v=(e,t)=>e.$===t.$,O=(e,t)=>{const l=t.p=e.p,s=e.h,o=t.h,r=t.$,i=t.i;null===i?(n="svg"===r||"foreignObject"!==r&&n,b(e,t,n),null!==s&&null!==o?((e,t,n,l)=>{let s,o=0,r=0,i=t.length-1,c=t[0],u=t[i],a=l.length-1,f=l[0],h=l[a];for(;o<=i&&r<=a;)null==c?c=t[++o]:null==u?u=t[--i]:null==f?f=l[++r]:null==h?h=l[--a]:v(c,f)?(O(c,f),c=t[++o],f=l[++r]):v(u,h)?(O(u,h),u=t[--i],h=l[--a]):v(c,h)?(O(c,h),e.insertBefore(c.p,u.p.nextSibling),c=t[++o],h=l[--a]):v(u,f)?(O(u,f),e.insertBefore(u.p,c.p),u=t[--i],f=l[++r]):(s=g(t&&t[r],n,r),f=l[++r],s&&c.p.parentNode.insertBefore(s,c.p));o>i?S(e,null==l[a+1]?null:l[a+1].p,n,l,r,a):r>a&&j(t,o,i)})(l,s,t,o):null!==o?(null!==e.i&&(l.textContent=""),S(l,null,t,o,0,o.length-1)):null!==s&&j(s,0,s.length-1),n&&"svg"===r&&(n=!1)):e.i!==i&&(l.data=i)},M=e=>{e.u&&e.u.ref&&e.u.ref(null),e.h&&e.h.map(M)},k=(e,t)=>{t&&!e.m&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.m=t)))},C=(e,t)=>{if(e.t|=16,!(4&e.t))return k(e,e.g),Z((()=>x(e,t)));e.t|=512},x=(e,t)=>{const n=e.S;let l;return t&&(l=R(n,"componentWillLoad")),T(l,(()=>L(e,n,t)))},L=async(e,t,n)=>{const l=e.j,s=l["s-rc"];n&&(e=>{const t=e.v,n=e.j,l=t.t,s=((e,t)=>{let n=a(t),l=G.get(n);if(e=11===e.nodeType?e:o,l)if("string"==typeof l){let t,s=u.get(e=e.head||e);s||u.set(e,s=new Set),s.has(n)||(t=o.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link")),s&&s.add(n))}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=s,n.classList.add(s+"-h"))})(e);P(e,t),s&&(s.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>E(e);0===t.length?n():(Promise.all(t).then(n),e.t|=4,t.length=0)}},P=(n,l)=>{try{l=l.render(),n.t&=-17,n.t|=2,((n,l)=>{const s=n.j,o=n.v,r=n.O||$(null,null),i=(e=>e&&e.$===p)(l)?l:d(null,null,l);t=s.tagName,o.M&&(i.u=i.u||{},o.M.map((([e,t])=>i.u[t]=s[e]))),i.$=null,i.t|=4,n.O=i,i.p=r.p=s.shadowRoot||s,e=s["s-sc"],O(r,i)})(n,l)}catch(e){_(e,n.j)}return null},E=e=>{const t=e.j,n=e.S,l=e.g;R(n,"componentDidRender"),64&e.t||(e.t|=64,W(t),R(n,"componentDidLoad"),e.k(t),l||N()),e.m&&(e.m(),e.m=void 0),512&e.t&&Y((()=>C(e,!1))),e.t&=-517},N=()=>{W(o.documentElement),Y((()=>(e=>{const t=r.ce("appload",{detail:{namespace:"user-login"}});return e.dispatchEvent(t),t})(s)))},R=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){_(e)}},T=(e,t)=>e&&e.then?e.then(t):t(),W=e=>e.classList.add("hydrated"),A=(e,t,n)=>{if(t.C){e.watchers&&(t.L=e.watchers);const l=Object.entries(t.C),s=e.prototype;if(l.map((([e,[l]])=>{(31&l||2&n&&32&l)&&Object.defineProperty(s,e,{get(){return((e,t)=>q(this).P.get(t))(0,e)},set(n){((e,t,n,l)=>{const s=q(e),o=s.j,r=s.P.get(t),i=s.t,c=s.S;if(n=((e,t)=>null==e||h(e)?e:1&t?e+"":e)(n,l.C[t][0]),(!(8&i)||void 0===r)&&n!==r&&(!Number.isNaN(r)||!Number.isNaN(n))&&(s.P.set(t,n),c)){if(l.L&&128&i){const e=l.L[t];e&&e.map((e=>{try{c[e](n,r,t)}catch(e){_(e,o)}}))}2==(18&i)&&C(s,!1)}})(this,e,n,t)},configurable:!0,enumerable:!0})})),1&n){const n=new Map;s.attributeChangedCallback=function(e,t,l){r.jmp((()=>{const t=n.get(e);if(this.hasOwnProperty(t))l=this[t],delete this[t];else if(s.hasOwnProperty(t)&&"number"==typeof this[t]&&this[t]==l)return;this[t]=(null!==l||"boolean"!=typeof this[t])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,l])=>{const s=l[1]||e;return n.set(s,e),512&l[0]&&t.M.push([e,s]),s}))}}return e},D=(e,t={})=>{const n=[],l=t.exclude||[],i=s.customElements,u=o.head,f=u.querySelector("meta[charset]"),h=o.createElement("style"),d=[];let $,p=!0;Object.assign(r,t),r.l=new URL(t.resourcesUrl||"./",o.baseURI).href,e.map((e=>{e[1].map((t=>{const s={t:t[0],o:t[1],C:t[2],N:t[3]};s.C=t[2],s.M=[],s.L={};const o=s.o,u=class extends HTMLElement{constructor(e){super(e),H(e=this,s),1&s.t&&e.attachShadow({mode:"open"})}connectedCallback(){$&&(clearTimeout($),$=null),p?d.push(this):r.jmp((()=>(e=>{if(0==(1&r.t)){const t=q(e),n=t.v,l=()=>{};if(!(1&t.t)){t.t|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){k(t,t.g=n);break}}n.C&&Object.entries(n.C).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,s)=>{if(0==(32&t.t)){{if(t.t|=32,(s=B(n)).then){const e=()=>{};s=await s,e()}s.isProxied||(n.L=s.watchers,A(s,n,2),s.isProxied=!0);const e=()=>{};t.t|=8;try{new s(t)}catch(e){_(e)}t.t&=-9,t.t|=128,e()}if(s.style){let e=s.style;const t=a(n);if(!G.has(t)){const l=()=>{};((e,t,n)=>{let l=G.get(e);c&&n?(l=l||new CSSStyleSheet,l.replace(t)):l=t,G.set(e,l)})(t,e,!!(1&n.t)),l()}}}const o=t.g,r=()=>C(t,!0);o&&o["s-rc"]?o["s-rc"].push(r):r()})(0,t,n)}l()}})(this)))}disconnectedCallback(){r.jmp((()=>(()=>{0==(1&r.t)&&R(q(this).S,"disconnectedCallback")})()))}componentOnReady(){return q(this).R}};s.T=e[0],l.includes(o)||i.get(o)||(n.push(o),i.define(o,A(u,s,1)))}))})),h.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",h.setAttribute("data-styles",""),u.insertBefore(h,f?f.nextSibling:u.firstChild),p=!1,d.length?d.map((e=>e.connectedCallback())):r.jmp((()=>$=setTimeout(N,30)))},U=new WeakMap,q=e=>U.get(e),F=(e,t)=>U.set(t.S=e,t),H=(e,t)=>{const n={t:0,j:e,v:t,P:new Map};return n.R=new Promise((e=>n.k=e)),e["s-p"]=[],e["s-rc"]=[],U.set(e,n)},V=(e,t)=>t in e,_=(e,t)=>(0,console.error)(e,t),z=new Map,B=e=>{const t=e.o.replace(/-/g,"_"),n=e.T,l=z.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(z.set(n,e),e[t])),_)},G=new Map,I=[],J=[],K=(e,t)=>n=>{e.push(n),l||(l=!0,t&&4&r.t?Y(X):r.raf(X))},Q=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){_(e)}e.length=0},X=()=>{Q(I),Q(J),(l=I.length>0)&&r.raf(X)},Y=e=>i().then(e),Z=K(J,!0);export{D as b,d as h,i as p,F as r}
@@ -1 +1 @@
1
- import{p as s,b as e}from"./p-f775dfb7.js";(()=>{const e=import.meta.url,r={};return""!==e&&(r.resourcesUrl=new URL(".",e).href),s(r)})().then((s=>e([["p-26b5d1e1",[[1,"user-login",{endpoint:[513],lang:[1537],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],passwordReset:[513,"password-reset"],userEmailRegex:[513,"user-email-regex"],userEmailRegexOptions:[513,"user-email-regex-options"],passwordRegex:[513,"password-regex"],passwordRegexOptions:[513,"password-regex-options"],userNameEmail:[32],userPassword:[32],isValidUserEmail:[32],isValidPassword:[32],isPasswordVisible:[32],limitStylingAppends:[32],errorMessage:[32],hasError:[32]}]]]],s)));
1
+ import{p as s,b as e}from"./p-55726395.js";(()=>{const e=import.meta.url,r={};return""!==e&&(r.resourcesUrl=new URL(".",e).href),s(r)})().then((s=>e([["p-343d8f44",[[1,"user-login",{endpoint:[513],lang:[1537],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],passwordReset:[513,"password-reset"],userEmailRegex:[513,"user-email-regex"],userEmailRegexOptions:[513,"user-email-regex-options"],passwordRegex:[513,"password-regex"],passwordRegexOptions:[513,"password-regex-options"],userNameEmail:[32],userPassword:[32],isValidUserEmail:[32],isValidPassword:[32],isPasswordVisible:[32],limitStylingAppends:[32],errorMessage:[32],hasError:[32]}]]]],s)));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/user-login",
3
- "version": "1.33.4",
3
+ "version": "1.34.0",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",
@@ -1 +0,0 @@
1
- import{r as s,h as i}from"./p-f775dfb7.js";const t=["ro","en","cz","de","hr"],o={en:{invalidField:"This field is invalid",forgotPassword:"Forgot Password",userEmail:"Username or Email",password:"Password",login:"Login",genericError:"An unexpected error has occured",successMessage:"Login successful"},ro:{invalidField:"This field is invalid",forgotPassword:"Forgot Password",userEmail:"Username or Email",password:"Password",login:"Login",genericError:"An unexpected error has occured",successMessage:"Login successful"},hr:{invalidField:"Ovo polje je nevažeće",forgotPassword:"Zaboravljena lozinka",userEmail:"Korisničko ime ili email",password:"Lozinka",login:"Prijava",genericError:"Došlo je do neočekivane pogreške",successMessage:"Prijava uspješna"},fr:{invalidField:"This field is invalid",forgotPassword:"Forgot Password",userEmail:"Username or Email",password:"Password",login:"Login",genericError:"An unexpected error has occured",successMessage:"Login successful"},cs:{invalidField:"Ovo polje je nevažeće.",forgotPassword:"Zaboravio sam lozinku ",userEmail:"Korisničko ime ili email",password:"Lozinka",login:"Prijava",genericError:"An unexpected error has occured",successMessage:"Login successful"},de:{invalidField:"This field is invalid",forgotPassword:"Forgot Password",userEmail:"Username or Email",password:"Password",login:"Login",genericError:"An unexpected error has occured",successMessage:"Login successful"},"pt-br":{invalidField:"O campo é inválido",forgotPassword:"Esqueceu sua senha",userEmail:"Usuário ou e-mail",Password:"Senha",login:"Entrem",genericError:"Ocorreu um erro inesperado",successMessage:"Você fez login com sucesso"},"es-mx":{invalidField:"El campo es inválido",forgotPassword:"Olvidó contraseña",userEmail:"Usuario o Correo Electrónico",Password:"Contraseña",login:"Entrar",genericError:"Ha ocurrido un error inesperado",successMessage:"Ha ingreasado de forma exitosa"}},e=s=>new Promise((i=>{fetch(s).then((s=>s.json())).then((s=>{Object.keys(s).forEach((i=>{for(let t in s[i])o[i][t]=s[i][t]})),i(!0)}))})),r=(s,i,e)=>{const r=i;let n=o[void 0!==r&&t.includes(r)?r:"en"][s];if(void 0!==e)for(const[s,i]of Object.entries(e.values)){const t=new RegExp(`{${s}}`,"g");n=n.replace(t,i)}return n},n=class{constructor(i){s(this,i),this.endpoint="",this.lang="en",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.passwordReset="false",this.userEmailRegexOptions="i",this.passwordRegexOptions="",this.userNameEmail="",this.userPassword="",this.isValidUserEmail=!0,this.isValidPassword=!0,this.isPasswordVisible=!1,this.limitStylingAppends=!1,this.errorMessage="",this.hasError=!1,this.setClientStyling=()=>{let s=document.createElement("style");s.innerHTML=this.clientStyling,this.stylingContainer.appendChild(s)},this.setClientStylingURL=()=>{let s=new URL(this.clientStylingUrl),i=document.createElement("style");fetch(s.href).then((s=>s.text())).then((s=>{i.innerHTML=s,setTimeout((()=>{this.stylingContainer.appendChild(i)}),1)}))},this.autofillCredentialsHandler=s=>{this.userNameEmail=s.detail.userNameEmail,this.userPassword=s.detail.userPassword,this.userLogin({username:this.userNameEmail,password:this.userPassword})},this.userLogin=async({username:s,password:i})=>{let t={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:s,password:i})};fetch(`${this.endpoint}/v1/player/legislation/login`,t).then((s=>s.json())).then((s=>{var i,t;(null===(i=s.sessionBlockers)||void 0===i?void 0:i.includes("has-to-set-consents"))&&window.postMessage({type:"PlayerActions",gmversion:"gm16"},window.location.href),!0===(null==s?void 0:s.hasToSetPass)&&window.postMessage({type:"HasToSetPass"},window.location.href),s.sessionId?(window.postMessage({type:"UserSessionID",session:s.sessionId,userid:s.userId},window.location.href),window.postMessage({type:"WidgetNotification",data:{type:"success",message:r("successMessage",this.lang)}},window.location.href),this.hasError=!1):(this.hasError=!0,this.errorMessage=null===(t=null==s?void 0:s.thirdPartyResponse)||void 0===t?void 0:t.message,this.errorMessage&&(console.error(this.errorMessage),this.sendErrorNotification(this.errorMessage)))})).catch((s=>{console.error(s),this.hasError=!0,this.errorMessage=r("genericError",this.lang),this.sendErrorNotification(this.errorMessage)}))},this.debouncedUserLogin=this.debounce(this.userLogin,850),this.handleLogin=()=>{this.debouncedUserLogin({username:this.userNameEmail,password:this.userPassword}),this.dispatchUpdateLoginCredentialsEvent()},this.handleInputChange=(s,i)=>{this.hasError=!1;const t=s.target.value;"user"===i?(this.userNameEmail=t,this.isValidUserEmail=this.userEmailValidation(this.userNameEmail)):(this.userPassword=t,this.isValidPassword=this.passwordValidation(t))},this.userEmailValidation=s=>new RegExp(this.userEmailRegex,this.userEmailRegexOptions).test(s),this.passwordValidation=s=>new RegExp(this.passwordRegex,this.passwordRegexOptions).test(s),this.togglePassword=()=>{this.isPasswordVisible=!this.isPasswordVisible},this.resetPassword=()=>{window.postMessage({type:"NavForgotPassword"},window.location.href)}}handleNewTranslations(){e(this.translationUrl)}async componentWillLoad(){this.translationUrl.length>2&&await e(this.translationUrl)}componentDidLoad(){window.addEventListener("LoginCredentials",this.autofillCredentialsHandler)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}sendErrorNotification(s){window.postMessage({type:"HasError",error:s},window.location.href),window.postMessage({type:"WidgetNotification",data:{type:"error",message:s}},window.location.href)}debounce(s,i){let t;return function(...o){clearTimeout(t),t=setTimeout((()=>{s.apply(this,o)}),i)}}dispatchUpdateLoginCredentialsEvent(){this.hasError||(this.updateLoginCredentialsEvent=new CustomEvent("UpdateLoginCredentials",{bubbles:!0,detail:{userNameEmail:this.userNameEmail,userPassword:this.userPassword}}),window.dispatchEvent(this.updateLoginCredentialsEvent))}render(){let s=i("span",{class:"InputIcon"},this.isPasswordVisible&&i("svg",{onClick:()=>this.togglePassword(),class:"TogglePasswordVisibility",part:"TogglePasswordVisibility",xmlns:"http://www.w3.org/2000/svg",width:"18.844",height:"12.887",viewBox:"0 0 18.844 12.887"},i("g",{transform:"translate(-110.856 -23.242)"},i("circle",{class:"PasswordVisibilityIcon",cx:"0.05",cy:"0.05",r:"0.05",transform:"translate(121.017 31.148)"}),i("g",{transform:"translate(117.499 27.37)"},i("path",{class:"PasswordVisibilityIcon",d:"M147.413,43.174a2.774,2.774,0,0,0-3.229-3.943Z",transform:"translate(-142.164 -39.123)"}),i("path",{class:"PasswordVisibilityIcon",d:"M137.031,43.1a2.778,2.778,0,0,0,3.447,4.209Z",transform:"translate(-136.413 -42.068)"})),i("g",{transform:"translate(110.856 24.899)"},i("path",{class:"PasswordVisibilityIcon",d:"M122.538,42.061a7.043,7.043,0,0,1-2.325.53,10.373,10.373,0,0,1-4.393-1.482,36.509,36.509,0,0,1-3.873-2.391.13.13,0,0,1,0-.208,44.141,44.141,0,0,1,3.873-2.651c.394-.233.768-.437,1.13-.622l-.686-.838c-.322.167-.651.347-.99.55a37.989,37.989,0,0,0-3.977,2.729,1.21,1.21,0,0,0-.442.962,1.1,1.1,0,0,0,.494.936,34.416,34.416,0,0,0,3.977,2.469,11.468,11.468,0,0,0,4.886,1.611,8.427,8.427,0,0,0,3.039-.725Z",transform:"translate(-110.856 -33.157)"}),i("path",{class:"PasswordVisibilityIcon",d:"M149.119,34.14a45.875,45.875,0,0,0-4.055-2.729,20.541,20.541,0,0,0-2.547-1.248,5.6,5.6,0,0,0-4.79-.017l.7.856a5.254,5.254,0,0,1,1.672-.346,10.072,10.072,0,0,1,4.445,1.663,34.132,34.132,0,0,1,3.925,2.651.13.13,0,0,1,0,.208,40.2,40.2,0,0,1-3.925,2.391c-.179.092-.352.176-.525.26l.684.835c.1-.054.2-.1.309-.159a36.356,36.356,0,0,0,4.055-2.469,1.067,1.067,0,0,0,.52-.936A1.159,1.159,0,0,0,149.119,34.14Z",transform:"translate(-130.743 -29.617)"})),i("rect",{class:"PasswordVisibilityIcon",width:"0.972",height:"15.861",rx:"0.486",transform:"translate(114.827 23.858) rotate(-39.315)"}))),!this.isPasswordVisible&&i("svg",{onClick:()=>this.togglePassword(),class:"TogglePasswordVisibility PasswordVisible",part:"TogglePasswordVisibility",xmlns:"http://www.w3.org/2000/svg",width:"18.843",height:"10.5",viewBox:"0 0 18.843 10.5"},i("g",{transform:"translate(-14.185 -27.832)"},i("path",{class:"PasswordVisibilityIcon",d:"M23.541,38.332a11.467,11.467,0,0,1-4.886-1.611,34.413,34.413,0,0,1-3.976-2.469,1.1,1.1,0,0,1-.494-.936,1.21,1.21,0,0,1,.442-.962A37.986,37.986,0,0,1,18.6,29.625a16.06,16.06,0,0,1,2.521-1.248,6.862,6.862,0,0,1,2.417-.546,6.862,6.862,0,0,1,2.417.546,20.541,20.541,0,0,1,2.547,1.248,45.872,45.872,0,0,1,4.054,2.729,1.159,1.159,0,0,1,.468.962,1.067,1.067,0,0,1-.52.936,36.353,36.353,0,0,1-4.054,2.469A11.2,11.2,0,0,1,23.541,38.332Zm0-9.46a9.813,9.813,0,0,0-4.392,1.663,44.138,44.138,0,0,0-3.873,2.651.13.13,0,0,0,0,.208,36.5,36.5,0,0,0,3.873,2.391,10.372,10.372,0,0,0,4.392,1.481,11.051,11.051,0,0,0,4.444-1.481,40.2,40.2,0,0,0,3.925-2.391.13.13,0,0,0,0-.208h0a34.132,34.132,0,0,0-3.925-2.651A10.072,10.072,0,0,0,23.541,28.872Z",transform:"translate(0)"}),i("circle",{class:"PasswordVisibilityIcon",cx:"2.779",cy:"2.779",r:"2.779",transform:"translate(20.827 30.303)"})))),t=i("div",{class:"FormBox"},i("div",{class:"FormValue"},i("div",{class:!this.isValidUserEmail||this.hasError?"InputBox InputInvalidBox":"InputBox"},i("input",{type:"text",placeholder:"",value:this.userNameEmail,onFocus:s=>this.handleInputChange(s,"user"),onInput:s=>this.handleInputChange(s,"user"),required:!0}),i("label",{class:(this.userNameEmail?"FieldFilledIn":"")+" "+(!this.isValidUserEmail||this.hasError?"FieldInvalid":"")},r("userEmail",this.lang)),!this.isValidUserEmail&&i("p",{class:"InvalidField"},r("invalidField",this.lang))),i("div",{class:!this.isValidPassword||this.hasError?"InputBox InputInvalidBox":"InputBox"},s,i("input",{type:this.isPasswordVisible?"text":"password",placeholder:"",value:this.userPassword,onFocus:s=>this.handleInputChange(s,"password"),onInput:s=>this.handleInputChange(s,"password"),required:!0}),i("label",{class:(this.userPassword?"FieldFilledIn":"")+" "+(!this.isValidPassword||this.hasError?"FieldInvalid":"")},r("password",this.lang)),!this.isValidPassword&&i("p",{class:"InvalidField"},r("invalidField",this.lang))),"true"==this.passwordReset&&i("div",{class:"ForgotPassword"},i("button",{onClick:()=>this.resetPassword()},r("forgotPassword",this.lang))),i("button",{disabled:!(this.isValidUserEmail&&this.isValidPassword&&this.userNameEmail&&this.userPassword),class:"SubmitCredentials",onClick:()=>this.handleLogin()},r("login",this.lang)),this.hasError&&i("p",{class:"CredentialsError"},this.errorMessage?this.errorMessage:r("genericError",this.lang))));return i("section",{ref:s=>this.stylingContainer=s},t)}static get watchers(){return{translationUrl:["handleNewTranslations"]}}};n.style=':host{display:block;font-family:"Roboto", sans-serif}section{height:100%;width:100%;background-position:center;background-size:cover}.FormBox{height:100%;display:flex;position:relative;background:none;border:none;backdrop-filter:blur(15px) brightness(80%);justify-content:center;align-items:center}.InputBox{position:relative;margin:30px 0;width:310px;border-bottom:2px solid #0797B9}.InputBox.InputInvalidBox::after{content:"";height:2px;width:100%;transition:width 0.6s linear;background:#C23135}.InputBox::after{content:"";display:block;width:0;height:2px;position:relative;top:2px}.InputBox .PasswordVisibilityIcon{fill:#0797B9}.InputBox .InputIcon .TogglePasswordVisibility{cursor:pointer;position:absolute;top:18px;right:0}.InputBox .InputIcon .TogglePasswordVisibility.PasswordVisible{top:19.5px}.InputBox label{position:absolute;top:50%;left:5px;transform:translateY(-50%);color:#0797B9;font-size:1em;pointer-events:none;transition:0.5s}.InputBox label.FieldInvalid{color:#C23135}.InputBox input{width:100%;height:50px;background:transparent;border:none;outline:none;font-size:1em;padding:0 35px 0 5px;color:#fff;box-sizing:border-box}input:focus~label,label.FieldFilledIn{top:-3px;font-size:0.7em}.ForgotPassword button{margin:-10px 0 17px;font-size:0.9em;color:#0797B9;display:flex;justify-content:space-between;background-color:transparent;padding:0;height:unset;border:0;cursor:pointer}.ForgotPassword button:hover{color:#fff}.SubmitCredentials{display:block;margin:0 auto;padding:10px 20px;border-radius:5px;color:var(--emfe-w-button-typography, var(--emfe-w-color-white, #FFFFFF));background:linear-gradient(to right, #EA0C66, #77318F);border:none;outline:none;cursor:pointer;font-size:1em}.SubmitCredentials:disabled{background:#707070}.Register{font-size:0.9em;color:#fff;text-align:center;margin:25px 0 10px}.Register p a{text-decoration:none;color:#fff;font-weight:600}.Register p a:hover{text-decoration:underline}.InvalidField{position:absolute;top:45px;color:#C23135;font-size:0.7em}.SubmitCredentials{margin-bottom:20px}.CredentialsError{color:#C23135;font-size:0.7em;padding:0 0 20px 0;margin:0}@media screen and (max-width: 480px){.FormBox{width:100%;border-radius:0px}}';export{n as user_login}
@@ -1 +0,0 @@
1
- let e,t,n=!1,l=!1;const o="undefined"!=typeof window?window:{},s=o.document||{head:{}},r={t:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},i=e=>Promise.resolve(e),c=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1})(),u=new WeakMap,a=e=>"sc-"+e.o,f={},h=e=>"object"==(e=typeof e)||"function"===e,$=(e,t,...n)=>{let l=null,o=!1,s=!1,r=[];const i=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?i(l):null!=l&&"boolean"!=typeof l&&((o="function"!=typeof e&&!h(l))&&(l+=""),o&&s?r[r.length-1].i+=l:r.push(o?d(null,l):l),s=o)};if(i(n),t){const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}const c=d(e,null);return c.u=t,r.length>0&&(c.h=r),c},d=(e,t)=>({t:0,$:e,i:t,p:null,h:null,u:null}),p={},m=(e,t,n,l,s,i)=>{if(n!==l){let c=V(e,t),u=t.toLowerCase();if("class"===t){const t=e.classList,o=w(n),s=w(l);t.remove(...o.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!o.includes(e))))}else if("ref"===t)l&&l(e);else if(c||"o"!==t[0]||"n"!==t[1]){const o=h(l);if((c||o&&null!==l)&&!s)try{if(e.tagName.includes("-"))e[t]=l;else{let o=null==l?"":l;"list"===t?c=!1:null!=n&&e[t]==o||(e[t]=o)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!c||4&i||s)&&!o&&e.setAttribute(t,l=!0===l?"":l)}else t="-"===t[2]?t.slice(3):V(o,u)?u.slice(2):u[2]+t.slice(3),n&&r.rel(e,t,n,!1),l&&r.ael(e,t,l,!1)}},y=/\s/,w=e=>e?e.split(y):[],b=(e,t,n,l)=>{const o=11===t.p.nodeType&&t.p.host?t.p.host:t.p,s=e&&e.u||f,r=t.u||f;for(l in s)l in r||m(o,l,s[l],void 0,n,t.t);for(l in r)m(o,l,s[l],r[l],n,t.t)},g=(t,l,o)=>{let r,i,c=l.h[o],u=0;if(null!==c.i)r=c.p=s.createTextNode(c.i);else{if(n||(n="svg"===c.$),r=c.p=s.createElementNS(n?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",c.$),n&&"foreignObject"===c.$&&(n=!1),b(null,c,n),null!=e&&r["s-si"]!==e&&r.classList.add(r["s-si"]=e),c.h)for(u=0;u<c.h.length;++u)i=g(t,c,u),i&&r.appendChild(i);"svg"===c.$?n=!1:"foreignObject"===r.tagName&&(n=!0)}return r},S=(e,n,l,o,s,r)=>{let i,c=e;for(c.shadowRoot&&c.tagName===t&&(c=c.shadowRoot);s<=r;++s)o[s]&&(i=g(null,l,s),i&&(o[s].p=i,c.insertBefore(i,n)))},j=(e,t,n,l,o)=>{for(;t<=n;++t)(l=e[t])&&(o=l.p,M(l),o.remove())},v=(e,t)=>e.$===t.$,O=(e,t)=>{const l=t.p=e.p,o=e.h,s=t.h,r=t.$,i=t.i;null===i?(n="svg"===r||"foreignObject"!==r&&n,b(e,t,n),null!==o&&null!==s?((e,t,n,l)=>{let o,s=0,r=0,i=t.length-1,c=t[0],u=t[i],a=l.length-1,f=l[0],h=l[a];for(;s<=i&&r<=a;)null==c?c=t[++s]:null==u?u=t[--i]:null==f?f=l[++r]:null==h?h=l[--a]:v(c,f)?(O(c,f),c=t[++s],f=l[++r]):v(u,h)?(O(u,h),u=t[--i],h=l[--a]):v(c,h)?(O(c,h),e.insertBefore(c.p,u.p.nextSibling),c=t[++s],h=l[--a]):v(u,f)?(O(u,f),e.insertBefore(u.p,c.p),u=t[--i],f=l[++r]):(o=g(t&&t[r],n,r),f=l[++r],o&&c.p.parentNode.insertBefore(o,c.p));s>i?S(e,null==l[a+1]?null:l[a+1].p,n,l,r,a):r>a&&j(t,s,i)})(l,o,t,s):null!==s?(null!==e.i&&(l.textContent=""),S(l,null,t,s,0,s.length-1)):null!==o&&j(o,0,o.length-1),n&&"svg"===r&&(n=!1)):e.i!==i&&(l.data=i)},M=e=>{e.u&&e.u.ref&&e.u.ref(null),e.h&&e.h.map(M)},k=(e,t)=>{t&&!e.m&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.m=t)))},C=(e,t)=>{if(e.t|=16,!(4&e.t))return k(e,e.g),Z((()=>x(e,t)));e.t|=512},x=(e,t)=>{const n=e.S;let l;return t&&(l=R(n,"componentWillLoad")),T(l,(()=>L(e,n,t)))},L=async(e,t,n)=>{const l=e.j,o=l["s-rc"];n&&(e=>{const t=e.v,n=e.j,l=t.t,o=((e,t)=>{let n=a(t),l=G.get(n);if(e=11===e.nodeType?e:s,l)if("string"==typeof l){let t,o=u.get(e=e.head||e);o||u.set(e,o=new Set),o.has(n)||(t=s.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link")),o&&o.add(n))}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(e);P(e,t),o&&(o.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>E(e);0===t.length?n():(Promise.all(t).then(n),e.t|=4,t.length=0)}},P=(n,l)=>{try{l=l.render(),n.t&=-17,n.t|=2,((n,l)=>{const o=n.j,s=n.v,r=n.O||d(null,null),i=(e=>e&&e.$===p)(l)?l:$(null,null,l);t=o.tagName,s.M&&(i.u=i.u||{},s.M.map((([e,t])=>i.u[t]=o[e]))),i.$=null,i.t|=4,n.O=i,i.p=r.p=o.shadowRoot||o,e=o["s-sc"],O(r,i)})(n,l)}catch(e){_(e,n.j)}return null},E=e=>{const t=e.j,n=e.S,l=e.g;R(n,"componentDidRender"),64&e.t||(e.t|=64,W(t),R(n,"componentDidLoad"),e.k(t),l||N()),e.m&&(e.m(),e.m=void 0),512&e.t&&Y((()=>C(e,!1))),e.t&=-517},N=()=>{W(s.documentElement),Y((()=>(e=>{const t=r.ce("appload",{detail:{namespace:"user-login"}});return e.dispatchEvent(t),t})(o)))},R=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){_(e)}},T=(e,t)=>e&&e.then?e.then(t):t(),W=e=>e.classList.add("hydrated"),A=(e,t,n)=>{if(t.C){e.watchers&&(t.L=e.watchers);const l=Object.entries(t.C),o=e.prototype;if(l.map((([e,[l]])=>{(31&l||2&n&&32&l)&&Object.defineProperty(o,e,{get(){return((e,t)=>q(this).P.get(t))(0,e)},set(n){((e,t,n,l)=>{const o=q(e),s=o.j,r=o.P.get(t),i=o.t,c=o.S;if(n=((e,t)=>null==e||h(e)?e:1&t?e+"":e)(n,l.C[t][0]),(!(8&i)||void 0===r)&&n!==r&&(!Number.isNaN(r)||!Number.isNaN(n))&&(o.P.set(t,n),c)){if(l.L&&128&i){const e=l.L[t];e&&e.map((e=>{try{c[e](n,r,t)}catch(e){_(e,s)}}))}2==(18&i)&&C(o,!1)}})(this,e,n,t)},configurable:!0,enumerable:!0})})),1&n){const n=new Map;o.attributeChangedCallback=function(e,t,l){r.jmp((()=>{const t=n.get(e);if(this.hasOwnProperty(t))l=this[t],delete this[t];else if(o.hasOwnProperty(t)&&"number"==typeof this[t]&&this[t]==l)return;this[t]=(null!==l||"boolean"!=typeof this[t])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,l])=>{const o=l[1]||e;return n.set(o,e),512&l[0]&&t.M.push([e,o]),o}))}}return e},D=(e,t={})=>{const n=[],l=t.exclude||[],i=o.customElements,u=s.head,f=u.querySelector("meta[charset]"),h=s.createElement("style"),$=[];let d,p=!0;Object.assign(r,t),r.l=new URL(t.resourcesUrl||"./",s.baseURI).href,e.map((e=>{e[1].map((t=>{const o={t:t[0],o:t[1],C:t[2],N:t[3]};o.C=t[2],o.M=[],o.L={};const s=o.o,u=class extends HTMLElement{constructor(e){super(e),H(e=this,o),1&o.t&&e.attachShadow({mode:"open"})}connectedCallback(){d&&(clearTimeout(d),d=null),p?$.push(this):r.jmp((()=>(e=>{if(0==(1&r.t)){const t=q(e),n=t.v,l=()=>{};if(!(1&t.t)){t.t|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){k(t,t.g=n);break}}n.C&&Object.entries(n.C).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,o)=>{if(0==(32&t.t)){{if(t.t|=32,(o=B(n)).then){const e=()=>{};o=await o,e()}o.isProxied||(n.L=o.watchers,A(o,n,2),o.isProxied=!0);const e=()=>{};t.t|=8;try{new o(t)}catch(e){_(e)}t.t&=-9,t.t|=128,e()}if(o.style){let e=o.style;const t=a(n);if(!G.has(t)){const l=()=>{};((e,t,n)=>{let l=G.get(e);c&&n?(l=l||new CSSStyleSheet,l.replace(t)):l=t,G.set(e,l)})(t,e,!!(1&n.t)),l()}}}const s=t.g,r=()=>C(t,!0);s&&s["s-rc"]?s["s-rc"].push(r):r()})(0,t,n)}l()}})(this)))}disconnectedCallback(){r.jmp((()=>{}))}componentOnReady(){return q(this).R}};o.T=e[0],l.includes(s)||i.get(s)||(n.push(s),i.define(s,A(u,o,1)))}))})),h.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",h.setAttribute("data-styles",""),u.insertBefore(h,f?f.nextSibling:u.firstChild),p=!1,$.length?$.map((e=>e.connectedCallback())):r.jmp((()=>d=setTimeout(N,30)))},U=new WeakMap,q=e=>U.get(e),F=(e,t)=>U.set(t.S=e,t),H=(e,t)=>{const n={t:0,j:e,v:t,P:new Map};return n.R=new Promise((e=>n.k=e)),e["s-p"]=[],e["s-rc"]=[],U.set(e,n)},V=(e,t)=>t in e,_=(e,t)=>(0,console.error)(e,t),z=new Map,B=e=>{const t=e.o.replace(/-/g,"_"),n=e.T,l=z.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(z.set(n,e),e[t])),_)},G=new Map,I=[],J=[],K=(e,t)=>n=>{e.push(n),l||(l=!0,t&&4&r.t?Y(X):r.raf(X))},Q=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){_(e)}e.length=0},X=()=>{Q(I),Q(J),(l=I.length>0)&&r.raf(X)},Y=e=>i().then(e),Z=K(J,!0);export{D as b,$ as h,i as p,F as r}