@remit/web-client-dist 0.0.134 → 0.0.135

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/assets/{ComposeBody-Bb-eV7oX.js → ComposeBody-CXluR0mJ.js} +3 -3
  2. package/assets/{ErrorState-DaIYWAtU.js → ErrorState-xuU2Ycex.js} +1 -1
  3. package/assets/{OnboardingWizard-74ApF1TM.js → OnboardingWizard-DlBawZQa.js} +1 -1
  4. package/assets/{account-form-helpers-C1-XCp2v.js → account-form-helpers-C-R-t-TP.js} +1 -1
  5. package/assets/{accounts-BCrN_WZY.js → accounts-ADCcmorB.js} +1 -1
  6. package/assets/{advanced-hyewI6NP.js → advanced-CRu4UqDe.js} +1 -1
  7. package/assets/{appearance-CEbzMr1T.js → appearance-DDoSefIs.js} +1 -1
  8. package/assets/{avatar-WAi3XoGV.js → avatar-DO7vnPxY.js} +1 -1
  9. package/assets/{browser-ponyfill-odsmUzM4.js → browser-ponyfill-FuWjKEd5.js} +1 -1
  10. package/assets/{circle-check-Ccc0DpRT.js → circle-check-C86Aiiep.js} +1 -1
  11. package/assets/{download-B21Knqu2.js → download-C1F8f8Cm.js} +1 -1
  12. package/assets/filters-B-QK-_x9.js +1 -0
  13. package/assets/{flagged-CWyvtGeg.js → flagged-dNLl7pSz.js} +1 -1
  14. package/assets/{folder-DOSErHSR.js → folder-AERC-jiq.js} +1 -1
  15. package/assets/folders-D_SSE4kH.js +1 -0
  16. package/assets/index-CA8m1jib.js +1 -0
  17. package/assets/{index-ChxiTmNG.css → index-CIEsBq5i.css} +1 -1
  18. package/assets/index-DccQqmHT.js +295 -0
  19. package/assets/{index-DFY6-7Ge.js → index-Ds6rm6WR.js} +1 -1
  20. package/assets/{kbd-BKNut3M9.js → kbd-CJm0PdtR.js} +1 -1
  21. package/assets/mail-CGtAo1Ry.js +118 -0
  22. package/assets/{onboarding-yY91msSU.js → onboarding-Dd5aSsGp.js} +1 -1
  23. package/assets/{rotate-ccw-EQBbw3Gs.js → rotate-ccw-Vwe0kY7O.js} +1 -1
  24. package/assets/{senders-DKiu2US4.js → senders-d0E-TE0w.js} +1 -1
  25. package/assets/settings-epL7Dplk.js +1 -0
  26. package/assets/{settings-screen-6C3zeyy1.js → settings-screen-CGcJfaFe.js} +1 -1
  27. package/assets/{suggested-vips-BvoEfJ52.js → suggested-vips-DzhuY5XT.js} +1 -1
  28. package/assets/useCreateMailbox-C4OH6qHD.js +1 -0
  29. package/assets/{useDebouncedValue-C_J4lOpx.js → useDebouncedValue-DZZtIlXe.js} +1 -1
  30. package/assets/{useRulePreview-Ct7Q8uG2.js → useRulePreview-B7LWIphh.js} +1 -1
  31. package/assets/{useSignature-B22ZnEj4.js → useSignature-BuMCTh1I.js} +1 -1
  32. package/index.html +2 -2
  33. package/package.json +1 -1
  34. package/assets/filters-Tqa-_zb9.js +0 -1
  35. package/assets/folders-CLWqJfFM.js +0 -1
  36. package/assets/index-DsR4Mk7n.js +0 -295
  37. package/assets/index-aL9qdiwR.js +0 -1
  38. package/assets/mail-BMBn_nLi.js +0 -118
  39. package/assets/settings-BGBibXai.js +0 -1
@@ -0,0 +1,295 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mail-CGtAo1Ry.js","assets/useDebouncedValue-DZZtIlXe.js","assets/avatar-DO7vnPxY.js","assets/kbd-CJm0PdtR.js","assets/account-form-helpers-C-R-t-TP.js","assets/useSignature-BuMCTh1I.js","assets/useRulePreview-B7LWIphh.js","assets/ErrorState-xuU2Ycex.js","assets/format-B6Elex-n.js","assets/useCreateMailbox-C4OH6qHD.js","assets/rotate-ccw-Vwe0kY7O.js","assets/circle-check-C86Aiiep.js","assets/folder-AERC-jiq.js","assets/onboarding-Dd5aSsGp.js","assets/OnboardingWizard-DlBawZQa.js","assets/index-Ds6rm6WR.js","assets/flagged-dNLl7pSz.js","assets/accounts-ADCcmorB.js","assets/settings-screen-CGcJfaFe.js","assets/download-C1F8f8Cm.js","assets/advanced-CRu4UqDe.js","assets/appearance-DDoSefIs.js","assets/filters-B-QK-_x9.js","assets/folders-D_SSE4kH.js","assets/senders-d0E-TE0w.js"])))=>i.map(i=>d[i]);
2
+ function m6(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in t)){const o=Object.getOwnPropertyDescriptor(r,s);o&&Object.defineProperty(t,s,o.get?o:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();var Ug=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Va(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var $1={exports:{}},wf={};var $N;function Iq(){if($N)return wf;$N=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(r,s,o){var a=null;if(o!==void 0&&(a=""+o),s.key!==void 0&&(a=""+s.key),"key"in s){o={};for(var u in s)u!=="key"&&(o[u]=s[u])}else o=s;return s=o.ref,{$$typeof:t,type:r,key:a,ref:s!==void 0?s:null,props:o}}return wf.Fragment=e,wf.jsx=n,wf.jsxs=n,wf}var qN;function Oq(){return qN||(qN=1,$1.exports=Iq()),$1.exports}var I=Oq();const Nq="Logging",Mq="x-amz-user-agent",Pq="NoHubcallbackProvidedException";var ss;(function(t){t.DEBUG="DEBUG",t.ERROR="ERROR",t.INFO="INFO",t.WARN="WARN",t.VERBOSE="VERBOSE",t.NONE="NONE"})(ss||(ss={}));const WN={VERBOSE:1,DEBUG:2,INFO:3,WARN:4,ERROR:5,NONE:6};class sr{constructor(e,n=ss.WARN){this.name=e,this.level=n,this._pluggables=[]}_padding(e){return e<10?"0"+e:""+e}_ts(){const e=new Date;return[this._padding(e.getMinutes()),this._padding(e.getSeconds())].join(":")+"."+e.getMilliseconds()}configure(e){return e?(this._config=e,this._config):this._config}_log(e,...n){let r=this.level;sr.LOG_LEVEL&&(r=sr.LOG_LEVEL),typeof window<"u"&&window.LOG_LEVEL&&(r=window.LOG_LEVEL);const s=WN[r];if(!(WN[e]>=s))return;let a=console.log.bind(console);e===ss.ERROR&&console.error&&(a=console.error.bind(console)),e===ss.WARN&&console.warn&&(a=console.warn.bind(console)),sr.BIND_ALL_LOG_LEVELS&&(e===ss.INFO&&console.info&&(a=console.info.bind(console)),e===ss.DEBUG&&console.debug&&(a=console.debug.bind(console)));const u=`[${e}] ${this._ts()} ${this.name}`;let c="";if(n.length===1&&typeof n[0]=="string")c=`${u} - ${n[0]}`,a(c);else if(n.length===1)c=`${u} ${n[0]}`,a(u,n[0]);else if(typeof n[0]=="string"){let f=n.slice(1);f.length===1&&(f=f[0]),c=`${u} - ${n[0]} ${f}`,a(`${u} - ${n[0]}`,f)}else c=`${u} ${n}`,a(u,n);for(const f of this._pluggables){const h={message:c,timestamp:Date.now()};f.pushLogs([h])}}log(...e){this._log(ss.INFO,...e)}info(...e){this._log(ss.INFO,...e)}warn(...e){this._log(ss.WARN,...e)}error(...e){this._log(ss.ERROR,...e)}debug(...e){this._log(ss.DEBUG,...e)}verbose(...e){this._log(ss.VERBOSE,...e)}addPluggable(e){e&&e.getCategoryName()===Nq&&(this._pluggables.push(e),e.configure(this._config))}listPluggables(){return this._pluggables}}sr.LOG_LEVEL=null;sr.BIND_ALL_LOG_LEVELS=!1;class Hr extends Error{constructor({message:e,name:n,recoverySuggestion:r,underlyingError:s,metadata:o}){if(super(e),this.name=n,this.underlyingError=s,this.recoverySuggestion=r,o){const{extendedRequestId:a,httpStatusCode:u,requestId:c}=o;this.metadata={extendedRequestId:a,httpStatusCode:u,requestId:c}}this.constructor=Hr,Object.setPrototypeOf(this,Hr.prototype)}}var ka;(function(t){t.NoEndpointId="NoEndpointId",t.PlatformNotSupported="PlatformNotSupported",t.Unknown="Unknown",t.NetworkError="NetworkError"})(ka||(ka={}));const _y=(t,e=Hr)=>(n,r,s)=>{const{message:o,recoverySuggestion:a}=t[r];if(!n)throw new e({name:r,message:s?`${o} ${s}`:o,recoverySuggestion:a})},Ao=typeof Symbol<"u"?Symbol("amplify_default"):"@@amplify_default",xf=new sr("Hub");class v6{constructor(e){this.listeners=new Map,this.protectedChannels=["core","auth","api","analytics","interactions","pubsub","storage","ui","xr"],this.name=e}_remove(e,n){const r=this.listeners.get(e);if(!r){xf.warn(`No listeners for ${e}`);return}this.listeners.set(e,[...r.filter(({callback:s})=>s!==n)])}dispatch(e,n,r,s){typeof e=="string"&&this.protectedChannels.indexOf(e)>-1&&(s===Ao||xf.warn(`WARNING: ${e} is protected and dispatching on it can have unintended consequences`));const o={channel:e,payload:{...n},source:r,patternInfo:[]};try{this._toListeners(o)}catch(a){xf.error(a)}}listen(e,n,r="noname"){let s;if(typeof n!="function")throw new Hr({name:Pq,message:"No callback supplied to Hub"});s=n;let o=this.listeners.get(e);return o||(o=[],this.listeners.set(e,o)),o.push({name:r,callback:s}),()=>{this._remove(e,s)}}_toListeners(e){const{channel:n,payload:r}=e,s=this.listeners.get(n);s&&s.forEach(o=>{xf.debug(`Dispatching to ${n} with `,r);try{o.callback(e)}catch(a){xf.error(a)}})}}const To=new v6("__default__"),Sv=new v6("internal-hub"),zA=()=>{if(typeof window=="object"&&typeof window.crypto=="object")return window.crypto;if(typeof crypto=="object")return crypto;throw new Hr({name:"MissingPolyfill",message:"Cannot resolve the `crypto` function from the environment."})},kq=()=>{if(typeof window<"u"&&typeof window.btoa=="function")return window.btoa;if(typeof btoa=="function")return btoa;throw new Hr({name:"Base64EncoderError",message:"Cannot resolve the `btoa` function from the environment."})},Dq=()=>{if(typeof window<"u"&&typeof window.atob=="function")return window.atob;if(typeof atob=="function")return atob;throw new Hr({name:"Base64EncoderError",message:"Cannot resolve the `atob` function from the environment."})},jA={convert(t,e){let n=t;return e?.urlSafe&&(n=n.replace(/-/g,"+").replace(/_/g,"/")),Dq()(n)}};var Co;(function(t){t.AuthTokenConfigException="AuthTokenConfigException",t.AuthUserPoolAndIdentityPoolException="AuthUserPoolAndIdentityPoolException",t.AuthUserPoolException="AuthUserPoolException",t.InvalidIdentityPoolIdException="InvalidIdentityPoolIdException",t.OAuthNotConfigureException="OAuthNotConfigureException"})(Co||(Co={}));const Lq={[Co.AuthTokenConfigException]:{message:"Auth Token Provider not configured.",recoverySuggestion:"Make sure to call Amplify.configure in your app."},[Co.AuthUserPoolAndIdentityPoolException]:{message:"Auth UserPool or IdentityPool not configured.",recoverySuggestion:"Make sure to call Amplify.configure in your app with UserPoolId and IdentityPoolId."},[Co.AuthUserPoolException]:{message:"Auth UserPool not configured.",recoverySuggestion:"Make sure to call Amplify.configure in your app with userPoolId and userPoolClientId."},[Co.InvalidIdentityPoolIdException]:{message:"Invalid identity pool id provided.",recoverySuggestion:"Make sure a valid identityPoolId is given in the config."},[Co.OAuthNotConfigureException]:{message:"oauth param not configured.",recoverySuggestion:"Make sure to call Amplify.configure with oauth parameter in your app."}},BA=_y(Lq);function lt(t){let e=!0;t?e=!!t.userPoolId&&!!t.userPoolClientId:e=!1,BA(e,Co.AuthUserPoolException)}function Ay(t){const e=!!t?.loginWith?.oauth?.domain&&!!t?.loginWith?.oauth?.redirectSignOut&&!!t?.loginWith?.oauth?.redirectSignIn&&!!t?.loginWith?.oauth?.responseType;BA(e,Co.OAuthNotConfigureException)}function Wm(t){const e=!!t?.identityPoolId;BA(e,Co.InvalidIdentityPoolIdException)}function mi(t){const e=t.split(".");if(e.length!==3)throw new Error("Invalid token");try{const r=e[1].replace(/-/g,"+").replace(/_/g,"/"),s=decodeURIComponent(jA.convert(r).split("").map(a=>`%${`00${a.charCodeAt(0).toString(16)}`.slice(-2)}`).join("")),o=JSON.parse(s);return{toString:()=>t,payload:o}}catch{throw new Error("Invalid token payload")}}const y6=t=>{const e=Reflect.ownKeys(t);for(const n of e){const r=t[n];(r&&typeof r=="object"||typeof r=="function")&&y6(r)}return Object.freeze(t)},Uq=new sr("parseAWSExports"),Fq={API_KEY:"apiKey",AWS_IAM:"iam",AMAZON_COGNITO_USER_POOLS:"userPool",OPENID_CONNECT:"oidc",NONE:"none",AWS_LAMBDA:"lambda",LAMBDA:"lambda"},zq=(t={})=>{if(!Object.prototype.hasOwnProperty.call(t,"aws_project_region"))throw new Hr({name:"InvalidParameterException",message:"Invalid config parameter.",recoverySuggestion:"Ensure passing the config object imported from `amplifyconfiguration.json`."});const{aws_appsync_apiKey:e,aws_appsync_authenticationType:n,aws_appsync_graphqlEndpoint:r,aws_appsync_region:s,aws_bots_config:o,aws_cognito_identity_pool_id:a,aws_cognito_sign_up_verification_method:u,aws_cognito_mfa_configuration:c,aws_cognito_mfa_types:f,aws_cognito_password_protection_settings:h,aws_cognito_verification_mechanisms:g,aws_cognito_signup_attributes:m,aws_cognito_social_providers:y,aws_cognito_username_attributes:S,aws_mandatory_sign_in:E,aws_mobile_analytics_app_id:C,aws_mobile_analytics_app_region:w,aws_user_files_s3_bucket:x,aws_user_files_s3_bucket_region:T,aws_user_files_s3_dangerously_connect_to_http_endpoint_for_testing:R,aws_user_pools_id:M,aws_user_pools_web_client_id:N,geo:O,oauth:k,predictions:F,aws_cloud_logic_custom:$,Notifications:D,modelIntrospection:z}=t,q={};C&&(q.Analytics={Pinpoint:{appId:C,region:w}});const{InAppMessaging:K,Push:Y}=D??{};if(K?.AWSPinpoint||Y?.AWSPinpoint){if(K?.AWSPinpoint){const{appId:ee,region:oe}=K.AWSPinpoint;q.Notifications={InAppMessaging:{Pinpoint:{appId:ee,region:oe}}}}if(Y?.AWSPinpoint){const{appId:ee,region:oe}=Y.AWSPinpoint;q.Notifications={...q.Notifications,PushNotification:{Pinpoint:{appId:ee,region:oe}}}}}if(Array.isArray(o)&&(q.Interactions={LexV1:Object.fromEntries(o.map(ee=>[ee.name,ee]))}),r){const ee=Fq[n];ee||Uq.debug(`Invalid authentication type ${n}. Falling back to IAM.`),q.API={GraphQL:{endpoint:r,apiKey:e,region:s,defaultAuthMode:ee??"iam"}},z&&(q.API.GraphQL.modelIntrospection=z)}const H=c?{status:c&&c.toLowerCase(),totpEnabled:f?.includes("TOTP")??!1,smsEnabled:f?.includes("SMS")??!1}:void 0,te=h?{minLength:h.passwordPolicyMinLength,requireLowercase:h.passwordPolicyCharacters?.includes("REQUIRES_LOWERCASE")??!1,requireUppercase:h.passwordPolicyCharacters?.includes("REQUIRES_UPPERCASE")??!1,requireNumbers:h.passwordPolicyCharacters?.includes("REQUIRES_NUMBERS")??!1,requireSpecialCharacters:h.passwordPolicyCharacters?.includes("REQUIRES_SYMBOLS")??!1}:void 0,de=Array.from(new Set([...g??[],...m??[]])).reduce((ee,oe)=>({...ee,[oe.toLowerCase()]:{required:!0}}),{}),Ae=S?.includes("EMAIL")??!1,L=S?.includes("PHONE_NUMBER")??!1;(a||M)&&(q.Auth={Cognito:{identityPoolId:a,allowGuestAccess:E!=="enable",signUpVerificationMethod:u,userAttributes:de,userPoolClientId:N,userPoolId:M,mfa:H,passwordFormat:te,loginWith:{username:!(Ae||L),email:Ae,phone:L}}});const G=k?Object.keys(k).length>0:!1,Z=y?y.length>0:!1;if(q.Auth&&G&&(q.Auth.Cognito.loginWith={...q.Auth.Cognito.loginWith,oauth:{...jq(k),...Z&&{providers:Bq(y)}}}),x&&(q.Storage={S3:{bucket:x,region:T,dangerouslyConnectToHttpEndpointForTesting:R}}),O){const{amazon_location_service:ee}=O;q.Geo={LocationService:{maps:ee.maps,geofenceCollections:ee.geofenceCollections,searchIndices:ee.search_indices,region:ee.region}}}if($&&(q.API={...q.API,REST:$.reduce((ee,oe)=>{const{name:he,endpoint:ue,region:ve,service:xe}=oe;return{...ee,[he]:{endpoint:ue,...xe?{service:xe}:void 0,...ve?{region:ve}:void 0}}},{})}),F){const{VoiceId:ee}=F?.convert?.speechGenerator?.defaults??{};q.Predictions=ee?{...F,convert:{...F.convert,speechGenerator:{...F.convert.speechGenerator,defaults:{voiceId:ee}}}}:F}return q},VN=t=>t?.split(",")??[],jq=({domain:t,scope:e,redirectSignIn:n,redirectSignOut:r,responseType:s})=>({domain:t,scopes:e,redirectSignIn:VN(n),redirectSignOut:VN(r),responseType:s}),Bq=t=>t.map(e=>{const n=e.toLowerCase();return n.charAt(0).toUpperCase()+n.slice(1)}),b6=Symbol("oauth-listener"),er=[];for(let t=0;t<256;++t)er.push((t+256).toString(16).slice(1));function Hq(t,e=0){return(er[t[e+0]]+er[t[e+1]]+er[t[e+2]]+er[t[e+3]]+"-"+er[t[e+4]]+er[t[e+5]]+"-"+er[t[e+6]]+er[t[e+7]]+"-"+er[t[e+8]]+er[t[e+9]]+"-"+er[t[e+10]]+er[t[e+11]]+er[t[e+12]]+er[t[e+13]]+er[t[e+14]]+er[t[e+15]]).toLowerCase()}let q1;const $q=new Uint8Array(16);function qq(){if(!q1){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");q1=crypto.getRandomValues.bind(crypto)}return q1($q)}const Wq=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),GN={randomUUID:Wq};function Vq(t,e,n){if(GN.randomUUID&&!e&&!t)return GN.randomUUID();t=t||{};const r=t.random??t.rng?.()??qq();if(r.length<16)throw new Error("Random bytes length must be >= 16");if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,e){if(n=n||0,n<0||n+16>e.length)throw new RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let s=0;s<16;++s)e[n+s]=r[s];return e}return Hq(r)}function Gq(t){const{version:e}=t;return e?e.startsWith("1"):!1}function Kq(t){if(!t)return;const{bucket_name:e,aws_region:n,buckets:r}=t;return{S3:{bucket:e,region:n,buckets:r&&oW(r)}}}function Yq(t){if(!t)return;const{user_pool_id:e,user_pool_client_id:n,identity_pool_id:r,password_policy:s,mfa_configuration:o,mfa_methods:a,unauthenticated_identities_enabled:u,oauth:c,username_attributes:f,standard_required_attributes:h,groups:g,passwordless:m}=t,y={Cognito:{userPoolId:e,userPoolClientId:n,groups:g}};return r&&(y.Cognito={...y.Cognito,identityPoolId:r}),s&&(y.Cognito.passwordFormat={requireLowercase:s.require_lowercase,requireNumbers:s.require_numbers,requireUppercase:s.require_uppercase,requireSpecialCharacters:s.require_symbols,minLength:s.min_length??6}),o&&(y.Cognito.mfa={status:sW(o),smsEnabled:a?.includes("SMS"),totpEnabled:a?.includes("TOTP")}),u&&(y.Cognito.allowGuestAccess=u),c&&(y.Cognito.loginWith={oauth:{domain:c.domain,redirectSignIn:c.redirect_sign_in_uri,redirectSignOut:c.redirect_sign_out_uri,responseType:c.response_type==="token"?"token":"code",scopes:c.scopes,providers:rW(c.identity_providers)}}),f&&(y.Cognito.loginWith={...y.Cognito.loginWith,email:f.includes("email"),phone:f.includes("phone_number"),username:f.includes("username")}),h&&(y.Cognito.userAttributes=h.reduce((S,E)=>({...S,[E]:{required:!0}}),{})),m&&(y.Cognito.passwordless={emailOtpEnabled:m.email_otp_enabled,smsOtpEnabled:m.sms_otp_enabled,webAuthn:m.web_authn?{relyingPartyId:m.web_authn.relying_party_id,userVerification:m.web_authn.user_verification}:void 0,preferredChallenge:m.preferred_challenge}),y}function Zq(t){if(!t?.amazon_pinpoint)return;const{amazon_pinpoint:e}=t;return{Pinpoint:{appId:e.app_id,region:e.aws_region}}}function Xq(t){if(!t)return;const{aws_region:e,geofence_collections:n,maps:r,search_indices:s}=t;return{LocationService:{region:e,searchIndices:s,geofenceCollections:n,maps:r}}}function Qq(t){if(!t)return;const{aws_region:e,default_authorization_type:n,url:r,api_key:s,model_introspection:o}=t;return{GraphQL:{endpoint:r,defaultAuthMode:S6(n),region:e,apiKey:s,modelIntrospection:o}}}function Jq(t){if(!t?.events)return;const{url:e,aws_region:n,api_key:r,default_authorization_type:s}=t.events;return{Events:{endpoint:e,defaultAuthMode:S6(s),region:n,apiKey:r}}}function eW(t){if(!t)return;const{aws_region:e,channels:n,amazon_pinpoint_app_id:r}=t,s=n.includes("IN_APP_MESSAGING"),o=n.includes("APNS")||n.includes("FCM");if(!(s||o))return;const a={};return s&&(a.InAppMessaging={Pinpoint:{appId:r,region:e}}),o&&(a.PushNotification={Pinpoint:{appId:r,region:e}}),a}function tW(t){const e={};if(t.storage&&(e.Storage=Kq(t.storage)),t.auth&&(e.Auth=Yq(t.auth)),t.analytics&&(e.Analytics=Zq(t.analytics)),t.geo&&(e.Geo=Xq(t.geo)),t.data&&(e.API=Qq(t.data)),t.custom){const n=Jq(t.custom);n&&"Events"in n&&(e.API={...e.API,...n})}return t.notifications&&(e.Notifications=eW(t.notifications)),e}const nW={AMAZON_COGNITO_USER_POOLS:"userPool",API_KEY:"apiKey",AWS_IAM:"iam",AWS_LAMBDA:"lambda",OPENID_CONNECT:"oidc"};function S6(t){return nW[t]}const KN={GOOGLE:"Google",LOGIN_WITH_AMAZON:"Amazon",FACEBOOK:"Facebook",SIGN_IN_WITH_APPLE:"Apple"};function rW(t=[]){return t.reduce((e,n)=>(KN[n]!==void 0&&e.push(KN[n]),e),[])}function sW(t){return t==="OPTIONAL"?"optional":t==="REQUIRED"?"on":"off"}function oW(t){const e={};return t.forEach(({name:n,bucket_name:r,aws_region:s,paths:o})=>{if(n in e)throw new Error(`Duplicate friendly name found: ${n}. Name must be unique.`);const a=o?Object.entries(o).reduce((u,[c,f])=>(f!==void 0&&(u[c]=f),u),{}):void 0;e[n]={bucketName:r,region:s,paths:a}}),e}const E6=t=>Object.keys(t).some(e=>e.startsWith("aws_"))?zq(t):Gq(t)?tW(t):t;var YN=function(){return YN=Object.assign||function(e){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},YN.apply(this,arguments)};function nRe(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(t);s<r.length;s++)e.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(t,r[s])&&(n[r[s]]=t[r[s]]);return n}function iW(t,e,n,r){function s(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(h){try{f(r.next(h))}catch(g){a(g)}}function c(h){try{f(r.throw(h))}catch(g){a(g)}}function f(h){h.done?o(h.value):s(h.value).then(u,c)}f((r=r.apply(t,e||[])).next())})}function aW(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,s,o,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=u(0),a.throw=u(1),a.return=u(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(f){return function(h){return c([f,h])}}function c(f){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,f[0]&&(n=0)),n;)try{if(r=1,s&&(o=f[0]&2?s.return:f[0]?s.throw||((o=s.return)&&o.call(s),0):s.next)&&!(o=o.call(s,f[1])).done)return o;switch(s=0,o&&(f=[f[0]&2,o.value]),f[0]){case 0:case 1:o=f;break;case 4:return n.label++,{value:f[1],done:!1};case 5:n.label++,s=f[1],f=[0];continue;case 7:f=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(f[0]===6||f[0]===2)){n=0;continue}if(f[0]===3&&(!o||f[1]>o[0]&&f[1]<o[3])){n.label=f[1];break}if(f[0]===6&&n.label<o[1]){n.label=o[1],o=f;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(f);break}o[2]&&n.ops.pop(),n.trys.pop();continue}f=e.call(t,n)}catch(h){f=[6,h],s=0}finally{r=o=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}}function rRe(t,e,n){if(n||arguments.length===2)for(var r=0,s=e.length,o;r<s;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}var _s=64,lW=32,uW=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),cW=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],dW=Math.pow(2,53)-1,Vm=(function(){function t(){this.state=Int32Array.from(cW),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return t.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var n=0,r=e.byteLength;if(this.bytesHashed+=r,this.bytesHashed*8>dW)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;r>0;)this.buffer[this.bufferLength++]=e[n++],r--,this.bufferLength===_s&&(this.hashBuffer(),this.bufferLength=0)},t.prototype.digest=function(){if(!this.finished){var e=this.bytesHashed*8,n=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),r=this.bufferLength;if(n.setUint8(this.bufferLength++,128),r%_s>=_s-8){for(var s=this.bufferLength;s<_s;s++)n.setUint8(s,0);this.hashBuffer(),this.bufferLength=0}for(var s=this.bufferLength;s<_s-8;s++)n.setUint8(s,0);n.setUint32(_s-8,Math.floor(e/4294967296),!0),n.setUint32(_s-4,e),this.hashBuffer(),this.finished=!0}for(var o=new Uint8Array(lW),s=0;s<8;s++)o[s*4]=this.state[s]>>>24&255,o[s*4+1]=this.state[s]>>>16&255,o[s*4+2]=this.state[s]>>>8&255,o[s*4+3]=this.state[s]>>>0&255;return o},t.prototype.hashBuffer=function(){for(var e=this,n=e.buffer,r=e.state,s=r[0],o=r[1],a=r[2],u=r[3],c=r[4],f=r[5],h=r[6],g=r[7],m=0;m<_s;m++){if(m<16)this.temp[m]=(n[m*4]&255)<<24|(n[m*4+1]&255)<<16|(n[m*4+2]&255)<<8|n[m*4+3]&255;else{var y=this.temp[m-2],S=(y>>>17|y<<15)^(y>>>19|y<<13)^y>>>10;y=this.temp[m-15];var E=(y>>>7|y<<25)^(y>>>18|y<<14)^y>>>3;this.temp[m]=(S+this.temp[m-7]|0)+(E+this.temp[m-16]|0)}var C=(((c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7))+(c&f^~c&h)|0)+(g+(uW[m]+this.temp[m]|0)|0)|0,w=((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+(s&o^s&a^o&a)|0;g=h,h=f,f=c,c=u+C|0,u=a,a=o,o=s,s=C+w|0}r[0]+=s,r[1]+=o,r[2]+=a,r[3]+=u,r[4]+=c,r[5]+=f,r[6]+=h,r[7]+=g},t})();const fW=t=>new TextEncoder().encode(t);var hW=typeof Buffer<"u"&&Buffer.from?function(t){return Buffer.from(t,"utf8")}:fW;function C6(t){return t instanceof Uint8Array?t:typeof t=="string"?hW(t):ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(t)}function pW(t){return typeof t=="string"?t.length===0:t.byteLength===0}var Hl=(function(){function t(e){this.secret=e,this.hash=new Vm,this.reset()}return t.prototype.update=function(e){if(!(pW(e)||this.error))try{this.hash.update(C6(e))}catch(n){this.error=n}},t.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},t.prototype.digest=function(){return iW(this,void 0,void 0,function(){return aW(this,function(e){return[2,this.digestSync()]})})},t.prototype.reset=function(){if(this.hash=new Vm,this.secret){this.outer=new Vm;var e=gW(this.secret),n=new Uint8Array(_s);n.set(e);for(var r=0;r<_s;r++)e[r]^=54,n[r]^=92;this.hash.update(e),this.outer.update(n);for(var r=0;r<e.byteLength;r++)e[r]=0}},t})();function gW(t){var e=C6(t);if(e.byteLength>_s){var n=new Vm;n.update(e),e=n.digest()}var r=new Uint8Array(_s);return r.set(e),r}for(let t=0;t<256;t++){let e=t.toString(16).toLowerCase();e.length===1&&(e=`0${e}`)}var _n;(function(t){t.WebUnknown="0",t.React="1",t.NextJs="2",t.Angular="3",t.VueJs="4",t.Nuxt="5",t.Svelte="6",t.ServerSideUnknown="100",t.ReactSSR="101",t.NextJsSSR="102",t.AngularSSR="103",t.VueJsSSR="104",t.NuxtSSR="105",t.SvelteSSR="106",t.ReactNative="201",t.Expo="202"})(_n||(_n={}));var Is;(function(t){t.AI="ai",t.API="api",t.Auth="auth",t.Analytics="analytics",t.DataStore="datastore",t.Geo="geo",t.InAppMessaging="inappmessaging",t.Interactions="interactions",t.Predictions="predictions",t.PubSub="pubsub",t.PushNotification="pushnotification",t.Storage="storage"})(Is||(Is={}));var ii;(function(t){t.CreateConversation="1",t.GetConversation="2",t.ListConversations="3",t.DeleteConversation="4",t.SendMessage="5",t.ListMessages="6",t.OnMessage="7",t.Generation="8",t.UpdateConversation="9"})(ii||(ii={}));var ZN;(function(t){t.Record="1",t.IdentifyUser="2"})(ZN||(ZN={}));var XN;(function(t){t.GraphQl="1",t.Get="2",t.Post="3",t.Put="4",t.Patch="5",t.Del="6",t.Head="7"})(XN||(XN={}));var Ke;(function(t){t.SignUp="1",t.ConfirmSignUp="2",t.ResendSignUpCode="3",t.SignIn="4",t.FetchMFAPreference="6",t.UpdateMFAPreference="7",t.SetUpTOTP="10",t.VerifyTOTPSetup="11",t.ConfirmSignIn="12",t.DeleteUserAttributes="15",t.DeleteUser="16",t.UpdateUserAttributes="17",t.FetchUserAttributes="18",t.ConfirmUserAttribute="22",t.SignOut="26",t.UpdatePassword="27",t.ResetPassword="28",t.ConfirmResetPassword="29",t.FederatedSignIn="30",t.RememberDevice="32",t.ForgetDevice="33",t.FetchDevices="34",t.SendUserAttributeVerificationCode="35",t.SignInWithRedirect="36",t.StartWebAuthnRegistration="37",t.CompleteWebAuthnRegistration="38",t.ListWebAuthnCredentials="39",t.DeleteWebAuthnCredential="40"})(Ke||(Ke={}));var QN;(function(t){t.Subscribe="1",t.GraphQl="2"})(QN||(QN={}));var uh;(function(t){t.SearchByText="0",t.SearchByCoordinates="1",t.SearchForSuggestions="2",t.SearchByPlaceId="3",t.SaveGeofences="4",t.GetGeofence="5",t.ListGeofences="6",t.DeleteGeofences="7"})(uh||(uh={}));var Lx;(function(t){t.SyncMessages="1",t.IdentifyUser="2",t.NotifyMessageInteraction="3"})(Lx||(Lx={}));var JN;(function(t){t.None="0"})(JN||(JN={}));var eM;(function(t){t.Convert="1",t.Identify="2",t.Interpret="3"})(eM||(eM={}));var tM;(function(t){t.Subscribe="1"})(tM||(tM={}));var nM;(function(t){t.InitializePushNotifications="1",t.IdentifyUser="2"})(nM||(nM={}));var qs;(function(t){t.UploadData="1",t.DownloadData="2",t.List="3",t.Copy="4",t.Remove="5",t.GetProperties="6",t.GetUrl="7",t.GetDataAccess="8",t.ListCallerAccessGrants="9"})(qs||(qs={}));const mW="6.18.0",Ty=()=>typeof global<"u",ad=()=>typeof window<"u",w6=()=>typeof document<"u",HA=()=>typeof process<"u",wh=(t,e)=>!!Object.keys(t).find(n=>n.startsWith(e));var rM={};function vW(){const t=r=>r.startsWith("_react")||r.startsWith("__react"),e=r=>Object.keys(r).find(t),n=()=>Array.from(document.querySelectorAll("[id]"));return w6()&&n().some(e)}function yW(){return HA()&&typeof rM<"u"&&!!Object.keys(rM).find(t=>t.includes("react"))}function bW(){return ad()&&wh(window,"__VUE")}function SW(){return Ty()&&wh(global,"__VUE")}var sM={};function EW(){return ad()&&wh(window,"__SVELTE")}function CW(){return HA()&&typeof sM<"u"&&!!Object.keys(sM).find(t=>t.includes("svelte"))}function wW(){return ad()&&window.next&&typeof window.next=="object"}function xW(){return Ty()&&(wh(global,"__next")||wh(global,"__NEXT"))}function _W(){return ad()&&(window.__NUXT__!==void 0||window.$nuxt!==void 0)}function AW(){return Ty()&&typeof global.__NUXT_PATHS__<"u"}var oM={};function TW(){const t=!!(w6()&&document.querySelector("[ng-version]")),e=!!(ad()&&typeof window.ng<"u");return t||e}function RW(){return HA()&&typeof oM=="object"&&oM.npm_lifecycle_script?.startsWith("ng ")||!1}function IW(){return typeof navigator<"u"&&typeof navigator.product<"u"&&navigator.product==="ReactNative"}function OW(){return Ty()&&typeof global.expo<"u"}function NW(){return ad()}const MW=[{platform:_n.Expo,detectionMethod:OW},{platform:_n.ReactNative,detectionMethod:IW},{platform:_n.NextJs,detectionMethod:wW},{platform:_n.Nuxt,detectionMethod:_W},{platform:_n.Angular,detectionMethod:TW},{platform:_n.React,detectionMethod:vW},{platform:_n.VueJs,detectionMethod:bW},{platform:_n.Svelte,detectionMethod:EW},{platform:_n.WebUnknown,detectionMethod:NW},{platform:_n.NextJsSSR,detectionMethod:xW},{platform:_n.NuxtSSR,detectionMethod:AW},{platform:_n.ReactSSR,detectionMethod:yW},{platform:_n.VueJsSSR,detectionMethod:SW},{platform:_n.AngularSSR,detectionMethod:RW},{platform:_n.SvelteSSR,detectionMethod:CW}];function PW(){return MW.find(t=>t.detectionMethod())?.platform||_n.ServerSideUnknown}let ch;const W1=[];let Ux=!1;const kW=10,DW=10,LW=1e3,x6=()=>{if(!ch){if(ch=PW(),Ux)for(;W1.length;)W1.pop()?.();else W1.forEach(t=>{t()});iM(_n.ServerSideUnknown,kW),iM(_n.WebUnknown,DW)}return ch};function UW(){ch=void 0}function iM(t,e){ch===t&&!Ux&&setTimeout(()=>{UW(),Ux=!0,setTimeout(x6,LW)},e)}const ga={},ei=t=>{ga[t.category]=t.apis.reduce((r,s)=>({...r,[s]:{refCount:r[s]?.refCount?r[s].refCount+1:1,additionalDetails:t.additionalDetails}}),ga[t.category]??{});let e=!1;return()=>{e||(e=!0,t.apis.forEach(r=>{const s=ga[t.category][r].refCount;s>1?ga[t.category][r].refCount=s-1:(delete ga[t.category][r],Object.keys(ga[t.category]).length||delete ga[t.category])}))}},FW=(t,e)=>ga[t]?.[e]?.additionalDetails,zW="aws-amplify",jW=t=>t.replace(/\+.*/,""),BW=({category:t,action:e}={})=>{const n=[[zW,jW(mW)]];if(t&&n.push([t,e]),n.push(["framework",x6()]),t&&e){const r=FW(t,e);r&&r.forEach(s=>{n.push(s)})}return n},Ry=t=>BW(t).map(([r,s])=>r&&s?`${r}/${s}`:r).join(" "),Iy=()=>typeof window<"u"&&typeof window.document<"u",aM=new sr("Auth");class HW{configure(e,n){this.authConfig=e,this.authOptions=n,e&&e.Cognito?.userPoolEndpoint&&aM.warn(lM("Amazon Cognito User Pool")),e&&e.Cognito?.identityPoolEndpoint&&aM.warn(lM("Amazon Cognito Identity Pool"))}async fetchAuthSession(e={}){let n,r;const s=await this.getTokens(e);return s?(r=s.accessToken?.payload?.sub,n=await this.authOptions?.credentialsProvider?.getCredentialsAndIdentityId({authConfig:this.authConfig,tokens:s,authenticated:!0,forceRefresh:e.forceRefresh})):n=await this.authOptions?.credentialsProvider?.getCredentialsAndIdentityId({authConfig:this.authConfig,authenticated:!1,forceRefresh:e.forceRefresh}),{tokens:s,credentials:n?.credentials,identityId:n?.identityId,userSub:r}}async clearCredentials(){await this.authOptions?.credentialsProvider?.clearCredentialsAndIdentityId()}async getTokens(e){return await this.authOptions?.tokenProvider?.getTokens(e)??void 0}}const lM=t=>`You are using a custom Amazon ${t} endpoint, ensure the endpoint is correct.`;class $W{constructor(){this.oAuthListener=void 0,this.isConfigured=!1,this.resourcesConfig={},this.libraryOptions={},this.Auth=new HW}configure(e,n){const r=E6(e);this.resourcesConfig=r,n&&(this.libraryOptions=n),this.resourcesConfig=y6(this.resourcesConfig),this.Auth.configure(this.resourcesConfig.Auth,this.libraryOptions.Auth),(this.resourcesConfig.Analytics?.Pinpoint||this.resourcesConfig.Notifications?.InAppMessaging?.Pinpoint||this.resourcesConfig.Notifications?.PushNotification?.Pinpoint)&&console.warn("AWS will end support for Amazon Pinpoint on October 30, 2026. The guidance is to use AWS End User Messaging for push notifications and SMS, Amazon Simple Email Service for sending emails, Amazon Connect for campaigns, journeys, endpoints, and engagement analytics. Pinpoint recommends Amazon Kinesis for event collection and mobile analytics."),To.dispatch("core",{event:"configure",data:this.resourcesConfig},"Configure",Ao),this.notifyOAuthListener(),this.isConfigured=!0}getConfig(){return this.isConfigured||console.warn("Amplify has not been configured. Please call Amplify.configure() before using this service."),this.resourcesConfig}[b6](e){this.resourcesConfig.Auth?.Cognito.loginWith?.oauth?e(this.resourcesConfig.Auth?.Cognito):this.oAuthListener=e}notifyOAuthListener(){!this.resourcesConfig.Auth?.Cognito.loginWith?.oauth||!this.oAuthListener||(this.oAuthListener(this.resourcesConfig.Auth?.Cognito),this.oAuthListener=void 0)}}const $t=new $W,_6=(t,e)=>t.Auth.fetchAuthSession(e),Oy=t=>_6($t,t);function A6(){return $t.Auth.clearCredentials()}const Ny=t=>{const{headers:e,statusCode:n}=t;return{...qW(t)?t.$metadata:{},httpStatusCode:n,requestId:e["x-amzn-requestid"]??e["x-amzn-request-id"]??e["x-amz-request-id"],extendedRequestId:e["x-amz-id-2"],cfId:e["x-amz-cf-id"]}},qW=t=>typeof t?.$metadata=="object",ld=async t=>{if(!t||t.statusCode<300)return;const e=await ep(t),r=(a=>{const[u]=a.toString().split(/[,:]+/);return u.includes("#")?u.split("#")[1]:u})(t.headers["x-amzn-errortype"]??e.code??e.__type??"UnknownError"),s=e.message??e.Message??"Unknown error",o=new Error(s);return Object.assign(o,{name:r,$metadata:Ny(t)})},ep=async t=>{if(!t.body)throw new Error("Missing response payload");const e=await t.body.json();return Object.assign(e,{$metadata:Ny(t)})},In=(t,e,n,r)=>async(s,o)=>{const a={...r,...s},u=await a.endpointResolver(a,o),c=await e(o,u),f=await t(c,{...a});return n(f)},WW=300*1e3;function VW(t=WW){return r=>{const s=2**r*100+100*Math.random();return s>t?!1:s}}const T6=3,uM="amz-sdk-invocation-id",GW="amz-sdk-request",cM=300*1e3,R6=t=>{const n=VW(cM)(t);return n===!1?cM:n},KW=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch","BadRequestException"],YW=t=>!!t&&KW.includes(t),I6=t=>async(e,n)=>{const r=n??await t(e)??void 0,s=r?.code||r?.name,o=e?.statusCode;return{retryable:JW(n)||QW(o,s)||YW(s)||eV(o,s)}},ZW=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException"],XW=["TimeoutError","RequestTimeout","RequestTimeoutException"],QW=(t,e)=>t===429||!!e&&ZW.includes(e),JW=t=>[ka.NetworkError,"ERR_NETWORK"].includes(t?.name),eV=(t,e)=>!!t&&[500,502,503,504].includes(t)||!!e&&XW.includes(e),O6="cognito-identity",N6={service:O6,retryDecider:I6(ld),computeDelay:R6,cache:"no-store"},tV=({maxAttempts:t=T6,retryDecider:e,computeDelay:n,abortSignal:r})=>{if(t<1)throw new Error("maxAttempts must be greater than 0");return(s,o)=>async function(u){let c,f=o.attemptsCount??0,h;const g=()=>{if(h)return dM(h,f),h;throw dM(c,f),c};for(;!r?.aborted&&f<t;){try{h=await s(u),c=void 0}catch(S){c=S,h=void 0}f=(o.attemptsCount??0)>f?o.attemptsCount??0:f+1,o.attemptsCount=f;const{isCredentialsExpiredError:m,retryable:y}=await e(h,c,o);if(y){if(o.isCredentialsExpired=!!m,!r?.aborted&&f<t){const S=n(f);await nV(S,r)}continue}else return g()}if(r?.aborted)throw new Error("Request aborted.");return g()}},nV=(t,e)=>{if(e?.aborted)return Promise.resolve();let n,r;const s=new Promise(o=>{r=o,n=setTimeout(o,t)});return e?.addEventListener("abort",function o(a){clearTimeout(n),e?.removeEventListener("abort",o),r()}),s},dM=(t,e)=>{Object.prototype.toString.call(t)==="[object Object]"&&(t.$metadata={...t.$metadata??{},attempts:e})},rV=Vq,sV=()=>t=>async function(n){return n.headers[uM]||(n.headers[uM]=rV()),t(n)},oV=({maxAttempts:t=T6})=>(e,n)=>async function(s){const o=n.attemptsCount??0;return s.headers[GW]=`attempt=${o+1}; max=${t}`,e(s)},iV=({userAgentHeader:t="x-amz-user-agent",userAgentValue:e=""})=>n=>async function(s){if(e.trim().length===0)return await n(s);{const o=t.toLowerCase();return s.headers[o]=s.headers[o]?`${s.headers[o]} ${e}`:e,await n(s)}},$A=(t,e)=>(n,r)=>{const s={};let o=a=>t(a,r);for(let a=e.length-1;a>=0;a--){const u=e[a];o=u(r)(o,s)}return o(n)},V1=t=>{let e;return()=>(e||(e=t()),e)},aV=t=>!["HEAD","GET"].includes(t.toUpperCase()),lV=async({url:t,method:e,headers:n,body:r},{abortSignal:s,cache:o,withCrossDomainCredentials:a})=>{let u;try{u=await fetch(t,{method:e,headers:n,body:aV(e)?r:void 0,signal:s,cache:o,credentials:a?"include":"same-origin"})}catch(g){throw g instanceof TypeError?new Hr({name:ka.NetworkError,message:"A network error has occurred.",underlyingError:g}):g}const c={};u.headers?.forEach((g,m)=>{c[m.toLowerCase()]=g});const f={statusCode:u.status,headers:c,body:null},h=Object.assign(u.body??{},{text:V1(()=>u.text()),blob:V1(()=>u.blob()),json:V1(()=>u.json())});return{...f,body:h}},M6=$A(lV,[iV,sV,tV,oV]),uV=()=>t=>async function(n){return n.headers["cache-control"]="no-store",t(n)},P6=$A(M6,[uV]),k6=t=>(e,n)=>{const r=cV(t),s=JSON.stringify(e);return dV(n,r,s)},cV=t=>({"content-type":"application/x-amz-json-1.1","x-amz-target":`AWSCognitoIdentityService.${t}`}),dV=({url:t},e,n)=>({headers:e,url:t,body:n,method:"POST"}),fM=t=>In(P6,k6("GetCredentialsForIdentity"),fV,{...N6,...t,userAgentValue:Ry()}),fV=async t=>{if(t.statusCode>=300)throw await ld(t);const e=await ep(t);return{IdentityId:e.IdentityId,Credentials:hV(e.Credentials),$metadata:Ny(t)}},hV=({Expiration:t,...e}={})=>({...e,Expiration:t&&new Date(t*1e3)}),pV=t=>In(P6,k6("GetId"),gV,{...N6,...t,userAgentValue:Ry()}),gV=async t=>{if(t.statusCode>=300)throw await ld(t);return{IdentityId:(await ep(t)).IdentityId,$metadata:Ny(t)}},D6={id:"aws",outputs:{dnsSuffix:"amazonaws.com"},regionRegex:"^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$",regions:["aws-global"]},mV={partitions:[D6,{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn"},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:["aws-cn-global"]}]},L6=t=>{const{partitions:e}=mV;for(const{regions:n,outputs:r,regionRegex:s}of e){const o=new RegExp(s);if(n.includes(t)||o.test(t))return r.dnsSuffix}return D6.outputs.dnsSuffix},Ga=URL,vV=({region:t})=>({url:new Ga(`https://${O6}.${t}.${L6(t)}`)});class Kf extends Hr{constructor(){super({name:ka.PlatformNotSupported,message:"Function not supported on current platform"})}}class U6{constructor(e){this.storage=e}async setItem(e,n){if(!this.storage)throw new Kf;this.storage.setItem(e,n)}async getItem(e){if(!this.storage)throw new Kf;return this.storage.getItem(e)}async removeItem(e){if(!this.storage)throw new Kf;this.storage.removeItem(e)}async clear(){if(!this.storage)throw new Kf;this.storage.clear()}}class F6{constructor(){this.storage=new Map}get length(){return this.storage.size}key(e){return e>this.length-1?null:Array.from(this.storage.keys())[e]}setItem(e,n){this.storage.set(e,n)}getItem(e){return this.storage.get(e)??null}removeItem(e){this.storage.delete(e)}clear(){this.storage.clear()}}const z6=new sr("CoreStorageUtils"),yV=()=>{try{if(typeof window<"u"&&window.localStorage)return window.localStorage}catch{z6.info("localStorage not found. InMemoryStorage is used as a fallback.")}return new F6},j6=()=>{try{if(typeof window<"u"&&window.sessionStorage)return window.sessionStorage.getItem("test"),window.sessionStorage;throw new Error("sessionStorage is not defined")}catch{return z6.info("sessionStorage not found. InMemoryStorage is used as a fallback."),new F6}};class bV extends U6{constructor(){super(yV())}}class SV extends U6{constructor(){super(j6())}}class EV{constructor(e){this._storage=e}get storage(){if(!this._storage)throw new Kf;return this._storage}setItem(e,n){this.storage.setItem(e,n)}getItem(e){return this.storage.getItem(e)}removeItem(e){this.storage.removeItem(e)}clear(){this.storage.clear()}}class CV extends EV{constructor(){super(j6())}}function Fg(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)r!=="__proto__"&&(t[r]=n[r])}return t}var wV={read:function(t){return t[0]==='"'&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Fx(t,e){function n(s,o,a){if(!(typeof document>"u")){a=Fg({},e,a),typeof a.expires=="number"&&(a.expires=new Date(Date.now()+a.expires*864e5)),a.expires&&(a.expires=a.expires.toUTCString()),s=encodeURIComponent(s).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var u="";for(var c in a)a[c]&&(u+="; "+c,a[c]!==!0&&(u+="="+a[c].split(";")[0]));return document.cookie=s+"="+t.write(o,s)+u}}function r(s){if(!(typeof document>"u"||arguments.length&&!s)){for(var o=document.cookie?document.cookie.split("; "):[],a={},u=0;u<o.length;u++){var c=o[u].split("="),f=c.slice(1).join("=");try{var h=decodeURIComponent(c[0]);if(h in a||(a[h]=t.read(f,h)),s===h)break}catch{}}return s?a[s]:a}}return Object.create({set:n,get:r,remove:function(s,o){n(s,"",Fg({},o,{expires:-1}))},withAttributes:function(s){return Fx(this.converter,Fg({},this.attributes,s))},withConverter:function(s){return Fx(Fg({},this.converter,s),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(t)}})}var zg=Fx(wV,{path:"/"});class xV{constructor(e={}){const{path:n,domain:r,expires:s,sameSite:o,secure:a}=e;if(this.domain=r,this.path=n||"/",this.expires=Object.prototype.hasOwnProperty.call(e,"expires")?s:365,this.secure=Object.prototype.hasOwnProperty.call(e,"secure")?a:!0,Object.prototype.hasOwnProperty.call(e,"sameSite")){if(!o||!["strict","lax","none"].includes(o))throw new Error('The sameSite value of cookieStorage must be "lax", "strict" or "none".');if(o==="none"&&!this.secure)throw new Error("sameSite = None requires the Secure attribute in latest browser versions.");this.sameSite=o}}async setItem(e,n){zg.set(e,n,this.getData())}async getItem(e){return zg.get(e)??null}async removeItem(e){zg.remove(e,this.getData())}async clear(){const e=zg.get(),n=Object.keys(e).map(r=>this.removeItem(r));await Promise.all(n)}getData(){return{path:this.path,expires:this.expires,domain:this.domain,secure:this.secure,...this.sameSite&&{sameSite:this.sameSite}}}}const tp=new bV;new SV;const di=new CV,_V=new sr("I18n");let AV=class{constructor(){this._options=null,this._lang=null,this._dict={}}setDefaultLanguage(){!this._lang&&typeof window<"u"&&window&&window.navigator&&(this._lang=window.navigator.language),_V.debug(this._lang)}setLanguage(e){this._lang=e}get(e,n=void 0){if(this.setDefaultLanguage(),!this._lang)return typeof n<"u"?n:e;const r=this._lang;let s=this.getByLanguage(e,r);return s||(r.indexOf("-")>0&&(s=this.getByLanguage(e,r.split("-")[0])),s)?s:typeof n<"u"?n:e}getByLanguage(e,n,r=null){if(!n)return r;const s=this._dict[n];return s?s[e]:r}putVocabulariesForLanguage(e,n){let r=this._dict[e];r||(r=this._dict[e]={}),this._dict[e]={...r,...n}}putVocabularies(e){Object.keys(e).forEach(n=>{this.putVocabulariesForLanguage(n,e[n])})}};var xl;(function(t){t.NotConfigured="NotConfigured"})(xl||(xl={}));const TV={[xl.NotConfigured]:{message:"i18n is not configured."}},jg=_y(TV),hM=new sr("I18n");let Bg={language:null},js=null,B6=class El{static configure(e){return hM.debug("configure I18n"),e&&(Bg=Object.assign({},Bg,e.I18n||e),El.createInstance()),Bg}static getModuleName(){return"I18n"}static createInstance(){hM.debug("create I18n instance"),!js&&(js=new AV)}static setLanguage(e){El.checkConfig(),jg(!!js,xl.NotConfigured),js.setLanguage(e)}static get(e,n){return El.checkConfig(),jg(!!js,xl.NotConfigured),js.get(e,n)}static putVocabulariesForLanguage(e,n){El.checkConfig(),jg(!!js,xl.NotConfigured),js.putVocabulariesForLanguage(e,n)}static putVocabularies(e){El.checkConfig(),jg(!!js,xl.NotConfigured),js.putVocabularies(e)}static checkConfig(){return js||El.createInstance(),!0}};B6.createInstance();const RV=t=>{const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=[],r=new Uint8Array(t);zA().getRandomValues(r);for(const s of r)n.push(e[s%e.length]);return n.join("")};function IV(t){return(t.match(/.{2}/g)||[]).map(n=>String.fromCharCode(parseInt(n,16))).join("")}function OV(t){return t.split("").map(e=>e.charCodeAt(0).toString(16).padStart(2,"0")).join("")}const NV=t=>{let e;return async(...n)=>e||(e=new Promise((r,s)=>{t(...n).then(o=>{r(o)}).catch(o=>{s(o)}).finally(()=>{e=void 0})}),e)};function pM({expiresAt:t,clockDrift:e,tolerance:n=5e3}){return Date.now()+e+n>t}const MV=async()=>{const{userAgentData:t}=navigator;if(!t)return navigator.userAgent;const{platform:e="",platformVersion:n="",model:r="",architecture:s="",fullVersionList:o=[]}=await t.getHighEntropyValues(["platform","platformVersion","architecture","model","fullVersionList"]),a=o.map(c=>`${c.brand}/${c.version}`).join(";");return[e,n,s,r,e,a].filter(c=>c).join(" ")||navigator.userAgent};function PV(t){return Array.from(t,e=>String.fromCodePoint(e)).join("")}const Bc={convert(t,e={urlSafe:!1,skipPadding:!1}){const n=typeof t=="string"?t:PV(t);let r=kq()(n);return e.urlSafe&&(r=r.replace(/\+/g,"-").replace(/\//g,"_")),e.skipPadding&&(r=r.replace(/=/g,"")),r}};function kV(){return zA().getRandomValues(new Uint32Array(1))[0]}function DV(t){const{words:e}=t,{sigBytes:n}=t,r=[];for(let s=0;s<n;s++){const o=e[s>>>2]>>>24-s%4*8&255;r.push((o>>>4).toString(16)),r.push((o&15).toString(16))}return r.join("")}class qA{constructor(e,n){this.words=[];let r=e;r=this.words=r||[],n!==void 0?this.sigBytes=n:this.sigBytes=r.length*4}random(e){const n=[];for(let r=0;r<e;r+=4)n.push(kV());return new qA(n,e)}toString(){return DV(this)}}var Ge;(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",t.InvalidPreferredChallenge="InvalidPreferredChallenge"})(Ge||(Ge={}));const H6={[Ge.EmptyChallengeResponse]:{message:"challengeResponse is required to confirmSignIn"},[Ge.EmptyConfirmResetPasswordUsername]:{message:"username is required to confirmResetPassword"},[Ge.EmptyConfirmSignUpCode]:{message:"code is required to confirmSignUp"},[Ge.EmptyConfirmSignUpUsername]:{message:"username is required to confirmSignUp"},[Ge.EmptyConfirmResetPasswordConfirmationCode]:{message:"confirmationCode is required to confirmResetPassword"},[Ge.EmptyConfirmResetPasswordNewPassword]:{message:"newPassword is required to confirmResetPassword"},[Ge.EmptyResendSignUpCodeUsername]:{message:"username is required to confirmSignUp"},[Ge.EmptyResetPasswordUsername]:{message:"username is required to resetPassword"},[Ge.EmptySignInPassword]:{message:"password is required to signIn"},[Ge.EmptySignInUsername]:{message:"username is required to signIn"},[Ge.EmptySignUpPassword]:{message:"password is required to signUp"},[Ge.EmptySignUpUsername]:{message:"username is required to signUp"},[Ge.CustomAuthSignInPassword]:{message:"A password is not needed when signing in with CUSTOM_WITHOUT_SRP",recoverySuggestion:"Do not include a password in your signIn call."},[Ge.IncorrectMFAMethod]:{message:"Incorrect MFA method was chosen. It should be either SMS, TOTP, or EMAIL",recoverySuggestion:"Try to pass SMS, TOTP, or EMAIL as the challengeResponse"},[Ge.EmptyVerifyTOTPSetupCode]:{message:"code is required to verifyTotpSetup"},[Ge.EmptyUpdatePassword]:{message:"oldPassword and newPassword are required to changePassword"},[Ge.EmptyConfirmUserAttributeCode]:{message:"confirmation code is required to confirmUserAttribute"},[Ge.InvalidPreferredChallenge]:{message:"The preferred challenge is not enabled in your backend configuration",recoverySuggestion:"Ensure the authentication method is enabled in your Amplify backend configuration"}};var jn;(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"})(jn||(jn={}));var Ro;(function(t){t.SignInException="SignInException",t.OAuthSignInError="OAuthSignInException"})(Ro||(Ro={}));class Le extends Hr{constructor(e){super(e),this.constructor=Le,Object.setPrototypeOf(this,Le.prototype)}}function fn(t,e){const{message:n,recoverySuggestion:r}=H6[e];if(!t)throw new Le({name:e,message:n,recoverySuggestion:r})}function yt(t){const e=t?.split("_")[0];if(!t||t.indexOf("_")<0||!e||typeof e!="string")throw new Le({name:"InvalidUserPoolId",message:"Invalid user pool id provided."});return e}function zx(t){if(!t||!t.includes(":"))throw new Le({name:"InvalidIdentityPoolIdException",message:"Invalid identity pool id provided.",recoverySuggestion:"Make sure a valid identityPoolId is given in the config."});return t.split(":")[0]}function gM(t){return Object.entries(t).map(([e,n])=>({Name:e,Value:n}))}function LV(t){const e={};return t?.forEach(n=>{n.Name&&(e[n.Name]=n.Value)}),e}var mM;(function(t){t.ConcurrentModificationException="ConcurrentModificationException",t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidParameterException="InvalidParameterException",t.NotAuthorizedException="NotAuthorizedException",t.ResourceNotFoundException="ResourceNotFoundException",t.SoftwareTokenMFANotFoundException="SoftwareTokenMFANotFoundException"})(mM||(mM={}));var vM;(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"})(vM||(vM={}));var yM;(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"})(yM||(yM={}));var bM;(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"})(bM||(bM={}));var SM;(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"})(SM||(SM={}));var EM;(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"})(EM||(EM={}));var CM;(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"})(CM||(CM={}));var wM;(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"})(wM||(wM={}));var xM;(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"})(xM||(xM={}));var _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"})(_M||(_M={}));var AM;(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"})(AM||(AM={}));var TM;(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"})(TM||(TM={}));var RM;(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"})(RM||(RM={}));var IM;(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"})(IM||(IM={}));var Ev;(function(t){t.PasswordResetRequiredException="PasswordResetRequiredException",t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidLambdaResponseException="InvalidLambdaResponseException",t.InvalidParameterException="InvalidParameterException",t.InvalidSmsRoleAccessPolicyException="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"})(Ev||(Ev={}));var OM;(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"})(OM||(OM={}));var NM;(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"})(NM||(NM={}));var MM;(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"})(MM||(MM={}));var jx;(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"})(jx||(jx={}));var PM;(function(t){t.AliasExistsException="AliasExistsException",t.CodeDeliveryFailureException="CodeDeliveryFailureException",t.CodeMismatchException="CodeMismatchException",t.ExpiredCodeException="ExpiredCodeException",t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidEmailRoleAccessPolicyException="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"})(PM||(PM={}));var kM;(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"})(kM||(kM={}));var DM;(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"})(DM||(DM={}));var LM;(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"})(LM||(LM={}));var UM;(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"})(UM||(UM={}));const My="UserUnAuthenticatedException",UV="UserAlreadyAuthenticatedException",FV="DeviceMetadataNotFoundException",$6="AutoSignInException",zV="InvalidRedirectException",jV="InvalidAppSchemeException",BV="InvalidPreferredRedirectUrlException",HV=new Le({name:zV,message:"signInRedirect or signOutRedirect had an invalid format or was not found.",recoverySuggestion:"Please make sure the signIn/Out redirect in your oauth config is valid."});new Le({name:jV,message:"A valid non-http app scheme was not found in the config.",recoverySuggestion:"Please make sure a valid custom app scheme is present in the config."});new Le({name:BV,message:"The given preferredRedirectUrl does not match any items in the redirectSignOutUrls array from the config.",recoverySuggestion:"Please make sure a matching preferredRedirectUrl is provided."});const $V="InvalidOriginException",qV=new Le({name:$V,message:"redirect is coming from a different origin. The oauth flow needs to be initiated from the same origin",recoverySuggestion:"Please call signInWithRedirect from the same origin."}),WV="OAuthSignOutException",VV="TokenRefreshException",GV="UnexpectedSignInInterruptionException";function ud(t){if(!t||!t.accessToken)throw new Le({name:My,message:"User needs to be authenticated to call this API.",recoverySuggestion:"Sign in before calling this API again."})}function KV(t){if(!t||!t.idToken)throw new Le({name:My,message:"User needs to be authenticated to call this API.",recoverySuggestion:"Sign in before calling this API again."})}const YV=new Le({name:VV,message:`Token refresh is not supported when authenticated with the 'implicit grant' (token) oauth flow.
3
+ Please change your oauth configuration to use 'code grant' flow.`,recoverySuggestion:`Please logout and change your Amplify configuration to use "code grant" flow.
4
+ E.g { responseType: 'code' }`}),ZV=new Le({name:My,message:"User needs to be authenticated to call this API.",recoverySuggestion:"Sign in before calling this API again."});function q6(t){if(JV(t))throw YV;if(!QV(t))throw ZV}function W6(t){if(!t||!t.deviceKey||!t.deviceGroupKey||!t.randomPassword)throw new Le({name:FV,message:"Either deviceKey, deviceGroupKey or secretPassword were not found during the sign-in process.",recoverySuggestion:"Make sure to not clear storage after calling the signIn API."})}const XV={inflightOAuth:"inflightOAuth",oauthSignIn:"oauthSignIn",oauthPKCE:"oauthPKCE",oauthState:"oauthState"};function V6(t){return t?.accessToken||t?.idToken}function QV(t){return V6(t)&&t?.refreshToken}function JV(t){return V6(t)&&!t?.refreshToken}const eG=async t=>{const e=t.getConfig().Auth?.Cognito;lt(e);const n=await t.Auth.getTokens({forceRefresh:!1});ud(n);const{"cognito:username":r,sub:s}=n.idToken?.payload??{},o={username:r,userId:s},a=tG(n);return a&&(o.signInDetails=a),o};function tG(t){return t?.signInDetails}const Py=async()=>eG($t),Mt=(t,e)=>Ry({category:Is.Auth,action:t,...e}),Hn=t=>(e,n)=>{const r=nG(t),s=JSON.stringify(e);return rG(n,r,s)},nG=t=>({"content-type":"application/x-amz-json-1.1","x-amz-target":`AWSCognitoIdentityProviderService.${t}`}),rG=({url:t},e,n)=>({headers:e,url:t,body:n,method:"POST"});function Os(t){if(!t||t.name==="Error"||t instanceof TypeError)throw new Le({name:ka.Unknown,message:"An unknown error has occurred.",underlyingError:t})}const ar=()=>async t=>{if(t.statusCode>=300){const e=await ld(t);throw Os(e),new Le({name:e.name,message:e.message,metadata:e.$metadata})}return ep(t)},sG=()=>(t,e)=>async function(r){return r.headers={...r.headers,"cache-control":"no-store",...await $t.libraryOptions?.Auth?.headers?.()},t(r)},$n=$A(M6,[sG]),G6="cognito-idp",qn={service:G6,retryDecider:I6(ld),computeDelay:R6,get userAgentValue(){return Ry()},cache:"no-store"},np=t=>In($n,Hn("InitiateAuth"),ar(),{...qn,...t}),as=t=>In($n,Hn("RespondToAuthChallenge"),ar(),{...qn,...t}),oG=t=>In($n,Hn("VerifySoftwareToken"),ar(),{...qn,...t}),iG=t=>In($n,Hn("AssociateSoftwareToken"),ar(),{...qn,...t}),aG=({region:t})=>({url:new Ga(`https://${G6}.${t}.${L6(t)}`)}),bt=({endpointOverride:t})=>e=>t?{url:new Ga(t)}:aG(e),lG=t=>In($n,Hn("GetTokensFromRefreshToken"),ar(),{...qn,...t}),uG=async({tokens:t,authConfig:e,username:n,clientMetadata:r})=>{lt(e?.Cognito);const{userPoolId:s,userPoolClientId:o,userPoolEndpoint:a}=e.Cognito,u=yt(s);q6(t);const c=lG({endpointResolver:bt({endpointOverride:a})}),{AuthenticationResult:f}=await c({region:u},{ClientId:o,RefreshToken:t.refreshToken,DeviceKey:t.deviceMetadata?.deviceKey,ClientMetadata:r}),h=mi(f?.AccessToken??""),g=f?.IdToken?mi(f.IdToken):void 0,{iat:m}=h.payload;if(!m)throw new Le({name:"iatNotFoundException",message:"iat not found in access token"});const y=m*1e3-new Date().getTime();return{accessToken:h,idToken:g,clockDrift:y,refreshToken:f?.RefreshToken??t.refreshToken,username:n}},cG=NV(uG),dG={accessToken:"accessToken",idToken:"idToken",oidcProvider:"oidcProvider",clockDrift:"clockDrift",refreshToken:"refreshToken",deviceKey:"deviceKey",randomPasswordKey:"randomPasswordKey",deviceGroupKey:"deviceGroupKey",signInDetails:"signInDetails",oauthMetadata:"oauthMetadata"};var Cv;(function(t){t.InvalidAuthTokens="InvalidAuthTokens"})(Cv||(Cv={}));const fG={[Cv.InvalidAuthTokens]:{message:"Invalid tokens.",recoverySuggestion:"Make sure the tokens are valid."}},hG=_y(fG),FM="CognitoIdentityServiceProvider";class pG{getKeyValueStorage(){if(!this.keyValueStorage)throw new Le({name:"KeyValueStorageNotFoundException",message:"KeyValueStorage was not found in TokenStore"});return this.keyValueStorage}setKeyValueStorage(e){this.keyValueStorage=e}setAuthConfig(e){this.authConfig=e}async loadTokens(){try{const e=await this.getAuthKeys(),n=await this.getKeyValueStorage().getItem(e.accessToken);if(!n)throw new Le({name:"NoSessionFoundException",message:"Auth session was not found. Make sure to call signIn."});const r=mi(n),s=await this.getKeyValueStorage().getItem(e.idToken),o=s?mi(s):void 0,a=await this.getKeyValueStorage().getItem(e.refreshToken)??void 0,u=await this.getKeyValueStorage().getItem(e.clockDrift)??"0",c=Number.parseInt(u),f=await this.getKeyValueStorage().getItem(e.signInDetails),h={accessToken:r,idToken:o,refreshToken:a,deviceMetadata:await this.getDeviceMetadata()??void 0,clockDrift:c,username:await this.getLastAuthUser()};return f&&(h.signInDetails=JSON.parse(f)),h}catch{return null}}async storeTokens(e){hG(e!==void 0,Cv.InvalidAuthTokens);const n=e.username;await this.getKeyValueStorage().setItem(this.getLastAuthUserKey(),n);const r=await this.getAuthKeys();await this.getKeyValueStorage().setItem(r.accessToken,e.accessToken.toString()),e.idToken?await this.getKeyValueStorage().setItem(r.idToken,e.idToken.toString()):await this.getKeyValueStorage().removeItem(r.idToken),e.refreshToken?await this.getKeyValueStorage().setItem(r.refreshToken,e.refreshToken):await this.getKeyValueStorage().removeItem(r.refreshToken),e.deviceMetadata&&(e.deviceMetadata.deviceKey&&await this.getKeyValueStorage().setItem(r.deviceKey,e.deviceMetadata.deviceKey),e.deviceMetadata.deviceGroupKey&&await this.getKeyValueStorage().setItem(r.deviceGroupKey,e.deviceMetadata.deviceGroupKey),await this.getKeyValueStorage().setItem(r.randomPasswordKey,e.deviceMetadata.randomPassword)),e.signInDetails?await this.getKeyValueStorage().setItem(r.signInDetails,JSON.stringify(e.signInDetails)):await this.getKeyValueStorage().removeItem(r.signInDetails),await this.getKeyValueStorage().setItem(r.clockDrift,`${e.clockDrift}`)}async clearTokens(){const e=await this.getAuthKeys();await Promise.all([this.getKeyValueStorage().removeItem(e.accessToken),this.getKeyValueStorage().removeItem(e.idToken),this.getKeyValueStorage().removeItem(e.clockDrift),this.getKeyValueStorage().removeItem(e.refreshToken),this.getKeyValueStorage().removeItem(e.signInDetails),this.getKeyValueStorage().removeItem(this.getLastAuthUserKey()),this.getKeyValueStorage().removeItem(e.oauthMetadata)])}async getDeviceMetadata(e){const n=await this.getAuthKeys(e),r=await this.getKeyValueStorage().getItem(n.deviceKey),s=await this.getKeyValueStorage().getItem(n.deviceGroupKey),o=await this.getKeyValueStorage().getItem(n.randomPasswordKey);return o&&s&&r?{deviceKey:r,deviceGroupKey:s,randomPassword:o}:null}async clearDeviceMetadata(e){const n=await this.getAuthKeys(e);await Promise.all([this.getKeyValueStorage().removeItem(n.deviceKey),this.getKeyValueStorage().removeItem(n.deviceGroupKey),this.getKeyValueStorage().removeItem(n.randomPasswordKey)])}async getAuthKeys(e){lt(this.authConfig?.Cognito);const n=e??await this.getLastAuthUser();return gG(FM,`${this.authConfig.Cognito.userPoolClientId}.${n}`)}getLastAuthUserKey(){lt(this.authConfig?.Cognito);const e=this.authConfig.Cognito.userPoolClientId;return`${FM}.${e}.LastAuthUser`}async getLastAuthUser(){return await this.getKeyValueStorage().getItem(this.getLastAuthUserKey())??"username"}async setOAuthMetadata(e){const{oauthMetadata:n}=await this.getAuthKeys();await this.getKeyValueStorage().setItem(n,JSON.stringify(e))}async getOAuthMetadata(){const{oauthMetadata:e}=await this.getAuthKeys(),n=await this.getKeyValueStorage().getItem(e);return n&&JSON.parse(n)}}const gG=(t,e)=>WA(dG)(`${t}`,e);function WA(t){const e=Object.values({...t});return(n,r)=>e.reduce((s,o)=>({...s,[o]:`${n}.${r}.${o}`}),{})}const zM="amplify-signin-with-hostedUI",po="CognitoIdentityServiceProvider";class K6{constructor(e){this.keyValueStorage=e}async clearOAuthInflightData(){lt(this.cognitoConfig);const e=go(po,this.cognitoConfig.userPoolClientId);await Promise.all([this.keyValueStorage.removeItem(e.inflightOAuth),this.keyValueStorage.removeItem(e.oauthPKCE),this.keyValueStorage.removeItem(e.oauthState)])}async clearOAuthData(){lt(this.cognitoConfig);const e=go(po,this.cognitoConfig.userPoolClientId);return await this.clearOAuthInflightData(),await this.keyValueStorage.removeItem(zM),this.keyValueStorage.removeItem(e.oauthSignIn)}loadOAuthState(){lt(this.cognitoConfig);const e=go(po,this.cognitoConfig.userPoolClientId);return this.keyValueStorage.getItem(e.oauthState)}storeOAuthState(e){lt(this.cognitoConfig);const n=go(po,this.cognitoConfig.userPoolClientId);return this.keyValueStorage.setItem(n.oauthState,e)}loadPKCE(){lt(this.cognitoConfig);const e=go(po,this.cognitoConfig.userPoolClientId);return this.keyValueStorage.getItem(e.oauthPKCE)}storePKCE(e){lt(this.cognitoConfig);const n=go(po,this.cognitoConfig.userPoolClientId);return this.keyValueStorage.setItem(n.oauthPKCE,e)}setAuthConfig(e){this.cognitoConfig=e}async loadOAuthInFlight(){lt(this.cognitoConfig);const e=go(po,this.cognitoConfig.userPoolClientId);return await this.keyValueStorage.getItem(e.inflightOAuth)==="true"}async storeOAuthInFlight(e){lt(this.cognitoConfig);const n=go(po,this.cognitoConfig.userPoolClientId);await this.keyValueStorage.setItem(n.inflightOAuth,`${e}`)}async loadOAuthSignIn(){lt(this.cognitoConfig);const e=go(po,this.cognitoConfig.userPoolClientId),n=await this.keyValueStorage.getItem(zM),[r,s]=(await this.keyValueStorage.getItem(e.oauthSignIn))?.split(",")??[];return{isOAuthSignIn:r==="true"||n==="true",preferPrivateSession:s==="true"}}async storeOAuthSignIn(e,n=!1){lt(this.cognitoConfig);const r=go(po,this.cognitoConfig.userPoolClientId);await this.keyValueStorage.setItem(r.oauthSignIn,`${e},${n}`)}}const go=(t,e)=>WA(XV)(t,e),Fr=new K6(tp),Bx=[],mG=t=>{Bx.push(t)},Y6=()=>{for(;Bx.length;)Bx.pop()?.()};class vG{constructor(){this.waitForInflightOAuth=Iy()?async()=>{if(await Fr.loadOAuthInFlight())return this.inflightPromise?this.inflightPromise:(this.inflightPromise=new Promise((e,n)=>{mG(e)}),this.inflightPromise)}:async()=>{}}setAuthConfig(e){Fr.setAuthConfig(e.Cognito),this.authConfig=e}setTokenRefresher(e){this.tokenRefresher=e}setAuthTokenStore(e){this.tokenStore=e}getTokenStore(){if(!this.tokenStore)throw new Le({name:"EmptyTokenStoreException",message:"TokenStore not set"});return this.tokenStore}getTokenRefresher(){if(!this.tokenRefresher)throw new Le({name:"EmptyTokenRefresherException",message:"TokenRefresher not set"});return this.tokenRefresher}setClientMetadataProvider(e){this.clientMetadataProvider=e}async getTokens(e){let n;try{lt(this.authConfig?.Cognito)}catch{return null}await this.waitForInflightOAuth(),this.inflightPromise=void 0,n=await this.getTokenStore().loadTokens();const r=await this.getTokenStore().getLastAuthUser();if(n===null)return null;const s=!!n?.idToken&&pM({expiresAt:(n.idToken?.payload?.exp??0)*1e3,clockDrift:n.clockDrift??0}),o=pM({expiresAt:(n.accessToken?.payload?.exp??0)*1e3,clockDrift:n.clockDrift??0});return(e?.forceRefresh||s||o)&&(n=await this.refreshTokens({tokens:n,username:r,clientMetadata:e?.clientMetadata??await this.clientMetadataProvider?.()}),n===null)?null:{accessToken:n?.accessToken,idToken:n?.idToken,signInDetails:n?.signInDetails}}async refreshTokens({tokens:e,username:n,clientMetadata:r}){try{const{signInDetails:s}=e,o=await this.getTokenRefresher()({tokens:e,authConfig:this.authConfig,username:n,clientMetadata:r});return o.signInDetails=s,await this.setTokens({tokens:o}),To.dispatch("auth",{event:"tokenRefresh"},"Auth",Ao),o}catch(s){return this.handleErrors(s)}}handleErrors(e){if(Os(e),this.isAuthenticationError(e)&&this.clearTokens(),To.dispatch("auth",{event:"tokenRefresh_failure",data:{error:e}},"Auth",Ao),e.name.startsWith("NotAuthorizedException"))return null;throw e}isAuthenticationError(e){return["NotAuthorizedException","TokenRevokedException","UserNotFoundException","PasswordResetRequiredException","UserNotConfirmedException","RefreshTokenReuseException"].some(r=>e?.name?.startsWith?.(r))}async setTokens({tokens:e}){return this.getTokenStore().storeTokens(e)}async clearTokens(){return this.getTokenStore().clearTokens()}getDeviceMetadata(e){return this.getTokenStore().getDeviceMetadata(e)}clearDeviceMetadata(e){return this.getTokenStore().clearDeviceMetadata(e)}setOAuthMetadata(e){return this.getTokenStore().setOAuthMetadata(e)}getOAuthMetadata(){return this.getTokenStore().getOAuthMetadata()}}class yG{constructor(){this.authTokenStore=new pG,this.authTokenStore.setKeyValueStorage(tp),this.tokenOrchestrator=new vG,this.tokenOrchestrator.setAuthTokenStore(this.authTokenStore),this.tokenOrchestrator.setTokenRefresher(cG)}getTokens(e={}){return this.tokenOrchestrator.getTokens(e)}setKeyValueStorage(e){this.authTokenStore.setKeyValueStorage(e)}setClientMetadataProvider(e){this.tokenOrchestrator.setClientMetadataProvider(e)}setAuthConfig(e){this.authTokenStore.setAuthConfig(e),this.tokenOrchestrator.setAuthConfig(e)}}const Gm=new yG,{tokenOrchestrator:$r}=Gm;async function Ai(t){if(t.AccessToken){const e=mi(t.AccessToken),n=(e.payload.iat||0)*1e3,r=new Date().getTime(),s=n>0?n-r:0;let o,a,u;t.RefreshToken&&(a=t.RefreshToken),t.IdToken&&(o=mi(t.IdToken)),t?.NewDeviceMetadata&&(u=t.NewDeviceMetadata);const c={accessToken:e,idToken:o,refreshToken:a,clockDrift:s,deviceMetadata:u,username:t.username};t?.signInDetails&&(c.signInDetails=t.signInDetails),await $r.setTokens({tokens:c})}else throw new Hr({message:"Invalid tokens",name:"InvalidTokens",recoverySuggestion:"Check Cognito UserPool settings"})}const bG="Unable to get user session following successful sign-in.",Ka=async()=>{try{To.dispatch("auth",{event:"signedIn",data:await Py()},"Auth",Ao)}catch(t){throw t.name===My?new Le({name:GV,message:bG,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."}):t}};function Z6(){return{active:!1}}const SG=(t,e)=>{switch(e.type){case"SET_USERNAME":return{...t,username:e.value};case"SET_SESSION":return{...t,session:e.value};case"START":return{...t,active:!0};case"RESET":return Z6();default:return t}},EG=t=>{let e=t(Z6(),{type:"RESET"});return{getState:()=>e,dispatch:n=>{e=t(e,n)}}},Ta=EG(SG),CG=180*1e3,Hg="CognitoSignInState",fi={username:`${Hg}.username`,challengeName:`${Hg}.challengeName`,signInSession:`${Hg}.signInSession`,expiry:`${Hg}.expiry`},wG=(t,e)=>{switch(e.type){case"SET_SIGN_IN_SESSION":return $g({signInSession:e.value}),{...t,signInSession:e.value};case"SET_SIGN_IN_STATE":return $g(e.value),{...e.value};case"SET_CHALLENGE_NAME":return $g({challengeName:e.value}),{...t,challengeName:e.value};case"SET_USERNAME":return $g({username:e.value}),{...t,username:e.value};case"SET_INITIAL_STATE":return _G();case"RESET_STATE":return X6(),VA();default:return t}},xG=t=>{const e=Number(t),n=Date.now();return e<=n},Js=()=>{Io.dispatch({type:"RESET_STATE"})},X6=()=>{for(const t of Object.values(fi))di.removeItem(t)},VA=()=>({username:void 0,challengeName:void 0,signInSession:void 0}),_G=()=>{const t=di.getItem(fi.expiry);if(!t||xG(t))return X6(),VA();const e=di.getItem(fi.username)??void 0,n=di.getItem(fi.challengeName)??void 0,r=di.getItem(fi.signInSession)??void 0;return{username:e,challengeName:n,signInSession:r}},AG=t=>{let e=t(VA(),{type:"SET_INITIAL_STATE"});return{getState:()=>e,dispatch:n=>{e=t(e,n)}}},Io=AG(wG);function ru(t){Io.dispatch({type:"SET_SIGN_IN_STATE",value:t})}const $g=({challengeName:t,signInSession:e,username:n})=>{n&&di.setItem(fi.username,n),t&&di.setItem(fi.challengeName,t),e&&(di.setItem(fi.signInSession,e),di.setItem(fi.expiry,String(Date.now()+CG)))},jM="Passkeys may not be supported on this device. Ensure your application is running in a secure context (HTTPS) and Web Authentication API is supported.";class Rs extends Hr{constructor(e){super(e),this.constructor=Rs,Object.setPrototypeOf(this,Rs.prototype)}}var Bt;(function(t){t.PasskeyNotSupported="PasskeyNotSupported",t.PasskeyAlreadyExists="PasskeyAlreadyExists",t.InvalidPasskeyRegistrationOptions="InvalidPasskeyRegistrationOptions",t.InvalidPasskeyAuthenticationOptions="InvalidPasskeyAuthenticationOptions",t.RelyingPartyMismatch="RelyingPartyMismatch",t.PasskeyRegistrationFailed="PasskeyRegistrationFailed",t.PasskeyRetrievalFailed="PasskeyRetrievalFailed",t.PasskeyRegistrationCanceled="PasskeyRegistrationCanceled",t.PasskeyAuthenticationCanceled="PasskeyAuthenticationCanceled",t.PasskeyOperationAborted="PasskeyOperationAborted"})(Bt||(Bt={}));const G1="User may have canceled the ceremony or another interruption has occurred. Check underlying error for details.",BM="Ensure your user pool is configured to support the WEB_AUTHN as an authentication factor.",Hc={[Bt.PasskeyNotSupported]:{message:"Passkeys may not be supported on this device.",recoverySuggestion:jM},[Bt.InvalidPasskeyRegistrationOptions]:{message:"Invalid passkey registration options.",recoverySuggestion:BM},[Bt.InvalidPasskeyAuthenticationOptions]:{message:"Invalid passkey authentication options.",recoverySuggestion:BM},[Bt.PasskeyRegistrationFailed]:{message:"Device failed to create passkey.",recoverySuggestion:jM},[Bt.PasskeyRetrievalFailed]:{message:"Device failed to retrieve passkey.",recoverySuggestion:"Passkeys may not be available on this device. Try an alternative authentication factor like PASSWORD, EMAIL_OTP, or SMS_OTP."},[Bt.PasskeyAlreadyExists]:{message:"Passkey already exists in authenticator.",recoverySuggestion:"Proceed with existing passkey or try again after deleting the credential."},[Bt.PasskeyRegistrationCanceled]:{message:"Passkey registration ceremony has been canceled.",recoverySuggestion:G1},[Bt.PasskeyAuthenticationCanceled]:{message:"Passkey authentication ceremony has been canceled.",recoverySuggestion:G1},[Bt.PasskeyOperationAborted]:{message:"Passkey operation has been aborted.",recoverySuggestion:G1},[Bt.RelyingPartyMismatch]:{message:"Relying party does not match current domain.",recoverySuggestion:"Ensure relying party identifier matches current domain."}},cd=_y(Hc,Rs),Q6=t=>{if(t instanceof Error){if(t.name==="AbortError"){const{message:e,recoverySuggestion:n}=Hc[Bt.PasskeyOperationAborted];return new Rs({name:Bt.PasskeyOperationAborted,message:e,recoverySuggestion:n,underlyingError:t})}if(t.name==="SecurityError"){const{message:e,recoverySuggestion:n}=Hc[Bt.RelyingPartyMismatch];return new Rs({name:Bt.RelyingPartyMismatch,message:e,recoverySuggestion:n,underlyingError:t})}}return new Rs({name:ka.Unknown,message:"An unknown error has occurred.",underlyingError:t})},TG=t=>{if(t instanceof Rs)return t;if(t instanceof Error&&t.name==="NotAllowedError"){const{message:e,recoverySuggestion:n}=Hc[Bt.PasskeyAuthenticationCanceled];return new Rs({name:Bt.PasskeyAuthenticationCanceled,message:e,recoverySuggestion:n,underlyingError:t})}return Q6(t)},J6=()=>Iy()&&window.isSecureContext&&"credentials"in navigator&&typeof window.PublicKeyCredential=="function",wo=t=>Bc.convert(new Uint8Array(t),{urlSafe:!0,skipPadding:!0}),dh=t=>Uint8Array.from(jA.convert(t,{urlSafe:!0}),e=>e.charCodeAt(0)).buffer,RG=t=>{const e=dh(t.user.id),n=dh(t.challenge),r=(t.excludeCredentials||[]).map(s=>({...s,id:dh(s.id)}));return{...t,excludeCredentials:r,challenge:n,user:{...t.user,id:e}}},IG=t=>{const e={clientDataJSON:wo(t.response.clientDataJSON),attestationObject:wo(t.response.attestationObject),transports:t.response.getTransports(),publicKeyAlgorithm:t.response.getPublicKeyAlgorithm(),authenticatorData:wo(t.response.getAuthenticatorData())},n=t.response.getPublicKey();n&&(e.publicKey=wo(n));const r={type:t.type,id:t.id,rawId:wo(t.rawId),clientExtensionResults:t.getClientExtensionResults(),response:e};return t.authenticatorAttachment&&(r.authenticatorAttachment=t.authenticatorAttachment),r},OG=t=>{const e=dh(t.challenge),n=(t.allowCredentials||[]).map(r=>({...r,id:dh(r.id)}));return{...t,challenge:e,allowCredentials:n}},NG=t=>{const e={clientDataJSON:wo(t.response.clientDataJSON),authenticatorData:wo(t.response.authenticatorData),signature:wo(t.response.signature)};t.response.userHandle&&(e.userHandle=wo(t.response.userHandle));const n={id:t.id,rawId:wo(t.rawId),type:t.type,clientExtensionResults:t.getClientExtensionResults(),response:e};return t.authenticatorAttachment&&(n.authenticatorAttachment=t.authenticatorAttachment),n};function MG(t){cd([!!t,!!t?.challenge,!!t?.user,!!t?.rp,!!t?.pubKeyCredParams].every(Boolean),Bt.InvalidPasskeyRegistrationOptions)}function PG(t){cd(t&&t instanceof PublicKeyCredential&&t.response instanceof AuthenticatorAttestationResponse,Bt.PasskeyRegistrationFailed)}function kG(t){cd(t&&t instanceof PublicKeyCredential&&t.response instanceof AuthenticatorAssertionResponse,Bt.PasskeyRetrievalFailed)}const DG=async t=>{try{const e=J6();cd(e,Bt.PasskeyNotSupported);const n=OG(t),r=await navigator.credentials.get({publicKey:n});return kG(r),NG(r)}catch(e){throw TG(e)}},LG=t=>In($n,Hn("ConfirmDevice"),ar(),{...qn,...t}),Km={convert(t){return new TextEncoder().encode(t)}};function Ie(t,e){t!=null&&this.fromString(t,e)}function _r(){return new Ie(null,null)}let Oa;const UG=0xdeadbeefcafe,HM=(UG&16777215)===15715070;function FG(t,e,n,r,s,o){for(;--o>=0;){const a=e*this[t++]+n[r]+s;s=Math.floor(a/67108864),n[r++]=a&67108863}return s}function zG(t,e,n,r,s,o){const a=e&32767,u=e>>15;for(;--o>=0;){let c=this[t]&32767;const f=this[t++]>>15,h=u*c+f*a;c=a*c+((h&32767)<<15)+n[r]+(s&1073741823),s=(c>>>30)+(h>>>15)+u*f+(s>>>30),n[r++]=c&1073741823}return s}function jG(t,e,n,r,s,o){const a=e&16383,u=e>>14;for(;--o>=0;){let c=this[t]&16383;const f=this[t++]>>14,h=u*c+f*a;c=a*c+((h&16383)<<14)+n[r]+s,s=(c>>28)+(h>>14)+u*f,n[r++]=c&268435455}return s}const $M=typeof navigator<"u";$M&&HM&&navigator.appName==="Microsoft Internet Explorer"?(Ie.prototype.am=zG,Oa=30):$M&&HM&&navigator.appName!=="Netscape"?(Ie.prototype.am=FG,Oa=26):(Ie.prototype.am=jG,Oa=28);Ie.prototype.DB=Oa;Ie.prototype.DM=(1<<Oa)-1;Ie.prototype.DV=1<<Oa;const GA=52;Ie.prototype.FV=Math.pow(2,GA);Ie.prototype.F1=GA-Oa;Ie.prototype.F2=2*Oa-GA;const BG="0123456789abcdefghijklmnopqrstuvwxyz",ky=[];let dd,As;dd=48;for(As=0;As<=9;++As)ky[dd++]=As;dd=97;for(As=10;As<36;++As)ky[dd++]=As;dd=65;for(As=10;As<36;++As)ky[dd++]=As;function qM(t){return BG.charAt(t)}function HG(t,e){const n=ky[t.charCodeAt(e)];return n??-1}function $G(t){for(let e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s}function qG(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}function KA(t){const e=_r();return e.fromInt(t),e}function WG(t,e){let n;if(e===16)n=4;else if(e===8)n=3;else if(e===2)n=1;else if(e===32)n=5;else if(e===4)n=2;else throw new Error("Only radix 2, 4, 8, 16, 32 are supported");this.t=0,this.s=0;let r=t.length,s=!1,o=0;for(;--r>=0;){const a=HG(t,r);if(a<0){t.charAt(r)==="-"&&(s=!0);continue}s=!1,o===0?this[this.t++]=a:o+n>this.DB?(this[this.t-1]|=(a&(1<<this.DB-o)-1)<<o,this[this.t++]=a>>this.DB-o):this[this.t-1]|=a<<o,o+=n,o>=this.DB&&(o-=this.DB)}this.clamp(),s&&Ie.ZERO.subTo(this,this)}function VG(){const t=this.s&this.DM;for(;this.t>0&&this[this.t-1]==t;)--this.t}function GG(t){if(this.s<0)return"-"+this.negate().toString(t);let e;if(t==16)e=4;else if(t===8)e=3;else if(t===2)e=1;else if(t===32)e=5;else if(t===4)e=2;else throw new Error("Only radix 2, 4, 8, 16, 32 are supported");const n=(1<<e)-1;let r,s=!1,o="",a=this.t,u=this.DB-a*this.DB%e;if(a-- >0)for(u<this.DB&&(r=this[a]>>u)>0&&(s=!0,o=qM(r));a>=0;)u<e?(r=(this[a]&(1<<u)-1)<<e-u,r|=this[--a]>>(u+=this.DB-e)):(r=this[a]>>(u-=e)&n,u<=0&&(u+=this.DB,--a)),r>0&&(s=!0),s&&(o+=qM(r));return s?o:"0"}function KG(){const t=_r();return Ie.ZERO.subTo(this,t),t}function YG(){return this.s<0?this.negate():this}function ZG(t){let e=this.s-t.s;if(e!=0)return e;let n=this.t;if(e=n-t.t,e!=0)return this.s<0?-e:e;for(;--n>=0;)if((e=this[n]-t[n])!=0)return e;return 0}function YA(t){let e=1,n;return(n=t>>>16)!==0&&(t=n,e+=16),(n=t>>8)!==0&&(t=n,e+=8),(n=t>>4)!==0&&(t=n,e+=4),(n=t>>2)!==0&&(t=n,e+=2),(n=t>>1)!==0&&(t=n,e+=1),e}function XG(){return this.t<=0?0:this.DB*(this.t-1)+YA(this[this.t-1]^this.s&this.DM)}function QG(t,e){let n;for(n=this.t-1;n>=0;--n)e[n+t]=this[n];for(n=t-1;n>=0;--n)e[n]=0;e.t=this.t+t,e.s=this.s}function JG(t,e){for(let n=t;n<this.t;++n)e[n-t]=this[n];e.t=Math.max(this.t-t,0),e.s=this.s}function eK(t,e){const n=t%this.DB,r=this.DB-n,s=(1<<r)-1,o=Math.floor(t/this.DB);let a=this.s<<n&this.DM,u;for(u=this.t-1;u>=0;--u)e[u+o+1]=this[u]>>r|a,a=(this[u]&s)<<n;for(u=o-1;u>=0;--u)e[u]=0;e[o]=a,e.t=this.t+o+1,e.s=this.s,e.clamp()}function tK(t,e){e.s=this.s;const n=Math.floor(t/this.DB);if(n>=this.t){e.t=0;return}const r=t%this.DB,s=this.DB-r,o=(1<<r)-1;e[0]=this[n]>>r;for(let a=n+1;a<this.t;++a)e[a-n-1]|=(this[a]&o)<<s,e[a-n]=this[a]>>r;r>0&&(e[this.t-n-1]|=(this.s&o)<<s),e.t=this.t-n,e.clamp()}function nK(t,e){let n=0,r=0;const s=Math.min(t.t,this.t);for(;n<s;)r+=this[n]-t[n],e[n++]=r&this.DM,r>>=this.DB;if(t.t<this.t){for(r-=t.s;n<this.t;)r+=this[n],e[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<t.t;)r-=t[n],e[n++]=r&this.DM,r>>=this.DB;r-=t.s}e.s=r<0?-1:0,r<-1?e[n++]=this.DV+r:r>0&&(e[n++]=r),e.t=n,e.clamp()}function rK(t,e){const n=this.abs(),r=t.abs();let s=n.t;for(e.t=s+r.t;--s>=0;)e[s]=0;for(s=0;s<r.t;++s)e[s+n.t]=n.am(0,r[s],e,s,0,n.t);e.s=0,e.clamp(),this.s!==t.s&&Ie.ZERO.subTo(e,e)}function sK(t){const e=this.abs();let n=t.t=2*e.t;for(;--n>=0;)t[n]=0;for(n=0;n<e.t-1;++n){const r=e.am(n,e[n],t,2*n,0,1);(t[n+e.t]+=e.am(n+1,2*e[n],t,2*n+1,r,e.t-n-1))>=e.DV&&(t[n+e.t]-=e.DV,t[n+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(n,e[n],t,2*n,0,1)),t.s=0,t.clamp()}function oK(t,e,n){const r=t.abs();if(r.t<=0)return;const s=this.abs();if(s.t<r.t){e?.fromInt(0),n!=null&&this.copyTo(n);return}n===null&&(n=_r());const o=_r(),a=this.s,u=t.s,c=this.DB-YA(r[r.t-1]);c>0?(r.lShiftTo(c,o),s.lShiftTo(c,n)):(r.copyTo(o),s.copyTo(n));const f=o.t,h=o[f-1];if(h===0)return;const g=h*(1<<this.F1)+(f>1?o[f-2]>>this.F2:0),m=this.FV/g,y=(1<<this.F1)/g,S=1<<this.F2;let E=n.t,C=E-f;const w=e===null?_r():e;for(o.dlShiftTo(C,w),n.compareTo(w)>=0&&(n[n.t++]=1,n.subTo(w,n)),Ie.ONE.dlShiftTo(f,w),w.subTo(o,o);o.t<f;)o[o.t++]=0;for(;--C>=0;){let x=n[--E]===h?this.DM:Math.floor(n[E]*m+(n[E-1]+S)*y);if((n[E]+=o.am(0,x,n,C,0,f))<x)for(o.dlShiftTo(C,w),n.subTo(w,n);n[E]<--x;)n.subTo(w,n)}e!==null&&(n.drShiftTo(f,e),a!==u&&Ie.ZERO.subTo(e,e)),n.t=f,n.clamp(),c>0&&n.rShiftTo(c,n),a<0&&Ie.ZERO.subTo(n,n)}function iK(t){const e=_r();return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(Ie.ZERO)>0&&t.subTo(e,e),e}function aK(){if(this.t<1)return 0;const t=this[0];if((t&1)===0)return 0;let e=t&3;return e=e*(2-(t&15)*e)&15,e=e*(2-(t&255)*e)&255,e=e*(2-((t&65535)*e&65535))&65535,e=e*(2-t*e%this.DV)%this.DV,e>0?this.DV-e:-e}function lK(t){return this.compareTo(t)===0}function uK(t,e){let n=0,r=0;const s=Math.min(t.t,this.t);for(;n<s;)r+=this[n]+t[n],e[n++]=r&this.DM,r>>=this.DB;if(t.t<this.t){for(r+=t.s;n<this.t;)r+=this[n],e[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<t.t;)r+=t[n],e[n++]=r&this.DM,r>>=this.DB;r+=t.s}e.s=r<0?-1:0,r>0?e[n++]=r:r<-1&&(e[n++]=this.DV+r),e.t=n,e.clamp()}function cK(t){const e=_r();return this.addTo(t,e),e}function dK(t){const e=_r();return this.subTo(t,e),e}function fK(t){const e=_r();return this.multiplyTo(t,e),e}function hK(t){const e=_r();return this.divRemTo(t,e,null),e}function fd(t){this.m=t,this.mp=t.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}function pK(t){const e=_r();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(Ie.ZERO)>0&&this.m.subTo(e,e),e}function gK(t){const e=_r();return t.copyTo(e),this.reduce(e),e}function mK(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(let e=0;e<this.m.t;++e){let n=t[e]&32767;const r=n*this.mpl+((n*this.mph+(t[e]>>15)*this.mpl&this.um)<<15)&t.DM;for(n=e+this.m.t,t[n]+=this.m.am(0,r,t,e,0,this.m.t);t[n]>=t.DV;)t[n]-=t.DV,t[++n]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)}function vK(t,e){t.squareTo(e),this.reduce(e)}function yK(t,e,n){t.multiplyTo(e,n),this.reduce(n)}fd.prototype.convert=pK;fd.prototype.revert=gK;fd.prototype.reduce=mK;fd.prototype.mulTo=yK;fd.prototype.sqrTo=vK;function bK(t,e,n){let r=t.bitLength(),s,o=KA(1);const a=new fd(e);if(r<=0)return o;r<18?s=1:r<48?s=3:r<144?s=4:r<768?s=5:s=6;const u=[];let c=3;const f=s-1,h=(1<<s)-1;if(u[1]=a.convert(this),s>1){const w=_r();for(a.sqrTo(u[1],w);c<=h;)u[c]=_r(),a.mulTo(w,u[c-2],u[c]),c+=2}let g=t.t-1,m,y=!0,S=_r(),E;for(r=YA(t[g])-1;g>=0;){for(r>=f?m=t[g]>>r-f&h:(m=(t[g]&(1<<r+1)-1)<<f-r,g>0&&(m|=t[g-1]>>this.DB+r-f)),c=s;(m&1)===0;)m>>=1,--c;if((r-=c)<0&&(r+=this.DB,--g),y)u[m].copyTo(o),y=!1;else{for(;c>1;)a.sqrTo(o,S),a.sqrTo(S,o),c-=2;c>0?a.sqrTo(o,S):(E=o,o=S,S=E),a.mulTo(S,u[m],o)}for(;g>=0&&(t[g]&1<<r)===0;)a.sqrTo(o,S),E=o,o=S,S=E,--r<0&&(r=this.DB-1,--g)}const C=a.revert(o);return n(null,C),C}Ie.prototype.copyTo=$G;Ie.prototype.fromInt=qG;Ie.prototype.fromString=WG;Ie.prototype.clamp=VG;Ie.prototype.dlShiftTo=QG;Ie.prototype.drShiftTo=JG;Ie.prototype.lShiftTo=eK;Ie.prototype.rShiftTo=tK;Ie.prototype.subTo=nK;Ie.prototype.multiplyTo=rK;Ie.prototype.squareTo=sK;Ie.prototype.divRemTo=oK;Ie.prototype.invDigit=aK;Ie.prototype.addTo=uK;Ie.prototype.toString=GG;Ie.prototype.negate=KG;Ie.prototype.abs=YG;Ie.prototype.compareTo=ZG;Ie.prototype.bitLength=XG;Ie.prototype.mod=iK;Ie.prototype.equals=lK;Ie.prototype.add=cK;Ie.prototype.subtract=dK;Ie.prototype.multiply=fK;Ie.prototype.divide=hK;Ie.prototype.modPow=bK;Ie.ZERO=KA(0);Ie.ONE=KA(1);const SK=async({a:t,g:e,k:n,x:r,B:s,N:o,U:a})=>new Promise((u,c)=>{e.modPow(r,o,(f,h)=>{if(f){c(f);return}s.subtract(n.multiply(h)).modPow(t.add(a.multiply(r)),o,(g,m)=>{if(g){c(g);return}u(m.mod(o))})})}),EK="FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF",e8={},Hx={};for(let t=0;t<256;t++){let e=t.toString(16).toLowerCase();e.length===1&&(e=`0${e}`),e8[t]=e,Hx[e]=t}const $c=t=>{if(t.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const e=new Uint8Array(t.length/2);for(let n=0;n<t.length;n+=2){const r=t.slice(n,n+2).toLowerCase();if(r in Hx)e[n/2]=Hx[r];else throw new Error(`Cannot decode unrecognized sequence ${r} as hexadecimal`)}return e},ZA=t=>{let e="";for(let n=0;n<t.byteLength;n++)e+=e8[t[n]];return e},$x=t=>{const e=new Hl;e.update(t);const n=e.digestSync(),r=ZA(n);return new Array(64-r.length).join("0")+r},Ym=t=>$x($c(t)),CK=/^[89a-f]/i,ai=t=>{if(!(t instanceof Ie))throw new Error("Not a BigInteger");const e=t.compareTo(Ie.ZERO)<0;let n=t.abs().toString(16);if(n=n.length%2!==0?`0${n}`:n,n=CK.test(n)?`00${n}`:n,e){const r=n.split("").map(o=>{const a=~parseInt(o,16)&15;return"0123456789ABCDEF".charAt(a)}).join("");n=new Ie(r,16).add(Ie.ONE).toString(16),n.toUpperCase().startsWith("FF8")&&(n=n.substring(2))}return n},wK=({A:t,B:e})=>{const n=new Ie(Ym(ai(t)+ai(e)),16);if(n.equals(Ie.ZERO))throw new Error("U cannot be zero.");return n},xK=(t,e,n)=>{const r=new Hl(e);r.update(t);const s=r.digestSync(),o=new Hl(s);return o.update(n),o.digestSync().slice(0,16)},XA=t=>{const e=new qA().random(t).toString();return $c(e)},_K=()=>Bc.convert(XA(40));class AK{constructor({userPoolName:e,a:n,g:r,A:s,N:o}){this.encoder=Km,this.userPoolName=e,this.a=n,this.g=r,this.A=s,this.N=o,this.k=new Ie(Ym(`${ai(o)}${ai(r)}`),16)}getRandomPassword(){if(!this.randomPassword)throw new Le({name:"EmptyBigIntegerRandomPassword",message:"random password is empty"});return this.randomPassword}getSaltToHashDevices(){if(!this.saltToHashDevices)throw new Le({name:"EmptyBigIntegersaltToHashDevices",message:"saltToHashDevices is empty"});return this.saltToHashDevices}getVerifierDevices(){if(!this.verifierDevices)throw new Le({name:"EmptyBigIntegerVerifierDevices",message:"verifyDevices is empty"});return this.verifierDevices}async generateHashDevice(e,n){this.randomPassword=_K();const r=`${e}${n}:${this.randomPassword}`,s=$x(r),o=ZA(XA(16));return this.saltToHashDevices=ai(new Ie(o,16)),new Promise((a,u)=>{this.g.modPow(new Ie(Ym(this.saltToHashDevices+s),16),this.N,(c,f)=>{if(c){u(c);return}this.verifierDevices=ai(f),a()})})}async getPasswordAuthenticationKey({username:e,password:n,serverBValue:r,salt:s}){if(r.mod(this.N).equals(Ie.ZERO))throw new Error("B cannot be zero.");const o=wK({A:this.A,B:r}),a=`${this.userPoolName}${e}:${n}`,u=$x(a),c=new Ie(Ym(ai(s)+u),16),f=await SK({a:this.a,g:this.g,k:this.k,x:c,B:r,N:this.N,U:o}),h=this.encoder.convert("Caldera Derived Key"),g=this.encoder.convert(""),m=new Uint8Array(h.byteLength+g.byteLength);return m.set(h,0),m.set(g,h.byteLength),xK($c(ai(f)),$c(ai(o)),m)}}const TK=async({a:t,g:e,N:n})=>new Promise((r,s)=>{e.modPow(t,n,(o,a)=>{if(o){s(o);return}if(a.mod(n).equals(Ie.ZERO)){s(new Error("Illegal parameter. A mod N cannot be 0."));return}r(a)})}),rp=async t=>{const e=new Ie(EK,16),n=new Ie("2",16),r=RK(),s=await TK({a:r,g:n,N:e});return new AK({userPoolName:t,a:r,g:n,A:s,N:e})},RK=()=>{const t=ZA(XA(128));return new Ie(t,16)};async function su({userPoolId:t,userPoolEndpoint:e,newDeviceMetadata:n,accessToken:r}){if(!n)return;const s=t.split("_")[1]||"",o=await rp(s),a=n?.DeviceKey,u=n?.DeviceGroupKey;try{await o.generateHashDevice(u??"",a??"")}catch{return}const c={Salt:Bc.convert($c(o.getSaltToHashDevices())),PasswordVerifier:Bc.convert($c(o.getVerifierDevices()))},f=o.getRandomPassword();try{return await LG({endpointResolver:bt({endpointOverride:e})})({region:yt(t)},{AccessToken:r,DeviceName:await MV(),DeviceKey:n?.DeviceKey,DeviceSecretVerifierConfig:c}),{deviceKey:a,deviceGroupKey:u,randomPassword:f}}catch{return}}async function IK(t){const e=$t.getConfig().Auth?.Cognito;lt(e);const{username:n,signInSession:r,signInDetails:s,challengeName:o}=Io.getState();if(o!=="WEB_AUTHN"||!n)throw new Le({name:Ro.SignInException,message:"Unable to proceed due to invalid sign in state."});const{CREDENTIAL_REQUEST_OPTIONS:a}=t;cd(!!a,Bt.InvalidPasskeyAuthenticationOptions);const u=await DG(JSON.parse(a)),c=as({endpointResolver:bt({endpointOverride:e.userPoolEndpoint})}),{ChallengeName:f,ChallengeParameters:h,AuthenticationResult:g,Session:m}=await c({region:yt(e.userPoolId),userAgentValue:Mt(Ke.ConfirmSignIn)},{ChallengeName:"WEB_AUTHN",ChallengeResponses:{USERNAME:n,CREDENTIAL:JSON.stringify(u)},ClientId:e.userPoolClientId,Session:r});if(ru({signInSession:m,username:n,challengeName:f,signInDetails:s}),g)return await Ai({...g,username:n,NewDeviceMetadata:await su({userPoolId:e.userPoolId,userPoolEndpoint:e.userPoolEndpoint,newDeviceMetadata:g.NewDeviceMetadata,accessToken:g.AccessToken}),signInDetails:s}),Io.dispatch({type:"RESET_STATE"}),await Ka(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}};if(f==="WEB_AUTHN")throw new Le({name:Ro.SignInException,message:"Sequential WEB_AUTHN challenges returned from underlying service cannot be handled."});return{challengeName:f,challengeParameters:h}}function Wn({username:t,userPoolId:e,userPoolClientId:n}){if(typeof window>"u")return;const r=window.AmazonCognitoAdvancedSecurityData;if(typeof r>"u")return;const s=r.getData(t,e,n);return s?{EncodedData:s}:{}}const OK=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],NK=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],t8=()=>{const t=new Date,e=NK[t.getUTCDay()],n=OK[t.getUTCMonth()],r=t.getUTCDate();let s=t.getUTCHours();s<10&&(s=`0${s}`);let o=t.getUTCMinutes();o<10&&(o=`0${o}`);let a=t.getUTCSeconds();a<10&&(a=`0${a}`);const u=t.getUTCFullYear();return`${e} ${n} ${r} ${s}:${o}:${a} UTC ${u}`},n8=({userPoolName:t,username:e,challengeParameters:n,dateNow:r,hkdf:s})=>{const o=Km.convert(t),a=Km.convert(e),u=MK(n.SECRET_BLOCK),c=Km.convert(r),f=new Uint8Array(o.byteLength+a.byteLength+u.byteLength+c.byteLength);f.set(o,0),f.set(a,o.byteLength),f.set(u,o.byteLength+a.byteLength),f.set(c,o.byteLength+a.byteLength+u.byteLength);const h=new Hl(s);h.update(f);const g=h.digestSync();return Bc.convert(g)},MK=t=>{const e="=".repeat((4-t.length%4)%4),n=(t+e).replace(/-/g,"+").replace(/_/g,"/"),r=jA.convert(n),s=new Uint8Array(r.length);for(let o=0;o<r.length;++o)s[o]=r.charCodeAt(o);return s};async function sp({username:t,config:e,clientMetadata:n,session:r,tokenOrchestrator:s}){const{userPoolId:o,userPoolEndpoint:a}=e,u=e.userPoolClientId,c=await s?.getDeviceMetadata(t);W6(c);const f=await rp(c.deviceGroupKey),h={USERNAME:t,SRP_A:f.A.toString(16),DEVICE_KEY:c.deviceKey},g={ChallengeName:"DEVICE_SRP_AUTH",ClientId:u,ChallengeResponses:h,ClientMetadata:n,Session:r},m=as({endpointResolver:bt({endpointOverride:a})}),{ChallengeParameters:y,Session:S}=await m({region:yt(o)},g);return PK(t,y,n,S,f,e,s)}async function PK(t,e,n,r,s,{userPoolId:o,userPoolClientId:a,userPoolEndpoint:u},c){const f=await c?.getDeviceMetadata(t);W6(f);const h=new Ie(e?.SRP_B,16),g=new Ie(e?.SALT,16),{deviceKey:m}=f,{deviceGroupKey:y}=f,S=await s.getPasswordAuthenticationKey({username:f.deviceKey,password:f.randomPassword,serverBValue:h,salt:g}),E=t8(),C={USERNAME:e?.USERNAME??t,PASSWORD_CLAIM_SECRET_BLOCK:e?.SECRET_BLOCK,TIMESTAMP:E,PASSWORD_CLAIM_SIGNATURE:n8({username:m,userPoolName:y,challengeParameters:e,dateNow:E,hkdf:S}),DEVICE_KEY:m},w=Wn({username:t,userPoolId:o,userPoolClientId:a}),x={ChallengeName:"DEVICE_PASSWORD_VERIFIER",ClientId:a,ChallengeResponses:C,Session:r,ClientMetadata:n,UserContextData:w};return as({endpointResolver:bt({endpointOverride:u})})({region:yt(o)},x)}async function QA(t,e,n,r,s,o,a){const{userPoolId:u,userPoolClientId:c,userPoolEndpoint:f}=o,h=u?.split("_")[1]||"",g=new Ie(e?.SRP_B,16),m=new Ie(e?.SALT,16),y=e?.USER_ID_FOR_SRP;if(!y)throw new Le({name:"EmptyUserIdForSRPException",message:"USER_ID_FOR_SRP was not found in challengeParameters"});const S=await s.getPasswordAuthenticationKey({username:y,password:t,serverBValue:g,salt:m}),E=t8(),C={USERNAME:y,PASSWORD_CLAIM_SECRET_BLOCK:e?.SECRET_BLOCK,TIMESTAMP:E,PASSWORD_CLAIM_SIGNATURE:n8({username:y,userPoolName:h,challengeParameters:e,dateNow:E,hkdf:S})},w=await a.getDeviceMetadata(y);w&&w.deviceKey&&(C.DEVICE_KEY=w.deviceKey);const x=Wn({username:y,userPoolId:u,userPoolClientId:c}),T={ChallengeName:"PASSWORD_VERIFIER",ChallengeResponses:C,ClientMetadata:n,Session:r,ClientId:c,UserContextData:x},M=await as({endpointResolver:bt({endpointOverride:f})})({region:yt(u)},T);return M.ChallengeName==="DEVICE_SRP_AUTH"?sp({username:y,config:o,clientMetadata:n,session:M.Session,tokenOrchestrator:a}):M}async function hd(t,e,n,r){try{return await t(...e)}catch(s){if(s instanceof Le&&s.name==="ResourceNotFoundException"&&s.message.includes("Device does not exist."))return await r.clearDeviceMetadata(n),t(...e);throw s}}function ou(t){const{dispatch:e}=Io;e({type:"SET_USERNAME",value:t})}async function r8({username:t,password:e,clientMetadata:n,config:r,tokenOrchestrator:s,authFlow:o,preferredChallenge:a}){const{userPoolId:u,userPoolClientId:c,userPoolEndpoint:f}=r,h=u?.split("_")[1]||"",g=await rp(h),m={USERNAME:t,SRP_A:g.A.toString(16)};o==="USER_AUTH"&&a&&(m.PREFERRED_CHALLENGE=a);const y=Wn({username:t,userPoolId:u,userPoolClientId:c}),S={AuthFlow:o,AuthParameters:m,ClientMetadata:n,ClientId:c,UserContextData:y},C=await np({endpointResolver:bt({endpointOverride:f})})({region:yt(u),userAgentValue:Mt(Ke.SignIn)},S),{ChallengeParameters:w,Session:x}=C,T=w?.USERNAME??t;return ou(T),C.ChallengeName==="PASSWORD_VERIFIER"?hd(QA,[e,w,n,x,g,r,s],T,s):C}async function kK({username:t,session:e,selectedChallenge:n,config:r,clientMetadata:s}){return as({endpointResolver:bt({endpointOverride:r.userPoolEndpoint})})({region:yt(r.userPoolId),userAgentValue:Mt(Ke.ConfirmSignIn)},{ChallengeName:"SELECT_CHALLENGE",ChallengeResponses:{USERNAME:t,ANSWER:n},ClientId:r.userPoolClientId,Session:e,ClientMetadata:s})}async function DK(t,e,n,r,s){const{userPoolId:o,userPoolClientId:a,userPoolEndpoint:u}=r,c={ANSWER:"PASSWORD",USERNAME:t,PASSWORD:e},f=Wn({username:t,userPoolId:o,userPoolClientId:a}),g=await as({endpointResolver:bt({endpointOverride:u})})({region:yt(o),userAgentValue:Mt(Ke.ConfirmSignIn)},{ChallengeName:"SELECT_CHALLENGE",ChallengeResponses:c,ClientId:a,ClientMetadata:n,Session:s,UserContextData:f}),m=g.ChallengeParameters?.USERNAME??t;return ou(m),g}async function LK(t,e,n,r,s,o){const{userPoolId:a,userPoolClientId:u,userPoolEndpoint:c}=r,f=a.split("_")[1]||"",h=await rp(f),g={ANSWER:"PASSWORD_SRP",USERNAME:t,SRP_A:h.A.toString(16)},m=Wn({username:t,userPoolId:a,userPoolClientId:u}),S=await as({endpointResolver:bt({endpointOverride:c})})({region:yt(a),userAgentValue:Mt(Ke.ConfirmSignIn)},{ChallengeName:"SELECT_CHALLENGE",ChallengeResponses:g,ClientId:u,ClientMetadata:n,Session:s,UserContextData:m}),E=S.ChallengeParameters?.USERNAME??t;return ou(E),S.ChallengeName==="PASSWORD_VERIFIER"?hd(QA,[e,S.ChallengeParameters,n,S.Session,h,r,o],E,o):S}const qx="userAttributes.";function UK(t){return"isSignedIn"in t&&"nextStep"in t}async function FK({challengeResponse:t,clientMetadata:e,session:n,username:r,config:s,tokenOrchestrator:o}){const{userPoolId:a,userPoolClientId:u,userPoolEndpoint:c}=s,f={USERNAME:r,ANSWER:t},h=await o?.getDeviceMetadata(r);h&&h.deviceKey&&(f.DEVICE_KEY=h.deviceKey);const g=Wn({username:r,userPoolId:a,userPoolClientId:u}),m={ChallengeName:"CUSTOM_CHALLENGE",ChallengeResponses:f,Session:n,ClientMetadata:e,ClientId:u,UserContextData:g},S=await as({endpointResolver:bt({endpointOverride:c})})({region:yt(a),userAgentValue:Mt(Ke.ConfirmSignIn)},m);return S.ChallengeName==="DEVICE_SRP_AUTH"?sp({username:r,config:s,clientMetadata:e,session:S.Session,tokenOrchestrator:o}):S}async function zK({challengeResponse:t,username:e,clientMetadata:n,session:r,deviceName:s,config:o}){const{userPoolId:a,userPoolClientId:u,userPoolEndpoint:c}=o;if(t==="EMAIL")return{ChallengeName:"MFA_SETUP",Session:r,ChallengeParameters:{MFAS_CAN_SETUP:'["EMAIL_OTP"]'},$metadata:{}};if(t==="TOTP")return{ChallengeName:"MFA_SETUP",Session:r,ChallengeParameters:{MFAS_CAN_SETUP:'["SOFTWARE_TOKEN_MFA"]'},$metadata:{}};const f={USERNAME:e};if(/^\d+$/.test(t)){const m=oG({endpointResolver:bt({endpointOverride:c})}),{Session:y}=await m({region:yt(a),userAgentValue:Mt(Ke.ConfirmSignIn)},{UserCode:t,Session:r,FriendlyDeviceName:s});Io.dispatch({type:"SET_SIGN_IN_SESSION",value:y});const S={ChallengeName:"MFA_SETUP",ChallengeResponses:f,Session:y,ClientMetadata:n,ClientId:u};return as({endpointResolver:bt({endpointOverride:c})})({region:yt(a),userAgentValue:Mt(Ke.ConfirmSignIn)},S)}if(t.includes("@")){f.EMAIL=t;const m={ChallengeName:"MFA_SETUP",ChallengeResponses:f,Session:r,ClientMetadata:n,ClientId:u};return as({endpointResolver:bt({endpointOverride:c})})({region:yt(a),userAgentValue:Mt(Ke.ConfirmSignIn)},m)}throw new Le({name:Ro.SignInException,message:`Cannot proceed with MFA setup using challengeResponse: ${t}`,recoverySuggestion:'Try passing "EMAIL", "TOTP", a valid email, or OTP code as the challengeResponse.'})}async function jK({challengeResponse:t,username:e,clientMetadata:n,session:r,config:s}){const{userPoolId:o,userPoolClientId:a,userPoolEndpoint:u}=s;fn(t==="TOTP"||t==="SMS"||t==="EMAIL",Ge.IncorrectMFAMethod);const c={USERNAME:e,ANSWER:ZK(t)},f=Wn({username:e,userPoolId:o,userPoolClientId:a}),h={ChallengeName:"SELECT_MFA_TYPE",ChallengeResponses:c,Session:r,ClientMetadata:n,ClientId:a,UserContextData:f};return as({endpointResolver:bt({endpointOverride:u})})({region:yt(o),userAgentValue:Mt(Ke.ConfirmSignIn)},h)}async function BK({challengeResponse:t,clientMetadata:e,session:n,username:r,requiredAttributes:s,config:o}){const{userPoolId:a,userPoolClientId:u,userPoolEndpoint:c}=o,f={...KK(s),NEW_PASSWORD:t,USERNAME:r},h=Wn({username:r,userPoolId:a,userPoolClientId:u}),g={ChallengeName:"NEW_PASSWORD_REQUIRED",ChallengeResponses:f,ClientMetadata:e,Session:n,ClientId:u,UserContextData:h};return as({endpointResolver:bt({endpointOverride:c})})({region:yt(a),userAgentValue:Mt(Ke.ConfirmSignIn)},g)}async function HK(t,e,n,r,s){const{userPoolClientId:o,userPoolId:a,userPoolEndpoint:u}=r,c={USERNAME:t,PASSWORD:e},f=await s.getDeviceMetadata(t);f&&f.deviceKey&&(c.DEVICE_KEY=f.deviceKey);const h=Wn({username:t,userPoolId:a,userPoolClientId:o}),g={AuthFlow:"USER_PASSWORD_AUTH",AuthParameters:c,ClientMetadata:n,ClientId:o,UserContextData:h},y=await np({endpointResolver:bt({endpointOverride:u})})({region:yt(a),userAgentValue:Mt(Ke.SignIn)},g),S=y.ChallengeParameters?.USERNAME??y.ChallengeParameters?.USER_ID_FOR_SRP??t;return ou(S),y.ChallengeName==="DEVICE_SRP_AUTH"?sp({username:S,config:r,clientMetadata:n,session:y.Session,tokenOrchestrator:s}):y}async function $K(t,e,n,r,s){return r8({username:t,password:e,clientMetadata:n,config:r,tokenOrchestrator:s,authFlow:"USER_SRP_AUTH"})}async function qK(t,e,n,r){const{userPoolClientId:s,userPoolId:o,userPoolEndpoint:a}=n,u={USERNAME:t},c=await r.getDeviceMetadata(t);c&&c.deviceKey&&(u.DEVICE_KEY=c.deviceKey);const f=Wn({username:t,userPoolId:o,userPoolClientId:s}),h={AuthFlow:"CUSTOM_AUTH",AuthParameters:u,ClientMetadata:e,ClientId:s,UserContextData:f},m=await np({endpointResolver:bt({endpointOverride:a})})({region:yt(o),userAgentValue:Mt(Ke.SignIn)},h),y=m.ChallengeParameters?.USERNAME??t;return ou(y),m.ChallengeName==="DEVICE_SRP_AUTH"?sp({username:y,config:n,clientMetadata:e,session:m.Session,tokenOrchestrator:r}):m}async function WK(t,e,n,r,s){lt(r);const{userPoolId:o,userPoolClientId:a,userPoolEndpoint:u}=r,c=o?.split("_")[1]||"",f=await rp(c),h={USERNAME:t,SRP_A:f.A.toString(16),CHALLENGE_NAME:"SRP_A"},g=Wn({username:t,userPoolId:o,userPoolClientId:a}),m={AuthFlow:"CUSTOM_AUTH",AuthParameters:h,ClientMetadata:n,ClientId:a,UserContextData:g},y=np({endpointResolver:bt({endpointOverride:u})}),{ChallengeParameters:S,Session:E}=await y({region:yt(o),userAgentValue:Mt(Ke.SignIn)},m),C=S?.USERNAME??t;return ou(C),hd(QA,[e,S,n,E,f,r,s],C,s)}async function iu(t){const{challengeName:e,challengeParameters:n,availableChallenges:r}=t,s=$t.getConfig().Auth?.Cognito;switch(lt(s),e){case"CUSTOM_CHALLENGE":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_CUSTOM_CHALLENGE",additionalInfo:n}};case"MFA_SETUP":{const{signInSession:o,username:a}=Io.getState(),u=WM(VM(n.MFAS_CAN_SETUP))||[],c=QK(u),f=c.includes("TOTP"),h=c.includes("EMAIL");if(f&&h)return{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION",allowedMFATypes:c}};if(h)return{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_EMAIL_SETUP"}};if(f){const g=iG({endpointResolver:bt({endpointOverride:s.userPoolEndpoint})}),{Session:m,SecretCode:y}=await g({region:yt(s.userPoolId)},{Session:o});return Io.dispatch({type:"SET_SIGN_IN_SESSION",value:m}),{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_TOTP_SETUP",totpSetupDetails:VK(y,a)}}}throw new Le({name:Ro.SignInException,message:`Cannot initiate MFA setup from available types: ${u}`})}case"NEW_PASSWORD_REQUIRED":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED",missingAttributes:GK(n.requiredAttributes)}};case"SELECT_MFA_TYPE":return{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_MFA_SELECTION",allowedMFATypes:WM(VM(n.MFAS_CAN_CHOOSE))}};case"SMS_OTP":case"SMS_MFA":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_SMS_CODE",codeDeliveryDetails:{deliveryMedium:n.CODE_DELIVERY_DELIVERY_MEDIUM,destination:n.CODE_DELIVERY_DESTINATION}}};case"SOFTWARE_TOKEN_MFA":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_TOTP_CODE"}};case"EMAIL_OTP":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_EMAIL_CODE",codeDeliveryDetails:{deliveryMedium:n.CODE_DELIVERY_DELIVERY_MEDIUM,destination:n.CODE_DELIVERY_DESTINATION}}};case"WEB_AUTHN":{const o=await IK(n);return UK(o)?o:iu(o)}case"PASSWORD":case"PASSWORD_SRP":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_PASSWORD"}};case"SELECT_CHALLENGE":return{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_FIRST_FACTOR_SELECTION",availableChallenges:r}}}throw new Le({name:Ro.SignInException,message:`An error occurred during the sign in process. ${e} challengeName returned by the underlying service was not addressed.`})}function VK(t,e){return{sharedSecret:t,getSetupUri:(n,r)=>{const s=`otpauth://totp/${n}:${r??e}?secret=${t}&issuer=${n}`;return new Ga(s)}}}function pd(t){if(t===Ev.PasswordResetRequiredException)return{isSignedIn:!1,nextStep:{signInStep:"RESET_PASSWORD"}};if(t===Ev.UserNotConfirmedException)return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_UP"}}}function GK(t){return t?JSON.parse(t).map(n=>n.includes(qx)?n.replace(qx,""):n):[]}function KK(t){if(!t)return{};const e={};return Object.entries(t).forEach(([n,r])=>{r&&(e[`${qx}${n}`]=r)}),e}async function YK(t,e,n,r,s,o,a,u){const c=u?.userAttributes,f=u?.friendlyDeviceName;switch(e){case"WEB_AUTHN":case"SELECT_CHALLENGE":return r==="PASSWORD_SRP"||r==="PASSWORD"?{ChallengeName:r,Session:n,$metadata:{}}:kK({username:t,session:n,selectedChallenge:r,config:s,clientMetadata:a});case"SELECT_MFA_TYPE":return jK({challengeResponse:r,clientMetadata:a,session:n,username:t,config:s});case"MFA_SETUP":return zK({challengeResponse:r,clientMetadata:a,session:n,username:t,deviceName:f,config:s});case"NEW_PASSWORD_REQUIRED":return BK({challengeResponse:r,clientMetadata:a,session:n,username:t,requiredAttributes:c,config:s});case"CUSTOM_CHALLENGE":return hd(FK,[{challengeResponse:r,clientMetadata:a,session:n,username:t,config:s,tokenOrchestrator:o}],t,o);case"SMS_MFA":case"SOFTWARE_TOKEN_MFA":case"SMS_OTP":case"EMAIL_OTP":return JK({challengeName:e,challengeResponse:r,clientMetadata:a,session:n,username:t,config:s,tokenOrchestrator:o});case"PASSWORD":return DK(t,r,a,s,n);case"PASSWORD_SRP":return LK(t,r,a,s,n,o)}throw new Le({name:Ro.SignInException,message:`An error occurred during the sign in process.
5
+ ${e} challengeName returned by the underlying service was not addressed.`})}function ZK(t){let e="SMS_MFA";return t==="TOTP"&&(e="SOFTWARE_TOKEN_MFA"),t==="EMAIL"&&(e="EMAIL_OTP"),e}function XK(t){if(t==="SMS_MFA")return"SMS";if(t==="SOFTWARE_TOKEN_MFA")return"TOTP";if(t==="EMAIL_OTP")return"EMAIL"}function WM(t){if(t)return t.map(XK).filter(Boolean)}function VM(t){return t?JSON.parse(t):[]}function QK(t){return t.filter(e=>e==="EMAIL"||e==="TOTP")}async function s8(){let t;try{t=await Py()}catch{}if(t&&t.userId&&t.username)throw new Le({name:UV,message:"There is already a signed in user.",recoverySuggestion:"Call signOut before calling signIn again."})}function op(t){return Io.getState().username??t}async function JK({challengeName:t,challengeResponse:e,clientMetadata:n,session:r,username:s,config:o,tokenOrchestrator:a}){const{userPoolId:u,userPoolClientId:c,userPoolEndpoint:f}=o,h={USERNAME:s};t==="EMAIL_OTP"&&(h.EMAIL_OTP_CODE=e),t==="SMS_MFA"&&(h.SMS_MFA_CODE=e),t==="SMS_OTP"&&(h.SMS_OTP_CODE=e),t==="SOFTWARE_TOKEN_MFA"&&(h.SOFTWARE_TOKEN_MFA_CODE=e);const g=await a?.getDeviceMetadata(s);g&&g.deviceKey&&(h.DEVICE_KEY=g.deviceKey);const m=Wn({username:s,userPoolId:u,userPoolClientId:c}),y={ChallengeName:t,ChallengeResponses:h,Session:r,ClientMetadata:n,ClientId:c,UserContextData:m},E=await as({endpointResolver:bt({endpointOverride:f})})({region:yt(u),userAgentValue:Mt(Ke.ConfirmSignIn)},y);return E.ChallengeName==="DEVICE_SRP_AUTH"?sp({username:s,config:o,clientMetadata:n,session:E.Session,tokenOrchestrator:a}):E}async function eY(t){const e=$t.getConfig().Auth?.Cognito;lt(e);const{username:n,password:r,options:s}=t,o={loginId:n,authFlowType:"CUSTOM_WITHOUT_SRP"},a=s?.clientMetadata;fn(!!n,Ge.EmptySignInUsername),fn(!r,Ge.CustomAuthSignInPassword);try{const{ChallengeName:u,ChallengeParameters:c,AuthenticationResult:f,Session:h}=await hd(qK,[n,a,e,$r],n,$r),g=op(n);return ru({signInSession:h,username:g,challengeName:u,signInDetails:o}),f?(await Ai({username:g,...f,NewDeviceMetadata:await su({userPoolId:e.userPoolId,userPoolEndpoint:e.userPoolEndpoint,newDeviceMetadata:f.NewDeviceMetadata,accessToken:f.AccessToken}),signInDetails:o}),Js(),await Ka(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}}):iu({challengeName:u,challengeParameters:c})}catch(u){Js(),Os(u);const c=pd(u.name);if(c)return c;throw u}}async function tY(t){const{username:e,password:n,options:r}=t,s={loginId:e,authFlowType:"CUSTOM_WITH_SRP"},o=$t.getConfig().Auth?.Cognito;lt(o);const a=r?.clientMetadata;fn(!!e,Ge.EmptySignInUsername),fn(!!n,Ge.EmptySignInPassword);try{const{ChallengeName:u,ChallengeParameters:c,AuthenticationResult:f,Session:h}=await WK(e,n,a,o,$r),g=op(e);return ru({signInSession:h,username:g,challengeName:u,signInDetails:s}),f?(await Ai({username:g,...f,NewDeviceMetadata:await su({userPoolId:o.userPoolId,userPoolEndpoint:o.userPoolEndpoint,newDeviceMetadata:f.NewDeviceMetadata,accessToken:f.AccessToken}),signInDetails:s}),Js(),await Ka(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}}):iu({challengeName:u,challengeParameters:c})}catch(u){Js(),Os(u);const c=pd(u.name);if(c)return c;throw u}}const o8=async()=>{throw new Le({name:$6,message:"The autoSignIn flow has not started, or has been cancelled/completed.",recoverySuggestion:"Please try to use the signIn API or log out before starting a new autoSignIn flow."})};let JA=o8;function Wx(t){JA=t}function jr(t=!0){t&&(JA=o8),Ta.dispatch({type:"RESET"})}async function GM(t){const{username:e,password:n}=t,r=$t.getConfig().Auth?.Cognito,s={loginId:e,authFlowType:"USER_SRP_AUTH"};lt(r);const o=t.options?.clientMetadata;fn(!!e,Ge.EmptySignInUsername),fn(!!n,Ge.EmptySignInPassword);try{const{ChallengeName:a,ChallengeParameters:u,AuthenticationResult:c,Session:f}=await $K(e,n,o,r,$r),h=op(e);return ru({signInSession:f,username:h,challengeName:a,signInDetails:s}),c?(await Ai({username:h,...c,NewDeviceMetadata:await su({userPoolId:r.userPoolId,userPoolEndpoint:r.userPoolEndpoint,newDeviceMetadata:c.NewDeviceMetadata,accessToken:c.AccessToken}),signInDetails:s}),Js(),await Ka(),jr(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}}):iu({challengeName:a,challengeParameters:u})}catch(a){Js(),jr(),Os(a);const u=pd(a.name);if(u)return u;throw a}}async function nY(t){const{username:e,password:n,options:r}=t,s=$t.getConfig().Auth?.Cognito,o={loginId:e,authFlowType:"USER_PASSWORD_AUTH"};lt(s);const a=r?.clientMetadata;fn(!!e,Ge.EmptySignInUsername),fn(!!n,Ge.EmptySignInPassword);try{const{ChallengeName:u,ChallengeParameters:c,AuthenticationResult:f,Session:h}=await hd(HK,[e,n,a,s,$r],e,$r),g=op(e);return ru({signInSession:h,username:g,challengeName:u,signInDetails:o}),f?(await Ai({...f,username:g,NewDeviceMetadata:await su({userPoolId:s.userPoolId,userPoolEndpoint:s.userPoolEndpoint,newDeviceMetadata:f.NewDeviceMetadata,accessToken:f.AccessToken}),signInDetails:o}),Js(),await Ka(),jr(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}}):iu({challengeName:u,challengeParameters:c})}catch(u){Js(),jr(),Os(u);const c=pd(u.name);if(c)return c;throw u}}async function rY({username:t,clientMetadata:e,config:n,tokenOrchestrator:r,preferredChallenge:s,password:o,session:a}){const{userPoolId:u,userPoolClientId:c,userPoolEndpoint:f}=n,h=Wn({username:t,userPoolId:u,userPoolClientId:c}),g={USERNAME:t};if(s){if(n.passwordless&&(s==="EMAIL_OTP"&&!n.passwordless.emailOtpEnabled||s==="SMS_OTP"&&!n.passwordless.smsOtpEnabled||s==="WEB_AUTHN"&&!n.passwordless.webAuthn)&&fn(!1,Ge.InvalidPreferredChallenge),s==="PASSWORD_SRP")return fn(!!o,Ge.EmptySignInPassword),r8({username:t,password:o,clientMetadata:e,config:n,tokenOrchestrator:r,authFlow:"USER_AUTH",preferredChallenge:s});s==="PASSWORD"&&(fn(!!o,Ge.EmptySignInPassword),g.PASSWORD=o),g.PREFERRED_CHALLENGE=s}const m={AuthFlow:"USER_AUTH",AuthParameters:g,ClientMetadata:e,ClientId:c,UserContextData:h};a&&(m.Session=a);const S=await np({endpointResolver:bt({endpointOverride:f})})({region:yt(u),userAgentValue:Mt(Ke.SignIn)},m);return ou(t),S}async function i8(t){const{username:e,password:n,options:r}=t,s=$t.getConfig().Auth?.Cognito,o={loginId:e,authFlowType:"USER_AUTH"};lt(s);const a=r?.clientMetadata,u=r?.preferredChallenge??s?.passwordless?.preferredChallenge;fn(!!e,Ge.EmptySignInUsername);try{const c={username:e,config:s,tokenOrchestrator:$r,clientMetadata:a,preferredChallenge:u,password:n},f=Ta.getState();f.active&&f.username===e&&(c.session=f.session);const h=await rY(c),g=op(e);return ru({signInSession:h.Session,username:g,challengeName:h.ChallengeName,signInDetails:o}),h.AuthenticationResult?(await Ai({username:g,...h.AuthenticationResult,NewDeviceMetadata:await su({userPoolId:s.userPoolId,userPoolEndpoint:s.userPoolEndpoint,newDeviceMetadata:h.AuthenticationResult.NewDeviceMetadata,accessToken:h.AuthenticationResult.AccessToken}),signInDetails:o}),Js(),await Ka(),jr(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}}):iu({challengeName:h.ChallengeName,challengeParameters:h.ChallengeParameters,availableChallenges:"AvailableChallenges"in h?h.AvailableChallenges:void 0})}catch(c){Js(),jr(),Os(c);const f=pd(c.name);if(f)return f;throw c}}async function eT(t){jr(!1);const e=t.options?.authFlowType;switch(await s8(),e){case"USER_SRP_AUTH":return GM(t);case"USER_PASSWORD_AUTH":return nY(t);case"CUSTOM_WITHOUT_SRP":return eY(t);case"CUSTOM_WITH_SRP":return tY(t);case"USER_AUTH":return i8(t);default:return GM(t)}}const a8=180*1e3;function sY(t){const e=Sv.listen("auth-internal",async({payload:r})=>{r.event==="confirmSignUp"&&r.data?.isSignUpComplete&&(Sv.dispatch("auth-internal",{event:"autoSignIn"}),Wx(u8(t)),e())}),n=setTimeout(()=>{e(),clearTimeout(n),jr()},a8)}function l8(t,e){let n;return r=>{n||t(...r),clearTimeout(n),n=setTimeout(()=>{n=void 0},e)}}function oY(t,e,n){const r=Date.now(),s=setInterval(async()=>{if(Date.now()-r>a8)clearInterval(s),n(new Le({name:$6,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."})),jr();else try{const u=await eT(t);u.nextStep.signInStep!=="CONFIRM_SIGN_UP"&&(e(u),clearInterval(s),jr())}catch(u){clearInterval(s),n(u),jr()}},5e3)}const iY=l8(oY,300),aY=l8(uY,300);function lY(t){return async()=>new Promise((e,n)=>{iY([t,e,n])})}async function uY(t,e,n){try{const r=t?.options?.authFlowType==="USER_AUTH"?await i8(t):await eT(t);e(r),jr()}catch(r){n(r),jr()}}function u8(t){return async()=>new Promise((e,n)=>{aY([t,e,n])})}const cY=u8,dY=()=>async t=>{if(t.statusCode>=300){const e=await ld(t);if(Os(e),e.name===jx.InvalidParameterException&&/'password'/.test(e.message)&&/Member must not be null/.test(e.message)){const n=Ge.EmptySignUpPassword,{message:r,recoverySuggestion:s}=H6[n];throw new Le({name:n,message:r,recoverySuggestion:s})}throw new Le({name:e.name,message:e.message})}return ep(t)},fY=t=>In($n,Hn("SignUp"),dY(),{...qn,...t});async function hY(t){const{username:e,password:n,options:r}=t,s=$t.getConfig().Auth?.Cognito,o=s?.signUpVerificationMethod??"code",{clientMetadata:a,validationData:u,autoSignIn:c}=t.options??{};lt(s),fn(!!e,Ge.EmptySignUpUsername);const f=typeof c!="boolean"?c:void 0,h={username:e,options:f};f?.authFlowType!=="CUSTOM_WITHOUT_SRP"&&(h.password=n);const{userPoolId:g,userPoolClientId:m,userPoolEndpoint:y}=s,S=fY({endpointResolver:bt({endpointOverride:y})}),E={Username:e,Password:void 0,UserAttributes:r?.userAttributes&&gM(r?.userAttributes),ClientMetadata:a,ValidationData:u&&gM(u),ClientId:m,UserContextData:Wn({username:e,userPoolId:g,userPoolClientId:m})};n&&(E.Password=n);const{UserSub:C,CodeDeliveryDetails:w,UserConfirmed:x,Session:T}=await S({region:yt(g),userAgentValue:Mt(Ke.SignUp)},E);(f||c===!0)&&(Ta.dispatch({type:"START"}),Ta.dispatch({type:"SET_USERNAME",value:e}),Ta.dispatch({type:"SET_SESSION",value:T}));const R={destination:w?.Destination,deliveryMedium:w?.DeliveryMedium,attributeName:w?.AttributeName},M=!!x,N=Ta.getState().active;if(M)return N?(Wx(cY(h)),{isSignUpComplete:!0,nextStep:{signUpStep:"COMPLETE_AUTO_SIGN_IN"},userId:C}):{isSignUpComplete:!0,nextStep:{signUpStep:"DONE"},userId:C};if(N){if(o==="link")return Wx(lY(h)),{isSignUpComplete:!1,nextStep:{signUpStep:"COMPLETE_AUTO_SIGN_IN",codeDeliveryDetails:R},userId:C};sY(h)}return{isSignUpComplete:!1,nextStep:{signUpStep:"CONFIRM_SIGN_UP",codeDeliveryDetails:R},userId:C}}const pY=t=>In($n,Hn("ForgotPassword"),ar(),{...qn,...t});async function c8(t){const{username:e}=t;fn(!!e,Ge.EmptyResetPasswordUsername);const n=$t.getConfig().Auth?.Cognito;lt(n);const{userPoolClientId:r,userPoolId:s,userPoolEndpoint:o}=n,a=t.options?.clientMetadata,u=Wn({username:e,userPoolId:s,userPoolClientId:r}),h=(await pY({endpointResolver:bt({endpointOverride:o})})({region:yt(s),userAgentValue:Mt(Ke.ResetPassword)},{Username:e,ClientMetadata:a,ClientId:r,UserContextData:u})).CodeDeliveryDetails;return{isPasswordReset:!1,nextStep:{resetPasswordStep:"CONFIRM_RESET_PASSWORD_WITH_CODE",codeDeliveryDetails:{deliveryMedium:h?.DeliveryMedium,destination:h?.Destination,attributeName:h?.AttributeName}}}}const gY=t=>In($n,Hn("ConfirmForgotPassword"),ar(),{...qn,...t});async function mY(t){const e=$t.getConfig().Auth?.Cognito;lt(e);const{userPoolClientId:n,userPoolId:r,userPoolEndpoint:s}=e,{username:o,newPassword:a}=t;fn(!!o,Ge.EmptyConfirmResetPasswordUsername),fn(!!a,Ge.EmptyConfirmResetPasswordNewPassword);const u=t.confirmationCode;fn(!!u,Ge.EmptyConfirmResetPasswordConfirmationCode);const c=t.options?.clientMetadata,f=Wn({username:o,userPoolId:r,userPoolClientId:n});await gY({endpointResolver:bt({endpointOverride:s})})({region:yt(e.userPoolId),userAgentValue:Mt(Ke.ConfirmResetPassword)},{Username:o,ConfirmationCode:u,Password:a,ClientMetadata:c,ClientId:e.userPoolClientId,UserContextData:f})}const vY=t=>In($n,Hn("ResendConfirmationCode"),ar(),{...qn,...t});async function yY(t){const{username:e}=t;fn(!!e,Ge.EmptySignUpUsername);const n=$t.getConfig().Auth?.Cognito;lt(n);const{userPoolClientId:r,userPoolId:s,userPoolEndpoint:o}=n,a=t.options?.clientMetadata,u=Wn({username:e,userPoolId:s,userPoolClientId:r}),c=vY({endpointResolver:bt({endpointOverride:o})}),{CodeDeliveryDetails:f}=await c({region:yt(n.userPoolId),userAgentValue:Mt(Ke.ResendSignUpCode)},{Username:e,ClientMetadata:a,ClientId:n.userPoolClientId,UserContextData:u}),{DeliveryMedium:h,AttributeName:g,Destination:m}={...f};return{destination:m,deliveryMedium:h,attributeName:g||void 0}}const bY=t=>In($n,Hn("ConfirmSignUp"),ar(),{...qn,...t});async function SY(t){const{username:e,confirmationCode:n,options:r}=t,s=$t.getConfig().Auth?.Cognito;lt(s);const{userPoolId:o,userPoolClientId:a,userPoolEndpoint:u}=s,c=r?.clientMetadata;fn(!!e,Ge.EmptyConfirmSignUpUsername),fn(!!n,Ge.EmptyConfirmSignUpCode);const f=Wn({username:e,userPoolId:o,userPoolClientId:a}),h=bY({endpointResolver:bt({endpointOverride:u})}),{Session:g}=await h({region:yt(s.userPoolId),userAgentValue:Mt(Ke.ConfirmSignUp)},{Username:e,ConfirmationCode:n,ClientMetadata:c,ForceAliasCreation:r?.forceAliasCreation,ClientId:s.userPoolClientId,UserContextData:f});return new Promise((m,y)=>{try{const S={isSignUpComplete:!0,nextStep:{signUpStep:"DONE"}},E=Ta.getState();if(!E.active||E.username!==e){m(S),jr();return}Ta.dispatch({type:"SET_SESSION",value:g});const C=Sv.listen("auth-internal",({payload:w})=>{w.event==="autoSignIn"&&(m({isSignUpComplete:!0,nextStep:{signUpStep:"COMPLETE_AUTO_SIGN_IN"}}),C())});Sv.dispatch("auth-internal",{event:"confirmSignUp",data:S})}catch(S){y(S)}})}async function d8(t){const{challengeResponse:e,options:n}=t,{username:r,challengeName:s,signInSession:o,signInDetails:a}=Io.getState(),u=$t.getConfig().Auth?.Cognito;lt(u);const c=n?.clientMetadata;if(fn(!!e,Ge.EmptyChallengeResponse),!r||!s||!o)throw new Le({name:Ro.SignInException,message:`
6
+ An error occurred during the sign in process.
7
+
8
+ This most likely occurred due to:
9
+ 1. signIn was not called before confirmSignIn.
10
+ 2. signIn threw an exception.
11
+ 3. page was refreshed during the sign in flow and session has expired.
12
+ `,recoverySuggestion:"Make sure a successful call to signIn is made before calling confirmSignInand that the session has not expired."});try{const{Session:f,ChallengeName:h,AuthenticationResult:g,ChallengeParameters:m}=await YK(r,s,o,e,u,$r,c,n);return ru({signInSession:f,username:r,challengeName:h,signInDetails:a}),g?(await Ai({username:r,...g,NewDeviceMetadata:await su({userPoolId:u.userPoolId,userPoolEndpoint:u.userPoolEndpoint,newDeviceMetadata:g.NewDeviceMetadata,accessToken:g.AccessToken}),signInDetails:a}),Js(),await Ka(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}}):iu({challengeName:h,challengeParameters:m})}catch(f){Os(f);const h=pd(f.name);if(h)return h;throw f}}const EY=t=>In($n,Hn("GetUser"),ar(),{...qn,...t}),CY=t=>In($n,Hn("VerifyUserAttribute"),ar(),{...qn,...t});async function wY(t){const e=$t.getConfig().Auth?.Cognito;lt(e);const{userPoolEndpoint:n,userPoolId:r}=e,{confirmationCode:s,userAttributeKey:o}=t;fn(!!s,Ge.EmptyConfirmUserAttributeCode);const{tokens:a}=await Oy({forceRefresh:!1});ud(a),await CY({endpointResolver:bt({endpointOverride:n})})({region:yt(r),userAgentValue:Mt(Ke.ConfirmUserAttribute)},{AccessToken:a.accessToken.toString(),AttributeName:o,Code:s})}new sr("AuthError");const xY={oauthSignInError:{message:jn.OAUTH_ERROR,log:"Make sure Cognito Hosted UI has been configured correctly"},noConfig:{message:jn.DEFAULT_MSG},missingAuthConfig:{message:jn.DEFAULT_MSG},emptyUsername:{message:jn.EMPTY_USERNAME},invalidUsername:{message:jn.INVALID_USERNAME},emptyPassword:{message:jn.EMPTY_PASSWORD},emptyCode:{message:jn.EMPTY_CODE},signUpError:{message:jn.SIGN_UP_ERROR},noMFA:{message:jn.NO_MFA},invalidMFA:{message:jn.INVALID_MFA},emptyChallengeResponse:{message:jn.EMPTY_CHALLENGE},noUserSession:{message:jn.NO_USER_SESSION},deviceConfig:{message:jn.DEVICE_CONFIG},networkError:{message:jn.NETWORK_ERROR},autoSignInError:{message:jn.AUTOSIGNIN_ERROR},default:{message:jn.DEFAULT_MSG}},Da=(t,e)=>new Le({message:t??"An error has occurred during the oauth process.",name:Ro.OAuthSignInError,recoverySuggestion:xY.oauthSignInError.log});var Vx;(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"})(Vx||(Vx={}));const _Y="`signInWithRedirect` has been canceled.",AY="An error occurred while validating the state.",TY="Try to initiate an OAuth flow from Amplify",f8=async t=>{const e=await Fr.loadOAuthState(),n=t===e?e:void 0;if(!n)throw new Le({name:Vx.OAuthSignInError,message:t===null?_Y:AY,recoverySuggestion:t===null?void 0:TY});return n},h8=async({currentUrl:t,userAgentValue:e,clientId:n,redirectUri:r,responseType:s,domain:o,preferPrivateSession:a})=>{const u=new Ga(t),c=u.searchParams.get("error"),f=u.searchParams.get("error_description");if(c)throw Da(f??c);return s==="code"?RY({currentUrl:t,userAgentValue:e,clientId:n,redirectUri:r,domain:o,preferPrivateSession:a}):IY({currentUrl:t,redirectUri:r,preferPrivateSession:a})},RY=async({currentUrl:t,userAgentValue:e,clientId:n,redirectUri:r,domain:s,preferPrivateSession:o})=>{const a=new Ga(t),u=a.searchParams.get("code"),c=a.searchParams.get("state");if(!u||!c)throw Da("User cancelled OAuth flow.");const f=await f8(c),h="https://"+s+"/oauth2/token",g=await Fr.loadPKCE(),m={grant_type:"authorization_code",code:u,client_id:n,redirect_uri:r,...g?{code_verifier:g}:{}},y=Object.entries(m).map(([N,O])=>`${encodeURIComponent(N)}=${encodeURIComponent(O)}`).join("&"),{access_token:S,refresh_token:E,id_token:C,error:w,error_message:x,token_type:T,expires_in:R}=await(await fetch(h,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",[Mq]:e},body:y})).json();if(w)throw Da(x??w);const M=(S&&mi(S).payload.username)??"username";return await Ai({username:M,AccessToken:S,IdToken:C,RefreshToken:E}),p8({redirectUri:r,state:f,preferPrivateSession:o})},IY=async({currentUrl:t,redirectUri:e,preferPrivateSession:n})=>{const r=new Ga(t),{id_token:s,access_token:o,state:a,token_type:u,expires_in:c,error_description:f,error:h}=(r.hash??"#").substring(1).split("&").map(y=>y.split("=")).reduce((y,[S,E])=>({...y,[S]:E}),{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(h)throw Da(f??h);if(!o)throw Da("No access token returned from OAuth flow.");const g=await f8(a),m=(o&&mi(o).payload.username)??"username";return await Ai({username:m,AccessToken:o,IdToken:s}),p8({redirectUri:e,state:g,preferPrivateSession:n})},p8=async({redirectUri:t,state:e,preferPrivateSession:n})=>{await $r.setOAuthMetadata({oauthSignIn:!0}),await Fr.clearOAuthData(),await Fr.storeOAuthSignIn(!0,n),Y6(),MY(t),OY(e)&&To.dispatch("auth",{event:"customOAuthState",data:IV(NY(e))},"Auth",Ao),To.dispatch("auth",{event:"signInWithRedirect"},"Auth",Ao),await Ka()},OY=t=>/-/.test(t),NY=t=>t.split("-").splice(1).join("-"),MY=t=>{typeof window<"u"&&typeof window.history<"u"&&window.history.replaceState(window.history.state,"",t)};function tT(t,e){{const n=t?.find(PY)??t?.find(kY),r=t?.find(LY)??t?.find(DY);if(n)return n;throw r?qV:HV}}const PY=t=>t.startsWith(String(window.location.origin+(window.location.pathname||"/"))),kY=t=>t.includes(String(window.location.hostname)),DY=t=>t.startsWith("http://"),LY=t=>t.startsWith("https://"),nT=async t=>{Y6(),await Fr.clearOAuthInflightData(),To.dispatch("auth",{event:"signInWithRedirect_failure",data:{error:t}},"Auth",Ao)},UY=async t=>{try{lt(t),Ay(t),Fr.setAuthConfig(t)}catch{return}if(await Fr.loadOAuthInFlight())try{const e=window.location.href,{loginWith:n,userPoolClientId:r}=t,{domain:s,redirectSignIn:o,responseType:a}=n.oauth,u=tT(o);await h8({currentUrl:e,clientId:r,domain:s,redirectUri:u,responseType:a,userAgentValue:Mt(Ke.SignInWithRedirect)})}catch(e){await nT(e)}};Iy()&&$t[b6](UY);const FY={Google:"Google",Facebook:"Facebook",Amazon:"LoginWithAmazon",Apple:"SignInWithApple"},g8=async t=>{window?.location&&(window.location.href=t.replace("http://","https://"))},KM="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",zY=t=>{const e=new Uint8Array(t);zA().getRandomValues(e);let n="",r;for(const s of e)n+=KM.charAt(s%KM.length);return{value:n,method:"S256",toCodeChallenge(){return r||(r=jY(n),r)}}};function jY(t){const e=new Hl;return e.update(t),BY(Bc.convert(e.digestSync(),{urlSafe:!0}))}function BY(t){return t.replace(/=/g,"")}const HY=()=>RV(32),$Y=t=>{async function e(n){if(n.persisted&&await t.loadOAuthInFlight()){const s=Da("User cancelled OAuth flow.");await nT(s)}window.removeEventListener("pageshow",e)}window.addEventListener("pageshow",e)};async function m8(t){const e=$t.getConfig().Auth?.Cognito;lt(e),Ay(e),Fr.setAuthConfig(e),t?.options?.prompt||await s8();let n="COGNITO",r;return typeof t?.provider=="string"?n=FY[t.provider]:t?.provider?.custom?n=t.provider.custom:t?.provider?.idpIdentifier&&({idpIdentifier:r}=t.provider),qY({oauthConfig:e.loginWith.oauth,clientId:e.userPoolClientId,provider:n,idpIdentifier:r,customState:t?.customState,preferPrivateSession:t?.options?.preferPrivateSession,options:{loginHint:t?.options?.loginHint,lang:t?.options?.lang,nonce:t?.options?.nonce,prompt:t?.options?.prompt},authSessionOpener:t?.options?.authSessionOpener})}const qY=async({oauthConfig:t,provider:e,idpIdentifier:n,clientId:r,customState:s,preferPrivateSession:o,options:a,authSessionOpener:u})=>{const{domain:c,redirectSignIn:f,responseType:h,scopes:g}=t,{loginHint:m,lang:y,nonce:S,prompt:E}=a??{},C=HY(),w=u||g8,x=s?`${C}-${OV(s)}`:C,{value:T,method:R,toCodeChallenge:M}=zY(128),N=tT(t.redirectSignIn);Iy()&&Fr.storeOAuthInFlight(!0),Fr.storeOAuthState(x),Fr.storePKCE(T);const O=new URLSearchParams;O.append("redirect_uri",N),O.append("response_type",h),O.append("client_id",r),n?O.append("idp_identifier",n):O.append("identity_provider",e),O.append("scope",g.join(" ")),m&&O.append("login_hint",m),y&&O.append("lang",y),S&&O.append("nonce",S),E&&O.append("prompt",E.toLowerCase()),O.append("state",x),h==="code"&&(O.append("code_challenge",M()),O.append("code_challenge_method",R));const k=`https://${c}/oauth2/authorize?${O.toString()}`;$Y(Fr);const{type:F,error:$,url:D}=await w(k,f,o)??{};try{if(F==="error")throw Da(String($));if(F==="canceled")throw Da(String(F));F==="success"&&D&&await h8({currentUrl:D,clientId:r,domain:c,redirectUri:N,responseType:h,userAgentValue:Mt(Ke.SignInWithRedirect),preferPrivateSession:o})}catch(z){throw await nT(z),z}},WY=async t=>{const e=t.getConfig().Auth?.Cognito;lt(e);const{userPoolEndpoint:n,userPoolId:r}=e,{tokens:s}=await _6(t,{forceRefresh:!1});ud(s);const o=EY({endpointResolver:bt({endpointOverride:n})}),{UserAttributes:a}=await o({region:yt(r),userAgentValue:Mt(Ke.FetchUserAttributes)},{AccessToken:s.accessToken.toString()});return LV(a)},v8=()=>WY($t),VY=async t=>{await t.clearOAuthData(),$r.clearTokens(),await A6(),To.dispatch("auth",{event:"signedOut"},"Auth",Ao)},GY=async(t,e=!1,n)=>{Ay(t);const{loginWith:r,userPoolClientId:s}=t,{domain:o,redirectSignOut:a}=r.oauth,u=tT(a),c=`https://${o}/logout?${Object.entries({client_id:s,logout_uri:encodeURIComponent(u)}).map(([f,h])=>`${f}=${h}`).join("&")}`;return g8(c)},KY=async(t,e,n,r)=>{const{isOAuthSignIn:s}=await e.loadOAuthSignIn(),o=await n.getOAuthMetadata();if(await VY(e),s||o?.oauthSignIn)return GY(t,!1)},YY=t=>In($n,Hn("RevokeToken"),ar(),{...qn,...t}),ZY=new sr("Auth");async function XY(t){const e=$t.getConfig().Auth?.Cognito;lt(e),await QY(e);let n;try{Ay(e),n=!0}catch{n=!1}if(n){const r=new K6(tp);r.setAuthConfig(e);const{type:s}=await KY(e,r,$r)??{};if(s==="error")throw new Le({name:WV,message:"An error occurred when attempting to log out from OAuth provider."})}else $r.clearTokens(),await A6(),To.dispatch("auth",{event:"signedOut"},"Auth",Ao)}async function QY(t){try{const{userPoolEndpoint:e,userPoolId:n,userPoolClientId:r}=t,s=await $r.getTokenStore().loadTokens();q6(s),JY(s.accessToken)&&await YY({endpointResolver:bt({endpointOverride:e})})({region:yt(n),userAgentValue:Mt(Ke.SignOut)},{ClientId:r,Token:s.refreshToken})}catch{ZY.debug("Client signOut error caught but will proceed with token removal")}}const JY=t=>!!t?.payload?.origin_jti,eZ=t=>In($n,Hn("GetUserAttributeVerificationCode"),ar(),{...qn,...t}),tZ=async t=>{const{userAttributeKey:e,options:n}=t,r=$t.getConfig().Auth?.Cognito,s=n?.clientMetadata;lt(r);const{userPoolEndpoint:o,userPoolId:a}=r,{tokens:u}=await Oy({forceRefresh:!1});ud(u);const c=eZ({endpointResolver:bt({endpointOverride:o})}),{CodeDeliveryDetails:f}=await c({region:yt(a),userAgentValue:Mt(Ke.SendUserAttributeVerificationCode)},{AccessToken:u.accessToken.toString(),ClientMetadata:s,AttributeName:e}),{DeliveryMedium:h,AttributeName:g,Destination:m}={...f};return{destination:m,deliveryMedium:h,attributeName:g}},nZ={identityId:"identityId"},rZ=new sr("DefaultIdentityIdStore");class y8{setAuthConfig(e){Wm(e.Cognito),this.authConfig=e,this._authKeys=sZ("Cognito",e.Cognito.identityPoolId)}constructor(e){this._authKeys={},this._hasGuestIdentityId=!1,this.keyValueStorage=e}async loadIdentityId(){Wm(this.authConfig?.Cognito);try{if(this._primaryIdentityId)return{id:this._primaryIdentityId,type:"primary"};{const e=await this.keyValueStorage.getItem(this._authKeys.identityId);return e?(this._hasGuestIdentityId=!0,{id:e,type:"guest"}):null}}catch(e){return rZ.log("Error getting stored IdentityId.",e),null}}async storeIdentityId(e){Wm(this.authConfig?.Cognito),e.type==="guest"?(this.keyValueStorage.setItem(this._authKeys.identityId,e.id),this._primaryIdentityId=void 0,this._hasGuestIdentityId=!0):(this._primaryIdentityId=e.id,this._hasGuestIdentityId&&(this.keyValueStorage.removeItem(this._authKeys.identityId),this._hasGuestIdentityId=!1))}async clearIdentityId(){this._primaryIdentityId=void 0,await this.keyValueStorage.removeItem(this._authKeys.identityId)}}const sZ=(t,e)=>WA(nZ)(`com.amplify.${t}`,e),Gx=({endpointOverride:t})=>e=>t?{url:new Ga(t)}:vV(e);function b8(t){const e=mi(t).payload.iss,n={};if(!e)throw new Le({name:"InvalidIdTokenException",message:"Invalid Idtoken."});const r=e.replace(/(^\w+:|^)\/\//,"");return n[r]=t,n}async function oZ({tokens:t,authConfig:e,identityIdStore:n}){n.setAuthConfig({Cognito:e});const r=await n.loadIdentityId();if(r)return r.id;const s=t?.idToken?b8(t.idToken.toString()):{},o=await iZ(s,e);return n.storeIdentityId({id:o,type:t?"primary":"guest"}),o}async function iZ(t,e){const n=e?.identityPoolId,r=zx(n),s=pV({endpointResolver:Gx({endpointOverride:e.identityPoolEndpoint})});let o;try{o=(await s({region:r},{IdentityPoolId:n,Logins:t})).IdentityId}catch(a){throw Os(a),new Le(a)}if(!o)throw new Le({name:"GetIdResponseException",message:"Received undefined response from getId operation",recoverySuggestion:"Make sure to pass a valid identityPoolId in the configuration."});return o}const qg=new sr("CognitoCredentialsProvider"),YM=3e3*1e3;class S8{constructor(e){this._nextCredentialsRefresh=0,this._identityIdStore=e}async clearCredentialsAndIdentityId(){qg.debug("Clearing out credentials and identityId"),this._credentialsAndIdentityId=void 0,await this._identityIdStore.clearIdentityId()}async clearCredentials(){qg.debug("Clearing out in-memory credentials"),this._credentialsAndIdentityId=void 0}async getCredentialsAndIdentityId(e){const n=e.authenticated,{tokens:r}=e,{authConfig:s}=e;try{Wm(s?.Cognito)}catch{return}if(!n&&!s.Cognito.allowGuestAccess)return;const{forceRefresh:o}=e,a=this.hasTokenChanged(r),u=await oZ({tokens:r,authConfig:s.Cognito,identityIdStore:this._identityIdStore});return(o||a)&&this.clearCredentials(),n?(KV(r),this.credsForOIDCTokens(s.Cognito,r,u)):this.getGuestCredentials(u,s.Cognito)}async getGuestCredentials(e,n){if(this._credentialsAndIdentityId&&!this.isPastTTL()&&this._credentialsAndIdentityId.isAuthenticatedCreds===!1)return qg.info("returning stored credentials as they neither past TTL nor expired."),this._credentialsAndIdentityId;this.clearCredentials();const r=zx(n.identityPoolId),s=fM({endpointResolver:Gx({endpointOverride:n.identityPoolEndpoint})});let o;try{o=await s({region:r},{IdentityId:e})}catch(a){throw Os(a),new Le(a)}if(o?.Credentials?.AccessKeyId&&o?.Credentials?.SecretKey){this._nextCredentialsRefresh=new Date().getTime()+YM;const a={credentials:{accessKeyId:o.Credentials.AccessKeyId,secretAccessKey:o.Credentials.SecretKey,sessionToken:o.Credentials.SessionToken,expiration:o.Credentials.Expiration},identityId:e};return o.IdentityId&&(a.identityId=o.IdentityId,this._identityIdStore.storeIdentityId({id:o.IdentityId,type:"guest"})),this._credentialsAndIdentityId={...a,isAuthenticatedCreds:!1},a}else throw new Le({name:"CredentialsNotFoundException",message:"Cognito did not respond with either Credentials, AccessKeyId or SecretKey."})}async credsForOIDCTokens(e,n,r){if(this._credentialsAndIdentityId&&!this.isPastTTL()&&this._credentialsAndIdentityId.isAuthenticatedCreds===!0)return qg.debug("returning stored credentials as they neither past TTL nor expired."),this._credentialsAndIdentityId;this.clearCredentials();const s=n.idToken?b8(n.idToken.toString()):{},o=zx(e.identityPoolId),a=fM({endpointResolver:Gx({endpointOverride:e.identityPoolEndpoint})});let u;try{u=await a({region:o},{IdentityId:r,Logins:s})}catch(c){throw Os(c),new Le(c)}if(u?.Credentials?.AccessKeyId&&u?.Credentials?.SecretKey){this._nextCredentialsRefresh=new Date().getTime()+YM;const c={credentials:{accessKeyId:u.Credentials.AccessKeyId,secretAccessKey:u.Credentials.SecretKey,sessionToken:u.Credentials.SessionToken,expiration:u.Credentials.Expiration},identityId:r};return u.IdentityId&&(c.identityId=u.IdentityId,this._identityIdStore.storeIdentityId({id:u.IdentityId,type:"primary"})),this._credentialsAndIdentityId={...c,isAuthenticatedCreds:!0,associatedIdToken:n.idToken?.toString()},c}else throw new Le({name:"CredentialsException",message:"Cognito did not respond with either Credentials, AccessKeyId or SecretKey."})}isPastTTL(){return this._nextCredentialsRefresh===void 0?!0:this._nextCredentialsRefresh<=Date.now()}hasTokenChanged(e){return!!e&&!!this._credentialsAndIdentityId?.associatedIdToken&&e.idToken?.toString()!==this._credentialsAndIdentityId.associatedIdToken}}const aZ=new S8(new y8(tp)),E8={configure(t,e){const n=E6(t),r=new xV({sameSite:"lax"}),s=e?.ssr?r:tp,o=e?.ssr?new S8(new y8(r)):aZ;if(!n.Auth||e?.Auth){$t.configure(n,e);return}Gm.setAuthConfig(n.Auth),Gm.setKeyValueStorage(s),$t.configure(n,{...e,Auth:{tokenProvider:Gm,credentialsProvider:o}})},getConfig(){return $t.getConfig()}},Dy=()=>{const t=globalThis.__REMIT_CONFIG__??{};return{apiUrl:t.apiUrl??"/api",appOrigin:t.appOrigin??"",betterAuthEnabled:t.betterAuthEnabled??!1,cognito:{userPoolId:t.cognito?.userPoolId??"",clientId:t.cognito?.clientId??"",domain:t.cognito?.domain??"",region:t.cognito?.region??""},rum:{appMonitorId:t.rum?.appMonitorId??"",identityPoolId:t.rum?.identityPoolId??"",region:t.rum?.region??"eu-west-1"},mailboxPollIntervalSeconds:t.mailboxPollIntervalSeconds!=null?String(t.mailboxPollIntervalSeconds):void 0,disableDevtools:t.disableDevtools??!1}},lZ=()=>{const t=Dy(),{userPoolId:e,clientId:n,domain:r,region:s}=t.cognito;return!e||!n?null:{userPoolId:e,userPoolClientId:n,domain:r,region:s,appOrigin:t.appOrigin}},Kx=lZ(),Ly=()=>Kx!==null,C8=()=>{if(!Kx){console.warn("[auth] Cognito user pool is not configured. Running in local dev mode without Cognito auth.");return}const{userPoolId:t,userPoolClientId:e,domain:n,appOrigin:r}=Kx;E8.configure({Auth:{Cognito:{userPoolId:t,userPoolClientId:e,loginWith:n?{oauth:{domain:n,scopes:["openid","email","profile"],redirectSignIn:r?[r]:[],redirectSignOut:r?[r]:[],responseType:"code"}}:void 0}}})};var uZ={};const Zm=Object.create(null),_f=t=>uZ||globalThis.Deno?.env.toObject()||globalThis.__env__||(t?Zm:globalThis),ma=new Proxy(Zm,{get(t,e){return _f()[e]??Zm[e]},has(t,e){return e in _f()||e in Zm},set(t,e,n){const r=_f(!0);return r[e]=n,!0},deleteProperty(t,e){if(!e)return!1;const n=_f(!0);return delete n[e],!0},ownKeys(){const t=_f(!0);return Object.keys(t)}});ma.NODE_ENV;var Xm=class extends Error{constructor(t,e){super(t,e),this.name="BetterAuthError",this.message=t,this.stack=""}};const cZ=47;function w8(t){let e=t.length;for(;e>0&&t.charCodeAt(e-1)===cZ;)e--;return e===t.length?t:t.slice(0,e)}function dZ(t){try{return(w8(new URL(t).pathname)||"/")!=="/"}catch{throw new Xm(`Invalid base URL: ${t}. Please provide a valid base URL.`)}}function fZ(t){try{const e=new URL(t);if(e.protocol!=="http:"&&e.protocol!=="https:")throw new Xm(`Invalid base URL: ${t}. URL must include 'http://' or 'https://'`)}catch(e){throw e instanceof Xm?e:new Xm(`Invalid base URL: ${t}. Please provide a valid base URL.`,{cause:e})}}function ZM(t,e="/api/auth"){if(fZ(t),dZ(t))return t;const n=w8(t);return!e||e==="/"?n:(e=e.startsWith("/")?e:`/${e}`,`${n}${e}`)}function hZ(t,e,n,r,s){{const o=ma.BETTER_AUTH_URL||ma.NEXT_PUBLIC_BETTER_AUTH_URL||ma.PUBLIC_BETTER_AUTH_URL||ma.NUXT_PUBLIC_BETTER_AUTH_URL||ma.NUXT_PUBLIC_AUTH_URL||(ma.BASE_URL!=="/"?ma.BASE_URL:void 0);if(o)return ZM(o,e)}if(typeof window<"u"&&window.location)return ZM(window.location.origin,e)}const pZ={proto:/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,constructor:/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,protoShort:/"__proto__"\s*:/,constructorShort:/"constructor"\s*:/},gZ=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,XM={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:Number.POSITIVE_INFINITY,"-infinity":Number.NEGATIVE_INFINITY},mZ=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function vZ(t){return t instanceof Date&&!isNaN(t.getTime())}function yZ(t){const e=mZ.exec(t);if(!e)return null;const[,n,r,s,o,a,u,c,f,h,g]=e,m=new Date(Date.UTC(parseInt(n,10),parseInt(r,10)-1,parseInt(s,10),parseInt(o,10),parseInt(a,10),parseInt(u,10),c?parseInt(c.padEnd(3,"0"),10):0));if(f){const y=(parseInt(h,10)*60+parseInt(g,10))*(f==="+"?-1:1);m.setUTCMinutes(m.getUTCMinutes()+y)}return vZ(m)?m:null}function bZ(t,e={}){const{strict:n=!1,warnings:r=!1,reviver:s,parseDates:o=!0}=e;if(typeof t!="string")return t;const a=t.trim(),u=a.toLowerCase();if(u.length<=9&&u in XM)return XM[u];if(!gZ.test(a)){if(n)throw new SyntaxError("[better-json] Invalid JSON");return t}if(Object.entries(pZ).some(([c,f])=>{const h=f.test(a);return h&&r&&console.warn(`[better-json] Detected potential prototype pollution attempt using ${c} pattern`),h})&&n)throw new Error("[better-json] Potential prototype pollution attempt detected");try{return JSON.parse(a,(f,h)=>{if(f==="__proto__"||f==="constructor"&&h&&typeof h=="object"&&"prototype"in h){r&&console.warn(`[better-json] Dropping "${f}" key to prevent prototype pollution`);return}if(o&&typeof h=="string"){const g=yZ(h);if(g)return g}return s?s(f,h):h})}catch(c){if(n)throw c;return t}}function SZ(t,e={strict:!0}){return bZ(t,e)}const EZ=["javascript:","data:","vbscript:"];function CZ(t){let e;try{e=new URL(t)}catch{return!0}return!EZ.includes(e.protocol)}const wZ={id:"redirect",name:"Redirect",hooks:{onSuccess(t){if(t.data?.url&&t.data?.redirect&&CZ(t.data.url)&&typeof window<"u"&&window.location&&window.location)try{window.location.href=t.data.url}catch{}}}};let Gs=[],va=0;const Qm=4,xZ=globalThis.nanostoresGlobal||={epoch:0};let _Z=()=>{for(va=0;va<Gs.length;va+=Qm)Gs[va](Gs[va+1].value,Gs[va+2],Gs[va+3]);Gs.length=0};const QM=t=>{let e=[],n={get(){return n.lc||n.listen(()=>{})(),n.value},init:t,lc:0,listen(r){return n.lc=e.push(r),()=>{for(let o=va+Qm;o<Gs.length;)Gs[o]===r?Gs.splice(o,Qm):o+=Qm;let s=e.indexOf(r);~s&&(e.splice(s,1),--n.lc||n.off())}},notify(r,s){xZ.epoch++;let o=!Gs.length&&!0;for(let a of e)Gs.push(a,n,r,s);o&&_Z()},off(){},set(r){let s=n.value;s!==r&&(n.value=r,n.notify(s))},subscribe(r){let s=n.listen(r);return r(n.value),s},value:t};return n},AZ=2,TZ=5,Wg=6,Vg=10;let x8=(t,e,n,r)=>(t.events=t.events||{},t.events[n+Vg]||(t.events[n+Vg]=r(s=>{t.events[n].reduceRight((o,a)=>(a(o),o),{shared:{},...s})})),t.events[n]=t.events[n]||[],t.events[n].push(e),()=>{let s=t.events[n],o=s.indexOf(e);s.splice(o,1),s.length||(delete t.events[n],t.events[n+Vg](),delete t.events[n+Vg])}),RZ=(t,e)=>x8(t,e,AZ,n=>{let r=t.set,s=t.setKey;return t.setKey&&(t.setKey=(o,a)=>{let u;if(n({abort:()=>{u=!0},changed:o,newValue:{...t.value,[o]:a}}),!u)return s(o,a)}),t.set=o=>{let a;if(n({abort:()=>{a=!0},newValue:o}),!a)return r(o)},()=>{t.set=r,t.setKey=s}});const IZ=1e3;let OZ=(t,e)=>x8(t,r=>{let s=e(r);s&&t.events[Wg].push(s)},TZ,r=>{let s=t.listen;t.listen=(...a)=>(!t.lc&&!t.active&&(t.active=!0,r()),s(...a));let o=t.off;return t.events[Wg]=[],t.off=()=>{o(),setTimeout(()=>{if(t.active&&!t.lc){t.active=!1;for(let a of t.events[Wg])a();t.events[Wg]=[]}},IZ)},()=>{t.listen=s,t.off=o}});function NZ(t,e,n){let r=new Set(e);return t.listen((s,o,a)=>{(a===void 0?e.some(u=>s[u]!==o[u]):r.has(a)||r.has(a.split(/\.|\[/)[0]))&&n(s,o,a)})}function JM(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return e===Object.prototype||e===null}function wv(t,e){if(t===e)return!0;if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(!wv(t[n],e[n]))return!1;return!0}if(JM(t)&&JM(e)){const n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(const s of n)if(!(s in e)||!wv(t[s],e[s]))return!1;return!0}return!1}function MZ(t,e){return RZ(t,({newValue:n,abort:r})=>{e(t.value,n)&&r()})}const K1=Symbol.for("better-auth:broadcast-channel"),PZ=()=>Math.floor(Date.now()/1e3);var kZ=class{listeners=new Set;name;constructor(t="better-auth.message"){this.name=t}subscribe(t){return this.listeners.add(t),()=>{this.listeners.delete(t)}}post(t){if(!(typeof window>"u"))try{localStorage.setItem(this.name,JSON.stringify({...t,timestamp:PZ()}))}catch{}}setup(){if(typeof window>"u"||typeof window.addEventListener>"u")return()=>{};const t=e=>{if(e.key!==this.name)return;const n=JSON.parse(e.newValue??"{}");n?.event!=="session"||!n?.data||this.listeners.forEach(r=>r(n))};return window.addEventListener("storage",t),()=>{window.removeEventListener("storage",t)}}};function Y1(t="better-auth.message"){return globalThis[K1]||(globalThis[K1]=new kZ(t)),globalThis[K1]}const Z1=Symbol.for("better-auth:focus-manager");var DZ=class{listeners=new Set;subscribe(t){return this.listeners.add(t),()=>{this.listeners.delete(t)}}setFocused(t){this.listeners.forEach(e=>e(t))}setup(){if(typeof window>"u"||typeof document>"u"||typeof window.addEventListener>"u")return()=>{};const t=()=>{document.visibilityState==="visible"&&this.setFocused(!0)};return document.addEventListener("visibilitychange",t,!1),()=>{document.removeEventListener("visibilitychange",t,!1)}}};function eP(){return globalThis[Z1]||(globalThis[Z1]=new DZ),globalThis[Z1]}const X1=Symbol.for("better-auth:online-manager");var LZ=class{listeners=new Set;isOnline=typeof navigator<"u"?navigator.onLine:!0;subscribe(t){return this.listeners.add(t),()=>{this.listeners.delete(t)}}setOnline(t){this.isOnline=t,this.listeners.forEach(e=>e(t))}setup(){if(typeof window>"u"||typeof window.addEventListener>"u")return()=>{};const t=()=>this.setOnline(!0),e=()=>this.setOnline(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",e,!1),()=>{window.removeEventListener("online",t,!1),window.removeEventListener("offline",e,!1)}}};function Q1(){return globalThis[X1]||(globalThis[X1]=new LZ),globalThis[X1]}const J1=()=>Math.floor(Date.now()/1e3),UZ=5;function FZ(t){const{fetchSession:e,shouldPollSession:n=()=>!0,sessionSignal:r,options:s={}}=t,o=s.sessionOptions?.refetchInterval??0,a=s.sessionOptions?.refetchOnWindowFocus??!0,u=s.sessionOptions?.refetchWhenOffline??!1,c={isInitialized:!1,lastSessionRequest:0},f=()=>u||Q1().isOnline,h=T=>{if(f()){if(T?.event==="storage"){e();return}if(T?.event==="poll"){c.lastSessionRequest=J1(),e();return}if(T?.event==="visibilitychange"){if(J1()-c.lastSessionRequest<UZ)return;c.lastSessionRequest=J1(),e();return}e()}},g=T=>{Y1().post({event:"session",data:{trigger:T},clientId:Math.random().toString(36).substring(7)})},m=()=>{o&&o>0&&(c.pollInterval=setInterval(()=>{n()&&h({event:"poll"})},o*1e3))},y=()=>{c.unsubscribeBroadcast=Y1().subscribe(()=>{h({event:"storage"})})},S=()=>{a&&(c.unsubscribeFocus=eP().subscribe(()=>{h({event:"visibilitychange"})}))},E=()=>{c.unsubscribeOnline=Q1().subscribe(T=>{T&&h({event:"visibilitychange"})})},C=()=>{c.unsubscribeSignal=r.listen(()=>{e()})};return{init:()=>{c.isInitialized||(c.isInitialized=!0,m(),y(),S(),E(),C(),c.cleanupBroadcastSetup=Y1().setup(),c.cleanupFocusSetup=eP().setup(),c.cleanupOnlineSetup=Q1().setup())},cleanup:()=>{c.isInitialized&&(c.pollInterval&&(clearInterval(c.pollInterval),c.pollInterval=void 0),c.unsubscribeBroadcast&&(c.unsubscribeBroadcast(),c.unsubscribeBroadcast=void 0),c.unsubscribeFocus&&(c.unsubscribeFocus(),c.unsubscribeFocus=void 0),c.unsubscribeOnline&&(c.unsubscribeOnline(),c.unsubscribeOnline=void 0),c.unsubscribeSignal&&(c.unsubscribeSignal(),c.unsubscribeSignal=void 0),c.cleanupBroadcastSetup&&(c.cleanupBroadcastSetup(),c.cleanupBroadcastSetup=void 0),c.cleanupFocusSetup&&(c.cleanupFocusSetup(),c.cleanupFocusSetup=void 0),c.cleanupOnlineSetup&&(c.cleanupOnlineSetup(),c.cleanupOnlineSetup=void 0),c.isInitialized=!1,c.lastSessionRequest=0)},triggerRefetch:h,broadcastSessionUpdate:g}}const zZ=()=>typeof window>"u";function tP(t){return typeof t=="object"&&t!==null&&"data"in t&&"error"in t?t:{data:t,error:null}}function jZ(t){return!t||t.session===null&&t.user===null?null:t}function BZ(t,e){return wv(t.data,e.data)&&t.error===e.error&&t.isPending===e.isPending&&t.isRefetching===e.isRefetching&&t.refetch===e.refetch}function HZ(t,e){const n=QM(!1);let r;const s=f=>u(f),o=QM({data:null,error:null,isPending:!0,isRefetching:!1,refetch:s});MZ(o,BZ);const a=f=>{if(r!==f)return;const h=o.get();r=void 0,!(!h.isPending&&!h.isRefetching)&&o.set({...h,isPending:!1,isRefetching:!1,refetch:s})},u=async f=>{r?.abort();const h=new AbortController;r=h;const g=o.get();o.set({...g,isPending:g.data===null,isRefetching:!0,error:null,refetch:s});try{const m=await t("/get-session",{method:"GET",query:f?.query,signal:h.signal});if(h.signal.aborted){a(h);return}let{data:y,error:S}=tP(m);if(y?.needsRefresh)try{const x=await t("/get-session",{method:"POST",signal:h.signal});if(h.signal.aborted){a(h);return}({data:y,error:S}=tP(x))}catch{if(h.signal.aborted){a(h);return}}if(S){const x=o.get(),T=S?.status===401;o.set({data:T?null:x.data,error:S,isPending:!1,isRefetching:!1,refetch:s});return}const E=jZ(y),C=o.get(),w=C.data!=null&&E!=null&&wv(C.data,E)?C.data:E;o.set({data:w,error:null,isPending:!1,isRefetching:!1,refetch:s})}catch(m){if(h.signal.aborted){a(h);return}const y=o.get();o.set({data:y.data,error:m,isPending:!1,isRefetching:!1,refetch:s})}};let c=()=>{};return OZ(o,()=>{let f;zZ()||(f=setTimeout(()=>{u()},0));const h=FZ({fetchSession:u,shouldPollSession:()=>o.get().data!=null,sessionSignal:n,options:e});return h.init(),c=h.broadcastSessionUpdate,()=>{f&&clearTimeout(f);const g=r;g?.abort(),g&&a(g),h.cleanup()}}),{session:o,$sessionSignal:n,broadcastSessionUpdate:f=>c(f)}}function eS(t){if(t===null||typeof t!="object")return!1;const e=Object.getPrototypeOf(t);return e!==null&&e!==Object.prototype&&Object.getPrototypeOf(e)!==null||Symbol.iterator in t?!1:Symbol.toStringTag in t?Object.prototype.toString.call(t)==="[object Module]":!0}function Yx(t,e,n=".",r){if(!eS(e))return Yx(t,{},n,r);const s={...e};for(const o of Object.keys(t)){if(o==="__proto__"||o==="constructor")continue;const a=t[o];a!=null&&(r&&r(s,o,a,n)||(Array.isArray(a)&&Array.isArray(s[o])?s[o]=[...a,...s[o]]:eS(a)&&eS(s[o])?s[o]=Yx(a,s[o],(n?`${n}.`:"")+o.toString(),r):s[o]=a))}return s}function $Z(t){return(...e)=>e.reduce((n,r)=>Yx(n,r,"",t),{})}const qZ=$Z();var WZ=Object.defineProperty,VZ=Object.defineProperties,GZ=Object.getOwnPropertyDescriptors,nP=Object.getOwnPropertySymbols,KZ=Object.prototype.hasOwnProperty,YZ=Object.prototype.propertyIsEnumerable,rP=(t,e,n)=>e in t?WZ(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ws=(t,e)=>{for(var n in e||(e={}))KZ.call(e,n)&&rP(t,n,e[n]);if(nP)for(var n of nP(e))YZ.call(e,n)&&rP(t,n,e[n]);return t},So=(t,e)=>VZ(t,GZ(e)),ZZ=class extends Error{constructor(t,e,n){super(e||t.toString(),{cause:n}),this.status=t,this.statusText=e,this.error=n,Error.captureStackTrace(this,this.constructor)}},XZ=async(t,e)=>{var n,r,s,o,a,u;let c=e||{};const f={onRequest:[e?.onRequest],onResponse:[e?.onResponse],onSuccess:[e?.onSuccess],onError:[e?.onError],onRetry:[e?.onRetry]};if(!e||!e?.plugins)return{url:t,options:c,hooks:f};for(const h of e?.plugins||[]){if(h.init){const g=await((n=h.init)==null?void 0:n.call(h,t.toString(),e));c=g.options||c,t=g.url}f.onRequest.push((r=h.hooks)==null?void 0:r.onRequest),f.onResponse.push((s=h.hooks)==null?void 0:s.onResponse),f.onSuccess.push((o=h.hooks)==null?void 0:o.onSuccess),f.onError.push((a=h.hooks)==null?void 0:a.onError),f.onRetry.push((u=h.hooks)==null?void 0:u.onRetry)}return{url:t,options:c,hooks:f}},sP=class{constructor(t){this.options=t}shouldAttemptRetry(t,e){return this.options.shouldRetry?Promise.resolve(t<this.options.attempts&&this.options.shouldRetry(e)):Promise.resolve(t<this.options.attempts)}getDelay(){return this.options.delay}},QZ=class{constructor(t){this.options=t}shouldAttemptRetry(t,e){return this.options.shouldRetry?Promise.resolve(t<this.options.attempts&&this.options.shouldRetry(e)):Promise.resolve(t<this.options.attempts)}getDelay(t){return Math.min(this.options.maxDelay,this.options.baseDelay*2**t)}};function JZ(t){if(typeof t=="number")return new sP({type:"linear",attempts:t,delay:1e3});switch(t.type){case"linear":return new sP(t);case"exponential":return new QZ(t);default:throw new Error("Invalid retry strategy")}}var eX=async t=>{const e={},n=async r=>typeof r=="function"?await r():r;if(t?.auth){if(t.auth.type==="Bearer"){const r=await n(t.auth.token);if(!r)return e;e.authorization=`Bearer ${r}`}else if(t.auth.type==="Basic"){const[r,s]=await Promise.all([n(t.auth.username),n(t.auth.password)]);if(!r||!s)return e;e.authorization=`Basic ${btoa(`${r}:${s}`)}`}else if(t.auth.type==="Custom"){const[r,s]=await Promise.all([n(t.auth.prefix),n(t.auth.value)]);if(!s)return e;e.authorization=`${r??""} ${s}`}}return e},tX=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function nX(t){const e=t.headers.get("content-type"),n=new Set(["image/svg","application/xml","application/xhtml","application/html"]);if(!e)return"json";const r=e.split(";").shift()||"";return tX.test(r)?"json":n.has(r)||r.startsWith("text/")?"text":"blob"}function rX(t){try{return JSON.parse(t),!0}catch{return!1}}function _8(t){if(t===void 0)return!1;const e=typeof t;return e==="string"||e==="number"||e==="boolean"||e===null?!0:e!=="object"?!1:Array.isArray(t)?!0:t.buffer?!1:t.constructor&&t.constructor.name==="Object"||typeof t.toJSON=="function"}function oP(t){try{return JSON.parse(t)}catch{return t}}function iP(t){return typeof t=="function"}function sX(t){if(t?.customFetchImpl)return t.customFetchImpl;if(typeof globalThis<"u"&&iP(globalThis.fetch))return globalThis.fetch;if(typeof window<"u"&&iP(window.fetch))return window.fetch;throw new Error("No fetch implementation found")}function A8(...t){const e={};for(const n of t)if(n)if(n instanceof Headers)n.forEach((r,s)=>{e[s]=r});else{const r=Array.isArray(n)?n:Object.entries(n);for(const[s,o]of r)o!=null&&(e[s]=o)}return e}async function oX(t){const e=new Headers(A8(t?.headers,await eX(t)));if(!e.has("content-type")){const n=iX(t?.body);n&&e.set("content-type",n)}return e}function iX(t){return _8(t)?"application/json":null}function aX(t){const e=t.get("content-type");return e?e.split(";")[0].trim().toLowerCase():null}function lX(t,e){const{body:n}=t;return n?!_8(n)||typeof n=="string"?n:aX(e)==="application/x-www-form-urlencoded"?new URLSearchParams(n).toString():JSON.stringify(n):null}function uX(t,e){var n;if(e?.method)return e.method.toUpperCase();if(t.startsWith("@")){const r=(n=t.split("@")[1])==null?void 0:n.split("/")[0];return R8.includes(r)?r.toUpperCase():e?.body?"POST":"GET"}return e?.body?"POST":"GET"}function cX(t,e){let n;return!t?.signal&&t?.timeout&&(n=setTimeout(()=>e?.abort(),t?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var dX=class T8 extends Error{constructor(e,n){super(n||JSON.stringify(e,null,2)),this.issues=e,Object.setPrototypeOf(this,T8.prototype)}};async function Yf(t,e){const n=await t["~standard"].validate(e);if(n.issues)throw new dX(n.issues);return n.value}var R8=["get","post","put","patch","delete"],fX=t=>({id:"apply-schema",name:"Apply Schema",version:"1.0.0",async init(e,n){var r,s,o,a;const u=((s=(r=t.plugins)==null?void 0:r.find(c=>{var f;return(f=c.schema)!=null&&f.config?e.startsWith(c.schema.config.baseURL||"")||e.startsWith(c.schema.config.prefix||""):!1}))==null?void 0:s.schema)||t.schema;if(u){let c=e;(o=u.config)!=null&&o.prefix&&c.startsWith(u.config.prefix)&&(c=c.replace(u.config.prefix,""),u.config.baseURL&&(e=e.replace(u.config.prefix,u.config.baseURL))),(a=u.config)!=null&&a.baseURL&&c.startsWith(u.config.baseURL)&&(c=c.replace(u.config.baseURL,"")),c.startsWith("/")&&c.charAt(1)==="@"&&(c=c.substring(1));const f=u.schema[c];if(f){let h=n?.headers;if(f.headers&&!n?.disableValidation){const m={};if(n?.headers){if(n.headers instanceof Headers)n.headers.forEach((E,C)=>{m[C.toLowerCase()]=E});else if(typeof n.headers=="object")for(const[E,C]of Object.entries(n.headers))C!=null&&(m[E.toLowerCase()]=C)}const y=await Yf(f.headers,m),S={};for(const[E,C]of Object.entries(y))S[E.toLowerCase()]=C;h=S}let g=So(Ws({},n),{method:f.method,output:f.output,headers:h});return n?.disableValidation||(g=So(Ws({},g),{body:f.input?await Yf(f.input,n?.body):n?.body,params:f.params?await Yf(f.params,n?.params):n?.params,query:f.query?await Yf(f.query,n?.query):n?.query})),{url:e,options:g}}}return{url:e,options:n}}}),hX=t=>{async function e(n,r){const s=So(Ws(Ws({},t),r),{headers:A8(t?.headers,r?.headers),plugins:[...t?.plugins||[],fX(t||{}),...r?.plugins||[]]});if(t?.catchAllError)try{return await Zx(n,s)}catch(o){return{data:null,error:{status:500,statusText:"Fetch Error",message:"Fetch related error. Captured by catchAllError option. See error property for more details.",error:o}}}return await Zx(n,s)}return e},pX=t=>t==="."||t==="..";function gX(t,e){let n=t;for(const[r,s]of e)n=n.replace(r,s);if(pX(n))throw new TypeError("Path parameters cannot be reserved path segments");return encodeURIComponent(n)}function mX(t,e){const{baseURL:n,params:r,query:s}=e||{query:{},params:{},baseURL:""};let o=t.startsWith("http")?t.split("/").slice(0,3).join("/"):n||"";if(t.startsWith("@")){const m=t.toString().split("@")[1].split("/")[0];R8.includes(m)&&(t=t.replace(`@${m}/`,"/"))}o.endsWith("/")||(o+="/");let[a,u]=t.replace(o,"").split("?");const c=new URLSearchParams(u);for(const[m,y]of Object.entries(s||{})){if(y==null)continue;let S;if(typeof y=="string")S=y;else if(Array.isArray(y)){for(const E of y)c.append(m,E);continue}else S=JSON.stringify(y);c.set(m,S)}const f=new Map;if(r)if(Array.isArray(r)){const m=a.split("/").filter(y=>y.startsWith(":"));for(const[y,S]of m.entries()){const E=r[y];f.set(S,String(E))}}else for(const[m,y]of Object.entries(r))f.set(`:${m}`,String(y));a=a.split("/").map(m=>gX(m,f)).join("/"),a=a.replace(/^\/+/,"");let h=c.toString();return h=h.length>0?`?${h}`.replace(/\+/g,"%20"):"",o.startsWith("http")?new URL(`${a}${h}`,o):`${o}${a}${h}`}var Zx=async(t,e)=>{var n,r,s,o,a,u,c,f;const{hooks:h,url:g,options:m}=await XZ(t,e),y=sX(m),S=new AbortController,E=(n=m.signal)!=null?n:S.signal,C=mX(g,m),w=await oX(m),x=lX(m,w),T=uX(g,m),R=So(Ws({},m),{url:C,headers:w,body:x,method:T,signal:E});for(const q of h.onRequest)if(q){const K=await q(R);typeof K=="object"&&K!==null&&Object.assign(R,K)}("pipeTo"in R&&typeof R.pipeTo=="function"||typeof((r=e?.body)==null?void 0:r.pipe)=="function")&&("duplex"in R||(R.duplex="half"));const{clearTimeout:M}=cX(m,S);let N=await y(R.url,R);M();const O={response:N,request:R};for(const q of h.onResponse)if(q){const K=await q(So(Ws({},O),{response:(s=e?.hookOptions)!=null&&s.cloneResponse?N.clone():N}));K instanceof Response?N=K:typeof K=="object"&&K!==null&&(N=K.response)}if(N.ok){if(!(R.method!=="HEAD"))return{data:"",error:null};const K=nX(N),Y={data:null,response:N,request:R};if(K==="json"||K==="text"){const H=await N.text(),te=(o=R.jsonParser)!=null?o:oP;Y.data=await te(H)}else Y.data=await N[K]();R?.output&&R.output&&!R.disableValidation&&(Y.data=await Yf(R.output,Y.data));for(const H of h.onSuccess)H&&await H(So(Ws({},Y),{response:(a=e?.hookOptions)!=null&&a.cloneResponse?N.clone():N}));return e?.throw?Y.data:{data:Y.data,error:null}}const k=(u=e?.jsonParser)!=null?u:oP,F=await N.text(),$=rX(F),D=$?await k(F):null,z={response:N,responseText:F,request:R,error:So(Ws({},D),{status:N.status,statusText:N.statusText})};for(const q of h.onError)q&&await q(So(Ws({},z),{response:(c=e?.hookOptions)!=null&&c.cloneResponse?N.clone():N}));if(e?.retry){const q=JZ(e.retry),K=(f=e.retryAttempt)!=null?f:0;if(await q.shouldAttemptRetry(K,N)){for(const H of h.onRetry)H&&await H(O);const Y=q.getDelay(K);return await new Promise(H=>setTimeout(H,Y)),await Zx(t,So(Ws({},e),{retryAttempt:K+1}))}}if(e?.throw)throw new ZZ(N.status,N.statusText,$?D:F);return{data:null,error:So(Ws({},D),{status:N.status,statusText:N.statusText})}},vl={};const vX=t=>{if(typeof process>"u")return;const e="/api/auth";if(vl.NEXT_PUBLIC_AUTH_URL)return vl.NEXT_PUBLIC_AUTH_URL;if(typeof window>"u"){if(vl.NEXTAUTH_URL)try{return vl.NEXTAUTH_URL}catch{}if(vl.VERCEL_URL)try{const n=vl.VERCEL_URL.startsWith("http")?"":"https://";return`${new URL(`${n}${vl.VERCEL_URL}`).origin}${e}`}catch{}}},yX=(t,e)=>{const n="credentials"in Request.prototype,r=hZ(t?.baseURL,t?.basePath)??vX()??"/api/auth",s=[],o={id:"lifecycle-hooks",name:"lifecycle-hooks",hooks:{onSuccess:t?.fetchOptions?.onSuccess,onError:t?.fetchOptions?.onError,onRequest:t?.fetchOptions?.onRequest,onResponse:t?.fetchOptions?.onResponse}},{onSuccess:a,onError:u,onRequest:c,onResponse:f,...h}={},g=hX({baseURL:r,...n?{credentials:"include"}:{},method:"GET",jsonParser(M){return M?SZ(M,{strict:!1}):null},customFetchImpl:fetch,...h,plugins:[o,...h.plugins||[],wZ,...s]}),{$sessionSignal:m,session:y,broadcastSessionUpdate:S}=HZ(g,t),E=[];let C={};const w={$sessionSignal:m,session:y},x={"/sign-out":"POST","/revoke-sessions":"POST","/revoke-other-sessions":"POST","/delete-user":"POST"},T=[{signal:"$sessionSignal",matcher(M){return M==="/sign-out"||M==="/update-user"||M==="/update-session"||M==="/sign-up/email"||M==="/sign-in/email"||M==="/delete-user"||M==="/verify-email"||M==="/revoke-sessions"||M==="/revoke-session"||M==="/revoke-other-sessions"||M==="/change-email"||M==="/change-password"},callback(M){M==="/sign-out"?S("signout"):(M==="/update-user"||M==="/update-session")&&S("updateUser")}}];for(const M of E)M.getAtoms&&Object.assign(w,M.getAtoms?.(g)),M.pathMethods&&Object.assign(x,M.pathMethods),M.atomListeners&&T.push(...M.atomListeners);const R={notify:M=>{w[M].set(!w[M].get())},listen:(M,N)=>{w[M].subscribe(N)},atoms:w};for(const M of E)M.getActions&&(C=qZ(M.getActions?.(g,R,t)??{},C));return{get baseURL(){return r},pluginsActions:C,pluginsAtoms:w,pluginPathMethods:x,atomListeners:T,$fetch:g,$store:R}};function bX(t){return typeof t=="object"&&t!==null&&"get"in t&&typeof t.get=="function"&&"lc"in t&&typeof t.lc=="number"}function SX(t){return t.charAt(0).toUpperCase()+t.slice(1)}const EX=new RegExp("[\\p{Ll}\\d]+|\\p{Lu}+(?!\\p{Ll})|\\p{Lu}[\\p{Ll}\\d]+|\\p{Lo}+","gu"),CX=/['\u2019]/g;function wX(t){return t.replace(CX,"").match(EX)??[]}function xX(t){return wX(t).map(e=>e.toLowerCase()).join("-")}function _X(t,e,n){const r=e[t],{fetchOptions:s,query:o,...a}=n||{};return r||(s?.method?s.method:a&&Object.keys(a).length>0?"POST":"GET")}function AX(t,e,n,r,s){function o(a=[]){return new Proxy(function(){},{get(u,c){if(typeof c!="string"||c==="then"||c==="catch"||c==="finally")return;const f=[...a,c];let h=t;for(const g of f)if(h&&typeof h=="object"&&g in h)h=h[g];else{h=void 0;break}return typeof h=="function"||bX(h)?h:o(f)},apply:async(u,c,f)=>{const h="/"+a.map(xX).join("/"),g=f[0]||{},m=f[1]||{},{query:y,fetchOptions:S,...E}=g,C={...m,...S},w=_X(h,n,g);return await e(h,{...C,body:w==="GET"?void 0:{...E,...C?.body||{}},query:y||C?.query,method:w,async onSuccess(x){if(await C?.onSuccess?.(x),!s||C.disableSignal)return;const T=s.filter(M=>M.matcher(h));if(!T.length)return;const R=new Set;for(const M of T){const N=r[M.signal];if(!N)return;if(R.has(M.signal))continue;R.add(M.signal);const O=N.get();setTimeout(()=>{N.set(!O)},10),M.callback?.(h)}}})}})}return o()}var tS={exports:{}},Ve={};var aP;function TX(){if(aP)return Ve;aP=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),a=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),m=Symbol.iterator;function y(L){return L===null||typeof L!="object"?null:(L=m&&L[m]||L["@@iterator"],typeof L=="function"?L:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,C={};function w(L,G,Z){this.props=L,this.context=G,this.refs=C,this.updater=Z||S}w.prototype.isReactComponent={},w.prototype.setState=function(L,G){if(typeof L!="object"&&typeof L!="function"&&L!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,L,G,"setState")},w.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function x(){}x.prototype=w.prototype;function T(L,G,Z){this.props=L,this.context=G,this.refs=C,this.updater=Z||S}var R=T.prototype=new x;R.constructor=T,E(R,w.prototype),R.isPureReactComponent=!0;var M=Array.isArray;function N(){}var O={H:null,A:null,T:null,S:null},k=Object.prototype.hasOwnProperty;function F(L,G,Z){var ee=Z.ref;return{$$typeof:t,type:L,key:G,ref:ee!==void 0?ee:null,props:Z}}function $(L,G){return F(L.type,G,L.props)}function D(L){return typeof L=="object"&&L!==null&&L.$$typeof===t}function z(L){var G={"=":"=0",":":"=2"};return"$"+L.replace(/[=:]/g,function(Z){return G[Z]})}var q=/\/+/g;function K(L,G){return typeof L=="object"&&L!==null&&L.key!=null?z(""+L.key):G.toString(36)}function Y(L){switch(L.status){case"fulfilled":return L.value;case"rejected":throw L.reason;default:switch(typeof L.status=="string"?L.then(N,N):(L.status="pending",L.then(function(G){L.status==="pending"&&(L.status="fulfilled",L.value=G)},function(G){L.status==="pending"&&(L.status="rejected",L.reason=G)})),L.status){case"fulfilled":return L.value;case"rejected":throw L.reason}}throw L}function H(L,G,Z,ee,oe){var he=typeof L;(he==="undefined"||he==="boolean")&&(L=null);var ue=!1;if(L===null)ue=!0;else switch(he){case"bigint":case"string":case"number":ue=!0;break;case"object":switch(L.$$typeof){case t:case e:ue=!0;break;case h:return ue=L._init,H(ue(L._payload),G,Z,ee,oe)}}if(ue)return oe=oe(L),ue=ee===""?"."+K(L,0):ee,M(oe)?(Z="",ue!=null&&(Z=ue.replace(q,"$&/")+"/"),H(oe,G,Z,"",function(Xe){return Xe})):oe!=null&&(D(oe)&&(oe=$(oe,Z+(oe.key==null||L&&L.key===oe.key?"":(""+oe.key).replace(q,"$&/")+"/")+ue)),G.push(oe)),1;ue=0;var ve=ee===""?".":ee+":";if(M(L))for(var xe=0;xe<L.length;xe++)ee=L[xe],he=ve+K(ee,xe),ue+=H(ee,G,Z,he,oe);else if(xe=y(L),typeof xe=="function")for(L=xe.call(L),xe=0;!(ee=L.next()).done;)ee=ee.value,he=ve+K(ee,xe++),ue+=H(ee,G,Z,he,oe);else if(he==="object"){if(typeof L.then=="function")return H(Y(L),G,Z,ee,oe);throw G=String(L),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(L).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return ue}function te(L,G,Z){if(L==null)return L;var ee=[],oe=0;return H(L,ee,"","",function(he){return G.call(Z,he,oe++)}),ee}function fe(L){if(L._status===-1){var G=L._result;G=G(),G.then(function(Z){(L._status===0||L._status===-1)&&(L._status=1,L._result=Z)},function(Z){(L._status===0||L._status===-1)&&(L._status=2,L._result=Z)}),L._status===-1&&(L._status=0,L._result=G)}if(L._status===1)return L._result.default;throw L._result}var de=typeof reportError=="function"?reportError:function(L){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof L=="object"&&L!==null&&typeof L.message=="string"?String(L.message):String(L),error:L});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",L);return}console.error(L)},Ae={map:te,forEach:function(L,G,Z){te(L,function(){G.apply(this,arguments)},Z)},count:function(L){var G=0;return te(L,function(){G++}),G},toArray:function(L){return te(L,function(G){return G})||[]},only:function(L){if(!D(L))throw Error("React.Children.only expected to receive a single React element child.");return L}};return Ve.Activity=g,Ve.Children=Ae,Ve.Component=w,Ve.Fragment=n,Ve.Profiler=s,Ve.PureComponent=T,Ve.StrictMode=r,Ve.Suspense=c,Ve.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=O,Ve.__COMPILER_RUNTIME={__proto__:null,c:function(L){return O.H.useMemoCache(L)}},Ve.cache=function(L){return function(){return L.apply(null,arguments)}},Ve.cacheSignal=function(){return null},Ve.cloneElement=function(L,G,Z){if(L==null)throw Error("The argument must be a React element, but you passed "+L+".");var ee=E({},L.props),oe=L.key;if(G!=null)for(he in G.key!==void 0&&(oe=""+G.key),G)!k.call(G,he)||he==="key"||he==="__self"||he==="__source"||he==="ref"&&G.ref===void 0||(ee[he]=G[he]);var he=arguments.length-2;if(he===1)ee.children=Z;else if(1<he){for(var ue=Array(he),ve=0;ve<he;ve++)ue[ve]=arguments[ve+2];ee.children=ue}return F(L.type,oe,ee)},Ve.createContext=function(L){return L={$$typeof:a,_currentValue:L,_currentValue2:L,_threadCount:0,Provider:null,Consumer:null},L.Provider=L,L.Consumer={$$typeof:o,_context:L},L},Ve.createElement=function(L,G,Z){var ee,oe={},he=null;if(G!=null)for(ee in G.key!==void 0&&(he=""+G.key),G)k.call(G,ee)&&ee!=="key"&&ee!=="__self"&&ee!=="__source"&&(oe[ee]=G[ee]);var ue=arguments.length-2;if(ue===1)oe.children=Z;else if(1<ue){for(var ve=Array(ue),xe=0;xe<ue;xe++)ve[xe]=arguments[xe+2];oe.children=ve}if(L&&L.defaultProps)for(ee in ue=L.defaultProps,ue)oe[ee]===void 0&&(oe[ee]=ue[ee]);return F(L,he,oe)},Ve.createRef=function(){return{current:null}},Ve.forwardRef=function(L){return{$$typeof:u,render:L}},Ve.isValidElement=D,Ve.lazy=function(L){return{$$typeof:h,_payload:{_status:-1,_result:L},_init:fe}},Ve.memo=function(L,G){return{$$typeof:f,type:L,compare:G===void 0?null:G}},Ve.startTransition=function(L){var G=O.T,Z={};O.T=Z;try{var ee=L(),oe=O.S;oe!==null&&oe(Z,ee),typeof ee=="object"&&ee!==null&&typeof ee.then=="function"&&ee.then(N,de)}catch(he){de(he)}finally{G!==null&&Z.types!==null&&(G.types=Z.types),O.T=G}},Ve.unstable_useCacheRefresh=function(){return O.H.useCacheRefresh()},Ve.use=function(L){return O.H.use(L)},Ve.useActionState=function(L,G,Z){return O.H.useActionState(L,G,Z)},Ve.useCallback=function(L,G){return O.H.useCallback(L,G)},Ve.useContext=function(L){return O.H.useContext(L)},Ve.useDebugValue=function(){},Ve.useDeferredValue=function(L,G){return O.H.useDeferredValue(L,G)},Ve.useEffect=function(L,G){return O.H.useEffect(L,G)},Ve.useEffectEvent=function(L){return O.H.useEffectEvent(L)},Ve.useId=function(){return O.H.useId()},Ve.useImperativeHandle=function(L,G,Z){return O.H.useImperativeHandle(L,G,Z)},Ve.useInsertionEffect=function(L,G){return O.H.useInsertionEffect(L,G)},Ve.useLayoutEffect=function(L,G){return O.H.useLayoutEffect(L,G)},Ve.useMemo=function(L,G){return O.H.useMemo(L,G)},Ve.useOptimistic=function(L,G){return O.H.useOptimistic(L,G)},Ve.useReducer=function(L,G,Z){return O.H.useReducer(L,G,Z)},Ve.useRef=function(L){return O.H.useRef(L)},Ve.useState=function(L){return O.H.useState(L)},Ve.useSyncExternalStore=function(L,G,Z){return O.H.useSyncExternalStore(L,G,Z)},Ve.useTransition=function(){return O.H.useTransition()},Ve.version="19.2.7",Ve}var lP;function ip(){return lP||(lP=1,tS.exports=TX()),tS.exports}var A=ip();const j=Va(A),I8=m6({__proto__:null,default:j},[A]);function RX(t,e={}){const n=A.useRef(t.get()),{keys:r,deps:s=[t,r]}=e,o=A.useCallback(u=>{const c=f=>{n.current!==f&&(n.current=f,u())};return c(t.value),r?.length?NZ(t,r,c):t.listen(c)},s),a=()=>n.current;return A.useSyncExternalStore(o,a,a)}function IX(t){return`use${SX(t)}`}function OX(t){const{pluginPathMethods:e,pluginsActions:n,pluginsAtoms:r,$fetch:s,$store:o,atomListeners:a}=yX(t),u={};for(const[c,f]of Object.entries(r))u[IX(c)]=()=>RX(f);return AX({...n,...u,$fetch:s,$store:o},s,e,r,a)}const NX=10,kc=[],MX=["x-correlation-id","x-request-id","x-amzn-requestid","x-amzn-trace-id","apigw-requestid","x-trace-id"];function PX(t){const e=typeof t=="string"?t:t instanceof URL?t.href:t.url;try{return new URL(e,window.location.origin).pathname}catch{return e.split(/[?#]/)[0]}}function kX(t,e){return e?.method?e.method.toUpperCase():typeof t!="string"&&!(t instanceof URL)&&t.method?t.method.toUpperCase():"GET"}function DX(t){for(const e of MX){const n=t.headers.get(e);if(n)return n}}function LX(t){kc.push(t),kc.length>NX&&kc.shift()}function uP(t){const{input:e,init:n,response:r,durationMs:s}=t;LX({method:kX(e,n),path:PX(e),status:r?.status??0,durationMs:Math.round(s),correlationId:r?DX(r):void 0,timestamp:new Date().toISOString()})}function UX(){return kc.slice()}function FX(){for(let t=kc.length-1;t>=0;t--){const e=kc[t];if(e.status===0||e.status>=400)return e}}class rT extends Error{constructor(e){super(e instanceof Error&&e.message?e.message:"The request could not be completed.",{cause:e}),this.name="NetworkError"}}const zX=t=>typeof t=="object"&&t!==null&&"name"in t&&t.name==="AbortError",O8=async(t,e)=>{const n=performance.now();try{const r=await fetch(t,e);return uP({input:t,init:e,response:r,durationMs:performance.now()-n}),r}catch(r){throw zX(r)?r:(uP({input:t,init:e,durationMs:performance.now()-n}),new rT(r))}},Uy=()=>Dy().betterAuthEnabled,jX="EMAIL_PASSWORD_SIGN_UP_DISABLED",BX=t=>typeof t=="object"&&t!==null&&t.code===jX,xh=OX(),HX=60,$X=30,Xx="remit.better-auth.token",N8=()=>{try{return globalThis.sessionStorage??null}catch{return null}},qX=()=>{const t=N8()?.getItem(Xx);if(!t)return null;try{const e=JSON.parse(t);if(e&&typeof e=="object"&&typeof e.value=="string"&&typeof e.expiresAt=="number")return{value:e.value,expiresAt:e.expiresAt}}catch{}return null},M8=t=>{const e=N8();if(e)try{if(!t){e.removeItem(Xx);return}e.setItem(Xx,JSON.stringify(t))}catch{}};let _l=null,xv=0;const WX=()=>_l||(_l=qX(),_l),Nl=()=>Math.floor(Date.now()/1e3),VX=t=>{const[,e]=t.split(".");if(!e)return Nl();try{const n=JSON.parse(atob(e.replace(/-/g,"+").replace(/_/g,"/")));return typeof n.exp=="number"?n.exp:Nl()}catch{return Nl()}};class _v extends Error{status;constructor(e,n){super(e),this.name="AuthTokenError",this.status=n}}const GX=async()=>{const t=await O8("/api/auth/token",{credentials:"include"});if(!t.ok)throw new _v(`Could not mint a session token: ${t.status} ${t.statusText}`,t.status);const e=await t.json();if(e&&typeof e=="object"&&"token"in e&&typeof e.token=="string")return e.token;throw new _v("The token endpoint returned no token")};let Af=null;const KX=()=>Af||(Af=GX().then(t=>(_l={value:t,expiresAt:VX(t)},M8(_l),xv=0,t)).finally(()=>{Af=null}),Af),YX=t=>t.expiresAt-HX>Nl(),cP=t=>t.expiresAt>Nl(),ZX=t=>t instanceof rT?!0:t instanceof _v?t.status===408||t.status===429||(t.status??0)>=500:!1,XX=t=>t instanceof _v&&(t.status===401||t.status===403),QX=async()=>{const t=WX();if(t&&YX(t)||t&&cP(t)&&Nl()<xv)return t.value;try{return await KX()}catch(e){if(XX(e))throw sT(),e;if(t&&cP(t)&&ZX(e))return xv=Nl()+$X,t.value;throw e}},sT=()=>{xv=0,M8(null),_l=null};function P8(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e<s;e++)t[e]&&(n=P8(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function k8(){for(var t,e,n=0,r="",s=arguments.length;n<s;n++)(t=arguments[n])&&(e=P8(t))&&(r&&(r+=" "),r+=e);return r}var nS={exports:{}},cr={};var dP;function JX(){if(dP)return cr;dP=1;var t=ip();function e(c){var f="https://react.dev/errors/"+c;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)f+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+c+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(e(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},s=Symbol.for("react.portal");function o(c,f,h){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:g==null?null:""+g,children:c,containerInfo:f,implementation:h}}var a=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(c,f){if(c==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return cr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,cr.createPortal=function(c,f){var h=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(e(299));return o(c,f,null,h)},cr.flushSync=function(c){var f=a.T,h=r.p;try{if(a.T=null,r.p=2,c)return c()}finally{a.T=f,r.p=h,r.d.f()}},cr.preconnect=function(c,f){typeof c=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,r.d.C(c,f))},cr.prefetchDNS=function(c){typeof c=="string"&&r.d.D(c)},cr.preinit=function(c,f){if(typeof c=="string"&&f&&typeof f.as=="string"){var h=f.as,g=u(h,f.crossOrigin),m=typeof f.integrity=="string"?f.integrity:void 0,y=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;h==="style"?r.d.S(c,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:g,integrity:m,fetchPriority:y}):h==="script"&&r.d.X(c,{crossOrigin:g,integrity:m,fetchPriority:y,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},cr.preinitModule=function(c,f){if(typeof c=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var h=u(f.as,f.crossOrigin);r.d.M(c,{crossOrigin:h,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&r.d.M(c)},cr.preload=function(c,f){if(typeof c=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var h=f.as,g=u(h,f.crossOrigin);r.d.L(c,h,{crossOrigin:g,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},cr.preloadModule=function(c,f){if(typeof c=="string")if(f){var h=u(f.as,f.crossOrigin);r.d.m(c,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:h,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else r.d.m(c)},cr.requestFormReset=function(c){r.d.r(c)},cr.unstable_batchedUpdates=function(c,f){return c(f)},cr.useFormState=function(c,f,h){return a.H.useFormState(c,f,h)},cr.useFormStatus=function(){return a.H.useHostTransitionStatus()},cr.version="19.2.7",cr}var fP;function D8(){if(fP)return nS.exports;fP=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),nS.exports=JX(),nS.exports}var L8=D8();const oRe=Va(L8);var rS={exports:{}},sS={};var hP;function eQ(){if(hP)return sS;hP=1;var t=ip();function e(g,m){return g===m&&(g!==0||1/g===1/m)||g!==g&&m!==m}var n=typeof Object.is=="function"?Object.is:e,r=t.useState,s=t.useEffect,o=t.useLayoutEffect,a=t.useDebugValue;function u(g,m){var y=m(),S=r({inst:{value:y,getSnapshot:m}}),E=S[0].inst,C=S[1];return o(function(){E.value=y,E.getSnapshot=m,c(E)&&C({inst:E})},[g,y,m]),s(function(){return c(E)&&C({inst:E}),g(function(){c(E)&&C({inst:E})})},[g]),a(y),y}function c(g){var m=g.getSnapshot;g=g.value;try{var y=m();return!n(g,y)}catch{return!0}}function f(g,m){return m()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:u;return sS.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:h,sS}var pP;function tQ(){return pP||(pP=1,rS.exports=eQ()),rS.exports}const nQ=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),U8=(...t)=>t.filter((e,n,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===n).join(" ").trim();var rQ={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const sQ=A.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:o,iconNode:a,...u},c)=>A.createElement("svg",{ref:c,...rQ,width:e,height:e,stroke:t,strokeWidth:r?Number(n)*24/Number(e):n,className:U8("lucide",s),...u},[...a.map(([f,h])=>A.createElement(f,h)),...Array.isArray(o)?o:[o]]));const vn=(t,e)=>{const n=A.forwardRef(({className:r,...s},o)=>A.createElement(sQ,{ref:o,iconNode:e,className:U8(`lucide-${nQ(t)}`,r),...s}));return n.displayName=`${t}`,n};const oQ=vn("Archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);const iQ=vn("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const Qx=vn("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const aQ=vn("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);const lQ=vn("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const uQ=vn("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);const cQ=vn("FolderTree",[["path",{d:"M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"hod4my"}],["path",{d:"M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"w4yl2u"}],["path",{d:"M3 5a2 2 0 0 0 2 2h3",key:"f2jnh7"}],["path",{d:"M3 3v13a2 2 0 0 0 2 2h3",key:"k8epm1"}]]);const F8=vn("Inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]);const dQ=vn("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);const Jx=vn("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const fQ=vn("Mails",[["rect",{width:"16",height:"13",x:"6",y:"4",rx:"2",key:"1drq3f"}],["path",{d:"m22 7-7.1 3.78c-.57.3-1.23.3-1.8 0L6 7",key:"xn252p"}],["path",{d:"M2 8v11c0 1.1.9 2 2 2h14",key:"n13cji"}]]);const oT=vn("OctagonAlert",[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]]);const hQ=vn("Palette",[["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]]);const pQ=vn("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const gQ=vn("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);const gP=vn("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);const mQ=vn("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);const vQ=vn("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);const z8=vn("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const yQ=vn("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);const bQ=vn("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);const La=vn("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),iT="-",SQ=t=>{const e=CQ(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:a=>{const u=a.split(iT);return u[0]===""&&u.length!==1&&u.shift(),j8(u,e)||EQ(a)},getConflictingClassGroupIds:(a,u)=>{const c=n[a]||[];return u&&r[a]?[...c,...r[a]]:c}}},j8=(t,e)=>{if(t.length===0)return e.classGroupId;const n=t[0],r=e.nextPart.get(n),s=r?j8(t.slice(1),r):void 0;if(s)return s;if(e.validators.length===0)return;const o=t.join(iT);return e.validators.find(({validator:a})=>a(o))?.classGroupId},mP=/^\[(.+)\]$/,EQ=t=>{if(mP.test(t)){const e=mP.exec(t)[1],n=e?.substring(0,e.indexOf(":"));if(n)return"arbitrary.."+n}},CQ=t=>{const{theme:e,prefix:n}=t,r={nextPart:new Map,validators:[]};return xQ(Object.entries(t.classGroups),n).forEach(([o,a])=>{e_(a,r,o,e)}),r},e_=(t,e,n,r)=>{t.forEach(s=>{if(typeof s=="string"){const o=s===""?e:vP(e,s);o.classGroupId=n;return}if(typeof s=="function"){if(wQ(s)){e_(s(r),e,n,r);return}e.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([o,a])=>{e_(a,vP(e,o),n,r)})})},vP=(t,e)=>{let n=t;return e.split(iT).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},wQ=t=>t.isThemeGetter,xQ=(t,e)=>e?t.map(([n,r])=>{const s=r.map(o=>typeof o=="string"?e+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([a,u])=>[e+a,u])):o);return[n,s]}):t,_Q=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=new Map,r=new Map;const s=(o,a)=>{n.set(o,a),e++,e>t&&(e=0,r=n,n=new Map)};return{get(o){let a=n.get(o);if(a!==void 0)return a;if((a=r.get(o))!==void 0)return s(o,a),a},set(o,a){n.has(o)?n.set(o,a):s(o,a)}}},B8="!",AQ=t=>{const{separator:e,experimentalParseClassName:n}=t,r=e.length===1,s=e[0],o=e.length,a=u=>{const c=[];let f=0,h=0,g;for(let C=0;C<u.length;C++){let w=u[C];if(f===0){if(w===s&&(r||u.slice(C,C+o)===e)){c.push(u.slice(h,C)),h=C+o;continue}if(w==="/"){g=C;continue}}w==="["?f++:w==="]"&&f--}const m=c.length===0?u:u.substring(h),y=m.startsWith(B8),S=y?m.substring(1):m,E=g&&g>h?g-h:void 0;return{modifiers:c,hasImportantModifier:y,baseClassName:S,maybePostfixModifierPosition:E}};return n?u=>n({className:u,parseClassName:a}):a},TQ=t=>{if(t.length<=1)return t;const e=[];let n=[];return t.forEach(r=>{r[0]==="["?(e.push(...n.sort(),r),n=[]):n.push(r)}),e.push(...n.sort()),e},RQ=t=>({cache:_Q(t.cacheSize),parseClassName:AQ(t),...SQ(t)}),IQ=/\s+/,OQ=(t,e)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=e,o=[],a=t.trim().split(IQ);let u="";for(let c=a.length-1;c>=0;c-=1){const f=a[c],{modifiers:h,hasImportantModifier:g,baseClassName:m,maybePostfixModifierPosition:y}=n(f);let S=!!y,E=r(S?m.substring(0,y):m);if(!E){if(!S){u=f+(u.length>0?" "+u:u);continue}if(E=r(m),!E){u=f+(u.length>0?" "+u:u);continue}S=!1}const C=TQ(h).join(":"),w=g?C+B8:C,x=w+E;if(o.includes(x))continue;o.push(x);const T=s(E,S);for(let R=0;R<T.length;++R){const M=T[R];o.push(w+M)}u=f+(u.length>0?" "+u:u)}return u};function NQ(){let t=0,e,n,r="";for(;t<arguments.length;)(e=arguments[t++])&&(n=H8(e))&&(r&&(r+=" "),r+=n);return r}const H8=t=>{if(typeof t=="string")return t;let e,n="";for(let r=0;r<t.length;r++)t[r]&&(e=H8(t[r]))&&(n&&(n+=" "),n+=e);return n};function MQ(t,...e){let n,r,s,o=a;function a(c){const f=e.reduce((h,g)=>g(h),t());return n=RQ(f),r=n.cache.get,s=n.cache.set,o=u,u(c)}function u(c){const f=r(c);if(f)return f;const h=OQ(c,n);return s(c,h),h}return function(){return o(NQ.apply(null,arguments))}}const Zt=t=>{const e=n=>n[t]||[];return e.isThemeGetter=!0,e},$8=/^\[(?:([a-z-]+):)?(.+)\]$/i,PQ=/^\d+\/\d+$/,kQ=new Set(["px","full","screen"]),DQ=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,LQ=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,UQ=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,FQ=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,zQ=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ti=t=>Dc(t)||kQ.has(t)||PQ.test(t),da=t=>gd(t,"length",GQ),Dc=t=>!!t&&!Number.isNaN(Number(t)),oS=t=>gd(t,"number",Dc),Tf=t=>!!t&&Number.isInteger(Number(t)),jQ=t=>t.endsWith("%")&&Dc(t.slice(0,-1)),et=t=>$8.test(t),fa=t=>DQ.test(t),BQ=new Set(["length","size","percentage"]),HQ=t=>gd(t,BQ,q8),$Q=t=>gd(t,"position",q8),qQ=new Set(["image","url"]),WQ=t=>gd(t,qQ,YQ),VQ=t=>gd(t,"",KQ),Rf=()=>!0,gd=(t,e,n)=>{const r=$8.exec(t);return r?r[1]?typeof e=="string"?r[1]===e:e.has(r[1]):n(r[2]):!1},GQ=t=>LQ.test(t)&&!UQ.test(t),q8=()=>!1,KQ=t=>FQ.test(t),YQ=t=>zQ.test(t),ZQ=()=>{const t=Zt("colors"),e=Zt("spacing"),n=Zt("blur"),r=Zt("brightness"),s=Zt("borderColor"),o=Zt("borderRadius"),a=Zt("borderSpacing"),u=Zt("borderWidth"),c=Zt("contrast"),f=Zt("grayscale"),h=Zt("hueRotate"),g=Zt("invert"),m=Zt("gap"),y=Zt("gradientColorStops"),S=Zt("gradientColorStopPositions"),E=Zt("inset"),C=Zt("margin"),w=Zt("opacity"),x=Zt("padding"),T=Zt("saturate"),R=Zt("scale"),M=Zt("sepia"),N=Zt("skew"),O=Zt("space"),k=Zt("translate"),F=()=>["auto","contain","none"],$=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto",et,e],z=()=>[et,e],q=()=>["",ti,da],K=()=>["auto",Dc,et],Y=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],H=()=>["solid","dashed","dotted","double","none"],te=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],fe=()=>["start","end","center","between","around","evenly","stretch"],de=()=>["","0",et],Ae=()=>["auto","avoid","all","avoid-page","page","left","right","column"],L=()=>[Dc,et];return{cacheSize:500,separator:":",theme:{colors:[Rf],spacing:[ti,da],blur:["none","",fa,et],brightness:L(),borderColor:[t],borderRadius:["none","","full",fa,et],borderSpacing:z(),borderWidth:q(),contrast:L(),grayscale:de(),hueRotate:L(),invert:de(),gap:z(),gradientColorStops:[t],gradientColorStopPositions:[jQ,da],inset:D(),margin:D(),opacity:L(),padding:z(),saturate:L(),scale:L(),sepia:de(),skew:L(),space:z(),translate:z()},classGroups:{aspect:[{aspect:["auto","square","video",et]}],container:["container"],columns:[{columns:[fa]}],"break-after":[{"break-after":Ae()}],"break-before":[{"break-before":Ae()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Y(),et]}],overflow:[{overflow:$()}],"overflow-x":[{"overflow-x":$()}],"overflow-y":[{"overflow-y":$()}],overscroll:[{overscroll:F()}],"overscroll-x":[{"overscroll-x":F()}],"overscroll-y":[{"overscroll-y":F()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[E]}],"inset-x":[{"inset-x":[E]}],"inset-y":[{"inset-y":[E]}],start:[{start:[E]}],end:[{end:[E]}],top:[{top:[E]}],right:[{right:[E]}],bottom:[{bottom:[E]}],left:[{left:[E]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Tf,et]}],basis:[{basis:D()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",et]}],grow:[{grow:de()}],shrink:[{shrink:de()}],order:[{order:["first","last","none",Tf,et]}],"grid-cols":[{"grid-cols":[Rf]}],"col-start-end":[{col:["auto",{span:["full",Tf,et]},et]}],"col-start":[{"col-start":K()}],"col-end":[{"col-end":K()}],"grid-rows":[{"grid-rows":[Rf]}],"row-start-end":[{row:["auto",{span:[Tf,et]},et]}],"row-start":[{"row-start":K()}],"row-end":[{"row-end":K()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",et]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",et]}],gap:[{gap:[m]}],"gap-x":[{"gap-x":[m]}],"gap-y":[{"gap-y":[m]}],"justify-content":[{justify:["normal",...fe()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...fe(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...fe(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[C]}],mx:[{mx:[C]}],my:[{my:[C]}],ms:[{ms:[C]}],me:[{me:[C]}],mt:[{mt:[C]}],mr:[{mr:[C]}],mb:[{mb:[C]}],ml:[{ml:[C]}],"space-x":[{"space-x":[O]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[O]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",et,e]}],"min-w":[{"min-w":[et,e,"min","max","fit"]}],"max-w":[{"max-w":[et,e,"none","full","min","max","fit","prose",{screen:[fa]},fa]}],h:[{h:[et,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[et,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[et,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[et,e,"auto","min","max","fit"]}],"font-size":[{text:["base",fa,da]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",oS]}],"font-family":[{font:[Rf]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",et]}],"line-clamp":[{"line-clamp":["none",Dc,oS]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ti,et]}],"list-image":[{"list-image":["none",et]}],"list-style-type":[{list:["none","disc","decimal",et]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[w]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[w]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...H(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ti,da]}],"underline-offset":[{"underline-offset":["auto",ti,et]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",et]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",et]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[w]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Y(),$Q]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",HQ]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},WQ]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[S]}],"gradient-via-pos":[{via:[S]}],"gradient-to-pos":[{to:[S]}],"gradient-from":[{from:[y]}],"gradient-via":[{via:[y]}],"gradient-to":[{to:[y]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[u]}],"border-w-x":[{"border-x":[u]}],"border-w-y":[{"border-y":[u]}],"border-w-s":[{"border-s":[u]}],"border-w-e":[{"border-e":[u]}],"border-w-t":[{"border-t":[u]}],"border-w-r":[{"border-r":[u]}],"border-w-b":[{"border-b":[u]}],"border-w-l":[{"border-l":[u]}],"border-opacity":[{"border-opacity":[w]}],"border-style":[{border:[...H(),"hidden"]}],"divide-x":[{"divide-x":[u]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[u]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[w]}],"divide-style":[{divide:H()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...H()]}],"outline-offset":[{"outline-offset":[ti,et]}],"outline-w":[{outline:[ti,da]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[w]}],"ring-offset-w":[{"ring-offset":[ti,da]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",fa,VQ]}],"shadow-color":[{shadow:[Rf]}],opacity:[{opacity:[w]}],"mix-blend":[{"mix-blend":[...te(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":te()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",fa,et]}],grayscale:[{grayscale:[f]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[g]}],saturate:[{saturate:[T]}],sepia:[{sepia:[M]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[f]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[w]}],"backdrop-saturate":[{"backdrop-saturate":[T]}],"backdrop-sepia":[{"backdrop-sepia":[M]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",et]}],duration:[{duration:L()}],ease:[{ease:["linear","in","out","in-out",et]}],delay:[{delay:L()}],animate:[{animate:["none","spin","ping","pulse","bounce",et]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[R]}],"scale-x":[{"scale-x":[R]}],"scale-y":[{"scale-y":[R]}],rotate:[{rotate:[Tf,et]}],"translate-x":[{"translate-x":[k]}],"translate-y":[{"translate-y":[k]}],"skew-x":[{"skew-x":[N]}],"skew-y":[{"skew-y":[N]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",et]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",et]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":z()}],"scroll-mx":[{"scroll-mx":z()}],"scroll-my":[{"scroll-my":z()}],"scroll-ms":[{"scroll-ms":z()}],"scroll-me":[{"scroll-me":z()}],"scroll-mt":[{"scroll-mt":z()}],"scroll-mr":[{"scroll-mr":z()}],"scroll-mb":[{"scroll-mb":z()}],"scroll-ml":[{"scroll-ml":z()}],"scroll-p":[{"scroll-p":z()}],"scroll-px":[{"scroll-px":z()}],"scroll-py":[{"scroll-py":z()}],"scroll-ps":[{"scroll-ps":z()}],"scroll-pe":[{"scroll-pe":z()}],"scroll-pt":[{"scroll-pt":z()}],"scroll-pr":[{"scroll-pr":z()}],"scroll-pb":[{"scroll-pb":z()}],"scroll-pl":[{"scroll-pl":z()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",et]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[ti,da,oS]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},W8=MQ(ZQ);function Rt(...t){return W8(k8(t))}const XQ=1024,QQ=1280;function JQ(t,e=XQ,n=QQ){const r=t>=e;return{nav:r,reading:r,intelligence:t>=n}}function eJ(t){const e=A.useRef(null),[n,r]=A.useState(t??null);return A.useEffect(()=>{const s=e.current;if(!s||typeof ResizeObserver>"u")return;const o=new ResizeObserver(a=>{const u=a[0];u&&r(u.contentRect.width)});return o.observe(s),r(s.getBoundingClientRect().width),()=>o.disconnect()},[]),[e,n]}const tJ=[{id:"all",label:"All"},{id:"personal",label:"Personal"},{id:"uncategorized",label:"Unclassified"},{id:"newsletter",label:"Newsletters"},{id:"marketing",label:"Marketing"},{id:"automated",label:"Automated"},{id:"transactional",label:"Transactional"},{id:"social",label:"Social"}],nJ={uncategorized:"neutral",personal:"accent",newsletter:"neutral",marketing:"neutral",automated:"neutral",transactional:"positive",social:"warning"};function rJ({open:t,onClose:e,title:n,titleId:r="dialog-title",children:s,className:o,anchor:a="center"}){const u=A.useRef(null),c=A.useCallback(m=>{m.key==="Escape"&&(m.preventDefault(),m.stopImmediatePropagation(),e())},[e]);if(A.useEffect(()=>{if(t)return window.addEventListener("keydown",c,!0),()=>window.removeEventListener("keydown",c,!0)},[t,c]),A.useEffect(()=>{if(!t)return;const m=u.current;if(!m)return;m.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')[0]?.focus()},[t]),!t)return null;const f=a==="left",h=a==="right",g=f||h;return I.jsxs("div",{className:Rt("fixed inset-0 z-50 flex",f?"items-stretch justify-start":h?"items-stretch justify-end":"items-center justify-center px-4"),role:"presentation",onClick:e,children:[I.jsx("div",{className:Rt("absolute inset-0",!g&&"bg-canvas/80")}),I.jsxs("div",{ref:u,role:"dialog","aria-modal":"true","aria-labelledby":r,className:Rt("relative z-10 overflow-hidden border-line bg-surface shadow-xl",f?"h-full w-72 max-w-[85vw] border-r":h?"h-full w-[80vw] max-w-[320px] border-l":"w-full max-w-lg rounded-md border",o),onClick:m=>m.stopPropagation(),onKeyDown:m=>m.stopPropagation(),children:[I.jsx("h2",{id:r,className:"sr-only",children:n}),s]})]})}const Fy=A.createContext(null);Fy.displayName="PanelGroupContext";const mn={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},aT=10,Ml=A.useLayoutEffect,yP=I8.useId,sJ=typeof yP=="function"?yP:()=>null;let oJ=0;function lT(t=null){const e=sJ(),n=A.useRef(t||e||null);return n.current===null&&(n.current=""+oJ++),t??n.current}function V8({children:t,className:e="",collapsedSize:n,collapsible:r,defaultSize:s,forwardedRef:o,id:a,maxSize:u,minSize:c,onCollapse:f,onExpand:h,onResize:g,order:m,style:y,tagName:S="div",...E}){const C=A.useContext(Fy);if(C===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:w,expandPanel:x,getPanelSize:T,getPanelStyle:R,groupId:M,isPanelCollapsed:N,reevaluatePanelConstraints:O,registerPanel:k,resizePanel:F,unregisterPanel:$}=C,D=lT(a),z=A.useRef({callbacks:{onCollapse:f,onExpand:h,onResize:g},constraints:{collapsedSize:n,collapsible:r,defaultSize:s,maxSize:u,minSize:c},id:D,idIsFromProps:a!==void 0,order:m});A.useRef({didLogMissingDefaultSizeWarning:!1}),Ml(()=>{const{callbacks:K,constraints:Y}=z.current,H={...Y};z.current.id=D,z.current.idIsFromProps=a!==void 0,z.current.order=m,K.onCollapse=f,K.onExpand=h,K.onResize=g,Y.collapsedSize=n,Y.collapsible=r,Y.defaultSize=s,Y.maxSize=u,Y.minSize=c,(H.collapsedSize!==Y.collapsedSize||H.collapsible!==Y.collapsible||H.maxSize!==Y.maxSize||H.minSize!==Y.minSize)&&O(z.current,H)}),Ml(()=>{const K=z.current;return k(K),()=>{$(K)}},[m,D,k,$]),A.useImperativeHandle(o,()=>({collapse:()=>{w(z.current)},expand:K=>{x(z.current,K)},getId(){return D},getSize(){return T(z.current)},isCollapsed(){return N(z.current)},isExpanded(){return!N(z.current)},resize:K=>{F(z.current,K)}}),[w,x,T,N,D,F]);const q=R(z.current,s);return A.createElement(S,{...E,children:t,className:e,id:D,style:{...q,...y},[mn.groupId]:M,[mn.panel]:"",[mn.panelCollapsible]:r||void 0,[mn.panelId]:D,[mn.panelSize]:parseFloat(""+q.flexGrow).toFixed(1)})}const G8=A.forwardRef((t,e)=>A.createElement(V8,{...t,forwardedRef:e}));V8.displayName="Panel";G8.displayName="forwardRef(Panel)";let t_=null,Jm=-1,Ca=null;function iJ(t,e){if(e){const n=(e&Q8)!==0,r=(e&J8)!==0,s=(e&e9)!==0,o=(e&t9)!==0;if(n)return s?"se-resize":o?"ne-resize":"e-resize";if(r)return s?"sw-resize":o?"nw-resize":"w-resize";if(s)return"s-resize";if(o)return"n-resize"}switch(t){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function aJ(){Ca!==null&&(document.head.removeChild(Ca),t_=null,Ca=null,Jm=-1)}function iS(t,e){var n,r;const s=iJ(t,e);if(t_!==s){if(t_=s,Ca===null&&(Ca=document.createElement("style"),document.head.appendChild(Ca)),Jm>=0){var o;(o=Ca.sheet)===null||o===void 0||o.removeRule(Jm)}Jm=(n=(r=Ca.sheet)===null||r===void 0?void 0:r.insertRule(`*{cursor: ${s} !important;}`))!==null&&n!==void 0?n:-1}}function K8(t){return t.type==="keydown"}function Y8(t){return t.type.startsWith("pointer")}function Z8(t){return t.type.startsWith("mouse")}function zy(t){if(Y8(t)){if(t.isPrimary)return{x:t.clientX,y:t.clientY}}else if(Z8(t))return{x:t.clientX,y:t.clientY};return{x:1/0,y:1/0}}function lJ(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function uJ(t,e,n){return t.x<e.x+e.width&&t.x+t.width>e.x&&t.y<e.y+e.height&&t.y+t.height>e.y}function cJ(t,e){if(t===e)throw new Error("Cannot compare node with itself");const n={a:EP(t),b:EP(e)};let r;for(;n.a.at(-1)===n.b.at(-1);)t=n.a.pop(),e=n.b.pop(),r=t;tt(r,"Stacking order can only be calculated for elements with a common ancestor");const s={a:SP(bP(n.a)),b:SP(bP(n.b))};if(s.a===s.b){const o=r.childNodes,a={a:n.a.at(-1),b:n.b.at(-1)};let u=o.length;for(;u--;){const c=o[u];if(c===a.a)return 1;if(c===a.b)return-1}}return Math.sign(s.a-s.b)}const dJ=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function fJ(t){var e;const n=getComputedStyle((e=X8(t))!==null&&e!==void 0?e:t).display;return n==="flex"||n==="inline-flex"}function hJ(t){const e=getComputedStyle(t);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||fJ(t))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||dJ.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function bP(t){let e=t.length;for(;e--;){const n=t[e];if(tt(n,"Missing node"),hJ(n))return n}return null}function SP(t){return t&&Number(getComputedStyle(t).zIndex)||0}function EP(t){const e=[];for(;t;)e.push(t),t=X8(t);return e}function X8(t){const{parentNode:e}=t;return e&&e instanceof ShadowRoot?e.host:e}const Q8=1,J8=2,e9=4,t9=8,pJ=lJ()==="coarse";let Ys=[],Lc=!1,wl=new Map,jy=new Map;const _h=new Set;function gJ(t,e,n,r,s){var o;const{ownerDocument:a}=e,u={direction:n,element:e,hitAreaMargins:r,setResizeHandlerState:s},c=(o=wl.get(a))!==null&&o!==void 0?o:0;return wl.set(a,c+1),_h.add(u),Av(),function(){var h;jy.delete(t),_h.delete(u);const g=(h=wl.get(a))!==null&&h!==void 0?h:1;if(wl.set(a,g-1),Av(),g===1&&wl.delete(a),Ys.includes(u)){const m=Ys.indexOf(u);m>=0&&Ys.splice(m,1),cT(),s("up",!0,null)}}}function mJ(t){const{target:e}=t,{x:n,y:r}=zy(t);Lc=!0,uT({target:e,x:n,y:r}),Av(),Ys.length>0&&(Tv("down",t),t.preventDefault(),n9(e)||t.stopImmediatePropagation())}function aS(t){const{x:e,y:n}=zy(t);if(Lc&&t.buttons===0&&(Lc=!1,Tv("up",t)),!Lc){const{target:r}=t;uT({target:r,x:e,y:n})}Tv("move",t),cT(),Ys.length>0&&t.preventDefault()}function lS(t){const{target:e}=t,{x:n,y:r}=zy(t);jy.clear(),Lc=!1,Ys.length>0&&(t.preventDefault(),n9(e)||t.stopImmediatePropagation()),Tv("up",t),uT({target:e,x:n,y:r}),cT(),Av()}function n9(t){let e=t;for(;e;){if(e.hasAttribute(mn.resizeHandle))return!0;e=e.parentElement}return!1}function uT({target:t,x:e,y:n}){Ys.splice(0);let r=null;(t instanceof HTMLElement||t instanceof SVGElement)&&(r=t),_h.forEach(s=>{const{element:o,hitAreaMargins:a}=s,u=o.getBoundingClientRect(),{bottom:c,left:f,right:h,top:g}=u,m=pJ?a.coarse:a.fine;if(e>=f-m&&e<=h+m&&n>=g-m&&n<=c+m){if(r!==null&&document.contains(r)&&o!==r&&!o.contains(r)&&!r.contains(o)&&cJ(r,o)>0){let S=r,E=!1;for(;S&&!S.contains(o);){if(uJ(S.getBoundingClientRect(),u)){E=!0;break}S=S.parentElement}if(E)return}Ys.push(s)}})}function uS(t,e){jy.set(t,e)}function cT(){let t=!1,e=!1;Ys.forEach(r=>{const{direction:s}=r;s==="horizontal"?t=!0:e=!0});let n=0;jy.forEach(r=>{n|=r}),t&&e?iS("intersection",n):t?iS("horizontal",n):e?iS("vertical",n):aJ()}let cS=new AbortController;function Av(){cS.abort(),cS=new AbortController;const t={capture:!0,signal:cS.signal};_h.size&&(Lc?(Ys.length>0&&wl.forEach((e,n)=>{const{body:r}=n;e>0&&(r.addEventListener("contextmenu",lS,t),r.addEventListener("pointerleave",aS,t),r.addEventListener("pointermove",aS,t))}),window.addEventListener("pointerup",lS,t),window.addEventListener("pointercancel",lS,t)):wl.forEach((e,n)=>{const{body:r}=n;e>0&&(r.addEventListener("pointerdown",mJ,t),r.addEventListener("pointermove",aS,t))}))}function Tv(t,e){_h.forEach(n=>{const{setResizeHandlerState:r}=n,s=Ys.includes(n);r(t,s,e)})}function vJ(){const[t,e]=A.useState(0);return A.useCallback(()=>e(n=>n+1),[])}function tt(t,e){if(!t)throw console.error(e),Error(e)}function $l(t,e,n=aT){return t.toFixed(n)===e.toFixed(n)?0:t>e?1:-1}function ui(t,e,n=aT){return $l(t,e,n)===0}function os(t,e,n){return $l(t,e,n)===0}function yJ(t,e,n){if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++){const s=t[r],o=e[r];if(!os(s,o,n))return!1}return!0}function _c({panelConstraints:t,panelIndex:e,size:n}){const r=t[e];tt(r!=null,`Panel constraints not found for index ${e}`);let{collapsedSize:s=0,collapsible:o,maxSize:a=100,minSize:u=0}=r;if($l(n,u)<0)if(o){const c=(s+u)/2;$l(n,c)<0?n=s:n=u}else n=u;return n=Math.min(a,n),n=parseFloat(n.toFixed(aT)),n}function Zf({delta:t,initialLayout:e,panelConstraints:n,pivotIndices:r,prevLayout:s,trigger:o}){if(os(t,0))return e;const a=[...e],[u,c]=r;tt(u!=null,"Invalid first pivot index"),tt(c!=null,"Invalid second pivot index");let f=0;if(o==="keyboard"){{const g=t<0?c:u,m=n[g];tt(m,`Panel constraints not found for index ${g}`);const{collapsedSize:y=0,collapsible:S,minSize:E=0}=m;if(S){const C=e[g];if(tt(C!=null,`Previous layout not found for panel index ${g}`),os(C,y)){const w=E-C;$l(w,Math.abs(t))>0&&(t=t<0?0-w:w)}}}{const g=t<0?u:c,m=n[g];tt(m,`No panel constraints found for index ${g}`);const{collapsedSize:y=0,collapsible:S,minSize:E=0}=m;if(S){const C=e[g];if(tt(C!=null,`Previous layout not found for panel index ${g}`),os(C,E)){const w=C-y;$l(w,Math.abs(t))>0&&(t=t<0?0-w:w)}}}}{const g=t<0?1:-1;let m=t<0?c:u,y=0;for(;;){const E=e[m];tt(E!=null,`Previous layout not found for panel index ${m}`);const w=_c({panelConstraints:n,panelIndex:m,size:100})-E;if(y+=w,m+=g,m<0||m>=n.length)break}const S=Math.min(Math.abs(t),Math.abs(y));t=t<0?0-S:S}{let m=t<0?u:c;for(;m>=0&&m<n.length;){const y=Math.abs(t)-Math.abs(f),S=e[m];tt(S!=null,`Previous layout not found for panel index ${m}`);const E=S-y,C=_c({panelConstraints:n,panelIndex:m,size:E});if(!os(S,C)&&(f+=S-C,a[m]=C,f.toPrecision(3).localeCompare(Math.abs(t).toPrecision(3),void 0,{numeric:!0})>=0))break;t<0?m--:m++}}if(yJ(s,a))return s;{const g=t<0?c:u,m=e[g];tt(m!=null,`Previous layout not found for panel index ${g}`);const y=m+f,S=_c({panelConstraints:n,panelIndex:g,size:y});if(a[g]=S,!os(S,y)){let E=y-S,w=t<0?c:u;for(;w>=0&&w<n.length;){const x=a[w];tt(x!=null,`Previous layout not found for panel index ${w}`);const T=x+E,R=_c({panelConstraints:n,panelIndex:w,size:T});if(os(x,R)||(E-=R-x,a[w]=R),os(E,0))break;t>0?w--:w++}}}const h=a.reduce((g,m)=>m+g,0);return os(h,100)?a:s}function bJ({layout:t,panelsArray:e,pivotIndices:n}){let r=0,s=100,o=0,a=0;const u=n[0];tt(u!=null,"No pivot index found"),e.forEach((g,m)=>{const{constraints:y}=g,{maxSize:S=100,minSize:E=0}=y;m===u?(r=E,s=S):(o+=E,a+=S)});const c=Math.min(s,100-o),f=Math.max(r,100-a),h=t[u];return{valueMax:c,valueMin:f,valueNow:h}}function Ah(t,e=document){return Array.from(e.querySelectorAll(`[${mn.resizeHandleId}][data-panel-group-id="${t}"]`))}function r9(t,e,n=document){const s=Ah(t,n).findIndex(o=>o.getAttribute(mn.resizeHandleId)===e);return s??null}function s9(t,e,n){const r=r9(t,e,n);return r!=null?[r,r+1]:[-1,-1]}function o9(t,e=document){var n;if(e instanceof HTMLElement&&(e==null||(n=e.dataset)===null||n===void 0?void 0:n.panelGroupId)==t)return e;const r=e.querySelector(`[data-panel-group][data-panel-group-id="${t}"]`);return r||null}function By(t,e=document){const n=e.querySelector(`[${mn.resizeHandleId}="${t}"]`);return n||null}function SJ(t,e,n,r=document){var s,o,a,u;const c=By(e,r),f=Ah(t,r),h=c?f.indexOf(c):-1,g=(s=(o=n[h])===null||o===void 0?void 0:o.id)!==null&&s!==void 0?s:null,m=(a=(u=n[h+1])===null||u===void 0?void 0:u.id)!==null&&a!==void 0?a:null;return[g,m]}function EJ({committedValuesRef:t,eagerValuesRef:e,groupId:n,layout:r,panelDataArray:s,panelGroupElement:o,setLayout:a}){A.useRef({didWarnAboutMissingResizeHandle:!1}),Ml(()=>{if(!o)return;const u=Ah(n,o);for(let c=0;c<s.length-1;c++){const{valueMax:f,valueMin:h,valueNow:g}=bJ({layout:r,panelsArray:s,pivotIndices:[c,c+1]}),m=u[c];if(m!=null){const y=s[c];tt(y,`No panel data found for index "${c}"`),m.setAttribute("aria-controls",y.id),m.setAttribute("aria-valuemax",""+Math.round(f)),m.setAttribute("aria-valuemin",""+Math.round(h)),m.setAttribute("aria-valuenow",g!=null?""+Math.round(g):"")}}return()=>{u.forEach((c,f)=>{c.removeAttribute("aria-controls"),c.removeAttribute("aria-valuemax"),c.removeAttribute("aria-valuemin"),c.removeAttribute("aria-valuenow")})}},[n,r,s,o]),A.useEffect(()=>{if(!o)return;const u=e.current;tt(u,"Eager values not found");const{panelDataArray:c}=u,f=o9(n,o);tt(f!=null,`No group found for id "${n}"`);const h=Ah(n,o);tt(h,`No resize handles found for group id "${n}"`);const g=h.map(m=>{const y=m.getAttribute(mn.resizeHandleId);tt(y,"Resize handle element has no handle id attribute");const[S,E]=SJ(n,y,c,o);if(S==null||E==null)return()=>{};const C=w=>{if(!w.defaultPrevented)switch(w.key){case"Enter":{w.preventDefault();const x=c.findIndex(T=>T.id===S);if(x>=0){const T=c[x];tt(T,`No panel data found for index ${x}`);const R=r[x],{collapsedSize:M=0,collapsible:N,minSize:O=0}=T.constraints;if(R!=null&&N){const k=Zf({delta:os(R,M)?O-M:M-R,initialLayout:r,panelConstraints:c.map(F=>F.constraints),pivotIndices:s9(n,y,o),prevLayout:r,trigger:"keyboard"});r!==k&&a(k)}}break}}};return m.addEventListener("keydown",C),()=>{m.removeEventListener("keydown",C)}});return()=>{g.forEach(m=>m())}},[o,t,e,n,r,s,a])}function CP(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function i9(t,e){const n=t==="horizontal",{x:r,y:s}=zy(e);return n?r:s}function CJ(t,e,n,r,s){const o=n==="horizontal",a=By(e,s);tt(a,`No resize handle element found for id "${e}"`);const u=a.getAttribute(mn.groupId);tt(u,"Resize handle element has no group id attribute");let{initialCursorPosition:c}=r;const f=i9(n,t),h=o9(u,s);tt(h,`No group element found for id "${u}"`);const g=h.getBoundingClientRect(),m=o?g.width:g.height;return(f-c)/m*100}function wJ(t,e,n,r,s,o){if(K8(t)){const a=n==="horizontal";let u=0;t.shiftKey?u=100:s!=null?u=s:u=10;let c=0;switch(t.key){case"ArrowDown":c=a?0:u;break;case"ArrowLeft":c=a?-u:0;break;case"ArrowRight":c=a?u:0;break;case"ArrowUp":c=a?0:-u;break;case"End":c=100;break;case"Home":c=-100;break}return c}else return r==null?0:CJ(t,e,n,r,o)}function xJ({panelDataArray:t}){const e=Array(t.length),n=t.map(o=>o.constraints);let r=0,s=100;for(let o=0;o<t.length;o++){const a=n[o];tt(a,`Panel constraints not found for index ${o}`);const{defaultSize:u}=a;u!=null&&(r++,e[o]=u,s-=u)}for(let o=0;o<t.length;o++){const a=n[o];tt(a,`Panel constraints not found for index ${o}`);const{defaultSize:u}=a;if(u!=null)continue;const c=t.length-r,f=s/c;r++,e[o]=f,s-=f}return e}function tc(t,e,n){e.forEach((r,s)=>{const o=t[s];tt(o,`Panel data not found for index ${s}`);const{callbacks:a,constraints:u,id:c}=o,{collapsedSize:f=0,collapsible:h}=u,g=n[c];if(g==null||r!==g){n[c]=r;const{onCollapse:m,onExpand:y,onResize:S}=a;S&&S(r,g),h&&(m||y)&&(y&&(g==null||ui(g,f))&&!ui(r,f)&&y(),m&&(g==null||!ui(g,f))&&ui(r,f)&&m())}})}function Gg(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!=e[n])return!1;return!0}function _J({defaultSize:t,dragState:e,layout:n,panelData:r,panelIndex:s,precision:o=3}){const a=n[s];let u;return a==null?u=t!=null?t.toPrecision(o):"1":r.length===1?u="1":u=a.toPrecision(o),{flexBasis:0,flexGrow:u,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function AJ(t,e=10){let n=null;return(...s)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{t(...s)},e)}}function wP(t){try{if(typeof localStorage<"u")t.getItem=e=>localStorage.getItem(e),t.setItem=(e,n)=>{localStorage.setItem(e,n)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),t.getItem=()=>null,t.setItem=()=>{}}}function a9(t){return`react-resizable-panels:${t}`}function l9(t){return t.map(e=>{const{constraints:n,id:r,idIsFromProps:s,order:o}=e;return s?r:o?`${o}:${JSON.stringify(n)}`:JSON.stringify(n)}).sort((e,n)=>e.localeCompare(n)).join(",")}function u9(t,e){try{const n=a9(t),r=e.getItem(n);if(r){const s=JSON.parse(r);if(typeof s=="object"&&s!=null)return s}}catch{}return null}function TJ(t,e,n){var r,s;const o=(r=u9(t,n))!==null&&r!==void 0?r:{},a=l9(e);return(s=o[a])!==null&&s!==void 0?s:null}function RJ(t,e,n,r,s){var o;const a=a9(t),u=l9(e),c=(o=u9(t,s))!==null&&o!==void 0?o:{};c[u]={expandToSizes:Object.fromEntries(n.entries()),layout:r};try{s.setItem(a,JSON.stringify(c))}catch(f){console.error(f)}}function xP({layout:t,panelConstraints:e}){const n=[...t],r=n.reduce((o,a)=>o+a,0);if(n.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${n.map(o=>`${o}%`).join(", ")}`);if(!os(r,100)&&n.length>0)for(let o=0;o<e.length;o++){const a=n[o];tt(a!=null,`No layout data found for index ${o}`);const u=100/r*a;n[o]=u}let s=0;for(let o=0;o<e.length;o++){const a=n[o];tt(a!=null,`No layout data found for index ${o}`);const u=_c({panelConstraints:e,panelIndex:o,size:a});a!=u&&(s+=a-u,n[o]=u)}if(!os(s,0))for(let o=0;o<e.length;o++){const a=n[o];tt(a!=null,`No layout data found for index ${o}`);const u=a+s,c=_c({panelConstraints:e,panelIndex:o,size:u});if(a!==c&&(s-=c-a,n[o]=c,os(s,0)))break}return n}const IJ=100,Xf={getItem:t=>(wP(Xf),Xf.getItem(t)),setItem:(t,e)=>{wP(Xf),Xf.setItem(t,e)}},_P={};function c9({autoSaveId:t=null,children:e,className:n="",direction:r,forwardedRef:s,id:o=null,onLayout:a=null,keyboardResizeBy:u=null,storage:c=Xf,style:f,tagName:h="div",...g}){const m=lT(o),y=A.useRef(null),[S,E]=A.useState(null),[C,w]=A.useState([]),x=vJ(),T=A.useRef({}),R=A.useRef(new Map),M=A.useRef(0),N=A.useRef({autoSaveId:t,direction:r,dragState:S,id:m,keyboardResizeBy:u,onLayout:a,storage:c}),O=A.useRef({layout:C,panelDataArray:[],panelDataArrayChanged:!1});A.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),A.useImperativeHandle(s,()=>({getId:()=>N.current.id,getLayout:()=>{const{layout:Z}=O.current;return Z},setLayout:Z=>{const{onLayout:ee}=N.current,{layout:oe,panelDataArray:he}=O.current,ue=xP({layout:Z,panelConstraints:he.map(ve=>ve.constraints)});CP(oe,ue)||(w(ue),O.current.layout=ue,ee&&ee(ue),tc(he,ue,T.current))}}),[]),Ml(()=>{N.current.autoSaveId=t,N.current.direction=r,N.current.dragState=S,N.current.id=m,N.current.onLayout=a,N.current.storage=c}),EJ({committedValuesRef:N,eagerValuesRef:O,groupId:m,layout:C,panelDataArray:O.current.panelDataArray,setLayout:w,panelGroupElement:y.current}),A.useEffect(()=>{const{panelDataArray:Z}=O.current;if(t){if(C.length===0||C.length!==Z.length)return;let ee=_P[t];ee==null&&(ee=AJ(RJ,IJ),_P[t]=ee);const oe=[...Z],he=new Map(R.current);ee(t,oe,he,C,c)}},[t,C,c]),A.useEffect(()=>{});const k=A.useCallback(Z=>{const{onLayout:ee}=N.current,{layout:oe,panelDataArray:he}=O.current;if(Z.constraints.collapsible){const ue=he.map(Ee=>Ee.constraints),{collapsedSize:ve=0,panelSize:xe,pivotIndices:Xe}=yl(he,Z,oe);if(tt(xe!=null,`Panel size not found for panel "${Z.id}"`),!ui(xe,ve)){R.current.set(Z.id,xe);const pt=mc(he,Z)===he.length-1?xe-ve:ve-xe,Ce=Zf({delta:pt,initialLayout:oe,panelConstraints:ue,pivotIndices:Xe,prevLayout:oe,trigger:"imperative-api"});Gg(oe,Ce)||(w(Ce),O.current.layout=Ce,ee&&ee(Ce),tc(he,Ce,T.current))}}},[]),F=A.useCallback((Z,ee)=>{const{onLayout:oe}=N.current,{layout:he,panelDataArray:ue}=O.current;if(Z.constraints.collapsible){const ve=ue.map(ze=>ze.constraints),{collapsedSize:xe=0,panelSize:Xe=0,minSize:Ee=0,pivotIndices:pt}=yl(ue,Z,he),Ce=ee??Ee;if(ui(Xe,xe)){const ze=R.current.get(Z.id),je=ze!=null&&ze>=Ce?ze:Ce,gr=mc(ue,Z)===ue.length-1?Xe-je:je-Xe,Et=Zf({delta:gr,initialLayout:he,panelConstraints:ve,pivotIndices:pt,prevLayout:he,trigger:"imperative-api"});Gg(he,Et)||(w(Et),O.current.layout=Et,oe&&oe(Et),tc(ue,Et,T.current))}}},[]),$=A.useCallback(Z=>{const{layout:ee,panelDataArray:oe}=O.current,{panelSize:he}=yl(oe,Z,ee);return tt(he!=null,`Panel size not found for panel "${Z.id}"`),he},[]),D=A.useCallback((Z,ee)=>{const{panelDataArray:oe}=O.current,he=mc(oe,Z);return _J({defaultSize:ee,dragState:S,layout:C,panelData:oe,panelIndex:he})},[S,C]),z=A.useCallback(Z=>{const{layout:ee,panelDataArray:oe}=O.current,{collapsedSize:he=0,collapsible:ue,panelSize:ve}=yl(oe,Z,ee);return tt(ve!=null,`Panel size not found for panel "${Z.id}"`),ue===!0&&ui(ve,he)},[]),q=A.useCallback(Z=>{const{layout:ee,panelDataArray:oe}=O.current,{collapsedSize:he=0,collapsible:ue,panelSize:ve}=yl(oe,Z,ee);return tt(ve!=null,`Panel size not found for panel "${Z.id}"`),!ue||$l(ve,he)>0},[]),K=A.useCallback(Z=>{const{panelDataArray:ee}=O.current;ee.push(Z),ee.sort((oe,he)=>{const ue=oe.order,ve=he.order;return ue==null&&ve==null?0:ue==null?-1:ve==null?1:ue-ve}),O.current.panelDataArrayChanged=!0,x()},[x]);Ml(()=>{if(O.current.panelDataArrayChanged){O.current.panelDataArrayChanged=!1;const{autoSaveId:Z,onLayout:ee,storage:oe}=N.current,{layout:he,panelDataArray:ue}=O.current;let ve=null;if(Z){const Xe=TJ(Z,ue,oe);Xe&&(R.current=new Map(Object.entries(Xe.expandToSizes)),ve=Xe.layout)}ve==null&&(ve=xJ({panelDataArray:ue}));const xe=xP({layout:ve,panelConstraints:ue.map(Xe=>Xe.constraints)});CP(he,xe)||(w(xe),O.current.layout=xe,ee&&ee(xe),tc(ue,xe,T.current))}}),Ml(()=>{const Z=O.current;return()=>{Z.layout=[]}},[]);const Y=A.useCallback(Z=>{let ee=!1;const oe=y.current;return oe&&window.getComputedStyle(oe,null).getPropertyValue("direction")==="rtl"&&(ee=!0),function(ue){ue.preventDefault();const ve=y.current;if(!ve)return()=>null;const{direction:xe,dragState:Xe,id:Ee,keyboardResizeBy:pt,onLayout:Ce}=N.current,{layout:ze,panelDataArray:je}=O.current,{initialLayout:$e}=Xe??{},gr=s9(Ee,Z,ve);let Et=wJ(ue,Z,xe,Xe,pt,ve);const Gr=xe==="horizontal";Gr&&ee&&(Et=-Et);const Kn=je.map(Rr=>Rr.constraints),Tr=Zf({delta:Et,initialLayout:$e??ze,panelConstraints:Kn,pivotIndices:gr,prevLayout:ze,trigger:K8(ue)?"keyboard":"mouse-or-touch"}),no=!Gg(ze,Tr);(Y8(ue)||Z8(ue))&&M.current!=Et&&(M.current=Et,!no&&Et!==0?Gr?uS(Z,Et<0?Q8:J8):uS(Z,Et<0?e9:t9):uS(Z,0)),no&&(w(Tr),O.current.layout=Tr,Ce&&Ce(Tr),tc(je,Tr,T.current))}},[]),H=A.useCallback((Z,ee)=>{const{onLayout:oe}=N.current,{layout:he,panelDataArray:ue}=O.current,ve=ue.map(ze=>ze.constraints),{panelSize:xe,pivotIndices:Xe}=yl(ue,Z,he);tt(xe!=null,`Panel size not found for panel "${Z.id}"`);const pt=mc(ue,Z)===ue.length-1?xe-ee:ee-xe,Ce=Zf({delta:pt,initialLayout:he,panelConstraints:ve,pivotIndices:Xe,prevLayout:he,trigger:"imperative-api"});Gg(he,Ce)||(w(Ce),O.current.layout=Ce,oe&&oe(Ce),tc(ue,Ce,T.current))},[]),te=A.useCallback((Z,ee)=>{const{layout:oe,panelDataArray:he}=O.current,{collapsedSize:ue=0,collapsible:ve}=ee,{collapsedSize:xe=0,collapsible:Xe,maxSize:Ee=100,minSize:pt=0}=Z.constraints,{panelSize:Ce}=yl(he,Z,oe);Ce!=null&&(ve&&Xe&&ui(Ce,ue)?ui(ue,xe)||H(Z,xe):Ce<pt?H(Z,pt):Ce>Ee&&H(Z,Ee))},[H]),fe=A.useCallback((Z,ee)=>{const{direction:oe}=N.current,{layout:he}=O.current;if(!y.current)return;const ue=By(Z,y.current);tt(ue,`Drag handle element not found for id "${Z}"`);const ve=i9(oe,ee);E({dragHandleId:Z,dragHandleRect:ue.getBoundingClientRect(),initialCursorPosition:ve,initialLayout:he})},[]),de=A.useCallback(()=>{E(null)},[]),Ae=A.useCallback(Z=>{const{panelDataArray:ee}=O.current,oe=mc(ee,Z);oe>=0&&(ee.splice(oe,1),delete T.current[Z.id],O.current.panelDataArrayChanged=!0,x())},[x]),L=A.useMemo(()=>({collapsePanel:k,direction:r,dragState:S,expandPanel:F,getPanelSize:$,getPanelStyle:D,groupId:m,isPanelCollapsed:z,isPanelExpanded:q,reevaluatePanelConstraints:te,registerPanel:K,registerResizeHandle:Y,resizePanel:H,startDragging:fe,stopDragging:de,unregisterPanel:Ae,panelGroupElement:y.current}),[k,S,r,F,$,D,m,z,q,te,K,Y,H,fe,de,Ae]),G={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return A.createElement(Fy.Provider,{value:L},A.createElement(h,{...g,children:e,className:n,id:o,ref:y,style:{...G,...f},[mn.group]:"",[mn.groupDirection]:r,[mn.groupId]:m}))}const d9=A.forwardRef((t,e)=>A.createElement(c9,{...t,forwardedRef:e}));c9.displayName="PanelGroup";d9.displayName="forwardRef(PanelGroup)";function mc(t,e){return t.findIndex(n=>n===e||n.id===e.id)}function yl(t,e,n){const r=mc(t,e),o=r===t.length-1?[r-1,r]:[r,r+1],a=n[r];return{...e.constraints,panelSize:a,pivotIndices:o}}function OJ({disabled:t,handleId:e,resizeHandler:n,panelGroupElement:r}){A.useEffect(()=>{if(t||n==null||r==null)return;const s=By(e,r);if(s==null)return;const o=a=>{if(!a.defaultPrevented)switch(a.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{a.preventDefault(),n(a);break}case"F6":{a.preventDefault();const u=s.getAttribute(mn.groupId);tt(u,`No group element found for id "${u}"`);const c=Ah(u,r),f=r9(u,e,r);tt(f!==null,`No resize element found for id "${e}"`);const h=a.shiftKey?f>0?f-1:c.length-1:f+1<c.length?f+1:0;c[h].focus();break}}};return s.addEventListener("keydown",o),()=>{s.removeEventListener("keydown",o)}},[r,t,e,n])}function f9({children:t=null,className:e="",disabled:n=!1,hitAreaMargins:r,id:s,onBlur:o,onClick:a,onDragging:u,onFocus:c,onPointerDown:f,onPointerUp:h,style:g={},tabIndex:m=0,tagName:y="div",...S}){var E,C;const w=A.useRef(null),x=A.useRef({onClick:a,onDragging:u,onPointerDown:f,onPointerUp:h});A.useEffect(()=>{x.current.onClick=a,x.current.onDragging=u,x.current.onPointerDown=f,x.current.onPointerUp=h});const T=A.useContext(Fy);if(T===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:R,groupId:M,registerResizeHandle:N,startDragging:O,stopDragging:k,panelGroupElement:F}=T,$=lT(s),[D,z]=A.useState("inactive"),[q,K]=A.useState(!1),[Y,H]=A.useState(null),te=A.useRef({state:D});Ml(()=>{te.current.state=D}),A.useEffect(()=>{if(n)H(null);else{const L=N($);H(()=>L)}},[n,$,N]);const fe=(E=r?.coarse)!==null&&E!==void 0?E:15,de=(C=r?.fine)!==null&&C!==void 0?C:5;A.useEffect(()=>{if(n||Y==null)return;const L=w.current;tt(L,"Element ref not attached");let G=!1;return gJ($,L,R,{coarse:fe,fine:de},(ee,oe,he)=>{if(!oe){z("inactive");return}switch(ee){case"down":{z("drag"),G=!1,tt(he,'Expected event to be defined for "down" action'),O($,he);const{onDragging:ue,onPointerDown:ve}=x.current;ue?.(!0),ve?.();break}case"move":{const{state:ue}=te.current;G=!0,ue!=="drag"&&z("hover"),tt(he,'Expected event to be defined for "move" action'),Y(he);break}case"up":{z("hover"),k();const{onClick:ue,onDragging:ve,onPointerUp:xe}=x.current;ve?.(!1),xe?.(),G||ue?.();break}}})},[fe,R,n,de,N,$,Y,O,k]),OJ({disabled:n,handleId:$,resizeHandler:Y,panelGroupElement:F});const Ae={touchAction:"none",userSelect:"none"};return A.createElement(y,{...S,children:t,className:e,id:s,onBlur:()=>{K(!1),o?.()},onFocus:()=>{K(!0),c?.()},ref:w,role:"separator",style:{...Ae,...g},tabIndex:m,[mn.groupDirection]:R,[mn.groupId]:M,[mn.resizeHandle]:"",[mn.resizeHandleActive]:D==="drag"?"pointer":q?"keyboard":void 0,[mn.resizeHandleEnabled]:!n,[mn.resizeHandleId]:$,[mn.resizeHandleState]:D})}f9.displayName="PanelResizeHandle";function AP({className:t,...e}){return I.jsx(d9,{className:Rt("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",t),...e})}const If=G8;function dS({className:t,...e}){return I.jsx(f9,{className:Rt("relative w-px shrink-0 bg-line transition-colors cursor-col-resize","after:absolute after:inset-y-0 after:left-1/2 after:w-1.5 after:-translate-x-1/2","data-[resize-handle-state=hover]:bg-line-strong","data-[resize-handle-state=drag]:bg-accent","focus-visible:outline-none focus-visible:bg-accent",t),...e})}const h9=A.createContext(null);function iRe(){return A.useContext(h9)}function aRe({nav:t,list:e,reading:n,intelligence:r,intelligenceOpen:s=!0,hasThread:o=!0,density:a="comfortable",header:u,topBar:c,overlay:f,skeleton:h,isLoading:g=!1,initialWidth:m,navOpen:y,onOpenNav:S,onCloseNav:E}){const[C,w]=eJ(m),x=JQ(w??0),T=x.nav,R=x.reading&&!!n,M=x.intelligence,[N,O]=A.useState(!1),k=y!==void 0,F=k?y:N,$=()=>{k||O(!0),S?.()},D=()=>{k||O(!1),E?.()},z=M&&s&&o&&!!r,q={panes:x,containerWidth:w,showNavPane:T,openNav:$,showReadingPane:R,showIntelligencePane:M},K=I.jsxs(AP,{direction:"horizontal",className:"min-h-0 flex-1",children:[I.jsx(If,{id:"list",order:1,defaultSize:R?a==="compact"?43:33:100,minSize:22,maxSize:R?58:100,className:"min-w-0",children:e}),R&&I.jsxs(I.Fragment,{children:[I.jsx(dS,{}),I.jsx(If,{id:"reading",order:2,minSize:29,className:"min-w-0",children:n})]}),z&&I.jsxs(I.Fragment,{children:[I.jsx(dS,{}),I.jsx(If,{id:"intelligence",order:3,defaultSize:25,minSize:18,maxSize:39,className:"min-w-0",children:r})]})]}),Y=I.jsxs("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col",children:[c,!T&&u&&I.jsx("div",{className:"shrink-0",children:u}),K]});return I.jsx(h9.Provider,{value:q,children:I.jsx("div",{ref:C,className:"@container flex h-dvh w-full flex-col overflow-hidden bg-canvas font-sans text-fg",children:g&&h?h:I.jsxs(I.Fragment,{children:[T?I.jsxs(AP,{direction:"horizontal",className:"min-h-0 flex-1",children:[I.jsx(If,{id:"nav",order:1,defaultSize:17,minSize:12,maxSize:24,className:"min-w-0",children:t}),I.jsx(dS,{}),I.jsx(If,{id:"content",order:2,className:"flex min-w-0 flex-col",children:Y})]}):Y,!T&&I.jsx(rJ,{open:F,onClose:D,title:"Folders",anchor:"left",children:t}),f]})})})}const p9="inline-flex items-center justify-center gap-2 rounded-md font-medium whitespace-nowrap transition-colors outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-surface disabled:opacity-50 disabled:pointer-events-none",g9={primary:"bg-accent text-accent-fg hover:bg-accent-hover",secondary:"bg-surface text-fg border border-line hover:bg-surface-sunken hover:border-line-strong",ghost:"text-fg-muted hover:bg-surface-sunken hover:text-fg",danger:"bg-danger text-accent-fg hover:opacity-90"},m9={sm:"h-7 px-2.5 text-xs",md:"h-9 px-3.5 text-sm",touch:"h-11 w-11 text-sm"};function Zs({variant:t="primary",size:e="md",icon:n,className:r,children:s,...o}){return I.jsxs("button",{type:"button",className:Rt(p9,g9[t],m9[e],r),...o,children:[n,s]})}function lRe({variant:t="primary",size:e="md",icon:n,external:r,className:s,children:o,...a}){return I.jsxs("a",{className:Rt(p9,g9[t],m9[e],s),...r?{target:"_blank",rel:"noopener noreferrer"}:{},...a,children:[n,o]})}const NJ={neutral:"bg-surface-sunken text-fg-muted",accent:"bg-accent-2-soft text-accent-2",positive:"bg-surface-sunken text-positive",warning:"bg-surface-sunken text-warning",danger:"bg-danger-soft text-danger"},MJ={neutral:"bg-fg-subtle",accent:"bg-accent-2",positive:"bg-positive",warning:"bg-warning",danger:"bg-danger"};function TP({tone:t="neutral",dot:e,className:n,children:r,...s}){return I.jsxs("span",{className:Rt("inline-flex items-center gap-1.5 rounded-full px-2 py-0.5 text-2xs font-medium",NJ[t],n),...s,children:[e&&I.jsx("span",{className:Rt("size-1.5 rounded-full",MJ[t])}),r]})}const uRe={"data-list-row":""},PJ="[data-list-row]";function kJ(t,e,n,r="vertical"){if(n===0)return null;const s=r==="vertical"?"ArrowDown":"ArrowRight",o=r==="vertical"?"ArrowUp":"ArrowLeft";return t===s?e<0?0:Math.min(e+1,n-1):t===o?e<=0?0:e-1:t==="Home"?0:t==="End"?n-1:null}function RP(t,e){return Array.from(t.querySelectorAll(e))}function DJ({containerRef:t,itemSelector:e,orientation:n="vertical",enabled:r=!0}){A.useEffect(()=>{if(!r)return;const s=t.current;if(!s)return;const o=()=>{const u=RP(s,e);if(u.length===0)return;const f=u.find(h=>h===document.activeElement)??u[0];for(const h of u)h.tabIndex=h===f?0:-1},a=u=>{const c=RP(s,e),f=c.indexOf(document.activeElement),h=kJ(u.key,f,c.length,n);h===null||h===f||(u.preventDefault(),u.stopPropagation(),c[h]?.focus())};return o(),s.addEventListener("focusin",o),s.addEventListener("keydown",a),()=>{s.removeEventListener("focusin",o),s.removeEventListener("keydown",a)}})}const IP=10;function LJ({section:t,Row:e,selectedThreadId:n,initialExpanded:r=!1,initialCollapsed:s=!1,onSelectThread:o}){const[a,u]=A.useState(r),[c,f]=A.useState(s),h=t.threads.length>IP,m=!a&&h?t.threads.slice(0,IP):t.threads,y=t.threads.length-m.length;return I.jsxs("div",{children:[t.label&&I.jsxs("button",{type:"button","aria-expanded":!c,onClick:()=>f(S=>!S),className:"sticky top-0 z-10 flex h-section-row w-full items-center gap-1.5 border-b border-line bg-surface-sunken px-row-inset text-left outline-none transition-colors hover:bg-surface focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset",children:[I.jsx("span",{className:"flex-1 text-2xs font-semibold uppercase tracking-wider text-fg-subtle",children:t.label}),I.jsx("span",{className:"text-2xs text-fg-subtle tabular-nums",children:t.threads.length}),I.jsx(Qx,{className:Rt("size-3 shrink-0 text-fg-subtle transition-transform duration-200",c?"rotate-0":"rotate-180")})]}),!c&&I.jsxs(I.Fragment,{children:[I.jsx("div",{className:"divide-y divide-line",children:m.map(S=>I.jsx(e,{thread:S,active:S.id===n,onClick:()=>o?.(S.id)},S.id))}),h&&I.jsxs("button",{type:"button",onClick:()=>u(S=>!S),className:"flex w-full items-center justify-center border-b border-line px-row-inset py-1.5 text-2xs font-medium text-accent outline-none transition-colors hover:bg-surface focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset",children:[a?"Show less":`Show ${y} more`,!a&&I.jsx(Qx,{className:"ml-1 size-3"})]})]})]})}function UJ(t){return t.target!==t.currentTarget?!1:t.key==="Enter"||t.key===" "}function FJ({className:t}){return I.jsx("svg",{viewBox:"0 0 12 12",className:t,fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",children:I.jsx("path",{d:"M2 4l4 4 4-4"})})}function OP({className:t}){return I.jsx("svg",{viewBox:"0 0 12 12",className:t,fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",children:I.jsx("path",{d:"M3 3l6 6M9 3l-6 6"})})}function zJ({categories:t,filters:e,sources:n,sourcesNote:r,selectedCategory:s,activeFilters:o,expanded:a,onSelectCategory:u,onSelectSource:c,onToggleFilter:f,onClear:h,onExpandedChange:g,children:m}){const y=a!==void 0,[S,E]=A.useState(!1),C=y?a:S,w=A.useCallback(Y=>{y||E(Y),g?.(Y)},[y,g]),x=t[0],T=x!==void 0&&s===x.id,R=n?.[0],M=n?.find(Y=>Y.active),N=R===void 0||M?.id===R.id,O=!T||o.size>0||!N&&!!M,k=A.useCallback(()=>{R&&c?.(R.id)},[R,c]),F=A.useCallback(()=>{h(),k()},[h,k]),$=t.find(Y=>Y.id===s),D=O?I.jsxs(I.Fragment,{children:[!N&&M&&I.jsx("span",{className:"inline-flex items-center rounded-full border border-accent-2 bg-accent-2-soft px-2 py-0.5 text-2xs font-medium text-accent-2",children:M.label}),!T&&$&&I.jsx(TP,{tone:$.tone??"neutral",children:$.label}),e.filter(Y=>o.has(Y.id)).map(Y=>I.jsx("span",{className:"inline-flex items-center rounded-full border border-accent-2 bg-accent-2-soft px-2 py-0.5 text-2xs font-medium text-accent-2",children:Y.label},Y.id))]}):I.jsx("span",{className:"text-2xs text-fg-subtle",children:"Filters"}),z=n&&n.length>1&&I.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 border-b border-line px-row-inset pb-2 pt-2",children:[n.map(Y=>I.jsxs("button",{type:"button",onClick:()=>c?.(Y.id),className:Rt("flex items-center gap-1 rounded-full border px-2.5 py-0.5 text-2xs transition-colors",Y.active?"border-accent-2 bg-accent-2-soft font-medium text-accent-2":"border-line text-fg-muted hover:border-line-strong"),children:[Y.label,Y.count!=null&&Y.count>0&&I.jsx("span",{className:"tabular-nums opacity-70",children:Y.count})]},Y.id)),r&&I.jsx("span",{className:"ml-auto shrink-0 text-2xs text-fg-subtle",children:r})]}),q=I.jsx("div",{className:"flex flex-wrap items-center gap-1.5 border-b border-line px-row-inset pb-1.5 pt-1.5",children:t.map(Y=>{const H=s===Y.id;return I.jsx("button",{type:"button",onClick:()=>u(Y.id),className:Rt("shrink-0 rounded-full transition-opacity",H?"opacity-100 ring-1 ring-accent-2":"opacity-60 hover:opacity-100"),children:I.jsx(TP,{tone:Y.tone??"neutral",children:Y.label})},Y.id)})}),K=I.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 border-b border-line px-row-inset pb-2 pt-1.5",children:[e.map(Y=>{const H=o.has(Y.id);return I.jsx("button",{type:"button",onClick:()=>f(Y.id),className:Rt("shrink-0 rounded-full border px-2.5 py-0.5 text-2xs transition-colors",H?"border-accent-2 bg-accent-2-soft font-medium text-accent-2":"border-line text-fg-muted hover:border-line-strong"),children:Y.label},Y.id)}),O&&I.jsxs("button",{type:"button",onClick:F,className:"ml-auto flex items-center gap-1 px-1 text-2xs text-fg-subtle hover:text-fg-muted",children:[I.jsx(OP,{className:"size-3"}),"Clear"]})]});return I.jsxs("div",{className:"flex h-full w-full flex-col overflow-hidden",children:[I.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":C,"aria-label":C?"Collapse filters":"Expand filters",onClick:()=>w(!C),onKeyDown:Y=>{UJ(Y)&&(Y.preventDefault(),w(!C))},className:"flex h-section-row w-full shrink-0 cursor-pointer items-center gap-1.5 overflow-x-hidden border-b border-line bg-surface-sunken px-row-inset text-left hover:bg-surface",children:[D,O&&I.jsx("button",{type:"button","aria-label":"Clear filters",onClick:Y=>{Y.stopPropagation(),F()},className:"flex size-6 items-center justify-center text-fg-subtle hover:text-fg-muted",children:I.jsx(OP,{className:"size-3"})}),I.jsx(FJ,{className:Rt("ml-auto size-3 shrink-0 text-fg-subtle transition-transform duration-200",C?"rotate-180":"rotate-0")})]}),C&&I.jsxs("div",{className:"shrink-0",children:[z,q,K]}),I.jsx("div",{className:"flex-1 overflow-y-auto",children:m})]})}function jJ(t){return t.sentDate!=null?new Date(t.sentDate).toDateString()===new Date().toDateString():/^\d{1,2}:\d{2}$/.test(t.timeLabel)}const v9=[{id:"unread",label:"Unread",match:t=>!t.isRead},{id:"attachment",label:"Has attachment",match:t=>!!t.hasAttachment},{id:"contacts",label:"From contacts",match:t=>t.trust==="vip"||t.trust==="wellknown"},{id:"today",label:"Today",match:jJ}],BJ=v9.map(({id:t,label:e})=>({id:t,label:e}));function cRe({sections:t,briefCategory:e="all",selectedThreadId:n,Row:r,onSelectThread:s,onSelectBriefCategory:o,sources:a,sourcesNote:u,onSelectSource:c,defaultExpanded:f=!1,manageFocus:h=!0}){const[g,m]=A.useState(new Set),[y,S]=A.useState(f),E=A.useRef(null);DJ({containerRef:E,itemSelector:PJ,enabled:h});const C=D=>{m(z=>{const q=new Set(z);return q.has(D)?q.delete(D):q.add(D),q})},w=v9.filter(D=>g.has(D.id)),x=D=>(e==="all"||D.category===e)&&w.every(z=>z.match(D)),T=e==="all",R=t.map(D=>({...D,threads:D.threads.filter(x)})).filter(D=>D.threads.length>0),M=t.flatMap(D=>D.threads).filter(x),N=tJ.map(D=>({id:D.id,label:D.label,tone:D.id==="all"?"neutral":nJ[D.id]})),O=BJ,k=()=>{o?.("all"),m(new Set)},F=T?R.length===0:M.length===0,$=I.jsxs("div",{ref:E,children:[T?R.map(D=>I.jsx(LJ,{section:D,Row:r,selectedThreadId:n,onSelectThread:s},D.id)):I.jsx("div",{className:"divide-y divide-line",children:M.map(D=>I.jsx(r,{thread:D,active:D.id===n,onClick:()=>s?.(D.id)},D.id))}),F&&I.jsx("div",{className:"px-row-inset py-6 text-center text-2xs text-fg-subtle",children:"No threads match these filters."})]});return I.jsx(zJ,{categories:N,filters:O,sources:a,sourcesNote:u,selectedCategory:e,activeFilters:g,expanded:y,onExpandedChange:S,onSelectCategory:D=>o?.(D),onSelectSource:c,onToggleFilter:D=>C(D),onClear:k,children:$})}const HJ={info:"bg-accent-2/15 text-accent-2 border-accent-2/40",success:"bg-positive/15 text-positive border-positive/40",warning:"bg-warning/15 text-warning border-warning/40",danger:"bg-danger/15 text-danger border-danger/40"},$J={info:"bg-surface-sunken text-fg-muted",success:"bg-positive/10 text-positive",warning:"bg-warning/10 text-warning",danger:"bg-danger-soft text-danger"},qJ={info:"status",success:"status",warning:"alert",danger:"alert"};function n_({tone:t="info",variant:e="framed",onDismiss:n,role:r,className:s,children:o,...a}){const u=e==="soft";return I.jsxs("div",{role:r??qJ[t],className:Rt("flex gap-2 px-3 py-2 text-sm",u?Rt("items-start rounded-md",$J[t]):Rt("items-center border",HJ[t]),s),...a,children:[I.jsx("div",{className:"flex-1 min-w-0",children:o}),n&&(u?I.jsx(Zs,{variant:"ghost",size:"sm",icon:I.jsx(La,{className:"size-3.5"}),onClick:n,"aria-label":"Dismiss",className:"-mr-1 shrink-0"}):I.jsx("button",{type:"button",onClick:n,"aria-label":"Dismiss",className:"shrink-0 rounded-md p-1 hover:bg-fg/10 transition-colors",children:I.jsx(La,{className:"size-4","aria-hidden":"true"})}))]})}function NP(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function WJ(t){if(Array.isArray(t))return t}function VJ(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,s,o,a,u=[],c=!0,f=!1;try{if(o=(n=n.call(t)).next,e!==0)for(;!(c=(r=o.call(n)).done)&&(u.push(r.value),u.length!==e);c=!0);}catch(h){f=!0,s=h}finally{try{if(!c&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(f)throw s}}return u}}function GJ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
13
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function KJ(t,e){return WJ(t)||VJ(t,e)||YJ(t,e)||GJ()}function YJ(t,e){if(t){if(typeof t=="string")return NP(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?NP(t,e):void 0}}const y9=Object.entries,MP=Object.setPrototypeOf,ZJ=Object.isFrozen,XJ=Object.getPrototypeOf,QJ=Object.getOwnPropertyDescriptor;let rr=Object.freeze,or=Object.seal,vc=Object.create,b9=typeof Reflect<"u"&&Reflect,r_=b9.apply,s_=b9.construct;rr||(rr=function(e){return e});or||(or=function(e){return e});r_||(r_=function(e,n){for(var r=arguments.length,s=new Array(r>2?r-2:0),o=2;o<r;o++)s[o-2]=arguments[o];return e.apply(n,s)});s_||(s_=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];return new e(...r)});const nc=Rn(Array.prototype.forEach),JJ=Rn(Array.prototype.lastIndexOf),PP=Rn(Array.prototype.pop),rc=Rn(Array.prototype.push),eee=Rn(Array.prototype.splice),wa=Array.isArray,Qf=Rn(String.prototype.toLowerCase),fS=Rn(String.prototype.toString),kP=Rn(String.prototype.match),Of=Rn(String.prototype.replace),DP=Rn(String.prototype.indexOf),tee=Rn(String.prototype.trim),nee=Rn(Number.prototype.toString),ree=Rn(Boolean.prototype.toString),LP=typeof BigInt>"u"?null:Rn(BigInt.prototype.toString),UP=typeof Symbol>"u"?null:Rn(Symbol.prototype.toString),Bn=Rn(Object.prototype.hasOwnProperty),Nf=Rn(Object.prototype.toString),zn=Rn(RegExp.prototype.test),bl=see(TypeError);function Rn(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];return r_(t,e,r)}}function see(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return s_(t,n)}}function mt(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Qf;if(MP&&MP(t,null),!wa(e))return t;let r=e.length;for(;r--;){let s=e[r];if(typeof s=="string"){const o=n(s);o!==s&&(ZJ(e)||(e[r]=o),s=o)}t[s]=!0}return t}function oee(t){for(let e=0;e<t.length;e++)Bn(t,e)||(t[e]=null);return t}function Sr(t){const e=vc(null);for(const r of y9(t)){var n=KJ(r,2);const s=n[0],o=n[1];Bn(t,s)&&(wa(o)?e[s]=oee(o):o&&typeof o=="object"&&o.constructor===Object?e[s]=Sr(o):e[s]=o)}return e}function iee(t){switch(typeof t){case"string":return t;case"number":return nee(t);case"boolean":return ree(t);case"bigint":return LP?LP(t):"0";case"symbol":return UP?UP(t):"Symbol()";case"undefined":return Nf(t);case"function":case"object":{if(t===null)return Nf(t);const e=t,n=vo(e,"toString");if(typeof n=="function"){const r=n(e);return typeof r=="string"?r:Nf(r)}return Nf(t)}default:return Nf(t)}}function vo(t,e){for(;t!==null;){const r=QJ(t,e);if(r){if(r.get)return Rn(r.get);if(typeof r.value=="function")return Rn(r.value)}t=XJ(t)}function n(){return null}return n}function aee(t){try{return zn(t,""),!0}catch{return!1}}const FP=rr(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),hS=rr(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),pS=rr(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),lee=rr(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),gS=rr(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),uee=rr(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),zP=rr(["#text"]),jP=rr(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),mS=rr(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),BP=rr(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Kg=rr(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),cee=or(/{{[\w\W]*|^[\w\W]*}}/g),dee=or(/<%[\w\W]*|^[\w\W]*%>/g),fee=or(/\${[\w\W]*/g),hee=or(/^data-[\-\w.\u00B7-\uFFFF]+$/),pee=or(/^aria-[\-\w]+$/),HP=or(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),gee=or(/^(?:\w+script|data):/i),mee=or(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),vee=or(/^html$/i),yee=or(/^[a-z][.\w]*(-[.\w]+)+$/i),$P=or(/<[/\w!]/g),qP=or(/<[/\w]/g),bee=or(/<\/no(script|embed|frames)/i),See=or(/\/>/i),rs={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Eee=function(){return typeof window>"u"?null:window},Cee=function(e,n){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let r=null;const s="data-tt-policy-suffix";n&&n.hasAttribute(s)&&(r=n.getAttribute(s));const o="dompurify"+(r?"#"+r:"");try{return e.createPolicy(o,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},WP=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},ha=function(e,n,r,s){return Bn(e,n)&&wa(e[n])?mt(s.base?Sr(s.base):{},e[n],s.transform):r};function S9(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Eee();const e=pe=>S9(pe);if(e.version="3.4.12",e.removed=[],!t||!t.document||t.document.nodeType!==rs.document||!t.Element)return e.isSupported=!1,e;let n=t.document;const r=n,s=r.currentScript;t.DocumentFragment;const o=t.HTMLTemplateElement,a=t.Node,u=t.Element,c=t.NodeFilter,f=t.NamedNodeMap;f===void 0&&(t.NamedNodeMap||t.MozNamedAttrMap),t.HTMLFormElement;const h=t.DOMParser,g=t.trustedTypes,m=u.prototype,y=vo(m,"cloneNode"),S=vo(m,"remove"),E=vo(m,"nextSibling"),C=vo(m,"childNodes"),w=vo(m,"parentNode"),x=vo(m,"shadowRoot"),T=vo(m,"attributes"),R=a&&a.prototype?vo(a.prototype,"nodeType"):null,M=a&&a.prototype?vo(a.prototype,"nodeName"):null;if(typeof o=="function"){const pe=n.createElement("template");pe.content&&pe.content.ownerDocument&&(n=pe.content.ownerDocument)}let N,O="",k,F=!1,$=0;const D=function(){if($>0)throw bl('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},z=function(U){D(),$++;try{return N.createHTML(U)}finally{$--}},q=function(U){D(),$++;try{return N.createScriptURL(U)}finally{$--}},K=function(){return F||(k=Cee(g,s),F=!0),k},Y=n,H=Y.implementation,te=Y.createNodeIterator,fe=Y.createDocumentFragment,de=Y.getElementsByTagName,Ae=r.importNode;let L=WP();e.isSupported=typeof y9=="function"&&typeof w=="function"&&H&&H.createHTMLDocument!==void 0;const G=cee,Z=dee,ee=fee,oe=hee,he=pee,ue=gee,ve=mee,xe=yee;let Xe=HP,Ee=null;const pt=mt({},[...FP,...hS,...pS,...gS,...zP]);let Ce=null;const ze=mt({},[...jP,...mS,...BP,...Kg]);let je=Object.seal(vc(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),$e=null,gr=null;const Et=Object.seal(vc(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Gr=!0,Kn=!0,Tr=!1,no=!0,Rr=!1,Gt=!0,gt=!1,yn=!1,Ir=null,ro=null,Cd=!1,Do=!1,vu=!1,yu=!1,Pi=!0,lr=!1;const Ps="user-content-";let Yn=!0,wd=!1,ki={},ps=null;const Di=mt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Ya=null;const Za=mt({},["audio","video","img","source","image","track"]);let ks=null;const Xa=mt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),so="http://www.w3.org/1998/Math/MathML",bu="http://www.w3.org/2000/svg",Kr="http://www.w3.org/1999/xhtml";let oo=Kr,Lo=!1,xd=null;const Cp=mt({},[so,bu,Kr],fS),_d=rr(["mi","mo","mn","ms","mtext"]);let Su=mt({},_d);const Eu=rr(["annotation-xml"]);let Qa=mt({},Eu);const wp=mt({},["title","style","font","a","script"]);let Li=null;const io=["application/xhtml+xml","text/html"],On="text/html";let nt=null,Yr=null;const Ad=n.createElement("form"),xp=function(U){return U instanceof RegExp||U instanceof Function},Td=function(){let U=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Yr&&Yr===U)return;(!U||typeof U!="object")&&(U={}),U=Sr(U),Li=io.indexOf(U.PARSER_MEDIA_TYPE)===-1?On:U.PARSER_MEDIA_TYPE,nt=Li==="application/xhtml+xml"?fS:Qf,Ee=ha(U,"ALLOWED_TAGS",pt,{transform:nt}),Ce=ha(U,"ALLOWED_ATTR",ze,{transform:nt}),xd=ha(U,"ALLOWED_NAMESPACES",Cp,{transform:fS}),ks=ha(U,"ADD_URI_SAFE_ATTR",Xa,{transform:nt,base:Xa}),Ya=ha(U,"ADD_DATA_URI_TAGS",Za,{transform:nt,base:Za}),ps=ha(U,"FORBID_CONTENTS",Di,{transform:nt}),$e=ha(U,"FORBID_TAGS",Sr({}),{transform:nt}),gr=ha(U,"FORBID_ATTR",Sr({}),{transform:nt}),ki=Bn(U,"USE_PROFILES")?U.USE_PROFILES&&typeof U.USE_PROFILES=="object"?Sr(U.USE_PROFILES):U.USE_PROFILES:!1,Gr=U.ALLOW_ARIA_ATTR!==!1,Kn=U.ALLOW_DATA_ATTR!==!1,Tr=U.ALLOW_UNKNOWN_PROTOCOLS||!1,no=U.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Rr=U.SAFE_FOR_TEMPLATES||!1,Gt=U.SAFE_FOR_XML!==!1,gt=U.WHOLE_DOCUMENT||!1,Do=U.RETURN_DOM||!1,vu=U.RETURN_DOM_FRAGMENT||!1,yu=U.RETURN_TRUSTED_TYPE||!1,Cd=U.FORCE_BODY||!1,Pi=U.SANITIZE_DOM!==!1,lr=U.SANITIZE_NAMED_PROPS||!1,Yn=U.KEEP_CONTENT!==!1,wd=U.IN_PLACE||!1,Xe=aee(U.ALLOWED_URI_REGEXP)?U.ALLOWED_URI_REGEXP:HP,oo=typeof U.NAMESPACE=="string"?U.NAMESPACE:Kr,Su=Bn(U,"MATHML_TEXT_INTEGRATION_POINTS")&&U.MATHML_TEXT_INTEGRATION_POINTS&&typeof U.MATHML_TEXT_INTEGRATION_POINTS=="object"?Sr(U.MATHML_TEXT_INTEGRATION_POINTS):mt({},_d),Qa=Bn(U,"HTML_INTEGRATION_POINTS")&&U.HTML_INTEGRATION_POINTS&&typeof U.HTML_INTEGRATION_POINTS=="object"?Sr(U.HTML_INTEGRATION_POINTS):mt({},Eu);const X=Bn(U,"CUSTOM_ELEMENT_HANDLING")&&U.CUSTOM_ELEMENT_HANDLING&&typeof U.CUSTOM_ELEMENT_HANDLING=="object"?Sr(U.CUSTOM_ELEMENT_HANDLING):vc(null);if(je=vc(null),Bn(X,"tagNameCheck")&&xp(X.tagNameCheck)&&(je.tagNameCheck=X.tagNameCheck),Bn(X,"attributeNameCheck")&&xp(X.attributeNameCheck)&&(je.attributeNameCheck=X.attributeNameCheck),Bn(X,"allowCustomizedBuiltInElements")&&typeof X.allowCustomizedBuiltInElements=="boolean"&&(je.allowCustomizedBuiltInElements=X.allowCustomizedBuiltInElements),or(je),Rr&&(Kn=!1),vu&&(Do=!0),ki&&(Ee=mt({},zP),Ce=vc(null),ki.html===!0&&(mt(Ee,FP),mt(Ce,jP)),ki.svg===!0&&(mt(Ee,hS),mt(Ce,mS),mt(Ce,Kg)),ki.svgFilters===!0&&(mt(Ee,pS),mt(Ce,mS),mt(Ce,Kg)),ki.mathMl===!0&&(mt(Ee,gS),mt(Ce,BP),mt(Ce,Kg))),Et.tagCheck=null,Et.attributeCheck=null,Bn(U,"ADD_TAGS")&&(typeof U.ADD_TAGS=="function"?Et.tagCheck=U.ADD_TAGS:wa(U.ADD_TAGS)&&(Ee===pt&&(Ee=Sr(Ee)),mt(Ee,U.ADD_TAGS,nt))),Bn(U,"ADD_ATTR")&&(typeof U.ADD_ATTR=="function"?Et.attributeCheck=U.ADD_ATTR:wa(U.ADD_ATTR)&&(Ce===ze&&(Ce=Sr(Ce)),mt(Ce,U.ADD_ATTR,nt))),Bn(U,"ADD_URI_SAFE_ATTR")&&wa(U.ADD_URI_SAFE_ATTR)&&mt(ks,U.ADD_URI_SAFE_ATTR,nt),Bn(U,"FORBID_CONTENTS")&&wa(U.FORBID_CONTENTS)&&(ps===Di&&(ps=Sr(ps)),mt(ps,U.FORBID_CONTENTS,nt)),Bn(U,"ADD_FORBID_CONTENTS")&&wa(U.ADD_FORBID_CONTENTS)&&(ps===Di&&(ps=Sr(ps)),mt(ps,U.ADD_FORBID_CONTENTS,nt)),Yn&&(Ee["#text"]=!0),gt&&mt(Ee,["html","head","body"]),Ee.table&&(mt(Ee,["tbody"]),delete $e.tbody),U.TRUSTED_TYPES_POLICY){if(typeof U.TRUSTED_TYPES_POLICY.createHTML!="function")throw bl('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof U.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw bl('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const ce=N;N=U.TRUSTED_TYPES_POLICY;try{O=z("")}catch(Te){throw N=ce,Te}}else U.TRUSTED_TYPES_POLICY===null?(N=void 0,O=""):(N===void 0&&(N=K()),N&&typeof O=="string"&&(O=z("")));rr&&rr(U),Yr=U},Rd=mt({},[...hS,...pS,...lee]),Ui=mt({},[...gS,...uee]),Id=function(U,X,ce){return X.namespaceURI===Kr?U==="svg":X.namespaceURI===so?U==="svg"&&(ce==="annotation-xml"||Su[ce]):!!Rd[U]},Fi=function(U,X,ce){return X.namespaceURI===Kr?U==="math":X.namespaceURI===bu?U==="math"&&Qa[ce]:!!Ui[U]},zi=function(U,X,ce){return X.namespaceURI===bu&&!Qa[ce]||X.namespaceURI===so&&!Su[ce]?!1:!Ui[U]&&(wp[U]||!Rd[U])},Ja=function(U){let X=w(U);(!X||!X.tagName)&&(X={namespaceURI:oo,tagName:"template"});const ce=Qf(U.tagName),Te=Qf(X.tagName);return xd[U.namespaceURI]?U.namespaceURI===bu?Id(ce,X,Te):U.namespaceURI===so?Fi(ce,X,Te):U.namespaceURI===Kr?zi(ce,X,Te):!!(Li==="application/xhtml+xml"&&xd[U.namespaceURI]):!1},mr=function(U){rc(e.removed,{element:U});try{w(U).removeChild(U)}catch{if(S(U),!w(U))throw bl("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},ln=function(U){Ds(U);const X=C(U);if(X){const Te=[];nc(X,ke=>{rc(Te,ke)}),nc(Te,ke=>{try{S(ke)}catch{}})}const ce=T(U);if(ce)for(let Te=ce.length-1;Te>=0;--Te){const ke=ce[Te],Ue=ke&&ke.name;if(typeof Ue=="string")try{U.removeAttribute(Ue)}catch{}}},ao=function(U,X){try{rc(e.removed,{attribute:X.getAttributeNode(U),from:X})}catch{rc(e.removed,{attribute:null,from:X})}if(X.removeAttribute(U),U==="is")if(Do||vu)try{mr(X)}catch{}else try{X.setAttribute(U,"")}catch{}},_p=function(U){const X=T(U);if(X)for(let ce=X.length-1;ce>=0;--ce){const Te=X[ce],ke=Te&&Te.name;if(!(typeof ke!="string"||Ce[nt(ke)]))try{U.removeAttribute(ke)}catch{}}},Ds=function(U){const X=[U];for(;X.length>0;){const ce=X.pop();(R?R(ce):ce.nodeType)===rs.element&&_p(ce);const ke=C(ce);if(ke)for(let Ue=ke.length-1;Ue>=0;--Ue)X.push(ke[Ue])}},ji=function(U){if(!Gt)return;const X=[U];for(;X.length>0;){const ce=X.pop(),Te=R?R(ce):ce.nodeType;if(Te===rs.processingInstruction||Te===rs.comment&&zn(qP,ce.data)){try{S(ce)}catch{}continue}if(Te===rs.element){const Ue=ce,tn=nt(M?M(ce):ce.nodeName);try{Ue.hasAttribute&&Ue.hasAttribute("patchsrc")&&Ue.removeAttribute("patchsrc"),Ue.hasAttribute&&Ue.hasAttribute("for")&&tn!=="label"&&tn!=="output"&&Ue.removeAttribute("for")}catch{}}const ke=C(ce);if(ke)for(let Ue=ke.length-1;Ue>=0;--Ue)X.push(ke[Ue])}},Ap=function(U){let X=null,ce=null;if(Cd)U="<remove></remove>"+U;else{const Ue=kP(U,/^[\r\n\t ]+/);ce=Ue&&Ue[0]}Li==="application/xhtml+xml"&&oo===Kr&&(U='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+U+"</body></html>");const Te=N?z(U):U;if(oo===Kr)try{X=new h().parseFromString(Te,Li)}catch{}if(!X||!X.documentElement){X=H.createDocument(oo,"template",null);try{X.documentElement.innerHTML=Lo?O:Te}catch{}}const ke=X.body||X.documentElement;return U&&ce&&ke.insertBefore(n.createTextNode(ce),ke.childNodes[0]||null),oo===Kr?de.call(X,gt?"html":"body")[0]:gt?X.documentElement:ke},Od=function(U){return te.call(U.ownerDocument||U,U,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},el=function(U){return U=Of(U,G," "),U=Of(U,Z," "),U=Of(U,ee," "),U},Nd=function(U){var X;U.normalize();const ce=te.call(U.ownerDocument||U,U,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null);let Te=ce.nextNode();for(;Te;)Te.data=el(Te.data),Te=ce.nextNode();const ke=(X=U.querySelectorAll)===null||X===void 0?void 0:X.call(U,"template");ke&&nc(ke,Ue=>{Ls(Ue.content)&&Nd(Ue.content)})},Uo=function(U){const X=M?M(U):null;return typeof X!="string"||nt(X)!=="form"?!1:typeof U.nodeName!="string"||typeof U.textContent!="string"||typeof U.removeChild!="function"||U.attributes!==T(U)||typeof U.removeAttribute!="function"||typeof U.setAttribute!="function"||typeof U.namespaceURI!="string"||typeof U.insertBefore!="function"||typeof U.hasChildNodes!="function"||U.nodeType!==R(U)||U.childNodes!==C(U)},Ls=function(U){if(!R||typeof U!="object"||U===null)return!1;try{return R(U)===rs.documentFragment}catch{return!1}},vr=function(U){if(!R||typeof U!="object"||U===null)return!1;try{return typeof R(U)=="number"}catch{return!1}};function un(pe,U,X){pe.length!==0&&nc(pe,ce=>{ce.call(e,U,X,Yr)})}const Tp=function(U,X){return!!(Gt&&U.hasChildNodes()&&!vr(U.firstElementChild)&&zn($P,U.textContent)&&zn($P,U.innerHTML)||Gt&&U.namespaceURI===Kr&&X==="style"&&vr(U.firstElementChild)||U.nodeType===rs.processingInstruction||Gt&&U.nodeType===rs.comment&&zn(qP,U.data))},Bb=function(U,X){if(!$e[X]&&Rp(X)&&(je.tagNameCheck instanceof RegExp&&zn(je.tagNameCheck,X)||je.tagNameCheck instanceof Function&&je.tagNameCheck(X)))return!1;if(Yn&&!ps[X]){const ce=w(U),Te=C(U);if(Te&&ce){const ke=Te.length;for(let Ue=ke-1;Ue>=0;--Ue){const tn=wd?Te[Ue]:y(Te[Ue],!0);ce.insertBefore(tn,E(U))}}}return mr(U),!0},Cu=function(U,X){if(un(L.beforeSanitizeElements,U,null),U!==X&&w(U)===null)return!0;if(Uo(U))return mr(U),!0;const ce=nt(M?M(U):U.nodeName);if(un(L.uponSanitizeElement,U,{tagName:ce,allowedTags:Ee}),U!==X&&w(U)===null)return!0;if(Tp(U,ce))return mr(U),!0;if($e[ce]||!(Et.tagCheck instanceof Function&&Et.tagCheck(ce))&&!Ee[ce]){const ke=Bb(U,ce);return ke===!1&&un(L.afterSanitizeElements,U,null),ke}if((R?R(U):U.nodeType)===rs.element&&!Ja(U)||(ce==="noscript"||ce==="noembed"||ce==="noframes")&&zn(bee,U.innerHTML))return mr(U),!0;if(Rr&&U.nodeType===rs.text){const ke=el(U.textContent);U.textContent!==ke&&(rc(e.removed,{element:U.cloneNode()}),U.textContent=ke)}return un(L.afterSanitizeElements,U,null),!1},Md=function(U,X,ce){if(gr[X]||Gt&&X==="patchsrc"||Gt&&X==="for"&&U!=="label"&&U!=="output"||Pi&&(X==="id"||X==="name")&&(ce in n||ce in Ad))return!1;const Te=Ce[X]||Et.attributeCheck instanceof Function&&Et.attributeCheck(X,U);if(!(Kn&&zn(oe,X))){if(!(Gr&&zn(he,X))){if(Te){if(!ks[X]){if(!zn(Xe,Of(ce,ve,""))){if(!((X==="src"||X==="xlink:href"||X==="href")&&U!=="script"&&DP(ce,"data:")===0&&Ya[U])){if(!(Tr&&!zn(ue,Of(ce,ve,"")))){if(ce)return!1}}}}}else if(!(Rp(U)&&(je.tagNameCheck instanceof RegExp&&zn(je.tagNameCheck,U)||je.tagNameCheck instanceof Function&&je.tagNameCheck(U))&&(je.attributeNameCheck instanceof RegExp&&zn(je.attributeNameCheck,X)||je.attributeNameCheck instanceof Function&&je.attributeNameCheck(X,U))||X==="is"&&je.allowCustomizedBuiltInElements&&(je.tagNameCheck instanceof RegExp&&zn(je.tagNameCheck,ce)||je.tagNameCheck instanceof Function&&je.tagNameCheck(ce))))return!1}}return!0},wu=mt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Rp=function(U){return!wu[Qf(U)]&&zn(xe,U)},Or=function(U,X,ce,Te){if(N&&typeof g=="object"&&typeof g.getAttributeType=="function"&&!ce)switch(g.getAttributeType(U,X)){case"TrustedHTML":return z(Te);case"TrustedScriptURL":return q(Te)}return Te},Pd=function(U,X,ce,Te){try{ce?U.setAttributeNS(ce,X,Te):U.setAttribute(X,Te),Uo(U)?mr(U):PP(e.removed)}catch{ao(X,U)}},kd=function(U){un(L.beforeSanitizeAttributes,U,null);const X=U.attributes;if(!X||Uo(U))return;const ce={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ce,forceKeepAttr:void 0};let Te=X.length;const ke=nt(U.nodeName);for(;Te--;){const Ue=X[Te],tn=Ue.name,Un=Ue.namespaceURI,ur=Ue.value,nn=nt(tn),yr=ur;let Nn=tn==="value"?yr:tee(yr);if(ce.attrName=nn,ce.attrValue=Nn,ce.keepAttr=!0,ce.forceKeepAttr=void 0,un(L.uponSanitizeAttribute,U,ce),Nn=ce.attrValue,lr&&(nn==="id"||nn==="name")&&DP(Nn,Ps)!==0&&(ao(tn,U),Nn=Ps+Nn),Gt&&zn(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Nn)){ao(tn,U);continue}if(nn==="attributename"&&kP(Nn,"href")){ao(tn,U);continue}if(!ce.forceKeepAttr){if(!ce.keepAttr){ao(tn,U);continue}if(!no&&zn(See,Nn)){ao(tn,U);continue}if(Rr&&(Nn=el(Nn)),!Md(ke,nn,Nn)){ao(tn,U);continue}Nn=Or(ke,nn,Un,Nn),Nn!==yr&&Pd(U,tn,Un,Nn)}}un(L.afterSanitizeAttributes,U,null)},Bi=function(U){let X=null;const ce=Od(U);for(un(L.beforeSanitizeShadowDOM,U,null);X=ce.nextNode();)if(un(L.uponSanitizeShadowNode,X,null),Cu(X,U),kd(X),Ls(X.content)&&Bi(X.content),(R?R(X):X.nodeType)===rs.element){const ke=x(X);Ls(ke)&&(lo(ke),Bi(ke))}un(L.afterSanitizeShadowDOM,U,null)},lo=function(U){const X=[{node:U,shadow:null}];for(;X.length>0;){const ce=X.pop();if(ce.shadow){Bi(ce.shadow);continue}const Te=ce.node,Ue=(R?R(Te):Te.nodeType)===rs.element,tn=C(Te);if(tn)for(let Un=tn.length-1;Un>=0;--Un)X.push({node:tn[Un],shadow:null});if(Ue){const Un=M?M(Te):null;if(typeof Un=="string"&&nt(Un)==="template"){const ur=Te.content;Ls(ur)&&X.push({node:ur,shadow:null})}}if(Ue){const Un=x(Te);Ls(Un)&&X.push({node:null,shadow:Un},{node:Un,shadow:null})}}};return e.sanitize=function(pe){let U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},X=null,ce=null,Te=null,ke=null;if(Lo=!pe,Lo&&(pe="<!-->"),typeof pe!="string"&&!vr(pe)&&(pe=iee(pe),typeof pe!="string"))throw bl("dirty is not a string, aborting");if(!e.isSupported)return pe;yn?(Ee=Ir,Ce=ro):Td(U),(L.uponSanitizeElement.length>0||L.uponSanitizeAttribute.length>0)&&(Ee=Sr(Ee)),L.uponSanitizeAttribute.length>0&&(Ce=Sr(Ce)),e.removed=[];const Ue=wd&&typeof pe!="string"&&vr(pe);if(Ue){ji(pe);const nn=M?M(pe):pe.nodeName;if(typeof nn=="string"){const yr=nt(nn);if(!Ee[yr]||$e[yr])throw ln(pe),bl("root node is forbidden and cannot be sanitized in-place")}if(Uo(pe))throw ln(pe),bl("root node is clobbered and cannot be sanitized in-place");try{lo(pe)}catch(yr){throw ln(pe),yr}}else if(vr(pe))X=Ap("<!---->"),ce=X.ownerDocument.importNode(pe,!0),ce.nodeType===rs.element&&ce.nodeName==="BODY"||ce.nodeName==="HTML"?X=ce:X.appendChild(ce),lo(ce);else{if(!Do&&!Rr&&!gt&&pe.indexOf("<")===-1)return N&&yu?z(pe):pe;if(X=Ap(pe),!X)return Do?null:yu?O:""}X&&Cd&&mr(X.firstChild);const tn=Ue?pe:X,Un=Od(tn);try{for(;Te=Un.nextNode();)Cu(Te,tn),kd(Te),Ls(Te.content)&&Bi(Te.content)}catch(nn){throw Ue&&(ln(pe),nc(e.removed,yr=>{yr.element&&Ds(yr.element)})),nn}if(Ue)return nc(e.removed,nn=>{nn.element&&Ds(nn.element)}),Rr&&Nd(pe),pe;if(Do){if(Rr&&Nd(X),vu)for(ke=fe.call(X.ownerDocument);X.firstChild;)ke.appendChild(X.firstChild);else ke=X;return(Ce.shadowroot||Ce.shadowrootmode)&&(ke=Ae.call(r,ke,!0)),ke}let ur=gt?X.outerHTML:X.innerHTML;return gt&&Ee["!doctype"]&&X.ownerDocument&&X.ownerDocument.doctype&&X.ownerDocument.doctype.name&&zn(vee,X.ownerDocument.doctype.name)&&(ur="<!DOCTYPE "+X.ownerDocument.doctype.name+`>
14
+ `+ur),Rr&&(ur=el(ur)),N&&yu?z(ur):ur},e.setConfig=function(){let pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Td(pe),yn=!0,Ir=Ee,ro=Ce},e.clearConfig=function(){Yr=null,yn=!1,Ir=null,ro=null,N=k,O=""},e.isValidAttribute=function(pe,U,X){Yr||Td({});const ce=nt(pe),Te=nt(U);return Md(ce,Te,X)},e.addHook=function(pe,U){typeof U=="function"&&Bn(L,pe)&&rc(L[pe],U)},e.removeHook=function(pe,U){if(Bn(L,pe)){if(U!==void 0){const X=JJ(L[pe],U);return X===-1?void 0:eee(L[pe],X,1)[0]}return PP(L[pe])}},e.removeHooks=function(pe){Bn(L,pe)&&(L[pe]=[])},e.removeAllHooks=function(){L=WP()},e}var dRe=S9();function E9({children:t,className:e}){return I.jsx("div",{"data-auth-page":!0,className:Rt("flex min-h-dvh w-full flex-col items-center justify-center overflow-y-auto bg-surface-sunken px-4 py-8 text-fg",e),style:{backgroundImage:"radial-gradient(at 20% 0%, color-mix(in oklch, var(--accent) 8%, transparent) 0px, transparent 50%), radial-gradient(at 80% 100%, color-mix(in oklch, var(--accent) 8%, transparent) 0px, transparent 50%)"},children:I.jsx("div",{className:"w-full max-w-[26rem]",children:t})})}const wee="Secure sign-in powered by AWS Cognito";function C9(t){const e=t?.note??"Secure sign-in";return I.jsx("div",{className:"text-center pt-5",children:I.jsx("p",{className:"text-xs text-fg-muted",children:e})})}const xee=()=>I.jsxs("svg",{width:"36",height:"36",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",className:"text-accent",children:[I.jsx("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),I.jsx("path",{d:"M3 7l9 6 9-6"})]});function w9({wordmark:t="remit,",tagline:e="your email client in the cloud.",mark:n=I.jsx(xee,{})}){return I.jsxs("div",{className:"text-center pb-6",children:[I.jsx("div",{className:"flex items-center justify-center pb-3",children:n}),I.jsx("h1",{className:"text-[1.75rem] font-semibold tracking-[-0.01em] text-fg",children:t}),I.jsx("p",{className:"mt-1 text-sm text-fg-muted",children:e})]})}const _ee={From:"From",Subject:"Subject",HasWords:"Has the words",ListId:"List",FromDomain:"Domain"};function ev(t){return _ee[t]}const Aee={ListId:"The mailing list's List-Id header, matched exactly. New mail is matched as it arrives — mail delivered before this was set up may not carry it yet.",FromDomain:"The sender's registrable domain — matches anyone at it, subdomains included (a look-alike like example.com.evil.test never matches)."};function Tee(t){return Aee[t]}const Ree=["From","Subject","HasWords","ListId","FromDomain"];function VP(t){return`Similar to these ${t.anchorCount}`}const Iee={all:"Match all",any:"Match any"};function GP(t){return Iee[t]}function Oee(t){return t==="all"?"and":"or"}function Nee(t){if(t.status==="loading")return"Counting matches…";if(t.status==="error")return t.reason;if(t.count===0)return"No mail matches yet";const e=t.count===1?"message":"messages",n=`${t.count} ${e} match`;return t.stale?`${n} — recounting`:n}function Mee(t){return t==="once"?"Apply now":t==="standing"?"Save rule":"Save until then"}function Pee(t,e){if(!(t.clauses.length>0||t.widen!==void 0&&!t.widen.inactive))return"Add a clause so the rule has something to match.";if(!t.moveMailboxId)return"Pick a folder to move matches into — labeling isn't available yet.";if((t.scope==="standing"||t.scope==="until")&&(t.name??"").trim()==="")return"Name this rule so you can find it later.";if(t.scope==="until"&&!t.until)return"Pick the date this rule should stop on.";if(e.status==="loading")return"Counting matches — save once the count settles.";if(e.status==="ready"&&e.stale)return"Recounting matches — save once the count settles."}const kee={default:Rt("flex h-9 items-center gap-2 rounded-md border border-line bg-surface-sunken px-3 text-sm","focus-within:border-line-strong focus-within:ring-2 focus-within:ring-ring/30 transition-colors"),inline:"flex items-center gap-2 bg-transparent text-sm"};function Pl({icon:t,className:e,variant:n="default",ref:r,...s}){return I.jsxs("div",{className:Rt(kee[n],e),children:[t&&I.jsx("span",{className:"text-fg-subtle shrink-0",children:t}),I.jsx("input",{ref:r,className:"min-w-0 flex-1 bg-transparent text-fg placeholder:text-fg-subtle outline-none",...s})]})}function x9({icon:t,className:e,children:n,...r}){return I.jsxs("div",{className:Rt("relative flex h-9 items-center gap-2 rounded-md border border-line bg-surface-sunken pl-3 text-sm","focus-within:border-line-strong focus-within:ring-2 focus-within:ring-ring/30 transition-colors",e),children:[t&&I.jsx("span",{className:"shrink-0 text-fg-subtle",children:t}),I.jsx("select",{className:"min-w-0 flex-1 appearance-none bg-transparent py-0 pr-8 text-fg outline-none",...r,children:n}),I.jsx(Qx,{className:"pointer-events-none absolute right-2.5 size-4 text-fg-subtle"})]})}const Rv="inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-xs";function Dee({clause:t,onEdit:e,onRemove:n}){return I.jsxs("span",{className:Rt(Rv,t.derived?"border-dashed border-line-strong bg-surface-sunken":"border-line bg-surface"),children:[I.jsxs("button",{type:"button",onClick:e,"aria-label":`Edit ${ev(t.field)} clause`,className:"flex items-center gap-1 text-left",children:[I.jsx("span",{className:"font-medium text-fg-muted",children:ev(t.field)}),I.jsx("span",{className:"text-fg",children:t.value})]}),t.derived&&I.jsx("span",{className:"text-2xs text-fg-subtle",children:"from sender"}),n&&I.jsx("button",{type:"button",onClick:n,"aria-label":`Remove ${ev(t.field)} clause`,className:"flex size-4 items-center justify-center rounded-full text-fg-subtle hover:bg-surface-sunken hover:text-fg-muted",children:I.jsx(La,{className:"size-3"})})]})}function KP({onRemove:t}){return I.jsx("button",{type:"button",onClick:t,"aria-label":"Remove the similar-mail widen",className:"flex size-4 items-center justify-center rounded-full hover:bg-fg-subtle/20",children:I.jsx(La,{className:"size-3"})})}function Lee({widen:t,onRemove:e}){return t.inactive?I.jsxs("span",{className:Rt(Rv,"border-dashed border-line-strong bg-surface-sunken text-fg-subtle"),children:[I.jsx(gP,{className:"size-3 shrink-0","aria-hidden":"true"}),I.jsx("span",{className:"line-through",children:VP(t)}),I.jsx("span",{className:"text-2xs",children:"not available here"}),e&&I.jsx(KP,{onRemove:e})]}):I.jsxs("span",{className:Rt(Rv,"border-accent-2 bg-accent-2-soft text-accent-2"),children:[I.jsx(gP,{className:"size-3 shrink-0","aria-hidden":"true"}),I.jsx("span",{className:"font-medium",children:"…and anything similar"}),I.jsx("span",{className:"text-2xs opacity-80",children:VP(t)}),e&&I.jsx(KP,{onRemove:e})]})}function YP({label:t,onClick:e}){return I.jsxs("button",{type:"button",onClick:e,className:Rt(Rv,"border-dashed border-line-strong text-fg-muted hover:border-accent-2 hover:text-accent-2"),children:[I.jsx(pQ,{className:"size-3","aria-hidden":"true"}),t]})}function Uee({draft:t,mode:e,fields:n=Ree,onChangeField:r,onChangeValue:s,onSubmit:o,onCancel:a}){const u=Tee(t.field);return I.jsxs("div",{className:"space-y-1.5 rounded-lg border border-accent-2 bg-surface p-2",children:[I.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[I.jsx(x9,{"aria-label":"Clause field",value:t.field,onChange:c=>r?.(c.target.value),className:"h-8 w-32 shrink-0",children:n.map(c=>I.jsx("option",{value:c,children:ev(c)},c))}),I.jsx(Pl,{"aria-label":"Clause value",value:t.value,placeholder:"value…",onChange:c=>s?.(c.target.value),onKeyDown:c=>{c.key==="Enter"&&o?.()},className:"h-8 min-w-40 flex-1"}),I.jsx(Zs,{variant:"primary",size:"sm",onClick:o,disabled:t.value.trim()==="",className:"shrink-0",children:e==="add"?"Add":"Save"}),I.jsx(Zs,{variant:"ghost",size:"sm",onClick:a,"aria-label":"Cancel clause edit",icon:I.jsx(La,{className:"size-4"}),className:"shrink-0 px-2"})]}),u&&I.jsx("p",{className:"px-0.5 text-2xs text-fg-subtle",children:u})]})}function Fee({preview:t}){const e=Nee(t);if(t.status==="loading")return I.jsxs("p",{className:"flex items-center gap-2 text-xs text-fg-muted","aria-live":"polite",children:[I.jsx(Jx,{className:"size-3.5 animate-spin","aria-hidden":"true"}),e]});if(t.status==="error")return I.jsxs("p",{className:"flex items-center gap-2 text-xs text-danger",role:"alert",children:[I.jsx(z8,{className:"size-3.5 shrink-0","aria-hidden":"true"}),e]});const n=t.count===0;return I.jsxs("p",{className:Rt("flex items-center gap-2 text-xs",t.stale?"text-fg-subtle":n?"text-fg-muted":"font-medium text-fg"),"aria-live":"polite",children:[t.stale&&I.jsx(Jx,{className:"size-3.5 animate-spin","aria-hidden":"true"}),e]})}const zee={sm:"min-h-9 px-3 text-xs",md:"min-h-11 px-4 text-sm"};function ZP({name:t,options:e,value:n,onChange:r,size:s="md","aria-label":o}){const a=e.findIndex(u=>u.value===n);return I.jsx("div",{role:"radiogroup","aria-label":o,className:"inline-flex rounded-md border border-line bg-surface-sunken p-0.5",children:e.map((u,c)=>{const f=u.value===n,h=!f&&c<e.length-1&&a!==c+1;return I.jsxs("label",{className:Rt("relative flex cursor-pointer items-center justify-center rounded-[5px] font-medium transition-colors",zee[s],f?"bg-surface text-fg shadow":"text-fg-muted hover:text-fg",h&&"after:pointer-events-none after:absolute after:right-0 after:top-1/4 after:h-1/2 after:w-px after:bg-line"),children:[I.jsx("input",{type:"radio",name:t,value:u.value,checked:f,onChange:()=>r(u.value),className:"sr-only"}),u.label]},u.value)})})}const jee=[{value:"all",label:GP("all")},{value:"any",label:GP("any")}],Bee=[{value:"once",label:"Just once"},{value:"standing",label:"Keep doing this"},{value:"until",label:"Until a date"}],XP="__filter_create_folder__";function Hee({folders:t,value:e,onChangeMove:n,onCreateFolder:r}){const[s,o]=A.useState(!1),[a,u]=A.useState(""),[c,f]=A.useState(!1),[h,g]=A.useState(),[m,y]=A.useState([]),S=A.useMemo(()=>{const x=new Set(t.map(T=>T.id));return[...t,...m.filter(T=>!x.has(T.id))]},[t,m]),E=x=>{if(x===XP){g(void 0),o(!0);return}n?.(x)},C=()=>{if(!r)return;const x=a.trim();x!==""&&(f(!0),g(void 0),r(x).then(T=>{y(R=>R.some(M=>M.id===T.id)?R:[...R,T]),n?.(T.id),o(!1),u(""),f(!1)}).catch(T=>{g(T instanceof Error?T.message:"Couldn't create that folder. Please try again."),f(!1)}))},w=()=>{o(!1),u(""),g(void 0)};return I.jsxs("div",{className:"space-y-2",children:[I.jsxs(x9,{"aria-label":"Destination folder",value:e,onChange:x=>E(x.target.value),children:[I.jsx("option",{value:"",children:"Choose a folder…"}),S.map(x=>I.jsx("option",{value:x.id,children:x.label},x.id)),r&&I.jsx("option",{value:XP,children:"+ New folder…"})]}),s&&I.jsxs("div",{className:"space-y-2 rounded-md border border-line bg-surface-sunken p-2",children:[I.jsx(Pl,{value:a,onChange:x=>u(x.target.value),placeholder:"Folder name","aria-label":"New folder name",disabled:c,autoFocus:!0,onKeyDown:x=>{x.key==="Enter"&&(x.preventDefault(),C()),x.key==="Escape"&&(x.preventDefault(),w())}}),h&&I.jsx("p",{className:"text-2xs text-danger",role:"alert",children:h}),I.jsxs("div",{className:"flex gap-2",children:[I.jsx(Zs,{variant:"primary",size:"sm",onClick:C,disabled:c||a.trim()==="",children:c?"Creating…":"Create folder"}),I.jsx(Zs,{variant:"ghost",size:"sm",onClick:w,disabled:c,children:"Cancel"})]})]})]})}function fRe({rule:t,folders:e,preview:n,notice:r,semanticAvailable:s=!1,clauseFields:o,lifecycleLocked:a=!1,clauseEdit:u,onStartAddClause:c,onStartEditClause:f,onRemoveClause:h,onChangeDraftField:g,onChangeDraftValue:m,onSubmitClause:y,onCancelClause:S,onAddWiden:E,onRemoveWiden:C,onChangeMatchOperator:w,onChangeMove:x,onCreateFolder:T,onChangeScope:R,onChangeName:M,onChangeUntil:N,onCommit:O,onCancel:k}){const F=t.widen&&!t.widen.inactive?1:0,D=t.clauses.length+F>=2,z=Oee(t.matchOperator),q=Pee(t,n),K=t.scope==="standing"||t.scope==="until";return I.jsxs("div",{className:"flex min-h-0 flex-col",children:[I.jsxs("div",{className:"border-b border-line px-5 py-3",children:[I.jsx("h2",{className:"text-sm font-semibold text-fg",children:"Filter rule"}),I.jsx("p",{className:"mt-0.5 text-xs text-fg-muted",children:"These chips are the whole rule — what you see is what applies."})]}),I.jsxs("div",{className:"min-h-0 flex-1 space-y-5 overflow-y-auto px-5 py-4",children:[r,I.jsxs("section",{className:"space-y-3",children:[I.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[t.clauses.map((Y,H)=>I.jsxs(A.Fragment,{children:[H>0&&I.jsx("span",{className:"text-2xs font-medium uppercase text-fg-subtle",children:z}),I.jsx(Dee,{clause:Y,onEdit:()=>f?.(Y.id),onRemove:()=>h?.(Y.id)})]},Y.id)),t.widen&&I.jsxs(I.Fragment,{children:[t.clauses.length>0&&!t.widen.inactive&&I.jsx("span",{className:"text-2xs font-medium uppercase text-fg-subtle",children:z}),I.jsx(Lee,{widen:t.widen,onRemove:C})]}),!u&&I.jsx(YP,{label:"Add clause",onClick:c}),!t.widen&&s&&!u&&I.jsx(YP,{label:"…and similar",onClick:E})]}),u&&I.jsx(Uee,{draft:u.draft,mode:u.mode,fields:o,onChangeField:g,onChangeValue:m,onSubmit:y,onCancel:S}),D&&I.jsxs("div",{className:"flex items-center gap-2",children:[I.jsx("span",{className:"text-xs text-fg-muted",children:"Match"}),I.jsx(ZP,{name:"match-operator",size:"sm","aria-label":"Match operator",options:jee,value:t.matchOperator,onChange:Y=>w?.(Y)})]})]}),I.jsxs("section",{className:"space-y-2",children:[I.jsx("p",{className:"text-xs font-medium text-fg-muted",children:"Move matches to"}),I.jsx(Hee,{folders:e,value:t.moveMailboxId??"",onChangeMove:x,onCreateFolder:T}),I.jsxs("div",{className:"flex items-center gap-2 pt-0.5",children:[I.jsx("span",{className:"inline-flex items-center gap-1.5 rounded-full bg-surface-sunken px-2 py-0.5 text-2xs font-medium text-fg-muted",children:"label them…"}),I.jsx("span",{className:"text-2xs text-fg-subtle",children:"Labeling isn't available yet — arrives with mail-labeling (RFC 031)."})]})]}),I.jsxs("section",{className:"space-y-2",children:[I.jsx("p",{className:"text-xs font-medium text-fg-muted",children:"How long"}),a?I.jsx("p",{className:"text-xs text-fg",children:t.scope==="until"?`Until ${t.until??""}`:"Always — runs on matching mail"}):I.jsx(ZP,{name:"rule-scope",size:"sm","aria-label":"Rule scope",options:Bee,value:t.scope,onChange:Y=>R?.(Y)}),K&&I.jsx(Pl,{value:t.name??"",onChange:Y=>M?.(Y.target.value),placeholder:"Name this rule (e.g. Receipts)","aria-label":"Rule name",className:"w-full"}),!a&&t.scope==="until"&&I.jsxs("div",{className:"flex items-center gap-2 text-xs text-fg-muted",children:[I.jsx("span",{children:"Until"}),I.jsx(Pl,{type:"date",value:t.until??"",onChange:Y=>N?.(Y.target.value),"aria-label":"Expiry date",className:"flex-1"})]}),a&&I.jsx("p",{className:"text-2xs text-fg-subtle",children:t.widen?"The scope, expiry, and similar-mail match are set when a filter is created.":"The scope and expiry are set when a filter is created."})]}),I.jsx("div",{className:"border-t border-line pt-3",children:I.jsx(Fee,{preview:n})})]}),I.jsxs("div",{className:"space-y-2 border-t border-line px-5 py-3",children:[q&&I.jsx("p",{className:"text-xs text-fg-subtle",role:"status",children:q}),I.jsx(Zs,{variant:"primary",onClick:O,disabled:q!==void 0,className:"w-full",children:Mee(t.scope)}),I.jsx(Zs,{variant:"ghost",onClick:k,className:"w-full",children:"Not now"})]})]})}const $ee={inbox:"Inbox",drafts:"Drafts",sent:"Sent",archive:"Archive",junk:"Spam",trash:"Trash",flagged:"Starred",all:"All Mail"};function qee(t){return $ee[t]}function Wee(t){const e=t.split("/");return e[e.length-1]||t}const Vee=new Set(["all","flagged"]);function Gee(t){return Vee.has(t)}const Kee=new Set(["[Gmail]","[Google Mail]"]);function Yee(t){if(t.role)return Gee(t.role)?void 0:qee(t.role);if(t.providerPath&&!Kee.has(t.providerPath.split("/")[0]))return Wee(t.providerPath)}function hRe(t){return t==="inbox"?I.jsx(F8,{className:"size-4"}):t==="drafts"?I.jsx(lQ,{className:"size-4"}):t==="sent"?I.jsx(gQ,{className:"size-4"}):t==="archive"?I.jsx(oQ,{className:"size-4"}):t==="junk"?I.jsx(oT,{className:"size-4"}):t==="trash"?I.jsx(vQ,{className:"size-4"}):t==="flagged"?I.jsx(mQ,{className:"size-4"}):I.jsx(fQ,{className:"size-4"})}const _9={filter:"border-line bg-surface-sunken text-fg-muted",scope:"border-accent-2/40 bg-accent-2-soft text-accent-2"},Zee=({label:t,onRemove:e,tone:n="filter",className:r})=>I.jsxs("span",{className:Rt("inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-2xs",_9[n],r),children:[I.jsx("span",{children:t}),I.jsx("button",{type:"button",onClick:e,className:"shrink-0 rounded-full p-0.5 hover:bg-fg-muted/20 transition-colors","aria-label":`Remove filter: ${t}`,children:I.jsx(La,{className:"size-3"})})]}),Xee=A.forwardRef(({label:t,onRemove:e,onActivate:n,tone:r="filter",focused:s=!1,onKeyDown:o,onFocusLabel:a,className:u},c)=>I.jsxs("span",{role:"row",tabIndex:-1,className:Rt("inline-flex max-w-48 items-center gap-1 rounded-full border px-2 py-0.5 text-2xs transition-colors",_9[r],s&&"ring-2 ring-ring",u),children:[I.jsx("button",{ref:c,type:"button",role:"gridcell",tabIndex:s?0:-1,onClick:n,onFocus:a,onKeyDown:o,className:Rt("block min-w-0 max-w-full truncate rounded-full outline-none",n?"cursor-pointer":"cursor-default"),children:t}),I.jsx("button",{type:"button",role:"gridcell",tabIndex:-1,onClick:e,className:"block shrink-0 rounded-full p-0.5 transition-colors hover:bg-fg-muted/20","aria-label":`Remove filter: ${t}`,children:I.jsx(La,{className:"size-3"})})]}));Xee.displayName="SearchChipRow";const pRe=({tokens:t,className:e})=>t.length===0?null:I.jsx("div",{className:Rt("flex flex-wrap items-center gap-1.5 border-b border-line bg-surface px-row-inset py-1.5",e),children:t.map(n=>I.jsx(Zee,{label:n.label,onRemove:n.onRemove},n.label))});var Th;(function(t){t[t.UP=-1]="UP",t[t.DOWN=1]="DOWN"})(Th||(Th={}));function Qee(t){var e=getComputedStyle(t).overflowY;return t===document.scrollingElement&&e==="visible"?!0:!(e!=="scroll"&&e!=="auto")}function Jee(t,e){if(!Qee(t))return!1;if(e===Th.DOWN){var n=t.scrollTop+t.clientHeight;return n<t.scrollHeight}if(e===Th.UP)return t.scrollTop>0;throw new Error("unsupported direction")}function A9(t,e){return Jee(t,e)?!0:t.parentElement==null?!1:A9(t.parentElement,e)}function T9(t,e){e===void 0&&(e={});var n=e.insertAt;if(!(!t||typeof document>"u")){var r=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css",n==="top"&&r.firstChild?r.insertBefore(s,r.firstChild):r.appendChild(s),s.styleSheet?s.styleSheet.cssText=t:s.appendChild(document.createTextNode(t))}}var ete=`.lds-ellipsis {
15
+ display: inline-block;
16
+ position: relative;
17
+ width: 64px;
18
+ height: 64px;
19
+ }
20
+
21
+ .lds-ellipsis div {
22
+ position: absolute;
23
+ top: 27px;
24
+ width: 11px;
25
+ height: 11px;
26
+ border-radius: 50%;
27
+ background: rgb(54, 54, 54);
28
+ animation-timing-function: cubic-bezier(0, 1, 1, 0);
29
+ }
30
+
31
+ .lds-ellipsis div:nth-child(1) {
32
+ left: 6px;
33
+ animation: lds-ellipsis1 0.6s infinite;
34
+ }
35
+
36
+ .lds-ellipsis div:nth-child(2) {
37
+ left: 6px;
38
+ animation: lds-ellipsis2 0.6s infinite;
39
+ }
40
+
41
+ .lds-ellipsis div:nth-child(3) {
42
+ left: 26px;
43
+ animation: lds-ellipsis2 0.6s infinite;
44
+ }
45
+
46
+ .lds-ellipsis div:nth-child(4) {
47
+ left: 45px;
48
+ animation: lds-ellipsis3 0.6s infinite;
49
+ }
50
+
51
+ @keyframes lds-ellipsis1 {
52
+ 0% {
53
+ transform: scale(0);
54
+ }
55
+ 100% {
56
+ transform: scale(1);
57
+ }
58
+ }
59
+ @keyframes lds-ellipsis3 {
60
+ 0% {
61
+ transform: scale(1);
62
+ }
63
+ 100% {
64
+ transform: scale(0);
65
+ }
66
+ }
67
+ @keyframes lds-ellipsis2 {
68
+ 0% {
69
+ transform: translate(0, 0);
70
+ }
71
+ 100% {
72
+ transform: translate(19px, 0);
73
+ }
74
+ }`;T9(ete);var tte=function(){return j.createElement("div",{className:"lds-ellipsis"},j.createElement("div",null),j.createElement("div",null),j.createElement("div",null),j.createElement("div",null))},nte=function(){return j.createElement("div",null,j.createElement("p",null,"↧  pull to refresh  ↧"))},rte=`.ptr,
75
+ .ptr__children {
76
+ height: 100%;
77
+ width: 100%;
78
+ overflow: hidden;
79
+ -webkit-overflow-scrolling: touch;
80
+ position: relative;
81
+ }
82
+
83
+ .ptr.ptr--fetch-more-treshold-breached .ptr__fetch-more {
84
+ display: block;
85
+ }
86
+
87
+ .ptr__fetch-more {
88
+ display: none;
89
+ }
90
+
91
+ /**
92
+ * Pull down transition
93
+ */
94
+ .ptr__children,
95
+ .ptr__pull-down {
96
+ transition: transform 0.2s cubic-bezier(0, 0, 0.31, 1);
97
+ }
98
+
99
+ .ptr__pull-down {
100
+ position: absolute;
101
+ overflow: hidden;
102
+ left: 0;
103
+ right: 0;
104
+ top: 0;
105
+ visibility: hidden;
106
+ }
107
+ .ptr__pull-down > div {
108
+ display: none;
109
+ }
110
+
111
+ .ptr--dragging {
112
+ /**
113
+ * Hide PullMore content is treshold breached
114
+ */
115
+ }
116
+ .ptr--dragging.ptr--pull-down-treshold-breached .ptr__pull-down--pull-more {
117
+ display: none;
118
+ }
119
+ .ptr--dragging {
120
+ /**
121
+ * Otherwize, display content
122
+ */
123
+ }
124
+ .ptr--dragging .ptr__pull-down--pull-more {
125
+ display: block;
126
+ }
127
+
128
+ .ptr--pull-down-treshold-breached {
129
+ /**
130
+ * Force opacity to 1 is pull down trashold breached
131
+ */
132
+ }
133
+ .ptr--pull-down-treshold-breached .ptr__pull-down {
134
+ opacity: 1 !important;
135
+ }
136
+ .ptr--pull-down-treshold-breached {
137
+ /**
138
+ * And display loader
139
+ */
140
+ }
141
+ .ptr--pull-down-treshold-breached .ptr__pull-down--loading {
142
+ display: block;
143
+ }
144
+
145
+ .ptr__loader {
146
+ margin: 0 auto;
147
+ text-align: center;
148
+ }`;T9(rte);var gRe=function(t){var e=t.isPullable,n=e===void 0?!0:e,r=t.canFetchMore,s=r===void 0?!1:r,o=t.onRefresh,a=t.onFetchMore,u=t.refreshingContent,c=u===void 0?j.createElement(tte,null):u,f=t.pullingContent,h=f===void 0?j.createElement(nte,null):f,g=t.children,m=t.pullDownThreshold,y=m===void 0?67:m,S=t.fetchMoreThreshold,E=S===void 0?100:S,C=t.maxPullDownDistance,w=C===void 0?95:C,x=t.resistance,T=x===void 0?1:x,R=t.backgroundColor,M=t.className,N=M===void 0?"":M,O=A.useRef(null),k=A.useRef(null),F=A.useRef(null),$=A.useRef(null),D=!1,z=!1,q=!1,K=0,Y=0;A.useEffect(function(){if(!(!n||!k||!k.current)){var G=k.current;return G.addEventListener("touchstart",fe,{passive:!0}),G.addEventListener("mousedown",fe),G.addEventListener("touchmove",de,{passive:!1}),G.addEventListener("mousemove",de),window.addEventListener("scroll",Ae),G.addEventListener("touchend",L),G.addEventListener("mouseup",L),document.body.addEventListener("mouseleave",L),function(){G.removeEventListener("touchstart",fe),G.removeEventListener("mousedown",fe),G.removeEventListener("touchmove",de),G.removeEventListener("mousemove",de),window.removeEventListener("scroll",Ae),G.removeEventListener("touchend",L),G.removeEventListener("mouseup",L),document.body.removeEventListener("mouseleave",L)}}},[g,n,o,y,w,s,E]),A.useEffect(function(){var G;if(!((G=O)===null||G===void 0)&&G.current){var Z=O.current.classList.contains("ptr--fetch-more-treshold-breached");Z||s&&H()<E&&a&&(O.current.classList.add("ptr--fetch-more-treshold-breached"),z=!0,a().then(te).catch(te))}},[s,g]);var H=function(){if(!k||!k.current)return-1;var G=window.scrollY,Z=k.current.scrollHeight;return Z-G-window.innerHeight},te=function(){requestAnimationFrame(function(){k.current&&(k.current.style.overflowX="hidden",k.current.style.overflowY="auto",k.current.style.transform="unset"),F.current&&(F.current.style.opacity="0"),O.current&&(O.current.classList.remove("ptr--pull-down-treshold-breached"),O.current.classList.remove("ptr--dragging"),O.current.classList.remove("ptr--fetch-more-treshold-breached")),D&&(D=!1),z&&(z=!1)})},fe=function(G){q=!1,G instanceof MouseEvent&&(K=G.pageY),window.TouchEvent&&G instanceof TouchEvent&&(K=G.touches[0].pageY),Y=K,!(G.type==="touchstart"&&A9(G.target,Th.UP))&&(k.current.getBoundingClientRect().top<0||(q=!0))},de=function(G){if(q){if(window.TouchEvent&&G instanceof TouchEvent?Y=G.touches[0].pageY:Y=G.pageY,O.current.classList.add("ptr--dragging"),Y<K){q=!1;return}G.cancelable&&G.preventDefault();var Z=Math.min((Y-K)/T,w);Z>=y&&(q=!0,D=!0,O.current.classList.remove("ptr--dragging"),O.current.classList.add("ptr--pull-down-treshold-breached")),!(Z>=w)&&(F.current.style.opacity=(Z/65).toString(),k.current.style.overflow="visible",k.current.style.transform="translate(0px, "+Z+"px)",F.current.style.visibility="visible")}},Ae=function(G){z||s&&H()<E&&a&&(z=!0,O.current.classList.add("ptr--fetch-more-treshold-breached"),a().then(te).catch(te))},L=function(){if(q=!1,K=0,Y=0,!D){F.current&&(F.current.style.visibility="hidden"),te();return}k.current&&(k.current.style.overflow="visible",k.current.style.transform="translate(0px, "+y+"px)"),o().then(te).catch(te)};return j.createElement("div",{className:"ptr "+N,style:{backgroundColor:R},ref:O},j.createElement("div",{className:"ptr__pull-down",ref:F},j.createElement("div",{className:"ptr__loader ptr__pull-down--loading"},c),j.createElement("div",{className:"ptr__pull-down--pull-more"},h)),j.createElement("div",{className:"ptr__children",ref:k},g,j.createElement("div",{className:"ptr__fetch-more",ref:$},j.createElement("div",{className:"ptr__loader ptr__fetch-more--loading"},c))))};const ste={preparing:"Getting the new version ready",restarting:"Restarting Remit",reconnecting:"Waiting for Remit to answer again"};function QP(t){return ste[t]}function ote(t){return t<90?"This usually takes about a minute.":t<240?"Longer than usual. Remit is still trying to reach the server.":"Still no answer. Remit keeps trying."}function mRe(t,e=Date.now()){const n=Math.floor((e-t)/6e4);if(n<1)return"just now";if(n<60)return`${n}m ago`;const r=Math.floor(n/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}function vRe(t){return new Date(t).toLocaleDateString(void 0,{dateStyle:"medium"})}function ite({children:t,show:e,label:n="Update available"}){return I.jsxs("span",{className:"relative inline-flex",children:[t,e&&I.jsxs(I.Fragment,{children:[I.jsx("span",{className:"absolute -right-1 -top-1 size-2 rounded-full bg-accent-2"}),I.jsx("span",{className:"sr-only",children:n})]})]})}const JP=["preparing","restarting","reconnecting"],ate='button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])';function R9(t){A.useEffect(()=>{const e=t.current;if(!e)return;const n=()=>Array.from(e.querySelectorAll(ate));(n()[0]??e).focus();const r=s=>{if(s.key!=="Tab")return;const o=n();if(o.length===0){s.preventDefault(),e.focus();return}const a=o[0],u=o[o.length-1],c=document.activeElement;if(s.shiftKey&&(c===a||!e.contains(c))){s.preventDefault(),u.focus();return}!s.shiftKey&&(c===u||!e.contains(c))&&(s.preventDefault(),a.focus())};return window.addEventListener("keydown",r,!0),()=>window.removeEventListener("keydown",r,!0)},[t])}const I9="fixed inset-0 z-50 flex flex-col items-center justify-center gap-6 bg-canvas p-6 text-center outline-none";function lte({target:t,phase:e,elapsedSeconds:n}){const r=A.useRef(null);R9(r);const s=JP.indexOf(e);return I.jsxs("div",{ref:r,role:"dialog","aria-modal":"true","aria-labelledby":"self-update-progress-title",tabIndex:-1,className:I9,children:[I.jsxs("div",{className:"max-w-md space-y-2",children:[I.jsxs("h1",{id:"self-update-progress-title",className:"text-lg font-semibold text-fg",children:["Installing Remit ",t]}),I.jsx("p",{className:"text-sm text-fg-muted",children:"Remit is restarting, so this page has no server to talk to for a moment. Leave this open — it reconnects on its own."})]}),I.jsx("ol",{className:"w-full max-w-sm space-y-2 text-left",children:JP.map((o,a)=>{const u=a<s,c=a===s;return I.jsxs("li",{className:Rt("flex items-center gap-3 rounded-sm border px-row-inset py-2 text-sm",c?"border-line-strong bg-surface text-fg":"border-line bg-surface-sunken text-fg-subtle"),children:[u?I.jsx(iQ,{className:"size-4 shrink-0 text-positive","aria-hidden":!0}):c?I.jsx(Jx,{className:"size-4 shrink-0 animate-spin text-accent-2","aria-hidden":!0}):I.jsx("span",{className:"size-4 shrink-0 rounded-full border border-line-strong"}),QP(o)]},o)})}),I.jsxs("p",{"aria-live":"polite",className:"max-w-md text-xs text-fg-subtle",children:[I.jsx("span",{className:"sr-only",children:`${QP(e)}. `}),ote(n)]})]})}function ute({attemptedVersion:t,previousVersion:e,elapsedSeconds:n,logsCommand:r,onRetryConnection:s}){const o=A.useRef(null);R9(o);const a=Math.max(1,Math.round(n/60));return I.jsxs("div",{ref:o,role:"alertdialog","aria-modal":"true","aria-labelledby":"self-update-unreachable-title",tabIndex:-1,className:I9,children:[I.jsx(oT,{className:"size-12 shrink-0 text-danger","aria-hidden":!0}),I.jsxs("div",{className:"max-w-lg space-y-3",children:[I.jsx("h1",{id:"self-update-unreachable-title",className:"text-lg font-semibold text-fg",children:"Remit has not answered since the restart"}),I.jsxs("p",{className:"text-sm text-fg-muted",children:["Installing ",t," started ",a," minute",a===1?"":"s"," ago and the server has been silent since. Your mail is safe at your provider — it was never part of the update."]}),I.jsxs("p",{className:"text-sm text-fg-muted",children:["Remit rolls back to ",e," on its own when the new version fails to start, but this page cannot confirm that from here. Check the server directly:"]}),I.jsx("code",{className:"block rounded-xs bg-surface-sunken px-3 py-2 text-left text-xs text-fg-muted",children:r})]}),I.jsx("div",{className:"flex flex-wrap items-center justify-center gap-2",children:I.jsx(Zs,{size:"sm",onClick:s,children:"Try connecting again"})})]})}const cte=()=>I.jsxs("div",{className:"hidden h-full w-[17%] min-w-40 max-w-64 shrink-0 flex-col gap-1 border-r border-line p-3 md:flex",children:[I.jsx("div",{className:"mb-3 h-6 w-24 rounded bg-surface-sunken"}),Array.from({length:6}).map((t,e)=>I.jsxs("div",{className:"flex items-center gap-2 py-1.5",children:[I.jsx("div",{className:"size-5 shrink-0 rounded bg-surface-sunken"}),I.jsx("div",{className:"h-3.5 flex-1 rounded bg-surface-sunken"})]},e))]}),dte=()=>I.jsx("div",{className:"min-w-0 flex-1",children:Array.from({length:8}).map((t,e)=>I.jsxs("div",{className:"flex items-start gap-3 border-b border-line py-2 pl-5 pr-4",children:[I.jsx("div",{className:"mt-0.5 size-7 shrink-0 rounded-full bg-surface-sunken"}),I.jsxs("div",{className:"flex-1 space-y-1.5",children:[I.jsxs("div",{className:"flex justify-between gap-2",children:[I.jsx("div",{className:"h-3.5 w-28 rounded bg-surface-sunken"}),I.jsx("div",{className:"h-3 w-12 rounded bg-surface-sunken"})]}),I.jsx("div",{className:"h-3.5 w-48 rounded bg-surface-sunken"}),I.jsx("div",{className:"h-3 w-full rounded bg-surface-sunken"})]})]},e))}),dT=()=>I.jsxs("div",{className:"flex h-dvh animate-pulse bg-canvas","aria-hidden":"true",children:[I.jsx(cte,{}),I.jsx(dte,{})]}),fT="3bb47fb4f44abdb1a17b6a0195c1447d9325d6e9",fte="2026-07-25T13:35:03.423Z",hte=fT.slice(0,7),pte=/^[0-9a-f]{40}$/.test(fT),gte=pte?`https://github.com/remit-mail/reader/commit/${fT}`:void 0,mte="https://github.com/remit-mail/reader/issues/new";class o_ extends Error{constructor(e,n,r){super(e),this.status=n,this.body=r,this.name="ApiError"}status;body}const au=t=>{if(t instanceof o_)return t.status;if(t&&typeof t=="object"){const e=t;if(typeof e.status=="number")return e.status;if(typeof e.statusCode=="number")return e.statusCode}},O9=t=>au(t)!==void 0,Hy=t=>{const e=au(t);return e!==void 0&&e>=500&&e<=599},$y=t=>!!(typeof DOMException<"u"&&t instanceof DOMException&&t.name==="AbortError"||t&&typeof t=="object"&&"name"in t&&t.name==="AbortError"),vte=()=>typeof navigator<"u"&&navigator.onLine===!1,N9=t=>$y(t)||O9(t)?!1:t instanceof rT?!0:vte(),yte=t=>!O9(t)&&!$y(t)&&!N9(t),M9=t=>Hy(t)||yte(t),bte=t=>t?.softError===!0,P9=(t,e)=>Hy(t)?!0:$y(t)||N9(t)?!1:M9(t)?!0:!bte(e),Ste=t=>Hy(t),i_=new Set;let k9=null,D9=null;const Ete=t=>{D9=t},Cte=t=>t instanceof Error?t:new Error(L9(t)),L9=t=>t instanceof Error?t.message||t.name:typeof t=="string"?t:t&&typeof t=="object"&&"message"in t&&typeof t.message=="string"?t.message:"An unexpected server error occurred.",wte=()=>typeof globalThis.crypto<"u"&&typeof globalThis.crypto.randomUUID=="function"?globalThis.crypto.randomUUID():`fatal-${Date.now()}-${Math.random().toString(36).slice(2,10)}`,ql=(t,e)=>{const n={error:t,message:L9(t),correlationId:wte(),at:Date.now(),recoverable:e?.recoverable??Ste(t),stack:t instanceof Error?t.stack:void 0,componentStack:e?.componentStack};k9=n,Ite(`Fatal: ${n.message} [${n.correlationId}]`),D9?.recordError(Cte(t),{fatal:"true",correlationId:n.correlationId});for(const r of i_)r(n);return n},xte=t=>(i_.add(t),()=>{i_.delete(t)}),_te=()=>k9,Ate=20,tv=[],Tte=new Set(["ResizeObserver loop limit exceeded","ResizeObserver loop completed with undelivered notifications"]);function Rte(t){return typeof t!="string"?!1:Tte.has(t.replace(/\.\s*$/,""))}function nv(t){tv.push(t),tv.length>Ate&&tv.shift()}function Ite(t){nv(t)}function Ote(t){return t.map(e=>{if(typeof e=="string")return e;if(e instanceof Error)return`${e.name}: ${e.message}`;try{return JSON.stringify(e)}catch{return String(e)}}).join(" ")}function Nte(){const t=console.error.bind(console);console.error=(...e)=>{nv(Ote(e)),t(...e)},window.addEventListener("error",e=>{Rte(e.message)||(nv(`Uncaught ${e.error instanceof Error?`${e.error.name}: ${e.error.message}`:String(e.message)} (${e.filename}:${e.lineno})`),ql(e.error??e.message))}),window.addEventListener("unhandledrejection",e=>{const n=e.reason,r=n instanceof Error?`${n.name}: ${n.message}`:String(n);nv(`Unhandled rejection: ${r}`),ql(n)})}function Mte(){return tv.slice()}const Pte=8,yc=[];function kte(t){const e=t.split(/[?#]/)[0],n=yc[yc.length-1];n&&n.path===e||(yc.push({path:e,timestamp:new Date().toISOString()}),yc.length>Pte&&yc.shift())}function Dte(){return yc.slice()}const vS=7500,e3=`
149
+ … (truncated — the copy action on this screen has the full report)`;function t3(t){return{appShortSha:hte,appCommitUrl:gte,appBuildTime:fte,userAgent:navigator.userAgent,viewport:`${window.innerWidth}×${window.innerHeight}`,timestamp:new Date().toISOString(),timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,href:window.location.href,recentErrors:Mte(),requests:UX(),routes:Dte(),failingRequest:FX(),errorMessage:t?.errorMessage,stack:t?.stack,componentStack:t?.componentStack,quarantine:t?.quarantine,title:t?.title}}function yS(t){return["```",t,"```"].join(`
150
+ `)}function U9(t){const e=/T(\d{2}:\d{2}:\d{2})/.exec(t);return e?e[1]:t}function Lte(t){return`- **Version**: ${t.appCommitUrl?`[\`${t.appShortSha}\`](${t.appCommitUrl})`:`\`${t.appShortSha}\``} built ${t.appBuildTime}`}function Ute(t){const e=t.status===0?"no response (transport failure)":`${t.status}`;return["## Failing request",`- **Endpoint**: \`${t.path}\``,`- **Method**: ${t.method}`,`- **Status**: ${e}`,`- **Correlation id**: ${t.correlationId??"(none)"}`,""]}function Fte(t){return t.length===0?["## Recent API requests","(none)",""]:["## Recent API requests","| Time | Method | Path | Status | Duration | Correlation |","| --- | --- | --- | --- | --- | --- |",...t.map(n=>{const r=n.status===0?"ERR":`${n.status}`;return`| ${U9(n.timestamp)} | ${n.method} | \`${n.path}\` | ${r} | ${n.durationMs}ms | ${n.correlationId??""} |`}),""]}function zte(t){return t.length===0?["## Navigation trail","(none)",""]:["## Navigation trail",...t.map(n=>`- ${U9(n.timestamp)} \`${n.path}\``),""]}function F9(t,e){const n=t.recentErrors.length>0?t.recentErrors.map(o=>` - ${o}`).join(`
151
+ `):" (none)",r=["## Environment",Lte(t),`- **Browser**: ${t.userAgent}`,`- **Viewport**: ${t.viewport}`,`- **Time**: ${t.timestamp} (${t.timezone})`,"","## URL",t.href,""];if(t.errorMessage&&r.push("## Error",t.errorMessage,""),t.failingRequest&&r.push(...Ute(t.failingRequest)),t.quarantine){const o=e?.quarantineStructure??t.quarantine.structure;r.push(t.quarantine.head,"",yS(o),"",t.quarantine.disclaimer,"")}const s=e?.stack??t.stack;return s&&r.push("## Stacktrace",yS(s),""),t.componentStack&&r.push("## Component stack",yS(t.componentStack),""),r.push(...Fte(t.requests)),r.push(...zte(t.routes)),r.push("## Recent console errors",n,"","## Steps to reproduce","1. ","","## Expected behaviour","","## Actual behaviour",""),r.join(`
152
+ `)}function jte(t){if(t.title)return t.title;if(!t.errorMessage)return"Bug: ";const e=t.errorMessage.split(`
153
+ `)[0].trim();return`Bug: ${e.length>120?`${e.slice(0,117)}…`:e}`}function Yg(t,e){const n=new URLSearchParams({title:jte(t),body:F9(t,e)});return`${mte}?${n.toString()}`}function Bte(t){return F9(t)}function Hte(t){const e=Yg(t);if(e.length<=vS)return e;const n={...t,componentStack:void 0},r=[];t.stack&&r.push(["stack",t.stack]),t.quarantine?.structure&&r.push(["quarantineStructure",t.quarantine.structure]),r.sort((o,a)=>a[1].length-o[1].length);let s={};for(const[o,a]of r){if(Yg(n,s).length<=vS)break;let u=0,c=a.length,f=0;for(;u<=c;){const h=u+c>>1;Yg(n,{...s,[o]:a.slice(0,h)+e3}).length<=vS?(f=h,u=h+1):c=h-1}s={...s,[o]:a.slice(0,f)+e3}}return Yg(n,s)}const $te="/mail",z9=()=>{const[t,e]=A.useState(()=>_te());return A.useEffect(()=>xte(e),[]),t?I.jsx(j9,{fatal:t}):null},n3=t=>({errorMessage:t.message,stack:t.stack,componentStack:t.componentStack}),j9=({fatal:t,onRetry:e})=>{const[n,r]=A.useState(!1),s=()=>{window.location.reload()},o=()=>{if(e){e();return}s()},a=()=>{const f=Hte(t3(n3(t)));window.open(f,"_blank","noopener,noreferrer")},u=async()=>{const f=Bte(t3(n3(t)));await navigator.clipboard.writeText(f),r(!0),window.setTimeout(()=>r(!1),2e3)},c=t.recoverable?"The server returned an unexpected error. This is not your fault — nothing was saved or sent. Retry, or report a bug so we can fix it.":"Something went wrong and this page can't recover. This is not your fault — nothing was saved or sent. Go to your inbox, or report a bug so we can fix it.";return I.jsxs("div",{role:"alert","aria-live":"assertive","data-testid":"fatal-error-overlay",className:"fixed inset-0 z-[1000] flex flex-col items-center justify-center gap-6 bg-red-700 p-6 text-center text-white",children:[I.jsx(oT,{className:"size-16 shrink-0","aria-hidden":"true"}),I.jsxs("div",{className:"max-w-lg space-y-3",children:[I.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:"Something broke"}),I.jsx("p",{className:"text-base text-red-50",children:c}),I.jsx("p",{className:"break-words font-mono text-sm text-red-100",children:t.message}),I.jsxs("p",{className:"font-mono text-xs text-red-200",children:["Reference: ",t.correlationId]})]}),I.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-3",children:[t.recoverable?I.jsx("button",{type:"button",onClick:o,className:"inline-flex min-h-11 items-center rounded-md bg-white px-5 text-sm font-semibold text-red-700 transition-colors hover:bg-red-50",children:"Retry"}):I.jsx("a",{href:$te,className:"inline-flex min-h-11 items-center rounded-md bg-white px-5 text-sm font-semibold text-red-700 transition-colors hover:bg-red-50",children:"Go to inbox"}),I.jsx("button",{type:"button",onClick:a,className:"inline-flex min-h-11 items-center rounded-md border border-white/70 px-5 text-sm font-semibold text-white transition-colors hover:bg-white/10",children:"Report a bug"}),I.jsx("button",{type:"button",onClick:u,className:"inline-flex min-h-11 items-center rounded-md border border-white/70 px-5 text-sm font-semibold text-white transition-colors hover:bg-white/10",children:n?"Copied":"Copy full details"})]})]})},qte=({betterAuthEnabled:t,cognitoConfigured:e})=>t?"betterAuth":e?"cognito":"none",B9=t=>qte(t)==="cognito"?wee:void 0,Wte="Fetch Error",hT=(t,e)=>{if(t&&typeof t=="object"&&e in t){const n=t[e];if(typeof n=="string"&&n.trim().length>0)return n}},pT=t=>hT(t,"message"),Vte=t=>$y(t)?!1:hT(t,"statusText")===Wte?!0:au(t)===void 0,Gte=t=>{if(Vte(t))return"network";const e=au(t);return e===void 0||e===404||e>=500?"fatal":pT(t)?"validation":"fatal"},Kte="Can't reach the server. You may be offline — check your connection and try again.",Yte=(t,e)=>e==="network"?Kte:pT(t)??"Please check your details and try again.",Zte=t=>{const e=au(t);if(e===void 0)return"no response";const n=hT(t,"statusText");return n?`${e} ${n}`:String(e)},Xte=(t,e)=>{const n=Zte(t),r=au(t)===404?"The endpoint did not respond as expected — check that the backend is running and up to date (see the deployment guide's troubleshooting section).":"The server returned an unexpected response.",s=pT(t),o=s?` Server said: ${s}.`:"";return`${e.method} ${e.path} failed: ${n}. ${r}${o}`},Qte=(t,e)=>{ql(new Error(Xte(t,e)),{recoverable:!1})},Jte={method:"POST",path:"/api/auth/sign-up/email"},ene={method:"POST",path:"/api/auth/sign-in/email"},tne=()=>{const[t,e]=A.useState("signIn"),[n,r]=A.useState(""),[s,o]=A.useState(""),[a,u]=A.useState(""),[c,f]=A.useState(null),[h,g]=A.useState(!1),[m,y]=A.useState(!1),S=m?"signIn":t,E=(w,x)=>{if(BX(w)){y(!0),e("signIn");return}const T=Gte(w);if(T==="fatal"){Qte(w,x);return}f(Yte(w,T))},C=async w=>{if(w.preventDefault(),h)return;f(null),g(!0);const x=S==="signUp"?Jte:ene,T=await(S==="signUp"?xh.signUp.email({email:s,password:a,name:n}):xh.signIn.email({email:s,password:a})).then(R=>R.error??null,R=>R);g(!1),T&&E(T,x)};return I.jsxs(I.Fragment,{children:[I.jsx(z9,{}),I.jsxs(E9,{children:[I.jsx(w9,{}),I.jsxs("form",{onSubmit:C,className:"mt-6 flex flex-col gap-4 rounded-lg border border-line bg-surface p-7 shadow-lg",children:[m?I.jsx(n_,{tone:"info",children:"New signups are currently closed. Sign in with an existing account, or contact your administrator for access."}):I.jsxs("div",{className:"flex gap-1",children:[I.jsx(Zs,{size:"sm",variant:S==="signIn"?"secondary":"ghost","aria-pressed":S==="signIn",onClick:()=>e("signIn"),children:"Sign in"}),I.jsx(Zs,{size:"sm",variant:S==="signUp"?"secondary":"ghost","aria-pressed":S==="signUp",onClick:()=>e("signUp"),children:"Create account"})]}),c&&I.jsx(n_,{tone:"danger",children:c}),S==="signUp"&&I.jsxs("div",{className:"flex flex-col gap-1 text-sm",children:[I.jsx("label",{htmlFor:"ba-name",className:"text-fg-muted",children:"Name"}),I.jsx(Pl,{id:"ba-name",type:"text",autoComplete:"name",value:n,onChange:w=>r(w.target.value),placeholder:"Your name",required:!0})]}),I.jsxs("div",{className:"flex flex-col gap-1 text-sm",children:[I.jsx("label",{htmlFor:"ba-email",className:"text-fg-muted",children:"Email"}),I.jsx(Pl,{id:"ba-email",type:"email",autoComplete:"email",value:s,onChange:w=>o(w.target.value),placeholder:"you@example.com",required:!0})]}),I.jsxs("div",{className:"flex flex-col gap-1 text-sm",children:[I.jsx("label",{htmlFor:"ba-password",className:"text-fg-muted",children:"Password"}),I.jsx(Pl,{id:"ba-password",type:"password",autoComplete:S==="signUp"?"new-password":"current-password",value:a,onChange:w=>u(w.target.value),placeholder:"Your password",required:!0})]}),I.jsx(Zs,{type:"submit",children:S==="signUp"?"Create account":"Sign in"})]}),I.jsx(C9,{note:B9({betterAuthEnabled:Uy(),cognitoConfigured:!1})})]})]})},nne=({children:t})=>{const{data:e,isPending:n}=xh.useSession();return n?I.jsx(dT,{}):e?I.jsx(I.Fragment,{children:t}):I.jsx(tne,{})},rne=({children:t,fallback:e=null})=>{const{data:n}=xh.useSession();if(!n)return I.jsx(I.Fragment,{children:e});const r=async()=>{await xh.signOut(),sT()};return I.jsx(I.Fragment,{children:t({email:n.user.email??null,signOut:r})})},Iv={configure:()=>{},getToken:QX,resetToken:sT,Shell:nne,Account:rne};var bS,r3;function sne(){if(r3)return bS;r3=1;function t(){this.__data__=[],this.size=0}return bS=t,bS}var SS,s3;function ap(){if(s3)return SS;s3=1;function t(e,n){return e===n||e!==e&&n!==n}return SS=t,SS}var ES,o3;function qy(){if(o3)return ES;o3=1;var t=ap();function e(n,r){for(var s=n.length;s--;)if(t(n[s][0],r))return s;return-1}return ES=e,ES}var CS,i3;function one(){if(i3)return CS;i3=1;var t=qy(),e=Array.prototype,n=e.splice;function r(s){var o=this.__data__,a=t(o,s);if(a<0)return!1;var u=o.length-1;return a==u?o.pop():n.call(o,a,1),--this.size,!0}return CS=r,CS}var wS,a3;function ine(){if(a3)return wS;a3=1;var t=qy();function e(n){var r=this.__data__,s=t(r,n);return s<0?void 0:r[s][1]}return wS=e,wS}var xS,l3;function ane(){if(l3)return xS;l3=1;var t=qy();function e(n){return t(this.__data__,n)>-1}return xS=e,xS}var _S,u3;function lne(){if(u3)return _S;u3=1;var t=qy();function e(n,r){var s=this.__data__,o=t(s,n);return o<0?(++this.size,s.push([n,r])):s[o][1]=r,this}return _S=e,_S}var AS,c3;function Wy(){if(c3)return AS;c3=1;var t=sne(),e=one(),n=ine(),r=ane(),s=lne();function o(a){var u=-1,c=a==null?0:a.length;for(this.clear();++u<c;){var f=a[u];this.set(f[0],f[1])}}return o.prototype.clear=t,o.prototype.delete=e,o.prototype.get=n,o.prototype.has=r,o.prototype.set=s,AS=o,AS}var TS,d3;function une(){if(d3)return TS;d3=1;var t=Wy();function e(){this.__data__=new t,this.size=0}return TS=e,TS}var RS,f3;function cne(){if(f3)return RS;f3=1;function t(e){var n=this.__data__,r=n.delete(e);return this.size=n.size,r}return RS=t,RS}var IS,h3;function dne(){if(h3)return IS;h3=1;function t(e){return this.__data__.get(e)}return IS=t,IS}var OS,p3;function fne(){if(p3)return OS;p3=1;function t(e){return this.__data__.has(e)}return OS=t,OS}var NS,g3;function H9(){if(g3)return NS;g3=1;var t=typeof Ug=="object"&&Ug&&Ug.Object===Object&&Ug;return NS=t,NS}var MS,m3;function Mo(){if(m3)return MS;m3=1;var t=H9(),e=typeof self=="object"&&self&&self.Object===Object&&self,n=t||e||Function("return this")();return MS=n,MS}var PS,v3;function Vy(){if(v3)return PS;v3=1;var t=Mo(),e=t.Symbol;return PS=e,PS}var kS,y3;function hne(){if(y3)return kS;y3=1;var t=Vy(),e=Object.prototype,n=e.hasOwnProperty,r=e.toString,s=t?t.toStringTag:void 0;function o(a){var u=n.call(a,s),c=a[s];try{a[s]=void 0;var f=!0}catch{}var h=r.call(a);return f&&(u?a[s]=c:delete a[s]),h}return kS=o,kS}var DS,b3;function pne(){if(b3)return DS;b3=1;var t=Object.prototype,e=t.toString;function n(r){return e.call(r)}return DS=n,DS}var LS,S3;function md(){if(S3)return LS;S3=1;var t=Vy(),e=hne(),n=pne(),r="[object Null]",s="[object Undefined]",o=t?t.toStringTag:void 0;function a(u){return u==null?u===void 0?s:r:o&&o in Object(u)?e(u):n(u)}return LS=a,LS}var US,E3;function Ti(){if(E3)return US;E3=1;function t(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}return US=t,US}var FS,C3;function gT(){if(C3)return FS;C3=1;var t=md(),e=Ti(),n="[object AsyncFunction]",r="[object Function]",s="[object GeneratorFunction]",o="[object Proxy]";function a(u){if(!e(u))return!1;var c=t(u);return c==r||c==s||c==n||c==o}return FS=a,FS}var zS,w3;function gne(){if(w3)return zS;w3=1;var t=Mo(),e=t["__core-js_shared__"];return zS=e,zS}var jS,x3;function mne(){if(x3)return jS;x3=1;var t=gne(),e=(function(){var r=/[^.]+$/.exec(t&&t.keys&&t.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function n(r){return!!e&&e in r}return jS=n,jS}var BS,_3;function $9(){if(_3)return BS;_3=1;var t=Function.prototype,e=t.toString;function n(r){if(r!=null){try{return e.call(r)}catch{}try{return r+""}catch{}}return""}return BS=n,BS}var HS,A3;function vne(){if(A3)return HS;A3=1;var t=gT(),e=mne(),n=Ti(),r=$9(),s=/[\\^$.*+?()[\]{}|]/g,o=/^\[object .+?Constructor\]$/,a=Function.prototype,u=Object.prototype,c=a.toString,f=u.hasOwnProperty,h=RegExp("^"+c.call(f).replace(s,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function g(m){if(!n(m)||e(m))return!1;var y=t(m)?h:o;return y.test(r(m))}return HS=g,HS}var $S,T3;function yne(){if(T3)return $S;T3=1;function t(e,n){return e?.[n]}return $S=t,$S}var qS,R3;function lu(){if(R3)return qS;R3=1;var t=vne(),e=yne();function n(r,s){var o=e(r,s);return t(o)?o:void 0}return qS=n,qS}var WS,I3;function mT(){if(I3)return WS;I3=1;var t=lu(),e=Mo(),n=t(e,"Map");return WS=n,WS}var VS,O3;function Gy(){if(O3)return VS;O3=1;var t=lu(),e=t(Object,"create");return VS=e,VS}var GS,N3;function bne(){if(N3)return GS;N3=1;var t=Gy();function e(){this.__data__=t?t(null):{},this.size=0}return GS=e,GS}var KS,M3;function Sne(){if(M3)return KS;M3=1;function t(e){var n=this.has(e)&&delete this.__data__[e];return this.size-=n?1:0,n}return KS=t,KS}var YS,P3;function Ene(){if(P3)return YS;P3=1;var t=Gy(),e="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function s(o){var a=this.__data__;if(t){var u=a[o];return u===e?void 0:u}return r.call(a,o)?a[o]:void 0}return YS=s,YS}var ZS,k3;function Cne(){if(k3)return ZS;k3=1;var t=Gy(),e=Object.prototype,n=e.hasOwnProperty;function r(s){var o=this.__data__;return t?o[s]!==void 0:n.call(o,s)}return ZS=r,ZS}var XS,D3;function wne(){if(D3)return XS;D3=1;var t=Gy(),e="__lodash_hash_undefined__";function n(r,s){var o=this.__data__;return this.size+=this.has(r)?0:1,o[r]=t&&s===void 0?e:s,this}return XS=n,XS}var QS,L3;function xne(){if(L3)return QS;L3=1;var t=bne(),e=Sne(),n=Ene(),r=Cne(),s=wne();function o(a){var u=-1,c=a==null?0:a.length;for(this.clear();++u<c;){var f=a[u];this.set(f[0],f[1])}}return o.prototype.clear=t,o.prototype.delete=e,o.prototype.get=n,o.prototype.has=r,o.prototype.set=s,QS=o,QS}var JS,U3;function _ne(){if(U3)return JS;U3=1;var t=xne(),e=Wy(),n=mT();function r(){this.size=0,this.__data__={hash:new t,map:new(n||e),string:new t}}return JS=r,JS}var eE,F3;function Ane(){if(F3)return eE;F3=1;function t(e){var n=typeof e;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?e!=="__proto__":e===null}return eE=t,eE}var tE,z3;function Ky(){if(z3)return tE;z3=1;var t=Ane();function e(n,r){var s=n.__data__;return t(r)?s[typeof r=="string"?"string":"hash"]:s.map}return tE=e,tE}var nE,j3;function Tne(){if(j3)return nE;j3=1;var t=Ky();function e(n){var r=t(this,n).delete(n);return this.size-=r?1:0,r}return nE=e,nE}var rE,B3;function Rne(){if(B3)return rE;B3=1;var t=Ky();function e(n){return t(this,n).get(n)}return rE=e,rE}var sE,H3;function Ine(){if(H3)return sE;H3=1;var t=Ky();function e(n){return t(this,n).has(n)}return sE=e,sE}var oE,$3;function One(){if($3)return oE;$3=1;var t=Ky();function e(n,r){var s=t(this,n),o=s.size;return s.set(n,r),this.size+=s.size==o?0:1,this}return oE=e,oE}var iE,q3;function vT(){if(q3)return iE;q3=1;var t=_ne(),e=Tne(),n=Rne(),r=Ine(),s=One();function o(a){var u=-1,c=a==null?0:a.length;for(this.clear();++u<c;){var f=a[u];this.set(f[0],f[1])}}return o.prototype.clear=t,o.prototype.delete=e,o.prototype.get=n,o.prototype.has=r,o.prototype.set=s,iE=o,iE}var aE,W3;function Nne(){if(W3)return aE;W3=1;var t=Wy(),e=mT(),n=vT(),r=200;function s(o,a){var u=this.__data__;if(u instanceof t){var c=u.__data__;if(!e||c.length<r-1)return c.push([o,a]),this.size=++u.size,this;u=this.__data__=new n(c)}return u.set(o,a),this.size=u.size,this}return aE=s,aE}var lE,V3;function yT(){if(V3)return lE;V3=1;var t=Wy(),e=une(),n=cne(),r=dne(),s=fne(),o=Nne();function a(u){var c=this.__data__=new t(u);this.size=c.size}return a.prototype.clear=e,a.prototype.delete=n,a.prototype.get=r,a.prototype.has=s,a.prototype.set=o,lE=a,lE}var uE,G3;function Mne(){if(G3)return uE;G3=1;var t="__lodash_hash_undefined__";function e(n){return this.__data__.set(n,t),this}return uE=e,uE}var cE,K3;function Pne(){if(K3)return cE;K3=1;function t(e){return this.__data__.has(e)}return cE=t,cE}var dE,Y3;function kne(){if(Y3)return dE;Y3=1;var t=vT(),e=Mne(),n=Pne();function r(s){var o=-1,a=s==null?0:s.length;for(this.__data__=new t;++o<a;)this.add(s[o])}return r.prototype.add=r.prototype.push=e,r.prototype.has=n,dE=r,dE}var fE,Z3;function Dne(){if(Z3)return fE;Z3=1;function t(e,n){for(var r=-1,s=e==null?0:e.length;++r<s;)if(n(e[r],r,e))return!0;return!1}return fE=t,fE}var hE,X3;function Lne(){if(X3)return hE;X3=1;function t(e,n){return e.has(n)}return hE=t,hE}var pE,Q3;function q9(){if(Q3)return pE;Q3=1;var t=kne(),e=Dne(),n=Lne(),r=1,s=2;function o(a,u,c,f,h,g){var m=c&r,y=a.length,S=u.length;if(y!=S&&!(m&&S>y))return!1;var E=g.get(a),C=g.get(u);if(E&&C)return E==u&&C==a;var w=-1,x=!0,T=c&s?new t:void 0;for(g.set(a,u),g.set(u,a);++w<y;){var R=a[w],M=u[w];if(f)var N=m?f(M,R,w,u,a,g):f(R,M,w,a,u,g);if(N!==void 0){if(N)continue;x=!1;break}if(T){if(!e(u,function(O,k){if(!n(T,k)&&(R===O||h(R,O,c,f,g)))return T.push(k)})){x=!1;break}}else if(!(R===M||h(R,M,c,f,g))){x=!1;break}}return g.delete(a),g.delete(u),x}return pE=o,pE}var gE,J3;function W9(){if(J3)return gE;J3=1;var t=Mo(),e=t.Uint8Array;return gE=e,gE}var mE,ek;function Une(){if(ek)return mE;ek=1;function t(e){var n=-1,r=Array(e.size);return e.forEach(function(s,o){r[++n]=[o,s]}),r}return mE=t,mE}var vE,tk;function Fne(){if(tk)return vE;tk=1;function t(e){var n=-1,r=Array(e.size);return e.forEach(function(s){r[++n]=s}),r}return vE=t,vE}var yE,nk;function zne(){if(nk)return yE;nk=1;var t=Vy(),e=W9(),n=ap(),r=q9(),s=Une(),o=Fne(),a=1,u=2,c="[object Boolean]",f="[object Date]",h="[object Error]",g="[object Map]",m="[object Number]",y="[object RegExp]",S="[object Set]",E="[object String]",C="[object Symbol]",w="[object ArrayBuffer]",x="[object DataView]",T=t?t.prototype:void 0,R=T?T.valueOf:void 0;function M(N,O,k,F,$,D,z){switch(k){case x:if(N.byteLength!=O.byteLength||N.byteOffset!=O.byteOffset)return!1;N=N.buffer,O=O.buffer;case w:return!(N.byteLength!=O.byteLength||!D(new e(N),new e(O)));case c:case f:case m:return n(+N,+O);case h:return N.name==O.name&&N.message==O.message;case y:case E:return N==O+"";case g:var q=s;case S:var K=F&a;if(q||(q=o),N.size!=O.size&&!K)return!1;var Y=z.get(N);if(Y)return Y==O;F|=u,z.set(N,O);var H=r(q(N),q(O),F,$,D,z);return z.delete(N),H;case C:if(R)return R.call(N)==R.call(O)}return!1}return yE=M,yE}var bE,rk;function V9(){if(rk)return bE;rk=1;function t(e,n){for(var r=-1,s=n.length,o=e.length;++r<s;)e[o+r]=n[r];return e}return bE=t,bE}var SE,sk;function Ri(){if(sk)return SE;sk=1;var t=Array.isArray;return SE=t,SE}var EE,ok;function G9(){if(ok)return EE;ok=1;var t=V9(),e=Ri();function n(r,s,o){var a=s(r);return e(r)?a:t(a,o(r))}return EE=n,EE}var CE,ik;function jne(){if(ik)return CE;ik=1;function t(e,n){for(var r=-1,s=e==null?0:e.length,o=0,a=[];++r<s;){var u=e[r];n(u,r,e)&&(a[o++]=u)}return a}return CE=t,CE}var wE,ak;function K9(){if(ak)return wE;ak=1;function t(){return[]}return wE=t,wE}var xE,lk;function Y9(){if(lk)return xE;lk=1;var t=jne(),e=K9(),n=Object.prototype,r=n.propertyIsEnumerable,s=Object.getOwnPropertySymbols,o=s?function(a){return a==null?[]:(a=Object(a),t(s(a),function(u){return r.call(a,u)}))}:e;return xE=o,xE}var _E,uk;function Bne(){if(uk)return _E;uk=1;function t(e,n){for(var r=-1,s=Array(e);++r<e;)s[r]=n(r);return s}return _E=t,_E}var AE,ck;function uu(){if(ck)return AE;ck=1;function t(e){return e!=null&&typeof e=="object"}return AE=t,AE}var TE,dk;function Hne(){if(dk)return TE;dk=1;var t=md(),e=uu(),n="[object Arguments]";function r(s){return e(s)&&t(s)==n}return TE=r,TE}var RE,fk;function bT(){if(fk)return RE;fk=1;var t=Hne(),e=uu(),n=Object.prototype,r=n.hasOwnProperty,s=n.propertyIsEnumerable,o=t((function(){return arguments})())?t:function(a){return e(a)&&r.call(a,"callee")&&!s.call(a,"callee")};return RE=o,RE}var Jf={exports:{}},IE,hk;function $ne(){if(hk)return IE;hk=1;function t(){return!1}return IE=t,IE}Jf.exports;var pk;function ST(){return pk||(pk=1,(function(t,e){var n=Mo(),r=$ne(),s=e&&!e.nodeType&&e,o=s&&!0&&t&&!t.nodeType&&t,a=o&&o.exports===s,u=a?n.Buffer:void 0,c=u?u.isBuffer:void 0,f=c||r;t.exports=f})(Jf,Jf.exports)),Jf.exports}var OE,gk;function Yy(){if(gk)return OE;gk=1;var t=9007199254740991,e=/^(?:0|[1-9]\d*)$/;function n(r,s){var o=typeof r;return s=s??t,!!s&&(o=="number"||o!="symbol"&&e.test(r))&&r>-1&&r%1==0&&r<s}return OE=n,OE}var NE,mk;function ET(){if(mk)return NE;mk=1;var t=9007199254740991;function e(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=t}return NE=e,NE}var ME,vk;function qne(){if(vk)return ME;vk=1;var t=md(),e=ET(),n=uu(),r="[object Arguments]",s="[object Array]",o="[object Boolean]",a="[object Date]",u="[object Error]",c="[object Function]",f="[object Map]",h="[object Number]",g="[object Object]",m="[object RegExp]",y="[object Set]",S="[object String]",E="[object WeakMap]",C="[object ArrayBuffer]",w="[object DataView]",x="[object Float32Array]",T="[object Float64Array]",R="[object Int8Array]",M="[object Int16Array]",N="[object Int32Array]",O="[object Uint8Array]",k="[object Uint8ClampedArray]",F="[object Uint16Array]",$="[object Uint32Array]",D={};D[x]=D[T]=D[R]=D[M]=D[N]=D[O]=D[k]=D[F]=D[$]=!0,D[r]=D[s]=D[C]=D[o]=D[w]=D[a]=D[u]=D[c]=D[f]=D[h]=D[g]=D[m]=D[y]=D[S]=D[E]=!1;function z(q){return n(q)&&e(q.length)&&!!D[t(q)]}return ME=z,ME}var PE,yk;function Wne(){if(yk)return PE;yk=1;function t(e){return function(n){return e(n)}}return PE=t,PE}var eh={exports:{}};eh.exports;var bk;function Vne(){return bk||(bk=1,(function(t,e){var n=H9(),r=e&&!e.nodeType&&e,s=r&&!0&&t&&!t.nodeType&&t,o=s&&s.exports===r,a=o&&n.process,u=(function(){try{var c=s&&s.require&&s.require("util").types;return c||a&&a.binding&&a.binding("util")}catch{}})();t.exports=u})(eh,eh.exports)),eh.exports}var kE,Sk;function CT(){if(Sk)return kE;Sk=1;var t=qne(),e=Wne(),n=Vne(),r=n&&n.isTypedArray,s=r?e(r):t;return kE=s,kE}var DE,Ek;function Z9(){if(Ek)return DE;Ek=1;var t=Bne(),e=bT(),n=Ri(),r=ST(),s=Yy(),o=CT(),a=Object.prototype,u=a.hasOwnProperty;function c(f,h){var g=n(f),m=!g&&e(f),y=!g&&!m&&r(f),S=!g&&!m&&!y&&o(f),E=g||m||y||S,C=E?t(f.length,String):[],w=C.length;for(var x in f)(h||u.call(f,x))&&!(E&&(x=="length"||y&&(x=="offset"||x=="parent")||S&&(x=="buffer"||x=="byteLength"||x=="byteOffset")||s(x,w)))&&C.push(x);return C}return DE=c,DE}var LE,Ck;function wT(){if(Ck)return LE;Ck=1;var t=Object.prototype;function e(n){var r=n&&n.constructor,s=typeof r=="function"&&r.prototype||t;return n===s}return LE=e,LE}var UE,wk;function X9(){if(wk)return UE;wk=1;function t(e,n){return function(r){return e(n(r))}}return UE=t,UE}var FE,xk;function Gne(){if(xk)return FE;xk=1;var t=X9(),e=t(Object.keys,Object);return FE=e,FE}var zE,_k;function Kne(){if(_k)return zE;_k=1;var t=wT(),e=Gne(),n=Object.prototype,r=n.hasOwnProperty;function s(o){if(!t(o))return e(o);var a=[];for(var u in Object(o))r.call(o,u)&&u!="constructor"&&a.push(u);return a}return zE=s,zE}var jE,Ak;function Zy(){if(Ak)return jE;Ak=1;var t=gT(),e=ET();function n(r){return r!=null&&e(r.length)&&!t(r)}return jE=n,jE}var BE,Tk;function Q9(){if(Tk)return BE;Tk=1;var t=Z9(),e=Kne(),n=Zy();function r(s){return n(s)?t(s):e(s)}return BE=r,BE}var HE,Rk;function Yne(){if(Rk)return HE;Rk=1;var t=G9(),e=Y9(),n=Q9();function r(s){return t(s,n,e)}return HE=r,HE}var $E,Ik;function Zne(){if(Ik)return $E;Ik=1;var t=Yne(),e=1,n=Object.prototype,r=n.hasOwnProperty;function s(o,a,u,c,f,h){var g=u&e,m=t(o),y=m.length,S=t(a),E=S.length;if(y!=E&&!g)return!1;for(var C=y;C--;){var w=m[C];if(!(g?w in a:r.call(a,w)))return!1}var x=h.get(o),T=h.get(a);if(x&&T)return x==a&&T==o;var R=!0;h.set(o,a),h.set(a,o);for(var M=g;++C<y;){w=m[C];var N=o[w],O=a[w];if(c)var k=g?c(O,N,w,a,o,h):c(N,O,w,o,a,h);if(!(k===void 0?N===O||f(N,O,u,c,h):k)){R=!1;break}M||(M=w=="constructor")}if(R&&!M){var F=o.constructor,$=a.constructor;F!=$&&"constructor"in o&&"constructor"in a&&!(typeof F=="function"&&F instanceof F&&typeof $=="function"&&$ instanceof $)&&(R=!1)}return h.delete(o),h.delete(a),R}return $E=s,$E}var qE,Ok;function Xne(){if(Ok)return qE;Ok=1;var t=lu(),e=Mo(),n=t(e,"DataView");return qE=n,qE}var WE,Nk;function Qne(){if(Nk)return WE;Nk=1;var t=lu(),e=Mo(),n=t(e,"Promise");return WE=n,WE}var VE,Mk;function Jne(){if(Mk)return VE;Mk=1;var t=lu(),e=Mo(),n=t(e,"Set");return VE=n,VE}var GE,Pk;function ere(){if(Pk)return GE;Pk=1;var t=lu(),e=Mo(),n=t(e,"WeakMap");return GE=n,GE}var KE,kk;function tre(){if(kk)return KE;kk=1;var t=Xne(),e=mT(),n=Qne(),r=Jne(),s=ere(),o=md(),a=$9(),u="[object Map]",c="[object Object]",f="[object Promise]",h="[object Set]",g="[object WeakMap]",m="[object DataView]",y=a(t),S=a(e),E=a(n),C=a(r),w=a(s),x=o;return(t&&x(new t(new ArrayBuffer(1)))!=m||e&&x(new e)!=u||n&&x(n.resolve())!=f||r&&x(new r)!=h||s&&x(new s)!=g)&&(x=function(T){var R=o(T),M=R==c?T.constructor:void 0,N=M?a(M):"";if(N)switch(N){case y:return m;case S:return u;case E:return f;case C:return h;case w:return g}return R}),KE=x,KE}var YE,Dk;function nre(){if(Dk)return YE;Dk=1;var t=yT(),e=q9(),n=zne(),r=Zne(),s=tre(),o=Ri(),a=ST(),u=CT(),c=1,f="[object Arguments]",h="[object Array]",g="[object Object]",m=Object.prototype,y=m.hasOwnProperty;function S(E,C,w,x,T,R){var M=o(E),N=o(C),O=M?h:s(E),k=N?h:s(C);O=O==f?g:O,k=k==f?g:k;var F=O==g,$=k==g,D=O==k;if(D&&a(E)){if(!a(C))return!1;M=!0,F=!1}if(D&&!F)return R||(R=new t),M||u(E)?e(E,C,w,x,T,R):n(E,C,O,w,x,T,R);if(!(w&c)){var z=F&&y.call(E,"__wrapped__"),q=$&&y.call(C,"__wrapped__");if(z||q){var K=z?E.value():E,Y=q?C.value():C;return R||(R=new t),T(K,Y,w,x,R)}}return D?(R||(R=new t),r(E,C,w,x,T,R)):!1}return YE=S,YE}var ZE,Lk;function J9(){if(Lk)return ZE;Lk=1;var t=nre(),e=uu();function n(r,s,o,a,u){return r===s?!0:r==null||s==null||!e(r)&&!e(s)?r!==r&&s!==s:t(r,s,o,a,n,u)}return ZE=n,ZE}var XE={exports:{}},QE={};var Uk;function rre(){if(Uk)return QE;Uk=1;var t=ip(),e=tQ();function n(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var r=typeof Object.is=="function"?Object.is:n,s=e.useSyncExternalStore,o=t.useRef,a=t.useEffect,u=t.useMemo,c=t.useDebugValue;return QE.useSyncExternalStoreWithSelector=function(f,h,g,m,y){var S=o(null);if(S.current===null){var E={hasValue:!1,value:null};S.current=E}else E=S.current;S=u(function(){function w(N){if(!x){if(x=!0,T=N,N=m(N),y!==void 0&&E.hasValue){var O=E.value;if(y(O,N))return R=O}return R=N}if(O=R,r(T,N))return O;var k=m(N);return y!==void 0&&y(O,k)?(T=N,O):(T=N,R=k)}var x=!1,T,R,M=g===void 0?null:g;return[function(){return w(h())},M===null?void 0:function(){return w(M())}]},[h,g,m,y]);var C=s(f,S[0],S[1]);return a(function(){E.hasValue=!0,E.value=C},[C]),c(C),C},QE}var Fk;function sre(){return Fk||(Fk=1,XE.exports=rre()),XE.exports}var xT=sre();const yRe=Va(xT);var me=function(){return me=Object.assign||function(e){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},me.apply(this,arguments)};function _T(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(t);s<r.length;s++)e.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(t,r[s])&&(n[r[s]]=t[r[s]]);return n}function ht(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function At(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),s,o=[],a;try{for(;(e===void 0||e-- >0)&&!(s=r.next()).done;)o.push(s.value)}catch(u){a={error:u}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function Jt(t,e,n){if(arguments.length===2)for(var r=0,s=e.length,o;r<s;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}var Dt;(function(t){t.Start="xstate.start",t.Stop="xstate.stop",t.Raise="xstate.raise",t.Send="xstate.send",t.Cancel="xstate.cancel",t.NullEvent="",t.Assign="xstate.assign",t.After="xstate.after",t.DoneState="done.state",t.DoneInvoke="done.invoke",t.Log="xstate.log",t.Init="xstate.init",t.Invoke="xstate.invoke",t.ErrorExecution="error.execution",t.ErrorCommunication="error.communication",t.ErrorPlatform="error.platform",t.ErrorCustom="xstate.error",t.Update="xstate.update",t.Pure="xstate.pure",t.Choose="xstate.choose"})(Dt||(Dt={}));var Wl;(function(t){t.Parent="#_parent",t.Internal="#_internal"})(Wl||(Wl={}));var a_=Dt.Start,AT=Dt.Stop,lp=Dt.Raise,Xy=Dt.Send,eF=Dt.Cancel,ore=Dt.NullEvent,TT=Dt.Assign;Dt.After;Dt.DoneState;var tF=Dt.Log,ire=Dt.Init,l_=Dt.Invoke;Dt.ErrorExecution;var zk=Dt.ErrorPlatform,are=Dt.ErrorCustom,RT=Dt.Update,lre=Dt.Choose,ure=Dt.Pure,nF=".",jk={},u_="xstate.guard",cre="",Zg;function IT(t,e,n){n===void 0&&(n=nF);var r=fh(t,n),s=fh(e,n);return Ot(s)?Ot(r)?s===r:!1:Ot(r)?r in s:Object.keys(r).every(function(o){return o in s?IT(r[o],s[o]):!1})}function rF(t){try{return Ot(t)||typeof t=="number"?"".concat(t):t.type}catch{throw new Error("Events must be strings or objects with a string event.type property.")}}function c_(t,e){try{return vd(t)?t:t.toString().split(e)}catch{throw new Error("'".concat(t,"' is not a valid state path."))}}function dre(t){return typeof t=="object"&&"value"in t&&"context"in t&&"event"in t&&"_event"in t}function fh(t,e){if(dre(t))return t.value;if(vd(t))return Ov(t);if(typeof t!="string")return t;var n=c_(t,e);return Ov(n)}function Ov(t){if(t.length===1)return t[0];for(var e={},n=e,r=0;r<t.length-1;r++)r===t.length-2?n[t[r]]=t[r+1]:(n[t[r]]={},n=n[t[r]]);return e}function th(t,e){for(var n={},r=Object.keys(t),s=0;s<r.length;s++){var o=r[s];n[o]=e(t[o],o,t,s)}return n}function Bk(t,e,n){var r,s,o={};try{for(var a=ht(Object.keys(t)),u=a.next();!u.done;u=a.next()){var c=u.value,f=t[c];n(f)&&(o[c]=e(f,c,t))}}catch(h){r={error:h}}finally{try{u&&!u.done&&(s=a.return)&&s.call(a)}finally{if(r)throw r.error}}return o}var fre=function(t){return function(e){var n,r,s=e;try{for(var o=ht(t),a=o.next();!a.done;a=o.next()){var u=a.value;s=s[u]}}catch(c){n={error:c}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return s}};function hre(t,e){return function(n){var r,s,o=n;try{for(var a=ht(t),u=a.next();!u.done;u=a.next()){var c=u.value;o=o[e][c]}}catch(f){r={error:f}}finally{try{u&&!u.done&&(s=a.return)&&s.call(a)}finally{if(r)throw r.error}}return o}}function rv(t){if(!t)return[[]];if(Ot(t))return[[t]];var e=dn(Object.keys(t).map(function(n){var r=t[n];return typeof r!="string"&&(!r||!Object.keys(r).length)?[[n]]:rv(t[n]).map(function(s){return[n].concat(s)})}));return e}function dn(t){var e;return(e=[]).concat.apply(e,Jt([],At(t),!1))}function sF(t){return vd(t)?t:[t]}function Hs(t){return t===void 0?[]:sF(t)}function Nv(t,e,n){var r,s;if(Nt(t))return t(e,n.data);var o={};try{for(var a=ht(Object.keys(t)),u=a.next();!u.done;u=a.next()){var c=u.value,f=t[c];Nt(f)?o[c]=f(e,n.data):o[c]=f}}catch(h){r={error:h}}finally{try{u&&!u.done&&(s=a.return)&&s.call(a)}finally{if(r)throw r.error}}return o}function pre(t){return/^(done|error)\./.test(t)}function Hk(t){return!!(t instanceof Promise||t!==null&&(Nt(t)||typeof t=="object")&&Nt(t.then))}function gre(t){return t!==null&&typeof t=="object"&&"transition"in t&&typeof t.transition=="function"}function mre(t,e){var n,r,s=At([[],[]],2),o=s[0],a=s[1];try{for(var u=ht(t),c=u.next();!c.done;c=u.next()){var f=c.value;e(f)?o.push(f):a.push(f)}}catch(h){n={error:h}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}return[o,a]}function oF(t,e){return th(t.states,function(n,r){if(n){var s=(Ot(e)?void 0:e[r])||(n?n.current:void 0);if(s)return{current:s,states:oF(n,s)}}})}function vre(t,e){return{current:e,states:oF(t,e)}}function $k(t,e,n,r){var s=t&&n.reduce(function(o,a){var u,c,f=a.assignment,h={state:r,action:a,_event:e},g={};if(Nt(f))g=f(o,e.data,h);else try{for(var m=ht(Object.keys(f)),y=m.next();!y.done;y=m.next()){var S=y.value,E=f[S];g[S]=Nt(E)?E(o,e.data,h):E}}catch(C){u={error:C}}finally{try{y&&!y.done&&(c=m.return)&&c.call(m)}finally{if(u)throw u.error}}return Object.assign({},o,g)},t);return s}var yre=function(){};function vd(t){return Array.isArray(t)}function Nt(t){return typeof t=="function"}function Ot(t){return typeof t=="string"}function iF(t,e){if(t)return Ot(t)?{type:u_,name:t,predicate:e?e[t]:void 0}:Nt(t)?{type:u_,name:t.name,predicate:t}:t}function bre(t){try{return"subscribe"in t&&Nt(t.subscribe)}catch{return!1}}var xa=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();Zg={},Zg[xa]=function(){return this},Zg[Symbol.observable]=function(){return this};function qc(t){return!!t&&"__xstatenode"in t}function Sre(t){return!!t&&typeof t.send=="function"}var Ere=(function(){var t=0;return function(){return t++,t.toString(16)}})();function Qy(t,e){return Ot(t)||typeof t=="number"?me({type:t},e):t}function nr(t,e){if(!Ot(t)&&"$$type"in t&&t.$$type==="scxml")return t;var n=Qy(t);return me({name:n.type,data:n,$$type:"scxml",type:"external"},e)}function sc(t,e){var n=sF(e).map(function(r){return typeof r>"u"||typeof r=="string"||qc(r)?{target:r,event:t}:me(me({},r),{event:t})});return n}function Cre(t){if(!(t===void 0||t===cre))return Hs(t)}function aF(t,e,n,r,s){var o=t.options.guards,a={state:s,cond:e,_event:r};if(e.type===u_)return(o?.[e.name]||e.predicate)(n,r.data,a);var u=o?.[e.type];if(!u)throw new Error("Guard '".concat(e.type,"' is not implemented on machine '").concat(t.id,"'."));return u(n,r.data,a)}function lF(t){return typeof t=="string"?{type:t}:t}function hh(t,e,n){var r=function(){},s=typeof t=="object",o=s?t:null;return{next:((s?t.next:t)||r).bind(o),error:((s?t.error:e)||r).bind(o),complete:((s?t.complete:n)||r).bind(o)}}function Xg(t,e){return"".concat(t,":invocation[").concat(e,"]")}function d_(t){return(t.type===lp||t.type===Xy&&t.to===Wl.Internal)&&typeof t.delay!="number"}var kl=nr({type:ire});function Mv(t,e){return e&&e[t]||void 0}function Wc(t,e){var n;if(Ot(t)||typeof t=="number"){var r=Mv(t,e);Nt(r)?n={type:t,exec:r}:r?n=r:n={type:t,exec:void 0}}else if(Nt(t))n={type:t.name||t.toString(),exec:t};else{var r=Mv(t.type,e);if(Nt(r))n=me(me({},t),{exec:r});else if(r){var s=r.type||t.type;n=me(me(me({},r),t),{type:s})}else n=t}return n}var ci=function(t,e){if(!t)return[];var n=vd(t)?t:[t];return n.map(function(r){return Wc(r,e)})};function Jy(t){var e=Wc(t);return me(me({id:Ot(t)?t:e.id},e),{type:e.type})}function uF(t,e){return{type:lp,event:typeof t=="function"?t:Qy(t),delay:e?e.delay:void 0,id:e?.id}}function cF(t,e,n,r){var s={_event:n},o=nr(Nt(t.event)?t.event(e,n.data,s):t.event),a;if(Ot(t.delay)){var u=r&&r[t.delay];a=Nt(u)?u(e,n.data,s):u}else a=Nt(t.delay)?t.delay(e,n.data,s):t.delay;return me(me({},t),{type:lp,_event:o,delay:a})}function eb(t,e){return{to:e?e.to:void 0,type:Xy,event:Nt(t)?t:Qy(t),delay:e?e.delay:void 0,id:e&&e.id!==void 0?e.id:Nt(t)?t.name:rF(t)}}function dF(t,e,n,r){var s={_event:n},o=nr(Nt(t.event)?t.event(e,n.data,s):t.event),a;if(Ot(t.delay)){var u=r&&r[t.delay];a=Nt(u)?u(e,n.data,s):u}else a=Nt(t.delay)?t.delay(e,n.data,s):t.delay;var c=Nt(t.to)?t.to(e,n.data,s):t.to;return me(me({},t),{to:c,_event:o,event:o.data,delay:a})}function fF(t,e){return eb(t,me(me({},e),{to:Wl.Parent}))}function hF(){return fF(RT)}var pF=function(t,e,n){return me(me({},t),{value:Ot(t.expr)?t.expr:t.expr(e,n.data,{_event:n})})},gF=function(t){return{type:eF,sendId:t}};function mF(t){var e=Jy(t);return{type:Dt.Start,activity:e,exec:void 0}}function vF(t){var e=Nt(t)?t:Jy(t);return{type:Dt.Stop,activity:e,exec:void 0}}function yF(t,e,n){var r=Nt(t.activity)?t.activity(e,n.data):t.activity,s=typeof r=="string"?{id:r}:r,o={type:Dt.Stop,activity:s};return o}var bF=function(t){return{type:TT,assignment:t}};function SF(t,e){var n=e?"#".concat(e):"";return"".concat(Dt.After,"(").concat(t,")").concat(n)}function nh(t,e){var n="".concat(Dt.DoneState,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}function ph(t,e){var n="".concat(Dt.DoneInvoke,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}function Ac(t,e){var n="".concat(Dt.ErrorPlatform,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}function EF(t,e){return eb(function(n,r){return r},me(me({},e),{to:t}))}function wre(t){return{type:Dt.Choose,conds:t}}var xre=function(t){var e,n,r=[];try{for(var s=ht(t),o=s.next();!o.done;o=s.next())for(var a=o.value,u=0;u<a.actions.length;){if(a.actions[u].type===TT){r.push(a.actions[u]),a.actions.splice(u,1);continue}u++}}catch(c){e={error:c}}finally{try{o&&!o.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}return r};function Rh(t,e,n,r,s,o,a){a===void 0&&(a=!1);var u=a?[]:xre(s),c=u.length?$k(n,r,u,e):n,f=a?[n]:void 0,h=[];function g(S,E){var C;switch(E.type){case lp:{var w=cF(E,c,r,t.options.delays);return o&&typeof w.delay=="number"&&o(w,c,r),w}case Xy:var x=dF(E,c,r,t.options.delays);return o&&x.to!==Wl.Internal&&(S==="entry"?h.push(x):o(x,c,r)),x;case tF:{var T=pF(E,c,r);return o?.(T,c,r),T}case lre:{var R=E,M=(C=R.conds.find(function(H){var te=iF(H.cond,t.options.guards);return!te||aF(t,te,c,r,o?void 0:e)}))===null||C===void 0?void 0:C.actions;if(!M)return[];var N=At(Rh(t,e,c,r,[{type:S,actions:ci(Hs(M),t.options.actions)}],o,a),2),O=N[0],k=N[1];return c=k,f?.push(c),O}case ure:{var M=E.get(c,r.data);if(!M)return[];var F=At(Rh(t,e,c,r,[{type:S,actions:ci(Hs(M),t.options.actions)}],o,a),2),$=F[0],D=F[1];return c=D,f?.push(c),$}case AT:{var T=yF(E,c,r);return o?.(T,n,r),T}case TT:{c=$k(c,r,[E],o?void 0:e),f?.push(c);break}default:var z=Wc(E,t.options.actions),q=z.exec;if(o)o(z,c,r);else if(q&&f){var K=f.length-1,Y=me(me({},z),{exec:function(H){for(var te=[],fe=1;fe<arguments.length;fe++)te[fe-1]=arguments[fe];q.apply(void 0,Jt([f[K]],At(te),!1))}});z=Y}return z}}function m(S){var E,C,w=[];try{for(var x=ht(S.actions),T=x.next();!T.done;T=x.next()){var R=T.value,M=g(S.type,R);M&&(w=w.concat(M))}}catch(N){E={error:N}}finally{try{T&&!T.done&&(C=x.return)&&C.call(x)}finally{if(E)throw E.error}}return h.forEach(function(N){o(N,c,r)}),h.length=0,w}var y=dn(s.map(m));return[y,c]}const CF=Object.freeze(Object.defineProperty({__proto__:null,after:SF,assign:bF,cancel:gF,choose:wre,done:nh,doneInvoke:ph,error:Ac,forwardTo:EF,getActionFunction:Mv,initEvent:kl,raise:uF,resolveActions:Rh,resolveLog:pF,resolveRaise:cF,resolveSend:dF,resolveStop:yF,send:eb,sendParent:fF,sendUpdate:hF,start:mF,stop:vF,toActionObject:Wc,toActionObjects:ci,toActivityDefinition:Jy},Symbol.toStringTag,{value:"Module"}));var Pv=[],bc=function(t,e){Pv.push(t);var n=e(t);return Pv.pop(),n},_re=function(t){return t(Pv[Pv.length-1])};function wF(t){var e;return e={id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:t}}},e[xa]=function(){return this},e}function Are(t,e,n,r){var s,o=lF(t.src),a=(s=e?.options.services)===null||s===void 0?void 0:s[o.type],u=t.data?Nv(t.data,n,r):void 0,c=a?OT(a,t.id,u):wF(t.id);return c.meta=t,c}function OT(t,e,n){var r=wF(e);if(r.deferred=!0,qc(t)){var s=r.state=bc(void 0,function(){return(n?t.withContext(n):t).initialState});r.getSnapshot=function(){return s}}return r}function Tre(t){try{return typeof t.send=="function"}catch{return!1}}function Rre(t){return Tre(t)&&"id"in t}function Ire(t){var e;return me((e={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}},e[xa]=function(){return this},e),t)}var kv=function(t){return t.type==="atomic"||t.type==="final"};function xF(t){return Object.keys(t.states).map(function(e){return t.states[e]})}function Ih(t){return xF(t).filter(function(e){return e.type!=="history"})}function _F(t){var e=[t];return kv(t)?e:e.concat(dn(Ih(t).map(_F)))}function rh(t,e){var n,r,s,o,a,u,c,f,h=new Set(t),g=f_(h),m=new Set(e);try{for(var y=ht(m),S=y.next();!S.done;S=y.next())for(var E=S.value,C=E.parent;C&&!m.has(C);)m.add(C),C=C.parent}catch(F){n={error:F}}finally{try{S&&!S.done&&(r=y.return)&&r.call(y)}finally{if(n)throw n.error}}var w=f_(m);try{for(var x=ht(m),T=x.next();!T.done;T=x.next()){var E=T.value;if(E.type==="compound"&&(!w.get(E)||!w.get(E).length))g.get(E)?g.get(E).forEach(function($){return m.add($)}):E.initialStateNodes.forEach(function($){return m.add($)});else if(E.type==="parallel")try{for(var R=(a=void 0,ht(Ih(E))),M=R.next();!M.done;M=R.next()){var N=M.value;m.has(N)||(m.add(N),g.get(N)?g.get(N).forEach(function($){return m.add($)}):N.initialStateNodes.forEach(function($){return m.add($)}))}}catch($){a={error:$}}finally{try{M&&!M.done&&(u=R.return)&&u.call(R)}finally{if(a)throw a.error}}}}catch(F){s={error:F}}finally{try{T&&!T.done&&(o=x.return)&&o.call(x)}finally{if(s)throw s.error}}try{for(var O=ht(m),k=O.next();!k.done;k=O.next())for(var E=k.value,C=E.parent;C&&!m.has(C);)m.add(C),C=C.parent}catch(F){c={error:F}}finally{try{k&&!k.done&&(f=O.return)&&f.call(O)}finally{if(c)throw c.error}}return m}function AF(t,e){var n=e.get(t);if(!n)return{};if(t.type==="compound"){var r=n[0];if(r){if(kv(r))return r.key}else return{}}var s={};return n.forEach(function(o){s[o.key]=AF(o,e)}),s}function f_(t){var e,n,r=new Map;try{for(var s=ht(t),o=s.next();!o.done;o=s.next()){var a=o.value;r.has(a)||r.set(a,[]),a.parent&&(r.has(a.parent)||r.set(a.parent,[]),r.get(a.parent).push(a))}}catch(u){e={error:u}}finally{try{o&&!o.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}return r}function Ore(t,e){var n=rh([t],e);return AF(t,f_(n))}function sh(t,e){return Array.isArray(t)?t.some(function(n){return n===e}):t instanceof Set?t.has(e):!1}function Nre(t){return Jt([],At(new Set(dn(Jt([],At(t.map(function(e){return e.ownEvents})),!1)))),!1)}function sv(t,e){return e.type==="compound"?Ih(e).some(function(n){return n.type==="final"&&sh(t,n)}):e.type==="parallel"?Ih(e).every(function(n){return sv(t,n)}):!1}function Mre(t){return t===void 0&&(t=[]),t.reduce(function(e,n){return n.meta!==void 0&&(e[n.id]=n.meta),e},{})}function qk(t){return new Set(dn(t.map(function(e){return e.tags})))}function TF(t,e){if(t===e)return!0;if(t===void 0||e===void 0)return!1;if(Ot(t)||Ot(e))return t===e;var n=Object.keys(t),r=Object.keys(e);return n.length===r.length&&n.every(function(s){return TF(t[s],e[s])})}function Pre(t){return typeof t!="object"||t===null?!1:"value"in t&&"_event"in t}function kre(t,e){var n=t.exec,r=me(me({},t),{exec:n!==void 0?function(){return n(e.context,e.event,{action:t,state:e,_event:e._event})}:void 0});return r}var $s=(function(){function t(e){var n=this,r;this.actions=[],this.activities=jk,this.meta={},this.events=[],this.value=e.value,this.context=e.context,this._event=e._event,this._sessionid=e._sessionid,this.event=this._event.data,this.historyValue=e.historyValue,this.history=e.history,this.actions=e.actions||[],this.activities=e.activities||jk,this.meta=Mre(e.configuration),this.events=e.events||[],this.matches=this.matches.bind(this),this.toStrings=this.toStrings.bind(this),this.configuration=e.configuration,this.transitions=e.transitions,this.children=e.children,this.done=!!e.done,this.tags=(r=Array.isArray(e.tags)?new Set(e.tags):e.tags)!==null&&r!==void 0?r:new Set,this.machine=e.machine,Object.defineProperty(this,"nextEvents",{get:function(){return Nre(n.configuration)}})}return t.from=function(e,n){if(e instanceof t)return e.context!==n?new t({value:e.value,context:n,_event:e._event,_sessionid:null,historyValue:e.historyValue,history:e.history,actions:[],activities:e.activities,events:[],configuration:[],transitions:[],children:{}}):e;var r=kl;return new t({value:e,context:n,_event:r,_sessionid:null,historyValue:void 0,history:void 0,actions:[],activities:void 0,events:[],configuration:[],transitions:[],children:{}})},t.create=function(e){return new t(e)},t.inert=function(e,n){if(e instanceof t){if(!e.actions.length)return e;var r=kl;return new t({value:e.value,context:n,_event:r,_sessionid:null,historyValue:e.historyValue,history:e.history,activities:e.activities,configuration:e.configuration,transitions:[],children:{}})}return t.from(e,n)},t.prototype.toStrings=function(e,n){var r=this;if(e===void 0&&(e=this.value),n===void 0&&(n="."),Ot(e))return[e];var s=Object.keys(e);return s.concat.apply(s,Jt([],At(s.map(function(o){return r.toStrings(e[o],n).map(function(a){return o+n+a})})),!1))},t.prototype.toJSON=function(){var e=this;e.configuration,e.transitions;var n=e.tags;e.machine;var r=_T(e,["configuration","transitions","tags","machine"]);return me(me({},r),{tags:Array.from(n)})},t.prototype.matches=function(e){return IT(e,this.value)},t.prototype.hasTag=function(e){return this.tags.has(e)},t.prototype.can=function(e){var n;yre(!!this.machine);var r=(n=this.machine)===null||n===void 0?void 0:n.getTransitionData(this,e);return!!r?.transitions.length&&r.transitions.some(function(s){return s.target!==void 0||s.actions.length})},t})(),Dre={deferEvents:!1},Wk=(function(){function t(e){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=me(me({},Dre),e)}return t.prototype.initialize=function(e){if(this.initialized=!0,e){if(!this.options.deferEvents){this.schedule(e);return}this.process(e)}this.flushEvents()},t.prototype.schedule=function(e){if(!this.initialized||this.processingEvent){this.queue.push(e);return}if(this.queue.length!==0)throw new Error("Event queue should be empty when it is not processing events");this.process(e),this.flushEvents()},t.prototype.clear=function(){this.queue=[]},t.prototype.flushEvents=function(){for(var e=this.queue.shift();e;)this.process(e),e=this.queue.shift()},t.prototype.process=function(e){this.processingEvent=!0;try{e()}catch(n){throw this.clear(),n}finally{this.processingEvent=!1}},t})(),JE=new Map,Lre=0,Mf={bookId:function(){return"x:".concat(Lre++)},register:function(t,e){return JE.set(t,e),t},get:function(t){return JE.get(t)},free:function(t){JE.delete(t)}};function NT(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global}function Ure(){var t=NT();if(t&&"__xstate__"in t)return t.__xstate__}function Fre(t){if(NT()){var e=Ure();e&&e.register(t)}}function zre(t,e){e===void 0&&(e={});var n=t.initialState,r=new Set,s=[],o=!1,a=function(){if(!o){for(o=!0;s.length>0;){var f=s.shift();n=t.transition(n,f,c),r.forEach(function(h){return h.next(n)})}o=!1}},u=Ire({id:e.id,send:function(f){s.push(f),a()},getSnapshot:function(){return n},subscribe:function(f,h,g){var m=hh(f,h,g);return r.add(m),m.next(n),{unsubscribe:function(){r.delete(m)}}}}),c={parent:e.parent,self:u,id:e.id||"anonymous",observers:r};return n=t.start?t.start(c):n,u}var h_={sync:!1,autoForward:!1},Pn;(function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"})(Pn||(Pn={}));var jre=(function(){function t(e,n){n===void 0&&(n=t.defaultOptions);var r=this;this.machine=e,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=Pn.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(h,g){if(vd(h))return r.batch(h),r.state;var m=nr(Qy(h,g));if(r.status===Pn.Stopped)return r.state;if(r.status!==Pn.Running&&!r.options.deferEvents)throw new Error('Event "'.concat(m.name,'" was sent to uninitialized service "').concat(r.machine.id,`". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.
154
+ Event: `).concat(JSON.stringify(m.data)));return r.scheduler.schedule(function(){r.forward(m);var y=r._nextState(m);r.update(y,m)}),r._state},this.sendTo=function(h,g,m){var y=r.parent&&(g===Wl.Parent||r.parent.id===g),S=y?r.parent:Ot(g)?g===Wl.Internal?r:r.children.get(g)||Mf.get(g):Sre(g)?g:void 0;if(!S){if(!y)throw new Error("Unable to send event to child '".concat(g,"' from service '").concat(r.id,"'."));return}if("machine"in S){if(r.status!==Pn.Stopped||r.parent!==S||r.state.done){var E=me(me({},h),{name:h.name===are?"".concat(Ac(r.id)):h.name,origin:r.sessionId});!m&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([S,E]):S.send(E)}}else!m&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([S,h.data]):S.send(h.data)},this._exec=function(h,g,m,y){y===void 0&&(y=r.machine.options.actions);var S=h.exec||Mv(h.type,y),E=Nt(S)?S:S?S.exec:h.exec;if(E)try{return E(g,m.data,r.machine.config.predictableActionArguments?{action:h,_event:m}:{action:h,state:r.state,_event:m})}catch(K){throw r.parent&&r.parent.send({type:"xstate.error",data:K}),K}switch(h.type){case lp:{var C=h;r.defer(C);break}case Xy:var w=h;if(typeof w.delay=="number"){r.defer(w);return}else w.to?r.sendTo(w._event,w.to,m===kl):r.send(w._event);break;case eF:r.cancel(h.sendId);break;case a_:{if(r.status!==Pn.Running)return;var x=h.activity;if(!r.machine.config.predictableActionArguments&&!r.state.activities[x.id||x.type])break;if(x.type===Dt.Invoke){var T=lF(x.src),R=r.machine.options.services?r.machine.options.services[T.type]:void 0,M=x.id,N=x.data,O="autoForward"in x?x.autoForward:!!x.forward;if(!R)return;var k=N?Nv(N,g,m):void 0;if(typeof R=="string")return;var F=Nt(R)?R(g,m.data,{data:k,src:T,meta:x.meta}):R;if(!F)return;var $=void 0;qc(F)&&(F=k?F.withContext(k):F,$={autoForward:O}),r.spawn(F,M,$)}else r.spawnActivity(x);break}case AT:{r.stopChild(h.activity.id);break}case tF:var D=h,z=D.label,q=D.value;z?r.logger(z,q):r.logger(q);break}};var s=me(me({},t.defaultOptions),n),o=s.clock,a=s.logger,u=s.parent,c=s.id,f=c!==void 0?c:e.id;this.id=f,this.logger=a,this.clock=o,this.parent=u,this.options=s,this.scheduler=new Wk({deferEvents:this.options.deferEvents}),this.sessionId=Mf.bookId()}return Object.defineProperty(t.prototype,"initialState",{get:function(){var e=this;return this._initialState?this._initialState:bc(this,function(){return e._initialState=e.machine.initialState,e._initialState})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),t.prototype.execute=function(e,n){var r,s;try{for(var o=ht(e.actions),a=o.next();!a.done;a=o.next()){var u=a.value;this.exec(u,e,n)}}catch(c){r={error:c}}finally{try{a&&!a.done&&(s=o.return)&&s.call(o)}finally{if(r)throw r.error}}},t.prototype.update=function(e,n){var r,s,o,a,u,c,f,h,g=this;if(e._sessionid=this.sessionId,this._state=e,(!this.machine.config.predictableActionArguments||n===kl)&&this.options.execute)this.execute(this.state);else for(var m=void 0;m=this._outgoingQueue.shift();)m[0].send(m[1]);if(this.children.forEach(function(F){g.state.children[F.id]=F}),this.devTools&&this.devTools.send(n.data,e),e.event)try{for(var y=ht(this.eventListeners),S=y.next();!S.done;S=y.next()){var E=S.value;E(e.event)}}catch(F){r={error:F}}finally{try{S&&!S.done&&(s=y.return)&&s.call(y)}finally{if(r)throw r.error}}try{for(var C=ht(this.listeners),w=C.next();!w.done;w=C.next()){var E=w.value;E(e,e.event)}}catch(F){o={error:F}}finally{try{w&&!w.done&&(a=C.return)&&a.call(C)}finally{if(o)throw o.error}}try{for(var x=ht(this.contextListeners),T=x.next();!T.done;T=x.next()){var R=T.value;R(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(F){u={error:F}}finally{try{T&&!T.done&&(c=x.return)&&c.call(x)}finally{if(u)throw u.error}}if(this.state.done){var M=e.configuration.find(function(F){return F.type==="final"&&F.parent===g.machine}),N=M&&M.doneData?Nv(M.doneData,e.context,n):void 0;this._doneEvent=ph(this.id,N);try{for(var O=ht(this.doneListeners),k=O.next();!k.done;k=O.next()){var E=k.value;E(this._doneEvent)}}catch(F){f={error:F}}finally{try{k&&!k.done&&(h=O.return)&&h.call(O)}finally{if(f)throw f.error}}this._stop(),this._stopChildren(),Mf.free(this.sessionId)}},t.prototype.onTransition=function(e){return this.listeners.add(e),this.status===Pn.Running&&e(this.state,this.state.event),this},t.prototype.subscribe=function(e,n,r){var s=this,o=hh(e,n,r);this.listeners.add(o.next),this.status!==Pn.NotStarted&&o.next(this.state);var a=function(){s.doneListeners.delete(a),s.stopListeners.delete(a),o.complete()};return this.status===Pn.Stopped?o.complete():(this.onDone(a),this.onStop(a)),{unsubscribe:function(){s.listeners.delete(o.next),s.doneListeners.delete(a),s.stopListeners.delete(a)}}},t.prototype.onEvent=function(e){return this.eventListeners.add(e),this},t.prototype.onSend=function(e){return this.sendListeners.add(e),this},t.prototype.onChange=function(e){return this.contextListeners.add(e),this},t.prototype.onStop=function(e){return this.stopListeners.add(e),this},t.prototype.onDone=function(e){return this.status===Pn.Stopped&&this._doneEvent?e(this._doneEvent):this.doneListeners.add(e),this},t.prototype.off=function(e){return this.listeners.delete(e),this.eventListeners.delete(e),this.sendListeners.delete(e),this.stopListeners.delete(e),this.doneListeners.delete(e),this.contextListeners.delete(e),this},t.prototype.start=function(e){var n=this;if(this.status===Pn.Running)return this;this.machine._init(),Mf.register(this.sessionId,this),this.initialized=!0,this.status=Pn.Running;var r=e===void 0?this.initialState:bc(this,function(){return Pre(e)?n.machine.resolveState(e):n.machine.resolveState($s.from(e,n.machine.context))});return this.options.devTools&&this.attachDev(),this.scheduler.initialize(function(){n.update(r,kl)}),this},t.prototype._stopChildren=function(){this.children.forEach(function(e){Nt(e.stop)&&e.stop()}),this.children.clear()},t.prototype._stop=function(){var e,n,r,s,o,a,u,c,f,h;try{for(var g=ht(this.listeners),m=g.next();!m.done;m=g.next()){var y=m.value;this.listeners.delete(y)}}catch(O){e={error:O}}finally{try{m&&!m.done&&(n=g.return)&&n.call(g)}finally{if(e)throw e.error}}try{for(var S=ht(this.stopListeners),E=S.next();!E.done;E=S.next()){var y=E.value;y(),this.stopListeners.delete(y)}}catch(O){r={error:O}}finally{try{E&&!E.done&&(s=S.return)&&s.call(S)}finally{if(r)throw r.error}}try{for(var C=ht(this.contextListeners),w=C.next();!w.done;w=C.next()){var y=w.value;this.contextListeners.delete(y)}}catch(O){o={error:O}}finally{try{w&&!w.done&&(a=C.return)&&a.call(C)}finally{if(o)throw o.error}}try{for(var x=ht(this.doneListeners),T=x.next();!T.done;T=x.next()){var y=T.value;this.doneListeners.delete(y)}}catch(O){u={error:O}}finally{try{T&&!T.done&&(c=x.return)&&c.call(x)}finally{if(u)throw u.error}}if(!this.initialized)return this;this.initialized=!1,this.status=Pn.Stopped,this._initialState=void 0;try{for(var R=ht(Object.keys(this.delayedEventsMap)),M=R.next();!M.done;M=R.next()){var N=M.value;this.clock.clearTimeout(this.delayedEventsMap[N])}}catch(O){f={error:O}}finally{try{M&&!M.done&&(h=R.return)&&h.call(R)}finally{if(f)throw f.error}}this.scheduler.clear(),this.scheduler=new Wk({deferEvents:this.options.deferEvents})},t.prototype.stop=function(){var e=this,n=this.scheduler;return this._stop(),n.schedule(function(){var r;if(!(!((r=e._state)===null||r===void 0)&&r.done)){var s=nr({type:"xstate.stop"}),o=bc(e,function(){var a=dn(Jt([],At(e.state.configuration),!1).sort(function(g,m){return m.order-g.order}).map(function(g){return ci(g.onExit,e.machine.options.actions)})),u=At(Rh(e.machine,e.state,e.state.context,s,[{type:"exit",actions:a}],e.machine.config.predictableActionArguments?e._exec:void 0,e.machine.config.predictableActionArguments||e.machine.config.preserveActionOrder),2),c=u[0],f=u[1],h=new $s({value:e.state.value,context:f,_event:s,_sessionid:e.sessionId,historyValue:void 0,history:e.state,actions:c.filter(function(g){return!d_(g)}),activities:{},events:[],configuration:[],transitions:[],children:{},done:e.state.done,tags:e.state.tags,machine:e.machine});return h.changed=!0,h});e.update(o,s),e._stopChildren(),Mf.free(e.sessionId)}}),this},t.prototype.batch=function(e){var n=this;if(!(this.status===Pn.NotStarted&&this.options.deferEvents)){if(this.status!==Pn.Running)throw new Error("".concat(e.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.'))}if(e.length){var r=!!this.machine.config.predictableActionArguments&&this._exec;this.scheduler.schedule(function(){var s,o,a=n.state,u=!1,c=[],f=function(y){var S=nr(y);n.forward(S),a=bc(n,function(){return n.machine.transition(a,S,void 0,r||void 0)}),c.push.apply(c,Jt([],At(n.machine.config.predictableActionArguments?a.actions:a.actions.map(function(E){return kre(E,a)})),!1)),u=u||!!a.changed};try{for(var h=ht(e),g=h.next();!g.done;g=h.next()){var m=g.value;f(m)}}catch(y){s={error:y}}finally{try{g&&!g.done&&(o=h.return)&&o.call(h)}finally{if(s)throw s.error}}a.changed=u,a.actions=c,n.update(a,nr(e[e.length-1]))})}},t.prototype.sender=function(e){return this.send.bind(this,e)},t.prototype._nextState=function(e,n){var r=this;n===void 0&&(n=!!this.machine.config.predictableActionArguments&&this._exec);var s=nr(e);if(s.name.indexOf(zk)===0&&!this.state.nextEvents.some(function(a){return a.indexOf(zk)===0}))throw s.data.data;var o=bc(this,function(){return r.machine.transition(r.state,s,void 0,n||void 0)});return o},t.prototype.nextState=function(e){return this._nextState(e,!1)},t.prototype.forward=function(e){var n,r;try{for(var s=ht(this.forwardTo),o=s.next();!o.done;o=s.next()){var a=o.value,u=this.children.get(a);if(!u)throw new Error("Unable to forward event '".concat(e,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(a,"'."));u.send(e)}}catch(c){n={error:c}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}},t.prototype.defer=function(e){var n=this,r=this.clock.setTimeout(function(){"to"in e&&e.to?n.sendTo(e._event,e.to,!0):n.send(e._event)},e.delay);e.id&&(this.delayedEventsMap[e.id]=r)},t.prototype.cancel=function(e){this.clock.clearTimeout(this.delayedEventsMap[e]),delete this.delayedEventsMap[e]},t.prototype.exec=function(e,n,r){r===void 0&&(r=this.machine.options.actions),this._exec(e,n.context,n._event,r)},t.prototype.removeChild=function(e){var n;this.children.delete(e),this.forwardTo.delete(e),(n=this.state)===null||n===void 0||delete n.children[e]},t.prototype.stopChild=function(e){var n=this.children.get(e);n&&(this.removeChild(e),Nt(n.stop)&&n.stop())},t.prototype.spawn=function(e,n,r){if(this.status!==Pn.Running)return OT(e,n);if(Hk(e))return this.spawnPromise(Promise.resolve(e),n);if(Nt(e))return this.spawnCallback(e,n);if(Rre(e))return this.spawnActor(e,n);if(bre(e))return this.spawnObservable(e,n);if(qc(e))return this.spawnMachine(e,me(me({},r),{id:n}));if(gre(e))return this.spawnBehavior(e,n);throw new Error('Unable to spawn entity "'.concat(n,'" of type "').concat(typeof e,'".'))},t.prototype.spawnMachine=function(e,n){var r=this;n===void 0&&(n={});var s=new t(e,me(me({},this.options),{parent:this,id:n.id||e.id})),o=me(me({},h_),n);o.sync&&s.onTransition(function(u){r.send(RT,{state:u,id:s.id})});var a=s;return this.children.set(s.id,a),o.autoForward&&this.forwardTo.add(s.id),s.onDone(function(u){r.removeChild(s.id),r.send(nr(u,{origin:s.id}))}).start(),a},t.prototype.spawnBehavior=function(e,n){var r=zre(e,{id:n,parent:this});return this.children.set(n,r),r},t.prototype.spawnPromise=function(e,n){var r,s=this,o=!1,a;e.then(function(c){o||(a=c,s.removeChild(n),s.send(nr(ph(n,c),{origin:n})))},function(c){if(!o){s.removeChild(n);var f=Ac(n,c);try{s.send(nr(f,{origin:n}))}catch{s.devTools&&s.devTools.send(f,s.state),s.machine.strict&&s.stop()}}});var u=(r={id:n,send:function(){},subscribe:function(c,f,h){var g=hh(c,f,h),m=!1;return e.then(function(y){m||(g.next(y),!m&&g.complete())},function(y){m||g.error(y)}),{unsubscribe:function(){return m=!0}}},stop:function(){o=!0},toJSON:function(){return{id:n}},getSnapshot:function(){return a}},r[xa]=function(){return this},r);return this.children.set(n,u),u},t.prototype.spawnCallback=function(e,n){var r,s=this,o=!1,a=new Set,u=new Set,c,f=function(m){c=m,u.forEach(function(y){return y(m)}),!o&&s.send(nr(m,{origin:n}))},h;try{h=e(f,function(m){a.add(m)})}catch(m){this.send(Ac(n,m))}if(Hk(h))return this.spawnPromise(h,n);var g=(r={id:n,send:function(m){return a.forEach(function(y){return y(m)})},subscribe:function(m){var y=hh(m);return u.add(y.next),{unsubscribe:function(){u.delete(y.next)}}},stop:function(){o=!0,Nt(h)&&h()},toJSON:function(){return{id:n}},getSnapshot:function(){return c}},r[xa]=function(){return this},r);return this.children.set(n,g),g},t.prototype.spawnObservable=function(e,n){var r,s=this,o,a=e.subscribe(function(c){o=c,s.send(nr(c,{origin:n}))},function(c){s.removeChild(n),s.send(nr(Ac(n,c),{origin:n}))},function(){s.removeChild(n),s.send(nr(ph(n),{origin:n}))}),u=(r={id:n,send:function(){},subscribe:function(c,f,h){return e.subscribe(c,f,h)},stop:function(){return a.unsubscribe()},getSnapshot:function(){return o},toJSON:function(){return{id:n}}},r[xa]=function(){return this},r);return this.children.set(n,u),u},t.prototype.spawnActor=function(e,n){return this.children.set(n,e),e},t.prototype.spawnActivity=function(e){var n=this.machine.options&&this.machine.options.activities?this.machine.options.activities[e.type]:void 0;if(n){var r=n(this.state.context,e);this.spawnEffect(e.id,r)}},t.prototype.spawnEffect=function(e,n){var r;this.children.set(e,(r={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:n||void 0,getSnapshot:function(){},toJSON:function(){return{id:e}}},r[xa]=function(){return this},r))},t.prototype.attachDev=function(){var e=NT();if(this.options.devTools&&e){if(e.__REDUX_DEVTOOLS_EXTENSION__){var n=typeof this.options.devTools=="object"?this.options.devTools:void 0;this.devTools=e.__REDUX_DEVTOOLS_EXTENSION__.connect(me(me({name:this.id,autoPause:!0,stateSanitizer:function(r){return{value:r.value,context:r.context,actions:r.actions}}},n),{features:me({jump:!1,skip:!1},n?n.features:void 0)}),this.machine),this.devTools.init(this.state)}Fre(this)}},t.prototype.toJSON=function(){return{id:this.id}},t.prototype[xa]=function(){return this},t.prototype.getSnapshot=function(){return this.status===Pn.NotStarted?this.initialState:this._state},t.defaultOptions={execute:!0,deferEvents:!0,clock:{setTimeout:function(e,n){return setTimeout(e,n)},clearTimeout:function(e){return clearTimeout(e)}},logger:console.log.bind(console),devTools:!1},t.interpret=RF,t})(),Bre=function(t){return Ot(t)?me(me({},h_),{name:t}):me(me(me({},h_),{name:Ere()}),t)};function Pf(t,e){var n=Bre(e);return _re(function(r){return r?r.spawn(t,n.name,n):OT(t,n.name)})}function RF(t,e){var n=new jre(t,e);return n}function Hre(t){if(typeof t=="string"){var e={type:t};return e.toString=function(){return t},e}return t}function Qg(t){return me(me({type:l_},t),{toJSON:function(){t.onDone,t.onError;var e=_T(t,["onDone","onError"]);return me(me({},e),{type:l_,src:Hre(t.src)})}})}var Jg="",p_="#",eC="*",oc={},ic=function(t){return t[0]===p_},$re=function(){return{actions:{},guards:{},services:{},activities:{},delays:{}}},qre=(function(){function t(e,n,r,s){r===void 0&&(r="context"in e?e.context:void 0);var o=this,a;this.config=e,this._context=r,this.order=-1,this.__xstatenode=!0,this.__cache={events:void 0,relativeValue:new Map,initialStateValue:void 0,initialState:void 0,on:void 0,transitions:void 0,candidates:{},delayedTransitions:void 0},this.idMap={},this.tags=[],this.options=Object.assign($re(),n),this.parent=s?.parent,this.key=this.config.key||s?.key||this.config.id||"(machine)",this.machine=this.parent?this.parent.machine:this,this.path=this.parent?this.parent.path.concat(this.key):[],this.delimiter=this.config.delimiter||(this.parent?this.parent.delimiter:nF),this.id=this.config.id||Jt([this.machine.key],At(this.path),!1).join(this.delimiter),this.version=this.parent?this.parent.version:this.config.version,this.type=this.config.type||(this.config.parallel?"parallel":this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.schema=this.parent?this.machine.schema:(a=this.config.schema)!==null&&a!==void 0?a:{},this.description=this.config.description,this.initial=this.config.initial,this.states=this.config.states?th(this.config.states,function(f,h){var g,m=new t(f,{},void 0,{parent:o,key:h});return Object.assign(o.idMap,me((g={},g[m.id]=m,g),m.idMap)),m}):oc;var u=0;function c(f){var h,g;f.order=u++;try{for(var m=ht(xF(f)),y=m.next();!y.done;y=m.next()){var S=y.value;c(S)}}catch(E){h={error:E}}finally{try{y&&!y.done&&(g=m.return)&&g.call(m)}finally{if(h)throw h.error}}}c(this),this.history=this.config.history===!0?"shallow":this.config.history||!1,this._transient=!!this.config.always||(this.config.on?Array.isArray(this.config.on)?this.config.on.some(function(f){var h=f.event;return h===Jg}):Jg in this.config.on:!1),this.strict=!!this.config.strict,this.onEntry=Hs(this.config.entry||this.config.onEntry).map(function(f){return Wc(f)}),this.onExit=Hs(this.config.exit||this.config.onExit).map(function(f){return Wc(f)}),this.meta=this.config.meta,this.doneData=this.type==="final"?this.config.data:void 0,this.invoke=Hs(this.config.invoke).map(function(f,h){var g,m;if(qc(f)){var y=Xg(o.id,h);return o.machine.options.services=me((g={},g[y]=f,g),o.machine.options.services),Qg({src:y,id:y})}else if(Ot(f.src)){var y=f.id||Xg(o.id,h);return Qg(me(me({},f),{id:y,src:f.src}))}else if(qc(f.src)||Nt(f.src)){var y=f.id||Xg(o.id,h);return o.machine.options.services=me((m={},m[y]=f.src,m),o.machine.options.services),Qg(me(me({id:y},f),{src:y}))}else{var S=f.src;return Qg(me(me({id:Xg(o.id,h)},f),{src:S}))}}),this.activities=Hs(this.config.activities).concat(this.invoke).map(function(f){return Jy(f)}),this.transition=this.transition.bind(this),this.tags=Hs(this.config.tags)}return t.prototype._init=function(){this.__cache.transitions||_F(this).forEach(function(e){return e.on})},t.prototype.withConfig=function(e,n){var r=this.options,s=r.actions,o=r.activities,a=r.guards,u=r.services,c=r.delays;return new t(this.config,{actions:me(me({},s),e.actions),activities:me(me({},o),e.activities),guards:me(me({},a),e.guards),services:me(me({},u),e.services),delays:me(me({},c),e.delays)},n??this.context)},t.prototype.withContext=function(e){return new t(this.config,this.options,e)},Object.defineProperty(t.prototype,"context",{get:function(){return Nt(this._context)?this._context():this._context},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"definition",{get:function(){return{id:this.id,key:this.key,version:this.version,context:this.context,type:this.type,initial:this.initial,history:this.history,states:th(this.states,function(e){return e.definition}),on:this.on,transitions:this.transitions,entry:this.onEntry,exit:this.onExit,activities:this.activities||[],meta:this.meta,order:this.order||-1,data:this.doneData,invoke:this.invoke,description:this.description,tags:this.tags}},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){return this.definition},Object.defineProperty(t.prototype,"on",{get:function(){if(this.__cache.on)return this.__cache.on;var e=this.transitions;return this.__cache.on=e.reduce(function(n,r){return n[r.eventType]=n[r.eventType]||[],n[r.eventType].push(r),n},{})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"after",{get:function(){return this.__cache.delayedTransitions||(this.__cache.delayedTransitions=this.getDelayedTransitions(),this.__cache.delayedTransitions)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"transitions",{get:function(){return this.__cache.transitions||(this.__cache.transitions=this.formatTransitions(),this.__cache.transitions)},enumerable:!1,configurable:!0}),t.prototype.getCandidates=function(e){if(this.__cache.candidates[e])return this.__cache.candidates[e];var n=e===Jg,r=this.transitions.filter(function(s){var o=s.eventType===e;return n?o:o||s.eventType===eC});return this.__cache.candidates[e]=r,r},t.prototype.getDelayedTransitions=function(){var e=this,n=this.config.after;if(!n)return[];var r=function(o,a){var u=Nt(o)?"".concat(e.id,":delay[").concat(a,"]"):o,c=SF(u,e.id);return e.onEntry.push(eb(c,{delay:o})),e.onExit.push(gF(c)),c},s=vd(n)?n.map(function(o,a){var u=r(o.delay,a);return me(me({},o),{event:u})}):dn(Object.keys(n).map(function(o,a){var u=n[o],c=Ot(u)?{target:u}:u,f=isNaN(+o)?o:+o,h=r(f,a);return Hs(c).map(function(g){return me(me({},g),{event:h,delay:f})})}));return s.map(function(o){var a=o.delay;return me(me({},e.formatTransition(o)),{delay:a})})},t.prototype.getStateNodes=function(e){var n,r=this;if(!e)return[];var s=e instanceof $s?e.value:fh(e,this.delimiter);if(Ot(s)){var o=this.getStateNode(s).initial;return o!==void 0?this.getStateNodes((n={},n[s]=o,n)):[this,this.states[s]]}var a=Object.keys(s),u=[this];return u.push.apply(u,Jt([],At(dn(a.map(function(c){return r.getStateNode(c).getStateNodes(s[c])}))),!1)),u},t.prototype.handles=function(e){var n=rF(e);return this.events.includes(n)},t.prototype.resolveState=function(e){var n=e instanceof $s?e:$s.create(e),r=Array.from(rh([],this.getStateNodes(n.value)));return new $s(me(me({},n),{value:this.resolve(n.value),configuration:r,done:sv(r,this),tags:qk(r),machine:this.machine}))},t.prototype.transitionLeafNode=function(e,n,r){var s=this.getStateNode(e),o=s.next(n,r);return!o||!o.transitions.length?this.next(n,r):o},t.prototype.transitionCompoundNode=function(e,n,r){var s=Object.keys(e),o=this.getStateNode(s[0]),a=o._transition(e[s[0]],n,r);return!a||!a.transitions.length?this.next(n,r):a},t.prototype.transitionParallelNode=function(e,n,r){var s,o,a={};try{for(var u=ht(Object.keys(e)),c=u.next();!c.done;c=u.next()){var f=c.value,h=e[f];if(h){var g=this.getStateNode(f),m=g._transition(h,n,r);m&&(a[f]=m)}}}catch(w){s={error:w}}finally{try{c&&!c.done&&(o=u.return)&&o.call(u)}finally{if(s)throw s.error}}var y=Object.keys(a).map(function(w){return a[w]}),S=dn(y.map(function(w){return w.transitions})),E=y.some(function(w){return w.transitions.length>0});if(!E)return this.next(n,r);var C=dn(Object.keys(a).map(function(w){return a[w].configuration}));return{transitions:S,exitSet:dn(y.map(function(w){return w.exitSet})),configuration:C,source:n,actions:dn(Object.keys(a).map(function(w){return a[w].actions}))}},t.prototype._transition=function(e,n,r){return Ot(e)?this.transitionLeafNode(e,n,r):Object.keys(e).length===1?this.transitionCompoundNode(e,n,r):this.transitionParallelNode(e,n,r)},t.prototype.getTransitionData=function(e,n){return this._transition(e.value,e,nr(n))},t.prototype.next=function(e,n){var r,s,o=this,a=n.name,u=[],c=[],f;try{for(var h=ht(this.getCandidates(a)),g=h.next();!g.done;g=h.next()){var m=g.value,y=m.cond,S=m.in,E=e.context,C=S?Ot(S)&&ic(S)?e.matches(fh(this.getStateNodeById(S).path,this.delimiter)):IT(fh(S,this.delimiter),fre(this.path.slice(0,-2))(e.value)):!0,w=!1;try{w=!y||aF(this.machine,y,E,n,e)}catch(R){throw new Error("Unable to evaluate guard '".concat(y.name||y.type,"' in transition for event '").concat(a,"' in state node '").concat(this.id,`':
155
+ `).concat(R.message))}if(w&&C){m.target!==void 0&&(c=m.target),u.push.apply(u,Jt([],At(m.actions),!1)),f=m;break}}}catch(R){r={error:R}}finally{try{g&&!g.done&&(s=h.return)&&s.call(h)}finally{if(r)throw r.error}}if(f){if(!c.length)return{transitions:[f],exitSet:[],configuration:e.value?[this]:[],source:e,actions:u};var x=dn(c.map(function(R){return o.getRelativeStateNodes(R,e.historyValue)})),T=!!f.internal;return{transitions:[f],exitSet:T?[]:dn(c.map(function(R){return o.getPotentiallyReenteringNodes(R)})),configuration:x,source:e,actions:u}}},t.prototype.getPotentiallyReenteringNodes=function(e){if(this.order<e.order)return[this];for(var n=[],r=this,s=e;r&&r!==s;)n.push(r),r=r.parent;return r!==s?[]:(n.push(s),n)},t.prototype.getActions=function(e,n,r,s,o,a,u){var c,f,h,g,m=this,y=a?rh([],this.getStateNodes(a.value)):[],S=new Set;try{for(var E=ht(Array.from(e).sort(function(D,z){return D.order-z.order})),C=E.next();!C.done;C=E.next()){var w=C.value;(!sh(y,w)||sh(r.exitSet,w)||w.parent&&S.has(w.parent))&&S.add(w)}}catch(D){c={error:D}}finally{try{C&&!C.done&&(f=E.return)&&f.call(E)}finally{if(c)throw c.error}}try{for(var x=ht(y),T=x.next();!T.done;T=x.next()){var w=T.value;(!sh(e,w)||sh(r.exitSet,w.parent))&&r.exitSet.push(w)}}catch(D){h={error:D}}finally{try{T&&!T.done&&(g=x.return)&&g.call(x)}finally{if(h)throw h.error}}r.exitSet.sort(function(D,z){return z.order-D.order});var R=Array.from(S).sort(function(D,z){return D.order-z.order}),M=new Set(r.exitSet),N=dn(R.map(function(D){var z=[];if(D.type!=="final")return z;var q=D.parent;if(!q.parent)return z;z.push(nh(D.id,D.doneData),nh(q.id,D.doneData?Nv(D.doneData,s,o):void 0));var K=q.parent;return K.type==="parallel"&&Ih(K).every(function(Y){return sv(r.configuration,Y)})&&z.push(nh(K.id)),z})),O=R.map(function(D){var z=D.onEntry,q=D.activities.map(function(K){return mF(K)});return{type:"entry",actions:ci(u?Jt(Jt([],At(z),!1),At(q),!1):Jt(Jt([],At(q),!1),At(z),!1),m.machine.options.actions)}}).concat({type:"state_done",actions:N.map(function(D){return uF(D)})}),k=Array.from(M).map(function(D){return{type:"exit",actions:ci(Jt(Jt([],At(D.onExit),!1),At(D.activities.map(function(z){return vF(z)})),!1),m.machine.options.actions)}}),F=k.concat({type:"transition",actions:ci(r.actions,this.machine.options.actions)}).concat(O);if(n){var $=ci(dn(Jt([],At(e),!1).sort(function(D,z){return z.order-D.order}).map(function(D){return D.onExit})),this.machine.options.actions).filter(function(D){return!d_(D)});return F.concat({type:"stop",actions:$})}return F},t.prototype.transition=function(e,n,r,s){e===void 0&&(e=this.initialState);var o=nr(n),a;if(e instanceof $s)a=r===void 0?e:this.resolveState($s.from(e,r));else{var u=Ot(e)?this.resolve(Ov(this.getResolvedPath(e))):this.resolve(e),c=r??this.machine.context;a=this.resolveState($s.from(u,c))}if(this.strict&&!this.events.includes(o.name)&&!pre(o.name))throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(o.name,"'"));var f=this._transition(a.value,a,o)||{transitions:[],configuration:[],exitSet:[],source:a,actions:[]},h=rh([],this.getStateNodes(a.value)),g=f.configuration.length?rh(h,f.configuration):h;return f.configuration=Jt([],At(g),!1),this.resolveTransition(f,a,a.context,s,o)},t.prototype.resolveRaisedTransition=function(e,n,r,s){var o,a=e.actions;return e=this.transition(e,n,void 0,s),e._event=r,e.event=r.data,(o=e.actions).unshift.apply(o,Jt([],At(a),!1)),e},t.prototype.resolveTransition=function(e,n,r,s,o){var a,u,c,f,h=this;o===void 0&&(o=kl);var g=e.configuration,m=!n||e.transitions.length>0,y=m?e.configuration:n?n.configuration:[],S=sv(y,this),E=m?Ore(this.machine,g):void 0,C=n?n.historyValue?n.historyValue:e.source?this.machine.historyValue(n.value):void 0:void 0,w=this.getActions(new Set(y),S,e,r,o,n,s),x=n?me({},n.activities):{};try{for(var T=ht(w),R=T.next();!R.done;R=T.next()){var M=R.value;try{for(var N=(c=void 0,ht(M.actions)),O=N.next();!O.done;O=N.next()){var k=O.value;k.type===a_?x[k.activity.id||k.activity.type]=k:k.type===AT&&(x[k.activity.id||k.activity.type]=!1)}}catch(ee){c={error:ee}}finally{try{O&&!O.done&&(f=N.return)&&f.call(N)}finally{if(c)throw c.error}}}}catch(ee){a={error:ee}}finally{try{R&&!R.done&&(u=T.return)&&u.call(T)}finally{if(a)throw a.error}}var F=At(Rh(this,n,r,o,w,s,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),$=F[0],D=F[1],z=At(mre($,d_),2),q=z[0],K=z[1],Y=$.filter(function(ee){var oe;return ee.type===a_&&((oe=ee.activity)===null||oe===void 0?void 0:oe.type)===l_}),H=Y.reduce(function(ee,oe){return ee[oe.activity.id]=Are(oe.activity,h.machine,D,o),ee},n?me({},n.children):{}),te=new $s({value:E||n.value,context:D,_event:o,_sessionid:n?n._sessionid:null,historyValue:E?C?vre(C,E):void 0:n?n.historyValue:void 0,history:!E||e.source?n:void 0,actions:E?K:[],activities:E?x:n?n.activities:{},events:[],configuration:y,transitions:e.transitions,children:H,done:S,tags:qk(y),machine:this}),fe=r!==D;te.changed=o.name===RT||fe;var de=te.history;de&&delete de.history;var Ae=!S&&(this._transient||g.some(function(ee){return ee._transient}));if(!m&&(!Ae||o.name===Jg))return te;var L=te;if(!S)for(Ae&&(L=this.resolveRaisedTransition(L,{type:ore},o,s));q.length;){var G=q.shift();L=this.resolveRaisedTransition(L,G._event,o,s)}var Z=L.changed||(de?!!L.actions.length||fe||typeof de.value!=typeof L.value||!TF(L.value,de.value):void 0);return L.changed=Z,L.history=de,L},t.prototype.getStateNode=function(e){if(ic(e))return this.machine.getStateNodeById(e);if(!this.states)throw new Error("Unable to retrieve child state '".concat(e,"' from '").concat(this.id,"'; no child states exist."));var n=this.states[e];if(!n)throw new Error("Child state '".concat(e,"' does not exist on '").concat(this.id,"'"));return n},t.prototype.getStateNodeById=function(e){var n=ic(e)?e.slice(p_.length):e;if(n===this.id)return this;var r=this.machine.idMap[n];if(!r)throw new Error("Child state node '#".concat(n,"' does not exist on machine '").concat(this.id,"'"));return r},t.prototype.getStateNodeByPath=function(e){if(typeof e=="string"&&ic(e))try{return this.getStateNodeById(e.slice(1))}catch{}for(var n=c_(e,this.delimiter).slice(),r=this;n.length;){var s=n.shift();if(!s.length)break;r=r.getStateNode(s)}return r},t.prototype.resolve=function(e){var n,r=this;if(!e)return this.initialStateValue||oc;switch(this.type){case"parallel":return th(this.initialStateValue,function(o,a){return o?r.getStateNode(a).resolve(e[a]||o):oc});case"compound":if(Ot(e)){var s=this.getStateNode(e);return s.type==="parallel"||s.type==="compound"?(n={},n[e]=s.initialStateValue,n):e}return Object.keys(e).length?th(e,function(o,a){return o?r.getStateNode(a).resolve(o):oc}):this.initialStateValue||{};default:return e||oc}},t.prototype.getResolvedPath=function(e){if(ic(e)){var n=this.machine.idMap[e.slice(p_.length)];if(!n)throw new Error("Unable to find state node '".concat(e,"'"));return n.path}return c_(e,this.delimiter)},Object.defineProperty(t.prototype,"initialStateValue",{get:function(){var e;if(this.__cache.initialStateValue)return this.__cache.initialStateValue;var n;if(this.type==="parallel")n=Bk(this.states,function(r){return r.initialStateValue||oc},function(r){return r.type!=="history"});else if(this.initial!==void 0){if(!this.states[this.initial])throw new Error("Initial state '".concat(this.initial,"' not found on '").concat(this.key,"'"));n=kv(this.states[this.initial])?this.initial:(e={},e[this.initial]=this.states[this.initial].initialStateValue,e)}else n={};return this.__cache.initialStateValue=n,this.__cache.initialStateValue},enumerable:!1,configurable:!0}),t.prototype.getInitialState=function(e,n){this._init();var r=this.getStateNodes(e);return this.resolveTransition({configuration:r,exitSet:[],transitions:[],source:void 0,actions:[]},void 0,n??this.machine.context,void 0)},Object.defineProperty(t.prototype,"initialState",{get:function(){var e=this.initialStateValue;if(!e)throw new Error("Cannot retrieve initial state from simple state '".concat(this.id,"'."));return this.getInitialState(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"target",{get:function(){var e;if(this.type==="history"){var n=this.config;Ot(n.target)?e=ic(n.target)?Ov(this.machine.getStateNodeById(n.target).path.slice(this.path.length-1)):n.target:e=n.target}return e},enumerable:!1,configurable:!0}),t.prototype.getRelativeStateNodes=function(e,n,r){return r===void 0&&(r=!0),r?e.type==="history"?e.resolveHistory(n):e.initialStateNodes:[e]},Object.defineProperty(t.prototype,"initialStateNodes",{get:function(){var e=this;if(kv(this))return[this];if(this.type==="compound"&&!this.initial)return[this];var n=rv(this.initialStateValue);return dn(n.map(function(r){return e.getFromRelativePath(r)}))},enumerable:!1,configurable:!0}),t.prototype.getFromRelativePath=function(e){if(!e.length)return[this];var n=At(e),r=n[0],s=n.slice(1);if(!this.states)throw new Error("Cannot retrieve subPath '".concat(r,"' from node with no states"));var o=this.getStateNode(r);if(o.type==="history")return o.resolveHistory();if(!this.states[r])throw new Error("Child state '".concat(r,"' does not exist on '").concat(this.id,"'"));return this.states[r].getFromRelativePath(s)},t.prototype.historyValue=function(e){if(Object.keys(this.states).length)return{current:e||this.initialStateValue,states:Bk(this.states,function(n,r){if(!e)return n.historyValue();var s=Ot(e)?void 0:e[r];return n.historyValue(s||n.initialStateValue)},function(n){return!n.history})}},t.prototype.resolveHistory=function(e){var n=this;if(this.type!=="history")return[this];var r=this.parent;if(!e){var s=this.target;return s?dn(rv(s).map(function(a){return r.getFromRelativePath(a)})):r.initialStateNodes}var o=hre(r.path,"states")(e).current;return Ot(o)?[r.getStateNode(o)]:dn(rv(o).map(function(a){return n.history==="deep"?r.getFromRelativePath(a):[r.states[a[0]]]}))},Object.defineProperty(t.prototype,"stateIds",{get:function(){var e=this,n=dn(Object.keys(this.states).map(function(r){return e.states[r].stateIds}));return[this.id].concat(n)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"events",{get:function(){var e,n,r,s;if(this.__cache.events)return this.__cache.events;var o=this.states,a=new Set(this.ownEvents);if(o)try{for(var u=ht(Object.keys(o)),c=u.next();!c.done;c=u.next()){var f=c.value,h=o[f];if(h.states)try{for(var g=(r=void 0,ht(h.events)),m=g.next();!m.done;m=g.next()){var y=m.value;a.add("".concat(y))}}catch(S){r={error:S}}finally{try{m&&!m.done&&(s=g.return)&&s.call(g)}finally{if(r)throw r.error}}}}catch(S){e={error:S}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(e)throw e.error}}return this.__cache.events=Array.from(a)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ownEvents",{get:function(){var e=new Set(this.transitions.filter(function(n){return!(!n.target&&!n.actions.length&&n.internal)}).map(function(n){return n.eventType}));return Array.from(e)},enumerable:!1,configurable:!0}),t.prototype.resolveTarget=function(e){var n=this;if(e!==void 0)return e.map(function(r){if(!Ot(r))return r;var s=r[0]===n.delimiter;if(s&&!n.parent)return n.getStateNodeByPath(r.slice(1));var o=s?n.key+r:r;if(n.parent)try{var a=n.parent.getStateNodeByPath(o);return a}catch(u){throw new Error("Invalid transition definition for state node '".concat(n.id,`':
156
+ `).concat(u.message))}else return n.getStateNodeByPath(o)})},t.prototype.formatTransition=function(e){var n=this,r=Cre(e.target),s="internal"in e?e.internal:r?r.some(function(c){return Ot(c)&&c[0]===n.delimiter}):!0,o=this.machine.options.guards,a=this.resolveTarget(r),u=me(me({},e),{actions:ci(Hs(e.actions)),cond:iF(e.cond,o),target:a,source:this,internal:s,eventType:e.event,toJSON:function(){return me(me({},u),{target:u.target?u.target.map(function(c){return"#".concat(c.id)}):void 0,source:"#".concat(n.id)})}});return u},t.prototype.formatTransitions=function(){var e,n,r=this,s;if(!this.config.on)s=[];else if(Array.isArray(this.config.on))s=this.config.on;else{var o=this.config.on,a=eC,u=o[a],c=u===void 0?[]:u,f=_T(o,[typeof a=="symbol"?a:a+""]);s=dn(Object.keys(f).map(function(x){var T=sc(x,f[x]);return T}).concat(sc(eC,c)))}var h=this.config.always?sc("",this.config.always):[],g=this.config.onDone?sc(String(nh(this.id)),this.config.onDone):[],m=dn(this.invoke.map(function(x){var T=[];return x.onDone&&T.push.apply(T,Jt([],At(sc(String(ph(x.id)),x.onDone)),!1)),x.onError&&T.push.apply(T,Jt([],At(sc(String(Ac(x.id)),x.onError)),!1)),T})),y=this.after,S=dn(Jt(Jt(Jt(Jt([],At(g),!1),At(m),!1),At(s),!1),At(h),!1).map(function(x){return Hs(x).map(function(T){return r.formatTransition(T)})}));try{for(var E=ht(y),C=E.next();!C.done;C=E.next()){var w=C.value;S.push(w)}}catch(x){e={error:x}}finally{try{C&&!C.done&&(n=E.return)&&n.call(E)}finally{if(e)throw e.error}}return S},t})();function yd(t,e){return new qre(t,e)}var ni=bF,tb=hF,Wre=EF,Vre=A.useLayoutEffect;function Vk(t){var e=A.useRef();return e.current||(e.current={v:t()}),e.current.v}var Dv=function(){return Dv=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s])}return t},Dv.apply(this,arguments)},Gre=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(t);s<r.length;s++)e.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(t,r[s])&&(n[r[s]]=t[r[s]]);return n},Kre=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),s,o=[],a;try{for(;(e===void 0||e-- >0)&&!(s=r.next()).done;)o.push(s.value)}catch(u){a={error:u}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function Yre(t,e){var n=Vk(function(){return typeof t=="function"?t():t}),r=e.context,s=e.guards,o=e.actions,a=e.activities,u=e.services,c=e.delays;e.state;var f=Gre(e,["context","guards","actions","activities","services","delays","state"]),h=Vk(function(){var g={context:r,guards:s,actions:o,activities:a,services:u,delays:c},m=n.withConfig(g,function(){return Dv(Dv({},n.context),r)});return RF(m,f)});return Vre(function(){Object.assign(h.machine.options.actions,o),Object.assign(h.machine.options.guards,s),Object.assign(h.machine.options.activities,a),Object.assign(h.machine.options.services,u),Object.assign(h.machine.options.delays,c)},[o,s,a,u,c]),h}function Zre(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=Kre(e,2),s=r[0],o=s===void 0?{}:s,a=r[1],u=Yre(t,o);return A.useEffect(function(){if(a){var c=u.subscribe(hh(a));return function(){c.unsubscribe()}}},[a]),A.useEffect(function(){var c=o.state;return u.start(c?$s.create(c):void 0),function(){u.stop(),u.status=Pn.NotStarted}},[]),u}function Xre(t){return t.status!==0?t.getSnapshot():t.machine.initialState}function Qre(t){return"state"in t&&"machine"in t}function Jre(t){return"state"in t}var ese=function(t,e){return t===e},tse=function(t,e){if(Qre(t)){if(t.status===0&&e.current)return e.current;var n=Xre(t);return e.current=t.status===0?n:null,n}return Jre(t)?t.state:void 0};function nse(t,e,n,r){n===void 0&&(n=ese);var s=A.useRef(null),o=A.useCallback(function(c){var f=t.subscribe(c).unsubscribe;return f},[t]),a=A.useCallback(function(){return tse(t,s)},[t,r]),u=xT.useSyncExternalStoreWithSelector(o,a,a,e,n);return u}const rse=t=>{if(t instanceof Rs)return t;if(t instanceof Error){if(t.name==="InvalidStateError"){const{message:e,recoverySuggestion:n}=Hc[Bt.PasskeyAlreadyExists];return new Rs({name:Bt.PasskeyAlreadyExists,message:e,recoverySuggestion:n,underlyingError:t})}if(t.name==="NotAllowedError"){const{message:e,recoverySuggestion:n}=Hc[Bt.PasskeyRegistrationCanceled];return new Rs({name:Bt.PasskeyRegistrationCanceled,message:e,recoverySuggestion:n,underlyingError:t})}}return Q6(t)},sse=async t=>{try{const e=J6();cd(e,Bt.PasskeyNotSupported);const n=RG(t),r=await navigator.credentials.create({publicKey:n});return PG(r),IG(r)}catch(e){throw rse(e)}},ose=t=>In($n,Hn("StartWebAuthnRegistration"),ar(),{...qn,...t}),ise=t=>In($n,Hn("CompleteWebAuthnRegistration"),ar(),{...qn,...t});async function ase(){const t=$t.getConfig().Auth?.Cognito;lt(t);const{userPoolEndpoint:e,userPoolId:n}=t,{tokens:r}=await Oy();ud(r);const s=ose({endpointResolver:bt({endpointOverride:e})}),{CredentialCreationOptions:o}=await s({region:yt(n),userAgentValue:Mt(Ke.StartWebAuthnRegistration)},{AccessToken:r.accessToken.toString()});MG(o);const a=await sse(o);await ise({endpointResolver:bt({endpointOverride:e})})({region:yt(n),userAgentValue:Mt(Ke.CompleteWebAuthnRegistration)},{AccessToken:r.accessToken.toString(),Credential:a})}const lse=t=>In($n,Hn("ListWebAuthnCredentials"),ar(),{...qn,...t});async function use(t,e){const n=t.getConfig().Auth?.Cognito;lt(n);const{userPoolEndpoint:r,userPoolId:s}=n,{tokens:o}=await t.Auth.fetchAuthSession();ud(o);const a=lse({endpointResolver:bt({endpointOverride:r})}),{Credentials:u=[],NextToken:c}=await a({region:yt(s),userAgentValue:Mt(Ke.ListWebAuthnCredentials)},{AccessToken:o.accessToken.toString(),MaxResults:e?.pageSize,NextToken:e?.nextToken});return{credentials:u.map(h=>({credentialId:h.CredentialId,friendlyCredentialName:h.FriendlyCredentialName,relyingPartyId:h.RelyingPartyId,authenticatorAttachment:h.AuthenticatorAttachment,authenticatorTransports:h.AuthenticatorTransports,createdAt:h.CreatedAt?new Date(h.CreatedAt*1e3):void 0})),nextToken:c}}async function MT(t){return use($t,t)}const PT=t=>t.context.actorRef?.getSnapshot(),Oh=t=>PT(t)?.context,cse={category:Is.AI,apis:[ii.CreateConversation,ii.DeleteConversation,ii.ListConversations,ii.UpdateConversation,ii.OnMessage,ii.SendMessage,ii.Generation]},dse={apis:[Ke.DeleteUser,Ke.UpdatePassword],category:Is.Auth},fse={apis:[Ke.SignUp,Ke.ConfirmSignUp,Ke.ResendSignUpCode,Ke.SignIn,Ke.ConfirmSignIn,Ke.FetchUserAttributes,Ke.SignOut,Ke.ResetPassword,Ke.ConfirmResetPassword,Ke.SignInWithRedirect],category:Is.Auth},hse={apis:[qs.UploadData],category:Is.Storage},pse={apis:[Lx.NotifyMessageInteraction],category:Is.InAppMessaging},gse={category:Is.Geo,apis:[uh.SearchByText,uh.SearchForSuggestions,uh.SearchByPlaceId]},mse={category:Is.Geo,apis:[]},vse={apis:[qs.UploadData],category:Is.Storage},yse={apis:[qs.UploadData,qs.Copy,qs.GetUrl,qs.List,qs.Remove,qs.GetDataAccess,qs.ListCallerAccessGrants],category:Is.Storage};function ls(t){return t!=null&&!Array.isArray(t)&&typeof t=="object"}function vi(t){return typeof t=="string"||typeof t=="object"&&Object.prototype.toString.call(t)==="[object String]"}function bse(t){return ls(t)&&Object.prototype.toString.call(t)==="[object Map]"}function Sse(t){return ls(t)&&Object.prototype.toString.call(t)==="[object Set]"}function kT(t){if(t==null)return!0;if(ls(t)&&(bse(t)||Sse(t)))return!t.size;if(ls(t)&&(vi(t)||Array.isArray(t)))return!t.length;for(const e in t)if(yi(t,e))return!1;return!0}function Ese(t){return Array.isArray(t)&&kT(t)}function Cse(...t){return t.every(Ese)}function IF(t){return ls(t)&&kT(t)}function wse(...t){return t.every(IF)}function yi(t,e){return t!=null&&Object.prototype.hasOwnProperty.call(t,e)}function bi(t){return typeof t=="function"}const Ht=(t,e)=>e?`${t}--${e}`:"",Br=(t,e,n)=>n?`${t}--${e}`:"";function xse(...t){}function _se(t,e){const n={},r={};return Object.entries(t).forEach(([s,o])=>{e(s)?n[s]=o:r[s]=o}),[n,r]}const OF=({payload:t},e,n)=>{const{data:r,event:s}=t,{send:o}=e,{onSignIn:a,onSignOut:u}=n??{};switch(s){case"signedIn":{bi(a)&&a(t);break}case"signInWithRedirect":{o("SIGN_IN_WITH_REDIRECT");break}case"signedOut":{bi(u)&&u(),o("SIGN_OUT");break}case"tokenRefresh_failure":{if(r?.error?.name===ka.NetworkError)return;o("SIGN_OUT");break}}},Ase=(t,e=OF)=>{const n=r=>e(r,t);return To.listen("auth",n,"authenticator-hub-handler")},NF=["+1","+7","+20","+27","+30","+31","+32","+33","+34","+36","+39","+40","+41","+43","+44","+45","+46","+47","+48","+49","+51","+52","+53","+54","+55","+56","+57","+58","+60","+61","+62","+63","+64","+65","+66","+81","+82","+84","+86","+90","+91","+92","+93","+94","+95","+98","+212","+213","+216","+218","+220","+221","+222","+223","+224","+225","+226","+227","+228","+229","+230","+231","+232","+233","+234","+235","+236","+237","+238","+239","+240","+241","+242","+243","+244","+245","+246","+248","+249","+250","+251","+252","+253","+254","+255","+256","+257","+258","+260","+261","+262","+263","+264","+265","+266","+267","+268","+269","+290","+291","+297","+298","+299","+345","+350","+351","+352","+353","+354","+355","+356","+357","+358","+359","+370","+371","+372","+373","+374","+375","+376","+377","+378","+379","+380","+381","+382","+385","+386","+387","+389","+420","+421","+423","+500","+501","+502","+503","+504","+505","+506","+507","+508","+509","+537","+590","+591","+593","+594","+595","+596","+597","+598","+599","+670","+672","+673","+674","+675","+676","+677","+678","+679","+680","+681","+682","+683","+685","+686","+687","+688","+689","+690","+691","+692","+850","+852","+853","+855","+856","+872","+880","+886","+960","+961","+962","+963","+964","+965","+966","+967","+968","+970","+971","+972","+973","+974","+975","+976","+977","+992","+993","+994","+995","+996","+998"],nb={birthdate:{label:"Birthdate",placeholder:"Enter your Birthdate",type:"date",autocomplete:"bday",isRequired:!0},confirmation_code:{label:"Confirmation Code",placeholder:"Enter your Confirmation Code",type:"text",autocomplete:"one-time-code",isRequired:!0},confirm_password:{label:"Confirm Password",placeholder:"Please confirm your Password",type:"password",autocomplete:"new-password",isRequired:!0},email:{label:"Email",placeholder:"Enter your Email",type:"email",autocomplete:"username",isRequired:!0},family_name:{label:"Family Name",placeholder:"Enter your Family Name",type:"text",autocomplete:"family-name",isRequired:!0},given_name:{label:"Given Name",placeholder:"Enter your Given Name",type:"text",autocomplete:"given-name",isRequired:!0},middle_name:{label:"Middle Name",placeholder:"Enter your Middle Name",type:"text",autocomplete:"additional-name",isRequired:!0},name:{label:"Name",placeholder:"Enter your Name",type:"text",autocomplete:"name",isRequired:!0},nickname:{label:"Nickname",placeholder:"Enter your Nickname",type:"text",autocomplete:"tel",isRequired:!0},password:{label:"Password",placeholder:"Enter your Password",type:"password",autocomplete:"new-password",isRequired:!0},phone_number:{label:"Phone Number",placeholder:"Enter your Phone Number",type:"tel",autocomplete:"tel",dialCode:"+1",dialCodeList:NF,isRequired:!0},preferred_username:{label:"Preferred Username",placeholder:"Enter your Preferred Username",type:"text",isRequired:!0},profile:{label:"Profile",placeholder:"Add your Profile",type:"url",autocomplete:"url",isRequired:!0},website:{label:"Website",placeholder:"Add your Website",type:"url",autocomplete:"url",isRequired:!0},username:{label:"Username",placeholder:"Enter your Username",type:"text",autocomplete:"username",isRequired:!0}},Tse=["^","$","*",".","[","]","{","}","(",")","?",'"',"!","@","#","%","&","/","\\",",",">","<","'",":",";","|","_","~","`","=","+","-"," "],Rse=(t,e)=>{if(e?.matches("federatedSignIn")){if(t.matches("signUpActor"))return"signUp";if(t.matches("signInActor"))return"signIn"}switch(!0){case t.matches("idle"):return"idle";case t.matches("setup"):return"setup";case t.matches("signOut"):return"signOut";case t.matches("authenticated"):return"authenticated";case e?.matches("confirmSignUp"):case e?.matches("resendSignUpCode"):return"confirmSignUp";case e?.matches("confirmSignIn"):return"confirmSignIn";case e?.matches("setupTotp.edit"):case e?.matches("setupTotp.submit"):return"setupTotp";case e?.matches("signIn.submit"):return e?.context.selectedAuthMethod!=null?"signInSelectAuthFactor":"signIn";case e?.matches("signIn.selectMethod"):return"signInSelectAuthFactor";case e?.matches("passkeyPrompt"):return"passkeyPrompt";case e?.matches("signIn"):return"signIn";case e?.matches("signUp"):case e?.matches("autoSignIn"):return"signUp";case e?.matches("forceChangePassword"):return"forceNewPassword";case e?.matches("forgotPassword"):return"forgotPassword";case e?.matches("confirmResetPassword"):return"confirmResetPassword";case e?.matches("selectUserAttributes"):return"verifyUser";case e?.matches("confirmVerifyUserAttribute"):return"confirmVerifyUser";case e?.matches("setupEmail"):return"setupEmail";case e?.matches("selectMfaType"):return"selectMfaType";case t.matches("getCurrentUser"):case e?.matches("fetchUserAttributes"):return"transition";default:return null}},Ise=t=>{const e=n=>r=>t({type:n,data:r});return{initializeMachine:e("INIT"),resendCode:e("RESEND"),selectAuthMethod:e("SELECT_METHOD"),signOut:e("SIGN_OUT"),submitForm:e("SUBMIT"),toShowAuthMethods:e("SHOW_AUTH_METHODS"),updateForm:e("CHANGE"),updateBlur:e("BLUR"),toFederatedSignIn:e("FEDERATED_SIGN_IN"),toForgotPassword:e("FORGOT_PASSWORD"),toSignIn:e("SIGN_IN"),toSignUp:e("SIGN_UP"),skipVerification:e("SKIP")}},Ose=t=>{const e=Oh(t)??{},{allowedMfaTypes:n,availableAuthMethods:r,challengeName:s,codeDeliveryDetails:o,preferredChallenge:a,remoteError:u,selectedAuthMethod:c,validationError:f,totpSecretCode:h=null,unverifiedUserAttributes:g,username:m}=e,{socialProviders:y=[],loginMechanisms:S}=t.context?.config??{},E=S?.[0],C=e?.user??t.context?.user,w=!!(f&&Object.keys(f).length>0),x=PT(t),T=t.hasTag("pending")||x?.hasTag("pending"),R=Rse(t,x),M=(O=>{switch(O){case"idle":case"setup":return"configuring";case"authenticated":return"authenticated";default:return"unauthenticated"}})(R);return{allowedMfaTypes:n,authStatus:M,availableAuthMethods:r,challengeName:s,codeDeliveryDetails:o,error:u,hasValidationErrors:w,isPending:T,loginMechanism:E,preferredChallenge:a,route:R,selectedAuthMethod:c,socialProviders:y,totpSecretCode:h,unverifiedUserAttributes:g,user:C,username:m,validationErrors:f}},Nse=({send:t,state:e})=>{const n=Ise(t),r=Ose(e);return{...n,...r}};var Tc;(function(t){t.Apple="Apple",t.Amazon="Amazon",t.Facebook="Facebook",t.Google="Google"})(Tc||(Tc={}));var Gk;(function(t){t.Email="email",t.PhoneNumber="phone_number"})(Gk||(Gk={}));const Mse=["birthdate","email","family_name","given_name","middle_name","name","nickname","phone_number","preferred_username","profile","website"],Pse=["username","email","phone_number"],MF=[...Pse,...Mse,"confirmation_code","password","confirm_password"],kse=t=>MF.includes(t),PF=t=>MF.includes(t),Dse=t=>Array.isArray(t),Lse=t=>t?Dse(t)?t:[t]:null,Use=t=>{const e=t.trim().split("");for(let n=0;n<e.length;n++)n>0&&n<e.length-1&&(e[n]="*");return e.join("")},Fse=t=>{if(t.length<4)return t;const e=t.split("");for(let n=0;n<e.length-4;n++)e[n]="*";return e.join("")},zse=t=>{const e=t.split("@");return`${Use(e[0])}@${e[1]}`},jse=(t,e)=>t==="Phone Number"?Fse(e):zse(e),Bse=t=>Tse.some(e=>t.includes(e)),Hse=(t,e,n)=>encodeURI(`otpauth://totp/${t}:${e}?secret=${n}&issuer=${t}`);function $se(t,...e){return Object.entries(t).reduce((n,[r,s])=>({...n,[r]:e.includes(r)?s:s?.trim()}),{})}const qse={ADD_PROFILE:"Add your Profile",ADD_WEBSITE:"Add your Website",BACK_SIGN_IN:"Back to Sign In",BIRTHDATE:"Birthdate",CHANGE_PASSWORD:"Change Password",CHANGING_PASSWORD:"Changing",CODE:"Code",CODE_ARRIVAL:"It may take a minute to arrive",CODE_EMAILED:"Your code is on the way. To log in, enter the code we emailed to",CODE_SENT:"Your code is on the way. To log in, enter the code we sent you",CODE_TEXTED:"Your code is on the way. To log in, enter the code we texted to",CONFIRM_PASSWORD:"Confirm Password",CONFIRM_PASSWORD_PLACEHOLDER:"Please confirm your Password",CONFIRM_RESET_PASSWORD_HEADING:"Reset your Password",CONFIRM_SIGNUP_HEADING:"Confirm Sign Up",CONFIRM_SMS:"Confirm SMS Code",CONFIRM_EMAIL:"Confirm Email Code",CONFIRM_MFA_DEFAULT:"Confirm MFA Code",CONFIRM_TOTP:"Confirm TOTP Code",CONFIRM:"Confirm",CONFIRMATION_CODE:"Confirmation Code",CONFIRMING:"Confirming",CONTINUE:"Continue",CONTINUE_WITHOUT_PASSKEY:"Continue without a Passkey",CREATE_ACCOUNT:"Create Account",CREATE_ACCOUNT_WITH_EMAIL_OTP:"Create account with Email OTP",CREATE_ACCOUNT_WITH_PASSWORD:"Create account with Password",CREATE_ACCOUNT_WITH_SMS_OTP:"Create account with SMS OTP",CREATE_PASSKEY:"Create a Passkey",CREATING_ACCOUNT:"Creating Account",EMAIL_ADDRESS:"Email",EMAIL_OTP:"Email Message",ENTER_BIRTHDATE:"Enter your Birthdate",ENTER_CODE:"Enter your code",ENTER_CONFIRMATION_CODE:"Enter your Confirmation Code",ENTER_EMAIL:"Enter your Email",ENTER_FAMILY_NAME:"Enter your Family Name",ENTER_GIVEN_NAME:"Enter your Given Name",ENTER_MIDDLE_NAME:"Enter your Middle Name",ENTER_NAME:"Enter your Name",ENTER_NICK_NAME:"Enter your Nickname",ENTER_PASSWORD:"Enter your Password",ENTER_PHONE_NUMBER:"Enter your Phone Number",ENTER_PREFERRED_USERNAME:"Enter your Preferred Username",ENTER_USERNAME:"Enter your username",ENTER_USERNAME_FIRST:"Please enter your username first",EXISTING_PASSKEYS:"Existing Passkeys",FAMILY_NAME:"Family Name",GIVEN_NAME:"Given Name",FORGOT_PASSWORD:"Forgot Password?",FORGOT_YOUR_PASSWORD:"Forgot your password?",HIDE_PASSWORD:"Hide password",LOADING:"Loading",LOGIN_NAME:"Username",MIDDLE_NAME:"Middle Name",MFA_SETUP_SELECTION:"Multi-Factor Authentication Setup",MFA_SELECTION:"Multi-Factor Authentication",NAME:"Name",NICKNAME:"Nickname",NEW_PASSWORD:"New password",OR:"or",OTHER_SIGN_IN_OPTIONS:"Other sign-in options",PASSKEY_AUTHENTICATION_CANCELED:"Passkey authentication was canceled. Please try again or use a different sign-in method.",PASSKEY_CREATED_SUCCESS:"Passkey created successfully!",PASSKEY_LABEL:"Passkey",PASSKEY_PROMPT_DESCRIPTION:"Passkeys are WebAuthn credentials that validate your identity using biometric data like touch or facial recognition or device authentication like passwords or PINs, serving as a secure password replacement.",PASSKEY_PROMPT_HEADING:"Sign in faster with Passkey",PASSKEY_REGISTERED:"Your passkey has been successfully registered.",PASSKEY_REGISTRATION_FAILED:"Failed to create passkey. Please try again.",PASSWORD:"Password",PASSWORDLESS_NOT_ENABLED:"Passwordless authentication is not enabled for this account. Please contact your administrator or use password sign-in.",PHONE_NUMBER:"Phone Number",PREFERRED_USERNAME:"Preferred Username",PROFILE:"Profile",REGISTERING:"Registering",RESEND_CODE:"Resend Code",RESET_PASSWORD_HEADING:"Reset your password",RESET_PASSWORD:"Reset Password",SEND_CODE:"Send code",CODE_DELIVERY_FAILED:"Unable to send verification code. Please try again.",VERIFICATION_CODE_EXPIRED:"Your verification code has expired. Please request a new code.",VERIFICATION_CODE_INVALID:"The verification code you entered is incorrect. Please try again.",SENDING:"Sending",SELECT_MFA_TYPE:"Select MFA Type",SETUP_ANOTHER_PASSKEY:"Setup another Passkey",SETUP_EMAIL:"Setup Email",SETUP_TOTP:"Setup TOTP",SHOW_PASSWORD:"Show password",SIGN_IN_BUTTON:"Sign in",SIGN_IN_TAB:"Sign In",SIGN_IN_WITH_AMAZON:"Sign In with Amazon",SIGN_IN_WITH_APPLE:"Sign In with Apple",SIGN_IN_WITH_EMAIL:"Sign In with Email",SIGN_IN_WITH_FACEBOOK:"Sign In with Facebook",SIGN_IN_WITH_GOOGLE:"Sign In with Google",SIGN_IN_WITH_PASSKEY:"Sign In with Passkey",SIGN_IN_WITH_PASSWORD:"Sign In with Password",SIGN_IN_WITH_SMS:"Sign In with SMS",SIGN_IN:"Sign in to your account",SIGN_UP_BUTTON:"Create a new account",SIGNING_IN_BUTTON:"Signing in",SKIP:"Skip",SMS_MFA:"Text Message (SMS)",SUBMIT:"Submit",SUBMITTING:"Submitting",SOFTWARE_TOKEN_MFA:"Authenticator App (TOTP)",UPPERCASE_COPY:"COPY",USERNAME:"Username",VERIFY_CONTACT:"Verify Contact",VERIFY_HEADING:"Account recovery requires verified contact information",VERIFY:"Verify",WE_EMAILED:"We Emailed You",WE_SENT_CODE:"We Sent A Code",WE_TEXTED:"We Texted You",WEBSITE:"Website"},ov={...qse},we={...ov};function ye(t){return B6.get(t)}const DT=t=>{const e=t?.context.config?.loginMechanisms,[n]=e??["username"];return n},Wse=t=>{const e={...t};for(const[n,r]of Object.entries(t)){const{label:s,placeholder:o}=r;e[n]={...r,label:s?ye(s):void 0,placeholder:o?ye(o):void 0}}return e},Vse=t=>Object.entries(t).sort((e,n)=>{const r=e[1].order||Number.MAX_VALUE,s=n[1].order||Number.MAX_VALUE;return r-s}).filter(e=>e[1]!==void 0),Gse="+1",Si=t=>{let e=nb[t];const{type:n}=e;return n==="tel"&&(e={...e,dialCode:Gse}),e},rb=t=>{const e=DT(t);return{...Si(e),autocomplete:"username"}},iv=t=>({confirmation_code:{...Si("confirmation_code"),label:"Code *",placeholder:"Code"}}),Kse=t=>{const e=t.context.actorRef?.getSnapshot()?.context,n=e?.availableAuthMethods,r=e?.preferredChallenge,s=!n?.length||n.length===1&&n[0]==="PASSWORD"||n.length>1&&(!r||r==="PASSWORD"),o={username:{...rb(t)}};return s&&(o.password={...Si("password"),autocomplete:"current-password"}),o},Yse=t=>{const{loginMechanisms:e,signUpAttributes:n}=t.context.config,r=DT(t),o=t.context.actorRef?.getSnapshot()?.context?.availableAuthMethods,a=o&&o.length>1,u=Array.from(new Set([...e,"password","confirm_password",...n])),c={};for(const f of u)if(PF(f)){const h=f===r?rb(t):Si(f),g=a&&(f==="email"||f==="phone_number"||f==="password"||f==="confirm_password");c[f]={...h,...g&&{isRequired:!1}}}else console.debug(`Authenticator does not have a default implementation for ${f}. Customize SignUp FormFields to add your own.`);return c},Zse=t=>({confirmation_code:{...Si("confirmation_code"),placeholder:"Enter your code"}}),Xse=t=>{const e=DT(t),{label:n}=nb[e];return{username:{...rb(t),label:`Enter your ${n.toLowerCase()}`,placeholder:`Enter your ${n.toLowerCase()}`}}},Qse=t=>({...iv(),password:{...Si("password"),label:"New Password",placeholder:"New Password"},confirm_password:{...Si("confirm_password"),label:"Confirm Password",placeholder:"Confirm Password"}}),Jse=t=>{const e=PT(t),{missingAttributes:n}=e.context,r=Array.from(new Set(["password","confirm_password",...n??[]])),s={};for(const o of r)PF(o)?s[o]={...Si(o)}:console.debug(`Authenticator does not have a default implementation for ${o}. Customize ForceNewPassword FormFields to add your own.`);return s},eoe=t=>({email:Si("email")}),toe={signIn:Kse,signUp:Yse,confirmSignUp:Zse,confirmSignIn:iv,forceNewPassword:Jse,forgotPassword:Xse,confirmResetPassword:Qse,confirmVerifyUser:iv,setupEmail:eoe,setupTotp:iv},noe=(t,e)=>{const n=toe[t];return n(e)},roe=(t,e)=>{const n=Oh(e)?.formFields?.[t];return!n||Object.keys(n).length===0?{}:Object.entries(n).reduce((r,[s,o])=>{if((t==="signIn"||t==="forgotPassword")&&s==="username"){const u={...rb(e),...o};return{...r,[s]:u}}else if(kse(s)){const u={...nb[s],...o};return{...r,[s]:u}}else return{...r,[s]:o}},{})},soe=(t,e)=>{const n=noe(t,e),r=roe(t,e),s={...n,...r};return delete s.QR,Wse(s)},ooe=t=>t.map(e=>{const n=e[0],r={...e[1],order:void 0};return[n,r]}),ioe=(t,e)=>{const n=soe(t,e);return ooe(Vse(n))},aoe=t=>{switch(t){case"EMAIL_OTP":return ye(we.CONFIRM_EMAIL);case"SMS_MFA":return ye(we.CONFIRM_SMS);case"SOFTWARE_TOKEN_MFA":return ye(we.CONFIRM_TOTP);default:return ye(we.CONFIRM_MFA_DEFAULT)}},loe=t=>{const{DeliveryMedium:e,Destination:n}=t??{},r=e==="EMAIL",s=e==="SMS",o=ye(we.CODE_ARRIVAL);return r||s?`${ye(r?we.CODE_EMAILED:we.CODE_TEXTED)} ${n}. ${o}.`:`${ye(we.CODE_SENT)}. ${o}.`},uoe=t=>{const{DeliveryMedium:e}=t??{},n=e==="EMAIL";return ye(!n&&e==="SMS"?we.WE_SENT_CODE:n?we.WE_EMAILED:we.WE_TEXTED)},coe={amazon:"Amazon",apple:"Apple",facebook:"Facebook",google:"Google"},doe=(t,e)=>ye(`Sign ${t==="signIn"?"In":"Up"} with ${coe[e]}`),foe=t=>ye(t==="MFA_SETUP"?we.MFA_SETUP_SELECTION:we.MFA_SELECTION),hoe=t=>{switch(t){case"email":return ye(we.EMAIL_ADDRESS);case"phone_number":return ye(we.PHONE_NUMBER);default:return ye(we.USERNAME)}},poe=t=>{switch(t){case"EMAIL":return ye(ov.EMAIL_OTP);case"SMS":return ye(ov.SMS_MFA);case"TOTP":return ye(ov.SOFTWARE_TOKEN_MFA);default:return ye(t)}},Ln={getBackToSignInText:()=>ye(we.BACK_SIGN_IN),getChangePasswordText:()=>ye(we.CHANGE_PASSWORD),getChangingText:()=>ye(we.CHANGING_PASSWORD),getConfirmText:()=>ye(we.CONFIRM),getConfirmingText:()=>ye(we.CONFIRMING),getContinueText:()=>ye(we.CONTINUE),getCopyText:()=>ye(we.UPPERCASE_COPY),getHidePasswordText:()=>ye(we.HIDE_PASSWORD),getLoadingText:()=>ye(we.LOADING),getOrText:()=>ye(we.OR),getResendCodeText:()=>ye(we.RESEND_CODE),getSendCodeText:()=>ye(we.SEND_CODE),getSendingText:()=>ye(we.SENDING),getShowPasswordText:()=>ye(we.SHOW_PASSWORD),getSubmitText:()=>ye(we.SUBMIT),getSubmittingText:()=>ye(we.SUBMITTING),getSignInTabText:()=>ye(we.SIGN_IN_TAB),getSignUpTabText:()=>ye(we.CREATE_ACCOUNT),getForgotPasswordText:t=>ye(t?we.FORGOT_PASSWORD:we.FORGOT_YOUR_PASSWORD),getSigningInText:()=>ye(we.SIGNING_IN_BUTTON),getSignInText:()=>ye(we.SIGN_IN_BUTTON),getCreatingAccountText:()=>ye(we.CREATING_ACCOUNT),getCreateAccountText:()=>ye(we.CREATE_ACCOUNT),getCreateAccountWithEmailText:()=>ye(we.CREATE_ACCOUNT_WITH_EMAIL_OTP),getCreateAccountWithPasswordText:()=>ye(we.CREATE_ACCOUNT_WITH_PASSWORD),getCreateAccountWithSmsText:()=>ye(we.CREATE_ACCOUNT_WITH_SMS_OTP),getDeliveryMessageText:loe,getDeliveryMethodText:uoe,getChallengeText:aoe,getResetYourPasswordText:()=>ye(we.RESET_PASSWORD),getSetupEmailText:()=>ye(we.SETUP_EMAIL),getSetupTotpText:()=>ye(we.SETUP_TOTP),getSetupTotpInstructionsText:()=>ye("Copy and paste the secret key below into an authenticator app and then enter the code in the text field below."),getCopiedText:()=>ye("COPIED"),getSignInWithFederationText:doe,getMfaTypeLabelByValue:poe,getSelectMfaTypeByChallengeName:foe,getSelectMfaTypeText:()=>ye(we.SELECT_MFA_TYPE),getSkipText:()=>ye(we.SKIP),getVerifyText:()=>ye(we.VERIFY),getVerifyContactText:()=>ye(we.VERIFY_CONTACT),getAccountRecoveryInfoText:()=>ye(we.VERIFY_HEADING),getPasskeyPromptHeadingText:()=>ye(we.PASSKEY_PROMPT_HEADING),getPasskeyPromptDescriptionText:()=>ye(we.PASSKEY_PROMPT_DESCRIPTION),getCreatePasskeyText:()=>ye(we.CREATE_PASSKEY),getRegisteringText:()=>ye(we.REGISTERING),getContinueWithoutPasskeyText:()=>ye(we.CONTINUE_WITHOUT_PASSKEY),getPasskeyCreatedSuccessText:()=>ye(we.PASSKEY_CREATED_SUCCESS),getPasskeyRegisteredText:()=>ye(we.PASSKEY_REGISTERED),getPasskeyRegistrationFailedText:()=>ye(we.PASSKEY_REGISTRATION_FAILED),getPasskeyLabelText:()=>ye(we.PASSKEY_LABEL),getExistingPasskeysText:()=>ye(we.EXISTING_PASSKEYS),getSetupAnotherPasskeyText:()=>ye(we.SETUP_ANOTHER_PASSKEY),getSignInWithPasswordText:()=>ye(we.SIGN_IN_WITH_PASSWORD),getSignInWithEmailText:()=>ye(we.SIGN_IN_WITH_EMAIL),getSignInWithSmsText:()=>ye(we.SIGN_IN_WITH_SMS),getSignInWithPasskeyText:()=>ye(we.SIGN_IN_WITH_PASSKEY),getOtherSignInOptionsText:()=>ye(we.OTHER_SIGN_IN_OPTIONS),getEnterUsernameFirstText:()=>ye(we.ENTER_USERNAME_FIRST),getUsernameLabelByLoginMechanism:hoe,getInvalidEmailText:()=>ye("Please enter a valid email"),getRequiredFieldText:()=>ye("This field is required")};var tC,Kk;function kF(){if(Kk)return tC;Kk=1;function t(e,n){for(var r=-1,s=e==null?0:e.length,o=Array(s);++r<s;)o[r]=n(e[r],r,e);return o}return tC=t,tC}var nC,Yk;function goe(){if(Yk)return nC;Yk=1;var t=yT(),e=J9(),n=1,r=2;function s(o,a,u,c){var f=u.length,h=f,g=!c;if(o==null)return!h;for(o=Object(o);f--;){var m=u[f];if(g&&m[2]?m[1]!==o[m[0]]:!(m[0]in o))return!1}for(;++f<h;){m=u[f];var y=m[0],S=o[y],E=m[1];if(g&&m[2]){if(S===void 0&&!(y in o))return!1}else{var C=new t;if(c)var w=c(S,E,y,o,a,C);if(!(w===void 0?e(E,S,n|r,c,C):w))return!1}}return!0}return nC=s,nC}var rC,Zk;function DF(){if(Zk)return rC;Zk=1;var t=Ti();function e(n){return n===n&&!t(n)}return rC=e,rC}var sC,Xk;function moe(){if(Xk)return sC;Xk=1;var t=DF(),e=Q9();function n(r){for(var s=e(r),o=s.length;o--;){var a=s[o],u=r[a];s[o]=[a,u,t(u)]}return s}return sC=n,sC}var oC,Qk;function LF(){if(Qk)return oC;Qk=1;function t(e,n){return function(r){return r==null?!1:r[e]===n&&(n!==void 0||e in Object(r))}}return oC=t,oC}var iC,Jk;function voe(){if(Jk)return iC;Jk=1;var t=goe(),e=moe(),n=LF();function r(s){var o=e(s);return o.length==1&&o[0][2]?n(o[0][0],o[0][1]):function(a){return a===s||t(a,s,o)}}return iC=r,iC}var aC,eD;function LT(){if(eD)return aC;eD=1;var t=md(),e=uu(),n="[object Symbol]";function r(s){return typeof s=="symbol"||e(s)&&t(s)==n}return aC=r,aC}var lC,tD;function UT(){if(tD)return lC;tD=1;var t=Ri(),e=LT(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function s(o,a){if(t(o))return!1;var u=typeof o;return u=="number"||u=="symbol"||u=="boolean"||o==null||e(o)?!0:r.test(o)||!n.test(o)||a!=null&&o in Object(a)}return lC=s,lC}var uC,nD;function yoe(){if(nD)return uC;nD=1;var t=vT(),e="Expected a function";function n(r,s){if(typeof r!="function"||s!=null&&typeof s!="function")throw new TypeError(e);var o=function(){var a=arguments,u=s?s.apply(this,a):a[0],c=o.cache;if(c.has(u))return c.get(u);var f=r.apply(this,a);return o.cache=c.set(u,f)||c,f};return o.cache=new(n.Cache||t),o}return n.Cache=t,uC=n,uC}var cC,rD;function boe(){if(rD)return cC;rD=1;var t=yoe(),e=500;function n(r){var s=t(r,function(a){return o.size===e&&o.clear(),a}),o=s.cache;return s}return cC=n,cC}var dC,sD;function Soe(){if(sD)return dC;sD=1;var t=boe(),e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=t(function(s){var o=[];return s.charCodeAt(0)===46&&o.push(""),s.replace(e,function(a,u,c,f){o.push(c?f.replace(n,"$1"):u||a)}),o});return dC=r,dC}var fC,oD;function Eoe(){if(oD)return fC;oD=1;var t=Vy(),e=kF(),n=Ri(),r=LT(),s=t?t.prototype:void 0,o=s?s.toString:void 0;function a(u){if(typeof u=="string")return u;if(n(u))return e(u,a)+"";if(r(u))return o?o.call(u):"";var c=u+"";return c=="0"&&1/u==-1/0?"-0":c}return fC=a,fC}var hC,iD;function FT(){if(iD)return hC;iD=1;var t=Eoe();function e(n){return n==null?"":t(n)}return hC=e,hC}var pC,aD;function sb(){if(aD)return pC;aD=1;var t=Ri(),e=UT(),n=Soe(),r=FT();function s(o,a){return t(o)?o:e(o,a)?[o]:n(r(o))}return pC=s,pC}var gC,lD;function up(){if(lD)return gC;lD=1;var t=LT();function e(n){if(typeof n=="string"||t(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return gC=e,gC}var mC,uD;function zT(){if(uD)return mC;uD=1;var t=sb(),e=up();function n(r,s){s=t(s,r);for(var o=0,a=s.length;r!=null&&o<a;)r=r[e(s[o++])];return o&&o==a?r:void 0}return mC=n,mC}var vC,cD;function Coe(){if(cD)return vC;cD=1;var t=zT();function e(n,r,s){var o=n==null?void 0:t(n,r);return o===void 0?s:o}return vC=e,vC}var yC,dD;function woe(){if(dD)return yC;dD=1;function t(e,n){return e!=null&&n in Object(e)}return yC=t,yC}var bC,fD;function xoe(){if(fD)return bC;fD=1;var t=sb(),e=bT(),n=Ri(),r=Yy(),s=ET(),o=up();function a(u,c,f){c=t(c,u);for(var h=-1,g=c.length,m=!1;++h<g;){var y=o(c[h]);if(!(m=u!=null&&f(u,y)))break;u=u[y]}return m||++h!=g?m:(g=u==null?0:u.length,!!g&&s(g)&&r(y,g)&&(n(u)||e(u)))}return bC=a,bC}var SC,hD;function _oe(){if(hD)return SC;hD=1;var t=woe(),e=xoe();function n(r,s){return r!=null&&e(r,s,t)}return SC=n,SC}var EC,pD;function Aoe(){if(pD)return EC;pD=1;var t=J9(),e=Coe(),n=_oe(),r=UT(),s=DF(),o=LF(),a=up(),u=1,c=2;function f(h,g){return r(h)&&s(g)?o(a(h),g):function(m){var y=e(m,h);return y===void 0&&y===g?n(m,h):t(g,y,u|c)}}return EC=f,EC}var CC,gD;function jT(){if(gD)return CC;gD=1;function t(e){return e}return CC=t,CC}var wC,mD;function Toe(){if(mD)return wC;mD=1;function t(e){return function(n){return n?.[e]}}return wC=t,wC}var xC,vD;function Roe(){if(vD)return xC;vD=1;var t=zT();function e(n){return function(r){return t(r,n)}}return xC=e,xC}var _C,yD;function Ioe(){if(yD)return _C;yD=1;var t=Toe(),e=Roe(),n=UT(),r=up();function s(o){return n(o)?t(r(o)):e(o)}return _C=s,_C}var AC,bD;function Ooe(){if(bD)return AC;bD=1;var t=voe(),e=Aoe(),n=jT(),r=Ri(),s=Ioe();function o(a){return typeof a=="function"?a:a==null?n:typeof a=="object"?r(a)?e(a[0],a[1]):t(a):s(a)}return AC=o,AC}var TC,SD;function UF(){if(SD)return TC;SD=1;var t=lu(),e=(function(){try{var n=t(Object,"defineProperty");return n({},"",{}),n}catch{}})();return TC=e,TC}var RC,ED;function BT(){if(ED)return RC;ED=1;var t=UF();function e(n,r,s){r=="__proto__"&&t?t(n,r,{configurable:!0,enumerable:!0,value:s,writable:!0}):n[r]=s}return RC=e,RC}var IC,CD;function FF(){if(CD)return IC;CD=1;var t=BT(),e=ap(),n=Object.prototype,r=n.hasOwnProperty;function s(o,a,u){var c=o[a];(!(r.call(o,a)&&e(c,u))||u===void 0&&!(a in o))&&t(o,a,u)}return IC=s,IC}var OC,wD;function Noe(){if(wD)return OC;wD=1;var t=FF(),e=sb(),n=Yy(),r=Ti(),s=up();function o(a,u,c,f){if(!r(a))return a;u=e(u,a);for(var h=-1,g=u.length,m=g-1,y=a;y!=null&&++h<g;){var S=s(u[h]),E=c;if(S==="__proto__"||S==="constructor"||S==="prototype")return a;if(h!=m){var C=y[S];E=f?f(C,S,y):void 0,E===void 0&&(E=r(C)?C:n(u[h+1])?[]:{})}t(y,S,E),y=y[S]}return a}return OC=o,OC}var NC,xD;function Moe(){if(xD)return NC;xD=1;var t=zT(),e=Noe(),n=sb();function r(s,o,a){for(var u=-1,c=o.length,f={};++u<c;){var h=o[u],g=t(s,h);a(g,h)&&e(f,n(h,s),g)}return f}return NC=r,NC}var MC,_D;function HT(){if(_D)return MC;_D=1;var t=X9(),e=t(Object.getPrototypeOf,Object);return MC=e,MC}var PC,AD;function Poe(){if(AD)return PC;AD=1;var t=V9(),e=HT(),n=Y9(),r=K9(),s=Object.getOwnPropertySymbols,o=s?function(a){for(var u=[];a;)t(u,n(a)),a=e(a);return u}:r;return PC=o,PC}var kC,TD;function koe(){if(TD)return kC;TD=1;function t(e){var n=[];if(e!=null)for(var r in Object(e))n.push(r);return n}return kC=t,kC}var DC,RD;function Doe(){if(RD)return DC;RD=1;var t=Ti(),e=wT(),n=koe(),r=Object.prototype,s=r.hasOwnProperty;function o(a){if(!t(a))return n(a);var u=e(a),c=[];for(var f in a)f=="constructor"&&(u||!s.call(a,f))||c.push(f);return c}return DC=o,DC}var LC,ID;function $T(){if(ID)return LC;ID=1;var t=Z9(),e=Doe(),n=Zy();function r(s){return n(s)?t(s,!0):e(s)}return LC=r,LC}var UC,OD;function Loe(){if(OD)return UC;OD=1;var t=G9(),e=Poe(),n=$T();function r(s){return t(s,n,e)}return UC=r,UC}var FC,ND;function Uoe(){if(ND)return FC;ND=1;var t=kF(),e=Ooe(),n=Moe(),r=Loe();function s(o,a){if(o==null)return{};var u=t(r(o),function(c){return[c]});return a=e(a),n(o,u,function(c,f){return a(c,f[0])})}return FC=s,FC}var Foe=Uoe();const zoe=Va(Foe),joe=!0,Boe="",Nh=(t,e)=>`${t}${e}`.replace(/[^A-Z0-9+]/gi,""),Hoe=(t,e)=>{switch(e){case"address":case"birthdate":case"email":case"family_name":case"gender":case"given_name":case"locale":case"middle_name":case"name":case"nickname":case"phone_number":case"picture":case"preferred_username":case"profile":case"updated_at":case"website":case"zoneinfo":return!0;default:return e.startsWith("custom:")}},$oe=t=>{const{phone_number:e,...n}=zoe(t,Hoe);if(vi(e)&&e!==Boe){const{country_code:r}=t;return{...n,phone_number:Nh(r,e)}}return n},qoe=(t,e,n,r)=>{const{password:s,...o}=e,a=$oe(o),u=r&&r!=="PASSWORD";let c=a;r==="SMS_OTP"&&a.email&&(c={...a,email:""});const f={autoSignIn:u?{enabled:!0,authFlowType:"USER_AUTH",preferredChallenge:r}:joe,userAttributes:{...n==="phone_number"?{...c,phone_number:t}:c}};return{username:t,password:u?void 0:s,options:f}},Woe=({formValues:t,loginMechanisms:e})=>{const n=t.__authMethod;if(n==="SMS_OTP"){const{country_code:s,phone_number:o}=t;return Nh(s,o)}if(n==="EMAIL_OTP")return t.email;if(e.includes("username"))return t.username;const r=e[0];if(r==="phone_number"){const{country_code:s,phone_number:o}=t;return Nh(s,o)}return t[r]},Voe=(t,e)=>{const n=[],r=e!==void 0;n.push("PASSWORD"),(r||t?.emailOtpEnabled)&&n.push("EMAIL_OTP"),(r||t?.smsOtpEnabled)&&n.push("SMS_OTP"),(r||t?.webAuthnEnabled)&&n.push("WEB_AUTHN");const s=e??[],o=n.filter(a=>!s.includes(a));if(o.length===0)throw new Error("InvalidPasswordlessSettings: All authentication methods are hidden");return o},{assign:ot}=CF,Goe=ot({actorDoneData:void 0}),Koe=ot({challengeName:void 0}),Yoe=ot({missingAttributes:void 0}),Zoe=ot({remoteError:void 0}),Xoe=ot({formValues:t=>({username:t.formValues?.username})}),Qoe=ot({touched:{}}),Joe=ot({user:void 0}),eie=ot({validationError:{}}),tie=ot({totpSecretCode:(t,{data:e})=>{const{sharedSecret:n}=e.nextStep?.totpSetupDetails??{};return n}}),nie=ot({allowedMfaTypes:(t,{data:e})=>e.nextStep?.allowedMFATypes}),rie=ot({step:"SIGN_IN"}),sie=ot({step:"SHOULD_CONFIRM_USER_ATTRIBUTE"}),oie=ot({step:"CONFIRM_ATTRIBUTE_COMPLETE"}),iie=ot({challengeName:(t,{data:e})=>{const{signInStep:n}=e.nextStep;switch(n){case"CONFIRM_SIGN_IN_WITH_SMS_CODE":return"SMS_MFA";case"CONFIRM_SIGN_IN_WITH_TOTP_CODE":return"SOFTWARE_TOKEN_MFA";case"CONFIRM_SIGN_IN_WITH_EMAIL_CODE":return"EMAIL_OTP";case"CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION":case"CONTINUE_SIGN_IN_WITH_EMAIL_SETUP":case"CONTINUE_SIGN_IN_WITH_TOTP_SETUP":return"MFA_SETUP";case"CONTINUE_SIGN_IN_WITH_MFA_SELECTION":return"SELECT_MFA_TYPE";default:return}}}),aie=ot({username:({formValues:t,loginMechanisms:e})=>{const n=e[0],{username:r,country_code:s}=t;return n==="phone_number"?Nh(s,r):r}}),lie=ot({username:Woe}),uie=ot({username:({formValues:t,loginMechanisms:e})=>{const n=e[0],{username:r,country_code:s}=t;return n==="phone_number"?Nh(s,r):r}}),cie=ot({step:(t,{data:e})=>e.nextStep.signInStep==="DONE"?"SIGN_IN_COMPLETE":e.nextStep.signInStep}),die=ot({step:(t,{data:e})=>e.nextStep.signUpStep==="DONE"?"SIGN_UP_COMPLETE":e.nextStep.signUpStep}),fie=ot({step:(t,{data:e})=>e.nextStep.resetPasswordStep==="DONE"?"RESET_PASSWORD_COMPLETE":e.nextStep.resetPasswordStep}),hie=ot({missingAttributes:(t,{data:e})=>e.nextStep?.missingAttributes}),pie=ot({validationError:(t,{data:e})=>e}),gie=ot({remoteError:(t,{data:e})=>{if(e.name==="NoUserPoolError")return"Configuration error (see console) – please contact the administrator";const n=e?.message||"";return n.includes("USER_AUTH flow not enabled")?ye(we.PASSWORDLESS_NOT_ENABLED):n.includes("Cannot send code to either")?ye(we.CODE_DELIVERY_FAILED):n.includes("Invalid code or auth state")?ye(we.VERIFICATION_CODE_INVALID):n.includes("session is expired")?ye(we.VERIFICATION_CODE_EXPIRED):n.includes("ceremony has been canceled")?ye(we.PASSKEY_AUTHENTICATION_CANCELED):n||e}}),mie=ot({user:(t,{data:e})=>e}),MD=t=>({Destination:t.destination,DeliveryMedium:t.deliveryMedium,AttributeName:t.attributName}),vie=ot({codeDeliveryDetails:(t,{data:e})=>e?.nextStep?.codeDeliveryDetails?MD(e.nextStep.codeDeliveryDetails):MD(e)}),yie=ot({formValues:(t,{data:e})=>{const{name:n,value:r}=e;return{...t.formValues,[n]:r}}}),bie=ot({formValues:(t,{data:e})=>$se({...t.formValues,...e},"password")}),Sie=ot({touched:(t,{data:e})=>({...t.touched,[e.name]:!0})}),Eie=ot({unverifiedUserAttributes:(t,{data:e})=>{const n=e||t.fetchedUserAttributes;if(!n)return{};const{email:r,phone_number:s}=n;return{...r&&{email:r},...s&&{phone_number:s}}}}),Cie=ot({selectedUserAttribute:void 0}),wie=ot({selectedUserAttribute:t=>t.formValues?.unverifiedAttr}),xie=ot({step:"CONFIRM_SIGN_UP"}),_ie=ot({selectedAuthMethod:(t,{data:e})=>e.method}),Aie=ot({selectedAuthMethod:(t,{data:e})=>e?.__authMethod||"PASSWORD"}),Tie=ot({step:"SELECT_AUTH_METHOD"}),Rie=ot({fetchedUserAttributes:(t,e)=>e.data}),Iie=ot({hasExistingPasskeys:(t,e)=>e.data}),Oie=ot({hasExistingPasskeys:!1}),cp={clearActorDoneData:Goe,clearChallengeName:Koe,clearError:Zoe,clearFormValues:Xoe,clearHasExistingPasskeys:Oie,clearMissingAttributes:Yoe,clearSelectedUserAttribute:Cie,clearTouched:Qoe,clearUser:Joe,clearValidationError:eie,handleBlur:Sie,handleInput:yie,handleSubmit:bie,setAllowedMfaTypes:nie,setChallengeName:iie,setCodeDeliveryDetails:vie,setFetchedUserAttributes:Rie,setFieldErrors:pie,setHasExistingPasskeys:Iie,setMissingAttributes:hie,setNextResetPasswordStep:fie,setNextSignInStep:cie,setNextSignUpStep:die,setRemoteError:gie,setConfirmAttributeCompleteStep:oie,setConfirmSignUpSignUpStep:xie,setSelectAuthMethodStep:Tie,setSelectedAuthMethod:_ie,setSelectedAuthMethodFromForm:Aie,setShouldVerifyUserAttributeStep:sie,setSelectedUserAttribute:wie,setSignInStep:rie,setTotpSecretCode:tie,setUser:mie,setUnverifiedUserAttributes:Eie,setUsernameForgotPassword:aie,setUsernameSignIn:uie,setUsernameSignUp:lie},Nie=["CONFIRM_SIGN_IN_WITH_SMS_CODE","CONFIRM_SIGN_IN_WITH_TOTP_CODE","CONFIRM_SIGN_IN_WITH_EMAIL_CODE"],Mie=(t,{data:e})=>e?.nextStep.signInStep==="CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED",Pie=(t,{data:e})=>e?.nextStep?.signInStep==="RESET_PASSWORD",kie=(t,{data:e})=>e?.nextStep.signInStep==="CONFIRM_SIGN_UP",Die=(t,{data:e})=>e?.nextStep.signUpStep==="COMPLETE_AUTO_SIGN_IN",Lie=(t,{data:e})=>e?.nextStep.signUpStep==="DONE"&&t.step==="CONFIRM_SIGN_UP",Uie=(t,{data:e})=>e?.nextStep.signInStep==="DONE",Fie=(t,{data:e})=>e?.nextStep.signUpStep==="DONE",zie=(t,{data:e})=>e?.nextStep.resetPasswordStep==="DONE",jie=(t,{data:e})=>e?.step==="CONFIRM_ATTRIBUTE_COMPLETE",Bie=(t,{data:e})=>e?.step==="CONFIRM_ATTRIBUTE_WITH_CODE",Hie=(t,{data:e})=>e?.step==="SHOULD_CONFIRM_USER_ATTRIBUTE",$ie=(t,{data:e})=>e?.step==="RESET_PASSWORD",qie=(t,{data:e})=>e?.step==="CONFIRM_SIGN_UP",Wie=({step:t})=>Nie.includes(t),Vie=({step:t})=>t==="CONTINUE_SIGN_IN_WITH_TOTP_SETUP",Gie=({step:t})=>t==="CONTINUE_SIGN_IN_WITH_EMAIL_SETUP",Kie=({step:t})=>["CONTINUE_SIGN_IN_WITH_MFA_SELECTION","CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION"].includes(t),Yie=({step:t})=>t==="RESET_PASSWORD",Zie=({step:t})=>t==="CONFIRM_RESET_PASSWORD_WITH_CODE",Xie=({step:t})=>t==="CONFIRM_SIGN_UP",Qie=(t,e)=>{const n=e.data||t.fetchedUserAttributes;if(!n)return!1;const{email:r,phone_number:s,phone_number_verified:o,email_verified:a}=n;return!r&&!s?!1:(a===void 0||a==="false")&&(o===void 0||o==="false")},Jie=(t,{data:e})=>e.message==="User is already confirmed.",eae=({availableAuthMethods:t,preferredChallenge:e,selectedAuthMethod:n})=>t&&t.length>1&&(!e||n===null),tae=({passwordless:t,hasExistingPasskeys:e})=>{const{passkeyRegistrationPrompts:n}=t||{};return!n||e?!1:typeof n=="boolean"?n:n.afterSignin==="ALWAYS"},nae=({passwordless:t,hasExistingPasskeys:e})=>{const{passkeyRegistrationPrompts:n}=t||{};return!n||e?!1:typeof n=="boolean"?n:n.afterSignup==="ALWAYS"},rae=({passwordless:t})=>t?.passkeyRegistrationPrompts!=null,sae=({selectedAuthMethod:t,step:e})=>t!=null&&e==="SELECT_AUTH_METHOD",ob={hasCompletedAttributeConfirmation:jie,hasCompletedResetPassword:zie,hasCompletedSignIn:Uie,hasCompletedSignUp:Fie,hasPasskeyRegistrationPrompts:rae,isConfirmSignUpStep:qie,isConfirmUserAttributeStep:Bie,isResetPasswordStep:$ie,isShouldConfirmUserAttributeStep:Hie,isUserAlreadyConfirmed:Jie,shouldAutoSignIn:Die,shouldManualSignIn:Lie,shouldConfirmResetPassword:Zie,shouldConfirmSignIn:Wie,shouldConfirmSignInWithNewPassword:Mie,shouldConfirmSignUp:Xie,shouldConfirmSignUpFromSignIn:kie,shouldResetPassword:Yie,shouldResetPasswordFromSignIn:Pie,shouldReturnToSelectMethod:sae,shouldSelectAuthMethod:eae,shouldSetupTotp:Vie,shouldSetupEmail:Gie,shouldSelectMfaType:Kie,shouldVerifyAttribute:Qie,shouldPromptPasskeyRegistration:tae,shouldPromptPasskeyRegistrationAfterSignup:nae};var zC,PD;function zF(){if(PD)return zC;PD=1;var t=BT(),e=ap();function n(r,s,o){(o!==void 0&&!e(r[s],o)||o===void 0&&!(s in r))&&t(r,s,o)}return zC=n,zC}var jC,kD;function oae(){if(kD)return jC;kD=1;function t(e){return function(n,r,s){for(var o=-1,a=Object(n),u=s(n),c=u.length;c--;){var f=u[e?c:++o];if(r(a[f],f,a)===!1)break}return n}}return jC=t,jC}var BC,DD;function iae(){if(DD)return BC;DD=1;var t=oae(),e=t();return BC=e,BC}var oh={exports:{}};oh.exports;var LD;function aae(){return LD||(LD=1,(function(t,e){var n=Mo(),r=e&&!e.nodeType&&e,s=r&&!0&&t&&!t.nodeType&&t,o=s&&s.exports===r,a=o?n.Buffer:void 0,u=a?a.allocUnsafe:void 0;function c(f,h){if(h)return f.slice();var g=f.length,m=u?u(g):new f.constructor(g);return f.copy(m),m}t.exports=c})(oh,oh.exports)),oh.exports}var HC,UD;function lae(){if(UD)return HC;UD=1;var t=W9();function e(n){var r=new n.constructor(n.byteLength);return new t(r).set(new t(n)),r}return HC=e,HC}var $C,FD;function uae(){if(FD)return $C;FD=1;var t=lae();function e(n,r){var s=r?t(n.buffer):n.buffer;return new n.constructor(s,n.byteOffset,n.length)}return $C=e,$C}var qC,zD;function cae(){if(zD)return qC;zD=1;function t(e,n){var r=-1,s=e.length;for(n||(n=Array(s));++r<s;)n[r]=e[r];return n}return qC=t,qC}var WC,jD;function dae(){if(jD)return WC;jD=1;var t=Ti(),e=Object.create,n=(function(){function r(){}return function(s){if(!t(s))return{};if(e)return e(s);r.prototype=s;var o=new r;return r.prototype=void 0,o}})();return WC=n,WC}var VC,BD;function fae(){if(BD)return VC;BD=1;var t=dae(),e=HT(),n=wT();function r(s){return typeof s.constructor=="function"&&!n(s)?t(e(s)):{}}return VC=r,VC}var GC,HD;function hae(){if(HD)return GC;HD=1;var t=Zy(),e=uu();function n(r){return e(r)&&t(r)}return GC=n,GC}var KC,$D;function pae(){if($D)return KC;$D=1;var t=md(),e=HT(),n=uu(),r="[object Object]",s=Function.prototype,o=Object.prototype,a=s.toString,u=o.hasOwnProperty,c=a.call(Object);function f(h){if(!n(h)||t(h)!=r)return!1;var g=e(h);if(g===null)return!0;var m=u.call(g,"constructor")&&g.constructor;return typeof m=="function"&&m instanceof m&&a.call(m)==c}return KC=f,KC}var YC,qD;function jF(){if(qD)return YC;qD=1;function t(e,n){if(!(n==="constructor"&&typeof e[n]=="function")&&n!="__proto__")return e[n]}return YC=t,YC}var ZC,WD;function gae(){if(WD)return ZC;WD=1;var t=FF(),e=BT();function n(r,s,o,a){var u=!o;o||(o={});for(var c=-1,f=s.length;++c<f;){var h=s[c],g=a?a(o[h],r[h],h,o,r):void 0;g===void 0&&(g=r[h]),u?e(o,h,g):t(o,h,g)}return o}return ZC=n,ZC}var XC,VD;function mae(){if(VD)return XC;VD=1;var t=gae(),e=$T();function n(r){return t(r,e(r))}return XC=n,XC}var QC,GD;function vae(){if(GD)return QC;GD=1;var t=zF(),e=aae(),n=uae(),r=cae(),s=fae(),o=bT(),a=Ri(),u=hae(),c=ST(),f=gT(),h=Ti(),g=pae(),m=CT(),y=jF(),S=mae();function E(C,w,x,T,R,M,N){var O=y(C,x),k=y(w,x),F=N.get(k);if(F){t(C,x,F);return}var $=M?M(O,k,x+"",C,w,N):void 0,D=$===void 0;if(D){var z=a(k),q=!z&&c(k),K=!z&&!q&&m(k);$=k,z||q||K?a(O)?$=O:u(O)?$=r(O):q?(D=!1,$=e(k,!0)):K?(D=!1,$=n(k,!0)):$=[]:g(k)||o(k)?($=O,o(O)?$=S(O):(!h(O)||f(O))&&($=s(k))):D=!1}D&&(N.set(k,$),R($,k,T,M,N),N.delete(k)),t(C,x,$)}return QC=E,QC}var JC,KD;function yae(){if(KD)return JC;KD=1;var t=yT(),e=zF(),n=iae(),r=vae(),s=Ti(),o=$T(),a=jF();function u(c,f,h,g,m){c!==f&&n(f,function(y,S){if(m||(m=new t),s(y))r(c,f,S,h,u,g,m);else{var E=g?g(a(c,S),y,S+"",c,f,m):void 0;E===void 0&&(E=y),e(c,S,E)}},o)}return JC=u,JC}var ew,YD;function bae(){if(YD)return ew;YD=1;function t(e,n,r){switch(r.length){case 0:return e.call(n);case 1:return e.call(n,r[0]);case 2:return e.call(n,r[0],r[1]);case 3:return e.call(n,r[0],r[1],r[2])}return e.apply(n,r)}return ew=t,ew}var tw,ZD;function Sae(){if(ZD)return tw;ZD=1;var t=bae(),e=Math.max;function n(r,s,o){return s=e(s===void 0?r.length-1:s,0),function(){for(var a=arguments,u=-1,c=e(a.length-s,0),f=Array(c);++u<c;)f[u]=a[s+u];u=-1;for(var h=Array(s+1);++u<s;)h[u]=a[u];return h[s]=o(f),t(r,this,h)}}return tw=n,tw}var nw,XD;function Eae(){if(XD)return nw;XD=1;function t(e){return function(){return e}}return nw=t,nw}var rw,QD;function Cae(){if(QD)return rw;QD=1;var t=Eae(),e=UF(),n=jT(),r=e?function(s,o){return e(s,"toString",{configurable:!0,enumerable:!1,value:t(o),writable:!0})}:n;return rw=r,rw}var sw,JD;function wae(){if(JD)return sw;JD=1;var t=800,e=16,n=Date.now;function r(s){var o=0,a=0;return function(){var u=n(),c=e-(u-a);if(a=u,c>0){if(++o>=t)return arguments[0]}else o=0;return s.apply(void 0,arguments)}}return sw=r,sw}var ow,eL;function xae(){if(eL)return ow;eL=1;var t=Cae(),e=wae(),n=e(t);return ow=n,ow}var iw,tL;function _ae(){if(tL)return iw;tL=1;var t=jT(),e=Sae(),n=xae();function r(s,o){return n(e(s,o,t),s+"")}return iw=r,iw}var aw,nL;function Aae(){if(nL)return aw;nL=1;var t=ap(),e=Zy(),n=Yy(),r=Ti();function s(o,a,u){if(!r(u))return!1;var c=typeof a;return(c=="number"?e(u)&&n(a,u.length):c=="string"&&a in u)?t(u[a],o):!1}return aw=s,aw}var lw,rL;function Tae(){if(rL)return lw;rL=1;var t=_ae(),e=Aae();function n(r){return t(function(s,o){var a=-1,u=o.length,c=u>1?o[u-1]:void 0,f=u>2?o[2]:void 0;for(c=r.length>3&&typeof c=="function"?(u--,c):void 0,f&&e(o[0],o[1],f)&&(c=u<3?void 0:c,u=1),s=Object(s);++a<u;){var h=o[a];h&&r(s,h,a,c)}return s})}return lw=n,lw}var uw,sL;function Rae(){if(sL)return uw;sL=1;var t=yae(),e=Tae(),n=e(function(r,s,o){t(r,s,o)});return uw=n,uw}var Iae=Rae();const Oae=Va(Iae),ib=async(t,e,n,r)=>{const s=await Promise.all(r.map(a=>a(t,e,n))),o=Oae({},...s);return kT(o)?Promise.resolve():Promise.reject(o)},Nae=8,Mae=t=>Array.isArray(t),Pae=t=>{if(t)return Mae(t)?Object.entries(t).map(([e,n])=>Object.keys(n)[0]):Object.keys(t)},Ua={async getAmplifyConfig(){const t=E8.getConfig(),e=t.Auth?.Cognito,{loginWith:n,userAttributes:r}=t.Auth?.Cognito??{},s=n?Object.entries(n).filter(([f,h])=>f!=="oauth").filter(([f,h])=>!!h).map(f=>f[0]==="phone"?"phone_number":f[0]):void 0,o=Pae(r),a=n?.oauth?.providers?n.oauth.providers?.map(f=>f.toString().toLowerCase()):void 0,u=t.Auth?.Cognito?.passwordless,c={emailOtpEnabled:u?.emailOtpEnabled??u?.email_otp_enabled===!0,smsOtpEnabled:u?.smsOtpEnabled??u?.sms_otp_enabled===!0,webAuthnEnabled:!!(u?.webAuthn??u?.web_authn),preferredChallenge:u?.preferredChallenge??u?.preferred_challenge};return{...e,loginMechanisms:s,signUpAttributes:o,socialProviders:a,passwordlessCapabilities:c}},getCurrentUser:Py,handleSignIn:eT,handleSignUp:hY,handleConfirmSignIn:d8,handleConfirmSignUp:SY,handleForgotPasswordSubmit:mY,handleForgotPassword:c8,handleResendSignUpCode:yY,async validateCustomSignUp(t,e){},async validateFormPassword(t,e,n){const{password:r}=t,{password:s}=e;if(!s||!n)return null;const o=[],a=n.minLength??Nae;return r.length<a&&o.push(`Password must have at least ${a} characters`),n.requireLowercase&&!/[a-z]/.test(r)&&o.push("Password must have lower case letters"),n.requireUppercase&&!/[A-Z]/.test(r)&&o.push("Password must have upper case letters"),n.requireNumbers&&!/[0-9]/.test(r)&&o.push("Password must have numbers"),n.requireSpecialCharacters&&!Bse(r)&&o.push("Password must have special characters"),o.length!==0?{password:o}:null},async validateConfirmPassword(t,e){const{password:n,confirm_password:r}=t,{confirm_password:s,password:o}=e;if(!n&&!r)return null;if((n||r)&&n!==r&&(s&&o||n?.length>=6&&r?.length>=6))return{confirm_password:"Your passwords must match"}},async validatePreferredUsername(t,e){},async validateRequiredFieldsForAuthMethod(t){const e=t.__authMethod;if(!e)return null;if(e==="EMAIL_OTP"&&!t.email)return{email:"Email is required for Email OTP sign up"};if(e==="SMS_OTP"&&!t.phone_number)return{phone_number:"Phone number is required for SMS OTP sign up"};if(e==="PASSWORD"){const n={};return t.password||(n.password="Password is required"),t.confirm_password||(n.confirm_password="Confirm Password is required"),Object.keys(n).length>0?n:null}return null}};function kae({services:t}){return yd({id:"forgotPasswordActor",initial:"init",predictableActionArguments:!0,states:{init:{always:[{cond:"shouldResetPassword",target:"confirmResetPassword"},{cond:"shouldConfirmResetPassword",target:"confirmResetPassword"},{target:"forgotPassword"}]},forgotPassword:{initial:"edit",entry:"sendUpdate",exit:["clearError","clearTouched"],states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},CHANGE:{actions:"handleInput"},BLUR:{actions:"handleBlur"}}},submit:{tags:"pending",entry:["sendUpdate","clearError","setUsernameForgotPassword"],invoke:{src:"handleResetPassword",onDone:{actions:["setCodeDeliveryDetails","setNextResetPasswordStep"],target:"#forgotPasswordActor.confirmResetPassword"},onError:{actions:"setRemoteError",target:"edit"}}}}},confirmResetPassword:{type:"parallel",exit:["clearFormValues","clearError","clearTouched"],states:{validation:{initial:"pending",states:{pending:{invoke:{src:"validateFields",onDone:{target:"valid",actions:"clearValidationError"},onError:{target:"invalid",actions:"setFieldErrors"}}},valid:{entry:"sendUpdate"},invalid:{entry:"sendUpdate"}},on:{CHANGE:{actions:"handleInput",target:".pending"},BLUR:{actions:"handleBlur",target:".pending"}}},submission:{initial:"idle",states:{idle:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"validate"},RESEND:"resendCode",CHANGE:{actions:"handleInput"},BLUR:{actions:"handleBlur"}}},validate:{entry:"sendUpdate",invoke:{src:"validateFields",onDone:{target:"pending",actions:"clearValidationError"},onError:{target:"idle",actions:"setFieldErrors"}}},resendCode:{tags:"pending",entry:["clearError","sendUpdate"],invoke:{src:"handleResetPassword",onDone:{target:"idle"},onError:{actions:"setRemoteError",target:"idle"}}},pending:{tags:"pending",entry:["clearError","sendUpdate"],invoke:{src:"handleConfirmResetPassword",onDone:[{cond:"hasCompletedResetPassword",actions:"setNextResetPasswordStep",target:"#forgotPasswordActor.resolved"},{actions:"setSignInStep",target:"#forgotPasswordActor.resolved"}],onError:{actions:"setRemoteError",target:"idle"}}}}}}},resolved:{type:"final",data:({step:e})=>({step:e})}}},{actions:{...cp,sendUpdate:tb()},guards:ob,services:{handleResetPassword({username:e}){return t.handleForgotPassword({username:e})},handleConfirmResetPassword({formValues:e,username:n}){const{confirmation_code:r,password:s}=e;return t.handleForgotPasswordSubmit({confirmationCode:r,newPassword:s,username:n})},validateFields(e){return ib(e.formValues,e.touched,e.passwordSettings,[Ua.validateFormPassword,Ua.validateConfirmPassword])}}})}const BF=t=>({entry:["sendUpdate","clearError"],invoke:{src:"signInWithRedirect",onDone:{target:t},onError:{actions:"setRemoteError",target:t}}}),Dae=t=>["CONTINUE_SIGN_IN_WITH_MFA_SELECTION","CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION"].includes(t)?"mfa_type":t==="CONTINUE_SIGN_IN_WITH_EMAIL_SETUP"?"email":"confirmation_code",av={onDone:[{cond:"hasCompletedSignIn",actions:"setNextSignInStep",target:"#signInActor.fetchUserAttributes"},{cond:"shouldConfirmSignInWithNewPassword",actions:["setMissingAttributes","setNextSignInStep"],target:"#signInActor.forceChangePassword"},{cond:"shouldResetPasswordFromSignIn",actions:"setNextSignInStep",target:"#signInActor.resetPassword"},{cond:"shouldConfirmSignUpFromSignIn",actions:"setNextSignInStep",target:"#signInActor.resendSignUpCode"},{actions:["setChallengeName","setMissingAttributes","setNextSignInStep","setTotpSecretCode","setAllowedMfaTypes","setCodeDeliveryDetails"],target:"#signInActor.init"}],onError:{actions:"setRemoteError",target:"edit"}},em=t=>({initial:"edit",exit:t,states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},SIGN_IN:"#signInActor.signIn",CHANGE:{actions:"handleInput"},RESEND:{target:"resend"}}},submit:{tags:"pending",entry:["sendUpdate","clearError"],invoke:{src:"confirmSignIn",...av}},resend:{tags:"pending",entry:["sendUpdate","clearError"],invoke:{src:"resendSignInCode",onDone:{actions:["setCodeDeliveryDetails","sendUpdate"],target:"edit"},onError:{actions:"setRemoteError",target:"edit"}}}}});function Lae({services:t}){return yd({id:"signInActor",initial:"init",predictableActionArguments:!0,states:{init:{always:[{cond:"shouldConfirmSignIn",target:"confirmSignIn"},{cond:"shouldSetupTotp",target:"setupTotp"},{cond:"shouldSetupEmail",target:"setupEmail"},{cond:"shouldSelectMfaType",target:"selectMfaType"},{cond:({step:e})=>e==="CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED",actions:"setActorDoneData",target:"forceChangePassword"},{target:"signIn"}]},federatedSignIn:{...BF("signIn")},fetchUserAttributes:{invoke:{src:"fetchUserAttributes",onDone:[{cond:"hasPasskeyRegistrationPrompts",actions:"setFetchedUserAttributes",target:"checkPasskeys"},{actions:"setFetchedUserAttributes",target:"evaluatePasskeyPrompt"}],onError:{actions:"setConfirmAttributeCompleteStep",target:"#signInActor.resolved"}}},checkPasskeys:{invoke:{src:async()=>{try{const e=await MT();return e.credentials&&e.credentials.length>0}catch{return!1}},onDone:{actions:"setHasExistingPasskeys",target:"evaluatePasskeyPrompt"},onError:{actions:"clearHasExistingPasskeys",target:"evaluatePasskeyPrompt"}}},evaluatePasskeyPrompt:{always:[{cond:"shouldPromptPasskeyRegistration",target:"#signInActor.passkeyPrompt"},{cond:"shouldVerifyAttribute",actions:["setShouldVerifyUserAttributeStep","setUnverifiedUserAttributes"],target:"#signInActor.resolved"},{actions:"setConfirmAttributeCompleteStep",target:"#signInActor.resolved"}]},resendSignUpCode:{invoke:{src:"handleResendSignUpCode",onDone:{actions:"setCodeDeliveryDetails",target:"#signInActor.resolved"},onError:{actions:"setRemoteError",target:"#signInActor.signIn"}}},resetPassword:{invoke:{src:"resetPassword",onDone:[{actions:"setCodeDeliveryDetails",target:"#signInActor.resolved"}],onError:{actions:["setRemoteError","sendUpdate"]}}},signIn:{initial:"edit",exit:"clearTouched",states:{edit:{entry:"sendUpdate",on:{CHANGE:{actions:"handleInput"},FEDERATED_SIGN_IN:{target:"#signInActor.federatedSignIn"},SHOW_AUTH_METHODS:{actions:"setUsernameSignIn",target:"selectMethod"},SUBMIT:[{cond:"shouldSelectAuthMethod",actions:"handleSubmit",target:"selectMethod"},{actions:"handleSubmit",target:"submit"}]}},selectMethod:{entry:["sendUpdate","setSelectAuthMethodStep","setUsernameSignIn"],on:{SELECT_METHOD:{actions:"setSelectedAuthMethod",target:"submit"},SUBMIT:{actions:["handleSubmit","setSelectedAuthMethodFromForm"],target:"submit"},SIGN_IN:{target:"edit"}}},submit:{tags:"pending",entry:["clearError","sendUpdate","setUsernameSignIn"],exit:"clearFormValues",invoke:{src:"handleSignIn",onDone:av.onDone,onError:[{cond:"shouldReturnToSelectMethod",actions:"setRemoteError",target:"selectMethod"},av.onError]}}}},confirmSignIn:{...em(["clearChallengeName","clearFormValues","clearError","clearTouched"])},forceChangePassword:{entry:"sendUpdate",type:"parallel",exit:["clearFormValues","clearError","clearTouched"],states:{validation:{initial:"pending",states:{pending:{invoke:{src:"validateFields",onDone:{target:"valid",actions:"clearValidationError"},onError:{target:"invalid",actions:"setFieldErrors"}}},valid:{entry:"sendUpdate"},invalid:{entry:"sendUpdate"}},on:{SIGN_IN:{actions:"setSignInStep",target:"#signInActor.resolved"},CHANGE:{actions:"handleInput",target:".pending"},BLUR:{actions:"handleBlur",target:".pending"}}},submit:{initial:"edit",entry:"clearError",states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"validate"}}},validate:{entry:"sendUpdate",invoke:{src:"validateFields",onDone:{actions:"clearValidationError",target:"pending"},onError:{actions:"setFieldErrors",target:"edit"}}},pending:{tags:"pending",entry:["sendUpdate","clearError"],invoke:{src:"handleForceChangePassword",...av}}}}}},setupTotp:{...em(["clearFormValues","clearError","clearTouched"])},setupEmail:{...em(["clearFormValues","clearError","clearTouched"])},selectMfaType:{...em(["clearFormValues","clearError","clearTouched"])},passkeyPrompt:{entry:"sendUpdate",on:{SUBMIT:{actions:"setConfirmAttributeCompleteStep",target:"resolved"},SKIP:{actions:"setConfirmAttributeCompleteStep",target:"resolved"}}},resolved:{type:"final",data:e=>({codeDeliveryDetails:e.codeDeliveryDetails,remoteError:e.remoteError,step:e.step,unverifiedUserAttributes:e.unverifiedUserAttributes,username:e.username})}}},{actions:{...cp,sendUpdate:tb()},guards:ob,services:{async fetchUserAttributes(){return v8()},resetPassword({username:e}){return c8({username:e})},handleResendSignUpCode({username:e}){return t.handleResendSignUpCode({username:e})},resendSignInCode({username:e,selectedAuthMethod:n,availableAuthMethods:r,preferredChallenge:s}){const o=n??s??r?.[0]??"PASSWORD";return t.handleSignIn({username:e,options:{authFlowType:"USER_AUTH",preferredChallenge:o}})},handleSignIn({formValues:e,username:n,selectedAuthMethod:r,availableAuthMethods:s,preferredChallenge:o}){const a=r??o??s?.[0]??"PASSWORD";if(a==="PASSWORD"){const{password:u}=e;return t.handleSignIn({username:n,password:u})}else return t.handleSignIn({username:n,options:{authFlowType:"USER_AUTH",preferredChallenge:a}})},confirmSignIn({formValues:e,step:n}){const r=Dae(n),{[r]:s}=e;return t.handleConfirmSignIn({challengeResponse:s})},async handleForceChangePassword({formValues:e}){let{password:n,phone_number:r,country_code:s,confirm_password:o,username:a,...u}=e,c;return r&&(c=`${s}${r}`.replace(/[^A-Z0-9+]/gi,""),u={...u,phone_number:c}),d8({challengeResponse:n,options:{userAttributes:u}})},signInWithRedirect(e,{data:n}){return m8(n)},async validateFields(e){return ib(e.formValues,e.touched,e.passwordSettings,[Ua.validateFormPassword,Ua.validateConfirmPassword])}}})}const Uae={onDone:[{actions:"setCodeDeliveryDetails",target:"#signUpActor.resolved"}],onError:{actions:["setRemoteError","sendUpdate"]}},Fae={onDone:[{cond:"hasCompletedSignIn",actions:"setNextSignInStep",target:"#signUpActor.fetchUserAttributes"},{cond:"shouldConfirmSignInWithNewPassword",actions:"setNextSignInStep",target:"#signUpActor.resolved"},{cond:"shouldResetPasswordFromSignIn",actions:"setNextSignInStep",target:"#signUpActor.resetPassword"},{cond:"shouldConfirmSignUpFromSignIn",actions:"setNextSignInStep",target:"#signUpActor.resendSignUpCode"},{actions:["setNextSignInStep","setChallengeName","setMissingAttributes","setTotpSecretCode","setAllowedMfaTypes"],target:"#signUpActor.resolved"}],onError:{actions:"setRemoteError",target:"#signUpActor.resolved"}};function zae({services:t}){return yd({id:"signUpActor",initial:"init",predictableActionArguments:!0,states:{init:{always:[{cond:"shouldConfirmSignUp",target:"confirmSignUp"},{target:"signUp"}]},autoSignIn:{tags:"pending",invoke:{src:"autoSignIn",...Fae}},fetchUserAttributes:{invoke:{src:"fetchUserAttributes",onDone:[{cond:"hasPasskeyRegistrationPrompts",actions:"setFetchedUserAttributes",target:"checkPasskeys"},{actions:"setFetchedUserAttributes",target:"evaluatePasskeyPrompt"}],onError:{actions:"setConfirmAttributeCompleteStep",target:"#signUpActor.resolved"}}},checkPasskeys:{invoke:{src:async()=>{try{const e=await MT();return e.credentials&&e.credentials.length>0}catch{return!1}},onDone:{actions:"setHasExistingPasskeys",target:"evaluatePasskeyPrompt"},onError:{actions:"clearHasExistingPasskeys",target:"evaluatePasskeyPrompt"}}},evaluatePasskeyPrompt:{always:[{cond:"shouldPromptPasskeyRegistrationAfterSignup",target:"#signUpActor.passkeyPrompt"},{cond:"shouldVerifyAttribute",actions:["setShouldVerifyUserAttributeStep","setUnverifiedUserAttributes"],target:"#signUpActor.resolved"},{actions:"setConfirmAttributeCompleteStep",target:"#signUpActor.resolved"}]},federatedSignIn:{...BF("signUp")},resetPassword:{invoke:{src:"resetPassword",...Uae}},resendSignUpCode:{tags:"pending",entry:"sendUpdate",exit:"sendUpdate",invoke:{src:"resendSignUpCode",onDone:{actions:["setCodeDeliveryDetails","sendUpdate"],target:"#signUpActor.confirmSignUp"},onError:[{cond:"isUserAlreadyConfirmed",target:"#signUpActor.resolved"},{actions:["setRemoteError","sendUpdate"],target:"#signUpActor.confirmSignUp"}]}},signUp:{type:"parallel",exit:"clearTouched",on:{FEDERATED_SIGN_IN:{target:"federatedSignIn"}},states:{validation:{initial:"pending",states:{pending:{invoke:{src:"validateSignUp",onDone:{actions:"clearValidationError",target:"valid"},onError:{actions:"setFieldErrors",target:"invalid"}}},valid:{entry:"sendUpdate"},invalid:{entry:"sendUpdate"}},on:{BLUR:{actions:"handleBlur",target:".pending"},CHANGE:{actions:"handleInput",target:".pending"}}},submission:{initial:"idle",states:{idle:{entry:["sendUpdate"],on:{SUBMIT:{actions:["setSelectedAuthMethodFromForm","handleSubmit"],target:"validate"}}},validate:{entry:"sendUpdate",invoke:{src:"validateSignUp",onDone:{target:"handleSignUp",actions:"clearValidationError"},onError:{actions:"setFieldErrors",target:"idle"}}},handleSignUp:{tags:"pending",entry:["setUsernameSignUp","clearError"],exit:"sendUpdate",invoke:{src:"handleSignUp",onDone:[{cond:"hasCompletedSignUp",actions:"setNextSignUpStep",target:"#signUpActor.resolved"},{cond:"shouldAutoSignIn",actions:"setNextSignUpStep",target:"#signUpActor.autoSignIn"},{actions:["setCodeDeliveryDetails","setNextSignUpStep"],target:"#signUpActor.init"}],onError:{actions:["sendUpdate","setRemoteError"],target:"idle"}}}}}}},confirmSignUp:{initial:"edit",entry:"sendUpdate",states:{edit:{on:{SUBMIT:{actions:"handleSubmit",target:"submit"},CHANGE:{actions:"handleInput"},BLUR:{actions:"handleBlur"},RESEND:"#signUpActor.resendSignUpCode"}},submit:{tags:"pending",entry:["clearError","sendUpdate"],invoke:{src:"confirmSignUp",onDone:[{cond:"shouldAutoSignIn",actions:["setNextSignUpStep","clearFormValues"],target:"#signUpActor.autoSignIn"},{cond:"shouldManualSignIn",actions:["clearFormValues","setSignInStep"],target:"#signUpActor.resolved"},{actions:"setNextSignUpStep",target:"#signUpActor.init"}],onError:{actions:["setRemoteError","sendUpdate"],target:"edit"}}}}},passkeyPrompt:{entry:"sendUpdate",on:{SKIP:{actions:"setConfirmAttributeCompleteStep",target:"resolved"},SUBMIT:{actions:"setConfirmAttributeCompleteStep",target:"resolved"}}},resolved:{type:"final",data:e=>({challengeName:e.challengeName,missingAttributes:e.missingAttributes,remoteError:e.remoteError,step:e.step,totpSecretCode:e.totpSecretCode,username:e.username,unverifiedUserAttributes:e.unverifiedUserAttributes,allowedMfaTypes:e.allowedMfaTypes})}}},{actions:{...cp,sendUpdate:tb()},guards:ob,services:{autoSignIn(){return JA()},async fetchUserAttributes(){return v8()},confirmSignUp({formValues:e,username:n}){const{confirmation_code:r}=e,s={username:n,confirmationCode:r};return t.handleConfirmSignUp(s)},resendSignUpCode({username:e}){return t.handleResendSignUpCode({username:e})},signInWithRedirect(e,{data:n}){return m8(n)},handleSignUp(e){const{formValues:n,loginMechanisms:r,username:s,selectedAuthMethod:o,preferredChallenge:a}=e,u=r[0],f=qoe(s,n,u,o??a);return t.handleSignUp(f)},async validateSignUp(e){return ib(e.formValues,e.touched,e.passwordSettings,[t.validateFormPassword,t.validateConfirmPassword,t.validatePreferredUsername,t.validateRequiredFieldsForAuthMethod,t.validateCustomSignUp])}}})}const jae=()=>yd({initial:"pending",id:"signOutActor",predictableActionArguments:!0,states:{pending:{tags:"pending",invoke:{src:"signOut",onDone:"resolved",onError:"rejected"}},resolved:{type:"final"},rejected:{type:"final"}}},{services:{signOut:()=>XY()}});function Bae(){return yd({id:"verifyUserAttributesActor",initial:"selectUserAttributes",predictableActionArguments:!0,states:{selectUserAttributes:{initial:"edit",exit:["clearError","clearTouched","sendUpdate"],states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},SKIP:{target:"#verifyUserAttributesActor.resolved"},CHANGE:{actions:"handleInput"}}},submit:{tags:"pending",entry:["clearError","sendUpdate"],invoke:{src:"sendUserAttributeVerificationCode",onDone:{actions:["setSelectedUserAttribute","setCodeDeliveryDetails"],target:"#verifyUserAttributesActor.confirmVerifyUserAttribute"},onError:{actions:"setRemoteError",target:"edit"}}}}},confirmVerifyUserAttribute:{initial:"edit",exit:["clearError","clearFormValues","clearTouched"],states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},SKIP:"#verifyUserAttributesActor.resolved",CHANGE:{actions:"handleInput"}}},submit:{tags:"pending",entry:["clearError","sendUpdate"],invoke:{src:"confirmVerifyUserAttribute",onDone:{actions:["setConfirmAttributeCompleteStep","clearSelectedUserAttribute"],target:"#verifyUserAttributesActor.resolved"},onError:{actions:"setRemoteError",target:"edit"}}}}},resolved:{type:"final",data:({step:t})=>({step:t})}}},{actions:{...cp,sendUpdate:tb()},services:{sendUserAttributeVerificationCode({formValues:{unverifiedAttr:t}}){return tZ({userAttributeKey:t})},async confirmVerifyUserAttribute({formValues:{confirmation_code:t},selectedUserAttribute:e}){return wY({confirmationCode:t,userAttributeKey:e})},async validateFields(t){return ib(t.formValues,t.touched,t.passwordSettings,[Ua.validateFormPassword,Ua.validateConfirmPassword])}}})}const tm=(t,e)=>{const n=Voe(t.passwordlessCapabilities,t.config?.passwordless?.hiddenAuthMethods),r=t.config?.passwordless?.preferredAuthMethod??t.passwordlessCapabilities?.preferredChallenge;return{...t.actorDoneData,step:t?.actorDoneData?.step??e,formValues:{},touched:{},validationError:{},formFields:t.config?.formFields,loginMechanisms:t.config?.loginMechanisms,passwordSettings:t.config?.passwordSettings,signUpAttributes:t.config?.signUpAttributes,socialProviders:t.config?.socialProviders,availableAuthMethods:n,preferredChallenge:r,passwordless:t.config?.passwordless}},{choose:Hae,stop:$ae}=CF,kf=t=>$ae(t),qae={on:{INIT:{actions:"configure",target:"getConfig"},SIGN_OUT:"#authenticator.signOut"}},Wae={always:{actions:"configure",target:"getConfig"}};function Vae(t){const{useNextWaitConfig:e,...n}=t??{};return yd({id:"authenticator",initial:"idle",context:{user:void 0,config:{},services:Ua,actorRef:void 0,hasSetup:!1},predictableActionArguments:!0,states:{idle:{invoke:{src:"handleGetCurrentUser",onDone:{actions:"setUser",target:"setup"},onError:{target:"setup"}}},setup:{initial:"initConfig",states:{initConfig:e?Wae:qae,getConfig:{invoke:{src:"getAmplifyConfig",onDone:[{actions:["applyAmplifyConfig","setHasSetup"],cond:"hasUser",target:"#authenticator.authenticated"},{actions:["applyAmplifyConfig","setHasSetup"],target:"goToInitialState"}]}},goToInitialState:{always:[{cond:"isInitialStateSignUp",target:"#authenticator.signUpActor"},{cond:"isInitialStateResetPassword",target:"#authenticator.forgotPasswordActor"},{target:"#authenticator.signInActor"}]}}},getCurrentUser:{invoke:{src:"handleGetCurrentUser",onDone:{actions:"setUser",target:"#authenticator.authenticated"},onError:{target:"#authenticator.setup"}}},signInActor:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnSignInActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:kf("signInActor")}},on:{FORGOT_PASSWORD:"forgotPasswordActor",SELECT_METHOD:{actions:"forwardToActor"},SHOW_AUTH_METHODS:{actions:"forwardToActor"},SIGN_IN:"signInActor",SIGN_UP:"signUpActor","done.invoke.signInActor":[{cond:"hasCompletedAttributeConfirmation",target:"#authenticator.getCurrentUser"},{cond:"isShouldConfirmUserAttributeStep",actions:"setActorDoneData",target:"#authenticator.verifyUserAttributesActor"},{cond:"isResetPasswordStep",actions:"setActorDoneData",target:"#authenticator.forgotPasswordActor"},{cond:"isConfirmSignUpStep",actions:"setActorDoneData",target:"#authenticator.signUpActor"}]}},signUpActor:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnSignUpActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:kf("signUpActor")}},on:{SIGN_IN:"signInActor","done.invoke.signUpActor":[{cond:"hasCompletedAttributeConfirmation",target:"#authenticator.getCurrentUser"},{cond:"isShouldConfirmUserAttributeStep",actions:"setActorDoneData",target:"#authenticator.verifyUserAttributesActor"},{cond:"isConfirmUserAttributeStep",target:"#authenticator.verifyUserAttributesActor"},{actions:"setActorDoneData",target:"#authenticator.signInActor"}]}},forgotPasswordActor:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnForgotPasswordActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:kf("forgotPasswordActor")}},on:{SIGN_IN:"signInActor","done.invoke.forgotPasswordActor":[{target:"#authenticator.signInActor"}]}},verifyUserAttributesActor:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnVerifyUserAttributesActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:kf("verifyUserAttributesActor")}},on:{"done.invoke.verifyUserAttributesActor":[{actions:"setActorDoneData",target:"#authenticator.getCurrentUser"}]}},authenticated:{initial:"idle",states:{idle:{on:{TOKEN_REFRESH:"refreshUser"}},refreshUser:{invoke:{src:"#authenticator.getCurrentUser",onDone:{actions:"setUser",target:"idle"},onError:{target:"#authenticator.signOut"}}}},on:{SIGN_OUT:"signOut"}},signOut:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnSignOutActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:kf("signOutActor")}},on:{"done.invoke.signOutActor":{actions:"clearUser",target:"setup.getConfig"}}}},on:{SIGN_IN_WITH_REDIRECT:{target:"#authenticator.getCurrentUser"},CHANGE:{actions:"forwardToActor"},BLUR:{actions:"forwardToActor"},SUBMIT:{actions:"forwardToActor"},FEDERATED_SIGN_IN:{actions:"forwardToActor"},RESEND:{actions:"forwardToActor"},SIGN_IN:{actions:"forwardToActor"},SKIP:{actions:"forwardToActor"}}},{actions:{...cp,forwardToActor:Hae([{cond:"hasActor",actions:Wre(({actorRef:s})=>s)}]),setActorDoneData:ni({actorDoneData:(s,o)=>({challengeName:o.data.challengeName,codeDeliveryDetails:o.data.codeDeliveryDetails,missingAttributes:o.data.missingAttributes,remoteError:o.data.remoteError,username:o.data.username,step:o.data.step,totpSecretCode:o.data.totpSecretCode,unverifiedUserAttributes:o.data.unverifiedUserAttributes,allowedMfaTypes:o.data.allowedMfaTypes})}),applyAmplifyConfig:ni({passwordlessCapabilities:(s,{data:o})=>o.passwordlessCapabilities,config(s,{data:o}){const{loginMechanisms:a=o.loginMechanisms??[],signUpAttributes:u=o.signUpAttributes??[],socialProviders:c=o.socialProviders??[],initialState:f,formFields:h,passwordSettings:g=o.passwordFormat??{},passwordless:m}=s.config;return a.length===0&&a.push("username"),{formFields:Gae(h)??{},initialState:f,loginMechanisms:a,passwordSettings:g,passwordless:m,signUpAttributes:u,socialProviders:c}}}),spawnSignInActor:ni({actorRef:(s,o)=>{const{services:a}=s,u=Lae({services:a}).withContext(tm(s,"SIGN_IN"));return Pf(u,{name:"signInActor"})}}),spawnSignUpActor:ni({actorRef:(s,o)=>{const{services:a}=s,u=zae({services:a}).withContext(tm(s,"SIGN_UP"));return Pf(u,{name:"signUpActor"})}}),spawnForgotPasswordActor:ni({actorRef:(s,o)=>{const{services:a}=s,u=kae({services:a}).withContext(tm(s,"FORGOT_PASSWORD"));return Pf(u,{name:"forgotPasswordActor"})}}),spawnVerifyUserAttributesActor:ni({actorRef:s=>{const o=Bae().withContext(tm(s));return Pf(o,{name:"verifyUserAttributesActor"})}}),spawnSignOutActor:ni({actorRef:s=>{const o=jae().withContext({user:s?.user});return Pf(o,{name:"signOutActor"})}}),configure:ni((s,o)=>{const{services:a,...u}=IF(n)?o.data??{}:n;return{services:{...Ua,...a},config:u}}),setHasSetup:ni({hasSetup:!0})},guards:{...ob,hasActor:({actorRef:s})=>!!s,isInitialStateSignUp:({config:s})=>s.initialState==="signUp",isInitialStateResetPassword:({config:s})=>s.initialState==="forgotPassword",shouldSetup:({hasSetup:s})=>!s,hasUser:({user:s})=>!!s},services:{getAmplifyConfig:({services:s})=>s.getAmplifyConfig(),handleGetCurrentUser:({services:s})=>s.getCurrentUser()}})}function Gae(t){return t&&Object.keys(t).forEach(e=>{Object.keys(t[e]).forEach(n=>{let r=t[e][n];r.required=r.isRequired})}),t}const Kae={small:{value:"1px"},medium:{value:"2px"},large:{value:"3px"}},Yae={red:{10:{value:"hsl(0, 75%, 95%)"},20:{value:"hsl(0, 75%, 85%)"},40:{value:"hsl(0, 75%, 75%)"},60:{value:"hsl(0, 50%, 50%)"},80:{value:"hsl(0, 95%, 30%)"},90:{value:"hsl(0, 100%, 20%)"},100:{value:"hsl(0, 100%, 15%)"}},orange:{10:{value:"hsl(30, 75%, 95%)"},20:{value:"hsl(30, 75%, 85%)"},40:{value:"hsl(30, 75%, 75%)"},60:{value:"hsl(30, 50%, 50%)"},80:{value:"hsl(30, 95%, 30%)"},90:{value:"hsl(30, 100%, 20%)"},100:{value:"hsl(30, 100%, 15%)"}},yellow:{10:{value:"hsl(60, 75%, 95%)"},20:{value:"hsl(60, 75%, 85%)"},40:{value:"hsl(60, 75%, 75%)"},60:{value:"hsl(60, 50%, 50%)"},80:{value:"hsl(60, 95%, 30%)"},90:{value:"hsl(60, 100%, 20%)"},100:{value:"hsl(60, 100%, 15%)"}},green:{10:{value:"hsl(130, 60%, 95%)"},20:{value:"hsl(130, 60%, 90%)"},40:{value:"hsl(130, 44%, 63%)"},60:{value:"hsl(130, 43%, 46%)"},80:{value:"hsl(130, 33%, 37%)"},90:{value:"hsl(130, 27%, 29%)"},100:{value:"hsl(130, 22%, 23%)"}},teal:{10:{value:"hsl(190, 75%, 95%)"},20:{value:"hsl(190, 75%, 85%)"},40:{value:"hsl(190, 70%, 70%)"},60:{value:"hsl(190, 50%, 50%)"},80:{value:"hsl(190, 95%, 30%)"},90:{value:"hsl(190, 100%, 20%)"},100:{value:"hsl(190, 100%, 15%)"}},blue:{10:{value:"hsl(220, 95%, 95%)"},20:{value:"hsl(220, 85%, 85%)"},40:{value:"hsl(220, 70%, 70%)"},60:{value:"hsl(220, 50%, 50%)"},80:{value:"hsl(220, 95%, 30%)"},90:{value:"hsl(220, 100%, 20%)"},100:{value:"hsl(220, 100%, 15%)"}},purple:{10:{value:"hsl(300, 95%, 95%)"},20:{value:"hsl(300, 85%, 85%)"},40:{value:"hsl(300, 70%, 70%)"},60:{value:"hsl(300, 50%, 50%)"},80:{value:"hsl(300, 95%, 30%)"},90:{value:"hsl(300, 100%, 20%)"},100:{value:"hsl(300, 100%, 15%)"}},pink:{10:{value:"hsl(340, 95%, 95%)"},20:{value:"hsl(340, 90%, 85%)"},40:{value:"hsl(340, 70%, 70%)"},60:{value:"hsl(340, 50%, 50%)"},80:{value:"hsl(340, 95%, 30%)"},90:{value:"hsl(340, 100%, 20%)"},100:{value:"hsl(340, 100%, 15%)"}},neutral:{10:{value:"hsl(210, 5%, 98%)"},20:{value:"hsl(210, 5%, 94%)"},40:{value:"hsl(210, 5%, 87%)"},60:{value:"hsl(210, 10%, 58%)"},80:{value:"hsl(210, 10%, 40%)"},90:{value:"hsl(210, 25%, 25%)"},100:{value:"hsl(210, 50%, 10%)"}},primary:{10:{value:"{colors.teal.10.value}"},20:{value:"{colors.teal.20.value}"},40:{value:"{colors.teal.40.value}"},60:{value:"{colors.teal.60.value}"},80:{value:"{colors.teal.80.value}"},90:{value:"{colors.teal.90.value}"},100:{value:"{colors.teal.100.value}"}},secondary:{10:{value:"{colors.purple.10.value}"},20:{value:"{colors.purple.20.value}"},40:{value:"{colors.purple.40.value}"},60:{value:"{colors.purple.60.value}"},80:{value:"{colors.purple.80.value}"},90:{value:"{colors.purple.90.value}"},100:{value:"{colors.purple.100.value}"}},font:{primary:{value:"{colors.neutral.100.value}"},secondary:{value:"{colors.neutral.90.value}"},tertiary:{value:"{colors.neutral.80.value}"},disabled:{value:"{colors.neutral.60.value}"},inverse:{value:"{colors.white.value}"},interactive:{value:"{colors.primary.80.value}"},hover:{value:"{colors.primary.90.value}"},focus:{value:"{colors.primary.100.value}"},active:{value:"{colors.primary.100.value}"},info:{value:"{colors.blue.90.value}"},warning:{value:"{colors.orange.90.value}"},error:{value:"{colors.red.90.value}"},success:{value:"{colors.green.90.value}"}},background:{primary:{value:"{colors.white.value}"},secondary:{value:"{colors.neutral.10.value}"},tertiary:{value:"{colors.neutral.20.value}"},quaternary:{value:"{colors.neutral.60.value}"},disabled:{value:"{colors.background.tertiary.value}"},info:{value:"{colors.blue.10.value}"},warning:{value:"{colors.orange.10.value}"},error:{value:"{colors.red.10.value}"},success:{value:"{colors.green.10.value}"}},border:{primary:{value:"{colors.neutral.60.value}"},secondary:{value:"{colors.neutral.40.value}"},tertiary:{value:"{colors.neutral.20.value}"},disabled:{value:"{colors.border.tertiary.value}"},pressed:{value:"{colors.primary.100.value}"},focus:{value:"{colors.primary.100.value}"},error:{value:"{colors.red.80.value}"},info:{value:"{colors.blue.80.value}"},success:{value:"{colors.green.80.value}"},warning:{value:"{colors.orange.80.value}"}},shadow:{primary:{value:"hsla(210, 50%, 10%, 0.25)"},secondary:{value:"hsla(210, 50%, 10%, 0.15)"},tertiary:{value:"hsla(210, 50%, 10%, 0.05)"}},overlay:{5:{value:"hsla(0, 0%, 0%, 0.05)"},10:{value:"hsla(0, 0%, 0%, 0.1)"},20:{value:"hsla(0, 0%, 0%, 0.2)"},30:{value:"hsla(0, 0%, 0%, 0.3)"},40:{value:"hsla(0, 0%, 0%, 0.4)"},50:{value:"hsla(0, 0%, 0%, 0.5)"},60:{value:"hsla(0, 0%, 0%, 0.6)"},70:{value:"hsla(0, 0%, 0%, 0.7)"},80:{value:"hsla(0, 0%, 0%, 0.8)"},90:{value:"hsla(0, 0%, 0%, 0.9)"}},black:{value:"hsl(0, 0%, 0%)"},white:{value:"hsl(0, 0%, 100%)"},transparent:{value:"transparent"}},Zae={alignItems:{value:"center"},justifyContent:{value:"space-between"},color:{value:"{colors.font.primary.value}"},backgroundColor:{value:"{colors.background.tertiary.value}"},paddingBlock:{value:"{space.small.value}"},paddingInline:{value:"{space.medium.value}"},icon:{size:{value:"{fontSizes.xl.value}"}},heading:{fontSize:{value:"{fontSizes.medium.value}"},fontWeight:{value:"{fontWeights.bold.value}"}},info:{color:{value:"{colors.font.info.value}"},backgroundColor:{value:"{colors.background.info.value}"}},error:{color:{value:"{colors.font.error.value}"},backgroundColor:{value:"{colors.background.error.value}"}},warning:{color:{value:"{colors.font.warning.value}"},backgroundColor:{value:"{colors.background.warning.value}"}},success:{color:{value:"{colors.font.success.value}"},backgroundColor:{value:"{colors.background.success.value}"}}},Xae={message:{backgroundColor:{value:"{colors.background.secondary.value}"},borderRadius:{value:"{radii.large.value}"},gap:{value:"{space.small.value}"},paddingBlock:{value:"{space.small.value}"},paddingInline:{value:"{space.small.value}"},user:{backgroundColor:{value:"{colors.background.secondary.value}"}},assistant:{backgroundColor:{value:"{colors.primary.10.value}"}},sender:{gap:{value:"{space.small.value}"},username:{color:{value:"{colors.font.primary.value}"},fontSize:{value:"inherit"},fontWeight:{value:"{fontWeights.bold.value}"}},timestamp:{color:{value:"{colors.font.tertiary.value}"},fontSize:{value:"inherit"},fontWeight:{value:"inherit"}}},body:{gap:{value:"{space.xs.value}"}},actions:{gap:{value:"{space.xs.value}"}}},form:{gap:{value:"{space.small.value}"},padding:{value:"{space.small.value}"}},attachment:{borderColor:{value:"{colors.border.secondary.value}"},borderWidth:{value:"{borderWidths.small.value}"},borderRadius:{value:"{radii.small.value}"},fontSize:{value:"{fontSizes.small.value}"},paddingBlock:{value:"{space.xxxs.value}"},paddingInline:{value:"{space.xs.value}"},gap:{value:"{space.xs.value}"},list:{padding:{value:"{space.xs.value}"},paddingBlockStart:{value:"0"},gap:{value:"{space.xxs.value}"}},name:{color:{value:"{colors.font.primary.value}"},fontSize:{value:"{fontSizes.small.value}"},fontWeight:{value:"{fontWeights.normal.value}"}},size:{color:{value:"{colors.font.tertiary.value}"},fontSize:{value:"{fontSizes.small.value}"},fontWeight:{value:"{fontWeights.normal.value}"}},remove:{padding:{value:"{space.xxs.value}"}},image:{width:{value:"{fontSizes.medium.value}"},height:{value:"{fontSizes.medium.value}"}}}},Qae={menu:{width:{value:"100%"},marginBlockStart:{value:"{space.xxxs}"},backgroundColor:{value:"{colors.background.primary}"},borderColor:{value:"{colors.border.primary}"},borderWidth:{value:"{borderWidths.small}"},borderStyle:{value:"solid"},borderRadius:{value:"{radii.small}"},options:{display:{value:"flex"},flexDirection:{value:"column"},maxHeight:{value:"300px"}},option:{backgroundColor:{value:"{colors.background.primary}"},color:{value:"currentcolor"},cursor:{value:"pointer"},transitionDuration:{value:"{time.short}"},transitionProperty:{value:"background-color, color"},transitionTimingFunction:{value:"ease"},_active:{backgroundColor:{value:"{colors.primary.80}"},color:{value:"{colors.white}"}}},_empty:{display:{value:"flex"}},_loading:{alignItems:{value:"center"},display:{value:"flex"},gap:{value:"{space.xxxs}"}},spaceShared:{paddingBlock:{value:"{space.xs}"},paddingInline:{value:"{space.small}"}}}},Jae={maxWidth:{value:"60rem"},modal:{width:{value:"{space.relative.full}"},height:{value:"{space.relative.full}"},backgroundColor:{value:"{colors.overlay.50.value}"},top:{value:"{space.zero}"},left:{value:"{space.zero}"}},container:{widthMax:{value:"30rem"}},router:{borderWidth:{value:"{borderWidths.small.value}"},borderStyle:{value:"solid"},borderColor:{value:"{colors.border.primary.value}"},backgroundColor:{value:"{colors.background.primary.value}"},boxShadow:{value:"{shadows.medium.value}"}},footer:{paddingBottom:{value:"{space.medium.value}"}},form:{padding:{value:"{space.xl.value}"}},state:{inactive:{backgroundColor:{value:"{colors.background.secondary.value}"}}},orContainer:{color:{value:"{colors.neutral.80.value}"},orLine:{backgroundColor:{value:"{colors.background.primary.value}"}}}},ele={color:{value:"{colors.font.tertiary.value}"},lineHeight:{value:1},fontWeight:{value:"{fontWeights.semibold.value}"},fontSize:{value:"{fontSizes.small.value}"},textAlign:{value:"center"},width:{value:"{fontSizes.xxl.value}"},height:{value:"{fontSizes.xxl.value}"},backgroundColor:{value:"{colors.background.tertiary}"},borderRadius:{value:"100%"},borderColor:{value:"{colors.border.primary.value}"},borderWidth:{value:"{borderWidths.medium.value}"},info:{color:{value:"{colors.font.info.value}"},backgroundColor:{value:"{colors.background.info.value}"},borderColor:{value:"{colors.border.info.value}"}},warning:{color:{value:"{colors.font.warning.value}"},backgroundColor:{value:"{colors.background.warning.value}"},borderColor:{value:"{colors.border.warning.value}"}},success:{color:{value:"{colors.font.success.value}"},backgroundColor:{value:"{colors.background.success.value}"},borderColor:{value:"{colors.border.success.value}"}},error:{color:{value:"{colors.font.error.value}"},backgroundColor:{value:"{colors.background.error.value}"},borderColor:{value:"{colors.border.error.value}"}},small:{fontSize:{value:"{fontSizes.xs.value}"},width:{value:"{fontSizes.xl.value}"},height:{value:"{fontSizes.xl.value}"}},large:{fontSize:{value:"{fontSizes.medium.value}"},width:{value:"{fontSizes.xxxl.value}"},height:{value:"{fontSizes.xxxl.value}"}}},tle={color:{value:"{colors.font.primary.value}"},lineHeight:{value:1},fontWeight:{value:"{fontWeights.semibold.value}"},fontSize:{value:"{fontSizes.small.value}"},textAlign:{value:"center"},paddingVertical:{value:"{space.xs.value}"},paddingHorizontal:{value:"{space.small.value}"},backgroundColor:{value:"{colors.background.tertiary.value}"},borderRadius:{value:"{radii.xl.value}"},info:{color:{value:"{colors.font.info.value}"},backgroundColor:{value:"{colors.background.info.value}"}},warning:{color:{value:"{colors.font.warning.value}"},backgroundColor:{value:"{colors.background.warning.value}"}},success:{color:{value:"{colors.font.success.value}"},backgroundColor:{value:"{colors.background.success.value}"}},error:{color:{value:"{colors.font.error.value}"},backgroundColor:{value:"{colors.background.error.value}"}},small:{fontSize:{value:"{fontSizes.xs.value}"},paddingVertical:{value:"{space.xxs.value}"},paddingHorizontal:{value:"{space.xs.value}"}},large:{fontSize:{value:"{fontSizes.medium.value}"},paddingVertical:{value:"{space.small.value}"},paddingHorizontal:{value:"{space.medium.value}"}}},nle={flexDirection:{value:"row"},flexWrap:{value:"wrap"},gap:{value:"0"},color:{value:"{colors.font.tertiary}"},item:{flexDirection:{value:"row"},color:{value:"inherit"},fontSize:{value:"inherit"},alignItems:{value:"center"},lineHeight:{value:"1"}},separator:{color:{value:"inherit"},fontSize:{value:"inherit"},paddingInline:{value:"{space.xxs}"}},link:{color:{value:"{components.link.color}"},fontSize:{value:"inherit"},fontWeight:{value:"normal"},textDecoration:{value:"none"},paddingInline:{value:"{space.xs}"},paddingBlock:{value:"{space.xxs}"},current:{color:{value:"inherit"},fontSize:{value:"inherit"},fontWeight:{value:"normal"},textDecoration:{value:"none"}}}},rle={fontWeight:{value:"{fontWeights.bold.value}"},transitionDuration:{value:"{components.fieldcontrol.transitionDuration.value}"},fontSize:{value:"{components.fieldcontrol.fontSize.value}"},lineHeight:{value:"{components.fieldcontrol.lineHeight.value}"},paddingBlockStart:{value:"{components.fieldcontrol.paddingBlockStart.value}"},paddingBlockEnd:{value:"{components.fieldcontrol.paddingBlockEnd.value}"},paddingInlineStart:{value:"{components.fieldcontrol.paddingInlineStart.value}"},paddingInlineEnd:{value:"{components.fieldcontrol.paddingInlineEnd.value}"},backgroundColor:{value:"transparent"},borderColor:{value:"{components.fieldcontrol.borderColor.value}"},borderWidth:{value:"{components.fieldcontrol.borderWidth.value}"},borderStyle:{value:"{components.fieldcontrol.borderStyle.value}"},borderRadius:{value:"{components.fieldcontrol.borderRadius.value}"},color:{value:"{colors.font.primary.value}"},_hover:{color:{value:"{colors.font.focus.value}"},backgroundColor:{value:"{colors.primary.10.value}"},borderColor:{value:"{colors.primary.60.value}"}},_focus:{color:{value:"{colors.font.focus.value}"},backgroundColor:{value:"{colors.primary.10.value}"},borderColor:{value:"{colors.border.focus.value}"},boxShadow:{value:"{components.fieldcontrol._focus.boxShadow.value}"}},_active:{color:{value:"{colors.font.active.value}"},backgroundColor:{value:"{colors.primary.20.value}"},borderColor:{value:"{colors.primary.100.value}"}},_loading:{color:{value:"{colors.font.disabled.value}"},backgroundColor:{value:"transparent"},borderColor:{value:"{colors.border.tertiary.value}"}},_disabled:{color:{value:"{colors.font.disabled.value}"},backgroundColor:{value:"transparent"},borderColor:{value:"{colors.border.tertiary.value}"}},outlined:{info:{borderColor:{value:"{colors.blue.60.value}"},backgroundColor:{value:"transparent"},color:{value:"{colors.blue.100}"},_hover:{borderColor:{value:"{colors.blue.60.value}"},backgroundColor:{value:"{colors.blue.10.value}"},color:{value:"{colors.blue.100.value}"}},_focus:{borderColor:{value:"{colors.blue.100.value}"},backgroundColor:{value:"{colors.blue.10.value}"},color:{value:"{colors.blue.100.value}"},boxShadow:{value:"{components.fieldcontrol.info._focus.boxShadow.value}"}},_active:{borderColor:{value:"{colors.blue.100.value}"},backgroundColor:{value:"{colors.blue.20.value}"},color:{value:"{colors.blue.100.value}"}}},warning:{borderColor:{value:"{colors.orange.60.value}"},backgroundColor:{value:"transparent"},color:{value:"{colors.orange.100}"},_hover:{borderColor:{value:"{colors.orange.60.value}"},backgroundColor:{value:"{colors.orange.10.value}"},color:{value:"{colors.orange.100.value}"}},_focus:{borderColor:{value:"{colors.orange.100.value}"},backgroundColor:{value:"{colors.orange.10.value}"},color:{value:"{colors.orange.100.value}"},boxShadow:{value:"{components.fieldcontrol.warning._focus.boxShadow.value}"}},_active:{borderColor:{value:"{colors.orange.100.value}"},backgroundColor:{value:"{colors.orange.20.value}"},color:{value:"{colors.orange.100.value}"}}},success:{borderColor:{value:"{colors.green.60.value}"},backgroundColor:{value:"transparent"},color:{value:"{colors.green.100}"},_hover:{borderColor:{value:"{colors.green.60.value}"},backgroundColor:{value:"{colors.green.10.value}"},color:{value:"{colors.green.100.value}"}},_focus:{borderColor:{value:"{colors.green.100.value}"},backgroundColor:{value:"{colors.green.10.value}"},color:{value:"{colors.green.100.value}"},boxShadow:{value:"{components.fieldcontrol.success._focus.boxShadow.value}"}},_active:{borderColor:{value:"{colors.green.100.value}"},backgroundColor:{value:"{colors.green.20.value}"},color:{value:"{colors.green.100.value}"}}},error:{borderColor:{value:"{colors.red.80.value}"},backgroundColor:{value:"transparent"},color:{value:"{colors.red.100}"},_hover:{borderColor:{value:"{colors.red.80.value}"},backgroundColor:{value:"{colors.red.10.value}"},color:{value:"{colors.red.100.value}"}},_focus:{borderColor:{value:"{colors.red.100.value}"},backgroundColor:{value:"{colors.red.10.value}"},color:{value:"{colors.red.100.value}"},boxShadow:{value:"{components.fieldcontrol._error._focus.boxShadow.value}"}},_active:{borderColor:{value:"{colors.red.100.value}"},backgroundColor:{value:"{colors.red.20.value}"},color:{value:"{colors.red.100.value}"}}},overlay:{borderColor:{value:"{colors.overlay.60.value}"},backgroundColor:{value:"transparent"},color:{value:"{colors.font.primary.value}"},_hover:{borderColor:{value:"{colors.overlay.60.value}"},backgroundColor:{value:"{colors.overlay.5.value}"},color:{value:"{colors.neutral.90.value}"}},_focus:{borderColor:{value:"{colors.overlay.90.value}"},backgroundColor:{value:"{colors.overlay.5.value}"},color:{value:"{colors.neutral.90.value}"},boxShadow:{value:"{components.fieldcontrol.overlay._focus.boxShadow.value}"}},_active:{borderColor:{value:"{colors.overlay.90.value}"},backgroundColor:{value:"{colors.overlay.10.value}"},color:{value:"{colors.neutral.100.value}"}}}},primary:{borderColor:{value:"transparent"},borderWidth:{value:"{borderWidths.small.value}"},borderStyle:{value:"solid"},backgroundColor:{value:"{colors.primary.80.value}"},color:{value:"{colors.font.inverse.value}"},_disabled:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.background.disabled.value}"},color:{value:"{colors.font.disabled.value}"}},_loading:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.background.disabled.value}"},color:{value:"{colors.font.disabled.value}"}},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.primary.90.value}"},color:{value:"{colors.font.inverse.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.primary.90.value}"},color:{value:"{colors.font.inverse.value}"},boxShadow:{value:"{components.fieldcontrol._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.primary.100.value}"},color:{value:"{colors.font.inverse.value}"}},info:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.blue.80}"},color:{value:"{colors.font.inverse.value}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.blue.90.value}"},color:{value:"{colors.font.inverse.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.blue.90.value}"},color:{value:"{colors.font.inverse.value}"},boxShadow:{value:"{components.fieldcontrol.info._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.blue.100.value}"},color:{value:"{colors.font.inverse.value}"}}},warning:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.orange.80}"},color:{value:"{colors.font.inverse.value}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.orange.90.value}"},color:{value:"{colors.font.inverse.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.orange.90.value}"},color:{value:"{colors.font.inverse.value}"},boxShadow:{value:"{components.fieldcontrol.overlay._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.orange.100.value}"},color:{value:"{colors.font.inverse.value}"}}},error:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.80}"},color:{value:"{colors.font.inverse.value}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.90.value}"},color:{value:"{colors.font.inverse.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.90.value}"},color:{value:"{colors.font.inverse.value}"},boxShadow:{value:"{components.fieldcontrol._error._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.100.value}"},color:{value:"{colors.font.inverse.value}"}}},success:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.green.80}"},color:{value:"{colors.font.inverse.value}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.green.90.value}"},color:{value:"{colors.font.inverse.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.green.90.value}"},color:{value:"{colors.font.inverse.value}"},boxShadow:{value:"{components.fieldcontrol.success._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.green.100.value}"},color:{value:"{colors.font.inverse.value}"}}},overlay:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.overlay.70}"},color:{value:"{colors.font.inverse.value}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.overlay.90.value}"},color:{value:"{colors.font.inverse.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.overlay.90.value}"},color:{value:"{colors.font.inverse.value}"},boxShadow:{value:"{components.fieldcontrol.overlay._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.overlay.90.value}"},color:{value:"{colors.font.inverse.value}"}}}},menu:{borderWidth:{value:"{space.zero.value}"},backgroundColor:{value:"transparent"},justifyContent:{value:"start"},_hover:{color:{value:"{colors.font.inverse.value}"},backgroundColor:{value:"{colors.primary.80.value}"}},_focus:{color:{value:"{colors.font.inverse.value}"},backgroundColor:{value:"{colors.primary.80.value}"}},_active:{color:{value:"{colors.font.inverse.value}"},backgroundColor:{value:"{colors.primary.90.value}"}},_disabled:{color:{value:"{colors.font.disabled.value}"}}},link:{backgroundColor:{value:"transparent"},borderColor:{value:"transparent"},borderWidth:{value:"{borderWidths.small.value}"},color:{value:"{colors.font.interactive.value}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.primary.10.value}"},color:{value:"{colors.font.hover.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.primary.10.value}"},color:{value:"{colors.font.focus.value}"},boxShadow:{value:"{components.fieldcontrol._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.primary.20.value}"},color:{value:"{colors.font.active.value}"}},_disabled:{borderColor:{value:"transparent"},backgroundColor:{value:"transparent"},color:{value:"{colors.font.disabled.value}"}},_loading:{borderColor:{value:"transparent"},backgroundColor:{value:"transparent"},color:{value:"{colors.font.disabled.value}"}},info:{borderColor:{value:"transparent"},backgroundColor:{value:"transparent"},color:{value:"{colors.blue.100}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.blue.10.value}"},color:{value:"{colors.blue.90.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.blue.10.value}"},color:{value:"{colors.blue.100.value}"},boxShadow:{value:"{components.fieldcontrol.info._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.blue.20.value}"},color:{value:"{colors.blue.100.value}"}}},warning:{borderColor:{value:"transparent"},backgroundColor:{value:"transparent"},color:{value:"{colors.orange.100}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.orange.10.value}"},color:{value:"{colors.orange.90.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.orange.10.value}"},color:{value:"{colors.orange.100.value}"},boxShadow:{value:"{components.fieldcontrol.warning._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.orange.20.value}"},color:{value:"{colors.orange.100.value}"}}},success:{borderColor:{value:"transparent"},backgroundColor:{value:"transparent"},color:{value:"{colors.green.100}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.green.10.value}"},color:{value:"{colors.green.90.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.green.10.value}"},color:{value:"{colors.green.100.value}"},boxShadow:{value:"{components.fieldcontrol.success._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.green.20.value}"},color:{value:"{colors.green.100.value}"}}},error:{borderColor:{value:"transparent"},backgroundColor:{value:"transparent"},color:{value:"{colors.red.100}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.10.value}"},color:{value:"{colors.red.90.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.10.value}"},color:{value:"{colors.red.100.value}"},boxShadow:{value:"{components.fieldcontrol._error._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.20.value}"},color:{value:"{colors.red.100.value}"}}},overlay:{borderColor:{value:"transparent"},backgroundColor:{value:"transparent"},color:{value:"{colors.neutral.100}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.overlay.5.value}"},color:{value:"{colors.overlay.80.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.overlay.5.value}"},color:{value:"{colors.overlay.90.value}"},boxShadow:{value:"{components.fieldcontrol.overlay._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.overlay.10.value}"},color:{value:"{colors.overlay.90.value}"}}}},warning:{backgroundColor:{value:"transparent"},borderColor:{value:"{colors.red.60}"},borderWidth:{value:"{borderWidths.small}"},color:{value:"{colors.red.60}"},_hover:{borderColor:{value:"{colors.red.80}"},backgroundColor:{value:"{colors.red.10}"},color:{value:"{colors.font.error}"}},_focus:{borderColor:{value:"{colors.red.80}"},backgroundColor:{value:"{colors.red.10}"},color:{value:"{colors.red.80}"},boxShadow:{value:"{components.fieldcontrol._error._focus.boxShadow}"}},_active:{borderColor:{value:"{colors.red.100}"},backgroundColor:{value:"{colors.red.20}"},color:{value:"{colors.red.100}"}},_disabled:{borderColor:{value:"{colors.border.tertiary}"},backgroundColor:{value:"transparent"},color:{value:"{colors.font.disabled}"}},_loading:{borderColor:{value:"{colors.border.tertiary}"},backgroundColor:{value:"transparent"},color:{value:"{colors.font.disabled}"}}},destructive:{borderColor:{value:"transparent"},borderWidth:{value:"{borderWidths.small}"},borderStyle:{value:"solid"},backgroundColor:{value:"{colors.red.60}"},color:{value:"{colors.font.inverse}"},_disabled:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.background.disabled}"},color:{value:"{colors.font.disabled}"}},_loading:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.background.disabled}"},color:{value:"{colors.font.disabled}"}},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.80}"},color:{value:"{colors.font.inverse}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.80}"},color:{value:"{colors.font.inverse}"},boxShadow:{value:"{components.fieldcontrol._error._focus.boxShadow}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.100}"},color:{value:"{colors.font.inverse}"}}},small:{fontSize:{value:"{components.fieldcontrol.small.fontSize.value}"},paddingBlockStart:{value:"{components.fieldcontrol.small.paddingBlockStart.value}"},paddingBlockEnd:{value:"{components.fieldcontrol.small.paddingBlockEnd.value}"},paddingInlineStart:{value:"{components.fieldcontrol.small.paddingInlineStart.value}"},paddingInlineEnd:{value:"{components.fieldcontrol.small.paddingInlineEnd.value}"}},large:{fontSize:{value:"{components.fieldcontrol.large.fontSize.value}"},paddingBlockStart:{value:"{components.fieldcontrol.large.paddingBlockStart.value}"},paddingBlockEnd:{value:"{components.fieldcontrol.large.paddingBlockEnd.value}"},paddingInlineStart:{value:"{components.fieldcontrol.large.paddingInlineStart.value}"},paddingInlineEnd:{value:"{components.fieldcontrol.large.paddingInlineEnd.value}"}},loaderWrapper:{alignItems:{value:"center"},gap:{value:"{space.xs.value}"}}},sle={backgroundColor:{value:"{colors.background.primary.value}"},borderRadius:{value:"{radii.xs.value}"},borderWidth:{value:"0"},borderStyle:{value:"solid"},borderColor:{value:"transparent"},boxShadow:{value:"none"},padding:{value:"{space.medium.value}"},outlined:{backgroundColor:{value:"{components.card.backgroundColor.value}"},borderRadius:{value:"{radii.xs.value}"},borderWidth:{value:"{borderWidths.small.value}"},borderStyle:{value:"solid"},borderColor:{value:"{colors.border.primary.value}"},boxShadow:{value:"{components.card.boxShadow.value}"}},elevated:{backgroundColor:{value:"{components.card.backgroundColor.value}"},borderRadius:{value:"{radii.xs.value}"},borderWidth:{value:"0"},borderStyle:{value:"solid"},borderColor:{value:"transparent"},boxShadow:{value:"{shadows.medium.value}"}}},ole={cursor:{value:"pointer"},alignItems:{value:"center"},_disabled:{cursor:{value:"not-allowed"}},button:{position:{value:"relative"},alignItems:{value:"center"},justifyContent:{value:"center"},color:{value:"{colors.font.inverse.value}"},before:{width:{value:"100%"},height:{value:"100%"},borderWidth:{value:"{borderWidths.medium.value}"},borderRadius:{value:"20%"},borderStyle:{value:"solid"},borderColor:{value:"{colors.border.primary.value}"}},_focus:{outlineColor:{value:"{colors.transparent.value}"},outlineStyle:{value:"solid"},outlineWidth:{value:"{outlineWidths.medium.value}"},outlineOffset:{value:"{outlineOffsets.medium.value}"},borderColor:{value:"{colors.border.focus.value}"},boxShadow:{value:"{components.fieldcontrol._focus.boxShadow.value}"}},_disabled:{borderColor:{value:"{colors.border.disabled.value}"}},_error:{borderColor:{value:"{colors.border.error.value}"},_focus:{borderColor:{value:"{colors.border.error.value}"},boxShadow:{value:"{components.fieldcontrol._error._focus.boxShadow.value}"}}}},icon:{backgroundColor:{value:"{colors.primary.80.value}"},borderRadius:{value:"20%"},opacity:{value:"{opacities.0.value}"},transform:{value:"scale(0)"},transitionProperty:{value:"all"},transitionDuration:{value:"{time.short.value}"},transitionTimingFunction:{value:"ease-in-out"},_checked:{opacity:{value:"{opacities.100.value}"},transform:{value:"scale(1)"},_disabled:{backgroundColor:{value:"{colors.background.disabled.value}"}}},_indeterminate:{opacity:{value:"{opacities.100.value}"},transform:{value:"scale(1)"},_disabled:{backgroundColor:{value:"{colors.background.disabled.value}"}}}},label:{color:{value:"{components.text.color.value}"},_disabled:{color:{value:"{colors.font.disabled.value}"}}}},ile={alignItems:{value:"flex-start"},alignContent:{value:"center"},flexDirection:{value:"column"},justifyContent:{value:"center"}},ale={pagination:{current:{color:{value:"{components.pagination.current.color}"},backgroundColor:{value:"{components.pagination.current.backgroundColor}"}},button:{color:{value:"{components.pagination.button.color}"},_hover:{backgroundColor:{value:"{components.pagination.button.hover.backgroundColor}"},color:{value:"{components.pagination.button.hover.color}"}},_disabled:{color:{value:"{components.pagination.button.disabled.color}"}}}},search:{input:{color:{value:"{components.searchfield.color}"}},button:{color:{value:"{components.searchfield.button.color}"},_active:{backgroundColor:{value:"{components.searchfield.button._active.backgroundColor}"},borderColor:{value:"{components.searchfield.button._active.borderColor}"},color:{value:"{components.searchfield.button._active.color}"}},_disabled:{backgroundColor:{value:"{components.searchfield.button._disabled.backgroundColor}"},borderColor:{value:"{components.searchfield.button._disabled.borderColor}"},color:{value:"{components.searchfield.button._disabled.color}"}},_focus:{backgroundColor:{value:"{components.searchfield.button._focus.backgroundColor}"},borderColor:{value:"{components.searchfield.button._focus.borderColor}"},color:{value:"{components.searchfield.button._focus.color}"}},_hover:{backgroundColor:{value:"{components.searchfield.button._hover.backgroundColor}"},borderColor:{value:"{components.searchfield.button._hover.borderColor}"},color:{value:"{components.searchfield.button._hover.color}"}}}}},lle={fontSize:{value:"{fontSizes.xs}"},gap:{value:"{space.relative.medium}"},svg:{path:{fill:{value:"{colors.font.primary}"}}},toolTip:{bottom:{value:"{space.large}"},color:{value:"{colors.teal.100}"},fontSize:{value:"{fontSizes.xxs}"}}},ule={height:{value:"{space.relative.full.value}"}},cle={borderStyle:{value:"solid"},borderColor:{value:"{colors.border.primary.value}"},borderWidth:{value:"{borderWidths.medium.value}"},label:{color:{value:"{colors.font.tertiary.value}"},paddingInline:{value:"{space.medium.value}"},fontSize:{value:"{fontSizes.small.value}"},backgroundColor:{value:"{colors.background.primary.value}"}},small:{borderWidth:{value:"{borderWidths.small.value}"}},large:{borderWidth:{value:"{borderWidths.large.value}"}},opacity:{value:"{opacities.60.value}"}},dle={backgroundColor:{value:"{colors.background.primary}"},borderRadius:{value:"{radii.small}"},borderColor:{value:"{colors.border.primary}"},borderStyle:{value:"dashed"},borderWidth:{value:"{borderWidths.small}"},color:{value:"{colors.font.primary}"},gap:{value:"{space.small}"},paddingBlock:{value:"{space.xl}"},paddingInline:{value:"{space.large}"},textAlign:{value:"center"},_active:{backgroundColor:{value:"{colors.primary.10}"},borderRadius:{value:"{components.dropzone.borderRadius}"},borderColor:{value:"{colors.border.pressed}"},borderStyle:{value:"{components.dropzone.borderStyle}"},borderWidth:{value:"{components.dropzone.borderWidth}"},color:{value:"{colors.font.primary}"}},_disabled:{backgroundColor:{value:"{colors.background.disabled}"},borderRadius:{value:"{components.dropzone.borderRadius}"},borderColor:{value:"{colors.border.disabled}"},borderStyle:{value:"{components.dropzone.borderStyle}"},borderWidth:{value:"{components.dropzone.borderWidth}"},color:{value:"{colors.font.disabled}"}},accepted:{backgroundColor:{value:"{colors.background.success}"},borderRadius:{value:"{components.dropzone.borderRadius}"},borderColor:{value:"{colors.border.success}"},borderStyle:{value:"{components.dropzone.borderStyle}"},borderWidth:{value:"{components.dropzone.borderWidth}"},color:{value:"{colors.font.success}"}},rejected:{backgroundColor:{value:"{colors.background.error}"},borderRadius:{value:"{components.dropzone.borderRadius}"},borderColor:{value:"{colors.border.pressed}"},borderStyle:{value:"{components.dropzone.borderStyle}"},borderWidth:{value:"{components.dropzone.borderWidth}"},color:{value:"{colors.font.error}"}}},fle={backgroundColor:{value:"{colors.background.primary.value}"},item:{borderColor:{value:"{colors.border.secondary.value}"},borderWidth:{value:"{borderWidths.small.value}"},borderStyle:{value:"solid"},borderRadius:{value:"{radii.small.value}"},trigger:{alignItems:{value:"center"},backgroundColor:{value:"{colors.background.primary.value}"},color:{value:"inherit"},gap:{value:"{space.small.value}"},justifyContent:{value:"space-between"},paddingBlock:{value:"{space.xs.value}"},paddingInline:{value:"{space.small.value}"},_hover:{color:{value:"inherit"},backgroundColor:{value:"{colors.overlay.5.value}"}},_focus:{borderColor:{value:"{colors.border.focus.value}"},boxShadow:{value:{offsetX:"0",offsetY:"0",blurRadius:"0",spreadRadius:"2px",color:"{colors.border.focus.value}"}}}},content:{color:{value:"inherit"},paddingInline:{value:"{space.small.value}"},paddingBlockEnd:{value:"{space.small.value}"},paddingBlockStart:{value:"{space.xxxs.value}"}},icon:{color:{value:"{colors.font.tertiary.value}"},transitionDuration:{value:"{time.medium.value}"},transitionTimingFunction:{value:"cubic-bezier(0.87, 0, 0.13, 1)"}}}},hle={gap:{value:"{space.xs.value}"},fontSize:{value:"{fontSizes.medium.value}"},flexDirection:{value:"column"},small:{gap:{value:"{space.xxxs.value}"},fontSize:{value:"{fontSizes.small.value}"}},large:{gap:{value:"{space.small.value}"},fontSize:{value:"{fontSizes.large.value}"}},label:{color:{value:"{colors.font.secondary.value}"}}},ple={borderStyle:{value:"solid"},borderColor:{value:"{colors.border.primary.value}"},borderWidth:{value:"{borderWidths.small.value}"},borderRadius:{value:"{radii.small.value}"},color:{value:"{colors.font.primary.value}"},paddingBlockStart:{value:"{space.xs.value}"},paddingBlockEnd:{value:"{space.xs.value}"},paddingInlineStart:{value:"{space.medium.value}"},paddingInlineEnd:{value:"{space.medium.value}"},fontSize:{value:"{components.field.fontSize.value}"},lineHeight:{value:"{lineHeights.medium.value}"},transitionDuration:{value:"{time.medium.value}"},outlineColor:{value:"{colors.transparent.value}"},outlineStyle:{value:"solid"},outlineWidth:{value:"{outlineWidths.medium.value}"},outlineOffset:{value:"{outlineOffsets.medium.value}"},small:{fontSize:{value:"{components.field.small.fontSize.value}"},paddingBlockStart:{value:"{space.xxs.value}"},paddingBlockEnd:{value:"{space.xxs.value}"},paddingInlineStart:{value:"{space.small.value}"},paddingInlineEnd:{value:"{space.small.value}"}},large:{fontSize:{value:"{components.field.large.fontSize.value}"},paddingBlockStart:{value:"{space.xs.value}"},paddingBlockEnd:{value:"{space.xs.value}"},paddingInlineStart:{value:"{space.medium.value}"},paddingInlineEnd:{value:"{space.medium.value}"}},quiet:{borderStyle:{value:"none"},borderInlineStart:{value:"none"},borderInlineEnd:{value:"none"},borderBlockStart:{value:"none"},borderRadius:{value:"0"},_focus:{borderBlockEndColor:{value:"transparent"},boxShadow:{value:"{components.fieldcontrol._focus.boxShadow.value}"}},_error:{borderBlockEndColor:{value:"{colors.border.error.value}"},_focus:{borderBlockEndColor:{value:"transparent"},boxShadow:{value:"{components.fieldcontrol._error._focus.boxShadow.value}"}}}},_focus:{borderColor:{value:"{colors.border.focus.value}"},boxShadow:{value:{offsetX:"0px",offsetY:"0px",blurRadius:"0px",spreadRadius:"2px",color:"{colors.border.focus.value}"}}},_disabled:{color:{value:"{colors.font.disabled.value}"},cursor:{value:"not-allowed"},borderColor:{value:"{colors.transparent.value}"},backgroundColor:{value:"{colors.background.disabled.value}"}},_error:{borderColor:{value:"{colors.border.error.value}"},color:{value:"{colors.font.error.value}"},_focus:{boxShadow:{value:{offsetX:"0px",offsetY:"0px",blurRadius:"0px",spreadRadius:"2px",color:"{colors.border.error.value}"}}}},info:{_focus:{boxShadow:{value:{offsetX:"0px",offsetY:"0px",blurRadius:"0px",spreadRadius:"2px",color:"{colors.blue.100.value}"}}}},warning:{_focus:{boxShadow:{value:{offsetX:"0px",offsetY:"0px",blurRadius:"0px",spreadRadius:"2px",color:"{colors.orange.100.value}"}}}},success:{_focus:{boxShadow:{value:{offsetX:"0px",offsetY:"0px",blurRadius:"0px",spreadRadius:"2px",color:"{colors.green.100.value}"}}}},overlay:{_focus:{boxShadow:{value:{offsetX:"0px",offsetY:"0px",blurRadius:"0px",spreadRadius:"2px",color:"{colors.overlay.90.value}"}}}}},gle={gap:{value:"{space.zero.value}"},vertical:{alignItems:{value:"center"}},outer:{alignItems:{value:"center"}}},mle={backgroundColor:{value:"transparent"},borderRadius:{value:"{radii.xs.value}"},flexDirection:{value:"column"},gap:{value:"{components.field.gap.value}"},legend:{color:{value:"{colors.font.primary.value}"},fontSize:{value:"{components.field.fontSize.value}"},fontWeight:{value:"{fontWeights.bold.value}"},lineHeight:{value:"{lineHeights.medium.value}"},small:{fontSize:"{components.field.small.fontSize.value}"},large:{fontSize:"{components.field.large.fontSize.value}"}},outlined:{padding:"{space.medium.value}",borderColor:"{colors.neutral.40.value}",borderWidth:"{borderWidths.small.value}",borderStyle:"solid",small:{padding:"{space.small.value}"},large:{padding:"{space.large.value}"}},small:{gap:"{components.field.small.gap.value}"},large:{gap:"{components.field.large.gap.value}"}},vle={error:{color:{value:"{colors.font.error.value}"},fontSize:{value:"{fontSizes.small.value}"}},description:{color:{value:"{colors.font.secondary.value}"},fontStyle:{value:"italic"},fontSize:{value:"{fontSizes.small.value}"}}},yle={dropzone:{backgroundColor:{value:"{colors.background.primary}"},borderRadius:{value:"{radii.small}"},borderColor:{value:"{colors.border.primary}"},borderStyle:{value:"dashed"},borderWidth:{value:"{borderWidths.small}"},gap:{value:"{space.small}"},paddingBlock:{value:"{space.xl}"},paddingInline:{value:"{space.large}"},textAlign:{value:"center"},_active:{backgroundColor:{value:"{colors.primary.10}"},borderRadius:{value:"{components.fileuploader.dropzone.borderRadius}"},borderColor:{value:"{colors.border.pressed}"},borderStyle:{value:"{components.fileuploader.dropzone.borderStyle}"},borderWidth:{value:"{borderWidths.medium}"}},icon:{color:{value:"{colors.border.primary}"},fontSize:{value:"{fontSizes.xxl}"}},text:{color:{value:"{colors.font.tertiary}"},fontSize:{value:"{fontSizes.medium}"},fontWeight:{value:"{fontWeights.bold}"}}},file:{backgroundColor:{value:"{colors.background.primary}"},borderRadius:{value:"{radii.small}"},borderColor:{value:"{colors.border.primary}"},borderStyle:{value:"solid"},borderWidth:{value:"{borderWidths.small}"},paddingBlock:{value:"{space.xs}"},paddingInline:{value:"{space.small}"},gap:{value:"{space.small}"},alignItems:{value:"baseline"},name:{fontSize:{value:"{fontSizes.medium}"},fontWeight:{value:"{fontWeights.bold}"},color:{value:"{colors.font.primary}"}},size:{fontSize:{value:"{fontSizes.small}"},fontWeight:{value:"{fontWeights.normal}"},color:{value:"{colors.font.tertiary}"}},image:{width:{value:"{space.xxl}"},height:{value:"{space.xxl}"},backgroundColor:{value:"{colors.background.secondary}"},color:{value:"{colors.font.tertiary}"},borderRadius:{value:"{radii.small}"}}},filelist:{flexDirection:{value:"column"},gap:{value:"{space.small}"}},loader:{strokeLinecap:{value:"round"},strokeEmpty:{value:"{colors.border.secondary}"},strokeFilled:{value:"{components.loader.strokeFilled}"},strokeWidth:{value:"{borderWidths.large}"}},previewer:{backgroundColor:{value:"{colors.background.primary}"},borderColor:{value:"{colors.border.primary}"},borderStyle:{value:"solid"},borderWidth:{value:"{borderWidths.small}"},borderRadius:{value:"{radii.small}"},paddingBlock:{value:"{space.zero}"},paddingInline:{value:"{space.zero}"},maxHeight:{value:"40rem"},maxWidth:{value:"auto"},text:{fontSize:{value:"{fontSizes.medium}"},fontWeight:{value:"{fontWeights.bold}"},color:{value:"{colors.font.primary}"}},body:{paddingBlock:{value:"{space.medium}"},paddingInline:{value:"{space.medium}"},gap:{value:"{space.small}"}},footer:{justifyContent:{value:"flex-end"}}}},ble={gap:{value:"{space.medium.value}"},justifyContent:{value:"normal"},alignItems:{value:"stretch"},alignContent:{value:"normal"},flexWrap:{value:"nowrap"}},Sle={color:{value:"{colors.font.primary.value}"},lineHeight:{value:"{lineHeights.small.value}"},1:{fontSize:{value:"{fontSizes.xxxxl.value}"},fontWeight:{value:"{fontWeights.light.value}"}},2:{fontSize:{value:"{fontSizes.xxxl.value}"},fontWeight:{value:"{fontWeights.normal.value}"}},3:{fontSize:{value:"{fontSizes.xxl.value}"},fontWeight:{value:"{fontWeights.medium.value}"}},4:{fontSize:{value:"{fontSizes.xl.value}"},fontWeight:{value:"{fontWeights.semibold.value}"}},5:{fontSize:{value:"{fontSizes.large.value}"},fontWeight:{value:"{fontWeights.bold.value}"}},6:{fontSize:{value:"{fontSizes.medium.value}"},fontWeight:{value:"{fontWeights.extrabold.value}"}}},Ele={highlighted:{fontWeight:{value:"{fontWeights.bold}"}}},Cle={lineHeight:{value:1},height:{value:"1em"}},wle={color:{value:"{components.fieldcontrol.color.value}"},borderColor:{value:"{components.fieldcontrol.borderColor.value}"},fontSize:{value:"{components.fieldcontrol.fontSize.value}"},_focus:{borderColor:{value:"{components.fieldcontrol._focus.borderColor.value}"}}},xle={maxWidth:{value:"100%"},height:{value:"auto"},objectFit:{value:"initial"},objectPosition:{value:"initial"}},_le={banner:{height:{value:"150px "},width:{value:"400px "}},button:{backgroundColor:{value:"#e8e8e8"},borderRadius:{value:"5px"},color:{value:"black"}},dialog:{height:{value:"50vh"},minHeight:{value:"400px"},minWidth:{value:"400px"},width:{value:"30vw"}},header:{fontSize:{value:"{fontSizes.medium.value}"},fontWeight:{value:"{fontWeights.extrabold.value}"}}},Ale={active:{color:{value:"{colors.font.active.value}"}},color:{value:"{colors.font.interactive.value}"},focus:{color:{value:"{colors.font.focus.value}"}},hover:{color:{value:"{colors.font.hover.value}"}},visited:{color:{value:"{colors.font.interactive.value}"}}},Tle={cameraModule:{backgroundColor:{value:"{colors.background.primary.value}"}}},Rle={width:{value:"{fontSizes.medium.value}"},height:{value:"{fontSizes.medium.value}"},fontSize:{value:"{fontSizes.xs.value}"},strokeEmpty:{value:"{colors.neutral.20.value}"},strokeFilled:{value:"{colors.primary.80.value}"},strokeLinecap:{value:"round"},animationDuration:{value:"1s"},small:{width:{value:"{fontSizes.small.value}"},height:{value:"{fontSizes.small.value}"},fontSize:{value:"{fontSizes.xxs.value}"}},large:{width:{value:"{fontSizes.large.value}"},height:{value:"{fontSizes.large.value}"},fontSize:{value:"{fontSizes.small.value}"}},linear:{width:{value:"100%"},minWidth:{value:"5rem"},fontSize:{value:"{fontSizes.xxs.value}"},strokeWidth:{value:"{fontSizes.xxs.value}"},strokeFilled:{value:"{colors.primary.80.value}"},strokeEmpty:{value:"{colors.neutral.20.value}"},strokeLinecap:{value:"round"},animationDuration:{value:"1s"},small:{strokeWidth:{value:"{fontSizes.xxxs.value}"},fontSize:{value:"{fontSizes.xxxs.value}"}},large:{strokeWidth:{value:"{fontSizes.xs.value}"},fontSize:{value:"{fontSizes.xs.value}"}}},text:{fill:{value:"{colors.font.primary.value}"}}},Ile={backgroundColor:{value:"{colors.background.primary.value}"},borderRadius:{value:"{radii.medium.value}"},borderWidth:{value:"{borderWidths.small.value}"},borderStyle:{value:"solid"},borderColor:{value:"{colors.border.primary.value}"},boxShadow:{value:"{shadows.large.value}"},flexDirection:{value:"column"},gap:{value:"{space.zero.value}"},maxWidth:{value:"30rem"},minWidth:{value:"14rem"},small:{width:{value:"{fontSizes.medium.value}"},height:{value:"{fontSizes.medium.value}"}},large:{width:{value:"{fontSizes.xxxl.value}"},height:{value:"{fontSizes.xxxl.value}"}},item:{minHeight:{value:"2.5rem"},paddingInlineStart:{value:"{space.medium.value}"},paddingInlineEnd:{value:"{space.medium.value}"}}},Ole={alignItems:{value:"center"},backgroundColor:{value:"{colors.background.tertiary.value}"},borderColor:{value:"transparent"},borderStyle:{value:"solid"},borderWidth:{value:"{borderWidths.small.value}"},borderRadius:{value:"{radii.xs.value}"},color:{value:"{colors.font.primary.value}"},justifyContent:{value:"flex-start"},paddingBlock:{value:"{space.small.value}"},paddingInline:{value:"{space.medium.value}"},lineHeight:{value:"{lineHeights.small.value}"},icon:{size:{value:"{fontSizes.xl.value}"}},heading:{fontSize:{value:"{fontSizes.medium.value}"},fontWeight:{value:"{fontWeights.bold.value}"}},dismiss:{gap:{value:"{space.xxs.value}"}},plain:{color:{value:"{colors.font.primary.value}"},backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"transparent"},info:{color:{value:"{colors.font.info.value}"},backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"transparent"}},error:{color:{value:"{colors.font.error.value}"},backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"transparent"}},success:{color:{value:"{colors.font.success.value}"},backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"transparent"}},warning:{color:{value:"{colors.font.warning.value}"},backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"transparent"}}},outlined:{color:{value:"{colors.font.primary.value}"},backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"{colors.border.primary.value}"},info:{color:{value:"{colors.font.info.value}"},backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"{colors.border.info.value}"}},error:{color:{value:"{colors.font.error.value}"},backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"{colors.border.error.value}"}},success:{color:{value:"{colors.font.success.value}"},backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"{colors.border.success.value}"}},warning:{color:{value:"{colors.font.warning.value}"},backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"{colors.border.warning.value}"}}},filled:{color:{value:"{colors.font.primary.value}"},backgroundColor:{value:"{colors.background.secondary.value}"},borderColor:{value:"transparent"},info:{color:{value:"{colors.font.info.value}"},backgroundColor:{value:"{colors.background.info.value}"},borderColor:{value:"transparent"}},error:{color:{value:"{colors.font.error.value}"},backgroundColor:{value:"{colors.background.error.value}"},borderColor:{value:"transparent"}},success:{color:{value:"{colors.font.success.value}"},backgroundColor:{value:"{colors.background.success.value}"},borderColor:{value:"transparent"}},warning:{color:{value:"{colors.font.warning.value}"},backgroundColor:{value:"{colors.background.warning.value}"},borderColor:{value:"transparent"}}}},Nle={current:{alignItems:{value:"center"},justifyContent:{value:"center"},color:{value:"{colors.font.inverse.value}"},fontSize:{value:"{fontSizes.small.value}"},backgroundColor:{value:"{colors.overlay.40.value}"}},button:{color:{value:"{colors.font.primary.value}"},paddingInlineStart:{value:"{space.xxs.value}"},paddingInlineEnd:{value:"{space.xxs.value}"},transitionProperty:{value:"background-color"},transitionDuration:{value:"{time.medium.value}"},hover:{backgroundColor:{value:"{colors.overlay.10.value}"},color:{value:"{colors.font.primary.value}"}},disabled:{color:{value:"{colors.font.disabled.value}"}}},ellipsis:{alignItems:{value:"baseline"},justifyContent:{value:"center"},paddingInlineStart:{value:"{space.xs.value}"},paddingInlineEnd:{value:"{space.xs.value}"}},itemContainer:{marginLeft:{value:"{space.xxxs.value}"},marginRight:{value:"{space.xxxs.value}"}},itemShared:{height:{value:"{fontSizes.xxl.value}"},minWidth:{value:"{fontSizes.xxl.value}"},borderRadius:{value:"{fontSizes.medium.value}"}}},Mle={color:{value:"{components.fieldcontrol.color.value}"},button:{color:{value:"{components.button.color.value}"},_active:{backgroundColor:{value:"{components.button._active.backgroundColor.value}"},borderColor:{value:"{components.button._active.borderColor.value}"},color:{value:"{components.button._active.color.value}"}},_disabled:{backgroundColor:{value:"{components.button._disabled.backgroundColor.value}"},borderColor:{value:"{components.button._disabled.borderColor.value}"},color:{value:"{components.button._disabled.color.value}"}},_error:{color:{value:"{components.button.outlined.error.color.value}"},backgroundColor:{value:"{components.button.outlined.error.backgroundColor.value}"},borderColor:{value:"{components.button.outlined.error.borderColor.value}"},_active:{borderColor:{value:"{components.button.outlined.error._active.borderColor.value}"},backgroundColor:{value:"{components.button.outlined.error._active.backgroundColor.value}"},color:{value:"{components.button.outlined.error._active.color.value}"}},_focus:{borderColor:{value:"{components.button.outlined.error._focus.borderColor.value}"},backgroundColor:{value:"{components.button.outlined.error._focus.backgroundColor.value}"},color:{value:"{components.button.outlined.error._focus.color.value}"},boxShadow:{value:"{components.button.outlined.error._focus.boxShadow.value}"}},_hover:{borderColor:{value:"{components.button.outlined.error._hover.borderColor.value}"},backgroundColor:{value:"{components.button.outlined.error._hover.backgroundColor.value}"},color:{value:"{components.button.outlined.error._hover.color.value}"}}},_focus:{backgroundColor:{value:"{components.button._focus.backgroundColor.value}"},borderColor:{value:"{components.button._focus.borderColor.value}"},color:{value:"{components.button._focus.color.value}"}},_hover:{backgroundColor:{value:"{components.button._hover.backgroundColor.value}"},borderColor:{value:"{components.button._hover.borderColor.value}"},color:{value:"{components.button._hover.color.value}"}}}},Ple={color:{value:"{components.fieldcontrol.color}"},borderColor:{value:"{components.fieldcontrol.borderColor}"},fontSize:{value:"{components.fieldcontrol.fontSize}"},_focus:{borderColor:{value:"{components.fieldcontrol._focus.borderColor}"}}},kle={borderRadius:{value:"{radii.small.value}"},transitionDuration:{value:"{time.long.value}"},startColor:{value:"{colors.background.secondary.value}"},endColor:{value:"{colors.background.tertiary.value}"},small:{height:{value:"{space.small.value}"}},default:{height:{value:"{space.medium.value}"}},large:{height:{value:"{space.large.value}"}}},Dle={alignItems:{value:"center"},justifyContent:{value:"flex-start"},gap:{value:"inherit"},_disabled:{cursor:{value:"not-allowed"}},button:{alignItems:{value:"center"},justifyContent:{value:"center"},width:{value:"{fontSizes.medium.value}"},height:{value:"{fontSizes.medium.value}"},boxSizing:{value:"border-box"},borderWidth:{value:"{borderWidths.medium.value}"},borderStyle:{value:"solid"},borderRadius:{value:"50%"},borderColor:{value:"{colors.border.primary.value}"},color:{value:"{colors.background.primary.value}"},backgroundColor:{value:"{colors.background.primary.value}"},transitionProperty:{value:"all"},transitionDuration:{value:"{time.medium.value}"},outlineColor:{value:"{colors.transparent.value}"},outlineStyle:{value:"solid"},outlineWidth:{value:"{outlineWidths.medium.value}"},outlineOffset:{value:"{outlineOffsets.medium.value}"},padding:{value:"{borderWidths.medium.value}"},small:{width:{value:"{fontSizes.small.value}"},height:{value:"{fontSizes.small.value}"}},large:{width:{value:"{fontSizes.large.value}"},height:{value:"{fontSizes.large.value}"}},_checked:{color:{value:"{colors.primary.80.value}"},_disabled:{color:{value:"{colors.background.disabled.value}"}}},_focus:{borderColor:{value:"{colors.border.focus.value}"},boxShadow:{value:"{components.fieldcontrol._focus.boxShadow.value}"}},_error:{borderColor:{value:"{colors.border.error.value}"},_focus:{boxShadow:{value:"{components.fieldcontrol._error._focus.boxShadow.value}"}}},_disabled:{borderColor:{value:"{colors.border.disabled.value}"},backgroundColor:{value:"{colors.background.primary.value}"}}},label:{color:{value:"{components.text.color.value}"},_disabled:{color:{value:"{colors.font.disabled.value}"}}}},Lle={radio:{borderWidth:{value:"{components.radio.button.borderWidth}"},borderColor:{value:"{components.radio.button.borderColor}"},backgroundColor:{value:"{components.radio.button.backgroundColor}"},_checked:{color:{value:"{components.radio.button._checked.color}"}},label:{color:{value:"{components.radio.label.color}"}}},legend:{color:{value:"{components.fieldset.legend.color}"},fontWeight:{value:"{fontWeights.normal}"}}},Ule={large:{size:{value:"{fontSizes.xxxl.value}"}},default:{size:{value:"{fontSizes.xl.value}"}},small:{size:{value:"{fontSizes.small.value}"}},filled:{color:{value:"{colors.secondary.80.value}"}},empty:{color:{value:"{colors.background.tertiary.value}"}}},Fle={color:{value:"{components.fieldcontrol.color.value}"},button:{color:{value:"{components.button.color.value}"},backgroundColor:{value:"{colors.background.primary.value}"},_active:{backgroundColor:{value:"{components.button._active.backgroundColor.value}"},borderColor:{value:"{components.button._active.borderColor.value}"},color:{value:"{components.button._active.color.value}"}},_disabled:{backgroundColor:{value:"{components.button._disabled.backgroundColor.value}"},borderColor:{value:"{components.button._disabled.borderColor.value}"},color:{value:"{components.button._disabled.color.value}"}},_focus:{backgroundColor:{value:"{components.button._focus.backgroundColor.value}"},borderColor:{value:"{components.button._focus.borderColor.value}"},color:{value:"{components.button._focus.color.value}"}},_hover:{backgroundColor:{value:"{components.button._hover.backgroundColor.value}"},borderColor:{value:"{components.button._hover.borderColor.value}"},color:{value:"{components.button._hover.color.value}"}}}},zle={color:{value:"{components.fieldcontrol.color}"},backgroundColor:{value:"{colors.background.primary.value}"},paddingInlineEnd:{value:"{space.xxl.value}"},_disabled:{color:{value:"{colors.font.disabled.value}"},backgroundColor:{value:"{colors.background.disabled.value}"}},wrapper:{flex:{value:"1"},display:{value:"block"},position:{value:"relative"},cursor:{value:"pointer"}},iconWrapper:{alignItems:{value:"center"},position:{value:"absolute"},top:{value:"50%"},right:{value:"{space.medium.value}"},transform:{value:"translateY(-50%)"},pointerEvents:{value:"none"},small:{right:{value:"{space.xs.value}"}},large:{right:{value:"{space.medium.value}"}}},option:{backgroundColor:{value:"transparent"},color:{value:"{colors.font.primary.value}"},_disabled:{color:{value:"{colors.font.disabled.value}"},backgroundColor:{value:"transparent"}}},whiteSpace:{value:"nowrap"},minWidth:{value:"6.5rem"},small:{minWidth:{value:"5.5rem"},paddingInlineEnd:{value:"{space.xl.value}"}},large:{minWidth:{value:"7.5rem"},paddingInlineEnd:{value:"{space.xxl.value}"}},expanded:{paddingBlock:{value:"{space.xs.value}"},paddingInline:{value:"{space.small.value}"},option:{paddingBlock:{value:"{space.xs.value}"},paddingInline:{value:"{space.small.value}"}}}},jle={borderColor:{value:"{components.fieldcontrol.borderColor}"},color:{value:"{components.fieldcontrol.color}"},flexDirection:{value:"column"},fontSize:{value:"{components.fieldcontrol.fontSize}"},_focus:{borderColor:{value:"{components.fieldcontrol._focus.borderColor}"}},label:{color:{value:"{components.field.label.color}"}}},Ble={paddingBlock:{value:"{space.xs.value}"},track:{backgroundColor:{value:"{colors.background.quaternary.value}"},borderRadius:{value:"9999px"},height:{value:"0.375rem"},minWidth:{value:"10rem"}},range:{backgroundColor:{value:"{colors.primary.80.value}"},borderRadius:{value:"9999px"},_disabled:{backgroundColor:{value:"{colors.background.disabled.value}"}}},thumb:{width:{value:"1.25rem"},height:{value:"1.25rem"},backgroundColor:{value:"{colors.background.primary.value}"},boxShadow:{value:"{shadows.small.value}"},borderRadius:{value:"50%"},borderWidth:{value:"{borderWidths.medium.value}"},borderColor:{value:"{colors.border.primary.value}"},borderStyle:{value:"solid"},_disabled:{backgroundColor:{value:"{colors.background.disabled.value}"},borderColor:{value:"transparent"},boxShadow:{value:"none"}},_hover:{backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"{colors.border.focus.value}"}},_focus:{borderColor:{value:"{colors.border.focus.value}"},boxShadow:{value:"{components.fieldcontrol._focus.boxShadow.value}"}}},small:{track:{height:{value:"0.25rem"}},thumb:{width:{value:"1rem"},height:{value:"1rem"}}},large:{track:{height:{value:"0.625rem"}},thumb:{width:{value:"1.5rem"},height:{value:"1.5rem"}}}},Hle={borderColor:{value:"{components.fieldcontrol.borderColor}"},flexDirection:{value:"column"},input:{color:{value:"{components.fieldcontrol.color}"},fontSize:{value:"{components.fieldcontrol.fontSize}"},textAlign:{value:"center"}},button:{color:{value:"{components.button.color}"},backgroundColor:{value:"{colors.transparent}"},_active:{color:{value:"{components.button._active.color}"},backgroundColor:{value:"{components.button._active.backgroundColor}"}},_focus:{color:{value:"{components.button._focus.color}"},backgroundColor:{value:"{components.button._focus.backgroundColor}"}},_disabled:{color:{value:"{components.button._disabled.color}"},backgroundColor:{value:"{components.fieldcontrol._disabled.backgroundColor}"}},_hover:{color:{value:"{components.button._hover.color}"},backgroundColor:{value:"{components.button._hover.backgroundColor}"}}}},$le={dropzone:{backgroundColor:{value:"{colors.background.primary}"},borderRadius:{value:"{radii.small}"},borderColor:{value:"{colors.border.primary}"},borderStyle:{value:"dashed"},borderWidth:{value:"{borderWidths.small}"},gap:{value:"{space.small}"},paddingBlock:{value:"{space.xl}"},paddingInline:{value:"{space.large}"},textAlign:{value:"center"},_active:{backgroundColor:{value:"{colors.primary.10}"},borderRadius:{value:"{components.storagemanager.dropzone.borderRadius}"},borderColor:{value:"{colors.border.pressed}"},borderStyle:{value:"{components.storagemanager.dropzone.borderStyle}"},borderWidth:{value:"{borderWidths.medium}"}},icon:{color:{value:"{colors.border.primary}"},fontSize:{value:"{fontSizes.xxl}"}},text:{color:{value:"{colors.font.tertiary}"},fontSize:{value:"{fontSizes.medium}"},fontWeight:{value:"{fontWeights.bold}"}}},file:{backgroundColor:{value:"{colors.background.primary}"},borderRadius:{value:"{radii.small}"},borderColor:{value:"{colors.border.primary}"},borderStyle:{value:"solid"},borderWidth:{value:"{borderWidths.small}"},paddingBlock:{value:"{space.xs}"},paddingInline:{value:"{space.small}"},gap:{value:"{space.small}"},alignItems:{value:"baseline"},name:{fontSize:{value:"{fontSizes.medium}"},fontWeight:{value:"{fontWeights.bold}"},color:{value:"{colors.font.primary}"}},size:{fontSize:{value:"{fontSizes.small}"},fontWeight:{value:"{fontWeights.normal}"},color:{value:"{colors.font.tertiary}"}},image:{width:{value:"{space.xxl}"},height:{value:"{space.xxl}"},backgroundColor:{value:"{colors.background.secondary}"},color:{value:"{colors.font.tertiary}"},borderRadius:{value:"{radii.small}"}}},filelist:{flexDirection:{value:"column"},gap:{value:"{space.small}"}},loader:{strokeLinecap:{value:"round"},strokeEmpty:{value:"{colors.border.secondary}"},strokeFilled:{value:"{components.loader.strokeFilled}"},strokeWidth:{value:"{borderWidths.large}"}},previewer:{backgroundColor:{value:"{colors.background.primary}"},borderColor:{value:"{colors.border.primary}"},borderStyle:{value:"solid"},borderWidth:{value:"{borderWidths.small}"},borderRadius:{value:"{radii.small}"},paddingBlock:{value:"{space.zero}"},paddingInline:{value:"{space.zero}"},maxHeight:{value:"40rem"},maxWidth:{value:"auto"},text:{fontSize:{value:"{fontSizes.medium}"},fontWeight:{value:"{fontWeights.bold}"},color:{value:"{colors.font.primary}"}},body:{paddingBlock:{value:"{space.medium}"},paddingInline:{value:"{space.medium}"},gap:{value:"{space.small}"}},footer:{justifyContent:{value:"flex-end"}}}},qle={_disabled:{opacity:{value:"{opacities.60.value}"}},_focused:{shadow:{value:"{components.fieldcontrol._focus.boxShadow.value}"}},fontSize:{value:"{fontSizes.medium.value}"},large:{fontSize:{value:"{fontSizes.large.value}"}},small:{fontSize:{value:"{fontSizes.small.value}"}},label:{padding:{value:"{space.xs.value}"}},thumb:{backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"transparent"},borderWidth:{value:"{borderWidths.small.value}"},borderStyle:{value:"solid"},borderRadius:{value:"{radii.xxxl.value}"},checked:{transform:{value:"{transforms.slideX.medium.value}"}},transition:{duration:{value:"{time.medium.value}"}},width:{value:"{space.relative.medium.value}"}},track:{backgroundColor:{value:"{colors.background.quaternary.value}"},borderRadius:{value:"{radii.xxxl.value}"},checked:{backgroundColor:{value:"{colors.primary.80.value}"}},height:{value:"{space.relative.medium.value}"},padding:{value:"{outlineWidths.medium.value}"},transition:{duration:{value:"{time.short.value}"}},width:{value:"{space.relative.xl.value}"},_error:{backgroundColor:{value:"{colors.background.error.value}"}}}},Wle={borderCollapse:{value:"collapse"},display:{value:"table"},width:{value:"100%"},head:{display:{value:"table-header-group"},verticalAlign:{value:"middle"}},body:{display:{value:"table-row-group"},verticalAlign:{value:"middle"}},foot:{display:{value:"table-footer-group"},verticalAlign:{value:"middle"}},row:{display:{value:"table-row"},verticalAlign:{value:"middle"},hover:{backgroundColor:{value:"{colors.background.tertiary.value}"}},striped:{backgroundColor:{value:"{colors.background.secondary.value}"}}},header:{borderColor:{value:"{colors.border.tertiary.value}"},borderStyle:{value:"solid"},borderWidth:{value:"{borderWidths.small.value}"},color:{value:"{colors.font.primary.value}"},display:{value:"table-cell"},fontSize:{value:"{fontSizes.medium.value}"},fontWeight:{value:"{fontWeights.bold.value}"},padding:{value:"{space.medium.value}"},verticalAlign:{value:"middle"},large:{fontSize:{value:"{fontSizes.large.value}"},padding:{value:"{space.large.value}"}},small:{fontSize:{value:"{fontSizes.small.value}"},padding:{value:"{space.xs.value}"}}},data:{borderColor:{value:"{colors.border.tertiary.value}"},borderStyle:{value:"solid"},borderWidth:{value:"{borderWidths.small.value}"},color:{value:"{colors.font.primary.value}"},display:{value:"table-cell"},fontSize:{value:"{fontSizes.medium.value}"},fontWeight:{value:"{fontWeights.normal.value}"},padding:{value:"{space.medium.value}"},verticalAlign:{value:"middle"},large:{fontSize:{value:"{fontSizes.large.value}"},padding:{value:"{space.large.value}"}},small:{fontSize:{value:"{fontSizes.small.value}"},padding:{value:"{space.xs.value}"}}},caption:{captionSide:{value:"bottom"},color:{value:"{colors.font.primary.value}"},display:{value:"table-caption"},fontSize:{value:"{fontSizes.medium.value}"},textAlign:{value:"center"},wordBreak:{value:"break-all"},large:{fontSize:{value:"{fontSizes.large.value}"}},small:{fontSize:{value:"{fontSizes.small.value}"}}}},Vle={backgroundColor:{value:"transparent"},borderColor:{value:"{colors.border.secondary.value}"},borderStyle:{value:"solid"},borderWidth:{value:"{borderWidths.medium.value}"},gap:{value:"0"},item:{backgroundColor:{value:"transparent"},borderColor:{value:"{colors.border.secondary.value}"},borderStyle:{value:"solid"},borderWidth:{value:"{borderWidths.medium.value}"},color:{value:"{colors.font.secondary.value}"},fontSize:{value:"{fontSizes.medium.value}"},fontWeight:{value:"{fontWeights.bold.value}"},paddingVertical:{value:"{space.small.value}"},paddingHorizontal:{value:"{space.medium.value}"},textAlign:{value:"center"},transitionDuration:{value:"{time.medium.value}"},_hover:{backgroundColor:{value:"transparent"},borderColor:{value:"{colors.border.focus.value}"},boxShadow:{value:"none"},color:{value:"{colors.font.hover.value}"}},_focus:{backgroundColor:{value:"transparent"},borderColor:{value:"{colors.border.focus.value}"},boxShadow:{value:{offsetX:"0px",offsetY:"0px",blurRadius:"0px",spreadRadius:"{borderWidths.medium}",color:"{colors.border.focus.value}"}},color:{value:"{colors.font.focus.value}"}},_active:{backgroundColor:{value:"transparent"},borderColor:{value:"{colors.font.interactive.value}"},boxShadow:{value:"none"},color:{value:"{colors.font.interactive.value}"}},_disabled:{backgroundColor:{value:"transparent"},borderColor:{value:"{colors.border.tertiary.value}"},boxShadow:{value:"none"},color:{value:"{colors.font.disabled.value}"}}},panel:{backgroundColor:{value:"transparent"},paddingInline:{value:"0"},paddingBlock:{value:"{space.small.value}"}}},Gle={color:{value:"{colors.font.primary.value}"},primary:{color:{value:"{colors.font.primary.value}"}},secondary:{color:{value:"{colors.font.secondary.value}"}},tertiary:{color:{value:"{colors.font.tertiary.value}"}},error:{color:{value:"{colors.font.error.value}"}},warning:{color:{value:"{colors.font.warning.value}"}},success:{color:{value:"{colors.font.success.value}"}},info:{color:{value:"{colors.font.info.value}"}}},Kle={color:{value:"{components.fieldcontrol.color.value}"},borderColor:{value:"{components.fieldcontrol.borderColor.value}"},_focus:{borderColor:{value:"{components.fieldcontrol._focus.borderColor.value}"}}},Yle={color:{value:"{components.fieldcontrol.color.value}"},borderColor:{value:"{components.fieldcontrol.borderColor.value}"},fontSize:{value:"{components.fieldcontrol.fontSize.value}"},_focus:{borderColor:{value:"{components.fieldcontrol._focus.borderColor.value}"}}},Zle={borderColor:{value:"{colors.border.primary.value}"},color:{value:"{colors.font.primary.value}"},_hover:{backgroundColor:{value:"{colors.overlay.10.value}"}},_focus:{borderColor:{value:"{colors.border.focus.value}"},color:{value:"{colors.font.primary.value}"}},_active:{backgroundColor:{value:"{colors.transparent.value}"}},_disabled:{backgroundColor:{value:"{colors.transparent.value}"},borderColor:{value:"{colors.border.disabled.value}"},color:{value:"{colors.font.disabled.value}"}},_pressed:{borderColor:{value:"{colors.border.pressed.value}"},color:{value:"{colors.font.primary.value}"},backgroundColor:{value:"{colors.overlay.20.value}"},_hover:{backgroundColor:{value:"{colors.overlay.30.value}"}}},primary:{backgroundColor:{value:"{colors.transparent.value}"},borderWidth:{value:"{borderWidths.small.value}"},_focus:{borderColor:{value:"{colors.border.focus.value}"},backgroundColor:{value:"{colors.transparent.value}"},boxShadow:{value:"{components.fieldcontrol._focus.boxShadow.value}"},color:{value:"{colors.font.primary.value}"}},_hover:{backgroundColor:{value:"{colors.overlay.10.value}"},color:{value:"{colors.font.primary.value}"}},_disabled:{borderColor:{value:"{colors.border.disabled.value}"},backgroundColor:{value:"{colors.background.disabled.value}"},color:{value:"{colors.font.disabled.value}"}},_pressed:{backgroundColor:{value:"{colors.primary.80.value}"},borderColor:{value:"{colors.primary.80.value}"},color:{value:"{colors.background.primary.value}"},_focus:{backgroundColor:{value:"{colors.border.focus.value}"},borderColor:{value:"{colors.border.focus.value}"},color:{value:"{colors.background.primary.value}"}},_hover:{borderColor:{value:"{colors.primary.60.value}"},backgroundColor:{value:"{colors.primary.60.value}"},boxShadow:{value:"{colors.primary.60.value}"},color:{value:"{colors.background.primary.value}"}}}},link:{backgroundColor:{value:"{colors.transparent.value}"},color:{value:"{colors.overlay.50.value}"},_hover:{backgroundColor:{value:"{colors.transparent.value}"},color:{value:"{colors.overlay.50.value}"}},_focus:{backgroundColor:{value:"{colors.transparent.value}"},color:{value:"{colors.overlay.50.value}"}},_disabled:{backgroundColor:{value:"{colors.transparent.value}"},color:{value:"{colors.font.disabled.value}"}},_pressed:{backgroundColor:{value:"{colors.transparent.value}"},color:{value:"{colors.overlay.90.value}"},_focus:{backgroundColor:{value:"{colors.transparent.value}"},color:{value:"{colors.overlay.90.value}"}},_hover:{color:{value:"{colors.overlay.90.value}"},backgroundColor:{value:"{colors.transparent.value}"}}}}},Xle={alignItems:{value:"center"},alignContent:{value:"center"},justifyContent:{value:"flex-start"}},Qle={accordion:fle,aiConversation:Xae,alert:Zae,authenticator:Jae,autocomplete:Qae,avatar:ele,badge:tle,breadcrumbs:nle,button:rle,card:sle,checkbox:ole,checkboxfield:ile,collection:ale,copy:lle,countrycodeselect:ule,divider:cle,dropzone:dle,field:hle,fieldcontrol:ple,fieldgroup:gle,fieldmessages:vle,fieldset:mle,fileuploader:yle,flex:ble,heading:Sle,icon:Cle,highlightmatch:Ele,image:xle,inappmessaging:_le,input:wle,link:Ale,liveness:Tle,loader:Rle,menu:Ile,message:Ole,pagination:Nle,passwordfield:Mle,phonenumberfield:Ple,placeholder:kle,radio:Dle,radiogroup:Lle,rating:Ule,searchfield:Fle,select:zle,selectfield:jle,sliderfield:Ble,stepperfield:Hle,storagemanager:$le,switchfield:qle,table:Wle,tabs:Vle,text:Gle,textareafield:Kle,textfield:Yle,togglebutton:Zle,togglebuttongroup:Xle},Jle={default:{variable:{value:`'InterVariable', 'Inter var', 'Inter', -apple-system, BlinkMacSystemFont,
157
+ 'Helvetica Neue', 'Segoe UI', Oxygen, Ubuntu, Cantarell, 'Open Sans',
158
+ sans-serif`},static:{value:`'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue',
159
+ 'Segoe UI', Oxygen, Ubuntu, Cantarell, 'Open Sans', sans-serif`}}},ri={xxxs:{value:"0.375rem"},xxs:{value:"0.5rem"},xs:{value:"0.75rem"},small:{value:"0.875rem"},medium:{value:"1rem"},large:{value:"1.25rem"},xl:{value:"1.5rem"},xxl:{value:"2rem"},xxxl:{value:"2.5rem"},xxxxl:{value:"3rem"}},eue={hairline:{value:100},thin:{value:200},light:{value:300},normal:{value:400},medium:{value:500},semibold:{value:600},bold:{value:700},extrabold:{value:800},black:{value:900}},tue={small:{value:"1.25"},medium:{value:"1.5"},large:{value:"2"}},nue={0:{value:"0"},10:{value:"0.1"},20:{value:"0.2"},30:{value:"0.3"},40:{value:"0.4"},50:{value:"0.5"},60:{value:"0.6"},70:{value:"0.7"},80:{value:"0.8"},90:{value:"0.9"},100:{value:"1"}},rue={small:{value:"1px"},medium:{value:"2px"},large:{value:"3px"}},sue={small:{value:"1px"},medium:{value:"2px"},large:{value:"3px"}},oue={xs:{value:"0.125rem"},small:{value:"0.25rem"},medium:{value:"0.5rem"},large:{value:"1rem"},xl:{value:"2rem"},xxl:{value:"4rem"},xxxl:{value:"8rem"}},iue={small:{value:{offsetX:"0px",offsetY:"2px",blurRadius:"4px",color:"{colors.shadow.tertiary.value}"}},medium:{value:{offsetX:"0px",offsetY:"2px",blurRadius:"6px",color:"{colors.shadow.secondary.value}"}},large:{value:{offsetX:"0px",offsetY:"4px",blurRadius:"12px",color:"{colors.shadow.primary.value}"}}},si={zero:{value:"0"},xxxs:{value:"0.25rem"},xxs:{value:"0.375rem"},xs:{value:"0.5rem"},small:{value:"0.75rem"},medium:{value:"1rem"},large:{value:"1.5rem"},xl:{value:"2.0rem"},xxl:{value:"3.0rem"},xxxl:{value:"4.5rem"},relative:{xxxs:{value:"0.25em"},xxs:{value:"0.375em"},xs:{value:"0.5em"},small:{value:"0.75em"},medium:{value:"1em"},large:{value:"1.5em"},xl:{value:"2.0em"},xxl:{value:"3.0em"},xxxl:{value:"4.5em"},full:{value:"100%"}}},aue={short:{value:"100ms"},medium:{value:"250ms"},long:{value:"500ms"}},lue={slideX:{small:{value:"translateX(0.5em)"},medium:{value:"translateX(1em)"},large:{value:"translateX(2em)"}}},uue={components:Qle,borderWidths:Kae,colors:Yae,fonts:Jle,fontSizes:ri,fontWeights:eue,lineHeights:tue,opacities:nue,outlineOffsets:rue,outlineWidths:sue,radii:oue,shadows:iue,space:si,time:aue,transforms:lue};ri.xxs,ri.xs,ri.small,ri.medium,ri.large,ri.xl,ri.xxl,ri.xxxl,si.xxxs,si.xs,si.small,si.medium,si.large,si.xl,si.xxl,si.xxxl;const cue={values:{base:0,small:480,medium:768,large:992,xl:1280,xxl:1536},defaultBreakpoint:"base"},HF={tokens:uue,breakpoints:cue,name:"default-theme"};var cw,oL;function due(){if(oL)return cw;oL=1;function t(e,n,r,s){var o=-1,a=e==null?0:e.length;for(s&&a&&(r=e[++o]);++o<a;)r=n(r,e[o],o,e);return r}return cw=t,cw}var dw,iL;function fue(){if(iL)return dw;iL=1;function t(e){return function(n){return e?.[n]}}return dw=t,dw}var fw,aL;function hue(){if(aL)return fw;aL=1;var t=fue(),e={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},n=t(e);return fw=n,fw}var hw,lL;function pue(){if(lL)return hw;lL=1;var t=hue(),e=FT(),n=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,r="\\u0300-\\u036f",s="\\ufe20-\\ufe2f",o="\\u20d0-\\u20ff",a=r+s+o,u="["+a+"]",c=RegExp(u,"g");function f(h){return h=e(h),h&&h.replace(n,t).replace(c,"")}return hw=f,hw}var pw,uL;function gue(){if(uL)return pw;uL=1;var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function e(n){return n.match(t)||[]}return pw=e,pw}var gw,cL;function mue(){if(cL)return gw;cL=1;var t=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function e(n){return t.test(n)}return gw=e,gw}var mw,dL;function vue(){if(dL)return mw;dL=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",s=e+n+r,o="\\u2700-\\u27bf",a="a-z\\xdf-\\xf6\\xf8-\\xff",u="\\xac\\xb1\\xd7\\xf7",c="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",f="\\u2000-\\u206f",h=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",g="A-Z\\xc0-\\xd6\\xd8-\\xde",m="\\ufe0e\\ufe0f",y=u+c+f+h,S="['’]",E="["+y+"]",C="["+s+"]",w="\\d+",x="["+o+"]",T="["+a+"]",R="[^"+t+y+w+o+a+g+"]",M="\\ud83c[\\udffb-\\udfff]",N="(?:"+C+"|"+M+")",O="[^"+t+"]",k="(?:\\ud83c[\\udde6-\\uddff]){2}",F="[\\ud800-\\udbff][\\udc00-\\udfff]",$="["+g+"]",D="\\u200d",z="(?:"+T+"|"+R+")",q="(?:"+$+"|"+R+")",K="(?:"+S+"(?:d|ll|m|re|s|t|ve))?",Y="(?:"+S+"(?:D|LL|M|RE|S|T|VE))?",H=N+"?",te="["+m+"]?",fe="(?:"+D+"(?:"+[O,k,F].join("|")+")"+te+H+")*",de="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ae="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",L=te+H+fe,G="(?:"+[x,k,F].join("|")+")"+L,Z=RegExp([$+"?"+T+"+"+K+"(?="+[E,$,"$"].join("|")+")",q+"+"+Y+"(?="+[E,$+z,"$"].join("|")+")",$+"?"+z+"+"+K,$+"+"+Y,Ae,de,w,G].join("|"),"g");function ee(oe){return oe.match(Z)||[]}return mw=ee,mw}var vw,fL;function yue(){if(fL)return vw;fL=1;var t=gue(),e=mue(),n=FT(),r=vue();function s(o,a,u){return o=n(o),a=u?void 0:a,a===void 0?e(o)?r(o):t(o):o.match(a)||[]}return vw=s,vw}var yw,hL;function bue(){if(hL)return yw;hL=1;var t=due(),e=pue(),n=yue(),r="['’]",s=RegExp(r,"g");function o(a){return function(u){return t(n(e(u).replace(s,"")),a,"")}}return yw=o,yw}var bw,pL;function Sue(){if(pL)return bw;pL=1;var t=bue(),e=t(function(n,r,s){return n+(s?"-":"")+r.toLowerCase()});return bw=e,bw}var Eue=Sue();const $F=Va(Eue),Cue=/\{([^}]+)\}/g;function qF(t){const e=new RegExp(Cue);if(typeof t=="string")return e.test(t);if(typeof t=="object"){let n=!1;for(const r in t)if(yi(t,r)){const s=t[r];if(qF(s)){n=!0;break}}return n}return!1}const wue="amplify";function g_(t){return Object.entries(t).map(([e,n])=>{const r=ab(n)?n.toString():WF({value:n});return`${$F(e)}:${r}; `}).join(" ")}function qT({path:t=[]}){return`${$F([wue,...t].join(" "))}`}const xue=["offsetX","offsetY","blurRadius","spreadRadius","color"];function WF(t){const{value:e}=t;return vi(e)?mL(e):gL(e)?xue.map(n=>mL(gL(t)?t[n]:e[n])).join(" "):e}function ab(t){return ls(t)&&yi(t,"value")}function gL(t){return ls(t)&&yi(t,"offsetX")}function mL(t){if(!t)return"";if(qF(t)){const e=t.replace(/\{|\}/g,"").replace(".value","").split(".");return`var(--${qT({path:e})})`}return t}const vL=({token:t,path:e})=>{const n=`--${qT({path:e})}`,{value:r}=t,s=WF(t);return{name:n,original:r,path:e,value:s,toString:()=>`var(${n})`}};function m_({tokens:t,path:e=[],setupToken:n}){if(yi(t,"value"))return n({token:t,path:e});const r={};for(const s in t)if(yi(t,s)){const o=t[s],a=ls(o)?o:{value:o};r[s]=m_({tokens:a,path:e.concat(s),setupToken:n})}return r}function v_(t,e){e=e||[];for(var n in t)yi(t,n)&&(ls(t[n])&&"value"in t[n]?e.push(t[n]):ls(t[n])&&v_(t[n],e));return e}function VF(t,e,n){if(t==null)return{};var r,s,o,a,u,c,f=t[0]||{},h=1,g=t.length;for(n=n||[],typeof f!="object"&&(f={});h<g;h++)if((u=t[h])!=null){for(a in u)if(yi(u,a)&&a!=="__proto__"&&(r=f[a],o=u[a],f!==o))if(o&&(ls(o)||(s=Array.isArray(o)))){s?(s=!1,c=r&&Array.isArray(r)?r:[]):c=r&&ls(r)?r:{};var m=n.slice(0);m.push(a),f[a]=VF([c,o],e,m)}else o!==void 0&&(f[a]=o)}return f}function yL(t,e){return e?`${t} { ${Object.entries(e).map(([n,r])=>`--${n}:${r}; `).join(" ")}}
160
+ `:""}function ya(t,e){let n="";const{_modifiers:r={},_element:s={},_vars:o,...a}=e;if(Object.keys(a).length){const[u,c]=_se(a,f=>f.startsWith(":")||f.startsWith("["));Object.entries(u).forEach(([f,h])=>{const{_modifiers:g={},_element:m={},_vars:y,...S}=h;n+=`${t}${f} { ${g_(S)} }
161
+ `,n+=yL(`${t}${f}`,y)}),n+=`${t} { ${g_(c)} }
162
+ `}return n+=yL(t,o),Object.entries(r).forEach(([u,c])=>{c&&Object.keys(c).length&&(n+=ya(`${t}--${u}`,c))}),Object.entries(s).forEach(([u,c])=>{c&&Object.keys(c).length&&(n+=ya(`${t}__${u}`,c))}),n}function _ue({theme:t,components:e}){let n="";const{tokens:r,name:s,breakpoints:o}=t;return e.forEach(({name:a,theme:u,overrides:c})=>{const f=`amplify-${a}`,h=`[data-amplify-theme="${s}"] .${f}`,g=bi(u)?u(r):u;n+=ya(h,g),c&&c.forEach(m=>{const y=bi(m.theme)?m.theme(r):m.theme;if("mediaQuery"in m&&(n+=`@media (${m.mediaQuery}) {
163
+ ${ya(h,y)}
164
+ }`),"breakpoint"in m){const S=o.values[m.breakpoint];n+=`
165
+ @media (min-width: ${S}px) {
166
+ ${ya(h,y)}
167
+ }`}"selector"in m&&(n+=ya(`${m.selector} .${f}`,y)),"colorMode"in m&&(n+=`
168
+ @media (prefers-color-scheme: ${m.colorMode}) {
169
+ ${ya(`[data-amplify-theme="${s}"][data-amplify-color-mode="system"] .${f}`,y)}
170
+ }
171
+ `,n+=ya(`[data-amplify-theme="${s}"][data-amplify-color-mode="${m.colorMode}"] .${f}`,y))})}),n}function bL({keys:t,value:e}){return t.reduce((n,r)=>({...n,[r]:{value:`{colors.${e}.${r}.value}`}}),{})}function Aue({animations:t,tokens:e}){let n="";return Object.entries(t).forEach(([r,s])=>{n+=`
172
+ @keyframes ${r} {`,Object.entries(s).forEach(([o,a])=>{n+=`
173
+ ${o} {
174
+ `;const u=bi(a)?a(e):a;n+=g_(u),n+=`
175
+ }`}),n+=`
176
+ }`}),n}function lb(t,e=HF){const n=VF([{},e,{...t,components:{}}]),{primaryColor:r,secondaryColor:s}=n;vi(r)&&(n.tokens.colors.primary=bL({keys:Object.keys(n.tokens.colors[r]),value:r})),vi(s)&&(n.tokens.colors.secondary=bL({keys:Object.keys(n.tokens.colors[s]),value:s}));const o=m_({tokens:n.tokens,setupToken:vL}),{breakpoints:a,name:u}=n;let c=`[data-amplify-theme="${u}"] {
177
+ `+v_(o).map(h=>`${h.name}: ${h.value};`).join(`
178
+ `)+`
179
+ }
180
+ `;t?.components&&(c+=_ue({theme:{...n,tokens:o},components:t.components}));let f=[];return n.animations&&(c+=Aue({animations:n.animations,tokens:o})),n.overrides&&(f=n.overrides.map(h=>{const g=m_({tokens:h.tokens,setupToken:vL}),m=v_(g).map(y=>`${y.name}: ${y.value};`).join(`
181
+ `);if("selector"in h&&(c+=`
182
+ ${h.selector} {
183
+ ${m}
184
+ }
185
+ `),"mediaQuery"in h&&(c+=`
186
+ @media (${h.mediaQuery}) {
187
+ [data-amplify-theme="${u}"] {
188
+ ${m}
189
+ }
190
+ }
191
+ `),"breakpoint"in h){const y=n.breakpoints.values[h.breakpoint];c+=`
192
+ @media (min-width: ${y}px) {
193
+ [data-amplify-theme="${u}"] {
194
+ ${m}
195
+ }
196
+ }
197
+ `}return"colorMode"in h&&(c+=`
198
+ @media (prefers-color-scheme: ${h.colorMode}) {
199
+ [data-amplify-theme="${u}"][data-amplify-color-mode="system"] {
200
+ ${m}
201
+ color-scheme: ${h.colorMode};
202
+ }
203
+ }
204
+ `,c+=`
205
+ [data-amplify-theme="${u}"][data-amplify-color-mode="${h.colorMode}"] {
206
+ ${m}
207
+ color-scheme: ${h.colorMode};
208
+ }
209
+ `),{...h,tokens:g}})),{tokens:o,breakpoints:a,name:u,cssText:c,containerProps:({colorMode:h}={})=>({"data-amplify-theme":u,"data-amplify-color-mode":h}),overrides:f}}const Be=(...t)=>{const e=[];for(const n of t)if(n){if(vi(n)){e.push(n);continue}if(typeof n=="number"){e.push(n.toString());continue}if(Array.isArray(n)){e.push(Be(...n));continue}if(ls(n)){if(n.toString!==Object.prototype.toString&&n.toString()!=="[object Object]"){e.push(n.toString());continue}for(const r in n)yi(n,r)&&n[r]&&e.push(r)}}return e.join(" ")},le={Alert:"amplify-alert",AlertIcon:"amplify-alert__icon",AlertHeading:"amplify-alert__heading",AlertBody:"amplify-alert__body",AlertDismiss:"amplify-alert__dismiss",Button:"amplify-button",ButtonLoaderWrapper:"amplify-button__loader-wrapper",CountryCodeSelect:"amplify-countrycodeselect",DialCodeSelect:"amplify-dialcodeselect",Divider:"amplify-divider",Field:"amplify-field",FieldDescription:"amplify-field__description",FieldErrorMessage:"amplify-field__error-message",FieldGroup:"amplify-field-group",FieldGroupControl:"amplify-field-group__control",FieldGroupOuterEnd:"amplify-field-group__outer-end",FieldGroupOuterStart:"amplify-field-group__outer-start",FieldGroupInnerEnd:"amplify-field-group__inner-end",FieldGroupInnerStart:"amplify-field-group__inner-start",FieldGroupHasInnerEnd:"amplify-field-group--has-inner-end",FieldGroupHasInnerStart:"amplify-field-group--has-inner-start",FieldShowPassword:"amplify-field__show-password",FieldGroupFieldWrapper:"amplify-field-group__field-wrapper",Fieldset:"amplify-fieldset",FieldsetLegend:"amplify-fieldset__legend",Flex:"amplify-flex",Heading:"amplify-heading",Icon:"amplify-icon",Input:"amplify-input",Label:"amplify-label",Loader:"amplify-loader",LoaderLabel:"amplify-loader__label",PasswordField:"amplify-passwordfield",PhoneNumberField:"amplify-phonenumberfield",Radio:"amplify-radio",RadioButton:"amplify-radio__button",RadioInput:"amplify-radio__input",RadioLabel:"amplify-radio__label",RadioGroupField:"amplify-radiogroupfield",RadioGroup:"amplify-radiogroup",Select:"amplify-select",SelectField:"amplify-selectfield",SelectWrapper:"amplify-select__wrapper",SelectIcon:"amplify-select__icon",Tabs:"amplify-tabs",TabsList:"amplify-tabs__list",TabsItem:"amplify-tabs__item",TabsPanel:"amplify-tabs__panel",Text:"amplify-text",TextField:"amplify-textfield",VisuallyHidden:"amplify-visually-hidden"},Tue=({componentName:t,packageName:e,version:n})=>{const r=[`ui-${e}`,n];switch(t){case"AIConversation":{ei({...cse,additionalDetails:[[t],r]});break}case"Authenticator":{ei({...fse,additionalDetails:[[t],r]});break}case"ChangePassword":case"DeleteUser":{ei({...dse,additionalDetails:[["AccountSettings"],r]});break}case"FileUploader":{ei({...hse,additionalDetails:[[t],r]});break}case"InAppMessaging":{ei({...pse,additionalDetails:[[t],r]});break}case"LocationSearch":{ei({...gse,additionalDetails:[[t],r]});break}case"MapView":{ei({...mse,additionalDetails:[[t],r]});break}case"StorageManager":{ei({...vse,additionalDetails:[[t],r]});break}case"StorageBrowser":{ei({...yse,additionalDetails:[[t],r]});break}}return xse},y_=j.createContext(null),Rue=t=>(e,n)=>{OF(e,n,t)};function GF({children:t}){const[e,n]=j.useState("configuring");j.useEffect(()=>{Py().then(()=>{n("authenticated")}).catch(()=>{n("unauthenticated")})},[]);const r=A.useContext(y_),s=Zre(Vae),o=A.useMemo(()=>r??{authStatus:e,service:s},[e,r,s]),{service:a}=o;return A.useEffect(()=>Ase(a,Rue({onSignIn:()=>{n("authenticated")},onSignOut:()=>{n("unauthenticated")}})),[a]),j.createElement(y_.Provider,{value:o},t)}const Iue="`useAuthenticator` must be used inside an `Authenticator.Provider`.",Oue=["confirmResetPassword","confirmSignIn","confirmSignUp","confirmVerifyUser","forceNewPassword","forgotPassword","selectMfaType","setupEmail","setupTotp","signIn","signUp","verifyUser"],Nue=t=>Oue.some(e=>e===t),Mue=()=>!1;function Pue(t,e){return t.length!==e.length?!1:t.every((n,r)=>{const s=e[r];return Cse(n,s)||wse(n,s)?!0:n===s})}const kue=t=>(e,n)=>{const r=t(e),s=t(n);return Pue(r,s)},Due=t=>({...Oh(t)?.formFields?.setupTotp?.QR}),Lue=t=>t.flatMap(([e,n])=>({name:e,...n})),Uue=(t={})=>t&&Object.entries(t).map(([e,n])=>!vi(n)||!e?{}:{name:e,label:n,type:"radio",value:n}),Fue=(t=[])=>t.map(e=>({name:"mfa_type",label:Ln.getMfaTypeLabelByValue(e),type:"radio",value:e})),zue=(t,e)=>Nue(t)?t==="verifyUser"?Uue(Oh(e).unverifiedUserAttributes):t==="selectMfaType"?Fue(Oh(e).allowedMfaTypes):Lue(ioe(t,e)):[];function St(t){const e=j.useContext(y_);if(!e)throw new Error(Iue);const{service:n}=e,{send:r}=n,s=A.useCallback(E=>({...Nse({send:r,state:E})}),[r]),o=t?kue(t):Mue,{authStatus:a}=e,u=nse(n,s,o),{route:c,totpSecretCode:f,user:h,...g}=u,m=n.getSnapshot(),y=c==="setupTotp"?Due(m):null,S=zue(c,m);return{...g,authStatus:a,route:c,totpSecretCode:f,user:h,fields:S,QRFields:y}}const jue=({route:t})=>[t];function Bue(t){const{route:e,initializeMachine:n}=St(jue),r=j.useRef(!1);j.useEffect(()=>{!r.current&&e==="setup"&&(n(t),r.current=!0)},[n,e,t])}const Hue=({shouldWarn:t,message:e})=>{A.useEffect(()=>{},[t,e])};function $ue({componentName:t,packageName:e,version:n}){A.useEffect(()=>Tue({componentName:t,packageName:e,version:n}),[t,e,n])}const KF=A.createContext({theme:lb(),colorMode:void 0}),WT={alignContent:"alignContent",alignItems:"alignItems",alignSelf:"alignSelf",area:"gridArea",aspectRatio:"aspectRatio",autoColumns:"gridAutoColumns",autoFlow:"gridAutoFlow",autoRows:"gridAutoRows",backgroundColor:"backgroundColor",backgroundImage:"backgroundImage",basis:"flexBasis",border:"border",borderRadius:"borderRadius",borderColor:"borderColor",borderWidth:"borderWidth",borderStyle:"borderStyle",bottom:"bottom",boxShadow:"boxShadow",color:"color",column:"gridColumn",columnEnd:"gridColumnEnd",columnGap:"columnGap",columnSpan:"gridColumn",columnStart:"gridColumnStart",direction:"flexDirection",display:"display",flex:"flex",fontFamily:"fontFamily",fontSize:"fontSize",fontStyle:"fontStyle",fontWeight:"fontWeight",gap:"gap",grow:"flexGrow",height:"height",justifyContent:"justifyContent",left:"left",letterSpacing:"letterSpacing",lineHeight:"lineHeight",margin:"margin",marginBlock:"marginBlock",marginBlockEnd:"marginBlockEnd",marginBlockStart:"marginBlockStart",marginBottom:"marginBlockEnd",marginInline:"marginInline",marginInlineEnd:"marginInlineEnd",marginInlineStart:"marginInlineStart",marginLeft:"marginInlineStart",marginRight:"marginInlineEnd",marginTop:"marginBlockStart",maxHeight:"maxHeight",maxWidth:"maxWidth",minHeight:"minHeight",minWidth:"minWidth",objectFit:"objectFit",objectPosition:"objectPosition",opacity:"opacity",order:"order",overflow:"overflow",padding:"padding",paddingBlock:"paddingBlock",paddingBlockEnd:"paddingBlockEnd",paddingBlockStart:"paddingBlockStart",paddingBottom:"paddingBlockEnd",paddingInline:"paddingInline",paddingInlineEnd:"paddingInlineEnd",paddingInlineStart:"paddingInlineStart",paddingLeft:"paddingInlineStart",paddingRight:"paddingInlineEnd",paddingTop:"paddingBlockStart",position:"position",resize:"resize",right:"right",row:"gridRow",rowEnd:"gridRowEnd",rowGap:"rowGap",rowSpan:"gridRow",rowStart:"gridRowStart",shrink:"flexShrink",templateAreas:"gridTemplateAreas",templateColumns:"gridTemplateColumns",templateRows:"gridTemplateRows",textAlign:"textAlign",textDecoration:"textDecoration",textTransform:"textTransform",top:"top",transform:"transform",transformOrigin:"transformOrigin",width:"width",whiteSpace:"whiteSpace",wrap:"flexWrap"},VT={Alert:{dismissButtonLabel:"Dismiss alert"},PhoneNumberField:{countryCodeLabel:"Country code"},PasswordField:{passwordIsHidden:"Password is hidden",passwordIsShown:"Password is shown",showPassword:"Show password"}},b_={backgroundColor:"colors",borderColor:"colors",borderWidth:"borderWidths",color:"colors",borderRadius:"radii",fontSize:"fontSizes",fontWeight:"fontWeights",fontFamily:"fonts",lineHeight:"lineHeights",opacity:"opacities",boxShadow:"shadows",transform:"transforms",left:"space",right:"space",top:"space",bottom:"space",height:"space",width:"space",letterSpacing:"space",margin:"space",marginBlock:"space",marginBlockEnd:"space",marginBlockStart:"space",marginInline:"space",marginInlineEnd:"space",marginInlineStart:"space",marginLeft:"space",marginRight:"space",marginTop:"space",marginBottom:"space",maxHeight:"space",maxWidth:"space",minHeight:"space",minWidth:"space",padding:"space",paddingBlock:"space",paddingBlockEnd:"space",paddingBlockStart:"space",paddingInline:"space",paddingInlineEnd:"space",paddingInlineStart:"space",paddingLeft:"space",paddingRight:"space",paddingTop:"space",paddingBottom:"space",gap:"space",columnGap:"space",rowGap:"space"},que=t=>t in b_,YF=t=>typeof t=="string"&&t.length===0,SL=t=>t==null||YF(t),ub=t=>Object.keys(t),GT=(t,e,n)=>{if(typeof e!="string")return e;if(e.includes(" "))return e.split(" ").map(r=>GT(t,r,n)).join(" ");if(que(t)){const r=e.split("."),s=b_[t];let o=n[s];for(let a=0;a<r.length;a++){if(o){o=o[r[a]];continue}break}return ab(o)?`var(--${qT({path:[b_[t],...r]})})`:e}return e},Wue=({breakpoint:t,breakpoints:e,values:n})=>{const r=n[t];if(r!==void 0)return r;const s=ub(e).sort((a,u)=>e[u]-e[a]),o=s.slice(s.indexOf(t));for(const a of o){const u=n[a];if(u!==void 0)return u}return null},Vue=t=>ub(t).reduce((e,n)=>n in HF.breakpoints.values?{...e,[n]:t[n]}:e,{}),Gue=({breakpoint:t,breakpoints:e,values:n})=>{let r={};const s=ub(e).sort((o,a)=>e[o]-e[a]);return Array.isArray(n)?n.forEach((o,a)=>{r[s[a]]=o}):typeof n=="object"&&(r=Vue(n)),Wue({breakpoint:t,breakpoints:e,values:r})},Kue=({breakpoints:t})=>{const e=ub(t).sort((n,r)=>t[r]-t[n]);return e.map((n,r)=>{let s="";const o=t[n],a=e[r-1],u=a?t[a]-1:null;return o>=0&&(s=`(min-width: ${o}px)`),u!==null&&(s&&(s+=" and "),s+=`(max-width: ${u}px)`),{breakpoint:n,query:s,maxWidth:u,minWidth:o}})},Yue=typeof window>"u"?A.useEffect:A.useLayoutEffect,Zue=({breakpoints:t,defaultBreakpoint:e})=>{const r=typeof window<"u"&&typeof window.matchMedia<"u"?window.matchMedia:null,s=A.useMemo(()=>Kue({breakpoints:t}),[t]),[o,a]=A.useState(e),u=A.useCallback((c,f)=>{c&&a(f)},[a]);return Yue(()=>{if(!r)return;const c=s.map(({query:f,breakpoint:h})=>{const g=r(f);u(g.matches,h);const m=y=>{y.matches&&a(h)};return g.addEventListener("change",m),()=>g.removeEventListener("change",m)});return()=>{c.forEach(f=>f())}},[t,a,r,s]),A.useDebugValue(o,c=>c),o},Xue=t=>typeof t>"u"||typeof t.theme>"u"?lb():t.theme,Que=()=>{const t=A.useContext(KF);return Xue(t)},Jue=({value:t,propKey:e,tokens:n})=>ab(t)?t.toString():vi(t)?vi(e)?GT(e,t,n):t:null,ece=t=>t==="auto"||typeof t=="number"&&!isNaN(t)||typeof t=="string"&&!isNaN(parseFloat(t)),Sw=t=>t==="auto"?"auto":`span ${t}`,EL=t=>ece(t)?Sw(t):Array.isArray(t)?t.map(e=>Sw(e)):typeof t=="object"&&t!=null?Object.entries(t).reduce((e,[n,r])=>({...e,[n]:Sw(r)}),{}):null,tce=t=>{const{rowSpan:e,columnSpan:n,row:r,column:s,...o}=t,{rowFromSpanValue:a,columnFromSpanValue:u}=A.useMemo(()=>({rowFromSpanValue:EL(e),columnFromSpanValue:EL(n)}),[e,n]);return{row:SL(r)?a:r,column:SL(s)?u:s,...o}},nce=t=>t in WT,rce=({props:t={},style:e={},breakpoint:n,breakpoints:r,tokens:s})=>{const o={};return Object.keys(t).filter(a=>t[a]!==null).forEach(a=>{if(nce(a)){const u=t[a];if(u==null||YF(u))return;const c=WT[a];let f="";ab(u)?f=u.toString():typeof u=="string"?f=GT(a,u,s):typeof u=="number"?f=u:typeof u=="object"&&(f=Jue({propKey:a,tokens:s,value:Gue({values:u,breakpoint:n,breakpoints:r})})),e={...e,[c]:f}}else typeof t[a]<"u"&&(o[a]=t[a])}),{propStyles:e,nonStyleProps:o}},sce=(t,e)=>{const{breakpoints:{values:n,defaultBreakpoint:r},tokens:s}=Que(),o=Zue({breakpoints:n,defaultBreakpoint:r}),a=tce(t);return A.useMemo(()=>rce({props:a,style:e,breakpoint:o,breakpoints:n,tokens:s}),[a,e,n,o,s])},qt=t=>A.forwardRef(t),oce=({as:t="div",children:e,testId:n,ariaLabel:r,isDisabled:s,style:o,inert:a,...u},c)=>{const{propStyles:f,nonStyleProps:h}=sce(u,o);return A.createElement(t,{"aria-label":r,"data-testid":n,disabled:s,ref:c,inert:a?"":null,style:f,...h},e)},qe=qt(oce);qe.displayName="View";const Df={minX:0,minY:0,width:24,height:24},ice=({className:t,as:e="svg",fill:n="currentColor",pathData:r,viewBox:s=Df,children:o,paths:a,...u},c)=>{const f=s.minX??Df.minX,h=s.minY??Df.minY,g=s.width??Df.width,m=s.height??Df.height;let y;return o&&(y=o),a&&(y=a.map((S,E)=>A.createElement("path",{...S,key:E}))),r&&(y=A.createElement("path",{d:r,fill:n})),A.createElement(qe,{as:e,className:Be(le.Icon,t),ref:c,viewBox:`${f} ${h} ${g} ${m}`,...u},y)},ZF=qt(ice);ZF.displayName="Icon";const ace=A.createContext({});function cb(t){const e=A.useContext(ace);if(t&&e)return e[t]}const lce=t=>{const{className:e,...n}=t;return A.createElement(qe,{as:"span",width:"1em",height:"1em",className:Be(le.Icon,e),...n},A.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},A.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 20C7.59 20 4 16.41 4 12C4 7.59 7.59 4 12 4C16.41 4 20 7.59 20 12C20 16.41 16.41 20 12 20ZM16.59 7.58L10 14.17L7.41 11.59L6 13L10 17L18 9L16.59 7.58Z",fill:"currentColor"})))},uce=t=>{const{className:e,...n}=t;return A.createElement(qe,{as:"span",width:"1em",height:"1em",className:Be(le.Icon,e),...n},A.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},A.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM13 17H11V15H13V17ZM13 13H11V7H13V13Z",fill:"currentColor"})))},cce=t=>{const{className:e,...n}=t;return A.createElement(qe,{as:"span",width:"1em",height:"1em",className:Be(le.Icon,e),...n},A.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},A.createElement("path",{d:"M11 7H13V9H11V7ZM11 11H13V17H11V11ZM12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 20C7.59 20 4 16.41 4 12C4 7.59 7.59 4 12 4C16.41 4 20 7.59 20 12C20 16.41 16.41 20 12 20Z",fill:"currentColor"})))},dce=t=>{const{className:e,...n}=t;return A.createElement(qe,{as:"span",width:"1em",height:"1em",className:Be(le.Icon,e),...n},A.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},A.createElement("path",{d:"M1 21H23L12 2L1 21ZM13 18H11V16H13V18ZM13 14H11V10H13V14Z",fill:"currentColor"})))},XF=({variation:t,ariaHidden:e,ariaLabel:n,role:r})=>{const s=cb("alert");let o;switch(t){case"info":o=s?.info??A.createElement(cce,{"aria-hidden":e,"aria-label":n,role:r});break;case"error":o=s?.error??A.createElement(uce,{"aria-hidden":e,"aria-label":n,role:r});break;case"warning":o=s?.warning??A.createElement(dce,{"aria-hidden":e,"aria-label":n,role:r});break;case"success":o=s?.success??A.createElement(lce,{"aria-hidden":e,"aria-label":n,role:r});break}return o?A.createElement("span",{className:le.AlertIcon},o):null};XF.displayName="AlertIcon";const fce=globalThis?.document?A.useLayoutEffect:()=>{},hce="amplify-id",pce=I8.useId||(()=>{});let gce=0;const Fa=t=>{const[e,n]=A.useState(pce());return fce(()=>{t||n(r=>r??String(gce++))},[t]),t??(e?`${hce}-${e}`:"")},QF=A.createContext({isFieldsetDisabled:!1}),dp=t=>{let n=A.useContext(QF).isFieldsetDisabled;return(n===void 0||n===!1)&&(n=t),{isFieldsetDisabled:n}},mce=({className:t,children:e,...n},r)=>A.createElement(qe,{className:Be(le.Flex,t),ref:r,...n},e),Fe=qt(mce);Fe.displayName="Flex";const vce="linear-empty",yce="linear-filled",bce="circular-empty",Sce="circular-filled",CL=8,S_=42,nm=2*S_*Math.PI,Ece=({className:t,filledColor:e,emptyColor:n,size:r,variation:s,isDeterminate:o=!1,isPercentageTextHidden:a=!1,percentage:u=0,...c},f)=>{u=Math.min(u,100),u=Math.max(u,0);const h=`${u}%`,g=Be(le.Loader,Ht(le.Loader,r),Ht(le.Loader,s),Br(le.Loader,"determinate",o),t),m=A.createElement("g",null,A.createElement("line",{x1:"0",x2:"100%",y1:"50%",y2:"50%",style:{stroke:String(n)},"data-testid":vce}),A.createElement("line",{x1:"0",x2:o?h:"100%",y1:"50%",y2:"50%",style:{stroke:o&&u===0?"none":e?String(e):void 0},"data-testid":yce}),o?A.createElement("text",{"aria-live":"polite",className:Be(le.LoaderLabel,a?le.VisuallyHidden:null),x:`${-1+u}%`,y:"200%"},h):null),y=A.createElement("g",null,A.createElement("circle",{cx:"50%",cy:"50%",r:`${S_}%`,strokeWidth:`${CL}%`,style:{stroke:String(n)},"data-testid":bce}),A.createElement("circle",{cx:"50%",cy:"50%",r:`${S_}%`,strokeWidth:`${CL}%`,style:{stroke:String(e),strokeDasharray:o?`${nm}% ${nm}%`:void 0,strokeDashoffset:o?`${nm-nm*u/100}%`:void 0},"data-testid":Sce}),o?A.createElement("text",{"aria-live":"polite",className:Be(le.LoaderLabel,a?le.VisuallyHidden:null),x:"130%",y:"80%"},h):null);return A.createElement(qe,{as:"svg","aria-valuenow":o?u:void 0,className:g,ref:f,role:"progressbar",...c},s==="linear"?m:y)},JF=qt(Ece);JF.displayName="Loader";const Cce=["link","primary",void 0],wce=({className:t,children:e,colorTheme:n,isFullWidth:r=!1,isDisabled:s,isLoading:o,loadingText:a="",size:u,type:c="button",variation:f,...h},g)=>{const m=Cce.includes(f)&&n?`${f??"outlined"}--${n}`:void 0,{isFieldsetDisabled:y}=dp(s??o??h.disabled),S=Be(le.Button,le.FieldGroupControl,Ht(le.Button,f),Ht(le.Button,m),Ht(le.Button,u),Br(le.Button,"disabled",y),Br(le.Button,"loading",o),Br(le.Button,"fullwidth",r),t);return A.createElement(qe,{ref:g,as:"button",className:S,isDisabled:y,type:c,...h},o?A.createElement(Fe,{as:"span",className:le.ButtonLoaderWrapper},A.createElement(JF,{size:u}),a||null):e)},en=qt(wce);en.displayName="Button";const xce=t=>{const{className:e,size:n,...r}=t;return A.createElement(qe,{as:"span",width:n??"1em",height:n??"1em",className:Be(le.Icon,e),...r},A.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:n?{width:n,height:n}:void 0},A.createElement("path",{d:"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41Z",fill:"currentColor"})))},_ce=({as:t="p",className:e,children:n,isTruncated:r,variation:s,...o},a)=>{const u=Be(le.Text,Ht(le.Text,s),Br(le.Text,"truncated",r),e);return A.createElement(qe,{as:t,className:u,ref:a,...o},n)},Ts=qt(_ce);Ts.displayName="Text";const Ace="qa-field-description",db=({descriptiveText:t,labelHidden:e,...n})=>t?A.createElement(Ts,{"data-testid":Ace,className:Be(le.FieldDescription,{[le.VisuallyHidden]:e}),...n},t):null;db.displayName="FieldDescription";const fb=({errorMessage:t,hasError:e,...n})=>e&&t?A.createElement(Ts,{className:le.FieldErrorMessage,...n},t):null;fb.displayName="FieldErrorMessage";const Tce=({children:t,className:e,visuallyHidden:n,...r},s)=>A.createElement(qe,{as:"label",className:Be(le.Label,e,{[le.VisuallyHidden]:n}),ref:s,...r},t),KT=qt(Tce);KT.displayName="Label";const Rce=({buttonRef:t,children:e,className:n,dismissButtonLabel:r=VT.Alert.dismissButtonLabel,hasIcon:s=!0,heading:o,isDismissible:a=!1,onDismiss:u,variation:c,...f},h)=>{const[g,m]=A.useState(!1),y=cb("alert"),S=A.useCallback(()=>{m(!g),bi(u)&&u()},[m,u,g]);return g?null:A.createElement(Fe,{className:Be(le.Alert,n,Ht(le.Alert,c)),ref:h,role:"alert",...f},s&&A.createElement(XF,{variation:c,ariaHidden:!0}),A.createElement(qe,{flex:"1"},o&&A.createElement(qe,{className:le.AlertHeading},o),A.createElement(qe,{className:le.AlertBody},e)),a&&A.createElement(en,{ariaLabel:r,variation:"link",className:le.AlertDismiss,onClick:S,ref:t},y?.close??A.createElement(xce,{"aria-hidden":"true"})))},e7=qt(Rce);e7.displayName="Alert";const Dl=(t,e)=>t&&e?`${t}-${e}`:void 0,Ice=({children:t,className:e,innerEndComponent:n,innerStartComponent:r,orientation:s="horizontal",outerEndComponent:o,outerStartComponent:a,variation:u,...c},f)=>{const h=r!=null,g=n!=null,m=h?le.FieldGroupHasInnerStart:null,y=g?le.FieldGroupHasInnerEnd:null,S=Be(le.FieldGroup,m,y,Ht(le.FieldGroup,s),e);return A.createElement(Fe,{className:S,ref:f,...c},a&&A.createElement(qe,{className:Be(le.FieldGroupOuterStart,Ht(le.FieldGroupOuterStart,u))},a),A.createElement(qe,{className:Be(le.FieldGroupFieldWrapper,Ht(le.FieldGroupFieldWrapper,s))},r&&A.createElement(qe,{className:le.FieldGroupInnerStart},r),t,n&&A.createElement(qe,{className:le.FieldGroupInnerEnd},n)),o&&A.createElement(qe,{className:Be(le.FieldGroupOuterEnd,Ht(le.FieldGroupOuterEnd,u))},o))},t7=qt(Ice);t7.displayName="FieldGroup";const Oce=({autoComplete:t,checked:e,className:n,defaultChecked:r,defaultValue:s,id:o,isDisabled:a,isReadOnly:u,isRequired:c,size:f,type:h="text",hasError:g=!1,value:m,variation:y,...S},E)=>{const C=Be(le.Input,le.FieldGroupControl,Ht(le.Input,y),Br(le.Input,"error",g),Ht(le.Input,f),n),{isFieldsetDisabled:w}=dp(a);return A.createElement(qe,{"aria-invalid":g,as:"input",autoComplete:t,checked:e,className:C,defaultChecked:r,defaultValue:s,isDisabled:w,id:o,readOnly:u,ref:E,required:c,type:h,value:m,...S})},YT=qt(Oce);YT.displayName="Input";const Nce=t=>t in WT,n7=t=>{const e={styleProps:{},rest:{}};return Object.keys(t).forEach(n=>{Nce(n)?e.styleProps={...e.styleProps,[n]:t[n]}:e.rest={...e.rest,[n]:t[n]}}),e},ZT=t=>{const e=t.filter(n=>n!==void 0).join(" ");return e.length>0?e:void 0},XT="error",QT="description",Mce=(t,e)=>{const{className:n,descriptiveText:r,errorMessage:s,hasError:o=!1,id:a,innerEndComponent:u,innerStartComponent:c,label:f,labelHidden:h=!1,outerEndComponent:g,outerStartComponent:m,size:y,testId:S,variation:E,inputStyles:C,...w}=t,x=Fa(a),T=Fa(),R=r?Dl(T,QT):void 0,M=o?Dl(T,XT):void 0,N=ZT([M,R]),{styleProps:O,rest:k}=n7(w);return A.createElement(Fe,{className:Be(le.Field,Ht(le.Field,y),le.TextField,n),testId:S,...O},A.createElement(KT,{htmlFor:x,visuallyHidden:h},f),A.createElement(db,{id:R,labelHidden:h,descriptiveText:r}),A.createElement(t7,{outerStartComponent:m,outerEndComponent:g,innerStartComponent:c,innerEndComponent:u,variation:E},A.createElement(YT,{"aria-describedby":N,hasError:o,id:x,ref:e,size:y,variation:E,...C,...k})),A.createElement(fb,{id:M,hasError:o,errorMessage:s}))},fp=qt(Mce);fp.displayName="TextField";const Pce=({as:t="span",children:e,className:n,...r},s)=>A.createElement(qe,{as:t,className:Be(le.VisuallyHidden,n),ref:s,...r},e),hb=qt(Pce);hb.displayName="VisuallyHidden";const kce=({className:t,orientation:e="horizontal",size:n,label:r,...s},o)=>{const a=Be(le.Divider,Ht(le.Divider,e),Ht(le.Divider,n),t);return A.createElement(qe,{"aria-orientation":e,as:"hr",className:a,"data-label":r,ref:o,...s})},JT=qt(kce);JT.displayName="Divider";const Dce=t=>{const{className:e,...n}=t;return A.createElement(qe,{as:"span",width:"1em",height:"1em",className:Be(le.Icon,e),...n},A.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},A.createElement("path",{d:"M16.59 8.58984L12 13.1698L7.41 8.58984L6 9.99984L12 15.9998L18 9.99984L16.59 8.58984Z",fill:"currentColor"})))},Lce=({children:t,className:e,isDisabled:n,legend:r,legendHidden:s,size:o,testId:a,variation:u="plain",...c},f)=>{const{isFieldsetDisabled:h}=dp(n),g=A.useMemo(()=>({isFieldsetDisabled:h}),[h]),m=Be(le.Fieldset,Ht(le.Fieldset,u),Ht(le.Fieldset,o),e),y=Be(le.FieldsetLegend,Ht(le.FieldsetLegend,o),{[le.VisuallyHidden]:s});return A.createElement(QF.Provider,{value:g},A.createElement(Fe,{as:"fieldset",className:m,ref:f,disabled:h,testId:a,...c},A.createElement(hb,{as:"legend"},r),A.createElement(qe,{as:"div","aria-hidden":"true",className:y},r),t))},r7=qt(Lce);r7.displayName="Fieldset";const Uce={1:"h1",2:"h2",3:"h3",4:"h4",5:"h5",6:"h6"},Fce=({className:t,children:e,isTruncated:n,level:r=6,...s},o)=>A.createElement(qe,{as:Uce[r],className:Be(le.Heading,Ht(le.Heading,r),Br(le.Heading,"truncated",n),t),ref:o,...s},e),Ar=qt(Fce);Ar.displayName="Heading";var zce=A.createContext(void 0),jce=t=>{const{dir:e,children:n}=t;return I.jsx(zce.Provider,{value:e,children:n})};const Bce=t=>{const{className:e,...n}=t;return A.createElement(qe,{as:"span",width:"1em",height:"1em",className:Be(le.Icon,e),...n},A.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},A.createElement("path",{d:"M12 6.0002C15.79 6.0002 19.17 8.1302 20.82 11.5002C20.23 12.7202 19.4 13.7702 18.41 14.6202L19.82 16.0302C21.21 14.8002 22.31 13.2602 23 11.5002C21.27 7.1102 17 4.0002 12 4.0002C10.73 4.0002 9.51 4.2002 8.36 4.5702L10.01 6.2202C10.66 6.0902 11.32 6.0002 12 6.0002ZM10.93 7.14019L13 9.2102C13.57 9.4602 14.03 9.9202 14.28 10.4902L16.35 12.5602C16.43 12.2202 16.49 11.8602 16.49 11.4902C16.5 9.0102 14.48 7.0002 12 7.0002C11.63 7.0002 11.28 7.05019 10.93 7.14019ZM2.01 3.8702L4.69 6.5502C3.06 7.8302 1.77 9.5302 1 11.5002C2.73 15.8902 7 19.0002 12 19.0002C13.52 19.0002 14.98 18.7102 16.32 18.1802L19.74 21.6002L21.15 20.1902L3.42 2.4502L2.01 3.8702ZM9.51 11.3702L12.12 13.9802C12.08 13.9902 12.04 14.0002 12 14.0002C10.62 14.0002 9.5 12.8802 9.5 11.5002C9.5 11.4502 9.51 11.4202 9.51 11.3702V11.3702ZM6.11 7.97019L7.86 9.7202C7.63 10.2702 7.5 10.8702 7.5 11.5002C7.5 13.9802 9.52 16.0002 12 16.0002C12.63 16.0002 13.23 15.8702 13.77 15.6402L14.75 16.6202C13.87 16.8602 12.95 17.0002 12 17.0002C8.21 17.0002 4.83 14.8702 3.18 11.5002C3.88 10.0702 4.9 8.89019 6.11 7.97019Z",fill:"currentColor"})))},Hce=t=>{const{className:e,...n}=t;return A.createElement(qe,{as:"span",width:"1em",height:"1em",className:Be(le.Icon,e),...n},A.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},A.createElement("path",{d:"M12 6C15.79 6 19.17 8.13 20.82 11.5C19.17 14.87 15.79 17 12 17C8.21 17 4.83 14.87 3.18 11.5C4.83 8.13 8.21 6 12 6ZM12 4C7 4 2.73 7.11 1 11.5C2.73 15.89 7 19 12 19C17 19 21.27 15.89 23 11.5C21.27 7.11 17 4 12 4ZM12 9C13.38 9 14.5 10.12 14.5 11.5C14.5 12.88 13.38 14 12 14C10.62 14 9.5 12.88 9.5 11.5C9.5 10.12 10.62 9 12 9ZM12 7C9.52 7 7.5 9.02 7.5 11.5C7.5 13.98 9.52 16 12 16C14.48 16 16.5 13.98 16.5 11.5C16.5 9.02 14.48 7 12 7Z",fill:"currentColor"})))},{passwordIsHidden:$ce,passwordIsShown:qce,showPassword:Wce}=VT.PasswordField,Vce=({fieldType:t,passwordIsHiddenLabel:e=$ce,passwordIsShownLabel:n=qce,showPasswordButtonLabel:r=Wce,size:s,hasError:o,...a},u)=>{const c=cb("passwordField"),f=Be(le.FieldShowPassword,Br(le.FieldShowPassword,"error",o)),h=t==="password"?c?.visibility??A.createElement(Hce,{"aria-hidden":"true"}):c?.visibilityOff??A.createElement(Bce,{"aria-hidden":"true"});return A.createElement(en,{"aria-checked":t!=="password",ariaLabel:r,className:f,colorTheme:o?"error":void 0,ref:u,role:"switch",size:s,...a},A.createElement(hb,{"aria-live":"polite"},t==="password"?e:n),h)},s7=qt(Vce);s7.displayName="ShowPasswordButton";const Gce=({autoComplete:t="current-password",label:e,className:n,hideShowPassword:r=!1,passwordIsHiddenLabel:s,passwordIsShownLabel:o,showPasswordButtonLabel:a,showPasswordButtonRef:u,size:c,hasError:f,...h},g)=>{const[m,y]=A.useState("password"),S=A.useCallback(()=>{y(m==="password"?"text":"password")},[y,m]);return A.createElement(fp,{autoComplete:t,outerEndComponent:r?null:A.createElement(s7,{fieldType:m,onClick:S,passwordIsHiddenLabel:s,passwordIsShownLabel:o,ref:u,size:c,showPasswordButtonLabel:a,hasError:f}),size:c,type:m,label:e,className:Be(le.PasswordField,n),ref:g,hasError:f,...h})},eR=qt(Gce);eR.displayName="PasswordField";const Kce=({autoComplete:t,className:e,size:n,variation:r,value:s,defaultValue:o,hasError:a,icon:u,iconColor:c,children:f,placeholder:h,isDisabled:g,isRequired:m,isMultiple:y=!1,selectSize:S=1,...E},C)=>{const x=s===void 0&&o===void 0&&h,T=y||S>1,R=Be(le.Select,le.FieldGroupControl,Ht(le.Select,n),Ht(le.Select,r),Br(le.Select,"error",a),Br(le.Select,"expanded",T),e),M=cb("select"),{isFieldsetDisabled:N}=dp(g);return A.createElement(qe,{className:le.SelectWrapper},A.createElement(qe,{"aria-invalid":a,as:"select",autoComplete:t,value:s,defaultValue:x?"":o,isDisabled:N,multiple:y,size:S,required:m,className:R,ref:C,...E},h&&A.createElement("option",{value:""},h),f),T?null:A.createElement(Fe,{className:Be(le.SelectIcon,Ht(le.SelectIcon,n)),color:c,"aria-hidden":"true"},u??M?.expand??A.createElement(Dce,null)))},o7=qt(Kce);o7.displayName="Select";const Yce=({children:t,options:e})=>t?(e?.length&&console.warn("Amplify UI: <SelectField> component defaults to rendering children over `options`. When using the `options` prop, omit children."),t):e?.map((n,r)=>A.createElement("option",{label:n,value:n,key:`${n}-${r}`},n)),Zce=(t,e)=>{const{children:n,className:r,descriptiveText:s,errorMessage:o,hasError:a=!1,id:u,label:c,labelHidden:f=!1,options:h,size:g,testId:m,inputStyles:y,...S}=t,E=Fa(u),C=Fa(),w=s?Dl(C,QT):void 0,x=a?Dl(C,XT):void 0,T=ZT([x,w]),{styleProps:R,rest:M}=n7(S);return A.createElement(Fe,{className:Be(le.Field,Ht(le.Field,g),le.SelectField,r),testId:m,...R},A.createElement(KT,{htmlFor:E,visuallyHidden:f},c),A.createElement(db,{id:w,labelHidden:f,descriptiveText:s}),A.createElement(o7,{"aria-describedby":T,hasError:a,id:E,ref:e,size:g,...M,...y},Yce({children:n,options:h})),A.createElement(fb,{id:x,hasError:a,errorMessage:o}))},i7=qt(Zce);i7.displayName="SelectField";const Xce=({className:t,dialCodeList:e,isReadOnly:n,...r},s)=>{const o=e??NF,a=A.useMemo(()=>o.map(u=>A.createElement("option",{key:u,value:u,disabled:n},u)),[o,n]);return A.createElement(i7,{"aria-disabled":n,autoComplete:"tel-country-code",className:Be(le.CountryCodeSelect,le.DialCodeSelect,t),labelHidden:!0,ref:s,...r},a)},a7=qt(Xce);a7.displayName="DialCodeSelect";const Qce=({autoComplete:t="tel-national",className:e,defaultDialCode:n,dialCodeLabel:r=VT.PhoneNumberField.countryCodeLabel,dialCodeList:s,dialCodeName:o,dialCodeRef:a,hasError:u,isDisabled:c,isReadOnly:f,onDialCodeChange:h,onInput:g,size:m,variation:y,...S},E)=>A.createElement(fp,{outerStartComponent:A.createElement(a7,{defaultValue:n,dialCodeList:s,className:e,hasError:u,isDisabled:c,isReadOnly:f,label:r,name:o,onChange:h,ref:a,size:m,variation:y}),autoComplete:t,className:Be(le.PhoneNumberField,e),hasError:u,isDisabled:c,isReadOnly:f,onInput:g,ref:E,size:m,type:"tel",variation:y,...S}),l7=qt(Qce);l7.displayName="PhoneNumberField";const Jce={name:"default"},u7=j.createContext(Jce),ede=()=>A.useContext(u7),tde=({children:t,className:e,id:n,isDisabled:r=!1,testId:s,value:o,labelPosition:a,...u},c)=>{const{currentValue:f,defaultValue:h,name:g,hasError:m,isGroupDisabled:y=!1,isRequired:S,isReadOnly:E,onChange:C,size:w,labelPosition:x}=ede(),{isFieldsetDisabled:T}=dp(y||r||E&&h!==o),R=f!==void 0?o===f:void 0,M=h!==void 0?o===h:void 0,N=a??x;return A.createElement(Fe,{as:"label",className:Be(le.Radio,Br(le.Radio,"disabled",T),N?`amplify-label-${N}`:null,e)},t&&A.createElement(Ts,{as:"span",className:Be(le.RadioLabel,Br(le.RadioLabel,"disabled",T))},t),A.createElement(YT,{checked:R,className:Be(le.VisuallyHidden,le.RadioInput),defaultChecked:M,hasError:m,id:n,isDisabled:T,isReadOnly:E,isRequired:S,onChange:C,ref:c,type:"radio",name:g,value:o,...u}),A.createElement(Fe,{"aria-hidden":"true",as:"span",className:Be(le.RadioButton,Ht(le.RadioButton,w)),testId:s}))},tR=qt(tde);tR.displayName="Radio";const nde=({children:t,className:e,defaultValue:n,descriptiveText:r,errorMessage:s,hasError:o=!1,id:a,isDisabled:u,isRequired:c,isReadOnly:f,legend:h,legendHidden:g=!1,labelPosition:m,onChange:y,name:S,size:E,testId:C,value:w,variation:x,...T},R)=>{const M=Fa(a),N=Fa(),O=r?Dl(N,QT):void 0,k=o?Dl(N,XT):void 0,F=ZT([k,O]),$=Dl(C,le.RadioGroup),D=A.useMemo(()=>({currentValue:w,defaultValue:n,hasError:o,isRequired:c,isReadOnly:f,isGroupDisabled:u,onChange:y,size:E,name:S,labelPosition:m}),[n,o,u,c,f,y,E,S,w,m]);return A.createElement(r7,{className:Be(le.Field,Ht(le.Field,E),le.RadioGroupField,e),isDisabled:u,legend:h,legendHidden:g,ref:R,role:"radiogroup",size:E,testId:C,variation:x,...T},A.createElement(db,{id:O,labelHidden:g,descriptiveText:r}),A.createElement(Fe,{"aria-describedby":F,className:le.RadioGroup,id:M,testId:$},A.createElement(u7.Provider,{value:D},t)),A.createElement(fb,{id:k,hasError:o,errorMessage:s}))},nR=qt(nde);nR.displayName="RadioGroupField";const pb=A.createContext({groupId:"",activeTab:"",setActiveTab:()=>{}}),c7="-",rde=({className:t,value:e,children:n,onClick:r,as:s="button",role:o="tab",...a},u)=>{const{activeTab:c,setActiveTab:f,groupId:h}=A.useContext(pb);let g=e;typeof g=="string"&&(g=g.replace(" ",c7));const m=c===e,y=S=>{bi(r)&&r?.(S),f(e)};return A.createElement(qe,{...a,role:o,as:s,id:`${h}-tab-${g}`,"aria-selected":m,"aria-controls":`${h}-panel-${g}`,tabIndex:m?void 0:-1,className:Be(le.TabsItem,Br(le.TabsItem,"active",c===e),t),ref:u,onClick:y},n)},rR=qt(rde);rR.displayName="Tabs.Item";const sde=t=>A.isValidElement(t),ode=({className:t,children:e,indicatorPosition:n,spacing:r,role:s="tablist",...o},a)=>{const u=A.useRef(null),{activeTab:c,setActiveTab:f}=A.useContext(pb);A.useImperativeHandle(a,()=>u.current);const h=A.useMemo(()=>A.Children.toArray(e).map(E=>{if(E&&sde(E))return E.props.value}).filter(E=>!!E),[e]),g=h.indexOf(c),m=A.useCallback(()=>{let E=g===h.length-1?0:g+1;const C=u.current?.querySelectorAll("button")??[];for(;C[E].disabled;)E===h.length-1?E=0:E++;const w=h[E];if(w){f(w);const x=C[E];x?.focus(),x?.click()}},[g,f,h]),y=A.useCallback(()=>{let E=g===0?h.length-1:g-1;const C=u.current?.querySelectorAll("button")??[];for(;C[E].disabled;)E===0?E=h.length-1:E--;const w=h[E];if(w){f(w);const x=C[E];x?.focus(),x?.click()}},[g,f,h]),S=A.useCallback(E=>{switch(E.key){case"ArrowLeft":E.preventDefault(),E.stopPropagation(),y();break;case"ArrowUp":case"ArrowRight":E.preventDefault(),E.stopPropagation(),m();break}},[y,m]);return A.createElement(qe,{...o,role:s,onKeyDown:S,className:Be(le.TabsList,n?Ht(le.TabsList,n):null,r?Ht(le.TabsList,r):null,t),ref:u},e)},sR=qt(ode);sR.displayName="Tabs.List";const ide=({className:t,value:e,children:n,role:r="tabpanel",...s},o)=>{const{activeTab:a,isLazy:u,groupId:c}=A.useContext(pb);if(u&&a!==e)return null;let f=e;return typeof f=="string"&&(f=f.replace(" ",c7)),A.createElement(qe,{...s,role:r,id:`${c}-panel-${f}`,"aria-labelledby":`${c}-tab-${f}`,className:Be(le.TabsPanel,Br(le.TabsPanel,"active",a===e),t),ref:o},n)},oR=qt(ide);oR.displayName="Tabs.Panel";const ade=({children:t,defaultValue:e,className:n,value:r,onValueChange:s,isLazy:o,...a},u)=>{const c=Fa(),f=r!==void 0,[h,g]=A.useState(()=>f?r:e),m=f?r:h??"",y=A.useCallback(E=>{bi(s)&&s(E),f||g(E)},[s,f]),S=A.useMemo(()=>({activeTab:m,isLazy:o,setActiveTab:y,groupId:c}),[m,y,o,c]);return A.createElement(pb.Provider,{value:S},A.createElement(qe,{...a,ref:u,className:Be(n,le.Tabs)},t))},iR=qt(ade);iR.displayName="Tabs.Container";const lde=({items:t,indicatorPosition:e,justifyContent:n,spacing:r,...s},o)=>A.createElement(iR,{...s,ref:o},A.createElement(sR,{indicatorPosition:e,justifyContent:n,spacing:r},t?.map(({value:a,label:u,content:c,...f})=>A.createElement(rR,{...f,key:a,value:a},u))),t?.map(({value:a,content:u,isDisabled:c})=>A.createElement(oR,{key:a,value:a,isDisabled:c},u))),Cl=Object.assign(qt(lde),{Item:rR,List:sR,Panel:oR,Container:iR});Cl.displayName="Tabs";const Ew=({errors:t,id:e,dataAttr:n})=>{if(!(t?.length>0))return null;const r=n?{[n]:!0}:{};return j.createElement(qe,{...r,id:e},t.map(s=>j.createElement(Ts,{key:s,role:"alert",variation:"error"},ye(s))))},ude="6.15.4",cde=({message:t,shouldWarn:e})=>{Hue({message:t,shouldWarn:e})},d7=A.createContext(null),cs=()=>{const t=A.useContext(d7);if(!t)throw new Error("`useCustomComponents` cannot be used outside of a `CustomComponentsContext.Provider`");return t},dde=t=>{const e=new FormData(t.target);return Object.fromEntries(e)};function ds(){const{submitForm:t,updateBlur:e,updateForm:n}=St(a=>[a.submitForm,a.updateBlur,a.updateForm]),r=A.useCallback(({target:{name:a}})=>{e({name:a})},[e]),s=A.useCallback(({target:{checked:a,name:u,type:c,value:f}})=>{n({name:u,value:c==="checkbox"&&!a?void 0:f})},[n]),o=A.useCallback(a=>{a.preventDefault(),t(dde(a))},[t]);return{handleBlur:r,handleChange:s,handleSubmit:o}}const Vr=()=>{const{error:t}=St(e=>[e.error]);return j.createElement(j.Fragment,null,t?j.createElement(e7,{variation:"error",isDismissible:!0},ye(t)):null)};function wL({autocomplete:t,dialCode:e,name:n,type:r,...s}){const{validationErrors:o}=St(({validationErrors:h})=>[h]),a=A.useMemo(()=>Lse(o[n]),[n,o]),u=a?.length>0,c=Fa(),f=u?c:void 0;return r==="tel"?A.createElement(A.Fragment,null,A.createElement(l7,{...s,name:n,defaultDialCode:e,dialCodeName:"country_code",autoComplete:t,hasError:u,"aria-describedby":f}),A.createElement(Ew,{dataAttr:"data-amplify-sign-up-errors",errors:a,id:c})):r==="password"?A.createElement(A.Fragment,null,A.createElement(eR,{...s,name:n,autoCapitalize:"off",autoComplete:t,hasError:u,"aria-describedby":f}),A.createElement(Ew,{dataAttr:"data-amplify-sign-up-errors",errors:a,id:c})):A.createElement(A.Fragment,null,A.createElement(fp,{...s,name:n,autoCapitalize:"off",autoComplete:t,hasError:u,type:r,"aria-describedby":f}),A.createElement(Ew,{dataAttr:"data-amplify-sign-up-errors",errors:a,id:c}))}function Po({includePassword:t}={}){const{fields:e}=St(({route:u})=>[u]),{selectedAuthMethod:n,preferredChallenge:r}=St(u=>[u.selectedAuthMethod,u.preferredChallenge]),s=n??r,o=t??(!s||s==="PASSWORD"),a=A.useRef(e.map((u,c)=>(u.name==="password"||u.name==="confirm_password")&&!o?A.createElement(wL,{key:c,...u,isRequired:!1}):A.createElement(wL,{key:c,...u})).filter(Boolean)).current;return A.createElement(A.Fragment,null,a)}function qr({children:t,className:e,variation:n="default"}){St(({route:o})=>[o]);const{components:{Header:r,Footer:s}}=cs();return j.createElement(qe,{className:e,"data-amplify-authenticator":"","data-variation":n},j.createElement(qe,{"data-amplify-container":""},j.createElement(r,null),j.createElement(qe,{"data-amplify-router":"","data-amplify-router-content":void 0},t),j.createElement(s,null)))}const{getDeliveryMessageText:fde,getDeliveryMethodText:hde,getConfirmingText:pde,getConfirmText:gde,getResendCodeText:mde}=Ln;function Vl({className:t,variation:e}){const{isPending:n,resendCode:r,codeDeliveryDetails:s}=St(f=>[f.isPending,f.resendCode,f.codeDeliveryDetails]),{handleChange:o,handleSubmit:a}=ds(),{components:{ConfirmSignUp:{Header:u=Vl.Header,Footer:c=Vl.Footer}}}=cs();return j.createElement(qr,{className:t,variation:e},j.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-confirmsignup":"",method:"post",onChange:o,onSubmit:a},j.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:n},j.createElement(u,null),j.createElement(Fe,{direction:"column"},j.createElement(Ts,{className:"amplify-authenticator__subtitle"},fde(s)),j.createElement(Po,null),j.createElement(Vr,null),j.createElement(en,{variation:"primary",isDisabled:n,type:"submit",loadingText:pde(),isLoading:n},gde()),j.createElement(en,{onClick:r,type:"button"},mde())),j.createElement(c,null))))}const vde=()=>{const{codeDeliveryDetails:t}=St(e=>[e.codeDeliveryDetails]);return j.createElement(Ar,{level:4},hde(t))};Vl.Header=vde;Vl.Footer=function(){return null};const{getChangePasswordText:f7,getChangingText:yde,getBackToSignInText:bde}=Ln,Xs=({className:t,variation:e})=>{const{isPending:n,toSignIn:r}=St(h=>[h.isPending,h.toSignIn]),{handleBlur:s,handleChange:o,handleSubmit:a}=ds(),{components:{ForceNewPassword:{FormFields:u=Xs.FormFields,Header:c=Xs.Header,Footer:f=Xs.Footer}}}=cs();return j.createElement(qr,{className:t,variation:e},j.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-forcenewpassword":"",method:"post",onChange:o,onSubmit:a,onBlur:s},j.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:n},j.createElement(c,null),j.createElement(u,null),j.createElement(Vr,null),j.createElement(en,{isDisabled:n,type:"submit",variation:"primary",isLoading:n,loadingText:yde()},f7()),j.createElement(en,{onClick:r,type:"button",variation:"link",size:"small"},bde()),j.createElement(f,null))))};Xs.FormFields=function(){return j.createElement(Po,null)};Xs.Header=function(){return j.createElement(Ar,{level:4},f7())};Xs.Footer=function(){return null};var ac={},Cw,xL;function Sde(){return xL||(xL=1,Cw=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),Cw}var ww={},pa={},_L;function cu(){if(_L)return pa;_L=1;let t;const e=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return pa.getSymbolSize=function(r){if(!r)throw new Error('"version" cannot be null or undefined');if(r<1||r>40)throw new Error('"version" should be in range from 1 to 40');return r*4+17},pa.getSymbolTotalCodewords=function(r){return e[r]},pa.getBCHDigit=function(n){let r=0;for(;n!==0;)r++,n>>>=1;return r},pa.setToSJISFunction=function(r){if(typeof r!="function")throw new Error('"toSJISFunc" is not a valid function.');t=r},pa.isKanjiModeEnabled=function(){return typeof t<"u"},pa.toSJIS=function(r){return t(r)},pa}var xw={},AL;function aR(){return AL||(AL=1,(function(t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2};function e(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+n)}}t.isValid=function(r){return r&&typeof r.bit<"u"&&r.bit>=0&&r.bit<4},t.from=function(r,s){if(t.isValid(r))return r;try{return e(r)}catch{return s}}})(xw)),xw}var _w,TL;function Ede(){if(TL)return _w;TL=1;function t(){this.buffer=[],this.length=0}return t.prototype={get:function(e){const n=Math.floor(e/8);return(this.buffer[n]>>>7-e%8&1)===1},put:function(e,n){for(let r=0;r<n;r++)this.putBit((e>>>n-r-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){const n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),e&&(this.buffer[n]|=128>>>this.length%8),this.length++}},_w=t,_w}var Aw,RL;function Cde(){if(RL)return Aw;RL=1;function t(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}return t.prototype.set=function(e,n,r,s){const o=e*this.size+n;this.data[o]=r,s&&(this.reservedBit[o]=!0)},t.prototype.get=function(e,n){return this.data[e*this.size+n]},t.prototype.xor=function(e,n,r){this.data[e*this.size+n]^=r},t.prototype.isReserved=function(e,n){return this.reservedBit[e*this.size+n]},Aw=t,Aw}var Tw={},IL;function wde(){return IL||(IL=1,(function(t){const e=cu().getSymbolSize;t.getRowColCoords=function(r){if(r===1)return[];const s=Math.floor(r/7)+2,o=e(r),a=o===145?26:Math.ceil((o-13)/(2*s-2))*2,u=[o-7];for(let c=1;c<s-1;c++)u[c]=u[c-1]-a;return u.push(6),u.reverse()},t.getPositions=function(r){const s=[],o=t.getRowColCoords(r),a=o.length;for(let u=0;u<a;u++)for(let c=0;c<a;c++)u===0&&c===0||u===0&&c===a-1||u===a-1&&c===0||s.push([o[u],o[c]]);return s}})(Tw)),Tw}var Rw={},OL;function xde(){if(OL)return Rw;OL=1;const t=cu().getSymbolSize,e=7;return Rw.getPositions=function(r){const s=t(r);return[[0,0],[s-e,0],[0,s-e]]},Rw}var Iw={},NL;function _de(){return NL||(NL=1,(function(t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const e={N1:3,N2:3,N3:40,N4:10};t.isValid=function(s){return s!=null&&s!==""&&!isNaN(s)&&s>=0&&s<=7},t.from=function(s){return t.isValid(s)?parseInt(s,10):void 0},t.getPenaltyN1=function(s){const o=s.size;let a=0,u=0,c=0,f=null,h=null;for(let g=0;g<o;g++){u=c=0,f=h=null;for(let m=0;m<o;m++){let y=s.get(g,m);y===f?u++:(u>=5&&(a+=e.N1+(u-5)),f=y,u=1),y=s.get(m,g),y===h?c++:(c>=5&&(a+=e.N1+(c-5)),h=y,c=1)}u>=5&&(a+=e.N1+(u-5)),c>=5&&(a+=e.N1+(c-5))}return a},t.getPenaltyN2=function(s){const o=s.size;let a=0;for(let u=0;u<o-1;u++)for(let c=0;c<o-1;c++){const f=s.get(u,c)+s.get(u,c+1)+s.get(u+1,c)+s.get(u+1,c+1);(f===4||f===0)&&a++}return a*e.N2},t.getPenaltyN3=function(s){const o=s.size;let a=0,u=0,c=0;for(let f=0;f<o;f++){u=c=0;for(let h=0;h<o;h++)u=u<<1&2047|s.get(f,h),h>=10&&(u===1488||u===93)&&a++,c=c<<1&2047|s.get(h,f),h>=10&&(c===1488||c===93)&&a++}return a*e.N3},t.getPenaltyN4=function(s){let o=0;const a=s.data.length;for(let c=0;c<a;c++)o+=s.data[c];return Math.abs(Math.ceil(o*100/a/5)-10)*e.N4};function n(r,s,o){switch(r){case t.Patterns.PATTERN000:return(s+o)%2===0;case t.Patterns.PATTERN001:return s%2===0;case t.Patterns.PATTERN010:return o%3===0;case t.Patterns.PATTERN011:return(s+o)%3===0;case t.Patterns.PATTERN100:return(Math.floor(s/2)+Math.floor(o/3))%2===0;case t.Patterns.PATTERN101:return s*o%2+s*o%3===0;case t.Patterns.PATTERN110:return(s*o%2+s*o%3)%2===0;case t.Patterns.PATTERN111:return(s*o%3+(s+o)%2)%2===0;default:throw new Error("bad maskPattern:"+r)}}t.applyMask=function(s,o){const a=o.size;for(let u=0;u<a;u++)for(let c=0;c<a;c++)o.isReserved(c,u)||o.xor(c,u,n(s,c,u))},t.getBestMask=function(s,o){const a=Object.keys(t.Patterns).length;let u=0,c=1/0;for(let f=0;f<a;f++){o(f),t.applyMask(f,s);const h=t.getPenaltyN1(s)+t.getPenaltyN2(s)+t.getPenaltyN3(s)+t.getPenaltyN4(s);t.applyMask(f,s),h<c&&(c=h,u=f)}return u}})(Iw)),Iw}var rm={},ML;function h7(){if(ML)return rm;ML=1;const t=aR(),e=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],n=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return rm.getBlocksCount=function(s,o){switch(o){case t.L:return e[(s-1)*4+0];case t.M:return e[(s-1)*4+1];case t.Q:return e[(s-1)*4+2];case t.H:return e[(s-1)*4+3];default:return}},rm.getTotalCodewordsCount=function(s,o){switch(o){case t.L:return n[(s-1)*4+0];case t.M:return n[(s-1)*4+1];case t.Q:return n[(s-1)*4+2];case t.H:return n[(s-1)*4+3];default:return}},rm}var Ow={},Lf={},PL;function Ade(){if(PL)return Lf;PL=1;const t=new Uint8Array(512),e=new Uint8Array(256);return(function(){let r=1;for(let s=0;s<255;s++)t[s]=r,e[r]=s,r<<=1,r&256&&(r^=285);for(let s=255;s<512;s++)t[s]=t[s-255]})(),Lf.log=function(r){if(r<1)throw new Error("log("+r+")");return e[r]},Lf.exp=function(r){return t[r]},Lf.mul=function(r,s){return r===0||s===0?0:t[e[r]+e[s]]},Lf}var kL;function Tde(){return kL||(kL=1,(function(t){const e=Ade();t.mul=function(r,s){const o=new Uint8Array(r.length+s.length-1);for(let a=0;a<r.length;a++)for(let u=0;u<s.length;u++)o[a+u]^=e.mul(r[a],s[u]);return o},t.mod=function(r,s){let o=new Uint8Array(r);for(;o.length-s.length>=0;){const a=o[0];for(let c=0;c<s.length;c++)o[c]^=e.mul(s[c],a);let u=0;for(;u<o.length&&o[u]===0;)u++;o=o.slice(u)}return o},t.generateECPolynomial=function(r){let s=new Uint8Array([1]);for(let o=0;o<r;o++)s=t.mul(s,new Uint8Array([1,e.exp(o)]));return s}})(Ow)),Ow}var Nw,DL;function Rde(){if(DL)return Nw;DL=1;const t=Tde();function e(n){this.genPoly=void 0,this.degree=n,this.degree&&this.initialize(this.degree)}return e.prototype.initialize=function(r){this.degree=r,this.genPoly=t.generateECPolynomial(this.degree)},e.prototype.encode=function(r){if(!this.genPoly)throw new Error("Encoder not initialized");const s=new Uint8Array(r.length+this.degree);s.set(r);const o=t.mod(s,this.genPoly),a=this.degree-o.length;if(a>0){const u=new Uint8Array(this.degree);return u.set(o,a),u}return o},Nw=e,Nw}var Mw={},Pw={},kw={},LL;function p7(){return LL||(LL=1,kw.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}),kw}var mo={},UL;function g7(){if(UL)return mo;UL=1;const t="[0-9]+",e="[A-Z $%*+\\-./:]+";let n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";n=n.replace(/u/g,"\\u");const r="(?:(?![A-Z0-9 $%*+\\-./:]|"+n+`)(?:.|[\r
210
+ ]))+`;mo.KANJI=new RegExp(n,"g"),mo.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),mo.BYTE=new RegExp(r,"g"),mo.NUMERIC=new RegExp(t,"g"),mo.ALPHANUMERIC=new RegExp(e,"g");const s=new RegExp("^"+n+"$"),o=new RegExp("^"+t+"$"),a=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return mo.testKanji=function(c){return s.test(c)},mo.testNumeric=function(c){return o.test(c)},mo.testAlphanumeric=function(c){return a.test(c)},mo}var FL;function du(){return FL||(FL=1,(function(t){const e=p7(),n=g7();t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(o,a){if(!o.ccBits)throw new Error("Invalid mode: "+o);if(!e.isValid(a))throw new Error("Invalid version: "+a);return a>=1&&a<10?o.ccBits[0]:a<27?o.ccBits[1]:o.ccBits[2]},t.getBestModeForData=function(o){return n.testNumeric(o)?t.NUMERIC:n.testAlphanumeric(o)?t.ALPHANUMERIC:n.testKanji(o)?t.KANJI:t.BYTE},t.toString=function(o){if(o&&o.id)return o.id;throw new Error("Invalid mode")},t.isValid=function(o){return o&&o.bit&&o.ccBits};function r(s){if(typeof s!="string")throw new Error("Param is not a string");switch(s.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+s)}}t.from=function(o,a){if(t.isValid(o))return o;try{return r(o)}catch{return a}}})(Pw)),Pw}var zL;function Ide(){return zL||(zL=1,(function(t){const e=cu(),n=h7(),r=aR(),s=du(),o=p7(),a=7973,u=e.getBCHDigit(a);function c(m,y,S){for(let E=1;E<=40;E++)if(y<=t.getCapacity(E,S,m))return E}function f(m,y){return s.getCharCountIndicator(m,y)+4}function h(m,y){let S=0;return m.forEach(function(E){const C=f(E.mode,y);S+=C+E.getBitsLength()}),S}function g(m,y){for(let S=1;S<=40;S++)if(h(m,S)<=t.getCapacity(S,y,s.MIXED))return S}t.from=function(y,S){return o.isValid(y)?parseInt(y,10):S},t.getCapacity=function(y,S,E){if(!o.isValid(y))throw new Error("Invalid QR Code version");typeof E>"u"&&(E=s.BYTE);const C=e.getSymbolTotalCodewords(y),w=n.getTotalCodewordsCount(y,S),x=(C-w)*8;if(E===s.MIXED)return x;const T=x-f(E,y);switch(E){case s.NUMERIC:return Math.floor(T/10*3);case s.ALPHANUMERIC:return Math.floor(T/11*2);case s.KANJI:return Math.floor(T/13);case s.BYTE:default:return Math.floor(T/8)}},t.getBestVersionForData=function(y,S){let E;const C=r.from(S,r.M);if(Array.isArray(y)){if(y.length>1)return g(y,C);if(y.length===0)return 1;E=y[0]}else E=y;return c(E.mode,E.getLength(),C)},t.getEncodedBits=function(y){if(!o.isValid(y)||y<7)throw new Error("Invalid QR Code version");let S=y<<12;for(;e.getBCHDigit(S)-u>=0;)S^=a<<e.getBCHDigit(S)-u;return y<<12|S}})(Mw)),Mw}var Dw={},jL;function Ode(){if(jL)return Dw;jL=1;const t=cu(),e=1335,n=21522,r=t.getBCHDigit(e);return Dw.getEncodedBits=function(o,a){const u=o.bit<<3|a;let c=u<<10;for(;t.getBCHDigit(c)-r>=0;)c^=e<<t.getBCHDigit(c)-r;return(u<<10|c)^n},Dw}var Lw={},Uw,BL;function Nde(){if(BL)return Uw;BL=1;const t=du();function e(n){this.mode=t.NUMERIC,this.data=n.toString()}return e.getBitsLength=function(r){return 10*Math.floor(r/3)+(r%3?r%3*3+1:0)},e.prototype.getLength=function(){return this.data.length},e.prototype.getBitsLength=function(){return e.getBitsLength(this.data.length)},e.prototype.write=function(r){let s,o,a;for(s=0;s+3<=this.data.length;s+=3)o=this.data.substr(s,3),a=parseInt(o,10),r.put(a,10);const u=this.data.length-s;u>0&&(o=this.data.substr(s),a=parseInt(o,10),r.put(a,u*3+1))},Uw=e,Uw}var Fw,HL;function Mde(){if(HL)return Fw;HL=1;const t=du(),e=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function n(r){this.mode=t.ALPHANUMERIC,this.data=r}return n.getBitsLength=function(s){return 11*Math.floor(s/2)+6*(s%2)},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(s){let o;for(o=0;o+2<=this.data.length;o+=2){let a=e.indexOf(this.data[o])*45;a+=e.indexOf(this.data[o+1]),s.put(a,11)}this.data.length%2&&s.put(e.indexOf(this.data[o]),6)},Fw=n,Fw}var zw,$L;function Pde(){return $L||($L=1,zw=function(e){for(var n=[],r=e.length,s=0;s<r;s++){var o=e.charCodeAt(s);if(o>=55296&&o<=56319&&r>s+1){var a=e.charCodeAt(s+1);a>=56320&&a<=57343&&(o=(o-55296)*1024+a-56320+65536,s+=1)}if(o<128){n.push(o);continue}if(o<2048){n.push(o>>6|192),n.push(o&63|128);continue}if(o<55296||o>=57344&&o<65536){n.push(o>>12|224),n.push(o>>6&63|128),n.push(o&63|128);continue}if(o>=65536&&o<=1114111){n.push(o>>18|240),n.push(o>>12&63|128),n.push(o>>6&63|128),n.push(o&63|128);continue}n.push(239,191,189)}return new Uint8Array(n).buffer}),zw}var jw,qL;function kde(){if(qL)return jw;qL=1;const t=Pde(),e=du();function n(r){this.mode=e.BYTE,this.data=new Uint8Array(t(r))}return n.getBitsLength=function(s){return s*8},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(r){for(let s=0,o=this.data.length;s<o;s++)r.put(this.data[s],8)},jw=n,jw}var Bw,WL;function Dde(){if(WL)return Bw;WL=1;const t=du(),e=cu();function n(r){this.mode=t.KANJI,this.data=r}return n.getBitsLength=function(s){return s*13},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(r){let s;for(s=0;s<this.data.length;s++){let o=e.toSJIS(this.data[s]);if(o>=33088&&o<=40956)o-=33088;else if(o>=57408&&o<=60351)o-=49472;else throw new Error("Invalid SJIS character: "+this.data[s]+`
211
+ Make sure your charset is UTF-8`);o=(o>>>8&255)*192+(o&255),r.put(o,13)}},Bw=n,Bw}var Hw={exports:{}},VL;function Lde(){return VL||(VL=1,(function(t){var e={single_source_shortest_paths:function(n,r,s){var o={},a={};a[r]=0;var u=e.PriorityQueue.make();u.push(r,0);for(var c,f,h,g,m,y,S,E,C;!u.empty();){c=u.pop(),f=c.value,g=c.cost,m=n[f]||{};for(h in m)m.hasOwnProperty(h)&&(y=m[h],S=g+y,E=a[h],C=typeof a[h]>"u",(C||E>S)&&(a[h]=S,u.push(h,S),o[h]=f))}if(typeof s<"u"&&typeof a[s]>"u"){var w=["Could not find a path from ",r," to ",s,"."].join("");throw new Error(w)}return o},extract_shortest_path_from_predecessor_list:function(n,r){for(var s=[],o=r;o;)s.push(o),n[o],o=n[o];return s.reverse(),s},find_path:function(n,r,s){var o=e.single_source_shortest_paths(n,r,s);return e.extract_shortest_path_from_predecessor_list(o,s)},PriorityQueue:{make:function(n){var r=e.PriorityQueue,s={},o;n=n||{};for(o in r)r.hasOwnProperty(o)&&(s[o]=r[o]);return s.queue=[],s.sorter=n.sorter||r.default_sorter,s},default_sorter:function(n,r){return n.cost-r.cost},push:function(n,r){var s={value:n,cost:r};this.queue.push(s),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};t.exports=e})(Hw)),Hw.exports}var GL;function Ude(){return GL||(GL=1,(function(t){const e=du(),n=Nde(),r=Mde(),s=kde(),o=Dde(),a=g7(),u=cu(),c=Lde();function f(w){return unescape(encodeURIComponent(w)).length}function h(w,x,T){const R=[];let M;for(;(M=w.exec(T))!==null;)R.push({data:M[0],index:M.index,mode:x,length:M[0].length});return R}function g(w){const x=h(a.NUMERIC,e.NUMERIC,w),T=h(a.ALPHANUMERIC,e.ALPHANUMERIC,w);let R,M;return u.isKanjiModeEnabled()?(R=h(a.BYTE,e.BYTE,w),M=h(a.KANJI,e.KANJI,w)):(R=h(a.BYTE_KANJI,e.BYTE,w),M=[]),x.concat(T,R,M).sort(function(O,k){return O.index-k.index}).map(function(O){return{data:O.data,mode:O.mode,length:O.length}})}function m(w,x){switch(x){case e.NUMERIC:return n.getBitsLength(w);case e.ALPHANUMERIC:return r.getBitsLength(w);case e.KANJI:return o.getBitsLength(w);case e.BYTE:return s.getBitsLength(w)}}function y(w){return w.reduce(function(x,T){const R=x.length-1>=0?x[x.length-1]:null;return R&&R.mode===T.mode?(x[x.length-1].data+=T.data,x):(x.push(T),x)},[])}function S(w){const x=[];for(let T=0;T<w.length;T++){const R=w[T];switch(R.mode){case e.NUMERIC:x.push([R,{data:R.data,mode:e.ALPHANUMERIC,length:R.length},{data:R.data,mode:e.BYTE,length:R.length}]);break;case e.ALPHANUMERIC:x.push([R,{data:R.data,mode:e.BYTE,length:R.length}]);break;case e.KANJI:x.push([R,{data:R.data,mode:e.BYTE,length:f(R.data)}]);break;case e.BYTE:x.push([{data:R.data,mode:e.BYTE,length:f(R.data)}])}}return x}function E(w,x){const T={},R={start:{}};let M=["start"];for(let N=0;N<w.length;N++){const O=w[N],k=[];for(let F=0;F<O.length;F++){const $=O[F],D=""+N+F;k.push(D),T[D]={node:$,lastCount:0},R[D]={};for(let z=0;z<M.length;z++){const q=M[z];T[q]&&T[q].node.mode===$.mode?(R[q][D]=m(T[q].lastCount+$.length,$.mode)-m(T[q].lastCount,$.mode),T[q].lastCount+=$.length):(T[q]&&(T[q].lastCount=$.length),R[q][D]=m($.length,$.mode)+4+e.getCharCountIndicator($.mode,x))}}M=k}for(let N=0;N<M.length;N++)R[M[N]].end=0;return{map:R,table:T}}function C(w,x){let T;const R=e.getBestModeForData(w);if(T=e.from(x,R),T!==e.BYTE&&T.bit<R.bit)throw new Error('"'+w+'" cannot be encoded with mode '+e.toString(T)+`.
212
+ Suggested mode is: `+e.toString(R));switch(T===e.KANJI&&!u.isKanjiModeEnabled()&&(T=e.BYTE),T){case e.NUMERIC:return new n(w);case e.ALPHANUMERIC:return new r(w);case e.KANJI:return new o(w);case e.BYTE:return new s(w)}}t.fromArray=function(x){return x.reduce(function(T,R){return typeof R=="string"?T.push(C(R,null)):R.data&&T.push(C(R.data,R.mode)),T},[])},t.fromString=function(x,T){const R=g(x,u.isKanjiModeEnabled()),M=S(R),N=E(M,T),O=c.find_path(N.map,"start","end"),k=[];for(let F=1;F<O.length-1;F++)k.push(N.table[O[F]].node);return t.fromArray(y(k))},t.rawSplit=function(x){return t.fromArray(g(x,u.isKanjiModeEnabled()))}})(Lw)),Lw}var KL;function Fde(){if(KL)return ww;KL=1;const t=cu(),e=aR(),n=Ede(),r=Cde(),s=wde(),o=xde(),a=_de(),u=h7(),c=Rde(),f=Ide(),h=Ode(),g=du(),m=Ude();function y(N,O){const k=N.size,F=o.getPositions(O);for(let $=0;$<F.length;$++){const D=F[$][0],z=F[$][1];for(let q=-1;q<=7;q++)if(!(D+q<=-1||k<=D+q))for(let K=-1;K<=7;K++)z+K<=-1||k<=z+K||(q>=0&&q<=6&&(K===0||K===6)||K>=0&&K<=6&&(q===0||q===6)||q>=2&&q<=4&&K>=2&&K<=4?N.set(D+q,z+K,!0,!0):N.set(D+q,z+K,!1,!0))}}function S(N){const O=N.size;for(let k=8;k<O-8;k++){const F=k%2===0;N.set(k,6,F,!0),N.set(6,k,F,!0)}}function E(N,O){const k=s.getPositions(O);for(let F=0;F<k.length;F++){const $=k[F][0],D=k[F][1];for(let z=-2;z<=2;z++)for(let q=-2;q<=2;q++)z===-2||z===2||q===-2||q===2||z===0&&q===0?N.set($+z,D+q,!0,!0):N.set($+z,D+q,!1,!0)}}function C(N,O){const k=N.size,F=f.getEncodedBits(O);let $,D,z;for(let q=0;q<18;q++)$=Math.floor(q/3),D=q%3+k-8-3,z=(F>>q&1)===1,N.set($,D,z,!0),N.set(D,$,z,!0)}function w(N,O,k){const F=N.size,$=h.getEncodedBits(O,k);let D,z;for(D=0;D<15;D++)z=($>>D&1)===1,D<6?N.set(D,8,z,!0):D<8?N.set(D+1,8,z,!0):N.set(F-15+D,8,z,!0),D<8?N.set(8,F-D-1,z,!0):D<9?N.set(8,15-D-1+1,z,!0):N.set(8,15-D-1,z,!0);N.set(F-8,8,1,!0)}function x(N,O){const k=N.size;let F=-1,$=k-1,D=7,z=0;for(let q=k-1;q>0;q-=2)for(q===6&&q--;;){for(let K=0;K<2;K++)if(!N.isReserved($,q-K)){let Y=!1;z<O.length&&(Y=(O[z]>>>D&1)===1),N.set($,q-K,Y),D--,D===-1&&(z++,D=7)}if($+=F,$<0||k<=$){$-=F,F=-F;break}}}function T(N,O,k){const F=new n;k.forEach(function(K){F.put(K.mode.bit,4),F.put(K.getLength(),g.getCharCountIndicator(K.mode,N)),K.write(F)});const $=t.getSymbolTotalCodewords(N),D=u.getTotalCodewordsCount(N,O),z=($-D)*8;for(F.getLengthInBits()+4<=z&&F.put(0,4);F.getLengthInBits()%8!==0;)F.putBit(0);const q=(z-F.getLengthInBits())/8;for(let K=0;K<q;K++)F.put(K%2?17:236,8);return R(F,N,O)}function R(N,O,k){const F=t.getSymbolTotalCodewords(O),$=u.getTotalCodewordsCount(O,k),D=F-$,z=u.getBlocksCount(O,k),q=F%z,K=z-q,Y=Math.floor(F/z),H=Math.floor(D/z),te=H+1,fe=Y-H,de=new c(fe);let Ae=0;const L=new Array(z),G=new Array(z);let Z=0;const ee=new Uint8Array(N.buffer);for(let xe=0;xe<z;xe++){const Xe=xe<K?H:te;L[xe]=ee.slice(Ae,Ae+Xe),G[xe]=de.encode(L[xe]),Ae+=Xe,Z=Math.max(Z,Xe)}const oe=new Uint8Array(F);let he=0,ue,ve;for(ue=0;ue<Z;ue++)for(ve=0;ve<z;ve++)ue<L[ve].length&&(oe[he++]=L[ve][ue]);for(ue=0;ue<fe;ue++)for(ve=0;ve<z;ve++)oe[he++]=G[ve][ue];return oe}function M(N,O,k,F){let $;if(Array.isArray(N))$=m.fromArray(N);else if(typeof N=="string"){let Y=O;if(!Y){const H=m.rawSplit(N);Y=f.getBestVersionForData(H,k)}$=m.fromString(N,Y||40)}else throw new Error("Invalid data");const D=f.getBestVersionForData($,k);if(!D)throw new Error("The amount of data is too big to be stored in a QR Code");if(!O)O=D;else if(O<D)throw new Error(`
213
+ The chosen QR Code version cannot contain this amount of data.
214
+ Minimum version required to store current data is: `+D+`.
215
+ `);const z=T(O,k,$),q=t.getSymbolSize(O),K=new r(q);return y(K,O),S(K),E(K,O),w(K,k,0),O>=7&&C(K,O),x(K,z),isNaN(F)&&(F=a.getBestMask(K,w.bind(null,K,k))),a.applyMask(F,K),w(K,k,F),{modules:K,version:O,errorCorrectionLevel:k,maskPattern:F,segments:$}}return ww.create=function(O,k){if(typeof O>"u"||O==="")throw new Error("No input text");let F=e.M,$,D;return typeof k<"u"&&(F=e.from(k.errorCorrectionLevel,e.M),$=f.from(k.version),D=a.from(k.maskPattern),k.toSJISFunc&&t.setToSJISFunction(k.toSJISFunc)),M(O,$,F,D)},ww}var $w={},qw={},YL;function m7(){return YL||(YL=1,(function(t){function e(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");let r=n.slice().replace("#","").split("");if(r.length<3||r.length===5||r.length>8)throw new Error("Invalid hex color: "+n);(r.length===3||r.length===4)&&(r=Array.prototype.concat.apply([],r.map(function(o){return[o,o]}))),r.length===6&&r.push("F","F");const s=parseInt(r.join(""),16);return{r:s>>24&255,g:s>>16&255,b:s>>8&255,a:s&255,hex:"#"+r.slice(0,6).join("")}}t.getOptions=function(r){r||(r={}),r.color||(r.color={});const s=typeof r.margin>"u"||r.margin===null||r.margin<0?4:r.margin,o=r.width&&r.width>=21?r.width:void 0,a=r.scale||4;return{width:o,scale:o?4:a,margin:s,color:{dark:e(r.color.dark||"#000000ff"),light:e(r.color.light||"#ffffffff")},type:r.type,rendererOpts:r.rendererOpts||{}}},t.getScale=function(r,s){return s.width&&s.width>=r+s.margin*2?s.width/(r+s.margin*2):s.scale},t.getImageWidth=function(r,s){const o=t.getScale(r,s);return Math.floor((r+s.margin*2)*o)},t.qrToImageData=function(r,s,o){const a=s.modules.size,u=s.modules.data,c=t.getScale(a,o),f=Math.floor((a+o.margin*2)*c),h=o.margin*c,g=[o.color.light,o.color.dark];for(let m=0;m<f;m++)for(let y=0;y<f;y++){let S=(m*f+y)*4,E=o.color.light;if(m>=h&&y>=h&&m<f-h&&y<f-h){const C=Math.floor((m-h)/c),w=Math.floor((y-h)/c);E=g[u[C*a+w]?1:0]}r[S++]=E.r,r[S++]=E.g,r[S++]=E.b,r[S]=E.a}}})(qw)),qw}var ZL;function zde(){return ZL||(ZL=1,(function(t){const e=m7();function n(s,o,a){s.clearRect(0,0,o.width,o.height),o.style||(o.style={}),o.height=a,o.width=a,o.style.height=a+"px",o.style.width=a+"px"}function r(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}t.render=function(o,a,u){let c=u,f=a;typeof c>"u"&&(!a||!a.getContext)&&(c=a,a=void 0),a||(f=r()),c=e.getOptions(c);const h=e.getImageWidth(o.modules.size,c),g=f.getContext("2d"),m=g.createImageData(h,h);return e.qrToImageData(m.data,o,c),n(g,f,h),g.putImageData(m,0,0),f},t.renderToDataURL=function(o,a,u){let c=u;typeof c>"u"&&(!a||!a.getContext)&&(c=a,a=void 0),c||(c={});const f=t.render(o,a,c),h=c.type||"image/png",g=c.rendererOpts||{};return f.toDataURL(h,g.quality)}})($w)),$w}var Ww={},XL;function jde(){if(XL)return Ww;XL=1;const t=m7();function e(s,o){const a=s.a/255,u=o+'="'+s.hex+'"';return a<1?u+" "+o+'-opacity="'+a.toFixed(2).slice(1)+'"':u}function n(s,o,a){let u=s+o;return typeof a<"u"&&(u+=" "+a),u}function r(s,o,a){let u="",c=0,f=!1,h=0;for(let g=0;g<s.length;g++){const m=Math.floor(g%o),y=Math.floor(g/o);!m&&!f&&(f=!0),s[g]?(h++,g>0&&m>0&&s[g-1]||(u+=f?n("M",m+a,.5+y+a):n("m",c,0),c=0,f=!1),m+1<o&&s[g+1]||(u+=n("h",h),h=0)):c++}return u}return Ww.render=function(o,a,u){const c=t.getOptions(a),f=o.modules.size,h=o.modules.data,g=f+c.margin*2,m=c.color.light.a?"<path "+e(c.color.light,"fill")+' d="M0 0h'+g+"v"+g+'H0z"/>':"",y="<path "+e(c.color.dark,"stroke")+' d="'+r(h,f,c.margin)+'"/>',S='viewBox="0 0 '+g+" "+g+'"',C='<svg xmlns="http://www.w3.org/2000/svg" '+(c.width?'width="'+c.width+'" height="'+c.width+'" ':"")+S+' shape-rendering="crispEdges">'+m+y+`</svg>
216
+ `;return typeof u=="function"&&u(null,C),C},Ww}var QL;function Bde(){if(QL)return ac;QL=1;const t=Sde(),e=Fde(),n=zde(),r=jde();function s(o,a,u,c,f){const h=[].slice.call(arguments,1),g=h.length,m=typeof h[g-1]=="function";if(!m&&!t())throw new Error("Callback required as last argument");if(m){if(g<2)throw new Error("Too few arguments provided");g===2?(f=u,u=a,a=c=void 0):g===3&&(a.getContext&&typeof f>"u"?(f=c,c=void 0):(f=c,c=u,u=a,a=void 0))}else{if(g<1)throw new Error("Too few arguments provided");return g===1?(u=a,a=c=void 0):g===2&&!a.getContext&&(c=u,u=a,a=void 0),new Promise(function(y,S){try{const E=e.create(u,c);y(o(E,a,c))}catch(E){S(E)}})}try{const y=e.create(u,c);f(null,o(y,a,c))}catch(y){f(y)}}return ac.create=e.create,ac.toCanvas=s.bind(null,n.render),ac.toDataURL=s.bind(null,n.renderToDataURL),ac.toString=s.bind(null,function(o,a,u){return r.render(o,u)}),ac}var Hde=Bde();const $de=Va(Hde),qde=t=>t==="signIn"||t==="signUp",lR=t=>!!t&&(t==="EMAIL_OTP"||t==="SMS_MFA"),{getConfirmText:Wde,getConfirmingText:Vde,getBackToSignInText:Gde,getResendCodeText:Kde}=Ln,gb=()=>{const{isPending:t,toSignIn:e,challengeName:n,resendCode:r,selectedAuthMethod:s,availableAuthMethods:o}=St(c=>[c.isPending,c.toSignIn,c.challengeName,c.resendCode,c.selectedAuthMethod,c.availableAuthMethods]),a=!!s&&s!=="PASSWORD"||!!o?.some(c=>c!=="PASSWORD"),u=lR(n)&&a&&r;return j.createElement(Fe,{direction:"column"},j.createElement(en,{isDisabled:t,type:"submit",variation:"primary",isLoading:t,loadingText:Vde()},Wde()),u&&j.createElement(en,{onClick:r,type:"button"},Kde()),j.createElement(en,{onClick:e,type:"button",variation:"link",size:"small"},Gde()))},Yde=new sr("SetupTotp-logger"),{getSetupTotpText:Zde,getCopiedText:Xde,getLoadingText:Qde}=Ln,za=({className:t,variation:e})=>{const{totpSecretCode:n,isPending:r,username:s,QRFields:o}=St(R=>[R.isPending,R.totpSecretCode,R.username]),{handleChange:a,handleSubmit:u}=ds(),{components:{SetupTotp:{Header:c=za.Header,Footer:f=za.Footer}}}=cs(),[h,g]=A.useState(!0),[m,y]=A.useState(),[S,E]=A.useState("COPY"),{totpIssuer:C="AWSCognito",totpUsername:w=s}=o??{},x=A.useCallback(async()=>{try{const R=Hse(C,w,n),M=await $de.toDataURL(R);y(M)}catch(R){Yde.error(R)}finally{g(!1)}},[C,w,n]);A.useEffect(()=>{m||x()},[x,m]);const T=()=>{navigator.clipboard.writeText(n),E(Xde())};return A.createElement(qr,{className:t,variation:e},A.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-setup-totp":"",method:"post",onChange:a,onSubmit:u},A.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:r},A.createElement(c,null),A.createElement(Fe,{direction:"column"},h?A.createElement("p",null,Qde(),"…"):A.createElement("img",{"data-amplify-qrcode":!0,src:m,alt:"qr code",width:"228",height:"228"}),A.createElement(Fe,{"data-amplify-copy":!0},A.createElement("div",null,n),A.createElement(Fe,{"data-amplify-copy-svg":!0,onClick:T},A.createElement("div",{"data-amplify-copy-tooltip":!0},S),A.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},A.createElement("path",{d:"M16 1H4C2.9 1 2 1.9 2 3V17H4V3H16V1ZM15 5H8C6.9 5 6.01 5.9 6.01 7L6 21C6 22.1 6.89 23 7.99 23H19C20.1 23 21 22.1 21 21V11L15 5ZM8 21V7H14V12H19V21H8Z"})))),A.createElement(Po,null),A.createElement(Vr,null)),A.createElement(gb,null),A.createElement(f,null))))};za.Header=function(){return A.createElement(Ar,{level:3},Zde())};za.Footer=function(){return null};const{getSubmitText:Jde,getSubmittingText:efe}=Ln,mb=t=>{const{cancelButtonSendType:e,cancelButtonText:n,submitButtonText:r}=t,{isPending:s,resendCode:o,skipVerification:a,toSignIn:u}=St(g=>[g.isPending]),c=()=>{switch(e){case"SKIP":a();break;case"RESEND":o();break;case"SIGN_IN":u();break;default:return}},f=s?j.createElement(j.Fragment,null,efe(),"…"):j.createElement(j.Fragment,null,Jde()),h=r??f;return j.createElement(Fe,{direction:"column"},j.createElement(en,{variation:"primary",isDisabled:s,type:"submit"},h),j.createElement(Fe,{direction:"column",alignItems:"center"},j.createElement(en,{onClick:c,type:"button",variation:"link",size:"small"},n)))},tfe=()=>j.createElement("svg",{"aria-label":"Apple icon",className:"amplify-icon federated-sign-in-icon",fill:"#000",preserveAspectRatio:"xMidYMid",stroke:"#000",strokeWidth:"0",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},j.createElement("path",{d:"M747.4 535.7c-.4-68.2 30.5-119.6 92.9-157.5-34.9-50-87.7-77.5-157.3-82.8-65.9-5.2-138 38.4-164.4 38.4-27.9 0-91.7-36.6-141.9-36.6C273.1 298.8 163 379.8 163 544.6c0 48.7 8.9 99 26.7 150.8 23.8 68.2 109.6 235.3 199.1 232.6 46.8-1.1 79.9-33.2 140.8-33.2 59.1 0 89.7 33.2 141.9 33.2 90.3-1.3 167.9-153.2 190.5-221.6-121.1-57.1-114.6-167.2-114.6-170.7zm-105.1-305c50.7-60.2 46.1-115 44.6-134.7-44.8 2.6-96.6 30.5-126.1 64.8-32.5 36.8-51.6 82.3-47.5 133.6 48.4 3.7 92.6-21.2 129-63.7z"})),nfe=()=>j.createElement("svg",{"aria-label":"Google icon",className:"amplify-icon federated-sign-in-icon",viewBox:"0 0 256 262",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid"},j.createElement("path",{d:"M255.878 133.451c0-10.734-.871-18.567-2.756-26.69H130.55v48.448h71.947c-1.45 12.04-9.283 30.172-26.69 42.356l-.244 1.622 38.755 30.023 2.685.268c24.659-22.774 38.875-56.282 38.875-96.027",fill:"#4285F4"}),j.createElement("path",{d:"M130.55 261.1c35.248 0 64.839-11.605 86.453-31.622l-41.196-31.913c-11.024 7.688-25.82 13.055-45.257 13.055-34.523 0-63.824-22.773-74.269-54.25l-1.531.13-40.298 31.187-.527 1.465C35.393 231.798 79.49 261.1 130.55 261.1",fill:"#34A853"}),j.createElement("path",{d:"M56.281 156.37c-2.756-8.123-4.351-16.827-4.351-25.82 0-8.994 1.595-17.697 4.206-25.82l-.073-1.73L15.26 71.312l-1.335.635C5.077 89.644 0 109.517 0 130.55s5.077 40.905 13.925 58.602l42.356-32.782",fill:"#FBBC05"}),j.createElement("path",{d:"M130.55 50.479c24.514 0 41.05 10.589 50.479 19.438l36.844-35.974C195.245 12.91 165.798 0 130.55 0 79.49 0 35.393 29.301 13.925 71.947l42.211 32.783c10.59-31.477 39.891-54.251 74.414-54.251",fill:"#EB4335"})),rfe=()=>j.createElement(ZF,{className:"federated-sign-in-icon",ariaLabel:"Facebook icon",viewBox:{minX:0,minY:0,width:279,height:538},pathData:"M82.3409742,538 L82.3409742,292.936652 L0,292.936652 L0,196.990154 L82.2410458,196.990154 L82.2410458,126.4295 C82.2410458,44.575144 132.205229,0 205.252865,0 C240.227794,0 270.306232,2.59855099 279,3.79788222 L279,89.2502322 L228.536175,89.2502322 C188.964542,89.2502322 181.270057,108.139699 181.270057,135.824262 L181.270057,196.89021 L276.202006,196.89021 L263.810888,292.836708 L181.16913,292.836708 L181.16913,538 L82.3409742,538 Z",fill:"#1877F2"}),sfe=()=>j.createElement("svg",{"aria-label":"Amazon icon",className:"amplify-icon federated-sign-in-icon",viewBox:"0 0 243 264",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid"},j.createElement("path",{d:"M230.826 208.039C227.468 203.683 208.551 205.982 200.056 206.998C197.471 207.321 197.076 205.042 199.407 203.405C214.475 192.665 239.201 195.766 242.082 199.364C244.966 202.982 241.337 228.071 227.173 240.049C225.001 241.888 222.93 240.904 223.898 238.468C227.077 230.431 234.205 212.419 230.826 208.039ZM123.769 264C71.0234 264 39.0764 241.955 14.7853 217.542C9.97339 212.706 3.71799 206.296 0.311513 200.691C-1.09773 198.372 2.59096 195.022 5.04421 196.844C35.239 219.268 79.1012 239.538 122.53 239.538C151.82 239.538 188.046 227.47 217.669 214.868C222.147 212.966 222.147 219.18 221.512 221.061C221.183 222.032 206.515 236.221 186.247 247.047C167.304 257.166 143.397 264 123.769 264Z",fill:"#F2541B"}),j.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M142.943 111.185C142.943 124.756 143.268 136.054 136.406 148.123C130.856 157.913 122.027 163.95 112.222 163.95C98.8288 163.95 90.9806 153.772 90.9806 138.693C90.9806 109.036 117.677 103.647 142.943 103.647V111.185ZM178.166 196.081C175.858 198.15 171.635 198.22 169.914 196.894C157.974 187.684 149.89 173.688 149.89 173.688C130.706 193.156 117.127 199 92.2879 199C62.8772 199 40 180.905 40 144.729C40 116.461 55.3552 97.2408 77.2563 87.823C96.2094 79.5256 122.684 78.0173 142.943 75.7517C142.943 75.7517 144.633 53.933 138.699 45.9806C134.098 39.8163 126.272 36.9329 119.089 36.9329C106.127 36.8829 93.61 43.9051 91.1262 57.4188C90.4136 61.2829 87.5533 64.5261 84.54 64.206L51.0823 60.5922C48.5156 60.2951 45.0381 57.6639 45.8636 53.3081C53.644 12.3684 90.7373 0 123.989 0C140.983 0 163.21 4.51651 176.608 17.3349C193.597 33.1648 191.969 54.2755 191.969 77.2722V131.51C191.969 147.835 198.768 154.987 205.151 163.775C207.376 166.953 207.886 170.714 205.04 173.032C197.902 178.999 178.166 196.081 178.166 196.081Z",fill:"#F2541B"})),sm=t=>{const{icon:e,provider:n,text:r}=t,{toFederatedSignIn:s}=St(),o=u=>{u.preventDefault(),s({provider:n})};let a;return e==="facebook"?a=j.createElement(rfe,null):e==="google"?a=j.createElement(nfe,null):e==="amazon"?a=j.createElement(sfe,null):e==="apple"&&(a=j.createElement(tfe,null)),j.createElement(en,{onClick:o,className:"federated-sign-in-button",gap:"1rem"},a,j.createElement(Ts,{as:"span"},r))},{getSignInWithFederationText:om,getOrText:ofe}=Ln;function v7(){const{route:t,socialProviders:e}=St(({route:n,socialProviders:r})=>[n,r]);return e.length===0?null:j.createElement(Fe,{direction:"column",padding:"0 0 1rem 0",className:"federated-sign-in-container"},e.map(n=>{switch(n){case"amazon":return j.createElement(sm,{icon:"amazon",key:n,provider:Tc.Amazon,text:om(t,n)});case"apple":return j.createElement(sm,{icon:"apple",key:n,provider:Tc.Apple,text:om(t,n)});case"facebook":return j.createElement(sm,{icon:"facebook",key:n,provider:Tc.Facebook,text:om(t,n)});case"google":return j.createElement(sm,{icon:"google",key:n,provider:Tc.Google,text:om(t,n)});default:console.error(`Authenticator does not support ${n}. Please open an issue: https://github.com/aws-amplify/amplify-ui/issues/choose`)}}),j.createElement(JT,{size:"small",label:ofe()}))}const{getSignInText:im,getSigningInText:ife,getForgotPasswordText:afe,getSignInWithEmailText:lfe,getSignInWithSmsText:ufe,getSignInWithPasskeyText:cfe,getOtherSignInOptionsText:dfe,getEnterUsernameFirstText:ffe}=Ln;function Ei(){const{isPending:t,availableAuthMethods:e,preferredChallenge:n,toShowAuthMethods:r}=St(w=>[w.isPending,w.availableAuthMethods,w.preferredChallenge,w.toShowAuthMethods]),{handleChange:s,handleSubmit:o}=ds(),[a,u]=j.useState(""),{components:{SignIn:{Header:c=Ei.Header,Footer:f=Ei.Footer}}}=cs(),g=e&&e.length>1&&n,m=a.trim().length>0,y=j.useCallback(w=>{const{name:x,value:T}=w.target;x==="username"&&typeof T=="string"&&u(T),s(w)},[s]),S=()=>{if(!n)return im();switch(n){case"EMAIL_OTP":return lfe();case"SMS_OTP":return ufe();case"WEB_AUTHN":return cfe();default:return im()}},E=w=>{w.preventDefault(),o(w)},C=w=>{w.preventDefault(),r()};return j.createElement(qe,null,j.createElement(c,null),j.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-signin":"",method:"post",onSubmit:g?E:o,onChange:y},j.createElement(v7,null),j.createElement(Fe,{direction:"column"},j.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:t},j.createElement(hb,null,j.createElement("legend",null,im())),j.createElement(Po,null)),j.createElement(Vr,null),j.createElement(en,{isDisabled:t,type:"submit",variation:"primary",isLoading:t,loadingText:ife()},g?S():im()),g&&j.createElement(en,{onClick:C,size:"small",variation:"link",isDisabled:t||!m,title:m?void 0:ffe()},dfe()),j.createElement(f,null))))}const hfe=()=>{const{toForgotPassword:t}=St(e=>[e.toForgotPassword]);return j.createElement(qe,{"data-amplify-footer":""},j.createElement(en,{onClick:t,size:"small",variation:"link"},afe()))};Ei.Footer=hfe;Ei.Header=function(){return null};const{getCreateAccountText:JL,getCreatingAccountText:pfe,getCreateAccountWithEmailText:gfe,getCreateAccountWithPasswordText:mfe,getCreateAccountWithSmsText:vfe,getOrText:yfe}=Ln;function Qs(){const{hasValidationErrors:t,isPending:e,availableAuthMethods:n,preferredChallenge:r,selectedAuthMethod:s}=St(T=>[T.hasValidationErrors,T.isPending,T.availableAuthMethods,T.preferredChallenge,T.selectedAuthMethod]),{handleChange:o,handleBlur:a,handleSubmit:u}=ds(),{components:{SignUp:{Header:c=Qs.Header,FormFields:f=Qs.FormFields,Footer:h=Qs.Footer}}}=cs(),g=n?.filter(T=>T!=="WEB_AUTHN"),m=g&&g.length>1,y=r&&r!=="WEB_AUTHN"?r:"PASSWORD",S=g?.filter(T=>T!==y)??[],C=(s??y)!=="PASSWORD",w=T=>{switch(T){case"EMAIL_OTP":return gfe();case"SMS_OTP":return vfe();case"PASSWORD":return m?mfe():JL();default:return JL()}},x=T=>R=>{R.preventDefault();const M=R.target.closest("form");if(M){if(!M.__authMethod){const N=document.createElement("input");N.name="__authMethod",M.appendChild(N)}M.__authMethod.type="hidden",M.__authMethod.value=T,M.requestSubmit()}};return j.createElement(qe,null,j.createElement(c,null),j.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-signup":"",method:"post",onChange:o,onSubmit:u,onBlur:a},j.createElement(v7,null),j.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:e},j.createElement(Fe,{direction:"column"},j.createElement(f,{includePassword:!C}),j.createElement(Vr,null)),j.createElement(en,{isDisabled:(!m||S.length==0)&&t||e,isFullWidth:!0,type:"submit",variation:"primary",isLoading:e,loadingText:pfe(),onClick:x(y)},w(y)),m&&S.length>0&&j.createElement(j.Fragment,null,j.createElement(Fe,{justifyContent:"center",padding:"medium 0"},yfe()),S.map(T=>j.createElement(en,{key:T,isDisabled:e,isFullWidth:!0,type:"button",variation:"primary",onClick:x(T)},w(T)))),j.createElement(h,null))))}Qs.Header=function(){return null};Qs.FormFields=function(){return j.createElement(Po,null)};Qs.Footer=function(){return null};const{getSignInTabText:bfe,getSignUpTabText:Sfe}=Ln,Efe=({className:t,hideSignUp:e,variation:n})=>{const{route:r,toSignIn:s,toSignUp:o}=St(a=>[a.route,a.toSignIn,a.toSignUp]);return j.createElement(qr,{className:t,variation:n},e?j.createElement(qe,{"data-amplify-router-content":""},r==="signIn"&&j.createElement(Ei,null)):j.createElement(Cl.Container,{value:r,isLazy:!0,onValueChange:a=>{a!==r&&(a==="signIn"?s():o())}},j.createElement(Cl.List,{spacing:"equal",indicatorPosition:"top"},j.createElement(Cl.Item,{value:"signIn"},bfe()),j.createElement(Cl.Item,{value:"signUp"},Sfe())),j.createElement(Cl.Panel,{value:"signIn","data-amplify-router-content":""},j.createElement(Ei,null)),j.createElement(Cl.Panel,{value:"signUp","data-amplify-router-content":""},j.createElement(Qs,null))))},{getAccountRecoveryInfoText:Cfe,getSkipText:wfe}=Ln,Gl=({className:t,variation:e})=>{const{isPending:n}=St(u=>[u.isPending]),{handleChange:r,handleSubmit:s}=ds(),{components:{ConfirmVerifyUser:{Header:o=Gl.Header,Footer:a=Gl.Footer}}}=cs();return j.createElement(qr,{className:t,variation:e},j.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-confirmverifyuser":"",method:"post",onChange:r,onSubmit:s},j.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:n},j.createElement(o,null),j.createElement(Fe,{direction:"column"},j.createElement(Po,null)),j.createElement(Vr,null),j.createElement(mb,{cancelButtonText:wfe(),cancelButtonSendType:"SKIP"}),j.createElement(a,null))))};Gl.Header=function(){return j.createElement(Ar,{level:3},Cfe())};Gl.Footer=function(){return null};const{getSkipText:xfe,getVerifyText:_fe,getVerifyContactText:Afe,getAccountRecoveryInfoText:Tfe}=Ln,Rfe=t=>Object.entries(t).map(([e,n],r)=>{const s=nb[e].label;return j.createElement(tR,{name:"unverifiedAttr",value:e,key:e,defaultChecked:r===0},ye(s),":"," ",jse(s,n))}),Kl=({className:t,variation:e})=>{const{components:{VerifyUser:{Header:n=Kl.Header,Footer:r=Kl.Footer}}}=cs(),{isPending:s,unverifiedUserAttributes:o}=St(({isPending:h,unverifiedUserAttributes:g})=>[h,g]),{handleChange:a,handleSubmit:u}=ds(),c=s?j.createElement(j.Fragment,null,"Verifying…"):j.createElement(j.Fragment,null,_fe()),f=j.createElement(nR,{legend:Afe(),name:"verify_context",isDisabled:s,legendHidden:!0},Rfe(o));return j.createElement(qr,{className:t,variation:e},j.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-verifyuser":"",method:"post",onChange:a,onSubmit:u},j.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:s},j.createElement(n,null),f,j.createElement(Vr,null),j.createElement(mb,{cancelButtonText:xfe(),cancelButtonSendType:"SKIP",submitButtonText:c}),j.createElement(r,null))))};Kl.Header=function(){return j.createElement(Ar,{level:3},Tfe())};Kl.Footer=function(){return null};const{getChallengeText:Ife,getDeliveryMessageText:Ofe,getDeliveryMethodText:Nfe}=Ln,Yl=({className:t,variation:e})=>{const{isPending:n,challengeName:r,codeDeliveryDetails:s}=St(h=>[h.isPending,h.challengeName,h.codeDeliveryDetails]),{handleChange:o,handleSubmit:a}=ds(),{components:{ConfirmSignIn:{Header:u=Yl.Header,Footer:c=Yl.Footer}}}=cs(),f=lR(r)&&s;return j.createElement(qr,{className:t,variation:e},j.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-confirmsignin":"",method:"post",onChange:o,onSubmit:a},j.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:n},j.createElement(u,null),j.createElement(Fe,{direction:"column"},f&&j.createElement(Ts,{className:"amplify-authenticator__subtitle"},Ofe(s)),j.createElement(Po,null),j.createElement(Vr,null)),j.createElement(gb,null),j.createElement(c,null))))};function Mfe(){const{challengeName:t,codeDeliveryDetails:e}=St(({challengeName:r,codeDeliveryDetails:s})=>[r,s]),n=lR(t)&&e;return j.createElement(j.Fragment,null,j.createElement(Ar,{level:3},Ife(t)),n&&j.createElement(Ar,{level:5},Nfe(e)))}Yl.Header=Mfe;Yl.Footer=function(){return null};const{getResendCodeText:Pfe,getResetYourPasswordText:kfe}=Ln,Zl=({className:t,variation:e})=>{const{isPending:n}=St(c=>[c.isPending]),{handleBlur:r,handleChange:s,handleSubmit:o}=ds(),{components:{ConfirmResetPassword:{Header:a=Zl.Header,Footer:u=Zl.Footer}}}=cs();return j.createElement(qr,{className:t,variation:e},j.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-confirmresetpassword":"",method:"post",onSubmit:o,onChange:s,onBlur:r},j.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:n},j.createElement(a,null),j.createElement(Fe,{direction:"column"},j.createElement(Po,null)),j.createElement(Vr,null),j.createElement(mb,{cancelButtonSendType:"RESEND",cancelButtonText:Pfe()}),j.createElement(u,null))))};Zl.Header=function(){const e=kfe();return j.createElement(Ar,{level:3},e)};Zl.Footer=function(){return null};const{getBackToSignInText:Dfe,getSendingText:Lfe,getSendCodeText:Ufe,getResetYourPasswordText:Ffe}=Ln,ja=({className:t,variation:e})=>{const{isPending:n}=St(u=>[u.isPending]),{handleChange:r,handleSubmit:s}=ds(),{components:{ForgotPassword:{Header:o=ja.Header,Footer:a=ja.Footer}}}=cs();return j.createElement(qr,{className:t,variation:e},j.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-forgotpassword":"",method:"post",onChange:r,onSubmit:s},j.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:n},j.createElement(o,null),j.createElement(Fe,{direction:"column"},j.createElement(Po,null)),j.createElement(Vr,null),j.createElement(mb,{cancelButtonText:Dfe(),cancelButtonSendType:"SIGN_IN",submitButtonText:n?j.createElement(j.Fragment,null,Lfe(),"…"):j.createElement(j.Fragment,null,Ufe())}),j.createElement(a,null))))};ja.Header=function(){return j.createElement(Ar,{level:3},Ffe())};ja.Footer=function(){return null};const{getMfaTypeLabelByValue:zfe,getSelectMfaTypeByChallengeName:jfe,getSelectMfaTypeText:Bfe}=Ln,Ba=({className:t,variation:e})=>{const{isPending:n,allowedMfaTypes:r=[]}=St(c=>[c.isPending,c.allowedMfaTypes]),{handleChange:s,handleSubmit:o}=ds(),{components:{SelectMfaType:{Header:a=Ba.Header,Footer:u=Ba.Footer}}}=cs();return A.createElement(qr,{className:t,variation:e},A.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-select-mfa-type":"",method:"post",onChange:s,onSubmit:o},A.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:n},A.createElement(a,null),A.createElement(Fe,{direction:"column"},A.createElement(nR,{name:"mfa_type",legend:Bfe(),legendHidden:!0,isDisabled:n,isRequired:!0},r.map((c,f)=>A.createElement(tR,{name:"mfa_type",key:c,value:c,defaultChecked:f===0},zfe(c)))),A.createElement(Vr,null)),A.createElement(gb,null),A.createElement(u,null))))};Ba.Header=function(){const{challengeName:e}=St(n=>[n.challengeName]);return A.createElement(Ar,{level:3},jfe(e))};Ba.Footer=function(){return null};const{getSetupEmailText:Hfe}=Ln,Ha=({className:t,variation:e})=>{const{isPending:n}=St(u=>[u.isPending]),{handleChange:r,handleSubmit:s}=ds(),{components:{SetupEmail:{Header:o=Ha.Header,Footer:a=Ha.Footer}}}=cs();return A.createElement(qr,{className:t,variation:e},A.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-setup-email":"",method:"post",onChange:r,onSubmit:s},A.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:n},A.createElement(o,null),A.createElement(Fe,{direction:"column"},A.createElement(Po,null),A.createElement(Vr,null)),A.createElement(gb,null),A.createElement(a,null))))};Ha.Header=function(){return A.createElement(Ar,{level:3},Hfe())};Ha.Footer=function(){return null};const{getSignInWithPasswordText:E_,getSignInWithEmailText:$fe,getSignInWithSmsText:qfe,getSignInWithPasskeyText:Wfe,getSigningInText:Vfe,getBackToSignInText:Gfe,getOrText:Kfe,getUsernameLabelByLoginMechanism:Yfe}=Ln,Zfe=t=>{switch(t){case"EMAIL_OTP":return $fe();case"SMS_OTP":return qfe();case"WEB_AUTHN":return Wfe();case"PASSWORD":return E_();default:return E_()}},Xfe=({className:t,variation:e})=>{const{isPending:n,username:r,availableAuthMethods:s,toSignIn:o,selectAuthMethod:a,loginMechanism:u}=St(E=>[E.isPending,E.username,E.availableAuthMethods,E.toSignIn,E.selectAuthMethod,E.loginMechanism]),{handleChange:c,handleSubmit:f}=ds(),h=s??[],g=h.includes("PASSWORD"),m=h.filter(E=>E!=="PASSWORD"),y=E=>{a({method:E})},S=Yfe(u);return j.createElement(qr,{className:t,variation:e},j.createElement("form",{"data-amplify-form":!0,"data-amplify-authenticator-signinselect":!0,method:"post",onSubmit:f,onChange:c},j.createElement(Fe,{direction:"column"},j.createElement(fp,{label:S,name:"username",value:r,isReadOnly:!0,isDisabled:!0}),g&&j.createElement(j.Fragment,null,j.createElement(eR,{label:"Password",name:"password",autoComplete:"current-password",isDisabled:n}),j.createElement(en,{isDisabled:n,type:"submit",variation:"primary",isFullWidth:!0,isLoading:n,loadingText:Vfe()},E_())),g&&m.length>0&&j.createElement(JT,{label:Kfe()}),m.length>0&&j.createElement(Fe,{direction:"column",gap:"0.5rem"},m.map(E=>j.createElement(en,{key:E,variation:"primary",isFullWidth:!0,isDisabled:n,onClick:()=>y(E)},Zfe(E)))),j.createElement(Vr,null),j.createElement(en,{onClick:o,size:"small",variation:"link",isDisabled:n},Gfe()))))},Qfe=t=>{const{className:e,...n}=t;return A.createElement(qe,{as:"span",width:"1em",height:"1em",className:Be(le.Icon,e),...n},A.createElement("svg",{width:"54",height:"54",viewBox:"0 0 54 54",fill:"none",xmlns:"http://www.w3.org/2000/svg"},A.createElement("path",{d:"M22.9333 38.9333L41.7333 20.1333L38 16.4L22.9333 31.4667L15.3333 23.8667L11.6 27.6L22.9333 38.9333ZM26.6667 53.3333C22.9778 53.3333 19.5111 52.6333 16.2667 51.2333C13.0222 49.8333 10.2 47.9333 7.8 45.5333C5.4 43.1333 3.5 40.3111 2.1 37.0667C0.7 33.8222 0 30.3556 0 26.6667C0 22.9778 0.7 19.5111 2.1 16.2667C3.5 13.0222 5.4 10.2 7.8 7.8C10.2 5.4 13.0222 3.5 16.2667 2.1C19.5111 0.7 22.9778 0 26.6667 0C30.3556 0 33.8222 0.7 37.0667 2.1C40.3111 3.5 43.1333 5.4 45.5333 7.8C47.9333 10.2 49.8333 13.0222 51.2333 16.2667C52.6333 19.5111 53.3333 22.9778 53.3333 26.6667C53.3333 30.3556 52.6333 33.8222 51.2333 37.0667C49.8333 40.3111 47.9333 43.1333 45.5333 45.5333C43.1333 47.9333 40.3111 49.8333 37.0667 51.2333C33.8222 52.6333 30.3556 53.3333 26.6667 53.3333Z",fill:"currentColor"})))},Jfe=t=>{const{className:e,...n}=t;return A.createElement(qe,{as:"span",width:"1em",height:"1em",className:Be(le.Icon,e),...n},A.createElement("svg",{width:"195",height:"128",viewBox:"0 0 195 128",fill:"none",xmlns:"http://www.w3.org/2000/svg"},A.createElement("circle",{cx:"60",cy:"36",r:"31",stroke:"#00404D",strokeWidth:"2"}),A.createElement("path",{d:"M60 69C84.4313 69 105.396 83.8504 114.357 105.021C116.774 110.729 115.382 116.168 111.798 120.23C108.191 124.319 102.358 127 96 127H24C17.6416 127 11.8094 124.319 8.20215 120.23C4.61836 116.168 3.22626 110.729 5.64258 105.021C14.6036 83.8504 35.5687 69 60 69Z",stroke:"#00404D",strokeWidth:"2"}),A.createElement("circle",{cx:"122",cy:"26",r:"25",fill:"#E9F9FC",stroke:"#00404D",strokeWidth:"2"}),A.createElement("mask",{id:"path-4-inside-1_4178_10171",fill:"white"},A.createElement("path",{d:"M121.951 13.927C124.887 13.927 127.658 14.5348 130.262 15.7503C132.866 16.9658 135.04 18.7222 136.786 21.0197C136.98 21.2601 137.042 21.4738 136.973 21.6608C136.903 21.8478 136.786 22.0081 136.619 22.1417C136.453 22.2753 136.259 22.3354 136.038 22.322C135.816 22.3086 135.622 22.1951 135.456 21.9814C133.932 19.8977 131.972 18.3015 129.576 17.1928C127.18 16.0842 124.638 15.5299 121.951 15.5299C119.264 15.5299 116.743 16.0842 114.388 17.1928C112.034 18.3015 110.081 19.8977 108.529 21.9814C108.363 22.2218 108.169 22.3554 107.947 22.3821C107.726 22.4088 107.532 22.3554 107.366 22.2218C107.172 22.0883 107.054 21.9213 107.012 21.7209C106.971 21.5206 107.033 21.3135 107.199 21.0998C108.917 18.8291 111.071 17.066 113.661 15.8104C116.251 14.5548 119.015 13.927 121.951 13.927ZM121.951 17.6937C125.691 17.6937 128.904 18.8959 131.591 21.3002C134.279 23.7045 135.622 26.6831 135.622 30.2361C135.622 31.5719 135.13 32.6872 134.147 33.5821C133.164 34.477 131.965 34.9245 130.553 34.9245C129.14 34.9245 127.928 34.477 126.917 33.5821C125.906 32.6872 125.4 31.5719 125.4 30.2361C125.4 29.3546 125.061 28.6132 124.382 28.0122C123.703 27.4111 122.893 27.1106 121.951 27.1106C121.009 27.1106 120.199 27.4111 119.52 28.0122C118.841 28.6132 118.502 29.3546 118.502 30.2361C118.502 32.8274 119.299 34.9913 120.891 36.7277C122.484 38.4642 124.541 39.6797 127.062 40.3742C127.311 40.4544 127.478 40.588 127.561 40.775C127.644 40.962 127.658 41.1623 127.602 41.376C127.547 41.563 127.436 41.7233 127.27 41.8569C127.104 41.9905 126.896 42.0305 126.647 41.9771C123.766 41.2825 121.411 39.9001 119.582 37.8297C117.754 35.7593 116.84 33.2281 116.84 30.2361C116.84 28.9004 117.339 27.7784 118.336 26.8701C119.333 25.9618 120.538 25.5077 121.951 25.5077C123.364 25.5077 124.569 25.9618 125.566 26.8701C126.563 27.7784 127.062 28.9004 127.062 30.2361C127.062 31.1177 127.408 31.859 128.101 32.4601C128.794 33.0612 129.611 33.3617 130.553 33.3617C131.495 33.3617 132.298 33.0612 132.963 32.4601C133.628 31.859 133.96 31.1177 133.96 30.2361C133.96 27.1373 132.783 24.5326 130.428 22.4222C128.073 20.3117 125.261 19.2565 121.993 19.2565C118.724 19.2565 115.912 20.3117 113.557 22.4222C111.202 24.5326 110.025 27.1239 110.025 30.1961C110.025 30.8372 110.087 31.6386 110.212 32.6004C110.337 33.5621 110.635 34.6841 111.106 35.9664C111.189 36.2068 111.182 36.4205 111.085 36.6075C110.988 36.7945 110.828 36.9281 110.607 37.0082C110.385 37.0884 110.171 37.0817 109.963 36.9882C109.755 36.8947 109.61 36.7411 109.526 36.5274C109.111 35.4855 108.813 34.4503 108.633 33.4218C108.453 32.3933 108.363 31.3314 108.363 30.2361C108.363 26.6831 109.7 23.7045 112.373 21.3002C115.046 18.8959 118.239 17.6937 121.951 17.6937ZM121.951 10C123.724 10 125.455 10.207 127.145 10.6211C128.835 11.0352 130.47 11.6296 132.049 12.4043C132.298 12.5379 132.443 12.6982 132.485 12.8852C132.526 13.0722 132.506 13.2592 132.423 13.4462C132.339 13.6332 132.201 13.7801 132.007 13.8869C131.813 13.9938 131.578 13.9804 131.301 13.8469C129.832 13.1256 128.316 12.5713 126.75 12.1839C125.185 11.7965 123.585 11.6029 121.951 11.6029C120.344 11.6029 118.765 11.7832 117.214 12.1438C115.663 12.5045 114.18 13.0722 112.768 13.8469C112.546 13.9804 112.324 14.0138 112.103 13.947C111.881 13.8803 111.715 13.74 111.604 13.5263C111.493 13.3126 111.466 13.1189 111.521 12.9453C111.576 12.7716 111.715 12.618 111.937 12.4844C113.488 11.683 115.109 11.0686 116.798 10.6411C118.488 10.2137 120.206 10 121.951 10ZM121.951 21.5807C124.527 21.5807 126.744 22.4155 128.6 24.0852C130.456 25.7548 131.384 27.8051 131.384 30.2361C131.384 30.4766 131.308 30.6702 131.155 30.8172C131.003 30.9641 130.802 31.0376 130.553 31.0376C130.331 31.0376 130.137 30.9641 129.971 30.8172C129.805 30.6702 129.722 30.4766 129.722 30.2361C129.722 28.2326 128.953 26.5562 127.415 25.2072C125.878 23.8581 124.056 23.1835 121.951 23.1835C119.846 23.1835 118.038 23.8581 116.528 25.2072C115.018 26.5562 114.264 28.2326 114.264 30.2361C114.264 32.4 114.651 34.2366 115.427 35.746C116.203 37.2553 117.339 38.7714 118.834 40.2941C119.001 40.4544 119.084 40.6414 119.084 40.8551C119.084 41.0688 119.001 41.2558 118.834 41.4161C118.668 41.5764 118.474 41.6565 118.253 41.6565C118.031 41.6565 117.837 41.5764 117.671 41.4161C116.037 39.7598 114.783 38.0701 113.91 36.347C113.038 34.624 112.601 32.587 112.601 30.2361C112.601 27.8051 113.516 25.7548 115.344 24.0852C117.172 22.4155 119.375 21.5807 121.951 21.5807ZM121.909 29.4347C122.159 29.4347 122.36 29.5148 122.512 29.6751C122.664 29.8354 122.741 30.0224 122.741 30.2361C122.741 32.2397 123.488 33.8826 124.984 35.1649C126.48 36.4472 128.226 37.0884 130.22 37.0884C130.386 37.0884 130.622 37.075 130.927 37.0483C131.231 37.0216 131.55 36.9815 131.882 36.9281C132.132 36.8747 132.346 36.9081 132.526 37.0283C132.706 37.1485 132.824 37.3288 132.88 37.5692C132.935 37.7829 132.893 37.9699 132.755 38.1302C132.616 38.2905 132.436 38.3974 132.215 38.4508C131.716 38.5844 131.28 38.6578 130.906 38.6712C130.532 38.6846 130.303 38.6912 130.22 38.6912C127.755 38.6912 125.615 37.8898 123.8 36.2869C121.986 34.6841 121.078 32.6671 121.078 30.2361C121.078 30.0224 121.155 29.8354 121.307 29.6751C121.459 29.5148 121.66 29.4347 121.909 29.4347Z"})),A.createElement("path",{d:"M121.951 13.927C124.887 13.927 127.658 14.5348 130.262 15.7503C132.866 16.9658 135.04 18.7222 136.786 21.0197C136.98 21.2601 137.042 21.4738 136.973 21.6608C136.903 21.8478 136.786 22.0081 136.619 22.1417C136.453 22.2753 136.259 22.3354 136.038 22.322C135.816 22.3086 135.622 22.1951 135.456 21.9814C133.932 19.8977 131.972 18.3015 129.576 17.1928C127.18 16.0842 124.638 15.5299 121.951 15.5299C119.264 15.5299 116.743 16.0842 114.388 17.1928C112.034 18.3015 110.081 19.8977 108.529 21.9814C108.363 22.2218 108.169 22.3554 107.947 22.3821C107.726 22.4088 107.532 22.3554 107.366 22.2218C107.172 22.0883 107.054 21.9213 107.012 21.7209C106.971 21.5206 107.033 21.3135 107.199 21.0998C108.917 18.8291 111.071 17.066 113.661 15.8104C116.251 14.5548 119.015 13.927 121.951 13.927ZM121.951 17.6937C125.691 17.6937 128.904 18.8959 131.591 21.3002C134.279 23.7045 135.622 26.6831 135.622 30.2361C135.622 31.5719 135.13 32.6872 134.147 33.5821C133.164 34.477 131.965 34.9245 130.553 34.9245C129.14 34.9245 127.928 34.477 126.917 33.5821C125.906 32.6872 125.4 31.5719 125.4 30.2361C125.4 29.3546 125.061 28.6132 124.382 28.0122C123.703 27.4111 122.893 27.1106 121.951 27.1106C121.009 27.1106 120.199 27.4111 119.52 28.0122C118.841 28.6132 118.502 29.3546 118.502 30.2361C118.502 32.8274 119.299 34.9913 120.891 36.7277C122.484 38.4642 124.541 39.6797 127.062 40.3742C127.311 40.4544 127.478 40.588 127.561 40.775C127.644 40.962 127.658 41.1623 127.602 41.376C127.547 41.563 127.436 41.7233 127.27 41.8569C127.104 41.9905 126.896 42.0305 126.647 41.9771C123.766 41.2825 121.411 39.9001 119.582 37.8297C117.754 35.7593 116.84 33.2281 116.84 30.2361C116.84 28.9004 117.339 27.7784 118.336 26.8701C119.333 25.9618 120.538 25.5077 121.951 25.5077C123.364 25.5077 124.569 25.9618 125.566 26.8701C126.563 27.7784 127.062 28.9004 127.062 30.2361C127.062 31.1177 127.408 31.859 128.101 32.4601C128.794 33.0612 129.611 33.3617 130.553 33.3617C131.495 33.3617 132.298 33.0612 132.963 32.4601C133.628 31.859 133.96 31.1177 133.96 30.2361C133.96 27.1373 132.783 24.5326 130.428 22.4222C128.073 20.3117 125.261 19.2565 121.993 19.2565C118.724 19.2565 115.912 20.3117 113.557 22.4222C111.202 24.5326 110.025 27.1239 110.025 30.1961C110.025 30.8372 110.087 31.6386 110.212 32.6004C110.337 33.5621 110.635 34.6841 111.106 35.9664C111.189 36.2068 111.182 36.4205 111.085 36.6075C110.988 36.7945 110.828 36.9281 110.607 37.0082C110.385 37.0884 110.171 37.0817 109.963 36.9882C109.755 36.8947 109.61 36.7411 109.526 36.5274C109.111 35.4855 108.813 34.4503 108.633 33.4218C108.453 32.3933 108.363 31.3314 108.363 30.2361C108.363 26.6831 109.7 23.7045 112.373 21.3002C115.046 18.8959 118.239 17.6937 121.951 17.6937ZM121.951 10C123.724 10 125.455 10.207 127.145 10.6211C128.835 11.0352 130.47 11.6296 132.049 12.4043C132.298 12.5379 132.443 12.6982 132.485 12.8852C132.526 13.0722 132.506 13.2592 132.423 13.4462C132.339 13.6332 132.201 13.7801 132.007 13.8869C131.813 13.9938 131.578 13.9804 131.301 13.8469C129.832 13.1256 128.316 12.5713 126.75 12.1839C125.185 11.7965 123.585 11.6029 121.951 11.6029C120.344 11.6029 118.765 11.7832 117.214 12.1438C115.663 12.5045 114.18 13.0722 112.768 13.8469C112.546 13.9804 112.324 14.0138 112.103 13.947C111.881 13.8803 111.715 13.74 111.604 13.5263C111.493 13.3126 111.466 13.1189 111.521 12.9453C111.576 12.7716 111.715 12.618 111.937 12.4844C113.488 11.683 115.109 11.0686 116.798 10.6411C118.488 10.2137 120.206 10 121.951 10ZM121.951 21.5807C124.527 21.5807 126.744 22.4155 128.6 24.0852C130.456 25.7548 131.384 27.8051 131.384 30.2361C131.384 30.4766 131.308 30.6702 131.155 30.8172C131.003 30.9641 130.802 31.0376 130.553 31.0376C130.331 31.0376 130.137 30.9641 129.971 30.8172C129.805 30.6702 129.722 30.4766 129.722 30.2361C129.722 28.2326 128.953 26.5562 127.415 25.2072C125.878 23.8581 124.056 23.1835 121.951 23.1835C119.846 23.1835 118.038 23.8581 116.528 25.2072C115.018 26.5562 114.264 28.2326 114.264 30.2361C114.264 32.4 114.651 34.2366 115.427 35.746C116.203 37.2553 117.339 38.7714 118.834 40.2941C119.001 40.4544 119.084 40.6414 119.084 40.8551C119.084 41.0688 119.001 41.2558 118.834 41.4161C118.668 41.5764 118.474 41.6565 118.253 41.6565C118.031 41.6565 117.837 41.5764 117.671 41.4161C116.037 39.7598 114.783 38.0701 113.91 36.347C113.038 34.624 112.601 32.587 112.601 30.2361C112.601 27.8051 113.516 25.7548 115.344 24.0852C117.172 22.4155 119.375 21.5807 121.951 21.5807ZM121.909 29.4347C122.159 29.4347 122.36 29.5148 122.512 29.6751C122.664 29.8354 122.741 30.0224 122.741 30.2361C122.741 32.2397 123.488 33.8826 124.984 35.1649C126.48 36.4472 128.226 37.0884 130.22 37.0884C130.386 37.0884 130.622 37.075 130.927 37.0483C131.231 37.0216 131.55 36.9815 131.882 36.9281C132.132 36.8747 132.346 36.9081 132.526 37.0283C132.706 37.1485 132.824 37.3288 132.88 37.5692C132.935 37.7829 132.893 37.9699 132.755 38.1302C132.616 38.2905 132.436 38.3974 132.215 38.4508C131.716 38.5844 131.28 38.6578 130.906 38.6712C130.532 38.6846 130.303 38.6912 130.22 38.6912C127.755 38.6912 125.615 37.8898 123.8 36.2869C121.986 34.6841 121.078 32.6671 121.078 30.2361C121.078 30.0224 121.155 29.8354 121.307 29.6751C121.459 29.5148 121.66 29.4347 121.909 29.4347Z",fill:"#00404D",stroke:"#00404D",strokeWidth:"4",mask:"url(#path-4-inside-1_4178_10171)"}),A.createElement("circle",{cx:"167.5",cy:"49.5",r:"19.5",fill:"#E9F9FC",stroke:"#00404D",strokeWidth:"2"}),A.createElement("path",{d:"M167.89 43.65L161.26 54.18H167.89",stroke:"#00404D",strokeWidth:"2"}),A.createElement("path",{d:"M167.5 60.42C173.316 60.42 178.03 55.7056 178.03 49.89V48.72",stroke:"#00404D",strokeWidth:"2"}),A.createElement("circle",{cx:"173.74",cy:"43.26",r:"1",fill:"#00404D",stroke:"#00404D",strokeWidth:"1.12"}),A.createElement("circle",{cx:"160.48",cy:"43.26",r:"1",fill:"#00404D",stroke:"#00404D",strokeWidth:"1.12"}),A.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M104 112C116.129 112 126.457 104.288 130.347 93.5H147.5L155.5 101.5L168 89L180.5 101.5L193 89L180.5 76.5H130.984C127.705 64.6779 116.866 56 104 56C88.536 56 76 68.536 76 84C76 99.464 88.536 112 104 112ZM104 98C111.732 98 118 91.732 118 84C118 76.268 111.732 70 104 70C96.268 70 90 76.268 90 84C90 91.732 96.268 98 104 98Z",fill:"#BCECF5"}),A.createElement("path",{d:"M130.347 93.5V92.5H129.645L129.407 93.1608L130.347 93.5ZM147.5 93.5L148.207 92.7929L147.914 92.5H147.5V93.5ZM155.5 101.5L154.793 102.207L155.5 102.914L156.207 102.207L155.5 101.5ZM168 89L168.707 88.2929L168 87.5858L167.293 88.2929L168 89ZM180.5 101.5L179.793 102.207L180.5 102.914L181.207 102.207L180.5 101.5ZM193 89L193.707 89.7071L194.414 89L193.707 88.2929L193 89ZM180.5 76.5L181.207 75.7929L180.914 75.5H180.5V76.5ZM130.984 76.5L130.021 76.7673L130.224 77.5H130.984V76.5ZM129.407 93.1608C125.655 103.565 115.694 111 104 111V113C116.564 113 127.259 105.011 131.288 93.8392L129.407 93.1608ZM147.5 92.5H130.347V94.5H147.5V92.5ZM156.207 100.793L148.207 92.7929L146.793 94.2071L154.793 102.207L156.207 100.793ZM167.293 88.2929L154.793 100.793L156.207 102.207L168.707 89.7071L167.293 88.2929ZM181.207 100.793L168.707 88.2929L167.293 89.7071L179.793 102.207L181.207 100.793ZM192.293 88.2929L179.793 100.793L181.207 102.207L193.707 89.7071L192.293 88.2929ZM179.793 77.2071L192.293 89.7071L193.707 88.2929L181.207 75.7929L179.793 77.2071ZM130.984 77.5H180.5V75.5H130.984V77.5ZM104 57C116.405 57 126.859 65.3669 130.021 76.7673L131.948 76.2327C128.552 63.9889 117.327 55 104 55V57ZM77 84C77 69.0883 89.0883 57 104 57V55C87.9837 55 75 67.9837 75 84H77ZM104 111C89.0883 111 77 98.9117 77 84H75C75 100.016 87.9837 113 104 113V111ZM117 84C117 91.1797 111.18 97 104 97V99C112.284 99 119 92.2843 119 84H117ZM104 71C111.18 71 117 76.8203 117 84H119C119 75.7157 112.284 69 104 69V71ZM91 84C91 76.8203 96.8203 71 104 71V69C95.7157 69 89 75.7157 89 84H91ZM104 97C96.8203 97 91 91.1797 91 84H89C89 92.2843 95.7157 99 104 99V97Z",fill:"#00404D"}),A.createElement("path",{d:"M138.5 57V66",stroke:"#00404D",strokeWidth:"2"}),A.createElement("path",{d:"M139 104V124",stroke:"#00404D",strokeWidth:"2"}),A.createElement("path",{d:"M134 61.5L143 61.5",stroke:"#00404D",strokeWidth:"2"}),A.createElement("path",{d:"M129 114L149 114",stroke:"#00404D",strokeWidth:"2"})))},{getPasskeyPromptHeadingText:ehe,getPasskeyPromptDescriptionText:the,getCreatePasskeyText:nhe,getRegisteringText:rhe,getContinueWithoutPasskeyText:she,getPasskeyCreatedSuccessText:ohe,getPasskeyRegisteredText:ihe,getPasskeyRegistrationFailedText:ahe,getPasskeyLabelText:lhe,getExistingPasskeysText:uhe,getSetupAnotherPasskeyText:che,getContinueText:dhe}=Ln;function fhe({className:t,variation:e}){const[n,r]=j.useState(!1),[s,o]=j.useState(null),[a,u]=j.useState(!1),[c,f]=j.useState([]),{submitForm:h,isPending:g}=St(w=>[w.submitForm,w.isPending]),m=j.useCallback(async()=>{try{const w=await MT();f(w.credentials||[])}catch{}},[]);j.useEffect(()=>{n&&m()},[n,m]);const y=j.useCallback(()=>{h({type:"SKIP"})},[h]),S=j.useCallback(()=>{h({type:"SUBMIT"})},[h]),E=j.useCallback(async()=>{try{o(null),u(!0),await ase(),r(!0)}catch(w){const x=w,T=x.name??"",R=x.message??"";if(T==="PasskeyRegistrationCanceled"||T==="NotAllowedError"||R.includes("canceled")||R.includes("cancelled")||R.includes("ceremony has been canceled")||R.includes("not allowed")){y();return}o(ahe())}finally{u(!1)}},[y]);if(n)return j.createElement(qr,{className:t,variation:e},j.createElement(Fe,{direction:"column",padding:"large","data-amplify-authenticator-passkeyprompt":""},j.createElement(Fe,{direction:"column",gap:"xs"},j.createElement(Qfe,{className:"amplify-authenticator__passkey-success-icon"}),j.createElement(Ar,{level:4},ohe()),j.createElement(Ts,null,ihe())),c.length>0&&j.createElement(qe,{marginTop:"large"},j.createElement(Ar,{level:5},uhe()),j.createElement(Fe,{direction:"column",gap:"xs",marginTop:"xs"},c.map((w,x)=>j.createElement(qe,{key:w.credentialId,className:"amplify-authenticator__passkey-credential-item"},j.createElement(Ts,{fontSize:"small"},w.friendlyCredentialName??`${lhe()} ${x+1}`))))),j.createElement(Fe,{direction:"column",gap:"medium",marginTop:"large"},j.createElement(en,{onClick:()=>{r(!1),E()},variation:"link"},che()),j.createElement(en,{onClick:()=>S(),variation:"primary",isFullWidth:!0},dhe()))));const C=g||a;return j.createElement(qr,{className:t,variation:e},j.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-passkeyprompt":""},j.createElement(Fe,{direction:"column",gap:"medium"},j.createElement(Ar,{level:4},ehe()),j.createElement(Ts,null,the()),j.createElement(Fe,{justifyContent:"center"},j.createElement(Jfe,{className:"amplify-authenticator__passkey-icon"})),j.createElement(Fe,{direction:"column",gap:"medium"},j.createElement(en,{onClick:()=>{E()},variation:"primary",isDisabled:C,isLoading:a,loadingText:rhe()},nhe()),j.createElement(en,{onClick:y,variation:"link",isDisabled:C},she()),s&&j.createElement(Ts,{className:"amplify-authenticator__passkey-error"},s),j.createElement(Vr,null)))))}function eU(){return null}const hhe=t=>{switch(t){case"authenticated":case"idle":case"setup":case"transition":return eU;case"confirmSignUp":return Vl;case"confirmSignIn":return Yl;case"selectMfaType":return Ba;case"setupEmail":return Ha;case"setupTotp":return za;case"signIn":case"signUp":return Efe;case"signInSelectAuthFactor":return Xfe;case"passkeyPrompt":return fhe;case"forceNewPassword":return Xs;case"forgotPassword":return ja;case"confirmResetPassword":return Zl;case"verifyUser":return Kl;case"confirmVerifyUser":return Gl;default:return console.warn(`Unhandled Authenticator route - please open an issue: ${t}`),eU}};function phe({className:t,hideSignUp:e,variation:n}){const{route:r}=St(({route:o})=>[o]),s=A.useMemo(()=>hhe(r),[r]);return j.createElement(s,{className:t,hideSignUp:qde(r)?e:void 0,variation:n})}const ghe={Header:()=>null,SignIn:{Header:Ei.Header,Footer:Ei.Footer},SignUp:{Header:Qs.Header,FormFields:Qs.FormFields,Footer:Qs.Footer},ConfirmSignUp:{Header:Vl.Header,Footer:Vl.Footer},SelectMfaType:{Header:Ba.Header,Footer:Ba.Footer},SetupEmail:{Header:Ha.Header,Footer:Ha.Footer},SetupTotp:{Header:za.Header,Footer:za.Footer},ConfirmResetPassword:{Header:Zl.Header,Footer:Zl.Footer},ConfirmSignIn:{Header:Yl.Header,Footer:Yl.Footer},VerifyUser:{Header:Kl.Header,Footer:Kl.Footer},ConfirmVerifyUser:{Header:Gl.Header,Footer:Gl.Footer},ForceNewPassword:{Header:Xs.Header,Footer:Xs.Footer,FormFields:Xs.FormFields},ForgotPassword:{Header:ja.Header,Footer:ja.Footer},Footer:()=>null};function mhe({children:t,className:e,components:n,formFields:r,hideSignUp:s,initialState:o,loginMechanisms:a,passwordSettings:u,passwordless:c,signUpAttributes:f,services:h,socialProviders:g,variation:m}){cde({message:"The `passwordSettings` prop has been deprecated and will be removed in a future major version of Amplify UI.",shouldWarn:!1});const{route:y,signOut:S,user:E}=St(({route:x,signOut:T,user:R})=>[x,T,R]);Bue({initialState:o,loginMechanisms:a,passwordSettings:u,passwordless:c,services:h,signUpAttributes:f,socialProviders:g,formFields:r});const C=A.useMemo(()=>({components:{...ghe,...n}}),[n]);return y==="authenticated"||y==="signOut"?t?A.createElement(A.Fragment,null,bi(t)?t({signOut:S,user:E}):t):null:A.createElement(d7.Provider,{value:C},A.createElement(phe,{className:e,hideSignUp:s,variation:m}))}function ko(t){return $ue({componentName:"Authenticator",packageName:"react",version:ude}),A.createElement(GF,null,A.createElement(mhe,{...t}))}ko.Provider=GF;ko.ForgotPassword=ja;ko.SetupTotp=za;ko.SignIn=Ei;ko.SignUp=Qs;ko.ForceNewPassword=Xs;ko.SelectMfaType=Ba;ko.SetupEmail=Ha;const y7=({cssText:t,...e})=>t===void 0||/<\/style/i.test(t)?null:A.createElement("style",{...e,dangerouslySetInnerHTML:{__html:t}});y7.displayName="Style";const b7=({theme:t,...e})=>{if(!t)return null;const{name:n,cssText:r}=t;return A.createElement(y7,{...e,cssText:r,id:`amplify-theme-${n}`})};b7.displayName="ThemeStyle";function vhe({children:t,colorMode:e,direction:n="ltr",nonce:r,theme:s}){const o=A.useMemo(()=>({theme:lb(s),colorMode:e}),[s,e]);return A.createElement(KF.Provider,{value:o},A.createElement(jce,{dir:n},A.createElement("div",{"data-amplify-theme":o.theme.name,"data-amplify-color-mode":e,dir:n},t),s?A.createElement(b7,{theme:o.theme,nonce:r}):null))}const yhe=({configured:t,authStatus:e})=>e==="authenticated",bhe=t=>t?t.signInDetails?.loginId??t.username??null:null,She=({children:t,fallback:e=null})=>{const{authStatus:n,signOut:r,user:s}=St(o=>[o.authStatus,o.signOut,o.user]);return yhe({configured:!0,authStatus:n})?I.jsx(I.Fragment,{children:t({email:bhe(s),signOut:()=>r()})}):I.jsx(I.Fragment,{children:e})},Ehe=({children:t,fallback:e=null})=>Ly()?I.jsx(She,{fallback:e,children:t}):I.jsx(I.Fragment,{children:e}),tU='system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Ii=t=>`var(${t})`,cn=Ii("--accent"),Che=Ii("--accent-hover"),nU=Ii("--accent-soft"),Uf=Ii("--accent-fg"),rU=Ii("--surface"),lc=Ii("--fg"),whe=Ii("--surface-sunken"),am=Ii("--fg-muted"),Ff=Ii("--line"),xhe=lb({name:"remit",tokens:{colors:{brand:{primary:{10:{value:nU},20:{value:nU},40:{value:cn},60:{value:cn},80:{value:cn},90:{value:cn},100:{value:cn}}},background:{primary:{value:rU},secondary:{value:whe}},font:{primary:{value:lc},secondary:{value:am},tertiary:{value:am},interactive:{value:cn},inverse:{value:Uf},hover:{value:cn},focus:{value:cn},active:{value:cn}},border:{primary:{value:Ff},secondary:{value:Ff},focus:{value:cn}}},fonts:{default:{variable:{value:tU},static:{value:tU}}},radii:{small:{value:"3px"},medium:{value:"5px"},large:{value:"7px"}},components:{authenticator:{router:{borderColor:{value:Ff},borderWidth:{value:"1px"},boxShadow:{value:"0 10px 30px -10px rgb(15 23 42 / 0.18), 0 4px 12px -6px rgb(15 23 42 / 0.1)"},backgroundColor:{value:rU}},form:{padding:{value:"1.75rem"}},orContainer:{color:{value:am}}},button:{color:{value:lc},primary:{backgroundColor:{value:cn},color:{value:Uf},_hover:{backgroundColor:{value:Che},color:{value:Uf}},_focus:{backgroundColor:{value:cn},color:{value:Uf}},_active:{backgroundColor:{value:cn},color:{value:Uf}}},link:{color:{value:cn},_hover:{color:{value:cn},backgroundColor:{value:"transparent"}},_focus:{color:{value:cn},backgroundColor:{value:"transparent"}},_active:{color:{value:cn},backgroundColor:{value:"transparent"}}}},fieldcontrol:{color:{value:lc},borderColor:{value:Ff},_focus:{borderColor:{value:cn},boxShadow:{value:`0 0 0 2px ${cn}`}}},field:{label:{color:{value:lc}}},tabs:{borderColor:{value:Ff},item:{color:{value:am},backgroundColor:{value:"transparent"},_active:{color:{value:cn},borderColor:{value:cn},backgroundColor:{value:"transparent"}},_hover:{color:{value:cn}},_focus:{color:{value:cn}}}},heading:{color:{value:lc}},text:{color:{value:lc}}}}}),_he={signIn:{username:{placeholder:"Enter your username"},password:{placeholder:"Enter your password"}},signUp:{username:{placeholder:"Enter your username"},password:{placeholder:"Enter your password"},confirm_password:{placeholder:"Confirm your password"}}},Ahe=()=>I.jsx(n_,{tone:"warning",className:"fixed top-0 left-0 right-0 z-50 h-7 sm:h-10 overflow-hidden border-x-0 border-t-0",children:I.jsxs("span",{className:"flex items-center gap-2",children:[I.jsx("strong",{className:"font-semibold shrink-0",children:"Local dev"}),I.jsx("span",{className:"truncate hidden sm:inline",children:"— Cognito not configured. Set VITE_COGNITO_USER_POOL_ID and VITE_COGNITO_CLIENT_ID in .env.local to enable sign-in."}),I.jsx("span",{className:"truncate sm:hidden",children:"— no Cognito; signed out"})]})}),The=()=>I.jsx(C9,{note:B9({betterAuthEnabled:!1,cognitoConfigured:Ly()})}),Rhe=({children:t})=>{const{authStatus:e}=St(n=>[n.authStatus]);return e==="authenticated"?I.jsx(I.Fragment,{children:t}):e==="configuring"?I.jsx(dT,{}):I.jsx(vhe,{theme:xhe,children:I.jsxs(E9,{children:[I.jsx(w9,{}),I.jsx(ko,{hideSignUp:!1,formFields:_he,components:{Footer:The}})]})})},Ihe=({children:t})=>Ly()?I.jsx(ko.Provider,{children:I.jsx(Rhe,{children:t})}):I.jsxs("div",{className:"pt-7 sm:pt-10 [&_#main-content]:h-[calc(100dvh-1.75rem)] sm:[&_#main-content]:h-[calc(100dvh-2.5rem)]",children:[I.jsx(Ahe,{}),t]}),S7=60;let Uc=null;const E7=()=>Math.floor(Date.now()/1e3),Ohe=t=>t!==null&&t.expiresAt-S7>E7(),Nhe=async()=>{const e=(await Oy()).tokens?.idToken;return e?(Uc={value:e.toString(),expiresAt:e.payload.exp??E7()+S7},Uc.value):(Uc=null,null)},Mhe=async()=>Ly()?Ohe(Uc)?Uc.value:Nhe():null,Phe=()=>{Uc=null},Lv={configure:C8,getToken:Mhe,resetToken:Phe,Shell:Ihe,Account:Ehe},khe=({children:t})=>Uy()?I.jsx(Iv.Shell,{children:t}):I.jsx(Lv.Shell,{children:t}),Dhe=t=>Uy()?I.jsx(Iv.Account,{...t}):I.jsx(Lv.Account,{...t}),Lhe={configure:C8,getToken:()=>Uy()?Iv.getToken():Lv.getToken(),resetToken:()=>{Iv.resetToken(),Lv.resetToken()},Shell:khe,Account:Dhe};var bd=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Uhe=class extends bd{#e;#t;#n;constructor(){super(),this.#n=t=>{if(typeof window<"u"&&window.addEventListener){const e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#n=t,this.#t?.(),this.#t=t(e=>{typeof e=="boolean"?this.setFocused(e):this.onFocus()})}setFocused(t){this.#e!==t&&(this.#e=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(e=>{e(t)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},uR=new Uhe,Fhe={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},zhe=class{#e=Fhe;#t=!1;setTimeoutProvider(t){this.#e=t}setTimeout(t,e){return this.#e.setTimeout(t,e)}clearTimeout(t){this.#e.clearTimeout(t)}setInterval(t,e){return this.#e.setInterval(t,e)}clearInterval(t){this.#e.clearInterval(t)}},Al=new zhe;function jhe(t){setTimeout(t,0)}var Bhe=typeof window>"u"||"Deno"in globalThis;function Er(){}function Hhe(t,e){return typeof t=="function"?t(e):t}function C_(t){return typeof t=="number"&&t>=0&&t!==1/0}function C7(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Na(t,e){return typeof t=="function"?t(e):t}function is(t,e){return typeof t=="function"?t(e):t}function sU(t,e){const{type:n="all",exact:r,fetchStatus:s,predicate:o,queryKey:a,stale:u}=t;if(a){if(r){if(e.queryHash!==cR(a,e.options))return!1}else if(!Mh(e.queryKey,a))return!1}if(n!=="all"){const c=e.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof u=="boolean"&&e.isStale()!==u||s&&s!==e.state.fetchStatus||o&&!o(e))}function oU(t,e){const{exact:n,status:r,predicate:s,mutationKey:o}=t;if(o){if(!e.options.mutationKey)return!1;if(n){if(Xl(e.options.mutationKey)!==Xl(o))return!1}else if(!Mh(e.options.mutationKey,o))return!1}return!(r&&e.state.status!==r||s&&!s(e))}function cR(t,e){return(e?.queryKeyHashFn||Xl)(t)}function Xl(t){return JSON.stringify(t,(e,n)=>w_(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function Mh(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(n=>Mh(t[n],e[n])):!1}var $he=Object.prototype.hasOwnProperty;function w7(t,e,n=0){if(t===e)return t;if(n>500)return e;const r=iU(t)&&iU(e);if(!r&&!(w_(t)&&w_(e)))return e;const o=(r?t:Object.keys(t)).length,a=r?e:Object.keys(e),u=a.length,c=r?new Array(u):{};let f=0;for(let h=0;h<u;h++){const g=r?h:a[h],m=t[g],y=e[g];if(m===y){c[g]=m,(r?h<o:$he.call(t,g))&&f++;continue}if(m===null||y===null||typeof m!="object"||typeof y!="object"){c[g]=y;continue}const S=w7(m,y,n+1);c[g]=S,S===m&&f++}return o===u&&f===o?t:c}function Uv(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(t[n]!==e[n])return!1;return!0}function iU(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function w_(t){if(!aU(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!aU(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function aU(t){return Object.prototype.toString.call(t)==="[object Object]"}function qhe(t){return new Promise(e=>{Al.setTimeout(e,t)})}function x_(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?w7(t,e):e}function bRe(t){return t}function Whe(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function Vhe(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var dR=Symbol();function x7(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:!t.queryFn||t.queryFn===dR?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function fR(t,e){return typeof t=="function"?t(...e):!!t}function Ghe(t,e,n){let r=!1,s;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(s??=e(),r||(r=!0,s.aborted?n():s.addEventListener("abort",n,{once:!0})),s)}),t}var Ph=(()=>{let t=()=>Bhe;return{isServer(){return t()},setIsServer(e){t=e}}})();function __(){let t,e;const n=new Promise((s,o)=>{t=s,e=o});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),t(s)},n.reject=s=>{r({status:"rejected",reason:s}),e(s)},n}var Khe=jhe;function Yhe(){let t=[],e=0,n=u=>{u()},r=u=>{u()},s=Khe;const o=u=>{e?t.push(u):s(()=>{n(u)})},a=()=>{const u=t;t=[],u.length&&s(()=>{r(()=>{u.forEach(c=>{n(c)})})})};return{batch:u=>{let c;e++;try{c=u()}finally{e--,e||a()}return c},batchCalls:u=>(...c)=>{o(()=>{u(...c)})},schedule:o,setNotifyFunction:u=>{n=u},setBatchNotifyFunction:u=>{r=u},setScheduler:u=>{s=u}}}var Dn=Yhe(),Zhe=class extends bd{#e=!0;#t;#n;constructor(){super(),this.#n=t=>{if(typeof window<"u"&&window.addEventListener){const e=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#n=t,this.#t?.(),this.#t=t(this.setOnline.bind(this))}setOnline(t){this.#e!==t&&(this.#e=t,this.listeners.forEach(n=>{n(t)}))}isOnline(){return this.#e}},Fv=new Zhe;function Xhe(t){return Math.min(1e3*2**t,3e4)}function _7(t){return(t??"online")==="online"?Fv.isOnline():!0}var A_=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function A7(t){let e=!1,n=0,r;const s=__(),o=()=>s.status!=="pending",a=E=>{if(!o()){const C=new A_(E);m(C),t.onCancel?.(C)}},u=()=>{e=!0},c=()=>{e=!1},f=()=>uR.isFocused()&&(t.networkMode==="always"||Fv.isOnline())&&t.canRun(),h=()=>_7(t.networkMode)&&t.canRun(),g=E=>{o()||(r?.(),s.resolve(E))},m=E=>{o()||(r?.(),s.reject(E))},y=()=>new Promise(E=>{r=C=>{(o()||f())&&E(C)},t.onPause?.()}).then(()=>{r=void 0,o()||t.onContinue?.()}),S=()=>{if(o())return;let E;const C=n===0?t.initialPromise:void 0;try{E=C??t.fn()}catch(w){E=Promise.reject(w)}Promise.resolve(E).then(g).catch(w=>{if(o())return;const x=t.retry??(Ph.isServer()?0:3),T=t.retryDelay??Xhe,R=typeof T=="function"?T(n,w):T,M=x===!0||typeof x=="number"&&n<x||typeof x=="function"&&x(n,w);if(e||!M){m(w);return}n++,t.onFail?.(n,w),qhe(R).then(()=>f()?void 0:y()).then(()=>{e?m(w):S()})})};return{promise:s,status:()=>s.status,cancel:a,continue:()=>(r?.(),s),cancelRetry:u,continueRetry:c,canStart:h,start:()=>(h()?S():y().then(S),s)}}var T7=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),C_(this.gcTime)&&(this.#e=Al.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(Ph.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(Al.clearTimeout(this.#e),this.#e=void 0)}};function Qhe(t){return{onFetch:(e,n)=>{const r=e.options,s=e.fetchOptions?.meta?.fetchMore?.direction,o=e.state.data?.pages||[],a=e.state.data?.pageParams||[];let u={pages:[],pageParams:[]},c=0;const f=async()=>{let h=!1;const g=S=>{Ghe(S,()=>e.signal,()=>h=!0)},m=x7(e.options,e.fetchOptions),y=async(S,E,C)=>{if(h)return Promise.reject(e.signal.reason);if(E==null&&S.pages.length)return Promise.resolve(S);const x=(()=>{const N={client:e.client,queryKey:e.queryKey,pageParam:E,direction:C?"backward":"forward",meta:e.options.meta};return g(N),N})(),T=await m(x),{maxPages:R}=e.options,M=C?Vhe:Whe;return{pages:M(S.pages,T,R),pageParams:M(S.pageParams,E,R)}};if(s&&o.length){const S=s==="backward",E=S?R7:T_,C={pages:o,pageParams:a},w=E(r,C);u=await y(C,w,S)}else{const S=t??o.length;do{const E=c===0?a[0]??r.initialPageParam:T_(r,u);if(c>0&&E==null)break;u=await y(u,E),c++}while(c<S)}return u};e.options.persister?e.fetchFn=()=>e.options.persister?.(f,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n):e.fetchFn=f}}}function T_(t,{pages:e,pageParams:n}){const r=e.length-1;return e.length>0?t.getNextPageParam(e[r],e,n[r],n):void 0}function R7(t,{pages:e,pageParams:n}){return e.length>0?t.getPreviousPageParam?.(e[0],e,n[0],n):void 0}function SRe(t,e){return e?T_(t,e)!=null:!1}function ERe(t,e){return!e||!t.getPreviousPageParam?!1:R7(t,e)!=null}var Jhe=class extends T7{#e;#t;#n;#r;#o;#s;#a;#i;constructor(t){super(),this.#i=!1,this.#a=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#o=t.client,this.#r=this.#o.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#t=uU(this.options),this.state=t.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#s?.promise}setOptions(t){if(this.options={...this.#a,...t},t?._type&&(this.#e=t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const e=uU(this.options);e.data!==void 0&&(this.setState(lU(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(t,e){const n=x_(this.state.data,t,this.options);return this.#l({data:n,type:"success",dataUpdatedAt:e?.updatedAt,manual:e?.manual}),n}setState(t){this.#l({type:"setState",state:t})}cancel(t){const e=this.#s?.promise;return this.#s?.cancel(t),e?e.then(Er).catch(Er):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>is(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===dR||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Na(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!C7(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#s?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#s?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(e=>e!==t),this.observers.length||(this.#s&&(this.#i||this.#c()?this.#s.cancel({revert:!0}):this.#s.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}#c(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#l({type:"invalidate"})}async fetch(t,e){if(this.state.fetchStatus!=="idle"&&this.#s?.status()!=="rejected"){if(this.state.data!==void 0&&e?.cancelRefetch)this.cancel({silent:!0});else if(this.#s)return this.#s.continueRetry(),this.#s.promise}if(t&&this.setOptions(t),!this.options.queryFn){const c=this.observers.find(f=>f.options.queryFn);c&&this.setOptions(c.options)}const n=new AbortController,r=c=>{Object.defineProperty(c,"signal",{enumerable:!0,get:()=>(this.#i=!0,n.signal)})},s=()=>{const c=x7(this.options,e),h=(()=>{const g={client:this.#o,queryKey:this.queryKey,meta:this.meta};return r(g),g})();return this.#i=!1,this.options.persister?this.options.persister(c,h,this):c(h)},a=(()=>{const c={fetchOptions:e,options:this.options,queryKey:this.queryKey,client:this.#o,state:this.state,fetchFn:s};return r(c),c})();(this.#e==="infinite"?Qhe(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#l({type:"fetch",meta:a.fetchOptions?.meta}),this.#s=A7({initialPromise:e?.initialPromise,fn:a.fetchFn,onCancel:c=>{c instanceof A_&&c.revert&&this.setState({...this.#n,fetchStatus:"idle"}),n.abort()},onFail:(c,f)=>{this.#l({type:"failed",failureCount:c,error:f})},onPause:()=>{this.#l({type:"pause"})},onContinue:()=>{this.#l({type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{const c=await this.#s.start();if(c===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(c),this.#r.config.onSuccess?.(c,this),this.#r.config.onSettled?.(c,this.state.error,this),c}catch(c){if(c instanceof A_){if(c.silent)return this.#s.promise;if(c.revert){if(this.state.data===void 0)throw c;return this.state.data}}throw this.#l({type:"error",error:c}),this.#r.config.onError?.(c,this),this.#r.config.onSettled?.(this.state.data,c,this),c}finally{this.scheduleGc()}}#l(t){const e=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...I7(n.data,this.options),fetchMeta:t.meta??null};case"success":const r={...n,...lU(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=t.manual?r:void 0,r;case"error":const s=t.error;return{...n,error:s,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=e(this.state),Dn.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:t})})}};function I7(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:_7(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function lU(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function uU(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,n=e!==void 0,r=n?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var epe=class extends bd{constructor(t,e){super(),this.options=e,this.#e=t,this.#i=null,this.#a=__(),this.bindMethods(),this.setOptions(e)}#e;#t=void 0;#n=void 0;#r=void 0;#o;#s;#a;#i;#c;#l;#p;#d;#f;#u;#g=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),cU(this.#t,this.options)?this.#h():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return R_(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return R_(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#S(),this.#E(),this.#t.removeObserver(this)}setOptions(t){const e=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof is(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#C(),this.#t.setOptions(this.options),e._defaulted&&!Uv(this.options,e)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&dU(this.#t,n,this.options,e)&&this.#h(),this.updateResult(),r&&(this.#t!==n||is(this.options.enabled,this.#t)!==is(e.enabled,this.#t)||Na(this.options.staleTime,this.#t)!==Na(e.staleTime,this.#t))&&this.#m();const s=this.#v();r&&(this.#t!==n||is(this.options.enabled,this.#t)!==is(e.enabled,this.#t)||s!==this.#u)&&this.#y(s)}getOptimisticResult(t){const e=this.#e.getQueryCache().build(this.#e,t),n=this.createResult(e,t);return npe(this,n)&&(this.#r=n,this.#s=this.options,this.#o=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(t,e){return new Proxy(t,{get:(n,r)=>(this.trackProp(r),e?.(r),r==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#a.status==="pending"&&this.#a.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,r))})}trackProp(t){this.#g.add(t)}getCurrentQuery(){return this.#t}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=this.#e.defaultQueryOptions(t),n=this.#e.getQueryCache().build(this.#e,e);return n.fetch().then(()=>this.createResult(n,e))}fetch(t){return this.#h({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(t){this.#C();let e=this.#t.fetch(this.options,t);return t?.throwOnError||(e=e.catch(Er)),e}#m(){this.#S();const t=Na(this.options.staleTime,this.#t);if(Ph.isServer()||this.#r.isStale||!C_(t))return;const n=C7(this.#r.dataUpdatedAt,t)+1;this.#d=Al.setTimeout(()=>{this.#r.isStale||this.updateResult()},n)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(t){this.#E(),this.#u=t,!(Ph.isServer()||is(this.options.enabled,this.#t)===!1||!C_(this.#u)||this.#u===0)&&(this.#f=Al.setInterval(()=>{(this.options.refetchIntervalInBackground||uR.isFocused())&&this.#h()},this.#u))}#b(){this.#m(),this.#y(this.#v())}#S(){this.#d!==void 0&&(Al.clearTimeout(this.#d),this.#d=void 0)}#E(){this.#f!==void 0&&(Al.clearInterval(this.#f),this.#f=void 0)}createResult(t,e){const n=this.#t,r=this.options,s=this.#r,o=this.#o,a=this.#s,c=t!==n?t.state:this.#n,{state:f}=t;let h={...f},g=!1,m;if(e._optimisticResults){const k=this.hasListeners(),F=!k&&cU(t,e),$=k&&dU(t,n,e,r);(F||$)&&(h={...h,...I7(f.data,t.options)}),e._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:y,errorUpdatedAt:S,status:E}=h;m=h.data;let C=!1;if(e.placeholderData!==void 0&&m===void 0&&E==="pending"){let k;s?.isPlaceholderData&&e.placeholderData===a?.placeholderData?(k=s.data,C=!0):k=typeof e.placeholderData=="function"?e.placeholderData(this.#p?.state.data,this.#p):e.placeholderData,k!==void 0&&(E="success",m=x_(s?.data,k,e),g=!0)}if(e.select&&m!==void 0&&!C)if(s&&m===o?.data&&e.select===this.#c)m=this.#l;else try{this.#c=e.select,m=e.select(m),m=x_(s?.data,m,e),this.#l=m,this.#i=null}catch(k){this.#i=k}this.#i&&(y=this.#i,m=this.#l,S=Date.now(),E="error");const w=h.fetchStatus==="fetching",x=E==="pending",T=E==="error",R=x&&w,M=m!==void 0,O={status:E,fetchStatus:h.fetchStatus,isPending:x,isSuccess:E==="success",isError:T,isInitialLoading:R,isLoading:R,data:m,dataUpdatedAt:h.dataUpdatedAt,error:y,errorUpdatedAt:S,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:h.dataUpdateCount>c.dataUpdateCount||h.errorUpdateCount>c.errorUpdateCount,isFetching:w,isRefetching:w&&!x,isLoadingError:T&&!M,isPaused:h.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:T&&M,isStale:hR(t,e),refetch:this.refetch,promise:this.#a,isEnabled:is(e.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const k=O.data!==void 0,F=O.status==="error"&&!k,$=q=>{F?q.reject(O.error):k&&q.resolve(O.data)},D=()=>{const q=this.#a=O.promise=__();$(q)},z=this.#a;switch(z.status){case"pending":t.queryHash===n.queryHash&&$(z);break;case"fulfilled":(F||O.data!==z.value)&&D();break;case"rejected":(!F||O.error!==z.reason)&&D();break}}return O}updateResult(){const t=this.#r,e=this.createResult(this.#t,this.options);if(this.#o=this.#t.state,this.#s=this.options,this.#o.data!==void 0&&(this.#p=this.#t),Uv(e,t))return;this.#r=e;const n=()=>{if(!t)return!0;const{notifyOnChangeProps:r}=this.options,s=typeof r=="function"?r():r;if(s==="all"||!s&&!this.#g.size)return!0;const o=new Set(s??this.#g);return this.options.throwOnError&&o.add("error"),Object.keys(this.#r).some(a=>{const u=a;return this.#r[u]!==t[u]&&o.has(u)})};this.#w({listeners:n()})}#C(){const t=this.#e.getQueryCache().build(this.#e,this.options);if(t===this.#t)return;const e=this.#t;this.#t=t,this.#n=t.state,this.hasListeners()&&(e?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#w(t){Dn.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function tpe(t,e){return is(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&is(e.retryOnMount,t)===!1)}function cU(t,e){return tpe(t,e)||t.state.data!==void 0&&R_(t,e,e.refetchOnMount)}function R_(t,e,n){if(is(e.enabled,t)!==!1&&Na(e.staleTime,t)!=="static"){const r=typeof n=="function"?n(t):n;return r==="always"||r!==!1&&hR(t,e)}return!1}function dU(t,e,n,r){return(t!==e||is(r.enabled,t)===!1)&&(!n.suspense||t.state.status!=="error")&&hR(t,n)}function hR(t,e){return is(e.enabled,t)!==!1&&t.isStaleByTime(Na(e.staleTime,t))}function npe(t,e){return!Uv(t.getCurrentResult(),e)}var rpe=class extends T7{#e;#t;#n;#r;constructor(t){super(),this.#e=t.client,this.mutationId=t.mutationId,this.#n=t.mutationCache,this.#t=[],this.state=t.state||O7(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#t.includes(t)||(this.#t.push(t),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#t=this.#t.filter(e=>e!==t),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(t){const e=()=>{this.#o({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=A7({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(o,a)=>{this.#o({type:"failed",failureCount:o,error:a})},onPause:()=>{this.#o({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const r=this.state.status==="pending",s=!this.#r.canStart();try{if(r)e();else{this.#o({type:"pending",variables:t,isPaused:s}),this.#n.config.onMutate&&await this.#n.config.onMutate(t,this,n);const a=await this.options.onMutate?.(t,n);a!==this.state.context&&this.#o({type:"pending",context:a,variables:t,isPaused:s})}const o=await this.#r.start();return await this.#n.config.onSuccess?.(o,t,this.state.context,this,n),await this.options.onSuccess?.(o,t,this.state.context,n),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(o,null,t,this.state.context,n),this.#o({type:"success",data:o}),o}catch(o){try{await this.#n.config.onError?.(o,t,this.state.context,this,n)}catch(a){Promise.reject(a)}try{await this.options.onError?.(o,t,this.state.context,n)}catch(a){Promise.reject(a)}try{await this.#n.config.onSettled?.(void 0,o,this.state.variables,this.state.context,this,n)}catch(a){Promise.reject(a)}try{await this.options.onSettled?.(void 0,o,t,this.state.context,n)}catch(a){Promise.reject(a)}throw this.#o({type:"error",error:o}),o}finally{this.#n.runNext(this)}}#o(t){const e=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=e(this.state),Dn.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(t)}),this.#n.notify({mutation:this,type:"updated",action:t})})}};function O7(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var N7=class extends bd{constructor(t={}){super(),this.config=t,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(t,e,n){const r=new rpe({client:t,mutationCache:this,mutationId:++this.#n,options:t.defaultMutationOptions(e),state:n});return this.add(r),r}add(t){this.#e.add(t);const e=lm(t);if(typeof e=="string"){const n=this.#t.get(e);n?n.push(t):this.#t.set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#e.delete(t)){const e=lm(t);if(typeof e=="string"){const n=this.#t.get(e);if(n)if(n.length>1){const r=n.indexOf(t);r!==-1&&n.splice(r,1)}else n[0]===t&&this.#t.delete(e)}}this.notify({type:"removed",mutation:t})}canRun(t){const e=lm(t);if(typeof e=="string"){const r=this.#t.get(e)?.find(s=>s.state.status==="pending");return!r||r===t}else return!0}runNext(t){const e=lm(t);return typeof e=="string"?this.#t.get(e)?.find(r=>r!==t&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Dn.batch(()=>{this.#e.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(t){const e={exact:!0,...t};return this.getAll().find(n=>oU(e,n))}findAll(t={}){return this.getAll().filter(e=>oU(t,e))}notify(t){Dn.batch(()=>{this.listeners.forEach(e=>{e(t)})})}resumePausedMutations(){const t=this.getAll().filter(e=>e.state.isPaused);return Dn.batch(()=>Promise.all(t.map(e=>e.continue().catch(Er))))}};function lm(t){return t.options.scope?.id}var spe=class extends bd{#e;#t=void 0;#n;#r;constructor(e,n){super(),this.#e=e,this.setOptions(n),this.bindMethods(),this.#o()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){const n=this.options;this.options=this.#e.defaultMutationOptions(e),Uv(this.options,n)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),n?.mutationKey&&this.options.mutationKey&&Xl(n.mutationKey)!==Xl(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#o(),this.#s(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#o(),this.#s()}mutate(e,n){return this.#r=n,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#o(){const e=this.#n?.state??O7();this.#t={...e,isPending:e.status==="pending",isSuccess:e.status==="success",isError:e.status==="error",isIdle:e.status==="idle",mutate:this.mutate,reset:this.reset}}#s(e){Dn.batch(()=>{if(this.#r&&this.hasListeners()){const n=this.#t.variables,r=this.#t.context,s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#r.onSuccess?.(e.data,n,r,s)}catch(o){Promise.reject(o)}try{this.#r.onSettled?.(e.data,null,n,r,s)}catch(o){Promise.reject(o)}}else if(e?.type==="error"){try{this.#r.onError?.(e.error,n,r,s)}catch(o){Promise.reject(o)}try{this.#r.onSettled?.(void 0,e.error,n,r,s)}catch(o){Promise.reject(o)}}}this.listeners.forEach(n=>{n(this.#t)})})}},M7=class extends bd{constructor(t={}){super(),this.config=t,this.#e=new Map}#e;build(t,e,n){const r=e.queryKey,s=e.queryHash??cR(r,e);let o=this.get(s);return o||(o=new Jhe({client:t,queryKey:r,queryHash:s,options:t.defaultQueryOptions(e),state:n,defaultOptions:t.getQueryDefaults(r)}),this.add(o)),o}add(t){this.#e.has(t.queryHash)||(this.#e.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const e=this.#e.get(t.queryHash);e&&(t.destroy(),e===t&&this.#e.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Dn.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#e.get(t)}getAll(){return[...this.#e.values()]}find(t){const e={exact:!0,...t};return this.getAll().find(n=>sU(e,n))}findAll(t={}){const e=this.getAll();return Object.keys(t).length>0?e.filter(n=>sU(t,n)):e}notify(t){Dn.batch(()=>{this.listeners.forEach(e=>{e(t)})})}onFocus(){Dn.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Dn.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},ope=class{#e;#t;#n;#r;#o;#s;#a;#i;constructor(t={}){this.#e=t.queryCache||new M7,this.#t=t.mutationCache||new N7,this.#n=t.defaultOptions||{},this.#r=new Map,this.#o=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#a=uR.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#i=Fv.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#s--,this.#s===0&&(this.#a?.(),this.#a=void 0,this.#i?.(),this.#i=void 0)}isFetching(t){return this.#e.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#t.findAll({...t,status:"pending"}).length}getQueryData(t){const e=this.defaultQueryOptions({queryKey:t});return this.#e.get(e.queryHash)?.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),n=this.#e.build(this,e),r=n.state.data;return r===void 0?this.fetchQuery(t):(t.revalidateIfStale&&n.isStaleByTime(Na(e.staleTime,n))&&this.prefetchQuery(e),Promise.resolve(r))}getQueriesData(t){return this.#e.findAll(t).map(({queryKey:e,state:n})=>{const r=n.data;return[e,r]})}setQueryData(t,e,n){const r=this.defaultQueryOptions({queryKey:t}),o=this.#e.get(r.queryHash)?.state.data,a=Hhe(e,o);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(t,e,n){return Dn.batch(()=>this.#e.findAll(t).map(({queryKey:r})=>[r,this.setQueryData(r,e,n)]))}getQueryState(t){const e=this.defaultQueryOptions({queryKey:t});return this.#e.get(e.queryHash)?.state}removeQueries(t){const e=this.#e;Dn.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=this.#e;return Dn.batch(()=>(n.findAll(t).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const n={revert:!0,...e},r=Dn.batch(()=>this.#e.findAll(t).map(s=>s.cancel(n)));return Promise.all(r).then(Er).catch(Er)}invalidateQueries(t,e={}){return Dn.batch(()=>(this.#e.findAll(t).forEach(n=>{n.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},e)))}refetchQueries(t,e={}){const n={...e,cancelRefetch:e.cancelRefetch??!0},r=Dn.batch(()=>this.#e.findAll(t).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let o=s.fetch(void 0,n);return n.throwOnError||(o=o.catch(Er)),s.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(Er)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=this.#e.build(this,e);return n.isStaleByTime(Na(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(Er).catch(Er)}fetchInfiniteQuery(t){return t._type="infinite",this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(Er).catch(Er)}ensureInfiniteQueryData(t){return t._type="infinite",this.ensureQueryData(t)}resumePausedMutations(){return Fv.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(t){this.#n=t}setQueryDefaults(t,e){this.#r.set(Xl(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...this.#r.values()],n={};return e.forEach(r=>{Mh(t,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(t,e){this.#o.set(Xl(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...this.#o.values()],n={};return e.forEach(r=>{Mh(t,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...this.#n.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=cR(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===dR&&(e.enabled=!1),e}defaultMutationOptions(t){return t?._defaulted?t:{...this.#n.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},P7=A.createContext(void 0),vb=t=>{const e=A.useContext(P7);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},ipe=({client:t,children:e})=>(A.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),I.jsx(P7.Provider,{value:t,children:e})),k7=A.createContext(!1),ape=()=>A.useContext(k7);k7.Provider;function lpe(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var upe=A.createContext(lpe()),cpe=()=>A.useContext(upe),dpe=(t,e,n)=>{const r=n?.state.error&&typeof t.throwOnError=="function"?fR(t.throwOnError,[n.state.error,n]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||r)&&(e.isReset()||(t.retryOnMount=!1))},fpe=t=>{A.useEffect(()=>{t.clearReset()},[t])},hpe=({result:t,errorResetBoundary:e,throwOnError:n,query:r,suspense:s})=>t.isError&&!e.isReset()&&!t.isFetching&&r&&(s&&t.data===void 0||fR(n,[t.error,r])),ppe=t=>{if(t.suspense){const n=s=>s==="static"?s:Math.max(s??1e3,1e3),r=t.staleTime;t.staleTime=typeof r=="function"?(...s)=>n(r(...s)):n(r),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},gpe=(t,e)=>t.isLoading&&t.isFetching&&!e,mpe=(t,e)=>t?.suspense&&e.isPending,fU=(t,e,n)=>e.fetchOptimistic(t).catch(()=>{n.clearReset()});function vpe(t,e,n){const r=ape(),s=cpe(),o=vb(),a=o.defaultQueryOptions(t);o.getDefaultOptions().queries?._experimental_beforeQuery?.(a);const u=o.getQueryCache().get(a.queryHash),c=t.subscribed!==!1;a._optimisticResults=r?"isRestoring":c?"optimistic":void 0,ppe(a),dpe(a,s,u),fpe(s);const f=!o.getQueryCache().get(a.queryHash),[h]=A.useState(()=>new e(o,a)),g=h.getOptimisticResult(a),m=!r&&c;if(A.useSyncExternalStore(A.useCallback(y=>{const S=m?h.subscribe(Dn.batchCalls(y)):Er;return h.updateResult(),S},[h,m]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),A.useEffect(()=>{h.setOptions(a)},[a,h]),mpe(a,g))throw fU(a,h,s);if(hpe({result:g,errorResetBoundary:s,throwOnError:a.throwOnError,query:u,suspense:a.suspense}))throw g.error;return o.getDefaultOptions().queries?._experimental_afterQuery?.(a,g),a.experimental_prefetchInRender&&!Ph.isServer()&&gpe(g,r)&&(f?fU(a,h,s):u?.promise)?.catch(Er).finally(()=>{h.updateResult()}),a.notifyOnChangeProps?g:h.trackResult(g)}function D7(t,e){return vpe(t,epe)}function ype(t,e){const n=vb(),[r]=A.useState(()=>new spe(n,t));A.useEffect(()=>{r.setOptions(t)},[r,t]);const s=A.useSyncExternalStore(A.useCallback(a=>r.subscribe(Dn.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),o=A.useCallback((a,u)=>{r.mutate(a,u).catch(Er)},[r]);if(s.error&&fR(r.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:o,mutateAsync:s.mutate}}const bpe="modulepreload",Spe=function(t){return"/"+t},hU={},Vn=function(e,n,r){let s=Promise.resolve();if(n&&n.length>0){let c=function(f){return Promise.all(f.map(h=>Promise.resolve(h).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),u=a?.nonce||a?.getAttribute("nonce");s=c(n.map(f=>{if(f=Spe(f),f in hU)return;hU[f]=!0;const h=f.endsWith(".css"),g=h?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${g}`))return;const m=document.createElement("link");if(m.rel=h?"stylesheet":bpe,h||(m.as="script"),m.crossOrigin="",m.href=f,u&&m.setAttribute("nonce",u),document.head.appendChild(m),h)return new Promise((y,S)=>{m.addEventListener("load",y),m.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${f}`)))})}))}function o(a){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=a,window.dispatchEvent(u),!u.defaultPrevented)throw a}return s.then(a=>{for(const u of a||[])u.status==="rejected"&&o(u.reason);return e().catch(o)})};var pU=A.use,Rc=typeof window<"u"?A.useLayoutEffect:A.useEffect;function Vw(t){const e=A.useRef({value:t,prev:null}),n=e.current.value;return t!==n&&(e.current={value:t,prev:n}),e.current.prev}function Epe(t,e,n={},r={}){A.useEffect(()=>{if(!t.current||r.disabled||typeof IntersectionObserver!="function")return;const s=new IntersectionObserver(([o])=>{e(o)},n);return s.observe(t.current),()=>{s.disconnect()}},[e,n,r.disabled,t])}function Cpe(t){const e=A.useRef(null);return A.useImperativeHandle(t,()=>e.current,[]),e}const L7=!1;function kh(t){return t[t.length-1]}function wpe(t){return typeof t=="function"}function Tl(t,e){return wpe(t)?t(e):t}const U7=Object.prototype.hasOwnProperty,gU=Object.prototype.propertyIsEnumerable;function F7(t){for(const e in t)if(U7.call(t,e))return!0;return!1}const xpe=()=>Object.create(null),Sl=(t,e)=>Rl(t,e,xpe);function Rl(t,e,n=()=>({}),r=0){if(t===e)return t;if(r>500)return e;const s=e,o=yU(t)&&yU(s);if(!o&&!(zv(t)&&zv(s)))return s;const a=o?t:mU(t);if(!a)return s;const u=o?s:mU(s);if(!u)return s;const c=a.length,f=u.length,h=o?new Array(f):n();let g=0;for(let m=0;m<f;m++){const y=o?m:u[m],S=t[y],E=s[y];if(S===E){h[y]=S,(o?m<c:U7.call(t,y))&&g++;continue}if(S===null||E===null||typeof S!="object"||typeof E!="object"){h[y]=E;continue}const C=Rl(S,E,n,r+1);h[y]=C,C===S&&g++}return c===f&&g===c?t:h}function mU(t){const e=Object.getOwnPropertyNames(t);for(const s of e)if(!gU.call(t,s))return!1;const n=Object.getOwnPropertySymbols(t);if(n.length===0)return e;const r=e;for(const s of n){if(!gU.call(t,s))return!1;r.push(s)}return r}function zv(t){if(!vU(t))return!1;const e=t.constructor;if(typeof e>"u")return!0;const n=e.prototype;return!(!vU(n)||!n.hasOwnProperty("isPrototypeOf"))}function vU(t){return Object.prototype.toString.call(t)==="[object Object]"}function yU(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Ll(t,e,n){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;for(let r=0,s=t.length;r<s;r++)if(!Ll(t[r],e[r],n))return!1;return!0}if(zv(t)&&zv(e)){const r=n?.ignoreUndefined??!0;if(n?.partial){for(const a in e)if((!r||e[a]!==void 0)&&!Ll(t[a],e[a],n))return!1;return!0}let s=0;if(!r)s=Object.keys(t).length;else for(const a in t)t[a]!==void 0&&s++;let o=0;for(const a in e)if((!r||e[a]!==void 0)&&(o++,o>s||!Ll(t[a],e[a],n)))return!1;return s===o}return!1}function Vc(t){let e,n;const r=new Promise((s,o)=>{e=s,n=o});return r.status="pending",r.resolve=s=>{r.status="resolved",r.value=s,e(s),t?.(s)},r.reject=s=>{r.status="rejected",n(s)},r}function _pe(t){return typeof t?.message!="string"?!1:t.message.startsWith("Failed to fetch dynamically imported module")||t.message.startsWith("error loading dynamically imported module")||t.message.startsWith("Importing a module script failed")}function Dh(t){return!!(t&&typeof t=="object"&&typeof t.then=="function")}const Ape=/[\x00-\x1f\x7f"<>`{}]/g;function Tpe(t){return t.replace(Ape,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function bU(t){let e;try{e=decodeURI(t)}catch{e=t.replaceAll(/%[0-9A-F]{2}/gi,n=>{try{return decodeURI(n)}catch{return n}})}return Tpe(e)}const Rpe=["http:","https:","mailto:","tel:"];function jv(t,e){if(!t)return!1;try{const n=new URL(t);return!e.has(n.protocol)}catch{return!1}}function zf(t){if(!t)return{path:t,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(t)&&!t.startsWith("//"))return{path:t,handledProtocolRelativeURL:!1};const e=/%25|%5C/gi;let n=0,r="",s;for(;(s=e.exec(t))!==null;)r+=bU(t.slice(n,s.index))+s[0],n=e.lastIndex;r=r+bU(n?t.slice(n):t);let o=!1;return r.startsWith("//")&&(o=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:o}}function Ipe(t){return/\s|[^\u0000-\u007F]/.test(t)?t.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):t}function Ope(t,e){if(t===e)return!0;if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function gi(){throw new Error("Invariant failed")}function Lh(t){const e=new Map;let n,r;const s=o=>{o.next&&(o.prev?(o.prev.next=o.next,o.next.prev=o.prev,o.next=void 0,r&&(r.next=o,o.prev=r)):(o.next.prev=void 0,n=o.next,o.next=void 0,r&&(o.prev=r,r.next=o)),r=o)};return{get(o){const a=e.get(o);if(a)return s(a),a.value},set(o,a){if(e.size>=t&&n){const c=n;e.delete(c.key),c.next&&(n=c.next,c.next.prev=void 0),c===r&&(r=void 0)}const u=e.get(o);if(u)u.value=a,s(u);else{const c={key:o,value:a,prev:r};r&&(r.next=c),r=c,n||(n=c),e.set(o,c)}},clear(){e.clear(),n=void 0,r=void 0}}}const Ra=4,z7=5;function Npe(t){const e=t.indexOf("{");if(e===-1)return null;const n=t.indexOf("}",e);return n===-1||e+1>=t.length?null:[e,n]}function j7(t,e,n=new Uint16Array(6)){const r=t.indexOf("/",e),s=r===-1?t.length:r,o=t.substring(e,s);if(!o||!o.includes("$"))return n[0]=0,n[1]=e,n[2]=e,n[3]=s,n[4]=s,n[5]=s,n;if(o==="$"){const u=t.length;return n[0]=2,n[1]=e,n[2]=e,n[3]=u,n[4]=u,n[5]=u,n}if(o.charCodeAt(0)===36)return n[0]=1,n[1]=e,n[2]=e+1,n[3]=s,n[4]=s,n[5]=s,n;const a=Npe(o);if(a){const[u,c]=a,f=o.charCodeAt(u+1);if(f===45){if(u+2<o.length&&o.charCodeAt(u+2)===36){const h=u+3,g=c;if(h<g)return n[0]=3,n[1]=e+u,n[2]=e+h,n[3]=e+g,n[4]=e+c+1,n[5]=s,n}}else if(f===36){const h=u+1,g=u+2;return g===c?(n[0]=2,n[1]=e+u,n[2]=e+h,n[3]=e+g,n[4]=e+c+1,n[5]=t.length,n):(n[0]=1,n[1]=e+u,n[2]=e+g,n[3]=e+c,n[4]=e+c+1,n[5]=s,n)}}return n[0]=0,n[1]=e,n[2]=e,n[3]=s,n[4]=s,n[5]=s,n}function yb(t,e,n,r,s,o,a){a?.(n);let u=r;{const c=n.fullPath??n.from,f=c.length,h=n.options?.caseSensitive??t,g=n.options?.params?.parse??n.options?.parseParams;for(;u<f;){const y=j7(c,u,e);let S;const E=u,C=y[5];switch(u=C+1,o++,y[0]){case 0:{const w=c.substring(y[2],y[3]);if(h){const x=s.static?.get(w);if(x)S=x;else{s.static??=new Map;const T=Il(n.fullPath??n.from);T.parent=s,T.depth=o,S=T,s.static.set(w,T)}}else{const x=w.toLowerCase(),T=s.staticInsensitive?.get(x);if(T)S=T;else{s.staticInsensitive??=new Map;const R=Il(n.fullPath??n.from);R.parent=s,R.depth=o,S=R,s.staticInsensitive.set(x,R)}}break}case 1:{const w=c.substring(E,y[1]),x=c.substring(y[4],C),T=h&&!!(w||x),R=w?T?w:w.toLowerCase():void 0,M=x?T?x:x.toLowerCase():void 0,N=!g&&s.dynamic?.find(O=>!O.parse&&O.caseSensitive===T&&O.prefix===R&&O.suffix===M);if(N)S=N;else{const O=Kw(1,n.fullPath??n.from,T,R,M);S=O,O.depth=o,O.parent=s,s.dynamic??=[],s.dynamic.push(O)}break}case 3:{const w=c.substring(E,y[1]),x=c.substring(y[4],C),T=h&&!!(w||x),R=w?T?w:w.toLowerCase():void 0,M=x?T?x:x.toLowerCase():void 0,N=!g&&s.optional?.find(O=>!O.parse&&O.caseSensitive===T&&O.prefix===R&&O.suffix===M);if(N)S=N;else{const O=Kw(3,n.fullPath??n.from,T,R,M);S=O,O.parent=s,O.depth=o,s.optional??=[],s.optional.push(O)}break}case 2:{const w=c.substring(E,y[1]),x=c.substring(y[4],C),T=h&&!!(w||x),R=w?T?w:w.toLowerCase():void 0,M=x?T?x:x.toLowerCase():void 0,N=Kw(2,n.fullPath??n.from,T,R,M);S=N,N.parent=s,N.depth=o,s.wildcard??=[],s.wildcard.push(N)}}s=S}if(g&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const y=Il(n.fullPath??n.from);y.kind=z7,y.parent=s,o++,y.depth=o,s.pathless??=[],s.pathless.push(y),s=y}const m=(n.path||!n.children)&&!n.isRoot;if(m&&c.endsWith("/")){const y=Il(n.fullPath??n.from);y.kind=Ra,y.parent=s,o++,y.depth=o,s.index=y,s=y}s.parse=g??null,s.priority=n.options?.params?.priority??0,m&&!s.route&&(s.route=n,s.fullPath=n.fullPath??n.from)}if(n.children)for(const c of n.children)yb(t,e,c,u,s,o,a)}function Gw(t,e){if(t.parse&&!e.parse)return-1;if(!t.parse&&e.parse)return 1;if(t.parse&&e.parse&&(t.priority||e.priority))return e.priority-t.priority;if(t.prefix&&e.prefix&&t.prefix!==e.prefix){if(t.prefix.startsWith(e.prefix))return-1;if(e.prefix.startsWith(t.prefix))return 1}if(t.suffix&&e.suffix&&t.suffix!==e.suffix){if(t.suffix.endsWith(e.suffix))return-1;if(e.suffix.endsWith(t.suffix))return 1}return t.prefix&&!e.prefix?-1:!t.prefix&&e.prefix?1:t.suffix&&!e.suffix?-1:!t.suffix&&e.suffix?1:t.caseSensitive&&!e.caseSensitive?-1:!t.caseSensitive&&e.caseSensitive?1:0}function ba(t){if(t.pathless)for(const e of t.pathless)ba(e);if(t.static)for(const e of t.static.values())ba(e);if(t.staticInsensitive)for(const e of t.staticInsensitive.values())ba(e);if(t.dynamic?.length){t.dynamic.sort(Gw);for(const e of t.dynamic)ba(e)}if(t.optional?.length){t.optional.sort(Gw);for(const e of t.optional)ba(e)}if(t.wildcard?.length){t.wildcard.sort(Gw);for(const e of t.wildcard)ba(e)}}function Il(t){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,priority:0}}function Kw(t,e,n,r,s){return{kind:t,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,priority:0,caseSensitive:n,prefix:r,suffix:s}}function Mpe(t,e){const n=Il("/"),r=new Uint16Array(6);for(const s of t)yb(!1,r,s,1,n,0);ba(n),e.masksTree=n,e.flatCache=Lh(1e3)}function Ppe(t,e){t||="/";const n=e.flatCache.get(t);if(n)return n;const r=pR(t,e.masksTree);return e.flatCache.set(t,r),r}function kpe(t,e,n,r,s){t||="/",r||="/";const o=e?`case\0${t}`:t;let a=s.singleCache.get(o);return a||(a=Il("/"),yb(e,new Uint16Array(6),{from:t},1,a,0),s.singleCache.set(o,a)),pR(r,a,n)}function Dpe(t,e,n=!1){const r=n?t:`nofuzz\0${t}`,s=e.matchCache.get(r);if(s!==void 0)return s;t||="/";let o;try{o=pR(t,e.segmentTree,n)}catch(a){if(a instanceof URIError)o=null;else throw a}return o&&(o.branch=H7(o.route)),e.matchCache.set(r,o),o}function Lpe(t){return t==="/"?t:t.replace(/\/{1,}$/,"")}function Upe(t,e=!1,n){const r=Il(t.fullPath),s=new Uint16Array(6),o={},a={};let u=0;return yb(e,s,t,1,r,0,c=>{if(n?.(c,u),c.id in o&&gi(),o[c.id]=c,u!==0&&c.path){const f=Lpe(c.fullPath);(!a[f]||c.fullPath.endsWith("/"))&&(a[f]=c)}u++}),ba(r),{processedTree:{segmentTree:r,singleCache:Lh(1e3),matchCache:Lh(1e3),flatCache:null,masksTree:null},routesById:o,routesByPath:a}}function pR(t,e,n=!1){const r=t.split("/"),s=zpe(t,r,e,n);if(!s)return null;const[o]=B7(t,r,s);return{route:s.node.route,rawParams:o}}function B7(t,e,n){const r=Fpe(n.node);let s=null;const o=Object.create(null);let a=n.extract?.part??0,u=n.extract?.node??0,c=n.extract?.path??0,f=n.extract?.segment??0;for(;u<r.length;a++,u++,c++,f++){const h=r[u];if(h.kind===Ra)break;if(h.kind===z7){f--,a--,c--;continue}const g=e[a],m=c;if(g&&(c+=g.length),h.kind===1){s??=n.node.fullPath.split("/");const y=s[f],S=h.prefix?.length??0;if(y.charCodeAt(S)===123){const E=h.suffix?.length??0,C=y.substring(S+2,y.length-E-1),w=g.substring(S,g.length-E);o[C]=decodeURIComponent(w)}else{const E=y.substring(1);o[E]=decodeURIComponent(g)}}else if(h.kind===3){if(n.skipped&1<<u){a--,c=m-1;continue}s??=n.node.fullPath.split("/");const y=s[f],S=h.prefix?.length??0,E=h.suffix?.length??0,C=y.substring(S+3,y.length-E-1),w=h.suffix||h.prefix?g.substring(S,g.length-E):g;w&&(o[C]=decodeURIComponent(w))}else if(h.kind===2){const y=h,S=t.substring(m+(y.prefix?.length??0),t.length-(y.suffix?.length??0)),E=decodeURIComponent(S);o["*"]=E,o._splat=E;break}}return n.rawParams&&Object.assign(o,n.rawParams),[o,{part:a,node:u,path:c,segment:f}]}function H7(t){const e=[t];for(;t.parentRoute;)t=t.parentRoute,e.push(t);return e.reverse(),e}function Fpe(t){const e=Array(t.depth+1);do e[t.depth]=t,t=t.parent;while(t);return e}function zpe(t,e,n,r){if(t==="/"&&n.index)return{node:n.index,skipped:0};const s=!kh(e),o=s&&t!=="/",a=e.length-(s?1:0),u=[{node:n,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}];let c=null,f=null;for(;u.length;){const h=u.pop(),{node:g,index:m,skipped:y,depth:S,statics:E,dynamics:C,optionals:w}=h;let{extract:x,rawParams:T}=h;if(g.kind===2&&g.route&&!cm(f,h))continue;if(g.parse){if(!SU(t,e,h))continue;T=h.rawParams,x=h.extract}r&&g.route&&g.kind!==Ra&&cm(c,h)&&(c=h);const R=m===a;if(R&&(g.route&&(!o||g.kind===Ra||g.kind===2)&&cm(f,h)&&(f=h),!g.optional&&!g.wildcard&&!g.index&&!g.pathless))continue;const M=R?void 0:e[m];let N;if(R&&g.index){const O={node:g.index,index:m,skipped:y,depth:S+1,statics:E,dynamics:C,optionals:w,extract:x,rawParams:T};let k=!0;if(g.index.parse&&(SU(t,e,O)||(k=!1)),k){if(!C&&!w&&!y&&jpe(E,a))return O;cm(f,O)&&(f=O)}}if(g.wildcard)for(let O=g.wildcard.length-1;O>=0;O--){const k=g.wildcard[O],{prefix:F,suffix:$}=k;if(!(F&&(R||!(k.caseSensitive?M:N??=M.toLowerCase()).startsWith(F)))){if($){if(R)continue;const D=e.slice(m).join("/").slice(-$.length);if((k.caseSensitive?D:D.toLowerCase())!==$)continue}u.push({node:k,index:a,skipped:y,depth:S+1,statics:E,dynamics:C,optionals:w,extract:x,rawParams:T})}}if(g.optional){const O=y|1<<S,k=S+1;for(let F=g.optional.length-1;F>=0;F--){const $=g.optional[F];u.push({node:$,index:m,skipped:O,depth:k,statics:E,dynamics:C,optionals:w,extract:x,rawParams:T})}if(!R)for(let F=g.optional.length-1;F>=0;F--){const $=g.optional[F],{prefix:D,suffix:z}=$;if(D||z){const q=$.caseSensitive?M:N??=M.toLowerCase();if(D&&!q.startsWith(D)||z&&!q.endsWith(z))continue}u.push({node:$,index:m+1,skipped:y,depth:k,statics:E,dynamics:C,optionals:w+um(a,m),extract:x,rawParams:T})}}if(!R&&g.dynamic&&M)for(let O=g.dynamic.length-1;O>=0;O--){const k=g.dynamic[O],{prefix:F,suffix:$}=k;if(F||$){const D=k.caseSensitive?M:N??=M.toLowerCase();if(F&&!D.startsWith(F)||$&&!D.endsWith($))continue}u.push({node:k,index:m+1,skipped:y,depth:S+1,statics:E,dynamics:C+um(a,m),optionals:w,extract:x,rawParams:T})}if(!R&&g.staticInsensitive){const O=g.staticInsensitive.get(N??=M.toLowerCase());O&&u.push({node:O,index:m+1,skipped:y,depth:S+1,statics:E+um(a,m),dynamics:C,optionals:w,extract:x,rawParams:T})}if(!R&&g.static){const O=g.static.get(M);O&&u.push({node:O,index:m+1,skipped:y,depth:S+1,statics:E+um(a,m),dynamics:C,optionals:w,extract:x,rawParams:T})}if(g.pathless){const O=S+1;for(let k=g.pathless.length-1;k>=0;k--){const F=g.pathless[k];u.push({node:F,index:m,skipped:y,depth:O,statics:E,dynamics:C,optionals:w,extract:x,rawParams:T})}}}if(f)return f;if(r&&c){let h=c.index;for(let m=0;m<c.index;m++)h+=e[m].length;const g=h===t.length?"/":t.slice(h);return c.rawParams??=Object.create(null),c.rawParams["**"]=decodeURIComponent(g),c}return null}function um(t,e){return 2**(t-e-1)}function jpe(t,e){return t===2**(e-1)-1}function SU(t,e,n){let r,s;try{[r,s]=B7(t,e,n)}catch{return null}if(n.rawParams=r,n.extract=s,!n.node.parse)return!0;try{if(n.node.parse(r)===!1)return null}catch{}return!0}function cm(t,e){return t?e.statics>t.statics||e.statics===t.statics&&(e.dynamics>t.dynamics||e.dynamics===t.dynamics&&(e.optionals>t.optionals||e.optionals===t.optionals&&((e.node.kind===Ra)>(t.node.kind===Ra)||e.node.kind===Ra==(t.node.kind===Ra)&&e.depth>t.depth))):!0}function lv(t){return gR(t.filter(e=>e!==void 0).join("/"))}function gR(t){return t.replace(/\/{2,}/g,"/")}function $7(t){return t==="/"?t:t.replace(/^\/{1,}/,"")}function hi(t){const e=t.length;return e>1&&t[e-1]==="/"?t.replace(/\/{1,}$/,""):t}function q7(t){return hi($7(t))}function Bv(t,e){return t?.endsWith("/")&&t!=="/"&&t!==`${e}/`?t.slice(0,-1):t}function Bpe(t,e,n){return Bv(t,n)===Bv(e,n)}function Hpe({base:t,to:e,trailingSlash:n="never",cache:r}){const s=e.startsWith("/"),o=!s&&e===".";let a;if(r){a=s?e:o?t:t+"\0"+e;const f=r.get(a);if(f)return f}let u;if(o)u=t.split("/");else if(s)u=e.split("/");else{for(u=t.split("/");u.length>1&&kh(u)==="";)u.pop();const f=e.split("/");for(let h=0,g=f.length;h<g;h++){const m=f[h];m===""?h?h===g-1&&u.push(m):u=[m]:m===".."?u.pop():m==="."||u.push(m)}}u.length>1&&(kh(u)===""?n==="never"&&u.pop():n==="always"&&u.push(""));const c=gR(u.join("/"))||"/";return a&&r&&r.set(a,c),c}function $pe(t){const e=new Map(t.map(s=>[encodeURIComponent(s),s])),n=Array.from(e.keys()).map(s=>s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),r=new RegExp(n,"g");return s=>s.replace(r,o=>e.get(o)??o)}function Yw(t,e,n){const r=e[t];return typeof r!="string"?r:t==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split("/").map(s=>CU(s,n)).join("/"):CU(r,n)}function EU({path:t,params:e,decoder:n,...r}){let s=!1;const o=Object.create(null);if(!t||t==="/")return{interpolatedPath:"/",usedParams:o,isMissingParams:s};if(!t.includes("$"))return{interpolatedPath:t,usedParams:o,isMissingParams:s};const a=t.length;let u=0,c,f="";for(;u<a;){const h=u;c=j7(t,h,c);const g=c[5];if(u=g+1,h===g)continue;const m=c[0];if(m===0){f+="/"+t.substring(h,g);continue}if(m===2){const y=e._splat;o._splat=y,o["*"]=y;const S=t.substring(h,c[1]),E=t.substring(c[4],g);if(!y){s=!0,(S||E)&&(f+="/"+S+E);continue}const C=Yw("_splat",e,n);f+="/"+S+C+E;continue}if(m===1){const y=t.substring(c[2],c[3]);!s&&!(y in e)&&(s=!0),o[y]=e[y];const S=t.substring(h,c[1]),E=t.substring(c[4],g),C=Yw(y,e,n)??"undefined";f+="/"+S+C+E;continue}if(m===3){const y=t.substring(c[2],c[3]),S=e[y];if(S==null)continue;o[y]=S;const E=t.substring(h,c[1]),C=t.substring(c[4],g),w=Yw(y,e,n)??"";f+="/"+E+w+C;continue}}return t.endsWith("/")&&(f+="/"),{usedParams:o,interpolatedPath:f||"/",isMissingParams:s}}function CU(t,e){const n=encodeURIComponent(t);return e?.(n)??n}function fr(t){return t?.isNotFound===!0}function qpe(){try{return sessionStorage}catch{return}}const Wpe="tsr-scroll-restoration-v1_3",W7=qpe();function Vpe(){try{return JSON.parse(W7?.getItem("tsr-scroll-restoration-v1_3")||"{}")}catch{return{}}}function Gpe(){try{W7?.setItem(Wpe,JSON.stringify(Sc))}catch{}}const Sc=Vpe(),wU="data-scroll-restoration-id",Kpe=t=>t.state.__TSR_key||t.href;function Ype(t){const e=t.getAttribute(wU);if(e)return`[${wU}="${e}"]`;let n="",r=t,s;for(;s=r.parentNode;){let o=1,a=r;for(;a=a.previousElementSibling;)o++;const u=`${r.localName}:nth-child(${o})`;n=n?`${u} > ${n}`:u,r=s}return n}let dm=!1;const uv="window";function I_(t){try{return typeof t=="function"?t():document.querySelector(t)}catch{}}function xU(t){const e=new Set;for(const n of t){if(n===uv)continue;const r=I_(n);r&&e.add(r)}return e}function Zpe(t,e){const n=t.options.scrollRestoration,r=t._scroll;n&&(r.restoring=!0);const s=t.options.getScrollRestorationKey||Kpe,o=new Set,a=u=>{const c=Sc[u]||={};for(const f of o)f===document?c[uv]={scrollX,scrollY}:f.isConnected&&(c[Ype(f)]={scrollX:f.scrollLeft,scrollY:f.scrollTop})};n&&!r.restoration&&(r.restoration=!0,dm=!1,history.scrollRestoration="manual",document.addEventListener("scroll",u=>{dm||o.add(u.target)},!0),t.subscribe("onBeforeLoad",u=>{u.fromLocation&&a(s(u.fromLocation)),o.clear()}),addEventListener("pagehide",()=>{a(s(t.stores.resolvedLocation.get()??t.stores.location.get())),Gpe()})),!r.reset&&(r.reset=!0,t.subscribe("onRendered",u=>{const c=t.options.scrollRestorationBehavior,f=t.options.scrollToTopSelectors,h=r.next,g=r.hash;let m;if(o.clear(),r.next=!0,r.hash=!1,typeof t.options.scrollRestoration=="function"&&!t.options.scrollRestoration({location:t.latestLocation}))return;const y=s(u.toLocation),S=u.fromLocation&&s(u.fromLocation);if(r.restoring&&S&&S!==y){const E=Sc[S];if(E){let C=Sc[y];for(const w in E){if(w===uv){if(h)continue}else{const x=I_(w);if(!x||h&&f&&(m??=xU(f),m.has(x)))continue}C||(C=Sc[y]={}),C[w]??=E[w]}}}dm=!0;try{const E=u.toLocation.hash,C=u.toLocation.state.__hashScrollIntoViewOptions??!0;let w=!1;if(h){!E&&f&&(m??=xU(f));const x=E&&C&&g,T=r.restoring?Sc[y]:void 0;if(T)for(const R in T){const{scrollX:M,scrollY:N}=T[R];if(R===uv){if(x)continue;scrollTo({top:N,left:M,behavior:c}),w=!0}else{const O=I_(R);O&&(O.scrollLeft=M,O.scrollTop=N,m?.delete(O))}}if(!E){const R={top:0,left:0,behavior:c};if(w||scrollTo(R),m)for(const M of m)M.scrollTo(R)}}!w&&E&&C&&document.getElementById(E)?.scrollIntoView(C)}finally{dm=!1}}))}function Xpe(t,e=String){const n=new URLSearchParams;for(const r in t){const s=t[r];s!==void 0&&n.set(r,e(s))}return n.toString()}function Zw(t){return t?t==="false"?!1:t==="true"?!0:+t*0===0&&+t+""===t?+t:t:""}function Qpe(t){const e=new URLSearchParams(t),n=Object.create(null);for(const[r,s]of e.entries()){const o=n[r];o==null?n[r]=Zw(s):Array.isArray(o)?o.push(Zw(s)):n[r]=[o,Zw(s)]}return n}const Jpe=tge(JSON.parse),ege=nge(JSON.stringify,JSON.parse);function tge(t){return e=>{e[0]==="?"&&(e=e.substring(1));const n=Qpe(e);for(const r in n){const s=n[r];if(typeof s=="string")try{n[r]=t(s)}catch{}}return n}}function nge(t,e){const n=typeof e=="function";function r(s){if(typeof s=="object"&&s!==null)try{return t(s)}catch{}else if(n&&typeof s=="string")try{return e(s),t(s)}catch{}return s}return s=>{const o=Xpe(s,r);return o?`?${o}`:""}}const Ul="__root__";function V7(t){if(t.statusCode=t.statusCode||t.code||307,!t._builtLocation&&!t.reloadDocument&&typeof t.href=="string")try{new URL(t.href),t.reloadDocument=!0}catch{}const e=new Headers(t.headers);t.href&&e.get("Location")===null&&e.set("Location",t.href);const n=new Response(null,{status:t.statusCode,headers:e});if(n.options=t,t.throw)throw n;return n}function zr(t){return t instanceof Response&&!!t.options}function rge(t){return{input:({url:e})=>{for(const n of t)e=O_(n,e);return e},output:({url:e})=>{for(let n=t.length-1;n>=0;n--)e=G7(t[n],e);return e}}}function sge(t){const e=q7(t.basepath),n=`/${e}`,r=t.caseSensitive?n:n.toLowerCase(),s=`${r}/`;return{input:({url:o})=>{const a=t.caseSensitive?o.pathname:o.pathname.toLowerCase();return a===r?o.pathname="/":a.startsWith(s)&&(o.pathname=o.pathname.slice(n.length)),o},output:({url:o})=>(o.pathname=lv(["/",e,o.pathname]),o)}}function O_(t,e){const n=t?.input?.({url:e});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return e}function G7(t,e){const n=t?.output?.({url:e});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return e}function oge(t,e){const{createMutableStore:n,createReadonlyStore:r,batch:s,init:o}=e,a=new Map,u=new Map,c=new Map,f=n(t.status),h=n(t.loadedAt),g=n(t.isLoading),m=n(t.isTransitioning),y=n(t.location),S=n(t.resolvedLocation),E=n(t.statusCode),C=n(t.redirect),w=n([]),x=n([]),T=n([]),R=r(()=>Xw(a,w.get())),M=r(()=>Xw(u,x.get())),N=r(()=>Xw(c,T.get())),O=r(()=>w.get()[0]),k=r(()=>w.get().some(te=>a.get(te)?.get().status==="pending")),F=r(()=>({locationHref:y.get().href,resolvedLocationHref:S.get()?.href,status:f.get()})),$=r(()=>({status:f.get(),loadedAt:h.get(),isLoading:g.get(),isTransitioning:m.get(),matches:R.get(),location:y.get(),resolvedLocation:S.get(),statusCode:E.get(),redirect:C.get()})),D=Lh(64);function z(te){let fe=D.get(te);return fe||(fe=r(()=>{const de=w.get();for(const Ae of de){const L=a.get(Ae);if(L&&L.routeId===te)return L.get()}}),D.set(te,fe)),fe}const q={status:f,loadedAt:h,isLoading:g,isTransitioning:m,location:y,resolvedLocation:S,statusCode:E,redirect:C,matchesId:w,pendingIds:x,cachedIds:T,matches:R,pendingMatches:M,cachedMatches:N,firstId:O,hasPending:k,matchRouteDeps:F,matchStores:a,pendingMatchStores:u,cachedMatchStores:c,__store:$,getRouteMatchStore:z,setMatches:K,setPending:Y,setCached:H};K(t.matches),o?.(q);function K(te){Qw(te,a,w,n,s)}function Y(te){Qw(te,u,x,n,s)}function H(te){Qw(te,c,T,n,s)}return q}function Xw(t,e){const n=[];for(const r of e){const s=t.get(r);s&&n.push(s.get())}return n}function Qw(t,e,n,r,s){const o=t.map(u=>u.id),a=new Set(o);s(()=>{for(const u of e.keys())a.has(u)||e.delete(u);for(const u of t){const c=e.get(u.id);if(!c){const f=r(u);f.routeId=u.routeId,e.set(u.id,f);continue}c.routeId=u.routeId,c.get()!==u&&c.set(u)}Ope(n.get(),o)||n.set(o)})}const N_=t=>{if(!t.rendered)return t.rendered=!0,t.onReady?.()},ige=t=>t.stores.matchesId.get().some(e=>t.stores.matchStores.get(e)?.get()._forcePending),bb=(t,e)=>!!(t.preload&&!t.router.stores.matchStores.has(e)),Fl=(t,e,n=!0)=>{const r={...t.router.options.context??{}},s=n?e:e-1;for(let o=0;o<=s;o++){const a=t.matches[o];if(!a)continue;const u=t.router.getMatch(a.id);u&&Object.assign(r,u.__routeContext,u.__beforeLoadContext)}return r},_U=(t,e)=>{if(!t.matches.length)return;const n=e.routeId,r=t.matches.findIndex(a=>a.routeId===t.router.routeTree.id),s=r>=0?r:0;let o=n?t.matches.findIndex(a=>a.routeId===n):t.firstBadMatchIndex??t.matches.length-1;o<0&&(o=s);for(let a=o;a>=0;a--){const u=t.matches[a];if(t.router.looseRoutesById[u.routeId].options.notFoundComponent)return a}return n?o:s},Ia=(t,e,n)=>{if(!(!zr(n)&&!fr(n)))throw zr(n)&&n.redirectHandled&&!n.options.reloadDocument||(e&&(e._nonReactive.beforeLoadPromise?.resolve(),e._nonReactive.loaderPromise?.resolve(),e._nonReactive.beforeLoadPromise=void 0,e._nonReactive.loaderPromise=void 0,e._nonReactive.error=n,t.updateMatch(e.id,r=>({...r,status:zr(n)?"redirected":fr(n)?"notFound":r.status==="pending"?"success":r.status,context:Fl(t,e.index),isFetching:!1,error:n})),fr(n)&&!n.routeId&&(n.routeId=e.routeId),e._nonReactive.loadPromise?.resolve()),zr(n)&&(t.rendered=!0,n.options._fromLocation=t.location,n.redirectHandled=!0,n=t.router.resolveRedirect(n))),n},K7=(t,e)=>{const n=t.router.getMatch(e);return!!(!n||n._nonReactive.dehydrated)},AU=(t,e,n)=>{const r=Fl(t,n);t.updateMatch(e,s=>({...s,context:r}))},jf=(t,e,n)=>{const{id:r,routeId:s}=t.matches[e],o=t.router.looseRoutesById[s];if(n instanceof Promise)throw n;t.firstBadMatchIndex??=e,Ia(t,t.router.getMatch(r),n);try{o.options.onError?.(n)}catch(a){n=a,Ia(t,t.router.getMatch(r),n)}t.updateMatch(r,a=>(a._nonReactive.beforeLoadPromise?.resolve(),a._nonReactive.beforeLoadPromise=void 0,a._nonReactive.loadPromise?.resolve(),{...a,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!t.preload&&!zr(n)&&!fr(n)&&(t.serialError??=n)},Y7=(t,e,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;const s=n.options.pendingMs??t.router.options.defaultPendingMs;if(t.onReady&&!bb(t,e)&&(n.options.loader||n.options.beforeLoad||X7(n))&&typeof s=="number"&&s!==1/0&&(n.options.pendingComponent??t.router.options?.defaultPendingComponent)){const o=setTimeout(()=>{N_(t)},s);r._nonReactive.pendingTimeout=o}},age=(t,e,n)=>{const r=t.router.getMatch(e);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;Y7(t,e,n,r);const s=()=>{const o=t.router.getMatch(e);o.preload&&(o.status==="redirected"||o.status==="notFound")&&Ia(t,o,o.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(s):s()},lge=(t,e,n,r)=>{const s=t.router.getMatch(e);let o=s._nonReactive.loadPromise;s._nonReactive.loadPromise=Vc(()=>{o?.resolve(),o=void 0});const{paramsError:a,searchError:u}=s;a&&jf(t,n,a),u&&jf(t,n,u),Y7(t,e,r,s);const c=new AbortController;let f=!1;const h=()=>{f||(f=!0,t.updateMatch(e,R=>({...R,isFetching:"beforeLoad",fetchCount:R.fetchCount+1,abortController:c})))},g=()=>{s._nonReactive.beforeLoadPromise?.resolve(),s._nonReactive.beforeLoadPromise=void 0,t.updateMatch(e,R=>({...R,isFetching:!1}))};if(!r.options.beforeLoad){t.router.batch(()=>{h(),g()});return}s._nonReactive.beforeLoadPromise=Vc();const m={...Fl(t,n,!1),...s.__routeContext},{search:y,params:S,cause:E}=s,C=bb(t,e),w={search:y,abortController:c,params:S,preload:C,context:m,location:t.location,navigate:R=>t.router.navigate({...R,_fromLocation:t.location}),buildLocation:t.router.buildLocation,cause:C?"preload":E,matches:t.matches,routeId:r.id,...t.router.options.additionalContext},x=R=>{if(R===void 0){t.router.batch(()=>{h(),g()});return}(zr(R)||fr(R))&&(h(),jf(t,n,R)),t.router.batch(()=>{h(),t.updateMatch(e,M=>({...M,__beforeLoadContext:R})),g()})};let T;try{if(T=r.options.beforeLoad(w),Dh(T))return h(),T.catch(R=>{jf(t,n,R)}).then(x)}catch(R){h(),jf(t,n,R)}x(T)},uge=(t,e)=>{const{id:n,routeId:r}=t.matches[e],s=t.router.looseRoutesById[r],o=()=>u(),a=()=>lge(t,n,e,s),u=()=>{if(K7(t,n))return;const c=age(t,n,s);return Dh(c)?c.then(a):a()};return o()},cge=(t,e,n)=>{const r=t.router.getMatch(e);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const s={ssr:t.router.options.ssr,matches:t.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([n.options.head?.(s),n.options.scripts?.(s),n.options.headers?.(s)]).then(([o,a,u])=>({meta:o?.meta,links:o?.links,headScripts:o?.scripts,headers:u,scripts:a,styles:o?.styles}))},Z7=(t,e,n,r,s)=>{const o=e[r-1],{params:a,loaderDeps:u,abortController:c,cause:f}=t.router.getMatch(n),h=Fl(t,r),g=bb(t,n);return{params:a,deps:u,preload:!!g,parentMatchPromise:o,abortController:c,context:h,location:t.location,navigate:m=>t.router.navigate({...m,_fromLocation:t.location}),cause:g?"preload":f,route:s,...t.router.options.additionalContext}},TU=async(t,e,n,r,s)=>{try{const o=t.router.getMatch(n);try{(!(L7??t.router.isServer)||o.ssr===!0)&&Uh(s);const a=s.options.loader,u=typeof a=="function"?a:a?.handler,c=u?.(Z7(t,e,n,r,s)),f=!!u&&Dh(c);if((f||s._lazyPromise||s._componentsPromise||s.options.head||s.options.scripts||s.options.headers||o._nonReactive.minPendingPromise)&&t.updateMatch(n,g=>({...g,isFetching:"loader"})),u){const g=f?await c:c;Ia(t,t.router.getMatch(n),g),g!==void 0&&t.updateMatch(n,m=>({...m,loaderData:g}))}s._lazyPromise&&await s._lazyPromise;const h=o._nonReactive.minPendingPromise;h&&await h,s._componentsPromise&&await s._componentsPromise,t.updateMatch(n,g=>({...g,error:void 0,context:Fl(t,r),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(a){let u=a;if(u?.name==="AbortError"){if(o.abortController.signal.aborted){o._nonReactive.loaderPromise?.resolve(),o._nonReactive.loaderPromise=void 0;return}t.updateMatch(n,f=>({...f,status:f.status==="pending"?"success":f.status,isFetching:!1,context:Fl(t,r)}));return}const c=o._nonReactive.minPendingPromise;c&&await c,fr(a)&&await s.options.notFoundComponent?.preload?.(),Ia(t,t.router.getMatch(n),a);try{s.options.onError?.(a)}catch(f){u=f,Ia(t,t.router.getMatch(n),f)}!zr(u)&&!fr(u)&&await Uh(s,["errorComponent"]),t.updateMatch(n,f=>({...f,error:u,context:Fl(t,r),status:"error",isFetching:!1}))}}catch(o){const a=t.router.getMatch(n);a&&(a._nonReactive.loaderPromise=void 0),Ia(t,a,o)}},dge=async(t,e,n)=>{async function r(y,S,E,C,w){const x=Date.now()-S.updatedAt,T=y?w.options.preloadStaleTime??t.router.options.defaultPreloadStaleTime??3e4:w.options.staleTime??t.router.options.defaultStaleTime??0,R=w.options.shouldReload,M=typeof R=="function"?R(Z7(t,e,s,n,w)):R,{status:N,invalid:O}=C,k=x>=T&&(!!t.forceStaleReload||C.cause==="enter"||E!==void 0&&E!==C.id);a=N==="success"&&(O||(M??k)),y&&w.options.preload===!1||(a&&!t.sync&&h?(u=!0,(async()=>{try{await TU(t,e,s,n,w);const F=t.router.getMatch(s);F._nonReactive.loaderPromise?.resolve(),F._nonReactive.loadPromise?.resolve(),F._nonReactive.loaderPromise=void 0,F._nonReactive.loadPromise=void 0}catch(F){zr(F)&&await t.router.navigate(F.options)}})()):N!=="success"||a?await TU(t,e,s,n,w):AU(t,s,n))}const{id:s,routeId:o}=t.matches[n];let a=!1,u=!1;const c=t.router.looseRoutesById[o],f=c.options.loader,h=((typeof f=="function"?void 0:f?.staleReloadMode)??t.router.options.defaultStaleReloadMode)!=="blocking";if(K7(t,s)){if(!t.router.getMatch(s))return t.matches[n];AU(t,s,n)}else{const y=t.router.getMatch(s),S=t.router.stores.matchesId.get()[n],E=(S&&t.router.stores.matchStores.get(S)||null)?.routeId===o?S:t.router.stores.matches.get().find(w=>w.routeId===o)?.id,C=bb(t,s);if(y._nonReactive.loaderPromise){if(y.status==="success"&&!t.sync&&!y.preload&&h)return y;await y._nonReactive.loaderPromise;const w=t.router.getMatch(s),x=w._nonReactive.error||w.error;x&&Ia(t,w,x),w.status==="pending"&&await r(C,y,E,w,c)}else{const w=C&&!t.router.stores.matchStores.has(s),x=t.router.getMatch(s);x._nonReactive.loaderPromise=Vc(),w!==x.preload&&t.updateMatch(s,T=>({...T,preload:w})),await r(C,y,E,x,c)}}const g=t.router.getMatch(s);u||(g._nonReactive.loaderPromise?.resolve(),g._nonReactive.loadPromise?.resolve(),g._nonReactive.loadPromise=void 0),clearTimeout(g._nonReactive.pendingTimeout),g._nonReactive.pendingTimeout=void 0,u||(g._nonReactive.loaderPromise=void 0),g._nonReactive.dehydrated=void 0;const m=u?g.isFetching:!1;return m!==g.isFetching||g.invalid!==!1?(t.updateMatch(s,y=>({...y,isFetching:m,invalid:!1})),t.router.getMatch(s)):g};async function RU(t){const e=t,n=[];ige(e.router)&&N_(e);let r;for(let m=0;m<e.matches.length;m++){try{const y=uge(e,m);Dh(y)&&await y}catch(y){if(zr(y))throw y;if(fr(y))r=y;else if(!e.preload)throw y;break}if(e.serialError||e.firstBadMatchIndex!=null)break}const s=e.firstBadMatchIndex??e.matches.length,o=r&&!e.preload?_U(e,r):void 0,a=r&&e.preload?0:o!==void 0?Math.min(o+1,s):s;let u,c;for(let m=0;m<a;m++)n.push(dge(e,n,m));try{await Promise.all(n)}catch{const m=await Promise.allSettled(n);for(const y of m){if(y.status!=="rejected")continue;const S=y.reason;if(zr(S))throw S;fr(S)?u??=S:c??=S}if(c!==void 0)throw c}const f=u??(r&&!e.preload?r:void 0);let h=e.firstBadMatchIndex!==void 0?e.firstBadMatchIndex:e.matches.length-1;if(!f&&r&&e.preload)return e.matches;if(f){const m=_U(e,f);m===void 0&&gi();const y=e.matches[m],S=e.router.looseRoutesById[y.routeId],E=e.router.options?.defaultNotFoundComponent;!S.options.notFoundComponent&&E&&(S.options.notFoundComponent=E),f.routeId=y.routeId;const C=y.routeId===e.router.routeTree.id;e.updateMatch(y.id,w=>({...w,...C?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:f},isFetching:!1})),h=m,await Uh(S,["notFoundComponent"])}else if(!e.preload){const m=e.matches[0];m.globalNotFound||e.router.getMatch(m.id)?.globalNotFound&&e.updateMatch(m.id,y=>({...y,globalNotFound:!1,error:void 0}))}if(e.serialError&&e.firstBadMatchIndex!==void 0){const m=e.router.looseRoutesById[e.matches[e.firstBadMatchIndex].routeId];await Uh(m,["errorComponent"])}for(let m=0;m<=h;m++){const{id:y,routeId:S}=e.matches[m],E=e.router.looseRoutesById[S];try{const C=cge(e,y,E);if(C){const w=await C;e.updateMatch(y,x=>({...x,...w}))}}catch(C){console.error(`Error executing head for route ${S}:`,C)}}const g=N_(e);if(Dh(g)&&await g,f)throw f;if(e.serialError&&!e.preload&&!e.onReady)throw e.serialError;return e.matches}function IU(t,e){const n=e.map(r=>t.options[r]?.preload?.()).filter(Boolean);if(n.length!==0)return Promise.all(n)}function Uh(t,e=cv){!t._lazyLoaded&&t._lazyPromise===void 0&&(t.lazyFn?t._lazyPromise=t.lazyFn().then(r=>{const{id:s,...o}=r.options;Object.assign(t.options,o),t._lazyLoaded=!0,t._lazyPromise=void 0}):t._lazyLoaded=!0);const n=()=>t._componentsLoaded?void 0:e===cv?(()=>{if(t._componentsPromise===void 0){const r=IU(t,cv);r?t._componentsPromise=r.then(()=>{t._componentsLoaded=!0,t._componentsPromise=void 0}):t._componentsLoaded=!0}return t._componentsPromise})():IU(t,e);return t._lazyPromise?t._lazyPromise.then(n):n()}function X7(t){for(const e of cv)if(t.options[e]?.preload)return!0;return!1}const cv=["component","errorComponent","pendingComponent","notFoundComponent"];var Ma="__TSR_index",OU="popstate",NU="beforeunload";function fge(t){let e=t.getLocation();const n=new Set,r=a=>{e=t.getLocation(),n.forEach(u=>u({location:e,action:a}))},s=a=>{t.notifyOnIndexChange??!0?r(a):e=t.getLocation()},o=async({task:a,navigateOpts:u,...c})=>{if(u?.ignoreBlocker??!1){a();return}const f=t.getBlockers?.()??[],h=c.type==="PUSH"||c.type==="REPLACE";if(typeof document<"u"&&f.length&&h)for(const g of f){const m=Hv(c.path,c.state);if(await g.blockerFn({currentLocation:e,nextLocation:m,action:c.type})){t.onBlocked?.();return}}a()};return{get location(){return e},get length(){return t.getLength()},subscribers:n,subscribe:a=>(n.add(a),()=>{n.delete(a)}),push:(a,u,c)=>{const f=e.state[Ma];u=MU(f+1,u),o({task:()=>{t.pushState(a,u),r({type:"PUSH"})},navigateOpts:c,type:"PUSH",path:a,state:u})},replace:(a,u,c)=>{const f=e.state[Ma];u=MU(f,u),o({task:()=>{t.replaceState(a,u),r({type:"REPLACE"})},navigateOpts:c,type:"REPLACE",path:a,state:u})},go:(a,u)=>{o({task:()=>{t.go(a),s({type:"GO",index:a})},navigateOpts:u,type:"GO"})},back:a=>{o({task:()=>{t.back(a?.ignoreBlocker??!1),s({type:"BACK"})},navigateOpts:a,type:"BACK"})},forward:a=>{o({task:()=>{t.forward(a?.ignoreBlocker??!1),s({type:"FORWARD"})},navigateOpts:a,type:"FORWARD"})},canGoBack:()=>e.state[Ma]!==0,createHref:a=>t.createHref(a),block:a=>{if(!t.setBlockers)return()=>{};const u=t.getBlockers?.()??[];return t.setBlockers([...u,a]),()=>{const c=t.getBlockers?.()??[];t.setBlockers?.(c.filter(f=>f!==a))}},flush:()=>t.flush?.(),destroy:()=>t.destroy?.(),notify:r}}function MU(t,e){e||(e={});const n=mR();return{...e,key:n,__TSR_key:n,[Ma]:t}}function hge(t){const e=typeof document<"u"?window:void 0,n=e.history.pushState,r=e.history.replaceState;let s=[];const o=()=>s,a=k=>s=k,u=(k=>k),c=(()=>Hv(`${e.location.pathname}${e.location.search}${e.location.hash}`,e.history.state));if(!e.history.state?.__TSR_key&&!e.history.state?.key){const k=mR();e.history.replaceState({[Ma]:0,key:k,__TSR_key:k},"")}let f=c(),h,g=!1,m=!1,y=!1,S=!1;const E=()=>f;let C,w;const x=()=>{C&&(O._ignoreSubscribers=!0,(C.isPush?e.history.pushState:e.history.replaceState)(C.state,"",C.href),O._ignoreSubscribers=!1,C=void 0,w=void 0,h=void 0)},T=(k,F,$)=>{const D=u(F);w||(h=f),f=Hv(F,$),C={href:D,state:$,isPush:C?.isPush||k==="push"},w||(w=Promise.resolve().then(()=>x()))},R=k=>{f=c(),O.notify({type:k})},M=async()=>{if(m){m=!1;return}const k=c(),F=k.state[Ma]-f.state[Ma],$=F===1,D=F===-1,z=!$&&!D||g;g=!1;const q=z?"GO":D?"BACK":"FORWARD",K=z?{type:"GO",index:F}:{type:D?"BACK":"FORWARD"};if(y)y=!1;else{const Y=o();if(typeof document<"u"&&Y.length){for(const H of Y)if(await H.blockerFn({currentLocation:f,nextLocation:k,action:q})){m=!0,e.history.go(1),O.notify(K);return}}}f=c(),O.notify(K)},N=k=>{if(S){S=!1;return}let F=!1;const $=o();if(typeof document<"u"&&$.length)for(const D of $){const z=D.enableBeforeUnload??!0;if(z===!0){F=!0;break}if(typeof z=="function"&&z()===!0){F=!0;break}}if(F)return k.preventDefault(),k.returnValue=""},O=fge({getLocation:E,getLength:()=>e.history.length,pushState:(k,F)=>T("push",k,F),replaceState:(k,F)=>T("replace",k,F),back:k=>(k&&(y=!0),S=!0,e.history.back()),forward:k=>{k&&(y=!0),S=!0,e.history.forward()},go:k=>{g=!0,e.history.go(k)},createHref:k=>u(k),flush:x,destroy:()=>{e.history.pushState=n,e.history.replaceState=r,e.removeEventListener(NU,N,{capture:!0}),e.removeEventListener(OU,M)},onBlocked:()=>{h&&f!==h&&(f=h)},getBlockers:o,setBlockers:a,notifyOnIndexChange:!1});return e.addEventListener(NU,N,{capture:!0}),e.addEventListener(OU,M),e.history.pushState=function(...k){const F=n.apply(e.history,k);return O._ignoreSubscribers||R("PUSH"),F},e.history.replaceState=function(...k){const F=r.apply(e.history,k);return O._ignoreSubscribers||R("REPLACE"),F},O}function pge(t){let e=t.replace(/[\x00-\x1f\x7f]/g,"");return e.startsWith("//")&&(e="/"+e.replace(/^\/+/,"")),e}function Hv(t,e){const n=pge(t),r=n.indexOf("#"),s=n.indexOf("?"),o=mR();return{href:n,pathname:n.substring(0,r>0?s>0?Math.min(r,s):r:s>0?s:n.length),hash:r>-1?n.substring(r):"",search:s>-1?n.slice(s,r===-1?void 0:r):"",state:e||{[Ma]:0,key:o,__TSR_key:o}}}function mR(){return(Math.random()+1).toString(36).substring(7)}function Fc(t,e){const n=e,r=t;return{fromLocation:n,toLocation:r,pathChanged:n?.pathname!==r.pathname,hrefChanged:n?.href!==r.href,hashChanged:n?.hash!==r.hash}}var gge=class{constructor(t,e){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.routeBranchCache=new WeakMap,this.lightweightCache=new WeakMap,this.startTransition=n=>n(),this.update=n=>{const r=this.options,s=this.basepath??r?.basepath??"/",o=this.basepath===void 0,a=r?.rewrite;if(this.options={...r,...n},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=$pe(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=hge()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let h;this.resolvePathCache=Lh(1e3),h=this.buildRouteTree(),this.setRoutes(h)}if(!this.stores&&this.latestLocation){const h=this.getStoreConfig(this);this.batch=h.batch,this.stores=oge(vge(this.latestLocation),h),Zpe(this)}let u=!1;const c=this.options.basepath??"/",f=this.options.rewrite;if(o||s!==c||a!==f){this.basepath=c;const h=[],g=q7(c);g&&g!=="/"&&h.push(sge({basepath:c})),f&&h.push(f),this.rewrite=h.length===0?void 0:h.length===1?h[0]:rge(h),this.history&&this.updateLatestLocation(),u=!0}u&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a))"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const n=Upe(this.routeTree,this.options.caseSensitive,(r,s)=>{r.init({originalIndex:s})});return this.options.routeMasks&&Mpe(this.options.routeMasks,n.processedTree),n},this.subscribe=(n,r)=>{const s={eventType:n,fn:r};return this.subscribers.add(s),()=>{this.subscribers.delete(s)}},this.emit=n=>{this.subscribers.forEach(r=>{r.eventType===n.type&&r.fn(n)})},this.parseLocation=(n,r)=>{const s=({pathname:c,search:f,hash:h,href:g,state:m})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(c)){const w=this.options.parseSearch(f),x=this.options.stringifySearch(w);return{href:c+x+h,publicHref:c+x+h,pathname:zf(c).path,external:!1,searchStr:x,search:Sl(r?.search,w),hash:zf(h.slice(1)).path,state:Rl(r?.state,m)}}const y=new URL(g,this.origin),S=O_(this.rewrite,y),E=this.options.parseSearch(S.search),C=this.options.stringifySearch(E);return S.search=C,{href:S.href.replace(S.origin,""),publicHref:g,pathname:zf(S.pathname).path,external:!!this.rewrite&&S.origin!==this.origin,searchStr:C,search:Sl(r?.search,E),hash:zf(S.hash.slice(1)).path,state:Rl(r?.state,m)}},o=s(n),{__tempLocation:a,__tempKey:u}=o.state;if(a&&(!u||u===this.tempLocationKey)){const c=s(a);return c.state.key=o.state.key,c.state.__TSR_key=o.state.__TSR_key,delete c.state.__tempLocation,{...c,maskedLocation:o}}return o},this.resolvePathWithBase=(n,r)=>Hpe({base:n,to:r.includes("//")?gR(r):r,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,r,s)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:r},s):this.matchRoutesInternal(n,r),this.getMatchedRoutes=n=>yge({pathname:n,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=n=>{const r=this.getMatch(n);r&&(r.abortController.abort(),clearTimeout(r._nonReactive.pendingTimeout),r._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(n=>{this.cancelMatch(n)}),this.stores.matchesId.get().forEach(n=>{if(this.stores.pendingMatchStores.has(n))return;const r=this.stores.matchStores.get(n)?.get();r&&(r.status==="pending"||r.isFetching==="loader")&&this.cancelMatch(n)})},this.buildLocation=n=>{const r=(o={})=>{const a=o._fromLocation||this.pendingBuiltLocation||this.latestLocation,u=this.matchRoutesLightweight(a);o.from;const c=o.unsafeRelative==="path"?a.pathname:o.from??u.fullPath,f=o.to?`${o.to}`:void 0,h=u.search,g=Object.assign(Object.create(null),u.params),m=f?.charCodeAt(0)===47?"/":this.resolvePathWithBase(c,"."),y=f?this.resolvePathWithBase(m,f):m,S=o.params===!1||o.params===null?Object.create(null):(o.params??!0)===!0?g:Object.assign(g,Tl(o.params,g)),E=this.routesByPath[hi(y)];let C;if(E)C=this.getRouteBranch(E);else if(y.includes("$"))C=[];else{const D=this.getMatchedRoutes(y);C=D.matchedRoutes,this.options.notFoundRoute&&(!D.foundRoute||D.foundRoute.path!=="/"&&D.routeParams["**"])&&(C=[...C,this.options.notFoundRoute])}if(C.length&&F7(S))for(const D of C){const z=D.options.params?.stringify??D.options.stringifyParams;if(z)try{Object.assign(S,z(S))}catch{}}const w=n.leaveParams?y:zf(EU({path:y,params:S,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let x=h;if(n._includeValidateSearch&&this.options.search?.strict){const D={};C.forEach(z=>{if(z.options.validateSearch)try{Object.assign(D,dv(z.options.validateSearch,{...D,...x}))}catch{}}),x=D}x=bge({search:x,dest:o,destRoutes:C,_includeValidateSearch:n._includeValidateSearch}),x=Sl(h,x);const T=this.options.stringifySearch(x),R=o.hash===!0?a.hash:o.hash?Tl(o.hash,a.hash):void 0,M=R?`#${R}`:"";let N=o.state===!0?a.state:o.state?Tl(o.state,a.state):{};N=Rl(a.state,N);const O=`${w}${T}${M}`;let k,F,$=!1;if(this.rewrite){const D=new URL(O,this.origin),z=G7(this.rewrite,D);k=D.href.replace(D.origin,""),z.origin!==this.origin?(F=z.href,$=!0):F=z.pathname+z.search+z.hash}else k=Ipe(O),F=k;return{publicHref:F,href:k,pathname:w,search:x,searchStr:T,state:N,hash:R??"",external:$,unmaskOnReload:o.unmaskOnReload}},s=(o={},a)=>{const u=r(o);let c=a?r(a):void 0;if(!c){const f=Object.create(null);if(this.options.routeMasks){const h=Ppe(u.pathname,this.processedTree);if(h){Object.assign(f,h.rawParams);const{from:g,params:m,...y}=h.route,S=m===!1||m===null?Object.create(null):(m??!0)===!0?f:Object.assign(f,Tl(m,f));a={from:n.from,...y,params:S},c=r(a)}}}return c&&(u.maskedLocation=c),u};return n.mask?s(n,{from:n.from,...n.mask}):s(n)},this.commitLocation=async({viewTransition:n,ignoreBlocker:r,...s})=>{let o;const a=()=>{const f=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];f.forEach(g=>{s.state[g]=this.latestLocation.state[g]});const h=Ll(s.state,this.latestLocation.state);return f.forEach(g=>{delete s.state[g]}),h},u=hi(this.latestLocation.href)===hi(s.href);let c=this.commitLocationPromise;if(this.commitLocationPromise=Vc(()=>{c?.resolve(),c=void 0}),u&&a())this.load();else{let{maskedLocation:f,hashScrollIntoView:h,...g}=s;f&&(g={...f,state:{...f.state,__tempKey:void 0,__tempLocation:{...g,search:g.searchStr,state:{...g.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(g.unmaskOnReload??this.options.unmaskOnReload??!1)&&(g.state.__tempKey=this.tempLocationKey)),g.state.__hashScrollIntoViewOptions=h??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,o=s.replace?"REPLACE":"PUSH",this.history[o==="REPLACE"?"replace":"push"](g.publicHref,g.state,{ignoreBlocker:r})}return this._scroll.next=s.resetScroll??!0,this.history.subscribers.size||this.load(o?{action:{type:o}}:void 0),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:r,hashScrollIntoView:s,viewTransition:o,ignoreBlocker:a,href:u,...c}={})=>{if(u){const g=this.history.location.state.__TSR_index,m=Hv(u,{__TSR_index:n?g:g+1}),y=new URL(m.pathname,this.origin);c.to=O_(this.rewrite,y).pathname,c.search=this.options.parseSearch(m.search),c.hash=m.hash.slice(1)}const f=this.buildLocation({...c,_includeValidateSearch:!0});this.pendingBuiltLocation=f;const h=this.commitLocation({...f,viewTransition:o,replace:n,resetScroll:r,hashScrollIntoView:s,ignoreBlocker:a});return queueMicrotask(()=>{this.pendingBuiltLocation===f&&(this.pendingBuiltLocation=void 0)}),h},this.navigate=async({to:n,reloadDocument:r,href:s,publicHref:o,...a})=>{let u=!1;if(s)try{new URL(`${s}`),u=!0}catch{}if(u&&!r&&(r=!0),r){if(n!==void 0||!s){const f=this.buildLocation({to:n,...a});s=s??f.publicHref,o=o??f.publicHref}const c=!u&&o?o:s;if(jv(c,this.protocolAllowlist))return;if(!a.ignoreBlocker){const f=this.history.getBlockers?.()??[];for(const h of f)if(h?.blockerFn&&await h.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return}a.replace?window.location.replace(c):window.location.href=c;return}return this.buildAndCommitLocation({...a,href:s,to:n,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const n=this.matchRoutes(this.latestLocation),r=this.stores.cachedMatches.get().filter(s=>!n.some(o=>o.id===s.id));this.batch(()=>{this.stores.status.set("pending"),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(n),this.stores.setCached(r)})},this.load=async n=>{const r=n?.action?.type;let s,o,a;const u=this.stores.resolvedLocation.get()??this.stores.location.get();for(a=new Promise(f=>{this.startTransition(async()=>{try{this.beforeLoad(),r&&(this._scroll.hash=r==="PUSH"||r==="REPLACE");const h=this.latestLocation,g=Fc(h,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...g}),this.emit({type:"onBeforeLoad",...g}),await RU({router:this,sync:n?.sync,forceStaleReload:u.href===h.href,matches:this.stores.pendingMatches.get(),location:h,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let m=null,y=null,S=null,E=null;this.batch(()=>{const C=this.stores.pendingMatches.get(),w=C.length,x=this.stores.matches.get();m=w?x.filter(M=>!this.stores.pendingMatchStores.has(M.id)):null;const T=new Set;for(const M of this.stores.pendingMatchStores.values())M.routeId&&T.add(M.routeId);const R=new Set;for(const M of this.stores.matchStores.values())M.routeId&&R.add(M.routeId);y=w?x.filter(M=>!T.has(M.routeId)):null,S=w?C.filter(M=>!R.has(M.routeId)):null,E=w?C.filter(M=>R.has(M.routeId)):x,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),w&&(this.stores.setMatches(C),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...m.filter(M=>M.status!=="error"&&M.status!=="notFound"&&M.status!=="redirected")]),this.clearExpiredCache())});for(const[C,w]of[[y,"onLeave"],[S,"onEnter"],[E,"onStay"]])if(C)for(const x of C)this.looseRoutesById[x.routeId].options[w]?.(x)})})}})}catch(h){zr(h)?(s=h,this.navigate({...s.options,replace:!0,ignoreBlocker:!0})):fr(h)&&(o=h);const g=s?s.status:o?404:this.stores.matches.get().some(m=>m.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(g),this.stores.redirect.set(s)})}this.latestLoadPromise===a&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),f()})}),this.latestLoadPromise=a,await a;this.latestLoadPromise&&a!==this.latestLoadPromise;)await this.latestLoadPromise;let c;this.hasNotFoundMatch()?c=404:this.stores.matches.get().some(f=>f.status==="error")&&(c=500),c!==void 0&&this.stores.statusCode.set(c)},this.startViewTransition=n=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let s;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const o=this.latestLocation,a=this.stores.resolvedLocation.get(),u=typeof r.types=="function"?r.types(Fc(o,a)):r.types;if(u===!1){n();return}s={update:n,types:u}}else s=n;document.startViewTransition(s)}else n()},this.updateMatch=(n,r)=>{this.startTransition(()=>{const s=this.stores.pendingMatchStores.get(n);if(s){s.set(r);return}const o=this.stores.matchStores.get(n);if(o){o.set(r);return}const a=this.stores.cachedMatchStores.get(n);if(a){const u=r(a.get());u.status==="redirected"?this.stores.cachedMatchStores.delete(n)&&this.stores.cachedIds.set(c=>c.filter(f=>f!==n)):a.set(u)}})},this.getMatch=n=>this.stores.cachedMatchStores.get(n)?.get()??this.stores.pendingMatchStores.get(n)?.get()??this.stores.matchStores.get(n)?.get(),this.invalidate=n=>{const r=s=>n?.filter?.(s)??!0?{...s,invalid:!0,...n?.forcePending||s.status==="error"||s.status==="notFound"?{status:"pending",error:void 0}:void 0}:s;return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(r)),this.stores.setCached(this.stores.cachedMatches.get().map(r)),this.stores.setPending(this.stores.pendingMatches.get().map(r))}),this.shouldViewTransition=!1,this.load({sync:n?.sync})},this.getParsedLocationHref=n=>n.publicHref||"/",this.resolveRedirect=n=>{const r=n.headers.get("Location");if(!n.options.href||n.options._builtLocation){const s=n.options._builtLocation??this.buildLocation(n.options),o=this.getParsedLocationHref(s);n.options.href=o,n.headers.set("Location",o)}else if(r)try{const s=new URL(r);if(this.origin&&s.origin===this.origin){const o=s.pathname+s.search+s.hash;n.options.href=o,n.headers.set("Location",o)}}catch{}if(n.options.href&&!n.options._builtLocation&&jv(n.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const r=n?.filter;r!==void 0?this.stores.setCached(this.stores.cachedMatches.get().filter(s=>!r(s))):this.stores.setCached([])},this.clearExpiredCache=()=>{const n=Date.now(),r=s=>{const o=this.looseRoutesById[s.routeId];if(!o.options.loader)return!0;const a=(s.preload?o.options.preloadGcTime??this.options.defaultPreloadGcTime:o.options.gcTime??this.options.defaultGcTime)??300*1e3;return s.status==="error"?!0:n-s.updatedAt>=a};this.clearCache({filter:r})},this.loadRouteChunk=Uh,this.preloadRoute=async n=>{const r=n._builtLocation??this.buildLocation(n);let s=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:n});const o=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),a=new Set([...o,...this.stores.cachedIds.get()]),u=s.filter(c=>!a.has(c.id));if(u.length){const c=this.stores.cachedMatches.get();this.stores.setCached([...c,...u])}try{return s=await RU({router:this,matches:s,location:r,preload:!0,updateMatch:(c,f)=>{o.has(c)?s=s.map(h=>h.id===c?f(h):h):this.updateMatch(c,f)}}),s}catch(c){if(zr(c))return c.options.reloadDocument?void 0:await this.preloadRoute({...c.options,_fromLocation:r});fr(c)||console.error(c);return}},this.matchRoute=(n,r)=>{const s={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},o=this.buildLocation(s);if(r?.pending&&this.stores.status.get()!=="pending")return!1;const a=(r?.pending===void 0?!this.stores.isLoading.get():r.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),u=kpe(o.pathname,r?.caseSensitive??!1,r?.fuzzy??!1,a.pathname,this.processedTree);return!u||n.params&&!Ll(u.rawParams,n.params,{partial:!0})?!1:r?.includeSearch??!0?Ll(a.search,o.search,{partial:!0})?u.rawParams:!1:u.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(n=>n.status==="notFound"||n.globalNotFound),this.getStoreConfig=e,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??ege,parseSearch:t.parseSearch??Jpe,protocolAllowlist:t.protocolAllowlist??Rpe}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:t,routesByPath:e,processedTree:n}){this.routesById=t,this.routesByPath=e,this.processedTree=n;const r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}getRouteBranch(t){let e=this.routeBranchCache.get(t);return e||(e=H7(t),this.routeBranchCache.set(t,e)),e}get looseRoutesById(){return this.routesById}getParentContext(t){return t?.id?t.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(t,e){const n=this.getMatchedRoutes(t.pathname),{foundRoute:r,routeParams:s}=n;let{matchedRoutes:o}=n,a=!1;(r?r.path!=="/"&&s["**"]:hi(t.pathname))&&(this.options.notFoundRoute?o=[...o,this.options.notFoundRoute]:a=!0);const u=a?Ege(this.options.notFoundMode,o):void 0,c=new Array(o.length),f=new Map;for(const h of this.stores.matchStores.values())h.routeId&&f.set(h.routeId,h.get());for(let h=0;h<o.length;h++){const g=o[h],m=c[h-1];let y,S,E;{const z=m?.search??t.search,q=m?._strictSearch??void 0;try{const K=dv(g.options.validateSearch,{...z})??void 0;y={...z,...K},S={...q,...K},E=void 0}catch(K){let Y=K;if(K instanceof $v||(Y=new $v(K.message,{cause:K})),e?.throwOnError)throw Y;y=z,S={},E=Y}}const C=g.options.loaderDeps?.({search:y})??"",w=C?JSON.stringify(C):"",{interpolatedPath:x,usedParams:T}=EU({path:g.fullPath,params:s,decoder:this.pathParamsDecoder,server:this.isServer}),R=g.id+x+w,M=this.getMatch(R),N=f.get(g.id),O=M?._strictParams??T;let k;if(!M)try{PU(g,O)}catch(z){if(fr(z)||zr(z)?k=z:k=new mge(z.message,{cause:z}),e?.throwOnError)throw k}Object.assign(s,O);const F=N?"stay":"enter";let $;if(M)$={...M,cause:F,params:N?.params??s,_strictParams:O,search:Sl(N?N.search:M.search,y),_strictSearch:S};else{const z=g.options.loader||g.options.beforeLoad||g.lazyFn||X7(g)?"pending":"success";$={id:R,ssr:g.options.ssr,index:h,routeId:g.id,params:N?.params??s,_strictParams:O,pathname:x,updatedAt:Date.now(),search:N?Sl(N.search,y):y,_strictSearch:S,searchError:void 0,status:z,isFetching:!1,error:void 0,paramsError:k,__routeContext:void 0,_nonReactive:{loadPromise:Vc()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:F,loaderDeps:N?Rl(N.loaderDeps,C):C,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:g.options.staticData||{},fullPath:g.fullPath}}e?.preload||($.globalNotFound=u===g.id),$.searchError=E;const D=this.getParentContext(m);$.context={...D,...$.__routeContext,...$.__beforeLoadContext},c[h]=$}for(let h=0;h<c.length;h++){const g=c[h],m=this.looseRoutesById[g.routeId],y=this.getMatch(g.id),S=f.get(g.routeId);if(g.params=S?Sl(S.params,s):s,!y){const E=c[h-1],C=this.getParentContext(E);if(m.options.context){const w={deps:g.loaderDeps,params:g.params,context:C??{},location:t,navigate:x=>this.navigate({...x,_fromLocation:t}),buildLocation:this.buildLocation,cause:g.cause,abortController:g.abortController,preload:!!g.preload,matches:c,routeId:m.id};g.__routeContext=m.options.context(w)??void 0}g.context={...C,...g.__routeContext,...g.__beforeLoadContext}}}return c}matchRoutesLightweight(t){const e=kh(this.stores.matchesId.get()),n=this.lightweightCache.get(t);if(n&&n[0]===e)return n[1];const{matchedRoutes:r,routeParams:s}=this.getMatchedRoutes(t.pathname),o=kh(r),a={...t.search};for(const g of r)try{Object.assign(a,dv(g.options.validateSearch,a))}catch{}const u=e&&this.stores.matchStores.get(e)?.get(),c=u&&u.routeId===o.id&&u.pathname===t.pathname;let f;if(c)f=u.params;else{const g=Object.assign(Object.create(null),s);for(const m of r)try{PU(m,g)}catch{}f=g}const h={matchedRoutes:r,fullPath:o.fullPath,search:a,params:f};return this.lightweightCache.set(t,[e,h]),h}},$v=class extends Error{},mge=class extends Error{};function vge(t){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:t,matches:[],statusCode:200}}function dv(t,e){if(t==null)return{};if("~standard"in t){const n=t["~standard"].validate(e);if(n instanceof Promise)throw new $v("Async validation not supported");if(n.issues)throw new $v(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in t?t.parse(e):typeof t=="function"?t(e):{}}function yge({pathname:t,routesById:e,processedTree:n}){const r=Object.create(null),s=hi(t);let o;const a=Dpe(s,n,!0);return a&&(o=a.route,Object.assign(r,a.rawParams)),{matchedRoutes:a?.branch||[e.__root__],routeParams:r,foundRoute:o}}function bge({search:t,dest:e,destRoutes:n,_includeValidateSearch:r}){return Sge(n)(t,e,r??!1)}function Sge(t){let e,n;const r=[];for(const o of t){const a=o.options;if("search"in a)a.search?.middlewares&&r.push(...a.search.middlewares);else if(a.preSearchFilters||a.postSearchFilters){const c=({search:f,next:h})=>{const g=h(a.preSearchFilters?a.preSearchFilters.reduce((m,y)=>y(m),f):f);return a.postSearchFilters?a.postSearchFilters.reduce((m,y)=>y(m),g):g};r.push(c)}const u=a.validateSearch;if(u){const c=({search:f,next:h,meta:g})=>{const m=h(f);if(n)try{const y=dv(u,m);if(g&&y)for(const S in y)S in m||(g.defaulted||=new Map).set(S,y[S]);return{...m,...y}}catch{}return m};r.push(c)}}const s=(o,a,u)=>{if(o>=r.length){if(!e.search)return{};if(e.search===!0)return a;const f=Tl(e.search,a);return u&&(u.explicit=f),f}const c=(f,h)=>{if(h){const g=u||{};return{search:s(o+1,f,g),meta:g}}return s(o+1,f,u)};return r[o]({search:a,next:c,meta:u})};return function(a,u,c){return e=u,n=c,s(0,a)}}function Ege(t,e){if(t!=="root")for(let n=e.length-1;n>=0;n--){const r=e[n];if(r.children)return r.id}return Ul}function PU(t,e){const n=t.options.params?.parse??t.options.parseParams;if(n){const r=n(e);if(r===!1)throw new Error("Route params.parse returned false for a matched route");Object.assign(e,r)}}const Cge="Error preloading route! ☝️";var Q7=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(t){if(this.init=e=>{this.originalIndex=e.originalIndex;const n=this.options,r=!n?.path&&!n?.id;this.parentRoute=this.options.getParentRoute?.(),r?this._path=Ul:this.parentRoute||gi();let s=r?Ul:n?.path;s&&s!=="/"&&(s=$7(s));const o=n?.id||s;let a=r?Ul:lv([this.parentRoute.id==="__root__"?"":this.parentRoute.id,o]);s==="__root__"&&(s="/"),a!=="__root__"&&(a=lv(["/",a]));const u=a==="__root__"?"/":lv([this.parentRoute.fullPath,s]);this._path=s,this._id=a,this._fullPath=u,this._to=hi(u)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e=="object"&&e!==null&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>V7({from:this.fullPath,...e}),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}},wge=class extends Q7{constructor(t){super(t)}};function vR(t){const e=t.errorComponent??yR;return I.jsx(xge,{getResetKey:t.getResetKey,onCatch:t.onCatch,children:({error:n,reset:r})=>n?A.createElement(e,{error:n,reset:r}):t.children})}var xge=class extends A.Component{constructor(...t){super(...t),this.state={error:null}}static getDerivedStateFromProps(t,e){const n=t.getResetKey();return e.error&&e.resetKey!==n?{resetKey:n,error:null}:{resetKey:n}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidCatch(t,e){this.props.onCatch&&this.props.onCatch(t,e)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function yR({error:t}){const[e,n]=A.useState(!1);return I.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[I.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[I.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),I.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(r=>!r),children:e?"Hide Error":"Show Error"})]}),I.jsx("div",{style:{height:".25rem"}}),e?I.jsx("div",{children:I.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:t.message?I.jsx("code",{children:t.message}):null})}):null]})}function _ge({children:t,fallback:e=null}){return J7()?I.jsx(j.Fragment,{children:t}):I.jsx(j.Fragment,{children:e})}function J7(){return j.useSyncExternalStore(Age,()=>!0,()=>!1)}function Age(){return()=>{}}var ez=A.createContext(null);function fs(t){return A.useContext(ez)}var Sb=A.createContext(void 0),Tge=A.createContext(void 0),sn=(t=>(t[t.None=0]="None",t[t.Mutable=1]="Mutable",t[t.Watching=2]="Watching",t[t.RecursedCheck=4]="RecursedCheck",t[t.Recursed=8]="Recursed",t[t.Dirty=16]="Dirty",t[t.Pending=32]="Pending",t))(sn||{});function Rge({update:t,notify:e,unwatched:n}){return{link:r,unlink:s,propagate:o,checkDirty:a,shallowPropagate:u};function r(f,h,g){const m=h.depsTail;if(m!==void 0&&m.dep===f)return;const y=m!==void 0?m.nextDep:h.deps;if(y!==void 0&&y.dep===f){y.version=g,h.depsTail=y;return}const S=f.subsTail;if(S!==void 0&&S.version===g&&S.sub===h)return;const E=h.depsTail=f.subsTail={version:g,dep:f,sub:h,prevDep:m,nextDep:y,prevSub:S,nextSub:void 0};y!==void 0&&(y.prevDep=E),m!==void 0?m.nextDep=E:h.deps=E,S!==void 0?S.nextSub=E:f.subs=E}function s(f,h=f.sub){const g=f.dep,m=f.prevDep,y=f.nextDep,S=f.nextSub,E=f.prevSub;return y!==void 0?y.prevDep=m:h.depsTail=m,m!==void 0?m.nextDep=y:h.deps=y,S!==void 0?S.prevSub=E:g.subsTail=E,E!==void 0?E.nextSub=S:(g.subs=S)===void 0&&n(g),y}function o(f){let h=f.nextSub,g;e:do{const m=f.sub;let y=m.flags;if(y&60?y&12?y&4?!(y&48)&&c(f,m)?(m.flags=y|40,y&=1):y=0:m.flags=y&-9|32:y=0:m.flags=y|32,y&2&&e(m),y&1){const S=m.subs;if(S!==void 0){const E=(f=S).nextSub;E!==void 0&&(g={value:h,prev:g},h=E);continue}}if((f=h)!==void 0){h=f.nextSub;continue}for(;g!==void 0;)if(f=g.value,g=g.prev,f!==void 0){h=f.nextSub;continue e}break}while(!0)}function a(f,h){let g,m=0,y=!1;e:do{const S=f.dep,E=S.flags;if(h.flags&16)y=!0;else if((E&17)===17){if(t(S)){const C=S.subs;C.nextSub!==void 0&&u(C),y=!0}}else if((E&33)===33){(f.nextSub!==void 0||f.prevSub!==void 0)&&(g={value:f,prev:g}),f=S.deps,h=S,++m;continue}if(!y){const C=f.nextDep;if(C!==void 0){f=C;continue}}for(;m--;){const C=h.subs,w=C.nextSub!==void 0;if(w?(f=g.value,g=g.prev):f=C,y){if(t(h)){w&&u(C),h=f.sub;continue}y=!1}else h.flags&=-33;h=f.sub;const x=f.nextDep;if(x!==void 0){f=x;continue e}}return y}while(!0)}function u(f){do{const h=f.sub,g=h.flags;(g&48)===32&&(h.flags=g|16,(g&6)===2&&e(h))}while((f=f.nextSub)!==void 0)}function c(f,h){let g=h.depsTail;for(;g!==void 0;){if(g===f)return!0;g=g.prevDep}return!1}}function Ige(t,e,n){const r=typeof t=="object",s=r?t:void 0;return{next:(r?t.next:t)?.bind(s),error:(r?t.error:e)?.bind(s),complete:(r?t.complete:n)?.bind(s)}}const M_=[];let fv=0;const{link:kU,unlink:Oge,propagate:Nge,checkDirty:tz,shallowPropagate:DU}=Rge({update(t){return t._update()},notify(t){M_[P_++]=t,t.flags&=~sn.Watching},unwatched(t){t.depsTail!==void 0&&(t.depsTail=void 0,t.flags=sn.Mutable|sn.Dirty,qv(t))}});let fm=0,P_=0,Eo,k_=0;function nz(t){try{++k_,t()}finally{--k_||rz()}}function qv(t){const e=t.depsTail;let n=e!==void 0?e.nextDep:t.deps;for(;n!==void 0;)n=Oge(n,t)}function rz(){if(!(k_>0)){for(;fm<P_;){const t=M_[fm];M_[fm++]=void 0,t.notify()}fm=0,P_=0}}function LU(t,e){const n=typeof t=="function",r=t,s={_snapshot:n?void 0:t,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?sn.None:sn.Mutable,get(){return Eo!==void 0&&kU(s,Eo,fv),s._snapshot},subscribe(o){const a=Ige(o),u={current:!1},c=Mge(()=>{s.get(),u.current?a.next?.(s._snapshot):u.current=!0});return{unsubscribe:()=>{c.stop()}}},_update(o){const a=Eo,u=e?.compare??Object.is;if(n)Eo=s,++fv,s.depsTail=void 0;else if(o===void 0)return!1;n&&(s.flags=sn.Mutable|sn.RecursedCheck);try{const c=s._snapshot,f=typeof o=="function"?o(c):o===void 0&&n?r(c):o;return c===void 0||!u(c,f)?(s._snapshot=f,!0):!1}finally{Eo=a,n&&(s.flags&=~sn.RecursedCheck),qv(s)}}};return n?(s.flags=sn.Mutable|sn.Dirty,s.get=function(){const o=s.flags;if(o&sn.Dirty||o&sn.Pending&&tz(s.deps,s)){if(s._update()){const a=s.subs;a!==void 0&&DU(a)}}else o&sn.Pending&&(s.flags=o&~sn.Pending);return Eo!==void 0&&kU(s,Eo,fv),s._snapshot}):s.set=function(o){if(s._update(o)){const a=s.subs;a!==void 0&&(Nge(a),DU(a),rz())}},s}function Mge(t){const e=()=>{const r=Eo;Eo=n,++fv,n.depsTail=void 0,n.flags=sn.Watching|sn.RecursedCheck;try{return t()}finally{Eo=r,n.flags&=~sn.RecursedCheck,qv(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:sn.Watching|sn.RecursedCheck,notify(){const r=this.flags;r&sn.Dirty||r&sn.Pending&&tz(this.deps,this)?e():this.flags=sn.Watching},stop(){this.flags=sn.None,this.depsTail=void 0,qv(this)}};return e(),n}function Pge(t,e){return t===e}function Wr(t,e,n=Pge){const r=A.useCallback(a=>{if(!t)return()=>{};const{unsubscribe:u}=t.subscribe(a);return u},[t]),s=A.useCallback(()=>t?.get(),[t]);return xT.useSyncExternalStoreWithSelector(r,s,s,e,n)}var Jw={get(){},subscribe(){return{unsubscribe(){}}}};function kge(t,e){const n=A.useRef();return r=>{const s=t?.select?t.select(r):r;return t?.structuralSharing??e.options.defaultStructuralSharing?n.current=Rl(n.current,s):s}}function fu(t){const e=fs(),n=A.useContext(t.from?Tge:Sb),r=t.from?e.stores.getRouteMatchStore(t.from):e.stores.matchStores.get(n),s=kge(t,e),o=Wr(r??Jw,a=>a?s(a):Jw);if(o!==Jw)return o;(t.shouldThrow??!0)&&gi()}function sz(t){return fu({from:t.from,strict:t.strict,structuralSharing:t.structuralSharing,select:e=>t.select?t.select(e.loaderData):e.loaderData})}function oz(t){const{select:e,...n}=t;return fu({...n,select:r=>e?e(r.loaderDeps):r.loaderDeps})}function iz(t){return fu({from:t.from,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,strict:t.strict,select:e=>{const n=t.strict===!1?e.params:e._strictParams;return t.select?t.select(n):n}})}function az(t){return fu({from:t.from,strict:t.strict,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,select:e=>t.select?t.select(e.search):e.search})}function bR(t){const e=fs();return A.useCallback(n=>e.navigate({...n,from:n.from??t?.from}),[t?.from,e])}function wRe(t){const e=fs(),n=bR(),r=A.useRef(null);return Rc(()=>{r.current!==t&&(n(t),r.current=t)},[e,t,n]),null}function lz(t){return fu({...t,select:e=>t.select?t.select(e.context):e.context})}function Dge(t,e){const n=fs(),r=Cpe(e),{activeProps:s,inactiveProps:o,activeOptions:a,to:u,preload:c,preloadDelay:f,preloadIntentProximity:h,hashScrollIntoView:g,replace:m,startTransition:y,resetScroll:S,viewTransition:E,children:C,target:w,disabled:x,style:T,className:R,onClick:M,onBlur:N,onFocus:O,onMouseEnter:k,onMouseLeave:F,onTouchStart:$,ignoreBlocker:D,params:z,search:q,hash:K,state:Y,mask:H,reloadDocument:te,unsafeRelative:fe,from:de,_fromLocation:Ae,...L}=t,G=J7(),Z=A.useMemo(()=>t,[n,t.from,t._fromLocation,t.hash,t.to,t.search,t.params,t.state,t.mask,t.unsafeRelative]),ee=Wr(n.stores.location,gt=>gt,(gt,yn)=>gt.href===yn.href),oe=A.useMemo(()=>{const gt={_fromLocation:ee,...Z};return n.buildLocation(gt)},[n,ee,Z]),he=oe.maskedLocation?oe.maskedLocation.publicHref:oe.publicHref,ue=oe.maskedLocation?oe.maskedLocation.external:oe.external,ve=A.useMemo(()=>Bge(he,ue,n.history,x),[x,ue,he,n.history]),xe=A.useMemo(()=>{if(ve?.external)return jv(ve.href,n.protocolAllowlist)?void 0:ve.href;if(!Hge(u)&&!(typeof u!="string"||u.indexOf(":")===-1))try{return new URL(u),jv(u,n.protocolAllowlist)?void 0:u}catch{}},[u,ve,n.protocolAllowlist]),Xe=A.useMemo(()=>{if(xe)return!1;if(a?.exact){if(!Bpe(ee.pathname,oe.pathname,n.basepath))return!1}else{const gt=Bv(ee.pathname,n.basepath),yn=Bv(oe.pathname,n.basepath);if(!(gt.startsWith(yn)&&(gt.length===yn.length||gt[yn.length]==="/")))return!1}return(a?.includeSearch??!0)&&!Ll(ee.search,oe.search,{partial:!a?.exact,ignoreUndefined:!a?.explicitUndefined})?!1:a?.includeHash?G&&ee.hash===oe.hash:!0},[a?.exact,a?.explicitUndefined,a?.includeHash,a?.includeSearch,ee,xe,G,oe.hash,oe.pathname,oe.search,n.basepath]),Ee=Xe?Tl(s,{})??Lge:ex,pt=Xe?ex:Tl(o,{})??ex,Ce=[R,Ee.className,pt.className].filter(Boolean).join(" "),ze=(T||Ee.style||pt.style)&&{...T,...Ee.style,...pt.style},[je,$e]=A.useState(!1),gr=A.useRef(!1),Et=t.reloadDocument||xe?!1:c??n.options.defaultPreload,Gr=f??n.options.defaultPreloadDelay??0,Kn=A.useCallback(()=>{n.preloadRoute({...Z,_builtLocation:oe}).catch(gt=>{console.warn(gt),console.warn(Cge)})},[n,Z,oe]);Epe(r,A.useCallback(gt=>{gt?.isIntersecting&&Kn()},[Kn]),jge,{disabled:!!x||Et!=="viewport"}),A.useEffect(()=>{gr.current||!x&&Et==="render"&&(Kn(),gr.current=!0)},[x,Kn,Et]);const Tr=gt=>{const yn=gt.currentTarget.getAttribute("target"),Ir=w!==void 0?w:yn;if(!x&&!$ge(gt)&&!gt.defaultPrevented&&(!Ir||Ir==="_self")&&gt.button===0){gt.preventDefault(),L8.flushSync(()=>{$e(!0)});const ro=n.subscribe("onResolved",()=>{ro(),$e(!1)});n.navigate({...Z,replace:m,resetScroll:S,hashScrollIntoView:g,startTransition:y,viewTransition:E,ignoreBlocker:D})}};if(xe)return{...L,ref:r,href:xe,...C&&{children:C},...w&&{target:w},...x&&{disabled:x},...T&&{style:T},...R&&{className:R},...M&&{onClick:M},...N&&{onBlur:N},...O&&{onFocus:O},...k&&{onMouseEnter:k},...F&&{onMouseLeave:F},...$&&{onTouchStart:$}};const no=gt=>{if(x||Et!=="intent")return;if(!Gr){Kn();return}const yn=gt.currentTarget;if(Bf.has(yn))return;const Ir=setTimeout(()=>{Bf.delete(yn),Kn()},Gr);Bf.set(yn,Ir)},Rr=gt=>{x||Et!=="intent"||Kn()},Gt=gt=>{if(x||!Et||!Gr)return;const yn=gt.currentTarget,Ir=Bf.get(yn);Ir&&(clearTimeout(Ir),Bf.delete(yn))};return{...L,...Ee,...pt,href:ve?.href,ref:r,onClick:uc([M,Tr]),onBlur:uc([N,Gt]),onFocus:uc([O,no]),onMouseEnter:uc([k,no]),onMouseLeave:uc([F,Gt]),onTouchStart:uc([$,Rr]),disabled:!!x,target:w,...ze&&{style:ze},...Ce&&{className:Ce},...x&&Uge,...Xe&&Fge,...G&&je&&zge}}var ex={},Lge={className:"active"},Uge={role:"link","aria-disabled":!0},Fge={"data-status":"active","aria-current":"page"},zge={"data-transitioning":"transitioning"},Bf=new WeakMap,jge={rootMargin:"100px"},uc=t=>e=>{for(const n of t)if(n){if(e.defaultPrevented)return;n(e)}};function Bge(t,e,n,r){if(!r)return e?{href:t,external:!0}:{href:n.createHref(t)||"/",external:!1}}function Hge(t){if(typeof t!="string")return!1;const e=t.charCodeAt(0);return e===47?t.charCodeAt(1)!==47:e===46}var uz=A.forwardRef((t,e)=>{const{_asChild:n,...r}=t,{type:s,...o}=Dge(r,e),a=typeof r.children=="function"?r.children({isActive:o["data-status"]==="active"}):r.children;if(!n){const{disabled:u,...c}=o;return A.createElement("a",c,a)}return A.createElement(n,o,a)});function $ge(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}var qge=class extends Q7{constructor(e){super(e),this.useMatch=n=>fu({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>lz({...n,from:this.id}),this.useSearch=n=>az({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>iz({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>oz({...n,from:this.id}),this.useLoaderData=n=>sz({...n,from:this.id}),this.useNavigate=()=>bR({from:this.fullPath}),this.Link=j.forwardRef((n,r)=>I.jsx(uz,{ref:r,from:this.fullPath,...n}))}};function Wge(t){return new qge(t)}function Vge(){return t=>Kge(t)}var Gge=class extends wge{constructor(t){super(t),this.useMatch=e=>fu({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>lz({...e,from:this.id}),this.useSearch=e=>az({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>iz({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>oz({...e,from:this.id}),this.useLoaderData=e=>sz({...e,from:this.id}),this.useNavigate=()=>bR({from:this.fullPath}),this.Link=j.forwardRef((e,n)=>I.jsx(uz,{ref:n,from:this.fullPath,...e}))}};function Kge(t){return new Gge(t)}function hr(t){return new Yge(t,{silent:!0}).createRoute}var Yge=class{constructor(t,e){this.path=t,this.createRoute=n=>{const r=Wge(n);return r.isRoot=!1,r},this.silent=e?.silent}};function ir(t,e){let n,r,s,o;const a=()=>(n||(n=t().then(c=>{n=void 0,r=c[e??"default"]}).catch(c=>{if(s=c,_pe(s)&&s instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const f=`tanstack_router_reload:${s.message}`;sessionStorage.getItem(f)||(sessionStorage.setItem(f,"1"),o=!0)}})),n),u=function(f){if(o)throw window.location.reload(),new Promise(()=>{});if(s)throw s;if(!r)if(pU)pU(a());else throw a();return A.createElement(r,f)};return u.preload=a,u}function Zge(t){const e=fs(),n=`not-found-${Wr(e.stores.location,r=>r.pathname)}-${Wr(e.stores.status,r=>r)}`;return I.jsx(vR,{getResetKey:()=>n,onCatch:(r,s)=>{if(fr(r))t.onCatch?.(r,s);else throw r},errorComponent:({error:r})=>{if(fr(r))return t.fallback?.(r);throw r},children:t.children})}function Xge(){return I.jsx("p",{children:"Not Found"})}function Ec(t){return I.jsx(I.Fragment,{children:t.children})}function cz(t,e,n){return e.options.notFoundComponent?I.jsx(e.options.notFoundComponent,{...n}):t.options.defaultNotFoundComponent?I.jsx(t.options.defaultNotFoundComponent,{...n}):I.jsx(Xge,{})}function Qge(t){return null}function Jge(){return Qge(fs()),null}var eme=(t,e)=>t.routeId===e.routeId&&t._displayPending===e._displayPending,tme=(t,e)=>t[0]===e[0]&&t[1]===e[1],dz=A.memo(function({matchId:e}){const n=fs(),r=n.stores.matchStores.get(e);r||gi();const s=Wr(n.stores.loadedAt,a=>a),o=Wr(r,a=>a,eme);return I.jsx(nme,{router:n,matchId:e,resetKey:s,matchState:A.useMemo(()=>{const a=o.routeId,u=n.routesById[a].parentRoute?.id;return{routeId:a,ssr:o.ssr,_displayPending:o._displayPending,parentRouteId:u}},[o._displayPending,o.routeId,o.ssr,n.routesById])})});function nme({router:t,matchId:e,resetKey:n,matchState:r}){const s=t.routesById[r.routeId],o=s.options.pendingComponent??t.options.defaultPendingComponent,a=o?I.jsx(o,{}):null,u=s.options.errorComponent??t.options.defaultErrorComponent,c=s.options.onCatch??t.options.defaultOnCatch,f=s.isRoot?s.options.notFoundComponent??t.options.notFoundRoute?.options.component:s.options.notFoundComponent,h=r.ssr===!1||r.ssr==="data-only",g=(!s.isRoot||s.options.wrapInSuspense||h)&&(s.options.wrapInSuspense??o??(s.options.errorComponent?.preload||h))?A.Suspense:Ec,m=u?vR:Ec,y=f?Zge:Ec;return I.jsxs(s.isRoot?s.options.shellComponent??Ec:Ec,{children:[I.jsx(Sb.Provider,{value:e,children:I.jsx(g,{fallback:a,children:I.jsx(m,{getResetKey:()=>n,errorComponent:u||yR,onCatch:(S,E)=>{if(fr(S))throw S.routeId??=r.routeId,S;c?.(S,E)},children:I.jsx(y,{fallback:S=>{if(S.routeId??=r.routeId,!f||S.routeId&&S.routeId!==r.routeId||!S.routeId&&!s.isRoot)throw S;return A.createElement(f,S)},children:h||r._displayPending?I.jsx(_ge,{fallback:a,children:I.jsx(UU,{matchId:e})}):I.jsx(UU,{matchId:e})})})})}),r.parentRouteId===Ul?I.jsxs(I.Fragment,{children:[I.jsx(rme,{}),t.options.scrollRestoration&&L7?I.jsx(Jge,{}):null]}):null]})}function rme(){const t=fs(),e=A.useRef();return Rc(()=>{const n=t.stores.resolvedLocation.get(),r=e.current;n&&(!r||r.href!==n.href)&&t.emit({type:"onRendered",...Fc(t.stores.location.get(),r??n)}),e.current=n},[Wr(t.stores.resolvedLocation,n=>n?.state.__TSR_key),t]),null}var UU=A.memo(function({matchId:e}){const n=fs(),r=(h,g)=>n.getMatch(h.id)?._nonReactive[g]??h._nonReactive[g],s=n.stores.matchStores.get(e);s||gi();const o=Wr(s,h=>h),a=o.routeId,u=n.routesById[a],c=A.useMemo(()=>{const h=(n.routesById[a].options.remountDeps??n.options.defaultRemountDeps)?.({routeId:a,loaderDeps:o.loaderDeps,params:o._strictParams,search:o._strictSearch});return h?JSON.stringify(h):void 0},[a,o.loaderDeps,o._strictParams,o._strictSearch,n.options.defaultRemountDeps,n.routesById]),f=A.useMemo(()=>{const h=u.options.component??n.options.defaultComponent;return h?I.jsx(h,{},c):I.jsx(fz,{})},[c,u.options.component,n.options.defaultComponent]);if(o._displayPending)throw r(o,"displayPendingPromise");if(o._forcePending)throw r(o,"minPendingPromise");if(o.status==="pending"){const h=u.options.pendingMinMs??n.options.defaultPendingMinMs;if(h){const g=n.getMatch(o.id);if(g&&!g._nonReactive.minPendingPromise){const m=Vc();g._nonReactive.minPendingPromise=m,setTimeout(()=>{m.resolve(),g._nonReactive.minPendingPromise=void 0},h)}}throw r(o,"loadPromise")}if(o.status==="notFound")return fr(o.error)||gi(),cz(n,u,o.error);if(o.status==="redirected")throw zr(o.error)||gi(),r(o,"loadPromise");if(o.status==="error")throw o.error;return f}),fz=A.memo(function(){const e=fs(),n=A.useContext(Sb);let r,s=!1,o;{const f=n?e.stores.matchStores.get(n):void 0;[r,s]=Wr(f,h=>[h?.routeId,h?.globalNotFound??!1],tme),o=Wr(e.stores.matchesId,h=>h[h.findIndex(g=>g===n)+1])}const a=r?e.routesById[r]:void 0,u=e.options.defaultPendingComponent?I.jsx(e.options.defaultPendingComponent,{}):null;if(s)return a||gi(),cz(e,a,void 0);if(!o)return null;const c=I.jsx(dz,{matchId:o});return r===Ul?I.jsx(A.Suspense,{fallback:u,children:c}):c});function sme(){const t=fs(),e=A.useRef({router:t,mounted:!1}),[n,r]=A.useState(!1),s=Wr(t.stores.isLoading,g=>g),o=Wr(t.stores.hasPending,g=>g),a=Vw(s),u=s||n||o,c=Vw(u),f=s||o,h=Vw(f);return t.startTransition=g=>{r(!0),A.startTransition(()=>{g(),r(!1)})},A.useEffect(()=>{const g=t.history.subscribe(t.load),m=t.buildLocation({to:t.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return hi(t.latestLocation.publicHref)!==hi(m.publicHref)&&t.commitLocation({...m,replace:!0}),()=>{g()}},[t,t.history]),Rc(()=>{if(typeof window<"u"&&t.ssr||e.current.router===t&&e.current.mounted)return;e.current={router:t,mounted:!0},(async()=>{try{await t.load()}catch(m){console.error(m)}})()},[t]),Rc(()=>{a&&!s&&t.emit({type:"onLoad",...Fc(t.stores.location.get(),t.stores.resolvedLocation.get())})},[a,t,s]),Rc(()=>{h&&!f&&t.emit({type:"onBeforeRouteMount",...Fc(t.stores.location.get(),t.stores.resolvedLocation.get())})},[f,h,t]),Rc(()=>{if(c&&!u){const g=Fc(t.stores.location.get(),t.stores.resolvedLocation.get());t.emit({type:"onResolved",...g}),nz(()=>{t.stores.status.set("idle"),t.stores.resolvedLocation.set(t.stores.location.get())})}},[u,c,t]),null}function ome(){const t=fs(),e=t.routesById[Ul].options.pendingComponent??t.options.defaultPendingComponent,n=e?I.jsx(e,{}):null,r=I.jsxs(typeof document<"u"&&t.ssr?Ec:A.Suspense,{fallback:n,children:[I.jsx(sme,{}),I.jsx(ime,{})]});return t.options.InnerWrap?I.jsx(t.options.InnerWrap,{children:r}):r}function ime(){const t=fs(),e=Wr(t.stores.firstId,s=>s),n=Wr(t.stores.loadedAt,s=>s),r=e?I.jsx(dz,{matchId:e}):null;return I.jsx(Sb.Provider,{value:e,children:t.options.disableGlobalCatchBoundary?r:I.jsx(vR,{getResetKey:()=>n,errorComponent:yR,onCatch:void 0,children:r})})}var ame=t=>({createMutableStore:LU,createReadonlyStore:LU,batch:nz}),lme=t=>new ume(t),ume=class extends gge{constructor(t){super(t,ame)}};function cme({router:t,children:e,...n}){F7(n)&&t.update({...t.options,...n,context:{...t.options.context,...n.context}});const r=I.jsx(ez.Provider,{value:t,children:e});return t.options.Wrap?I.jsx(t.options.Wrap,{children:r}):r}function dme({router:t,...e}){return I.jsx(cme,{router:t,...e,children:I.jsx(ome,{})})}var tx={exports:{}},Hf={},nx={exports:{}},rx={};var FU;function fme(){return FU||(FU=1,(function(t){function e(H,te){var fe=H.length;H.push(te);e:for(;0<fe;){var de=fe-1>>>1,Ae=H[de];if(0<s(Ae,te))H[de]=te,H[fe]=Ae,fe=de;else break e}}function n(H){return H.length===0?null:H[0]}function r(H){if(H.length===0)return null;var te=H[0],fe=H.pop();if(fe!==te){H[0]=fe;e:for(var de=0,Ae=H.length,L=Ae>>>1;de<L;){var G=2*(de+1)-1,Z=H[G],ee=G+1,oe=H[ee];if(0>s(Z,fe))ee<Ae&&0>s(oe,Z)?(H[de]=oe,H[ee]=fe,de=ee):(H[de]=Z,H[G]=fe,de=G);else if(ee<Ae&&0>s(oe,fe))H[de]=oe,H[ee]=fe,de=ee;else break e}}return te}function s(H,te){var fe=H.sortIndex-te.sortIndex;return fe!==0?fe:H.id-te.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;t.unstable_now=function(){return o.now()}}else{var a=Date,u=a.now();t.unstable_now=function(){return a.now()-u}}var c=[],f=[],h=1,g=null,m=3,y=!1,S=!1,E=!1,C=!1,w=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function R(H){for(var te=n(f);te!==null;){if(te.callback===null)r(f);else if(te.startTime<=H)r(f),te.sortIndex=te.expirationTime,e(c,te);else break;te=n(f)}}function M(H){if(E=!1,R(H),!S)if(n(c)!==null)S=!0,N||(N=!0,z());else{var te=n(f);te!==null&&Y(M,te.startTime-H)}}var N=!1,O=-1,k=5,F=-1;function $(){return C?!0:!(t.unstable_now()-F<k)}function D(){if(C=!1,N){var H=t.unstable_now();F=H;var te=!0;try{e:{S=!1,E&&(E=!1,x(O),O=-1),y=!0;var fe=m;try{t:{for(R(H),g=n(c);g!==null&&!(g.expirationTime>H&&$());){var de=g.callback;if(typeof de=="function"){g.callback=null,m=g.priorityLevel;var Ae=de(g.expirationTime<=H);if(H=t.unstable_now(),typeof Ae=="function"){g.callback=Ae,R(H),te=!0;break t}g===n(c)&&r(c),R(H)}else r(c);g=n(c)}if(g!==null)te=!0;else{var L=n(f);L!==null&&Y(M,L.startTime-H),te=!1}}break e}finally{g=null,m=fe,y=!1}te=void 0}}finally{te?z():N=!1}}}var z;if(typeof T=="function")z=function(){T(D)};else if(typeof MessageChannel<"u"){var q=new MessageChannel,K=q.port2;q.port1.onmessage=D,z=function(){K.postMessage(null)}}else z=function(){w(D,0)};function Y(H,te){O=w(function(){H(t.unstable_now())},te)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(H){H.callback=null},t.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):k=0<H?Math.floor(1e3/H):5},t.unstable_getCurrentPriorityLevel=function(){return m},t.unstable_next=function(H){switch(m){case 1:case 2:case 3:var te=3;break;default:te=m}var fe=m;m=te;try{return H()}finally{m=fe}},t.unstable_requestPaint=function(){C=!0},t.unstable_runWithPriority=function(H,te){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var fe=m;m=H;try{return te()}finally{m=fe}},t.unstable_scheduleCallback=function(H,te,fe){var de=t.unstable_now();switch(typeof fe=="object"&&fe!==null?(fe=fe.delay,fe=typeof fe=="number"&&0<fe?de+fe:de):fe=de,H){case 1:var Ae=-1;break;case 2:Ae=250;break;case 5:Ae=1073741823;break;case 4:Ae=1e4;break;default:Ae=5e3}return Ae=fe+Ae,H={id:h++,callback:te,priorityLevel:H,startTime:fe,expirationTime:Ae,sortIndex:-1},fe>de?(H.sortIndex=fe,e(f,H),n(c)===null&&H===n(f)&&(E?(x(O),O=-1):E=!0,Y(M,fe-de))):(H.sortIndex=Ae,e(c,H),S||y||(S=!0,N||(N=!0,z()))),H},t.unstable_shouldYield=$,t.unstable_wrapCallback=function(H){var te=m;return function(){var fe=m;m=te;try{return H.apply(this,arguments)}finally{m=fe}}}})(rx)),rx}var zU;function hme(){return zU||(zU=1,nx.exports=fme()),nx.exports}var jU;function pme(){if(jU)return Hf;jU=1;var t=hme(),e=ip(),n=D8();function r(i){var l="https://react.dev/errors/"+i;if(1<arguments.length){l+="?args[]="+encodeURIComponent(arguments[1]);for(var d=2;d<arguments.length;d++)l+="&args[]="+encodeURIComponent(arguments[d])}return"Minified React error #"+i+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function o(i){var l=i,d=i;if(i.alternate)for(;l.return;)l=l.return;else{i=l;do l=i,(l.flags&4098)!==0&&(d=l.return),i=l.return;while(i)}return l.tag===3?d:null}function a(i){if(i.tag===13){var l=i.memoizedState;if(l===null&&(i=i.alternate,i!==null&&(l=i.memoizedState)),l!==null)return l.dehydrated}return null}function u(i){if(i.tag===31){var l=i.memoizedState;if(l===null&&(i=i.alternate,i!==null&&(l=i.memoizedState)),l!==null)return l.dehydrated}return null}function c(i){if(o(i)!==i)throw Error(r(188))}function f(i){var l=i.alternate;if(!l){if(l=o(i),l===null)throw Error(r(188));return l!==i?null:i}for(var d=i,p=l;;){var v=d.return;if(v===null)break;var b=v.alternate;if(b===null){if(p=v.return,p!==null){d=p;continue}break}if(v.child===b.child){for(b=v.child;b;){if(b===d)return c(v),i;if(b===p)return c(v),l;b=b.sibling}throw Error(r(188))}if(d.return!==p.return)d=v,p=b;else{for(var _=!1,P=v.child;P;){if(P===d){_=!0,d=v,p=b;break}if(P===p){_=!0,p=v,d=b;break}P=P.sibling}if(!_){for(P=b.child;P;){if(P===d){_=!0,d=b,p=v;break}if(P===p){_=!0,p=b,d=v;break}P=P.sibling}if(!_)throw Error(r(189))}}if(d.alternate!==p)throw Error(r(190))}if(d.tag!==3)throw Error(r(188));return d.stateNode.current===d?i:l}function h(i){var l=i.tag;if(l===5||l===26||l===27||l===6)return i;for(i=i.child;i!==null;){if(l=h(i),l!==null)return l;i=i.sibling}return null}var g=Object.assign,m=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),x=Symbol.for("react.consumer"),T=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),N=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),F=Symbol.for("react.activity"),$=Symbol.for("react.memo_cache_sentinel"),D=Symbol.iterator;function z(i){return i===null||typeof i!="object"?null:(i=D&&i[D]||i["@@iterator"],typeof i=="function"?i:null)}var q=Symbol.for("react.client.reference");function K(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===q?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case E:return"Fragment";case w:return"Profiler";case C:return"StrictMode";case M:return"Suspense";case N:return"SuspenseList";case F:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case S:return"Portal";case T:return i.displayName||"Context";case x:return(i._context.displayName||"Context")+".Consumer";case R:var l=i.render;return i=i.displayName,i||(i=l.displayName||l.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case O:return l=i.displayName||null,l!==null?l:K(i.type)||"Memo";case k:l=i._payload,i=i._init;try{return K(i(l))}catch{}}return null}var Y=Array.isArray,H=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,fe={pending:!1,data:null,method:null,action:null},de=[],Ae=-1;function L(i){return{current:i}}function G(i){0>Ae||(i.current=de[Ae],de[Ae]=null,Ae--)}function Z(i,l){Ae++,de[Ae]=i.current,i.current=l}var ee=L(null),oe=L(null),he=L(null),ue=L(null);function ve(i,l){switch(Z(he,l),Z(oe,i),Z(ee,null),l.nodeType){case 9:case 11:i=(i=l.documentElement)&&(i=i.namespaceURI)?fN(i):0;break;default:if(i=l.tagName,l=l.namespaceURI)l=fN(l),i=hN(l,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}G(ee),Z(ee,i)}function xe(){G(ee),G(oe),G(he)}function Xe(i){i.memoizedState!==null&&Z(ue,i);var l=ee.current,d=hN(l,i.type);l!==d&&(Z(oe,i),Z(ee,d))}function Ee(i){oe.current===i&&(G(ee),G(oe)),ue.current===i&&(G(ue),bf._currentValue=fe)}var pt,Ce;function ze(i){if(pt===void 0)try{throw Error()}catch(d){var l=d.stack.trim().match(/\n( *(at )?)/);pt=l&&l[1]||"",Ce=-1<d.stack.indexOf(`
217
+ at`)?" (<anonymous>)":-1<d.stack.indexOf("@")?"@unknown:0:0":""}return`
218
+ `+pt+i+Ce}var je=!1;function $e(i,l){if(!i||je)return"";je=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var p={DetermineComponentFrameRoot:function(){try{if(l){var ae=function(){throw Error()};if(Object.defineProperty(ae.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ae,[])}catch(re){var ne=re}Reflect.construct(i,[],ae)}else{try{ae.call()}catch(re){ne=re}i.call(ae.prototype)}}else{try{throw Error()}catch(re){ne=re}(ae=i())&&typeof ae.catch=="function"&&ae.catch(function(){})}}catch(re){if(re&&ne&&typeof re.stack=="string")return[re.stack,ne.stack]}return[null,null]}};p.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var v=Object.getOwnPropertyDescriptor(p.DetermineComponentFrameRoot,"name");v&&v.configurable&&Object.defineProperty(p.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var b=p.DetermineComponentFrameRoot(),_=b[0],P=b[1];if(_&&P){var B=_.split(`
219
+ `),J=P.split(`
220
+ `);for(v=p=0;p<B.length&&!B[p].includes("DetermineComponentFrameRoot");)p++;for(;v<J.length&&!J[v].includes("DetermineComponentFrameRoot");)v++;if(p===B.length||v===J.length)for(p=B.length-1,v=J.length-1;1<=p&&0<=v&&B[p]!==J[v];)v--;for(;1<=p&&0<=v;p--,v--)if(B[p]!==J[v]){if(p!==1||v!==1)do if(p--,v--,0>v||B[p]!==J[v]){var se=`
221
+ `+B[p].replace(" at new "," at ");return i.displayName&&se.includes("<anonymous>")&&(se=se.replace("<anonymous>",i.displayName)),se}while(1<=p&&0<=v);break}}}finally{je=!1,Error.prepareStackTrace=d}return(d=i?i.displayName||i.name:"")?ze(d):""}function gr(i,l){switch(i.tag){case 26:case 27:case 5:return ze(i.type);case 16:return ze("Lazy");case 13:return i.child!==l&&l!==null?ze("Suspense Fallback"):ze("Suspense");case 19:return ze("SuspenseList");case 0:case 15:return $e(i.type,!1);case 11:return $e(i.type.render,!1);case 1:return $e(i.type,!0);case 31:return ze("Activity");default:return""}}function Et(i){try{var l="",d=null;do l+=gr(i,d),d=i,i=i.return;while(i);return l}catch(p){return`
222
+ Error generating stack: `+p.message+`
223
+ `+p.stack}}var Gr=Object.prototype.hasOwnProperty,Kn=t.unstable_scheduleCallback,Tr=t.unstable_cancelCallback,no=t.unstable_shouldYield,Rr=t.unstable_requestPaint,Gt=t.unstable_now,gt=t.unstable_getCurrentPriorityLevel,yn=t.unstable_ImmediatePriority,Ir=t.unstable_UserBlockingPriority,ro=t.unstable_NormalPriority,Cd=t.unstable_LowPriority,Do=t.unstable_IdlePriority,vu=t.log,yu=t.unstable_setDisableYieldValue,Pi=null,lr=null;function Ps(i){if(typeof vu=="function"&&yu(i),lr&&typeof lr.setStrictMode=="function")try{lr.setStrictMode(Pi,i)}catch{}}var Yn=Math.clz32?Math.clz32:ps,wd=Math.log,ki=Math.LN2;function ps(i){return i>>>=0,i===0?32:31-(wd(i)/ki|0)|0}var Di=256,Ya=262144,Za=4194304;function ks(i){var l=i&42;if(l!==0)return l;switch(i&-i){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return i&261888;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function Xa(i,l,d){var p=i.pendingLanes;if(p===0)return 0;var v=0,b=i.suspendedLanes,_=i.pingedLanes;i=i.warmLanes;var P=p&134217727;return P!==0?(p=P&~b,p!==0?v=ks(p):(_&=P,_!==0?v=ks(_):d||(d=P&~i,d!==0&&(v=ks(d))))):(P=p&~b,P!==0?v=ks(P):_!==0?v=ks(_):d||(d=p&~i,d!==0&&(v=ks(d)))),v===0?0:l!==0&&l!==v&&(l&b)===0&&(b=v&-v,d=l&-l,b>=d||b===32&&(d&4194048)!==0)?l:v}function so(i,l){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&l)===0}function bu(i,l){switch(i){case 1:case 2:case 4:case 8:case 64:return l+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return l+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Kr(){var i=Za;return Za<<=1,(Za&62914560)===0&&(Za=4194304),i}function oo(i){for(var l=[],d=0;31>d;d++)l.push(i);return l}function Lo(i,l){i.pendingLanes|=l,l!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function xd(i,l,d,p,v,b){var _=i.pendingLanes;i.pendingLanes=d,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=d,i.entangledLanes&=d,i.errorRecoveryDisabledLanes&=d,i.shellSuspendCounter=0;var P=i.entanglements,B=i.expirationTimes,J=i.hiddenUpdates;for(d=_&~d;0<d;){var se=31-Yn(d),ae=1<<se;P[se]=0,B[se]=-1;var ne=J[se];if(ne!==null)for(J[se]=null,se=0;se<ne.length;se++){var re=ne[se];re!==null&&(re.lane&=-536870913)}d&=~ae}p!==0&&Cp(i,p,0),b!==0&&v===0&&i.tag!==0&&(i.suspendedLanes|=b&~(_&~l))}function Cp(i,l,d){i.pendingLanes|=l,i.suspendedLanes&=~l;var p=31-Yn(l);i.entangledLanes|=l,i.entanglements[p]=i.entanglements[p]|1073741824|d&261930}function _d(i,l){var d=i.entangledLanes|=l;for(i=i.entanglements;d;){var p=31-Yn(d),v=1<<p;v&l|i[p]&l&&(i[p]|=l),d&=~v}}function Su(i,l){var d=l&-l;return d=(d&42)!==0?1:Eu(d),(d&(i.suspendedLanes|l))!==0?0:d}function Eu(i){switch(i){case 2:i=1;break;case 8:i=4;break;case 32:i=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:i=128;break;case 268435456:i=134217728;break;default:i=0}return i}function Qa(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function wp(){var i=te.p;return i!==0?i:(i=window.event,i===void 0?32:LN(i.type))}function Li(i,l){var d=te.p;try{return te.p=i,l()}finally{te.p=d}}var io=Math.random().toString(36).slice(2),On="__reactFiber$"+io,nt="__reactProps$"+io,Yr="__reactContainer$"+io,Ad="__reactEvents$"+io,xp="__reactListeners$"+io,Td="__reactHandles$"+io,Rd="__reactResources$"+io,Ui="__reactMarker$"+io;function Id(i){delete i[On],delete i[nt],delete i[Ad],delete i[xp],delete i[Td]}function Fi(i){var l=i[On];if(l)return l;for(var d=i.parentNode;d;){if(l=d[Yr]||d[On]){if(d=l.alternate,l.child!==null||d!==null&&d.child!==null)for(i=SN(i);i!==null;){if(d=i[On])return d;i=SN(i)}return l}i=d,d=i.parentNode}return null}function zi(i){if(i=i[On]||i[Yr]){var l=i.tag;if(l===5||l===6||l===13||l===31||l===26||l===27||l===3)return i}return null}function Ja(i){var l=i.tag;if(l===5||l===26||l===27||l===6)return i.stateNode;throw Error(r(33))}function mr(i){var l=i[Rd];return l||(l=i[Rd]={hoistableStyles:new Map,hoistableScripts:new Map}),l}function ln(i){i[Ui]=!0}var ao=new Set,_p={};function Ds(i,l){ji(i,l),ji(i+"Capture",l)}function ji(i,l){for(_p[i]=l,i=0;i<l.length;i++)ao.add(l[i])}var Ap=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Od={},el={};function Nd(i){return Gr.call(el,i)?!0:Gr.call(Od,i)?!1:Ap.test(i)?el[i]=!0:(Od[i]=!0,!1)}function Uo(i,l,d){if(Nd(l))if(d===null)i.removeAttribute(l);else{switch(typeof d){case"undefined":case"function":case"symbol":i.removeAttribute(l);return;case"boolean":var p=l.toLowerCase().slice(0,5);if(p!=="data-"&&p!=="aria-"){i.removeAttribute(l);return}}i.setAttribute(l,""+d)}}function Ls(i,l,d){if(d===null)i.removeAttribute(l);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(l);return}i.setAttribute(l,""+d)}}function vr(i,l,d,p){if(p===null)i.removeAttribute(d);else{switch(typeof p){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(d);return}i.setAttributeNS(l,d,""+p)}}function un(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Tp(i){var l=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function Bb(i,l,d){var p=Object.getOwnPropertyDescriptor(i.constructor.prototype,l);if(!i.hasOwnProperty(l)&&typeof p<"u"&&typeof p.get=="function"&&typeof p.set=="function"){var v=p.get,b=p.set;return Object.defineProperty(i,l,{configurable:!0,get:function(){return v.call(this)},set:function(_){d=""+_,b.call(this,_)}}),Object.defineProperty(i,l,{enumerable:p.enumerable}),{getValue:function(){return d},setValue:function(_){d=""+_},stopTracking:function(){i._valueTracker=null,delete i[l]}}}}function Cu(i){if(!i._valueTracker){var l=Tp(i)?"checked":"value";i._valueTracker=Bb(i,l,""+i[l])}}function Md(i){if(!i)return!1;var l=i._valueTracker;if(!l)return!0;var d=l.getValue(),p="";return i&&(p=Tp(i)?i.checked?"true":"false":i.value),i=p,i!==d?(l.setValue(i),!0):!1}function wu(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var Rp=/[\n"\\]/g;function Or(i){return i.replace(Rp,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function Pd(i,l,d,p,v,b,_,P){i.name="",_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?i.type=_:i.removeAttribute("type"),l!=null?_==="number"?(l===0&&i.value===""||i.value!=l)&&(i.value=""+un(l)):i.value!==""+un(l)&&(i.value=""+un(l)):_!=="submit"&&_!=="reset"||i.removeAttribute("value"),l!=null?Bi(i,_,un(l)):d!=null?Bi(i,_,un(d)):p!=null&&i.removeAttribute("value"),v==null&&b!=null&&(i.defaultChecked=!!b),v!=null&&(i.checked=v&&typeof v!="function"&&typeof v!="symbol"),P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"?i.name=""+un(P):i.removeAttribute("name")}function kd(i,l,d,p,v,b,_,P){if(b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(i.type=b),l!=null||d!=null){if(!(b!=="submit"&&b!=="reset"||l!=null)){Cu(i);return}d=d!=null?""+un(d):"",l=l!=null?""+un(l):d,P||l===i.value||(i.value=l),i.defaultValue=l}p=p??v,p=typeof p!="function"&&typeof p!="symbol"&&!!p,i.checked=P?i.checked:!!p,i.defaultChecked=!!p,_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(i.name=_),Cu(i)}function Bi(i,l,d){l==="number"&&wu(i.ownerDocument)===i||i.defaultValue===""+d||(i.defaultValue=""+d)}function lo(i,l,d,p){if(i=i.options,l){l={};for(var v=0;v<d.length;v++)l["$"+d[v]]=!0;for(d=0;d<i.length;d++)v=l.hasOwnProperty("$"+i[d].value),i[d].selected!==v&&(i[d].selected=v),v&&p&&(i[d].defaultSelected=!0)}else{for(d=""+un(d),l=null,v=0;v<i.length;v++){if(i[v].value===d){i[v].selected=!0,p&&(i[v].defaultSelected=!0);return}l!==null||i[v].disabled||(l=i[v])}l!==null&&(l.selected=!0)}}function pe(i,l,d){if(l!=null&&(l=""+un(l),l!==i.value&&(i.value=l),d==null)){i.defaultValue!==l&&(i.defaultValue=l);return}i.defaultValue=d!=null?""+un(d):""}function U(i,l,d,p){if(l==null){if(p!=null){if(d!=null)throw Error(r(92));if(Y(p)){if(1<p.length)throw Error(r(93));p=p[0]}d=p}d==null&&(d=""),l=d}d=un(l),i.defaultValue=d,p=i.textContent,p===d&&p!==""&&p!==null&&(i.value=p),Cu(i)}function X(i,l){if(l){var d=i.firstChild;if(d&&d===i.lastChild&&d.nodeType===3){d.nodeValue=l;return}}i.textContent=l}var ce=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Te(i,l,d){var p=l.indexOf("--")===0;d==null||typeof d=="boolean"||d===""?p?i.setProperty(l,""):l==="float"?i.cssFloat="":i[l]="":p?i.setProperty(l,d):typeof d!="number"||d===0||ce.has(l)?l==="float"?i.cssFloat=d:i[l]=(""+d).trim():i[l]=d+"px"}function ke(i,l,d){if(l!=null&&typeof l!="object")throw Error(r(62));if(i=i.style,d!=null){for(var p in d)!d.hasOwnProperty(p)||l!=null&&l.hasOwnProperty(p)||(p.indexOf("--")===0?i.setProperty(p,""):p==="float"?i.cssFloat="":i[p]="");for(var v in l)p=l[v],l.hasOwnProperty(v)&&d[v]!==p&&Te(i,v,p)}else for(var b in l)l.hasOwnProperty(b)&&Te(i,b,l[b])}function Ue(i){if(i.indexOf("-")===-1)return!1;switch(i){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var tn=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Un=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function ur(i){return Un.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function nn(){}var yr=null;function Nn(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var xu=null,_u=null;function dI(i){var l=zi(i);if(l&&(i=l.stateNode)){var d=i[nt]||null;e:switch(i=l.stateNode,l.type){case"input":if(Pd(i,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name),l=d.name,d.type==="radio"&&l!=null){for(d=i;d.parentNode;)d=d.parentNode;for(d=d.querySelectorAll('input[name="'+Or(""+l)+'"][type="radio"]'),l=0;l<d.length;l++){var p=d[l];if(p!==i&&p.form===i.form){var v=p[nt]||null;if(!v)throw Error(r(90));Pd(p,v.value,v.defaultValue,v.defaultValue,v.checked,v.defaultChecked,v.type,v.name)}}for(l=0;l<d.length;l++)p=d[l],p.form===i.form&&Md(p)}break e;case"textarea":pe(i,d.value,d.defaultValue);break e;case"select":l=d.value,l!=null&&lo(i,!!d.multiple,l,!1)}}}var Hb=!1;function fI(i,l,d){if(Hb)return i(l,d);Hb=!0;try{var p=i(l);return p}finally{if(Hb=!1,(xu!==null||_u!==null)&&(gg(),xu&&(l=xu,i=_u,_u=xu=null,dI(l),i)))for(l=0;l<i.length;l++)dI(i[l])}}function Dd(i,l){var d=i.stateNode;if(d===null)return null;var p=d[nt]||null;if(p===null)return null;d=p[l];e:switch(l){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(p=!p.disabled)||(i=i.type,p=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!p;break e;default:i=!1}if(i)return null;if(d&&typeof d!="function")throw Error(r(231,l,typeof d));return d}var Fo=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),$b=!1;if(Fo)try{var Ld={};Object.defineProperty(Ld,"passive",{get:function(){$b=!0}}),window.addEventListener("test",Ld,Ld),window.removeEventListener("test",Ld,Ld)}catch{$b=!1}var Hi=null,qb=null,Ip=null;function hI(){if(Ip)return Ip;var i,l=qb,d=l.length,p,v="value"in Hi?Hi.value:Hi.textContent,b=v.length;for(i=0;i<d&&l[i]===v[i];i++);var _=d-i;for(p=1;p<=_&&l[d-p]===v[b-p];p++);return Ip=v.slice(i,1<p?1-p:void 0)}function Op(i){var l=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&l===13&&(i=13)):i=l,i===10&&(i=13),32<=i||i===13?i:0}function Np(){return!0}function pI(){return!1}function Nr(i){function l(d,p,v,b,_){this._reactName=d,this._targetInst=v,this.type=p,this.nativeEvent=b,this.target=_,this.currentTarget=null;for(var P in i)i.hasOwnProperty(P)&&(d=i[P],this[P]=d?d(b):b[P]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?Np:pI,this.isPropagationStopped=pI,this}return g(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var d=this.nativeEvent;d&&(d.preventDefault?d.preventDefault():typeof d.returnValue!="unknown"&&(d.returnValue=!1),this.isDefaultPrevented=Np)},stopPropagation:function(){var d=this.nativeEvent;d&&(d.stopPropagation?d.stopPropagation():typeof d.cancelBubble!="unknown"&&(d.cancelBubble=!0),this.isPropagationStopped=Np)},persist:function(){},isPersistent:Np}),l}var tl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Mp=Nr(tl),Ud=g({},tl,{view:0,detail:0}),TH=Nr(Ud),Wb,Vb,Fd,Pp=g({},Ud,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Kb,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==Fd&&(Fd&&i.type==="mousemove"?(Wb=i.screenX-Fd.screenX,Vb=i.screenY-Fd.screenY):Vb=Wb=0,Fd=i),Wb)},movementY:function(i){return"movementY"in i?i.movementY:Vb}}),gI=Nr(Pp),RH=g({},Pp,{dataTransfer:0}),IH=Nr(RH),OH=g({},Ud,{relatedTarget:0}),Gb=Nr(OH),NH=g({},tl,{animationName:0,elapsedTime:0,pseudoElement:0}),MH=Nr(NH),PH=g({},tl,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),kH=Nr(PH),DH=g({},tl,{data:0}),mI=Nr(DH),LH={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},UH={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},FH={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function zH(i){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(i):(i=FH[i])?!!l[i]:!1}function Kb(){return zH}var jH=g({},Ud,{key:function(i){if(i.key){var l=LH[i.key]||i.key;if(l!=="Unidentified")return l}return i.type==="keypress"?(i=Op(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?UH[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Kb,charCode:function(i){return i.type==="keypress"?Op(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Op(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),BH=Nr(jH),HH=g({},Pp,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),vI=Nr(HH),$H=g({},Ud,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Kb}),qH=Nr($H),WH=g({},tl,{propertyName:0,elapsedTime:0,pseudoElement:0}),VH=Nr(WH),GH=g({},Pp,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),KH=Nr(GH),YH=g({},tl,{newState:0,oldState:0}),ZH=Nr(YH),XH=[9,13,27,32],Yb=Fo&&"CompositionEvent"in window,zd=null;Fo&&"documentMode"in document&&(zd=document.documentMode);var QH=Fo&&"TextEvent"in window&&!zd,yI=Fo&&(!Yb||zd&&8<zd&&11>=zd),bI=" ",SI=!1;function EI(i,l){switch(i){case"keyup":return XH.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function CI(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Au=!1;function JH(i,l){switch(i){case"compositionend":return CI(l);case"keypress":return l.which!==32?null:(SI=!0,bI);case"textInput":return i=l.data,i===bI&&SI?null:i;default:return null}}function e$(i,l){if(Au)return i==="compositionend"||!Yb&&EI(i,l)?(i=hI(),Ip=qb=Hi=null,Au=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1<l.char.length)return l.char;if(l.which)return String.fromCharCode(l.which)}return null;case"compositionend":return yI&&l.locale!=="ko"?null:l.data;default:return null}}var t$={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function wI(i){var l=i&&i.nodeName&&i.nodeName.toLowerCase();return l==="input"?!!t$[i.type]:l==="textarea"}function xI(i,l,d,p){xu?_u?_u.push(p):_u=[p]:xu=p,l=Cg(l,"onChange"),0<l.length&&(d=new Mp("onChange","change",null,d,p),i.push({event:d,listeners:l}))}var jd=null,Bd=null;function n$(i){iN(i,0)}function kp(i){var l=Ja(i);if(Md(l))return i}function _I(i,l){if(i==="change")return l}var AI=!1;if(Fo){var Zb;if(Fo){var Xb="oninput"in document;if(!Xb){var TI=document.createElement("div");TI.setAttribute("oninput","return;"),Xb=typeof TI.oninput=="function"}Zb=Xb}else Zb=!1;AI=Zb&&(!document.documentMode||9<document.documentMode)}function RI(){jd&&(jd.detachEvent("onpropertychange",II),Bd=jd=null)}function II(i){if(i.propertyName==="value"&&kp(Bd)){var l=[];xI(l,Bd,i,Nn(i)),fI(n$,l)}}function r$(i,l,d){i==="focusin"?(RI(),jd=l,Bd=d,jd.attachEvent("onpropertychange",II)):i==="focusout"&&RI()}function s$(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return kp(Bd)}function o$(i,l){if(i==="click")return kp(l)}function i$(i,l){if(i==="input"||i==="change")return kp(l)}function a$(i,l){return i===l&&(i!==0||1/i===1/l)||i!==i&&l!==l}var Zr=typeof Object.is=="function"?Object.is:a$;function Hd(i,l){if(Zr(i,l))return!0;if(typeof i!="object"||i===null||typeof l!="object"||l===null)return!1;var d=Object.keys(i),p=Object.keys(l);if(d.length!==p.length)return!1;for(p=0;p<d.length;p++){var v=d[p];if(!Gr.call(l,v)||!Zr(i[v],l[v]))return!1}return!0}function OI(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function NI(i,l){var d=OI(i);i=0;for(var p;d;){if(d.nodeType===3){if(p=i+d.textContent.length,i<=l&&p>=l)return{node:d,offset:l-i};i=p}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=OI(d)}}function MI(i,l){return i&&l?i===l?!0:i&&i.nodeType===3?!1:l&&l.nodeType===3?MI(i,l.parentNode):"contains"in i?i.contains(l):i.compareDocumentPosition?!!(i.compareDocumentPosition(l)&16):!1:!1}function PI(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var l=wu(i.document);l instanceof i.HTMLIFrameElement;){try{var d=typeof l.contentWindow.location.href=="string"}catch{d=!1}if(d)i=l.contentWindow;else break;l=wu(i.document)}return l}function Qb(i){var l=i&&i.nodeName&&i.nodeName.toLowerCase();return l&&(l==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||l==="textarea"||i.contentEditable==="true")}var l$=Fo&&"documentMode"in document&&11>=document.documentMode,Tu=null,Jb=null,$d=null,e0=!1;function kI(i,l,d){var p=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;e0||Tu==null||Tu!==wu(p)||(p=Tu,"selectionStart"in p&&Qb(p)?p={start:p.selectionStart,end:p.selectionEnd}:(p=(p.ownerDocument&&p.ownerDocument.defaultView||window).getSelection(),p={anchorNode:p.anchorNode,anchorOffset:p.anchorOffset,focusNode:p.focusNode,focusOffset:p.focusOffset}),$d&&Hd($d,p)||($d=p,p=Cg(Jb,"onSelect"),0<p.length&&(l=new Mp("onSelect","select",null,l,d),i.push({event:l,listeners:p}),l.target=Tu)))}function nl(i,l){var d={};return d[i.toLowerCase()]=l.toLowerCase(),d["Webkit"+i]="webkit"+l,d["Moz"+i]="moz"+l,d}var Ru={animationend:nl("Animation","AnimationEnd"),animationiteration:nl("Animation","AnimationIteration"),animationstart:nl("Animation","AnimationStart"),transitionrun:nl("Transition","TransitionRun"),transitionstart:nl("Transition","TransitionStart"),transitioncancel:nl("Transition","TransitionCancel"),transitionend:nl("Transition","TransitionEnd")},t0={},DI={};Fo&&(DI=document.createElement("div").style,"AnimationEvent"in window||(delete Ru.animationend.animation,delete Ru.animationiteration.animation,delete Ru.animationstart.animation),"TransitionEvent"in window||delete Ru.transitionend.transition);function rl(i){if(t0[i])return t0[i];if(!Ru[i])return i;var l=Ru[i],d;for(d in l)if(l.hasOwnProperty(d)&&d in DI)return t0[i]=l[d];return i}var LI=rl("animationend"),UI=rl("animationiteration"),FI=rl("animationstart"),u$=rl("transitionrun"),c$=rl("transitionstart"),d$=rl("transitioncancel"),zI=rl("transitionend"),jI=new Map,n0="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");n0.push("scrollEnd");function Us(i,l){jI.set(i,l),Ds(l,[i])}var Dp=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var l=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof i=="object"&&i!==null&&typeof i.message=="string"?String(i.message):String(i),error:i});if(!window.dispatchEvent(l))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)},gs=[],Iu=0,r0=0;function Lp(){for(var i=Iu,l=r0=Iu=0;l<i;){var d=gs[l];gs[l++]=null;var p=gs[l];gs[l++]=null;var v=gs[l];gs[l++]=null;var b=gs[l];if(gs[l++]=null,p!==null&&v!==null){var _=p.pending;_===null?v.next=v:(v.next=_.next,_.next=v),p.pending=v}b!==0&&BI(d,v,b)}}function Up(i,l,d,p){gs[Iu++]=i,gs[Iu++]=l,gs[Iu++]=d,gs[Iu++]=p,r0|=p,i.lanes|=p,i=i.alternate,i!==null&&(i.lanes|=p)}function s0(i,l,d,p){return Up(i,l,d,p),Fp(i)}function sl(i,l){return Up(i,null,null,l),Fp(i)}function BI(i,l,d){i.lanes|=d;var p=i.alternate;p!==null&&(p.lanes|=d);for(var v=!1,b=i.return;b!==null;)b.childLanes|=d,p=b.alternate,p!==null&&(p.childLanes|=d),b.tag===22&&(i=b.stateNode,i===null||i._visibility&1||(v=!0)),i=b,b=b.return;return i.tag===3?(b=i.stateNode,v&&l!==null&&(v=31-Yn(d),i=b.hiddenUpdates,p=i[v],p===null?i[v]=[l]:p.push(l),l.lane=d|536870912),b):null}function Fp(i){if(50<ff)throw ff=0,h1=null,Error(r(185));for(var l=i.return;l!==null;)i=l,l=i.return;return i.tag===3?i.stateNode:null}var Ou={};function f$(i,l,d,p){this.tag=i,this.key=d,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=p,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Xr(i,l,d,p){return new f$(i,l,d,p)}function o0(i){return i=i.prototype,!(!i||!i.isReactComponent)}function zo(i,l){var d=i.alternate;return d===null?(d=Xr(i.tag,l,i.key,i.mode),d.elementType=i.elementType,d.type=i.type,d.stateNode=i.stateNode,d.alternate=i,i.alternate=d):(d.pendingProps=l,d.type=i.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=i.flags&65011712,d.childLanes=i.childLanes,d.lanes=i.lanes,d.child=i.child,d.memoizedProps=i.memoizedProps,d.memoizedState=i.memoizedState,d.updateQueue=i.updateQueue,l=i.dependencies,d.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},d.sibling=i.sibling,d.index=i.index,d.ref=i.ref,d.refCleanup=i.refCleanup,d}function HI(i,l){i.flags&=65011714;var d=i.alternate;return d===null?(i.childLanes=0,i.lanes=l,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=d.childLanes,i.lanes=d.lanes,i.child=d.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=d.memoizedProps,i.memoizedState=d.memoizedState,i.updateQueue=d.updateQueue,i.type=d.type,l=d.dependencies,i.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext}),i}function zp(i,l,d,p,v,b){var _=0;if(p=i,typeof i=="function")o0(i)&&(_=1);else if(typeof i=="string")_=vq(i,d,ee.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case F:return i=Xr(31,d,l,v),i.elementType=F,i.lanes=b,i;case E:return ol(d.children,v,b,l);case C:_=8,v|=24;break;case w:return i=Xr(12,d,l,v|2),i.elementType=w,i.lanes=b,i;case M:return i=Xr(13,d,l,v),i.elementType=M,i.lanes=b,i;case N:return i=Xr(19,d,l,v),i.elementType=N,i.lanes=b,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case T:_=10;break e;case x:_=9;break e;case R:_=11;break e;case O:_=14;break e;case k:_=16,p=null;break e}_=29,d=Error(r(130,i===null?"null":typeof i,"")),p=null}return l=Xr(_,d,l,v),l.elementType=i,l.type=p,l.lanes=b,l}function ol(i,l,d,p){return i=Xr(7,i,p,l),i.lanes=d,i}function i0(i,l,d){return i=Xr(6,i,null,l),i.lanes=d,i}function $I(i){var l=Xr(18,null,null,0);return l.stateNode=i,l}function a0(i,l,d){return l=Xr(4,i.children!==null?i.children:[],i.key,l),l.lanes=d,l.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},l}var qI=new WeakMap;function ms(i,l){if(typeof i=="object"&&i!==null){var d=qI.get(i);return d!==void 0?d:(l={value:i,source:l,stack:Et(l)},qI.set(i,l),l)}return{value:i,source:l,stack:Et(l)}}var Nu=[],Mu=0,jp=null,qd=0,vs=[],ys=0,$i=null,uo=1,co="";function jo(i,l){Nu[Mu++]=qd,Nu[Mu++]=jp,jp=i,qd=l}function WI(i,l,d){vs[ys++]=uo,vs[ys++]=co,vs[ys++]=$i,$i=i;var p=uo;i=co;var v=32-Yn(p)-1;p&=~(1<<v),d+=1;var b=32-Yn(l)+v;if(30<b){var _=v-v%5;b=(p&(1<<_)-1).toString(32),p>>=_,v-=_,uo=1<<32-Yn(l)+v|d<<v|p,co=b+i}else uo=1<<b|d<<v|p,co=i}function l0(i){i.return!==null&&(jo(i,1),WI(i,1,0))}function u0(i){for(;i===jp;)jp=Nu[--Mu],Nu[Mu]=null,qd=Nu[--Mu],Nu[Mu]=null;for(;i===$i;)$i=vs[--ys],vs[ys]=null,co=vs[--ys],vs[ys]=null,uo=vs[--ys],vs[ys]=null}function VI(i,l){vs[ys++]=uo,vs[ys++]=co,vs[ys++]=$i,uo=l.id,co=l.overflow,$i=i}var Zn=null,Kt=null,dt=!1,qi=null,bs=!1,c0=Error(r(519));function Wi(i){var l=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Wd(ms(l,i)),c0}function GI(i){var l=i.stateNode,d=i.type,p=i.memoizedProps;switch(l[On]=i,l[nt]=p,d){case"dialog":at("cancel",l),at("close",l);break;case"iframe":case"object":case"embed":at("load",l);break;case"video":case"audio":for(d=0;d<pf.length;d++)at(pf[d],l);break;case"source":at("error",l);break;case"img":case"image":case"link":at("error",l),at("load",l);break;case"details":at("toggle",l);break;case"input":at("invalid",l),kd(l,p.value,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name,!0);break;case"select":at("invalid",l);break;case"textarea":at("invalid",l),U(l,p.value,p.defaultValue,p.children)}d=p.children,typeof d!="string"&&typeof d!="number"&&typeof d!="bigint"||l.textContent===""+d||p.suppressHydrationWarning===!0||cN(l.textContent,d)?(p.popover!=null&&(at("beforetoggle",l),at("toggle",l)),p.onScroll!=null&&at("scroll",l),p.onScrollEnd!=null&&at("scrollend",l),p.onClick!=null&&(l.onclick=nn),l=!0):l=!1,l||Wi(i,!0)}function KI(i){for(Zn=i.return;Zn;)switch(Zn.tag){case 5:case 31:case 13:bs=!1;return;case 27:case 3:bs=!0;return;default:Zn=Zn.return}}function Pu(i){if(i!==Zn)return!1;if(!dt)return KI(i),dt=!0,!1;var l=i.tag,d;if((d=l!==3&&l!==27)&&((d=l===5)&&(d=i.type,d=!(d!=="form"&&d!=="button")||R1(i.type,i.memoizedProps)),d=!d),d&&Kt&&Wi(i),KI(i),l===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));Kt=bN(i)}else if(l===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));Kt=bN(i)}else l===27?(l=Kt,oa(i.type)?(i=P1,P1=null,Kt=i):Kt=l):Kt=Zn?Es(i.stateNode.nextSibling):null;return!0}function il(){Kt=Zn=null,dt=!1}function d0(){var i=qi;return i!==null&&(Dr===null?Dr=i:Dr.push.apply(Dr,i),qi=null),i}function Wd(i){qi===null?qi=[i]:qi.push(i)}var f0=L(null),al=null,Bo=null;function Vi(i,l,d){Z(f0,l._currentValue),l._currentValue=d}function Ho(i){i._currentValue=f0.current,G(f0)}function h0(i,l,d){for(;i!==null;){var p=i.alternate;if((i.childLanes&l)!==l?(i.childLanes|=l,p!==null&&(p.childLanes|=l)):p!==null&&(p.childLanes&l)!==l&&(p.childLanes|=l),i===d)break;i=i.return}}function p0(i,l,d,p){var v=i.child;for(v!==null&&(v.return=i);v!==null;){var b=v.dependencies;if(b!==null){var _=v.child;b=b.firstContext;e:for(;b!==null;){var P=b;b=v;for(var B=0;B<l.length;B++)if(P.context===l[B]){b.lanes|=d,P=b.alternate,P!==null&&(P.lanes|=d),h0(b.return,d,i),p||(_=null);break e}b=P.next}}else if(v.tag===18){if(_=v.return,_===null)throw Error(r(341));_.lanes|=d,b=_.alternate,b!==null&&(b.lanes|=d),h0(_,d,i),_=null}else _=v.child;if(_!==null)_.return=v;else for(_=v;_!==null;){if(_===i){_=null;break}if(v=_.sibling,v!==null){v.return=_.return,_=v;break}_=_.return}v=_}}function ku(i,l,d,p){i=null;for(var v=l,b=!1;v!==null;){if(!b){if((v.flags&524288)!==0)b=!0;else if((v.flags&262144)!==0)break}if(v.tag===10){var _=v.alternate;if(_===null)throw Error(r(387));if(_=_.memoizedProps,_!==null){var P=v.type;Zr(v.pendingProps.value,_.value)||(i!==null?i.push(P):i=[P])}}else if(v===ue.current){if(_=v.alternate,_===null)throw Error(r(387));_.memoizedState.memoizedState!==v.memoizedState.memoizedState&&(i!==null?i.push(bf):i=[bf])}v=v.return}i!==null&&p0(l,i,d,p),l.flags|=262144}function Bp(i){for(i=i.firstContext;i!==null;){if(!Zr(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function ll(i){al=i,Bo=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function Xn(i){return YI(al,i)}function Hp(i,l){return al===null&&ll(i),YI(i,l)}function YI(i,l){var d=l._currentValue;if(l={context:l,memoizedValue:d,next:null},Bo===null){if(i===null)throw Error(r(308));Bo=l,i.dependencies={lanes:0,firstContext:l},i.flags|=524288}else Bo=Bo.next=l;return d}var h$=typeof AbortController<"u"?AbortController:function(){var i=[],l=this.signal={aborted:!1,addEventListener:function(d,p){i.push(p)}};this.abort=function(){l.aborted=!0,i.forEach(function(d){return d()})}},p$=t.unstable_scheduleCallback,g$=t.unstable_NormalPriority,En={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function g0(){return{controller:new h$,data:new Map,refCount:0}}function Vd(i){i.refCount--,i.refCount===0&&p$(g$,function(){i.controller.abort()})}var Gd=null,m0=0,Du=0,Lu=null;function m$(i,l){if(Gd===null){var d=Gd=[];m0=0,Du=b1(),Lu={status:"pending",value:void 0,then:function(p){d.push(p)}}}return m0++,l.then(ZI,ZI),l}function ZI(){if(--m0===0&&Gd!==null){Lu!==null&&(Lu.status="fulfilled");var i=Gd;Gd=null,Du=0,Lu=null;for(var l=0;l<i.length;l++)(0,i[l])()}}function v$(i,l){var d=[],p={status:"pending",value:null,reason:null,then:function(v){d.push(v)}};return i.then(function(){p.status="fulfilled",p.value=l;for(var v=0;v<d.length;v++)(0,d[v])(l)},function(v){for(p.status="rejected",p.reason=v,v=0;v<d.length;v++)(0,d[v])(void 0)}),p}var XI=H.S;H.S=function(i,l){kO=Gt(),typeof l=="object"&&l!==null&&typeof l.then=="function"&&m$(i,l),XI!==null&&XI(i,l)};var ul=L(null);function v0(){var i=ul.current;return i!==null?i:Wt.pooledCache}function $p(i,l){l===null?Z(ul,ul.current):Z(ul,l.pool)}function QI(){var i=v0();return i===null?null:{parent:En._currentValue,pool:i}}var Uu=Error(r(460)),y0=Error(r(474)),qp=Error(r(542)),Wp={then:function(){}};function JI(i){return i=i.status,i==="fulfilled"||i==="rejected"}function e2(i,l,d){switch(d=i[d],d===void 0?i.push(l):d!==l&&(l.then(nn,nn),l=d),l.status){case"fulfilled":return l.value;case"rejected":throw i=l.reason,n2(i),i;default:if(typeof l.status=="string")l.then(nn,nn);else{if(i=Wt,i!==null&&100<i.shellSuspendCounter)throw Error(r(482));i=l,i.status="pending",i.then(function(p){if(l.status==="pending"){var v=l;v.status="fulfilled",v.value=p}},function(p){if(l.status==="pending"){var v=l;v.status="rejected",v.reason=p}})}switch(l.status){case"fulfilled":return l.value;case"rejected":throw i=l.reason,n2(i),i}throw dl=l,Uu}}function cl(i){try{var l=i._init;return l(i._payload)}catch(d){throw d!==null&&typeof d=="object"&&typeof d.then=="function"?(dl=d,Uu):d}}var dl=null;function t2(){if(dl===null)throw Error(r(459));var i=dl;return dl=null,i}function n2(i){if(i===Uu||i===qp)throw Error(r(483))}var Fu=null,Kd=0;function Vp(i){var l=Kd;return Kd+=1,Fu===null&&(Fu=[]),e2(Fu,i,l)}function Yd(i,l){l=l.props.ref,i.ref=l!==void 0?l:null}function Gp(i,l){throw l.$$typeof===m?Error(r(525)):(i=Object.prototype.toString.call(l),Error(r(31,i==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":i)))}function r2(i){function l(V,W){if(i){var Q=V.deletions;Q===null?(V.deletions=[W],V.flags|=16):Q.push(W)}}function d(V,W){if(!i)return null;for(;W!==null;)l(V,W),W=W.sibling;return null}function p(V){for(var W=new Map;V!==null;)V.key!==null?W.set(V.key,V):W.set(V.index,V),V=V.sibling;return W}function v(V,W){return V=zo(V,W),V.index=0,V.sibling=null,V}function b(V,W,Q){return V.index=Q,i?(Q=V.alternate,Q!==null?(Q=Q.index,Q<W?(V.flags|=67108866,W):Q):(V.flags|=67108866,W)):(V.flags|=1048576,W)}function _(V){return i&&V.alternate===null&&(V.flags|=67108866),V}function P(V,W,Q,ie){return W===null||W.tag!==6?(W=i0(Q,V.mode,ie),W.return=V,W):(W=v(W,Q),W.return=V,W)}function B(V,W,Q,ie){var Pe=Q.type;return Pe===E?se(V,W,Q.props.children,ie,Q.key):W!==null&&(W.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===k&&cl(Pe)===W.type)?(W=v(W,Q.props),Yd(W,Q),W.return=V,W):(W=zp(Q.type,Q.key,Q.props,null,V.mode,ie),Yd(W,Q),W.return=V,W)}function J(V,W,Q,ie){return W===null||W.tag!==4||W.stateNode.containerInfo!==Q.containerInfo||W.stateNode.implementation!==Q.implementation?(W=a0(Q,V.mode,ie),W.return=V,W):(W=v(W,Q.children||[]),W.return=V,W)}function se(V,W,Q,ie,Pe){return W===null||W.tag!==7?(W=ol(Q,V.mode,ie,Pe),W.return=V,W):(W=v(W,Q),W.return=V,W)}function ae(V,W,Q){if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return W=i0(""+W,V.mode,Q),W.return=V,W;if(typeof W=="object"&&W!==null){switch(W.$$typeof){case y:return Q=zp(W.type,W.key,W.props,null,V.mode,Q),Yd(Q,W),Q.return=V,Q;case S:return W=a0(W,V.mode,Q),W.return=V,W;case k:return W=cl(W),ae(V,W,Q)}if(Y(W)||z(W))return W=ol(W,V.mode,Q,null),W.return=V,W;if(typeof W.then=="function")return ae(V,Vp(W),Q);if(W.$$typeof===T)return ae(V,Hp(V,W),Q);Gp(V,W)}return null}function ne(V,W,Q,ie){var Pe=W!==null?W.key:null;if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return Pe!==null?null:P(V,W,""+Q,ie);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case y:return Q.key===Pe?B(V,W,Q,ie):null;case S:return Q.key===Pe?J(V,W,Q,ie):null;case k:return Q=cl(Q),ne(V,W,Q,ie)}if(Y(Q)||z(Q))return Pe!==null?null:se(V,W,Q,ie,null);if(typeof Q.then=="function")return ne(V,W,Vp(Q),ie);if(Q.$$typeof===T)return ne(V,W,Hp(V,Q),ie);Gp(V,Q)}return null}function re(V,W,Q,ie,Pe){if(typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint")return V=V.get(Q)||null,P(W,V,""+ie,Pe);if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case y:return V=V.get(ie.key===null?Q:ie.key)||null,B(W,V,ie,Pe);case S:return V=V.get(ie.key===null?Q:ie.key)||null,J(W,V,ie,Pe);case k:return ie=cl(ie),re(V,W,Q,ie,Pe)}if(Y(ie)||z(ie))return V=V.get(Q)||null,se(W,V,ie,Pe,null);if(typeof ie.then=="function")return re(V,W,Q,Vp(ie),Pe);if(ie.$$typeof===T)return re(V,W,Q,Hp(W,ie),Pe);Gp(W,ie)}return null}function Re(V,W,Q,ie){for(var Pe=null,xt=null,Ne=W,Je=W=0,ct=null;Ne!==null&&Je<Q.length;Je++){Ne.index>Je?(ct=Ne,Ne=null):ct=Ne.sibling;var _t=ne(V,Ne,Q[Je],ie);if(_t===null){Ne===null&&(Ne=ct);break}i&&Ne&&_t.alternate===null&&l(V,Ne),W=b(_t,W,Je),xt===null?Pe=_t:xt.sibling=_t,xt=_t,Ne=ct}if(Je===Q.length)return d(V,Ne),dt&&jo(V,Je),Pe;if(Ne===null){for(;Je<Q.length;Je++)Ne=ae(V,Q[Je],ie),Ne!==null&&(W=b(Ne,W,Je),xt===null?Pe=Ne:xt.sibling=Ne,xt=Ne);return dt&&jo(V,Je),Pe}for(Ne=p(Ne);Je<Q.length;Je++)ct=re(Ne,V,Je,Q[Je],ie),ct!==null&&(i&&ct.alternate!==null&&Ne.delete(ct.key===null?Je:ct.key),W=b(ct,W,Je),xt===null?Pe=ct:xt.sibling=ct,xt=ct);return i&&Ne.forEach(function(ca){return l(V,ca)}),dt&&jo(V,Je),Pe}function De(V,W,Q,ie){if(Q==null)throw Error(r(151));for(var Pe=null,xt=null,Ne=W,Je=W=0,ct=null,_t=Q.next();Ne!==null&&!_t.done;Je++,_t=Q.next()){Ne.index>Je?(ct=Ne,Ne=null):ct=Ne.sibling;var ca=ne(V,Ne,_t.value,ie);if(ca===null){Ne===null&&(Ne=ct);break}i&&Ne&&ca.alternate===null&&l(V,Ne),W=b(ca,W,Je),xt===null?Pe=ca:xt.sibling=ca,xt=ca,Ne=ct}if(_t.done)return d(V,Ne),dt&&jo(V,Je),Pe;if(Ne===null){for(;!_t.done;Je++,_t=Q.next())_t=ae(V,_t.value,ie),_t!==null&&(W=b(_t,W,Je),xt===null?Pe=_t:xt.sibling=_t,xt=_t);return dt&&jo(V,Je),Pe}for(Ne=p(Ne);!_t.done;Je++,_t=Q.next())_t=re(Ne,V,Je,_t.value,ie),_t!==null&&(i&&_t.alternate!==null&&Ne.delete(_t.key===null?Je:_t.key),W=b(_t,W,Je),xt===null?Pe=_t:xt.sibling=_t,xt=_t);return i&&Ne.forEach(function(Rq){return l(V,Rq)}),dt&&jo(V,Je),Pe}function jt(V,W,Q,ie){if(typeof Q=="object"&&Q!==null&&Q.type===E&&Q.key===null&&(Q=Q.props.children),typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case y:e:{for(var Pe=Q.key;W!==null;){if(W.key===Pe){if(Pe=Q.type,Pe===E){if(W.tag===7){d(V,W.sibling),ie=v(W,Q.props.children),ie.return=V,V=ie;break e}}else if(W.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===k&&cl(Pe)===W.type){d(V,W.sibling),ie=v(W,Q.props),Yd(ie,Q),ie.return=V,V=ie;break e}d(V,W);break}else l(V,W);W=W.sibling}Q.type===E?(ie=ol(Q.props.children,V.mode,ie,Q.key),ie.return=V,V=ie):(ie=zp(Q.type,Q.key,Q.props,null,V.mode,ie),Yd(ie,Q),ie.return=V,V=ie)}return _(V);case S:e:{for(Pe=Q.key;W!==null;){if(W.key===Pe)if(W.tag===4&&W.stateNode.containerInfo===Q.containerInfo&&W.stateNode.implementation===Q.implementation){d(V,W.sibling),ie=v(W,Q.children||[]),ie.return=V,V=ie;break e}else{d(V,W);break}else l(V,W);W=W.sibling}ie=a0(Q,V.mode,ie),ie.return=V,V=ie}return _(V);case k:return Q=cl(Q),jt(V,W,Q,ie)}if(Y(Q))return Re(V,W,Q,ie);if(z(Q)){if(Pe=z(Q),typeof Pe!="function")throw Error(r(150));return Q=Pe.call(Q),De(V,W,Q,ie)}if(typeof Q.then=="function")return jt(V,W,Vp(Q),ie);if(Q.$$typeof===T)return jt(V,W,Hp(V,Q),ie);Gp(V,Q)}return typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint"?(Q=""+Q,W!==null&&W.tag===6?(d(V,W.sibling),ie=v(W,Q),ie.return=V,V=ie):(d(V,W),ie=i0(Q,V.mode,ie),ie.return=V,V=ie),_(V)):d(V,W)}return function(V,W,Q,ie){try{Kd=0;var Pe=jt(V,W,Q,ie);return Fu=null,Pe}catch(Ne){if(Ne===Uu||Ne===qp)throw Ne;var xt=Xr(29,Ne,null,V.mode);return xt.lanes=ie,xt.return=V,xt}}}var fl=r2(!0),s2=r2(!1),Gi=!1;function b0(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function S0(i,l){i=i.updateQueue,l.updateQueue===i&&(l.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function Ki(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function Yi(i,l,d){var p=i.updateQueue;if(p===null)return null;if(p=p.shared,(It&2)!==0){var v=p.pending;return v===null?l.next=l:(l.next=v.next,v.next=l),p.pending=l,l=Fp(i),BI(i,null,d),l}return Up(i,p,l,d),Fp(i)}function Zd(i,l,d){if(l=l.updateQueue,l!==null&&(l=l.shared,(d&4194048)!==0)){var p=l.lanes;p&=i.pendingLanes,d|=p,l.lanes=d,_d(i,d)}}function E0(i,l){var d=i.updateQueue,p=i.alternate;if(p!==null&&(p=p.updateQueue,d===p)){var v=null,b=null;if(d=d.firstBaseUpdate,d!==null){do{var _={lane:d.lane,tag:d.tag,payload:d.payload,callback:null,next:null};b===null?v=b=_:b=b.next=_,d=d.next}while(d!==null);b===null?v=b=l:b=b.next=l}else v=b=l;d={baseState:p.baseState,firstBaseUpdate:v,lastBaseUpdate:b,shared:p.shared,callbacks:p.callbacks},i.updateQueue=d;return}i=d.lastBaseUpdate,i===null?d.firstBaseUpdate=l:i.next=l,d.lastBaseUpdate=l}var C0=!1;function Xd(){if(C0){var i=Lu;if(i!==null)throw i}}function Qd(i,l,d,p){C0=!1;var v=i.updateQueue;Gi=!1;var b=v.firstBaseUpdate,_=v.lastBaseUpdate,P=v.shared.pending;if(P!==null){v.shared.pending=null;var B=P,J=B.next;B.next=null,_===null?b=J:_.next=J,_=B;var se=i.alternate;se!==null&&(se=se.updateQueue,P=se.lastBaseUpdate,P!==_&&(P===null?se.firstBaseUpdate=J:P.next=J,se.lastBaseUpdate=B))}if(b!==null){var ae=v.baseState;_=0,se=J=B=null,P=b;do{var ne=P.lane&-536870913,re=ne!==P.lane;if(re?(ut&ne)===ne:(p&ne)===ne){ne!==0&&ne===Du&&(C0=!0),se!==null&&(se=se.next={lane:0,tag:P.tag,payload:P.payload,callback:null,next:null});e:{var Re=i,De=P;ne=l;var jt=d;switch(De.tag){case 1:if(Re=De.payload,typeof Re=="function"){ae=Re.call(jt,ae,ne);break e}ae=Re;break e;case 3:Re.flags=Re.flags&-65537|128;case 0:if(Re=De.payload,ne=typeof Re=="function"?Re.call(jt,ae,ne):Re,ne==null)break e;ae=g({},ae,ne);break e;case 2:Gi=!0}}ne=P.callback,ne!==null&&(i.flags|=64,re&&(i.flags|=8192),re=v.callbacks,re===null?v.callbacks=[ne]:re.push(ne))}else re={lane:ne,tag:P.tag,payload:P.payload,callback:P.callback,next:null},se===null?(J=se=re,B=ae):se=se.next=re,_|=ne;if(P=P.next,P===null){if(P=v.shared.pending,P===null)break;re=P,P=re.next,re.next=null,v.lastBaseUpdate=re,v.shared.pending=null}}while(!0);se===null&&(B=ae),v.baseState=B,v.firstBaseUpdate=J,v.lastBaseUpdate=se,b===null&&(v.shared.lanes=0),ea|=_,i.lanes=_,i.memoizedState=ae}}function o2(i,l){if(typeof i!="function")throw Error(r(191,i));i.call(l)}function i2(i,l){var d=i.callbacks;if(d!==null)for(i.callbacks=null,i=0;i<d.length;i++)o2(d[i],l)}var zu=L(null),Kp=L(0);function a2(i,l){i=Xo,Z(Kp,i),Z(zu,l),Xo=i|l.baseLanes}function w0(){Z(Kp,Xo),Z(zu,zu.current)}function x0(){Xo=Kp.current,G(zu),G(Kp)}var Qr=L(null),Ss=null;function Zi(i){var l=i.alternate;Z(bn,bn.current&1),Z(Qr,i),Ss===null&&(l===null||zu.current!==null||l.memoizedState!==null)&&(Ss=i)}function _0(i){Z(bn,bn.current),Z(Qr,i),Ss===null&&(Ss=i)}function l2(i){i.tag===22?(Z(bn,bn.current),Z(Qr,i),Ss===null&&(Ss=i)):Xi()}function Xi(){Z(bn,bn.current),Z(Qr,Qr.current)}function Jr(i){G(Qr),Ss===i&&(Ss=null),G(bn)}var bn=L(0);function Yp(i){for(var l=i;l!==null;){if(l.tag===13){var d=l.memoizedState;if(d!==null&&(d=d.dehydrated,d===null||N1(d)||M1(d)))return l}else if(l.tag===19&&(l.memoizedProps.revealOrder==="forwards"||l.memoizedProps.revealOrder==="backwards"||l.memoizedProps.revealOrder==="unstable_legacy-backwards"||l.memoizedProps.revealOrder==="together")){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===i)break;for(;l.sibling===null;){if(l.return===null||l.return===i)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var $o=0,Qe=null,Ft=null,Cn=null,Zp=!1,ju=!1,hl=!1,Xp=0,Jd=0,Bu=null,y$=0;function hn(){throw Error(r(321))}function A0(i,l){if(l===null)return!1;for(var d=0;d<l.length&&d<i.length;d++)if(!Zr(i[d],l[d]))return!1;return!0}function T0(i,l,d,p,v,b){return $o=b,Qe=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,H.H=i===null||i.memoizedState===null?W2:H0,hl=!1,b=d(p,v),hl=!1,ju&&(b=c2(l,d,p,v)),u2(i),b}function u2(i){H.H=nf;var l=Ft!==null&&Ft.next!==null;if($o=0,Cn=Ft=Qe=null,Zp=!1,Jd=0,Bu=null,l)throw Error(r(300));i===null||wn||(i=i.dependencies,i!==null&&Bp(i)&&(wn=!0))}function c2(i,l,d,p){Qe=i;var v=0;do{if(ju&&(Bu=null),Jd=0,ju=!1,25<=v)throw Error(r(301));if(v+=1,Cn=Ft=null,i.updateQueue!=null){var b=i.updateQueue;b.lastEffect=null,b.events=null,b.stores=null,b.memoCache!=null&&(b.memoCache.index=0)}H.H=V2,b=l(d,p)}while(ju);return b}function b$(){var i=H.H,l=i.useState()[0];return l=typeof l.then=="function"?ef(l):l,i=i.useState()[0],(Ft!==null?Ft.memoizedState:null)!==i&&(Qe.flags|=1024),l}function R0(){var i=Xp!==0;return Xp=0,i}function I0(i,l,d){l.updateQueue=i.updateQueue,l.flags&=-2053,i.lanes&=~d}function O0(i){if(Zp){for(i=i.memoizedState;i!==null;){var l=i.queue;l!==null&&(l.pending=null),i=i.next}Zp=!1}$o=0,Cn=Ft=Qe=null,ju=!1,Jd=Xp=0,Bu=null}function br(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Cn===null?Qe.memoizedState=Cn=i:Cn=Cn.next=i,Cn}function Sn(){if(Ft===null){var i=Qe.alternate;i=i!==null?i.memoizedState:null}else i=Ft.next;var l=Cn===null?Qe.memoizedState:Cn.next;if(l!==null)Cn=l,Ft=i;else{if(i===null)throw Qe.alternate===null?Error(r(467)):Error(r(310));Ft=i,i={memoizedState:Ft.memoizedState,baseState:Ft.baseState,baseQueue:Ft.baseQueue,queue:Ft.queue,next:null},Cn===null?Qe.memoizedState=Cn=i:Cn=Cn.next=i}return Cn}function Qp(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ef(i){var l=Jd;return Jd+=1,Bu===null&&(Bu=[]),i=e2(Bu,i,l),l=Qe,(Cn===null?l.memoizedState:Cn.next)===null&&(l=l.alternate,H.H=l===null||l.memoizedState===null?W2:H0),i}function Jp(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return ef(i);if(i.$$typeof===T)return Xn(i)}throw Error(r(438,String(i)))}function N0(i){var l=null,d=Qe.updateQueue;if(d!==null&&(l=d.memoCache),l==null){var p=Qe.alternate;p!==null&&(p=p.updateQueue,p!==null&&(p=p.memoCache,p!=null&&(l={data:p.data.map(function(v){return v.slice()}),index:0})))}if(l==null&&(l={data:[],index:0}),d===null&&(d=Qp(),Qe.updateQueue=d),d.memoCache=l,d=l.data[l.index],d===void 0)for(d=l.data[l.index]=Array(i),p=0;p<i;p++)d[p]=$;return l.index++,d}function qo(i,l){return typeof l=="function"?l(i):l}function eg(i){var l=Sn();return M0(l,Ft,i)}function M0(i,l,d){var p=i.queue;if(p===null)throw Error(r(311));p.lastRenderedReducer=d;var v=i.baseQueue,b=p.pending;if(b!==null){if(v!==null){var _=v.next;v.next=b.next,b.next=_}l.baseQueue=v=b,p.pending=null}if(b=i.baseState,v===null)i.memoizedState=b;else{l=v.next;var P=_=null,B=null,J=l,se=!1;do{var ae=J.lane&-536870913;if(ae!==J.lane?(ut&ae)===ae:($o&ae)===ae){var ne=J.revertLane;if(ne===0)B!==null&&(B=B.next={lane:0,revertLane:0,gesture:null,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null}),ae===Du&&(se=!0);else if(($o&ne)===ne){J=J.next,ne===Du&&(se=!0);continue}else ae={lane:0,revertLane:J.revertLane,gesture:null,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null},B===null?(P=B=ae,_=b):B=B.next=ae,Qe.lanes|=ne,ea|=ne;ae=J.action,hl&&d(b,ae),b=J.hasEagerState?J.eagerState:d(b,ae)}else ne={lane:ae,revertLane:J.revertLane,gesture:J.gesture,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null},B===null?(P=B=ne,_=b):B=B.next=ne,Qe.lanes|=ae,ea|=ae;J=J.next}while(J!==null&&J!==l);if(B===null?_=b:B.next=P,!Zr(b,i.memoizedState)&&(wn=!0,se&&(d=Lu,d!==null)))throw d;i.memoizedState=b,i.baseState=_,i.baseQueue=B,p.lastRenderedState=b}return v===null&&(p.lanes=0),[i.memoizedState,p.dispatch]}function P0(i){var l=Sn(),d=l.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=i;var p=d.dispatch,v=d.pending,b=l.memoizedState;if(v!==null){d.pending=null;var _=v=v.next;do b=i(b,_.action),_=_.next;while(_!==v);Zr(b,l.memoizedState)||(wn=!0),l.memoizedState=b,l.baseQueue===null&&(l.baseState=b),d.lastRenderedState=b}return[b,p]}function d2(i,l,d){var p=Qe,v=Sn(),b=dt;if(b){if(d===void 0)throw Error(r(407));d=d()}else d=l();var _=!Zr((Ft||v).memoizedState,d);if(_&&(v.memoizedState=d,wn=!0),v=v.queue,L0(p2.bind(null,p,v,i),[i]),v.getSnapshot!==l||_||Cn!==null&&Cn.memoizedState.tag&1){if(p.flags|=2048,Hu(9,{destroy:void 0},h2.bind(null,p,v,d,l),null),Wt===null)throw Error(r(349));b||($o&127)!==0||f2(p,l,d)}return d}function f2(i,l,d){i.flags|=16384,i={getSnapshot:l,value:d},l=Qe.updateQueue,l===null?(l=Qp(),Qe.updateQueue=l,l.stores=[i]):(d=l.stores,d===null?l.stores=[i]:d.push(i))}function h2(i,l,d,p){l.value=d,l.getSnapshot=p,g2(l)&&m2(i)}function p2(i,l,d){return d(function(){g2(l)&&m2(i)})}function g2(i){var l=i.getSnapshot;i=i.value;try{var d=l();return!Zr(i,d)}catch{return!0}}function m2(i){var l=sl(i,2);l!==null&&Lr(l,i,2)}function k0(i){var l=br();if(typeof i=="function"){var d=i;if(i=d(),hl){Ps(!0);try{d()}finally{Ps(!1)}}}return l.memoizedState=l.baseState=i,l.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:qo,lastRenderedState:i},l}function v2(i,l,d,p){return i.baseState=d,M0(i,Ft,typeof p=="function"?p:qo)}function S$(i,l,d,p,v){if(rg(i))throw Error(r(485));if(i=l.action,i!==null){var b={payload:v,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(_){b.listeners.push(_)}};H.T!==null?d(!0):b.isTransition=!1,p(b),d=l.pending,d===null?(b.next=l.pending=b,y2(l,b)):(b.next=d.next,l.pending=d.next=b)}}function y2(i,l){var d=l.action,p=l.payload,v=i.state;if(l.isTransition){var b=H.T,_={};H.T=_;try{var P=d(v,p),B=H.S;B!==null&&B(_,P),b2(i,l,P)}catch(J){D0(i,l,J)}finally{b!==null&&_.types!==null&&(b.types=_.types),H.T=b}}else try{b=d(v,p),b2(i,l,b)}catch(J){D0(i,l,J)}}function b2(i,l,d){d!==null&&typeof d=="object"&&typeof d.then=="function"?d.then(function(p){S2(i,l,p)},function(p){return D0(i,l,p)}):S2(i,l,d)}function S2(i,l,d){l.status="fulfilled",l.value=d,E2(l),i.state=d,l=i.pending,l!==null&&(d=l.next,d===l?i.pending=null:(d=d.next,l.next=d,y2(i,d)))}function D0(i,l,d){var p=i.pending;if(i.pending=null,p!==null){p=p.next;do l.status="rejected",l.reason=d,E2(l),l=l.next;while(l!==p)}i.action=null}function E2(i){i=i.listeners;for(var l=0;l<i.length;l++)(0,i[l])()}function C2(i,l){return l}function w2(i,l){if(dt){var d=Wt.formState;if(d!==null){e:{var p=Qe;if(dt){if(Kt){t:{for(var v=Kt,b=bs;v.nodeType!==8;){if(!b){v=null;break t}if(v=Es(v.nextSibling),v===null){v=null;break t}}b=v.data,v=b==="F!"||b==="F"?v:null}if(v){Kt=Es(v.nextSibling),p=v.data==="F!";break e}}Wi(p)}p=!1}p&&(l=d[0])}}return d=br(),d.memoizedState=d.baseState=l,p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:C2,lastRenderedState:l},d.queue=p,d=H2.bind(null,Qe,p),p.dispatch=d,p=k0(!1),b=B0.bind(null,Qe,!1,p.queue),p=br(),v={state:l,dispatch:null,action:i,pending:null},p.queue=v,d=S$.bind(null,Qe,v,b,d),v.dispatch=d,p.memoizedState=i,[l,d,!1]}function x2(i){var l=Sn();return _2(l,Ft,i)}function _2(i,l,d){if(l=M0(i,l,C2)[0],i=eg(qo)[0],typeof l=="object"&&l!==null&&typeof l.then=="function")try{var p=ef(l)}catch(_){throw _===Uu?qp:_}else p=l;l=Sn();var v=l.queue,b=v.dispatch;return d!==l.memoizedState&&(Qe.flags|=2048,Hu(9,{destroy:void 0},E$.bind(null,v,d),null)),[p,b,i]}function E$(i,l){i.action=l}function A2(i){var l=Sn(),d=Ft;if(d!==null)return _2(l,d,i);Sn(),l=l.memoizedState,d=Sn();var p=d.queue.dispatch;return d.memoizedState=i,[l,p,!1]}function Hu(i,l,d,p){return i={tag:i,create:d,deps:p,inst:l,next:null},l=Qe.updateQueue,l===null&&(l=Qp(),Qe.updateQueue=l),d=l.lastEffect,d===null?l.lastEffect=i.next=i:(p=d.next,d.next=i,i.next=p,l.lastEffect=i),i}function T2(){return Sn().memoizedState}function tg(i,l,d,p){var v=br();Qe.flags|=i,v.memoizedState=Hu(1|l,{destroy:void 0},d,p===void 0?null:p)}function ng(i,l,d,p){var v=Sn();p=p===void 0?null:p;var b=v.memoizedState.inst;Ft!==null&&p!==null&&A0(p,Ft.memoizedState.deps)?v.memoizedState=Hu(l,b,d,p):(Qe.flags|=i,v.memoizedState=Hu(1|l,b,d,p))}function R2(i,l){tg(8390656,8,i,l)}function L0(i,l){ng(2048,8,i,l)}function C$(i){Qe.flags|=4;var l=Qe.updateQueue;if(l===null)l=Qp(),Qe.updateQueue=l,l.events=[i];else{var d=l.events;d===null?l.events=[i]:d.push(i)}}function I2(i){var l=Sn().memoizedState;return C$({ref:l,nextImpl:i}),function(){if((It&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}function O2(i,l){return ng(4,2,i,l)}function N2(i,l){return ng(4,4,i,l)}function M2(i,l){if(typeof l=="function"){i=i();var d=l(i);return function(){typeof d=="function"?d():l(null)}}if(l!=null)return i=i(),l.current=i,function(){l.current=null}}function P2(i,l,d){d=d!=null?d.concat([i]):null,ng(4,4,M2.bind(null,l,i),d)}function U0(){}function k2(i,l){var d=Sn();l=l===void 0?null:l;var p=d.memoizedState;return l!==null&&A0(l,p[1])?p[0]:(d.memoizedState=[i,l],i)}function D2(i,l){var d=Sn();l=l===void 0?null:l;var p=d.memoizedState;if(l!==null&&A0(l,p[1]))return p[0];if(p=i(),hl){Ps(!0);try{i()}finally{Ps(!1)}}return d.memoizedState=[p,l],p}function F0(i,l,d){return d===void 0||($o&1073741824)!==0&&(ut&261930)===0?i.memoizedState=l:(i.memoizedState=d,i=LO(),Qe.lanes|=i,ea|=i,d)}function L2(i,l,d,p){return Zr(d,l)?d:zu.current!==null?(i=F0(i,d,p),Zr(i,l)||(wn=!0),i):($o&42)===0||($o&1073741824)!==0&&(ut&261930)===0?(wn=!0,i.memoizedState=d):(i=LO(),Qe.lanes|=i,ea|=i,l)}function U2(i,l,d,p,v){var b=te.p;te.p=b!==0&&8>b?b:8;var _=H.T,P={};H.T=P,B0(i,!1,l,d);try{var B=v(),J=H.S;if(J!==null&&J(P,B),B!==null&&typeof B=="object"&&typeof B.then=="function"){var se=v$(B,p);tf(i,l,se,ns(i))}else tf(i,l,p,ns(i))}catch(ae){tf(i,l,{then:function(){},status:"rejected",reason:ae},ns())}finally{te.p=b,_!==null&&P.types!==null&&(_.types=P.types),H.T=_}}function w$(){}function z0(i,l,d,p){if(i.tag!==5)throw Error(r(476));var v=F2(i).queue;U2(i,v,l,fe,d===null?w$:function(){return z2(i),d(p)})}function F2(i){var l=i.memoizedState;if(l!==null)return l;l={memoizedState:fe,baseState:fe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:qo,lastRenderedState:fe},next:null};var d={};return l.next={memoizedState:d,baseState:d,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:qo,lastRenderedState:d},next:null},i.memoizedState=l,i=i.alternate,i!==null&&(i.memoizedState=l),l}function z2(i){var l=F2(i);l.next===null&&(l=i.alternate.memoizedState),tf(i,l.next.queue,{},ns())}function j0(){return Xn(bf)}function j2(){return Sn().memoizedState}function B2(){return Sn().memoizedState}function x$(i){for(var l=i.return;l!==null;){switch(l.tag){case 24:case 3:var d=ns();i=Ki(d);var p=Yi(l,i,d);p!==null&&(Lr(p,l,d),Zd(p,l,d)),l={cache:g0()},i.payload=l;return}l=l.return}}function _$(i,l,d){var p=ns();d={lane:p,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},rg(i)?$2(l,d):(d=s0(i,l,d,p),d!==null&&(Lr(d,i,p),q2(d,l,p)))}function H2(i,l,d){var p=ns();tf(i,l,d,p)}function tf(i,l,d,p){var v={lane:p,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null};if(rg(i))$2(l,v);else{var b=i.alternate;if(i.lanes===0&&(b===null||b.lanes===0)&&(b=l.lastRenderedReducer,b!==null))try{var _=l.lastRenderedState,P=b(_,d);if(v.hasEagerState=!0,v.eagerState=P,Zr(P,_))return Up(i,l,v,0),Wt===null&&Lp(),!1}catch{}if(d=s0(i,l,v,p),d!==null)return Lr(d,i,p),q2(d,l,p),!0}return!1}function B0(i,l,d,p){if(p={lane:2,revertLane:b1(),gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},rg(i)){if(l)throw Error(r(479))}else l=s0(i,d,p,2),l!==null&&Lr(l,i,2)}function rg(i){var l=i.alternate;return i===Qe||l!==null&&l===Qe}function $2(i,l){ju=Zp=!0;var d=i.pending;d===null?l.next=l:(l.next=d.next,d.next=l),i.pending=l}function q2(i,l,d){if((d&4194048)!==0){var p=l.lanes;p&=i.pendingLanes,d|=p,l.lanes=d,_d(i,d)}}var nf={readContext:Xn,use:Jp,useCallback:hn,useContext:hn,useEffect:hn,useImperativeHandle:hn,useLayoutEffect:hn,useInsertionEffect:hn,useMemo:hn,useReducer:hn,useRef:hn,useState:hn,useDebugValue:hn,useDeferredValue:hn,useTransition:hn,useSyncExternalStore:hn,useId:hn,useHostTransitionStatus:hn,useFormState:hn,useActionState:hn,useOptimistic:hn,useMemoCache:hn,useCacheRefresh:hn};nf.useEffectEvent=hn;var W2={readContext:Xn,use:Jp,useCallback:function(i,l){return br().memoizedState=[i,l===void 0?null:l],i},useContext:Xn,useEffect:R2,useImperativeHandle:function(i,l,d){d=d!=null?d.concat([i]):null,tg(4194308,4,M2.bind(null,l,i),d)},useLayoutEffect:function(i,l){return tg(4194308,4,i,l)},useInsertionEffect:function(i,l){tg(4,2,i,l)},useMemo:function(i,l){var d=br();l=l===void 0?null:l;var p=i();if(hl){Ps(!0);try{i()}finally{Ps(!1)}}return d.memoizedState=[p,l],p},useReducer:function(i,l,d){var p=br();if(d!==void 0){var v=d(l);if(hl){Ps(!0);try{d(l)}finally{Ps(!1)}}}else v=l;return p.memoizedState=p.baseState=v,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:v},p.queue=i,i=i.dispatch=_$.bind(null,Qe,i),[p.memoizedState,i]},useRef:function(i){var l=br();return i={current:i},l.memoizedState=i},useState:function(i){i=k0(i);var l=i.queue,d=H2.bind(null,Qe,l);return l.dispatch=d,[i.memoizedState,d]},useDebugValue:U0,useDeferredValue:function(i,l){var d=br();return F0(d,i,l)},useTransition:function(){var i=k0(!1);return i=U2.bind(null,Qe,i.queue,!0,!1),br().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,l,d){var p=Qe,v=br();if(dt){if(d===void 0)throw Error(r(407));d=d()}else{if(d=l(),Wt===null)throw Error(r(349));(ut&127)!==0||f2(p,l,d)}v.memoizedState=d;var b={value:d,getSnapshot:l};return v.queue=b,R2(p2.bind(null,p,b,i),[i]),p.flags|=2048,Hu(9,{destroy:void 0},h2.bind(null,p,b,d,l),null),d},useId:function(){var i=br(),l=Wt.identifierPrefix;if(dt){var d=co,p=uo;d=(p&~(1<<32-Yn(p)-1)).toString(32)+d,l="_"+l+"R_"+d,d=Xp++,0<d&&(l+="H"+d.toString(32)),l+="_"}else d=y$++,l="_"+l+"r_"+d.toString(32)+"_";return i.memoizedState=l},useHostTransitionStatus:j0,useFormState:w2,useActionState:w2,useOptimistic:function(i){var l=br();l.memoizedState=l.baseState=i;var d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return l.queue=d,l=B0.bind(null,Qe,!0,d),d.dispatch=l,[i,l]},useMemoCache:N0,useCacheRefresh:function(){return br().memoizedState=x$.bind(null,Qe)},useEffectEvent:function(i){var l=br(),d={impl:i};return l.memoizedState=d,function(){if((It&2)!==0)throw Error(r(440));return d.impl.apply(void 0,arguments)}}},H0={readContext:Xn,use:Jp,useCallback:k2,useContext:Xn,useEffect:L0,useImperativeHandle:P2,useInsertionEffect:O2,useLayoutEffect:N2,useMemo:D2,useReducer:eg,useRef:T2,useState:function(){return eg(qo)},useDebugValue:U0,useDeferredValue:function(i,l){var d=Sn();return L2(d,Ft.memoizedState,i,l)},useTransition:function(){var i=eg(qo)[0],l=Sn().memoizedState;return[typeof i=="boolean"?i:ef(i),l]},useSyncExternalStore:d2,useId:j2,useHostTransitionStatus:j0,useFormState:x2,useActionState:x2,useOptimistic:function(i,l){var d=Sn();return v2(d,Ft,i,l)},useMemoCache:N0,useCacheRefresh:B2};H0.useEffectEvent=I2;var V2={readContext:Xn,use:Jp,useCallback:k2,useContext:Xn,useEffect:L0,useImperativeHandle:P2,useInsertionEffect:O2,useLayoutEffect:N2,useMemo:D2,useReducer:P0,useRef:T2,useState:function(){return P0(qo)},useDebugValue:U0,useDeferredValue:function(i,l){var d=Sn();return Ft===null?F0(d,i,l):L2(d,Ft.memoizedState,i,l)},useTransition:function(){var i=P0(qo)[0],l=Sn().memoizedState;return[typeof i=="boolean"?i:ef(i),l]},useSyncExternalStore:d2,useId:j2,useHostTransitionStatus:j0,useFormState:A2,useActionState:A2,useOptimistic:function(i,l){var d=Sn();return Ft!==null?v2(d,Ft,i,l):(d.baseState=i,[i,d.queue.dispatch])},useMemoCache:N0,useCacheRefresh:B2};V2.useEffectEvent=I2;function $0(i,l,d,p){l=i.memoizedState,d=d(p,l),d=d==null?l:g({},l,d),i.memoizedState=d,i.lanes===0&&(i.updateQueue.baseState=d)}var q0={enqueueSetState:function(i,l,d){i=i._reactInternals;var p=ns(),v=Ki(p);v.payload=l,d!=null&&(v.callback=d),l=Yi(i,v,p),l!==null&&(Lr(l,i,p),Zd(l,i,p))},enqueueReplaceState:function(i,l,d){i=i._reactInternals;var p=ns(),v=Ki(p);v.tag=1,v.payload=l,d!=null&&(v.callback=d),l=Yi(i,v,p),l!==null&&(Lr(l,i,p),Zd(l,i,p))},enqueueForceUpdate:function(i,l){i=i._reactInternals;var d=ns(),p=Ki(d);p.tag=2,l!=null&&(p.callback=l),l=Yi(i,p,d),l!==null&&(Lr(l,i,d),Zd(l,i,d))}};function G2(i,l,d,p,v,b,_){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(p,b,_):l.prototype&&l.prototype.isPureReactComponent?!Hd(d,p)||!Hd(v,b):!0}function K2(i,l,d,p){i=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(d,p),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(d,p),l.state!==i&&q0.enqueueReplaceState(l,l.state,null)}function pl(i,l){var d=l;if("ref"in l){d={};for(var p in l)p!=="ref"&&(d[p]=l[p])}if(i=i.defaultProps){d===l&&(d=g({},d));for(var v in i)d[v]===void 0&&(d[v]=i[v])}return d}function Y2(i){Dp(i)}function Z2(i){console.error(i)}function X2(i){Dp(i)}function sg(i,l){try{var d=i.onUncaughtError;d(l.value,{componentStack:l.stack})}catch(p){setTimeout(function(){throw p})}}function Q2(i,l,d){try{var p=i.onCaughtError;p(d.value,{componentStack:d.stack,errorBoundary:l.tag===1?l.stateNode:null})}catch(v){setTimeout(function(){throw v})}}function W0(i,l,d){return d=Ki(d),d.tag=3,d.payload={element:null},d.callback=function(){sg(i,l)},d}function J2(i){return i=Ki(i),i.tag=3,i}function eO(i,l,d,p){var v=d.type.getDerivedStateFromError;if(typeof v=="function"){var b=p.value;i.payload=function(){return v(b)},i.callback=function(){Q2(l,d,p)}}var _=d.stateNode;_!==null&&typeof _.componentDidCatch=="function"&&(i.callback=function(){Q2(l,d,p),typeof v!="function"&&(ta===null?ta=new Set([this]):ta.add(this));var P=p.stack;this.componentDidCatch(p.value,{componentStack:P!==null?P:""})})}function A$(i,l,d,p,v){if(d.flags|=32768,p!==null&&typeof p=="object"&&typeof p.then=="function"){if(l=d.alternate,l!==null&&ku(l,d,v,!0),d=Qr.current,d!==null){switch(d.tag){case 31:case 13:return Ss===null?mg():d.alternate===null&&pn===0&&(pn=3),d.flags&=-257,d.flags|=65536,d.lanes=v,p===Wp?d.flags|=16384:(l=d.updateQueue,l===null?d.updateQueue=new Set([p]):l.add(p),m1(i,p,v)),!1;case 22:return d.flags|=65536,p===Wp?d.flags|=16384:(l=d.updateQueue,l===null?(l={transitions:null,markerInstances:null,retryQueue:new Set([p])},d.updateQueue=l):(d=l.retryQueue,d===null?l.retryQueue=new Set([p]):d.add(p)),m1(i,p,v)),!1}throw Error(r(435,d.tag))}return m1(i,p,v),mg(),!1}if(dt)return l=Qr.current,l!==null?((l.flags&65536)===0&&(l.flags|=256),l.flags|=65536,l.lanes=v,p!==c0&&(i=Error(r(422),{cause:p}),Wd(ms(i,d)))):(p!==c0&&(l=Error(r(423),{cause:p}),Wd(ms(l,d))),i=i.current.alternate,i.flags|=65536,v&=-v,i.lanes|=v,p=ms(p,d),v=W0(i.stateNode,p,v),E0(i,v),pn!==4&&(pn=2)),!1;var b=Error(r(520),{cause:p});if(b=ms(b,d),df===null?df=[b]:df.push(b),pn!==4&&(pn=2),l===null)return!0;p=ms(p,d),d=l;do{switch(d.tag){case 3:return d.flags|=65536,i=v&-v,d.lanes|=i,i=W0(d.stateNode,p,i),E0(d,i),!1;case 1:if(l=d.type,b=d.stateNode,(d.flags&128)===0&&(typeof l.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(ta===null||!ta.has(b))))return d.flags|=65536,v&=-v,d.lanes|=v,v=J2(v),eO(v,i,d,p),E0(d,v),!1}d=d.return}while(d!==null);return!1}var V0=Error(r(461)),wn=!1;function Qn(i,l,d,p){l.child=i===null?s2(l,null,d,p):fl(l,i.child,d,p)}function tO(i,l,d,p,v){d=d.render;var b=l.ref;if("ref"in p){var _={};for(var P in p)P!=="ref"&&(_[P]=p[P])}else _=p;return ll(l),p=T0(i,l,d,_,b,v),P=R0(),i!==null&&!wn?(I0(i,l,v),Wo(i,l,v)):(dt&&P&&l0(l),l.flags|=1,Qn(i,l,p,v),l.child)}function nO(i,l,d,p,v){if(i===null){var b=d.type;return typeof b=="function"&&!o0(b)&&b.defaultProps===void 0&&d.compare===null?(l.tag=15,l.type=b,rO(i,l,b,p,v)):(i=zp(d.type,null,p,l,l.mode,v),i.ref=l.ref,i.return=l,l.child=i)}if(b=i.child,!e1(i,v)){var _=b.memoizedProps;if(d=d.compare,d=d!==null?d:Hd,d(_,p)&&i.ref===l.ref)return Wo(i,l,v)}return l.flags|=1,i=zo(b,p),i.ref=l.ref,i.return=l,l.child=i}function rO(i,l,d,p,v){if(i!==null){var b=i.memoizedProps;if(Hd(b,p)&&i.ref===l.ref)if(wn=!1,l.pendingProps=p=b,e1(i,v))(i.flags&131072)!==0&&(wn=!0);else return l.lanes=i.lanes,Wo(i,l,v)}return G0(i,l,d,p,v)}function sO(i,l,d,p){var v=p.children,b=i!==null?i.memoizedState:null;if(i===null&&l.stateNode===null&&(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),p.mode==="hidden"){if((l.flags&128)!==0){if(b=b!==null?b.baseLanes|d:d,i!==null){for(p=l.child=i.child,v=0;p!==null;)v=v|p.lanes|p.childLanes,p=p.sibling;p=v&~b}else p=0,l.child=null;return oO(i,l,b,d,p)}if((d&536870912)!==0)l.memoizedState={baseLanes:0,cachePool:null},i!==null&&$p(l,b!==null?b.cachePool:null),b!==null?a2(l,b):w0(),l2(l);else return p=l.lanes=536870912,oO(i,l,b!==null?b.baseLanes|d:d,d,p)}else b!==null?($p(l,b.cachePool),a2(l,b),Xi(),l.memoizedState=null):(i!==null&&$p(l,null),w0(),Xi());return Qn(i,l,v,d),l.child}function rf(i,l){return i!==null&&i.tag===22||l.stateNode!==null||(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.sibling}function oO(i,l,d,p,v){var b=v0();return b=b===null?null:{parent:En._currentValue,pool:b},l.memoizedState={baseLanes:d,cachePool:b},i!==null&&$p(l,null),w0(),l2(l),i!==null&&ku(i,l,p,!0),l.childLanes=v,null}function og(i,l){return l=ag({mode:l.mode,children:l.children},i.mode),l.ref=i.ref,i.child=l,l.return=i,l}function iO(i,l,d){return fl(l,i.child,null,d),i=og(l,l.pendingProps),i.flags|=2,Jr(l),l.memoizedState=null,i}function T$(i,l,d){var p=l.pendingProps,v=(l.flags&128)!==0;if(l.flags&=-129,i===null){if(dt){if(p.mode==="hidden")return i=og(l,p),l.lanes=536870912,rf(null,i);if(_0(l),(i=Kt)?(i=yN(i,bs),i=i!==null&&i.data==="&"?i:null,i!==null&&(l.memoizedState={dehydrated:i,treeContext:$i!==null?{id:uo,overflow:co}:null,retryLane:536870912,hydrationErrors:null},d=$I(i),d.return=l,l.child=d,Zn=l,Kt=null)):i=null,i===null)throw Wi(l);return l.lanes=536870912,null}return og(l,p)}var b=i.memoizedState;if(b!==null){var _=b.dehydrated;if(_0(l),v)if(l.flags&256)l.flags&=-257,l=iO(i,l,d);else if(l.memoizedState!==null)l.child=i.child,l.flags|=128,l=null;else throw Error(r(558));else if(wn||ku(i,l,d,!1),v=(d&i.childLanes)!==0,wn||v){if(p=Wt,p!==null&&(_=Su(p,d),_!==0&&_!==b.retryLane))throw b.retryLane=_,sl(i,_),Lr(p,i,_),V0;mg(),l=iO(i,l,d)}else i=b.treeContext,Kt=Es(_.nextSibling),Zn=l,dt=!0,qi=null,bs=!1,i!==null&&VI(l,i),l=og(l,p),l.flags|=4096;return l}return i=zo(i.child,{mode:p.mode,children:p.children}),i.ref=l.ref,l.child=i,i.return=l,i}function ig(i,l){var d=l.ref;if(d===null)i!==null&&i.ref!==null&&(l.flags|=4194816);else{if(typeof d!="function"&&typeof d!="object")throw Error(r(284));(i===null||i.ref!==d)&&(l.flags|=4194816)}}function G0(i,l,d,p,v){return ll(l),d=T0(i,l,d,p,void 0,v),p=R0(),i!==null&&!wn?(I0(i,l,v),Wo(i,l,v)):(dt&&p&&l0(l),l.flags|=1,Qn(i,l,d,v),l.child)}function aO(i,l,d,p,v,b){return ll(l),l.updateQueue=null,d=c2(l,p,d,v),u2(i),p=R0(),i!==null&&!wn?(I0(i,l,b),Wo(i,l,b)):(dt&&p&&l0(l),l.flags|=1,Qn(i,l,d,b),l.child)}function lO(i,l,d,p,v){if(ll(l),l.stateNode===null){var b=Ou,_=d.contextType;typeof _=="object"&&_!==null&&(b=Xn(_)),b=new d(p,b),l.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,b.updater=q0,l.stateNode=b,b._reactInternals=l,b=l.stateNode,b.props=p,b.state=l.memoizedState,b.refs={},b0(l),_=d.contextType,b.context=typeof _=="object"&&_!==null?Xn(_):Ou,b.state=l.memoizedState,_=d.getDerivedStateFromProps,typeof _=="function"&&($0(l,d,_,p),b.state=l.memoizedState),typeof d.getDerivedStateFromProps=="function"||typeof b.getSnapshotBeforeUpdate=="function"||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(_=b.state,typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount(),_!==b.state&&q0.enqueueReplaceState(b,b.state,null),Qd(l,p,b,v),Xd(),b.state=l.memoizedState),typeof b.componentDidMount=="function"&&(l.flags|=4194308),p=!0}else if(i===null){b=l.stateNode;var P=l.memoizedProps,B=pl(d,P);b.props=B;var J=b.context,se=d.contextType;_=Ou,typeof se=="object"&&se!==null&&(_=Xn(se));var ae=d.getDerivedStateFromProps;se=typeof ae=="function"||typeof b.getSnapshotBeforeUpdate=="function",P=l.pendingProps!==P,se||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(P||J!==_)&&K2(l,b,p,_),Gi=!1;var ne=l.memoizedState;b.state=ne,Qd(l,p,b,v),Xd(),J=l.memoizedState,P||ne!==J||Gi?(typeof ae=="function"&&($0(l,d,ae,p),J=l.memoizedState),(B=Gi||G2(l,d,B,p,ne,J,_))?(se||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount()),typeof b.componentDidMount=="function"&&(l.flags|=4194308)):(typeof b.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=p,l.memoizedState=J),b.props=p,b.state=J,b.context=_,p=B):(typeof b.componentDidMount=="function"&&(l.flags|=4194308),p=!1)}else{b=l.stateNode,S0(i,l),_=l.memoizedProps,se=pl(d,_),b.props=se,ae=l.pendingProps,ne=b.context,J=d.contextType,B=Ou,typeof J=="object"&&J!==null&&(B=Xn(J)),P=d.getDerivedStateFromProps,(J=typeof P=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(_!==ae||ne!==B)&&K2(l,b,p,B),Gi=!1,ne=l.memoizedState,b.state=ne,Qd(l,p,b,v),Xd();var re=l.memoizedState;_!==ae||ne!==re||Gi||i!==null&&i.dependencies!==null&&Bp(i.dependencies)?(typeof P=="function"&&($0(l,d,P,p),re=l.memoizedState),(se=Gi||G2(l,d,se,p,ne,re,B)||i!==null&&i.dependencies!==null&&Bp(i.dependencies))?(J||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(p,re,B),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(p,re,B)),typeof b.componentDidUpdate=="function"&&(l.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof b.componentDidUpdate!="function"||_===i.memoizedProps&&ne===i.memoizedState||(l.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||_===i.memoizedProps&&ne===i.memoizedState||(l.flags|=1024),l.memoizedProps=p,l.memoizedState=re),b.props=p,b.state=re,b.context=B,p=se):(typeof b.componentDidUpdate!="function"||_===i.memoizedProps&&ne===i.memoizedState||(l.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||_===i.memoizedProps&&ne===i.memoizedState||(l.flags|=1024),p=!1)}return b=p,ig(i,l),p=(l.flags&128)!==0,b||p?(b=l.stateNode,d=p&&typeof d.getDerivedStateFromError!="function"?null:b.render(),l.flags|=1,i!==null&&p?(l.child=fl(l,i.child,null,v),l.child=fl(l,null,d,v)):Qn(i,l,d,v),l.memoizedState=b.state,i=l.child):i=Wo(i,l,v),i}function uO(i,l,d,p){return il(),l.flags|=256,Qn(i,l,d,p),l.child}var K0={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Y0(i){return{baseLanes:i,cachePool:QI()}}function Z0(i,l,d){return i=i!==null?i.childLanes&~d:0,l&&(i|=ts),i}function cO(i,l,d){var p=l.pendingProps,v=!1,b=(l.flags&128)!==0,_;if((_=b)||(_=i!==null&&i.memoizedState===null?!1:(bn.current&2)!==0),_&&(v=!0,l.flags&=-129),_=(l.flags&32)!==0,l.flags&=-33,i===null){if(dt){if(v?Zi(l):Xi(),(i=Kt)?(i=yN(i,bs),i=i!==null&&i.data!=="&"?i:null,i!==null&&(l.memoizedState={dehydrated:i,treeContext:$i!==null?{id:uo,overflow:co}:null,retryLane:536870912,hydrationErrors:null},d=$I(i),d.return=l,l.child=d,Zn=l,Kt=null)):i=null,i===null)throw Wi(l);return M1(i)?l.lanes=32:l.lanes=536870912,null}var P=p.children;return p=p.fallback,v?(Xi(),v=l.mode,P=ag({mode:"hidden",children:P},v),p=ol(p,v,d,null),P.return=l,p.return=l,P.sibling=p,l.child=P,p=l.child,p.memoizedState=Y0(d),p.childLanes=Z0(i,_,d),l.memoizedState=K0,rf(null,p)):(Zi(l),X0(l,P))}var B=i.memoizedState;if(B!==null&&(P=B.dehydrated,P!==null)){if(b)l.flags&256?(Zi(l),l.flags&=-257,l=Q0(i,l,d)):l.memoizedState!==null?(Xi(),l.child=i.child,l.flags|=128,l=null):(Xi(),P=p.fallback,v=l.mode,p=ag({mode:"visible",children:p.children},v),P=ol(P,v,d,null),P.flags|=2,p.return=l,P.return=l,p.sibling=P,l.child=p,fl(l,i.child,null,d),p=l.child,p.memoizedState=Y0(d),p.childLanes=Z0(i,_,d),l.memoizedState=K0,l=rf(null,p));else if(Zi(l),M1(P)){if(_=P.nextSibling&&P.nextSibling.dataset,_)var J=_.dgst;_=J,p=Error(r(419)),p.stack="",p.digest=_,Wd({value:p,source:null,stack:null}),l=Q0(i,l,d)}else if(wn||ku(i,l,d,!1),_=(d&i.childLanes)!==0,wn||_){if(_=Wt,_!==null&&(p=Su(_,d),p!==0&&p!==B.retryLane))throw B.retryLane=p,sl(i,p),Lr(_,i,p),V0;N1(P)||mg(),l=Q0(i,l,d)}else N1(P)?(l.flags|=192,l.child=i.child,l=null):(i=B.treeContext,Kt=Es(P.nextSibling),Zn=l,dt=!0,qi=null,bs=!1,i!==null&&VI(l,i),l=X0(l,p.children),l.flags|=4096);return l}return v?(Xi(),P=p.fallback,v=l.mode,B=i.child,J=B.sibling,p=zo(B,{mode:"hidden",children:p.children}),p.subtreeFlags=B.subtreeFlags&65011712,J!==null?P=zo(J,P):(P=ol(P,v,d,null),P.flags|=2),P.return=l,p.return=l,p.sibling=P,l.child=p,rf(null,p),p=l.child,P=i.child.memoizedState,P===null?P=Y0(d):(v=P.cachePool,v!==null?(B=En._currentValue,v=v.parent!==B?{parent:B,pool:B}:v):v=QI(),P={baseLanes:P.baseLanes|d,cachePool:v}),p.memoizedState=P,p.childLanes=Z0(i,_,d),l.memoizedState=K0,rf(i.child,p)):(Zi(l),d=i.child,i=d.sibling,d=zo(d,{mode:"visible",children:p.children}),d.return=l,d.sibling=null,i!==null&&(_=l.deletions,_===null?(l.deletions=[i],l.flags|=16):_.push(i)),l.child=d,l.memoizedState=null,d)}function X0(i,l){return l=ag({mode:"visible",children:l},i.mode),l.return=i,i.child=l}function ag(i,l){return i=Xr(22,i,null,l),i.lanes=0,i}function Q0(i,l,d){return fl(l,i.child,null,d),i=X0(l,l.pendingProps.children),i.flags|=2,l.memoizedState=null,i}function dO(i,l,d){i.lanes|=l;var p=i.alternate;p!==null&&(p.lanes|=l),h0(i.return,l,d)}function J0(i,l,d,p,v,b){var _=i.memoizedState;_===null?i.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:p,tail:d,tailMode:v,treeForkCount:b}:(_.isBackwards=l,_.rendering=null,_.renderingStartTime=0,_.last=p,_.tail=d,_.tailMode=v,_.treeForkCount=b)}function fO(i,l,d){var p=l.pendingProps,v=p.revealOrder,b=p.tail;p=p.children;var _=bn.current,P=(_&2)!==0;if(P?(_=_&1|2,l.flags|=128):_&=1,Z(bn,_),Qn(i,l,p,d),p=dt?qd:0,!P&&i!==null&&(i.flags&128)!==0)e:for(i=l.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&dO(i,d,l);else if(i.tag===19)dO(i,d,l);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===l)break e;for(;i.sibling===null;){if(i.return===null||i.return===l)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}switch(v){case"forwards":for(d=l.child,v=null;d!==null;)i=d.alternate,i!==null&&Yp(i)===null&&(v=d),d=d.sibling;d=v,d===null?(v=l.child,l.child=null):(v=d.sibling,d.sibling=null),J0(l,!1,v,d,b,p);break;case"backwards":case"unstable_legacy-backwards":for(d=null,v=l.child,l.child=null;v!==null;){if(i=v.alternate,i!==null&&Yp(i)===null){l.child=v;break}i=v.sibling,v.sibling=d,d=v,v=i}J0(l,!0,d,null,b,p);break;case"together":J0(l,!1,null,null,void 0,p);break;default:l.memoizedState=null}return l.child}function Wo(i,l,d){if(i!==null&&(l.dependencies=i.dependencies),ea|=l.lanes,(d&l.childLanes)===0)if(i!==null){if(ku(i,l,d,!1),(d&l.childLanes)===0)return null}else return null;if(i!==null&&l.child!==i.child)throw Error(r(153));if(l.child!==null){for(i=l.child,d=zo(i,i.pendingProps),l.child=d,d.return=l;i.sibling!==null;)i=i.sibling,d=d.sibling=zo(i,i.pendingProps),d.return=l;d.sibling=null}return l.child}function e1(i,l){return(i.lanes&l)!==0?!0:(i=i.dependencies,!!(i!==null&&Bp(i)))}function R$(i,l,d){switch(l.tag){case 3:ve(l,l.stateNode.containerInfo),Vi(l,En,i.memoizedState.cache),il();break;case 27:case 5:Xe(l);break;case 4:ve(l,l.stateNode.containerInfo);break;case 10:Vi(l,l.type,l.memoizedProps.value);break;case 31:if(l.memoizedState!==null)return l.flags|=128,_0(l),null;break;case 13:var p=l.memoizedState;if(p!==null)return p.dehydrated!==null?(Zi(l),l.flags|=128,null):(d&l.child.childLanes)!==0?cO(i,l,d):(Zi(l),i=Wo(i,l,d),i!==null?i.sibling:null);Zi(l);break;case 19:var v=(i.flags&128)!==0;if(p=(d&l.childLanes)!==0,p||(ku(i,l,d,!1),p=(d&l.childLanes)!==0),v){if(p)return fO(i,l,d);l.flags|=128}if(v=l.memoizedState,v!==null&&(v.rendering=null,v.tail=null,v.lastEffect=null),Z(bn,bn.current),p)break;return null;case 22:return l.lanes=0,sO(i,l,d,l.pendingProps);case 24:Vi(l,En,i.memoizedState.cache)}return Wo(i,l,d)}function hO(i,l,d){if(i!==null)if(i.memoizedProps!==l.pendingProps)wn=!0;else{if(!e1(i,d)&&(l.flags&128)===0)return wn=!1,R$(i,l,d);wn=(i.flags&131072)!==0}else wn=!1,dt&&(l.flags&1048576)!==0&&WI(l,qd,l.index);switch(l.lanes=0,l.tag){case 16:e:{var p=l.pendingProps;if(i=cl(l.elementType),l.type=i,typeof i=="function")o0(i)?(p=pl(i,p),l.tag=1,l=lO(null,l,i,p,d)):(l.tag=0,l=G0(null,l,i,p,d));else{if(i!=null){var v=i.$$typeof;if(v===R){l.tag=11,l=tO(null,l,i,p,d);break e}else if(v===O){l.tag=14,l=nO(null,l,i,p,d);break e}}throw l=K(i)||i,Error(r(306,l,""))}}return l;case 0:return G0(i,l,l.type,l.pendingProps,d);case 1:return p=l.type,v=pl(p,l.pendingProps),lO(i,l,p,v,d);case 3:e:{if(ve(l,l.stateNode.containerInfo),i===null)throw Error(r(387));p=l.pendingProps;var b=l.memoizedState;v=b.element,S0(i,l),Qd(l,p,null,d);var _=l.memoizedState;if(p=_.cache,Vi(l,En,p),p!==b.cache&&p0(l,[En],d,!0),Xd(),p=_.element,b.isDehydrated)if(b={element:p,isDehydrated:!1,cache:_.cache},l.updateQueue.baseState=b,l.memoizedState=b,l.flags&256){l=uO(i,l,p,d);break e}else if(p!==v){v=ms(Error(r(424)),l),Wd(v),l=uO(i,l,p,d);break e}else for(i=l.stateNode.containerInfo,i.nodeType===9?i=i.body:i=i.nodeName==="HTML"?i.ownerDocument.body:i,Kt=Es(i.firstChild),Zn=l,dt=!0,qi=null,bs=!0,d=s2(l,null,p,d),l.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling;else{if(il(),p===v){l=Wo(i,l,d);break e}Qn(i,l,p,d)}l=l.child}return l;case 26:return ig(i,l),i===null?(d=xN(l.type,null,l.pendingProps,null))?l.memoizedState=d:dt||(d=l.type,i=l.pendingProps,p=wg(he.current).createElement(d),p[On]=l,p[nt]=i,Jn(p,d,i),ln(p),l.stateNode=p):l.memoizedState=xN(l.type,i.memoizedProps,l.pendingProps,i.memoizedState),null;case 27:return Xe(l),i===null&&dt&&(p=l.stateNode=EN(l.type,l.pendingProps,he.current),Zn=l,bs=!0,v=Kt,oa(l.type)?(P1=v,Kt=Es(p.firstChild)):Kt=v),Qn(i,l,l.pendingProps.children,d),ig(i,l),i===null&&(l.flags|=4194304),l.child;case 5:return i===null&&dt&&((v=p=Kt)&&(p=sq(p,l.type,l.pendingProps,bs),p!==null?(l.stateNode=p,Zn=l,Kt=Es(p.firstChild),bs=!1,v=!0):v=!1),v||Wi(l)),Xe(l),v=l.type,b=l.pendingProps,_=i!==null?i.memoizedProps:null,p=b.children,R1(v,b)?p=null:_!==null&&R1(v,_)&&(l.flags|=32),l.memoizedState!==null&&(v=T0(i,l,b$,null,null,d),bf._currentValue=v),ig(i,l),Qn(i,l,p,d),l.child;case 6:return i===null&&dt&&((i=d=Kt)&&(d=oq(d,l.pendingProps,bs),d!==null?(l.stateNode=d,Zn=l,Kt=null,i=!0):i=!1),i||Wi(l)),null;case 13:return cO(i,l,d);case 4:return ve(l,l.stateNode.containerInfo),p=l.pendingProps,i===null?l.child=fl(l,null,p,d):Qn(i,l,p,d),l.child;case 11:return tO(i,l,l.type,l.pendingProps,d);case 7:return Qn(i,l,l.pendingProps,d),l.child;case 8:return Qn(i,l,l.pendingProps.children,d),l.child;case 12:return Qn(i,l,l.pendingProps.children,d),l.child;case 10:return p=l.pendingProps,Vi(l,l.type,p.value),Qn(i,l,p.children,d),l.child;case 9:return v=l.type._context,p=l.pendingProps.children,ll(l),v=Xn(v),p=p(v),l.flags|=1,Qn(i,l,p,d),l.child;case 14:return nO(i,l,l.type,l.pendingProps,d);case 15:return rO(i,l,l.type,l.pendingProps,d);case 19:return fO(i,l,d);case 31:return T$(i,l,d);case 22:return sO(i,l,d,l.pendingProps);case 24:return ll(l),p=Xn(En),i===null?(v=v0(),v===null&&(v=Wt,b=g0(),v.pooledCache=b,b.refCount++,b!==null&&(v.pooledCacheLanes|=d),v=b),l.memoizedState={parent:p,cache:v},b0(l),Vi(l,En,v)):((i.lanes&d)!==0&&(S0(i,l),Qd(l,null,null,d),Xd()),v=i.memoizedState,b=l.memoizedState,v.parent!==p?(v={parent:p,cache:p},l.memoizedState=v,l.lanes===0&&(l.memoizedState=l.updateQueue.baseState=v),Vi(l,En,p)):(p=b.cache,Vi(l,En,p),p!==v.cache&&p0(l,[En],d,!0))),Qn(i,l,l.pendingProps.children,d),l.child;case 29:throw l.pendingProps}throw Error(r(156,l.tag))}function Vo(i){i.flags|=4}function t1(i,l,d,p,v){if((l=(i.mode&32)!==0)&&(l=!1),l){if(i.flags|=16777216,(v&335544128)===v)if(i.stateNode.complete)i.flags|=8192;else if(jO())i.flags|=8192;else throw dl=Wp,y0}else i.flags&=-16777217}function pO(i,l){if(l.type!=="stylesheet"||(l.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!IN(l))if(jO())i.flags|=8192;else throw dl=Wp,y0}function lg(i,l){l!==null&&(i.flags|=4),i.flags&16384&&(l=i.tag!==22?Kr():536870912,i.lanes|=l,Vu|=l)}function sf(i,l){if(!dt)switch(i.tailMode){case"hidden":l=i.tail;for(var d=null;l!==null;)l.alternate!==null&&(d=l),l=l.sibling;d===null?i.tail=null:d.sibling=null;break;case"collapsed":d=i.tail;for(var p=null;d!==null;)d.alternate!==null&&(p=d),d=d.sibling;p===null?l||i.tail===null?i.tail=null:i.tail.sibling=null:p.sibling=null}}function Yt(i){var l=i.alternate!==null&&i.alternate.child===i.child,d=0,p=0;if(l)for(var v=i.child;v!==null;)d|=v.lanes|v.childLanes,p|=v.subtreeFlags&65011712,p|=v.flags&65011712,v.return=i,v=v.sibling;else for(v=i.child;v!==null;)d|=v.lanes|v.childLanes,p|=v.subtreeFlags,p|=v.flags,v.return=i,v=v.sibling;return i.subtreeFlags|=p,i.childLanes=d,l}function I$(i,l,d){var p=l.pendingProps;switch(u0(l),l.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Yt(l),null;case 1:return Yt(l),null;case 3:return d=l.stateNode,p=null,i!==null&&(p=i.memoizedState.cache),l.memoizedState.cache!==p&&(l.flags|=2048),Ho(En),xe(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(i===null||i.child===null)&&(Pu(l)?Vo(l):i===null||i.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,d0())),Yt(l),null;case 26:var v=l.type,b=l.memoizedState;return i===null?(Vo(l),b!==null?(Yt(l),pO(l,b)):(Yt(l),t1(l,v,null,p,d))):b?b!==i.memoizedState?(Vo(l),Yt(l),pO(l,b)):(Yt(l),l.flags&=-16777217):(i=i.memoizedProps,i!==p&&Vo(l),Yt(l),t1(l,v,i,p,d)),null;case 27:if(Ee(l),d=he.current,v=l.type,i!==null&&l.stateNode!=null)i.memoizedProps!==p&&Vo(l);else{if(!p){if(l.stateNode===null)throw Error(r(166));return Yt(l),null}i=ee.current,Pu(l)?GI(l):(i=EN(v,p,d),l.stateNode=i,Vo(l))}return Yt(l),null;case 5:if(Ee(l),v=l.type,i!==null&&l.stateNode!=null)i.memoizedProps!==p&&Vo(l);else{if(!p){if(l.stateNode===null)throw Error(r(166));return Yt(l),null}if(b=ee.current,Pu(l))GI(l);else{var _=wg(he.current);switch(b){case 1:b=_.createElementNS("http://www.w3.org/2000/svg",v);break;case 2:b=_.createElementNS("http://www.w3.org/1998/Math/MathML",v);break;default:switch(v){case"svg":b=_.createElementNS("http://www.w3.org/2000/svg",v);break;case"math":b=_.createElementNS("http://www.w3.org/1998/Math/MathML",v);break;case"script":b=_.createElement("div"),b.innerHTML="<script><\/script>",b=b.removeChild(b.firstChild);break;case"select":b=typeof p.is=="string"?_.createElement("select",{is:p.is}):_.createElement("select"),p.multiple?b.multiple=!0:p.size&&(b.size=p.size);break;default:b=typeof p.is=="string"?_.createElement(v,{is:p.is}):_.createElement(v)}}b[On]=l,b[nt]=p;e:for(_=l.child;_!==null;){if(_.tag===5||_.tag===6)b.appendChild(_.stateNode);else if(_.tag!==4&&_.tag!==27&&_.child!==null){_.child.return=_,_=_.child;continue}if(_===l)break e;for(;_.sibling===null;){if(_.return===null||_.return===l)break e;_=_.return}_.sibling.return=_.return,_=_.sibling}l.stateNode=b;e:switch(Jn(b,v,p),v){case"button":case"input":case"select":case"textarea":p=!!p.autoFocus;break e;case"img":p=!0;break e;default:p=!1}p&&Vo(l)}}return Yt(l),t1(l,l.type,i===null?null:i.memoizedProps,l.pendingProps,d),null;case 6:if(i&&l.stateNode!=null)i.memoizedProps!==p&&Vo(l);else{if(typeof p!="string"&&l.stateNode===null)throw Error(r(166));if(i=he.current,Pu(l)){if(i=l.stateNode,d=l.memoizedProps,p=null,v=Zn,v!==null)switch(v.tag){case 27:case 5:p=v.memoizedProps}i[On]=l,i=!!(i.nodeValue===d||p!==null&&p.suppressHydrationWarning===!0||cN(i.nodeValue,d)),i||Wi(l,!0)}else i=wg(i).createTextNode(p),i[On]=l,l.stateNode=i}return Yt(l),null;case 31:if(d=l.memoizedState,i===null||i.memoizedState!==null){if(p=Pu(l),d!==null){if(i===null){if(!p)throw Error(r(318));if(i=l.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(557));i[On]=l}else il(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Yt(l),i=!1}else d=d0(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=d),i=!0;if(!i)return l.flags&256?(Jr(l),l):(Jr(l),null);if((l.flags&128)!==0)throw Error(r(558))}return Yt(l),null;case 13:if(p=l.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(v=Pu(l),p!==null&&p.dehydrated!==null){if(i===null){if(!v)throw Error(r(318));if(v=l.memoizedState,v=v!==null?v.dehydrated:null,!v)throw Error(r(317));v[On]=l}else il(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Yt(l),v=!1}else v=d0(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=v),v=!0;if(!v)return l.flags&256?(Jr(l),l):(Jr(l),null)}return Jr(l),(l.flags&128)!==0?(l.lanes=d,l):(d=p!==null,i=i!==null&&i.memoizedState!==null,d&&(p=l.child,v=null,p.alternate!==null&&p.alternate.memoizedState!==null&&p.alternate.memoizedState.cachePool!==null&&(v=p.alternate.memoizedState.cachePool.pool),b=null,p.memoizedState!==null&&p.memoizedState.cachePool!==null&&(b=p.memoizedState.cachePool.pool),b!==v&&(p.flags|=2048)),d!==i&&d&&(l.child.flags|=8192),lg(l,l.updateQueue),Yt(l),null);case 4:return xe(),i===null&&w1(l.stateNode.containerInfo),Yt(l),null;case 10:return Ho(l.type),Yt(l),null;case 19:if(G(bn),p=l.memoizedState,p===null)return Yt(l),null;if(v=(l.flags&128)!==0,b=p.rendering,b===null)if(v)sf(p,!1);else{if(pn!==0||i!==null&&(i.flags&128)!==0)for(i=l.child;i!==null;){if(b=Yp(i),b!==null){for(l.flags|=128,sf(p,!1),i=b.updateQueue,l.updateQueue=i,lg(l,i),l.subtreeFlags=0,i=d,d=l.child;d!==null;)HI(d,i),d=d.sibling;return Z(bn,bn.current&1|2),dt&&jo(l,p.treeForkCount),l.child}i=i.sibling}p.tail!==null&&Gt()>hg&&(l.flags|=128,v=!0,sf(p,!1),l.lanes=4194304)}else{if(!v)if(i=Yp(b),i!==null){if(l.flags|=128,v=!0,i=i.updateQueue,l.updateQueue=i,lg(l,i),sf(p,!0),p.tail===null&&p.tailMode==="hidden"&&!b.alternate&&!dt)return Yt(l),null}else 2*Gt()-p.renderingStartTime>hg&&d!==536870912&&(l.flags|=128,v=!0,sf(p,!1),l.lanes=4194304);p.isBackwards?(b.sibling=l.child,l.child=b):(i=p.last,i!==null?i.sibling=b:l.child=b,p.last=b)}return p.tail!==null?(i=p.tail,p.rendering=i,p.tail=i.sibling,p.renderingStartTime=Gt(),i.sibling=null,d=bn.current,Z(bn,v?d&1|2:d&1),dt&&jo(l,p.treeForkCount),i):(Yt(l),null);case 22:case 23:return Jr(l),x0(),p=l.memoizedState!==null,i!==null?i.memoizedState!==null!==p&&(l.flags|=8192):p&&(l.flags|=8192),p?(d&536870912)!==0&&(l.flags&128)===0&&(Yt(l),l.subtreeFlags&6&&(l.flags|=8192)):Yt(l),d=l.updateQueue,d!==null&&lg(l,d.retryQueue),d=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(d=i.memoizedState.cachePool.pool),p=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(p=l.memoizedState.cachePool.pool),p!==d&&(l.flags|=2048),i!==null&&G(ul),null;case 24:return d=null,i!==null&&(d=i.memoizedState.cache),l.memoizedState.cache!==d&&(l.flags|=2048),Ho(En),Yt(l),null;case 25:return null;case 30:return null}throw Error(r(156,l.tag))}function O$(i,l){switch(u0(l),l.tag){case 1:return i=l.flags,i&65536?(l.flags=i&-65537|128,l):null;case 3:return Ho(En),xe(),i=l.flags,(i&65536)!==0&&(i&128)===0?(l.flags=i&-65537|128,l):null;case 26:case 27:case 5:return Ee(l),null;case 31:if(l.memoizedState!==null){if(Jr(l),l.alternate===null)throw Error(r(340));il()}return i=l.flags,i&65536?(l.flags=i&-65537|128,l):null;case 13:if(Jr(l),i=l.memoizedState,i!==null&&i.dehydrated!==null){if(l.alternate===null)throw Error(r(340));il()}return i=l.flags,i&65536?(l.flags=i&-65537|128,l):null;case 19:return G(bn),null;case 4:return xe(),null;case 10:return Ho(l.type),null;case 22:case 23:return Jr(l),x0(),i!==null&&G(ul),i=l.flags,i&65536?(l.flags=i&-65537|128,l):null;case 24:return Ho(En),null;case 25:return null;default:return null}}function gO(i,l){switch(u0(l),l.tag){case 3:Ho(En),xe();break;case 26:case 27:case 5:Ee(l);break;case 4:xe();break;case 31:l.memoizedState!==null&&Jr(l);break;case 13:Jr(l);break;case 19:G(bn);break;case 10:Ho(l.type);break;case 22:case 23:Jr(l),x0(),i!==null&&G(ul);break;case 24:Ho(En)}}function of(i,l){try{var d=l.updateQueue,p=d!==null?d.lastEffect:null;if(p!==null){var v=p.next;d=v;do{if((d.tag&i)===i){p=void 0;var b=d.create,_=d.inst;p=b(),_.destroy=p}d=d.next}while(d!==v)}}catch(P){kt(l,l.return,P)}}function Qi(i,l,d){try{var p=l.updateQueue,v=p!==null?p.lastEffect:null;if(v!==null){var b=v.next;p=b;do{if((p.tag&i)===i){var _=p.inst,P=_.destroy;if(P!==void 0){_.destroy=void 0,v=l;var B=d,J=P;try{J()}catch(se){kt(v,B,se)}}}p=p.next}while(p!==b)}}catch(se){kt(l,l.return,se)}}function mO(i){var l=i.updateQueue;if(l!==null){var d=i.stateNode;try{i2(l,d)}catch(p){kt(i,i.return,p)}}}function vO(i,l,d){d.props=pl(i.type,i.memoizedProps),d.state=i.memoizedState;try{d.componentWillUnmount()}catch(p){kt(i,l,p)}}function af(i,l){try{var d=i.ref;if(d!==null){switch(i.tag){case 26:case 27:case 5:var p=i.stateNode;break;case 30:p=i.stateNode;break;default:p=i.stateNode}typeof d=="function"?i.refCleanup=d(p):d.current=p}}catch(v){kt(i,l,v)}}function fo(i,l){var d=i.ref,p=i.refCleanup;if(d!==null)if(typeof p=="function")try{p()}catch(v){kt(i,l,v)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof d=="function")try{d(null)}catch(v){kt(i,l,v)}else d.current=null}function yO(i){var l=i.type,d=i.memoizedProps,p=i.stateNode;try{e:switch(l){case"button":case"input":case"select":case"textarea":d.autoFocus&&p.focus();break e;case"img":d.src?p.src=d.src:d.srcSet&&(p.srcset=d.srcSet)}}catch(v){kt(i,i.return,v)}}function n1(i,l,d){try{var p=i.stateNode;Q$(p,i.type,d,l),p[nt]=l}catch(v){kt(i,i.return,v)}}function bO(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&oa(i.type)||i.tag===4}function r1(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||bO(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&oa(i.type)||i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function s1(i,l,d){var p=i.tag;if(p===5||p===6)i=i.stateNode,l?(d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d).insertBefore(i,l):(l=d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d,l.appendChild(i),d=d._reactRootContainer,d!=null||l.onclick!==null||(l.onclick=nn));else if(p!==4&&(p===27&&oa(i.type)&&(d=i.stateNode,l=null),i=i.child,i!==null))for(s1(i,l,d),i=i.sibling;i!==null;)s1(i,l,d),i=i.sibling}function ug(i,l,d){var p=i.tag;if(p===5||p===6)i=i.stateNode,l?d.insertBefore(i,l):d.appendChild(i);else if(p!==4&&(p===27&&oa(i.type)&&(d=i.stateNode),i=i.child,i!==null))for(ug(i,l,d),i=i.sibling;i!==null;)ug(i,l,d),i=i.sibling}function SO(i){var l=i.stateNode,d=i.memoizedProps;try{for(var p=i.type,v=l.attributes;v.length;)l.removeAttributeNode(v[0]);Jn(l,p,d),l[On]=i,l[nt]=d}catch(b){kt(i,i.return,b)}}var Go=!1,xn=!1,o1=!1,EO=typeof WeakSet=="function"?WeakSet:Set,Fn=null;function N$(i,l){if(i=i.containerInfo,A1=Og,i=PI(i),Qb(i)){if("selectionStart"in i)var d={start:i.selectionStart,end:i.selectionEnd};else e:{d=(d=i.ownerDocument)&&d.defaultView||window;var p=d.getSelection&&d.getSelection();if(p&&p.rangeCount!==0){d=p.anchorNode;var v=p.anchorOffset,b=p.focusNode;p=p.focusOffset;try{d.nodeType,b.nodeType}catch{d=null;break e}var _=0,P=-1,B=-1,J=0,se=0,ae=i,ne=null;t:for(;;){for(var re;ae!==d||v!==0&&ae.nodeType!==3||(P=_+v),ae!==b||p!==0&&ae.nodeType!==3||(B=_+p),ae.nodeType===3&&(_+=ae.nodeValue.length),(re=ae.firstChild)!==null;)ne=ae,ae=re;for(;;){if(ae===i)break t;if(ne===d&&++J===v&&(P=_),ne===b&&++se===p&&(B=_),(re=ae.nextSibling)!==null)break;ae=ne,ne=ae.parentNode}ae=re}d=P===-1||B===-1?null:{start:P,end:B}}else d=null}d=d||{start:0,end:0}}else d=null;for(T1={focusedElem:i,selectionRange:d},Og=!1,Fn=l;Fn!==null;)if(l=Fn,i=l.child,(l.subtreeFlags&1028)!==0&&i!==null)i.return=l,Fn=i;else for(;Fn!==null;){switch(l=Fn,b=l.alternate,i=l.flags,l.tag){case 0:if((i&4)!==0&&(i=l.updateQueue,i=i!==null?i.events:null,i!==null))for(d=0;d<i.length;d++)v=i[d],v.ref.impl=v.nextImpl;break;case 11:case 15:break;case 1:if((i&1024)!==0&&b!==null){i=void 0,d=l,v=b.memoizedProps,b=b.memoizedState,p=d.stateNode;try{var Re=pl(d.type,v);i=p.getSnapshotBeforeUpdate(Re,b),p.__reactInternalSnapshotBeforeUpdate=i}catch(De){kt(d,d.return,De)}}break;case 3:if((i&1024)!==0){if(i=l.stateNode.containerInfo,d=i.nodeType,d===9)O1(i);else if(d===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":O1(i);break;default:i.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((i&1024)!==0)throw Error(r(163))}if(i=l.sibling,i!==null){i.return=l.return,Fn=i;break}Fn=l.return}}function CO(i,l,d){var p=d.flags;switch(d.tag){case 0:case 11:case 15:Yo(i,d),p&4&&of(5,d);break;case 1:if(Yo(i,d),p&4)if(i=d.stateNode,l===null)try{i.componentDidMount()}catch(_){kt(d,d.return,_)}else{var v=pl(d.type,l.memoizedProps);l=l.memoizedState;try{i.componentDidUpdate(v,l,i.__reactInternalSnapshotBeforeUpdate)}catch(_){kt(d,d.return,_)}}p&64&&mO(d),p&512&&af(d,d.return);break;case 3:if(Yo(i,d),p&64&&(i=d.updateQueue,i!==null)){if(l=null,d.child!==null)switch(d.child.tag){case 27:case 5:l=d.child.stateNode;break;case 1:l=d.child.stateNode}try{i2(i,l)}catch(_){kt(d,d.return,_)}}break;case 27:l===null&&p&4&&SO(d);case 26:case 5:Yo(i,d),l===null&&p&4&&yO(d),p&512&&af(d,d.return);break;case 12:Yo(i,d);break;case 31:Yo(i,d),p&4&&_O(i,d);break;case 13:Yo(i,d),p&4&&AO(i,d),p&64&&(i=d.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(d=j$.bind(null,d),iq(i,d))));break;case 22:if(p=d.memoizedState!==null||Go,!p){l=l!==null&&l.memoizedState!==null||xn,v=Go;var b=xn;Go=p,(xn=l)&&!b?Zo(i,d,(d.subtreeFlags&8772)!==0):Yo(i,d),Go=v,xn=b}break;case 30:break;default:Yo(i,d)}}function wO(i){var l=i.alternate;l!==null&&(i.alternate=null,wO(l)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(l=i.stateNode,l!==null&&Id(l)),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}var rn=null,Mr=!1;function Ko(i,l,d){for(d=d.child;d!==null;)xO(i,l,d),d=d.sibling}function xO(i,l,d){if(lr&&typeof lr.onCommitFiberUnmount=="function")try{lr.onCommitFiberUnmount(Pi,d)}catch{}switch(d.tag){case 26:xn||fo(d,l),Ko(i,l,d),d.memoizedState?d.memoizedState.count--:d.stateNode&&(d=d.stateNode,d.parentNode.removeChild(d));break;case 27:xn||fo(d,l);var p=rn,v=Mr;oa(d.type)&&(rn=d.stateNode,Mr=!1),Ko(i,l,d),mf(d.stateNode),rn=p,Mr=v;break;case 5:xn||fo(d,l);case 6:if(p=rn,v=Mr,rn=null,Ko(i,l,d),rn=p,Mr=v,rn!==null)if(Mr)try{(rn.nodeType===9?rn.body:rn.nodeName==="HTML"?rn.ownerDocument.body:rn).removeChild(d.stateNode)}catch(b){kt(d,l,b)}else try{rn.removeChild(d.stateNode)}catch(b){kt(d,l,b)}break;case 18:rn!==null&&(Mr?(i=rn,mN(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,d.stateNode),ec(i)):mN(rn,d.stateNode));break;case 4:p=rn,v=Mr,rn=d.stateNode.containerInfo,Mr=!0,Ko(i,l,d),rn=p,Mr=v;break;case 0:case 11:case 14:case 15:Qi(2,d,l),xn||Qi(4,d,l),Ko(i,l,d);break;case 1:xn||(fo(d,l),p=d.stateNode,typeof p.componentWillUnmount=="function"&&vO(d,l,p)),Ko(i,l,d);break;case 21:Ko(i,l,d);break;case 22:xn=(p=xn)||d.memoizedState!==null,Ko(i,l,d),xn=p;break;default:Ko(i,l,d)}}function _O(i,l){if(l.memoizedState===null&&(i=l.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{ec(i)}catch(d){kt(l,l.return,d)}}}function AO(i,l){if(l.memoizedState===null&&(i=l.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{ec(i)}catch(d){kt(l,l.return,d)}}function M$(i){switch(i.tag){case 31:case 13:case 19:var l=i.stateNode;return l===null&&(l=i.stateNode=new EO),l;case 22:return i=i.stateNode,l=i._retryCache,l===null&&(l=i._retryCache=new EO),l;default:throw Error(r(435,i.tag))}}function cg(i,l){var d=M$(i);l.forEach(function(p){if(!d.has(p)){d.add(p);var v=B$.bind(null,i,p);p.then(v,v)}})}function Pr(i,l){var d=l.deletions;if(d!==null)for(var p=0;p<d.length;p++){var v=d[p],b=i,_=l,P=_;e:for(;P!==null;){switch(P.tag){case 27:if(oa(P.type)){rn=P.stateNode,Mr=!1;break e}break;case 5:rn=P.stateNode,Mr=!1;break e;case 3:case 4:rn=P.stateNode.containerInfo,Mr=!0;break e}P=P.return}if(rn===null)throw Error(r(160));xO(b,_,v),rn=null,Mr=!1,b=v.alternate,b!==null&&(b.return=null),v.return=null}if(l.subtreeFlags&13886)for(l=l.child;l!==null;)TO(l,i),l=l.sibling}var Fs=null;function TO(i,l){var d=i.alternate,p=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:Pr(l,i),kr(i),p&4&&(Qi(3,i,i.return),of(3,i),Qi(5,i,i.return));break;case 1:Pr(l,i),kr(i),p&512&&(xn||d===null||fo(d,d.return)),p&64&&Go&&(i=i.updateQueue,i!==null&&(p=i.callbacks,p!==null&&(d=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=d===null?p:d.concat(p))));break;case 26:var v=Fs;if(Pr(l,i),kr(i),p&512&&(xn||d===null||fo(d,d.return)),p&4){var b=d!==null?d.memoizedState:null;if(p=i.memoizedState,d===null)if(p===null)if(i.stateNode===null){e:{p=i.type,d=i.memoizedProps,v=v.ownerDocument||v;t:switch(p){case"title":b=v.getElementsByTagName("title")[0],(!b||b[Ui]||b[On]||b.namespaceURI==="http://www.w3.org/2000/svg"||b.hasAttribute("itemprop"))&&(b=v.createElement(p),v.head.insertBefore(b,v.querySelector("head > title"))),Jn(b,p,d),b[On]=i,ln(b),p=b;break e;case"link":var _=TN("link","href",v).get(p+(d.href||""));if(_){for(var P=0;P<_.length;P++)if(b=_[P],b.getAttribute("href")===(d.href==null||d.href===""?null:d.href)&&b.getAttribute("rel")===(d.rel==null?null:d.rel)&&b.getAttribute("title")===(d.title==null?null:d.title)&&b.getAttribute("crossorigin")===(d.crossOrigin==null?null:d.crossOrigin)){_.splice(P,1);break t}}b=v.createElement(p),Jn(b,p,d),v.head.appendChild(b);break;case"meta":if(_=TN("meta","content",v).get(p+(d.content||""))){for(P=0;P<_.length;P++)if(b=_[P],b.getAttribute("content")===(d.content==null?null:""+d.content)&&b.getAttribute("name")===(d.name==null?null:d.name)&&b.getAttribute("property")===(d.property==null?null:d.property)&&b.getAttribute("http-equiv")===(d.httpEquiv==null?null:d.httpEquiv)&&b.getAttribute("charset")===(d.charSet==null?null:d.charSet)){_.splice(P,1);break t}}b=v.createElement(p),Jn(b,p,d),v.head.appendChild(b);break;default:throw Error(r(468,p))}b[On]=i,ln(b),p=b}i.stateNode=p}else RN(v,i.type,i.stateNode);else i.stateNode=AN(v,p,i.memoizedProps);else b!==p?(b===null?d.stateNode!==null&&(d=d.stateNode,d.parentNode.removeChild(d)):b.count--,p===null?RN(v,i.type,i.stateNode):AN(v,p,i.memoizedProps)):p===null&&i.stateNode!==null&&n1(i,i.memoizedProps,d.memoizedProps)}break;case 27:Pr(l,i),kr(i),p&512&&(xn||d===null||fo(d,d.return)),d!==null&&p&4&&n1(i,i.memoizedProps,d.memoizedProps);break;case 5:if(Pr(l,i),kr(i),p&512&&(xn||d===null||fo(d,d.return)),i.flags&32){v=i.stateNode;try{X(v,"")}catch(Re){kt(i,i.return,Re)}}p&4&&i.stateNode!=null&&(v=i.memoizedProps,n1(i,v,d!==null?d.memoizedProps:v)),p&1024&&(o1=!0);break;case 6:if(Pr(l,i),kr(i),p&4){if(i.stateNode===null)throw Error(r(162));p=i.memoizedProps,d=i.stateNode;try{d.nodeValue=p}catch(Re){kt(i,i.return,Re)}}break;case 3:if(Ag=null,v=Fs,Fs=xg(l.containerInfo),Pr(l,i),Fs=v,kr(i),p&4&&d!==null&&d.memoizedState.isDehydrated)try{ec(l.containerInfo)}catch(Re){kt(i,i.return,Re)}o1&&(o1=!1,RO(i));break;case 4:p=Fs,Fs=xg(i.stateNode.containerInfo),Pr(l,i),kr(i),Fs=p;break;case 12:Pr(l,i),kr(i);break;case 31:Pr(l,i),kr(i),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,cg(i,p)));break;case 13:Pr(l,i),kr(i),i.child.flags&8192&&i.memoizedState!==null!=(d!==null&&d.memoizedState!==null)&&(fg=Gt()),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,cg(i,p)));break;case 22:v=i.memoizedState!==null;var B=d!==null&&d.memoizedState!==null,J=Go,se=xn;if(Go=J||v,xn=se||B,Pr(l,i),xn=se,Go=J,kr(i),p&8192)e:for(l=i.stateNode,l._visibility=v?l._visibility&-2:l._visibility|1,v&&(d===null||B||Go||xn||gl(i)),d=null,l=i;;){if(l.tag===5||l.tag===26){if(d===null){B=d=l;try{if(b=B.stateNode,v)_=b.style,typeof _.setProperty=="function"?_.setProperty("display","none","important"):_.display="none";else{P=B.stateNode;var ae=B.memoizedProps.style,ne=ae!=null&&ae.hasOwnProperty("display")?ae.display:null;P.style.display=ne==null||typeof ne=="boolean"?"":(""+ne).trim()}}catch(Re){kt(B,B.return,Re)}}}else if(l.tag===6){if(d===null){B=l;try{B.stateNode.nodeValue=v?"":B.memoizedProps}catch(Re){kt(B,B.return,Re)}}}else if(l.tag===18){if(d===null){B=l;try{var re=B.stateNode;v?vN(re,!0):vN(B.stateNode,!1)}catch(Re){kt(B,B.return,Re)}}}else if((l.tag!==22&&l.tag!==23||l.memoizedState===null||l===i)&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===i)break e;for(;l.sibling===null;){if(l.return===null||l.return===i)break e;d===l&&(d=null),l=l.return}d===l&&(d=null),l.sibling.return=l.return,l=l.sibling}p&4&&(p=i.updateQueue,p!==null&&(d=p.retryQueue,d!==null&&(p.retryQueue=null,cg(i,d))));break;case 19:Pr(l,i),kr(i),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,cg(i,p)));break;case 30:break;case 21:break;default:Pr(l,i),kr(i)}}function kr(i){var l=i.flags;if(l&2){try{for(var d,p=i.return;p!==null;){if(bO(p)){d=p;break}p=p.return}if(d==null)throw Error(r(160));switch(d.tag){case 27:var v=d.stateNode,b=r1(i);ug(i,b,v);break;case 5:var _=d.stateNode;d.flags&32&&(X(_,""),d.flags&=-33);var P=r1(i);ug(i,P,_);break;case 3:case 4:var B=d.stateNode.containerInfo,J=r1(i);s1(i,J,B);break;default:throw Error(r(161))}}catch(se){kt(i,i.return,se)}i.flags&=-3}l&4096&&(i.flags&=-4097)}function RO(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var l=i;RO(l),l.tag===5&&l.flags&1024&&l.stateNode.reset(),i=i.sibling}}function Yo(i,l){if(l.subtreeFlags&8772)for(l=l.child;l!==null;)CO(i,l.alternate,l),l=l.sibling}function gl(i){for(i=i.child;i!==null;){var l=i;switch(l.tag){case 0:case 11:case 14:case 15:Qi(4,l,l.return),gl(l);break;case 1:fo(l,l.return);var d=l.stateNode;typeof d.componentWillUnmount=="function"&&vO(l,l.return,d),gl(l);break;case 27:mf(l.stateNode);case 26:case 5:fo(l,l.return),gl(l);break;case 22:l.memoizedState===null&&gl(l);break;case 30:gl(l);break;default:gl(l)}i=i.sibling}}function Zo(i,l,d){for(d=d&&(l.subtreeFlags&8772)!==0,l=l.child;l!==null;){var p=l.alternate,v=i,b=l,_=b.flags;switch(b.tag){case 0:case 11:case 15:Zo(v,b,d),of(4,b);break;case 1:if(Zo(v,b,d),p=b,v=p.stateNode,typeof v.componentDidMount=="function")try{v.componentDidMount()}catch(J){kt(p,p.return,J)}if(p=b,v=p.updateQueue,v!==null){var P=p.stateNode;try{var B=v.shared.hiddenCallbacks;if(B!==null)for(v.shared.hiddenCallbacks=null,v=0;v<B.length;v++)o2(B[v],P)}catch(J){kt(p,p.return,J)}}d&&_&64&&mO(b),af(b,b.return);break;case 27:SO(b);case 26:case 5:Zo(v,b,d),d&&p===null&&_&4&&yO(b),af(b,b.return);break;case 12:Zo(v,b,d);break;case 31:Zo(v,b,d),d&&_&4&&_O(v,b);break;case 13:Zo(v,b,d),d&&_&4&&AO(v,b);break;case 22:b.memoizedState===null&&Zo(v,b,d),af(b,b.return);break;case 30:break;default:Zo(v,b,d)}l=l.sibling}}function i1(i,l){var d=null;i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(d=i.memoizedState.cachePool.pool),i=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(i=l.memoizedState.cachePool.pool),i!==d&&(i!=null&&i.refCount++,d!=null&&Vd(d))}function a1(i,l){i=null,l.alternate!==null&&(i=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==i&&(l.refCount++,i!=null&&Vd(i))}function zs(i,l,d,p){if(l.subtreeFlags&10256)for(l=l.child;l!==null;)IO(i,l,d,p),l=l.sibling}function IO(i,l,d,p){var v=l.flags;switch(l.tag){case 0:case 11:case 15:zs(i,l,d,p),v&2048&&of(9,l);break;case 1:zs(i,l,d,p);break;case 3:zs(i,l,d,p),v&2048&&(i=null,l.alternate!==null&&(i=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==i&&(l.refCount++,i!=null&&Vd(i)));break;case 12:if(v&2048){zs(i,l,d,p),i=l.stateNode;try{var b=l.memoizedProps,_=b.id,P=b.onPostCommit;typeof P=="function"&&P(_,l.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(B){kt(l,l.return,B)}}else zs(i,l,d,p);break;case 31:zs(i,l,d,p);break;case 13:zs(i,l,d,p);break;case 23:break;case 22:b=l.stateNode,_=l.alternate,l.memoizedState!==null?b._visibility&2?zs(i,l,d,p):lf(i,l):b._visibility&2?zs(i,l,d,p):(b._visibility|=2,$u(i,l,d,p,(l.subtreeFlags&10256)!==0||!1)),v&2048&&i1(_,l);break;case 24:zs(i,l,d,p),v&2048&&a1(l.alternate,l);break;default:zs(i,l,d,p)}}function $u(i,l,d,p,v){for(v=v&&((l.subtreeFlags&10256)!==0||!1),l=l.child;l!==null;){var b=i,_=l,P=d,B=p,J=_.flags;switch(_.tag){case 0:case 11:case 15:$u(b,_,P,B,v),of(8,_);break;case 23:break;case 22:var se=_.stateNode;_.memoizedState!==null?se._visibility&2?$u(b,_,P,B,v):lf(b,_):(se._visibility|=2,$u(b,_,P,B,v)),v&&J&2048&&i1(_.alternate,_);break;case 24:$u(b,_,P,B,v),v&&J&2048&&a1(_.alternate,_);break;default:$u(b,_,P,B,v)}l=l.sibling}}function lf(i,l){if(l.subtreeFlags&10256)for(l=l.child;l!==null;){var d=i,p=l,v=p.flags;switch(p.tag){case 22:lf(d,p),v&2048&&i1(p.alternate,p);break;case 24:lf(d,p),v&2048&&a1(p.alternate,p);break;default:lf(d,p)}l=l.sibling}}var uf=8192;function qu(i,l,d){if(i.subtreeFlags&uf)for(i=i.child;i!==null;)OO(i,l,d),i=i.sibling}function OO(i,l,d){switch(i.tag){case 26:qu(i,l,d),i.flags&uf&&i.memoizedState!==null&&yq(d,Fs,i.memoizedState,i.memoizedProps);break;case 5:qu(i,l,d);break;case 3:case 4:var p=Fs;Fs=xg(i.stateNode.containerInfo),qu(i,l,d),Fs=p;break;case 22:i.memoizedState===null&&(p=i.alternate,p!==null&&p.memoizedState!==null?(p=uf,uf=16777216,qu(i,l,d),uf=p):qu(i,l,d));break;default:qu(i,l,d)}}function NO(i){var l=i.alternate;if(l!==null&&(i=l.child,i!==null)){l.child=null;do l=i.sibling,i.sibling=null,i=l;while(i!==null)}}function cf(i){var l=i.deletions;if((i.flags&16)!==0){if(l!==null)for(var d=0;d<l.length;d++){var p=l[d];Fn=p,PO(p,i)}NO(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)MO(i),i=i.sibling}function MO(i){switch(i.tag){case 0:case 11:case 15:cf(i),i.flags&2048&&Qi(9,i,i.return);break;case 3:cf(i);break;case 12:cf(i);break;case 22:var l=i.stateNode;i.memoizedState!==null&&l._visibility&2&&(i.return===null||i.return.tag!==13)?(l._visibility&=-3,dg(i)):cf(i);break;default:cf(i)}}function dg(i){var l=i.deletions;if((i.flags&16)!==0){if(l!==null)for(var d=0;d<l.length;d++){var p=l[d];Fn=p,PO(p,i)}NO(i)}for(i=i.child;i!==null;){switch(l=i,l.tag){case 0:case 11:case 15:Qi(8,l,l.return),dg(l);break;case 22:d=l.stateNode,d._visibility&2&&(d._visibility&=-3,dg(l));break;default:dg(l)}i=i.sibling}}function PO(i,l){for(;Fn!==null;){var d=Fn;switch(d.tag){case 0:case 11:case 15:Qi(8,d,l);break;case 23:case 22:if(d.memoizedState!==null&&d.memoizedState.cachePool!==null){var p=d.memoizedState.cachePool.pool;p!=null&&p.refCount++}break;case 24:Vd(d.memoizedState.cache)}if(p=d.child,p!==null)p.return=d,Fn=p;else e:for(d=i;Fn!==null;){p=Fn;var v=p.sibling,b=p.return;if(wO(p),p===d){Fn=null;break e}if(v!==null){v.return=b,Fn=v;break e}Fn=b}}}var P$={getCacheForType:function(i){var l=Xn(En),d=l.data.get(i);return d===void 0&&(d=i(),l.data.set(i,d)),d},cacheSignal:function(){return Xn(En).controller.signal}},k$=typeof WeakMap=="function"?WeakMap:Map,It=0,Wt=null,it=null,ut=0,Pt=0,es=null,Ji=!1,Wu=!1,l1=!1,Xo=0,pn=0,ea=0,ml=0,u1=0,ts=0,Vu=0,df=null,Dr=null,c1=!1,fg=0,kO=0,hg=1/0,pg=null,ta=null,Mn=0,na=null,Gu=null,Qo=0,d1=0,f1=null,DO=null,ff=0,h1=null;function ns(){return(It&2)!==0&&ut!==0?ut&-ut:H.T!==null?b1():wp()}function LO(){if(ts===0)if((ut&536870912)===0||dt){var i=Ya;Ya<<=1,(Ya&3932160)===0&&(Ya=262144),ts=i}else ts=536870912;return i=Qr.current,i!==null&&(i.flags|=32),ts}function Lr(i,l,d){(i===Wt&&(Pt===2||Pt===9)||i.cancelPendingCommit!==null)&&(Ku(i,0),ra(i,ut,ts,!1)),Lo(i,d),((It&2)===0||i!==Wt)&&(i===Wt&&((It&2)===0&&(ml|=d),pn===4&&ra(i,ut,ts,!1)),ho(i))}function UO(i,l,d){if((It&6)!==0)throw Error(r(327));var p=!d&&(l&127)===0&&(l&i.expiredLanes)===0||so(i,l),v=p?U$(i,l):g1(i,l,!0),b=p;do{if(v===0){Wu&&!p&&ra(i,l,0,!1);break}else{if(d=i.current.alternate,b&&!D$(d)){v=g1(i,l,!1),b=!1;continue}if(v===2){if(b=l,i.errorRecoveryDisabledLanes&b)var _=0;else _=i.pendingLanes&-536870913,_=_!==0?_:_&536870912?536870912:0;if(_!==0){l=_;e:{var P=i;v=df;var B=P.current.memoizedState.isDehydrated;if(B&&(Ku(P,_).flags|=256),_=g1(P,_,!1),_!==2){if(l1&&!B){P.errorRecoveryDisabledLanes|=b,ml|=b,v=4;break e}b=Dr,Dr=v,b!==null&&(Dr===null?Dr=b:Dr.push.apply(Dr,b))}v=_}if(b=!1,v!==2)continue}}if(v===1){Ku(i,0),ra(i,l,0,!0);break}e:{switch(p=i,b=v,b){case 0:case 1:throw Error(r(345));case 4:if((l&4194048)!==l)break;case 6:ra(p,l,ts,!Ji);break e;case 2:Dr=null;break;case 3:case 5:break;default:throw Error(r(329))}if((l&62914560)===l&&(v=fg+300-Gt(),10<v)){if(ra(p,l,ts,!Ji),Xa(p,0,!0)!==0)break e;Qo=l,p.timeoutHandle=pN(FO.bind(null,p,d,Dr,pg,c1,l,ts,ml,Vu,Ji,b,"Throttled",-0,0),v);break e}FO(p,d,Dr,pg,c1,l,ts,ml,Vu,Ji,b,null,-0,0)}}break}while(!0);ho(i)}function FO(i,l,d,p,v,b,_,P,B,J,se,ae,ne,re){if(i.timeoutHandle=-1,ae=l.subtreeFlags,ae&8192||(ae&16785408)===16785408){ae={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:nn},OO(l,b,ae);var Re=(b&62914560)===b?fg-Gt():(b&4194048)===b?kO-Gt():0;if(Re=bq(ae,Re),Re!==null){Qo=b,i.cancelPendingCommit=Re(VO.bind(null,i,l,b,d,p,v,_,P,B,se,ae,null,ne,re)),ra(i,b,_,!J);return}}VO(i,l,b,d,p,v,_,P,B)}function D$(i){for(var l=i;;){var d=l.tag;if((d===0||d===11||d===15)&&l.flags&16384&&(d=l.updateQueue,d!==null&&(d=d.stores,d!==null)))for(var p=0;p<d.length;p++){var v=d[p],b=v.getSnapshot;v=v.value;try{if(!Zr(b(),v))return!1}catch{return!1}}if(d=l.child,l.subtreeFlags&16384&&d!==null)d.return=l,l=d;else{if(l===i)break;for(;l.sibling===null;){if(l.return===null||l.return===i)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function ra(i,l,d,p){l&=~u1,l&=~ml,i.suspendedLanes|=l,i.pingedLanes&=~l,p&&(i.warmLanes|=l),p=i.expirationTimes;for(var v=l;0<v;){var b=31-Yn(v),_=1<<b;p[b]=-1,v&=~_}d!==0&&Cp(i,d,l)}function gg(){return(It&6)===0?(hf(0),!1):!0}function p1(){if(it!==null){if(Pt===0)var i=it.return;else i=it,Bo=al=null,O0(i),Fu=null,Kd=0,i=it;for(;i!==null;)gO(i.alternate,i),i=i.return;it=null}}function Ku(i,l){var d=i.timeoutHandle;d!==-1&&(i.timeoutHandle=-1,tq(d)),d=i.cancelPendingCommit,d!==null&&(i.cancelPendingCommit=null,d()),Qo=0,p1(),Wt=i,it=d=zo(i.current,null),ut=l,Pt=0,es=null,Ji=!1,Wu=so(i,l),l1=!1,Vu=ts=u1=ml=ea=pn=0,Dr=df=null,c1=!1,(l&8)!==0&&(l|=l&32);var p=i.entangledLanes;if(p!==0)for(i=i.entanglements,p&=l;0<p;){var v=31-Yn(p),b=1<<v;l|=i[v],p&=~b}return Xo=l,Lp(),d}function zO(i,l){Qe=null,H.H=nf,l===Uu||l===qp?(l=t2(),Pt=3):l===y0?(l=t2(),Pt=4):Pt=l===V0?8:l!==null&&typeof l=="object"&&typeof l.then=="function"?6:1,es=l,it===null&&(pn=1,sg(i,ms(l,i.current)))}function jO(){var i=Qr.current;return i===null?!0:(ut&4194048)===ut?Ss===null:(ut&62914560)===ut||(ut&536870912)!==0?i===Ss:!1}function BO(){var i=H.H;return H.H=nf,i===null?nf:i}function HO(){var i=H.A;return H.A=P$,i}function mg(){pn=4,Ji||(ut&4194048)!==ut&&Qr.current!==null||(Wu=!0),(ea&134217727)===0&&(ml&134217727)===0||Wt===null||ra(Wt,ut,ts,!1)}function g1(i,l,d){var p=It;It|=2;var v=BO(),b=HO();(Wt!==i||ut!==l)&&(pg=null,Ku(i,l)),l=!1;var _=pn;e:do try{if(Pt!==0&&it!==null){var P=it,B=es;switch(Pt){case 8:p1(),_=6;break e;case 3:case 2:case 9:case 6:Qr.current===null&&(l=!0);var J=Pt;if(Pt=0,es=null,Yu(i,P,B,J),d&&Wu){_=0;break e}break;default:J=Pt,Pt=0,es=null,Yu(i,P,B,J)}}L$(),_=pn;break}catch(se){zO(i,se)}while(!0);return l&&i.shellSuspendCounter++,Bo=al=null,It=p,H.H=v,H.A=b,it===null&&(Wt=null,ut=0,Lp()),_}function L$(){for(;it!==null;)$O(it)}function U$(i,l){var d=It;It|=2;var p=BO(),v=HO();Wt!==i||ut!==l?(pg=null,hg=Gt()+500,Ku(i,l)):Wu=so(i,l);e:do try{if(Pt!==0&&it!==null){l=it;var b=es;t:switch(Pt){case 1:Pt=0,es=null,Yu(i,l,b,1);break;case 2:case 9:if(JI(b)){Pt=0,es=null,qO(l);break}l=function(){Pt!==2&&Pt!==9||Wt!==i||(Pt=7),ho(i)},b.then(l,l);break e;case 3:Pt=7;break e;case 4:Pt=5;break e;case 7:JI(b)?(Pt=0,es=null,qO(l)):(Pt=0,es=null,Yu(i,l,b,7));break;case 5:var _=null;switch(it.tag){case 26:_=it.memoizedState;case 5:case 27:var P=it;if(_?IN(_):P.stateNode.complete){Pt=0,es=null;var B=P.sibling;if(B!==null)it=B;else{var J=P.return;J!==null?(it=J,vg(J)):it=null}break t}}Pt=0,es=null,Yu(i,l,b,5);break;case 6:Pt=0,es=null,Yu(i,l,b,6);break;case 8:p1(),pn=6;break e;default:throw Error(r(462))}}F$();break}catch(se){zO(i,se)}while(!0);return Bo=al=null,H.H=p,H.A=v,It=d,it!==null?0:(Wt=null,ut=0,Lp(),pn)}function F$(){for(;it!==null&&!no();)$O(it)}function $O(i){var l=hO(i.alternate,i,Xo);i.memoizedProps=i.pendingProps,l===null?vg(i):it=l}function qO(i){var l=i,d=l.alternate;switch(l.tag){case 15:case 0:l=aO(d,l,l.pendingProps,l.type,void 0,ut);break;case 11:l=aO(d,l,l.pendingProps,l.type.render,l.ref,ut);break;case 5:O0(l);default:gO(d,l),l=it=HI(l,Xo),l=hO(d,l,Xo)}i.memoizedProps=i.pendingProps,l===null?vg(i):it=l}function Yu(i,l,d,p){Bo=al=null,O0(l),Fu=null,Kd=0;var v=l.return;try{if(A$(i,v,l,d,ut)){pn=1,sg(i,ms(d,i.current)),it=null;return}}catch(b){if(v!==null)throw it=v,b;pn=1,sg(i,ms(d,i.current)),it=null;return}l.flags&32768?(dt||p===1?i=!0:Wu||(ut&536870912)!==0?i=!1:(Ji=i=!0,(p===2||p===9||p===3||p===6)&&(p=Qr.current,p!==null&&p.tag===13&&(p.flags|=16384))),WO(l,i)):vg(l)}function vg(i){var l=i;do{if((l.flags&32768)!==0){WO(l,Ji);return}i=l.return;var d=I$(l.alternate,l,Xo);if(d!==null){it=d;return}if(l=l.sibling,l!==null){it=l;return}it=l=i}while(l!==null);pn===0&&(pn=5)}function WO(i,l){do{var d=O$(i.alternate,i);if(d!==null){d.flags&=32767,it=d;return}if(d=i.return,d!==null&&(d.flags|=32768,d.subtreeFlags=0,d.deletions=null),!l&&(i=i.sibling,i!==null)){it=i;return}it=i=d}while(i!==null);pn=6,it=null}function VO(i,l,d,p,v,b,_,P,B){i.cancelPendingCommit=null;do yg();while(Mn!==0);if((It&6)!==0)throw Error(r(327));if(l!==null){if(l===i.current)throw Error(r(177));if(b=l.lanes|l.childLanes,b|=r0,xd(i,d,b,_,P,B),i===Wt&&(it=Wt=null,ut=0),Gu=l,na=i,Qo=d,d1=b,f1=v,DO=p,(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,H$(ro,function(){return XO(),null})):(i.callbackNode=null,i.callbackPriority=0),p=(l.flags&13878)!==0,(l.subtreeFlags&13878)!==0||p){p=H.T,H.T=null,v=te.p,te.p=2,_=It,It|=4;try{N$(i,l,d)}finally{It=_,te.p=v,H.T=p}}Mn=1,GO(),KO(),YO()}}function GO(){if(Mn===1){Mn=0;var i=na,l=Gu,d=(l.flags&13878)!==0;if((l.subtreeFlags&13878)!==0||d){d=H.T,H.T=null;var p=te.p;te.p=2;var v=It;It|=4;try{TO(l,i);var b=T1,_=PI(i.containerInfo),P=b.focusedElem,B=b.selectionRange;if(_!==P&&P&&P.ownerDocument&&MI(P.ownerDocument.documentElement,P)){if(B!==null&&Qb(P)){var J=B.start,se=B.end;if(se===void 0&&(se=J),"selectionStart"in P)P.selectionStart=J,P.selectionEnd=Math.min(se,P.value.length);else{var ae=P.ownerDocument||document,ne=ae&&ae.defaultView||window;if(ne.getSelection){var re=ne.getSelection(),Re=P.textContent.length,De=Math.min(B.start,Re),jt=B.end===void 0?De:Math.min(B.end,Re);!re.extend&&De>jt&&(_=jt,jt=De,De=_);var V=NI(P,De),W=NI(P,jt);if(V&&W&&(re.rangeCount!==1||re.anchorNode!==V.node||re.anchorOffset!==V.offset||re.focusNode!==W.node||re.focusOffset!==W.offset)){var Q=ae.createRange();Q.setStart(V.node,V.offset),re.removeAllRanges(),De>jt?(re.addRange(Q),re.extend(W.node,W.offset)):(Q.setEnd(W.node,W.offset),re.addRange(Q))}}}}for(ae=[],re=P;re=re.parentNode;)re.nodeType===1&&ae.push({element:re,left:re.scrollLeft,top:re.scrollTop});for(typeof P.focus=="function"&&P.focus(),P=0;P<ae.length;P++){var ie=ae[P];ie.element.scrollLeft=ie.left,ie.element.scrollTop=ie.top}}Og=!!A1,T1=A1=null}finally{It=v,te.p=p,H.T=d}}i.current=l,Mn=2}}function KO(){if(Mn===2){Mn=0;var i=na,l=Gu,d=(l.flags&8772)!==0;if((l.subtreeFlags&8772)!==0||d){d=H.T,H.T=null;var p=te.p;te.p=2;var v=It;It|=4;try{CO(i,l.alternate,l)}finally{It=v,te.p=p,H.T=d}}Mn=3}}function YO(){if(Mn===4||Mn===3){Mn=0,Rr();var i=na,l=Gu,d=Qo,p=DO;(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?Mn=5:(Mn=0,Gu=na=null,ZO(i,i.pendingLanes));var v=i.pendingLanes;if(v===0&&(ta=null),Qa(d),l=l.stateNode,lr&&typeof lr.onCommitFiberRoot=="function")try{lr.onCommitFiberRoot(Pi,l,void 0,(l.current.flags&128)===128)}catch{}if(p!==null){l=H.T,v=te.p,te.p=2,H.T=null;try{for(var b=i.onRecoverableError,_=0;_<p.length;_++){var P=p[_];b(P.value,{componentStack:P.stack})}}finally{H.T=l,te.p=v}}(Qo&3)!==0&&yg(),ho(i),v=i.pendingLanes,(d&261930)!==0&&(v&42)!==0?i===h1?ff++:(ff=0,h1=i):ff=0,hf(0)}}function ZO(i,l){(i.pooledCacheLanes&=l)===0&&(l=i.pooledCache,l!=null&&(i.pooledCache=null,Vd(l)))}function yg(){return GO(),KO(),YO(),XO()}function XO(){if(Mn!==5)return!1;var i=na,l=d1;d1=0;var d=Qa(Qo),p=H.T,v=te.p;try{te.p=32>d?32:d,H.T=null,d=f1,f1=null;var b=na,_=Qo;if(Mn=0,Gu=na=null,Qo=0,(It&6)!==0)throw Error(r(331));var P=It;if(It|=4,MO(b.current),IO(b,b.current,_,d),It=P,hf(0,!1),lr&&typeof lr.onPostCommitFiberRoot=="function")try{lr.onPostCommitFiberRoot(Pi,b)}catch{}return!0}finally{te.p=v,H.T=p,ZO(i,l)}}function QO(i,l,d){l=ms(d,l),l=W0(i.stateNode,l,2),i=Yi(i,l,2),i!==null&&(Lo(i,2),ho(i))}function kt(i,l,d){if(i.tag===3)QO(i,i,d);else for(;l!==null;){if(l.tag===3){QO(l,i,d);break}else if(l.tag===1){var p=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof p.componentDidCatch=="function"&&(ta===null||!ta.has(p))){i=ms(d,i),d=J2(2),p=Yi(l,d,2),p!==null&&(eO(d,p,l,i),Lo(p,2),ho(p));break}}l=l.return}}function m1(i,l,d){var p=i.pingCache;if(p===null){p=i.pingCache=new k$;var v=new Set;p.set(l,v)}else v=p.get(l),v===void 0&&(v=new Set,p.set(l,v));v.has(d)||(l1=!0,v.add(d),i=z$.bind(null,i,l,d),l.then(i,i))}function z$(i,l,d){var p=i.pingCache;p!==null&&p.delete(l),i.pingedLanes|=i.suspendedLanes&d,i.warmLanes&=~d,Wt===i&&(ut&d)===d&&(pn===4||pn===3&&(ut&62914560)===ut&&300>Gt()-fg?(It&2)===0&&Ku(i,0):u1|=d,Vu===ut&&(Vu=0)),ho(i)}function JO(i,l){l===0&&(l=Kr()),i=sl(i,l),i!==null&&(Lo(i,l),ho(i))}function j$(i){var l=i.memoizedState,d=0;l!==null&&(d=l.retryLane),JO(i,d)}function B$(i,l){var d=0;switch(i.tag){case 31:case 13:var p=i.stateNode,v=i.memoizedState;v!==null&&(d=v.retryLane);break;case 19:p=i.stateNode;break;case 22:p=i.stateNode._retryCache;break;default:throw Error(r(314))}p!==null&&p.delete(l),JO(i,d)}function H$(i,l){return Kn(i,l)}var bg=null,Zu=null,v1=!1,Sg=!1,y1=!1,sa=0;function ho(i){i!==Zu&&i.next===null&&(Zu===null?bg=Zu=i:Zu=Zu.next=i),Sg=!0,v1||(v1=!0,q$())}function hf(i,l){if(!y1&&Sg){y1=!0;do for(var d=!1,p=bg;p!==null;){if(i!==0){var v=p.pendingLanes;if(v===0)var b=0;else{var _=p.suspendedLanes,P=p.pingedLanes;b=(1<<31-Yn(42|i)+1)-1,b&=v&~(_&~P),b=b&201326741?b&201326741|1:b?b|2:0}b!==0&&(d=!0,rN(p,b))}else b=ut,b=Xa(p,p===Wt?b:0,p.cancelPendingCommit!==null||p.timeoutHandle!==-1),(b&3)===0||so(p,b)||(d=!0,rN(p,b));p=p.next}while(d);y1=!1}}function $$(){eN()}function eN(){Sg=v1=!1;var i=0;sa!==0&&eq()&&(i=sa);for(var l=Gt(),d=null,p=bg;p!==null;){var v=p.next,b=tN(p,l);b===0?(p.next=null,d===null?bg=v:d.next=v,v===null&&(Zu=d)):(d=p,(i!==0||(b&3)!==0)&&(Sg=!0)),p=v}Mn!==0&&Mn!==5||hf(i),sa!==0&&(sa=0)}function tN(i,l){for(var d=i.suspendedLanes,p=i.pingedLanes,v=i.expirationTimes,b=i.pendingLanes&-62914561;0<b;){var _=31-Yn(b),P=1<<_,B=v[_];B===-1?((P&d)===0||(P&p)!==0)&&(v[_]=bu(P,l)):B<=l&&(i.expiredLanes|=P),b&=~P}if(l=Wt,d=ut,d=Xa(i,i===l?d:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),p=i.callbackNode,d===0||i===l&&(Pt===2||Pt===9)||i.cancelPendingCommit!==null)return p!==null&&p!==null&&Tr(p),i.callbackNode=null,i.callbackPriority=0;if((d&3)===0||so(i,d)){if(l=d&-d,l===i.callbackPriority)return l;switch(p!==null&&Tr(p),Qa(d)){case 2:case 8:d=Ir;break;case 32:d=ro;break;case 268435456:d=Do;break;default:d=ro}return p=nN.bind(null,i),d=Kn(d,p),i.callbackPriority=l,i.callbackNode=d,l}return p!==null&&p!==null&&Tr(p),i.callbackPriority=2,i.callbackNode=null,2}function nN(i,l){if(Mn!==0&&Mn!==5)return i.callbackNode=null,i.callbackPriority=0,null;var d=i.callbackNode;if(yg()&&i.callbackNode!==d)return null;var p=ut;return p=Xa(i,i===Wt?p:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),p===0?null:(UO(i,p,l),tN(i,Gt()),i.callbackNode!=null&&i.callbackNode===d?nN.bind(null,i):null)}function rN(i,l){if(yg())return null;UO(i,l,!0)}function q$(){nq(function(){(It&6)!==0?Kn(yn,$$):eN()})}function b1(){if(sa===0){var i=Du;i===0&&(i=Di,Di<<=1,(Di&261888)===0&&(Di=256)),sa=i}return sa}function sN(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:ur(""+i)}function oN(i,l){var d=l.ownerDocument.createElement("input");return d.name=l.name,d.value=l.value,i.id&&d.setAttribute("form",i.id),l.parentNode.insertBefore(d,l),i=new FormData(i),d.parentNode.removeChild(d),i}function W$(i,l,d,p,v){if(l==="submit"&&d&&d.stateNode===v){var b=sN((v[nt]||null).action),_=p.submitter;_&&(l=(l=_[nt]||null)?sN(l.formAction):_.getAttribute("formAction"),l!==null&&(b=l,_=null));var P=new Mp("action","action",null,p,v);i.push({event:P,listeners:[{instance:null,listener:function(){if(p.defaultPrevented){if(sa!==0){var B=_?oN(v,_):new FormData(v);z0(d,{pending:!0,data:B,method:v.method,action:b},null,B)}}else typeof b=="function"&&(P.preventDefault(),B=_?oN(v,_):new FormData(v),z0(d,{pending:!0,data:B,method:v.method,action:b},b,B))},currentTarget:v}]})}}for(var S1=0;S1<n0.length;S1++){var E1=n0[S1],V$=E1.toLowerCase(),G$=E1[0].toUpperCase()+E1.slice(1);Us(V$,"on"+G$)}Us(LI,"onAnimationEnd"),Us(UI,"onAnimationIteration"),Us(FI,"onAnimationStart"),Us("dblclick","onDoubleClick"),Us("focusin","onFocus"),Us("focusout","onBlur"),Us(u$,"onTransitionRun"),Us(c$,"onTransitionStart"),Us(d$,"onTransitionCancel"),Us(zI,"onTransitionEnd"),ji("onMouseEnter",["mouseout","mouseover"]),ji("onMouseLeave",["mouseout","mouseover"]),ji("onPointerEnter",["pointerout","pointerover"]),ji("onPointerLeave",["pointerout","pointerover"]),Ds("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ds("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ds("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ds("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ds("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ds("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var pf="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),K$=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(pf));function iN(i,l){l=(l&4)!==0;for(var d=0;d<i.length;d++){var p=i[d],v=p.event;p=p.listeners;e:{var b=void 0;if(l)for(var _=p.length-1;0<=_;_--){var P=p[_],B=P.instance,J=P.currentTarget;if(P=P.listener,B!==b&&v.isPropagationStopped())break e;b=P,v.currentTarget=J;try{b(v)}catch(se){Dp(se)}v.currentTarget=null,b=B}else for(_=0;_<p.length;_++){if(P=p[_],B=P.instance,J=P.currentTarget,P=P.listener,B!==b&&v.isPropagationStopped())break e;b=P,v.currentTarget=J;try{b(v)}catch(se){Dp(se)}v.currentTarget=null,b=B}}}}function at(i,l){var d=l[Ad];d===void 0&&(d=l[Ad]=new Set);var p=i+"__bubble";d.has(p)||(aN(l,i,2,!1),d.add(p))}function C1(i,l,d){var p=0;l&&(p|=4),aN(d,i,p,l)}var Eg="_reactListening"+Math.random().toString(36).slice(2);function w1(i){if(!i[Eg]){i[Eg]=!0,ao.forEach(function(d){d!=="selectionchange"&&(K$.has(d)||C1(d,!1,i),C1(d,!0,i))});var l=i.nodeType===9?i:i.ownerDocument;l===null||l[Eg]||(l[Eg]=!0,C1("selectionchange",!1,l))}}function aN(i,l,d,p){switch(LN(l)){case 2:var v=Cq;break;case 8:v=wq;break;default:v=F1}d=v.bind(null,l,d,i),v=void 0,!$b||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(v=!0),p?v!==void 0?i.addEventListener(l,d,{capture:!0,passive:v}):i.addEventListener(l,d,!0):v!==void 0?i.addEventListener(l,d,{passive:v}):i.addEventListener(l,d,!1)}function x1(i,l,d,p,v){var b=p;if((l&1)===0&&(l&2)===0&&p!==null)e:for(;;){if(p===null)return;var _=p.tag;if(_===3||_===4){var P=p.stateNode.containerInfo;if(P===v)break;if(_===4)for(_=p.return;_!==null;){var B=_.tag;if((B===3||B===4)&&_.stateNode.containerInfo===v)return;_=_.return}for(;P!==null;){if(_=Fi(P),_===null)return;if(B=_.tag,B===5||B===6||B===26||B===27){p=b=_;continue e}P=P.parentNode}}p=p.return}fI(function(){var J=b,se=Nn(d),ae=[];e:{var ne=jI.get(i);if(ne!==void 0){var re=Mp,Re=i;switch(i){case"keypress":if(Op(d)===0)break e;case"keydown":case"keyup":re=BH;break;case"focusin":Re="focus",re=Gb;break;case"focusout":Re="blur",re=Gb;break;case"beforeblur":case"afterblur":re=Gb;break;case"click":if(d.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":re=gI;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":re=IH;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":re=qH;break;case LI:case UI:case FI:re=MH;break;case zI:re=VH;break;case"scroll":case"scrollend":re=TH;break;case"wheel":re=KH;break;case"copy":case"cut":case"paste":re=kH;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":re=vI;break;case"toggle":case"beforetoggle":re=ZH}var De=(l&4)!==0,jt=!De&&(i==="scroll"||i==="scrollend"),V=De?ne!==null?ne+"Capture":null:ne;De=[];for(var W=J,Q;W!==null;){var ie=W;if(Q=ie.stateNode,ie=ie.tag,ie!==5&&ie!==26&&ie!==27||Q===null||V===null||(ie=Dd(W,V),ie!=null&&De.push(gf(W,ie,Q))),jt)break;W=W.return}0<De.length&&(ne=new re(ne,Re,null,d,se),ae.push({event:ne,listeners:De}))}}if((l&7)===0){e:{if(ne=i==="mouseover"||i==="pointerover",re=i==="mouseout"||i==="pointerout",ne&&d!==yr&&(Re=d.relatedTarget||d.fromElement)&&(Fi(Re)||Re[Yr]))break e;if((re||ne)&&(ne=se.window===se?se:(ne=se.ownerDocument)?ne.defaultView||ne.parentWindow:window,re?(Re=d.relatedTarget||d.toElement,re=J,Re=Re?Fi(Re):null,Re!==null&&(jt=o(Re),De=Re.tag,Re!==jt||De!==5&&De!==27&&De!==6)&&(Re=null)):(re=null,Re=J),re!==Re)){if(De=gI,ie="onMouseLeave",V="onMouseEnter",W="mouse",(i==="pointerout"||i==="pointerover")&&(De=vI,ie="onPointerLeave",V="onPointerEnter",W="pointer"),jt=re==null?ne:Ja(re),Q=Re==null?ne:Ja(Re),ne=new De(ie,W+"leave",re,d,se),ne.target=jt,ne.relatedTarget=Q,ie=null,Fi(se)===J&&(De=new De(V,W+"enter",Re,d,se),De.target=Q,De.relatedTarget=jt,ie=De),jt=ie,re&&Re)t:{for(De=Y$,V=re,W=Re,Q=0,ie=V;ie;ie=De(ie))Q++;ie=0;for(var Pe=W;Pe;Pe=De(Pe))ie++;for(;0<Q-ie;)V=De(V),Q--;for(;0<ie-Q;)W=De(W),ie--;for(;Q--;){if(V===W||W!==null&&V===W.alternate){De=V;break t}V=De(V),W=De(W)}De=null}else De=null;re!==null&&lN(ae,ne,re,De,!1),Re!==null&&jt!==null&&lN(ae,jt,Re,De,!0)}}e:{if(ne=J?Ja(J):window,re=ne.nodeName&&ne.nodeName.toLowerCase(),re==="select"||re==="input"&&ne.type==="file")var xt=_I;else if(wI(ne))if(AI)xt=i$;else{xt=s$;var Ne=r$}else re=ne.nodeName,!re||re.toLowerCase()!=="input"||ne.type!=="checkbox"&&ne.type!=="radio"?J&&Ue(J.elementType)&&(xt=_I):xt=o$;if(xt&&(xt=xt(i,J))){xI(ae,xt,d,se);break e}Ne&&Ne(i,ne,J),i==="focusout"&&J&&ne.type==="number"&&J.memoizedProps.value!=null&&Bi(ne,"number",ne.value)}switch(Ne=J?Ja(J):window,i){case"focusin":(wI(Ne)||Ne.contentEditable==="true")&&(Tu=Ne,Jb=J,$d=null);break;case"focusout":$d=Jb=Tu=null;break;case"mousedown":e0=!0;break;case"contextmenu":case"mouseup":case"dragend":e0=!1,kI(ae,d,se);break;case"selectionchange":if(l$)break;case"keydown":case"keyup":kI(ae,d,se)}var Je;if(Yb)e:{switch(i){case"compositionstart":var ct="onCompositionStart";break e;case"compositionend":ct="onCompositionEnd";break e;case"compositionupdate":ct="onCompositionUpdate";break e}ct=void 0}else Au?EI(i,d)&&(ct="onCompositionEnd"):i==="keydown"&&d.keyCode===229&&(ct="onCompositionStart");ct&&(yI&&d.locale!=="ko"&&(Au||ct!=="onCompositionStart"?ct==="onCompositionEnd"&&Au&&(Je=hI()):(Hi=se,qb="value"in Hi?Hi.value:Hi.textContent,Au=!0)),Ne=Cg(J,ct),0<Ne.length&&(ct=new mI(ct,i,null,d,se),ae.push({event:ct,listeners:Ne}),Je?ct.data=Je:(Je=CI(d),Je!==null&&(ct.data=Je)))),(Je=QH?JH(i,d):e$(i,d))&&(ct=Cg(J,"onBeforeInput"),0<ct.length&&(Ne=new mI("onBeforeInput","beforeinput",null,d,se),ae.push({event:Ne,listeners:ct}),Ne.data=Je)),W$(ae,i,J,d,se)}iN(ae,l)})}function gf(i,l,d){return{instance:i,listener:l,currentTarget:d}}function Cg(i,l){for(var d=l+"Capture",p=[];i!==null;){var v=i,b=v.stateNode;if(v=v.tag,v!==5&&v!==26&&v!==27||b===null||(v=Dd(i,d),v!=null&&p.unshift(gf(i,v,b)),v=Dd(i,l),v!=null&&p.push(gf(i,v,b))),i.tag===3)return p;i=i.return}return[]}function Y$(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function lN(i,l,d,p,v){for(var b=l._reactName,_=[];d!==null&&d!==p;){var P=d,B=P.alternate,J=P.stateNode;if(P=P.tag,B!==null&&B===p)break;P!==5&&P!==26&&P!==27||J===null||(B=J,v?(J=Dd(d,b),J!=null&&_.unshift(gf(d,J,B))):v||(J=Dd(d,b),J!=null&&_.push(gf(d,J,B)))),d=d.return}_.length!==0&&i.push({event:l,listeners:_})}var Z$=/\r\n?/g,X$=/\u0000|\uFFFD/g;function uN(i){return(typeof i=="string"?i:""+i).replace(Z$,`
224
+ `).replace(X$,"")}function cN(i,l){return l=uN(l),uN(i)===l}function zt(i,l,d,p,v,b){switch(d){case"children":typeof p=="string"?l==="body"||l==="textarea"&&p===""||X(i,p):(typeof p=="number"||typeof p=="bigint")&&l!=="body"&&X(i,""+p);break;case"className":Ls(i,"class",p);break;case"tabIndex":Ls(i,"tabindex",p);break;case"dir":case"role":case"viewBox":case"width":case"height":Ls(i,d,p);break;case"style":ke(i,p,b);break;case"data":if(l!=="object"){Ls(i,"data",p);break}case"src":case"href":if(p===""&&(l!=="a"||d!=="href")){i.removeAttribute(d);break}if(p==null||typeof p=="function"||typeof p=="symbol"||typeof p=="boolean"){i.removeAttribute(d);break}p=ur(""+p),i.setAttribute(d,p);break;case"action":case"formAction":if(typeof p=="function"){i.setAttribute(d,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof b=="function"&&(d==="formAction"?(l!=="input"&&zt(i,l,"name",v.name,v,null),zt(i,l,"formEncType",v.formEncType,v,null),zt(i,l,"formMethod",v.formMethod,v,null),zt(i,l,"formTarget",v.formTarget,v,null)):(zt(i,l,"encType",v.encType,v,null),zt(i,l,"method",v.method,v,null),zt(i,l,"target",v.target,v,null)));if(p==null||typeof p=="symbol"||typeof p=="boolean"){i.removeAttribute(d);break}p=ur(""+p),i.setAttribute(d,p);break;case"onClick":p!=null&&(i.onclick=nn);break;case"onScroll":p!=null&&at("scroll",i);break;case"onScrollEnd":p!=null&&at("scrollend",i);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(r(61));if(d=p.__html,d!=null){if(v.children!=null)throw Error(r(60));i.innerHTML=d}}break;case"multiple":i.multiple=p&&typeof p!="function"&&typeof p!="symbol";break;case"muted":i.muted=p&&typeof p!="function"&&typeof p!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(p==null||typeof p=="function"||typeof p=="boolean"||typeof p=="symbol"){i.removeAttribute("xlink:href");break}d=ur(""+p),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",d);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":p!=null&&typeof p!="function"&&typeof p!="symbol"?i.setAttribute(d,""+p):i.removeAttribute(d);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":p&&typeof p!="function"&&typeof p!="symbol"?i.setAttribute(d,""):i.removeAttribute(d);break;case"capture":case"download":p===!0?i.setAttribute(d,""):p!==!1&&p!=null&&typeof p!="function"&&typeof p!="symbol"?i.setAttribute(d,p):i.removeAttribute(d);break;case"cols":case"rows":case"size":case"span":p!=null&&typeof p!="function"&&typeof p!="symbol"&&!isNaN(p)&&1<=p?i.setAttribute(d,p):i.removeAttribute(d);break;case"rowSpan":case"start":p==null||typeof p=="function"||typeof p=="symbol"||isNaN(p)?i.removeAttribute(d):i.setAttribute(d,p);break;case"popover":at("beforetoggle",i),at("toggle",i),Uo(i,"popover",p);break;case"xlinkActuate":vr(i,"http://www.w3.org/1999/xlink","xlink:actuate",p);break;case"xlinkArcrole":vr(i,"http://www.w3.org/1999/xlink","xlink:arcrole",p);break;case"xlinkRole":vr(i,"http://www.w3.org/1999/xlink","xlink:role",p);break;case"xlinkShow":vr(i,"http://www.w3.org/1999/xlink","xlink:show",p);break;case"xlinkTitle":vr(i,"http://www.w3.org/1999/xlink","xlink:title",p);break;case"xlinkType":vr(i,"http://www.w3.org/1999/xlink","xlink:type",p);break;case"xmlBase":vr(i,"http://www.w3.org/XML/1998/namespace","xml:base",p);break;case"xmlLang":vr(i,"http://www.w3.org/XML/1998/namespace","xml:lang",p);break;case"xmlSpace":vr(i,"http://www.w3.org/XML/1998/namespace","xml:space",p);break;case"is":Uo(i,"is",p);break;case"innerText":case"textContent":break;default:(!(2<d.length)||d[0]!=="o"&&d[0]!=="O"||d[1]!=="n"&&d[1]!=="N")&&(d=tn.get(d)||d,Uo(i,d,p))}}function _1(i,l,d,p,v,b){switch(d){case"style":ke(i,p,b);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(r(61));if(d=p.__html,d!=null){if(v.children!=null)throw Error(r(60));i.innerHTML=d}}break;case"children":typeof p=="string"?X(i,p):(typeof p=="number"||typeof p=="bigint")&&X(i,""+p);break;case"onScroll":p!=null&&at("scroll",i);break;case"onScrollEnd":p!=null&&at("scrollend",i);break;case"onClick":p!=null&&(i.onclick=nn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!_p.hasOwnProperty(d))e:{if(d[0]==="o"&&d[1]==="n"&&(v=d.endsWith("Capture"),l=d.slice(2,v?d.length-7:void 0),b=i[nt]||null,b=b!=null?b[d]:null,typeof b=="function"&&i.removeEventListener(l,b,v),typeof p=="function")){typeof b!="function"&&b!==null&&(d in i?i[d]=null:i.hasAttribute(d)&&i.removeAttribute(d)),i.addEventListener(l,p,v);break e}d in i?i[d]=p:p===!0?i.setAttribute(d,""):Uo(i,d,p)}}}function Jn(i,l,d){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":at("error",i),at("load",i);var p=!1,v=!1,b;for(b in d)if(d.hasOwnProperty(b)){var _=d[b];if(_!=null)switch(b){case"src":p=!0;break;case"srcSet":v=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,l));default:zt(i,l,b,_,d,null)}}v&&zt(i,l,"srcSet",d.srcSet,d,null),p&&zt(i,l,"src",d.src,d,null);return;case"input":at("invalid",i);var P=b=_=v=null,B=null,J=null;for(p in d)if(d.hasOwnProperty(p)){var se=d[p];if(se!=null)switch(p){case"name":v=se;break;case"type":_=se;break;case"checked":B=se;break;case"defaultChecked":J=se;break;case"value":b=se;break;case"defaultValue":P=se;break;case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(r(137,l));break;default:zt(i,l,p,se,d,null)}}kd(i,b,P,B,J,_,v,!1);return;case"select":at("invalid",i),p=_=b=null;for(v in d)if(d.hasOwnProperty(v)&&(P=d[v],P!=null))switch(v){case"value":b=P;break;case"defaultValue":_=P;break;case"multiple":p=P;default:zt(i,l,v,P,d,null)}l=b,d=_,i.multiple=!!p,l!=null?lo(i,!!p,l,!1):d!=null&&lo(i,!!p,d,!0);return;case"textarea":at("invalid",i),b=v=p=null;for(_ in d)if(d.hasOwnProperty(_)&&(P=d[_],P!=null))switch(_){case"value":p=P;break;case"defaultValue":v=P;break;case"children":b=P;break;case"dangerouslySetInnerHTML":if(P!=null)throw Error(r(91));break;default:zt(i,l,_,P,d,null)}U(i,p,v,b);return;case"option":for(B in d)d.hasOwnProperty(B)&&(p=d[B],p!=null)&&(B==="selected"?i.selected=p&&typeof p!="function"&&typeof p!="symbol":zt(i,l,B,p,d,null));return;case"dialog":at("beforetoggle",i),at("toggle",i),at("cancel",i),at("close",i);break;case"iframe":case"object":at("load",i);break;case"video":case"audio":for(p=0;p<pf.length;p++)at(pf[p],i);break;case"image":at("error",i),at("load",i);break;case"details":at("toggle",i);break;case"embed":case"source":case"link":at("error",i),at("load",i);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(J in d)if(d.hasOwnProperty(J)&&(p=d[J],p!=null))switch(J){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,l));default:zt(i,l,J,p,d,null)}return;default:if(Ue(l)){for(se in d)d.hasOwnProperty(se)&&(p=d[se],p!==void 0&&_1(i,l,se,p,d,void 0));return}}for(P in d)d.hasOwnProperty(P)&&(p=d[P],p!=null&&zt(i,l,P,p,d,null))}function Q$(i,l,d,p){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var v=null,b=null,_=null,P=null,B=null,J=null,se=null;for(re in d){var ae=d[re];if(d.hasOwnProperty(re)&&ae!=null)switch(re){case"checked":break;case"value":break;case"defaultValue":B=ae;default:p.hasOwnProperty(re)||zt(i,l,re,null,p,ae)}}for(var ne in p){var re=p[ne];if(ae=d[ne],p.hasOwnProperty(ne)&&(re!=null||ae!=null))switch(ne){case"type":b=re;break;case"name":v=re;break;case"checked":J=re;break;case"defaultChecked":se=re;break;case"value":_=re;break;case"defaultValue":P=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(r(137,l));break;default:re!==ae&&zt(i,l,ne,re,p,ae)}}Pd(i,_,P,B,J,se,b,v);return;case"select":re=_=P=ne=null;for(b in d)if(B=d[b],d.hasOwnProperty(b)&&B!=null)switch(b){case"value":break;case"multiple":re=B;default:p.hasOwnProperty(b)||zt(i,l,b,null,p,B)}for(v in p)if(b=p[v],B=d[v],p.hasOwnProperty(v)&&(b!=null||B!=null))switch(v){case"value":ne=b;break;case"defaultValue":P=b;break;case"multiple":_=b;default:b!==B&&zt(i,l,v,b,p,B)}l=P,d=_,p=re,ne!=null?lo(i,!!d,ne,!1):!!p!=!!d&&(l!=null?lo(i,!!d,l,!0):lo(i,!!d,d?[]:"",!1));return;case"textarea":re=ne=null;for(P in d)if(v=d[P],d.hasOwnProperty(P)&&v!=null&&!p.hasOwnProperty(P))switch(P){case"value":break;case"children":break;default:zt(i,l,P,null,p,v)}for(_ in p)if(v=p[_],b=d[_],p.hasOwnProperty(_)&&(v!=null||b!=null))switch(_){case"value":ne=v;break;case"defaultValue":re=v;break;case"children":break;case"dangerouslySetInnerHTML":if(v!=null)throw Error(r(91));break;default:v!==b&&zt(i,l,_,v,p,b)}pe(i,ne,re);return;case"option":for(var Re in d)ne=d[Re],d.hasOwnProperty(Re)&&ne!=null&&!p.hasOwnProperty(Re)&&(Re==="selected"?i.selected=!1:zt(i,l,Re,null,p,ne));for(B in p)ne=p[B],re=d[B],p.hasOwnProperty(B)&&ne!==re&&(ne!=null||re!=null)&&(B==="selected"?i.selected=ne&&typeof ne!="function"&&typeof ne!="symbol":zt(i,l,B,ne,p,re));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var De in d)ne=d[De],d.hasOwnProperty(De)&&ne!=null&&!p.hasOwnProperty(De)&&zt(i,l,De,null,p,ne);for(J in p)if(ne=p[J],re=d[J],p.hasOwnProperty(J)&&ne!==re&&(ne!=null||re!=null))switch(J){case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(r(137,l));break;default:zt(i,l,J,ne,p,re)}return;default:if(Ue(l)){for(var jt in d)ne=d[jt],d.hasOwnProperty(jt)&&ne!==void 0&&!p.hasOwnProperty(jt)&&_1(i,l,jt,void 0,p,ne);for(se in p)ne=p[se],re=d[se],!p.hasOwnProperty(se)||ne===re||ne===void 0&&re===void 0||_1(i,l,se,ne,p,re);return}}for(var V in d)ne=d[V],d.hasOwnProperty(V)&&ne!=null&&!p.hasOwnProperty(V)&&zt(i,l,V,null,p,ne);for(ae in p)ne=p[ae],re=d[ae],!p.hasOwnProperty(ae)||ne===re||ne==null&&re==null||zt(i,l,ae,ne,p,re)}function dN(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function J$(){if(typeof performance.getEntriesByType=="function"){for(var i=0,l=0,d=performance.getEntriesByType("resource"),p=0;p<d.length;p++){var v=d[p],b=v.transferSize,_=v.initiatorType,P=v.duration;if(b&&P&&dN(_)){for(_=0,P=v.responseEnd,p+=1;p<d.length;p++){var B=d[p],J=B.startTime;if(J>P)break;var se=B.transferSize,ae=B.initiatorType;se&&dN(ae)&&(B=B.responseEnd,_+=se*(B<P?1:(P-J)/(B-J)))}if(--p,l+=8*(b+_)/(v.duration/1e3),i++,10<i)break}}if(0<i)return l/i/1e6}return navigator.connection&&(i=navigator.connection.downlink,typeof i=="number")?i:5}var A1=null,T1=null;function wg(i){return i.nodeType===9?i:i.ownerDocument}function fN(i){switch(i){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function hN(i,l){if(i===0)switch(l){case"svg":return 1;case"math":return 2;default:return 0}return i===1&&l==="foreignObject"?0:i}function R1(i,l){return i==="textarea"||i==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.children=="bigint"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var I1=null;function eq(){var i=window.event;return i&&i.type==="popstate"?i===I1?!1:(I1=i,!0):(I1=null,!1)}var pN=typeof setTimeout=="function"?setTimeout:void 0,tq=typeof clearTimeout=="function"?clearTimeout:void 0,gN=typeof Promise=="function"?Promise:void 0,nq=typeof queueMicrotask=="function"?queueMicrotask:typeof gN<"u"?function(i){return gN.resolve(null).then(i).catch(rq)}:pN;function rq(i){setTimeout(function(){throw i})}function oa(i){return i==="head"}function mN(i,l){var d=l,p=0;do{var v=d.nextSibling;if(i.removeChild(d),v&&v.nodeType===8)if(d=v.data,d==="/$"||d==="/&"){if(p===0){i.removeChild(v),ec(l);return}p--}else if(d==="$"||d==="$?"||d==="$~"||d==="$!"||d==="&")p++;else if(d==="html")mf(i.ownerDocument.documentElement);else if(d==="head"){d=i.ownerDocument.head,mf(d);for(var b=d.firstChild;b;){var _=b.nextSibling,P=b.nodeName;b[Ui]||P==="SCRIPT"||P==="STYLE"||P==="LINK"&&b.rel.toLowerCase()==="stylesheet"||d.removeChild(b),b=_}}else d==="body"&&mf(i.ownerDocument.body);d=v}while(d);ec(l)}function vN(i,l){var d=i;i=0;do{var p=d.nextSibling;if(d.nodeType===1?l?(d._stashedDisplay=d.style.display,d.style.display="none"):(d.style.display=d._stashedDisplay||"",d.getAttribute("style")===""&&d.removeAttribute("style")):d.nodeType===3&&(l?(d._stashedText=d.nodeValue,d.nodeValue=""):d.nodeValue=d._stashedText||""),p&&p.nodeType===8)if(d=p.data,d==="/$"){if(i===0)break;i--}else d!=="$"&&d!=="$?"&&d!=="$~"&&d!=="$!"||i++;d=p}while(d)}function O1(i){var l=i.firstChild;for(l&&l.nodeType===10&&(l=l.nextSibling);l;){var d=l;switch(l=l.nextSibling,d.nodeName){case"HTML":case"HEAD":case"BODY":O1(d),Id(d);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(d.rel.toLowerCase()==="stylesheet")continue}i.removeChild(d)}}function sq(i,l,d,p){for(;i.nodeType===1;){var v=d;if(i.nodeName.toLowerCase()!==l.toLowerCase()){if(!p&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(p){if(!i[Ui])switch(l){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(b=i.getAttribute("rel"),b==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(b!==v.rel||i.getAttribute("href")!==(v.href==null||v.href===""?null:v.href)||i.getAttribute("crossorigin")!==(v.crossOrigin==null?null:v.crossOrigin)||i.getAttribute("title")!==(v.title==null?null:v.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(b=i.getAttribute("src"),(b!==(v.src==null?null:v.src)||i.getAttribute("type")!==(v.type==null?null:v.type)||i.getAttribute("crossorigin")!==(v.crossOrigin==null?null:v.crossOrigin))&&b&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(l==="input"&&i.type==="hidden"){var b=v.name==null?null:""+v.name;if(v.type==="hidden"&&i.getAttribute("name")===b)return i}else return i;if(i=Es(i.nextSibling),i===null)break}return null}function oq(i,l,d){if(l==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!d||(i=Es(i.nextSibling),i===null))return null;return i}function yN(i,l){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!l||(i=Es(i.nextSibling),i===null))return null;return i}function N1(i){return i.data==="$?"||i.data==="$~"}function M1(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function iq(i,l){var d=i.ownerDocument;if(i.data==="$~")i._reactRetry=l;else if(i.data!=="$?"||d.readyState!=="loading")l();else{var p=function(){l(),d.removeEventListener("DOMContentLoaded",p)};d.addEventListener("DOMContentLoaded",p),i._reactRetry=p}}function Es(i){for(;i!=null;i=i.nextSibling){var l=i.nodeType;if(l===1||l===3)break;if(l===8){if(l=i.data,l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"||l==="F!"||l==="F")break;if(l==="/$"||l==="/&")return null}}return i}var P1=null;function bN(i){i=i.nextSibling;for(var l=0;i;){if(i.nodeType===8){var d=i.data;if(d==="/$"||d==="/&"){if(l===0)return Es(i.nextSibling);l--}else d!=="$"&&d!=="$!"&&d!=="$?"&&d!=="$~"&&d!=="&"||l++}i=i.nextSibling}return null}function SN(i){i=i.previousSibling;for(var l=0;i;){if(i.nodeType===8){var d=i.data;if(d==="$"||d==="$!"||d==="$?"||d==="$~"||d==="&"){if(l===0)return i;l--}else d!=="/$"&&d!=="/&"||l++}i=i.previousSibling}return null}function EN(i,l,d){switch(l=wg(d),i){case"html":if(i=l.documentElement,!i)throw Error(r(452));return i;case"head":if(i=l.head,!i)throw Error(r(453));return i;case"body":if(i=l.body,!i)throw Error(r(454));return i;default:throw Error(r(451))}}function mf(i){for(var l=i.attributes;l.length;)i.removeAttributeNode(l[0]);Id(i)}var Cs=new Map,CN=new Set;function xg(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var Jo=te.d;te.d={f:aq,r:lq,D:uq,C:cq,L:dq,m:fq,X:pq,S:hq,M:gq};function aq(){var i=Jo.f(),l=gg();return i||l}function lq(i){var l=zi(i);l!==null&&l.tag===5&&l.type==="form"?z2(l):Jo.r(i)}var Xu=typeof document>"u"?null:document;function wN(i,l,d){var p=Xu;if(p&&typeof l=="string"&&l){var v=Or(l);v='link[rel="'+i+'"][href="'+v+'"]',typeof d=="string"&&(v+='[crossorigin="'+d+'"]'),CN.has(v)||(CN.add(v),i={rel:i,crossOrigin:d,href:l},p.querySelector(v)===null&&(l=p.createElement("link"),Jn(l,"link",i),ln(l),p.head.appendChild(l)))}}function uq(i){Jo.D(i),wN("dns-prefetch",i,null)}function cq(i,l){Jo.C(i,l),wN("preconnect",i,l)}function dq(i,l,d){Jo.L(i,l,d);var p=Xu;if(p&&i&&l){var v='link[rel="preload"][as="'+Or(l)+'"]';l==="image"&&d&&d.imageSrcSet?(v+='[imagesrcset="'+Or(d.imageSrcSet)+'"]',typeof d.imageSizes=="string"&&(v+='[imagesizes="'+Or(d.imageSizes)+'"]')):v+='[href="'+Or(i)+'"]';var b=v;switch(l){case"style":b=Qu(i);break;case"script":b=Ju(i)}Cs.has(b)||(i=g({rel:"preload",href:l==="image"&&d&&d.imageSrcSet?void 0:i,as:l},d),Cs.set(b,i),p.querySelector(v)!==null||l==="style"&&p.querySelector(vf(b))||l==="script"&&p.querySelector(yf(b))||(l=p.createElement("link"),Jn(l,"link",i),ln(l),p.head.appendChild(l)))}}function fq(i,l){Jo.m(i,l);var d=Xu;if(d&&i){var p=l&&typeof l.as=="string"?l.as:"script",v='link[rel="modulepreload"][as="'+Or(p)+'"][href="'+Or(i)+'"]',b=v;switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":b=Ju(i)}if(!Cs.has(b)&&(i=g({rel:"modulepreload",href:i},l),Cs.set(b,i),d.querySelector(v)===null)){switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(d.querySelector(yf(b)))return}p=d.createElement("link"),Jn(p,"link",i),ln(p),d.head.appendChild(p)}}}function hq(i,l,d){Jo.S(i,l,d);var p=Xu;if(p&&i){var v=mr(p).hoistableStyles,b=Qu(i);l=l||"default";var _=v.get(b);if(!_){var P={loading:0,preload:null};if(_=p.querySelector(vf(b)))P.loading=5;else{i=g({rel:"stylesheet",href:i,"data-precedence":l},d),(d=Cs.get(b))&&k1(i,d);var B=_=p.createElement("link");ln(B),Jn(B,"link",i),B._p=new Promise(function(J,se){B.onload=J,B.onerror=se}),B.addEventListener("load",function(){P.loading|=1}),B.addEventListener("error",function(){P.loading|=2}),P.loading|=4,_g(_,l,p)}_={type:"stylesheet",instance:_,count:1,state:P},v.set(b,_)}}}function pq(i,l){Jo.X(i,l);var d=Xu;if(d&&i){var p=mr(d).hoistableScripts,v=Ju(i),b=p.get(v);b||(b=d.querySelector(yf(v)),b||(i=g({src:i,async:!0},l),(l=Cs.get(v))&&D1(i,l),b=d.createElement("script"),ln(b),Jn(b,"link",i),d.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},p.set(v,b))}}function gq(i,l){Jo.M(i,l);var d=Xu;if(d&&i){var p=mr(d).hoistableScripts,v=Ju(i),b=p.get(v);b||(b=d.querySelector(yf(v)),b||(i=g({src:i,async:!0,type:"module"},l),(l=Cs.get(v))&&D1(i,l),b=d.createElement("script"),ln(b),Jn(b,"link",i),d.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},p.set(v,b))}}function xN(i,l,d,p){var v=(v=he.current)?xg(v):null;if(!v)throw Error(r(446));switch(i){case"meta":case"title":return null;case"style":return typeof d.precedence=="string"&&typeof d.href=="string"?(l=Qu(d.href),d=mr(v).hoistableStyles,p=d.get(l),p||(p={type:"style",instance:null,count:0,state:null},d.set(l,p)),p):{type:"void",instance:null,count:0,state:null};case"link":if(d.rel==="stylesheet"&&typeof d.href=="string"&&typeof d.precedence=="string"){i=Qu(d.href);var b=mr(v).hoistableStyles,_=b.get(i);if(_||(v=v.ownerDocument||v,_={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},b.set(i,_),(b=v.querySelector(vf(i)))&&!b._p&&(_.instance=b,_.state.loading=5),Cs.has(i)||(d={rel:"preload",as:"style",href:d.href,crossOrigin:d.crossOrigin,integrity:d.integrity,media:d.media,hrefLang:d.hrefLang,referrerPolicy:d.referrerPolicy},Cs.set(i,d),b||mq(v,i,d,_.state))),l&&p===null)throw Error(r(528,""));return _}if(l&&p!==null)throw Error(r(529,""));return null;case"script":return l=d.async,d=d.src,typeof d=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=Ju(d),d=mr(v).hoistableScripts,p=d.get(l),p||(p={type:"script",instance:null,count:0,state:null},d.set(l,p)),p):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,i))}}function Qu(i){return'href="'+Or(i)+'"'}function vf(i){return'link[rel="stylesheet"]['+i+"]"}function _N(i){return g({},i,{"data-precedence":i.precedence,precedence:null})}function mq(i,l,d,p){i.querySelector('link[rel="preload"][as="style"]['+l+"]")?p.loading=1:(l=i.createElement("link"),p.preload=l,l.addEventListener("load",function(){return p.loading|=1}),l.addEventListener("error",function(){return p.loading|=2}),Jn(l,"link",d),ln(l),i.head.appendChild(l))}function Ju(i){return'[src="'+Or(i)+'"]'}function yf(i){return"script[async]"+i}function AN(i,l,d){if(l.count++,l.instance===null)switch(l.type){case"style":var p=i.querySelector('style[data-href~="'+Or(d.href)+'"]');if(p)return l.instance=p,ln(p),p;var v=g({},d,{"data-href":d.href,"data-precedence":d.precedence,href:null,precedence:null});return p=(i.ownerDocument||i).createElement("style"),ln(p),Jn(p,"style",v),_g(p,d.precedence,i),l.instance=p;case"stylesheet":v=Qu(d.href);var b=i.querySelector(vf(v));if(b)return l.state.loading|=4,l.instance=b,ln(b),b;p=_N(d),(v=Cs.get(v))&&k1(p,v),b=(i.ownerDocument||i).createElement("link"),ln(b);var _=b;return _._p=new Promise(function(P,B){_.onload=P,_.onerror=B}),Jn(b,"link",p),l.state.loading|=4,_g(b,d.precedence,i),l.instance=b;case"script":return b=Ju(d.src),(v=i.querySelector(yf(b)))?(l.instance=v,ln(v),v):(p=d,(v=Cs.get(b))&&(p=g({},d),D1(p,v)),i=i.ownerDocument||i,v=i.createElement("script"),ln(v),Jn(v,"link",p),i.head.appendChild(v),l.instance=v);case"void":return null;default:throw Error(r(443,l.type))}else l.type==="stylesheet"&&(l.state.loading&4)===0&&(p=l.instance,l.state.loading|=4,_g(p,d.precedence,i));return l.instance}function _g(i,l,d){for(var p=d.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),v=p.length?p[p.length-1]:null,b=v,_=0;_<p.length;_++){var P=p[_];if(P.dataset.precedence===l)b=P;else if(b!==v)break}b?b.parentNode.insertBefore(i,b.nextSibling):(l=d.nodeType===9?d.head:d,l.insertBefore(i,l.firstChild))}function k1(i,l){i.crossOrigin==null&&(i.crossOrigin=l.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=l.referrerPolicy),i.title==null&&(i.title=l.title)}function D1(i,l){i.crossOrigin==null&&(i.crossOrigin=l.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=l.referrerPolicy),i.integrity==null&&(i.integrity=l.integrity)}var Ag=null;function TN(i,l,d){if(Ag===null){var p=new Map,v=Ag=new Map;v.set(d,p)}else v=Ag,p=v.get(d),p||(p=new Map,v.set(d,p));if(p.has(i))return p;for(p.set(i,null),d=d.getElementsByTagName(i),v=0;v<d.length;v++){var b=d[v];if(!(b[Ui]||b[On]||i==="link"&&b.getAttribute("rel")==="stylesheet")&&b.namespaceURI!=="http://www.w3.org/2000/svg"){var _=b.getAttribute(l)||"";_=i+_;var P=p.get(_);P?P.push(b):p.set(_,[b])}}return p}function RN(i,l,d){i=i.ownerDocument||i,i.head.insertBefore(d,l==="title"?i.querySelector("head > title"):null)}function vq(i,l,d){if(d===1||l.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;return l.rel==="stylesheet"?(i=l.disabled,typeof l.precedence=="string"&&i==null):!0;case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function IN(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function yq(i,l,d,p){if(d.type==="stylesheet"&&(typeof p.media!="string"||matchMedia(p.media).matches!==!1)&&(d.state.loading&4)===0){if(d.instance===null){var v=Qu(p.href),b=l.querySelector(vf(v));if(b){l=b._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(i.count++,i=Tg.bind(i),l.then(i,i)),d.state.loading|=4,d.instance=b,ln(b);return}b=l.ownerDocument||l,p=_N(p),(v=Cs.get(v))&&k1(p,v),b=b.createElement("link"),ln(b);var _=b;_._p=new Promise(function(P,B){_.onload=P,_.onerror=B}),Jn(b,"link",p),d.instance=b}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(d,l),(l=d.state.preload)&&(d.state.loading&3)===0&&(i.count++,d=Tg.bind(i),l.addEventListener("load",d),l.addEventListener("error",d))}}var L1=0;function bq(i,l){return i.stylesheets&&i.count===0&&Ig(i,i.stylesheets),0<i.count||0<i.imgCount?function(d){var p=setTimeout(function(){if(i.stylesheets&&Ig(i,i.stylesheets),i.unsuspend){var b=i.unsuspend;i.unsuspend=null,b()}},6e4+l);0<i.imgBytes&&L1===0&&(L1=62500*J$());var v=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&Ig(i,i.stylesheets),i.unsuspend)){var b=i.unsuspend;i.unsuspend=null,b()}},(i.imgBytes>L1?50:800)+l);return i.unsuspend=d,function(){i.unsuspend=null,clearTimeout(p),clearTimeout(v)}}:null}function Tg(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ig(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var Rg=null;function Ig(i,l){i.stylesheets=null,i.unsuspend!==null&&(i.count++,Rg=new Map,l.forEach(Sq,i),Rg=null,Tg.call(i))}function Sq(i,l){if(!(l.state.loading&4)){var d=Rg.get(i);if(d)var p=d.get(null);else{d=new Map,Rg.set(i,d);for(var v=i.querySelectorAll("link[data-precedence],style[data-precedence]"),b=0;b<v.length;b++){var _=v[b];(_.nodeName==="LINK"||_.getAttribute("media")!=="not all")&&(d.set(_.dataset.precedence,_),p=_)}p&&d.set(null,p)}v=l.instance,_=v.getAttribute("data-precedence"),b=d.get(_)||p,b===p&&d.set(null,v),d.set(_,v),this.count++,p=Tg.bind(this),v.addEventListener("load",p),v.addEventListener("error",p),b?b.parentNode.insertBefore(v,b.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(v,i.firstChild)),l.state.loading|=4}}var bf={$$typeof:T,Provider:null,Consumer:null,_currentValue:fe,_currentValue2:fe,_threadCount:0};function Eq(i,l,d,p,v,b,_,P,B){this.tag=1,this.containerInfo=i,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=oo(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=oo(0),this.hiddenUpdates=oo(null),this.identifierPrefix=p,this.onUncaughtError=v,this.onCaughtError=b,this.onRecoverableError=_,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=B,this.incompleteTransitions=new Map}function ON(i,l,d,p,v,b,_,P,B,J,se,ae){return i=new Eq(i,l,d,_,B,J,se,ae,P),l=1,b===!0&&(l|=24),b=Xr(3,null,null,l),i.current=b,b.stateNode=i,l=g0(),l.refCount++,i.pooledCache=l,l.refCount++,b.memoizedState={element:p,isDehydrated:d,cache:l},b0(b),i}function NN(i){return i?(i=Ou,i):Ou}function MN(i,l,d,p,v,b){v=NN(v),p.context===null?p.context=v:p.pendingContext=v,p=Ki(l),p.payload={element:d},b=b===void 0?null:b,b!==null&&(p.callback=b),d=Yi(i,p,l),d!==null&&(Lr(d,i,l),Zd(d,i,l))}function PN(i,l){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var d=i.retryLane;i.retryLane=d!==0&&d<l?d:l}}function U1(i,l){PN(i,l),(i=i.alternate)&&PN(i,l)}function kN(i){if(i.tag===13||i.tag===31){var l=sl(i,67108864);l!==null&&Lr(l,i,67108864),U1(i,67108864)}}function DN(i){if(i.tag===13||i.tag===31){var l=ns();l=Eu(l);var d=sl(i,l);d!==null&&Lr(d,i,l),U1(i,l)}}var Og=!0;function Cq(i,l,d,p){var v=H.T;H.T=null;var b=te.p;try{te.p=2,F1(i,l,d,p)}finally{te.p=b,H.T=v}}function wq(i,l,d,p){var v=H.T;H.T=null;var b=te.p;try{te.p=8,F1(i,l,d,p)}finally{te.p=b,H.T=v}}function F1(i,l,d,p){if(Og){var v=z1(p);if(v===null)x1(i,l,p,Ng,d),UN(i,p);else if(_q(v,i,l,d,p))p.stopPropagation();else if(UN(i,p),l&4&&-1<xq.indexOf(i)){for(;v!==null;){var b=zi(v);if(b!==null)switch(b.tag){case 3:if(b=b.stateNode,b.current.memoizedState.isDehydrated){var _=ks(b.pendingLanes);if(_!==0){var P=b;for(P.pendingLanes|=2,P.entangledLanes|=2;_;){var B=1<<31-Yn(_);P.entanglements[1]|=B,_&=~B}ho(b),(It&6)===0&&(hg=Gt()+500,hf(0))}}break;case 31:case 13:P=sl(b,2),P!==null&&Lr(P,b,2),gg(),U1(b,2)}if(b=z1(p),b===null&&x1(i,l,p,Ng,d),b===v)break;v=b}v!==null&&p.stopPropagation()}else x1(i,l,p,null,d)}}function z1(i){return i=Nn(i),j1(i)}var Ng=null;function j1(i){if(Ng=null,i=Fi(i),i!==null){var l=o(i);if(l===null)i=null;else{var d=l.tag;if(d===13){if(i=a(l),i!==null)return i;i=null}else if(d===31){if(i=u(l),i!==null)return i;i=null}else if(d===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;i=null}else l!==i&&(i=null)}}return Ng=i,null}function LN(i){switch(i){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(gt()){case yn:return 2;case Ir:return 8;case ro:case Cd:return 32;case Do:return 268435456;default:return 32}default:return 32}}var B1=!1,ia=null,aa=null,la=null,Sf=new Map,Ef=new Map,ua=[],xq="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function UN(i,l){switch(i){case"focusin":case"focusout":ia=null;break;case"dragenter":case"dragleave":aa=null;break;case"mouseover":case"mouseout":la=null;break;case"pointerover":case"pointerout":Sf.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ef.delete(l.pointerId)}}function Cf(i,l,d,p,v,b){return i===null||i.nativeEvent!==b?(i={blockedOn:l,domEventName:d,eventSystemFlags:p,nativeEvent:b,targetContainers:[v]},l!==null&&(l=zi(l),l!==null&&kN(l)),i):(i.eventSystemFlags|=p,l=i.targetContainers,v!==null&&l.indexOf(v)===-1&&l.push(v),i)}function _q(i,l,d,p,v){switch(l){case"focusin":return ia=Cf(ia,i,l,d,p,v),!0;case"dragenter":return aa=Cf(aa,i,l,d,p,v),!0;case"mouseover":return la=Cf(la,i,l,d,p,v),!0;case"pointerover":var b=v.pointerId;return Sf.set(b,Cf(Sf.get(b)||null,i,l,d,p,v)),!0;case"gotpointercapture":return b=v.pointerId,Ef.set(b,Cf(Ef.get(b)||null,i,l,d,p,v)),!0}return!1}function FN(i){var l=Fi(i.target);if(l!==null){var d=o(l);if(d!==null){if(l=d.tag,l===13){if(l=a(d),l!==null){i.blockedOn=l,Li(i.priority,function(){DN(d)});return}}else if(l===31){if(l=u(d),l!==null){i.blockedOn=l,Li(i.priority,function(){DN(d)});return}}else if(l===3&&d.stateNode.current.memoizedState.isDehydrated){i.blockedOn=d.tag===3?d.stateNode.containerInfo:null;return}}}i.blockedOn=null}function Mg(i){if(i.blockedOn!==null)return!1;for(var l=i.targetContainers;0<l.length;){var d=z1(i.nativeEvent);if(d===null){d=i.nativeEvent;var p=new d.constructor(d.type,d);yr=p,d.target.dispatchEvent(p),yr=null}else return l=zi(d),l!==null&&kN(l),i.blockedOn=d,!1;l.shift()}return!0}function zN(i,l,d){Mg(i)&&d.delete(l)}function Aq(){B1=!1,ia!==null&&Mg(ia)&&(ia=null),aa!==null&&Mg(aa)&&(aa=null),la!==null&&Mg(la)&&(la=null),Sf.forEach(zN),Ef.forEach(zN)}function Pg(i,l){i.blockedOn===l&&(i.blockedOn=null,B1||(B1=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Aq)))}var kg=null;function jN(i){kg!==i&&(kg=i,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){kg===i&&(kg=null);for(var l=0;l<i.length;l+=3){var d=i[l],p=i[l+1],v=i[l+2];if(typeof p!="function"){if(j1(p||d)===null)continue;break}var b=zi(d);b!==null&&(i.splice(l,3),l-=3,z0(b,{pending:!0,data:v,method:d.method,action:p},p,v))}}))}function ec(i){function l(B){return Pg(B,i)}ia!==null&&Pg(ia,i),aa!==null&&Pg(aa,i),la!==null&&Pg(la,i),Sf.forEach(l),Ef.forEach(l);for(var d=0;d<ua.length;d++){var p=ua[d];p.blockedOn===i&&(p.blockedOn=null)}for(;0<ua.length&&(d=ua[0],d.blockedOn===null);)FN(d),d.blockedOn===null&&ua.shift();if(d=(i.ownerDocument||i).$$reactFormReplay,d!=null)for(p=0;p<d.length;p+=3){var v=d[p],b=d[p+1],_=v[nt]||null;if(typeof b=="function")_||jN(d);else if(_){var P=null;if(b&&b.hasAttribute("formAction")){if(v=b,_=b[nt]||null)P=_.formAction;else if(j1(v)!==null)continue}else P=_.action;typeof P=="function"?d[p+1]=P:(d.splice(p,3),p-=3),jN(d)}}}function BN(){function i(b){b.canIntercept&&b.info==="react-transition"&&b.intercept({handler:function(){return new Promise(function(_){return v=_})},focusReset:"manual",scroll:"manual"})}function l(){v!==null&&(v(),v=null),p||setTimeout(d,20)}function d(){if(!p&&!navigation.transition){var b=navigation.currentEntry;b&&b.url!=null&&navigation.navigate(b.url,{state:b.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var p=!1,v=null;return navigation.addEventListener("navigate",i),navigation.addEventListener("navigatesuccess",l),navigation.addEventListener("navigateerror",l),setTimeout(d,100),function(){p=!0,navigation.removeEventListener("navigate",i),navigation.removeEventListener("navigatesuccess",l),navigation.removeEventListener("navigateerror",l),v!==null&&(v(),v=null)}}}function H1(i){this._internalRoot=i}Dg.prototype.render=H1.prototype.render=function(i){var l=this._internalRoot;if(l===null)throw Error(r(409));var d=l.current,p=ns();MN(d,p,i,l,null,null)},Dg.prototype.unmount=H1.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var l=i.containerInfo;MN(i.current,2,null,i,null,null),gg(),l[Yr]=null}};function Dg(i){this._internalRoot=i}Dg.prototype.unstable_scheduleHydration=function(i){if(i){var l=wp();i={blockedOn:null,target:i,priority:l};for(var d=0;d<ua.length&&l!==0&&l<ua[d].priority;d++);ua.splice(d,0,i),d===0&&FN(i)}};var HN=e.version;if(HN!=="19.2.7")throw Error(r(527,HN,"19.2.7"));te.findDOMNode=function(i){var l=i._reactInternals;if(l===void 0)throw typeof i.render=="function"?Error(r(188)):(i=Object.keys(i).join(","),Error(r(268,i)));return i=f(l),i=i!==null?h(i):null,i=i===null?null:i.stateNode,i};var Tq={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:H,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Lg=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Lg.isDisabled&&Lg.supportsFiber)try{Pi=Lg.inject(Tq),lr=Lg}catch{}}return Hf.createRoot=function(i,l){if(!s(i))throw Error(r(299));var d=!1,p="",v=Y2,b=Z2,_=X2;return l!=null&&(l.unstable_strictMode===!0&&(d=!0),l.identifierPrefix!==void 0&&(p=l.identifierPrefix),l.onUncaughtError!==void 0&&(v=l.onUncaughtError),l.onCaughtError!==void 0&&(b=l.onCaughtError),l.onRecoverableError!==void 0&&(_=l.onRecoverableError)),l=ON(i,1,!1,null,null,d,p,null,v,b,_,BN),i[Yr]=l.current,w1(i),new H1(l)},Hf.hydrateRoot=function(i,l,d){if(!s(i))throw Error(r(299));var p=!1,v="",b=Y2,_=Z2,P=X2,B=null;return d!=null&&(d.unstable_strictMode===!0&&(p=!0),d.identifierPrefix!==void 0&&(v=d.identifierPrefix),d.onUncaughtError!==void 0&&(b=d.onUncaughtError),d.onCaughtError!==void 0&&(_=d.onCaughtError),d.onRecoverableError!==void 0&&(P=d.onRecoverableError),d.formState!==void 0&&(B=d.formState)),l=ON(i,1,!0,l,d??null,p,v,B,b,_,P,BN),l.context=NN(null),d=l.current,p=ns(),p=Eu(p),v=Ki(p),v.callback=null,Yi(d,v,p),d=p,l.current.lanes=d,Lo(l,d),ho(l),i[Yr]=l.current,w1(i),new Dg(l)},Hf.version="19.2.7",Hf}var BU;function gme(){if(BU)return tx.exports;BU=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),tx.exports=pme(),tx.exports}var mme=gme();const vme={bodySerializer:t=>JSON.stringify(t,(e,n)=>typeof n=="bigint"?n.toString():n)},yme=({onRequest:t,onSseError:e,onSseEvent:n,responseTransformer:r,responseValidator:s,sseDefaultRetryDelay:o,sseMaxRetryAttempts:a,sseMaxRetryDelay:u,sseSleepFn:c,url:f,...h})=>{let g;const m=c??(E=>new Promise(C=>setTimeout(C,E)));return{stream:async function*(){let E=o??3e3,C=0;const w=h.signal??new AbortController().signal;for(;!w.aborted;){C++;const x=h.headers instanceof Headers?h.headers:new Headers(h.headers);g!==void 0&&x.set("Last-Event-ID",g);try{const T={redirect:"follow",...h,body:h.serializedBody,headers:x,signal:w};let R=new Request(f,T);t&&(R=await t(f,T));const N=await(h.fetch??globalThis.fetch)(R);if(!N.ok)throw new Error(`SSE failed: ${N.status} ${N.statusText}`);if(!N.body)throw new Error("No body in SSE response");const O=N.body.pipeThrough(new TextDecoderStream).getReader();let k="";const F=()=>{try{O.cancel()}catch{}};w.addEventListener("abort",F);try{for(;;){const{done:$,value:D}=await O.read();if($)break;k+=D,k=k.replace(/\r\n/g,`
225
+ `).replace(/\r/g,`
226
+ `);const z=k.split(`
227
+
228
+ `);k=z.pop()??"";for(const q of z){const K=q.split(`
229
+ `),Y=[];let H;for(const de of K)if(de.startsWith("data:"))Y.push(de.replace(/^data:\s*/,""));else if(de.startsWith("event:"))H=de.replace(/^event:\s*/,"");else if(de.startsWith("id:"))g=de.replace(/^id:\s*/,"");else if(de.startsWith("retry:")){const Ae=Number.parseInt(de.replace(/^retry:\s*/,""),10);Number.isNaN(Ae)||(E=Ae)}let te,fe=!1;if(Y.length){const de=Y.join(`
230
+ `);try{te=JSON.parse(de),fe=!0}catch{te=de}}fe&&(s&&await s(te),r&&(te=await r(te))),n?.({data:te,event:H,id:g,retry:E}),Y.length&&(yield te)}}}finally{w.removeEventListener("abort",F),O.releaseLock()}break}catch(T){if(e?.(T),a!==void 0&&C>=a)break;const R=Math.min(E*2**(C-1),u??3e4);await m(R)}}}()}},bme=t=>{switch(t){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},Sme=t=>{switch(t){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},Eme=t=>{switch(t){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},hz=({allowReserved:t,explode:e,name:n,style:r,value:s})=>{if(!e){const u=(t?s:s.map(c=>encodeURIComponent(c))).join(Sme(r));switch(r){case"label":return`.${u}`;case"matrix":return`;${n}=${u}`;case"simple":return u;default:return`${n}=${u}`}}const o=bme(r),a=s.map(u=>r==="label"||r==="simple"?t?u:encodeURIComponent(u):Eb({allowReserved:t,name:n,value:u})).join(o);return r==="label"||r==="matrix"?o+a:a},Eb=({allowReserved:t,name:e,value:n})=>{if(n==null)return"";if(typeof n=="object")throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${e}=${t?n:encodeURIComponent(n)}`},pz=({allowReserved:t,explode:e,name:n,style:r,value:s,valueOnly:o})=>{if(s instanceof Date)return o?s.toISOString():`${n}=${s.toISOString()}`;if(r!=="deepObject"&&!e){let c=[];Object.entries(s).forEach(([h,g])=>{c=[...c,h,t?g:encodeURIComponent(g)]});const f=c.join(",");switch(r){case"form":return`${n}=${f}`;case"label":return`.${f}`;case"matrix":return`;${n}=${f}`;default:return f}}const a=Eme(r),u=Object.entries(s).map(([c,f])=>Eb({allowReserved:t,name:r==="deepObject"?`${n}[${c}]`:c,value:f})).join(a);return r==="label"||r==="matrix"?a+u:u},Cme=/\{[^{}]+\}/g,wme=({path:t,url:e})=>{let n=e;const r=e.match(Cme);if(r)for(const s of r){let o=!1,a=s.substring(1,s.length-1),u="simple";a.endsWith("*")&&(o=!0,a=a.substring(0,a.length-1)),a.startsWith(".")?(a=a.substring(1),u="label"):a.startsWith(";")&&(a=a.substring(1),u="matrix");const c=t[a];if(c==null)continue;if(Array.isArray(c)){n=n.replace(s,hz({explode:o,name:a,style:u,value:c}));continue}if(typeof c=="object"){n=n.replace(s,pz({explode:o,name:a,style:u,value:c,valueOnly:!0}));continue}if(u==="matrix"){n=n.replace(s,`;${Eb({name:a,value:c})}`);continue}const f=encodeURIComponent(u==="label"?`.${c}`:c);n=n.replace(s,f)}return n},xme=({baseUrl:t,path:e,query:n,querySerializer:r,url:s})=>{const o=s.startsWith("/")?s:`/${s}`;let a=(t??"")+o;e&&(a=wme({path:e,url:a}));let u=n?r(n):"";return u.startsWith("?")&&(u=u.substring(1)),u&&(a+=`?${u}`),a};function HU(t){const e=t.body!==void 0;if(e&&t.bodySerializer)return"serializedBody"in t?t.serializedBody!==void 0&&t.serializedBody!==""?t.serializedBody:null:t.body!==""?t.body:null;if(e)return t.body}const _me=async(t,e)=>{const n=typeof e=="function"?await e(t):e;if(n)return t.scheme==="bearer"?`Bearer ${n}`:t.scheme==="basic"?`Basic ${btoa(n)}`:n},gz=({parameters:t={},...e}={})=>r=>{const s=[];if(r&&typeof r=="object")for(const o in r){const a=r[o];if(a==null)continue;const u=t[o]||e;if(Array.isArray(a)){const c=hz({allowReserved:u.allowReserved,explode:!0,name:o,style:"form",value:a,...u.array});c&&s.push(c)}else if(typeof a=="object"){const c=pz({allowReserved:u.allowReserved,explode:!0,name:o,style:"deepObject",value:a,...u.object});c&&s.push(c)}else{const c=Eb({allowReserved:u.allowReserved,name:o,value:a});c&&s.push(c)}}return s.join("&")},Ame=t=>{if(!t)return"stream";const e=t.split(";")[0]?.trim();if(e){if(e.startsWith("application/json")||e.endsWith("+json"))return"json";if(e==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(n=>e.startsWith(n)))return"blob";if(e.startsWith("text/"))return"text"}},Tme=(t,e)=>e?!!(t.headers.has(e)||t.query?.[e]||t.headers.get("Cookie")?.includes(`${e}=`)):!1,Rme=async({security:t,...e})=>{for(const n of t){if(Tme(e,n.name))continue;const r=await _me(n,e.auth);if(!r)continue;const s=n.name??"Authorization";switch(n.in){case"query":e.query||(e.query={}),e.query[s]=r;break;case"cookie":e.headers.append("Cookie",`${s}=${r}`);break;default:e.headers.set(s,r);break}}},$U=t=>xme({baseUrl:t.baseUrl,path:t.path,query:t.query,querySerializer:typeof t.querySerializer=="function"?t.querySerializer:gz(t.querySerializer),url:t.url}),qU=(t,e)=>{const n={...t,...e};return n.baseUrl?.endsWith("/")&&(n.baseUrl=n.baseUrl.substring(0,n.baseUrl.length-1)),n.headers=mz(t.headers,e.headers),n},Ime=t=>{const e=[];return t.forEach((n,r)=>{e.push([r,n])}),e},mz=(...t)=>{const e=new Headers;for(const n of t){if(!n)continue;const r=n instanceof Headers?Ime(n):Object.entries(n);for(const[s,o]of r)if(o===null)e.delete(s);else if(Array.isArray(o))for(const a of o)e.append(s,a);else o!==void 0&&e.set(s,typeof o=="object"?JSON.stringify(o):o)}return e};class sx{fns=[];clear(){this.fns=[]}eject(e){const n=this.getInterceptorIndex(e);this.fns[n]&&(this.fns[n]=null)}exists(e){const n=this.getInterceptorIndex(e);return!!this.fns[n]}getInterceptorIndex(e){return typeof e=="number"?this.fns[e]?e:-1:this.fns.indexOf(e)}update(e,n){const r=this.getInterceptorIndex(e);return this.fns[r]?(this.fns[r]=n,e):!1}use(e){return this.fns.push(e),this.fns.length-1}}const Ome=()=>({error:new sx,request:new sx,response:new sx}),Nme=gz({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),Mme={"Content-Type":"application/json"},vz=(t={})=>({...vme,headers:Mme,parseAs:"auto",querySerializer:Nme,...t}),Pme=(t={})=>{let e=qU(vz(),t);const n=()=>({...e}),r=f=>(e=qU(e,f),n()),s=Ome(),o=async f=>{const h={...e,...f,fetch:f.fetch??e.fetch??globalThis.fetch,headers:mz(e.headers,f.headers),serializedBody:void 0};h.security&&await Rme({...h,security:h.security}),h.requestValidator&&await h.requestValidator(h),h.body!==void 0&&h.bodySerializer&&(h.serializedBody=h.bodySerializer(h.body)),(h.body===void 0||h.serializedBody==="")&&h.headers.delete("Content-Type");const g=$U(h);return{opts:h,url:g}},a=async f=>{const{opts:h,url:g}=await o(f),m={redirect:"follow",...h,body:HU(h)};let y=new Request(g,m);for(const M of s.request.fns)M&&(y=await M(y,h));const S=h.fetch;let E;try{E=await S(y)}catch(M){let N=M;for(const O of s.error.fns)O&&(N=await O(M,void 0,y,h));if(N=N||{},h.throwOnError)throw N;return h.responseStyle==="data"?void 0:{error:N,request:y,response:void 0}}for(const M of s.response.fns)M&&(E=await M(E,y,h));const C={request:y,response:E};if(E.ok){const M=(h.parseAs==="auto"?Ame(E.headers.get("Content-Type")):h.parseAs)??"json";if(E.status===204||E.headers.get("Content-Length")==="0"){let O;switch(M){case"arrayBuffer":case"blob":case"text":O=await E[M]();break;case"formData":O=new FormData;break;case"stream":O=E.body;break;default:O={};break}return h.responseStyle==="data"?O:{data:O,...C}}let N;switch(M){case"arrayBuffer":case"blob":case"formData":case"text":N=await E[M]();break;case"json":{const O=await E.text();N=O?JSON.parse(O):{};break}case"stream":return h.responseStyle==="data"?E.body:{data:E.body,...C}}return M==="json"&&(h.responseValidator&&await h.responseValidator(N),h.responseTransformer&&(N=await h.responseTransformer(N))),h.responseStyle==="data"?N:{data:N,...C}}const w=await E.text();let x;try{x=JSON.parse(w)}catch{}const T=x??w;let R=T;for(const M of s.error.fns)M&&(R=await M(T,E,y,h));if(R=R||{},h.throwOnError)throw R;return h.responseStyle==="data"?void 0:{error:R,...C}},u=f=>h=>a({...h,method:f}),c=f=>async h=>{const{opts:g,url:m}=await o(h);return yme({...g,body:g.body,headers:g.headers,method:f,onRequest:async(y,S)=>{let E=new Request(y,S);for(const C of s.request.fns)C&&(E=await C(E,g));return E},serializedBody:HU(g),url:m})};return{buildUrl:$U,connect:u("CONNECT"),delete:u("DELETE"),get:u("GET"),getConfig:n,head:u("HEAD"),interceptors:s,options:u("OPTIONS"),patch:u("PATCH"),post:u("POST"),put:u("PUT"),request:a,setConfig:r,sse:{connect:c("CONNECT"),delete:c("DELETE"),get:c("GET"),head:c("HEAD"),options:c("OPTIONS"),patch:c("PATCH"),post:c("POST"),put:c("PUT"),trace:c("TRACE")},trace:u("TRACE")}},He=Pme(vz({baseUrl:"https://api.remit.example.com"}));let WU=!1;const kme=t=>{WU||(He.interceptors.request.use(async e=>{const n=await t.getToken();return n&&e.headers.set("Authorization",`Bearer ${n}`),e}),WU=!0)},Dme=({children:t})=>I.jsx(I.Fragment,{children:t}),Lme={configure:()=>{},getToken:async()=>null,resetToken:()=>{},Shell:Dme,Account:({fallback:t=null})=>I.jsx(I.Fragment,{children:t})},yz=A.createContext(Lme),Ume=yz.Provider,_Re=()=>A.useContext(yz),Fme=(t,e)=>{P9(t,e.meta)&&ql(t)},zme=(t,e,n,r)=>{P9(t,r.meta)&&ql(t)},D_=t=>new TextEncoder().encode(t),bz={},L_={};for(let t=0;t<256;t++){let e=t.toString(16).toLowerCase();e.length===1&&(e=`0${e}`),bz[t]=e,L_[e]=t}function jme(t){if(t.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const e=new Uint8Array(t.length/2);for(let n=0;n<t.length;n+=2){const r=t.slice(n,n+2).toLowerCase();if(r in L_)e[n/2]=L_[r];else throw new Error(`Cannot decode unrecognized sequence ${r} as hexadecimal`)}return e}function zl(t){let e="";for(let n=0;n<t.byteLength;n++)e+=bz[t[n]];return e}const Fh=t=>t instanceof Uint8Array?t:typeof t=="string"?D_(t):ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(t),Bme=t=>typeof ArrayBuffer=="function"&&t instanceof ArrayBuffer||Object.prototype.toString.call(t)==="[object ArrayBuffer]";class Ci{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?e.protocol.slice(-1)!==":"?`${e.protocol}:`:e.protocol:"https:",this.path=e.path?e.path.charAt(0)!=="/"?`/${e.path}`:e.path:"/",this.username=e.username,this.password=e.password,this.fragment=e.fragment}static clone(e){const n=new Ci({...e,headers:{...e.headers}});return n.query&&(n.query=Hme(n.query)),n}static isInstance(e){if(!e)return!1;const n=e;return"method"in n&&"protocol"in n&&"hostname"in n&&"path"in n&&typeof n.query=="object"&&typeof n.headers=="object"}clone(){return Ci.clone(this)}}function Hme(t){return Object.keys(t).reduce((e,n)=>{const r=t[n];return{...e,[n]:Array.isArray(r)?[...r]:r}},{})}class zh{statusCode;reason;headers;body;constructor(e){this.statusCode=e.statusCode,this.reason=e.reason,this.headers=e.headers||{},this.body=e.body}static isInstance(e){if(!e)return!1;const n=e;return typeof n.statusCode=="number"&&typeof n.headers=="object"}}const VU=t=>{if(typeof t=="function")return t;const e=Promise.resolve(t);return()=>e},jl=t=>encodeURIComponent(t).replace(/[!'()*]/g,$me),$me=t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`;function SR(t){const e=[];for(let n of Object.keys(t).sort()){const r=t[n];if(n=jl(n),Array.isArray(r))for(let s=0,o=r.length;s<o;s++)e.push(`${n}=${jl(r[s])}`);else{let s=n;(r||typeof r=="string")&&(s+=`=${jl(r)}`),e.push(s)}}return e.join("&")}const hm="[aws-rum-web:unknown.unknown]";class be{static configure(e){be.debugEnabled=e}static getCallerInfo(){var e,n;try{const r=new Error().stack;if(!r)return hm;const s=r.split(`
231
+ `);if(s.length<4)return hm;const o=s[3];if(!o)return hm;const a=o.match(/at (?:(.+?)\s+\()?/);if(a&&a.length>=2){const u=a[1].trim(),c=u.split(".");if(c.length>=2){const f=(e=c[c.length-2])!==null&&e!==void 0?e:"unknown",h=(n=c[c.length-1])!==null&&n!==void 0?n:"unknown";return`[aws-rum-web:${f}.${h}]`}return`[aws-rum-web:${u}]`}}catch{}return hm}static info(e,...n){if(!be.debugEnabled)return;const r=this.getCallerInfo();console.info(r,e,...n)}static debug(e,...n){if(!be.debugEnabled)return;const r=this.getCallerInfo();console.debug(r,e,...n)}static warn(e,...n){if(!be.debugEnabled)return;const r=this.getCallerInfo();console.warn(r,e,...n)}static error(e,...n){if(!be.debugEnabled)return;const r=this.getCallerInfo();console.error(r,e,...n)}}be.debugEnabled=!1;const GU=2048,KU=.2,qme=()=>typeof CompressionStream<"u",Wme=async t=>{const e=new Blob([t]).stream().pipeThrough(new CompressionStream("gzip"));return new Uint8Array(await new Response(e).arrayBuffer())},Vme=async t=>{const e=t.length;if(be.debug(`compressIfBeneficial called, payload size: ${e}B`),!qme())return be.debug("CompressionStream not supported, skipping compression"),{body:t,compressed:!1};if(e<GU)return be.debug(`Payload size ${e}B below threshold ${GU}B, skipping compression`),{body:t,compressed:!1};const n=await Wme(t),r=1-n.length/e;return r>=KU?(be.debug(`Compressed ${e}B -> ${n.length}B (${(r*100).toFixed(1)}% reduction)`),{body:n,compressed:!0}):(be.debug(`Compression ratio ${(r*100).toFixed(1)}% below threshold ${KU*100}%, skipping`),{body:t,compressed:!1})},Gme="POST",Kme="application/json",Yme="text/plain;charset=UTF-8",Zme=64e3;class Xme{constructor(e,n){this.sendFetch=async r=>{var s,o;const a=JSON.stringify(YU(r)),u=(o=(s=this.config.compressionStrategy)===null||s===void 0?void 0:s.enabled)!==null&&o!==void 0?o:!1,{body:c,compressed:f}=u?await Vme(a):{body:a,compressed:!1},h=await this.getHttpRequestOptions(r,c,Kme,f);let g=new Ci(h);return this.signing&&(g=await this.signing.sign(g)),this.config.fetchRequestHandler.handle(g)},this.sendBeacon=async r=>{const s=JSON.stringify(YU(r));if(s.length>Zme)throw new Error("Payload too large for sendBeacon");const o=await this.getHttpRequestOptions(r,s,Yme,!1);let a=new Ci(o);return this.signing&&(a=await this.signing.presign(a)),this.config.beaconRequestHandler.handle(a)},this.getHttpRequestOptions=async(r,s,o,a)=>{const u=this.config.endpoint.pathname.replace(/\/$/,""),c=Object.assign({"content-type":o,host:this.config.endpoint.host},this.config.headers);a&&(c["Content-Encoding"]="gzip");const f={method:Gme,protocol:this.config.endpoint.protocol,port:Number(this.config.endpoint.port)||void 0,headers:c,hostname:this.config.endpoint.hostname,path:`${u}/appmonitors/${r.AppMonitorDetails.id}`,body:s};return this.signing?Object.assign(Object.assign({},f),{headers:Object.assign(Object.assign({},f.headers),{"X-Amz-Content-Sha256":await this.signing.hashAndEncode(s)})}):f},this.config=e,this.signing=n}}const YU=t=>{const e=[];t.RumEvents.forEach(r=>e.push(Qme(r)));let n={BatchId:t.BatchId,AppMonitorDetails:t.AppMonitorDetails,UserDetails:t.UserDetails,RumEvents:e};return t.SessionMetadata&&(n=Object.assign(Object.assign({},n),{SessionMetadata:t.SessionMetadata})),t.Alias&&(n=Object.assign(Object.assign({},n),{Alias:t.Alias})),n},Qme=t=>({id:t.id,timestamp:Math.round(t.timestamp.getTime()/1e3),type:t.type,metadata:t.metadata,details:t.details});class Jme{handle(e){const n=this.sendBeacon(e);return new Promise((r,s)=>{n?r({response:new zh({statusCode:200})}):s()})}updateHttpClientConfig(e,n){}httpHandlerConfigs(){return{}}sendBeacon(e){let n=e.path;if(e.query){const o=SR(e.query);o&&(n+=`?${o}`)}const{port:r}=e,s=`${e.protocol}//${e.hostname}${r?`:${r}`:""}${n}`;return navigator.sendBeacon(s,e.body)}}const eve=(t=0)=>new Promise((e,n)=>{t&&setTimeout(()=>{const r=new Error(`Request did not complete within ${t} ms`);r.name="TimeoutError",n(r)},t)});let tve=class{constructor({fetchFunction:e,requestTimeout:n}={}){this.requestTimeout=n,this.fetchFunction=e}destroy(){}handle(e,{abortSignal:n}={}){const r=this.requestTimeout;if(n?.aborted){const m=new Error("Request aborted");return m.name="AbortError",Promise.reject(m)}let s=e.path;if(e.query){const m=SR(e.query);m&&(s+=`?${m}`)}const{port:o,method:a}=e,u=`${e.protocol}//${e.hostname}${o?`:${o}`:""}${s}`,f={body:a==="GET"||a==="HEAD"?void 0:e.body,headers:new Headers(e.headers),method:a};typeof AbortController<"u"&&(f.signal=n);const h=new Request(u,f),g=[this.fetchFunction.apply(window,[h]).then(m=>{const y=m.headers,S={};for(const C of y.entries())S[C[0]]=C[1];return m.body!==void 0?{response:new zh({headers:S,statusCode:m.status,body:m.body})}:m.blob().then(C=>({response:new zh({headers:S,statusCode:m.status,body:C})}))}),eve(r)];return n&&g.push(new Promise((m,y)=>{n.onabort=()=>{const S=new Error("Request aborted");S.name="AbortError",y(S)}})),Promise.race(g)}updateHttpClientConfig(e,n){}httpHandlerConfigs(){return{}}},pm;const nve=new Uint8Array(16);function rve(){if(!pm&&(pm=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!pm))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return pm(nve)}const tr=[];for(let t=0;t<256;++t)tr.push((t+256).toString(16).slice(1));function sve(t,e=0){return tr[t[e+0]]+tr[t[e+1]]+tr[t[e+2]]+tr[t[e+3]]+"-"+tr[t[e+4]]+tr[t[e+5]]+"-"+tr[t[e+6]]+tr[t[e+7]]+"-"+tr[t[e+8]]+tr[t[e+9]]+"-"+tr[t[e+10]]+tr[t[e+11]]+tr[t[e+12]]+tr[t[e+13]]+tr[t[e+14]]+tr[t[e+15]]}const ove=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),ZU={randomUUID:ove};function gh(t,e,n){if(ZU.randomUUID&&!t)return ZU.randomUUID();t=t||{};const r=t.random||(t.rng||rve)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,sve(r)}const ER=t=>{if(crypto)return crypto.getRandomValues(t);if(msCrypto)return msCrypto.getRandomValues(t);throw new Error("No crypto library found.")},Sz=[];for(let t=0;t<256;t++)Sz[t]=(t+256).toString(16).substr(1);const Cb="X-Amzn-Trace-Id",wb="traceparent",ive=2,ave=32,lve=16,uve=4,Ez=(t,e)=>Array.isArray(e)?e.some(n=>n.test(t)):e,Cz={logicalServiceName:"rum.aws.amazon.com",urlsToInclude:[/.*/],urlsToExclude:[/cognito\-identity\.([^\.]*\.)?amazonaws\.com/,/sts\.([^\.]*\.)?amazonaws\.com/],stackTraceLength:200,recordAllRequests:!1,addXRayTraceIdHeader:!1},cve=t=>200<=t&&t<300,wz=t=>Math.floor(t/100)===4,CR=t=>Math.floor(t/100)===5,wR=t=>t===429,xz=(t,e)=>{const n=e.urlsToInclude.some(s=>s.test(t)),r=e.urlsToExclude.some(s=>s.test(t));return n&&!r},Ic=()=>Date.now()/1e3,dve=(t,e,n)=>{const r={request:{}};return r.request.method=e?.method?e.method:"GET",r.request.traced=n,r.request.url=hv(t),r},_z=(t,e,n,r)=>({version:"1.0.0",name:t,origin:"AWS::RUM::AppMonitor",id:Rz(),start_time:e,trace_id:n?vve():mve(),end_time:void 0,subsegments:[],in_progress:!1}),Az=(t,e,n)=>{const r={id:Rz(),name:t,start_time:e,end_time:void 0,in_progress:!1,namespace:t.endsWith(".amazonaws.com")?"aws":"remote"};return n&&(r.http=n),r},Tz=t=>{try{return t.hostname?t.hostname:t.url?new URL(t.url).hostname:new URL(t.toString()).hostname}catch{return window.location.hostname}},fve=(t,e,n,r)=>{t.headers||(t.headers={}),r?t.headers[wb]=_R(e,n):t.headers[Cb]=xR(e,n)},hve=(t,e,n,r)=>{r?t.set(wb,_R(e,n)):t.set(Cb,xR(e,n))},xR=(t,e)=>"Root="+t+";Parent="+e+";Sampled=1",_R=(t,e)=>"00-"+t+"-"+e+"-01",pve=t=>t?.length===uve&&t[0].length===ive&&t[1].length===ave&&t[2].length===lve&&(t[3]==="00"||t[3]==="01"),gve=(t,e)=>{var n,r;const s={};if(t)if(e){const o=(n=t.get(wb))===null||n===void 0?void 0:n.split("-");o&&pve(o)&&(s.traceId=o[1],s.segmentId=o[2])}else{const o=(r=t.get(Cb))===null||r===void 0?void 0:r.split(";");o?.length===3&&(s.traceId=o[0].split("Root=")[1],s.segmentId=o[1].split("Parent=")[1])}return s},hv=t=>t.url?t.url:t.toString(),mve=()=>`1-${yve()}-${bve()}`,vve=()=>{const t=new Uint8Array(16);return ER(t),`${AR(t)}`},Rz=()=>{const t=new Uint8Array(8);return ER(t),AR(t)},yve=()=>Math.floor(Date.now()/1e3).toString(16),bve=()=>{const t=new Uint8Array(12);return ER(t),AR(t)},AR=t=>{let e="";for(let n=0;n<t.length;n++)e+=Sz[t[n]];return e};class Sve{constructor(e,n,r=s=>2e3*Math.pow(2,s-1)){this.handler=e,this.retries=n,this.backoff=r}async handle(e){let n=this.retries;for(;;)try{const r=await this.handler.handle(e);if(cve(r.response.statusCode))return r;throw r.response.statusCode}catch(r){if(typeof r=="number"&&!wR(r)&&!CR(r))throw new Error(`${r}`);if(n<=0)throw r;n--,await this.sleep(this.backoff(this.retries-n))}}async sleep(e){return new Promise(n=>setTimeout(n,e))}updateHttpClientConfig(e,n){}httpHandlerConfigs(){return{}}}const Gc="cwr_c",Wv="cwr_i",Vv="cwr_s",Gv="cwr_u",Eve=3e4,Cve="arw-module",XU="CWR: Cannot dispatch; no AWS credentials.";class wve{constructor(e,n,r,s,o){this.disableCodes=["403","404"],this.shouldPurgeCredentials=!0,this.dispatchFetch=async()=>{if(this.doRequest()){const a=this.createRequest();return be.info(`Dispatching ${a.RumEvents.length} events via fetch`),this.rum.sendFetch(a).catch(this.handleReject)}},this.dispatchBeacon=async()=>{if(this.doRequest()){const a=this.createRequest();return be.info(`Dispatching ${a.RumEvents.length} events via beacon`),this.rum.sendBeacon(a).catch(()=>this.rum.sendFetch(a))}},this.dispatchFetchFailSilent=async()=>this.dispatchFetch().catch(a=>{be.error("Dispatch fetch failed silently:",a)}),this.dispatchBeaconFailSilent=async()=>this.dispatchBeacon().catch(a=>{be.error("Dispatch beacon failed silently:",a)}),this.flushSync=()=>{if(document.visibilityState==="hidden"&&this.doRequest(!0)){let a=this.rum.sendBeacon,u=this.rum.sendFetch;this.config.useBeacon||([a,u]=[u,a]);const c=this.createRequest(!0);be.debug(`Flushing ${c.RumEvents.length} events on page hide`),a(c).catch(()=>u(c)).catch(f=>{be.error("Page hide flush failed:",f)})}},this.handleReject=a=>{throw a instanceof Error&&(a.message==="403"&&this.config.signing&&this.shouldPurgeCredentials?(this.shouldPurgeCredentials=!1,this.forceRebuildClient()):this.disableCodes.includes(a.message)&&(be.error("Dispatch failed with status code:",a.message),this.disable())),a},this.defaultClientBuilder=(a,u,c,f)=>{const h=c&&this.signingConfigFactory?this.signingConfigFactory(c,u):void 0;return new Xme({fetchRequestHandler:new Sve(new tve({fetchFunction:this.config.fetchFunction}),this.config.retries),beaconRequestHandler:new Jme,endpoint:a,region:u,credentials:c,headers:this.headers,compressionStrategy:f},h)},this.applicationId=e,this.region=n,this.endpoint=r,this.eventCache=s,this.enabled=!0,this.buildClient=o.clientBuilder||this.defaultClientBuilder,this.config=o,this.headers=o.headers,this.startDispatchTimer(),o.signing?this.rum={sendFetch:()=>Promise.reject(new Error(XU)),sendBeacon:()=>Promise.reject(new Error(XU))}:this.rum=this.buildClient(this.endpoint,this.region,void 0,this.config.compressionStrategy),this.credentialStorageKey=this.config.cookieAttributes.unique?`${Gc}_${e}`:Gc,this.identityStorageKey=this.config.cookieAttributes.unique?`${Wv}_${e}`:Wv}enable(){this.enabled=!0,this.startDispatchTimer()}disable(){this.stopDispatchTimer(),this.enabled=!1,be.warn("Dispatch disabled")}setAwsCredentials(e){this.credentialProvider=e,this.rum=this.buildClient(this.endpoint,this.region,e,this.config.compressionStrategy),typeof e=="function"&&e()}setCognitoCredentialProviderFactory(e){this.cognitoCredentialProviderFactory=e}setSigningConfigFactory(e){this.signingConfigFactory=e}setCognitoCredentials(e,n){this.identityPoolId=e,this.guestRoleArn=n,this.cognitoCredentialProviderFactory&&this.setAwsCredentials(this.cognitoCredentialProviderFactory(this.config,this.applicationId,e,n))}startDispatchTimer(){document.addEventListener("visibilitychange",this.flushSync),document.addEventListener("pagehide",this.flushSync),!(this.config.dispatchInterval<=0||this.dispatchTimerId)&&(this.dispatchTimerId=window.setInterval(this.dispatchFetchFailSilent,this.config.dispatchInterval))}stopDispatchTimer(){document.removeEventListener("visibilitychange",this.flushSync),document.removeEventListener("pagehide",this.flushSync),this.dispatchTimerId&&(window.clearInterval(this.dispatchTimerId),this.dispatchTimerId=void 0)}doRequest(e=!1){return this.enabled?e&&this.eventCache.hasCandidates()?!0:this.eventCache.hasEvents():!1}createRequest(e=!1){return{BatchId:gh(),AppMonitorDetails:this.eventCache.getAppMonitorDetails(),UserDetails:this.eventCache.getUserDetails(),SessionMetadata:JSON.stringify(this.eventCache.getCommonMetadata()),RumEvents:this.eventCache.getEventBatch(e),Alias:this.config.alias}}forceRebuildClient(){be.warn("Removing credentials from local storage"),localStorage.removeItem(this.credentialStorageKey),this.identityPoolId?(be.info("Rebuilding client with fresh cognito credentials"),localStorage.removeItem(this.identityStorageKey),this.setCognitoCredentials(this.identityPoolId,this.guestRoleArn)):this.credentialProvider&&(be.info("Rebuilding client with most recently passed provider"),this.setAwsCredentials(this.credentialProvider))}}const Iz={};for(let t=0;t<256;t++){let e=t.toString(16).toLowerCase();e.length===1&&(e=`0${e}`),Iz[t]=e}function xve(t){let e="";for(let n=0;n<t.byteLength;n++)e+=Iz[t[n]];return e}class _ve{format(e){const n=[];for(const o of Object.keys(e)){const a=D_(o);n.push(Uint8Array.from([a.byteLength]),a,this.formatHeaderValue(e[o]))}const r=new Uint8Array(n.reduce((o,a)=>o+a.byteLength,0));let s=0;for(const o of n)r.set(o,s),s+=o.byteLength;return r}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?xs.boolTrue:xs.boolFalse]);case"byte":return Uint8Array.from([xs.byte,e.value]);case"short":const n=new DataView(new ArrayBuffer(3));return n.setUint8(0,xs.short),n.setInt16(1,e.value,!1),new Uint8Array(n.buffer);case"integer":const r=new DataView(new ArrayBuffer(5));return r.setUint8(0,xs.integer),r.setInt32(1,e.value,!1),new Uint8Array(r.buffer);case"long":const s=new Uint8Array(9);return s[0]=xs.long,s.set(e.value.bytes,1),s;case"binary":const o=new DataView(new ArrayBuffer(3+e.value.byteLength));o.setUint8(0,xs.byteArray),o.setUint16(1,e.value.byteLength,!1);const a=new Uint8Array(o.buffer);return a.set(e.value,3),a;case"string":const u=D_(e.value),c=new DataView(new ArrayBuffer(3+u.byteLength));c.setUint8(0,xs.string),c.setUint16(1,u.byteLength,!1);const f=new Uint8Array(c.buffer);return f.set(u,3),f;case"timestamp":const h=new Uint8Array(9);return h[0]=xs.timestamp,h.set(TR.fromNumber(e.value.valueOf()).bytes,1),h;case"uuid":if(!Ave.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const g=new Uint8Array(17);return g[0]=xs.uuid,g.set(jme(e.value.replace(/-/g,"")),1),g}}}var xs;(function(t){t[t.boolTrue=0]="boolTrue",t[t.boolFalse=1]="boolFalse",t[t.byte=2]="byte",t[t.short=3]="short",t[t.integer=4]="integer",t[t.long=5]="long",t[t.byteArray=6]="byteArray",t[t.string=7]="string",t[t.timestamp=8]="timestamp",t[t.uuid=9]="uuid"})(xs||(xs={}));const Ave=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class TR{bytes;constructor(e){if(this.bytes=e,e.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>9223372036854776e3||e<-9223372036854776e3)throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);const n=new Uint8Array(8);for(let r=7,s=Math.abs(Math.round(e));r>-1&&s>0;r--,s/=256)n[r]=s;return e<0&&QU(n),new TR(n)}valueOf(){const e=this.bytes.slice(0),n=e[0]&128;return n&&QU(e),parseInt(zl(e),16)*(n?-1:1)}toString(){return String(this.valueOf())}}function QU(t){for(let e=0;e<8;e++)t[e]^=255;for(let e=7;e>-1&&(t[e]++,t[e]===0);e--);}const Tve="X-Amz-Algorithm",Rve="X-Amz-Credential",Oz="X-Amz-Date",Ive="X-Amz-SignedHeaders",Ove="X-Amz-Expires",Nz="X-Amz-Signature",Mz="X-Amz-Security-Token",Pz="authorization",kz=Oz.toLowerCase(),Nve="date",Mve=[Pz,kz,Nve],Pve=Nz.toLowerCase(),U_="x-amz-content-sha256",kve=Mz.toLowerCase(),Dve={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},Lve=/^proxy-/,Uve=/^sec-/,ox="AWS4-HMAC-SHA256",Fve="AWS4-HMAC-SHA256-PAYLOAD",zve="UNSIGNED-PAYLOAD",jve=50,Dz="aws4_request",Bve=3600*24*7,Hve=({query:t={}})=>{const e=[],n={};for(const r of Object.keys(t)){if(r.toLowerCase()===Pve)continue;const s=jl(r);e.push(s);const o=t[r];typeof o=="string"?n[s]=`${s}=${jl(o)}`:Array.isArray(o)&&(n[s]=o.slice(0).reduce((a,u)=>a.concat([`${s}=${jl(u)}`]),[]).sort().join("&"))}return e.sort().map(r=>n[r]).filter(r=>r).join("&")},$ve=t=>qve(t).toISOString().replace(/\.\d{3}Z$/,"Z"),qve=t=>typeof t=="number"?new Date(t*1e3):typeof t=="string"?Number(t)?new Date(Number(t)*1e3):new Date(t):t;class Wve{service;regionProvider;credentialProvider;sha256;uriEscapePath;applyChecksum;constructor({applyChecksum:e,credentials:n,region:r,service:s,sha256:o,uriEscapePath:a=!0}){this.service=s,this.sha256=o,this.uriEscapePath=a,this.applyChecksum=typeof e=="boolean"?e:!0,this.regionProvider=VU(r),this.credentialProvider=VU(n)}createCanonicalRequest(e,n,r){const s=Object.keys(n).sort();return`${e.method}
232
+ ${this.getCanonicalPath(e)}
233
+ ${Hve(e)}
234
+ ${s.map(o=>`${o}:${n[o]}`).join(`
235
+ `)}
236
+
237
+ ${s.join(";")}
238
+ ${r}`}async createStringToSign(e,n,r,s){const o=new this.sha256;o.update(Fh(r));const a=await o.digest();return`${s}
239
+ ${e}
240
+ ${n}
241
+ ${zl(a)}`}getCanonicalPath({path:e}){if(this.uriEscapePath){const n=[];for(const o of e.split("/"))o?.length!==0&&o!=="."&&(o===".."?n.pop():n.push(o));const r=`${e?.startsWith("/")?"/":""}${n.join("/")}${n.length>0&&e?.endsWith("/")?"/":""}`;return jl(r).replace(/%2F/g,"/")}return e}validateResolvedCredentials(e){if(typeof e!="object"||typeof e.accessKeyId!="string"||typeof e.secretAccessKey!="string")throw new Error("Resolved credential object is not valid")}formatDate(e){const n=$ve(e).replace(/[-:]/g,"");return{longDate:n,shortDate:n.slice(0,8)}}getCanonicalHeaderList(e){return Object.keys(e).sort().join(";")}}const gm={},ix=[],ax=(t,e,n)=>`${t}/${e}/${n}/${Dz}`,Vve=async(t,e,n,r,s)=>{const o=await JU(t,e.secretAccessKey,e.accessKeyId),a=`${n}:${r}:${s}:${zl(o)}:${e.sessionToken}`;if(a in gm)return gm[a];for(ix.push(a);ix.length>jve;)delete gm[ix.shift()];let u=`AWS4${e.secretAccessKey}`;for(const c of[n,r,s,Dz])u=await JU(t,u,c);return gm[a]=u},JU=(t,e,n)=>{const r=new t(e);return r.update(Fh(n)),r.digest()},e4=({headers:t},e,n)=>{const r={};for(const s of Object.keys(t).sort()){if(t[s]==null)continue;const o=s.toLowerCase();(o in Dve||e?.has(o)||Lve.test(o)||Uve.test(o))&&(!n||n&&!n.has(o))||(r[o]=t[s].trim().replace(/\s+/g," "))}return r},lx=async({headers:t,body:e},n)=>{for(const r of Object.keys(t))if(r.toLowerCase()===U_)return t[r];if(e==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof e=="string"||ArrayBuffer.isView(e)||Bme(e)){const r=new n;return r.update(Fh(e)),zl(await r.digest())}return zve},Gve=(t,e)=>{t=t.toLowerCase();for(const n of Object.keys(e))if(t===n.toLowerCase())return!0;return!1},Kve=(t,e={})=>{const{headers:n,query:r={}}=Ci.clone(t);for(const s of Object.keys(n)){const o=s.toLowerCase();(o.slice(0,6)==="x-amz-"&&!e.unhoistableHeaders?.has(o)||e.hoistableHeaders?.has(o))&&(r[s]=n[s],delete n[s])}return{...t,headers:n,query:r}},t4=t=>{t=Ci.clone(t);for(const e of Object.keys(t.headers))Mve.indexOf(e.toLowerCase())>-1&&delete t.headers[e];return t};class Yve extends Wve{headerFormatter=new _ve;constructor({applyChecksum:e,credentials:n,region:r,service:s,sha256:o,uriEscapePath:a=!0}){super({applyChecksum:e,credentials:n,region:r,service:s,sha256:o,uriEscapePath:a})}async presign(e,n={}){const{signingDate:r=new Date,expiresIn:s=3600,unsignableHeaders:o,unhoistableHeaders:a,signableHeaders:u,hoistableHeaders:c,signingRegion:f,signingService:h}=n,g=await this.credentialProvider();this.validateResolvedCredentials(g);const m=f??await this.regionProvider(),{longDate:y,shortDate:S}=this.formatDate(r);if(s>Bve)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const E=ax(S,m,h??this.service),C=Kve(t4(e),{unhoistableHeaders:a,hoistableHeaders:c});g.sessionToken&&(C.query[Mz]=g.sessionToken),C.query[Tve]=ox,C.query[Rve]=`${g.accessKeyId}/${E}`,C.query[Oz]=y,C.query[Ove]=s.toString(10);const w=e4(C,o,u);return C.query[Ive]=this.getCanonicalHeaderList(w),C.query[Nz]=await this.getSignature(y,E,this.getSigningKey(g,m,S,h),this.createCanonicalRequest(C,w,await lx(e,this.sha256))),C}async sign(e,n){return typeof e=="string"?this.signString(e,n):e.headers&&e.payload?this.signEvent(e,n):e.message?this.signMessage(e,n):this.signRequest(e,n)}async signEvent({headers:e,payload:n},{signingDate:r=new Date,priorSignature:s,signingRegion:o,signingService:a,eventStreamCredentials:u}){const c=o??await this.regionProvider(),{shortDate:f,longDate:h}=this.formatDate(r),g=ax(f,c,a??this.service),m=await lx({headers:{},body:n},this.sha256),y=new this.sha256;y.update(e);const S=zl(await y.digest()),E=[Fve,h,g,s,S,m].join(`
242
+ `);return this.signString(E,{signingDate:r,signingRegion:c,signingService:a,eventStreamCredentials:u})}async signMessage(e,{signingDate:n=new Date,signingRegion:r,signingService:s,eventStreamCredentials:o}){return this.signEvent({headers:this.headerFormatter.format(e.message.headers),payload:e.message.body},{signingDate:n,signingRegion:r,signingService:s,priorSignature:e.priorSignature,eventStreamCredentials:o}).then(u=>({message:e.message,signature:u}))}async signString(e,{signingDate:n=new Date,signingRegion:r,signingService:s,eventStreamCredentials:o}={}){const a=o??await this.credentialProvider();this.validateResolvedCredentials(a);const u=r??await this.regionProvider(),{shortDate:c}=this.formatDate(n),f=new this.sha256(await this.getSigningKey(a,u,c,s));return f.update(Fh(e)),zl(await f.digest())}async signRequest(e,{signingDate:n=new Date,signableHeaders:r,unsignableHeaders:s,signingRegion:o,signingService:a}={}){const u=await this.credentialProvider();this.validateResolvedCredentials(u);const c=o??await this.regionProvider(),f=t4(e),{longDate:h,shortDate:g}=this.formatDate(n),m=ax(g,c,a??this.service);f.headers[kz]=h,u.sessionToken&&(f.headers[kve]=u.sessionToken);const y=await lx(f,this.sha256);!Gve(U_,f.headers)&&this.applyChecksum&&(f.headers[U_]=y);const S=e4(f,s,r),E=await this.getSignature(h,m,this.getSigningKey(u,c,g,a),this.createCanonicalRequest(f,S,y));return f.headers[Pz]=`${ox} Credential=${u.accessKeyId}/${m}, SignedHeaders=${this.getCanonicalHeaderList(S)}, Signature=${E}`,f}async getSignature(e,n,r,s){const o=await this.createStringToSign(e,n,s,ox),a=new this.sha256(await r);return a.update(Fh(o)),zl(await a.digest())}getSigningKey(e,n,r,s){return Vve(this.sha256,e,r,n,s||this.service)}}const Zve="rum",Xve={expiresIn:60},Qve=(t,e)=>{const n=new Yve({applyChecksum:!0,credentials:t,region:e,service:Zve,uriEscapePath:!0,sha256:Hl});return{sign:async r=>await n.sign(r),presign:async r=>await n.presign(r,Xve),hashAndEncode:async r=>{const s=new Hl;return s.update(r),xve(await s.digest()).toLowerCase()}}};function n4(t,e){return new Request(t,e)}function Jve(t=0){return new Promise((e,n)=>{t&&setTimeout(()=>{const r=new Error(`Request did not complete within ${t} ms`);r.name="TimeoutError",n(r)},t)})}const ux={supported:void 0};class xb{config;configProvider;static create(e){return typeof e?.handle=="function"?e:new xb(e)}constructor(e){typeof e=="function"?this.configProvider=e().then(n=>n||{}):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),ux.supported===void 0&&(ux.supported=typeof Request<"u"&&"keepalive"in n4("https://[::1]"))}destroy(){}async handle(e,{abortSignal:n,requestTimeout:r}={}){this.config||(this.config=await this.configProvider);const s=r??this.config.requestTimeout,o=this.config.keepAlive===!0,a=this.config.credentials;if(n?.aborted){const x=r4(n);return Promise.reject(x)}let u=e.path;const c=SR(e.query||{});c&&(u+=`?${c}`),e.fragment&&(u+=`#${e.fragment}`);let f="";if(e.username!=null||e.password!=null){const x=e.username??"",T=e.password??"";f=`${x}:${T}@`}const{port:h,method:g}=e,m=`${e.protocol}//${f}${e.hostname}${h?`:${h}`:""}${u}`,y=g==="GET"||g==="HEAD"?void 0:e.body,S={body:y,headers:new Headers(e.headers),method:g,credentials:a};this.config?.cache&&(S.cache=this.config.cache),y&&(S.duplex="half"),typeof AbortController<"u"&&(S.signal=n),ux.supported&&(S.keepalive=o),typeof this.config.requestInit=="function"&&Object.assign(S,this.config.requestInit(e));let E=()=>{};const C=n4(m,S),w=[fetch(C).then(x=>{const T=x.headers,R={};for(const N of T.entries())R[N[0]]=N[1];return x.body!=null?{response:new zh({headers:R,reason:x.statusText,statusCode:x.status,body:x.body})}:x.blob().then(N=>({response:new zh({headers:R,reason:x.statusText,statusCode:x.status,body:N})}))}),Jve(s)];return n&&w.push(new Promise((x,T)=>{const R=()=>{const M=r4(n);T(M)};if(typeof n.addEventListener=="function"){const M=n;M.addEventListener("abort",R,{once:!0}),E=()=>M.removeEventListener("abort",R)}else n.onabort=R})),Promise.race(w).finally(E)}updateHttpClientConfig(e,n){this.config=void 0,this.configProvider=this.configProvider.then(r=>(r[e]=n,r))}httpHandlerConfigs(){return this.config??{}}}function r4(t){const e=t&&typeof t=="object"&&"reason"in t?t.reason:void 0;if(e){if(e instanceof Error){const s=new Error("Request aborted");return s.name="AbortError",s.cause=e,s}const r=new Error(String(e));return r.name="AbortError",r}const n=new Error("Request aborted");return n.name="AbortError",n}const cx=async t=>{const{value:e}=await t.body.getReader().read();return JSON.parse(String.fromCharCode.apply(null,e))},eye=async t=>{const{value:e}=await t.body.getReader().read();return String.fromCharCode.apply(null,e)},tye="POST",nye="application/x-www-form-urlencoded",rye="https:",sye="AssumeRoleWithWebIdentity",oye="2011-06-15";class iye{constructor(e){this.assumeRoleWithWebIdentity=async n=>{try{const r=Object.assign(Object.assign({},n),{Action:sye,Version:oye}),s=new URLSearchParams(Object.entries(r)).toString(),o=new Ci({method:tye,headers:{"content-type":nye,host:this.hostname},protocol:rye,hostname:this.hostname,body:s}),{response:a}=await this.fetchRequestHandler.handle(o),u=await eye(a);return{accessKeyId:u.split("<AccessKeyId>")[1].split("</AccessKeyId>")[0],secretAccessKey:u.split("<SecretAccessKey>")[1].split("</SecretAccessKey>")[0],sessionToken:u.split("<SessionToken>")[1].split("</SessionToken>")[0],expiration:new Date(u.split("<Expiration>")[1].split("</Expiration>")[0])}}catch(r){throw new Error(`CWR: Failed to retrieve credentials from STS: ${r}`)}},this.hostname=`sts.${e.region}.amazonaws.com`,this.fetchRequestHandler=e.fetchRequestHandler}}const aye="POST",lye="application/x-amz-json-1.1",uye="https:",cye="AWSCognitoIdentityService.GetId",dye="AWSCognitoIdentityService.GetOpenIdToken",fye="AWSCognitoIdentityService.GetCredentialsForIdentity";class hye{constructor(e){var n;this.getId=async r=>{var s;let o=null;try{o=JSON.parse(localStorage.getItem(this.identityStorageKey))}catch(a){!((s=this.config)===null||s===void 0)&&s.debug&&be.error("Failed to parse stored identity:",a)}if(o&&o.IdentityId)return Promise.resolve(o);try{const a=JSON.stringify(r),u=this.getHttpRequest(cye,a),c=await cx((await this.fetchRequestHandler.handle(u)).response);try{localStorage.setItem(this.identityStorageKey,JSON.stringify({IdentityId:c.IdentityId}))}catch(f){be.error("Failed to store identity:",f)}return c}catch(a){throw new Error(`CWR: Failed to retrieve Cognito identity: ${a}`)}},this.getOpenIdToken=async r=>{try{const s=JSON.stringify(r),o=this.getHttpRequest(dye,s),{response:a}=await this.fetchRequestHandler.handle(o);return this.validateOpenIdTokenResponse(await cx(a))}catch(s){throw localStorage.removeItem(this.identityStorageKey),new Error(`CWR: Failed to retrieve Cognito OpenId token: ${s}`)}},this.getCredentialsForIdentity=async r=>{try{const s=JSON.stringify({IdentityId:r}),o=this.getHttpRequest(fye,s),{response:a}=await this.fetchRequestHandler.handle(o),{AccessKeyId:u,Expiration:c,SecretKey:f,SessionToken:h}=this.validateCredenentialsResponse(await cx(a));return{accessKeyId:u,secretAccessKey:f,sessionToken:h,expiration:new Date(c*1e3)}}catch(s){throw localStorage.removeItem(this.identityStorageKey),new Error(`CWR: Failed to retrieve credentials for Cognito identity: ${s}`)}},this.validateOpenIdTokenResponse=r=>{if("IdentityId"in r&&"Token"in r)return r;throw r&&"__type"in r&&"message"in r?new Error(`${r.__type}: ${r.message}`):new Error("Unknown OpenIdToken response")},this.validateCredenentialsResponse=r=>{if("IdentityId"in r&&"Credentials"in r)return r.Credentials;throw r&&"__type"in r&&"message"in r?new Error(`${r.__type}: ${r.message}`):new Error("Unknown Credentials response")},this.getHttpRequest=(r,s)=>new Ci({method:aye,headers:{"content-type":lye,"x-amz-target":r},protocol:uye,hostname:this.hostname,body:s}),this.hostname=`cognito-identity.${e.region}.amazonaws.com`,this.fetchRequestHandler=e.fetchRequestHandler,this.config=e.clientConfig,this.identityStorageKey=!((n=e.clientConfig)===null||n===void 0)&&n.cookieAttributes.unique?`${Wv}_${e.applicationId}`:Wv}}class Lz{constructor(e,n){this.ChainAnonymousCredentialsProvider=async()=>this.AnonymousCredentialsProvider().catch(this.AnonymousStorageCredentialsProvider).catch(this.AnonymousCognitoCredentialsProvider),this.AnonymousCredentialsProvider=async()=>new Promise((s,o)=>{if(this.renewCredentials())return o();s(this.credentials)}),this.AnonymousStorageCredentialsProvider=async()=>new Promise((s,o)=>{let a;try{a=JSON.parse(localStorage.getItem(this.credentialStorageKey))}catch{return o()}if(this.credentials=Object.assign(Object.assign({},a),{expiration:new Date(a.expiration)}),this.renewCredentials())return o();s(this.credentials)});const r=e.identityPoolId.split(":")[0];this.config=e,this.cognitoIdentityClient=new hye({fetchRequestHandler:new xb,region:r,clientConfig:e,applicationId:n}),this.credentialStorageKey=this.config.cookieAttributes.unique?`${Gc}_${n}`:Gc}renewCredentials(){if(!this.credentials||!this.credentials.expiration)return!0;const e=new Date(this.credentials.expiration.getTime()-Eve);return new Date>e}}class pye extends Lz{constructor(e,n){super(e,n),this.AnonymousCognitoCredentialsProvider=async()=>{let s=1;for(;;)try{const o=await this.cognitoIdentityClient.getId({IdentityPoolId:this.config.identityPoolId}),a=await this.cognitoIdentityClient.getOpenIdToken(o),u=await this.stsClient.assumeRoleWithWebIdentity({RoleArn:this.config.guestRoleArn,RoleSessionName:"cwr",WebIdentityToken:a.Token});this.credentials=u;try{localStorage.setItem(this.credentialStorageKey,JSON.stringify(u))}catch{}return be.debug("AWS credentials fetched successfully"),u}catch(o){if(s)s--,be.warn("AWS credential fetch failed, retrying");else throw be.error("AWS credential fetch failed:",o),o}};const r=e.identityPoolId.split(":")[0];this.stsClient=new iye({fetchRequestHandler:new xb,region:r})}}class gye extends Lz{constructor(e,n){super(e,n),this.AnonymousCognitoCredentialsProvider=async()=>{let r=1;for(;;)try{const s=await this.cognitoIdentityClient.getId({IdentityPoolId:this.config.identityPoolId}),o=await this.cognitoIdentityClient.getCredentialsForIdentity(s.IdentityId);this.credentials=o;try{localStorage.setItem(this.credentialStorageKey,JSON.stringify(o))}catch{}return be.debug("AWS credentials fetched successfully"),o}catch(s){if(r)r--,be.warn("AWS credential fetch failed, retrying");else throw be.error("AWS credential fetch failed:",s),s}}}}const hs="com.amazon.rum",mye="com.amazonaws.rum",Kv=`${hs}.http_event`,Uz=`${hs}.xray_trace_event`,vye=`${hs}.largest_contentful_paint_event`,yye=`${hs}.first_input_delay_event`,bye=`${hs}.cumulative_layout_shift_event`,Sye=`${hs}.interaction_to_next_paint_event`,F_=`${hs}.performance_navigation_event`,Fz=`${hs}.performance_resource_event`,Eye=`${hs}.dom_event`,Cye=`${hs}.js_error_event`,wye=`${hs}.page_view_event`,z_=`${hs}.session_start_event`,s4=`${hs}.rrweb_event`;class Ns{constructor(e){this.enabled=!0,this.pluginId=Ns.generatePluginId(e)}static generatePluginId(e){return`${Ns.idPrefix}.${e}`}load(e){var n;this.context=e,(n=this.onload)===null||n===void 0||n.call(this)}getPluginId(){return this.pluginId}}Ns.idPrefix=mye;class xye{constructor(e){this.context=e,this.plugins=new Map}addPlugin(e){const n=e.getPluginId();if(this.hasPlugin(n))throw new Error(`Plugin "${n}" already defined in the PluginManager`);this.plugins.set(n,e),e.load(this.context),be.debug(`Plugin loaded: ${n}`)}updatePlugin(e,n){var r;const s=this.getPlugin(e);(r=s?.update)===null||r===void 0||r.call(s,n)}enable(){this.plugins.forEach(e=>e.enable())}disable(){this.plugins.forEach(e=>e.disable())}flush(){this.plugins.forEach(e=>{var n;return(n=e.flush)===null||n===void 0?void 0:n.call(e)})}hasPlugin(e){return!!this.getPlugin(e)}record(e,n){const r=this.getPlugin(e);if(r?.record instanceof Function)r.record(n);else throw new Error("AWS RUM Client record: Invalid plugin ID")}getPlugin(e){var n;return(n=this.plugins.get(e))!==null&&n!==void 0?n:this.plugins.get(Ns.generatePluginId(e))}}const o4=(t,e,n,r,s)=>{let o=t+"=";o+=e||"",s!==void 0&&(o+=`; Expires=${s.toUTCString()}`),o+=`; Domain=${n.domain}`,o+=`; Path=${n.path}`,o+=`; SameSite=${n.sameSite}`,o+=n.secure?"; Secure":"",document.cookie=o},_ye=(t,e)=>{let n=t+"=";n+=`; Expires=${new Date(0)}`,n+=`; Domain=${e.domain}`,n+=`; Path=${e.path}`,n+=`; SameSite=${e.sameSite}`,n+=e.secure?"Secure":"",document.cookie=n},i4=t=>{const e=document.cookie.split("; ");for(const n of e){const r=n.split("=");if(r[0]===t)return r[1]}return""};var mh;(function(t){t.Path="PATH",t.Hash="HASH",t.PathAndHash="PATH_AND_HASH"})(mh||(mh={}));const Aye=()=>{var t,e;const n=navigator.userAgentData;if(!n)return;const r=(t=n.brands)!==null&&t!==void 0?t:[],s=(e=r.find(o=>o.brand!=="Chromium"&&!o.brand.startsWith("Not")))!==null&&e!==void 0?e:r[0];return{browserName:s?.brand,browserVersion:s?.version,osName:n.platform,deviceType:n.mobile?"mobile":"desktop"}},mm="00000000-0000-0000-0000-000000000000",Tye="desktop",Rye="web";class Iye{constructor(e,n,r,s){this.isSessionIdManual=!1,this.isUserIdManual=!1,this.appMonitorDetails=e,this.config=n,this.recordEvent=r,this.pageManager=s,this.sessionCookieName=this.config.cookieAttributes.unique?`${Vv}_${this.appMonitorDetails.id}`:Vv,this.session={sessionId:mm,record:this.sample(),eventCount:0},this.config.userId||this.initializeUser(),this.collectAttributes(),this.addSessionAttributes(this.config.sessionAttributes),this.getSessionFromCookie(),this.config.userId&&(this.isUserIdManual=!0,this.adoptUser(this.config.userId)),this.config.sessionId&&(this.isSessionIdManual=!0,this.adoptSession(this.config.sessionId))}isSampled(){return this.session.record}getSession(){return this.isSessionIdManual?(new Date>=this.sessionExpiry&&(this.session.eventCount=0,this.session.page=this.pageManager.getPage(),this.sessionExpiry=new Date(new Date().getTime()+this.config.sessionLengthSeconds*1e3),this.storeSessionAsCookie()),this.session):(this.session.sessionId===mm?this.createSession():new Date>=this.sessionExpiry&&this.createSession(),this.session)}getAttributes(){return this.attributes}addSessionAttributes(e){this.attributes=Object.assign(Object.assign({},this.attributes),e)}pinSessionId(e){if(!e){be.warn("pinSessionId called with empty value; ignoring.");return}this.isSessionIdManual=!0,e!==this.session.sessionId&&this.adoptSession(e)}startSession(e){return e?.userId!==void 0&&(e.userId?(this.isUserIdManual=!0,e.userId!==this.userId&&this.adoptUser(e.userId)):be.warn("startSession called with empty userId; ignoring user rotation.")),e?.sessionId!==void 0?e.sessionId?(this.isSessionIdManual=!0,this.adoptSession(e.sessionId),this.config.suppressSessionStartEvent||this.recordEvent(z_,{version:"1.0.0"})):(be.warn("startSession called with empty sessionId; minting a fresh session."),this.isSessionIdManual=!1,this.createSession()):(this.isSessionIdManual=!1,this.createSession()),this.session.sessionId}getUserId(){return this.isUserIdManual?this.userId:this.useCookies()?this.userId:mm}pinUserId(e){if(!e){be.warn("pinUserId called with empty value; ignoring.");return}this.isUserIdManual=!0,e!==this.userId&&this.adoptUser(e)}incrementSessionEventCount(){this.session.eventCount++,this.renewSession()}isLimitExceeded(){return this.session.eventCount>=this.config.sessionEventLimit&&this.config.sessionEventLimit>0}canRecord(){return this.session.record&&!this.isLimitExceeded()}initializeUser(){let e="";this.userExpiry=new Date,this.userExpiry.setDate(this.userExpiry.getDate()+this.config.userIdRetentionDays),this.config.userIdRetentionDays<=0?this.userId="00000000-0000-0000-0000-000000000000":this.useCookies()?(e=this.getUserIdCookie(),this.userId=e||gh(),this.createOrRenewUserCookie(e,this.userExpiry)):this.userId=gh()}createOrRenewSessionCookie(e,n){btoa&&o4(this.sessionCookieName,btoa(JSON.stringify(e)),this.config.cookieAttributes,void 0,n)}createOrRenewUserCookie(e,n){o4(Gv,e,this.config.cookieAttributes,void 0,n)}getUserIdCookie(){return i4(Gv)}getSessionFromCookie(){if(this.useCookies()){const e=i4(this.sessionCookieName);if(e&&atob)try{this.session=JSON.parse(atob(e)),this.pageManager.resumeSession(this.session.page),be.info(`Restored session: ${this.session.sessionId}`)}catch(n){be.error("Failed to restore session",n)}}}storeSessionAsCookie(){this.useCookies()&&this.config.userIdRetentionDays>0&&this.createOrRenewUserCookie(this.userId,this.userExpiry),this.useCookies()&&this.createOrRenewSessionCookie(this.session,this.sessionExpiry)}createSession(){this.session={sessionId:gh(),record:this.session.sessionId===mm?this.session.record:this.sample(),eventCount:0},this.session.page=this.pageManager.getPage(),this.sessionExpiry=new Date(new Date().getTime()+this.config.sessionLengthSeconds*1e3),this.storeSessionAsCookie(),be.info(`Session start: ${this.session.sessionId}`),this.session.record||be.warn(`Session is NOT sampled. Consider increasing sessionSampleRate to avoid data loss (currently ${this.config.sessionSampleRate})`),this.config.suppressSessionStartEvent||this.recordEvent(z_,{version:"1.0.0"})}adoptSession(e){this.session={sessionId:e,record:this.session.record,eventCount:0},this.session.page=this.pageManager.getPage(),this.sessionExpiry=new Date(new Date().getTime()+this.config.sessionLengthSeconds*1e3),this.storeSessionAsCookie(),be.info(`Adopted session: ${e}`)}adoptUser(e){this.userId=e,this.userExpiry=new Date,this.userExpiry.setDate(this.userExpiry.getDate()+this.config.userIdRetentionDays),this.useCookies()&&this.config.userIdRetentionDays>0&&this.createOrRenewUserCookie(this.userId,this.userExpiry),be.info(`Adopted user: ${e}`)}renewSession(){this.sessionExpiry=new Date(new Date().getTime()+this.config.sessionLengthSeconds*1e3),this.session.page=this.pageManager.getPage(),this.storeSessionAsCookie()}collectAttributes(){var e;const n=Aye();this.attributes={browserLanguage:navigator.language,browserName:n?.browserName,browserVersion:n?.browserVersion,osName:n?.osName,osVersion:n?.osVersion,deviceType:(e=n?.deviceType)!==null&&e!==void 0?e:Tye,platformType:Rye,domain:window.location.hostname,"aws:releaseId":this.config.releaseId},n||(this.attributes["aws:userAgent"]=navigator.userAgent)}useCookies(){return navigator.cookieEnabled&&this.config.allowCookies}sample(){return Math.random()<this.config.sessionSampleRate}}class Oye{constructor(e,n){this.config=e,this.record=n,this.page=void 0,this.resumed=!1,this.recordInteraction=!1}getPage(){return this.page}getAttributes(){return this.attributes}resumeSession(e){this.recordInteraction=!0,e&&(this.page=e,this.resumed=!0)}recordPageView(e){let n;if(typeof e=="string"?n=e:n=e.pageId,be.debug(`recordPageView called with pageId: ${n}`),this.useCookies()&&(this.recordInteraction=!0),!this.page)this.createLandingPage(n),be.info(`Landing page created: ${n}`);else if(this.page.pageId!==n)this.createNextPage(this.page,n),be.debug(`Navigation to new page: ${n}`);else if(this.resumed){be.info(`Resumed session for page: ${n}`),this.collectAttributes(this.page,typeof e=="object"?e:void 0);return}else{be.debug(`No page change detected for: ${n}`);return}this.collectAttributes(this.page,typeof e=="object"?e:void 0),this.recordPageViewEvent(this.page)}createNextPage(e,n){const r=Date.now();be.debug(`Creating next page ${n}, interaction: ${e.interaction+1}`),this.timeOnParentPage=r-e.start,this.resumed=!1,this.page={pageId:n,parentPageId:e.pageId,interaction:e.interaction+1,referrer:document.referrer,referrerDomain:this.getDomainFromReferrer(),start:r}}createLandingPage(e){this.page={pageId:e,interaction:0,referrer:document.referrer,referrerDomain:this.getDomainFromReferrer(),start:Date.now()}}collectAttributes(e,n){var r;this.attributes={title:!((r=n?.pageAttributes)===null||r===void 0)&&r.title?n.pageAttributes.title:document.title,pageId:e.pageId},this.recordInteraction&&(this.attributes.interaction=e.interaction,e.parentPageId!==void 0&&(this.attributes.parentPageId=e.parentPageId)),n?.pageTags&&(this.attributes.pageTags=n.pageTags),n?.pageAttributes&&(this.attributes=Object.assign(Object.assign({},n.pageAttributes),this.attributes))}createPageViewEvent(e){const n={version:"1.0.0",pageId:e.pageId};return this.recordInteraction&&(n.interaction=e.interaction,n.pageInteractionId=e.pageId+"-"+e.interaction,e.parentPageId!==void 0&&(n.parentPageInteractionId=e.parentPageId+"-"+(e.interaction-1),n.timeOnParentPage=this.timeOnParentPage),n.referrer=document.referrer,n.referrerDomain=this.getDomainFromReferrer()),n}recordPageViewEvent(e){this.record(wye,this.createPageViewEvent(e))}useCookies(){return navigator.cookieEnabled&&this.config.allowCookies}getDomainFromReferrer(){try{return new URL(document.referrer).hostname}catch{return document.referrer==="localhost"?document.referrer:""}}}var jh;(function(t){t.EVENT="event"})(jh||(jh={}));class zz{constructor(){this.subscribers=new Map}subscribe(e,n){var r;const s=(r=this.subscribers.get(e))!==null&&r!==void 0?r:[];s.length||this.subscribers.set(e,s),s.push(n)}unsubscribe(e,n){const r=this.subscribers.get(e);if(r){for(let s=0;s<r.length;s++)if(r[s]===n)return r.splice(s,1),!0}return!1}dispatch(e,n){const r=this.subscribers.get(e);if(r)for(const s of r)s(n)}}const Nye="3.1.0",Mye=new Set(["pageId","parentPageId","interaction","pageTags","title"]),dx=(t,e)=>{if(!t)return{};const n={};for(const[r,s]of Object.entries(t)){if(r.startsWith("aws:")){be.warn(`Dropping ${e} metadata key "${r}": "aws:" namespace is reserved.`);continue}if((e==="event"||e==="hook")&&Mye.has(r)){be.warn(`Dropping ${e} metadata key "${r}": owned by page state.`);continue}const o=typeof s;if(o!=="string"&&o!=="number"&&o!=="boolean"){be.warn(`Dropping ${e} metadata key "${r}": value must be string|number|boolean.`);continue}n[r]=s}return n};class Pye{constructor(e,n,r=new zz){this.eventBus=r,this.events=[],this.candidates=new Map,this.droppedEvent=0,this.sessionLimitExceeded=0,this.recordPageView=s=>{this.isCurrentUrlAllowed()&&this.pageManager.recordPageView(s)},this.recordEvent=(s,o,a)=>{this.enabled&&this.isCurrentUrlAllowed()&&(s!==z_&&this.sessionManager.getSession(),this.sessionManager.canRecord()?(this.sessionManager.incrementSessionEventCount(),this.addRecordToCache(s,o,a)):this.sessionLimitExceeded++)},this.recordCandidate=(s,o,a)=>{const u=this.sessionManager.getSession();if(!this.enabled||!this.isCurrentUrlAllowed()||!u.record)return;const[c]=this.createEvent(s,o,a);if(this.candidates.has(s)){this.candidates.set(s,c);return}this.candidates.size<this.config.candidatesCacheSize&&!this.sessionManager.isLimitExceeded()&&(this.candidates.set(s,c),this.sessionManager.incrementSessionEventCount())},this.getSession=()=>{if(this.isCurrentUrlAllowed())return this.sessionManager.getSession()},this.getSessionId=()=>this.sessionManager.getSession().sessionId,this.pinSessionId=s=>{this.sessionManager.pinSessionId(s)},this.startSession=s=>this.sessionManager.startSession(s),this.getUserId=()=>this.sessionManager.getUserId(),this.pinUserId=s=>{this.sessionManager.pinUserId(s)},this.addRecordToCache=(s,o,a)=>{if(!this.enabled)return;if(this.events.length>=this.config.eventCacheSize){this.droppedEvent+=1;return}const[u,c]=this.createEvent(s,o,a);this.eventBus.dispatch(jh.EVENT,c),this.events.push(u)},this.createEvent=(s,o,a)=>{var u;const c=(u=this.pageManager.getAttributes())!==null&&u!==void 0?u:{},f=dx(a,"event");let h={};if(this.eventMetadataHook)try{const y=Object.freeze(Object.assign({},c)),S=this.eventMetadataHook(s,o,y);S&&(h=dx(S,"hook"))}catch(y){be.warn(`eventMetadataHook threw for type "${s}"; dropping hook output for this event.`,y)}const g=Object.assign(Object.assign(Object.assign({},c),h),f),m={id:gh(),timestamp:new Date,type:s};return[Object.assign(Object.assign({},m),{details:JSON.stringify(o),metadata:JSON.stringify(g)}),Object.assign(Object.assign({},m),{details:o,metadata:g})]},this.appMonitorDetails=e,this.config=n,this.enabled=!0,this.pageManager=new Oye(n,this.recordEvent),this.sessionManager=new Iye(e,n,this.recordEvent,this.pageManager),this.installationMethod=n.client,this.applicationAttributes=Object.freeze(dx(n.applicationAttributes,"application"))}enable(){this.enabled=!0}disable(){this.enabled=!1}setPluginFlushHook(e){this.pluginFlushHook=e}isSessionSampled(){return this.sessionManager.isSampled()}hasEvents(){if(this.sessionLimitExceeded>0){const e=this.events.length+this.sessionLimitExceeded;this.sessionManager.isSampled()?be.warn(`Dropped ${this.sessionLimitExceeded} of ${e} recently observed events (${(this.sessionLimitExceeded/e*100).toFixed(2)}%) because the session limit has exceeded. Consider increasing sessionEventLimit (currently ${this.config.sessionEventLimit}) to ${e} or more to avoid data loss.`):be.warn(`Dropped ${this.sessionLimitExceeded} of ${e} recently observed events (${(this.sessionLimitExceeded/e*100).toFixed(2)}%) because current session is not sampled. Consider increasing sessionSampleRate (currently ${this.config.sessionSampleRate}) to capture more user sessions.`),this.sessionLimitExceeded=0}return this.events.length!==0}hasCandidates(){return this.candidates.size!==0}getEventBatch(e=!1){var n;if(this.droppedEvent>0){const s=this.events.length+this.droppedEvent;be.warn(`Dropped ${this.droppedEvent} of ${s} recently observed events (${(this.droppedEvent/s*100).toFixed(2)}%) due to insufficient in-memory queue. Increase eventCacheSize to ${s} (currently ${this.config.eventCacheSize}) to avoid data loss.`),this.droppedEvent=0}let r=[];if(e&&((n=this.pluginFlushHook)===null||n===void 0||n.call(this)),e&&this.hasCandidates())if(this.candidates.size<=this.config.batchLimit)r=Array.from(this.candidates.values()),this.candidates.clear();else{let s=0;for(const o of Array.from(this.candidates.keys())){if(s++>=this.config.batchLimit)break;const a=this.candidates.get(o);a&&(r.push(a),this.candidates.delete(o))}}return this.events.length&&(this.events.length<=this.config.batchLimit-r.length?(r.push(...this.events),this.events=[]):r.push(...this.events.splice(0,this.config.batchLimit-r.length))),r}getAppMonitorDetails(){return this.appMonitorDetails}getUserDetails(){return{userId:this.sessionManager.getUserId(),sessionId:this.sessionManager.getSession().sessionId}}addSessionAttributes(e){this.sessionManager.addSessionAttributes(e)}getCommonMetadata(){return Object.assign(Object.assign(Object.assign({},this.sessionManager.getAttributes()),this.applicationAttributes),{version:"1.0.0","aws:client":this.installationMethod,"aws:clientVersion":Nye})}setEventMetadataHook(e){this.eventMetadataHook=e}clearEventMetadataHook(){this.eventMetadataHook=void 0}isCurrentUrlAllowed(){const e=document.location.toString(),n=this.config.pagesToExclude.some(s=>s.test(e));return this.config.pagesToInclude.some(s=>s.test(e))&&!n}}var Tn;(function(t){t.OTHER="other",t.STYLESHEET="stylesheet",t.DOCUMENT="document",t.SCRIPT="script",t.IMAGE="image",t.FONT="font"})(Tn||(Tn={}));var li;(function(t){t.IMG="img",t.IMAGE="image",t.INPUT="input",t.IFRAME="iframe",t.FRAME="frame",t.SCRIPT="script",t.CSS="css"})(li||(li={}));const a4=t=>[t.startTime,t.duration].join("#"),kye=[{name:Tn.STYLESHEET,list:["css","less"]},{name:Tn.DOCUMENT,list:["htm","html","ts","doc","docx","pdf","xls","xlsx"]},{name:Tn.SCRIPT,list:["js"]},{name:Tn.IMAGE,list:["ai","bmp","gif","ico","jpeg","jpg","png","ps","psd","svg","tif","tiff"]},{name:Tn.FONT,list:["fnt","fon","otf","ttf","woff"]}],l4=(t,e)=>{let n=Tn.OTHER;if(t){const r=t.substring(t.lastIndexOf("/")+1),s=r.substring(r.lastIndexOf(".")+1).split(/[?#]/)[0];kye.forEach(o=>{o.list.indexOf(s)>-1&&(n=o.name)})}if(e&&n===Tn.OTHER)switch(e){case li.IMAGE:case li.IMG:case li.INPUT:n=Tn.IMAGE;break;case li.IFRAME:case li.FRAME:n=Tn.DOCUMENT;break;case li.SCRIPT:n=Tn.SCRIPT;break;case li.CSS:n=Tn.STYLESHEET;break}return n},Dye=()=>PerformanceObserver.supportedEntryTypes.includes("largest-contentful-paint"),Lye=/\/appmonitors\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/,Uye=(t,e)=>{try{return new URL(t).hostname===e&&Lye.test(t)}catch{return!1}},jz="dom-event",Fye={interactionId:()=>"",enableMutationObserver:!1,events:[]};class RR extends Ns{constructor(e){super(jz),this.enabled=!1,this.eventListenerMap=new Map,this.config=Object.assign(Object.assign({},Fye),e)}static getElementInfo(e){const n={name:"UNKNOWN"};return e.target instanceof Node&&(n.name=e.target.nodeName),e.target instanceof Element&&e.target.id&&(n.id=e.target.id),n}enable(){if(document.readyState!=="complete"){window.addEventListener("load",()=>this.enable());return}this.enabled||(this.addListeners(),this.config.enableMutationObserver&&this.observeDOMMutation(),this.enabled=!0)}disable(){this.enabled&&(this.removeListeners(),this.observer&&this.observer.disconnect(),this.enabled=!1)}update(e){e.forEach(n=>{this.addEventHandler(n),this.config.events.push(n)})}onload(){this.enable()}removeListeners(){this.config.events.forEach(e=>this.removeEventHandler(e))}addListeners(){this.config.events.forEach(e=>this.addEventHandler(e))}getEventListener(e){return n=>{var r;const s=RR.getElementInfo(n),o=this.config.interactionId(n),a=Object.assign(Object.assign(Object.assign({version:"1.1.0",event:n.type,element:s.name},s.id?{elementId:s.id}:{}),o?{interactionId:o}:{}),e?{cssLocator:e}:{});!((r=this.context)===null||r===void 0)&&r.record&&this.context.record(Eye,a)}}addEventHandler(e){const n=e.event,r=this.getEventListener(e.cssLocator),s=[],o=this.eventListenerMap.has(e)?this.eventListenerMap.get(e):[];if(e.cssLocator)document.querySelectorAll(e.cssLocator).forEach(u=>{s.push(u)});else if(e.elementId){const a=document.getElementById(e.elementId);a&&s.push(a)}else e.element&&s.push(e.element);s.forEach(a=>{a.addEventListener(n,r),o.push({element:a,eventListener:r})}),this.eventListenerMap.set(e,o)}removeEventHandler(e){const n=this.eventListenerMap.get(e);n&&(n.forEach(r=>{const s=r.element,o=r.eventListener;s.removeEventListener(e.event,o)}),this.eventListenerMap.delete(e))}observeDOMMutation(){this.observer=new MutationObserver(()=>{this.removeListeners(),this.addListeners()}),this.observer.observe(document,{childList:!0,subtree:!0})}}const zye=t=>{const e=typeof t;return(e==="object"||e==="function")&&!!t},jye=t=>{const e={version:"1.0.0",type:"undefined",message:"undefined"};return t.type!==void 0&&(e.type=t.type),t.message!==void 0&&(e.message=t.message),t.filename!==void 0&&(e.filename=t.filename),t.lineno!==void 0&&(e.lineno=t.lineno),t.colno!==void 0&&(e.colno=t.colno),e},Bye=(t,e)=>{t.type!=="unhandledrejection"&&(t.type=e.toString()),t.message=e.toString()},Hye=(t,e,n)=>{e.name&&(t.type=e.name),e.message&&(t.message=e.message),e.fileName&&(t.filename=e.fileName),e.lineNumber&&(t.lineno=e.lineNumber),e.columnNumber&&(t.colno=e.columnNumber),n&&e.stack&&(t.stack=e.stack.length>n?e.stack.substring(0,n)+"...":e.stack)},Bz=t=>t!==Object(t)&&t!==void 0&&t!==null,IR=(t,e)=>{const n=jye(t),r=t.error;return zye(r)?Hye(n,r,e):Bz(r)&&Bye(n,r),n},Hz="js-error",$ye={stackTraceLength:1e3,ignore:()=>!1};class qye extends Ns{constructor(e){super(Hz),this.eventHandler=n=>{this.config.ignore(n)||this.recordJsErrorEvent(n)},this.promiseRejectEventHandler=n=>{this.config.ignore(n)||this.recordJsErrorEvent({type:n.type,error:n.reason})},this.config=Object.assign(Object.assign({},$ye),e)}enable(){this.enabled||(this.addEventHandler(),this.enabled=!0)}disable(){this.enabled&&(this.removeEventHandler(),this.enabled=!1)}record(e){e instanceof ErrorEvent?this.recordJsErrorEvent(e):this.recordJsErrorEvent({type:"error",error:e})}onload(){this.addEventHandler()}recordJsErrorEvent(e){var n;(n=this.context)===null||n===void 0||n.record(Cye,IR(e,this.config.stackTraceLength))}addEventHandler(){window.addEventListener("error",this.eventHandler),window.addEventListener("unhandledrejection",this.promiseRejectEventHandler)}removeEventHandler(){window.removeEventListener("error",this.eventHandler),window.removeEventListener("unhandledrejection",this.promiseRejectEventHandler)}}const Wye=t=>t.entryType==="resource"&&(!/^https?:/.test(t.name)||/^(fetch|xmlhttprequest)$/.test(t.initiatorType)),OR={eventLimit:10,ignore:Wye,recordAllTypes:[Tn.DOCUMENT,Tn.SCRIPT,Tn.STYLESHEET,Tn.FONT],sampleTypes:[Tn.IMAGE,Tn.OTHER],reportAllLCP:!1,reportAllCLS:!1,reportAllINP:!1},Vye="navigation",cc="navigation",fx="load";class Gye extends Ns{constructor(e){super(Vye),this.eventListener=()=>{performance.getEntriesByType(cc).length===0?this.performanceNavigationEventHandlerTimingLevel1():new PerformanceObserver(r=>{r.getEntries().filter(s=>s.entryType===cc).filter(s=>!this.config.ignore(s)).forEach(s=>{this.performanceNavigationEventHandlerTimingLevel2(s)})}).observe({entryTypes:[cc]})},this.performanceNavigationEventHandlerTimingLevel1=()=>{setTimeout(()=>{var r;const s=performance.timing,o=s.navigationStart,a={version:"1.0.0",initiatorType:"navigation",startTime:0,unloadEventStart:s.unloadEventStart>0?s.unloadEventStart-o:0,promptForUnload:s.unloadEventEnd-s.unloadEventStart,redirectStart:s.redirectStart>0?s.redirectStart-o:0,redirectTime:s.redirectEnd-s.redirectStart,fetchStart:s.fetchStart>0?s.fetchStart-o:0,domainLookupStart:s.domainLookupStart>0?s.domainLookupStart-o:0,dns:s.domainLookupEnd-s.domainLookupStart,connectStart:s.connectStart>0?s.connectStart-o:0,connect:s.connectEnd-s.connectStart,secureConnectionStart:s.secureConnectionStart>0?s.secureConnectionStart-o:0,tlsTime:s.secureConnectionStart>0?s.connectEnd-s.secureConnectionStart:0,requestStart:s.requestStart>0?s.requestStart-o:0,timeToFirstByte:s.responseStart-s.requestStart,responseStart:s.responseStart>0?s.responseStart-o:0,responseTime:s.responseStart>0?s.responseEnd-s.responseStart:0,domInteractive:s.domInteractive>0?s.domInteractive-o:0,domContentLoadedEventStart:s.domContentLoadedEventStart>0?s.domContentLoadedEventStart-o:0,domContentLoaded:s.domContentLoadedEventEnd-s.domContentLoadedEventStart,domComplete:s.domComplete>0?s.domComplete-o:0,domProcessingTime:s.loadEventStart-s.responseEnd,loadEventStart:s.loadEventStart>0?s.loadEventStart-o:0,loadEventTime:s.loadEventEnd-s.loadEventStart,duration:s.loadEventEnd-s.navigationStart,navigationTimingLevel:1};!((r=this.context)===null||r===void 0)&&r.record&&this.context.record(F_,a)},0)},this.performanceNavigationEventHandlerTimingLevel2=n=>{var r;const s={version:"1.0.0",initiatorType:n.initiatorType,navigationType:n.type,startTime:n.startTime,unloadEventStart:n.unloadEventStart,promptForUnload:n.unloadEventEnd-n.unloadEventStart,redirectCount:n.redirectCount,redirectStart:n.redirectStart,redirectTime:n.redirectEnd-n.redirectStart,workerStart:n.workerStart,workerTime:n.workerStart>0?n.fetchStart-n.workerStart:0,fetchStart:n.fetchStart,domainLookupStart:n.domainLookupStart,dns:n.domainLookupEnd-n.domainLookupStart,nextHopProtocol:n.nextHopProtocol,connectStart:n.connectStart,connect:n.connectEnd-n.connectStart,secureConnectionStart:n.secureConnectionStart,tlsTime:n.secureConnectionStart>0?n.connectEnd-n.secureConnectionStart:0,requestStart:n.requestStart,timeToFirstByte:n.responseStart-n.requestStart,responseStart:n.responseStart,responseTime:n.responseStart>0?n.responseEnd-n.responseStart:0,domInteractive:n.domInteractive,domContentLoadedEventStart:n.domContentLoadedEventStart,domContentLoaded:n.domContentLoadedEventEnd-n.domContentLoadedEventStart,domComplete:n.domComplete,domProcessingTime:n.loadEventStart-n.responseEnd,loadEventStart:n.loadEventStart,loadEventTime:n.loadEventEnd-n.loadEventStart,duration:n.duration,headerSize:n.transferSize>0?n.transferSize-n.encodedBodySize:0,transferSize:n.transferSize,compressionRatio:n.encodedBodySize>0?n.decodedBodySize/n.encodedBodySize:0,navigationTimingLevel:2};!((r=this.context)===null||r===void 0)&&r.record&&this.context.record(F_,s)},this.config=Object.assign(Object.assign({},OR),e)}enable(){this.enabled||(this.enabled=!0,window.addEventListener(fx,this.eventListener))}disable(){this.enabled&&(this.enabled=!1,this.eventListener&&window.removeEventListener(fx,this.eventListener))}hasTheWindowLoadEventFired(){return window.performance&&window.performance.getEntriesByType(cc).length?!!window.performance.getEntriesByType(cc)[0].loadEventEnd:!1}onload(){this.enabled&&(this.hasTheWindowLoadEventFired()?window.performance.getEntriesByType(cc).filter(e=>!this.config.ignore(e)).forEach(e=>this.performanceNavigationEventHandlerTimingLevel2(e)):window.addEventListener(fx,this.eventListener))}}var hx,u4;function Kye(){if(u4)return hx;u4=1;function t(c){return typeof c=="function"}var e=console.error.bind(console);function n(c,f,h){var g=!!c[f]&&c.propertyIsEnumerable(f);Object.defineProperty(c,f,{configurable:!0,enumerable:g,writable:!0,value:h})}function r(c){c&&c.logger&&(t(c.logger)?e=c.logger:e("new logger isn't a function, not replacing"))}function s(c,f,h){if(!c||!c[f]){e("no original function "+f+" to wrap");return}if(!h){e("no wrapper function"),e(new Error().stack);return}if(!t(c[f])||!t(h)){e("original object and wrapper must be functions");return}var g=c[f],m=h(g,f);return n(m,"__original",g),n(m,"__unwrap",function(){c[f]===m&&n(c,f,g)}),n(m,"__wrapped",!0),n(c,f,m),m}function o(c,f,h){if(c)Array.isArray(c)||(c=[c]);else{e("must provide one or more modules to patch"),e(new Error().stack);return}if(!(f&&Array.isArray(f))){e("must provide one or more functions to wrap on modules");return}c.forEach(function(g){f.forEach(function(m){s(g,m,h)})})}function a(c,f){if(!c||!c[f]){e("no function to unwrap."),e(new Error().stack);return}if(!c[f].__unwrap)e("no original to unwrap to -- has "+f+" already been unwrapped?");else return c[f].__unwrap()}function u(c,f){if(c)Array.isArray(c)||(c=[c]);else{e("must provide one or more modules to patch"),e(new Error().stack);return}if(!(f&&Array.isArray(f))){e("must provide one or more functions to unwrap on modules");return}c.forEach(function(h){f.forEach(function(g){a(h,g)})})}return r.wrap=s,r.massWrap=o,r.unwrap=a,r.massUnwrap=u,hx=r,hx}var Yv=Kye();const Yye=Va(Yv),c4=m6({__proto__:null,default:Yye},[Yv]);class NR extends Ns{constructor(){super(...arguments),this.enable=this.patch.bind(this,!0),this.disable=this.patch.bind(this,!1),this.enabled=!1}patchAll(){const e=Yv.wrap.bind(c4);for(const n of this.patches)e(n.nodule,n.name,n.wrapper())}unpatchAll(){const e=Yv.unwrap.bind(c4);for(const n of this.patches)e(n.nodule,n.name)}patch(e=!0){this.enabled!==e&&(this.enabled=e,e?this.patchAll():this.unpatchAll())}}const Zye="page-view";class Xye extends NR{constructor(){super(Zye),this.pushState=()=>{const e=this;return n=>function(r,s,o){const a=n.apply(this,arguments);return e.recordPageView(),a}},this.replaceState=()=>{const e=this;return n=>function(r,s,o){const a=n.apply(this,arguments);return e.recordPageView(),a}},this.popstateListener=e=>{this.recordPageView()},this.recordPageView=()=>{this.context.recordPageView(this.createIdForCurrentPage())},this.enable()}onload(){this.addListener(),this.recordPageView()}get patches(){return[{nodule:History.prototype,name:"pushState",wrapper:this.pushState},{nodule:History.prototype,name:"replaceState",wrapper:this.replaceState}]}addListener(){window.addEventListener("popstate",this.popstateListener)}createIdForCurrentPage(){const e=window.location.pathname,n=window.location.hash;switch(this.context.config.pageIdFormat){case mh.PathAndHash:return e&&n?e+n:e||n||"";case mh.Hash:return n||"";case mh.Path:default:return e||""}}}const Qye="resource",px="resource";class Jye extends Ns{constructor(e){super(Qye),this.performanceEntryHandler=n=>{this.recordPerformanceEntries(n.getEntries())},this.recordPerformanceEntries=n=>{n.forEach(r=>{if(r.entryType!==px||this.config.ignore(r))return;const{name:s,initiatorType:o}=r,a=l4(s,o);this.config.recordAllTypes.includes(a)?this.recordResourceEvent(r):this.config.sampleTypes.includes(a)&&this.eventCount<this.config.eventLimit&&(this.recordResourceEvent(r),this.eventCount++)})},this.recordResourceEvent=({name:n,startTime:r,initiatorType:s,duration:o,transferSize:a})=>{var u;if(!Uye(n,this.context.config.endpointUrl.hostname)&&!((u=this.context)===null||u===void 0)&&u.record){const c={version:"1.0.0",initiatorType:s,startTime:r,duration:o,fileType:l4(n,s),transferSize:a};this.context.config.recordResourceUrl&&(c.targetUrl=n),this.context.record(Fz,c)}},this.config=Object.assign(Object.assign({},OR),e),this.eventCount=0,this.resourceObserver=new PerformanceObserver(this.performanceEntryHandler)}enable(){this.enabled||(this.enabled=!0,this.resourceObserver.observe({type:px,buffered:!0}))}disable(){this.enabled&&(this.enabled=!1,this.resourceObserver.disconnect())}onload(){this.resourceObserver.observe({type:px,buffered:!0})}}var j_,d4,_b=function(){var t=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(t&&t.responseStart>0&&t.responseStart<performance.now())return t},MR=function(t){if(document.readyState==="loading")return"loading";var e=_b();if(e){if(t<e.domInteractive)return"loading";if(e.domContentLoadedEventStart===0||t<e.domContentLoadedEventStart)return"dom-interactive";if(e.domComplete===0||t<e.domComplete)return"dom-content-loaded"}return"complete"},ebe=function(t){var e=t.nodeName;return t.nodeType===1?e.toLowerCase():e.toUpperCase().replace(/^#/,"")},Ab=function(t,e){var n="";try{for(;t&&t.nodeType!==9;){var r=t,s=r.id?"#"+r.id:ebe(r)+(r.classList&&r.classList.value&&r.classList.value.trim()&&r.classList.value.trim().length?"."+r.classList.value.trim().replace(/\s+/g,"."):"");if(n.length+s.length>(e||100)-1)return n||s;if(n=n?s+">"+n:s,r.id)break;t=r.parentNode}}catch{}return n},$z=-1,tbe=function(){return $z},Sd=function(t){addEventListener("pageshow",(function(e){e.persisted&&($z=e.timeStamp,t(e))}),!0)},PR=function(){var t=_b();return t&&t.activationStart||0},Oo=function(t,e){var n=_b(),r="navigate";return tbe()>=0?r="back-forward-cache":n&&(document.prerendering||PR()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:t,value:e===void 0?-1:e,rating:"good",delta:0,entries:[],id:"v4-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},hu=function(t,e,n){try{if(PerformanceObserver.supportedEntryTypes.includes(t)){var r=new PerformanceObserver((function(s){Promise.resolve().then((function(){e(s.getEntries())}))}));return r.observe(Object.assign({type:t,buffered:!0},n||{})),r}}catch{}},No=function(t,e,n,r){var s,o;return function(a){e.value>=0&&(a||r)&&((o=e.value-(s||0))||s===void 0)&&(s=e.value,e.delta=o,e.rating=(function(u,c){return u>c[1]?"poor":u>c[0]?"needs-improvement":"good"})(e.value,n),t(e))}},kR=function(t){requestAnimationFrame((function(){return requestAnimationFrame((function(){return t()}))}))},hp=function(t){document.addEventListener("visibilitychange",(function(){document.visibilityState==="hidden"&&t()}))},Tb=function(t){var e=!1;return function(){e||(t(),e=!0)}},Oc=-1,f4=function(){return document.visibilityState!=="hidden"||document.prerendering?1/0:0},Zv=function(t){document.visibilityState==="hidden"&&Oc>-1&&(Oc=t.type==="visibilitychange"?t.timeStamp:0,nbe())},h4=function(){addEventListener("visibilitychange",Zv,!0),addEventListener("prerenderingchange",Zv,!0)},nbe=function(){removeEventListener("visibilitychange",Zv,!0),removeEventListener("prerenderingchange",Zv,!0)},DR=function(){return Oc<0&&(Oc=f4(),h4(),Sd((function(){setTimeout((function(){Oc=f4(),h4()}),0)}))),{get firstHiddenTime(){return Oc}}},Rb=function(t){document.prerendering?addEventListener("prerenderingchange",(function(){return t()}),!0):t()},p4=[1800,3e3],rbe=function(t,e){e=e||{},Rb((function(){var n,r=DR(),s=Oo("FCP"),o=hu("paint",(function(a){a.forEach((function(u){u.name==="first-contentful-paint"&&(o.disconnect(),u.startTime<r.firstHiddenTime&&(s.value=Math.max(u.startTime-PR(),0),s.entries.push(u),n(!0)))}))}));o&&(n=No(t,s,p4,e.reportAllChanges),Sd((function(a){s=Oo("FCP"),n=No(t,s,p4,e.reportAllChanges),kR((function(){s.value=performance.now()-a.timeStamp,n(!0)}))})))}))},g4=[.1,.25],sbe=function(t,e){(function(n,r){r=r||{},rbe(Tb((function(){var s,o=Oo("CLS",0),a=0,u=[],c=function(h){h.forEach((function(g){if(!g.hadRecentInput){var m=u[0],y=u[u.length-1];a&&g.startTime-y.startTime<1e3&&g.startTime-m.startTime<5e3?(a+=g.value,u.push(g)):(a=g.value,u=[g])}})),a>o.value&&(o.value=a,o.entries=u,s())},f=hu("layout-shift",c);f&&(s=No(n,o,g4,r.reportAllChanges),hp((function(){c(f.takeRecords()),s(!0)})),Sd((function(){a=0,o=Oo("CLS",0),s=No(n,o,g4,r.reportAllChanges),kR((function(){return s()}))})),setTimeout(s,0))})))})((function(n){var r=(function(s){var o,a={};if(s.entries.length){var u=s.entries.reduce((function(f,h){return f&&f.value>h.value?f:h}));if(u&&u.sources&&u.sources.length){var c=(o=u.sources).find((function(f){return f.node&&f.node.nodeType===1}))||o[0];c&&(a={largestShiftTarget:Ab(c.node),largestShiftTime:u.startTime,largestShiftValue:u.value,largestShiftSource:c,largestShiftEntry:u,loadState:MR(u.startTime)})}}return Object.assign(s,{attribution:a})})(n);t(r)}),e)},qz=0,gx=1/0,vm=0,obe=function(t){t.forEach((function(e){e.interactionId&&(gx=Math.min(gx,e.interactionId),vm=Math.max(vm,e.interactionId),qz=vm?(vm-gx)/7+1:0)}))},Wz=function(){return j_?qz:performance.interactionCount||0},ibe=function(){"interactionCount"in performance||j_||(j_=hu("event",obe,{type:"event",buffered:!0,durationThreshold:0}))},Vs=[],vh=new Map,Vz=0,abe=function(){var t=Math.min(Vs.length-1,Math.floor((Wz()-Vz)/50));return Vs[t]},Gz=[],lbe=function(t){if(Gz.forEach((function(s){return s(t)})),t.interactionId||t.entryType==="first-input"){var e=Vs[Vs.length-1],n=vh.get(t.interactionId);if(n||Vs.length<10||t.duration>e.latency){if(n)t.duration>n.latency?(n.entries=[t],n.latency=t.duration):t.duration===n.latency&&t.startTime===n.entries[0].startTime&&n.entries.push(t);else{var r={id:t.interactionId,latency:t.duration,entries:[t]};vh.set(r.id,r),Vs.push(r)}Vs.sort((function(s,o){return o.latency-s.latency})),Vs.length>10&&Vs.splice(10).forEach((function(s){return vh.delete(s.id)}))}}},LR=function(t){var e=self.requestIdleCallback||self.setTimeout,n=-1;return t=Tb(t),document.visibilityState==="hidden"?t():(n=e(t),hp(t)),n},m4=[200,500],ube=function(t,e){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(e=e||{},Rb((function(){var n;ibe();var r,s=Oo("INP"),o=function(u){LR((function(){u.forEach(lbe);var c=abe();c&&c.latency!==s.value&&(s.value=c.latency,s.entries=c.entries,r())}))},a=hu("event",o,{durationThreshold:(n=e.durationThreshold)!==null&&n!==void 0?n:40});r=No(t,s,m4,e.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),hp((function(){o(a.takeRecords()),r(!0)})),Sd((function(){Vz=Wz(),Vs.length=0,vh.clear(),s=Oo("INP"),r=No(t,s,m4,e.reportAllChanges)})))})))},zc=[],_a=[],B_=0,UR=new WeakMap,jc=new Map,H_=-1,cbe=function(t){zc=zc.concat(t),Kz()},Kz=function(){H_<0&&(H_=LR(dbe))},dbe=function(){jc.size>10&&jc.forEach((function(a,u){vh.has(u)||jc.delete(u)}));var t=Vs.map((function(a){return UR.get(a.entries[0])})),e=_a.length-50;_a=_a.filter((function(a,u){return u>=e||t.includes(a)}));for(var n=new Set,r=0;r<_a.length;r++){var s=_a[r];Zz(s.startTime,s.processingEnd).forEach((function(a){n.add(a)}))}var o=zc.length-1-50;zc=zc.filter((function(a,u){return a.startTime>B_&&u>o||n.has(a)})),H_=-1};Gz.push((function(t){t.interactionId&&t.target&&!jc.has(t.interactionId)&&jc.set(t.interactionId,t.target)}),(function(t){var e,n=t.startTime+t.duration;B_=Math.max(B_,t.processingEnd);for(var r=_a.length-1;r>=0;r--){var s=_a[r];if(Math.abs(n-s.renderTime)<=8){(e=s).startTime=Math.min(t.startTime,e.startTime),e.processingStart=Math.min(t.processingStart,e.processingStart),e.processingEnd=Math.max(t.processingEnd,e.processingEnd),e.entries.push(t);break}}e||(e={startTime:t.startTime,processingStart:t.processingStart,processingEnd:t.processingEnd,renderTime:n,entries:[t]},_a.push(e)),(t.interactionId||t.entryType==="first-input")&&UR.set(t,e),Kz()}));var Aa,yh,Yz,Xv,Zz=function(t,e){for(var n,r=[],s=0;n=zc[s];s++)if(!(n.startTime+n.duration<t)){if(n.startTime>e)break;r.push(n)}return r},fbe=function(t,e){d4||(d4=hu("long-animation-frame",cbe)),ube((function(n){var r=(function(s){var o=s.entries[0],a=UR.get(o),u=o.processingStart,c=a.processingEnd,f=a.entries.sort((function(C,w){return C.processingStart-w.processingStart})),h=Zz(o.startTime,c),g=s.entries.find((function(C){return C.target})),m=g&&g.target||jc.get(o.interactionId),y=[o.startTime+o.duration,c].concat(h.map((function(C){return C.startTime+C.duration}))),S=Math.max.apply(Math,y),E={interactionTarget:Ab(m),interactionTargetElement:m,interactionType:o.name.startsWith("key")?"keyboard":"pointer",interactionTime:o.startTime,nextPaintTime:S,processedEventEntries:f,longAnimationFrameEntries:h,inputDelay:u-o.startTime,processingDuration:c-u,presentationDelay:Math.max(S-c,0),loadState:MR(o.startTime)};return Object.assign(s,{attribution:E})})(n);t(r)}),e)},v4=[2500,4e3],mx={},hbe=function(t,e){(function(n,r){r=r||{},Rb((function(){var s,o=DR(),a=Oo("LCP"),u=function(h){r.reportAllChanges||(h=h.slice(-1)),h.forEach((function(g){g.startTime<o.firstHiddenTime&&(a.value=Math.max(g.startTime-PR(),0),a.entries=[g],s())}))},c=hu("largest-contentful-paint",u);if(c){s=No(n,a,v4,r.reportAllChanges);var f=Tb((function(){mx[a.id]||(u(c.takeRecords()),c.disconnect(),mx[a.id]=!0,s(!0))}));["keydown","click"].forEach((function(h){addEventListener(h,(function(){return LR(f)}),{once:!0,capture:!0})})),hp(f),Sd((function(h){a=Oo("LCP"),s=No(n,a,v4,r.reportAllChanges),kR((function(){a.value=performance.now()-h.timeStamp,mx[a.id]=!0,s(!0)}))}))}}))})((function(n){var r=(function(s){var o={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadDuration:0,elementRenderDelay:s.value};if(s.entries.length){var a=_b();if(a){var u=a.activationStart||0,c=s.entries[s.entries.length-1],f=c.url&&performance.getEntriesByType("resource").filter((function(S){return S.name===c.url}))[0],h=Math.max(0,a.responseStart-u),g=Math.max(h,f?(f.requestStart||f.startTime)-u:0),m=Math.max(g,f?f.responseEnd-u:0),y=Math.max(m,c.startTime-u);o={element:Ab(c.element),timeToFirstByte:h,resourceLoadDelay:g-h,resourceLoadDuration:m-g,elementRenderDelay:y-m,navigationEntry:a,lcpEntry:c},c.url&&(o.url=c.url),f&&(o.lcpResourceEntry=f)}}return Object.assign(s,{attribution:o})})(n);t(r)}),e)},ih={passive:!0,capture:!0},pbe=new Date,y4=function(t,e){Aa||(Aa=e,yh=t,Yz=new Date,Qz(removeEventListener),Xz())},Xz=function(){if(yh>=0&&yh<Yz-pbe){var t={entryType:"first-input",name:Aa.type,target:Aa.target,cancelable:Aa.cancelable,startTime:Aa.timeStamp,processingStart:Aa.timeStamp+yh};Xv.forEach((function(e){e(t)})),Xv=[]}},gbe=function(t){if(t.cancelable){var e=(t.timeStamp>1e12?new Date:performance.now())-t.timeStamp;t.type=="pointerdown"?(function(n,r){var s=function(){y4(n,r),a()},o=function(){a()},a=function(){removeEventListener("pointerup",s,ih),removeEventListener("pointercancel",o,ih)};addEventListener("pointerup",s,ih),addEventListener("pointercancel",o,ih)})(e,t):y4(e,t)}},Qz=function(t){["mousedown","keydown","touchstart","pointerdown"].forEach((function(e){return t(e,gbe,ih)}))},b4=[100,300],mbe=function(t,e){e=e||{},Rb((function(){var n,r=DR(),s=Oo("FID"),o=function(c){c.startTime<r.firstHiddenTime&&(s.value=c.processingStart-c.startTime,s.entries.push(c),n(!0))},a=function(c){c.forEach(o)},u=hu("first-input",a);n=No(t,s,b4,e.reportAllChanges),u&&(hp(Tb((function(){a(u.takeRecords()),u.disconnect()}))),Sd((function(){var c;s=Oo("FID"),n=No(t,s,b4,e.reportAllChanges),Xv=[],yh=-1,Aa=null,Qz(addEventListener),c=o,Xv.push(c),Xz()})))}))},vbe=function(t,e){mbe((function(n){var r=(function(s){var o=s.entries[0],a={eventTarget:Ab(o.target),eventType:o.name,eventTime:o.startTime,eventEntry:o,loadState:MR(o.startTime)};return Object.assign(s,{attribution:a})})(n);t(r)}),e)};const ybe="web-vitals";class bbe extends Ns{constructor(e){super(ybe),this.resourceEventIds=new Map,this.cacheLCPCandidates=Dye(),this.handleEvent=n=>{switch(n.type){case Fz:const r=n.details;this.cacheLCPCandidates&&r.fileType===Tn.IMAGE&&this.resourceEventIds.set(a4(n.details),n.id);break;case F_:this.navigationEventId=n.id;break}},this.config=Object.assign(Object.assign({},OR),e)}enable(){}disable(){}onload(){this.context.eventBus.subscribe(jh.EVENT,this.handleEvent),hbe(e=>this.handleLCP(e),{reportAllChanges:this.config.reportAllLCP}),vbe(e=>this.handleFID(e)),sbe(e=>this.handleCLS(e),{reportAllChanges:!0}),fbe(e=>this.handleINP(e),{reportAllChanges:!0})}handleLCP(e){var n,r;const s=e.attribution,o={element:s?.element,url:s?.url,timeToFirstByte:s?.timeToFirstByte,resourceLoadDelay:s?.resourceLoadDelay,resourceLoadTime:s?.resourceLoadDuration,elementRenderDelay:s?.elementRenderDelay};if(s?.lcpResourceEntry){const a=a4(s?.lcpResourceEntry);o.lcpResourceEntry=this.resourceEventIds.get(a)}this.navigationEventId&&(o.navigationEntry=this.navigationEventId),(n=this.context)===null||n===void 0||n.record(vye,{version:"1.0.0",value:e.value,attribution:o}),(r=this.context)===null||r===void 0||r.eventBus.unsubscribe(jh.EVENT,this.handleEvent),this.resourceEventIds.clear(),this.navigationEventId=void 0}handleCLS(e){const n=e.attribution,{record:r,recordCandidate:s}=this.context;(this.config.reportAllCLS?r:s)(bye,{version:"1.0.0",value:e.value,attribution:{largestShiftTarget:n?.largestShiftTarget,largestShiftValue:n?.largestShiftValue,largestShiftTime:n?.largestShiftTime,loadState:n?.loadState}})}handleFID(e){var n;const r=e.attribution;(n=this.context)===null||n===void 0||n.record(yye,{version:"1.0.0",value:e.value,attribution:{eventTarget:r?.eventTarget,eventType:r?.eventType,eventTime:r?.eventTime,loadState:r?.loadState}})}handleINP(e){const n=e.attribution,{record:r,recordCandidate:s}=this.context;(this.config.reportAllINP?r:s)(Sye,{version:"1.0.0",value:e.value,attribution:{interactionTarget:n?.interactionTarget,interactionTime:n?.interactionTime,nextPaintTime:n?.nextPaintTime,interactionType:n?.interactionType,inputDelay:n?.inputDelay,processingDuration:n?.processingDuration,presentationDelay:n?.presentationDelay,loadState:n?.loadState}})}}const Sbe="fetch";class Ebe extends NR{constructor(e){super(Sbe),this.isTracingEnabled=()=>this.context.config.enableXRay,this.isSessionRecorded=()=>{var n;return((n=this.context.getSession())===null||n===void 0?void 0:n.record)||!1},this.beginTrace=(n,r,s)=>{const o=Ic(),a=dve(n,r,!0),u=_z(this.config.logicalServiceName,o,this.context.config.enableW3CTraceId),c=Az(Tz(n),o,a);return u.subsegments.push(c),this.isTraceIdHeaderEnabled(n)&&this.addXRayTraceIdHeader(n,r,s,u),u},this.addXRayTraceIdHeader=(n,r,s,o)=>{if(n.headers)return hve(n.headers,o.trace_id,o.subsegments[0].id,this.context.config.enableW3CTraceId);r||(r={},[].push.call(s,r)),fve(r,o.trace_id,o.subsegments[0].id,this.context.config.enableW3CTraceId)},this.endTrace=(n,r,s)=>{if(n){const o=Ic();if(n.subsegments[0].end_time=o,n.end_time=o,r){n.subsegments[0].http.response={status:r.status},wR(r.status)?(n.subsegments[0].throttle=!0,n.throttle=!0):wz(r.status)?(n.subsegments[0].error=!0,n.error=!0):CR(r.status)&&(n.subsegments[0].fault=!0,n.fault=!0);const a=r.headers.get("Content-Length"),u=a?parseInt(a,10):NaN;isNaN(u)||(n.subsegments[0].http.response.content_length=u)}s&&(n.fault=!0,n.subsegments[0].fault=!0,s instanceof Object?this.appendErrorCauseFromObject(n.subsegments[0],s):Bz(s)&&this.appendErrorCauseFromPrimitive(n.subsegments[0],s.toString())),this.context.record(Uz,n)}},this.createHttpEvent=(n,r)=>{const s=n;return{version:"1.0.0",request:{url:hv(n),method:r?.method?r.method:s.method?s.method:"GET"}}},this.recordHttpEventWithResponse=(n,r)=>{(this.config.recordAllRequests||!r.ok)&&(n.response={status:r.status,statusText:r.statusText},this.context.record(Kv,n))},this.recordHttpEventWithError=(n,r)=>{n.error=IR({type:"error",error:r},this.config.stackTraceLength),this.context.record(Kv,n)},this.fetch=(n,r,s,o,a)=>{const u=this.createHttpEvent(o,a);let c;if(!xz(hv(o),this.config))return n.apply(r,s);const f=gve(o.headers,this.context.config.enableW3CTraceId);return f.traceId&&f.segmentId?(u.trace_id=f.traceId,u.segment_id=f.segmentId):this.isTracingEnabled()&&this.isSessionRecorded()&&(c=this.beginTrace(o,a,s),u.trace_id=c.trace_id,u.segment_id=c.subsegments[0].id),n.apply(r,s).then(h=>(this.endTrace(c,h,void 0),this.recordHttpEventWithResponse(u,h),h)).catch(h=>{throw this.endTrace(c,void 0,h),this.recordHttpEventWithError(u,h),h})},this.fetchWrapper=()=>{const n=this;return r=>function(s,o){return n.fetch(r,this,arguments,s,o)}},this.config=Object.assign(Object.assign({},Cz),e)}get patches(){return[{nodule:window,name:"fetch",wrapper:this.fetchWrapper}]}onload(){this.enable()}isTraceIdHeaderEnabled(e){const n=hv(e);return Ez(n,this.config.addXRayTraceIdHeader)}appendErrorCauseFromPrimitive(e,n){e.cause={exceptions:[{type:n}]}}appendErrorCauseFromObject(e,n){e.cause={exceptions:[{type:n.name,message:n.message}]}}}class Cbe extends Error{constructor(e){super(e),this.name="XMLHttpRequest error"}}const wbe="xhr";class xbe extends NR{constructor(e){super(wbe),this.addXRayTraceIdHeader=n=>Ez(n,this.config.addXRayTraceIdHeader),this.isTracingEnabled=()=>this.context.config.enableXRay,this.isSessionRecorded=()=>{var n;return((n=this.context.getSession())===null||n===void 0?void 0:n.record)||!1},this.handleXhrLoadEvent=n=>{const r=n.target,s=this.xhrMap.get(r);if(s){const o=Ic();s.trace.end_time=o,s.trace.subsegments[0].end_time=o,s.trace.subsegments[0].http.response={status:r.status},wR(r.status)?(s.trace.subsegments[0].throttle=!0,s.trace.throttle=!0):wz(r.status)?(s.trace.subsegments[0].error=!0,s.trace.error=!0):CR(r.status)&&(s.trace.subsegments[0].fault=!0,s.trace.fault=!0);const a=r.getResponseHeader("Content-Length"),u=a?parseInt(a,10):NaN;isNaN(u)||(s.trace.subsegments[0].http.response.content_length=u),this.recordTraceEvent(s.trace),this.recordHttpEventWithResponse(s,r)}},this.handleXhrErrorEvent=n=>{const r=n.target,s=this.xhrMap.get(r),o="XMLHttpRequest error",a=r.statusText?r.status.toString()+": "+r.statusText:r.status.toString();if(s){const u=Ic();s.trace.fault=!0,s.trace.end_time=u,s.trace.subsegments[0].end_time=u,s.trace.subsegments[0].fault=!0,s.trace.subsegments[0].cause={exceptions:[{type:o,message:a}]},this.recordTraceEvent(s.trace),this.recordHttpEventWithError(s,r,new Cbe(a))}},this.handleXhrAbortEvent=n=>{const r=n.target,s=this.xhrMap.get(r);s&&this.handleXhrDetailsOnError(s,r,"XMLHttpRequest abort")},this.handleXhrTimeoutEvent=n=>{const r=n.target,s=this.xhrMap.get(r);this.handleXhrDetailsOnError(s,r,"XMLHttpRequest timeout")},this.initializeTrace=n=>{const r=Ic();n.trace=_z(this.config.logicalServiceName,r,this.context.config.enableW3CTraceId),n.trace.subsegments.push(Az(Tz(n.url),r,{request:{method:n.method,url:n.url,traced:!0}}))},this.sendWrapper=()=>{const n=this;return r=>function(){const s=n.xhrMap.get(this);return s&&(this.addEventListener("load",n.handleXhrLoadEvent),this.addEventListener("error",n.handleXhrErrorEvent),this.addEventListener("abort",n.handleXhrAbortEvent),this.addEventListener("timeout",n.handleXhrTimeoutEvent),n.initializeTrace(s),!n.isSyntheticsUA&&n.isTracingEnabled()&&n.addXRayTraceIdHeader(s.url)&&n.isSessionRecorded()&&(n.context.config.enableW3CTraceId?this.setRequestHeader(wb,_R(s.trace.trace_id,s.trace.subsegments[0].id)):this.setRequestHeader(Cb,xR(s.trace.trace_id,s.trace.subsegments[0].id)))),r.apply(this,arguments)}},this.openWrapper=()=>{const n=this;return r=>function(s,o,a){return xz(o,n.config)&&n.xhrMap.set(this,{url:o,method:s,async:a}),r.apply(this,arguments)}},this.config=Object.assign(Object.assign({},Cz),e),this.xhrMap=new Map,this.isSyntheticsUA=navigator.userAgent.includes("CloudWatchSynthetics")}onload(){this.enable()}get patches(){return[{nodule:XMLHttpRequest.prototype,name:"send",wrapper:this.sendWrapper},{nodule:XMLHttpRequest.prototype,name:"open",wrapper:this.openWrapper}]}handleXhrDetailsOnError(e,n,r){if(e){const s=Ic();e.trace.end_time=s,e.trace.subsegments[0].end_time=s,e.trace.subsegments[0].error=!0,e.trace.subsegments[0].cause={exceptions:[{type:r}]},this.recordTraceEvent(e.trace),this.recordHttpEventWithError(e,n,r)}}statusOk(e){return e>=200&&e<300}recordHttpEventWithResponse(e,n){this.xhrMap.delete(n);const r={version:"1.0.0",request:{method:e.method,url:e.url},response:{status:n.status,statusText:n.statusText}};this.isTracingEnabled()&&(r.trace_id=e.trace.trace_id,r.segment_id=e.trace.subsegments[0].id),(this.config.recordAllRequests||!this.statusOk(n.status))&&this.context.record(Kv,r)}recordHttpEventWithError(e,n,r){this.xhrMap.delete(n);const s={version:"1.0.0",request:{method:e.method,url:e.url},error:IR({type:"error",error:r},this.config.stackTraceLength)};this.isTracingEnabled()&&(s.trace_id=e.trace.trace_id,s.segment_id=e.trace.subsegments[0].id),this.context.record(Kv,s)}recordTraceEvent(e){!this.isSyntheticsUA&&this.isTracingEnabled()&&this.isSessionRecorded()&&this.context.record(Uz,e)}}var Qv={},_be=Object.defineProperty,Abe=(t,e,n)=>e in t?_be(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Se=(t,e,n)=>Abe(t,typeof e!="symbol"?e+"":e,n),S4,Tbe=Object.defineProperty,Rbe=(t,e,n)=>e in t?Tbe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,E4=(t,e,n)=>Rbe(t,typeof e!="symbol"?e+"":e,n),kn=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(kn||{});const C4={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},w4={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},ym={},Ibe=()=>!!globalThis.Zone;function FR(t){if(ym[t])return ym[t];const e=globalThis[t],n=e.prototype,r=t in C4?C4[t]:void 0,s=!!(r&&r.every(u=>{var c,f;return!!((f=(c=Object.getOwnPropertyDescriptor(n,u))==null?void 0:c.get)!=null&&f.toString().includes("[native code]"))})),o=t in w4?w4[t]:void 0,a=!!(o&&o.every(u=>{var c;return typeof n[u]=="function"&&((c=n[u])==null?void 0:c.toString().includes("[native code]"))}));if(s&&a&&!Ibe())return ym[t]=e.prototype,e.prototype;try{const u=document.createElement("iframe");document.body.appendChild(u);const c=u.contentWindow;if(!c)return e.prototype;const f=c[t].prototype;return document.body.removeChild(u),f?ym[t]=f:n}catch{return n}}const vx={};function Oi(t,e,n){var r;const s=`${t}.${String(n)}`;if(vx[s])return vx[s].call(e);const o=FR(t),a=(r=Object.getOwnPropertyDescriptor(o,n))==null?void 0:r.get;return a?(vx[s]=a,a.call(e)):e[n]}const yx={};function Jz(t,e,n){const r=`${t}.${String(n)}`;if(yx[r])return yx[r].bind(e);const o=FR(t)[n];return typeof o!="function"?e[n]:(yx[r]=o,o.bind(e))}function Obe(t){return Oi("Node",t,"ownerDocument")}function Nbe(t){return Oi("Node",t,"childNodes")}function Mbe(t){return Oi("Node",t,"parentNode")}function Pbe(t){return Oi("Node",t,"parentElement")}function kbe(t){return Oi("Node",t,"textContent")}function Dbe(t,e){return Jz("Node",t,"contains")(e)}function Lbe(t){return Jz("Node",t,"getRootNode")()}function Ube(t){return!t||!("host"in t)?null:Oi("ShadowRoot",t,"host")}function Fbe(t){return t.styleSheets}function zbe(t){return!t||!("shadowRoot"in t)?null:Oi("Element",t,"shadowRoot")}function jbe(t,e){return Oi("Element",t,"querySelector")(e)}function Bbe(t,e){return Oi("Element",t,"querySelectorAll")(e)}function Hbe(){return FR("MutationObserver").constructor}function $be(t,e,n){try{if(!(e in t))return()=>{};const r=t[e],s=n(r);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=s,()=>{t[e]=r}}catch{return()=>{}}}const dr={ownerDocument:Obe,childNodes:Nbe,parentNode:Mbe,parentElement:Pbe,textContent:kbe,contains:Dbe,getRootNode:Lbe,host:Ube,styleSheets:Fbe,shadowRoot:zbe,querySelector:jbe,querySelectorAll:Bbe,mutationObserver:Hbe,patch:$be};function ej(t){return t.nodeType===t.ELEMENT_NODE}function bh(t){const e=t&&"host"in t&&"mode"in t&&dr.host(t)||null;return!!(e&&"shadowRoot"in e&&dr.shadowRoot(e)===t)}function Sh(t){return Object.prototype.toString.call(t)==="[object ShadowRoot]"}function qbe(t){return t.includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t}function Wbe(t){const{cssText:e}=t;if(e.split('"').length<3)return e;const n=["@import",`url(${JSON.stringify(t.href)})`];return t.layerName===""?n.push("layer"):t.layerName&&n.push(`layer(${t.layerName})`),t.supportsText&&n.push(`supports(${t.supportsText})`),t.media.length&&n.push(t.media.mediaText),n.join(" ")+";"}function $_(t){try{const e=t.rules||t.cssRules;if(!e)return null;let n=t.href;!n&&t.ownerNode&&(n=t.ownerNode.baseURI);const r=Array.from(e,s=>tj(s,n)).join("");return qbe(r)}catch{return null}}function tj(t,e){if(Gbe(t)){let n;try{n=$_(t.styleSheet)||Wbe(t)}catch{n=t.cssText}return t.styleSheet.href?ty(n,t.styleSheet.href):n}else{let n=t.cssText;return Kbe(t)&&t.selectorText.includes(":")&&(n=Vbe(n)),e?ty(n,e):n}}function Vbe(t){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return t.replace(e,"$1\\$2")}function Gbe(t){return"styleSheet"in t}function Kbe(t){return"selectorText"in t}class nj{constructor(){E4(this,"idNodeMap",new Map),E4(this,"nodeMetaMap",new WeakMap)}getId(e){var n;return e?((n=this.getMeta(e))==null?void 0:n.id)??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const n=this.getId(e);this.idNodeMap.delete(n),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,n){const r=n.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,n)}replace(e,n){const r=this.getNode(e);if(r){const s=this.nodeMetaMap.get(r);s&&this.nodeMetaMap.set(n,s)}this.idNodeMap.set(e,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Ybe(){return new nj}function Jv({element:t,maskInputOptions:e,tagName:n,type:r,value:s,maskInputFn:o}){let a=s||"";const u=r&&Ql(r);return(e[n.toLowerCase()]||u&&e[u])&&(o?a=o(a,t):a="*".repeat(a.length)),a}function Ql(t){return t.toLowerCase()}const x4="__rrweb_original__";function Zbe(t){const e=t.getContext("2d");if(!e)return!0;const n=50;for(let r=0;r<t.width;r+=n)for(let s=0;s<t.height;s+=n){const o=e.getImageData,a=x4 in o?o[x4]:o;if(new Uint32Array(a.call(e,r,s,Math.min(n,t.width-r),Math.min(n,t.height-s)).data.buffer).some(c=>c!==0))return!1}return!0}function ey(t){const e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?Ql(e):null}function rj(t,e){let n;try{n=new URL(t,e??window.location.href)}catch{return null}const r=/\.([0-9a-z]+)(?:$)/i,s=n.pathname.match(r);return s?.[1]??null}function Xbe(t){let e="";return t.indexOf("//")>-1?e=t.split("/").slice(0,3).join("/"):e=t.split("/")[0],e=e.split("?")[0],e}const Qbe=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Jbe=/^(?:[a-z+]+:)?\/\//i,e0e=/^www\..*/i,t0e=/^(data:)([^,]*),(.*)/i;function ty(t,e){return(t||"").replace(Qbe,(n,r,s,o,a,u)=>{const c=s||a||u,f=r||o||"";if(!c)return n;if(Jbe.test(c)||e0e.test(c))return`url(${f}${c}${f})`;if(t0e.test(c))return`url(${f}${c}${f})`;if(c[0]==="/")return`url(${f}${Xbe(e)+c}${f})`;const h=e.split("/"),g=c.split("/");h.pop();for(const m of g)m!=="."&&(m===".."?h.pop():h.push(m));return`url(${f}${h.join("/")}${f})`})}function bm(t,e=!1){return e?t.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):t.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function n0e(t,e,n=!1){const r=Array.from(e.childNodes),s=[];let o=0;if(r.length>1&&t&&typeof t=="string"){let a=bm(t,n);const u=a.length/t.length;for(let c=1;c<r.length;c++)if(r[c].textContent&&typeof r[c].textContent=="string"){const f=bm(r[c].textContent,n),h=100;let g=3;for(;g<f.length&&(f[g].match(/[a-zA-Z0-9]/)||f.indexOf(f.substring(0,g),1)!==-1);g++);for(;g<f.length;g++){let m=f.substring(0,g),y=a.split(m),S=-1;if(y.length===2)S=y[0].length;else if(y.length>2&&y[0]===""&&r[c-1].textContent!=="")S=a.indexOf(m,1);else if(y.length===1){if(m=m.substring(0,m.length-1),y=a.split(m),y.length<=1)return s.push(t),s;g=h+1}else g===f.length-1&&(S=a.indexOf(m));if(y.length>=2&&g>h){const E=r[c-1].textContent;if(E&&typeof E=="string"){const C=bm(E).length;S=a.indexOf(m,C)}S===-1&&(S=y[0].length)}if(S!==-1){let E=Math.floor(S/u);for(;E>0&&E<t.length;){if(o+=1,o>50*r.length)return s.push(t),s;const C=bm(t.substring(0,E),n);if(C.length===S){s.push(t.substring(0,E)),t=t.substring(E),a=a.substring(S);break}else C.length<S?E+=Math.max(1,Math.floor((S-C.length)/u)):E-=Math.max(1,Math.floor((C.length-S)*u))}break}}}}return s.push(t),s}function r0e(t,e){return n0e(t,e).join("/* rr_split */")}let s0e=1;const o0e=new RegExp("[^a-z0-9-_:]"),Bh=-2;function sj(){return s0e++}function i0e(t){if(t instanceof HTMLFormElement)return"form";const e=Ql(t.tagName);return o0e.test(e)?"div":e}let dc,_4;const a0e=/^[^ \t\n\r\u000c]+/,l0e=/^[, \t\n\r\u000c]+/;function u0e(t,e){if(e.trim()==="")return e;let n=0;function r(o){let a;const u=o.exec(e.substring(n));return u?(a=u[0],n+=a.length,a):""}const s=[];for(;r(l0e),!(n>=e.length);){let o=r(a0e);if(o.slice(-1)===",")o=Nc(t,o.substring(0,o.length-1)),s.push(o);else{let a="";o=Nc(t,o);let u=!1;for(;;){const c=e.charAt(n);if(c===""){s.push((o+a).trim());break}else if(u)c===")"&&(u=!1);else if(c===","){n+=1,s.push((o+a).trim());break}else c==="("&&(u=!0);a+=c,n+=1}}}return s.join(", ")}const A4=new WeakMap;function Nc(t,e){return!e||e.trim()===""?e:zR(t,e)}function c0e(t){return!!(t.tagName==="svg"||t.ownerSVGElement)}function zR(t,e){let n=A4.get(t);if(n||(n=t.createElement("a"),A4.set(t,n)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return n.setAttribute("href",e),n.href}function oj(t,e,n,r){return r&&(n==="src"||n==="href"&&!(e==="use"&&r[0]==="#")||n==="xlink:href"&&r[0]!=="#"||n==="background"&&["table","td","th"].includes(e)?Nc(t,r):n==="srcset"?u0e(t,r):n==="style"?ty(r,zR(t)):e==="object"&&n==="data"?Nc(t,r):r)}function ij(t,e,n){return["video","audio"].includes(t)&&e==="autoplay"}function d0e(t,e,n){try{if(typeof e=="string"){if(t.classList.contains(e))return!0}else for(let r=t.classList.length;r--;){const s=t.classList[r];if(e.test(s))return!0}if(n)return t.matches(n)}catch{}return!1}function ny(t,e,n){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return n?ny(dr.parentNode(t),e,n):!1;for(let r=t.classList.length;r--;){const s=t.classList[r];if(e.test(s))return!0}return n?ny(dr.parentNode(t),e,n):!1}function aj(t,e,n,r){let s;if(ej(t)){if(s=t,!dr.childNodes(s).length)return!1}else{if(dr.parentElement(t)===null)return!1;s=dr.parentElement(t)}try{if(typeof e=="string"){if(r){if(s.closest(`.${e}`))return!0}else if(s.classList.contains(e))return!0}else if(ny(s,e,r))return!0;if(n){if(r){if(s.closest(n))return!0}else if(s.matches(n))return!0}}catch{}return!1}function f0e(t,e,n){const r=t.contentWindow;if(!r)return;let s=!1,o;try{o=r.document.readyState}catch{return}if(o!=="complete"){const u=setTimeout(()=>{s||(e(),s=!0)},n);t.addEventListener("load",()=>{clearTimeout(u),s=!0,e()});return}const a="about:blank";if(r.location.href!==a||t.src===a||t.src==="")return setTimeout(e,0),t.addEventListener("load",e);t.addEventListener("load",e)}function h0e(t,e,n){let r=!1,s;try{s=t.sheet}catch{return}if(s)return;const o=setTimeout(()=>{r||(e(),r=!0)},n);t.addEventListener("load",()=>{clearTimeout(o),r=!0,e()})}function p0e(t,e){const{doc:n,mirror:r,blockClass:s,blockSelector:o,needsMask:a,inlineStylesheet:u,maskInputOptions:c={},maskTextFn:f,maskInputFn:h,dataURLOptions:g={},inlineImages:m,recordCanvas:y,keepIframeSrcFn:S,newlyAddedElement:E=!1,cssCaptured:C=!1}=e,w=g0e(n,r);switch(t.nodeType){case t.DOCUMENT_NODE:return t.compatMode!=="CSS1Compat"?{type:kn.Document,childNodes:[],compatMode:t.compatMode}:{type:kn.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:kn.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:w};case t.ELEMENT_NODE:return v0e(t,{doc:n,blockClass:s,blockSelector:o,inlineStylesheet:u,maskInputOptions:c,maskInputFn:h,dataURLOptions:g,inlineImages:m,recordCanvas:y,keepIframeSrcFn:S,newlyAddedElement:E,rootId:w});case t.TEXT_NODE:return m0e(t,{doc:n,needsMask:a,maskTextFn:f,rootId:w,cssCaptured:C});case t.CDATA_SECTION_NODE:return{type:kn.CDATA,textContent:"",rootId:w};case t.COMMENT_NODE:return{type:kn.Comment,textContent:dr.textContent(t)||"",rootId:w};default:return!1}}function g0e(t,e){if(!e.hasNode(t))return;const n=e.getId(t);return n===1?void 0:n}function m0e(t,e){const{needsMask:n,maskTextFn:r,rootId:s,cssCaptured:o}=e,a=dr.parentNode(t),u=a&&a.tagName;let c="";const f=u==="STYLE"?!0:void 0,h=u==="SCRIPT"?!0:void 0;return h?c="SCRIPT_PLACEHOLDER":o||(c=dr.textContent(t),f&&c&&(c=ty(c,zR(e.doc)))),!f&&!h&&c&&n&&(c=r?r(c,dr.parentElement(t)):c.replace(/[\S]/g,"*")),{type:kn.Text,textContent:c||"",rootId:s}}function v0e(t,e){const{doc:n,blockClass:r,blockSelector:s,inlineStylesheet:o,maskInputOptions:a={},maskInputFn:u,dataURLOptions:c={},inlineImages:f,recordCanvas:h,keepIframeSrcFn:g,newlyAddedElement:m=!1,rootId:y}=e,S=d0e(t,r,s),E=i0e(t);let C={};const w=t.attributes.length;for(let T=0;T<w;T++){const R=t.attributes[T];ij(E,R.name,R.value)||(C[R.name]=oj(n,E,Ql(R.name),R.value))}if(E==="link"&&o){const T=Array.from(n.styleSheets).find(M=>M.href===t.href);let R=null;T&&(R=$_(T)),R&&(delete C.rel,delete C.href,C._cssText=R)}if(E==="style"&&t.sheet){let T=$_(t.sheet);T&&(t.childNodes.length>1&&(T=r0e(T,t)),C._cssText=T)}if(["input","textarea","select"].includes(E)){const T=t.value,R=t.checked;C.type!=="radio"&&C.type!=="checkbox"&&C.type!=="submit"&&C.type!=="button"&&T?C.value=Jv({element:t,type:ey(t),tagName:E,value:T,maskInputOptions:a,maskInputFn:u}):R&&(C.checked=R)}if(E==="option"&&(t.selected&&!a.select?C.selected=!0:delete C.selected),E==="dialog"&&t.open&&(C.rr_open_mode=t.matches("dialog:modal")?"modal":"non-modal"),E==="canvas"&&h){if(t.__context==="2d")Zbe(t)||(C.rr_dataURL=t.toDataURL(c.type,c.quality));else if(!("__context"in t)){const T=t.toDataURL(c.type,c.quality),R=n.createElement("canvas");R.width=t.width,R.height=t.height;const M=R.toDataURL(c.type,c.quality);T!==M&&(C.rr_dataURL=T)}}if(E==="img"&&f){dc||(dc=n.createElement("canvas"),_4=dc.getContext("2d"));const T=t,R=T.currentSrc||T.getAttribute("src")||"<unknown-src>",M=T.crossOrigin,N=()=>{T.removeEventListener("load",N);try{dc.width=T.naturalWidth,dc.height=T.naturalHeight,_4.drawImage(T,0,0),C.rr_dataURL=dc.toDataURL(c.type,c.quality)}catch(O){if(T.crossOrigin!=="anonymous"){T.crossOrigin="anonymous",T.complete&&T.naturalWidth!==0?N():T.addEventListener("load",N);return}else console.warn(`Cannot inline img src=${R}! Error: ${O}`)}T.crossOrigin==="anonymous"&&(M?C.crossOrigin=M:T.removeAttribute("crossorigin"))};T.complete&&T.naturalWidth!==0?N():T.addEventListener("load",N)}if(["audio","video"].includes(E)){const T=C;T.rr_mediaState=t.paused?"paused":"played",T.rr_mediaCurrentTime=t.currentTime,T.rr_mediaPlaybackRate=t.playbackRate,T.rr_mediaMuted=t.muted,T.rr_mediaLoop=t.loop,T.rr_mediaVolume=t.volume}if(m||(t.scrollLeft&&(C.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(C.rr_scrollTop=t.scrollTop)),S){const{width:T,height:R}=t.getBoundingClientRect();C={class:C.class,rr_width:`${T}px`,rr_height:`${R}px`}}E==="iframe"&&!g(C.src)&&(t.contentDocument||(C.rr_src=C.src),delete C.src);let x;try{customElements.get(E)&&(x=!0)}catch{}return{type:kn.Element,tagName:E,attributes:C,childNodes:[],isSVG:c0e(t)||void 0,needBlock:S,rootId:y,isCustom:x}}function Vt(t){return t==null?"":t.toLowerCase()}function lj(t){return t===!0||t==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:t==="all",headMetaDescKeywords:t==="all",headTitleMutations:t==="all"}:t||{}}function y0e(t,e){if(e.comment&&t.type===kn.Comment)return!0;if(t.type===kn.Element){if(e.script&&(t.tagName==="script"||t.tagName==="link"&&(t.attributes.rel==="preload"&&t.attributes.as==="script"||t.attributes.rel==="modulepreload")||t.tagName==="link"&&t.attributes.rel==="prefetch"&&typeof t.attributes.href=="string"&&rj(t.attributes.href)==="js"))return!0;if(e.headFavicon&&(t.tagName==="link"&&t.attributes.rel==="shortcut icon"||t.tagName==="meta"&&(Vt(t.attributes.name).match(/^msapplication-tile(image|color)$/)||Vt(t.attributes.name)==="application-name"||Vt(t.attributes.rel)==="icon"||Vt(t.attributes.rel)==="apple-touch-icon"||Vt(t.attributes.rel)==="shortcut icon")))return!0;if(t.tagName==="meta"){if(e.headMetaDescKeywords&&Vt(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(Vt(t.attributes.property).match(/^(og|twitter|fb):/)||Vt(t.attributes.name).match(/^(og|twitter):/)||Vt(t.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(Vt(t.attributes.name)==="robots"||Vt(t.attributes.name)==="googlebot"||Vt(t.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&t.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(Vt(t.attributes.name)==="author"||Vt(t.attributes.name)==="generator"||Vt(t.attributes.name)==="framework"||Vt(t.attributes.name)==="publisher"||Vt(t.attributes.name)==="progid"||Vt(t.attributes.property).match(/^article:/)||Vt(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(Vt(t.attributes.name)==="google-site-verification"||Vt(t.attributes.name)==="yandex-verification"||Vt(t.attributes.name)==="csrf-token"||Vt(t.attributes.name)==="p:domain_verify"||Vt(t.attributes.name)==="verify-v1"||Vt(t.attributes.name)==="verification"||Vt(t.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Mc(t,e){const{doc:n,mirror:r,blockClass:s,blockSelector:o,maskTextClass:a,maskTextSelector:u,skipChild:c=!1,inlineStylesheet:f=!0,maskInputOptions:h={},maskTextFn:g,maskInputFn:m,slimDOMOptions:y,dataURLOptions:S={},inlineImages:E=!1,recordCanvas:C=!1,onSerialize:w,onIframeLoad:x,iframeLoadTimeout:T=5e3,onStylesheetLoad:R,stylesheetLoadTimeout:M=5e3,keepIframeSrcFn:N=()=>!1,newlyAddedElement:O=!1,cssCaptured:k=!1}=e;let{needsMask:F}=e,{preserveWhiteSpace:$=!0}=e;F||(F=aj(t,a,u,F===void 0));const D=p0e(t,{doc:n,mirror:r,blockClass:s,blockSelector:o,needsMask:F,inlineStylesheet:f,maskInputOptions:h,maskTextFn:g,maskInputFn:m,dataURLOptions:S,inlineImages:E,recordCanvas:C,keepIframeSrcFn:N,newlyAddedElement:O,cssCaptured:k});if(!D)return console.warn(t,"not serialized"),null;let z;r.hasNode(t)?z=r.getId(t):y0e(D,y)||!$&&D.type===kn.Text&&!D.textContent.replace(/^\s+|\s+$/gm,"").length?z=Bh:z=sj();const q=Object.assign(D,{id:z});if(r.add(t,q),z===Bh)return null;w&&w(t);let K=!c;if(q.type===kn.Element){K=K&&!q.needBlock,delete q.needBlock;const H=dr.shadowRoot(t);H&&Sh(H)&&(q.isShadowHost=!0)}if((q.type===kn.Document||q.type===kn.Element)&&K){y.headWhitespace&&q.type===kn.Element&&q.tagName==="head"&&($=!1);const H={doc:n,mirror:r,blockClass:s,blockSelector:o,needsMask:F,maskTextClass:a,maskTextSelector:u,skipChild:c,inlineStylesheet:f,maskInputOptions:h,maskTextFn:g,maskInputFn:m,slimDOMOptions:y,dataURLOptions:S,inlineImages:E,recordCanvas:C,preserveWhiteSpace:$,onSerialize:w,onIframeLoad:x,iframeLoadTimeout:T,onStylesheetLoad:R,stylesheetLoadTimeout:M,keepIframeSrcFn:N,cssCaptured:!1};if(!(q.type===kn.Element&&q.tagName==="textarea"&&q.attributes.value!==void 0)){q.type===kn.Element&&q.attributes._cssText!==void 0&&typeof q.attributes._cssText=="string"&&(H.cssCaptured=!0);for(const fe of Array.from(dr.childNodes(t))){const de=Mc(fe,H);de&&q.childNodes.push(de)}}let te=null;if(ej(t)&&(te=dr.shadowRoot(t)))for(const fe of Array.from(dr.childNodes(te))){const de=Mc(fe,H);de&&(Sh(te)&&(de.isShadow=!0),q.childNodes.push(de))}}const Y=dr.parentNode(t);return Y&&bh(Y)&&Sh(Y)&&(q.isShadow=!0),q.type===kn.Element&&q.tagName==="iframe"&&f0e(t,()=>{const H=t.contentDocument;if(H&&x){const te=Mc(H,{doc:H,mirror:r,blockClass:s,blockSelector:o,needsMask:F,maskTextClass:a,maskTextSelector:u,skipChild:!1,inlineStylesheet:f,maskInputOptions:h,maskTextFn:g,maskInputFn:m,slimDOMOptions:y,dataURLOptions:S,inlineImages:E,recordCanvas:C,preserveWhiteSpace:$,onSerialize:w,onIframeLoad:x,iframeLoadTimeout:T,onStylesheetLoad:R,stylesheetLoadTimeout:M,keepIframeSrcFn:N});te&&x(t,te)}},T),q.type===kn.Element&&q.tagName==="link"&&typeof q.attributes.rel=="string"&&(q.attributes.rel==="stylesheet"||q.attributes.rel==="preload"&&typeof q.attributes.href=="string"&&rj(q.attributes.href)==="css")&&h0e(t,()=>{if(R){const H=Mc(t,{doc:n,mirror:r,blockClass:s,blockSelector:o,needsMask:F,maskTextClass:a,maskTextSelector:u,skipChild:!1,inlineStylesheet:f,maskInputOptions:h,maskTextFn:g,maskInputFn:m,slimDOMOptions:y,dataURLOptions:S,inlineImages:E,recordCanvas:C,preserveWhiteSpace:$,onSerialize:w,onIframeLoad:x,iframeLoadTimeout:T,onStylesheetLoad:R,stylesheetLoadTimeout:M,keepIframeSrcFn:N});H&&R(t,H)}},M),q}function b0e(t,e){const{mirror:n=new nj,blockClass:r="rr-block",blockSelector:s=null,maskTextClass:o="rr-mask",maskTextSelector:a=null,inlineStylesheet:u=!0,inlineImages:c=!1,recordCanvas:f=!1,maskAllInputs:h=!1,maskTextFn:g,maskInputFn:m,slimDOM:y=!1,dataURLOptions:S,preserveWhiteSpace:E,onSerialize:C,onIframeLoad:w,iframeLoadTimeout:x,onStylesheetLoad:T,stylesheetLoadTimeout:R,keepIframeSrcFn:M=()=>!1}=e||{},N=h===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:h===!1?{password:!0}:h,O=lj(y);return Mc(t,{doc:t,mirror:n,blockClass:r,blockSelector:s,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:N,maskTextFn:g,maskInputFn:m,slimDOMOptions:O,dataURLOptions:S,inlineImages:c,recordCanvas:f,preserveWhiteSpace:E,onSerialize:C,onIframeLoad:w,iframeLoadTimeout:x,onStylesheetLoad:T,stylesheetLoadTimeout:R,keepIframeSrcFn:M,newlyAddedElement:!1})}function S0e(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function E0e(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var s=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,s.get?s:{enumerable:!0,get:function(){return t[r]}})}),n}var jR={exports:{}},Xt=String,uj=function(){return{isColorSupported:!1,reset:Xt,bold:Xt,dim:Xt,italic:Xt,underline:Xt,inverse:Xt,hidden:Xt,strikethrough:Xt,black:Xt,red:Xt,green:Xt,yellow:Xt,blue:Xt,magenta:Xt,cyan:Xt,white:Xt,gray:Xt,bgBlack:Xt,bgRed:Xt,bgGreen:Xt,bgYellow:Xt,bgBlue:Xt,bgMagenta:Xt,bgCyan:Xt,bgWhite:Xt}};jR.exports=uj();jR.exports.createColors=uj;var C0e=jR.exports;const w0e={},x0e=Object.freeze(Object.defineProperty({__proto__:null,default:w0e},Symbol.toStringTag,{value:"Module"})),eo=E0e(x0e);let T4=C0e,R4=eo,q_=class cj extends Error{constructor(e,n,r,s,o,a){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),s&&(this.source=s),a&&(this.plugin=a),typeof n<"u"&&typeof r<"u"&&(typeof n=="number"?(this.line=n,this.column=r):(this.line=n.line,this.column=n.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,cj)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let n=this.source;e==null&&(e=T4.isColorSupported),R4&&e&&(n=R4(n));let r=n.split(/\r?\n/),s=Math.max(this.line-3,0),o=Math.min(this.line+2,r.length),a=String(o).length,u,c;if(e){let{bold:f,gray:h,red:g}=T4.createColors(!0);u=m=>f(g(m)),c=m=>h(m)}else u=c=f=>f;return r.slice(s,o).map((f,h)=>{let g=s+1+h,m=" "+(" "+g).slice(-a)+" | ";if(g===this.line){let y=c(m.replace(/\d/g," "))+f.slice(0,this.column-1).replace(/[^\t]/g," ");return u(">")+c(m)+f+`
243
+ `+y+u("^")}return" "+c(m)+f}).join(`
244
+ `)}toString(){let e=this.showSourceCode();return e&&(e=`
245
+
246
+ `+e+`
247
+ `),this.name+": "+this.message+e}};var BR=q_;q_.default=q_;var pp={};pp.isClean=Symbol("isClean");pp.my=Symbol("my");const I4={after:`
248
+ `,beforeClose:`
249
+ `,beforeComment:`
250
+ `,beforeDecl:`
251
+ `,beforeOpen:" ",beforeRule:`
252
+ `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function _0e(t){return t[0].toUpperCase()+t.slice(1)}let W_=class{constructor(e){this.builder=e}atrule(e,n){let r="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?r+=e.raws.afterName:s&&(r+=" "),e.nodes)this.block(e,r+s);else{let o=(e.raws.between||"")+(n?";":"");this.builder(r+s+o,e)}}beforeAfter(e,n){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):n==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let s=e.parent,o=0;for(;s&&s.type!=="root";)o+=1,s=s.parent;if(r.includes(`
253
+ `)){let a=this.raw(e,null,"indent");if(a.length)for(let u=0;u<o;u++)r+=a}return r}block(e,n){let r=this.raw(e,"between","beforeOpen");this.builder(n+r+"{",e,"start");let s;e.nodes&&e.nodes.length?(this.body(e),s=this.raw(e,"after")):s=this.raw(e,"after","emptyBody"),s&&this.builder(s),this.builder("}",e,"end")}body(e){let n=e.nodes.length-1;for(;n>0&&e.nodes[n].type==="comment";)n-=1;let r=this.raw(e,"semicolon");for(let s=0;s<e.nodes.length;s++){let o=e.nodes[s],a=this.raw(o,"before");a&&this.builder(a),this.stringify(o,n!==s||r)}}comment(e){let n=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+n+e.text+r+"*/",e)}decl(e,n){let r=this.raw(e,"between","colon"),s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),n&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(e,n,r){let s;if(r||(r=n),n&&(s=e.raws[n],typeof s<"u"))return s;let o=e.parent;if(r==="before"&&(!o||o.type==="root"&&o.first===e||o&&o.type==="document"))return"";if(!o)return I4[r];let a=e.root();if(a.rawCache||(a.rawCache={}),typeof a.rawCache[r]<"u")return a.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let u="raw"+_0e(r);this[u]?s=this[u](a,e):a.walk(c=>{if(s=c.raws[n],typeof s<"u")return!1})}return typeof s>"u"&&(s=I4[r]),a.rawCache[r]=s,s}rawBeforeClose(e){let n;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return n=r.raws.after,n.includes(`
254
+ `)&&(n=n.replace(/[^\n]+$/,"")),!1}),n&&(n=n.replace(/\S/g,"")),n}rawBeforeComment(e,n){let r;return e.walkComments(s=>{if(typeof s.raws.before<"u")return r=s.raws.before,r.includes(`
255
+ `)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(n,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,n){let r;return e.walkDecls(s=>{if(typeof s.raws.before<"u")return r=s.raws.before,r.includes(`
256
+ `)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(n,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let n;return e.walk(r=>{if(r.type!=="decl"&&(n=r.raws.between,typeof n<"u"))return!1}),n}rawBeforeRule(e){let n;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before<"u")return n=r.raws.before,n.includes(`
257
+ `)&&(n=n.replace(/[^\n]+$/,"")),!1}),n&&(n=n.replace(/\S/g,"")),n}rawColon(e){let n;return e.walkDecls(r=>{if(typeof r.raws.between<"u")return n=r.raws.between.replace(/[^\s:]/g,""),!1}),n}rawEmptyBody(e){let n;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(n=r.raws.after,typeof n<"u"))return!1}),n}rawIndent(e){if(e.raws.indent)return e.raws.indent;let n;return e.walk(r=>{let s=r.parent;if(s&&s!==e&&s.parent&&s.parent===e&&typeof r.raws.before<"u"){let o=r.raws.before.split(`
258
+ `);return n=o[o.length-1],n=n.replace(/\S/g,""),!1}}),n}rawSemicolon(e){let n;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(n=r.raws.semicolon,typeof n<"u"))return!1}),n}rawValue(e,n){let r=e[n],s=e.raws[n];return s&&s.value===r?s.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,n){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,n)}};var dj=W_;W_.default=W_;let A0e=dj;function V_(t,e){new A0e(e).stringify(t)}var Ib=V_;V_.default=V_;let{isClean:Sm,my:T0e}=pp,R0e=BR,I0e=dj,O0e=Ib;function G_(t,e){let n=new t.constructor;for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r)||r==="proxyCache")continue;let s=t[r],o=typeof s;r==="parent"&&o==="object"?e&&(n[r]=e):r==="source"?n[r]=s:Array.isArray(s)?n[r]=s.map(a=>G_(a,n)):(o==="object"&&s!==null&&(s=G_(s)),n[r]=s)}return n}let K_=class{constructor(e={}){this.raws={},this[Sm]=!1,this[T0e]=!0;for(let n in e)if(n==="nodes"){this.nodes=[];for(let r of e[n])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[n]=e[n]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let n=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${n.input.from}:${n.start.line}:${n.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let n in e)this[n]=e[n];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let n=G_(this);for(let r in e)n[r]=e[r];return n}cloneAfter(e={}){let n=this.clone(e);return this.parent.insertAfter(this,n),n}cloneBefore(e={}){let n=this.clone(e);return this.parent.insertBefore(this,n),n}error(e,n={}){if(this.source){let{end:r,start:s}=this.rangeBy(n);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},n)}return new R0e(e)}getProxyProcessor(){return{get(e,n){return n==="proxyOf"?e:n==="root"?()=>e.root().toProxy():e[n]},set(e,n,r){return e[n]===r||(e[n]=r,(n==="prop"||n==="value"||n==="name"||n==="params"||n==="important"||n==="text")&&e.markDirty()),!0}}}markDirty(){if(this[Sm]){this[Sm]=!1;let e=this;for(;e=e.parent;)e[Sm]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,n){let r=this.source.start;if(e.index)r=this.positionInside(e.index,n);else if(e.word){n=this.toString();let s=n.indexOf(e.word);s!==-1&&(r=this.positionInside(s,n))}return r}positionInside(e,n){let r=n||this.toString(),s=this.source.start.column,o=this.source.start.line;for(let a=0;a<e;a++)r[a]===`
259
+ `?(s=1,o+=1):s+=1;return{column:s,line:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let n={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:n.column+1,line:n.line};if(e.word){let s=this.toString(),o=s.indexOf(e.word);o!==-1&&(n=this.positionInside(o,s),r=this.positionInside(o+e.word.length,s))}else e.start?n={column:e.start.column,line:e.start.line}:e.index&&(n=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<n.line||r.line===n.line&&r.column<=n.column)&&(r={column:n.column+1,line:n.line}),{end:r,start:n}}raw(e,n){return new I0e().raw(this,e,n)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let n=this,r=!1;for(let s of e)s===this?r=!0:r?(this.parent.insertAfter(n,s),n=s):this.parent.insertBefore(n,s);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,n){let r={},s=n==null;n=n||new Map;let o=0;for(let a in this){if(!Object.prototype.hasOwnProperty.call(this,a)||a==="parent"||a==="proxyCache")continue;let u=this[a];if(Array.isArray(u))r[a]=u.map(c=>typeof c=="object"&&c.toJSON?c.toJSON(null,n):c);else if(typeof u=="object"&&u.toJSON)r[a]=u.toJSON(null,n);else if(a==="source"){let c=n.get(u.input);c==null&&(c=o,n.set(u.input,o),o++),r[a]={end:u.end,inputId:c,start:u.start}}else r[a]=u}return s&&(r.inputs=[...n.keys()].map(a=>a.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=O0e){e.stringify&&(e=e.stringify);let n="";return e(this,r=>{n+=r}),n}warn(e,n,r){let s={node:this};for(let o in r)s[o]=r[o];return e.warn(n,s)}get proxyOf(){return this}};var Ob=K_;K_.default=K_;let N0e=Ob,Y_=class extends N0e{constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var Nb=Y_;Y_.default=Y_;let M0e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",P0e=(t=21)=>{let e="",n=t;for(;n--;)e+=M0e[Math.random()*64|0];return e};var k0e={nanoid:P0e};let{SourceMapConsumer:O4,SourceMapGenerator:N4}=eo,{existsSync:D0e,readFileSync:L0e}=eo,{dirname:bx,join:U0e}=eo;function F0e(t){return Buffer?Buffer.from(t,"base64").toString():window.atob(t)}let Z_=class{constructor(e,n){if(n.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=n.map?n.map.prev:void 0,s=this.loadMap(n.from,r);!this.mapFile&&n.from&&(this.mapFile=n.from),this.mapFile&&(this.root=bx(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new O4(this.text)),this.consumerCache}decodeInline(e){let n=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,s=/^data:application\/json;charset=utf-?8,/,o=/^data:application\/json,/;if(s.test(e)||o.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(n.test(e)||r.test(e))return F0e(e.substr(RegExp.lastMatch.length));let a=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+a)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let n=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!n)return;let r=e.lastIndexOf(n.pop()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e){if(this.root=bx(e),D0e(e))return this.mapFile=e,L0e(e,"utf-8").toString().trim()}loadMap(e,n){if(n===!1)return!1;if(n){if(typeof n=="string")return n;if(typeof n=="function"){let r=n(e);if(r){let s=this.loadFile(r);if(!s)throw new Error("Unable to load previous source map: "+r.toString());return s}}else{if(n instanceof O4)return N4.fromSourceMap(n).toString();if(n instanceof N4)return n.toString();if(this.isMap(n))return JSON.stringify(n);throw new Error("Unsupported previous source map format: "+n.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return e&&(r=U0e(bx(e),r)),this.loadFile(r)}}}startWith(e,n){return e?e.substr(0,n.length)===n:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var fj=Z_;Z_.default=Z_;let{SourceMapConsumer:z0e,SourceMapGenerator:j0e}=eo,{fileURLToPath:M4,pathToFileURL:Em}=eo,{isAbsolute:X_,resolve:Q_}=eo,{nanoid:B0e}=k0e,Sx=eo,P4=BR,H0e=fj,Ex=Symbol("fromOffsetCache"),$0e=!!(z0e&&j0e),k4=!!(Q_&&X_),ry=class{constructor(e,n={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="￾"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,n.from&&(!k4||/^\w+:\/\//.test(n.from)||X_(n.from)?this.file=n.from:this.file=Q_(n.from)),k4&&$0e){let r=new H0e(this.css,n);if(r.text){this.map=r;let s=r.consumer().file;!this.file&&s&&(this.file=this.mapResolve(s))}}this.file||(this.id="<input css "+B0e(6)+">"),this.map&&(this.map.file=this.from)}error(e,n,r,s={}){let o,a,u;if(n&&typeof n=="object"){let f=n,h=r;if(typeof f.offset=="number"){let g=this.fromOffset(f.offset);n=g.line,r=g.col}else n=f.line,r=f.column;if(typeof h.offset=="number"){let g=this.fromOffset(h.offset);a=g.line,u=g.col}else a=h.line,u=h.column}else if(!r){let f=this.fromOffset(n);n=f.line,r=f.col}let c=this.origin(n,r,a,u);return c?o=new P4(e,c.endLine===void 0?c.line:{column:c.column,line:c.line},c.endLine===void 0?c.column:{column:c.endColumn,line:c.endLine},c.source,c.file,s.plugin):o=new P4(e,a===void 0?n:{column:r,line:n},a===void 0?r:{column:u,line:a},this.css,this.file,s.plugin),o.input={column:r,endColumn:u,endLine:a,line:n,source:this.css},this.file&&(Em&&(o.input.url=Em(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let n,r;if(this[Ex])r=this[Ex];else{let o=this.css.split(`
260
+ `);r=new Array(o.length);let a=0;for(let u=0,c=o.length;u<c;u++)r[u]=a,a+=o[u].length+1;this[Ex]=r}n=r[r.length-1];let s=0;if(e>=n)s=r.length-1;else{let o=r.length-2,a;for(;s<o;)if(a=s+(o-s>>1),e<r[a])o=a-1;else if(e>=r[a+1])s=a+1;else{s=a;break}}return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Q_(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,n,r,s){if(!this.map)return!1;let o=this.map.consumer(),a=o.originalPositionFor({column:n,line:e});if(!a.source)return!1;let u;typeof r=="number"&&(u=o.originalPositionFor({column:s,line:r}));let c;X_(a.source)?c=Em(a.source):c=new URL(a.source,this.map.consumer().sourceRoot||Em(this.map.mapFile));let f={column:a.column,endColumn:u&&u.column,endLine:u&&u.line,line:a.line,url:c.toString()};if(c.protocol==="file:")if(M4)f.file=M4(c);else throw new Error("file: protocol is not available in this PostCSS build");let h=o.sourceContentFor(a.source);return h&&(f.source=h),f}toJSON(){let e={};for(let n of["hasBOM","css","file","id"])this[n]!=null&&(e[n]=this[n]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var Mb=ry;ry.default=ry;Sx&&Sx.registerInput&&Sx.registerInput(ry);let{SourceMapConsumer:hj,SourceMapGenerator:pv}=eo,{dirname:gv,relative:pj,resolve:gj,sep:mj}=eo,{pathToFileURL:D4}=eo,q0e=Mb,W0e=!!(hj&&pv),V0e=!!(gv&&gj&&pj&&mj),G0e=class{constructor(e,n,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=n,this.opts=r,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let n=`
261
+ `;this.css.includes(`\r
262
+ `)&&(n=`\r
263
+ `),this.css+=n+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let n=this.toUrl(this.path(e.file)),r=e.root||gv(e.file),s;this.mapOpts.sourcesContent===!1?(s=new hj(e.text),s.sourcesContent&&(s.sourcesContent=null)):s=e.consumer(),this.map.applySourceMap(s,n,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let n=this.root.nodes.length-1;n>=0;n--)e=this.root.nodes[n],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(n)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),V0e&&W0e&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,n=>{e+=n}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=pv.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new pv({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new pv({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,n=1,r="<no source>",s={generated:{column:0,line:0},original:{column:0,line:0},source:""},o,a;this.stringify(this.root,(u,c,f)=>{if(this.css+=u,c&&f!=="end"&&(s.generated.line=e,s.generated.column=n-1,c.source&&c.source.start?(s.source=this.sourcePath(c),s.original.line=c.source.start.line,s.original.column=c.source.start.column-1,this.map.addMapping(s)):(s.source=r,s.original.line=1,s.original.column=0,this.map.addMapping(s))),o=u.match(/\n/g),o?(e+=o.length,a=u.lastIndexOf(`
264
+ `),n=u.length-a):n+=u.length,c&&f!=="start"){let h=c.parent||{raws:{}};(!(c.type==="decl"||c.type==="atrule"&&!c.nodes)||c!==h.last||h.raws.semicolon)&&(c.source&&c.source.end?(s.source=this.sourcePath(c),s.original.line=c.source.end.line,s.original.column=c.source.end.column-1,s.generated.line=e,s.generated.column=n-2,this.map.addMapping(s)):(s.source=r,s.original.line=1,s.original.column=0,s.generated.line=e,s.generated.column=n-1,this.map.addMapping(s)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(n=>n.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let n=this.memoizedPaths.get(e);if(n)return n;let r=this.opts.to?gv(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=gv(gj(r,this.mapOpts.annotation)));let s=pj(r,e);return this.memoizedPaths.set(e,s),s}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let n=e.source.input.map;this.previousMaps.includes(n)||this.previousMaps.push(n)}});else{let e=new q0e(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(n=>{if(n.source){let r=n.source.input.from;if(r&&!e[r]){e[r]=!0;let s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,n.source.input.css)}}});else if(this.css){let n=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(n,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let n=this.memoizedFileURLs.get(e);if(n)return n;if(D4){let r=D4(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let n=this.memoizedURLs.get(e);if(n)return n;mj==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var vj=G0e;let K0e=Ob,J_=class extends K0e{constructor(e){super(e),this.type="comment"}};var Pb=J_;J_.default=J_;let{isClean:yj,my:bj}=pp,Sj=Nb,Ej=Pb,Y0e=Ob,Cj,HR,$R,wj;function xj(t){return t.map(e=>(e.nodes&&(e.nodes=xj(e.nodes)),delete e.source,e))}function _j(t){if(t[yj]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)_j(e)}let wi=class Aj extends Y0e{append(...e){for(let n of e){let r=this.normalize(n,this.last);for(let s of r)this.proxyOf.nodes.push(s)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let n of this.nodes)n.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let n=this.getIterator(),r,s;for(;this.indexes[n]<this.proxyOf.nodes.length&&(r=this.indexes[n],s=e(this.proxyOf.nodes[r],r),s!==!1);)this.indexes[n]+=1;return delete this.indexes[n],s}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,n){return n==="proxyOf"?e:e[n]?n==="each"||typeof n=="string"&&n.startsWith("walk")?(...r)=>e[n](...r.map(s=>typeof s=="function"?(o,a)=>s(o.toProxy(),a):s)):n==="every"||n==="some"?r=>e[n]((s,...o)=>r(s.toProxy(),...o)):n==="root"?()=>e.root().toProxy():n==="nodes"?e.nodes.map(r=>r.toProxy()):n==="first"||n==="last"?e[n].toProxy():e[n]:e[n]},set(e,n,r){return e[n]===r||(e[n]=r,(n==="name"||n==="params"||n==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,n){let r=this.index(e),s=this.normalize(n,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let a of s)this.proxyOf.nodes.splice(r+1,0,a);let o;for(let a in this.indexes)o=this.indexes[a],r<o&&(this.indexes[a]=o+s.length);return this.markDirty(),this}insertBefore(e,n){let r=this.index(e),s=r===0?"prepend":!1,o=this.normalize(n,this.proxyOf.nodes[r],s).reverse();r=this.index(e);for(let u of o)this.proxyOf.nodes.splice(r,0,u);let a;for(let u in this.indexes)a=this.indexes[u],r<=a&&(this.indexes[u]=a+o.length);return this.markDirty(),this}normalize(e,n){if(typeof e=="string")e=xj(Cj(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new Sj(e)]}else if(e.selector)e=[new HR(e)];else if(e.name)e=[new $R(e)];else if(e.text)e=[new Ej(e)];else throw new Error("Unknown node type in node creation");return e.map(s=>(s[bj]||Aj.rebuild(s),s=s.proxyOf,s.parent&&s.parent.removeChild(s),s[yj]&&_j(s),typeof s.raws.before>"u"&&n&&typeof n.raws.before<"u"&&(s.raws.before=n.raws.before.replace(/\S/g,"")),s.parent=this.proxyOf,s))}prepend(...e){e=e.reverse();for(let n of e){let r=this.normalize(n,this.first,"prepend").reverse();for(let s of r)this.proxyOf.nodes.unshift(s);for(let s in this.indexes)this.indexes[s]=this.indexes[s]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let n;for(let r in this.indexes)n=this.indexes[r],n>=e&&(this.indexes[r]=n-1);return this.markDirty(),this}replaceValues(e,n,r){return r||(r=n,n={}),this.walkDecls(s=>{n.props&&!n.props.includes(s.prop)||n.fast&&!s.value.includes(n.fast)||(s.value=s.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((n,r)=>{let s;try{s=e(n,r)}catch(o){throw n.addToError(o)}return s!==!1&&n.walk&&(s=n.walk(e)),s})}walkAtRules(e,n){return n?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="atrule"&&e.test(r.name))return n(r,s)}):this.walk((r,s)=>{if(r.type==="atrule"&&r.name===e)return n(r,s)}):(n=e,this.walk((r,s)=>{if(r.type==="atrule")return n(r,s)}))}walkComments(e){return this.walk((n,r)=>{if(n.type==="comment")return e(n,r)})}walkDecls(e,n){return n?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="decl"&&e.test(r.prop))return n(r,s)}):this.walk((r,s)=>{if(r.type==="decl"&&r.prop===e)return n(r,s)}):(n=e,this.walk((r,s)=>{if(r.type==="decl")return n(r,s)}))}walkRules(e,n){return n?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="rule"&&e.test(r.selector))return n(r,s)}):this.walk((r,s)=>{if(r.type==="rule"&&r.selector===e)return n(r,s)}):(n=e,this.walk((r,s)=>{if(r.type==="rule")return n(r,s)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};wi.registerParse=t=>{Cj=t};wi.registerRule=t=>{HR=t};wi.registerAtRule=t=>{$R=t};wi.registerRoot=t=>{wj=t};var pu=wi;wi.default=wi;wi.rebuild=t=>{t.type==="atrule"?Object.setPrototypeOf(t,$R.prototype):t.type==="rule"?Object.setPrototypeOf(t,HR.prototype):t.type==="decl"?Object.setPrototypeOf(t,Sj.prototype):t.type==="comment"?Object.setPrototypeOf(t,Ej.prototype):t.type==="root"&&Object.setPrototypeOf(t,wj.prototype),t[bj]=!0,t.nodes&&t.nodes.forEach(e=>{wi.rebuild(e)})};let Z0e=pu,Tj,Rj,Hh=class extends Z0e{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Tj(new Rj,this,e).stringify()}};Hh.registerLazyResult=t=>{Tj=t};Hh.registerProcessor=t=>{Rj=t};var qR=Hh;Hh.default=Hh;let eA=class{constructor(e,n={}){if(this.type="warning",this.text=e,n.node&&n.node.source){let r=n.node.rangeBy(n);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in n)this[r]=n[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var Ij=eA;eA.default=eA;let X0e=Ij,tA=class{constructor(e,n,r){this.processor=e,this.messages=[],this.root=n,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,n={}){n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);let r=new X0e(e,n);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var WR=tA;tA.default=tA;const Cx=39,L4=34,Cm=92,U4=47,wm=10,$f=32,xm=12,_m=9,Am=13,Q0e=91,J0e=93,e1e=40,t1e=41,n1e=123,r1e=125,s1e=59,o1e=42,i1e=58,a1e=64,Tm=/[\t\n\f\r "#'()/;[\\\]{}]/g,Rm=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,l1e=/.[\r\n"'(/\\]/,F4=/[\da-f]/i;var u1e=function(e,n={}){let r=e.css.valueOf(),s=n.ignoreErrors,o,a,u,c,f,h,g,m,y,S,E=r.length,C=0,w=[],x=[];function T(){return C}function R(k){throw e.error("Unclosed "+k,C)}function M(){return x.length===0&&C>=E}function N(k){if(x.length)return x.pop();if(C>=E)return;let F=k?k.ignoreUnclosed:!1;switch(o=r.charCodeAt(C),o){case wm:case $f:case _m:case Am:case xm:{a=C;do a+=1,o=r.charCodeAt(a);while(o===$f||o===wm||o===_m||o===Am||o===xm);S=["space",r.slice(C,a)],C=a-1;break}case Q0e:case J0e:case n1e:case r1e:case i1e:case s1e:case t1e:{let $=String.fromCharCode(o);S=[$,$,C];break}case e1e:{if(m=w.length?w.pop()[1]:"",y=r.charCodeAt(C+1),m==="url"&&y!==Cx&&y!==L4&&y!==$f&&y!==wm&&y!==_m&&y!==xm&&y!==Am){a=C;do{if(h=!1,a=r.indexOf(")",a+1),a===-1)if(s||F){a=C;break}else R("bracket");for(g=a;r.charCodeAt(g-1)===Cm;)g-=1,h=!h}while(h);S=["brackets",r.slice(C,a+1),C,a],C=a}else a=r.indexOf(")",C+1),c=r.slice(C,a+1),a===-1||l1e.test(c)?S=["(","(",C]:(S=["brackets",c,C,a],C=a);break}case Cx:case L4:{u=o===Cx?"'":'"',a=C;do{if(h=!1,a=r.indexOf(u,a+1),a===-1)if(s||F){a=C+1;break}else R("string");for(g=a;r.charCodeAt(g-1)===Cm;)g-=1,h=!h}while(h);S=["string",r.slice(C,a+1),C,a],C=a;break}case a1e:{Tm.lastIndex=C+1,Tm.test(r),Tm.lastIndex===0?a=r.length-1:a=Tm.lastIndex-2,S=["at-word",r.slice(C,a+1),C,a],C=a;break}case Cm:{for(a=C,f=!0;r.charCodeAt(a+1)===Cm;)a+=1,f=!f;if(o=r.charCodeAt(a+1),f&&o!==U4&&o!==$f&&o!==wm&&o!==_m&&o!==Am&&o!==xm&&(a+=1,F4.test(r.charAt(a)))){for(;F4.test(r.charAt(a+1));)a+=1;r.charCodeAt(a+1)===$f&&(a+=1)}S=["word",r.slice(C,a+1),C,a],C=a;break}default:{o===U4&&r.charCodeAt(C+1)===o1e?(a=r.indexOf("*/",C+2)+1,a===0&&(s||F?a=r.length:R("comment")),S=["comment",r.slice(C,a+1),C,a],C=a):(Rm.lastIndex=C+1,Rm.test(r),Rm.lastIndex===0?a=r.length-1:a=Rm.lastIndex-2,S=["word",r.slice(C,a+1),C,a],w.push(S),C=a);break}}return C++,S}function O(k){x.push(k)}return{back:O,endOfFile:M,nextToken:N,position:T}};let Oj=pu,sy=class extends Oj{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var VR=sy;sy.default=sy;Oj.registerAtRule(sy);let Nj=pu,Mj,Pj,Kc=class extends Nj{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,n,r){let s=super.normalize(e);if(n){if(r==="prepend")this.nodes.length>1?n.raws.before=this.nodes[1].raws.before:delete n.raws.before;else if(this.first!==n)for(let o of s)o.raws.before=n.raws.before}return s}removeChild(e,n){let r=this.index(e);return!n&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new Mj(new Pj,this,e).stringify()}};Kc.registerLazyResult=t=>{Mj=t};Kc.registerProcessor=t=>{Pj=t};var gp=Kc;Kc.default=Kc;Nj.registerRoot(Kc);let $h={comma(t){return $h.split(t,[","],!0)},space(t){let e=[" ",`
265
+ `," "];return $h.split(t,e)},split(t,e,n){let r=[],s="",o=!1,a=0,u=!1,c="",f=!1;for(let h of t)f?f=!1:h==="\\"?f=!0:u?h===c&&(u=!1):h==='"'||h==="'"?(u=!0,c=h):h==="("?a+=1:h===")"?a>0&&(a-=1):a===0&&e.includes(h)&&(o=!0),o?(s!==""&&r.push(s.trim()),s="",o=!1):s+=h;return(n||s!=="")&&r.push(s.trim()),r}};var kj=$h;$h.default=$h;let Dj=pu,c1e=kj,oy=class extends Dj{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return c1e.comma(this.selector)}set selectors(e){let n=this.selector?this.selector.match(/,\s*/):null,r=n?n[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var GR=oy;oy.default=oy;Dj.registerRule(oy);let d1e=Nb,f1e=u1e,h1e=Pb,p1e=VR,g1e=gp,z4=GR;const j4={empty:!0,space:!0};function m1e(t){for(let e=t.length-1;e>=0;e--){let n=t[e],r=n[3]||n[2];if(r)return r}}let v1e=class{constructor(e){this.input=e,this.root=new g1e,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let n=new p1e;n.name=e[1].slice(1),n.name===""&&this.unnamedAtrule(n,e),this.init(n,e[2]);let r,s,o,a=!1,u=!1,c=[],f=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?f.push(r==="("?")":"]"):r==="{"&&f.length>0?f.push("}"):r===f[f.length-1]&&f.pop(),f.length===0)if(r===";"){n.source.end=this.getPosition(e[2]),n.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){u=!0;break}else if(r==="}"){if(c.length>0){for(o=c.length-1,s=c[o];s&&s[0]==="space";)s=c[--o];s&&(n.source.end=this.getPosition(s[3]||s[2]),n.source.end.offset++)}this.end(e);break}else c.push(e);else c.push(e);if(this.tokenizer.endOfFile()){a=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(c),c.length?(n.raws.afterName=this.spacesAndCommentsFromStart(c),this.raw(n,"params",c),a&&(e=c[c.length-1],n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),u&&(n.nodes=[],this.current=n)}checkMissedSemicolon(e){let n=this.colon(e);if(n===!1)return;let r=0,s;for(let o=n-1;o>=0&&(s=e[o],!(s[0]!=="space"&&(r+=1,r===2)));o--);throw this.input.error("Missed semicolon",s[0]==="word"?s[3]+1:s[2])}colon(e){let n=0,r,s,o;for(let[a,u]of e.entries()){if(r=u,s=r[0],s==="("&&(n+=1),s===")"&&(n-=1),n===0&&s===":")if(!o)this.doubleColon(r);else{if(o[0]==="word"&&o[1]==="progid")continue;return a}o=r}return!1}comment(e){let n=new h1e;this.init(n,e[2]),n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))n.text="",n.raws.left=r,n.raws.right="";else{let s=r.match(/^(\s*)([^]*\S)(\s*)$/);n.text=s[2],n.raws.left=s[1],n.raws.right=s[3]}}createTokenizer(){this.tokenizer=f1e(this.input)}decl(e,n){let r=new d1e;this.init(r,e[0][2]);let s=e[e.length-1];for(s[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(s[3]||s[2]||m1e(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let f=e[0][0];if(f===":"||f==="space"||f==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let o;for(;e.length;)if(o=e.shift(),o[0]===":"){r.raws.between+=o[1];break}else o[0]==="word"&&/\w/.test(o[1])&&this.unknownWord([o]),r.raws.between+=o[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let a=[],u;for(;e.length&&(u=e[0][0],!(u!=="space"&&u!=="comment"));)a.push(e.shift());this.precheckMissedSemicolon(e);for(let f=e.length-1;f>=0;f--){if(o=e[f],o[1].toLowerCase()==="!important"){r.important=!0;let h=this.stringFrom(e,f);h=this.spacesFromEnd(e)+h,h!==" !important"&&(r.raws.important=h);break}else if(o[1].toLowerCase()==="important"){let h=e.slice(0),g="";for(let m=f;m>0;m--){let y=h[m][0];if(g.trim().indexOf("!")===0&&y!=="space")break;g=h.pop()[1]+g}g.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=g,e=h)}if(o[0]!=="space"&&o[0]!=="comment")break}e.some(f=>f[0]!=="space"&&f[0]!=="comment")&&(r.raws.between+=a.map(f=>f[1]).join(""),a=[]),this.raw(r,"value",a.concat(e),n),r.value.includes(":")&&!n&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let n=new z4;this.init(n,e[2]),n.selector="",n.raws.between="",this.current=n}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let n=this.current.nodes[this.current.nodes.length-1];n&&n.type==="rule"&&!n.raws.ownSemicolon&&(n.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let n=this.input.fromOffset(e);return{column:n.col,line:n.line,offset:e}}init(e,n){this.current.push(e),e.source={input:this.input,start:this.getPosition(n)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let n=!1,r=null,s=!1,o=null,a=[],u=e[1].startsWith("--"),c=[],f=e;for(;f;){if(r=f[0],c.push(f),r==="("||r==="[")o||(o=f),a.push(r==="("?")":"]");else if(u&&s&&r==="{")o||(o=f),a.push("}");else if(a.length===0)if(r===";")if(s){this.decl(c,u);return}else break;else if(r==="{"){this.rule(c);return}else if(r==="}"){this.tokenizer.back(c.pop()),n=!0;break}else r===":"&&(s=!0);else r===a[a.length-1]&&(a.pop(),a.length===0&&(o=null));f=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(n=!0),a.length>0&&this.unclosedBracket(o),n&&s){if(!u)for(;c.length&&(f=c[c.length-1][0],!(f!=="space"&&f!=="comment"));)this.tokenizer.back(c.pop());this.decl(c,u)}else this.unknownWord(c)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,n,r,s){let o,a,u=r.length,c="",f=!0,h,g;for(let m=0;m<u;m+=1)o=r[m],a=o[0],a==="space"&&m===u-1&&!s?f=!1:a==="comment"?(g=r[m-1]?r[m-1][0]:"empty",h=r[m+1]?r[m+1][0]:"empty",!j4[g]&&!j4[h]?c.slice(-1)===","?f=!1:c+=o[1]:f=!1):c+=o[1];if(!f){let m=r.reduce((y,S)=>y+S[1],"");e.raws[n]={raw:m,value:c}}e[n]=c}rule(e){e.pop();let n=new z4;this.init(n,e[0][2]),n.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(n,"selector",e),this.current=n}spacesAndCommentsFromEnd(e){let n,r="";for(;e.length&&(n=e[e.length-1][0],!(n!=="space"&&n!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let n,r="";for(;e.length&&(n=e[0][0],!(n!=="space"&&n!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let n,r="";for(;e.length&&(n=e[e.length-1][0],n==="space");)r=e.pop()[1]+r;return r}stringFrom(e,n){let r="";for(let s=n;s<e.length;s++)r+=e[s][1];return e.splice(n,e.length-n),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,n){throw this.input.error("At-rule without name",{offset:n[2]},{offset:n[2]+n[1].length})}};var y1e=v1e;let b1e=pu,S1e=y1e,E1e=Mb;function iy(t,e){let n=new E1e(t,e),r=new S1e(n);try{r.parse()}catch(s){throw s}return r.root}var KR=iy;iy.default=iy;b1e.registerParse(iy);let{isClean:yo,my:C1e}=pp,w1e=vj,x1e=Ib,_1e=pu,A1e=qR,B4=WR,T1e=KR,R1e=gp;const I1e={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},O1e={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},N1e={Once:!0,postcssPlugin:!0,prepare:!0},Yc=0;function qf(t){return typeof t=="object"&&typeof t.then=="function"}function Lj(t){let e=!1,n=I1e[t.type];return t.type==="decl"?e=t.prop.toLowerCase():t.type==="atrule"&&(e=t.name.toLowerCase()),e&&t.append?[n,n+"-"+e,Yc,n+"Exit",n+"Exit-"+e]:e?[n,n+"-"+e,n+"Exit",n+"Exit-"+e]:t.append?[n,Yc,n+"Exit"]:[n,n+"Exit"]}function H4(t){let e;return t.type==="document"?e=["Document",Yc,"DocumentExit"]:t.type==="root"?e=["Root",Yc,"RootExit"]:e=Lj(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function nA(t){return t[yo]=!1,t.nodes&&t.nodes.forEach(e=>nA(e)),t}let rA={},Zc=class Uj{constructor(e,n,r){this.stringified=!1,this.processed=!1;let s;if(typeof n=="object"&&n!==null&&(n.type==="root"||n.type==="document"))s=nA(n);else if(n instanceof Uj||n instanceof B4)s=nA(n.root),n.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{let o=T1e;r.syntax&&(o=r.syntax.parse),r.parser&&(o=r.parser),o.parse&&(o=o.parse);try{s=o(n,r)}catch(a){this.processed=!0,this.error=a}s&&!s[C1e]&&_1e.rebuild(s)}this.result=new B4(e,s,r),this.helpers={...rA,postcss:rA,result:this.result},this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?{...o,...o.prepare(this.result)}:o)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,n){let r=this.result.lastPlugin;try{n&&n.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(s){console&&console.error&&console.error(s)}return e}prepareVisitors(){this.listeners={};let e=(n,r,s)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([n,s])};for(let n of this.plugins)if(typeof n=="object")for(let r in n){if(!O1e[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${n.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!N1e[r])if(typeof n[r]=="object")for(let s in n[r])s==="*"?e(n,r,n[r][s]):e(n,r+"-"+s.toLowerCase(),n[r][s]);else typeof n[r]=="function"&&e(n,r,n[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let n=this.plugins[e],r=this.runOnRoot(n);if(qf(r))try{await r}catch(s){throw this.handleError(s)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[yo];){e[yo]=!0;let n=[H4(e)];for(;n.length>0;){let r=this.visitTick(n);if(qf(r))try{await r}catch(s){let o=n[n.length-1].node;throw this.handleError(s,o)}}}if(this.listeners.OnceExit)for(let[n,r]of this.listeners.OnceExit){this.result.lastPlugin=n;try{if(e.type==="document"){let s=e.nodes.map(o=>r(o,this.helpers));await Promise.all(s)}else await r(e,this.helpers)}catch(s){throw this.handleError(s)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let n=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return qf(n[0])?Promise.all(n):n}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(n){throw this.handleError(n)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,n=x1e;e.syntax&&(n=e.syntax.stringify),e.stringifier&&(n=e.stringifier),n.stringify&&(n=n.stringify);let s=new w1e(n,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let n=this.runOnRoot(e);if(qf(n))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[yo];)e[yo]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let n of e.nodes)this.visitSync(this.listeners.OnceExit,n);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,n){return this.async().then(e,n)}toString(){return this.css}visitSync(e,n){for(let[r,s]of e){this.result.lastPlugin=r;let o;try{o=s(n,this.helpers)}catch(a){throw this.handleError(a,n.proxyOf)}if(n.type!=="root"&&n.type!=="document"&&!n.parent)return!0;if(qf(o))throw this.getAsyncError()}}visitTick(e){let n=e[e.length-1],{node:r,visitors:s}=n;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(s.length>0&&n.visitorIndex<s.length){let[a,u]=s[n.visitorIndex];n.visitorIndex+=1,n.visitorIndex===s.length&&(n.visitors=[],n.visitorIndex=0),this.result.lastPlugin=a;try{return u(r.toProxy(),this.helpers)}catch(c){throw this.handleError(c,r)}}if(n.iterator!==0){let a=n.iterator,u;for(;u=r.nodes[r.indexes[a]];)if(r.indexes[a]+=1,!u[yo]){u[yo]=!0,e.push(H4(u));return}n.iterator=0,delete r.indexes[a]}let o=n.events;for(;n.eventIndex<o.length;){let a=o[n.eventIndex];if(n.eventIndex+=1,a===Yc){r.nodes&&r.nodes.length&&(r[yo]=!0,n.iterator=r.getIterator());return}else if(this.listeners[a]){n.visitors=this.listeners[a];return}}e.pop()}walkSync(e){e[yo]=!0;let n=Lj(e);for(let r of n)if(r===Yc)e.nodes&&e.each(s=>{s[yo]||this.walkSync(s)});else{let s=this.listeners[r];if(s&&this.visitSync(s,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};Zc.registerPostcss=t=>{rA=t};var Fj=Zc;Zc.default=Zc;R1e.registerLazyResult(Zc);A1e.registerLazyResult(Zc);let M1e=vj,P1e=Ib,k1e=KR;const D1e=WR;let sA=class{constructor(e,n,r){n=n.toString(),this.stringified=!1,this._processor=e,this._css=n,this._opts=r,this._map=void 0;let s,o=P1e;this.result=new D1e(this._processor,s,this._opts),this.result.css=n;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let u=new M1e(o,s,this._opts,n);if(u.isMap()){let[c,f]=u.generate();c&&(this.result.css=c),f&&(this.result.map=f)}else u.clearAnnotation(),this.result.css=u.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,n){return this.async().then(e,n)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,n=k1e;try{e=n(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var L1e=sA;sA.default=sA;let U1e=L1e,F1e=Fj,z1e=qR,j1e=gp,qh=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let n=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))n=n.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)n.push(r);else if(typeof r=="function")n.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return n}process(e,n={}){return!this.plugins.length&&!n.parser&&!n.stringifier&&!n.syntax?new U1e(this,e,n):new F1e(this,e,n)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var B1e=qh;qh.default=qh;j1e.registerProcessor(qh);z1e.registerProcessor(qh);let H1e=Nb,$1e=fj,q1e=Pb,W1e=VR,V1e=Mb,G1e=gp,K1e=GR;function Wh(t,e){if(Array.isArray(t))return t.map(s=>Wh(s));let{inputs:n,...r}=t;if(n){e=[];for(let s of n){let o={...s,__proto__:V1e.prototype};o.map&&(o.map={...o.map,__proto__:$1e.prototype}),e.push(o)}}if(r.nodes&&(r.nodes=t.nodes.map(s=>Wh(s,e))),r.source){let{inputId:s,...o}=r.source;r.source=o,s!=null&&(r.source.input=e[s])}if(r.type==="root")return new G1e(r);if(r.type==="decl")return new H1e(r);if(r.type==="rule")return new K1e(r);if(r.type==="comment")return new q1e(r);if(r.type==="atrule")return new W1e(r);throw new Error("Unknown node type: "+t.type)}var Y1e=Wh;Wh.default=Wh;let Z1e=BR,zj=Nb,X1e=Fj,Q1e=pu,YR=B1e,J1e=Ib,eSe=Y1e,jj=qR,tSe=Ij,Bj=Pb,Hj=VR,nSe=WR,rSe=Mb,sSe=KR,oSe=kj,$j=GR,qj=gp,iSe=Ob;function Lt(...t){return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new YR(t)}Lt.plugin=function(e,n){let r=!1;function s(...a){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
266
+ https://evilmartians.com/chronicles/postcss-8-plugin-migration`),Qv.LANG&&Qv.LANG.startsWith("cn")&&console.warn(e+`: 里面 postcss.plugin 被弃用. 迁移指南:
267
+ https://www.w3ctech.com/topic/2226`));let u=n(...a);return u.postcssPlugin=e,u.postcssVersion=new YR().version,u}let o;return Object.defineProperty(s,"postcss",{get(){return o||(o=s()),o}}),s.process=function(a,u,c){return Lt([s(c)]).process(a,u)},s};Lt.stringify=J1e;Lt.parse=sSe;Lt.fromJSON=eSe;Lt.list=oSe;Lt.comment=t=>new Bj(t);Lt.atRule=t=>new Hj(t);Lt.decl=t=>new zj(t);Lt.rule=t=>new $j(t);Lt.root=t=>new qj(t);Lt.document=t=>new jj(t);Lt.CssSyntaxError=Z1e;Lt.Declaration=zj;Lt.Container=Q1e;Lt.Processor=YR;Lt.Document=jj;Lt.Comment=Bj;Lt.Warning=tSe;Lt.AtRule=Hj;Lt.Result=nSe;Lt.Input=rSe;Lt.Rule=$j;Lt.Root=qj;Lt.Node=iSe;X1e.registerPostcss(Lt);var aSe=Lt;Lt.default=Lt;const on=S0e(aSe);on.stringify;on.fromJSON;on.plugin;on.parse;on.list;on.document;on.comment;on.atRule;on.rule;on.decl;on.root;on.CssSyntaxError;on.Declaration;on.Container;on.Processor;on.Document;on.Comment;on.Warning;on.AtRule;on.Result;on.Input;on.Rule;on.Root;on.Node;var lSe=Object.defineProperty,uSe=(t,e,n)=>e in t?lSe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ws=(t,e,n)=>uSe(t,typeof e!="symbol"?e+"":e,n);function cSe(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function dSe(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var s=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,s.get?s:{enumerable:!0,get:function(){return t[r]}})}),n}var ZR={exports:{}},Qt=String,Wj=function(){return{isColorSupported:!1,reset:Qt,bold:Qt,dim:Qt,italic:Qt,underline:Qt,inverse:Qt,hidden:Qt,strikethrough:Qt,black:Qt,red:Qt,green:Qt,yellow:Qt,blue:Qt,magenta:Qt,cyan:Qt,white:Qt,gray:Qt,bgBlack:Qt,bgRed:Qt,bgGreen:Qt,bgYellow:Qt,bgBlue:Qt,bgMagenta:Qt,bgCyan:Qt,bgWhite:Qt}};ZR.exports=Wj();ZR.exports.createColors=Wj;var fSe=ZR.exports;const hSe={},pSe=Object.freeze(Object.defineProperty({__proto__:null,default:hSe},Symbol.toStringTag,{value:"Module"})),to=dSe(pSe);let $4=fSe,q4=to,oA=class Vj extends Error{constructor(e,n,r,s,o,a){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),s&&(this.source=s),a&&(this.plugin=a),typeof n<"u"&&typeof r<"u"&&(typeof n=="number"?(this.line=n,this.column=r):(this.line=n.line,this.column=n.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Vj)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let n=this.source;e==null&&(e=$4.isColorSupported),q4&&e&&(n=q4(n));let r=n.split(/\r?\n/),s=Math.max(this.line-3,0),o=Math.min(this.line+2,r.length),a=String(o).length,u,c;if(e){let{bold:f,gray:h,red:g}=$4.createColors(!0);u=m=>f(g(m)),c=m=>h(m)}else u=c=f=>f;return r.slice(s,o).map((f,h)=>{let g=s+1+h,m=" "+(" "+g).slice(-a)+" | ";if(g===this.line){let y=c(m.replace(/\d/g," "))+f.slice(0,this.column-1).replace(/[^\t]/g," ");return u(">")+c(m)+f+`
268
+ `+y+u("^")}return" "+c(m)+f}).join(`
269
+ `)}toString(){let e=this.showSourceCode();return e&&(e=`
270
+
271
+ `+e+`
272
+ `),this.name+": "+this.message+e}};var XR=oA;oA.default=oA;var mp={};mp.isClean=Symbol("isClean");mp.my=Symbol("my");const W4={after:`
273
+ `,beforeClose:`
274
+ `,beforeComment:`
275
+ `,beforeDecl:`
276
+ `,beforeOpen:" ",beforeRule:`
277
+ `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function gSe(t){return t[0].toUpperCase()+t.slice(1)}let iA=class{constructor(e){this.builder=e}atrule(e,n){let r="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?r+=e.raws.afterName:s&&(r+=" "),e.nodes)this.block(e,r+s);else{let o=(e.raws.between||"")+(n?";":"");this.builder(r+s+o,e)}}beforeAfter(e,n){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):n==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let s=e.parent,o=0;for(;s&&s.type!=="root";)o+=1,s=s.parent;if(r.includes(`
278
+ `)){let a=this.raw(e,null,"indent");if(a.length)for(let u=0;u<o;u++)r+=a}return r}block(e,n){let r=this.raw(e,"between","beforeOpen");this.builder(n+r+"{",e,"start");let s;e.nodes&&e.nodes.length?(this.body(e),s=this.raw(e,"after")):s=this.raw(e,"after","emptyBody"),s&&this.builder(s),this.builder("}",e,"end")}body(e){let n=e.nodes.length-1;for(;n>0&&e.nodes[n].type==="comment";)n-=1;let r=this.raw(e,"semicolon");for(let s=0;s<e.nodes.length;s++){let o=e.nodes[s],a=this.raw(o,"before");a&&this.builder(a),this.stringify(o,n!==s||r)}}comment(e){let n=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+n+e.text+r+"*/",e)}decl(e,n){let r=this.raw(e,"between","colon"),s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),n&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(e,n,r){let s;if(r||(r=n),n&&(s=e.raws[n],typeof s<"u"))return s;let o=e.parent;if(r==="before"&&(!o||o.type==="root"&&o.first===e||o&&o.type==="document"))return"";if(!o)return W4[r];let a=e.root();if(a.rawCache||(a.rawCache={}),typeof a.rawCache[r]<"u")return a.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let u="raw"+gSe(r);this[u]?s=this[u](a,e):a.walk(c=>{if(s=c.raws[n],typeof s<"u")return!1})}return typeof s>"u"&&(s=W4[r]),a.rawCache[r]=s,s}rawBeforeClose(e){let n;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return n=r.raws.after,n.includes(`
279
+ `)&&(n=n.replace(/[^\n]+$/,"")),!1}),n&&(n=n.replace(/\S/g,"")),n}rawBeforeComment(e,n){let r;return e.walkComments(s=>{if(typeof s.raws.before<"u")return r=s.raws.before,r.includes(`
280
+ `)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(n,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,n){let r;return e.walkDecls(s=>{if(typeof s.raws.before<"u")return r=s.raws.before,r.includes(`
281
+ `)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(n,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let n;return e.walk(r=>{if(r.type!=="decl"&&(n=r.raws.between,typeof n<"u"))return!1}),n}rawBeforeRule(e){let n;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before<"u")return n=r.raws.before,n.includes(`
282
+ `)&&(n=n.replace(/[^\n]+$/,"")),!1}),n&&(n=n.replace(/\S/g,"")),n}rawColon(e){let n;return e.walkDecls(r=>{if(typeof r.raws.between<"u")return n=r.raws.between.replace(/[^\s:]/g,""),!1}),n}rawEmptyBody(e){let n;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(n=r.raws.after,typeof n<"u"))return!1}),n}rawIndent(e){if(e.raws.indent)return e.raws.indent;let n;return e.walk(r=>{let s=r.parent;if(s&&s!==e&&s.parent&&s.parent===e&&typeof r.raws.before<"u"){let o=r.raws.before.split(`
283
+ `);return n=o[o.length-1],n=n.replace(/\S/g,""),!1}}),n}rawSemicolon(e){let n;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(n=r.raws.semicolon,typeof n<"u"))return!1}),n}rawValue(e,n){let r=e[n],s=e.raws[n];return s&&s.value===r?s.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,n){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,n)}};var Gj=iA;iA.default=iA;let mSe=Gj;function aA(t,e){new mSe(e).stringify(t)}var kb=aA;aA.default=aA;let{isClean:Im,my:vSe}=mp,ySe=XR,bSe=Gj,SSe=kb;function lA(t,e){let n=new t.constructor;for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r)||r==="proxyCache")continue;let s=t[r],o=typeof s;r==="parent"&&o==="object"?e&&(n[r]=e):r==="source"?n[r]=s:Array.isArray(s)?n[r]=s.map(a=>lA(a,n)):(o==="object"&&s!==null&&(s=lA(s)),n[r]=s)}return n}let uA=class{constructor(e={}){this.raws={},this[Im]=!1,this[vSe]=!0;for(let n in e)if(n==="nodes"){this.nodes=[];for(let r of e[n])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[n]=e[n]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let n=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${n.input.from}:${n.start.line}:${n.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let n in e)this[n]=e[n];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let n=lA(this);for(let r in e)n[r]=e[r];return n}cloneAfter(e={}){let n=this.clone(e);return this.parent.insertAfter(this,n),n}cloneBefore(e={}){let n=this.clone(e);return this.parent.insertBefore(this,n),n}error(e,n={}){if(this.source){let{end:r,start:s}=this.rangeBy(n);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},n)}return new ySe(e)}getProxyProcessor(){return{get(e,n){return n==="proxyOf"?e:n==="root"?()=>e.root().toProxy():e[n]},set(e,n,r){return e[n]===r||(e[n]=r,(n==="prop"||n==="value"||n==="name"||n==="params"||n==="important"||n==="text")&&e.markDirty()),!0}}}markDirty(){if(this[Im]){this[Im]=!1;let e=this;for(;e=e.parent;)e[Im]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,n){let r=this.source.start;if(e.index)r=this.positionInside(e.index,n);else if(e.word){n=this.toString();let s=n.indexOf(e.word);s!==-1&&(r=this.positionInside(s,n))}return r}positionInside(e,n){let r=n||this.toString(),s=this.source.start.column,o=this.source.start.line;for(let a=0;a<e;a++)r[a]===`
284
+ `?(s=1,o+=1):s+=1;return{column:s,line:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let n={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:n.column+1,line:n.line};if(e.word){let s=this.toString(),o=s.indexOf(e.word);o!==-1&&(n=this.positionInside(o,s),r=this.positionInside(o+e.word.length,s))}else e.start?n={column:e.start.column,line:e.start.line}:e.index&&(n=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<n.line||r.line===n.line&&r.column<=n.column)&&(r={column:n.column+1,line:n.line}),{end:r,start:n}}raw(e,n){return new bSe().raw(this,e,n)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let n=this,r=!1;for(let s of e)s===this?r=!0:r?(this.parent.insertAfter(n,s),n=s):this.parent.insertBefore(n,s);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,n){let r={},s=n==null;n=n||new Map;let o=0;for(let a in this){if(!Object.prototype.hasOwnProperty.call(this,a)||a==="parent"||a==="proxyCache")continue;let u=this[a];if(Array.isArray(u))r[a]=u.map(c=>typeof c=="object"&&c.toJSON?c.toJSON(null,n):c);else if(typeof u=="object"&&u.toJSON)r[a]=u.toJSON(null,n);else if(a==="source"){let c=n.get(u.input);c==null&&(c=o,n.set(u.input,o),o++),r[a]={end:u.end,inputId:c,start:u.start}}else r[a]=u}return s&&(r.inputs=[...n.keys()].map(a=>a.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=SSe){e.stringify&&(e=e.stringify);let n="";return e(this,r=>{n+=r}),n}warn(e,n,r){let s={node:this};for(let o in r)s[o]=r[o];return e.warn(n,s)}get proxyOf(){return this}};var Db=uA;uA.default=uA;let ESe=Db,cA=class extends ESe{constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var Lb=cA;cA.default=cA;let CSe="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",wSe=(t=21)=>{let e="",n=t;for(;n--;)e+=CSe[Math.random()*64|0];return e};var xSe={nanoid:wSe};let{SourceMapConsumer:V4,SourceMapGenerator:G4}=to,{existsSync:_Se,readFileSync:ASe}=to,{dirname:wx,join:TSe}=to;function RSe(t){return Buffer?Buffer.from(t,"base64").toString():window.atob(t)}let dA=class{constructor(e,n){if(n.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=n.map?n.map.prev:void 0,s=this.loadMap(n.from,r);!this.mapFile&&n.from&&(this.mapFile=n.from),this.mapFile&&(this.root=wx(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new V4(this.text)),this.consumerCache}decodeInline(e){let n=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,s=/^data:application\/json;charset=utf-?8,/,o=/^data:application\/json,/;if(s.test(e)||o.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(n.test(e)||r.test(e))return RSe(e.substr(RegExp.lastMatch.length));let a=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+a)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let n=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!n)return;let r=e.lastIndexOf(n.pop()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e){if(this.root=wx(e),_Se(e))return this.mapFile=e,ASe(e,"utf-8").toString().trim()}loadMap(e,n){if(n===!1)return!1;if(n){if(typeof n=="string")return n;if(typeof n=="function"){let r=n(e);if(r){let s=this.loadFile(r);if(!s)throw new Error("Unable to load previous source map: "+r.toString());return s}}else{if(n instanceof V4)return G4.fromSourceMap(n).toString();if(n instanceof G4)return n.toString();if(this.isMap(n))return JSON.stringify(n);throw new Error("Unsupported previous source map format: "+n.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return e&&(r=TSe(wx(e),r)),this.loadFile(r)}}}startWith(e,n){return e?e.substr(0,n.length)===n:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var Kj=dA;dA.default=dA;let{SourceMapConsumer:ISe,SourceMapGenerator:OSe}=to,{fileURLToPath:K4,pathToFileURL:Om}=to,{isAbsolute:fA,resolve:hA}=to,{nanoid:NSe}=xSe,xx=to,Y4=XR,MSe=Kj,_x=Symbol("fromOffsetCache"),PSe=!!(ISe&&OSe),Z4=!!(hA&&fA),ay=class{constructor(e,n={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="￾"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,n.from&&(!Z4||/^\w+:\/\//.test(n.from)||fA(n.from)?this.file=n.from:this.file=hA(n.from)),Z4&&PSe){let r=new MSe(this.css,n);if(r.text){this.map=r;let s=r.consumer().file;!this.file&&s&&(this.file=this.mapResolve(s))}}this.file||(this.id="<input css "+NSe(6)+">"),this.map&&(this.map.file=this.from)}error(e,n,r,s={}){let o,a,u;if(n&&typeof n=="object"){let f=n,h=r;if(typeof f.offset=="number"){let g=this.fromOffset(f.offset);n=g.line,r=g.col}else n=f.line,r=f.column;if(typeof h.offset=="number"){let g=this.fromOffset(h.offset);a=g.line,u=g.col}else a=h.line,u=h.column}else if(!r){let f=this.fromOffset(n);n=f.line,r=f.col}let c=this.origin(n,r,a,u);return c?o=new Y4(e,c.endLine===void 0?c.line:{column:c.column,line:c.line},c.endLine===void 0?c.column:{column:c.endColumn,line:c.endLine},c.source,c.file,s.plugin):o=new Y4(e,a===void 0?n:{column:r,line:n},a===void 0?r:{column:u,line:a},this.css,this.file,s.plugin),o.input={column:r,endColumn:u,endLine:a,line:n,source:this.css},this.file&&(Om&&(o.input.url=Om(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let n,r;if(this[_x])r=this[_x];else{let o=this.css.split(`
285
+ `);r=new Array(o.length);let a=0;for(let u=0,c=o.length;u<c;u++)r[u]=a,a+=o[u].length+1;this[_x]=r}n=r[r.length-1];let s=0;if(e>=n)s=r.length-1;else{let o=r.length-2,a;for(;s<o;)if(a=s+(o-s>>1),e<r[a])o=a-1;else if(e>=r[a+1])s=a+1;else{s=a;break}}return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:hA(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,n,r,s){if(!this.map)return!1;let o=this.map.consumer(),a=o.originalPositionFor({column:n,line:e});if(!a.source)return!1;let u;typeof r=="number"&&(u=o.originalPositionFor({column:s,line:r}));let c;fA(a.source)?c=Om(a.source):c=new URL(a.source,this.map.consumer().sourceRoot||Om(this.map.mapFile));let f={column:a.column,endColumn:u&&u.column,endLine:u&&u.line,line:a.line,url:c.toString()};if(c.protocol==="file:")if(K4)f.file=K4(c);else throw new Error("file: protocol is not available in this PostCSS build");let h=o.sourceContentFor(a.source);return h&&(f.source=h),f}toJSON(){let e={};for(let n of["hasBOM","css","file","id"])this[n]!=null&&(e[n]=this[n]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var Ub=ay;ay.default=ay;xx&&xx.registerInput&&xx.registerInput(ay);let{SourceMapConsumer:Yj,SourceMapGenerator:mv}=to,{dirname:vv,relative:Zj,resolve:Xj,sep:Qj}=to,{pathToFileURL:X4}=to,kSe=Ub,DSe=!!(Yj&&mv),LSe=!!(vv&&Xj&&Zj&&Qj),USe=class{constructor(e,n,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=n,this.opts=r,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let n=`
286
+ `;this.css.includes(`\r
287
+ `)&&(n=`\r
288
+ `),this.css+=n+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let n=this.toUrl(this.path(e.file)),r=e.root||vv(e.file),s;this.mapOpts.sourcesContent===!1?(s=new Yj(e.text),s.sourcesContent&&(s.sourcesContent=null)):s=e.consumer(),this.map.applySourceMap(s,n,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let n=this.root.nodes.length-1;n>=0;n--)e=this.root.nodes[n],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(n)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),LSe&&DSe&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,n=>{e+=n}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=mv.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new mv({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new mv({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,n=1,r="<no source>",s={generated:{column:0,line:0},original:{column:0,line:0},source:""},o,a;this.stringify(this.root,(u,c,f)=>{if(this.css+=u,c&&f!=="end"&&(s.generated.line=e,s.generated.column=n-1,c.source&&c.source.start?(s.source=this.sourcePath(c),s.original.line=c.source.start.line,s.original.column=c.source.start.column-1,this.map.addMapping(s)):(s.source=r,s.original.line=1,s.original.column=0,this.map.addMapping(s))),o=u.match(/\n/g),o?(e+=o.length,a=u.lastIndexOf(`
289
+ `),n=u.length-a):n+=u.length,c&&f!=="start"){let h=c.parent||{raws:{}};(!(c.type==="decl"||c.type==="atrule"&&!c.nodes)||c!==h.last||h.raws.semicolon)&&(c.source&&c.source.end?(s.source=this.sourcePath(c),s.original.line=c.source.end.line,s.original.column=c.source.end.column-1,s.generated.line=e,s.generated.column=n-2,this.map.addMapping(s)):(s.source=r,s.original.line=1,s.original.column=0,s.generated.line=e,s.generated.column=n-1,this.map.addMapping(s)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(n=>n.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let n=this.memoizedPaths.get(e);if(n)return n;let r=this.opts.to?vv(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=vv(Xj(r,this.mapOpts.annotation)));let s=Zj(r,e);return this.memoizedPaths.set(e,s),s}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let n=e.source.input.map;this.previousMaps.includes(n)||this.previousMaps.push(n)}});else{let e=new kSe(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(n=>{if(n.source){let r=n.source.input.from;if(r&&!e[r]){e[r]=!0;let s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,n.source.input.css)}}});else if(this.css){let n=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(n,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let n=this.memoizedFileURLs.get(e);if(n)return n;if(X4){let r=X4(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let n=this.memoizedURLs.get(e);if(n)return n;Qj==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var Jj=USe;let FSe=Db,pA=class extends FSe{constructor(e){super(e),this.type="comment"}};var Fb=pA;pA.default=pA;let{isClean:eB,my:tB}=mp,nB=Lb,rB=Fb,zSe=Db,sB,QR,JR,oB;function iB(t){return t.map(e=>(e.nodes&&(e.nodes=iB(e.nodes)),delete e.source,e))}function aB(t){if(t[eB]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)aB(e)}let xi=class lB extends zSe{append(...e){for(let n of e){let r=this.normalize(n,this.last);for(let s of r)this.proxyOf.nodes.push(s)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let n of this.nodes)n.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let n=this.getIterator(),r,s;for(;this.indexes[n]<this.proxyOf.nodes.length&&(r=this.indexes[n],s=e(this.proxyOf.nodes[r],r),s!==!1);)this.indexes[n]+=1;return delete this.indexes[n],s}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,n){return n==="proxyOf"?e:e[n]?n==="each"||typeof n=="string"&&n.startsWith("walk")?(...r)=>e[n](...r.map(s=>typeof s=="function"?(o,a)=>s(o.toProxy(),a):s)):n==="every"||n==="some"?r=>e[n]((s,...o)=>r(s.toProxy(),...o)):n==="root"?()=>e.root().toProxy():n==="nodes"?e.nodes.map(r=>r.toProxy()):n==="first"||n==="last"?e[n].toProxy():e[n]:e[n]},set(e,n,r){return e[n]===r||(e[n]=r,(n==="name"||n==="params"||n==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,n){let r=this.index(e),s=this.normalize(n,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let a of s)this.proxyOf.nodes.splice(r+1,0,a);let o;for(let a in this.indexes)o=this.indexes[a],r<o&&(this.indexes[a]=o+s.length);return this.markDirty(),this}insertBefore(e,n){let r=this.index(e),s=r===0?"prepend":!1,o=this.normalize(n,this.proxyOf.nodes[r],s).reverse();r=this.index(e);for(let u of o)this.proxyOf.nodes.splice(r,0,u);let a;for(let u in this.indexes)a=this.indexes[u],r<=a&&(this.indexes[u]=a+o.length);return this.markDirty(),this}normalize(e,n){if(typeof e=="string")e=iB(sB(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new nB(e)]}else if(e.selector)e=[new QR(e)];else if(e.name)e=[new JR(e)];else if(e.text)e=[new rB(e)];else throw new Error("Unknown node type in node creation");return e.map(s=>(s[tB]||lB.rebuild(s),s=s.proxyOf,s.parent&&s.parent.removeChild(s),s[eB]&&aB(s),typeof s.raws.before>"u"&&n&&typeof n.raws.before<"u"&&(s.raws.before=n.raws.before.replace(/\S/g,"")),s.parent=this.proxyOf,s))}prepend(...e){e=e.reverse();for(let n of e){let r=this.normalize(n,this.first,"prepend").reverse();for(let s of r)this.proxyOf.nodes.unshift(s);for(let s in this.indexes)this.indexes[s]=this.indexes[s]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let n;for(let r in this.indexes)n=this.indexes[r],n>=e&&(this.indexes[r]=n-1);return this.markDirty(),this}replaceValues(e,n,r){return r||(r=n,n={}),this.walkDecls(s=>{n.props&&!n.props.includes(s.prop)||n.fast&&!s.value.includes(n.fast)||(s.value=s.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((n,r)=>{let s;try{s=e(n,r)}catch(o){throw n.addToError(o)}return s!==!1&&n.walk&&(s=n.walk(e)),s})}walkAtRules(e,n){return n?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="atrule"&&e.test(r.name))return n(r,s)}):this.walk((r,s)=>{if(r.type==="atrule"&&r.name===e)return n(r,s)}):(n=e,this.walk((r,s)=>{if(r.type==="atrule")return n(r,s)}))}walkComments(e){return this.walk((n,r)=>{if(n.type==="comment")return e(n,r)})}walkDecls(e,n){return n?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="decl"&&e.test(r.prop))return n(r,s)}):this.walk((r,s)=>{if(r.type==="decl"&&r.prop===e)return n(r,s)}):(n=e,this.walk((r,s)=>{if(r.type==="decl")return n(r,s)}))}walkRules(e,n){return n?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="rule"&&e.test(r.selector))return n(r,s)}):this.walk((r,s)=>{if(r.type==="rule"&&r.selector===e)return n(r,s)}):(n=e,this.walk((r,s)=>{if(r.type==="rule")return n(r,s)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};xi.registerParse=t=>{sB=t};xi.registerRule=t=>{QR=t};xi.registerAtRule=t=>{JR=t};xi.registerRoot=t=>{oB=t};var gu=xi;xi.default=xi;xi.rebuild=t=>{t.type==="atrule"?Object.setPrototypeOf(t,JR.prototype):t.type==="rule"?Object.setPrototypeOf(t,QR.prototype):t.type==="decl"?Object.setPrototypeOf(t,nB.prototype):t.type==="comment"?Object.setPrototypeOf(t,rB.prototype):t.type==="root"&&Object.setPrototypeOf(t,oB.prototype),t[tB]=!0,t.nodes&&t.nodes.forEach(e=>{xi.rebuild(e)})};let jSe=gu,uB,cB,Vh=class extends jSe{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new uB(new cB,this,e).stringify()}};Vh.registerLazyResult=t=>{uB=t};Vh.registerProcessor=t=>{cB=t};var eI=Vh;Vh.default=Vh;let gA=class{constructor(e,n={}){if(this.type="warning",this.text=e,n.node&&n.node.source){let r=n.node.rangeBy(n);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in n)this[r]=n[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var dB=gA;gA.default=gA;let BSe=dB,mA=class{constructor(e,n,r){this.processor=e,this.messages=[],this.root=n,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,n={}){n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);let r=new BSe(e,n);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var tI=mA;mA.default=mA;const Ax=39,Q4=34,Nm=92,J4=47,Mm=10,Wf=32,Pm=12,km=9,Dm=13,HSe=91,$Se=93,qSe=40,WSe=41,VSe=123,GSe=125,KSe=59,YSe=42,ZSe=58,XSe=64,Lm=/[\t\n\f\r "#'()/;[\\\]{}]/g,Um=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,QSe=/.[\r\n"'(/\\]/,e5=/[\da-f]/i;var JSe=function(e,n={}){let r=e.css.valueOf(),s=n.ignoreErrors,o,a,u,c,f,h,g,m,y,S,E=r.length,C=0,w=[],x=[];function T(){return C}function R(k){throw e.error("Unclosed "+k,C)}function M(){return x.length===0&&C>=E}function N(k){if(x.length)return x.pop();if(C>=E)return;let F=k?k.ignoreUnclosed:!1;switch(o=r.charCodeAt(C),o){case Mm:case Wf:case km:case Dm:case Pm:{a=C;do a+=1,o=r.charCodeAt(a);while(o===Wf||o===Mm||o===km||o===Dm||o===Pm);S=["space",r.slice(C,a)],C=a-1;break}case HSe:case $Se:case VSe:case GSe:case ZSe:case KSe:case WSe:{let $=String.fromCharCode(o);S=[$,$,C];break}case qSe:{if(m=w.length?w.pop()[1]:"",y=r.charCodeAt(C+1),m==="url"&&y!==Ax&&y!==Q4&&y!==Wf&&y!==Mm&&y!==km&&y!==Pm&&y!==Dm){a=C;do{if(h=!1,a=r.indexOf(")",a+1),a===-1)if(s||F){a=C;break}else R("bracket");for(g=a;r.charCodeAt(g-1)===Nm;)g-=1,h=!h}while(h);S=["brackets",r.slice(C,a+1),C,a],C=a}else a=r.indexOf(")",C+1),c=r.slice(C,a+1),a===-1||QSe.test(c)?S=["(","(",C]:(S=["brackets",c,C,a],C=a);break}case Ax:case Q4:{u=o===Ax?"'":'"',a=C;do{if(h=!1,a=r.indexOf(u,a+1),a===-1)if(s||F){a=C+1;break}else R("string");for(g=a;r.charCodeAt(g-1)===Nm;)g-=1,h=!h}while(h);S=["string",r.slice(C,a+1),C,a],C=a;break}case XSe:{Lm.lastIndex=C+1,Lm.test(r),Lm.lastIndex===0?a=r.length-1:a=Lm.lastIndex-2,S=["at-word",r.slice(C,a+1),C,a],C=a;break}case Nm:{for(a=C,f=!0;r.charCodeAt(a+1)===Nm;)a+=1,f=!f;if(o=r.charCodeAt(a+1),f&&o!==J4&&o!==Wf&&o!==Mm&&o!==km&&o!==Dm&&o!==Pm&&(a+=1,e5.test(r.charAt(a)))){for(;e5.test(r.charAt(a+1));)a+=1;r.charCodeAt(a+1)===Wf&&(a+=1)}S=["word",r.slice(C,a+1),C,a],C=a;break}default:{o===J4&&r.charCodeAt(C+1)===YSe?(a=r.indexOf("*/",C+2)+1,a===0&&(s||F?a=r.length:R("comment")),S=["comment",r.slice(C,a+1),C,a],C=a):(Um.lastIndex=C+1,Um.test(r),Um.lastIndex===0?a=r.length-1:a=Um.lastIndex-2,S=["word",r.slice(C,a+1),C,a],w.push(S),C=a);break}}return C++,S}function O(k){x.push(k)}return{back:O,endOfFile:M,nextToken:N,position:T}};let fB=gu,ly=class extends fB{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var nI=ly;ly.default=ly;fB.registerAtRule(ly);let hB=gu,pB,gB,Xc=class extends hB{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,n,r){let s=super.normalize(e);if(n){if(r==="prepend")this.nodes.length>1?n.raws.before=this.nodes[1].raws.before:delete n.raws.before;else if(this.first!==n)for(let o of s)o.raws.before=n.raws.before}return s}removeChild(e,n){let r=this.index(e);return!n&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new pB(new gB,this,e).stringify()}};Xc.registerLazyResult=t=>{pB=t};Xc.registerProcessor=t=>{gB=t};var vp=Xc;Xc.default=Xc;hB.registerRoot(Xc);let Gh={comma(t){return Gh.split(t,[","],!0)},space(t){let e=[" ",`
290
+ `," "];return Gh.split(t,e)},split(t,e,n){let r=[],s="",o=!1,a=0,u=!1,c="",f=!1;for(let h of t)f?f=!1:h==="\\"?f=!0:u?h===c&&(u=!1):h==='"'||h==="'"?(u=!0,c=h):h==="("?a+=1:h===")"?a>0&&(a-=1):a===0&&e.includes(h)&&(o=!0),o?(s!==""&&r.push(s.trim()),s="",o=!1):s+=h;return(n||s!=="")&&r.push(s.trim()),r}};var mB=Gh;Gh.default=Gh;let vB=gu,eEe=mB,uy=class extends vB{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return eEe.comma(this.selector)}set selectors(e){let n=this.selector?this.selector.match(/,\s*/):null,r=n?n[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var rI=uy;uy.default=uy;vB.registerRule(uy);let tEe=Lb,nEe=JSe,rEe=Fb,sEe=nI,oEe=vp,t5=rI;const n5={empty:!0,space:!0};function iEe(t){for(let e=t.length-1;e>=0;e--){let n=t[e],r=n[3]||n[2];if(r)return r}}let aEe=class{constructor(e){this.input=e,this.root=new oEe,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let n=new sEe;n.name=e[1].slice(1),n.name===""&&this.unnamedAtrule(n,e),this.init(n,e[2]);let r,s,o,a=!1,u=!1,c=[],f=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?f.push(r==="("?")":"]"):r==="{"&&f.length>0?f.push("}"):r===f[f.length-1]&&f.pop(),f.length===0)if(r===";"){n.source.end=this.getPosition(e[2]),n.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){u=!0;break}else if(r==="}"){if(c.length>0){for(o=c.length-1,s=c[o];s&&s[0]==="space";)s=c[--o];s&&(n.source.end=this.getPosition(s[3]||s[2]),n.source.end.offset++)}this.end(e);break}else c.push(e);else c.push(e);if(this.tokenizer.endOfFile()){a=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(c),c.length?(n.raws.afterName=this.spacesAndCommentsFromStart(c),this.raw(n,"params",c),a&&(e=c[c.length-1],n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),u&&(n.nodes=[],this.current=n)}checkMissedSemicolon(e){let n=this.colon(e);if(n===!1)return;let r=0,s;for(let o=n-1;o>=0&&(s=e[o],!(s[0]!=="space"&&(r+=1,r===2)));o--);throw this.input.error("Missed semicolon",s[0]==="word"?s[3]+1:s[2])}colon(e){let n=0,r,s,o;for(let[a,u]of e.entries()){if(r=u,s=r[0],s==="("&&(n+=1),s===")"&&(n-=1),n===0&&s===":")if(!o)this.doubleColon(r);else{if(o[0]==="word"&&o[1]==="progid")continue;return a}o=r}return!1}comment(e){let n=new rEe;this.init(n,e[2]),n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))n.text="",n.raws.left=r,n.raws.right="";else{let s=r.match(/^(\s*)([^]*\S)(\s*)$/);n.text=s[2],n.raws.left=s[1],n.raws.right=s[3]}}createTokenizer(){this.tokenizer=nEe(this.input)}decl(e,n){let r=new tEe;this.init(r,e[0][2]);let s=e[e.length-1];for(s[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(s[3]||s[2]||iEe(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let f=e[0][0];if(f===":"||f==="space"||f==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let o;for(;e.length;)if(o=e.shift(),o[0]===":"){r.raws.between+=o[1];break}else o[0]==="word"&&/\w/.test(o[1])&&this.unknownWord([o]),r.raws.between+=o[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let a=[],u;for(;e.length&&(u=e[0][0],!(u!=="space"&&u!=="comment"));)a.push(e.shift());this.precheckMissedSemicolon(e);for(let f=e.length-1;f>=0;f--){if(o=e[f],o[1].toLowerCase()==="!important"){r.important=!0;let h=this.stringFrom(e,f);h=this.spacesFromEnd(e)+h,h!==" !important"&&(r.raws.important=h);break}else if(o[1].toLowerCase()==="important"){let h=e.slice(0),g="";for(let m=f;m>0;m--){let y=h[m][0];if(g.trim().indexOf("!")===0&&y!=="space")break;g=h.pop()[1]+g}g.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=g,e=h)}if(o[0]!=="space"&&o[0]!=="comment")break}e.some(f=>f[0]!=="space"&&f[0]!=="comment")&&(r.raws.between+=a.map(f=>f[1]).join(""),a=[]),this.raw(r,"value",a.concat(e),n),r.value.includes(":")&&!n&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let n=new t5;this.init(n,e[2]),n.selector="",n.raws.between="",this.current=n}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let n=this.current.nodes[this.current.nodes.length-1];n&&n.type==="rule"&&!n.raws.ownSemicolon&&(n.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let n=this.input.fromOffset(e);return{column:n.col,line:n.line,offset:e}}init(e,n){this.current.push(e),e.source={input:this.input,start:this.getPosition(n)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let n=!1,r=null,s=!1,o=null,a=[],u=e[1].startsWith("--"),c=[],f=e;for(;f;){if(r=f[0],c.push(f),r==="("||r==="[")o||(o=f),a.push(r==="("?")":"]");else if(u&&s&&r==="{")o||(o=f),a.push("}");else if(a.length===0)if(r===";")if(s){this.decl(c,u);return}else break;else if(r==="{"){this.rule(c);return}else if(r==="}"){this.tokenizer.back(c.pop()),n=!0;break}else r===":"&&(s=!0);else r===a[a.length-1]&&(a.pop(),a.length===0&&(o=null));f=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(n=!0),a.length>0&&this.unclosedBracket(o),n&&s){if(!u)for(;c.length&&(f=c[c.length-1][0],!(f!=="space"&&f!=="comment"));)this.tokenizer.back(c.pop());this.decl(c,u)}else this.unknownWord(c)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,n,r,s){let o,a,u=r.length,c="",f=!0,h,g;for(let m=0;m<u;m+=1)o=r[m],a=o[0],a==="space"&&m===u-1&&!s?f=!1:a==="comment"?(g=r[m-1]?r[m-1][0]:"empty",h=r[m+1]?r[m+1][0]:"empty",!n5[g]&&!n5[h]?c.slice(-1)===","?f=!1:c+=o[1]:f=!1):c+=o[1];if(!f){let m=r.reduce((y,S)=>y+S[1],"");e.raws[n]={raw:m,value:c}}e[n]=c}rule(e){e.pop();let n=new t5;this.init(n,e[0][2]),n.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(n,"selector",e),this.current=n}spacesAndCommentsFromEnd(e){let n,r="";for(;e.length&&(n=e[e.length-1][0],!(n!=="space"&&n!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let n,r="";for(;e.length&&(n=e[0][0],!(n!=="space"&&n!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let n,r="";for(;e.length&&(n=e[e.length-1][0],n==="space");)r=e.pop()[1]+r;return r}stringFrom(e,n){let r="";for(let s=n;s<e.length;s++)r+=e[s][1];return e.splice(n,e.length-n),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,n){throw this.input.error("At-rule without name",{offset:n[2]},{offset:n[2]+n[1].length})}};var lEe=aEe;let uEe=gu,cEe=lEe,dEe=Ub;function cy(t,e){let n=new dEe(t,e),r=new cEe(n);try{r.parse()}catch(s){throw s}return r.root}var sI=cy;cy.default=cy;uEe.registerParse(cy);let{isClean:bo,my:fEe}=mp,hEe=Jj,pEe=kb,gEe=gu,mEe=eI,r5=tI,vEe=sI,yEe=vp;const bEe={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},SEe={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},EEe={Once:!0,postcssPlugin:!0,prepare:!0},Qc=0;function Vf(t){return typeof t=="object"&&typeof t.then=="function"}function yB(t){let e=!1,n=bEe[t.type];return t.type==="decl"?e=t.prop.toLowerCase():t.type==="atrule"&&(e=t.name.toLowerCase()),e&&t.append?[n,n+"-"+e,Qc,n+"Exit",n+"Exit-"+e]:e?[n,n+"-"+e,n+"Exit",n+"Exit-"+e]:t.append?[n,Qc,n+"Exit"]:[n,n+"Exit"]}function s5(t){let e;return t.type==="document"?e=["Document",Qc,"DocumentExit"]:t.type==="root"?e=["Root",Qc,"RootExit"]:e=yB(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function vA(t){return t[bo]=!1,t.nodes&&t.nodes.forEach(e=>vA(e)),t}let yA={},Jc=class bB{constructor(e,n,r){this.stringified=!1,this.processed=!1;let s;if(typeof n=="object"&&n!==null&&(n.type==="root"||n.type==="document"))s=vA(n);else if(n instanceof bB||n instanceof r5)s=vA(n.root),n.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{let o=vEe;r.syntax&&(o=r.syntax.parse),r.parser&&(o=r.parser),o.parse&&(o=o.parse);try{s=o(n,r)}catch(a){this.processed=!0,this.error=a}s&&!s[fEe]&&gEe.rebuild(s)}this.result=new r5(e,s,r),this.helpers={...yA,postcss:yA,result:this.result},this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?{...o,...o.prepare(this.result)}:o)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,n){let r=this.result.lastPlugin;try{n&&n.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(s){console&&console.error&&console.error(s)}return e}prepareVisitors(){this.listeners={};let e=(n,r,s)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([n,s])};for(let n of this.plugins)if(typeof n=="object")for(let r in n){if(!SEe[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${n.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!EEe[r])if(typeof n[r]=="object")for(let s in n[r])s==="*"?e(n,r,n[r][s]):e(n,r+"-"+s.toLowerCase(),n[r][s]);else typeof n[r]=="function"&&e(n,r,n[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let n=this.plugins[e],r=this.runOnRoot(n);if(Vf(r))try{await r}catch(s){throw this.handleError(s)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[bo];){e[bo]=!0;let n=[s5(e)];for(;n.length>0;){let r=this.visitTick(n);if(Vf(r))try{await r}catch(s){let o=n[n.length-1].node;throw this.handleError(s,o)}}}if(this.listeners.OnceExit)for(let[n,r]of this.listeners.OnceExit){this.result.lastPlugin=n;try{if(e.type==="document"){let s=e.nodes.map(o=>r(o,this.helpers));await Promise.all(s)}else await r(e,this.helpers)}catch(s){throw this.handleError(s)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let n=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return Vf(n[0])?Promise.all(n):n}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(n){throw this.handleError(n)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,n=pEe;e.syntax&&(n=e.syntax.stringify),e.stringifier&&(n=e.stringifier),n.stringify&&(n=n.stringify);let s=new hEe(n,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let n=this.runOnRoot(e);if(Vf(n))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[bo];)e[bo]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let n of e.nodes)this.visitSync(this.listeners.OnceExit,n);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,n){return this.async().then(e,n)}toString(){return this.css}visitSync(e,n){for(let[r,s]of e){this.result.lastPlugin=r;let o;try{o=s(n,this.helpers)}catch(a){throw this.handleError(a,n.proxyOf)}if(n.type!=="root"&&n.type!=="document"&&!n.parent)return!0;if(Vf(o))throw this.getAsyncError()}}visitTick(e){let n=e[e.length-1],{node:r,visitors:s}=n;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(s.length>0&&n.visitorIndex<s.length){let[a,u]=s[n.visitorIndex];n.visitorIndex+=1,n.visitorIndex===s.length&&(n.visitors=[],n.visitorIndex=0),this.result.lastPlugin=a;try{return u(r.toProxy(),this.helpers)}catch(c){throw this.handleError(c,r)}}if(n.iterator!==0){let a=n.iterator,u;for(;u=r.nodes[r.indexes[a]];)if(r.indexes[a]+=1,!u[bo]){u[bo]=!0,e.push(s5(u));return}n.iterator=0,delete r.indexes[a]}let o=n.events;for(;n.eventIndex<o.length;){let a=o[n.eventIndex];if(n.eventIndex+=1,a===Qc){r.nodes&&r.nodes.length&&(r[bo]=!0,n.iterator=r.getIterator());return}else if(this.listeners[a]){n.visitors=this.listeners[a];return}}e.pop()}walkSync(e){e[bo]=!0;let n=yB(e);for(let r of n)if(r===Qc)e.nodes&&e.each(s=>{s[bo]||this.walkSync(s)});else{let s=this.listeners[r];if(s&&this.visitSync(s,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};Jc.registerPostcss=t=>{yA=t};var SB=Jc;Jc.default=Jc;yEe.registerLazyResult(Jc);mEe.registerLazyResult(Jc);let CEe=Jj,wEe=kb,xEe=sI;const _Ee=tI;let bA=class{constructor(e,n,r){n=n.toString(),this.stringified=!1,this._processor=e,this._css=n,this._opts=r,this._map=void 0;let s,o=wEe;this.result=new _Ee(this._processor,s,this._opts),this.result.css=n;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let u=new CEe(o,s,this._opts,n);if(u.isMap()){let[c,f]=u.generate();c&&(this.result.css=c),f&&(this.result.map=f)}else u.clearAnnotation(),this.result.css=u.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,n){return this.async().then(e,n)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,n=xEe;try{e=n(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var AEe=bA;bA.default=bA;let TEe=AEe,REe=SB,IEe=eI,OEe=vp,Kh=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let n=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))n=n.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)n.push(r);else if(typeof r=="function")n.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return n}process(e,n={}){return!this.plugins.length&&!n.parser&&!n.stringifier&&!n.syntax?new TEe(this,e,n):new REe(this,e,n)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var NEe=Kh;Kh.default=Kh;OEe.registerProcessor(Kh);IEe.registerProcessor(Kh);let MEe=Lb,PEe=Kj,kEe=Fb,DEe=nI,LEe=Ub,UEe=vp,FEe=rI;function Yh(t,e){if(Array.isArray(t))return t.map(s=>Yh(s));let{inputs:n,...r}=t;if(n){e=[];for(let s of n){let o={...s,__proto__:LEe.prototype};o.map&&(o.map={...o.map,__proto__:PEe.prototype}),e.push(o)}}if(r.nodes&&(r.nodes=t.nodes.map(s=>Yh(s,e))),r.source){let{inputId:s,...o}=r.source;r.source=o,s!=null&&(r.source.input=e[s])}if(r.type==="root")return new UEe(r);if(r.type==="decl")return new MEe(r);if(r.type==="rule")return new FEe(r);if(r.type==="comment")return new kEe(r);if(r.type==="atrule")return new DEe(r);throw new Error("Unknown node type: "+t.type)}var zEe=Yh;Yh.default=Yh;let jEe=XR,EB=Lb,BEe=SB,HEe=gu,oI=NEe,$Ee=kb,qEe=zEe,CB=eI,WEe=dB,wB=Fb,xB=nI,VEe=tI,GEe=Ub,KEe=sI,YEe=mB,_B=rI,AB=vp,ZEe=Db;function Ut(...t){return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new oI(t)}Ut.plugin=function(e,n){let r=!1;function s(...a){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
291
+ https://evilmartians.com/chronicles/postcss-8-plugin-migration`),Qv.LANG&&Qv.LANG.startsWith("cn")&&console.warn(e+`: 里面 postcss.plugin 被弃用. 迁移指南:
292
+ https://www.w3ctech.com/topic/2226`));let u=n(...a);return u.postcssPlugin=e,u.postcssVersion=new oI().version,u}let o;return Object.defineProperty(s,"postcss",{get(){return o||(o=s()),o}}),s.process=function(a,u,c){return Ut([s(c)]).process(a,u)},s};Ut.stringify=$Ee;Ut.parse=KEe;Ut.fromJSON=qEe;Ut.list=YEe;Ut.comment=t=>new wB(t);Ut.atRule=t=>new xB(t);Ut.decl=t=>new EB(t);Ut.rule=t=>new _B(t);Ut.root=t=>new AB(t);Ut.document=t=>new CB(t);Ut.CssSyntaxError=jEe;Ut.Declaration=EB;Ut.Container=HEe;Ut.Processor=oI;Ut.Document=CB;Ut.Comment=wB;Ut.Warning=WEe;Ut.AtRule=xB;Ut.Result=VEe;Ut.Input=GEe;Ut.Rule=_B;Ut.Root=AB;Ut.Node=ZEe;BEe.registerPostcss(Ut);var XEe=Ut;Ut.default=Ut;const an=cSe(XEe);an.stringify;an.fromJSON;an.plugin;an.parse;an.list;an.document;an.comment;an.atRule;an.rule;an.decl;an.root;an.CssSyntaxError;an.Declaration;an.Container;an.Processor;an.Document;an.Comment;an.Warning;an.AtRule;an.Result;an.Input;an.Rule;an.Root;an.Node;class iI{constructor(...e){ws(this,"parentElement",null),ws(this,"parentNode",null),ws(this,"ownerDocument"),ws(this,"firstChild",null),ws(this,"lastChild",null),ws(this,"previousSibling",null),ws(this,"nextSibling",null),ws(this,"ELEMENT_NODE",1),ws(this,"TEXT_NODE",3),ws(this,"nodeType"),ws(this,"nodeName"),ws(this,"RRNodeType")}get childNodes(){const e=[];let n=this.firstChild;for(;n;)e.push(n),n=n.nextSibling;return e}contains(e){if(e instanceof iI){if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0}else return!1;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,n){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}const o5={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},i5={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Fm={},QEe=()=>!!globalThis.Zone;function aI(t){if(Fm[t])return Fm[t];const e=globalThis[t],n=e.prototype,r=t in o5?o5[t]:void 0,s=!!(r&&r.every(u=>{var c,f;return!!((f=(c=Object.getOwnPropertyDescriptor(n,u))==null?void 0:c.get)!=null&&f.toString().includes("[native code]"))})),o=t in i5?i5[t]:void 0,a=!!(o&&o.every(u=>{var c;return typeof n[u]=="function"&&((c=n[u])==null?void 0:c.toString().includes("[native code]"))}));if(s&&a&&!QEe())return Fm[t]=e.prototype,e.prototype;try{const u=document.createElement("iframe");document.body.appendChild(u);const c=u.contentWindow;if(!c)return e.prototype;const f=c[t].prototype;return document.body.removeChild(u),f?Fm[t]=f:n}catch{return n}}const Tx={};function Ni(t,e,n){var r;const s=`${t}.${String(n)}`;if(Tx[s])return Tx[s].call(e);const o=aI(t),a=(r=Object.getOwnPropertyDescriptor(o,n))==null?void 0:r.get;return a?(Tx[s]=a,a.call(e)):e[n]}const Rx={};function TB(t,e,n){const r=`${t}.${String(n)}`;if(Rx[r])return Rx[r].bind(e);const o=aI(t)[n];return typeof o!="function"?e[n]:(Rx[r]=o,o.bind(e))}function JEe(t){return Ni("Node",t,"ownerDocument")}function eCe(t){return Ni("Node",t,"childNodes")}function tCe(t){return Ni("Node",t,"parentNode")}function nCe(t){return Ni("Node",t,"parentElement")}function rCe(t){return Ni("Node",t,"textContent")}function sCe(t,e){return TB("Node",t,"contains")(e)}function oCe(t){return TB("Node",t,"getRootNode")()}function iCe(t){return!t||!("host"in t)?null:Ni("ShadowRoot",t,"host")}function aCe(t){return t.styleSheets}function lCe(t){return!t||!("shadowRoot"in t)?null:Ni("Element",t,"shadowRoot")}function uCe(t,e){return Ni("Element",t,"querySelector")(e)}function cCe(t,e){return Ni("Element",t,"querySelectorAll")(e)}function RB(){return aI("MutationObserver").constructor}function mu(t,e,n){try{if(!(e in t))return()=>{};const r=t[e],s=n(r);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=s,()=>{t[e]=r}}catch{return()=>{}}}const rt={ownerDocument:JEe,childNodes:eCe,parentNode:tCe,parentElement:nCe,textContent:rCe,contains:sCe,getRootNode:oCe,host:iCe,styleSheets:aCe,shadowRoot:lCe,querySelector:uCe,querySelectorAll:cCe,mutationObserver:RB,patch:mu};function Cr(t,e,n=document){const r={capture:!0,passive:!0};return n.addEventListener(t,e,r),()=>n.removeEventListener(t,e,r)}const Cc=`Please stop import mirror directly. Instead of that,\r
293
+ now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
294
+ or you can use record.mirror to access the mirror instance during recording.`;let a5={map:{},getId(){return console.error(Cc),-1},getNode(){return console.error(Cc),null},removeNodeFromMap(){console.error(Cc)},has(){return console.error(Cc),!1},reset(){console.error(Cc)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(a5=new Proxy(a5,{get(t,e,n){return e==="map"&&console.error(Cc),Reflect.get(t,e,n)}}));function Zh(t,e,n={}){let r=null,s=0;return function(...o){const a=Date.now();!s&&n.leading===!1&&(s=a);const u=e-(a-s),c=this;u<=0||u>e?(r&&(clearTimeout(r),r=null),s=a,t.apply(c,o)):!r&&n.trailing!==!1&&(r=setTimeout(()=>{s=n.leading===!1?0:Date.now(),r=null,t.apply(c,o)},u))}}function zb(t,e,n,r,s=window){const o=s.Object.getOwnPropertyDescriptor(t,e);return s.Object.defineProperty(t,e,r?n:{set(a){setTimeout(()=>{n.set.call(this,a)},0),o&&o.set&&o.set.call(this,a)}}),()=>zb(t,e,o||{},!0)}let dy=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(dy=()=>new Date().getTime());function IB(t){var e,n,r,s;const o=t.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:t.pageXOffset!==void 0?t.pageXOffset:o.documentElement.scrollLeft||o?.body&&((e=rt.parentElement(o.body))==null?void 0:e.scrollLeft)||((n=o?.body)==null?void 0:n.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:t.pageYOffset!==void 0?t.pageYOffset:o?.documentElement.scrollTop||o?.body&&((r=rt.parentElement(o.body))==null?void 0:r.scrollTop)||((s=o?.body)==null?void 0:s.scrollTop)||0}}function OB(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function NB(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function MB(t){return t?t.nodeType===t.ELEMENT_NODE?t:rt.parentElement(t):null}function wr(t,e,n,r){if(!t)return!1;const s=MB(t);if(!s)return!1;try{if(typeof e=="string"){if(s.classList.contains(e)||r&&s.closest("."+e)!==null)return!0}else if(ny(s,e,r))return!0}catch{}return!!(n&&(s.matches(n)||r&&s.closest(n)!==null))}function dCe(t,e){return e.getId(t)!==-1}function Ix(t,e,n){return t.tagName==="TITLE"&&n.headTitleMutations?!0:e.getId(t)===Bh}function PB(t,e){if(bh(t))return!1;const n=e.getId(t);if(!e.has(n))return!0;const r=rt.parentNode(t);return r&&r.nodeType===t.DOCUMENT_NODE?!1:r?PB(r,e):!0}function SA(t){return!!t.changedTouches}function fCe(t=window){"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function kB(t,e){return!!(t.nodeName==="IFRAME"&&e.getMeta(t))}function DB(t,e){return!!(t.nodeName==="LINK"&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&t.getAttribute("rel")==="stylesheet"&&e.getMeta(t))}function EA(t){return t?t instanceof iI&&"shadowRoot"in t?!!t.shadowRoot:!!rt.shadowRoot(t):!1}class hCe{constructor(){Se(this,"id",1),Se(this,"styleIDMap",new WeakMap),Se(this,"idStyleMap",new Map)}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,n){if(this.has(e))return this.getId(e);let r;return n===void 0?r=this.id++:r=n,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function LB(t){var e;let n=null;return"getRootNode"in t&&((e=rt.getRootNode(t))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&rt.host(rt.getRootNode(t))&&(n=rt.host(rt.getRootNode(t))),n}function pCe(t){let e=t,n;for(;n=LB(e);)e=n;return e}function gCe(t){const e=rt.ownerDocument(t);if(!e)return!1;const n=pCe(t);return rt.contains(e,n)}function UB(t){const e=rt.ownerDocument(t);return e?rt.contains(e,t)||gCe(t):!1}var Ct=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t))(Ct||{}),ft=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t[t.CustomElement=16]="CustomElement",t))(ft||{}),Ur=(t=>(t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel",t))(Ur||{}),oi=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(oi||{}),ed=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(ed||{}),wc=(t=>(t[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Seeked=2]="Seeked",t[t.VolumeChange=3]="VolumeChange",t[t.RateChange=4]="RateChange",t))(wc||{}),FB=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(FB||{});function l5(t){return"__ln"in t}class mCe{constructor(){Se(this,"length",0),Se(this,"head",null),Se(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<e;r++)n=n?.next||null;return n}addNode(e){const n={value:e,previous:null,next:null};if(e.__ln=n,e.previousSibling&&l5(e.previousSibling)){const r=e.previousSibling.__ln.next;n.next=r,n.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(e.nextSibling&&l5(e.nextSibling)&&e.nextSibling.__ln.previous){const r=e.nextSibling.__ln.previous;n.previous=r,n.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;n.next===null&&(this.tail=n),this.length++}removeNode(e){const n=e.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next?n.next.previous=n.previous:this.tail=n.previous):(this.head=n.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const u5=(t,e)=>`${t}@${e}`;class vCe{constructor(){Se(this,"frozen",!1),Se(this,"locked",!1),Se(this,"texts",[]),Se(this,"attributes",[]),Se(this,"attributeMap",new WeakMap),Se(this,"removes",[]),Se(this,"mapRemoves",[]),Se(this,"movedMap",{}),Se(this,"addedSet",new Set),Se(this,"movedSet",new Set),Se(this,"droppedSet",new Set),Se(this,"removesSubTreeCache",new Set),Se(this,"mutationCb"),Se(this,"blockClass"),Se(this,"blockSelector"),Se(this,"maskTextClass"),Se(this,"maskTextSelector"),Se(this,"inlineStylesheet"),Se(this,"maskInputOptions"),Se(this,"maskTextFn"),Se(this,"maskInputFn"),Se(this,"keepIframeSrcFn"),Se(this,"recordCanvas"),Se(this,"inlineImages"),Se(this,"slimDOMOptions"),Se(this,"dataURLOptions"),Se(this,"doc"),Se(this,"mirror"),Se(this,"iframeManager"),Se(this,"stylesheetManager"),Se(this,"shadowDomManager"),Se(this,"canvasManager"),Se(this,"processedNodeManager"),Se(this,"unattachedDoc"),Se(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),Se(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],n=new Set,r=new mCe,s=c=>{let f=c,h=Bh;for(;h===Bh;)f=f&&f.nextSibling,h=f&&this.mirror.getId(f);return h},o=c=>{const f=rt.parentNode(c);if(!f||!UB(c))return;let h=!1;if(c.nodeType===Node.TEXT_NODE){const S=f.tagName;if(S==="TEXTAREA")return;S==="STYLE"&&this.addedSet.has(f)&&(h=!0)}const g=bh(f)?this.mirror.getId(LB(c)):this.mirror.getId(f),m=s(c);if(g===-1||m===-1)return r.addNode(c);const y=Mc(c,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:S=>{kB(S,this.mirror)&&this.iframeManager.addIframe(S),DB(S,this.mirror)&&this.stylesheetManager.trackLinkElement(S),EA(c)&&this.shadowDomManager.addShadowRoot(rt.shadowRoot(c),this.doc)},onIframeLoad:(S,E)=>{this.iframeManager.attachIframe(S,E),this.shadowDomManager.observeAttachShadow(S)},onStylesheetLoad:(S,E)=>{this.stylesheetManager.attachLinkElement(S,E)},cssCaptured:h});y&&(e.push({parentId:g,nextId:m,node:y}),n.add(y.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const c of this.movedSet)c5(this.removesSubTreeCache,c,this.mirror)&&!this.movedSet.has(rt.parentNode(c))||o(c);for(const c of this.addedSet)!d5(this.droppedSet,c)&&!c5(this.removesSubTreeCache,c,this.mirror)||d5(this.movedSet,c)?o(c):this.droppedSet.add(c);let a=null;for(;r.length;){let c=null;if(a){const f=this.mirror.getId(rt.parentNode(a.value)),h=s(a.value);f!==-1&&h!==-1&&(c=a)}if(!c){let f=r.tail;for(;f;){const h=f;if(f=f.previous,h){const g=this.mirror.getId(rt.parentNode(h.value));if(s(h.value)===-1)continue;if(g!==-1){c=h;break}else{const y=h.value,S=rt.parentNode(y);if(S&&S.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const E=rt.host(S);if(this.mirror.getId(E)!==-1){c=h;break}}}}}}if(!c){for(;r.head;)r.removeNode(r.head.value);break}a=c.previous,r.removeNode(c.value),o(c.value)}const u={texts:this.texts.map(c=>{const f=c.node,h=rt.parentNode(f);return h&&h.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(h),{id:this.mirror.getId(f),value:c.value}}).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),attributes:this.attributes.map(c=>{const{attributes:f}=c;if(typeof f.style=="string"){const h=JSON.stringify(c.styleDiff),g=JSON.stringify(c._unchangedStyles);h.length<f.style.length&&(h+g).split("var(").length===f.style.split("var(").length&&(f.style=c.styleDiff)}return{id:this.mirror.getId(c.node),attributes:f}}).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),removes:this.removes,adds:e};!u.texts.length&&!u.attributes.length&&!u.removes.length&&!u.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(u))}),Se(this,"genTextAreaValueMutation",e=>{let n=this.attributeMap.get(e);n||(n={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(n),this.attributeMap.set(e,n));const r=Array.from(rt.childNodes(e),s=>rt.textContent(s)||"").join("");n.attributes.value=Jv({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:ey(e),value:r,maskInputFn:this.maskInputFn})}),Se(this,"processMutation",e=>{if(!Ix(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const n=rt.textContent(e.target);!wr(e.target,this.blockClass,this.blockSelector,!1)&&n!==e.oldValue&&this.texts.push({value:aj(e.target,this.maskTextClass,this.maskTextSelector,!0)&&n?this.maskTextFn?this.maskTextFn(n,MB(e.target)):n.replace(/[\S]/g,"*"):n,node:e.target});break}case"attributes":{const n=e.target;let r=e.attributeName,s=e.target.getAttribute(r);if(r==="value"){const a=ey(n);s=Jv({element:n,maskInputOptions:this.maskInputOptions,tagName:n.tagName,type:a,value:s,maskInputFn:this.maskInputFn})}if(wr(e.target,this.blockClass,this.blockSelector,!1)||s===e.oldValue)return;let o=this.attributeMap.get(e.target);if(n.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(s))if(!n.contentDocument)r="rr_src";else return;if(o||(o={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o),this.attributeMap.set(e.target,o)),r==="type"&&n.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!ij(n.tagName,r))if(o.attributes[r]=oj(this.doc,Ql(n.tagName),Ql(r),s),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const a=this.unattachedDoc.createElement("span");e.oldValue&&a.setAttribute("style",e.oldValue);for(const u of Array.from(n.style)){const c=n.style.getPropertyValue(u),f=n.style.getPropertyPriority(u);c!==a.style.getPropertyValue(u)||f!==a.style.getPropertyPriority(u)?f===""?o.styleDiff[u]=c:o.styleDiff[u]=[c,f]:o._unchangedStyles[u]=[c,f]}for(const u of Array.from(a.style))n.style.getPropertyValue(u)===""&&(o.styleDiff[u]=!1)}else r==="open"&&n.tagName==="DIALOG"&&(n.matches("dialog:modal")?o.attributes.rr_open_mode="modal":o.attributes.rr_open_mode="non-modal");break}case"childList":{if(wr(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(n=>this.genAdds(n,e.target)),e.removedNodes.forEach(n=>{const r=this.mirror.getId(n),s=bh(e.target)?this.mirror.getId(rt.host(e.target)):this.mirror.getId(e.target);wr(e.target,this.blockClass,this.blockSelector,!1)||Ix(n,this.mirror,this.slimDOMOptions)||!dCe(n,this.mirror)||(this.addedSet.has(n)?(CA(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(e.target)&&r===-1||PB(e.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[u5(r,s)]?CA(this.movedSet,n):(this.removes.push({parentId:s,id:r,isShadow:bh(e.target)&&Sh(e.target)?!0:void 0}),yCe(n,this.removesSubTreeCache))),this.mapRemoves.push(n))});break}}}),Se(this,"genAdds",(e,n)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(Ix(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[u5(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);wr(e,this.blockClass,this.blockSelector,!1)||(rt.childNodes(e).forEach(r=>this.genAdds(r)),EA(e)&&rt.childNodes(rt.shadowRoot(e)).forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(n=>{this[n]=e[n]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function CA(t,e){t.delete(e),rt.childNodes(e).forEach(n=>CA(t,n))}function yCe(t,e){const n=[t];for(;n.length;){const r=n.pop();e.has(r)||(e.add(r),rt.childNodes(r).forEach(s=>n.push(s)))}}function c5(t,e,n){return t.size===0?!1:bCe(t,e)}function bCe(t,e,n){const r=rt.parentNode(e);return r?t.has(r):!1}function d5(t,e){return t.size===0?!1:zB(t,e)}function zB(t,e){const n=rt.parentNode(e);return n?t.has(n)?!0:zB(t,n):!1}let Eh;function SCe(t){Eh=t}function ECe(){Eh=void 0}const vt=t=>Eh?(...n)=>{try{return t(...n)}catch(r){if(Eh&&Eh(r)===!0)return;throw r}}:t,Ol=[];function yp(t){try{if("composedPath"in t){const e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0]}catch{}return t&&t.target}function jB(t,e){const n=new vCe;Ol.push(n),n.init(t);const r=new(RB())(vt(n.processMutations.bind(n)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function CCe({mousemoveCb:t,sampling:e,doc:n,mirror:r}){if(e.mousemove===!1)return()=>{};const s=typeof e.mousemove=="number"?e.mousemove:50,o=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500;let a=[],u;const c=Zh(vt(g=>{const m=Date.now()-u;t(a.map(y=>(y.timeOffset-=m,y)),g),a=[],u=null}),o),f=vt(Zh(vt(g=>{const m=yp(g),{clientX:y,clientY:S}=SA(g)?g.changedTouches[0]:g;u||(u=dy()),a.push({x:y,y:S,id:r.getId(m),timeOffset:dy()-u}),c(typeof DragEvent<"u"&&g instanceof DragEvent?ft.Drag:g instanceof MouseEvent?ft.MouseMove:ft.TouchMove)}),s,{trailing:!1})),h=[Cr("mousemove",f,n),Cr("touchmove",f,n),Cr("drag",f,n)];return vt(()=>{h.forEach(g=>g())})}function wCe({mouseInteractionCb:t,doc:e,mirror:n,blockClass:r,blockSelector:s,sampling:o}){if(o.mouseInteraction===!1)return()=>{};const a=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,u=[];let c=null;const f=h=>g=>{const m=yp(g);if(wr(m,r,s,!0))return;let y=null,S=h;if("pointerType"in g){switch(g.pointerType){case"mouse":y=oi.Mouse;break;case"touch":y=oi.Touch;break;case"pen":y=oi.Pen;break}y===oi.Touch?Ur[h]===Ur.MouseDown?S="TouchStart":Ur[h]===Ur.MouseUp&&(S="TouchEnd"):oi.Pen}else SA(g)&&(y=oi.Touch);y!==null?(c=y,(S.startsWith("Touch")&&y===oi.Touch||S.startsWith("Mouse")&&y===oi.Mouse)&&(y=null)):Ur[h]===Ur.Click&&(y=c,c=null);const E=SA(g)?g.changedTouches[0]:g;if(!E)return;const C=n.getId(m),{clientX:w,clientY:x}=E;vt(t)({type:Ur[S],id:C,x:w,y:x,...y!==null&&{pointerType:y}})};return Object.keys(Ur).filter(h=>Number.isNaN(Number(h))&&!h.endsWith("_Departed")&&a[h]!==!1).forEach(h=>{let g=Ql(h);const m=f(h);if(window.PointerEvent)switch(Ur[h]){case Ur.MouseDown:case Ur.MouseUp:g=g.replace("mouse","pointer");break;case Ur.TouchStart:case Ur.TouchEnd:return}u.push(Cr(g,m,e))}),vt(()=>{u.forEach(h=>h())})}function BB({scrollCb:t,doc:e,mirror:n,blockClass:r,blockSelector:s,sampling:o}){const a=vt(Zh(vt(u=>{const c=yp(u);if(!c||wr(c,r,s,!0))return;const f=n.getId(c);if(c===e&&e.defaultView){const h=IB(e.defaultView);t({id:f,x:h.left,y:h.top})}else t({id:f,x:c.scrollLeft,y:c.scrollTop})}),o.scroll||100));return Cr("scroll",a,e)}function xCe({viewportResizeCb:t},{win:e}){let n=-1,r=-1;const s=vt(Zh(vt(()=>{const o=OB(),a=NB();(n!==o||r!==a)&&(t({width:Number(a),height:Number(o)}),n=o,r=a)}),200));return Cr("resize",s,e)}const _Ce=["INPUT","TEXTAREA","SELECT"],f5=new WeakMap;function ACe({inputCb:t,doc:e,mirror:n,blockClass:r,blockSelector:s,ignoreClass:o,ignoreSelector:a,maskInputOptions:u,maskInputFn:c,sampling:f,userTriggeredOnInput:h}){function g(x){let T=yp(x);const R=x.isTrusted,M=T&&T.tagName;if(T&&M==="OPTION"&&(T=rt.parentElement(T)),!T||!M||_Ce.indexOf(M)<0||wr(T,r,s,!0)||T.classList.contains(o)||a&&T.matches(a))return;let N=T.value,O=!1;const k=ey(T)||"";k==="radio"||k==="checkbox"?O=T.checked:(u[M.toLowerCase()]||u[k])&&(N=Jv({element:T,maskInputOptions:u,tagName:M,type:k,value:N,maskInputFn:c})),m(T,h?{text:N,isChecked:O,userTriggered:R}:{text:N,isChecked:O});const F=T.name;k==="radio"&&F&&O&&e.querySelectorAll(`input[type="radio"][name="${F}"]`).forEach($=>{if($!==T){const D=$.value;m($,h?{text:D,isChecked:!O,userTriggered:!1}:{text:D,isChecked:!O})}})}function m(x,T){const R=f5.get(x);if(!R||R.text!==T.text||R.isChecked!==T.isChecked){f5.set(x,T);const M=n.getId(x);vt(t)({...T,id:M})}}const S=(f.input==="last"?["change"]:["input","change"]).map(x=>Cr(x,vt(g),e)),E=e.defaultView;if(!E)return()=>{S.forEach(x=>x())};const C=E.Object.getOwnPropertyDescriptor(E.HTMLInputElement.prototype,"value"),w=[[E.HTMLInputElement.prototype,"value"],[E.HTMLInputElement.prototype,"checked"],[E.HTMLSelectElement.prototype,"value"],[E.HTMLTextAreaElement.prototype,"value"],[E.HTMLSelectElement.prototype,"selectedIndex"],[E.HTMLOptionElement.prototype,"selected"]];return C&&C.set&&S.push(...w.map(x=>zb(x[0],x[1],{set(){vt(g)({target:this,isTrusted:!1})}},!1,E))),vt(()=>{S.forEach(x=>x())})}function fy(t){const e=[];function n(r,s){if(zm("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||zm("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||zm("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||zm("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const a=Array.from(r.parentRule.cssRules).indexOf(r);s.unshift(a)}else if(r.parentStyleSheet){const a=Array.from(r.parentStyleSheet.cssRules).indexOf(r);s.unshift(a)}return s}return n(t,e)}function Sa(t,e,n){let r,s;return t?(t.ownerNode?r=e.getId(t.ownerNode):s=n.getId(t),{styleId:s,id:r}):{}}function TCe({styleSheetRuleCb:t,mirror:e,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const s=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:vt((h,g,m)=>{const[y,S]=m,{id:E,styleId:C}=Sa(g,e,n.styleMirror);return(E&&E!==-1||C&&C!==-1)&&t({id:E,styleId:C,adds:[{rule:y,index:S}]}),h.apply(g,m)})}),r.CSSStyleSheet.prototype.addRule=function(h,g,m=this.cssRules.length){const y=`${h} { ${g} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[y,m])};const o=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:vt((h,g,m)=>{const[y]=m,{id:S,styleId:E}=Sa(g,e,n.styleMirror);return(S&&S!==-1||E&&E!==-1)&&t({id:S,styleId:E,removes:[{index:y}]}),h.apply(g,m)})}),r.CSSStyleSheet.prototype.removeRule=function(h){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[h])};let a;r.CSSStyleSheet.prototype.replace&&(a=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(a,{apply:vt((h,g,m)=>{const[y]=m,{id:S,styleId:E}=Sa(g,e,n.styleMirror);return(S&&S!==-1||E&&E!==-1)&&t({id:S,styleId:E,replace:y}),h.apply(g,m)})}));let u;r.CSSStyleSheet.prototype.replaceSync&&(u=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(u,{apply:vt((h,g,m)=>{const[y]=m,{id:S,styleId:E}=Sa(g,e,n.styleMirror);return(S&&S!==-1||E&&E!==-1)&&t({id:S,styleId:E,replaceSync:y}),h.apply(g,m)})}));const c={};jm("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(jm("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),jm("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),jm("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));const f={};return Object.entries(c).forEach(([h,g])=>{f[h]={insertRule:g.prototype.insertRule,deleteRule:g.prototype.deleteRule},g.prototype.insertRule=new Proxy(f[h].insertRule,{apply:vt((m,y,S)=>{const[E,C]=S,{id:w,styleId:x}=Sa(y.parentStyleSheet,e,n.styleMirror);return(w&&w!==-1||x&&x!==-1)&&t({id:w,styleId:x,adds:[{rule:E,index:[...fy(y),C||0]}]}),m.apply(y,S)})}),g.prototype.deleteRule=new Proxy(f[h].deleteRule,{apply:vt((m,y,S)=>{const[E]=S,{id:C,styleId:w}=Sa(y.parentStyleSheet,e,n.styleMirror);return(C&&C!==-1||w&&w!==-1)&&t({id:C,styleId:w,removes:[{index:[...fy(y),E]}]}),m.apply(y,S)})})}),vt(()=>{r.CSSStyleSheet.prototype.insertRule=s,r.CSSStyleSheet.prototype.deleteRule=o,a&&(r.CSSStyleSheet.prototype.replace=a),u&&(r.CSSStyleSheet.prototype.replaceSync=u),Object.entries(c).forEach(([h,g])=>{g.prototype.insertRule=f[h].insertRule,g.prototype.deleteRule=f[h].deleteRule})})}function HB({mirror:t,stylesheetManager:e},n){var r,s,o;let a=null;n.nodeName==="#document"?a=t.getId(n):a=t.getId(rt.host(n));const u=n.nodeName==="#document"?(r=n.defaultView)==null?void 0:r.Document:(o=(s=n.ownerDocument)==null?void 0:s.defaultView)==null?void 0:o.ShadowRoot,c=u?.prototype?Object.getOwnPropertyDescriptor(u?.prototype,"adoptedStyleSheets"):void 0;return a===null||a===-1||!u||!c?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get(){var f;return(f=c.get)==null?void 0:f.call(this)},set(f){var h;const g=(h=c.set)==null?void 0:h.call(this,f);if(a!==null&&a!==-1)try{e.adoptStyleSheets(f,a)}catch{}return g}}),vt(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:c.get,set:c.set})}))}function RCe({styleDeclarationCb:t,mirror:e,ignoreCSSAttributes:n,stylesheetManager:r},{win:s}){const o=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:vt((u,c,f)=>{var h;const[g,m,y]=f;if(n.has(g))return o.apply(c,[g,m,y]);const{id:S,styleId:E}=Sa((h=c.parentRule)==null?void 0:h.parentStyleSheet,e,r.styleMirror);return(S&&S!==-1||E&&E!==-1)&&t({id:S,styleId:E,set:{property:g,value:m,priority:y},index:fy(c.parentRule)}),u.apply(c,f)})});const a=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(a,{apply:vt((u,c,f)=>{var h;const[g]=f;if(n.has(g))return a.apply(c,[g]);const{id:m,styleId:y}=Sa((h=c.parentRule)==null?void 0:h.parentStyleSheet,e,r.styleMirror);return(m&&m!==-1||y&&y!==-1)&&t({id:m,styleId:y,remove:{property:g},index:fy(c.parentRule)}),u.apply(c,f)})}),vt(()=>{s.CSSStyleDeclaration.prototype.setProperty=o,s.CSSStyleDeclaration.prototype.removeProperty=a})}function ICe({mediaInteractionCb:t,blockClass:e,blockSelector:n,mirror:r,sampling:s,doc:o}){const a=vt(c=>Zh(vt(f=>{const h=yp(f);if(!h||wr(h,e,n,!0))return;const{currentTime:g,volume:m,muted:y,playbackRate:S,loop:E}=h;t({type:c,id:r.getId(h),currentTime:g,volume:m,muted:y,playbackRate:S,loop:E})}),s.media||500)),u=[Cr("play",a(wc.Play),o),Cr("pause",a(wc.Pause),o),Cr("seeked",a(wc.Seeked),o),Cr("volumechange",a(wc.VolumeChange),o),Cr("ratechange",a(wc.RateChange),o)];return vt(()=>{u.forEach(c=>c())})}function OCe({fontCb:t,doc:e}){const n=e.defaultView;if(!n)return()=>{};const r=[],s=new WeakMap,o=n.FontFace;n.FontFace=function(c,f,h){const g=new o(c,f,h);return s.set(g,{family:c,buffer:typeof f!="string",descriptors:h,fontSource:typeof f=="string"?f:JSON.stringify(Array.from(new Uint8Array(f)))}),g};const a=mu(e.fonts,"add",function(u){return function(c){return setTimeout(vt(()=>{const f=s.get(c);f&&(t(f),s.delete(c))}),0),u.apply(this,[c])}});return r.push(()=>{n.FontFace=o}),r.push(a),vt(()=>{r.forEach(u=>u())})}function NCe(t){const{doc:e,mirror:n,blockClass:r,blockSelector:s,selectionCb:o}=t;let a=!0;const u=vt(()=>{const c=e.getSelection();if(!c||a&&c?.isCollapsed)return;a=c.isCollapsed||!1;const f=[],h=c.rangeCount||0;for(let g=0;g<h;g++){const m=c.getRangeAt(g),{startContainer:y,startOffset:S,endContainer:E,endOffset:C}=m;wr(y,r,s,!0)||wr(E,r,s,!0)||f.push({start:n.getId(y),startOffset:S,end:n.getId(E),endOffset:C})}o({ranges:f})});return u(),Cr("selectionchange",u)}function MCe({doc:t,customElementCb:e}){const n=t.defaultView;return!n||!n.customElements?()=>{}:mu(n.customElements,"define",function(s){return function(o,a,u){try{e({define:{name:o}})}catch{console.warn(`Custom element callback failed for ${o}`)}return s.apply(this,[o,a,u])}})}function PCe(t,e){const{mutationCb:n,mousemoveCb:r,mouseInteractionCb:s,scrollCb:o,viewportResizeCb:a,inputCb:u,mediaInteractionCb:c,styleSheetRuleCb:f,styleDeclarationCb:h,canvasMutationCb:g,fontCb:m,selectionCb:y,customElementCb:S}=t;t.mutationCb=(...E)=>{e.mutation&&e.mutation(...E),n(...E)},t.mousemoveCb=(...E)=>{e.mousemove&&e.mousemove(...E),r(...E)},t.mouseInteractionCb=(...E)=>{e.mouseInteraction&&e.mouseInteraction(...E),s(...E)},t.scrollCb=(...E)=>{e.scroll&&e.scroll(...E),o(...E)},t.viewportResizeCb=(...E)=>{e.viewportResize&&e.viewportResize(...E),a(...E)},t.inputCb=(...E)=>{e.input&&e.input(...E),u(...E)},t.mediaInteractionCb=(...E)=>{e.mediaInteaction&&e.mediaInteaction(...E),c(...E)},t.styleSheetRuleCb=(...E)=>{e.styleSheetRule&&e.styleSheetRule(...E),f(...E)},t.styleDeclarationCb=(...E)=>{e.styleDeclaration&&e.styleDeclaration(...E),h(...E)},t.canvasMutationCb=(...E)=>{e.canvasMutation&&e.canvasMutation(...E),g(...E)},t.fontCb=(...E)=>{e.font&&e.font(...E),m(...E)},t.selectionCb=(...E)=>{e.selection&&e.selection(...E),y(...E)},t.customElementCb=(...E)=>{e.customElement&&e.customElement(...E),S(...E)}}function kCe(t,e={}){const n=t.doc.defaultView;if(!n)return()=>{};PCe(t,e);let r;t.recordDOM&&(r=jB(t,t.doc));const s=CCe(t),o=wCe(t),a=BB(t),u=xCe(t,{win:n}),c=ACe(t),f=ICe(t);let h=()=>{},g=()=>{},m=()=>{},y=()=>{};t.recordDOM&&(h=TCe(t,{win:n}),g=HB(t,t.doc),m=RCe(t,{win:n}),t.collectFonts&&(y=OCe(t)));const S=NCe(t),E=MCe(t),C=[];for(const w of t.plugins)C.push(w.observer(w.callback,n,w.options));return vt(()=>{Ol.forEach(w=>w.reset()),r?.disconnect(),s(),o(),a(),u(),c(),f(),h(),g(),m(),y(),S(),E(),C.forEach(w=>w())})}function zm(t){return typeof window[t]<"u"}function jm(t){return!!(typeof window[t]<"u"&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class h5{constructor(e){Se(this,"iframeIdToRemoteIdMap",new WeakMap),Se(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,n,r,s){const o=r||this.getIdToRemoteIdMap(e),a=s||this.getRemoteIdToIdMap(e);let u=o.get(n);return u||(u=this.generateIdFn(),o.set(n,u),a.set(u,n)),u}getIds(e,n){const r=this.getIdToRemoteIdMap(e),s=this.getRemoteIdToIdMap(e);return n.map(o=>this.getId(e,o,r,s))}getRemoteId(e,n,r){const s=r||this.getRemoteIdToIdMap(e);if(typeof n!="number")return n;const o=s.get(n);return o||-1}getRemoteIds(e,n){const r=this.getRemoteIdToIdMap(e);return n.map(s=>this.getRemoteId(e,s,r))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let n=this.iframeIdToRemoteIdMap.get(e);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(e,n)),n}getRemoteIdToIdMap(e){let n=this.iframeRemoteIdToIdMap.get(e);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(e,n)),n}}class DCe{constructor(e){Se(this,"iframes",new WeakMap),Se(this,"crossOriginIframeMap",new WeakMap),Se(this,"crossOriginIframeMirror",new h5(sj)),Se(this,"crossOriginIframeStyleMirror"),Se(this,"crossOriginIframeRootIdMap",new WeakMap),Se(this,"mirror"),Se(this,"mutationCb"),Se(this,"wrappedEmit"),Se(this,"loadListener"),Se(this,"stylesheetManager"),Se(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new h5(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,n){var r,s;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((r=e.contentWindow)==null||r.addEventListener("message",this.handleMessage.bind(this))),(s=this.loadListener)==null||s.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){const n=e;if(n.data.type!=="rrweb"||n.origin!==n.data.origin||!e.source)return;const s=this.crossOriginIframeMap.get(e.source);if(!s)return;const o=this.transformCrossOriginEvent(s,n.data.event);o&&this.wrappedEmit(o,n.data.isCheckout)}transformCrossOriginEvent(e,n){var r;switch(n.type){case Ct.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(n.data.node,e);const s=n.data.node.id;return this.crossOriginIframeRootIdMap.set(e,s),this.patchRootIdOnNode(n.data.node,s),{timestamp:n.timestamp,type:Ct.IncrementalSnapshot,data:{source:ft.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case Ct.Meta:case Ct.Load:case Ct.DomContentLoaded:return!1;case Ct.Plugin:return n;case Ct.Custom:return this.replaceIds(n.data.payload,e,["id","parentId","previousId","nextId"]),n;case Ct.IncrementalSnapshot:switch(n.data.source){case ft.Mutation:return n.data.adds.forEach(s=>{this.replaceIds(s,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(s.node,e);const o=this.crossOriginIframeRootIdMap.get(e);o&&this.patchRootIdOnNode(s.node,o)}),n.data.removes.forEach(s=>{this.replaceIds(s,e,["parentId","id"])}),n.data.attributes.forEach(s=>{this.replaceIds(s,e,["id"])}),n.data.texts.forEach(s=>{this.replaceIds(s,e,["id"])}),n;case ft.Drag:case ft.TouchMove:case ft.MouseMove:return n.data.positions.forEach(s=>{this.replaceIds(s,e,["id"])}),n;case ft.ViewportResize:return!1;case ft.MediaInteraction:case ft.MouseInteraction:case ft.Scroll:case ft.CanvasMutation:case ft.Input:return this.replaceIds(n.data,e,["id"]),n;case ft.StyleSheetRule:case ft.StyleDeclaration:return this.replaceIds(n.data,e,["id"]),this.replaceStyleIds(n.data,e,["styleId"]),n;case ft.Font:return n;case ft.Selection:return n.data.ranges.forEach(s=>{this.replaceIds(s,e,["start","end"])}),n;case ft.AdoptedStyleSheet:return this.replaceIds(n.data,e,["id"]),this.replaceStyleIds(n.data,e,["styleIds"]),(r=n.data.styles)==null||r.forEach(s=>{this.replaceStyleIds(s,e,["styleId"])}),n}}return!1}replace(e,n,r,s){for(const o of s)!Array.isArray(n[o])&&typeof n[o]!="number"||(Array.isArray(n[o])?n[o]=e.getIds(r,n[o]):n[o]=e.getId(r,n[o]));return n}replaceIds(e,n,r){return this.replace(this.crossOriginIframeMirror,e,n,r)}replaceStyleIds(e,n,r){return this.replace(this.crossOriginIframeStyleMirror,e,n,r)}replaceIdOnNode(e,n){this.replaceIds(e,n,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}patchRootIdOnNode(e,n){e.type!==FB.Document&&!e.rootId&&(e.rootId=n),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class LCe{constructor(e){Se(this,"shadowDoms",new WeakSet),Se(this,"mutationCb"),Se(this,"scrollCb"),Se(this,"bypassOptions"),Se(this,"mirror"),Se(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,n){if(!Sh(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=jB({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(BB({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(rt.host(e))),this.restoreHandlers.push(HB({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,n){const r=this;this.restoreHandlers.push(mu(e.prototype,"attachShadow",function(s){return function(o){const a=s.call(this,o),u=rt.shadowRoot(this);return u&&UB(this)&&r.addShadowRoot(u,n),a}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var Pc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",UCe=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Bm=0;Bm<Pc.length;Bm++)UCe[Pc.charCodeAt(Bm)]=Bm;var FCe=function(t){var e=new Uint8Array(t),n,r=e.length,s="";for(n=0;n<r;n+=3)s+=Pc[e[n]>>2],s+=Pc[(e[n]&3)<<4|e[n+1]>>4],s+=Pc[(e[n+1]&15)<<2|e[n+2]>>6],s+=Pc[e[n+2]&63];return r%3===2?s=s.substring(0,s.length-1)+"=":r%3===1&&(s=s.substring(0,s.length-2)+"=="),s};const p5=new Map;function zCe(t,e){let n=p5.get(t);return n||(n=new Map,p5.set(t,n)),n.has(e)||n.set(e,[]),n.get(e)}const $B=(t,e,n)=>{if(!t||!(WB(t,e)||typeof t=="object"))return;const r=t.constructor.name,s=zCe(n,r);let o=s.indexOf(t);return o===-1&&(o=s.length,s.push(t)),o};function yv(t,e,n){if(t instanceof Array)return t.map(r=>yv(r,e,n));if(t===null)return t;if(t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray)return{rr_type:t.constructor.name,args:[Object.values(t)]};if(t instanceof ArrayBuffer){const r=t.constructor.name,s=FCe(t);return{rr_type:r,base64:s}}else{if(t instanceof DataView)return{rr_type:t.constructor.name,args:[yv(t.buffer,e,n),t.byteOffset,t.byteLength]};if(t instanceof HTMLImageElement){const r=t.constructor.name,{src:s}=t;return{rr_type:r,src:s}}else if(t instanceof HTMLCanvasElement){const r="HTMLImageElement",s=t.toDataURL();return{rr_type:r,src:s}}else{if(t instanceof ImageData)return{rr_type:t.constructor.name,args:[yv(t.data,e,n),t.width,t.height]};if(WB(t,e)||typeof t=="object"){const r=t.constructor.name,s=$B(t,e,n);return{rr_type:r,index:s}}}}return t}const qB=(t,e,n)=>t.map(r=>yv(r,e,n)),WB=(t,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(s=>typeof e[s]=="function").find(s=>t instanceof e[s]);function jCe(t,e,n,r){const s=[],o=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const a of o)try{if(typeof e.CanvasRenderingContext2D.prototype[a]!="function")continue;const u=mu(e.CanvasRenderingContext2D.prototype,a,function(c){return function(...f){return wr(this.canvas,n,r,!0)||setTimeout(()=>{const h=qB(f,e,this);t(this.canvas,{type:ed["2D"],property:a,args:h})},0),c.apply(this,f)}});s.push(u)}catch{const u=zb(e.CanvasRenderingContext2D.prototype,a,{set(c){t(this.canvas,{type:ed["2D"],property:a,args:[c],setter:!0})}});s.push(u)}return()=>{s.forEach(a=>a())}}function BCe(t){return t==="experimental-webgl"?"webgl":t}function g5(t,e,n,r){const s=[];try{const o=mu(t.HTMLCanvasElement.prototype,"getContext",function(a){return function(u,...c){if(!wr(this,e,n,!0)){const f=BCe(u);if("__context"in this||(this.__context=f),r&&["webgl","webgl2"].includes(f))if(c[0]&&typeof c[0]=="object"){const h=c[0];h.preserveDrawingBuffer||(h.preserveDrawingBuffer=!0)}else c.splice(0,1,{preserveDrawingBuffer:!0})}return a.apply(this,[u,...c])}});s.push(o)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{s.forEach(o=>o())}}function m5(t,e,n,r,s,o){const a=[],u=Object.getOwnPropertyNames(t);for(const c of u)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(c))try{if(typeof t[c]!="function")continue;const f=mu(t,c,function(h){return function(...g){const m=h.apply(this,g);if($B(m,o,this),"tagName"in this.canvas&&!wr(this.canvas,r,s,!0)){const y=qB(g,o,this),S={type:e,property:c,args:y};n(this.canvas,S)}return m}});a.push(f)}catch{const f=zb(t,c,{set(h){n(this.canvas,{type:e,property:c,args:[h],setter:!0})}});a.push(f)}return a}function HCe(t,e,n,r){const s=[];return s.push(...m5(e.WebGLRenderingContext.prototype,ed.WebGL,t,n,r,e)),typeof e.WebGL2RenderingContext<"u"&&s.push(...m5(e.WebGL2RenderingContext.prototype,ed.WebGL2,t,n,r,e)),()=>{s.forEach(o=>o())}}const VB="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",$Ce=t=>Uint8Array.from(atob(t),e=>e.charCodeAt(0)),v5=typeof window<"u"&&window.Blob&&new Blob([$Ce(VB)],{type:"text/javascript;charset=utf-8"});function qCe(t){let e;try{if(e=v5&&(window.URL||window.webkitURL).createObjectURL(v5),!e)throw"";const n=new Worker(e,{name:t?.name});return n.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(e)}),n}catch{return new Worker("data:text/javascript;base64,"+VB,{name:t?.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}class WCe{constructor(e){Se(this,"pendingCanvasMutations",new Map),Se(this,"rafStamps",{latestId:0,invokeId:null}),Se(this,"mirror"),Se(this,"mutationCb"),Se(this,"resetObservers"),Se(this,"frozen",!1),Se(this,"locked",!1),Se(this,"processMutation",(c,f)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(c)||this.pendingCanvasMutations.set(c,[]),this.pendingCanvasMutations.get(c).push(f)});const{sampling:n="all",win:r,blockClass:s,blockSelector:o,recordCanvas:a,dataURLOptions:u}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,a&&n==="all"&&this.initCanvasMutationObserver(r,s,o),a&&typeof n=="number"&&this.initCanvasFPSObserver(n,r,s,o,{dataURLOptions:u})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,n,r,s,o){const a=g5(n,r,s,!0),u=new Map,c=new qCe;c.onmessage=S=>{const{id:E}=S.data;if(u.set(E,!1),!("base64"in S.data))return;const{base64:C,type:w,width:x,height:T}=S.data;this.mutationCb({id:E,type:ed["2D"],commands:[{property:"clearRect",args:[0,0,x,T]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:C}],type:w}]},0,0]}]})};const f=1e3/e;let h=0,g;const m=()=>{const S=[];return n.document.querySelectorAll("canvas").forEach(E=>{wr(E,r,s,!0)||S.push(E)}),S},y=S=>{if(h&&S-h<f){g=requestAnimationFrame(y);return}h=S,m().forEach(async E=>{var C;const w=this.mirror.getId(E);if(u.get(w)||E.width===0||E.height===0)return;if(u.set(w,!0),["webgl","webgl2"].includes(E.__context)){const T=E.getContext(E.__context);((C=T?.getContextAttributes())==null?void 0:C.preserveDrawingBuffer)===!1&&T.clear(T.COLOR_BUFFER_BIT)}const x=await createImageBitmap(E);c.postMessage({id:w,bitmap:x,width:E.width,height:E.height,dataURLOptions:o.dataURLOptions},[x])}),g=requestAnimationFrame(y)};g=requestAnimationFrame(y),this.resetObservers=()=>{a(),cancelAnimationFrame(g)}}initCanvasMutationObserver(e,n,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const s=g5(e,n,r,!1),o=jCe(this.processMutation.bind(this),e,n,r),a=HCe(this.processMutation.bind(this),e,n,r);this.resetObservers=()=>{s(),o(),a()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=n=>{this.rafStamps.latestId=n,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,n)=>{const r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,n){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(e);if(!r||n===-1)return;const s=r.map(a=>{const{type:u,...c}=a;return c}),{type:o}=r[0];this.mutationCb({id:n,type:o,commands:s}),this.pendingCanvasMutations.delete(e)}}class VCe{constructor(e){Se(this,"trackedLinkElements",new WeakSet),Se(this,"mutationCb"),Se(this,"adoptedStyleSheetCb"),Se(this,"styleMirror",new hCe),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,n){if(e.length===0)return;const r={id:n,styleIds:[]},s=[];for(const o of e){let a;this.styleMirror.has(o)?a=this.styleMirror.getId(o):(a=this.styleMirror.add(o),s.push({styleId:a,rules:Array.from(o.rules||CSSRule,(u,c)=>({rule:tj(u,o.href),index:c}))})),r.styleIds.push(a)}s.length>0&&(r.styles=s),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class GCe{constructor(){Se(this,"nodeMap",new WeakMap),Se(this,"active",!1)}inOtherBuffer(e,n){const r=this.nodeMap.get(e);return r&&Array.from(r).some(s=>s!==n)}add(e,n){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(n))}destroy(){}}let gn,bv,Ox,hy=!1;try{if(Array.from([1],t=>t*2)[0]!==2){const t=document.createElement("iframe");document.body.appendChild(t),Array.from=((S4=t.contentWindow)==null?void 0:S4.Array.from)||Array.from,document.body.removeChild(t)}}catch(t){console.debug("Unable to override Array.from",t)}const Bs=Ybe();function bp(t={}){const{emit:e,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:s="rr-block",blockSelector:o=null,ignoreClass:a="rr-ignore",ignoreSelector:u=null,maskTextClass:c="rr-mask",maskTextSelector:f=null,inlineStylesheet:h=!0,maskAllInputs:g,maskInputOptions:m,slimDOMOptions:y,maskInputFn:S,maskTextFn:E,hooks:C,packFn:w,sampling:x={},dataURLOptions:T={},mousemoveWait:R,recordDOM:M=!0,recordCanvas:N=!1,recordCrossOriginIframes:O=!1,recordAfter:k=t.recordAfter==="DOMContentLoaded"?t.recordAfter:"load",userTriggeredOnInput:F=!1,collectFonts:$=!1,inlineImages:D=!1,plugins:z,keepIframeSrcFn:q=()=>!1,ignoreCSSAttributes:K=new Set([]),errorHandler:Y}=t;SCe(Y);const H=O?window.parent===window:!0;let te=!1;if(!H)try{window.parent.document&&(te=!1)}catch{te=!0}if(H&&!e)throw new Error("emit function is required");if(!H&&!te)return()=>{};R!==void 0&&x.mousemove===void 0&&(x.mousemove=R),Bs.reset();const fe=g===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:m!==void 0?m:{password:!0},de=lj(y);fCe();let Ae,L=0;const G=Ee=>{for(const pt of z||[])pt.eventProcessor&&(Ee=pt.eventProcessor(Ee));return w&&!te&&(Ee=w(Ee)),Ee};gn=(Ee,pt)=>{var Ce;const ze=Ee;if(ze.timestamp=dy(),(Ce=Ol[0])!=null&&Ce.isFrozen()&&ze.type!==Ct.FullSnapshot&&!(ze.type===Ct.IncrementalSnapshot&&ze.data.source===ft.Mutation)&&Ol.forEach(je=>je.unfreeze()),H)e?.(G(ze),pt);else if(te){const je={type:"rrweb",event:G(ze),origin:window.location.origin,isCheckout:pt};window.parent.postMessage(je,"*")}if(ze.type===Ct.FullSnapshot)Ae=ze,L=0;else if(ze.type===Ct.IncrementalSnapshot){if(ze.data.source===ft.Mutation&&ze.data.isAttachIframe)return;L++;const je=r&&L>=r,$e=n&&ze.timestamp-Ae.timestamp>n;(je||$e)&&bv(!0)}};const Z=Ee=>{gn({type:Ct.IncrementalSnapshot,data:{source:ft.Mutation,...Ee}})},ee=Ee=>gn({type:Ct.IncrementalSnapshot,data:{source:ft.Scroll,...Ee}}),oe=Ee=>gn({type:Ct.IncrementalSnapshot,data:{source:ft.CanvasMutation,...Ee}}),he=Ee=>gn({type:Ct.IncrementalSnapshot,data:{source:ft.AdoptedStyleSheet,...Ee}}),ue=new VCe({mutationCb:Z,adoptedStyleSheetCb:he}),ve=new DCe({mirror:Bs,mutationCb:Z,stylesheetManager:ue,recordCrossOriginIframes:O,wrappedEmit:gn});for(const Ee of z||[])Ee.getMirror&&Ee.getMirror({nodeMirror:Bs,crossOriginIframeMirror:ve.crossOriginIframeMirror,crossOriginIframeStyleMirror:ve.crossOriginIframeStyleMirror});const xe=new GCe;Ox=new WCe({recordCanvas:N,mutationCb:oe,win:window,blockClass:s,blockSelector:o,mirror:Bs,sampling:x.canvas,dataURLOptions:T});const Xe=new LCe({mutationCb:Z,scrollCb:ee,bypassOptions:{blockClass:s,blockSelector:o,maskTextClass:c,maskTextSelector:f,inlineStylesheet:h,maskInputOptions:fe,dataURLOptions:T,maskTextFn:E,maskInputFn:S,recordCanvas:N,inlineImages:D,sampling:x,slimDOMOptions:de,iframeManager:ve,stylesheetManager:ue,canvasManager:Ox,keepIframeSrcFn:q,processedNodeManager:xe},mirror:Bs});bv=(Ee=!1)=>{if(!M)return;gn({type:Ct.Meta,data:{href:window.location.href,width:NB(),height:OB()}},Ee),ue.reset(),Xe.init(),Ol.forEach(Ce=>Ce.lock());const pt=b0e(document,{mirror:Bs,blockClass:s,blockSelector:o,maskTextClass:c,maskTextSelector:f,inlineStylesheet:h,maskAllInputs:fe,maskTextFn:E,maskInputFn:S,slimDOM:de,dataURLOptions:T,recordCanvas:N,inlineImages:D,onSerialize:Ce=>{kB(Ce,Bs)&&ve.addIframe(Ce),DB(Ce,Bs)&&ue.trackLinkElement(Ce),EA(Ce)&&Xe.addShadowRoot(rt.shadowRoot(Ce),document)},onIframeLoad:(Ce,ze)=>{ve.attachIframe(Ce,ze),Xe.observeAttachShadow(Ce)},onStylesheetLoad:(Ce,ze)=>{ue.attachLinkElement(Ce,ze)},keepIframeSrcFn:q});if(!pt)return console.warn("Failed to snapshot the document");gn({type:Ct.FullSnapshot,data:{node:pt,initialOffset:IB(window)}},Ee),Ol.forEach(Ce=>Ce.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ue.adoptStyleSheets(document.adoptedStyleSheets,Bs.getId(document))};try{const Ee=[],pt=ze=>{var je;return vt(kCe)({mutationCb:Z,mousemoveCb:($e,gr)=>gn({type:Ct.IncrementalSnapshot,data:{source:gr,positions:$e}}),mouseInteractionCb:$e=>gn({type:Ct.IncrementalSnapshot,data:{source:ft.MouseInteraction,...$e}}),scrollCb:ee,viewportResizeCb:$e=>gn({type:Ct.IncrementalSnapshot,data:{source:ft.ViewportResize,...$e}}),inputCb:$e=>gn({type:Ct.IncrementalSnapshot,data:{source:ft.Input,...$e}}),mediaInteractionCb:$e=>gn({type:Ct.IncrementalSnapshot,data:{source:ft.MediaInteraction,...$e}}),styleSheetRuleCb:$e=>gn({type:Ct.IncrementalSnapshot,data:{source:ft.StyleSheetRule,...$e}}),styleDeclarationCb:$e=>gn({type:Ct.IncrementalSnapshot,data:{source:ft.StyleDeclaration,...$e}}),canvasMutationCb:oe,fontCb:$e=>gn({type:Ct.IncrementalSnapshot,data:{source:ft.Font,...$e}}),selectionCb:$e=>{gn({type:Ct.IncrementalSnapshot,data:{source:ft.Selection,...$e}})},customElementCb:$e=>{gn({type:Ct.IncrementalSnapshot,data:{source:ft.CustomElement,...$e}})},blockClass:s,ignoreClass:a,ignoreSelector:u,maskTextClass:c,maskTextSelector:f,maskInputOptions:fe,inlineStylesheet:h,sampling:x,recordDOM:M,recordCanvas:N,inlineImages:D,userTriggeredOnInput:F,collectFonts:$,doc:ze,maskInputFn:S,maskTextFn:E,keepIframeSrcFn:q,blockSelector:o,slimDOMOptions:de,dataURLOptions:T,mirror:Bs,iframeManager:ve,stylesheetManager:ue,shadowDomManager:Xe,processedNodeManager:xe,canvasManager:Ox,ignoreCSSAttributes:K,plugins:((je=z?.filter($e=>$e.observer))==null?void 0:je.map($e=>({observer:$e.observer,options:$e.options,callback:gr=>gn({type:Ct.Plugin,data:{plugin:$e.name,payload:gr}})})))||[]},C)};ve.addLoadListener(ze=>{try{Ee.push(pt(ze.contentDocument))}catch(je){console.warn(je)}});const Ce=()=>{bv(),Ee.push(pt(document)),hy=!0};return["interactive","complete"].includes(document.readyState)?Ce():(Ee.push(Cr("DOMContentLoaded",()=>{gn({type:Ct.DomContentLoaded,data:{}}),k==="DOMContentLoaded"&&Ce()})),Ee.push(Cr("load",()=>{gn({type:Ct.Load,data:{}}),k==="load"&&Ce()},window))),()=>{Ee.forEach(ze=>{try{ze()}catch(je){String(je).toLowerCase().includes("cross-origin")||console.warn(je)}}),xe.destroy(),hy=!1,ECe()}}catch(Ee){console.warn(Ee)}}bp.addCustomEvent=(t,e)=>{if(!hy)throw new Error("please add custom event after start recording");gn({type:Ct.Custom,data:{tag:t,payload:e}})};bp.freezePage=()=>{Ol.forEach(t=>t.freeze())};bp.takeFullSnapshot=t=>{if(!hy)throw new Error("please take full snapshot after start recording");bv(t)};bp.mirror=Bs;var y5;(function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"})(y5||(y5={}));const KCe="rrweb",YCe={maskAllInputs:!0,maskTextSelector:"*",maskInputOptions:void 0},ZCe={additionalSampleRate:1,batchSize:50,flushInterval:5e3,recordOptions:{slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,recordCrossOriginIframes:!1}},b5=ZCe;class XCe extends Ns{constructor(e){super(KCe),this.recordingEvents=[],this.isRecording=!1,this.recordingStartTime=null,this.flushTimer=null,this.stopRecording=null,this.enabled=!1;const n=Object.assign(Object.assign(Object.assign({},b5.recordOptions),e?.recordOptions),YCe);this.config=Object.assign(Object.assign(Object.assign({},b5),e),{recordOptions:n}),be.info("RRWebPlugin initialized",{additionalSampleRate:this.config.additionalSampleRate,batchSize:this.config.batchSize,flushInterval:this.config.flushInterval})}enable(){var e;if(this.enabled){be.info("RRWebPlugin already enabled");return}const n=(e=this.context)===null||e===void 0?void 0:e.getSession();if(!n||!n.record){be.warn("RRWebPlugin skipping - session not being recorded",{hasSession:!!n,sessionRecord:n?.record});return}const r=Math.random();if(r>this.config.additionalSampleRate){be.warn("RRWebPlugin skipping - session replay additionalSampleRate",{randomValue:r,samplingRate:this.config.additionalSampleRate});return}this.enabled=!0,be.info("RRWebPlugin enabled - starting recording"),this.startRecording()}disable(){if(!this.enabled){be.info("RRWebPlugin already disabled");return}be.info("RRWebPlugin disabled - stopping recording"),this.enabled=!1,this.stopCurrentRecording()}record(e){const n=e?.action;n==="start"?(be.info("RRWebPlugin manual start recording"),this.startRecording()):n==="stop"&&(be.info("RRWebPlugin manual stop recording"),this.stopCurrentRecording())}onload(){}startRecording(){this.recordingStartTime=Date.now(),this.recordingEvents=[],this.isRecording=!0,be.info("RRWebPlugin starting rrweb recording",{startTime:this.recordingStartTime});const e=bp(Object.assign(Object.assign({},this.config.recordOptions),{emit:this.handleRRWebEvent.bind(this)}));e?(this.stopRecording=e,be.info("RRWebPlugin rrweb recording initialized successfully")):be.warn("RRWebPlugin failed to initialize rrweb recording"),this.flushTimer=window.setInterval(()=>{this.flush()},this.config.flushInterval)}stopCurrentRecording(){if(!this.isRecording){be.info("RRWebPlugin stopCurrentRecording called but not recording");return}be.info("RRWebPlugin stopping current recording"),this.isRecording=!1,this.stopRecording&&(this.stopRecording(),this.stopRecording=null,be.info("RRWebPlugin rrweb recording stopped")),this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=null,be.info("RRWebPlugin flush timer cleared")),this.flush()}handleRRWebEvent(e){this.isRecording&&(this.recordingEvents.push(e),this.recordingEvents.length>=this.config.batchSize&&(be.info("RRWebPlugin flushing events due to batch size",{eventCount:this.recordingEvents.length,batchSize:this.config.batchSize}),this.flush()))}flush(){if(this.recordingEvents.length===0){be.info("RRWebPlugin flushEvent called but no events to flush");return}be.info("RRWebPlugin flushing events",{eventCount:this.recordingEvents.length});const e=[...this.recordingEvents],n={version:"1.0.0",events:e,eventCount:e.length};this.context.record(s4,n),be.info("RRWebPlugin events sent to RUM",{eventType:s4,eventCount:this.recordingEvents.length}),this.recordingEvents=[]}}var QCe=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(t);s<r.length;s++)e.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(t,r[s])&&(n[r[s]]=t[r[s]]);return n},wA;(function(t){t.Path="PATH",t.Hash="HASH",t.PathAndHash="PATH_AND_HASH"})(wA||(wA={}));const GB="us-west-2",xA=`https://dataplane.rum.${GB}.amazonaws.com`,KB=()=>({unique:!1,domain:window.location.hostname,path:"/",sameSite:"Strict",secure:!0}),YB=t=>({allowCookies:!1,batchLimit:100,client:Cve,compressionStrategy:{enabled:!0},cookieAttributes:t,debug:!1,disableAutoPageView:!1,dispatchInterval:5*1e3,enableRumClient:!0,enableXRay:!1,endpoint:xA,endpointUrl:new URL(xA),eventCacheSize:1e3,eventPluginsToLoad:[],pageIdFormat:wA.Path,pagesToExclude:[],pagesToInclude:[/.*/],signing:!1,recordResourceUrl:!0,retries:2,routeChangeComplete:100,routeChangeTimeout:1e4,sessionAttributes:{},sessionEventLimit:200,sessionLengthSeconds:1800,sessionSampleRate:1,suppressSessionStartEvent:!1,useBeacon:!0,userIdRetentionDays:30,enableW3CTraceId:!1,candidatesCacheSize:10});let JCe=class{constructor(e,n,r,s={}){var{cookieAttributes:o}=s,a=QCe(s,["cookieAttributes"]);this.eventBus=new zz,typeof r>"u"&&(r="us-west-2"),this.applicationId=e;const u=Object.assign(Object.assign({},KB()),o);this.config=Object.assign(Object.assign({fetchFunction:fetch},YB(u)),a),this.config.sessionId&&(this.config.suppressSessionStartEvent=!0),this.config.endpoint=a.endpoint?a.endpoint:xA.replace(GB,r),this.config.endpointUrl=new URL(this.config.endpoint),be.configure(this.config.debug),be.info("Initialized RUM Slim"),this.eventCache=new Pye({id:e,version:n},this.config,this.eventBus),this.dispatchManager=this.initDispatch(r,e),this.pluginManager=this.initPluginManager(e,n),this.eventCache.setPluginFlushHook(()=>this.pluginManager.flush()),this.config.enableRumClient?this.enable():this.disable()}setAwsCredentials(e){this.dispatchManager.setAwsCredentials(e)}setSigningConfigFactory(e){this.dispatchManager.setSigningConfigFactory(e)}addSessionAttributes(e){this.eventCache.addSessionAttributes(e)}getSessionId(){return this.eventCache.getSessionId()}pinSessionId(e){this.eventCache.pinSessionId(e)}startSession(e){return this.eventCache.startSession(e)}getUserId(){return this.eventCache.getUserId()}pinUserId(e){this.eventCache.pinUserId(e)}setEventMetadataHook(e){this.eventCache.setEventMetadataHook(e)}clearEventMetadataHook(){this.eventCache.clearEventMetadataHook()}addPlugin(e){this.pluginManager.addPlugin(e)}dispatch(){this.dispatchManager.dispatchFetch()}dispatchBeacon(){this.dispatchManager.dispatchBeacon()}enable(){this.eventCache.enable(),this.pluginManager.enable(),this.dispatchManager.enable()}disable(){this.dispatchManager.disable(),this.pluginManager.disable(),this.eventCache.disable()}allowCookies(e){this.config.allowCookies=e}clearCookies(){const e=this.config.cookieAttributes;[Vv,Gv,Gc,`${Vv}_${this.applicationId}`,`${Gv}_${this.applicationId}`,`${Gc}_${this.applicationId}`].forEach(r=>_ye(r,e))}recordPageView(e){this.eventCache.recordPageView(e)}recordError(e){this.pluginManager.record("com.amazonaws.rum.js-error",e)}registerDomEvents(e){this.pluginManager.updatePlugin("com.amazonaws.rum.dom-event",e)}recordEvent(e,n,r){this.eventCache.recordEvent(e,n,r)}initDispatch(e,n){return new wve(n,e,this.config.endpointUrl,this.eventCache,this.config)}initPluginManager(e,n){const r={applicationId:e,applicationVersion:n,config:this.config,record:this.eventCache.recordEvent,recordCandidate:this.eventCache.recordCandidate,recordPageView:this.eventCache.recordPageView,getSession:this.eventCache.getSession,eventBus:this.eventBus},s=new xye(r);return this.config.disableAutoPageView||s.addPlugin(new Xye),this.config.eventPluginsToLoad.forEach(o=>{s.addPlugin(o)}),s}};var Ks;(function(t){t.Errors="errors",t.Performance="performance",t.Interaction="interaction",t.Http="http",t.Replay="replay"})(Ks||(Ks={}));var S5;(function(t){t.Path="PATH",t.Hash="HASH",t.PathAndHash="PATH_AND_HASH"})(S5||(S5={}));const ewe=t=>Object.assign(Object.assign({},YB(t)),{signing:!0,telemetries:[Ks.Errors,Ks.Performance,Ks.Http,Ks.Replay]});class twe extends JCe{constructor(e,n,r,s={}){super(e,n,r,Object.assign(Object.assign({},ewe(KB())),s)),be.info(`RUM client initialized for app: ${e}`),be.info(`Telemetries enabled: ${this.config.telemetries.join(", ")||"none"}`)}initDispatch(e,n){const r=super.initDispatch(e,n);return r.setSigningConfigFactory(Qve),r.setCognitoCredentialProviderFactory((s,o,a,u)=>{const c={identityPoolId:a,guestRoleArn:u,cookieAttributes:s.cookieAttributes};return a&&u?new pye(c,o).ChainAnonymousCredentialsProvider:new gye(c,o).ChainAnonymousCredentialsProvider}),this.config.signing&&this.config.identityPoolId&&r.setCognitoCredentials(this.config.identityPoolId,this.config.guestRoleArn),r}initPluginManager(e,n){const r=super.initPluginManager(e,n);return this.constructBuiltinPlugins().forEach(o=>{r.addPlugin(o)}),r}recordError(e){this.pluginManager.record(Hz,e)}registerDomEvents(e){this.pluginManager.updatePlugin(jz,e)}constructBuiltinPlugins(){let e=[];const n=this.telemetryFunctor();return this.config.telemetries.forEach(r=>{typeof r=="string"&&n[r.toLowerCase()]?e=[...e,...n[r.toLowerCase()]({})]:Array.isArray(r)&&n[r[0].toLowerCase()]&&(e=[...e,...n[r[0].toLowerCase()](r[1])])}),e}telemetryFunctor(){return{[Ks.Errors]:e=>[new qye(e)],[Ks.Performance]:e=>[new Gye(e),new Jye(e),new bbe(e)],[Ks.Interaction]:e=>[new RR(e)],[Ks.Http]:e=>[new xbe(e),new Ebe(e)],[Ks.Replay]:e=>[new XCe(e)]}}}const ZB={recordPageView:()=>{},recordError:()=>{},recordEvent:()=>{},recordTiming:()=>{}},nwe=/([?&](token|access_token|id_token|authorization)=[^&]*)|\/messages\/[a-z0-9_-]+/gi;function XB(t){return t.replace(nwe,"[redacted]")}function rwe(t){const e=t.indexOf("?"),n=t.indexOf("#"),r=e===-1&&n===-1?t.length:e===-1?n:n===-1?e:Math.min(e,n);return XB(t.slice(0,r))}function swe(t){const e=XB(t.message);if(e===t.message)return t;const n=new Error(e);return n.name=t.name,n.stack=t.stack,n}function owe(t){return{recordPageView(e){t.recordPageView(rwe(e))},recordError(e,n){t.recordError(swe(e)),n&&t.recordEvent("telemetry.error_context",n)},recordEvent(e,n){t.recordEvent(e,n??{})},recordTiming(e,n,r){t.recordEvent("telemetry.timing",{...r,name:e,durationMs:String(n)})}}}function E5(t){return t instanceof Error?t:new Error(String(t))}function iwe(t){window.addEventListener("error",e=>{t.recordError(E5(e.error??e.message))}),window.addEventListener("unhandledrejection",e=>{t.recordError(E5(e.reason))})}function awe(){const{appMonitorId:t,identityPoolId:e,region:n}=Dy().rum;if(!t)return ZB;const r=new twe(t,"1.0.0",n,{sessionSampleRate:1,identityPoolId:e,endpoint:`https://dataplane.rum.${n}.amazonaws.com`,telemetries:["performance"],disableAutoPageView:!0,allowCookies:!1,enableXRay:!1}),s=owe(r);return iwe(s),s}const QB=A.createContext(ZB);function iIe(){return A.useContext(QB)}const _A="remit.theme",lwe="dark";function C5(){return typeof localStorage>"u"?"system":localStorage.getItem(_A)??"system"}function AA(t){if(typeof document>"u")return;const e=t==="dark"||t==="system"&&typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-color-scheme: dark)").matches;document.documentElement.classList.toggle(lwe,e)}function aIe(t){typeof localStorage<"u"&&(t==="system"?localStorage.removeItem(_A):localStorage.setItem(_A,t)),AA(t)}const uwe=()=>{if(typeof window>"u"||(AA(C5()),typeof window.matchMedia!="function"))return;const t=window.matchMedia("(prefers-color-scheme: dark)"),e=()=>{AA(C5())};typeof t.addEventListener=="function"?t.addEventListener("change",e):t.addListener(e)},cwe=(t,e,n,r)=>{const s=[n,{code:e,...r||{}}];if(t?.services?.logger?.forward)return t.services.logger.forward(s,"warn","react-i18next::",!0);Bl(s[0])&&(s[0]=`react-i18next:: ${s[0]}`),t?.services?.logger?.warn?t.services.logger.warn(...s):console?.warn&&console.warn(...s)},w5={},TA=(t,e,n,r)=>{Bl(n)&&w5[n]||(Bl(n)&&(w5[n]=new Date),cwe(t,e,n,r))},JB=(t,e)=>()=>{if(t.isInitialized)e();else{const n=()=>{setTimeout(()=>{t.off("initialized",n)},0),e()};t.on("initialized",n)}},RA=(t,e,n)=>{t.loadNamespaces(e,JB(t,n))},x5=(t,e,n,r)=>{if(Bl(n)&&(n=[n]),t.options.preload&&t.options.preload.indexOf(e)>-1)return RA(t,n,r);n.forEach(s=>{t.options.ns.indexOf(s)<0&&t.options.ns.push(s)}),t.loadLanguages(e,JB(t,r))},dwe=(t,e,n={})=>!e.languages||!e.languages.length?(TA(e,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:e.languages}),!0):e.hasLoadedNamespace(t,{lng:n.lng,precheck:(r,s)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!s(r.isLanguageChangingTo,t))return!1}}),Bl=t=>typeof t=="string",fwe=t=>typeof t=="object"&&t!==null,hwe=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,pwe={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},gwe=t=>pwe[t],mwe=t=>t.replace(hwe,gwe);let IA={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:mwe};const vwe=(t={})=>{IA={...IA,...t}},ywe=()=>IA;let eH;const bwe=t=>{eH=t},Swe=()=>eH,Ewe={type:"3rdParty",init(t){vwe(t.options.react),bwe(t)}},Cwe=A.createContext();class wwe{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const xwe=(t,e)=>{const n=A.useRef();return A.useEffect(()=>{n.current=t},[t,e]),n.current},tH=(t,e,n,r)=>t.getFixedT(e,n,r),_we=(t,e,n,r)=>A.useCallback(tH(t,e,n,r),[t,e,n,r]),Awe=(t,e={})=>{const{i18n:n}=e,{i18n:r,defaultNS:s}=A.useContext(Cwe)||{},o=n||r||Swe();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new wwe),!o){TA(o,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const R=(N,O)=>Bl(O)?O:fwe(O)&&Bl(O.defaultValue)?O.defaultValue:Array.isArray(N)?N[N.length-1]:N,M=[R,{},!1];return M.t=R,M.i18n={},M.ready=!1,M}o.options.react?.wait&&TA(o,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const a={...ywe(),...o.options.react,...e},{useSuspense:u,keyPrefix:c}=a;let f=t||s||o.options?.defaultNS;f=Bl(f)?[f]:f||["translation"],o.reportNamespaces.addUsedNamespaces?.(f);const h=(o.isInitialized||o.initializedStoreOnce)&&f.every(R=>dwe(R,o,a)),g=_we(o,e.lng||null,a.nsMode==="fallback"?f:f[0],c),m=()=>g,y=()=>tH(o,e.lng||null,a.nsMode==="fallback"?f:f[0],c),[S,E]=A.useState(m);let C=f.join();e.lng&&(C=`${e.lng}${C}`);const w=xwe(C),x=A.useRef(!0);A.useEffect(()=>{const{bindI18n:R,bindI18nStore:M}=a;x.current=!0,!h&&!u&&(e.lng?x5(o,e.lng,f,()=>{x.current&&E(y)}):RA(o,f,()=>{x.current&&E(y)})),h&&w&&w!==C&&x.current&&E(y);const N=()=>{x.current&&E(y)};return R&&o?.on(R,N),M&&o?.store.on(M,N),()=>{x.current=!1,o&&R&&R?.split(" ").forEach(O=>o.off(O,N)),M&&o&&M.split(" ").forEach(O=>o.store.off(O,N))}},[o,C]),A.useEffect(()=>{x.current&&h&&E(m)},[o,c,h]);const T=[S,o,h];if(T.t=S,T.i18n=o,T.ready=h,h||!h&&!u)return T;throw new Promise(R=>{e.lng?x5(o,e.lng,f,()=>R()):RA(o,f,()=>R())})},Twe=t=>(t.client??He).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts",...t,headers:{"Content-Type":"application/json",...t.headers}}),Rwe=t=>(t.client??He).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/oauth/microsoft/start",...t,headers:{"Content-Type":"application/json",...t.headers}}),Iwe=t=>(t.client??He).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/test-connection",...t,headers:{"Content-Type":"application/json",...t.headers}}),Owe=t=>(t.client??He).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}",...t}),Nwe=t=>(t.client??He).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}",...t,headers:{"Content-Type":"application/json",...t.headers}}),Mwe=t=>(t.client??He).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/filters",...t}),Pwe=t=>(t.client??He).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/filters",...t,headers:{"Content-Type":"application/json",...t.headers}}),kwe=t=>(t.client??He).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/filters/{filterId}",...t}),Dwe=t=>(t.client??He).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/filters/{filterId}",...t,headers:{"Content-Type":"application/json",...t.headers}}),Lwe=t=>(t.client??He).put({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/folder-roles/{role}",...t,headers:{"Content-Type":"application/json",...t.headers}}),Uwe=t=>(t.client??He).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/mailboxes",...t}),Fwe=t=>(t.client??He).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/mailboxes",...t,headers:{"Content-Type":"application/json",...t.headers}}),zwe=t=>(t.client??He).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/mailboxes/{mailboxId}",...t,headers:{"Content-Type":"application/json",...t.headers}}),jwe=t=>(t.client??He).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/organize",...t,headers:{"Content-Type":"application/json",...t.headers}}),Bwe=t=>(t.client??He).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/organize/preview",...t,headers:{"Content-Type":"application/json",...t.headers}}),Hwe=t=>(t.client??He).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/organize/{organizeJobId}",...t}),$we=t=>(t.client??He).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/sync",...t}),qwe=t=>(t.client??He).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/sync/status",...t}),Wwe=t=>(t.client??He).get({security:[{name:"Authorization",type:"apiKey"}],url:"/addresses/search",...t}),Vwe=t=>(t.client??He).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/addresses/{addressId}",...t,headers:{"Content-Type":"application/json",...t.headers}}),Gwe=t=>(t?.client??He).get({security:[{name:"Authorization",type:"apiKey"}],url:"/config",...t}),lIe=t=>(t.client??He).get({security:[{name:"Authorization",type:"apiKey"}],url:"/mailboxes/{mailboxId}/threads",...t}),Kwe=t=>(t.client??He).get({security:[{name:"Authorization",type:"apiKey"}],url:"/mailboxes/{mailboxId}/threads/search",...t}),Ywe=t=>(t.client??He).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/me",...t,headers:{"Content-Type":"application/json",...t.headers}}),Zwe=t=>(t?.client??He).post({security:[{name:"Authorization",type:"apiKey"}],url:"/me/export",...t}),Xwe=t=>(t?.client??He).get({security:[{name:"Authorization",type:"apiKey"}],url:"/me/vip-suggestions",...t}),Qwe=t=>(t.client??He).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/delete",...t,headers:{"Content-Type":"application/json",...t.headers}}),Jwe=t=>(t.client??He).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/flags",...t,headers:{"Content-Type":"application/json",...t.headers}}),exe=t=>(t.client??He).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/move",...t,headers:{"Content-Type":"application/json",...t.headers}}),txe=t=>(t.client??He).get({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/{messageId}",...t}),nxe=t=>(t.client??He).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/{messageId}/flags",...t,headers:{"Content-Type":"application/json",...t.headers}}),rxe=t=>(t.client??He).get({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/{messageId}/raw",...t}),sxe=t=>(t?.client??He).get({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox",...t}),oxe=t=>(t.client??He).post({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox",...t,headers:{"Content-Type":"application/json",...t.headers}}),ixe=t=>(t.client??He).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}",...t}),axe=t=>(t.client??He).get({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}",...t}),lxe=t=>(t.client??He).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}",...t,headers:{"Content-Type":"application/json",...t.headers}}),uxe=t=>(t.client??He).post({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}/send",...t}),cxe=t=>(t.client??He).get({security:[{name:"Authorization",type:"apiKey"}],url:"/search/semantic",...t}),dxe=t=>(t?.client??He).get({security:[{name:"Authorization",type:"apiKey"}],url:"/system/update",...t}),fxe=t=>(t.client??He).post({security:[{name:"Authorization",type:"apiKey"}],url:"/system/update",...t,headers:{"Content-Type":"application/json",...t.headers}}),hxe=t=>(t?.client??He).get({security:[{name:"Authorization",type:"apiKey"}],url:"/threads",...t}),pxe=t=>(t.client??He).get({security:[{name:"Authorization",type:"apiKey"}],url:"/threads/{threadId}/messages",...t}),uIe=t=>({mutationFn:async n=>{const{data:r}=await Twe({...t,...n,throwOnError:!0});return r}}),Gn=(t,e,n,r)=>{const s={_id:t,baseUrl:e?.baseUrl||(e?.client??He).getConfig().baseUrl};return e?.body&&(s.body=e.body),e?.headers&&(s.headers=e.headers),e?.path&&(s.path=e.path),e?.query&&(s.query=e.query),[s]},cIe=t=>({mutationFn:async n=>{const{data:r}=await Rwe({...t,...n,throwOnError:!0});return r}}),dIe=t=>({mutationFn:async n=>{const{data:r}=await Iwe({...t,...n,throwOnError:!0});return r}}),fIe=t=>({mutationFn:async n=>{const{data:r}=await Owe({...t,...n,throwOnError:!0});return r}}),hIe=t=>({mutationFn:async n=>{const{data:r}=await Nwe({...t,...n,throwOnError:!0});return r}}),gxe=t=>Gn("filterOperationsListFilters",t),pIe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await Mwe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:gxe(t)}),gIe=t=>({mutationFn:async n=>{const{data:r}=await Pwe({...t,...n,throwOnError:!0});return r}}),mIe=t=>({mutationFn:async n=>{const{data:r}=await kwe({...t,...n,throwOnError:!0});return r}}),vIe=t=>Gn("filterDetailOperationsGetFilter",t),yIe=t=>({mutationFn:async n=>{const{data:r}=await Dwe({...t,...n,throwOnError:!0});return r}}),bIe=t=>({mutationFn:async n=>{const{data:r}=await Lwe({...t,...n,throwOnError:!0});return r}}),mxe=t=>Gn("mailboxOperationsListMailboxes",t),SIe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await Uwe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:mxe(t)}),EIe=t=>({mutationFn:async n=>{const{data:r}=await Fwe({...t,...n,throwOnError:!0});return r}}),CIe=t=>({mutationFn:async n=>{const{data:r}=await zwe({...t,...n,throwOnError:!0});return r}}),wIe=t=>({mutationFn:async n=>{const{data:r}=await jwe({...t,...n,throwOnError:!0});return r}}),xIe=t=>({mutationFn:async n=>{const{data:r}=await Bwe({...t,...n,throwOnError:!0});return r}}),vxe=t=>Gn("organizeJobDetailOperationsGetOrganizeJob",t),_Ie=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await Hwe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:vxe(t)}),AIe=t=>({mutationFn:async n=>{const{data:r}=await $we({...t,...n,throwOnError:!0});return r}}),yxe=t=>Gn("syncOperationsGetSyncStatus",t),TIe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await qwe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:yxe(t)}),bxe=t=>Gn("addressOperationsSearchAddresses",t),RIe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await Wwe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:bxe(t)}),IIe=t=>({mutationFn:async n=>{const{data:r}=await Vwe({...t,...n,throwOnError:!0});return r}}),Sxe=t=>Gn("configOperationsGetConfig",t),Exe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await Gwe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:Sxe(t)}),OIe=t=>Gn("threadOperationsListThreads",t),Cxe=t=>Gn("threadOperationsSearchThreads",t),NIe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await Kwe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:Cxe(t)}),MIe=t=>({mutationFn:async n=>{const{data:r}=await Ywe({...t,...n,throwOnError:!0});return r}}),PIe=t=>({mutationFn:async n=>{const{data:r}=await Zwe({...t,...n,throwOnError:!0});return r}}),wxe=t=>Gn("meOperationsListVipSuggestions",t),kIe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await Xwe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:wxe(t)}),DIe=t=>({mutationFn:async n=>{const{data:r}=await Qwe({...t,...n,throwOnError:!0});return r}}),LIe=t=>({mutationFn:async n=>{const{data:r}=await Jwe({...t,...n,throwOnError:!0});return r}}),UIe=t=>({mutationFn:async n=>{const{data:r}=await exe({...t,...n,throwOnError:!0});return r}}),xxe=t=>Gn("messageOperationsDescribeMessage",t),FIe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await txe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:xxe(t)}),zIe=t=>({mutationFn:async n=>{const{data:r}=await nxe({...t,...n,throwOnError:!0});return r}}),_xe=t=>Gn("messageOperationsGetRawMessage",t),jIe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await rxe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:_xe(t)}),nH=t=>Gn("outboxOperationsListOutboxMessages",t),BIe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await sxe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:nH(t)}),HIe=t=>({mutationFn:async n=>{const{data:r}=await oxe({...t,...n,throwOnError:!0});return r}}),$Ie=t=>({mutationFn:async n=>{const{data:r}=await ixe({...t,...n,throwOnError:!0});return r}}),Axe=t=>Gn("outboxDetailOperationsGetOutboxMessage",t),Txe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await axe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:Axe(t)}),qIe=t=>({mutationFn:async n=>{const{data:r}=await lxe({...t,...n,throwOnError:!0});return r}}),WIe=t=>({mutationFn:async n=>{const{data:r}=await uxe({...t,...n,throwOnError:!0});return r}}),Rxe=t=>Gn("semanticSearchOperationsSemanticSearch",t),VIe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await cxe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:Rxe(t)}),rH=t=>Gn("systemOperationsGetSystemUpdate",t),Ixe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await dxe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:rH(t)}),Oxe=t=>({mutationFn:async n=>{const{data:r}=await fxe({...t,...n,throwOnError:!0});return r}}),Nxe=t=>Gn("unifiedThreadOperationsListAllThreads",t),Mxe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await hxe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:Nxe(t)}),Pxe=t=>Gn("threadDetailOperationsListThreadMessages",t),GIe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await pxe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:Pxe(t)}),sH=A.createContext(void 0),_5={isOpen:!1,mode:"new"},kxe=2e3,Dxe=6e4,Lxe=({children:t})=>{const[e,n]=A.useState(_5),[r,s]=A.useState(),o=A.useRef(0),a=vb(),{data:u}=D7({...Txe({path:{outboxMessageId:r??""}}),enabled:!!r,refetchInterval:y=>{const S=y.state.data?.status;return S==="sent"||S==="failed"||S==="blocked"||Date.now()-o.current>Dxe?!1:kxe}});A.useEffect(()=>{if(!u||!r)return;(u.status==="sent"||u.status==="failed"||u.status==="blocked")&&(s(void 0),a.invalidateQueries({queryKey:nH()}))},[u,r,a]);const c=A.useCallback(y=>{n({...y,isOpen:!0})},[]),f=A.useCallback(()=>{n(_5)},[]),h=A.useCallback(y=>{n(S=>({...S,outboxMessageId:y}))},[]),g=A.useCallback(y=>{o.current=Date.now(),s(y)},[]),m=A.useMemo(()=>({state:e,openCompose:c,closeCompose:f,setOutboxMessageId:h,startSendPolling:g}),[e,c,f,h,g]);return I.jsx(sH.Provider,{value:m,children:t})},KIe=()=>{const t=A.useContext(sH);if(!t)throw new Error("useCompose must be used within a ComposeProvider");return t},lI="remit.self-update.run",Uxe=600,Fxe=300,A5="remit logs",zxe="https://github.com/remit-mail/reader/releases/tag/",jxe={checking:"preparing",pulling:"preparing",snapshotting:"preparing",stopping:"restarting",starting:"restarting",verifying:"reconnecting",committing:"reconnecting",rollingBack:"reconnecting",recovering:"reconnecting"};function OA(t){return jxe[t]??"reconnecting"}function oH(t){const e=au(t);return e===404||e===403||e===401}function iH(t,e){const n=t?.check;if(n?.status==="ok"&&!(!n.updateAvailable||!n.latestVersion))return{version:n.latestVersion,releasedAt:py(n.publishedAt)??e,releaseNotesUrl:n.releaseNotesUrl??lH(n.latestVersion),summary:n.summary??""}}function Bxe(t){const e=t?.check.schemaVersion,n=t?.currentSchemaVersion;return e===void 0||n===void 0?!1:e>n}function Hxe(){try{const t=localStorage.getItem(lI);if(!t)return null;const e=JSON.parse(t);return qxe(e)?e:null}catch{return null}}function $xe(t){try{localStorage.setItem(lI,JSON.stringify(t))}catch{}}function T5(){try{localStorage.removeItem(lI)}catch{}}function qxe(t){if(!t||typeof t!="object")return!1;const e=t;return typeof e.runId=="string"&&typeof e.attemptedVersion=="string"&&typeof e.previousVersion=="string"&&typeof e.startedAt=="number"}function R5(){return Uxe+Fxe}function aH(t,e){return Math.max(0,Math.floor((e-t)/1e3))}function py(t){if(!t)return;const e=Date.parse(t);return Number.isNaN(e)?void 0:e}function lH(t){return`${zxe}${t}`}function ah(t,e,n,r,s){return{status:"applying",runId:t,version:e,target:n,phase:r,elapsedSeconds:s}}function Wxe(t,e,n){switch(n){case"succeeded":return{status:"succeeded",runId:e.runId,version:e.targetVersion,previousVersion:e.fromVersion,releaseNotesUrl:t.check.releaseNotesUrl??lH(e.targetVersion)};case"rolledBack":return{status:"rolledBack",runId:e.runId,version:e.fromVersion,attemptedVersion:e.targetVersion,reason:e.message,logsCommand:e.logCommand};case"rollbackFailed":return{status:"rollbackFailed",runId:e.runId,attemptedVersion:e.targetVersion,previousVersion:e.fromVersion,reason:e.message,logsCommand:e.logCommand};case"abandoned":return{status:"abandoned",runId:e.runId,version:e.fromVersion,attemptedVersion:e.targetVersion,reason:e.message,logsCommand:e.logCommand};default:return n}}function Vxe(t,e,n){const r=t.check;if(e)return{status:"checking",version:t.currentVersion};if(r.status==="failed")return{status:"checkFailed",version:t.currentVersion,reason:r.error??"Remit could not reach the update service.",lastCheckedAt:py(r.lastCheckedAt)};if(r.status==="disabled")return{status:"neverChecked",version:t.currentVersion};const s=iH(t,n);return s?{status:"available",version:t.currentVersion,release:s}:{status:"upToDate",version:t.currentVersion,checkedAt:py(r.lastCheckedAt)??n}}function Hm(t,e,n,r){return{surface:{status:"ready",section:t,overlay:e},clearStoredRun:n,releaseHeld:r}}function Gxe(t,e,n,r,s){const o=aH(t.startedAt,s),a=e?.currentVersion??t.previousVersion,u=!r&&n!==null&&n.runId===t.runId;if(u&&n!==null&&n.outcome!==null)return null;if(u&&n!==null){const f=OA(n.phase);return Hm(ah(n.runId,a,n.targetVersion,f,o),{kind:"applying",target:n.targetVersion,phase:f,elapsedSeconds:o},!1,!1)}if(r){const f=ah(t.runId,t.previousVersion,t.attemptedVersion,"reconnecting",o);return o>R5()?{surface:{status:"ready",section:f,overlay:{kind:"neverCameBack",attemptedVersion:t.attemptedVersion,previousVersion:t.previousVersion,elapsedSeconds:o,logsCommand:A5}},clearStoredRun:!0,releaseHeld:!1}:Hm(f,{kind:"applying",target:t.attemptedVersion,phase:"reconnecting",elapsedSeconds:o},!1,!1)}if(e===void 0)return Hm(ah(t.runId,a,t.attemptedVersion,"preparing",o),{kind:"applying",target:t.attemptedVersion,phase:"preparing",elapsedSeconds:o},!1,!1);if(o>R5())return{surface:{status:"ready",section:{status:"unreachable",runId:t.runId,previousVersion:t.previousVersion,attemptedVersion:t.attemptedVersion,elapsedSeconds:o,logsCommand:n?.logCommand??A5},overlay:{kind:"none"}},clearStoredRun:!0,releaseHeld:!0};const c=n!==null&&n.outcome===null?OA(n.phase):"preparing";return Hm(ah(t.runId,a,t.attemptedVersion,c,o),{kind:"applying",target:t.attemptedVersion,phase:c,elapsedSeconds:o},!1,!1)}function I5(t){const{data:e,isError:n,isFetching:r,dismissedRunId:s,checkRequested:o,now:a}=t;if(n)return{surface:{status:"ready",section:{status:"checkFailed",version:e?.currentVersion??"the current version",reason:"Remit could not reach the update service."},overlay:{kind:"none"}},clearStoredRun:!0};if(!e)return{surface:{status:"loading"},clearStoredRun:!1};const u=e.run,c=u!==null&&s!==null&&u.runId===s;if(u!==null&&!c&&u.outcome!==null)return{surface:{status:"ready",section:Wxe(e,u,u.outcome),overlay:{kind:"none"}},clearStoredRun:!0};if(u!==null&&!c&&u.outcome===null){const f=aH(py(u.startedAt)??a,a),h=OA(u.phase);return{surface:{status:"ready",section:ah(u.runId,u.fromVersion,u.targetVersion,h,f),overlay:{kind:"applying",target:u.targetVersion,phase:h,elapsedSeconds:f}},clearStoredRun:!1}}return{surface:{status:"ready",section:Vxe(e,o&&r,a),overlay:{kind:"none"}},clearStoredRun:!1}}function Kxe(t){const{data:e,isError:n,error:r,held:s,now:o}=t,a=e?.run??null;if(oH(r)&&!s)return{surface:{status:"absent"},clearStoredRun:!0,releaseHeld:!0};if(s){const c=Gxe(s,e,a,n,o);return c||{surface:I5(t).surface,clearStoredRun:!0,releaseHeld:!0}}const u=I5(t);return{surface:u.surface,clearStoredRun:u.clearStoredRun,releaseHeld:!1}}const Yxe=3e4,Zxe=5e3;function Xxe(t,e,n){if(oH(t)&&!n)return!1;const r=e!==null&&e.outcome===null;return n||r?Zxe:Yxe}function Qxe(){const t=vb(),[e,n]=A.useState(()=>Hxe()),[r,s]=A.useState(null),[o,a]=A.useState(!1),u=A.useRef(e);u.current=e;const c=D7({...Ixe(),retry:!1,meta:{softError:!0},refetchInterval:R=>Xxe(R.state.error,R.state.data?.run??null,u.current!==null)}),f=Kxe({data:c.data,isError:c.isError,error:c.error,isFetching:c.isFetching,held:e,dismissedRunId:r,checkRequested:o,now:Date.now()}),h=A.useRef(null);h.current=f.surface.status==="ready"&&"runId"in f.surface.section?f.surface.section.runId:null;const{clearStoredRun:g,releaseHeld:m}=f;A.useEffect(()=>{g&&T5()},[g]),A.useEffect(()=>{m&&n(R=>R===null?R:null)},[m]),A.useEffect(()=>{o&&!c.isFetching&&a(!1)},[o,c.isFetching]);const{refetch:y}=c,S=A.useCallback(()=>{a(!0),y()},[y]),E=A.useCallback(()=>{y()},[y]),C=ype({...Oxe(),meta:{softError:!0},onSuccess:R=>{const M=R.run;if(M!==null){const N={runId:M.runId,attemptedVersion:M.targetVersion,previousVersion:M.fromVersion,startedAt:Date.now()};$xe(N),n(N),s(null)}t.setQueryData(rH(),R)},onError:()=>{y()}}),{mutate:w}=C,x=A.useCallback(R=>{w({body:{targetVersion:R}})},[w]),T=A.useCallback(()=>{h.current!==null&&s(h.current),T5(),n(null)},[]);return{surface:f.surface,appliesSchemaMigration:Bxe(c.data),currentVersion:c.data?.currentVersion,release:iH(c.data,Date.now()),onCheck:S,install:x,onDismissResult:T,onRetryConnection:E}}const uI=A.createContext(null);function Jxe({children:t}){const e=Qxe();return A.createElement(uI.Provider,{value:e},t)}function e_e(){const t=A.useContext(uI);if(t===null)throw new Error("useSelfUpdate must be used within a SelfUpdateProvider");return t}function t_e(){return A.useContext(uI)}function n_e(){const{surface:t,onRetryConnection:e}=e_e();if(t.status!=="ready")return null;const{overlay:n}=t;return n.kind==="applying"?I.jsx(lte,{target:n.target,phase:n.phase,elapsedSeconds:n.elapsedSeconds}):n.kind==="neverCameBack"?I.jsx(ute,{attemptedVersion:n.attemptedVersion,previousVersion:n.previousVersion,elapsedSeconds:n.elapsedSeconds,logsCommand:n.logsCommand,onRetryConnection:e}):null}const Nx=(...t)=>W8(k8(t)),r_e={error:{container:"border-danger/50 bg-danger-soft",icon:"text-danger",title:"text-danger"},warning:{container:"border-warning/50 bg-warning-soft",icon:"text-warning",title:"text-warning"},info:{container:"border-accent-2/50 bg-accent-2-soft",icon:"text-accent-2",title:"text-accent-2"}},s_e={error:aQ,warning:z8,info:dQ},o_e={error:"Error",warning:"Warning",info:"Information"},i_e=({id:t,severity:e,title:n,detail:r,onDismiss:s})=>{const o=r_e[e],a=s_e[e];return I.jsxs("div",{role:e==="error"?"alert":"status","aria-live":e==="error"?"assertive":"polite",className:Nx("pointer-events-auto flex items-start gap-3 rounded-md border bg-canvas px-3 py-2 shadow-lg",o.container),children:[I.jsx(a,{className:Nx("size-5 shrink-0 mt-0.5",o.icon),"aria-hidden":"true"}),I.jsxs("div",{className:"flex-1 min-w-0",children:[I.jsx("p",{className:Nx("text-sm font-medium",o.title),children:n}),r&&I.jsx("p",{className:"mt-0.5 text-xs text-fg-muted break-words",children:r})]}),I.jsx("button",{type:"button",onClick:()=>s(t),className:"shrink-0 rounded-md p-1 text-fg-muted hover:bg-surface-raised hover:text-fg transition-colors","aria-label":`Dismiss ${o_e[e].toLowerCase()}`,children:I.jsx(La,{className:"size-4","aria-hidden":"true"})})]})},a_e=({errors:t,onDismiss:e})=>t.length===0?null:I.jsx("section",{"aria-label":"Notifications",className:"pointer-events-none fixed inset-x-0 top-0 z-[60] flex flex-col items-center gap-2 px-4 pt-4 sm:items-end sm:pr-6",children:I.jsx("div",{className:"flex w-full max-w-md flex-col gap-2",children:t.map(n=>I.jsx(i_e,{id:n.id,severity:n.severity,title:n.title,detail:n.detail,onDismiss:e},n.id))})}),O5=5,YIe=(t,e,n)=>({title:t,detail:uH(n)??e,error:n}),uH=t=>{if(t!=null){if(t instanceof Error)return t.message||void 0;if(typeof t=="string")return t||void 0;if(typeof t=="object"&&"message"in t&&typeof t.message=="string")return t.message||void 0}},ZIe=t=>{const e=uH(t);return e?e.startsWith("Message not found"):!1},l_e=(t,e,n)=>t.severity===n&&t.title===e.title&&t.detail===e.detail,u_e=(t,e)=>{const r=[...t.filter(s=>!l_e(s,{title:e.title,detail:e.detail,severity:e.severity},e.severity)),e];return r.length<=O5?r:r.slice(r.length-O5)},c_e=(t,e)=>t.filter(n=>n.id!==e),d_e=(t,e,n)=>({id:e,severity:t.severity??"error",title:t.title,detail:t.detail,createdAt:n}),cH=A.createContext(void 0),f_e=()=>typeof globalThis.crypto<"u"&&typeof globalThis.crypto.randomUUID=="function"?globalThis.crypto.randomUUID():`banner-${Date.now()}-${Math.random().toString(36).slice(2,10)}`,h_e=({children:t})=>{const[e,n]=A.useState([]),r=A.useCallback(u=>{if(u.error!=null&&M9(u.error))return ql(u.error).correlationId;const c=d_e(u,f_e(),Date.now());return n(f=>u_e(f,c)),c.id},[]),s=A.useCallback(u=>{n(c=>c_e(c,u))},[]),o=A.useCallback(()=>{n([])},[]),a=A.useMemo(()=>({errors:e,pushError:r,dismissError:s,clearAll:o}),[e,r,s,o]);return I.jsxs(cH.Provider,{value:a,children:[t,I.jsx(a_e,{errors:e,onDismiss:s})]})},XIe=()=>{const t=A.useContext(cH);if(!t)throw new Error("useErrorBanners must be used within an ErrorBannerProvider");return t},p_e=({error:t,reset:e,info:n})=>{const r=Hy(t),s=ql(t,{recoverable:r,componentStack:n?.componentStack});return I.jsx(j9,{fatal:s,onRetry:r?e:void 0})},Sp=Vge()({component:m_e,errorComponent:p_e}),g_e=()=>{const{t}=Awe("common",{useSuspense:!1});return I.jsx("a",{href:"#main-content",className:"sr-only focus:not-sr-only focus:absolute focus:z-50 focus:p-4 focus:bg-canvas focus:text-fg focus:rounded-md",children:t("accessibility.skipToContent","Skip to main content")})};function m_e(){return I.jsxs(h_e,{children:[I.jsxs(Jxe,{children:[I.jsxs(Lxe,{children:[I.jsx(g_e,{}),I.jsx("main",{id:"main-content",className:"h-dvh overflow-hidden",children:I.jsx(A.Suspense,{fallback:I.jsx(dT,{}),children:I.jsx(fz,{})})})]}),I.jsx(n_e,{})]}),I.jsx(z9,{})]})}const v_e=hr("/")({beforeLoad:()=>{throw V7({to:"/mail"})}});var Tt;(function(t){t.assertEqual=s=>{};function e(s){}t.assertIs=e;function n(s){throw new Error}t.assertNever=n,t.arrayToEnum=s=>{const o={};for(const a of s)o[a]=a;return o},t.getValidEnumValues=s=>{const o=t.objectKeys(s).filter(u=>typeof s[s[u]]!="number"),a={};for(const u of o)a[u]=s[u];return t.objectValues(a)},t.objectValues=s=>t.objectKeys(s).map(function(o){return s[o]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const o=[];for(const a in s)Object.prototype.hasOwnProperty.call(s,a)&&o.push(a);return o},t.find=(s,o)=>{for(const a of s)if(o(a))return a},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,o=" | "){return s.map(a=>typeof a=="string"?`'${a}'`:a).join(o)}t.joinValues=r,t.jsonStringifyReplacer=(s,o)=>typeof o=="bigint"?o.toString():o})(Tt||(Tt={}));var N5;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(N5||(N5={}));const Oe=Tt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ea=t=>{switch(typeof t){case"undefined":return Oe.undefined;case"string":return Oe.string;case"number":return Number.isNaN(t)?Oe.nan:Oe.number;case"boolean":return Oe.boolean;case"function":return Oe.function;case"bigint":return Oe.bigint;case"symbol":return Oe.symbol;case"object":return Array.isArray(t)?Oe.array:t===null?Oe.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?Oe.promise:typeof Map<"u"&&t instanceof Map?Oe.map:typeof Set<"u"&&t instanceof Set?Oe.set:typeof Date<"u"&&t instanceof Date?Oe.date:Oe.object;default:return Oe.unknown}},ge=Tt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class _i extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}format(e){const n=e||function(o){return o.message},r={_errors:[]},s=o=>{for(const a of o.issues)if(a.code==="invalid_union")a.unionErrors.map(s);else if(a.code==="invalid_return_type")s(a.returnTypeError);else if(a.code==="invalid_arguments")s(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let u=r,c=0;for(;c<a.path.length;){const f=a.path[c];c===a.path.length-1?(u[f]=u[f]||{_errors:[]},u[f]._errors.push(n(a))):u[f]=u[f]||{_errors:[]},u=u[f],c++}}};return s(this),r}static assert(e){if(!(e instanceof _i))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Tt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},r=[];for(const s of this.issues)if(s.path.length>0){const o=s.path[0];n[o]=n[o]||[],n[o].push(e(s))}else r.push(e(s));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}_i.create=t=>new _i(t);const NA=(t,e)=>{let n;switch(t.code){case ge.invalid_type:t.received===Oe.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case ge.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,Tt.jsonStringifyReplacer)}`;break;case ge.unrecognized_keys:n=`Unrecognized key(s) in object: ${Tt.joinValues(t.keys,", ")}`;break;case ge.invalid_union:n="Invalid input";break;case ge.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Tt.joinValues(t.options)}`;break;case ge.invalid_enum_value:n=`Invalid enum value. Expected ${Tt.joinValues(t.options)}, received '${t.received}'`;break;case ge.invalid_arguments:n="Invalid function arguments";break;case ge.invalid_return_type:n="Invalid function return type";break;case ge.invalid_date:n="Invalid date";break;case ge.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:Tt.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case ge.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case ge.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case ge.custom:n="Invalid input";break;case ge.invalid_intersection_types:n="Intersection results could not be merged";break;case ge.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case ge.not_finite:n="Number must be finite";break;default:n=e.defaultError,Tt.assertNever(t)}return{message:n}};let y_e=NA;function b_e(){return y_e}const S_e=t=>{const{data:e,path:n,errorMaps:r,issueData:s}=t,o=[...n,...s.path||[]],a={...s,path:o};if(s.message!==void 0)return{...s,path:o,message:s.message};let u="";const c=r.filter(f=>!!f).slice().reverse();for(const f of c)u=f(a,{data:e,defaultError:u}).message;return{...s,path:o,message:u}};function _e(t,e){const n=b_e(),r=S_e({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===NA?void 0:NA].filter(s=>!!s)});t.common.issues.push(r)}class us{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const r=[];for(const s of n){if(s.status==="aborted")return Ye;s.status==="dirty"&&e.dirty(),r.push(s.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,n){const r=[];for(const s of n){const o=await s.key,a=await s.value;r.push({key:o,value:a})}return us.mergeObjectSync(e,r)}static mergeObjectSync(e,n){const r={};for(const s of n){const{key:o,value:a}=s;if(o.status==="aborted"||a.status==="aborted")return Ye;o.status==="dirty"&&e.dirty(),a.status==="dirty"&&e.dirty(),o.value!=="__proto__"&&(typeof a.value<"u"||s.alwaysSet)&&(r[o.value]=a.value)}return{status:e.value,value:r}}}const Ye=Object.freeze({status:"aborted"}),lh=t=>({status:"dirty",value:t}),Ms=t=>({status:"valid",value:t}),M5=t=>t.status==="aborted",P5=t=>t.status==="dirty",td=t=>t.status==="valid",gy=t=>typeof Promise<"u"&&t instanceof Promise;var Me;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Me||(Me={}));class $a{constructor(e,n,r,s){this._cachedPath=[],this.parent=e,this.data=n,this._path=r,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const k5=(t,e)=>{if(td(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new _i(t.common.issues);return this._error=n,this._error}}};function st(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:r,description:s}=t;if(e&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:s}:{errorMap:(a,u)=>{const{message:c}=t;return a.code==="invalid_enum_value"?{message:c??u.defaultError}:typeof u.data>"u"?{message:c??r??u.defaultError}:a.code!=="invalid_type"?{message:u.defaultError}:{message:c??n??u.defaultError}},description:s}}class wt{get description(){return this._def.description}_getType(e){return Ea(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:Ea(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new us,ctx:{common:e.parent.common,data:e.data,parsedType:Ea(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(gy(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const r=this.safeParse(e,n);if(r.success)return r.data;throw r.error}safeParse(e,n){const r={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Ea(e)},s=this._parseSync({data:e,path:r.path,parent:r});return k5(r,s)}"~validate"(e){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Ea(e)};if(!this["~standard"].async)try{const r=this._parseSync({data:e,path:[],parent:n});return td(r)?{value:r.value}:{issues:n.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:n}).then(r=>td(r)?{value:r.value}:{issues:n.common.issues})}async parseAsync(e,n){const r=await this.safeParseAsync(e,n);if(r.success)return r.data;throw r.error}async safeParseAsync(e,n){const r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Ea(e)},s=this._parse({data:e,path:r.path,parent:r}),o=await(gy(s)?s:Promise.resolve(s));return k5(r,o)}refine(e,n){const r=s=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(s):n;return this._refinement((s,o)=>{const a=e(s),u=()=>o.addIssue({code:ge.custom,...r(s)});return typeof Promise<"u"&&a instanceof Promise?a.then(c=>c?!0:(u(),!1)):a?!0:(u(),!1)})}refinement(e,n){return this._refinement((r,s)=>e(r)?!0:(s.addIssue(typeof n=="function"?n(r,s):n),!1))}_refinement(e){return new sd({schema:this,typeName:Ze.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Pa.create(this,this._def)}nullable(){return od.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return _o.create(this)}promise(){return by.create(this,this._def)}or(e){return vy.create([this,e],this._def)}and(e){return yy.create(this,e,this._def)}transform(e){return new sd({...st(this._def),schema:this,typeName:Ze.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new PA({...st(this._def),innerType:this,defaultValue:n,typeName:Ze.ZodDefault})}brand(){return new $_e({typeName:Ze.ZodBranded,type:this,...st(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new kA({...st(this._def),innerType:this,catchValue:n,typeName:Ze.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return cI.create(this,e)}readonly(){return DA.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const E_e=/^c[^\s-]{8,}$/i,C_e=/^[0-9a-z]+$/,w_e=/^[0-9A-HJKMNP-TV-Z]{26}$/i,x_e=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,__e=/^[a-z0-9_-]{21}$/i,A_e=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,T_e=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,R_e=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,I_e="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Mx;const O_e=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,N_e=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,M_e=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,P_e=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,k_e=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,D_e=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,dH="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",L_e=new RegExp(`^${dH}$`);function fH(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);const n=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${n}`}function U_e(t){return new RegExp(`^${fH(t)}$`)}function F_e(t){let e=`${dH}T${fH(t)}`;const n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function z_e(t,e){return!!((e==="v4"||!e)&&O_e.test(t)||(e==="v6"||!e)&&M_e.test(t))}function j_e(t,e){if(!A_e.test(t))return!1;try{const[n]=t.split(".");if(!n)return!1;const r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),s=JSON.parse(atob(r));return!(typeof s!="object"||s===null||"typ"in s&&s?.typ!=="JWT"||!s.alg||e&&s.alg!==e)}catch{return!1}}function B_e(t,e){return!!((e==="v4"||!e)&&N_e.test(t)||(e==="v6"||!e)&&P_e.test(t))}class pi extends wt{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==Oe.string){const o=this._getOrReturnCtx(e);return _e(o,{code:ge.invalid_type,expected:Oe.string,received:o.parsedType}),Ye}const r=new us;let s;for(const o of this._def.checks)if(o.kind==="min")e.data.length<o.value&&(s=this._getOrReturnCtx(e,s),_e(s,{code:ge.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="max")e.data.length>o.value&&(s=this._getOrReturnCtx(e,s),_e(s,{code:ge.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){const a=e.data.length>o.value,u=e.data.length<o.value;(a||u)&&(s=this._getOrReturnCtx(e,s),a?_e(s,{code:ge.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):u&&_e(s,{code:ge.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")R_e.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"email",code:ge.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")Mx||(Mx=new RegExp(I_e,"u")),Mx.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"emoji",code:ge.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")x_e.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"uuid",code:ge.invalid_string,message:o.message}),r.dirty());else if(o.kind==="nanoid")__e.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"nanoid",code:ge.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")E_e.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"cuid",code:ge.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")C_e.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"cuid2",code:ge.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")w_e.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"ulid",code:ge.invalid_string,message:o.message}),r.dirty());else if(o.kind==="url")try{new URL(e.data)}catch{s=this._getOrReturnCtx(e,s),_e(s,{validation:"url",code:ge.invalid_string,message:o.message}),r.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"regex",code:ge.invalid_string,message:o.message}),r.dirty())):o.kind==="trim"?e.data=e.data.trim():o.kind==="includes"?e.data.includes(o.value,o.position)||(s=this._getOrReturnCtx(e,s),_e(s,{code:ge.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),r.dirty()):o.kind==="toLowerCase"?e.data=e.data.toLowerCase():o.kind==="toUpperCase"?e.data=e.data.toUpperCase():o.kind==="startsWith"?e.data.startsWith(o.value)||(s=this._getOrReturnCtx(e,s),_e(s,{code:ge.invalid_string,validation:{startsWith:o.value},message:o.message}),r.dirty()):o.kind==="endsWith"?e.data.endsWith(o.value)||(s=this._getOrReturnCtx(e,s),_e(s,{code:ge.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?F_e(o).test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{code:ge.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="date"?L_e.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{code:ge.invalid_string,validation:"date",message:o.message}),r.dirty()):o.kind==="time"?U_e(o).test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{code:ge.invalid_string,validation:"time",message:o.message}),r.dirty()):o.kind==="duration"?T_e.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"duration",code:ge.invalid_string,message:o.message}),r.dirty()):o.kind==="ip"?z_e(e.data,o.version)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"ip",code:ge.invalid_string,message:o.message}),r.dirty()):o.kind==="jwt"?j_e(e.data,o.alg)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"jwt",code:ge.invalid_string,message:o.message}),r.dirty()):o.kind==="cidr"?B_e(e.data,o.version)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"cidr",code:ge.invalid_string,message:o.message}),r.dirty()):o.kind==="base64"?k_e.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"base64",code:ge.invalid_string,message:o.message}),r.dirty()):o.kind==="base64url"?D_e.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"base64url",code:ge.invalid_string,message:o.message}),r.dirty()):Tt.assertNever(o);return{status:r.value,value:e.data}}_regex(e,n,r){return this.refinement(s=>e.test(s),{validation:n,code:ge.invalid_string,...Me.errToObj(r)})}_addCheck(e){return new pi({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...Me.errToObj(e)})}url(e){return this._addCheck({kind:"url",...Me.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...Me.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...Me.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...Me.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...Me.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...Me.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...Me.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...Me.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...Me.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...Me.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...Me.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...Me.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...Me.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...Me.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...Me.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...Me.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n?.position,...Me.errToObj(n?.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...Me.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...Me.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...Me.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...Me.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...Me.errToObj(n)})}nonempty(e){return this.min(1,Me.errToObj(e))}trim(){return new pi({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new pi({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new pi({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}pi.create=t=>new pi({checks:[],typeName:Ze.ZodString,coerce:t?.coerce??!1,...st(t)});function H_e(t,e){const n=(t.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,s=n>r?n:r,o=Number.parseInt(t.toFixed(s).replace(".","")),a=Number.parseInt(e.toFixed(s).replace(".",""));return o%a/10**s}class Jl extends wt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==Oe.number){const o=this._getOrReturnCtx(e);return _e(o,{code:ge.invalid_type,expected:Oe.number,received:o.parsedType}),Ye}let r;const s=new us;for(const o of this._def.checks)o.kind==="int"?Tt.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),_e(r,{code:ge.invalid_type,expected:"integer",received:"float",message:o.message}),s.dirty()):o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(r=this._getOrReturnCtx(e,r),_e(r,{code:ge.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(r=this._getOrReturnCtx(e,r),_e(r,{code:ge.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="multipleOf"?H_e(e.data,o.value)!==0&&(r=this._getOrReturnCtx(e,r),_e(r,{code:ge.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):o.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),_e(r,{code:ge.not_finite,message:o.message}),s.dirty()):Tt.assertNever(o);return{status:s.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,Me.toString(n))}gt(e,n){return this.setLimit("min",e,!1,Me.toString(n))}lte(e,n){return this.setLimit("max",e,!0,Me.toString(n))}lt(e,n){return this.setLimit("max",e,!1,Me.toString(n))}setLimit(e,n,r,s){return new Jl({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:Me.toString(s)}]})}_addCheck(e){return new Jl({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:Me.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Me.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Me.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Me.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Me.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:Me.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:Me.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Me.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Me.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Tt.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(n)&&Number.isFinite(e)}}Jl.create=t=>new Jl({checks:[],typeName:Ze.ZodNumber,coerce:t?.coerce||!1,...st(t)});class eu extends wt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==Oe.bigint)return this._getInvalidInput(e);let r;const s=new us;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(r=this._getOrReturnCtx(e,r),_e(r,{code:ge.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(r=this._getOrReturnCtx(e,r),_e(r,{code:ge.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="multipleOf"?e.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),_e(r,{code:ge.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):Tt.assertNever(o);return{status:s.value,value:e.data}}_getInvalidInput(e){const n=this._getOrReturnCtx(e);return _e(n,{code:ge.invalid_type,expected:Oe.bigint,received:n.parsedType}),Ye}gte(e,n){return this.setLimit("min",e,!0,Me.toString(n))}gt(e,n){return this.setLimit("min",e,!1,Me.toString(n))}lte(e,n){return this.setLimit("max",e,!0,Me.toString(n))}lt(e,n){return this.setLimit("max",e,!1,Me.toString(n))}setLimit(e,n,r,s){return new eu({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:Me.toString(s)}]})}_addCheck(e){return new eu({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Me.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Me.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Me.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Me.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:Me.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}eu.create=t=>new eu({checks:[],typeName:Ze.ZodBigInt,coerce:t?.coerce??!1,...st(t)});class my extends wt{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==Oe.boolean){const r=this._getOrReturnCtx(e);return _e(r,{code:ge.invalid_type,expected:Oe.boolean,received:r.parsedType}),Ye}return Ms(e.data)}}my.create=t=>new my({typeName:Ze.ZodBoolean,coerce:t?.coerce||!1,...st(t)});class nd extends wt{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==Oe.date){const o=this._getOrReturnCtx(e);return _e(o,{code:ge.invalid_type,expected:Oe.date,received:o.parsedType}),Ye}if(Number.isNaN(e.data.getTime())){const o=this._getOrReturnCtx(e);return _e(o,{code:ge.invalid_date}),Ye}const r=new us;let s;for(const o of this._def.checks)o.kind==="min"?e.data.getTime()<o.value&&(s=this._getOrReturnCtx(e,s),_e(s,{code:ge.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),r.dirty()):o.kind==="max"?e.data.getTime()>o.value&&(s=this._getOrReturnCtx(e,s),_e(s,{code:ge.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):Tt.assertNever(o);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new nd({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:Me.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:Me.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}}nd.create=t=>new nd({checks:[],coerce:t?.coerce||!1,typeName:Ze.ZodDate,...st(t)});class D5 extends wt{_parse(e){if(this._getType(e)!==Oe.symbol){const r=this._getOrReturnCtx(e);return _e(r,{code:ge.invalid_type,expected:Oe.symbol,received:r.parsedType}),Ye}return Ms(e.data)}}D5.create=t=>new D5({typeName:Ze.ZodSymbol,...st(t)});class L5 extends wt{_parse(e){if(this._getType(e)!==Oe.undefined){const r=this._getOrReturnCtx(e);return _e(r,{code:ge.invalid_type,expected:Oe.undefined,received:r.parsedType}),Ye}return Ms(e.data)}}L5.create=t=>new L5({typeName:Ze.ZodUndefined,...st(t)});class U5 extends wt{_parse(e){if(this._getType(e)!==Oe.null){const r=this._getOrReturnCtx(e);return _e(r,{code:ge.invalid_type,expected:Oe.null,received:r.parsedType}),Ye}return Ms(e.data)}}U5.create=t=>new U5({typeName:Ze.ZodNull,...st(t)});class F5 extends wt{constructor(){super(...arguments),this._any=!0}_parse(e){return Ms(e.data)}}F5.create=t=>new F5({typeName:Ze.ZodAny,...st(t)});class z5 extends wt{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Ms(e.data)}}z5.create=t=>new z5({typeName:Ze.ZodUnknown,...st(t)});class qa extends wt{_parse(e){const n=this._getOrReturnCtx(e);return _e(n,{code:ge.invalid_type,expected:Oe.never,received:n.parsedType}),Ye}}qa.create=t=>new qa({typeName:Ze.ZodNever,...st(t)});class j5 extends wt{_parse(e){if(this._getType(e)!==Oe.undefined){const r=this._getOrReturnCtx(e);return _e(r,{code:ge.invalid_type,expected:Oe.void,received:r.parsedType}),Ye}return Ms(e.data)}}j5.create=t=>new j5({typeName:Ze.ZodVoid,...st(t)});class _o extends wt{_parse(e){const{ctx:n,status:r}=this._processInputParams(e),s=this._def;if(n.parsedType!==Oe.array)return _e(n,{code:ge.invalid_type,expected:Oe.array,received:n.parsedType}),Ye;if(s.exactLength!==null){const a=n.data.length>s.exactLength.value,u=n.data.length<s.exactLength.value;(a||u)&&(_e(n,{code:a?ge.too_big:ge.too_small,minimum:u?s.exactLength.value:void 0,maximum:a?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),r.dirty())}if(s.minLength!==null&&n.data.length<s.minLength.value&&(_e(n,{code:ge.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),r.dirty()),s.maxLength!==null&&n.data.length>s.maxLength.value&&(_e(n,{code:ge.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,u)=>s.type._parseAsync(new $a(n,a,n.path,u)))).then(a=>us.mergeArray(r,a));const o=[...n.data].map((a,u)=>s.type._parseSync(new $a(n,a,n.path,u)));return us.mergeArray(r,o)}get element(){return this._def.type}min(e,n){return new _o({...this._def,minLength:{value:e,message:Me.toString(n)}})}max(e,n){return new _o({...this._def,maxLength:{value:e,message:Me.toString(n)}})}length(e,n){return new _o({...this._def,exactLength:{value:e,message:Me.toString(n)}})}nonempty(e){return this.min(1,e)}}_o.create=(t,e)=>new _o({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Ze.ZodArray,...st(e)});function xc(t){if(t instanceof An){const e={};for(const n in t.shape){const r=t.shape[n];e[n]=Pa.create(xc(r))}return new An({...t._def,shape:()=>e})}else return t instanceof _o?new _o({...t._def,type:xc(t.element)}):t instanceof Pa?Pa.create(xc(t.unwrap())):t instanceof od?od.create(xc(t.unwrap())):t instanceof tu?tu.create(t.items.map(e=>xc(e))):t}class An extends wt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=Tt.objectKeys(e);return this._cached={shape:e,keys:n},this._cached}_parse(e){if(this._getType(e)!==Oe.object){const f=this._getOrReturnCtx(e);return _e(f,{code:ge.invalid_type,expected:Oe.object,received:f.parsedType}),Ye}const{status:r,ctx:s}=this._processInputParams(e),{shape:o,keys:a}=this._getCached(),u=[];if(!(this._def.catchall instanceof qa&&this._def.unknownKeys==="strip"))for(const f in s.data)a.includes(f)||u.push(f);const c=[];for(const f of a){const h=o[f],g=s.data[f];c.push({key:{status:"valid",value:f},value:h._parse(new $a(s,g,s.path,f)),alwaysSet:f in s.data})}if(this._def.catchall instanceof qa){const f=this._def.unknownKeys;if(f==="passthrough")for(const h of u)c.push({key:{status:"valid",value:h},value:{status:"valid",value:s.data[h]}});else if(f==="strict")u.length>0&&(_e(s,{code:ge.unrecognized_keys,keys:u}),r.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const f=this._def.catchall;for(const h of u){const g=s.data[h];c.push({key:{status:"valid",value:h},value:f._parse(new $a(s,g,s.path,h)),alwaysSet:h in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const f=[];for(const h of c){const g=await h.key,m=await h.value;f.push({key:g,value:m,alwaysSet:h.alwaysSet})}return f}).then(f=>us.mergeObjectSync(r,f)):us.mergeObjectSync(r,c)}get shape(){return this._def.shape()}strict(e){return Me.errToObj,new An({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,r)=>{const s=this._def.errorMap?.(n,r).message??r.defaultError;return n.code==="unrecognized_keys"?{message:Me.errToObj(e).message??s}:{message:s}}}:{}})}strip(){return new An({...this._def,unknownKeys:"strip"})}passthrough(){return new An({...this._def,unknownKeys:"passthrough"})}extend(e){return new An({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new An({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Ze.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new An({...this._def,catchall:e})}pick(e){const n={};for(const r of Tt.objectKeys(e))e[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new An({...this._def,shape:()=>n})}omit(e){const n={};for(const r of Tt.objectKeys(this.shape))e[r]||(n[r]=this.shape[r]);return new An({...this._def,shape:()=>n})}deepPartial(){return xc(this)}partial(e){const n={};for(const r of Tt.objectKeys(this.shape)){const s=this.shape[r];e&&!e[r]?n[r]=s:n[r]=s.optional()}return new An({...this._def,shape:()=>n})}required(e){const n={};for(const r of Tt.objectKeys(this.shape))if(e&&!e[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof Pa;)o=o._def.innerType;n[r]=o}return new An({...this._def,shape:()=>n})}keyof(){return hH(Tt.objectKeys(this.shape))}}An.create=(t,e)=>new An({shape:()=>t,unknownKeys:"strip",catchall:qa.create(),typeName:Ze.ZodObject,...st(e)});An.strictCreate=(t,e)=>new An({shape:()=>t,unknownKeys:"strict",catchall:qa.create(),typeName:Ze.ZodObject,...st(e)});An.lazycreate=(t,e)=>new An({shape:t,unknownKeys:"strip",catchall:qa.create(),typeName:Ze.ZodObject,...st(e)});class vy extends wt{_parse(e){const{ctx:n}=this._processInputParams(e),r=this._def.options;function s(o){for(const u of o)if(u.result.status==="valid")return u.result;for(const u of o)if(u.result.status==="dirty")return n.common.issues.push(...u.ctx.common.issues),u.result;const a=o.map(u=>new _i(u.ctx.common.issues));return _e(n,{code:ge.invalid_union,unionErrors:a}),Ye}if(n.common.async)return Promise.all(r.map(async o=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(s);{let o;const a=[];for(const c of r){const f={...n,common:{...n.common,issues:[]},parent:null},h=c._parseSync({data:n.data,path:n.path,parent:f});if(h.status==="valid")return h;h.status==="dirty"&&!o&&(o={result:h,ctx:f}),f.common.issues.length&&a.push(f.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const u=a.map(c=>new _i(c));return _e(n,{code:ge.invalid_union,unionErrors:u}),Ye}}get options(){return this._def.options}}vy.create=(t,e)=>new vy({options:t,typeName:Ze.ZodUnion,...st(e)});function MA(t,e){const n=Ea(t),r=Ea(e);if(t===e)return{valid:!0,data:t};if(n===Oe.object&&r===Oe.object){const s=Tt.objectKeys(e),o=Tt.objectKeys(t).filter(u=>s.indexOf(u)!==-1),a={...t,...e};for(const u of o){const c=MA(t[u],e[u]);if(!c.valid)return{valid:!1};a[u]=c.data}return{valid:!0,data:a}}else if(n===Oe.array&&r===Oe.array){if(t.length!==e.length)return{valid:!1};const s=[];for(let o=0;o<t.length;o++){const a=t[o],u=e[o],c=MA(a,u);if(!c.valid)return{valid:!1};s.push(c.data)}return{valid:!0,data:s}}else return n===Oe.date&&r===Oe.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class yy extends wt{_parse(e){const{status:n,ctx:r}=this._processInputParams(e),s=(o,a)=>{if(M5(o)||M5(a))return Ye;const u=MA(o.value,a.value);return u.valid?((P5(o)||P5(a))&&n.dirty(),{status:n.value,value:u.data}):(_e(r,{code:ge.invalid_intersection_types}),Ye)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,a])=>s(o,a)):s(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}yy.create=(t,e,n)=>new yy({left:t,right:e,typeName:Ze.ZodIntersection,...st(n)});class tu extends wt{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==Oe.array)return _e(r,{code:ge.invalid_type,expected:Oe.array,received:r.parsedType}),Ye;if(r.data.length<this._def.items.length)return _e(r,{code:ge.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ye;!this._def.rest&&r.data.length>this._def.items.length&&(_e(r,{code:ge.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...r.data].map((a,u)=>{const c=this._def.items[u]||this._def.rest;return c?c._parse(new $a(r,a,r.path,u)):null}).filter(a=>!!a);return r.common.async?Promise.all(o).then(a=>us.mergeArray(n,a)):us.mergeArray(n,o)}get items(){return this._def.items}rest(e){return new tu({...this._def,rest:e})}}tu.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new tu({items:t,typeName:Ze.ZodTuple,rest:null,...st(e)})};class B5 extends wt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==Oe.map)return _e(r,{code:ge.invalid_type,expected:Oe.map,received:r.parsedType}),Ye;const s=this._def.keyType,o=this._def.valueType,a=[...r.data.entries()].map(([u,c],f)=>({key:s._parse(new $a(r,u,r.path,[f,"key"])),value:o._parse(new $a(r,c,r.path,[f,"value"]))}));if(r.common.async){const u=new Map;return Promise.resolve().then(async()=>{for(const c of a){const f=await c.key,h=await c.value;if(f.status==="aborted"||h.status==="aborted")return Ye;(f.status==="dirty"||h.status==="dirty")&&n.dirty(),u.set(f.value,h.value)}return{status:n.value,value:u}})}else{const u=new Map;for(const c of a){const f=c.key,h=c.value;if(f.status==="aborted"||h.status==="aborted")return Ye;(f.status==="dirty"||h.status==="dirty")&&n.dirty(),u.set(f.value,h.value)}return{status:n.value,value:u}}}}B5.create=(t,e,n)=>new B5({valueType:e,keyType:t,typeName:Ze.ZodMap,...st(n)});class Xh extends wt{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==Oe.set)return _e(r,{code:ge.invalid_type,expected:Oe.set,received:r.parsedType}),Ye;const s=this._def;s.minSize!==null&&r.data.size<s.minSize.value&&(_e(r,{code:ge.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),n.dirty()),s.maxSize!==null&&r.data.size>s.maxSize.value&&(_e(r,{code:ge.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());const o=this._def.valueType;function a(c){const f=new Set;for(const h of c){if(h.status==="aborted")return Ye;h.status==="dirty"&&n.dirty(),f.add(h.value)}return{status:n.value,value:f}}const u=[...r.data.values()].map((c,f)=>o._parse(new $a(r,c,r.path,f)));return r.common.async?Promise.all(u).then(c=>a(c)):a(u)}min(e,n){return new Xh({...this._def,minSize:{value:e,message:Me.toString(n)}})}max(e,n){return new Xh({...this._def,maxSize:{value:e,message:Me.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}Xh.create=(t,e)=>new Xh({valueType:t,minSize:null,maxSize:null,typeName:Ze.ZodSet,...st(e)});class H5 extends wt{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}H5.create=(t,e)=>new H5({getter:t,typeName:Ze.ZodLazy,...st(e)});class $5 extends wt{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return _e(n,{received:n.data,code:ge.invalid_literal,expected:this._def.value}),Ye}return{status:"valid",value:e.data}}get value(){return this._def.value}}$5.create=(t,e)=>new $5({value:t,typeName:Ze.ZodLiteral,...st(e)});function hH(t,e){return new rd({values:t,typeName:Ze.ZodEnum,...st(e)})}class rd extends wt{_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),r=this._def.values;return _e(n,{expected:Tt.joinValues(r),received:n.parsedType,code:ge.invalid_type}),Ye}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const n=this._getOrReturnCtx(e),r=this._def.values;return _e(n,{received:n.data,code:ge.invalid_enum_value,options:r}),Ye}return Ms(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return rd.create(e,{...this._def,...n})}exclude(e,n=this._def){return rd.create(this.options.filter(r=>!e.includes(r)),{...this._def,...n})}}rd.create=hH;class q5 extends wt{_parse(e){const n=Tt.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==Oe.string&&r.parsedType!==Oe.number){const s=Tt.objectValues(n);return _e(r,{expected:Tt.joinValues(s),received:r.parsedType,code:ge.invalid_type}),Ye}if(this._cache||(this._cache=new Set(Tt.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const s=Tt.objectValues(n);return _e(r,{received:r.data,code:ge.invalid_enum_value,options:s}),Ye}return Ms(e.data)}get enum(){return this._def.values}}q5.create=(t,e)=>new q5({values:t,typeName:Ze.ZodNativeEnum,...st(e)});class by extends wt{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==Oe.promise&&n.common.async===!1)return _e(n,{code:ge.invalid_type,expected:Oe.promise,received:n.parsedType}),Ye;const r=n.parsedType===Oe.promise?n.data:Promise.resolve(n.data);return Ms(r.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}}by.create=(t,e)=>new by({type:t,typeName:Ze.ZodPromise,...st(e)});class sd extends wt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ze.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:r}=this._processInputParams(e),s=this._def.effect||null,o={addIssue:a=>{_e(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),s.type==="preprocess"){const a=s.transform(r.data,o);if(r.common.async)return Promise.resolve(a).then(async u=>{if(n.value==="aborted")return Ye;const c=await this._def.schema._parseAsync({data:u,path:r.path,parent:r});return c.status==="aborted"?Ye:c.status==="dirty"||n.value==="dirty"?lh(c.value):c});{if(n.value==="aborted")return Ye;const u=this._def.schema._parseSync({data:a,path:r.path,parent:r});return u.status==="aborted"?Ye:u.status==="dirty"||n.value==="dirty"?lh(u.value):u}}if(s.type==="refinement"){const a=u=>{const c=s.refinement(u,o);if(r.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return u};if(r.common.async===!1){const u=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return u.status==="aborted"?Ye:(u.status==="dirty"&&n.dirty(),a(u.value),{status:n.value,value:u.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(u=>u.status==="aborted"?Ye:(u.status==="dirty"&&n.dirty(),a(u.value).then(()=>({status:n.value,value:u.value}))))}if(s.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!td(a))return Ye;const u=s.transform(a.value,o);if(u instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:u}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>td(a)?Promise.resolve(s.transform(a.value,o)).then(u=>({status:n.value,value:u})):Ye);Tt.assertNever(s)}}sd.create=(t,e,n)=>new sd({schema:t,typeName:Ze.ZodEffects,effect:e,...st(n)});sd.createWithPreprocess=(t,e,n)=>new sd({schema:e,effect:{type:"preprocess",transform:t},typeName:Ze.ZodEffects,...st(n)});class Pa extends wt{_parse(e){return this._getType(e)===Oe.undefined?Ms(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Pa.create=(t,e)=>new Pa({innerType:t,typeName:Ze.ZodOptional,...st(e)});class od extends wt{_parse(e){return this._getType(e)===Oe.null?Ms(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}od.create=(t,e)=>new od({innerType:t,typeName:Ze.ZodNullable,...st(e)});class PA extends wt{_parse(e){const{ctx:n}=this._processInputParams(e);let r=n.data;return n.parsedType===Oe.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}PA.create=(t,e)=>new PA({innerType:t,typeName:Ze.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...st(e)});class kA extends wt{_parse(e){const{ctx:n}=this._processInputParams(e),r={...n,common:{...n.common,issues:[]}},s=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return gy(s)?s.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new _i(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new _i(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}kA.create=(t,e)=>new kA({innerType:t,typeName:Ze.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...st(e)});class W5 extends wt{_parse(e){if(this._getType(e)!==Oe.nan){const r=this._getOrReturnCtx(e);return _e(r,{code:ge.invalid_type,expected:Oe.nan,received:r.parsedType}),Ye}return{status:"valid",value:e.data}}}W5.create=t=>new W5({typeName:Ze.ZodNaN,...st(t)});class $_e extends wt{_parse(e){const{ctx:n}=this._processInputParams(e),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class cI extends wt{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Ye:o.status==="dirty"?(n.dirty(),lh(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const s=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Ye:s.status==="dirty"?(n.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:r.path,parent:r})}}static create(e,n){return new cI({in:e,out:n,typeName:Ze.ZodPipeline})}}class DA extends wt{_parse(e){const n=this._def.innerType._parse(e),r=s=>(td(s)&&(s.value=Object.freeze(s.value)),s);return gy(n)?n.then(s=>r(s)):r(n)}unwrap(){return this._def.innerType}}DA.create=(t,e)=>new DA({innerType:t,typeName:Ze.ZodReadonly,...st(e)});var Ze;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(Ze||(Ze={}));const xr=pi.create;Jl.create;eu.create;const q_e=my.create;nd.create;qa.create;_o.create;const Ed=An.create;vy.create;yy.create;tu.create;rd.create;by.create;Pa.create;od.create;const QIe={string:(t=>pi.create({...t,coerce:!0})),number:(t=>Jl.create({...t,coerce:!0})),boolean:(t=>my.create({...t,coerce:!0})),bigint:(t=>eu.create({...t,coerce:!0})),date:(t=>nd.create({...t,coerce:!0}))},W_e=Dy().apiUrl;He.setConfig({baseUrl:W_e,fetch:O8});He.interceptors.error.use((t,e)=>{if(t instanceof o_||!e)return t;const n=t,r=n&&typeof n=="object"&&"message"in n?String(n.message):`Request failed with status ${e.status}`;return new o_(r,e.status,n)});const Px={Inbox:"inbox",Drafts:"drafts",Sent:"sent",Archive:"archive",Junk:"junk",Trash:"trash",All:"all",Flagged:"flagged"},JIe={inbox:"Inbox",drafts:"Drafts",sent:"Sent",archive:"Archive",junk:"Junk",trash:"Trash",all:"All",flagged:"Flagged"},V5=["inbox","flagged","drafts","sent","archive","all","junk","trash"];function V_e(t){const e=new Map,n=[...t].sort((r,s)=>V5.indexOf(Px[r.role])-V5.indexOf(Px[s.role]));for(const r of n){if(!r.mailboxId||e.has(r.mailboxId))continue;const s=Px[r.role];s&&e.set(r.mailboxId,s)}return e}const G_e=t=>{const e=t.split("/");return e[e.length-1]||t};function e2e(t,e,n){const r=t.displayNameOverride?.trim();if(r)return r;const s=G_e(t.fullPath);return!e||!n?s:n(`sidebar.${e}`,s)}const K_e=new Set(["sent","drafts","trash"]),t2e=t=>t===void 0||!K_e.has(t),Y_e=new Map;function n2e(t){const e=new Map;for(const n of t){const r=V_e(n.folderAppointments);for(const[s,o]of r)e.set(s,{role:o});for(const s of n.mailboxes){const o=r.get(s.mailboxId);e.set(s.mailboxId,{...o?{role:o}:{},providerPath:s.fullPath})}}return e}function r2e(t,e){const n=e[0];if(!t)return n?{mailboxId:n}:{};for(const s of e){const o=t.get(s);if(o&&Yee(o)!==void 0)return{mailboxId:s,folder:o}}if(!n)return{};const r=t.get(n);return{mailboxId:n,...r?{folder:r}:{}}}const Z_e=A.createContext(null),s2e=()=>A.useContext(Z_e)??{accounts:[],mailboxNameIndex:new Map,accountNameIndex:new Map,resultFolderIndex:Y_e,searchQuery:"",searchInput:"",searchViewKey:"",onSearchChange:()=>{},onSearchClear:()=>{},onSearchClearQuery:()=>{},intelligenceOpen:!1,onToggleIntelligence:()=>{},onSetIntelligenceOpen:()=>{}},X_e=()=>Vn(()=>import("./mail-CGtAo1Ry.js").then(t=>t.m),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12])),Q_e=Ed({q:xr().optional()}),J_e=hr("/mail")({loader:({context:{queryClient:t}})=>{t.prefetchQuery(Exe()),t.prefetchQuery({...Mxe(),staleTime:6e4})},component:ir(X_e,"component"),validateSearch:Q_e}),eAe=()=>Vn(()=>import("./onboarding-Dd5aSsGp.js"),__vite__mapDeps([13,14,3,4])),tAe=hr("/onboarding")({component:ir(eAe,"component")});function nAe(){const t=t_e(),e=t?.surface.status==="ready"&&t.surface.section.status==="available";return I.jsx(ite,{show:e,children:I.jsx(bQ,{className:"size-4"})})}const rAe=()=>Vn(()=>import("./settings-epL7Dplk.js"),[]),o2e=[{id:"accounts",label:"Accounts",icon:I.jsx(F8,{className:"size-4"})},{id:"senders",label:"Senders & Rules",icon:I.jsx(yQ,{className:"size-4"})},{id:"folders",label:"Folder roles",icon:I.jsx(cQ,{className:"size-4"})},{id:"filters",label:"Filters",icon:I.jsx(uQ,{className:"size-4"})},{id:"appearance",label:"Appearance",icon:I.jsx(hQ,{className:"size-4"})},{id:"advanced",label:"Advanced",icon:I.jsx(nAe,{})}],i2e={accounts:"/settings/accounts",senders:"/settings/senders",folders:"/settings/folders",filters:"/settings/filters",appearance:"/settings/appearance",advanced:"/settings/advanced"},sAe=hr("/settings")({component:ir(rAe,"component")}),oAe=()=>Vn(()=>import("./index-Ds6rm6WR.js"),__vite__mapDeps([15,7])),iAe=()=>Vn(()=>import("./index-DtqBFgK5.js"),[]),aAe=Ed({selectedMessageId:xr().optional(),selectedThreadId:xr().optional(),selectedMailboxId:xr().optional(),q:xr().optional()}),lAe=hr("/mail/")({component:ir(iAe,"component"),validateSearch:aAe,errorComponent:ir(oAe,"errorComponent")}),uAe=()=>Vn(()=>import("./_mailboxId-DtqBFgK5.js"),[]),cAe=Ed({selectedMessageId:xr().optional(),selectedThreadId:xr().optional(),q:xr().optional()}),dAe=hr("/mail/$mailboxId")({component:ir(uAe,"component"),validateSearch:cAe}),fAe=()=>Vn(()=>import("./flagged-dNLl7pSz.js"),__vite__mapDeps([16,7])),hAe=()=>Vn(()=>import("./flagged-DtqBFgK5.js"),[]),pAe=Ed({selectedMessageId:xr().optional(),q:xr().optional()}),gAe=hr("/mail/flagged")({component:ir(hAe,"component"),validateSearch:pAe,errorComponent:ir(fAe,"errorComponent")}),mAe=()=>Vn(()=>import("./outbox-DtqBFgK5.js"),[]),vAe=Ed({selectedOutboxMessageId:xr().optional(),q:xr().optional()}),yAe=hr("/mail/outbox")({component:ir(mAe,"component"),validateSearch:vAe}),bAe=()=>Vn(()=>import("./index-CA8m1jib.js"),[]),SAe=hr("/settings/")({component:ir(bAe,"component")}),EAe=()=>Vn(()=>import("./accounts-ADCcmorB.js"),__vite__mapDeps([17,5,18,2,14,3,4,19,7,8])),CAe=Ed({editAccountId:xr().optional(),focusSmtp:q_e().optional(),connected:xr().optional(),oauthError:xr().optional()}),wAe=hr("/settings/accounts")({component:ir(EAe,"component"),validateSearch:CAe}),xAe=()=>Vn(()=>import("./advanced-CRu4UqDe.js"),__vite__mapDeps([20,18,2,19,10,11])),_Ae=hr("/settings/advanced")({component:ir(xAe,"component")}),AAe=()=>Vn(()=>import("./appearance-DDoSefIs.js"),__vite__mapDeps([21,18,2])),TAe=hr("/settings/appearance")({component:ir(AAe,"component")}),RAe=()=>Vn(()=>import("./filters-B-QK-_x9.js"),__vite__mapDeps([22,18,2,6,9,11,7])),IAe=hr("/settings/filters")({component:ir(RAe,"component")}),OAe=()=>Vn(()=>import("./folders-D_SSE4kH.js"),__vite__mapDeps([23,12,18,2,7,9])),NAe=hr("/settings/folders")({component:ir(OAe,"component")}),MAe=()=>Vn(()=>import("./senders-d0E-TE0w.js"),__vite__mapDeps([24,3,18,2,7,1,8])),PAe=hr("/settings/senders")({component:ir(MAe,"component")}),kAe=()=>Vn(()=>import("./suggested-vips-DzhuY5XT.js"),[]),DAe=hr("/settings/suggested-vips")({component:ir(kAe,"component")}),LAe=v_e.update({id:"/",path:"/",getParentRoute:()=>Sp}),Ep=J_e.update({id:"/mail",path:"/mail",getParentRoute:()=>Sp}),UAe=tAe.update({id:"/onboarding",path:"/onboarding",getParentRoute:()=>Sp}),Mi=sAe.update({id:"/settings",path:"/settings",getParentRoute:()=>Sp}),FAe=lAe.update({id:"/",path:"/",getParentRoute:()=>Ep}),zAe=dAe.update({id:"/$mailboxId",path:"/$mailboxId",getParentRoute:()=>Ep}),jAe=gAe.update({id:"/flagged",path:"/flagged",getParentRoute:()=>Ep}),BAe=yAe.update({id:"/outbox",path:"/outbox",getParentRoute:()=>Ep}),HAe=SAe.update({id:"/",path:"/",getParentRoute:()=>Mi}),$Ae=wAe.update({id:"/accounts",path:"/accounts",getParentRoute:()=>Mi}),qAe=_Ae.update({id:"/advanced",path:"/advanced",getParentRoute:()=>Mi}),WAe=TAe.update({id:"/appearance",path:"/appearance",getParentRoute:()=>Mi}),VAe=IAe.update({id:"/filters",path:"/filters",getParentRoute:()=>Mi}),GAe=NAe.update({id:"/folders",path:"/folders",getParentRoute:()=>Mi}),KAe=PAe.update({id:"/senders",path:"/senders",getParentRoute:()=>Mi}),YAe=DAe.update({id:"/suggested-vips",path:"/suggested-vips",getParentRoute:()=>Mi}),ZAe={MailMailboxIdRoute:zAe,MailFlaggedRoute:jAe,MailOutboxRoute:BAe,MailIndexRoute:FAe},XAe=Ep._addFileChildren(ZAe),QAe={SettingsAccountsRoute:$Ae,SettingsAdvancedRoute:qAe,SettingsAppearanceRoute:WAe,SettingsFiltersRoute:VAe,SettingsFoldersRoute:GAe,SettingsSendersRoute:KAe,SettingsSuggestedVipsRoute:YAe,SettingsIndexRoute:HAe},JAe=Mi._addFileChildren(QAe),eTe={IndexRoute:LAe,MailRoute:XAe,OnboardingRoute:UAe,SettingsRoute:JAe},tTe=Sp._addFileChildren(eTe)._addFileTypes(),nTe=(t,e)=>{const n=lme({routeTree:tTe,context:{queryClient:t},defaultPreload:"intent"});return n.subscribe("onResolved",r=>{e.recordPageView(r.toLocation.pathname),kte(r.toLocation.pathname)}),n},We=t=>typeof t=="string",Gf=()=>{let t,e;const n=new Promise((r,s)=>{t=r,e=s});return n.resolve=t,n.reject=e,n},G5=t=>t==null?"":""+t,rTe=(t,e,n)=>{t.forEach(r=>{e[r]&&(n[r]=e[r])})},sTe=/###/g,K5=t=>t&&t.indexOf("###")>-1?t.replace(sTe,"."):t,Y5=t=>!t||We(t),Ch=(t,e,n)=>{const r=We(e)?e.split("."):e;let s=0;for(;s<r.length-1;){if(Y5(t))return{};const o=K5(r[s]);!t[o]&&n&&(t[o]=new n),Object.prototype.hasOwnProperty.call(t,o)?t=t[o]:t={},++s}return Y5(t)?{}:{obj:t,k:K5(r[s])}},Z5=(t,e,n)=>{const{obj:r,k:s}=Ch(t,e,Object);if(r!==void 0||e.length===1){r[s]=n;return}let o=e[e.length-1],a=e.slice(0,e.length-1),u=Ch(t,a,Object);for(;u.obj===void 0&&a.length;)o=`${a[a.length-1]}.${o}`,a=a.slice(0,a.length-1),u=Ch(t,a,Object),u?.obj&&typeof u.obj[`${u.k}.${o}`]<"u"&&(u.obj=void 0);u.obj[`${u.k}.${o}`]=n},oTe=(t,e,n,r)=>{const{obj:s,k:o}=Ch(t,e,Object);s[o]=s[o]||[],s[o].push(n)},Sy=(t,e)=>{const{obj:n,k:r}=Ch(t,e);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},iTe=(t,e,n)=>{const r=Sy(t,n);return r!==void 0?r:Sy(e,n)},pH=(t,e,n)=>{for(const r in e)r!=="__proto__"&&r!=="constructor"&&(r in t?We(t[r])||t[r]instanceof String||We(e[r])||e[r]instanceof String?n&&(t[r]=e[r]):pH(t[r],e[r],n):t[r]=e[r]);return t},fc=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var aTe={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const lTe=t=>We(t)?t.replace(/[&<>"'\/]/g,e=>aTe[e]):t;class uTe{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const n=this.regExpMap.get(e);if(n!==void 0)return n;const r=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,r),this.regExpQueue.push(e),r}}const cTe=[" ",",","?","!",";"],dTe=new uTe(20),fTe=(t,e,n)=>{e=e||"",n=n||"";const r=cTe.filter(a=>e.indexOf(a)<0&&n.indexOf(a)<0);if(r.length===0)return!0;const s=dTe.getRegExp(`(${r.map(a=>a==="?"?"\\?":a).join("|")})`);let o=!s.test(t);if(!o){const a=t.indexOf(n);a>0&&!s.test(t.substring(0,a))&&(o=!0)}return o},LA=function(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!t)return;if(t[e])return Object.prototype.hasOwnProperty.call(t,e)?t[e]:void 0;const r=e.split(n);let s=t;for(let o=0;o<r.length;){if(!s||typeof s!="object")return;let a,u="";for(let c=o;c<r.length;++c)if(c!==o&&(u+=n),u+=r[c],a=s[u],a!==void 0){if(["string","number","boolean"].indexOf(typeof a)>-1&&c<r.length-1)continue;o+=c-o+1;break}s=a}return s},Ey=t=>t?.replace("_","-"),hTe={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console?.[t]?.apply?.(console,e)}};class Cy{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,n)}init(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=e||hTe,this.options=n,this.debug=n.debug}log(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this.forward(n,"log","",!0)}warn(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this.forward(n,"warn","",!0)}error(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this.forward(n,"error","")}deprecate(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(e,n,r,s){return s&&!this.debug?null:(We(e[0])&&(e[0]=`${r}${this.prefix} ${e[0]}`),this.logger[n](e))}create(e){return new Cy(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new Cy(this.logger,e)}}var xo=new Cy;class jb{constructor(){this.observers={}}on(e,n){return e.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const s=this.observers[r].get(n)||0;this.observers[r].set(n,s+1)}),this}off(e,n){if(this.observers[e]){if(!n){delete this.observers[e];return}this.observers[e].delete(n)}}emit(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(a=>{let[u,c]=a;for(let f=0;f<c;f++)u(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(a=>{let[u,c]=a;for(let f=0;f<c;f++)u.apply(u,[e,...r])})}}class X5 extends jb{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const n=this.options.ns.indexOf(e);n>-1&&this.options.ns.splice(n,1)}getResource(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,a=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let u;e.indexOf(".")>-1?u=e.split("."):(u=[e,n],r&&(Array.isArray(r)?u.push(...r):We(r)&&o?u.push(...r.split(o)):u.push(r)));const c=Sy(this.data,u);return!c&&!n&&!r&&e.indexOf(".")>-1&&(e=u[0],n=u[1],r=u.slice(2).join(".")),c||!a||!We(r)?c:LA(this.data?.[e]?.[n],r,o)}addResource(e,n,r,s){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const a=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let u=[e,n];r&&(u=u.concat(a?r.split(a):r)),e.indexOf(".")>-1&&(u=e.split("."),s=n,n=u[1]),this.addNamespaces(n),Z5(this.data,u,s),o.silent||this.emit("added",e,n,r,s)}addResources(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const o in r)(We(r[o])||Array.isArray(r[o]))&&this.addResource(e,n,o,r[o],{silent:!0});s.silent||this.emit("added",e,n,r)}addResourceBundle(e,n,r,s,o){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},u=[e,n];e.indexOf(".")>-1&&(u=e.split("."),s=r,r=n,n=u[1]),this.addNamespaces(n);let c=Sy(this.data,u)||{};a.skipCopy||(r=JSON.parse(JSON.stringify(r))),s?pH(c,r,o):c={...c,...r},Z5(this.data,u,c),a.silent||this.emit("added",e,n,r)}removeResourceBundle(e,n){this.hasResourceBundle(e,n)&&delete this.data[e][n],this.removeNamespaces(n),this.emit("removed",e,n)}hasResourceBundle(e,n){return this.getResource(e,n)!==void 0}getResourceBundle(e,n){return n||(n=this.options.defaultNS),this.getResource(e,n)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const n=this.getDataByLanguage(e);return!!(n&&Object.keys(n)||[]).find(s=>n[s]&&Object.keys(n[s]).length>0)}toJSON(){return this.data}}var gH={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,n,r,s){return t.forEach(o=>{e=this.processors[o]?.process(e,n,r,s)??e}),e}};const Q5={},J5=t=>!We(t)&&typeof t!="boolean"&&typeof t!="number";class wy extends jb{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),rTe(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=xo.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};return e==null?!1:this.resolve(e,n)?.res!==void 0}extractFromKey(e,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const s=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let o=n.ns||this.options.defaultNS||[];const a=r&&e.indexOf(r)>-1,u=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!fTe(e,r,s);if(a&&!u){const c=e.match(this.interpolator.nestingRegexp);if(c&&c.length>0)return{key:e,namespaces:We(o)?[o]:o};const f=e.split(r);(r!==s||r===s&&this.options.ns.indexOf(f[0])>-1)&&(o=f.shift()),e=f.join(s)}return{key:e,namespaces:We(o)?[o]:o}}translate(e,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const s=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:a,namespaces:u}=this.extractFromKey(e[e.length-1],n),c=u[u.length-1],f=n.lng||this.language,h=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(f?.toLowerCase()==="cimode"){if(h){const D=n.nsSeparator||this.options.nsSeparator;return s?{res:`${c}${D}${a}`,usedKey:a,exactUsedKey:a,usedLng:f,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:`${c}${D}${a}`}return s?{res:a,usedKey:a,exactUsedKey:a,usedLng:f,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:a}const g=this.resolve(e,n);let m=g?.res;const y=g?.usedKey||a,S=g?.exactUsedKey||a,E=["[object Number]","[object Function]","[object RegExp]"],C=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject,x=n.count!==void 0&&!We(n.count),T=wy.hasDefaultValue(n),R=x?this.pluralResolver.getSuffix(f,n.count,n):"",M=n.ordinal&&x?this.pluralResolver.getSuffix(f,n.count,{ordinal:!1}):"",N=x&&!n.ordinal&&n.count===0,O=N&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${R}`]||n[`defaultValue${M}`]||n.defaultValue;let k=m;w&&!m&&T&&(k=O);const F=J5(k),$=Object.prototype.toString.apply(k);if(w&&k&&F&&E.indexOf($)<0&&!(We(C)&&Array.isArray(k))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const D=this.options.returnedObjectHandler?this.options.returnedObjectHandler(y,k,{...n,ns:u}):`key '${a} (${this.language})' returned an object instead of string.`;return s?(g.res=D,g.usedParams=this.getUsedParamsDetails(n),g):D}if(o){const D=Array.isArray(k),z=D?[]:{},q=D?S:y;for(const K in k)if(Object.prototype.hasOwnProperty.call(k,K)){const Y=`${q}${o}${K}`;T&&!m?z[K]=this.translate(Y,{...n,defaultValue:J5(O)?O[K]:void 0,joinArrays:!1,ns:u}):z[K]=this.translate(Y,{...n,joinArrays:!1,ns:u}),z[K]===Y&&(z[K]=k[K])}m=z}}else if(w&&We(C)&&Array.isArray(m))m=m.join(C),m&&(m=this.extendTranslation(m,e,n,r));else{let D=!1,z=!1;!this.isValidLookup(m)&&T&&(D=!0,m=O),this.isValidLookup(m)||(z=!0,m=a);const K=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&z?void 0:m,Y=T&&O!==m&&this.options.updateMissing;if(z||D||Y){if(this.logger.log(Y?"updateKey":"missingKey",f,c,a,Y?O:m),o){const de=this.resolve(a,{...n,keySeparator:!1});de&&de.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let H=[];const te=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&te&&te[0])for(let de=0;de<te.length;de++)H.push(te[de]);else this.options.saveMissingTo==="all"?H=this.languageUtils.toResolveHierarchy(n.lng||this.language):H.push(n.lng||this.language);const fe=(de,Ae,L)=>{const G=T&&L!==m?L:K;this.options.missingKeyHandler?this.options.missingKeyHandler(de,c,Ae,G,Y,n):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(de,c,Ae,G,Y,n),this.emit("missingKey",de,c,Ae,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&x?H.forEach(de=>{const Ae=this.pluralResolver.getSuffixes(de,n);N&&n[`defaultValue${this.options.pluralSeparator}zero`]&&Ae.indexOf(`${this.options.pluralSeparator}zero`)<0&&Ae.push(`${this.options.pluralSeparator}zero`),Ae.forEach(L=>{fe([de],a+L,n[`defaultValue${L}`]||O)})}):fe(H,a,O))}m=this.extendTranslation(m,e,n,g,r),z&&m===a&&this.options.appendNamespaceToMissingKey&&(m=`${c}:${a}`),(z||D)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}:${a}`:a,D?m:void 0))}return s?(g.res=m,g.usedParams=this.getUsedParamsDetails(n),g):m}extendTranslation(e,n,r,s,o){var a=this;if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const f=We(e)&&(r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let h;if(f){const m=e.match(this.interpolator.nestingRegexp);h=m&&m.length}let g=r.replace&&!We(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(g={...this.options.interpolation.defaultVariables,...g}),e=this.interpolator.interpolate(e,g,r.lng||this.language||s.usedLng,r),f){const m=e.match(this.interpolator.nestingRegexp),y=m&&m.length;h<y&&(r.nest=!1)}!r.lng&&s&&s.res&&(r.lng=this.language||s.usedLng),r.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var m=arguments.length,y=new Array(m),S=0;S<m;S++)y[S]=arguments[S];return o?.[0]===y[0]&&!r.context?(a.logger.warn(`It seems you are nesting recursively key: ${y[0]} in key: ${n[0]}`),null):a.translate(...y,n)},r)),r.interpolation&&this.interpolator.reset()}const u=r.postProcess||this.options.postProcess,c=We(u)?[u]:u;return e!=null&&c?.length&&r.applyPostProcessor!==!1&&(e=gH.handle(c,e,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),e}resolve(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,s,o,a,u;return We(e)&&(e=[e]),e.forEach(c=>{if(this.isValidLookup(r))return;const f=this.extractFromKey(c,n),h=f.key;s=h;let g=f.namespaces;this.options.fallbackNS&&(g=g.concat(this.options.fallbackNS));const m=n.count!==void 0&&!We(n.count),y=m&&!n.ordinal&&n.count===0,S=n.context!==void 0&&(We(n.context)||typeof n.context=="number")&&n.context!=="",E=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);g.forEach(C=>{this.isValidLookup(r)||(u=C,!Q5[`${E[0]}-${C}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(u)&&(Q5[`${E[0]}-${C}`]=!0,this.logger.warn(`key "${s}" for languages "${E.join(", ")}" won't get resolved as namespace "${u}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),E.forEach(w=>{if(this.isValidLookup(r))return;a=w;const x=[h];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(x,h,w,C,n);else{let R;m&&(R=this.pluralResolver.getSuffix(w,n.count,n));const M=`${this.options.pluralSeparator}zero`,N=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(m&&(x.push(h+R),n.ordinal&&R.indexOf(N)===0&&x.push(h+R.replace(N,this.options.pluralSeparator)),y&&x.push(h+M)),S){const O=`${h}${this.options.contextSeparator}${n.context}`;x.push(O),m&&(x.push(O+R),n.ordinal&&R.indexOf(N)===0&&x.push(O+R.replace(N,this.options.pluralSeparator)),y&&x.push(O+M))}}let T;for(;T=x.pop();)this.isValidLookup(r)||(o=T,r=this.getResource(w,C,T,n))}))})}),{res:r,usedKey:s,exactUsedKey:o,usedLng:a,usedNS:u}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,n,r,s):this.resourceStore.getResource(e,n,r,s)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=e.replace&&!We(e.replace);let s=r?e.replace:e;if(r&&typeof e.count<"u"&&(s.count=e.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!r){s={...s};for(const o of n)delete s[o]}return s}static hasDefaultValue(e){const n="defaultValue";for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&n===r.substring(0,n.length)&&e[r]!==void 0)return!0;return!1}}class e6{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=xo.create("languageUtils")}getScriptPartFromCode(e){if(e=Ey(e),!e||e.indexOf("-")<0)return null;const n=e.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(e){if(e=Ey(e),!e||e.indexOf("-")<0)return e;const n=e.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(e){if(We(e)&&e.indexOf("-")>-1){let n;try{n=Intl.getCanonicalLocales(e)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let n;return e.forEach(r=>{if(n)return;const s=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(s))&&(n=s)}),!n&&this.options.supportedLngs&&e.forEach(r=>{if(n)return;const s=this.getLanguagePartFromCode(r);if(this.isSupportedCode(s))return n=s;n=this.options.supportedLngs.find(o=>{if(o===s)return o;if(!(o.indexOf("-")<0&&s.indexOf("-")<0)&&(o.indexOf("-")>0&&s.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===s||o.indexOf(s)===0&&s.length>1))return o})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(e,n){if(!e)return[];if(typeof e=="function"&&(e=e(n)),We(e)&&(e=[e]),Array.isArray(e))return e;if(!n)return e.default||[];let r=e[n];return r||(r=e[this.getScriptPartFromCode(n)]),r||(r=e[this.formatLanguageCode(n)]),r||(r=e[this.getLanguagePartFromCode(n)]),r||(r=e.default),r||[]}toResolveHierarchy(e,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],e),s=[],o=a=>{a&&(this.isSupportedCode(a)?s.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return We(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(e))):We(e)&&o(this.formatLanguageCode(e)),r.forEach(a=>{s.indexOf(a)<0&&o(this.formatLanguageCode(a))}),s}}const t6={zero:0,one:1,two:2,few:3,many:4,other:5},n6={select:t=>t===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class pTe{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=n,this.logger=xo.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,n){this.rules[e]=n}clearCache(){this.pluralRulesCache={}}getRule(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=Ey(e==="dev"?"en":e),s=n.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:r,type:s});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let a;try{a=new Intl.PluralRules(r,{type:s})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),n6;if(!e.match(/-|_/))return n6;const c=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(c,n)}return this.pluralRulesCache[o]=a,a}needsPlural(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(e,n);return r||(r=this.getRule("dev",n)),r?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,r).map(s=>`${n}${s}`)}getSuffixes(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(e,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((s,o)=>t6[s]-t6[o]).map(s=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const s=this.getRule(e,r);return s?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${s.select(n)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",n,r))}}const r6=function(t,e,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=iTe(t,e,n);return!o&&s&&We(n)&&(o=LA(t,n,r),o===void 0&&(o=LA(e,n,r))),o},kx=t=>t.replace(/\$/g,"$$$$");class gTe{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=xo.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(n=>n),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:s,prefix:o,prefixEscaped:a,suffix:u,suffixEscaped:c,formatSeparator:f,unescapeSuffix:h,unescapePrefix:g,nestingPrefix:m,nestingPrefixEscaped:y,nestingSuffix:S,nestingSuffixEscaped:E,nestingOptionsSeparator:C,maxReplaces:w,alwaysFormat:x}=e.interpolation;this.escape=n!==void 0?n:lTe,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=o?fc(o):a||"{{",this.suffix=u?fc(u):c||"}}",this.formatSeparator=f||",",this.unescapePrefix=h?"":g||"-",this.unescapeSuffix=this.unescapePrefix?"":h||"",this.nestingPrefix=m?fc(m):y||fc("$t("),this.nestingSuffix=S?fc(S):E||fc(")"),this.nestingOptionsSeparator=C||",",this.maxReplaces=w||1e3,this.alwaysFormat=x!==void 0?x:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(n,r)=>n?.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,n,r,s){let o,a,u;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},f=y=>{if(y.indexOf(this.formatSeparator)<0){const w=r6(n,c,y,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(w,void 0,r,{...s,...n,interpolationkey:y}):w}const S=y.split(this.formatSeparator),E=S.shift().trim(),C=S.join(this.formatSeparator).trim();return this.format(r6(n,c,E,this.options.keySeparator,this.options.ignoreJSONStructure),C,r,{...s,...n,interpolationkey:E})};this.resetRegExp();const h=s?.missingInterpolationHandler||this.options.missingInterpolationHandler,g=s?.interpolation?.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:y=>kx(y)},{regex:this.regexp,safeValue:y=>this.escapeValue?kx(this.escape(y)):kx(y)}].forEach(y=>{for(u=0;o=y.regex.exec(e);){const S=o[1].trim();if(a=f(S),a===void 0)if(typeof h=="function"){const C=h(e,o,s);a=We(C)?C:""}else if(s&&Object.prototype.hasOwnProperty.call(s,S))a="";else if(g){a=o[0];continue}else this.logger.warn(`missed to pass in variable ${S} for interpolating ${e}`),a="";else!We(a)&&!this.useRawValueToEscape&&(a=G5(a));const E=y.safeValue(a);if(e=e.replace(o[0],E),g?(y.regex.lastIndex+=a.length,y.regex.lastIndex-=o[0].length):y.regex.lastIndex=0,u++,u>=this.maxReplaces)break}}),e}nest(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s,o,a;const u=(c,f)=>{const h=this.nestingOptionsSeparator;if(c.indexOf(h)<0)return c;const g=c.split(new RegExp(`${h}[ ]*{`));let m=`{${g[1]}`;c=g[0],m=this.interpolate(m,a);const y=m.match(/'/g),S=m.match(/"/g);((y?.length??0)%2===0&&!S||S.length%2!==0)&&(m=m.replace(/'/g,'"'));try{a=JSON.parse(m),f&&(a={...f,...a})}catch(E){return this.logger.warn(`failed parsing options string in nesting for key ${c}`,E),`${c}${h}${m}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,c};for(;s=this.nestingRegexp.exec(e);){let c=[];a={...r},a=a.replace&&!We(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let f=!1;if(s[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(s[1])){const h=s[1].split(this.formatSeparator).map(g=>g.trim());s[1]=h.shift(),c=h,f=!0}if(o=n(u.call(this,s[1].trim(),a),a),o&&s[0]===e&&!We(o))return o;We(o)||(o=G5(o)),o||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`),o=""),f&&(o=c.reduce((h,g)=>this.format(h,g,r.lng,{...r,interpolationkey:s[1].trim()}),o.trim())),e=e.replace(s[0],o),this.regexp.lastIndex=0}return e}}const mTe=t=>{let e=t.toLowerCase().trim();const n={};if(t.indexOf("(")>-1){const r=t.split("(");e=r[0].toLowerCase().trim();const s=r[1].substring(0,r[1].length-1);e==="currency"&&s.indexOf(":")<0?n.currency||(n.currency=s.trim()):e==="relativetime"&&s.indexOf(":")<0?n.range||(n.range=s.trim()):s.split(";").forEach(a=>{if(a){const[u,...c]=a.split(":"),f=c.join(":").trim().replace(/^'+|'+$/g,""),h=u.trim();n[h]||(n[h]=f),f==="false"&&(n[h]=!1),f==="true"&&(n[h]=!0),isNaN(f)||(n[h]=parseInt(f,10))}})}return{formatName:e,formatOptions:n}},hc=t=>{const e={};return(n,r,s)=>{let o=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(o={...o,[s.interpolationkey]:void 0});const a=r+JSON.stringify(o);let u=e[a];return u||(u=t(Ey(r),s),e[a]=u),u(n)}};class vTe{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=xo.create("formatter"),this.options=e,this.formats={number:hc((n,r)=>{const s=new Intl.NumberFormat(n,{...r});return o=>s.format(o)}),currency:hc((n,r)=>{const s=new Intl.NumberFormat(n,{...r,style:"currency"});return o=>s.format(o)}),datetime:hc((n,r)=>{const s=new Intl.DateTimeFormat(n,{...r});return o=>s.format(o)}),relativetime:hc((n,r)=>{const s=new Intl.RelativeTimeFormat(n,{...r});return o=>s.format(o,r.range||"day")}),list:hc((n,r)=>{const s=new Intl.ListFormat(n,{...r});return o=>s.format(o)})},this.init(e)}init(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=n.interpolation.formatSeparator||","}add(e,n){this.formats[e.toLowerCase().trim()]=n}addCached(e,n){this.formats[e.toLowerCase().trim()]=hc(n)}format(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=n.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(u=>u.indexOf(")")>-1)){const u=o.findIndex(c=>c.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,u)].join(this.formatSeparator)}return o.reduce((u,c)=>{const{formatName:f,formatOptions:h}=mTe(c);if(this.formats[f]){let g=u;try{const m=s?.formatParams?.[s.interpolationkey]||{},y=m.locale||m.lng||s.locale||s.lng||r;g=this.formats[f](u,y,{...h,...s,...m})}catch(m){this.logger.warn(m)}return g}else this.logger.warn(`there was no format function for ${f}`);return u},e)}}const yTe=(t,e)=>{t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)};class bTe extends jb{constructor(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=s,this.logger=xo.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(r,s.backend,s)}queueLoad(e,n,r,s){const o={},a={},u={},c={};return e.forEach(f=>{let h=!0;n.forEach(g=>{const m=`${f}|${g}`;!r.reload&&this.store.hasResourceBundle(f,g)?this.state[m]=2:this.state[m]<0||(this.state[m]===1?a[m]===void 0&&(a[m]=!0):(this.state[m]=1,h=!1,a[m]===void 0&&(a[m]=!0),o[m]===void 0&&(o[m]=!0),c[g]===void 0&&(c[g]=!0)))}),h||(u[f]=!0)}),(Object.keys(o).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(o),pending:Object.keys(a),toLoadLanguages:Object.keys(u),toLoadNamespaces:Object.keys(c)}}loaded(e,n,r){const s=e.split("|"),o=s[0],a=s[1];n&&this.emit("failedLoading",o,a,n),!n&&r&&this.store.addResourceBundle(o,a,r,void 0,void 0,{skipCopy:!0}),this.state[e]=n?-1:2,n&&r&&(this.state[e]=0);const u={};this.queue.forEach(c=>{oTe(c.loaded,[o],a),yTe(c,e),n&&c.errors.push(n),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(f=>{u[f]||(u[f]={});const h=c.loaded[f];h.length&&h.forEach(g=>{u[f][g]===void 0&&(u[f][g]=!0)})}),c.done=!0,c.errors.length?c.callback(c.errors):c.callback())}),this.emit("loaded",u),this.queue=this.queue.filter(c=>!c.done)}read(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:n,fcName:r,tried:s,wait:o,callback:a});return}this.readingCalls++;const u=(f,h)=>{if(this.readingCalls--,this.waitingReads.length>0){const g=this.waitingReads.shift();this.read(g.lng,g.ns,g.fcName,g.tried,g.wait,g.callback)}if(f&&h&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,e,n,r,s+1,o*2,a)},o);return}a(f,h)},c=this.backend[r].bind(this.backend);if(c.length===2){try{const f=c(e,n);f&&typeof f.then=="function"?f.then(h=>u(null,h)).catch(u):u(null,f)}catch(f){u(f)}return}return c(e,n,u)}prepareLoading(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();We(e)&&(e=this.languageUtils.toResolveHierarchy(e)),We(n)&&(n=[n]);const o=this.queueLoad(e,n,r,s);if(!o.toLoad.length)return o.pending.length||s(),null;o.toLoad.forEach(a=>{this.loadOne(a)})}load(e,n,r){this.prepareLoading(e,n,{},r)}reload(e,n,r){this.prepareLoading(e,n,{reload:!0},r)}loadOne(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=e.split("|"),s=r[0],o=r[1];this.read(s,o,"read",void 0,void 0,(a,u)=>{a&&this.logger.warn(`${n}loading namespace ${o} for language ${s} failed`,a),!a&&u&&this.logger.log(`${n}loaded namespace ${o} for language ${s}`,u),this.loaded(e,a,u)})}saveMissing(e,n,r,s,o){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},u=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend?.create){const c={...a,isUpdate:o},f=this.backend.create.bind(this.backend);if(f.length<6)try{let h;f.length===5?h=f(e,n,r,s,c):h=f(e,n,r,s),h&&typeof h.then=="function"?h.then(g=>u(null,g)).catch(u):u(null,h)}catch(h){u(h)}else f(e,n,r,s,u,c)}!e||!e[0]||this.store.addResource(e[0],n,r,s)}}}const s6=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:t=>{let e={};if(typeof t[1]=="object"&&(e=t[1]),We(t[1])&&(e.defaultValue=t[1]),We(t[2])&&(e.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const n=t[3]||t[2];Object.keys(n).forEach(r=>{e[r]=n[r]})}return e},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),o6=t=>(We(t.ns)&&(t.ns=[t.ns]),We(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),We(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs?.indexOf?.("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),typeof t.initImmediate=="boolean"&&(t.initAsync=t.initImmediate),t),$m=()=>{},STe=t=>{Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(n=>{typeof t[n]=="function"&&(t[n]=t[n].bind(t))})};class Qh extends jb{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=o6(e),this.services={},this.logger=xo,this.modules={external:[]},STe(this),n&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,n),this;setTimeout(()=>{this.init(e,n)},0)}}init(){var e=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),n.defaultNS==null&&n.ns&&(We(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const s=s6();this.options={...s,...this.options,...o6(n)},this.options.interpolation={...s.interpolation,...this.options.interpolation},n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const o=h=>h?typeof h=="function"?new h:h:null;if(!this.options.isClone){this.modules.logger?xo.init(o(this.modules.logger),this.options):xo.init(null,this.options);let h;this.modules.formatter?h=this.modules.formatter:h=vTe;const g=new e6(this.options);this.store=new X5(this.options.resources,this.options);const m=this.services;m.logger=xo,m.resourceStore=this.store,m.languageUtils=g,m.pluralResolver=new pTe(g,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),h&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(m.formatter=o(h),m.formatter.init(m,this.options),this.options.interpolation.format=m.formatter.format.bind(m.formatter)),m.interpolator=new gTe(this.options),m.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},m.backendConnector=new bTe(o(this.modules.backend),m.resourceStore,m,this.options),m.backendConnector.on("*",function(y){for(var S=arguments.length,E=new Array(S>1?S-1:0),C=1;C<S;C++)E[C-1]=arguments[C];e.emit(y,...E)}),this.modules.languageDetector&&(m.languageDetector=o(this.modules.languageDetector),m.languageDetector.init&&m.languageDetector.init(m,this.options.detection,this.options)),this.modules.i18nFormat&&(m.i18nFormat=o(this.modules.i18nFormat),m.i18nFormat.init&&m.i18nFormat.init(this)),this.translator=new wy(this.services,this.options),this.translator.on("*",function(y){for(var S=arguments.length,E=new Array(S>1?S-1:0),C=1;C<S;C++)E[C-1]=arguments[C];e.emit(y,...E)}),this.modules.external.forEach(y=>{y.init&&y.init(this)})}if(this.format=this.options.interpolation.format,r||(r=$m),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const h=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);h.length>0&&h[0]!=="dev"&&(this.options.lng=h[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(h=>{this[h]=function(){return e.store[h](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(h=>{this[h]=function(){return e.store[h](...arguments),e}});const c=Gf(),f=()=>{const h=(g,m)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),c.resolve(m),r(g,m)};if(this.languages&&!this.isInitialized)return h(null,this.t.bind(this));this.changeLanguage(this.options.lng,h)};return this.options.resources||!this.options.initAsync?f():setTimeout(f,0),c}loadResources(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:$m;const s=We(e)?e:this.language;if(typeof e=="function"&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if(s?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const o=[],a=u=>{if(!u||u==="cimode")return;this.services.languageUtils.toResolveHierarchy(u).forEach(f=>{f!=="cimode"&&o.indexOf(f)<0&&o.push(f)})};s?a(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(c=>a(c)),this.options.preload?.forEach?.(u=>a(u)),this.services.backendConnector.load(o,this.options.ns,u=>{!u&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(u)})}else r(null)}reloadResources(e,n,r){const s=Gf();return typeof e=="function"&&(r=e,e=void 0),typeof n=="function"&&(r=n,n=void 0),e||(e=this.languages),n||(n=this.options.ns),r||(r=$m),this.services.backendConnector.reload(e,n,o=>{s.resolve(),r(o)}),s}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&gH.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(e,n){var r=this;this.isLanguageChangingTo=e;const s=Gf();this.emit("languageChanging",e);const o=c=>{this.language=c,this.languages=this.services.languageUtils.toResolveHierarchy(c),this.resolvedLanguage=void 0,this.setResolvedLanguage(c)},a=(c,f)=>{f?(o(f),this.translator.changeLanguage(f),this.isLanguageChangingTo=void 0,this.emit("languageChanged",f),this.logger.log("languageChanged",f)):this.isLanguageChangingTo=void 0,s.resolve(function(){return r.t(...arguments)}),n&&n(c,function(){return r.t(...arguments)})},u=c=>{!e&&!c&&this.services.languageDetector&&(c=[]);const f=We(c)?c:this.services.languageUtils.getBestMatchFromCodes(c);f&&(this.language||o(f),this.translator.language||this.translator.changeLanguage(f),this.services.languageDetector?.cacheUserLanguage?.(f)),this.loadResources(f,h=>{a(h,f)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?u(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(u):this.services.languageDetector.detect(u):u(e),s}getFixedT(e,n,r){var s=this;const o=function(a,u){let c;if(typeof u!="object"){for(var f=arguments.length,h=new Array(f>2?f-2:0),g=2;g<f;g++)h[g-2]=arguments[g];c=s.options.overloadTranslationOptionHandler([a,u].concat(h))}else c={...u};c.lng=c.lng||o.lng,c.lngs=c.lngs||o.lngs,c.ns=c.ns||o.ns,c.keyPrefix!==""&&(c.keyPrefix=c.keyPrefix||r||o.keyPrefix);const m=s.options.keySeparator||".";let y;return c.keyPrefix&&Array.isArray(a)?y=a.map(S=>`${c.keyPrefix}${m}${S}`):y=c.keyPrefix?`${c.keyPrefix}${m}${a}`:a,s.t(y,c)};return We(e)?o.lng=e:o.lngs=e,o.ns=n,o.keyPrefix=r,o}t(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this.translator?.translate(...n)}exists(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this.translator?.exists(...n)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const a=(u,c)=>{const f=this.services.backendConnector.state[`${u}|${c}`];return f===-1||f===0||f===2};if(n.precheck){const u=n.precheck(this,a);if(u!==void 0)return u}return!!(this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(r,e)&&(!s||a(o,e)))}loadNamespaces(e,n){const r=Gf();return this.options.ns?(We(e)&&(e=[e]),e.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}loadLanguages(e,n){const r=Gf();We(e)&&(e=[e]);const s=this.options.preload||[],o=e.filter(a=>s.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return o.length?(this.options.preload=s.concat(o),this.loadResources(a=>{r.resolve(),n&&n(a)}),r):(n&&n(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services?.languageUtils||new e6(s6());return n.indexOf(r.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new Qh(e,n)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:$m;const r=e.forkResourceStore;r&&delete e.forkResourceStore;const s={...this.options,...e,isClone:!0},o=new Qh(s);if((e.debug!==void 0||e.prefix!==void 0)&&(o.logger=o.logger.clone(e)),["store","services","language"].forEach(u=>{o[u]=this[u]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r){const u=Object.keys(this.store.data).reduce((c,f)=>(c[f]={...this.store.data[f]},Object.keys(c[f]).reduce((h,g)=>(h[g]={...c[f][g]},h),{})),{});o.store=new X5(u,s),o.services.resourceStore=o.store}return o.translator=new wy(o.services,s),o.translator.on("*",function(u){for(var c=arguments.length,f=new Array(c>1?c-1:0),h=1;h<c;h++)f[h-1]=arguments[h];o.emit(u,...f)}),o.init(s,n),o.translator.options=s,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const pr=Qh.createInstance();pr.createInstance=Qh.createInstance;pr.createInstance;pr.dir;pr.init;pr.loadResources;pr.reloadResources;pr.use;pr.changeLanguage;pr.getFixedT;pr.t;pr.exists;pr.setDefaultNamespace;pr.hasLoadedNamespace;pr.loadNamespaces;pr.loadLanguages;const{slice:ETe,forEach:CTe}=[];function wTe(t){return CTe.call(ETe.call(arguments,1),e=>{if(e)for(const n in e)t[n]===void 0&&(t[n]=e[n])}),t}function xTe(t){return typeof t!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(n=>n.test(t))}const i6=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,_Te=function(t,e){const r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},s=encodeURIComponent(e);let o=`${t}=${s}`;if(r.maxAge>0){const a=r.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");o+=`; Max-Age=${Math.floor(a)}`}if(r.domain){if(!i6.test(r.domain))throw new TypeError("option domain is invalid");o+=`; Domain=${r.domain}`}if(r.path){if(!i6.test(r.path))throw new TypeError("option path is invalid");o+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");o+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(o+="; HttpOnly"),r.secure&&(o+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return r.partitioned&&(o+="; Partitioned"),o},a6={create(t,e,n,r){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(s.expires=new Date,s.expires.setTime(s.expires.getTime()+n*60*1e3)),r&&(s.domain=r),document.cookie=_Te(t,e,s)},read(t){const e=`${t}=`,n=document.cookie.split(";");for(let r=0;r<n.length;r++){let s=n[r];for(;s.charAt(0)===" ";)s=s.substring(1,s.length);if(s.indexOf(e)===0)return s.substring(e.length,s.length)}return null},remove(t,e){this.create(t,"",-1,e)}};var ATe={name:"cookie",lookup(t){let{lookupCookie:e}=t;if(e&&typeof document<"u")return a6.read(e)||void 0},cacheUserLanguage(t,e){let{lookupCookie:n,cookieMinutes:r,cookieDomain:s,cookieOptions:o}=e;n&&typeof document<"u"&&a6.create(n,t,r,s,o)}},TTe={name:"querystring",lookup(t){let{lookupQuerystring:e}=t,n;if(typeof window<"u"){let{search:r}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(r=window.location.hash.substring(window.location.hash.indexOf("?")));const o=r.substring(1).split("&");for(let a=0;a<o.length;a++){const u=o[a].indexOf("=");u>0&&o[a].substring(0,u)===e&&(n=o[a].substring(u+1))}}return n}},RTe={name:"hash",lookup(t){let{lookupHash:e,lookupFromHashIndex:n}=t,r;if(typeof window<"u"){const{hash:s}=window.location;if(s&&s.length>2){const o=s.substring(1);if(e){const a=o.split("&");for(let u=0;u<a.length;u++){const c=a[u].indexOf("=");c>0&&a[u].substring(0,c)===e&&(r=a[u].substring(c+1))}}if(r)return r;if(!r&&n>-1){const a=s.match(/\/([a-zA-Z-]*)/g);return Array.isArray(a)?a[typeof n=="number"?n:0]?.replace("/",""):void 0}}}return r}};let pc=null;const l6=()=>{if(pc!==null)return pc;try{if(pc=typeof window<"u"&&window.localStorage!==null,!pc)return!1;const t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch{pc=!1}return pc};var ITe={name:"localStorage",lookup(t){let{lookupLocalStorage:e}=t;if(e&&l6())return window.localStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupLocalStorage:n}=e;n&&l6()&&window.localStorage.setItem(n,t)}};let gc=null;const u6=()=>{if(gc!==null)return gc;try{if(gc=typeof window<"u"&&window.sessionStorage!==null,!gc)return!1;const t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch{gc=!1}return gc};var OTe={name:"sessionStorage",lookup(t){let{lookupSessionStorage:e}=t;if(e&&u6())return window.sessionStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupSessionStorage:n}=e;n&&u6()&&window.sessionStorage.setItem(n,t)}},NTe={name:"navigator",lookup(t){const e=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:s}=navigator;if(n)for(let o=0;o<n.length;o++)e.push(n[o]);r&&e.push(r),s&&e.push(s)}return e.length>0?e:void 0}},MTe={name:"htmlTag",lookup(t){let{htmlTag:e}=t,n;const r=e||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},PTe={name:"path",lookup(t){let{lookupFromPathIndex:e}=t;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?n[typeof e=="number"?e:0]?.replace("/",""):void 0}},kTe={name:"subdomain",lookup(t){let{lookupFromSubdomainIndex:e}=t;const n=typeof e=="number"?e+1:1,r=typeof window<"u"&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}};let mH=!1;try{document.cookie,mH=!0}catch{}const vH=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];mH||vH.splice(1,1);const DTe=()=>({order:vH,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:t=>t});class yH{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,n)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=e,this.options=wTe(n,this.options||{},DTe()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=s=>s.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(ATe),this.addDetector(TTe),this.addDetector(ITe),this.addDetector(OTe),this.addDetector(NTe),this.addDetector(MTe),this.addDetector(PTe),this.addDetector(kTe),this.addDetector(RTe)}addDetector(e){return this.detectors[e.name]=e,this}detect(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,n=[];return e.forEach(r=>{if(this.detectors[r]){let s=this.detectors[r].lookup(this.options);s&&typeof s=="string"&&(s=[s]),s&&(n=n.concat(s))}}),n=n.filter(r=>r!=null&&!xTe(r)).map(r=>this.options.convertDetectedLanguage(r)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(e,this.options)}))}}yH.type="languageDetector";function LTe(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=UTe(t))||e){n&&(t=n);var r=0,s=function(){};return{s,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(f){throw f},f:s}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
295
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var f=n.next();return a=f.done,f},e:function(f){u=!0,o=f},f:function(){try{a||n.return==null||n.return()}finally{if(u)throw o}}}}function UTe(t,e){if(t){if(typeof t=="string")return c6(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c6(t,e):void 0}}function c6(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function UA(t){"@babel/helpers - typeof";return UA=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},UA(t)}var bH=["__proto__","constructor","prototype"];function SH(t){return!(typeof t!="string"||t.length===0||t.length>128||bH.indexOf(t)>-1||t.indexOf("..")>-1||t.indexOf("\\")>-1||/[?#%\s@]/.test(t)||/[\x00-\x1F\x7F]/.test(t))}function EH(t){return!(!SH(t)||t.indexOf("/")>-1)}function FTe(t){return SH(t)}var zTe={lng:EH,ns:FTe};function qm(t){return typeof t!="string"?t:t.replace(/[\r\n\x00-\x1F\x7F]/g," ")}function jTe(t){if(typeof t!="string"||t.length===0)return t;try{var e=new URL(t);return e.username||e.password?(e.username="",e.password="",e.toString()):t}catch{return t.replace(/(\/\/)[^/@\s]+@/g,"$1")}}function CH(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":UA(XMLHttpRequest))==="object"}function BTe(t){return!!t&&typeof t.then=="function"}function HTe(t){return BTe(t)?t:Promise.resolve(t)}var $Te=/\{\{(.+?)\}\}/g;function d6(t,e){var n=!1,r=t.replace($Te,function(s,o){var a=o.trim();if(bH.indexOf(a)>-1)return s;var u=e[a];if(u==null)return s;var c=zTe[a]||EH,f=String(u).split("+"),h=LTe(f),g;try{for(h.s();!(g=h.n()).done;){var m=g.value;if(!c(m))return n=!0,s}}catch(y){h.e(y)}finally{h.f()}return f.join("+")});return n?null:r}function f6(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,r)}return n}function h6(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?f6(Object(n),!0).forEach(function(r){qTe(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):f6(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function qTe(t,e,n){return(e=WTe(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function WTe(t){var e=VTe(t,"string");return nu(e)=="symbol"?e:e+""}function VTe(t,e){if(nu(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(nu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function nu(t){"@babel/helpers - typeof";return nu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},nu(t)}var Wa=typeof fetch=="function"?fetch:void 0;typeof global<"u"&&global.fetch?Wa=global.fetch:typeof window<"u"&&window.fetch&&(Wa=window.fetch);var Jh;CH()&&(typeof global<"u"&&global.XMLHttpRequest?Jh=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&(Jh=window.XMLHttpRequest));var xy;typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?xy=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(xy=window.ActiveXObject));typeof Wa!="function"&&(Wa=void 0);if(!Wa&&!Jh&&!xy)try{Vn(()=>import("./browser-ponyfill-FuWjKEd5.js").then(t=>t.b),[]).then(function(t){Wa=t.default}).catch(function(){})}catch{}var wH=["__proto__","constructor","prototype"],FA=function(e,n){if(n&&nu(n)==="object"){for(var r="",s=0,o=Object.keys(n);s<o.length;s++){var a=o[s];wH.indexOf(a)>-1||(r+="&"+encodeURIComponent(a)+"="+encodeURIComponent(n[a]))}if(!r)return e;e=e+(e.indexOf("?")!==-1?"&":"?")+r.slice(1)}return e},p6=function(e,n,r,s){var o=function(c){if(!c.ok)return r(c.statusText||"Error",{status:c.status});c.text().then(function(f){r(null,{status:c.status,data:f})}).catch(r)};if(s){var a=s(e,n);if(a instanceof Promise){a.then(o).catch(r);return}}typeof fetch=="function"?fetch(e,n).then(o).catch(r):Wa(e,n).then(o).catch(r)},GTe=function(e,n,r,s){e.queryStringParams&&(n=FA(n,e.queryStringParams));var o=h6({},typeof e.customHeaders=="function"?e.customHeaders():e.customHeaders);typeof window>"u"&&typeof global<"u"&&typeof global.process<"u"&&global.process.versions&&global.process.versions.node&&(o["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),r&&(o["Content-Type"]="application/json");var a=typeof e.requestOptions=="function"?e.requestOptions(r):e.requestOptions,u=h6({method:r?"POST":"GET",body:r?e.stringify(r):void 0,headers:o},e._omitFetchOptions?{}:a),c=typeof e.alternateFetch=="function"&&e.alternateFetch.length>=1?e.alternateFetch:void 0;try{p6(n,u,s,c)}catch(f){if(!a||Object.keys(a).length===0||!f.message||f.message.indexOf("not implemented")<0)return s(f);try{Object.keys(a).forEach(function(h){delete u[h]}),p6(n,u,s,c),e._omitFetchOptions=!0}catch(h){s(h)}}},KTe=function(e,n,r,s){r&&nu(r)==="object"&&(r=FA("",r).slice(1)),e.queryStringParams&&(n=FA(n,e.queryStringParams));try{var o=Jh?new Jh:new xy("MSXML2.XMLHTTP.3.0");o.open(r?"POST":"GET",n,1),e.crossDomain||o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.withCredentials=!!e.withCredentials,r&&o.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),o.overrideMimeType&&o.overrideMimeType("application/json");var a=e.customHeaders;if(a=typeof a=="function"?a():a,a)for(var u=0,c=Object.keys(a);u<c.length;u++){var f=c[u];wH.indexOf(f)>-1||o.setRequestHeader(f,a[f])}o.onreadystatechange=function(){o.readyState>3&&s(o.status>=400?o.statusText:null,{status:o.status,data:o.responseText})},o.send(r)}catch(h){console&&console.log(h)}},YTe=function(e,n,r,s){if(typeof r=="function"&&(s=r,r=void 0),s=s||function(){},Wa&&n.indexOf("file:")!==0)return GTe(e,n,r,s);if(CH()||typeof ActiveXObject=="function")return KTe(e,n,r,s);s(new Error("No fetch and no xhr implementation found!"))};function id(t){"@babel/helpers - typeof";return id=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},id(t)}function g6(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,r)}return n}function Dx(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?g6(Object(n),!0).forEach(function(r){xH(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):g6(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function ZTe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function XTe(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,_H(r.key),r)}}function QTe(t,e,n){return e&&XTe(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function xH(t,e,n){return(e=_H(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _H(t){var e=JTe(t,"string");return id(e)=="symbol"?e:e+""}function JTe(t,e){if(id(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(id(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var eRe=function(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:function(n){return JSON.parse(n)},stringify:JSON.stringify,parsePayload:function(n,r,s){return xH({},r,s||"")},parseLoadPayload:function(n,r){},request:YTe,reloadInterval:typeof window<"u"?!1:3600*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},AH=(function(){function t(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};ZTe(this,t),this.services=e,this.options=n,this.allOptions=r,this.type="backend",this.init(e,n,r)}return QTe(t,[{key:"init",value:function(n){var r=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.services=n,this.options=Dx(Dx(Dx({},eRe()),this.options||{}),s),this.allOptions=o,this.services&&this.options.reloadInterval){var a=setInterval(function(){return r.reload()},this.options.reloadInterval);id(a)==="object"&&typeof a.unref=="function"&&a.unref()}}},{key:"readMulti",value:function(n,r,s){this._readAny(n,n,r,r,s)}},{key:"read",value:function(n,r,s){this._readAny([n],n,[r],r,s)}},{key:"_readAny",value:function(n,r,s,o,a){var u=this,c=this.options.loadPath;typeof this.options.loadPath=="function"&&(c=this.options.loadPath(n,s)),c=HTe(c),c.then(function(f){if(!f)return a(null,{});var h=d6(f,{lng:n.join("+"),ns:s.join("+")});if(h==null){var g=n.map(qm).join(", "),m=s.map(qm).join(", ");return a(new Error("i18next-http-backend: unsafe lng/ns value — refusing to build request URL for languages=["+g+"] namespaces=["+m+"]"),!1)}u.loadUrl(h,a,r,o)})}},{key:"loadUrl",value:function(n,r,s,o){var a=this,u=typeof s=="string"?[s]:s,c=typeof o=="string"?[o]:o,f=this.options.parseLoadPayload(u,c),h=qm(jTe(n));this.options.request(this.options,n,f,function(g,m){if(m&&(m.status>=500&&m.status<600||!m.status))return r("failed loading "+h+"; status code: "+m.status,!0);if(m&&m.status>=400&&m.status<500)return r("failed loading "+h+"; status code: "+m.status,!1);if(!m&&g&&g.message){var y=g.message.toLowerCase(),S=["failed","fetch","network","load"].find(function(w){return y.indexOf(w)>-1});if(S)return r("failed loading "+h+": "+qm(g.message),!0)}if(g)return r(g,!1);var E,C;try{typeof m.data=="string"?E=a.options.parse(m.data,s,o):E=m.data}catch{C="failed parsing "+h+" to json"}if(C)return r(C,!1);r(null,E)})}},{key:"create",value:function(n,r,s,o,a){var u=this;if(this.options.addPath){typeof n=="string"&&(n=[n]);var c=this.options.parsePayload(r,s,o),f=0,h=[],g=[];n.forEach(function(m){var y=u.options.addPath;typeof u.options.addPath=="function"&&(y=u.options.addPath(m,r));var S=d6(y,{lng:m,ns:r});if(S==null){f+=1,a&&f===n.length&&a(h,g);return}u.options.request(u.options,S,c,function(E,C){f+=1,h.push(E),g.push(C),f===n.length&&typeof a=="function"&&a(h,g)})})}}},{key:"reload",value:function(){var n=this,r=this.services,s=r.backendConnector,o=r.languageUtils,a=r.logger,u=s.language;if(!(u&&u.toLowerCase()==="cimode")){var c=[],f=function(g){var m=o.toResolveHierarchy(g);m.forEach(function(y){c.indexOf(y)<0&&c.push(y)})};f(u),this.allOptions.preload&&this.allOptions.preload.forEach(function(h){return f(h)}),c.forEach(function(h){n.allOptions.ns.forEach(function(g){s.read(h,g,"read",null,null,function(m,y){m&&a.warn("loading namespace ".concat(g," for language ").concat(h," failed"),m),!m&&y&&a.log("loaded namespace ".concat(g," for language ").concat(h),y),s.loaded("".concat(h,"|").concat(g),m,y)})})})}}}])})();AH.type="backend";pr.use(AH).use(yH).use(Ewe).init({fallbackLng:"en",supportedLngs:["en","nl","de","fr"],ns:["common","mail","settings","errors"],defaultNS:"common",backend:{loadPath:"/locales/{{lng}}/{{ns}}.json"},detection:{order:["navigator","htmlTag"],caches:[]},interpolation:{escapeValue:!1},react:{useSuspense:!0,bindI18n:"languageChanged loaded"}});const tRe=({authProvider:t,rootElementId:e="root"})=>{Nte(),uwe(),t.configure(),kme(t);const n=awe();Ete(n);const r=new ope({queryCache:new M7({onError:Fme}),mutationCache:new N7({onError:zme}),defaultOptions:{queries:{staleTime:3e4,gcTime:5*6e4,retry:1}}}),s=nTe(r,n);n.recordPageView(window.location.pathname);const o=document.getElementById(e);if(!o)throw new Error(`Root element not found: #${e}`);const{Shell:a}=t;mme.createRoot(o).render(I.jsx(A.StrictMode,{children:I.jsx(QB.Provider,{value:n,children:I.jsxs(ipe,{client:r,children:[I.jsx(Ume,{value:t,children:I.jsx(a,{children:I.jsx(dme,{router:s})})}),!1]})})}))};tRe({authProvider:Lhe});export{vb as $,oQ as A,Zs as B,Qx as C,rJ as D,BJ as E,lQ as F,I8 as G,L8 as H,dQ as I,nRe as J,rRe as K,uRe as L,fQ as M,ERe as N,oT as O,gRe as P,epe as Q,j as R,mQ as S,vQ as T,SRe as U,bd as V,Dn as W,La as X,Uv as Y,w7 as Z,YN as _,vn as a,uz as a$,ape as a0,cpe as a1,ppe as a2,dpe as a3,fpe as a4,Er as a5,mpe as a6,fU as a7,hpe as a8,vpe as a9,Txe as aA,uH as aB,WIe as aC,YIe as aD,$Ie as aE,Vn as aF,OIe as aG,Cxe as aH,Nxe as aI,mxe as aJ,LIe as aK,Pxe as aL,zIe as aM,UIe as aN,G_e as aO,DIe as aP,IIe as aQ,az as aR,jIe as aS,FIe as aT,ZIe as aU,GIe as aV,VIe as aW,r2e as aX,xIe as aY,fRe as aZ,iRe as a_,fs as aa,Wr as ab,kge as ac,KIe as ad,bR as ae,SIe as af,V_e as ag,Nx as ah,_Re as ai,t3 as aj,Hte as ak,iz as al,Awe as am,e2e as an,s2e as ao,iIe as ap,D7 as aq,xxe as ar,O8 as as,ype as at,HIe as au,qIe as av,BIe as aw,RIe as ax,Exe as ay,XIe as az,Rt as b,_Ie as b$,Mxe as b0,Hy as b1,bxe as b2,ql as b3,hxe as b4,nH as b5,Kwe as b6,exe as b7,Jwe as b8,Qwe as b9,wAe as bA,cIe as bB,fIe as bC,o2e as bD,pQ as bE,i2e as bF,TIe as bG,vRe as bH,lRe as bI,mRe as bJ,e_e as bK,gte as bL,hte as bM,fte as bN,C5 as bO,ZP as bP,aIe as bQ,vIe as bR,yIe as bS,Nee as bT,Lee as bU,V5 as bV,pIe as bW,mIe as bX,gxe as bY,gIe as bZ,wIe as b_,AIe as ba,NIe as bb,bRe as bc,lIe as bd,t2e as be,n2e as bf,Va as bg,$we as bh,P9 as bi,Dy as bj,Z_e as bk,aRe as bl,dT as bm,fz as bn,Sxe as bo,wRe as bp,dIe as bq,uIe as br,hIe as bs,x9 as bt,Ed as bu,q_e as bv,xr as bw,QIe as bx,MIe as by,PIe as bz,k8 as c,Wee as c0,hRe as c1,qee as c2,bIe as c3,CIe as c4,Px as c5,JIe as c6,EIe as c7,kIe as c8,wxe as c9,lae as cA,uae as cB,tre as cC,uu as cD,Vne as cE,Wne as cF,yT as cG,FF as cH,aae as cI,Yne as cJ,Loe as cK,fae as cL,ST as cM,cae as cN,Oae as cO,$F as cP,oRe as cQ,ip as cR,yRe as cS,zT as cT,sb as cU,up as cV,_ae as cW,ap as cX,Aae as cY,bae as cZ,Ug as ca,J9 as cb,Mo as cc,LT as cd,Ti as ce,pae as cf,Ri as cg,iae as ch,Q9 as ci,Zy as cj,kF as ck,Ooe as cl,yae as cm,Tae as cn,Moe as co,_oe as cp,Vy as cq,bT as cr,V9 as cs,xae as ct,Sae as cu,Uoe as cv,gae as cw,$T as cx,Y9 as cy,Poe as cz,TP as d,gP as e,aQ as f,nJ as g,iQ as h,Jx as i,I as j,n_ as k,PJ as l,cRe as m,F8 as n,UJ as o,dRe as p,gQ as q,A as r,Xee as s,Yee as t,DJ as u,pRe as v,uQ as w,zJ as x,Pl as y,z8 as z};