PageSourceSearch

https://transportnsw.info/_next/static/chunks/5596-5d4c5af04dee0904.js

js transportnsw.info collected 2026-10-01 10:12:11 UTC 125,656 bytes, 3 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5596],{584:(e,t,n)=>{n.d(t,{q:()=>o});let o=(e,t)=>(n,o)=>{let i={},r=t=>e(t,o);for(let e=t.length-1;e>=0;e--)r=(0,t[e])(o)(r,i);return r(n)}},1476:(e,t,n)=>{let o;n.d(t,{fE:()=>x});var i=n(85421);let r="6.16.2";var s=n(40459);let a=(e,t)=>!!Object.keys(e).find(e=>e.startsWith(t));var c=n(40459),d=n(40459),l=n(40459);let u=[{platform:i.dT.Expo,detectionMethod:function(){return"undefined"!=typeof global&&void 0!==global.expo}},{platform:i.dT.ReactNative,detectionMethod:function(){return"undefined"!=typeof navigator&&void 0!==navigator.product&&"ReactNative"===navigator.product}},{platform:i.dT.NextJs,detectionMethod:function(){return"undefined"!=typeof window&&window.next&&"object"==typeof window.next}},{platform:i.dT.Nuxt,detectionMethod:function(){return"undefined"!=typeof window&&(void 0!==window.__NUXT__||void 0!==window.$nuxt)}},{platform:i.dT.Angular,detectionMethod:function(){let e=!!("undefined"!=typeof document&&document.querySelector("[ng-version]")),t="undefined"!=typeof window&&void 0!==window.ng;return e||t}},{platform:i.dT.React,detectionMethod:function(){let e=e=>e.startsWith("_react")||e.startsWith("__react");return"undefined"!=typeof document&&Array.from(document.querySelectorAll("[id]")).some(t=>Object.keys(t).find(e))}},{platform:i.dT.VueJs,detectionMethod:function(){return"undefined"!=typeof window&&a(window,"__VUE")}},{platform:i.dT.Svelte,detectionMethod:function(){return"undefined"!=typeof window&&a(window,"__SVELTE")}},{platform:i.dT.WebUnknown,detectionMethod:function(){return"undefined"!=typeof window}},{platform:i.dT.NextJsSSR,detectionMethod:function(){return"undefined"!=typeof global&&(a(global,"__next")||a(global,"__NEXT"))}},{platform:i.dT.NuxtSSR,detectionMethod:function(){return"undefined"!=typeof global&&void 0!==global.__NUXT_PATHS__}},{platform:i.dT.ReactSSR,detectionMethod:function(){return void 0!==s&&void 0!==c.env&&!!Object.keys(c.env).find(e=>e.includes("react"))}},{platform:i.dT.VueJsSSR,detectionMethod:function(){return"undefined"!=typeof global&&a(global,"__VUE")}},{platform:i.dT.AngularSSR,detectionMethod:function(){return void 0!==s&&"object"==typeof l.env&&l.env.npm_lifecycle_script?.startsWith("ng ")||!1}},{platform:i.dT.SvelteSSR,detectionMethod:function(){return void 0!==s&&void 0!==d.env&&!!Object.keys(d.env).find(e=>e.includes("svelte"))}}],p=[],h=!1,g=()=>{if(!o){if(o=u.find(e=>e.detectionMethod())?.platform||i.dT.ServerSideUnknown,h)for(;p.length;)p.pop()?.();else p.forEach(e=>{e()});E(i.dT.ServerSideUnknown,10),E(i.dT.WebUnknown,10)}return o};function E(e,t){o!==e||h||setTimeout(()=>{o=void 0,h=!0,setTimeout(g,1e3)},t)}let m={},f="aws-amplify",y=e=>e.replace(/\+.*/,"");class I{constructor(){this.userAgent=`${f}/${y(r)}`}get framework(){return g()}get isReactNative(){return this.framework===i.dT.ReactNative||this.framework===i.dT.Expo}observeFrameworkChanges(e){h||p.push(e)}}new I;let x=e=>(({category:e,action:t}={})=>{let n=[[f,y(r)]];if(e&&n.push([e,t]),n.push(["framework",g()]),e&&t){let o=m[e]?.[t]?.additionalDetails;o&&o.forEach(e=>{n.push(e)})}return n})(e).map(([e,t])=>e&&t?`${e}/${t}`:e).join(" ")},3422:(e,t,n)=>{n.d(t,{C:()=>a});var o=n(97026),i=n(88641),r=n(43428),s=n(1476);let a={service:n(76756).M,retryDecider:(0,o.D)(i.F),computeDelay:r.y,get userAgentValue(){return(0,s.fE)()},cache:"no-store"}},4533:(e,t,n)=>{function o(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)"__proto__"!==o&&(e[o]=n[o])}return e}n.d(t,{E:()=>z});var i=function e(t,n){function i(e,i,r){if("undefined"!=typeof document){"number"==typeof(r=o({},n,r)).expires&&(r.expires=new Date(Date.now()+864e5*r.expires)),r.expires&&(r.expires=r.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var s="";for(var a in r)r[a]&&(s+="; "+a,!0!==r[a]&&(s+="="+r[a].split(";")[0]));return document.cookie=e+"="+t.write(i,e)+s}}return Object.create({set:i,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var n=document.cookie?document.cookie.split("; "):[],o={},i=0;i<n.length;i++){var r=n[i].split("="),s=r.slice(1).join("=");try{var a=decodeURIComponent(r[0]);if(a in o||(o[a]=t.read(s,a)),e===a)break}catch(e){}}return e?o[e]:o}},remove:function(e,t){i(e,"",o({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,o({},this.attributes,t))},withConverter:function(t){return e(o({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decode
1URIComponent)}},{path:"/"});class r{constructor(e={}){let{path:t,domain:n,expires:o,sameSite:i,secure:r}=e;if(this.domain=n,this.path=t||"/",this.expires=Object.prototype.hasOwnProperty.call(e,"expires")?o:365,this.secure=!Object.prototype.hasOwnProperty.call(e,"secure")||r,Object.prototype.hasOwnProperty.call(e,"sameSite")){if(!i||!["strict","lax","none"].includes(i))throw Error('The sameSite value of cookieStorage must be "lax", "strict" or "none".');if("none"===i&&!this.secure)throw Error("sameSite = None requires the Secure attribute in latest browser versions.");this.sameSite=i}}async setItem(e,t){i.set(e,t,this.getData())}async getItem(e){return i.get(e)??null}async removeItem(e){i.remove(e,this.getData())}async clear(){let e=Object.keys(i.get()).map(e=>this.removeItem(e));await Promise.all(e)}getData(){return{path:this.path,expires:this.expires,domain:this.domain,secure:this.secure,...this.sameSite&&{sameSite:this.sameSite}}}}var s=n(63215),a=n(8426),c=n(42181),d=n(10434);n(26899),n(13599);var l=n(1476),u=n(99846),p=n(88641),h=n(14924),g=n(43428),E=n(97026);let m="cognito-identity",f={service:m,retryDecider:(0,E.D)(p.F),computeDelay:g.y,cache:"no-store"};var y=n(9930);let I=(0,n(584).q)(y.F,[()=>e=>async function(t){return t.headers["cache-control"]="no-store",e(t)}]),x=e=>(t,n)=>w(n,S(e),JSON.stringify(t)),S=e=>({"content-type":"application/x-amz-json-1.1","x-amz-target":`AWSCognitoIdentityService.${e}`}),w=({url:e},t,n)=>({headers:t,url:e,body:n,method:"POST"}),v=e=>(0,h.A)(I,x("GetCredentialsForIdentity"),A,{...f,...e,userAgentValue:(0,l.fE)()}),A=async e=>{if(e.statusCode>=300)throw await (0,p.F)(e);let t=await (0,p.Y)(e);return{IdentityId:t.IdentityId,Credentials:C(t.Credentials),$metadata:(0,u.j)(e)}},C=({Expiration:e,...t}={})=>({...t,Expiration:e&&new Date(1e3*e)});var P=n(16095),R=n(13989),T=n(29592),N=n(23750),U=n(55799),_=n(22560),b=n(59034);let M=({endpointOverride:e})=>t=>e?{url:new b.o(e)}:(({region:e})=>({url:new b.o(`https://${m}.${e}.${(0,_.R)(e)}`)}))(t),O=async e=>{if(e.statusCode>=300)throw await (0,p.F)(e);return{IdentityId:(await (0,p.Y)(e)).IdentityId,$metadata:(0,u.j)(e)}};function k(e){let t=(0,P.Cq)(e).payload.iss,n={};if(!t)throw new R.l({name:"InvalidIdTokenException",message:"Invalid Idtoken."});return n[t.replace(/(^\w+:|^)\/\//,"")]=e,n}async function D({tokens:e,authConfig:t,identityIdStore:n}){n.setAuthConfig({Cognito:t});let o=await n.loadIdentityId();if(o)return o.id;let i=e?.idToken?k(e.idToken.toString()):{},r=await F(i,t);return n.storeIdentityId({id:r,type:e?"primary":"guest"}),r}async function F(e,t){let n,o,i=t?.identityPoolId,r=(0,N.C)(i),s=(o={endpointResolver:M({endpointOverride:t.identityPoolEndpoint})},(0,h.A)(I,x("GetId"),O,{...f,...o,userAgentValue:(0,l.fE)()}));try{n=(await s({region:r},{IdentityPoolId:i,Logins:e})).IdentityId}catch(e){throw(0,T.e)(e),new R.l(e)}if(!n)throw new R.l({name:"GetIdResponseException",message:"Received undefined response from getId operation",recoverySuggestion:"Make sure to pass a valid identityPoolId in the configuration."});return n}let L=new d.C("CognitoCredentialsProvider");class V{constructor(e){this._nextCredentialsRefresh=0,this._identityIdStore=e}async clearCredentialsAndIdentityId(){L.debug("Clearing out credentials and identityId"),this._credentialsAndIdentityId=void 0,await this._identityIdStore.clearIdentityId()}async clearCredentials(){L.debug("Clearing out in-memory credentials"),this._credentialsAndIdentityId=void 0}async getCredentialsAndIdentityId(e){let t=e.authenticated,{tokens:n}=e,{authConfig:o}=e;try{(0,P.Eh)(o?.Cognito)}catch{return}if(!t&&!o.Cognito.allowGuestAccess)return;let{forceRefresh:i}=e,r=this.hasTokenChanged(n),s=await D({tokens:n,authConfig:o.Cognito,identityIdStore:this._identityIdStore});return((i||r)&&this.clearCredentials(),t)?((0,U.OW)(n),this.credsForOIDCTokens(o.Cognito,n,s)):this.getGuestCredentials(s,o.Cognito)}async getGuestCredentials(e,t){let n;if(this._credentialsAndIdentityId&&!this.isPastTTL()&&!1===this._credentialsAndIdentityId.isAuthenticatedCreds)return L.info("returning stored credentials as they neither past TTL n
1or expired."),this._credentialsAndIdentityId;this.clearCredentials();let o=(0,N.C)(t.identityPoolId),i=v({endpointResolver:M({endpointOverride:t.identityPoolEndpoint})});try{n=await i({region:o},{IdentityId:e})}catch(e){throw(0,T.e)(e),new R.l(e)}if(n?.Credentials?.AccessKeyId&&n?.Credentials?.SecretKey){this._nextCredentialsRefresh=new Date().getTime()+3e6;let t={credentials:{accessKeyId:n.Credentials.AccessKeyId,secretAccessKey:n.Credentials.SecretKey,sessionToken:n.Credentials.SessionToken,expiration:n.Credentials.Expiration},identityId:e};return n.IdentityId&&(t.identityId=n.IdentityId,this._identityIdStore.storeIdentityId({id:n.IdentityId,type:"guest"})),this._credentialsAndIdentityId={...t,isAuthenticatedCreds:!1},t}throw new R.l({name:"CredentialsNotFoundException",message:"Cognito did not respond with either Credentials, AccessKeyId or SecretKey."})}async credsForOIDCTokens(e,t,n){let o;if(this._credentialsAndIdentityId&&!this.isPastTTL()&&!0===this._credentialsAndIdentityId.isAuthenticatedCreds)return L.debug("returning stored credentials as they neither past TTL nor expired."),this._credentialsAndIdentityId;this.clearCredentials();let i=t.idToken?k(t.idToken.toString()):{},r=(0,N.C)(e.identityPoolId),s=v({endpointResolver:M({endpointOverride:e.identityPoolEndpoint})});try{o=await s({region:r},{IdentityId:n,Logins:i})}catch(e){throw(0,T.e)(e),new R.l(e)}if(o?.Credentials?.AccessKeyId&&o?.Credentials?.SecretKey){this._nextCredentialsRefresh=new Date().getTime()+3e6;let e={credentials:{accessKeyId:o.Credentials.AccessKeyId,secretAccessKey:o.Credentials.SecretKey,sessionToken:o.Credentials.SessionToken,expiration:o.Credentials.Expiration},identityId:n};return o.IdentityId&&(e.identityId=o.IdentityId,this._identityIdStore.storeIdentityId({id:o.IdentityId,type:"primary"})),this._credentialsAndIdentityId={...e,isAuthenticatedCreds:!0,associatedIdToken:t.idToken?.toString()},e}throw new R.l({name:"CredentialsException",message:"Cognito did not respond with either Credentials, AccessKeyId or SecretKey."})}isPastTTL(){return void 0===this._nextCredentialsRefresh||this._nextCredentialsRefresh<=Date.now()}hasTokenChanged(e){return!!e&&!!this._credentialsAndIdentityId?.associatedIdToken&&e.idToken?.toString()!==this._credentialsAndIdentityId.associatedIdToken}}var q=n(9494);let K={identityId:"identityId"},$=new d.C("DefaultIdentityIdStore");class B{setAuthConfig(e){(0,P.Eh)(e.Cognito),this.authConfig=e,this._authKeys=H("Cognito",e.Cognito.identityPoolId)}constructor(e){this._authKeys={},this._hasGuestIdentityId=!1,this.keyValueStorage=e}async loadIdentityId(){(0,P.Eh)(this.authConfig?.Cognito);try{if(this._primaryIdentityId)return{id:this._primaryIdentityId,type:"primary"};{let e=await this.keyValueStorage.getItem(this._authKeys.identityId);if(e)return this._hasGuestIdentityId=!0,{id:e,type:"guest"};return null}}catch(e){return $.log("Error getting stored IdentityId.",e),null}}async storeIdentityId(e){(0,P.Eh)(this.authConfig?.Cognito),"guest"===e.type?(this.keyValueStorage.setItem(this._authKeys.identityId,e.id),this._primaryIdentityId=void 0,this._hasGuestIdentityId=!0):(this._primaryIdentityId=e.id,this._hasGuestIdentityId&&(this.keyValueStorage.removeItem(this._authKeys.identityId),this._hasGuestIdentityId=!1))}async clearIdentityId(){this._primaryIdentityId=void 0,await this.keyValueStorage.removeItem(this._authKeys.identityId)}}let H=(e,t)=>(0,q.Qm)(K)(`com.amplify.${e}`,t),W=new V(new B(s.ZL));var G=n(63471);let z={configure(e,t){let n=(0,c.M)(e),o=new r({sameSite:"lax"}),i=t?.ssr?o:s.ZL,d=t?.ssr?new V(new B(o)):W;if(!n.Auth||t?.Auth)return void a.H.configure(n,t);if(!a.H.libraryOptions.Auth){G.Q.setAuthConfig(n.Auth),G.Q.setKeyValueStorage(i),a.H.configure(n,{...t,Auth:{tokenProvider:G.Q,credentialsProvider:d}});return}if(t){let e=a.H.libraryOptions.Auth;void 0!==t.ssr&&(G.Q.setKeyValueStorage(i),e.credentialsProvider=d),a.H.configure(n,{Auth:e,...t});return}a.H.configure(n)},getConfig:()=>a.H.getConfig()}},6846:(e,t,n)=>{n.d(t,{$6:()=>l,A0:()=>a,Cs:()=>p,RW:()=>c,jK:()=>d,kM:()=>s,mh:()=>u,yA:()=>h,z0:()=>r,zz:()=>i});var o=n(13989);let i="UserUnAuthenticatedException",r="UserAlreadyAuthenticatedException",s="DeviceMetadataNotFoundException",a="AutoSignInException",c=new o.l({name:"InvalidRedirectException",message:"signInRedirect or signOutRedirect had an invali
1d format or was not found.",recoverySuggestion:"Please make sure the signIn/Out redirect in your oauth config is valid."});new o.l({name:"InvalidAppSchemeException",message:"A valid non-http app scheme was not found in the config.",recoverySuggestion:"Please make sure a valid custom app scheme is present in the config."});let d=new o.l({name:"InvalidPreferredRedirectUrlException",message:"The given preferredRedirectUrl does not match any items in the redirectSignOutUrls array from the config.",recoverySuggestion:"Please make sure a matching preferredRedirectUrl is provided."}),l=new o.l({name:"InvalidOriginException",message:"redirect is coming from a different origin. The oauth flow needs to be initiated from the same origin",recoverySuggestion:"Please call signInWithRedirect from the same origin."}),u="OAuthSignOutException",p="TokenRefreshException",h="UnexpectedSignInInterruptionException"},7232:(e,t,n)=>{n.d(t,{M:()=>r});var o=n(48557),i=n(13989);function r(e,t){let{message:n,recoverySuggestion:r}=o.ut[t];if(!e)throw new i.l({name:t,message:n,recoverySuggestion:r})}},8426:(e,t,n)=>{n.d(t,{H:()=>u});var o=n(91216);let i=e=>{for(let t of Reflect.ownKeys(e)){let n=e[t];(n&&"object"==typeof n||"function"==typeof n)&&i(n)}return Object.freeze(e)},r=Symbol("oauth-listener");var s=n(42181);n(26899),n(13599);let a=new(n(10434)).C("Auth");class c{configure(e,t){this.authConfig=e,this.authOptions=t,e&&e.Cognito?.userPoolEndpoint&&a.warn(d("Amazon Cognito User Pool")),e&&e.Cognito?.identityPoolEndpoint&&a.warn(d("Amazon Cognito Identity Pool"))}async fetchAuthSession(e={}){let t,n,o=await this.getTokens(e);return o?(n=o.accessToken?.payload?.sub,t=await this.authOptions?.credentialsProvider?.getCredentialsAndIdentityId({authConfig:this.authConfig,tokens:o,authenticated:!0,forceRefresh:e.forceRefresh})):t=await this.authOptions?.credentialsProvider?.getCredentialsAndIdentityId({authConfig:this.authConfig,authenticated:!1,forceRefresh:e.forceRefresh}),{tokens:o,credentials:t?.credentials,identityId:t?.identityId,userSub:n}}async clearCredentials(){await this.authOptions?.credentialsProvider?.clearCredentialsAndIdentityId()}async getTokens(e){return await this.authOptions?.tokenProvider?.getTokens(e)??void 0}}let d=e=>`You are using a custom Amazon ${e} endpoint, ensure the endpoint is correct.`;class l{constructor(){this.oAuthListener=void 0,this.isConfigured=!1,this.resourcesConfig={},this.libraryOptions={},this.Auth=new c}configure(e,t){let n=(0,s.M)(e);this.resourcesConfig=n,t&&(this.libraryOptions=t),this.resourcesConfig=i(this.resourcesConfig),this.Auth.configure(this.resourcesConfig.Auth,this.libraryOptions.Auth),(this.resourcesConfig.Analytics?.Pinpoint||this.resourcesConfig.Notifications?.InAppMessaging?.Pinpoint||this.resourcesConfig.Notifications?.PushNotification?.Pinpoint)&&console.warn("AWS will end support for Amazon Pinpoint on October 30, 2026. The guidance is to use AWS End User Messaging for push notifications and SMS, Amazon Simple Email Service for sending emails, Amazon Connect for campaigns, journeys, endpoints, and engagement analytics. Pinpoint recommends Amazon Kinesis for event collection and mobile analytics."),o.YZ.dispatch("core",{event:"configure",data:this.resourcesConfig},"Configure",o.U9),this.notifyOAuthListener(),this.isConfigured=!0}getConfig(){return this.isConfigured||console.warn("Amplify has not been configured. Please call Amplify.configure() before using this service."),this.resourcesConfig}[r](e){this.resourcesConfig.Auth?.Cognito.loginWith?.oauth?e(this.resourcesConfig.Auth?.Cognito):this.oAuthListener=e}notifyOAuthListener(){this.resourcesConfig.Auth?.Cognito.loginWith?.oauth&&this.oAuthListener&&(this.oAuthListener(this.resourcesConfig.Auth?.Cognito),this.oAuthListener=void 0)}}let u=new l},9345:(e,t,n)=>{n.d(t,{H:()=>c});var o=n(14924),i=n(27429),r=n(95186),s=n(92835),a=n(3422);let c=e=>(0,o.A)(i.e,(0,r._)("RespondToAuthChallenge"),(0,s.T)(),{...a.C,...e})},9494:(e,t,n)=>{n.d(t,{Uv:()=>u,Qm:()=>h});var o,i=n(16095),r=n(13989);let s={accessToken:"accessToken",idToken:"idToken",oidcProvider:"oidcProvider",clockDrift:"clockDrift",refreshToken:"refreshToken",deviceKey:"deviceKey",randomPasswordKey:"randomPasswordKey",deviceGroupKey:"deviceGroupKey",signInDetail
1s:"signInDetails",oauthMetadata:"oauthMetadata"};var a=n(72898);(o||(o={})).InvalidAuthTokens="InvalidAuthTokens";let c={[o.InvalidAuthTokens]:{message:"Invalid tokens.",recoverySuggestion:"Make sure the tokens are valid."}},d=(0,a.p)(c),l="CognitoIdentityServiceProvider";class u{getKeyValueStorage(){if(!this.keyValueStorage)throw new r.l({name:"KeyValueStorageNotFoundException",message:"KeyValueStorage was not found in TokenStore"});return this.keyValueStorage}setKeyValueStorage(e){this.keyValueStorage=e}setAuthConfig(e){this.authConfig=e}async loadTokens(){try{let e=await this.getAuthKeys(),t=await this.getKeyValueStorage().getItem(e.accessToken);if(!t)throw new r.l({name:"NoSessionFoundException",message:"Auth session was not found. Make sure to call signIn."});let n=(0,i.Cq)(t),o=await this.getKeyValueStorage().getItem(e.idToken),s=o?(0,i.Cq)(o):void 0,a=await this.getKeyValueStorage().getItem(e.refreshToken)??void 0,c=await this.getKeyValueStorage().getItem(e.clockDrift)??"0",d=Number.parseInt(c),l=await this.getKeyValueStorage().getItem(e.signInDetails),u={accessToken:n,idToken:s,refreshToken:a,deviceMetadata:await this.getDeviceMetadata()??void 0,clockDrift:d,username:await this.getLastAuthUser()};return l&&(u.signInDetails=JSON.parse(l)),u}catch(e){return null}}async storeTokens(e){d(void 0!==e,o.InvalidAuthTokens);let t=e.username;await this.getKeyValueStorage().setItem(this.getLastAuthUserKey(),t);let n=await this.getAuthKeys();await this.getKeyValueStorage().setItem(n.accessToken,e.accessToken.toString()),e.idToken?await this.getKeyValueStorage().setItem(n.idToken,e.idToken.toString()):await this.getKeyValueStorage().removeItem(n.idToken),e.refreshToken?await this.getKeyValueStorage().setItem(n.refreshToken,e.refreshToken):await this.getKeyValueStorage().removeItem(n.refreshToken),e.deviceMetadata&&(e.deviceMetadata.deviceKey&&await this.getKeyValueStorage().setItem(n.deviceKey,e.deviceMetadata.deviceKey),e.deviceMetadata.deviceGroupKey&&await this.getKeyValueStorage().setItem(n.deviceGroupKey,e.deviceMetadata.deviceGroupKey),await this.getKeyValueStorage().setItem(n.randomPasswordKey,e.deviceMetadata.randomPassword)),e.signInDetails?await this.getKeyValueStorage().setItem(n.signInDetails,JSON.stringify(e.signInDetails)):await this.getKeyValueStorage().removeItem(n.signInDetails),await this.getKeyValueStorage().setItem(n.clockDrift,`${e.clockDrift}`)}async clearTokens(){let e=await this.getAuthKeys();await Promise.all([this.getKeyValueStorage().removeItem(e.accessToken),this.getKeyValueStorage().removeItem(e.idToken),this.getKeyValueStorage().removeItem(e.clockDrift),this.getKeyValueStorage().removeItem(e.refreshToken),this.getKeyValueStorage().removeItem(e.signInDetails),this.getKeyValueStorage().removeItem(this.getLastAuthUserKey()),this.getKeyValueStorage().removeItem(e.oauthMetadata)])}async getDeviceMetadata(e){let t=await this.getAuthKeys(e),n=await this.getKeyValueStorage().getItem(t.deviceKey),o=await this.getKeyValueStorage().getItem(t.deviceGroupKey),i=await this.getKeyValueStorage().getItem(t.randomPasswordKey);return i&&o&&n?{deviceKey:n,deviceGroupKey:o,randomPassword:i}:null}async clearDeviceMetadata(e){let t=await this.getAuthKeys(e);await Promise.all([this.getKeyValueStorage().removeItem(t.deviceKey),this.getKeyValueStorage().removeItem(t.deviceGroupKey),this.getKeyValueStorage().removeItem(t.randomPasswordKey)])}async getAuthKeys(e){(0,i.$y)(this.authConfig?.Cognito);let t=e??await this.getLastAuthUser();return p(l,`${this.authConfig.Cognito.userPoolClientId}.${t}`)}getLastAuthUserKey(){(0,i.$y)(this.authConfig?.Cognito);let e=this.authConfig.Cognito.userPoolClientId;return`${l}.${e}.LastAuthUser`}async getLastAuthUser(){return await this.getKeyValueStorage().getItem(this.getLastAuthUserKey())??"username"}async setOAuthMetadata(e){let{oauthMetadata:t}=await this.getAuthKeys();await this.getKeyValueStorage().setItem(t,JSON.stringify(e))}async getOAuthMetadata(){let{oauthMetadata:e}=await this.getAuthKeys(),t=await this.getKeyValueStorage().getItem(e);return t&&JSON.parse(t)}}let p=(e,t)=>h(s)(`${e}`,t);function h(e){let t=Object.values({...e});return(e,n)=>t.reduce((t,o)=>({...t,[o]:`${e}.${n}.${o}`}),{})}},9811:(e,t,n)=>{n.d(t,{m:()=>i});var o=n(19939);let i={convert(e,t){let n=e;return t?.urlSafe&&(n=n.replace(/-/g,"+").replace(/_/g,"/")),(0,o.nW)()(n)}}},9930:(e,t,n)=>{n.d(t,{F:()=>p});var o=n(74500);let i=(e,t)=>{let n,o;
1if(t?.aborted)return Promise.resolve();let i=new Promise(t=>{o=t,n=setTimeout(t,e)});return t?.addEventListener("abort",function e(i){clearTimeout(n),t?.removeEventListener("abort",e),o()}),i},r=(e,t)=>{"[object Object]"===Object.prototype.toString.call(e)&&(e.$metadata={...e.$metadata??{},attempts:t})};var s=n(98462);n(26899),n(13599);var a=n(584),c=n(28498),d=n(54645);let l=e=>{let t;return()=>(t||(t=e()),t)},u=async({url:e,method:t,headers:n,body:o},{abortSignal:i,cache:r,withCrossDomainCredentials:s})=>{let a;try{a=await fetch(e,{method:t,headers:n,body:["HEAD","GET"].includes(t.toUpperCase())?void 0:o,signal:i,cache:r,credentials:s?"include":"same-origin"})}catch(e){if(e instanceof TypeError)throw new c.x({name:d.m.NetworkError,message:"A network error has occurred.",underlyingError:e});throw e}let u={};a.headers?.forEach((e,t)=>{u[t.toLowerCase()]=e});let p={statusCode:a.status,headers:u,body:null},h=Object.assign(a.body??{},{text:l(()=>a.text()),blob:l(()=>a.blob()),json:l(()=>a.json())});return{...p,body:h}},p=(0,a.q)(u,[({userAgentHeader:e="x-amz-user-agent",userAgentValue:t=""})=>n=>async function(o){if(0===t.trim().length)return await n(o);{let i=e.toLowerCase();return o.headers[i]=o.headers[i]?`${o.headers[i]} ${t}`:t,await n(o)}},()=>e=>async function(t){return t.headers[o.jy]||(t.headers[o.jy]=(0,s.G)()),e(t)},({maxAttempts:e=o.K7,retryDecider:t,computeDelay:n,abortSignal:s})=>{if(e<1)throw Error("maxAttempts must be greater than 0");return(o,a)=>async function(c){let d,l,u=a.attemptsCount??0,p=()=>{if(l)return r(l,u),l;throw r(d,u),d};for(;!s?.aborted&&u<e;){try{l=await o(c),d=void 0}catch(e){d=e,l=void 0}u=(a.attemptsCount??0)>u?a.attemptsCount??0:u+1,a.attemptsCount=u;let{isCredentialsExpiredError:r,retryable:h}=await t(l,d,a);if(!h)return p();if(a.isCredentialsExpired=!!r,!s?.aborted&&u<e){let e=n(u);await i(e,s)}}if(!s?.aborted)return p();throw Error("Request aborted.")}},({maxAttempts:e=o.K7})=>(t,n)=>async function(i){let r=n.attemptsCount??0;return i.headers[o.Q8]=`attempt=${r+1}; max=${e}`,t(i)}])},10434:(e,t,n)=>{n.d(t,{C:()=>s});var o,i=n(95955);!function(e){e.DEBUG="DEBUG",e.ERROR="ERROR",e.INFO="INFO",e.WARN="WARN",e.VERBOSE="VERBOSE",e.NONE="NONE"}(o||(o={}));let r={VERBOSE:1,DEBUG:2,INFO:3,WARN:4,ERROR:5,NONE:6};class s{constructor(e,t=o.WARN){this.name=e,this.level=t,this._pluggables=[]}_padding(e){return e<10?"0"+e:""+e}_ts(){let e=new Date;return[this._padding(e.getMinutes()),this._padding(e.getSeconds())].join(":")+"."+e.getMilliseconds()}configure(e){return e&&(this._config=e),this._config}_log(e,...t){let n=this.level;s.LOG_LEVEL&&(n=s.LOG_LEVEL),"undefined"!=typeof window&&window.LOG_LEVEL&&(n=window.LOG_LEVEL);let i=r[n];if(!(r[e]>=i))return;let a=console.log.bind(console);e===o.ERROR&&console.error&&(a=console.error.bind(console)),e===o.WARN&&console.warn&&(a=console.warn.bind(console)),s.BIND_ALL_LOG_LEVELS&&(e===o.INFO&&console.info&&(a=console.info.bind(console)),e===o.DEBUG&&console.debug&&(a=console.debug.bind(console)));let c=`[${e}] ${this._ts()} ${this.name}`,d="";if(1===t.length&&"string"==typeof t[0])a(d=`${c} - ${t[0]}`);else if(1===t.length)d=`${c} ${t[0]}`,a(c,t[0]);else if("string"==typeof t[0]){let e=t.slice(1);1===e.length&&(e=e[0]),d=`${c} - ${t[0]} ${e}`,a(`${c} - ${t[0]}`,e)}else d=`${c} ${t}`,a(c,t);for(let e of this._pluggables){let t={message:d,timestamp:Date.now()};e.pushLogs([t])}}log(...e){this._log(o.INFO,...e)}info(...e){this._log(o.INFO,...e)}warn(...e){this._log(o.WARN,...e)}error(...e){this._log(o.ERROR,...e)}debug(...e){this._log(o.DEBUG,...e)}verbose(...e){this._log(o.VERBOSE,...e)}addPluggable(e){e&&e.getCategoryName()===i.OU&&(this._pluggables.push(e),e.configure(this._config))}listPluggables(){return this._pluggables}}s.LOG_LEVEL=null,s.BIND_ALL_LOG_LEVELS=!1},13599:(e,t,n)=>{n.d(t,{n:()=>r});let o={},i={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();1===t.length&&(t=`0${t}`),o[e]=t,i[t]=e}function r(e){let t="";for(let n=0;n<e.byteLength;n++)t+=o[e[n]];return t}},13626:(e,t,n)=>{n.d(t,{y:()=>i});var o=n(37746);function i(e=o.M){return t=>{let n=2**t*100+100*Math.random();return!(n>e)&&n}}}
1,13989:(e,t,n)=>{n.d(t,{l:()=>i});var o=n(28498);class i extends o.x{constructor(e){super(e),this.constructor=i,Object.setPrototypeOf(this,i.prototype)}}},14240:(e,t,n)=>{n.d(t,{d:()=>i});var o=n(82447);let i=e=>{if(e.length%2!=0)throw Error("Hex encoded strings must have an even number length");let t=new Uint8Array(e.length/2);for(let n=0;n<e.length;n+=2){let i=e.slice(n,n+2).toLowerCase();if(i in o.hv)t[n/2]=o.hv[i];else throw Error(`Cannot decode unrecognized sequence ${i} as hexadecimal`)}return t}},14924:(e,t,n)=>{n.d(t,{A:()=>o});let o=(e,t,n,o)=>async(i,r)=>{let s={...o,...i},a=await s.endpointResolver(s,r),c=await t(r,a);return n(await e(c,{...s}))}},15890:(e,t,n)=>{var o;n.d(t,{P:()=>o}),function(e){e.EmptySignInUsername="EmptySignInUsername",e.EmptySignInPassword="EmptySignInPassword",e.CustomAuthSignInPassword="CustomAuthSignInPassword",e.EmptySignUpUsername="EmptySignUpUsername",e.EmptySignUpPassword="EmptySignUpPassword",e.EmptyConfirmSignUpUsername="EmptyConfirmSignUpUsername",e.EmptyConfirmSignUpCode="EmptyConfirmSignUpCode",e.EmptyResendSignUpCodeUsername="EmptyresendSignUpCodeUsername",e.EmptyChallengeResponse="EmptyChallengeResponse",e.EmptyConfirmResetPasswordUsername="EmptyConfirmResetPasswordUsername",e.EmptyConfirmResetPasswordNewPassword="EmptyConfirmResetPasswordNewPassword",e.EmptyConfirmResetPasswordConfirmationCode="EmptyConfirmResetPasswordConfirmationCode",e.EmptyResetPasswordUsername="EmptyResetPasswordUsername",e.EmptyVerifyTOTPSetupCode="EmptyVerifyTOTPSetupCode",e.EmptyConfirmUserAttributeCode="EmptyConfirmUserAttributeCode",e.IncorrectMFAMethod="IncorrectMFAMethod",e.EmptyUpdatePassword="EmptyUpdatePassword",e.InvalidPreferredChallenge="InvalidPreferredChallenge"}(o||(o={}))},16095:(e,t,n)=>{n.d(t,{Eh:()=>l,G6:()=>d,$y:()=>c,Cq:()=>u});var o,i=n(9811),r=n(72898);!function(e){e.AuthTokenConfigException="AuthTokenConfigException",e.AuthUserPoolAndIdentityPoolException="AuthUserPoolAndIdentityPoolException",e.AuthUserPoolException="AuthUserPoolException",e.InvalidIdentityPoolIdException="InvalidIdentityPoolIdException",e.OAuthNotConfigureException="OAuthNotConfigureException"}(o||(o={}));let s={[o.AuthTokenConfigException]:{message:"Auth Token Provider not configured.",recoverySuggestion:"Make sure to call Amplify.configure in your app."},[o.AuthUserPoolAndIdentityPoolException]:{message:"Auth UserPool or IdentityPool not configured.",recoverySuggestion:"Make sure to call Amplify.configure in your app with UserPoolId and IdentityPoolId."},[o.AuthUserPoolException]:{message:"Auth UserPool not configured.",recoverySuggestion:"Make sure to call Amplify.configure in your app with userPoolId and userPoolClientId."},[o.InvalidIdentityPoolIdException]:{message:"Invalid identity pool id provided.",recoverySuggestion:"Make sure a valid identityPoolId is given in the config."},[o.OAuthNotConfigureException]:{message:"oauth param not configured.",recoverySuggestion:"Make sure to call Amplify.configure with oauth parameter in your app."}},a=(0,r.p)(s);function c(e){a(!!e&&!!e.userPoolId&&!!e.userPoolClientId,o.AuthUserPoolException)}function d(e){a(!!e?.loginWith?.oauth?.domain&&!!e?.loginWith?.oauth?.redirectSignOut&&!!e?.loginWith?.oauth?.redirectSignIn&&!!e?.loginWith?.oauth?.responseType,o.OAuthNotConfigureException)}function l(e){a(!!e?.identityPoolId,o.InvalidIdentityPoolIdException)}function u(e){let t=e.split(".");if(3!==t.length)throw Error("Invalid token");try{let n=t[1].replace(/-/g,"+").replace(/_/g,"/"),o=decodeURIComponent(i.m.convert(n).split("").map(e=>`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`).join("")),r=JSON.parse(o);return{toString:()=>e,payload:r}}catch(e){throw Error("Invalid token payload")}}},17204:(e,t,n)=>{n.d(t,{Y:()=>i});var o=n(19939);let i={convert(e,t={urlSafe:!1,skipPadding:!1}){let n="string"==typeof e?e:Array.from(e,e=>String.fromCodePoint(e)).join(""),i=(0,o.xA)()(n);return t.urlSafe&&(i=i.replace(/\+/g,"-").replace(/\//g,"_")),t.skipPadding&&(i=i.replace(/=/g,"")),i}}},17422:(e,t,n)=>{n.d(t,{$:()=>o});let o=(e,t)=>e.Auth.fetchAuthSession(t)},17685:(e,t,n)=>{n.d(t,{q:()=>r});let o=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],i=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],r=()=>{let e=new Date,t=i[e.getUTCDay()],n=o[e.getUTCMonth()],r=e.getUTCDate(),s=e.getUTCHours();s<10&&(s=`0${s}`);let a=e.getUTCMinutes();a<10&&(a=`0${a}`);let c=e.getUTCSeconds();c<10&&(c=`0${c}`);let d=e.getUTCFullYear();return`${t} ${n} ${r} ${s}:${a}:${c} UTC ${d}`}},19636:(e,t,n)=>{n.d(t,{c$:()=>d,jN:()=>s,wr:()=>l});var o=n(63215);let i="CognitoSignInState",r={username:`${i}.username`,challengeName:`${i}.challengeName`,signInSession:`${i}.signInSession`,expiry:`${i}.expiry`},s=()=>{d.dispatch({type:"RESET_STATE"})},a=()=>{for(let e of Object.values(r))o.pR.removeItem(e)},c=()=>({username:void 0,challengeName:void 0,signInSession:void 0}),d=(e=>{let t=e(c(),{type:"SET_INITIAL_STATE"});return{getState:()=>t,dispatch:n=>{t=e(t,n)}}})((e,t)=>{switch(t.type){case"SET_SIGN_IN_SESSION":return u({signInSession:t.value}),{...e,signInSession:t.value};case"SET_SIGN_IN_STATE":return u(t.value),{...t.value};case"SET_CHALLENGE_NAME":return u({challengeName:t.value}),{...e,challengeName:t.value};case"SET_USERNAME":return u({username:t.value}),{...e,username:t.value};case"SET_INITIAL_STATE":return(()=>{let e=o.pR.getItem(r.expiry);if(!e||Number(e)<=Date.now())return a(),c();let t=o.pR.getItem(r.username)??void 0;return{username:t,challengeName:o.pR.getItem(r.challengeName)??void 0,signInSession:o.pR.getItem(r.signInSession)??void 0}})();case"RESET_STATE":return a(),c();default:return e}});function l(e){d.dispatch({type:"SET_SIGN_IN_STATE",value:e})}let u=({challengeName:e,signInSession:t,username:n})=>{n&&o.pR.setItem(r.username,n),e&&o.pR.setItem(r.challengeName,e),t&&(o.pR.setItem(r.signInSession,t),o.pR.setItem(r.expiry,String(Date.now()+18e4)))}},19891:(e,t,n)=>{n.d(t,{i:()=>g});var o=n(17204);let i=async()=>{let{userAgentData:e}=navigator;if(!e)return navigator.userAgent;let{platform:t="",platformVersion:n="",model:o="",architecture:i="",fullVersionList:r=[]}=await e.getHighEntropyValues(["platform","platformVersion","architecture","model","fullVersionList"]);return[t,n,i,o,t,r.map(e=>`${e.brand}/${e.version}`).join(";")].filter(e=>e).join(" ")||navigator.userAgent};var r=n(14924),s=n(27429),a=n(95186),c=n(92835),d=n(3422),l=n(75738),u=n(23750),p=n(36602),h=n(14240);async function g({userPoolId:e,userPoolEndpoint:t,newDeviceMetadata:n,accessToken:g}){if(!n)return;let E=e.split("_")[1]||"",m=await (0,p.H)(E),f=n?.DeviceKey,y=n?.DeviceGroupKey;try{await m.generateHashDevice(y??"",f??"")}catch(e){return}let I={Salt:o.Y.convert((0,h.d)(m.getSaltToHashDevices())),PasswordVerifier:o.Y.convert((0,h.d)(m.getVerifierDevices()))},x=m.getRandomPassword();try{let o,p=(o={endpointResolver:(0,l.o)({endpointOverride:t})},(0,r.A)(s.e,(0,a._)("ConfirmDevice"),(0,c.T)(),{...d.C,...o}));return await p({region:(0,u.J)(e)}
1,{AccessToken:g,DeviceName:await i(),DeviceKey:n?.DeviceKey,DeviceSecretVerifierConfig:I}),{deviceKey:f,deviceGroupKey:y,randomPassword:x}}catch(e){return}}n(26899)},19939:(e,t,n)=>{n.d(t,{MY:()=>i,nW:()=>s,xA:()=>r});var o=n(28498);let i=()=>{if("object"==typeof window&&"object"==typeof window.crypto)return window.crypto;if("object"==typeof crypto)return crypto;throw new o.x({name:"MissingPolyfill",message:"Cannot resolve the `crypto` function from the environment."})},r=()=>{if("undefined"!=typeof window&&"function"==typeof window.btoa)return window.btoa;if("function"==typeof btoa)return btoa;throw new o.x({name:"Base64EncoderError",message:"Cannot resolve the `btoa` function from the environment."})},s=()=>{if("undefined"!=typeof window&&"function"==typeof window.atob)return window.atob;if("function"==typeof atob)return atob;throw new o.x({name:"Base64EncoderError",message:"Cannot resolve the `atob` function from the environment."})}},20504:(e,t,n)=>{n.d(t,{T:()=>y});var o=n(8426),i=n(16095),r=n(17422),s=n(85421),a=n(23750),c=n(55799),d=n(69165),l=n(81166),u=n(14924),p=n(27429),h=n(95186),g=n(92835),E=n(3422),m=n(75738);let f=async e=>{let t,n=e.getConfig().Auth?.Cognito;(0,i.$y)(n);let{userPoolEndpoint:o,userPoolId:f}=n,{tokens:y}=await (0,r.$)(e,{forceRefresh:!1});(0,c.H0)(y);let I=(t={endpointResolver:(0,m.o)({endpointOverride:o})},(0,u.A)(p.e,(0,h._)("GetUser"),(0,g.T)(),{...E.C,...t})),{UserAttributes:x}=await I({region:(0,a.J)(f),userAgentValue:(0,l.A)(s.BM.FetchUserAttributes)},{AccessToken:y.accessToken.toString()});return(0,d.J)(x)},y=()=>f(o.H)},22560:(e,t,n)=>{n.d(t,{R:()=>r});let o={id:"aws",outputs:{dnsSuffix:"amazonaws.com"},regionRegex:"^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$",regions:["aws-global"]},i={partitions:[o,{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn"},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:["aws-cn-global"]}]},r=e=>{let{partitions:t}=i;for(let{regions:n,outputs:o,regionRegex:i}of t){let t=new RegExp(i);if(n.includes(e)||t.test(e))return o.dnsSuffix}return o.outputs.dnsSuffix}},23750:(e,t,n)=>{n.d(t,{C:()=>r,J:()=>i});var o=n(13989);function i(e){let t=e?.split("_")[0];if(!e||0>e.indexOf("_")||!t||"string"!=typeof t)throw new o.l({name:"InvalidUserPoolId",message:"Invalid user pool id provided."});return t}function r(e){if(!e||!e.includes(":"))throw new o.l({name:"InvalidIdentityPoolIdException",message:"Invalid identity pool id provided.",recoverySuggestion:"Make sure a valid identityPoolId is given in the config."});return e.split(":")[0]}},25478:(e,t,n)=>{n.d(t,{B:()=>o});let o=()=>"undefined"!=typeof window&&void 0!==window.document},27429:(e,t,n)=>{n.d(t,{e:()=>r});var o=n(584),i=n(9930);let r=(0,o.q)(i.F,[()=>(e,t)=>async function(t){return t.headers["cache-control"]="no-store",e(t)}])},28498:(e,t,n)=>{n.d(t,{x:()=>o});class o extends Error{constructor({message:e,name:t,recoverySuggestion:n,underlyingError:i,metadata:r}){if(super(e),this.name=t,this.underlyingError=i,this.recoverySuggestion=n,r){let{extendedRequestId:e,httpStatusCode:t,requestId:n}=r;this.metadata={extendedRequestId:e,httpStatusCode:t,requestId:n}}this.constructor=o,Object.setPrototypeOf(this,o.prototype)}}},28656:(e,t,n)=>{n.d(t,{d:()=>i});var o=n(19636);function i(e){let{dispatch:t}=o.c$;t({type:"SET_USERNAME",value:e})}},28707:(e,t,n)=>{n.d(t,{K$:()=>i,xO:()=>r});var o=n(46903);function i(e){}function r(e=!0){o.z.dispatch({type:"RESET"})}n(13989),n(6846)},29470:(e,t,n)=>{n.d(t,{Q:()=>a});var o=n(91216),i=n(94684),r=n(6846),s=n(13989);let a=async()=>{try{o.YZ.dispatch("auth",{event:"signedIn",data:await (0,i.H)()},"Auth",o.U9)}catch(e){if(e.name===r.zz)throw new s.l({name:r.yA,message:"Unable to get user session following successful sign-in.",recoverySuggestion:"This most likely is due to auth tokens not being persisted. If you are using cookie store, please ensure cookies can be correctly set from your server."});throw e}}},29592:(e,t,n)=>{n.d(t,{e:()=>r});var o=n(54645),i=n(13989);function r(e){if(!e||"Error"===e.name||e instanceof TypeError)throw new i.l({name:o.m.Unknown,message:"An unknown error has occurred.",underlyingError:e})}}
1,33083:(e,t,n)=>{n.d(t,{J:()=>S});var o=n(45294),i=n(8426),r=n(16095),s=n(15890),a=n(7232),c=n(29592),d=n(19636),l=n(97307),u=n(63471),p=n(29470),h=n(67589),g=n(19891);async function E(e){let t=i.H.getConfig().Auth?.Cognito;(0,r.$y)(t);let{username:n,password:E,options:m}=e,f={loginId:n,authFlowType:"CUSTOM_WITHOUT_SRP"},y=m?.clientMetadata;(0,a.M)(!!n,s.P.EmptySignInUsername),(0,a.M)(!E,s.P.CustomAuthSignInPassword);try{let{ChallengeName:e,ChallengeParameters:i,AuthenticationResult:r,Session:s}=await (0,h.i)(o.ty,[n,y,t,u.o],n,u.o),a=(0,o.ni)(n);if((0,d.wr)({signInSession:s,username:a,challengeName:e,signInDetails:f}),r)return await (0,l.i)({username:a,...r,NewDeviceMetadata:await (0,g.i)({userPoolId:t.userPoolId,userPoolEndpoint:t.userPoolEndpoint,newDeviceMetadata:r.NewDeviceMetadata,accessToken:r.AccessToken}),signInDetails:f}),(0,d.jN)(),await (0,p.Q)(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}};return(0,o.q2)({challengeName:e,challengeParameters:i})}catch(t){(0,d.jN)(),(0,c.e)(t);let e=(0,o.m$)(t.name);if(e)return e;throw t}}async function m(e){let{username:t,password:n,options:h}=e,E={loginId:t,authFlowType:"CUSTOM_WITH_SRP"},m=i.H.getConfig().Auth?.Cognito;(0,r.$y)(m);let f=h?.clientMetadata;(0,a.M)(!!t,s.P.EmptySignInUsername),(0,a.M)(!!n,s.P.EmptySignInPassword);try{let{ChallengeName:e,ChallengeParameters:i,AuthenticationResult:r,Session:s}=await (0,o.tE)(t,n,f,m,u.o),a=(0,o.ni)(t);if((0,d.wr)({signInSession:s,username:a,challengeName:e,signInDetails:E}),r)return await (0,l.i)({username:a,...r,NewDeviceMetadata:await (0,g.i)({userPoolId:m.userPoolId,userPoolEndpoint:m.userPoolEndpoint,newDeviceMetadata:r.NewDeviceMetadata,accessToken:r.AccessToken}),signInDetails:E}),(0,d.jN)(),await (0,p.Q)(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}};return(0,o.q2)({challengeName:e,challengeParameters:i})}catch(t){(0,d.jN)(),(0,c.e)(t);let e=(0,o.m$)(t.name);if(e)return e;throw t}}var f=n(28707);async function y(e){let{username:t,password:n}=e,h=i.H.getConfig().Auth?.Cognito,E={loginId:t,authFlowType:"USER_SRP_AUTH"};(0,r.$y)(h);let m=e.options?.clientMetadata;(0,a.M)(!!t,s.P.EmptySignInUsername),(0,a.M)(!!n,s.P.EmptySignInPassword);try{let{ChallengeName:e,ChallengeParameters:i,AuthenticationResult:r,Session:s}=await (0,o.Zw)(t,n,m,h,u.o),a=(0,o.ni)(t);if((0,d.wr)({signInSession:s,username:a,challengeName:e,signInDetails:E}),r)return await (0,l.i)({username:a,...r,NewDeviceMetadata:await (0,g.i)({userPoolId:h.userPoolId,userPoolEndpoint:h.userPoolEndpoint,newDeviceMetadata:r.NewDeviceMetadata,accessToken:r.AccessToken}),signInDetails:E}),(0,d.jN)(),await (0,p.Q)(),(0,f.xO)(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}};return(0,o.q2)({challengeName:e,challengeParameters:i})}catch(t){(0,d.jN)(),(0,f.xO)(),(0,c.e)(t);let e=(0,o.m$)(t.name);if(e)return e;throw t}}async function I(e){let{username:t,password:n,options:E}=e,m=i.H.getConfig().Auth?.Cognito,y={loginId:t,authFlowType:"USER_PASSWORD_AUTH"};(0,r.$y)(m);let I=E?.clientMetadata;(0,a.M)(!!t,s.P.EmptySignInUsername),(0,a.M)(!!n,s.P.EmptySignInPassword);try{let{ChallengeName:e,ChallengeParameters:i,AuthenticationResult:r,Session:s}=await (0,h.i)(o.h5,[t,n,I,m,u.o],t,u.o),a=(0,o.ni)(t);if((0,d.wr)({signInSession:s,username:a,challengeName:e,signInDetails:y}),r)return await (0,l.i)({...r,username:a,NewDeviceMetadata:await (0,g.i)({userPoolId:m.userPoolId,userPoolEndpoint:m.userPoolEndpoint,newDeviceMetadata:r.NewDeviceMetadata,accessToken:r.AccessToken}),signInDetails:y}),(0,d.jN)(),await (0,p.Q)(),(0,f.xO)(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}};return(0,o.q2)({challengeName:e,challengeParameters:i})}catch(t){(0,d.jN)(),(0,f.xO)(),(0,c.e)(t);let e=(0,o.m$)(t.name);if(e)return e;throw t}}var x=n(63757);async function S(e){(0,f.xO)(!1);let t=e.options?.authFlowType;switch(await (0,o.AR)(),t){case"USER_SRP_AUTH":default:return y(e);case"USER_PASSWORD_AUTH":return I(e);case"CUSTOM_WITHOUT_SRP":return E(e);case"CUSTOM_WITH_SRP":return m(e);case"USER_AUTH":return(0,x.k)(e)}}},34378:(e,t,n)=>{n.d(t,{H:()=>M});var o=n(8426),i=n(16095),r=n(85421),s=n(7232),a=n(15890),c=n(23750),d=n(69165),l=n(91216),u=n(33083),p=n(13989),h=n(28707),g=n(6846),E=n(63757);function m(e,t){let n;return o=>{n||e(...o),clearTimeout(n),n=setTimeout(()=>{n=void 0},t)}}let f=m(function(e,t,n){let o=Date.now(),i=setInterval(async()=>
1{if(Date.now()-o>18e4)clearInterval(i),n(new p.l({name:g.A0,message:"The account was not confirmed on time.",recoverySuggestion:"Try to verify your account by clicking the link sent your email or phone and then login manually."})),(0,h.xO)();else try{let n=await (0,u.J)(e);"CONFIRM_SIGN_UP"!==n.nextStep.signInStep&&(t(n),clearInterval(i),(0,h.xO)())}catch(e){clearInterval(i),n(e),(0,h.xO)()}},5e3)},300),y=m(I,300);async function I(e,t,n){try{let n=e?.options?.authFlowType==="USER_AUTH"?await (0,E.k)(e):await (0,u.J)(e);t(n),(0,h.xO)()}catch(e){n(e),(0,h.xO)()}}function x(e){return async()=>new Promise((t,n)=>{y([e,t,n])})}var S=n(76294),w=n(81166),v=n(14924),A=n(88641),C=n(48557),P=n(29592),R=n(73019),T=n(95186),N=n(27429),U=n(3422),_=n(75738),b=n(46903);async function M(e){let t,{username:n,password:u,options:g}=e,E=o.H.getConfig().Auth?.Cognito,m=E?.signUpVerificationMethod??"code",{clientMetadata:y,validationData:I,autoSignIn:M}=e.options??{};(0,i.$y)(E),(0,s.M)(!!n,a.P.EmptySignUpUsername);let O="boolean"!=typeof M?M:void 0,k={username:n,options:O};O?.authFlowType!=="CUSTOM_WITHOUT_SRP"&&(k.password=u);let{userPoolId:D,userPoolClientId:F,userPoolEndpoint:L}=E,V=(t={endpointResolver:(0,_.o)({endpointOverride:L})},(0,v.A)(N.e,(0,T._)("SignUp"),async e=>{if(e.statusCode>=300){let t=await (0,A.F)(e);if((0,P.e)(t),t.name===R.AU.InvalidParameterException&&/'password'/.test(t.message)&&/Member must not be null/.test(t.message)){let e=a.P.EmptySignUpPassword,{message:t,recoverySuggestion:n}=C.ut[e];throw new p.l({name:e,message:t,recoverySuggestion:n})}throw new p.l({name:t.name,message:t.message})}return(0,A.Y)(e)},{...U.C,...t})),q={Username:n,Password:void 0,UserAttributes:g?.userAttributes&&(0,d.Q)(g?.userAttributes),ClientMetadata:y,ValidationData:I&&(0,d.Q)(I),ClientId:F,UserContextData:(0,S.d)({username:n,userPoolId:D,userPoolClientId:F})};u&&(q.Password=u);let{UserSub:K,CodeDeliveryDetails:$,UserConfirmed:B,Session:H}=await V({region:(0,c.J)(D),userAgentValue:(0,w.A)(r.BM.SignUp)},q);(O||!0===M)&&(b.z.dispatch({type:"START"}),b.z.dispatch({type:"SET_USERNAME",value:n}),b.z.dispatch({type:"SET_SESSION",value:H}));let W={destination:$?.Destination,deliveryMedium:$?.DeliveryMedium,attributeName:$?.AttributeName},G=b.z.getState().active;if(B)return G?((0,h.K$)(x(k)),{isSignUpComplete:!0,nextStep:{signUpStep:"COMPLETE_AUTO_SIGN_IN"},userId:K}):{isSignUpComplete:!0,nextStep:{signUpStep:"DONE"},userId:K};if(G){if("link"===m)return(0,h.K$)(async()=>new Promise((e,t)=>{f([k,e,t])})),{isSignUpComplete:!1,nextStep:{signUpStep:"COMPLETE_AUTO_SIGN_IN",codeDeliveryDetails:W},userId:K};let e=l.f3.listen("auth-internal",async({payload:t})=>{if("confirmSignUp"===t.event){let n=t.data;n?.isSignUpComplete&&(l.f3.dispatch("auth-internal",{event:"autoSignIn"}),(0,h.K$)(x(k)),e())}}),t=setTimeout(()=>{e(),clearTimeout(t),(0,h.xO)()},18e4)}return{isSignUpComplete:!1,nextStep:{signUpStep:"CONFIRM_SIGN_UP",codeDeliveryDetails:W},userId:K}}},36602:(e,t,n)=>{n.d(t,{H:()=>S});var o=n(13989),i=n(66842),r=n(58711);let s=async({a:e,g:t,k:n,x:o,B:i,N:r,U:s})=>new Promise((a,c)=>{t.modPow(o,r,(t,d)=>{if(t)return void c(t);i.subtract(n.multiply(d)).modPow(e.add(s.multiply(o)),r,(e,t)=>{if(e)return void c(e);a(t.mod(r))})})});var a=n(14240),c=n(26899),d=n(82447);let l=e=>{let t="";for(let n=0;n<e.byteLength;n++)t+=d.pU[e[n]];return t},u=e=>{let t=new c.I;t.update(e);let n=l(t.digestSync());return Array(64-n.length).join("0")+n},p=e=>u((0,a.d)(e)),h=/^[89a-f]/i,g=e=>{if(!(e instanceof r.A))throw Error("Not a BigInteger");let t=0>e.compareTo(r.A.ZERO),n=e.abs().toString(16);if(n=n.length%2!=0?`0${n}`:n,n=h.test(n)?`00${n}`:n,t){let e=n.split("").map(e=>{let t=15&~parseInt(e,16);return"0123456789ABCDEF".charAt(t)}).join("");(n=new r.A(e,16).add(r.A.ONE).toString(16)).toUpperCase().startsWith("FF8")&&(n=n.substring(2))}return n};var E=n(19939);class m{constructor(e,t){this.words=[];let n=e;n=this.words=n||[],void 0!==t?this.sigBytes=t:this.sigBytes=4*n.length}random(e){let t=[];for(let n=0;n<e;n+=4)t.push((0,E.MY)().getRandomValues(new Uint32Array(1))[0]);return new m(t,e)}toString(){return function(e){let{words:t}=e,{sigBytes:n}=e,o=[];for(let e=0;e<n;e++){let n=t[e>>>2]>>>24-e%4*8&255;o.push((n>>>4).toString(16)),o.push((15&n).toString(16))}return o.join("")}(this)}}let f=e=>{let t=new m().random(e).toString();return(0,a.d)(t)};var y=n(17204);
1class I{constructor({userPoolName:e,a:t,g:n,A:o,N:s}){this.encoder=i.U,this.userPoolName=e,this.a=t,this.g=n,this.A=o,this.N=s,this.k=new r.A(p(`${g(s)}${g(n)}`),16)}getRandomPassword(){if(!this.randomPassword)throw new o.l({name:"EmptyBigIntegerRandomPassword",message:"random password is empty"});return this.randomPassword}getSaltToHashDevices(){if(!this.saltToHashDevices)throw new o.l({name:"EmptyBigIntegersaltToHashDevices",message:"saltToHashDevices is empty"});return this.saltToHashDevices}getVerifierDevices(){if(!this.verifierDevices)throw new o.l({name:"EmptyBigIntegerVerifierDevices",message:"verifyDevices is empty"});return this.verifierDevices}async generateHashDevice(e,t){this.randomPassword=y.Y.convert(f(40));let n=u(`${e}${t}:${this.randomPassword}`),o=l(f(16));return this.saltToHashDevices=g(new r.A(o,16)),new Promise((e,t)=>{this.g.modPow(new r.A(p(this.saltToHashDevices+n),16),this.N,(n,o)=>{if(n)return void t(n);this.verifierDevices=g(o),e()})})}async getPasswordAuthenticationKey({username:e,password:t,serverBValue:n,salt:o}){if(n.mod(this.N).equals(r.A.ZERO))throw Error("B cannot be zero.");let i=(({A:e,B:t})=>{let n=new r.A(p(g(e)+g(t)),16);if(n.equals(r.A.ZERO))throw Error("U cannot be zero.");return n})({A:this.A,B:n}),d=u(`${this.userPoolName}${e}:${t}`),l=new r.A(p(g(o)+d),16),h=await s({a:this.a,g:this.g,k:this.k,x:l,B:n,N:this.N,U:i}),E=this.encoder.convert("Caldera Derived Key"),m=this.encoder.convert("\x01"),f=new Uint8Array(E.byteLength+m.byteLength);return f.set(E,0),f.set(m,E.byteLength),((e,t,n)=>{let o=new c.I(t);o.update(e);let i=o.digestSync(),r=new c.I(i);return r.update(n),r.digestSync().slice(0,16)})((0,a.d)(g(h)),(0,a.d)(g(i)),f)}}let x=async({a:e,g:t,N:n})=>new Promise((o,i)=>{t.modPow(e,n,(e,t)=>e?void i(e):t.mod(n).equals(r.A.ZERO)?void i(Error("Illegal parameter. A mod N cannot be 0.")):void o(t))}),S=async e=>{let t=new r.A(d.oA,16),n=new r.A("2",16),o=w(),i=await x({a:o,g:n,N:t});return new I({userPoolName:e,a:o,g:n,A:i,N:t})},w=()=>{let e=l(f(128));return new r.A(e,16)}},37427:(e,t,n)=>{n.d(t,{I:()=>a});var o=n(26899),i=n(17204),r=n(9811),s=n(66842);let a=({userPoolName:e,username:t,challengeParameters:n,dateNow:r,hkdf:a})=>{let d=s.U.convert(e),l=s.U.convert(t),u=c(n.SECRET_BLOCK),p=s.U.convert(r),h=new Uint8Array(d.byteLength+l.byteLength+u.byteLength+p.byteLength);h.set(d,0),h.set(l,d.byteLength),h.set(u,d.byteLength+l.byteLength),h.set(p,d.byteLength+l.byteLength+u.byteLength);let g=new o.I(a);g.update(h);let E=g.digestSync();return i.Y.convert(E)},c=e=>{let t="=".repeat((4-e.length%4)%4),n=(e+t).replace(/-/g,"+").replace(/_/g,"/"),o=r.m.convert(n),i=new Uint8Array(o.length);for(let e=0;e<o.length;++e)i[e]=o.charCodeAt(e);return i}},37746:(e,t,n)=>{n.d(t,{M:()=>o});let o=3e5},42181:(e,t,n)=>{n.d(t,{M:()=>l});var o=n(10434),i=n(28498);let r=new o.C("parseAWSExports"),s={API_KEY:"apiKey",AWS_IAM:"iam",AMAZON_COGNITO_USER_POOLS:"userPool",OPENID_CONNECT:"oidc",NONE:"none",AWS_LAMBDA:"lambda",LAMBDA:"lambda"},a=e=>e?.split(",")??[],c={AMAZON_COGNITO_USER_POOLS:"userPool",API_KEY:"apiKey",AWS_IAM:"iam",AWS_LAMBDA:"lambda",OPENID_CONNECT:"oidc"},d={GOOGLE:"Google",LOGIN_WITH_AMAZON:"Amazon",FACEBOOK:"Facebook",SIGN_IN_WITH_APPLE:"Apple"},l=e=>Object.keys(e).some(e=>e.startsWith("aws_"))?((e={})=>{if(!Object.prototype.hasOwnProperty.call(e,"aws_project_region"))throw new i.x({name:"InvalidParameterException",message:"Invalid config parameter.",recoverySuggestion:"Ensure passing the config object imported from  `amplifyconfiguration.json`."});let{aws_appsync_apiKey:t,aws_appsync_authenticationType:n,aws_appsync_graphqlEndpoint:o,aws_appsync_region:c,aws_bots_config:d,aws_cognito_identity_pool_id:l,aws_cognito_sign_up_verification_method:u,aws_cognito_mfa_configuration:p,aws_cognito_mfa_types:h,aws_cognito_password_protection_settings:g,aws_cognito_verification_mechanisms:E,aws_cognito_signup_attributes:m,aws_cognito_social_providers:f,aws_cognito_username_attributes:y,aws_mandatory_sign_in:I,aws_mobile_analytics_app_id:x,aws_mobile_analytics_app_region:S,aws_user_files_s3_bucket:w,aws_user_files_s3_bucket_region:v,aws_user_files_s3_dangerously_connect_to_http_endpoint_for_testing:A,aws_user_pools_id:C,aws_user_pools_web_client_id:P,geo:R,oauth:T,predictions:N,aws_cloud_logic_custom:U,Notifications:_,modelIntrospection:b}=e,M={};x&&(M.Analytics={Pinpoint:{appId:x,region:S}});let{InAppMessaging:O,Push:k}=_??{};if(O?.AWSPinpoint||k?.AWSPinpoint){if(O?.AWSPinpoint){let{appId:e,region:t}=O.AWSPinpoint;M.Notifications={InAppMessaging:{Pinpoint:{appId:e,region:t}}}}if(k?.AWSPinpoint){let{appId:e,region:t}=k.AWSPinpoint;M.Notifications={...M.Notifications,PushNotification:{Pinpoint:{appId:e,region:t}}}}}if(Array.isArray(d)&&(M.Interactions={LexV1:Object.fromEntries(d.map(e=>[e.name,e]))}),o){let e=s[n];e||r.debug(`Invalid authentication type ${n}. Falling back to IAM.`),M.API={GraphQL:{endpoint:o,apiKey:t,region:c,defaultAuthMode:e??"iam"}},b&&(M.API.GraphQL.modelIntrospection=b)}let D=p?{status:p&&p.toLowerCase(),totpEnabled:h?.includes("TOTP")??!1,smsEnabled:h?.includes("SMS")??!1}
1:void 0,F=g?{minLength:g.passwordPolicyMinLength,requireLowercase:g.passwordPolicyCharacters?.includes("REQUIRES_LOWERCASE")??!1,requireUppercase:g.passwordPolicyCharacters?.includes("REQUIRES_UPPERCASE")??!1,requireNumbers:g.passwordPolicyCharacters?.includes("REQUIRES_NUMBERS")??!1,requireSpecialCharacters:g.passwordPolicyCharacters?.includes("REQUIRES_SYMBOLS")??!1}:void 0,L=Array.from(new Set([...E??[],...m??[]])).reduce((e,t)=>({...e,[t.toLowerCase()]:{required:!0}}),{}),V=y?.includes("EMAIL")??!1,q=y?.includes("PHONE_NUMBER")??!1;(l||C)&&(M.Auth={Cognito:{identityPoolId:l,allowGuestAccess:"enable"!==I,signUpVerificationMethod:u,userAttributes:L,userPoolClientId:P,userPoolId:C,mfa:D,passwordFormat:F,loginWith:{username:!(V||q),email:V,phone:q}}});let K=!!T&&Object.keys(T).length>0,$=!!f&&f.length>0;if(M.Auth&&K&&(M.Auth.Cognito.loginWith={...M.Auth.Cognito.loginWith,oauth:{...(({domain:e,scope:t,redirectSignIn:n,redirectSignOut:o,responseType:i})=>({domain:e,scopes:t,redirectSignIn:a(n),redirectSignOut:a(o),responseType:i}))(T),...$&&{providers:f.map(e=>{let t=e.toLowerCase();return t.charAt(0).toUpperCase()+t.slice(1)})}}}),w&&(M.Storage={S3:{bucket:w,region:v,dangerouslyConnectToHttpEndpointForTesting:A}}),R){let{amazon_location_service:e}=R;M.Geo={LocationService:{maps:e.maps,geofenceCollections:e.geofenceCollections,searchIndices:e.search_indices,region:e.region}}}if(U&&(M.API={...M.API,REST:U.reduce((e,t)=>{let{name:n,endpoint:o,region:i,service:r}=t;return{...e,[n]:{endpoint:o,...r?{service:r}:void 0,...i?{region:i}:void 0}}},{})}),N){let{VoiceId:e}=N?.convert?.speechGenerator?.defaults??{};M.Predictions=e?{...N,convert:{...N.convert,speechGenerator:{...N.convert.speechGenerator,defaults:{voiceId:e}}}}:N}return M})(e):!function(e){let{version:t}=e;return!!t&&t.startsWith("1")}(e)?e:function(e){let t={};if(e.storage&&(t.Storage=function(e){if(!e)return;let{bucket_name:t,aws_region:n,buckets:o}=e;return{S3:{bucket:t,region:n,buckets:o&&function(e){let t={};return e.forEach(({name:e,bucket_name:n,aws_region:o,paths:i})=>{if(e in t)throw Error(`Duplicate friendly name found: ${e}. Name must be unique.`);let r=i?Object.entries(i).reduce((e,[t,n])=>(void 0!==n&&(e[t]=n),e),{}):void 0;t[e]={bucketName:n,region:o,paths:r}}),t}(o)}}}(e.storage)),e.auth&&(t.Auth=function(e){var t;if(!e)return;let{user_pool_id:n,user_pool_client_id:o,identity_pool_id:i,password_policy:r,mfa_configuration:s,mfa_methods:a,unauthenticated_identities_enabled:c,oauth:l,username_attributes:u,standard_required_attributes:p,groups:h,passwordless:g}=e,E={Cognito:{userPoolId:n,userPoolClientId:o,groups:h}};return i&&(E.Cognito={...E.Cognito,identityPoolId:i}),r&&(E.Cognito.passwordFormat={requireLowercase:r.require_lowercase,requireNumbers:r.require_numbers,requireUppercase:r.require_uppercase,requireSpecialCharacters:r.require_symbols,minLength:r.min_length??6}),s&&(E.Cognito.mfa={status:"OPTIONAL"===(t=s)?"optional":"REQUIRED"===t?"on":"off",smsEnabled:a?.includes("SMS"),totpEnabled:a?.includes("TOTP")}),c&&(E.Cognito.allowGuestAccess=c),l&&(E.Cognito.loginWith={oauth:{domain:l.domain,redirectSignIn:l.redirect_sign_in_uri,redirectSignOut:l.redirect_sign_out_uri,responseType:"token"===l.response_type?"token":"code",scopes:l.scopes,providers:function(e=[]){return e.reduce((e,t)=>(void 0!==d[t]&&e.push(d[t]),e),[])}(l.identity_providers)}}),u&&(E.Cognito.loginWith={...E.Cognito.loginWith,email:u.includes("email"),phone:u.includes("phone_number"),username:u.includes("username")}),p&&(E.Cognito.userAttributes=p.reduce((e,t)=>({...e,[t]:{required:!0}}),{})),g&&(E.Cognito.passwordless={emailOtpEnabled:g.email_otp_enabled,smsOtpEnabled:g.sms_otp_enabled,webAuthn:g.web_authn?{relyingPartyId:g.web_authn.relying_party_id,userVerification:g.web_authn.user_verification}:void 0,preferredChallenge:g.preferred_challenge}),E}(e.auth)),e.analytics&&(t.Analytics=function(e){if(!e?.amazon_pinpoint)return;let{amazon_pinpoint:t}=e;return{Pinpoint:{appId:t.app_id,region:t.aws_region}}}(e.analytics)),e.geo&&(t.Geo=function(e){if(!e)return;let{aws_region:t,geofence_collections:n,maps:o,search_indices:i}=e;return{LocationService:{region:t,searchIndices:i,geofenceCollections:n,maps:o}}}(e.geo)),e.data&&(t.API=function(e){if(!e)return;let{aws_region:t,default_authorization_type:n,url:o,api_key:i,model_introspection:r}=e;return{GraphQL:{endpoint:o,defaultAuthMode:c[n],region:t,apiKey:i,modelIntrospection:r}}}(e.data)),e.custom){let n=function(e){if(!e?.events)return;let{url:t,aws_region:n,api_key:o,default_authorization_type:i}=e.events;return{Events:{endpoint:t,defaultAuthMode:c[i],region:n,apiKey:o}}}(e.custom);
1n&&"Events"in n&&(t.API={...t.API,...n})}return e.notifications&&(t.Notifications=function(e){if(!e)return;let{aws_region:t,channels:n,amazon_pinpoint_app_id:o}=e,i=n.includes("IN_APP_MESSAGING"),r=n.includes("APNS")||n.includes("FCM");if(!(i||r))return;let s={};return i&&(s.InAppMessaging={Pinpoint:{appId:o,region:t}}),r&&(s.PushNotification={Pinpoint:{appId:o,region:t}}),s}(e.notifications)),t}(e)},42641:(e,t,n)=>{n.d(t,{C:()=>b});var o=n(10434),i=n(8426),r=n(63215);function s(){return i.H.Auth.clearCredentials()}var a=n(91216),c=n(16095),d=n(85421),l=n(81166),u=n(13989),p=n(79881),h=n(63471),g=n(23750),E=n(55799);n(26899);let m=async e=>{await e.clearOAuthData(),h.o.clearTokens(),await s(),a.YZ.dispatch("auth",{event:"signedOut"},"Auth",a.U9)},f=async e=>{window?.location&&(window.location.href=e.replace("http://","https://"))};var y=n(6846);let I=e=>e.startsWith(String(window.location.origin+(window.location.pathname||"/"))),x=e=>e.includes(String(window.location.hostname)),S=e=>e.startsWith("http://"),w=e=>e.startsWith("https://"),v=async(e,t=!1,n)=>{(0,c.G6)(e);let{loginWith:o,userPoolClientId:i}=e,{domain:r,redirectSignOut:s}=o.oauth,a=function(e,t){if(t){let n=e?.find(e=>e===t);if(!n)throw y.jK;return n}{let t=e?.find(I)??e?.find(x),n=e?.find(w)??e?.find(S);if(t)return t;if(n)throw y.$6;throw y.RW}}(s,n);return f(`https://${r}/logout?${Object.entries({client_id:i,logout_uri:encodeURIComponent(a)}).map(([e,t])=>`${e}=${t}`).join("&")}`)},A=async(e,t,n,o)=>{let{isOAuthSignIn:i}=await t.loadOAuthSignIn(),r=await n.getOAuthMetadata();if(await m(t),i||r?.oauthSignIn)return v(e,!1,o)};var C=n(14924),P=n(27429),R=n(95186),T=n(92835),N=n(3422),U=n(75738);let _=new o.C("Auth");async function b(e){let t,n=i.H.getConfig().Auth?.Cognito;(0,c.$y)(n),e?.global?await O(n):await M(n);try{(0,c.G6)(n),t=!0}catch(e){t=!1}if(t){let t=new p.S(r.ZL);t.setAuthConfig(n);let{type:o}=await A(n,t,h.o,e?.oauth?.redirectUrl)??{};if("error"===o)throw new u.l({name:y.mh,message:"An error occurred when attempting to log out from OAuth provider."})}else h.o.clearTokens(),await s(),a.YZ.dispatch("auth",{event:"signedOut"},"Auth",a.U9)}async function M(e){try{let{userPoolEndpoint:t,userPoolId:n,userPoolClientId:o}=e,i=await h.o.getTokenStore().loadTokens();if((0,E.X4)(i),k(i.accessToken)){let e,r=(e={endpointResolver:(0,U.o)({endpointOverride:t})},(0,C.A)(P.e,(0,R._)("RevokeToken"),(0,T.T)(),{...N.C,...e}));await r({region:(0,g.J)(n),userAgentValue:(0,l.A)(d.BM.SignOut)},{ClientId:o,Token:i.refreshToken})}}catch(e){_.debug("Client signOut error caught but will proceed with token removal")}}async function O(e){try{let t,{userPoolEndpoint:n,userPoolId:o}=e,i=await h.o.getTokenStore().loadTokens();(0,E.H0)(i);let r=(t={endpointResolver:(0,U.o)({endpointOverride:n})},(0,C.A)(P.e,(0,R._)("GlobalSignOut"),(0,T.T)(),{...N.C,...t}));await r({region:(0,g.J)(o),userAgentValue:(0,l.A)(d.BM.SignOut)},{AccessToken:i.accessToken.toString()})}catch(e){_.debug("Global signOut error caught but will proceed with token removal")}}let k=e=>!!e?.payload?.origin_jti},43428:(e,t,n)=>{n.d(t,{y:()=>r});var o=n(13626),i=n(74500);let r=e=>{let t=(0,o.y)(i.mU)(e);return!1===t?i.mU:t}},45294:(e,t,n)=>{n.d(t,{AR:()=>es,ni:()=>ea,q2:()=>et,m$:()=>en,ty:()=>X,tE:()=>ee,h5:()=>Q,Zw:()=>Z});var o,i=n(8426),r=n(85421),s=n(16095),a=n(59034),c=n(13989),d=n(73019),l=n(48557),u=n(6846),p=n(94684),h=n(81166),g=n(98231),E=n(14924),m=n(27429),f=n(95186),y=n(92835),I=n(3422),x=n(75738),S=n(23750),w=n(9345),v=n(97307),A=n(29470),C=n(19636),P=n(28498),R=n(72898);let T="Passkeys may not be supported on this device. Ensure your application is running in a secure context (HTTPS) and Web Authentication API is supported.";class N extends P.x{constructor(e){super(e),this.constructor=N,Object.setPrototypeOf(this,N.prototype)}}!function(e){e.PasskeyNotSupported="PasskeyNotSupported",e.PasskeyAlreadyExists="PasskeyAlreadyExists",e.InvalidPasskeyRegistrationOptions="InvalidPasskeyRegistrationOptions",e.InvalidPasskeyAuthenticationOptions="InvalidPasskeyAuthenticationOptions",e.RelyingPartyMismatch="RelyingPartyMismatch",e.PasskeyRegistrationFailed="PasskeyRegistrationFailed",e.PasskeyRetrievalFailed="PasskeyRetrievalFailed",e.PasskeyRegistrationCanceled="PasskeyRegistrationCanceled",e.PasskeyAuthenticationCanceled="PasskeyAuthenticationCanceled",e.PasskeyOperationAborted="PasskeyOperationAborted"}(o||(o={}));let U="User may have canceled the ceremony or another interruption has occurred. Check underlying error for details.",_="Ensure your user pool is configured to support the WEB_AUTHN as an authentication factor.",b={[o.PasskeyNotSupported]:{message:"Passkeys may not be supported on this device.",recoverySuggestion:T},[o.InvalidPasskeyRegistrationOptions]:{message:"Invalid passkey registration options.",recoverySuggestion:_},[o.InvalidPasskeyAuthenticationOptions]:{message:"Invalid passkey authentication options.",recoverySuggestion:_},[o.PasskeyRegistrationFailed]:{message:"Device failed to create passkey.",recoverySuggestion:T},[o.PasskeyRetrievalFailed]:{message:"Device failed to retrieve passkey.",recoverySuggestion:"Passkeys may not be available on this device. Try an alternative authentication factor like PASSWORD, EMAIL_OTP, or SMS_OTP."},[o.PasskeyAlreadyExists]:{message:"Passkey already exists in authenticator.",recoverySuggestion:"Proceed with existing passkey or try again after deleting the credential."},[o.PasskeyRegistrationCanceled]:{message:"Passkey registration ceremony has been canceled.",recoverySuggestion:U},[o.PasskeyAuthenticationCanceled]:{message:"Passkey authentication ceremony has been canceled.",recoverySuggestion:U},[o.PasskeyOperationAborted]:{message:"Passkey operation has been aborted.",recoverySuggestion:U},[o.RelyingPartyMismatch]:{message:"Relying party does not match current domain.",recoverySuggestion:"Ensure relying party identifier matches current domain."}},M=(0,R.p)(b,N);var O=n(54645),k=n(25478),D=n(17204);let F=e=>D.Y.convert(new Uint8Array(e),{urlSafe:!0,skipPadding:!0});var L=n(9811);let V=e=>Uint8Array.from(L.m.convert(e,{urlSafe:!0}),e=>e.charCodeAt(0)).buffer,q=async e=>{try{let t=(0,k.B)()&&window.isSecureContext&&"credentials"in navigator&&"function"==typeof window.PublicKeyCredential;M(t,o.PasskeyNotSupported);let n=(e=>{let t=V(e.challenge),n=(e.allowCredentials||[]).map(e=>({...e,id:V(e.id)}
1));return{...e,challenge:t,allowCredentials:n}})(e),i=await navigator.credentials.get({publicKey:n});return!function(e){M(e&&e instanceof PublicKeyCredential&&e.response instanceof AuthenticatorAssertionResponse,o.PasskeyRetrievalFailed)}(i),(e=>{let t={clientDataJSON:F(e.response.clientDataJSON),authenticatorData:F(e.response.authenticatorData),signature:F(e.response.signature)};e.response.userHandle&&(t.userHandle=F(e.response.userHandle));let n={id:e.id,rawId:F(e.rawId),type:e.type,clientExtensionResults:e.getClientExtensionResults(),response:t};return e.authenticatorAttachment&&(n.authenticatorAttachment=e.authenticatorAttachment),n})(i)}catch(e){throw(e=>{if(e instanceof N)return e;if(e instanceof Error&&"NotAllowedError"===e.name){let{message:t,recoverySuggestion:n}=b[o.PasskeyAuthenticationCanceled];return new N({name:o.PasskeyAuthenticationCanceled,message:t,recoverySuggestion:n,underlyingError:e})}return(e=>{if(e instanceof Error){if("AbortError"===e.name){let{message:t,recoverySuggestion:n}=b[o.PasskeyOperationAborted];return new N({name:o.PasskeyOperationAborted,message:t,recoverySuggestion:n,underlyingError:e})}if("SecurityError"===e.name){let{message:t,recoverySuggestion:n}=b[o.RelyingPartyMismatch];return new N({name:o.RelyingPartyMismatch,message:t,recoverySuggestion:n,underlyingError:e})}}return new N({name:O.m.Unknown,message:"An unknown error has occurred.",underlyingError:e})})(e)})(e)}};var K=n(19891);async function $(e){let t=i.H.getConfig().Auth?.Cognito;(0,s.$y)(t);
1let{username:n,signInSession:a,signInDetails:d,challengeName:u}=C.c$.getState();if("WEB_AUTHN"!==u||!n)throw new c.l({name:l.nC.SignInException,message:"Unable to proceed due to invalid sign in state."});let{CREDENTIAL_REQUEST_OPTIONS:p}=e;M(!!p,o.InvalidPasskeyAuthenticationOptions);let g=await q(JSON.parse(p)),E=(0,w.H)({endpointResolver:(0,x.o)({endpointOverride:t.userPoolEndpoint})}),{ChallengeName:m,ChallengeParameters:f,AuthenticationResult:y,Session:I}=await E({region:(0,S.J)(t.userPoolId),userAgentValue:(0,h.A)(r.BM.ConfirmSignIn)},{ChallengeName:"WEB_AUTHN",ChallengeResponses:{USERNAME:n,CREDENTIAL:JSON.stringify(g)},ClientId:t.userPoolClientId,Session:a});if((0,C.wr)({signInSession:I,username:n,challengeName:m,signInDetails:d}),y)return await (0,v.i)({...y,username:n,NewDeviceMetadata:await (0,K.i)({userPoolId:t.userPoolId,userPoolEndpoint:t.userPoolEndpoint,newDeviceMetadata:y.NewDeviceMetadata,accessToken:y.AccessToken}),signInDetails:d}),C.c$.dispatch({type:"RESET_STATE"}),await (0,A.Q)(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}};if("WEB_AUTHN"===m)throw new c.l({name:l.nC.SignInException,message:"Sequential WEB_AUTHN challenges returned from underlying service cannot be handled."});return{challengeName:m,challengeParameters:f}}var B=n(94519),H=n(36602);n(26899);var W=n(76294),G=n(77682),z=n(99607),j=n(67589),J=n(28656);let Y="userAttributes.";async function Q(e,t,n,o,i){let{userPoolClientId:s,userPoolId:a,userPoolEndpoint:c}=o,d={USERNAME:e,PASSWORD:t},l=await i.getDeviceMetadata(e);l&&l.deviceKey&&(d.DEVICE_KEY=l.deviceKey);let u=(0,W.d)({username:e,userPoolId:a,userPoolClientId:s}),p=(0,g.R)({endpointResolver:(0,x.o)({endpointOverride:c})}),E=await p({region:(0,S.J)(a),userAgentValue:(0,h.A)(r.BM.SignIn)},{AuthFlow:"USER_PASSWORD_AUTH",AuthParameters:d,ClientMetadata:n,ClientId:s,UserContextData:u}),m=E.ChallengeParameters?.USERNAME??E.ChallengeParameters?.USER_ID_FOR_SRP??e;return((0,J.d)(m),"DEVICE_SRP_AUTH"===E.ChallengeName)?(0,z.O)({username:m,config:o,clientMetadata:n,session:E.Session,tokenOrchestrator:i}):E}async function Z(e,t,n,o,i){return(0,B.L)({username:e,password:t,clientMetadata:n,config:o,tokenOrchestrator:i,authFlow:"USER_SRP_AUTH"})}async function X(e,t,n,o){let{userPoolClientId:i,userPoolId:s,userPoolEndpoint:a}=n,c={USERNAME:e},d=await o.getDeviceMetadata(e);d&&d.deviceKey&&(c.DEVICE_KEY=d.deviceKey);let l=(0,W.d)({username:e,userPoolId:s,userPoolClientId:i}),u=(0,g.R)({endpointResolver:(0,x.o)({endpointOverride:a})}),p=await u({region:(0,S.J)(s),userAgentValue:(0,h.A)(r.BM.SignIn)},{AuthFlow:"CUSTOM_AUTH",AuthParameters:c,ClientMetadata:t,ClientId:i,UserContextData:l}),E=p.ChallengeParameters?.USERNAME??e;return((0,J.d)(E),"DEVICE_SRP_AUTH"===p.ChallengeName)?(0,z.O)({username:E,config:n,clientMetadata:t,session:p.Session,tokenOrchestrator:o}):p}async function ee(e,t,n,o,i){(0,s.$y)(o);let{userPoolId:a,userPoolClientId:c,userPoolEndpoint:d}=o,l=a?.split("_")[1]||"",u=await (0,H.H)(l),p={USERNAME:e,SRP_A:u.A.toString(16),CHALLENGE_NAME:"SRP_A"},E=(0,W.d)({username:e,userPoolId:a,userPoolClientId:c}),m=(0,g.R)({endpointResolver:(0,x.o)({endpointOverride:d})}),{ChallengeParameters:f,Session:y}=await m({region:(0,S.J)(a),userAgentValue:(0,h.A)(r.BM.SignIn)},{AuthFlow:"CUSTOM_AUTH",AuthParameters:p,ClientMetadata:n,ClientId:c,UserContextData:E}),I=f?.USERNAME??e;return(0,J.d)(I),(0,j.i)(G.f,[t,f,n,y,u,o,i],I,i)}async function et(e){var t,n,o;let{challengeName:r,challengeParameters:d,availableChallenges:u}=e,p=i.H.getConfig().Auth?.Cognito;switch((0,s.$y)(p),r){case"CUSTOM_CHALLENGE":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_CUSTOM_CHALLENGE",additionalInfo:d}};case"MFA_SETUP":{let{signInSession:e,username:o}=C.c$.getState(),i=ei(er(d.MFAS_CAN_SETUP))||[],r=i.filter(e=>"EMAIL"===e||"TOTP"===e),s=r.includes("TOTP"),u=r.includes("EMAIL");if(s&&u)return{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION",allowedMFATypes:r}};if(u)return{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_EMAIL_SETUP"}};if(s){let i,r=(i={endpointResolver:(0,x.o)({endpointOverride:p.userPoolEndpoint})},(0,E.A)(m.e,(0,f._)("AssociateSoftwareToken"),(0,y.T)(),{...I.C,...i})),{Session:s,SecretCode:c}
1=await r({region:(0,S.J)(p.userPoolId)},{Session:e});return C.c$.dispatch({type:"SET_SIGN_IN_SESSION",value:s}),{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_TOTP_SETUP",totpSetupDetails:(t=c,n=o,{sharedSecret:t,getSetupUri:(e,o)=>{let i=`otpauth://totp/${e}:${o??n}?secret=${t}&issuer=${e}`;return new a.o(i)}})}}}throw new c.l({name:l.nC.SignInException,message:`Cannot initiate MFA setup from available types: ${i}`})}case"NEW_PASSWORD_REQUIRED":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED",missingAttributes:(o=d.requiredAttributes)?JSON.parse(o).map(e=>e.includes(Y)?e.replace(Y,""):e):[]}};case"SELECT_MFA_TYPE":return{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_MFA_SELECTION",allowedMFATypes:ei(er(d.MFAS_CAN_CHOOSE))}};case"SMS_OTP":case"SMS_MFA":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_SMS_CODE",codeDeliveryDetails:{deliveryMedium:d.CODE_DELIVERY_DELIVERY_MEDIUM,destination:d.CODE_DELIVERY_DESTINATION}}};case"SOFTWARE_TOKEN_MFA":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_TOTP_CODE"}};case"EMAIL_OTP":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_EMAIL_CODE",codeDeliveryDetails:{deliveryMedium:d.CODE_DELIVERY_DELIVERY_MEDIUM,destination:d.CODE_DELIVERY_DESTINATION}}};case"WEB_AUTHN":{let e=await $(d);if("isSignedIn"in e&&"nextStep"in e)return e;return et(e)}case"PASSWORD":case"PASSWORD_SRP":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_PASSWORD"}};case"SELECT_CHALLENGE":return{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_FIRST_FACTOR_SELECTION",availableChallenges:u}}}throw new c.l({name:l.nC.SignInException,message:`An error occurred during the sign in process. ${r} challengeName returned by the underlying service was not addressed.`})}function en(e){return e===d.zh.PasswordResetRequiredException?{isSignedIn:!1,nextStep:{signInStep:"RESET_PASSWORD"}}:e===d.zh.UserNotConfirmedException?{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_UP"}}:void 0}function eo(e){return"SMS_MFA"===e?"SMS":"SOFTWARE_TOKEN_MFA"===e?"TOTP":"EMAIL_OTP"===e?"EMAIL":void 0}function ei(e){if(e)return e.map(eo).filter(Boolean)}function er(e){return e?JSON.parse(e):[]}async function es(){let e;try{e=await (0,p.H)()}catch(e){}if(e&&e.userId&&e.username)throw new c.l({name:u.z0,message:"There is already a signed in user.",recoverySuggestion:"Call signOut before calling signIn again."})}function ea(e){return C.c$.getState().username??e}},46903:(e,t,n)=>{function o(){return{active:!1}}n.d(t,{z:()=>i});let i=(e=>{let t=e(o(),{type:"RESET"});return{getState:()=>t,dispatch:n=>{t=e(t,n)}}})((e,t)=>{switch(t.type){case"SET_USERNAME":return{...e,username:t.value};case"SET_SESSION":return{...e,session:t.value};case"START":return{...e,active:!0};case"RESET":return o();default:return e}})},48557:(e,t,n)=>{n.d(t,{nC:()=>i,ut:()=>s});var o,i,r=n(15890);let s={[r.P.EmptyChallengeResponse]:{message:"challengeResponse is required to confirmSignIn"},[r.P.EmptyConfirmResetPasswordUsername]:{message:"username is required to confirmResetPassword"},[r.P.EmptyConfirmSignUpCode]:{message:"code is required to confirmSignUp"},[r.P.EmptyConfirmSignUpUsername]:{message:"username is required to confirmSignUp"},[r.P.EmptyConfirmResetPasswordConfirmationCode]:{message:"confirmationCode is required to confirmResetPassword"},[r.P.EmptyConfirmResetPasswordNewPassword]:{message:"newPassword is required to confirmResetPassword"},[r.P.EmptyResendSignUpCodeUsername]:{message:"username is required to confirmSignUp"},[r.P.EmptyResetPasswordUsername]:{message:"username is required to resetPassword"},[r.P.EmptySignInPassword]:{message:"password is required to signIn"},[r.P.EmptySignInUsername]:{message:"username is required to signIn"},[r.P.EmptySignUpPassword]:{message:"password is required to signUp"},[r.P.EmptySignUpUsername]:{message:"username is required to signUp"},[r.P.CustomAuthSignInPassword]:{message:"A password is not needed when signing in with CUSTOM_WITHOUT_SRP",recoverySuggestion:"Do not include a password in your signIn call."},[r.P.IncorrectMFAMethod]:{message:"Incorrect MFA method was chosen. It should be either SMS, TOTP, or EMAIL",recoverySuggestion:"Try to pass SMS, TOTP, or EMAIL as the challengeResponse"},[r.P.EmptyVerifyTOTPSetupCode]:{message:"code is required to verifyTotpSetup"},[r.P.EmptyUpdatePassword]:{message:"oldPassword and newPassword are required to changePassword"},[r.P.EmptyConfirmUserAttributeCode]:{message:"confirmation code is required to confirmUserAttribute"},[r.P.InvalidPreferredChallenge]:{message:"The preferred challenge is not enabled in your backend configuration",recoverySuggestion:"Ensure the authentication method is enabled in your Amplify backend configuration"}};
1!function(e){e.DEFAULT_MSG="Authentication Error",e.EMPTY_EMAIL="Email cannot be empty",e.EMPTY_PHONE="Phone number cannot be empty",e.EMPTY_USERNAME="Username cannot be empty",e.INVALID_USERNAME="The username should either be a string or one of the sign in types",e.EMPTY_PASSWORD="Password cannot be empty",e.EMPTY_CODE="Confirmation code cannot be empty",e.SIGN_UP_ERROR="Error creating account",e.NO_MFA="No valid MFA method provided",e.INVALID_MFA="Invalid MFA type",e.EMPTY_CHALLENGE="Challenge response cannot be empty",e.NO_USER_SESSION="Failed to get the session because the user is empty",e.NETWORK_ERROR="Network Error",e.DEVICE_CONFIG="Device tracking has not been configured in this User Pool",e.AUTOSIGNIN_ERROR="Please use your credentials to sign in",e.OAUTH_ERROR="Couldn't finish OAuth flow, check your User Pool HostedUI settings"}(o||(o={})),function(e){e.SignInException="SignInException",e.OAuthSignInError="OAuthSignInException"}(i||(i={}))},49478:(e,t,n)=>{n.d(t,{$:()=>r});var o=n(8426),i=n(17422);let r=e=>(0,i.$)(o.H,e)},54645:(e,t,n)=>{var o;n.d(t,{m:()=>o}),function(e){e.NoEndpointId="NoEndpointId",e.PlatformNotSupported="PlatformNotSupported",e.Unknown="Unknown",e.NetworkError="NetworkError"}(o||(o={}))},55799:(e,t,n)=>{n.d(t,{H0:()=>r,OW:()=>s,O_:()=>l,X4:()=>d,f3:()=>u});var o=n(13989),i=n(6846);function r(e){if(!e||!e.accessToken)throw new o.l({name:i.zz,message:"User needs to be authenticated to call this API.",recoverySuggestion:"Sign in before calling this API again."})}function s(e){if(!e||!e.idToken)throw new o.l({name:i.zz,message:"User needs to be authenticated to call this API.",recoverySuggestion:"Sign in before calling this API again."})}let a=new o.l({name:i.Cs,message:`Token refresh is not supported when authenticated with the 'implicit grant' (token) oauth flow. 
2	Please change your oauth configuration to use 'code grant' flow.`,recoverySuggestion:`Please logout and change your Amplify configuration to use "code grant" flow. 
3	E.g { responseType: 'code' }`}),c=new o.l({name:i.zz,message:"User needs to be authenticated to call this API.",recoverySuggestion:"Sign in before calling this API again."});function d(e){var t,n;if(p(t=e)&&!t?.refreshToken)throw a;if(!(p(n=e)&&n?.refreshToken))throw c}function l(e){if(!e||!e.deviceKey||!e.deviceGroupKey||!e.randomPassword)throw new o.l({name:i.kM,message:"Either deviceKey, deviceGroupKey or secretPassword were not found during the sign-in process.",recoverySuggestion:"Make sure to not clear storage after calling the signIn API."})}let u={inflightOAuth:"inflightOAuth",oauthSignIn:"oauthSignIn",oauthPKCE:"oauthPKCE",oauthState:"oauthState"};function p(e){return e?.accessToken||e?.idToken}},58711:(e,t,n)=>{let o,i,r;function s(e,t){null!=e&&this.fromString(e,t)}function a(){return new s(null,null)}n.d(t,{A:()=>s});let c="undefined"!=typeof navigator;c&&"Microsoft Internet Explorer"===navigator.appName?(s.prototype.am=function(e,t,n,o,i,r){let s=32767&t,a=t>>15;for(;--r>=0;){let t=32767&this[e],r=this[e++]>>15,c=a*t+r*s;i=((t=s*t+((32767&c)<<15)+n[o]+(0x3fffffff&i))>>>30)+(c>>>15)+a*r+(i>>>30),n[o++]=0x3fffffff&t}return i},o=30):c&&"Netscape"!==navigator.appName?(s.prototype.am=function(e,t,n,o,i,r){for(;--r>=0;){let r=t*this[e++]+n[o]+i;i=Math.floor(r/0x4000000),n[o++]=0x3ffffff&r}return i},o=26):(s.prototype.am=function(e,t,n,o,i,r){let s=16383&t,a=t>>14;for(;--r>=0;){let t=16383&this[e],r=this[e++]>>14,c=a*t+r*s;i=((t=s*t+((16383&c)<<14)+n[o]+i)>>28)+(c>>14)+a*r,n[o++]=0xfffffff&t}return i},o=28),s.prototype.DB=o,s.prototype.DM=(1<<o)-1,s.prototype.DV=1<<o,s.prototype.FV=0x10000000000000,s.prototype.F1=52-o,s.prototype.F2=2*o-52;let d=[];for(r=0,i=48;r<=9;++r)d[i++]=r;for(r=10,i=97;r<36;++r)d[i++]=r;for(r=10,i=65;r<36;++r)d[i++]=r;function l(e){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(e)}function u(e){let t=a();return t.fromInt(e),t}function p(e){let t,n=1;return 0!=(t=e>>>16)&&(e=t,n+=16),0!=(t=e>>8)&&(e=t,n+=8),0!=(t=e>>4)&&(e=t,n+=4),0!=(t=e>>2)&&(e=t,n+=2),0!=(t=e>>1)&&(e=t,n+=1),n}function h(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>
3>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}h.prototype.convert=function(e){let t=a();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(s.ZERO)>0&&this.m.subTo(t,t),t},h.prototype.revert=function(e){let t=a();return e.copyTo(t),this.reduce(t),t},h.prototype.reduce=function(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(let t=0;t<this.m.t;++t){let n=32767&e[t],o=n*this.mpl+((n*this.mph+(e[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(n=t+this.m.t,e[n]+=this.m.am(0,o,e,t,0,this.m.t);e[n]>=e.DV;)e[n]-=e.DV,e[++n]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},h.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},h.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},s.prototype.copyTo=function(e){for(let t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s},s.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+this.DV:this.t=0},s.prototype.fromString=function(e,t){let n;if(16===t)n=4;else if(8===t)n=3;else if(2===t)n=1;else if(32===t)n=5;else if(4===t)n=2;else throw Error("Only radix 2, 4, 8, 16, 32 are supported");this.t=0,this.s=0;let o=e.length,i=!1,r=0;for(;--o>=0;){let t=function(e,t){let n=d[e.charCodeAt(t)];return null==n?-1:n}(e,o);if(t<0){"-"===e.charAt(o)&&(i=!0);continue}i=!1,0===r?this[this.t++]=t:r+n>this.DB?(this[this.t-1]|=(t&(1<<this.DB-r)-1)<<r,this[this.t++]=t>>this.DB-r):this[this.t-1]|=t<<r,(r+=n)>=this.DB&&(r-=this.DB)}this.clamp(),i&&s.ZERO.subTo(this,this)},s.prototype.clamp=function(){let e=this.s&this.DM;for(;this.t>0&&this[this.t-1]==e;)--this.t},s.prototype.dlShiftTo=function(e,t){let n;for(n=this.t-1;n>=0;--n)t[n+e]=this[n];for(n=e-1;n>=0;--n)t[n]=0;t.t=this.t+e,t.s=this.s},s.prototype.drShiftTo=function(e,t){for(let n=e;n<this.t;++n)t[n-e]=this[n];t.t=Math.max(this.t-e,0),t.s=this.s},s.prototype.lShiftTo=function(e,t){let n,o=e%this.DB,i=this.DB-o,r=(1<<i)-1,s=Math.floor(e/this.DB),a=this.s<<o&this.DM;for(n=this.t-1;n>=0;--n)t[n+s+1]=this[n]>>i|a,a=(this[n]&r)<<o;for(n=s-1;n>=0;--n)t[n]=0;t[s]=a,t.t=this.t+s+1,t.s=this.s,t.clamp()},s.prototype.rShiftTo=function(e,t){t.s=this.s;let n=Math.floor(e/this.DB);if(n>=this.t){t.t=0;return}let o=e%this.DB,i=this.DB-o,r=(1<<o)-1;t[0]=this[n]>>o;for(let e=n+1;e<this.t;++e)t[e-n-1]|=(this[e]&r)<<i,t[e-n]=this[e]>>o;o>0&&(t[this.t-n-1]|=(this.s&r)<<i),t.t=this.t-n,t.clamp()},s.prototype.subTo=function(e,t){let n=0,o=0,i=Math.min(e.t,this.t);for(;n<i;)o+=this[n]-e[n],t[n++]=o&this.DM,o>>=this.DB;if(e.t<this.t){for(o-=e.s;n<this.t;)o+=this[n],t[n++]=o&this.DM,o>>=this.DB;o+=this.s}else{for(o+=this.s;n<e.t;)o-=e[n],t[n++]=o&this.DM,o>>=this.DB;o-=e.s}t.s=o<0?-1:0,o<-1?t[n++]=this.DV+o:o>0&&(t[n++]=o),t.t=n,t.clamp()},s.prototype.multiplyTo=function(e,t){let n=this.abs(),o=e.abs(),i=n.t;for(t.t=i+o.t;--i>=0;)t[i]=0;for(i=0;i<o.t;++i)t[i+n.t]=n.am(0,o[i],t,i,0,n.t);t.s=0,t.clamp(),this.s!==e.s&&s.ZERO.subTo(t,t)},s.prototype.squareTo=function(e){let t=this.abs(),n=e.t=2*t.t;for(;--n>=0;)e[n]=0;for(n=0;n<t.t-1;++n){let o=t.am(n,t[n],e,2*n,0,1);(e[n+t.t]+=t.am(n+1,2*t[n],e,2*n+1,o,t.t-n-1))>=t.DV&&(e[n+t.t]-=t.DV,e[n+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(n,t[n],e,2*n,0,1)),e.s=0,e.clamp()},s.prototype.divRemTo=function(e,t,n){let o=e.abs();if(o.t<=0)return;let i=this.abs();if(i.t<o.t){null!=t&&t.fromInt(0),null!=n&&this.copyTo(n);return}null===n&&(n=a());let r=a(),c=this.s,d=e.s,l=this.DB-p(o[o.t-1]);l>0?(o.lShiftTo(l,r),i.lShiftTo(l,n)):(o.copyTo(r),i.copyTo(n));let u=r.t,h=r[u-1];if(0===h)return;let g=h*(1<<this.F1)+(u>1?r[u-2]>>this.F2:0),E=this.FV/g,m=(1<<this.F1)/g,f=1<<this.F2,y=n.t,I=y-u,x=null===t?a():t;for(r.dlShiftTo(I,x),n.compareTo(x)>=0&&(n[n.t++]=1,n.subTo(x,n)),s.ONE.dlShiftTo(u,x),x.subTo(r,r);r.t<u;)r[r.t++]=0;for(;--I>=0;){let e=n[--y]===h?this.DM:Math.floor(n[y]*E+(n[y-1]+f)*m);if((n[y]+=r.am(0,e,n,I,0,u))<e)for(r.dlShiftTo(I,x),n.subTo(x,n);n[y]<--e;)n.subTo(x,n)}null!==t&&(n.drShiftTo(u,t),c!==d&&s.ZERO.subTo(t,t)),n.t=u,n.clamp(),l>0&&n.rShiftTo(l,n),c<0&&s.ZERO.subTo(n,n)},s.prototype.invDigit=function(){if(this.t<1)return 0;let e=this[0];if((1&e)==0)return 0;let t=3&e;
3return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t},s.prototype.addTo=function(e,t){let n=0,o=0,i=Math.min(e.t,this.t);for(;n<i;)o+=this[n]+e[n],t[n++]=o&this.DM,o>>=this.DB;if(e.t<this.t){for(o+=e.s;n<this.t;)o+=this[n],t[n++]=o&this.DM,o>>=this.DB;o+=this.s}else{for(o+=this.s;n<e.t;)o+=e[n],t[n++]=o&this.DM,o>>=this.DB;o+=e.s}t.s=o<0?-1:0,o>0?t[n++]=o:o<-1&&(t[n++]=this.DV+o),t.t=n,t.clamp()},s.prototype.toString=function(e){let t,n;if(this.s<0)return"-"+this.negate().toString(e);if(16==e)t=4;else if(8===e)t=3;else if(2===e)t=1;else if(32===e)t=5;else if(4===e)t=2;else throw Error("Only radix 2, 4, 8, 16, 32 are supported");let o=(1<<t)-1,i=!1,r="",s=this.t,a=this.DB-s*this.DB%t;if(s-- >0)for(a<this.DB&&(n=this[s]>>a)>0&&(i=!0,r=l(n));s>=0;)a<t?n=(this[s]&(1<<a)-1)<<t-a|this[--s]>>(a+=this.DB-t):(n=this[s]>>(a-=t)&o,a<=0&&(a+=this.DB,--s)),n>0&&(i=!0),i&&(r+=l(n));return i?r:"0"},s.prototype.negate=function(){let e=a();return s.ZERO.subTo(this,e),e},s.prototype.abs=function(){return this.s<0?this.negate():this},s.prototype.compareTo=function(e){let t=this.s-e.s;if(0!=t)return t;let n=this.t;if(0!=(t=n-e.t))return this.s<0?-t:t;for(;--n>=0;)if(0!=(t=this[n]-e[n]))return t;return 0},s.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+p(this[this.t-1]^this.s&this.DM)},s.prototype.mod=function(e){let t=a();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(s.ZERO)>0&&e.subTo(t,t),t},s.prototype.equals=function(e){return 0===this.compareTo(e)},s.prototype.add=function(e){let t=a();return this.addTo(e,t),t},s.prototype.subtract=function(e){let t=a();return this.subTo(e,t),t},s.prototype.multiply=function(e){let t=a();return this.multiplyTo(e,t),t},s.prototype.divide=function(e){let t=a();return this.divRemTo(e,t,null),t},s.prototype.modPow=function(e,t,n){let o,i,r,s=e.bitLength(),c=u(1),d=new h(t);if(s<=0)return c;let l=[],g=3,E=(o=s<18?1:s<48?3:s<144?4:s<768?5:6)-1,m=(1<<o)-1;if(l[1]=d.convert(this),o>1){let e=a();for(d.sqrTo(l[1],e);g<=m;)l[g]=a(),d.mulTo(e,l[g-2],l[g]),g+=2}let f=e.t-1,y=!0,I=a();for(s=p(e[f])-1;f>=0;){for(s>=E?i=e[f]>>s-E&m:(i=(e[f]&(1<<s+1)-1)<<E-s,f>0&&(i|=e[f-1]>>this.DB+s-E)),g=o;(1&i)==0;)i>>=1,--g;if((s-=g)<0&&(s+=this.DB,--f),y)l[i].copyTo(c),y=!1;else{for(;g>1;)d.sqrTo(c,I),d.sqrTo(I,c),g-=2;g>0?d.sqrTo(c,I):(r=c,c=I,I=r),d.mulTo(I,l[i],c)}for(;f>=0&&(e[f]&1<<s)==0;)d.sqrTo(c,I),r=c,c=I,I=r,--s<0&&(s=this.DB-1,--f)}let x=d.revert(c);return n(null,x),x},s.ZERO=u(0),s.ONE=u(1)},58820:(e,t,n)=>{let o;n.d(t,{A:()=>a});let i={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)}
3,r=new Uint8Array(16);var s=n(87998);let a=function(e,t,n){if(i.randomUUID&&!t&&!e)return i.randomUUID();let a=(e=e||{}).random??e.rng?.()??function(){if(!o){if("undefined"==typeof crypto||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");o=crypto.getRandomValues.bind(crypto)}return o(r)}();if(a.length<16)throw Error("Random bytes length must be >= 16");if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t){if((n=n||0)<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=a[e];return t}return(0,s.k)(a)}},59034:(e,t,n)=>{n.d(t,{g:()=>i,o:()=>o});let o=URL,i=URLSearchParams},63215:(e,t,n)=>{n.d(t,{ZL:()=>E,pR:()=>m});var o=n(54645),i=n(28498);class r extends i.x{constructor(){super({name:o.m.PlatformNotSupported,message:"Function not supported on current platform"})}}class s{constructor(e){this.storage=e}async setItem(e,t){if(!this.storage)throw new r;this.storage.setItem(e,t)}async getItem(e){if(!this.storage)throw new r;return this.storage.getItem(e)}async removeItem(e){if(!this.storage)throw new r;this.storage.removeItem(e)}async clear(){if(!this.storage)throw new r;this.storage.clear()}}var a=n(10434);class c{constructor(){this.storage=new Map}get length(){return this.storage.size}key(e){return e>this.length-1?null:Array.from(this.storage.keys())[e]}setItem(e,t){this.storage.set(e,t)}getItem(e){return this.storage.get(e)??null}removeItem(e){this.storage.delete(e)}clear(){this.storage.clear()}}let d=new a.C("CoreStorageUtils"),l=()=>{try{if("undefined"!=typeof window&&window.sessionStorage)return window.sessionStorage.getItem("test"),window.sessionStorage;throw Error("sessionStorage is not defined")}catch(e){return d.info("sessionStorage not found. InMemoryStorage is used as a fallback."),new c}};class u extends s{constructor(){super((()=>{try{if("undefined"!=typeof window&&window.localStorage)return window.localStorage}catch(e){d.info("localStorage not found. InMemoryStorage is used as a fallback.")}return new c})())}}class p extends s{constructor(){super(l())}}class h{constructor(e){this._storage=e}get storage(){if(!this._storage)throw new r;return this._storage}setItem(e,t){this.storage.setItem(e,t)}getItem(e){return this.storage.getItem(e)}removeItem(e){this.storage.removeItem(e)}clear(){this.storage.clear()}}class g extends h{constructor(){super(l())}}let E=new u;new p;let m=new g;new s(new c)},63471:(e,t,n)=>{n.d(t,{Q:()=>A,o:()=>C});var o=n(63215),i=n(16095),r=n(23750),s=n(55799),a=n(13989),c=n(75738),d=n(14924),l=n(95186),u=n(92835),p=n(27429),h=n(3422);let g=(e=>{let t;return async(...n)=>t||(t=new Promise((o,i)=>{e(...n).then(e=>{o(e)}).catch(e=>{i(e)}).finally(()=>{t=void 0})}))})(async({tokens:e,authConfig:t,username:n,clientMetadata:o})=>{let g;(0,i.$y)(t?.Cognito);let{userPoolId:E,userPoolClientId:m,userPoolEndpoint:f}=t.Cognito,y=(0,r.J)(E);(0,s.X4)(e);let I=(g={endpointResolver:(0,c.o)({endpointOverride:f})},(0,d.A)(p.e,(0,l._)("GetTokensFromRefreshToken"),(0,u.T)(),{...h.C,...g})),{AuthenticationResult:x}=await I({region:y},{ClientId:m,RefreshToken:e.refreshToken,DeviceKey:e.deviceMetadata?.deviceKey,ClientMetadata:o}),S=(0,i.Cq)(x?.AccessToken??""),w=x?.IdToken?(0,i.Cq)(x.IdToken):void 0,{iat:v}=S.payload;if(!v)throw new a.l({name:"iatNotFoundException",message:"iat not found in access token"});return{accessToken:S,idToken:w,clockDrift:1e3*v-new Date().getTime(),refreshToken:x?.RefreshToken??e.refreshToken,username:n}});var E=n(9494),m=n(91216),f=n(25478);function y({expiresAt:e,clockDrift:t,tolerance:n=5e3}){return Date.now()+t+n>e}var I=n(29592);let x=new(n(79881)).S(o.ZL),S=[];class w{constructor(){this.waitForInflightOAuth=(0,f.B)()?async()=>{if(await x.loadOAuthInFlight())return this.inflightPromise||(this.inflightPromise=new Promise((e,t)=>{S.push(e)})),this.inflightPromise}:async()=>{}}setAuthConfig(e){x.setAuthConfig(e.Cognito),this.authConfig=e}setTokenRefresher(e){this.tokenRefresher=e}setAuthTokenStore(e){this.tokenStore=e}getTokenStore(){if(!this.tokenStore)throw new a.l({name:"EmptyTokenStoreException",message:"TokenStore not set"});return this.tokenStore}
3getTokenRefresher(){if(!this.tokenRefresher)throw new a.l({name:"EmptyTokenRefresherException",message:"TokenRefresher not set"});return this.tokenRefresher}setClientMetadataProvider(e){this.clientMetadataProvider=e}async getTokens(e){let t;try{(0,i.$y)(this.authConfig?.Cognito)}catch(e){return null}await this.waitForInflightOAuth(),this.inflightPromise=void 0,t=await this.getTokenStore().loadTokens();let n=await this.getTokenStore().getLastAuthUser();if(null===t)return null;let o=!!t?.idToken&&y({expiresAt:(t.idToken?.payload?.exp??0)*1e3,clockDrift:t.clockDrift??0}),r=y({expiresAt:(t.accessToken?.payload?.exp??0)*1e3,clockDrift:t.clockDrift??0});return(e?.forceRefresh||o||r)&&null===(t=await this.refreshTokens({tokens:t,username:n,clientMetadata:e?.clientMetadata??await this.clientMetadataProvider?.()}))?null:{accessToken:t?.accessToken,idToken:t?.idToken,signInDetails:t?.signInDetails}}async refreshTokens({tokens:e,username:t,clientMetadata:n}){try{let{signInDetails:o}=e,i=await this.getTokenRefresher()({tokens:e,authConfig:this.authConfig,username:t,clientMetadata:n});return i.signInDetails=o,await this.setTokens({tokens:i}),m.YZ.dispatch("auth",{event:"tokenRefresh"},"Auth",m.U9),i}catch(e){return this.handleErrors(e)}}handleErrors(e){if((0,I.e)(e),this.isAuthenticationError(e)&&this.clearTokens(),m.YZ.dispatch("auth",{event:"tokenRefresh_failure",data:{error:e}},"Auth",m.U9),e.name.startsWith("NotAuthorizedException"))return null;throw e}isAuthenticationError(e){return["NotAuthorizedException","TokenRevokedException","UserNotFoundException","PasswordResetRequiredException","UserNotConfirmedException","RefreshTokenReuseException"].some(t=>e?.name?.startsWith?.(t))}async setTokens({tokens:e}){return this.getTokenStore().storeTokens(e)}async clearTokens(){return this.getTokenStore().clearTokens()}getDeviceMetadata(e){return this.getTokenStore().getDeviceMetadata(e)}clearDeviceMetadata(e){return this.getTokenStore().clearDeviceMetadata(e)}setOAuthMetadata(e){return this.getTokenStore().setOAuthMetadata(e)}getOAuthMetadata(){return this.getTokenStore().getOAuthMetadata()}}class v{constructor(){this.authTokenStore=new E.Uv,this.authTokenStore.setKeyValueStorage(o.ZL),this.tokenOrchestrator=new w,this.tokenOrchestrator.setAuthTokenStore(this.authTokenStore),this.tokenOrchestrator.setTokenRefresher(g)}getTokens(e={}){return this.tokenOrchestrator.getTokens(e)}setKeyValueStorage(e){this.authTokenStore.setKeyValueStorage(e)}setClientMetadataProvider(e){this.tokenOrchestrator.setClientMetadataProvider(e)}setAuthConfig(e){this.authTokenStore.setAuthConfig(e),this.tokenOrchestrator.setAuthConfig(e)}}let A=new v,{tokenOrchestrator:C}=A},63757:(e,t,n)=>{n.d(t,{k:()=>C});var o=n(8426),i=n(16095),r=n(15890),s=n(7232),a=n(29592),c=n(45294),d=n(46903),l=n(19636),u=n(97307),p=n(29470),h=n(63471),g=n(85421),E=n(76294),m=n(98231),f=n(75738),y=n(23750),I=n(81166),x=n(94519),S=n(28656);async function w({username:e,clientMetadata:t,config:n,tokenOrchestrator:o,preferredChallenge:i,password:a,session:c}){let{userPoolId:d,userPoolClientId:l,userPoolEndpoint:u}=n,p=(0,E.d)({username:e,userPoolId:d,userPoolClientId:l}),h={USERNAME:e};if(i){if(n.passwordless&&(("EMAIL_OTP"!==i||n.passwordless.emailOtpEnabled)&&("SMS_OTP"!==i||n.passwordless.smsOtpEnabled)&&("WEB_AUTHN"!==i||n.passwordless.webAuthn)||(0,s.M)(!1,r.P.InvalidPreferredChallenge)),"PASSWORD_SRP"===i)return(0,s.M)(!!a,r.P.EmptySignInPassword),(0,x.L)({username:e,password:a,clientMetadata:t,config:n,tokenOrchestrator:o,authFlow:"USER_AUTH",preferredChallenge:i});"PASSWORD"===i&&((0,s.M)(!!a,r.P.EmptySignInPassword),h.PASSWORD=a),h.PREFERRED_CHALLENGE=i}let w={AuthFlow:"USER_AUTH",AuthParameters:h,ClientMetadata:t,ClientId:l,UserContextData:p};c&&(w.Session=c);let v=(0,m.R)({endpointResolver:(0,f.o)({endpointOverride:u})}),A=await v({region:(0,y.J)(d),userAgentValue:(0,I.A)(g.BM.SignIn)},w);return(0,S.d)(e),A}var v=n(19891),A=n(28707);async function C(e){let{username:t,password:n,options:g}=e,E=o.H.getConfig().Auth?.Cognito,m={loginId:t,authFlowType:"USER_AUTH"};(0,i.$y)(E);let f=g?.clientMetadata,y=g?.preferredChallenge??E?.passwordless?.preferredChallenge;(0,s.M)(!!t,r.P.EmptySignInUsername);try{let e={username:t,config:E,tokenOrchestrator:h.o,clientMetadata:f,preferredChallenge:y,password:n},o=d.z.getState();o.active&&o.username===t&&(e.session=o.session);let i=await w(e),r=(0,c.ni)(t);if((0,l.wr)({signInSession:i.Session,username:r,challengeName:i.ChallengeName,signInDetail
3s:m}),i.AuthenticationResult)return await (0,u.i)({username:r,...i.AuthenticationResult,NewDeviceMetadata:await (0,v.i)({userPoolId:E.userPoolId,userPoolEndpoint:E.userPoolEndpoint,newDeviceMetadata:i.AuthenticationResult.NewDeviceMetadata,accessToken:i.AuthenticationResult.AccessToken}),signInDetails:m}),(0,l.jN)(),await (0,p.Q)(),(0,A.xO)(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}};return(0,c.q2)({challengeName:i.ChallengeName,challengeParameters:i.ChallengeParameters,availableChallenges:"AvailableChallenges"in i?i.AvailableChallenges:void 0})}catch(t){(0,l.jN)(),(0,A.xO)(),(0,a.e)(t);let e=(0,c.m$)(t.name);if(e)return e;throw t}}},66842:(e,t,n)=>{n.d(t,{U:()=>o});let o={convert:e=>new TextEncoder().encode(e)}},67589:(e,t,n)=>{n.d(t,{i:()=>i});var o=n(13989);async function i(e,t,n,i){try{return await e(...t)}catch(r){if(r instanceof o.l&&"ResourceNotFoundException"===r.name&&r.message.includes("Device does not exist."))return await i.clearDeviceMetadata(n),e(...t);throw r}}},69165:(e,t,n)=>{function o(e){return Object.entries(e).map(([e,t])=>({Name:e,Value:t}))}function i(e){let t={};return e?.forEach(e=>{e.Name&&(t[e.Name]=e.Value)}),t}n.d(t,{J:()=>i,Q:()=>o})},72898:(e,t,n)=>{n.d(t,{p:()=>i});var o=n(28498);let i=(e,t=o.x)=>(n,o,i)=>{let{message:r,recoverySuggestion:s}=e[o];if(!n)throw new t({name:o,message:i?`${r} ${i}`:r,recoverySuggestion:s})}},73019:(e,t,n)=>{var o,i,r,s,a,c,d,l,u,p,h,g,E,m,f,y,I,x,S,w,v,A,C,P;n.d(t,{AU:()=>S,zh:()=>f}),function(e){e.ConcurrentModificationException="ConcurrentModificationException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceNotFoundException="ResourceNotFoundException",e.SoftwareTokenMFANotFoundException="SoftwareTokenMFANotFoundException"}(o||(o={})),function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.InvalidPasswordException="InvalidPasswordException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"}(i||(i={})),function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidPasswordException="InvalidPasswordException",e.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UsernameExistsException="UsernameExistsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"}(r||(r={})),function(e){e.CodeMismatchException="CodeMismatchException",e.ExpiredCodeException="ExpiredCodeException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidPasswordException="InvalidPasswordException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyFailedAttemptsException="TooManyFailedAttemptsException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"}(s||(s={})),function(e){e.AliasExistsException="AliasExistsException",e.CodeMismatchException="CodeMismatchException",e.ExpiredCodeException="ExpiredCodeException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyFailedAttemptsException="TooManyFailedAttemptsException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotFoundException="UserNotFoundException"}(a||(a={})),function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"}(c||(c={})),function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"}(d||(d={})),function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"}(l||(l={})),function(e){e.CodeDeliveryFailureException="CodeDeliveryFailureException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidEmailRoleAccessPol
3icyException="InvalidEmailRoleAccessPolicyException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",e.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotFoundException="UserNotFoundException"}(u||(u={})),function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"}(p||(p={})),function(e){e.ExternalServiceException="ExternalServiceException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceConflictException="ResourceConflictException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException"}(h||(h={})),function(e){e.ExternalServiceException="ExternalServiceException",e.InternalErrorException="InternalErrorException",e.InvalidIdentityPoolConfigurationException="InvalidIdentityPoolConfigurationException",e.InvalidParameterException="InvalidParameterException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceConflictException="ResourceConflictException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException"}(g||(g={})),function(e){e.CodeDeliveryFailureException="CodeDeliveryFailureException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidEmailRoleAccessPolicyException="InvalidEmailRoleAccessPolicyException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",e.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"}(E||(E={})),function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException"}(m||(m={})),function(e){e.PasswordResetRequiredException="PasswordResetRequiredException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",e.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",e.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"}(f||(f={})),function(e){e.CodeDeliveryFailureException="CodeDeliveryFailureException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidEmailRoleAccessPol
3icyException="InvalidEmailRoleAccessPolicyException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",e.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotFoundException="UserNotFoundException"}(y||(y={})),function(e){e.AliasExistsException="AliasExistsException",e.CodeMismatchException="CodeMismatchException",e.ExpiredCodeException="ExpiredCodeException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidPasswordException="InvalidPasswordException",e.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",e.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",e.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",e.MFAMethodNotFoundException="MFAMethodNotFoundException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.SoftwareTokenMFANotFoundException="SoftwareTokenMFANotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"}(I||(I={})),function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"}(x||(x={})),function(e){e.CodeDeliveryFailureException="CodeDeliveryFailureException",e.InternalErrorException="InternalErrorException",e.InvalidEmailRoleAccessPolicyException="InvalidEmailRoleAccessPolicyException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidPasswordException="InvalidPasswordException",e.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",e.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UsernameExistsException="UsernameExistsException"}(S||(S={})),function(e){e.AliasExistsException="AliasExistsException",e.CodeDeliveryFailureException="CodeDeliveryFailureException",e.CodeMismatchException="CodeMismatchException",e.ExpiredCodeException="ExpiredCodeException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidEmailRoleAccessPolicyException="InvalidEmailRoleAccessPolicyException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",e.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"}(w||(w={})),function(e){e.CodeMismatchException="CodeMismatchException",e.EnableSoftw
3areTokenMFAException="EnableSoftwareTokenMFAException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.SoftwareTokenMFANotFoundException="SoftwareTokenMFANotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"}(v||(v={})),function(e){e.AliasExistsException="AliasExistsException",e.CodeMismatchException="CodeMismatchException",e.ExpiredCodeException="ExpiredCodeException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"}(A||(A={})),function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"}(C||(C={})),function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"}(P||(P={}))},74500:(e,t,n)=>{n.d(t,{K7:()=>o,Q8:()=>r,jy:()=>i,mU:()=>s});let o=3,i="amz-sdk-invocation-id",r="amz-sdk-request",s=3e5}
3,75738:(e,t,n)=>{n.d(t,{o:()=>s});var o=n(59034),i=n(22560),r=n(76756);let s=({endpointOverride:e})=>t=>e?{url:new o.o(e)}:(({region:e})=>({url:new o.o(`https://${r.M}.${e}.${(0,i.R)(e)}`)}))(t)},76294:(e,t,n)=>{n.d(t,{d:()=>o});function o({username:e,userPoolId:t,userPoolClientId:n}){if("undefined"==typeof window)return;let o=window.AmazonCognitoAdvancedSecurityData;if(void 0===o)return;let i=o.getData(e,t,n);return i?{EncodedData:i}:{}}},76756:(e,t,n)=>{n.d(t,{M:()=>o});let o="cognito-idp"},77682:(e,t,n)=>{n.d(t,{f:()=>p});var o=n(13989),i=n(9345),r=n(75738),s=n(23750),a=n(58711);n(26899);var c=n(17685),d=n(37427),l=n(76294),u=n(99607);async function p(e,t,n,p,h,g,E){let{userPoolId:m,userPoolClientId:f,userPoolEndpoint:y}=g,I=m?.split("_")[1]||"",x=new a.A(t?.SRP_B,16),S=new a.A(t?.SALT,16),w=t?.USER_ID_FOR_SRP;if(!w)throw new o.l({name:"EmptyUserIdForSRPException",message:"USER_ID_FOR_SRP was not found in challengeParameters"});let v=await h.getPasswordAuthenticationKey({username:w,password:e,serverBValue:x,salt:S}),A=(0,c.q)(),C={USERNAME:w,PASSWORD_CLAIM_SECRET_BLOCK:t?.SECRET_BLOCK,TIMESTAMP:A,PASSWORD_CLAIM_SIGNATURE:(0,d.I)({username:w,userPoolName:I,challengeParameters:t,dateNow:A,hkdf:v})},P=await E.getDeviceMetadata(w);P&&P.deviceKey&&(C.DEVICE_KEY=P.deviceKey);let R=(0,l.d)({username:w,userPoolId:m,userPoolClientId:f}),T=(0,i.H)({endpointResolver:(0,r.o)({endpointOverride:y})}),N=await T({region:(0,s.J)(m)},{ChallengeName:"PASSWORD_VERIFIER",ChallengeResponses:C,ClientMetadata:n,Session:p,ClientId:f,UserContextData:R});return"DEVICE_SRP_AUTH"===N.ChallengeName?(0,u.O)({username:w,config:g,clientMetadata:n,session:N.Session,tokenOrchestrator:E}):N}},79881:(e,t,n)=>{n.d(t,{S:()=>c});var o=n(16095),i=n(9494),r=n(55799);let s="amplify-signin-with-hostedUI",a="CognitoIdentityServiceProvider";class c{constructor(e){this.keyValueStorage=e}async clearOAuthInflightData(){(0,o.$y)(this.cognitoConfig);let e=d(a,this.cognitoConfig.userPoolClientId);await Promise.all([this.keyValueStorage.removeItem(e.inflightOAuth),this.keyValueStorage.removeItem(e.oauthPKCE),this.keyValueStorage.removeItem(e.oauthState)])}async clearOAuthData(){(0,o.$y)(this.cognitoConfig);let e=d(a,this.cognitoConfig.userPoolClientId);return await this.clearOAuthInflightData(),await this.keyValueStorage.removeItem(s),this.keyValueStorage.removeItem(e.oauthSignIn)}loadOAuthState(){(0,o.$y)(this.cognitoConfig);let e=d(a,this.cognitoConfig.userPoolClientId);return this.keyValueStorage.getItem(e.oauthState)}storeOAuthState(e){(0,o.$y)(this.cognitoConfig);let t=d(a,this.cognitoConfig.userPoolClientId);return this.keyValueStorage.setItem(t.oauthState,e)}loadPKCE(){(0,o.$y)(this.cognitoConfig);let e=d(a,this.cognitoConfig.userPoolClientId);return this.keyValueStorage.getItem(e.oauthPKCE)}storePKCE(e){(0,o.$y)(this.cognitoConfig);let t=d(a,this.cognitoConfig.userPoolClientId);return this.keyValueStorage.setItem(t.oauthPKCE,e)}setAuthConfig(e){this.cognitoConfig=e}async loadOAuthInFlight(){(0,o.$y)(this.cognitoConfig);let e=d(a,this.cognitoConfig.userPoolClientId);return await this.keyValueStorage.getItem(e.inflightOAuth)==="true"}async storeOAuthInFlight(e){(0,o.$y)(this.cognitoConfig);let t=d(a,this.cognitoConfig.userPoolClientId);await this.keyValueStorage.setItem(t.inflightOAuth,`${e}`)}async loadOAuthSignIn(){(0,o.$y)(this.cognitoConfig);let e=d(a,this.cognitoConfig.userPoolClientId),t=await this.keyValueStorage.getItem(s),[n,i]=(await this.keyValueStorage.getItem(e.oauthSignIn))?.split(",")??[];return{isOAuthSignIn:"true"===n||"true"===t,preferPrivateSession:"true"===i}}async storeOAuthSignIn(e,t=!1){(0,o.$y)(this.cognitoConfig);let n=d(a,this.cognitoConfig.userPoolClientId);await this.keyValueStorage.setItem(n.oauthSignIn,`${e},${t}`)}}let d=(e,t)=>(0,i.Qm)(r.f3)(e,t)},81166:(e,t,n)=>{n.d(t,{A:()=>r});var o=n(1476),i=n(85421);let r=(e,t)=>(0,o.fE)({category:i.b7.Auth,action:e,...t})},82447:(e,t,n)=>{n.d(t,{hv:()=>r,oA:()=>o,pU:()=>i});let o="FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E
37EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF",i={},r={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();1===t.length&&(t=`0${t}`),i[e]=t,r[t]=e}},85421:(e,t,n)=>{var o,i,r,s,a,c,d,l,u,p,h,g,E,m;n.d(t,{BM:()=>c,b7:()=>i,dT:()=>o}),function(e){e.WebUnknown="0",e.React="1",e.NextJs="2",e.Angular="3",e.VueJs="4",e.Nuxt="5",e.Svelte="6",e.ServerSideUnknown="100",e.ReactSSR="101",e.NextJsSSR="102",e.AngularSSR="103",e.VueJsSSR="104",e.NuxtSSR="105",e.SvelteSSR="106",e.ReactNative="201",e.Expo="202"}(o||(o={})),function(e){e.AI="ai",e.API="api",e.Auth="auth",e.Analytics="analytics",e.DataStore="datastore",e.Geo="geo",e.InAppMessaging="inappmessaging",e.Interactions="interactions",e.Predictions="predictions",e.PubSub="pubsub",e.PushNotification="pushnotification",e.Storage="storage"}(i||(i={})),function(e){e.CreateConversation="1",e.GetConversation="2",e.ListConversations="3",e.DeleteConversation="4",e.SendMessage="5",e.ListMessages="6",e.OnMessage="7",e.Generation="8",e.UpdateConversation="9"}(r||(r={})),function(e){e.Record="1",e.IdentifyUser="2"}(s||(s={})),function(e){e.GraphQl="1",e.Get="2",e.Post="3",e.Put="4",e.Patch="5",e.Del="6",e.Head="7"}(a||(a={})),function(e){e.SignUp="1",e.ConfirmSignUp="2",e.ResendSignUpCode="3",e.SignIn="4",e.FetchMFAPreference="6",e.UpdateMFAPreference="7",e.SetUpTOTP="10",e.VerifyTOTPSetup="11",e.ConfirmSignIn="12",e.DeleteUserAttributes="15",e.DeleteUser="16",e.UpdateUserAttributes="17",e.FetchUserAttributes="18",e.ConfirmUserAttribute="22",e.SignOut="26",e.UpdatePassword="27",e.ResetPassword="28",e.ConfirmResetPassword="29",e.FederatedSignIn="30",e.RememberDevice="32",e.ForgetDevice="33",e.FetchDevices="34",e.SendUserAttributeVerificationCode="35",e.SignInWithRedirect="36",e.StartWebAuthnRegistration="37",e.CompleteWebAuthnRegistration="38",e.ListWebAuthnCredentials="39",e.DeleteWebAuthnCredential="40"}(c||(c={})),function(e){e.Subscribe="1",e.GraphQl="2"}(d||(d={})),function(e){e.SearchByText="0",e.SearchByCoordinates="1",e.SearchForSuggestions="2",e.SearchByPlaceId="3",e.SaveGeofences="4",e.GetGeofence="5",e.ListGeofences="6",e.DeleteGeofences="7"}(l||(l={})),function(e){e.SyncMessages="1",e.IdentifyUser="2",e.NotifyMessageInteraction="3"}(u||(u={})),(p||(p={})).None="0",function(e){e.Convert="1",e.Identify="2",e.Interpret="3"}(h||(h={})),(g||(g={})).Subscribe="1",function(e){e.InitializePushNotifications="1",e.IdentifyUser="2"}(E||(E={})),function(e){e.UploadData="1",e.DownloadData="2",e.List="3",e.Copy="4",e.Remove="5",e.GetProperties="6",e.GetUrl="7",e.GetDataAccess="8",e.ListCallerAccessGrants="9"}(m||(m={}))},87998:(e,t,n)=>{n.d(t,{k:()=>i});let o=[];for(let e=0;e<256;++e)o.push((e+256).toString(16).slice(1));function i(e,t=0){return(o[e[t+0]]+o[e[t+1]]+o[e[t+2]]+o[e[t+3]]+"-"+o[e[t+4]]+o[e[t+5]]+"-"+o[e[t+6]]+o[e[t+7]]+"-"+o[e[t+8]]+o[e[t+9]]+"-"+o[e[t+10]]+o[e[t+11]]+o[e[t+12]]+o[e[t+13]]+o[e[t+14]]+o[e[t+15]]).toLowerCase()}},88641:(e,t,n)=>{n.d(t,{F:()=>i,Y:()=>r});var o=n(99846);let i=async e=>{if(!e||e.statusCode<300)return;let t=await r(e),n=(e=>{let[t]=e.toString().split(/[,:]+/);return t.includes("#")?t.split("#")[1]:t})(e.headers["x-amzn-errortype"]??t.code??t.__type??"UnknownError");return Object.assign(Error(t.message??t.Message??"Unknown error"),{name:n,$metadata:(0,o.j)(e)})},r=async e=>{if(!e.body)throw Error("Missing response payload");return Object.assign(await e.body.json(),{$metadata:(0,o.j)(e)})}},91216:(e,t,n)=>{n.d(t,{U9:()=>s,YZ:()=>d,f3:()=>l});var o=n(10434),i=n(95955),r=n(28498);let s="undefined"!=typeof Symbol?Symbol("amplify_default"):"@@amplify_default",a=new o.C("Hub");class c{constructor(e){this.listeners=new Map,this.protectedChannels=["core","auth","api","analytics","interactions","pubsub","storage","ui","xr"],this.name=e}_remove(e,t){let n=this.listeners.get(e);if(!n)return void a.warn(`No listeners for ${e}`);this.listeners.set(e,[...n.filter(({callback:e})=>e!==t)])}dispatch(e,t,n,o){"string"==typeof e&&this.protectedChannels.indexOf(e)>-1&&o!==s&&a.warn(`WARNING: ${e} is protected and dispatching on it can have unintended consequences`);let i={channel:e,payload:{...t},source:n,patternInfo:[]};try{this._toListeners(i)}catch(e){a.error(e)}}listen(e,t,n="noname"){if("function"!=typeof t)throw new r.x({name:i.d1,message:"No callback supplied to Hub"});let o=this.listeners.get(e);return o||(o=[],this.listeners.set(e,o)),o.push({name:n,callback:t}),()=>{this._remove(e,t)}}_toListeners(e){let{channel:t,payload:n}=e,o=this.listeners.get(t);o&&o.forEach(o=>{a.debug(`Dispatching to ${t} with `,n);try{o.callback(e)}catch(e){a.error(e)}})}}let d=new c("__default__"),l=new c("internal-hub")},92835:(e,t,n)=>{n.d(t,{T:()=>s});var o=n(88641),i=n(29592),r=n(13989);let s=()=>async e=>{if(e.statusCode>=300){let t=await (0,o.F)(e);throw(0,i.e)(t),new r.l({name:t.name,message:t.message,metadata:t.$metadata})}return(0,o.Y)(e)}},94519:(e,t,n)=>{n.d(t,{L:()=>h});var o=n(85421),i=n(76294),r=n(36602);n(26899);var s=n(98231),a=n(75738),c=n(23750),d=n(81166),l=n(77682),u=n(67589),p=n(28656);async function h({username:e,password:t,clientMetadata:n,config:h,tokenOrchestrator:g,authFlow:E,preferredChallenge:m}){let{userPoolId:f,userPoolClientId:y,userPoolEndpoint:I}=h,x=f?.split("_")[1]||"",S=await (0,r.H)(x),w={USERNAME:e,SRP_A:S.A.toString(16)};"USER_AUTH"===E&&m&&(w.PREFERRED_CHALLENGE=m);let v=(0,i.d)({username:e,userPoolId:f,userPoolClientId:y}),A=(0,s.R)({endpointResolver:(0,a.o)({endpointOverride:I})}),C=await A({region:(0,c.J)(f),userAgentValue:(0,d.A)(o.BM.SignIn)},{AuthFlow:E,AuthParameters:w,ClientMetadata:n,ClientId:y,UserContextData:v}),{ChallengeParameters:P,Session:R}=C,T=P?.USERNAME??e;return((0,p.d)(T),"PASSWORD_VERIFIER"===C.ChallengeName)?(0,u.i)(l.f,[t,P,n,R,S,h,g],T,g):C}},94684:(e,t,n)=>{n.d(t,{H:()=>a});var o=n(8426),i=n(16095),r=n(55799);let s=async e=>{var t;let n=e.getConfig().Auth?.Cognito;(0,i.$y)(n);let o=await e.Auth.getTokens({forceRefresh:!1});(0,r.H0)(o);let{"cognito:username":s,sub:a}=o.idToken?.payload??{},c={username:s,userId:a}
3,d=(t=o,t?.signInDetails);return d&&(c.signInDetails=d),c},a=async()=>s(o.H)},95186:(e,t,n)=>{n.d(t,{_:()=>o});let o=e=>(t,n)=>r(n,i(e),JSON.stringify(t)),i=e=>({"content-type":"application/x-amz-json-1.1","x-amz-target":`AWSCognitoIdentityProviderService.${e}`}),r=({url:e},t,n)=>({headers:t,url:e,body:n,method:"POST"})},95955:(e,t,n)=>{n.d(t,{OU:()=>o,YJ:()=>i,d1:()=>r});let o="Logging",i="x-amz-user-agent",r="NoHubcallbackProvidedException"},97026:(e,t,n)=>{n.d(t,{D:()=>r});var o=n(54645);let i=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch","BadRequestException"],r=e=>async(t,n)=>{let o=n??await e(t)??void 0,r=o?.code||o?.name,s=t?.statusCode;return{retryable:d(n)||c(s,r)||(e=>!!e&&i.includes(e))(r)||l(s,r)}},s=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException"],a=["TimeoutError","RequestTimeout","RequestTimeoutException"],c=(e,t)=>429===e||!!t&&s.includes(t),d=e=>[o.m.NetworkError,"ERR_NETWORK"].includes(e?.name),l=(e,t)=>!!e&&[500,502,503,504].includes(e)||!!t&&a.includes(t)},97307:(e,t,n)=>{n.d(t,{i:()=>s});var o=n(16095),i=n(28498),r=n(63471);async function s(e){if(e.AccessToken){let t,n,i,s=(0,o.Cq)(e.AccessToken),a=1e3*(s.payload.iat||0),c=new Date().getTime();e.RefreshToken&&(n=e.RefreshToken),e.IdToken&&(t=(0,o.Cq)(e.IdToken)),e?.NewDeviceMetadata&&(i=e.NewDeviceMetadata);let d={accessToken:s,idToken:t,refreshToken:n,clockDrift:a>0?a-c:0,deviceMetadata:i,username:e.username};e?.signInDetails&&(d.signInDetails=e.signInDetails),await r.o.setTokens({tokens:d})}else throw new i.x({message:"Invalid tokens",name:"InvalidTokens",recoverySuggestion:"Check Cognito UserPool settings"})}},98231:(e,t,n)=>{n.d(t,{R:()=>c});var o=n(14924),i=n(95186),r=n(92835),s=n(27429),a=n(3422);let c=e=>(0,o.A)(s.e,(0,i._)("InitiateAuth"),(0,r.T)(),{...a.C,...e})},98462:(e,t,n)=>{n.d(t,{G:()=>o});let o=n(58820).A},99607:(e,t,n)=>{n.d(t,{O:()=>p});var o=n(9345),i=n(75738),r=n(23750),s=n(55799),a=n(36602),c=n(17685),d=n(37427),l=n(58711),u=n(76294);async function p({username:e,config:t,clientMetadata:n,session:c,tokenOrchestrator:d}){let{userPoolId:l,userPoolEndpoint:u}=t,p=t.userPoolClientId,g=await d?.getDeviceMetadata(e);(0,s.O_)(g);let E=await (0,a.H)(g.deviceGroupKey),m={USERNAME:e,SRP_A:E.A.toString(16),DEVICE_KEY:g.deviceKey},f=(0,o.H)({endpointResolver:(0,i.o)({endpointOverride:u})}),{ChallengeParameters:y,Session:I}=await f({region:(0,r.J)(l)},{ChallengeName:"DEVICE_SRP_AUTH",ClientId:p,ChallengeResponses:m,ClientMetadata:n,Session:c});return h(e,y,n,I,E,t,d)}async function h(e,t,n,a,p,{userPoolId:h,userPoolClientId:g,userPoolEndpoint:E},m){let f=await m?.getDeviceMetadata(e);(0,s.O_)(f);let y=new l.A(t?.SRP_B,16),I=new l.A(t?.SALT,16),{deviceKey:x}=f,{deviceGroupKey:S}=f,w=await p.getPasswordAuthenticationKey({username:f.deviceKey,password:f.randomPassword,serverBValue:y,salt:I}),v=(0,c.q)(),A={USERNAME:t?.USERNAME??e,PASSWORD_CLAIM_SECRET_BLOCK:t?.SECRET_BLOCK,TIMESTAMP:v,PASSWORD_CLAIM_SIGNATURE:(0,d.I)({username:x,userPoolName:S,challengeParameters:t,dateNow:v,hkdf:w}),DEVICE_KEY:x},C=(0,u.d)({username:e,userPoolId:h,userPoolClientId:g});return(0,o.H)({endpointResolver:(0,i.o)({endpointOverride:E})})({region:(0,r.J)(h)},{ChallengeName:"DEVICE_PASSWORD_VERIFIER",ClientId:g,ChallengeResponses:A,Session:a,ClientMetadata:n,UserContextData:C})}},99846:(e,t,n)=>{n.d(t,{j:()=>o});let o=e=>{let{headers:t,statusCode:n}=e;return{...i(e)?e.$metadata:{},httpStatusCode:n,requestId:t["x-amzn-requestid"]??t["x-amzn-request-id"]??t["x-amz-request-id"],extendedRequestId:t["x-amz-id-2"],cfId:t["x-amz-cf-id"]}},i=e=>"object"==typeof e?.$metadata}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.