1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="4e0fb2ec-fc4c-5dad-b661-40e090ab9054")}catch(e){}}(); 3(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[79480],{6682:(t,r,o)=>{"use strict";o.d(r,{J:()=>y});var n=o(60840),i=o(94570),s=o(16428),a=o(26286),l=o(43452),c=o(97636),u=o(29469),d=o(25807),p=o(93384),f=o(42434);async function E(t){let r=i.H.getConfig().Auth?.Cognito;(0,s.$y)(r);let{username:o,password:E,options:m}=t,h={loginId:o,authFlowType:"CUSTOM_WITHOUT_SRP"},x=m?.clientMetadata;(0,l.M)(!!o,a.P.EmptySignInUsername),(0,l.M)(!E,a.P.CustomAuthSignInPassword);try{let{ChallengeName:t,ChallengeParameters:i,AuthenticationResult:s,Session:a}=await (0,n.iI)(n.ty,[o,x,r,p.o],o,p.o),l=(0,n.ni)(o);if((0,u.wr)({signInSession:a,username:l,challengeName:t,signInDetails:h}),s)return(0,u.ZV)(),await (0,d.i)({username:l,...s,NewDeviceMetadata:await (0,n.Uh)(r.userPoolId,s.NewDeviceMetadata,s.AccessToken),signInDetails:h}),await (0,f.Q)(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}};return(0,n.q2)({challengeName:t,challengeParameters:i})}catch(r){(0,u.ZV)(),(0,c.e)(r);let t=(0,n.m$)(r.name);if(t)return t;throw r}}async function m(t){let{username:r,password:o,options:E}=t,m={loginId:r,authFlowType:"CUSTOM_WITH_SRP"},h=i.H.getConfig().Auth?.Cognito;(0,s.$y)(h);let x=E?.clientMetadata;(0,l.M)(!!r,a.P.EmptySignInUsername),(0,l.M)(!!o,a.P.EmptySignInPassword);try{let{ChallengeName:t,ChallengeParameters:i,AuthenticationResult:s,Session:a}=await (0,n.tE)(r,o,x,h,p.o),l=(0,n.ni)(r);if((0,u.wr)({signInSession:a,username:l,challengeName:t,signInDetails:m}),s)return await (0,d.i)({username:l,...s,NewDeviceMetadata:await (0,n.Uh)(h.userPoolId,s.NewDeviceMetadata,s.AccessToken),signInDetails:m}),(0,u.ZV)(),await (0,f.Q)(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}};return(0,n.q2)({challengeName:t,challengeParameters:i})}catch(r){(0,u.ZV)(),(0,c.e)(r);let t=(0,n.m$)(r.name);if(t)return t;throw r}}async function h(t){let{username:r,password:o}=t,E=i.H.getConfig().Auth?.Cognito,m={loginId:r,authFlowType:"USER_SRP_AUTH"};(0,s.$y)(E);let h=t.options?.clientMetadata;(0,l.M)(!!r,a.P.EmptySignInUsername),(0,l.M)(!!o,a.P.EmptySignInPassword);try{let{ChallengeName:t,ChallengeParameters:i,AuthenticationResult:s,Session:a}=await (0,n.Zw)(r,o,h,E,p.o),l=(0,n.ni)(r);if((0,u.wr)({signInSession:a,username:l,challengeName:t,signInDetails:m}),s)return(0,u.ZV)(),await (0,d.i)({username:l,...s,NewDeviceMetadata:await (0,n.Uh)(E.userPoolId,s.NewDeviceMetadata,s.AccessToken),signInDetails:m}),await (0,f.Q)(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}};return(0,n.q2)({challengeName:t,challengeParameters:i})}catch(r){(0,u.ZV)(),(0,c.e)(r);let t=(0,n.m$)(r.name);if(t)return t;throw r}}async function x(t){let{username:r,password:o,options:E}=t,m=i.H.getConfig().Auth?.Cognito,h={loginId:r,authFlowType:"USER_PASSWORD_AUTH"};(0,s.$y)(m);let x=E?.clientMetadata;(0,l.M)(!!r,a.P.EmptySignInUsername),(0,l.M)(!!o,a.P.EmptySignInPassword);try{let{ChallengeName:t,ChallengeParameters:i,AuthenticationResult:s,Session:a}=await (0,n.iI)(n.h5,[r,o,x,m,p.o],r,p.o),l=(0,n.ni)(r);if((0,u.wr)({signInSession:a,username:l,challengeName:t,signInDetails:h}),s)return await (0,d.i)({...s,username:l,NewDeviceMetadata:await (0,n.Uh)(m.userPoolId,s.NewDeviceMetadata,s.AccessToken),signInDetails:h}),(0,u.ZV)(),await (0,f.Q)(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}};return(0,n.q2)({challengeName:t,challengeParameters:i})}catch(r){(0,u.ZV)(),(0,c.e)(r);let t=(0,n.m$)(r.name);if(t)return t;throw r}}async function y(t){let r=t.options?.authFlowType;switch(await (0,n.AR)(),r){case"USER_SRP_AUTH":default:return h(t);case"USER_PASSWORD_AUTH":return x(t);case"CUSTOM_WITHOUT_SRP":return E(t);case"CUSTOM_WITH_SRP":return m(t)}}},7908:function(t,r,o){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var r,o=1,n=arguments.length;o<n;o++)for(var i in r=arguments[o])Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i]);return t}).apply(this,arguments)},i=this&&this.__rest||function(t,r){var o={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&0>r.indexOf(n)&&(o[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)0>r.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(o[n[i]]=t[n[i]]);return o};
3Object.defineProperty(r,"__esModule",{value:!0}),r.checkCookies=r.hasCookie=r.removeCookies=r.deleteCookie=r.setCookies=r.setCookie=r.getCookie=r.getCookies=void 0;var s=o(70961),a=function(){return"undefined"!=typeof window},l=function(t){void 0===t&&(t="");try{var r=JSON.stringify(t);return/^[\{\[]/.test(r)?r:t}catch(r){return t}};r.getCookies=function(t){if(t&&(r=t.req),!a())return r&&r.cookies?r.cookies:r&&r.headers&&r.headers.cookie?(0,s.parse)(r.headers.cookie):{};for(var r,o={},n=document.cookie?document.cookie.split("; "):[],i=0,l=n.length;i<l;i++){var c=n[i].split("="),u=c.slice(1).join("=");o[c[0]]=u}return o},r.getCookie=function(t,o){var n,i=(0,r.getCookies)(o)[t];if(void 0!==i){return"true"===(n=i?i.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent):i)||"false"!==n&&("undefined"!==n?"null"===n?null:n:void 0)}},r.setCookie=function(t,r,o){if(o){var c,u,d,p=o.req,f=o.res,E=i(o,["req","res"]);u=p,d=f,c=E}var m=(0,s.serialize)(t,l(r),n({path:"/"},c));if(a())document.cookie=m;else if(d&&u){var h=d.getHeader("Set-Cookie");if(Array.isArray(h)||(h=h?[String(h)]:[]),d.setHeader("Set-Cookie",h.concat(m)),u&&u.cookies){var x=u.cookies;""===r?delete x[t]:x[t]=l(r)}if(u&&u.headers&&u.headers.cookie){var x=(0,s.parse)(u.headers.cookie);""===r?delete x[t]:x[t]=l(r),u.headers.cookie=Object.entries(x).reduce(function(t,r){return t.concat("".concat(r[0],"=").concat(r[1],";"))},"")}}},r.setCookies=function(t,o,n){return console.warn("[WARN]: setCookies was deprecated. It will be deleted in the new version. Use setCookie instead."),(0,r.setCookie)(t,o,n)},r.deleteCookie=function(t,o){return(0,r.setCookie)(t,"",n(n({},o),{maxAge:-1}))},r.removeCookies=function(t,o){return console.warn("[WARN]: removeCookies was deprecated. It will be deleted in the new version. Use deleteCookie instead."),(0,r.deleteCookie)(t,o)},r.hasCookie=function(t,o){return!!t&&(0,r.getCookies)(o).hasOwnProperty(t)},r.checkCookies=function(t,o){return console.warn("[WARN]: checkCookies was deprecated. It will be deleted in the new version. Use hasCookie instead."),(0,r.hasCookie)(t,o)}},8366:()=>{},13646:(t,r,o)=>{"use strict";o.d(r,{H:()=>C});var n=o(94570),i=o(16428),s=o(32923),a=o(84099),l=o(43452),c=o(26286),u=o(84175),d=o(45297),p=o(13466),f=o(6682),E=o(22401),m=o(7010);function h(t,r){let o;return n=>{o||t(...n),clearTimeout(o),o=setTimeout(()=>{o=void 0},r)}}let x=h(function(t,r,o){let n=Date.now(),i=setInterval(async()=>{if(Date.now()-n>18e4)clearInterval(i),g=!1,o(new E.l({name:m.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."}));else try{let o=await (0,f.J)(t);"CONFIRM_SIGN_UP"!==o.nextStep.signInStep&&(r(o),clearInterval(i),g=!1)}catch(t){clearInterval(i),g=!1,o(t)}},5e3)},300),y=h(S,300),g=!1;function v(t){return!!t.UserConfirmed}async function S(t,r,o){try{let o=await (0,f.J)(t);r(o)}catch(t){o(t)}}function A(t){return async()=>new Promise((r,o)=>{y([t,r,o])})}var w=o(44850);async function C(t){let{username:r,password:o,options:f}=t,E=n.H.getConfig().Auth?.Cognito,m=E?.signUpVerificationMethod??"code",{clientMetadata:h,validationData:y,autoSignIn:S}=t.options??{};(0,i.$y)(E),(0,l.M)(!!r,c.P.EmptySignUpUsername),(0,l.M)(!!o,c.P.EmptySignUpPassword);let C="boolean"!=typeof S?S:void 0,I={username:r,options:C};C?.authFlowType!=="CUSTOM_WITHOUT_SRP"&&(I.password=o),(C||!0===S)&&(g=!0);let R=await (0,a.Hh)({region:(0,u.J)(E.userPoolId),userAgentValue:(0,w.A)(s.BM.SignUp)},{Username:r,Password:o,UserAttributes:f?.userAttributes&&(0,d.Q)(f?.userAttributes),ClientMetadata:h,ValidationData:y&&(0,d.Q)(y),ClientId:E.userPoolClientId}),{UserSub:b,CodeDeliveryDetails:F}=R;if(v(R)&&g)return A(I),{isSignUpComplete:!0,nextStep:{signUpStep:"COMPLETE_AUTO_SIGN_IN"},userId:b};if(v(R)&&!g)return{isSignUpComplete:!0,nextStep:{signUpStep:"DONE"},userId:b};if(!v(R)&&g&&"code"===m){let t=p.f3.listen("auth-internal",async({payload:r})=>{if("confirmSignUp"===r.event){let o=r.data;o?.isSignUpComplete&&(p.f3.dispatch("auth-internal",{event:"autoSignIn"}),A(I),t())}}),r=setTimeout(()=>{t(),g=!1,clearTimeout(r)},18e4)}else if(!v(R)&&g&&"link"===m)return async()=>new Promise((t,r)=>{x([I,t,r])}),{isSignUpComplete:!1,nextStep:{signUpStep:"COMPLETE_AUTO_SIGN_IN",codeDeliveryDetails:{deliveryMedium:F?.DeliveryMedium,destination:F?.Destination,attributeName:F?.AttributeName}},userId:b};return{isSignUpComplete:!1,nextStep:{signUpStep:"CONFIRM_SIGN_UP",codeDeliveryDetails:{deliveryMedium:F?.DeliveryMedium,destination:F?.Destination,attributeName:F?.AttributeName}},userId:b}}},20198:(t,r,o)=>{"use strict";o.d(r,{$:()=>B});var n,i=o(94570),s=o(16428),a=o(82488),l=o(32923),c=o(85055),u=o(44850),d=o(99990),p=o(81876),f=o(67281),E=o(13466),m=o(25807),h=o(42434),x=o(69897),y=o(96097);new x.C("AuthError");let g={oauthSignInError:{message:y.fs.OAUTH_ERROR,log:"Make sure Cognito Hosted UI has been configured correctly"},noConfig:{message:y.fs.DEFAULT_MSG,log:` 4 Error: Amplify has not been configured correctly. 5 This error is typically caused by one of the following scenarios: 6 7 1. Make sure you're passing the awsconfig object to Amplify.configure() in your app's entry point 8 See https://aws-amplify.github.io/docs/js/authentication#configure-your-app for more information 9 10 2. There might be multiple conflicting versions of amplify packages in your node_modules. 11 Refer to our docs site for help upgrading Amplify packages (https://docs.amplify.aws/lib/troubleshooting/upgrading/q/platform/js) 12 `},missingAuthConfig:{message:y.fs.DEFAULT_MSG,log:` 13 Error: Amplify has not been configured correctly. 14 The configuration object is missing required auth properties. 15 This error is typically caused by one of the following scenarios: 16 17 1. Did you run \`amplify push\` after adding auth via \`amplify add auth\`? 18 See https://aws-amplify.github.io/docs/js/authentication#amplify-project-setup for more information 19 20 2. This could also be caused by multiple conflicting versions of amplify packages, see (https://docs.amplify.aws/lib/troubleshooting/upgrading/q/platform/js) for help upgrading Amplify packages. 21 `},emptyUsername:{message:y.fs.EMPTY_USERNAME},invalidUsername:{message:y.fs.INVALID_USERNAME},emptyPassword:{message:y.fs.EMPTY_PASSWORD},emptyCode:{message:y.fs.EMPTY_CODE},signUpError:{message:y.fs.SIGN_UP_ERROR,log:"The first parameter should either be non-null string or object"}
21,noMFA:{message:y.fs.NO_MFA},invalidMFA:{message:y.fs.INVALID_MFA},emptyChallengeResponse:{message:y.fs.EMPTY_CHALLENGE},noUserSession:{message:y.fs.NO_USER_SESSION},deviceConfig:{message:y.fs.DEVICE_CONFIG},networkError:{message:y.fs.NETWORK_ERROR},autoSignInError:{message:y.fs.AUTOSIGNIN_ERROR},default:{message:y.fs.DEFAULT_MSG}};var v=o(22401);let S=(t,r)=>new v.l({message:t??"An error has occurred during the oauth process.",name:y.nC.OAuthSignInError,recoverySuggestion:r??g.oauthSignInError.log});var A=o(67882);!function(t){t.NoConfig="noConfig",t.MissingAuthConfig="missingAuthConfig",t.EmptyUsername="emptyUsername",t.InvalidUsername="invalidUsername",t.EmptyPassword="emptyPassword",t.EmptyCode="emptyCode",t.SignUpError="signUpError",t.NoMFA="noMFA",t.InvalidMFA="invalidMFA",t.EmptyChallengeResponse="emptyChallengeResponse",t.NoUserSession="noUserSession",t.Default="default",t.DeviceConfig="deviceConfig",t.NetworkError="networkError",t.AutoSignInError="autoSignInError",t.OAuthSignInError="oauthSignInError"}(n||(n={}));let w=async t=>{let r=await d.f.loadOAuthState(),o=t===r?r:void 0;if(!o)throw new v.l({name:n.OAuthSignInError,message:null===t?"`signInWithRedirect` has been canceled.":"An error occurred while validating the state.",recoverySuggestion:null===t?void 0:"Try to initiate an OAuth flow from Amplify"});return o},C=async({currentUrl:t,userAgentValue:r,clientId:o,redirectUri:n,responseType:i,domain:s,preferPrivateSession:a})=>{let l=new p.o(t),c=l.searchParams.get("error"),u=l.searchParams.get("error_description");if(c)throw S(u??c);return"code"===i?I({currentUrl:t,userAgentValue:r,clientId:o,redirectUri:n,domain:s,preferPrivateSession:a}):R({currentUrl:t,redirectUri:n,preferPrivateSession:a})},I=async({currentUrl:t,userAgentValue:r,clientId:o,redirectUri:n,domain:i,preferPrivateSession:a})=>{let l=new p.o(t),c=l.searchParams.get("code"),u=l.searchParams.get("state");if(!c||!u)throw S("User cancelled OAuth flow.");let E=await w(u),h=await d.f.loadPKCE(),x=Object.entries({grant_type:"authorization_code",code:c,client_id:o,redirect_uri:n,...h?{code_verifier:h}:{}}).map(([t,r])=>`${encodeURIComponent(t)}=${encodeURIComponent(r)}`).join("&"),{access_token:y,refresh_token:g,id_token:v,error:A,error_message:C,token_type:I,expires_in:R}=await (await fetch("https://"+i+"/oauth2/token",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",[f.YJ]:r},body:x})).json();if(A)throw S(C??A);let F=(y&&(0,s.Cq)(y).payload.username)??"username";return await (0,m.i)({username:F,AccessToken:y,IdToken:v,RefreshToken:g,TokenType:I,ExpiresIn:R}),b({redirectUri:n,state:E,preferPrivateSession:a})},R=async({currentUrl:t,redirectUri:r,preferPrivateSession:o})=>{let{id_token:n,access_token:i,state:a,token_type:l,expires_in:c,error_description:u,error:d}=(new p.o(t).hash??"#").substring(1).split("&").map(t=>t.split("=")).reduce((t,[r,o])=>({...t,[r]:o}),{id_token:void 0,access_token:void 0,state:void 0,token_type:void 0,expires_in:void 0,error_description:void 0,error:void 0});if(d)throw S(u??d);if(!i)throw S("No access token returned from OAuth flow.");let f=await w(a),E=(i&&(0,s.Cq)(i).payload.username)??"username";return await (0,m.i)({username:E,AccessToken:i,IdToken:n,TokenType:l,ExpiresIn:c}),b({redirectUri:r,state:f,preferPrivateSession:o})},b=async({redirectUri:t,state:r,preferPrivateSession:o})=>{await d.f.clearOAuthData(),await d.f.storeOAuthSignIn(!0,o),(0,A.i)(),F(r)&&E.YZ.dispatch("auth",{event:"customOAuthState",data:(_(r).match(/.{2}/g)||[]).map(t=>String.fromCharCode(parseInt(t,16))).join("")},"Auth",E.U9),E.YZ.dispatch("auth",{event:"signInWithRedirect"},"Auth",E.U9),await (0,h.Q)(),P(t)},F=t=>/-/.test(t),_=t=>t.split("-").splice(1).join("-"),P=t=>{"undefined"!=typeof window&&void 0!==window.history&&window.history.replaceState(window.history.state,"",t)};var N=o(61329);let T=async t=>{(0,A.i)(),await d.f.clearOAuthInflightData(),E.YZ.dispatch("auth",{event:"signInWithRedirect_failure",data:{error:t}},"Auth",E.U9)},U=async t=>{try{(0,s.$y)(t),(0,s.G6)(t),d.f.setAuthConfig(t)}catch(t){return}if(await d.f.loadOAuthInFlight())try{let r=window.location.href,{loginWith:o,userPoolClientId:n}=t,{domain:i,redirectSignIn:s,responseType:a}=o.oauth,c=(0,N.M)(s);await C({currentUrl:r,clientId:n,domain:i,redirectUri:c,responseType:a,userAgentValue:(0,u.A)(l.BM.SignInWithRedirect)})}catch(t){await T(t)}};(0,a.B)()&&i.H[c.$](U);let D={Google:"Google",Facebook:"Facebook",Amazon:"LoginWithAmazon",Apple:"Sign
21InWithApple"};var M=o(30185),O=o(60840),V=o(55484),k=o(34037),L=o(85350);let q="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";async function B(t){let r=i.H.getConfig().Auth?.Cognito;(0,s.$y)(r),(0,s.G6)(r),d.f.setAuthConfig(r),await (0,O.AR)();let o="COGNITO";return"string"==typeof t?.provider?o=D[t.provider]:t?.provider?.custom&&(o=t.provider.custom),j({oauthConfig:r.loginWith.oauth,clientId:r.userPoolClientId,provider:o,customState:t?.customState,preferPrivateSession:t?.options?.preferPrivateSession})}let j=async({oauthConfig:t,provider:r,clientId:o,customState:n,preferPrivateSession:i})=>{let{domain:s,redirectSignIn:c,responseType:p,scopes:f}=t,E=(t=>{let r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",o="";for(let n=0;n<t;n++)o+=r.charAt(Math.floor(Math.random()*r.length));return o})(32),m=n?`${E}-${n.split("").map(t=>t.charCodeAt(0).toString(16).padStart(2,"0")).join("")}`:E,{value:h,method:x,toCodeChallenge:y}=(t=>{let r,o=new Uint8Array(t);(0,k.MY)().getRandomValues(o);let n="";for(let t of o)n+=q.charAt(t%q.length);return{value:n,method:"S256",toCodeChallenge:()=>r||(r=function(t){let r=new V.I;return r.update(t),L.Y.convert(r.digestSync(),{urlSafe:!0}).replace(/=/g,"")}(n))}})(128),g=(0,N.M)(t.redirectSignIn);(0,a.B)()&&d.f.storeOAuthInFlight(!0),d.f.storeOAuthState(m),d.f.storePKCE(h);let v=Object.entries({redirect_uri:g,response_type:p,client_id:o,identity_provider:r,scope:f.join(" "),state:m,..."code"===p&&{code_challenge:y(),code_challenge_method:x}}).map(([t,r])=>`${encodeURIComponent(t)}=${encodeURIComponent(r)}`).join("&"),A=`https://${s}/oauth2/authorize?${v}`;(t=>{async function r(o){if(o.persisted&&await t.loadOAuthInFlight()){let t=S("User cancelled OAuth flow.");await T(t)}window.removeEventListener("pageshow",r)}window.addEventListener("pageshow",r)})(d.f);let{type:w,error:I,url:R}=await (0,M.z)(A)??{};try{if("error"===w)throw S(String(I));"success"===w&&R&&await C({currentUrl:R,clientId:o,domain:s,redirectUri:g,responseType:p,userAgentValue:(0,u.A)(l.BM.SignInWithRedirect),preferPrivateSession:i})}catch(t){throw await T(t),t}}},22245:(t,r,o)=>{var n=o(27863),i=o(77254);r.yupResolver=function(t,r,o){return void 0===r&&(r={}),void 0===o&&(o={}),function(s,a,l){try{return Promise.resolve(function(i,c){try{var u=(r.context,Promise.resolve(t["sync"===o.mode?"validateSync":"validate"](s,Object.assign({abortEarly:!1},r,{context:a}))).then(function(t){return l.shouldUseNativeValidation&&n.validateFieldsNatively({},l),{values:o.raw?s:t,errors:{}}}))}catch(t){return c(t)}return u&&u.then?u.then(void 0,c):u}(0,function(t){var r;if(!t.inner)throw t;return{values:{},errors:n.toNestErrors((r=!l.shouldUseNativeValidation&&"all"===l.criteriaMode,(t.inner||[]).reduce(function(t,o){if(t[o.path]||(t[o.path]={message:o.message,type:o.type}),r){var n=t[o.path].types,s=n&&n[o.type];t[o.path]=i.appendErrors(o.path,r,t,o.type,s?[].concat(s,o.message):o.message)}return t},{})),l)}}))}catch(t){return Promise.reject(t)}}}},25807:(t,r,o)=>{"use strict";o.d(r,{i:()=>a});var n=o(16428),i=o(97492),s=o(93384);async function a(t){if(t.AccessToken){let r,o,i,a=(0,n.Cq)(t.AccessToken),l=1e3*(a.payload.iat||0),c=new Date().getTime();t.RefreshToken&&(o=t.RefreshToken),t.IdToken&&(r=(0,n.Cq)(t.IdToken)),t?.NewDeviceMetadata&&(i=t.NewDeviceMetadata);let u={accessToken:a,idToken:r,refreshToken:o,clockDrift:l>0?l-c:0,deviceMetadata:i,username:t.username};t?.signInDetails&&(u.signInDetails=t.signInDetails),await s.o.setTokens({tokens:u})}else throw new i.x({message:"Invalid tokens",name:"InvalidTokens",recoverySuggestion:"Check Cognito UserPool settings"})}},26286:(t,r,o)=>{"use strict";var n;o.d(r,{P:()=>n}),function(t){t.EmptySignInUsername="EmptySignInUsername",t.EmptySignInPassword="EmptySignInPassword",t.CustomAuthSignInPassword="CustomAuthSignInPassword",t.EmptySignUpUsername="EmptySignUpUsername",t.EmptySignUpPassword="EmptySignUpPassword",t.EmptyConfirmSignUpUsername="EmptyConfirmSignUpUsername",t.EmptyConfirmSignUpCode="EmptyConfirmSignUpCode",t.EmptyResendSignUpCodeUsername="EmptyresendSignUpCodeUsername",t.EmptyChallengeResponse="EmptyChallengeResponse",t.EmptyConfirmResetPasswordUsername="EmptyConfirmResetPasswordUsername",t.EmptyConfirmResetPasswordNewPassword="EmptyConfirmResetPasswordNewPassword",t.EmptyConfirmResetPasswordConfirmationCode="EmptyConfirmResetPasswordConfirmationCode",t.EmptyResetPasswordUsername="EmptyResetPasswordUsername",t.EmptyVerifyTOTPSetupCode="EmptyVerifyTOTPSetupCode",t.EmptyConfirmUserAttributeCode="EmptyConfirmUserAttributeCode",t.IncorrectMFAMethod="IncorrectMFAMethod",t.EmptyUpdatePassword="EmptyUpdatePassword"}(n||(n={}))},27863:(t,r,o)=>{var n=o(77254),i=function(t,r,o){if(t&&"reportValidity"in t){var i=n.get(o,r);t.setCustomValidity(i&&i.message||""),t.reportValidity()}},s=function(t,r){var o=function(o){var n=r.fields[o];n&&n.ref&&"reportValidity"in n.ref?i(n.ref,o,t):n.refs&&n.refs.forEac
21h(function(r){return i(r,o,t)})};for(var n in r.fields)o(n)},a=function(t,r){return t.some(function(t){return t.startsWith(r+".")})};r.toNestErrors=function(t,r){r.shouldUseNativeValidation&&s(t,r);var o={};for(var i in t){var l=n.get(r.fields,i),c=Object.assign(t[i]||{},{ref:l&&l.ref});if(a(r.names||Object.keys(t),i)){var u=Object.assign({},n.get(o,i));n.set(u,"root",c),n.set(o,i,u)}else n.set(o,i,c)}return o},r.validateFieldsNatively=s},29469:(t,r,o)=>{"use strict";function n(){return{username:void 0,challengeName:void 0,signInSession:void 0}}o.d(r,{ZV:()=>a,c$:()=>i,wr:()=>s});let i=(t=>{let r=t(n(),{type:"SET_INITIAL_STATE"});return{getState:()=>r,dispatch:o=>{r=t(r,o)}}})((t,r)=>{switch(r.type){case"SET_SIGN_IN_SESSION":return{...t,signInSession:r.value};case"SET_SIGN_IN_STATE":return{...r.value};case"SET_CHALLENGE_NAME":return{...t,challengeName:r.value};case"SET_USERNAME":return{...t,username:r.value};case"SET_INITIAL_STATE":return n();default:return t}});function s(t){i.dispatch({type:"SET_SIGN_IN_STATE",value:t})}function a(){i.dispatch({type:"SET_INITIAL_STATE"})}},30185:(t,r,o)=>{"use strict";o.d(r,{z:()=>n});let n=async t=>{window?.location&&(window.location.href=t.replace("http://","https://"))}},42434:(t,r,o)=>{"use strict";o.d(r,{Q:()=>l});var n=o(13466),i=o(89114),s=o(7010),a=o(22401);let l=async()=>{try{n.YZ.dispatch("auth",{event:"signedIn",data:await (0,i.H)()},"Auth",n.U9)}catch(t){if(t.name===s.zz)throw new a.l({name:s.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 t}}},43452:(t,r,o)=>{"use strict";o.d(r,{M:()=>s});var n=o(96097),i=o(22401);function s(t,r){let{message:o,recoverySuggestion:s}=n.ut[r];if(!t)throw new i.l({name:r,message:o,recoverySuggestion:s})}},52084:(t,r,o)=>{"use strict";o.d(r,{x:()=>f});var n=o(94570),i=o(16428),s=o(32923),a=o(26286),l=o(43452),c=o(84099),u=o(84175),d=o(44850),p=o(21061);async function f(t){let{username:r}=t;(0,l.M)(!!r,a.P.EmptyResetPasswordUsername);let o=n.H.getConfig().Auth?.Cognito;(0,i.$y)(o);let{userPoolClientId:f,userPoolId:E}=o,m=t.options?.clientMetadata,h=(0,p.d)({username:r,userPoolId:E,userPoolClientId:f}),x=(await (0,c.BD)({region:(0,u.J)(o.userPoolId),userAgentValue:(0,d.A)(s.BM.ResetPassword)},{Username:r,ClientMetadata:m,ClientId:o.userPoolClientId,UserContextData:h})).CodeDeliveryDetails;return{isPasswordReset:!1,nextStep:{resetPasswordStep:"CONFIRM_RESET_PASSWORD_WITH_CODE",codeDeliveryDetails:{deliveryMedium:x?.DeliveryMedium,destination:x?.Destination,attributeName:x?.AttributeName}}}}},60840:(t,r,o)=>{"use strict";let n,i,s;o.d(r,{AR:()=>eV,ni:()=>eB,Uh:()=>ek,q2:()=>eT,m$:()=>eU,ty:()=>eb,tE:()=>eF,h5:()=>eI,Zw:()=>eR,iI:()=>eL});var a,l,c,u,d,p,f,E,m,h,x,y,g,v,S,A,w,C,I,R,b,F,_,P,N=o(94570),T=o(32923),U=o(16428),D=o(81876),M=o(85350),O=o(22401);!function(t){t.ConcurrentModificationException="ConcurrentModificationException",t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidParameterException="InvalidParameterException",t.NotAuthorizedException="NotAuthorizedException",t.ResourceNotFoundException="ResourceNotFoundException",t.SoftwareTokenMFANotFoundException="SoftwareTokenMFANotFoundException"}(a||(a={})),function(t){t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidParameterException="InvalidParameterException",t.InvalidPasswordException="InvalidPasswordException",t.LimitExceededException="LimitExceededException",t.NotAuthorizedException="NotAuthorizedException",t.PasswordResetRequiredException="PasswordResetRequiredException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyRequestsException="TooManyRequestsException",t.UserNotConfirmedException="UserNotConfirmedException",t.UserNotFoundException="UserNotFoundException"}(l||(l={})),function(t){t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidLambdaResponseException="InvalidLambdaResponseException",t.InvalidParameterException="InvalidParameterException",t.InvalidPasswordException="InvalidPasswordException",t.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",t.NotAuthorizedException="NotAuthorizedException",t.PasswordResetRequiredException="PasswordResetRequiredException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyRequestsException="TooManyRequestsException",t.UsernameExistsException="UsernameExistsException",t.UserNotConfirmedException="UserNotConfirmedException",t.UserNotFoundException="UserNotFoundException"}(c||(c={})),function(t){t.CodeMismatchException="CodeMismatchException",t.ExpiredCodeException="ExpiredCodeException",t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidLambdaResponseException="InvalidLambdaResponseException",t.InvalidParameterException="InvalidParameterException",t.InvalidPasswordException="InvalidPasswordException",t.LimitExceededException="LimitExceededException",t.NotAuthorizedException="NotAuthorizedException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyFailedAttemptsException="TooManyFailedAttemptsException",t.TooManyRequestsException="TooManyRequestsException",t.UnexpectedLambdaException="UnexpectedLambdaException",t.UserLambdaValidationException="UserLambdaValidationException",t.UserNotConfirmedException="UserNotConfirmedException",t.UserNotFoundException="UserNotFoundException"}(u||(u={})),function(t){t.AliasExistsException="AliasExistsException",t.CodeMismatchException="CodeMismatchException",t.ExpiredCodeException="ExpiredCodeException",t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidLambdaResponseException="InvalidLambdaResponseException",t.InvalidParameterException="InvalidParameterException",t.LimitExceededException="LimitExceededException",t.NotAuthorizedException="NotAuthorizedException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyFailedAttemptsException="TooManyFailedAttemptsException",t.TooManyRequestsException="TooManyRequestsException",t.UnexpectedLambdaException="UnexpectedLambdaException",t.UserLambdaValidationException="UserLambdaValidationException",t.UserNotFoundException="UserNotFoundException"}(d||(d={})),function(t){t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidParameterException="InvalidParameterException",t.NotAuthorizedException="NotAuthorizedException",t.PasswordResetRequiredException="PasswordResetRequiredException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyRequestsException="TooManyRequestsException",t.UserNotConfirmedException="UserNotConfirmedException",t.UserNotFoundException="UserNotFoundException"}
21(p||(p={})),function(t){t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidParameterException="InvalidParameterException",t.NotAuthorizedException="NotAuthorizedException",t.PasswordResetRequiredException="PasswordResetRequiredException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyRequestsException="TooManyRequestsException",t.UserNotConfirmedException="UserNotConfirmedException",t.UserNotFoundException="UserNotFoundException"}(f||(f={})),function(t){t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidParameterException="InvalidParameterException",t.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",t.NotAuthorizedException="NotAuthorizedException",t.PasswordResetRequiredException="PasswordResetRequiredException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyRequestsException="TooManyRequestsException",t.UserNotConfirmedException="UserNotConfirmedException",t.UserNotFoundException="UserNotFoundException"}(E||(E={})),function(t){t.CodeDeliveryFailureException="CodeDeliveryFailureException",t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidEmailRoleAccessPolicyException="InvalidEmailRoleAccessPolicyException",t.InvalidLambdaResponseException="InvalidLambdaResponseException",t.InvalidParameterException="InvalidParameterException",t.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",t.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",t.LimitExceededException="LimitExceededException",t.NotAuthorizedException="NotAuthorizedException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyRequestsException="TooManyRequestsException",t.UnexpectedLambdaException="UnexpectedLambdaException",t.UserLambdaValidationException="UserLambdaValidationException",t.UserNotFoundException="UserNotFoundException"}(m||(m={})),function(t){t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidParameterException="InvalidParameterException",t.NotAuthorizedException="NotAuthorizedException",t.PasswordResetRequiredException="PasswordResetRequiredException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyRequestsException="TooManyRequestsException",t.UserNotConfirmedException="UserNotConfirmedException",t.UserNotFoundException="UserNotFoundException"}(h||(h={})),function(t){t.ExternalServiceException="ExternalServiceException",t.InternalErrorException="InternalErrorException",t.InvalidParameterException="InvalidParameterException",t.LimitExceededException="LimitExceededException",t.NotAuthorizedException="NotAuthorizedException",t.ResourceConflictException="ResourceConflictException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyRequestsException="TooManyRequestsException"}(x||(x={})),function(t){t.ExternalServiceException="ExternalServiceException",t.InternalErrorException="InternalErrorException",t.InvalidIdentityPoolConfigurationException="InvalidIdentityPoolConfigurationException",t.InvalidParameterException="InvalidParameterException",t.NotAuthorizedException="NotAuthorizedException",t.ResourceConflictException="ResourceConflictException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyRequestsException="TooManyRequestsException"}(y||(y={})),function(t){t.CodeDeliveryFailureException="CodeDeliveryFailureException",t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidEmailRoleAccessPolicyException="InvalidEmailRoleAccessPolicyException",t.InvalidLambdaResponseException="InvalidLambdaResponseException",t.InvalidParameterException="InvalidParameterException",t.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",t.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",t.LimitExceededException="LimitExceededException",t.NotAuthorizedException="NotAuthorizedException",t.PasswordResetRequiredException="PasswordResetRequiredException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyRequestsException="TooManyRequestsException",t.UnexpectedLambdaException="UnexpectedLambdaException",t.UserLambdaValidationException="UserLambdaValidationException",t.UserNotConfirmedException="UserNotConfirmedException",t.UserNotFoundException="UserNotFoundException"}(g||(g={})),function(t){t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidParameterException="InvalidParameterException",t.NotAuthorizedException="NotAuthorizedException",t.PasswordResetRequiredException="PasswordResetRequiredException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyRequestsException="TooManyRequestsException",t.UserNotConfirmedException="UserNotConfirmedException"}(v||(v={})),function(t){t.PasswordResetRequiredException="PasswordResetRequiredException",t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidLambdaResponseException="InvalidLambdaResponseException",t.InvalidParameterException="InvalidParameterException",t.InvalidSmsRoleAcce
21ssPolicyException="InvalidSmsRoleAccessPolicyException",t.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",t.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",t.NotAuthorizedException="NotAuthorizedException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyRequestsException="TooManyRequestsException",t.UnexpectedLambdaException="UnexpectedLambdaException",t.UserLambdaValidationException="UserLambdaValidationException",t.UserNotConfirmedException="UserNotConfirmedException",t.UserNotFoundException="UserNotFoundException"}(S||(S={})),function(t){t.CodeDeliveryFailureException="CodeDeliveryFailureException",t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidEmailRoleAccessPolicyException="InvalidEmailRoleAccessPolicyException",t.InvalidLambdaResponseException="InvalidLambdaResponseException",t.InvalidParameterException="InvalidParameterException",t.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",t.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",t.LimitExceededException="LimitExceededException",t.NotAuthorizedException="NotAuthorizedException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyRequestsException="TooManyRequestsException",t.UnexpectedLambdaException="UnexpectedLambdaException",t.UserLambdaValidationException="UserLambdaValidationException",t.UserNotFoundException="UserNotFoundException"}(A||(A={})),function(t){t.AliasExistsException="AliasExistsException",t.CodeMismatchException="CodeMismatchException",t.ExpiredCodeException="ExpiredCodeException",t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidLambdaResponseException="InvalidLambdaResponseException",t.InvalidParameterException="InvalidParameterException",t.InvalidPasswordException="InvalidPasswordException",t.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",t.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",t.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",t.MFAMethodNotFoundException="MFAMethodNotFoundException",t.NotAuthorizedException="NotAuthorizedException",t.PasswordResetRequiredException="PasswordResetRequiredException",t.ResourceNotFoundException="ResourceNotFoundException",t.SoftwareTokenMFANotFoundException="SoftwareTokenMFANotFoundException",t.TooManyRequestsException="TooManyRequestsException",t.UnexpectedLambdaException="UnexpectedLambdaException",t.UserLambdaValidationException="UserLambdaValidationException",t.UserNotConfirmedException="UserNotConfirmedException",t.UserNotFoundException="UserNotFoundException"}(w||(w={})),function(t){t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidParameterException="InvalidParameterException",t.NotAuthorizedException="NotAuthorizedException",t.PasswordResetRequiredException="PasswordResetRequiredException",t.ResourceNotFoundException="ResourceNotFoundException",t.UserNotConfirmedException="UserNotConfirmedException",t.UserNotFoundException="UserNotFoundException"}(C||(C={})),function(t){t.CodeDeliveryFailureException="CodeDeliveryFailureException",t.InternalErrorException="InternalErrorException",t.InvalidEmailRoleAccessPolicyException="InvalidEmailRoleAccessPolicyException",t.InvalidLambdaResponseException="InvalidLambdaResponseException",t.InvalidParameterException="InvalidParameterException",t.InvalidPasswordException="InvalidPasswordException",t.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",t.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",t.NotAuthorizedException="NotAuthorizedException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyRequestsException="TooManyRequestsException",t.UnexpectedLambdaException="UnexpectedLambdaException",t.UserLambdaValidationException="UserLambdaValidationException",t.UsernameExistsException="UsernameExistsException"}(I||(I={})),function(t){t.AliasExistsException="AliasExistsException",t.CodeDeliveryFailureException="CodeDeliveryFailureException",t.CodeMismatchException="CodeMismatchException",t.ExpiredCodeException="ExpiredCodeException",t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidEmailRoleAccessPol
21icyException="InvalidEmailRoleAccessPolicyException",t.InvalidLambdaResponseException="InvalidLambdaResponseException",t.InvalidParameterException="InvalidParameterException",t.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",t.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",t.NotAuthorizedException="NotAuthorizedException",t.PasswordResetRequiredException="PasswordResetRequiredException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyRequestsException="TooManyRequestsException",t.UnexpectedLambdaException="UnexpectedLambdaException",t.UserLambdaValidationException="UserLambdaValidationException",t.UserNotConfirmedException="UserNotConfirmedException",t.UserNotFoundException="UserNotFoundException"}(R||(R={})),function(t){t.CodeMismatchException="CodeMismatchException",t.EnableSoftwareTokenMFAException="EnableSoftwareTokenMFAException",t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidParameterException="InvalidParameterException",t.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",t.NotAuthorizedException="NotAuthorizedException",t.PasswordResetRequiredException="PasswordResetRequiredException",t.ResourceNotFoundException="ResourceNotFoundException",t.SoftwareTokenMFANotFoundException="SoftwareTokenMFANotFoundException",t.TooManyRequestsException="TooManyRequestsException",t.UserNotConfirmedException="UserNotConfirmedException",t.UserNotFoundException="UserNotFoundException"}(b||(b={})),function(t){t.AliasExistsException="AliasExistsException",t.CodeMismatchException="CodeMismatchException",t.ExpiredCodeException="ExpiredCodeException",t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidParameterException="InvalidParameterException",t.LimitExceededException="LimitExceededException",t.NotAuthorizedException="NotAuthorizedException",t.PasswordResetRequiredException="PasswordResetRequiredException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyRequestsException="TooManyRequestsException",t.UserNotConfirmedException="UserNotConfirmedException",t.UserNotFoundException="UserNotFoundException"}(F||(F={})),function(t){t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidParameterException="InvalidParameterException",t.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",t.NotAuthorizedException="NotAuthorizedException",t.PasswordResetRequiredException="PasswordResetRequiredException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyRequestsException="TooManyRequestsException",t.UserNotConfirmedException="UserNotConfirmedException",t.UserNotFoundException="UserNotFoundException"}(_||(_={})),function(t){t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidParameterException="InvalidParameterException",t.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",t.NotAuthorizedException="NotAuthorizedException",t.PasswordResetRequiredException="PasswordResetRequiredException",t.ResourceNotFoundException="ResourceNotFoundException",t.TooManyRequestsException="TooManyRequestsException",t.UserNotConfirmedException="UserNotConfirmedException",t.UserNotFoundException="UserNotFoundException"}(P||(P={}));var V=o(96097),k=o(7010),L=o(89114),q=o(44850),B=o(29469),j=o(84099),$=o(84175),H=o(95275);let z={convert:t=>new TextEncoder().encode(t)};function W(t,r){null!=t&&this.fromString(t,r)}function G(){return new W(null,null)}let K="undefined"!=typeof navigator;K&&"Microsoft Internet Explorer"===navigator.appName?(W.prototype.am=function(t,r,o,n,i,s){let a=32767&r,l=r>>15;for(;--s>=0;){let r=32767&this[t],s=this[t++]>>15,c=l*r+s*a;i=((r=a*r+((32767&c)<<15)+o[n]+(0x3fffffff&i))>>>30)+(c>>>15)+l*s+(i>>>30),o[n++]=0x3fffffff&r}return i},n=30):K&&"Netscape"!==navigator.appName?(W.prototype.am=function(t,r,o,n,i,s){for(;--s>=0;){let s=r*this[t++]+o[n]+i;i=Math.floor(s/0x4000000),o[n++]=0x3ffffff&s}return i},n=26):(W.prototype.am=function(t,r,o,n,i,s){let a=16383&r,l=r>>14;for(;--s>=0;){let r=16383&this[t],s=this[t++]>>14,c=l*r+s*a;i=((r=a*r+((16383&c)<<14)+o[n]+i)>>28)+(c>>14)+l*s,o[n++]=0xfffffff&r}return i},n=28),W.prototype.DB=n,W.prototype.DM=(1<<n)-1,W.prototype.DV=1<<n,W.prototype.FV=0x10000000000000,W.prototype.F1=52-n,W.prototype.F2=2*n-52;let Y=[];for(s=0,i=48;s<=9;++s)Y[i++]=s;for(s=10,i=97;s<36;++s)Y[i++]=s;for(s=10,i=65;s<36;++s)Y[i++]=s;function Z(t){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(t)}function J(t){let r=G();return r.fromInt(t),r}function Q(t){let r,o=1;return 0!=(r=t>>>16)&&(t=r,o+=16),0!=(r=t>>8)&&(t=r,o+=8),0!=(r=t>>4)&&(t=r,o+=4),0!=(r=t>>2)&&(t=r,o+=2),0!=(r=t>>1)&&(t=r,o+=1),o}function X(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>
21>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}X.prototype.convert=function(t){let r=G();return t.abs().dlShiftTo(this.m.t,r),r.divRemTo(this.m,null,r),t.s<0&&r.compareTo(W.ZERO)>0&&this.m.subTo(r,r),r},X.prototype.revert=function(t){let r=G();return t.copyTo(r),this.reduce(r),r},X.prototype.reduce=function(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(let r=0;r<this.m.t;++r){let o=32767&t[r],n=o*this.mpl+((o*this.mph+(t[r]>>15)*this.mpl&this.um)<<15)&t.DM;for(o=r+this.m.t,t[o]+=this.m.am(0,n,t,r,0,this.m.t);t[o]>=t.DV;)t[o]-=t.DV,t[++o]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)},X.prototype.mulTo=function(t,r,o){t.multiplyTo(r,o),this.reduce(o)},X.prototype.sqrTo=function(t,r){t.squareTo(r),this.reduce(r)},W.prototype.copyTo=function(t){for(let r=this.t-1;r>=0;--r)t[r]=this[r];t.t=this.t,t.s=this.s},W.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+this.DV:this.t=0},W.prototype.fromString=function(t,r){let o;if(16===r)o=4;else if(8===r)o=3;else if(2===r)o=1;else if(32===r)o=5;else if(4===r)o=2;else throw Error("Only radix 2, 4, 8, 16, 32 are supported");this.t=0,this.s=0;let n=t.length,i=!1,s=0;for(;--n>=0;){let r=function(t,r){let o=Y[t.charCodeAt(r)];return null==o?-1:o}(t,n);if(r<0){"-"===t.charAt(n)&&(i=!0);continue}i=!1,0===s?this[this.t++]=r:s+o>this.DB?(this[this.t-1]|=(r&(1<<this.DB-s)-1)<<s,this[this.t++]=r>>this.DB-s):this[this.t-1]|=r<<s,(s+=o)>=this.DB&&(s-=this.DB)}this.clamp(),i&&W.ZERO.subTo(this,this)},W.prototype.clamp=function(){let t=this.s&this.DM;for(;this.t>0&&this[this.t-1]==t;)--this.t},W.prototype.dlShiftTo=function(t,r){let o;for(o=this.t-1;o>=0;--o)r[o+t]=this[o];for(o=t-1;o>=0;--o)r[o]=0;r.t=this.t+t,r.s=this.s},W.prototype.drShiftTo=function(t,r){for(let o=t;o<this.t;++o)r[o-t]=this[o];r.t=Math.max(this.t-t,0),r.s=this.s},W.prototype.lShiftTo=function(t,r){let o,n=t%this.DB,i=this.DB-n,s=(1<<i)-1,a=Math.floor(t/this.DB),l=this.s<<n&this.DM;for(o=this.t-1;o>=0;--o)r[o+a+1]=this[o]>>i|l,l=(this[o]&s)<<n;for(o=a-1;o>=0;--o)r[o]=0;r[a]=l,r.t=this.t+a+1,r.s=this.s,r.clamp()},W.prototype.rShiftTo=function(t,r){r.s=this.s;let o=Math.floor(t/this.DB);if(o>=this.t){r.t=0;return}let n=t%this.DB,i=this.DB-n,s=(1<<n)-1;r[0]=this[o]>>n;for(let t=o+1;t<this.t;++t)r[t-o-1]|=(this[t]&s)<<i,r[t-o]=this[t]>>n;n>0&&(r[this.t-o-1]|=(this.s&s)<<i),r.t=this.t-o,r.clamp()},W.prototype.subTo=function(t,r){let o=0,n=0,i=Math.min(t.t,this.t);for(;o<i;)n+=this[o]-t[o],r[o++]=n&this.DM,n>>=this.DB;if(t.t<this.t){for(n-=t.s;o<this.t;)n+=this[o],r[o++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;o<t.t;)n-=t[o],r[o++]=n&this.DM,n>>=this.DB;n-=t.s}r.s=n<0?-1:0,n<-1?r[o++]=this.DV+n:n>0&&(r[o++]=n),r.t=o,r.clamp()},W.prototype.multiplyTo=function(t,r){let o=this.abs(),n=t.abs(),i=o.t;for(r.t=i+n.t;--i>=0;)r[i]=0;for(i=0;i<n.t;++i)r[i+o.t]=o.am(0,n[i],r,i,0,o.t);r.s=0,r.clamp(),this.s!==t.s&&W.ZERO.subTo(r,r)},W.prototype.squareTo=function(t){let r=this.abs(),o=t.t=2*r.t;for(;--o>=0;)t[o]=0;for(o=0;o<r.t-1;++o){let n=r.am(o,r[o],t,2*o,0,1);(t[o+r.t]+=r.am(o+1,2*r[o],t,2*o+1,n,r.t-o-1))>=r.DV&&(t[o+r.t]-=r.DV,t[o+r.t+1]=1)}t.t>0&&(t[t.t-1]+=r.am(o,r[o],t,2*o,0,1)),t.s=0,t.clamp()},W.prototype.divRemTo=function(t,r,o){let n=t.abs();if(n.t<=0)return;let i=this.abs();if(i.t<n.t){null!=r&&r.fromInt(0),null!=o&&this.copyTo(o);return}null===o&&(o=G());let s=G(),a=this.s,l=t.s,c=this.DB-Q(n[n.t-1]);c>0?(n.lShiftTo(c,s),i.lShiftTo(c,o)):(n.copyTo(s),i.copyTo(o));let u=s.t,d=s[u-1];if(0===d)return;let p=d*(1<<this.F1)+(u>1?s[u-2]>>this.F2:0),f=this.FV/p,E=(1<<this.F1)/p,m=1<<this.F2,h=o.t,x=h-u,y=null===r?G():r;for(s.dlShiftTo(x,y),o.compareTo(y)>=0&&(o[o.t++]=1,o.subTo(y,o)),W.ONE.dlShiftTo(u,y),y.subTo(s,s);s.t<u;)s[s.t++]=0;for(;--x>=0;){let t=o[--h]===d?this.DM:Math.floor(o[h]*f+(o[h-1]+m)*E);if((o[h]+=s.am(0,t,o,x,0,u))<t)for(s.dlShiftTo(x,y),o.subTo(y,o);o[h]<--t;)o.subTo(y,o)}null!==r&&(o.drShiftTo(u,r),a!==l&&W.ZERO.subTo(r,r)),o.t=u,o.clamp(),c>0&&o.rShiftTo(c,o),a<0&&W.ZERO.subTo(o,o)},W.prototype.invDigit=function(){if(this.t<1)return 0;let t=this[0];if((1&t)==0)return 0;let r=3&t;return(r=(r=(r=(r=r*(2-(15&t)*r)&15)*(2-(255&t)*r)&255)*(2-((65535&t)*r&65535))&65535)
21*(2-t*r%this.DV)%this.DV)>0?this.DV-r:-r},W.prototype.addTo=function(t,r){let o=0,n=0,i=Math.min(t.t,this.t);for(;o<i;)n+=this[o]+t[o],r[o++]=n&this.DM,n>>=this.DB;if(t.t<this.t){for(n+=t.s;o<this.t;)n+=this[o],r[o++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;o<t.t;)n+=t[o],r[o++]=n&this.DM,n>>=this.DB;n+=t.s}r.s=n<0?-1:0,n>0?r[o++]=n:n<-1&&(r[o++]=this.DV+n),r.t=o,r.clamp()},W.prototype.toString=function(t){let r,o;if(this.s<0)return"-"+this.negate().toString(t);if(16==t)r=4;else if(8===t)r=3;else if(2===t)r=1;else if(32===t)r=5;else if(4===t)r=2;else throw Error("Only radix 2, 4, 8, 16, 32 are supported");let n=(1<<r)-1,i=!1,s="",a=this.t,l=this.DB-a*this.DB%r;if(a-- >0)for(l<this.DB&&(o=this[a]>>l)>0&&(i=!0,s=Z(o));a>=0;)l<r?o=(this[a]&(1<<l)-1)<<r-l|this[--a]>>(l+=this.DB-r):(o=this[a]>>(l-=r)&n,l<=0&&(l+=this.DB,--a)),o>0&&(i=!0),i&&(s+=Z(o));return i?s:"0"},W.prototype.negate=function(){let t=G();return W.ZERO.subTo(this,t),t},W.prototype.abs=function(){return this.s<0?this.negate():this},W.prototype.compareTo=function(t){let r=this.s-t.s;if(0!=r)return r;let o=this.t;if(0!=(r=o-t.t))return this.s<0?-r:r;for(;--o>=0;)if(0!=(r=this[o]-t[o]))return r;return 0},W.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+Q(this[this.t-1]^this.s&this.DM)},W.prototype.mod=function(t){let r=G();return this.abs().divRemTo(t,null,r),this.s<0&&r.compareTo(W.ZERO)>0&&t.subTo(r,r),r},W.prototype.equals=function(t){return 0===this.compareTo(t)},W.prototype.add=function(t){let r=G();return this.addTo(t,r),r},W.prototype.subtract=function(t){let r=G();return this.subTo(t,r),r},W.prototype.multiply=function(t){let r=G();return this.multiplyTo(t,r),r},W.prototype.divide=function(t){let r=G();return this.divRemTo(t,r,null),r},W.prototype.modPow=function(t,r,o){let n,i,s,a=t.bitLength(),l=J(1),c=new X(r);if(a<=0)return l;let u=[],d=3,p=(n=a<18?1:a<48?3:a<144?4:a<768?5:6)-1,f=(1<<n)-1;if(u[1]=c.convert(this),n>1){let t=G();for(c.sqrTo(u[1],t);d<=f;)u[d]=G(),c.mulTo(t,u[d-2],u[d]),d+=2}let E=t.t-1,m=!0,h=G();for(a=Q(t[E])-1;E>=0;){for(a>=p?i=t[E]>>a-p&f:(i=(t[E]&(1<<a+1)-1)<<p-a,E>0&&(i|=t[E-1]>>this.DB+a-p)),d=n;(1&i)==0;)i>>=1,--d;if((a-=d)<0&&(a+=this.DB,--E),m)u[i].copyTo(l),m=!1;else{for(;d>1;)c.sqrTo(l,h),c.sqrTo(h,l),d-=2;d>0?c.sqrTo(l,h):(s=l,l=h,h=s),c.mulTo(h,u[i],l)}for(;E>=0&&(t[E]&1<<a)==0;)c.sqrTo(l,h),s=l,l=h,h=s,--a<0&&(a=this.DB-1,--E)}let x=c.revert(l);return o(null,x),x},W.ZERO=J(0),W.ONE=J(1);let ee=async({a:t,g:r,k:o,x:n,B:i,N:s,U:a})=>new Promise((l,c)=>{r.modPow(n,s,(r,u)=>{if(r)return void c(r);i.subtract(o.multiply(u)).modPow(t.add(a.multiply(n)),s,(t,r)=>{if(t)return void c(t);l(r.mod(s))})})}),et={},er={};for(let t=0;t<256;t++){let r=t.toString(16).toLowerCase();1===r.length&&(r=`0${r}`),et[t]=r,er[r]=t}let eo=t=>{if(t.length%2!=0)throw Error("Hex encoded strings must have an even number length");let r=new Uint8Array(t.length/2);for(let o=0;o<t.length;o+=2){let n=t.slice(o,o+2).toLowerCase();if(n in er)r[o/2]=er[n];else throw Error(`Cannot decode unrecognized sequence ${n} as hexadecimal`)}return r};var en=o(55484);let ei=t=>{let r="";for(let o=0;o<t.byteLength;o++)r+=et[t[o]];return r},es=t=>{let r=new en.I;r.update(t);let o=ei(r.digestSync());return Array(64-o.length).join("0")+o},ea=t=>es(eo(t)),el=/^[89a-f]/i,ec=t=>{if(!(t instanceof W))throw Error("Not a BigInteger");let r=0>t.compareTo(W.ZERO),o=t.abs().toString(16);return o=o.length%2!=0?`0${o}`:o,o=el.test(o)?`00${o}`:o,r&&(o=new W(o.split("").map(t=>{let r=15&~parseInt(t,16);return"0123456789ABCDEF".charAt(r)}).join(""),16).add(W.ONE).toString(16)).toUpperCase().startsWith("FF8")&&(o=o.substring(2)),o};var eu=o(34037);class ed{constructor(t,r){this.words=[];let o=t;o=this.words=o||[],void 0!==r?this.sigBytes=r:this.sigBytes=4*o.length}random(t){let r=[];for(let o=0;o<t;o+=4)r.push((0,eu.MY)().getRandomValues(new Uint32Array(1))[0]);return new ed(r,t)}toString(){return function(t){let{words:r}=t,{sigBytes:o}=t,n=[];for(let t=0;t<o;t++){let o=r[t>>>2]>>>24-t%4*8&255;n.push((o>>>4).toString(16)),n.push((15&o).toString(16))}return n.join("")}(this)}}let ep=t=>eo(new ed().random(t).toString());class ef{constructor({userPoolName:t,a:r,g:o,A:n,N:i}){this.encoder=z,this.userPoolName=t,this.a=r,this.g=o,this.A=n,this.N=i,this.k=new W(ea(`${ec(i)}${ec(o)}`),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(t,r){this.randomPassword=M.Y.convert(ep(40));let o=es(`${t}${r}:${this.randomPassword}`),n=ei(ep(16));return this.saltToHashDevices=ec(new W(n,16)),new Promise((t,r)=>{this.g.modPow(new W(ea(this.saltToHashDevices+o),16),this.N,(o,n)=>{if(o)return void r(o);this.verifierDevices=ec(n),t()})})}async getPasswordAuthenticationKey({username:t,password:r,serverBValue:o,salt:n}){if(o.mod(this.N).equals(W.ZERO))throw Error("B cannot be zero.");let i=(({A:t,B:r})=>{let o=new W(ea(ec(t)+ec(r)),16);if(o.equals(W.ZERO))throw Error("U cannot be zero.");return o}
21)({A:this.A,B:o}),s=es(`${this.userPoolName}${t}:${r}`),a=new W(ea(ec(n)+s),16),l=await ee({a:this.a,g:this.g,k:this.k,x:a,B:o,N:this.N,U:i}),c=this.encoder.convert("Caldera Derived Key"),u=this.encoder.convert("\x01"),d=new Uint8Array(c.byteLength+u.byteLength);return d.set(c,0),d.set(u,c.byteLength),((t,r,o)=>{let n=new en.I(r);n.update(t);let i=n.digestSync(),s=new en.I(i);return s.update(o),s.digestSync().slice(0,16)})(eo(ec(l)),eo(ec(i)),d)}}let eE=async({a:t,g:r,N:o})=>new Promise((n,i)=>{r.modPow(t,o,(t,r)=>t?void i(t):r.mod(o).equals(W.ZERO)?void i(Error("Illegal parameter. A mod N cannot be 0.")):void n(r))}),em=async t=>{let r=new W("FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF",16),o=new W("2",16),n=eh(),i=await eE({a:n,g:o,N:r});return new ef({userPoolName:t,a:n,g:o,A:i,N:r})},eh=()=>new W(ei(ep(128)),16),ex=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ey=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],eg=()=>{let t=new Date,r=ey[t.getUTCDay()],o=ex[t.getUTCMonth()],n=t.getUTCDate(),i=t.getUTCHours();i<10&&(i=`0${i}`);let s=t.getUTCMinutes();s<10&&(s=`0${s}`);let a=t.getUTCSeconds();a<10&&(a=`0${a}`);let l=t.getUTCFullYear();return`${r} ${o} ${n} ${i}:${s}:${a} UTC ${l}`};var ev=o(69637);let eS=({userPoolName:t,username:r,challengeParameters:o,dateNow:n,hkdf:i})=>{let s=z.convert(t),a=z.convert(r),l=eA(o.SECRET_BLOCK),c=z.convert(n),u=new Uint8Array(s.byteLength+a.byteLength+l.byteLength+c.byteLength);u.set(s,0),u.set(a,s.byteLength),u.set(l,s.byteLength+a.byteLength),u.set(c,s.byteLength+a.byteLength+l.byteLength);let d=new en.I(i);d.update(u);let p=d.digestSync();return M.Y.convert(p)},eA=t=>{let r="=".repeat((4-t.length%4)%4),o=(t+r).replace(/-/g,"+").replace(/_/g,"/"),n=ev.m.convert(o),i=new Uint8Array(n.length);for(let t=0;t<n.length;++t)i[t]=n.charCodeAt(t);return i};var ew=o(21061);let eC="userAttributes.";async function eI(t,r,o,n,i){let{userPoolClientId:s,userPoolId:a}=n,l={USERNAME:t,PASSWORD:r},c=await i.getDeviceMetadata(t);c&&c.deviceKey&&(l.DEVICE_KEY=c.deviceKey);let u=(0,ew.d)({username:t,userPoolId:a,userPoolClientId:s}),d=await (0,j.GO)({region:(0,$.J)(a),userAgentValue:(0,q.A)(T.BM.SignIn)},{AuthFlow:"USER_PASSWORD_AUTH",AuthParameters:l,ClientMetadata:o,ClientId:s,UserContextData:u}),p=d.ChallengeParameters?.USERNAME??d.ChallengeParameters?.USER_ID_FOR_SRP??t;return(eq(p),"DEVICE_SRP_AUTH"===d.ChallengeName)?e_({username:p,config:n,clientMetadata:o,session:d.Session,tokenOrchestrator:i}):d}async function eR(t,r,o,n,i){let{userPoolId:s,userPoolClientId:a}=n,l=s?.split("_")[1]||"",c=await em(l),u={USERNAME:t,SRP_A:c.A.toString(16)},d=(0,ew.d)({username:t,userPoolId:s,userPoolClientId:a}),{ChallengeParameters:p,Session:f}=await (0,j.GO)({region:(0,$.J)(s),userAgentValue:(0,q.A)(T.BM.SignIn)},{AuthFlow:"USER_SRP_AUTH",AuthParameters:u,ClientMetadata:o,ClientId:a,UserContextData:d}),E=p?.USERNAME??t;return eq(E),eL(eN,[r,p,o,f,c,n,i],E,i)}async function eb(t,r,o,n){let{userPoolClientId:i,userPoolId:s}=o,a={USERNAME:t},l=await n.getDeviceMetadata(t);l&&l.deviceKey&&(a.DEVICE_KEY=l.deviceKey);let c=(0,ew.d)({username:t,userPoolId:s,userPoolClientId:i}),u=await (0,j.GO)({region:(0,$.J)(s),userAgentValue:(0,q.A)(T.BM.SignIn)},{AuthFlow:"CUSTOM_AUTH",AuthParameters:a,ClientMetadata:r,ClientId:i,UserContextData:c}),d=u.ChallengeParameters?.USERNAME??t;return(eq(d),"DEVICE_SRP_AUTH"===u.ChallengeName)?e_({username:d,config:o,clientMetadata:r,session:u.Session,tokenOrchestrator:n}):u}async function eF(t,r,o,n,i){(0,U.$y)(n);let{userPoolId:s,userPoolClientId:a}=n,l=s?.split("_")[1]||"",c=await em(l),u={USERNAME:t,SRP_A:c.A.toString(16),CHALLENGE_NAME:"SRP_A"},d=(0,ew.d)({username:t,userPoolId:s,userPoolClientId:a}),{ChallengeParameters:p,Session:f}=await (0,j.GO)({region:(0,$.J)(s),userAgentValue:(0,q.A)(T.BM.SignIn)},{AuthFlow:"CUSTOM_AUTH",AuthParameters:u,ClientMetadata:o,ClientId:a,UserContextData:d}),E=p?.USERNAME??t;return eq(E),eL(eN,[r,p,o,f,c,n,i],E,i)}async function e_({username:t,config:r,clientMetadata:o,session:n,tokenOrchestrator:i}){let{userPoolId:s}=r,a=r.userPoolClientId,l=await i?.getDeviceMetadata(t);(0,H.O_)(l);let c=await em(l.deviceGroupKey),u={USERNAME:t,SRP_A:c.A.toString(16),DEVICE_KEY:l.deviceKey},{ChallengeParameters:d,Session:p}=await (0,j.Ot)({region:(0,$.J)(s)},{ChallengeName:"DEVICE_SRP_AUTH",ClientId:a,ChallengeResponses:u,ClientMetadata:o,Session:n});return eP(t,d,o,p,c,r,i)}async function eP(t,r,o,n,i,{userPoolId:s,userPoolClientId:a},l){let c=await l?.getDeviceMetadata(t);(0,H.O_)(c);let u=new W(r?.SRP_B,16),d=new W(r?.SALT,16),{deviceKey:p}=c,{deviceGroupKey:f}=c,E=await i.getPasswordAuthenticationKey({username:c.deviceKey,password:c.randomPassword,serverBValue:u,salt:d}),m=eg(),h={USERNAME:r?.USERNAME??t,PASSWORD_CLAIM_SECRET_BLOCK:r?.SECRET_BLOCK,TIMESTAMP:m,PASSWORD_CLAIM_SIGNATURE:eS({username:p,userPoolName:f,challengeParameters:r,dateNow:m,hkdf:E}),DEVICE_KEY:p},x=(0,ew.d)({username:t,userPoolId:s,userPoolClientId:a});return(0,j.Ot)({region:(0,$.J)(s)},{ChallengeName:"DEVICE_PASSWORD_VERIFIER",ClientId:a,ChallengeResponses:h,Session:n,ClientMetadata:o,UserContextData:x})}async function eN(t,r,o,n,i,s,a){let{userPoolId:l,userPoolClientId:c}=s,u=l?.split("_")[1]||"",d=new W(r?.SRP_B,16),p=new W(r?.SALT,16),f=r?.USER_ID_FOR_SRP;if(!f)throw new O.l({name:"EmptyUserIdForSRPException",message:"USER_ID_FOR_SRP was not found in challengeParameters"});let E=await i.getPasswordAuthenticationKey({username:f,password:t,serverBValue:d,salt:p}),m=eg(),h={USERNAME:f,PASSWORD_CLAIM_SECRET_BLOCK:r?.SECRET_BLOCK,TIMESTAMP:m,PASSWORD_CLAIM_SIGNATURE:eS({username:f,userPoolName:u,challengeParameters:r,dateNow:m,hkdf:E})},x=await a.getDeviceMetadata(f);x&&x.deviceKey&&(h.DEVICE_KEY=x.deviceKey);let y=(0,ew.d)({username:f,userPoolId:l,userPoolClientId:c}),g=await (0,j.Ot)({region:(0,$.J)(l)},{ChallengeName:"PASSWORD_VERIFIER",ChallengeResponses:h,ClientMetadata:o,Session:n,ClientId:c,UserContextData:y});return"DEVICE_SRP_AUTH"===g.ChallengeName?e_({username:f,config:s,clientMetadata:o,session:g.Session,tokenOrchestrator:a}):g}async function eT(t){var r,o,n;let{challengeName:i,challengeParameters:s}=t,a=N.H.getConfig().Auth?.Cognito;switch((0,U.$y)(a),i){case"CUSTOM_CHALLENGE":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_CUSTOM_CHALLENGE",additionalInfo:s}};case"MFA_SETUP":{let{signInSession:t,username:n}=B.c$.getState();if(!function(t,r){let{MFAS_CAN_SETUP:o}=t,n=eM(eO(o));return!!n&&n.includes(r)}(s,"TOTP"))throw new O.l({name:V.nC.SignInException,message:`Cannot initiate MFA setup from available types: ${eM(eO(s.MFAS_CAN_SETUP))}`});let{Session:i,SecretCode:l}=await (0,j.Td)({region:(0,$.J)(a.userPoolId)},{Session:t});return B.c$.dispatch({type:"SET_SIGN_IN_SESSION",value:i}),{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_TOTP_SETUP",totpSetupDetails:(r=l,o=n,{sharedSecret:r,getSetupUri:(t,n)=>{let i=`otpauth://totp/${t}:${n??o}?secret=${r}&issuer=${t}`;return new D.o(i)}})}}}case"NEW_PASSWORD_REQUIRED":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED",missingAttributes:(n=s.requiredAttributes)?JSON.parse(n).map(t=>t.includes(eC)?t.replace(eC,""):t):[]}};case"SELECT_MFA_TYPE":return{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_MFA_SELECTION",allowedMFATypes:eM(eO(s.MFAS_CAN_CHOOSE))}};case"SMS_MFA":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_SMS_CODE",codeDeliveryDetails:{deliveryMedium:s.CODE_DELIVERY_DELIVERY_MEDIUM,destination:s.CODE_DELIVERY_DESTINATION}}};case"SOFTWARE_TOKEN_MFA":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_TOTP_CODE"}}}throw new O.l({name:V.nC.SignInException,message:`An error occurred during the sign in process. ${i} challengeName returned by the underlying service was not addressed.`})}function eU(t){return t===S.PasswordResetRequiredException?{isSignedIn:!1,nextStep:{signInStep:"RESET_PASSWORD"}}:t===S.UserNotConfirmedException?{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_UP"}}
21:void 0}function eD(t){return"SMS_MFA"===t?"SMS":"SOFTWARE_TOKEN_MFA"===t?"TOTP":void 0}function eM(t){if(t)return t.map(eD).filter(Boolean)}function eO(t){return t?JSON.parse(t):[]}async function eV(){let t;try{t=await (0,L.H)()}catch(t){}if(t&&t.userId&&t.username)throw new O.l({name:k.z0,message:"There is already a signed in user.",recoverySuggestion:"Call signOut before calling signIn again."})}async function ek(t,r,o){if(!r)return;let n=t.split("_")[1]||"",i=await em(n),s=r?.DeviceKey,a=r?.DeviceGroupKey;try{await i.generateHashDevice(a??"",s??"")}catch(t){return}let l={Salt:M.Y.convert(eo(i.getSaltToHashDevices())),PasswordVerifier:M.Y.convert(eo(i.getVerifierDevices()))},c=i.getRandomPassword();try{return await (0,j.TJ)({region:(0,$.J)(t)},{AccessToken:o,DeviceKey:r?.DeviceKey,DeviceSecretVerifierConfig:l}),{deviceKey:s,deviceGroupKey:a,randomPassword:c}}catch(t){return}}async function eL(t,r,o,n){try{return await t(...r)}catch(i){if(i instanceof O.l&&"ResourceNotFoundException"===i.name&&i.message.includes("Device does not exist."))return await n.clearDeviceMetadata(o),t(...r);throw i}}function eq(t){let{dispatch:r}=B.c$;r({type:"SET_USERNAME",value:t})}function eB(t){return B.c$.getState().username??t}},61329:(t,r,o)=>{"use strict";o.d(r,{M:()=>i});var n=o(7010);function i(t){let r=t?.find(s)??t?.find(a),o=t?.find(c)??t?.find(l);if(r)return r;if(o)throw n.$6;throw n.RW}let s=t=>t.startsWith(String((window.location.origin+window.location.pathname)??"/")),a=t=>t.includes(String(window.location.hostname)),l=t=>t.startsWith("http://"),c=t=>t.startsWith("https://")},61618:()=>{},70961:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.parse=function(t,r){let o=new l,n=t.length;if(n<2)return o;let i=r?.decode||d,s=0;do{let r=t.indexOf("=",s);if(-1===r)break;let a=t.indexOf(";",s),l=-1===a?n:a;if(r>l){s=t.lastIndexOf(";",r-1)+1;continue}let d=c(t,s,r),p=u(t,r,d),f=t.slice(d,p);if(void 0===o[f]){let n=c(t,r+1,l),s=u(t,l,n),a=i(t.slice(n,s));o[f]=a}s=l+1}while(s<n);return o},r.serialize=function(t,r,l){let c=l?.encode||encodeURIComponent;if(!o.test(t))throw TypeError(`argument name is invalid: ${t}`);let u=c(r);if(!n.test(u))throw TypeError(`argument val is invalid: ${r}`);let d=t+"="+u;if(!l)return d;if(void 0!==l.maxAge){if(!Number.isInteger(l.maxAge))throw TypeError(`option maxAge is invalid: ${l.maxAge}`);d+="; Max-Age="+l.maxAge}if(l.domain){if(!i.test(l.domain))throw TypeError(`option domain is invalid: ${l.domain}`);d+="; Domain="+l.domain}if(l.path){if(!s.test(l.path))throw TypeError(`option path is invalid: ${l.path}`);d+="; Path="+l.path}if(l.expires){var p;if(p=l.expires,"[object Date]"!==a.call(p)||!Number.isFinite(l.expires.valueOf()))throw TypeError(`option expires is invali
21d: ${l.expires}`);d+="; Expires="+l.expires.toUTCString()}if(l.httpOnly&&(d+="; HttpOnly"),l.secure&&(d+="; Secure"),l.partitioned&&(d+="; Partitioned"),l.priority)switch("string"==typeof l.priority?l.priority.toLowerCase():void 0){case"low":d+="; Priority=Low";break;case"medium":d+="; Priority=Medium";break;case"high":d+="; Priority=High";break;default:throw TypeError(`option priority is invalid: ${l.priority}`)}if(l.sameSite)switch("string"==typeof l.sameSite?l.sameSite.toLowerCase():l.sameSite){case!0:case"strict":d+="; SameSite=Strict";break;case"lax":d+="; SameSite=Lax";break;case"none":d+="; SameSite=None";break;default:throw TypeError(`option sameSite is invalid: ${l.sameSite}`)}return d};let o=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,n=/^[\u0021-\u003A\u003C-\u007E]*$/,i=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,s=/^[\u0020-\u003A\u003D-\u007E]*$/,a=Object.prototype.toString,l=(()=>{let t=function(){};return t.prototype=Object.create(null),t})();function c(t,r,o){do{let o=t.charCodeAt(r);if(32!==o&&9!==o)return r}while(++r<o);return o}function u(t,r,o){for(;r>o;){let o=t.charCodeAt(--r);if(32!==o&&9!==o)return r+1}return o}function d(t){if(-1===t.indexOf("%"))return t;try{return decodeURIComponent(t)}catch(r){return t}}},71282:()=>{},77254:(t,r,o)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=function(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}(o(72802)),i=t=>t instanceof Date,s=t=>null==t,a=t=>!s(t)&&!Array.isArray(t)&&"object"==typeof t&&!i(t),l=t=>a(t)&&t.target?"checkbox"===t.target.type?t.target.checked:t.target.value:t,c=(t,r)=>t.has((t=>t.substring(0,t.search(/\.\d+(\.|$)/))||t)(r)),u="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function d(t){let r,o=Array.isArray(t);if(t instanceof Date)r=new Date(t);else if(t instanceof Set)r=new Set(t);else{if(u&&(t instanceof Blob||t instanceof FileList)||!o&&!a(t))return t;if(r=o?[]:{},o||(t=>{let r=t.constructor&&t.constructor.prototype;return a(r)&&r.hasOwnProperty("isPrototypeOf")})(t))for(let o in t)t.hasOwnProperty(o)&&(r[o]=d(t[o]));else r=t}return r}var p=t=>Array.isArray(t)?t.filter(Boolean):[],f=t=>void 0===t,E=(t,r,o)=>{if(!r||!a(t))return o;let n=p(r.split(/[,[\].]+?/)).reduce((t,r)=>s(t)?t:t[r],t);return f(n)||n===t?f(t[r])?o:t[r]:n};let m={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},h={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},x="maxLength",y="minLength",g="pattern",v="required",S=n.default.createContext(null),A=()=>n.default.useContext(S);var w=(t,r,o,n=!0)=>{let i={defaultValues:r._defaultValues};for(let s in t)Object.defineProperty(i,s,{get:()=>(r._proxyFormState[s]!==h.all&&(r._proxyFormState[s]=!n||h.all),o&&(o[s]=!0),t[s])});return i},C=t=>a(t)&&!Object.keys(t).length,I=(t,r,o,n)=>{o(t);let{name:i,...s}=t;return C(s)||Object.keys(s).length>=Object.keys(r).length||Object.keys(s).find(t=>r[t]===(!n||h.all))},R=t=>Array.isArray(t)?t:[t],b=(t,r,o)=>o&&r?t===r||Array.isArray(t)&&t.some(t=>t&&o&&t===r):!t||!r||t===r||R(t).some(t=>t&&(t.startsWith(r)||r.startsWith(t)));function F(t){let r=n.default.useRef(t);r.current=t,n.default.useEffect(()=>{let o=!t.disabled&&r.current.subject&&r.current.subject.subscribe({next:r.current.next});return()=>{o&&o.unsubscribe()}},[t.disabled])}function _(t){let r=A(),{control:o=r.control,disabled:i,name:s,exact:a}=t||{},[l,c]=n.default.useState(o._formState),u=n.default.useRef(!0),d=n.default.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1}),p=n.default.useRef(s);return p.current=s,F({disabled:i,next:t=>u.current&&b(p.current,t.name,a)&&I(t,d.current,o._updateFormState)&&c({...o._formState,...t}),subject:o._subjects.state}),n.default.useEffect(()=>(u.current=!0,d.current.isValid&&o._updateValid(!0),()=>{u.current=!1}),[o]),w(l,o,d.current,!1)}var P=(t,r,o,n,i)=>"string"==typeof t?(n&&r.watch.add(t),E(o,t,i)):Array.isArray(t)?t.map(t=>(n&&r.watch.add(t),E(o,t))):(n&&(r.watchAll=!0),o);function N(t){let r=A(),{control:o=r.control,name:i,defaultValue:s,disabled:a,exact:l}=t||{},c=n.default.useRef(i);c.current=i,F({disabled:a,subject:o._subjects.values,next:t=>{b(c.current,t.name,l)&&p(d(P(c.current,o._names,t.values||o._formValues,!1,s)))}});let[u,p]=n.default.useState(o._getWatch(i,s));return n.default.useEffect(()=>o._removeUnmounted()),u}var T=t=>/^\w*$/.test(t),U=t=>p(t.replace(/["|']|\]/g,"").split(/\.|\[/));function D(t,r,o){let n=-1,i=T(r)?[r]:U(r),s=i.length,l=s-1;for(;++n<s;){let r=i[n],s=o;if(n!==l){let o=t[r];
21s=a(o)||Array.isArray(o)?o:isNaN(+i[n+1])?{}:[]}t[r]=s,t=t[r]}return t}function M(t){let r=A(),{name:o,disabled:i,control:s=r.control,shouldUnregister:a}=t,u=c(s._names.array,o),p=N({control:s,name:o,defaultValue:E(s._formValues,o,E(s._defaultValues,o,t.defaultValue)),exact:!0}),h=_({control:s,name:o}),x=n.default.useRef(s.register(o,{...t.rules,value:p}));return x.current=s.register(o,t.rules),n.default.useEffect(()=>{let t=s._options.shouldUnregister||a,r=(t,r)=>{let o=E(s._fields,t);o&&(o._f.mount=r)};if(r(o,!0),t){let t=d(E(s._options.defaultValues,o));D(s._defaultValues,o,t),f(E(s._formValues,o))&&D(s._formValues,o,t)}return()=>{(u?t&&!s._state.action:t)?s.unregister(o):r(o,!1)}},[o,s,u,a]),n.default.useEffect(()=>{s._updateDisabledField({disabled:i,fields:s._fields,name:o})},[i,o,s]),{field:{name:o,value:p,..."boolean"==typeof i?{disabled:i}:{},onChange:n.default.useCallback(t=>x.current.onChange({target:{value:l(t),name:o},type:m.CHANGE}),[o]),onBlur:n.default.useCallback(()=>x.current.onBlur({target:{value:E(s._formValues,o),name:o},type:m.BLUR}),[o,s]),ref:t=>{let r=E(s._fields,o);r&&t&&(r._f.ref={focus:()=>t.focus(),select:()=>t.select(),setCustomValidity:r=>t.setCustomValidity(r),reportValidity:()=>t.reportValidity()})}},formState:h,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!E(h.errors,o)},isDirty:{enumerable:!0,get:()=>!!E(h.dirtyFields,o)},isTouched:{enumerable:!0,get:()=>!!E(h.touchedFields,o)},error:{enumerable:!0,get:()=>E(h.errors,o)}})}}var O=(t,r,o,n,i)=>r?{...o[t],types:{...o[t]&&o[t].types?o[t].types:{},[n]:i||!0}}:{};let V=(t,r,o)=>{for(let n of o||Object.keys(t)){let o=E(t,n);if(o){let{_f:t,...n}=o;if(t&&r(t.name)){if(t.ref.focus){t.ref.focus();break}if(t.refs&&t.refs[0].focus){t.refs[0].focus();break}}else a(n)&&V(n,r)}}};var k=()=>{let t="undefined"==typeof performance?Date.now():1e3*performance.now();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,r=>{let o=(16*Math.random()+t)%16|0;return("x"==r?o:3&o|8).toString(16)})},L=(t,r,o={})=>o.shouldFocus||f(o.shouldFocus)?o.focusName||`${t}.${f(o.focusIndex)?r:o.focusIndex}.`:"",q=t=>({isOnSubmit:!t||t===h.onSubmit,isOnBlur:t===h.onBlur,isOnChange:t===h.onChange,isOnAll:t===h.all,isOnTouch:t===h.onTouched}),B=(t,r,o)=>!o&&(r.watchAll||r.watch.has(t)||[...r.watch].some(r=>t.startsWith(r)&&/^\.\w+/.test(t.slice(r.length)))),j=(t,r,o)=>{let n=p(E(t,o));return D(n,"root",r[o]),D(t,o,n),t},$=t=>"function"==typeof t,H=t=>{if(!u)return!1;let r=t?t.ownerDocument:0;return t instanceof(r&&r.defaultView?r.defaultView.HTMLElement:HTMLElement)},z=t=>"string"==typeof t;let W={value:!1,isValid:!1},G={value:!0,isValid:!0};var K=t=>{if(Array.isArray(t)){if(t.length>1){let r=t.filter(t=>t&&t.checked&&!t.disabled).map(t=>t.value);return{value:r,isValid:!!r.length}}return t[0].checked&&!t[0].disabled?t[0].attributes&&!f(t[0].attributes.value)?f(t[0].value)||""===t[0].value?G:{value:t[0].value,isValid:!0}:G:W}return W};let Y={isValid:!1,value:null};var Z=t=>Array.isArray(t)?t.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,Y):Y;function J(t,r,o="validate"){if(z(t)||Array.isArray(t)&&t.every(z)||"boolean"==typeof t&&!t)return{type:o,message:z(t)?t:"",ref:r}}var Q=t=>!a(t)||t instanceof RegExp?{value:t,message:""}:t,X=async(t,r,o,n,i)=>{let{ref:l,refs:c,required:u,maxLength:d,minLength:p,min:m,max:h,pattern:S,validate:A,name:w,valueAsNumber:I,mount:R,disabled:b}=t._f,F=E(r,w);if(!R||b)return{};let _=c?c[0]:l,P=t=>{n&&_.reportValidity&&(_.setCustomValidity("boolean"==typeof t?"":t||""),_.reportValidity())},N={},T="radio"===l.type,U="checkbox"===l.type,D=(I||"file"===l.type)&&f(l.value)&&f(F)||H(l)&&""===l.value||""===F||Array.isArray(F)&&!F.length,M=O.bind(null,w,o,N),V=(t,r,o,n=x,i=y)=>{let s=t?r:o;N[w]={type:t?n:i,message:s,ref:l,...M(t?n:i,s)}};if(i?!Array.isArray(F)||!F.length:u&&(!(T||U)&&(D||s(F))||"boolean"==typeof F&&!F||U&&!K(c).isValid||T&&!Z(c).isValid)){let{value:t,message:r}=z(u)?{value:!!u,message:u}:Q(u);if(t&&(N[w]={type:v,message:r,ref:_,...M(v,r)},!o))return P(r),N}if(!(D||s(m)&&s(h))){let t,r,n=Q(h),i=Q(m);if(s(F)||isNaN(F)){let o=l.valueAsDate||new Date(F),s=t=>new Date((new Date).toDateString()+" "+t),a="time"==l.type,c="week"==l.type;"string"==typeof n.value&&F&&(t=a?s(F)>s(n.value):c?F>n.value:o>new Date(n.value)),"string"==typeof i.value&&F&&(r=a?s(F)<s(i.value):c?F<i.value:o<new Date(i.value))}else{let o=l.valueAsNumber||(F?+F:F);s(n.value)||(t=o>n.value),s(i.value)||(r=o<i.value)}if((t||r)&&(V(!!t,n.message,i.message,"max","min"),!o))return P(N[w].message),N}if((d||p)&&!D&&("string"==typeof F||i&&Array.isArray(F))){let t=Q(d),r=Q(p),n=!s(t.value)&&F.length>+t.value,i=!s(r.value)&&F.length<+r.value;if((n||i)&&(V(n,t.message,r.message),!o))return P(N[w].message),N}if(S&&!D&&"string"==typeof F){let{value:t,message:r}=Q(S);if(t instanceof RegExp&&!F.match(t)&&(N[w]={type:g,message:r,ref:l,...M(g,r)},!o))return P(r),N}if(A){if($(A)){let t=J(await A(F,r),_);
21if(t&&(N[w]={...t,...M("validate",t.message)},!o))return P(t.message),N}else if(a(A)){let t={};for(let n in A){if(!C(t)&&!o)break;let i=J(await A[n](F,r),_,n);i&&(t={...i,...M(n,i.message)},P(i.message),o&&(N[w]=t))}if(!C(t)&&(N[w]={ref:_,...t},!o))return N}}return P(!0),N};function ee(t,r){return[...t,...R(r)]}var et=t=>Array.isArray(t)?t.map(()=>{}):void 0;function er(t,r,o){return[...t.slice(0,r),...R(o),...t.slice(r)]}var eo=(t,r,o)=>Array.isArray(t)?(f(t[o])&&(t[o]=void 0),t.splice(o,0,t.splice(r,1)[0]),t):[];function en(t,r){return[...R(r),...R(t)]}var ei=(t,r)=>f(r)?[]:function(t,r){let o=0,n=[...t];for(let t of r)n.splice(t-o,1),o++;return p(n).length?n:[]}(t,R(r).sort((t,r)=>t-r)),es=(t,r,o)=>{t[r]=[t[o],t[o]=t[r]][0]};function ea(t,r){let o=Array.isArray(r)?r:T(r)?[r]:U(r),n=1===o.length?t:function(t,r){let o=r.slice(0,-1).length,n=0;for(;n<o;)t=f(t)?n++:t[r[n++]];return t}(t,o),i=o.length-1,s=o[i];return n&&delete n[s],0!==i&&(a(n)&&C(n)||Array.isArray(n)&&function(t){for(let r in t)if(t.hasOwnProperty(r)&&!f(t[r]))return!1;return!0}(n))&&ea(t,o.slice(0,-1)),t}var el=(t,r,o)=>(t[r]=o,t);function ec(){let t=[];return{get observers(){return t},next:r=>{for(let o of t)o.next&&o.next(r)},subscribe:r=>(t.push(r),{unsubscribe:()=>{t=t.filter(t=>t!==r)}}),unsubscribe:()=>{t=[]}}}var eu=t=>s(t)||"object"!=typeof t;function ed(t,r){if(eu(t)||eu(r))return t===r;if(i(t)&&i(r))return t.getTime()===r.getTime();let o=Object.keys(t),n=Object.keys(r);if(o.length!==n.length)return!1;for(let s of o){let o=t[s];if(!n.includes(s))return!1;if("ref"!==s){let t=r[s];if(i(o)&&i(t)||a(o)&&a(t)||Array.isArray(o)&&Array.isArray(t)?!ed(o,t):o!==t)return!1}}return!0}var ep=t=>H(t)&&t.isConnected,ef=t=>{for(let r in t)if($(t[r]))return!0;return!1};function eE(t,r={}){let o=Array.isArray(t);if(a(t)||o)for(let o in t)Array.isArray(t[o])||a(t[o])&&!ef(t[o])?(r[o]=Array.isArray(t[o])?[]:{},eE(t[o],r[o])):s(t[o])||(r[o]=!0);return r}var em=(t,r)=>(function t(r,o,n){let i=Array.isArray(r);if(a(r)||i)for(let i in r)Array.isArray(r[i])||a(r[i])&&!ef(r[i])?f(o)||eu(n[i])?n[i]=Array.isArray(r[i])?eE(r[i],[]):{...eE(r[i])}:t(r[i],s(o)?{}:o[i],n[i]):n[i]=!ed(r[i],o[i]);return n})(t,r,eE(r)),eh=(t,{valueAsNumber:r,valueAsDate:o,setValueAs:n})=>f(t)?t:r?""===t?NaN:t?+t:t:o&&"string"==typeof t?new Date(t):n?n(t):t;function ex(t){let r=t.ref;if(!(t.refs?t.refs.every(t=>t.disabled):r.disabled))return"file"===r.type?r.files:"radio"===r.type?Z(t.refs).value:"select-multiple"===r.type?[...r.selectedOptions].map(({value:t})=>
21t):"checkbox"===r.type?K(t.refs).value:eh(f(r.value)?t.ref.value:r.value,t)}var ey=t=>f(t)?t:t instanceof RegExp?t.source:a(t)?t.value instanceof RegExp?t.value.source:t.value:t;function eg(t,r,o){let n=E(t,o);if(n||T(o))return{error:n,name:o};let i=o.split(".");for(;i.length;){let n=i.join("."),s=E(r,n),a=E(t,n);if(s&&!Array.isArray(s)&&o!==n)break;if(a&&a.type)return{name:n,error:a};i.pop()}return{name:o}}let ev={mode:h.onSubmit,reValidateMode:h.onChange,shouldFocusError:!0};r.Controller=t=>t.render(M(t)),r.Form=function(t){let r=A(),[o,i]=n.default.useState(!1),{control:s=r.control,onSubmit:a,children:l,action:c,method:u="post",headers:d,encType:p,onError:f,render:m,onSuccess:h,validateStatus:x,...y}=t,g=async r=>{let o=!1,n="";await s.handleSubmit(async t=>{let i=new FormData,l="";try{l=JSON.stringify(t)}catch(t){}for(let r of s._names.mount)i.append(r,E(t,r));if(a&&await a({data:t,event:r,method:u,formData:i,formDataJson:l}),c)try{let t=[d&&d["Content-Type"],p].some(t=>t&&t.includes("json")),r=await fetch(c,{method:u,headers:{...d,...p?{"Content-Type":p}:{}},body:t?l:i});r&&(x?!x(r.status):r.status<200||r.status>=300)?(o=!0,f&&f({response:r}),n=String(r.status)):h&&h({response:r})}catch(t){o=!0,f&&f({error:t})}})(r),o&&t.control&&(t.control._subjects.state.next({isSubmitSuccessful:!1}),t.control.setError("root.server",{type:n}))};return n.default.useEffect(()=>{i(!0)},[]),m?n.default.createElement(n.default.Fragment,null,m({submit:g})):n.default.createElement("form",{noValidate:o,action:c,method:u,encType:p,onSubmit:g,...y},l)},r.FormProvider=t=>{let{children:r,...o}=t;return n.default.createElement(S.Provider,{value:o},r)},r.appendErrors=O,r.get=E,r.set=D,r.useController=M,r.useFieldArray=function(t){let r=A(),{control:o=r.control,name:i,keyName:s="id",shouldUnregister:a}=t,[l,c]=n.default.useState(o._getFieldArray(i)),u=n.default.useRef(o._getFieldArray(i).map(k)),p=n.default.useRef(l),f=n.default.useRef(i),m=n.default.useRef(!1);f.current=i,p.current=l,o._names.array.add(i),t.rules&&o.register(i,t.rules),F({next:({values:t,name:r})=>{if(r===f.current||!r){let r=E(t,f.current);Array.isArray(r)&&(c(r),u.current=r.map(k))}},subject:o._subjects.array});let x=n.default.useCallback(t=>{m.current=!0,o._updateFieldArray(i,t)},[o,i]);return n.default.useEffect(()=>{if(o._state.action=!1,B(i,o._names)&&o._subjects.state.next({...o._formState}),m.current&&(!q(o._options.mode).isOnSubmit||o._formState.isSubmitted))if(o._options.resolver)o._executeSchema([i]).then(t=>{let r=E(t.errors,i),n=E(o._formState.errors,i);(n?!r&&n.type||r&&(n.type!==r.type||n.message!==r.message):r&&r.type)&&(r?D(o._formState.errors,i,r):ea(o._formState.errors,i),o._subjects.state.next({errors:o._formState.errors}))});else{let t=E(o._fields,i);t&&t._f&&X(t,o._formValues,o._options.criteriaMode===h.all,o._options.shouldUseNativeValidation,!0).then(t=>!C(t)&&o._subjects.state.next({errors:j(o._formState.errors,t,i)}))}o._subjects.values.next({name:i,values:{...o._formValues}}),o._names.focus&&V(o._fields,t=>!!t&&t.startsWith(o._names.focus||"")),o._names.focus="",o._updateValid(),m.current=!1},[l,i,o]),n.default.useEffect(()=>(E(o._formValues,i)||o._updateFieldArray(i),()=>{(o._options.shouldUnregister||a)&&o.unregister(i)}),[i,o,s,a]),{swap:n.default.useCallback((t,r)=>{let n=o._getFieldArray(i);es(n,t,r),es(u.current,t,r),x(n),c(n),o._updateFieldArray(i,n,es,{argA:t,argB:r},!1)},[x,i,o]),move:n.default.useCallback((t,r)=>{let n=o._getFieldArray(i);eo(n,t,r),eo(u.current,t,r),x(n),c(n),o._updateFieldArray(i,n,eo,{argA:t,argB:r},!1)},[x,i,o]),prepend:n.default.useCallback((t,r)=>{let n=R(d(t)),s=en(o._getFieldArray(i),n);o._names.focus=L(i,0,r),u.current=en(u.current,n.map(k)),x(s),c(s),o._updateFieldArray(i,s,en,{argA:et(t)})},[x,i,o]),append:n.default.useCallback((t,r)=>{let n=R(d(t)),s=ee(o._getFieldArray(i),n);o._names.focus=L(i,s.length-1,r),u.current=ee(u.current,n.map(k)),x(s),c(s),o._updateFieldArray(i,s,ee,{argA:et(t)})},[x,i,o]),remove:n.default.useCallback(t=>{let r=ei(o._getFieldArray(i),t);u.current=ei(u.current,t),x(r),c(r),o._updateFieldArray(i,r,ei,{argA:t})},[x,i,o]),insert:n.default.useCallback((t,r,n)=>{let s=R(d(r)),a=er(o._getFieldArray(i),t,s);o._names.focus=L(i,t,n),u.current=er(u.current,t,s.map(k)),x(a),c(a),o._updateFieldArray(i,a,er,{argA:t,argB:et(r)})},[x,i,o]),update:n.default.useCallback((t,r)=>{let n=d(r),s=el(o._getFieldArray(i),t,n);u.current=[...s].map((r,o)=>r&&o!==t?u.current[o]:k()),x(s),c([...s]),o._updateFieldArray(i,s,el,{argA:t,argB:n},!0,!1)},[x,i,o]),replace:n.default.useCallback(t=>{let r=R(d(t));u.current=r.map(k),x([...r]),c([...r]),o._updateFieldArray(i,[...r],t=>t,{},!0,!1)},[x,i,o]),fields:n.default.useMemo(()=>l.map((t,r)=>({...t,[s]:u.current[r]||k()})),[l,s])}},r.useForm=function(t={}){let r=n.default.useRef(),o=n.default.useRef(),[x,y]=n.default.useState({isDirty:!1,isValidating:!1,isLoading:$(t.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},defaultValues:$(t.defaultValues)?void 0:t.defaultValues});r.current||(r.current={...function(t={},r){let o,n={...ev,...t},x={submitCount:0,isDirty:!1,isLoading:$(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{}},y={},g=(a(n.defaultValues)||a(n.values))&&d(n.defaultValues||n.values)||{},v=n.shouldUnregister?{}:d(g),S={action:!1,mount:!1,watch:!1},A={mount:new Set,unMount:new Set,array:new Set,watch:new Set},w=0,I={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},b={values:ec(),array:ec(),state:ec()},F=t.resetOptions&&t.resetOptions.keepDirtyValues,_=q(n.mode),N=q(n.reValidateMode),T=n.criteriaMode===h.all,U=async t=>{if(I.isValid||t){let t=n.resolver?C((await L()).errors):await z(y,!0);t!==x.isValid&&b.state.next({isValid:t})}},M=t=>I.isValidating&&b.state.next({isValidating:t}),O=(t,r,o,n)=>{let i=E(y,t);if(i){let s=E(v,t,f(o)?E(g,t):o);f(s)||n&&n.defaultChecked||r?D(v,t,r?s:ex(i._f)):K(t,s),S.mount&&U()}},k=(t,r,o,n,i)=>{let s=!1,a=!1,l={name:t};if(!o||n){I.isDirty&&(a=x.isDirty,x.isDirty=l.isDirty=W(),s=a!==l.isDirty);let o=ed(E(g,t),r);a=E(x.dirtyFields,t),o?ea(x.dirtyFields,t):D(x.dirtyFields,t,!0),l.dirtyFields=x.dirtyFields,s=s||I.dirtyFields&&!o!==a}if(o){let r=E(x.touchedFields,t);r||(D(x.touchedFields,t,o),l.touchedFields=x.touchedFields,s=s||I.touchedFields&&r!==o)}return s&&i&&b.state.next(l),s?l:{}},L=async t=>n.resolver(v,n.context,((t,r,o,n)=>{let i={};for(let o of t){let t=E(r,o);t&&D(i,o,t._f)}return{criteriaMode:o,names:[...t],fields:i,shouldUseNativeValidation:n}})(t||A.mount,y,n.criteriaMode,n.shouldUseNativeValidation)),z=async(t,r,o={valid:!0})=>{for(let i in t){let s=t[i];if(s){let{_f:t,...i}=s;
21if(t){let i=A.array.has(t.name),a=await X(s,v,T,n.shouldUseNativeValidation&&!r,i);if(a[t.name]&&(o.valid=!1,r))break;r||(E(a,t.name)?i?j(x.errors,a,t.name):D(x.errors,t.name,a[t.name]):ea(x.errors,t.name))}i&&await z(i,r,o)}}return o.valid},W=(t,r)=>(t&&r&&D(v,t,r),!ed(ee(),g)),G=(t,r,o)=>P(t,A,{...S.mount?v:f(r)?g:"string"==typeof t?{[t]:r}:r},o,r),K=(t,r,o={})=>{let n=E(y,t),i=r;if(n){let o=n._f;o&&(o.disabled||D(v,t,eh(r,o)),i=H(o.ref)&&s(r)?"":r,"select-multiple"===o.ref.type?[...o.ref.options].forEach(t=>t.selected=i.includes(t.value)):o.refs?"checkbox"===o.ref.type?o.refs.length>1?o.refs.forEach(t=>(!t.defaultChecked||!t.disabled)&&(t.checked=Array.isArray(i)?!!i.find(r=>r===t.value):i===t.value)):o.refs[0]&&(o.refs[0].checked=!!i):o.refs.forEach(t=>t.checked=t.value===i):"file"===o.ref.type?o.ref.value="":(o.ref.value=i,o.ref.type||b.values.next({name:t,values:{...v}})))}(o.shouldDirty||o.shouldTouch)&&k(t,i,o.shouldTouch,o.shouldDirty,!0),o.shouldValidate&&Q(t)},Y=(t,r,o)=>{for(let n in r){let s=r[n],a=`${t}.${n}`,l=E(y,a);!A.array.has(t)&&eu(s)&&(!l||l._f)||i(s)?K(a,s,o):Y(a,s,o)}},Z=(t,o,n={})=>{let i=E(y,t),a=A.array.has(t),l=d(o);D(v,t,l),a?(b.array.next({name:t,values:{...v}}),(I.isDirty||I.dirtyFields)&&n.shouldDirty&&b.state.next({name:t,dirtyFields:em(g,v),isDirty:W(t,l)})):!i||i._f||s(l)?K(t,l,n):Y(t,l,n),B(t,A)&&b.state.next({...x}),b.values.next({name:t,values:{...v}}),S.mount||r()},J=async r=>{let i=r.target,s=i.name,a=!0,c=E(y,s);if(c){let u,d,p,f,h,g=i.type?ex(c._f):l(r),S=r.type===m.BLUR||r.type===m.FOCUS_OUT,R=!((p=c._f).mount&&(p.required||p.min||p.max||p.maxLength||p.minLength||p.pattern||p.validate))&&!n.resolver&&!E(x.errors,s)&&!c._f.deps||(f=E(x.touchedFields,s),h=x.isSubmitted,!_.isOnAll&&(!h&&_.isOnTouch?!(f||S):(h?N.isOnBlur:_.isOnBlur)?!S:!(h?N.isOnChange:_.isOnChange)||S)),F=B(s,A,S);D(v,s,g),S?(c._f.onBlur&&c._f.onBlur(r),o&&o(0)):c._f.onChange&&c._f.onChange(r);let P=k(s,g,S,!1),O=!C(P)||F;if(S||b.values.next({name:s,type:r.type,values:{...v}}),R)return I.isValid&&U(),O&&b.state.next({name:s,...F?{}:P});if(!S&&F&&b.state.next({...x}),M(!0),n.resolver){let{errors:t}=await L([s]),r=eg(x.errors,y,s),o=eg(t,y,r.name||s);u=o.error,s=o.name,d=C(t)}else u=(await X(c,v,T,n.shouldUseNativeValidation))[s],(a=Number.isNaN(g)||g===E(v,s,g))&&(u?d=!1:I.isValid&&(d=await z(y,!0)));a&&(c._f.deps&&Q(c._f.deps),((r,n,i,s)=>{var a;let l=E(x.errors,r),c=I.isValid&&"boolean"==typeof n&&x.isValid!==n;if(t.delayError&&i?(a=()=>{D(x.errors,r,i),b.state.next({errors:x.errors})},(o=t=>{clearTimeout(w),w=setTimeout(a,t)})(t.delayError)):(clearTimeout(w),o=null,i?D(x.errors,r,i):ea(x.errors,r)),(i?!ed(l,i):l)||!C(s)||c){let t={...s,...c&&"boolean"==typeof n?{isValid:n}:{},errors:x.errors,name:r};x={...x,...t},b.state.next(t)}M(!1)})(s,d,u,P))}},Q=async(t,r={})=>{let o,i,s=R(t);if(M(!0),n.resolver){let r=await (async t=>{let{errors:r}=await L(t);if(t)for(let o of t){let t=E(r,o);t?D(x.errors,o,t):ea(x.errors,o)}else x.errors=r;return r})(f(t)?t:s);o=C(r),i=t?!s.some(t=>E(r,t)):o}else t?((i=(await Promise.all(s.map(async t=>{let r=E(y,t);return await z(r&&r._f?{[t]:r}:r)}))).every(Boolean))||x.isValid)&&U():i=o=await z(y);return b.state.next({..."string"!=typeof t||I.isValid&&o!==x.isValid?{}:{name:t},...n.resolver||!t?{isValid:o}:{},errors:x.errors,isValidating:!1}),r.shouldFocus&&!i&&V(y,t=>t&&E(x.errors,t),t?s:A.mount),i},ee=t=>{let r={...g,...S.mount?v:{}};return f(t)?r:"string"==typeof t?E(r,t):t.map(t=>E(r,t))},et=(t,r)=>({invalid:!!E((r||x).errors,t),isDirty:!!E((r||x).dirtyFields,t),isTouched:!!E((r||x).touchedFields,t),error:E((r||x).errors,t)}),er=(t,r,o)=>{let n=(E(y,t,{_f:{}})._f||{}).ref;D(x.errors,t,{...r,ref:n}),b.state.next({name:t,errors:x.errors,isValid:!1}),o&&o.shouldFocus&&n&&n.focus&&n.focus()},eo=(t,r={})=>{for(let o of t?R(t):A.mount)A.mount.delete(o),A.array.delete(o),r.keepValue||(ea(y,o),ea(v,o)),r.keepError||ea(x.errors,o),r.keepDirty||ea(x.dirtyFields,o),r.keepTouched||ea(x.touchedFields,o),n.shouldUnregister||r.keepDefaultValue||ea(g,o);b.values.next({values:{...v}}),b.state.next({...x,...r.keepDirty?{isDirty:W()}:{}}),r.keepIsValid||U()},en=({disabled:t,name:r,field:o,fields:n})=>{if("boolean"==typeof t){let i=t?void 0:E(v,r,ex(o?o._f:E(n,r)._f));
21D(v,r,i),k(r,i,!1,!1,!0)}},ei=(t,r={})=>{let o=E(y,t),i="boolean"==typeof r.disabled;return D(y,t,{...o||{},_f:{...o&&o._f?o._f:{ref:{name:t}},name:t,mount:!0,...r}}),A.mount.add(t),o?en({field:o,disabled:r.disabled,name:t}):O(t,!0,r.value),{...i?{disabled:r.disabled}:{},...n.progressive?{required:!!r.required,min:ey(r.min),max:ey(r.max),minLength:ey(r.minLength),maxLength:ey(r.maxLength),pattern:ey(r.pattern)}:{},name:t,onChange:J,onBlur:J,ref:i=>{if(i){let n;ei(t,r),o=E(y,t);let s=f(i.value)&&i.querySelectorAll&&i.querySelectorAll("input,select,textarea")[0]||i,a="radio"===(n=s).type||"checkbox"===n.type,l=o._f.refs||[];(a?l.find(t=>t===s):s===o._f.ref)||(D(y,t,{_f:{...o._f,...a?{refs:[...l.filter(ep),s,...Array.isArray(E(g,t))?[{}]:[]],ref:{type:s.type,name:t}}:{ref:s}}}),O(t,!1,void 0,s))}else(o=E(y,t,{}))._f&&(o._f.mount=!1),(n.shouldUnregister||r.shouldUnregister)&&(!c(A.array,t)||!S.action)&&A.unMount.add(t)}}},es=()=>n.shouldFocusError&&V(y,t=>t&&E(x.errors,t),A.mount),el=(t,r)=>async o=>{o&&(o.preventDefault&&o.preventDefault(),o.persist&&o.persist());let i=d(v);if(b.state.next({isSubmitting:!0}),n.resolver){let{errors:t,values:r}=await L();x.errors=t,i=r}else await z(y);ea(x.errors,"root"),C(x.errors)?(b.state.next({errors:{}}),await t(i,o)):(r&&await r({...x.errors},o),es(),setTimeout(es)),b.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:C(x.errors),submitCount:x.submitCount+1,errors:x.errors})},ef=(o,n={})=>{let i=o?d(o):g,s=d(i),a=o&&!C(o)?s:g;if(n.keepDefaultValues||(g=i),!n.keepValues){if(n.keepDirtyValues||F)for(let t of A.mount)E(x.dirtyFields,t)?D(a,t,E(v,t)):Z(t,E(a,t));else{if(u&&f(o))for(let t of A.mount){let r=E(y,t);if(r&&r._f){let t=Array.isArray(r._f.refs)?r._f.refs[0]:r._f.ref;if(H(t)){let r=t.closest("form");if(r){r.reset();break}}}}y={}}v=t.shouldUnregister?n.keepDefaultValues?d(g):{}:d(a),b.array.next({values:{...a}}),b.values.next({values:{...a}})}A={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},S.mount||r(),S.mount=!I.isValid||!!n.keepIsValid,S.watch=!!t.shouldUnregister,b.state.next({submitCount:n.keepSubmitCount?x.submitCount:0,isDirty:n.keepDirty?x.isDirty:!(!n.keepDefaultValues||ed(o,g)),isSubmitted:!!n.keepIsSubmitted&&x.isSubmitted,dirtyFields:n.keepDirtyValues?x.dirtyFields:n.keepDefaultValues&&o?em(g,o):{},touchedFields:n.keepTouched?x.touchedFields:{},errors:n.keepErrors?x.errors:{},isSubmitting:!1,isSubmitSuccessful:!1})},eE=(t,r)=>ef($(t)?t(v):t,r);return{control:{register:ei,unregister:eo,getFieldState:et,handleSubmit:el,setError:er,_executeSchema:L,_getWatch:G,_getDirty:W,_updateValid:U,_removeUnmounted:()=>{for(let t of A.unMount){let r=E(y,t);r&&(r._f.refs?r._f.refs.every(t=>!ep(t)):!ep(r._f.ref))&&eo(t)}A.unMount=new Set},_updateFieldArray:(t,r=[],o,n,i=!0,s=!0)=>{if(n&&o){if(S.action=!0,s&&Array.isArray(E(y,t))){let r=o(E(y,t),n.argA,n.argB);i&&D(y,t,r)}if(s&&Array.isArray(E(x.errors,t))){let r,s=o(E(x.errors,t),n.argA,n.argB);i&&D(x.errors,t,s),p(E(r=x.errors,t)).length||ea(r,t)}if(I.touchedFields&&s&&Array.isArray(E(x.touchedFields,t))){let r=o(E(x.touchedFields,t),n.argA,n.argB);i&&D(x.touchedFields,t,r)}I.dirtyFields&&(x.dirtyFields=em(g,v)),b.state.next({name:t,isDirty:W(t,r),dirtyFields:x.dirtyFields,errors:x.errors,isValid:x.isValid})}else D(v,t,r)},_updateDisabledField:en,_getFieldArray:r=>p(E(S.mount?v:g,r,t.shouldUnregister?E(g,r,[]):[])),_reset:ef,_resetDefaultValues:()=>$(n.defaultValues)&&n.defaultValues().then(t=>{eE(t,n.resetOptions),b.state.next({isLoading:!1})}),_updateFormState:t=>{x={...x,...t}},_subjects:b,_proxyFormState:I,get _fields(){return y},get _formValues(){return v},get _state(){return S},set _state(e){S=e},get _defaultValues(){return g},get _names(){return A},set _names(e){A=e},get _formState(){return x},set _formState(e){x=e},get _options(){return n},set _options(e){n={...n,...e}}},trigger:Q,register:ei,handleSubmit:el,watch:(t,r)=>$(t)?b.values.subscribe({next:o=>t(G(void 0,r),o)}):G(t,r,!0),setValue:Z,getValues:ee,reset:eE,resetField:(t,r={})=>{E(y,t)&&(f(r.defaultValue)?Z(t,E(g,t)):(Z(t,r.defaultValue),D(g,t,r.defaultValue)),r.keepTouched||ea(x.touchedFields,t),r.keepDirty||(ea(x.dirtyFields,t),x.isDirty=r.defaultValue?W(t,E(g,t)):W()),r.keepError||(ea(x.errors,t),I.isValid&&U()),b.state.next({...x}))},clearErrors:t=>{t&&R(t).forEach(t=>ea(x.errors,t)),b.state.next({errors:t?x.errors:{}})},unregister:eo,setError:er,setFocus:(t,r={})=>{let o=E(y,t),n=o&&o._f;if(n){let t=n.refs?n.refs[0]:n.ref;
21t.focus&&(t.focus(),r.shouldSelect&&t.select())}},getFieldState:et}}(t,()=>y(t=>({...t}))),formState:x});let g=r.current.control;return g._options=t,F({subject:g._subjects.state,next:t=>{I(t,g._proxyFormState,g._updateFormState,!0)&&y({...g._formState})}}),n.default.useEffect(()=>{t.values&&!ed(t.values,o.current)?(g._reset(t.values,g._options.resetOptions),o.current=t.values):g._resetDefaultValues()},[t.values,g]),n.default.useEffect(()=>{g._state.mount||(g._updateValid(),g._state.mount=!0),g._state.watch&&(g._state.watch=!1,g._subjects.state.next({...g._formState})),g._removeUnmounted()}),r.current.formState=w(x,g),r.current},r.useFormContext=A,r.useFormState=_,r.useWatch=N},78502:(t,r,o)=>{"use strict";o.d(r,{P:()=>f});var n=o(94570),i=o(16428),s=o(32923),a=o(26286),l=o(43452),c=o(84099),u=o(84175),d=o(44850),p=o(21061);async function f(t){let r=n.H.getConfig().Auth?.Cognito;(0,i.$y)(r);let{userPoolClientId:o,userPoolId:f}=r,{username:E,newPassword:m}=t;(0,l.M)(!!E,a.P.EmptyConfirmResetPasswordUsername),(0,l.M)(!!m,a.P.EmptyConfirmResetPasswordNewPassword);let h=t.confirmationCode;(0,l.M)(!!h,a.P.EmptyConfirmResetPasswordConfirmationCode);let x=t.options?.clientMetadata,y=(0,p.d)({username:E,userPoolId:f,userPoolClientId:o});await (0,c.tQ)({region:(0,u.J)(r.userPoolId),userAgentValue:(0,d.A)(s.BM.ConfirmResetPassword)},{Username:E,ConfirmationCode:h,Password:m,ClientMetadata:x,ClientId:r.userPoolClientId,UserContextData:y})}},83253:(t,r,o)=>{"use strict";function n(t,r){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),o.push.apply(o,n)}return o}function i(t){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?n(Object(o),!0).forEach(function(r){!function(t,r,o){var n;(r="symbol"==typeof(n=function(t,r){if("object"!=typeof t||!t)return t;var o=t[Symbol.toPrimitive];if(void 0!==o){var n=o.call(t,r||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(r,"string"))?n:String(n))in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o}(t,r,o[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):n(Object(o)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(o,r))})}return t}function s(t,r){var o={};for(var n in t)o[n]=r(t[n],n);return o}o.d(r,{c:()=>l});var a=(t,r,o)=>{for(var n of Object.keys(t)){var i;if(t[n]!==(null!=(i=r[n])?i:o[n]))return!1}return!0},l=t=>{var r=r=>{var o=t.defaultClassName,n=i(i({},t.defaultVariants),r);for(var s in n){var l,c=null!=(l=n[s])?l:t.defaultVariants[s];if(null!=c){var u=c;"boolean"==typeof u&&(u=!0===u?"true":"false");var d=t.variantClassNames[s][u];d&&(o+=" "+d)}}for(var[p,f]of t.compoundVariants)a(p,n,t.defaultVariants)&&(o+=" "+f);return o};return r.variants=()=>Object.keys(t.variantClassNames),r.classNames={get base(){return t.defaultClassName.split(" ")[0]},get variants(){return s(t.variantClassNames,t=>s(t,t=>t.split(" ")[0]))}},r}},85350:(t,r,o)=>{"use strict";o.d(r,{Y:()=>i});var n=o(34037);let i={convert(t,{urlSafe:r}={urlSafe:!1}){let o="string"==typeof t?t:Array.from(t,t=>String.fromCodePoint(t)).join(""),i=(0,n.xA)()(o);return r?i.replace(/\+/g,"-").replace(/\//g,"_"):i}}},89114:(t,r,o)=>{"use strict";o.d(r,{H:()=>l});var n=o(94570),i=o(16428),s=o(95275);let a=async t=>{var r;let o=t.getConfig().Auth?.Cognito;(0,i.$y)(o);let n=await t.Auth.getTokens({forceRefresh:!1});(0,s.H0)(n);let{"cognito:username":a,sub:l}=n.idToken?.payload??{},c={username:a,userId:l},u=(r=n,r?.signInDetails);return u&&(c.signInDetails=u),c},l=async()=>a(n.H)},96097:(t,r,o)=>{"use strict";o.d(r,{fs:()=>n,nC:()=>i,ut:()=>a});var n,i,s=o(26286);let a={[s.P.EmptyChallengeResponse]:{message:"challengeResponse is required to confirmSignIn"},[s.P.EmptyConfirmResetPasswordUsername]:{message:"username is required to confirmResetPassword"},[s.P.EmptyConfirmSignUpCode]:{message:"code is required to confirmSignUp"},[s.P.EmptyConfirmSignUpUsername]:{message:"username is required to confirmSignUp"},[s.P.EmptyConfirmResetPasswordConfirmationCode]:{message:"confirmationCode is required to confirmResetPassword"},[s.P.EmptyConfirmResetPasswordNewPassword]:{message:"newPassword is required to confirmResetPassword"},[s.P.EmptyResendSignUpCodeUsername]:{message:"username is required to confirmSignUp"},[s.P.EmptyResetPasswordUsername]:{message:"username is required to resetPassword"},[s.P.EmptySignInPassword]:{message:"password is required to signIn"},[s.P.EmptySignInUsername]:{message:"username is required to signIn"},[s.P.EmptySignUpPassword]:{message:"password is required to signUp"},[s.P.EmptySignUpUsername]:{message:"username is required to signUp"},[s.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."},[s.P.IncorrectMFAMethod]:{message:"Incorrect MFA method was chosen. It should be either SMS or TOTP",recoverySuggestion:"Try to pass TOTP or SMS as the challengeResponse"},[s.P.EmptyVerifyTOTPSetupCode]:{message:"code is required to verifyTotpSetup"},[s.P.EmptyUpdatePassword]:{message:"oldPassword and newPassword are required to changePassword"},[s.P.EmptyConfirmUserAttributeCode]:{message:"confirmation code is required to confirmUserAttribute"}};
21!function(t){t.DEFAULT_MSG="Authentication Error",t.EMPTY_EMAIL="Email cannot be empty",t.EMPTY_PHONE="Phone number cannot be empty",t.EMPTY_USERNAME="Username cannot be empty",t.INVALID_USERNAME="The username should either be a string or one of the sign in types",t.EMPTY_PASSWORD="Password cannot be empty",t.EMPTY_CODE="Confirmation code cannot be empty",t.SIGN_UP_ERROR="Error creating account",t.NO_MFA="No valid MFA method provided",t.INVALID_MFA="Invalid MFA type",t.EMPTY_CHALLENGE="Challenge response cannot be empty",t.NO_USER_SESSION="Failed to get the session because the user is empty",t.NETWORK_ERROR="Network Error",t.DEVICE_CONFIG="Device tracking has not been configured in this User Pool",t.AUTOSIGNIN_ERROR="Please use your credentials to sign in",t.OAUTH_ERROR="Couldn't finish OAuth flow, check your User Pool HostedUI settings"}(n||(n={})),function(t){t.SignInException="SignInException",t.OAuthSignInError="OAuthSignInException"}(i||(i={}))},96112:()=>{},99951:()=>{}}]); 22//# sourceMappingURL=79480-40e9b246343b5755.js.map 23//# debugId=4e0fb2ec-fc4c-5dad-b661-40e090ab9054
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.