Error getting the bot detection challenge. Please contact the system administrator.
'}}};function Wn(t,e,r,n){t.innerHTML=e.templates[r.provider](r),t.querySelector(".captcha-reload").addEventListener("click",(function(t){t.preventDefault(),n()}))}function Vn(t){switch(t){case"recaptcha_v2":return window.grecaptcha;case"recaptcha_enterprise":return window.grecaptcha.enterprise;default:throw new Error("Unknown captcha provider")}}function $n(t,e,r){var n=t.hasAttribute("data-wid")&&t.getAttribute("data-wid");function o(e){t.querySelector('input[name="captcha"]').value=e||""}if(n)return o(),void Vn(r.provider).reset(n);t.innerHTML=e.templates[r.provider](r);var i=t.querySelector(".recaptcha");!function(t,e,r){var n="recaptchaCallback_"+Math.floor(1000001*Math.random());window[n]=function(){delete window[n],r()};var o=window.document.createElement("script");o.src=function(t,e,r){switch(t){case"recaptcha_v2":return"https://www.recaptcha.net/recaptcha/api.js?hl="+e+"&onload="+r;case"recaptcha_enterprise":return"https://www.recaptcha.net/recaptcha/enterprise.js?render=explicit&hl="+e+"&onload="+r;default:throw new Error("Unknown captcha provider")}}(e.provider,e.lang,n),o.async=!0,window.document.body.appendChild(o)}(0,{lang:e.lang,provider:r.provider},(function(){var e=Vn(r.provider);n=e.render(i,{callback:o,"expired-callback":function(){o()},"error-callback":function(){o()},sitekey:r.siteKey}),t.setAttribute("data-wid",n)}))}var Jn=function(t,e,r,n){function o(n){n=n||Hn,t.getChallenge((function(t,i){return t?(e.innerHTML=r.templates.error(t),n(t)):i.required?(e.style.display="","auth0"===i.provider?Wn(e,r,i,o):"recaptcha_v2"!==i.provider&&"recaptcha_enterprise"!==i.provider||$n(e,r,i),void n()):(e.style.display="none",void(e.innerHTML=""))}))}return r=xr.merge(zn).with(r||{}),o(n),{reload:o,getValue:function(){var t=e.querySelector('input[name="captcha"]');if(t)return t.value}}},Gn=function(t,e,r,n){function o(n){n=n||Hn,t.passwordless.getChallenge((function(t,i){return t?(e.innerHTML=r.templates.error(t),n(t)):i.required?(e.style.display="","auth0"===i.provider?Wn(e,r,i,o):"recaptcha_v2"!==i.provider&&"recaptcha_enterprise"!==i.provider||$n(e,r,i),void n()):(e.style.display="none",void(e.innerHTML=""))}))}return r=xr.merge(zn).with(r||{}),o(n),{reload:o,getValue:function(){var t=e.querySelector('input[name="captcha"]');if(t)return t.value}}};function Xn(){return new Date}function Qn(t){wr.check(t,{type:"object",message:"options parameter is not valid"},{domain:{type:"string",message:"domain option is required"},clientID:{type:"string",message:"clientID option is required"},responseType:{optional:!0,type:"string",message:"responseType is not valid"},responseMode:{optional:!0,type:"string",message:"responseMode is not valid"},redirectUri:{optional:!0,type:"string",message:"redirectUri is not valid"},scope:{optional:!0,type:"string",message:"scope is not valid"},audience:{optional:!0,type:"string",message:"audience is not valid"},popupOrigin:{optional:!0,type:"string",message:"popupOrigin is not valid"},leeway:{optional:!0,type:"number",message:"leeway is not valid"},plugins:{optional:!0,type:"array",message:"plugins is not valid"},maxAge:{optional:!0,type:"number",message:"maxAge is not valid"},stateExpiration:{optional:!0,type:"number",message:"stateExpiration is not valid"},legacySameSiteCookie:{optional:!0,type:"boolean",message:"legacySameSiteCookie option is not valid"},_disableDeprecationWarnings:{optional:!0,type:"boolean",message:"_disableDeprecationWarnings option is not valid"},_sendTelemetry:{optional:!0,type:"boolean",message:"_sendTelemetry option is not valid"},_telemetryInfo:{optional:!0,type:"object",message:"_telemetryInfo option is not valid"},_timesToRetryFailedRequests:{optional:!0,type:"number",message:"_timesToRetryFailedRequests option is not valid"}}),t.overrides&&wr.check(t.overrides,{type:"object",message:"overrides option is not valid"},{__tenant:{optional:!0,type:"string",message:"__tenant option is required"},__token_issuer:{optional:!0,type:"string",message:"__token_issuer option is required"},__jwks_uri:{optional:!0,type:"string",message:"__jwks_uri is required"}}),this.baseOptions=t,this.baseOptions.plugins=new xn(this,this.baseOptions.plugins||[]),this.baseOptions._sendTelemetry=!1!==this.baseOptions._sendTelemetry||this.baseOptions._sendTelemetry,this.baseOptions._timesToRetryFailedRequests=t._timesToRetryFailedRequests?parseInt(t._timesToRetryFailedRequests):0,this.baseOptions.tenant=this.baseOptions.overrides&&this.baseOptions.overrides.__tenant||this.baseOptions.domain.split(".")[0],this.baseOptions.token_issuer=this.baseOptions.overrides&&this.baseOptions.overrides.__token_issuer||"https://"+this.baseOptions.domain+"/",this.baseOptions.jwksURI=this.baseOptions.overrides&&this.baseOptions.overrides.__jwks_uri,!1!==t.legacySameSiteCookie&&(this.baseOptions.legacySameSiteCookie=!0),this.transactionManager=new jn(this.baseOptions),this.client=new Yn(this.baseOptions),this.redirect=new qn(this,this.baseOptions),this.popup=new Mn(this,this.baseOptions),this.crossOriginAuthentication=new In(this,this.baseOptions),this.webMessageHandler=new Dn(this),this._universalLogin=new Fn(this,this.baseOptions),this.ssodataStorage=new Br(this.baseOptions)}function Zn(t,e){this.baseOptions=e,this.request=t}function Kn(t,e){this.baseOptions=e,this.request=t}function Yn(t,e){2===arguments.length?this.auth0=t:e=t,wr.check(e,{type:"object",message:"options parameter is not valid"},{domain:{type:"string",message:"domain option is required"},clientID:{type:"string",message:"clientID option is required"},responseType:{optional:!0,type:"string",message:"responseType is not valid"},responseMode:{optional:!0,type:"string",message:"responseMode is not valid"},redirectUri:{optional:!0,type:"string",message:"redirectUri is not valid"},scope:{optional:!0,type:"string",message:"scope is not valid"},audience:{optional:!0,type:"string",message:"audience is not valid"},_disableDeprecationWarnings:{optional:!0,type:"boolean",message:"_disableDeprecationWarnings option is not valid"},_sendTelemetry:{optional:!0,type:"boolean",message:"_sendTelemetry option is not valid"},_telemetryInfo:{optional:!0,type:"object",message:"_telemetryInfo option is not valid"}}),this.baseOptions=e,this.baseOptions._sendTelemetry=!1!==this.baseOptions._sendTelemetry||this.baseOptions._sendTelemetry,this.baseOptions.rootUrl=this.baseOptions.domain&&0===this.baseOptions.domain.toLowerCase().indexOf("http")?this.baseOptions.domain:"https://"+this.baseOptions.domain,this.request=new Cr(this.baseOptions),this.passwordless=new Zn(this.request,this.baseOptions),this.dbConnection=new Kn(this.request,this.baseOptions),this.warn=new Lr({disableWarnings:!!e._disableDeprecationWarnings}),this.ssodataStorage=new Br(this.baseOptions)}function to(t){wr.check(t,{type:"object",message:"options parameter is not valid"},{domain:{type:"string",message:"domain option is required"},token:{type:"string",message:"token option is required"},_sendTelemetry:{optional:!0,type:"boolean",message:"_sendTelemetry option is not valid"},_telemetryInfo:{optional:!0,type:"object",message:"_telemetryInfo option is not valid"}}),this.baseOptions=t,this.baseOptions.headers={Authorization:"Bearer "+this.baseOptions.token},this.request=new Cr(this.baseOptions),this.baseOptions.rootUrl=b("https://"+this.baseOptions.domain,"api","v2")}Qn.prototype.parseHash=function(t,e){var r,n;e||"function"!=typeof t?t=t||{}:(e=t,t={});var o=void 0===t.hash?Ir.getWindow().location.hash:t.hash;if(o=o.replace(/^#?\/?/,""),(r=De.parse(o)).hasOwnProperty("error"))return n=Hr.buildResponse(r.error,r.error_description),r.state&&(n.state=r.state),e(n);if(!r.hasOwnProperty("access_token")&&!r.hasOwnProperty("id_token")&&!r.hasOwnProperty("refresh_token"))return e(null,null);var i=(this.baseOptions.responseType||t.responseType||"").split(" ");return i.length>0&&-1!==i.indexOf("token")&&!r.hasOwnProperty("access_token")?e(Hr.buildResponse("invalid_hash","response_type contains `token`, but the parsed hash does not contain an `access_token` property")):i.length>0&&-1!==i.indexOf("id_token")&&!r.hasOwnProperty("id_token")?e(Hr.buildResponse("invalid_hash","response_type contains `id_token`, but the parsed hash does not contain an `id_token` property")):this.validateAuthenticationResponse(t,r,e)},Qn.prototype.validateAuthenticationResponse=function(t,e,r){var n=this;t.__enableIdPInitiatedLogin=t.__enableIdPInitiatedLogin||t.__enableImpersonation;var o=e.state,i=this.transactionManager.getStoredTransaction(o),s=t.state||i&&i.state||null,a=s===o;if((o||s||!t.__enableIdPInitiatedLogin)&&!a)return r({error:"invalid_token",errorDescription:"`state` does not match."});var c=t.nonce||i&&i.nonce||null,u=i&&i.organization,p=t.state||i&&i.appState||null,l=function(t,o){return t?r(t):(i&&i.lastUsedConnection&&(o&&(s=o.sub),n.ssodataStorage.set(i.lastUsedConnection,s)),r(null,function(t,e,r){return{accessToken:t.access_token||null,idToken:t.id_token||null,idTokenPayload:r||null,appState:e||null,refreshToken:t.refresh_token||null,state:t.state||null,expiresIn:t.expires_in?parseInt(t.expires_in,10):null,tokenType:t.token_type||null,scope:t.scope||null}}(e,p,o)));var s};return e.id_token?this.validateToken(e.id_token,c,(function(t,r){if(!t){if(u){if(!r.org_id)return l(Hr.invalidToken("Organization Id (org_id) claim must be a string present in the ID token"));if(r.org_id!==u)return l(Hr.invalidToken('Organization Id (org_id) claim value mismatch in the ID token; expected "'+u+'", found "'+r.org_id+'"'))}return e.access_token&&r.at_hash?(new kn).validateAccessToken(e.access_token,"RS256",r.at_hash,(function(t){return t?l(Hr.invalidToken(t.message)):l(null,r)})):l(null,r)}if("invalid_token"!==t.error||t.errorDescription&&t.errorDescription.indexOf("Nonce (nonce) claim value mismatch in the ID token")>-1)return l(t);var o=(new kn).decode(e.id_token);return"HS256"!==o.header.alg?l(t):(o.payload.nonce||null)!==c?l({error:"invalid_token",errorDescription:'Nonce (nonce) claim value mismatch in the ID token; expected "'+c+'", found "'+o.payload.nonce+'"'}):e.access_token?n.client.userInfo(e.access_token,(function(t,e){return t?l(t):l(null,e)})):l({error:"invalid_token",description:"The id_token cannot be validated because it was signed with the HS256 algorithm and public clients (like a browser) can’t store secrets. Please read the associated doc for possible ways to fix this. Read more: https://auth0.com/docs/errors/libraries/auth0-js/invalid-token#parsing-an-hs256-signed-id-token-without-an-access-token"})})):l(null,null)},Qn.prototype.validateToken=function(t,e,r){new kn({issuer:this.baseOptions.token_issuer,jwksURI:this.baseOptions.jwksURI,audience:this.baseOptions.clientID,leeway:this.baseOptions.leeway||60,maxAge:this.baseOptions.maxAge,__clock:this.baseOptions.__clock||Xn}).verify(t,e,(function(t,e){if(t)return r(Hr.invalidToken(t.message));r(null,e)}))},Qn.prototype.renewAuth=function(t,e){var r=!!t.usePostMessage,n=t.postMessageDataType||!1,o=t.postMessageOrigin||Ir.getWindow().origin,i=t.timeout,s=this,a=xr.merge(this.baseOptions,["clientID","redirectUri","responseType","scope","audience","_csrf","state","_intstate","nonce"]).with(t);a.responseType=a.responseType||"token",a.responseMode=a.responseMode||"fragment",a=this.transactionManager.process(a),wr.check(a,{type:"object",message:"options parameter is not valid"}),wr.check(e,{type:"function",message:"cb parameter is not valid"}),a.prompt="none",a=xr.blacklist(a,["usePostMessage","tenant","postMessageDataType","postMessageOrigin"]),Nn.create({authenticationUrl:this.client.buildAuthorizeUrl(a),postMessageDataType:n,postMessageOrigin:o,timeout:i}).login(r,(function(t,r){if("object"==typeof r)return e(t,r);s.parseHash({hash:r},e)}))},Qn.prototype.checkSession=function(t,e){var r=xr.merge(this.baseOptions,["clientID","responseType","redirectUri","scope","audience","_csrf","state","_intstate","nonce"]).with(t);return"code"===r.responseType?e({error:"error",error_description:"responseType can't be `code`"}):(t.nonce||(r=this.transactionManager.process(r)),r.redirectUri?(wr.check(r,{type:"object",message:"options parameter is not valid"}),wr.check(e,{type:"function",message:"cb parameter is not valid"}),r=xr.blacklist(r,["usePostMessage","tenant","postMessageDataType"]),void this.webMessageHandler.run(r,zr(e,{forceLegacyError:!0,ignoreCasing:!0}))):e({error:"error",error_description:"redirectUri can't be empty"}))},Qn.prototype.changePassword=function(t,e){return this.client.dbConnection.changePassword(t,e)},Qn.prototype.passwordlessStart=function(t,e){var r=xr.merge(this.baseOptions,["responseType","responseMode","redirectUri","scope","audience","_csrf","state","_intstate","nonce"]).with(t.authParams);return t.authParams=this.transactionManager.process(r),this.client.passwordless.start(t,e)},Qn.prototype.signup=function(t,e){return this.client.dbConnection.signup(t,e)},Qn.prototype.authorize=function(t){var e=xr.merge(this.baseOptions,["clientID","responseType","responseMode","redirectUri","scope","audience","_csrf","state","_intstate","nonce","organization","invitation"]).with(t);wr.check(e,{type:"object",message:"options parameter is not valid"},{responseType:{type:"string",message:"responseType option is required"}}),(e=this.transactionManager.process(e)).scope=e.scope||"openid profile email",Ir.redirect(this.client.buildAuthorizeUrl(e))},Qn.prototype.signupAndAuthorize=function(t,e){var r=this;return this.client.dbConnection.signup(xr.blacklist(t,["popupHandler"]),(function(n){if(n)return e(n);t.realm=t.connection,t.username||(t.username=t.email),r.client.login(t,e)}))},Qn.prototype.login=function(t,e){var r=xr.merge(this.baseOptions,["clientID","responseType","redirectUri","scope","audience","_csrf","state","_intstate","nonce","onRedirecting","organization","invitation"]).with(t);r=this.transactionManager.process(r),Ir.getWindow().location.host===this.baseOptions.domain?(r.connection=r.realm,delete r.realm,this._universalLogin.login(r,e)):this.crossOriginAuthentication.login(r,e)},Qn.prototype.passwordlessLogin=function(t,e){var r=xr.merge(this.baseOptions,["clientID","responseType","redirectUri","scope","audience","_csrf","state","_intstate","nonce","onRedirecting"]).with(t);if(r=this.transactionManager.process(r),Ir.getWindow().location.host===this.baseOptions.domain)this.passwordlessVerify(r,e);else{var n=xr.extend({credentialType:"http://auth0.com/oauth/grant-type/passwordless/otp",realm:r.connection,username:r.email||r.phoneNumber,otp:r.verificationCode},xr.blacklist(r,["connection","email","phoneNumber","verificationCode"]));this.crossOriginAuthentication.login(n,e)}},Qn.prototype.crossOriginAuthenticationCallback=function(){this.crossOriginVerification()},Qn.prototype.crossOriginVerification=function(){this.crossOriginAuthentication.callback()},Qn.prototype.logout=function(t){Ir.redirect(this.client.buildLogoutUrl(t))},Qn.prototype.passwordlessVerify=function(t,e){var r=this,n=xr.merge(this.baseOptions,["clientID","responseType","responseMode","redirectUri","scope","audience","_csrf","state","_intstate","nonce","onRedirecting"]).with(t);return wr.check(n,{type:"object",message:"options parameter is not valid"},{responseType:{type:"string",message:"responseType option is required"}}),n=this.transactionManager.process(n),this.client.passwordless.verify(n,(function(o){if(o)return e(o);function i(){Ir.redirect(r.client.passwordless.buildVerifyUrl(n))}if("function"==typeof t.onRedirecting)return t.onRedirecting((function(){i()}));i()}))},Qn.prototype.renderCaptcha=function(t,e,r){return Jn(this.client,t,e,r)},Qn.prototype.renderPasswordlessCaptcha=function(t,e,r){return Gn(this.client,t,e,r)},Zn.prototype.buildVerifyUrl=function(t){var e,r;return wr.check(t,{type:"object",message:"options parameter is not valid"},{connection:{type:"string",message:"connection option is required"},verificationCode:{type:"string",message:"verificationCode option is required"},phoneNumber:{optional:!1,type:"string",message:"phoneNumber option is required",condition:function(t){return!t.email}},email:{optional:!1,type:"string",message:"email option is required",condition:function(t){return!t.phoneNumber}}}),e=xr.merge(this.baseOptions,["clientID","responseType","responseMode","redirectUri","scope","audience","_csrf","state","_intstate","protocol","nonce"]).with(t),this.baseOptions._sendTelemetry&&(e.auth0Client=this.request.getTelemetryData()),e=xr.toSnakeCase(e,["auth0Client"]),r=De.stringify(e),b(this.baseOptions.rootUrl,"passwordless","verify_redirect","?"+r)},Zn.prototype.start=function(t,e){var r,n;wr.check(t,{type:"object",message:"options parameter is not valid"},{connection:{type:"string",message:"connection option is required"},send:{type:"string",message:"send option is required",values:["link","code"],value_message:"send is not valid ([link, code])"},phoneNumber:{optional:!0,type:"string",message:"phoneNumber option is required",condition:function(t){return"code"===t.send||!t.email}},email:{optional:!0,type:"string",message:"email option is required",condition:function(t){return"link"===t.send||!t.phoneNumber}},authParams:{optional:!0,type:"object",message:"authParams option is required"}}),wr.check(e,{type:"function",message:"cb parameter is not valid"}),r=b(this.baseOptions.rootUrl,"passwordless","start");var o=t.xRequestLanguage;delete t.xRequestLanguage,(n=xr.merge(this.baseOptions,["clientID","responseType","redirectUri","scope"]).with(t)).scope&&(n.authParams=n.authParams||{},n.authParams.scope=n.authParams.scope||n.scope),n.redirectUri&&(n.authParams=n.authParams||{},n.authParams.redirect_uri=n.authParams.redirectUri||n.redirectUri),n.responseType&&(n.authParams=n.authParams||{},n.authParams.response_type=n.authParams.responseType||n.responseType),delete n.redirectUri,delete n.responseType,delete n.scope,n=xr.toSnakeCase(n,["auth0Client","authParams"]);var i=o?{xRequestLanguage:o}:void 0;return this.request.post(r,i).send(n).end(zr(e))},Zn.prototype.verify=function(t,e){var r,n;return wr.check(t,{type:"object",message:"options parameter is not valid"},{connection:{type:"string",message:"connection option is required"},verificationCode:{type:"string",message:"verificationCode option is required"},phoneNumber:{optional:!1,type:"string",message:"phoneNumber option is required",condition:function(t){return!t.email}},email:{optional:!1,type:"string",message:"email option is required",condition:function(t){return!t.phoneNumber}}}),wr.check(e,{type:"function",message:"cb parameter is not valid"}),n=xr.pick(t,["connection","verificationCode","phoneNumber","email","auth0Client","clientID"]),n=xr.toSnakeCase(n,["auth0Client"]),r=b(this.baseOptions.rootUrl,"passwordless","verify"),this.request.post(r).send(n).end(zr(e))},Zn.prototype.getChallenge=function(t){if(wr.check(t,{type:"function",message:"cb parameter is not valid"}),!this.baseOptions.state)return t();var e=b(this.baseOptions.rootUrl,"passwordless","challenge");return this.request.post(e).send({state:this.baseOptions.state}).end(zr(t,{ignoreCasing:!0}))},Kn.prototype.signup=function(t,e){var r,n,o;return wr.check(t,{type:"object",message:"options parameter is not valid"},{connection:{type:"string",message:"connection option is required"},email:{type:"string",message:"email option is required"},password:{type:"string",message:"password option is required"}}),wr.check(e,{type:"function",message:"cb parameter is not valid"}),r=b(this.baseOptions.rootUrl,"dbconnections","signup"),o=(n=xr.merge(this.baseOptions,["clientID","state"]).with(t)).user_metadata||n.userMetadata,n=xr.blacklist(n,["scope","userMetadata","user_metadata"]),n=xr.toSnakeCase(n,["auth0Client"]),o&&(n.user_metadata=o),this.request.post(r).send(n).end(zr(e))},Kn.prototype.changePassword=function(t,e){var r,n;return wr.check(t,{type:"object",message:"options parameter is not valid"},{connection:{type:"string",message:"connection option is required"},email:{type:"string",message:"email option is required"}}),wr.check(e,{type:"function",message:"cb parameter is not valid"}),r=b(this.baseOptions.rootUrl,"dbconnections","change_password"),n=xr.merge(this.baseOptions,["clientID"]).with(t,["email","connection"]),n=xr.toSnakeCase(n,["auth0Client"]),this.request.post(r).send(n).end(zr(e))},Yn.prototype.buildAuthorizeUrl=function(t){var e,r;return wr.check(t,{type:"object",message:"options parameter is not valid"}),e=xr.merge(this.baseOptions,["clientID","responseType","responseMode","redirectUri","scope","audience"]).with(t),wr.check(e,{type:"object",message:"options parameter is not valid"},{clientID:{type:"string",message:"clientID option is required"},redirectUri:{optional:!0,type:"string",message:"redirectUri option is required"},responseType:{type:"string",message:"responseType option is required"},nonce:{type:"string",message:"nonce option is required",condition:function(t){return-1===t.responseType.indexOf("code")&&-1!==t.responseType.indexOf("id_token")}},scope:{optional:!0,type:"string",message:"scope option is required"},audience:{optional:!0,type:"string",message:"audience option is required"}}),this.baseOptions._sendTelemetry&&(e.auth0Client=this.request.getTelemetryData()),e.connection_scope&&wr.isArray(e.connection_scope)&&(e.connection_scope=e.connection_scope.join(",")),e=xr.blacklist(e,["username","popupOptions","domain","tenant","timeout","appState"]),e=xr.toSnakeCase(e,["auth0Client"]),e=Jr(this.warn,e),r=De.stringify(e),b(this.baseOptions.rootUrl,"authorize","?"+r)},Yn.prototype.buildLogoutUrl=function(t){var e,r;return wr.check(t,{optional:!0,type:"object",message:"options parameter is not valid"}),e=xr.merge(this.baseOptions,["clientID"]).with(t||{}),this.baseOptions._sendTelemetry&&(e.auth0Client=this.request.getTelemetryData()),e=xr.toSnakeCase(e,["auth0Client","returnTo"]),r=De.stringify(xr.blacklist(e,["federated"])),t&&void 0!==t.federated&&!1!==t.federated&&"false"!==t.federated&&(r+="&federated"),b(this.baseOptions.rootUrl,"v2","logout","?"+r)},Yn.prototype.loginWithDefaultDirectory=function(t,e){return wr.check(t,{type:"object",message:"options parameter is not valid"},{username:{type:"string",message:"username option is required"},password:{type:"string",message:"password option is required"},scope:{optional:!0,type:"string",message:"scope option is required"},audience:{optional:!0,type:"string",message:"audience option is required"}}),t.grantType="password",this.oauthToken(t,e)},Yn.prototype.login=function(t,e){return wr.check(t,{type:"object",message:"options parameter is not valid"},{username:{type:"string",message:"username option is required"},password:{type:"string",message:"password option is required"},realm:{type:"string",message:"realm option is required"},scope:{optional:!0,type:"string",message:"scope option is required"},audience:{optional:!0,type:"string",message:"audience option is required"}}),t.grantType="http://auth0.com/oauth/grant-type/password-realm",this.oauthToken(t,e)},Yn.prototype.oauthToken=function(t,e){var r,n;return wr.check(t,{type:"object",message:"options parameter is not valid"}),wr.check(e,{type:"function",message:"cb parameter is not valid"}),r=b(this.baseOptions.rootUrl,"oauth","token"),n=xr.merge(this.baseOptions,["clientID","scope","audience"]).with(t),wr.check(n,{type:"object",message:"options parameter is not valid"},{clientID:{type:"string",message:"clientID option is required"},grantType:{type:"string",message:"grantType option is required"},scope:{optional:!0,type:"string",message:"scope option is required"},audience:{optional:!0,type:"string",message:"audience option is required"}}),n=xr.toSnakeCase(n,["auth0Client"]),n=$r(this.warn,n),this.request.post(r).send(n).end(zr(e))},Yn.prototype.loginWithResourceOwner=function(t,e){var r,n;return wr.check(t,{type:"object",message:"options parameter is not valid"},{username:{type:"string",message:"username option is required"},password:{type:"string",message:"password option is required"},connection:{type:"string",message:"connection option is required"},scope:{optional:!0,type:"string",message:"scope option is required"}}),wr.check(e,{type:"function",message:"cb parameter is not valid"}),r=b(this.baseOptions.rootUrl,"oauth","ro"),n=xr.merge(this.baseOptions,["clientID","scope"]).with(t,["username","password","scope","connection","device"]),(n=xr.toSnakeCase(n,["auth0Client"])).grant_type=n.grant_type||"password",this.request.post(r).send(n).end(zr(e))},Yn.prototype.getSSOData=function(t,e){if(this.auth0||(this.auth0=new Qn(this.baseOptions)),Ir.getWindow().location.host===this.baseOptions.domain)return this.auth0._universalLogin.getSSOData(t,e);"function"==typeof t&&(e=t),wr.check(e,{type:"function",message:"cb parameter is not valid"});var r=this.baseOptions.clientID,n=this.ssodataStorage.get()||{};this.auth0.checkSession({responseType:"token id_token",scope:"openid profile email",connection:n.lastUsedConnection,timeout:5e3},(function(t,o){return t?"login_required"===t.error?e(null,{sso:!1}):("consent_required"===t.error&&(t.error_description="Consent required. When using `getSSOData`, the user has to be authenticated with the following scope: `openid profile email`."),e(t,{sso:!1})):n.lastUsedSub&&n.lastUsedSub!==o.idTokenPayload.sub?e(t,{sso:!1}):e(null,{lastUsedConnection:{name:n.lastUsedConnection},lastUsedUserID:o.idTokenPayload.sub,lastUsedUsername:o.idTokenPayload.email||o.idTokenPayload.name,lastUsedClientID:r,sessionClients:[r],sso:!0})}))},Yn.prototype.userInfo=function(t,e){var r;return wr.check(t,{type:"string",message:"accessToken parameter is not valid"}),wr.check(e,{type:"function",message:"cb parameter is not valid"}),r=b(this.baseOptions.rootUrl,"userinfo"),this.request.get(r).set("Authorization","Bearer "+t).end(zr(e,{ignoreCasing:!0}))},Yn.prototype.getChallenge=function(t){if(wr.check(t,{type:"function",message:"cb parameter is not valid"}),!this.baseOptions.state)return t();var e=b(this.baseOptions.rootUrl,"usernamepassword","challenge");return this.request.post(e).send({state:this.baseOptions.state}).end(zr(t,{ignoreCasing:!0}))},Yn.prototype.delegation=function(t,e){var r,n;return wr.check(t,{type:"object",message:"options parameter is not valid"},{grant_type:{type:"string",message:"grant_type option is required"}}),wr.check(e,{type:"function",message:"cb parameter is not valid"}),r=b(this.baseOptions.rootUrl,"delegation"),n=xr.merge(this.baseOptions,["clientID"]).with(t),n=xr.toSnakeCase(n,["auth0Client"]),this.request.post(r).send(n).end(zr(e))},Yn.prototype.getUserCountry=function(t){var e;return wr.check(t,{type:"function",message:"cb parameter is not valid"}),e=b(this.baseOptions.rootUrl,"user","geoloc","country"),this.request.get(e).end(zr(t))},to.prototype.getUser=function(t,e){var r;return wr.check(t,{type:"string",message:"userId parameter is not valid"}),wr.check(e,{type:"function",message:"cb parameter is not valid"}),r=b(this.baseOptions.rootUrl,"users",t),this.request.get(r).end(zr(e,{ignoreCasing:!0}))},to.prototype.patchUserMetadata=function(t,e,r){var n;return wr.check(t,{type:"string",message:"userId parameter is not valid"}),wr.check(e,{type:"object",message:"userMetadata parameter is not valid"}),wr.check(r,{type:"function",message:"cb parameter is not valid"}),n=b(this.baseOptions.rootUrl,"users",t),this.request.patch(n).send({user_metadata:e}).end(zr(r,{ignoreCasing:!0}))},to.prototype.patchUserAttributes=function(t,e,r){var n;return wr.check(t,{type:"string",message:"userId parameter is not valid"}),wr.check(e,{type:"object",message:"user parameter is not valid"}),wr.check(r,{type:"function",message:"cb parameter is not valid"}),n=b(this.baseOptions.rootUrl,"users",t),this.request.patch(n).send(e).end(zr(r,{ignoreCasing:!0}))},to.prototype.linkUser=function(t,e,r){var n;return wr.check(t,{type:"string",message:"userId parameter is not valid"}),wr.check(e,{type:"string",message:"secondaryUserToken parameter is not valid"}),wr.check(r,{type:"function",message:"cb parameter is not valid"}),n=b(this.baseOptions.rootUrl,"users",t,"identities"),this.request.post(n).send({link_with:e}).end(zr(r,{ignoreCasing:!0}))};var eo;eo="#ifdef GL_ES\n precision mediump float;\n#define GLSLIFY 1\n#endif\n\nuniform vec2 u_resolution;\nuniform float u_time;\nuniform float u_bands;\n\n// -----------------------------------------------------------------------------\n//\n// Description : Array and textureless GLSL 2D/3D/4D simplex noise functions.\n// Author : Ian McEwan, Ashima Arts.\n// Maintainer : stegu\n// Lastmod : 20201014 (stegu)\n// License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n// Distributed under the MIT License. See LICENSE file.\n// https://github.com/ashima/webgl-noise\n// https://github.com/stegu/webgl-noise\n\nvec3 mod289(vec3 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 mod289(vec4 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 permute(vec4 x) {\n return mod289(((x*34.0)+10.0)*x);\n}\n\nvec4 taylorInvSqrt(vec4 r) {\n return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nfloat snoise(vec3 v) { \n const vec2 C = vec2(1.0/6.0, 1.0/3.0) ;\n const vec4 D = vec4(0.0, 0.5, 1.0, 2.0);\n\n // First corner\n vec3 i = floor(v + dot(v, C.yyy) );\n vec3 x0 = v - i + dot(i, C.xxx) ;\n\n // Other corners\n vec3 g = step(x0.yzx, x0.xyz);\n vec3 l = 1.0 - g;\n vec3 i1 = min( g.xyz, l.zxy );\n vec3 i2 = max( g.xyz, l.zxy );\n\n // x0 = x0 - 0.0 + 0.0 * C.xxx;\n // x1 = x0 - i1 + 1.0 * C.xxx;\n // x2 = x0 - i2 + 2.0 * C.xxx;\n // x3 = x0 - 1.0 + 3.0 * C.xxx;\n vec3 x1 = x0 - i1 + C.xxx;\n vec3 x2 = x0 - i2 + C.yyy; // 2.0*C.x = 1/3 = C.y\n vec3 x3 = x0 - D.yyy; // -1.0+3.0*C.x = -0.5 = -D.y\n\n // Permutations\n i = mod289(i); \n vec4 p = permute( permute( permute( \n i.z + vec4(0.0, i1.z, i2.z, 1.0 ))\n + i.y + vec4(0.0, i1.y, i2.y, 1.0 )) \n + i.x + vec4(0.0, i1.x, i2.x, 1.0 ));\n\n // Gradients: 7x7 points over a square, mapped onto an octahedron.\n // The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294)\n float n_ = 0.142857142857; // 1.0/7.0\n vec3 ns = n_ * D.wyz - D.xzx;\n\n vec4 j = p - 49.0 * floor(p * ns.z * ns.z); // mod(p,7*7)\n\n vec4 x_ = floor(j * ns.z);\n vec4 y_ = floor(j - 7.0 * x_ ); // mod(j,N)\n\n vec4 x = x_ *ns.x + ns.yyyy;\n vec4 y = y_ *ns.x + ns.yyyy;\n vec4 h = 1.0 - abs(x) - abs(y);\n\n vec4 b0 = vec4( x.xy, y.xy );\n vec4 b1 = vec4( x.zw, y.zw );\n\n vec4 s0 = floor(b0)*2.0 + 1.0;\n vec4 s1 = floor(b1)*2.0 + 1.0;\n vec4 sh = -step(h, vec4(0.0));\n\n vec4 a0 = b0.xzyw + s0.xzyw*sh.xxyy ;\n vec4 a1 = b1.xzyw + s1.xzyw*sh.zzww ;\n\n vec3 p0 = vec3(a0.xy,h.x);\n vec3 p1 = vec3(a0.zw,h.y);\n vec3 p2 = vec3(a1.xy,h.z);\n vec3 p3 = vec3(a1.zw,h.w);\n\n //Normalise gradients\n vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n p0 *= norm.x;\n p1 *= norm.y;\n p2 *= norm.z;\n p3 *= norm.w;\n\n // Mix final noise value\n vec4 m = max(0.5 - vec4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0);\n m = m * m;\n return 105.0 * dot( m*m, vec4( dot(p0,x0), dot(p1,x1), dot(p2,x2), dot(p3,x3) ) );\n}\n// -----------------------------------------------------------------------------\n\nvoid main() {\n float time = u_time * 0.02;\n\tvec2 st = gl_FragCoord.xy / u_resolution;\n\n float fl = fract(st.x * u_bands);\n float a = fl * 0.2;\n\n a = clamp(a, 0.2, fl * 0.3);\n vec3 pos1 = vec3(st * 0.9, time);\n float n1 = snoise(pos1);\n\n a -= n1;\n vec3 pos2 = vec3(st * 1., time);\n float n2 = snoise(pos2);\n a -= n2 * 0.08;\n\n\tgl_FragColor = vec4(1., 1., 1., a * 0.8);\n}\n\n";function ro(t,e,r){const n=t.createShader(e);if(!n)throw`failed to create ${e} shader`;if(t.shaderSource(n,r),t.compileShader(n),!t.getShaderParameter(n,t.COMPILE_STATUS))throw t.deleteShader(n),`${e} shader failed to compile`;return n}const no=t=>io("error",t),oo=()=>{const t=document.querySelector("#messages");t&&(t.innerHTML="")},io=(t,e)=>{const r=document.querySelector("#messages");if(!r)return;const n=document.createElement("div");n.role="alert",n.innerText=e,n.classList.add("message"),n.classList.add(t),r.append(n)},so=(t,e,r)=>{const n=document.querySelector(t);if(!n)return;n.addEventListener("submit",(async t=>{t.preventDefault(),n.hasAttribute("submitting")||(n.setAttribute("submitted",""),oo(),ao(n)?(n.setAttribute("submitting",""),await e(new FormData(n),n),n.removeAttribute("submitting")):r?.())}));n.querySelectorAll(".validation_block").forEach(lo)},ao=t=>{if(t.checkValidity())return!0;const e=t.hasAttribute("validating"),r=t.querySelectorAll("input");let n=!1;for(const t of r)uo(t)||n||(n=!0,t.focus());e||t.addEventListener("input",co),t.setAttribute("validating","")},co=t=>{const e=t.currentTarget;for(const t of e.querySelectorAll("input"))uo(t)},uo=t=>t.validity.valid?(po(t,!1)?.remove(),t.closest(".input_wrapper")?.classList.remove("invalid"),!0):(t.validity.valueMissing?po(t).innerText=t.dataset.valuemissing??`Please provide your ${t.name}`:t.validity.typeMismatch?po(t).innerText=t.dataset.typemismatch??"Incorrect value":t.validity.tooLong?po(t).innerText=t.dataset.toolong??`Maximum length is ${t.getAttribute("maxlength")}`:t.validity.tooShort?po(t).innerText=t.dataset.tooshort??`Minimum length is ${t.getAttribute("minlength")}`:t.validity.patternMismatch?po(t).innerText=t.dataset.patternmismatch??`Must match pattern ${t.getAttribute("pattern")}`:t.validity.customError?po(t).innerText=t.dataset.customError??"Field invalid":po(t).innerText="Field invalid",t.closest(".input_wrapper").classList.add("invalid"),!1);function po(t,e=!0){const r=t.closest(".input_wrapper")?.querySelector(".validation_error");if(!r&&e){const e=document.createElement("span");return e.classList.add("validation_error"),e.ariaLive="polite",t.closest(".input_wrapper").append(e),e}return r||null}const lo=t=>{const e=t.getAttribute("for"),r=e?t.closest("form")?.querySelector(`[name="${e}"]`):t.closest(".input_wrapper")?.querySelector("input");if(!r)return;const n=()=>{const e=r.value,n=t.querySelectorAll("[pattern]");let o=!0;for(const t of n){const n=t.getAttribute("pattern");new RegExp(n).test(e)?t.classList.add("valid"):(o&&(r.setCustomValidity("failed"),r.dataset.customError=t.textContent?.trim()??"Failed"),o=!1,t.classList.remove("valid"))}const i=t.querySelectorAll("[match]");for(const n of i){const i=n.getAttribute("match"),s=t.closest("form")?.querySelector(`[name="${i}"]`);s?.value.length&&s?.value===e?(n.classList.add("valid"),s?.setCustomValidity(""),delete s.dataset.customError):(o&&(r.setCustomValidity("failed"),r.dataset.customError=n.textContent?.trim()??"Failed"),o=!1,n.classList.remove("valid"),s&&(s.setCustomValidity("failed"),s.dataset.customError=n.textContent?.trim()??"Failed"))}o?(t.classList.add("valid"),r.setCustomValidity(""),delete r.dataset.customError):t.classList.remove("valid")};r.addEventListener("input",n);const o=t.querySelectorAll("[match]");for(const e of o){const r=e.getAttribute("match"),o=t.closest("form")?.querySelector(`[name="${r}"]`);o?.addEventListener("input",n)}n()},ho=({title:t,body:e})=>{const r=document.querySelector("#sent_email_panel");if(!r)return;document.querySelector("#login_signup")?.classList.add("hidden"),document.querySelector("#forgot_password_panel")?.classList.add("hidden");r.querySelector(".title").innerText=t;r.querySelector(".body").innerHTML=e,r.classList.remove("hidden"),document.body.classList.add("show_email")},fo=t=>{const e=t.querySelectorAll('[role="tab"]'),r=t=>{const r=t>=e.length?0:t<0?e.length-1:t;e.forEach((t=>{t.setAttribute("tabindex","-1"),t.setAttribute("aria-selected","false");const e=yo(t);e?.classList.add("hidden")}));const n=e.item(r);n.setAttribute("tabindex","0"),n.setAttribute("aria-selected","true"),n.focus();const o=yo(n);o?.classList.remove("hidden")};for(const[t,n]of Array.from(e).entries())n.addEventListener("keydown",(e=>{switch(e.key){case"ArrowUp":case"ArrowLeft":r(t-1);break;case"ArrowDown":case"ArrowRight":r(t+1)}})),n.addEventListener("click",(()=>r(t)))},yo=t=>{const e=t.getAttribute("aria-controls");return document.querySelector(`#${e}`)},mo=JSON.parse(decodeURIComponent(escape(window.atob("eyJpY29uIjoiaHR0cHM6Ly9ldmVudHN0b3JlLmNvbS9pbWFnZXMvZXZlbnQtc3RvcmUtbG9nby5zdmciLCJhc3NldHNVcmwiOiIiLCJhdXRoMERvbWFpbiI6ImlkZW50aXR5LmV2ZW50c3RvcmUuY29tIiwiYXV0aDBUZW5hbnQiOiJkZXYtM3NnamdiLWMiLCJjbGllbnRDb25maWd1cmF0aW9uQmFzZVVybCI6Imh0dHBzOi8vaWRlbnRpdHkuZXZlbnRzdG9yZS5jb20vIiwiY2FsbGJhY2tPbkxvY2F0aW9uSGFzaCI6ZmFsc2UsImNhbGxiYWNrVVJMIjoiaHR0cHM6Ly9jb25zb2xlLmV2ZW50c3RvcmUuY2xvdWQvY2FsbGJhY2siLCJjZG4iOiJodHRwczovL2Nkbi5hdXRoMC5jb20vIiwiY2xpZW50SUQiOiJxQjFkSzlnQXg2VTFIMW1pSDRMZndDcDRRMXkzcVNlWiIsImRpY3QiOnsic2lnbmluIjp7InRpdGxlIjoiQ2xvdWQgQ29uc29sZSJ9fSwiZXh0cmFQYXJhbXMiOnsicHJvdG9jb2wiOiJvYXV0aDIiLCJyZXNwb25zZV90eXBlIjoiY29kZSIsInNjb3BlIjoib3BlbmlkIHByb2ZpbGUiLCJfY3NyZiI6IkExVzJydDhxLVB3UDBSZWo3aWROZVF0VW10Wm9va25Bcko1USIsIl9pbnRzdGF0ZSI6ImRlcHJlY2F0ZWQiLCJzdGF0ZSI6ImhLRm8yU0J2ZFhCTlZWRjZWSEoyT1RSWlRFazFSM0JNZFhsNFNuSlJMV0ZvWDNVMFM2RnVwV3h2WjJsdW8zUnBaTmtnT1VOQ0xYbEVRbFZrTm1wNGFHbFZSRE5SU25oR1MySnJPRzFFZURGMFVuZWpZMmxrMlNCeFFqRmtTemxuUVhnMlZURklNVzFwU0RSTVpuZERjRFJSTVhremNWTmxXZyJ9LCJpbnRlcm5hbE9wdGlvbnMiOnsicHJvdG9jb2wiOiJvYXV0aDIiLCJyZXNwb25zZV90eXBlIjoiY29kZSIsInNjb3BlIjoib3BlbmlkIHByb2ZpbGUiLCJfY3NyZiI6IkExVzJydDhxLVB3UDBSZWo3aWROZVF0VW10Wm9va25Bcko1USIsIl9pbnRzdGF0ZSI6ImRlcHJlY2F0ZWQiLCJzdGF0ZSI6ImhLRm8yU0J2ZFhCTlZWRjZWSEoyT1RSWlRFazFSM0JNZFhsNFNuSlJMV0ZvWDNVMFM2RnVwV3h2WjJsdW8zUnBaTmtnT1VOQ0xYbEVRbFZrTm1wNGFHbFZSRE5SU25oR1MySnJPRzFFZURGMFVuZWpZMmxrMlNCeFFqRmtTemxuUVhnMlZURklNVzFwU0RSTVpuZERjRFJSTVhremNWTmxXZyJ9LCJ3aWRnZXRVcmwiOiJodHRwczovL2Nkbi5hdXRoMC5jb20vdzIvYXV0aDAtd2lkZ2V0LTUuMi5taW4uanMiLCJpc1RoaXJkUGFydHlDbGllbnQiOmZhbHNlLCJhdXRob3JpemF0aW9uU2VydmVyIjp7InVybCI6Imh0dHBzOi8vaWRlbnRpdHkuZXZlbnRzdG9yZS5jb20iLCJpc3N1ZXIiOiJodHRwczovL2lkZW50aXR5LmV2ZW50c3RvcmUuY29tLyJ9LCJjb2xvcnMiOnsicGFnZV9iYWNrZ3JvdW5kIjoiI2ZkZmFmZiIsInByaW1hcnkiOiIjMDBhZjAwIn19")))),go=mo.internalOptions.leeway;if(go){const t=parseInt(go);isNaN(t)||(mo.internalOptions.leeway=t)}const vo=new Qn({overrides:{__tenant:mo.auth0Tenant,__token_issuer:mo.authorizationServer.issuer},domain:mo.auth0Domain,clientID:mo.clientID,redirectUri:mo.callbackURL,responseType:"code",...mo.internalOptions});var bo;(async(t="kurrent")=>{document.querySelector("#logo")?.setAttribute("src",`https://assets.eventstore.com/logo/${t}`)})(mo.clientID),(()=>{try{!function(){const t=document.querySelector("#gl-canvas");if(!t)throw"unable to find #gl-canvas";addEventListener("resize",(()=>{t.width=window.innerWidth/4,t.height=window.innerHeight/4})),t.width=window.innerWidth/4,t.height=window.innerHeight/4;const r=t.getContext("webgl",{premultipliedAlpha:!1});if(null==r)throw"webgl not supported or unavailable";r.clearColor(0,0,0,1),r.clear(r.COLOR_BUFFER_BIT);const n="\n attribute vec4 aVertexPosition;\n void main(void) {\n gl_Position = aVertexPosition;\n }\n ",o=ro(r,r.VERTEX_SHADER,n),i=ro(r,r.FRAGMENT_SHADER,e(eo)),s=function(t,e,r){const n=t.createProgram();if(t.attachShader(n,e),t.attachShader(n,r),t.linkProgram(n),!t.getProgramParameter(n,t.LINK_STATUS))throw`Unable to initialize the shader program: ${t.getProgramInfoLog(n)}`;return n}(r,o,i),a=function(t){const e=new Float32Array([1,1,-1,1,1,-1,-1,-1]),r=t.createBuffer();return t.bindBuffer(t.ARRAY_BUFFER,r),t.bufferData(t.ARRAY_BUFFER,e,t.STATIC_DRAW),r}(r);!function(t,e,r){const n=new Date,o=36e5*n.getHours()+6e4*n.getMinutes()+1e3*n.getSeconds()+n.getMilliseconds(),i=n=>{t.viewport(0,0,t.canvas.width,t.canvas.height),t.clear(t.COLOR_BUFFER_BIT);const s=t.getAttribLocation(e,"aVertexPosition");t.bindBuffer(t.ARRAY_BUFFER,r),t.vertexAttribPointer(s,2,t.FLOAT,!1,0,0),t.enableVertexAttribArray(s),t.useProgram(e);const a=t.getUniformLocation(e,"u_resolution");t.uniform2f(a,t.canvas.width,t.canvas.height);const c=t.getUniformLocation(e,"u_time"),u=o+n;t.uniform1f(c,u/1e3);const p=t.getUniformLocation(e,"u_bands");t.uniform1f(p,t.canvas.width/4.5),t.drawArrays(t.TRIANGLE_STRIP,0,4),requestAnimationFrame(i)};requestAnimationFrame(i)}(r,s,a)}()}catch(t){return}})(),document.querySelectorAll('[role="tablist"]').forEach(fo),(()=>{const t=document.querySelector("#messages");t&&new ResizeObserver((([t])=>{document.documentElement.style.setProperty("--message-box-height",`${t.contentRect.height}px`)})).observe(t)})(),document.querySelector("#to_login")?.addEventListener("click",(()=>{document.querySelector("#forgot_password_panel")?.classList.add("hidden"),document.querySelector("#sent_email_panel")?.classList.add("hidden"),document.querySelector("#login_signup")?.classList.remove("hidden"),document.querySelector("#log_in_tab")?.click(),document.body.classList.remove("show_email")})),(()=>{const t=new URLSearchParams(document.location.search);if(!t.has("validated-email"))return;var e;"true"===t.get("success")?(e=t.get("message")??"Thank you for confirming your email, please login to continue.",io("success",e)):no(t.get("message")??"An error occured")})(),bo=vo,so("#log_in",(t=>new Promise((e=>{const r=t.get("email"),n=t.get("password");bo.login({realm:"Username-Password-Authentication",username:r,password:n},(t=>{t&&("request_error"===t.code?no("Something has gone wrong with your login, please try again later or contact support."):no(t.description??"Login failed")),e()}))})))),(t=>{so("#mfa_password",(e=>new Promise((r=>{const n=e.get("email"),o=e.get("password");t.login({realm:"Username-Password-Authentication",username:n,password:o},(t=>{t&&("request_error"===t.code?no("Something has gone wrong with your login, please try again later or contact support."):no(t.description??"Login failed")),r()}))}))))})(vo),(t=>{so("#sign_up",((e,r)=>new Promise((n=>{const o=e.get("name"),i=e.get("email"),s=e.get("password"),a=!!e.get("newsletter");t.signup({connection:"Username-Password-Authentication",email:i,password:s,userMetadata:{marketing:a?"true":"false",name:o}},(t=>t?(no(t.description??"Password reset failed"),n()):(ho({title:"We've just sent you a verification email.",body:"Once you have verified your email address you can log in here. If you have not received the verification email please check your “Spam” or ”Junk” folder."}),r.reset(),r.removeAttribute("validating"),n())))}))))})(vo),(t=>{document.querySelector("#forgot_password_button")?.addEventListener("click",(()=>{document.querySelector("#login_signup")?.classList.add("hidden"),document.querySelector("#forgot_password_panel")?.classList.remove("hidden")})),document.querySelector("#return_to_login")?.addEventListener("click",(()=>{document.querySelector("#forgot_password_panel")?.classList.add("hidden"),document.querySelector("#login_signup")?.classList.remove("hidden")})),so("#forgot_password",(e=>new Promise((r=>{const n=e.get("email");t.changePassword({connection:"Username-Password-Authentication",email:n},(t=>{if(t)return no(t.description??"Password reset failed"),r();ho({title:"We've just sent you an email to reset your password.",body:"If you have not received the password reset email please check your “Spam” or ”Junk” folder."}),r()}))}))))})(vo);