@everymatrix/general-registration 1.45.0 → 1.45.2
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.
- package/dist/cjs/checkbox-group-input_13.cjs.entry.js +4 -4
- package/dist/collection/utils/locale.utils.js +1 -1
- package/dist/esm/checkbox-group-input_13.entry.js +4 -4
- package/dist/general-registration/general-registration.esm.js +1 -1
- package/dist/general-registration/{p-af4bdf25.entry.js → p-8866be5a.entry.js} +2 -2
- package/package.json +1 -1
|
@@ -22,7 +22,7 @@ const TRANSLATIONS$1 = {
|
|
|
22
22
|
"PasswordNotMatching": "Passwords not matching",
|
|
23
23
|
"MustIncludeNumber": "Password must include a number",
|
|
24
24
|
"MustContainCapital": "Password must include a capital letter",
|
|
25
|
-
"
|
|
25
|
+
"MustIncludePunctuation": "Password must include punctuation",
|
|
26
26
|
"OnlyNumbers": "Should contains only numbers."
|
|
27
27
|
},
|
|
28
28
|
"hu": {
|
|
@@ -49,7 +49,7 @@ const TRANSLATIONS$1 = {
|
|
|
49
49
|
"numberLengthError": "Broj bi trebao biti između {min} i {max}",
|
|
50
50
|
"lengthError": "Duljina bi trebala biti između {minLength} i {maxLength}",
|
|
51
51
|
"requiredError": "Ovaj unos je obavezan.",
|
|
52
|
-
"invalidOriginalPasswordError": "
|
|
52
|
+
"invalidOriginalPasswordError": "Lozinke se ne podudaraju",
|
|
53
53
|
"passwordStrength": "Jačina zaporke",
|
|
54
54
|
"passwordStrengthWeak": "nije adekvatno",
|
|
55
55
|
"passwordStrengthStrong": "je adekvatan",
|
|
@@ -78,7 +78,7 @@ const TRANSLATIONS$1 = {
|
|
|
78
78
|
"PasswordNotMatching": "Şifreler uyuşmuyor",
|
|
79
79
|
"MustIncludeNumber": "bir sayı içermelidir",
|
|
80
80
|
"MustContainCapital": "büyük harf içermelidir",
|
|
81
|
-
"
|
|
81
|
+
"MustIncludePunctuation": "noktalama işareti içermelidir",
|
|
82
82
|
"OnlyNumbers": "Sadece sayılar içermelidir."
|
|
83
83
|
},
|
|
84
84
|
"pt-br": {
|
|
@@ -31154,7 +31154,7 @@ const TRANSLATIONS = {
|
|
|
31154
31154
|
"nextButton": 'Sljedeće',
|
|
31155
31155
|
"backButton": 'Nazad',
|
|
31156
31156
|
"doneButton": 'Gotovo',
|
|
31157
|
-
"generalError": "
|
|
31157
|
+
"generalError": "Korisnik s ovim podacima već postoji.",
|
|
31158
31158
|
"successMessage": "Register successful"
|
|
31159
31159
|
},
|
|
31160
31160
|
'pt-br': {
|
|
@@ -150,7 +150,7 @@ export const TRANSLATIONS = {
|
|
|
150
150
|
"nextButton": 'Sljedeće',
|
|
151
151
|
"backButton": 'Nazad',
|
|
152
152
|
"doneButton": 'Gotovo',
|
|
153
|
-
"generalError": "
|
|
153
|
+
"generalError": "Korisnik s ovim podacima već postoji.",
|
|
154
154
|
"successMessage": "Register successful"
|
|
155
155
|
},
|
|
156
156
|
'pt-br': {
|
|
@@ -18,7 +18,7 @@ const TRANSLATIONS$1 = {
|
|
|
18
18
|
"PasswordNotMatching": "Passwords not matching",
|
|
19
19
|
"MustIncludeNumber": "Password must include a number",
|
|
20
20
|
"MustContainCapital": "Password must include a capital letter",
|
|
21
|
-
"
|
|
21
|
+
"MustIncludePunctuation": "Password must include punctuation",
|
|
22
22
|
"OnlyNumbers": "Should contains only numbers."
|
|
23
23
|
},
|
|
24
24
|
"hu": {
|
|
@@ -45,7 +45,7 @@ const TRANSLATIONS$1 = {
|
|
|
45
45
|
"numberLengthError": "Broj bi trebao biti između {min} i {max}",
|
|
46
46
|
"lengthError": "Duljina bi trebala biti između {minLength} i {maxLength}",
|
|
47
47
|
"requiredError": "Ovaj unos je obavezan.",
|
|
48
|
-
"invalidOriginalPasswordError": "
|
|
48
|
+
"invalidOriginalPasswordError": "Lozinke se ne podudaraju",
|
|
49
49
|
"passwordStrength": "Jačina zaporke",
|
|
50
50
|
"passwordStrengthWeak": "nije adekvatno",
|
|
51
51
|
"passwordStrengthStrong": "je adekvatan",
|
|
@@ -74,7 +74,7 @@ const TRANSLATIONS$1 = {
|
|
|
74
74
|
"PasswordNotMatching": "Şifreler uyuşmuyor",
|
|
75
75
|
"MustIncludeNumber": "bir sayı içermelidir",
|
|
76
76
|
"MustContainCapital": "büyük harf içermelidir",
|
|
77
|
-
"
|
|
77
|
+
"MustIncludePunctuation": "noktalama işareti içermelidir",
|
|
78
78
|
"OnlyNumbers": "Sadece sayılar içermelidir."
|
|
79
79
|
},
|
|
80
80
|
"pt-br": {
|
|
@@ -31150,7 +31150,7 @@ const TRANSLATIONS = {
|
|
|
31150
31150
|
"nextButton": 'Sljedeće',
|
|
31151
31151
|
"backButton": 'Nazad',
|
|
31152
31152
|
"doneButton": 'Gotovo',
|
|
31153
|
-
"generalError": "
|
|
31153
|
+
"generalError": "Korisnik s ovim podacima već postoji.",
|
|
31154
31154
|
"successMessage": "Register successful"
|
|
31155
31155
|
},
|
|
31156
31156
|
'pt-br': {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as l}from"./p-35ed5ec5.js";export{s as setNonce}from"./p-35ed5ec5.js";import{g as i}from"./p-e1255160.js";(()=>{const l=import.meta.url,i={};return""!==l&&(i.resourcesUrl=new URL(".",l).href),e(i)})().then((async e=>(await i(),l([["p-
|
|
1
|
+
import{p as e,b as l}from"./p-35ed5ec5.js";export{s as setNonce}from"./p-35ed5ec5.js";import{g as i}from"./p-e1255160.js";(()=>{const l=import.meta.url,i={};return""!==l&&(i.resourcesUrl=new URL(".",l).href),e(i)})().then((async e=>(await i(),l([["p-8866be5a",[[1,"general-registration",{endpoint:[513],language:[513],clientStyling:[1537,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],dateFormat:[513,"date-format"],buttonInsideForm:[516,"button-inside-form"],btag:[513],emitOnClick:[516,"emit-on-click"],errorMessage:[32],isFormValid:[32],isLoading:[32],isLoadingPOST:[32],registrationStep:[32],forms:[32],limitStylingAppends:[32],autofilled:[32]},[[0,"sendValidityState","checkInputsValidityHandler"],[0,"sendInputValue","getInputsValueHandler"]],{registrationStep:["sendStep"],clientStyling:["handleStylingChange"],clientStylingUrl:["handleStylingUrlChange"],forms:["setFormValidity"],btag:["addBtag"]}],[1,"general-input",{type:[513],name:[513],displayName:[513,"display-name"],placeholder:[513],action:[513],validation:[16],options:[520],language:[513],autofilled:[516],tooltip:[513],defaultValue:[520,"default-value"],emitValue:[516,"emit-value"],isDuplicateInput:[516,"is-duplicate-input"],clientStyling:[520,"client-styling"],dateFormat:[513,"date-format"],translationUrl:[513,"translation-url"],emitOnClick:[516,"emit-on-click"]}],[1,"toggle-checkbox-input",{name:[513],displayName:[513,"display-name"],defaultValue:[513,"default-value"],options:[16],autofilled:[516],tooltip:[513],validation:[16],language:[513],emitValue:[516,"emit-value"],clientStyling:[513,"client-styling"],errorMessage:[32],isValid:[32],limitStylingAppends:[32],showTooltip:[32],showFields:[32]},[[4,"click","handleClickOutside"]]],[1,"checkbox-group-input",{name:[513],displayName:[513,"display-name"],defaultValue:[513,"default-value"],autofilled:[516],tooltip:[513],options:[16],validation:[16],language:[513],emitValue:[516,"emit-value"],clientStyling:[513,"client-styling"],errorMessage:[32],isValid:[32],limitStylingAppends:[32],showTooltip:[32],selectedValues:[32]},[[4,"click","handleClickOutside"]],{isValid:["validityChanged"],selectedValues:["setValue"],emitValue:["emitValueHandler"]}],[1,"checkbox-input",{name:[513],displayName:[513,"display-name"],defaultValue:[513,"default-value"],autofilled:[516],tooltip:[513],validation:[16],language:[513],emitValue:[516,"emit-value"],clientStyling:[513,"client-styling"],errorMessage:[32],isValid:[32],limitStylingAppends:[32],showTooltip:[32]},[[4,"click","handleClickOutside"]],{isValid:["validityChanged"],emitValue:["emitValueHandler"]}],[1,"date-input",{name:[513],displayName:[513,"display-name"],placeholder:[513],validation:[16],defaultValue:[513,"default-value"],autofilled:[516],tooltip:[513],language:[513],emitValue:[516,"emit-value"],clientStyling:[513,"client-styling"],dateFormat:[513,"date-format"],errorMessage:[32],isValid:[32],limitStylingAppends:[32],showTooltip:[32]},[[4,"click","handleClickOutside"]],{isValid:["validityChanged"],emitValue:["emitValueHandler"]}],[1,"email-input",{name:[513],displayName:[513,"display-name"],placeholder:[513],validation:[16],defaultValue:[513,"default-value"],autofilled:[516],tooltip:[513],language:[513],emitValue:[516,"emit-value"],isDuplicateInput:[516,"is-duplicate-input"],clientStyling:[513,"client-styling"],errorMessage:[32],isValid:[32],limitStylingAppends:[32],showTooltip:[32]},[[4,"click","handleClickOutside"],[16,"sendInputValue","valueChangedHandler"]],{isValid:["validityChanged"],emitValue:["emitValueHandler"]}],[1,"number-input",{name:[513],displayName:[513,"display-name"],placeholder:[513],validation:[16],defaultValue:[513,"default-value"],autofilled:[516],tooltip:[513],language:[513],emitValue:[516,"emit-value"],clientStyling:[513,"client-styling"],errorMessage:[32],isValid:[32],limitStylingAppends:[32],showTooltip:[32]},[[4,"click","handleClickOutside"]],{isValid:["validityChanged"],emitValue:["emitValueHandler"]}],[1,"password-input",{name:[513],displayName:[513,"display-name"],placeholder:[513],defaultValue:[513,"default-value"],autofilled:[516],tooltip:[513],validation:[16],language:[513],emitValue:[516,"emit-value"],isDuplicateInput:[516,"is-duplicate-input"],clientStyling:[513,"client-styling"],isValid:[32],errorMessage:[32],limitStylingAppends:[32],showTooltip:[32],passwordComplexity:[32],showPopup:[32],value:[32]},[[16,"sendOriginalValidityState","originalValidityChangedHandler"],[16,"sendInputValue","valueChangedHandler"],[4,"click","handleClickOutside"]],{isValid:["validityChanged"],value:["valueChanged"],emitValue:["emitValueHandler"]}],[1,"radio-input",{name:[513],displayName:[513,"display-name"],optionsGroup:[16],validation:[16],tooltip:[513],language:[513],emitValue:[516,"emit-value"],clientStyling:[513,"client-styling"],errorMessage:[32],isValid:[32],limitStylingAppends:[32],showTooltip:[32]},[[4,"click","handleClickOutside"]],{isValid:["validityChanged"],emitValue:["emitValueHandler"]}],[1,"select-input",{name:[513],displayName:[513,"display-name"],placeholder:[513],action:[513],defaultValue:[513,"default-value"],autofilled:[516],tooltip:[513],options:[16],validation:[16],language:[513],emitValue:[516,"emit-value"],clientStyling:[513,"client-styling"],errorMessage:[32],isValid:[32],limitStylingAppends:[32],showTooltip:[32]},[[4,"click","handleClickOutside"]],{isValid:["validityChanged"],emitValue:["emitValueHandler"]}],[1,"tel-input",{name:[513],displayName:[513,"display-name"],placeholder:[513],showLabels:[516,"show-labels"],action:[513],validation:[16],defaultValue:[520,"default-value"],autofilled:[516],tooltip:[513],language:[513],emitValue:[516,"emit-value"],clientStyling:[513,"client-styling"],isValid:[32],errorMessage:[32],limitStylingAppends:[32],showTooltip:[32]},[[4,"click","handleClickOutside"]],{isValid:["validityChanged"],emitValue:["emitValueHandler"]}],[1,"text-input",{name:[513],displayName:[513,"display-name"],placeholder:[513],validation:[16],defaultValue:[513,"default-value"],autofilled:[516],tooltip:[513],language:[513],checkValidity:[516,"check-validity"],emitValue:[516,"emit-value"],isDuplicateInput:[516,"is-duplicate-input"],clientStyling:[513,"client-styling"],isValid:[32],errorMessage:[32],limitStylingAppends:[32],showTooltip:[32]},[[4,"click","handleClickOutside"],[16,"sendInputValue","valueChangedHandler"]],{isValid:["validityChanged"],emitValue:["emitValueHandler"]}]]]],e))));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as t,c as e,h as i,g as o,H as r}from"./p-35ed5ec5.js";const s={en:{dateError:"The selected date should be between {min} and {max}",dateError2:"The selected date is not within the accepted range",numberLengthError:"The number should be between {min} and {max}",lengthError:"The length should be between {minLength} and {maxLength}",requiredError:"This input is required.",invalidOriginalPasswordError:"Initial password field does not validate all criteria.",passwordStrength:"Password strength",passwordStrengthWeak:"is not adequate",passwordStrengthStrong:"is adequate",SpecialCharactersNotAllowed:"Should not contain special characters",InvalidEmailFormat:"Invalid email format.",EmailNotMatching:"Emails not matching!",PasswordNotMatching:"Passwords not matching",MustIncludeNumber:"Password must include a number",MustContainCapital:"Password must include a capital letter",
|
|
1
|
+
import{r as t,c as e,h as i,g as o,H as r}from"./p-35ed5ec5.js";const s={en:{dateError:"The selected date should be between {min} and {max}",dateError2:"The selected date is not within the accepted range",numberLengthError:"The number should be between {min} and {max}",lengthError:"The length should be between {minLength} and {maxLength}",requiredError:"This input is required.",invalidOriginalPasswordError:"Initial password field does not validate all criteria.",passwordStrength:"Password strength",passwordStrengthWeak:"is not adequate",passwordStrengthStrong:"is adequate",SpecialCharactersNotAllowed:"Should not contain special characters",InvalidEmailFormat:"Invalid email format.",EmailNotMatching:"Emails not matching!",PasswordNotMatching:"Passwords not matching",MustIncludeNumber:"Password must include a number",MustContainCapital:"Password must include a capital letter",MustIncludePunctuation:"Password must include punctuation",OnlyNumbers:"Should contains only numbers."},hu:{dateError:"A választott dátumnak {min} és {max} között kell lennie",numberLengthError:"A számnak {min} és {max} között kell lennie",lengthError:"A hossznak {minLength} és {maxLength} között kell lennie",requiredError:"Ez a beviteli mező kötelező.",invalidOriginalPasswordError:"Initial password field does not validate all criteria.",passwordStrength:"Jelszó erőssége",passwordStrengthWeak:"nem megfelelő",passwordStrengthStrong:"megfelelő",SpecialCharactersNotAllowed:"Nem tartalmazhat speciális karaktereket",InvalidEmailFormat:"Érvénytelen e-mail formátum.",EmailNotMatching:"Az e-mailek nem egyeznek!",PasswordNotMatching:"A jelszavak nem egyeznek",MustIncludeNumber:"A jelszónak tartalmaznia kell egy számot",MustContainCapital:"A jelszónak tartalmaznia kell egy nagybetűt",MustIncludePunctuation:"A jelszónak tartalmaznia kell írásjelet",OnlyNumbers:"Csak számokat kell tartalmaznia."},hr:{dateError:"Odabrani datum treba biti između {min} i {max}",dateError2:"Odabrani datum nije unutar prihvaćenog raspona",numberLengthError:"Broj bi trebao biti između {min} i {max}",lengthError:"Duljina bi trebala biti između {minLength} i {maxLength}",requiredError:"Ovaj unos je obavezan.",invalidOriginalPasswordError:"Lozinke se ne podudaraju",passwordStrength:"Jačina zaporke",passwordStrengthWeak:"nije adekvatno",passwordStrengthStrong:"je adekvatan",SpecialCharactersNotAllowed:"Ne smije sadržavati posebne znakove",InvalidEmailFormat:"Nevažeći format e-maila",EmailNotMatching:"E-mailovi se ne podudaraju!",PasswordNotMatching:"Lozinke se ne podudaraju",MustIncludeNumber:"Lozinka mora sadržavati broj",MustContainCapital:"Lozinka mora sadržavati veliko slovo",MustIncludePunctuation:"Lozinka mora sadržavati interpunkcijski znak",OnlyNumbers:"Treba sadržavati samo brojeve."},tr:{dateError:"Seçilen tarih {min} ve {max} arasında olmalıdır",dateError2:"Seçilen tarih kabul edilen aralıkta değil",numberLengthError:"Sayı {min} ve {max} arasında olmalıdır",lengthError:"Uzunluk {minLength} ve {maxLength} arasında olmalıdır",requiredError:"Bu alan zorunludur.",invalidOriginalPasswordError:"İlk şifre alanı tüm kriterleri karşılamıyor.",passwordStrength:"Şifre gücü",passwordStrengthWeak:"yetersiz",passwordStrengthStrong:"yeterli",SpecialCharactersNotAllowed:"Özel karakter içermemelidir",InvalidEmailFormat:"Geçersiz e-posta formatı.",EmailNotMatching:"E-postalar uyuşmuyor!",PasswordNotMatching:"Şifreler uyuşmuyor",MustIncludeNumber:"bir sayı içermelidir",MustContainCapital:"büyük harf içermelidir",MustIncludePunctuation:"noktalama işareti içermelidir",OnlyNumbers:"Sadece sayılar içermelidir."},"pt-br":{dateError:"A data selecionada deve estar entre {min} e {max}",dateError2:"A data selecionada não está dentro de um intervalo válido",numberLengthError:"O número deve estar entre {min} e {max}",lengthError:"O comprimento deve estar entre {minLength} e {maxLength}",requiredError:"Este campo é obrigatório",invalidOriginalPasswordError:"O campo de senha inicial não faz parte dos critérios válidos",PasswordStrength:"Força da senha",PasswordStrengthWeak:"Não é adequado",PasswordStrengthStrong:"é apropriado",SpecialCharactersNotAllowed:"Não deve conter caracteres especiais",InvalidEmailFormat:"Formato de email inválido",EmailNotMatching:"E-mail não corresponde",PasswordNotMatching:"Senha não corresponde",MustIncludeNumber:"A senha deve incluir um número",MustContainCapital:"A senha deve incluir uma letra maiúscula",MustIncludePunctuation:"A senha deve incluir um sinal de pontuação",OnlyNumbers:"Deve conter apenas números"},"es-mx":{dateError:"La fecha seleccionada debe ser entre {min} y {max}",dateError2:"La fecha seleccionada no está dentro de un rango válido",numberLengthError:"El número debe ser entre {min} y {max}",lengthError:"La longitud deber ser entre {minLength} y {maxLength}",requiredError:"Este campo es requerido",invalidOriginalPasswordError:"El campo de contraseña inicial no es parte del criterio válido",PasswordStrength:"La fortaleza de la contraseña",PasswordStrengthWeak:"no es adecuada",PasswordStrengthStrong:"es adecuada",SpecialCharactersNotAllowed:"No debe contener caracteres especiales",InvalidEmailFormat:"Formato inválido de correo",EmailNotMatching:"El correo electrónico no coincide",PasswordNotMatching:"La contraseña no coincide",MustIncludeNumber:"La contraseña debe incluir un número",MustContainCapital:"La contraseña debe incluir una letra mayúscula",MustIncludePunctuation:"La contraseña debe incluir un signo de puntuación",OnlyNumbers:"Solo debe contener números"}},a=(t,e,i)=>{let o=s[void 0!==e?e:"en"][t];if(void 0!==i)for(const[t,e]of Object.entries(i.values)){const i=new RegExp(`{${t}}`,"g");o=o.replace(i,e)}return o},n="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGNpcmNsZSBjeD0iNiIgY3k9IjYiIHI9IjUuNSIgc3Ryb2tlPSIjOTc5Nzk3Ii8+CjxyZWN0IHg9IjUiIHk9IjUiIHdpZHRoPSIyIiBoZWlnaHQ9IjUiIGZpbGw9IiM5Nzk3OTciLz4KPGNpcmNsZSBjeD0iNiIgY3k9IjMiIHI9IjEiIGZpbGw9IiM5Nzk3OTciLz4KPC9zdmc+Cg==";
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
@@ -3930,7 +3930,7 @@ gt("vaadin-date-picker",[ya,f`
|
|
|
3930
3930
|
></vaadin-date-picker-overlay>
|
|
3931
3931
|
|
|
3932
3932
|
<slot name="tooltip"></slot>
|
|
3933
|
-
`}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new dr(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new gr(this.inputElement,this._labelController)),this._tooltipController=new bo(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow((t=>!t.opened)),this.shadowRoot.querySelector('[part="toggle-button"]').addEventListener("mousedown",(t=>t.preventDefault())),this.$.overlay.addEventListener("vaadin-overlay-close",this._onVaadinOverlayClose.bind(this))}_onVaadinOverlayClose(t){t.detail.sourceEvent&&t.detail.sourceEvent.composedPath().includes(this)&&t.preventDefault()}_toggle(t){t.stopPropagation(),this.$.overlay.opened?this.close():this.open()}_openedChanged(t){super._openedChanged(t),this.$.overlay.positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this.$.overlay.noVerticalOverlap=!0}}function Ea(t){return Ea="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ea(t)}function Aa(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function Sa(t){Aa(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===Ea(t)&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function Ca(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function Ta(t,e){return Aa(2,arguments),function(t,e){Aa(2,arguments);var i=Sa(t).getTime(),o=Ca(e);return new Date(i+o)}(t,-Ca(e))}function Da(t){Aa(1,arguments);var e=Sa(t),i=e.getUTCDay(),o=(i<1?7:0)+i-1;return e.setUTCDate(e.getUTCDate()-o),e.setUTCHours(0,0,0,0),e}function Ia(t){Aa(1,arguments);var e=Sa(t),i=e.getUTCFullYear(),o=new Date(0);o.setUTCFullYear(i+1,0,4),o.setUTCHours(0,0,0,0);var r=Da(o),s=new Date(0);s.setUTCFullYear(i,0,4),s.setUTCHours(0,0,0,0);var a=Da(s);return e.getTime()>=r.getTime()?i+1:e.getTime()>=a.getTime()?i:i-1}l(ka);function za(t){Aa(1,arguments);var e=Sa(t),i=Da(e).getTime()-function(t){Aa(1,arguments);var e=Ia(t),i=new Date(0);return i.setUTCFullYear(e,0,4),i.setUTCHours(0,0,0,0),Da(i)}(e).getTime();return Math.round(i/6048e5)+1}var Na={};function Oa(){return Na}function Ra(t,e){var i,o,r,s,a,n,l,h;Aa(1,arguments);var c=Oa(),u=Ca(null!==(i=null!==(o=null!==(r=null!==(s=null==e?void 0:e.weekStartsOn)&&void 0!==s?s:null==e||null===(a=e.locale)||void 0===a||null===(n=a.options)||void 0===n?void 0:n.weekStartsOn)&&void 0!==r?r:c.weekStartsOn)&&void 0!==o?o:null===(l=c.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==i?i:0);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=Sa(t),m=d.getUTCDay(),p=(m<u?7:0)+m-u;return d.setUTCDate(d.getUTCDate()-p),d.setUTCHours(0,0,0,0),d}function Ma(t,e){var i,o,r,s,a,n,l,h;Aa(1,arguments);var c=Sa(t),u=c.getUTCFullYear(),d=Oa(),m=Ca(null!==(i=null!==(o=null!==(r=null!==(s=null==e?void 0:e.firstWeekContainsDate)&&void 0!==s?s:null==e||null===(a=e.locale)||void 0===a||null===(n=a.options)||void 0===n?void 0:n.firstWeekContainsDate)&&void 0!==r?r:d.firstWeekContainsDate)&&void 0!==o?o:null===(l=d.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==i?i:1);if(!(m>=1&&m<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=new Date(0);p.setUTCFullYear(u+1,0,m),p.setUTCHours(0,0,0,0);var f=Ra(p,e),v=new Date(0);v.setUTCFullYear(u,0,m),v.setUTCHours(0,0,0,0);var g=Ra(v,e);return c.getTime()>=f.getTime()?u+1:c.getTime()>=g.getTime()?u:u-1}function Pa(t,e){Aa(1,arguments);var i=Sa(t),o=Ra(i,e).getTime()-function(t,e){var i,o,r,s,a,n,l,h;Aa(1,arguments);var c=Oa(),u=Ca(null!==(i=null!==(o=null!==(r=null!==(s=null==e?void 0:e.firstWeekContainsDate)&&void 0!==s?s:null==e||null===(a=e.locale)||void 0===a||null===(n=a.options)||void 0===n?void 0:n.firstWeekContainsDate)&&void 0!==r?r:c.firstWeekContainsDate)&&void 0!==o?o:null===(l=c.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==i?i:1),d=Ma(t,e),m=new Date(0);return m.setUTCFullYear(d,0,u),m.setUTCHours(0,0,0,0),Ra(m,e)}(i,e).getTime();return Math.round(o/6048e5)+1}function Ga(t,e){for(var i=t<0?"-":"",o=Math.abs(t).toString();o.length<e;)o="0"+o;return i+o}const Fa=function(t,e){var i=t.getUTCFullYear(),o=i>0?i:1-i;return Ga("yy"===e?o%100:o,e.length)},Ua=function(t,e){var i=t.getUTCMonth();return"M"===e?String(i+1):Ga(i+1,2)},La=function(t,e){return Ga(t.getUTCDate(),e.length)},Ba=function(t,e){return Ga(t.getUTCHours()%12||12,e.length)},ja=function(t,e){return Ga(t.getUTCHours(),e.length)},Va=function(t,e){return Ga(t.getUTCMinutes(),e.length)},qa=function(t,e){return Ga(t.getUTCSeconds(),e.length)},Wa=function(t,e){var i=e.length,o=t.getUTCMilliseconds();return Ga(Math.floor(o*Math.pow(10,i-3)),e.length)};function Ha(t,e){var i=t>0?"-":"+",o=Math.abs(t),r=Math.floor(o/60),s=o%60;if(0===s)return i+String(r);var a=e||"";return i+String(r)+a+Ga(s,2)}function Ya(t,e){return t%60==0?(t>0?"-":"+")+Ga(Math.abs(t)/60,2):Ka(t,e)}function Ka(t,e){var i=e||"",o=t>0?"-":"+",r=Math.abs(t);return o+Ga(Math.floor(r/60),2)+i+Ga(r%60,2)}const Xa={G:function(t,e,i){var o=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return i.era(o,{width:"abbreviated"});case"GGGGG":return i.era(o,{width:"narrow"});default:return i.era(o,{width:"wide"})}},y:function(t,e,i){if("yo"===e){var o=t.getUTCFullYear();return i.ordinalNumber(o>0?o:1-o,{unit:"year"})}return Fa(t,e)},Y:function(t,e,i,o){var r=Ma(t,o),s=r>0?r:1-r;return"YY"===e?Ga(s%100,2):"Yo"===e?i.ordinalNumber(s,{unit:"year"}):Ga(s,e.length)},R:function(t,e){return Ga(Ia(t),e.length)},u:function(t,e){return Ga(t.getUTCFullYear(),e.length)},Q:function(t,e,i){var o=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(o);case"QQ":return Ga(o,2);case"Qo":return i.ordinalNumber(o,{unit:"quarter"});case"QQQ":return i.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(o,{width:"narrow",context:"formatting"});default:return i.quarter(o,{width:"wide",context:"formatting"})}},q:function(t,e,i){var o=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(o);case"qq":return Ga(o,2);case"qo":return i.ordinalNumber(o,{unit:"quarter"});case"qqq":return i.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(o,{width:"narrow",context:"standalone"});default:return i.quarter(o,{width:"wide",context:"standalone"})}},M:function(t,e,i){var o=t.getUTCMonth();switch(e){case"M":case"MM":return Ua(t,e);case"Mo":return i.ordinalNumber(o+1,{unit:"month"});case"MMM":return i.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(o,{width:"narrow",context:"formatting"});default:return i.month(o,{width:"wide",context:"formatting"})}},L:function(t,e,i){var o=t.getUTCMonth();switch(e){case"L":return String(o+1);case"LL":return Ga(o+1,2);case"Lo":return i.ordinalNumber(o+1,{unit:"month"});case"LLL":return i.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(o,{width:"narrow",context:"standalone"});default:return i.month(o,{width:"wide",context:"standalone"})}},w:function(t,e,i,o){var r=Pa(t,o);return"wo"===e?i.ordinalNumber(r,{unit:"week"}):Ga(r,e.length)},I:function(t,e,i){var o=za(t);return"Io"===e?i.ordinalNumber(o,{unit:"week"}):Ga(o,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getUTCDate(),{unit:"date"}):La(t,e)},D:function(t,e,i){var o=function(t){Aa(1,arguments);var e=Sa(t),i=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var o=e.getTime();return Math.floor((i-o)/864e5)+1}(t);return"Do"===e?i.ordinalNumber(o,{unit:"dayOfYear"}):Ga(o,e.length)},E:function(t,e,i){var o=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return i.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},e:function(t,e,i,o){var r=t.getUTCDay(),s=(r-o.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return Ga(s,2);case"eo":return i.ordinalNumber(s,{unit:"day"});case"eee":return i.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(r,{width:"short",context:"formatting"});default:return i.day(r,{width:"wide",context:"formatting"})}},c:function(t,e,i,o){var r=t.getUTCDay(),s=(r-o.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return Ga(s,e.length);case"co":return i.ordinalNumber(s,{unit:"day"});case"ccc":return i.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(r,{width:"narrow",context:"standalone"});case"cccccc":return i.day(r,{width:"short",context:"standalone"});default:return i.day(r,{width:"wide",context:"standalone"})}},i:function(t,e,i){var o=t.getUTCDay(),r=0===o?7:o;switch(e){case"i":return String(r);case"ii":return Ga(r,e.length);case"io":return i.ordinalNumber(r,{unit:"day"});case"iii":return i.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},a:function(t,e,i){var o=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(t,e,i){var o,r=t.getUTCHours();switch(o=12===r?"noon":0===r?"midnight":r/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(t,e,i){var o,r=t.getUTCHours();switch(o=r>=17?"evening":r>=12?"afternoon":r>=4?"morning":"night",e){case"B":case"BB":case"BBB":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(t,e,i){if("ho"===e){var o=t.getUTCHours()%12;return 0===o&&(o=12),i.ordinalNumber(o,{unit:"hour"})}return Ba(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getUTCHours(),{unit:"hour"}):ja(t,e)},K:function(t,e,i){var o=t.getUTCHours()%12;return"Ko"===e?i.ordinalNumber(o,{unit:"hour"}):Ga(o,e.length)},k:function(t,e,i){var o=t.getUTCHours();return 0===o&&(o=24),"ko"===e?i.ordinalNumber(o,{unit:"hour"}):Ga(o,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):Va(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):qa(t,e)},S:function(t,e){return Wa(t,e)},X:function(t,e,i,o){var r=(o._originalDate||t).getTimezoneOffset();if(0===r)return"Z";switch(e){case"X":return Ya(r);case"XXXX":case"XX":return Ka(r);default:return Ka(r,":")}},x:function(t,e,i,o){var r=(o._originalDate||t).getTimezoneOffset();switch(e){case"x":return Ya(r);case"xxxx":case"xx":return Ka(r);default:return Ka(r,":")}},O:function(t,e,i,o){var r=(o._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Ha(r,":");default:return"GMT"+Ka(r,":")}},z:function(t,e,i,o){var r=(o._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Ha(r,":");default:return"GMT"+Ka(r,":")}},t:function(t,e,i,o){return Ga(Math.floor((o._originalDate||t).getTime()/1e3),e.length)},T:function(t,e,i,o){return Ga((o._originalDate||t).getTime(),e.length)}};var Za=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},Ja=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},Qa={p:Ja,P:function(t,e){var i,o=t.match(/(P+)(p+)?/)||[],r=o[1],s=o[2];if(!s)return Za(t,e);switch(r){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;default:i=e.dateTime({width:"full"})}return i.replace("{{date}}",Za(r,e)).replace("{{time}}",Ja(s,e))}};const $a=Qa;function tn(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}var en=["D","DD"],on=["YY","YYYY"];function rn(t){return-1!==en.indexOf(t)}function sn(t){return-1!==on.indexOf(t)}function an(t,e,i){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var nn={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function ln(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=e.width?String(e.width):t.defaultWidth;return t.formats[i]||t.formats[t.defaultWidth]}}var hn,cn={date:ln({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:ln({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:ln({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},un={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function dn(t){return function(e,i){var o;if("formatting"===(null!=i&&i.context?String(i.context):"standalone")&&t.formattingValues){var r=t.defaultFormattingWidth||t.defaultWidth,s=null!=i&&i.width?String(i.width):r;o=t.formattingValues[s]||t.formattingValues[r]}else{var a=t.defaultWidth,n=null!=i&&i.width?String(i.width):t.defaultWidth;o=t.values[n]||t.values[a]}return o[t.argumentCallback?t.argumentCallback(e):e]}}function mn(t){return function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=i.width,r=e.match(o&&t.matchPatterns[o]||t.matchPatterns[t.defaultMatchWidth]);if(!r)return null;var s,a=r[0],n=o&&t.parsePatterns[o]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(n)?function(t){for(var e=0;e<t.length;e++)if(t[e].test(a))return e}(n):function(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e].test(a))return e}(n);return s=t.valueCallback?t.valueCallback(l):l,{value:s=i.valueCallback?i.valueCallback(s):s,rest:e.slice(a.length)}}}const pn={code:"en-US",formatDistance:function(t,e,i){var o,r=nn[t];return o="string"==typeof r?r:1===e?r.one:r.other.replace("{{count}}",e.toString()),null!=i&&i.addSuffix?i.comparison&&i.comparison>0?"in "+o:o+" ago":o},formatLong:cn,formatRelative:function(t){return un[t]},localize:{ordinalNumber:function(t){var e=Number(t),i=e%100;if(i>20||i<10)switch(i%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},era:dn({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:dn({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:dn({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:dn({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:dn({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(hn={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.match(hn.matchPattern);if(!i)return null;var o=i[0],r=t.match(hn.parsePattern);if(!r)return null;var s=hn.valueCallback?hn.valueCallback(r[0]):r[0];return{value:s=e.valueCallback?e.valueCallback(s):s,rest:t.slice(o.length)}}),era:mn({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:mn({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:mn({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:mn({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:mn({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};var fn=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,vn=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,gn=/^'([^]*?)'?$/,bn=/''/g,yn=/[a-zA-Z]/;function _n(t,e,i){var o,r,s,a,n,l,h,c,u,d,m,p,f,v,g,b,y,_;Aa(2,arguments);var w=String(e),x=Oa(),k=null!==(o=null!==(r=null==i?void 0:i.locale)&&void 0!==r?r:x.locale)&&void 0!==o?o:pn,E=Ca(null!==(s=null!==(a=null!==(n=null!==(l=null==i?void 0:i.firstWeekContainsDate)&&void 0!==l?l:null==i||null===(h=i.locale)||void 0===h||null===(c=h.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==n?n:x.firstWeekContainsDate)&&void 0!==a?a:null===(u=x.locale)||void 0===u||null===(d=u.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==s?s:1);if(!(E>=1&&E<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var A=Ca(null!==(m=null!==(p=null!==(f=null!==(v=null==i?void 0:i.weekStartsOn)&&void 0!==v?v:null==i||null===(g=i.locale)||void 0===g||null===(b=g.options)||void 0===b?void 0:b.weekStartsOn)&&void 0!==f?f:x.weekStartsOn)&&void 0!==p?p:null===(y=x.locale)||void 0===y||null===(_=y.options)||void 0===_?void 0:_.weekStartsOn)&&void 0!==m?m:0);if(!(A>=0&&A<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!k.localize)throw new RangeError("locale must contain localize property");if(!k.formatLong)throw new RangeError("locale must contain formatLong property");var S=Sa(t);if(!function(t){if(Aa(1,arguments),!function(t){return Aa(1,arguments),t instanceof Date||"object"===Ea(t)&&"[object Date]"===Object.prototype.toString.call(t)}(t)&&"number"!=typeof t)return!1;var e=Sa(t);return!isNaN(Number(e))}(S))throw new RangeError("Invalid time value");var C=Ta(S,tn(S)),T={firstWeekContainsDate:E,weekStartsOn:A,locale:k,_originalDate:S};return w.match(vn).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,$a[e])(t,k.formatLong):t})).join("").match(fn).map((function(o){if("''"===o)return"'";var r,s,a=o[0];if("'"===a)return(s=(r=o).match(gn))?s[1].replace(bn,"'"):r;var n=Xa[a];if(n)return null!=i&&i.useAdditionalWeekYearTokens||!sn(o)||an(o,e,String(t)),null!=i&&i.useAdditionalDayOfYearTokens||!rn(o)||an(o,e,String(t)),n(C,o,k.localize,T);if(a.match(yn))throw new RangeError("Format string contains an unescaped latin alphabet character `"+a+"`");return o})).join("")}function wn(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,o=Array(e);i<e;i++)o[i]=t[i];return o}function xn(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return wn(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?wn(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var o=0,r=function(){};return{s:r,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,n=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){n=!0,s=t},f:function(){try{a||null==i.return||i.return()}finally{if(n)throw s}}}}function kn(t,e){if(null==t)throw new TypeError("assign requires that input parameter not be null or undefined");for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}function En(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function An(t,e){return An=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},An(t,e)}function Sn(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&An(t,e)}function Cn(t){return Cn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Cn(t)}function Tn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Tn=function(){return!!t})()}function Dn(t){var e=Tn();return function(){var i,o=Cn(t);if(e){var r=Cn(this).constructor;i=Reflect.construct(o,arguments,r)}else i=o.apply(this,arguments);return function(t,e){if(e&&("object"==Ea(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return En(t)}(this,i)}}function In(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function zn(t){var e=function(t){if("object"!=Ea(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=Ea(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ea(e)?e:e+""}function Nn(t,e){for(var i=0;i<e.length;i++){var o=e[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,zn(o.key),o)}}function On(t,e,i){return e&&Nn(t.prototype,e),i&&Nn(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function Rn(t,e,i){return(e=zn(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var Mn=function(){function t(){In(this,t),Rn(this,"priority",void 0),Rn(this,"subPriority",0)}return On(t,[{key:"validate",value:function(){return!0}}]),t}(),Pn=function(){Sn(e,Mn);var t=Dn(e);function e(i,o,r,s,a){var n;return In(this,e),(n=t.call(this)).value=i,n.validateValue=o,n.setValue=r,n.priority=s,a&&(n.subPriority=a),n}return On(e,[{key:"validate",value:function(t,e){return this.validateValue(t,this.value,e)}},{key:"set",value:function(t,e,i){return this.setValue(t,e,this.value,i)}}]),e}(),Gn=function(){Sn(e,Mn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",10),Rn(En(i),"subPriority",-1),i}return On(e,[{key:"set",value:function(t,e){if(e.timestampIsSet)return t;var i=new Date(0);return i.setFullYear(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()),i.setHours(t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()),i}}]),e}(),Fn=function(){function t(){In(this,t),Rn(this,"incompatibleTokens",void 0),Rn(this,"priority",void 0),Rn(this,"subPriority",void 0)}return On(t,[{key:"run",value:function(t,e,i,o){var r=this.parse(t,e,i,o);return r?{setter:new Pn(r.value,this.validate,this.set,this.priority,this.subPriority),rest:r.rest}:null}},{key:"validate",value:function(){return!0}}]),t}(),Un=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",140),Rn(En(i),"incompatibleTokens",["R","u","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"G":case"GG":case"GGG":return i.era(t,{width:"abbreviated"})||i.era(t,{width:"narrow"});case"GGGGG":return i.era(t,{width:"narrow"});default:return i.era(t,{width:"wide"})||i.era(t,{width:"abbreviated"})||i.era(t,{width:"narrow"})}}},{key:"set",value:function(t,e,i){return e.era=i,t.setUTCFullYear(i,0,1),t.setUTCHours(0,0,0,0),t}}]),e}(),Ln=/^(1[0-2]|0?\d)/,Bn=/^(3[0-1]|[0-2]?\d)/,jn=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,Vn=/^(5[0-3]|[0-4]?\d)/,qn=/^(2[0-3]|[0-1]?\d)/,Wn=/^(2[0-4]|[0-1]?\d)/,Hn=/^(1[0-1]|0?\d)/,Yn=/^(1[0-2]|0?\d)/,Kn=/^[0-5]?\d/,Xn=/^[0-5]?\d/,Zn=/^\d/,Jn=/^\d{1,2}/,Qn=/^\d{1,3}/,$n=/^\d{1,4}/,tl=/^-?\d+/,el=/^-?\d/,il=/^-?\d{1,2}/,ol=/^-?\d{1,3}/,rl=/^-?\d{1,4}/,sl=/^([+-])(\d{2})(\d{2})?|Z/,al=/^([+-])(\d{2})(\d{2})|Z/,nl=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,ll=/^([+-])(\d{2}):(\d{2})|Z/,hl=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function cl(t,e){return t?{value:e(t.value),rest:t.rest}:t}function ul(t,e){var i=e.match(t);return i?{value:parseInt(i[0],10),rest:e.slice(i[0].length)}:null}function dl(t,e){var i=e.match(t);return i?"Z"===i[0]?{value:0,rest:e.slice(1)}:{value:("+"===i[1]?1:-1)*(36e5*(i[2]?parseInt(i[2],10):0)+6e4*(i[3]?parseInt(i[3],10):0)+1e3*(i[5]?parseInt(i[5],10):0)),rest:e.slice(i[0].length)}:null}function ml(t){return ul(tl,t)}function pl(t,e){switch(t){case 1:return ul(Zn,e);case 2:return ul(Jn,e);case 3:return ul(Qn,e);case 4:return ul($n,e);default:return ul(new RegExp("^\\d{1,"+t+"}"),e)}}function fl(t,e){switch(t){case 1:return ul(el,e);case 2:return ul(il,e);case 3:return ul(ol,e);case 4:return ul(rl,e);default:return ul(new RegExp("^-?\\d{1,"+t+"}"),e)}}function vl(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function gl(t,e){var i,o=e>0,r=o?e:1-e;if(r<=50)i=t||100;else{var s=r+50;i=t+100*Math.floor(s/100)-(t>=s%100?100:0)}return o?i:1-i}function bl(t){return t%400==0||t%4==0&&t%100!=0}var yl=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",130),Rn(En(i),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){var o=function(t){return{year:t,isTwoDigitYear:"yy"===e}};switch(e){case"y":return cl(pl(4,t),o);case"yo":return cl(i.ordinalNumber(t,{unit:"year"}),o);default:return cl(pl(e.length,t),o)}}},{key:"validate",value:function(t,e){return e.isTwoDigitYear||e.year>0}},{key:"set",value:function(t,e,i){var o=t.getUTCFullYear();if(i.isTwoDigitYear){var r=gl(i.year,o);return t.setUTCFullYear(r,0,1),t.setUTCHours(0,0,0,0),t}return t.setUTCFullYear("era"in e&&1!==e.era?1-i.year:i.year,0,1),t.setUTCHours(0,0,0,0),t}}]),e}(),_l=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",130),Rn(En(i),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){var o=function(t){return{year:t,isTwoDigitYear:"YY"===e}};switch(e){case"Y":return cl(pl(4,t),o);case"Yo":return cl(i.ordinalNumber(t,{unit:"year"}),o);default:return cl(pl(e.length,t),o)}}},{key:"validate",value:function(t,e){return e.isTwoDigitYear||e.year>0}},{key:"set",value:function(t,e,i,o){var r=Ma(t,o);if(i.isTwoDigitYear){var s=gl(i.year,r);return t.setUTCFullYear(s,0,o.firstWeekContainsDate),t.setUTCHours(0,0,0,0),Ra(t,o)}return t.setUTCFullYear("era"in e&&1!==e.era?1-i.year:i.year,0,o.firstWeekContainsDate),t.setUTCHours(0,0,0,0),Ra(t,o)}}]),e}(),wl=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",130),Rn(En(i),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),i}return On(e,[{key:"parse",value:function(t,e){return fl("R"===e?4:e.length,t)}},{key:"set",value:function(t,e,i){var o=new Date(0);return o.setUTCFullYear(i,0,4),o.setUTCHours(0,0,0,0),Da(o)}}]),e}(),xl=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",130),Rn(En(i),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),i}return On(e,[{key:"parse",value:function(t,e){return fl("u"===e?4:e.length,t)}},{key:"set",value:function(t,e,i){return t.setUTCFullYear(i,0,1),t.setUTCHours(0,0,0,0),t}}]),e}(),kl=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",120),Rn(En(i),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"Q":case"QQ":return pl(e.length,t);case"Qo":return i.ordinalNumber(t,{unit:"quarter"});case"QQQ":return i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return i.quarter(t,{width:"narrow",context:"formatting"});default:return i.quarter(t,{width:"wide",context:"formatting"})||i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=1&&e<=4}},{key:"set",value:function(t,e,i){return t.setUTCMonth(3*(i-1),1),t.setUTCHours(0,0,0,0),t}}]),e}(),El=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",120),Rn(En(i),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"q":case"qq":return pl(e.length,t);case"qo":return i.ordinalNumber(t,{unit:"quarter"});case"qqq":return i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return i.quarter(t,{width:"narrow",context:"standalone"});default:return i.quarter(t,{width:"wide",context:"standalone"})||i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=1&&e<=4}},{key:"set",value:function(t,e,i){return t.setUTCMonth(3*(i-1),1),t.setUTCHours(0,0,0,0),t}}]),e}(),Al=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),Rn(En(i),"priority",110),i}return On(e,[{key:"parse",value:function(t,e,i){var o=function(t){return t-1};switch(e){case"M":return cl(ul(Ln,t),o);case"MM":return cl(pl(2,t),o);case"Mo":return cl(i.ordinalNumber(t,{unit:"month"}),o);case"MMM":return i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return i.month(t,{width:"narrow",context:"formatting"});default:return i.month(t,{width:"wide",context:"formatting"})||i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,i){return t.setUTCMonth(i,1),t.setUTCHours(0,0,0,0),t}}]),e}(),Sl=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",110),Rn(En(i),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){var o=function(t){return t-1};switch(e){case"L":return cl(ul(Ln,t),o);case"LL":return cl(pl(2,t),o);case"Lo":return cl(i.ordinalNumber(t,{unit:"month"}),o);case"LLL":return i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return i.month(t,{width:"narrow",context:"standalone"});default:return i.month(t,{width:"wide",context:"standalone"})||i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,i){return t.setUTCMonth(i,1),t.setUTCHours(0,0,0,0),t}}]),e}(),Cl=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",100),Rn(En(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"w":return ul(Vn,t);case"wo":return i.ordinalNumber(t,{unit:"week"});default:return pl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=53}},{key:"set",value:function(t,e,i,o){return Ra(function(t,e,i){Aa(2,arguments);var o=Sa(t),r=Ca(e),s=Pa(o,i)-r;return o.setUTCDate(o.getUTCDate()-7*s),o}(t,i,o),o)}}]),e}(),Tl=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",100),Rn(En(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"I":return ul(Vn,t);case"Io":return i.ordinalNumber(t,{unit:"week"});default:return pl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=53}},{key:"set",value:function(t,e,i){return Da(function(t,e){Aa(2,arguments);var i=Sa(t),o=Ca(e),r=za(i)-o;return i.setUTCDate(i.getUTCDate()-7*r),i}(t,i))}}]),e}(),Dl=[31,28,31,30,31,30,31,31,30,31,30,31],Il=[31,29,31,30,31,30,31,31,30,31,30,31],zl=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",90),Rn(En(i),"subPriority",1),Rn(En(i),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"d":return ul(Bn,t);case"do":return i.ordinalNumber(t,{unit:"date"});default:return pl(e.length,t)}}},{key:"validate",value:function(t,e){var i=bl(t.getUTCFullYear()),o=t.getUTCMonth();return i?e>=1&&e<=Il[o]:e>=1&&e<=Dl[o]}},{key:"set",value:function(t,e,i){return t.setUTCDate(i),t.setUTCHours(0,0,0,0),t}}]),e}(),Nl=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",90),Rn(En(i),"subpriority",1),Rn(En(i),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"D":case"DD":return ul(jn,t);case"Do":return i.ordinalNumber(t,{unit:"date"});default:return pl(e.length,t)}}},{key:"validate",value:function(t,e){return bl(t.getUTCFullYear())?e>=1&&e<=366:e>=1&&e<=365}},{key:"set",value:function(t,e,i){return t.setUTCMonth(0,i),t.setUTCHours(0,0,0,0),t}}]),e}();function Ol(t,e,i){var o,r,s,a,n,l,h,c;Aa(2,arguments);var u=Oa(),d=Ca(null!==(o=null!==(r=null!==(s=null!==(a=null==i?void 0:i.weekStartsOn)&&void 0!==a?a:null==i||null===(n=i.locale)||void 0===n||null===(l=n.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==s?s:u.weekStartsOn)&&void 0!==r?r:null===(h=u.locale)||void 0===h||null===(c=h.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==o?o:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=Sa(t),p=Ca(e),f=((p%7+7)%7<d?7:0)+p-m.getUTCDay();return m.setUTCDate(m.getUTCDate()+f),m}var Rl=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",90),Rn(En(i),"incompatibleTokens",["D","i","e","c","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"E":case"EE":case"EEE":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return i.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,i,o){return(t=Ol(t,i,o)).setUTCHours(0,0,0,0),t}}]),e}(),Ml=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",90),Rn(En(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i,o){var r=function(t){var e=7*Math.floor((t-1)/7);return(t+o.weekStartsOn+6)%7+e};switch(e){case"e":case"ee":return cl(pl(e.length,t),r);case"eo":return cl(i.ordinalNumber(t,{unit:"day"}),r);case"eee":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"eeeee":return i.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,i,o){return(t=Ol(t,i,o)).setUTCHours(0,0,0,0),t}}]),e}(),Pl=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",90),Rn(En(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i,o){var r=function(t){var e=7*Math.floor((t-1)/7);return(t+o.weekStartsOn+6)%7+e};switch(e){case"c":case"cc":return cl(pl(e.length,t),r);case"co":return cl(i.ordinalNumber(t,{unit:"day"}),r);case"ccc":return i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});case"ccccc":return i.day(t,{width:"narrow",context:"standalone"});case"cccccc":return i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});default:return i.day(t,{width:"wide",context:"standalone"})||i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,i,o){return(t=Ol(t,i,o)).setUTCHours(0,0,0,0),t}}]),e}(),Gl=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",90),Rn(En(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){var o=function(t){return 0===t?7:t};switch(e){case"i":case"ii":return pl(e.length,t);case"io":return i.ordinalNumber(t,{unit:"day"});case"iii":return cl(i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),o);case"iiiii":return cl(i.day(t,{width:"narrow",context:"formatting"}),o);case"iiiiii":return cl(i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),o);default:return cl(i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),o)}}},{key:"validate",value:function(t,e){return e>=1&&e<=7}},{key:"set",value:function(t,e,i){return t=function(t,e){Aa(2,arguments);var i=Ca(e);i%7==0&&(i-=7);var o=Sa(t),r=((i%7+7)%7<1?7:0)+i-o.getUTCDay();return o.setUTCDate(o.getUTCDate()+r),o}(t,i),t.setUTCHours(0,0,0,0),t}}]),e}(),Fl=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",80),Rn(En(i),"incompatibleTokens",["b","B","H","k","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"a":case"aa":case"aaa":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return i.dayPeriod(t,{width:"narrow",context:"formatting"});default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,i){return t.setUTCHours(vl(i),0,0,0),t}}]),e}(),Ul=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",80),Rn(En(i),"incompatibleTokens",["a","B","H","k","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"b":case"bb":case"bbb":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return i.dayPeriod(t,{width:"narrow",context:"formatting"});default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,i){return t.setUTCHours(vl(i),0,0,0),t}}]),e}(),Ll=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",80),Rn(En(i),"incompatibleTokens",["a","b","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"B":case"BB":case"BBB":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return i.dayPeriod(t,{width:"narrow",context:"formatting"});default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,i){return t.setUTCHours(vl(i),0,0,0),t}}]),e}(),Bl=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",70),Rn(En(i),"incompatibleTokens",["H","K","k","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"h":return ul(Yn,t);case"ho":return i.ordinalNumber(t,{unit:"hour"});default:return pl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=12}},{key:"set",value:function(t,e,i){var o=t.getUTCHours()>=12;return t.setUTCHours(o&&i<12?i+12:o||12!==i?i:0,0,0,0),t}}]),e}(),jl=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",70),Rn(En(i),"incompatibleTokens",["a","b","h","K","k","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"H":return ul(qn,t);case"Ho":return i.ordinalNumber(t,{unit:"hour"});default:return pl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=23}},{key:"set",value:function(t,e,i){return t.setUTCHours(i,0,0,0),t}}]),e}(),Vl=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",70),Rn(En(i),"incompatibleTokens",["h","H","k","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"K":return ul(Hn,t);case"Ko":return i.ordinalNumber(t,{unit:"hour"});default:return pl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,i){var o=t.getUTCHours()>=12;return t.setUTCHours(o&&i<12?i+12:i,0,0,0),t}}]),e}(),ql=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",70),Rn(En(i),"incompatibleTokens",["a","b","h","H","K","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"k":return ul(Wn,t);case"ko":return i.ordinalNumber(t,{unit:"hour"});default:return pl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=24}},{key:"set",value:function(t,e,i){return t.setUTCHours(i<=24?i%24:i,0,0,0),t}}]),e}(),Wl=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",60),Rn(En(i),"incompatibleTokens",["t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"m":return ul(Kn,t);case"mo":return i.ordinalNumber(t,{unit:"minute"});default:return pl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=59}},{key:"set",value:function(t,e,i){return t.setUTCMinutes(i,0,0),t}}]),e}(),Hl=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",50),Rn(En(i),"incompatibleTokens",["t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"s":return ul(Xn,t);case"so":return i.ordinalNumber(t,{unit:"second"});default:return pl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=59}},{key:"set",value:function(t,e,i){return t.setUTCSeconds(i,0),t}}]),e}(),Yl=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",30),Rn(En(i),"incompatibleTokens",["t","T"]),i}return On(e,[{key:"parse",value:function(t,e){return cl(pl(e.length,t),(function(t){return Math.floor(t*Math.pow(10,3-e.length))}))}},{key:"set",value:function(t,e,i){return t.setUTCMilliseconds(i),t}}]),e}(),Kl=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",10),Rn(En(i),"incompatibleTokens",["t","T","x"]),i}return On(e,[{key:"parse",value:function(t,e){switch(e){case"X":return dl(sl,t);case"XX":return dl(al,t);case"XXXX":return dl(nl,t);case"XXXXX":return dl(hl,t);default:return dl(ll,t)}}},{key:"set",value:function(t,e,i){return e.timestampIsSet?t:new Date(t.getTime()-i)}}]),e}(),Xl=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",10),Rn(En(i),"incompatibleTokens",["t","T","X"]),i}return On(e,[{key:"parse",value:function(t,e){switch(e){case"x":return dl(sl,t);case"xx":return dl(al,t);case"xxxx":return dl(nl,t);case"xxxxx":return dl(hl,t);default:return dl(ll,t)}}},{key:"set",value:function(t,e,i){return e.timestampIsSet?t:new Date(t.getTime()-i)}}]),e}(),Zl=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",40),Rn(En(i),"incompatibleTokens","*"),i}return On(e,[{key:"parse",value:function(t){return ml(t)}},{key:"set",value:function(t,e,i){return[new Date(1e3*i),{timestampIsSet:!0}]}}]),e}(),Jl=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",20),Rn(En(i),"incompatibleTokens","*"),i}return On(e,[{key:"parse",value:function(t){return ml(t)}},{key:"set",value:function(t,e,i){return[new Date(i),{timestampIsSet:!0}]}}]),e}(),Ql={G:new Un,y:new yl,Y:new _l,R:new wl,u:new xl,Q:new kl,q:new El,M:new Al,L:new Sl,w:new Cl,I:new Tl,d:new zl,D:new Nl,E:new Rl,e:new Ml,c:new Pl,i:new Gl,a:new Fl,b:new Ul,B:new Ll,h:new Bl,H:new jl,K:new Vl,k:new ql,m:new Wl,s:new Hl,S:new Yl,X:new Kl,x:new Xl,t:new Zl,T:new Jl},$l=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,th=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,eh=/^'([^]*?)'?$/,ih=/''/g,oh=/\S/,rh=/[a-zA-Z]/;function sh(t,e,i,o){var r,s,a,n,l,h,c,u,d,m,p,f,v,g,b,y,_,w;Aa(3,arguments);var x=String(t),k=String(e),E=Oa(),A=null!==(r=null!==(s=null==o?void 0:o.locale)&&void 0!==s?s:E.locale)&&void 0!==r?r:pn;if(!A.match)throw new RangeError("locale must contain match property");var S=Ca(null!==(a=null!==(n=null!==(l=null!==(h=null==o?void 0:o.firstWeekContainsDate)&&void 0!==h?h:null==o||null===(c=o.locale)||void 0===c||null===(u=c.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==l?l:E.firstWeekContainsDate)&&void 0!==n?n:null===(d=E.locale)||void 0===d||null===(m=d.options)||void 0===m?void 0:m.firstWeekContainsDate)&&void 0!==a?a:1);if(!(S>=1&&S<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var C=Ca(null!==(p=null!==(f=null!==(v=null!==(g=null==o?void 0:o.weekStartsOn)&&void 0!==g?g:null==o||null===(b=o.locale)||void 0===b||null===(y=b.options)||void 0===y?void 0:y.weekStartsOn)&&void 0!==v?v:E.weekStartsOn)&&void 0!==f?f:null===(_=E.locale)||void 0===_||null===(w=_.options)||void 0===w?void 0:w.weekStartsOn)&&void 0!==p?p:0);if(!(C>=0&&C<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===k)return""===x?Sa(i):new Date(NaN);var T,D={firstWeekContainsDate:S,weekStartsOn:C,locale:A},I=[new Gn],z=k.match(th).map((function(t){var e=t[0];return e in $a?(0,$a[e])(t,A.formatLong):t})).join("").match($l),N=[],O=xn(z);try{var R=function(){var e=T.value;null!=o&&o.useAdditionalWeekYearTokens||!sn(e)||an(e,k,t),null!=o&&o.useAdditionalDayOfYearTokens||!rn(e)||an(e,k,t);var i=e[0],r=Ql[i];if(r){var s=r.incompatibleTokens;if(Array.isArray(s)){var a=N.find((function(t){return s.includes(t.token)||t.token===i}));if(a)throw new RangeError("The format string mustn't contain `".concat(a.fullToken,"` and `").concat(e,"` at the same time"))}else if("*"===r.incompatibleTokens&&N.length>0)throw new RangeError("The format string mustn't contain `".concat(e,"` and any other token at the same time"));N.push({token:i,fullToken:e});var n=r.run(x,e,A.match,D);if(!n)return{v:new Date(NaN)};I.push(n.setter),x=n.rest}else{if(i.match(rh))throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");if("''"===e?e="'":"'"===i&&(e=e.match(eh)[1].replace(ih,"'")),0!==x.indexOf(e))return{v:new Date(NaN)};x=x.slice(e.length)}};for(O.s();!(T=O.n()).done;){var M=R();if("object"===Ea(M))return M.v}}catch(t){O.e(t)}finally{O.f()}if(x.length>0&&oh.test(x))return new Date(NaN);var P=I.map((function(t){return t.priority})).sort((function(t,e){return e-t})).filter((function(t,e,i){return i.indexOf(t)===e})).map((function(t){return I.filter((function(e){return e.priority===t})).sort((function(t,e){return e.subPriority-t.subPriority}))})).map((function(t){return t[0]})),G=Sa(i);if(isNaN(G.getTime()))return new Date(NaN);var F,U=Ta(G,tn(G)),L={},B=xn(P);try{for(B.s();!(F=B.n()).done;){var j=F.value;if(!j.validate(U,D))return new Date(NaN);var V=j.set(U,L,D);Array.isArray(V)?(U=V[0],kn(L,V[1])):U=V}}catch(t){B.e(t)}finally{B.f()}return U}function ah(t,e){Aa(2,arguments);var i=Sa(t),o=Sa(e);return i.getTime()>o.getTime()}function nh(t,e){Aa(2,arguments);var i=Sa(t),o=Sa(e);return i.getTime()<o.getTime()}const lh=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.touched=!1,this.formatDate=t=>{const{year:e,month:i,day:o}=t;return _n(new Date(e,i,o),this.dateFormat||"yyyy-MM-dd")},this.parseDate=t=>{const e=sh(t,this.dateFormat||"yyyy-MM-dd",new Date);return{year:e.getFullYear(),month:e.getMonth(),day:e.getDate()}},this.handleBlur=()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.validation=void 0,this.defaultValue=void 0,this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.dateFormat=void 0,this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}connectedCallback(){var t,e;this.minDate=sh((null===(t=this.validation.min)||void 0===t?void 0:t.toString())||"","yyyy-MM-dd",new Date),this.maxDate=sh((null===(e=this.validation.max)||void 0===e?void 0:e.toString())||"","yyyy-MM-dd",new Date)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.datePicker=this.element.shadowRoot.querySelector("vaadin-date-picker"),this.inputReference=this.element.shadowRoot.querySelector("input"),this.datePicker.i18n=Object.assign(Object.assign({},this.datePicker.i18n),{formatDate:this.formatDate,parseDate:this.parseDate}),this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}handleInput(t){this.value=t.target.value,this.touched=!0,this.valueAsDate=sh(this.value||"","yyyy-MM-dd",new Date),this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}setValidity(){return!nh(this.valueAsDate,this.minDate)&&!ah(this.valueAsDate,this.maxDate)&&this.inputReference.validity.valid}setErrorMessage(){return nh(this.valueAsDate,this.minDate)||ah(this.valueAsDate,this.maxDate)?a("dateError2",this.language):this.inputReference.validity.rangeUnderflow||this.inputReference.validity.rangeOverflow?a("dateError",this.language,{values:{min:this.validation.min,max:this.validation.max}}):this.inputReference.validity.valueMissing?a("requiredError",this.language):void 0}renderTooltip(){return this.showTooltip?i("div",{class:"date__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"7fd02e4a0be8222ba408a59b5a32384a7ae979ae",class:`date__wrapper ${this.autofilled?"date__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("label",{key:"8a9d7390bcee99105d65d406d86d6be997a333ad",class:`date__label ${this.validation.mandatory?"date__label--required":""}}`,htmlFor:`${this.name}__input`},this.displayName," ",this.validation.mandatory?"*":""),i("vaadin-date-picker",{key:"b8640a92030fde948dae7a4698d0937e701b720c",id:`${this.name}__input`,type:"date",class:`date__input ${t}`,value:this.defaultValue,readOnly:this.autofilled,placeholder:`${this.placeholder}`,required:this.validation.mandatory,max:this.validation.max,min:this.validation.min,onChange:t=>this.handleInput(t),onBlur:this.handleBlur}),i("small",{key:"45585438da48ddaf16c7301059d1e50b63e56a95",class:"date__error-message"},this.errorMessage),this.tooltip&&i("img",{key:"4195a881e57441fd9faee6411760715e1cac12f5",class:"date__tooltip-icon",src:n,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())}get element(){return o(this)}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};lh.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.date{font-family:"Roboto";font-style:normal}.date__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px;height:100%}.date__wrapper--autofilled{pointer-events:none}.date__wrapper--autofilled .date__label{color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.date__wrapper--autofilled .date__input::part(input-field){color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.date__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.date__label--required::after{content:"*";font-family:inherit;color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));margin-left:2px}.date__input{border:none;width:inherit;position:relative}.date__input[focused]::part(input-field){border-color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.date__input[invalid]::part(input-field){border:1px solid var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.date__input::part(input-field){border-radius:4px;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));font-family:inherit;font-style:normal;font-size:16px;font-weight:300;line-height:1.5;padding:0;height:44px}.date__input>input{padding:5px 15px}.date__input::part(toggle-button){position:relative;right:10px}.date__error-message{position:absolute;top:calc(100% + 5px);left:0;color:rgba(204, 0, 0, 0.7019607843)}.date__tooltip-icon{position:absolute;right:0;bottom:10px}.date__tooltip{position:absolute;bottom:35px;right:10px;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.date__tooltip.visible{opacity:1}';const hh=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.validationPattern="",this.touched=!1,this.handleInput=t=>{this.value=t.target.value,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleBlur=()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.validation=void 0,this.defaultValue=void 0,this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.isDuplicateInput=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}valueChangedHandler(t){this.isDuplicateInput&&this.name===t.detail.name+"Duplicate"&&(this.duplicateInputValue=t.detail.value)}connectedCallback(){this.validationPattern=this.setPattern()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}setValidity(){return this.inputReference.validity.valid}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e,i,o;if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,o=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return a(`${i}`,this.language)?a(`${i}`,this.language):o}if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return a("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(this.inputReference.validity.valueMissing)return a("requiredError",this.language);if(this.isDuplicateInput&&this.duplicateInputValue!==this.value){const t=null===(i=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===i?void 0:i.errorKey,e=null===(o=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===o?void 0:o.errorMessage;return a(`${t}`,this.language)?a(`${t}`,this.language):e}}renderTooltip(){return this.showTooltip?i("div",{class:"email__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"23ac67984ab7a0f4db01e5fe01f4f326b4c6a912",class:`email__wrapper ${this.autofilled?"number__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"aa2405e435aea20f1678dd74776a8ce4094bc95b",class:"email__wrapper--flex"},i("label",{key:"970b83bbcf082d1721c1647993fecd076939b65d",class:"email__label "+(this.validation.mandatory?"email__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"2f03eaf161aab9b45282c1bc0de15bea8455427c",class:"email__wrapper--relative"},this.tooltip&&i("img",{key:"3c34b91f0b478cf04f5aabc5fdd33a8ed73d091b",class:"email__tooltip-icon",src:n,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("input",{key:"491f83c0f562893c02e3425b4d54eecc214e3c95",id:`${this.name}__input`,type:"email",class:`email__input ${t}`,value:this.defaultValue,readOnly:this.autofilled,placeholder:`${this.placeholder}`,ref:t=>this.inputReference=t,pattern:this.validationPattern,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,onInput:this.handleInput,onBlur:this.handleBlur}),i("small",{key:"edb6660d958cc5d0cb41b0db195bd7e847ecbefe",class:"email__error-message"},this.errorMessage))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};hh.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.email{font-family:"Roboto";font-style:normal}.email__wrapper{position:relative;width:100%}.email__wrapper--autofilled{pointer-events:none}.email__wrapper--autofilled .email__label{color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.email__wrapper--autofilled .email__input{color:var(--emfe-w-color-black, #000000)}.email__wrapper--flex{display:flex;gap:5px}.email__wrapper--relative{position:relative}.email__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.email__label--required::after{content:"*";font-family:inherit;color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));margin-left:2px}.email__input{font-family:inherit;border-radius:4px;width:100%;height:40px;border:2px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-color-black, #000000);border-radius:5px;box-sizing:border-box;font-size:16px;font-weight:300;line-height:1.5;padding:10px}.email__input:focus{outline-color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.email__input--invalid{border:1px solid var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.email__input::placeholder{color:var(--emfe-w-color-gray-150, #828282)}.email__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.email__tooltip-icon{width:16px;height:auto}.email__tooltip{position:absolute;top:0;left:20px;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.email__tooltip.visible{opacity:1}';const ch=class{constructor(e){t(this,e),this.handleClick=t=>{this.emitOnClick&&(t.stopPropagation(),window.postMessage({type:`registration${this.name}Clicked`},window.location.href))},this.type="text",this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.action=void 0,this.validation=void 0,this.options=void 0,this.language=void 0,this.autofilled=void 0,this.tooltip=void 0,this.defaultValue=void 0,this.emitValue=void 0,this.isDuplicateInput=void 0,this.clientStyling="",this.dateFormat=void 0,this.translationUrl="",this.emitOnClick=!1}connectedCallback(){var t;this.translationUrl&&(t=this.translationUrl,new Promise((e=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{for(let i in t[e])s[e][i]=t[e][i]})),e(!0)}))})))}renderInput(){var t;switch(null===(t=this.type)||void 0===t?void 0:t.toLowerCase()){case"text":return i("text-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,isDuplicateInput:this.isDuplicateInput,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"email":return i("email-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,isDuplicateInput:this.isDuplicateInput,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"number":return i("number-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"checkbox":return i("checkbox-input",{name:this.name,displayName:this.displayName,validation:this.validation,emitValue:this.emitValue,defaultValue:this.defaultValue,autofilled:this.autofilled,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip});case"checkboxgroup":return i("checkbox-group-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,options:this.options});case"togglecheckbox":return i("toggle-checkbox-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,options:this.options,"emit-on-click":this.emitOnClick});case"datetime":return i("date-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder,dateFormat:this.dateFormat});case"password":return i("password-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,isDuplicateInput:this.isDuplicateInput,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"radio":return i("radio-input",{name:this.name,displayName:this.displayName,optionsGroup:this.options,validation:this.validation,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling});case"tel":return i("tel-input",{name:this.name,action:this.action,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,emitValue:this.emitValue,language:this.language,autofilled:this.autofilled,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"dropdown":return i("select-input",{name:this.name,action:this.action,defaultValue:this.defaultValue,displayName:this.displayName,options:this.options,validation:this.validation,emitValue:this.emitValue,autofilled:this.autofilled,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});default:return i("p",null,"The ",this.type," input type is not valid")}}render(){return i(r,{key:"00fe51389e06cbdc9225d3246bc6c629d4cf15d8",class:`general-input--${this.name}`,onClick:this.handleClick},this.renderInput())}};ch.style=":host{display:block;height:100%}";const uh={en:{GmErr_AMOUNT_INVALID:"The specified amount is invalid.",GmErr_REGISTER_OVERAGE:"The registration has exceeded the allowable limit.",GmErr_REGISTER_UNDERAGE:"The registration is under the allowable limit.",GmErr_USER_AUTH_FAILED_TOO_MANY_ATTEMPTS:"User authentication failed due to too many unsuccessful attempts.",GmErr_USER_ACCOUNT_BLOCKED:"The user account is blocked.",GmErr_USER_NOT_VERIFIED:"The user has not been verified.",GmErr_USER_NOT_FOUND:"No user found with the provided information.",GmErr_USER_ID_INVALID:"The user ID provided is invalid.",GmErr_USER_AUTH_FAILED:"User authentication failed.",GmErr_USER_DUPLICATED:"The user already exists in the system.",GmErr_USER_NOT_ACTIVATED:"The user account has not been activated.",GmErr_PASSWORD_CONTAINS_EMAIL:"The password cannot contain the email address.",GmErr_PASSWORD_CONTAINS_USERNAME:"The password cannot contain the username.",GmErr_PASSWORD_CONTAINS_SPACES:"The password cannot contain spaces.",GmErr_USER_4TS_CHECK_EXISTS:"The user 4TS check already exists.",GmErr_USER_NAV_EXCLUDED_REGISTRATION:"The user is excluded from registration.",GmErr_USER_NAV_EXCLUDED_LOGIN:"The user is excluded from login.",GmErr_USERNAME_REQUIRED:"A username is required.",GmErr_USER_EMAIL_NOT_VERIFIED:"The user's email address has not been verified.",GmErr_EMAIL_REQUIRED:"An email address is required.",GmErr_USERNAME_ALREADY_EXISTS:"The username is already taken.",GmErr_DUPLICATE_PERSONAL_ID:"Duplicate personal ID found.",GmErr_INVALID_USER_DOCUMENT:"The user document is invalid.",GmErr_INVALID_CODE:"The code provided is invalid.",GmErr_EXPIRED_TOKEN:"The token has expired.",GmErr_ATTEMPTS_EXCEEDED:"The maximum number of attempts has been exceeded.",GmErr_BLOCK_USER_INCORRECT_CODE:"The user has been blocked due to an incorrect code.",GmErr_TOKEN_NOT_FOUND:"The token was not found.",GmErr_INVALID_PHONE_NUMBER:"The phone number provided is invalid.",GmErr_CODE_MISSING:"The code is missing.",GmErr_UNREGISTERED_USER:"The user is not registered.",GmErr_ATTEMPTS_TO_GENERATE_CODE_EXCEEDED:"Maximum attempts to generate a code have been exceeded.",GmErr_UNEXPECTED_EXCEPTION:"An unexpected exception occurred.",GmErr_INVALID_USER_ID:"The user ID provided is invalid.",GmErr_NOT_ALLOWED_EXCEPTION:"This action is not allowed.",GmErr_CAN_NOT_FIND_ROLE:"Unable to find the specified role.",GmErr_NO_SESSION_PROVIDED:"No session was provided.",GmErr_NO_ACTIVE_SESSION_FOUND_FOR_THIS_USER:"No active session found for this user.",GmErr_USER_HAS_ALREADY_BEEN_ANONYMIZED:"The user has already been anonymized.",GmErr_NO_ROLE_HAS_BEEN_SET_UP_TO_BE_ASSIGNED:"No role has been set up to be assigned.",GmErr_PROVIDED_SESSION_DOES_NOT_BELONG_TO_THE_USER:"The provided session does not belong to the user.",GmErr_PROVIDED_SESSION_DOES_NOT_EXIST:"The provided session does not exist.",GmErr_ROLE_ALREADY_ASSIGNED_FOR_USER:"The role has already been assigned to the user.",GmErr_ASSIGN_USER_ROLE_FAILED:"Failed to assign a role to the user.",nextButton:"Next",backButton:"Back",doneButton:"Done",generalError:"Something went wrong... Please try again.",successMessage:"Register successful"},hu:{GmErr_AMOUNT_INVALID:"A megadott összeg érvénytelen.",GmErr_REGISTER_OVERAGE:"A regisztráció túllépte a megengedett határt.",GmErr_REGISTER_UNDERAGE:"A regisztráció a megengedett határ alatt van.",GmErr_USER_AUTH_FAILED_TOO_MANY_ATTEMPTS:"A felhasználó hitelesítése túl sok sikertelen próbálkozás miatt meghiúsult.",GmErr_USER_ACCOUNT_BLOCKED:"A felhasználói fiók le van tiltva.",GmErr_USER_NOT_VERIFIED:"A felhasználó nincs ellenőrizve.",GmErr_USER_NOT_FOUND:"A megadott adatokkal nem található felhasználó.",GmErr_USER_ID_INVALID:"A megadott felhasználói azonosító érvénytelen.",GmErr_USER_AUTH_FAILED:"A felhasználó hitelesítése meghiúsult.",GmErr_USER_DUPLICATED:"A felhasználó már létezik a rendszerben.",GmErr_USER_NOT_ACTIVATED:"A felhasználó fiókja nincs aktiválva.",GmErr_PASSWORD_CONTAINS_EMAIL:"A jelszó nem tartalmazhat e-mail címet.",GmErr_PASSWORD_CONTAINS_USERNAME:"A jelszó nem tartalmazhat felhasználónevet.",GmErr_PASSWORD_CONTAINS_SPACES:"A jelszó nem tartalmazhat szóközöket.",GmErr_USER_4TS_CHECK_EXISTS:"A felhasználó 4TS ellenőrzése már létezik.",GmErr_USER_NAV_EXCLUDED_REGISTRATION:"A felhasználó kizárva a regisztrációból.",GmErr_USER_NAV_EXCLUDED_LOGIN:"A felhasználó kizárva a bejelentkezésből.",GmErr_USERNAME_REQUIRED:"Felhasználónév megadása szükséges.",GmErr_USER_EMAIL_NOT_VERIFIED:"A felhasználó e-mail címe nincs megerősítve.",GmErr_EMAIL_REQUIRED:"E-mail cím megadása szükséges.",GmErr_USERNAME_ALREADY_EXISTS:"A felhasználónév már foglalt.",GmErr_DUPLICATE_PERSONAL_ID:"Már létező személyes azonosító.",GmErr_INVALID_USER_DOCUMENT:"A felhasználói dokumentum érvénytelen.",GmErr_INVALID_CODE:"A megadott kód érvénytelen.",GmErr_EXPIRED_TOKEN:"A token lejárt.",GmErr_ATTEMPTS_EXCEEDED:"A megengedett próbálkozások száma túllépve.",GmErr_BLOCK_USER_INCORRECT_CODE:"A felhasználó blokkolva lett a hibás kód miatt.",GmErr_TOKEN_NOT_FOUND:"A token nem található.",GmErr_INVALID_PHONE_NUMBER:"A megadott telefonszám érvénytelen.",GmErr_CODE_MISSING:"A szükséges kód hiányzik.",GmErr_UNREGISTERED_USER:"A felhasználó nincs regisztrálva.",GmErr_ATTEMPTS_TO_GENERATE_CODE_EXCEEDED:"Túllépték a kódgenerálási próbálkozások számát.",GmErr_UNEXPECTED_EXCEPTION:"Váratlan kivétel történt.",GmErr_INVALID_USER_ID:"A felhasználói azonosító érvénytelen.",GmErr_NOT_ALLOWED_EXCEPTION:"Ez a művelet nem engedélyezett.",GmErr_CAN_NOT_FIND_ROLE:"A megadott szerepkör nem található.",GmErr_NO_SESSION_PROVIDED:"Nem került megadásra munkamenet.",GmErr_NO_ACTIVE_SESSION_FOUND_FOR_THIS_USER:"Nincs aktív munkamenet ehhez a felhasználóhoz.",GmErr_USER_HAS_ALREADY_BEEN_ANONYMIZED:"A felhasználó már anonimizálva lett.",GmErr_NO_ROLE_HAS_BEEN_SET_UP_TO_BE_ASSIGNED:"Nincs beállítva hozzárendelhető szerepkör.",GmErr_PROVIDED_SESSION_DOES_NOT_BELONG_TO_THE_USER:"A megadott munkamenet nem tartozik a felhasználóhoz.",GmErr_PROVIDED_SESSION_DOES_NOT_EXIST:"A megadott munkamenet nem létezik.",GmErr_ROLE_ALREADY_ASSIGNED_FOR_USER:"A szerepkör már hozzá lett rendelve a felhasználóhoz.",GmErr_ASSIGN_USER_ROLE_FAILED:"Nem sikerült a felhasználói szerepkört hozzárendelni.",nextButton:"Következő",backButton:"Vissza",doneButton:"Kész",generalError:"Valami hiba történt... Próbáld újra.",successMessage:"Sikeres regisztráció"},hr:{GmErr_AMOUNT_INVALID:"Navedeni iznos je nevažeći.",GmErr_REGISTER_OVERAGE:"Registracija je premašila dopušteni limit.",GmErr_REGISTER_UNDERAGE:"Registracija je ispod dopuštenog limita.",GmErr_USER_AUTH_FAILED_TOO_MANY_ATTEMPTS:"Neuspješno autentificiranje korisnika zbog previše pokušaja.",GmErr_USER_ACCOUNT_BLOCKED:"Korisnički račun je blokiran.",GmErr_USER_NOT_VERIFIED:"Korisnik nije verificiran.",GmErr_USER_NOT_FOUND:"Korisnik s navedenim podacima nije pronađen.",GmErr_USER_ID_INVALID:"Navedeni ID korisnika je nevažeći.",GmErr_USER_AUTH_FAILED:"Neuspješno autentificiranje korisnika.",GmErr_USER_DUPLICATED:"Korisnik već postoji u sustavu.",GmErr_USER_NOT_ACTIVATED:"Korisnički račun nije aktiviran.",GmErr_PASSWORD_CONTAINS_EMAIL:"Lozinka ne smije sadržavati e-mail adresu.",GmErr_PASSWORD_CONTAINS_USERNAME:"Lozinka ne smije sadržavati korisničko ime.",GmErr_PASSWORD_CONTAINS_SPACES:"Lozinka ne smije sadržavati razmake.",GmErr_USER_4TS_CHECK_EXISTS:"4TS provjera korisnika već postoji.",GmErr_USER_NAV_EXCLUDED_REGISTRATION:"Korisnik je isključen iz registracije.",GmErr_USER_NAV_EXCLUDED_LOGIN:"Korisnik je isključen iz prijave.",GmErr_USERNAME_REQUIRED:"Korisničko ime je obavezno.",GmErr_USER_EMAIL_NOT_VERIFIED:"E-mail adresa korisnika nije verificirana.",GmErr_EMAIL_REQUIRED:"E-mail adresa je obavezna.",GmErr_USERNAME_ALREADY_EXISTS:"Korisničko ime je već zauzeto.",GmErr_DUPLICATE_PERSONAL_ID:"Pronađen je duplicirani osobni ID.",GmErr_INVALID_USER_DOCUMENT:"Dokument korisnika je nevažeći.",GmErr_INVALID_CODE:"Navedeni kod je nevažeći.",GmErr_EXPIRED_TOKEN:"Token je istekao.",GmErr_ATTEMPTS_EXCEEDED:"Prekoračen je maksimalni broj pokušaja.",GmErr_BLOCK_USER_INCORRECT_CODE:"Korisnik je blokiran zbog pogrešnog koda.",GmErr_TOKEN_NOT_FOUND:"Token nije pronađen.",GmErr_INVALID_PHONE_NUMBER:"Navedeni broj telefona je nevažeći.",GmErr_CODE_MISSING:"Nedostaje potrebni kod.",GmErr_UNREGISTERED_USER:"Korisnik nije registriran.",GmErr_ATTEMPTS_TO_GENERATE_CODE_EXCEEDED:"Prekoračen je broj pokušaja generiranja koda.",GmErr_UNEXPECTED_EXCEPTION:"Došlo je do neočekivane iznimke.",GmErr_INVALID_USER_ID:"Navedeni ID korisnika je nevažeći.",GmErr_NOT_ALLOWED_EXCEPTION:"Ova radnja nije dopuštena.",GmErr_CAN_NOT_FIND_ROLE:"Navedena uloga nije pronađena.",GmErr_NO_SESSION_PROVIDED:"Nema pružene sesije.",GmErr_NO_ACTIVE_SESSION_FOUND_FOR_THIS_USER:"Nema aktivne sesije za ovog korisnika.",GmErr_USER_HAS_ALREADY_BEEN_ANONYMIZED:"Korisnik je već anonimiziran.",GmErr_NO_ROLE_HAS_BEEN_SET_UP_TO_BE_ASSIGNED:"Nema postavljene uloge za dodjeljivanje.",GmErr_PROVIDED_SESSION_DOES_NOT_BELONG_TO_THE_USER:"Pružena sesija ne pripada korisniku.",GmErr_PROVIDED_SESSION_DOES_NOT_EXIST:"Pružena sesija ne postoji.",GmErr_ROLE_ALREADY_ASSIGNED_FOR_USER:"Uloga je već dodijeljena korisniku.",GmErr_ASSIGN_USER_ROLE_FAILED:"Neuspješno dodjeljivanje uloge korisniku.",nextButton:"Sljedeće",backButton:"Nazad",doneButton:"Gotovo",generalError:"Nešto nije u redu... Molimo pokušajte ponovo",successMessage:"Register successful"},"pt-br":{GmErr_AMOUNT_INVALID:"O valor especificado é inválido.",GmErr_REGISTER_OVERAGE:"A inscrição excedeu o limite permitido.",GmErr_REGISTER_UNDERAGE:"A inscrição está abaixo do limite permitido.",GmErr_USER_AUTH_FAILED_TOO_MANY_ATTEMPTS:"Falha na autenticação do usuário devido a muitas tentativas sem sucesso.",GmErr_USER_ACCOUNT_BLOCKED:"A conta do usuário está bloqueada.",GmErr_USER_NOT_VERIFIED:"O usuário não foi verificado.",GmErr_USER_NOT_FOUND:"Nenhum usuário encontrado com as informações fornecidas.",GmErr_USER_ID_INVALID:"O ID do usuário fornecido é inválido.",GmErr_USER_AUTH_FAILED:"Falha na autenticação do usuário.",GmErr_USER_DUPLICATED:"O usuário já existe no sistema.",GmErr_USER_NOT_ACTIVATED:"A conta do usuário não está ativada.",GmErr_PASSWORD_CONTAINS_EMAIL:"A senha não pode conter o endereço de e-mail.",GmErr_PASSWORD_CONTAINS_USERNAME:"A senha não pode conter o nome de usuário.",GmErr_PASSWORD_CONTAINS_SPACES:"A senha não pode conter espaços.",GmErr_USER_4TS_CHECK_EXISTS:"A verificação 4TS do usuário já existe.",GmErr_USER_NAV_EXCLUDED_REGISTRATION:"O usuário está excluído da inscrição.",GmErr_USER_NAV_EXCLUDED_LOGIN:"O usuário está excluído do login.",GmErr_USERNAME_REQUIRED:"O nome de usuário é obrigatório.",GmErr_USER_EMAIL_NOT_VERIFIED:"O e-mail do usuário não foi verificado.",GmErr_EMAIL_REQUIRED:"Um endereço de e-mail é obrigatório.",GmErr_USERNAME_ALREADY_EXISTS:"O nome de usuário já está em uso.",GmErr_DUPLICATE_PERSONAL_ID:"ID pessoal duplicado encontrado.",GmErr_INVALID_USER_DOCUMENT:"O documento do usuário é inválido.",GmErr_INVALID_CODE:"O código fornecido é inválido.",GmErr_EXPIRED_TOKEN:"O token expirou.",GmErr_ATTEMPTS_EXCEEDED:"O número máximo de tentativas foi excedido.",GmErr_BLOCK_USER_INCORRECT_CODE:"O usuário foi bloqueado devido a um código incorreto.",GmErr_TOKEN_NOT_FOUND:"O token não foi encontrado.",GmErr_INVALID_PHONE_NUMBER:"O número de telefone fornecido é inválido.",GmErr_CODE_MISSING:"O código necessário está faltando.",GmErr_UNREGISTERED_USER:"O usuário não está registrado.",GmErr_ATTEMPTS_TO_GENERATE_CODE_EXCEEDED:"O número máximo de tentativas para gerar um código foi excedido.",GmErr_UNEXPECTED_EXCEPTION:"Ocorreu uma exceção inesperada.",GmErr_INVALID_USER_ID:"O ID do usuário fornecido é inválido.",GmErr_NOT_ALLOWED_EXCEPTION:"Esta ação não é permitida.",GmErr_CAN_NOT_FIND_ROLE:"Não foi possível encontrar a função especificada.",GmErr_NO_SESSION_PROVIDED:"Nenhuma sessão foi fornecida.",GmErr_NO_ACTIVE_SESSION_FOUND_FOR_THIS_USER:"Nenhuma sessão ativa encontrada para este usuário.",GmErr_USER_HAS_ALREADY_BEEN_ANONYMIZED:"O usuário já foi anonimizado.",GmErr_NO_ROLE_HAS_BEEN_SET_UP_TO_BE_ASSIGNED:"Nenhuma função foi configurada para ser atribuída.",GmErr_PROVIDED_SESSION_DOES_NOT_BELONG_TO_THE_USER:"A sessão fornecida não pertence ao usuário.",GmErr_PROVIDED_SESSION_DOES_NOT_EXIST:"A sessão fornecida não existe.",GmErr_ROLE_ALREADY_ASSIGNED_FOR_USER:"A função já foi atribuída ao usuário.",GmErr_ASSIGN_USER_ROLE_FAILED:"Falha ao atribuir a função ao usuário.",nextButton:"Seguindo",backButton:"Voltar",doneButton:"Terminar",generalError:"Alguma coisa deu errado. Por favor tente outra vez",successMessage:"Registro bem-sucedido"},"es-mx":{GmErr_AMOUNT_INVALID:"El monto especificado es inválido.",GmErr_REGISTER_OVERAGE:"La inscripción ha excedido el límite permitido.",GmErr_REGISTER_UNDERAGE:"La inscripción está por debajo del límite permitido.",GmErr_USER_AUTH_FAILED_TOO_MANY_ATTEMPTS:"Autenticación de usuario fallida debido a demasiados intentos fallidos.",GmErr_USER_ACCOUNT_BLOCKED:"La cuenta del usuario está bloqueada.",GmErr_USER_NOT_VERIFIED:"El usuario no ha sido verificado.",GmErr_USER_NOT_FOUND:"No se encontró ningún usuario con la información proporcionada.",GmErr_USER_ID_INVALID:"El ID de usuario proporcionado es inválido.",GmErr_USER_AUTH_FAILED:"La autenticación del usuario falló.",GmErr_USER_DUPLICATED:"El usuario ya existe en el sistema.",GmErr_USER_NOT_ACTIVATED:"La cuenta del usuario no está activada.",GmErr_PASSWORD_CONTAINS_EMAIL:"La contraseña no puede contener la dirección de correo electrónico.",GmErr_PASSWORD_CONTAINS_USERNAME:"La contraseña no puede contener el nombre de usuario.",GmErr_PASSWORD_CONTAINS_SPACES:"La contraseña no puede contener espacios.",GmErr_USER_4TS_CHECK_EXISTS:"La verificación 4TS del usuario ya existe.",GmErr_USER_NAV_EXCLUDED_REGISTRATION:"El usuario está excluido del registro.",GmErr_USER_NAV_EXCLUDED_LOGIN:"El usuario está excluido del inicio de sesión.",GmErr_USERNAME_REQUIRED:"Se requiere un nombre de usuario.",GmErr_USER_EMAIL_NOT_VERIFIED:"La dirección de correo electrónico del usuario no ha sido verificada.",GmErr_EMAIL_REQUIRED:"Se requiere una dirección de correo electrónico.",GmErr_USERNAME_ALREADY_EXISTS:"El nombre de usuario ya está en uso.",GmErr_DUPLICATE_PERSONAL_ID:"Se encontró un ID personal duplicado.",GmErr_INVALID_USER_DOCUMENT:"El documento del usuario es inválido.",GmErr_INVALID_CODE:"El código proporcionado es inválido.",GmErr_EXPIRED_TOKEN:"El token ha expirado.",GmErr_ATTEMPTS_EXCEEDED:"Se ha excedido el número máximo de intentos.",GmErr_BLOCK_USER_INCORRECT_CODE:"El usuario ha sido bloqueado debido a un código incorrecto.",GmErr_TOKEN_NOT_FOUND:"No se encontró el token.",GmErr_INVALID_PHONE_NUMBER:"El número de teléfono proporcionado es inválido.",GmErr_CODE_MISSING:"Falta el código necesario.",GmErr_UNREGISTERED_USER:"El usuario no está registrado.",GmErr_ATTEMPTS_TO_GENERATE_CODE_EXCEEDED:"Se ha excedido el número máximo de intentos para generar un código.",GmErr_UNEXPECTED_EXCEPTION:"Ocurrió una excepción inesperada.",GmErr_INVALID_USER_ID:"El ID de usuario proporcionado es inválido.",GmErr_NOT_ALLOWED_EXCEPTION:"Esta acción no está permitida.",GmErr_CAN_NOT_FIND_ROLE:"No se pudo encontrar el rol especificado.",GmErr_NO_SESSION_PROVIDED:"No se proporcionó ninguna sesión.",GmErr_NO_ACTIVE_SESSION_FOUND_FOR_THIS_USER:"No se encontró ninguna sesión activa para este usuario.",GmErr_USER_HAS_ALREADY_BEEN_ANONYMIZED:"El usuario ya ha sido anonimizado.",GmErr_NO_ROLE_HAS_BEEN_SET_UP_TO_BE_ASSIGNED:"No se ha configurado ningún rol para ser asignado.",GmErr_PROVIDED_SESSION_DOES_NOT_BELONG_TO_THE_USER:"La sesión proporcionada no pertenece al usuario.",GmErr_PROVIDED_SESSION_DOES_NOT_EXIST:"La sesión proporcionada no existe.",GmErr_ROLE_ALREADY_ASSIGNED_FOR_USER:"El rol ya ha sido asignado al usuario.",GmErr_ASSIGN_USER_ROLE_FAILED:"Falló la asignación del rol al usuario.",nextButton:"Siguiente",backButton:"Atrás",doneButton:"Terminar",generalError:"Algo salió mal... Por favor intente de nuevo",successMessage:"Registro exitoso"},tr:{nextButton:"Next",backButton:"Back",doneButton:"Done",GmErr_BadRequest_Duplicate_User:"A user with this information already exists.",GmErr_BadRequest_PasswordContainsUsername:"The password cannot be the same as the username.",GmErr_BadRequest_PasswordContainsEmail:"The password cannot be the same as the email.",GmErr_BadRequest_Duplicate_PersonalId:"There is already a registration with the data you entered or you entered your data in an incorrect format.",GmErr_Forbidden_UserAccount_NavExcluded:"User is NAV Excluded. Registration was denied.",GmErr_BadRequest_ModelValidationFailed:"Something went wrong... Please try again.",GmErr_BadInternalConfigs:"Something went wrong... Please try again.",GmErr_Unauthorized:"Something went wrong... Please try again.",GmErr_NotFound:"Something went wrong... Please try again.",GmErr_UnexpectedException:"Something went wrong... Please try again.",generalError:"Something went wrong... Please try again.",successMessage:"Register successful"}},dh=(t,e,i)=>{let o=uh[uh[e]?e:"en"][t];if(void 0!==i)for(const[t,e]of Object.entries(i.values)){const i=new RegExp(`{${t}}`,"g");o=o.replace(i,e)}return o},mh=class{constructor(i){t(this,i),this.registrationWidgetLoaded=e(this,"registrationWidgetLoaded",7),this.registrationStepUpdated=e(this,"registrationStepUpdated",7),this.listOfInputValues=[],this.listOfInputValidity=[],this.listOfActions=[],this.listOfInputs=[],this.emitValue=!1,this.backButtonPressed=!1,this.registerErrors=!1,this.extraActions=[],this.registrationStepsState={regId:null},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.host.shadowRoot.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,this.clientStyling=t,setTimeout((()=>{this.host.shadowRoot.prepend(e)}),1)}))},this.endpoint=void 0,this.language="en",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.dateFormat=void 0,this.buttonInsideForm=void 0,this.btag=null,this.emitOnClick=!1,this.errorMessage=void 0,this.isFormValid=void 0,this.isLoading=!0,this.isLoadingPOST=void 0,this.registrationStep=void 0,this.forms=[],this.limitStylingAppends=!1,this.autofilled=!1}sendStep(){this.registrationStepUpdated.emit(this.registrationStep),window.postMessage({type:"registrationStepUpdated",step:this.registrationStep},window.location.href)}handleStylingChange(t,e){t!==e&&this.setClientStyling()}handleStylingUrlChange(t,e){t!==e&&this.setClientStylingURL()}setFormValidity(){this.errorMessage="",this.listOfInputValidity&&(this.isFormValid=!this.getInvalidStatus(this.listOfInputValidity)),this.listOfInputs.some((t=>t.autofill))&&(this.autofilled=!0)}addBtag(){this.addBtagValue()}checkInputsValidityHandler(t){this.listOfInputValidity.find((e=>e.name==t.detail.name)).isValid=t.detail.valid,this.isFormValid=!this.getInvalidStatus(this.listOfInputValidity)}getInputsValueHandler(t){this.listOfInputValues.find((e=>{e.name==t.detail.name&&(e.value=t.detail.value,e.type=t.detail.type||null)})),this.stepsStateMachine({event:"set",type:"values"})}componentWillLoad(){return this.getRegisterConfig().then((t=>{this.formatConfig(t),this.isFormValid=!this.getInvalidStatus(this.listOfInputValidity),this.stepsStateMachine({event:"set",type:"inputs"})}))}componentDidLoad(){this.registrationWidgetLoaded.emit(),window.postMessage({type:"registrationWidgetLoaded"},window.location.href),!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}nextHandler(t){t.preventDefault(),this.emitValue=!0,this.setRegisterStep()}backHandler(t){t.preventDefault(),this.registrationStep=this.stepChange("decrement"),this.stepsStateMachine({event:"get",type:"inputs"}),this.stepsStateMachine({event:"get",type:"values"})}dispatchRegisterCredentialsEvent(){this.registerCredentialsEvent=new CustomEvent("RegisterCredentials",{bubbles:!0,detail:{userNameEmail:this.registrationStepsState.Step1.registerUserData.Email.value,userPassword:this.registrationStepsState.Step1.registerUserData.Password.value}}),window.dispatchEvent(this.registerCredentialsEvent)}stepsStateMachine(t){switch(t.event){case"set":"inputs"==t.type&&(this.registrationStepsState[this.registrationStep].fields=this.listOfInputs,this.registrationStepsState[this.registrationStep].actions=this.listOfActions,this.registrationStepsState[this.registrationStep].fieldsValidity=this.listOfInputValidity),"values"==t.type&&(this.registrationStepsState[this.registrationStep].registerUserData=this.listOfInputValues.reduce(((t,e)=>(t[e.name]={value:e.value,isDuplicate:e.isDuplicate},t)),{})),localStorage.setItem("registrationStepsState",JSON.stringify(this.registrationStepsState));break;case"get":const e=JSON.parse(localStorage.getItem("registrationStepsState"));if(!e)return;if("inputs"==t.type&&(this.listOfInputs=this.registrationStepsState[this.registrationStep].fields,this.listOfActions=this.registrationStepsState[this.registrationStep].actions,this.listOfInputValidity=this.registrationStepsState[this.registrationStep].fieldsValidity),"values"==t.type){const t=e[this.registrationStep].registerUserData;this.listOfInputValues=Object.keys(t).map((e=>({name:e,value:t[e].value,isDuplicate:t[e].isDuplicate}))),this.listOfInputValues.forEach((t=>{const e=this.listOfInputs.find((e=>e.name===t.name));e&&(e.defaultValue=t.value)}))}this.isFormValid=!this.getInvalidStatus(this.listOfInputValidity)}}getRegisterConfig(t){const e=new URL(`${this.endpoint}/v1/player/legislation/registration/config`),i=new Headers;i.append("Content-Type","application/json"),i.append("Accept","application/json"),t&&e.searchParams.append("registrationId",t);const o={method:"GET",headers:i};return new Promise(((t,i)=>{this.isLoading=!0,fetch(e.href,o).then((t=>t.json())).then((e=>{this.isLoading=!1,t(e)})).catch((t=>{this.isLoading=!1,console.error(t),i(t)})).finally((()=>{this.isLoading=!1}))}))}setRegisterStep(){this.isLoadingPOST=!0;const t=new URL(`${this.endpoint}/v1/player/legislation/registration/step`),e={registrationId:this.registrationID,registerUserDto:this.listOfInputValues.filter((t=>!t.isDuplicate)).reduce(((t,e)=>("TypeOfPublicArea"===e.name?t[e.name]=e.value.toLowerCase():"tel"===e.type?(t.MobilePrefix=e.value.prefix,t[e.name]=e.value.phone):"checkboxgroup"===e.type?null!==e.value&&Object.entries(e.value).forEach((([e,i])=>{t[e]=i?"true":"false"})):t[e.name]=e.value,t)),{}),step:this.registrationStep},i=new Headers;i.append("Content-Type","application/json"),i.append("Accept","application/json");const o={method:"POST",body:JSON.stringify(e),headers:i};fetch(t.href,o).then((t=>t.ok?t.json():t.json().then((t=>{this.errorCode=t.thirdPartyResponse.errorCode,this.errorMessage="GmErr_BadRequest_IdomsoftVerification_ShouldRetry"==this.errorCode?t.thirdPartyResponse.message:"GmErr_Forbidden_UserAccount_NavExcluded"===this.errorCode?dh(`${this.errorCode}`,this.language):"GmErr_BadRequest"==this.errorCode?t.thirdPartyResponse.message:dh(`${this.errorCode}`,this.language)||dh("generalError",this.language)})))).then((t=>{this.isLoadingPOST=!1,this.registrationID=t.registrationId,this.listOfActions.some((t=>"/register"==t))?(this.listOfActions.some((t=>"/generate-2FA-code/Generate2FACode"==t))&&this.extraActions.push("2fa"),this.setRegister()):(this.registrationStep=this.stepChange("increment"),Object.keys(this.registrationStepsState).find((t=>t==this.registrationStep))?(this.stepsStateMachine({event:"get",type:"inputs"}),this.stepsStateMachine({event:"get",type:"values"})):this.getRegisterConfig(this.registrationID).then((t=>{this.formatConfig(t),this.stepsStateMachine({event:"set",type:"inputs"})})))})).catch((t=>{this.isLoadingPOST=!1,console.error(t)})).finally((()=>{this.isLoadingPOST=!1}))}setRegister(){this.isLoading=!0,this.registerErrors=!1;const t=new URL(`${this.endpoint}/v1/player/legislation/register`),e=new Headers;e.append("Content-Type","application/json"),e.append("Accept","application/json");const i={method:"PUT",body:JSON.stringify({registrationId:this.registrationID}),headers:e};fetch(t.href,i).then((t=>t.ok?t.json():(this.registerErrors=!0,t.json().then((t=>{this.errorCode=t.thirdPartyResponse.errorCode,this.errorMessage="GmErr_BadRequest_IdomsoftVerification_ShouldRetry"==this.errorCode||"GmErr_BadRequest"==this.errorCode?t.thirdPartyResponse.message:dh(`${this.errorCode}`,this.language)||dh("generalError",this.language),window.postMessage({type:"registrationFailed",errorMessage:null==t?void 0:t.thirdPartyResponse.message},window.location.href),window.postMessage({type:"WidgetNotification",data:{type:"error",message:this.errorMessage}},window.location.href)}))))).then((t=>{this.isLoading=!1,this.registerErrors||(this.dispatchRegisterCredentialsEvent(),window.postMessage({type:"registrationSuccessful",userId:null==t?void 0:t.userId,extraActions:this.extraActions},window.location.href),window.postMessage({type:"WidgetNotification",data:{type:"success",message:dh("successMessage",this.language)}},window.location.href))})).catch((t=>{this.isLoading=!1,console.error(t)})).finally((()=>{this.isLoading=!1}))}formatConfig(t){var e;this.listOfInputs=t.content.fields.flatMap((t=>{const e=t.validate.custom.find((t=>"duplicate-input"===t.rule)),i=Object.assign({},t);return e?[i,Object.assign(Object.assign({},t),{name:`${t.name}Duplicate`,displayName:e.displayName,isDuplicateInput:!0})]:[i]})),this.listOfInputValidity=this.listOfInputs.reduce(((t,e)=>{var i;return"togglecheckbox"===(null===(i=e.inputType)||void 0===i?void 0:i.toLowerCase())?e.data.subFields.forEach((e=>{t.push({name:e.name,isValid:this.setInitialValidStatus(e)})})):t.push({name:e.name,isValid:this.setInitialValidStatus(e)}),t}),[]),this.listOfInputValues=this.listOfInputs.reduce(((t,e)=>{var i,o,r;return"togglecheckbox"===(null===(i=e.inputType)||void 0===i?void 0:i.toLowerCase())?e.data.subFields.forEach((i=>{var o,r;t.push({name:i.name,value:"checkbox"==(null===(o=i.inputType)||void 0===o?void 0:o.toLowerCase())?"false":null,isDuplicate:i.isDuplicateInput||!1,type:"togglecheckbox"==(null===(r=e.inputType)||void 0===r?void 0:r.toLowerCase())?"togglecheckbox":null})})):t.push({name:e.name,value:"checkbox"==(null===(o=e.inputType)||void 0===o?void 0:o.toLowerCase())?"false":null,isDuplicate:e.isDuplicateInput||!1,type:"checkboxgroup"==(null===(r=e.inputType)||void 0===r?void 0:r.toLowerCase())?"checkboxgroup":null}),t}),[]),this.btag&&this.addBtagValue(),this.listOfActions=t.content.actions.map((t=>t)),this.registrationID=t.content.registrationID,this.registrationStep=t.content.step,this.listOfActions.some((t=>"/register"==t))&&(this.lastStep=this.registrationStep),this.translationUrl?(e=this.translationUrl,new Promise((t=>{fetch(e).then((t=>t.json())).then((e=>{Object.keys(e).forEach((t=>{for(let i in e[t])uh[t][i]=e[t][i]})),t(!0)}))}))).then((()=>{this.listOfInputs.forEach((t=>{var e,i;return this.addTranslation(t),"togglecheckbox"===(null===(e=t.inputType)||void 0===e?void 0:e.toLowerCase())&&t.data.subFields.forEach((t=>this.addTranslation(t))),"checkboxgroup"===(null===(i=t.inputType)||void 0===i?void 0:i.toLowerCase())&&(this.addTranslation(t),t.data.subFields.forEach((t=>this.addTranslation(t)))),t}))})).catch((t=>{console.error("Failed to fetch translations:",t)})).finally((()=>{this.forms=[...this.forms,{[this.registrationStep]:this.listOfInputs}]})):this.forms=[...this.forms,{[this.registrationStep]:this.listOfInputs}],this.registrationStepsState.regId=this.registrationID,this.registrationStepsState[this.registrationStep]||(this.registrationStepsState[this.registrationStep]={fields:[],fieldsValidity:[],registerUserData:{},actions:[]})}addBtagValue(){const t=this.listOfInputs.find((t=>"btag"===t.name.toLowerCase()));t&&(t.defaultValue=this.btag);const e=this.listOfInputValues.find((t=>"btag"===t.name.toLowerCase()));e&&(e.value=this.btag)}addTranslation(t){uh[uh[this.language]?this.language:"en"][t.name]&&Object.keys(uh[this.language][t.name]).forEach((e=>{t[e]=uh[this.language][t.name][e]}))}setInitialValidStatus(t){var e,i;return"checkbox"==(null===(e=t.inputType)||void 0===e?void 0:e.toLowerCase())&&0==(null===(i=t.validate)||void 0===i?void 0:i.mandatory)||null!==t.defaultValue}stepChange(t){const e=parseInt(this.registrationStep.replace("Step",""));return"increment"===t?"Step"+(e+1):"decrement"===t?"Step"+(e-1):void 0}getInvalidStatus(t){return t.filter((t=>0==t.isValid)).length>0}renderForm(){return this.forms.map(((t,e)=>i("form",{action:".",id:`RegistrationForm${this.registrationStep}`,class:"registration__form "+(this.registrationStep!==`Step${e+1}`?"hidden":""),ref:t=>this.form=t},t[this.registrationStep]&&t[this.registrationStep].map((t=>i("general-input",{type:t.inputType,name:t.name,displayName:t.displayName,validation:t.validate,action:t.action||null,options:t.data?"checkboxgroup"==t.inputType.toLowerCase()||"togglecheckbox"==t.inputType.toLowerCase()?t.data.subFields:t.data.values:[],defaultValue:t.defaultValue,autofilled:t.autofill,emitValue:this.emitValue,language:this.language,isDuplicateInput:t.isDuplicateInput,"client-styling":this.clientStyling,tooltip:t.tooltip,placeholder:null==t.placeholder?"":t.placeholder,dateFormat:this.dateFormat,"translation-url":this.translationUrl,emitOnClick:this.emitOnClick}))),this.buttonInsideForm&&this.renderButtons(),i("div",{class:"registration__wrapper--flex"},i("p",{class:"registration__error-message",innerHTML:this.errorMessage})))))}renderButtons(){return i("div",{class:"registration__buttons-wrapper "+(this.autofilled?"registration__buttons-wrapper--autofilled":"")},this.isLoadingPOST&&i("slot",{name:"spinner"})&&i("svg",{class:"spinner",viewBox:"0 0 50 50"},i("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none","stroke-width":"5"})),!this.isLoadingPOST&&i("button",{class:"registration__button registration__button--next "+(this.isFormValid?"":"registration__button--disabled"),type:"submit",form:`RegistrationForm${this.registrationStep}`,onClick:t=>this.nextHandler(t),disabled:!this.isFormValid},dh(this.lastStep===this.registrationStep?"doneButton":"nextButton",this.language)),i("button",{class:"registration__button registration__button--back "+("Step1"==this.registrationStep?"registration__button--first-step":""),onClick:t=>this.backHandler(t)},dh("backButton",this.language)))}render(){return this.isLoading?i("p",null,"Please wait, loading ..."):i("div",{class:`registration registration__${this.registrationStep}`},this.renderForm(),!this.buttonInsideForm&&this.renderButtons())}get host(){return o(this)}static get watchers(){return{registrationStep:["sendStep"],clientStyling:["handleStylingChange"],clientStylingUrl:["handleStylingUrlChange"],forms:["setFormValidity"],btag:["addBtag"]}}};mh.style='*,\n*::before,\n*::after {\n padding: 0;\n margin: 0;\n box-sizing: border-box;\n}\n\n.registration__form.hidden {\n display: none;\n}\n\n.registration {\n font-family: "Roboto";\n font-style: normal;\n font-family: sans-serif;\n display: flex;\n flex-direction: column;\n gap: 24px;\n width: 100%;\n height: 100%;\n container-type: inline-size;\n}\n.registration__wrapper {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.registration__error-message {\n color: var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909));\n font-size: 13px;\n display: block;\n justify-content: center;\n text-align: center;\n}\n.registration__form {\n display: grid;\n grid-template-columns: repeat(1, 1fr);\n gap: 40px;\n justify-items: stretch;\n align-content: flex-start;\n overflow: auto;\n width: 100%;\n height: 100%;\n}\n.registration__buttons-wrapper {\n display: flex;\n flex-direction: column;\n justify-content: space-around;\n align-items: center;\n position: relative;\n}\n.registration__button {\n border-radius: 5px;\n background: var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));\n border: 1px solid var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));\n color: var(--emfe-w-button-typography, var(--emfe-w-color-white, #FFFFFF));\n text-transform: uppercase;\n font-size: 20px;\n height: 44px;\n width: 100%;\n margin: 0px auto;\n padding: 10px 20px;\n font-weight: normal;\n box-shadow: none;\n cursor: pointer;\n}\n.registration__button--disabled {\n background: var(--emfe-w-color-gray-100, #E6E6E6);\n border: 1px solid var(--emfe-w-color-gray-150, #828282);\n pointer-events: none;\n box-shadow: none;\n}\n.registration__button--first-step {\n display: none;\n}\n\n@container (min-width: 450px) {\n .registration__form {\n grid-template-columns: repeat(2, 1fr);\n }\n .registration__buttons-wrapper {\n flex-direction: row-reverse;\n gap: 15px;\n }\n}\n.spinner {\n animation: rotate 2s linear infinite;\n z-index: 2;\n position: absolute;\n top: 50%;\n left: 50%;\n margin: -25px 0 0 -25px;\n width: 50px;\n height: 50px;\n}\n.spinner .path {\n stroke: var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));\n stroke-linecap: round;\n animation: dash 1.5s ease-in-out infinite;\n}\n\n@keyframes rotate {\n 100% {\n transform: rotate(360deg);\n }\n}\n@keyframes dash {\n 0% {\n stroke-dasharray: 1, 150;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -35;\n }\n 100% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -124;\n }\n}';const ph=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.validationPattern="",this.touched=!1,this.handleInput=t=>{this.value=t.target.value,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleBlur=()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.validation=void 0,this.defaultValue=void 0,this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}connectedCallback(){this.validationPattern=this.setPattern()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}setValidity(){return this.inputReference.validity.valid}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e;if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,o=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return a(`${i}`,this.language)?a(`${i}`,this.language):o}return this.inputReference.validity.rangeUnderflow||this.inputReference.validity.rangeOverflow?a("numberLengthError",this.language,{values:{min:this.validation.min,max:this.validation.max}}):this.inputReference.validity.valueMissing?a("requiredError",this.language):void 0}renderTooltip(){return this.showTooltip?i("div",{class:"number__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"2032f77ca52b330ae2e8f484d7a0aba60ee7b9d5",class:`number__wrapper ${this.autofilled?"number__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"0786901cd928bba86597180f058bff43fba522b6",class:"number__wrapper--flex"},i("label",{key:"ff7f39306cef7aeba3e0e4508df03c5a945e748b",class:"number__label "+(this.validation.mandatory?"number__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"dced91223621551472fee374d56f1ad7476f4191",class:"number__wrapper--relative"},this.tooltip&&i("img",{key:"a804a983e342e4d117126720a32c4c34a2b267dc",class:"number__tooltip-icon",src:n,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("input",{key:"fd59afaedf7d9f761684b057a1809474d735cc26",ref:t=>this.inputReference=t,type:"number",value:this.defaultValue,readOnly:this.autofilled,id:`${this.name}__input`,class:`number__input ${t}`,pattern:this.validationPattern,placeholder:`${this.placeholder}`,required:this.validation.mandatory,max:this.validation.max,min:this.validation.min,onInput:this.handleInput,onBlur:this.handleBlur}),i("small",{key:"ca11558b5704b69311626736ab84a298449b98d7",class:"number__error-message"},this.errorMessage))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};ph.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.number{font-family:"Roboto";font-style:normal}.number__wrapper{position:relative;width:100%}.number__wrapper--autofilled{pointer-events:none}.number__wrapper--autofilled .number__label{color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.number__wrapper--autofilled .number__input{color:var(--emfe-w-color-black, #000000)}.number__wrapper--flex{display:flex;gap:5px}.number__wrapper--relative{position:relative}.number__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.number__label--required::after{content:"*";font-family:inherit;color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));margin-left:2px}.number__input{font-family:inherit;border-radius:5px;width:100%;height:44px;border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-color-black, #000000);border-radius:5px;box-sizing:border-box;padding:5px 15px;font-size:16px;line-height:18px;position:relative;-moz-appearance:textfield;}.number__input:focus{outline-color:#3E3E3E}.number__input::-webkit-outer-spin-button,.number__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.number__input--invalid{border:1px solid var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.number__input::placeholder{color:#979797}.number__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.number__tooltip-icon{width:16px;height:auto}.number__tooltip{position:absolute;top:0;left:20px;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.number__tooltip.visible{opacity:1}';
|
|
3933
|
+
`}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new dr(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new gr(this.inputElement,this._labelController)),this._tooltipController=new bo(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow((t=>!t.opened)),this.shadowRoot.querySelector('[part="toggle-button"]').addEventListener("mousedown",(t=>t.preventDefault())),this.$.overlay.addEventListener("vaadin-overlay-close",this._onVaadinOverlayClose.bind(this))}_onVaadinOverlayClose(t){t.detail.sourceEvent&&t.detail.sourceEvent.composedPath().includes(this)&&t.preventDefault()}_toggle(t){t.stopPropagation(),this.$.overlay.opened?this.close():this.open()}_openedChanged(t){super._openedChanged(t),this.$.overlay.positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this.$.overlay.noVerticalOverlap=!0}}function Ea(t){return Ea="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ea(t)}function Aa(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function Sa(t){Aa(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===Ea(t)&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function Ca(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function Ta(t,e){return Aa(2,arguments),function(t,e){Aa(2,arguments);var i=Sa(t).getTime(),o=Ca(e);return new Date(i+o)}(t,-Ca(e))}function Da(t){Aa(1,arguments);var e=Sa(t),i=e.getUTCDay(),o=(i<1?7:0)+i-1;return e.setUTCDate(e.getUTCDate()-o),e.setUTCHours(0,0,0,0),e}function Ia(t){Aa(1,arguments);var e=Sa(t),i=e.getUTCFullYear(),o=new Date(0);o.setUTCFullYear(i+1,0,4),o.setUTCHours(0,0,0,0);var r=Da(o),s=new Date(0);s.setUTCFullYear(i,0,4),s.setUTCHours(0,0,0,0);var a=Da(s);return e.getTime()>=r.getTime()?i+1:e.getTime()>=a.getTime()?i:i-1}l(ka);function za(t){Aa(1,arguments);var e=Sa(t),i=Da(e).getTime()-function(t){Aa(1,arguments);var e=Ia(t),i=new Date(0);return i.setUTCFullYear(e,0,4),i.setUTCHours(0,0,0,0),Da(i)}(e).getTime();return Math.round(i/6048e5)+1}var Na={};function Oa(){return Na}function Ra(t,e){var i,o,r,s,a,n,l,h;Aa(1,arguments);var c=Oa(),u=Ca(null!==(i=null!==(o=null!==(r=null!==(s=null==e?void 0:e.weekStartsOn)&&void 0!==s?s:null==e||null===(a=e.locale)||void 0===a||null===(n=a.options)||void 0===n?void 0:n.weekStartsOn)&&void 0!==r?r:c.weekStartsOn)&&void 0!==o?o:null===(l=c.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==i?i:0);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=Sa(t),m=d.getUTCDay(),p=(m<u?7:0)+m-u;return d.setUTCDate(d.getUTCDate()-p),d.setUTCHours(0,0,0,0),d}function Ma(t,e){var i,o,r,s,a,n,l,h;Aa(1,arguments);var c=Sa(t),u=c.getUTCFullYear(),d=Oa(),m=Ca(null!==(i=null!==(o=null!==(r=null!==(s=null==e?void 0:e.firstWeekContainsDate)&&void 0!==s?s:null==e||null===(a=e.locale)||void 0===a||null===(n=a.options)||void 0===n?void 0:n.firstWeekContainsDate)&&void 0!==r?r:d.firstWeekContainsDate)&&void 0!==o?o:null===(l=d.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==i?i:1);if(!(m>=1&&m<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=new Date(0);p.setUTCFullYear(u+1,0,m),p.setUTCHours(0,0,0,0);var f=Ra(p,e),v=new Date(0);v.setUTCFullYear(u,0,m),v.setUTCHours(0,0,0,0);var g=Ra(v,e);return c.getTime()>=f.getTime()?u+1:c.getTime()>=g.getTime()?u:u-1}function Pa(t,e){Aa(1,arguments);var i=Sa(t),o=Ra(i,e).getTime()-function(t,e){var i,o,r,s,a,n,l,h;Aa(1,arguments);var c=Oa(),u=Ca(null!==(i=null!==(o=null!==(r=null!==(s=null==e?void 0:e.firstWeekContainsDate)&&void 0!==s?s:null==e||null===(a=e.locale)||void 0===a||null===(n=a.options)||void 0===n?void 0:n.firstWeekContainsDate)&&void 0!==r?r:c.firstWeekContainsDate)&&void 0!==o?o:null===(l=c.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==i?i:1),d=Ma(t,e),m=new Date(0);return m.setUTCFullYear(d,0,u),m.setUTCHours(0,0,0,0),Ra(m,e)}(i,e).getTime();return Math.round(o/6048e5)+1}function Ga(t,e){for(var i=t<0?"-":"",o=Math.abs(t).toString();o.length<e;)o="0"+o;return i+o}const Fa=function(t,e){var i=t.getUTCFullYear(),o=i>0?i:1-i;return Ga("yy"===e?o%100:o,e.length)},Ua=function(t,e){var i=t.getUTCMonth();return"M"===e?String(i+1):Ga(i+1,2)},La=function(t,e){return Ga(t.getUTCDate(),e.length)},Ba=function(t,e){return Ga(t.getUTCHours()%12||12,e.length)},ja=function(t,e){return Ga(t.getUTCHours(),e.length)},Va=function(t,e){return Ga(t.getUTCMinutes(),e.length)},qa=function(t,e){return Ga(t.getUTCSeconds(),e.length)},Wa=function(t,e){var i=e.length,o=t.getUTCMilliseconds();return Ga(Math.floor(o*Math.pow(10,i-3)),e.length)};function Ha(t,e){var i=t>0?"-":"+",o=Math.abs(t),r=Math.floor(o/60),s=o%60;if(0===s)return i+String(r);var a=e||"";return i+String(r)+a+Ga(s,2)}function Ya(t,e){return t%60==0?(t>0?"-":"+")+Ga(Math.abs(t)/60,2):Ka(t,e)}function Ka(t,e){var i=e||"",o=t>0?"-":"+",r=Math.abs(t);return o+Ga(Math.floor(r/60),2)+i+Ga(r%60,2)}const Xa={G:function(t,e,i){var o=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return i.era(o,{width:"abbreviated"});case"GGGGG":return i.era(o,{width:"narrow"});default:return i.era(o,{width:"wide"})}},y:function(t,e,i){if("yo"===e){var o=t.getUTCFullYear();return i.ordinalNumber(o>0?o:1-o,{unit:"year"})}return Fa(t,e)},Y:function(t,e,i,o){var r=Ma(t,o),s=r>0?r:1-r;return"YY"===e?Ga(s%100,2):"Yo"===e?i.ordinalNumber(s,{unit:"year"}):Ga(s,e.length)},R:function(t,e){return Ga(Ia(t),e.length)},u:function(t,e){return Ga(t.getUTCFullYear(),e.length)},Q:function(t,e,i){var o=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(o);case"QQ":return Ga(o,2);case"Qo":return i.ordinalNumber(o,{unit:"quarter"});case"QQQ":return i.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(o,{width:"narrow",context:"formatting"});default:return i.quarter(o,{width:"wide",context:"formatting"})}},q:function(t,e,i){var o=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(o);case"qq":return Ga(o,2);case"qo":return i.ordinalNumber(o,{unit:"quarter"});case"qqq":return i.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(o,{width:"narrow",context:"standalone"});default:return i.quarter(o,{width:"wide",context:"standalone"})}},M:function(t,e,i){var o=t.getUTCMonth();switch(e){case"M":case"MM":return Ua(t,e);case"Mo":return i.ordinalNumber(o+1,{unit:"month"});case"MMM":return i.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(o,{width:"narrow",context:"formatting"});default:return i.month(o,{width:"wide",context:"formatting"})}},L:function(t,e,i){var o=t.getUTCMonth();switch(e){case"L":return String(o+1);case"LL":return Ga(o+1,2);case"Lo":return i.ordinalNumber(o+1,{unit:"month"});case"LLL":return i.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(o,{width:"narrow",context:"standalone"});default:return i.month(o,{width:"wide",context:"standalone"})}},w:function(t,e,i,o){var r=Pa(t,o);return"wo"===e?i.ordinalNumber(r,{unit:"week"}):Ga(r,e.length)},I:function(t,e,i){var o=za(t);return"Io"===e?i.ordinalNumber(o,{unit:"week"}):Ga(o,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getUTCDate(),{unit:"date"}):La(t,e)},D:function(t,e,i){var o=function(t){Aa(1,arguments);var e=Sa(t),i=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var o=e.getTime();return Math.floor((i-o)/864e5)+1}(t);return"Do"===e?i.ordinalNumber(o,{unit:"dayOfYear"}):Ga(o,e.length)},E:function(t,e,i){var o=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return i.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},e:function(t,e,i,o){var r=t.getUTCDay(),s=(r-o.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return Ga(s,2);case"eo":return i.ordinalNumber(s,{unit:"day"});case"eee":return i.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(r,{width:"short",context:"formatting"});default:return i.day(r,{width:"wide",context:"formatting"})}},c:function(t,e,i,o){var r=t.getUTCDay(),s=(r-o.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return Ga(s,e.length);case"co":return i.ordinalNumber(s,{unit:"day"});case"ccc":return i.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(r,{width:"narrow",context:"standalone"});case"cccccc":return i.day(r,{width:"short",context:"standalone"});default:return i.day(r,{width:"wide",context:"standalone"})}},i:function(t,e,i){var o=t.getUTCDay(),r=0===o?7:o;switch(e){case"i":return String(r);case"ii":return Ga(r,e.length);case"io":return i.ordinalNumber(r,{unit:"day"});case"iii":return i.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},a:function(t,e,i){var o=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(t,e,i){var o,r=t.getUTCHours();switch(o=12===r?"noon":0===r?"midnight":r/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(t,e,i){var o,r=t.getUTCHours();switch(o=r>=17?"evening":r>=12?"afternoon":r>=4?"morning":"night",e){case"B":case"BB":case"BBB":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(t,e,i){if("ho"===e){var o=t.getUTCHours()%12;return 0===o&&(o=12),i.ordinalNumber(o,{unit:"hour"})}return Ba(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getUTCHours(),{unit:"hour"}):ja(t,e)},K:function(t,e,i){var o=t.getUTCHours()%12;return"Ko"===e?i.ordinalNumber(o,{unit:"hour"}):Ga(o,e.length)},k:function(t,e,i){var o=t.getUTCHours();return 0===o&&(o=24),"ko"===e?i.ordinalNumber(o,{unit:"hour"}):Ga(o,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):Va(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):qa(t,e)},S:function(t,e){return Wa(t,e)},X:function(t,e,i,o){var r=(o._originalDate||t).getTimezoneOffset();if(0===r)return"Z";switch(e){case"X":return Ya(r);case"XXXX":case"XX":return Ka(r);default:return Ka(r,":")}},x:function(t,e,i,o){var r=(o._originalDate||t).getTimezoneOffset();switch(e){case"x":return Ya(r);case"xxxx":case"xx":return Ka(r);default:return Ka(r,":")}},O:function(t,e,i,o){var r=(o._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Ha(r,":");default:return"GMT"+Ka(r,":")}},z:function(t,e,i,o){var r=(o._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Ha(r,":");default:return"GMT"+Ka(r,":")}},t:function(t,e,i,o){return Ga(Math.floor((o._originalDate||t).getTime()/1e3),e.length)},T:function(t,e,i,o){return Ga((o._originalDate||t).getTime(),e.length)}};var Za=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},Ja=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},Qa={p:Ja,P:function(t,e){var i,o=t.match(/(P+)(p+)?/)||[],r=o[1],s=o[2];if(!s)return Za(t,e);switch(r){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;default:i=e.dateTime({width:"full"})}return i.replace("{{date}}",Za(r,e)).replace("{{time}}",Ja(s,e))}};const $a=Qa;function tn(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}var en=["D","DD"],on=["YY","YYYY"];function rn(t){return-1!==en.indexOf(t)}function sn(t){return-1!==on.indexOf(t)}function an(t,e,i){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var nn={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function ln(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=e.width?String(e.width):t.defaultWidth;return t.formats[i]||t.formats[t.defaultWidth]}}var hn,cn={date:ln({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:ln({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:ln({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},un={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function dn(t){return function(e,i){var o;if("formatting"===(null!=i&&i.context?String(i.context):"standalone")&&t.formattingValues){var r=t.defaultFormattingWidth||t.defaultWidth,s=null!=i&&i.width?String(i.width):r;o=t.formattingValues[s]||t.formattingValues[r]}else{var a=t.defaultWidth,n=null!=i&&i.width?String(i.width):t.defaultWidth;o=t.values[n]||t.values[a]}return o[t.argumentCallback?t.argumentCallback(e):e]}}function mn(t){return function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=i.width,r=e.match(o&&t.matchPatterns[o]||t.matchPatterns[t.defaultMatchWidth]);if(!r)return null;var s,a=r[0],n=o&&t.parsePatterns[o]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(n)?function(t){for(var e=0;e<t.length;e++)if(t[e].test(a))return e}(n):function(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e].test(a))return e}(n);return s=t.valueCallback?t.valueCallback(l):l,{value:s=i.valueCallback?i.valueCallback(s):s,rest:e.slice(a.length)}}}const pn={code:"en-US",formatDistance:function(t,e,i){var o,r=nn[t];return o="string"==typeof r?r:1===e?r.one:r.other.replace("{{count}}",e.toString()),null!=i&&i.addSuffix?i.comparison&&i.comparison>0?"in "+o:o+" ago":o},formatLong:cn,formatRelative:function(t){return un[t]},localize:{ordinalNumber:function(t){var e=Number(t),i=e%100;if(i>20||i<10)switch(i%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},era:dn({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:dn({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:dn({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:dn({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:dn({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(hn={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.match(hn.matchPattern);if(!i)return null;var o=i[0],r=t.match(hn.parsePattern);if(!r)return null;var s=hn.valueCallback?hn.valueCallback(r[0]):r[0];return{value:s=e.valueCallback?e.valueCallback(s):s,rest:t.slice(o.length)}}),era:mn({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:mn({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:mn({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:mn({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:mn({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};var fn=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,vn=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,gn=/^'([^]*?)'?$/,bn=/''/g,yn=/[a-zA-Z]/;function _n(t,e,i){var o,r,s,a,n,l,h,c,u,d,m,p,f,v,g,b,y,_;Aa(2,arguments);var w=String(e),x=Oa(),k=null!==(o=null!==(r=null==i?void 0:i.locale)&&void 0!==r?r:x.locale)&&void 0!==o?o:pn,E=Ca(null!==(s=null!==(a=null!==(n=null!==(l=null==i?void 0:i.firstWeekContainsDate)&&void 0!==l?l:null==i||null===(h=i.locale)||void 0===h||null===(c=h.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==n?n:x.firstWeekContainsDate)&&void 0!==a?a:null===(u=x.locale)||void 0===u||null===(d=u.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==s?s:1);if(!(E>=1&&E<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var A=Ca(null!==(m=null!==(p=null!==(f=null!==(v=null==i?void 0:i.weekStartsOn)&&void 0!==v?v:null==i||null===(g=i.locale)||void 0===g||null===(b=g.options)||void 0===b?void 0:b.weekStartsOn)&&void 0!==f?f:x.weekStartsOn)&&void 0!==p?p:null===(y=x.locale)||void 0===y||null===(_=y.options)||void 0===_?void 0:_.weekStartsOn)&&void 0!==m?m:0);if(!(A>=0&&A<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!k.localize)throw new RangeError("locale must contain localize property");if(!k.formatLong)throw new RangeError("locale must contain formatLong property");var S=Sa(t);if(!function(t){if(Aa(1,arguments),!function(t){return Aa(1,arguments),t instanceof Date||"object"===Ea(t)&&"[object Date]"===Object.prototype.toString.call(t)}(t)&&"number"!=typeof t)return!1;var e=Sa(t);return!isNaN(Number(e))}(S))throw new RangeError("Invalid time value");var C=Ta(S,tn(S)),T={firstWeekContainsDate:E,weekStartsOn:A,locale:k,_originalDate:S};return w.match(vn).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,$a[e])(t,k.formatLong):t})).join("").match(fn).map((function(o){if("''"===o)return"'";var r,s,a=o[0];if("'"===a)return(s=(r=o).match(gn))?s[1].replace(bn,"'"):r;var n=Xa[a];if(n)return null!=i&&i.useAdditionalWeekYearTokens||!sn(o)||an(o,e,String(t)),null!=i&&i.useAdditionalDayOfYearTokens||!rn(o)||an(o,e,String(t)),n(C,o,k.localize,T);if(a.match(yn))throw new RangeError("Format string contains an unescaped latin alphabet character `"+a+"`");return o})).join("")}function wn(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,o=Array(e);i<e;i++)o[i]=t[i];return o}function xn(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return wn(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?wn(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var o=0,r=function(){};return{s:r,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,n=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){n=!0,s=t},f:function(){try{a||null==i.return||i.return()}finally{if(n)throw s}}}}function kn(t,e){if(null==t)throw new TypeError("assign requires that input parameter not be null or undefined");for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}function En(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function An(t,e){return An=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},An(t,e)}function Sn(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&An(t,e)}function Cn(t){return Cn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Cn(t)}function Tn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Tn=function(){return!!t})()}function Dn(t){var e=Tn();return function(){var i,o=Cn(t);if(e){var r=Cn(this).constructor;i=Reflect.construct(o,arguments,r)}else i=o.apply(this,arguments);return function(t,e){if(e&&("object"==Ea(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return En(t)}(this,i)}}function In(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function zn(t){var e=function(t){if("object"!=Ea(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=Ea(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ea(e)?e:e+""}function Nn(t,e){for(var i=0;i<e.length;i++){var o=e[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,zn(o.key),o)}}function On(t,e,i){return e&&Nn(t.prototype,e),i&&Nn(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function Rn(t,e,i){return(e=zn(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var Mn=function(){function t(){In(this,t),Rn(this,"priority",void 0),Rn(this,"subPriority",0)}return On(t,[{key:"validate",value:function(){return!0}}]),t}(),Pn=function(){Sn(e,Mn);var t=Dn(e);function e(i,o,r,s,a){var n;return In(this,e),(n=t.call(this)).value=i,n.validateValue=o,n.setValue=r,n.priority=s,a&&(n.subPriority=a),n}return On(e,[{key:"validate",value:function(t,e){return this.validateValue(t,this.value,e)}},{key:"set",value:function(t,e,i){return this.setValue(t,e,this.value,i)}}]),e}(),Gn=function(){Sn(e,Mn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",10),Rn(En(i),"subPriority",-1),i}return On(e,[{key:"set",value:function(t,e){if(e.timestampIsSet)return t;var i=new Date(0);return i.setFullYear(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()),i.setHours(t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()),i}}]),e}(),Fn=function(){function t(){In(this,t),Rn(this,"incompatibleTokens",void 0),Rn(this,"priority",void 0),Rn(this,"subPriority",void 0)}return On(t,[{key:"run",value:function(t,e,i,o){var r=this.parse(t,e,i,o);return r?{setter:new Pn(r.value,this.validate,this.set,this.priority,this.subPriority),rest:r.rest}:null}},{key:"validate",value:function(){return!0}}]),t}(),Un=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",140),Rn(En(i),"incompatibleTokens",["R","u","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"G":case"GG":case"GGG":return i.era(t,{width:"abbreviated"})||i.era(t,{width:"narrow"});case"GGGGG":return i.era(t,{width:"narrow"});default:return i.era(t,{width:"wide"})||i.era(t,{width:"abbreviated"})||i.era(t,{width:"narrow"})}}},{key:"set",value:function(t,e,i){return e.era=i,t.setUTCFullYear(i,0,1),t.setUTCHours(0,0,0,0),t}}]),e}(),Ln=/^(1[0-2]|0?\d)/,Bn=/^(3[0-1]|[0-2]?\d)/,jn=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,Vn=/^(5[0-3]|[0-4]?\d)/,qn=/^(2[0-3]|[0-1]?\d)/,Wn=/^(2[0-4]|[0-1]?\d)/,Hn=/^(1[0-1]|0?\d)/,Yn=/^(1[0-2]|0?\d)/,Kn=/^[0-5]?\d/,Xn=/^[0-5]?\d/,Zn=/^\d/,Jn=/^\d{1,2}/,Qn=/^\d{1,3}/,$n=/^\d{1,4}/,tl=/^-?\d+/,el=/^-?\d/,il=/^-?\d{1,2}/,ol=/^-?\d{1,3}/,rl=/^-?\d{1,4}/,sl=/^([+-])(\d{2})(\d{2})?|Z/,al=/^([+-])(\d{2})(\d{2})|Z/,nl=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,ll=/^([+-])(\d{2}):(\d{2})|Z/,hl=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function cl(t,e){return t?{value:e(t.value),rest:t.rest}:t}function ul(t,e){var i=e.match(t);return i?{value:parseInt(i[0],10),rest:e.slice(i[0].length)}:null}function dl(t,e){var i=e.match(t);return i?"Z"===i[0]?{value:0,rest:e.slice(1)}:{value:("+"===i[1]?1:-1)*(36e5*(i[2]?parseInt(i[2],10):0)+6e4*(i[3]?parseInt(i[3],10):0)+1e3*(i[5]?parseInt(i[5],10):0)),rest:e.slice(i[0].length)}:null}function ml(t){return ul(tl,t)}function pl(t,e){switch(t){case 1:return ul(Zn,e);case 2:return ul(Jn,e);case 3:return ul(Qn,e);case 4:return ul($n,e);default:return ul(new RegExp("^\\d{1,"+t+"}"),e)}}function fl(t,e){switch(t){case 1:return ul(el,e);case 2:return ul(il,e);case 3:return ul(ol,e);case 4:return ul(rl,e);default:return ul(new RegExp("^-?\\d{1,"+t+"}"),e)}}function vl(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function gl(t,e){var i,o=e>0,r=o?e:1-e;if(r<=50)i=t||100;else{var s=r+50;i=t+100*Math.floor(s/100)-(t>=s%100?100:0)}return o?i:1-i}function bl(t){return t%400==0||t%4==0&&t%100!=0}var yl=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",130),Rn(En(i),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){var o=function(t){return{year:t,isTwoDigitYear:"yy"===e}};switch(e){case"y":return cl(pl(4,t),o);case"yo":return cl(i.ordinalNumber(t,{unit:"year"}),o);default:return cl(pl(e.length,t),o)}}},{key:"validate",value:function(t,e){return e.isTwoDigitYear||e.year>0}},{key:"set",value:function(t,e,i){var o=t.getUTCFullYear();if(i.isTwoDigitYear){var r=gl(i.year,o);return t.setUTCFullYear(r,0,1),t.setUTCHours(0,0,0,0),t}return t.setUTCFullYear("era"in e&&1!==e.era?1-i.year:i.year,0,1),t.setUTCHours(0,0,0,0),t}}]),e}(),_l=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",130),Rn(En(i),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){var o=function(t){return{year:t,isTwoDigitYear:"YY"===e}};switch(e){case"Y":return cl(pl(4,t),o);case"Yo":return cl(i.ordinalNumber(t,{unit:"year"}),o);default:return cl(pl(e.length,t),o)}}},{key:"validate",value:function(t,e){return e.isTwoDigitYear||e.year>0}},{key:"set",value:function(t,e,i,o){var r=Ma(t,o);if(i.isTwoDigitYear){var s=gl(i.year,r);return t.setUTCFullYear(s,0,o.firstWeekContainsDate),t.setUTCHours(0,0,0,0),Ra(t,o)}return t.setUTCFullYear("era"in e&&1!==e.era?1-i.year:i.year,0,o.firstWeekContainsDate),t.setUTCHours(0,0,0,0),Ra(t,o)}}]),e}(),wl=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",130),Rn(En(i),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),i}return On(e,[{key:"parse",value:function(t,e){return fl("R"===e?4:e.length,t)}},{key:"set",value:function(t,e,i){var o=new Date(0);return o.setUTCFullYear(i,0,4),o.setUTCHours(0,0,0,0),Da(o)}}]),e}(),xl=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",130),Rn(En(i),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),i}return On(e,[{key:"parse",value:function(t,e){return fl("u"===e?4:e.length,t)}},{key:"set",value:function(t,e,i){return t.setUTCFullYear(i,0,1),t.setUTCHours(0,0,0,0),t}}]),e}(),kl=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",120),Rn(En(i),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"Q":case"QQ":return pl(e.length,t);case"Qo":return i.ordinalNumber(t,{unit:"quarter"});case"QQQ":return i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return i.quarter(t,{width:"narrow",context:"formatting"});default:return i.quarter(t,{width:"wide",context:"formatting"})||i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=1&&e<=4}},{key:"set",value:function(t,e,i){return t.setUTCMonth(3*(i-1),1),t.setUTCHours(0,0,0,0),t}}]),e}(),El=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",120),Rn(En(i),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"q":case"qq":return pl(e.length,t);case"qo":return i.ordinalNumber(t,{unit:"quarter"});case"qqq":return i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return i.quarter(t,{width:"narrow",context:"standalone"});default:return i.quarter(t,{width:"wide",context:"standalone"})||i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=1&&e<=4}},{key:"set",value:function(t,e,i){return t.setUTCMonth(3*(i-1),1),t.setUTCHours(0,0,0,0),t}}]),e}(),Al=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),Rn(En(i),"priority",110),i}return On(e,[{key:"parse",value:function(t,e,i){var o=function(t){return t-1};switch(e){case"M":return cl(ul(Ln,t),o);case"MM":return cl(pl(2,t),o);case"Mo":return cl(i.ordinalNumber(t,{unit:"month"}),o);case"MMM":return i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return i.month(t,{width:"narrow",context:"formatting"});default:return i.month(t,{width:"wide",context:"formatting"})||i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,i){return t.setUTCMonth(i,1),t.setUTCHours(0,0,0,0),t}}]),e}(),Sl=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",110),Rn(En(i),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){var o=function(t){return t-1};switch(e){case"L":return cl(ul(Ln,t),o);case"LL":return cl(pl(2,t),o);case"Lo":return cl(i.ordinalNumber(t,{unit:"month"}),o);case"LLL":return i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return i.month(t,{width:"narrow",context:"standalone"});default:return i.month(t,{width:"wide",context:"standalone"})||i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,i){return t.setUTCMonth(i,1),t.setUTCHours(0,0,0,0),t}}]),e}(),Cl=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",100),Rn(En(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"w":return ul(Vn,t);case"wo":return i.ordinalNumber(t,{unit:"week"});default:return pl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=53}},{key:"set",value:function(t,e,i,o){return Ra(function(t,e,i){Aa(2,arguments);var o=Sa(t),r=Ca(e),s=Pa(o,i)-r;return o.setUTCDate(o.getUTCDate()-7*s),o}(t,i,o),o)}}]),e}(),Tl=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",100),Rn(En(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"I":return ul(Vn,t);case"Io":return i.ordinalNumber(t,{unit:"week"});default:return pl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=53}},{key:"set",value:function(t,e,i){return Da(function(t,e){Aa(2,arguments);var i=Sa(t),o=Ca(e),r=za(i)-o;return i.setUTCDate(i.getUTCDate()-7*r),i}(t,i))}}]),e}(),Dl=[31,28,31,30,31,30,31,31,30,31,30,31],Il=[31,29,31,30,31,30,31,31,30,31,30,31],zl=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",90),Rn(En(i),"subPriority",1),Rn(En(i),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"d":return ul(Bn,t);case"do":return i.ordinalNumber(t,{unit:"date"});default:return pl(e.length,t)}}},{key:"validate",value:function(t,e){var i=bl(t.getUTCFullYear()),o=t.getUTCMonth();return i?e>=1&&e<=Il[o]:e>=1&&e<=Dl[o]}},{key:"set",value:function(t,e,i){return t.setUTCDate(i),t.setUTCHours(0,0,0,0),t}}]),e}(),Nl=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",90),Rn(En(i),"subpriority",1),Rn(En(i),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"D":case"DD":return ul(jn,t);case"Do":return i.ordinalNumber(t,{unit:"date"});default:return pl(e.length,t)}}},{key:"validate",value:function(t,e){return bl(t.getUTCFullYear())?e>=1&&e<=366:e>=1&&e<=365}},{key:"set",value:function(t,e,i){return t.setUTCMonth(0,i),t.setUTCHours(0,0,0,0),t}}]),e}();function Ol(t,e,i){var o,r,s,a,n,l,h,c;Aa(2,arguments);var u=Oa(),d=Ca(null!==(o=null!==(r=null!==(s=null!==(a=null==i?void 0:i.weekStartsOn)&&void 0!==a?a:null==i||null===(n=i.locale)||void 0===n||null===(l=n.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==s?s:u.weekStartsOn)&&void 0!==r?r:null===(h=u.locale)||void 0===h||null===(c=h.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==o?o:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=Sa(t),p=Ca(e),f=((p%7+7)%7<d?7:0)+p-m.getUTCDay();return m.setUTCDate(m.getUTCDate()+f),m}var Rl=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",90),Rn(En(i),"incompatibleTokens",["D","i","e","c","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"E":case"EE":case"EEE":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return i.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,i,o){return(t=Ol(t,i,o)).setUTCHours(0,0,0,0),t}}]),e}(),Ml=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",90),Rn(En(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i,o){var r=function(t){var e=7*Math.floor((t-1)/7);return(t+o.weekStartsOn+6)%7+e};switch(e){case"e":case"ee":return cl(pl(e.length,t),r);case"eo":return cl(i.ordinalNumber(t,{unit:"day"}),r);case"eee":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"eeeee":return i.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,i,o){return(t=Ol(t,i,o)).setUTCHours(0,0,0,0),t}}]),e}(),Pl=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",90),Rn(En(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i,o){var r=function(t){var e=7*Math.floor((t-1)/7);return(t+o.weekStartsOn+6)%7+e};switch(e){case"c":case"cc":return cl(pl(e.length,t),r);case"co":return cl(i.ordinalNumber(t,{unit:"day"}),r);case"ccc":return i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});case"ccccc":return i.day(t,{width:"narrow",context:"standalone"});case"cccccc":return i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});default:return i.day(t,{width:"wide",context:"standalone"})||i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,i,o){return(t=Ol(t,i,o)).setUTCHours(0,0,0,0),t}}]),e}(),Gl=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",90),Rn(En(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){var o=function(t){return 0===t?7:t};switch(e){case"i":case"ii":return pl(e.length,t);case"io":return i.ordinalNumber(t,{unit:"day"});case"iii":return cl(i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),o);case"iiiii":return cl(i.day(t,{width:"narrow",context:"formatting"}),o);case"iiiiii":return cl(i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),o);default:return cl(i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),o)}}},{key:"validate",value:function(t,e){return e>=1&&e<=7}},{key:"set",value:function(t,e,i){return t=function(t,e){Aa(2,arguments);var i=Ca(e);i%7==0&&(i-=7);var o=Sa(t),r=((i%7+7)%7<1?7:0)+i-o.getUTCDay();return o.setUTCDate(o.getUTCDate()+r),o}(t,i),t.setUTCHours(0,0,0,0),t}}]),e}(),Fl=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",80),Rn(En(i),"incompatibleTokens",["b","B","H","k","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"a":case"aa":case"aaa":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return i.dayPeriod(t,{width:"narrow",context:"formatting"});default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,i){return t.setUTCHours(vl(i),0,0,0),t}}]),e}(),Ul=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",80),Rn(En(i),"incompatibleTokens",["a","B","H","k","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"b":case"bb":case"bbb":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return i.dayPeriod(t,{width:"narrow",context:"formatting"});default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,i){return t.setUTCHours(vl(i),0,0,0),t}}]),e}(),Ll=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",80),Rn(En(i),"incompatibleTokens",["a","b","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"B":case"BB":case"BBB":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return i.dayPeriod(t,{width:"narrow",context:"formatting"});default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,i){return t.setUTCHours(vl(i),0,0,0),t}}]),e}(),Bl=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",70),Rn(En(i),"incompatibleTokens",["H","K","k","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"h":return ul(Yn,t);case"ho":return i.ordinalNumber(t,{unit:"hour"});default:return pl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=12}},{key:"set",value:function(t,e,i){var o=t.getUTCHours()>=12;return t.setUTCHours(o&&i<12?i+12:o||12!==i?i:0,0,0,0),t}}]),e}(),jl=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",70),Rn(En(i),"incompatibleTokens",["a","b","h","K","k","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"H":return ul(qn,t);case"Ho":return i.ordinalNumber(t,{unit:"hour"});default:return pl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=23}},{key:"set",value:function(t,e,i){return t.setUTCHours(i,0,0,0),t}}]),e}(),Vl=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",70),Rn(En(i),"incompatibleTokens",["h","H","k","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"K":return ul(Hn,t);case"Ko":return i.ordinalNumber(t,{unit:"hour"});default:return pl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,i){var o=t.getUTCHours()>=12;return t.setUTCHours(o&&i<12?i+12:i,0,0,0),t}}]),e}(),ql=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",70),Rn(En(i),"incompatibleTokens",["a","b","h","H","K","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"k":return ul(Wn,t);case"ko":return i.ordinalNumber(t,{unit:"hour"});default:return pl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=24}},{key:"set",value:function(t,e,i){return t.setUTCHours(i<=24?i%24:i,0,0,0),t}}]),e}(),Wl=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",60),Rn(En(i),"incompatibleTokens",["t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"m":return ul(Kn,t);case"mo":return i.ordinalNumber(t,{unit:"minute"});default:return pl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=59}},{key:"set",value:function(t,e,i){return t.setUTCMinutes(i,0,0),t}}]),e}(),Hl=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",50),Rn(En(i),"incompatibleTokens",["t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"s":return ul(Xn,t);case"so":return i.ordinalNumber(t,{unit:"second"});default:return pl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=59}},{key:"set",value:function(t,e,i){return t.setUTCSeconds(i,0),t}}]),e}(),Yl=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",30),Rn(En(i),"incompatibleTokens",["t","T"]),i}return On(e,[{key:"parse",value:function(t,e){return cl(pl(e.length,t),(function(t){return Math.floor(t*Math.pow(10,3-e.length))}))}},{key:"set",value:function(t,e,i){return t.setUTCMilliseconds(i),t}}]),e}(),Kl=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",10),Rn(En(i),"incompatibleTokens",["t","T","x"]),i}return On(e,[{key:"parse",value:function(t,e){switch(e){case"X":return dl(sl,t);case"XX":return dl(al,t);case"XXXX":return dl(nl,t);case"XXXXX":return dl(hl,t);default:return dl(ll,t)}}},{key:"set",value:function(t,e,i){return e.timestampIsSet?t:new Date(t.getTime()-i)}}]),e}(),Xl=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",10),Rn(En(i),"incompatibleTokens",["t","T","X"]),i}return On(e,[{key:"parse",value:function(t,e){switch(e){case"x":return dl(sl,t);case"xx":return dl(al,t);case"xxxx":return dl(nl,t);case"xxxxx":return dl(hl,t);default:return dl(ll,t)}}},{key:"set",value:function(t,e,i){return e.timestampIsSet?t:new Date(t.getTime()-i)}}]),e}(),Zl=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",40),Rn(En(i),"incompatibleTokens","*"),i}return On(e,[{key:"parse",value:function(t){return ml(t)}},{key:"set",value:function(t,e,i){return[new Date(1e3*i),{timestampIsSet:!0}]}}]),e}(),Jl=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",20),Rn(En(i),"incompatibleTokens","*"),i}return On(e,[{key:"parse",value:function(t){return ml(t)}},{key:"set",value:function(t,e,i){return[new Date(i),{timestampIsSet:!0}]}}]),e}(),Ql={G:new Un,y:new yl,Y:new _l,R:new wl,u:new xl,Q:new kl,q:new El,M:new Al,L:new Sl,w:new Cl,I:new Tl,d:new zl,D:new Nl,E:new Rl,e:new Ml,c:new Pl,i:new Gl,a:new Fl,b:new Ul,B:new Ll,h:new Bl,H:new jl,K:new Vl,k:new ql,m:new Wl,s:new Hl,S:new Yl,X:new Kl,x:new Xl,t:new Zl,T:new Jl},$l=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,th=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,eh=/^'([^]*?)'?$/,ih=/''/g,oh=/\S/,rh=/[a-zA-Z]/;function sh(t,e,i,o){var r,s,a,n,l,h,c,u,d,m,p,f,v,g,b,y,_,w;Aa(3,arguments);var x=String(t),k=String(e),E=Oa(),A=null!==(r=null!==(s=null==o?void 0:o.locale)&&void 0!==s?s:E.locale)&&void 0!==r?r:pn;if(!A.match)throw new RangeError("locale must contain match property");var S=Ca(null!==(a=null!==(n=null!==(l=null!==(h=null==o?void 0:o.firstWeekContainsDate)&&void 0!==h?h:null==o||null===(c=o.locale)||void 0===c||null===(u=c.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==l?l:E.firstWeekContainsDate)&&void 0!==n?n:null===(d=E.locale)||void 0===d||null===(m=d.options)||void 0===m?void 0:m.firstWeekContainsDate)&&void 0!==a?a:1);if(!(S>=1&&S<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var C=Ca(null!==(p=null!==(f=null!==(v=null!==(g=null==o?void 0:o.weekStartsOn)&&void 0!==g?g:null==o||null===(b=o.locale)||void 0===b||null===(y=b.options)||void 0===y?void 0:y.weekStartsOn)&&void 0!==v?v:E.weekStartsOn)&&void 0!==f?f:null===(_=E.locale)||void 0===_||null===(w=_.options)||void 0===w?void 0:w.weekStartsOn)&&void 0!==p?p:0);if(!(C>=0&&C<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===k)return""===x?Sa(i):new Date(NaN);var T,D={firstWeekContainsDate:S,weekStartsOn:C,locale:A},I=[new Gn],z=k.match(th).map((function(t){var e=t[0];return e in $a?(0,$a[e])(t,A.formatLong):t})).join("").match($l),N=[],O=xn(z);try{var R=function(){var e=T.value;null!=o&&o.useAdditionalWeekYearTokens||!sn(e)||an(e,k,t),null!=o&&o.useAdditionalDayOfYearTokens||!rn(e)||an(e,k,t);var i=e[0],r=Ql[i];if(r){var s=r.incompatibleTokens;if(Array.isArray(s)){var a=N.find((function(t){return s.includes(t.token)||t.token===i}));if(a)throw new RangeError("The format string mustn't contain `".concat(a.fullToken,"` and `").concat(e,"` at the same time"))}else if("*"===r.incompatibleTokens&&N.length>0)throw new RangeError("The format string mustn't contain `".concat(e,"` and any other token at the same time"));N.push({token:i,fullToken:e});var n=r.run(x,e,A.match,D);if(!n)return{v:new Date(NaN)};I.push(n.setter),x=n.rest}else{if(i.match(rh))throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");if("''"===e?e="'":"'"===i&&(e=e.match(eh)[1].replace(ih,"'")),0!==x.indexOf(e))return{v:new Date(NaN)};x=x.slice(e.length)}};for(O.s();!(T=O.n()).done;){var M=R();if("object"===Ea(M))return M.v}}catch(t){O.e(t)}finally{O.f()}if(x.length>0&&oh.test(x))return new Date(NaN);var P=I.map((function(t){return t.priority})).sort((function(t,e){return e-t})).filter((function(t,e,i){return i.indexOf(t)===e})).map((function(t){return I.filter((function(e){return e.priority===t})).sort((function(t,e){return e.subPriority-t.subPriority}))})).map((function(t){return t[0]})),G=Sa(i);if(isNaN(G.getTime()))return new Date(NaN);var F,U=Ta(G,tn(G)),L={},B=xn(P);try{for(B.s();!(F=B.n()).done;){var j=F.value;if(!j.validate(U,D))return new Date(NaN);var V=j.set(U,L,D);Array.isArray(V)?(U=V[0],kn(L,V[1])):U=V}}catch(t){B.e(t)}finally{B.f()}return U}function ah(t,e){Aa(2,arguments);var i=Sa(t),o=Sa(e);return i.getTime()>o.getTime()}function nh(t,e){Aa(2,arguments);var i=Sa(t),o=Sa(e);return i.getTime()<o.getTime()}const lh=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.touched=!1,this.formatDate=t=>{const{year:e,month:i,day:o}=t;return _n(new Date(e,i,o),this.dateFormat||"yyyy-MM-dd")},this.parseDate=t=>{const e=sh(t,this.dateFormat||"yyyy-MM-dd",new Date);return{year:e.getFullYear(),month:e.getMonth(),day:e.getDate()}},this.handleBlur=()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.validation=void 0,this.defaultValue=void 0,this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.dateFormat=void 0,this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}connectedCallback(){var t,e;this.minDate=sh((null===(t=this.validation.min)||void 0===t?void 0:t.toString())||"","yyyy-MM-dd",new Date),this.maxDate=sh((null===(e=this.validation.max)||void 0===e?void 0:e.toString())||"","yyyy-MM-dd",new Date)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.datePicker=this.element.shadowRoot.querySelector("vaadin-date-picker"),this.inputReference=this.element.shadowRoot.querySelector("input"),this.datePicker.i18n=Object.assign(Object.assign({},this.datePicker.i18n),{formatDate:this.formatDate,parseDate:this.parseDate}),this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}handleInput(t){this.value=t.target.value,this.touched=!0,this.valueAsDate=sh(this.value||"","yyyy-MM-dd",new Date),this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}setValidity(){return!nh(this.valueAsDate,this.minDate)&&!ah(this.valueAsDate,this.maxDate)&&this.inputReference.validity.valid}setErrorMessage(){return nh(this.valueAsDate,this.minDate)||ah(this.valueAsDate,this.maxDate)?a("dateError2",this.language):this.inputReference.validity.rangeUnderflow||this.inputReference.validity.rangeOverflow?a("dateError",this.language,{values:{min:this.validation.min,max:this.validation.max}}):this.inputReference.validity.valueMissing?a("requiredError",this.language):void 0}renderTooltip(){return this.showTooltip?i("div",{class:"date__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"7fd02e4a0be8222ba408a59b5a32384a7ae979ae",class:`date__wrapper ${this.autofilled?"date__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("label",{key:"8a9d7390bcee99105d65d406d86d6be997a333ad",class:`date__label ${this.validation.mandatory?"date__label--required":""}}`,htmlFor:`${this.name}__input`},this.displayName," ",this.validation.mandatory?"*":""),i("vaadin-date-picker",{key:"b8640a92030fde948dae7a4698d0937e701b720c",id:`${this.name}__input`,type:"date",class:`date__input ${t}`,value:this.defaultValue,readOnly:this.autofilled,placeholder:`${this.placeholder}`,required:this.validation.mandatory,max:this.validation.max,min:this.validation.min,onChange:t=>this.handleInput(t),onBlur:this.handleBlur}),i("small",{key:"45585438da48ddaf16c7301059d1e50b63e56a95",class:"date__error-message"},this.errorMessage),this.tooltip&&i("img",{key:"4195a881e57441fd9faee6411760715e1cac12f5",class:"date__tooltip-icon",src:n,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())}get element(){return o(this)}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};lh.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.date{font-family:"Roboto";font-style:normal}.date__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px;height:100%}.date__wrapper--autofilled{pointer-events:none}.date__wrapper--autofilled .date__label{color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.date__wrapper--autofilled .date__input::part(input-field){color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.date__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.date__label--required::after{content:"*";font-family:inherit;color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));margin-left:2px}.date__input{border:none;width:inherit;position:relative}.date__input[focused]::part(input-field){border-color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.date__input[invalid]::part(input-field){border:1px solid var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.date__input::part(input-field){border-radius:4px;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));font-family:inherit;font-style:normal;font-size:16px;font-weight:300;line-height:1.5;padding:0;height:44px}.date__input>input{padding:5px 15px}.date__input::part(toggle-button){position:relative;right:10px}.date__error-message{position:absolute;top:calc(100% + 5px);left:0;color:rgba(204, 0, 0, 0.7019607843)}.date__tooltip-icon{position:absolute;right:0;bottom:10px}.date__tooltip{position:absolute;bottom:35px;right:10px;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.date__tooltip.visible{opacity:1}';const hh=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.validationPattern="",this.touched=!1,this.handleInput=t=>{this.value=t.target.value,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleBlur=()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.validation=void 0,this.defaultValue=void 0,this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.isDuplicateInput=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}valueChangedHandler(t){this.isDuplicateInput&&this.name===t.detail.name+"Duplicate"&&(this.duplicateInputValue=t.detail.value)}connectedCallback(){this.validationPattern=this.setPattern()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}setValidity(){return this.inputReference.validity.valid}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e,i,o;if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,o=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return a(`${i}`,this.language)?a(`${i}`,this.language):o}if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return a("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(this.inputReference.validity.valueMissing)return a("requiredError",this.language);if(this.isDuplicateInput&&this.duplicateInputValue!==this.value){const t=null===(i=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===i?void 0:i.errorKey,e=null===(o=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===o?void 0:o.errorMessage;return a(`${t}`,this.language)?a(`${t}`,this.language):e}}renderTooltip(){return this.showTooltip?i("div",{class:"email__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"23ac67984ab7a0f4db01e5fe01f4f326b4c6a912",class:`email__wrapper ${this.autofilled?"number__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"aa2405e435aea20f1678dd74776a8ce4094bc95b",class:"email__wrapper--flex"},i("label",{key:"970b83bbcf082d1721c1647993fecd076939b65d",class:"email__label "+(this.validation.mandatory?"email__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"2f03eaf161aab9b45282c1bc0de15bea8455427c",class:"email__wrapper--relative"},this.tooltip&&i("img",{key:"3c34b91f0b478cf04f5aabc5fdd33a8ed73d091b",class:"email__tooltip-icon",src:n,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("input",{key:"491f83c0f562893c02e3425b4d54eecc214e3c95",id:`${this.name}__input`,type:"email",class:`email__input ${t}`,value:this.defaultValue,readOnly:this.autofilled,placeholder:`${this.placeholder}`,ref:t=>this.inputReference=t,pattern:this.validationPattern,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,onInput:this.handleInput,onBlur:this.handleBlur}),i("small",{key:"edb6660d958cc5d0cb41b0db195bd7e847ecbefe",class:"email__error-message"},this.errorMessage))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};hh.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.email{font-family:"Roboto";font-style:normal}.email__wrapper{position:relative;width:100%}.email__wrapper--autofilled{pointer-events:none}.email__wrapper--autofilled .email__label{color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.email__wrapper--autofilled .email__input{color:var(--emfe-w-color-black, #000000)}.email__wrapper--flex{display:flex;gap:5px}.email__wrapper--relative{position:relative}.email__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.email__label--required::after{content:"*";font-family:inherit;color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));margin-left:2px}.email__input{font-family:inherit;border-radius:4px;width:100%;height:40px;border:2px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-color-black, #000000);border-radius:5px;box-sizing:border-box;font-size:16px;font-weight:300;line-height:1.5;padding:10px}.email__input:focus{outline-color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.email__input--invalid{border:1px solid var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.email__input::placeholder{color:var(--emfe-w-color-gray-150, #828282)}.email__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.email__tooltip-icon{width:16px;height:auto}.email__tooltip{position:absolute;top:0;left:20px;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.email__tooltip.visible{opacity:1}';const ch=class{constructor(e){t(this,e),this.handleClick=t=>{this.emitOnClick&&(t.stopPropagation(),window.postMessage({type:`registration${this.name}Clicked`},window.location.href))},this.type="text",this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.action=void 0,this.validation=void 0,this.options=void 0,this.language=void 0,this.autofilled=void 0,this.tooltip=void 0,this.defaultValue=void 0,this.emitValue=void 0,this.isDuplicateInput=void 0,this.clientStyling="",this.dateFormat=void 0,this.translationUrl="",this.emitOnClick=!1}connectedCallback(){var t;this.translationUrl&&(t=this.translationUrl,new Promise((e=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{for(let i in t[e])s[e][i]=t[e][i]})),e(!0)}))})))}renderInput(){var t;switch(null===(t=this.type)||void 0===t?void 0:t.toLowerCase()){case"text":return i("text-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,isDuplicateInput:this.isDuplicateInput,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"email":return i("email-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,isDuplicateInput:this.isDuplicateInput,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"number":return i("number-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"checkbox":return i("checkbox-input",{name:this.name,displayName:this.displayName,validation:this.validation,emitValue:this.emitValue,defaultValue:this.defaultValue,autofilled:this.autofilled,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip});case"checkboxgroup":return i("checkbox-group-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,options:this.options});case"togglecheckbox":return i("toggle-checkbox-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,options:this.options,"emit-on-click":this.emitOnClick});case"datetime":return i("date-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder,dateFormat:this.dateFormat});case"password":return i("password-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,isDuplicateInput:this.isDuplicateInput,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"radio":return i("radio-input",{name:this.name,displayName:this.displayName,optionsGroup:this.options,validation:this.validation,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling});case"tel":return i("tel-input",{name:this.name,action:this.action,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,emitValue:this.emitValue,language:this.language,autofilled:this.autofilled,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"dropdown":return i("select-input",{name:this.name,action:this.action,defaultValue:this.defaultValue,displayName:this.displayName,options:this.options,validation:this.validation,emitValue:this.emitValue,autofilled:this.autofilled,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});default:return i("p",null,"The ",this.type," input type is not valid")}}render(){return i(r,{key:"00fe51389e06cbdc9225d3246bc6c629d4cf15d8",class:`general-input--${this.name}`,onClick:this.handleClick},this.renderInput())}};ch.style=":host{display:block;height:100%}";const uh={en:{GmErr_AMOUNT_INVALID:"The specified amount is invalid.",GmErr_REGISTER_OVERAGE:"The registration has exceeded the allowable limit.",GmErr_REGISTER_UNDERAGE:"The registration is under the allowable limit.",GmErr_USER_AUTH_FAILED_TOO_MANY_ATTEMPTS:"User authentication failed due to too many unsuccessful attempts.",GmErr_USER_ACCOUNT_BLOCKED:"The user account is blocked.",GmErr_USER_NOT_VERIFIED:"The user has not been verified.",GmErr_USER_NOT_FOUND:"No user found with the provided information.",GmErr_USER_ID_INVALID:"The user ID provided is invalid.",GmErr_USER_AUTH_FAILED:"User authentication failed.",GmErr_USER_DUPLICATED:"The user already exists in the system.",GmErr_USER_NOT_ACTIVATED:"The user account has not been activated.",GmErr_PASSWORD_CONTAINS_EMAIL:"The password cannot contain the email address.",GmErr_PASSWORD_CONTAINS_USERNAME:"The password cannot contain the username.",GmErr_PASSWORD_CONTAINS_SPACES:"The password cannot contain spaces.",GmErr_USER_4TS_CHECK_EXISTS:"The user 4TS check already exists.",GmErr_USER_NAV_EXCLUDED_REGISTRATION:"The user is excluded from registration.",GmErr_USER_NAV_EXCLUDED_LOGIN:"The user is excluded from login.",GmErr_USERNAME_REQUIRED:"A username is required.",GmErr_USER_EMAIL_NOT_VERIFIED:"The user's email address has not been verified.",GmErr_EMAIL_REQUIRED:"An email address is required.",GmErr_USERNAME_ALREADY_EXISTS:"The username is already taken.",GmErr_DUPLICATE_PERSONAL_ID:"Duplicate personal ID found.",GmErr_INVALID_USER_DOCUMENT:"The user document is invalid.",GmErr_INVALID_CODE:"The code provided is invalid.",GmErr_EXPIRED_TOKEN:"The token has expired.",GmErr_ATTEMPTS_EXCEEDED:"The maximum number of attempts has been exceeded.",GmErr_BLOCK_USER_INCORRECT_CODE:"The user has been blocked due to an incorrect code.",GmErr_TOKEN_NOT_FOUND:"The token was not found.",GmErr_INVALID_PHONE_NUMBER:"The phone number provided is invalid.",GmErr_CODE_MISSING:"The code is missing.",GmErr_UNREGISTERED_USER:"The user is not registered.",GmErr_ATTEMPTS_TO_GENERATE_CODE_EXCEEDED:"Maximum attempts to generate a code have been exceeded.",GmErr_UNEXPECTED_EXCEPTION:"An unexpected exception occurred.",GmErr_INVALID_USER_ID:"The user ID provided is invalid.",GmErr_NOT_ALLOWED_EXCEPTION:"This action is not allowed.",GmErr_CAN_NOT_FIND_ROLE:"Unable to find the specified role.",GmErr_NO_SESSION_PROVIDED:"No session was provided.",GmErr_NO_ACTIVE_SESSION_FOUND_FOR_THIS_USER:"No active session found for this user.",GmErr_USER_HAS_ALREADY_BEEN_ANONYMIZED:"The user has already been anonymized.",GmErr_NO_ROLE_HAS_BEEN_SET_UP_TO_BE_ASSIGNED:"No role has been set up to be assigned.",GmErr_PROVIDED_SESSION_DOES_NOT_BELONG_TO_THE_USER:"The provided session does not belong to the user.",GmErr_PROVIDED_SESSION_DOES_NOT_EXIST:"The provided session does not exist.",GmErr_ROLE_ALREADY_ASSIGNED_FOR_USER:"The role has already been assigned to the user.",GmErr_ASSIGN_USER_ROLE_FAILED:"Failed to assign a role to the user.",nextButton:"Next",backButton:"Back",doneButton:"Done",generalError:"Something went wrong... Please try again.",successMessage:"Register successful"},hu:{GmErr_AMOUNT_INVALID:"A megadott összeg érvénytelen.",GmErr_REGISTER_OVERAGE:"A regisztráció túllépte a megengedett határt.",GmErr_REGISTER_UNDERAGE:"A regisztráció a megengedett határ alatt van.",GmErr_USER_AUTH_FAILED_TOO_MANY_ATTEMPTS:"A felhasználó hitelesítése túl sok sikertelen próbálkozás miatt meghiúsult.",GmErr_USER_ACCOUNT_BLOCKED:"A felhasználói fiók le van tiltva.",GmErr_USER_NOT_VERIFIED:"A felhasználó nincs ellenőrizve.",GmErr_USER_NOT_FOUND:"A megadott adatokkal nem található felhasználó.",GmErr_USER_ID_INVALID:"A megadott felhasználói azonosító érvénytelen.",GmErr_USER_AUTH_FAILED:"A felhasználó hitelesítése meghiúsult.",GmErr_USER_DUPLICATED:"A felhasználó már létezik a rendszerben.",GmErr_USER_NOT_ACTIVATED:"A felhasználó fiókja nincs aktiválva.",GmErr_PASSWORD_CONTAINS_EMAIL:"A jelszó nem tartalmazhat e-mail címet.",GmErr_PASSWORD_CONTAINS_USERNAME:"A jelszó nem tartalmazhat felhasználónevet.",GmErr_PASSWORD_CONTAINS_SPACES:"A jelszó nem tartalmazhat szóközöket.",GmErr_USER_4TS_CHECK_EXISTS:"A felhasználó 4TS ellenőrzése már létezik.",GmErr_USER_NAV_EXCLUDED_REGISTRATION:"A felhasználó kizárva a regisztrációból.",GmErr_USER_NAV_EXCLUDED_LOGIN:"A felhasználó kizárva a bejelentkezésből.",GmErr_USERNAME_REQUIRED:"Felhasználónév megadása szükséges.",GmErr_USER_EMAIL_NOT_VERIFIED:"A felhasználó e-mail címe nincs megerősítve.",GmErr_EMAIL_REQUIRED:"E-mail cím megadása szükséges.",GmErr_USERNAME_ALREADY_EXISTS:"A felhasználónév már foglalt.",GmErr_DUPLICATE_PERSONAL_ID:"Már létező személyes azonosító.",GmErr_INVALID_USER_DOCUMENT:"A felhasználói dokumentum érvénytelen.",GmErr_INVALID_CODE:"A megadott kód érvénytelen.",GmErr_EXPIRED_TOKEN:"A token lejárt.",GmErr_ATTEMPTS_EXCEEDED:"A megengedett próbálkozások száma túllépve.",GmErr_BLOCK_USER_INCORRECT_CODE:"A felhasználó blokkolva lett a hibás kód miatt.",GmErr_TOKEN_NOT_FOUND:"A token nem található.",GmErr_INVALID_PHONE_NUMBER:"A megadott telefonszám érvénytelen.",GmErr_CODE_MISSING:"A szükséges kód hiányzik.",GmErr_UNREGISTERED_USER:"A felhasználó nincs regisztrálva.",GmErr_ATTEMPTS_TO_GENERATE_CODE_EXCEEDED:"Túllépték a kódgenerálási próbálkozások számát.",GmErr_UNEXPECTED_EXCEPTION:"Váratlan kivétel történt.",GmErr_INVALID_USER_ID:"A felhasználói azonosító érvénytelen.",GmErr_NOT_ALLOWED_EXCEPTION:"Ez a művelet nem engedélyezett.",GmErr_CAN_NOT_FIND_ROLE:"A megadott szerepkör nem található.",GmErr_NO_SESSION_PROVIDED:"Nem került megadásra munkamenet.",GmErr_NO_ACTIVE_SESSION_FOUND_FOR_THIS_USER:"Nincs aktív munkamenet ehhez a felhasználóhoz.",GmErr_USER_HAS_ALREADY_BEEN_ANONYMIZED:"A felhasználó már anonimizálva lett.",GmErr_NO_ROLE_HAS_BEEN_SET_UP_TO_BE_ASSIGNED:"Nincs beállítva hozzárendelhető szerepkör.",GmErr_PROVIDED_SESSION_DOES_NOT_BELONG_TO_THE_USER:"A megadott munkamenet nem tartozik a felhasználóhoz.",GmErr_PROVIDED_SESSION_DOES_NOT_EXIST:"A megadott munkamenet nem létezik.",GmErr_ROLE_ALREADY_ASSIGNED_FOR_USER:"A szerepkör már hozzá lett rendelve a felhasználóhoz.",GmErr_ASSIGN_USER_ROLE_FAILED:"Nem sikerült a felhasználói szerepkört hozzárendelni.",nextButton:"Következő",backButton:"Vissza",doneButton:"Kész",generalError:"Valami hiba történt... Próbáld újra.",successMessage:"Sikeres regisztráció"},hr:{GmErr_AMOUNT_INVALID:"Navedeni iznos je nevažeći.",GmErr_REGISTER_OVERAGE:"Registracija je premašila dopušteni limit.",GmErr_REGISTER_UNDERAGE:"Registracija je ispod dopuštenog limita.",GmErr_USER_AUTH_FAILED_TOO_MANY_ATTEMPTS:"Neuspješno autentificiranje korisnika zbog previše pokušaja.",GmErr_USER_ACCOUNT_BLOCKED:"Korisnički račun je blokiran.",GmErr_USER_NOT_VERIFIED:"Korisnik nije verificiran.",GmErr_USER_NOT_FOUND:"Korisnik s navedenim podacima nije pronađen.",GmErr_USER_ID_INVALID:"Navedeni ID korisnika je nevažeći.",GmErr_USER_AUTH_FAILED:"Neuspješno autentificiranje korisnika.",GmErr_USER_DUPLICATED:"Korisnik već postoji u sustavu.",GmErr_USER_NOT_ACTIVATED:"Korisnički račun nije aktiviran.",GmErr_PASSWORD_CONTAINS_EMAIL:"Lozinka ne smije sadržavati e-mail adresu.",GmErr_PASSWORD_CONTAINS_USERNAME:"Lozinka ne smije sadržavati korisničko ime.",GmErr_PASSWORD_CONTAINS_SPACES:"Lozinka ne smije sadržavati razmake.",GmErr_USER_4TS_CHECK_EXISTS:"4TS provjera korisnika već postoji.",GmErr_USER_NAV_EXCLUDED_REGISTRATION:"Korisnik je isključen iz registracije.",GmErr_USER_NAV_EXCLUDED_LOGIN:"Korisnik je isključen iz prijave.",GmErr_USERNAME_REQUIRED:"Korisničko ime je obavezno.",GmErr_USER_EMAIL_NOT_VERIFIED:"E-mail adresa korisnika nije verificirana.",GmErr_EMAIL_REQUIRED:"E-mail adresa je obavezna.",GmErr_USERNAME_ALREADY_EXISTS:"Korisničko ime je već zauzeto.",GmErr_DUPLICATE_PERSONAL_ID:"Pronađen je duplicirani osobni ID.",GmErr_INVALID_USER_DOCUMENT:"Dokument korisnika je nevažeći.",GmErr_INVALID_CODE:"Navedeni kod je nevažeći.",GmErr_EXPIRED_TOKEN:"Token je istekao.",GmErr_ATTEMPTS_EXCEEDED:"Prekoračen je maksimalni broj pokušaja.",GmErr_BLOCK_USER_INCORRECT_CODE:"Korisnik je blokiran zbog pogrešnog koda.",GmErr_TOKEN_NOT_FOUND:"Token nije pronađen.",GmErr_INVALID_PHONE_NUMBER:"Navedeni broj telefona je nevažeći.",GmErr_CODE_MISSING:"Nedostaje potrebni kod.",GmErr_UNREGISTERED_USER:"Korisnik nije registriran.",GmErr_ATTEMPTS_TO_GENERATE_CODE_EXCEEDED:"Prekoračen je broj pokušaja generiranja koda.",GmErr_UNEXPECTED_EXCEPTION:"Došlo je do neočekivane iznimke.",GmErr_INVALID_USER_ID:"Navedeni ID korisnika je nevažeći.",GmErr_NOT_ALLOWED_EXCEPTION:"Ova radnja nije dopuštena.",GmErr_CAN_NOT_FIND_ROLE:"Navedena uloga nije pronađena.",GmErr_NO_SESSION_PROVIDED:"Nema pružene sesije.",GmErr_NO_ACTIVE_SESSION_FOUND_FOR_THIS_USER:"Nema aktivne sesije za ovog korisnika.",GmErr_USER_HAS_ALREADY_BEEN_ANONYMIZED:"Korisnik je već anonimiziran.",GmErr_NO_ROLE_HAS_BEEN_SET_UP_TO_BE_ASSIGNED:"Nema postavljene uloge za dodjeljivanje.",GmErr_PROVIDED_SESSION_DOES_NOT_BELONG_TO_THE_USER:"Pružena sesija ne pripada korisniku.",GmErr_PROVIDED_SESSION_DOES_NOT_EXIST:"Pružena sesija ne postoji.",GmErr_ROLE_ALREADY_ASSIGNED_FOR_USER:"Uloga je već dodijeljena korisniku.",GmErr_ASSIGN_USER_ROLE_FAILED:"Neuspješno dodjeljivanje uloge korisniku.",nextButton:"Sljedeće",backButton:"Nazad",doneButton:"Gotovo",generalError:"Korisnik s ovim podacima već postoji.",successMessage:"Register successful"},"pt-br":{GmErr_AMOUNT_INVALID:"O valor especificado é inválido.",GmErr_REGISTER_OVERAGE:"A inscrição excedeu o limite permitido.",GmErr_REGISTER_UNDERAGE:"A inscrição está abaixo do limite permitido.",GmErr_USER_AUTH_FAILED_TOO_MANY_ATTEMPTS:"Falha na autenticação do usuário devido a muitas tentativas sem sucesso.",GmErr_USER_ACCOUNT_BLOCKED:"A conta do usuário está bloqueada.",GmErr_USER_NOT_VERIFIED:"O usuário não foi verificado.",GmErr_USER_NOT_FOUND:"Nenhum usuário encontrado com as informações fornecidas.",GmErr_USER_ID_INVALID:"O ID do usuário fornecido é inválido.",GmErr_USER_AUTH_FAILED:"Falha na autenticação do usuário.",GmErr_USER_DUPLICATED:"O usuário já existe no sistema.",GmErr_USER_NOT_ACTIVATED:"A conta do usuário não está ativada.",GmErr_PASSWORD_CONTAINS_EMAIL:"A senha não pode conter o endereço de e-mail.",GmErr_PASSWORD_CONTAINS_USERNAME:"A senha não pode conter o nome de usuário.",GmErr_PASSWORD_CONTAINS_SPACES:"A senha não pode conter espaços.",GmErr_USER_4TS_CHECK_EXISTS:"A verificação 4TS do usuário já existe.",GmErr_USER_NAV_EXCLUDED_REGISTRATION:"O usuário está excluído da inscrição.",GmErr_USER_NAV_EXCLUDED_LOGIN:"O usuário está excluído do login.",GmErr_USERNAME_REQUIRED:"O nome de usuário é obrigatório.",GmErr_USER_EMAIL_NOT_VERIFIED:"O e-mail do usuário não foi verificado.",GmErr_EMAIL_REQUIRED:"Um endereço de e-mail é obrigatório.",GmErr_USERNAME_ALREADY_EXISTS:"O nome de usuário já está em uso.",GmErr_DUPLICATE_PERSONAL_ID:"ID pessoal duplicado encontrado.",GmErr_INVALID_USER_DOCUMENT:"O documento do usuário é inválido.",GmErr_INVALID_CODE:"O código fornecido é inválido.",GmErr_EXPIRED_TOKEN:"O token expirou.",GmErr_ATTEMPTS_EXCEEDED:"O número máximo de tentativas foi excedido.",GmErr_BLOCK_USER_INCORRECT_CODE:"O usuário foi bloqueado devido a um código incorreto.",GmErr_TOKEN_NOT_FOUND:"O token não foi encontrado.",GmErr_INVALID_PHONE_NUMBER:"O número de telefone fornecido é inválido.",GmErr_CODE_MISSING:"O código necessário está faltando.",GmErr_UNREGISTERED_USER:"O usuário não está registrado.",GmErr_ATTEMPTS_TO_GENERATE_CODE_EXCEEDED:"O número máximo de tentativas para gerar um código foi excedido.",GmErr_UNEXPECTED_EXCEPTION:"Ocorreu uma exceção inesperada.",GmErr_INVALID_USER_ID:"O ID do usuário fornecido é inválido.",GmErr_NOT_ALLOWED_EXCEPTION:"Esta ação não é permitida.",GmErr_CAN_NOT_FIND_ROLE:"Não foi possível encontrar a função especificada.",GmErr_NO_SESSION_PROVIDED:"Nenhuma sessão foi fornecida.",GmErr_NO_ACTIVE_SESSION_FOUND_FOR_THIS_USER:"Nenhuma sessão ativa encontrada para este usuário.",GmErr_USER_HAS_ALREADY_BEEN_ANONYMIZED:"O usuário já foi anonimizado.",GmErr_NO_ROLE_HAS_BEEN_SET_UP_TO_BE_ASSIGNED:"Nenhuma função foi configurada para ser atribuída.",GmErr_PROVIDED_SESSION_DOES_NOT_BELONG_TO_THE_USER:"A sessão fornecida não pertence ao usuário.",GmErr_PROVIDED_SESSION_DOES_NOT_EXIST:"A sessão fornecida não existe.",GmErr_ROLE_ALREADY_ASSIGNED_FOR_USER:"A função já foi atribuída ao usuário.",GmErr_ASSIGN_USER_ROLE_FAILED:"Falha ao atribuir a função ao usuário.",nextButton:"Seguindo",backButton:"Voltar",doneButton:"Terminar",generalError:"Alguma coisa deu errado. Por favor tente outra vez",successMessage:"Registro bem-sucedido"},"es-mx":{GmErr_AMOUNT_INVALID:"El monto especificado es inválido.",GmErr_REGISTER_OVERAGE:"La inscripción ha excedido el límite permitido.",GmErr_REGISTER_UNDERAGE:"La inscripción está por debajo del límite permitido.",GmErr_USER_AUTH_FAILED_TOO_MANY_ATTEMPTS:"Autenticación de usuario fallida debido a demasiados intentos fallidos.",GmErr_USER_ACCOUNT_BLOCKED:"La cuenta del usuario está bloqueada.",GmErr_USER_NOT_VERIFIED:"El usuario no ha sido verificado.",GmErr_USER_NOT_FOUND:"No se encontró ningún usuario con la información proporcionada.",GmErr_USER_ID_INVALID:"El ID de usuario proporcionado es inválido.",GmErr_USER_AUTH_FAILED:"La autenticación del usuario falló.",GmErr_USER_DUPLICATED:"El usuario ya existe en el sistema.",GmErr_USER_NOT_ACTIVATED:"La cuenta del usuario no está activada.",GmErr_PASSWORD_CONTAINS_EMAIL:"La contraseña no puede contener la dirección de correo electrónico.",GmErr_PASSWORD_CONTAINS_USERNAME:"La contraseña no puede contener el nombre de usuario.",GmErr_PASSWORD_CONTAINS_SPACES:"La contraseña no puede contener espacios.",GmErr_USER_4TS_CHECK_EXISTS:"La verificación 4TS del usuario ya existe.",GmErr_USER_NAV_EXCLUDED_REGISTRATION:"El usuario está excluido del registro.",GmErr_USER_NAV_EXCLUDED_LOGIN:"El usuario está excluido del inicio de sesión.",GmErr_USERNAME_REQUIRED:"Se requiere un nombre de usuario.",GmErr_USER_EMAIL_NOT_VERIFIED:"La dirección de correo electrónico del usuario no ha sido verificada.",GmErr_EMAIL_REQUIRED:"Se requiere una dirección de correo electrónico.",GmErr_USERNAME_ALREADY_EXISTS:"El nombre de usuario ya está en uso.",GmErr_DUPLICATE_PERSONAL_ID:"Se encontró un ID personal duplicado.",GmErr_INVALID_USER_DOCUMENT:"El documento del usuario es inválido.",GmErr_INVALID_CODE:"El código proporcionado es inválido.",GmErr_EXPIRED_TOKEN:"El token ha expirado.",GmErr_ATTEMPTS_EXCEEDED:"Se ha excedido el número máximo de intentos.",GmErr_BLOCK_USER_INCORRECT_CODE:"El usuario ha sido bloqueado debido a un código incorrecto.",GmErr_TOKEN_NOT_FOUND:"No se encontró el token.",GmErr_INVALID_PHONE_NUMBER:"El número de teléfono proporcionado es inválido.",GmErr_CODE_MISSING:"Falta el código necesario.",GmErr_UNREGISTERED_USER:"El usuario no está registrado.",GmErr_ATTEMPTS_TO_GENERATE_CODE_EXCEEDED:"Se ha excedido el número máximo de intentos para generar un código.",GmErr_UNEXPECTED_EXCEPTION:"Ocurrió una excepción inesperada.",GmErr_INVALID_USER_ID:"El ID de usuario proporcionado es inválido.",GmErr_NOT_ALLOWED_EXCEPTION:"Esta acción no está permitida.",GmErr_CAN_NOT_FIND_ROLE:"No se pudo encontrar el rol especificado.",GmErr_NO_SESSION_PROVIDED:"No se proporcionó ninguna sesión.",GmErr_NO_ACTIVE_SESSION_FOUND_FOR_THIS_USER:"No se encontró ninguna sesión activa para este usuario.",GmErr_USER_HAS_ALREADY_BEEN_ANONYMIZED:"El usuario ya ha sido anonimizado.",GmErr_NO_ROLE_HAS_BEEN_SET_UP_TO_BE_ASSIGNED:"No se ha configurado ningún rol para ser asignado.",GmErr_PROVIDED_SESSION_DOES_NOT_BELONG_TO_THE_USER:"La sesión proporcionada no pertenece al usuario.",GmErr_PROVIDED_SESSION_DOES_NOT_EXIST:"La sesión proporcionada no existe.",GmErr_ROLE_ALREADY_ASSIGNED_FOR_USER:"El rol ya ha sido asignado al usuario.",GmErr_ASSIGN_USER_ROLE_FAILED:"Falló la asignación del rol al usuario.",nextButton:"Siguiente",backButton:"Atrás",doneButton:"Terminar",generalError:"Algo salió mal... Por favor intente de nuevo",successMessage:"Registro exitoso"},tr:{nextButton:"Next",backButton:"Back",doneButton:"Done",GmErr_BadRequest_Duplicate_User:"A user with this information already exists.",GmErr_BadRequest_PasswordContainsUsername:"The password cannot be the same as the username.",GmErr_BadRequest_PasswordContainsEmail:"The password cannot be the same as the email.",GmErr_BadRequest_Duplicate_PersonalId:"There is already a registration with the data you entered or you entered your data in an incorrect format.",GmErr_Forbidden_UserAccount_NavExcluded:"User is NAV Excluded. Registration was denied.",GmErr_BadRequest_ModelValidationFailed:"Something went wrong... Please try again.",GmErr_BadInternalConfigs:"Something went wrong... Please try again.",GmErr_Unauthorized:"Something went wrong... Please try again.",GmErr_NotFound:"Something went wrong... Please try again.",GmErr_UnexpectedException:"Something went wrong... Please try again.",generalError:"Something went wrong... Please try again.",successMessage:"Register successful"}},dh=(t,e,i)=>{let o=uh[uh[e]?e:"en"][t];if(void 0!==i)for(const[t,e]of Object.entries(i.values)){const i=new RegExp(`{${t}}`,"g");o=o.replace(i,e)}return o},mh=class{constructor(i){t(this,i),this.registrationWidgetLoaded=e(this,"registrationWidgetLoaded",7),this.registrationStepUpdated=e(this,"registrationStepUpdated",7),this.listOfInputValues=[],this.listOfInputValidity=[],this.listOfActions=[],this.listOfInputs=[],this.emitValue=!1,this.backButtonPressed=!1,this.registerErrors=!1,this.extraActions=[],this.registrationStepsState={regId:null},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.host.shadowRoot.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,this.clientStyling=t,setTimeout((()=>{this.host.shadowRoot.prepend(e)}),1)}))},this.endpoint=void 0,this.language="en",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.dateFormat=void 0,this.buttonInsideForm=void 0,this.btag=null,this.emitOnClick=!1,this.errorMessage=void 0,this.isFormValid=void 0,this.isLoading=!0,this.isLoadingPOST=void 0,this.registrationStep=void 0,this.forms=[],this.limitStylingAppends=!1,this.autofilled=!1}sendStep(){this.registrationStepUpdated.emit(this.registrationStep),window.postMessage({type:"registrationStepUpdated",step:this.registrationStep},window.location.href)}handleStylingChange(t,e){t!==e&&this.setClientStyling()}handleStylingUrlChange(t,e){t!==e&&this.setClientStylingURL()}setFormValidity(){this.errorMessage="",this.listOfInputValidity&&(this.isFormValid=!this.getInvalidStatus(this.listOfInputValidity)),this.listOfInputs.some((t=>t.autofill))&&(this.autofilled=!0)}addBtag(){this.addBtagValue()}checkInputsValidityHandler(t){this.listOfInputValidity.find((e=>e.name==t.detail.name)).isValid=t.detail.valid,this.isFormValid=!this.getInvalidStatus(this.listOfInputValidity)}getInputsValueHandler(t){this.listOfInputValues.find((e=>{e.name==t.detail.name&&(e.value=t.detail.value,e.type=t.detail.type||null)})),this.stepsStateMachine({event:"set",type:"values"})}componentWillLoad(){return this.getRegisterConfig().then((t=>{this.formatConfig(t),this.isFormValid=!this.getInvalidStatus(this.listOfInputValidity),this.stepsStateMachine({event:"set",type:"inputs"})}))}componentDidLoad(){this.registrationWidgetLoaded.emit(),window.postMessage({type:"registrationWidgetLoaded"},window.location.href),!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}nextHandler(t){t.preventDefault(),this.emitValue=!0,this.setRegisterStep()}backHandler(t){t.preventDefault(),this.registrationStep=this.stepChange("decrement"),this.stepsStateMachine({event:"get",type:"inputs"}),this.stepsStateMachine({event:"get",type:"values"})}dispatchRegisterCredentialsEvent(){this.registerCredentialsEvent=new CustomEvent("RegisterCredentials",{bubbles:!0,detail:{userNameEmail:this.registrationStepsState.Step1.registerUserData.Email.value,userPassword:this.registrationStepsState.Step1.registerUserData.Password.value}}),window.dispatchEvent(this.registerCredentialsEvent)}stepsStateMachine(t){switch(t.event){case"set":"inputs"==t.type&&(this.registrationStepsState[this.registrationStep].fields=this.listOfInputs,this.registrationStepsState[this.registrationStep].actions=this.listOfActions,this.registrationStepsState[this.registrationStep].fieldsValidity=this.listOfInputValidity),"values"==t.type&&(this.registrationStepsState[this.registrationStep].registerUserData=this.listOfInputValues.reduce(((t,e)=>(t[e.name]={value:e.value,isDuplicate:e.isDuplicate},t)),{})),localStorage.setItem("registrationStepsState",JSON.stringify(this.registrationStepsState));break;case"get":const e=JSON.parse(localStorage.getItem("registrationStepsState"));if(!e)return;if("inputs"==t.type&&(this.listOfInputs=this.registrationStepsState[this.registrationStep].fields,this.listOfActions=this.registrationStepsState[this.registrationStep].actions,this.listOfInputValidity=this.registrationStepsState[this.registrationStep].fieldsValidity),"values"==t.type){const t=e[this.registrationStep].registerUserData;this.listOfInputValues=Object.keys(t).map((e=>({name:e,value:t[e].value,isDuplicate:t[e].isDuplicate}))),this.listOfInputValues.forEach((t=>{const e=this.listOfInputs.find((e=>e.name===t.name));e&&(e.defaultValue=t.value)}))}this.isFormValid=!this.getInvalidStatus(this.listOfInputValidity)}}getRegisterConfig(t){const e=new URL(`${this.endpoint}/v1/player/legislation/registration/config`),i=new Headers;i.append("Content-Type","application/json"),i.append("Accept","application/json"),t&&e.searchParams.append("registrationId",t);const o={method:"GET",headers:i};return new Promise(((t,i)=>{this.isLoading=!0,fetch(e.href,o).then((t=>t.json())).then((e=>{this.isLoading=!1,t(e)})).catch((t=>{this.isLoading=!1,console.error(t),i(t)})).finally((()=>{this.isLoading=!1}))}))}setRegisterStep(){this.isLoadingPOST=!0;const t=new URL(`${this.endpoint}/v1/player/legislation/registration/step`),e={registrationId:this.registrationID,registerUserDto:this.listOfInputValues.filter((t=>!t.isDuplicate)).reduce(((t,e)=>("TypeOfPublicArea"===e.name?t[e.name]=e.value.toLowerCase():"tel"===e.type?(t.MobilePrefix=e.value.prefix,t[e.name]=e.value.phone):"checkboxgroup"===e.type?null!==e.value&&Object.entries(e.value).forEach((([e,i])=>{t[e]=i?"true":"false"})):t[e.name]=e.value,t)),{}),step:this.registrationStep},i=new Headers;i.append("Content-Type","application/json"),i.append("Accept","application/json");const o={method:"POST",body:JSON.stringify(e),headers:i};fetch(t.href,o).then((t=>t.ok?t.json():t.json().then((t=>{this.errorCode=t.thirdPartyResponse.errorCode,this.errorMessage="GmErr_BadRequest_IdomsoftVerification_ShouldRetry"==this.errorCode?t.thirdPartyResponse.message:"GmErr_Forbidden_UserAccount_NavExcluded"===this.errorCode?dh(`${this.errorCode}`,this.language):"GmErr_BadRequest"==this.errorCode?t.thirdPartyResponse.message:dh(`${this.errorCode}`,this.language)||dh("generalError",this.language)})))).then((t=>{this.isLoadingPOST=!1,this.registrationID=t.registrationId,this.listOfActions.some((t=>"/register"==t))?(this.listOfActions.some((t=>"/generate-2FA-code/Generate2FACode"==t))&&this.extraActions.push("2fa"),this.setRegister()):(this.registrationStep=this.stepChange("increment"),Object.keys(this.registrationStepsState).find((t=>t==this.registrationStep))?(this.stepsStateMachine({event:"get",type:"inputs"}),this.stepsStateMachine({event:"get",type:"values"})):this.getRegisterConfig(this.registrationID).then((t=>{this.formatConfig(t),this.stepsStateMachine({event:"set",type:"inputs"})})))})).catch((t=>{this.isLoadingPOST=!1,console.error(t)})).finally((()=>{this.isLoadingPOST=!1}))}setRegister(){this.isLoading=!0,this.registerErrors=!1;const t=new URL(`${this.endpoint}/v1/player/legislation/register`),e=new Headers;e.append("Content-Type","application/json"),e.append("Accept","application/json");const i={method:"PUT",body:JSON.stringify({registrationId:this.registrationID}),headers:e};fetch(t.href,i).then((t=>t.ok?t.json():(this.registerErrors=!0,t.json().then((t=>{this.errorCode=t.thirdPartyResponse.errorCode,this.errorMessage="GmErr_BadRequest_IdomsoftVerification_ShouldRetry"==this.errorCode||"GmErr_BadRequest"==this.errorCode?t.thirdPartyResponse.message:dh(`${this.errorCode}`,this.language)||dh("generalError",this.language),window.postMessage({type:"registrationFailed",errorMessage:null==t?void 0:t.thirdPartyResponse.message},window.location.href),window.postMessage({type:"WidgetNotification",data:{type:"error",message:this.errorMessage}},window.location.href)}))))).then((t=>{this.isLoading=!1,this.registerErrors||(this.dispatchRegisterCredentialsEvent(),window.postMessage({type:"registrationSuccessful",userId:null==t?void 0:t.userId,extraActions:this.extraActions},window.location.href),window.postMessage({type:"WidgetNotification",data:{type:"success",message:dh("successMessage",this.language)}},window.location.href))})).catch((t=>{this.isLoading=!1,console.error(t)})).finally((()=>{this.isLoading=!1}))}formatConfig(t){var e;this.listOfInputs=t.content.fields.flatMap((t=>{const e=t.validate.custom.find((t=>"duplicate-input"===t.rule)),i=Object.assign({},t);return e?[i,Object.assign(Object.assign({},t),{name:`${t.name}Duplicate`,displayName:e.displayName,isDuplicateInput:!0})]:[i]})),this.listOfInputValidity=this.listOfInputs.reduce(((t,e)=>{var i;return"togglecheckbox"===(null===(i=e.inputType)||void 0===i?void 0:i.toLowerCase())?e.data.subFields.forEach((e=>{t.push({name:e.name,isValid:this.setInitialValidStatus(e)})})):t.push({name:e.name,isValid:this.setInitialValidStatus(e)}),t}),[]),this.listOfInputValues=this.listOfInputs.reduce(((t,e)=>{var i,o,r;return"togglecheckbox"===(null===(i=e.inputType)||void 0===i?void 0:i.toLowerCase())?e.data.subFields.forEach((i=>{var o,r;t.push({name:i.name,value:"checkbox"==(null===(o=i.inputType)||void 0===o?void 0:o.toLowerCase())?"false":null,isDuplicate:i.isDuplicateInput||!1,type:"togglecheckbox"==(null===(r=e.inputType)||void 0===r?void 0:r.toLowerCase())?"togglecheckbox":null})})):t.push({name:e.name,value:"checkbox"==(null===(o=e.inputType)||void 0===o?void 0:o.toLowerCase())?"false":null,isDuplicate:e.isDuplicateInput||!1,type:"checkboxgroup"==(null===(r=e.inputType)||void 0===r?void 0:r.toLowerCase())?"checkboxgroup":null}),t}),[]),this.btag&&this.addBtagValue(),this.listOfActions=t.content.actions.map((t=>t)),this.registrationID=t.content.registrationID,this.registrationStep=t.content.step,this.listOfActions.some((t=>"/register"==t))&&(this.lastStep=this.registrationStep),this.translationUrl?(e=this.translationUrl,new Promise((t=>{fetch(e).then((t=>t.json())).then((e=>{Object.keys(e).forEach((t=>{for(let i in e[t])uh[t][i]=e[t][i]})),t(!0)}))}))).then((()=>{this.listOfInputs.forEach((t=>{var e,i;return this.addTranslation(t),"togglecheckbox"===(null===(e=t.inputType)||void 0===e?void 0:e.toLowerCase())&&t.data.subFields.forEach((t=>this.addTranslation(t))),"checkboxgroup"===(null===(i=t.inputType)||void 0===i?void 0:i.toLowerCase())&&(this.addTranslation(t),t.data.subFields.forEach((t=>this.addTranslation(t)))),t}))})).catch((t=>{console.error("Failed to fetch translations:",t)})).finally((()=>{this.forms=[...this.forms,{[this.registrationStep]:this.listOfInputs}]})):this.forms=[...this.forms,{[this.registrationStep]:this.listOfInputs}],this.registrationStepsState.regId=this.registrationID,this.registrationStepsState[this.registrationStep]||(this.registrationStepsState[this.registrationStep]={fields:[],fieldsValidity:[],registerUserData:{},actions:[]})}addBtagValue(){const t=this.listOfInputs.find((t=>"btag"===t.name.toLowerCase()));t&&(t.defaultValue=this.btag);const e=this.listOfInputValues.find((t=>"btag"===t.name.toLowerCase()));e&&(e.value=this.btag)}addTranslation(t){uh[uh[this.language]?this.language:"en"][t.name]&&Object.keys(uh[this.language][t.name]).forEach((e=>{t[e]=uh[this.language][t.name][e]}))}setInitialValidStatus(t){var e,i;return"checkbox"==(null===(e=t.inputType)||void 0===e?void 0:e.toLowerCase())&&0==(null===(i=t.validate)||void 0===i?void 0:i.mandatory)||null!==t.defaultValue}stepChange(t){const e=parseInt(this.registrationStep.replace("Step",""));return"increment"===t?"Step"+(e+1):"decrement"===t?"Step"+(e-1):void 0}getInvalidStatus(t){return t.filter((t=>0==t.isValid)).length>0}renderForm(){return this.forms.map(((t,e)=>i("form",{action:".",id:`RegistrationForm${this.registrationStep}`,class:"registration__form "+(this.registrationStep!==`Step${e+1}`?"hidden":""),ref:t=>this.form=t},t[this.registrationStep]&&t[this.registrationStep].map((t=>i("general-input",{type:t.inputType,name:t.name,displayName:t.displayName,validation:t.validate,action:t.action||null,options:t.data?"checkboxgroup"==t.inputType.toLowerCase()||"togglecheckbox"==t.inputType.toLowerCase()?t.data.subFields:t.data.values:[],defaultValue:t.defaultValue,autofilled:t.autofill,emitValue:this.emitValue,language:this.language,isDuplicateInput:t.isDuplicateInput,"client-styling":this.clientStyling,tooltip:t.tooltip,placeholder:null==t.placeholder?"":t.placeholder,dateFormat:this.dateFormat,"translation-url":this.translationUrl,emitOnClick:this.emitOnClick}))),this.buttonInsideForm&&this.renderButtons(),i("div",{class:"registration__wrapper--flex"},i("p",{class:"registration__error-message",innerHTML:this.errorMessage})))))}renderButtons(){return i("div",{class:"registration__buttons-wrapper "+(this.autofilled?"registration__buttons-wrapper--autofilled":"")},this.isLoadingPOST&&i("slot",{name:"spinner"})&&i("svg",{class:"spinner",viewBox:"0 0 50 50"},i("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none","stroke-width":"5"})),!this.isLoadingPOST&&i("button",{class:"registration__button registration__button--next "+(this.isFormValid?"":"registration__button--disabled"),type:"submit",form:`RegistrationForm${this.registrationStep}`,onClick:t=>this.nextHandler(t),disabled:!this.isFormValid},dh(this.lastStep===this.registrationStep?"doneButton":"nextButton",this.language)),i("button",{class:"registration__button registration__button--back "+("Step1"==this.registrationStep?"registration__button--first-step":""),onClick:t=>this.backHandler(t)},dh("backButton",this.language)))}render(){return this.isLoading?i("p",null,"Please wait, loading ..."):i("div",{class:`registration registration__${this.registrationStep}`},this.renderForm(),!this.buttonInsideForm&&this.renderButtons())}get host(){return o(this)}static get watchers(){return{registrationStep:["sendStep"],clientStyling:["handleStylingChange"],clientStylingUrl:["handleStylingUrlChange"],forms:["setFormValidity"],btag:["addBtag"]}}};mh.style='*,\n*::before,\n*::after {\n padding: 0;\n margin: 0;\n box-sizing: border-box;\n}\n\n.registration__form.hidden {\n display: none;\n}\n\n.registration {\n font-family: "Roboto";\n font-style: normal;\n font-family: sans-serif;\n display: flex;\n flex-direction: column;\n gap: 24px;\n width: 100%;\n height: 100%;\n container-type: inline-size;\n}\n.registration__wrapper {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.registration__error-message {\n color: var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909));\n font-size: 13px;\n display: block;\n justify-content: center;\n text-align: center;\n}\n.registration__form {\n display: grid;\n grid-template-columns: repeat(1, 1fr);\n gap: 40px;\n justify-items: stretch;\n align-content: flex-start;\n overflow: auto;\n width: 100%;\n height: 100%;\n}\n.registration__buttons-wrapper {\n display: flex;\n flex-direction: column;\n justify-content: space-around;\n align-items: center;\n position: relative;\n}\n.registration__button {\n border-radius: 5px;\n background: var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));\n border: 1px solid var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));\n color: var(--emfe-w-button-typography, var(--emfe-w-color-white, #FFFFFF));\n text-transform: uppercase;\n font-size: 20px;\n height: 44px;\n width: 100%;\n margin: 0px auto;\n padding: 10px 20px;\n font-weight: normal;\n box-shadow: none;\n cursor: pointer;\n}\n.registration__button--disabled {\n background: var(--emfe-w-color-gray-100, #E6E6E6);\n border: 1px solid var(--emfe-w-color-gray-150, #828282);\n pointer-events: none;\n box-shadow: none;\n}\n.registration__button--first-step {\n display: none;\n}\n\n@container (min-width: 450px) {\n .registration__form {\n grid-template-columns: repeat(2, 1fr);\n }\n .registration__buttons-wrapper {\n flex-direction: row-reverse;\n gap: 15px;\n }\n}\n.spinner {\n animation: rotate 2s linear infinite;\n z-index: 2;\n position: absolute;\n top: 50%;\n left: 50%;\n margin: -25px 0 0 -25px;\n width: 50px;\n height: 50px;\n}\n.spinner .path {\n stroke: var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));\n stroke-linecap: round;\n animation: dash 1.5s ease-in-out infinite;\n}\n\n@keyframes rotate {\n 100% {\n transform: rotate(360deg);\n }\n}\n@keyframes dash {\n 0% {\n stroke-dasharray: 1, 150;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -35;\n }\n 100% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -124;\n }\n}';const ph=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.validationPattern="",this.touched=!1,this.handleInput=t=>{this.value=t.target.value,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleBlur=()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.validation=void 0,this.defaultValue=void 0,this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}connectedCallback(){this.validationPattern=this.setPattern()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}setValidity(){return this.inputReference.validity.valid}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e;if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,o=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return a(`${i}`,this.language)?a(`${i}`,this.language):o}return this.inputReference.validity.rangeUnderflow||this.inputReference.validity.rangeOverflow?a("numberLengthError",this.language,{values:{min:this.validation.min,max:this.validation.max}}):this.inputReference.validity.valueMissing?a("requiredError",this.language):void 0}renderTooltip(){return this.showTooltip?i("div",{class:"number__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"2032f77ca52b330ae2e8f484d7a0aba60ee7b9d5",class:`number__wrapper ${this.autofilled?"number__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"0786901cd928bba86597180f058bff43fba522b6",class:"number__wrapper--flex"},i("label",{key:"ff7f39306cef7aeba3e0e4508df03c5a945e748b",class:"number__label "+(this.validation.mandatory?"number__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"dced91223621551472fee374d56f1ad7476f4191",class:"number__wrapper--relative"},this.tooltip&&i("img",{key:"a804a983e342e4d117126720a32c4c34a2b267dc",class:"number__tooltip-icon",src:n,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("input",{key:"fd59afaedf7d9f761684b057a1809474d735cc26",ref:t=>this.inputReference=t,type:"number",value:this.defaultValue,readOnly:this.autofilled,id:`${this.name}__input`,class:`number__input ${t}`,pattern:this.validationPattern,placeholder:`${this.placeholder}`,required:this.validation.mandatory,max:this.validation.max,min:this.validation.min,onInput:this.handleInput,onBlur:this.handleBlur}),i("small",{key:"ca11558b5704b69311626736ab84a298449b98d7",class:"number__error-message"},this.errorMessage))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};ph.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.number{font-family:"Roboto";font-style:normal}.number__wrapper{position:relative;width:100%}.number__wrapper--autofilled{pointer-events:none}.number__wrapper--autofilled .number__label{color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.number__wrapper--autofilled .number__input{color:var(--emfe-w-color-black, #000000)}.number__wrapper--flex{display:flex;gap:5px}.number__wrapper--relative{position:relative}.number__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.number__label--required::after{content:"*";font-family:inherit;color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));margin-left:2px}.number__input{font-family:inherit;border-radius:5px;width:100%;height:44px;border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-color-black, #000000);border-radius:5px;box-sizing:border-box;padding:5px 15px;font-size:16px;line-height:18px;position:relative;-moz-appearance:textfield;}.number__input:focus{outline-color:#3E3E3E}.number__input::-webkit-outer-spin-button,.number__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.number__input--invalid{border:1px solid var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.number__input::placeholder{color:#979797}.number__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.number__tooltip-icon{width:16px;height:auto}.number__tooltip{position:absolute;top:0;left:20px;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.number__tooltip.visible{opacity:1}';
|
|
3934
3934
|
/**
|
|
3935
3935
|
* @license
|
|
3936
3936
|
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|