@remit/web-client-dist 0.0.59 → 0.0.60

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 (32) hide show
  1. package/assets/{ComposeBody-BGOxOOkc.js → ComposeBody-bCXbRRUN.js} +1 -1
  2. package/assets/{ErrorState-DIDBNfpB.js → ErrorState-2TukFnBb.js} +1 -1
  3. package/assets/{OnboardingWizard-BZsxSuS2.js → OnboardingWizard-DO4TVBDI.js} +1 -1
  4. package/assets/{account-form-helpers-BqFqktZQ.js → account-form-helpers-DJuGSHHm.js} +1 -1
  5. package/assets/{accounts-CZFLdajy.js → accounts-8nCxmJG7.js} +1 -1
  6. package/assets/{advanced-CrdHYc8g.js → advanced-Cw06uIH9.js} +1 -1
  7. package/assets/{appearance-Cb0sXKKJ.js → appearance-DM-MsplT.js} +1 -1
  8. package/assets/{avatar-DvAeb-Vc.js → avatar-DtoLsjxl.js} +1 -1
  9. package/assets/{browser-ponyfill-hpLxJkxi.js → browser-ponyfill-A3QWHdug.js} +1 -1
  10. package/assets/{filter-status-Cx1cO5CK.js → filter-status-CYQFMnKK.js} +1 -1
  11. package/assets/{filters-BfO0lQQX.js → filters-B3PEiAak.js} +1 -1
  12. package/assets/{flagged-B3afGsVL.js → flagged-CRl7woNZ.js} +1 -1
  13. package/assets/{folder-b-s9zaKU.js → folder-C7hi3vj9.js} +1 -1
  14. package/assets/{folders-DLrUtuRF.js → folders-CpuJKgqa.js} +1 -1
  15. package/assets/{index-BPx3mwHv.js → index-CFJQ6pkD.js} +24 -24
  16. package/assets/index-Cg1pkjPF.js +1 -0
  17. package/assets/{index-BG8WJKRS.js → index-CvtYybGM.js} +1 -1
  18. package/assets/{kbd-CSy0gsZt.js → kbd-CBPrwgiz.js} +1 -1
  19. package/assets/{mail-D1O4mYW0.js → mail-BL0cT4JK.js} +3 -3
  20. package/assets/{onboarding-QCjk--SX.js → onboarding-2Bv1_vGQ.js} +1 -1
  21. package/assets/{select-wBPZ8xB3.js → select-kqjShhGI.js} +1 -1
  22. package/assets/{senders-DmBtkHiJ.js → senders-D7L8i6pE.js} +1 -1
  23. package/assets/settings-Dl3nKIbz.js +1 -0
  24. package/assets/{settings-screen-CJxvo9Vx.js → settings-screen-DJ8niLy5.js} +1 -1
  25. package/assets/{suggested-vips-B11yjgyY.js → suggested-vips-Dfe3W5Wz.js} +1 -1
  26. package/assets/{useDebouncedValue-DR8PxvfP.js → useDebouncedValue-C2_dfCdG.js} +1 -1
  27. package/assets/{useMutation-Dr-NgZOj.js → useMutation-BdTStvbC.js} +1 -1
  28. package/assets/{useSignature-Bt_1dLKd.js → useSignature-COT4pEFJ.js} +1 -1
  29. package/index.html +1 -1
  30. package/package.json +1 -1
  31. package/assets/index-DwJtZ6Br.js +0 -1
  32. package/assets/settings-CjOuLA5f.js +0 -1
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mail-D1O4mYW0.js","assets/useDebouncedValue-DR8PxvfP.js","assets/avatar-DvAeb-Vc.js","assets/kbd-CSy0gsZt.js","assets/account-form-helpers-BqFqktZQ.js","assets/useMutation-Dr-NgZOj.js","assets/useSignature-Bt_1dLKd.js","assets/ErrorState-DIDBNfpB.js","assets/format-CnrKvE9L.js","assets/select-wBPZ8xB3.js","assets/filter-status-Cx1cO5CK.js","assets/folder-b-s9zaKU.js","assets/onboarding-QCjk--SX.js","assets/OnboardingWizard-BZsxSuS2.js","assets/index-BG8WJKRS.js","assets/flagged-B3afGsVL.js","assets/accounts-CZFLdajy.js","assets/settings-screen-CJxvo9Vx.js","assets/advanced-CrdHYc8g.js","assets/appearance-Cb0sXKKJ.js","assets/filters-BfO0lQQX.js","assets/folders-DLrUtuRF.js","assets/senders-DmBtkHiJ.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mail-BL0cT4JK.js","assets/useDebouncedValue-C2_dfCdG.js","assets/avatar-DtoLsjxl.js","assets/kbd-CBPrwgiz.js","assets/account-form-helpers-DJuGSHHm.js","assets/useMutation-BdTStvbC.js","assets/useSignature-COT4pEFJ.js","assets/ErrorState-2TukFnBb.js","assets/format-CnrKvE9L.js","assets/select-kqjShhGI.js","assets/filter-status-CYQFMnKK.js","assets/folder-C7hi3vj9.js","assets/onboarding-2Bv1_vGQ.js","assets/OnboardingWizard-DO4TVBDI.js","assets/index-CvtYybGM.js","assets/flagged-CRl7woNZ.js","assets/accounts-8nCxmJG7.js","assets/settings-screen-DJ8niLy5.js","assets/advanced-Cw06uIH9.js","assets/appearance-DM-MsplT.js","assets/filters-B3PEiAak.js","assets/folders-CpuJKgqa.js","assets/senders-D7L8i6pE.js"])))=>i.map(i=>d[i]);
2
2
  function D5(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 Og=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function qa(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var N1={exports:{}},pf={};var wN;function L$(){if(wN)return pf;wN=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 pf.Fragment=e,pf.jsx=n,pf.jsxs=n,pf}var xN;function U$(){return xN||(xN=1,N1.exports=L$()),N1.exports}var D=U$();const F$="Logging",z$="x-amz-user-agent",j$="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 _N={VERBOSE:1,DEBUG:2,INFO:3,WARN:4,ERROR:5,NONE:6};class rr{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;rr.LOG_LEVEL&&(r=rr.LOG_LEVEL),typeof window<"u"&&window.LOG_LEVEL&&(r=window.LOG_LEVEL);const s=_N[r];if(!(_N[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)),rr.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 p={message:c,timestamp:Date.now()};f.pushLogs([p])}}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()===F$&&(this._pluggables.push(e),e.configure(this._config))}listPluggables(){return this._pluggables}}rr.LOG_LEVEL=null;rr.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 Pa;(function(t){t.NoEndpointId="NoEndpointId",t.PlatformNotSupported="PlatformNotSupported",t.Unknown="Unknown",t.NetworkError="NetworkError"})(Pa||(Pa={}));const py=(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})},_o=typeof Symbol<"u"?Symbol("amplify_default"):"@@amplify_default",gf=new rr("Hub");class L5{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){gf.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===_o||gf.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){gf.error(a)}}listen(e,n,r="noname"){let s;if(typeof n!="function")throw new Hr({name:j$,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=>{gf.debug(`Dispatching to ${n} with `,r);try{o.callback(e)}catch(a){gf.error(a)}})}}const Ao=new L5("__default__"),pv=new L5("internal-hub"),_A=()=>{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."})},B$=()=>{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."})},H$=()=>{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."})},AA={convert(t,e){let n=t;return e?.urlSafe&&(n=n.replace(/-/g,"+").replace(/_/g,"/")),H$()(n)}};var Eo;(function(t){t.AuthTokenConfigException="AuthTokenConfigException",t.AuthUserPoolAndIdentityPoolException="AuthUserPoolAndIdentityPoolException",t.AuthUserPoolException="AuthUserPoolException",t.InvalidIdentityPoolIdException="InvalidIdentityPoolIdException",t.OAuthNotConfigureException="OAuthNotConfigureException"})(Eo||(Eo={}));const $$={[Eo.AuthTokenConfigException]:{message:"Auth Token Provider not configured.",recoverySuggestion:"Make sure to call Amplify.configure in your app."},[Eo.AuthUserPoolAndIdentityPoolException]:{message:"Auth UserPool or IdentityPool not configured.",recoverySuggestion:"Make sure to call Amplify.configure in your app with UserPoolId and IdentityPoolId."},[Eo.AuthUserPoolException]:{message:"Auth UserPool not configured.",recoverySuggestion:"Make sure to call Amplify.configure in your app with userPoolId and userPoolClientId."},[Eo.InvalidIdentityPoolIdException]:{message:"Invalid identity pool id provided.",recoverySuggestion:"Make sure a valid identityPoolId is given in the config."},[Eo.OAuthNotConfigureException]:{message:"oauth param not configured.",recoverySuggestion:"Make sure to call Amplify.configure with oauth parameter in your app."}},TA=py($$);function lt(t){let e=!0;t?e=!!t.userPoolId&&!!t.userPoolClientId:e=!1,TA(e,Eo.AuthUserPoolException)}function gy(t){const e=!!t?.loginWith?.oauth?.domain&&!!t?.loginWith?.oauth?.redirectSignOut&&!!t?.loginWith?.oauth?.redirectSignIn&&!!t?.loginWith?.oauth?.responseType;TA(e,Eo.OAuthNotConfigureException)}function Fm(t){const e=!!t?.identityPoolId;TA(e,Eo.InvalidIdentityPoolIdException)}function gi(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(AA.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 U5=t=>{const e=Reflect.ownKeys(t);for(const n of e){const r=t[n];(r&&typeof r=="object"||typeof r=="function")&&U5(r)}return Object.freeze(t)},q$=new rr("parseAWSExports"),W$={API_KEY:"apiKey",AWS_IAM:"iam",AMAZON_COGNITO_USER_POOLS:"userPool",OPENID_CONNECT:"oidc",NONE:"none",AWS_LAMBDA:"lambda",LAMBDA:"lambda"},G$=(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:p,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:_,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:O,geo:I,oauth:P,predictions:k,aws_cloud_logic_custom:H,Notifications:F,modelIntrospection:j}=t,W={};C&&(W.Analytics={Pinpoint:{appId:C,region:w}});const{InAppMessaging:Y,Push:ne}=F??{};if(Y?.AWSPinpoint||ne?.AWSPinpoint){if(Y?.AWSPinpoint){const{appId:J,region:oe}=Y.AWSPinpoint;W.Notifications={InAppMessaging:{Pinpoint:{appId:J,region:oe}}}}if(ne?.AWSPinpoint){const{appId:J,region:oe}=ne.AWSPinpoint;W.Notifications={...W.Notifications,PushNotification:{Pinpoint:{appId:J,region:oe}}}}}if(Array.isArray(o)&&(W.Interactions={LexV1:Object.fromEntries(o.map(J=>[J.name,J]))}),r){const J=W$[n];J||q$.debug(`Invalid authentication type ${n}. Falling back to IAM.`),W.API={GraphQL:{endpoint:r,apiKey:e,region:s,defaultAuthMode:J??"iam"}},j&&(W.API.GraphQL.modelIntrospection=j)}const $=c?{status:c&&c.toLowerCase(),totpEnabled:f?.includes("TOTP")??!1,smsEnabled:f?.includes("SMS")??!1}:void 0,ee=p?{minLength:p.passwordPolicyMinLength,requireLowercase:p.passwordPolicyCharacters?.includes("REQUIRES_LOWERCASE")??!1,requireUppercase:p.passwordPolicyCharacters?.includes("REQUIRES_UPPERCASE")??!1,requireNumbers:p.passwordPolicyCharacters?.includes("REQUIRES_NUMBERS")??!1,requireSpecialCharacters:p.passwordPolicyCharacters?.includes("REQUIRES_SYMBOLS")??!1}:void 0,de=Array.from(new Set([...g??[],...m??[]])).reduce((J,oe)=>({...J,[oe.toLowerCase()]:{required:!0}}),{}),Ae=S?.includes("EMAIL")??!1,L=S?.includes("PHONE_NUMBER")??!1;(a||M)&&(W.Auth={Cognito:{identityPoolId:a,allowGuestAccess:E!=="enable",signUpVerificationMethod:u,userAttributes:de,userPoolClientId:O,userPoolId:M,mfa:$,passwordFormat:ee,loginWith:{username:!(Ae||L),email:Ae,phone:L}}});const V=P?Object.keys(P).length>0:!1,K=y?y.length>0:!1;if(W.Auth&&V&&(W.Auth.Cognito.loginWith={...W.Auth.Cognito.loginWith,oauth:{...V$(P),...K&&{providers:K$(y)}}}),_&&(W.Storage={S3:{bucket:_,region:T,dangerouslyConnectToHttpEndpointForTesting:R}}),I){const{amazon_location_service:J}=I;W.Geo={LocationService:{maps:J.maps,geofenceCollections:J.geofenceCollections,searchIndices:J.search_indices,region:J.region}}}if(H&&(W.API={...W.API,REST:H.reduce((J,oe)=>{const{name:he,endpoint:ue,region:ve,service:xe}=oe;return{...J,[he]:{endpoint:ue,...xe?{service:xe}:void 0,...ve?{region:ve}:void 0}}},{})}),k){const{VoiceId:J}=k?.convert?.speechGenerator?.defaults??{};W.Predictions=J?{...k,convert:{...k.convert,speechGenerator:{...k.convert.speechGenerator,defaults:{voiceId:J}}}}:k}return W},AN=t=>t?.split(",")??[],V$=({domain:t,scope:e,redirectSignIn:n,redirectSignOut:r,responseType:s})=>({domain:t,scopes:e,redirectSignIn:AN(n),redirectSignOut:AN(r),responseType:s}),K$=t=>t.map(e=>{const n=e.toLowerCase();return n.charAt(0).toUpperCase()+n.slice(1)}),F5=Symbol("oauth-listener"),Qn=[];for(let t=0;t<256;++t)Qn.push((t+256).toString(16).slice(1));function Y$(t,e=0){return(Qn[t[e+0]]+Qn[t[e+1]]+Qn[t[e+2]]+Qn[t[e+3]]+"-"+Qn[t[e+4]]+Qn[t[e+5]]+"-"+Qn[t[e+6]]+Qn[t[e+7]]+"-"+Qn[t[e+8]]+Qn[t[e+9]]+"-"+Qn[t[e+10]]+Qn[t[e+11]]+Qn[t[e+12]]+Qn[t[e+13]]+Qn[t[e+14]]+Qn[t[e+15]]).toLowerCase()}let M1;const Z$=new Uint8Array(16);function X$(){if(!M1){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");M1=crypto.getRandomValues.bind(crypto)}return M1(Z$)}const Q$=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),TN={randomUUID:Q$};function J$(t,e,n){if(TN.randomUUID&&!e&&!t)return TN.randomUUID();t=t||{};const r=t.random??t.rng?.()??X$();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 Y$(r)}function eq(t){const{version:e}=t;return e?e.startsWith("1"):!1}function tq(t){if(!t)return;const{bucket_name:e,aws_region:n,buckets:r}=t;return{S3:{bucket:e,region:n,buckets:r&&fq(r)}}}function nq(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:p,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:dq(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:cq(c.identity_providers)}}),f&&(y.Cognito.loginWith={...y.Cognito.loginWith,email:f.includes("email"),phone:f.includes("phone_number"),username:f.includes("username")}),p&&(y.Cognito.userAttributes=p.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 rq(t){if(!t?.amazon_pinpoint)return;const{amazon_pinpoint:e}=t;return{Pinpoint:{appId:e.app_id,region:e.aws_region}}}function sq(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 oq(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:z5(n),region:e,apiKey:s,modelIntrospection:o}}}function iq(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:z5(s),region:n,apiKey:r}}}function aq(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 lq(t){const e={};if(t.storage&&(e.Storage=tq(t.storage)),t.auth&&(e.Auth=nq(t.auth)),t.analytics&&(e.Analytics=rq(t.analytics)),t.geo&&(e.Geo=sq(t.geo)),t.data&&(e.API=oq(t.data)),t.custom){const n=iq(t.custom);n&&"Events"in n&&(e.API={...e.API,...n})}return t.notifications&&(e.Notifications=aq(t.notifications)),e}const uq={AMAZON_COGNITO_USER_POOLS:"userPool",API_KEY:"apiKey",AWS_IAM:"iam",AWS_LAMBDA:"lambda",OPENID_CONNECT:"oidc"};function z5(t){return uq[t]}const RN={GOOGLE:"Google",LOGIN_WITH_AMAZON:"Amazon",FACEBOOK:"Facebook",SIGN_IN_WITH_APPLE:"Apple"};function cq(t=[]){return t.reduce((e,n)=>(RN[n]!==void 0&&e.push(RN[n]),e),[])}function dq(t){return t==="OPTIONAL"?"optional":t==="REQUIRED"?"on":"off"}function fq(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 j5=t=>Object.keys(t).some(e=>e.startsWith("aws_"))?G$(t):eq(t)?lq(t):t;var IN=function(){return IN=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},IN.apply(this,arguments)};function q_e(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 hq(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(p){try{f(r.next(p))}catch(g){a(g)}}function c(p){try{f(r.throw(p))}catch(g){a(g)}}function f(p){p.done?o(p.value):s(p.value).then(u,c)}f((r=r.apply(t,e||[])).next())})}function pq(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(p){return c([f,p])}}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(p){f=[6,p],s=0}finally{r=o=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}}function W_e(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,gq=32,mq=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]),vq=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],yq=Math.pow(2,53)-1,zm=(function(){function t(){this.state=Int32Array.from(vq),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>yq)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(gq),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],p=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&p)|0)+(g+(mq[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=p,p=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]+=p,r[7]+=g},t})();const bq=t=>new TextEncoder().encode(t);var Sq=typeof Buffer<"u"&&Buffer.from?function(t){return Buffer.from(t,"utf8")}:bq;function B5(t){return t instanceof Uint8Array?t:typeof t=="string"?Sq(t):ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(t)}function Eq(t){return typeof t=="string"?t.length===0:t.byteLength===0}var Ul=(function(){function t(e){this.secret=e,this.hash=new zm,this.reset()}return t.prototype.update=function(e){if(!(Eq(e)||this.error))try{this.hash.update(B5(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 hq(this,void 0,void 0,function(){return pq(this,function(e){return[2,this.digestSync()]})})},t.prototype.reset=function(){if(this.hash=new zm,this.secret){this.outer=new zm;var e=Cq(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 Cq(t){var e=B5(t);if(e.byteLength>_s){var n=new zm;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 xn;(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"})(xn||(xn={}));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 oi;(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"})(oi||(oi={}));var ON;(function(t){t.Record="1",t.IdentifyUser="2"})(ON||(ON={}));var NN;(function(t){t.GraphQl="1",t.Get="2",t.Post="3",t.Put="4",t.Patch="5",t.Del="6",t.Head="7"})(NN||(NN={}));var Ve;(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"})(Ve||(Ve={}));var MN;(function(t){t.Subscribe="1",t.GraphQl="2"})(MN||(MN={}));var Qf;(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"})(Qf||(Qf={}));var _x;(function(t){t.SyncMessages="1",t.IdentifyUser="2",t.NotifyMessageInteraction="3"})(_x||(_x={}));var PN;(function(t){t.None="0"})(PN||(PN={}));var kN;(function(t){t.Convert="1",t.Identify="2",t.Interpret="3"})(kN||(kN={}));var DN;(function(t){t.Subscribe="1"})(DN||(DN={}));var LN;(function(t){t.InitializePushNotifications="1",t.IdentifyUser="2"})(LN||(LN={}));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 wq="6.18.0",my=()=>typeof global<"u",Qc=()=>typeof window<"u",H5=()=>typeof document<"u",RA=()=>typeof process<"u",hh=(t,e)=>!!Object.keys(t).find(n=>n.startsWith(e));var UN={};function xq(){const t=r=>r.startsWith("_react")||r.startsWith("__react"),e=r=>Object.keys(r).find(t),n=()=>Array.from(document.querySelectorAll("[id]"));return H5()&&n().some(e)}function _q(){return RA()&&typeof UN<"u"&&!!Object.keys(UN).find(t=>t.includes("react"))}function Aq(){return Qc()&&hh(window,"__VUE")}function Tq(){return my()&&hh(global,"__VUE")}var FN={};function Rq(){return Qc()&&hh(window,"__SVELTE")}function Iq(){return RA()&&typeof FN<"u"&&!!Object.keys(FN).find(t=>t.includes("svelte"))}function Oq(){return Qc()&&window.next&&typeof window.next=="object"}function Nq(){return my()&&(hh(global,"__next")||hh(global,"__NEXT"))}function Mq(){return Qc()&&(window.__NUXT__!==void 0||window.$nuxt!==void 0)}function Pq(){return my()&&typeof global.__NUXT_PATHS__<"u"}var zN={};function kq(){const t=!!(H5()&&document.querySelector("[ng-version]")),e=!!(Qc()&&typeof window.ng<"u");return t||e}function Dq(){return RA()&&typeof zN=="object"&&zN.npm_lifecycle_script?.startsWith("ng ")||!1}function Lq(){return typeof navigator<"u"&&typeof navigator.product<"u"&&navigator.product==="ReactNative"}function Uq(){return my()&&typeof global.expo<"u"}function Fq(){return Qc()}const zq=[{platform:xn.Expo,detectionMethod:Uq},{platform:xn.ReactNative,detectionMethod:Lq},{platform:xn.NextJs,detectionMethod:Oq},{platform:xn.Nuxt,detectionMethod:Mq},{platform:xn.Angular,detectionMethod:kq},{platform:xn.React,detectionMethod:xq},{platform:xn.VueJs,detectionMethod:Aq},{platform:xn.Svelte,detectionMethod:Rq},{platform:xn.WebUnknown,detectionMethod:Fq},{platform:xn.NextJsSSR,detectionMethod:Nq},{platform:xn.NuxtSSR,detectionMethod:Pq},{platform:xn.ReactSSR,detectionMethod:_q},{platform:xn.VueJsSSR,detectionMethod:Tq},{platform:xn.AngularSSR,detectionMethod:Dq},{platform:xn.SvelteSSR,detectionMethod:Iq}];function jq(){return zq.find(t=>t.detectionMethod())?.platform||xn.ServerSideUnknown}let Jf;const P1=[];let Ax=!1;const Bq=10,Hq=10,$q=1e3,$5=()=>{if(!Jf){if(Jf=jq(),Ax)for(;P1.length;)P1.pop()?.();else P1.forEach(t=>{t()});jN(xn.ServerSideUnknown,Bq),jN(xn.WebUnknown,Hq)}return Jf};function qq(){Jf=void 0}function jN(t,e){Jf===t&&!Ax&&setTimeout(()=>{qq(),Ax=!0,setTimeout($5,$q)},e)}const pa={},Jo=t=>{pa[t.category]=t.apis.reduce((r,s)=>({...r,[s]:{refCount:r[s]?.refCount?r[s].refCount+1:1,additionalDetails:t.additionalDetails}}),pa[t.category]??{});let e=!1;return()=>{e||(e=!0,t.apis.forEach(r=>{const s=pa[t.category][r].refCount;s>1?pa[t.category][r].refCount=s-1:(delete pa[t.category][r],Object.keys(pa[t.category]).length||delete pa[t.category])}))}},Wq=(t,e)=>pa[t]?.[e]?.additionalDetails,Gq="aws-amplify",Vq=t=>t.replace(/\+.*/,""),Kq=({category:t,action:e}={})=>{const n=[[Gq,Vq(wq)]];if(t&&n.push([t,e]),n.push(["framework",$5()]),t&&e){const r=Wq(t,e);r&&r.forEach(s=>{n.push(s)})}return n},vy=t=>Kq(t).map(([r,s])=>r&&s?`${r}/${s}`:r).join(" "),yy=()=>typeof window<"u"&&typeof window.document<"u",BN=new rr("Auth");class Yq{configure(e,n){this.authConfig=e,this.authOptions=n,e&&e.Cognito?.userPoolEndpoint&&BN.warn(HN("Amazon Cognito User Pool")),e&&e.Cognito?.identityPoolEndpoint&&BN.warn(HN("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 HN=t=>`You are using a custom Amazon ${t} endpoint, ensure the endpoint is correct.`;class Zq{constructor(){this.oAuthListener=void 0,this.isConfigured=!1,this.resourcesConfig={},this.libraryOptions={},this.Auth=new Yq}configure(e,n){const r=j5(e);this.resourcesConfig=r,n&&(this.libraryOptions=n),this.resourcesConfig=U5(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."),Ao.dispatch("core",{event:"configure",data:this.resourcesConfig},"Configure",_o),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}[F5](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 Ht=new Zq,q5=(t,e)=>t.Auth.fetchAuthSession(e),by=t=>q5(Ht,t);function W5(){return Ht.Auth.clearCredentials()}const Sy=t=>{const{headers:e,statusCode:n}=t;return{...Xq(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"]}},Xq=t=>typeof t?.$metadata=="object",Jc=async t=>{if(!t||t.statusCode<300)return;const e=await Gh(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:Sy(t)})},Gh=async t=>{if(!t.body)throw new Error("Missing response payload");const e=await t.body.json();return Object.assign(e,{$metadata:Sy(t)})},Rn=(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)},Qq=300*1e3;function Jq(t=Qq){return r=>{const s=2**r*100+100*Math.random();return s>t?!1:s}}const G5=3,$N="amz-sdk-invocation-id",eW="amz-sdk-request",qN=300*1e3,V5=t=>{const n=Jq(qN)(t);return n===!1?qN:n},tW=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch","BadRequestException"],nW=t=>!!t&&tW.includes(t),K5=t=>async(e,n)=>{const r=n??await t(e)??void 0,s=r?.code||r?.name,o=e?.statusCode;return{retryable:iW(n)||oW(o,s)||nW(s)||aW(o,s)}},rW=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException"],sW=["TimeoutError","RequestTimeout","RequestTimeoutException"],oW=(t,e)=>t===429||!!e&&rW.includes(e),iW=t=>[Pa.NetworkError,"ERR_NETWORK"].includes(t?.name),aW=(t,e)=>!!t&&[500,502,503,504].includes(t)||!!e&&sW.includes(e),Y5="cognito-identity",Z5={service:Y5,retryDecider:K5(Jc),computeDelay:V5,cache:"no-store"},lW=({maxAttempts:t=G5,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,p;const g=()=>{if(p)return WN(p,f),p;throw WN(c,f),c};for(;!r?.aborted&&f<t;){try{p=await s(u),c=void 0}catch(S){c=S,p=void 0}f=(o.attemptsCount??0)>f?o.attemptsCount??0:f+1,o.attemptsCount=f;const{isCredentialsExpiredError:m,retryable:y}=await e(p,c,o);if(y){if(o.isCredentialsExpired=!!m,!r?.aborted&&f<t){const S=n(f);await uW(S,r)}continue}else return g()}if(r?.aborted)throw new Error("Request aborted.");return g()}},uW=(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},WN=(t,e)=>{Object.prototype.toString.call(t)==="[object Object]"&&(t.$metadata={...t.$metadata??{},attempts:e})},cW=J$,dW=()=>t=>async function(n){return n.headers[$N]||(n.headers[$N]=cW()),t(n)},fW=({maxAttempts:t=G5})=>(e,n)=>async function(s){const o=n.attemptsCount??0;return s.headers[eW]=`attempt=${o+1}; max=${t}`,e(s)},hW=({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)}},IA=(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)},k1=t=>{let e;return()=>(e||(e=t()),e)},pW=t=>!["HEAD","GET"].includes(t.toUpperCase()),gW=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:pW(e)?r:void 0,signal:s,cache:o,credentials:a?"include":"same-origin"})}catch(g){throw g instanceof TypeError?new Hr({name:Pa.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},p=Object.assign(u.body??{},{text:k1(()=>u.text()),blob:k1(()=>u.blob()),json:k1(()=>u.json())});return{...f,body:p}},X5=IA(gW,[hW,dW,lW,fW]),mW=()=>t=>async function(n){return n.headers["cache-control"]="no-store",t(n)},Q5=IA(X5,[mW]),J5=t=>(e,n)=>{const r=vW(t),s=JSON.stringify(e);return yW(n,r,s)},vW=t=>({"content-type":"application/x-amz-json-1.1","x-amz-target":`AWSCognitoIdentityService.${t}`}),yW=({url:t},e,n)=>({headers:e,url:t,body:n,method:"POST"}),GN=t=>Rn(Q5,J5("GetCredentialsForIdentity"),bW,{...Z5,...t,userAgentValue:vy()}),bW=async t=>{if(t.statusCode>=300)throw await Jc(t);const e=await Gh(t);return{IdentityId:e.IdentityId,Credentials:SW(e.Credentials),$metadata:Sy(t)}},SW=({Expiration:t,...e}={})=>({...e,Expiration:t&&new Date(t*1e3)}),EW=t=>Rn(Q5,J5("GetId"),CW,{...Z5,...t,userAgentValue:vy()}),CW=async t=>{if(t.statusCode>=300)throw await Jc(t);return{IdentityId:(await Gh(t)).IdentityId,$metadata:Sy(t)}},e6={id:"aws",outputs:{dnsSuffix:"amazonaws.com"},regionRegex:"^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$",regions:["aws-global"]},wW={partitions:[e6,{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn"},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:["aws-cn-global"]}]},t6=t=>{const{partitions:e}=wW;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 e6.outputs.dnsSuffix},Wa=URL,xW=({region:t})=>({url:new Wa(`https://${Y5}.${t}.${t6(t)}`)});class Ff extends Hr{constructor(){super({name:Pa.PlatformNotSupported,message:"Function not supported on current platform"})}}class n6{constructor(e){this.storage=e}async setItem(e,n){if(!this.storage)throw new Ff;this.storage.setItem(e,n)}async getItem(e){if(!this.storage)throw new Ff;return this.storage.getItem(e)}async removeItem(e){if(!this.storage)throw new Ff;this.storage.removeItem(e)}async clear(){if(!this.storage)throw new Ff;this.storage.clear()}}class r6{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 s6=new rr("CoreStorageUtils"),_W=()=>{try{if(typeof window<"u"&&window.localStorage)return window.localStorage}catch{s6.info("localStorage not found. InMemoryStorage is used as a fallback.")}return new r6},o6=()=>{try{if(typeof window<"u"&&window.sessionStorage)return window.sessionStorage.getItem("test"),window.sessionStorage;throw new Error("sessionStorage is not defined")}catch{return s6.info("sessionStorage not found. InMemoryStorage is used as a fallback."),new r6}};class AW extends n6{constructor(){super(_W())}}class TW extends n6{constructor(){super(o6())}}class RW{constructor(e){this._storage=e}get storage(){if(!this._storage)throw new Ff;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 IW extends RW{constructor(){super(o6())}}function Ng(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 OW={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 Tx(t,e){function n(s,o,a){if(!(typeof document>"u")){a=Ng({},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 p=decodeURIComponent(c[0]);if(p in a||(a[p]=t.read(f,p)),s===p)break}catch{}}return s?a[s]:a}}return Object.create({set:n,get:r,remove:function(s,o){n(s,"",Ng({},o,{expires:-1}))},withAttributes:function(s){return Tx(this.converter,Ng({},this.attributes,s))},withConverter:function(s){return Tx(Ng({},this.converter,s),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(t)}})}var Mg=Tx(OW,{path:"/"});class NW{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){Mg.set(e,n,this.getData())}async getItem(e){return Mg.get(e)??null}async removeItem(e){Mg.remove(e,this.getData())}async clear(){const e=Mg.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 Vh=new AW;new TW;const ci=new IW,MW=new rr("I18n");let PW=class{constructor(){this._options=null,this._lang=null,this._dict={}}setDefaultLanguage(){!this._lang&&typeof window<"u"&&window&&window.navigator&&(this._lang=window.navigator.language),MW.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 Cl;(function(t){t.NotConfigured="NotConfigured"})(Cl||(Cl={}));const kW={[Cl.NotConfigured]:{message:"i18n is not configured."}},Pg=py(kW),VN=new rr("I18n");let kg={language:null},js=null,i6=class bl{static configure(e){return VN.debug("configure I18n"),e&&(kg=Object.assign({},kg,e.I18n||e),bl.createInstance()),kg}static getModuleName(){return"I18n"}static createInstance(){VN.debug("create I18n instance"),!js&&(js=new PW)}static setLanguage(e){bl.checkConfig(),Pg(!!js,Cl.NotConfigured),js.setLanguage(e)}static get(e,n){return bl.checkConfig(),Pg(!!js,Cl.NotConfigured),js.get(e,n)}static putVocabulariesForLanguage(e,n){bl.checkConfig(),Pg(!!js,Cl.NotConfigured),js.putVocabulariesForLanguage(e,n)}static putVocabularies(e){bl.checkConfig(),Pg(!!js,Cl.NotConfigured),js.putVocabularies(e)}static checkConfig(){return js||bl.createInstance(),!0}};i6.createInstance();const DW=t=>{const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=[],r=new Uint8Array(t);_A().getRandomValues(r);for(const s of r)n.push(e[s%e.length]);return n.join("")};function LW(t){return(t.match(/.{2}/g)||[]).map(n=>String.fromCharCode(parseInt(n,16))).join("")}function UW(t){return t.split("").map(e=>e.charCodeAt(0).toString(16).padStart(2,"0")).join("")}const FW=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 KN({expiresAt:t,clockDrift:e,tolerance:n=5e3}){return Date.now()+e+n>t}const zW=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 jW(t){return Array.from(t,e=>String.fromCodePoint(e)).join("")}const Mc={convert(t,e={urlSafe:!1,skipPadding:!1}){const n=typeof t=="string"?t:jW(t);let r=B$()(n);return e.urlSafe&&(r=r.replace(/\+/g,"-").replace(/\//g,"_")),e.skipPadding&&(r=r.replace(/=/g,"")),r}};function BW(){return _A().getRandomValues(new Uint32Array(1))[0]}function HW(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 OA{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(BW());return new OA(n,e)}toString(){return HW(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 a6={[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 Fn;(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"})(Fn||(Fn={}));var To;(function(t){t.SignInException="SignInException",t.OAuthSignInError="OAuthSignInException"})(To||(To={}));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}=a6[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 Rx(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 YN(t){return Object.entries(t).map(([e,n])=>({Name:e,Value:n}))}function $W(t){const e={};return t?.forEach(n=>{n.Name&&(e[n.Name]=n.Value)}),e}var ZN;(function(t){t.ConcurrentModificationException="ConcurrentModificationException",t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidParameterException="InvalidParameterException",t.NotAuthorizedException="NotAuthorizedException",t.ResourceNotFoundException="ResourceNotFoundException",t.SoftwareTokenMFANotFoundException="SoftwareTokenMFANotFoundException"})(ZN||(ZN={}));var XN;(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"})(XN||(XN={}));var QN;(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"})(QN||(QN={}));var JN;(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"})(JN||(JN={}));var eM;(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"})(eM||(eM={}));var tM;(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"})(tM||(tM={}));var nM;(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"})(nM||(nM={}));var rM;(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"})(rM||(rM={}));var sM;(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"})(sM||(sM={}));var oM;(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"})(oM||(oM={}));var iM;(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"})(iM||(iM={}));var aM;(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"})(aM||(aM={}));var lM;(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"})(lM||(lM={}));var uM;(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"})(uM||(uM={}));var gv;(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"})(gv||(gv={}));var cM;(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"})(cM||(cM={}));var dM;(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"})(dM||(dM={}));var fM;(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"})(fM||(fM={}));var Ix;(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"})(Ix||(Ix={}));var hM;(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"})(hM||(hM={}));var pM;(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"})(pM||(pM={}));var gM;(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"})(gM||(gM={}));var mM;(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"})(mM||(mM={}));var vM;(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"})(vM||(vM={}));const Ey="UserUnAuthenticatedException",qW="UserAlreadyAuthenticatedException",WW="DeviceMetadataNotFoundException",l6="AutoSignInException",GW="InvalidRedirectException",VW="InvalidAppSchemeException",KW="InvalidPreferredRedirectUrlException",YW=new Le({name:GW,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:VW,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:KW,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 ZW="InvalidOriginException",XW=new Le({name:ZW,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."}),QW="OAuthSignOutException",JW="TokenRefreshException",eG="UnexpectedSignInInterruptionException";function ed(t){if(!t||!t.accessToken)throw new Le({name:Ey,message:"User needs to be authenticated to call this API.",recoverySuggestion:"Sign in before calling this API again."})}function tG(t){if(!t||!t.idToken)throw new Le({name:Ey,message:"User needs to be authenticated to call this API.",recoverySuggestion:"Sign in before calling this API again."})}const nG=new Le({name:JW,message:`Token refresh is not supported when authenticated with the 'implicit grant' (token) oauth flow.
3
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
4
  E.g { responseType: 'code' }`}),rG=new Le({name:Ey,message:"User needs to be authenticated to call this API.",recoverySuggestion:"Sign in before calling this API again."});function u6(t){if(iG(t))throw nG;if(!oG(t))throw rG}function c6(t){if(!t||!t.deviceKey||!t.deviceGroupKey||!t.randomPassword)throw new Le({name:WW,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 sG={inflightOAuth:"inflightOAuth",oauthSignIn:"oauthSignIn",oauthPKCE:"oauthPKCE",oauthState:"oauthState"};function d6(t){return t?.accessToken||t?.idToken}function oG(t){return d6(t)&&t?.refreshToken}function iG(t){return d6(t)&&!t?.refreshToken}const aG=async t=>{const e=t.getConfig().Auth?.Cognito;lt(e);const n=await t.Auth.getTokens({forceRefresh:!1});ed(n);const{"cognito:username":r,sub:s}=n.idToken?.payload??{},o={username:r,userId:s},a=lG(n);return a&&(o.signInDetails=a),o};function lG(t){return t?.signInDetails}const Cy=async()=>aG(Ht),Nt=(t,e)=>vy({category:Is.Auth,action:t,...e}),jn=t=>(e,n)=>{const r=uG(t),s=JSON.stringify(e);return cG(n,r,s)},uG=t=>({"content-type":"application/x-amz-json-1.1","x-amz-target":`AWSCognitoIdentityProviderService.${t}`}),cG=({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:Pa.Unknown,message:"An unknown error has occurred.",underlyingError:t})}const ir=()=>async t=>{if(t.statusCode>=300){const e=await Jc(t);throw Os(e),new Le({name:e.name,message:e.message,metadata:e.$metadata})}return Gh(t)},dG=()=>(t,e)=>async function(r){return r.headers={...r.headers,"cache-control":"no-store",...await Ht.libraryOptions?.Auth?.headers?.()},t(r)},Bn=IA(X5,[dG]),f6="cognito-idp",Hn={service:f6,retryDecider:K5(Jc),computeDelay:V5,get userAgentValue(){return vy()},cache:"no-store"},Kh=t=>Rn(Bn,jn("InitiateAuth"),ir(),{...Hn,...t}),as=t=>Rn(Bn,jn("RespondToAuthChallenge"),ir(),{...Hn,...t}),fG=t=>Rn(Bn,jn("VerifySoftwareToken"),ir(),{...Hn,...t}),hG=t=>Rn(Bn,jn("AssociateSoftwareToken"),ir(),{...Hn,...t}),pG=({region:t})=>({url:new Wa(`https://${f6}.${t}.${t6(t)}`)}),bt=({endpointOverride:t})=>e=>t?{url:new Wa(t)}:pG(e),gG=t=>Rn(Bn,jn("GetTokensFromRefreshToken"),ir(),{...Hn,...t}),mG=async({tokens:t,authConfig:e,username:n,clientMetadata:r})=>{lt(e?.Cognito);const{userPoolId:s,userPoolClientId:o,userPoolEndpoint:a}=e.Cognito,u=yt(s);u6(t);const c=gG({endpointResolver:bt({endpointOverride:a})}),{AuthenticationResult:f}=await c({region:u},{ClientId:o,RefreshToken:t.refreshToken,DeviceKey:t.deviceMetadata?.deviceKey,ClientMetadata:r}),p=gi(f?.AccessToken??""),g=f?.IdToken?gi(f.IdToken):void 0,{iat:m}=p.payload;if(!m)throw new Le({name:"iatNotFoundException",message:"iat not found in access token"});const y=m*1e3-new Date().getTime();return{accessToken:p,idToken:g,clockDrift:y,refreshToken:f?.RefreshToken??t.refreshToken,username:n}},vG=FW(mG),yG={accessToken:"accessToken",idToken:"idToken",oidcProvider:"oidcProvider",clockDrift:"clockDrift",refreshToken:"refreshToken",deviceKey:"deviceKey",randomPasswordKey:"randomPasswordKey",deviceGroupKey:"deviceGroupKey",signInDetails:"signInDetails",oauthMetadata:"oauthMetadata"};var mv;(function(t){t.InvalidAuthTokens="InvalidAuthTokens"})(mv||(mv={}));const bG={[mv.InvalidAuthTokens]:{message:"Invalid tokens.",recoverySuggestion:"Make sure the tokens are valid."}},SG=py(bG),yM="CognitoIdentityServiceProvider";class EG{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=gi(n),s=await this.getKeyValueStorage().getItem(e.idToken),o=s?gi(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),p={accessToken:r,idToken:o,refreshToken:a,deviceMetadata:await this.getDeviceMetadata()??void 0,clockDrift:c,username:await this.getLastAuthUser()};return f&&(p.signInDetails=JSON.parse(f)),p}catch{return null}}async storeTokens(e){SG(e!==void 0,mv.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 CG(yM,`${this.authConfig.Cognito.userPoolClientId}.${n}`)}getLastAuthUserKey(){lt(this.authConfig?.Cognito);const e=this.authConfig.Cognito.userPoolClientId;return`${yM}.${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 CG=(t,e)=>NA(yG)(`${t}`,e);function NA(t){const e=Object.values({...t});return(n,r)=>e.reduce((s,o)=>({...s,[o]:`${n}.${r}.${o}`}),{})}const bM="amplify-signin-with-hostedUI",ho="CognitoIdentityServiceProvider";class h6{constructor(e){this.keyValueStorage=e}async clearOAuthInflightData(){lt(this.cognitoConfig);const e=po(ho,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=po(ho,this.cognitoConfig.userPoolClientId);return await this.clearOAuthInflightData(),await this.keyValueStorage.removeItem(bM),this.keyValueStorage.removeItem(e.oauthSignIn)}loadOAuthState(){lt(this.cognitoConfig);const e=po(ho,this.cognitoConfig.userPoolClientId);return this.keyValueStorage.getItem(e.oauthState)}storeOAuthState(e){lt(this.cognitoConfig);const n=po(ho,this.cognitoConfig.userPoolClientId);return this.keyValueStorage.setItem(n.oauthState,e)}loadPKCE(){lt(this.cognitoConfig);const e=po(ho,this.cognitoConfig.userPoolClientId);return this.keyValueStorage.getItem(e.oauthPKCE)}storePKCE(e){lt(this.cognitoConfig);const n=po(ho,this.cognitoConfig.userPoolClientId);return this.keyValueStorage.setItem(n.oauthPKCE,e)}setAuthConfig(e){this.cognitoConfig=e}async loadOAuthInFlight(){lt(this.cognitoConfig);const e=po(ho,this.cognitoConfig.userPoolClientId);return await this.keyValueStorage.getItem(e.inflightOAuth)==="true"}async storeOAuthInFlight(e){lt(this.cognitoConfig);const n=po(ho,this.cognitoConfig.userPoolClientId);await this.keyValueStorage.setItem(n.inflightOAuth,`${e}`)}async loadOAuthSignIn(){lt(this.cognitoConfig);const e=po(ho,this.cognitoConfig.userPoolClientId),n=await this.keyValueStorage.getItem(bM),[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=po(ho,this.cognitoConfig.userPoolClientId);await this.keyValueStorage.setItem(r.oauthSignIn,`${e},${n}`)}}const po=(t,e)=>NA(sG)(t,e),Fr=new h6(Vh),Ox=[],wG=t=>{Ox.push(t)},p6=()=>{for(;Ox.length;)Ox.pop()?.()};class xG{constructor(){this.waitForInflightOAuth=yy()?async()=>{if(await Fr.loadOAuthInFlight())return this.inflightPromise?this.inflightPromise:(this.inflightPromise=new Promise((e,n)=>{wG(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&&KN({expiresAt:(n.idToken?.payload?.exp??0)*1e3,clockDrift:n.clockDrift??0}),o=KN({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}),Ao.dispatch("auth",{event:"tokenRefresh"},"Auth",_o),o}catch(s){return this.handleErrors(s)}}handleErrors(e){if(Os(e),this.isAuthenticationError(e)&&this.clearTokens(),Ao.dispatch("auth",{event:"tokenRefresh_failure",data:{error:e}},"Auth",_o),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 _G{constructor(){this.authTokenStore=new EG,this.authTokenStore.setKeyValueStorage(Vh),this.tokenOrchestrator=new xG,this.tokenOrchestrator.setAuthTokenStore(this.authTokenStore),this.tokenOrchestrator.setTokenRefresher(vG)}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 jm=new _G,{tokenOrchestrator:$r}=jm;async function _i(t){if(t.AccessToken){const e=gi(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=gi(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 AG="Unable to get user session following successful sign-in.",Ga=async()=>{try{Ao.dispatch("auth",{event:"signedIn",data:await Cy()},"Auth",_o)}catch(t){throw t.name===Ey?new Le({name:eG,message:AG,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 g6(){return{active:!1}}const TG=(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 g6();default:return t}},RG=t=>{let e=t(g6(),{type:"RESET"});return{getState:()=>e,dispatch:n=>{e=t(e,n)}}},Aa=RG(TG),IG=180*1e3,Dg="CognitoSignInState",di={username:`${Dg}.username`,challengeName:`${Dg}.challengeName`,signInSession:`${Dg}.signInSession`,expiry:`${Dg}.expiry`},OG=(t,e)=>{switch(e.type){case"SET_SIGN_IN_SESSION":return Lg({signInSession:e.value}),{...t,signInSession:e.value};case"SET_SIGN_IN_STATE":return Lg(e.value),{...e.value};case"SET_CHALLENGE_NAME":return Lg({challengeName:e.value}),{...t,challengeName:e.value};case"SET_USERNAME":return Lg({username:e.value}),{...t,username:e.value};case"SET_INITIAL_STATE":return MG();case"RESET_STATE":return m6(),MA();default:return t}},NG=t=>{const e=Number(t),n=Date.now();return e<=n},Qs=()=>{Ro.dispatch({type:"RESET_STATE"})},m6=()=>{for(const t of Object.values(di))ci.removeItem(t)},MA=()=>({username:void 0,challengeName:void 0,signInSession:void 0}),MG=()=>{const t=ci.getItem(di.expiry);if(!t||NG(t))return m6(),MA();const e=ci.getItem(di.username)??void 0,n=ci.getItem(di.challengeName)??void 0,r=ci.getItem(di.signInSession)??void 0;return{username:e,challengeName:n,signInSession:r}},PG=t=>{let e=t(MA(),{type:"SET_INITIAL_STATE"});return{getState:()=>e,dispatch:n=>{e=t(e,n)}}},Ro=PG(OG);function Xl(t){Ro.dispatch({type:"SET_SIGN_IN_STATE",value:t})}const Lg=({challengeName:t,signInSession:e,username:n})=>{n&&ci.setItem(di.username,n),t&&ci.setItem(di.challengeName,t),e&&(ci.setItem(di.signInSession,e),ci.setItem(di.expiry,String(Date.now()+IG)))},SM="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 jt;(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"})(jt||(jt={}));const D1="User may have canceled the ceremony or another interruption has occurred. Check underlying error for details.",EM="Ensure your user pool is configured to support the WEB_AUTHN as an authentication factor.",Pc={[jt.PasskeyNotSupported]:{message:"Passkeys may not be supported on this device.",recoverySuggestion:SM},[jt.InvalidPasskeyRegistrationOptions]:{message:"Invalid passkey registration options.",recoverySuggestion:EM},[jt.InvalidPasskeyAuthenticationOptions]:{message:"Invalid passkey authentication options.",recoverySuggestion:EM},[jt.PasskeyRegistrationFailed]:{message:"Device failed to create passkey.",recoverySuggestion:SM},[jt.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."},[jt.PasskeyAlreadyExists]:{message:"Passkey already exists in authenticator.",recoverySuggestion:"Proceed with existing passkey or try again after deleting the credential."},[jt.PasskeyRegistrationCanceled]:{message:"Passkey registration ceremony has been canceled.",recoverySuggestion:D1},[jt.PasskeyAuthenticationCanceled]:{message:"Passkey authentication ceremony has been canceled.",recoverySuggestion:D1},[jt.PasskeyOperationAborted]:{message:"Passkey operation has been aborted.",recoverySuggestion:D1},[jt.RelyingPartyMismatch]:{message:"Relying party does not match current domain.",recoverySuggestion:"Ensure relying party identifier matches current domain."}},td=py(Pc,Rs),v6=t=>{if(t instanceof Error){if(t.name==="AbortError"){const{message:e,recoverySuggestion:n}=Pc[jt.PasskeyOperationAborted];return new Rs({name:jt.PasskeyOperationAborted,message:e,recoverySuggestion:n,underlyingError:t})}if(t.name==="SecurityError"){const{message:e,recoverySuggestion:n}=Pc[jt.RelyingPartyMismatch];return new Rs({name:jt.RelyingPartyMismatch,message:e,recoverySuggestion:n,underlyingError:t})}}return new Rs({name:Pa.Unknown,message:"An unknown error has occurred.",underlyingError:t})},kG=t=>{if(t instanceof Rs)return t;if(t instanceof Error&&t.name==="NotAllowedError"){const{message:e,recoverySuggestion:n}=Pc[jt.PasskeyAuthenticationCanceled];return new Rs({name:jt.PasskeyAuthenticationCanceled,message:e,recoverySuggestion:n,underlyingError:t})}return v6(t)},y6=()=>yy()&&window.isSecureContext&&"credentials"in navigator&&typeof window.PublicKeyCredential=="function",Co=t=>Mc.convert(new Uint8Array(t),{urlSafe:!0,skipPadding:!0}),eh=t=>Uint8Array.from(AA.convert(t,{urlSafe:!0}),e=>e.charCodeAt(0)).buffer,DG=t=>{const e=eh(t.user.id),n=eh(t.challenge),r=(t.excludeCredentials||[]).map(s=>({...s,id:eh(s.id)}));return{...t,excludeCredentials:r,challenge:n,user:{...t.user,id:e}}},LG=t=>{const e={clientDataJSON:Co(t.response.clientDataJSON),attestationObject:Co(t.response.attestationObject),transports:t.response.getTransports(),publicKeyAlgorithm:t.response.getPublicKeyAlgorithm(),authenticatorData:Co(t.response.getAuthenticatorData())},n=t.response.getPublicKey();n&&(e.publicKey=Co(n));const r={type:t.type,id:t.id,rawId:Co(t.rawId),clientExtensionResults:t.getClientExtensionResults(),response:e};return t.authenticatorAttachment&&(r.authenticatorAttachment=t.authenticatorAttachment),r},UG=t=>{const e=eh(t.challenge),n=(t.allowCredentials||[]).map(r=>({...r,id:eh(r.id)}));return{...t,challenge:e,allowCredentials:n}},FG=t=>{const e={clientDataJSON:Co(t.response.clientDataJSON),authenticatorData:Co(t.response.authenticatorData),signature:Co(t.response.signature)};t.response.userHandle&&(e.userHandle=Co(t.response.userHandle));const n={id:t.id,rawId:Co(t.rawId),type:t.type,clientExtensionResults:t.getClientExtensionResults(),response:e};return t.authenticatorAttachment&&(n.authenticatorAttachment=t.authenticatorAttachment),n};function zG(t){td([!!t,!!t?.challenge,!!t?.user,!!t?.rp,!!t?.pubKeyCredParams].every(Boolean),jt.InvalidPasskeyRegistrationOptions)}function jG(t){td(t&&t instanceof PublicKeyCredential&&t.response instanceof AuthenticatorAttestationResponse,jt.PasskeyRegistrationFailed)}function BG(t){td(t&&t instanceof PublicKeyCredential&&t.response instanceof AuthenticatorAssertionResponse,jt.PasskeyRetrievalFailed)}const HG=async t=>{try{const e=y6();td(e,jt.PasskeyNotSupported);const n=UG(t),r=await navigator.credentials.get({publicKey:n});return BG(r),FG(r)}catch(e){throw kG(e)}},$G=t=>Rn(Bn,jn("ConfirmDevice"),ir(),{...Hn,...t}),Bm={convert(t){return new TextEncoder().encode(t)}};function Ie(t,e){t!=null&&this.fromString(t,e)}function xr(){return new Ie(null,null)}let Ia;const qG=0xdeadbeefcafe,CM=(qG&16777215)===15715070;function WG(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 GG(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,p=u*c+f*a;c=a*c+((p&32767)<<15)+n[r]+(s&1073741823),s=(c>>>30)+(p>>>15)+u*f+(s>>>30),n[r++]=c&1073741823}return s}function VG(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,p=u*c+f*a;c=a*c+((p&16383)<<14)+n[r]+s,s=(c>>28)+(p>>14)+u*f,n[r++]=c&268435455}return s}const wM=typeof navigator<"u";wM&&CM&&navigator.appName==="Microsoft Internet Explorer"?(Ie.prototype.am=GG,Ia=30):wM&&CM&&navigator.appName!=="Netscape"?(Ie.prototype.am=WG,Ia=26):(Ie.prototype.am=VG,Ia=28);Ie.prototype.DB=Ia;Ie.prototype.DM=(1<<Ia)-1;Ie.prototype.DV=1<<Ia;const PA=52;Ie.prototype.FV=Math.pow(2,PA);Ie.prototype.F1=PA-Ia;Ie.prototype.F2=2*Ia-PA;const KG="0123456789abcdefghijklmnopqrstuvwxyz",wy=[];let nd,As;nd=48;for(As=0;As<=9;++As)wy[nd++]=As;nd=97;for(As=10;As<36;++As)wy[nd++]=As;nd=65;for(As=10;As<36;++As)wy[nd++]=As;function xM(t){return KG.charAt(t)}function YG(t,e){const n=wy[t.charCodeAt(e)];return n??-1}function ZG(t){for(let e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s}function XG(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=xr();return e.fromInt(t),e}function QG(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=YG(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 JG(){const t=this.s&this.DM;for(;this.t>0&&this[this.t-1]==t;)--this.t}function eV(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=xM(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+=xM(r));return s?o:"0"}function tV(){const t=xr();return Ie.ZERO.subTo(this,t),t}function nV(){return this.s<0?this.negate():this}function rV(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 DA(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 sV(){return this.t<=0?0:this.DB*(this.t-1)+DA(this[this.t-1]^this.s&this.DM)}function oV(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 iV(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 aV(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 lV(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 uV(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 cV(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 dV(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 fV(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=xr());const o=xr(),a=this.s,u=t.s,c=this.DB-DA(r[r.t-1]);c>0?(r.lShiftTo(c,o),s.lShiftTo(c,n)):(r.copyTo(o),s.copyTo(n));const f=o.t,p=o[f-1];if(p===0)return;const g=p*(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?xr():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 _=n[--E]===p?this.DM:Math.floor(n[E]*m+(n[E-1]+S)*y);if((n[E]+=o.am(0,_,n,C,0,f))<_)for(o.dlShiftTo(C,w),n.subTo(w,n);n[E]<--_;)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 hV(t){const e=xr();return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(Ie.ZERO)>0&&t.subTo(e,e),e}function pV(){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 gV(t){return this.compareTo(t)===0}function mV(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 vV(t){const e=xr();return this.addTo(t,e),e}function yV(t){const e=xr();return this.subTo(t,e),e}function bV(t){const e=xr();return this.multiplyTo(t,e),e}function SV(t){const e=xr();return this.divRemTo(t,e,null),e}function rd(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 EV(t){const e=xr();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 CV(t){const e=xr();return t.copyTo(e),this.reduce(e),e}function wV(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 xV(t,e){t.squareTo(e),this.reduce(e)}function _V(t,e,n){t.multiplyTo(e,n),this.reduce(n)}rd.prototype.convert=EV;rd.prototype.revert=CV;rd.prototype.reduce=wV;rd.prototype.mulTo=_V;rd.prototype.sqrTo=xV;function AV(t,e,n){let r=t.bitLength(),s,o=kA(1);const a=new rd(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,p=(1<<s)-1;if(u[1]=a.convert(this),s>1){const w=xr();for(a.sqrTo(u[1],w);c<=p;)u[c]=xr(),a.mulTo(w,u[c-2],u[c]),c+=2}let g=t.t-1,m,y=!0,S=xr(),E;for(r=DA(t[g])-1;g>=0;){for(r>=f?m=t[g]>>r-f&p:(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=ZG;Ie.prototype.fromInt=XG;Ie.prototype.fromString=QG;Ie.prototype.clamp=JG;Ie.prototype.dlShiftTo=oV;Ie.prototype.drShiftTo=iV;Ie.prototype.lShiftTo=aV;Ie.prototype.rShiftTo=lV;Ie.prototype.subTo=uV;Ie.prototype.multiplyTo=cV;Ie.prototype.squareTo=dV;Ie.prototype.divRemTo=fV;Ie.prototype.invDigit=pV;Ie.prototype.addTo=mV;Ie.prototype.toString=eV;Ie.prototype.negate=tV;Ie.prototype.abs=nV;Ie.prototype.compareTo=rV;Ie.prototype.bitLength=sV;Ie.prototype.mod=hV;Ie.prototype.equals=gV;Ie.prototype.add=vV;Ie.prototype.subtract=yV;Ie.prototype.multiply=bV;Ie.prototype.divide=SV;Ie.prototype.modPow=AV;Ie.ZERO=kA(0);Ie.ONE=kA(1);const TV=async({a:t,g:e,k:n,x:r,B:s,N:o,U:a})=>new Promise((u,c)=>{e.modPow(r,o,(f,p)=>{if(f){c(f);return}s.subtract(n.multiply(p)).modPow(t.add(a.multiply(r)),o,(g,m)=>{if(g){c(g);return}u(m.mod(o))})})}),RV="FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF",b6={},Nx={};for(let t=0;t<256;t++){let e=t.toString(16).toLowerCase();e.length===1&&(e=`0${e}`),b6[t]=e,Nx[e]=t}const kc=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 Nx)e[n/2]=Nx[r];else throw new Error(`Cannot decode unrecognized sequence ${r} as hexadecimal`)}return e},LA=t=>{let e="";for(let n=0;n<t.byteLength;n++)e+=b6[t[n]];return e},Mx=t=>{const e=new Ul;e.update(t);const n=e.digestSync(),r=LA(n);return new Array(64-r.length).join("0")+r},Hm=t=>Mx(kc(t)),IV=/^[89a-f]/i,ii=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=IV.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},OV=({A:t,B:e})=>{const n=new Ie(Hm(ii(t)+ii(e)),16);if(n.equals(Ie.ZERO))throw new Error("U cannot be zero.");return n},NV=(t,e,n)=>{const r=new Ul(e);r.update(t);const s=r.digestSync(),o=new Ul(s);return o.update(n),o.digestSync().slice(0,16)},UA=t=>{const e=new OA().random(t).toString();return kc(e)},MV=()=>Mc.convert(UA(40));class PV{constructor({userPoolName:e,a:n,g:r,A:s,N:o}){this.encoder=Bm,this.userPoolName=e,this.a=n,this.g=r,this.A=s,this.N=o,this.k=new Ie(Hm(`${ii(o)}${ii(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=MV();const r=`${e}${n}:${this.randomPassword}`,s=Mx(r),o=LA(UA(16));return this.saltToHashDevices=ii(new Ie(o,16)),new Promise((a,u)=>{this.g.modPow(new Ie(Hm(this.saltToHashDevices+s),16),this.N,(c,f)=>{if(c){u(c);return}this.verifierDevices=ii(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=OV({A:this.A,B:r}),a=`${this.userPoolName}${e}:${n}`,u=Mx(a),c=new Ie(Hm(ii(s)+u),16),f=await TV({a:this.a,g:this.g,k:this.k,x:c,B:r,N:this.N,U:o}),p=this.encoder.convert("Caldera Derived Key"),g=this.encoder.convert(""),m=new Uint8Array(p.byteLength+g.byteLength);return m.set(p,0),m.set(g,p.byteLength),NV(kc(ii(f)),kc(ii(o)),m)}}const kV=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)})}),Yh=async t=>{const e=new Ie(RV,16),n=new Ie("2",16),r=DV(),s=await kV({a:r,g:n,N:e});return new PV({userPoolName:t,a:r,g:n,A:s,N:e})},DV=()=>{const t=LA(UA(128));return new Ie(t,16)};async function Ql({userPoolId:t,userPoolEndpoint:e,newDeviceMetadata:n,accessToken:r}){if(!n)return;const s=t.split("_")[1]||"",o=await Yh(s),a=n?.DeviceKey,u=n?.DeviceGroupKey;try{await o.generateHashDevice(u??"",a??"")}catch{return}const c={Salt:Mc.convert(kc(o.getSaltToHashDevices())),PasswordVerifier:Mc.convert(kc(o.getVerifierDevices()))},f=o.getRandomPassword();try{return await $G({endpointResolver:bt({endpointOverride:e})})({region:yt(t)},{AccessToken:r,DeviceName:await zW(),DeviceKey:n?.DeviceKey,DeviceSecretVerifierConfig:c}),{deviceKey:a,deviceGroupKey:u,randomPassword:f}}catch{return}}async function LV(t){const e=Ht.getConfig().Auth?.Cognito;lt(e);const{username:n,signInSession:r,signInDetails:s,challengeName:o}=Ro.getState();if(o!=="WEB_AUTHN"||!n)throw new Le({name:To.SignInException,message:"Unable to proceed due to invalid sign in state."});const{CREDENTIAL_REQUEST_OPTIONS:a}=t;td(!!a,jt.InvalidPasskeyAuthenticationOptions);const u=await HG(JSON.parse(a)),c=as({endpointResolver:bt({endpointOverride:e.userPoolEndpoint})}),{ChallengeName:f,ChallengeParameters:p,AuthenticationResult:g,Session:m}=await c({region:yt(e.userPoolId),userAgentValue:Nt(Ve.ConfirmSignIn)},{ChallengeName:"WEB_AUTHN",ChallengeResponses:{USERNAME:n,CREDENTIAL:JSON.stringify(u)},ClientId:e.userPoolClientId,Session:r});if(Xl({signInSession:m,username:n,challengeName:f,signInDetails:s}),g)return await _i({...g,username:n,NewDeviceMetadata:await Ql({userPoolId:e.userPoolId,userPoolEndpoint:e.userPoolEndpoint,newDeviceMetadata:g.NewDeviceMetadata,accessToken:g.AccessToken}),signInDetails:s}),Ro.dispatch({type:"RESET_STATE"}),await Ga(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}};if(f==="WEB_AUTHN")throw new Le({name:To.SignInException,message:"Sequential WEB_AUTHN challenges returned from underlying service cannot be handled."});return{challengeName:f,challengeParameters:p}}function $n({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 UV=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],FV=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],S6=()=>{const t=new Date,e=FV[t.getUTCDay()],n=UV[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}`},E6=({userPoolName:t,username:e,challengeParameters:n,dateNow:r,hkdf:s})=>{const o=Bm.convert(t),a=Bm.convert(e),u=zV(n.SECRET_BLOCK),c=Bm.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 p=new Ul(s);p.update(f);const g=p.digestSync();return Mc.convert(g)},zV=t=>{const e="=".repeat((4-t.length%4)%4),n=(t+e).replace(/-/g,"+").replace(/_/g,"/"),r=AA.convert(n),s=new Uint8Array(r.length);for(let o=0;o<r.length;++o)s[o]=r.charCodeAt(o);return s};async function Zh({username:t,config:e,clientMetadata:n,session:r,tokenOrchestrator:s}){const{userPoolId:o,userPoolEndpoint:a}=e,u=e.userPoolClientId,c=await s?.getDeviceMetadata(t);c6(c);const f=await Yh(c.deviceGroupKey),p={USERNAME:t,SRP_A:f.A.toString(16),DEVICE_KEY:c.deviceKey},g={ChallengeName:"DEVICE_SRP_AUTH",ClientId:u,ChallengeResponses:p,ClientMetadata:n,Session:r},m=as({endpointResolver:bt({endpointOverride:a})}),{ChallengeParameters:y,Session:S}=await m({region:yt(o)},g);return jV(t,y,n,S,f,e,s)}async function jV(t,e,n,r,s,{userPoolId:o,userPoolClientId:a,userPoolEndpoint:u},c){const f=await c?.getDeviceMetadata(t);c6(f);const p=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:p,salt:g}),E=S6(),C={USERNAME:e?.USERNAME??t,PASSWORD_CLAIM_SECRET_BLOCK:e?.SECRET_BLOCK,TIMESTAMP:E,PASSWORD_CLAIM_SIGNATURE:E6({username:m,userPoolName:y,challengeParameters:e,dateNow:E,hkdf:S}),DEVICE_KEY:m},w=$n({username:t,userPoolId:o,userPoolClientId:a}),_={ChallengeName:"DEVICE_PASSWORD_VERIFIER",ClientId:a,ChallengeResponses:C,Session:r,ClientMetadata:n,UserContextData:w};return as({endpointResolver:bt({endpointOverride:u})})({region:yt(o)},_)}async function FA(t,e,n,r,s,o,a){const{userPoolId:u,userPoolClientId:c,userPoolEndpoint:f}=o,p=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=S6(),C={USERNAME:y,PASSWORD_CLAIM_SECRET_BLOCK:e?.SECRET_BLOCK,TIMESTAMP:E,PASSWORD_CLAIM_SIGNATURE:E6({username:y,userPoolName:p,challengeParameters:e,dateNow:E,hkdf:S})},w=await a.getDeviceMetadata(y);w&&w.deviceKey&&(C.DEVICE_KEY=w.deviceKey);const _=$n({username:y,userPoolId:u,userPoolClientId:c}),T={ChallengeName:"PASSWORD_VERIFIER",ChallengeResponses:C,ClientMetadata:n,Session:r,ClientId:c,UserContextData:_},M=await as({endpointResolver:bt({endpointOverride:f})})({region:yt(u)},T);return M.ChallengeName==="DEVICE_SRP_AUTH"?Zh({username:y,config:o,clientMetadata:n,session:M.Session,tokenOrchestrator:a}):M}async function sd(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 Jl(t){const{dispatch:e}=Ro;e({type:"SET_USERNAME",value:t})}async function C6({username:t,password:e,clientMetadata:n,config:r,tokenOrchestrator:s,authFlow:o,preferredChallenge:a}){const{userPoolId:u,userPoolClientId:c,userPoolEndpoint:f}=r,p=u?.split("_")[1]||"",g=await Yh(p),m={USERNAME:t,SRP_A:g.A.toString(16)};o==="USER_AUTH"&&a&&(m.PREFERRED_CHALLENGE=a);const y=$n({username:t,userPoolId:u,userPoolClientId:c}),S={AuthFlow:o,AuthParameters:m,ClientMetadata:n,ClientId:c,UserContextData:y},C=await Kh({endpointResolver:bt({endpointOverride:f})})({region:yt(u),userAgentValue:Nt(Ve.SignIn)},S),{ChallengeParameters:w,Session:_}=C,T=w?.USERNAME??t;return Jl(T),C.ChallengeName==="PASSWORD_VERIFIER"?sd(FA,[e,w,n,_,g,r,s],T,s):C}async function BV({username:t,session:e,selectedChallenge:n,config:r,clientMetadata:s}){return as({endpointResolver:bt({endpointOverride:r.userPoolEndpoint})})({region:yt(r.userPoolId),userAgentValue:Nt(Ve.ConfirmSignIn)},{ChallengeName:"SELECT_CHALLENGE",ChallengeResponses:{USERNAME:t,ANSWER:n},ClientId:r.userPoolClientId,Session:e,ClientMetadata:s})}async function HV(t,e,n,r,s){const{userPoolId:o,userPoolClientId:a,userPoolEndpoint:u}=r,c={ANSWER:"PASSWORD",USERNAME:t,PASSWORD:e},f=$n({username:t,userPoolId:o,userPoolClientId:a}),g=await as({endpointResolver:bt({endpointOverride:u})})({region:yt(o),userAgentValue:Nt(Ve.ConfirmSignIn)},{ChallengeName:"SELECT_CHALLENGE",ChallengeResponses:c,ClientId:a,ClientMetadata:n,Session:s,UserContextData:f}),m=g.ChallengeParameters?.USERNAME??t;return Jl(m),g}async function $V(t,e,n,r,s,o){const{userPoolId:a,userPoolClientId:u,userPoolEndpoint:c}=r,f=a.split("_")[1]||"",p=await Yh(f),g={ANSWER:"PASSWORD_SRP",USERNAME:t,SRP_A:p.A.toString(16)},m=$n({username:t,userPoolId:a,userPoolClientId:u}),S=await as({endpointResolver:bt({endpointOverride:c})})({region:yt(a),userAgentValue:Nt(Ve.ConfirmSignIn)},{ChallengeName:"SELECT_CHALLENGE",ChallengeResponses:g,ClientId:u,ClientMetadata:n,Session:s,UserContextData:m}),E=S.ChallengeParameters?.USERNAME??t;return Jl(E),S.ChallengeName==="PASSWORD_VERIFIER"?sd(FA,[e,S.ChallengeParameters,n,S.Session,p,r,o],E,o):S}const Px="userAttributes.";function qV(t){return"isSignedIn"in t&&"nextStep"in t}async function WV({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},p=await o?.getDeviceMetadata(r);p&&p.deviceKey&&(f.DEVICE_KEY=p.deviceKey);const g=$n({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:Nt(Ve.ConfirmSignIn)},m);return S.ChallengeName==="DEVICE_SRP_AUTH"?Zh({username:r,config:s,clientMetadata:e,session:S.Session,tokenOrchestrator:o}):S}async function GV({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=fG({endpointResolver:bt({endpointOverride:c})}),{Session:y}=await m({region:yt(a),userAgentValue:Nt(Ve.ConfirmSignIn)},{UserCode:t,Session:r,FriendlyDeviceName:s});Ro.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:Nt(Ve.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:Nt(Ve.ConfirmSignIn)},m)}throw new Le({name:To.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 VV({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:rK(t)},f=$n({username:e,userPoolId:o,userPoolClientId:a}),p={ChallengeName:"SELECT_MFA_TYPE",ChallengeResponses:c,Session:r,ClientMetadata:n,ClientId:a,UserContextData:f};return as({endpointResolver:bt({endpointOverride:u})})({region:yt(o),userAgentValue:Nt(Ve.ConfirmSignIn)},p)}async function KV({challengeResponse:t,clientMetadata:e,session:n,username:r,requiredAttributes:s,config:o}){const{userPoolId:a,userPoolClientId:u,userPoolEndpoint:c}=o,f={...tK(s),NEW_PASSWORD:t,USERNAME:r},p=$n({username:r,userPoolId:a,userPoolClientId:u}),g={ChallengeName:"NEW_PASSWORD_REQUIRED",ChallengeResponses:f,ClientMetadata:e,Session:n,ClientId:u,UserContextData:p};return as({endpointResolver:bt({endpointOverride:c})})({region:yt(a),userAgentValue:Nt(Ve.ConfirmSignIn)},g)}async function YV(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 p=$n({username:t,userPoolId:a,userPoolClientId:o}),g={AuthFlow:"USER_PASSWORD_AUTH",AuthParameters:c,ClientMetadata:n,ClientId:o,UserContextData:p},y=await Kh({endpointResolver:bt({endpointOverride:u})})({region:yt(a),userAgentValue:Nt(Ve.SignIn)},g),S=y.ChallengeParameters?.USERNAME??y.ChallengeParameters?.USER_ID_FOR_SRP??t;return Jl(S),y.ChallengeName==="DEVICE_SRP_AUTH"?Zh({username:S,config:r,clientMetadata:n,session:y.Session,tokenOrchestrator:s}):y}async function ZV(t,e,n,r,s){return C6({username:t,password:e,clientMetadata:n,config:r,tokenOrchestrator:s,authFlow:"USER_SRP_AUTH"})}async function XV(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=$n({username:t,userPoolId:o,userPoolClientId:s}),p={AuthFlow:"CUSTOM_AUTH",AuthParameters:u,ClientMetadata:e,ClientId:s,UserContextData:f},m=await Kh({endpointResolver:bt({endpointOverride:a})})({region:yt(o),userAgentValue:Nt(Ve.SignIn)},p),y=m.ChallengeParameters?.USERNAME??t;return Jl(y),m.ChallengeName==="DEVICE_SRP_AUTH"?Zh({username:y,config:n,clientMetadata:e,session:m.Session,tokenOrchestrator:r}):m}async function QV(t,e,n,r,s){lt(r);const{userPoolId:o,userPoolClientId:a,userPoolEndpoint:u}=r,c=o?.split("_")[1]||"",f=await Yh(c),p={USERNAME:t,SRP_A:f.A.toString(16),CHALLENGE_NAME:"SRP_A"},g=$n({username:t,userPoolId:o,userPoolClientId:a}),m={AuthFlow:"CUSTOM_AUTH",AuthParameters:p,ClientMetadata:n,ClientId:a,UserContextData:g},y=Kh({endpointResolver:bt({endpointOverride:u})}),{ChallengeParameters:S,Session:E}=await y({region:yt(o),userAgentValue:Nt(Ve.SignIn)},m),C=S?.USERNAME??t;return Jl(C),sd(FA,[e,S,n,E,f,r,s],C,s)}async function eu(t){const{challengeName:e,challengeParameters:n,availableChallenges:r}=t,s=Ht.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}=Ro.getState(),u=_M(AM(n.MFAS_CAN_SETUP))||[],c=oK(u),f=c.includes("TOTP"),p=c.includes("EMAIL");if(f&&p)return{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION",allowedMFATypes:c}};if(p)return{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_EMAIL_SETUP"}};if(f){const g=hG({endpointResolver:bt({endpointOverride:s.userPoolEndpoint})}),{Session:m,SecretCode:y}=await g({region:yt(s.userPoolId)},{Session:o});return Ro.dispatch({type:"SET_SIGN_IN_SESSION",value:m}),{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_TOTP_SETUP",totpSetupDetails:JV(y,a)}}}throw new Le({name:To.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:eK(n.requiredAttributes)}};case"SELECT_MFA_TYPE":return{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_MFA_SELECTION",allowedMFATypes:_M(AM(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 LV(n);return qV(o)?o:eu(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:To.SignInException,message:`An error occurred during the sign in process. ${e} challengeName returned by the underlying service was not addressed.`})}function JV(t,e){return{sharedSecret:t,getSetupUri:(n,r)=>{const s=`otpauth://totp/${n}:${r??e}?secret=${t}&issuer=${n}`;return new Wa(s)}}}function od(t){if(t===gv.PasswordResetRequiredException)return{isSignedIn:!1,nextStep:{signInStep:"RESET_PASSWORD"}};if(t===gv.UserNotConfirmedException)return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_UP"}}}function eK(t){return t?JSON.parse(t).map(n=>n.includes(Px)?n.replace(Px,""):n):[]}function tK(t){if(!t)return{};const e={};return Object.entries(t).forEach(([n,r])=>{r&&(e[`${Px}${n}`]=r)}),e}async function nK(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:{}}:BV({username:t,session:n,selectedChallenge:r,config:s,clientMetadata:a});case"SELECT_MFA_TYPE":return VV({challengeResponse:r,clientMetadata:a,session:n,username:t,config:s});case"MFA_SETUP":return GV({challengeResponse:r,clientMetadata:a,session:n,username:t,deviceName:f,config:s});case"NEW_PASSWORD_REQUIRED":return KV({challengeResponse:r,clientMetadata:a,session:n,username:t,requiredAttributes:c,config:s});case"CUSTOM_CHALLENGE":return sd(WV,[{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 iK({challengeName:e,challengeResponse:r,clientMetadata:a,session:n,username:t,config:s,tokenOrchestrator:o});case"PASSWORD":return HV(t,r,a,s,n);case"PASSWORD_SRP":return $V(t,r,a,s,n,o)}throw new Le({name:To.SignInException,message:`An error occurred during the sign in process.
@@ -145,7 +145,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
145
145
  .ptr__loader {
146
146
  margin: 0 auto;
147
147
  text-align: center;
148
- }`;H8(PJ);var eAe=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?z.createElement(NJ,null):u,f=t.pullingContent,p=f===void 0?z.createElement(MJ,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,_=t.resistance,T=_===void 0?1:_,R=t.backgroundColor,M=t.className,O=M===void 0?"":M,I=A.useRef(null),P=A.useRef(null),k=A.useRef(null),H=A.useRef(null),F=!1,j=!1,W=!1,Y=0,ne=0;A.useEffect(function(){if(!(!n||!P||!P.current)){var V=P.current;return V.addEventListener("touchstart",fe,{passive:!0}),V.addEventListener("mousedown",fe),V.addEventListener("touchmove",de,{passive:!1}),V.addEventListener("mousemove",de),window.addEventListener("scroll",Ae),V.addEventListener("touchend",L),V.addEventListener("mouseup",L),document.body.addEventListener("mouseleave",L),function(){V.removeEventListener("touchstart",fe),V.removeEventListener("mousedown",fe),V.removeEventListener("touchmove",de),V.removeEventListener("mousemove",de),window.removeEventListener("scroll",Ae),V.removeEventListener("touchend",L),V.removeEventListener("mouseup",L),document.body.removeEventListener("mouseleave",L)}}},[g,n,o,y,w,s,E]),A.useEffect(function(){var V;if(!((V=I)===null||V===void 0)&&V.current){var K=I.current.classList.contains("ptr--fetch-more-treshold-breached");K||s&&$()<E&&a&&(I.current.classList.add("ptr--fetch-more-treshold-breached"),j=!0,a().then(ee).catch(ee))}},[s,g]);var $=function(){if(!P||!P.current)return-1;var V=window.scrollY,K=P.current.scrollHeight;return K-V-window.innerHeight},ee=function(){requestAnimationFrame(function(){P.current&&(P.current.style.overflowX="hidden",P.current.style.overflowY="auto",P.current.style.transform="unset"),k.current&&(k.current.style.opacity="0"),I.current&&(I.current.classList.remove("ptr--pull-down-treshold-breached"),I.current.classList.remove("ptr--dragging"),I.current.classList.remove("ptr--fetch-more-treshold-breached")),F&&(F=!1),j&&(j=!1)})},fe=function(V){W=!1,V instanceof MouseEvent&&(Y=V.pageY),window.TouchEvent&&V instanceof TouchEvent&&(Y=V.touches[0].pageY),ne=Y,!(V.type==="touchstart"&&B8(V.target,yh.UP))&&(P.current.getBoundingClientRect().top<0||(W=!0))},de=function(V){if(W){if(window.TouchEvent&&V instanceof TouchEvent?ne=V.touches[0].pageY:ne=V.pageY,I.current.classList.add("ptr--dragging"),ne<Y){W=!1;return}V.cancelable&&V.preventDefault();var K=Math.min((ne-Y)/T,w);K>=y&&(W=!0,F=!0,I.current.classList.remove("ptr--dragging"),I.current.classList.add("ptr--pull-down-treshold-breached")),!(K>=w)&&(k.current.style.opacity=(K/65).toString(),P.current.style.overflow="visible",P.current.style.transform="translate(0px, "+K+"px)",k.current.style.visibility="visible")}},Ae=function(V){j||s&&$()<E&&a&&(j=!0,I.current.classList.add("ptr--fetch-more-treshold-breached"),a().then(ee).catch(ee))},L=function(){if(W=!1,Y=0,ne=0,!F){k.current&&(k.current.style.visibility="hidden"),ee();return}P.current&&(P.current.style.overflow="visible",P.current.style.transform="translate(0px, "+y+"px)"),o().then(ee).catch(ee)};return z.createElement("div",{className:"ptr "+O,style:{backgroundColor:R},ref:I},z.createElement("div",{className:"ptr__pull-down",ref:k},z.createElement("div",{className:"ptr__loader ptr__pull-down--loading"},c),z.createElement("div",{className:"ptr__pull-down--pull-more"},p)),z.createElement("div",{className:"ptr__children",ref:P},g,z.createElement("div",{className:"ptr__fetch-more",ref:H},z.createElement("div",{className:"ptr__loader ptr__fetch-more--loading"},c))))};const kJ=()=>D.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:[D.jsx("div",{className:"mb-3 h-6 w-24 rounded bg-surface-sunken"}),Array.from({length:6}).map((t,e)=>D.jsxs("div",{className:"flex items-center gap-2 py-1.5",children:[D.jsx("div",{className:"size-5 shrink-0 rounded bg-surface-sunken"}),D.jsx("div",{className:"h-3.5 flex-1 rounded bg-surface-sunken"})]},e))]}),DJ=()=>D.jsx("div",{className:"min-w-0 flex-1",children:Array.from({length:8}).map((t,e)=>D.jsxs("div",{className:"flex items-start gap-3 border-b border-line py-2 pl-5 pr-4",children:[D.jsx("div",{className:"mt-0.5 size-7 shrink-0 rounded-full bg-surface-sunken"}),D.jsxs("div",{className:"flex-1 space-y-1.5",children:[D.jsxs("div",{className:"flex justify-between gap-2",children:[D.jsx("div",{className:"h-3.5 w-28 rounded bg-surface-sunken"}),D.jsx("div",{className:"h-3 w-12 rounded bg-surface-sunken"})]}),D.jsx("div",{className:"h-3.5 w-48 rounded bg-surface-sunken"}),D.jsx("div",{className:"h-3 w-full rounded bg-surface-sunken"})]})]},e))}),KA=()=>D.jsxs("div",{className:"flex h-dvh animate-pulse bg-canvas","aria-hidden":"true",children:[D.jsx(kJ,{}),D.jsx(DJ,{})]}),YA="cc12f1400661cc1a8dd159c7c2eb8e32f84e534f",LJ="2026-07-20T22:32:17.625Z",UJ=YA.slice(0,7),tAe=`https://github.com/remit-mail/reader/commit/${YA}`,FJ="https://github.com/remit-mail/reader/issues/new";class Wx extends Error{constructor(e,n,r){super(e),this.status=n,this.body=r,this.name="ApiError"}status;body}const ad=t=>{if(t instanceof Wx)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}},$8=t=>ad(t)!==void 0,Ny=t=>{const e=ad(t);return e!==void 0&&e>=500&&e<=599},My=t=>!!(typeof DOMException<"u"&&t instanceof DOMException&&t.name==="AbortError"||t&&typeof t=="object"&&"name"in t&&t.name==="AbortError"),zJ=()=>typeof navigator<"u"&&navigator.onLine===!1,q8=t=>My(t)||$8(t)?!1:t instanceof Y6?!0:zJ(),jJ=t=>!$8(t)&&!My(t)&&!q8(t),W8=t=>Ny(t)||jJ(t),BJ=t=>t?.softError===!0,G8=(t,e)=>Ny(t)?!0:My(t)||q8(t)?!1:W8(t)?!0:!BJ(e),HJ=t=>Ny(t),Gx=new Set;let V8=null,K8=null;const $J=t=>{K8=t},qJ=t=>t instanceof Error?t:new Error(Y8(t)),Y8=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.",WJ=()=>typeof globalThis.crypto<"u"&&typeof globalThis.crypto.randomUUID=="function"?globalThis.crypto.randomUUID():`fatal-${Date.now()}-${Math.random().toString(36).slice(2,10)}`,zl=(t,e)=>{const n={error:t,message:Y8(t),correlationId:WJ(),at:Date.now(),recoverable:e?.recoverable??HJ(t),stack:t instanceof Error?t.stack:void 0,componentStack:e?.componentStack};V8=n,XJ(`Fatal: ${n.message} [${n.correlationId}]`),K8?.recordError(qJ(t),{fatal:"true",correlationId:n.correlationId});for(const r of Gx)r(n);return n},GJ=t=>(Gx.add(t),()=>{Gx.delete(t)}),VJ=()=>V8,KJ=20,Ym=[],YJ=new Set(["ResizeObserver loop limit exceeded","ResizeObserver loop completed with undelivered notifications"]);function ZJ(t){return typeof t!="string"?!1:YJ.has(t.replace(/\.\s*$/,""))}function Zm(t){Ym.push(t),Ym.length>KJ&&Ym.shift()}function XJ(t){Zm(t)}function QJ(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 JJ(){const t=console.error.bind(console);console.error=(...e)=>{Zm(QJ(e)),t(...e)},window.addEventListener("error",e=>{ZJ(e.message)||(Zm(`Uncaught ${e.error instanceof Error?`${e.error.name}: ${e.error.message}`:String(e.message)} (${e.filename}:${e.lineno})`),zl(e.error??e.message))}),window.addEventListener("unhandledrejection",e=>{const n=e.reason,r=n instanceof Error?`${n.name}: ${n.message}`:String(n);Zm(`Unhandled rejection: ${r}`),zl(n)})}function eee(){return Ym.slice()}const iS=7500,wP=`
148
+ }`;H8(PJ);var eAe=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?z.createElement(NJ,null):u,f=t.pullingContent,p=f===void 0?z.createElement(MJ,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,_=t.resistance,T=_===void 0?1:_,R=t.backgroundColor,M=t.className,O=M===void 0?"":M,I=A.useRef(null),P=A.useRef(null),k=A.useRef(null),H=A.useRef(null),F=!1,j=!1,W=!1,Y=0,ne=0;A.useEffect(function(){if(!(!n||!P||!P.current)){var V=P.current;return V.addEventListener("touchstart",fe,{passive:!0}),V.addEventListener("mousedown",fe),V.addEventListener("touchmove",de,{passive:!1}),V.addEventListener("mousemove",de),window.addEventListener("scroll",Ae),V.addEventListener("touchend",L),V.addEventListener("mouseup",L),document.body.addEventListener("mouseleave",L),function(){V.removeEventListener("touchstart",fe),V.removeEventListener("mousedown",fe),V.removeEventListener("touchmove",de),V.removeEventListener("mousemove",de),window.removeEventListener("scroll",Ae),V.removeEventListener("touchend",L),V.removeEventListener("mouseup",L),document.body.removeEventListener("mouseleave",L)}}},[g,n,o,y,w,s,E]),A.useEffect(function(){var V;if(!((V=I)===null||V===void 0)&&V.current){var K=I.current.classList.contains("ptr--fetch-more-treshold-breached");K||s&&$()<E&&a&&(I.current.classList.add("ptr--fetch-more-treshold-breached"),j=!0,a().then(ee).catch(ee))}},[s,g]);var $=function(){if(!P||!P.current)return-1;var V=window.scrollY,K=P.current.scrollHeight;return K-V-window.innerHeight},ee=function(){requestAnimationFrame(function(){P.current&&(P.current.style.overflowX="hidden",P.current.style.overflowY="auto",P.current.style.transform="unset"),k.current&&(k.current.style.opacity="0"),I.current&&(I.current.classList.remove("ptr--pull-down-treshold-breached"),I.current.classList.remove("ptr--dragging"),I.current.classList.remove("ptr--fetch-more-treshold-breached")),F&&(F=!1),j&&(j=!1)})},fe=function(V){W=!1,V instanceof MouseEvent&&(Y=V.pageY),window.TouchEvent&&V instanceof TouchEvent&&(Y=V.touches[0].pageY),ne=Y,!(V.type==="touchstart"&&B8(V.target,yh.UP))&&(P.current.getBoundingClientRect().top<0||(W=!0))},de=function(V){if(W){if(window.TouchEvent&&V instanceof TouchEvent?ne=V.touches[0].pageY:ne=V.pageY,I.current.classList.add("ptr--dragging"),ne<Y){W=!1;return}V.cancelable&&V.preventDefault();var K=Math.min((ne-Y)/T,w);K>=y&&(W=!0,F=!0,I.current.classList.remove("ptr--dragging"),I.current.classList.add("ptr--pull-down-treshold-breached")),!(K>=w)&&(k.current.style.opacity=(K/65).toString(),P.current.style.overflow="visible",P.current.style.transform="translate(0px, "+K+"px)",k.current.style.visibility="visible")}},Ae=function(V){j||s&&$()<E&&a&&(j=!0,I.current.classList.add("ptr--fetch-more-treshold-breached"),a().then(ee).catch(ee))},L=function(){if(W=!1,Y=0,ne=0,!F){k.current&&(k.current.style.visibility="hidden"),ee();return}P.current&&(P.current.style.overflow="visible",P.current.style.transform="translate(0px, "+y+"px)"),o().then(ee).catch(ee)};return z.createElement("div",{className:"ptr "+O,style:{backgroundColor:R},ref:I},z.createElement("div",{className:"ptr__pull-down",ref:k},z.createElement("div",{className:"ptr__loader ptr__pull-down--loading"},c),z.createElement("div",{className:"ptr__pull-down--pull-more"},p)),z.createElement("div",{className:"ptr__children",ref:P},g,z.createElement("div",{className:"ptr__fetch-more",ref:H},z.createElement("div",{className:"ptr__loader ptr__fetch-more--loading"},c))))};const kJ=()=>D.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:[D.jsx("div",{className:"mb-3 h-6 w-24 rounded bg-surface-sunken"}),Array.from({length:6}).map((t,e)=>D.jsxs("div",{className:"flex items-center gap-2 py-1.5",children:[D.jsx("div",{className:"size-5 shrink-0 rounded bg-surface-sunken"}),D.jsx("div",{className:"h-3.5 flex-1 rounded bg-surface-sunken"})]},e))]}),DJ=()=>D.jsx("div",{className:"min-w-0 flex-1",children:Array.from({length:8}).map((t,e)=>D.jsxs("div",{className:"flex items-start gap-3 border-b border-line py-2 pl-5 pr-4",children:[D.jsx("div",{className:"mt-0.5 size-7 shrink-0 rounded-full bg-surface-sunken"}),D.jsxs("div",{className:"flex-1 space-y-1.5",children:[D.jsxs("div",{className:"flex justify-between gap-2",children:[D.jsx("div",{className:"h-3.5 w-28 rounded bg-surface-sunken"}),D.jsx("div",{className:"h-3 w-12 rounded bg-surface-sunken"})]}),D.jsx("div",{className:"h-3.5 w-48 rounded bg-surface-sunken"}),D.jsx("div",{className:"h-3 w-full rounded bg-surface-sunken"})]})]},e))}),KA=()=>D.jsxs("div",{className:"flex h-dvh animate-pulse bg-canvas","aria-hidden":"true",children:[D.jsx(kJ,{}),D.jsx(DJ,{})]}),YA="b0df34d7d8be7544e2a199327255edc77b0b4193",LJ="2026-07-20T22:36:47.054Z",UJ=YA.slice(0,7),tAe=`https://github.com/remit-mail/reader/commit/${YA}`,FJ="https://github.com/remit-mail/reader/issues/new";class Wx extends Error{constructor(e,n,r){super(e),this.status=n,this.body=r,this.name="ApiError"}status;body}const ad=t=>{if(t instanceof Wx)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}},$8=t=>ad(t)!==void 0,Ny=t=>{const e=ad(t);return e!==void 0&&e>=500&&e<=599},My=t=>!!(typeof DOMException<"u"&&t instanceof DOMException&&t.name==="AbortError"||t&&typeof t=="object"&&"name"in t&&t.name==="AbortError"),zJ=()=>typeof navigator<"u"&&navigator.onLine===!1,q8=t=>My(t)||$8(t)?!1:t instanceof Y6?!0:zJ(),jJ=t=>!$8(t)&&!My(t)&&!q8(t),W8=t=>Ny(t)||jJ(t),BJ=t=>t?.softError===!0,G8=(t,e)=>Ny(t)?!0:My(t)||q8(t)?!1:W8(t)?!0:!BJ(e),HJ=t=>Ny(t),Gx=new Set;let V8=null,K8=null;const $J=t=>{K8=t},qJ=t=>t instanceof Error?t:new Error(Y8(t)),Y8=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.",WJ=()=>typeof globalThis.crypto<"u"&&typeof globalThis.crypto.randomUUID=="function"?globalThis.crypto.randomUUID():`fatal-${Date.now()}-${Math.random().toString(36).slice(2,10)}`,zl=(t,e)=>{const n={error:t,message:Y8(t),correlationId:WJ(),at:Date.now(),recoverable:e?.recoverable??HJ(t),stack:t instanceof Error?t.stack:void 0,componentStack:e?.componentStack};V8=n,XJ(`Fatal: ${n.message} [${n.correlationId}]`),K8?.recordError(qJ(t),{fatal:"true",correlationId:n.correlationId});for(const r of Gx)r(n);return n},GJ=t=>(Gx.add(t),()=>{Gx.delete(t)}),VJ=()=>V8,KJ=20,Ym=[],YJ=new Set(["ResizeObserver loop limit exceeded","ResizeObserver loop completed with undelivered notifications"]);function ZJ(t){return typeof t!="string"?!1:YJ.has(t.replace(/\.\s*$/,""))}function Zm(t){Ym.push(t),Ym.length>KJ&&Ym.shift()}function XJ(t){Zm(t)}function QJ(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 JJ(){const t=console.error.bind(console);console.error=(...e)=>{Zm(QJ(e)),t(...e)},window.addEventListener("error",e=>{ZJ(e.message)||(Zm(`Uncaught ${e.error instanceof Error?`${e.error.name}: ${e.error.message}`:String(e.message)} (${e.filename}:${e.lineno})`),zl(e.error??e.message))}),window.addEventListener("unhandledrejection",e=>{const n=e.reason,r=n instanceof Error?`${n.name}: ${n.message}`:String(n);Zm(`Unhandled rejection: ${r}`),zl(n)})}function eee(){return Ym.slice()}const iS=7500,wP=`
149
149
  … (truncated — the copy action on this screen has the full report)`;function xP(t){return{appSha:YA,appShortSha:UJ,appBuildTime:LJ,userAgent:navigator.userAgent,viewport:`${window.innerWidth}×${window.innerHeight}`,timestamp:new Date().toISOString(),timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,href:window.location.href,recentErrors:eee(),errorMessage:t?.errorMessage,stack:t?.stack,componentStack:t?.componentStack,quarantine:t?.quarantine,title:t?.title}}function aS(t){return["```",t,"```"].join(`
150
150
  `)}function Z8(t,e){const n=t.recentErrors.length>0?t.recentErrors.map(o=>` - ${o}`).join(`
151
151
  `):" (none)",r=["## Environment",`- **Version**: [\`${t.appShortSha}\`](https://github.com/remit-mail/reader/commit/${t.appSha}) built ${t.appBuildTime}`,`- **Browser**: ${t.userAgent}`,`- **Viewport**: ${t.viewport}`,`- **Time**: ${t.timestamp} (${t.timezone})`,"","## URL",t.href,""];if(t.errorMessage&&r.push("## Error",t.errorMessage,""),t.quarantine){const o=e?.quarantineStructure??t.quarantine.structure;r.push(t.quarantine.head,"",aS(o),"",t.quarantine.disclaimer,"")}const s=e?.stack??t.stack;return s&&r.push("## Stacktrace",aS(s),""),t.componentStack&&r.push("## Component stack",aS(t.componentStack),""),r.push("## Recent console errors",n,"","## Steps to reproduce","1. ","","## Expected behaviour","","## Actual behaviour",""),r.join(`
@@ -213,7 +213,7 @@ Make sure your charset is UTF-8`);o=(o>>>8&255)*192+(o&255),r.put(o,13)}},Ow=n,O
213
213
  The chosen QR Code version cannot contain this amount of data.
214
214
  Minimum version required to store current data is: `+F+`.
215
215
  `);const j=T(I,P,H),W=t.getSymbolSize(I),Y=new r(W);return y(Y,I),S(Y),E(Y,I),w(Y,P,0),I>=7&&C(Y,I),_(Y,j),isNaN(k)&&(k=a.getBestMask(Y,w.bind(null,Y,P))),a.applyMask(k,Y),w(Y,P,k),{modules:Y,version:I,errorCorrectionLevel:P,maskPattern:k,segments:H}}return fw.create=function(I,P){if(typeof I>"u"||I==="")throw new Error("No input text");let k=e.M,H,F;return typeof P<"u"&&(k=e.from(P.errorCorrectionLevel,e.M),H=f.from(P.version),F=a.from(P.maskPattern),P.toSJISFunc&&t.setToSJISFunction(P.toSJISFunc)),M(I,H,k,F)},fw}var Mw={},Pw={},yL;function RF(){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),p=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>=p&&y>=p&&m<f-p&&y<f-p){const C=Math.floor((m-p)/c),w=Math.floor((y-p)/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}}})(Pw)),Pw}var bL;function ece(){return bL||(bL=1,(function(t){const e=RF();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 p=e.getImageWidth(o.modules.size,c),g=f.getContext("2d"),m=g.createImageData(p,p);return e.qrToImageData(m.data,o,c),n(g,f,p),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),p=c.type||"image/png",g=c.rendererOpts||{};return f.toDataURL(p,g.quality)}})(Mw)),Mw}var kw={},SL;function tce(){if(SL)return kw;SL=1;const t=RF();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,p=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]?(p++,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",p),p=0)):c++}return u}return kw.render=function(o,a,u){const c=t.getOptions(a),f=o.modules.size,p=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(p,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},kw}var EL;function nce(){if(EL)return ec;EL=1;const t=Due(),e=Jue(),n=ece(),r=tce();function s(o,a,u,c,f){const p=[].slice.call(arguments,1),g=p.length,m=typeof p[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 ec.create=e.create,ec.toCanvas=s.bind(null,n.render),ec.toDataURL=s.bind(null,n.renderToDataURL),ec.toString=s.bind(null,function(o,a,u){return r.render(o,u)}),ec}var rce=nce();const sce=qa(rce),oce=t=>t==="signIn"||t==="signUp",WT=t=>!!t&&(t==="EMAIL_OTP"||t==="SMS_MFA"),{getConfirmText:ice,getConfirmingText:ace,getBackToSignInText:lce,getResendCodeText:uce}=kn,sb=()=>{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=WT(n)&&a&&r;return z.createElement(Fe,{direction:"column"},z.createElement(Jt,{isDisabled:t,type:"submit",variation:"primary",isLoading:t,loadingText:ace()},ice()),u&&z.createElement(Jt,{onClick:r,type:"button"},uce()),z.createElement(Jt,{onClick:e,type:"button",variation:"link",size:"small"},lce()))},cce=new rr("SetupTotp-logger"),{getSetupTotpText:dce,getCopiedText:fce,getLoadingText:hce}=kn,Ua=({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=Ua.Header,Footer:f=Ua.Footer}}}=cs(),[p,g]=A.useState(!0),[m,y]=A.useState(),[S,E]=A.useState("COPY"),{totpIssuer:C="AWSCognito",totpUsername:w=s}=o??{},_=A.useCallback(async()=>{try{const R=rre(C,w,n),M=await sce.toDataURL(R);y(M)}catch(R){cce.error(R)}finally{g(!1)}},[C,w,n]);A.useEffect(()=>{m||_()},[_,m]);const T=()=>{navigator.clipboard.writeText(n),E(fce())};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"},p?A.createElement("p",null,hce(),"…"):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(Mo,null),A.createElement(Gr,null)),A.createElement(sb,null),A.createElement(f,null))))};Ua.Header=function(){return A.createElement(_r,{level:3},dce())};Ua.Footer=function(){return null};const{getSubmitText:pce,getSubmittingText:gce}=kn,ob=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?z.createElement(z.Fragment,null,gce(),"…"):z.createElement(z.Fragment,null,pce()),p=r??f;return z.createElement(Fe,{direction:"column"},z.createElement(Jt,{variation:"primary",isDisabled:s,type:"submit"},p),z.createElement(Fe,{direction:"column",alignItems:"center"},z.createElement(Jt,{onClick:c,type:"button",variation:"link",size:"small"},n)))},mce=()=>z.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"},z.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"})),vce=()=>z.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"},z.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"}),z.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"}),z.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"}),z.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"})),yce=()=>z.createElement(lF,{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"}),bce=()=>z.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"},z.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"}),z.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"})),Qg=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=z.createElement(yce,null):e==="google"?a=z.createElement(vce,null):e==="amazon"?a=z.createElement(bce,null):e==="apple"&&(a=z.createElement(mce,null)),z.createElement(Jt,{onClick:o,className:"federated-sign-in-button",gap:"1rem"},a,z.createElement(Ts,{as:"span"},r))},{getSignInWithFederationText:Jg,getOrText:Sce}=kn;function IF(){const{route:t,socialProviders:e}=St(({route:n,socialProviders:r})=>[n,r]);return e.length===0?null:z.createElement(Fe,{direction:"column",padding:"0 0 1rem 0",className:"federated-sign-in-container"},e.map(n=>{switch(n){case"amazon":return z.createElement(Qg,{icon:"amazon",key:n,provider:bc.Amazon,text:Jg(t,n)});case"apple":return z.createElement(Qg,{icon:"apple",key:n,provider:bc.Apple,text:Jg(t,n)});case"facebook":return z.createElement(Qg,{icon:"facebook",key:n,provider:bc.Facebook,text:Jg(t,n)});case"google":return z.createElement(Qg,{icon:"google",key:n,provider:bc.Google,text:Jg(t,n)});default:console.error(`Authenticator does not support ${n}. Please open an issue: https://github.com/aws-amplify/amplify-ui/issues/choose`)}}),z.createElement(LT,{size:"small",label:Sce()}))}const{getSignInText:em,getSigningInText:Ece,getForgotPasswordText:Cce,getSignInWithEmailText:wce,getSignInWithSmsText:xce,getSignInWithPasskeyText:_ce,getOtherSignInOptionsText:Ace,getEnterUsernameFirstText:Tce}=kn;function Si(){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]=z.useState(""),{components:{SignIn:{Header:c=Si.Header,Footer:f=Si.Footer}}}=cs(),g=e&&e.length>1&&n,m=a.trim().length>0,y=z.useCallback(w=>{const{name:_,value:T}=w.target;_==="username"&&typeof T=="string"&&u(T),s(w)},[s]),S=()=>{if(!n)return em();switch(n){case"EMAIL_OTP":return wce();case"SMS_OTP":return xce();case"WEB_AUTHN":return _ce();default:return em()}},E=w=>{w.preventDefault(),o(w)},C=w=>{w.preventDefault(),r()};return z.createElement($e,null,z.createElement(c,null),z.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-signin":"",method:"post",onSubmit:g?E:o,onChange:y},z.createElement(IF,null),z.createElement(Fe,{direction:"column"},z.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:t},z.createElement(nb,null,z.createElement("legend",null,em())),z.createElement(Mo,null)),z.createElement(Gr,null),z.createElement(Jt,{isDisabled:t,type:"submit",variation:"primary",isLoading:t,loadingText:Ece()},g?S():em()),g&&z.createElement(Jt,{onClick:C,size:"small",variation:"link",isDisabled:t||!m,title:m?void 0:Tce()},Ace()),z.createElement(f,null))))}const Rce=()=>{const{toForgotPassword:t}=St(e=>[e.toForgotPassword]);return z.createElement($e,{"data-amplify-footer":""},z.createElement(Jt,{onClick:t,size:"small",variation:"link"},Cce()))};Si.Footer=Rce;Si.Header=function(){return null};const{getCreateAccountText:CL,getCreatingAccountText:Ice,getCreateAccountWithEmailText:Oce,getCreateAccountWithPasswordText:Nce,getCreateAccountWithSmsText:Mce,getOrText:Pce}=kn;function Xs(){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=Xs.Header,FormFields:f=Xs.FormFields,Footer:p=Xs.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 Oce();case"SMS_OTP":return Mce();case"PASSWORD":return m?Nce():CL();default:return CL()}},_=T=>R=>{R.preventDefault();const M=R.target.closest("form");if(M){if(!M.__authMethod){const O=document.createElement("input");O.name="__authMethod",M.appendChild(O)}M.__authMethod.type="hidden",M.__authMethod.value=T,M.requestSubmit()}};return z.createElement($e,null,z.createElement(c,null),z.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-signup":"",method:"post",onChange:o,onSubmit:u,onBlur:a},z.createElement(IF,null),z.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:e},z.createElement(Fe,{direction:"column"},z.createElement(f,{includePassword:!C}),z.createElement(Gr,null)),z.createElement(Jt,{isDisabled:(!m||S.length==0)&&t||e,isFullWidth:!0,type:"submit",variation:"primary",isLoading:e,loadingText:Ice(),onClick:_(y)},w(y)),m&&S.length>0&&z.createElement(z.Fragment,null,z.createElement(Fe,{justifyContent:"center",padding:"medium 0"},Pce()),S.map(T=>z.createElement(Jt,{key:T,isDisabled:e,isFullWidth:!0,type:"button",variation:"primary",onClick:_(T)},w(T)))),z.createElement(p,null))))}Xs.Header=function(){return null};Xs.FormFields=function(){return z.createElement(Mo,null)};Xs.Footer=function(){return null};const{getSignInTabText:kce,getSignUpTabText:Dce}=kn,Lce=({className:t,hideSignUp:e,variation:n})=>{const{route:r,toSignIn:s,toSignUp:o}=St(a=>[a.route,a.toSignIn,a.toSignUp]);return z.createElement(qr,{className:t,variation:n},e?z.createElement($e,{"data-amplify-router-content":""},r==="signIn"&&z.createElement(Si,null)):z.createElement(Sl.Container,{value:r,isLazy:!0,onValueChange:a=>{a!==r&&(a==="signIn"?s():o())}},z.createElement(Sl.List,{spacing:"equal",indicatorPosition:"top"},z.createElement(Sl.Item,{value:"signIn"},kce()),z.createElement(Sl.Item,{value:"signUp"},Dce())),z.createElement(Sl.Panel,{value:"signIn","data-amplify-router-content":""},z.createElement(Si,null)),z.createElement(Sl.Panel,{value:"signUp","data-amplify-router-content":""},z.createElement(Xs,null))))},{getAccountRecoveryInfoText:Uce,getSkipText:Fce}=kn,Hl=({className:t,variation:e})=>{const{isPending:n}=St(u=>[u.isPending]),{handleChange:r,handleSubmit:s}=ds(),{components:{ConfirmVerifyUser:{Header:o=Hl.Header,Footer:a=Hl.Footer}}}=cs();return z.createElement(qr,{className:t,variation:e},z.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-confirmverifyuser":"",method:"post",onChange:r,onSubmit:s},z.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:n},z.createElement(o,null),z.createElement(Fe,{direction:"column"},z.createElement(Mo,null)),z.createElement(Gr,null),z.createElement(ob,{cancelButtonText:Fce(),cancelButtonSendType:"SKIP"}),z.createElement(a,null))))};Hl.Header=function(){return z.createElement(_r,{level:3},Uce())};Hl.Footer=function(){return null};const{getSkipText:zce,getVerifyText:jce,getVerifyContactText:Bce,getAccountRecoveryInfoText:Hce}=kn,$ce=t=>Object.entries(t).map(([e,n],r)=>{const s=Wy[e].label;return z.createElement(FT,{name:"unverifiedAttr",value:e,key:e,defaultChecked:r===0},ye(s),":"," ",tre(s,n))}),$l=({className:t,variation:e})=>{const{components:{VerifyUser:{Header:n=$l.Header,Footer:r=$l.Footer}}}=cs(),{isPending:s,unverifiedUserAttributes:o}=St(({isPending:p,unverifiedUserAttributes:g})=>[p,g]),{handleChange:a,handleSubmit:u}=ds(),c=s?z.createElement(z.Fragment,null,"Verifying…"):z.createElement(z.Fragment,null,jce()),f=z.createElement(zT,{legend:Bce(),name:"verify_context",isDisabled:s,legendHidden:!0},$ce(o));return z.createElement(qr,{className:t,variation:e},z.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-verifyuser":"",method:"post",onChange:a,onSubmit:u},z.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:s},z.createElement(n,null),f,z.createElement(Gr,null),z.createElement(ob,{cancelButtonText:zce(),cancelButtonSendType:"SKIP",submitButtonText:c}),z.createElement(r,null))))};$l.Header=function(){return z.createElement(_r,{level:3},Hce())};$l.Footer=function(){return null};const{getChallengeText:qce,getDeliveryMessageText:Wce,getDeliveryMethodText:Gce}=kn,ql=({className:t,variation:e})=>{const{isPending:n,challengeName:r,codeDeliveryDetails:s}=St(p=>[p.isPending,p.challengeName,p.codeDeliveryDetails]),{handleChange:o,handleSubmit:a}=ds(),{components:{ConfirmSignIn:{Header:u=ql.Header,Footer:c=ql.Footer}}}=cs(),f=WT(r)&&s;return z.createElement(qr,{className:t,variation:e},z.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-confirmsignin":"",method:"post",onChange:o,onSubmit:a},z.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:n},z.createElement(u,null),z.createElement(Fe,{direction:"column"},f&&z.createElement(Ts,{className:"amplify-authenticator__subtitle"},Wce(s)),z.createElement(Mo,null),z.createElement(Gr,null)),z.createElement(sb,null),z.createElement(c,null))))};function Vce(){const{challengeName:t,codeDeliveryDetails:e}=St(({challengeName:r,codeDeliveryDetails:s})=>[r,s]),n=WT(t)&&e;return z.createElement(z.Fragment,null,z.createElement(_r,{level:3},qce(t)),n&&z.createElement(_r,{level:5},Gce(e)))}ql.Header=Vce;ql.Footer=function(){return null};const{getResendCodeText:Kce,getResetYourPasswordText:Yce}=kn,Wl=({className:t,variation:e})=>{const{isPending:n}=St(c=>[c.isPending]),{handleBlur:r,handleChange:s,handleSubmit:o}=ds(),{components:{ConfirmResetPassword:{Header:a=Wl.Header,Footer:u=Wl.Footer}}}=cs();return z.createElement(qr,{className:t,variation:e},z.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-confirmresetpassword":"",method:"post",onSubmit:o,onChange:s,onBlur:r},z.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:n},z.createElement(a,null),z.createElement(Fe,{direction:"column"},z.createElement(Mo,null)),z.createElement(Gr,null),z.createElement(ob,{cancelButtonSendType:"RESEND",cancelButtonText:Kce()}),z.createElement(u,null))))};Wl.Header=function(){const e=Yce();return z.createElement(_r,{level:3},e)};Wl.Footer=function(){return null};const{getBackToSignInText:Zce,getSendingText:Xce,getSendCodeText:Qce,getResetYourPasswordText:Jce}=kn,Fa=({className:t,variation:e})=>{const{isPending:n}=St(u=>[u.isPending]),{handleChange:r,handleSubmit:s}=ds(),{components:{ForgotPassword:{Header:o=Fa.Header,Footer:a=Fa.Footer}}}=cs();return z.createElement(qr,{className:t,variation:e},z.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-forgotpassword":"",method:"post",onChange:r,onSubmit:s},z.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:n},z.createElement(o,null),z.createElement(Fe,{direction:"column"},z.createElement(Mo,null)),z.createElement(Gr,null),z.createElement(ob,{cancelButtonText:Zce(),cancelButtonSendType:"SIGN_IN",submitButtonText:n?z.createElement(z.Fragment,null,Xce(),"…"):z.createElement(z.Fragment,null,Qce())}),z.createElement(a,null))))};Fa.Header=function(){return z.createElement(_r,{level:3},Jce())};Fa.Footer=function(){return null};const{getMfaTypeLabelByValue:ede,getSelectMfaTypeByChallengeName:tde,getSelectMfaTypeText:nde}=kn,za=({className:t,variation:e})=>{const{isPending:n,allowedMfaTypes:r=[]}=St(c=>[c.isPending,c.allowedMfaTypes]),{handleChange:s,handleSubmit:o}=ds(),{components:{SelectMfaType:{Header:a=za.Header,Footer:u=za.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(zT,{name:"mfa_type",legend:nde(),legendHidden:!0,isDisabled:n,isRequired:!0},r.map((c,f)=>A.createElement(FT,{name:"mfa_type",key:c,value:c,defaultChecked:f===0},ede(c)))),A.createElement(Gr,null)),A.createElement(sb,null),A.createElement(u,null))))};za.Header=function(){const{challengeName:e}=St(n=>[n.challengeName]);return A.createElement(_r,{level:3},tde(e))};za.Footer=function(){return null};const{getSetupEmailText:rde}=kn,ja=({className:t,variation:e})=>{const{isPending:n}=St(u=>[u.isPending]),{handleChange:r,handleSubmit:s}=ds(),{components:{SetupEmail:{Header:o=ja.Header,Footer:a=ja.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(Mo,null),A.createElement(Gr,null)),A.createElement(sb,null),A.createElement(a,null))))};ja.Header=function(){return A.createElement(_r,{level:3},rde())};ja.Footer=function(){return null};const{getSignInWithPasswordText:a_,getSignInWithEmailText:sde,getSignInWithSmsText:ode,getSignInWithPasskeyText:ide,getSigningInText:ade,getBackToSignInText:lde,getOrText:ude,getUsernameLabelByLoginMechanism:cde}=kn,dde=t=>{switch(t){case"EMAIL_OTP":return sde();case"SMS_OTP":return ode();case"WEB_AUTHN":return ide();case"PASSWORD":return a_();default:return a_()}},fde=({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(),p=s??[],g=p.includes("PASSWORD"),m=p.filter(E=>E!=="PASSWORD"),y=E=>{a({method:E})},S=cde(u);return z.createElement(qr,{className:t,variation:e},z.createElement("form",{"data-amplify-form":!0,"data-amplify-authenticator-signinselect":!0,method:"post",onSubmit:f,onChange:c},z.createElement(Fe,{direction:"column"},z.createElement(sp,{label:S,name:"username",value:r,isReadOnly:!0,isDisabled:!0}),g&&z.createElement(z.Fragment,null,z.createElement(UT,{label:"Password",name:"password",autoComplete:"current-password",isDisabled:n}),z.createElement(Jt,{isDisabled:n,type:"submit",variation:"primary",isFullWidth:!0,isLoading:n,loadingText:ade()},a_())),g&&m.length>0&&z.createElement(LT,{label:ude()}),m.length>0&&z.createElement(Fe,{direction:"column",gap:"0.5rem"},m.map(E=>z.createElement(Jt,{key:E,variation:"primary",isFullWidth:!0,isDisabled:n,onClick:()=>y(E)},dde(E)))),z.createElement(Gr,null),z.createElement(Jt,{onClick:o,size:"small",variation:"link",isDisabled:n},lde()))))},hde=t=>{const{className:e,...n}=t;return A.createElement($e,{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"})))},pde=t=>{const{className:e,...n}=t;return A.createElement($e,{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:gde,getPasskeyPromptDescriptionText:mde,getCreatePasskeyText:vde,getRegisteringText:yde,getContinueWithoutPasskeyText:bde,getPasskeyCreatedSuccessText:Sde,getPasskeyRegisteredText:Ede,getPasskeyRegistrationFailedText:Cde,getPasskeyLabelText:wde,getExistingPasskeysText:xde,getSetupAnotherPasskeyText:_de,getContinueText:Ade}=kn;function Tde({className:t,variation:e}){const[n,r]=z.useState(!1),[s,o]=z.useState(null),[a,u]=z.useState(!1),[c,f]=z.useState([]),{submitForm:p,isPending:g}=St(w=>[w.submitForm,w.isPending]),m=z.useCallback(async()=>{try{const w=await gT();f(w.credentials||[])}catch{}},[]);z.useEffect(()=>{n&&m()},[n,m]);const y=z.useCallback(()=>{p({type:"SKIP"})},[p]),S=z.useCallback(()=>{p({type:"SUBMIT"})},[p]),E=z.useCallback(async()=>{try{o(null),u(!0),await Cne(),r(!0)}catch(w){const _=w,T=_.name??"",R=_.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(Cde())}finally{u(!1)}},[y]);if(n)return z.createElement(qr,{className:t,variation:e},z.createElement(Fe,{direction:"column",padding:"large","data-amplify-authenticator-passkeyprompt":""},z.createElement(Fe,{direction:"column",gap:"xs"},z.createElement(hde,{className:"amplify-authenticator__passkey-success-icon"}),z.createElement(_r,{level:4},Sde()),z.createElement(Ts,null,Ede())),c.length>0&&z.createElement($e,{marginTop:"large"},z.createElement(_r,{level:5},xde()),z.createElement(Fe,{direction:"column",gap:"xs",marginTop:"xs"},c.map((w,_)=>z.createElement($e,{key:w.credentialId,className:"amplify-authenticator__passkey-credential-item"},z.createElement(Ts,{fontSize:"small"},w.friendlyCredentialName??`${wde()} ${_+1}`))))),z.createElement(Fe,{direction:"column",gap:"medium",marginTop:"large"},z.createElement(Jt,{onClick:()=>{r(!1),E()},variation:"link"},_de()),z.createElement(Jt,{onClick:()=>S(),variation:"primary",isFullWidth:!0},Ade()))));const C=g||a;return z.createElement(qr,{className:t,variation:e},z.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-passkeyprompt":""},z.createElement(Fe,{direction:"column",gap:"medium"},z.createElement(_r,{level:4},gde()),z.createElement(Ts,null,mde()),z.createElement(Fe,{justifyContent:"center"},z.createElement(pde,{className:"amplify-authenticator__passkey-icon"})),z.createElement(Fe,{direction:"column",gap:"medium"},z.createElement(Jt,{onClick:()=>{E()},variation:"primary",isDisabled:C,isLoading:a,loadingText:yde()},vde()),z.createElement(Jt,{onClick:y,variation:"link",isDisabled:C},bde()),s&&z.createElement(Ts,{className:"amplify-authenticator__passkey-error"},s),z.createElement(Gr,null)))))}function wL(){return null}const Rde=t=>{switch(t){case"authenticated":case"idle":case"setup":case"transition":return wL;case"confirmSignUp":return Bl;case"confirmSignIn":return ql;case"selectMfaType":return za;case"setupEmail":return ja;case"setupTotp":return Ua;case"signIn":case"signUp":return Lce;case"signInSelectAuthFactor":return fde;case"passkeyPrompt":return Tde;case"forceNewPassword":return Zs;case"forgotPassword":return Fa;case"confirmResetPassword":return Wl;case"verifyUser":return $l;case"confirmVerifyUser":return Hl;default:return console.warn(`Unhandled Authenticator route - please open an issue: ${t}`),wL}};function Ide({className:t,hideSignUp:e,variation:n}){const{route:r}=St(({route:o})=>[o]),s=A.useMemo(()=>Rde(r),[r]);return z.createElement(s,{className:t,hideSignUp:oce(r)?e:void 0,variation:n})}const Ode={Header:()=>null,SignIn:{Header:Si.Header,Footer:Si.Footer},SignUp:{Header:Xs.Header,FormFields:Xs.FormFields,Footer:Xs.Footer},ConfirmSignUp:{Header:Bl.Header,Footer:Bl.Footer},SelectMfaType:{Header:za.Header,Footer:za.Footer},SetupEmail:{Header:ja.Header,Footer:ja.Footer},SetupTotp:{Header:Ua.Header,Footer:Ua.Footer},ConfirmResetPassword:{Header:Wl.Header,Footer:Wl.Footer},ConfirmSignIn:{Header:ql.Header,Footer:ql.Footer},VerifyUser:{Header:$l.Header,Footer:$l.Footer},ConfirmVerifyUser:{Header:Hl.Header,Footer:Hl.Footer},ForceNewPassword:{Header:Zs.Header,Footer:Zs.Footer,FormFields:Zs.FormFields},ForgotPassword:{Header:Fa.Header,Footer:Fa.Footer},Footer:()=>null};function Nde({children:t,className:e,components:n,formFields:r,hideSignUp:s,initialState:o,loginMechanisms:a,passwordSettings:u,passwordless:c,signUpAttributes:f,services:p,socialProviders:g,variation:m}){_ue({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:_,signOut:T,user:R})=>[_,T,R]);nle({initialState:o,loginMechanisms:a,passwordSettings:u,passwordless:c,services:p,signUpAttributes:f,socialProviders:g,formFields:r});const C=A.useMemo(()=>({components:{...Ode,...n}}),[n]);return y==="authenticated"||y==="signOut"?t?A.createElement(A.Fragment,null,yi(t)?t({signOut:S,user:E}):t):null:A.createElement(wF.Provider,{value:C},A.createElement(Ide,{className:e,hideSignUp:s,variation:m}))}function Po(t){return sle({componentName:"Authenticator",packageName:"react",version:xue}),A.createElement(oF,null,A.createElement(Nde,{...t}))}Po.Provider=oF;Po.ForgotPassword=Fa;Po.SetupTotp=Ua;Po.SignIn=Si;Po.SignUp=Xs;Po.ForceNewPassword=Zs;Po.SelectMfaType=za;Po.SetupEmail=ja;const OF=({cssText:t,...e})=>t===void 0||/<\/style/i.test(t)?null:A.createElement("style",{...e,dangerouslySetInnerHTML:{__html:t}});OF.displayName="Style";const NF=({theme:t,...e})=>{if(!t)return null;const{name:n,cssText:r}=t;return A.createElement(OF,{...e,cssText:r,id:`amplify-theme-${n}`})};NF.displayName="ThemeStyle";function Mde({children:t,colorMode:e,direction:n="ltr",nonce:r,theme:s}){const o=A.useMemo(()=>({theme:Xy(s),colorMode:e}),[s,e]);return A.createElement(iF.Provider,{value:o},A.createElement(tue,{dir:n},A.createElement("div",{"data-amplify-theme":o.theme.name,"data-amplify-color-mode":e,dir:n},t),s?A.createElement(NF,{theme:o.theme,nonce:r}):null))}const Pde=({configured:t,authStatus:e})=>e==="authenticated",kde=t=>t?t.signInDetails?.loginId??t.username??null:null,Dde=({children:t,fallback:e=null})=>{const{authStatus:n,signOut:r,user:s}=St(o=>[o.authStatus,o.signOut,o.user]);return Pde({configured:!0,authStatus:n})?D.jsx(D.Fragment,{children:t({email:kde(s),signOut:()=>r()})}):D.jsx(D.Fragment,{children:e})},Lde=({children:t,fallback:e=null})=>_y()?D.jsx(Dde,{fallback:e,children:t}):D.jsx(D.Fragment,{children:e}),xL='system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Ri=t=>`var(${t})`,un=Ri("--accent"),Ude=Ri("--accent-hover"),_L=Ri("--accent-soft"),Tf=Ri("--accent-fg"),AL=Ri("--surface"),tc=Ri("--fg"),Fde=Ri("--surface-sunken"),tm=Ri("--fg-muted"),Rf=Ri("--line"),zde=Xy({name:"remit",tokens:{colors:{brand:{primary:{10:{value:_L},20:{value:_L},40:{value:un},60:{value:un},80:{value:un},90:{value:un},100:{value:un}}},background:{primary:{value:AL},secondary:{value:Fde}},font:{primary:{value:tc},secondary:{value:tm},tertiary:{value:tm},interactive:{value:un},inverse:{value:Tf},hover:{value:un},focus:{value:un},active:{value:un}},border:{primary:{value:Rf},secondary:{value:Rf},focus:{value:un}}},fonts:{default:{variable:{value:xL},static:{value:xL}}},radii:{small:{value:"3px"},medium:{value:"5px"},large:{value:"7px"}},components:{authenticator:{router:{borderColor:{value:Rf},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:AL}},form:{padding:{value:"1.75rem"}},orContainer:{color:{value:tm}}},button:{color:{value:tc},primary:{backgroundColor:{value:un},color:{value:Tf},_hover:{backgroundColor:{value:Ude},color:{value:Tf}},_focus:{backgroundColor:{value:un},color:{value:Tf}},_active:{backgroundColor:{value:un},color:{value:Tf}}},link:{color:{value:un},_hover:{color:{value:un},backgroundColor:{value:"transparent"}},_focus:{color:{value:un},backgroundColor:{value:"transparent"}},_active:{color:{value:un},backgroundColor:{value:"transparent"}}}},fieldcontrol:{color:{value:tc},borderColor:{value:Rf},_focus:{borderColor:{value:un},boxShadow:{value:`0 0 0 2px ${un}`}}},field:{label:{color:{value:tc}}},tabs:{borderColor:{value:Rf},item:{color:{value:tm},backgroundColor:{value:"transparent"},_active:{color:{value:un},borderColor:{value:un},backgroundColor:{value:"transparent"}},_hover:{color:{value:un}},_focus:{color:{value:un}}}},heading:{color:{value:tc}},text:{color:{value:tc}}}}}),jde={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"}}},Bde=()=>D.jsx(Hx,{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:D.jsxs("span",{className:"flex items-center gap-2",children:[D.jsx("strong",{className:"font-semibold shrink-0",children:"Local dev"}),D.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."}),D.jsx("span",{className:"truncate sm:hidden",children:"— no Cognito; signed out"})]})}),Hde=()=>D.jsx(F8,{note:J8({betterAuthEnabled:!1,cognitoConfigured:_y()})}),$de=({children:t})=>{const{authStatus:e}=St(n=>[n.authStatus]);return e==="authenticated"?D.jsx(D.Fragment,{children:t}):e==="configuring"?D.jsx(KA,{}):D.jsx(Mde,{theme:zde,children:D.jsxs(U8,{children:[D.jsx(z8,{}),D.jsx(Po,{hideSignUp:!1,formFields:jde,components:{Footer:Hde}})]})})},qde=({children:t})=>_y()?D.jsx(Po.Provider,{children:D.jsx($de,{children:t})}):D.jsxs("div",{className:"pt-7 sm:pt-10 [&_#main-content]:h-[calc(100dvh-1.75rem)] sm:[&_#main-content]:h-[calc(100dvh-2.5rem)]",children:[D.jsx(Bde,{}),t]}),MF=60;let Rc=null;const PF=()=>Math.floor(Date.now()/1e3),Wde=t=>t!==null&&t.expiresAt-MF>PF(),Gde=async()=>{const e=(await by()).tokens?.idToken;return e?(Rc={value:e.toString(),expiresAt:e.payload.exp??PF()+MF},Rc.value):(Rc=null,null)},Vde=async()=>_y()?Wde(Rc)?Rc.value:Gde():null,Kde=()=>{Rc=null},Tv={configure:B6,getToken:Vde,resetToken:Kde,Shell:qde,Account:Lde},Yde=({children:t})=>Ay()?D.jsx(Sv.Shell,{children:t}):D.jsx(Tv.Shell,{children:t}),Zde=t=>Ay()?D.jsx(Sv.Account,{...t}):D.jsx(Tv.Account,{...t}),Xde={configure:B6,getToken:()=>Ay()?Sv.getToken():Tv.getToken(),resetToken:()=>{Sv.resetToken(),Tv.resetToken()},Shell:Yde,Account:Zde};var op=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(){}},Qde=class extends op{#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"}},GT=new Qde,Jde={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},efe=class{#e=Jde;#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)}},wl=new efe;function tfe(t){setTimeout(t,0)}var nfe=typeof window>"u"||"Deno"in globalThis;function Ur(){}function rfe(t,e){return typeof t=="function"?t(e):t}function l_(t){return typeof t=="number"&&t>=0&&t!==1/0}function kF(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Oa(t,e){return typeof t=="function"?t(e):t}function is(t,e){return typeof t=="function"?t(e):t}function TL(t,e){const{type:n="all",exact:r,fetchStatus:s,predicate:o,queryKey:a,stale:u}=t;if(a){if(r){if(e.queryHash!==VT(a,e.options))return!1}else if(!xh(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 RL(t,e){const{exact:n,status:r,predicate:s,mutationKey:o}=t;if(o){if(!e.options.mutationKey)return!1;if(n){if(wh(e.options.mutationKey)!==wh(o))return!1}else if(!xh(e.options.mutationKey,o))return!1}return!(r&&e.state.status!==r||s&&!s(e))}function VT(t,e){return(e?.queryKeyHashFn||wh)(t)}function wh(t){return JSON.stringify(t,(e,n)=>c_(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function xh(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(n=>xh(t[n],e[n])):!1}var sfe=Object.prototype.hasOwnProperty;function DF(t,e,n=0){if(t===e)return t;if(n>500)return e;const r=IL(t)&&IL(e);if(!r&&!(c_(t)&&c_(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 p=0;p<u;p++){const g=r?p:a[p],m=t[g],y=e[g];if(m===y){c[g]=m,(r?p<o:sfe.call(t,g))&&f++;continue}if(m===null||y===null||typeof m!="object"||typeof y!="object"){c[g]=y;continue}const S=DF(m,y,n+1);c[g]=S,S===m&&f++}return o===u&&f===o?t:c}function u_(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 IL(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function c_(t){if(!OL(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!OL(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function OL(t){return Object.prototype.toString.call(t)==="[object Object]"}function ofe(t){return new Promise(e=>{wl.setTimeout(e,t)})}function d_(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?DF(t,e):e}function rAe(t){return t}function ife(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function afe(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var KT=Symbol();function LF(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:!t.queryFn||t.queryFn===KT?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function UF(t,e){return typeof t=="function"?t(...e):!!t}function lfe(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 _h=(()=>{let t=()=>nfe;return{isServer(){return t()},setIsServer(e){t=e}}})();function f_(){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 ufe=tfe;function cfe(){let t=[],e=0,n=u=>{u()},r=u=>{u()},s=ufe;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 tr=cfe(),dfe=class extends op{#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}},Rv=new dfe;function ffe(t){return Math.min(1e3*2**t,3e4)}function FF(t){return(t??"online")==="online"?Rv.isOnline():!0}var h_=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function zF(t){let e=!1,n=0,r;const s=f_(),o=()=>s.status!=="pending",a=E=>{if(!o()){const C=new h_(E);m(C),t.onCancel?.(C)}},u=()=>{e=!0},c=()=>{e=!1},f=()=>GT.isFocused()&&(t.networkMode==="always"||Rv.isOnline())&&t.canRun(),p=()=>FF(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 _=t.retry??(_h.isServer()?0:3),T=t.retryDelay??ffe,R=typeof T=="function"?T(n,w):T,M=_===!0||typeof _=="number"&&n<_||typeof _=="function"&&_(n,w);if(e||!M){m(w);return}n++,t.onFail?.(n,w),ofe(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:p,start:()=>(p()?S():y().then(S),s)}}var jF=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),l_(this.gcTime)&&(this.#e=wl.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(_h.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(wl.clearTimeout(this.#e),this.#e=void 0)}};function hfe(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 p=!1;const g=S=>{lfe(S,()=>e.signal,()=>p=!0)},m=LF(e.options,e.fetchOptions),y=async(S,E,C)=>{if(p)return Promise.reject(e.signal.reason);if(E==null&&S.pages.length)return Promise.resolve(S);const _=(()=>{const O={client:e.client,queryKey:e.queryKey,pageParam:E,direction:C?"backward":"forward",meta:e.options.meta};return g(O),O})(),T=await m(_),{maxPages:R}=e.options,M=C?afe:ife;return{pages:M(S.pages,T,R),pageParams:M(S.pageParams,E,R)}};if(s&&o.length){const S=s==="backward",E=S?BF:p_,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:p_(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 p_(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 BF(t,{pages:e,pageParams:n}){return e.length>0?t.getPreviousPageParam?.(e[0],e,n[0],n):void 0}function sAe(t,e){return e?p_(t,e)!=null:!1}function oAe(t,e){return!e||!t.getPreviousPageParam?!1:BF(t,e)!=null}var pfe=class extends jF{#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=ML(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=ML(this.options);e.data!==void 0&&(this.setState(NL(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(t,e){const n=d_(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(Ur).catch(Ur):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===KT||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Oa(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:!kF(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=LF(this.options,e),p=(()=>{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,p,this):c(p)},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"?hfe(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=zF({initialPromise:e?.initialPromise,fn:a.fetchFn,onCancel:c=>{c instanceof h_&&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 h_){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,...HF(n.data,this.options),fetchMeta:t.meta??null};case"success":const r={...n,...NL(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),tr.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:t})})}};function HF(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:FF(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function NL(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function ML(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 gfe=class extends op{constructor(t,e){super(),this.options=e,this.#e=t,this.#i=null,this.#a=f_(),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),PL(this.#t,this.options)?this.#h():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return g_(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return g_(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&&!u_(this.options,e)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&kL(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)||Oa(this.options.staleTime,this.#t)!==Oa(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 vfe(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(Ur)),e}#m(){this.#S();const t=Oa(this.options.staleTime,this.#t);if(_h.isServer()||this.#r.isStale||!l_(t))return;const n=kF(this.#r.dataUpdatedAt,t)+1;this.#d=wl.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,!(_h.isServer()||is(this.options.enabled,this.#t)===!1||!l_(this.#u)||this.#u===0)&&(this.#f=wl.setInterval(()=>{(this.options.refetchIntervalInBackground||GT.isFocused())&&this.#h()},this.#u))}#b(){this.#m(),this.#y(this.#v())}#S(){this.#d!==void 0&&(wl.clearTimeout(this.#d),this.#d=void 0)}#E(){this.#f!==void 0&&(wl.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 p={...f},g=!1,m;if(e._optimisticResults){const P=this.hasListeners(),k=!P&&PL(t,e),H=P&&kL(t,n,e,r);(k||H)&&(p={...p,...HF(f.data,t.options)}),e._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:y,errorUpdatedAt:S,status:E}=p;m=p.data;let C=!1;if(e.placeholderData!==void 0&&m===void 0&&E==="pending"){let P;s?.isPlaceholderData&&e.placeholderData===a?.placeholderData?(P=s.data,C=!0):P=typeof e.placeholderData=="function"?e.placeholderData(this.#p?.state.data,this.#p):e.placeholderData,P!==void 0&&(E="success",m=d_(s?.data,P,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=d_(s?.data,m,e),this.#l=m,this.#i=null}catch(P){this.#i=P}this.#i&&(y=this.#i,m=this.#l,S=Date.now(),E="error");const w=p.fetchStatus==="fetching",_=E==="pending",T=E==="error",R=_&&w,M=m!==void 0,I={status:E,fetchStatus:p.fetchStatus,isPending:_,isSuccess:E==="success",isError:T,isInitialLoading:R,isLoading:R,data:m,dataUpdatedAt:p.dataUpdatedAt,error:y,errorUpdatedAt:S,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:p.dataUpdateCount>c.dataUpdateCount||p.errorUpdateCount>c.errorUpdateCount,isFetching:w,isRefetching:w&&!_,isLoadingError:T&&!M,isPaused:p.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:T&&M,isStale:YT(t,e),refetch:this.refetch,promise:this.#a,isEnabled:is(e.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const P=I.data!==void 0,k=I.status==="error"&&!P,H=W=>{k?W.reject(I.error):P&&W.resolve(I.data)},F=()=>{const W=this.#a=I.promise=f_();H(W)},j=this.#a;switch(j.status){case"pending":t.queryHash===n.queryHash&&H(j);break;case"fulfilled":(k||I.data!==j.value)&&F();break;case"rejected":(!k||I.error!==j.reason)&&F();break}}return I}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),u_(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){tr.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function mfe(t,e){return is(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&is(e.retryOnMount,t)===!1)}function PL(t,e){return mfe(t,e)||t.state.data!==void 0&&g_(t,e,e.refetchOnMount)}function g_(t,e,n){if(is(e.enabled,t)!==!1&&Oa(e.staleTime,t)!=="static"){const r=typeof n=="function"?n(t):n;return r==="always"||r!==!1&&YT(t,e)}return!1}function kL(t,e,n,r){return(t!==e||is(r.enabled,t)===!1)&&(!n.suspense||t.state.status!=="error")&&YT(t,n)}function YT(t,e){return is(e.enabled,t)!==!1&&t.isStaleByTime(Oa(e.staleTime,t))}function vfe(t,e){return!u_(t.getCurrentResult(),e)}var yfe=class extends jF{#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||bfe(),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=zF({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),tr.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(t)}),this.#n.notify({mutation:this,type:"updated",action:t})})}};function bfe(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var $F=class extends op{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 yfe({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=nm(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=nm(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=nm(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=nm(t);return typeof e=="string"?this.#t.get(e)?.find(r=>r!==t&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){tr.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=>RL(e,n))}findAll(t={}){return this.getAll().filter(e=>RL(t,e))}notify(t){tr.batch(()=>{this.listeners.forEach(e=>{e(t)})})}resumePausedMutations(){const t=this.getAll().filter(e=>e.state.isPaused);return tr.batch(()=>Promise.all(t.map(e=>e.continue().catch(Ur))))}};function nm(t){return t.options.scope?.id}var qF=class extends op{constructor(t={}){super(),this.config=t,this.#e=new Map}#e;build(t,e,n){const r=e.queryKey,s=e.queryHash??VT(r,e);let o=this.get(s);return o||(o=new pfe({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(){tr.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=>TL(e,n))}findAll(t={}){const e=this.getAll();return Object.keys(t).length>0?e.filter(n=>TL(t,n)):e}notify(t){tr.batch(()=>{this.listeners.forEach(e=>{e(t)})})}onFocus(){tr.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){tr.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Sfe=class{#e;#t;#n;#r;#o;#s;#a;#i;constructor(t={}){this.#e=t.queryCache||new qF,this.#t=t.mutationCache||new $F,this.#n=t.defaultOptions||{},this.#r=new Map,this.#o=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#a=GT.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#i=Rv.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(Oa(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=rfe(e,o);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(t,e,n){return tr.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;tr.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=this.#e;return tr.batch(()=>(n.findAll(t).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const n={revert:!0,...e},r=tr.batch(()=>this.#e.findAll(t).map(s=>s.cancel(n)));return Promise.all(r).then(Ur).catch(Ur)}invalidateQueries(t,e={}){return tr.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=tr.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(Ur)),s.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(Ur)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=this.#e.build(this,e);return n.isStaleByTime(Oa(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(Ur).catch(Ur)}fetchInfiniteQuery(t){return t._type="infinite",this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(Ur).catch(Ur)}ensureInfiniteQueryData(t){return t._type="infinite",this.ensureQueryData(t)}resumePausedMutations(){return Rv.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(wh(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...this.#r.values()],n={};return e.forEach(r=>{xh(t,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(t,e){this.#o.set(wh(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...this.#o.values()],n={};return e.forEach(r=>{xh(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=VT(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===KT&&(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()}},WF=A.createContext(void 0),GF=t=>{const e=A.useContext(WF);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},Efe=({client:t,children:e})=>(A.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),D.jsx(WF.Provider,{value:t,children:e})),VF=A.createContext(!1),Cfe=()=>A.useContext(VF);VF.Provider;function wfe(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var xfe=A.createContext(wfe()),_fe=()=>A.useContext(xfe),Afe=(t,e,n)=>{const r=n?.state.error&&typeof t.throwOnError=="function"?UF(t.throwOnError,[n.state.error,n]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||r)&&(e.isReset()||(t.retryOnMount=!1))},Tfe=t=>{A.useEffect(()=>{t.clearReset()},[t])},Rfe=({result:t,errorResetBoundary:e,throwOnError:n,query:r,suspense:s})=>t.isError&&!e.isReset()&&!t.isFetching&&r&&(s&&t.data===void 0||UF(n,[t.error,r])),Ife=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))}},Ofe=(t,e)=>t.isLoading&&t.isFetching&&!e,Nfe=(t,e)=>t?.suspense&&e.isPending,DL=(t,e,n)=>e.fetchOptimistic(t).catch(()=>{n.clearReset()});function Mfe(t,e,n){const r=Cfe(),s=_fe(),o=GF(),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,Ife(a),Afe(a,s,u),Tfe(s);const f=!o.getQueryCache().get(a.queryHash),[p]=A.useState(()=>new e(o,a)),g=p.getOptimisticResult(a),m=!r&&c;if(A.useSyncExternalStore(A.useCallback(y=>{const S=m?p.subscribe(tr.batchCalls(y)):Ur;return p.updateResult(),S},[p,m]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),A.useEffect(()=>{p.setOptions(a)},[a,p]),Nfe(a,g))throw DL(a,p,s);if(Rfe({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&&!_h.isServer()&&Ofe(g,r)&&(f?DL(a,p,s):u?.promise)?.catch(Ur).finally(()=>{p.updateResult()}),a.notifyOnChangeProps?g:p.trackResult(g)}function Pfe(t,e){return Mfe(t,gfe)}const kfe="modulepreload",Dfe=function(t){return"/"+t},LL={},Wn=function(e,n,r){let s=Promise.resolve();if(n&&n.length>0){let c=function(f){return Promise.all(f.map(p=>Promise.resolve(p).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=Dfe(f),f in LL)return;LL[f]=!0;const p=f.endsWith(".css"),g=p?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${g}`))return;const m=document.createElement("link");if(m.rel=p?"stylesheet":kfe,p||(m.as="script"),m.crossOrigin="",m.href=f,u&&m.setAttribute("nonce",u),document.head.appendChild(m),p)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 UL=A.use,Sc=typeof window<"u"?A.useLayoutEffect:A.useEffect;function Dw(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 Lfe(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 Ufe(t){const e=A.useRef(null);return A.useImperativeHandle(t,()=>e.current,[]),e}const KF=!1;function Ah(t){return t[t.length-1]}function Ffe(t){return typeof t=="function"}function xl(t,e){return Ffe(t)?t(e):t}const YF=Object.prototype.hasOwnProperty,FL=Object.prototype.propertyIsEnumerable;function ZF(t){for(const e in t)if(YF.call(t,e))return!0;return!1}const zfe=()=>Object.create(null),yl=(t,e)=>_l(t,e,zfe);function _l(t,e,n=()=>({}),r=0){if(t===e)return t;if(r>500)return e;const s=e,o=BL(t)&&BL(s);if(!o&&!(Iv(t)&&Iv(s)))return s;const a=o?t:zL(t);if(!a)return s;const u=o?s:zL(s);if(!u)return s;const c=a.length,f=u.length,p=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){p[y]=S,(o?m<c:YF.call(t,y))&&g++;continue}if(S===null||E===null||typeof S!="object"||typeof E!="object"){p[y]=E;continue}const C=_l(S,E,n,r+1);p[y]=C,C===S&&g++}return c===f&&g===c?t:p}function zL(t){const e=Object.getOwnPropertyNames(t);for(const s of e)if(!FL.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(!FL.call(t,s))return!1;r.push(s)}return r}function Iv(t){if(!jL(t))return!1;const e=t.constructor;if(typeof e>"u")return!0;const n=e.prototype;return!(!jL(n)||!n.hasOwnProperty("isPrototypeOf"))}function jL(t){return Object.prototype.toString.call(t)==="[object Object]"}function BL(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Nl(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(!Nl(t[r],e[r],n))return!1;return!0}if(Iv(t)&&Iv(e)){const r=n?.ignoreUndefined??!0;if(n?.partial){for(const a in e)if((!r||e[a]!==void 0)&&!Nl(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||!Nl(t[a],e[a],n)))return!1;return s===o}return!1}function Uc(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 jfe(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 Th(t){return!!(t&&typeof t=="object"&&typeof t.then=="function")}const Bfe=/[\x00-\x1f\x7f"<>`{}]/g;function Hfe(t){return t.replace(Bfe,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function HL(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 Hfe(e)}const $fe=["http:","https:","mailto:","tel:"];function Ov(t,e){if(!t)return!1;try{const n=new URL(t);return!e.has(n.protocol)}catch{return!1}}function If(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+=HL(t.slice(n,s.index))+s[0],n=e.lastIndex;r=r+HL(n?t.slice(n):t);let o=!1;return r.startsWith("//")&&(o=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:o}}function qfe(t){return/\s|[^\u0000-\u007F]/.test(t)?t.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):t}function Wfe(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 pi(){throw new Error("Invariant failed")}function Rh(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 Ta=4,XF=5;function Gfe(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 QF(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=Gfe(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 p=u+3,g=c;if(p<g)return n[0]=3,n[1]=e+u,n[2]=e+p,n[3]=e+g,n[4]=e+c+1,n[5]=s,n}}else if(f===36){const p=u+1,g=u+2;return g===c?(n[0]=2,n[1]=e+u,n[2]=e+p,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 ib(t,e,n,r,s,o,a){a?.(n);let u=r;{const c=n.fullPath??n.from,f=c.length,p=n.options?.caseSensitive??t,g=n.options?.params?.parse??n.options?.parseParams;for(;u<f;){const y=QF(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(p){const _=s.static?.get(w);if(_)S=_;else{s.static??=new Map;const T=Al(n.fullPath??n.from);T.parent=s,T.depth=o,S=T,s.static.set(w,T)}}else{const _=w.toLowerCase(),T=s.staticInsensitive?.get(_);if(T)S=T;else{s.staticInsensitive??=new Map;const R=Al(n.fullPath??n.from);R.parent=s,R.depth=o,S=R,s.staticInsensitive.set(_,R)}}break}case 1:{const w=c.substring(E,y[1]),_=c.substring(y[4],C),T=p&&!!(w||_),R=w?T?w:w.toLowerCase():void 0,M=_?T?_:_.toLowerCase():void 0,O=!g&&s.dynamic?.find(I=>!I.parse&&I.caseSensitive===T&&I.prefix===R&&I.suffix===M);if(O)S=O;else{const I=Uw(1,n.fullPath??n.from,T,R,M);S=I,I.depth=o,I.parent=s,s.dynamic??=[],s.dynamic.push(I)}break}case 3:{const w=c.substring(E,y[1]),_=c.substring(y[4],C),T=p&&!!(w||_),R=w?T?w:w.toLowerCase():void 0,M=_?T?_:_.toLowerCase():void 0,O=!g&&s.optional?.find(I=>!I.parse&&I.caseSensitive===T&&I.prefix===R&&I.suffix===M);if(O)S=O;else{const I=Uw(3,n.fullPath??n.from,T,R,M);S=I,I.parent=s,I.depth=o,s.optional??=[],s.optional.push(I)}break}case 2:{const w=c.substring(E,y[1]),_=c.substring(y[4],C),T=p&&!!(w||_),R=w?T?w:w.toLowerCase():void 0,M=_?T?_:_.toLowerCase():void 0,O=Uw(2,n.fullPath??n.from,T,R,M);S=O,O.parent=s,O.depth=o,s.wildcard??=[],s.wildcard.push(O)}}s=S}if(g&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const y=Al(n.fullPath??n.from);y.kind=XF,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=Al(n.fullPath??n.from);y.kind=Ta,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)ib(t,e,c,u,s,o,a)}function Lw(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 ya(t){if(t.pathless)for(const e of t.pathless)ya(e);if(t.static)for(const e of t.static.values())ya(e);if(t.staticInsensitive)for(const e of t.staticInsensitive.values())ya(e);if(t.dynamic?.length){t.dynamic.sort(Lw);for(const e of t.dynamic)ya(e)}if(t.optional?.length){t.optional.sort(Lw);for(const e of t.optional)ya(e)}if(t.wildcard?.length){t.wildcard.sort(Lw);for(const e of t.wildcard)ya(e)}}function Al(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 Uw(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 Vfe(t,e){const n=Al("/"),r=new Uint16Array(6);for(const s of t)ib(!1,r,s,1,n,0);ya(n),e.masksTree=n,e.flatCache=Rh(1e3)}function Kfe(t,e){t||="/";const n=e.flatCache.get(t);if(n)return n;const r=ZT(t,e.masksTree);return e.flatCache.set(t,r),r}function Yfe(t,e,n,r,s){t||="/",r||="/";const o=e?`case\0${t}`:t;let a=s.singleCache.get(o);return a||(a=Al("/"),ib(e,new Uint16Array(6),{from:t},1,a,0),s.singleCache.set(o,a)),ZT(r,a,n)}function Zfe(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=ZT(t,e.segmentTree,n)}catch(a){if(a instanceof URIError)o=null;else throw a}return o&&(o.branch=e7(o.route)),e.matchCache.set(r,o),o}function Xfe(t){return t==="/"?t:t.replace(/\/{1,}$/,"")}function Qfe(t,e=!1,n){const r=Al(t.fullPath),s=new Uint16Array(6),o={},a={};let u=0;return ib(e,s,t,1,r,0,c=>{if(n?.(c,u),c.id in o&&pi(),o[c.id]=c,u!==0&&c.path){const f=Xfe(c.fullPath);(!a[f]||c.fullPath.endsWith("/"))&&(a[f]=c)}u++}),ya(r),{processedTree:{segmentTree:r,singleCache:Rh(1e3),matchCache:Rh(1e3),flatCache:null,masksTree:null},routesById:o,routesByPath:a}}function ZT(t,e,n=!1){const r=t.split("/"),s=ehe(t,r,e,n);if(!s)return null;const[o]=JF(t,r,s);return{route:s.node.route,rawParams:o}}function JF(t,e,n){const r=Jfe(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 p=r[u];if(p.kind===Ta)break;if(p.kind===XF){f--,a--,c--;continue}const g=e[a],m=c;if(g&&(c+=g.length),p.kind===1){s??=n.node.fullPath.split("/");const y=s[f],S=p.prefix?.length??0;if(y.charCodeAt(S)===123){const E=p.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(p.kind===3){if(n.skipped&1<<u){a--,c=m-1;continue}s??=n.node.fullPath.split("/");const y=s[f],S=p.prefix?.length??0,E=p.suffix?.length??0,C=y.substring(S+3,y.length-E-1),w=p.suffix||p.prefix?g.substring(S,g.length-E):g;w&&(o[C]=decodeURIComponent(w))}else if(p.kind===2){const y=p,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 e7(t){const e=[t];for(;t.parentRoute;)t=t.parentRoute,e.push(t);return e.reverse(),e}function Jfe(t){const e=Array(t.depth+1);do e[t.depth]=t,t=t.parent;while(t);return e}function ehe(t,e,n,r){if(t==="/"&&n.index)return{node:n.index,skipped:0};const s=!Ah(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 p=u.pop(),{node:g,index:m,skipped:y,depth:S,statics:E,dynamics:C,optionals:w}=p;let{extract:_,rawParams:T}=p;if(g.kind===2&&g.route&&!sm(f,p))continue;if(g.parse){if(!$L(t,e,p))continue;T=p.rawParams,_=p.extract}r&&g.route&&g.kind!==Ta&&sm(c,p)&&(c=p);const R=m===a;if(R&&(g.route&&(!o||g.kind===Ta||g.kind===2)&&sm(f,p)&&(f=p),!g.optional&&!g.wildcard&&!g.index&&!g.pathless))continue;const M=R?void 0:e[m];let O;if(R&&g.index){const I={node:g.index,index:m,skipped:y,depth:S+1,statics:E,dynamics:C,optionals:w,extract:_,rawParams:T};let P=!0;if(g.index.parse&&($L(t,e,I)||(P=!1)),P){if(!C&&!w&&!y&&the(E,a))return I;sm(f,I)&&(f=I)}}if(g.wildcard)for(let I=g.wildcard.length-1;I>=0;I--){const P=g.wildcard[I],{prefix:k,suffix:H}=P;if(!(k&&(R||!(P.caseSensitive?M:O??=M.toLowerCase()).startsWith(k)))){if(H){if(R)continue;const F=e.slice(m).join("/").slice(-H.length);if((P.caseSensitive?F:F.toLowerCase())!==H)continue}u.push({node:P,index:a,skipped:y,depth:S+1,statics:E,dynamics:C,optionals:w,extract:_,rawParams:T})}}if(g.optional){const I=y|1<<S,P=S+1;for(let k=g.optional.length-1;k>=0;k--){const H=g.optional[k];u.push({node:H,index:m,skipped:I,depth:P,statics:E,dynamics:C,optionals:w,extract:_,rawParams:T})}if(!R)for(let k=g.optional.length-1;k>=0;k--){const H=g.optional[k],{prefix:F,suffix:j}=H;if(F||j){const W=H.caseSensitive?M:O??=M.toLowerCase();if(F&&!W.startsWith(F)||j&&!W.endsWith(j))continue}u.push({node:H,index:m+1,skipped:y,depth:P,statics:E,dynamics:C,optionals:w+rm(a,m),extract:_,rawParams:T})}}if(!R&&g.dynamic&&M)for(let I=g.dynamic.length-1;I>=0;I--){const P=g.dynamic[I],{prefix:k,suffix:H}=P;if(k||H){const F=P.caseSensitive?M:O??=M.toLowerCase();if(k&&!F.startsWith(k)||H&&!F.endsWith(H))continue}u.push({node:P,index:m+1,skipped:y,depth:S+1,statics:E,dynamics:C+rm(a,m),optionals:w,extract:_,rawParams:T})}if(!R&&g.staticInsensitive){const I=g.staticInsensitive.get(O??=M.toLowerCase());I&&u.push({node:I,index:m+1,skipped:y,depth:S+1,statics:E+rm(a,m),dynamics:C,optionals:w,extract:_,rawParams:T})}if(!R&&g.static){const I=g.static.get(M);I&&u.push({node:I,index:m+1,skipped:y,depth:S+1,statics:E+rm(a,m),dynamics:C,optionals:w,extract:_,rawParams:T})}if(g.pathless){const I=S+1;for(let P=g.pathless.length-1;P>=0;P--){const k=g.pathless[P];u.push({node:k,index:m,skipped:y,depth:I,statics:E,dynamics:C,optionals:w,extract:_,rawParams:T})}}}if(f)return f;if(r&&c){let p=c.index;for(let m=0;m<c.index;m++)p+=e[m].length;const g=p===t.length?"/":t.slice(p);return c.rawParams??=Object.create(null),c.rawParams["**"]=decodeURIComponent(g),c}return null}function rm(t,e){return 2**(t-e-1)}function the(t,e){return t===2**(e-1)-1}function $L(t,e,n){let r,s;try{[r,s]=JF(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 sm(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===Ta)>(t.node.kind===Ta)||e.node.kind===Ta==(t.node.kind===Ta)&&e.depth>t.depth))):!0}function nv(t){return XT(t.filter(e=>e!==void 0).join("/"))}function XT(t){return t.replace(/\/{2,}/g,"/")}function t7(t){return t==="/"?t:t.replace(/^\/{1,}/,"")}function fi(t){const e=t.length;return e>1&&t[e-1]==="/"?t.replace(/\/{1,}$/,""):t}function n7(t){return fi(t7(t))}function Nv(t,e){return t?.endsWith("/")&&t!=="/"&&t!==`${e}/`?t.slice(0,-1):t}function nhe(t,e,n){return Nv(t,n)===Nv(e,n)}function rhe({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&&Ah(u)==="";)u.pop();const f=e.split("/");for(let p=0,g=f.length;p<g;p++){const m=f[p];m===""?p?p===g-1&&u.push(m):u=[m]:m===".."?u.pop():m==="."||u.push(m)}}u.length>1&&(Ah(u)===""?n==="never"&&u.pop():n==="always"&&u.push(""));const c=XT(u.join("/"))||"/";return a&&r&&r.set(a,c),c}function she(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 Fw(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=>WL(s,n)).join("/"):WL(r,n)}function qL({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 p=u;c=QF(t,p,c);const g=c[5];if(u=g+1,p===g)continue;const m=c[0];if(m===0){f+="/"+t.substring(p,g);continue}if(m===2){const y=e._splat;o._splat=y,o["*"]=y;const S=t.substring(p,c[1]),E=t.substring(c[4],g);if(!y){s=!0,(S||E)&&(f+="/"+S+E);continue}const C=Fw("_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(p,c[1]),E=t.substring(c[4],g),C=Fw(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(p,c[1]),C=t.substring(c[4],g),w=Fw(y,e,n)??"";f+="/"+E+w+C;continue}}return t.endsWith("/")&&(f+="/"),{usedParams:o,interpolatedPath:f||"/",isMissingParams:s}}function WL(t,e){const n=encodeURIComponent(t);return e?.(n)??n}function dr(t){return t?.isNotFound===!0}function ohe(){try{return sessionStorage}catch{return}}const ihe="tsr-scroll-restoration-v1_3",r7=ohe();function ahe(){try{return JSON.parse(r7?.getItem("tsr-scroll-restoration-v1_3")||"{}")}catch{return{}}}function lhe(){try{r7?.setItem(ihe,JSON.stringify(fc))}catch{}}const fc=ahe(),GL="data-scroll-restoration-id",uhe=t=>t.state.__TSR_key||t.href;function che(t){const e=t.getAttribute(GL);if(e)return`[${GL}="${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 om=!1;const rv="window";function m_(t){try{return typeof t=="function"?t():document.querySelector(t)}catch{}}function VL(t){const e=new Set;for(const n of t){if(n===rv)continue;const r=m_(n);r&&e.add(r)}return e}function dhe(t,e){const n=t.options.scrollRestoration,r=t._scroll;n&&(r.restoring=!0);const s=t.options.getScrollRestorationKey||uhe,o=new Set,a=u=>{const c=fc[u]||={};for(const f of o)f===document?c[rv]={scrollX,scrollY}:f.isConnected&&(c[che(f)]={scrollX:f.scrollLeft,scrollY:f.scrollTop})};n&&!r.restoration&&(r.restoration=!0,om=!1,history.scrollRestoration="manual",document.addEventListener("scroll",u=>{om||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())),lhe()})),!r.reset&&(r.reset=!0,t.subscribe("onRendered",u=>{const c=t.options.scrollRestorationBehavior,f=t.options.scrollToTopSelectors,p=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=fc[S];if(E){let C=fc[y];for(const w in E){if(w===rv){if(p)continue}else{const _=m_(w);if(!_||p&&f&&(m??=VL(f),m.has(_)))continue}C||(C=fc[y]={}),C[w]??=E[w]}}}om=!0;try{const E=u.toLocation.hash,C=u.toLocation.state.__hashScrollIntoViewOptions??!0;let w=!1;if(p){!E&&f&&(m??=VL(f));const _=E&&C&&g,T=r.restoring?fc[y]:void 0;if(T)for(const R in T){const{scrollX:M,scrollY:O}=T[R];if(R===rv){if(_)continue;scrollTo({top:O,left:M,behavior:c}),w=!0}else{const I=m_(R);I&&(I.scrollLeft=M,I.scrollTop=O,m?.delete(I))}}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{om=!1}}))}function fhe(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 hhe(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 phe=mhe(JSON.parse),ghe=vhe(JSON.stringify,JSON.parse);function mhe(t){return e=>{e[0]==="?"&&(e=e.substring(1));const n=hhe(e);for(const r in n){const s=n[r];if(typeof s=="string")try{n[r]=t(s)}catch{}}return n}}function vhe(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=fhe(s,r);return o?`?${o}`:""}}const Ml="__root__";function s7(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 yhe(t){return{input:({url:e})=>{for(const n of t)e=v_(n,e);return e},output:({url:e})=>{for(let n=t.length-1;n>=0;n--)e=o7(t[n],e);return e}}}function bhe(t){const e=n7(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=nv(["/",e,o.pathname]),o)}}function v_(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 o7(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 She(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),p=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([]),_=n([]),T=n([]),R=r(()=>jw(a,w.get())),M=r(()=>jw(u,_.get())),O=r(()=>jw(c,T.get())),I=r(()=>w.get()[0]),P=r(()=>w.get().some(ee=>a.get(ee)?.get().status==="pending")),k=r(()=>({locationHref:y.get().href,resolvedLocationHref:S.get()?.href,status:f.get()})),H=r(()=>({status:f.get(),loadedAt:p.get(),isLoading:g.get(),isTransitioning:m.get(),matches:R.get(),location:y.get(),resolvedLocation:S.get(),statusCode:E.get(),redirect:C.get()})),F=Rh(64);function j(ee){let fe=F.get(ee);return fe||(fe=r(()=>{const de=w.get();for(const Ae of de){const L=a.get(Ae);if(L&&L.routeId===ee)return L.get()}}),F.set(ee,fe)),fe}const W={status:f,loadedAt:p,isLoading:g,isTransitioning:m,location:y,resolvedLocation:S,statusCode:E,redirect:C,matchesId:w,pendingIds:_,cachedIds:T,matches:R,pendingMatches:M,cachedMatches:O,firstId:I,hasPending:P,matchRouteDeps:k,matchStores:a,pendingMatchStores:u,cachedMatchStores:c,__store:H,getRouteMatchStore:j,setMatches:Y,setPending:ne,setCached:$};Y(t.matches),o?.(W);function Y(ee){Bw(ee,a,w,n,s)}function ne(ee){Bw(ee,u,_,n,s)}function $(ee){Bw(ee,c,T,n,s)}return W}function jw(t,e){const n=[];for(const r of e){const s=t.get(r);s&&n.push(s.get())}return n}function Bw(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)}Wfe(n.get(),o)||n.set(o)})}const y_=t=>{if(!t.rendered)return t.rendered=!0,t.onReady?.()},Ehe=t=>t.stores.matchesId.get().some(e=>t.stores.matchStores.get(e)?.get()._forcePending),ab=(t,e)=>!!(t.preload&&!t.router.stores.matchStores.has(e)),Pl=(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},KL=(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},Ra=(t,e,n)=>{if(!(!zr(n)&&!dr(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":dr(n)?"notFound":r.status==="pending"?"success":r.status,context:Pl(t,e.index),isFetching:!1,error:n})),dr(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},i7=(t,e)=>{const n=t.router.getMatch(e);return!!(!n||n._nonReactive.dehydrated)},YL=(t,e,n)=>{const r=Pl(t,n);t.updateMatch(e,s=>({...s,context:r}))},Of=(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,Ra(t,t.router.getMatch(r),n);try{o.options.onError?.(n)}catch(a){n=a,Ra(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)&&!dr(n)&&(t.serialError??=n)},a7=(t,e,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;const s=n.options.pendingMs??t.router.options.defaultPendingMs;if(t.onReady&&!ab(t,e)&&(n.options.loader||n.options.beforeLoad||u7(n))&&typeof s=="number"&&s!==1/0&&(n.options.pendingComponent??t.router.options?.defaultPendingComponent)){const o=setTimeout(()=>{y_(t)},s);r._nonReactive.pendingTimeout=o}},Che=(t,e,n)=>{const r=t.router.getMatch(e);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;a7(t,e,n,r);const s=()=>{const o=t.router.getMatch(e);o.preload&&(o.status==="redirected"||o.status==="notFound")&&Ra(t,o,o.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(s):s()},whe=(t,e,n,r)=>{const s=t.router.getMatch(e);let o=s._nonReactive.loadPromise;s._nonReactive.loadPromise=Uc(()=>{o?.resolve(),o=void 0});const{paramsError:a,searchError:u}=s;a&&Of(t,n,a),u&&Of(t,n,u),a7(t,e,r,s);const c=new AbortController;let f=!1;const p=()=>{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(()=>{p(),g()});return}s._nonReactive.beforeLoadPromise=Uc();const m={...Pl(t,n,!1),...s.__routeContext},{search:y,params:S,cause:E}=s,C=ab(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},_=R=>{if(R===void 0){t.router.batch(()=>{p(),g()});return}(zr(R)||dr(R))&&(p(),Of(t,n,R)),t.router.batch(()=>{p(),t.updateMatch(e,M=>({...M,__beforeLoadContext:R})),g()})};let T;try{if(T=r.options.beforeLoad(w),Th(T))return p(),T.catch(R=>{Of(t,n,R)}).then(_)}catch(R){p(),Of(t,n,R)}_(T)},xhe=(t,e)=>{const{id:n,routeId:r}=t.matches[e],s=t.router.looseRoutesById[r],o=()=>u(),a=()=>whe(t,n,e,s),u=()=>{if(i7(t,n))return;const c=Che(t,n,s);return Th(c)?c.then(a):a()};return o()},_he=(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}))},l7=(t,e,n,r,s)=>{const o=e[r-1],{params:a,loaderDeps:u,abortController:c,cause:f}=t.router.getMatch(n),p=Pl(t,r),g=ab(t,n);return{params:a,deps:u,preload:!!g,parentMatchPromise:o,abortController:c,context:p,location:t.location,navigate:m=>t.router.navigate({...m,_fromLocation:t.location}),cause:g?"preload":f,route:s,...t.router.options.additionalContext}},ZL=async(t,e,n,r,s)=>{try{const o=t.router.getMatch(n);try{(!(KF??t.router.isServer)||o.ssr===!0)&&Ih(s);const a=s.options.loader,u=typeof a=="function"?a:a?.handler,c=u?.(l7(t,e,n,r,s)),f=!!u&&Th(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;Ra(t,t.router.getMatch(n),g),g!==void 0&&t.updateMatch(n,m=>({...m,loaderData:g}))}s._lazyPromise&&await s._lazyPromise;const p=o._nonReactive.minPendingPromise;p&&await p,s._componentsPromise&&await s._componentsPromise,t.updateMatch(n,g=>({...g,error:void 0,context:Pl(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:Pl(t,r)}));return}const c=o._nonReactive.minPendingPromise;c&&await c,dr(a)&&await s.options.notFoundComponent?.preload?.(),Ra(t,t.router.getMatch(n),a);try{s.options.onError?.(a)}catch(f){u=f,Ra(t,t.router.getMatch(n),f)}!zr(u)&&!dr(u)&&await Ih(s,["errorComponent"]),t.updateMatch(n,f=>({...f,error:u,context:Pl(t,r),status:"error",isFetching:!1}))}}catch(o){const a=t.router.getMatch(n);a&&(a._nonReactive.loaderPromise=void 0),Ra(t,a,o)}},Ahe=async(t,e,n)=>{async function r(y,S,E,C,w){const _=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(l7(t,e,s,n,w)):R,{status:O,invalid:I}=C,P=_>=T&&(!!t.forceStaleReload||C.cause==="enter"||E!==void 0&&E!==C.id);a=O==="success"&&(I||(M??P)),y&&w.options.preload===!1||(a&&!t.sync&&p?(u=!0,(async()=>{try{await ZL(t,e,s,n,w);const k=t.router.getMatch(s);k._nonReactive.loaderPromise?.resolve(),k._nonReactive.loadPromise?.resolve(),k._nonReactive.loaderPromise=void 0,k._nonReactive.loadPromise=void 0}catch(k){zr(k)&&await t.router.navigate(k.options)}})()):O!=="success"||a?await ZL(t,e,s,n,w):YL(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,p=((typeof f=="function"?void 0:f?.staleReloadMode)??t.router.options.defaultStaleReloadMode)!=="blocking";if(i7(t,s)){if(!t.router.getMatch(s))return t.matches[n];YL(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=ab(t,s);if(y._nonReactive.loaderPromise){if(y.status==="success"&&!t.sync&&!y.preload&&p)return y;await y._nonReactive.loaderPromise;const w=t.router.getMatch(s),_=w._nonReactive.error||w.error;_&&Ra(t,w,_),w.status==="pending"&&await r(C,y,E,w,c)}else{const w=C&&!t.router.stores.matchStores.has(s),_=t.router.getMatch(s);_._nonReactive.loaderPromise=Uc(),w!==_.preload&&t.updateMatch(s,T=>({...T,preload:w})),await r(C,y,E,_,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 XL(t){const e=t,n=[];Ehe(e.router)&&y_(e);let r;for(let m=0;m<e.matches.length;m++){try{const y=xhe(e,m);Th(y)&&await y}catch(y){if(zr(y))throw y;if(dr(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?KL(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(Ahe(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;dr(S)?u??=S:c??=S}if(c!==void 0)throw c}const f=u??(r&&!e.preload?r:void 0);let p=e.firstBadMatchIndex!==void 0?e.firstBadMatchIndex:e.matches.length-1;if(!f&&r&&e.preload)return e.matches;if(f){const m=KL(e,f);m===void 0&&pi();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})),p=m,await Ih(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 Ih(m,["errorComponent"])}for(let m=0;m<=p;m++){const{id:y,routeId:S}=e.matches[m],E=e.router.looseRoutesById[S];try{const C=_he(e,y,E);if(C){const w=await C;e.updateMatch(y,_=>({..._,...w}))}}catch(C){console.error(`Error executing head for route ${S}:`,C)}}const g=y_(e);if(Th(g)&&await g,f)throw f;if(e.serialError&&!e.preload&&!e.onReady)throw e.serialError;return e.matches}function QL(t,e){const n=e.map(r=>t.options[r]?.preload?.()).filter(Boolean);if(n.length!==0)return Promise.all(n)}function Ih(t,e=sv){!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===sv?(()=>{if(t._componentsPromise===void 0){const r=QL(t,sv);r?t._componentsPromise=r.then(()=>{t._componentsLoaded=!0,t._componentsPromise=void 0}):t._componentsLoaded=!0}return t._componentsPromise})():QL(t,e);return t._lazyPromise?t._lazyPromise.then(n):n()}function u7(t){for(const e of sv)if(t.options[e]?.preload)return!0;return!1}const sv=["component","errorComponent","pendingComponent","notFoundComponent"];var Na="__TSR_index",JL="popstate",eU="beforeunload";function The(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?.()??[],p=c.type==="PUSH"||c.type==="REPLACE";if(typeof document<"u"&&f.length&&p)for(const g of f){const m=Mv(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[Na];u=tU(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[Na];u=tU(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[Na]!==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 tU(t,e){e||(e={});const n=QT();return{...e,key:n,__TSR_key:n,[Na]:t}}function Rhe(t){const e=typeof document<"u"?window:void 0,n=e.history.pushState,r=e.history.replaceState;let s=[];const o=()=>s,a=P=>s=P,u=(P=>P),c=(()=>Mv(`${e.location.pathname}${e.location.search}${e.location.hash}`,e.history.state));if(!e.history.state?.__TSR_key&&!e.history.state?.key){const P=QT();e.history.replaceState({[Na]:0,key:P,__TSR_key:P},"")}let f=c(),p,g=!1,m=!1,y=!1,S=!1;const E=()=>f;let C,w;const _=()=>{C&&(I._ignoreSubscribers=!0,(C.isPush?e.history.pushState:e.history.replaceState)(C.state,"",C.href),I._ignoreSubscribers=!1,C=void 0,w=void 0,p=void 0)},T=(P,k,H)=>{const F=u(k);w||(p=f),f=Mv(k,H),C={href:F,state:H,isPush:C?.isPush||P==="push"},w||(w=Promise.resolve().then(()=>_()))},R=P=>{f=c(),I.notify({type:P})},M=async()=>{if(m){m=!1;return}const P=c(),k=P.state[Na]-f.state[Na],H=k===1,F=k===-1,j=!H&&!F||g;g=!1;const W=j?"GO":F?"BACK":"FORWARD",Y=j?{type:"GO",index:k}:{type:F?"BACK":"FORWARD"};if(y)y=!1;else{const ne=o();if(typeof document<"u"&&ne.length){for(const $ of ne)if(await $.blockerFn({currentLocation:f,nextLocation:P,action:W})){m=!0,e.history.go(1),I.notify(Y);return}}}f=c(),I.notify(Y)},O=P=>{if(S){S=!1;return}let k=!1;const H=o();if(typeof document<"u"&&H.length)for(const F of H){const j=F.enableBeforeUnload??!0;if(j===!0){k=!0;break}if(typeof j=="function"&&j()===!0){k=!0;break}}if(k)return P.preventDefault(),P.returnValue=""},I=The({getLocation:E,getLength:()=>e.history.length,pushState:(P,k)=>T("push",P,k),replaceState:(P,k)=>T("replace",P,k),back:P=>(P&&(y=!0),S=!0,e.history.back()),forward:P=>{P&&(y=!0),S=!0,e.history.forward()},go:P=>{g=!0,e.history.go(P)},createHref:P=>u(P),flush:_,destroy:()=>{e.history.pushState=n,e.history.replaceState=r,e.removeEventListener(eU,O,{capture:!0}),e.removeEventListener(JL,M)},onBlocked:()=>{p&&f!==p&&(f=p)},getBlockers:o,setBlockers:a,notifyOnIndexChange:!1});return e.addEventListener(eU,O,{capture:!0}),e.addEventListener(JL,M),e.history.pushState=function(...P){const k=n.apply(e.history,P);return I._ignoreSubscribers||R("PUSH"),k},e.history.replaceState=function(...P){const k=r.apply(e.history,P);return I._ignoreSubscribers||R("REPLACE"),k},I}function Ihe(t){let e=t.replace(/[\x00-\x1f\x7f]/g,"");return e.startsWith("//")&&(e="/"+e.replace(/^\/+/,"")),e}function Mv(t,e){const n=Ihe(t),r=n.indexOf("#"),s=n.indexOf("?"),o=QT();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||{[Na]:0,key:o,__TSR_key:o}}}function QT(){return(Math.random()+1).toString(36).substring(7)}function Ic(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 Ohe=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=she(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=Rhe()),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 p;this.resolvePathCache=Rh(1e3),p=this.buildRouteTree(),this.setRoutes(p)}if(!this.stores&&this.latestLocation){const p=this.getStoreConfig(this);this.batch=p.batch,this.stores=She(Mhe(this.latestLocation),p),dhe(this)}let u=!1;const c=this.options.basepath??"/",f=this.options.rewrite;if(o||s!==c||a!==f){this.basepath=c;const p=[],g=n7(c);g&&g!=="/"&&p.push(bhe({basepath:c})),f&&p.push(f),this.rewrite=p.length===0?void 0:p.length===1?p[0]:yhe(p),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=Qfe(this.routeTree,this.options.caseSensitive,(r,s)=>{r.init({originalIndex:s})});return this.options.routeMasks&&Vfe(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:p,href:g,state:m})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(c)){const w=this.options.parseSearch(f),_=this.options.stringifySearch(w);return{href:c+_+p,publicHref:c+_+p,pathname:If(c).path,external:!1,searchStr:_,search:yl(r?.search,w),hash:If(p.slice(1)).path,state:_l(r?.state,m)}}const y=new URL(g,this.origin),S=v_(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:If(S.pathname).path,external:!!this.rewrite&&S.origin!==this.origin,searchStr:C,search:yl(r?.search,E),hash:If(S.hash.slice(1)).path,state:_l(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)=>rhe({base:n,to:r.includes("//")?XT(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=>Phe({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,p=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,xl(o.params,g)),E=this.routesByPath[fi(y)];let C;if(E)C=this.getRouteBranch(E);else if(y.includes("$"))C=[];else{const F=this.getMatchedRoutes(y);C=F.matchedRoutes,this.options.notFoundRoute&&(!F.foundRoute||F.foundRoute.path!=="/"&&F.routeParams["**"])&&(C=[...C,this.options.notFoundRoute])}if(C.length&&ZF(S))for(const F of C){const j=F.options.params?.stringify??F.options.stringifyParams;if(j)try{Object.assign(S,j(S))}catch{}}const w=n.leaveParams?y:If(qL({path:y,params:S,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let _=p;if(n._includeValidateSearch&&this.options.search?.strict){const F={};C.forEach(j=>{if(j.options.validateSearch)try{Object.assign(F,ov(j.options.validateSearch,{...F,..._}))}catch{}}),_=F}_=khe({search:_,dest:o,destRoutes:C,_includeValidateSearch:n._includeValidateSearch}),_=yl(p,_);const T=this.options.stringifySearch(_),R=o.hash===!0?a.hash:o.hash?xl(o.hash,a.hash):void 0,M=R?`#${R}`:"";let O=o.state===!0?a.state:o.state?xl(o.state,a.state):{};O=_l(a.state,O);const I=`${w}${T}${M}`;let P,k,H=!1;if(this.rewrite){const F=new URL(I,this.origin),j=o7(this.rewrite,F);P=F.href.replace(F.origin,""),j.origin!==this.origin?(k=j.href,H=!0):k=j.pathname+j.search+j.hash}else P=qfe(I),k=P;return{publicHref:k,href:P,pathname:w,search:_,searchStr:T,state:O,hash:R??"",external:H,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 p=Kfe(u.pathname,this.processedTree);if(p){Object.assign(f,p.rawParams);const{from:g,params:m,...y}=p.route,S=m===!1||m===null?Object.create(null):(m??!0)===!0?f:Object.assign(f,xl(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 p=Nl(s.state,this.latestLocation.state);return f.forEach(g=>{delete s.state[g]}),p},u=fi(this.latestLocation.href)===fi(s.href);let c=this.commitLocationPromise;if(this.commitLocationPromise=Uc(()=>{c?.resolve(),c=void 0}),u&&a())this.load();else{let{maskedLocation:f,hashScrollIntoView:p,...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=p??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=Mv(u,{__TSR_index:n?g:g+1}),y=new URL(m.pathname,this.origin);c.to=v_(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 p=this.commitLocation({...f,viewTransition:o,replace:n,resetScroll:r,hashScrollIntoView:s,ignoreBlocker:a});return queueMicrotask(()=>{this.pendingBuiltLocation===f&&(this.pendingBuiltLocation=void 0)}),p},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(Ov(c,this.protocolAllowlist))return;if(!a.ignoreBlocker){const f=this.history.getBlockers?.()??[];for(const p of f)if(p?.blockerFn&&await p.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 p=this.latestLocation,g=Ic(p,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...g}),this.emit({type:"onBeforeLoad",...g}),await XL({router:this,sync:n?.sync,forceStaleReload:u.href===p.href,matches:this.stores.pendingMatches.get(),location:p,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,_=this.stores.matches.get();m=w?_.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?_.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)):_,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 _ of C)this.looseRoutesById[_.routeId].options[w]?.(_)})})}})}catch(p){zr(p)?(s=p,this.navigate({...s.options,replace:!0,ignoreBlocker:!0})):dr(p)&&(o=p);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(Ic(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&&Ov(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=Ih,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 XL({router:this,matches:s,location:r,preload:!0,updateMatch:(c,f)=>{o.has(c)?s=s.map(p=>p.id===c?f(p):p):this.updateMatch(c,f)}}),s}catch(c){if(zr(c))return c.options.reloadDocument?void 0:await this.preloadRoute({...c.options,_fromLocation:r});dr(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=Yfe(o.pathname,r?.caseSensitive??!1,r?.fuzzy??!1,a.pathname,this.processedTree);return!u||n.params&&!Nl(u.rawParams,n.params,{partial:!0})?!1:r?.includeSearch??!0?Nl(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??ghe,parseSearch:t.parseSearch??phe,protocolAllowlist:t.protocolAllowlist??$fe}),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=e7(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["**"]:fi(t.pathname))&&(this.options.notFoundRoute?o=[...o,this.options.notFoundRoute]:a=!0);const u=a?Lhe(this.options.notFoundMode,o):void 0,c=new Array(o.length),f=new Map;for(const p of this.stores.matchStores.values())p.routeId&&f.set(p.routeId,p.get());for(let p=0;p<o.length;p++){const g=o[p],m=c[p-1];let y,S,E;{const j=m?.search??t.search,W=m?._strictSearch??void 0;try{const Y=ov(g.options.validateSearch,{...j})??void 0;y={...j,...Y},S={...W,...Y},E=void 0}catch(Y){let ne=Y;if(Y instanceof Pv||(ne=new Pv(Y.message,{cause:Y})),e?.throwOnError)throw ne;y=j,S={},E=ne}}const C=g.options.loaderDeps?.({search:y})??"",w=C?JSON.stringify(C):"",{interpolatedPath:_,usedParams:T}=qL({path:g.fullPath,params:s,decoder:this.pathParamsDecoder,server:this.isServer}),R=g.id+_+w,M=this.getMatch(R),O=f.get(g.id),I=M?._strictParams??T;let P;if(!M)try{nU(g,I)}catch(j){if(dr(j)||zr(j)?P=j:P=new Nhe(j.message,{cause:j}),e?.throwOnError)throw P}Object.assign(s,I);const k=O?"stay":"enter";let H;if(M)H={...M,cause:k,params:O?.params??s,_strictParams:I,search:yl(O?O.search:M.search,y),_strictSearch:S};else{const j=g.options.loader||g.options.beforeLoad||g.lazyFn||u7(g)?"pending":"success";H={id:R,ssr:g.options.ssr,index:p,routeId:g.id,params:O?.params??s,_strictParams:I,pathname:_,updatedAt:Date.now(),search:O?yl(O.search,y):y,_strictSearch:S,searchError:void 0,status:j,isFetching:!1,error:void 0,paramsError:P,__routeContext:void 0,_nonReactive:{loadPromise:Uc()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:k,loaderDeps:O?_l(O.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||(H.globalNotFound=u===g.id),H.searchError=E;const F=this.getParentContext(m);H.context={...F,...H.__routeContext,...H.__beforeLoadContext},c[p]=H}for(let p=0;p<c.length;p++){const g=c[p],m=this.looseRoutesById[g.routeId],y=this.getMatch(g.id),S=f.get(g.routeId);if(g.params=S?yl(S.params,s):s,!y){const E=c[p-1],C=this.getParentContext(E);if(m.options.context){const w={deps:g.loaderDeps,params:g.params,context:C??{},location:t,navigate:_=>this.navigate({..._,_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=Ah(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=Ah(r),a={...t.search};for(const g of r)try{Object.assign(a,ov(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{nU(m,g)}catch{}f=g}const p={matchedRoutes:r,fullPath:o.fullPath,search:a,params:f};return this.lightweightCache.set(t,[e,p]),p}},Pv=class extends Error{},Nhe=class extends Error{};function Mhe(t){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:t,matches:[],statusCode:200}}function ov(t,e){if(t==null)return{};if("~standard"in t){const n=t["~standard"].validate(e);if(n instanceof Promise)throw new Pv("Async validation not supported");if(n.issues)throw new Pv(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 Phe({pathname:t,routesById:e,processedTree:n}){const r=Object.create(null),s=fi(t);let o;const a=Zfe(s,n,!0);return a&&(o=a.route,Object.assign(r,a.rawParams)),{matchedRoutes:a?.branch||[e.__root__],routeParams:r,foundRoute:o}}function khe({search:t,dest:e,destRoutes:n,_includeValidateSearch:r}){return Dhe(n)(t,e,r??!1)}function Dhe(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:p})=>{const g=p(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:p,meta:g})=>{const m=p(f);if(n)try{const y=ov(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=xl(e.search,a);return u&&(u.explicit=f),f}const c=(f,p)=>{if(p){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 Lhe(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 Ml}function nU(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 Uhe="Error preloading route! ☝️";var c7=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=Ml:this.parentRoute||pi();let s=r?Ml:n?.path;s&&s!=="/"&&(s=t7(s));const o=n?.id||s;let a=r?Ml:nv([this.parentRoute.id==="__root__"?"":this.parentRoute.id,o]);s==="__root__"&&(s="/"),a!=="__root__"&&(a=nv(["/",a]));const u=a==="__root__"?"/":nv([this.parentRoute.fullPath,s]);this._path=s,this._id=a,this._fullPath=u,this._to=fi(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=>s7({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.")}},Fhe=class extends c7{constructor(t){super(t)}};function JT(t){const e=t.errorComponent??eR;return D.jsx(zhe,{getResetKey:t.getResetKey,onCatch:t.onCatch,children:({error:n,reset:r})=>n?A.createElement(e,{error:n,reset:r}):t.children})}var zhe=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 eR({error:t}){const[e,n]=A.useState(!1);return D.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[D.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[D.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),D.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"})]}),D.jsx("div",{style:{height:".25rem"}}),e?D.jsx("div",{children:D.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:t.message?D.jsx("code",{children:t.message}):null})}):null]})}function jhe({children:t,fallback:e=null}){return d7()?D.jsx(z.Fragment,{children:t}):D.jsx(z.Fragment,{children:e})}function d7(){return z.useSyncExternalStore(Bhe,()=>!0,()=>!1)}function Bhe(){return()=>{}}var f7=A.createContext(null);function fs(t){return A.useContext(f7)}var lb=A.createContext(void 0),Hhe=A.createContext(void 0),rn=(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))(rn||{});function $he({update:t,notify:e,unwatched:n}){return{link:r,unlink:s,propagate:o,checkDirty:a,shallowPropagate:u};function r(f,p,g){const m=p.depsTail;if(m!==void 0&&m.dep===f)return;const y=m!==void 0?m.nextDep:p.deps;if(y!==void 0&&y.dep===f){y.version=g,p.depsTail=y;return}const S=f.subsTail;if(S!==void 0&&S.version===g&&S.sub===p)return;const E=p.depsTail=f.subsTail={version:g,dep:f,sub:p,prevDep:m,nextDep:y,prevSub:S,nextSub:void 0};y!==void 0&&(y.prevDep=E),m!==void 0?m.nextDep=E:p.deps=E,S!==void 0?S.nextSub=E:f.subs=E}function s(f,p=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:p.depsTail=m,m!==void 0?m.nextDep=y:p.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 p=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:p,prev:g},p=E);continue}}if((f=p)!==void 0){p=f.nextSub;continue}for(;g!==void 0;)if(f=g.value,g=g.prev,f!==void 0){p=f.nextSub;continue e}break}while(!0)}function a(f,p){let g,m=0,y=!1;e:do{const S=f.dep,E=S.flags;if(p.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,p=S,++m;continue}if(!y){const C=f.nextDep;if(C!==void 0){f=C;continue}}for(;m--;){const C=p.subs,w=C.nextSub!==void 0;if(w?(f=g.value,g=g.prev):f=C,y){if(t(p)){w&&u(C),p=f.sub;continue}y=!1}else p.flags&=-33;p=f.sub;const _=f.nextDep;if(_!==void 0){f=_;continue e}}return y}while(!0)}function u(f){do{const p=f.sub,g=p.flags;(g&48)===32&&(p.flags=g|16,(g&6)===2&&e(p))}while((f=f.nextSub)!==void 0)}function c(f,p){let g=p.depsTail;for(;g!==void 0;){if(g===f)return!0;g=g.prevDep}return!1}}function qhe(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 b_=[];let iv=0;const{link:rU,unlink:Whe,propagate:Ghe,checkDirty:h7,shallowPropagate:sU}=$he({update(t){return t._update()},notify(t){b_[S_++]=t,t.flags&=~rn.Watching},unwatched(t){t.depsTail!==void 0&&(t.depsTail=void 0,t.flags=rn.Mutable|rn.Dirty,kv(t))}});let im=0,S_=0,So,E_=0;function p7(t){try{++E_,t()}finally{--E_||g7()}}function kv(t){const e=t.depsTail;let n=e!==void 0?e.nextDep:t.deps;for(;n!==void 0;)n=Whe(n,t)}function g7(){if(!(E_>0)){for(;im<S_;){const t=b_[im];b_[im++]=void 0,t.notify()}im=0,S_=0}}function oU(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?rn.None:rn.Mutable,get(){return So!==void 0&&rU(s,So,iv),s._snapshot},subscribe(o){const a=qhe(o),u={current:!1},c=Vhe(()=>{s.get(),u.current?a.next?.(s._snapshot):u.current=!0});return{unsubscribe:()=>{c.stop()}}},_update(o){const a=So,u=e?.compare??Object.is;if(n)So=s,++iv,s.depsTail=void 0;else if(o===void 0)return!1;n&&(s.flags=rn.Mutable|rn.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{So=a,n&&(s.flags&=~rn.RecursedCheck),kv(s)}}};return n?(s.flags=rn.Mutable|rn.Dirty,s.get=function(){const o=s.flags;if(o&rn.Dirty||o&rn.Pending&&h7(s.deps,s)){if(s._update()){const a=s.subs;a!==void 0&&sU(a)}}else o&rn.Pending&&(s.flags=o&~rn.Pending);return So!==void 0&&rU(s,So,iv),s._snapshot}):s.set=function(o){if(s._update(o)){const a=s.subs;a!==void 0&&(Ghe(a),sU(a),g7())}},s}function Vhe(t){const e=()=>{const r=So;So=n,++iv,n.depsTail=void 0,n.flags=rn.Watching|rn.RecursedCheck;try{return t()}finally{So=r,n.flags&=~rn.RecursedCheck,kv(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:rn.Watching|rn.RecursedCheck,notify(){const r=this.flags;r&rn.Dirty||r&rn.Pending&&h7(this.deps,this)?e():this.flags=rn.Watching},stop(){this.flags=rn.None,this.depsTail=void 0,kv(this)}};return e(),n}function Khe(t,e){return t===e}function Wr(t,e,n=Khe){const r=A.useCallback(a=>{if(!t)return()=>{};const{unsubscribe:u}=t.subscribe(a);return u},[t]),s=A.useCallback(()=>t?.get(),[t]);return aT.useSyncExternalStoreWithSelector(r,s,s,e,n)}var Hw={get(){},subscribe(){return{unsubscribe(){}}}};function Yhe(t,e){const n=A.useRef();return r=>{const s=t?.select?t.select(r):r;return t?.structuralSharing??e.options.defaultStructuralSharing?n.current=_l(n.current,s):s}}function ou(t){const e=fs(),n=A.useContext(t.from?Hhe:lb),r=t.from?e.stores.getRouteMatchStore(t.from):e.stores.matchStores.get(n),s=Yhe(t,e),o=Wr(r??Hw,a=>a?s(a):Hw);if(o!==Hw)return o;(t.shouldThrow??!0)&&pi()}function m7(t){return ou({from:t.from,strict:t.strict,structuralSharing:t.structuralSharing,select:e=>t.select?t.select(e.loaderData):e.loaderData})}function v7(t){const{select:e,...n}=t;return ou({...n,select:r=>e?e(r.loaderDeps):r.loaderDeps})}function y7(t){return ou({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 b7(t){return ou({from:t.from,strict:t.strict,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,select:e=>t.select?t.select(e.search):e.search})}function tR(t){const e=fs();return A.useCallback(n=>e.navigate({...n,from:n.from??t?.from}),[t?.from,e])}function iAe(t){const e=fs(),n=tR(),r=A.useRef(null);return Sc(()=>{r.current!==t&&(n(t),r.current=t)},[e,t,n]),null}function S7(t){return ou({...t,select:e=>t.select?t.select(e.context):e.context})}function Zhe(t,e){const n=fs(),r=Ufe(e),{activeProps:s,inactiveProps:o,activeOptions:a,to:u,preload:c,preloadDelay:f,preloadIntentProximity:p,hashScrollIntoView:g,replace:m,startTransition:y,resetScroll:S,viewTransition:E,children:C,target:w,disabled:_,style:T,className:R,onClick:M,onBlur:O,onFocus:I,onMouseEnter:P,onMouseLeave:k,onTouchStart:H,ignoreBlocker:F,params:j,search:W,hash:Y,state:ne,mask:$,reloadDocument:ee,unsafeRelative:fe,from:de,_fromLocation:Ae,...L}=t,V=d7(),K=A.useMemo(()=>t,[n,t.from,t._fromLocation,t.hash,t.to,t.search,t.params,t.state,t.mask,t.unsafeRelative]),J=Wr(n.stores.location,gt=>gt,(gt,vn)=>gt.href===vn.href),oe=A.useMemo(()=>{const gt={_fromLocation:J,...K};return n.buildLocation(gt)},[n,J,K]),he=oe.maskedLocation?oe.maskedLocation.publicHref:oe.publicHref,ue=oe.maskedLocation?oe.maskedLocation.external:oe.external,ve=A.useMemo(()=>npe(he,ue,n.history,_),[_,ue,he,n.history]),xe=A.useMemo(()=>{if(ve?.external)return Ov(ve.href,n.protocolAllowlist)?void 0:ve.href;if(!rpe(u)&&!(typeof u!="string"||u.indexOf(":")===-1))try{return new URL(u),Ov(u,n.protocolAllowlist)?void 0:u}catch{}},[u,ve,n.protocolAllowlist]),Xe=A.useMemo(()=>{if(xe)return!1;if(a?.exact){if(!nhe(J.pathname,oe.pathname,n.basepath))return!1}else{const gt=Nv(J.pathname,n.basepath),vn=Nv(oe.pathname,n.basepath);if(!(gt.startsWith(vn)&&(gt.length===vn.length||gt[vn.length]==="/")))return!1}return(a?.includeSearch??!0)&&!Nl(J.search,oe.search,{partial:!a?.exact,ignoreUndefined:!a?.explicitUndefined})?!1:a?.includeHash?V&&J.hash===oe.hash:!0},[a?.exact,a?.explicitUndefined,a?.includeHash,a?.includeSearch,J,xe,V,oe.hash,oe.pathname,oe.search,n.basepath]),Ee=Xe?xl(s,{})??Xhe:$w,pt=Xe?$w:xl(o,{})??$w,Ce=[R,Ee.className,pt.className].filter(Boolean).join(" "),ze=(T||Ee.style||pt.style)&&{...T,...Ee.style,...pt.style},[je,He]=A.useState(!1),gr=A.useRef(!1),Et=t.reloadDocument||xe?!1:c??n.options.defaultPreload,Vr=f??n.options.defaultPreloadDelay??0,Gn=A.useCallback(()=>{n.preloadRoute({...K,_builtLocation:oe}).catch(gt=>{console.warn(gt),console.warn(Uhe)})},[n,K,oe]);Lfe(r,A.useCallback(gt=>{gt?.isIntersecting&&Gn()},[Gn]),tpe,{disabled:!!_||Et!=="viewport"}),A.useEffect(()=>{gr.current||!_&&Et==="render"&&(Gn(),gr.current=!0)},[_,Gn,Et]);const Ar=gt=>{const vn=gt.currentTarget.getAttribute("target"),Rr=w!==void 0?w:vn;if(!_&&!spe(gt)&&!gt.defaultPrevented&&(!Rr||Rr==="_self")&&gt.button===0){gt.preventDefault(),t8.flushSync(()=>{He(!0)});const no=n.subscribe("onResolved",()=>{no(),He(!1)});n.navigate({...K,replace:m,resetScroll:S,hashScrollIntoView:g,startTransition:y,viewTransition:E,ignoreBlocker:F})}};if(xe)return{...L,ref:r,href:xe,...C&&{children:C},...w&&{target:w},..._&&{disabled:_},...T&&{style:T},...R&&{className:R},...M&&{onClick:M},...O&&{onBlur:O},...I&&{onFocus:I},...P&&{onMouseEnter:P},...k&&{onMouseLeave:k},...H&&{onTouchStart:H}};const to=gt=>{if(_||Et!=="intent")return;if(!Vr){Gn();return}const vn=gt.currentTarget;if(Nf.has(vn))return;const Rr=setTimeout(()=>{Nf.delete(vn),Gn()},Vr);Nf.set(vn,Rr)},Tr=gt=>{_||Et!=="intent"||Gn()},Gt=gt=>{if(_||!Et||!Vr)return;const vn=gt.currentTarget,Rr=Nf.get(vn);Rr&&(clearTimeout(Rr),Nf.delete(vn))};return{...L,...Ee,...pt,href:ve?.href,ref:r,onClick:nc([M,Ar]),onBlur:nc([O,Gt]),onFocus:nc([I,to]),onMouseEnter:nc([P,to]),onMouseLeave:nc([k,Gt]),onTouchStart:nc([H,Tr]),disabled:!!_,target:w,...ze&&{style:ze},...Ce&&{className:Ce},..._&&Qhe,...Xe&&Jhe,...V&&je&&epe}}var $w={},Xhe={className:"active"},Qhe={role:"link","aria-disabled":!0},Jhe={"data-status":"active","aria-current":"page"},epe={"data-transitioning":"transitioning"},Nf=new WeakMap,tpe={rootMargin:"100px"},nc=t=>e=>{for(const n of t)if(n){if(e.defaultPrevented)return;n(e)}};function npe(t,e,n,r){if(!r)return e?{href:t,external:!0}:{href:n.createHref(t)||"/",external:!1}}function rpe(t){if(typeof t!="string")return!1;const e=t.charCodeAt(0);return e===47?t.charCodeAt(1)!==47:e===46}var E7=A.forwardRef((t,e)=>{const{_asChild:n,...r}=t,{type:s,...o}=Zhe(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 spe(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}var ope=class extends c7{constructor(e){super(e),this.useMatch=n=>ou({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>S7({...n,from:this.id}),this.useSearch=n=>b7({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>y7({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>v7({...n,from:this.id}),this.useLoaderData=n=>m7({...n,from:this.id}),this.useNavigate=()=>tR({from:this.fullPath}),this.Link=z.forwardRef((n,r)=>D.jsx(E7,{ref:r,from:this.fullPath,...n}))}};function ipe(t){return new ope(t)}function ape(){return t=>upe(t)}var lpe=class extends Fhe{constructor(t){super(t),this.useMatch=e=>ou({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>S7({...e,from:this.id}),this.useSearch=e=>b7({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>y7({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>v7({...e,from:this.id}),this.useLoaderData=e=>m7({...e,from:this.id}),this.useNavigate=()=>tR({from:this.fullPath}),this.Link=z.forwardRef((e,n)=>D.jsx(E7,{ref:n,from:this.fullPath,...e}))}};function upe(t){return new lpe(t)}function fr(t){return new cpe(t,{silent:!0}).createRoute}var cpe=class{constructor(t,e){this.path=t,this.createRoute=n=>{const r=ipe(n);return r.isRoot=!1,r},this.silent=e?.silent}};function or(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,jfe(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(UL)UL(a());else throw a();return A.createElement(r,f)};return u.preload=a,u}function dpe(t){const e=fs(),n=`not-found-${Wr(e.stores.location,r=>r.pathname)}-${Wr(e.stores.status,r=>r)}`;return D.jsx(JT,{getResetKey:()=>n,onCatch:(r,s)=>{if(dr(r))t.onCatch?.(r,s);else throw r},errorComponent:({error:r})=>{if(dr(r))return t.fallback?.(r);throw r},children:t.children})}function fpe(){return D.jsx("p",{children:"Not Found"})}function hc(t){return D.jsx(D.Fragment,{children:t.children})}function C7(t,e,n){return e.options.notFoundComponent?D.jsx(e.options.notFoundComponent,{...n}):t.options.defaultNotFoundComponent?D.jsx(t.options.defaultNotFoundComponent,{...n}):D.jsx(fpe,{})}function hpe(t){return null}function ppe(){return hpe(fs()),null}var gpe=(t,e)=>t.routeId===e.routeId&&t._displayPending===e._displayPending,mpe=(t,e)=>t[0]===e[0]&&t[1]===e[1],w7=A.memo(function({matchId:e}){const n=fs(),r=n.stores.matchStores.get(e);r||pi();const s=Wr(n.stores.loadedAt,a=>a),o=Wr(r,a=>a,gpe);return D.jsx(vpe,{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 vpe({router:t,matchId:e,resetKey:n,matchState:r}){const s=t.routesById[r.routeId],o=s.options.pendingComponent??t.options.defaultPendingComponent,a=o?D.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,p=r.ssr===!1||r.ssr==="data-only",g=(!s.isRoot||s.options.wrapInSuspense||p)&&(s.options.wrapInSuspense??o??(s.options.errorComponent?.preload||p))?A.Suspense:hc,m=u?JT:hc,y=f?dpe:hc;return D.jsxs(s.isRoot?s.options.shellComponent??hc:hc,{children:[D.jsx(lb.Provider,{value:e,children:D.jsx(g,{fallback:a,children:D.jsx(m,{getResetKey:()=>n,errorComponent:u||eR,onCatch:(S,E)=>{if(dr(S))throw S.routeId??=r.routeId,S;c?.(S,E)},children:D.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:p||r._displayPending?D.jsx(jhe,{fallback:a,children:D.jsx(iU,{matchId:e})}):D.jsx(iU,{matchId:e})})})})}),r.parentRouteId===Ml?D.jsxs(D.Fragment,{children:[D.jsx(ype,{}),t.options.scrollRestoration&&KF?D.jsx(ppe,{}):null]}):null]})}function ype(){const t=fs(),e=A.useRef();return Sc(()=>{const n=t.stores.resolvedLocation.get(),r=e.current;n&&(!r||r.href!==n.href)&&t.emit({type:"onRendered",...Ic(t.stores.location.get(),r??n)}),e.current=n},[Wr(t.stores.resolvedLocation,n=>n?.state.__TSR_key),t]),null}var iU=A.memo(function({matchId:e}){const n=fs(),r=(p,g)=>n.getMatch(p.id)?._nonReactive[g]??p._nonReactive[g],s=n.stores.matchStores.get(e);s||pi();const o=Wr(s,p=>p),a=o.routeId,u=n.routesById[a],c=A.useMemo(()=>{const p=(n.routesById[a].options.remountDeps??n.options.defaultRemountDeps)?.({routeId:a,loaderDeps:o.loaderDeps,params:o._strictParams,search:o._strictSearch});return p?JSON.stringify(p):void 0},[a,o.loaderDeps,o._strictParams,o._strictSearch,n.options.defaultRemountDeps,n.routesById]),f=A.useMemo(()=>{const p=u.options.component??n.options.defaultComponent;return p?D.jsx(p,{},c):D.jsx(x7,{})},[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 p=u.options.pendingMinMs??n.options.defaultPendingMinMs;if(p){const g=n.getMatch(o.id);if(g&&!g._nonReactive.minPendingPromise){const m=Uc();g._nonReactive.minPendingPromise=m,setTimeout(()=>{m.resolve(),g._nonReactive.minPendingPromise=void 0},p)}}throw r(o,"loadPromise")}if(o.status==="notFound")return dr(o.error)||pi(),C7(n,u,o.error);if(o.status==="redirected")throw zr(o.error)||pi(),r(o,"loadPromise");if(o.status==="error")throw o.error;return f}),x7=A.memo(function(){const e=fs(),n=A.useContext(lb);let r,s=!1,o;{const f=n?e.stores.matchStores.get(n):void 0;[r,s]=Wr(f,p=>[p?.routeId,p?.globalNotFound??!1],mpe),o=Wr(e.stores.matchesId,p=>p[p.findIndex(g=>g===n)+1])}const a=r?e.routesById[r]:void 0,u=e.options.defaultPendingComponent?D.jsx(e.options.defaultPendingComponent,{}):null;if(s)return a||pi(),C7(e,a,void 0);if(!o)return null;const c=D.jsx(w7,{matchId:o});return r===Ml?D.jsx(A.Suspense,{fallback:u,children:c}):c});function bpe(){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=Dw(s),u=s||n||o,c=Dw(u),f=s||o,p=Dw(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 fi(t.latestLocation.publicHref)!==fi(m.publicHref)&&t.commitLocation({...m,replace:!0}),()=>{g()}},[t,t.history]),Sc(()=>{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]),Sc(()=>{a&&!s&&t.emit({type:"onLoad",...Ic(t.stores.location.get(),t.stores.resolvedLocation.get())})},[a,t,s]),Sc(()=>{p&&!f&&t.emit({type:"onBeforeRouteMount",...Ic(t.stores.location.get(),t.stores.resolvedLocation.get())})},[f,p,t]),Sc(()=>{if(c&&!u){const g=Ic(t.stores.location.get(),t.stores.resolvedLocation.get());t.emit({type:"onResolved",...g}),p7(()=>{t.stores.status.set("idle"),t.stores.resolvedLocation.set(t.stores.location.get())})}},[u,c,t]),null}function Spe(){const t=fs(),e=t.routesById[Ml].options.pendingComponent??t.options.defaultPendingComponent,n=e?D.jsx(e,{}):null,r=D.jsxs(typeof document<"u"&&t.ssr?hc:A.Suspense,{fallback:n,children:[D.jsx(bpe,{}),D.jsx(Epe,{})]});return t.options.InnerWrap?D.jsx(t.options.InnerWrap,{children:r}):r}function Epe(){const t=fs(),e=Wr(t.stores.firstId,s=>s),n=Wr(t.stores.loadedAt,s=>s),r=e?D.jsx(w7,{matchId:e}):null;return D.jsx(lb.Provider,{value:e,children:t.options.disableGlobalCatchBoundary?r:D.jsx(JT,{getResetKey:()=>n,errorComponent:eR,onCatch:void 0,children:r})})}var Cpe=t=>({createMutableStore:oU,createReadonlyStore:oU,batch:p7}),wpe=t=>new xpe(t),xpe=class extends Ohe{constructor(t){super(t,Cpe)}};function _pe({router:t,children:e,...n}){ZF(n)&&t.update({...t.options,...n,context:{...t.options.context,...n.context}});const r=D.jsx(f7.Provider,{value:t,children:e});return t.options.Wrap?D.jsx(t.options.Wrap,{children:r}):r}function Ape({router:t,...e}){return D.jsx(_pe,{router:t,...e,children:D.jsx(Spe,{})})}var qw={exports:{}},Mf={},Ww={exports:{}},Gw={};var aU;function Tpe(){return aU||(aU=1,(function(t){function e($,ee){var fe=$.length;$.push(ee);e:for(;0<fe;){var de=fe-1>>>1,Ae=$[de];if(0<s(Ae,ee))$[de]=ee,$[fe]=Ae,fe=de;else break e}}function n($){return $.length===0?null:$[0]}function r($){if($.length===0)return null;var ee=$[0],fe=$.pop();if(fe!==ee){$[0]=fe;e:for(var de=0,Ae=$.length,L=Ae>>>1;de<L;){var V=2*(de+1)-1,K=$[V],J=V+1,oe=$[J];if(0>s(K,fe))J<Ae&&0>s(oe,K)?($[de]=oe,$[J]=fe,de=J):($[de]=K,$[V]=fe,de=V);else if(J<Ae&&0>s(oe,fe))$[de]=oe,$[J]=fe,de=J;else break e}}return ee}function s($,ee){var fe=$.sortIndex-ee.sortIndex;return fe!==0?fe:$.id-ee.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=[],p=1,g=null,m=3,y=!1,S=!1,E=!1,C=!1,w=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function R($){for(var ee=n(f);ee!==null;){if(ee.callback===null)r(f);else if(ee.startTime<=$)r(f),ee.sortIndex=ee.expirationTime,e(c,ee);else break;ee=n(f)}}function M($){if(E=!1,R($),!S)if(n(c)!==null)S=!0,O||(O=!0,j());else{var ee=n(f);ee!==null&&ne(M,ee.startTime-$)}}var O=!1,I=-1,P=5,k=-1;function H(){return C?!0:!(t.unstable_now()-k<P)}function F(){if(C=!1,O){var $=t.unstable_now();k=$;var ee=!0;try{e:{S=!1,E&&(E=!1,_(I),I=-1),y=!0;var fe=m;try{t:{for(R($),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<=$);if($=t.unstable_now(),typeof Ae=="function"){g.callback=Ae,R($),ee=!0;break t}g===n(c)&&r(c),R($)}else r(c);g=n(c)}if(g!==null)ee=!0;else{var L=n(f);L!==null&&ne(M,L.startTime-$),ee=!1}}break e}finally{g=null,m=fe,y=!1}ee=void 0}}finally{ee?j():O=!1}}}var j;if(typeof T=="function")j=function(){T(F)};else if(typeof MessageChannel<"u"){var W=new MessageChannel,Y=W.port2;W.port1.onmessage=F,j=function(){Y.postMessage(null)}}else j=function(){w(F,0)};function ne($,ee){I=w(function(){$(t.unstable_now())},ee)}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($){$.callback=null},t.unstable_forceFrameRate=function($){0>$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<$?Math.floor(1e3/$):5},t.unstable_getCurrentPriorityLevel=function(){return m},t.unstable_next=function($){switch(m){case 1:case 2:case 3:var ee=3;break;default:ee=m}var fe=m;m=ee;try{return $()}finally{m=fe}},t.unstable_requestPaint=function(){C=!0},t.unstable_runWithPriority=function($,ee){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var fe=m;m=$;try{return ee()}finally{m=fe}},t.unstable_scheduleCallback=function($,ee,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,$){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,$={id:p++,callback:ee,priorityLevel:$,startTime:fe,expirationTime:Ae,sortIndex:-1},fe>de?($.sortIndex=fe,e(f,$),n(c)===null&&$===n(f)&&(E?(_(I),I=-1):E=!0,ne(M,fe-de))):($.sortIndex=Ae,e(c,$),S||y||(S=!0,O||(O=!0,j()))),$},t.unstable_shouldYield=H,t.unstable_wrapCallback=function($){var ee=m;return function(){var fe=m;m=ee;try{return $.apply(this,arguments)}finally{m=fe}}}})(Gw)),Gw}var lU;function Rpe(){return lU||(lU=1,Ww.exports=Tpe()),Ww.exports}var uU;function Ipe(){if(uU)return Mf;uU=1;var t=Rpe(),e=Qh(),n=e8();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,h=l;;){var v=d.return;if(v===null)break;var b=v.alternate;if(b===null){if(h=v.return,h!==null){d=h;continue}break}if(v.child===b.child){for(b=v.child;b;){if(b===d)return c(v),i;if(b===h)return c(v),l;b=b.sibling}throw Error(r(188))}if(d.return!==h.return)d=v,h=b;else{for(var x=!1,N=v.child;N;){if(N===d){x=!0,d=v,h=b;break}if(N===h){x=!0,h=v,d=b;break}N=N.sibling}if(!x){for(N=b.child;N;){if(N===d){x=!0,d=b,h=v;break}if(N===h){x=!0,h=b,d=v;break}N=N.sibling}if(!x)throw Error(r(189))}}if(d.alternate!==h)throw Error(r(190))}if(d.tag!==3)throw Error(r(188));return d.stateNode.current===d?i:l}function p(i){var l=i.tag;if(l===5||l===26||l===27||l===6)return i;for(i=i.child;i!==null;){if(l=p(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"),_=Symbol.for("react.consumer"),T=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),O=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),k=Symbol.for("react.activity"),H=Symbol.for("react.memo_cache_sentinel"),F=Symbol.iterator;function j(i){return i===null||typeof i!="object"?null:(i=F&&i[F]||i["@@iterator"],typeof i=="function"?i:null)}var W=Symbol.for("react.client.reference");function Y(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===W?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 O:return"SuspenseList";case k:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case S:return"Portal";case T:return i.displayName||"Context";case _: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 I:return l=i.displayName||null,l!==null?l:Y(i.type)||"Memo";case P:l=i._payload,i=i._init;try{return Y(i(l))}catch{}}return null}var ne=Array.isArray,$=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee=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 V(i){0>Ae||(i.current=de[Ae],de[Ae]=null,Ae--)}function K(i,l){Ae++,de[Ae]=i.current,i.current=l}var J=L(null),oe=L(null),he=L(null),ue=L(null);function ve(i,l){switch(K(he,l),K(oe,i),K(J,null),l.nodeType){case 9:case 11:i=(i=l.documentElement)&&(i=i.namespaceURI)?GO(i):0;break;default:if(i=l.tagName,l=l.namespaceURI)l=GO(l),i=VO(l,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}V(J),K(J,i)}function xe(){V(J),V(oe),V(he)}function Xe(i){i.memoizedState!==null&&K(ue,i);var l=J.current,d=VO(l,i.type);l!==d&&(K(oe,i),K(J,d))}function Ee(i){oe.current===i&&(V(J),V(oe)),ue.current===i&&(V(ue),cf._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(`
216
+ `;return typeof u=="function"&&u(null,C),C},kw}var EL;function nce(){if(EL)return ec;EL=1;const t=Due(),e=Jue(),n=ece(),r=tce();function s(o,a,u,c,f){const p=[].slice.call(arguments,1),g=p.length,m=typeof p[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 ec.create=e.create,ec.toCanvas=s.bind(null,n.render),ec.toDataURL=s.bind(null,n.renderToDataURL),ec.toString=s.bind(null,function(o,a,u){return r.render(o,u)}),ec}var rce=nce();const sce=qa(rce),oce=t=>t==="signIn"||t==="signUp",WT=t=>!!t&&(t==="EMAIL_OTP"||t==="SMS_MFA"),{getConfirmText:ice,getConfirmingText:ace,getBackToSignInText:lce,getResendCodeText:uce}=kn,sb=()=>{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=WT(n)&&a&&r;return z.createElement(Fe,{direction:"column"},z.createElement(Jt,{isDisabled:t,type:"submit",variation:"primary",isLoading:t,loadingText:ace()},ice()),u&&z.createElement(Jt,{onClick:r,type:"button"},uce()),z.createElement(Jt,{onClick:e,type:"button",variation:"link",size:"small"},lce()))},cce=new rr("SetupTotp-logger"),{getSetupTotpText:dce,getCopiedText:fce,getLoadingText:hce}=kn,Ua=({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=Ua.Header,Footer:f=Ua.Footer}}}=cs(),[p,g]=A.useState(!0),[m,y]=A.useState(),[S,E]=A.useState("COPY"),{totpIssuer:C="AWSCognito",totpUsername:w=s}=o??{},_=A.useCallback(async()=>{try{const R=rre(C,w,n),M=await sce.toDataURL(R);y(M)}catch(R){cce.error(R)}finally{g(!1)}},[C,w,n]);A.useEffect(()=>{m||_()},[_,m]);const T=()=>{navigator.clipboard.writeText(n),E(fce())};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"},p?A.createElement("p",null,hce(),"…"):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(Mo,null),A.createElement(Gr,null)),A.createElement(sb,null),A.createElement(f,null))))};Ua.Header=function(){return A.createElement(_r,{level:3},dce())};Ua.Footer=function(){return null};const{getSubmitText:pce,getSubmittingText:gce}=kn,ob=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?z.createElement(z.Fragment,null,gce(),"…"):z.createElement(z.Fragment,null,pce()),p=r??f;return z.createElement(Fe,{direction:"column"},z.createElement(Jt,{variation:"primary",isDisabled:s,type:"submit"},p),z.createElement(Fe,{direction:"column",alignItems:"center"},z.createElement(Jt,{onClick:c,type:"button",variation:"link",size:"small"},n)))},mce=()=>z.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"},z.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"})),vce=()=>z.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"},z.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"}),z.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"}),z.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"}),z.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"})),yce=()=>z.createElement(lF,{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"}),bce=()=>z.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"},z.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"}),z.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"})),Qg=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=z.createElement(yce,null):e==="google"?a=z.createElement(vce,null):e==="amazon"?a=z.createElement(bce,null):e==="apple"&&(a=z.createElement(mce,null)),z.createElement(Jt,{onClick:o,className:"federated-sign-in-button",gap:"1rem"},a,z.createElement(Ts,{as:"span"},r))},{getSignInWithFederationText:Jg,getOrText:Sce}=kn;function IF(){const{route:t,socialProviders:e}=St(({route:n,socialProviders:r})=>[n,r]);return e.length===0?null:z.createElement(Fe,{direction:"column",padding:"0 0 1rem 0",className:"federated-sign-in-container"},e.map(n=>{switch(n){case"amazon":return z.createElement(Qg,{icon:"amazon",key:n,provider:bc.Amazon,text:Jg(t,n)});case"apple":return z.createElement(Qg,{icon:"apple",key:n,provider:bc.Apple,text:Jg(t,n)});case"facebook":return z.createElement(Qg,{icon:"facebook",key:n,provider:bc.Facebook,text:Jg(t,n)});case"google":return z.createElement(Qg,{icon:"google",key:n,provider:bc.Google,text:Jg(t,n)});default:console.error(`Authenticator does not support ${n}. Please open an issue: https://github.com/aws-amplify/amplify-ui/issues/choose`)}}),z.createElement(LT,{size:"small",label:Sce()}))}const{getSignInText:em,getSigningInText:Ece,getForgotPasswordText:Cce,getSignInWithEmailText:wce,getSignInWithSmsText:xce,getSignInWithPasskeyText:_ce,getOtherSignInOptionsText:Ace,getEnterUsernameFirstText:Tce}=kn;function Si(){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]=z.useState(""),{components:{SignIn:{Header:c=Si.Header,Footer:f=Si.Footer}}}=cs(),g=e&&e.length>1&&n,m=a.trim().length>0,y=z.useCallback(w=>{const{name:_,value:T}=w.target;_==="username"&&typeof T=="string"&&u(T),s(w)},[s]),S=()=>{if(!n)return em();switch(n){case"EMAIL_OTP":return wce();case"SMS_OTP":return xce();case"WEB_AUTHN":return _ce();default:return em()}},E=w=>{w.preventDefault(),o(w)},C=w=>{w.preventDefault(),r()};return z.createElement($e,null,z.createElement(c,null),z.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-signin":"",method:"post",onSubmit:g?E:o,onChange:y},z.createElement(IF,null),z.createElement(Fe,{direction:"column"},z.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:t},z.createElement(nb,null,z.createElement("legend",null,em())),z.createElement(Mo,null)),z.createElement(Gr,null),z.createElement(Jt,{isDisabled:t,type:"submit",variation:"primary",isLoading:t,loadingText:Ece()},g?S():em()),g&&z.createElement(Jt,{onClick:C,size:"small",variation:"link",isDisabled:t||!m,title:m?void 0:Tce()},Ace()),z.createElement(f,null))))}const Rce=()=>{const{toForgotPassword:t}=St(e=>[e.toForgotPassword]);return z.createElement($e,{"data-amplify-footer":""},z.createElement(Jt,{onClick:t,size:"small",variation:"link"},Cce()))};Si.Footer=Rce;Si.Header=function(){return null};const{getCreateAccountText:CL,getCreatingAccountText:Ice,getCreateAccountWithEmailText:Oce,getCreateAccountWithPasswordText:Nce,getCreateAccountWithSmsText:Mce,getOrText:Pce}=kn;function Xs(){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=Xs.Header,FormFields:f=Xs.FormFields,Footer:p=Xs.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 Oce();case"SMS_OTP":return Mce();case"PASSWORD":return m?Nce():CL();default:return CL()}},_=T=>R=>{R.preventDefault();const M=R.target.closest("form");if(M){if(!M.__authMethod){const O=document.createElement("input");O.name="__authMethod",M.appendChild(O)}M.__authMethod.type="hidden",M.__authMethod.value=T,M.requestSubmit()}};return z.createElement($e,null,z.createElement(c,null),z.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-signup":"",method:"post",onChange:o,onSubmit:u,onBlur:a},z.createElement(IF,null),z.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:e},z.createElement(Fe,{direction:"column"},z.createElement(f,{includePassword:!C}),z.createElement(Gr,null)),z.createElement(Jt,{isDisabled:(!m||S.length==0)&&t||e,isFullWidth:!0,type:"submit",variation:"primary",isLoading:e,loadingText:Ice(),onClick:_(y)},w(y)),m&&S.length>0&&z.createElement(z.Fragment,null,z.createElement(Fe,{justifyContent:"center",padding:"medium 0"},Pce()),S.map(T=>z.createElement(Jt,{key:T,isDisabled:e,isFullWidth:!0,type:"button",variation:"primary",onClick:_(T)},w(T)))),z.createElement(p,null))))}Xs.Header=function(){return null};Xs.FormFields=function(){return z.createElement(Mo,null)};Xs.Footer=function(){return null};const{getSignInTabText:kce,getSignUpTabText:Dce}=kn,Lce=({className:t,hideSignUp:e,variation:n})=>{const{route:r,toSignIn:s,toSignUp:o}=St(a=>[a.route,a.toSignIn,a.toSignUp]);return z.createElement(qr,{className:t,variation:n},e?z.createElement($e,{"data-amplify-router-content":""},r==="signIn"&&z.createElement(Si,null)):z.createElement(Sl.Container,{value:r,isLazy:!0,onValueChange:a=>{a!==r&&(a==="signIn"?s():o())}},z.createElement(Sl.List,{spacing:"equal",indicatorPosition:"top"},z.createElement(Sl.Item,{value:"signIn"},kce()),z.createElement(Sl.Item,{value:"signUp"},Dce())),z.createElement(Sl.Panel,{value:"signIn","data-amplify-router-content":""},z.createElement(Si,null)),z.createElement(Sl.Panel,{value:"signUp","data-amplify-router-content":""},z.createElement(Xs,null))))},{getAccountRecoveryInfoText:Uce,getSkipText:Fce}=kn,Hl=({className:t,variation:e})=>{const{isPending:n}=St(u=>[u.isPending]),{handleChange:r,handleSubmit:s}=ds(),{components:{ConfirmVerifyUser:{Header:o=Hl.Header,Footer:a=Hl.Footer}}}=cs();return z.createElement(qr,{className:t,variation:e},z.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-confirmverifyuser":"",method:"post",onChange:r,onSubmit:s},z.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:n},z.createElement(o,null),z.createElement(Fe,{direction:"column"},z.createElement(Mo,null)),z.createElement(Gr,null),z.createElement(ob,{cancelButtonText:Fce(),cancelButtonSendType:"SKIP"}),z.createElement(a,null))))};Hl.Header=function(){return z.createElement(_r,{level:3},Uce())};Hl.Footer=function(){return null};const{getSkipText:zce,getVerifyText:jce,getVerifyContactText:Bce,getAccountRecoveryInfoText:Hce}=kn,$ce=t=>Object.entries(t).map(([e,n],r)=>{const s=Wy[e].label;return z.createElement(FT,{name:"unverifiedAttr",value:e,key:e,defaultChecked:r===0},ye(s),":"," ",tre(s,n))}),$l=({className:t,variation:e})=>{const{components:{VerifyUser:{Header:n=$l.Header,Footer:r=$l.Footer}}}=cs(),{isPending:s,unverifiedUserAttributes:o}=St(({isPending:p,unverifiedUserAttributes:g})=>[p,g]),{handleChange:a,handleSubmit:u}=ds(),c=s?z.createElement(z.Fragment,null,"Verifying…"):z.createElement(z.Fragment,null,jce()),f=z.createElement(zT,{legend:Bce(),name:"verify_context",isDisabled:s,legendHidden:!0},$ce(o));return z.createElement(qr,{className:t,variation:e},z.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-verifyuser":"",method:"post",onChange:a,onSubmit:u},z.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:s},z.createElement(n,null),f,z.createElement(Gr,null),z.createElement(ob,{cancelButtonText:zce(),cancelButtonSendType:"SKIP",submitButtonText:c}),z.createElement(r,null))))};$l.Header=function(){return z.createElement(_r,{level:3},Hce())};$l.Footer=function(){return null};const{getChallengeText:qce,getDeliveryMessageText:Wce,getDeliveryMethodText:Gce}=kn,ql=({className:t,variation:e})=>{const{isPending:n,challengeName:r,codeDeliveryDetails:s}=St(p=>[p.isPending,p.challengeName,p.codeDeliveryDetails]),{handleChange:o,handleSubmit:a}=ds(),{components:{ConfirmSignIn:{Header:u=ql.Header,Footer:c=ql.Footer}}}=cs(),f=WT(r)&&s;return z.createElement(qr,{className:t,variation:e},z.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-confirmsignin":"",method:"post",onChange:o,onSubmit:a},z.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:n},z.createElement(u,null),z.createElement(Fe,{direction:"column"},f&&z.createElement(Ts,{className:"amplify-authenticator__subtitle"},Wce(s)),z.createElement(Mo,null),z.createElement(Gr,null)),z.createElement(sb,null),z.createElement(c,null))))};function Vce(){const{challengeName:t,codeDeliveryDetails:e}=St(({challengeName:r,codeDeliveryDetails:s})=>[r,s]),n=WT(t)&&e;return z.createElement(z.Fragment,null,z.createElement(_r,{level:3},qce(t)),n&&z.createElement(_r,{level:5},Gce(e)))}ql.Header=Vce;ql.Footer=function(){return null};const{getResendCodeText:Kce,getResetYourPasswordText:Yce}=kn,Wl=({className:t,variation:e})=>{const{isPending:n}=St(c=>[c.isPending]),{handleBlur:r,handleChange:s,handleSubmit:o}=ds(),{components:{ConfirmResetPassword:{Header:a=Wl.Header,Footer:u=Wl.Footer}}}=cs();return z.createElement(qr,{className:t,variation:e},z.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-confirmresetpassword":"",method:"post",onSubmit:o,onChange:s,onBlur:r},z.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:n},z.createElement(a,null),z.createElement(Fe,{direction:"column"},z.createElement(Mo,null)),z.createElement(Gr,null),z.createElement(ob,{cancelButtonSendType:"RESEND",cancelButtonText:Kce()}),z.createElement(u,null))))};Wl.Header=function(){const e=Yce();return z.createElement(_r,{level:3},e)};Wl.Footer=function(){return null};const{getBackToSignInText:Zce,getSendingText:Xce,getSendCodeText:Qce,getResetYourPasswordText:Jce}=kn,Fa=({className:t,variation:e})=>{const{isPending:n}=St(u=>[u.isPending]),{handleChange:r,handleSubmit:s}=ds(),{components:{ForgotPassword:{Header:o=Fa.Header,Footer:a=Fa.Footer}}}=cs();return z.createElement(qr,{className:t,variation:e},z.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-forgotpassword":"",method:"post",onChange:r,onSubmit:s},z.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:n},z.createElement(o,null),z.createElement(Fe,{direction:"column"},z.createElement(Mo,null)),z.createElement(Gr,null),z.createElement(ob,{cancelButtonText:Zce(),cancelButtonSendType:"SIGN_IN",submitButtonText:n?z.createElement(z.Fragment,null,Xce(),"…"):z.createElement(z.Fragment,null,Qce())}),z.createElement(a,null))))};Fa.Header=function(){return z.createElement(_r,{level:3},Jce())};Fa.Footer=function(){return null};const{getMfaTypeLabelByValue:ede,getSelectMfaTypeByChallengeName:tde,getSelectMfaTypeText:nde}=kn,za=({className:t,variation:e})=>{const{isPending:n,allowedMfaTypes:r=[]}=St(c=>[c.isPending,c.allowedMfaTypes]),{handleChange:s,handleSubmit:o}=ds(),{components:{SelectMfaType:{Header:a=za.Header,Footer:u=za.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(zT,{name:"mfa_type",legend:nde(),legendHidden:!0,isDisabled:n,isRequired:!0},r.map((c,f)=>A.createElement(FT,{name:"mfa_type",key:c,value:c,defaultChecked:f===0},ede(c)))),A.createElement(Gr,null)),A.createElement(sb,null),A.createElement(u,null))))};za.Header=function(){const{challengeName:e}=St(n=>[n.challengeName]);return A.createElement(_r,{level:3},tde(e))};za.Footer=function(){return null};const{getSetupEmailText:rde}=kn,ja=({className:t,variation:e})=>{const{isPending:n}=St(u=>[u.isPending]),{handleChange:r,handleSubmit:s}=ds(),{components:{SetupEmail:{Header:o=ja.Header,Footer:a=ja.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(Mo,null),A.createElement(Gr,null)),A.createElement(sb,null),A.createElement(a,null))))};ja.Header=function(){return A.createElement(_r,{level:3},rde())};ja.Footer=function(){return null};const{getSignInWithPasswordText:a_,getSignInWithEmailText:sde,getSignInWithSmsText:ode,getSignInWithPasskeyText:ide,getSigningInText:ade,getBackToSignInText:lde,getOrText:ude,getUsernameLabelByLoginMechanism:cde}=kn,dde=t=>{switch(t){case"EMAIL_OTP":return sde();case"SMS_OTP":return ode();case"WEB_AUTHN":return ide();case"PASSWORD":return a_();default:return a_()}},fde=({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(),p=s??[],g=p.includes("PASSWORD"),m=p.filter(E=>E!=="PASSWORD"),y=E=>{a({method:E})},S=cde(u);return z.createElement(qr,{className:t,variation:e},z.createElement("form",{"data-amplify-form":!0,"data-amplify-authenticator-signinselect":!0,method:"post",onSubmit:f,onChange:c},z.createElement(Fe,{direction:"column"},z.createElement(sp,{label:S,name:"username",value:r,isReadOnly:!0,isDisabled:!0}),g&&z.createElement(z.Fragment,null,z.createElement(UT,{label:"Password",name:"password",autoComplete:"current-password",isDisabled:n}),z.createElement(Jt,{isDisabled:n,type:"submit",variation:"primary",isFullWidth:!0,isLoading:n,loadingText:ade()},a_())),g&&m.length>0&&z.createElement(LT,{label:ude()}),m.length>0&&z.createElement(Fe,{direction:"column",gap:"0.5rem"},m.map(E=>z.createElement(Jt,{key:E,variation:"primary",isFullWidth:!0,isDisabled:n,onClick:()=>y(E)},dde(E)))),z.createElement(Gr,null),z.createElement(Jt,{onClick:o,size:"small",variation:"link",isDisabled:n},lde()))))},hde=t=>{const{className:e,...n}=t;return A.createElement($e,{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"})))},pde=t=>{const{className:e,...n}=t;return A.createElement($e,{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:gde,getPasskeyPromptDescriptionText:mde,getCreatePasskeyText:vde,getRegisteringText:yde,getContinueWithoutPasskeyText:bde,getPasskeyCreatedSuccessText:Sde,getPasskeyRegisteredText:Ede,getPasskeyRegistrationFailedText:Cde,getPasskeyLabelText:wde,getExistingPasskeysText:xde,getSetupAnotherPasskeyText:_de,getContinueText:Ade}=kn;function Tde({className:t,variation:e}){const[n,r]=z.useState(!1),[s,o]=z.useState(null),[a,u]=z.useState(!1),[c,f]=z.useState([]),{submitForm:p,isPending:g}=St(w=>[w.submitForm,w.isPending]),m=z.useCallback(async()=>{try{const w=await gT();f(w.credentials||[])}catch{}},[]);z.useEffect(()=>{n&&m()},[n,m]);const y=z.useCallback(()=>{p({type:"SKIP"})},[p]),S=z.useCallback(()=>{p({type:"SUBMIT"})},[p]),E=z.useCallback(async()=>{try{o(null),u(!0),await Cne(),r(!0)}catch(w){const _=w,T=_.name??"",R=_.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(Cde())}finally{u(!1)}},[y]);if(n)return z.createElement(qr,{className:t,variation:e},z.createElement(Fe,{direction:"column",padding:"large","data-amplify-authenticator-passkeyprompt":""},z.createElement(Fe,{direction:"column",gap:"xs"},z.createElement(hde,{className:"amplify-authenticator__passkey-success-icon"}),z.createElement(_r,{level:4},Sde()),z.createElement(Ts,null,Ede())),c.length>0&&z.createElement($e,{marginTop:"large"},z.createElement(_r,{level:5},xde()),z.createElement(Fe,{direction:"column",gap:"xs",marginTop:"xs"},c.map((w,_)=>z.createElement($e,{key:w.credentialId,className:"amplify-authenticator__passkey-credential-item"},z.createElement(Ts,{fontSize:"small"},w.friendlyCredentialName??`${wde()} ${_+1}`))))),z.createElement(Fe,{direction:"column",gap:"medium",marginTop:"large"},z.createElement(Jt,{onClick:()=>{r(!1),E()},variation:"link"},_de()),z.createElement(Jt,{onClick:()=>S(),variation:"primary",isFullWidth:!0},Ade()))));const C=g||a;return z.createElement(qr,{className:t,variation:e},z.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-passkeyprompt":""},z.createElement(Fe,{direction:"column",gap:"medium"},z.createElement(_r,{level:4},gde()),z.createElement(Ts,null,mde()),z.createElement(Fe,{justifyContent:"center"},z.createElement(pde,{className:"amplify-authenticator__passkey-icon"})),z.createElement(Fe,{direction:"column",gap:"medium"},z.createElement(Jt,{onClick:()=>{E()},variation:"primary",isDisabled:C,isLoading:a,loadingText:yde()},vde()),z.createElement(Jt,{onClick:y,variation:"link",isDisabled:C},bde()),s&&z.createElement(Ts,{className:"amplify-authenticator__passkey-error"},s),z.createElement(Gr,null)))))}function wL(){return null}const Rde=t=>{switch(t){case"authenticated":case"idle":case"setup":case"transition":return wL;case"confirmSignUp":return Bl;case"confirmSignIn":return ql;case"selectMfaType":return za;case"setupEmail":return ja;case"setupTotp":return Ua;case"signIn":case"signUp":return Lce;case"signInSelectAuthFactor":return fde;case"passkeyPrompt":return Tde;case"forceNewPassword":return Zs;case"forgotPassword":return Fa;case"confirmResetPassword":return Wl;case"verifyUser":return $l;case"confirmVerifyUser":return Hl;default:return console.warn(`Unhandled Authenticator route - please open an issue: ${t}`),wL}};function Ide({className:t,hideSignUp:e,variation:n}){const{route:r}=St(({route:o})=>[o]),s=A.useMemo(()=>Rde(r),[r]);return z.createElement(s,{className:t,hideSignUp:oce(r)?e:void 0,variation:n})}const Ode={Header:()=>null,SignIn:{Header:Si.Header,Footer:Si.Footer},SignUp:{Header:Xs.Header,FormFields:Xs.FormFields,Footer:Xs.Footer},ConfirmSignUp:{Header:Bl.Header,Footer:Bl.Footer},SelectMfaType:{Header:za.Header,Footer:za.Footer},SetupEmail:{Header:ja.Header,Footer:ja.Footer},SetupTotp:{Header:Ua.Header,Footer:Ua.Footer},ConfirmResetPassword:{Header:Wl.Header,Footer:Wl.Footer},ConfirmSignIn:{Header:ql.Header,Footer:ql.Footer},VerifyUser:{Header:$l.Header,Footer:$l.Footer},ConfirmVerifyUser:{Header:Hl.Header,Footer:Hl.Footer},ForceNewPassword:{Header:Zs.Header,Footer:Zs.Footer,FormFields:Zs.FormFields},ForgotPassword:{Header:Fa.Header,Footer:Fa.Footer},Footer:()=>null};function Nde({children:t,className:e,components:n,formFields:r,hideSignUp:s,initialState:o,loginMechanisms:a,passwordSettings:u,passwordless:c,signUpAttributes:f,services:p,socialProviders:g,variation:m}){_ue({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:_,signOut:T,user:R})=>[_,T,R]);nle({initialState:o,loginMechanisms:a,passwordSettings:u,passwordless:c,services:p,signUpAttributes:f,socialProviders:g,formFields:r});const C=A.useMemo(()=>({components:{...Ode,...n}}),[n]);return y==="authenticated"||y==="signOut"?t?A.createElement(A.Fragment,null,yi(t)?t({signOut:S,user:E}):t):null:A.createElement(wF.Provider,{value:C},A.createElement(Ide,{className:e,hideSignUp:s,variation:m}))}function Po(t){return sle({componentName:"Authenticator",packageName:"react",version:xue}),A.createElement(oF,null,A.createElement(Nde,{...t}))}Po.Provider=oF;Po.ForgotPassword=Fa;Po.SetupTotp=Ua;Po.SignIn=Si;Po.SignUp=Xs;Po.ForceNewPassword=Zs;Po.SelectMfaType=za;Po.SetupEmail=ja;const OF=({cssText:t,...e})=>t===void 0||/<\/style/i.test(t)?null:A.createElement("style",{...e,dangerouslySetInnerHTML:{__html:t}});OF.displayName="Style";const NF=({theme:t,...e})=>{if(!t)return null;const{name:n,cssText:r}=t;return A.createElement(OF,{...e,cssText:r,id:`amplify-theme-${n}`})};NF.displayName="ThemeStyle";function Mde({children:t,colorMode:e,direction:n="ltr",nonce:r,theme:s}){const o=A.useMemo(()=>({theme:Xy(s),colorMode:e}),[s,e]);return A.createElement(iF.Provider,{value:o},A.createElement(tue,{dir:n},A.createElement("div",{"data-amplify-theme":o.theme.name,"data-amplify-color-mode":e,dir:n},t),s?A.createElement(NF,{theme:o.theme,nonce:r}):null))}const Pde=({configured:t,authStatus:e})=>e==="authenticated",kde=t=>t?t.signInDetails?.loginId??t.username??null:null,Dde=({children:t,fallback:e=null})=>{const{authStatus:n,signOut:r,user:s}=St(o=>[o.authStatus,o.signOut,o.user]);return Pde({configured:!0,authStatus:n})?D.jsx(D.Fragment,{children:t({email:kde(s),signOut:()=>r()})}):D.jsx(D.Fragment,{children:e})},Lde=({children:t,fallback:e=null})=>_y()?D.jsx(Dde,{fallback:e,children:t}):D.jsx(D.Fragment,{children:e}),xL='system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Ri=t=>`var(${t})`,un=Ri("--accent"),Ude=Ri("--accent-hover"),_L=Ri("--accent-soft"),Tf=Ri("--accent-fg"),AL=Ri("--surface"),tc=Ri("--fg"),Fde=Ri("--surface-sunken"),tm=Ri("--fg-muted"),Rf=Ri("--line"),zde=Xy({name:"remit",tokens:{colors:{brand:{primary:{10:{value:_L},20:{value:_L},40:{value:un},60:{value:un},80:{value:un},90:{value:un},100:{value:un}}},background:{primary:{value:AL},secondary:{value:Fde}},font:{primary:{value:tc},secondary:{value:tm},tertiary:{value:tm},interactive:{value:un},inverse:{value:Tf},hover:{value:un},focus:{value:un},active:{value:un}},border:{primary:{value:Rf},secondary:{value:Rf},focus:{value:un}}},fonts:{default:{variable:{value:xL},static:{value:xL}}},radii:{small:{value:"3px"},medium:{value:"5px"},large:{value:"7px"}},components:{authenticator:{router:{borderColor:{value:Rf},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:AL}},form:{padding:{value:"1.75rem"}},orContainer:{color:{value:tm}}},button:{color:{value:tc},primary:{backgroundColor:{value:un},color:{value:Tf},_hover:{backgroundColor:{value:Ude},color:{value:Tf}},_focus:{backgroundColor:{value:un},color:{value:Tf}},_active:{backgroundColor:{value:un},color:{value:Tf}}},link:{color:{value:un},_hover:{color:{value:un},backgroundColor:{value:"transparent"}},_focus:{color:{value:un},backgroundColor:{value:"transparent"}},_active:{color:{value:un},backgroundColor:{value:"transparent"}}}},fieldcontrol:{color:{value:tc},borderColor:{value:Rf},_focus:{borderColor:{value:un},boxShadow:{value:`0 0 0 2px ${un}`}}},field:{label:{color:{value:tc}}},tabs:{borderColor:{value:Rf},item:{color:{value:tm},backgroundColor:{value:"transparent"},_active:{color:{value:un},borderColor:{value:un},backgroundColor:{value:"transparent"}},_hover:{color:{value:un}},_focus:{color:{value:un}}}},heading:{color:{value:tc}},text:{color:{value:tc}}}}}),jde={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"}}},Bde=()=>D.jsx(Hx,{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:D.jsxs("span",{className:"flex items-center gap-2",children:[D.jsx("strong",{className:"font-semibold shrink-0",children:"Local dev"}),D.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."}),D.jsx("span",{className:"truncate sm:hidden",children:"— no Cognito; signed out"})]})}),Hde=()=>D.jsx(F8,{note:J8({betterAuthEnabled:!1,cognitoConfigured:_y()})}),$de=({children:t})=>{const{authStatus:e}=St(n=>[n.authStatus]);return e==="authenticated"?D.jsx(D.Fragment,{children:t}):e==="configuring"?D.jsx(KA,{}):D.jsx(Mde,{theme:zde,children:D.jsxs(U8,{children:[D.jsx(z8,{}),D.jsx(Po,{hideSignUp:!1,formFields:jde,components:{Footer:Hde}})]})})},qde=({children:t})=>_y()?D.jsx(Po.Provider,{children:D.jsx($de,{children:t})}):D.jsxs("div",{className:"pt-7 sm:pt-10 [&_#main-content]:h-[calc(100dvh-1.75rem)] sm:[&_#main-content]:h-[calc(100dvh-2.5rem)]",children:[D.jsx(Bde,{}),t]}),MF=60;let Rc=null;const PF=()=>Math.floor(Date.now()/1e3),Wde=t=>t!==null&&t.expiresAt-MF>PF(),Gde=async()=>{const e=(await by()).tokens?.idToken;return e?(Rc={value:e.toString(),expiresAt:e.payload.exp??PF()+MF},Rc.value):(Rc=null,null)},Vde=async()=>_y()?Wde(Rc)?Rc.value:Gde():null,Kde=()=>{Rc=null},Tv={configure:B6,getToken:Vde,resetToken:Kde,Shell:qde,Account:Lde},Yde=({children:t})=>Ay()?D.jsx(Sv.Shell,{children:t}):D.jsx(Tv.Shell,{children:t}),Zde=t=>Ay()?D.jsx(Sv.Account,{...t}):D.jsx(Tv.Account,{...t}),Xde={configure:B6,getToken:()=>Ay()?Sv.getToken():Tv.getToken(),resetToken:()=>{Sv.resetToken(),Tv.resetToken()},Shell:Yde,Account:Zde};var op=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(){}},Qde=class extends op{#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"}},GT=new Qde,Jde={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},efe=class{#e=Jde;#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)}},wl=new efe;function tfe(t){setTimeout(t,0)}var nfe=typeof window>"u"||"Deno"in globalThis;function Ur(){}function rfe(t,e){return typeof t=="function"?t(e):t}function l_(t){return typeof t=="number"&&t>=0&&t!==1/0}function kF(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Oa(t,e){return typeof t=="function"?t(e):t}function is(t,e){return typeof t=="function"?t(e):t}function TL(t,e){const{type:n="all",exact:r,fetchStatus:s,predicate:o,queryKey:a,stale:u}=t;if(a){if(r){if(e.queryHash!==VT(a,e.options))return!1}else if(!xh(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 RL(t,e){const{exact:n,status:r,predicate:s,mutationKey:o}=t;if(o){if(!e.options.mutationKey)return!1;if(n){if(wh(e.options.mutationKey)!==wh(o))return!1}else if(!xh(e.options.mutationKey,o))return!1}return!(r&&e.state.status!==r||s&&!s(e))}function VT(t,e){return(e?.queryKeyHashFn||wh)(t)}function wh(t){return JSON.stringify(t,(e,n)=>c_(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function xh(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(n=>xh(t[n],e[n])):!1}var sfe=Object.prototype.hasOwnProperty;function DF(t,e,n=0){if(t===e)return t;if(n>500)return e;const r=IL(t)&&IL(e);if(!r&&!(c_(t)&&c_(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 p=0;p<u;p++){const g=r?p:a[p],m=t[g],y=e[g];if(m===y){c[g]=m,(r?p<o:sfe.call(t,g))&&f++;continue}if(m===null||y===null||typeof m!="object"||typeof y!="object"){c[g]=y;continue}const S=DF(m,y,n+1);c[g]=S,S===m&&f++}return o===u&&f===o?t:c}function u_(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 IL(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function c_(t){if(!OL(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!OL(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function OL(t){return Object.prototype.toString.call(t)==="[object Object]"}function ofe(t){return new Promise(e=>{wl.setTimeout(e,t)})}function d_(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?DF(t,e):e}function rAe(t){return t}function ife(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function afe(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var KT=Symbol();function LF(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:!t.queryFn||t.queryFn===KT?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function UF(t,e){return typeof t=="function"?t(...e):!!t}function lfe(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 _h=(()=>{let t=()=>nfe;return{isServer(){return t()},setIsServer(e){t=e}}})();function f_(){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 ufe=tfe;function cfe(){let t=[],e=0,n=u=>{u()},r=u=>{u()},s=ufe;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 tr=cfe(),dfe=class extends op{#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}},Rv=new dfe;function ffe(t){return Math.min(1e3*2**t,3e4)}function FF(t){return(t??"online")==="online"?Rv.isOnline():!0}var h_=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function zF(t){let e=!1,n=0,r;const s=f_(),o=()=>s.status!=="pending",a=E=>{if(!o()){const C=new h_(E);m(C),t.onCancel?.(C)}},u=()=>{e=!0},c=()=>{e=!1},f=()=>GT.isFocused()&&(t.networkMode==="always"||Rv.isOnline())&&t.canRun(),p=()=>FF(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 _=t.retry??(_h.isServer()?0:3),T=t.retryDelay??ffe,R=typeof T=="function"?T(n,w):T,M=_===!0||typeof _=="number"&&n<_||typeof _=="function"&&_(n,w);if(e||!M){m(w);return}n++,t.onFail?.(n,w),ofe(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:p,start:()=>(p()?S():y().then(S),s)}}var jF=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),l_(this.gcTime)&&(this.#e=wl.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(_h.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(wl.clearTimeout(this.#e),this.#e=void 0)}};function hfe(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 p=!1;const g=S=>{lfe(S,()=>e.signal,()=>p=!0)},m=LF(e.options,e.fetchOptions),y=async(S,E,C)=>{if(p)return Promise.reject(e.signal.reason);if(E==null&&S.pages.length)return Promise.resolve(S);const _=(()=>{const O={client:e.client,queryKey:e.queryKey,pageParam:E,direction:C?"backward":"forward",meta:e.options.meta};return g(O),O})(),T=await m(_),{maxPages:R}=e.options,M=C?afe:ife;return{pages:M(S.pages,T,R),pageParams:M(S.pageParams,E,R)}};if(s&&o.length){const S=s==="backward",E=S?BF:p_,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:p_(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 p_(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 BF(t,{pages:e,pageParams:n}){return e.length>0?t.getPreviousPageParam?.(e[0],e,n[0],n):void 0}function sAe(t,e){return e?p_(t,e)!=null:!1}function oAe(t,e){return!e||!t.getPreviousPageParam?!1:BF(t,e)!=null}var pfe=class extends jF{#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=ML(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=ML(this.options);e.data!==void 0&&(this.setState(NL(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(t,e){const n=d_(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(Ur).catch(Ur):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===KT||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Oa(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:!kF(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=LF(this.options,e),p=(()=>{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,p,this):c(p)},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"?hfe(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=zF({initialPromise:e?.initialPromise,fn:a.fetchFn,onCancel:c=>{c instanceof h_&&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 h_){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,...HF(n.data,this.options),fetchMeta:t.meta??null};case"success":const r={...n,...NL(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),tr.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:t})})}};function HF(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:FF(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function NL(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function ML(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 gfe=class extends op{constructor(t,e){super(),this.options=e,this.#e=t,this.#i=null,this.#a=f_(),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),PL(this.#t,this.options)?this.#h():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return g_(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return g_(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&&!u_(this.options,e)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&kL(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)||Oa(this.options.staleTime,this.#t)!==Oa(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 vfe(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(Ur)),e}#m(){this.#S();const t=Oa(this.options.staleTime,this.#t);if(_h.isServer()||this.#r.isStale||!l_(t))return;const n=kF(this.#r.dataUpdatedAt,t)+1;this.#d=wl.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,!(_h.isServer()||is(this.options.enabled,this.#t)===!1||!l_(this.#u)||this.#u===0)&&(this.#f=wl.setInterval(()=>{(this.options.refetchIntervalInBackground||GT.isFocused())&&this.#h()},this.#u))}#b(){this.#m(),this.#y(this.#v())}#S(){this.#d!==void 0&&(wl.clearTimeout(this.#d),this.#d=void 0)}#E(){this.#f!==void 0&&(wl.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 p={...f},g=!1,m;if(e._optimisticResults){const P=this.hasListeners(),k=!P&&PL(t,e),H=P&&kL(t,n,e,r);(k||H)&&(p={...p,...HF(f.data,t.options)}),e._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:y,errorUpdatedAt:S,status:E}=p;m=p.data;let C=!1;if(e.placeholderData!==void 0&&m===void 0&&E==="pending"){let P;s?.isPlaceholderData&&e.placeholderData===a?.placeholderData?(P=s.data,C=!0):P=typeof e.placeholderData=="function"?e.placeholderData(this.#p?.state.data,this.#p):e.placeholderData,P!==void 0&&(E="success",m=d_(s?.data,P,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=d_(s?.data,m,e),this.#l=m,this.#i=null}catch(P){this.#i=P}this.#i&&(y=this.#i,m=this.#l,S=Date.now(),E="error");const w=p.fetchStatus==="fetching",_=E==="pending",T=E==="error",R=_&&w,M=m!==void 0,I={status:E,fetchStatus:p.fetchStatus,isPending:_,isSuccess:E==="success",isError:T,isInitialLoading:R,isLoading:R,data:m,dataUpdatedAt:p.dataUpdatedAt,error:y,errorUpdatedAt:S,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:p.dataUpdateCount>c.dataUpdateCount||p.errorUpdateCount>c.errorUpdateCount,isFetching:w,isRefetching:w&&!_,isLoadingError:T&&!M,isPaused:p.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:T&&M,isStale:YT(t,e),refetch:this.refetch,promise:this.#a,isEnabled:is(e.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const P=I.data!==void 0,k=I.status==="error"&&!P,H=W=>{k?W.reject(I.error):P&&W.resolve(I.data)},F=()=>{const W=this.#a=I.promise=f_();H(W)},j=this.#a;switch(j.status){case"pending":t.queryHash===n.queryHash&&H(j);break;case"fulfilled":(k||I.data!==j.value)&&F();break;case"rejected":(!k||I.error!==j.reason)&&F();break}}return I}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),u_(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){tr.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function mfe(t,e){return is(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&is(e.retryOnMount,t)===!1)}function PL(t,e){return mfe(t,e)||t.state.data!==void 0&&g_(t,e,e.refetchOnMount)}function g_(t,e,n){if(is(e.enabled,t)!==!1&&Oa(e.staleTime,t)!=="static"){const r=typeof n=="function"?n(t):n;return r==="always"||r!==!1&&YT(t,e)}return!1}function kL(t,e,n,r){return(t!==e||is(r.enabled,t)===!1)&&(!n.suspense||t.state.status!=="error")&&YT(t,n)}function YT(t,e){return is(e.enabled,t)!==!1&&t.isStaleByTime(Oa(e.staleTime,t))}function vfe(t,e){return!u_(t.getCurrentResult(),e)}var yfe=class extends jF{#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||bfe(),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=zF({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),tr.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(t)}),this.#n.notify({mutation:this,type:"updated",action:t})})}};function bfe(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var $F=class extends op{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 yfe({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=nm(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=nm(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=nm(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=nm(t);return typeof e=="string"?this.#t.get(e)?.find(r=>r!==t&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){tr.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=>RL(e,n))}findAll(t={}){return this.getAll().filter(e=>RL(t,e))}notify(t){tr.batch(()=>{this.listeners.forEach(e=>{e(t)})})}resumePausedMutations(){const t=this.getAll().filter(e=>e.state.isPaused);return tr.batch(()=>Promise.all(t.map(e=>e.continue().catch(Ur))))}};function nm(t){return t.options.scope?.id}var qF=class extends op{constructor(t={}){super(),this.config=t,this.#e=new Map}#e;build(t,e,n){const r=e.queryKey,s=e.queryHash??VT(r,e);let o=this.get(s);return o||(o=new pfe({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(){tr.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=>TL(e,n))}findAll(t={}){const e=this.getAll();return Object.keys(t).length>0?e.filter(n=>TL(t,n)):e}notify(t){tr.batch(()=>{this.listeners.forEach(e=>{e(t)})})}onFocus(){tr.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){tr.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Sfe=class{#e;#t;#n;#r;#o;#s;#a;#i;constructor(t={}){this.#e=t.queryCache||new qF,this.#t=t.mutationCache||new $F,this.#n=t.defaultOptions||{},this.#r=new Map,this.#o=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#a=GT.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#i=Rv.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(Oa(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=rfe(e,o);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(t,e,n){return tr.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;tr.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=this.#e;return tr.batch(()=>(n.findAll(t).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const n={revert:!0,...e},r=tr.batch(()=>this.#e.findAll(t).map(s=>s.cancel(n)));return Promise.all(r).then(Ur).catch(Ur)}invalidateQueries(t,e={}){return tr.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=tr.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(Ur)),s.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(Ur)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=this.#e.build(this,e);return n.isStaleByTime(Oa(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(Ur).catch(Ur)}fetchInfiniteQuery(t){return t._type="infinite",this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(Ur).catch(Ur)}ensureInfiniteQueryData(t){return t._type="infinite",this.ensureQueryData(t)}resumePausedMutations(){return Rv.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(wh(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...this.#r.values()],n={};return e.forEach(r=>{xh(t,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(t,e){this.#o.set(wh(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...this.#o.values()],n={};return e.forEach(r=>{xh(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=VT(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===KT&&(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()}},WF=A.createContext(void 0),GF=t=>{const e=A.useContext(WF);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},Efe=({client:t,children:e})=>(A.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),D.jsx(WF.Provider,{value:t,children:e})),VF=A.createContext(!1),Cfe=()=>A.useContext(VF);VF.Provider;function wfe(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var xfe=A.createContext(wfe()),_fe=()=>A.useContext(xfe),Afe=(t,e,n)=>{const r=n?.state.error&&typeof t.throwOnError=="function"?UF(t.throwOnError,[n.state.error,n]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||r)&&(e.isReset()||(t.retryOnMount=!1))},Tfe=t=>{A.useEffect(()=>{t.clearReset()},[t])},Rfe=({result:t,errorResetBoundary:e,throwOnError:n,query:r,suspense:s})=>t.isError&&!e.isReset()&&!t.isFetching&&r&&(s&&t.data===void 0||UF(n,[t.error,r])),Ife=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))}},Ofe=(t,e)=>t.isLoading&&t.isFetching&&!e,Nfe=(t,e)=>t?.suspense&&e.isPending,DL=(t,e,n)=>e.fetchOptimistic(t).catch(()=>{n.clearReset()});function Mfe(t,e,n){const r=Cfe(),s=_fe(),o=GF(),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,Ife(a),Afe(a,s,u),Tfe(s);const f=!o.getQueryCache().get(a.queryHash),[p]=A.useState(()=>new e(o,a)),g=p.getOptimisticResult(a),m=!r&&c;if(A.useSyncExternalStore(A.useCallback(y=>{const S=m?p.subscribe(tr.batchCalls(y)):Ur;return p.updateResult(),S},[p,m]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),A.useEffect(()=>{p.setOptions(a)},[a,p]),Nfe(a,g))throw DL(a,p,s);if(Rfe({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&&!_h.isServer()&&Ofe(g,r)&&(f?DL(a,p,s):u?.promise)?.catch(Ur).finally(()=>{p.updateResult()}),a.notifyOnChangeProps?g:p.trackResult(g)}function Pfe(t,e){return Mfe(t,gfe)}const kfe="modulepreload",Dfe=function(t){return"/"+t},LL={},Wn=function(e,n,r){let s=Promise.resolve();if(n&&n.length>0){let c=function(f){return Promise.all(f.map(p=>Promise.resolve(p).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=Dfe(f),f in LL)return;LL[f]=!0;const p=f.endsWith(".css"),g=p?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${g}`))return;const m=document.createElement("link");if(m.rel=p?"stylesheet":kfe,p||(m.as="script"),m.crossOrigin="",m.href=f,u&&m.setAttribute("nonce",u),document.head.appendChild(m),p)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 UL=A.use,Sc=typeof window<"u"?A.useLayoutEffect:A.useEffect;function Dw(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 Lfe(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 Ufe(t){const e=A.useRef(null);return A.useImperativeHandle(t,()=>e.current,[]),e}const KF=!1;function Ah(t){return t[t.length-1]}function Ffe(t){return typeof t=="function"}function xl(t,e){return Ffe(t)?t(e):t}const YF=Object.prototype.hasOwnProperty,FL=Object.prototype.propertyIsEnumerable;function ZF(t){for(const e in t)if(YF.call(t,e))return!0;return!1}const zfe=()=>Object.create(null),yl=(t,e)=>_l(t,e,zfe);function _l(t,e,n=()=>({}),r=0){if(t===e)return t;if(r>500)return e;const s=e,o=BL(t)&&BL(s);if(!o&&!(Iv(t)&&Iv(s)))return s;const a=o?t:zL(t);if(!a)return s;const u=o?s:zL(s);if(!u)return s;const c=a.length,f=u.length,p=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){p[y]=S,(o?m<c:YF.call(t,y))&&g++;continue}if(S===null||E===null||typeof S!="object"||typeof E!="object"){p[y]=E;continue}const C=_l(S,E,n,r+1);p[y]=C,C===S&&g++}return c===f&&g===c?t:p}function zL(t){const e=Object.getOwnPropertyNames(t);for(const s of e)if(!FL.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(!FL.call(t,s))return!1;r.push(s)}return r}function Iv(t){if(!jL(t))return!1;const e=t.constructor;if(typeof e>"u")return!0;const n=e.prototype;return!(!jL(n)||!n.hasOwnProperty("isPrototypeOf"))}function jL(t){return Object.prototype.toString.call(t)==="[object Object]"}function BL(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Nl(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(!Nl(t[r],e[r],n))return!1;return!0}if(Iv(t)&&Iv(e)){const r=n?.ignoreUndefined??!0;if(n?.partial){for(const a in e)if((!r||e[a]!==void 0)&&!Nl(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||!Nl(t[a],e[a],n)))return!1;return s===o}return!1}function Uc(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 jfe(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 Th(t){return!!(t&&typeof t=="object"&&typeof t.then=="function")}const Bfe=/[\x00-\x1f\x7f"<>`{}]/g;function Hfe(t){return t.replace(Bfe,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function HL(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 Hfe(e)}const $fe=["http:","https:","mailto:","tel:"];function Ov(t,e){if(!t)return!1;try{const n=new URL(t);return!e.has(n.protocol)}catch{return!1}}function If(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+=HL(t.slice(n,s.index))+s[0],n=e.lastIndex;r=r+HL(n?t.slice(n):t);let o=!1;return r.startsWith("//")&&(o=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:o}}function qfe(t){return/\s|[^\u0000-\u007F]/.test(t)?t.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):t}function Wfe(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 pi(){throw new Error("Invariant failed")}function Rh(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 Ta=4,XF=5;function Gfe(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 QF(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=Gfe(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 p=u+3,g=c;if(p<g)return n[0]=3,n[1]=e+u,n[2]=e+p,n[3]=e+g,n[4]=e+c+1,n[5]=s,n}}else if(f===36){const p=u+1,g=u+2;return g===c?(n[0]=2,n[1]=e+u,n[2]=e+p,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 ib(t,e,n,r,s,o,a){a?.(n);let u=r;{const c=n.fullPath??n.from,f=c.length,p=n.options?.caseSensitive??t,g=n.options?.params?.parse??n.options?.parseParams;for(;u<f;){const y=QF(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(p){const _=s.static?.get(w);if(_)S=_;else{s.static??=new Map;const T=Al(n.fullPath??n.from);T.parent=s,T.depth=o,S=T,s.static.set(w,T)}}else{const _=w.toLowerCase(),T=s.staticInsensitive?.get(_);if(T)S=T;else{s.staticInsensitive??=new Map;const R=Al(n.fullPath??n.from);R.parent=s,R.depth=o,S=R,s.staticInsensitive.set(_,R)}}break}case 1:{const w=c.substring(E,y[1]),_=c.substring(y[4],C),T=p&&!!(w||_),R=w?T?w:w.toLowerCase():void 0,M=_?T?_:_.toLowerCase():void 0,O=!g&&s.dynamic?.find(I=>!I.parse&&I.caseSensitive===T&&I.prefix===R&&I.suffix===M);if(O)S=O;else{const I=Uw(1,n.fullPath??n.from,T,R,M);S=I,I.depth=o,I.parent=s,s.dynamic??=[],s.dynamic.push(I)}break}case 3:{const w=c.substring(E,y[1]),_=c.substring(y[4],C),T=p&&!!(w||_),R=w?T?w:w.toLowerCase():void 0,M=_?T?_:_.toLowerCase():void 0,O=!g&&s.optional?.find(I=>!I.parse&&I.caseSensitive===T&&I.prefix===R&&I.suffix===M);if(O)S=O;else{const I=Uw(3,n.fullPath??n.from,T,R,M);S=I,I.parent=s,I.depth=o,s.optional??=[],s.optional.push(I)}break}case 2:{const w=c.substring(E,y[1]),_=c.substring(y[4],C),T=p&&!!(w||_),R=w?T?w:w.toLowerCase():void 0,M=_?T?_:_.toLowerCase():void 0,O=Uw(2,n.fullPath??n.from,T,R,M);S=O,O.parent=s,O.depth=o,s.wildcard??=[],s.wildcard.push(O)}}s=S}if(g&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const y=Al(n.fullPath??n.from);y.kind=XF,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=Al(n.fullPath??n.from);y.kind=Ta,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)ib(t,e,c,u,s,o,a)}function Lw(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 ya(t){if(t.pathless)for(const e of t.pathless)ya(e);if(t.static)for(const e of t.static.values())ya(e);if(t.staticInsensitive)for(const e of t.staticInsensitive.values())ya(e);if(t.dynamic?.length){t.dynamic.sort(Lw);for(const e of t.dynamic)ya(e)}if(t.optional?.length){t.optional.sort(Lw);for(const e of t.optional)ya(e)}if(t.wildcard?.length){t.wildcard.sort(Lw);for(const e of t.wildcard)ya(e)}}function Al(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 Uw(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 Vfe(t,e){const n=Al("/"),r=new Uint16Array(6);for(const s of t)ib(!1,r,s,1,n,0);ya(n),e.masksTree=n,e.flatCache=Rh(1e3)}function Kfe(t,e){t||="/";const n=e.flatCache.get(t);if(n)return n;const r=ZT(t,e.masksTree);return e.flatCache.set(t,r),r}function Yfe(t,e,n,r,s){t||="/",r||="/";const o=e?`case\0${t}`:t;let a=s.singleCache.get(o);return a||(a=Al("/"),ib(e,new Uint16Array(6),{from:t},1,a,0),s.singleCache.set(o,a)),ZT(r,a,n)}function Zfe(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=ZT(t,e.segmentTree,n)}catch(a){if(a instanceof URIError)o=null;else throw a}return o&&(o.branch=e7(o.route)),e.matchCache.set(r,o),o}function Xfe(t){return t==="/"?t:t.replace(/\/{1,}$/,"")}function Qfe(t,e=!1,n){const r=Al(t.fullPath),s=new Uint16Array(6),o={},a={};let u=0;return ib(e,s,t,1,r,0,c=>{if(n?.(c,u),c.id in o&&pi(),o[c.id]=c,u!==0&&c.path){const f=Xfe(c.fullPath);(!a[f]||c.fullPath.endsWith("/"))&&(a[f]=c)}u++}),ya(r),{processedTree:{segmentTree:r,singleCache:Rh(1e3),matchCache:Rh(1e3),flatCache:null,masksTree:null},routesById:o,routesByPath:a}}function ZT(t,e,n=!1){const r=t.split("/"),s=ehe(t,r,e,n);if(!s)return null;const[o]=JF(t,r,s);return{route:s.node.route,rawParams:o}}function JF(t,e,n){const r=Jfe(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 p=r[u];if(p.kind===Ta)break;if(p.kind===XF){f--,a--,c--;continue}const g=e[a],m=c;if(g&&(c+=g.length),p.kind===1){s??=n.node.fullPath.split("/");const y=s[f],S=p.prefix?.length??0;if(y.charCodeAt(S)===123){const E=p.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(p.kind===3){if(n.skipped&1<<u){a--,c=m-1;continue}s??=n.node.fullPath.split("/");const y=s[f],S=p.prefix?.length??0,E=p.suffix?.length??0,C=y.substring(S+3,y.length-E-1),w=p.suffix||p.prefix?g.substring(S,g.length-E):g;w&&(o[C]=decodeURIComponent(w))}else if(p.kind===2){const y=p,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 e7(t){const e=[t];for(;t.parentRoute;)t=t.parentRoute,e.push(t);return e.reverse(),e}function Jfe(t){const e=Array(t.depth+1);do e[t.depth]=t,t=t.parent;while(t);return e}function ehe(t,e,n,r){if(t==="/"&&n.index)return{node:n.index,skipped:0};const s=!Ah(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 p=u.pop(),{node:g,index:m,skipped:y,depth:S,statics:E,dynamics:C,optionals:w}=p;let{extract:_,rawParams:T}=p;if(g.kind===2&&g.route&&!sm(f,p))continue;if(g.parse){if(!$L(t,e,p))continue;T=p.rawParams,_=p.extract}r&&g.route&&g.kind!==Ta&&sm(c,p)&&(c=p);const R=m===a;if(R&&(g.route&&(!o||g.kind===Ta||g.kind===2)&&sm(f,p)&&(f=p),!g.optional&&!g.wildcard&&!g.index&&!g.pathless))continue;const M=R?void 0:e[m];let O;if(R&&g.index){const I={node:g.index,index:m,skipped:y,depth:S+1,statics:E,dynamics:C,optionals:w,extract:_,rawParams:T};let P=!0;if(g.index.parse&&($L(t,e,I)||(P=!1)),P){if(!C&&!w&&!y&&the(E,a))return I;sm(f,I)&&(f=I)}}if(g.wildcard)for(let I=g.wildcard.length-1;I>=0;I--){const P=g.wildcard[I],{prefix:k,suffix:H}=P;if(!(k&&(R||!(P.caseSensitive?M:O??=M.toLowerCase()).startsWith(k)))){if(H){if(R)continue;const F=e.slice(m).join("/").slice(-H.length);if((P.caseSensitive?F:F.toLowerCase())!==H)continue}u.push({node:P,index:a,skipped:y,depth:S+1,statics:E,dynamics:C,optionals:w,extract:_,rawParams:T})}}if(g.optional){const I=y|1<<S,P=S+1;for(let k=g.optional.length-1;k>=0;k--){const H=g.optional[k];u.push({node:H,index:m,skipped:I,depth:P,statics:E,dynamics:C,optionals:w,extract:_,rawParams:T})}if(!R)for(let k=g.optional.length-1;k>=0;k--){const H=g.optional[k],{prefix:F,suffix:j}=H;if(F||j){const W=H.caseSensitive?M:O??=M.toLowerCase();if(F&&!W.startsWith(F)||j&&!W.endsWith(j))continue}u.push({node:H,index:m+1,skipped:y,depth:P,statics:E,dynamics:C,optionals:w+rm(a,m),extract:_,rawParams:T})}}if(!R&&g.dynamic&&M)for(let I=g.dynamic.length-1;I>=0;I--){const P=g.dynamic[I],{prefix:k,suffix:H}=P;if(k||H){const F=P.caseSensitive?M:O??=M.toLowerCase();if(k&&!F.startsWith(k)||H&&!F.endsWith(H))continue}u.push({node:P,index:m+1,skipped:y,depth:S+1,statics:E,dynamics:C+rm(a,m),optionals:w,extract:_,rawParams:T})}if(!R&&g.staticInsensitive){const I=g.staticInsensitive.get(O??=M.toLowerCase());I&&u.push({node:I,index:m+1,skipped:y,depth:S+1,statics:E+rm(a,m),dynamics:C,optionals:w,extract:_,rawParams:T})}if(!R&&g.static){const I=g.static.get(M);I&&u.push({node:I,index:m+1,skipped:y,depth:S+1,statics:E+rm(a,m),dynamics:C,optionals:w,extract:_,rawParams:T})}if(g.pathless){const I=S+1;for(let P=g.pathless.length-1;P>=0;P--){const k=g.pathless[P];u.push({node:k,index:m,skipped:y,depth:I,statics:E,dynamics:C,optionals:w,extract:_,rawParams:T})}}}if(f)return f;if(r&&c){let p=c.index;for(let m=0;m<c.index;m++)p+=e[m].length;const g=p===t.length?"/":t.slice(p);return c.rawParams??=Object.create(null),c.rawParams["**"]=decodeURIComponent(g),c}return null}function rm(t,e){return 2**(t-e-1)}function the(t,e){return t===2**(e-1)-1}function $L(t,e,n){let r,s;try{[r,s]=JF(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 sm(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===Ta)>(t.node.kind===Ta)||e.node.kind===Ta==(t.node.kind===Ta)&&e.depth>t.depth))):!0}function nv(t){return XT(t.filter(e=>e!==void 0).join("/"))}function XT(t){return t.replace(/\/{2,}/g,"/")}function t7(t){return t==="/"?t:t.replace(/^\/{1,}/,"")}function fi(t){const e=t.length;return e>1&&t[e-1]==="/"?t.replace(/\/{1,}$/,""):t}function n7(t){return fi(t7(t))}function Nv(t,e){return t?.endsWith("/")&&t!=="/"&&t!==`${e}/`?t.slice(0,-1):t}function nhe(t,e,n){return Nv(t,n)===Nv(e,n)}function rhe({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&&Ah(u)==="";)u.pop();const f=e.split("/");for(let p=0,g=f.length;p<g;p++){const m=f[p];m===""?p?p===g-1&&u.push(m):u=[m]:m===".."?u.pop():m==="."||u.push(m)}}u.length>1&&(Ah(u)===""?n==="never"&&u.pop():n==="always"&&u.push(""));const c=XT(u.join("/"))||"/";return a&&r&&r.set(a,c),c}function she(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 Fw(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=>WL(s,n)).join("/"):WL(r,n)}function qL({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 p=u;c=QF(t,p,c);const g=c[5];if(u=g+1,p===g)continue;const m=c[0];if(m===0){f+="/"+t.substring(p,g);continue}if(m===2){const y=e._splat;o._splat=y,o["*"]=y;const S=t.substring(p,c[1]),E=t.substring(c[4],g);if(!y){s=!0,(S||E)&&(f+="/"+S+E);continue}const C=Fw("_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(p,c[1]),E=t.substring(c[4],g),C=Fw(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(p,c[1]),C=t.substring(c[4],g),w=Fw(y,e,n)??"";f+="/"+E+w+C;continue}}return t.endsWith("/")&&(f+="/"),{usedParams:o,interpolatedPath:f||"/",isMissingParams:s}}function WL(t,e){const n=encodeURIComponent(t);return e?.(n)??n}function dr(t){return t?.isNotFound===!0}function ohe(){try{return sessionStorage}catch{return}}const ihe="tsr-scroll-restoration-v1_3",r7=ohe();function ahe(){try{return JSON.parse(r7?.getItem("tsr-scroll-restoration-v1_3")||"{}")}catch{return{}}}function lhe(){try{r7?.setItem(ihe,JSON.stringify(fc))}catch{}}const fc=ahe(),GL="data-scroll-restoration-id",uhe=t=>t.state.__TSR_key||t.href;function che(t){const e=t.getAttribute(GL);if(e)return`[${GL}="${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 om=!1;const rv="window";function m_(t){try{return typeof t=="function"?t():document.querySelector(t)}catch{}}function VL(t){const e=new Set;for(const n of t){if(n===rv)continue;const r=m_(n);r&&e.add(r)}return e}function dhe(t,e){const n=t.options.scrollRestoration,r=t._scroll;n&&(r.restoring=!0);const s=t.options.getScrollRestorationKey||uhe,o=new Set,a=u=>{const c=fc[u]||={};for(const f of o)f===document?c[rv]={scrollX,scrollY}:f.isConnected&&(c[che(f)]={scrollX:f.scrollLeft,scrollY:f.scrollTop})};n&&!r.restoration&&(r.restoration=!0,om=!1,history.scrollRestoration="manual",document.addEventListener("scroll",u=>{om||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())),lhe()})),!r.reset&&(r.reset=!0,t.subscribe("onRendered",u=>{const c=t.options.scrollRestorationBehavior,f=t.options.scrollToTopSelectors,p=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=fc[S];if(E){let C=fc[y];for(const w in E){if(w===rv){if(p)continue}else{const _=m_(w);if(!_||p&&f&&(m??=VL(f),m.has(_)))continue}C||(C=fc[y]={}),C[w]??=E[w]}}}om=!0;try{const E=u.toLocation.hash,C=u.toLocation.state.__hashScrollIntoViewOptions??!0;let w=!1;if(p){!E&&f&&(m??=VL(f));const _=E&&C&&g,T=r.restoring?fc[y]:void 0;if(T)for(const R in T){const{scrollX:M,scrollY:O}=T[R];if(R===rv){if(_)continue;scrollTo({top:O,left:M,behavior:c}),w=!0}else{const I=m_(R);I&&(I.scrollLeft=M,I.scrollTop=O,m?.delete(I))}}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{om=!1}}))}function fhe(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 hhe(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 phe=mhe(JSON.parse),ghe=vhe(JSON.stringify,JSON.parse);function mhe(t){return e=>{e[0]==="?"&&(e=e.substring(1));const n=hhe(e);for(const r in n){const s=n[r];if(typeof s=="string")try{n[r]=t(s)}catch{}}return n}}function vhe(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=fhe(s,r);return o?`?${o}`:""}}const Ml="__root__";function s7(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 yhe(t){return{input:({url:e})=>{for(const n of t)e=v_(n,e);return e},output:({url:e})=>{for(let n=t.length-1;n>=0;n--)e=o7(t[n],e);return e}}}function bhe(t){const e=n7(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=nv(["/",e,o.pathname]),o)}}function v_(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 o7(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 She(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),p=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([]),_=n([]),T=n([]),R=r(()=>jw(a,w.get())),M=r(()=>jw(u,_.get())),O=r(()=>jw(c,T.get())),I=r(()=>w.get()[0]),P=r(()=>w.get().some(ee=>a.get(ee)?.get().status==="pending")),k=r(()=>({locationHref:y.get().href,resolvedLocationHref:S.get()?.href,status:f.get()})),H=r(()=>({status:f.get(),loadedAt:p.get(),isLoading:g.get(),isTransitioning:m.get(),matches:R.get(),location:y.get(),resolvedLocation:S.get(),statusCode:E.get(),redirect:C.get()})),F=Rh(64);function j(ee){let fe=F.get(ee);return fe||(fe=r(()=>{const de=w.get();for(const Ae of de){const L=a.get(Ae);if(L&&L.routeId===ee)return L.get()}}),F.set(ee,fe)),fe}const W={status:f,loadedAt:p,isLoading:g,isTransitioning:m,location:y,resolvedLocation:S,statusCode:E,redirect:C,matchesId:w,pendingIds:_,cachedIds:T,matches:R,pendingMatches:M,cachedMatches:O,firstId:I,hasPending:P,matchRouteDeps:k,matchStores:a,pendingMatchStores:u,cachedMatchStores:c,__store:H,getRouteMatchStore:j,setMatches:Y,setPending:ne,setCached:$};Y(t.matches),o?.(W);function Y(ee){Bw(ee,a,w,n,s)}function ne(ee){Bw(ee,u,_,n,s)}function $(ee){Bw(ee,c,T,n,s)}return W}function jw(t,e){const n=[];for(const r of e){const s=t.get(r);s&&n.push(s.get())}return n}function Bw(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)}Wfe(n.get(),o)||n.set(o)})}const y_=t=>{if(!t.rendered)return t.rendered=!0,t.onReady?.()},Ehe=t=>t.stores.matchesId.get().some(e=>t.stores.matchStores.get(e)?.get()._forcePending),ab=(t,e)=>!!(t.preload&&!t.router.stores.matchStores.has(e)),Pl=(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},KL=(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},Ra=(t,e,n)=>{if(!(!zr(n)&&!dr(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":dr(n)?"notFound":r.status==="pending"?"success":r.status,context:Pl(t,e.index),isFetching:!1,error:n})),dr(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},i7=(t,e)=>{const n=t.router.getMatch(e);return!!(!n||n._nonReactive.dehydrated)},YL=(t,e,n)=>{const r=Pl(t,n);t.updateMatch(e,s=>({...s,context:r}))},Of=(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,Ra(t,t.router.getMatch(r),n);try{o.options.onError?.(n)}catch(a){n=a,Ra(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)&&!dr(n)&&(t.serialError??=n)},a7=(t,e,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;const s=n.options.pendingMs??t.router.options.defaultPendingMs;if(t.onReady&&!ab(t,e)&&(n.options.loader||n.options.beforeLoad||u7(n))&&typeof s=="number"&&s!==1/0&&(n.options.pendingComponent??t.router.options?.defaultPendingComponent)){const o=setTimeout(()=>{y_(t)},s);r._nonReactive.pendingTimeout=o}},Che=(t,e,n)=>{const r=t.router.getMatch(e);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;a7(t,e,n,r);const s=()=>{const o=t.router.getMatch(e);o.preload&&(o.status==="redirected"||o.status==="notFound")&&Ra(t,o,o.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(s):s()},whe=(t,e,n,r)=>{const s=t.router.getMatch(e);let o=s._nonReactive.loadPromise;s._nonReactive.loadPromise=Uc(()=>{o?.resolve(),o=void 0});const{paramsError:a,searchError:u}=s;a&&Of(t,n,a),u&&Of(t,n,u),a7(t,e,r,s);const c=new AbortController;let f=!1;const p=()=>{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(()=>{p(),g()});return}s._nonReactive.beforeLoadPromise=Uc();const m={...Pl(t,n,!1),...s.__routeContext},{search:y,params:S,cause:E}=s,C=ab(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},_=R=>{if(R===void 0){t.router.batch(()=>{p(),g()});return}(zr(R)||dr(R))&&(p(),Of(t,n,R)),t.router.batch(()=>{p(),t.updateMatch(e,M=>({...M,__beforeLoadContext:R})),g()})};let T;try{if(T=r.options.beforeLoad(w),Th(T))return p(),T.catch(R=>{Of(t,n,R)}).then(_)}catch(R){p(),Of(t,n,R)}_(T)},xhe=(t,e)=>{const{id:n,routeId:r}=t.matches[e],s=t.router.looseRoutesById[r],o=()=>u(),a=()=>whe(t,n,e,s),u=()=>{if(i7(t,n))return;const c=Che(t,n,s);return Th(c)?c.then(a):a()};return o()},_he=(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}))},l7=(t,e,n,r,s)=>{const o=e[r-1],{params:a,loaderDeps:u,abortController:c,cause:f}=t.router.getMatch(n),p=Pl(t,r),g=ab(t,n);return{params:a,deps:u,preload:!!g,parentMatchPromise:o,abortController:c,context:p,location:t.location,navigate:m=>t.router.navigate({...m,_fromLocation:t.location}),cause:g?"preload":f,route:s,...t.router.options.additionalContext}},ZL=async(t,e,n,r,s)=>{try{const o=t.router.getMatch(n);try{(!(KF??t.router.isServer)||o.ssr===!0)&&Ih(s);const a=s.options.loader,u=typeof a=="function"?a:a?.handler,c=u?.(l7(t,e,n,r,s)),f=!!u&&Th(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;Ra(t,t.router.getMatch(n),g),g!==void 0&&t.updateMatch(n,m=>({...m,loaderData:g}))}s._lazyPromise&&await s._lazyPromise;const p=o._nonReactive.minPendingPromise;p&&await p,s._componentsPromise&&await s._componentsPromise,t.updateMatch(n,g=>({...g,error:void 0,context:Pl(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:Pl(t,r)}));return}const c=o._nonReactive.minPendingPromise;c&&await c,dr(a)&&await s.options.notFoundComponent?.preload?.(),Ra(t,t.router.getMatch(n),a);try{s.options.onError?.(a)}catch(f){u=f,Ra(t,t.router.getMatch(n),f)}!zr(u)&&!dr(u)&&await Ih(s,["errorComponent"]),t.updateMatch(n,f=>({...f,error:u,context:Pl(t,r),status:"error",isFetching:!1}))}}catch(o){const a=t.router.getMatch(n);a&&(a._nonReactive.loaderPromise=void 0),Ra(t,a,o)}},Ahe=async(t,e,n)=>{async function r(y,S,E,C,w){const _=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(l7(t,e,s,n,w)):R,{status:O,invalid:I}=C,P=_>=T&&(!!t.forceStaleReload||C.cause==="enter"||E!==void 0&&E!==C.id);a=O==="success"&&(I||(M??P)),y&&w.options.preload===!1||(a&&!t.sync&&p?(u=!0,(async()=>{try{await ZL(t,e,s,n,w);const k=t.router.getMatch(s);k._nonReactive.loaderPromise?.resolve(),k._nonReactive.loadPromise?.resolve(),k._nonReactive.loaderPromise=void 0,k._nonReactive.loadPromise=void 0}catch(k){zr(k)&&await t.router.navigate(k.options)}})()):O!=="success"||a?await ZL(t,e,s,n,w):YL(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,p=((typeof f=="function"?void 0:f?.staleReloadMode)??t.router.options.defaultStaleReloadMode)!=="blocking";if(i7(t,s)){if(!t.router.getMatch(s))return t.matches[n];YL(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=ab(t,s);if(y._nonReactive.loaderPromise){if(y.status==="success"&&!t.sync&&!y.preload&&p)return y;await y._nonReactive.loaderPromise;const w=t.router.getMatch(s),_=w._nonReactive.error||w.error;_&&Ra(t,w,_),w.status==="pending"&&await r(C,y,E,w,c)}else{const w=C&&!t.router.stores.matchStores.has(s),_=t.router.getMatch(s);_._nonReactive.loaderPromise=Uc(),w!==_.preload&&t.updateMatch(s,T=>({...T,preload:w})),await r(C,y,E,_,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 XL(t){const e=t,n=[];Ehe(e.router)&&y_(e);let r;for(let m=0;m<e.matches.length;m++){try{const y=xhe(e,m);Th(y)&&await y}catch(y){if(zr(y))throw y;if(dr(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?KL(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(Ahe(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;dr(S)?u??=S:c??=S}if(c!==void 0)throw c}const f=u??(r&&!e.preload?r:void 0);let p=e.firstBadMatchIndex!==void 0?e.firstBadMatchIndex:e.matches.length-1;if(!f&&r&&e.preload)return e.matches;if(f){const m=KL(e,f);m===void 0&&pi();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})),p=m,await Ih(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 Ih(m,["errorComponent"])}for(let m=0;m<=p;m++){const{id:y,routeId:S}=e.matches[m],E=e.router.looseRoutesById[S];try{const C=_he(e,y,E);if(C){const w=await C;e.updateMatch(y,_=>({..._,...w}))}}catch(C){console.error(`Error executing head for route ${S}:`,C)}}const g=y_(e);if(Th(g)&&await g,f)throw f;if(e.serialError&&!e.preload&&!e.onReady)throw e.serialError;return e.matches}function QL(t,e){const n=e.map(r=>t.options[r]?.preload?.()).filter(Boolean);if(n.length!==0)return Promise.all(n)}function Ih(t,e=sv){!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===sv?(()=>{if(t._componentsPromise===void 0){const r=QL(t,sv);r?t._componentsPromise=r.then(()=>{t._componentsLoaded=!0,t._componentsPromise=void 0}):t._componentsLoaded=!0}return t._componentsPromise})():QL(t,e);return t._lazyPromise?t._lazyPromise.then(n):n()}function u7(t){for(const e of sv)if(t.options[e]?.preload)return!0;return!1}const sv=["component","errorComponent","pendingComponent","notFoundComponent"];var Na="__TSR_index",JL="popstate",e4="beforeunload";function The(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?.()??[],p=c.type==="PUSH"||c.type==="REPLACE";if(typeof document<"u"&&f.length&&p)for(const g of f){const m=Mv(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[Na];u=t4(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[Na];u=t4(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[Na]!==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 t4(t,e){e||(e={});const n=QT();return{...e,key:n,__TSR_key:n,[Na]:t}}function Rhe(t){const e=typeof document<"u"?window:void 0,n=e.history.pushState,r=e.history.replaceState;let s=[];const o=()=>s,a=P=>s=P,u=(P=>P),c=(()=>Mv(`${e.location.pathname}${e.location.search}${e.location.hash}`,e.history.state));if(!e.history.state?.__TSR_key&&!e.history.state?.key){const P=QT();e.history.replaceState({[Na]:0,key:P,__TSR_key:P},"")}let f=c(),p,g=!1,m=!1,y=!1,S=!1;const E=()=>f;let C,w;const _=()=>{C&&(I._ignoreSubscribers=!0,(C.isPush?e.history.pushState:e.history.replaceState)(C.state,"",C.href),I._ignoreSubscribers=!1,C=void 0,w=void 0,p=void 0)},T=(P,k,H)=>{const F=u(k);w||(p=f),f=Mv(k,H),C={href:F,state:H,isPush:C?.isPush||P==="push"},w||(w=Promise.resolve().then(()=>_()))},R=P=>{f=c(),I.notify({type:P})},M=async()=>{if(m){m=!1;return}const P=c(),k=P.state[Na]-f.state[Na],H=k===1,F=k===-1,j=!H&&!F||g;g=!1;const W=j?"GO":F?"BACK":"FORWARD",Y=j?{type:"GO",index:k}:{type:F?"BACK":"FORWARD"};if(y)y=!1;else{const ne=o();if(typeof document<"u"&&ne.length){for(const $ of ne)if(await $.blockerFn({currentLocation:f,nextLocation:P,action:W})){m=!0,e.history.go(1),I.notify(Y);return}}}f=c(),I.notify(Y)},O=P=>{if(S){S=!1;return}let k=!1;const H=o();if(typeof document<"u"&&H.length)for(const F of H){const j=F.enableBeforeUnload??!0;if(j===!0){k=!0;break}if(typeof j=="function"&&j()===!0){k=!0;break}}if(k)return P.preventDefault(),P.returnValue=""},I=The({getLocation:E,getLength:()=>e.history.length,pushState:(P,k)=>T("push",P,k),replaceState:(P,k)=>T("replace",P,k),back:P=>(P&&(y=!0),S=!0,e.history.back()),forward:P=>{P&&(y=!0),S=!0,e.history.forward()},go:P=>{g=!0,e.history.go(P)},createHref:P=>u(P),flush:_,destroy:()=>{e.history.pushState=n,e.history.replaceState=r,e.removeEventListener(e4,O,{capture:!0}),e.removeEventListener(JL,M)},onBlocked:()=>{p&&f!==p&&(f=p)},getBlockers:o,setBlockers:a,notifyOnIndexChange:!1});return e.addEventListener(e4,O,{capture:!0}),e.addEventListener(JL,M),e.history.pushState=function(...P){const k=n.apply(e.history,P);return I._ignoreSubscribers||R("PUSH"),k},e.history.replaceState=function(...P){const k=r.apply(e.history,P);return I._ignoreSubscribers||R("REPLACE"),k},I}function Ihe(t){let e=t.replace(/[\x00-\x1f\x7f]/g,"");return e.startsWith("//")&&(e="/"+e.replace(/^\/+/,"")),e}function Mv(t,e){const n=Ihe(t),r=n.indexOf("#"),s=n.indexOf("?"),o=QT();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||{[Na]:0,key:o,__TSR_key:o}}}function QT(){return(Math.random()+1).toString(36).substring(7)}function Ic(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 Ohe=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=she(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=Rhe()),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 p;this.resolvePathCache=Rh(1e3),p=this.buildRouteTree(),this.setRoutes(p)}if(!this.stores&&this.latestLocation){const p=this.getStoreConfig(this);this.batch=p.batch,this.stores=She(Mhe(this.latestLocation),p),dhe(this)}let u=!1;const c=this.options.basepath??"/",f=this.options.rewrite;if(o||s!==c||a!==f){this.basepath=c;const p=[],g=n7(c);g&&g!=="/"&&p.push(bhe({basepath:c})),f&&p.push(f),this.rewrite=p.length===0?void 0:p.length===1?p[0]:yhe(p),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=Qfe(this.routeTree,this.options.caseSensitive,(r,s)=>{r.init({originalIndex:s})});return this.options.routeMasks&&Vfe(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:p,href:g,state:m})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(c)){const w=this.options.parseSearch(f),_=this.options.stringifySearch(w);return{href:c+_+p,publicHref:c+_+p,pathname:If(c).path,external:!1,searchStr:_,search:yl(r?.search,w),hash:If(p.slice(1)).path,state:_l(r?.state,m)}}const y=new URL(g,this.origin),S=v_(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:If(S.pathname).path,external:!!this.rewrite&&S.origin!==this.origin,searchStr:C,search:yl(r?.search,E),hash:If(S.hash.slice(1)).path,state:_l(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)=>rhe({base:n,to:r.includes("//")?XT(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=>Phe({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,p=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,xl(o.params,g)),E=this.routesByPath[fi(y)];let C;if(E)C=this.getRouteBranch(E);else if(y.includes("$"))C=[];else{const F=this.getMatchedRoutes(y);C=F.matchedRoutes,this.options.notFoundRoute&&(!F.foundRoute||F.foundRoute.path!=="/"&&F.routeParams["**"])&&(C=[...C,this.options.notFoundRoute])}if(C.length&&ZF(S))for(const F of C){const j=F.options.params?.stringify??F.options.stringifyParams;if(j)try{Object.assign(S,j(S))}catch{}}const w=n.leaveParams?y:If(qL({path:y,params:S,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let _=p;if(n._includeValidateSearch&&this.options.search?.strict){const F={};C.forEach(j=>{if(j.options.validateSearch)try{Object.assign(F,ov(j.options.validateSearch,{...F,..._}))}catch{}}),_=F}_=khe({search:_,dest:o,destRoutes:C,_includeValidateSearch:n._includeValidateSearch}),_=yl(p,_);const T=this.options.stringifySearch(_),R=o.hash===!0?a.hash:o.hash?xl(o.hash,a.hash):void 0,M=R?`#${R}`:"";let O=o.state===!0?a.state:o.state?xl(o.state,a.state):{};O=_l(a.state,O);const I=`${w}${T}${M}`;let P,k,H=!1;if(this.rewrite){const F=new URL(I,this.origin),j=o7(this.rewrite,F);P=F.href.replace(F.origin,""),j.origin!==this.origin?(k=j.href,H=!0):k=j.pathname+j.search+j.hash}else P=qfe(I),k=P;return{publicHref:k,href:P,pathname:w,search:_,searchStr:T,state:O,hash:R??"",external:H,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 p=Kfe(u.pathname,this.processedTree);if(p){Object.assign(f,p.rawParams);const{from:g,params:m,...y}=p.route,S=m===!1||m===null?Object.create(null):(m??!0)===!0?f:Object.assign(f,xl(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 p=Nl(s.state,this.latestLocation.state);return f.forEach(g=>{delete s.state[g]}),p},u=fi(this.latestLocation.href)===fi(s.href);let c=this.commitLocationPromise;if(this.commitLocationPromise=Uc(()=>{c?.resolve(),c=void 0}),u&&a())this.load();else{let{maskedLocation:f,hashScrollIntoView:p,...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=p??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=Mv(u,{__TSR_index:n?g:g+1}),y=new URL(m.pathname,this.origin);c.to=v_(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 p=this.commitLocation({...f,viewTransition:o,replace:n,resetScroll:r,hashScrollIntoView:s,ignoreBlocker:a});return queueMicrotask(()=>{this.pendingBuiltLocation===f&&(this.pendingBuiltLocation=void 0)}),p},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(Ov(c,this.protocolAllowlist))return;if(!a.ignoreBlocker){const f=this.history.getBlockers?.()??[];for(const p of f)if(p?.blockerFn&&await p.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 p=this.latestLocation,g=Ic(p,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...g}),this.emit({type:"onBeforeLoad",...g}),await XL({router:this,sync:n?.sync,forceStaleReload:u.href===p.href,matches:this.stores.pendingMatches.get(),location:p,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,_=this.stores.matches.get();m=w?_.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?_.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)):_,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 _ of C)this.looseRoutesById[_.routeId].options[w]?.(_)})})}})}catch(p){zr(p)?(s=p,this.navigate({...s.options,replace:!0,ignoreBlocker:!0})):dr(p)&&(o=p);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(Ic(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&&Ov(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=Ih,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 XL({router:this,matches:s,location:r,preload:!0,updateMatch:(c,f)=>{o.has(c)?s=s.map(p=>p.id===c?f(p):p):this.updateMatch(c,f)}}),s}catch(c){if(zr(c))return c.options.reloadDocument?void 0:await this.preloadRoute({...c.options,_fromLocation:r});dr(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=Yfe(o.pathname,r?.caseSensitive??!1,r?.fuzzy??!1,a.pathname,this.processedTree);return!u||n.params&&!Nl(u.rawParams,n.params,{partial:!0})?!1:r?.includeSearch??!0?Nl(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??ghe,parseSearch:t.parseSearch??phe,protocolAllowlist:t.protocolAllowlist??$fe}),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=e7(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["**"]:fi(t.pathname))&&(this.options.notFoundRoute?o=[...o,this.options.notFoundRoute]:a=!0);const u=a?Lhe(this.options.notFoundMode,o):void 0,c=new Array(o.length),f=new Map;for(const p of this.stores.matchStores.values())p.routeId&&f.set(p.routeId,p.get());for(let p=0;p<o.length;p++){const g=o[p],m=c[p-1];let y,S,E;{const j=m?.search??t.search,W=m?._strictSearch??void 0;try{const Y=ov(g.options.validateSearch,{...j})??void 0;y={...j,...Y},S={...W,...Y},E=void 0}catch(Y){let ne=Y;if(Y instanceof Pv||(ne=new Pv(Y.message,{cause:Y})),e?.throwOnError)throw ne;y=j,S={},E=ne}}const C=g.options.loaderDeps?.({search:y})??"",w=C?JSON.stringify(C):"",{interpolatedPath:_,usedParams:T}=qL({path:g.fullPath,params:s,decoder:this.pathParamsDecoder,server:this.isServer}),R=g.id+_+w,M=this.getMatch(R),O=f.get(g.id),I=M?._strictParams??T;let P;if(!M)try{n4(g,I)}catch(j){if(dr(j)||zr(j)?P=j:P=new Nhe(j.message,{cause:j}),e?.throwOnError)throw P}Object.assign(s,I);const k=O?"stay":"enter";let H;if(M)H={...M,cause:k,params:O?.params??s,_strictParams:I,search:yl(O?O.search:M.search,y),_strictSearch:S};else{const j=g.options.loader||g.options.beforeLoad||g.lazyFn||u7(g)?"pending":"success";H={id:R,ssr:g.options.ssr,index:p,routeId:g.id,params:O?.params??s,_strictParams:I,pathname:_,updatedAt:Date.now(),search:O?yl(O.search,y):y,_strictSearch:S,searchError:void 0,status:j,isFetching:!1,error:void 0,paramsError:P,__routeContext:void 0,_nonReactive:{loadPromise:Uc()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:k,loaderDeps:O?_l(O.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||(H.globalNotFound=u===g.id),H.searchError=E;const F=this.getParentContext(m);H.context={...F,...H.__routeContext,...H.__beforeLoadContext},c[p]=H}for(let p=0;p<c.length;p++){const g=c[p],m=this.looseRoutesById[g.routeId],y=this.getMatch(g.id),S=f.get(g.routeId);if(g.params=S?yl(S.params,s):s,!y){const E=c[p-1],C=this.getParentContext(E);if(m.options.context){const w={deps:g.loaderDeps,params:g.params,context:C??{},location:t,navigate:_=>this.navigate({..._,_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=Ah(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=Ah(r),a={...t.search};for(const g of r)try{Object.assign(a,ov(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{n4(m,g)}catch{}f=g}const p={matchedRoutes:r,fullPath:o.fullPath,search:a,params:f};return this.lightweightCache.set(t,[e,p]),p}},Pv=class extends Error{},Nhe=class extends Error{};function Mhe(t){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:t,matches:[],statusCode:200}}function ov(t,e){if(t==null)return{};if("~standard"in t){const n=t["~standard"].validate(e);if(n instanceof Promise)throw new Pv("Async validation not supported");if(n.issues)throw new Pv(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 Phe({pathname:t,routesById:e,processedTree:n}){const r=Object.create(null),s=fi(t);let o;const a=Zfe(s,n,!0);return a&&(o=a.route,Object.assign(r,a.rawParams)),{matchedRoutes:a?.branch||[e.__root__],routeParams:r,foundRoute:o}}function khe({search:t,dest:e,destRoutes:n,_includeValidateSearch:r}){return Dhe(n)(t,e,r??!1)}function Dhe(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:p})=>{const g=p(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:p,meta:g})=>{const m=p(f);if(n)try{const y=ov(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=xl(e.search,a);return u&&(u.explicit=f),f}const c=(f,p)=>{if(p){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 Lhe(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 Ml}function n4(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 Uhe="Error preloading route! ☝️";var c7=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=Ml:this.parentRoute||pi();let s=r?Ml:n?.path;s&&s!=="/"&&(s=t7(s));const o=n?.id||s;let a=r?Ml:nv([this.parentRoute.id==="__root__"?"":this.parentRoute.id,o]);s==="__root__"&&(s="/"),a!=="__root__"&&(a=nv(["/",a]));const u=a==="__root__"?"/":nv([this.parentRoute.fullPath,s]);this._path=s,this._id=a,this._fullPath=u,this._to=fi(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=>s7({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.")}},Fhe=class extends c7{constructor(t){super(t)}};function JT(t){const e=t.errorComponent??eR;return D.jsx(zhe,{getResetKey:t.getResetKey,onCatch:t.onCatch,children:({error:n,reset:r})=>n?A.createElement(e,{error:n,reset:r}):t.children})}var zhe=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 eR({error:t}){const[e,n]=A.useState(!1);return D.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[D.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[D.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),D.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"})]}),D.jsx("div",{style:{height:".25rem"}}),e?D.jsx("div",{children:D.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:t.message?D.jsx("code",{children:t.message}):null})}):null]})}function jhe({children:t,fallback:e=null}){return d7()?D.jsx(z.Fragment,{children:t}):D.jsx(z.Fragment,{children:e})}function d7(){return z.useSyncExternalStore(Bhe,()=>!0,()=>!1)}function Bhe(){return()=>{}}var f7=A.createContext(null);function fs(t){return A.useContext(f7)}var lb=A.createContext(void 0),Hhe=A.createContext(void 0),rn=(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))(rn||{});function $he({update:t,notify:e,unwatched:n}){return{link:r,unlink:s,propagate:o,checkDirty:a,shallowPropagate:u};function r(f,p,g){const m=p.depsTail;if(m!==void 0&&m.dep===f)return;const y=m!==void 0?m.nextDep:p.deps;if(y!==void 0&&y.dep===f){y.version=g,p.depsTail=y;return}const S=f.subsTail;if(S!==void 0&&S.version===g&&S.sub===p)return;const E=p.depsTail=f.subsTail={version:g,dep:f,sub:p,prevDep:m,nextDep:y,prevSub:S,nextSub:void 0};y!==void 0&&(y.prevDep=E),m!==void 0?m.nextDep=E:p.deps=E,S!==void 0?S.nextSub=E:f.subs=E}function s(f,p=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:p.depsTail=m,m!==void 0?m.nextDep=y:p.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 p=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:p,prev:g},p=E);continue}}if((f=p)!==void 0){p=f.nextSub;continue}for(;g!==void 0;)if(f=g.value,g=g.prev,f!==void 0){p=f.nextSub;continue e}break}while(!0)}function a(f,p){let g,m=0,y=!1;e:do{const S=f.dep,E=S.flags;if(p.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,p=S,++m;continue}if(!y){const C=f.nextDep;if(C!==void 0){f=C;continue}}for(;m--;){const C=p.subs,w=C.nextSub!==void 0;if(w?(f=g.value,g=g.prev):f=C,y){if(t(p)){w&&u(C),p=f.sub;continue}y=!1}else p.flags&=-33;p=f.sub;const _=f.nextDep;if(_!==void 0){f=_;continue e}}return y}while(!0)}function u(f){do{const p=f.sub,g=p.flags;(g&48)===32&&(p.flags=g|16,(g&6)===2&&e(p))}while((f=f.nextSub)!==void 0)}function c(f,p){let g=p.depsTail;for(;g!==void 0;){if(g===f)return!0;g=g.prevDep}return!1}}function qhe(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 b_=[];let iv=0;const{link:r4,unlink:Whe,propagate:Ghe,checkDirty:h7,shallowPropagate:s4}=$he({update(t){return t._update()},notify(t){b_[S_++]=t,t.flags&=~rn.Watching},unwatched(t){t.depsTail!==void 0&&(t.depsTail=void 0,t.flags=rn.Mutable|rn.Dirty,kv(t))}});let im=0,S_=0,So,E_=0;function p7(t){try{++E_,t()}finally{--E_||g7()}}function kv(t){const e=t.depsTail;let n=e!==void 0?e.nextDep:t.deps;for(;n!==void 0;)n=Whe(n,t)}function g7(){if(!(E_>0)){for(;im<S_;){const t=b_[im];b_[im++]=void 0,t.notify()}im=0,S_=0}}function o4(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?rn.None:rn.Mutable,get(){return So!==void 0&&r4(s,So,iv),s._snapshot},subscribe(o){const a=qhe(o),u={current:!1},c=Vhe(()=>{s.get(),u.current?a.next?.(s._snapshot):u.current=!0});return{unsubscribe:()=>{c.stop()}}},_update(o){const a=So,u=e?.compare??Object.is;if(n)So=s,++iv,s.depsTail=void 0;else if(o===void 0)return!1;n&&(s.flags=rn.Mutable|rn.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{So=a,n&&(s.flags&=~rn.RecursedCheck),kv(s)}}};return n?(s.flags=rn.Mutable|rn.Dirty,s.get=function(){const o=s.flags;if(o&rn.Dirty||o&rn.Pending&&h7(s.deps,s)){if(s._update()){const a=s.subs;a!==void 0&&s4(a)}}else o&rn.Pending&&(s.flags=o&~rn.Pending);return So!==void 0&&r4(s,So,iv),s._snapshot}):s.set=function(o){if(s._update(o)){const a=s.subs;a!==void 0&&(Ghe(a),s4(a),g7())}},s}function Vhe(t){const e=()=>{const r=So;So=n,++iv,n.depsTail=void 0,n.flags=rn.Watching|rn.RecursedCheck;try{return t()}finally{So=r,n.flags&=~rn.RecursedCheck,kv(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:rn.Watching|rn.RecursedCheck,notify(){const r=this.flags;r&rn.Dirty||r&rn.Pending&&h7(this.deps,this)?e():this.flags=rn.Watching},stop(){this.flags=rn.None,this.depsTail=void 0,kv(this)}};return e(),n}function Khe(t,e){return t===e}function Wr(t,e,n=Khe){const r=A.useCallback(a=>{if(!t)return()=>{};const{unsubscribe:u}=t.subscribe(a);return u},[t]),s=A.useCallback(()=>t?.get(),[t]);return aT.useSyncExternalStoreWithSelector(r,s,s,e,n)}var Hw={get(){},subscribe(){return{unsubscribe(){}}}};function Yhe(t,e){const n=A.useRef();return r=>{const s=t?.select?t.select(r):r;return t?.structuralSharing??e.options.defaultStructuralSharing?n.current=_l(n.current,s):s}}function ou(t){const e=fs(),n=A.useContext(t.from?Hhe:lb),r=t.from?e.stores.getRouteMatchStore(t.from):e.stores.matchStores.get(n),s=Yhe(t,e),o=Wr(r??Hw,a=>a?s(a):Hw);if(o!==Hw)return o;(t.shouldThrow??!0)&&pi()}function m7(t){return ou({from:t.from,strict:t.strict,structuralSharing:t.structuralSharing,select:e=>t.select?t.select(e.loaderData):e.loaderData})}function v7(t){const{select:e,...n}=t;return ou({...n,select:r=>e?e(r.loaderDeps):r.loaderDeps})}function y7(t){return ou({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 b7(t){return ou({from:t.from,strict:t.strict,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,select:e=>t.select?t.select(e.search):e.search})}function tR(t){const e=fs();return A.useCallback(n=>e.navigate({...n,from:n.from??t?.from}),[t?.from,e])}function iAe(t){const e=fs(),n=tR(),r=A.useRef(null);return Sc(()=>{r.current!==t&&(n(t),r.current=t)},[e,t,n]),null}function S7(t){return ou({...t,select:e=>t.select?t.select(e.context):e.context})}function Zhe(t,e){const n=fs(),r=Ufe(e),{activeProps:s,inactiveProps:o,activeOptions:a,to:u,preload:c,preloadDelay:f,preloadIntentProximity:p,hashScrollIntoView:g,replace:m,startTransition:y,resetScroll:S,viewTransition:E,children:C,target:w,disabled:_,style:T,className:R,onClick:M,onBlur:O,onFocus:I,onMouseEnter:P,onMouseLeave:k,onTouchStart:H,ignoreBlocker:F,params:j,search:W,hash:Y,state:ne,mask:$,reloadDocument:ee,unsafeRelative:fe,from:de,_fromLocation:Ae,...L}=t,V=d7(),K=A.useMemo(()=>t,[n,t.from,t._fromLocation,t.hash,t.to,t.search,t.params,t.state,t.mask,t.unsafeRelative]),J=Wr(n.stores.location,gt=>gt,(gt,vn)=>gt.href===vn.href),oe=A.useMemo(()=>{const gt={_fromLocation:J,...K};return n.buildLocation(gt)},[n,J,K]),he=oe.maskedLocation?oe.maskedLocation.publicHref:oe.publicHref,ue=oe.maskedLocation?oe.maskedLocation.external:oe.external,ve=A.useMemo(()=>npe(he,ue,n.history,_),[_,ue,he,n.history]),xe=A.useMemo(()=>{if(ve?.external)return Ov(ve.href,n.protocolAllowlist)?void 0:ve.href;if(!rpe(u)&&!(typeof u!="string"||u.indexOf(":")===-1))try{return new URL(u),Ov(u,n.protocolAllowlist)?void 0:u}catch{}},[u,ve,n.protocolAllowlist]),Xe=A.useMemo(()=>{if(xe)return!1;if(a?.exact){if(!nhe(J.pathname,oe.pathname,n.basepath))return!1}else{const gt=Nv(J.pathname,n.basepath),vn=Nv(oe.pathname,n.basepath);if(!(gt.startsWith(vn)&&(gt.length===vn.length||gt[vn.length]==="/")))return!1}return(a?.includeSearch??!0)&&!Nl(J.search,oe.search,{partial:!a?.exact,ignoreUndefined:!a?.explicitUndefined})?!1:a?.includeHash?V&&J.hash===oe.hash:!0},[a?.exact,a?.explicitUndefined,a?.includeHash,a?.includeSearch,J,xe,V,oe.hash,oe.pathname,oe.search,n.basepath]),Ee=Xe?xl(s,{})??Xhe:$w,pt=Xe?$w:xl(o,{})??$w,Ce=[R,Ee.className,pt.className].filter(Boolean).join(" "),ze=(T||Ee.style||pt.style)&&{...T,...Ee.style,...pt.style},[je,He]=A.useState(!1),gr=A.useRef(!1),Et=t.reloadDocument||xe?!1:c??n.options.defaultPreload,Vr=f??n.options.defaultPreloadDelay??0,Gn=A.useCallback(()=>{n.preloadRoute({...K,_builtLocation:oe}).catch(gt=>{console.warn(gt),console.warn(Uhe)})},[n,K,oe]);Lfe(r,A.useCallback(gt=>{gt?.isIntersecting&&Gn()},[Gn]),tpe,{disabled:!!_||Et!=="viewport"}),A.useEffect(()=>{gr.current||!_&&Et==="render"&&(Gn(),gr.current=!0)},[_,Gn,Et]);const Ar=gt=>{const vn=gt.currentTarget.getAttribute("target"),Rr=w!==void 0?w:vn;if(!_&&!spe(gt)&&!gt.defaultPrevented&&(!Rr||Rr==="_self")&&gt.button===0){gt.preventDefault(),t8.flushSync(()=>{He(!0)});const no=n.subscribe("onResolved",()=>{no(),He(!1)});n.navigate({...K,replace:m,resetScroll:S,hashScrollIntoView:g,startTransition:y,viewTransition:E,ignoreBlocker:F})}};if(xe)return{...L,ref:r,href:xe,...C&&{children:C},...w&&{target:w},..._&&{disabled:_},...T&&{style:T},...R&&{className:R},...M&&{onClick:M},...O&&{onBlur:O},...I&&{onFocus:I},...P&&{onMouseEnter:P},...k&&{onMouseLeave:k},...H&&{onTouchStart:H}};const to=gt=>{if(_||Et!=="intent")return;if(!Vr){Gn();return}const vn=gt.currentTarget;if(Nf.has(vn))return;const Rr=setTimeout(()=>{Nf.delete(vn),Gn()},Vr);Nf.set(vn,Rr)},Tr=gt=>{_||Et!=="intent"||Gn()},Gt=gt=>{if(_||!Et||!Vr)return;const vn=gt.currentTarget,Rr=Nf.get(vn);Rr&&(clearTimeout(Rr),Nf.delete(vn))};return{...L,...Ee,...pt,href:ve?.href,ref:r,onClick:nc([M,Ar]),onBlur:nc([O,Gt]),onFocus:nc([I,to]),onMouseEnter:nc([P,to]),onMouseLeave:nc([k,Gt]),onTouchStart:nc([H,Tr]),disabled:!!_,target:w,...ze&&{style:ze},...Ce&&{className:Ce},..._&&Qhe,...Xe&&Jhe,...V&&je&&epe}}var $w={},Xhe={className:"active"},Qhe={role:"link","aria-disabled":!0},Jhe={"data-status":"active","aria-current":"page"},epe={"data-transitioning":"transitioning"},Nf=new WeakMap,tpe={rootMargin:"100px"},nc=t=>e=>{for(const n of t)if(n){if(e.defaultPrevented)return;n(e)}};function npe(t,e,n,r){if(!r)return e?{href:t,external:!0}:{href:n.createHref(t)||"/",external:!1}}function rpe(t){if(typeof t!="string")return!1;const e=t.charCodeAt(0);return e===47?t.charCodeAt(1)!==47:e===46}var E7=A.forwardRef((t,e)=>{const{_asChild:n,...r}=t,{type:s,...o}=Zhe(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 spe(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}var ope=class extends c7{constructor(e){super(e),this.useMatch=n=>ou({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>S7({...n,from:this.id}),this.useSearch=n=>b7({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>y7({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>v7({...n,from:this.id}),this.useLoaderData=n=>m7({...n,from:this.id}),this.useNavigate=()=>tR({from:this.fullPath}),this.Link=z.forwardRef((n,r)=>D.jsx(E7,{ref:r,from:this.fullPath,...n}))}};function ipe(t){return new ope(t)}function ape(){return t=>upe(t)}var lpe=class extends Fhe{constructor(t){super(t),this.useMatch=e=>ou({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>S7({...e,from:this.id}),this.useSearch=e=>b7({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>y7({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>v7({...e,from:this.id}),this.useLoaderData=e=>m7({...e,from:this.id}),this.useNavigate=()=>tR({from:this.fullPath}),this.Link=z.forwardRef((e,n)=>D.jsx(E7,{ref:n,from:this.fullPath,...e}))}};function upe(t){return new lpe(t)}function fr(t){return new cpe(t,{silent:!0}).createRoute}var cpe=class{constructor(t,e){this.path=t,this.createRoute=n=>{const r=ipe(n);return r.isRoot=!1,r},this.silent=e?.silent}};function or(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,jfe(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(UL)UL(a());else throw a();return A.createElement(r,f)};return u.preload=a,u}function dpe(t){const e=fs(),n=`not-found-${Wr(e.stores.location,r=>r.pathname)}-${Wr(e.stores.status,r=>r)}`;return D.jsx(JT,{getResetKey:()=>n,onCatch:(r,s)=>{if(dr(r))t.onCatch?.(r,s);else throw r},errorComponent:({error:r})=>{if(dr(r))return t.fallback?.(r);throw r},children:t.children})}function fpe(){return D.jsx("p",{children:"Not Found"})}function hc(t){return D.jsx(D.Fragment,{children:t.children})}function C7(t,e,n){return e.options.notFoundComponent?D.jsx(e.options.notFoundComponent,{...n}):t.options.defaultNotFoundComponent?D.jsx(t.options.defaultNotFoundComponent,{...n}):D.jsx(fpe,{})}function hpe(t){return null}function ppe(){return hpe(fs()),null}var gpe=(t,e)=>t.routeId===e.routeId&&t._displayPending===e._displayPending,mpe=(t,e)=>t[0]===e[0]&&t[1]===e[1],w7=A.memo(function({matchId:e}){const n=fs(),r=n.stores.matchStores.get(e);r||pi();const s=Wr(n.stores.loadedAt,a=>a),o=Wr(r,a=>a,gpe);return D.jsx(vpe,{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 vpe({router:t,matchId:e,resetKey:n,matchState:r}){const s=t.routesById[r.routeId],o=s.options.pendingComponent??t.options.defaultPendingComponent,a=o?D.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,p=r.ssr===!1||r.ssr==="data-only",g=(!s.isRoot||s.options.wrapInSuspense||p)&&(s.options.wrapInSuspense??o??(s.options.errorComponent?.preload||p))?A.Suspense:hc,m=u?JT:hc,y=f?dpe:hc;return D.jsxs(s.isRoot?s.options.shellComponent??hc:hc,{children:[D.jsx(lb.Provider,{value:e,children:D.jsx(g,{fallback:a,children:D.jsx(m,{getResetKey:()=>n,errorComponent:u||eR,onCatch:(S,E)=>{if(dr(S))throw S.routeId??=r.routeId,S;c?.(S,E)},children:D.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:p||r._displayPending?D.jsx(jhe,{fallback:a,children:D.jsx(i4,{matchId:e})}):D.jsx(i4,{matchId:e})})})})}),r.parentRouteId===Ml?D.jsxs(D.Fragment,{children:[D.jsx(ype,{}),t.options.scrollRestoration&&KF?D.jsx(ppe,{}):null]}):null]})}function ype(){const t=fs(),e=A.useRef();return Sc(()=>{const n=t.stores.resolvedLocation.get(),r=e.current;n&&(!r||r.href!==n.href)&&t.emit({type:"onRendered",...Ic(t.stores.location.get(),r??n)}),e.current=n},[Wr(t.stores.resolvedLocation,n=>n?.state.__TSR_key),t]),null}var i4=A.memo(function({matchId:e}){const n=fs(),r=(p,g)=>n.getMatch(p.id)?._nonReactive[g]??p._nonReactive[g],s=n.stores.matchStores.get(e);s||pi();const o=Wr(s,p=>p),a=o.routeId,u=n.routesById[a],c=A.useMemo(()=>{const p=(n.routesById[a].options.remountDeps??n.options.defaultRemountDeps)?.({routeId:a,loaderDeps:o.loaderDeps,params:o._strictParams,search:o._strictSearch});return p?JSON.stringify(p):void 0},[a,o.loaderDeps,o._strictParams,o._strictSearch,n.options.defaultRemountDeps,n.routesById]),f=A.useMemo(()=>{const p=u.options.component??n.options.defaultComponent;return p?D.jsx(p,{},c):D.jsx(x7,{})},[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 p=u.options.pendingMinMs??n.options.defaultPendingMinMs;if(p){const g=n.getMatch(o.id);if(g&&!g._nonReactive.minPendingPromise){const m=Uc();g._nonReactive.minPendingPromise=m,setTimeout(()=>{m.resolve(),g._nonReactive.minPendingPromise=void 0},p)}}throw r(o,"loadPromise")}if(o.status==="notFound")return dr(o.error)||pi(),C7(n,u,o.error);if(o.status==="redirected")throw zr(o.error)||pi(),r(o,"loadPromise");if(o.status==="error")throw o.error;return f}),x7=A.memo(function(){const e=fs(),n=A.useContext(lb);let r,s=!1,o;{const f=n?e.stores.matchStores.get(n):void 0;[r,s]=Wr(f,p=>[p?.routeId,p?.globalNotFound??!1],mpe),o=Wr(e.stores.matchesId,p=>p[p.findIndex(g=>g===n)+1])}const a=r?e.routesById[r]:void 0,u=e.options.defaultPendingComponent?D.jsx(e.options.defaultPendingComponent,{}):null;if(s)return a||pi(),C7(e,a,void 0);if(!o)return null;const c=D.jsx(w7,{matchId:o});return r===Ml?D.jsx(A.Suspense,{fallback:u,children:c}):c});function bpe(){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=Dw(s),u=s||n||o,c=Dw(u),f=s||o,p=Dw(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 fi(t.latestLocation.publicHref)!==fi(m.publicHref)&&t.commitLocation({...m,replace:!0}),()=>{g()}},[t,t.history]),Sc(()=>{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]),Sc(()=>{a&&!s&&t.emit({type:"onLoad",...Ic(t.stores.location.get(),t.stores.resolvedLocation.get())})},[a,t,s]),Sc(()=>{p&&!f&&t.emit({type:"onBeforeRouteMount",...Ic(t.stores.location.get(),t.stores.resolvedLocation.get())})},[f,p,t]),Sc(()=>{if(c&&!u){const g=Ic(t.stores.location.get(),t.stores.resolvedLocation.get());t.emit({type:"onResolved",...g}),p7(()=>{t.stores.status.set("idle"),t.stores.resolvedLocation.set(t.stores.location.get())})}},[u,c,t]),null}function Spe(){const t=fs(),e=t.routesById[Ml].options.pendingComponent??t.options.defaultPendingComponent,n=e?D.jsx(e,{}):null,r=D.jsxs(typeof document<"u"&&t.ssr?hc:A.Suspense,{fallback:n,children:[D.jsx(bpe,{}),D.jsx(Epe,{})]});return t.options.InnerWrap?D.jsx(t.options.InnerWrap,{children:r}):r}function Epe(){const t=fs(),e=Wr(t.stores.firstId,s=>s),n=Wr(t.stores.loadedAt,s=>s),r=e?D.jsx(w7,{matchId:e}):null;return D.jsx(lb.Provider,{value:e,children:t.options.disableGlobalCatchBoundary?r:D.jsx(JT,{getResetKey:()=>n,errorComponent:eR,onCatch:void 0,children:r})})}var Cpe=t=>({createMutableStore:o4,createReadonlyStore:o4,batch:p7}),wpe=t=>new xpe(t),xpe=class extends Ohe{constructor(t){super(t,Cpe)}};function _pe({router:t,children:e,...n}){ZF(n)&&t.update({...t.options,...n,context:{...t.options.context,...n.context}});const r=D.jsx(f7.Provider,{value:t,children:e});return t.options.Wrap?D.jsx(t.options.Wrap,{children:r}):r}function Ape({router:t,...e}){return D.jsx(_pe,{router:t,...e,children:D.jsx(Spe,{})})}var qw={exports:{}},Mf={},Ww={exports:{}},Gw={};var a4;function Tpe(){return a4||(a4=1,(function(t){function e($,ee){var fe=$.length;$.push(ee);e:for(;0<fe;){var de=fe-1>>>1,Ae=$[de];if(0<s(Ae,ee))$[de]=ee,$[fe]=Ae,fe=de;else break e}}function n($){return $.length===0?null:$[0]}function r($){if($.length===0)return null;var ee=$[0],fe=$.pop();if(fe!==ee){$[0]=fe;e:for(var de=0,Ae=$.length,L=Ae>>>1;de<L;){var V=2*(de+1)-1,K=$[V],J=V+1,oe=$[J];if(0>s(K,fe))J<Ae&&0>s(oe,K)?($[de]=oe,$[J]=fe,de=J):($[de]=K,$[V]=fe,de=V);else if(J<Ae&&0>s(oe,fe))$[de]=oe,$[J]=fe,de=J;else break e}}return ee}function s($,ee){var fe=$.sortIndex-ee.sortIndex;return fe!==0?fe:$.id-ee.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=[],p=1,g=null,m=3,y=!1,S=!1,E=!1,C=!1,w=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function R($){for(var ee=n(f);ee!==null;){if(ee.callback===null)r(f);else if(ee.startTime<=$)r(f),ee.sortIndex=ee.expirationTime,e(c,ee);else break;ee=n(f)}}function M($){if(E=!1,R($),!S)if(n(c)!==null)S=!0,O||(O=!0,j());else{var ee=n(f);ee!==null&&ne(M,ee.startTime-$)}}var O=!1,I=-1,P=5,k=-1;function H(){return C?!0:!(t.unstable_now()-k<P)}function F(){if(C=!1,O){var $=t.unstable_now();k=$;var ee=!0;try{e:{S=!1,E&&(E=!1,_(I),I=-1),y=!0;var fe=m;try{t:{for(R($),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<=$);if($=t.unstable_now(),typeof Ae=="function"){g.callback=Ae,R($),ee=!0;break t}g===n(c)&&r(c),R($)}else r(c);g=n(c)}if(g!==null)ee=!0;else{var L=n(f);L!==null&&ne(M,L.startTime-$),ee=!1}}break e}finally{g=null,m=fe,y=!1}ee=void 0}}finally{ee?j():O=!1}}}var j;if(typeof T=="function")j=function(){T(F)};else if(typeof MessageChannel<"u"){var W=new MessageChannel,Y=W.port2;W.port1.onmessage=F,j=function(){Y.postMessage(null)}}else j=function(){w(F,0)};function ne($,ee){I=w(function(){$(t.unstable_now())},ee)}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($){$.callback=null},t.unstable_forceFrameRate=function($){0>$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<$?Math.floor(1e3/$):5},t.unstable_getCurrentPriorityLevel=function(){return m},t.unstable_next=function($){switch(m){case 1:case 2:case 3:var ee=3;break;default:ee=m}var fe=m;m=ee;try{return $()}finally{m=fe}},t.unstable_requestPaint=function(){C=!0},t.unstable_runWithPriority=function($,ee){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var fe=m;m=$;try{return ee()}finally{m=fe}},t.unstable_scheduleCallback=function($,ee,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,$){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,$={id:p++,callback:ee,priorityLevel:$,startTime:fe,expirationTime:Ae,sortIndex:-1},fe>de?($.sortIndex=fe,e(f,$),n(c)===null&&$===n(f)&&(E?(_(I),I=-1):E=!0,ne(M,fe-de))):($.sortIndex=Ae,e(c,$),S||y||(S=!0,O||(O=!0,j()))),$},t.unstable_shouldYield=H,t.unstable_wrapCallback=function($){var ee=m;return function(){var fe=m;m=ee;try{return $.apply(this,arguments)}finally{m=fe}}}})(Gw)),Gw}var l4;function Rpe(){return l4||(l4=1,Ww.exports=Tpe()),Ww.exports}var u4;function Ipe(){if(u4)return Mf;u4=1;var t=Rpe(),e=Qh(),n=e8();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,h=l;;){var v=d.return;if(v===null)break;var b=v.alternate;if(b===null){if(h=v.return,h!==null){d=h;continue}break}if(v.child===b.child){for(b=v.child;b;){if(b===d)return c(v),i;if(b===h)return c(v),l;b=b.sibling}throw Error(r(188))}if(d.return!==h.return)d=v,h=b;else{for(var x=!1,N=v.child;N;){if(N===d){x=!0,d=v,h=b;break}if(N===h){x=!0,h=v,d=b;break}N=N.sibling}if(!x){for(N=b.child;N;){if(N===d){x=!0,d=b,h=v;break}if(N===h){x=!0,h=b,d=v;break}N=N.sibling}if(!x)throw Error(r(189))}}if(d.alternate!==h)throw Error(r(190))}if(d.tag!==3)throw Error(r(188));return d.stateNode.current===d?i:l}function p(i){var l=i.tag;if(l===5||l===26||l===27||l===6)return i;for(i=i.child;i!==null;){if(l=p(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"),_=Symbol.for("react.consumer"),T=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),O=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),k=Symbol.for("react.activity"),H=Symbol.for("react.memo_cache_sentinel"),F=Symbol.iterator;function j(i){return i===null||typeof i!="object"?null:(i=F&&i[F]||i["@@iterator"],typeof i=="function"?i:null)}var W=Symbol.for("react.client.reference");function Y(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===W?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 O:return"SuspenseList";case k:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case S:return"Portal";case T:return i.displayName||"Context";case _: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 I:return l=i.displayName||null,l!==null?l:Y(i.type)||"Memo";case P:l=i._payload,i=i._init;try{return Y(i(l))}catch{}}return null}var ne=Array.isArray,$=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee=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 V(i){0>Ae||(i.current=de[Ae],de[Ae]=null,Ae--)}function K(i,l){Ae++,de[Ae]=i.current,i.current=l}var J=L(null),oe=L(null),he=L(null),ue=L(null);function ve(i,l){switch(K(he,l),K(oe,i),K(J,null),l.nodeType){case 9:case 11:i=(i=l.documentElement)&&(i=i.namespaceURI)?GO(i):0;break;default:if(i=l.tagName,l=l.namespaceURI)l=GO(l),i=VO(l,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}V(J),K(J,i)}function xe(){V(J),V(oe),V(he)}function Xe(i){i.memoizedState!==null&&K(ue,i);var l=J.current,d=VO(l,i.type);l!==d&&(K(oe,i),K(J,d))}function Ee(i){oe.current===i&&(V(J),V(oe)),ue.current===i&&(V(ue),cf._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
217
  at`)?" (<anonymous>)":-1<d.stack.indexOf("@")?"@unknown:0:0":""}return`
218
218
  `+pt+i+Ce}var je=!1;function He(i,l){if(!i||je)return"";je=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var h={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 te=re}Reflect.construct(i,[],ae)}else{try{ae.call()}catch(re){te=re}i.call(ae.prototype)}}else{try{throw Error()}catch(re){te=re}(ae=i())&&typeof ae.catch=="function"&&ae.catch(function(){})}}catch(re){if(re&&te&&typeof re.stack=="string")return[re.stack,te.stack]}return[null,null]}};h.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var v=Object.getOwnPropertyDescriptor(h.DetermineComponentFrameRoot,"name");v&&v.configurable&&Object.defineProperty(h.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var b=h.DetermineComponentFrameRoot(),x=b[0],N=b[1];if(x&&N){var B=x.split(`
219
219
  `),Q=N.split(`
@@ -221,14 +221,14 @@ Minimum version required to store current data is: `+F+`.
221
221
  `+B[h].replace(" at new "," at ");return i.displayName&&se.includes("<anonymous>")&&(se=se.replace("<anonymous>",i.displayName)),se}while(1<=h&&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 He(i.type,!1);case 11:return He(i.type.render,!1);case 1:return He(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(h){return`
222
222
  Error generating stack: `+h.message+`
223
223
  `+h.stack}}var Vr=Object.prototype.hasOwnProperty,Gn=t.unstable_scheduleCallback,Ar=t.unstable_cancelCallback,to=t.unstable_shouldYield,Tr=t.unstable_requestPaint,Gt=t.unstable_now,gt=t.unstable_getCurrentPriorityLevel,vn=t.unstable_ImmediatePriority,Rr=t.unstable_UserBlockingPriority,no=t.unstable_NormalPriority,hd=t.unstable_LowPriority,ko=t.unstable_IdlePriority,cu=t.log,du=t.unstable_setDisableYieldValue,Mi=null,ar=null;function Ps(i){if(typeof cu=="function"&&du(i),ar&&typeof ar.setStrictMode=="function")try{ar.setStrictMode(Mi,i)}catch{}}var Vn=Math.clz32?Math.clz32:ps,pd=Math.log,Pi=Math.LN2;function ps(i){return i>>>=0,i===0?32:31-(pd(i)/Pi|0)|0}var ki=256,Va=262144,Ka=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 Ya(i,l,d){var h=i.pendingLanes;if(h===0)return 0;var v=0,b=i.suspendedLanes,x=i.pingedLanes;i=i.warmLanes;var N=h&134217727;return N!==0?(h=N&~b,h!==0?v=ks(h):(x&=N,x!==0?v=ks(x):d||(d=N&~i,d!==0&&(v=ks(d))))):(N=h&~b,N!==0?v=ks(N):x!==0?v=ks(x):d||(d=h&~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 ro(i,l){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&l)===0}function fu(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=Ka;return Ka<<=1,(Ka&62914560)===0&&(Ka=4194304),i}function so(i){for(var l=[],d=0;31>d;d++)l.push(i);return l}function Do(i,l){i.pendingLanes|=l,l!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function gd(i,l,d,h,v,b){var x=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 N=i.entanglements,B=i.expirationTimes,Q=i.hiddenUpdates;for(d=x&~d;0<d;){var se=31-Vn(d),ae=1<<se;N[se]=0,B[se]=-1;var te=Q[se];if(te!==null)for(Q[se]=null,se=0;se<te.length;se++){var re=te[se];re!==null&&(re.lane&=-536870913)}d&=~ae}h!==0&&gp(i,h,0),b!==0&&v===0&&i.tag!==0&&(i.suspendedLanes|=b&~(x&~l))}function gp(i,l,d){i.pendingLanes|=l,i.suspendedLanes&=~l;var h=31-Vn(l);i.entangledLanes|=l,i.entanglements[h]=i.entanglements[h]|1073741824|d&261930}function md(i,l){var d=i.entangledLanes|=l;for(i=i.entanglements;d;){var h=31-Vn(d),v=1<<h;v&l|i[h]&l&&(i[h]|=l),d&=~v}}function hu(i,l){var d=l&-l;return d=(d&42)!==0?1:pu(d),(d&(i.suspendedLanes|l))!==0?0:d}function pu(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 Za(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function mp(){var i=ee.p;return i!==0?i:(i=window.event,i===void 0?32:mN(i.type))}function Di(i,l){var d=ee.p;try{return ee.p=i,l()}finally{ee.p=d}}var oo=Math.random().toString(36).slice(2),In="__reactFiber$"+oo,nt="__reactProps$"+oo,Yr="__reactContainer$"+oo,vd="__reactEvents$"+oo,vp="__reactListeners$"+oo,yd="__reactHandles$"+oo,bd="__reactResources$"+oo,Li="__reactMarker$"+oo;function Sd(i){delete i[In],delete i[nt],delete i[vd],delete i[vp],delete i[yd]}function Ui(i){var l=i[In];if(l)return l;for(var d=i.parentNode;d;){if(l=d[Yr]||d[In]){if(d=l.alternate,l.child!==null||d!==null&&d.child!==null)for(i=eN(i);i!==null;){if(d=i[In])return d;i=eN(i)}return l}i=d,d=i.parentNode}return null}function Fi(i){if(i=i[In]||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 Xa(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[bd];return l||(l=i[bd]={hoistableStyles:new Map,hoistableScripts:new Map}),l}function an(i){i[Li]=!0}var io=new Set,yp={};function Ds(i,l){zi(i,l),zi(i+"Capture",l)}function zi(i,l){for(yp[i]=l,i=0;i<l.length;i++)io.add(l[i])}var bp=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]*$"),Ed={},Qa={};function Cd(i){return Vr.call(Qa,i)?!0:Vr.call(Ed,i)?!1:bp.test(i)?Qa[i]=!0:(Ed[i]=!0,!1)}function Lo(i,l,d){if(Cd(l))if(d===null)i.removeAttribute(l);else{switch(typeof d){case"undefined":case"function":case"symbol":i.removeAttribute(l);return;case"boolean":var h=l.toLowerCase().slice(0,5);if(h!=="data-"&&h!=="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,h){if(h===null)i.removeAttribute(d);else{switch(typeof h){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(d);return}i.setAttributeNS(l,d,""+h)}}function ln(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Sp(i){var l=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function Ib(i,l,d){var h=Object.getOwnPropertyDescriptor(i.constructor.prototype,l);if(!i.hasOwnProperty(l)&&typeof h<"u"&&typeof h.get=="function"&&typeof h.set=="function"){var v=h.get,b=h.set;return Object.defineProperty(i,l,{configurable:!0,get:function(){return v.call(this)},set:function(x){d=""+x,b.call(this,x)}}),Object.defineProperty(i,l,{enumerable:h.enumerable}),{getValue:function(){return d},setValue:function(x){d=""+x},stopTracking:function(){i._valueTracker=null,delete i[l]}}}}function gu(i){if(!i._valueTracker){var l=Sp(i)?"checked":"value";i._valueTracker=Ib(i,l,""+i[l])}}function wd(i){if(!i)return!1;var l=i._valueTracker;if(!l)return!0;var d=l.getValue(),h="";return i&&(h=Sp(i)?i.checked?"true":"false":i.value),i=h,i!==d?(l.setValue(i),!0):!1}function mu(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 Ep=/[\n"\\]/g;function Ir(i){return i.replace(Ep,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function xd(i,l,d,h,v,b,x,N){i.name="",x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?i.type=x:i.removeAttribute("type"),l!=null?x==="number"?(l===0&&i.value===""||i.value!=l)&&(i.value=""+ln(l)):i.value!==""+ln(l)&&(i.value=""+ln(l)):x!=="submit"&&x!=="reset"||i.removeAttribute("value"),l!=null?ji(i,x,ln(l)):d!=null?ji(i,x,ln(d)):h!=null&&i.removeAttribute("value"),v==null&&b!=null&&(i.defaultChecked=!!b),v!=null&&(i.checked=v&&typeof v!="function"&&typeof v!="symbol"),N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"?i.name=""+ln(N):i.removeAttribute("name")}function _d(i,l,d,h,v,b,x,N){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)){gu(i);return}d=d!=null?""+ln(d):"",l=l!=null?""+ln(l):d,N||l===i.value||(i.value=l),i.defaultValue=l}h=h??v,h=typeof h!="function"&&typeof h!="symbol"&&!!h,i.checked=N?i.checked:!!h,i.defaultChecked=!!h,x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(i.name=x),gu(i)}function ji(i,l,d){l==="number"&&mu(i.ownerDocument)===i||i.defaultValue===""+d||(i.defaultValue=""+d)}function ao(i,l,d,h){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&&h&&(i[d].defaultSelected=!0)}else{for(d=""+ln(d),l=null,v=0;v<i.length;v++){if(i[v].value===d){i[v].selected=!0,h&&(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=""+ln(l),l!==i.value&&(i.value=l),d==null)){i.defaultValue!==l&&(i.defaultValue=l);return}i.defaultValue=d!=null?""+ln(d):""}function U(i,l,d,h){if(l==null){if(h!=null){if(d!=null)throw Error(r(92));if(ne(h)){if(1<h.length)throw Error(r(93));h=h[0]}d=h}d==null&&(d=""),l=d}d=ln(l),i.defaultValue=d,h=i.textContent,h===d&&h!==""&&h!==null&&(i.value=h),gu(i)}function Z(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 h=l.indexOf("--")===0;d==null||typeof d=="boolean"||d===""?h?i.setProperty(l,""):l==="float"?i.cssFloat="":i[l]="":h?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 h in d)!d.hasOwnProperty(h)||l!=null&&l.hasOwnProperty(h)||(h.indexOf("--")===0?i.setProperty(h,""):h==="float"?i.cssFloat="":i[h]="");for(var v in l)h=l[v],l.hasOwnProperty(v)&&d[v]!==h&&Te(i,v,h)}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 en=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"]]),Dn=/^[\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 lr(i){return Dn.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function tn(){}var yr=null;function On(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var vu=null,yu=null;function WR(i){var l=Fi(i);if(l&&(i=l.stateNode)){var d=i[nt]||null;e:switch(i=l.stateNode,l.type){case"input":if(xd(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="'+Ir(""+l)+'"][type="radio"]'),l=0;l<d.length;l++){var h=d[l];if(h!==i&&h.form===i.form){var v=h[nt]||null;if(!v)throw Error(r(90));xd(h,v.value,v.defaultValue,v.defaultValue,v.checked,v.defaultChecked,v.type,v.name)}}for(l=0;l<d.length;l++)h=d[l],h.form===i.form&&wd(h)}break e;case"textarea":pe(i,d.value,d.defaultValue);break e;case"select":l=d.value,l!=null&&ao(i,!!d.multiple,l,!1)}}}var Ob=!1;function GR(i,l,d){if(Ob)return i(l,d);Ob=!0;try{var h=i(l);return h}finally{if(Ob=!1,(vu!==null||yu!==null)&&(lg(),vu&&(l=vu,i=yu,yu=vu=null,WR(l),i)))for(l=0;l<i.length;l++)WR(i[l])}}function Ad(i,l){var d=i.stateNode;if(d===null)return null;var h=d[nt]||null;if(h===null)return null;d=h[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":(h=!h.disabled)||(i=i.type,h=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!h;break e;default:i=!1}if(i)return null;if(d&&typeof d!="function")throw Error(r(231,l,typeof d));return d}var Uo=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Nb=!1;if(Uo)try{var Td={};Object.defineProperty(Td,"passive",{get:function(){Nb=!0}}),window.addEventListener("test",Td,Td),window.removeEventListener("test",Td,Td)}catch{Nb=!1}var Bi=null,Mb=null,Cp=null;function VR(){if(Cp)return Cp;var i,l=Mb,d=l.length,h,v="value"in Bi?Bi.value:Bi.textContent,b=v.length;for(i=0;i<d&&l[i]===v[i];i++);var x=d-i;for(h=1;h<=x&&l[d-h]===v[b-h];h++);return Cp=v.slice(i,1<h?1-h:void 0)}function wp(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 xp(){return!0}function KR(){return!1}function Or(i){function l(d,h,v,b,x){this._reactName=d,this._targetInst=v,this.type=h,this.nativeEvent=b,this.target=x,this.currentTarget=null;for(var N in i)i.hasOwnProperty(N)&&(d=i[N],this[N]=d?d(b):b[N]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?xp:KR,this.isPropagationStopped=KR,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=xp)},stopPropagation:function(){var d=this.nativeEvent;d&&(d.stopPropagation?d.stopPropagation():typeof d.cancelBubble!="unknown"&&(d.cancelBubble=!0),this.isPropagationStopped=xp)},persist:function(){},isPersistent:xp}),l}var Ja={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},_p=Or(Ja),Rd=g({},Ja,{view:0,detail:0}),kB=Or(Rd),Pb,kb,Id,Ap=g({},Rd,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Lb,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!==Id&&(Id&&i.type==="mousemove"?(Pb=i.screenX-Id.screenX,kb=i.screenY-Id.screenY):kb=Pb=0,Id=i),Pb)},movementY:function(i){return"movementY"in i?i.movementY:kb}}),YR=Or(Ap),DB=g({},Ap,{dataTransfer:0}),LB=Or(DB),UB=g({},Rd,{relatedTarget:0}),Db=Or(UB),FB=g({},Ja,{animationName:0,elapsedTime:0,pseudoElement:0}),zB=Or(FB),jB=g({},Ja,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),BB=Or(jB),HB=g({},Ja,{data:0}),ZR=Or(HB),$B={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},qB={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"},WB={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function GB(i){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(i):(i=WB[i])?!!l[i]:!1}function Lb(){return GB}var VB=g({},Rd,{key:function(i){if(i.key){var l=$B[i.key]||i.key;if(l!=="Unidentified")return l}return i.type==="keypress"?(i=wp(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?qB[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Lb,charCode:function(i){return i.type==="keypress"?wp(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?wp(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),KB=Or(VB),YB=g({},Ap,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),XR=Or(YB),ZB=g({},Rd,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Lb}),XB=Or(ZB),QB=g({},Ja,{propertyName:0,elapsedTime:0,pseudoElement:0}),JB=Or(QB),eH=g({},Ap,{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}),tH=Or(eH),nH=g({},Ja,{newState:0,oldState:0}),rH=Or(nH),sH=[9,13,27,32],Ub=Uo&&"CompositionEvent"in window,Od=null;Uo&&"documentMode"in document&&(Od=document.documentMode);var oH=Uo&&"TextEvent"in window&&!Od,QR=Uo&&(!Ub||Od&&8<Od&&11>=Od),JR=" ",eI=!1;function tI(i,l){switch(i){case"keyup":return sH.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function nI(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var bu=!1;function iH(i,l){switch(i){case"compositionend":return nI(l);case"keypress":return l.which!==32?null:(eI=!0,JR);case"textInput":return i=l.data,i===JR&&eI?null:i;default:return null}}function aH(i,l){if(bu)return i==="compositionend"||!Ub&&tI(i,l)?(i=VR(),Cp=Mb=Bi=null,bu=!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 QR&&l.locale!=="ko"?null:l.data;default:return null}}var lH={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 rI(i){var l=i&&i.nodeName&&i.nodeName.toLowerCase();return l==="input"?!!lH[i.type]:l==="textarea"}function sI(i,l,d,h){vu?yu?yu.push(h):yu=[h]:vu=h,l=gg(l,"onChange"),0<l.length&&(d=new _p("onChange","change",null,d,h),i.push({event:d,listeners:l}))}var Nd=null,Md=null;function uH(i){jO(i,0)}function Tp(i){var l=Xa(i);if(wd(l))return i}function oI(i,l){if(i==="change")return l}var iI=!1;if(Uo){var Fb;if(Uo){var zb="oninput"in document;if(!zb){var aI=document.createElement("div");aI.setAttribute("oninput","return;"),zb=typeof aI.oninput=="function"}Fb=zb}else Fb=!1;iI=Fb&&(!document.documentMode||9<document.documentMode)}function lI(){Nd&&(Nd.detachEvent("onpropertychange",uI),Md=Nd=null)}function uI(i){if(i.propertyName==="value"&&Tp(Md)){var l=[];sI(l,Md,i,On(i)),GR(uH,l)}}function cH(i,l,d){i==="focusin"?(lI(),Nd=l,Md=d,Nd.attachEvent("onpropertychange",uI)):i==="focusout"&&lI()}function dH(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Tp(Md)}function fH(i,l){if(i==="click")return Tp(l)}function hH(i,l){if(i==="input"||i==="change")return Tp(l)}function pH(i,l){return i===l&&(i!==0||1/i===1/l)||i!==i&&l!==l}var Zr=typeof Object.is=="function"?Object.is:pH;function Pd(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),h=Object.keys(l);if(d.length!==h.length)return!1;for(h=0;h<d.length;h++){var v=d[h];if(!Vr.call(l,v)||!Zr(i[v],l[v]))return!1}return!0}function cI(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function dI(i,l){var d=cI(i);i=0;for(var h;d;){if(d.nodeType===3){if(h=i+d.textContent.length,i<=l&&h>=l)return{node:d,offset:l-i};i=h}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=cI(d)}}function fI(i,l){return i&&l?i===l?!0:i&&i.nodeType===3?!1:l&&l.nodeType===3?fI(i,l.parentNode):"contains"in i?i.contains(l):i.compareDocumentPosition?!!(i.compareDocumentPosition(l)&16):!1:!1}function hI(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var l=mu(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=mu(i.document)}return l}function jb(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 gH=Uo&&"documentMode"in document&&11>=document.documentMode,Su=null,Bb=null,kd=null,Hb=!1;function pI(i,l,d){var h=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;Hb||Su==null||Su!==mu(h)||(h=Su,"selectionStart"in h&&jb(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),kd&&Pd(kd,h)||(kd=h,h=gg(Bb,"onSelect"),0<h.length&&(l=new _p("onSelect","select",null,l,d),i.push({event:l,listeners:h}),l.target=Su)))}function el(i,l){var d={};return d[i.toLowerCase()]=l.toLowerCase(),d["Webkit"+i]="webkit"+l,d["Moz"+i]="moz"+l,d}var Eu={animationend:el("Animation","AnimationEnd"),animationiteration:el("Animation","AnimationIteration"),animationstart:el("Animation","AnimationStart"),transitionrun:el("Transition","TransitionRun"),transitionstart:el("Transition","TransitionStart"),transitioncancel:el("Transition","TransitionCancel"),transitionend:el("Transition","TransitionEnd")},$b={},gI={};Uo&&(gI=document.createElement("div").style,"AnimationEvent"in window||(delete Eu.animationend.animation,delete Eu.animationiteration.animation,delete Eu.animationstart.animation),"TransitionEvent"in window||delete Eu.transitionend.transition);function tl(i){if($b[i])return $b[i];if(!Eu[i])return i;var l=Eu[i],d;for(d in l)if(l.hasOwnProperty(d)&&d in gI)return $b[i]=l[d];return i}var mI=tl("animationend"),vI=tl("animationiteration"),yI=tl("animationstart"),mH=tl("transitionrun"),vH=tl("transitionstart"),yH=tl("transitioncancel"),bI=tl("transitionend"),SI=new Map,qb="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(" ");qb.push("scrollEnd");function Us(i,l){SI.set(i,l),Ds(l,[i])}var Rp=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=[],Cu=0,Wb=0;function Ip(){for(var i=Cu,l=Wb=Cu=0;l<i;){var d=gs[l];gs[l++]=null;var h=gs[l];gs[l++]=null;var v=gs[l];gs[l++]=null;var b=gs[l];if(gs[l++]=null,h!==null&&v!==null){var x=h.pending;x===null?v.next=v:(v.next=x.next,x.next=v),h.pending=v}b!==0&&EI(d,v,b)}}function Op(i,l,d,h){gs[Cu++]=i,gs[Cu++]=l,gs[Cu++]=d,gs[Cu++]=h,Wb|=h,i.lanes|=h,i=i.alternate,i!==null&&(i.lanes|=h)}function Gb(i,l,d,h){return Op(i,l,d,h),Np(i)}function nl(i,l){return Op(i,null,null,l),Np(i)}function EI(i,l,d){i.lanes|=d;var h=i.alternate;h!==null&&(h.lanes|=d);for(var v=!1,b=i.return;b!==null;)b.childLanes|=d,h=b.alternate,h!==null&&(h.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-Vn(d),i=b.hiddenUpdates,h=i[v],h===null?i[v]=[l]:h.push(l),l.lane=d|536870912),b):null}function Np(i){if(50<nf)throw nf=0,t1=null,Error(r(185));for(var l=i.return;l!==null;)i=l,l=i.return;return i.tag===3?i.stateNode:null}var wu={};function bH(i,l,d,h){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=h,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Xr(i,l,d,h){return new bH(i,l,d,h)}function Vb(i){return i=i.prototype,!(!i||!i.isReactComponent)}function Fo(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 CI(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 Mp(i,l,d,h,v,b){var x=0;if(h=i,typeof i=="function")Vb(i)&&(x=1);else if(typeof i=="string")x=x$(i,d,J.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case k:return i=Xr(31,d,l,v),i.elementType=k,i.lanes=b,i;case E:return rl(d.children,v,b,l);case C:x=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 O:return i=Xr(19,d,l,v),i.elementType=O,i.lanes=b,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case T:x=10;break e;case _:x=9;break e;case R:x=11;break e;case I:x=14;break e;case P:x=16,h=null;break e}x=29,d=Error(r(130,i===null?"null":typeof i,"")),h=null}return l=Xr(x,d,l,v),l.elementType=i,l.type=h,l.lanes=b,l}function rl(i,l,d,h){return i=Xr(7,i,h,l),i.lanes=d,i}function Kb(i,l,d){return i=Xr(6,i,null,l),i.lanes=d,i}function wI(i){var l=Xr(18,null,null,0);return l.stateNode=i,l}function Yb(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 xI=new WeakMap;function ms(i,l){if(typeof i=="object"&&i!==null){var d=xI.get(i);return d!==void 0?d:(l={value:i,source:l,stack:Et(l)},xI.set(i,l),l)}return{value:i,source:l,stack:Et(l)}}var xu=[],_u=0,Pp=null,Dd=0,vs=[],ys=0,Hi=null,lo=1,uo="";function zo(i,l){xu[_u++]=Dd,xu[_u++]=Pp,Pp=i,Dd=l}function _I(i,l,d){vs[ys++]=lo,vs[ys++]=uo,vs[ys++]=Hi,Hi=i;var h=lo;i=uo;var v=32-Vn(h)-1;h&=~(1<<v),d+=1;var b=32-Vn(l)+v;if(30<b){var x=v-v%5;b=(h&(1<<x)-1).toString(32),h>>=x,v-=x,lo=1<<32-Vn(l)+v|d<<v|h,uo=b+i}else lo=1<<b|d<<v|h,uo=i}function Zb(i){i.return!==null&&(zo(i,1),_I(i,1,0))}function Xb(i){for(;i===Pp;)Pp=xu[--_u],xu[_u]=null,Dd=xu[--_u],xu[_u]=null;for(;i===Hi;)Hi=vs[--ys],vs[ys]=null,uo=vs[--ys],vs[ys]=null,lo=vs[--ys],vs[ys]=null}function AI(i,l){vs[ys++]=lo,vs[ys++]=uo,vs[ys++]=Hi,lo=l.id,uo=l.overflow,Hi=i}var Kn=null,Vt=null,dt=!1,$i=null,bs=!1,Qb=Error(r(519));function qi(i){var l=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ld(ms(l,i)),Qb}function TI(i){var l=i.stateNode,d=i.type,h=i.memoizedProps;switch(l[In]=i,l[nt]=h,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<sf.length;d++)at(sf[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),_d(l,h.value,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name,!0);break;case"select":at("invalid",l);break;case"textarea":at("invalid",l),U(l,h.value,h.defaultValue,h.children)}d=h.children,typeof d!="string"&&typeof d!="number"&&typeof d!="bigint"||l.textContent===""+d||h.suppressHydrationWarning===!0||qO(l.textContent,d)?(h.popover!=null&&(at("beforetoggle",l),at("toggle",l)),h.onScroll!=null&&at("scroll",l),h.onScrollEnd!=null&&at("scrollend",l),h.onClick!=null&&(l.onclick=tn),l=!0):l=!1,l||qi(i,!0)}function RI(i){for(Kn=i.return;Kn;)switch(Kn.tag){case 5:case 31:case 13:bs=!1;return;case 27:case 3:bs=!0;return;default:Kn=Kn.return}}function Au(i){if(i!==Kn)return!1;if(!dt)return RI(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")||m1(i.type,i.memoizedProps)),d=!d),d&&Vt&&qi(i),RI(i),l===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));Vt=JO(i)}else if(l===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));Vt=JO(i)}else l===27?(l=Vt,sa(i.type)?(i=E1,E1=null,Vt=i):Vt=l):Vt=Kn?Es(i.stateNode.nextSibling):null;return!0}function sl(){Vt=Kn=null,dt=!1}function Jb(){var i=$i;return i!==null&&(kr===null?kr=i:kr.push.apply(kr,i),$i=null),i}function Ld(i){$i===null?$i=[i]:$i.push(i)}var e0=L(null),ol=null,jo=null;function Wi(i,l,d){K(e0,l._currentValue),l._currentValue=d}function Bo(i){i._currentValue=e0.current,V(e0)}function t0(i,l,d){for(;i!==null;){var h=i.alternate;if((i.childLanes&l)!==l?(i.childLanes|=l,h!==null&&(h.childLanes|=l)):h!==null&&(h.childLanes&l)!==l&&(h.childLanes|=l),i===d)break;i=i.return}}function n0(i,l,d,h){var v=i.child;for(v!==null&&(v.return=i);v!==null;){var b=v.dependencies;if(b!==null){var x=v.child;b=b.firstContext;e:for(;b!==null;){var N=b;b=v;for(var B=0;B<l.length;B++)if(N.context===l[B]){b.lanes|=d,N=b.alternate,N!==null&&(N.lanes|=d),t0(b.return,d,i),h||(x=null);break e}b=N.next}}else if(v.tag===18){if(x=v.return,x===null)throw Error(r(341));x.lanes|=d,b=x.alternate,b!==null&&(b.lanes|=d),t0(x,d,i),x=null}else x=v.child;if(x!==null)x.return=v;else for(x=v;x!==null;){if(x===i){x=null;break}if(v=x.sibling,v!==null){v.return=x.return,x=v;break}x=x.return}v=x}}function Tu(i,l,d,h){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 x=v.alternate;if(x===null)throw Error(r(387));if(x=x.memoizedProps,x!==null){var N=v.type;Zr(v.pendingProps.value,x.value)||(i!==null?i.push(N):i=[N])}}else if(v===ue.current){if(x=v.alternate,x===null)throw Error(r(387));x.memoizedState.memoizedState!==v.memoizedState.memoizedState&&(i!==null?i.push(cf):i=[cf])}v=v.return}i!==null&&n0(l,i,d,h),l.flags|=262144}function kp(i){for(i=i.firstContext;i!==null;){if(!Zr(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function il(i){ol=i,jo=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function Yn(i){return II(ol,i)}function Dp(i,l){return ol===null&&il(i),II(i,l)}function II(i,l){var d=l._currentValue;if(l={context:l,memoizedValue:d,next:null},jo===null){if(i===null)throw Error(r(308));jo=l,i.dependencies={lanes:0,firstContext:l},i.flags|=524288}else jo=jo.next=l;return d}var SH=typeof AbortController<"u"?AbortController:function(){var i=[],l=this.signal={aborted:!1,addEventListener:function(d,h){i.push(h)}};this.abort=function(){l.aborted=!0,i.forEach(function(d){return d()})}},EH=t.unstable_scheduleCallback,CH=t.unstable_NormalPriority,Sn={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function r0(){return{controller:new SH,data:new Map,refCount:0}}function Ud(i){i.refCount--,i.refCount===0&&EH(CH,function(){i.controller.abort()})}var Fd=null,s0=0,Ru=0,Iu=null;function wH(i,l){if(Fd===null){var d=Fd=[];s0=0,Ru=a1(),Iu={status:"pending",value:void 0,then:function(h){d.push(h)}}}return s0++,l.then(OI,OI),l}function OI(){if(--s0===0&&Fd!==null){Iu!==null&&(Iu.status="fulfilled");var i=Fd;Fd=null,Ru=0,Iu=null;for(var l=0;l<i.length;l++)(0,i[l])()}}function xH(i,l){var d=[],h={status:"pending",value:null,reason:null,then:function(v){d.push(v)}};return i.then(function(){h.status="fulfilled",h.value=l;for(var v=0;v<d.length;v++)(0,d[v])(l)},function(v){for(h.status="rejected",h.reason=v,v=0;v<d.length;v++)(0,d[v])(void 0)}),h}var NI=$.S;$.S=function(i,l){pO=Gt(),typeof l=="object"&&l!==null&&typeof l.then=="function"&&wH(i,l),NI!==null&&NI(i,l)};var al=L(null);function o0(){var i=al.current;return i!==null?i:qt.pooledCache}function Lp(i,l){l===null?K(al,al.current):K(al,l.pool)}function MI(){var i=o0();return i===null?null:{parent:Sn._currentValue,pool:i}}var Ou=Error(r(460)),i0=Error(r(474)),Up=Error(r(542)),Fp={then:function(){}};function PI(i){return i=i.status,i==="fulfilled"||i==="rejected"}function kI(i,l,d){switch(d=i[d],d===void 0?i.push(l):d!==l&&(l.then(tn,tn),l=d),l.status){case"fulfilled":return l.value;case"rejected":throw i=l.reason,LI(i),i;default:if(typeof l.status=="string")l.then(tn,tn);else{if(i=qt,i!==null&&100<i.shellSuspendCounter)throw Error(r(482));i=l,i.status="pending",i.then(function(h){if(l.status==="pending"){var v=l;v.status="fulfilled",v.value=h}},function(h){if(l.status==="pending"){var v=l;v.status="rejected",v.reason=h}})}switch(l.status){case"fulfilled":return l.value;case"rejected":throw i=l.reason,LI(i),i}throw ul=l,Ou}}function ll(i){try{var l=i._init;return l(i._payload)}catch(d){throw d!==null&&typeof d=="object"&&typeof d.then=="function"?(ul=d,Ou):d}}var ul=null;function DI(){if(ul===null)throw Error(r(459));var i=ul;return ul=null,i}function LI(i){if(i===Ou||i===Up)throw Error(r(483))}var Nu=null,zd=0;function zp(i){var l=zd;return zd+=1,Nu===null&&(Nu=[]),kI(Nu,i,l)}function jd(i,l){l=l.props.ref,i.ref=l!==void 0?l:null}function jp(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 UI(i){function l(G,q){if(i){var X=G.deletions;X===null?(G.deletions=[q],G.flags|=16):X.push(q)}}function d(G,q){if(!i)return null;for(;q!==null;)l(G,q),q=q.sibling;return null}function h(G){for(var q=new Map;G!==null;)G.key!==null?q.set(G.key,G):q.set(G.index,G),G=G.sibling;return q}function v(G,q){return G=Fo(G,q),G.index=0,G.sibling=null,G}function b(G,q,X){return G.index=X,i?(X=G.alternate,X!==null?(X=X.index,X<q?(G.flags|=67108866,q):X):(G.flags|=67108866,q)):(G.flags|=1048576,q)}function x(G){return i&&G.alternate===null&&(G.flags|=67108866),G}function N(G,q,X,ie){return q===null||q.tag!==6?(q=Kb(X,G.mode,ie),q.return=G,q):(q=v(q,X),q.return=G,q)}function B(G,q,X,ie){var Pe=X.type;return Pe===E?se(G,q,X.props.children,ie,X.key):q!==null&&(q.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===P&&ll(Pe)===q.type)?(q=v(q,X.props),jd(q,X),q.return=G,q):(q=Mp(X.type,X.key,X.props,null,G.mode,ie),jd(q,X),q.return=G,q)}function Q(G,q,X,ie){return q===null||q.tag!==4||q.stateNode.containerInfo!==X.containerInfo||q.stateNode.implementation!==X.implementation?(q=Yb(X,G.mode,ie),q.return=G,q):(q=v(q,X.children||[]),q.return=G,q)}function se(G,q,X,ie,Pe){return q===null||q.tag!==7?(q=rl(X,G.mode,ie,Pe),q.return=G,q):(q=v(q,X),q.return=G,q)}function ae(G,q,X){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return q=Kb(""+q,G.mode,X),q.return=G,q;if(typeof q=="object"&&q!==null){switch(q.$$typeof){case y:return X=Mp(q.type,q.key,q.props,null,G.mode,X),jd(X,q),X.return=G,X;case S:return q=Yb(q,G.mode,X),q.return=G,q;case P:return q=ll(q),ae(G,q,X)}if(ne(q)||j(q))return q=rl(q,G.mode,X,null),q.return=G,q;if(typeof q.then=="function")return ae(G,zp(q),X);if(q.$$typeof===T)return ae(G,Dp(G,q),X);jp(G,q)}return null}function te(G,q,X,ie){var Pe=q!==null?q.key:null;if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return Pe!==null?null:N(G,q,""+X,ie);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case y:return X.key===Pe?B(G,q,X,ie):null;case S:return X.key===Pe?Q(G,q,X,ie):null;case P:return X=ll(X),te(G,q,X,ie)}if(ne(X)||j(X))return Pe!==null?null:se(G,q,X,ie,null);if(typeof X.then=="function")return te(G,q,zp(X),ie);if(X.$$typeof===T)return te(G,q,Dp(G,X),ie);jp(G,X)}return null}function re(G,q,X,ie,Pe){if(typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint")return G=G.get(X)||null,N(q,G,""+ie,Pe);if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case y:return G=G.get(ie.key===null?X:ie.key)||null,B(q,G,ie,Pe);case S:return G=G.get(ie.key===null?X:ie.key)||null,Q(q,G,ie,Pe);case P:return ie=ll(ie),re(G,q,X,ie,Pe)}if(ne(ie)||j(ie))return G=G.get(X)||null,se(q,G,ie,Pe,null);if(typeof ie.then=="function")return re(G,q,X,zp(ie),Pe);if(ie.$$typeof===T)return re(G,q,X,Dp(q,ie),Pe);jp(q,ie)}return null}function Re(G,q,X,ie){for(var Pe=null,xt=null,Ne=q,Je=q=0,ct=null;Ne!==null&&Je<X.length;Je++){Ne.index>Je?(ct=Ne,Ne=null):ct=Ne.sibling;var _t=te(G,Ne,X[Je],ie);if(_t===null){Ne===null&&(Ne=ct);break}i&&Ne&&_t.alternate===null&&l(G,Ne),q=b(_t,q,Je),xt===null?Pe=_t:xt.sibling=_t,xt=_t,Ne=ct}if(Je===X.length)return d(G,Ne),dt&&zo(G,Je),Pe;if(Ne===null){for(;Je<X.length;Je++)Ne=ae(G,X[Je],ie),Ne!==null&&(q=b(Ne,q,Je),xt===null?Pe=Ne:xt.sibling=Ne,xt=Ne);return dt&&zo(G,Je),Pe}for(Ne=h(Ne);Je<X.length;Je++)ct=re(Ne,G,Je,X[Je],ie),ct!==null&&(i&&ct.alternate!==null&&Ne.delete(ct.key===null?Je:ct.key),q=b(ct,q,Je),xt===null?Pe=ct:xt.sibling=ct,xt=ct);return i&&Ne.forEach(function(ua){return l(G,ua)}),dt&&zo(G,Je),Pe}function De(G,q,X,ie){if(X==null)throw Error(r(151));for(var Pe=null,xt=null,Ne=q,Je=q=0,ct=null,_t=X.next();Ne!==null&&!_t.done;Je++,_t=X.next()){Ne.index>Je?(ct=Ne,Ne=null):ct=Ne.sibling;var ua=te(G,Ne,_t.value,ie);if(ua===null){Ne===null&&(Ne=ct);break}i&&Ne&&ua.alternate===null&&l(G,Ne),q=b(ua,q,Je),xt===null?Pe=ua:xt.sibling=ua,xt=ua,Ne=ct}if(_t.done)return d(G,Ne),dt&&zo(G,Je),Pe;if(Ne===null){for(;!_t.done;Je++,_t=X.next())_t=ae(G,_t.value,ie),_t!==null&&(q=b(_t,q,Je),xt===null?Pe=_t:xt.sibling=_t,xt=_t);return dt&&zo(G,Je),Pe}for(Ne=h(Ne);!_t.done;Je++,_t=X.next())_t=re(Ne,G,Je,_t.value,ie),_t!==null&&(i&&_t.alternate!==null&&Ne.delete(_t.key===null?Je:_t.key),q=b(_t,q,Je),xt===null?Pe=_t:xt.sibling=_t,xt=_t);return i&&Ne.forEach(function(D$){return l(G,D$)}),dt&&zo(G,Je),Pe}function zt(G,q,X,ie){if(typeof X=="object"&&X!==null&&X.type===E&&X.key===null&&(X=X.props.children),typeof X=="object"&&X!==null){switch(X.$$typeof){case y:e:{for(var Pe=X.key;q!==null;){if(q.key===Pe){if(Pe=X.type,Pe===E){if(q.tag===7){d(G,q.sibling),ie=v(q,X.props.children),ie.return=G,G=ie;break e}}else if(q.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===P&&ll(Pe)===q.type){d(G,q.sibling),ie=v(q,X.props),jd(ie,X),ie.return=G,G=ie;break e}d(G,q);break}else l(G,q);q=q.sibling}X.type===E?(ie=rl(X.props.children,G.mode,ie,X.key),ie.return=G,G=ie):(ie=Mp(X.type,X.key,X.props,null,G.mode,ie),jd(ie,X),ie.return=G,G=ie)}return x(G);case S:e:{for(Pe=X.key;q!==null;){if(q.key===Pe)if(q.tag===4&&q.stateNode.containerInfo===X.containerInfo&&q.stateNode.implementation===X.implementation){d(G,q.sibling),ie=v(q,X.children||[]),ie.return=G,G=ie;break e}else{d(G,q);break}else l(G,q);q=q.sibling}ie=Yb(X,G.mode,ie),ie.return=G,G=ie}return x(G);case P:return X=ll(X),zt(G,q,X,ie)}if(ne(X))return Re(G,q,X,ie);if(j(X)){if(Pe=j(X),typeof Pe!="function")throw Error(r(150));return X=Pe.call(X),De(G,q,X,ie)}if(typeof X.then=="function")return zt(G,q,zp(X),ie);if(X.$$typeof===T)return zt(G,q,Dp(G,X),ie);jp(G,X)}return typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint"?(X=""+X,q!==null&&q.tag===6?(d(G,q.sibling),ie=v(q,X),ie.return=G,G=ie):(d(G,q),ie=Kb(X,G.mode,ie),ie.return=G,G=ie),x(G)):d(G,q)}return function(G,q,X,ie){try{zd=0;var Pe=zt(G,q,X,ie);return Nu=null,Pe}catch(Ne){if(Ne===Ou||Ne===Up)throw Ne;var xt=Xr(29,Ne,null,G.mode);return xt.lanes=ie,xt.return=G,xt}}}var cl=UI(!0),FI=UI(!1),Gi=!1;function a0(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function l0(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 Vi(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function Ki(i,l,d){var h=i.updateQueue;if(h===null)return null;if(h=h.shared,(Rt&2)!==0){var v=h.pending;return v===null?l.next=l:(l.next=v.next,v.next=l),h.pending=l,l=Np(i),EI(i,null,d),l}return Op(i,h,l,d),Np(i)}function Bd(i,l,d){if(l=l.updateQueue,l!==null&&(l=l.shared,(d&4194048)!==0)){var h=l.lanes;h&=i.pendingLanes,d|=h,l.lanes=d,md(i,d)}}function u0(i,l){var d=i.updateQueue,h=i.alternate;if(h!==null&&(h=h.updateQueue,d===h)){var v=null,b=null;if(d=d.firstBaseUpdate,d!==null){do{var x={lane:d.lane,tag:d.tag,payload:d.payload,callback:null,next:null};b===null?v=b=x:b=b.next=x,d=d.next}while(d!==null);b===null?v=b=l:b=b.next=l}else v=b=l;d={baseState:h.baseState,firstBaseUpdate:v,lastBaseUpdate:b,shared:h.shared,callbacks:h.callbacks},i.updateQueue=d;return}i=d.lastBaseUpdate,i===null?d.firstBaseUpdate=l:i.next=l,d.lastBaseUpdate=l}var c0=!1;function Hd(){if(c0){var i=Iu;if(i!==null)throw i}}function $d(i,l,d,h){c0=!1;var v=i.updateQueue;Gi=!1;var b=v.firstBaseUpdate,x=v.lastBaseUpdate,N=v.shared.pending;if(N!==null){v.shared.pending=null;var B=N,Q=B.next;B.next=null,x===null?b=Q:x.next=Q,x=B;var se=i.alternate;se!==null&&(se=se.updateQueue,N=se.lastBaseUpdate,N!==x&&(N===null?se.firstBaseUpdate=Q:N.next=Q,se.lastBaseUpdate=B))}if(b!==null){var ae=v.baseState;x=0,se=Q=B=null,N=b;do{var te=N.lane&-536870913,re=te!==N.lane;if(re?(ut&te)===te:(h&te)===te){te!==0&&te===Ru&&(c0=!0),se!==null&&(se=se.next={lane:0,tag:N.tag,payload:N.payload,callback:null,next:null});e:{var Re=i,De=N;te=l;var zt=d;switch(De.tag){case 1:if(Re=De.payload,typeof Re=="function"){ae=Re.call(zt,ae,te);break e}ae=Re;break e;case 3:Re.flags=Re.flags&-65537|128;case 0:if(Re=De.payload,te=typeof Re=="function"?Re.call(zt,ae,te):Re,te==null)break e;ae=g({},ae,te);break e;case 2:Gi=!0}}te=N.callback,te!==null&&(i.flags|=64,re&&(i.flags|=8192),re=v.callbacks,re===null?v.callbacks=[te]:re.push(te))}else re={lane:te,tag:N.tag,payload:N.payload,callback:N.callback,next:null},se===null?(Q=se=re,B=ae):se=se.next=re,x|=te;if(N=N.next,N===null){if(N=v.shared.pending,N===null)break;re=N,N=re.next,re.next=null,v.lastBaseUpdate=re,v.shared.pending=null}}while(!0);se===null&&(B=ae),v.baseState=B,v.firstBaseUpdate=Q,v.lastBaseUpdate=se,b===null&&(v.shared.lanes=0),Ji|=x,i.lanes=x,i.memoizedState=ae}}function zI(i,l){if(typeof i!="function")throw Error(r(191,i));i.call(l)}function jI(i,l){var d=i.callbacks;if(d!==null)for(i.callbacks=null,i=0;i<d.length;i++)zI(d[i],l)}var Mu=L(null),Bp=L(0);function BI(i,l){i=Zo,K(Bp,i),K(Mu,l),Zo=i|l.baseLanes}function d0(){K(Bp,Zo),K(Mu,Mu.current)}function f0(){Zo=Bp.current,V(Mu),V(Bp)}var Qr=L(null),Ss=null;function Yi(i){var l=i.alternate;K(yn,yn.current&1),K(Qr,i),Ss===null&&(l===null||Mu.current!==null||l.memoizedState!==null)&&(Ss=i)}function h0(i){K(yn,yn.current),K(Qr,i),Ss===null&&(Ss=i)}function HI(i){i.tag===22?(K(yn,yn.current),K(Qr,i),Ss===null&&(Ss=i)):Zi()}function Zi(){K(yn,yn.current),K(Qr,Qr.current)}function Jr(i){V(Qr),Ss===i&&(Ss=null),V(yn)}var yn=L(0);function Hp(i){for(var l=i;l!==null;){if(l.tag===13){var d=l.memoizedState;if(d!==null&&(d=d.dehydrated,d===null||b1(d)||S1(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 Ho=0,Qe=null,Ut=null,En=null,$p=!1,Pu=!1,dl=!1,qp=0,qd=0,ku=null,_H=0;function hn(){throw Error(r(321))}function p0(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 g0(i,l,d,h,v,b){return Ho=b,Qe=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,$.H=i===null||i.memoizedState===null?_2:O0,dl=!1,b=d(h,v),dl=!1,Pu&&(b=qI(l,d,h,v)),$I(i),b}function $I(i){$.H=Vd;var l=Ut!==null&&Ut.next!==null;if(Ho=0,En=Ut=Qe=null,$p=!1,qd=0,ku=null,l)throw Error(r(300));i===null||Cn||(i=i.dependencies,i!==null&&kp(i)&&(Cn=!0))}function qI(i,l,d,h){Qe=i;var v=0;do{if(Pu&&(ku=null),qd=0,Pu=!1,25<=v)throw Error(r(301));if(v+=1,En=Ut=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=A2,b=l(d,h)}while(Pu);return b}function AH(){var i=$.H,l=i.useState()[0];return l=typeof l.then=="function"?Wd(l):l,i=i.useState()[0],(Ut!==null?Ut.memoizedState:null)!==i&&(Qe.flags|=1024),l}function m0(){var i=qp!==0;return qp=0,i}function v0(i,l,d){l.updateQueue=i.updateQueue,l.flags&=-2053,i.lanes&=~d}function y0(i){if($p){for(i=i.memoizedState;i!==null;){var l=i.queue;l!==null&&(l.pending=null),i=i.next}$p=!1}Ho=0,En=Ut=Qe=null,Pu=!1,qd=qp=0,ku=null}function br(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return En===null?Qe.memoizedState=En=i:En=En.next=i,En}function bn(){if(Ut===null){var i=Qe.alternate;i=i!==null?i.memoizedState:null}else i=Ut.next;var l=En===null?Qe.memoizedState:En.next;if(l!==null)En=l,Ut=i;else{if(i===null)throw Qe.alternate===null?Error(r(467)):Error(r(310));Ut=i,i={memoizedState:Ut.memoizedState,baseState:Ut.baseState,baseQueue:Ut.baseQueue,queue:Ut.queue,next:null},En===null?Qe.memoizedState=En=i:En=En.next=i}return En}function Wp(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Wd(i){var l=qd;return qd+=1,ku===null&&(ku=[]),i=kI(ku,i,l),l=Qe,(En===null?l.memoizedState:En.next)===null&&(l=l.alternate,$.H=l===null||l.memoizedState===null?_2:O0),i}function Gp(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return Wd(i);if(i.$$typeof===T)return Yn(i)}throw Error(r(438,String(i)))}function b0(i){var l=null,d=Qe.updateQueue;if(d!==null&&(l=d.memoCache),l==null){var h=Qe.alternate;h!==null&&(h=h.updateQueue,h!==null&&(h=h.memoCache,h!=null&&(l={data:h.data.map(function(v){return v.slice()}),index:0})))}if(l==null&&(l={data:[],index:0}),d===null&&(d=Wp(),Qe.updateQueue=d),d.memoCache=l,d=l.data[l.index],d===void 0)for(d=l.data[l.index]=Array(i),h=0;h<i;h++)d[h]=H;return l.index++,d}function $o(i,l){return typeof l=="function"?l(i):l}function Vp(i){var l=bn();return S0(l,Ut,i)}function S0(i,l,d){var h=i.queue;if(h===null)throw Error(r(311));h.lastRenderedReducer=d;var v=i.baseQueue,b=h.pending;if(b!==null){if(v!==null){var x=v.next;v.next=b.next,b.next=x}l.baseQueue=v=b,h.pending=null}if(b=i.baseState,v===null)i.memoizedState=b;else{l=v.next;var N=x=null,B=null,Q=l,se=!1;do{var ae=Q.lane&-536870913;if(ae!==Q.lane?(ut&ae)===ae:(Ho&ae)===ae){var te=Q.revertLane;if(te===0)B!==null&&(B=B.next={lane:0,revertLane:0,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null}),ae===Ru&&(se=!0);else if((Ho&te)===te){Q=Q.next,te===Ru&&(se=!0);continue}else ae={lane:0,revertLane:Q.revertLane,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},B===null?(N=B=ae,x=b):B=B.next=ae,Qe.lanes|=te,Ji|=te;ae=Q.action,dl&&d(b,ae),b=Q.hasEagerState?Q.eagerState:d(b,ae)}else te={lane:ae,revertLane:Q.revertLane,gesture:Q.gesture,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},B===null?(N=B=te,x=b):B=B.next=te,Qe.lanes|=ae,Ji|=ae;Q=Q.next}while(Q!==null&&Q!==l);if(B===null?x=b:B.next=N,!Zr(b,i.memoizedState)&&(Cn=!0,se&&(d=Iu,d!==null)))throw d;i.memoizedState=b,i.baseState=x,i.baseQueue=B,h.lastRenderedState=b}return v===null&&(h.lanes=0),[i.memoizedState,h.dispatch]}function E0(i){var l=bn(),d=l.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=i;var h=d.dispatch,v=d.pending,b=l.memoizedState;if(v!==null){d.pending=null;var x=v=v.next;do b=i(b,x.action),x=x.next;while(x!==v);Zr(b,l.memoizedState)||(Cn=!0),l.memoizedState=b,l.baseQueue===null&&(l.baseState=b),d.lastRenderedState=b}return[b,h]}function WI(i,l,d){var h=Qe,v=bn(),b=dt;if(b){if(d===void 0)throw Error(r(407));d=d()}else d=l();var x=!Zr((Ut||v).memoizedState,d);if(x&&(v.memoizedState=d,Cn=!0),v=v.queue,x0(KI.bind(null,h,v,i),[i]),v.getSnapshot!==l||x||En!==null&&En.memoizedState.tag&1){if(h.flags|=2048,Du(9,{destroy:void 0},VI.bind(null,h,v,d,l),null),qt===null)throw Error(r(349));b||(Ho&127)!==0||GI(h,l,d)}return d}function GI(i,l,d){i.flags|=16384,i={getSnapshot:l,value:d},l=Qe.updateQueue,l===null?(l=Wp(),Qe.updateQueue=l,l.stores=[i]):(d=l.stores,d===null?l.stores=[i]:d.push(i))}function VI(i,l,d,h){l.value=d,l.getSnapshot=h,YI(l)&&ZI(i)}function KI(i,l,d){return d(function(){YI(l)&&ZI(i)})}function YI(i){var l=i.getSnapshot;i=i.value;try{var d=l();return!Zr(i,d)}catch{return!0}}function ZI(i){var l=nl(i,2);l!==null&&Dr(l,i,2)}function C0(i){var l=br();if(typeof i=="function"){var d=i;if(i=d(),dl){Ps(!0);try{d()}finally{Ps(!1)}}}return l.memoizedState=l.baseState=i,l.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:$o,lastRenderedState:i},l}function XI(i,l,d,h){return i.baseState=d,S0(i,Ut,typeof h=="function"?h:$o)}function TH(i,l,d,h,v){if(Zp(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(x){b.listeners.push(x)}};$.T!==null?d(!0):b.isTransition=!1,h(b),d=l.pending,d===null?(b.next=l.pending=b,QI(l,b)):(b.next=d.next,l.pending=d.next=b)}}function QI(i,l){var d=l.action,h=l.payload,v=i.state;if(l.isTransition){var b=$.T,x={};$.T=x;try{var N=d(v,h),B=$.S;B!==null&&B(x,N),JI(i,l,N)}catch(Q){w0(i,l,Q)}finally{b!==null&&x.types!==null&&(b.types=x.types),$.T=b}}else try{b=d(v,h),JI(i,l,b)}catch(Q){w0(i,l,Q)}}function JI(i,l,d){d!==null&&typeof d=="object"&&typeof d.then=="function"?d.then(function(h){e2(i,l,h)},function(h){return w0(i,l,h)}):e2(i,l,d)}function e2(i,l,d){l.status="fulfilled",l.value=d,t2(l),i.state=d,l=i.pending,l!==null&&(d=l.next,d===l?i.pending=null:(d=d.next,l.next=d,QI(i,d)))}function w0(i,l,d){var h=i.pending;if(i.pending=null,h!==null){h=h.next;do l.status="rejected",l.reason=d,t2(l),l=l.next;while(l!==h)}i.action=null}function t2(i){i=i.listeners;for(var l=0;l<i.length;l++)(0,i[l])()}function n2(i,l){return l}function r2(i,l){if(dt){var d=qt.formState;if(d!==null){e:{var h=Qe;if(dt){if(Vt){t:{for(var v=Vt,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){Vt=Es(v.nextSibling),h=v.data==="F!";break e}}qi(h)}h=!1}h&&(l=d[0])}}return d=br(),d.memoizedState=d.baseState=l,h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n2,lastRenderedState:l},d.queue=h,d=C2.bind(null,Qe,h),h.dispatch=d,h=C0(!1),b=I0.bind(null,Qe,!1,h.queue),h=br(),v={state:l,dispatch:null,action:i,pending:null},h.queue=v,d=TH.bind(null,Qe,v,b,d),v.dispatch=d,h.memoizedState=i,[l,d,!1]}function s2(i){var l=bn();return o2(l,Ut,i)}function o2(i,l,d){if(l=S0(i,l,n2)[0],i=Vp($o)[0],typeof l=="object"&&l!==null&&typeof l.then=="function")try{var h=Wd(l)}catch(x){throw x===Ou?Up:x}else h=l;l=bn();var v=l.queue,b=v.dispatch;return d!==l.memoizedState&&(Qe.flags|=2048,Du(9,{destroy:void 0},RH.bind(null,v,d),null)),[h,b,i]}function RH(i,l){i.action=l}function i2(i){var l=bn(),d=Ut;if(d!==null)return o2(l,d,i);bn(),l=l.memoizedState,d=bn();var h=d.queue.dispatch;return d.memoizedState=i,[l,h,!1]}function Du(i,l,d,h){return i={tag:i,create:d,deps:h,inst:l,next:null},l=Qe.updateQueue,l===null&&(l=Wp(),Qe.updateQueue=l),d=l.lastEffect,d===null?l.lastEffect=i.next=i:(h=d.next,d.next=i,i.next=h,l.lastEffect=i),i}function a2(){return bn().memoizedState}function Kp(i,l,d,h){var v=br();Qe.flags|=i,v.memoizedState=Du(1|l,{destroy:void 0},d,h===void 0?null:h)}function Yp(i,l,d,h){var v=bn();h=h===void 0?null:h;var b=v.memoizedState.inst;Ut!==null&&h!==null&&p0(h,Ut.memoizedState.deps)?v.memoizedState=Du(l,b,d,h):(Qe.flags|=i,v.memoizedState=Du(1|l,b,d,h))}function l2(i,l){Kp(8390656,8,i,l)}function x0(i,l){Yp(2048,8,i,l)}function IH(i){Qe.flags|=4;var l=Qe.updateQueue;if(l===null)l=Wp(),Qe.updateQueue=l,l.events=[i];else{var d=l.events;d===null?l.events=[i]:d.push(i)}}function u2(i){var l=bn().memoizedState;return IH({ref:l,nextImpl:i}),function(){if((Rt&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}function c2(i,l){return Yp(4,2,i,l)}function d2(i,l){return Yp(4,4,i,l)}function f2(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 h2(i,l,d){d=d!=null?d.concat([i]):null,Yp(4,4,f2.bind(null,l,i),d)}function _0(){}function p2(i,l){var d=bn();l=l===void 0?null:l;var h=d.memoizedState;return l!==null&&p0(l,h[1])?h[0]:(d.memoizedState=[i,l],i)}function g2(i,l){var d=bn();l=l===void 0?null:l;var h=d.memoizedState;if(l!==null&&p0(l,h[1]))return h[0];if(h=i(),dl){Ps(!0);try{i()}finally{Ps(!1)}}return d.memoizedState=[h,l],h}function A0(i,l,d){return d===void 0||(Ho&1073741824)!==0&&(ut&261930)===0?i.memoizedState=l:(i.memoizedState=d,i=mO(),Qe.lanes|=i,Ji|=i,d)}function m2(i,l,d,h){return Zr(d,l)?d:Mu.current!==null?(i=A0(i,d,h),Zr(i,l)||(Cn=!0),i):(Ho&42)===0||(Ho&1073741824)!==0&&(ut&261930)===0?(Cn=!0,i.memoizedState=d):(i=mO(),Qe.lanes|=i,Ji|=i,l)}function v2(i,l,d,h,v){var b=ee.p;ee.p=b!==0&&8>b?b:8;var x=$.T,N={};$.T=N,I0(i,!1,l,d);try{var B=v(),Q=$.S;if(Q!==null&&Q(N,B),B!==null&&typeof B=="object"&&typeof B.then=="function"){var se=xH(B,h);Gd(i,l,se,ns(i))}else Gd(i,l,h,ns(i))}catch(ae){Gd(i,l,{then:function(){},status:"rejected",reason:ae},ns())}finally{ee.p=b,x!==null&&N.types!==null&&(x.types=N.types),$.T=x}}function OH(){}function T0(i,l,d,h){if(i.tag!==5)throw Error(r(476));var v=y2(i).queue;v2(i,v,l,fe,d===null?OH:function(){return b2(i),d(h)})}function y2(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:$o,lastRenderedState:fe},next:null};var d={};return l.next={memoizedState:d,baseState:d,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:$o,lastRenderedState:d},next:null},i.memoizedState=l,i=i.alternate,i!==null&&(i.memoizedState=l),l}function b2(i){var l=y2(i);l.next===null&&(l=i.alternate.memoizedState),Gd(i,l.next.queue,{},ns())}function R0(){return Yn(cf)}function S2(){return bn().memoizedState}function E2(){return bn().memoizedState}function NH(i){for(var l=i.return;l!==null;){switch(l.tag){case 24:case 3:var d=ns();i=Vi(d);var h=Ki(l,i,d);h!==null&&(Dr(h,l,d),Bd(h,l,d)),l={cache:r0()},i.payload=l;return}l=l.return}}function MH(i,l,d){var h=ns();d={lane:h,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},Zp(i)?w2(l,d):(d=Gb(i,l,d,h),d!==null&&(Dr(d,i,h),x2(d,l,h)))}function C2(i,l,d){var h=ns();Gd(i,l,d,h)}function Gd(i,l,d,h){var v={lane:h,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null};if(Zp(i))w2(l,v);else{var b=i.alternate;if(i.lanes===0&&(b===null||b.lanes===0)&&(b=l.lastRenderedReducer,b!==null))try{var x=l.lastRenderedState,N=b(x,d);if(v.hasEagerState=!0,v.eagerState=N,Zr(N,x))return Op(i,l,v,0),qt===null&&Ip(),!1}catch{}if(d=Gb(i,l,v,h),d!==null)return Dr(d,i,h),x2(d,l,h),!0}return!1}function I0(i,l,d,h){if(h={lane:2,revertLane:a1(),gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null},Zp(i)){if(l)throw Error(r(479))}else l=Gb(i,d,h,2),l!==null&&Dr(l,i,2)}function Zp(i){var l=i.alternate;return i===Qe||l!==null&&l===Qe}function w2(i,l){Pu=$p=!0;var d=i.pending;d===null?l.next=l:(l.next=d.next,d.next=l),i.pending=l}function x2(i,l,d){if((d&4194048)!==0){var h=l.lanes;h&=i.pendingLanes,d|=h,l.lanes=d,md(i,d)}}var Vd={readContext:Yn,use:Gp,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};Vd.useEffectEvent=hn;var _2={readContext:Yn,use:Gp,useCallback:function(i,l){return br().memoizedState=[i,l===void 0?null:l],i},useContext:Yn,useEffect:l2,useImperativeHandle:function(i,l,d){d=d!=null?d.concat([i]):null,Kp(4194308,4,f2.bind(null,l,i),d)},useLayoutEffect:function(i,l){return Kp(4194308,4,i,l)},useInsertionEffect:function(i,l){Kp(4,2,i,l)},useMemo:function(i,l){var d=br();l=l===void 0?null:l;var h=i();if(dl){Ps(!0);try{i()}finally{Ps(!1)}}return d.memoizedState=[h,l],h},useReducer:function(i,l,d){var h=br();if(d!==void 0){var v=d(l);if(dl){Ps(!0);try{d(l)}finally{Ps(!1)}}}else v=l;return h.memoizedState=h.baseState=v,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:v},h.queue=i,i=i.dispatch=MH.bind(null,Qe,i),[h.memoizedState,i]},useRef:function(i){var l=br();return i={current:i},l.memoizedState=i},useState:function(i){i=C0(i);var l=i.queue,d=C2.bind(null,Qe,l);return l.dispatch=d,[i.memoizedState,d]},useDebugValue:_0,useDeferredValue:function(i,l){var d=br();return A0(d,i,l)},useTransition:function(){var i=C0(!1);return i=v2.bind(null,Qe,i.queue,!0,!1),br().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,l,d){var h=Qe,v=br();if(dt){if(d===void 0)throw Error(r(407));d=d()}else{if(d=l(),qt===null)throw Error(r(349));(ut&127)!==0||GI(h,l,d)}v.memoizedState=d;var b={value:d,getSnapshot:l};return v.queue=b,l2(KI.bind(null,h,b,i),[i]),h.flags|=2048,Du(9,{destroy:void 0},VI.bind(null,h,b,d,l),null),d},useId:function(){var i=br(),l=qt.identifierPrefix;if(dt){var d=uo,h=lo;d=(h&~(1<<32-Vn(h)-1)).toString(32)+d,l="_"+l+"R_"+d,d=qp++,0<d&&(l+="H"+d.toString(32)),l+="_"}else d=_H++,l="_"+l+"r_"+d.toString(32)+"_";return i.memoizedState=l},useHostTransitionStatus:R0,useFormState:r2,useActionState:r2,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=I0.bind(null,Qe,!0,d),d.dispatch=l,[i,l]},useMemoCache:b0,useCacheRefresh:function(){return br().memoizedState=NH.bind(null,Qe)},useEffectEvent:function(i){var l=br(),d={impl:i};return l.memoizedState=d,function(){if((Rt&2)!==0)throw Error(r(440));return d.impl.apply(void 0,arguments)}}},O0={readContext:Yn,use:Gp,useCallback:p2,useContext:Yn,useEffect:x0,useImperativeHandle:h2,useInsertionEffect:c2,useLayoutEffect:d2,useMemo:g2,useReducer:Vp,useRef:a2,useState:function(){return Vp($o)},useDebugValue:_0,useDeferredValue:function(i,l){var d=bn();return m2(d,Ut.memoizedState,i,l)},useTransition:function(){var i=Vp($o)[0],l=bn().memoizedState;return[typeof i=="boolean"?i:Wd(i),l]},useSyncExternalStore:WI,useId:S2,useHostTransitionStatus:R0,useFormState:s2,useActionState:s2,useOptimistic:function(i,l){var d=bn();return XI(d,Ut,i,l)},useMemoCache:b0,useCacheRefresh:E2};O0.useEffectEvent=u2;var A2={readContext:Yn,use:Gp,useCallback:p2,useContext:Yn,useEffect:x0,useImperativeHandle:h2,useInsertionEffect:c2,useLayoutEffect:d2,useMemo:g2,useReducer:E0,useRef:a2,useState:function(){return E0($o)},useDebugValue:_0,useDeferredValue:function(i,l){var d=bn();return Ut===null?A0(d,i,l):m2(d,Ut.memoizedState,i,l)},useTransition:function(){var i=E0($o)[0],l=bn().memoizedState;return[typeof i=="boolean"?i:Wd(i),l]},useSyncExternalStore:WI,useId:S2,useHostTransitionStatus:R0,useFormState:i2,useActionState:i2,useOptimistic:function(i,l){var d=bn();return Ut!==null?XI(d,Ut,i,l):(d.baseState=i,[i,d.queue.dispatch])},useMemoCache:b0,useCacheRefresh:E2};A2.useEffectEvent=u2;function N0(i,l,d,h){l=i.memoizedState,d=d(h,l),d=d==null?l:g({},l,d),i.memoizedState=d,i.lanes===0&&(i.updateQueue.baseState=d)}var M0={enqueueSetState:function(i,l,d){i=i._reactInternals;var h=ns(),v=Vi(h);v.payload=l,d!=null&&(v.callback=d),l=Ki(i,v,h),l!==null&&(Dr(l,i,h),Bd(l,i,h))},enqueueReplaceState:function(i,l,d){i=i._reactInternals;var h=ns(),v=Vi(h);v.tag=1,v.payload=l,d!=null&&(v.callback=d),l=Ki(i,v,h),l!==null&&(Dr(l,i,h),Bd(l,i,h))},enqueueForceUpdate:function(i,l){i=i._reactInternals;var d=ns(),h=Vi(d);h.tag=2,l!=null&&(h.callback=l),l=Ki(i,h,d),l!==null&&(Dr(l,i,d),Bd(l,i,d))}};function T2(i,l,d,h,v,b,x){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(h,b,x):l.prototype&&l.prototype.isPureReactComponent?!Pd(d,h)||!Pd(v,b):!0}function R2(i,l,d,h){i=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(d,h),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(d,h),l.state!==i&&M0.enqueueReplaceState(l,l.state,null)}function fl(i,l){var d=l;if("ref"in l){d={};for(var h in l)h!=="ref"&&(d[h]=l[h])}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 I2(i){Rp(i)}function O2(i){console.error(i)}function N2(i){Rp(i)}function Xp(i,l){try{var d=i.onUncaughtError;d(l.value,{componentStack:l.stack})}catch(h){setTimeout(function(){throw h})}}function M2(i,l,d){try{var h=i.onCaughtError;h(d.value,{componentStack:d.stack,errorBoundary:l.tag===1?l.stateNode:null})}catch(v){setTimeout(function(){throw v})}}function P0(i,l,d){return d=Vi(d),d.tag=3,d.payload={element:null},d.callback=function(){Xp(i,l)},d}function P2(i){return i=Vi(i),i.tag=3,i}function k2(i,l,d,h){var v=d.type.getDerivedStateFromError;if(typeof v=="function"){var b=h.value;i.payload=function(){return v(b)},i.callback=function(){M2(l,d,h)}}var x=d.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(i.callback=function(){M2(l,d,h),typeof v!="function"&&(ea===null?ea=new Set([this]):ea.add(this));var N=h.stack;this.componentDidCatch(h.value,{componentStack:N!==null?N:""})})}function PH(i,l,d,h,v){if(d.flags|=32768,h!==null&&typeof h=="object"&&typeof h.then=="function"){if(l=d.alternate,l!==null&&Tu(l,d,v,!0),d=Qr.current,d!==null){switch(d.tag){case 31:case 13:return Ss===null?ug():d.alternate===null&&pn===0&&(pn=3),d.flags&=-257,d.flags|=65536,d.lanes=v,h===Fp?d.flags|=16384:(l=d.updateQueue,l===null?d.updateQueue=new Set([h]):l.add(h),s1(i,h,v)),!1;case 22:return d.flags|=65536,h===Fp?d.flags|=16384:(l=d.updateQueue,l===null?(l={transitions:null,markerInstances:null,retryQueue:new Set([h])},d.updateQueue=l):(d=l.retryQueue,d===null?l.retryQueue=new Set([h]):d.add(h)),s1(i,h,v)),!1}throw Error(r(435,d.tag))}return s1(i,h,v),ug(),!1}if(dt)return l=Qr.current,l!==null?((l.flags&65536)===0&&(l.flags|=256),l.flags|=65536,l.lanes=v,h!==Qb&&(i=Error(r(422),{cause:h}),Ld(ms(i,d)))):(h!==Qb&&(l=Error(r(423),{cause:h}),Ld(ms(l,d))),i=i.current.alternate,i.flags|=65536,v&=-v,i.lanes|=v,h=ms(h,d),v=P0(i.stateNode,h,v),u0(i,v),pn!==4&&(pn=2)),!1;var b=Error(r(520),{cause:h});if(b=ms(b,d),tf===null?tf=[b]:tf.push(b),pn!==4&&(pn=2),l===null)return!0;h=ms(h,d),d=l;do{switch(d.tag){case 3:return d.flags|=65536,i=v&-v,d.lanes|=i,i=P0(d.stateNode,h,i),u0(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"&&(ea===null||!ea.has(b))))return d.flags|=65536,v&=-v,d.lanes|=v,v=P2(v),k2(v,i,d,h),u0(d,v),!1}d=d.return}while(d!==null);return!1}var k0=Error(r(461)),Cn=!1;function Zn(i,l,d,h){l.child=i===null?FI(l,null,d,h):cl(l,i.child,d,h)}function D2(i,l,d,h,v){d=d.render;var b=l.ref;if("ref"in h){var x={};for(var N in h)N!=="ref"&&(x[N]=h[N])}else x=h;return il(l),h=g0(i,l,d,x,b,v),N=m0(),i!==null&&!Cn?(v0(i,l,v),qo(i,l,v)):(dt&&N&&Zb(l),l.flags|=1,Zn(i,l,h,v),l.child)}function L2(i,l,d,h,v){if(i===null){var b=d.type;return typeof b=="function"&&!Vb(b)&&b.defaultProps===void 0&&d.compare===null?(l.tag=15,l.type=b,U2(i,l,b,h,v)):(i=Mp(d.type,null,h,l,l.mode,v),i.ref=l.ref,i.return=l,l.child=i)}if(b=i.child,!H0(i,v)){var x=b.memoizedProps;if(d=d.compare,d=d!==null?d:Pd,d(x,h)&&i.ref===l.ref)return qo(i,l,v)}return l.flags|=1,i=Fo(b,h),i.ref=l.ref,i.return=l,l.child=i}function U2(i,l,d,h,v){if(i!==null){var b=i.memoizedProps;if(Pd(b,h)&&i.ref===l.ref)if(Cn=!1,l.pendingProps=h=b,H0(i,v))(i.flags&131072)!==0&&(Cn=!0);else return l.lanes=i.lanes,qo(i,l,v)}return D0(i,l,d,h,v)}function F2(i,l,d,h){var v=h.children,b=i!==null?i.memoizedState:null;if(i===null&&l.stateNode===null&&(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),h.mode==="hidden"){if((l.flags&128)!==0){if(b=b!==null?b.baseLanes|d:d,i!==null){for(h=l.child=i.child,v=0;h!==null;)v=v|h.lanes|h.childLanes,h=h.sibling;h=v&~b}else h=0,l.child=null;return z2(i,l,b,d,h)}if((d&536870912)!==0)l.memoizedState={baseLanes:0,cachePool:null},i!==null&&Lp(l,b!==null?b.cachePool:null),b!==null?BI(l,b):d0(),HI(l);else return h=l.lanes=536870912,z2(i,l,b!==null?b.baseLanes|d:d,d,h)}else b!==null?(Lp(l,b.cachePool),BI(l,b),Zi(),l.memoizedState=null):(i!==null&&Lp(l,null),d0(),Zi());return Zn(i,l,v,d),l.child}function Kd(i,l){return i!==null&&i.tag===22||l.stateNode!==null||(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.sibling}function z2(i,l,d,h,v){var b=o0();return b=b===null?null:{parent:Sn._currentValue,pool:b},l.memoizedState={baseLanes:d,cachePool:b},i!==null&&Lp(l,null),d0(),HI(l),i!==null&&Tu(i,l,h,!0),l.childLanes=v,null}function Qp(i,l){return l=eg({mode:l.mode,children:l.children},i.mode),l.ref=i.ref,i.child=l,l.return=i,l}function j2(i,l,d){return cl(l,i.child,null,d),i=Qp(l,l.pendingProps),i.flags|=2,Jr(l),l.memoizedState=null,i}function kH(i,l,d){var h=l.pendingProps,v=(l.flags&128)!==0;if(l.flags&=-129,i===null){if(dt){if(h.mode==="hidden")return i=Qp(l,h),l.lanes=536870912,Kd(null,i);if(h0(l),(i=Vt)?(i=QO(i,bs),i=i!==null&&i.data==="&"?i:null,i!==null&&(l.memoizedState={dehydrated:i,treeContext:Hi!==null?{id:lo,overflow:uo}:null,retryLane:536870912,hydrationErrors:null},d=wI(i),d.return=l,l.child=d,Kn=l,Vt=null)):i=null,i===null)throw qi(l);return l.lanes=536870912,null}return Qp(l,h)}var b=i.memoizedState;if(b!==null){var x=b.dehydrated;if(h0(l),v)if(l.flags&256)l.flags&=-257,l=j2(i,l,d);else if(l.memoizedState!==null)l.child=i.child,l.flags|=128,l=null;else throw Error(r(558));else if(Cn||Tu(i,l,d,!1),v=(d&i.childLanes)!==0,Cn||v){if(h=qt,h!==null&&(x=hu(h,d),x!==0&&x!==b.retryLane))throw b.retryLane=x,nl(i,x),Dr(h,i,x),k0;ug(),l=j2(i,l,d)}else i=b.treeContext,Vt=Es(x.nextSibling),Kn=l,dt=!0,$i=null,bs=!1,i!==null&&AI(l,i),l=Qp(l,h),l.flags|=4096;return l}return i=Fo(i.child,{mode:h.mode,children:h.children}),i.ref=l.ref,l.child=i,i.return=l,i}function Jp(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 D0(i,l,d,h,v){return il(l),d=g0(i,l,d,h,void 0,v),h=m0(),i!==null&&!Cn?(v0(i,l,v),qo(i,l,v)):(dt&&h&&Zb(l),l.flags|=1,Zn(i,l,d,v),l.child)}function B2(i,l,d,h,v,b){return il(l),l.updateQueue=null,d=qI(l,h,d,v),$I(i),h=m0(),i!==null&&!Cn?(v0(i,l,b),qo(i,l,b)):(dt&&h&&Zb(l),l.flags|=1,Zn(i,l,d,b),l.child)}function H2(i,l,d,h,v){if(il(l),l.stateNode===null){var b=wu,x=d.contextType;typeof x=="object"&&x!==null&&(b=Yn(x)),b=new d(h,b),l.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,b.updater=M0,l.stateNode=b,b._reactInternals=l,b=l.stateNode,b.props=h,b.state=l.memoizedState,b.refs={},a0(l),x=d.contextType,b.context=typeof x=="object"&&x!==null?Yn(x):wu,b.state=l.memoizedState,x=d.getDerivedStateFromProps,typeof x=="function"&&(N0(l,d,x,h),b.state=l.memoizedState),typeof d.getDerivedStateFromProps=="function"||typeof b.getSnapshotBeforeUpdate=="function"||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(x=b.state,typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount(),x!==b.state&&M0.enqueueReplaceState(b,b.state,null),$d(l,h,b,v),Hd(),b.state=l.memoizedState),typeof b.componentDidMount=="function"&&(l.flags|=4194308),h=!0}else if(i===null){b=l.stateNode;var N=l.memoizedProps,B=fl(d,N);b.props=B;var Q=b.context,se=d.contextType;x=wu,typeof se=="object"&&se!==null&&(x=Yn(se));var ae=d.getDerivedStateFromProps;se=typeof ae=="function"||typeof b.getSnapshotBeforeUpdate=="function",N=l.pendingProps!==N,se||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(N||Q!==x)&&R2(l,b,h,x),Gi=!1;var te=l.memoizedState;b.state=te,$d(l,h,b,v),Hd(),Q=l.memoizedState,N||te!==Q||Gi?(typeof ae=="function"&&(N0(l,d,ae,h),Q=l.memoizedState),(B=Gi||T2(l,d,B,h,te,Q,x))?(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=h,l.memoizedState=Q),b.props=h,b.state=Q,b.context=x,h=B):(typeof b.componentDidMount=="function"&&(l.flags|=4194308),h=!1)}else{b=l.stateNode,l0(i,l),x=l.memoizedProps,se=fl(d,x),b.props=se,ae=l.pendingProps,te=b.context,Q=d.contextType,B=wu,typeof Q=="object"&&Q!==null&&(B=Yn(Q)),N=d.getDerivedStateFromProps,(Q=typeof N=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(x!==ae||te!==B)&&R2(l,b,h,B),Gi=!1,te=l.memoizedState,b.state=te,$d(l,h,b,v),Hd();var re=l.memoizedState;x!==ae||te!==re||Gi||i!==null&&i.dependencies!==null&&kp(i.dependencies)?(typeof N=="function"&&(N0(l,d,N,h),re=l.memoizedState),(se=Gi||T2(l,d,se,h,te,re,B)||i!==null&&i.dependencies!==null&&kp(i.dependencies))?(Q||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(h,re,B),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(h,re,B)),typeof b.componentDidUpdate=="function"&&(l.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof b.componentDidUpdate!="function"||x===i.memoizedProps&&te===i.memoizedState||(l.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||x===i.memoizedProps&&te===i.memoizedState||(l.flags|=1024),l.memoizedProps=h,l.memoizedState=re),b.props=h,b.state=re,b.context=B,h=se):(typeof b.componentDidUpdate!="function"||x===i.memoizedProps&&te===i.memoizedState||(l.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||x===i.memoizedProps&&te===i.memoizedState||(l.flags|=1024),h=!1)}return b=h,Jp(i,l),h=(l.flags&128)!==0,b||h?(b=l.stateNode,d=h&&typeof d.getDerivedStateFromError!="function"?null:b.render(),l.flags|=1,i!==null&&h?(l.child=cl(l,i.child,null,v),l.child=cl(l,null,d,v)):Zn(i,l,d,v),l.memoizedState=b.state,i=l.child):i=qo(i,l,v),i}function $2(i,l,d,h){return sl(),l.flags|=256,Zn(i,l,d,h),l.child}var L0={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function U0(i){return{baseLanes:i,cachePool:MI()}}function F0(i,l,d){return i=i!==null?i.childLanes&~d:0,l&&(i|=ts),i}function q2(i,l,d){var h=l.pendingProps,v=!1,b=(l.flags&128)!==0,x;if((x=b)||(x=i!==null&&i.memoizedState===null?!1:(yn.current&2)!==0),x&&(v=!0,l.flags&=-129),x=(l.flags&32)!==0,l.flags&=-33,i===null){if(dt){if(v?Yi(l):Zi(),(i=Vt)?(i=QO(i,bs),i=i!==null&&i.data!=="&"?i:null,i!==null&&(l.memoizedState={dehydrated:i,treeContext:Hi!==null?{id:lo,overflow:uo}:null,retryLane:536870912,hydrationErrors:null},d=wI(i),d.return=l,l.child=d,Kn=l,Vt=null)):i=null,i===null)throw qi(l);return S1(i)?l.lanes=32:l.lanes=536870912,null}var N=h.children;return h=h.fallback,v?(Zi(),v=l.mode,N=eg({mode:"hidden",children:N},v),h=rl(h,v,d,null),N.return=l,h.return=l,N.sibling=h,l.child=N,h=l.child,h.memoizedState=U0(d),h.childLanes=F0(i,x,d),l.memoizedState=L0,Kd(null,h)):(Yi(l),z0(l,N))}var B=i.memoizedState;if(B!==null&&(N=B.dehydrated,N!==null)){if(b)l.flags&256?(Yi(l),l.flags&=-257,l=j0(i,l,d)):l.memoizedState!==null?(Zi(),l.child=i.child,l.flags|=128,l=null):(Zi(),N=h.fallback,v=l.mode,h=eg({mode:"visible",children:h.children},v),N=rl(N,v,d,null),N.flags|=2,h.return=l,N.return=l,h.sibling=N,l.child=h,cl(l,i.child,null,d),h=l.child,h.memoizedState=U0(d),h.childLanes=F0(i,x,d),l.memoizedState=L0,l=Kd(null,h));else if(Yi(l),S1(N)){if(x=N.nextSibling&&N.nextSibling.dataset,x)var Q=x.dgst;x=Q,h=Error(r(419)),h.stack="",h.digest=x,Ld({value:h,source:null,stack:null}),l=j0(i,l,d)}else if(Cn||Tu(i,l,d,!1),x=(d&i.childLanes)!==0,Cn||x){if(x=qt,x!==null&&(h=hu(x,d),h!==0&&h!==B.retryLane))throw B.retryLane=h,nl(i,h),Dr(x,i,h),k0;b1(N)||ug(),l=j0(i,l,d)}else b1(N)?(l.flags|=192,l.child=i.child,l=null):(i=B.treeContext,Vt=Es(N.nextSibling),Kn=l,dt=!0,$i=null,bs=!1,i!==null&&AI(l,i),l=z0(l,h.children),l.flags|=4096);return l}return v?(Zi(),N=h.fallback,v=l.mode,B=i.child,Q=B.sibling,h=Fo(B,{mode:"hidden",children:h.children}),h.subtreeFlags=B.subtreeFlags&65011712,Q!==null?N=Fo(Q,N):(N=rl(N,v,d,null),N.flags|=2),N.return=l,h.return=l,h.sibling=N,l.child=h,Kd(null,h),h=l.child,N=i.child.memoizedState,N===null?N=U0(d):(v=N.cachePool,v!==null?(B=Sn._currentValue,v=v.parent!==B?{parent:B,pool:B}:v):v=MI(),N={baseLanes:N.baseLanes|d,cachePool:v}),h.memoizedState=N,h.childLanes=F0(i,x,d),l.memoizedState=L0,Kd(i.child,h)):(Yi(l),d=i.child,i=d.sibling,d=Fo(d,{mode:"visible",children:h.children}),d.return=l,d.sibling=null,i!==null&&(x=l.deletions,x===null?(l.deletions=[i],l.flags|=16):x.push(i)),l.child=d,l.memoizedState=null,d)}function z0(i,l){return l=eg({mode:"visible",children:l},i.mode),l.return=i,i.child=l}function eg(i,l){return i=Xr(22,i,null,l),i.lanes=0,i}function j0(i,l,d){return cl(l,i.child,null,d),i=z0(l,l.pendingProps.children),i.flags|=2,l.memoizedState=null,i}function W2(i,l,d){i.lanes|=l;var h=i.alternate;h!==null&&(h.lanes|=l),t0(i.return,l,d)}function B0(i,l,d,h,v,b){var x=i.memoizedState;x===null?i.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:h,tail:d,tailMode:v,treeForkCount:b}:(x.isBackwards=l,x.rendering=null,x.renderingStartTime=0,x.last=h,x.tail=d,x.tailMode=v,x.treeForkCount=b)}function G2(i,l,d){var h=l.pendingProps,v=h.revealOrder,b=h.tail;h=h.children;var x=yn.current,N=(x&2)!==0;if(N?(x=x&1|2,l.flags|=128):x&=1,K(yn,x),Zn(i,l,h,d),h=dt?Dd:0,!N&&i!==null&&(i.flags&128)!==0)e:for(i=l.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&W2(i,d,l);else if(i.tag===19)W2(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&&Hp(i)===null&&(v=d),d=d.sibling;d=v,d===null?(v=l.child,l.child=null):(v=d.sibling,d.sibling=null),B0(l,!1,v,d,b,h);break;case"backwards":case"unstable_legacy-backwards":for(d=null,v=l.child,l.child=null;v!==null;){if(i=v.alternate,i!==null&&Hp(i)===null){l.child=v;break}i=v.sibling,v.sibling=d,d=v,v=i}B0(l,!0,d,null,b,h);break;case"together":B0(l,!1,null,null,void 0,h);break;default:l.memoizedState=null}return l.child}function qo(i,l,d){if(i!==null&&(l.dependencies=i.dependencies),Ji|=l.lanes,(d&l.childLanes)===0)if(i!==null){if(Tu(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=Fo(i,i.pendingProps),l.child=d,d.return=l;i.sibling!==null;)i=i.sibling,d=d.sibling=Fo(i,i.pendingProps),d.return=l;d.sibling=null}return l.child}function H0(i,l){return(i.lanes&l)!==0?!0:(i=i.dependencies,!!(i!==null&&kp(i)))}function DH(i,l,d){switch(l.tag){case 3:ve(l,l.stateNode.containerInfo),Wi(l,Sn,i.memoizedState.cache),sl();break;case 27:case 5:Xe(l);break;case 4:ve(l,l.stateNode.containerInfo);break;case 10:Wi(l,l.type,l.memoizedProps.value);break;case 31:if(l.memoizedState!==null)return l.flags|=128,h0(l),null;break;case 13:var h=l.memoizedState;if(h!==null)return h.dehydrated!==null?(Yi(l),l.flags|=128,null):(d&l.child.childLanes)!==0?q2(i,l,d):(Yi(l),i=qo(i,l,d),i!==null?i.sibling:null);Yi(l);break;case 19:var v=(i.flags&128)!==0;if(h=(d&l.childLanes)!==0,h||(Tu(i,l,d,!1),h=(d&l.childLanes)!==0),v){if(h)return G2(i,l,d);l.flags|=128}if(v=l.memoizedState,v!==null&&(v.rendering=null,v.tail=null,v.lastEffect=null),K(yn,yn.current),h)break;return null;case 22:return l.lanes=0,F2(i,l,d,l.pendingProps);case 24:Wi(l,Sn,i.memoizedState.cache)}return qo(i,l,d)}function V2(i,l,d){if(i!==null)if(i.memoizedProps!==l.pendingProps)Cn=!0;else{if(!H0(i,d)&&(l.flags&128)===0)return Cn=!1,DH(i,l,d);Cn=(i.flags&131072)!==0}else Cn=!1,dt&&(l.flags&1048576)!==0&&_I(l,Dd,l.index);switch(l.lanes=0,l.tag){case 16:e:{var h=l.pendingProps;if(i=ll(l.elementType),l.type=i,typeof i=="function")Vb(i)?(h=fl(i,h),l.tag=1,l=H2(null,l,i,h,d)):(l.tag=0,l=D0(null,l,i,h,d));else{if(i!=null){var v=i.$$typeof;if(v===R){l.tag=11,l=D2(null,l,i,h,d);break e}else if(v===I){l.tag=14,l=L2(null,l,i,h,d);break e}}throw l=Y(i)||i,Error(r(306,l,""))}}return l;case 0:return D0(i,l,l.type,l.pendingProps,d);case 1:return h=l.type,v=fl(h,l.pendingProps),H2(i,l,h,v,d);case 3:e:{if(ve(l,l.stateNode.containerInfo),i===null)throw Error(r(387));h=l.pendingProps;var b=l.memoizedState;v=b.element,l0(i,l),$d(l,h,null,d);var x=l.memoizedState;if(h=x.cache,Wi(l,Sn,h),h!==b.cache&&n0(l,[Sn],d,!0),Hd(),h=x.element,b.isDehydrated)if(b={element:h,isDehydrated:!1,cache:x.cache},l.updateQueue.baseState=b,l.memoizedState=b,l.flags&256){l=$2(i,l,h,d);break e}else if(h!==v){v=ms(Error(r(424)),l),Ld(v),l=$2(i,l,h,d);break e}else for(i=l.stateNode.containerInfo,i.nodeType===9?i=i.body:i=i.nodeName==="HTML"?i.ownerDocument.body:i,Vt=Es(i.firstChild),Kn=l,dt=!0,$i=null,bs=!0,d=FI(l,null,h,d),l.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling;else{if(sl(),h===v){l=qo(i,l,d);break e}Zn(i,l,h,d)}l=l.child}return l;case 26:return Jp(i,l),i===null?(d=sN(l.type,null,l.pendingProps,null))?l.memoizedState=d:dt||(d=l.type,i=l.pendingProps,h=mg(he.current).createElement(d),h[In]=l,h[nt]=i,Xn(h,d,i),an(h),l.stateNode=h):l.memoizedState=sN(l.type,i.memoizedProps,l.pendingProps,i.memoizedState),null;case 27:return Xe(l),i===null&&dt&&(h=l.stateNode=tN(l.type,l.pendingProps,he.current),Kn=l,bs=!0,v=Vt,sa(l.type)?(E1=v,Vt=Es(h.firstChild)):Vt=v),Zn(i,l,l.pendingProps.children,d),Jp(i,l),i===null&&(l.flags|=4194304),l.child;case 5:return i===null&&dt&&((v=h=Vt)&&(h=d$(h,l.type,l.pendingProps,bs),h!==null?(l.stateNode=h,Kn=l,Vt=Es(h.firstChild),bs=!1,v=!0):v=!1),v||qi(l)),Xe(l),v=l.type,b=l.pendingProps,x=i!==null?i.memoizedProps:null,h=b.children,m1(v,b)?h=null:x!==null&&m1(v,x)&&(l.flags|=32),l.memoizedState!==null&&(v=g0(i,l,AH,null,null,d),cf._currentValue=v),Jp(i,l),Zn(i,l,h,d),l.child;case 6:return i===null&&dt&&((i=d=Vt)&&(d=f$(d,l.pendingProps,bs),d!==null?(l.stateNode=d,Kn=l,Vt=null,i=!0):i=!1),i||qi(l)),null;case 13:return q2(i,l,d);case 4:return ve(l,l.stateNode.containerInfo),h=l.pendingProps,i===null?l.child=cl(l,null,h,d):Zn(i,l,h,d),l.child;case 11:return D2(i,l,l.type,l.pendingProps,d);case 7:return Zn(i,l,l.pendingProps,d),l.child;case 8:return Zn(i,l,l.pendingProps.children,d),l.child;case 12:return Zn(i,l,l.pendingProps.children,d),l.child;case 10:return h=l.pendingProps,Wi(l,l.type,h.value),Zn(i,l,h.children,d),l.child;case 9:return v=l.type._context,h=l.pendingProps.children,il(l),v=Yn(v),h=h(v),l.flags|=1,Zn(i,l,h,d),l.child;case 14:return L2(i,l,l.type,l.pendingProps,d);case 15:return U2(i,l,l.type,l.pendingProps,d);case 19:return G2(i,l,d);case 31:return kH(i,l,d);case 22:return F2(i,l,d,l.pendingProps);case 24:return il(l),h=Yn(Sn),i===null?(v=o0(),v===null&&(v=qt,b=r0(),v.pooledCache=b,b.refCount++,b!==null&&(v.pooledCacheLanes|=d),v=b),l.memoizedState={parent:h,cache:v},a0(l),Wi(l,Sn,v)):((i.lanes&d)!==0&&(l0(i,l),$d(l,null,null,d),Hd()),v=i.memoizedState,b=l.memoizedState,v.parent!==h?(v={parent:h,cache:h},l.memoizedState=v,l.lanes===0&&(l.memoizedState=l.updateQueue.baseState=v),Wi(l,Sn,h)):(h=b.cache,Wi(l,Sn,h),h!==v.cache&&n0(l,[Sn],d,!0))),Zn(i,l,l.pendingProps.children,d),l.child;case 29:throw l.pendingProps}throw Error(r(156,l.tag))}function Wo(i){i.flags|=4}function $0(i,l,d,h,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(SO())i.flags|=8192;else throw ul=Fp,i0}else i.flags&=-16777217}function K2(i,l){if(l.type!=="stylesheet"||(l.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!uN(l))if(SO())i.flags|=8192;else throw ul=Fp,i0}function tg(i,l){l!==null&&(i.flags|=4),i.flags&16384&&(l=i.tag!==22?Kr():536870912,i.lanes|=l,zu|=l)}function Yd(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 h=null;d!==null;)d.alternate!==null&&(h=d),d=d.sibling;h===null?l||i.tail===null?i.tail=null:i.tail.sibling=null:h.sibling=null}}function Kt(i){var l=i.alternate!==null&&i.alternate.child===i.child,d=0,h=0;if(l)for(var v=i.child;v!==null;)d|=v.lanes|v.childLanes,h|=v.subtreeFlags&65011712,h|=v.flags&65011712,v.return=i,v=v.sibling;else for(v=i.child;v!==null;)d|=v.lanes|v.childLanes,h|=v.subtreeFlags,h|=v.flags,v.return=i,v=v.sibling;return i.subtreeFlags|=h,i.childLanes=d,l}function LH(i,l,d){var h=l.pendingProps;switch(Xb(l),l.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Kt(l),null;case 1:return Kt(l),null;case 3:return d=l.stateNode,h=null,i!==null&&(h=i.memoizedState.cache),l.memoizedState.cache!==h&&(l.flags|=2048),Bo(Sn),xe(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(i===null||i.child===null)&&(Au(l)?Wo(l):i===null||i.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,Jb())),Kt(l),null;case 26:var v=l.type,b=l.memoizedState;return i===null?(Wo(l),b!==null?(Kt(l),K2(l,b)):(Kt(l),$0(l,v,null,h,d))):b?b!==i.memoizedState?(Wo(l),Kt(l),K2(l,b)):(Kt(l),l.flags&=-16777217):(i=i.memoizedProps,i!==h&&Wo(l),Kt(l),$0(l,v,i,h,d)),null;case 27:if(Ee(l),d=he.current,v=l.type,i!==null&&l.stateNode!=null)i.memoizedProps!==h&&Wo(l);else{if(!h){if(l.stateNode===null)throw Error(r(166));return Kt(l),null}i=J.current,Au(l)?TI(l):(i=tN(v,h,d),l.stateNode=i,Wo(l))}return Kt(l),null;case 5:if(Ee(l),v=l.type,i!==null&&l.stateNode!=null)i.memoizedProps!==h&&Wo(l);else{if(!h){if(l.stateNode===null)throw Error(r(166));return Kt(l),null}if(b=J.current,Au(l))TI(l);else{var x=mg(he.current);switch(b){case 1:b=x.createElementNS("http://www.w3.org/2000/svg",v);break;case 2:b=x.createElementNS("http://www.w3.org/1998/Math/MathML",v);break;default:switch(v){case"svg":b=x.createElementNS("http://www.w3.org/2000/svg",v);break;case"math":b=x.createElementNS("http://www.w3.org/1998/Math/MathML",v);break;case"script":b=x.createElement("div"),b.innerHTML="<script><\/script>",b=b.removeChild(b.firstChild);break;case"select":b=typeof h.is=="string"?x.createElement("select",{is:h.is}):x.createElement("select"),h.multiple?b.multiple=!0:h.size&&(b.size=h.size);break;default:b=typeof h.is=="string"?x.createElement(v,{is:h.is}):x.createElement(v)}}b[In]=l,b[nt]=h;e:for(x=l.child;x!==null;){if(x.tag===5||x.tag===6)b.appendChild(x.stateNode);else if(x.tag!==4&&x.tag!==27&&x.child!==null){x.child.return=x,x=x.child;continue}if(x===l)break e;for(;x.sibling===null;){if(x.return===null||x.return===l)break e;x=x.return}x.sibling.return=x.return,x=x.sibling}l.stateNode=b;e:switch(Xn(b,v,h),v){case"button":case"input":case"select":case"textarea":h=!!h.autoFocus;break e;case"img":h=!0;break e;default:h=!1}h&&Wo(l)}}return Kt(l),$0(l,l.type,i===null?null:i.memoizedProps,l.pendingProps,d),null;case 6:if(i&&l.stateNode!=null)i.memoizedProps!==h&&Wo(l);else{if(typeof h!="string"&&l.stateNode===null)throw Error(r(166));if(i=he.current,Au(l)){if(i=l.stateNode,d=l.memoizedProps,h=null,v=Kn,v!==null)switch(v.tag){case 27:case 5:h=v.memoizedProps}i[In]=l,i=!!(i.nodeValue===d||h!==null&&h.suppressHydrationWarning===!0||qO(i.nodeValue,d)),i||qi(l,!0)}else i=mg(i).createTextNode(h),i[In]=l,l.stateNode=i}return Kt(l),null;case 31:if(d=l.memoizedState,i===null||i.memoizedState!==null){if(h=Au(l),d!==null){if(i===null){if(!h)throw Error(r(318));if(i=l.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(557));i[In]=l}else sl(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Kt(l),i=!1}else d=Jb(),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 Kt(l),null;case 13:if(h=l.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(v=Au(l),h!==null&&h.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[In]=l}else sl(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Kt(l),v=!1}else v=Jb(),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=h!==null,i=i!==null&&i.memoizedState!==null,d&&(h=l.child,v=null,h.alternate!==null&&h.alternate.memoizedState!==null&&h.alternate.memoizedState.cachePool!==null&&(v=h.alternate.memoizedState.cachePool.pool),b=null,h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(b=h.memoizedState.cachePool.pool),b!==v&&(h.flags|=2048)),d!==i&&d&&(l.child.flags|=8192),tg(l,l.updateQueue),Kt(l),null);case 4:return xe(),i===null&&d1(l.stateNode.containerInfo),Kt(l),null;case 10:return Bo(l.type),Kt(l),null;case 19:if(V(yn),h=l.memoizedState,h===null)return Kt(l),null;if(v=(l.flags&128)!==0,b=h.rendering,b===null)if(v)Yd(h,!1);else{if(pn!==0||i!==null&&(i.flags&128)!==0)for(i=l.child;i!==null;){if(b=Hp(i),b!==null){for(l.flags|=128,Yd(h,!1),i=b.updateQueue,l.updateQueue=i,tg(l,i),l.subtreeFlags=0,i=d,d=l.child;d!==null;)CI(d,i),d=d.sibling;return K(yn,yn.current&1|2),dt&&zo(l,h.treeForkCount),l.child}i=i.sibling}h.tail!==null&&Gt()>ig&&(l.flags|=128,v=!0,Yd(h,!1),l.lanes=4194304)}else{if(!v)if(i=Hp(b),i!==null){if(l.flags|=128,v=!0,i=i.updateQueue,l.updateQueue=i,tg(l,i),Yd(h,!0),h.tail===null&&h.tailMode==="hidden"&&!b.alternate&&!dt)return Kt(l),null}else 2*Gt()-h.renderingStartTime>ig&&d!==536870912&&(l.flags|=128,v=!0,Yd(h,!1),l.lanes=4194304);h.isBackwards?(b.sibling=l.child,l.child=b):(i=h.last,i!==null?i.sibling=b:l.child=b,h.last=b)}return h.tail!==null?(i=h.tail,h.rendering=i,h.tail=i.sibling,h.renderingStartTime=Gt(),i.sibling=null,d=yn.current,K(yn,v?d&1|2:d&1),dt&&zo(l,h.treeForkCount),i):(Kt(l),null);case 22:case 23:return Jr(l),f0(),h=l.memoizedState!==null,i!==null?i.memoizedState!==null!==h&&(l.flags|=8192):h&&(l.flags|=8192),h?(d&536870912)!==0&&(l.flags&128)===0&&(Kt(l),l.subtreeFlags&6&&(l.flags|=8192)):Kt(l),d=l.updateQueue,d!==null&&tg(l,d.retryQueue),d=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(d=i.memoizedState.cachePool.pool),h=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(h=l.memoizedState.cachePool.pool),h!==d&&(l.flags|=2048),i!==null&&V(al),null;case 24:return d=null,i!==null&&(d=i.memoizedState.cache),l.memoizedState.cache!==d&&(l.flags|=2048),Bo(Sn),Kt(l),null;case 25:return null;case 30:return null}throw Error(r(156,l.tag))}function UH(i,l){switch(Xb(l),l.tag){case 1:return i=l.flags,i&65536?(l.flags=i&-65537|128,l):null;case 3:return Bo(Sn),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));sl()}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));sl()}return i=l.flags,i&65536?(l.flags=i&-65537|128,l):null;case 19:return V(yn),null;case 4:return xe(),null;case 10:return Bo(l.type),null;case 22:case 23:return Jr(l),f0(),i!==null&&V(al),i=l.flags,i&65536?(l.flags=i&-65537|128,l):null;case 24:return Bo(Sn),null;case 25:return null;default:return null}}function Y2(i,l){switch(Xb(l),l.tag){case 3:Bo(Sn),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:V(yn);break;case 10:Bo(l.type);break;case 22:case 23:Jr(l),f0(),i!==null&&V(al);break;case 24:Bo(Sn)}}function Zd(i,l){try{var d=l.updateQueue,h=d!==null?d.lastEffect:null;if(h!==null){var v=h.next;d=v;do{if((d.tag&i)===i){h=void 0;var b=d.create,x=d.inst;h=b(),x.destroy=h}d=d.next}while(d!==v)}}catch(N){Pt(l,l.return,N)}}function Xi(i,l,d){try{var h=l.updateQueue,v=h!==null?h.lastEffect:null;if(v!==null){var b=v.next;h=b;do{if((h.tag&i)===i){var x=h.inst,N=x.destroy;if(N!==void 0){x.destroy=void 0,v=l;var B=d,Q=N;try{Q()}catch(se){Pt(v,B,se)}}}h=h.next}while(h!==b)}}catch(se){Pt(l,l.return,se)}}function Z2(i){var l=i.updateQueue;if(l!==null){var d=i.stateNode;try{jI(l,d)}catch(h){Pt(i,i.return,h)}}}function X2(i,l,d){d.props=fl(i.type,i.memoizedProps),d.state=i.memoizedState;try{d.componentWillUnmount()}catch(h){Pt(i,l,h)}}function Xd(i,l){try{var d=i.ref;if(d!==null){switch(i.tag){case 26:case 27:case 5:var h=i.stateNode;break;case 30:h=i.stateNode;break;default:h=i.stateNode}typeof d=="function"?i.refCleanup=d(h):d.current=h}}catch(v){Pt(i,l,v)}}function co(i,l){var d=i.ref,h=i.refCleanup;if(d!==null)if(typeof h=="function")try{h()}catch(v){Pt(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){Pt(i,l,v)}else d.current=null}function Q2(i){var l=i.type,d=i.memoizedProps,h=i.stateNode;try{e:switch(l){case"button":case"input":case"select":case"textarea":d.autoFocus&&h.focus();break e;case"img":d.src?h.src=d.src:d.srcSet&&(h.srcset=d.srcSet)}}catch(v){Pt(i,i.return,v)}}function q0(i,l,d){try{var h=i.stateNode;o$(h,i.type,d,l),h[nt]=l}catch(v){Pt(i,i.return,v)}}function J2(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&sa(i.type)||i.tag===4}function W0(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||J2(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&&sa(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 G0(i,l,d){var h=i.tag;if(h===5||h===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=tn));else if(h!==4&&(h===27&&sa(i.type)&&(d=i.stateNode,l=null),i=i.child,i!==null))for(G0(i,l,d),i=i.sibling;i!==null;)G0(i,l,d),i=i.sibling}function ng(i,l,d){var h=i.tag;if(h===5||h===6)i=i.stateNode,l?d.insertBefore(i,l):d.appendChild(i);else if(h!==4&&(h===27&&sa(i.type)&&(d=i.stateNode),i=i.child,i!==null))for(ng(i,l,d),i=i.sibling;i!==null;)ng(i,l,d),i=i.sibling}function eO(i){var l=i.stateNode,d=i.memoizedProps;try{for(var h=i.type,v=l.attributes;v.length;)l.removeAttributeNode(v[0]);Xn(l,h,d),l[In]=i,l[nt]=d}catch(b){Pt(i,i.return,b)}}var Go=!1,wn=!1,V0=!1,tO=typeof WeakSet=="function"?WeakSet:Set,Ln=null;function FH(i,l){if(i=i.containerInfo,p1=wg,i=hI(i),jb(i)){if("selectionStart"in i)var d={start:i.selectionStart,end:i.selectionEnd};else e:{d=(d=i.ownerDocument)&&d.defaultView||window;var h=d.getSelection&&d.getSelection();if(h&&h.rangeCount!==0){d=h.anchorNode;var v=h.anchorOffset,b=h.focusNode;h=h.focusOffset;try{d.nodeType,b.nodeType}catch{d=null;break e}var x=0,N=-1,B=-1,Q=0,se=0,ae=i,te=null;t:for(;;){for(var re;ae!==d||v!==0&&ae.nodeType!==3||(N=x+v),ae!==b||h!==0&&ae.nodeType!==3||(B=x+h),ae.nodeType===3&&(x+=ae.nodeValue.length),(re=ae.firstChild)!==null;)te=ae,ae=re;for(;;){if(ae===i)break t;if(te===d&&++Q===v&&(N=x),te===b&&++se===h&&(B=x),(re=ae.nextSibling)!==null)break;ae=te,te=ae.parentNode}ae=re}d=N===-1||B===-1?null:{start:N,end:B}}else d=null}d=d||{start:0,end:0}}else d=null;for(g1={focusedElem:i,selectionRange:d},wg=!1,Ln=l;Ln!==null;)if(l=Ln,i=l.child,(l.subtreeFlags&1028)!==0&&i!==null)i.return=l,Ln=i;else for(;Ln!==null;){switch(l=Ln,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,h=d.stateNode;try{var Re=fl(d.type,v);i=h.getSnapshotBeforeUpdate(Re,b),h.__reactInternalSnapshotBeforeUpdate=i}catch(De){Pt(d,d.return,De)}}break;case 3:if((i&1024)!==0){if(i=l.stateNode.containerInfo,d=i.nodeType,d===9)y1(i);else if(d===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":y1(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,Ln=i;break}Ln=l.return}}function nO(i,l,d){var h=d.flags;switch(d.tag){case 0:case 11:case 15:Ko(i,d),h&4&&Zd(5,d);break;case 1:if(Ko(i,d),h&4)if(i=d.stateNode,l===null)try{i.componentDidMount()}catch(x){Pt(d,d.return,x)}else{var v=fl(d.type,l.memoizedProps);l=l.memoizedState;try{i.componentDidUpdate(v,l,i.__reactInternalSnapshotBeforeUpdate)}catch(x){Pt(d,d.return,x)}}h&64&&Z2(d),h&512&&Xd(d,d.return);break;case 3:if(Ko(i,d),h&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{jI(i,l)}catch(x){Pt(d,d.return,x)}}break;case 27:l===null&&h&4&&eO(d);case 26:case 5:Ko(i,d),l===null&&h&4&&Q2(d),h&512&&Xd(d,d.return);break;case 12:Ko(i,d);break;case 31:Ko(i,d),h&4&&oO(i,d);break;case 13:Ko(i,d),h&4&&iO(i,d),h&64&&(i=d.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(d=VH.bind(null,d),h$(i,d))));break;case 22:if(h=d.memoizedState!==null||Go,!h){l=l!==null&&l.memoizedState!==null||wn,v=Go;var b=wn;Go=h,(wn=l)&&!b?Yo(i,d,(d.subtreeFlags&8772)!==0):Ko(i,d),Go=v,wn=b}break;case 30:break;default:Ko(i,d)}}function rO(i){var l=i.alternate;l!==null&&(i.alternate=null,rO(l)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(l=i.stateNode,l!==null&&Sd(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 nn=null,Nr=!1;function Vo(i,l,d){for(d=d.child;d!==null;)sO(i,l,d),d=d.sibling}function sO(i,l,d){if(ar&&typeof ar.onCommitFiberUnmount=="function")try{ar.onCommitFiberUnmount(Mi,d)}catch{}switch(d.tag){case 26:wn||co(d,l),Vo(i,l,d),d.memoizedState?d.memoizedState.count--:d.stateNode&&(d=d.stateNode,d.parentNode.removeChild(d));break;case 27:wn||co(d,l);var h=nn,v=Nr;sa(d.type)&&(nn=d.stateNode,Nr=!1),Vo(i,l,d),af(d.stateNode),nn=h,Nr=v;break;case 5:wn||co(d,l);case 6:if(h=nn,v=Nr,nn=null,Vo(i,l,d),nn=h,Nr=v,nn!==null)if(Nr)try{(nn.nodeType===9?nn.body:nn.nodeName==="HTML"?nn.ownerDocument.body:nn).removeChild(d.stateNode)}catch(b){Pt(d,l,b)}else try{nn.removeChild(d.stateNode)}catch(b){Pt(d,l,b)}break;case 18:nn!==null&&(Nr?(i=nn,ZO(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,d.stateNode),Vu(i)):ZO(nn,d.stateNode));break;case 4:h=nn,v=Nr,nn=d.stateNode.containerInfo,Nr=!0,Vo(i,l,d),nn=h,Nr=v;break;case 0:case 11:case 14:case 15:Xi(2,d,l),wn||Xi(4,d,l),Vo(i,l,d);break;case 1:wn||(co(d,l),h=d.stateNode,typeof h.componentWillUnmount=="function"&&X2(d,l,h)),Vo(i,l,d);break;case 21:Vo(i,l,d);break;case 22:wn=(h=wn)||d.memoizedState!==null,Vo(i,l,d),wn=h;break;default:Vo(i,l,d)}}function oO(i,l){if(l.memoizedState===null&&(i=l.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{Vu(i)}catch(d){Pt(l,l.return,d)}}}function iO(i,l){if(l.memoizedState===null&&(i=l.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{Vu(i)}catch(d){Pt(l,l.return,d)}}function zH(i){switch(i.tag){case 31:case 13:case 19:var l=i.stateNode;return l===null&&(l=i.stateNode=new tO),l;case 22:return i=i.stateNode,l=i._retryCache,l===null&&(l=i._retryCache=new tO),l;default:throw Error(r(435,i.tag))}}function rg(i,l){var d=zH(i);l.forEach(function(h){if(!d.has(h)){d.add(h);var v=KH.bind(null,i,h);h.then(v,v)}})}function Mr(i,l){var d=l.deletions;if(d!==null)for(var h=0;h<d.length;h++){var v=d[h],b=i,x=l,N=x;e:for(;N!==null;){switch(N.tag){case 27:if(sa(N.type)){nn=N.stateNode,Nr=!1;break e}break;case 5:nn=N.stateNode,Nr=!1;break e;case 3:case 4:nn=N.stateNode.containerInfo,Nr=!0;break e}N=N.return}if(nn===null)throw Error(r(160));sO(b,x,v),nn=null,Nr=!1,b=v.alternate,b!==null&&(b.return=null),v.return=null}if(l.subtreeFlags&13886)for(l=l.child;l!==null;)aO(l,i),l=l.sibling}var Fs=null;function aO(i,l){var d=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:Mr(l,i),Pr(i),h&4&&(Xi(3,i,i.return),Zd(3,i),Xi(5,i,i.return));break;case 1:Mr(l,i),Pr(i),h&512&&(wn||d===null||co(d,d.return)),h&64&&Go&&(i=i.updateQueue,i!==null&&(h=i.callbacks,h!==null&&(d=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=d===null?h:d.concat(h))));break;case 26:var v=Fs;if(Mr(l,i),Pr(i),h&512&&(wn||d===null||co(d,d.return)),h&4){var b=d!==null?d.memoizedState:null;if(h=i.memoizedState,d===null)if(h===null)if(i.stateNode===null){e:{h=i.type,d=i.memoizedProps,v=v.ownerDocument||v;t:switch(h){case"title":b=v.getElementsByTagName("title")[0],(!b||b[Li]||b[In]||b.namespaceURI==="http://www.w3.org/2000/svg"||b.hasAttribute("itemprop"))&&(b=v.createElement(h),v.head.insertBefore(b,v.querySelector("head > title"))),Xn(b,h,d),b[In]=i,an(b),h=b;break e;case"link":var x=aN("link","href",v).get(h+(d.href||""));if(x){for(var N=0;N<x.length;N++)if(b=x[N],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)){x.splice(N,1);break t}}b=v.createElement(h),Xn(b,h,d),v.head.appendChild(b);break;case"meta":if(x=aN("meta","content",v).get(h+(d.content||""))){for(N=0;N<x.length;N++)if(b=x[N],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)){x.splice(N,1);break t}}b=v.createElement(h),Xn(b,h,d),v.head.appendChild(b);break;default:throw Error(r(468,h))}b[In]=i,an(b),h=b}i.stateNode=h}else lN(v,i.type,i.stateNode);else i.stateNode=iN(v,h,i.memoizedProps);else b!==h?(b===null?d.stateNode!==null&&(d=d.stateNode,d.parentNode.removeChild(d)):b.count--,h===null?lN(v,i.type,i.stateNode):iN(v,h,i.memoizedProps)):h===null&&i.stateNode!==null&&q0(i,i.memoizedProps,d.memoizedProps)}break;case 27:Mr(l,i),Pr(i),h&512&&(wn||d===null||co(d,d.return)),d!==null&&h&4&&q0(i,i.memoizedProps,d.memoizedProps);break;case 5:if(Mr(l,i),Pr(i),h&512&&(wn||d===null||co(d,d.return)),i.flags&32){v=i.stateNode;try{Z(v,"")}catch(Re){Pt(i,i.return,Re)}}h&4&&i.stateNode!=null&&(v=i.memoizedProps,q0(i,v,d!==null?d.memoizedProps:v)),h&1024&&(V0=!0);break;case 6:if(Mr(l,i),Pr(i),h&4){if(i.stateNode===null)throw Error(r(162));h=i.memoizedProps,d=i.stateNode;try{d.nodeValue=h}catch(Re){Pt(i,i.return,Re)}}break;case 3:if(bg=null,v=Fs,Fs=vg(l.containerInfo),Mr(l,i),Fs=v,Pr(i),h&4&&d!==null&&d.memoizedState.isDehydrated)try{Vu(l.containerInfo)}catch(Re){Pt(i,i.return,Re)}V0&&(V0=!1,lO(i));break;case 4:h=Fs,Fs=vg(i.stateNode.containerInfo),Mr(l,i),Pr(i),Fs=h;break;case 12:Mr(l,i),Pr(i);break;case 31:Mr(l,i),Pr(i),h&4&&(h=i.updateQueue,h!==null&&(i.updateQueue=null,rg(i,h)));break;case 13:Mr(l,i),Pr(i),i.child.flags&8192&&i.memoizedState!==null!=(d!==null&&d.memoizedState!==null)&&(og=Gt()),h&4&&(h=i.updateQueue,h!==null&&(i.updateQueue=null,rg(i,h)));break;case 22:v=i.memoizedState!==null;var B=d!==null&&d.memoizedState!==null,Q=Go,se=wn;if(Go=Q||v,wn=se||B,Mr(l,i),wn=se,Go=Q,Pr(i),h&8192)e:for(l=i.stateNode,l._visibility=v?l._visibility&-2:l._visibility|1,v&&(d===null||B||Go||wn||hl(i)),d=null,l=i;;){if(l.tag===5||l.tag===26){if(d===null){B=d=l;try{if(b=B.stateNode,v)x=b.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none";else{N=B.stateNode;var ae=B.memoizedProps.style,te=ae!=null&&ae.hasOwnProperty("display")?ae.display:null;N.style.display=te==null||typeof te=="boolean"?"":(""+te).trim()}}catch(Re){Pt(B,B.return,Re)}}}else if(l.tag===6){if(d===null){B=l;try{B.stateNode.nodeValue=v?"":B.memoizedProps}catch(Re){Pt(B,B.return,Re)}}}else if(l.tag===18){if(d===null){B=l;try{var re=B.stateNode;v?XO(re,!0):XO(B.stateNode,!1)}catch(Re){Pt(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}h&4&&(h=i.updateQueue,h!==null&&(d=h.retryQueue,d!==null&&(h.retryQueue=null,rg(i,d))));break;case 19:Mr(l,i),Pr(i),h&4&&(h=i.updateQueue,h!==null&&(i.updateQueue=null,rg(i,h)));break;case 30:break;case 21:break;default:Mr(l,i),Pr(i)}}function Pr(i){var l=i.flags;if(l&2){try{for(var d,h=i.return;h!==null;){if(J2(h)){d=h;break}h=h.return}if(d==null)throw Error(r(160));switch(d.tag){case 27:var v=d.stateNode,b=W0(i);ng(i,b,v);break;case 5:var x=d.stateNode;d.flags&32&&(Z(x,""),d.flags&=-33);var N=W0(i);ng(i,N,x);break;case 3:case 4:var B=d.stateNode.containerInfo,Q=W0(i);G0(i,Q,B);break;default:throw Error(r(161))}}catch(se){Pt(i,i.return,se)}i.flags&=-3}l&4096&&(i.flags&=-4097)}function lO(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var l=i;lO(l),l.tag===5&&l.flags&1024&&l.stateNode.reset(),i=i.sibling}}function Ko(i,l){if(l.subtreeFlags&8772)for(l=l.child;l!==null;)nO(i,l.alternate,l),l=l.sibling}function hl(i){for(i=i.child;i!==null;){var l=i;switch(l.tag){case 0:case 11:case 14:case 15:Xi(4,l,l.return),hl(l);break;case 1:co(l,l.return);var d=l.stateNode;typeof d.componentWillUnmount=="function"&&X2(l,l.return,d),hl(l);break;case 27:af(l.stateNode);case 26:case 5:co(l,l.return),hl(l);break;case 22:l.memoizedState===null&&hl(l);break;case 30:hl(l);break;default:hl(l)}i=i.sibling}}function Yo(i,l,d){for(d=d&&(l.subtreeFlags&8772)!==0,l=l.child;l!==null;){var h=l.alternate,v=i,b=l,x=b.flags;switch(b.tag){case 0:case 11:case 15:Yo(v,b,d),Zd(4,b);break;case 1:if(Yo(v,b,d),h=b,v=h.stateNode,typeof v.componentDidMount=="function")try{v.componentDidMount()}catch(Q){Pt(h,h.return,Q)}if(h=b,v=h.updateQueue,v!==null){var N=h.stateNode;try{var B=v.shared.hiddenCallbacks;if(B!==null)for(v.shared.hiddenCallbacks=null,v=0;v<B.length;v++)zI(B[v],N)}catch(Q){Pt(h,h.return,Q)}}d&&x&64&&Z2(b),Xd(b,b.return);break;case 27:eO(b);case 26:case 5:Yo(v,b,d),d&&h===null&&x&4&&Q2(b),Xd(b,b.return);break;case 12:Yo(v,b,d);break;case 31:Yo(v,b,d),d&&x&4&&oO(v,b);break;case 13:Yo(v,b,d),d&&x&4&&iO(v,b);break;case 22:b.memoizedState===null&&Yo(v,b,d),Xd(b,b.return);break;case 30:break;default:Yo(v,b,d)}l=l.sibling}}function K0(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&&Ud(d))}function Y0(i,l){i=null,l.alternate!==null&&(i=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==i&&(l.refCount++,i!=null&&Ud(i))}function zs(i,l,d,h){if(l.subtreeFlags&10256)for(l=l.child;l!==null;)uO(i,l,d,h),l=l.sibling}function uO(i,l,d,h){var v=l.flags;switch(l.tag){case 0:case 11:case 15:zs(i,l,d,h),v&2048&&Zd(9,l);break;case 1:zs(i,l,d,h);break;case 3:zs(i,l,d,h),v&2048&&(i=null,l.alternate!==null&&(i=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==i&&(l.refCount++,i!=null&&Ud(i)));break;case 12:if(v&2048){zs(i,l,d,h),i=l.stateNode;try{var b=l.memoizedProps,x=b.id,N=b.onPostCommit;typeof N=="function"&&N(x,l.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(B){Pt(l,l.return,B)}}else zs(i,l,d,h);break;case 31:zs(i,l,d,h);break;case 13:zs(i,l,d,h);break;case 23:break;case 22:b=l.stateNode,x=l.alternate,l.memoizedState!==null?b._visibility&2?zs(i,l,d,h):Qd(i,l):b._visibility&2?zs(i,l,d,h):(b._visibility|=2,Lu(i,l,d,h,(l.subtreeFlags&10256)!==0||!1)),v&2048&&K0(x,l);break;case 24:zs(i,l,d,h),v&2048&&Y0(l.alternate,l);break;default:zs(i,l,d,h)}}function Lu(i,l,d,h,v){for(v=v&&((l.subtreeFlags&10256)!==0||!1),l=l.child;l!==null;){var b=i,x=l,N=d,B=h,Q=x.flags;switch(x.tag){case 0:case 11:case 15:Lu(b,x,N,B,v),Zd(8,x);break;case 23:break;case 22:var se=x.stateNode;x.memoizedState!==null?se._visibility&2?Lu(b,x,N,B,v):Qd(b,x):(se._visibility|=2,Lu(b,x,N,B,v)),v&&Q&2048&&K0(x.alternate,x);break;case 24:Lu(b,x,N,B,v),v&&Q&2048&&Y0(x.alternate,x);break;default:Lu(b,x,N,B,v)}l=l.sibling}}function Qd(i,l){if(l.subtreeFlags&10256)for(l=l.child;l!==null;){var d=i,h=l,v=h.flags;switch(h.tag){case 22:Qd(d,h),v&2048&&K0(h.alternate,h);break;case 24:Qd(d,h),v&2048&&Y0(h.alternate,h);break;default:Qd(d,h)}l=l.sibling}}var Jd=8192;function Uu(i,l,d){if(i.subtreeFlags&Jd)for(i=i.child;i!==null;)cO(i,l,d),i=i.sibling}function cO(i,l,d){switch(i.tag){case 26:Uu(i,l,d),i.flags&Jd&&i.memoizedState!==null&&_$(d,Fs,i.memoizedState,i.memoizedProps);break;case 5:Uu(i,l,d);break;case 3:case 4:var h=Fs;Fs=vg(i.stateNode.containerInfo),Uu(i,l,d),Fs=h;break;case 22:i.memoizedState===null&&(h=i.alternate,h!==null&&h.memoizedState!==null?(h=Jd,Jd=16777216,Uu(i,l,d),Jd=h):Uu(i,l,d));break;default:Uu(i,l,d)}}function dO(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 ef(i){var l=i.deletions;if((i.flags&16)!==0){if(l!==null)for(var d=0;d<l.length;d++){var h=l[d];Ln=h,hO(h,i)}dO(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)fO(i),i=i.sibling}function fO(i){switch(i.tag){case 0:case 11:case 15:ef(i),i.flags&2048&&Xi(9,i,i.return);break;case 3:ef(i);break;case 12:ef(i);break;case 22:var l=i.stateNode;i.memoizedState!==null&&l._visibility&2&&(i.return===null||i.return.tag!==13)?(l._visibility&=-3,sg(i)):ef(i);break;default:ef(i)}}function sg(i){var l=i.deletions;if((i.flags&16)!==0){if(l!==null)for(var d=0;d<l.length;d++){var h=l[d];Ln=h,hO(h,i)}dO(i)}for(i=i.child;i!==null;){switch(l=i,l.tag){case 0:case 11:case 15:Xi(8,l,l.return),sg(l);break;case 22:d=l.stateNode,d._visibility&2&&(d._visibility&=-3,sg(l));break;default:sg(l)}i=i.sibling}}function hO(i,l){for(;Ln!==null;){var d=Ln;switch(d.tag){case 0:case 11:case 15:Xi(8,d,l);break;case 23:case 22:if(d.memoizedState!==null&&d.memoizedState.cachePool!==null){var h=d.memoizedState.cachePool.pool;h!=null&&h.refCount++}break;case 24:Ud(d.memoizedState.cache)}if(h=d.child,h!==null)h.return=d,Ln=h;else e:for(d=i;Ln!==null;){h=Ln;var v=h.sibling,b=h.return;if(rO(h),h===d){Ln=null;break e}if(v!==null){v.return=b,Ln=v;break e}Ln=b}}}var jH={getCacheForType:function(i){var l=Yn(Sn),d=l.data.get(i);return d===void 0&&(d=i(),l.data.set(i,d)),d},cacheSignal:function(){return Yn(Sn).controller.signal}},BH=typeof WeakMap=="function"?WeakMap:Map,Rt=0,qt=null,it=null,ut=0,Mt=0,es=null,Qi=!1,Fu=!1,Z0=!1,Zo=0,pn=0,Ji=0,pl=0,X0=0,ts=0,zu=0,tf=null,kr=null,Q0=!1,og=0,pO=0,ig=1/0,ag=null,ea=null,Nn=0,ta=null,ju=null,Xo=0,J0=0,e1=null,gO=null,nf=0,t1=null;function ns(){return(Rt&2)!==0&&ut!==0?ut&-ut:$.T!==null?a1():mp()}function mO(){if(ts===0)if((ut&536870912)===0||dt){var i=Va;Va<<=1,(Va&3932160)===0&&(Va=262144),ts=i}else ts=536870912;return i=Qr.current,i!==null&&(i.flags|=32),ts}function Dr(i,l,d){(i===qt&&(Mt===2||Mt===9)||i.cancelPendingCommit!==null)&&(Bu(i,0),na(i,ut,ts,!1)),Do(i,d),((Rt&2)===0||i!==qt)&&(i===qt&&((Rt&2)===0&&(pl|=d),pn===4&&na(i,ut,ts,!1)),fo(i))}function vO(i,l,d){if((Rt&6)!==0)throw Error(r(327));var h=!d&&(l&127)===0&&(l&i.expiredLanes)===0||ro(i,l),v=h?qH(i,l):r1(i,l,!0),b=h;do{if(v===0){Fu&&!h&&na(i,l,0,!1);break}else{if(d=i.current.alternate,b&&!HH(d)){v=r1(i,l,!1),b=!1;continue}if(v===2){if(b=l,i.errorRecoveryDisabledLanes&b)var x=0;else x=i.pendingLanes&-536870913,x=x!==0?x:x&536870912?536870912:0;if(x!==0){l=x;e:{var N=i;v=tf;var B=N.current.memoizedState.isDehydrated;if(B&&(Bu(N,x).flags|=256),x=r1(N,x,!1),x!==2){if(Z0&&!B){N.errorRecoveryDisabledLanes|=b,pl|=b,v=4;break e}b=kr,kr=v,b!==null&&(kr===null?kr=b:kr.push.apply(kr,b))}v=x}if(b=!1,v!==2)continue}}if(v===1){Bu(i,0),na(i,l,0,!0);break}e:{switch(h=i,b=v,b){case 0:case 1:throw Error(r(345));case 4:if((l&4194048)!==l)break;case 6:na(h,l,ts,!Qi);break e;case 2:kr=null;break;case 3:case 5:break;default:throw Error(r(329))}if((l&62914560)===l&&(v=og+300-Gt(),10<v)){if(na(h,l,ts,!Qi),Ya(h,0,!0)!==0)break e;Xo=l,h.timeoutHandle=KO(yO.bind(null,h,d,kr,ag,Q0,l,ts,pl,zu,Qi,b,"Throttled",-0,0),v);break e}yO(h,d,kr,ag,Q0,l,ts,pl,zu,Qi,b,null,-0,0)}}break}while(!0);fo(i)}function yO(i,l,d,h,v,b,x,N,B,Q,se,ae,te,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:tn},cO(l,b,ae);var Re=(b&62914560)===b?og-Gt():(b&4194048)===b?pO-Gt():0;if(Re=A$(ae,Re),Re!==null){Xo=b,i.cancelPendingCommit=Re(AO.bind(null,i,l,b,d,h,v,x,N,B,se,ae,null,te,re)),na(i,b,x,!Q);return}}AO(i,l,b,d,h,v,x,N,B)}function HH(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 h=0;h<d.length;h++){var v=d[h],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 na(i,l,d,h){l&=~X0,l&=~pl,i.suspendedLanes|=l,i.pingedLanes&=~l,h&&(i.warmLanes|=l),h=i.expirationTimes;for(var v=l;0<v;){var b=31-Vn(v),x=1<<b;h[b]=-1,v&=~x}d!==0&&gp(i,d,l)}function lg(){return(Rt&6)===0?(rf(0),!1):!0}function n1(){if(it!==null){if(Mt===0)var i=it.return;else i=it,jo=ol=null,y0(i),Nu=null,zd=0,i=it;for(;i!==null;)Y2(i.alternate,i),i=i.return;it=null}}function Bu(i,l){var d=i.timeoutHandle;d!==-1&&(i.timeoutHandle=-1,l$(d)),d=i.cancelPendingCommit,d!==null&&(i.cancelPendingCommit=null,d()),Xo=0,n1(),qt=i,it=d=Fo(i.current,null),ut=l,Mt=0,es=null,Qi=!1,Fu=ro(i,l),Z0=!1,zu=ts=X0=pl=Ji=pn=0,kr=tf=null,Q0=!1,(l&8)!==0&&(l|=l&32);var h=i.entangledLanes;if(h!==0)for(i=i.entanglements,h&=l;0<h;){var v=31-Vn(h),b=1<<v;l|=i[v],h&=~b}return Zo=l,Ip(),d}function bO(i,l){Qe=null,$.H=Vd,l===Ou||l===Up?(l=DI(),Mt=3):l===i0?(l=DI(),Mt=4):Mt=l===k0?8:l!==null&&typeof l=="object"&&typeof l.then=="function"?6:1,es=l,it===null&&(pn=1,Xp(i,ms(l,i.current)))}function SO(){var i=Qr.current;return i===null?!0:(ut&4194048)===ut?Ss===null:(ut&62914560)===ut||(ut&536870912)!==0?i===Ss:!1}function EO(){var i=$.H;return $.H=Vd,i===null?Vd:i}function CO(){var i=$.A;return $.A=jH,i}function ug(){pn=4,Qi||(ut&4194048)!==ut&&Qr.current!==null||(Fu=!0),(Ji&134217727)===0&&(pl&134217727)===0||qt===null||na(qt,ut,ts,!1)}function r1(i,l,d){var h=Rt;Rt|=2;var v=EO(),b=CO();(qt!==i||ut!==l)&&(ag=null,Bu(i,l)),l=!1;var x=pn;e:do try{if(Mt!==0&&it!==null){var N=it,B=es;switch(Mt){case 8:n1(),x=6;break e;case 3:case 2:case 9:case 6:Qr.current===null&&(l=!0);var Q=Mt;if(Mt=0,es=null,Hu(i,N,B,Q),d&&Fu){x=0;break e}break;default:Q=Mt,Mt=0,es=null,Hu(i,N,B,Q)}}$H(),x=pn;break}catch(se){bO(i,se)}while(!0);return l&&i.shellSuspendCounter++,jo=ol=null,Rt=h,$.H=v,$.A=b,it===null&&(qt=null,ut=0,Ip()),x}function $H(){for(;it!==null;)wO(it)}function qH(i,l){var d=Rt;Rt|=2;var h=EO(),v=CO();qt!==i||ut!==l?(ag=null,ig=Gt()+500,Bu(i,l)):Fu=ro(i,l);e:do try{if(Mt!==0&&it!==null){l=it;var b=es;t:switch(Mt){case 1:Mt=0,es=null,Hu(i,l,b,1);break;case 2:case 9:if(PI(b)){Mt=0,es=null,xO(l);break}l=function(){Mt!==2&&Mt!==9||qt!==i||(Mt=7),fo(i)},b.then(l,l);break e;case 3:Mt=7;break e;case 4:Mt=5;break e;case 7:PI(b)?(Mt=0,es=null,xO(l)):(Mt=0,es=null,Hu(i,l,b,7));break;case 5:var x=null;switch(it.tag){case 26:x=it.memoizedState;case 5:case 27:var N=it;if(x?uN(x):N.stateNode.complete){Mt=0,es=null;var B=N.sibling;if(B!==null)it=B;else{var Q=N.return;Q!==null?(it=Q,cg(Q)):it=null}break t}}Mt=0,es=null,Hu(i,l,b,5);break;case 6:Mt=0,es=null,Hu(i,l,b,6);break;case 8:n1(),pn=6;break e;default:throw Error(r(462))}}WH();break}catch(se){bO(i,se)}while(!0);return jo=ol=null,$.H=h,$.A=v,Rt=d,it!==null?0:(qt=null,ut=0,Ip(),pn)}function WH(){for(;it!==null&&!to();)wO(it)}function wO(i){var l=V2(i.alternate,i,Zo);i.memoizedProps=i.pendingProps,l===null?cg(i):it=l}function xO(i){var l=i,d=l.alternate;switch(l.tag){case 15:case 0:l=B2(d,l,l.pendingProps,l.type,void 0,ut);break;case 11:l=B2(d,l,l.pendingProps,l.type.render,l.ref,ut);break;case 5:y0(l);default:Y2(d,l),l=it=CI(l,Zo),l=V2(d,l,Zo)}i.memoizedProps=i.pendingProps,l===null?cg(i):it=l}function Hu(i,l,d,h){jo=ol=null,y0(l),Nu=null,zd=0;var v=l.return;try{if(PH(i,v,l,d,ut)){pn=1,Xp(i,ms(d,i.current)),it=null;return}}catch(b){if(v!==null)throw it=v,b;pn=1,Xp(i,ms(d,i.current)),it=null;return}l.flags&32768?(dt||h===1?i=!0:Fu||(ut&536870912)!==0?i=!1:(Qi=i=!0,(h===2||h===9||h===3||h===6)&&(h=Qr.current,h!==null&&h.tag===13&&(h.flags|=16384))),_O(l,i)):cg(l)}function cg(i){var l=i;do{if((l.flags&32768)!==0){_O(l,Qi);return}i=l.return;var d=LH(l.alternate,l,Zo);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 _O(i,l){do{var d=UH(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 AO(i,l,d,h,v,b,x,N,B){i.cancelPendingCommit=null;do dg();while(Nn!==0);if((Rt&6)!==0)throw Error(r(327));if(l!==null){if(l===i.current)throw Error(r(177));if(b=l.lanes|l.childLanes,b|=Wb,gd(i,d,b,x,N,B),i===qt&&(it=qt=null,ut=0),ju=l,ta=i,Xo=d,J0=b,e1=v,gO=h,(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,YH(no,function(){return NO(),null})):(i.callbackNode=null,i.callbackPriority=0),h=(l.flags&13878)!==0,(l.subtreeFlags&13878)!==0||h){h=$.T,$.T=null,v=ee.p,ee.p=2,x=Rt,Rt|=4;try{FH(i,l,d)}finally{Rt=x,ee.p=v,$.T=h}}Nn=1,TO(),RO(),IO()}}function TO(){if(Nn===1){Nn=0;var i=ta,l=ju,d=(l.flags&13878)!==0;if((l.subtreeFlags&13878)!==0||d){d=$.T,$.T=null;var h=ee.p;ee.p=2;var v=Rt;Rt|=4;try{aO(l,i);var b=g1,x=hI(i.containerInfo),N=b.focusedElem,B=b.selectionRange;if(x!==N&&N&&N.ownerDocument&&fI(N.ownerDocument.documentElement,N)){if(B!==null&&jb(N)){var Q=B.start,se=B.end;if(se===void 0&&(se=Q),"selectionStart"in N)N.selectionStart=Q,N.selectionEnd=Math.min(se,N.value.length);else{var ae=N.ownerDocument||document,te=ae&&ae.defaultView||window;if(te.getSelection){var re=te.getSelection(),Re=N.textContent.length,De=Math.min(B.start,Re),zt=B.end===void 0?De:Math.min(B.end,Re);!re.extend&&De>zt&&(x=zt,zt=De,De=x);var G=dI(N,De),q=dI(N,zt);if(G&&q&&(re.rangeCount!==1||re.anchorNode!==G.node||re.anchorOffset!==G.offset||re.focusNode!==q.node||re.focusOffset!==q.offset)){var X=ae.createRange();X.setStart(G.node,G.offset),re.removeAllRanges(),De>zt?(re.addRange(X),re.extend(q.node,q.offset)):(X.setEnd(q.node,q.offset),re.addRange(X))}}}}for(ae=[],re=N;re=re.parentNode;)re.nodeType===1&&ae.push({element:re,left:re.scrollLeft,top:re.scrollTop});for(typeof N.focus=="function"&&N.focus(),N=0;N<ae.length;N++){var ie=ae[N];ie.element.scrollLeft=ie.left,ie.element.scrollTop=ie.top}}wg=!!p1,g1=p1=null}finally{Rt=v,ee.p=h,$.T=d}}i.current=l,Nn=2}}function RO(){if(Nn===2){Nn=0;var i=ta,l=ju,d=(l.flags&8772)!==0;if((l.subtreeFlags&8772)!==0||d){d=$.T,$.T=null;var h=ee.p;ee.p=2;var v=Rt;Rt|=4;try{nO(i,l.alternate,l)}finally{Rt=v,ee.p=h,$.T=d}}Nn=3}}function IO(){if(Nn===4||Nn===3){Nn=0,Tr();var i=ta,l=ju,d=Xo,h=gO;(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?Nn=5:(Nn=0,ju=ta=null,OO(i,i.pendingLanes));var v=i.pendingLanes;if(v===0&&(ea=null),Za(d),l=l.stateNode,ar&&typeof ar.onCommitFiberRoot=="function")try{ar.onCommitFiberRoot(Mi,l,void 0,(l.current.flags&128)===128)}catch{}if(h!==null){l=$.T,v=ee.p,ee.p=2,$.T=null;try{for(var b=i.onRecoverableError,x=0;x<h.length;x++){var N=h[x];b(N.value,{componentStack:N.stack})}}finally{$.T=l,ee.p=v}}(Xo&3)!==0&&dg(),fo(i),v=i.pendingLanes,(d&261930)!==0&&(v&42)!==0?i===t1?nf++:(nf=0,t1=i):nf=0,rf(0)}}function OO(i,l){(i.pooledCacheLanes&=l)===0&&(l=i.pooledCache,l!=null&&(i.pooledCache=null,Ud(l)))}function dg(){return TO(),RO(),IO(),NO()}function NO(){if(Nn!==5)return!1;var i=ta,l=J0;J0=0;var d=Za(Xo),h=$.T,v=ee.p;try{ee.p=32>d?32:d,$.T=null,d=e1,e1=null;var b=ta,x=Xo;if(Nn=0,ju=ta=null,Xo=0,(Rt&6)!==0)throw Error(r(331));var N=Rt;if(Rt|=4,fO(b.current),uO(b,b.current,x,d),Rt=N,rf(0,!1),ar&&typeof ar.onPostCommitFiberRoot=="function")try{ar.onPostCommitFiberRoot(Mi,b)}catch{}return!0}finally{ee.p=v,$.T=h,OO(i,l)}}function MO(i,l,d){l=ms(d,l),l=P0(i.stateNode,l,2),i=Ki(i,l,2),i!==null&&(Do(i,2),fo(i))}function Pt(i,l,d){if(i.tag===3)MO(i,i,d);else for(;l!==null;){if(l.tag===3){MO(l,i,d);break}else if(l.tag===1){var h=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(ea===null||!ea.has(h))){i=ms(d,i),d=P2(2),h=Ki(l,d,2),h!==null&&(k2(d,h,l,i),Do(h,2),fo(h));break}}l=l.return}}function s1(i,l,d){var h=i.pingCache;if(h===null){h=i.pingCache=new BH;var v=new Set;h.set(l,v)}else v=h.get(l),v===void 0&&(v=new Set,h.set(l,v));v.has(d)||(Z0=!0,v.add(d),i=GH.bind(null,i,l,d),l.then(i,i))}function GH(i,l,d){var h=i.pingCache;h!==null&&h.delete(l),i.pingedLanes|=i.suspendedLanes&d,i.warmLanes&=~d,qt===i&&(ut&d)===d&&(pn===4||pn===3&&(ut&62914560)===ut&&300>Gt()-og?(Rt&2)===0&&Bu(i,0):X0|=d,zu===ut&&(zu=0)),fo(i)}function PO(i,l){l===0&&(l=Kr()),i=nl(i,l),i!==null&&(Do(i,l),fo(i))}function VH(i){var l=i.memoizedState,d=0;l!==null&&(d=l.retryLane),PO(i,d)}function KH(i,l){var d=0;switch(i.tag){case 31:case 13:var h=i.stateNode,v=i.memoizedState;v!==null&&(d=v.retryLane);break;case 19:h=i.stateNode;break;case 22:h=i.stateNode._retryCache;break;default:throw Error(r(314))}h!==null&&h.delete(l),PO(i,d)}function YH(i,l){return Gn(i,l)}var fg=null,$u=null,o1=!1,hg=!1,i1=!1,ra=0;function fo(i){i!==$u&&i.next===null&&($u===null?fg=$u=i:$u=$u.next=i),hg=!0,o1||(o1=!0,XH())}function rf(i,l){if(!i1&&hg){i1=!0;do for(var d=!1,h=fg;h!==null;){if(i!==0){var v=h.pendingLanes;if(v===0)var b=0;else{var x=h.suspendedLanes,N=h.pingedLanes;b=(1<<31-Vn(42|i)+1)-1,b&=v&~(x&~N),b=b&201326741?b&201326741|1:b?b|2:0}b!==0&&(d=!0,UO(h,b))}else b=ut,b=Ya(h,h===qt?b:0,h.cancelPendingCommit!==null||h.timeoutHandle!==-1),(b&3)===0||ro(h,b)||(d=!0,UO(h,b));h=h.next}while(d);i1=!1}}function ZH(){kO()}function kO(){hg=o1=!1;var i=0;ra!==0&&a$()&&(i=ra);for(var l=Gt(),d=null,h=fg;h!==null;){var v=h.next,b=DO(h,l);b===0?(h.next=null,d===null?fg=v:d.next=v,v===null&&($u=d)):(d=h,(i!==0||(b&3)!==0)&&(hg=!0)),h=v}Nn!==0&&Nn!==5||rf(i),ra!==0&&(ra=0)}function DO(i,l){for(var d=i.suspendedLanes,h=i.pingedLanes,v=i.expirationTimes,b=i.pendingLanes&-62914561;0<b;){var x=31-Vn(b),N=1<<x,B=v[x];B===-1?((N&d)===0||(N&h)!==0)&&(v[x]=fu(N,l)):B<=l&&(i.expiredLanes|=N),b&=~N}if(l=qt,d=ut,d=Ya(i,i===l?d:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),h=i.callbackNode,d===0||i===l&&(Mt===2||Mt===9)||i.cancelPendingCommit!==null)return h!==null&&h!==null&&Ar(h),i.callbackNode=null,i.callbackPriority=0;if((d&3)===0||ro(i,d)){if(l=d&-d,l===i.callbackPriority)return l;switch(h!==null&&Ar(h),Za(d)){case 2:case 8:d=Rr;break;case 32:d=no;break;case 268435456:d=ko;break;default:d=no}return h=LO.bind(null,i),d=Gn(d,h),i.callbackPriority=l,i.callbackNode=d,l}return h!==null&&h!==null&&Ar(h),i.callbackPriority=2,i.callbackNode=null,2}function LO(i,l){if(Nn!==0&&Nn!==5)return i.callbackNode=null,i.callbackPriority=0,null;var d=i.callbackNode;if(dg()&&i.callbackNode!==d)return null;var h=ut;return h=Ya(i,i===qt?h:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),h===0?null:(vO(i,h,l),DO(i,Gt()),i.callbackNode!=null&&i.callbackNode===d?LO.bind(null,i):null)}function UO(i,l){if(dg())return null;vO(i,l,!0)}function XH(){u$(function(){(Rt&6)!==0?Gn(vn,ZH):kO()})}function a1(){if(ra===0){var i=Ru;i===0&&(i=ki,ki<<=1,(ki&261888)===0&&(ki=256)),ra=i}return ra}function FO(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:lr(""+i)}function zO(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 QH(i,l,d,h,v){if(l==="submit"&&d&&d.stateNode===v){var b=FO((v[nt]||null).action),x=h.submitter;x&&(l=(l=x[nt]||null)?FO(l.formAction):x.getAttribute("formAction"),l!==null&&(b=l,x=null));var N=new _p("action","action",null,h,v);i.push({event:N,listeners:[{instance:null,listener:function(){if(h.defaultPrevented){if(ra!==0){var B=x?zO(v,x):new FormData(v);T0(d,{pending:!0,data:B,method:v.method,action:b},null,B)}}else typeof b=="function"&&(N.preventDefault(),B=x?zO(v,x):new FormData(v),T0(d,{pending:!0,data:B,method:v.method,action:b},b,B))},currentTarget:v}]})}}for(var l1=0;l1<qb.length;l1++){var u1=qb[l1],JH=u1.toLowerCase(),e$=u1[0].toUpperCase()+u1.slice(1);Us(JH,"on"+e$)}Us(mI,"onAnimationEnd"),Us(vI,"onAnimationIteration"),Us(yI,"onAnimationStart"),Us("dblclick","onDoubleClick"),Us("focusin","onFocus"),Us("focusout","onBlur"),Us(mH,"onTransitionRun"),Us(vH,"onTransitionStart"),Us(yH,"onTransitionCancel"),Us(bI,"onTransitionEnd"),zi("onMouseEnter",["mouseout","mouseover"]),zi("onMouseLeave",["mouseout","mouseover"]),zi("onPointerEnter",["pointerout","pointerover"]),zi("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 sf="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(" "),t$=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(sf));function jO(i,l){l=(l&4)!==0;for(var d=0;d<i.length;d++){var h=i[d],v=h.event;h=h.listeners;e:{var b=void 0;if(l)for(var x=h.length-1;0<=x;x--){var N=h[x],B=N.instance,Q=N.currentTarget;if(N=N.listener,B!==b&&v.isPropagationStopped())break e;b=N,v.currentTarget=Q;try{b(v)}catch(se){Rp(se)}v.currentTarget=null,b=B}else for(x=0;x<h.length;x++){if(N=h[x],B=N.instance,Q=N.currentTarget,N=N.listener,B!==b&&v.isPropagationStopped())break e;b=N,v.currentTarget=Q;try{b(v)}catch(se){Rp(se)}v.currentTarget=null,b=B}}}}function at(i,l){var d=l[vd];d===void 0&&(d=l[vd]=new Set);var h=i+"__bubble";d.has(h)||(BO(l,i,2,!1),d.add(h))}function c1(i,l,d){var h=0;l&&(h|=4),BO(d,i,h,l)}var pg="_reactListening"+Math.random().toString(36).slice(2);function d1(i){if(!i[pg]){i[pg]=!0,io.forEach(function(d){d!=="selectionchange"&&(t$.has(d)||c1(d,!1,i),c1(d,!0,i))});var l=i.nodeType===9?i:i.ownerDocument;l===null||l[pg]||(l[pg]=!0,c1("selectionchange",!1,l))}}function BO(i,l,d,h){switch(mN(l)){case 2:var v=I$;break;case 8:v=O$;break;default:v=A1}d=v.bind(null,l,d,i),v=void 0,!Nb||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(v=!0),h?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 f1(i,l,d,h,v){var b=h;if((l&1)===0&&(l&2)===0&&h!==null)e:for(;;){if(h===null)return;var x=h.tag;if(x===3||x===4){var N=h.stateNode.containerInfo;if(N===v)break;if(x===4)for(x=h.return;x!==null;){var B=x.tag;if((B===3||B===4)&&x.stateNode.containerInfo===v)return;x=x.return}for(;N!==null;){if(x=Ui(N),x===null)return;if(B=x.tag,B===5||B===6||B===26||B===27){h=b=x;continue e}N=N.parentNode}}h=h.return}GR(function(){var Q=b,se=On(d),ae=[];e:{var te=SI.get(i);if(te!==void 0){var re=_p,Re=i;switch(i){case"keypress":if(wp(d)===0)break e;case"keydown":case"keyup":re=KB;break;case"focusin":Re="focus",re=Db;break;case"focusout":Re="blur",re=Db;break;case"beforeblur":case"afterblur":re=Db;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=YR;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":re=LB;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":re=XB;break;case mI:case vI:case yI:re=zB;break;case bI:re=JB;break;case"scroll":case"scrollend":re=kB;break;case"wheel":re=tH;break;case"copy":case"cut":case"paste":re=BB;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":re=XR;break;case"toggle":case"beforetoggle":re=rH}var De=(l&4)!==0,zt=!De&&(i==="scroll"||i==="scrollend"),G=De?te!==null?te+"Capture":null:te;De=[];for(var q=Q,X;q!==null;){var ie=q;if(X=ie.stateNode,ie=ie.tag,ie!==5&&ie!==26&&ie!==27||X===null||G===null||(ie=Ad(q,G),ie!=null&&De.push(of(q,ie,X))),zt)break;q=q.return}0<De.length&&(te=new re(te,Re,null,d,se),ae.push({event:te,listeners:De}))}}if((l&7)===0){e:{if(te=i==="mouseover"||i==="pointerover",re=i==="mouseout"||i==="pointerout",te&&d!==yr&&(Re=d.relatedTarget||d.fromElement)&&(Ui(Re)||Re[Yr]))break e;if((re||te)&&(te=se.window===se?se:(te=se.ownerDocument)?te.defaultView||te.parentWindow:window,re?(Re=d.relatedTarget||d.toElement,re=Q,Re=Re?Ui(Re):null,Re!==null&&(zt=o(Re),De=Re.tag,Re!==zt||De!==5&&De!==27&&De!==6)&&(Re=null)):(re=null,Re=Q),re!==Re)){if(De=YR,ie="onMouseLeave",G="onMouseEnter",q="mouse",(i==="pointerout"||i==="pointerover")&&(De=XR,ie="onPointerLeave",G="onPointerEnter",q="pointer"),zt=re==null?te:Xa(re),X=Re==null?te:Xa(Re),te=new De(ie,q+"leave",re,d,se),te.target=zt,te.relatedTarget=X,ie=null,Ui(se)===Q&&(De=new De(G,q+"enter",Re,d,se),De.target=X,De.relatedTarget=zt,ie=De),zt=ie,re&&Re)t:{for(De=n$,G=re,q=Re,X=0,ie=G;ie;ie=De(ie))X++;ie=0;for(var Pe=q;Pe;Pe=De(Pe))ie++;for(;0<X-ie;)G=De(G),X--;for(;0<ie-X;)q=De(q),ie--;for(;X--;){if(G===q||q!==null&&G===q.alternate){De=G;break t}G=De(G),q=De(q)}De=null}else De=null;re!==null&&HO(ae,te,re,De,!1),Re!==null&&zt!==null&&HO(ae,zt,Re,De,!0)}}e:{if(te=Q?Xa(Q):window,re=te.nodeName&&te.nodeName.toLowerCase(),re==="select"||re==="input"&&te.type==="file")var xt=oI;else if(rI(te))if(iI)xt=hH;else{xt=dH;var Ne=cH}else re=te.nodeName,!re||re.toLowerCase()!=="input"||te.type!=="checkbox"&&te.type!=="radio"?Q&&Ue(Q.elementType)&&(xt=oI):xt=fH;if(xt&&(xt=xt(i,Q))){sI(ae,xt,d,se);break e}Ne&&Ne(i,te,Q),i==="focusout"&&Q&&te.type==="number"&&Q.memoizedProps.value!=null&&ji(te,"number",te.value)}switch(Ne=Q?Xa(Q):window,i){case"focusin":(rI(Ne)||Ne.contentEditable==="true")&&(Su=Ne,Bb=Q,kd=null);break;case"focusout":kd=Bb=Su=null;break;case"mousedown":Hb=!0;break;case"contextmenu":case"mouseup":case"dragend":Hb=!1,pI(ae,d,se);break;case"selectionchange":if(gH)break;case"keydown":case"keyup":pI(ae,d,se)}var Je;if(Ub)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 bu?tI(i,d)&&(ct="onCompositionEnd"):i==="keydown"&&d.keyCode===229&&(ct="onCompositionStart");ct&&(QR&&d.locale!=="ko"&&(bu||ct!=="onCompositionStart"?ct==="onCompositionEnd"&&bu&&(Je=VR()):(Bi=se,Mb="value"in Bi?Bi.value:Bi.textContent,bu=!0)),Ne=gg(Q,ct),0<Ne.length&&(ct=new ZR(ct,i,null,d,se),ae.push({event:ct,listeners:Ne}),Je?ct.data=Je:(Je=nI(d),Je!==null&&(ct.data=Je)))),(Je=oH?iH(i,d):aH(i,d))&&(ct=gg(Q,"onBeforeInput"),0<ct.length&&(Ne=new ZR("onBeforeInput","beforeinput",null,d,se),ae.push({event:Ne,listeners:ct}),Ne.data=Je)),QH(ae,i,Q,d,se)}jO(ae,l)})}function of(i,l,d){return{instance:i,listener:l,currentTarget:d}}function gg(i,l){for(var d=l+"Capture",h=[];i!==null;){var v=i,b=v.stateNode;if(v=v.tag,v!==5&&v!==26&&v!==27||b===null||(v=Ad(i,d),v!=null&&h.unshift(of(i,v,b)),v=Ad(i,l),v!=null&&h.push(of(i,v,b))),i.tag===3)return h;i=i.return}return[]}function n$(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function HO(i,l,d,h,v){for(var b=l._reactName,x=[];d!==null&&d!==h;){var N=d,B=N.alternate,Q=N.stateNode;if(N=N.tag,B!==null&&B===h)break;N!==5&&N!==26&&N!==27||Q===null||(B=Q,v?(Q=Ad(d,b),Q!=null&&x.unshift(of(d,Q,B))):v||(Q=Ad(d,b),Q!=null&&x.push(of(d,Q,B)))),d=d.return}x.length!==0&&i.push({event:l,listeners:x})}var r$=/\r\n?/g,s$=/\u0000|\uFFFD/g;function $O(i){return(typeof i=="string"?i:""+i).replace(r$,`
224
- `).replace(s$,"")}function qO(i,l){return l=$O(l),$O(i)===l}function Ft(i,l,d,h,v,b){switch(d){case"children":typeof h=="string"?l==="body"||l==="textarea"&&h===""||Z(i,h):(typeof h=="number"||typeof h=="bigint")&&l!=="body"&&Z(i,""+h);break;case"className":Ls(i,"class",h);break;case"tabIndex":Ls(i,"tabindex",h);break;case"dir":case"role":case"viewBox":case"width":case"height":Ls(i,d,h);break;case"style":ke(i,h,b);break;case"data":if(l!=="object"){Ls(i,"data",h);break}case"src":case"href":if(h===""&&(l!=="a"||d!=="href")){i.removeAttribute(d);break}if(h==null||typeof h=="function"||typeof h=="symbol"||typeof h=="boolean"){i.removeAttribute(d);break}h=lr(""+h),i.setAttribute(d,h);break;case"action":case"formAction":if(typeof h=="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"&&Ft(i,l,"name",v.name,v,null),Ft(i,l,"formEncType",v.formEncType,v,null),Ft(i,l,"formMethod",v.formMethod,v,null),Ft(i,l,"formTarget",v.formTarget,v,null)):(Ft(i,l,"encType",v.encType,v,null),Ft(i,l,"method",v.method,v,null),Ft(i,l,"target",v.target,v,null)));if(h==null||typeof h=="symbol"||typeof h=="boolean"){i.removeAttribute(d);break}h=lr(""+h),i.setAttribute(d,h);break;case"onClick":h!=null&&(i.onclick=tn);break;case"onScroll":h!=null&&at("scroll",i);break;case"onScrollEnd":h!=null&&at("scrollend",i);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(r(61));if(d=h.__html,d!=null){if(v.children!=null)throw Error(r(60));i.innerHTML=d}}break;case"multiple":i.multiple=h&&typeof h!="function"&&typeof h!="symbol";break;case"muted":i.muted=h&&typeof h!="function"&&typeof h!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(h==null||typeof h=="function"||typeof h=="boolean"||typeof h=="symbol"){i.removeAttribute("xlink:href");break}d=lr(""+h),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":h!=null&&typeof h!="function"&&typeof h!="symbol"?i.setAttribute(d,""+h):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":h&&typeof h!="function"&&typeof h!="symbol"?i.setAttribute(d,""):i.removeAttribute(d);break;case"capture":case"download":h===!0?i.setAttribute(d,""):h!==!1&&h!=null&&typeof h!="function"&&typeof h!="symbol"?i.setAttribute(d,h):i.removeAttribute(d);break;case"cols":case"rows":case"size":case"span":h!=null&&typeof h!="function"&&typeof h!="symbol"&&!isNaN(h)&&1<=h?i.setAttribute(d,h):i.removeAttribute(d);break;case"rowSpan":case"start":h==null||typeof h=="function"||typeof h=="symbol"||isNaN(h)?i.removeAttribute(d):i.setAttribute(d,h);break;case"popover":at("beforetoggle",i),at("toggle",i),Lo(i,"popover",h);break;case"xlinkActuate":vr(i,"http://www.w3.org/1999/xlink","xlink:actuate",h);break;case"xlinkArcrole":vr(i,"http://www.w3.org/1999/xlink","xlink:arcrole",h);break;case"xlinkRole":vr(i,"http://www.w3.org/1999/xlink","xlink:role",h);break;case"xlinkShow":vr(i,"http://www.w3.org/1999/xlink","xlink:show",h);break;case"xlinkTitle":vr(i,"http://www.w3.org/1999/xlink","xlink:title",h);break;case"xlinkType":vr(i,"http://www.w3.org/1999/xlink","xlink:type",h);break;case"xmlBase":vr(i,"http://www.w3.org/XML/1998/namespace","xml:base",h);break;case"xmlLang":vr(i,"http://www.w3.org/XML/1998/namespace","xml:lang",h);break;case"xmlSpace":vr(i,"http://www.w3.org/XML/1998/namespace","xml:space",h);break;case"is":Lo(i,"is",h);break;case"innerText":case"textContent":break;default:(!(2<d.length)||d[0]!=="o"&&d[0]!=="O"||d[1]!=="n"&&d[1]!=="N")&&(d=en.get(d)||d,Lo(i,d,h))}}function h1(i,l,d,h,v,b){switch(d){case"style":ke(i,h,b);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(r(61));if(d=h.__html,d!=null){if(v.children!=null)throw Error(r(60));i.innerHTML=d}}break;case"children":typeof h=="string"?Z(i,h):(typeof h=="number"||typeof h=="bigint")&&Z(i,""+h);break;case"onScroll":h!=null&&at("scroll",i);break;case"onScrollEnd":h!=null&&at("scrollend",i);break;case"onClick":h!=null&&(i.onclick=tn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!yp.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 h=="function")){typeof b!="function"&&b!==null&&(d in i?i[d]=null:i.hasAttribute(d)&&i.removeAttribute(d)),i.addEventListener(l,h,v);break e}d in i?i[d]=h:h===!0?i.setAttribute(d,""):Lo(i,d,h)}}}function Xn(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 h=!1,v=!1,b;for(b in d)if(d.hasOwnProperty(b)){var x=d[b];if(x!=null)switch(b){case"src":h=!0;break;case"srcSet":v=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,l));default:Ft(i,l,b,x,d,null)}}v&&Ft(i,l,"srcSet",d.srcSet,d,null),h&&Ft(i,l,"src",d.src,d,null);return;case"input":at("invalid",i);var N=b=x=v=null,B=null,Q=null;for(h in d)if(d.hasOwnProperty(h)){var se=d[h];if(se!=null)switch(h){case"name":v=se;break;case"type":x=se;break;case"checked":B=se;break;case"defaultChecked":Q=se;break;case"value":b=se;break;case"defaultValue":N=se;break;case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(r(137,l));break;default:Ft(i,l,h,se,d,null)}}_d(i,b,N,B,Q,x,v,!1);return;case"select":at("invalid",i),h=x=b=null;for(v in d)if(d.hasOwnProperty(v)&&(N=d[v],N!=null))switch(v){case"value":b=N;break;case"defaultValue":x=N;break;case"multiple":h=N;default:Ft(i,l,v,N,d,null)}l=b,d=x,i.multiple=!!h,l!=null?ao(i,!!h,l,!1):d!=null&&ao(i,!!h,d,!0);return;case"textarea":at("invalid",i),b=v=h=null;for(x in d)if(d.hasOwnProperty(x)&&(N=d[x],N!=null))switch(x){case"value":h=N;break;case"defaultValue":v=N;break;case"children":b=N;break;case"dangerouslySetInnerHTML":if(N!=null)throw Error(r(91));break;default:Ft(i,l,x,N,d,null)}U(i,h,v,b);return;case"option":for(B in d)d.hasOwnProperty(B)&&(h=d[B],h!=null)&&(B==="selected"?i.selected=h&&typeof h!="function"&&typeof h!="symbol":Ft(i,l,B,h,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(h=0;h<sf.length;h++)at(sf[h],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(Q in d)if(d.hasOwnProperty(Q)&&(h=d[Q],h!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,l));default:Ft(i,l,Q,h,d,null)}return;default:if(Ue(l)){for(se in d)d.hasOwnProperty(se)&&(h=d[se],h!==void 0&&h1(i,l,se,h,d,void 0));return}}for(N in d)d.hasOwnProperty(N)&&(h=d[N],h!=null&&Ft(i,l,N,h,d,null))}function o$(i,l,d,h){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,x=null,N=null,B=null,Q=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:h.hasOwnProperty(re)||Ft(i,l,re,null,h,ae)}}for(var te in h){var re=h[te];if(ae=d[te],h.hasOwnProperty(te)&&(re!=null||ae!=null))switch(te){case"type":b=re;break;case"name":v=re;break;case"checked":Q=re;break;case"defaultChecked":se=re;break;case"value":x=re;break;case"defaultValue":N=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(r(137,l));break;default:re!==ae&&Ft(i,l,te,re,h,ae)}}xd(i,x,N,B,Q,se,b,v);return;case"select":re=x=N=te=null;for(b in d)if(B=d[b],d.hasOwnProperty(b)&&B!=null)switch(b){case"value":break;case"multiple":re=B;default:h.hasOwnProperty(b)||Ft(i,l,b,null,h,B)}for(v in h)if(b=h[v],B=d[v],h.hasOwnProperty(v)&&(b!=null||B!=null))switch(v){case"value":te=b;break;case"defaultValue":N=b;break;case"multiple":x=b;default:b!==B&&Ft(i,l,v,b,h,B)}l=N,d=x,h=re,te!=null?ao(i,!!d,te,!1):!!h!=!!d&&(l!=null?ao(i,!!d,l,!0):ao(i,!!d,d?[]:"",!1));return;case"textarea":re=te=null;for(N in d)if(v=d[N],d.hasOwnProperty(N)&&v!=null&&!h.hasOwnProperty(N))switch(N){case"value":break;case"children":break;default:Ft(i,l,N,null,h,v)}for(x in h)if(v=h[x],b=d[x],h.hasOwnProperty(x)&&(v!=null||b!=null))switch(x){case"value":te=v;break;case"defaultValue":re=v;break;case"children":break;case"dangerouslySetInnerHTML":if(v!=null)throw Error(r(91));break;default:v!==b&&Ft(i,l,x,v,h,b)}pe(i,te,re);return;case"option":for(var Re in d)te=d[Re],d.hasOwnProperty(Re)&&te!=null&&!h.hasOwnProperty(Re)&&(Re==="selected"?i.selected=!1:Ft(i,l,Re,null,h,te));for(B in h)te=h[B],re=d[B],h.hasOwnProperty(B)&&te!==re&&(te!=null||re!=null)&&(B==="selected"?i.selected=te&&typeof te!="function"&&typeof te!="symbol":Ft(i,l,B,te,h,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)te=d[De],d.hasOwnProperty(De)&&te!=null&&!h.hasOwnProperty(De)&&Ft(i,l,De,null,h,te);for(Q in h)if(te=h[Q],re=d[Q],h.hasOwnProperty(Q)&&te!==re&&(te!=null||re!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(r(137,l));break;default:Ft(i,l,Q,te,h,re)}return;default:if(Ue(l)){for(var zt in d)te=d[zt],d.hasOwnProperty(zt)&&te!==void 0&&!h.hasOwnProperty(zt)&&h1(i,l,zt,void 0,h,te);for(se in h)te=h[se],re=d[se],!h.hasOwnProperty(se)||te===re||te===void 0&&re===void 0||h1(i,l,se,te,h,re);return}}for(var G in d)te=d[G],d.hasOwnProperty(G)&&te!=null&&!h.hasOwnProperty(G)&&Ft(i,l,G,null,h,te);for(ae in h)te=h[ae],re=d[ae],!h.hasOwnProperty(ae)||te===re||te==null&&re==null||Ft(i,l,ae,te,h,re)}function WO(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function i$(){if(typeof performance.getEntriesByType=="function"){for(var i=0,l=0,d=performance.getEntriesByType("resource"),h=0;h<d.length;h++){var v=d[h],b=v.transferSize,x=v.initiatorType,N=v.duration;if(b&&N&&WO(x)){for(x=0,N=v.responseEnd,h+=1;h<d.length;h++){var B=d[h],Q=B.startTime;if(Q>N)break;var se=B.transferSize,ae=B.initiatorType;se&&WO(ae)&&(B=B.responseEnd,x+=se*(B<N?1:(N-Q)/(B-Q)))}if(--h,l+=8*(b+x)/(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 p1=null,g1=null;function mg(i){return i.nodeType===9?i:i.ownerDocument}function GO(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 VO(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 m1(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 v1=null;function a$(){var i=window.event;return i&&i.type==="popstate"?i===v1?!1:(v1=i,!0):(v1=null,!1)}var KO=typeof setTimeout=="function"?setTimeout:void 0,l$=typeof clearTimeout=="function"?clearTimeout:void 0,YO=typeof Promise=="function"?Promise:void 0,u$=typeof queueMicrotask=="function"?queueMicrotask:typeof YO<"u"?function(i){return YO.resolve(null).then(i).catch(c$)}:KO;function c$(i){setTimeout(function(){throw i})}function sa(i){return i==="head"}function ZO(i,l){var d=l,h=0;do{var v=d.nextSibling;if(i.removeChild(d),v&&v.nodeType===8)if(d=v.data,d==="/$"||d==="/&"){if(h===0){i.removeChild(v),Vu(l);return}h--}else if(d==="$"||d==="$?"||d==="$~"||d==="$!"||d==="&")h++;else if(d==="html")af(i.ownerDocument.documentElement);else if(d==="head"){d=i.ownerDocument.head,af(d);for(var b=d.firstChild;b;){var x=b.nextSibling,N=b.nodeName;b[Li]||N==="SCRIPT"||N==="STYLE"||N==="LINK"&&b.rel.toLowerCase()==="stylesheet"||d.removeChild(b),b=x}}else d==="body"&&af(i.ownerDocument.body);d=v}while(d);Vu(l)}function XO(i,l){var d=i;i=0;do{var h=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||""),h&&h.nodeType===8)if(d=h.data,d==="/$"){if(i===0)break;i--}else d!=="$"&&d!=="$?"&&d!=="$~"&&d!=="$!"||i++;d=h}while(d)}function y1(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":y1(d),Sd(d);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(d.rel.toLowerCase()==="stylesheet")continue}i.removeChild(d)}}function d$(i,l,d,h){for(;i.nodeType===1;){var v=d;if(i.nodeName.toLowerCase()!==l.toLowerCase()){if(!h&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(h){if(!i[Li])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 f$(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 QO(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 b1(i){return i.data==="$?"||i.data==="$~"}function S1(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function h$(i,l){var d=i.ownerDocument;if(i.data==="$~")i._reactRetry=l;else if(i.data!=="$?"||d.readyState!=="loading")l();else{var h=function(){l(),d.removeEventListener("DOMContentLoaded",h)};d.addEventListener("DOMContentLoaded",h),i._reactRetry=h}}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 E1=null;function JO(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 eN(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 tN(i,l,d){switch(l=mg(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 af(i){for(var l=i.attributes;l.length;)i.removeAttributeNode(l[0]);Sd(i)}var Cs=new Map,nN=new Set;function vg(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var Qo=ee.d;ee.d={f:p$,r:g$,D:m$,C:v$,L:y$,m:b$,X:E$,S:S$,M:C$};function p$(){var i=Qo.f(),l=lg();return i||l}function g$(i){var l=Fi(i);l!==null&&l.tag===5&&l.type==="form"?b2(l):Qo.r(i)}var qu=typeof document>"u"?null:document;function rN(i,l,d){var h=qu;if(h&&typeof l=="string"&&l){var v=Ir(l);v='link[rel="'+i+'"][href="'+v+'"]',typeof d=="string"&&(v+='[crossorigin="'+d+'"]'),nN.has(v)||(nN.add(v),i={rel:i,crossOrigin:d,href:l},h.querySelector(v)===null&&(l=h.createElement("link"),Xn(l,"link",i),an(l),h.head.appendChild(l)))}}function m$(i){Qo.D(i),rN("dns-prefetch",i,null)}function v$(i,l){Qo.C(i,l),rN("preconnect",i,l)}function y$(i,l,d){Qo.L(i,l,d);var h=qu;if(h&&i&&l){var v='link[rel="preload"][as="'+Ir(l)+'"]';l==="image"&&d&&d.imageSrcSet?(v+='[imagesrcset="'+Ir(d.imageSrcSet)+'"]',typeof d.imageSizes=="string"&&(v+='[imagesizes="'+Ir(d.imageSizes)+'"]')):v+='[href="'+Ir(i)+'"]';var b=v;switch(l){case"style":b=Wu(i);break;case"script":b=Gu(i)}Cs.has(b)||(i=g({rel:"preload",href:l==="image"&&d&&d.imageSrcSet?void 0:i,as:l},d),Cs.set(b,i),h.querySelector(v)!==null||l==="style"&&h.querySelector(lf(b))||l==="script"&&h.querySelector(uf(b))||(l=h.createElement("link"),Xn(l,"link",i),an(l),h.head.appendChild(l)))}}function b$(i,l){Qo.m(i,l);var d=qu;if(d&&i){var h=l&&typeof l.as=="string"?l.as:"script",v='link[rel="modulepreload"][as="'+Ir(h)+'"][href="'+Ir(i)+'"]',b=v;switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":b=Gu(i)}if(!Cs.has(b)&&(i=g({rel:"modulepreload",href:i},l),Cs.set(b,i),d.querySelector(v)===null)){switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(d.querySelector(uf(b)))return}h=d.createElement("link"),Xn(h,"link",i),an(h),d.head.appendChild(h)}}}function S$(i,l,d){Qo.S(i,l,d);var h=qu;if(h&&i){var v=mr(h).hoistableStyles,b=Wu(i);l=l||"default";var x=v.get(b);if(!x){var N={loading:0,preload:null};if(x=h.querySelector(lf(b)))N.loading=5;else{i=g({rel:"stylesheet",href:i,"data-precedence":l},d),(d=Cs.get(b))&&C1(i,d);var B=x=h.createElement("link");an(B),Xn(B,"link",i),B._p=new Promise(function(Q,se){B.onload=Q,B.onerror=se}),B.addEventListener("load",function(){N.loading|=1}),B.addEventListener("error",function(){N.loading|=2}),N.loading|=4,yg(x,l,h)}x={type:"stylesheet",instance:x,count:1,state:N},v.set(b,x)}}}function E$(i,l){Qo.X(i,l);var d=qu;if(d&&i){var h=mr(d).hoistableScripts,v=Gu(i),b=h.get(v);b||(b=d.querySelector(uf(v)),b||(i=g({src:i,async:!0},l),(l=Cs.get(v))&&w1(i,l),b=d.createElement("script"),an(b),Xn(b,"link",i),d.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},h.set(v,b))}}function C$(i,l){Qo.M(i,l);var d=qu;if(d&&i){var h=mr(d).hoistableScripts,v=Gu(i),b=h.get(v);b||(b=d.querySelector(uf(v)),b||(i=g({src:i,async:!0,type:"module"},l),(l=Cs.get(v))&&w1(i,l),b=d.createElement("script"),an(b),Xn(b,"link",i),d.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},h.set(v,b))}}function sN(i,l,d,h){var v=(v=he.current)?vg(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=Wu(d.href),d=mr(v).hoistableStyles,h=d.get(l),h||(h={type:"style",instance:null,count:0,state:null},d.set(l,h)),h):{type:"void",instance:null,count:0,state:null};case"link":if(d.rel==="stylesheet"&&typeof d.href=="string"&&typeof d.precedence=="string"){i=Wu(d.href);var b=mr(v).hoistableStyles,x=b.get(i);if(x||(v=v.ownerDocument||v,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},b.set(i,x),(b=v.querySelector(lf(i)))&&!b._p&&(x.instance=b,x.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||w$(v,i,d,x.state))),l&&h===null)throw Error(r(528,""));return x}if(l&&h!==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=Gu(d),d=mr(v).hoistableScripts,h=d.get(l),h||(h={type:"script",instance:null,count:0,state:null},d.set(l,h)),h):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,i))}}function Wu(i){return'href="'+Ir(i)+'"'}function lf(i){return'link[rel="stylesheet"]['+i+"]"}function oN(i){return g({},i,{"data-precedence":i.precedence,precedence:null})}function w$(i,l,d,h){i.querySelector('link[rel="preload"][as="style"]['+l+"]")?h.loading=1:(l=i.createElement("link"),h.preload=l,l.addEventListener("load",function(){return h.loading|=1}),l.addEventListener("error",function(){return h.loading|=2}),Xn(l,"link",d),an(l),i.head.appendChild(l))}function Gu(i){return'[src="'+Ir(i)+'"]'}function uf(i){return"script[async]"+i}function iN(i,l,d){if(l.count++,l.instance===null)switch(l.type){case"style":var h=i.querySelector('style[data-href~="'+Ir(d.href)+'"]');if(h)return l.instance=h,an(h),h;var v=g({},d,{"data-href":d.href,"data-precedence":d.precedence,href:null,precedence:null});return h=(i.ownerDocument||i).createElement("style"),an(h),Xn(h,"style",v),yg(h,d.precedence,i),l.instance=h;case"stylesheet":v=Wu(d.href);var b=i.querySelector(lf(v));if(b)return l.state.loading|=4,l.instance=b,an(b),b;h=oN(d),(v=Cs.get(v))&&C1(h,v),b=(i.ownerDocument||i).createElement("link"),an(b);var x=b;return x._p=new Promise(function(N,B){x.onload=N,x.onerror=B}),Xn(b,"link",h),l.state.loading|=4,yg(b,d.precedence,i),l.instance=b;case"script":return b=Gu(d.src),(v=i.querySelector(uf(b)))?(l.instance=v,an(v),v):(h=d,(v=Cs.get(b))&&(h=g({},d),w1(h,v)),i=i.ownerDocument||i,v=i.createElement("script"),an(v),Xn(v,"link",h),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&&(h=l.instance,l.state.loading|=4,yg(h,d.precedence,i));return l.instance}function yg(i,l,d){for(var h=d.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),v=h.length?h[h.length-1]:null,b=v,x=0;x<h.length;x++){var N=h[x];if(N.dataset.precedence===l)b=N;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 C1(i,l){i.crossOrigin==null&&(i.crossOrigin=l.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=l.referrerPolicy),i.title==null&&(i.title=l.title)}function w1(i,l){i.crossOrigin==null&&(i.crossOrigin=l.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=l.referrerPolicy),i.integrity==null&&(i.integrity=l.integrity)}var bg=null;function aN(i,l,d){if(bg===null){var h=new Map,v=bg=new Map;v.set(d,h)}else v=bg,h=v.get(d),h||(h=new Map,v.set(d,h));if(h.has(i))return h;for(h.set(i,null),d=d.getElementsByTagName(i),v=0;v<d.length;v++){var b=d[v];if(!(b[Li]||b[In]||i==="link"&&b.getAttribute("rel")==="stylesheet")&&b.namespaceURI!=="http://www.w3.org/2000/svg"){var x=b.getAttribute(l)||"";x=i+x;var N=h.get(x);N?N.push(b):h.set(x,[b])}}return h}function lN(i,l,d){i=i.ownerDocument||i,i.head.insertBefore(d,l==="title"?i.querySelector("head > title"):null)}function x$(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 uN(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function _$(i,l,d,h){if(d.type==="stylesheet"&&(typeof h.media!="string"||matchMedia(h.media).matches!==!1)&&(d.state.loading&4)===0){if(d.instance===null){var v=Wu(h.href),b=l.querySelector(lf(v));if(b){l=b._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(i.count++,i=Sg.bind(i),l.then(i,i)),d.state.loading|=4,d.instance=b,an(b);return}b=l.ownerDocument||l,h=oN(h),(v=Cs.get(v))&&C1(h,v),b=b.createElement("link"),an(b);var x=b;x._p=new Promise(function(N,B){x.onload=N,x.onerror=B}),Xn(b,"link",h),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=Sg.bind(i),l.addEventListener("load",d),l.addEventListener("error",d))}}var x1=0;function A$(i,l){return i.stylesheets&&i.count===0&&Cg(i,i.stylesheets),0<i.count||0<i.imgCount?function(d){var h=setTimeout(function(){if(i.stylesheets&&Cg(i,i.stylesheets),i.unsuspend){var b=i.unsuspend;i.unsuspend=null,b()}},6e4+l);0<i.imgBytes&&x1===0&&(x1=62500*i$());var v=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&Cg(i,i.stylesheets),i.unsuspend)){var b=i.unsuspend;i.unsuspend=null,b()}},(i.imgBytes>x1?50:800)+l);return i.unsuspend=d,function(){i.unsuspend=null,clearTimeout(h),clearTimeout(v)}}:null}function Sg(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Cg(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var Eg=null;function Cg(i,l){i.stylesheets=null,i.unsuspend!==null&&(i.count++,Eg=new Map,l.forEach(T$,i),Eg=null,Sg.call(i))}function T$(i,l){if(!(l.state.loading&4)){var d=Eg.get(i);if(d)var h=d.get(null);else{d=new Map,Eg.set(i,d);for(var v=i.querySelectorAll("link[data-precedence],style[data-precedence]"),b=0;b<v.length;b++){var x=v[b];(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")&&(d.set(x.dataset.precedence,x),h=x)}h&&d.set(null,h)}v=l.instance,x=v.getAttribute("data-precedence"),b=d.get(x)||h,b===h&&d.set(null,v),d.set(x,v),this.count++,h=Sg.bind(this),v.addEventListener("load",h),v.addEventListener("error",h),b?b.parentNode.insertBefore(v,b.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(v,i.firstChild)),l.state.loading|=4}}var cf={$$typeof:T,Provider:null,Consumer:null,_currentValue:fe,_currentValue2:fe,_threadCount:0};function R$(i,l,d,h,v,b,x,N,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=so(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=so(0),this.hiddenUpdates=so(null),this.identifierPrefix=h,this.onUncaughtError=v,this.onCaughtError=b,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=B,this.incompleteTransitions=new Map}function cN(i,l,d,h,v,b,x,N,B,Q,se,ae){return i=new R$(i,l,d,x,B,Q,se,ae,N),l=1,b===!0&&(l|=24),b=Xr(3,null,null,l),i.current=b,b.stateNode=i,l=r0(),l.refCount++,i.pooledCache=l,l.refCount++,b.memoizedState={element:h,isDehydrated:d,cache:l},a0(b),i}function dN(i){return i?(i=wu,i):wu}function fN(i,l,d,h,v,b){v=dN(v),h.context===null?h.context=v:h.pendingContext=v,h=Vi(l),h.payload={element:d},b=b===void 0?null:b,b!==null&&(h.callback=b),d=Ki(i,h,l),d!==null&&(Dr(d,i,l),Bd(d,i,l))}function hN(i,l){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var d=i.retryLane;i.retryLane=d!==0&&d<l?d:l}}function _1(i,l){hN(i,l),(i=i.alternate)&&hN(i,l)}function pN(i){if(i.tag===13||i.tag===31){var l=nl(i,67108864);l!==null&&Dr(l,i,67108864),_1(i,67108864)}}function gN(i){if(i.tag===13||i.tag===31){var l=ns();l=pu(l);var d=nl(i,l);d!==null&&Dr(d,i,l),_1(i,l)}}var wg=!0;function I$(i,l,d,h){var v=$.T;$.T=null;var b=ee.p;try{ee.p=2,A1(i,l,d,h)}finally{ee.p=b,$.T=v}}function O$(i,l,d,h){var v=$.T;$.T=null;var b=ee.p;try{ee.p=8,A1(i,l,d,h)}finally{ee.p=b,$.T=v}}function A1(i,l,d,h){if(wg){var v=T1(h);if(v===null)f1(i,l,h,xg,d),vN(i,h);else if(M$(v,i,l,d,h))h.stopPropagation();else if(vN(i,h),l&4&&-1<N$.indexOf(i)){for(;v!==null;){var b=Fi(v);if(b!==null)switch(b.tag){case 3:if(b=b.stateNode,b.current.memoizedState.isDehydrated){var x=ks(b.pendingLanes);if(x!==0){var N=b;for(N.pendingLanes|=2,N.entangledLanes|=2;x;){var B=1<<31-Vn(x);N.entanglements[1]|=B,x&=~B}fo(b),(Rt&6)===0&&(ig=Gt()+500,rf(0))}}break;case 31:case 13:N=nl(b,2),N!==null&&Dr(N,b,2),lg(),_1(b,2)}if(b=T1(h),b===null&&f1(i,l,h,xg,d),b===v)break;v=b}v!==null&&h.stopPropagation()}else f1(i,l,h,null,d)}}function T1(i){return i=On(i),R1(i)}var xg=null;function R1(i){if(xg=null,i=Ui(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 xg=i,null}function mN(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 vn:return 2;case Rr:return 8;case no:case hd:return 32;case ko:return 268435456;default:return 32}default:return 32}}var I1=!1,oa=null,ia=null,aa=null,df=new Map,ff=new Map,la=[],N$="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 vN(i,l){switch(i){case"focusin":case"focusout":oa=null;break;case"dragenter":case"dragleave":ia=null;break;case"mouseover":case"mouseout":aa=null;break;case"pointerover":case"pointerout":df.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":ff.delete(l.pointerId)}}function hf(i,l,d,h,v,b){return i===null||i.nativeEvent!==b?(i={blockedOn:l,domEventName:d,eventSystemFlags:h,nativeEvent:b,targetContainers:[v]},l!==null&&(l=Fi(l),l!==null&&pN(l)),i):(i.eventSystemFlags|=h,l=i.targetContainers,v!==null&&l.indexOf(v)===-1&&l.push(v),i)}function M$(i,l,d,h,v){switch(l){case"focusin":return oa=hf(oa,i,l,d,h,v),!0;case"dragenter":return ia=hf(ia,i,l,d,h,v),!0;case"mouseover":return aa=hf(aa,i,l,d,h,v),!0;case"pointerover":var b=v.pointerId;return df.set(b,hf(df.get(b)||null,i,l,d,h,v)),!0;case"gotpointercapture":return b=v.pointerId,ff.set(b,hf(ff.get(b)||null,i,l,d,h,v)),!0}return!1}function yN(i){var l=Ui(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,Di(i.priority,function(){gN(d)});return}}else if(l===31){if(l=u(d),l!==null){i.blockedOn=l,Di(i.priority,function(){gN(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 _g(i){if(i.blockedOn!==null)return!1;for(var l=i.targetContainers;0<l.length;){var d=T1(i.nativeEvent);if(d===null){d=i.nativeEvent;var h=new d.constructor(d.type,d);yr=h,d.target.dispatchEvent(h),yr=null}else return l=Fi(d),l!==null&&pN(l),i.blockedOn=d,!1;l.shift()}return!0}function bN(i,l,d){_g(i)&&d.delete(l)}function P$(){I1=!1,oa!==null&&_g(oa)&&(oa=null),ia!==null&&_g(ia)&&(ia=null),aa!==null&&_g(aa)&&(aa=null),df.forEach(bN),ff.forEach(bN)}function Ag(i,l){i.blockedOn===l&&(i.blockedOn=null,I1||(I1=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,P$)))}var Tg=null;function SN(i){Tg!==i&&(Tg=i,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Tg===i&&(Tg=null);for(var l=0;l<i.length;l+=3){var d=i[l],h=i[l+1],v=i[l+2];if(typeof h!="function"){if(R1(h||d)===null)continue;break}var b=Fi(d);b!==null&&(i.splice(l,3),l-=3,T0(b,{pending:!0,data:v,method:d.method,action:h},h,v))}}))}function Vu(i){function l(B){return Ag(B,i)}oa!==null&&Ag(oa,i),ia!==null&&Ag(ia,i),aa!==null&&Ag(aa,i),df.forEach(l),ff.forEach(l);for(var d=0;d<la.length;d++){var h=la[d];h.blockedOn===i&&(h.blockedOn=null)}for(;0<la.length&&(d=la[0],d.blockedOn===null);)yN(d),d.blockedOn===null&&la.shift();if(d=(i.ownerDocument||i).$$reactFormReplay,d!=null)for(h=0;h<d.length;h+=3){var v=d[h],b=d[h+1],x=v[nt]||null;if(typeof b=="function")x||SN(d);else if(x){var N=null;if(b&&b.hasAttribute("formAction")){if(v=b,x=b[nt]||null)N=x.formAction;else if(R1(v)!==null)continue}else N=x.action;typeof N=="function"?d[h+1]=N:(d.splice(h,3),h-=3),SN(d)}}}function EN(){function i(b){b.canIntercept&&b.info==="react-transition"&&b.intercept({handler:function(){return new Promise(function(x){return v=x})},focusReset:"manual",scroll:"manual"})}function l(){v!==null&&(v(),v=null),h||setTimeout(d,20)}function d(){if(!h&&!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 h=!1,v=null;return navigation.addEventListener("navigate",i),navigation.addEventListener("navigatesuccess",l),navigation.addEventListener("navigateerror",l),setTimeout(d,100),function(){h=!0,navigation.removeEventListener("navigate",i),navigation.removeEventListener("navigatesuccess",l),navigation.removeEventListener("navigateerror",l),v!==null&&(v(),v=null)}}}function O1(i){this._internalRoot=i}Rg.prototype.render=O1.prototype.render=function(i){var l=this._internalRoot;if(l===null)throw Error(r(409));var d=l.current,h=ns();fN(d,h,i,l,null,null)},Rg.prototype.unmount=O1.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var l=i.containerInfo;fN(i.current,2,null,i,null,null),lg(),l[Yr]=null}};function Rg(i){this._internalRoot=i}Rg.prototype.unstable_scheduleHydration=function(i){if(i){var l=mp();i={blockedOn:null,target:i,priority:l};for(var d=0;d<la.length&&l!==0&&l<la[d].priority;d++);la.splice(d,0,i),d===0&&yN(i)}};var CN=e.version;if(CN!=="19.2.7")throw Error(r(527,CN,"19.2.7"));ee.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?p(i):null,i=i===null?null:i.stateNode,i};var k$={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:$,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ig=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ig.isDisabled&&Ig.supportsFiber)try{Mi=Ig.inject(k$),ar=Ig}catch{}}return Mf.createRoot=function(i,l){if(!s(i))throw Error(r(299));var d=!1,h="",v=I2,b=O2,x=N2;return l!=null&&(l.unstable_strictMode===!0&&(d=!0),l.identifierPrefix!==void 0&&(h=l.identifierPrefix),l.onUncaughtError!==void 0&&(v=l.onUncaughtError),l.onCaughtError!==void 0&&(b=l.onCaughtError),l.onRecoverableError!==void 0&&(x=l.onRecoverableError)),l=cN(i,1,!1,null,null,d,h,null,v,b,x,EN),i[Yr]=l.current,d1(i),new O1(l)},Mf.hydrateRoot=function(i,l,d){if(!s(i))throw Error(r(299));var h=!1,v="",b=I2,x=O2,N=N2,B=null;return d!=null&&(d.unstable_strictMode===!0&&(h=!0),d.identifierPrefix!==void 0&&(v=d.identifierPrefix),d.onUncaughtError!==void 0&&(b=d.onUncaughtError),d.onCaughtError!==void 0&&(x=d.onCaughtError),d.onRecoverableError!==void 0&&(N=d.onRecoverableError),d.formState!==void 0&&(B=d.formState)),l=cN(i,1,!0,l,d??null,h,v,B,b,x,N,EN),l.context=dN(null),d=l.current,h=ns(),h=pu(h),v=Vi(h),v.callback=null,Ki(d,v,h),d=h,l.current.lanes=d,Do(l,d),fo(l),i[Yr]=l.current,d1(i),new Rg(l)},Mf.version="19.2.7",Mf}var cU;function Ope(){if(cU)return qw.exports;cU=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(),qw.exports=Ipe(),qw.exports}var Npe=Ope();const Mpe={bodySerializer:t=>JSON.stringify(t,(e,n)=>typeof n=="bigint"?n.toString():n)},Ppe=({onRequest:t,onSseError:e,onSseEvent:n,responseTransformer:r,responseValidator:s,sseDefaultRetryDelay:o,sseMaxRetryAttempts:a,sseMaxRetryDelay:u,sseSleepFn:c,url:f,...p})=>{let g;const m=c??(E=>new Promise(C=>setTimeout(C,E)));return{stream:async function*(){let E=o??3e3,C=0;const w=p.signal??new AbortController().signal;for(;!w.aborted;){C++;const _=p.headers instanceof Headers?p.headers:new Headers(p.headers);g!==void 0&&_.set("Last-Event-ID",g);try{const T={redirect:"follow",...p,body:p.serializedBody,headers:_,signal:w};let R=new Request(f,T);t&&(R=await t(f,T));const O=await(p.fetch??globalThis.fetch)(R);if(!O.ok)throw new Error(`SSE failed: ${O.status} ${O.statusText}`);if(!O.body)throw new Error("No body in SSE response");const I=O.body.pipeThrough(new TextDecoderStream).getReader();let P="";const k=()=>{try{I.cancel()}catch{}};w.addEventListener("abort",k);try{for(;;){const{done:H,value:F}=await I.read();if(H)break;P+=F,P=P.replace(/\r\n/g,`
224
+ `).replace(s$,"")}function qO(i,l){return l=$O(l),$O(i)===l}function Ft(i,l,d,h,v,b){switch(d){case"children":typeof h=="string"?l==="body"||l==="textarea"&&h===""||Z(i,h):(typeof h=="number"||typeof h=="bigint")&&l!=="body"&&Z(i,""+h);break;case"className":Ls(i,"class",h);break;case"tabIndex":Ls(i,"tabindex",h);break;case"dir":case"role":case"viewBox":case"width":case"height":Ls(i,d,h);break;case"style":ke(i,h,b);break;case"data":if(l!=="object"){Ls(i,"data",h);break}case"src":case"href":if(h===""&&(l!=="a"||d!=="href")){i.removeAttribute(d);break}if(h==null||typeof h=="function"||typeof h=="symbol"||typeof h=="boolean"){i.removeAttribute(d);break}h=lr(""+h),i.setAttribute(d,h);break;case"action":case"formAction":if(typeof h=="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"&&Ft(i,l,"name",v.name,v,null),Ft(i,l,"formEncType",v.formEncType,v,null),Ft(i,l,"formMethod",v.formMethod,v,null),Ft(i,l,"formTarget",v.formTarget,v,null)):(Ft(i,l,"encType",v.encType,v,null),Ft(i,l,"method",v.method,v,null),Ft(i,l,"target",v.target,v,null)));if(h==null||typeof h=="symbol"||typeof h=="boolean"){i.removeAttribute(d);break}h=lr(""+h),i.setAttribute(d,h);break;case"onClick":h!=null&&(i.onclick=tn);break;case"onScroll":h!=null&&at("scroll",i);break;case"onScrollEnd":h!=null&&at("scrollend",i);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(r(61));if(d=h.__html,d!=null){if(v.children!=null)throw Error(r(60));i.innerHTML=d}}break;case"multiple":i.multiple=h&&typeof h!="function"&&typeof h!="symbol";break;case"muted":i.muted=h&&typeof h!="function"&&typeof h!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(h==null||typeof h=="function"||typeof h=="boolean"||typeof h=="symbol"){i.removeAttribute("xlink:href");break}d=lr(""+h),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":h!=null&&typeof h!="function"&&typeof h!="symbol"?i.setAttribute(d,""+h):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":h&&typeof h!="function"&&typeof h!="symbol"?i.setAttribute(d,""):i.removeAttribute(d);break;case"capture":case"download":h===!0?i.setAttribute(d,""):h!==!1&&h!=null&&typeof h!="function"&&typeof h!="symbol"?i.setAttribute(d,h):i.removeAttribute(d);break;case"cols":case"rows":case"size":case"span":h!=null&&typeof h!="function"&&typeof h!="symbol"&&!isNaN(h)&&1<=h?i.setAttribute(d,h):i.removeAttribute(d);break;case"rowSpan":case"start":h==null||typeof h=="function"||typeof h=="symbol"||isNaN(h)?i.removeAttribute(d):i.setAttribute(d,h);break;case"popover":at("beforetoggle",i),at("toggle",i),Lo(i,"popover",h);break;case"xlinkActuate":vr(i,"http://www.w3.org/1999/xlink","xlink:actuate",h);break;case"xlinkArcrole":vr(i,"http://www.w3.org/1999/xlink","xlink:arcrole",h);break;case"xlinkRole":vr(i,"http://www.w3.org/1999/xlink","xlink:role",h);break;case"xlinkShow":vr(i,"http://www.w3.org/1999/xlink","xlink:show",h);break;case"xlinkTitle":vr(i,"http://www.w3.org/1999/xlink","xlink:title",h);break;case"xlinkType":vr(i,"http://www.w3.org/1999/xlink","xlink:type",h);break;case"xmlBase":vr(i,"http://www.w3.org/XML/1998/namespace","xml:base",h);break;case"xmlLang":vr(i,"http://www.w3.org/XML/1998/namespace","xml:lang",h);break;case"xmlSpace":vr(i,"http://www.w3.org/XML/1998/namespace","xml:space",h);break;case"is":Lo(i,"is",h);break;case"innerText":case"textContent":break;default:(!(2<d.length)||d[0]!=="o"&&d[0]!=="O"||d[1]!=="n"&&d[1]!=="N")&&(d=en.get(d)||d,Lo(i,d,h))}}function h1(i,l,d,h,v,b){switch(d){case"style":ke(i,h,b);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(r(61));if(d=h.__html,d!=null){if(v.children!=null)throw Error(r(60));i.innerHTML=d}}break;case"children":typeof h=="string"?Z(i,h):(typeof h=="number"||typeof h=="bigint")&&Z(i,""+h);break;case"onScroll":h!=null&&at("scroll",i);break;case"onScrollEnd":h!=null&&at("scrollend",i);break;case"onClick":h!=null&&(i.onclick=tn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!yp.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 h=="function")){typeof b!="function"&&b!==null&&(d in i?i[d]=null:i.hasAttribute(d)&&i.removeAttribute(d)),i.addEventListener(l,h,v);break e}d in i?i[d]=h:h===!0?i.setAttribute(d,""):Lo(i,d,h)}}}function Xn(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 h=!1,v=!1,b;for(b in d)if(d.hasOwnProperty(b)){var x=d[b];if(x!=null)switch(b){case"src":h=!0;break;case"srcSet":v=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,l));default:Ft(i,l,b,x,d,null)}}v&&Ft(i,l,"srcSet",d.srcSet,d,null),h&&Ft(i,l,"src",d.src,d,null);return;case"input":at("invalid",i);var N=b=x=v=null,B=null,Q=null;for(h in d)if(d.hasOwnProperty(h)){var se=d[h];if(se!=null)switch(h){case"name":v=se;break;case"type":x=se;break;case"checked":B=se;break;case"defaultChecked":Q=se;break;case"value":b=se;break;case"defaultValue":N=se;break;case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(r(137,l));break;default:Ft(i,l,h,se,d,null)}}_d(i,b,N,B,Q,x,v,!1);return;case"select":at("invalid",i),h=x=b=null;for(v in d)if(d.hasOwnProperty(v)&&(N=d[v],N!=null))switch(v){case"value":b=N;break;case"defaultValue":x=N;break;case"multiple":h=N;default:Ft(i,l,v,N,d,null)}l=b,d=x,i.multiple=!!h,l!=null?ao(i,!!h,l,!1):d!=null&&ao(i,!!h,d,!0);return;case"textarea":at("invalid",i),b=v=h=null;for(x in d)if(d.hasOwnProperty(x)&&(N=d[x],N!=null))switch(x){case"value":h=N;break;case"defaultValue":v=N;break;case"children":b=N;break;case"dangerouslySetInnerHTML":if(N!=null)throw Error(r(91));break;default:Ft(i,l,x,N,d,null)}U(i,h,v,b);return;case"option":for(B in d)d.hasOwnProperty(B)&&(h=d[B],h!=null)&&(B==="selected"?i.selected=h&&typeof h!="function"&&typeof h!="symbol":Ft(i,l,B,h,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(h=0;h<sf.length;h++)at(sf[h],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(Q in d)if(d.hasOwnProperty(Q)&&(h=d[Q],h!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,l));default:Ft(i,l,Q,h,d,null)}return;default:if(Ue(l)){for(se in d)d.hasOwnProperty(se)&&(h=d[se],h!==void 0&&h1(i,l,se,h,d,void 0));return}}for(N in d)d.hasOwnProperty(N)&&(h=d[N],h!=null&&Ft(i,l,N,h,d,null))}function o$(i,l,d,h){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,x=null,N=null,B=null,Q=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:h.hasOwnProperty(re)||Ft(i,l,re,null,h,ae)}}for(var te in h){var re=h[te];if(ae=d[te],h.hasOwnProperty(te)&&(re!=null||ae!=null))switch(te){case"type":b=re;break;case"name":v=re;break;case"checked":Q=re;break;case"defaultChecked":se=re;break;case"value":x=re;break;case"defaultValue":N=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(r(137,l));break;default:re!==ae&&Ft(i,l,te,re,h,ae)}}xd(i,x,N,B,Q,se,b,v);return;case"select":re=x=N=te=null;for(b in d)if(B=d[b],d.hasOwnProperty(b)&&B!=null)switch(b){case"value":break;case"multiple":re=B;default:h.hasOwnProperty(b)||Ft(i,l,b,null,h,B)}for(v in h)if(b=h[v],B=d[v],h.hasOwnProperty(v)&&(b!=null||B!=null))switch(v){case"value":te=b;break;case"defaultValue":N=b;break;case"multiple":x=b;default:b!==B&&Ft(i,l,v,b,h,B)}l=N,d=x,h=re,te!=null?ao(i,!!d,te,!1):!!h!=!!d&&(l!=null?ao(i,!!d,l,!0):ao(i,!!d,d?[]:"",!1));return;case"textarea":re=te=null;for(N in d)if(v=d[N],d.hasOwnProperty(N)&&v!=null&&!h.hasOwnProperty(N))switch(N){case"value":break;case"children":break;default:Ft(i,l,N,null,h,v)}for(x in h)if(v=h[x],b=d[x],h.hasOwnProperty(x)&&(v!=null||b!=null))switch(x){case"value":te=v;break;case"defaultValue":re=v;break;case"children":break;case"dangerouslySetInnerHTML":if(v!=null)throw Error(r(91));break;default:v!==b&&Ft(i,l,x,v,h,b)}pe(i,te,re);return;case"option":for(var Re in d)te=d[Re],d.hasOwnProperty(Re)&&te!=null&&!h.hasOwnProperty(Re)&&(Re==="selected"?i.selected=!1:Ft(i,l,Re,null,h,te));for(B in h)te=h[B],re=d[B],h.hasOwnProperty(B)&&te!==re&&(te!=null||re!=null)&&(B==="selected"?i.selected=te&&typeof te!="function"&&typeof te!="symbol":Ft(i,l,B,te,h,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)te=d[De],d.hasOwnProperty(De)&&te!=null&&!h.hasOwnProperty(De)&&Ft(i,l,De,null,h,te);for(Q in h)if(te=h[Q],re=d[Q],h.hasOwnProperty(Q)&&te!==re&&(te!=null||re!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(r(137,l));break;default:Ft(i,l,Q,te,h,re)}return;default:if(Ue(l)){for(var zt in d)te=d[zt],d.hasOwnProperty(zt)&&te!==void 0&&!h.hasOwnProperty(zt)&&h1(i,l,zt,void 0,h,te);for(se in h)te=h[se],re=d[se],!h.hasOwnProperty(se)||te===re||te===void 0&&re===void 0||h1(i,l,se,te,h,re);return}}for(var G in d)te=d[G],d.hasOwnProperty(G)&&te!=null&&!h.hasOwnProperty(G)&&Ft(i,l,G,null,h,te);for(ae in h)te=h[ae],re=d[ae],!h.hasOwnProperty(ae)||te===re||te==null&&re==null||Ft(i,l,ae,te,h,re)}function WO(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function i$(){if(typeof performance.getEntriesByType=="function"){for(var i=0,l=0,d=performance.getEntriesByType("resource"),h=0;h<d.length;h++){var v=d[h],b=v.transferSize,x=v.initiatorType,N=v.duration;if(b&&N&&WO(x)){for(x=0,N=v.responseEnd,h+=1;h<d.length;h++){var B=d[h],Q=B.startTime;if(Q>N)break;var se=B.transferSize,ae=B.initiatorType;se&&WO(ae)&&(B=B.responseEnd,x+=se*(B<N?1:(N-Q)/(B-Q)))}if(--h,l+=8*(b+x)/(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 p1=null,g1=null;function mg(i){return i.nodeType===9?i:i.ownerDocument}function GO(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 VO(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 m1(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 v1=null;function a$(){var i=window.event;return i&&i.type==="popstate"?i===v1?!1:(v1=i,!0):(v1=null,!1)}var KO=typeof setTimeout=="function"?setTimeout:void 0,l$=typeof clearTimeout=="function"?clearTimeout:void 0,YO=typeof Promise=="function"?Promise:void 0,u$=typeof queueMicrotask=="function"?queueMicrotask:typeof YO<"u"?function(i){return YO.resolve(null).then(i).catch(c$)}:KO;function c$(i){setTimeout(function(){throw i})}function sa(i){return i==="head"}function ZO(i,l){var d=l,h=0;do{var v=d.nextSibling;if(i.removeChild(d),v&&v.nodeType===8)if(d=v.data,d==="/$"||d==="/&"){if(h===0){i.removeChild(v),Vu(l);return}h--}else if(d==="$"||d==="$?"||d==="$~"||d==="$!"||d==="&")h++;else if(d==="html")af(i.ownerDocument.documentElement);else if(d==="head"){d=i.ownerDocument.head,af(d);for(var b=d.firstChild;b;){var x=b.nextSibling,N=b.nodeName;b[Li]||N==="SCRIPT"||N==="STYLE"||N==="LINK"&&b.rel.toLowerCase()==="stylesheet"||d.removeChild(b),b=x}}else d==="body"&&af(i.ownerDocument.body);d=v}while(d);Vu(l)}function XO(i,l){var d=i;i=0;do{var h=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||""),h&&h.nodeType===8)if(d=h.data,d==="/$"){if(i===0)break;i--}else d!=="$"&&d!=="$?"&&d!=="$~"&&d!=="$!"||i++;d=h}while(d)}function y1(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":y1(d),Sd(d);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(d.rel.toLowerCase()==="stylesheet")continue}i.removeChild(d)}}function d$(i,l,d,h){for(;i.nodeType===1;){var v=d;if(i.nodeName.toLowerCase()!==l.toLowerCase()){if(!h&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(h){if(!i[Li])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 f$(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 QO(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 b1(i){return i.data==="$?"||i.data==="$~"}function S1(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function h$(i,l){var d=i.ownerDocument;if(i.data==="$~")i._reactRetry=l;else if(i.data!=="$?"||d.readyState!=="loading")l();else{var h=function(){l(),d.removeEventListener("DOMContentLoaded",h)};d.addEventListener("DOMContentLoaded",h),i._reactRetry=h}}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 E1=null;function JO(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 eN(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 tN(i,l,d){switch(l=mg(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 af(i){for(var l=i.attributes;l.length;)i.removeAttributeNode(l[0]);Sd(i)}var Cs=new Map,nN=new Set;function vg(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var Qo=ee.d;ee.d={f:p$,r:g$,D:m$,C:v$,L:y$,m:b$,X:E$,S:S$,M:C$};function p$(){var i=Qo.f(),l=lg();return i||l}function g$(i){var l=Fi(i);l!==null&&l.tag===5&&l.type==="form"?b2(l):Qo.r(i)}var qu=typeof document>"u"?null:document;function rN(i,l,d){var h=qu;if(h&&typeof l=="string"&&l){var v=Ir(l);v='link[rel="'+i+'"][href="'+v+'"]',typeof d=="string"&&(v+='[crossorigin="'+d+'"]'),nN.has(v)||(nN.add(v),i={rel:i,crossOrigin:d,href:l},h.querySelector(v)===null&&(l=h.createElement("link"),Xn(l,"link",i),an(l),h.head.appendChild(l)))}}function m$(i){Qo.D(i),rN("dns-prefetch",i,null)}function v$(i,l){Qo.C(i,l),rN("preconnect",i,l)}function y$(i,l,d){Qo.L(i,l,d);var h=qu;if(h&&i&&l){var v='link[rel="preload"][as="'+Ir(l)+'"]';l==="image"&&d&&d.imageSrcSet?(v+='[imagesrcset="'+Ir(d.imageSrcSet)+'"]',typeof d.imageSizes=="string"&&(v+='[imagesizes="'+Ir(d.imageSizes)+'"]')):v+='[href="'+Ir(i)+'"]';var b=v;switch(l){case"style":b=Wu(i);break;case"script":b=Gu(i)}Cs.has(b)||(i=g({rel:"preload",href:l==="image"&&d&&d.imageSrcSet?void 0:i,as:l},d),Cs.set(b,i),h.querySelector(v)!==null||l==="style"&&h.querySelector(lf(b))||l==="script"&&h.querySelector(uf(b))||(l=h.createElement("link"),Xn(l,"link",i),an(l),h.head.appendChild(l)))}}function b$(i,l){Qo.m(i,l);var d=qu;if(d&&i){var h=l&&typeof l.as=="string"?l.as:"script",v='link[rel="modulepreload"][as="'+Ir(h)+'"][href="'+Ir(i)+'"]',b=v;switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":b=Gu(i)}if(!Cs.has(b)&&(i=g({rel:"modulepreload",href:i},l),Cs.set(b,i),d.querySelector(v)===null)){switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(d.querySelector(uf(b)))return}h=d.createElement("link"),Xn(h,"link",i),an(h),d.head.appendChild(h)}}}function S$(i,l,d){Qo.S(i,l,d);var h=qu;if(h&&i){var v=mr(h).hoistableStyles,b=Wu(i);l=l||"default";var x=v.get(b);if(!x){var N={loading:0,preload:null};if(x=h.querySelector(lf(b)))N.loading=5;else{i=g({rel:"stylesheet",href:i,"data-precedence":l},d),(d=Cs.get(b))&&C1(i,d);var B=x=h.createElement("link");an(B),Xn(B,"link",i),B._p=new Promise(function(Q,se){B.onload=Q,B.onerror=se}),B.addEventListener("load",function(){N.loading|=1}),B.addEventListener("error",function(){N.loading|=2}),N.loading|=4,yg(x,l,h)}x={type:"stylesheet",instance:x,count:1,state:N},v.set(b,x)}}}function E$(i,l){Qo.X(i,l);var d=qu;if(d&&i){var h=mr(d).hoistableScripts,v=Gu(i),b=h.get(v);b||(b=d.querySelector(uf(v)),b||(i=g({src:i,async:!0},l),(l=Cs.get(v))&&w1(i,l),b=d.createElement("script"),an(b),Xn(b,"link",i),d.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},h.set(v,b))}}function C$(i,l){Qo.M(i,l);var d=qu;if(d&&i){var h=mr(d).hoistableScripts,v=Gu(i),b=h.get(v);b||(b=d.querySelector(uf(v)),b||(i=g({src:i,async:!0,type:"module"},l),(l=Cs.get(v))&&w1(i,l),b=d.createElement("script"),an(b),Xn(b,"link",i),d.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},h.set(v,b))}}function sN(i,l,d,h){var v=(v=he.current)?vg(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=Wu(d.href),d=mr(v).hoistableStyles,h=d.get(l),h||(h={type:"style",instance:null,count:0,state:null},d.set(l,h)),h):{type:"void",instance:null,count:0,state:null};case"link":if(d.rel==="stylesheet"&&typeof d.href=="string"&&typeof d.precedence=="string"){i=Wu(d.href);var b=mr(v).hoistableStyles,x=b.get(i);if(x||(v=v.ownerDocument||v,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},b.set(i,x),(b=v.querySelector(lf(i)))&&!b._p&&(x.instance=b,x.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||w$(v,i,d,x.state))),l&&h===null)throw Error(r(528,""));return x}if(l&&h!==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=Gu(d),d=mr(v).hoistableScripts,h=d.get(l),h||(h={type:"script",instance:null,count:0,state:null},d.set(l,h)),h):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,i))}}function Wu(i){return'href="'+Ir(i)+'"'}function lf(i){return'link[rel="stylesheet"]['+i+"]"}function oN(i){return g({},i,{"data-precedence":i.precedence,precedence:null})}function w$(i,l,d,h){i.querySelector('link[rel="preload"][as="style"]['+l+"]")?h.loading=1:(l=i.createElement("link"),h.preload=l,l.addEventListener("load",function(){return h.loading|=1}),l.addEventListener("error",function(){return h.loading|=2}),Xn(l,"link",d),an(l),i.head.appendChild(l))}function Gu(i){return'[src="'+Ir(i)+'"]'}function uf(i){return"script[async]"+i}function iN(i,l,d){if(l.count++,l.instance===null)switch(l.type){case"style":var h=i.querySelector('style[data-href~="'+Ir(d.href)+'"]');if(h)return l.instance=h,an(h),h;var v=g({},d,{"data-href":d.href,"data-precedence":d.precedence,href:null,precedence:null});return h=(i.ownerDocument||i).createElement("style"),an(h),Xn(h,"style",v),yg(h,d.precedence,i),l.instance=h;case"stylesheet":v=Wu(d.href);var b=i.querySelector(lf(v));if(b)return l.state.loading|=4,l.instance=b,an(b),b;h=oN(d),(v=Cs.get(v))&&C1(h,v),b=(i.ownerDocument||i).createElement("link"),an(b);var x=b;return x._p=new Promise(function(N,B){x.onload=N,x.onerror=B}),Xn(b,"link",h),l.state.loading|=4,yg(b,d.precedence,i),l.instance=b;case"script":return b=Gu(d.src),(v=i.querySelector(uf(b)))?(l.instance=v,an(v),v):(h=d,(v=Cs.get(b))&&(h=g({},d),w1(h,v)),i=i.ownerDocument||i,v=i.createElement("script"),an(v),Xn(v,"link",h),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&&(h=l.instance,l.state.loading|=4,yg(h,d.precedence,i));return l.instance}function yg(i,l,d){for(var h=d.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),v=h.length?h[h.length-1]:null,b=v,x=0;x<h.length;x++){var N=h[x];if(N.dataset.precedence===l)b=N;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 C1(i,l){i.crossOrigin==null&&(i.crossOrigin=l.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=l.referrerPolicy),i.title==null&&(i.title=l.title)}function w1(i,l){i.crossOrigin==null&&(i.crossOrigin=l.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=l.referrerPolicy),i.integrity==null&&(i.integrity=l.integrity)}var bg=null;function aN(i,l,d){if(bg===null){var h=new Map,v=bg=new Map;v.set(d,h)}else v=bg,h=v.get(d),h||(h=new Map,v.set(d,h));if(h.has(i))return h;for(h.set(i,null),d=d.getElementsByTagName(i),v=0;v<d.length;v++){var b=d[v];if(!(b[Li]||b[In]||i==="link"&&b.getAttribute("rel")==="stylesheet")&&b.namespaceURI!=="http://www.w3.org/2000/svg"){var x=b.getAttribute(l)||"";x=i+x;var N=h.get(x);N?N.push(b):h.set(x,[b])}}return h}function lN(i,l,d){i=i.ownerDocument||i,i.head.insertBefore(d,l==="title"?i.querySelector("head > title"):null)}function x$(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 uN(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function _$(i,l,d,h){if(d.type==="stylesheet"&&(typeof h.media!="string"||matchMedia(h.media).matches!==!1)&&(d.state.loading&4)===0){if(d.instance===null){var v=Wu(h.href),b=l.querySelector(lf(v));if(b){l=b._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(i.count++,i=Sg.bind(i),l.then(i,i)),d.state.loading|=4,d.instance=b,an(b);return}b=l.ownerDocument||l,h=oN(h),(v=Cs.get(v))&&C1(h,v),b=b.createElement("link"),an(b);var x=b;x._p=new Promise(function(N,B){x.onload=N,x.onerror=B}),Xn(b,"link",h),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=Sg.bind(i),l.addEventListener("load",d),l.addEventListener("error",d))}}var x1=0;function A$(i,l){return i.stylesheets&&i.count===0&&Cg(i,i.stylesheets),0<i.count||0<i.imgCount?function(d){var h=setTimeout(function(){if(i.stylesheets&&Cg(i,i.stylesheets),i.unsuspend){var b=i.unsuspend;i.unsuspend=null,b()}},6e4+l);0<i.imgBytes&&x1===0&&(x1=62500*i$());var v=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&Cg(i,i.stylesheets),i.unsuspend)){var b=i.unsuspend;i.unsuspend=null,b()}},(i.imgBytes>x1?50:800)+l);return i.unsuspend=d,function(){i.unsuspend=null,clearTimeout(h),clearTimeout(v)}}:null}function Sg(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Cg(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var Eg=null;function Cg(i,l){i.stylesheets=null,i.unsuspend!==null&&(i.count++,Eg=new Map,l.forEach(T$,i),Eg=null,Sg.call(i))}function T$(i,l){if(!(l.state.loading&4)){var d=Eg.get(i);if(d)var h=d.get(null);else{d=new Map,Eg.set(i,d);for(var v=i.querySelectorAll("link[data-precedence],style[data-precedence]"),b=0;b<v.length;b++){var x=v[b];(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")&&(d.set(x.dataset.precedence,x),h=x)}h&&d.set(null,h)}v=l.instance,x=v.getAttribute("data-precedence"),b=d.get(x)||h,b===h&&d.set(null,v),d.set(x,v),this.count++,h=Sg.bind(this),v.addEventListener("load",h),v.addEventListener("error",h),b?b.parentNode.insertBefore(v,b.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(v,i.firstChild)),l.state.loading|=4}}var cf={$$typeof:T,Provider:null,Consumer:null,_currentValue:fe,_currentValue2:fe,_threadCount:0};function R$(i,l,d,h,v,b,x,N,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=so(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=so(0),this.hiddenUpdates=so(null),this.identifierPrefix=h,this.onUncaughtError=v,this.onCaughtError=b,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=B,this.incompleteTransitions=new Map}function cN(i,l,d,h,v,b,x,N,B,Q,se,ae){return i=new R$(i,l,d,x,B,Q,se,ae,N),l=1,b===!0&&(l|=24),b=Xr(3,null,null,l),i.current=b,b.stateNode=i,l=r0(),l.refCount++,i.pooledCache=l,l.refCount++,b.memoizedState={element:h,isDehydrated:d,cache:l},a0(b),i}function dN(i){return i?(i=wu,i):wu}function fN(i,l,d,h,v,b){v=dN(v),h.context===null?h.context=v:h.pendingContext=v,h=Vi(l),h.payload={element:d},b=b===void 0?null:b,b!==null&&(h.callback=b),d=Ki(i,h,l),d!==null&&(Dr(d,i,l),Bd(d,i,l))}function hN(i,l){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var d=i.retryLane;i.retryLane=d!==0&&d<l?d:l}}function _1(i,l){hN(i,l),(i=i.alternate)&&hN(i,l)}function pN(i){if(i.tag===13||i.tag===31){var l=nl(i,67108864);l!==null&&Dr(l,i,67108864),_1(i,67108864)}}function gN(i){if(i.tag===13||i.tag===31){var l=ns();l=pu(l);var d=nl(i,l);d!==null&&Dr(d,i,l),_1(i,l)}}var wg=!0;function I$(i,l,d,h){var v=$.T;$.T=null;var b=ee.p;try{ee.p=2,A1(i,l,d,h)}finally{ee.p=b,$.T=v}}function O$(i,l,d,h){var v=$.T;$.T=null;var b=ee.p;try{ee.p=8,A1(i,l,d,h)}finally{ee.p=b,$.T=v}}function A1(i,l,d,h){if(wg){var v=T1(h);if(v===null)f1(i,l,h,xg,d),vN(i,h);else if(M$(v,i,l,d,h))h.stopPropagation();else if(vN(i,h),l&4&&-1<N$.indexOf(i)){for(;v!==null;){var b=Fi(v);if(b!==null)switch(b.tag){case 3:if(b=b.stateNode,b.current.memoizedState.isDehydrated){var x=ks(b.pendingLanes);if(x!==0){var N=b;for(N.pendingLanes|=2,N.entangledLanes|=2;x;){var B=1<<31-Vn(x);N.entanglements[1]|=B,x&=~B}fo(b),(Rt&6)===0&&(ig=Gt()+500,rf(0))}}break;case 31:case 13:N=nl(b,2),N!==null&&Dr(N,b,2),lg(),_1(b,2)}if(b=T1(h),b===null&&f1(i,l,h,xg,d),b===v)break;v=b}v!==null&&h.stopPropagation()}else f1(i,l,h,null,d)}}function T1(i){return i=On(i),R1(i)}var xg=null;function R1(i){if(xg=null,i=Ui(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 xg=i,null}function mN(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 vn:return 2;case Rr:return 8;case no:case hd:return 32;case ko:return 268435456;default:return 32}default:return 32}}var I1=!1,oa=null,ia=null,aa=null,df=new Map,ff=new Map,la=[],N$="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 vN(i,l){switch(i){case"focusin":case"focusout":oa=null;break;case"dragenter":case"dragleave":ia=null;break;case"mouseover":case"mouseout":aa=null;break;case"pointerover":case"pointerout":df.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":ff.delete(l.pointerId)}}function hf(i,l,d,h,v,b){return i===null||i.nativeEvent!==b?(i={blockedOn:l,domEventName:d,eventSystemFlags:h,nativeEvent:b,targetContainers:[v]},l!==null&&(l=Fi(l),l!==null&&pN(l)),i):(i.eventSystemFlags|=h,l=i.targetContainers,v!==null&&l.indexOf(v)===-1&&l.push(v),i)}function M$(i,l,d,h,v){switch(l){case"focusin":return oa=hf(oa,i,l,d,h,v),!0;case"dragenter":return ia=hf(ia,i,l,d,h,v),!0;case"mouseover":return aa=hf(aa,i,l,d,h,v),!0;case"pointerover":var b=v.pointerId;return df.set(b,hf(df.get(b)||null,i,l,d,h,v)),!0;case"gotpointercapture":return b=v.pointerId,ff.set(b,hf(ff.get(b)||null,i,l,d,h,v)),!0}return!1}function yN(i){var l=Ui(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,Di(i.priority,function(){gN(d)});return}}else if(l===31){if(l=u(d),l!==null){i.blockedOn=l,Di(i.priority,function(){gN(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 _g(i){if(i.blockedOn!==null)return!1;for(var l=i.targetContainers;0<l.length;){var d=T1(i.nativeEvent);if(d===null){d=i.nativeEvent;var h=new d.constructor(d.type,d);yr=h,d.target.dispatchEvent(h),yr=null}else return l=Fi(d),l!==null&&pN(l),i.blockedOn=d,!1;l.shift()}return!0}function bN(i,l,d){_g(i)&&d.delete(l)}function P$(){I1=!1,oa!==null&&_g(oa)&&(oa=null),ia!==null&&_g(ia)&&(ia=null),aa!==null&&_g(aa)&&(aa=null),df.forEach(bN),ff.forEach(bN)}function Ag(i,l){i.blockedOn===l&&(i.blockedOn=null,I1||(I1=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,P$)))}var Tg=null;function SN(i){Tg!==i&&(Tg=i,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Tg===i&&(Tg=null);for(var l=0;l<i.length;l+=3){var d=i[l],h=i[l+1],v=i[l+2];if(typeof h!="function"){if(R1(h||d)===null)continue;break}var b=Fi(d);b!==null&&(i.splice(l,3),l-=3,T0(b,{pending:!0,data:v,method:d.method,action:h},h,v))}}))}function Vu(i){function l(B){return Ag(B,i)}oa!==null&&Ag(oa,i),ia!==null&&Ag(ia,i),aa!==null&&Ag(aa,i),df.forEach(l),ff.forEach(l);for(var d=0;d<la.length;d++){var h=la[d];h.blockedOn===i&&(h.blockedOn=null)}for(;0<la.length&&(d=la[0],d.blockedOn===null);)yN(d),d.blockedOn===null&&la.shift();if(d=(i.ownerDocument||i).$$reactFormReplay,d!=null)for(h=0;h<d.length;h+=3){var v=d[h],b=d[h+1],x=v[nt]||null;if(typeof b=="function")x||SN(d);else if(x){var N=null;if(b&&b.hasAttribute("formAction")){if(v=b,x=b[nt]||null)N=x.formAction;else if(R1(v)!==null)continue}else N=x.action;typeof N=="function"?d[h+1]=N:(d.splice(h,3),h-=3),SN(d)}}}function EN(){function i(b){b.canIntercept&&b.info==="react-transition"&&b.intercept({handler:function(){return new Promise(function(x){return v=x})},focusReset:"manual",scroll:"manual"})}function l(){v!==null&&(v(),v=null),h||setTimeout(d,20)}function d(){if(!h&&!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 h=!1,v=null;return navigation.addEventListener("navigate",i),navigation.addEventListener("navigatesuccess",l),navigation.addEventListener("navigateerror",l),setTimeout(d,100),function(){h=!0,navigation.removeEventListener("navigate",i),navigation.removeEventListener("navigatesuccess",l),navigation.removeEventListener("navigateerror",l),v!==null&&(v(),v=null)}}}function O1(i){this._internalRoot=i}Rg.prototype.render=O1.prototype.render=function(i){var l=this._internalRoot;if(l===null)throw Error(r(409));var d=l.current,h=ns();fN(d,h,i,l,null,null)},Rg.prototype.unmount=O1.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var l=i.containerInfo;fN(i.current,2,null,i,null,null),lg(),l[Yr]=null}};function Rg(i){this._internalRoot=i}Rg.prototype.unstable_scheduleHydration=function(i){if(i){var l=mp();i={blockedOn:null,target:i,priority:l};for(var d=0;d<la.length&&l!==0&&l<la[d].priority;d++);la.splice(d,0,i),d===0&&yN(i)}};var CN=e.version;if(CN!=="19.2.7")throw Error(r(527,CN,"19.2.7"));ee.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?p(i):null,i=i===null?null:i.stateNode,i};var k$={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:$,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ig=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ig.isDisabled&&Ig.supportsFiber)try{Mi=Ig.inject(k$),ar=Ig}catch{}}return Mf.createRoot=function(i,l){if(!s(i))throw Error(r(299));var d=!1,h="",v=I2,b=O2,x=N2;return l!=null&&(l.unstable_strictMode===!0&&(d=!0),l.identifierPrefix!==void 0&&(h=l.identifierPrefix),l.onUncaughtError!==void 0&&(v=l.onUncaughtError),l.onCaughtError!==void 0&&(b=l.onCaughtError),l.onRecoverableError!==void 0&&(x=l.onRecoverableError)),l=cN(i,1,!1,null,null,d,h,null,v,b,x,EN),i[Yr]=l.current,d1(i),new O1(l)},Mf.hydrateRoot=function(i,l,d){if(!s(i))throw Error(r(299));var h=!1,v="",b=I2,x=O2,N=N2,B=null;return d!=null&&(d.unstable_strictMode===!0&&(h=!0),d.identifierPrefix!==void 0&&(v=d.identifierPrefix),d.onUncaughtError!==void 0&&(b=d.onUncaughtError),d.onCaughtError!==void 0&&(x=d.onCaughtError),d.onRecoverableError!==void 0&&(N=d.onRecoverableError),d.formState!==void 0&&(B=d.formState)),l=cN(i,1,!0,l,d??null,h,v,B,b,x,N,EN),l.context=dN(null),d=l.current,h=ns(),h=pu(h),v=Vi(h),v.callback=null,Ki(d,v,h),d=h,l.current.lanes=d,Do(l,d),fo(l),i[Yr]=l.current,d1(i),new Rg(l)},Mf.version="19.2.7",Mf}var c4;function Ope(){if(c4)return qw.exports;c4=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(),qw.exports=Ipe(),qw.exports}var Npe=Ope();const Mpe={bodySerializer:t=>JSON.stringify(t,(e,n)=>typeof n=="bigint"?n.toString():n)},Ppe=({onRequest:t,onSseError:e,onSseEvent:n,responseTransformer:r,responseValidator:s,sseDefaultRetryDelay:o,sseMaxRetryAttempts:a,sseMaxRetryDelay:u,sseSleepFn:c,url:f,...p})=>{let g;const m=c??(E=>new Promise(C=>setTimeout(C,E)));return{stream:async function*(){let E=o??3e3,C=0;const w=p.signal??new AbortController().signal;for(;!w.aborted;){C++;const _=p.headers instanceof Headers?p.headers:new Headers(p.headers);g!==void 0&&_.set("Last-Event-ID",g);try{const T={redirect:"follow",...p,body:p.serializedBody,headers:_,signal:w};let R=new Request(f,T);t&&(R=await t(f,T));const O=await(p.fetch??globalThis.fetch)(R);if(!O.ok)throw new Error(`SSE failed: ${O.status} ${O.statusText}`);if(!O.body)throw new Error("No body in SSE response");const I=O.body.pipeThrough(new TextDecoderStream).getReader();let P="";const k=()=>{try{I.cancel()}catch{}};w.addEventListener("abort",k);try{for(;;){const{done:H,value:F}=await I.read();if(H)break;P+=F,P=P.replace(/\r\n/g,`
225
225
  `).replace(/\r/g,`
226
226
  `);const j=P.split(`
227
227
 
228
228
  `);P=j.pop()??"";for(const W of j){const Y=W.split(`
229
229
  `),ne=[];let $;for(const de of Y)if(de.startsWith("data:"))ne.push(de.replace(/^data:\s*/,""));else if(de.startsWith("event:"))$=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 ee,fe=!1;if(ne.length){const de=ne.join(`
230
- `);try{ee=JSON.parse(de),fe=!0}catch{ee=de}}fe&&(s&&await s(ee),r&&(ee=await r(ee))),n?.({data:ee,event:$,id:g,retry:E}),ne.length&&(yield ee)}}}finally{w.removeEventListener("abort",k),I.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)}}}()}},kpe=t=>{switch(t){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},Dpe=t=>{switch(t){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},Lpe=t=>{switch(t){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},_7=({allowReserved:t,explode:e,name:n,style:r,value:s})=>{if(!e){const u=(t?s:s.map(c=>encodeURIComponent(c))).join(Dpe(r));switch(r){case"label":return`.${u}`;case"matrix":return`;${n}=${u}`;case"simple":return u;default:return`${n}=${u}`}}const o=kpe(r),a=s.map(u=>r==="label"||r==="simple"?t?u:encodeURIComponent(u):ub({allowReserved:t,name:n,value:u})).join(o);return r==="label"||r==="matrix"?o+a:a},ub=({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)}`},A7=({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(([p,g])=>{c=[...c,p,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=Lpe(r),u=Object.entries(s).map(([c,f])=>ub({allowReserved:t,name:r==="deepObject"?`${n}[${c}]`:c,value:f})).join(a);return r==="label"||r==="matrix"?a+u:u},Upe=/\{[^{}]+\}/g,Fpe=({path:t,url:e})=>{let n=e;const r=e.match(Upe);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,_7({explode:o,name:a,style:u,value:c}));continue}if(typeof c=="object"){n=n.replace(s,A7({explode:o,name:a,style:u,value:c,valueOnly:!0}));continue}if(u==="matrix"){n=n.replace(s,`;${ub({name:a,value:c})}`);continue}const f=encodeURIComponent(u==="label"?`.${c}`:c);n=n.replace(s,f)}return n},zpe=({baseUrl:t,path:e,query:n,querySerializer:r,url:s})=>{const o=s.startsWith("/")?s:`/${s}`;let a=(t??"")+o;e&&(a=Fpe({path:e,url:a}));let u=n?r(n):"";return u.startsWith("?")&&(u=u.substring(1)),u&&(a+=`?${u}`),a};function dU(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 jpe=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},T7=({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=_7({allowReserved:u.allowReserved,explode:!0,name:o,style:"form",value:a,...u.array});c&&s.push(c)}else if(typeof a=="object"){const c=A7({allowReserved:u.allowReserved,explode:!0,name:o,style:"deepObject",value:a,...u.object});c&&s.push(c)}else{const c=ub({allowReserved:u.allowReserved,name:o,value:a});c&&s.push(c)}}return s.join("&")},Bpe=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"}},Hpe=(t,e)=>e?!!(t.headers.has(e)||t.query?.[e]||t.headers.get("Cookie")?.includes(`${e}=`)):!1,$pe=async({security:t,...e})=>{for(const n of t){if(Hpe(e,n.name))continue;const r=await jpe(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}}},fU=t=>zpe({baseUrl:t.baseUrl,path:t.path,query:t.query,querySerializer:typeof t.querySerializer=="function"?t.querySerializer:T7(t.querySerializer),url:t.url}),hU=(t,e)=>{const n={...t,...e};return n.baseUrl?.endsWith("/")&&(n.baseUrl=n.baseUrl.substring(0,n.baseUrl.length-1)),n.headers=R7(t.headers,e.headers),n},qpe=t=>{const e=[];return t.forEach((n,r)=>{e.push([r,n])}),e},R7=(...t)=>{const e=new Headers;for(const n of t){if(!n)continue;const r=n instanceof Headers?qpe(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 Vw{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 Wpe=()=>({error:new Vw,request:new Vw,response:new Vw}),Gpe=T7({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),Vpe={"Content-Type":"application/json"},I7=(t={})=>({...Mpe,headers:Vpe,parseAs:"auto",querySerializer:Gpe,...t}),Kpe=(t={})=>{let e=hU(I7(),t);const n=()=>({...e}),r=f=>(e=hU(e,f),n()),s=Wpe(),o=async f=>{const p={...e,...f,fetch:f.fetch??e.fetch??globalThis.fetch,headers:R7(e.headers,f.headers),serializedBody:void 0};p.security&&await $pe({...p,security:p.security}),p.requestValidator&&await p.requestValidator(p),p.body!==void 0&&p.bodySerializer&&(p.serializedBody=p.bodySerializer(p.body)),(p.body===void 0||p.serializedBody==="")&&p.headers.delete("Content-Type");const g=fU(p);return{opts:p,url:g}},a=async f=>{const{opts:p,url:g}=await o(f),m={redirect:"follow",...p,body:dU(p)};let y=new Request(g,m);for(const M of s.request.fns)M&&(y=await M(y,p));const S=p.fetch;let E;try{E=await S(y)}catch(M){let O=M;for(const I of s.error.fns)I&&(O=await I(M,void 0,y,p));if(O=O||{},p.throwOnError)throw O;return p.responseStyle==="data"?void 0:{error:O,request:y,response:void 0}}for(const M of s.response.fns)M&&(E=await M(E,y,p));const C={request:y,response:E};if(E.ok){const M=(p.parseAs==="auto"?Bpe(E.headers.get("Content-Type")):p.parseAs)??"json";if(E.status===204||E.headers.get("Content-Length")==="0"){let I;switch(M){case"arrayBuffer":case"blob":case"text":I=await E[M]();break;case"formData":I=new FormData;break;case"stream":I=E.body;break;default:I={};break}return p.responseStyle==="data"?I:{data:I,...C}}let O;switch(M){case"arrayBuffer":case"blob":case"formData":case"text":O=await E[M]();break;case"json":{const I=await E.text();O=I?JSON.parse(I):{};break}case"stream":return p.responseStyle==="data"?E.body:{data:E.body,...C}}return M==="json"&&(p.responseValidator&&await p.responseValidator(O),p.responseTransformer&&(O=await p.responseTransformer(O))),p.responseStyle==="data"?O:{data:O,...C}}const w=await E.text();let _;try{_=JSON.parse(w)}catch{}const T=_??w;let R=T;for(const M of s.error.fns)M&&(R=await M(T,E,y,p));if(R=R||{},p.throwOnError)throw R;return p.responseStyle==="data"?void 0:{error:R,...C}},u=f=>p=>a({...p,method:f}),c=f=>async p=>{const{opts:g,url:m}=await o(p);return Ppe({...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:dU(g),url:m})};return{buildUrl:fU,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")}},Ze=Kpe(I7({baseUrl:"https://api.remit.example.com"}));let pU=!1;const Ype=t=>{pU||(Ze.interceptors.request.use(async e=>{const n=await t.getToken();return n&&e.headers.set("Authorization",`Bearer ${n}`),e}),pU=!0)},Zpe=({children:t})=>D.jsx(D.Fragment,{children:t}),Xpe={configure:()=>{},getToken:async()=>null,resetToken:()=>{},Shell:Zpe,Account:({fallback:t=null})=>D.jsx(D.Fragment,{children:t})},O7=A.createContext(Xpe),Qpe=O7.Provider,lAe=()=>A.useContext(O7),Jpe=(t,e)=>{G8(t,e.meta)&&zl(t)},ege=(t,e,n,r)=>{G8(t,r.meta)&&zl(t)},C_=t=>new TextEncoder().encode(t),N7={},w_={};for(let t=0;t<256;t++){let e=t.toString(16).toLowerCase();e.length===1&&(e=`0${e}`),N7[t]=e,w_[e]=t}function tge(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 w_)e[n/2]=w_[r];else throw new Error(`Cannot decode unrecognized sequence ${r} as hexadecimal`)}return e}function kl(t){let e="";for(let n=0;n<t.byteLength;n++)e+=N7[t[n]];return e}const Oh=t=>t instanceof Uint8Array?t:typeof t=="string"?C_(t):ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(t),nge=t=>typeof ArrayBuffer=="function"&&t instanceof ArrayBuffer||Object.prototype.toString.call(t)==="[object ArrayBuffer]";class Ei{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 Ei({...e,headers:{...e.headers}});return n.query&&(n.query=rge(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 Ei.clone(this)}}function rge(t){return Object.keys(t).reduce((e,n)=>{const r=t[n];return{...e,[n]:Array.isArray(r)?[...r]:r}},{})}class Nh{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 gU=t=>{if(typeof t=="function")return t;const e=Promise.resolve(t);return()=>e},Dl=t=>encodeURIComponent(t).replace(/[!'()*]/g,sge),sge=t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`;function nR(t){const e=[];for(let n of Object.keys(t).sort()){const r=t[n];if(n=Dl(n),Array.isArray(r))for(let s=0,o=r.length;s<o;s++)e.push(`${n}=${Dl(r[s])}`);else{let s=n;(r||typeof r=="string")&&(s+=`=${Dl(r)}`),e.push(s)}}return e.join("&")}const am="[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 am;const s=r.split(`
231
- `);if(s.length<4)return am;const o=s[3];if(!o)return am;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",p=(n=c[c.length-1])!==null&&n!==void 0?n:"unknown";return`[aws-rum-web:${f}.${p}]`}return`[aws-rum-web:${u}]`}}catch{}return am}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 mU=2048,vU=.2,oge=()=>typeof CompressionStream<"u",ige=async t=>{const e=new Blob([t]).stream().pipeThrough(new CompressionStream("gzip"));return new Uint8Array(await new Response(e).arrayBuffer())},age=async t=>{const e=t.length;if(be.debug(`compressIfBeneficial called, payload size: ${e}B`),!oge())return be.debug("CompressionStream not supported, skipping compression"),{body:t,compressed:!1};if(e<mU)return be.debug(`Payload size ${e}B below threshold ${mU}B, skipping compression`),{body:t,compressed:!1};const n=await ige(t),r=1-n.length/e;return r>=vU?(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 ${vU*100}%, skipping`),{body:t,compressed:!1})},lge="POST",uge="application/json",cge="text/plain;charset=UTF-8",dge=64e3;class fge{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 age(a):{body:a,compressed:!1},p=await this.getHttpRequestOptions(r,c,uge,f);let g=new Ei(p);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>dge)throw new Error("Payload too large for sendBeacon");const o=await this.getHttpRequestOptions(r,s,cge,!1);let a=new Ei(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:lge,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(hge(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},hge=t=>({id:t.id,timestamp:Math.round(t.timestamp.getTime()/1e3),type:t.type,metadata:t.metadata,details:t.details});class pge{handle(e){const n=this.sendBeacon(e);return new Promise((r,s)=>{n?r({response:new Nh({statusCode:200})}):s()})}updateHttpClientConfig(e,n){}httpHandlerConfigs(){return{}}sendBeacon(e){let n=e.path;if(e.query){const o=nR(e.query);o&&(n+=`?${o}`)}const{port:r}=e,s=`${e.protocol}//${e.hostname}${r?`:${r}`:""}${n}`;return navigator.sendBeacon(s,e.body)}}const gge=(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 mge=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=nR(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 p=new Request(u,f),g=[this.fetchFunction.apply(window,[p]).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 Nh({headers:S,statusCode:m.status,body:m.body})}:m.blob().then(C=>({response:new Nh({headers:S,statusCode:m.status,body:C})}))}),gge(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{}}},lm;const vge=new Uint8Array(16);function yge(){if(!lm&&(lm=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!lm))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return lm(vge)}const Jn=[];for(let t=0;t<256;++t)Jn.push((t+256).toString(16).slice(1));function bge(t,e=0){return Jn[t[e+0]]+Jn[t[e+1]]+Jn[t[e+2]]+Jn[t[e+3]]+"-"+Jn[t[e+4]]+Jn[t[e+5]]+"-"+Jn[t[e+6]]+Jn[t[e+7]]+"-"+Jn[t[e+8]]+Jn[t[e+9]]+"-"+Jn[t[e+10]]+Jn[t[e+11]]+Jn[t[e+12]]+Jn[t[e+13]]+Jn[t[e+14]]+Jn[t[e+15]]}const Sge=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),bU={randomUUID:Sge};function oh(t,e,n){if(bU.randomUUID&&!t)return bU.randomUUID();t=t||{};const r=t.random||(t.rng||yge)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,bge(r)}const rR=t=>{if(crypto)return crypto.getRandomValues(t);if(msCrypto)return msCrypto.getRandomValues(t);throw new Error("No crypto library found.")},M7=[];for(let t=0;t<256;t++)M7[t]=(t+256).toString(16).substr(1);const cb="X-Amzn-Trace-Id",db="traceparent",Ege=2,Cge=32,wge=16,xge=4,P7=(t,e)=>Array.isArray(e)?e.some(n=>n.test(t)):e,k7={logicalServiceName:"rum.aws.amazon.com",urlsToInclude:[/.*/],urlsToExclude:[/cognito\-identity\.([^\.]*\.)?amazonaws\.com/,/sts\.([^\.]*\.)?amazonaws\.com/],stackTraceLength:200,recordAllRequests:!1,addXRayTraceIdHeader:!1},_ge=t=>200<=t&&t<300,D7=t=>Math.floor(t/100)===4,sR=t=>Math.floor(t/100)===5,oR=t=>t===429,L7=(t,e)=>{const n=e.urlsToInclude.some(s=>s.test(t)),r=e.urlsToExclude.some(s=>s.test(t));return n&&!r},Ec=()=>Date.now()/1e3,Age=(t,e,n)=>{const r={request:{}};return r.request.method=e?.method?e.method:"GET",r.request.traced=n,r.request.url=av(t),r},U7=(t,e,n,r)=>({version:"1.0.0",name:t,origin:"AWS::RUM::AppMonitor",id:j7(),start_time:e,trace_id:n?Mge():Nge(),end_time:void 0,subsegments:[],in_progress:!1}),F7=(t,e,n)=>{const r={id:j7(),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},z7=t=>{try{return t.hostname?t.hostname:t.url?new URL(t.url).hostname:new URL(t.toString()).hostname}catch{return window.location.hostname}},Tge=(t,e,n,r)=>{t.headers||(t.headers={}),r?t.headers[db]=aR(e,n):t.headers[cb]=iR(e,n)},Rge=(t,e,n,r)=>{r?t.set(db,aR(e,n)):t.set(cb,iR(e,n))},iR=(t,e)=>"Root="+t+";Parent="+e+";Sampled=1",aR=(t,e)=>"00-"+t+"-"+e+"-01",Ige=t=>t?.length===xge&&t[0].length===Ege&&t[1].length===Cge&&t[2].length===wge&&(t[3]==="00"||t[3]==="01"),Oge=(t,e)=>{var n,r;const s={};if(t)if(e){const o=(n=t.get(db))===null||n===void 0?void 0:n.split("-");o&&Ige(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},av=t=>t.url?t.url:t.toString(),Nge=()=>`1-${Pge()}-${kge()}`,Mge=()=>{const t=new Uint8Array(16);return rR(t),`${lR(t)}`},j7=()=>{const t=new Uint8Array(8);return rR(t),lR(t)},Pge=()=>Math.floor(Date.now()/1e3).toString(16),kge=()=>{const t=new Uint8Array(12);return rR(t),lR(t)},lR=t=>{let e="";for(let n=0;n<t.length;n++)e+=M7[t[n]];return e};class Dge{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(_ge(r.response.statusCode))return r;throw r.response.statusCode}catch(r){if(typeof r=="number"&&!oR(r)&&!sR(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 Fc="cwr_c",Dv="cwr_i",Lv="cwr_s",Uv="cwr_u",Lge=3e4,Uge="arw-module",SU="CWR: Cannot dispatch; no AWS credentials.";class Fge{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 p=c&&this.signingConfigFactory?this.signingConfigFactory(c,u):void 0;return new fge({fetchRequestHandler:new Dge(new mge({fetchFunction:this.config.fetchFunction}),this.config.retries),beaconRequestHandler:new pge,endpoint:a,region:u,credentials:c,headers:this.headers,compressionStrategy:f},p)},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(SU)),sendBeacon:()=>Promise.reject(new Error(SU))}:this.rum=this.buildClient(this.endpoint,this.region,void 0,this.config.compressionStrategy),this.credentialStorageKey=this.config.cookieAttributes.unique?`${Fc}_${e}`:Fc,this.identityStorageKey=this.config.cookieAttributes.unique?`${Dv}_${e}`:Dv}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:oh(),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 B7={};for(let t=0;t<256;t++){let e=t.toString(16).toLowerCase();e.length===1&&(e=`0${e}`),B7[t]=e}function zge(t){let e="";for(let n=0;n<t.byteLength;n++)e+=B7[t[n]];return e}class jge{format(e){const n=[];for(const o of Object.keys(e)){const a=C_(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=C_(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 p=new Uint8Array(9);return p[0]=xs.timestamp,p.set(uR.fromNumber(e.value.valueOf()).bytes,1),p;case"uuid":if(!Bge.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const g=new Uint8Array(17);return g[0]=xs.uuid,g.set(tge(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 Bge=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class uR{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&&EU(n),new uR(n)}valueOf(){const e=this.bytes.slice(0),n=e[0]&128;return n&&EU(e),parseInt(kl(e),16)*(n?-1:1)}toString(){return String(this.valueOf())}}function EU(t){for(let e=0;e<8;e++)t[e]^=255;for(let e=7;e>-1&&(t[e]++,t[e]===0);e--);}const Hge="X-Amz-Algorithm",$ge="X-Amz-Credential",H7="X-Amz-Date",qge="X-Amz-SignedHeaders",Wge="X-Amz-Expires",$7="X-Amz-Signature",q7="X-Amz-Security-Token",W7="authorization",G7=H7.toLowerCase(),Gge="date",Vge=[W7,G7,Gge],Kge=$7.toLowerCase(),x_="x-amz-content-sha256",Yge=q7.toLowerCase(),Zge={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},Xge=/^proxy-/,Qge=/^sec-/,Kw="AWS4-HMAC-SHA256",Jge="AWS4-HMAC-SHA256-PAYLOAD",eme="UNSIGNED-PAYLOAD",tme=50,V7="aws4_request",nme=3600*24*7,rme=({query:t={}})=>{const e=[],n={};for(const r of Object.keys(t)){if(r.toLowerCase()===Kge)continue;const s=Dl(r);e.push(s);const o=t[r];typeof o=="string"?n[s]=`${s}=${Dl(o)}`:Array.isArray(o)&&(n[s]=o.slice(0).reduce((a,u)=>a.concat([`${s}=${Dl(u)}`]),[]).sort().join("&"))}return e.sort().map(r=>n[r]).filter(r=>r).join("&")},sme=t=>ome(t).toISOString().replace(/\.\d{3}Z$/,"Z"),ome=t=>typeof t=="number"?new Date(t*1e3):typeof t=="string"?Number(t)?new Date(Number(t)*1e3):new Date(t):t;class ime{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=gU(r),this.credentialProvider=gU(n)}createCanonicalRequest(e,n,r){const s=Object.keys(n).sort();return`${e.method}
230
+ `);try{ee=JSON.parse(de),fe=!0}catch{ee=de}}fe&&(s&&await s(ee),r&&(ee=await r(ee))),n?.({data:ee,event:$,id:g,retry:E}),ne.length&&(yield ee)}}}finally{w.removeEventListener("abort",k),I.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)}}}()}},kpe=t=>{switch(t){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},Dpe=t=>{switch(t){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},Lpe=t=>{switch(t){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},_7=({allowReserved:t,explode:e,name:n,style:r,value:s})=>{if(!e){const u=(t?s:s.map(c=>encodeURIComponent(c))).join(Dpe(r));switch(r){case"label":return`.${u}`;case"matrix":return`;${n}=${u}`;case"simple":return u;default:return`${n}=${u}`}}const o=kpe(r),a=s.map(u=>r==="label"||r==="simple"?t?u:encodeURIComponent(u):ub({allowReserved:t,name:n,value:u})).join(o);return r==="label"||r==="matrix"?o+a:a},ub=({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)}`},A7=({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(([p,g])=>{c=[...c,p,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=Lpe(r),u=Object.entries(s).map(([c,f])=>ub({allowReserved:t,name:r==="deepObject"?`${n}[${c}]`:c,value:f})).join(a);return r==="label"||r==="matrix"?a+u:u},Upe=/\{[^{}]+\}/g,Fpe=({path:t,url:e})=>{let n=e;const r=e.match(Upe);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,_7({explode:o,name:a,style:u,value:c}));continue}if(typeof c=="object"){n=n.replace(s,A7({explode:o,name:a,style:u,value:c,valueOnly:!0}));continue}if(u==="matrix"){n=n.replace(s,`;${ub({name:a,value:c})}`);continue}const f=encodeURIComponent(u==="label"?`.${c}`:c);n=n.replace(s,f)}return n},zpe=({baseUrl:t,path:e,query:n,querySerializer:r,url:s})=>{const o=s.startsWith("/")?s:`/${s}`;let a=(t??"")+o;e&&(a=Fpe({path:e,url:a}));let u=n?r(n):"";return u.startsWith("?")&&(u=u.substring(1)),u&&(a+=`?${u}`),a};function d4(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 jpe=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},T7=({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=_7({allowReserved:u.allowReserved,explode:!0,name:o,style:"form",value:a,...u.array});c&&s.push(c)}else if(typeof a=="object"){const c=A7({allowReserved:u.allowReserved,explode:!0,name:o,style:"deepObject",value:a,...u.object});c&&s.push(c)}else{const c=ub({allowReserved:u.allowReserved,name:o,value:a});c&&s.push(c)}}return s.join("&")},Bpe=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"}},Hpe=(t,e)=>e?!!(t.headers.has(e)||t.query?.[e]||t.headers.get("Cookie")?.includes(`${e}=`)):!1,$pe=async({security:t,...e})=>{for(const n of t){if(Hpe(e,n.name))continue;const r=await jpe(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}}},f4=t=>zpe({baseUrl:t.baseUrl,path:t.path,query:t.query,querySerializer:typeof t.querySerializer=="function"?t.querySerializer:T7(t.querySerializer),url:t.url}),h4=(t,e)=>{const n={...t,...e};return n.baseUrl?.endsWith("/")&&(n.baseUrl=n.baseUrl.substring(0,n.baseUrl.length-1)),n.headers=R7(t.headers,e.headers),n},qpe=t=>{const e=[];return t.forEach((n,r)=>{e.push([r,n])}),e},R7=(...t)=>{const e=new Headers;for(const n of t){if(!n)continue;const r=n instanceof Headers?qpe(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 Vw{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 Wpe=()=>({error:new Vw,request:new Vw,response:new Vw}),Gpe=T7({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),Vpe={"Content-Type":"application/json"},I7=(t={})=>({...Mpe,headers:Vpe,parseAs:"auto",querySerializer:Gpe,...t}),Kpe=(t={})=>{let e=h4(I7(),t);const n=()=>({...e}),r=f=>(e=h4(e,f),n()),s=Wpe(),o=async f=>{const p={...e,...f,fetch:f.fetch??e.fetch??globalThis.fetch,headers:R7(e.headers,f.headers),serializedBody:void 0};p.security&&await $pe({...p,security:p.security}),p.requestValidator&&await p.requestValidator(p),p.body!==void 0&&p.bodySerializer&&(p.serializedBody=p.bodySerializer(p.body)),(p.body===void 0||p.serializedBody==="")&&p.headers.delete("Content-Type");const g=f4(p);return{opts:p,url:g}},a=async f=>{const{opts:p,url:g}=await o(f),m={redirect:"follow",...p,body:d4(p)};let y=new Request(g,m);for(const M of s.request.fns)M&&(y=await M(y,p));const S=p.fetch;let E;try{E=await S(y)}catch(M){let O=M;for(const I of s.error.fns)I&&(O=await I(M,void 0,y,p));if(O=O||{},p.throwOnError)throw O;return p.responseStyle==="data"?void 0:{error:O,request:y,response:void 0}}for(const M of s.response.fns)M&&(E=await M(E,y,p));const C={request:y,response:E};if(E.ok){const M=(p.parseAs==="auto"?Bpe(E.headers.get("Content-Type")):p.parseAs)??"json";if(E.status===204||E.headers.get("Content-Length")==="0"){let I;switch(M){case"arrayBuffer":case"blob":case"text":I=await E[M]();break;case"formData":I=new FormData;break;case"stream":I=E.body;break;default:I={};break}return p.responseStyle==="data"?I:{data:I,...C}}let O;switch(M){case"arrayBuffer":case"blob":case"formData":case"text":O=await E[M]();break;case"json":{const I=await E.text();O=I?JSON.parse(I):{};break}case"stream":return p.responseStyle==="data"?E.body:{data:E.body,...C}}return M==="json"&&(p.responseValidator&&await p.responseValidator(O),p.responseTransformer&&(O=await p.responseTransformer(O))),p.responseStyle==="data"?O:{data:O,...C}}const w=await E.text();let _;try{_=JSON.parse(w)}catch{}const T=_??w;let R=T;for(const M of s.error.fns)M&&(R=await M(T,E,y,p));if(R=R||{},p.throwOnError)throw R;return p.responseStyle==="data"?void 0:{error:R,...C}},u=f=>p=>a({...p,method:f}),c=f=>async p=>{const{opts:g,url:m}=await o(p);return Ppe({...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:d4(g),url:m})};return{buildUrl:f4,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")}},Ze=Kpe(I7({baseUrl:"https://api.remit.example.com"}));let p4=!1;const Ype=t=>{p4||(Ze.interceptors.request.use(async e=>{const n=await t.getToken();return n&&e.headers.set("Authorization",`Bearer ${n}`),e}),p4=!0)},Zpe=({children:t})=>D.jsx(D.Fragment,{children:t}),Xpe={configure:()=>{},getToken:async()=>null,resetToken:()=>{},Shell:Zpe,Account:({fallback:t=null})=>D.jsx(D.Fragment,{children:t})},O7=A.createContext(Xpe),Qpe=O7.Provider,lAe=()=>A.useContext(O7),Jpe=(t,e)=>{G8(t,e.meta)&&zl(t)},ege=(t,e,n,r)=>{G8(t,r.meta)&&zl(t)},C_=t=>new TextEncoder().encode(t),N7={},w_={};for(let t=0;t<256;t++){let e=t.toString(16).toLowerCase();e.length===1&&(e=`0${e}`),N7[t]=e,w_[e]=t}function tge(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 w_)e[n/2]=w_[r];else throw new Error(`Cannot decode unrecognized sequence ${r} as hexadecimal`)}return e}function kl(t){let e="";for(let n=0;n<t.byteLength;n++)e+=N7[t[n]];return e}const Oh=t=>t instanceof Uint8Array?t:typeof t=="string"?C_(t):ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(t),nge=t=>typeof ArrayBuffer=="function"&&t instanceof ArrayBuffer||Object.prototype.toString.call(t)==="[object ArrayBuffer]";class Ei{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 Ei({...e,headers:{...e.headers}});return n.query&&(n.query=rge(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 Ei.clone(this)}}function rge(t){return Object.keys(t).reduce((e,n)=>{const r=t[n];return{...e,[n]:Array.isArray(r)?[...r]:r}},{})}class Nh{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 g4=t=>{if(typeof t=="function")return t;const e=Promise.resolve(t);return()=>e},Dl=t=>encodeURIComponent(t).replace(/[!'()*]/g,sge),sge=t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`;function nR(t){const e=[];for(let n of Object.keys(t).sort()){const r=t[n];if(n=Dl(n),Array.isArray(r))for(let s=0,o=r.length;s<o;s++)e.push(`${n}=${Dl(r[s])}`);else{let s=n;(r||typeof r=="string")&&(s+=`=${Dl(r)}`),e.push(s)}}return e.join("&")}const am="[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 am;const s=r.split(`
231
+ `);if(s.length<4)return am;const o=s[3];if(!o)return am;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",p=(n=c[c.length-1])!==null&&n!==void 0?n:"unknown";return`[aws-rum-web:${f}.${p}]`}return`[aws-rum-web:${u}]`}}catch{}return am}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 m4=2048,v4=.2,oge=()=>typeof CompressionStream<"u",ige=async t=>{const e=new Blob([t]).stream().pipeThrough(new CompressionStream("gzip"));return new Uint8Array(await new Response(e).arrayBuffer())},age=async t=>{const e=t.length;if(be.debug(`compressIfBeneficial called, payload size: ${e}B`),!oge())return be.debug("CompressionStream not supported, skipping compression"),{body:t,compressed:!1};if(e<m4)return be.debug(`Payload size ${e}B below threshold ${m4}B, skipping compression`),{body:t,compressed:!1};const n=await ige(t),r=1-n.length/e;return r>=v4?(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 ${v4*100}%, skipping`),{body:t,compressed:!1})},lge="POST",uge="application/json",cge="text/plain;charset=UTF-8",dge=64e3;class fge{constructor(e,n){this.sendFetch=async r=>{var s,o;const a=JSON.stringify(y4(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 age(a):{body:a,compressed:!1},p=await this.getHttpRequestOptions(r,c,uge,f);let g=new Ei(p);return this.signing&&(g=await this.signing.sign(g)),this.config.fetchRequestHandler.handle(g)},this.sendBeacon=async r=>{const s=JSON.stringify(y4(r));if(s.length>dge)throw new Error("Payload too large for sendBeacon");const o=await this.getHttpRequestOptions(r,s,cge,!1);let a=new Ei(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:lge,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 y4=t=>{const e=[];t.RumEvents.forEach(r=>e.push(hge(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},hge=t=>({id:t.id,timestamp:Math.round(t.timestamp.getTime()/1e3),type:t.type,metadata:t.metadata,details:t.details});class pge{handle(e){const n=this.sendBeacon(e);return new Promise((r,s)=>{n?r({response:new Nh({statusCode:200})}):s()})}updateHttpClientConfig(e,n){}httpHandlerConfigs(){return{}}sendBeacon(e){let n=e.path;if(e.query){const o=nR(e.query);o&&(n+=`?${o}`)}const{port:r}=e,s=`${e.protocol}//${e.hostname}${r?`:${r}`:""}${n}`;return navigator.sendBeacon(s,e.body)}}const gge=(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 mge=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=nR(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 p=new Request(u,f),g=[this.fetchFunction.apply(window,[p]).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 Nh({headers:S,statusCode:m.status,body:m.body})}:m.blob().then(C=>({response:new Nh({headers:S,statusCode:m.status,body:C})}))}),gge(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{}}},lm;const vge=new Uint8Array(16);function yge(){if(!lm&&(lm=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!lm))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return lm(vge)}const Jn=[];for(let t=0;t<256;++t)Jn.push((t+256).toString(16).slice(1));function bge(t,e=0){return Jn[t[e+0]]+Jn[t[e+1]]+Jn[t[e+2]]+Jn[t[e+3]]+"-"+Jn[t[e+4]]+Jn[t[e+5]]+"-"+Jn[t[e+6]]+Jn[t[e+7]]+"-"+Jn[t[e+8]]+Jn[t[e+9]]+"-"+Jn[t[e+10]]+Jn[t[e+11]]+Jn[t[e+12]]+Jn[t[e+13]]+Jn[t[e+14]]+Jn[t[e+15]]}const Sge=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),b4={randomUUID:Sge};function oh(t,e,n){if(b4.randomUUID&&!t)return b4.randomUUID();t=t||{};const r=t.random||(t.rng||yge)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,bge(r)}const rR=t=>{if(crypto)return crypto.getRandomValues(t);if(msCrypto)return msCrypto.getRandomValues(t);throw new Error("No crypto library found.")},M7=[];for(let t=0;t<256;t++)M7[t]=(t+256).toString(16).substr(1);const cb="X-Amzn-Trace-Id",db="traceparent",Ege=2,Cge=32,wge=16,xge=4,P7=(t,e)=>Array.isArray(e)?e.some(n=>n.test(t)):e,k7={logicalServiceName:"rum.aws.amazon.com",urlsToInclude:[/.*/],urlsToExclude:[/cognito\-identity\.([^\.]*\.)?amazonaws\.com/,/sts\.([^\.]*\.)?amazonaws\.com/],stackTraceLength:200,recordAllRequests:!1,addXRayTraceIdHeader:!1},_ge=t=>200<=t&&t<300,D7=t=>Math.floor(t/100)===4,sR=t=>Math.floor(t/100)===5,oR=t=>t===429,L7=(t,e)=>{const n=e.urlsToInclude.some(s=>s.test(t)),r=e.urlsToExclude.some(s=>s.test(t));return n&&!r},Ec=()=>Date.now()/1e3,Age=(t,e,n)=>{const r={request:{}};return r.request.method=e?.method?e.method:"GET",r.request.traced=n,r.request.url=av(t),r},U7=(t,e,n,r)=>({version:"1.0.0",name:t,origin:"AWS::RUM::AppMonitor",id:j7(),start_time:e,trace_id:n?Mge():Nge(),end_time:void 0,subsegments:[],in_progress:!1}),F7=(t,e,n)=>{const r={id:j7(),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},z7=t=>{try{return t.hostname?t.hostname:t.url?new URL(t.url).hostname:new URL(t.toString()).hostname}catch{return window.location.hostname}},Tge=(t,e,n,r)=>{t.headers||(t.headers={}),r?t.headers[db]=aR(e,n):t.headers[cb]=iR(e,n)},Rge=(t,e,n,r)=>{r?t.set(db,aR(e,n)):t.set(cb,iR(e,n))},iR=(t,e)=>"Root="+t+";Parent="+e+";Sampled=1",aR=(t,e)=>"00-"+t+"-"+e+"-01",Ige=t=>t?.length===xge&&t[0].length===Ege&&t[1].length===Cge&&t[2].length===wge&&(t[3]==="00"||t[3]==="01"),Oge=(t,e)=>{var n,r;const s={};if(t)if(e){const o=(n=t.get(db))===null||n===void 0?void 0:n.split("-");o&&Ige(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},av=t=>t.url?t.url:t.toString(),Nge=()=>`1-${Pge()}-${kge()}`,Mge=()=>{const t=new Uint8Array(16);return rR(t),`${lR(t)}`},j7=()=>{const t=new Uint8Array(8);return rR(t),lR(t)},Pge=()=>Math.floor(Date.now()/1e3).toString(16),kge=()=>{const t=new Uint8Array(12);return rR(t),lR(t)},lR=t=>{let e="";for(let n=0;n<t.length;n++)e+=M7[t[n]];return e};class Dge{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(_ge(r.response.statusCode))return r;throw r.response.statusCode}catch(r){if(typeof r=="number"&&!oR(r)&&!sR(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 Fc="cwr_c",Dv="cwr_i",Lv="cwr_s",Uv="cwr_u",Lge=3e4,Uge="arw-module",S4="CWR: Cannot dispatch; no AWS credentials.";class Fge{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 p=c&&this.signingConfigFactory?this.signingConfigFactory(c,u):void 0;return new fge({fetchRequestHandler:new Dge(new mge({fetchFunction:this.config.fetchFunction}),this.config.retries),beaconRequestHandler:new pge,endpoint:a,region:u,credentials:c,headers:this.headers,compressionStrategy:f},p)},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(S4)),sendBeacon:()=>Promise.reject(new Error(S4))}:this.rum=this.buildClient(this.endpoint,this.region,void 0,this.config.compressionStrategy),this.credentialStorageKey=this.config.cookieAttributes.unique?`${Fc}_${e}`:Fc,this.identityStorageKey=this.config.cookieAttributes.unique?`${Dv}_${e}`:Dv}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:oh(),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 B7={};for(let t=0;t<256;t++){let e=t.toString(16).toLowerCase();e.length===1&&(e=`0${e}`),B7[t]=e}function zge(t){let e="";for(let n=0;n<t.byteLength;n++)e+=B7[t[n]];return e}class jge{format(e){const n=[];for(const o of Object.keys(e)){const a=C_(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=C_(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 p=new Uint8Array(9);return p[0]=xs.timestamp,p.set(uR.fromNumber(e.value.valueOf()).bytes,1),p;case"uuid":if(!Bge.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const g=new Uint8Array(17);return g[0]=xs.uuid,g.set(tge(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 Bge=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class uR{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&&E4(n),new uR(n)}valueOf(){const e=this.bytes.slice(0),n=e[0]&128;return n&&E4(e),parseInt(kl(e),16)*(n?-1:1)}toString(){return String(this.valueOf())}}function E4(t){for(let e=0;e<8;e++)t[e]^=255;for(let e=7;e>-1&&(t[e]++,t[e]===0);e--);}const Hge="X-Amz-Algorithm",$ge="X-Amz-Credential",H7="X-Amz-Date",qge="X-Amz-SignedHeaders",Wge="X-Amz-Expires",$7="X-Amz-Signature",q7="X-Amz-Security-Token",W7="authorization",G7=H7.toLowerCase(),Gge="date",Vge=[W7,G7,Gge],Kge=$7.toLowerCase(),x_="x-amz-content-sha256",Yge=q7.toLowerCase(),Zge={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},Xge=/^proxy-/,Qge=/^sec-/,Kw="AWS4-HMAC-SHA256",Jge="AWS4-HMAC-SHA256-PAYLOAD",eme="UNSIGNED-PAYLOAD",tme=50,V7="aws4_request",nme=3600*24*7,rme=({query:t={}})=>{const e=[],n={};for(const r of Object.keys(t)){if(r.toLowerCase()===Kge)continue;const s=Dl(r);e.push(s);const o=t[r];typeof o=="string"?n[s]=`${s}=${Dl(o)}`:Array.isArray(o)&&(n[s]=o.slice(0).reduce((a,u)=>a.concat([`${s}=${Dl(u)}`]),[]).sort().join("&"))}return e.sort().map(r=>n[r]).filter(r=>r).join("&")},sme=t=>ome(t).toISOString().replace(/\.\d{3}Z$/,"Z"),ome=t=>typeof t=="number"?new Date(t*1e3):typeof t=="string"?Number(t)?new Date(Number(t)*1e3):new Date(t):t;class ime{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=g4(r),this.credentialProvider=g4(n)}createCanonicalRequest(e,n,r){const s=Object.keys(n).sort();return`${e.method}
232
232
  ${this.getCanonicalPath(e)}
233
233
  ${rme(e)}
234
234
  ${s.map(o=>`${o}:${n[o]}`).join(`
@@ -238,58 +238,58 @@ ${s.join(";")}
238
238
  ${r}`}async createStringToSign(e,n,r,s){const o=new this.sha256;o.update(Oh(r));const a=await o.digest();return`${s}
239
239
  ${e}
240
240
  ${n}
241
- ${kl(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 Dl(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=sme(e).replace(/[-:]/g,"");return{longDate:n,shortDate:n.slice(0,8)}}getCanonicalHeaderList(e){return Object.keys(e).sort().join(";")}}const um={},Yw=[],Zw=(t,e,n)=>`${t}/${e}/${n}/${V7}`,ame=async(t,e,n,r,s)=>{const o=await CU(t,e.secretAccessKey,e.accessKeyId),a=`${n}:${r}:${s}:${kl(o)}:${e.sessionToken}`;if(a in um)return um[a];for(Yw.push(a);Yw.length>tme;)delete um[Yw.shift()];let u=`AWS4${e.secretAccessKey}`;for(const c of[n,r,s,V7])u=await CU(t,u,c);return um[a]=u},CU=(t,e,n)=>{const r=new t(e);return r.update(Oh(n)),r.digest()},wU=({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 Zge||e?.has(o)||Xge.test(o)||Qge.test(o))&&(!n||n&&!n.has(o))||(r[o]=t[s].trim().replace(/\s+/g," "))}return r},Xw=async({headers:t,body:e},n)=>{for(const r of Object.keys(t))if(r.toLowerCase()===x_)return t[r];if(e==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof e=="string"||ArrayBuffer.isView(e)||nge(e)){const r=new n;return r.update(Oh(e)),kl(await r.digest())}return eme},lme=(t,e)=>{t=t.toLowerCase();for(const n of Object.keys(e))if(t===n.toLowerCase())return!0;return!1},ume=(t,e={})=>{const{headers:n,query:r={}}=Ei.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}},xU=t=>{t=Ei.clone(t);for(const e of Object.keys(t.headers))Vge.indexOf(e.toLowerCase())>-1&&delete t.headers[e];return t};class cme extends ime{headerFormatter=new jge;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:p}=n,g=await this.credentialProvider();this.validateResolvedCredentials(g);const m=f??await this.regionProvider(),{longDate:y,shortDate:S}=this.formatDate(r);if(s>nme)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const E=Zw(S,m,p??this.service),C=ume(xU(e),{unhoistableHeaders:a,hoistableHeaders:c});g.sessionToken&&(C.query[q7]=g.sessionToken),C.query[Hge]=Kw,C.query[$ge]=`${g.accessKeyId}/${E}`,C.query[H7]=y,C.query[Wge]=s.toString(10);const w=wU(C,o,u);return C.query[qge]=this.getCanonicalHeaderList(w),C.query[$7]=await this.getSignature(y,E,this.getSigningKey(g,m,S,p),this.createCanonicalRequest(C,w,await Xw(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:p}=this.formatDate(r),g=Zw(f,c,a??this.service),m=await Xw({headers:{},body:n},this.sha256),y=new this.sha256;y.update(e);const S=kl(await y.digest()),E=[Jge,p,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(Oh(e)),kl(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=xU(e),{longDate:p,shortDate:g}=this.formatDate(n),m=Zw(g,c,a??this.service);f.headers[G7]=p,u.sessionToken&&(f.headers[Yge]=u.sessionToken);const y=await Xw(f,this.sha256);!lme(x_,f.headers)&&this.applyChecksum&&(f.headers[x_]=y);const S=wU(f,s,r),E=await this.getSignature(p,m,this.getSigningKey(u,c,g,a),this.createCanonicalRequest(f,S,y));return f.headers[W7]=`${Kw} 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,Kw),a=new this.sha256(await r);return a.update(Oh(o)),kl(await a.digest())}getSigningKey(e,n,r,s){return ame(this.sha256,e,r,n,s||this.service)}}const dme="rum",fme={expiresIn:60},hme=(t,e)=>{const n=new cme({applyChecksum:!0,credentials:t,region:e,service:dme,uriEscapePath:!0,sha256:Ul});return{sign:async r=>await n.sign(r),presign:async r=>await n.presign(r,fme),hashAndEncode:async r=>{const s=new Ul;return s.update(r),zge(await s.digest()).toLowerCase()}}};function _U(t,e){return new Request(t,e)}function pme(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 Qw={supported:void 0};class fb{config;configProvider;static create(e){return typeof e?.handle=="function"?e:new fb(e)}constructor(e){typeof e=="function"?this.configProvider=e().then(n=>n||{}):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),Qw.supported===void 0&&(Qw.supported=typeof Request<"u"&&"keepalive"in _U("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 _=AU(n);return Promise.reject(_)}let u=e.path;const c=nR(e.query||{});c&&(u+=`?${c}`),e.fragment&&(u+=`#${e.fragment}`);let f="";if(e.username!=null||e.password!=null){const _=e.username??"",T=e.password??"";f=`${_}:${T}@`}const{port:p,method:g}=e,m=`${e.protocol}//${f}${e.hostname}${p?`:${p}`:""}${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),Qw.supported&&(S.keepalive=o),typeof this.config.requestInit=="function"&&Object.assign(S,this.config.requestInit(e));let E=()=>{};const C=_U(m,S),w=[fetch(C).then(_=>{const T=_.headers,R={};for(const O of T.entries())R[O[0]]=O[1];return _.body!=null?{response:new Nh({headers:R,reason:_.statusText,statusCode:_.status,body:_.body})}:_.blob().then(O=>({response:new Nh({headers:R,reason:_.statusText,statusCode:_.status,body:O})}))}),pme(s)];return n&&w.push(new Promise((_,T)=>{const R=()=>{const M=AU(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 AU(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 Jw=async t=>{const{value:e}=await t.body.getReader().read();return JSON.parse(String.fromCharCode.apply(null,e))},gme=async t=>{const{value:e}=await t.body.getReader().read();return String.fromCharCode.apply(null,e)},mme="POST",vme="application/x-www-form-urlencoded",yme="https:",bme="AssumeRoleWithWebIdentity",Sme="2011-06-15";class Eme{constructor(e){this.assumeRoleWithWebIdentity=async n=>{try{const r=Object.assign(Object.assign({},n),{Action:bme,Version:Sme}),s=new URLSearchParams(Object.entries(r)).toString(),o=new Ei({method:mme,headers:{"content-type":vme,host:this.hostname},protocol:yme,hostname:this.hostname,body:s}),{response:a}=await this.fetchRequestHandler.handle(o),u=await gme(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 Cme="POST",wme="application/x-amz-json-1.1",xme="https:",_me="AWSCognitoIdentityService.GetId",Ame="AWSCognitoIdentityService.GetOpenIdToken",Tme="AWSCognitoIdentityService.GetCredentialsForIdentity";class Rme{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(_me,a),c=await Jw((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(Ame,s),{response:a}=await this.fetchRequestHandler.handle(o);return this.validateOpenIdTokenResponse(await Jw(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(Tme,s),{response:a}=await this.fetchRequestHandler.handle(o),{AccessKeyId:u,Expiration:c,SecretKey:f,SessionToken:p}=this.validateCredenentialsResponse(await Jw(a));return{accessKeyId:u,secretAccessKey:f,sessionToken:p,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 Ei({method:Cme,headers:{"content-type":wme,"x-amz-target":r},protocol:xme,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?`${Dv}_${e.applicationId}`:Dv}}class K7{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 Rme({fetchRequestHandler:new fb,region:r,clientConfig:e,applicationId:n}),this.credentialStorageKey=this.config.cookieAttributes.unique?`${Fc}_${n}`:Fc}renewCredentials(){if(!this.credentials||!this.credentials.expiration)return!0;const e=new Date(this.credentials.expiration.getTime()-Lge);return new Date>e}}class Ime extends K7{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 Eme({fetchRequestHandler:new fb,region:r})}}class Ome extends K7{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",Nme="com.amazonaws.rum",Fv=`${hs}.http_event`,Y7=`${hs}.xray_trace_event`,Mme=`${hs}.largest_contentful_paint_event`,Pme=`${hs}.first_input_delay_event`,kme=`${hs}.cumulative_layout_shift_event`,Dme=`${hs}.interaction_to_next_paint_event`,__=`${hs}.performance_navigation_event`,Z7=`${hs}.performance_resource_event`,Lme=`${hs}.dom_event`,Ume=`${hs}.js_error_event`,Fme=`${hs}.page_view_event`,A_=`${hs}.session_start_event`,TU=`${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=Nme;class zme{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 RU=(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},jme=(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},IU=t=>{const e=document.cookie.split("; ");for(const n of e){const r=n.split("=");if(r[0]===t)return r[1]}return""};var ih;(function(t){t.Path="PATH",t.Hash="HASH",t.PathAndHash="PATH_AND_HASH"})(ih||(ih={}));const Bme=()=>{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"}},cm="00000000-0000-0000-0000-000000000000",Hme="desktop",$me="web";class qme{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?`${Lv}_${this.appMonitorDetails.id}`:Lv,this.session={sessionId:cm,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===cm?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(A_,{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:cm}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||oh(),this.createOrRenewUserCookie(e,this.userExpiry)):this.userId=oh()}createOrRenewSessionCookie(e,n){btoa&&RU(this.sessionCookieName,btoa(JSON.stringify(e)),this.config.cookieAttributes,void 0,n)}createOrRenewUserCookie(e,n){RU(Uv,e,this.config.cookieAttributes,void 0,n)}getUserIdCookie(){return IU(Uv)}getSessionFromCookie(){if(this.useCookies()){const e=IU(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:oh(),record:this.session.sessionId===cm?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(A_,{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=Bme();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:Hme,platformType:$me,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 Wme{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(Fme,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 Mh;(function(t){t.EVENT="event"})(Mh||(Mh={}));class X7{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 Gme="3.1.0",Vme=new Set(["pageId","parentPageId","interaction","pageTags","title"]),ex=(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")&&Vme.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 Kme{constructor(e,n,r=new X7){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!==A_&&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(Mh.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=ex(a,"event");let p={};if(this.eventMetadataHook)try{const y=Object.freeze(Object.assign({},c)),S=this.eventMetadataHook(s,o,y);S&&(p=ex(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),p),f),m={id:oh(),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 Wme(n,this.recordEvent),this.sessionManager=new qme(e,n,this.recordEvent,this.pageManager),this.installationMethod=n.client,this.applicationAttributes=Object.freeze(ex(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":Gme})}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 An;(function(t){t.OTHER="other",t.STYLESHEET="stylesheet",t.DOCUMENT="document",t.SCRIPT="script",t.IMAGE="image",t.FONT="font"})(An||(An={}));var ai;(function(t){t.IMG="img",t.IMAGE="image",t.INPUT="input",t.IFRAME="iframe",t.FRAME="frame",t.SCRIPT="script",t.CSS="css"})(ai||(ai={}));const OU=t=>[t.startTime,t.duration].join("#"),Yme=[{name:An.STYLESHEET,list:["css","less"]},{name:An.DOCUMENT,list:["htm","html","ts","doc","docx","pdf","xls","xlsx"]},{name:An.SCRIPT,list:["js"]},{name:An.IMAGE,list:["ai","bmp","gif","ico","jpeg","jpg","png","ps","psd","svg","tif","tiff"]},{name:An.FONT,list:["fnt","fon","otf","ttf","woff"]}],NU=(t,e)=>{let n=An.OTHER;if(t){const r=t.substring(t.lastIndexOf("/")+1),s=r.substring(r.lastIndexOf(".")+1).split(/[?#]/)[0];Yme.forEach(o=>{o.list.indexOf(s)>-1&&(n=o.name)})}if(e&&n===An.OTHER)switch(e){case ai.IMAGE:case ai.IMG:case ai.INPUT:n=An.IMAGE;break;case ai.IFRAME:case ai.FRAME:n=An.DOCUMENT;break;case ai.SCRIPT:n=An.SCRIPT;break;case ai.CSS:n=An.STYLESHEET;break}return n},Zme=()=>PerformanceObserver.supportedEntryTypes.includes("largest-contentful-paint"),Xme=/\/appmonitors\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/,Qme=(t,e)=>{try{return new URL(t).hostname===e&&Xme.test(t)}catch{return!1}},Q7="dom-event",Jme={interactionId:()=>"",enableMutationObserver:!1,events:[]};class cR extends Ns{constructor(e){super(Q7),this.enabled=!1,this.eventListenerMap=new Map,this.config=Object.assign(Object.assign({},Jme),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=cR.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(Lme,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 eve=t=>{const e=typeof t;return(e==="object"||e==="function")&&!!t},tve=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},nve=(t,e)=>{t.type!=="unhandledrejection"&&(t.type=e.toString()),t.message=e.toString()},rve=(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)},J7=t=>t!==Object(t)&&t!==void 0&&t!==null,dR=(t,e)=>{const n=tve(t),r=t.error;return eve(r)?rve(n,r,e):J7(r)&&nve(n,r),n},ez="js-error",sve={stackTraceLength:1e3,ignore:()=>!1};class ove extends Ns{constructor(e){super(ez),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({},sve),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(Ume,dR(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 ive=t=>t.entryType==="resource"&&(!/^https?:/.test(t.name)||/^(fetch|xmlhttprequest)$/.test(t.initiatorType)),fR={eventLimit:10,ignore:ive,recordAllTypes:[An.DOCUMENT,An.SCRIPT,An.STYLESHEET,An.FONT],sampleTypes:[An.IMAGE,An.OTHER],reportAllLCP:!1,reportAllCLS:!1,reportAllINP:!1},ave="navigation",rc="navigation",tx="load";class lve extends Ns{constructor(e){super(ave),this.eventListener=()=>{performance.getEntriesByType(rc).length===0?this.performanceNavigationEventHandlerTimingLevel1():new PerformanceObserver(r=>{r.getEntries().filter(s=>s.entryType===rc).filter(s=>!this.config.ignore(s)).forEach(s=>{this.performanceNavigationEventHandlerTimingLevel2(s)})}).observe({entryTypes:[rc]})},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(__,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(__,s)},this.config=Object.assign(Object.assign({},fR),e)}enable(){this.enabled||(this.enabled=!0,window.addEventListener(tx,this.eventListener))}disable(){this.enabled&&(this.enabled=!1,this.eventListener&&window.removeEventListener(tx,this.eventListener))}hasTheWindowLoadEventFired(){return window.performance&&window.performance.getEntriesByType(rc).length?!!window.performance.getEntriesByType(rc)[0].loadEventEnd:!1}onload(){this.enabled&&(this.hasTheWindowLoadEventFired()?window.performance.getEntriesByType(rc).filter(e=>!this.config.ignore(e)).forEach(e=>this.performanceNavigationEventHandlerTimingLevel2(e)):window.addEventListener(tx,this.eventListener))}}var nx,MU;function uve(){if(MU)return nx;MU=1;function t(c){return typeof c=="function"}var e=console.error.bind(console);function n(c,f,p){var g=!!c[f]&&c.propertyIsEnumerable(f);Object.defineProperty(c,f,{configurable:!0,enumerable:g,writable:!0,value:p})}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,p){if(!c||!c[f]){e("no original function "+f+" to wrap");return}if(!p){e("no wrapper function"),e(new Error().stack);return}if(!t(c[f])||!t(p)){e("original object and wrapper must be functions");return}var g=c[f],m=p(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,p){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,p)})})}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(p){f.forEach(function(g){a(p,g)})})}return r.wrap=s,r.massWrap=o,r.unwrap=a,r.massUnwrap=u,nx=r,nx}var zv=uve();const cve=qa(zv),PU=D5({__proto__:null,default:cve},[zv]);class hR 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=zv.wrap.bind(PU);for(const n of this.patches)e(n.nodule,n.name,n.wrapper())}unpatchAll(){const e=zv.unwrap.bind(PU);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 dve="page-view";class fve extends hR{constructor(){super(dve),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 ih.PathAndHash:return e&&n?e+n:e||n||"";case ih.Hash:return n||"";case ih.Path:default:return e||""}}}const hve="resource",rx="resource";class pve extends Ns{constructor(e){super(hve),this.performanceEntryHandler=n=>{this.recordPerformanceEntries(n.getEntries())},this.recordPerformanceEntries=n=>{n.forEach(r=>{if(r.entryType!==rx||this.config.ignore(r))return;const{name:s,initiatorType:o}=r,a=NU(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(!Qme(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:NU(n,s),transferSize:a};this.context.config.recordResourceUrl&&(c.targetUrl=n),this.context.record(Z7,c)}},this.config=Object.assign(Object.assign({},fR),e),this.eventCount=0,this.resourceObserver=new PerformanceObserver(this.performanceEntryHandler)}enable(){this.enabled||(this.enabled=!0,this.resourceObserver.observe({type:rx,buffered:!0}))}disable(){this.enabled&&(this.enabled=!1,this.resourceObserver.disconnect())}onload(){this.resourceObserver.observe({type:rx,buffered:!0})}}var T_,kU,hb=function(){var t=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(t&&t.responseStart>0&&t.responseStart<performance.now())return t},pR=function(t){if(document.readyState==="loading")return"loading";var e=hb();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"},gve=function(t){var e=t.nodeName;return t.nodeType===1?e.toLowerCase():e.toUpperCase().replace(/^#/,"")},pb=function(t,e){var n="";try{for(;t&&t.nodeType!==9;){var r=t,s=r.id?"#"+r.id:gve(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},tz=-1,mve=function(){return tz},dd=function(t){addEventListener("pageshow",(function(e){e.persisted&&(tz=e.timeStamp,t(e))}),!0)},gR=function(){var t=hb();return t&&t.activationStart||0},Io=function(t,e){var n=hb(),r="navigate";return mve()>=0?r="back-forward-cache":n&&(document.prerendering||gR()>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}},iu=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{}},Oo=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))}},mR=function(t){requestAnimationFrame((function(){return requestAnimationFrame((function(){return t()}))}))},ip=function(t){document.addEventListener("visibilitychange",(function(){document.visibilityState==="hidden"&&t()}))},gb=function(t){var e=!1;return function(){e||(t(),e=!0)}},Cc=-1,DU=function(){return document.visibilityState!=="hidden"||document.prerendering?1/0:0},jv=function(t){document.visibilityState==="hidden"&&Cc>-1&&(Cc=t.type==="visibilitychange"?t.timeStamp:0,vve())},LU=function(){addEventListener("visibilitychange",jv,!0),addEventListener("prerenderingchange",jv,!0)},vve=function(){removeEventListener("visibilitychange",jv,!0),removeEventListener("prerenderingchange",jv,!0)},vR=function(){return Cc<0&&(Cc=DU(),LU(),dd((function(){setTimeout((function(){Cc=DU(),LU()}),0)}))),{get firstHiddenTime(){return Cc}}},mb=function(t){document.prerendering?addEventListener("prerenderingchange",(function(){return t()}),!0):t()},UU=[1800,3e3],yve=function(t,e){e=e||{},mb((function(){var n,r=vR(),s=Io("FCP"),o=iu("paint",(function(a){a.forEach((function(u){u.name==="first-contentful-paint"&&(o.disconnect(),u.startTime<r.firstHiddenTime&&(s.value=Math.max(u.startTime-gR(),0),s.entries.push(u),n(!0)))}))}));o&&(n=Oo(t,s,UU,e.reportAllChanges),dd((function(a){s=Io("FCP"),n=Oo(t,s,UU,e.reportAllChanges),mR((function(){s.value=performance.now()-a.timeStamp,n(!0)}))})))}))},FU=[.1,.25],bve=function(t,e){(function(n,r){r=r||{},yve(gb((function(){var s,o=Io("CLS",0),a=0,u=[],c=function(p){p.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=iu("layout-shift",c);f&&(s=Oo(n,o,FU,r.reportAllChanges),ip((function(){c(f.takeRecords()),s(!0)})),dd((function(){a=0,o=Io("CLS",0),s=Oo(n,o,FU,r.reportAllChanges),mR((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,p){return f&&f.value>p.value?f:p}));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:pb(c.node),largestShiftTime:u.startTime,largestShiftValue:u.value,largestShiftSource:c,largestShiftEntry:u,loadState:pR(u.startTime)})}}return Object.assign(s,{attribution:a})})(n);t(r)}),e)},nz=0,sx=1/0,dm=0,Sve=function(t){t.forEach((function(e){e.interactionId&&(sx=Math.min(sx,e.interactionId),dm=Math.max(dm,e.interactionId),nz=dm?(dm-sx)/7+1:0)}))},rz=function(){return T_?nz:performance.interactionCount||0},Eve=function(){"interactionCount"in performance||T_||(T_=iu("event",Sve,{type:"event",buffered:!0,durationThreshold:0}))},Gs=[],ah=new Map,sz=0,Cve=function(){var t=Math.min(Gs.length-1,Math.floor((rz()-sz)/50));return Gs[t]},oz=[],wve=function(t){if(oz.forEach((function(s){return s(t)})),t.interactionId||t.entryType==="first-input"){var e=Gs[Gs.length-1],n=ah.get(t.interactionId);if(n||Gs.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]};ah.set(r.id,r),Gs.push(r)}Gs.sort((function(s,o){return o.latency-s.latency})),Gs.length>10&&Gs.splice(10).forEach((function(s){return ah.delete(s.id)}))}}},yR=function(t){var e=self.requestIdleCallback||self.setTimeout,n=-1;return t=gb(t),document.visibilityState==="hidden"?t():(n=e(t),ip(t)),n},zU=[200,500],xve=function(t,e){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(e=e||{},mb((function(){var n;Eve();var r,s=Io("INP"),o=function(u){yR((function(){u.forEach(wve);var c=Cve();c&&c.latency!==s.value&&(s.value=c.latency,s.entries=c.entries,r())}))},a=iu("event",o,{durationThreshold:(n=e.durationThreshold)!==null&&n!==void 0?n:40});r=Oo(t,s,zU,e.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),ip((function(){o(a.takeRecords()),r(!0)})),dd((function(){sz=rz(),Gs.length=0,ah.clear(),s=Io("INP"),r=Oo(t,s,zU,e.reportAllChanges)})))})))},Oc=[],xa=[],R_=0,bR=new WeakMap,Nc=new Map,I_=-1,_ve=function(t){Oc=Oc.concat(t),iz()},iz=function(){I_<0&&(I_=yR(Ave))},Ave=function(){Nc.size>10&&Nc.forEach((function(a,u){ah.has(u)||Nc.delete(u)}));var t=Gs.map((function(a){return bR.get(a.entries[0])})),e=xa.length-50;xa=xa.filter((function(a,u){return u>=e||t.includes(a)}));for(var n=new Set,r=0;r<xa.length;r++){var s=xa[r];lz(s.startTime,s.processingEnd).forEach((function(a){n.add(a)}))}var o=Oc.length-1-50;Oc=Oc.filter((function(a,u){return a.startTime>R_&&u>o||n.has(a)})),I_=-1};oz.push((function(t){t.interactionId&&t.target&&!Nc.has(t.interactionId)&&Nc.set(t.interactionId,t.target)}),(function(t){var e,n=t.startTime+t.duration;R_=Math.max(R_,t.processingEnd);for(var r=xa.length-1;r>=0;r--){var s=xa[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]},xa.push(e)),(t.interactionId||t.entryType==="first-input")&&bR.set(t,e),iz()}));var _a,lh,az,Bv,lz=function(t,e){for(var n,r=[],s=0;n=Oc[s];s++)if(!(n.startTime+n.duration<t)){if(n.startTime>e)break;r.push(n)}return r},Tve=function(t,e){kU||(kU=iu("long-animation-frame",_ve)),xve((function(n){var r=(function(s){var o=s.entries[0],a=bR.get(o),u=o.processingStart,c=a.processingEnd,f=a.entries.sort((function(C,w){return C.processingStart-w.processingStart})),p=lz(o.startTime,c),g=s.entries.find((function(C){return C.target})),m=g&&g.target||Nc.get(o.interactionId),y=[o.startTime+o.duration,c].concat(p.map((function(C){return C.startTime+C.duration}))),S=Math.max.apply(Math,y),E={interactionTarget:pb(m),interactionTargetElement:m,interactionType:o.name.startsWith("key")?"keyboard":"pointer",interactionTime:o.startTime,nextPaintTime:S,processedEventEntries:f,longAnimationFrameEntries:p,inputDelay:u-o.startTime,processingDuration:c-u,presentationDelay:Math.max(S-c,0),loadState:pR(o.startTime)};return Object.assign(s,{attribution:E})})(n);t(r)}),e)},jU=[2500,4e3],ox={},Rve=function(t,e){(function(n,r){r=r||{},mb((function(){var s,o=vR(),a=Io("LCP"),u=function(p){r.reportAllChanges||(p=p.slice(-1)),p.forEach((function(g){g.startTime<o.firstHiddenTime&&(a.value=Math.max(g.startTime-gR(),0),a.entries=[g],s())}))},c=iu("largest-contentful-paint",u);if(c){s=Oo(n,a,jU,r.reportAllChanges);var f=gb((function(){ox[a.id]||(u(c.takeRecords()),c.disconnect(),ox[a.id]=!0,s(!0))}));["keydown","click"].forEach((function(p){addEventListener(p,(function(){return yR(f)}),{once:!0,capture:!0})})),ip(f),dd((function(p){a=Io("LCP"),s=Oo(n,a,jU,r.reportAllChanges),mR((function(){a.value=performance.now()-p.timeStamp,ox[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=hb();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],p=Math.max(0,a.responseStart-u),g=Math.max(p,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:pb(c.element),timeToFirstByte:p,resourceLoadDelay:g-p,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)},Zf={passive:!0,capture:!0},Ive=new Date,BU=function(t,e){_a||(_a=e,lh=t,az=new Date,cz(removeEventListener),uz())},uz=function(){if(lh>=0&&lh<az-Ive){var t={entryType:"first-input",name:_a.type,target:_a.target,cancelable:_a.cancelable,startTime:_a.timeStamp,processingStart:_a.timeStamp+lh};Bv.forEach((function(e){e(t)})),Bv=[]}},Ove=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(){BU(n,r),a()},o=function(){a()},a=function(){removeEventListener("pointerup",s,Zf),removeEventListener("pointercancel",o,Zf)};addEventListener("pointerup",s,Zf),addEventListener("pointercancel",o,Zf)})(e,t):BU(e,t)}},cz=function(t){["mousedown","keydown","touchstart","pointerdown"].forEach((function(e){return t(e,Ove,Zf)}))},HU=[100,300],Nve=function(t,e){e=e||{},mb((function(){var n,r=vR(),s=Io("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=iu("first-input",a);n=Oo(t,s,HU,e.reportAllChanges),u&&(ip(gb((function(){a(u.takeRecords()),u.disconnect()}))),dd((function(){var c;s=Io("FID"),n=Oo(t,s,HU,e.reportAllChanges),Bv=[],lh=-1,_a=null,cz(addEventListener),c=o,Bv.push(c),uz()})))}))},Mve=function(t,e){Nve((function(n){var r=(function(s){var o=s.entries[0],a={eventTarget:pb(o.target),eventType:o.name,eventTime:o.startTime,eventEntry:o,loadState:pR(o.startTime)};return Object.assign(s,{attribution:a})})(n);t(r)}),e)};const Pve="web-vitals";class kve extends Ns{constructor(e){super(Pve),this.resourceEventIds=new Map,this.cacheLCPCandidates=Zme(),this.handleEvent=n=>{switch(n.type){case Z7:const r=n.details;this.cacheLCPCandidates&&r.fileType===An.IMAGE&&this.resourceEventIds.set(OU(n.details),n.id);break;case __:this.navigationEventId=n.id;break}},this.config=Object.assign(Object.assign({},fR),e)}enable(){}disable(){}onload(){this.context.eventBus.subscribe(Mh.EVENT,this.handleEvent),Rve(e=>this.handleLCP(e),{reportAllChanges:this.config.reportAllLCP}),Mve(e=>this.handleFID(e)),bve(e=>this.handleCLS(e),{reportAllChanges:!0}),Tve(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=OU(s?.lcpResourceEntry);o.lcpResourceEntry=this.resourceEventIds.get(a)}this.navigationEventId&&(o.navigationEntry=this.navigationEventId),(n=this.context)===null||n===void 0||n.record(Mme,{version:"1.0.0",value:e.value,attribution:o}),(r=this.context)===null||r===void 0||r.eventBus.unsubscribe(Mh.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)(kme,{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(Pme,{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)(Dme,{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 Dve="fetch";class Lve extends hR{constructor(e){super(Dve),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=Ec(),a=Age(n,r,!0),u=U7(this.config.logicalServiceName,o,this.context.config.enableW3CTraceId),c=F7(z7(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 Rge(n.headers,o.trace_id,o.subsegments[0].id,this.context.config.enableW3CTraceId);r||(r={},[].push.call(s,r)),Tge(r,o.trace_id,o.subsegments[0].id,this.context.config.enableW3CTraceId)},this.endTrace=(n,r,s)=>{if(n){const o=Ec();if(n.subsegments[0].end_time=o,n.end_time=o,r){n.subsegments[0].http.response={status:r.status},oR(r.status)?(n.subsegments[0].throttle=!0,n.throttle=!0):D7(r.status)?(n.subsegments[0].error=!0,n.error=!0):sR(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):J7(s)&&this.appendErrorCauseFromPrimitive(n.subsegments[0],s.toString())),this.context.record(Y7,n)}},this.createHttpEvent=(n,r)=>{const s=n;return{version:"1.0.0",request:{url:av(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(Fv,n))},this.recordHttpEventWithError=(n,r)=>{n.error=dR({type:"error",error:r},this.config.stackTraceLength),this.context.record(Fv,n)},this.fetch=(n,r,s,o,a)=>{const u=this.createHttpEvent(o,a);let c;if(!L7(av(o),this.config))return n.apply(r,s);const f=Oge(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(p=>(this.endTrace(c,p,void 0),this.recordHttpEventWithResponse(u,p),p)).catch(p=>{throw this.endTrace(c,void 0,p),this.recordHttpEventWithError(u,p),p})},this.fetchWrapper=()=>{const n=this;return r=>function(s,o){return n.fetch(r,this,arguments,s,o)}},this.config=Object.assign(Object.assign({},k7),e)}get patches(){return[{nodule:window,name:"fetch",wrapper:this.fetchWrapper}]}onload(){this.enable()}isTraceIdHeaderEnabled(e){const n=av(e);return P7(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 Uve extends Error{constructor(e){super(e),this.name="XMLHttpRequest error"}}const Fve="xhr";class zve extends hR{constructor(e){super(Fve),this.addXRayTraceIdHeader=n=>P7(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=Ec();s.trace.end_time=o,s.trace.subsegments[0].end_time=o,s.trace.subsegments[0].http.response={status:r.status},oR(r.status)?(s.trace.subsegments[0].throttle=!0,s.trace.throttle=!0):D7(r.status)?(s.trace.subsegments[0].error=!0,s.trace.error=!0):sR(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=Ec();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 Uve(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=Ec();n.trace=U7(this.config.logicalServiceName,r,this.context.config.enableW3CTraceId),n.trace.subsegments.push(F7(z7(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(db,aR(s.trace.trace_id,s.trace.subsegments[0].id)):this.setRequestHeader(cb,iR(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 L7(o,n.config)&&n.xhrMap.set(this,{url:o,method:s,async:a}),r.apply(this,arguments)}},this.config=Object.assign(Object.assign({},k7),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=Ec();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(Fv,r)}recordHttpEventWithError(e,n,r){this.xhrMap.delete(n);const s={version:"1.0.0",request:{method:e.method,url:e.url},error:dR({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(Fv,s)}recordTraceEvent(e){!this.isSyntheticsUA&&this.isTracingEnabled()&&this.isSessionRecorded()&&this.context.record(Y7,e)}}var Hv={},jve=Object.defineProperty,Bve=(t,e,n)=>e in t?jve(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Se=(t,e,n)=>Bve(t,typeof e!="symbol"?e+"":e,n),$U,Hve=Object.defineProperty,$ve=(t,e,n)=>e in t?Hve(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,qU=(t,e,n)=>$ve(t,typeof e!="symbol"?e+"":e,n),Pn=(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))(Pn||{});const WU={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},GU={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},fm={},qve=()=>!!globalThis.Zone;function SR(t){if(fm[t])return fm[t];const e=globalThis[t],n=e.prototype,r=t in WU?WU[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 GU?GU[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&&!qve())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 ix={};function Ii(t,e,n){var r;const s=`${t}.${String(n)}`;if(ix[s])return ix[s].call(e);const o=SR(t),a=(r=Object.getOwnPropertyDescriptor(o,n))==null?void 0:r.get;return a?(ix[s]=a,a.call(e)):e[n]}const ax={};function dz(t,e,n){const r=`${t}.${String(n)}`;if(ax[r])return ax[r].bind(e);const o=SR(t)[n];return typeof o!="function"?e[n]:(ax[r]=o,o.bind(e))}function Wve(t){return Ii("Node",t,"ownerDocument")}function Gve(t){return Ii("Node",t,"childNodes")}function Vve(t){return Ii("Node",t,"parentNode")}function Kve(t){return Ii("Node",t,"parentElement")}function Yve(t){return Ii("Node",t,"textContent")}function Zve(t,e){return dz("Node",t,"contains")(e)}function Xve(t){return dz("Node",t,"getRootNode")()}function Qve(t){return!t||!("host"in t)?null:Ii("ShadowRoot",t,"host")}function Jve(t){return t.styleSheets}function eye(t){return!t||!("shadowRoot"in t)?null:Ii("Element",t,"shadowRoot")}function tye(t,e){return Ii("Element",t,"querySelector")(e)}function nye(t,e){return Ii("Element",t,"querySelectorAll")(e)}function rye(){return SR("MutationObserver").constructor}function sye(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 cr={ownerDocument:Wve,childNodes:Gve,parentNode:Vve,parentElement:Kve,textContent:Yve,contains:Zve,getRootNode:Xve,host:Qve,styleSheets:Jve,shadowRoot:eye,querySelector:tye,querySelectorAll:nye,mutationObserver:rye,patch:sye};function fz(t){return t.nodeType===t.ELEMENT_NODE}function uh(t){const e=t&&"host"in t&&"mode"in t&&cr.host(t)||null;return!!(e&&"shadowRoot"in e&&cr.shadowRoot(e)===t)}function ch(t){return Object.prototype.toString.call(t)==="[object ShadowRoot]"}function oye(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 iye(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 O_(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=>hz(s,n)).join("");return oye(r)}catch{return null}}function hz(t,e){if(lye(t)){let n;try{n=O_(t.styleSheet)||iye(t)}catch{n=t.cssText}return t.styleSheet.href?Wv(n,t.styleSheet.href):n}else{let n=t.cssText;return uye(t)&&t.selectorText.includes(":")&&(n=aye(n)),e?Wv(n,e):n}}function aye(t){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return t.replace(e,"$1\\$2")}function lye(t){return"styleSheet"in t}function uye(t){return"selectorText"in t}class pz{constructor(){qU(this,"idNodeMap",new Map),qU(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 cye(){return new pz}function $v({element:t,maskInputOptions:e,tagName:n,type:r,value:s,maskInputFn:o}){let a=s||"";const u=r&&Gl(r);return(e[n.toLowerCase()]||u&&e[u])&&(o?a=o(a,t):a="*".repeat(a.length)),a}function Gl(t){return t.toLowerCase()}const VU="__rrweb_original__";function dye(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=VU in o?o[VU]: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 qv(t){const e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?Gl(e):null}function gz(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 fye(t){let e="";return t.indexOf("//")>-1?e=t.split("/").slice(0,3).join("/"):e=t.split("/")[0],e=e.split("?")[0],e}const hye=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,pye=/^(?:[a-z+]+:)?\/\//i,gye=/^www\..*/i,mye=/^(data:)([^,]*),(.*)/i;function Wv(t,e){return(t||"").replace(hye,(n,r,s,o,a,u)=>{const c=s||a||u,f=r||o||"";if(!c)return n;if(pye.test(c)||gye.test(c))return`url(${f}${c}${f})`;if(mye.test(c))return`url(${f}${c}${f})`;if(c[0]==="/")return`url(${f}${fye(e)+c}${f})`;const p=e.split("/"),g=c.split("/");p.pop();for(const m of g)m!=="."&&(m===".."?p.pop():p.push(m));return`url(${f}${p.join("/")}${f})`})}function hm(t,e=!1){return e?t.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):t.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function vye(t,e,n=!1){const r=Array.from(e.childNodes),s=[];let o=0;if(r.length>1&&t&&typeof t=="string"){let a=hm(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=hm(r[c].textContent,n),p=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=p+1}else g===f.length-1&&(S=a.indexOf(m));if(y.length>=2&&g>p){const E=r[c-1].textContent;if(E&&typeof E=="string"){const C=hm(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=hm(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 yye(t,e){return vye(t,e).join("/* rr_split */")}let bye=1;const Sye=new RegExp("[^a-z0-9-_:]"),Ph=-2;function mz(){return bye++}function Eye(t){if(t instanceof HTMLFormElement)return"form";const e=Gl(t.tagName);return Sye.test(e)?"div":e}let sc,KU;const Cye=/^[^ \t\n\r\u000c]+/,wye=/^[, \t\n\r\u000c]+/;function xye(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(wye),!(n>=e.length);){let o=r(Cye);if(o.slice(-1)===",")o=wc(t,o.substring(0,o.length-1)),s.push(o);else{let a="";o=wc(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 YU=new WeakMap;function wc(t,e){return!e||e.trim()===""?e:ER(t,e)}function _ye(t){return!!(t.tagName==="svg"||t.ownerSVGElement)}function ER(t,e){let n=YU.get(t);if(n||(n=t.createElement("a"),YU.set(t,n)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return n.setAttribute("href",e),n.href}function vz(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)?wc(t,r):n==="srcset"?xye(t,r):n==="style"?Wv(r,ER(t)):e==="object"&&n==="data"?wc(t,r):r)}function yz(t,e,n){return["video","audio"].includes(t)&&e==="autoplay"}function Aye(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 Gv(t,e,n){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return n?Gv(cr.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?Gv(cr.parentNode(t),e,n):!1}function bz(t,e,n,r){let s;if(fz(t)){if(s=t,!cr.childNodes(s).length)return!1}else{if(cr.parentElement(t)===null)return!1;s=cr.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(Gv(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 Tye(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 Rye(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 Iye(t,e){const{doc:n,mirror:r,blockClass:s,blockSelector:o,needsMask:a,inlineStylesheet:u,maskInputOptions:c={},maskTextFn:f,maskInputFn:p,dataURLOptions:g={},inlineImages:m,recordCanvas:y,keepIframeSrcFn:S,newlyAddedElement:E=!1,cssCaptured:C=!1}=e,w=Oye(n,r);switch(t.nodeType){case t.DOCUMENT_NODE:return t.compatMode!=="CSS1Compat"?{type:Pn.Document,childNodes:[],compatMode:t.compatMode}:{type:Pn.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:Pn.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:w};case t.ELEMENT_NODE:return Mye(t,{doc:n,blockClass:s,blockSelector:o,inlineStylesheet:u,maskInputOptions:c,maskInputFn:p,dataURLOptions:g,inlineImages:m,recordCanvas:y,keepIframeSrcFn:S,newlyAddedElement:E,rootId:w});case t.TEXT_NODE:return Nye(t,{doc:n,needsMask:a,maskTextFn:f,rootId:w,cssCaptured:C});case t.CDATA_SECTION_NODE:return{type:Pn.CDATA,textContent:"",rootId:w};case t.COMMENT_NODE:return{type:Pn.Comment,textContent:cr.textContent(t)||"",rootId:w};default:return!1}}function Oye(t,e){if(!e.hasNode(t))return;const n=e.getId(t);return n===1?void 0:n}function Nye(t,e){const{needsMask:n,maskTextFn:r,rootId:s,cssCaptured:o}=e,a=cr.parentNode(t),u=a&&a.tagName;let c="";const f=u==="STYLE"?!0:void 0,p=u==="SCRIPT"?!0:void 0;return p?c="SCRIPT_PLACEHOLDER":o||(c=cr.textContent(t),f&&c&&(c=Wv(c,ER(e.doc)))),!f&&!p&&c&&n&&(c=r?r(c,cr.parentElement(t)):c.replace(/[\S]/g,"*")),{type:Pn.Text,textContent:c||"",rootId:s}}function Mye(t,e){const{doc:n,blockClass:r,blockSelector:s,inlineStylesheet:o,maskInputOptions:a={},maskInputFn:u,dataURLOptions:c={},inlineImages:f,recordCanvas:p,keepIframeSrcFn:g,newlyAddedElement:m=!1,rootId:y}=e,S=Aye(t,r,s),E=Eye(t);let C={};const w=t.attributes.length;for(let T=0;T<w;T++){const R=t.attributes[T];yz(E,R.name,R.value)||(C[R.name]=vz(n,E,Gl(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=O_(T)),R&&(delete C.rel,delete C.href,C._cssText=R)}if(E==="style"&&t.sheet){let T=O_(t.sheet);T&&(t.childNodes.length>1&&(T=yye(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=$v({element:t,type:qv(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"&&p){if(t.__context==="2d")dye(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){sc||(sc=n.createElement("canvas"),KU=sc.getContext("2d"));const T=t,R=T.currentSrc||T.getAttribute("src")||"<unknown-src>",M=T.crossOrigin,O=()=>{T.removeEventListener("load",O);try{sc.width=T.naturalWidth,sc.height=T.naturalHeight,KU.drawImage(T,0,0),C.rr_dataURL=sc.toDataURL(c.type,c.quality)}catch(I){if(T.crossOrigin!=="anonymous"){T.crossOrigin="anonymous",T.complete&&T.naturalWidth!==0?O():T.addEventListener("load",O);return}else console.warn(`Cannot inline img src=${R}! Error: ${I}`)}T.crossOrigin==="anonymous"&&(M?C.crossOrigin=M:T.removeAttribute("crossorigin"))};T.complete&&T.naturalWidth!==0?O():T.addEventListener("load",O)}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 _;try{customElements.get(E)&&(_=!0)}catch{}return{type:Pn.Element,tagName:E,attributes:C,childNodes:[],isSVG:_ye(t)||void 0,needBlock:S,rootId:y,isCustom:_}}function Wt(t){return t==null?"":t.toLowerCase()}function Sz(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 Pye(t,e){if(e.comment&&t.type===Pn.Comment)return!0;if(t.type===Pn.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"&&gz(t.attributes.href)==="js"))return!0;if(e.headFavicon&&(t.tagName==="link"&&t.attributes.rel==="shortcut icon"||t.tagName==="meta"&&(Wt(t.attributes.name).match(/^msapplication-tile(image|color)$/)||Wt(t.attributes.name)==="application-name"||Wt(t.attributes.rel)==="icon"||Wt(t.attributes.rel)==="apple-touch-icon"||Wt(t.attributes.rel)==="shortcut icon")))return!0;if(t.tagName==="meta"){if(e.headMetaDescKeywords&&Wt(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(Wt(t.attributes.property).match(/^(og|twitter|fb):/)||Wt(t.attributes.name).match(/^(og|twitter):/)||Wt(t.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(Wt(t.attributes.name)==="robots"||Wt(t.attributes.name)==="googlebot"||Wt(t.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&t.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(Wt(t.attributes.name)==="author"||Wt(t.attributes.name)==="generator"||Wt(t.attributes.name)==="framework"||Wt(t.attributes.name)==="publisher"||Wt(t.attributes.name)==="progid"||Wt(t.attributes.property).match(/^article:/)||Wt(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(Wt(t.attributes.name)==="google-site-verification"||Wt(t.attributes.name)==="yandex-verification"||Wt(t.attributes.name)==="csrf-token"||Wt(t.attributes.name)==="p:domain_verify"||Wt(t.attributes.name)==="verify-v1"||Wt(t.attributes.name)==="verification"||Wt(t.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function xc(t,e){const{doc:n,mirror:r,blockClass:s,blockSelector:o,maskTextClass:a,maskTextSelector:u,skipChild:c=!1,inlineStylesheet:f=!0,maskInputOptions:p={},maskTextFn:g,maskInputFn:m,slimDOMOptions:y,dataURLOptions:S={},inlineImages:E=!1,recordCanvas:C=!1,onSerialize:w,onIframeLoad:_,iframeLoadTimeout:T=5e3,onStylesheetLoad:R,stylesheetLoadTimeout:M=5e3,keepIframeSrcFn:O=()=>!1,newlyAddedElement:I=!1,cssCaptured:P=!1}=e;let{needsMask:k}=e,{preserveWhiteSpace:H=!0}=e;k||(k=bz(t,a,u,k===void 0));const F=Iye(t,{doc:n,mirror:r,blockClass:s,blockSelector:o,needsMask:k,inlineStylesheet:f,maskInputOptions:p,maskTextFn:g,maskInputFn:m,dataURLOptions:S,inlineImages:E,recordCanvas:C,keepIframeSrcFn:O,newlyAddedElement:I,cssCaptured:P});if(!F)return console.warn(t,"not serialized"),null;let j;r.hasNode(t)?j=r.getId(t):Pye(F,y)||!H&&F.type===Pn.Text&&!F.textContent.replace(/^\s+|\s+$/gm,"").length?j=Ph:j=mz();const W=Object.assign(F,{id:j});if(r.add(t,W),j===Ph)return null;w&&w(t);let Y=!c;if(W.type===Pn.Element){Y=Y&&!W.needBlock,delete W.needBlock;const $=cr.shadowRoot(t);$&&ch($)&&(W.isShadowHost=!0)}if((W.type===Pn.Document||W.type===Pn.Element)&&Y){y.headWhitespace&&W.type===Pn.Element&&W.tagName==="head"&&(H=!1);const $={doc:n,mirror:r,blockClass:s,blockSelector:o,needsMask:k,maskTextClass:a,maskTextSelector:u,skipChild:c,inlineStylesheet:f,maskInputOptions:p,maskTextFn:g,maskInputFn:m,slimDOMOptions:y,dataURLOptions:S,inlineImages:E,recordCanvas:C,preserveWhiteSpace:H,onSerialize:w,onIframeLoad:_,iframeLoadTimeout:T,onStylesheetLoad:R,stylesheetLoadTimeout:M,keepIframeSrcFn:O,cssCaptured:!1};if(!(W.type===Pn.Element&&W.tagName==="textarea"&&W.attributes.value!==void 0)){W.type===Pn.Element&&W.attributes._cssText!==void 0&&typeof W.attributes._cssText=="string"&&($.cssCaptured=!0);for(const fe of Array.from(cr.childNodes(t))){const de=xc(fe,$);de&&W.childNodes.push(de)}}let ee=null;if(fz(t)&&(ee=cr.shadowRoot(t)))for(const fe of Array.from(cr.childNodes(ee))){const de=xc(fe,$);de&&(ch(ee)&&(de.isShadow=!0),W.childNodes.push(de))}}const ne=cr.parentNode(t);return ne&&uh(ne)&&ch(ne)&&(W.isShadow=!0),W.type===Pn.Element&&W.tagName==="iframe"&&Tye(t,()=>{const $=t.contentDocument;if($&&_){const ee=xc($,{doc:$,mirror:r,blockClass:s,blockSelector:o,needsMask:k,maskTextClass:a,maskTextSelector:u,skipChild:!1,inlineStylesheet:f,maskInputOptions:p,maskTextFn:g,maskInputFn:m,slimDOMOptions:y,dataURLOptions:S,inlineImages:E,recordCanvas:C,preserveWhiteSpace:H,onSerialize:w,onIframeLoad:_,iframeLoadTimeout:T,onStylesheetLoad:R,stylesheetLoadTimeout:M,keepIframeSrcFn:O});ee&&_(t,ee)}},T),W.type===Pn.Element&&W.tagName==="link"&&typeof W.attributes.rel=="string"&&(W.attributes.rel==="stylesheet"||W.attributes.rel==="preload"&&typeof W.attributes.href=="string"&&gz(W.attributes.href)==="css")&&Rye(t,()=>{if(R){const $=xc(t,{doc:n,mirror:r,blockClass:s,blockSelector:o,needsMask:k,maskTextClass:a,maskTextSelector:u,skipChild:!1,inlineStylesheet:f,maskInputOptions:p,maskTextFn:g,maskInputFn:m,slimDOMOptions:y,dataURLOptions:S,inlineImages:E,recordCanvas:C,preserveWhiteSpace:H,onSerialize:w,onIframeLoad:_,iframeLoadTimeout:T,onStylesheetLoad:R,stylesheetLoadTimeout:M,keepIframeSrcFn:O});$&&R(t,$)}},M),W}function kye(t,e){const{mirror:n=new pz,blockClass:r="rr-block",blockSelector:s=null,maskTextClass:o="rr-mask",maskTextSelector:a=null,inlineStylesheet:u=!0,inlineImages:c=!1,recordCanvas:f=!1,maskAllInputs:p=!1,maskTextFn:g,maskInputFn:m,slimDOM:y=!1,dataURLOptions:S,preserveWhiteSpace:E,onSerialize:C,onIframeLoad:w,iframeLoadTimeout:_,onStylesheetLoad:T,stylesheetLoadTimeout:R,keepIframeSrcFn:M=()=>!1}=e||{},O=p===!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}:p===!1?{password:!0}:p,I=Sz(y);return xc(t,{doc:t,mirror:n,blockClass:r,blockSelector:s,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:O,maskTextFn:g,maskInputFn:m,slimDOMOptions:I,dataURLOptions:S,inlineImages:c,recordCanvas:f,preserveWhiteSpace:E,onSerialize:C,onIframeLoad:w,iframeLoadTimeout:_,onStylesheetLoad:T,stylesheetLoadTimeout:R,keepIframeSrcFn:M,newlyAddedElement:!1})}function Dye(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Lye(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 CR={exports:{}},Zt=String,Ez=function(){return{isColorSupported:!1,reset:Zt,bold:Zt,dim:Zt,italic:Zt,underline:Zt,inverse:Zt,hidden:Zt,strikethrough:Zt,black:Zt,red:Zt,green:Zt,yellow:Zt,blue:Zt,magenta:Zt,cyan:Zt,white:Zt,gray:Zt,bgBlack:Zt,bgRed:Zt,bgGreen:Zt,bgYellow:Zt,bgBlue:Zt,bgMagenta:Zt,bgCyan:Zt,bgWhite:Zt}};CR.exports=Ez();CR.exports.createColors=Ez;var Uye=CR.exports;const Fye={},zye=Object.freeze(Object.defineProperty({__proto__:null,default:Fye},Symbol.toStringTag,{value:"Module"})),Js=Lye(zye);let ZU=Uye,XU=Js,N_=class Cz 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,Cz)}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=ZU.isColorSupported),XU&&e&&(n=XU(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:p,red:g}=ZU.createColors(!0);u=m=>f(g(m)),c=m=>p(m)}else u=c=f=>f;return r.slice(s,o).map((f,p)=>{let g=s+1+p,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+`
241
+ ${kl(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 Dl(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=sme(e).replace(/[-:]/g,"");return{longDate:n,shortDate:n.slice(0,8)}}getCanonicalHeaderList(e){return Object.keys(e).sort().join(";")}}const um={},Yw=[],Zw=(t,e,n)=>`${t}/${e}/${n}/${V7}`,ame=async(t,e,n,r,s)=>{const o=await C4(t,e.secretAccessKey,e.accessKeyId),a=`${n}:${r}:${s}:${kl(o)}:${e.sessionToken}`;if(a in um)return um[a];for(Yw.push(a);Yw.length>tme;)delete um[Yw.shift()];let u=`AWS4${e.secretAccessKey}`;for(const c of[n,r,s,V7])u=await C4(t,u,c);return um[a]=u},C4=(t,e,n)=>{const r=new t(e);return r.update(Oh(n)),r.digest()},w4=({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 Zge||e?.has(o)||Xge.test(o)||Qge.test(o))&&(!n||n&&!n.has(o))||(r[o]=t[s].trim().replace(/\s+/g," "))}return r},Xw=async({headers:t,body:e},n)=>{for(const r of Object.keys(t))if(r.toLowerCase()===x_)return t[r];if(e==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof e=="string"||ArrayBuffer.isView(e)||nge(e)){const r=new n;return r.update(Oh(e)),kl(await r.digest())}return eme},lme=(t,e)=>{t=t.toLowerCase();for(const n of Object.keys(e))if(t===n.toLowerCase())return!0;return!1},ume=(t,e={})=>{const{headers:n,query:r={}}=Ei.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}},x4=t=>{t=Ei.clone(t);for(const e of Object.keys(t.headers))Vge.indexOf(e.toLowerCase())>-1&&delete t.headers[e];return t};class cme extends ime{headerFormatter=new jge;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:p}=n,g=await this.credentialProvider();this.validateResolvedCredentials(g);const m=f??await this.regionProvider(),{longDate:y,shortDate:S}=this.formatDate(r);if(s>nme)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const E=Zw(S,m,p??this.service),C=ume(x4(e),{unhoistableHeaders:a,hoistableHeaders:c});g.sessionToken&&(C.query[q7]=g.sessionToken),C.query[Hge]=Kw,C.query[$ge]=`${g.accessKeyId}/${E}`,C.query[H7]=y,C.query[Wge]=s.toString(10);const w=w4(C,o,u);return C.query[qge]=this.getCanonicalHeaderList(w),C.query[$7]=await this.getSignature(y,E,this.getSigningKey(g,m,S,p),this.createCanonicalRequest(C,w,await Xw(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:p}=this.formatDate(r),g=Zw(f,c,a??this.service),m=await Xw({headers:{},body:n},this.sha256),y=new this.sha256;y.update(e);const S=kl(await y.digest()),E=[Jge,p,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(Oh(e)),kl(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=x4(e),{longDate:p,shortDate:g}=this.formatDate(n),m=Zw(g,c,a??this.service);f.headers[G7]=p,u.sessionToken&&(f.headers[Yge]=u.sessionToken);const y=await Xw(f,this.sha256);!lme(x_,f.headers)&&this.applyChecksum&&(f.headers[x_]=y);const S=w4(f,s,r),E=await this.getSignature(p,m,this.getSigningKey(u,c,g,a),this.createCanonicalRequest(f,S,y));return f.headers[W7]=`${Kw} 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,Kw),a=new this.sha256(await r);return a.update(Oh(o)),kl(await a.digest())}getSigningKey(e,n,r,s){return ame(this.sha256,e,r,n,s||this.service)}}const dme="rum",fme={expiresIn:60},hme=(t,e)=>{const n=new cme({applyChecksum:!0,credentials:t,region:e,service:dme,uriEscapePath:!0,sha256:Ul});return{sign:async r=>await n.sign(r),presign:async r=>await n.presign(r,fme),hashAndEncode:async r=>{const s=new Ul;return s.update(r),zge(await s.digest()).toLowerCase()}}};function _4(t,e){return new Request(t,e)}function pme(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 Qw={supported:void 0};class fb{config;configProvider;static create(e){return typeof e?.handle=="function"?e:new fb(e)}constructor(e){typeof e=="function"?this.configProvider=e().then(n=>n||{}):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),Qw.supported===void 0&&(Qw.supported=typeof Request<"u"&&"keepalive"in _4("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 _=A4(n);return Promise.reject(_)}let u=e.path;const c=nR(e.query||{});c&&(u+=`?${c}`),e.fragment&&(u+=`#${e.fragment}`);let f="";if(e.username!=null||e.password!=null){const _=e.username??"",T=e.password??"";f=`${_}:${T}@`}const{port:p,method:g}=e,m=`${e.protocol}//${f}${e.hostname}${p?`:${p}`:""}${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),Qw.supported&&(S.keepalive=o),typeof this.config.requestInit=="function"&&Object.assign(S,this.config.requestInit(e));let E=()=>{};const C=_4(m,S),w=[fetch(C).then(_=>{const T=_.headers,R={};for(const O of T.entries())R[O[0]]=O[1];return _.body!=null?{response:new Nh({headers:R,reason:_.statusText,statusCode:_.status,body:_.body})}:_.blob().then(O=>({response:new Nh({headers:R,reason:_.statusText,statusCode:_.status,body:O})}))}),pme(s)];return n&&w.push(new Promise((_,T)=>{const R=()=>{const M=A4(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 A4(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 Jw=async t=>{const{value:e}=await t.body.getReader().read();return JSON.parse(String.fromCharCode.apply(null,e))},gme=async t=>{const{value:e}=await t.body.getReader().read();return String.fromCharCode.apply(null,e)},mme="POST",vme="application/x-www-form-urlencoded",yme="https:",bme="AssumeRoleWithWebIdentity",Sme="2011-06-15";class Eme{constructor(e){this.assumeRoleWithWebIdentity=async n=>{try{const r=Object.assign(Object.assign({},n),{Action:bme,Version:Sme}),s=new URLSearchParams(Object.entries(r)).toString(),o=new Ei({method:mme,headers:{"content-type":vme,host:this.hostname},protocol:yme,hostname:this.hostname,body:s}),{response:a}=await this.fetchRequestHandler.handle(o),u=await gme(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 Cme="POST",wme="application/x-amz-json-1.1",xme="https:",_me="AWSCognitoIdentityService.GetId",Ame="AWSCognitoIdentityService.GetOpenIdToken",Tme="AWSCognitoIdentityService.GetCredentialsForIdentity";class Rme{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(_me,a),c=await Jw((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(Ame,s),{response:a}=await this.fetchRequestHandler.handle(o);return this.validateOpenIdTokenResponse(await Jw(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(Tme,s),{response:a}=await this.fetchRequestHandler.handle(o),{AccessKeyId:u,Expiration:c,SecretKey:f,SessionToken:p}=this.validateCredenentialsResponse(await Jw(a));return{accessKeyId:u,secretAccessKey:f,sessionToken:p,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 Ei({method:Cme,headers:{"content-type":wme,"x-amz-target":r},protocol:xme,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?`${Dv}_${e.applicationId}`:Dv}}class K7{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 Rme({fetchRequestHandler:new fb,region:r,clientConfig:e,applicationId:n}),this.credentialStorageKey=this.config.cookieAttributes.unique?`${Fc}_${n}`:Fc}renewCredentials(){if(!this.credentials||!this.credentials.expiration)return!0;const e=new Date(this.credentials.expiration.getTime()-Lge);return new Date>e}}class Ime extends K7{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 Eme({fetchRequestHandler:new fb,region:r})}}class Ome extends K7{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",Nme="com.amazonaws.rum",Fv=`${hs}.http_event`,Y7=`${hs}.xray_trace_event`,Mme=`${hs}.largest_contentful_paint_event`,Pme=`${hs}.first_input_delay_event`,kme=`${hs}.cumulative_layout_shift_event`,Dme=`${hs}.interaction_to_next_paint_event`,__=`${hs}.performance_navigation_event`,Z7=`${hs}.performance_resource_event`,Lme=`${hs}.dom_event`,Ume=`${hs}.js_error_event`,Fme=`${hs}.page_view_event`,A_=`${hs}.session_start_event`,T4=`${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=Nme;class zme{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 R4=(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},jme=(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 ih;(function(t){t.Path="PATH",t.Hash="HASH",t.PathAndHash="PATH_AND_HASH"})(ih||(ih={}));const Bme=()=>{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"}},cm="00000000-0000-0000-0000-000000000000",Hme="desktop",$me="web";class qme{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?`${Lv}_${this.appMonitorDetails.id}`:Lv,this.session={sessionId:cm,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===cm?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(A_,{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:cm}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||oh(),this.createOrRenewUserCookie(e,this.userExpiry)):this.userId=oh()}createOrRenewSessionCookie(e,n){btoa&&R4(this.sessionCookieName,btoa(JSON.stringify(e)),this.config.cookieAttributes,void 0,n)}createOrRenewUserCookie(e,n){R4(Uv,e,this.config.cookieAttributes,void 0,n)}getUserIdCookie(){return I4(Uv)}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:oh(),record:this.session.sessionId===cm?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(A_,{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=Bme();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:Hme,platformType:$me,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 Wme{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(Fme,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 Mh;(function(t){t.EVENT="event"})(Mh||(Mh={}));class X7{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 Gme="3.1.0",Vme=new Set(["pageId","parentPageId","interaction","pageTags","title"]),ex=(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")&&Vme.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 Kme{constructor(e,n,r=new X7){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!==A_&&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(Mh.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=ex(a,"event");let p={};if(this.eventMetadataHook)try{const y=Object.freeze(Object.assign({},c)),S=this.eventMetadataHook(s,o,y);S&&(p=ex(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),p),f),m={id:oh(),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 Wme(n,this.recordEvent),this.sessionManager=new qme(e,n,this.recordEvent,this.pageManager),this.installationMethod=n.client,this.applicationAttributes=Object.freeze(ex(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":Gme})}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 An;(function(t){t.OTHER="other",t.STYLESHEET="stylesheet",t.DOCUMENT="document",t.SCRIPT="script",t.IMAGE="image",t.FONT="font"})(An||(An={}));var ai;(function(t){t.IMG="img",t.IMAGE="image",t.INPUT="input",t.IFRAME="iframe",t.FRAME="frame",t.SCRIPT="script",t.CSS="css"})(ai||(ai={}));const O4=t=>[t.startTime,t.duration].join("#"),Yme=[{name:An.STYLESHEET,list:["css","less"]},{name:An.DOCUMENT,list:["htm","html","ts","doc","docx","pdf","xls","xlsx"]},{name:An.SCRIPT,list:["js"]},{name:An.IMAGE,list:["ai","bmp","gif","ico","jpeg","jpg","png","ps","psd","svg","tif","tiff"]},{name:An.FONT,list:["fnt","fon","otf","ttf","woff"]}],N4=(t,e)=>{let n=An.OTHER;if(t){const r=t.substring(t.lastIndexOf("/")+1),s=r.substring(r.lastIndexOf(".")+1).split(/[?#]/)[0];Yme.forEach(o=>{o.list.indexOf(s)>-1&&(n=o.name)})}if(e&&n===An.OTHER)switch(e){case ai.IMAGE:case ai.IMG:case ai.INPUT:n=An.IMAGE;break;case ai.IFRAME:case ai.FRAME:n=An.DOCUMENT;break;case ai.SCRIPT:n=An.SCRIPT;break;case ai.CSS:n=An.STYLESHEET;break}return n},Zme=()=>PerformanceObserver.supportedEntryTypes.includes("largest-contentful-paint"),Xme=/\/appmonitors\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/,Qme=(t,e)=>{try{return new URL(t).hostname===e&&Xme.test(t)}catch{return!1}},Q7="dom-event",Jme={interactionId:()=>"",enableMutationObserver:!1,events:[]};class cR extends Ns{constructor(e){super(Q7),this.enabled=!1,this.eventListenerMap=new Map,this.config=Object.assign(Object.assign({},Jme),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=cR.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(Lme,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 eve=t=>{const e=typeof t;return(e==="object"||e==="function")&&!!t},tve=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},nve=(t,e)=>{t.type!=="unhandledrejection"&&(t.type=e.toString()),t.message=e.toString()},rve=(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)},J7=t=>t!==Object(t)&&t!==void 0&&t!==null,dR=(t,e)=>{const n=tve(t),r=t.error;return eve(r)?rve(n,r,e):J7(r)&&nve(n,r),n},ez="js-error",sve={stackTraceLength:1e3,ignore:()=>!1};class ove extends Ns{constructor(e){super(ez),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({},sve),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(Ume,dR(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 ive=t=>t.entryType==="resource"&&(!/^https?:/.test(t.name)||/^(fetch|xmlhttprequest)$/.test(t.initiatorType)),fR={eventLimit:10,ignore:ive,recordAllTypes:[An.DOCUMENT,An.SCRIPT,An.STYLESHEET,An.FONT],sampleTypes:[An.IMAGE,An.OTHER],reportAllLCP:!1,reportAllCLS:!1,reportAllINP:!1},ave="navigation",rc="navigation",tx="load";class lve extends Ns{constructor(e){super(ave),this.eventListener=()=>{performance.getEntriesByType(rc).length===0?this.performanceNavigationEventHandlerTimingLevel1():new PerformanceObserver(r=>{r.getEntries().filter(s=>s.entryType===rc).filter(s=>!this.config.ignore(s)).forEach(s=>{this.performanceNavigationEventHandlerTimingLevel2(s)})}).observe({entryTypes:[rc]})},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(__,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(__,s)},this.config=Object.assign(Object.assign({},fR),e)}enable(){this.enabled||(this.enabled=!0,window.addEventListener(tx,this.eventListener))}disable(){this.enabled&&(this.enabled=!1,this.eventListener&&window.removeEventListener(tx,this.eventListener))}hasTheWindowLoadEventFired(){return window.performance&&window.performance.getEntriesByType(rc).length?!!window.performance.getEntriesByType(rc)[0].loadEventEnd:!1}onload(){this.enabled&&(this.hasTheWindowLoadEventFired()?window.performance.getEntriesByType(rc).filter(e=>!this.config.ignore(e)).forEach(e=>this.performanceNavigationEventHandlerTimingLevel2(e)):window.addEventListener(tx,this.eventListener))}}var nx,M4;function uve(){if(M4)return nx;M4=1;function t(c){return typeof c=="function"}var e=console.error.bind(console);function n(c,f,p){var g=!!c[f]&&c.propertyIsEnumerable(f);Object.defineProperty(c,f,{configurable:!0,enumerable:g,writable:!0,value:p})}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,p){if(!c||!c[f]){e("no original function "+f+" to wrap");return}if(!p){e("no wrapper function"),e(new Error().stack);return}if(!t(c[f])||!t(p)){e("original object and wrapper must be functions");return}var g=c[f],m=p(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,p){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,p)})})}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(p){f.forEach(function(g){a(p,g)})})}return r.wrap=s,r.massWrap=o,r.unwrap=a,r.massUnwrap=u,nx=r,nx}var zv=uve();const cve=qa(zv),P4=D5({__proto__:null,default:cve},[zv]);class hR 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=zv.wrap.bind(P4);for(const n of this.patches)e(n.nodule,n.name,n.wrapper())}unpatchAll(){const e=zv.unwrap.bind(P4);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 dve="page-view";class fve extends hR{constructor(){super(dve),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 ih.PathAndHash:return e&&n?e+n:e||n||"";case ih.Hash:return n||"";case ih.Path:default:return e||""}}}const hve="resource",rx="resource";class pve extends Ns{constructor(e){super(hve),this.performanceEntryHandler=n=>{this.recordPerformanceEntries(n.getEntries())},this.recordPerformanceEntries=n=>{n.forEach(r=>{if(r.entryType!==rx||this.config.ignore(r))return;const{name:s,initiatorType:o}=r,a=N4(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(!Qme(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:N4(n,s),transferSize:a};this.context.config.recordResourceUrl&&(c.targetUrl=n),this.context.record(Z7,c)}},this.config=Object.assign(Object.assign({},fR),e),this.eventCount=0,this.resourceObserver=new PerformanceObserver(this.performanceEntryHandler)}enable(){this.enabled||(this.enabled=!0,this.resourceObserver.observe({type:rx,buffered:!0}))}disable(){this.enabled&&(this.enabled=!1,this.resourceObserver.disconnect())}onload(){this.resourceObserver.observe({type:rx,buffered:!0})}}var T_,k4,hb=function(){var t=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(t&&t.responseStart>0&&t.responseStart<performance.now())return t},pR=function(t){if(document.readyState==="loading")return"loading";var e=hb();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"},gve=function(t){var e=t.nodeName;return t.nodeType===1?e.toLowerCase():e.toUpperCase().replace(/^#/,"")},pb=function(t,e){var n="";try{for(;t&&t.nodeType!==9;){var r=t,s=r.id?"#"+r.id:gve(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},tz=-1,mve=function(){return tz},dd=function(t){addEventListener("pageshow",(function(e){e.persisted&&(tz=e.timeStamp,t(e))}),!0)},gR=function(){var t=hb();return t&&t.activationStart||0},Io=function(t,e){var n=hb(),r="navigate";return mve()>=0?r="back-forward-cache":n&&(document.prerendering||gR()>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}},iu=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{}},Oo=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))}},mR=function(t){requestAnimationFrame((function(){return requestAnimationFrame((function(){return t()}))}))},ip=function(t){document.addEventListener("visibilitychange",(function(){document.visibilityState==="hidden"&&t()}))},gb=function(t){var e=!1;return function(){e||(t(),e=!0)}},Cc=-1,D4=function(){return document.visibilityState!=="hidden"||document.prerendering?1/0:0},jv=function(t){document.visibilityState==="hidden"&&Cc>-1&&(Cc=t.type==="visibilitychange"?t.timeStamp:0,vve())},L4=function(){addEventListener("visibilitychange",jv,!0),addEventListener("prerenderingchange",jv,!0)},vve=function(){removeEventListener("visibilitychange",jv,!0),removeEventListener("prerenderingchange",jv,!0)},vR=function(){return Cc<0&&(Cc=D4(),L4(),dd((function(){setTimeout((function(){Cc=D4(),L4()}),0)}))),{get firstHiddenTime(){return Cc}}},mb=function(t){document.prerendering?addEventListener("prerenderingchange",(function(){return t()}),!0):t()},U4=[1800,3e3],yve=function(t,e){e=e||{},mb((function(){var n,r=vR(),s=Io("FCP"),o=iu("paint",(function(a){a.forEach((function(u){u.name==="first-contentful-paint"&&(o.disconnect(),u.startTime<r.firstHiddenTime&&(s.value=Math.max(u.startTime-gR(),0),s.entries.push(u),n(!0)))}))}));o&&(n=Oo(t,s,U4,e.reportAllChanges),dd((function(a){s=Io("FCP"),n=Oo(t,s,U4,e.reportAllChanges),mR((function(){s.value=performance.now()-a.timeStamp,n(!0)}))})))}))},F4=[.1,.25],bve=function(t,e){(function(n,r){r=r||{},yve(gb((function(){var s,o=Io("CLS",0),a=0,u=[],c=function(p){p.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=iu("layout-shift",c);f&&(s=Oo(n,o,F4,r.reportAllChanges),ip((function(){c(f.takeRecords()),s(!0)})),dd((function(){a=0,o=Io("CLS",0),s=Oo(n,o,F4,r.reportAllChanges),mR((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,p){return f&&f.value>p.value?f:p}));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:pb(c.node),largestShiftTime:u.startTime,largestShiftValue:u.value,largestShiftSource:c,largestShiftEntry:u,loadState:pR(u.startTime)})}}return Object.assign(s,{attribution:a})})(n);t(r)}),e)},nz=0,sx=1/0,dm=0,Sve=function(t){t.forEach((function(e){e.interactionId&&(sx=Math.min(sx,e.interactionId),dm=Math.max(dm,e.interactionId),nz=dm?(dm-sx)/7+1:0)}))},rz=function(){return T_?nz:performance.interactionCount||0},Eve=function(){"interactionCount"in performance||T_||(T_=iu("event",Sve,{type:"event",buffered:!0,durationThreshold:0}))},Gs=[],ah=new Map,sz=0,Cve=function(){var t=Math.min(Gs.length-1,Math.floor((rz()-sz)/50));return Gs[t]},oz=[],wve=function(t){if(oz.forEach((function(s){return s(t)})),t.interactionId||t.entryType==="first-input"){var e=Gs[Gs.length-1],n=ah.get(t.interactionId);if(n||Gs.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]};ah.set(r.id,r),Gs.push(r)}Gs.sort((function(s,o){return o.latency-s.latency})),Gs.length>10&&Gs.splice(10).forEach((function(s){return ah.delete(s.id)}))}}},yR=function(t){var e=self.requestIdleCallback||self.setTimeout,n=-1;return t=gb(t),document.visibilityState==="hidden"?t():(n=e(t),ip(t)),n},z4=[200,500],xve=function(t,e){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(e=e||{},mb((function(){var n;Eve();var r,s=Io("INP"),o=function(u){yR((function(){u.forEach(wve);var c=Cve();c&&c.latency!==s.value&&(s.value=c.latency,s.entries=c.entries,r())}))},a=iu("event",o,{durationThreshold:(n=e.durationThreshold)!==null&&n!==void 0?n:40});r=Oo(t,s,z4,e.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),ip((function(){o(a.takeRecords()),r(!0)})),dd((function(){sz=rz(),Gs.length=0,ah.clear(),s=Io("INP"),r=Oo(t,s,z4,e.reportAllChanges)})))})))},Oc=[],xa=[],R_=0,bR=new WeakMap,Nc=new Map,I_=-1,_ve=function(t){Oc=Oc.concat(t),iz()},iz=function(){I_<0&&(I_=yR(Ave))},Ave=function(){Nc.size>10&&Nc.forEach((function(a,u){ah.has(u)||Nc.delete(u)}));var t=Gs.map((function(a){return bR.get(a.entries[0])})),e=xa.length-50;xa=xa.filter((function(a,u){return u>=e||t.includes(a)}));for(var n=new Set,r=0;r<xa.length;r++){var s=xa[r];lz(s.startTime,s.processingEnd).forEach((function(a){n.add(a)}))}var o=Oc.length-1-50;Oc=Oc.filter((function(a,u){return a.startTime>R_&&u>o||n.has(a)})),I_=-1};oz.push((function(t){t.interactionId&&t.target&&!Nc.has(t.interactionId)&&Nc.set(t.interactionId,t.target)}),(function(t){var e,n=t.startTime+t.duration;R_=Math.max(R_,t.processingEnd);for(var r=xa.length-1;r>=0;r--){var s=xa[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]},xa.push(e)),(t.interactionId||t.entryType==="first-input")&&bR.set(t,e),iz()}));var _a,lh,az,Bv,lz=function(t,e){for(var n,r=[],s=0;n=Oc[s];s++)if(!(n.startTime+n.duration<t)){if(n.startTime>e)break;r.push(n)}return r},Tve=function(t,e){k4||(k4=iu("long-animation-frame",_ve)),xve((function(n){var r=(function(s){var o=s.entries[0],a=bR.get(o),u=o.processingStart,c=a.processingEnd,f=a.entries.sort((function(C,w){return C.processingStart-w.processingStart})),p=lz(o.startTime,c),g=s.entries.find((function(C){return C.target})),m=g&&g.target||Nc.get(o.interactionId),y=[o.startTime+o.duration,c].concat(p.map((function(C){return C.startTime+C.duration}))),S=Math.max.apply(Math,y),E={interactionTarget:pb(m),interactionTargetElement:m,interactionType:o.name.startsWith("key")?"keyboard":"pointer",interactionTime:o.startTime,nextPaintTime:S,processedEventEntries:f,longAnimationFrameEntries:p,inputDelay:u-o.startTime,processingDuration:c-u,presentationDelay:Math.max(S-c,0),loadState:pR(o.startTime)};return Object.assign(s,{attribution:E})})(n);t(r)}),e)},j4=[2500,4e3],ox={},Rve=function(t,e){(function(n,r){r=r||{},mb((function(){var s,o=vR(),a=Io("LCP"),u=function(p){r.reportAllChanges||(p=p.slice(-1)),p.forEach((function(g){g.startTime<o.firstHiddenTime&&(a.value=Math.max(g.startTime-gR(),0),a.entries=[g],s())}))},c=iu("largest-contentful-paint",u);if(c){s=Oo(n,a,j4,r.reportAllChanges);var f=gb((function(){ox[a.id]||(u(c.takeRecords()),c.disconnect(),ox[a.id]=!0,s(!0))}));["keydown","click"].forEach((function(p){addEventListener(p,(function(){return yR(f)}),{once:!0,capture:!0})})),ip(f),dd((function(p){a=Io("LCP"),s=Oo(n,a,j4,r.reportAllChanges),mR((function(){a.value=performance.now()-p.timeStamp,ox[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=hb();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],p=Math.max(0,a.responseStart-u),g=Math.max(p,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:pb(c.element),timeToFirstByte:p,resourceLoadDelay:g-p,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)},Zf={passive:!0,capture:!0},Ive=new Date,B4=function(t,e){_a||(_a=e,lh=t,az=new Date,cz(removeEventListener),uz())},uz=function(){if(lh>=0&&lh<az-Ive){var t={entryType:"first-input",name:_a.type,target:_a.target,cancelable:_a.cancelable,startTime:_a.timeStamp,processingStart:_a.timeStamp+lh};Bv.forEach((function(e){e(t)})),Bv=[]}},Ove=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(){B4(n,r),a()},o=function(){a()},a=function(){removeEventListener("pointerup",s,Zf),removeEventListener("pointercancel",o,Zf)};addEventListener("pointerup",s,Zf),addEventListener("pointercancel",o,Zf)})(e,t):B4(e,t)}},cz=function(t){["mousedown","keydown","touchstart","pointerdown"].forEach((function(e){return t(e,Ove,Zf)}))},H4=[100,300],Nve=function(t,e){e=e||{},mb((function(){var n,r=vR(),s=Io("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=iu("first-input",a);n=Oo(t,s,H4,e.reportAllChanges),u&&(ip(gb((function(){a(u.takeRecords()),u.disconnect()}))),dd((function(){var c;s=Io("FID"),n=Oo(t,s,H4,e.reportAllChanges),Bv=[],lh=-1,_a=null,cz(addEventListener),c=o,Bv.push(c),uz()})))}))},Mve=function(t,e){Nve((function(n){var r=(function(s){var o=s.entries[0],a={eventTarget:pb(o.target),eventType:o.name,eventTime:o.startTime,eventEntry:o,loadState:pR(o.startTime)};return Object.assign(s,{attribution:a})})(n);t(r)}),e)};const Pve="web-vitals";class kve extends Ns{constructor(e){super(Pve),this.resourceEventIds=new Map,this.cacheLCPCandidates=Zme(),this.handleEvent=n=>{switch(n.type){case Z7:const r=n.details;this.cacheLCPCandidates&&r.fileType===An.IMAGE&&this.resourceEventIds.set(O4(n.details),n.id);break;case __:this.navigationEventId=n.id;break}},this.config=Object.assign(Object.assign({},fR),e)}enable(){}disable(){}onload(){this.context.eventBus.subscribe(Mh.EVENT,this.handleEvent),Rve(e=>this.handleLCP(e),{reportAllChanges:this.config.reportAllLCP}),Mve(e=>this.handleFID(e)),bve(e=>this.handleCLS(e),{reportAllChanges:!0}),Tve(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=O4(s?.lcpResourceEntry);o.lcpResourceEntry=this.resourceEventIds.get(a)}this.navigationEventId&&(o.navigationEntry=this.navigationEventId),(n=this.context)===null||n===void 0||n.record(Mme,{version:"1.0.0",value:e.value,attribution:o}),(r=this.context)===null||r===void 0||r.eventBus.unsubscribe(Mh.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)(kme,{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(Pme,{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)(Dme,{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 Dve="fetch";class Lve extends hR{constructor(e){super(Dve),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=Ec(),a=Age(n,r,!0),u=U7(this.config.logicalServiceName,o,this.context.config.enableW3CTraceId),c=F7(z7(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 Rge(n.headers,o.trace_id,o.subsegments[0].id,this.context.config.enableW3CTraceId);r||(r={},[].push.call(s,r)),Tge(r,o.trace_id,o.subsegments[0].id,this.context.config.enableW3CTraceId)},this.endTrace=(n,r,s)=>{if(n){const o=Ec();if(n.subsegments[0].end_time=o,n.end_time=o,r){n.subsegments[0].http.response={status:r.status},oR(r.status)?(n.subsegments[0].throttle=!0,n.throttle=!0):D7(r.status)?(n.subsegments[0].error=!0,n.error=!0):sR(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):J7(s)&&this.appendErrorCauseFromPrimitive(n.subsegments[0],s.toString())),this.context.record(Y7,n)}},this.createHttpEvent=(n,r)=>{const s=n;return{version:"1.0.0",request:{url:av(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(Fv,n))},this.recordHttpEventWithError=(n,r)=>{n.error=dR({type:"error",error:r},this.config.stackTraceLength),this.context.record(Fv,n)},this.fetch=(n,r,s,o,a)=>{const u=this.createHttpEvent(o,a);let c;if(!L7(av(o),this.config))return n.apply(r,s);const f=Oge(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(p=>(this.endTrace(c,p,void 0),this.recordHttpEventWithResponse(u,p),p)).catch(p=>{throw this.endTrace(c,void 0,p),this.recordHttpEventWithError(u,p),p})},this.fetchWrapper=()=>{const n=this;return r=>function(s,o){return n.fetch(r,this,arguments,s,o)}},this.config=Object.assign(Object.assign({},k7),e)}get patches(){return[{nodule:window,name:"fetch",wrapper:this.fetchWrapper}]}onload(){this.enable()}isTraceIdHeaderEnabled(e){const n=av(e);return P7(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 Uve extends Error{constructor(e){super(e),this.name="XMLHttpRequest error"}}const Fve="xhr";class zve extends hR{constructor(e){super(Fve),this.addXRayTraceIdHeader=n=>P7(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=Ec();s.trace.end_time=o,s.trace.subsegments[0].end_time=o,s.trace.subsegments[0].http.response={status:r.status},oR(r.status)?(s.trace.subsegments[0].throttle=!0,s.trace.throttle=!0):D7(r.status)?(s.trace.subsegments[0].error=!0,s.trace.error=!0):sR(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=Ec();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 Uve(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=Ec();n.trace=U7(this.config.logicalServiceName,r,this.context.config.enableW3CTraceId),n.trace.subsegments.push(F7(z7(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(db,aR(s.trace.trace_id,s.trace.subsegments[0].id)):this.setRequestHeader(cb,iR(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 L7(o,n.config)&&n.xhrMap.set(this,{url:o,method:s,async:a}),r.apply(this,arguments)}},this.config=Object.assign(Object.assign({},k7),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=Ec();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(Fv,r)}recordHttpEventWithError(e,n,r){this.xhrMap.delete(n);const s={version:"1.0.0",request:{method:e.method,url:e.url},error:dR({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(Fv,s)}recordTraceEvent(e){!this.isSyntheticsUA&&this.isTracingEnabled()&&this.isSessionRecorded()&&this.context.record(Y7,e)}}var Hv={},jve=Object.defineProperty,Bve=(t,e,n)=>e in t?jve(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Se=(t,e,n)=>Bve(t,typeof e!="symbol"?e+"":e,n),$4,Hve=Object.defineProperty,$ve=(t,e,n)=>e in t?Hve(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,q4=(t,e,n)=>$ve(t,typeof e!="symbol"?e+"":e,n),Pn=(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))(Pn||{});const W4={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},G4={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},fm={},qve=()=>!!globalThis.Zone;function SR(t){if(fm[t])return fm[t];const e=globalThis[t],n=e.prototype,r=t in W4?W4[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 G4?G4[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&&!qve())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 ix={};function Ii(t,e,n){var r;const s=`${t}.${String(n)}`;if(ix[s])return ix[s].call(e);const o=SR(t),a=(r=Object.getOwnPropertyDescriptor(o,n))==null?void 0:r.get;return a?(ix[s]=a,a.call(e)):e[n]}const ax={};function dz(t,e,n){const r=`${t}.${String(n)}`;if(ax[r])return ax[r].bind(e);const o=SR(t)[n];return typeof o!="function"?e[n]:(ax[r]=o,o.bind(e))}function Wve(t){return Ii("Node",t,"ownerDocument")}function Gve(t){return Ii("Node",t,"childNodes")}function Vve(t){return Ii("Node",t,"parentNode")}function Kve(t){return Ii("Node",t,"parentElement")}function Yve(t){return Ii("Node",t,"textContent")}function Zve(t,e){return dz("Node",t,"contains")(e)}function Xve(t){return dz("Node",t,"getRootNode")()}function Qve(t){return!t||!("host"in t)?null:Ii("ShadowRoot",t,"host")}function Jve(t){return t.styleSheets}function eye(t){return!t||!("shadowRoot"in t)?null:Ii("Element",t,"shadowRoot")}function tye(t,e){return Ii("Element",t,"querySelector")(e)}function nye(t,e){return Ii("Element",t,"querySelectorAll")(e)}function rye(){return SR("MutationObserver").constructor}function sye(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 cr={ownerDocument:Wve,childNodes:Gve,parentNode:Vve,parentElement:Kve,textContent:Yve,contains:Zve,getRootNode:Xve,host:Qve,styleSheets:Jve,shadowRoot:eye,querySelector:tye,querySelectorAll:nye,mutationObserver:rye,patch:sye};function fz(t){return t.nodeType===t.ELEMENT_NODE}function uh(t){const e=t&&"host"in t&&"mode"in t&&cr.host(t)||null;return!!(e&&"shadowRoot"in e&&cr.shadowRoot(e)===t)}function ch(t){return Object.prototype.toString.call(t)==="[object ShadowRoot]"}function oye(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 iye(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 O_(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=>hz(s,n)).join("");return oye(r)}catch{return null}}function hz(t,e){if(lye(t)){let n;try{n=O_(t.styleSheet)||iye(t)}catch{n=t.cssText}return t.styleSheet.href?Wv(n,t.styleSheet.href):n}else{let n=t.cssText;return uye(t)&&t.selectorText.includes(":")&&(n=aye(n)),e?Wv(n,e):n}}function aye(t){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return t.replace(e,"$1\\$2")}function lye(t){return"styleSheet"in t}function uye(t){return"selectorText"in t}class pz{constructor(){q4(this,"idNodeMap",new Map),q4(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 cye(){return new pz}function $v({element:t,maskInputOptions:e,tagName:n,type:r,value:s,maskInputFn:o}){let a=s||"";const u=r&&Gl(r);return(e[n.toLowerCase()]||u&&e[u])&&(o?a=o(a,t):a="*".repeat(a.length)),a}function Gl(t){return t.toLowerCase()}const V4="__rrweb_original__";function dye(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=V4 in o?o[V4]: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 qv(t){const e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?Gl(e):null}function gz(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 fye(t){let e="";return t.indexOf("//")>-1?e=t.split("/").slice(0,3).join("/"):e=t.split("/")[0],e=e.split("?")[0],e}const hye=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,pye=/^(?:[a-z+]+:)?\/\//i,gye=/^www\..*/i,mye=/^(data:)([^,]*),(.*)/i;function Wv(t,e){return(t||"").replace(hye,(n,r,s,o,a,u)=>{const c=s||a||u,f=r||o||"";if(!c)return n;if(pye.test(c)||gye.test(c))return`url(${f}${c}${f})`;if(mye.test(c))return`url(${f}${c}${f})`;if(c[0]==="/")return`url(${f}${fye(e)+c}${f})`;const p=e.split("/"),g=c.split("/");p.pop();for(const m of g)m!=="."&&(m===".."?p.pop():p.push(m));return`url(${f}${p.join("/")}${f})`})}function hm(t,e=!1){return e?t.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):t.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function vye(t,e,n=!1){const r=Array.from(e.childNodes),s=[];let o=0;if(r.length>1&&t&&typeof t=="string"){let a=hm(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=hm(r[c].textContent,n),p=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=p+1}else g===f.length-1&&(S=a.indexOf(m));if(y.length>=2&&g>p){const E=r[c-1].textContent;if(E&&typeof E=="string"){const C=hm(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=hm(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 yye(t,e){return vye(t,e).join("/* rr_split */")}let bye=1;const Sye=new RegExp("[^a-z0-9-_:]"),Ph=-2;function mz(){return bye++}function Eye(t){if(t instanceof HTMLFormElement)return"form";const e=Gl(t.tagName);return Sye.test(e)?"div":e}let sc,K4;const Cye=/^[^ \t\n\r\u000c]+/,wye=/^[, \t\n\r\u000c]+/;function xye(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(wye),!(n>=e.length);){let o=r(Cye);if(o.slice(-1)===",")o=wc(t,o.substring(0,o.length-1)),s.push(o);else{let a="";o=wc(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 Y4=new WeakMap;function wc(t,e){return!e||e.trim()===""?e:ER(t,e)}function _ye(t){return!!(t.tagName==="svg"||t.ownerSVGElement)}function ER(t,e){let n=Y4.get(t);if(n||(n=t.createElement("a"),Y4.set(t,n)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return n.setAttribute("href",e),n.href}function vz(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)?wc(t,r):n==="srcset"?xye(t,r):n==="style"?Wv(r,ER(t)):e==="object"&&n==="data"?wc(t,r):r)}function yz(t,e,n){return["video","audio"].includes(t)&&e==="autoplay"}function Aye(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 Gv(t,e,n){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return n?Gv(cr.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?Gv(cr.parentNode(t),e,n):!1}function bz(t,e,n,r){let s;if(fz(t)){if(s=t,!cr.childNodes(s).length)return!1}else{if(cr.parentElement(t)===null)return!1;s=cr.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(Gv(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 Tye(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 Rye(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 Iye(t,e){const{doc:n,mirror:r,blockClass:s,blockSelector:o,needsMask:a,inlineStylesheet:u,maskInputOptions:c={},maskTextFn:f,maskInputFn:p,dataURLOptions:g={},inlineImages:m,recordCanvas:y,keepIframeSrcFn:S,newlyAddedElement:E=!1,cssCaptured:C=!1}=e,w=Oye(n,r);switch(t.nodeType){case t.DOCUMENT_NODE:return t.compatMode!=="CSS1Compat"?{type:Pn.Document,childNodes:[],compatMode:t.compatMode}:{type:Pn.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:Pn.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:w};case t.ELEMENT_NODE:return Mye(t,{doc:n,blockClass:s,blockSelector:o,inlineStylesheet:u,maskInputOptions:c,maskInputFn:p,dataURLOptions:g,inlineImages:m,recordCanvas:y,keepIframeSrcFn:S,newlyAddedElement:E,rootId:w});case t.TEXT_NODE:return Nye(t,{doc:n,needsMask:a,maskTextFn:f,rootId:w,cssCaptured:C});case t.CDATA_SECTION_NODE:return{type:Pn.CDATA,textContent:"",rootId:w};case t.COMMENT_NODE:return{type:Pn.Comment,textContent:cr.textContent(t)||"",rootId:w};default:return!1}}function Oye(t,e){if(!e.hasNode(t))return;const n=e.getId(t);return n===1?void 0:n}function Nye(t,e){const{needsMask:n,maskTextFn:r,rootId:s,cssCaptured:o}=e,a=cr.parentNode(t),u=a&&a.tagName;let c="";const f=u==="STYLE"?!0:void 0,p=u==="SCRIPT"?!0:void 0;return p?c="SCRIPT_PLACEHOLDER":o||(c=cr.textContent(t),f&&c&&(c=Wv(c,ER(e.doc)))),!f&&!p&&c&&n&&(c=r?r(c,cr.parentElement(t)):c.replace(/[\S]/g,"*")),{type:Pn.Text,textContent:c||"",rootId:s}}function Mye(t,e){const{doc:n,blockClass:r,blockSelector:s,inlineStylesheet:o,maskInputOptions:a={},maskInputFn:u,dataURLOptions:c={},inlineImages:f,recordCanvas:p,keepIframeSrcFn:g,newlyAddedElement:m=!1,rootId:y}=e,S=Aye(t,r,s),E=Eye(t);let C={};const w=t.attributes.length;for(let T=0;T<w;T++){const R=t.attributes[T];yz(E,R.name,R.value)||(C[R.name]=vz(n,E,Gl(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=O_(T)),R&&(delete C.rel,delete C.href,C._cssText=R)}if(E==="style"&&t.sheet){let T=O_(t.sheet);T&&(t.childNodes.length>1&&(T=yye(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=$v({element:t,type:qv(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"&&p){if(t.__context==="2d")dye(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){sc||(sc=n.createElement("canvas"),K4=sc.getContext("2d"));const T=t,R=T.currentSrc||T.getAttribute("src")||"<unknown-src>",M=T.crossOrigin,O=()=>{T.removeEventListener("load",O);try{sc.width=T.naturalWidth,sc.height=T.naturalHeight,K4.drawImage(T,0,0),C.rr_dataURL=sc.toDataURL(c.type,c.quality)}catch(I){if(T.crossOrigin!=="anonymous"){T.crossOrigin="anonymous",T.complete&&T.naturalWidth!==0?O():T.addEventListener("load",O);return}else console.warn(`Cannot inline img src=${R}! Error: ${I}`)}T.crossOrigin==="anonymous"&&(M?C.crossOrigin=M:T.removeAttribute("crossorigin"))};T.complete&&T.naturalWidth!==0?O():T.addEventListener("load",O)}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 _;try{customElements.get(E)&&(_=!0)}catch{}return{type:Pn.Element,tagName:E,attributes:C,childNodes:[],isSVG:_ye(t)||void 0,needBlock:S,rootId:y,isCustom:_}}function Wt(t){return t==null?"":t.toLowerCase()}function Sz(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 Pye(t,e){if(e.comment&&t.type===Pn.Comment)return!0;if(t.type===Pn.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"&&gz(t.attributes.href)==="js"))return!0;if(e.headFavicon&&(t.tagName==="link"&&t.attributes.rel==="shortcut icon"||t.tagName==="meta"&&(Wt(t.attributes.name).match(/^msapplication-tile(image|color)$/)||Wt(t.attributes.name)==="application-name"||Wt(t.attributes.rel)==="icon"||Wt(t.attributes.rel)==="apple-touch-icon"||Wt(t.attributes.rel)==="shortcut icon")))return!0;if(t.tagName==="meta"){if(e.headMetaDescKeywords&&Wt(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(Wt(t.attributes.property).match(/^(og|twitter|fb):/)||Wt(t.attributes.name).match(/^(og|twitter):/)||Wt(t.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(Wt(t.attributes.name)==="robots"||Wt(t.attributes.name)==="googlebot"||Wt(t.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&t.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(Wt(t.attributes.name)==="author"||Wt(t.attributes.name)==="generator"||Wt(t.attributes.name)==="framework"||Wt(t.attributes.name)==="publisher"||Wt(t.attributes.name)==="progid"||Wt(t.attributes.property).match(/^article:/)||Wt(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(Wt(t.attributes.name)==="google-site-verification"||Wt(t.attributes.name)==="yandex-verification"||Wt(t.attributes.name)==="csrf-token"||Wt(t.attributes.name)==="p:domain_verify"||Wt(t.attributes.name)==="verify-v1"||Wt(t.attributes.name)==="verification"||Wt(t.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function xc(t,e){const{doc:n,mirror:r,blockClass:s,blockSelector:o,maskTextClass:a,maskTextSelector:u,skipChild:c=!1,inlineStylesheet:f=!0,maskInputOptions:p={},maskTextFn:g,maskInputFn:m,slimDOMOptions:y,dataURLOptions:S={},inlineImages:E=!1,recordCanvas:C=!1,onSerialize:w,onIframeLoad:_,iframeLoadTimeout:T=5e3,onStylesheetLoad:R,stylesheetLoadTimeout:M=5e3,keepIframeSrcFn:O=()=>!1,newlyAddedElement:I=!1,cssCaptured:P=!1}=e;let{needsMask:k}=e,{preserveWhiteSpace:H=!0}=e;k||(k=bz(t,a,u,k===void 0));const F=Iye(t,{doc:n,mirror:r,blockClass:s,blockSelector:o,needsMask:k,inlineStylesheet:f,maskInputOptions:p,maskTextFn:g,maskInputFn:m,dataURLOptions:S,inlineImages:E,recordCanvas:C,keepIframeSrcFn:O,newlyAddedElement:I,cssCaptured:P});if(!F)return console.warn(t,"not serialized"),null;let j;r.hasNode(t)?j=r.getId(t):Pye(F,y)||!H&&F.type===Pn.Text&&!F.textContent.replace(/^\s+|\s+$/gm,"").length?j=Ph:j=mz();const W=Object.assign(F,{id:j});if(r.add(t,W),j===Ph)return null;w&&w(t);let Y=!c;if(W.type===Pn.Element){Y=Y&&!W.needBlock,delete W.needBlock;const $=cr.shadowRoot(t);$&&ch($)&&(W.isShadowHost=!0)}if((W.type===Pn.Document||W.type===Pn.Element)&&Y){y.headWhitespace&&W.type===Pn.Element&&W.tagName==="head"&&(H=!1);const $={doc:n,mirror:r,blockClass:s,blockSelector:o,needsMask:k,maskTextClass:a,maskTextSelector:u,skipChild:c,inlineStylesheet:f,maskInputOptions:p,maskTextFn:g,maskInputFn:m,slimDOMOptions:y,dataURLOptions:S,inlineImages:E,recordCanvas:C,preserveWhiteSpace:H,onSerialize:w,onIframeLoad:_,iframeLoadTimeout:T,onStylesheetLoad:R,stylesheetLoadTimeout:M,keepIframeSrcFn:O,cssCaptured:!1};if(!(W.type===Pn.Element&&W.tagName==="textarea"&&W.attributes.value!==void 0)){W.type===Pn.Element&&W.attributes._cssText!==void 0&&typeof W.attributes._cssText=="string"&&($.cssCaptured=!0);for(const fe of Array.from(cr.childNodes(t))){const de=xc(fe,$);de&&W.childNodes.push(de)}}let ee=null;if(fz(t)&&(ee=cr.shadowRoot(t)))for(const fe of Array.from(cr.childNodes(ee))){const de=xc(fe,$);de&&(ch(ee)&&(de.isShadow=!0),W.childNodes.push(de))}}const ne=cr.parentNode(t);return ne&&uh(ne)&&ch(ne)&&(W.isShadow=!0),W.type===Pn.Element&&W.tagName==="iframe"&&Tye(t,()=>{const $=t.contentDocument;if($&&_){const ee=xc($,{doc:$,mirror:r,blockClass:s,blockSelector:o,needsMask:k,maskTextClass:a,maskTextSelector:u,skipChild:!1,inlineStylesheet:f,maskInputOptions:p,maskTextFn:g,maskInputFn:m,slimDOMOptions:y,dataURLOptions:S,inlineImages:E,recordCanvas:C,preserveWhiteSpace:H,onSerialize:w,onIframeLoad:_,iframeLoadTimeout:T,onStylesheetLoad:R,stylesheetLoadTimeout:M,keepIframeSrcFn:O});ee&&_(t,ee)}},T),W.type===Pn.Element&&W.tagName==="link"&&typeof W.attributes.rel=="string"&&(W.attributes.rel==="stylesheet"||W.attributes.rel==="preload"&&typeof W.attributes.href=="string"&&gz(W.attributes.href)==="css")&&Rye(t,()=>{if(R){const $=xc(t,{doc:n,mirror:r,blockClass:s,blockSelector:o,needsMask:k,maskTextClass:a,maskTextSelector:u,skipChild:!1,inlineStylesheet:f,maskInputOptions:p,maskTextFn:g,maskInputFn:m,slimDOMOptions:y,dataURLOptions:S,inlineImages:E,recordCanvas:C,preserveWhiteSpace:H,onSerialize:w,onIframeLoad:_,iframeLoadTimeout:T,onStylesheetLoad:R,stylesheetLoadTimeout:M,keepIframeSrcFn:O});$&&R(t,$)}},M),W}function kye(t,e){const{mirror:n=new pz,blockClass:r="rr-block",blockSelector:s=null,maskTextClass:o="rr-mask",maskTextSelector:a=null,inlineStylesheet:u=!0,inlineImages:c=!1,recordCanvas:f=!1,maskAllInputs:p=!1,maskTextFn:g,maskInputFn:m,slimDOM:y=!1,dataURLOptions:S,preserveWhiteSpace:E,onSerialize:C,onIframeLoad:w,iframeLoadTimeout:_,onStylesheetLoad:T,stylesheetLoadTimeout:R,keepIframeSrcFn:M=()=>!1}=e||{},O=p===!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}:p===!1?{password:!0}:p,I=Sz(y);return xc(t,{doc:t,mirror:n,blockClass:r,blockSelector:s,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:O,maskTextFn:g,maskInputFn:m,slimDOMOptions:I,dataURLOptions:S,inlineImages:c,recordCanvas:f,preserveWhiteSpace:E,onSerialize:C,onIframeLoad:w,iframeLoadTimeout:_,onStylesheetLoad:T,stylesheetLoadTimeout:R,keepIframeSrcFn:M,newlyAddedElement:!1})}function Dye(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Lye(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 CR={exports:{}},Zt=String,Ez=function(){return{isColorSupported:!1,reset:Zt,bold:Zt,dim:Zt,italic:Zt,underline:Zt,inverse:Zt,hidden:Zt,strikethrough:Zt,black:Zt,red:Zt,green:Zt,yellow:Zt,blue:Zt,magenta:Zt,cyan:Zt,white:Zt,gray:Zt,bgBlack:Zt,bgRed:Zt,bgGreen:Zt,bgYellow:Zt,bgBlue:Zt,bgMagenta:Zt,bgCyan:Zt,bgWhite:Zt}};CR.exports=Ez();CR.exports.createColors=Ez;var Uye=CR.exports;const Fye={},zye=Object.freeze(Object.defineProperty({__proto__:null,default:Fye},Symbol.toStringTag,{value:"Module"})),Js=Lye(zye);let Z4=Uye,X4=Js,N_=class Cz 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,Cz)}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=Z4.isColorSupported),X4&&e&&(n=X4(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:p,red:g}=Z4.createColors(!0);u=m=>f(g(m)),c=m=>p(m)}else u=c=f=>f;return r.slice(s,o).map((f,p)=>{let g=s+1+p,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
243
  `+y+u("^")}return" "+c(m)+f}).join(`
244
244
  `)}toString(){let e=this.showSourceCode();return e&&(e=`
245
245
 
246
246
  `+e+`
247
- `),this.name+": "+this.message+e}};var wR=N_;N_.default=N_;var ap={};ap.isClean=Symbol("isClean");ap.my=Symbol("my");const QU={after:`
247
+ `),this.name+": "+this.message+e}};var wR=N_;N_.default=N_;var ap={};ap.isClean=Symbol("isClean");ap.my=Symbol("my");const Q4={after:`
248
248
  `,beforeClose:`
249
249
  `,beforeComment:`
250
250
  `,beforeDecl:`
251
251
  `,beforeOpen:" ",beforeRule:`
252
252
  `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function jye(t){return t[0].toUpperCase()+t.slice(1)}let M_=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 QU[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"+jye(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=QU[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(`
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 Q4[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"+jye(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=Q4[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
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
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
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
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
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 wz=M_;M_.default=M_;let Bye=wz;function P_(t,e){new Bye(e).stringify(t)}var vb=P_;P_.default=P_;let{isClean:pm,my:Hye}=ap,$ye=wR,qye=wz,Wye=vb;function k_(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=>k_(a,n)):(o==="object"&&s!==null&&(s=k_(s)),n[r]=s)}return n}let D_=class{constructor(e={}){this.raws={},this[pm]=!1,this[Hye]=!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=k_(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 $ye(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[pm]){this[pm]=!1;let e=this;for(;e=e.parent;)e[pm]=!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 qye().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=Wye){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 yb=D_;D_.default=D_;let Gye=yb,L_=class extends Gye{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 bb=L_;L_.default=L_;let Vye="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Kye=(t=21)=>{let e="",n=t;for(;n--;)e+=Vye[Math.random()*64|0];return e};var Yye={nanoid:Kye};let{SourceMapConsumer:JU,SourceMapGenerator:e4}=Js,{existsSync:Zye,readFileSync:Xye}=Js,{dirname:lx,join:Qye}=Js;function Jye(t){return Buffer?Buffer.from(t,"base64").toString():window.atob(t)}let U_=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=lx(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new JU(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 Jye(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=lx(e),Zye(e))return this.mapFile=e,Xye(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 JU)return e4.fromSourceMap(n).toString();if(n instanceof e4)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=Qye(lx(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 xz=U_;U_.default=U_;let{SourceMapConsumer:ebe,SourceMapGenerator:tbe}=Js,{fileURLToPath:t4,pathToFileURL:gm}=Js,{isAbsolute:F_,resolve:z_}=Js,{nanoid:nbe}=Yye,ux=Js,n4=wR,rbe=xz,cx=Symbol("fromOffsetCache"),sbe=!!(ebe&&tbe),r4=!!(z_&&F_),Vv=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&&(!r4||/^\w+:\/\//.test(n.from)||F_(n.from)?this.file=n.from:this.file=z_(n.from)),r4&&sbe){let r=new rbe(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 "+nbe(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,p=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 p.offset=="number"){let g=this.fromOffset(p.offset);a=g.line,u=g.col}else a=p.line,u=p.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 n4(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 n4(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&&(gm&&(o.input.url=gm(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let n,r;if(this[cx])r=this[cx];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[cx]=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:z_(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;F_(a.source)?c=gm(a.source):c=new URL(a.source,this.map.consumer().sourceRoot||gm(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(t4)f.file=t4(c);else throw new Error("file: protocol is not available in this PostCSS build");let p=o.sourceContentFor(a.source);return p&&(f.source=p),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 Sb=Vv;Vv.default=Vv;ux&&ux.registerInput&&ux.registerInput(Vv);let{SourceMapConsumer:_z,SourceMapGenerator:lv}=Js,{dirname:uv,relative:Az,resolve:Tz,sep:Rz}=Js,{pathToFileURL:s4}=Js,obe=Sb,ibe=!!(_z&&lv),abe=!!(uv&&Tz&&Az&&Rz),lbe=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=`
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 qye().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=Wye){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 yb=D_;D_.default=D_;let Gye=yb,L_=class extends Gye{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 bb=L_;L_.default=L_;let Vye="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Kye=(t=21)=>{let e="",n=t;for(;n--;)e+=Vye[Math.random()*64|0];return e};var Yye={nanoid:Kye};let{SourceMapConsumer:J4,SourceMapGenerator:eU}=Js,{existsSync:Zye,readFileSync:Xye}=Js,{dirname:lx,join:Qye}=Js;function Jye(t){return Buffer?Buffer.from(t,"base64").toString():window.atob(t)}let U_=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=lx(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new J4(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 Jye(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=lx(e),Zye(e))return this.mapFile=e,Xye(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 J4)return eU.fromSourceMap(n).toString();if(n instanceof eU)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=Qye(lx(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 xz=U_;U_.default=U_;let{SourceMapConsumer:ebe,SourceMapGenerator:tbe}=Js,{fileURLToPath:tU,pathToFileURL:gm}=Js,{isAbsolute:F_,resolve:z_}=Js,{nanoid:nbe}=Yye,ux=Js,nU=wR,rbe=xz,cx=Symbol("fromOffsetCache"),sbe=!!(ebe&&tbe),rU=!!(z_&&F_),Vv=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&&(!rU||/^\w+:\/\//.test(n.from)||F_(n.from)?this.file=n.from:this.file=z_(n.from)),rU&&sbe){let r=new rbe(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 "+nbe(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,p=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 p.offset=="number"){let g=this.fromOffset(p.offset);a=g.line,u=g.col}else a=p.line,u=p.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 nU(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 nU(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&&(gm&&(o.input.url=gm(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let n,r;if(this[cx])r=this[cx];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[cx]=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:z_(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;F_(a.source)?c=gm(a.source):c=new URL(a.source,this.map.consumer().sourceRoot||gm(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(tU)f.file=tU(c);else throw new Error("file: protocol is not available in this PostCSS build");let p=o.sourceContentFor(a.source);return p&&(f.source=p),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 Sb=Vv;Vv.default=Vv;ux&&ux.registerInput&&ux.registerInput(Vv);let{SourceMapConsumer:_z,SourceMapGenerator:lv}=Js,{dirname:uv,relative:Az,resolve:Tz,sep:Rz}=Js,{pathToFileURL:sU}=Js,obe=Sb,ibe=!!(_z&&lv),abe=!!(uv&&Tz&&Az&&Rz),lbe=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
261
  `;this.css.includes(`\r
262
262
  `)&&(n=`\r
263
263
  `),this.css+=n+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let n=this.toUrl(this.path(e.file)),r=e.root||uv(e.file),s;this.mapOpts.sourcesContent===!1?(s=new _z(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(),abe&&ibe&&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=lv.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new lv({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 lv({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 p=c.parent||{raws:{}};(!(c.type==="decl"||c.type==="atrule"&&!c.nodes)||c!==p.last||p.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?uv(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=uv(Tz(r,this.mapOpts.annotation)));let s=Az(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 obe(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(s4){let r=s4(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;Rz==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var Iz=lbe;let ube=yb,j_=class extends ube{constructor(e){super(e),this.type="comment"}};var Eb=j_;j_.default=j_;let{isClean:Oz,my:Nz}=ap,Mz=bb,Pz=Eb,cbe=yb,kz,xR,_R,Dz;function Lz(t){return t.map(e=>(e.nodes&&(e.nodes=Lz(e.nodes)),delete e.source,e))}function Uz(t){if(t[Oz]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)Uz(e)}let Ci=class Fz extends cbe{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=Lz(kz(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 Mz(e)]}else if(e.selector)e=[new xR(e)];else if(e.name)e=[new _R(e)];else if(e.text)e=[new Pz(e)];else throw new Error("Unknown node type in node creation");return e.map(s=>(s[Nz]||Fz.rebuild(s),s=s.proxyOf,s.parent&&s.parent.removeChild(s),s[Oz]&&Uz(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]}};Ci.registerParse=t=>{kz=t};Ci.registerRule=t=>{xR=t};Ci.registerAtRule=t=>{_R=t};Ci.registerRoot=t=>{Dz=t};var au=Ci;Ci.default=Ci;Ci.rebuild=t=>{t.type==="atrule"?Object.setPrototypeOf(t,_R.prototype):t.type==="rule"?Object.setPrototypeOf(t,xR.prototype):t.type==="decl"?Object.setPrototypeOf(t,Mz.prototype):t.type==="comment"?Object.setPrototypeOf(t,Pz.prototype):t.type==="root"&&Object.setPrototypeOf(t,Dz.prototype),t[Nz]=!0,t.nodes&&t.nodes.forEach(e=>{Ci.rebuild(e)})};let dbe=au,zz,jz,kh=class extends dbe{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new zz(new jz,this,e).stringify()}};kh.registerLazyResult=t=>{zz=t};kh.registerProcessor=t=>{jz=t};var AR=kh;kh.default=kh;let B_=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 Bz=B_;B_.default=B_;let fbe=Bz,H_=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 fbe(e,n);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var TR=H_;H_.default=H_;const dx=39,o4=34,mm=92,i4=47,vm=10,Pf=32,ym=12,bm=9,Sm=13,hbe=91,pbe=93,gbe=40,mbe=41,vbe=123,ybe=125,bbe=59,Sbe=42,Ebe=58,Cbe=64,Em=/[\t\n\f\r "#'()/;[\\\]{}]/g,Cm=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,wbe=/.[\r\n"'(/\\]/,a4=/[\da-f]/i;var xbe=function(e,n={}){let r=e.css.valueOf(),s=n.ignoreErrors,o,a,u,c,f,p,g,m,y,S,E=r.length,C=0,w=[],_=[];function T(){return C}function R(P){throw e.error("Unclosed "+P,C)}function M(){return _.length===0&&C>=E}function O(P){if(_.length)return _.pop();if(C>=E)return;let k=P?P.ignoreUnclosed:!1;switch(o=r.charCodeAt(C),o){case vm:case Pf:case bm:case Sm:case ym:{a=C;do a+=1,o=r.charCodeAt(a);while(o===Pf||o===vm||o===bm||o===Sm||o===ym);S=["space",r.slice(C,a)],C=a-1;break}case hbe:case pbe:case vbe:case ybe:case Ebe:case bbe:case mbe:{let H=String.fromCharCode(o);S=[H,H,C];break}case gbe:{if(m=w.length?w.pop()[1]:"",y=r.charCodeAt(C+1),m==="url"&&y!==dx&&y!==o4&&y!==Pf&&y!==vm&&y!==bm&&y!==ym&&y!==Sm){a=C;do{if(p=!1,a=r.indexOf(")",a+1),a===-1)if(s||k){a=C;break}else R("bracket");for(g=a;r.charCodeAt(g-1)===mm;)g-=1,p=!p}while(p);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||wbe.test(c)?S=["(","(",C]:(S=["brackets",c,C,a],C=a);break}case dx:case o4:{u=o===dx?"'":'"',a=C;do{if(p=!1,a=r.indexOf(u,a+1),a===-1)if(s||k){a=C+1;break}else R("string");for(g=a;r.charCodeAt(g-1)===mm;)g-=1,p=!p}while(p);S=["string",r.slice(C,a+1),C,a],C=a;break}case Cbe:{Em.lastIndex=C+1,Em.test(r),Em.lastIndex===0?a=r.length-1:a=Em.lastIndex-2,S=["at-word",r.slice(C,a+1),C,a],C=a;break}case mm:{for(a=C,f=!0;r.charCodeAt(a+1)===mm;)a+=1,f=!f;if(o=r.charCodeAt(a+1),f&&o!==i4&&o!==Pf&&o!==vm&&o!==bm&&o!==Sm&&o!==ym&&(a+=1,a4.test(r.charAt(a)))){for(;a4.test(r.charAt(a+1));)a+=1;r.charCodeAt(a+1)===Pf&&(a+=1)}S=["word",r.slice(C,a+1),C,a],C=a;break}default:{o===i4&&r.charCodeAt(C+1)===Sbe?(a=r.indexOf("*/",C+2)+1,a===0&&(s||k?a=r.length:R("comment")),S=["comment",r.slice(C,a+1),C,a],C=a):(Cm.lastIndex=C+1,Cm.test(r),Cm.lastIndex===0?a=r.length-1:a=Cm.lastIndex-2,S=["word",r.slice(C,a+1),C,a],w.push(S),C=a);break}}return C++,S}function I(P){_.push(P)}return{back:I,endOfFile:M,nextToken:O,position:T}};let Hz=au,Kv=class extends Hz{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 RR=Kv;Kv.default=Kv;Hz.registerAtRule(Kv);let $z=au,qz,Wz,zc=class extends $z{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 qz(new Wz,this,e).stringify()}};zc.registerLazyResult=t=>{qz=t};zc.registerProcessor=t=>{Wz=t};var lp=zc;zc.default=zc;$z.registerRoot(zc);let Dh={comma(t){return Dh.split(t,[","],!0)},space(t){let e=[" ",`
265
- `," "];return Dh.split(t,e)},split(t,e,n){let r=[],s="",o=!1,a=0,u=!1,c="",f=!1;for(let p of t)f?f=!1:p==="\\"?f=!0:u?p===c&&(u=!1):p==='"'||p==="'"?(u=!0,c=p):p==="("?a+=1:p===")"?a>0&&(a-=1):a===0&&e.includes(p)&&(o=!0),o?(s!==""&&r.push(s.trim()),s="",o=!1):s+=p;return(n||s!=="")&&r.push(s.trim()),r}};var Gz=Dh;Dh.default=Dh;let Vz=au,_be=Gz,Yv=class extends Vz{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return _be.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 IR=Yv;Yv.default=Yv;Vz.registerRule(Yv);let Abe=bb,Tbe=xbe,Rbe=Eb,Ibe=RR,Obe=lp,l4=IR;const u4={empty:!0,space:!0};function Nbe(t){for(let e=t.length-1;e>=0;e--){let n=t[e],r=n[3]||n[2];if(r)return r}}let Mbe=class{constructor(e){this.input=e,this.root=new Obe,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 Ibe;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 Rbe;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=Tbe(this.input)}decl(e,n){let r=new Abe;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]||Nbe(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 p=this.stringFrom(e,f);p=this.spacesFromEnd(e)+p,p!==" !important"&&(r.raws.important=p);break}else if(o[1].toLowerCase()==="important"){let p=e.slice(0),g="";for(let m=f;m>0;m--){let y=p[m][0];if(g.trim().indexOf("!")===0&&y!=="space")break;g=p.pop()[1]+g}g.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=g,e=p)}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 l4;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,p,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",p=r[m+1]?r[m+1][0]:"empty",!u4[g]&&!u4[p]?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 l4;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 Pbe=Mbe;let kbe=au,Dbe=Pbe,Lbe=Sb;function Zv(t,e){let n=new Lbe(t,e),r=new Dbe(n);try{r.parse()}catch(s){throw s}return r.root}var OR=Zv;Zv.default=Zv;kbe.registerParse(Zv);let{isClean:vo,my:Ube}=ap,Fbe=Iz,zbe=vb,jbe=au,Bbe=AR,c4=TR,Hbe=OR,$be=lp;const qbe={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Wbe={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},Gbe={Once:!0,postcssPlugin:!0,prepare:!0},jc=0;function kf(t){return typeof t=="object"&&typeof t.then=="function"}function Kz(t){let e=!1,n=qbe[t.type];return t.type==="decl"?e=t.prop.toLowerCase():t.type==="atrule"&&(e=t.name.toLowerCase()),e&&t.append?[n,n+"-"+e,jc,n+"Exit",n+"Exit-"+e]:e?[n,n+"-"+e,n+"Exit",n+"Exit-"+e]:t.append?[n,jc,n+"Exit"]:[n,n+"Exit"]}function d4(t){let e;return t.type==="document"?e=["Document",jc,"DocumentExit"]:t.type==="root"?e=["Root",jc,"RootExit"]:e=Kz(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function $_(t){return t[vo]=!1,t.nodes&&t.nodes.forEach(e=>$_(e)),t}let q_={},Bc=class Yz{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=$_(n);else if(n instanceof Yz||n instanceof c4)s=$_(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=Hbe;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[Ube]&&jbe.rebuild(s)}this.result=new c4(e,s,r),this.helpers={...q_,postcss:q_,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(!Wbe[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${n.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Gbe[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(kf(r))try{await r}catch(s){throw this.handleError(s)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[vo];){e[vo]=!0;let n=[d4(e)];for(;n.length>0;){let r=this.visitTick(n);if(kf(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 kf(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=zbe;e.syntax&&(n=e.syntax.stringify),e.stringifier&&(n=e.stringifier),n.stringify&&(n=n.stringify);let s=new Fbe(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(kf(n))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[vo];)e[vo]=!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(kf(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[vo]){u[vo]=!0,e.push(d4(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===jc){r.nodes&&r.nodes.length&&(r[vo]=!0,n.iterator=r.getIterator());return}else if(this.listeners[a]){n.visitors=this.listeners[a];return}}e.pop()}walkSync(e){e[vo]=!0;let n=Kz(e);for(let r of n)if(r===jc)e.nodes&&e.each(s=>{s[vo]||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"}};Bc.registerPostcss=t=>{q_=t};var Zz=Bc;Bc.default=Bc;$be.registerLazyResult(Bc);Bbe.registerLazyResult(Bc);let Vbe=Iz,Kbe=vb,Ybe=OR;const Zbe=TR;let W_=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=Kbe;this.result=new Zbe(this._processor,s,this._opts),this.result.css=n;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let u=new Vbe(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=Ybe;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 Xbe=W_;W_.default=W_;let Qbe=Xbe,Jbe=Zz,e0e=AR,t0e=lp,Lh=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 Qbe(this,e,n):new Jbe(this,e,n)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var n0e=Lh;Lh.default=Lh;t0e.registerProcessor(Lh);e0e.registerProcessor(Lh);let r0e=bb,s0e=xz,o0e=Eb,i0e=RR,a0e=Sb,l0e=lp,u0e=IR;function Uh(t,e){if(Array.isArray(t))return t.map(s=>Uh(s));let{inputs:n,...r}=t;if(n){e=[];for(let s of n){let o={...s,__proto__:a0e.prototype};o.map&&(o.map={...o.map,__proto__:s0e.prototype}),e.push(o)}}if(r.nodes&&(r.nodes=t.nodes.map(s=>Uh(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 l0e(r);if(r.type==="decl")return new r0e(r);if(r.type==="rule")return new u0e(r);if(r.type==="comment")return new o0e(r);if(r.type==="atrule")return new i0e(r);throw new Error("Unknown node type: "+t.type)}var c0e=Uh;Uh.default=Uh;let d0e=wR,Xz=bb,f0e=Zz,h0e=au,NR=n0e,p0e=vb,g0e=c0e,Qz=AR,m0e=Bz,Jz=Eb,ej=RR,v0e=TR,y0e=Sb,b0e=OR,S0e=Gz,tj=IR,nj=lp,E0e=yb;function Dt(...t){return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new NR(t)}Dt.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:
264
+ `),n=u.length-a):n+=u.length,c&&f!=="start"){let p=c.parent||{raws:{}};(!(c.type==="decl"||c.type==="atrule"&&!c.nodes)||c!==p.last||p.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?uv(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=uv(Tz(r,this.mapOpts.annotation)));let s=Az(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 obe(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(sU){let r=sU(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;Rz==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var Iz=lbe;let ube=yb,j_=class extends ube{constructor(e){super(e),this.type="comment"}};var Eb=j_;j_.default=j_;let{isClean:Oz,my:Nz}=ap,Mz=bb,Pz=Eb,cbe=yb,kz,xR,_R,Dz;function Lz(t){return t.map(e=>(e.nodes&&(e.nodes=Lz(e.nodes)),delete e.source,e))}function Uz(t){if(t[Oz]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)Uz(e)}let Ci=class Fz extends cbe{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=Lz(kz(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 Mz(e)]}else if(e.selector)e=[new xR(e)];else if(e.name)e=[new _R(e)];else if(e.text)e=[new Pz(e)];else throw new Error("Unknown node type in node creation");return e.map(s=>(s[Nz]||Fz.rebuild(s),s=s.proxyOf,s.parent&&s.parent.removeChild(s),s[Oz]&&Uz(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]}};Ci.registerParse=t=>{kz=t};Ci.registerRule=t=>{xR=t};Ci.registerAtRule=t=>{_R=t};Ci.registerRoot=t=>{Dz=t};var au=Ci;Ci.default=Ci;Ci.rebuild=t=>{t.type==="atrule"?Object.setPrototypeOf(t,_R.prototype):t.type==="rule"?Object.setPrototypeOf(t,xR.prototype):t.type==="decl"?Object.setPrototypeOf(t,Mz.prototype):t.type==="comment"?Object.setPrototypeOf(t,Pz.prototype):t.type==="root"&&Object.setPrototypeOf(t,Dz.prototype),t[Nz]=!0,t.nodes&&t.nodes.forEach(e=>{Ci.rebuild(e)})};let dbe=au,zz,jz,kh=class extends dbe{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new zz(new jz,this,e).stringify()}};kh.registerLazyResult=t=>{zz=t};kh.registerProcessor=t=>{jz=t};var AR=kh;kh.default=kh;let B_=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 Bz=B_;B_.default=B_;let fbe=Bz,H_=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 fbe(e,n);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var TR=H_;H_.default=H_;const dx=39,oU=34,mm=92,iU=47,vm=10,Pf=32,ym=12,bm=9,Sm=13,hbe=91,pbe=93,gbe=40,mbe=41,vbe=123,ybe=125,bbe=59,Sbe=42,Ebe=58,Cbe=64,Em=/[\t\n\f\r "#'()/;[\\\]{}]/g,Cm=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,wbe=/.[\r\n"'(/\\]/,aU=/[\da-f]/i;var xbe=function(e,n={}){let r=e.css.valueOf(),s=n.ignoreErrors,o,a,u,c,f,p,g,m,y,S,E=r.length,C=0,w=[],_=[];function T(){return C}function R(P){throw e.error("Unclosed "+P,C)}function M(){return _.length===0&&C>=E}function O(P){if(_.length)return _.pop();if(C>=E)return;let k=P?P.ignoreUnclosed:!1;switch(o=r.charCodeAt(C),o){case vm:case Pf:case bm:case Sm:case ym:{a=C;do a+=1,o=r.charCodeAt(a);while(o===Pf||o===vm||o===bm||o===Sm||o===ym);S=["space",r.slice(C,a)],C=a-1;break}case hbe:case pbe:case vbe:case ybe:case Ebe:case bbe:case mbe:{let H=String.fromCharCode(o);S=[H,H,C];break}case gbe:{if(m=w.length?w.pop()[1]:"",y=r.charCodeAt(C+1),m==="url"&&y!==dx&&y!==oU&&y!==Pf&&y!==vm&&y!==bm&&y!==ym&&y!==Sm){a=C;do{if(p=!1,a=r.indexOf(")",a+1),a===-1)if(s||k){a=C;break}else R("bracket");for(g=a;r.charCodeAt(g-1)===mm;)g-=1,p=!p}while(p);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||wbe.test(c)?S=["(","(",C]:(S=["brackets",c,C,a],C=a);break}case dx:case oU:{u=o===dx?"'":'"',a=C;do{if(p=!1,a=r.indexOf(u,a+1),a===-1)if(s||k){a=C+1;break}else R("string");for(g=a;r.charCodeAt(g-1)===mm;)g-=1,p=!p}while(p);S=["string",r.slice(C,a+1),C,a],C=a;break}case Cbe:{Em.lastIndex=C+1,Em.test(r),Em.lastIndex===0?a=r.length-1:a=Em.lastIndex-2,S=["at-word",r.slice(C,a+1),C,a],C=a;break}case mm:{for(a=C,f=!0;r.charCodeAt(a+1)===mm;)a+=1,f=!f;if(o=r.charCodeAt(a+1),f&&o!==iU&&o!==Pf&&o!==vm&&o!==bm&&o!==Sm&&o!==ym&&(a+=1,aU.test(r.charAt(a)))){for(;aU.test(r.charAt(a+1));)a+=1;r.charCodeAt(a+1)===Pf&&(a+=1)}S=["word",r.slice(C,a+1),C,a],C=a;break}default:{o===iU&&r.charCodeAt(C+1)===Sbe?(a=r.indexOf("*/",C+2)+1,a===0&&(s||k?a=r.length:R("comment")),S=["comment",r.slice(C,a+1),C,a],C=a):(Cm.lastIndex=C+1,Cm.test(r),Cm.lastIndex===0?a=r.length-1:a=Cm.lastIndex-2,S=["word",r.slice(C,a+1),C,a],w.push(S),C=a);break}}return C++,S}function I(P){_.push(P)}return{back:I,endOfFile:M,nextToken:O,position:T}};let Hz=au,Kv=class extends Hz{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 RR=Kv;Kv.default=Kv;Hz.registerAtRule(Kv);let $z=au,qz,Wz,zc=class extends $z{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 qz(new Wz,this,e).stringify()}};zc.registerLazyResult=t=>{qz=t};zc.registerProcessor=t=>{Wz=t};var lp=zc;zc.default=zc;$z.registerRoot(zc);let Dh={comma(t){return Dh.split(t,[","],!0)},space(t){let e=[" ",`
265
+ `," "];return Dh.split(t,e)},split(t,e,n){let r=[],s="",o=!1,a=0,u=!1,c="",f=!1;for(let p of t)f?f=!1:p==="\\"?f=!0:u?p===c&&(u=!1):p==='"'||p==="'"?(u=!0,c=p):p==="("?a+=1:p===")"?a>0&&(a-=1):a===0&&e.includes(p)&&(o=!0),o?(s!==""&&r.push(s.trim()),s="",o=!1):s+=p;return(n||s!=="")&&r.push(s.trim()),r}};var Gz=Dh;Dh.default=Dh;let Vz=au,_be=Gz,Yv=class extends Vz{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return _be.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 IR=Yv;Yv.default=Yv;Vz.registerRule(Yv);let Abe=bb,Tbe=xbe,Rbe=Eb,Ibe=RR,Obe=lp,lU=IR;const uU={empty:!0,space:!0};function Nbe(t){for(let e=t.length-1;e>=0;e--){let n=t[e],r=n[3]||n[2];if(r)return r}}let Mbe=class{constructor(e){this.input=e,this.root=new Obe,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 Ibe;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 Rbe;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=Tbe(this.input)}decl(e,n){let r=new Abe;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]||Nbe(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 p=this.stringFrom(e,f);p=this.spacesFromEnd(e)+p,p!==" !important"&&(r.raws.important=p);break}else if(o[1].toLowerCase()==="important"){let p=e.slice(0),g="";for(let m=f;m>0;m--){let y=p[m][0];if(g.trim().indexOf("!")===0&&y!=="space")break;g=p.pop()[1]+g}g.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=g,e=p)}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 lU;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,p,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",p=r[m+1]?r[m+1][0]:"empty",!uU[g]&&!uU[p]?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 lU;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 Pbe=Mbe;let kbe=au,Dbe=Pbe,Lbe=Sb;function Zv(t,e){let n=new Lbe(t,e),r=new Dbe(n);try{r.parse()}catch(s){throw s}return r.root}var OR=Zv;Zv.default=Zv;kbe.registerParse(Zv);let{isClean:vo,my:Ube}=ap,Fbe=Iz,zbe=vb,jbe=au,Bbe=AR,cU=TR,Hbe=OR,$be=lp;const qbe={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Wbe={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},Gbe={Once:!0,postcssPlugin:!0,prepare:!0},jc=0;function kf(t){return typeof t=="object"&&typeof t.then=="function"}function Kz(t){let e=!1,n=qbe[t.type];return t.type==="decl"?e=t.prop.toLowerCase():t.type==="atrule"&&(e=t.name.toLowerCase()),e&&t.append?[n,n+"-"+e,jc,n+"Exit",n+"Exit-"+e]:e?[n,n+"-"+e,n+"Exit",n+"Exit-"+e]:t.append?[n,jc,n+"Exit"]:[n,n+"Exit"]}function dU(t){let e;return t.type==="document"?e=["Document",jc,"DocumentExit"]:t.type==="root"?e=["Root",jc,"RootExit"]:e=Kz(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function $_(t){return t[vo]=!1,t.nodes&&t.nodes.forEach(e=>$_(e)),t}let q_={},Bc=class Yz{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=$_(n);else if(n instanceof Yz||n instanceof cU)s=$_(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=Hbe;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[Ube]&&jbe.rebuild(s)}this.result=new cU(e,s,r),this.helpers={...q_,postcss:q_,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(!Wbe[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${n.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Gbe[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(kf(r))try{await r}catch(s){throw this.handleError(s)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[vo];){e[vo]=!0;let n=[dU(e)];for(;n.length>0;){let r=this.visitTick(n);if(kf(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 kf(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=zbe;e.syntax&&(n=e.syntax.stringify),e.stringifier&&(n=e.stringifier),n.stringify&&(n=n.stringify);let s=new Fbe(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(kf(n))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[vo];)e[vo]=!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(kf(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[vo]){u[vo]=!0,e.push(dU(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===jc){r.nodes&&r.nodes.length&&(r[vo]=!0,n.iterator=r.getIterator());return}else if(this.listeners[a]){n.visitors=this.listeners[a];return}}e.pop()}walkSync(e){e[vo]=!0;let n=Kz(e);for(let r of n)if(r===jc)e.nodes&&e.each(s=>{s[vo]||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"}};Bc.registerPostcss=t=>{q_=t};var Zz=Bc;Bc.default=Bc;$be.registerLazyResult(Bc);Bbe.registerLazyResult(Bc);let Vbe=Iz,Kbe=vb,Ybe=OR;const Zbe=TR;let W_=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=Kbe;this.result=new Zbe(this._processor,s,this._opts),this.result.css=n;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let u=new Vbe(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=Ybe;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 Xbe=W_;W_.default=W_;let Qbe=Xbe,Jbe=Zz,e0e=AR,t0e=lp,Lh=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 Qbe(this,e,n):new Jbe(this,e,n)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var n0e=Lh;Lh.default=Lh;t0e.registerProcessor(Lh);e0e.registerProcessor(Lh);let r0e=bb,s0e=xz,o0e=Eb,i0e=RR,a0e=Sb,l0e=lp,u0e=IR;function Uh(t,e){if(Array.isArray(t))return t.map(s=>Uh(s));let{inputs:n,...r}=t;if(n){e=[];for(let s of n){let o={...s,__proto__:a0e.prototype};o.map&&(o.map={...o.map,__proto__:s0e.prototype}),e.push(o)}}if(r.nodes&&(r.nodes=t.nodes.map(s=>Uh(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 l0e(r);if(r.type==="decl")return new r0e(r);if(r.type==="rule")return new u0e(r);if(r.type==="comment")return new o0e(r);if(r.type==="atrule")return new i0e(r);throw new Error("Unknown node type: "+t.type)}var c0e=Uh;Uh.default=Uh;let d0e=wR,Xz=bb,f0e=Zz,h0e=au,NR=n0e,p0e=vb,g0e=c0e,Qz=AR,m0e=Bz,Jz=Eb,ej=RR,v0e=TR,y0e=Sb,b0e=OR,S0e=Gz,tj=IR,nj=lp,E0e=yb;function Dt(...t){return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new NR(t)}Dt.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
266
  https://evilmartians.com/chronicles/postcss-8-plugin-migration`),Hv.LANG&&Hv.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 NR().version,u}let o;return Object.defineProperty(s,"postcss",{get(){return o||(o=s()),o}}),s.process=function(a,u,c){return Dt([s(c)]).process(a,u)},s};Dt.stringify=p0e;Dt.parse=b0e;Dt.fromJSON=g0e;Dt.list=S0e;Dt.comment=t=>new Jz(t);Dt.atRule=t=>new ej(t);Dt.decl=t=>new Xz(t);Dt.rule=t=>new tj(t);Dt.root=t=>new nj(t);Dt.document=t=>new Qz(t);Dt.CssSyntaxError=d0e;Dt.Declaration=Xz;Dt.Container=h0e;Dt.Processor=NR;Dt.Document=Qz;Dt.Comment=Jz;Dt.Warning=m0e;Dt.AtRule=ej;Dt.Result=v0e;Dt.Input=y0e;Dt.Rule=tj;Dt.Root=nj;Dt.Node=E0e;f0e.registerPostcss(Dt);var C0e=Dt;Dt.default=Dt;const sn=Dye(C0e);sn.stringify;sn.fromJSON;sn.plugin;sn.parse;sn.list;sn.document;sn.comment;sn.atRule;sn.rule;sn.decl;sn.root;sn.CssSyntaxError;sn.Declaration;sn.Container;sn.Processor;sn.Document;sn.Comment;sn.Warning;sn.AtRule;sn.Result;sn.Input;sn.Rule;sn.Root;sn.Node;var w0e=Object.defineProperty,x0e=(t,e,n)=>e in t?w0e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ws=(t,e,n)=>x0e(t,typeof e!="symbol"?e+"":e,n);function _0e(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function A0e(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 MR={exports:{}},Xt=String,rj=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}};MR.exports=rj();MR.exports.createColors=rj;var T0e=MR.exports;const R0e={},I0e=Object.freeze(Object.defineProperty({__proto__:null,default:R0e},Symbol.toStringTag,{value:"Module"})),eo=A0e(I0e);let f4=T0e,h4=eo,G_=class sj 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,sj)}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=f4.isColorSupported),h4&&e&&(n=h4(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:p,red:g}=f4.createColors(!0);u=m=>f(g(m)),c=m=>p(m)}else u=c=f=>f;return r.slice(s,o).map((f,p)=>{let g=s+1+p,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+`
267
+ https://www.w3ctech.com/topic/2226`));let u=n(...a);return u.postcssPlugin=e,u.postcssVersion=new NR().version,u}let o;return Object.defineProperty(s,"postcss",{get(){return o||(o=s()),o}}),s.process=function(a,u,c){return Dt([s(c)]).process(a,u)},s};Dt.stringify=p0e;Dt.parse=b0e;Dt.fromJSON=g0e;Dt.list=S0e;Dt.comment=t=>new Jz(t);Dt.atRule=t=>new ej(t);Dt.decl=t=>new Xz(t);Dt.rule=t=>new tj(t);Dt.root=t=>new nj(t);Dt.document=t=>new Qz(t);Dt.CssSyntaxError=d0e;Dt.Declaration=Xz;Dt.Container=h0e;Dt.Processor=NR;Dt.Document=Qz;Dt.Comment=Jz;Dt.Warning=m0e;Dt.AtRule=ej;Dt.Result=v0e;Dt.Input=y0e;Dt.Rule=tj;Dt.Root=nj;Dt.Node=E0e;f0e.registerPostcss(Dt);var C0e=Dt;Dt.default=Dt;const sn=Dye(C0e);sn.stringify;sn.fromJSON;sn.plugin;sn.parse;sn.list;sn.document;sn.comment;sn.atRule;sn.rule;sn.decl;sn.root;sn.CssSyntaxError;sn.Declaration;sn.Container;sn.Processor;sn.Document;sn.Comment;sn.Warning;sn.AtRule;sn.Result;sn.Input;sn.Rule;sn.Root;sn.Node;var w0e=Object.defineProperty,x0e=(t,e,n)=>e in t?w0e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ws=(t,e,n)=>x0e(t,typeof e!="symbol"?e+"":e,n);function _0e(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function A0e(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 MR={exports:{}},Xt=String,rj=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}};MR.exports=rj();MR.exports.createColors=rj;var T0e=MR.exports;const R0e={},I0e=Object.freeze(Object.defineProperty({__proto__:null,default:R0e},Symbol.toStringTag,{value:"Module"})),eo=A0e(I0e);let fU=T0e,hU=eo,G_=class sj 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,sj)}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=fU.isColorSupported),hU&&e&&(n=hU(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:p,red:g}=fU.createColors(!0);u=m=>f(g(m)),c=m=>p(m)}else u=c=f=>f;return r.slice(s,o).map((f,p)=>{let g=s+1+p,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
268
  `+y+u("^")}return" "+c(m)+f}).join(`
269
269
  `)}toString(){let e=this.showSourceCode();return e&&(e=`
270
270
 
271
271
  `+e+`
272
- `),this.name+": "+this.message+e}};var PR=G_;G_.default=G_;var up={};up.isClean=Symbol("isClean");up.my=Symbol("my");const p4={after:`
272
+ `),this.name+": "+this.message+e}};var PR=G_;G_.default=G_;var up={};up.isClean=Symbol("isClean");up.my=Symbol("my");const pU={after:`
273
273
  `,beforeClose:`
274
274
  `,beforeComment:`
275
275
  `,beforeDecl:`
276
276
  `,beforeOpen:" ",beforeRule:`
277
277
  `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function O0e(t){return t[0].toUpperCase()+t.slice(1)}let V_=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 p4[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"+O0e(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=p4[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(`
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 pU[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"+O0e(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=pU[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
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
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
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
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
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 oj=V_;V_.default=V_;let N0e=oj;function K_(t,e){new N0e(e).stringify(t)}var Cb=K_;K_.default=K_;let{isClean:wm,my:M0e}=up,P0e=PR,k0e=oj,D0e=Cb;function Y_(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=>Y_(a,n)):(o==="object"&&s!==null&&(s=Y_(s)),n[r]=s)}return n}let Z_=class{constructor(e={}){this.raws={},this[wm]=!1,this[M0e]=!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=Y_(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 P0e(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[wm]){this[wm]=!1;let e=this;for(;e=e.parent;)e[wm]=!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 k0e().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=D0e){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 wb=Z_;Z_.default=Z_;let L0e=wb,X_=class extends L0e{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 xb=X_;X_.default=X_;let U0e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",F0e=(t=21)=>{let e="",n=t;for(;n--;)e+=U0e[Math.random()*64|0];return e};var z0e={nanoid:F0e};let{SourceMapConsumer:g4,SourceMapGenerator:m4}=eo,{existsSync:j0e,readFileSync:B0e}=eo,{dirname:fx,join:H0e}=eo;function $0e(t){return Buffer?Buffer.from(t,"base64").toString():window.atob(t)}let Q_=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=fx(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new g4(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 $0e(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=fx(e),j0e(e))return this.mapFile=e,B0e(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 g4)return m4.fromSourceMap(n).toString();if(n instanceof m4)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=H0e(fx(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 ij=Q_;Q_.default=Q_;let{SourceMapConsumer:q0e,SourceMapGenerator:W0e}=eo,{fileURLToPath:v4,pathToFileURL:xm}=eo,{isAbsolute:J_,resolve:eA}=eo,{nanoid:G0e}=z0e,hx=eo,y4=PR,V0e=ij,px=Symbol("fromOffsetCache"),K0e=!!(q0e&&W0e),b4=!!(eA&&J_),Xv=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&&(!b4||/^\w+:\/\//.test(n.from)||J_(n.from)?this.file=n.from:this.file=eA(n.from)),b4&&K0e){let r=new V0e(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 "+G0e(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,p=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 p.offset=="number"){let g=this.fromOffset(p.offset);a=g.line,u=g.col}else a=p.line,u=p.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&&(xm&&(o.input.url=xm(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let n,r;if(this[px])r=this[px];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[px]=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:eA(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;J_(a.source)?c=xm(a.source):c=new URL(a.source,this.map.consumer().sourceRoot||xm(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(v4)f.file=v4(c);else throw new Error("file: protocol is not available in this PostCSS build");let p=o.sourceContentFor(a.source);return p&&(f.source=p),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 _b=Xv;Xv.default=Xv;hx&&hx.registerInput&&hx.registerInput(Xv);let{SourceMapConsumer:aj,SourceMapGenerator:cv}=eo,{dirname:dv,relative:lj,resolve:uj,sep:cj}=eo,{pathToFileURL:S4}=eo,Y0e=_b,Z0e=!!(aj&&cv),X0e=!!(dv&&uj&&lj&&cj),Q0e=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=`
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 k0e().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=D0e){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 wb=Z_;Z_.default=Z_;let L0e=wb,X_=class extends L0e{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 xb=X_;X_.default=X_;let U0e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",F0e=(t=21)=>{let e="",n=t;for(;n--;)e+=U0e[Math.random()*64|0];return e};var z0e={nanoid:F0e};let{SourceMapConsumer:gU,SourceMapGenerator:mU}=eo,{existsSync:j0e,readFileSync:B0e}=eo,{dirname:fx,join:H0e}=eo;function $0e(t){return Buffer?Buffer.from(t,"base64").toString():window.atob(t)}let Q_=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=fx(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new gU(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 $0e(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=fx(e),j0e(e))return this.mapFile=e,B0e(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 gU)return mU.fromSourceMap(n).toString();if(n instanceof mU)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=H0e(fx(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 ij=Q_;Q_.default=Q_;let{SourceMapConsumer:q0e,SourceMapGenerator:W0e}=eo,{fileURLToPath:vU,pathToFileURL:xm}=eo,{isAbsolute:J_,resolve:eA}=eo,{nanoid:G0e}=z0e,hx=eo,yU=PR,V0e=ij,px=Symbol("fromOffsetCache"),K0e=!!(q0e&&W0e),bU=!!(eA&&J_),Xv=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&&(!bU||/^\w+:\/\//.test(n.from)||J_(n.from)?this.file=n.from:this.file=eA(n.from)),bU&&K0e){let r=new V0e(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 "+G0e(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,p=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 p.offset=="number"){let g=this.fromOffset(p.offset);a=g.line,u=g.col}else a=p.line,u=p.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 yU(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 yU(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&&(xm&&(o.input.url=xm(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let n,r;if(this[px])r=this[px];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[px]=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:eA(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;J_(a.source)?c=xm(a.source):c=new URL(a.source,this.map.consumer().sourceRoot||xm(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(vU)f.file=vU(c);else throw new Error("file: protocol is not available in this PostCSS build");let p=o.sourceContentFor(a.source);return p&&(f.source=p),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 _b=Xv;Xv.default=Xv;hx&&hx.registerInput&&hx.registerInput(Xv);let{SourceMapConsumer:aj,SourceMapGenerator:cv}=eo,{dirname:dv,relative:lj,resolve:uj,sep:cj}=eo,{pathToFileURL:SU}=eo,Y0e=_b,Z0e=!!(aj&&cv),X0e=!!(dv&&uj&&lj&&cj),Q0e=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
286
  `;this.css.includes(`\r
287
287
  `)&&(n=`\r
288
288
  `),this.css+=n+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let n=this.toUrl(this.path(e.file)),r=e.root||dv(e.file),s;this.mapOpts.sourcesContent===!1?(s=new aj(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(),X0e&&Z0e&&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=cv.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new cv({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 cv({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 p=c.parent||{raws:{}};(!(c.type==="decl"||c.type==="atrule"&&!c.nodes)||c!==p.last||p.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?dv(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=dv(uj(r,this.mapOpts.annotation)));let s=lj(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 Y0e(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(S4){let r=S4(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;cj==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var dj=Q0e;let J0e=wb,tA=class extends J0e{constructor(e){super(e),this.type="comment"}};var Ab=tA;tA.default=tA;let{isClean:fj,my:hj}=up,pj=xb,gj=Ab,e1e=wb,mj,kR,DR,vj;function yj(t){return t.map(e=>(e.nodes&&(e.nodes=yj(e.nodes)),delete e.source,e))}function bj(t){if(t[fj]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)bj(e)}let wi=class Sj extends e1e{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=yj(mj(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 pj(e)]}else if(e.selector)e=[new kR(e)];else if(e.name)e=[new DR(e)];else if(e.text)e=[new gj(e)];else throw new Error("Unknown node type in node creation");return e.map(s=>(s[hj]||Sj.rebuild(s),s=s.proxyOf,s.parent&&s.parent.removeChild(s),s[fj]&&bj(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=>{mj=t};wi.registerRule=t=>{kR=t};wi.registerAtRule=t=>{DR=t};wi.registerRoot=t=>{vj=t};var lu=wi;wi.default=wi;wi.rebuild=t=>{t.type==="atrule"?Object.setPrototypeOf(t,DR.prototype):t.type==="rule"?Object.setPrototypeOf(t,kR.prototype):t.type==="decl"?Object.setPrototypeOf(t,pj.prototype):t.type==="comment"?Object.setPrototypeOf(t,gj.prototype):t.type==="root"&&Object.setPrototypeOf(t,vj.prototype),t[hj]=!0,t.nodes&&t.nodes.forEach(e=>{wi.rebuild(e)})};let t1e=lu,Ej,Cj,Fh=class extends t1e{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Ej(new Cj,this,e).stringify()}};Fh.registerLazyResult=t=>{Ej=t};Fh.registerProcessor=t=>{Cj=t};var LR=Fh;Fh.default=Fh;let nA=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 wj=nA;nA.default=nA;let n1e=wj,rA=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 n1e(e,n);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var UR=rA;rA.default=rA;const gx=39,E4=34,_m=92,C4=47,Am=10,Df=32,Tm=12,Rm=9,Im=13,r1e=91,s1e=93,o1e=40,i1e=41,a1e=123,l1e=125,u1e=59,c1e=42,d1e=58,f1e=64,Om=/[\t\n\f\r "#'()/;[\\\]{}]/g,Nm=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,h1e=/.[\r\n"'(/\\]/,w4=/[\da-f]/i;var p1e=function(e,n={}){let r=e.css.valueOf(),s=n.ignoreErrors,o,a,u,c,f,p,g,m,y,S,E=r.length,C=0,w=[],_=[];function T(){return C}function R(P){throw e.error("Unclosed "+P,C)}function M(){return _.length===0&&C>=E}function O(P){if(_.length)return _.pop();if(C>=E)return;let k=P?P.ignoreUnclosed:!1;switch(o=r.charCodeAt(C),o){case Am:case Df:case Rm:case Im:case Tm:{a=C;do a+=1,o=r.charCodeAt(a);while(o===Df||o===Am||o===Rm||o===Im||o===Tm);S=["space",r.slice(C,a)],C=a-1;break}case r1e:case s1e:case a1e:case l1e:case d1e:case u1e:case i1e:{let H=String.fromCharCode(o);S=[H,H,C];break}case o1e:{if(m=w.length?w.pop()[1]:"",y=r.charCodeAt(C+1),m==="url"&&y!==gx&&y!==E4&&y!==Df&&y!==Am&&y!==Rm&&y!==Tm&&y!==Im){a=C;do{if(p=!1,a=r.indexOf(")",a+1),a===-1)if(s||k){a=C;break}else R("bracket");for(g=a;r.charCodeAt(g-1)===_m;)g-=1,p=!p}while(p);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||h1e.test(c)?S=["(","(",C]:(S=["brackets",c,C,a],C=a);break}case gx:case E4:{u=o===gx?"'":'"',a=C;do{if(p=!1,a=r.indexOf(u,a+1),a===-1)if(s||k){a=C+1;break}else R("string");for(g=a;r.charCodeAt(g-1)===_m;)g-=1,p=!p}while(p);S=["string",r.slice(C,a+1),C,a],C=a;break}case f1e:{Om.lastIndex=C+1,Om.test(r),Om.lastIndex===0?a=r.length-1:a=Om.lastIndex-2,S=["at-word",r.slice(C,a+1),C,a],C=a;break}case _m:{for(a=C,f=!0;r.charCodeAt(a+1)===_m;)a+=1,f=!f;if(o=r.charCodeAt(a+1),f&&o!==C4&&o!==Df&&o!==Am&&o!==Rm&&o!==Im&&o!==Tm&&(a+=1,w4.test(r.charAt(a)))){for(;w4.test(r.charAt(a+1));)a+=1;r.charCodeAt(a+1)===Df&&(a+=1)}S=["word",r.slice(C,a+1),C,a],C=a;break}default:{o===C4&&r.charCodeAt(C+1)===c1e?(a=r.indexOf("*/",C+2)+1,a===0&&(s||k?a=r.length:R("comment")),S=["comment",r.slice(C,a+1),C,a],C=a):(Nm.lastIndex=C+1,Nm.test(r),Nm.lastIndex===0?a=r.length-1:a=Nm.lastIndex-2,S=["word",r.slice(C,a+1),C,a],w.push(S),C=a);break}}return C++,S}function I(P){_.push(P)}return{back:I,endOfFile:M,nextToken:O,position:T}};let xj=lu,Qv=class extends xj{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 FR=Qv;Qv.default=Qv;xj.registerAtRule(Qv);let _j=lu,Aj,Tj,Hc=class extends _j{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 Aj(new Tj,this,e).stringify()}};Hc.registerLazyResult=t=>{Aj=t};Hc.registerProcessor=t=>{Tj=t};var cp=Hc;Hc.default=Hc;_j.registerRoot(Hc);let zh={comma(t){return zh.split(t,[","],!0)},space(t){let e=[" ",`
290
- `," "];return zh.split(t,e)},split(t,e,n){let r=[],s="",o=!1,a=0,u=!1,c="",f=!1;for(let p of t)f?f=!1:p==="\\"?f=!0:u?p===c&&(u=!1):p==='"'||p==="'"?(u=!0,c=p):p==="("?a+=1:p===")"?a>0&&(a-=1):a===0&&e.includes(p)&&(o=!0),o?(s!==""&&r.push(s.trim()),s="",o=!1):s+=p;return(n||s!=="")&&r.push(s.trim()),r}};var Rj=zh;zh.default=zh;let Ij=lu,g1e=Rj,Jv=class extends Ij{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return g1e.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 zR=Jv;Jv.default=Jv;Ij.registerRule(Jv);let m1e=xb,v1e=p1e,y1e=Ab,b1e=FR,S1e=cp,x4=zR;const _4={empty:!0,space:!0};function E1e(t){for(let e=t.length-1;e>=0;e--){let n=t[e],r=n[3]||n[2];if(r)return r}}let C1e=class{constructor(e){this.input=e,this.root=new S1e,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 b1e;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 y1e;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=v1e(this.input)}decl(e,n){let r=new m1e;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]||E1e(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 p=this.stringFrom(e,f);p=this.spacesFromEnd(e)+p,p!==" !important"&&(r.raws.important=p);break}else if(o[1].toLowerCase()==="important"){let p=e.slice(0),g="";for(let m=f;m>0;m--){let y=p[m][0];if(g.trim().indexOf("!")===0&&y!=="space")break;g=p.pop()[1]+g}g.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=g,e=p)}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 x4;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,p,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",p=r[m+1]?r[m+1][0]:"empty",!_4[g]&&!_4[p]?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 x4;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 w1e=C1e;let x1e=lu,_1e=w1e,A1e=_b;function ey(t,e){let n=new A1e(t,e),r=new _1e(n);try{r.parse()}catch(s){throw s}return r.root}var jR=ey;ey.default=ey;x1e.registerParse(ey);let{isClean:yo,my:T1e}=up,R1e=dj,I1e=Cb,O1e=lu,N1e=LR,A4=UR,M1e=jR,P1e=cp;const k1e={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},D1e={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},L1e={Once:!0,postcssPlugin:!0,prepare:!0},$c=0;function Lf(t){return typeof t=="object"&&typeof t.then=="function"}function Oj(t){let e=!1,n=k1e[t.type];return t.type==="decl"?e=t.prop.toLowerCase():t.type==="atrule"&&(e=t.name.toLowerCase()),e&&t.append?[n,n+"-"+e,$c,n+"Exit",n+"Exit-"+e]:e?[n,n+"-"+e,n+"Exit",n+"Exit-"+e]:t.append?[n,$c,n+"Exit"]:[n,n+"Exit"]}function T4(t){let e;return t.type==="document"?e=["Document",$c,"DocumentExit"]:t.type==="root"?e=["Root",$c,"RootExit"]:e=Oj(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function sA(t){return t[yo]=!1,t.nodes&&t.nodes.forEach(e=>sA(e)),t}let oA={},qc=class Nj{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=sA(n);else if(n instanceof Nj||n instanceof A4)s=sA(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=M1e;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[T1e]&&O1e.rebuild(s)}this.result=new A4(e,s,r),this.helpers={...oA,postcss:oA,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(!D1e[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${n.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!L1e[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(Lf(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=[T4(e)];for(;n.length>0;){let r=this.visitTick(n);if(Lf(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 Lf(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=I1e;e.syntax&&(n=e.syntax.stringify),e.stringifier&&(n=e.stringifier),n.stringify&&(n=n.stringify);let s=new R1e(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(Lf(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(Lf(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(T4(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===$c){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=Oj(e);for(let r of n)if(r===$c)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"}};qc.registerPostcss=t=>{oA=t};var Mj=qc;qc.default=qc;P1e.registerLazyResult(qc);N1e.registerLazyResult(qc);let U1e=dj,F1e=Cb,z1e=jR;const j1e=UR;let iA=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=F1e;this.result=new j1e(this._processor,s,this._opts),this.result.css=n;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let u=new U1e(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=z1e;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 B1e=iA;iA.default=iA;let H1e=B1e,$1e=Mj,q1e=LR,W1e=cp,jh=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 H1e(this,e,n):new $1e(this,e,n)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var G1e=jh;jh.default=jh;W1e.registerProcessor(jh);q1e.registerProcessor(jh);let V1e=xb,K1e=ij,Y1e=Ab,Z1e=FR,X1e=_b,Q1e=cp,J1e=zR;function Bh(t,e){if(Array.isArray(t))return t.map(s=>Bh(s));let{inputs:n,...r}=t;if(n){e=[];for(let s of n){let o={...s,__proto__:X1e.prototype};o.map&&(o.map={...o.map,__proto__:K1e.prototype}),e.push(o)}}if(r.nodes&&(r.nodes=t.nodes.map(s=>Bh(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 Q1e(r);if(r.type==="decl")return new V1e(r);if(r.type==="rule")return new J1e(r);if(r.type==="comment")return new Y1e(r);if(r.type==="atrule")return new Z1e(r);throw new Error("Unknown node type: "+t.type)}var eSe=Bh;Bh.default=Bh;let tSe=PR,Pj=xb,nSe=Mj,rSe=lu,BR=G1e,sSe=Cb,oSe=eSe,kj=LR,iSe=wj,Dj=Ab,Lj=FR,aSe=UR,lSe=_b,uSe=jR,cSe=Rj,Uj=zR,Fj=cp,dSe=wb;function Lt(...t){return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new BR(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:
289
+ `),n=u.length-a):n+=u.length,c&&f!=="start"){let p=c.parent||{raws:{}};(!(c.type==="decl"||c.type==="atrule"&&!c.nodes)||c!==p.last||p.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?dv(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=dv(uj(r,this.mapOpts.annotation)));let s=lj(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 Y0e(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(SU){let r=SU(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;cj==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var dj=Q0e;let J0e=wb,tA=class extends J0e{constructor(e){super(e),this.type="comment"}};var Ab=tA;tA.default=tA;let{isClean:fj,my:hj}=up,pj=xb,gj=Ab,e1e=wb,mj,kR,DR,vj;function yj(t){return t.map(e=>(e.nodes&&(e.nodes=yj(e.nodes)),delete e.source,e))}function bj(t){if(t[fj]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)bj(e)}let wi=class Sj extends e1e{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=yj(mj(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 pj(e)]}else if(e.selector)e=[new kR(e)];else if(e.name)e=[new DR(e)];else if(e.text)e=[new gj(e)];else throw new Error("Unknown node type in node creation");return e.map(s=>(s[hj]||Sj.rebuild(s),s=s.proxyOf,s.parent&&s.parent.removeChild(s),s[fj]&&bj(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=>{mj=t};wi.registerRule=t=>{kR=t};wi.registerAtRule=t=>{DR=t};wi.registerRoot=t=>{vj=t};var lu=wi;wi.default=wi;wi.rebuild=t=>{t.type==="atrule"?Object.setPrototypeOf(t,DR.prototype):t.type==="rule"?Object.setPrototypeOf(t,kR.prototype):t.type==="decl"?Object.setPrototypeOf(t,pj.prototype):t.type==="comment"?Object.setPrototypeOf(t,gj.prototype):t.type==="root"&&Object.setPrototypeOf(t,vj.prototype),t[hj]=!0,t.nodes&&t.nodes.forEach(e=>{wi.rebuild(e)})};let t1e=lu,Ej,Cj,Fh=class extends t1e{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Ej(new Cj,this,e).stringify()}};Fh.registerLazyResult=t=>{Ej=t};Fh.registerProcessor=t=>{Cj=t};var LR=Fh;Fh.default=Fh;let nA=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 wj=nA;nA.default=nA;let n1e=wj,rA=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 n1e(e,n);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var UR=rA;rA.default=rA;const gx=39,EU=34,_m=92,CU=47,Am=10,Df=32,Tm=12,Rm=9,Im=13,r1e=91,s1e=93,o1e=40,i1e=41,a1e=123,l1e=125,u1e=59,c1e=42,d1e=58,f1e=64,Om=/[\t\n\f\r "#'()/;[\\\]{}]/g,Nm=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,h1e=/.[\r\n"'(/\\]/,wU=/[\da-f]/i;var p1e=function(e,n={}){let r=e.css.valueOf(),s=n.ignoreErrors,o,a,u,c,f,p,g,m,y,S,E=r.length,C=0,w=[],_=[];function T(){return C}function R(P){throw e.error("Unclosed "+P,C)}function M(){return _.length===0&&C>=E}function O(P){if(_.length)return _.pop();if(C>=E)return;let k=P?P.ignoreUnclosed:!1;switch(o=r.charCodeAt(C),o){case Am:case Df:case Rm:case Im:case Tm:{a=C;do a+=1,o=r.charCodeAt(a);while(o===Df||o===Am||o===Rm||o===Im||o===Tm);S=["space",r.slice(C,a)],C=a-1;break}case r1e:case s1e:case a1e:case l1e:case d1e:case u1e:case i1e:{let H=String.fromCharCode(o);S=[H,H,C];break}case o1e:{if(m=w.length?w.pop()[1]:"",y=r.charCodeAt(C+1),m==="url"&&y!==gx&&y!==EU&&y!==Df&&y!==Am&&y!==Rm&&y!==Tm&&y!==Im){a=C;do{if(p=!1,a=r.indexOf(")",a+1),a===-1)if(s||k){a=C;break}else R("bracket");for(g=a;r.charCodeAt(g-1)===_m;)g-=1,p=!p}while(p);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||h1e.test(c)?S=["(","(",C]:(S=["brackets",c,C,a],C=a);break}case gx:case EU:{u=o===gx?"'":'"',a=C;do{if(p=!1,a=r.indexOf(u,a+1),a===-1)if(s||k){a=C+1;break}else R("string");for(g=a;r.charCodeAt(g-1)===_m;)g-=1,p=!p}while(p);S=["string",r.slice(C,a+1),C,a],C=a;break}case f1e:{Om.lastIndex=C+1,Om.test(r),Om.lastIndex===0?a=r.length-1:a=Om.lastIndex-2,S=["at-word",r.slice(C,a+1),C,a],C=a;break}case _m:{for(a=C,f=!0;r.charCodeAt(a+1)===_m;)a+=1,f=!f;if(o=r.charCodeAt(a+1),f&&o!==CU&&o!==Df&&o!==Am&&o!==Rm&&o!==Im&&o!==Tm&&(a+=1,wU.test(r.charAt(a)))){for(;wU.test(r.charAt(a+1));)a+=1;r.charCodeAt(a+1)===Df&&(a+=1)}S=["word",r.slice(C,a+1),C,a],C=a;break}default:{o===CU&&r.charCodeAt(C+1)===c1e?(a=r.indexOf("*/",C+2)+1,a===0&&(s||k?a=r.length:R("comment")),S=["comment",r.slice(C,a+1),C,a],C=a):(Nm.lastIndex=C+1,Nm.test(r),Nm.lastIndex===0?a=r.length-1:a=Nm.lastIndex-2,S=["word",r.slice(C,a+1),C,a],w.push(S),C=a);break}}return C++,S}function I(P){_.push(P)}return{back:I,endOfFile:M,nextToken:O,position:T}};let xj=lu,Qv=class extends xj{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 FR=Qv;Qv.default=Qv;xj.registerAtRule(Qv);let _j=lu,Aj,Tj,Hc=class extends _j{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 Aj(new Tj,this,e).stringify()}};Hc.registerLazyResult=t=>{Aj=t};Hc.registerProcessor=t=>{Tj=t};var cp=Hc;Hc.default=Hc;_j.registerRoot(Hc);let zh={comma(t){return zh.split(t,[","],!0)},space(t){let e=[" ",`
290
+ `," "];return zh.split(t,e)},split(t,e,n){let r=[],s="",o=!1,a=0,u=!1,c="",f=!1;for(let p of t)f?f=!1:p==="\\"?f=!0:u?p===c&&(u=!1):p==='"'||p==="'"?(u=!0,c=p):p==="("?a+=1:p===")"?a>0&&(a-=1):a===0&&e.includes(p)&&(o=!0),o?(s!==""&&r.push(s.trim()),s="",o=!1):s+=p;return(n||s!=="")&&r.push(s.trim()),r}};var Rj=zh;zh.default=zh;let Ij=lu,g1e=Rj,Jv=class extends Ij{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return g1e.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 zR=Jv;Jv.default=Jv;Ij.registerRule(Jv);let m1e=xb,v1e=p1e,y1e=Ab,b1e=FR,S1e=cp,xU=zR;const _U={empty:!0,space:!0};function E1e(t){for(let e=t.length-1;e>=0;e--){let n=t[e],r=n[3]||n[2];if(r)return r}}let C1e=class{constructor(e){this.input=e,this.root=new S1e,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 b1e;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 y1e;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=v1e(this.input)}decl(e,n){let r=new m1e;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]||E1e(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 p=this.stringFrom(e,f);p=this.spacesFromEnd(e)+p,p!==" !important"&&(r.raws.important=p);break}else if(o[1].toLowerCase()==="important"){let p=e.slice(0),g="";for(let m=f;m>0;m--){let y=p[m][0];if(g.trim().indexOf("!")===0&&y!=="space")break;g=p.pop()[1]+g}g.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=g,e=p)}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 xU;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,p,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",p=r[m+1]?r[m+1][0]:"empty",!_U[g]&&!_U[p]?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 xU;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 w1e=C1e;let x1e=lu,_1e=w1e,A1e=_b;function ey(t,e){let n=new A1e(t,e),r=new _1e(n);try{r.parse()}catch(s){throw s}return r.root}var jR=ey;ey.default=ey;x1e.registerParse(ey);let{isClean:yo,my:T1e}=up,R1e=dj,I1e=Cb,O1e=lu,N1e=LR,AU=UR,M1e=jR,P1e=cp;const k1e={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},D1e={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},L1e={Once:!0,postcssPlugin:!0,prepare:!0},$c=0;function Lf(t){return typeof t=="object"&&typeof t.then=="function"}function Oj(t){let e=!1,n=k1e[t.type];return t.type==="decl"?e=t.prop.toLowerCase():t.type==="atrule"&&(e=t.name.toLowerCase()),e&&t.append?[n,n+"-"+e,$c,n+"Exit",n+"Exit-"+e]:e?[n,n+"-"+e,n+"Exit",n+"Exit-"+e]:t.append?[n,$c,n+"Exit"]:[n,n+"Exit"]}function TU(t){let e;return t.type==="document"?e=["Document",$c,"DocumentExit"]:t.type==="root"?e=["Root",$c,"RootExit"]:e=Oj(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function sA(t){return t[yo]=!1,t.nodes&&t.nodes.forEach(e=>sA(e)),t}let oA={},qc=class Nj{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=sA(n);else if(n instanceof Nj||n instanceof AU)s=sA(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=M1e;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[T1e]&&O1e.rebuild(s)}this.result=new AU(e,s,r),this.helpers={...oA,postcss:oA,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(!D1e[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${n.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!L1e[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(Lf(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=[TU(e)];for(;n.length>0;){let r=this.visitTick(n);if(Lf(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 Lf(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=I1e;e.syntax&&(n=e.syntax.stringify),e.stringifier&&(n=e.stringifier),n.stringify&&(n=n.stringify);let s=new R1e(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(Lf(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(Lf(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(TU(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===$c){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=Oj(e);for(let r of n)if(r===$c)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"}};qc.registerPostcss=t=>{oA=t};var Mj=qc;qc.default=qc;P1e.registerLazyResult(qc);N1e.registerLazyResult(qc);let U1e=dj,F1e=Cb,z1e=jR;const j1e=UR;let iA=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=F1e;this.result=new j1e(this._processor,s,this._opts),this.result.css=n;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let u=new U1e(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=z1e;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 B1e=iA;iA.default=iA;let H1e=B1e,$1e=Mj,q1e=LR,W1e=cp,jh=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 H1e(this,e,n):new $1e(this,e,n)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var G1e=jh;jh.default=jh;W1e.registerProcessor(jh);q1e.registerProcessor(jh);let V1e=xb,K1e=ij,Y1e=Ab,Z1e=FR,X1e=_b,Q1e=cp,J1e=zR;function Bh(t,e){if(Array.isArray(t))return t.map(s=>Bh(s));let{inputs:n,...r}=t;if(n){e=[];for(let s of n){let o={...s,__proto__:X1e.prototype};o.map&&(o.map={...o.map,__proto__:K1e.prototype}),e.push(o)}}if(r.nodes&&(r.nodes=t.nodes.map(s=>Bh(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 Q1e(r);if(r.type==="decl")return new V1e(r);if(r.type==="rule")return new J1e(r);if(r.type==="comment")return new Y1e(r);if(r.type==="atrule")return new Z1e(r);throw new Error("Unknown node type: "+t.type)}var eSe=Bh;Bh.default=Bh;let tSe=PR,Pj=xb,nSe=Mj,rSe=lu,BR=G1e,sSe=Cb,oSe=eSe,kj=LR,iSe=wj,Dj=Ab,Lj=FR,aSe=UR,lSe=_b,uSe=jR,cSe=Rj,Uj=zR,Fj=cp,dSe=wb;function Lt(...t){return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new BR(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:
291
291
  https://evilmartians.com/chronicles/postcss-8-plugin-migration`),Hv.LANG&&Hv.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 BR().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=sSe;Lt.parse=uSe;Lt.fromJSON=oSe;Lt.list=cSe;Lt.comment=t=>new Dj(t);Lt.atRule=t=>new Lj(t);Lt.decl=t=>new Pj(t);Lt.rule=t=>new Uj(t);Lt.root=t=>new Fj(t);Lt.document=t=>new kj(t);Lt.CssSyntaxError=tSe;Lt.Declaration=Pj;Lt.Container=rSe;Lt.Processor=BR;Lt.Document=kj;Lt.Comment=Dj;Lt.Warning=iSe;Lt.AtRule=Lj;Lt.Result=aSe;Lt.Input=lSe;Lt.Rule=Uj;Lt.Root=Fj;Lt.Node=dSe;nSe.registerPostcss(Lt);var fSe=Lt;Lt.default=Lt;const on=_0e(fSe);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;class HR{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 HR){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 R4={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},I4={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Mm={},hSe=()=>!!globalThis.Zone;function $R(t){if(Mm[t])return Mm[t];const e=globalThis[t],n=e.prototype,r=t in R4?R4[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 I4?I4[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&&!hSe())return Mm[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?Mm[t]=f:n}catch{return n}}const mx={};function Oi(t,e,n){var r;const s=`${t}.${String(n)}`;if(mx[s])return mx[s].call(e);const o=$R(t),a=(r=Object.getOwnPropertyDescriptor(o,n))==null?void 0:r.get;return a?(mx[s]=a,a.call(e)):e[n]}const vx={};function zj(t,e,n){const r=`${t}.${String(n)}`;if(vx[r])return vx[r].bind(e);const o=$R(t)[n];return typeof o!="function"?e[n]:(vx[r]=o,o.bind(e))}function pSe(t){return Oi("Node",t,"ownerDocument")}function gSe(t){return Oi("Node",t,"childNodes")}function mSe(t){return Oi("Node",t,"parentNode")}function vSe(t){return Oi("Node",t,"parentElement")}function ySe(t){return Oi("Node",t,"textContent")}function bSe(t,e){return zj("Node",t,"contains")(e)}function SSe(t){return zj("Node",t,"getRootNode")()}function ESe(t){return!t||!("host"in t)?null:Oi("ShadowRoot",t,"host")}function CSe(t){return t.styleSheets}function wSe(t){return!t||!("shadowRoot"in t)?null:Oi("Element",t,"shadowRoot")}function xSe(t,e){return Oi("Element",t,"querySelector")(e)}function _Se(t,e){return Oi("Element",t,"querySelectorAll")(e)}function jj(){return $R("MutationObserver").constructor}function uu(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:pSe,childNodes:gSe,parentNode:mSe,parentElement:vSe,textContent:ySe,contains:bSe,getRootNode:SSe,host:ESe,styleSheets:CSe,shadowRoot:wSe,querySelector:xSe,querySelectorAll:_Se,mutationObserver:jj,patch:uu};function Er(t,e,n=document){const r={capture:!0,passive:!0};return n.addEventListener(t,e,r),()=>n.removeEventListener(t,e,r)}const pc=`Please stop import mirror directly. Instead of that,\r
292
+ https://www.w3ctech.com/topic/2226`));let u=n(...a);return u.postcssPlugin=e,u.postcssVersion=new BR().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=sSe;Lt.parse=uSe;Lt.fromJSON=oSe;Lt.list=cSe;Lt.comment=t=>new Dj(t);Lt.atRule=t=>new Lj(t);Lt.decl=t=>new Pj(t);Lt.rule=t=>new Uj(t);Lt.root=t=>new Fj(t);Lt.document=t=>new kj(t);Lt.CssSyntaxError=tSe;Lt.Declaration=Pj;Lt.Container=rSe;Lt.Processor=BR;Lt.Document=kj;Lt.Comment=Dj;Lt.Warning=iSe;Lt.AtRule=Lj;Lt.Result=aSe;Lt.Input=lSe;Lt.Rule=Uj;Lt.Root=Fj;Lt.Node=dSe;nSe.registerPostcss(Lt);var fSe=Lt;Lt.default=Lt;const on=_0e(fSe);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;class HR{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 HR){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 RU={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},IU={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Mm={},hSe=()=>!!globalThis.Zone;function $R(t){if(Mm[t])return Mm[t];const e=globalThis[t],n=e.prototype,r=t in RU?RU[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 IU?IU[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&&!hSe())return Mm[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?Mm[t]=f:n}catch{return n}}const mx={};function Oi(t,e,n){var r;const s=`${t}.${String(n)}`;if(mx[s])return mx[s].call(e);const o=$R(t),a=(r=Object.getOwnPropertyDescriptor(o,n))==null?void 0:r.get;return a?(mx[s]=a,a.call(e)):e[n]}const vx={};function zj(t,e,n){const r=`${t}.${String(n)}`;if(vx[r])return vx[r].bind(e);const o=$R(t)[n];return typeof o!="function"?e[n]:(vx[r]=o,o.bind(e))}function pSe(t){return Oi("Node",t,"ownerDocument")}function gSe(t){return Oi("Node",t,"childNodes")}function mSe(t){return Oi("Node",t,"parentNode")}function vSe(t){return Oi("Node",t,"parentElement")}function ySe(t){return Oi("Node",t,"textContent")}function bSe(t,e){return zj("Node",t,"contains")(e)}function SSe(t){return zj("Node",t,"getRootNode")()}function ESe(t){return!t||!("host"in t)?null:Oi("ShadowRoot",t,"host")}function CSe(t){return t.styleSheets}function wSe(t){return!t||!("shadowRoot"in t)?null:Oi("Element",t,"shadowRoot")}function xSe(t,e){return Oi("Element",t,"querySelector")(e)}function _Se(t,e){return Oi("Element",t,"querySelectorAll")(e)}function jj(){return $R("MutationObserver").constructor}function uu(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:pSe,childNodes:gSe,parentNode:mSe,parentElement:vSe,textContent:ySe,contains:bSe,getRootNode:SSe,host:ESe,styleSheets:CSe,shadowRoot:wSe,querySelector:xSe,querySelectorAll:_Se,mutationObserver:jj,patch:uu};function Er(t,e,n=document){const r={capture:!0,passive:!0};return n.addEventListener(t,e,r),()=>n.removeEventListener(t,e,r)}const pc=`Please stop import mirror directly. Instead of that,\r
293
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 O4={map:{},getId(){return console.error(pc),-1},getNode(){return console.error(pc),null},removeNodeFromMap(){console.error(pc)},has(){return console.error(pc),!1},reset(){console.error(pc)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(O4=new Proxy(O4,{get(t,e,n){return e==="map"&&console.error(pc),Reflect.get(t,e,n)}}));function Hh(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 Tb(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)}}),()=>Tb(t,e,o||{},!0)}let ty=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(ty=()=>new Date().getTime());function Bj(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 Hj(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function $j(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function qj(t){return t?t.nodeType===t.ELEMENT_NODE?t:rt.parentElement(t):null}function Cr(t,e,n,r){if(!t)return!1;const s=qj(t);if(!s)return!1;try{if(typeof e=="string"){if(s.classList.contains(e)||r&&s.closest("."+e)!==null)return!0}else if(Gv(s,e,r))return!0}catch{}return!!(n&&(s.matches(n)||r&&s.closest(n)!==null))}function ASe(t,e){return e.getId(t)!==-1}function yx(t,e,n){return t.tagName==="TITLE"&&n.headTitleMutations?!0:e.getId(t)===Ph}function Wj(t,e){if(uh(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?Wj(r,e):!0}function aA(t){return!!t.changedTouches}function TSe(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 Gj(t,e){return!!(t.nodeName==="IFRAME"&&e.getMeta(t))}function Vj(t,e){return!!(t.nodeName==="LINK"&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&t.getAttribute("rel")==="stylesheet"&&e.getMeta(t))}function lA(t){return t?t instanceof HR&&"shadowRoot"in t?!!t.shadowRoot:!!rt.shadowRoot(t):!1}class RSe{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 Kj(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 ISe(t){let e=t,n;for(;n=Kj(e);)e=n;return e}function OSe(t){const e=rt.ownerDocument(t);if(!e)return!1;const n=ISe(t);return rt.contains(e,n)}function Yj(t){const e=rt.ownerDocument(t);return e?rt.contains(e,t)||OSe(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||{}),Lr=(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))(Lr||{}),si=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(si||{}),Wc=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(Wc||{}),gc=(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))(gc||{}),Zj=(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))(Zj||{});function N4(t){return"__ln"in t}class NSe{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&&N4(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&&N4(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 M4=(t,e)=>`${t}@${e}`;class MSe{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 NSe,s=c=>{let f=c,p=Ph;for(;p===Ph;)f=f&&f.nextSibling,p=f&&this.mirror.getId(f);return p},o=c=>{const f=rt.parentNode(c);if(!f||!Yj(c))return;let p=!1;if(c.nodeType===Node.TEXT_NODE){const S=f.tagName;if(S==="TEXTAREA")return;S==="STYLE"&&this.addedSet.has(f)&&(p=!0)}const g=uh(f)?this.mirror.getId(Kj(c)):this.mirror.getId(f),m=s(c);if(g===-1||m===-1)return r.addNode(c);const y=xc(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=>{Gj(S,this.mirror)&&this.iframeManager.addIframe(S),Vj(S,this.mirror)&&this.stylesheetManager.trackLinkElement(S),lA(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:p});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)P4(this.removesSubTreeCache,c,this.mirror)&&!this.movedSet.has(rt.parentNode(c))||o(c);for(const c of this.addedSet)!k4(this.droppedSet,c)&&!P4(this.removesSubTreeCache,c,this.mirror)||k4(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)),p=s(a.value);f!==-1&&p!==-1&&(c=a)}if(!c){let f=r.tail;for(;f;){const p=f;if(f=f.previous,p){const g=this.mirror.getId(rt.parentNode(p.value));if(s(p.value)===-1)continue;if(g!==-1){c=p;break}else{const y=p.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=p;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,p=rt.parentNode(f);return p&&p.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(p),{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 p=JSON.stringify(c.styleDiff),g=JSON.stringify(c._unchangedStyles);p.length<f.style.length&&(p+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=$v({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:qv(e),value:r,maskInputFn:this.maskInputFn})}),Se(this,"processMutation",e=>{if(!yx(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const n=rt.textContent(e.target);!Cr(e.target,this.blockClass,this.blockSelector,!1)&&n!==e.oldValue&&this.texts.push({value:bz(e.target,this.maskTextClass,this.maskTextSelector,!0)&&n?this.maskTextFn?this.maskTextFn(n,qj(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=qv(n);s=$v({element:n,maskInputOptions:this.maskInputOptions,tagName:n.tagName,type:a,value:s,maskInputFn:this.maskInputFn})}if(Cr(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"),!yz(n.tagName,r))if(o.attributes[r]=vz(this.doc,Gl(n.tagName),Gl(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(Cr(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=uh(e.target)?this.mirror.getId(rt.host(e.target)):this.mirror.getId(e.target);Cr(e.target,this.blockClass,this.blockSelector,!1)||yx(n,this.mirror,this.slimDOMOptions)||!ASe(n,this.mirror)||(this.addedSet.has(n)?(uA(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(e.target)&&r===-1||Wj(e.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[M4(r,s)]?uA(this.movedSet,n):(this.removes.push({parentId:s,id:r,isShadow:uh(e.target)&&ch(e.target)?!0:void 0}),PSe(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(yx(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[M4(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Cr(e,this.blockClass,this.blockSelector,!1)||(rt.childNodes(e).forEach(r=>this.genAdds(r)),lA(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 uA(t,e){t.delete(e),rt.childNodes(e).forEach(n=>uA(t,n))}function PSe(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 P4(t,e,n){return t.size===0?!1:kSe(t,e)}function kSe(t,e,n){const r=rt.parentNode(e);return r?t.has(r):!1}function k4(t,e){return t.size===0?!1:Xj(t,e)}function Xj(t,e){const n=rt.parentNode(e);return n?t.has(n)?!0:Xj(t,n):!1}let dh;function DSe(t){dh=t}function LSe(){dh=void 0}const vt=t=>dh?(...n)=>{try{return t(...n)}catch(r){if(dh&&dh(r)===!0)return;throw r}}:t,Tl=[];function dp(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 Qj(t,e){const n=new MSe;Tl.push(n),n.init(t);const r=new(jj())(vt(n.processMutations.bind(n)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function USe({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=Hh(vt(g=>{const m=Date.now()-u;t(a.map(y=>(y.timeOffset-=m,y)),g),a=[],u=null}),o),f=vt(Hh(vt(g=>{const m=dp(g),{clientX:y,clientY:S}=aA(g)?g.changedTouches[0]:g;u||(u=ty()),a.push({x:y,y:S,id:r.getId(m),timeOffset:ty()-u}),c(typeof DragEvent<"u"&&g instanceof DragEvent?ft.Drag:g instanceof MouseEvent?ft.MouseMove:ft.TouchMove)}),s,{trailing:!1})),p=[Er("mousemove",f,n),Er("touchmove",f,n),Er("drag",f,n)];return vt(()=>{p.forEach(g=>g())})}function FSe({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=p=>g=>{const m=dp(g);if(Cr(m,r,s,!0))return;let y=null,S=p;if("pointerType"in g){switch(g.pointerType){case"mouse":y=si.Mouse;break;case"touch":y=si.Touch;break;case"pen":y=si.Pen;break}y===si.Touch?Lr[p]===Lr.MouseDown?S="TouchStart":Lr[p]===Lr.MouseUp&&(S="TouchEnd"):si.Pen}else aA(g)&&(y=si.Touch);y!==null?(c=y,(S.startsWith("Touch")&&y===si.Touch||S.startsWith("Mouse")&&y===si.Mouse)&&(y=null)):Lr[p]===Lr.Click&&(y=c,c=null);const E=aA(g)?g.changedTouches[0]:g;if(!E)return;const C=n.getId(m),{clientX:w,clientY:_}=E;vt(t)({type:Lr[S],id:C,x:w,y:_,...y!==null&&{pointerType:y}})};return Object.keys(Lr).filter(p=>Number.isNaN(Number(p))&&!p.endsWith("_Departed")&&a[p]!==!1).forEach(p=>{let g=Gl(p);const m=f(p);if(window.PointerEvent)switch(Lr[p]){case Lr.MouseDown:case Lr.MouseUp:g=g.replace("mouse","pointer");break;case Lr.TouchStart:case Lr.TouchEnd:return}u.push(Er(g,m,e))}),vt(()=>{u.forEach(p=>p())})}function Jj({scrollCb:t,doc:e,mirror:n,blockClass:r,blockSelector:s,sampling:o}){const a=vt(Hh(vt(u=>{const c=dp(u);if(!c||Cr(c,r,s,!0))return;const f=n.getId(c);if(c===e&&e.defaultView){const p=Bj(e.defaultView);t({id:f,x:p.left,y:p.top})}else t({id:f,x:c.scrollLeft,y:c.scrollTop})}),o.scroll||100));return Er("scroll",a,e)}function zSe({viewportResizeCb:t},{win:e}){let n=-1,r=-1;const s=vt(Hh(vt(()=>{const o=Hj(),a=$j();(n!==o||r!==a)&&(t({width:Number(a),height:Number(o)}),n=o,r=a)}),200));return Er("resize",s,e)}const jSe=["INPUT","TEXTAREA","SELECT"],D4=new WeakMap;function BSe({inputCb:t,doc:e,mirror:n,blockClass:r,blockSelector:s,ignoreClass:o,ignoreSelector:a,maskInputOptions:u,maskInputFn:c,sampling:f,userTriggeredOnInput:p}){function g(_){let T=dp(_);const R=_.isTrusted,M=T&&T.tagName;if(T&&M==="OPTION"&&(T=rt.parentElement(T)),!T||!M||jSe.indexOf(M)<0||Cr(T,r,s,!0)||T.classList.contains(o)||a&&T.matches(a))return;let O=T.value,I=!1;const P=qv(T)||"";P==="radio"||P==="checkbox"?I=T.checked:(u[M.toLowerCase()]||u[P])&&(O=$v({element:T,maskInputOptions:u,tagName:M,type:P,value:O,maskInputFn:c})),m(T,p?{text:O,isChecked:I,userTriggered:R}:{text:O,isChecked:I});const k=T.name;P==="radio"&&k&&I&&e.querySelectorAll(`input[type="radio"][name="${k}"]`).forEach(H=>{if(H!==T){const F=H.value;m(H,p?{text:F,isChecked:!I,userTriggered:!1}:{text:F,isChecked:!I})}})}function m(_,T){const R=D4.get(_);if(!R||R.text!==T.text||R.isChecked!==T.isChecked){D4.set(_,T);const M=n.getId(_);vt(t)({...T,id:M})}}const S=(f.input==="last"?["change"]:["input","change"]).map(_=>Er(_,vt(g),e)),E=e.defaultView;if(!E)return()=>{S.forEach(_=>_())};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(_=>Tb(_[0],_[1],{set(){vt(g)({target:this,isTrusted:!1})}},!1,E))),vt(()=>{S.forEach(_=>_())})}function ny(t){const e=[];function n(r,s){if(Pm("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Pm("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Pm("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Pm("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 ba(t,e,n){let r,s;return t?(t.ownerNode?r=e.getId(t.ownerNode):s=n.getId(t),{styleId:s,id:r}):{}}function HSe({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((p,g,m)=>{const[y,S]=m,{id:E,styleId:C}=ba(g,e,n.styleMirror);return(E&&E!==-1||C&&C!==-1)&&t({id:E,styleId:C,adds:[{rule:y,index:S}]}),p.apply(g,m)})}),r.CSSStyleSheet.prototype.addRule=function(p,g,m=this.cssRules.length){const y=`${p} { ${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((p,g,m)=>{const[y]=m,{id:S,styleId:E}=ba(g,e,n.styleMirror);return(S&&S!==-1||E&&E!==-1)&&t({id:S,styleId:E,removes:[{index:y}]}),p.apply(g,m)})}),r.CSSStyleSheet.prototype.removeRule=function(p){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[p])};let a;r.CSSStyleSheet.prototype.replace&&(a=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(a,{apply:vt((p,g,m)=>{const[y]=m,{id:S,styleId:E}=ba(g,e,n.styleMirror);return(S&&S!==-1||E&&E!==-1)&&t({id:S,styleId:E,replace:y}),p.apply(g,m)})}));let u;r.CSSStyleSheet.prototype.replaceSync&&(u=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(u,{apply:vt((p,g,m)=>{const[y]=m,{id:S,styleId:E}=ba(g,e,n.styleMirror);return(S&&S!==-1||E&&E!==-1)&&t({id:S,styleId:E,replaceSync:y}),p.apply(g,m)})}));const c={};km("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(km("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),km("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),km("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));const f={};return Object.entries(c).forEach(([p,g])=>{f[p]={insertRule:g.prototype.insertRule,deleteRule:g.prototype.deleteRule},g.prototype.insertRule=new Proxy(f[p].insertRule,{apply:vt((m,y,S)=>{const[E,C]=S,{id:w,styleId:_}=ba(y.parentStyleSheet,e,n.styleMirror);return(w&&w!==-1||_&&_!==-1)&&t({id:w,styleId:_,adds:[{rule:E,index:[...ny(y),C||0]}]}),m.apply(y,S)})}),g.prototype.deleteRule=new Proxy(f[p].deleteRule,{apply:vt((m,y,S)=>{const[E]=S,{id:C,styleId:w}=ba(y.parentStyleSheet,e,n.styleMirror);return(C&&C!==-1||w&&w!==-1)&&t({id:C,styleId:w,removes:[{index:[...ny(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(([p,g])=>{g.prototype.insertRule=f[p].insertRule,g.prototype.deleteRule=f[p].deleteRule})})}function eB({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 p;const g=(p=c.set)==null?void 0:p.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 $Se({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 p;const[g,m,y]=f;if(n.has(g))return o.apply(c,[g,m,y]);const{id:S,styleId:E}=ba((p=c.parentRule)==null?void 0:p.parentStyleSheet,e,r.styleMirror);return(S&&S!==-1||E&&E!==-1)&&t({id:S,styleId:E,set:{property:g,value:m,priority:y},index:ny(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 p;const[g]=f;if(n.has(g))return a.apply(c,[g]);const{id:m,styleId:y}=ba((p=c.parentRule)==null?void 0:p.parentStyleSheet,e,r.styleMirror);return(m&&m!==-1||y&&y!==-1)&&t({id:m,styleId:y,remove:{property:g},index:ny(c.parentRule)}),u.apply(c,f)})}),vt(()=>{s.CSSStyleDeclaration.prototype.setProperty=o,s.CSSStyleDeclaration.prototype.removeProperty=a})}function qSe({mediaInteractionCb:t,blockClass:e,blockSelector:n,mirror:r,sampling:s,doc:o}){const a=vt(c=>Hh(vt(f=>{const p=dp(f);if(!p||Cr(p,e,n,!0))return;const{currentTime:g,volume:m,muted:y,playbackRate:S,loop:E}=p;t({type:c,id:r.getId(p),currentTime:g,volume:m,muted:y,playbackRate:S,loop:E})}),s.media||500)),u=[Er("play",a(gc.Play),o),Er("pause",a(gc.Pause),o),Er("seeked",a(gc.Seeked),o),Er("volumechange",a(gc.VolumeChange),o),Er("ratechange",a(gc.RateChange),o)];return vt(()=>{u.forEach(c=>c())})}function WSe({fontCb:t,doc:e}){const n=e.defaultView;if(!n)return()=>{};const r=[],s=new WeakMap,o=n.FontFace;n.FontFace=function(c,f,p){const g=new o(c,f,p);return s.set(g,{family:c,buffer:typeof f!="string",descriptors:p,fontSource:typeof f=="string"?f:JSON.stringify(Array.from(new Uint8Array(f)))}),g};const a=uu(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 GSe(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=[],p=c.rangeCount||0;for(let g=0;g<p;g++){const m=c.getRangeAt(g),{startContainer:y,startOffset:S,endContainer:E,endOffset:C}=m;Cr(y,r,s,!0)||Cr(E,r,s,!0)||f.push({start:n.getId(y),startOffset:S,end:n.getId(E),endOffset:C})}o({ranges:f})});return u(),Er("selectionchange",u)}function VSe({doc:t,customElementCb:e}){const n=t.defaultView;return!n||!n.customElements?()=>{}:uu(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 KSe(t,e){const{mutationCb:n,mousemoveCb:r,mouseInteractionCb:s,scrollCb:o,viewportResizeCb:a,inputCb:u,mediaInteractionCb:c,styleSheetRuleCb:f,styleDeclarationCb:p,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),p(...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 YSe(t,e={}){const n=t.doc.defaultView;if(!n)return()=>{};KSe(t,e);let r;t.recordDOM&&(r=Qj(t,t.doc));const s=USe(t),o=FSe(t),a=Jj(t),u=zSe(t,{win:n}),c=BSe(t),f=qSe(t);let p=()=>{},g=()=>{},m=()=>{},y=()=>{};t.recordDOM&&(p=HSe(t,{win:n}),g=eB(t,t.doc),m=$Se(t,{win:n}),t.collectFonts&&(y=WSe(t)));const S=GSe(t),E=VSe(t),C=[];for(const w of t.plugins)C.push(w.observer(w.callback,n,w.options));return vt(()=>{Tl.forEach(w=>w.reset()),r?.disconnect(),s(),o(),a(),u(),c(),f(),p(),g(),m(),y(),S(),E(),C.forEach(w=>w())})}function Pm(t){return typeof window[t]<"u"}function km(t){return!!(typeof window[t]<"u"&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class L4{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 ZSe{constructor(e){Se(this,"iframes",new WeakMap),Se(this,"crossOriginIframeMap",new WeakMap),Se(this,"crossOriginIframeMirror",new L4(mz)),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 L4(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!==Zj.Document&&!e.rootId&&(e.rootId=n),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class XSe{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(!ch(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=Qj({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(Jj({...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(eB({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(uu(e.prototype,"attachShadow",function(s){return function(o){const a=s.call(this,o),u=rt.shadowRoot(this);return u&&Yj(this)&&r.addShadowRoot(u,n),a}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var _c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",QSe=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Dm=0;Dm<_c.length;Dm++)QSe[_c.charCodeAt(Dm)]=Dm;var JSe=function(t){var e=new Uint8Array(t),n,r=e.length,s="";for(n=0;n<r;n+=3)s+=_c[e[n]>>2],s+=_c[(e[n]&3)<<4|e[n+1]>>4],s+=_c[(e[n+1]&15)<<2|e[n+2]>>6],s+=_c[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 U4=new Map;function eEe(t,e){let n=U4.get(t);return n||(n=new Map,U4.set(t,n)),n.has(e)||n.set(e,[]),n.get(e)}const tB=(t,e,n)=>{if(!t||!(rB(t,e)||typeof t=="object"))return;const r=t.constructor.name,s=eEe(n,r);let o=s.indexOf(t);return o===-1&&(o=s.length,s.push(t)),o};function fv(t,e,n){if(t instanceof Array)return t.map(r=>fv(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=JSe(t);return{rr_type:r,base64:s}}else{if(t instanceof DataView)return{rr_type:t.constructor.name,args:[fv(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:[fv(t.data,e,n),t.width,t.height]};if(rB(t,e)||typeof t=="object"){const r=t.constructor.name,s=tB(t,e,n);return{rr_type:r,index:s}}}}return t}const nB=(t,e,n)=>t.map(r=>fv(r,e,n)),rB=(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 tEe(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=uu(e.CanvasRenderingContext2D.prototype,a,function(c){return function(...f){return Cr(this.canvas,n,r,!0)||setTimeout(()=>{const p=nB(f,e,this);t(this.canvas,{type:Wc["2D"],property:a,args:p})},0),c.apply(this,f)}});s.push(u)}catch{const u=Tb(e.CanvasRenderingContext2D.prototype,a,{set(c){t(this.canvas,{type:Wc["2D"],property:a,args:[c],setter:!0})}});s.push(u)}return()=>{s.forEach(a=>a())}}function nEe(t){return t==="experimental-webgl"?"webgl":t}function F4(t,e,n,r){const s=[];try{const o=uu(t.HTMLCanvasElement.prototype,"getContext",function(a){return function(u,...c){if(!Cr(this,e,n,!0)){const f=nEe(u);if("__context"in this||(this.__context=f),r&&["webgl","webgl2"].includes(f))if(c[0]&&typeof c[0]=="object"){const p=c[0];p.preserveDrawingBuffer||(p.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 z4(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=uu(t,c,function(p){return function(...g){const m=p.apply(this,g);if(tB(m,o,this),"tagName"in this.canvas&&!Cr(this.canvas,r,s,!0)){const y=nB(g,o,this),S={type:e,property:c,args:y};n(this.canvas,S)}return m}});a.push(f)}catch{const f=Tb(t,c,{set(p){n(this.canvas,{type:e,property:c,args:[p],setter:!0})}});a.push(f)}return a}function rEe(t,e,n,r){const s=[];return s.push(...z4(e.WebGLRenderingContext.prototype,Wc.WebGL,t,n,r,e)),typeof e.WebGL2RenderingContext<"u"&&s.push(...z4(e.WebGL2RenderingContext.prototype,Wc.WebGL2,t,n,r,e)),()=>{s.forEach(o=>o())}}const sB="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",sEe=t=>Uint8Array.from(atob(t),e=>e.charCodeAt(0)),j4=typeof window<"u"&&window.Blob&&new Blob([sEe(sB)],{type:"text/javascript;charset=utf-8"});function oEe(t){let e;try{if(e=j4&&(window.URL||window.webkitURL).createObjectURL(j4),!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,"+sB,{name:t?.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}class iEe{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=F4(n,r,s,!0),u=new Map,c=new oEe;c.onmessage=S=>{const{id:E}=S.data;if(u.set(E,!1),!("base64"in S.data))return;const{base64:C,type:w,width:_,height:T}=S.data;this.mutationCb({id:E,type:Wc["2D"],commands:[{property:"clearRect",args:[0,0,_,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 p=0,g;const m=()=>{const S=[];return n.document.querySelectorAll("canvas").forEach(E=>{Cr(E,r,s,!0)||S.push(E)}),S},y=S=>{if(p&&S-p<f){g=requestAnimationFrame(y);return}p=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 _=await createImageBitmap(E);c.postMessage({id:w,bitmap:_,width:E.width,height:E.height,dataURLOptions:o.dataURLOptions},[_])}),g=requestAnimationFrame(y)};g=requestAnimationFrame(y),this.resetObservers=()=>{a(),cancelAnimationFrame(g)}}initCanvasMutationObserver(e,n,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const s=F4(e,n,r,!1),o=tEe(this.processMutation.bind(this),e,n,r),a=rEe(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 aEe{constructor(e){Se(this,"trackedLinkElements",new WeakSet),Se(this,"mutationCb"),Se(this,"adoptedStyleSheetCb"),Se(this,"styleMirror",new RSe),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:hz(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 lEe{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,hv,bx,ry=!1;try{if(Array.from([1],t=>t*2)[0]!==2){const t=document.createElement("iframe");document.body.appendChild(t),Array.from=(($U=t.contentWindow)==null?void 0:$U.Array.from)||Array.from,document.body.removeChild(t)}}catch(t){console.debug("Unable to override Array.from",t)}const Bs=cye();function fp(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:p=!0,maskAllInputs:g,maskInputOptions:m,slimDOMOptions:y,maskInputFn:S,maskTextFn:E,hooks:C,packFn:w,sampling:_={},dataURLOptions:T={},mousemoveWait:R,recordDOM:M=!0,recordCanvas:O=!1,recordCrossOriginIframes:I=!1,recordAfter:P=t.recordAfter==="DOMContentLoaded"?t.recordAfter:"load",userTriggeredOnInput:k=!1,collectFonts:H=!1,inlineImages:F=!1,plugins:j,keepIframeSrcFn:W=()=>!1,ignoreCSSAttributes:Y=new Set([]),errorHandler:ne}=t;DSe(ne);const $=I?window.parent===window:!0;let ee=!1;if(!$)try{window.parent.document&&(ee=!1)}catch{ee=!0}if($&&!e)throw new Error("emit function is required");if(!$&&!ee)return()=>{};R!==void 0&&_.mousemove===void 0&&(_.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=Sz(y);TSe();let Ae,L=0;const V=Ee=>{for(const pt of j||[])pt.eventProcessor&&(Ee=pt.eventProcessor(Ee));return w&&!ee&&(Ee=w(Ee)),Ee};gn=(Ee,pt)=>{var Ce;const ze=Ee;if(ze.timestamp=ty(),(Ce=Tl[0])!=null&&Ce.isFrozen()&&ze.type!==Ct.FullSnapshot&&!(ze.type===Ct.IncrementalSnapshot&&ze.data.source===ft.Mutation)&&Tl.forEach(je=>je.unfreeze()),$)e?.(V(ze),pt);else if(ee){const je={type:"rrweb",event:V(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,He=n&&ze.timestamp-Ae.timestamp>n;(je||He)&&hv(!0)}};const K=Ee=>{gn({type:Ct.IncrementalSnapshot,data:{source:ft.Mutation,...Ee}})},J=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 aEe({mutationCb:K,adoptedStyleSheetCb:he}),ve=new ZSe({mirror:Bs,mutationCb:K,stylesheetManager:ue,recordCrossOriginIframes:I,wrappedEmit:gn});for(const Ee of j||[])Ee.getMirror&&Ee.getMirror({nodeMirror:Bs,crossOriginIframeMirror:ve.crossOriginIframeMirror,crossOriginIframeStyleMirror:ve.crossOriginIframeStyleMirror});const xe=new lEe;bx=new iEe({recordCanvas:O,mutationCb:oe,win:window,blockClass:s,blockSelector:o,mirror:Bs,sampling:_.canvas,dataURLOptions:T});const Xe=new XSe({mutationCb:K,scrollCb:J,bypassOptions:{blockClass:s,blockSelector:o,maskTextClass:c,maskTextSelector:f,inlineStylesheet:p,maskInputOptions:fe,dataURLOptions:T,maskTextFn:E,maskInputFn:S,recordCanvas:O,inlineImages:F,sampling:_,slimDOMOptions:de,iframeManager:ve,stylesheetManager:ue,canvasManager:bx,keepIframeSrcFn:W,processedNodeManager:xe},mirror:Bs});hv=(Ee=!1)=>{if(!M)return;gn({type:Ct.Meta,data:{href:window.location.href,width:$j(),height:Hj()}},Ee),ue.reset(),Xe.init(),Tl.forEach(Ce=>Ce.lock());const pt=kye(document,{mirror:Bs,blockClass:s,blockSelector:o,maskTextClass:c,maskTextSelector:f,inlineStylesheet:p,maskAllInputs:fe,maskTextFn:E,maskInputFn:S,slimDOM:de,dataURLOptions:T,recordCanvas:O,inlineImages:F,onSerialize:Ce=>{Gj(Ce,Bs)&&ve.addIframe(Ce),Vj(Ce,Bs)&&ue.trackLinkElement(Ce),lA(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:W});if(!pt)return console.warn("Failed to snapshot the document");gn({type:Ct.FullSnapshot,data:{node:pt,initialOffset:Bj(window)}},Ee),Tl.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(YSe)({mutationCb:K,mousemoveCb:(He,gr)=>gn({type:Ct.IncrementalSnapshot,data:{source:gr,positions:He}}),mouseInteractionCb:He=>gn({type:Ct.IncrementalSnapshot,data:{source:ft.MouseInteraction,...He}}),scrollCb:J,viewportResizeCb:He=>gn({type:Ct.IncrementalSnapshot,data:{source:ft.ViewportResize,...He}}),inputCb:He=>gn({type:Ct.IncrementalSnapshot,data:{source:ft.Input,...He}}),mediaInteractionCb:He=>gn({type:Ct.IncrementalSnapshot,data:{source:ft.MediaInteraction,...He}}),styleSheetRuleCb:He=>gn({type:Ct.IncrementalSnapshot,data:{source:ft.StyleSheetRule,...He}}),styleDeclarationCb:He=>gn({type:Ct.IncrementalSnapshot,data:{source:ft.StyleDeclaration,...He}}),canvasMutationCb:oe,fontCb:He=>gn({type:Ct.IncrementalSnapshot,data:{source:ft.Font,...He}}),selectionCb:He=>{gn({type:Ct.IncrementalSnapshot,data:{source:ft.Selection,...He}})},customElementCb:He=>{gn({type:Ct.IncrementalSnapshot,data:{source:ft.CustomElement,...He}})},blockClass:s,ignoreClass:a,ignoreSelector:u,maskTextClass:c,maskTextSelector:f,maskInputOptions:fe,inlineStylesheet:p,sampling:_,recordDOM:M,recordCanvas:O,inlineImages:F,userTriggeredOnInput:k,collectFonts:H,doc:ze,maskInputFn:S,maskTextFn:E,keepIframeSrcFn:W,blockSelector:o,slimDOMOptions:de,dataURLOptions:T,mirror:Bs,iframeManager:ve,stylesheetManager:ue,shadowDomManager:Xe,processedNodeManager:xe,canvasManager:bx,ignoreCSSAttributes:Y,plugins:((je=j?.filter(He=>He.observer))==null?void 0:je.map(He=>({observer:He.observer,options:He.options,callback:gr=>gn({type:Ct.Plugin,data:{plugin:He.name,payload:gr}})})))||[]},C)};ve.addLoadListener(ze=>{try{Ee.push(pt(ze.contentDocument))}catch(je){console.warn(je)}});const Ce=()=>{hv(),Ee.push(pt(document)),ry=!0};return["interactive","complete"].includes(document.readyState)?Ce():(Ee.push(Er("DOMContentLoaded",()=>{gn({type:Ct.DomContentLoaded,data:{}}),P==="DOMContentLoaded"&&Ce()})),Ee.push(Er("load",()=>{gn({type:Ct.Load,data:{}}),P==="load"&&Ce()},window))),()=>{Ee.forEach(ze=>{try{ze()}catch(je){String(je).toLowerCase().includes("cross-origin")||console.warn(je)}}),xe.destroy(),ry=!1,LSe()}}catch(Ee){console.warn(Ee)}}fp.addCustomEvent=(t,e)=>{if(!ry)throw new Error("please add custom event after start recording");gn({type:Ct.Custom,data:{tag:t,payload:e}})};fp.freezePage=()=>{Tl.forEach(t=>t.freeze())};fp.takeFullSnapshot=t=>{if(!ry)throw new Error("please take full snapshot after start recording");hv(t)};fp.mirror=Bs;var B4;(function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"})(B4||(B4={}));const uEe="rrweb",cEe={maskAllInputs:!0,maskTextSelector:"*",maskInputOptions:void 0},dEe={additionalSampleRate:1,batchSize:50,flushInterval:5e3,recordOptions:{slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,recordCrossOriginIframes:!1}},H4=dEe;class fEe extends Ns{constructor(e){super(uEe),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({},H4.recordOptions),e?.recordOptions),cEe);this.config=Object.assign(Object.assign(Object.assign({},H4),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=fp(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(TU,n),be.info("RRWebPlugin events sent to RUM",{eventType:TU,eventCount:this.recordingEvents.length}),this.recordingEvents=[]}}var hEe=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},cA;(function(t){t.Path="PATH",t.Hash="HASH",t.PathAndHash="PATH_AND_HASH"})(cA||(cA={}));const oB="us-west-2",dA=`https://dataplane.rum.${oB}.amazonaws.com`,iB=()=>({unique:!1,domain:window.location.hostname,path:"/",sameSite:"Strict",secure:!0}),aB=t=>({allowCookies:!1,batchLimit:100,client:Uge,compressionStrategy:{enabled:!0},cookieAttributes:t,debug:!1,disableAutoPageView:!1,dispatchInterval:5*1e3,enableRumClient:!0,enableXRay:!1,endpoint:dA,endpointUrl:new URL(dA),eventCacheSize:1e3,eventPluginsToLoad:[],pageIdFormat:cA.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 pEe=class{constructor(e,n,r,s={}){var{cookieAttributes:o}=s,a=hEe(s,["cookieAttributes"]);this.eventBus=new X7,typeof r>"u"&&(r="us-west-2"),this.applicationId=e;const u=Object.assign(Object.assign({},iB()),o);this.config=Object.assign(Object.assign({fetchFunction:fetch},aB(u)),a),this.config.sessionId&&(this.config.suppressSessionStartEvent=!0),this.config.endpoint=a.endpoint?a.endpoint:dA.replace(oB,r),this.config.endpointUrl=new URL(this.config.endpoint),be.configure(this.config.debug),be.info("Initialized RUM Slim"),this.eventCache=new Kme({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;[Lv,Uv,Fc,`${Lv}_${this.applicationId}`,`${Uv}_${this.applicationId}`,`${Fc}_${this.applicationId}`].forEach(r=>jme(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 Fge(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 zme(r);return this.config.disableAutoPageView||s.addPlugin(new fve),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 $4;(function(t){t.Path="PATH",t.Hash="HASH",t.PathAndHash="PATH_AND_HASH"})($4||($4={}));const gEe=t=>Object.assign(Object.assign({},aB(t)),{signing:!0,telemetries:[Ks.Errors,Ks.Performance,Ks.Http,Ks.Replay]});class mEe extends pEe{constructor(e,n,r,s={}){super(e,n,r,Object.assign(Object.assign({},gEe(iB())),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(hme),r.setCognitoCredentialProviderFactory((s,o,a,u)=>{const c={identityPoolId:a,guestRoleArn:u,cookieAttributes:s.cookieAttributes};return a&&u?new Ime(c,o).ChainAnonymousCredentialsProvider:new Ome(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(ez,e)}registerDomEvents(e){this.pluginManager.updatePlugin(Q7,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 ove(e)],[Ks.Performance]:e=>[new lve(e),new pve(e),new kve(e)],[Ks.Interaction]:e=>[new cR(e)],[Ks.Http]:e=>[new zve(e),new Lve(e)],[Ks.Replay]:e=>[new fEe(e)]}}}const lB={recordPageView:()=>{},recordError:()=>{},recordEvent:()=>{},recordTiming:()=>{}},vEe=/([?&](token|access_token|id_token|authorization)=[^&]*)|\/messages\/[a-z0-9_-]+/gi;function uB(t){return t.replace(vEe,"[redacted]")}function yEe(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 uB(t.slice(0,r))}function bEe(t){const e=uB(t.message);if(e===t.message)return t;const n=new Error(e);return n.name=t.name,n.stack=t.stack,n}function SEe(t){return{recordPageView(e){t.recordPageView(yEe(e))},recordError(e,n){t.recordError(bEe(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 q4(t){return t instanceof Error?t:new Error(String(t))}function EEe(t){window.addEventListener("error",e=>{t.recordError(q4(e.error??e.message))}),window.addEventListener("unhandledrejection",e=>{t.recordError(q4(e.reason))})}function CEe(){const{appMonitorId:t,identityPoolId:e,region:n}=xy().rum;if(!t)return lB;const r=new mEe(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=SEe(r);return EEe(s),s}const cB=A.createContext(lB);function $Ae(){return A.useContext(cB)}const fA="remit.theme",wEe="dark";function W4(){return typeof localStorage>"u"?"system":localStorage.getItem(fA)??"system"}function hA(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(wEe,e)}function qAe(t){typeof localStorage<"u"&&(t==="system"?localStorage.removeItem(fA):localStorage.setItem(fA,t)),hA(t)}const xEe=()=>{if(typeof window>"u"||(hA(W4()),typeof window.matchMedia!="function"))return;const t=window.matchMedia("(prefers-color-scheme: dark)"),e=()=>{hA(W4())};typeof t.addEventListener=="function"?t.addEventListener("change",e):t.addListener(e)},_Ee=(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);Ll(s[0])&&(s[0]=`react-i18next:: ${s[0]}`),t?.services?.logger?.warn?t.services.logger.warn(...s):console?.warn&&console.warn(...s)},G4={},pA=(t,e,n,r)=>{Ll(n)&&G4[n]||(Ll(n)&&(G4[n]=new Date),_Ee(t,e,n,r))},dB=(t,e)=>()=>{if(t.isInitialized)e();else{const n=()=>{setTimeout(()=>{t.off("initialized",n)},0),e()};t.on("initialized",n)}},gA=(t,e,n)=>{t.loadNamespaces(e,dB(t,n))},V4=(t,e,n,r)=>{if(Ll(n)&&(n=[n]),t.options.preload&&t.options.preload.indexOf(e)>-1)return gA(t,n,r);n.forEach(s=>{t.options.ns.indexOf(s)<0&&t.options.ns.push(s)}),t.loadLanguages(e,dB(t,r))},AEe=(t,e,n={})=>!e.languages||!e.languages.length?(pA(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}}),Ll=t=>typeof t=="string",TEe=t=>typeof t=="object"&&t!==null,REe=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,IEe={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},OEe=t=>IEe[t],NEe=t=>t.replace(REe,OEe);let mA={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:NEe};const MEe=(t={})=>{mA={...mA,...t}},PEe=()=>mA;let fB;const kEe=t=>{fB=t},DEe=()=>fB,LEe={type:"3rdParty",init(t){MEe(t.options.react),kEe(t)}},UEe=A.createContext();class FEe{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const zEe=(t,e)=>{const n=A.useRef();return A.useEffect(()=>{n.current=t},[t,e]),n.current},hB=(t,e,n,r)=>t.getFixedT(e,n,r),jEe=(t,e,n,r)=>A.useCallback(hB(t,e,n,r),[t,e,n,r]),BEe=(t,e={})=>{const{i18n:n}=e,{i18n:r,defaultNS:s}=A.useContext(UEe)||{},o=n||r||DEe();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new FEe),!o){pA(o,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const R=(O,I)=>Ll(I)?I:TEe(I)&&Ll(I.defaultValue)?I.defaultValue:Array.isArray(O)?O[O.length-1]:O,M=[R,{},!1];return M.t=R,M.i18n={},M.ready=!1,M}o.options.react?.wait&&pA(o,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const a={...PEe(),...o.options.react,...e},{useSuspense:u,keyPrefix:c}=a;let f=t||s||o.options?.defaultNS;f=Ll(f)?[f]:f||["translation"],o.reportNamespaces.addUsedNamespaces?.(f);const p=(o.isInitialized||o.initializedStoreOnce)&&f.every(R=>AEe(R,o,a)),g=jEe(o,e.lng||null,a.nsMode==="fallback"?f:f[0],c),m=()=>g,y=()=>hB(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=zEe(C),_=A.useRef(!0);A.useEffect(()=>{const{bindI18n:R,bindI18nStore:M}=a;_.current=!0,!p&&!u&&(e.lng?V4(o,e.lng,f,()=>{_.current&&E(y)}):gA(o,f,()=>{_.current&&E(y)})),p&&w&&w!==C&&_.current&&E(y);const O=()=>{_.current&&E(y)};return R&&o?.on(R,O),M&&o?.store.on(M,O),()=>{_.current=!1,o&&R&&R?.split(" ").forEach(I=>o.off(I,O)),M&&o&&M.split(" ").forEach(I=>o.store.off(I,O))}},[o,C]),A.useEffect(()=>{_.current&&p&&E(m)},[o,c,p]);const T=[S,o,p];if(T.t=S,T.i18n=o,T.ready=p,p||!p&&!u)return T;throw new Promise(R=>{e.lng?V4(o,e.lng,f,()=>R()):gA(o,f,()=>R())})},HEe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts",...t,headers:{"Content-Type":"application/json",...t.headers}}),$Ee=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/oauth/microsoft/start",...t,headers:{"Content-Type":"application/json",...t.headers}}),qEe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/test-connection",...t,headers:{"Content-Type":"application/json",...t.headers}}),WEe=t=>(t.client??Ze).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}",...t}),GEe=t=>(t.client??Ze).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}",...t,headers:{"Content-Type":"application/json",...t.headers}}),VEe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/filters",...t}),KEe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/filters",...t,headers:{"Content-Type":"application/json",...t.headers}}),YEe=t=>(t.client??Ze).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/filters/{filterId}",...t}),ZEe=t=>(t.client??Ze).put({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/folder-roles/{role}",...t,headers:{"Content-Type":"application/json",...t.headers}}),XEe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/mailboxes",...t}),QEe=t=>(t.client??Ze).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/mailboxes/{mailboxId}",...t,headers:{"Content-Type":"application/json",...t.headers}}),JEe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/organize",...t,headers:{"Content-Type":"application/json",...t.headers}}),eCe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/organize/preview",...t,headers:{"Content-Type":"application/json",...t.headers}}),tCe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/organize/{organizeJobId}",...t}),nCe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/sync",...t}),rCe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/sync/status",...t}),sCe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/addresses/search",...t}),oCe=t=>(t.client??Ze).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/addresses/{addressId}",...t,headers:{"Content-Type":"application/json",...t.headers}}),iCe=t=>(t?.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/config",...t}),WAe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/mailboxes/{mailboxId}/threads",...t}),aCe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/mailboxes/{mailboxId}/threads/search",...t}),lCe=t=>(t.client??Ze).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/me",...t,headers:{"Content-Type":"application/json",...t.headers}}),uCe=t=>(t?.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/me/export",...t}),cCe=t=>(t?.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/me/vip-suggestions",...t}),dCe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/delete",...t,headers:{"Content-Type":"application/json",...t.headers}}),fCe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/flags",...t,headers:{"Content-Type":"application/json",...t.headers}}),hCe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/move",...t,headers:{"Content-Type":"application/json",...t.headers}}),pCe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/{messageId}",...t}),gCe=t=>(t.client??Ze).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/{messageId}/flags",...t,headers:{"Content-Type":"application/json",...t.headers}}),mCe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/{messageId}/raw",...t}),vCe=t=>(t?.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox",...t}),yCe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox",...t,headers:{"Content-Type":"application/json",...t.headers}}),bCe=t=>(t.client??Ze).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}",...t}),SCe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}",...t}),ECe=t=>(t.client??Ze).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}",...t,headers:{"Content-Type":"application/json",...t.headers}}),CCe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}/send",...t}),wCe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/search/semantic",...t}),xCe=t=>(t?.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/threads",...t}),_Ce=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/threads/{threadId}/messages",...t}),GAe=t=>({mutationFn:async n=>{const{data:r}=await HEe({...t,...n,throwOnError:!0});return r}}),hr=(t,e,n,r)=>{const s={_id:t,baseUrl:e?.baseUrl||(e?.client??Ze).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]},VAe=t=>({mutationFn:async n=>{const{data:r}=await $Ee({...t,...n,throwOnError:!0});return r}}),KAe=t=>({mutationFn:async n=>{const{data:r}=await qEe({...t,...n,throwOnError:!0});return r}}),YAe=t=>({mutationFn:async n=>{const{data:r}=await WEe({...t,...n,throwOnError:!0});return r}}),ZAe=t=>({mutationFn:async n=>{const{data:r}=await GEe({...t,...n,throwOnError:!0});return r}}),ACe=t=>hr("filterOperationsListFilters",t),XAe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await VEe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:ACe(t)}),QAe=t=>({mutationFn:async n=>{const{data:r}=await KEe({...t,...n,throwOnError:!0});return r}}),JAe=t=>({mutationFn:async n=>{const{data:r}=await YEe({...t,...n,throwOnError:!0});return r}}),eTe=t=>({mutationFn:async n=>{const{data:r}=await ZEe({...t,...n,throwOnError:!0});return r}}),TCe=t=>hr("mailboxOperationsListMailboxes",t),tTe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await XEe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:TCe(t)}),nTe=t=>({mutationFn:async n=>{const{data:r}=await QEe({...t,...n,throwOnError:!0});return r}}),rTe=t=>({mutationFn:async n=>{const{data:r}=await JEe({...t,...n,throwOnError:!0});return r}}),sTe=t=>({mutationFn:async n=>{const{data:r}=await eCe({...t,...n,throwOnError:!0});return r}}),RCe=t=>hr("organizeJobDetailOperationsGetOrganizeJob",t),oTe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await tCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:RCe(t)}),iTe=t=>({mutationFn:async n=>{const{data:r}=await nCe({...t,...n,throwOnError:!0});return r}}),ICe=t=>hr("syncOperationsGetSyncStatus",t),aTe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await rCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:ICe(t)}),OCe=t=>hr("addressOperationsSearchAddresses",t),lTe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await sCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:OCe(t)}),uTe=t=>({mutationFn:async n=>{const{data:r}=await oCe({...t,...n,throwOnError:!0});return r}}),NCe=t=>hr("configOperationsGetConfig",t),MCe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await iCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:NCe(t)}),cTe=t=>hr("threadOperationsListThreads",t),PCe=t=>hr("threadOperationsSearchThreads",t),dTe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await aCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:PCe(t)}),fTe=t=>({mutationFn:async n=>{const{data:r}=await lCe({...t,...n,throwOnError:!0});return r}}),hTe=t=>({mutationFn:async n=>{const{data:r}=await uCe({...t,...n,throwOnError:!0});return r}}),kCe=t=>hr("meOperationsListVipSuggestions",t),pTe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await cCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:kCe(t)}),gTe=t=>({mutationFn:async n=>{const{data:r}=await dCe({...t,...n,throwOnError:!0});return r}}),mTe=t=>({mutationFn:async n=>{const{data:r}=await fCe({...t,...n,throwOnError:!0});return r}}),vTe=t=>({mutationFn:async n=>{const{data:r}=await hCe({...t,...n,throwOnError:!0});return r}}),DCe=t=>hr("messageOperationsDescribeMessage",t),yTe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await pCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:DCe(t)}),bTe=t=>({mutationFn:async n=>{const{data:r}=await gCe({...t,...n,throwOnError:!0});return r}}),LCe=t=>hr("messageOperationsGetRawMessage",t),STe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await mCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:LCe(t)}),pB=t=>hr("outboxOperationsListOutboxMessages",t),ETe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await vCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:pB(t)}),CTe=t=>({mutationFn:async n=>{const{data:r}=await yCe({...t,...n,throwOnError:!0});return r}}),wTe=t=>({mutationFn:async n=>{const{data:r}=await bCe({...t,...n,throwOnError:!0});return r}}),UCe=t=>hr("outboxDetailOperationsGetOutboxMessage",t),FCe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await SCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:UCe(t)}),xTe=t=>({mutationFn:async n=>{const{data:r}=await ECe({...t,...n,throwOnError:!0});return r}}),_Te=t=>({mutationFn:async n=>{const{data:r}=await CCe({...t,...n,throwOnError:!0});return r}}),zCe=t=>hr("semanticSearchOperationsSemanticSearch",t),ATe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await wCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:zCe(t)}),jCe=t=>hr("unifiedThreadOperationsListAllThreads",t),BCe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await xCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:jCe(t)}),HCe=t=>hr("threadDetailOperationsListThreadMessages",t),TTe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await _Ce({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:HCe(t)}),gB=A.createContext(void 0),K4={isOpen:!1,mode:"new"},$Ce=2e3,qCe=6e4,WCe=({children:t})=>{const[e,n]=A.useState(K4),[r,s]=A.useState(),o=A.useRef(0),a=GF(),{data:u}=Pfe({...FCe({path:{outboxMessageId:r??""}}),enabled:!!r,refetchInterval:y=>{const S=y.state.data?.status;return S==="sent"||S==="failed"||S==="blocked"||Date.now()-o.current>qCe?!1:$Ce}});A.useEffect(()=>{if(!u||!r)return;(u.status==="sent"||u.status==="failed"||u.status==="blocked")&&(s(void 0),a.invalidateQueries({queryKey:pB()}))},[u,r,a]);const c=A.useCallback(y=>{n({...y,isOpen:!0})},[]),f=A.useCallback(()=>{n(K4)},[]),p=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:p,startSendPolling:g}),[e,c,f,p,g]);return D.jsx(gB.Provider,{value:m,children:t})},RTe=()=>{const t=A.useContext(gB);if(!t)throw new Error("useCompose must be used within a ComposeProvider");return t},Sx=(...t)=>c8(J6(t)),GCe={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"}},VCe={error:JZ,warning:uX,info:rX},KCe={error:"Error",warning:"Warning",info:"Information"},YCe=({id:t,severity:e,title:n,detail:r,onDismiss:s})=>{const o=GCe[e],a=VCe[e];return D.jsxs("div",{role:e==="error"?"alert":"status","aria-live":e==="error"?"assertive":"polite",className:Sx("pointer-events-auto flex items-start gap-3 rounded-md border bg-canvas px-3 py-2 shadow-lg",o.container),children:[D.jsx(a,{className:Sx("size-5 shrink-0 mt-0.5",o.icon),"aria-hidden":"true"}),D.jsxs("div",{className:"flex-1 min-w-0",children:[D.jsx("p",{className:Sx("text-sm font-medium",o.title),children:n}),r&&D.jsx("p",{className:"mt-0.5 text-xs text-fg-muted break-words",children:r})]}),D.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 ${KCe[e].toLowerCase()}`,children:D.jsx(gh,{className:"size-4","aria-hidden":"true"})})]})},ZCe=({errors:t,onDismiss:e})=>t.length===0?null:D.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:D.jsx("div",{className:"flex w-full max-w-md flex-col gap-2",children:t.map(n=>D.jsx(YCe,{id:n.id,severity:n.severity,title:n.title,detail:n.detail,onDismiss:e},n.id))})}),Y4=5,ITe=(t,e,n)=>({title:t,detail:mB(n)??e,error:n}),mB=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}},OTe=t=>{const e=mB(t);return e?e.startsWith("Message not found"):!1},XCe=(t,e,n)=>t.severity===n&&t.title===e.title&&t.detail===e.detail,QCe=(t,e)=>{const r=[...t.filter(s=>!XCe(s,{title:e.title,detail:e.detail,severity:e.severity},e.severity)),e];return r.length<=Y4?r:r.slice(r.length-Y4)},JCe=(t,e)=>t.filter(n=>n.id!==e),ewe=(t,e,n)=>({id:e,severity:t.severity??"error",title:t.title,detail:t.detail,createdAt:n}),vB=A.createContext(void 0),twe=()=>typeof globalThis.crypto<"u"&&typeof globalThis.crypto.randomUUID=="function"?globalThis.crypto.randomUUID():`banner-${Date.now()}-${Math.random().toString(36).slice(2,10)}`,nwe=({children:t})=>{const[e,n]=A.useState([]),r=A.useCallback(u=>{if(u.error!=null&&W8(u.error))return zl(u.error).correlationId;const c=ewe(u,twe(),Date.now());return n(f=>QCe(f,c)),c.id},[]),s=A.useCallback(u=>{n(c=>JCe(c,u))},[]),o=A.useCallback(()=>{n([])},[]),a=A.useMemo(()=>({errors:e,pushError:r,dismissError:s,clearAll:o}),[e,r,s,o]);return D.jsxs(vB.Provider,{value:a,children:[t,D.jsx(ZCe,{errors:e,onDismiss:s})]})},NTe=()=>{const t=A.useContext(vB);if(!t)throw new Error("useErrorBanners must be used within an ErrorBannerProvider");return t},rwe=({error:t,reset:e,info:n})=>{const r=Ny(t),s=zl(t,{recoverable:r,componentStack:n?.componentStack});return D.jsx(Q8,{fatal:s,onRetry:r?e:void 0})},hp=ape()({component:owe,errorComponent:rwe}),swe=()=>{const{t}=BEe("common",{useSuspense:!1});return D.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 owe(){return D.jsxs(nwe,{children:[D.jsxs(WCe,{children:[D.jsx(swe,{}),D.jsx("main",{id:"main-content",className:"h-dvh overflow-hidden",children:D.jsx(A.Suspense,{fallback:D.jsx(KA,{}),children:D.jsx(x7,{})})})]}),D.jsx(X8,{})]})}const iwe=fr("/")({beforeLoad:()=>{throw s7({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 Z4;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(Z4||(Z4={}));const Oe=Tt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Sa=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 xi 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 xi))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()}}xi.create=t=>new xi(t);const vA=(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 awe=vA;function lwe(){return awe}const uwe=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=lwe(),r=uwe({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===vA?void 0:vA].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 Ke;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 Ke;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 Ke=Object.freeze({status:"aborted"}),Xf=t=>({status:"dirty",value:t}),Ms=t=>({status:"valid",value:t}),X4=t=>t.status==="aborted",Q4=t=>t.status==="dirty",Gc=t=>t.status==="valid",sy=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 Ba{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 J4=(t,e)=>{if(Gc(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 xi(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 Sa(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:Sa(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:Sa(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(sy(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:Sa(e)},s=this._parseSync({data:e,path:r.path,parent:r});return J4(r,s)}"~validate"(e){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Sa(e)};if(!this["~standard"].async)try{const r=this._parseSync({data:e,path:[],parent:n});return Gc(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=>Gc(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:Sa(e)},s=this._parse({data:e,path:r.path,parent:r}),o=await(sy(s)?s:Promise.resolve(s));return J4(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 Yc({schema:this,typeName:Ye.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 Ma.create(this,this._def)}nullable(){return Zc.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return xo.create(this)}promise(){return ly.create(this,this._def)}or(e){return iy.create([this,e],this._def)}and(e){return ay.create(this,e,this._def)}transform(e){return new Yc({...st(this._def),schema:this,typeName:Ye.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new bA({...st(this._def),innerType:this,defaultValue:n,typeName:Ye.ZodDefault})}brand(){return new Mwe({typeName:Ye.ZodBranded,type:this,...st(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new SA({...st(this._def),innerType:this,catchValue:n,typeName:Ye.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return qR.create(this,e)}readonly(){return EA.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const cwe=/^c[^\s-]{8,}$/i,dwe=/^[0-9a-z]+$/,fwe=/^[0-9A-HJKMNP-TV-Z]{26}$/i,hwe=/^[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,pwe=/^[a-z0-9_-]{21}$/i,gwe=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,mwe=/^[-+]?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)?)??$/,vwe=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,ywe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Ex;const bwe=/^(?:(?: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])$/,Swe=/^(?:(?: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])$/,Ewe=/^(([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]))$/,Cwe=/^(([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])$/,wwe=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,xwe=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,yB="((\\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])))",_we=new RegExp(`^${yB}$`);function bB(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 Awe(t){return new RegExp(`^${bB(t)}$`)}function Twe(t){let e=`${yB}T${bB(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 Rwe(t,e){return!!((e==="v4"||!e)&&bwe.test(t)||(e==="v6"||!e)&&Ewe.test(t))}function Iwe(t,e){if(!gwe.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 Owe(t,e){return!!((e==="v4"||!e)&&Swe.test(t)||(e==="v6"||!e)&&Cwe.test(t))}class hi 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}),Ke}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")vwe.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")Ex||(Ex=new RegExp(ywe,"u")),Ex.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")hwe.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")pwe.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")cwe.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")dwe.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")fwe.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"?Twe(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"?_we.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{code:ge.invalid_string,validation:"date",message:o.message}),r.dirty()):o.kind==="time"?Awe(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"?mwe.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"duration",code:ge.invalid_string,message:o.message}),r.dirty()):o.kind==="ip"?Rwe(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"?Iwe(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"?Owe(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"?wwe.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"base64",code:ge.invalid_string,message:o.message}),r.dirty()):o.kind==="base64url"?xwe.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 hi({...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 hi({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new hi({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new hi({...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}}hi.create=t=>new hi({checks:[],typeName:Ye.ZodString,coerce:t?.coerce??!1,...st(t)});function Nwe(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 Vl 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}),Ke}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"?Nwe(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 Vl({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:Me.toString(s)}]})}_addCheck(e){return new Vl({...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)}}Vl.create=t=>new Vl({checks:[],typeName:Ye.ZodNumber,coerce:t?.coerce||!1,...st(t)});class Kl 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}),Ke}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 Kl({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:Me.toString(s)}]})}_addCheck(e){return new Kl({...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}}Kl.create=t=>new Kl({checks:[],typeName:Ye.ZodBigInt,coerce:t?.coerce??!1,...st(t)});class oy 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}),Ke}return Ms(e.data)}}oy.create=t=>new oy({typeName:Ye.ZodBoolean,coerce:t?.coerce||!1,...st(t)});class Vc 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}),Ke}if(Number.isNaN(e.data.getTime())){const o=this._getOrReturnCtx(e);return _e(o,{code:ge.invalid_date}),Ke}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 Vc({...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}}Vc.create=t=>new Vc({checks:[],coerce:t?.coerce||!1,typeName:Ye.ZodDate,...st(t)});class e5 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}),Ke}return Ms(e.data)}}e5.create=t=>new e5({typeName:Ye.ZodSymbol,...st(t)});class t5 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}),Ke}return Ms(e.data)}}t5.create=t=>new t5({typeName:Ye.ZodUndefined,...st(t)});class n5 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}),Ke}return Ms(e.data)}}n5.create=t=>new n5({typeName:Ye.ZodNull,...st(t)});class r5 extends wt{constructor(){super(...arguments),this._any=!0}_parse(e){return Ms(e.data)}}r5.create=t=>new r5({typeName:Ye.ZodAny,...st(t)});class s5 extends wt{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Ms(e.data)}}s5.create=t=>new s5({typeName:Ye.ZodUnknown,...st(t)});class Ha extends wt{_parse(e){const n=this._getOrReturnCtx(e);return _e(n,{code:ge.invalid_type,expected:Oe.never,received:n.parsedType}),Ke}}Ha.create=t=>new Ha({typeName:Ye.ZodNever,...st(t)});class o5 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}),Ke}return Ms(e.data)}}o5.create=t=>new o5({typeName:Ye.ZodVoid,...st(t)});class xo 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}),Ke;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 Ba(n,a,n.path,u)))).then(a=>us.mergeArray(r,a));const o=[...n.data].map((a,u)=>s.type._parseSync(new Ba(n,a,n.path,u)));return us.mergeArray(r,o)}get element(){return this._def.type}min(e,n){return new xo({...this._def,minLength:{value:e,message:Me.toString(n)}})}max(e,n){return new xo({...this._def,maxLength:{value:e,message:Me.toString(n)}})}length(e,n){return new xo({...this._def,exactLength:{value:e,message:Me.toString(n)}})}nonempty(e){return this.min(1,e)}}xo.create=(t,e)=>new xo({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Ye.ZodArray,...st(e)});function mc(t){if(t instanceof _n){const e={};for(const n in t.shape){const r=t.shape[n];e[n]=Ma.create(mc(r))}return new _n({...t._def,shape:()=>e})}else return t instanceof xo?new xo({...t._def,type:mc(t.element)}):t instanceof Ma?Ma.create(mc(t.unwrap())):t instanceof Zc?Zc.create(mc(t.unwrap())):t instanceof Yl?Yl.create(t.items.map(e=>mc(e))):t}class _n 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}),Ke}const{status:r,ctx:s}=this._processInputParams(e),{shape:o,keys:a}=this._getCached(),u=[];if(!(this._def.catchall instanceof Ha&&this._def.unknownKeys==="strip"))for(const f in s.data)a.includes(f)||u.push(f);const c=[];for(const f of a){const p=o[f],g=s.data[f];c.push({key:{status:"valid",value:f},value:p._parse(new Ba(s,g,s.path,f)),alwaysSet:f in s.data})}if(this._def.catchall instanceof Ha){const f=this._def.unknownKeys;if(f==="passthrough")for(const p of u)c.push({key:{status:"valid",value:p},value:{status:"valid",value:s.data[p]}});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 p of u){const g=s.data[p];c.push({key:{status:"valid",value:p},value:f._parse(new Ba(s,g,s.path,p)),alwaysSet:p in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const f=[];for(const p of c){const g=await p.key,m=await p.value;f.push({key:g,value:m,alwaysSet:p.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 _n({...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 _n({...this._def,unknownKeys:"strip"})}passthrough(){return new _n({...this._def,unknownKeys:"passthrough"})}extend(e){return new _n({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new _n({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Ye.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new _n({...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 _n({...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 _n({...this._def,shape:()=>n})}deepPartial(){return mc(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 _n({...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 Ma;)o=o._def.innerType;n[r]=o}return new _n({...this._def,shape:()=>n})}keyof(){return SB(Tt.objectKeys(this.shape))}}_n.create=(t,e)=>new _n({shape:()=>t,unknownKeys:"strip",catchall:Ha.create(),typeName:Ye.ZodObject,...st(e)});_n.strictCreate=(t,e)=>new _n({shape:()=>t,unknownKeys:"strict",catchall:Ha.create(),typeName:Ye.ZodObject,...st(e)});_n.lazycreate=(t,e)=>new _n({shape:t,unknownKeys:"strip",catchall:Ha.create(),typeName:Ye.ZodObject,...st(e)});class iy 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 xi(u.ctx.common.issues));return _e(n,{code:ge.invalid_union,unionErrors:a}),Ke}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},p=c._parseSync({data:n.data,path:n.path,parent:f});if(p.status==="valid")return p;p.status==="dirty"&&!o&&(o={result:p,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 xi(c));return _e(n,{code:ge.invalid_union,unionErrors:u}),Ke}}get options(){return this._def.options}}iy.create=(t,e)=>new iy({options:t,typeName:Ye.ZodUnion,...st(e)});function yA(t,e){const n=Sa(t),r=Sa(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=yA(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=yA(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 ay extends wt{_parse(e){const{status:n,ctx:r}=this._processInputParams(e),s=(o,a)=>{if(X4(o)||X4(a))return Ke;const u=yA(o.value,a.value);return u.valid?((Q4(o)||Q4(a))&&n.dirty(),{status:n.value,value:u.data}):(_e(r,{code:ge.invalid_intersection_types}),Ke)};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}))}}ay.create=(t,e,n)=>new ay({left:t,right:e,typeName:Ye.ZodIntersection,...st(n)});class Yl 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}),Ke;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"}),Ke;!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 Ba(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 Yl({...this._def,rest:e})}}Yl.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Yl({items:t,typeName:Ye.ZodTuple,rest:null,...st(e)})};class i5 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}),Ke;const s=this._def.keyType,o=this._def.valueType,a=[...r.data.entries()].map(([u,c],f)=>({key:s._parse(new Ba(r,u,r.path,[f,"key"])),value:o._parse(new Ba(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,p=await c.value;if(f.status==="aborted"||p.status==="aborted")return Ke;(f.status==="dirty"||p.status==="dirty")&&n.dirty(),u.set(f.value,p.value)}return{status:n.value,value:u}})}else{const u=new Map;for(const c of a){const f=c.key,p=c.value;if(f.status==="aborted"||p.status==="aborted")return Ke;(f.status==="dirty"||p.status==="dirty")&&n.dirty(),u.set(f.value,p.value)}return{status:n.value,value:u}}}}i5.create=(t,e,n)=>new i5({valueType:e,keyType:t,typeName:Ye.ZodMap,...st(n)});class $h 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}),Ke;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 p of c){if(p.status==="aborted")return Ke;p.status==="dirty"&&n.dirty(),f.add(p.value)}return{status:n.value,value:f}}const u=[...r.data.values()].map((c,f)=>o._parse(new Ba(r,c,r.path,f)));return r.common.async?Promise.all(u).then(c=>a(c)):a(u)}min(e,n){return new $h({...this._def,minSize:{value:e,message:Me.toString(n)}})}max(e,n){return new $h({...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)}}$h.create=(t,e)=>new $h({valueType:t,minSize:null,maxSize:null,typeName:Ye.ZodSet,...st(e)});class a5 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})}}a5.create=(t,e)=>new a5({getter:t,typeName:Ye.ZodLazy,...st(e)});class l5 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}),Ke}return{status:"valid",value:e.data}}get value(){return this._def.value}}l5.create=(t,e)=>new l5({value:t,typeName:Ye.ZodLiteral,...st(e)});function SB(t,e){return new Kc({values:t,typeName:Ye.ZodEnum,...st(e)})}class Kc 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}),Ke}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}),Ke}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 Kc.create(e,{...this._def,...n})}exclude(e,n=this._def){return Kc.create(this.options.filter(r=>!e.includes(r)),{...this._def,...n})}}Kc.create=SB;class u5 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}),Ke}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}),Ke}return Ms(e.data)}get enum(){return this._def.values}}u5.create=(t,e)=>new u5({values:t,typeName:Ye.ZodNativeEnum,...st(e)});class ly 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}),Ke;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})))}}ly.create=(t,e)=>new ly({type:t,typeName:Ye.ZodPromise,...st(e)});class Yc extends wt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ye.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 Ke;const c=await this._def.schema._parseAsync({data:u,path:r.path,parent:r});return c.status==="aborted"?Ke:c.status==="dirty"||n.value==="dirty"?Xf(c.value):c});{if(n.value==="aborted")return Ke;const u=this._def.schema._parseSync({data:a,path:r.path,parent:r});return u.status==="aborted"?Ke:u.status==="dirty"||n.value==="dirty"?Xf(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"?Ke:(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"?Ke:(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(!Gc(a))return Ke;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=>Gc(a)?Promise.resolve(s.transform(a.value,o)).then(u=>({status:n.value,value:u})):Ke);Tt.assertNever(s)}}Yc.create=(t,e,n)=>new Yc({schema:t,typeName:Ye.ZodEffects,effect:e,...st(n)});Yc.createWithPreprocess=(t,e,n)=>new Yc({schema:e,effect:{type:"preprocess",transform:t},typeName:Ye.ZodEffects,...st(n)});class Ma extends wt{_parse(e){return this._getType(e)===Oe.undefined?Ms(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Ma.create=(t,e)=>new Ma({innerType:t,typeName:Ye.ZodOptional,...st(e)});class Zc extends wt{_parse(e){return this._getType(e)===Oe.null?Ms(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Zc.create=(t,e)=>new Zc({innerType:t,typeName:Ye.ZodNullable,...st(e)});class bA 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}}bA.create=(t,e)=>new bA({innerType:t,typeName:Ye.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...st(e)});class SA 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 sy(s)?s.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new xi(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new xi(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}SA.create=(t,e)=>new SA({innerType:t,typeName:Ye.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...st(e)});class c5 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}),Ke}return{status:"valid",value:e.data}}}c5.create=t=>new c5({typeName:Ye.ZodNaN,...st(t)});class Mwe 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 qR 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"?Ke:o.status==="dirty"?(n.dirty(),Xf(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"?Ke: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 qR({in:e,out:n,typeName:Ye.ZodPipeline})}}class EA extends wt{_parse(e){const n=this._def.innerType._parse(e),r=s=>(Gc(s)&&(s.value=Object.freeze(s.value)),s);return sy(n)?n.then(s=>r(s)):r(n)}unwrap(){return this._def.innerType}}EA.create=(t,e)=>new EA({innerType:t,typeName:Ye.ZodReadonly,...st(e)});var Ye;(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"})(Ye||(Ye={}));const wr=hi.create;Vl.create;Kl.create;const Pwe=oy.create;Vc.create;Ha.create;xo.create;const fd=_n.create;iy.create;ay.create;Yl.create;Kc.create;ly.create;Ma.create;Zc.create;const MTe={string:(t=>hi.create({...t,coerce:!0})),number:(t=>Vl.create({...t,coerce:!0})),boolean:(t=>oy.create({...t,coerce:!0})),bigint:(t=>Kl.create({...t,coerce:!0})),date:(t=>Vc.create({...t,coerce:!0}))},kwe=xy().apiUrl;Ze.setConfig({baseUrl:kwe,fetch:Z6});Ze.interceptors.error.use((t,e)=>{if(t instanceof Wx||!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 Wx(r,e.status,n)});const Cx={Inbox:"inbox",Drafts:"drafts",Sent:"sent",Archive:"archive",Junk:"junk",Trash:"trash",All:"all",Flagged:"flagged"},PTe={inbox:"Inbox",drafts:"Drafts",sent:"Sent",archive:"Archive",junk:"Junk",trash:"Trash",all:"All",flagged:"Flagged"},d5=["inbox","flagged","drafts","sent","archive","all","junk","trash"];function Dwe(t){const e=new Map,n=[...t].sort((r,s)=>d5.indexOf(Cx[r.role])-d5.indexOf(Cx[s.role]));for(const r of n){if(!r.mailboxId||e.has(r.mailboxId))continue;const s=Cx[r.role];s&&e.set(r.mailboxId,s)}return e}const Lwe=t=>{const e=t.split("/");return e[e.length-1]||t};function kTe(t,e,n){const r=t.displayNameOverride?.trim();if(r)return r;const s=Lwe(t.fullPath);return!e||!n?s:n(`sidebar.${e}`,s)}const Uwe=new Set(["sent","drafts","trash"]),DTe=t=>t===void 0||!Uwe.has(t),Fwe=new Map;function LTe(t){const e=new Map;for(const n of t){const r=Dwe(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 UTe(t,e){const n=e[0];if(!t)return n?{mailboxId:n}:{};for(const s of e){const o=t.get(s);if(o&&_J(o)!==void 0)return{mailboxId:s,folder:o}}if(!n)return{};const r=t.get(n);return{mailboxId:n,...r?{folder:r}:{}}}const zwe=A.createContext(null),FTe=()=>A.useContext(zwe)??{accounts:[],mailboxNameIndex:new Map,accountNameIndex:new Map,resultFolderIndex:Fwe,searchQuery:"",searchInput:"",searchViewKey:"",onSearchChange:()=>{},onSearchClear:()=>{},onSearchClearQuery:()=>{},intelligenceOpen:!1,onToggleIntelligence:()=>{},onSetIntelligenceOpen:()=>{}},jwe=()=>Wn(()=>import("./mail-D1O4mYW0.js").then(t=>t.m),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11])),Bwe=fd({q:wr().optional()}),Hwe=fr("/mail")({loader:({context:{queryClient:t}})=>{t.prefetchQuery(MCe()),t.prefetchQuery({...BCe(),staleTime:6e4})},component:or(jwe,"component"),validateSearch:Bwe}),$we=()=>Wn(()=>import("./onboarding-QCjk--SX.js"),__vite__mapDeps([12,13,3,9,5,4])),qwe=fr("/onboarding")({component:or($we,"component")}),Wwe=()=>Wn(()=>import("./settings-CjOuLA5f.js"),[]),zTe=[{id:"accounts",label:"Accounts",icon:D.jsx(r8,{className:"size-4"})},{id:"senders",label:"Senders & Rules",icon:D.jsx(cX,{className:"size-4"})},{id:"folders",label:"Folder roles",icon:D.jsx(nX,{className:"size-4"})},{id:"filters",label:"Filters",icon:D.jsx(tX,{className:"size-4"})},{id:"appearance",label:"Appearance",icon:D.jsx(oX,{className:"size-4"})},{id:"advanced",label:"Advanced",icon:D.jsx(dX,{className:"size-4"})}],jTe={accounts:"/settings/accounts",senders:"/settings/senders",folders:"/settings/folders",filters:"/settings/filters",appearance:"/settings/appearance",advanced:"/settings/advanced"},Gwe=fr("/settings")({component:or(Wwe,"component")}),Vwe=()=>Wn(()=>import("./index-BG8WJKRS.js"),__vite__mapDeps([14,7])),Kwe=()=>Wn(()=>import("./index-DtqBFgK5.js"),[]),Ywe=fd({selectedMessageId:wr().optional(),selectedThreadId:wr().optional(),selectedMailboxId:wr().optional(),q:wr().optional()}),Zwe=fr("/mail/")({component:or(Kwe,"component"),validateSearch:Ywe,errorComponent:or(Vwe,"errorComponent")}),Xwe=()=>Wn(()=>import("./_mailboxId-DtqBFgK5.js"),[]),Qwe=fd({selectedMessageId:wr().optional(),selectedThreadId:wr().optional(),q:wr().optional()}),Jwe=fr("/mail/$mailboxId")({component:or(Xwe,"component"),validateSearch:Qwe}),exe=()=>Wn(()=>import("./flagged-B3afGsVL.js"),__vite__mapDeps([15,7])),txe=()=>Wn(()=>import("./flagged-DtqBFgK5.js"),[]),nxe=fd({selectedMessageId:wr().optional(),q:wr().optional()}),rxe=fr("/mail/flagged")({component:or(txe,"component"),validateSearch:nxe,errorComponent:or(exe,"errorComponent")}),sxe=()=>Wn(()=>import("./outbox-DtqBFgK5.js"),[]),oxe=fd({selectedOutboxMessageId:wr().optional(),q:wr().optional()}),ixe=fr("/mail/outbox")({component:or(sxe,"component"),validateSearch:oxe}),axe=()=>Wn(()=>import("./index-DwJtZ6Br.js"),[]),lxe=fr("/settings/")({component:or(axe,"component")}),uxe=()=>Wn(()=>import("./accounts-CZFLdajy.js"),__vite__mapDeps([16,6,4,5,17,2,13,3,9,7,8])),cxe=fd({editAccountId:wr().optional(),focusSmtp:Pwe().optional(),connected:wr().optional(),oauthError:wr().optional()}),dxe=fr("/settings/accounts")({component:or(uxe,"component"),validateSearch:cxe}),fxe=()=>Wn(()=>import("./advanced-CrdHYc8g.js"),__vite__mapDeps([18,17,2])),hxe=fr("/settings/advanced")({component:or(fxe,"component")}),pxe=()=>Wn(()=>import("./appearance-Cb0sXKKJ.js"),__vite__mapDeps([19,17,2])),gxe=fr("/settings/appearance")({component:or(pxe,"component")}),mxe=()=>Wn(()=>import("./filters-BfO0lQQX.js"),__vite__mapDeps([20,17,2,10,5,7])),vxe=fr("/settings/filters")({component:or(mxe,"component")}),yxe=()=>Wn(()=>import("./folders-DLrUtuRF.js"),__vite__mapDeps([21,9,11,17,2,5,7])),bxe=fr("/settings/folders")({component:or(yxe,"component")}),Sxe=()=>Wn(()=>import("./senders-DmBtkHiJ.js"),__vite__mapDeps([22,3,17,2,5,7,1,8])),Exe=fr("/settings/senders")({component:or(Sxe,"component")}),Cxe=()=>Wn(()=>import("./suggested-vips-B11yjgyY.js"),[]),wxe=fr("/settings/suggested-vips")({component:or(Cxe,"component")}),xxe=iwe.update({id:"/",path:"/",getParentRoute:()=>hp}),pp=Hwe.update({id:"/mail",path:"/mail",getParentRoute:()=>hp}),_xe=qwe.update({id:"/onboarding",path:"/onboarding",getParentRoute:()=>hp}),Ni=Gwe.update({id:"/settings",path:"/settings",getParentRoute:()=>hp}),Axe=Zwe.update({id:"/",path:"/",getParentRoute:()=>pp}),Txe=Jwe.update({id:"/$mailboxId",path:"/$mailboxId",getParentRoute:()=>pp}),Rxe=rxe.update({id:"/flagged",path:"/flagged",getParentRoute:()=>pp}),Ixe=ixe.update({id:"/outbox",path:"/outbox",getParentRoute:()=>pp}),Oxe=lxe.update({id:"/",path:"/",getParentRoute:()=>Ni}),Nxe=dxe.update({id:"/accounts",path:"/accounts",getParentRoute:()=>Ni}),Mxe=hxe.update({id:"/advanced",path:"/advanced",getParentRoute:()=>Ni}),Pxe=gxe.update({id:"/appearance",path:"/appearance",getParentRoute:()=>Ni}),kxe=vxe.update({id:"/filters",path:"/filters",getParentRoute:()=>Ni}),Dxe=bxe.update({id:"/folders",path:"/folders",getParentRoute:()=>Ni}),Lxe=Exe.update({id:"/senders",path:"/senders",getParentRoute:()=>Ni}),Uxe=wxe.update({id:"/suggested-vips",path:"/suggested-vips",getParentRoute:()=>Ni}),Fxe={MailMailboxIdRoute:Txe,MailFlaggedRoute:Rxe,MailOutboxRoute:Ixe,MailIndexRoute:Axe},zxe=pp._addFileChildren(Fxe),jxe={SettingsAccountsRoute:Nxe,SettingsAdvancedRoute:Mxe,SettingsAppearanceRoute:Pxe,SettingsFiltersRoute:kxe,SettingsFoldersRoute:Dxe,SettingsSendersRoute:Lxe,SettingsSuggestedVipsRoute:Uxe,SettingsIndexRoute:Oxe},Bxe=Ni._addFileChildren(jxe),Hxe={IndexRoute:xxe,MailRoute:zxe,OnboardingRoute:_xe,SettingsRoute:Bxe},$xe=hp._addFileChildren(Hxe)._addFileTypes(),qxe=(t,e)=>{const n=wpe({routeTree:$xe,context:{queryClient:t},defaultPreload:"intent"});return n.subscribe("onResolved",r=>{e.recordPageView(r.toLocation.pathname)}),n},qe=t=>typeof t=="string",Uf=()=>{let t,e;const n=new Promise((r,s)=>{t=r,e=s});return n.resolve=t,n.reject=e,n},f5=t=>t==null?"":""+t,Wxe=(t,e,n)=>{t.forEach(r=>{e[r]&&(n[r]=e[r])})},Gxe=/###/g,h5=t=>t&&t.indexOf("###")>-1?t.replace(Gxe,"."):t,p5=t=>!t||qe(t),fh=(t,e,n)=>{const r=qe(e)?e.split("."):e;let s=0;for(;s<r.length-1;){if(p5(t))return{};const o=h5(r[s]);!t[o]&&n&&(t[o]=new n),Object.prototype.hasOwnProperty.call(t,o)?t=t[o]:t={},++s}return p5(t)?{}:{obj:t,k:h5(r[s])}},g5=(t,e,n)=>{const{obj:r,k:s}=fh(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=fh(t,a,Object);for(;u.obj===void 0&&a.length;)o=`${a[a.length-1]}.${o}`,a=a.slice(0,a.length-1),u=fh(t,a,Object),u?.obj&&typeof u.obj[`${u.k}.${o}`]<"u"&&(u.obj=void 0);u.obj[`${u.k}.${o}`]=n},Vxe=(t,e,n,r)=>{const{obj:s,k:o}=fh(t,e,Object);s[o]=s[o]||[],s[o].push(n)},uy=(t,e)=>{const{obj:n,k:r}=fh(t,e);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},Kxe=(t,e,n)=>{const r=uy(t,n);return r!==void 0?r:uy(e,n)},EB=(t,e,n)=>{for(const r in e)r!=="__proto__"&&r!=="constructor"&&(r in t?qe(t[r])||t[r]instanceof String||qe(e[r])||e[r]instanceof String?n&&(t[r]=e[r]):EB(t[r],e[r],n):t[r]=e[r]);return t},oc=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Yxe={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const Zxe=t=>qe(t)?t.replace(/[&<>"'\/]/g,e=>Yxe[e]):t;class Xxe{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 Qxe=[" ",",","?","!",";"],Jxe=new Xxe(20),e_e=(t,e,n)=>{e=e||"",n=n||"";const r=Qxe.filter(a=>e.indexOf(a)<0&&n.indexOf(a)<0);if(r.length===0)return!0;const s=Jxe.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},CA=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},cy=t=>t?.replace("_","-"),t_e={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 dy{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||t_e,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:(qe(e[0])&&(e[0]=`${r}${this.prefix} ${e[0]}`),this.logger[n](e))}create(e){return new dy(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new dy(this.logger,e)}}var wo=new dy;class Rb{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 m5 extends Rb{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):qe(r)&&o?u.push(...r.split(o)):u.push(r)));const c=uy(this.data,u);return!c&&!n&&!r&&e.indexOf(".")>-1&&(e=u[0],n=u[1],r=u.slice(2).join(".")),c||!a||!qe(r)?c:CA(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),g5(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)(qe(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=uy(this.data,u)||{};a.skipCopy||(r=JSON.parse(JSON.stringify(r))),s?EB(c,r,o):c={...c,...r},g5(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 CB={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 v5={},y5=t=>!qe(t)&&typeof t!="boolean"&&typeof t!="number";class fy extends Rb{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Wxe(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=wo.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&&!e_e(e,r,s);if(a&&!u){const c=e.match(this.interpolator.nestingRegexp);if(c&&c.length>0)return{key:e,namespaces:qe(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:qe(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,p=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(f?.toLowerCase()==="cimode"){if(p){const F=n.nsSeparator||this.options.nsSeparator;return s?{res:`${c}${F}${a}`,usedKey:a,exactUsedKey:a,usedLng:f,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:`${c}${F}${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,_=n.count!==void 0&&!qe(n.count),T=fy.hasDefaultValue(n),R=_?this.pluralResolver.getSuffix(f,n.count,n):"",M=n.ordinal&&_?this.pluralResolver.getSuffix(f,n.count,{ordinal:!1}):"",O=_&&!n.ordinal&&n.count===0,I=O&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${R}`]||n[`defaultValue${M}`]||n.defaultValue;let P=m;w&&!m&&T&&(P=I);const k=y5(P),H=Object.prototype.toString.apply(P);if(w&&P&&k&&E.indexOf(H)<0&&!(qe(C)&&Array.isArray(P))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const F=this.options.returnedObjectHandler?this.options.returnedObjectHandler(y,P,{...n,ns:u}):`key '${a} (${this.language})' returned an object instead of string.`;return s?(g.res=F,g.usedParams=this.getUsedParamsDetails(n),g):F}if(o){const F=Array.isArray(P),j=F?[]:{},W=F?S:y;for(const Y in P)if(Object.prototype.hasOwnProperty.call(P,Y)){const ne=`${W}${o}${Y}`;T&&!m?j[Y]=this.translate(ne,{...n,defaultValue:y5(I)?I[Y]:void 0,joinArrays:!1,ns:u}):j[Y]=this.translate(ne,{...n,joinArrays:!1,ns:u}),j[Y]===ne&&(j[Y]=P[Y])}m=j}}else if(w&&qe(C)&&Array.isArray(m))m=m.join(C),m&&(m=this.extendTranslation(m,e,n,r));else{let F=!1,j=!1;!this.isValidLookup(m)&&T&&(F=!0,m=I),this.isValidLookup(m)||(j=!0,m=a);const Y=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&j?void 0:m,ne=T&&I!==m&&this.options.updateMissing;if(j||F||ne){if(this.logger.log(ne?"updateKey":"missingKey",f,c,a,ne?I: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 $=[];const ee=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&ee&&ee[0])for(let de=0;de<ee.length;de++)$.push(ee[de]);else this.options.saveMissingTo==="all"?$=this.languageUtils.toResolveHierarchy(n.lng||this.language):$.push(n.lng||this.language);const fe=(de,Ae,L)=>{const V=T&&L!==m?L:Y;this.options.missingKeyHandler?this.options.missingKeyHandler(de,c,Ae,V,ne,n):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(de,c,Ae,V,ne,n),this.emit("missingKey",de,c,Ae,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&_?$.forEach(de=>{const Ae=this.pluralResolver.getSuffixes(de,n);O&&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}`]||I)})}):fe($,a,I))}m=this.extendTranslation(m,e,n,g,r),j&&m===a&&this.options.appendNamespaceToMissingKey&&(m=`${c}:${a}`),(j||F)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}:${a}`:a,F?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=qe(e)&&(r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let p;if(f){const m=e.match(this.interpolator.nestingRegexp);p=m&&m.length}let g=r.replace&&!qe(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;p<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=qe(u)?[u]:u;return e!=null&&c?.length&&r.applyPostProcessor!==!1&&(e=CB.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 qe(e)&&(e=[e]),e.forEach(c=>{if(this.isValidLookup(r))return;const f=this.extractFromKey(c,n),p=f.key;s=p;let g=f.namespaces;this.options.fallbackNS&&(g=g.concat(this.options.fallbackNS));const m=n.count!==void 0&&!qe(n.count),y=m&&!n.ordinal&&n.count===0,S=n.context!==void 0&&(qe(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,!v5[`${E[0]}-${C}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(u)&&(v5[`${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 _=[p];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(_,p,w,C,n);else{let R;m&&(R=this.pluralResolver.getSuffix(w,n.count,n));const M=`${this.options.pluralSeparator}zero`,O=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(m&&(_.push(p+R),n.ordinal&&R.indexOf(O)===0&&_.push(p+R.replace(O,this.options.pluralSeparator)),y&&_.push(p+M)),S){const I=`${p}${this.options.contextSeparator}${n.context}`;_.push(I),m&&(_.push(I+R),n.ordinal&&R.indexOf(O)===0&&_.push(I+R.replace(O,this.options.pluralSeparator)),y&&_.push(I+M))}}let T;for(;T=_.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&&!qe(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 b5{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=wo.create("languageUtils")}getScriptPartFromCode(e){if(e=cy(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=cy(e),!e||e.indexOf("-")<0)return e;const n=e.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(e){if(qe(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)),qe(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 qe(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))):qe(e)&&o(this.formatLanguageCode(e)),r.forEach(a=>{s.indexOf(a)<0&&o(this.formatLanguageCode(a))}),s}}const S5={zero:0,one:1,two:2,few:3,many:4,other:5},E5={select:t=>t===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class n_e{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=n,this.logger=wo.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=cy(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!"),E5;if(!e.match(/-|_/))return E5;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)=>S5[s]-S5[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 C5=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=Kxe(t,e,n);return!o&&s&&qe(n)&&(o=CA(t,n,r),o===void 0&&(o=CA(e,n,r))),o},wx=t=>t.replace(/\$/g,"$$$$");class r_e{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=wo.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:p,unescapePrefix:g,nestingPrefix:m,nestingPrefixEscaped:y,nestingSuffix:S,nestingSuffixEscaped:E,nestingOptionsSeparator:C,maxReplaces:w,alwaysFormat:_}=e.interpolation;this.escape=n!==void 0?n:Zxe,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=o?oc(o):a||"{{",this.suffix=u?oc(u):c||"}}",this.formatSeparator=f||",",this.unescapePrefix=p?"":g||"-",this.unescapeSuffix=this.unescapePrefix?"":p||"",this.nestingPrefix=m?oc(m):y||oc("$t("),this.nestingSuffix=S?oc(S):E||oc(")"),this.nestingOptionsSeparator=C||",",this.maxReplaces=w||1e3,this.alwaysFormat=_!==void 0?_:!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=C5(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(C5(n,c,E,this.options.keySeparator,this.options.ignoreJSONStructure),C,r,{...s,...n,interpolationkey:E})};this.resetRegExp();const p=s?.missingInterpolationHandler||this.options.missingInterpolationHandler,g=s?.interpolation?.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:y=>wx(y)},{regex:this.regexp,safeValue:y=>this.escapeValue?wx(this.escape(y)):wx(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 p=="function"){const C=p(e,o,s);a=qe(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!qe(a)&&!this.useRawValueToEscape&&(a=f5(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 p=this.nestingOptionsSeparator;if(c.indexOf(p)<0)return c;const g=c.split(new RegExp(`${p}[ ]*{`));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}${p}${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&&!qe(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 p=s[1].split(this.formatSeparator).map(g=>g.trim());s[1]=p.shift(),c=p,f=!0}if(o=n(u.call(this,s[1].trim(),a),a),o&&s[0]===e&&!qe(o))return o;qe(o)||(o=f5(o)),o||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`),o=""),f&&(o=c.reduce((p,g)=>this.format(p,g,r.lng,{...r,interpolationkey:s[1].trim()}),o.trim())),e=e.replace(s[0],o),this.regexp.lastIndex=0}return e}}const s_e=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,""),p=u.trim();n[p]||(n[p]=f),f==="false"&&(n[p]=!1),f==="true"&&(n[p]=!0),isNaN(f)||(n[p]=parseInt(f,10))}})}return{formatName:e,formatOptions:n}},ic=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(cy(r),s),e[a]=u),u(n)}};class o_e{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=wo.create("formatter"),this.options=e,this.formats={number:ic((n,r)=>{const s=new Intl.NumberFormat(n,{...r});return o=>s.format(o)}),currency:ic((n,r)=>{const s=new Intl.NumberFormat(n,{...r,style:"currency"});return o=>s.format(o)}),datetime:ic((n,r)=>{const s=new Intl.DateTimeFormat(n,{...r});return o=>s.format(o)}),relativetime:ic((n,r)=>{const s=new Intl.RelativeTimeFormat(n,{...r});return o=>s.format(o,r.range||"day")}),list:ic((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()]=ic(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:p}=s_e(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,{...p,...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 i_e=(t,e)=>{t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)};class a_e extends Rb{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=wo.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 p=!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,p=!1,a[m]===void 0&&(a[m]=!0),o[m]===void 0&&(o[m]=!0),c[g]===void 0&&(c[g]=!0)))}),p||(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=>{Vxe(c.loaded,[o],a),i_e(c,e),n&&c.errors.push(n),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(f=>{u[f]||(u[f]={});const p=c.loaded[f];p.length&&p.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,p)=>{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&&p&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,e,n,r,s+1,o*2,a)},o);return}a(f,p)},c=this.backend[r].bind(this.backend);if(c.length===2){try{const f=c(e,n);f&&typeof f.then=="function"?f.then(p=>u(null,p)).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();qe(e)&&(e=this.languageUtils.toResolveHierarchy(e)),qe(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 p;f.length===5?p=f(e,n,r,s,c):p=f(e,n,r,s),p&&typeof p.then=="function"?p.then(g=>u(null,g)).catch(u):u(null,p)}catch(p){u(p)}else f(e,n,r,s,u,c)}!e||!e[0]||this.store.addResource(e[0],n,r,s)}}}const w5=()=>({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]),qe(t[1])&&(e.defaultValue=t[1]),qe(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}}),x5=t=>(qe(t.ns)&&(t.ns=[t.ns]),qe(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),qe(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),Lm=()=>{},l_e=t=>{Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(n=>{typeof t[n]=="function"&&(t[n]=t[n].bind(t))})};class qh extends Rb{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=x5(e),this.services={},this.logger=wo,this.modules={external:[]},l_e(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&&(qe(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const s=w5();this.options={...s,...this.options,...x5(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=p=>p?typeof p=="function"?new p:p:null;if(!this.options.isClone){this.modules.logger?wo.init(o(this.modules.logger),this.options):wo.init(null,this.options);let p;this.modules.formatter?p=this.modules.formatter:p=o_e;const g=new b5(this.options);this.store=new m5(this.options.resources,this.options);const m=this.services;m.logger=wo,m.resourceStore=this.store,m.languageUtils=g,m.pluralResolver=new n_e(g,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),p&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(m.formatter=o(p),m.formatter.init(m,this.options),this.options.interpolation.format=m.formatter.format.bind(m.formatter)),m.interpolator=new r_e(this.options),m.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},m.backendConnector=new a_e(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 fy(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=Lm),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const p=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);p.length>0&&p[0]!=="dev"&&(this.options.lng=p[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(p=>{this[p]=function(){return e.store[p](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(p=>{this[p]=function(){return e.store[p](...arguments),e}});const c=Uf(),f=()=>{const p=(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 p(null,this.t.bind(this));this.changeLanguage(this.options.lng,p)};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]:Lm;const s=qe(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=Uf();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=Lm),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"&&CB.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=Uf();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=qe(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,p=>{a(p,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,p=new Array(f>2?f-2:0),g=2;g<f;g++)p[g-2]=arguments[g];c=s.options.overloadTranslationOptionHandler([a,u].concat(p))}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 qe(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=Uf();return this.options.ns?(qe(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=Uf();qe(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 b5(w5());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]:Lm;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((p,g)=>(p[g]={...c[f][g]},p),{})),{});o.store=new m5(u,s),o.services.resourceStore=o.store}return o.translator=new fy(o.services,s),o.translator.on("*",function(u){for(var c=arguments.length,f=new Array(c>1?c-1:0),p=1;p<c;p++)f[p-1]=arguments[p];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:u_e,forEach:c_e}=[];function d_e(t){return c_e.call(u_e.call(arguments,1),e=>{if(e)for(const n in e)t[n]===void 0&&(t[n]=e[n])}),t}function f_e(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 _5=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,h_e=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(!_5.test(r.domain))throw new TypeError("option domain is invalid");o+=`; Domain=${r.domain}`}if(r.path){if(!_5.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},A5={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=h_e(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 p_e={name:"cookie",lookup(t){let{lookupCookie:e}=t;if(e&&typeof document<"u")return A5.read(e)||void 0},cacheUserLanguage(t,e){let{lookupCookie:n,cookieMinutes:r,cookieDomain:s,cookieOptions:o}=e;n&&typeof document<"u"&&A5.create(n,t,r,s,o)}},g_e={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}},m_e={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 ac=null;const T5=()=>{if(ac!==null)return ac;try{if(ac=typeof window<"u"&&window.localStorage!==null,!ac)return!1;const t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch{ac=!1}return ac};var v_e={name:"localStorage",lookup(t){let{lookupLocalStorage:e}=t;if(e&&T5())return window.localStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupLocalStorage:n}=e;n&&T5()&&window.localStorage.setItem(n,t)}};let lc=null;const R5=()=>{if(lc!==null)return lc;try{if(lc=typeof window<"u"&&window.sessionStorage!==null,!lc)return!1;const t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch{lc=!1}return lc};var y_e={name:"sessionStorage",lookup(t){let{lookupSessionStorage:e}=t;if(e&&R5())return window.sessionStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupSessionStorage:n}=e;n&&R5()&&window.sessionStorage.setItem(n,t)}},b_e={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}},S_e={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}},E_e={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}},C_e={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 wB=!1;try{document.cookie,wB=!0}catch{}const xB=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];wB||xB.splice(1,1);const w_e=()=>({order:xB,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:t=>t});class _B{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=d_e(n,this.options||{},w_e()),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(p_e),this.addDetector(g_e),this.addDetector(v_e),this.addDetector(y_e),this.addDetector(b_e),this.addDetector(S_e),this.addDetector(E_e),this.addDetector(C_e),this.addDetector(m_e)}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&&!f_e(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)}))}}_B.type="languageDetector";function x_e(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=__e(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 __e(t,e){if(t){if(typeof t=="string")return I5(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)?I5(t,e):void 0}}function I5(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 wA(t){"@babel/helpers - typeof";return wA=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},wA(t)}var AB=["__proto__","constructor","prototype"];function TB(t){return!(typeof t!="string"||t.length===0||t.length>128||AB.indexOf(t)>-1||t.indexOf("..")>-1||t.indexOf("\\")>-1||/[?#%\s@]/.test(t)||/[\x00-\x1F\x7F]/.test(t))}function RB(t){return!(!TB(t)||t.indexOf("/")>-1)}function A_e(t){return TB(t)}var T_e={lng:RB,ns:A_e};function Um(t){return typeof t!="string"?t:t.replace(/[\r\n\x00-\x1F\x7F]/g," ")}function R_e(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 IB(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":wA(XMLHttpRequest))==="object"}function I_e(t){return!!t&&typeof t.then=="function"}function O_e(t){return I_e(t)?t:Promise.resolve(t)}var N_e=/\{\{(.+?)\}\}/g;function O5(t,e){var n=!1,r=t.replace(N_e,function(s,o){var a=o.trim();if(AB.indexOf(a)>-1)return s;var u=e[a];if(u==null)return s;var c=T_e[a]||RB,f=String(u).split("+"),p=x_e(f),g;try{for(p.s();!(g=p.n()).done;){var m=g.value;if(!c(m))return n=!0,s}}catch(y){p.e(y)}finally{p.f()}return f.join("+")});return n?null:r}function N5(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 M5(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?N5(Object(n),!0).forEach(function(r){M_e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):N5(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function M_e(t,e,n){return(e=P_e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function P_e(t){var e=k_e(t,"string");return Zl(e)=="symbol"?e:e+""}function k_e(t,e){if(Zl(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Zl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Zl(t){"@babel/helpers - typeof";return Zl=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},Zl(t)}var $a=typeof fetch=="function"?fetch:void 0;typeof global<"u"&&global.fetch?$a=global.fetch:typeof window<"u"&&window.fetch&&($a=window.fetch);var Wh;IB()&&(typeof global<"u"&&global.XMLHttpRequest?Wh=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&(Wh=window.XMLHttpRequest));var hy;typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?hy=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(hy=window.ActiveXObject));typeof $a!="function"&&($a=void 0);if(!$a&&!Wh&&!hy)try{Wn(()=>import("./browser-ponyfill-hpLxJkxi.js").then(t=>t.b),[]).then(function(t){$a=t.default}).catch(function(){})}catch{}var OB=["__proto__","constructor","prototype"],xA=function(e,n){if(n&&Zl(n)==="object"){for(var r="",s=0,o=Object.keys(n);s<o.length;s++){var a=o[s];OB.indexOf(a)>-1||(r+="&"+encodeURIComponent(a)+"="+encodeURIComponent(n[a]))}if(!r)return e;e=e+(e.indexOf("?")!==-1?"&":"?")+r.slice(1)}return e},P5=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):$a(e,n).then(o).catch(r)},D_e=function(e,n,r,s){e.queryStringParams&&(n=xA(n,e.queryStringParams));var o=M5({},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=M5({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{P5(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(p){delete u[p]}),P5(n,u,s,c),e._omitFetchOptions=!0}catch(p){s(p)}}},L_e=function(e,n,r,s){r&&Zl(r)==="object"&&(r=xA("",r).slice(1)),e.queryStringParams&&(n=xA(n,e.queryStringParams));try{var o=Wh?new Wh:new hy("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];OB.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(p){console&&console.log(p)}},U_e=function(e,n,r,s){if(typeof r=="function"&&(s=r,r=void 0),s=s||function(){},$a&&n.indexOf("file:")!==0)return D_e(e,n,r,s);if(IB()||typeof ActiveXObject=="function")return L_e(e,n,r,s);s(new Error("No fetch and no xhr implementation found!"))};function Xc(t){"@babel/helpers - typeof";return Xc=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},Xc(t)}function k5(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 xx(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?k5(Object(n),!0).forEach(function(r){NB(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):k5(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function F_e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function z_e(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,MB(r.key),r)}}function j_e(t,e,n){return e&&z_e(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function NB(t,e,n){return(e=MB(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function MB(t){var e=B_e(t,"string");return Xc(e)=="symbol"?e:e+""}function B_e(t,e){if(Xc(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Xc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var H_e=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 NB({},r,s||"")},parseLoadPayload:function(n,r){},request:U_e,reloadInterval:typeof window<"u"?!1:3600*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},PB=(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]:{};F_e(this,t),this.services=e,this.options=n,this.allOptions=r,this.type="backend",this.init(e,n,r)}return j_e(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=xx(xx(xx({},H_e()),this.options||{}),s),this.allOptions=o,this.services&&this.options.reloadInterval){var a=setInterval(function(){return r.reload()},this.options.reloadInterval);Xc(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=O_e(c),c.then(function(f){if(!f)return a(null,{});var p=O5(f,{lng:n.join("+"),ns:s.join("+")});if(p==null){var g=n.map(Um).join(", "),m=s.map(Um).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(p,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),p=Um(R_e(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 "+p+"; status code: "+m.status,!0);if(m&&m.status>=400&&m.status<500)return r("failed loading "+p+"; 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 "+p+": "+Um(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 "+p+" 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,p=[],g=[];n.forEach(function(m){var y=u.options.addPath;typeof u.options.addPath=="function"&&(y=u.options.addPath(m,r));var S=O5(y,{lng:m,ns:r});if(S==null){f+=1,a&&f===n.length&&a(p,g);return}u.options.request(u.options,S,c,function(E,C){f+=1,p.push(E),g.push(C),f===n.length&&typeof a=="function"&&a(p,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(p){return f(p)}),c.forEach(function(p){n.allOptions.ns.forEach(function(g){s.read(p,g,"read",null,null,function(m,y){m&&a.warn("loading namespace ".concat(g," for language ").concat(p," failed"),m),!m&&y&&a.log("loaded namespace ".concat(g," for language ").concat(p),y),s.loaded("".concat(p,"|").concat(g),m,y)})})})}}}])})();PB.type="backend";pr.use(PB).use(_B).use(LEe).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 $_e=({authProvider:t,rootElementId:e="root"})=>{JJ(),xEe(),t.configure(),Ype(t);const n=CEe();$J(n);const r=new Sfe({queryCache:new qF({onError:Jpe}),mutationCache:new $F({onError:ege}),defaultOptions:{queries:{staleTime:3e4,gcTime:5*6e4,retry:1}}}),s=qxe(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;Npe.createRoot(o).render(D.jsx(A.StrictMode,{children:D.jsx(cB.Provider,{value:n,children:D.jsxs(Efe,{client:r,children:[D.jsx(Qpe,{value:t,children:D.jsx(a,{children:D.jsx(Ape,{router:s})})}),!1]})})}))};$_e({authProvider:Xde});export{Nfe as $,QZ as A,Km as B,KM as C,YX as D,sAe as E,eX as F,op as G,tr as H,rX as I,u_ as J,DF as K,GF as L,sX as M,Cfe as N,s8 as O,eAe as P,gfe as Q,z as R,aX as S,lX as T,_fe as U,Ife as V,Afe as W,gh as X,Tfe as Y,Ur as Z,IN as _,qn as a,sTe as a$,DL as a0,Rfe as a1,Mfe as a2,fs as a3,Wr as a4,Yhe as a5,RTe as a6,tR as a7,tTe as a8,Dwe as a9,TCe as aA,mTe as aB,HCe as aC,jCe as aD,bTe as aE,vTe as aF,gTe as aG,uTe as aH,d5 as aI,Lwe as aJ,b7 as aK,STe as aL,yTe as aM,OTe as aN,TTe as aO,ATe as aP,UTe as aQ,K_e as aR,BCe as aS,Ny as aT,OCe as aU,zl as aV,E7 as aW,xCe as aX,pB as aY,aCe as aZ,dCe as a_,Sx as aa,lAe as ab,xP as ac,ree as ad,y7 as ae,BEe as af,kTe as ag,FTe as ah,$Ae as ai,Pfe as aj,DCe as ak,Z6 as al,CTe as am,xTe as an,ETe as ao,lTe as ap,MCe as aq,NTe as ar,FCe as as,mB as at,_Te as au,ITe as av,wTe as aw,Wn as ax,cTe as ay,PCe as az,dn as b,zy as b$,rTe as b0,oTe as b1,iTe as b2,dTe as b3,rAe as b4,WAe as b5,DTe as b6,LTe as b7,qa as b8,nCe as b9,W4 as bA,qAe as bB,XAe as bC,ACe as bD,JAe as bE,QAe as bF,EJ as bG,Q_e as bH,SJ as bI,eTe as bJ,nTe as bK,Cx as bL,PTe as bM,pTe as bN,kCe as bO,wh as bP,bfe as bQ,UF as bR,Og as bS,d9 as bT,No as bU,bT as bV,Ai as bW,Ioe as bX,Ti as bY,Eoe as bZ,c9 as b_,G8 as ba,xy as bb,zwe as bc,Y_e as bd,KA as be,x7 as bf,NCe as bg,iAe as bh,KAe as bi,GAe as bj,ZAe as bk,fd as bl,Pwe as bm,wr as bn,MTe as bo,fTe as bp,hTe as bq,dxe as br,VAe as bs,YAe as bt,zTe as bu,jTe as bv,aTe as bw,UJ as bx,tAe as by,LJ as bz,J6 as c,G9 as c0,Wre as c1,Poe as c2,Hoe as c3,Vre as c4,jre as c5,Dy as c6,nT as c7,s9 as c8,zoe as c9,Vy as cA,tp as cB,joe as cC,Jh as cD,Boe as cE,koe as cF,Doe as ca,Qre as cb,Ooe as cc,AT as cd,a9 as ce,Kre as cf,woe as cg,xoe as ch,mte as ci,nu as cj,ate as ck,ite as cl,tT as cm,Z9 as cn,Coe as co,cte as cp,Xre as cq,Toe as cr,rT as cs,_oe as ct,Woe as cu,tF as cv,V_e as cw,Qh as cx,nAe as cy,CT as cz,oP as d,JZ as e,KX as f,Hx as g,Z_e as h,r8 as i,D as j,OQ as k,iX as l,TJ as m,_J as n,J_e as o,X_e as p,MQ as q,A as r,eS as s,uX as t,kQ as u,K6 as v,t8 as w,q_e as x,W_e as y,oAe as z};
294
+ or you can use record.mirror to access the mirror instance during recording.`;let OU={map:{},getId(){return console.error(pc),-1},getNode(){return console.error(pc),null},removeNodeFromMap(){console.error(pc)},has(){return console.error(pc),!1},reset(){console.error(pc)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(OU=new Proxy(OU,{get(t,e,n){return e==="map"&&console.error(pc),Reflect.get(t,e,n)}}));function Hh(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 Tb(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)}}),()=>Tb(t,e,o||{},!0)}let ty=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(ty=()=>new Date().getTime());function Bj(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 Hj(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function $j(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function qj(t){return t?t.nodeType===t.ELEMENT_NODE?t:rt.parentElement(t):null}function Cr(t,e,n,r){if(!t)return!1;const s=qj(t);if(!s)return!1;try{if(typeof e=="string"){if(s.classList.contains(e)||r&&s.closest("."+e)!==null)return!0}else if(Gv(s,e,r))return!0}catch{}return!!(n&&(s.matches(n)||r&&s.closest(n)!==null))}function ASe(t,e){return e.getId(t)!==-1}function yx(t,e,n){return t.tagName==="TITLE"&&n.headTitleMutations?!0:e.getId(t)===Ph}function Wj(t,e){if(uh(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?Wj(r,e):!0}function aA(t){return!!t.changedTouches}function TSe(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 Gj(t,e){return!!(t.nodeName==="IFRAME"&&e.getMeta(t))}function Vj(t,e){return!!(t.nodeName==="LINK"&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&t.getAttribute("rel")==="stylesheet"&&e.getMeta(t))}function lA(t){return t?t instanceof HR&&"shadowRoot"in t?!!t.shadowRoot:!!rt.shadowRoot(t):!1}class RSe{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 Kj(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 ISe(t){let e=t,n;for(;n=Kj(e);)e=n;return e}function OSe(t){const e=rt.ownerDocument(t);if(!e)return!1;const n=ISe(t);return rt.contains(e,n)}function Yj(t){const e=rt.ownerDocument(t);return e?rt.contains(e,t)||OSe(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||{}),Lr=(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))(Lr||{}),si=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(si||{}),Wc=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(Wc||{}),gc=(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))(gc||{}),Zj=(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))(Zj||{});function NU(t){return"__ln"in t}class NSe{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&&NU(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&&NU(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 MU=(t,e)=>`${t}@${e}`;class MSe{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 NSe,s=c=>{let f=c,p=Ph;for(;p===Ph;)f=f&&f.nextSibling,p=f&&this.mirror.getId(f);return p},o=c=>{const f=rt.parentNode(c);if(!f||!Yj(c))return;let p=!1;if(c.nodeType===Node.TEXT_NODE){const S=f.tagName;if(S==="TEXTAREA")return;S==="STYLE"&&this.addedSet.has(f)&&(p=!0)}const g=uh(f)?this.mirror.getId(Kj(c)):this.mirror.getId(f),m=s(c);if(g===-1||m===-1)return r.addNode(c);const y=xc(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=>{Gj(S,this.mirror)&&this.iframeManager.addIframe(S),Vj(S,this.mirror)&&this.stylesheetManager.trackLinkElement(S),lA(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:p});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)PU(this.removesSubTreeCache,c,this.mirror)&&!this.movedSet.has(rt.parentNode(c))||o(c);for(const c of this.addedSet)!kU(this.droppedSet,c)&&!PU(this.removesSubTreeCache,c,this.mirror)||kU(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)),p=s(a.value);f!==-1&&p!==-1&&(c=a)}if(!c){let f=r.tail;for(;f;){const p=f;if(f=f.previous,p){const g=this.mirror.getId(rt.parentNode(p.value));if(s(p.value)===-1)continue;if(g!==-1){c=p;break}else{const y=p.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=p;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,p=rt.parentNode(f);return p&&p.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(p),{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 p=JSON.stringify(c.styleDiff),g=JSON.stringify(c._unchangedStyles);p.length<f.style.length&&(p+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=$v({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:qv(e),value:r,maskInputFn:this.maskInputFn})}),Se(this,"processMutation",e=>{if(!yx(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const n=rt.textContent(e.target);!Cr(e.target,this.blockClass,this.blockSelector,!1)&&n!==e.oldValue&&this.texts.push({value:bz(e.target,this.maskTextClass,this.maskTextSelector,!0)&&n?this.maskTextFn?this.maskTextFn(n,qj(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=qv(n);s=$v({element:n,maskInputOptions:this.maskInputOptions,tagName:n.tagName,type:a,value:s,maskInputFn:this.maskInputFn})}if(Cr(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"),!yz(n.tagName,r))if(o.attributes[r]=vz(this.doc,Gl(n.tagName),Gl(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(Cr(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=uh(e.target)?this.mirror.getId(rt.host(e.target)):this.mirror.getId(e.target);Cr(e.target,this.blockClass,this.blockSelector,!1)||yx(n,this.mirror,this.slimDOMOptions)||!ASe(n,this.mirror)||(this.addedSet.has(n)?(uA(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(e.target)&&r===-1||Wj(e.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[MU(r,s)]?uA(this.movedSet,n):(this.removes.push({parentId:s,id:r,isShadow:uh(e.target)&&ch(e.target)?!0:void 0}),PSe(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(yx(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[MU(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Cr(e,this.blockClass,this.blockSelector,!1)||(rt.childNodes(e).forEach(r=>this.genAdds(r)),lA(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 uA(t,e){t.delete(e),rt.childNodes(e).forEach(n=>uA(t,n))}function PSe(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 PU(t,e,n){return t.size===0?!1:kSe(t,e)}function kSe(t,e,n){const r=rt.parentNode(e);return r?t.has(r):!1}function kU(t,e){return t.size===0?!1:Xj(t,e)}function Xj(t,e){const n=rt.parentNode(e);return n?t.has(n)?!0:Xj(t,n):!1}let dh;function DSe(t){dh=t}function LSe(){dh=void 0}const vt=t=>dh?(...n)=>{try{return t(...n)}catch(r){if(dh&&dh(r)===!0)return;throw r}}:t,Tl=[];function dp(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 Qj(t,e){const n=new MSe;Tl.push(n),n.init(t);const r=new(jj())(vt(n.processMutations.bind(n)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function USe({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=Hh(vt(g=>{const m=Date.now()-u;t(a.map(y=>(y.timeOffset-=m,y)),g),a=[],u=null}),o),f=vt(Hh(vt(g=>{const m=dp(g),{clientX:y,clientY:S}=aA(g)?g.changedTouches[0]:g;u||(u=ty()),a.push({x:y,y:S,id:r.getId(m),timeOffset:ty()-u}),c(typeof DragEvent<"u"&&g instanceof DragEvent?ft.Drag:g instanceof MouseEvent?ft.MouseMove:ft.TouchMove)}),s,{trailing:!1})),p=[Er("mousemove",f,n),Er("touchmove",f,n),Er("drag",f,n)];return vt(()=>{p.forEach(g=>g())})}function FSe({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=p=>g=>{const m=dp(g);if(Cr(m,r,s,!0))return;let y=null,S=p;if("pointerType"in g){switch(g.pointerType){case"mouse":y=si.Mouse;break;case"touch":y=si.Touch;break;case"pen":y=si.Pen;break}y===si.Touch?Lr[p]===Lr.MouseDown?S="TouchStart":Lr[p]===Lr.MouseUp&&(S="TouchEnd"):si.Pen}else aA(g)&&(y=si.Touch);y!==null?(c=y,(S.startsWith("Touch")&&y===si.Touch||S.startsWith("Mouse")&&y===si.Mouse)&&(y=null)):Lr[p]===Lr.Click&&(y=c,c=null);const E=aA(g)?g.changedTouches[0]:g;if(!E)return;const C=n.getId(m),{clientX:w,clientY:_}=E;vt(t)({type:Lr[S],id:C,x:w,y:_,...y!==null&&{pointerType:y}})};return Object.keys(Lr).filter(p=>Number.isNaN(Number(p))&&!p.endsWith("_Departed")&&a[p]!==!1).forEach(p=>{let g=Gl(p);const m=f(p);if(window.PointerEvent)switch(Lr[p]){case Lr.MouseDown:case Lr.MouseUp:g=g.replace("mouse","pointer");break;case Lr.TouchStart:case Lr.TouchEnd:return}u.push(Er(g,m,e))}),vt(()=>{u.forEach(p=>p())})}function Jj({scrollCb:t,doc:e,mirror:n,blockClass:r,blockSelector:s,sampling:o}){const a=vt(Hh(vt(u=>{const c=dp(u);if(!c||Cr(c,r,s,!0))return;const f=n.getId(c);if(c===e&&e.defaultView){const p=Bj(e.defaultView);t({id:f,x:p.left,y:p.top})}else t({id:f,x:c.scrollLeft,y:c.scrollTop})}),o.scroll||100));return Er("scroll",a,e)}function zSe({viewportResizeCb:t},{win:e}){let n=-1,r=-1;const s=vt(Hh(vt(()=>{const o=Hj(),a=$j();(n!==o||r!==a)&&(t({width:Number(a),height:Number(o)}),n=o,r=a)}),200));return Er("resize",s,e)}const jSe=["INPUT","TEXTAREA","SELECT"],DU=new WeakMap;function BSe({inputCb:t,doc:e,mirror:n,blockClass:r,blockSelector:s,ignoreClass:o,ignoreSelector:a,maskInputOptions:u,maskInputFn:c,sampling:f,userTriggeredOnInput:p}){function g(_){let T=dp(_);const R=_.isTrusted,M=T&&T.tagName;if(T&&M==="OPTION"&&(T=rt.parentElement(T)),!T||!M||jSe.indexOf(M)<0||Cr(T,r,s,!0)||T.classList.contains(o)||a&&T.matches(a))return;let O=T.value,I=!1;const P=qv(T)||"";P==="radio"||P==="checkbox"?I=T.checked:(u[M.toLowerCase()]||u[P])&&(O=$v({element:T,maskInputOptions:u,tagName:M,type:P,value:O,maskInputFn:c})),m(T,p?{text:O,isChecked:I,userTriggered:R}:{text:O,isChecked:I});const k=T.name;P==="radio"&&k&&I&&e.querySelectorAll(`input[type="radio"][name="${k}"]`).forEach(H=>{if(H!==T){const F=H.value;m(H,p?{text:F,isChecked:!I,userTriggered:!1}:{text:F,isChecked:!I})}})}function m(_,T){const R=DU.get(_);if(!R||R.text!==T.text||R.isChecked!==T.isChecked){DU.set(_,T);const M=n.getId(_);vt(t)({...T,id:M})}}const S=(f.input==="last"?["change"]:["input","change"]).map(_=>Er(_,vt(g),e)),E=e.defaultView;if(!E)return()=>{S.forEach(_=>_())};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(_=>Tb(_[0],_[1],{set(){vt(g)({target:this,isTrusted:!1})}},!1,E))),vt(()=>{S.forEach(_=>_())})}function ny(t){const e=[];function n(r,s){if(Pm("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Pm("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Pm("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Pm("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 ba(t,e,n){let r,s;return t?(t.ownerNode?r=e.getId(t.ownerNode):s=n.getId(t),{styleId:s,id:r}):{}}function HSe({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((p,g,m)=>{const[y,S]=m,{id:E,styleId:C}=ba(g,e,n.styleMirror);return(E&&E!==-1||C&&C!==-1)&&t({id:E,styleId:C,adds:[{rule:y,index:S}]}),p.apply(g,m)})}),r.CSSStyleSheet.prototype.addRule=function(p,g,m=this.cssRules.length){const y=`${p} { ${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((p,g,m)=>{const[y]=m,{id:S,styleId:E}=ba(g,e,n.styleMirror);return(S&&S!==-1||E&&E!==-1)&&t({id:S,styleId:E,removes:[{index:y}]}),p.apply(g,m)})}),r.CSSStyleSheet.prototype.removeRule=function(p){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[p])};let a;r.CSSStyleSheet.prototype.replace&&(a=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(a,{apply:vt((p,g,m)=>{const[y]=m,{id:S,styleId:E}=ba(g,e,n.styleMirror);return(S&&S!==-1||E&&E!==-1)&&t({id:S,styleId:E,replace:y}),p.apply(g,m)})}));let u;r.CSSStyleSheet.prototype.replaceSync&&(u=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(u,{apply:vt((p,g,m)=>{const[y]=m,{id:S,styleId:E}=ba(g,e,n.styleMirror);return(S&&S!==-1||E&&E!==-1)&&t({id:S,styleId:E,replaceSync:y}),p.apply(g,m)})}));const c={};km("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(km("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),km("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),km("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));const f={};return Object.entries(c).forEach(([p,g])=>{f[p]={insertRule:g.prototype.insertRule,deleteRule:g.prototype.deleteRule},g.prototype.insertRule=new Proxy(f[p].insertRule,{apply:vt((m,y,S)=>{const[E,C]=S,{id:w,styleId:_}=ba(y.parentStyleSheet,e,n.styleMirror);return(w&&w!==-1||_&&_!==-1)&&t({id:w,styleId:_,adds:[{rule:E,index:[...ny(y),C||0]}]}),m.apply(y,S)})}),g.prototype.deleteRule=new Proxy(f[p].deleteRule,{apply:vt((m,y,S)=>{const[E]=S,{id:C,styleId:w}=ba(y.parentStyleSheet,e,n.styleMirror);return(C&&C!==-1||w&&w!==-1)&&t({id:C,styleId:w,removes:[{index:[...ny(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(([p,g])=>{g.prototype.insertRule=f[p].insertRule,g.prototype.deleteRule=f[p].deleteRule})})}function eB({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 p;const g=(p=c.set)==null?void 0:p.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 $Se({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 p;const[g,m,y]=f;if(n.has(g))return o.apply(c,[g,m,y]);const{id:S,styleId:E}=ba((p=c.parentRule)==null?void 0:p.parentStyleSheet,e,r.styleMirror);return(S&&S!==-1||E&&E!==-1)&&t({id:S,styleId:E,set:{property:g,value:m,priority:y},index:ny(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 p;const[g]=f;if(n.has(g))return a.apply(c,[g]);const{id:m,styleId:y}=ba((p=c.parentRule)==null?void 0:p.parentStyleSheet,e,r.styleMirror);return(m&&m!==-1||y&&y!==-1)&&t({id:m,styleId:y,remove:{property:g},index:ny(c.parentRule)}),u.apply(c,f)})}),vt(()=>{s.CSSStyleDeclaration.prototype.setProperty=o,s.CSSStyleDeclaration.prototype.removeProperty=a})}function qSe({mediaInteractionCb:t,blockClass:e,blockSelector:n,mirror:r,sampling:s,doc:o}){const a=vt(c=>Hh(vt(f=>{const p=dp(f);if(!p||Cr(p,e,n,!0))return;const{currentTime:g,volume:m,muted:y,playbackRate:S,loop:E}=p;t({type:c,id:r.getId(p),currentTime:g,volume:m,muted:y,playbackRate:S,loop:E})}),s.media||500)),u=[Er("play",a(gc.Play),o),Er("pause",a(gc.Pause),o),Er("seeked",a(gc.Seeked),o),Er("volumechange",a(gc.VolumeChange),o),Er("ratechange",a(gc.RateChange),o)];return vt(()=>{u.forEach(c=>c())})}function WSe({fontCb:t,doc:e}){const n=e.defaultView;if(!n)return()=>{};const r=[],s=new WeakMap,o=n.FontFace;n.FontFace=function(c,f,p){const g=new o(c,f,p);return s.set(g,{family:c,buffer:typeof f!="string",descriptors:p,fontSource:typeof f=="string"?f:JSON.stringify(Array.from(new Uint8Array(f)))}),g};const a=uu(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 GSe(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=[],p=c.rangeCount||0;for(let g=0;g<p;g++){const m=c.getRangeAt(g),{startContainer:y,startOffset:S,endContainer:E,endOffset:C}=m;Cr(y,r,s,!0)||Cr(E,r,s,!0)||f.push({start:n.getId(y),startOffset:S,end:n.getId(E),endOffset:C})}o({ranges:f})});return u(),Er("selectionchange",u)}function VSe({doc:t,customElementCb:e}){const n=t.defaultView;return!n||!n.customElements?()=>{}:uu(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 KSe(t,e){const{mutationCb:n,mousemoveCb:r,mouseInteractionCb:s,scrollCb:o,viewportResizeCb:a,inputCb:u,mediaInteractionCb:c,styleSheetRuleCb:f,styleDeclarationCb:p,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),p(...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 YSe(t,e={}){const n=t.doc.defaultView;if(!n)return()=>{};KSe(t,e);let r;t.recordDOM&&(r=Qj(t,t.doc));const s=USe(t),o=FSe(t),a=Jj(t),u=zSe(t,{win:n}),c=BSe(t),f=qSe(t);let p=()=>{},g=()=>{},m=()=>{},y=()=>{};t.recordDOM&&(p=HSe(t,{win:n}),g=eB(t,t.doc),m=$Se(t,{win:n}),t.collectFonts&&(y=WSe(t)));const S=GSe(t),E=VSe(t),C=[];for(const w of t.plugins)C.push(w.observer(w.callback,n,w.options));return vt(()=>{Tl.forEach(w=>w.reset()),r?.disconnect(),s(),o(),a(),u(),c(),f(),p(),g(),m(),y(),S(),E(),C.forEach(w=>w())})}function Pm(t){return typeof window[t]<"u"}function km(t){return!!(typeof window[t]<"u"&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class LU{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 ZSe{constructor(e){Se(this,"iframes",new WeakMap),Se(this,"crossOriginIframeMap",new WeakMap),Se(this,"crossOriginIframeMirror",new LU(mz)),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 LU(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!==Zj.Document&&!e.rootId&&(e.rootId=n),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class XSe{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(!ch(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=Qj({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(Jj({...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(eB({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(uu(e.prototype,"attachShadow",function(s){return function(o){const a=s.call(this,o),u=rt.shadowRoot(this);return u&&Yj(this)&&r.addShadowRoot(u,n),a}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var _c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",QSe=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Dm=0;Dm<_c.length;Dm++)QSe[_c.charCodeAt(Dm)]=Dm;var JSe=function(t){var e=new Uint8Array(t),n,r=e.length,s="";for(n=0;n<r;n+=3)s+=_c[e[n]>>2],s+=_c[(e[n]&3)<<4|e[n+1]>>4],s+=_c[(e[n+1]&15)<<2|e[n+2]>>6],s+=_c[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 UU=new Map;function eEe(t,e){let n=UU.get(t);return n||(n=new Map,UU.set(t,n)),n.has(e)||n.set(e,[]),n.get(e)}const tB=(t,e,n)=>{if(!t||!(rB(t,e)||typeof t=="object"))return;const r=t.constructor.name,s=eEe(n,r);let o=s.indexOf(t);return o===-1&&(o=s.length,s.push(t)),o};function fv(t,e,n){if(t instanceof Array)return t.map(r=>fv(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=JSe(t);return{rr_type:r,base64:s}}else{if(t instanceof DataView)return{rr_type:t.constructor.name,args:[fv(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:[fv(t.data,e,n),t.width,t.height]};if(rB(t,e)||typeof t=="object"){const r=t.constructor.name,s=tB(t,e,n);return{rr_type:r,index:s}}}}return t}const nB=(t,e,n)=>t.map(r=>fv(r,e,n)),rB=(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 tEe(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=uu(e.CanvasRenderingContext2D.prototype,a,function(c){return function(...f){return Cr(this.canvas,n,r,!0)||setTimeout(()=>{const p=nB(f,e,this);t(this.canvas,{type:Wc["2D"],property:a,args:p})},0),c.apply(this,f)}});s.push(u)}catch{const u=Tb(e.CanvasRenderingContext2D.prototype,a,{set(c){t(this.canvas,{type:Wc["2D"],property:a,args:[c],setter:!0})}});s.push(u)}return()=>{s.forEach(a=>a())}}function nEe(t){return t==="experimental-webgl"?"webgl":t}function FU(t,e,n,r){const s=[];try{const o=uu(t.HTMLCanvasElement.prototype,"getContext",function(a){return function(u,...c){if(!Cr(this,e,n,!0)){const f=nEe(u);if("__context"in this||(this.__context=f),r&&["webgl","webgl2"].includes(f))if(c[0]&&typeof c[0]=="object"){const p=c[0];p.preserveDrawingBuffer||(p.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 zU(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=uu(t,c,function(p){return function(...g){const m=p.apply(this,g);if(tB(m,o,this),"tagName"in this.canvas&&!Cr(this.canvas,r,s,!0)){const y=nB(g,o,this),S={type:e,property:c,args:y};n(this.canvas,S)}return m}});a.push(f)}catch{const f=Tb(t,c,{set(p){n(this.canvas,{type:e,property:c,args:[p],setter:!0})}});a.push(f)}return a}function rEe(t,e,n,r){const s=[];return s.push(...zU(e.WebGLRenderingContext.prototype,Wc.WebGL,t,n,r,e)),typeof e.WebGL2RenderingContext<"u"&&s.push(...zU(e.WebGL2RenderingContext.prototype,Wc.WebGL2,t,n,r,e)),()=>{s.forEach(o=>o())}}const sB="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",sEe=t=>Uint8Array.from(atob(t),e=>e.charCodeAt(0)),jU=typeof window<"u"&&window.Blob&&new Blob([sEe(sB)],{type:"text/javascript;charset=utf-8"});function oEe(t){let e;try{if(e=jU&&(window.URL||window.webkitURL).createObjectURL(jU),!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,"+sB,{name:t?.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}class iEe{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=FU(n,r,s,!0),u=new Map,c=new oEe;c.onmessage=S=>{const{id:E}=S.data;if(u.set(E,!1),!("base64"in S.data))return;const{base64:C,type:w,width:_,height:T}=S.data;this.mutationCb({id:E,type:Wc["2D"],commands:[{property:"clearRect",args:[0,0,_,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 p=0,g;const m=()=>{const S=[];return n.document.querySelectorAll("canvas").forEach(E=>{Cr(E,r,s,!0)||S.push(E)}),S},y=S=>{if(p&&S-p<f){g=requestAnimationFrame(y);return}p=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 _=await createImageBitmap(E);c.postMessage({id:w,bitmap:_,width:E.width,height:E.height,dataURLOptions:o.dataURLOptions},[_])}),g=requestAnimationFrame(y)};g=requestAnimationFrame(y),this.resetObservers=()=>{a(),cancelAnimationFrame(g)}}initCanvasMutationObserver(e,n,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const s=FU(e,n,r,!1),o=tEe(this.processMutation.bind(this),e,n,r),a=rEe(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 aEe{constructor(e){Se(this,"trackedLinkElements",new WeakSet),Se(this,"mutationCb"),Se(this,"adoptedStyleSheetCb"),Se(this,"styleMirror",new RSe),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:hz(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 lEe{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,hv,bx,ry=!1;try{if(Array.from([1],t=>t*2)[0]!==2){const t=document.createElement("iframe");document.body.appendChild(t),Array.from=(($4=t.contentWindow)==null?void 0:$4.Array.from)||Array.from,document.body.removeChild(t)}}catch(t){console.debug("Unable to override Array.from",t)}const Bs=cye();function fp(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:p=!0,maskAllInputs:g,maskInputOptions:m,slimDOMOptions:y,maskInputFn:S,maskTextFn:E,hooks:C,packFn:w,sampling:_={},dataURLOptions:T={},mousemoveWait:R,recordDOM:M=!0,recordCanvas:O=!1,recordCrossOriginIframes:I=!1,recordAfter:P=t.recordAfter==="DOMContentLoaded"?t.recordAfter:"load",userTriggeredOnInput:k=!1,collectFonts:H=!1,inlineImages:F=!1,plugins:j,keepIframeSrcFn:W=()=>!1,ignoreCSSAttributes:Y=new Set([]),errorHandler:ne}=t;DSe(ne);const $=I?window.parent===window:!0;let ee=!1;if(!$)try{window.parent.document&&(ee=!1)}catch{ee=!0}if($&&!e)throw new Error("emit function is required");if(!$&&!ee)return()=>{};R!==void 0&&_.mousemove===void 0&&(_.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=Sz(y);TSe();let Ae,L=0;const V=Ee=>{for(const pt of j||[])pt.eventProcessor&&(Ee=pt.eventProcessor(Ee));return w&&!ee&&(Ee=w(Ee)),Ee};gn=(Ee,pt)=>{var Ce;const ze=Ee;if(ze.timestamp=ty(),(Ce=Tl[0])!=null&&Ce.isFrozen()&&ze.type!==Ct.FullSnapshot&&!(ze.type===Ct.IncrementalSnapshot&&ze.data.source===ft.Mutation)&&Tl.forEach(je=>je.unfreeze()),$)e?.(V(ze),pt);else if(ee){const je={type:"rrweb",event:V(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,He=n&&ze.timestamp-Ae.timestamp>n;(je||He)&&hv(!0)}};const K=Ee=>{gn({type:Ct.IncrementalSnapshot,data:{source:ft.Mutation,...Ee}})},J=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 aEe({mutationCb:K,adoptedStyleSheetCb:he}),ve=new ZSe({mirror:Bs,mutationCb:K,stylesheetManager:ue,recordCrossOriginIframes:I,wrappedEmit:gn});for(const Ee of j||[])Ee.getMirror&&Ee.getMirror({nodeMirror:Bs,crossOriginIframeMirror:ve.crossOriginIframeMirror,crossOriginIframeStyleMirror:ve.crossOriginIframeStyleMirror});const xe=new lEe;bx=new iEe({recordCanvas:O,mutationCb:oe,win:window,blockClass:s,blockSelector:o,mirror:Bs,sampling:_.canvas,dataURLOptions:T});const Xe=new XSe({mutationCb:K,scrollCb:J,bypassOptions:{blockClass:s,blockSelector:o,maskTextClass:c,maskTextSelector:f,inlineStylesheet:p,maskInputOptions:fe,dataURLOptions:T,maskTextFn:E,maskInputFn:S,recordCanvas:O,inlineImages:F,sampling:_,slimDOMOptions:de,iframeManager:ve,stylesheetManager:ue,canvasManager:bx,keepIframeSrcFn:W,processedNodeManager:xe},mirror:Bs});hv=(Ee=!1)=>{if(!M)return;gn({type:Ct.Meta,data:{href:window.location.href,width:$j(),height:Hj()}},Ee),ue.reset(),Xe.init(),Tl.forEach(Ce=>Ce.lock());const pt=kye(document,{mirror:Bs,blockClass:s,blockSelector:o,maskTextClass:c,maskTextSelector:f,inlineStylesheet:p,maskAllInputs:fe,maskTextFn:E,maskInputFn:S,slimDOM:de,dataURLOptions:T,recordCanvas:O,inlineImages:F,onSerialize:Ce=>{Gj(Ce,Bs)&&ve.addIframe(Ce),Vj(Ce,Bs)&&ue.trackLinkElement(Ce),lA(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:W});if(!pt)return console.warn("Failed to snapshot the document");gn({type:Ct.FullSnapshot,data:{node:pt,initialOffset:Bj(window)}},Ee),Tl.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(YSe)({mutationCb:K,mousemoveCb:(He,gr)=>gn({type:Ct.IncrementalSnapshot,data:{source:gr,positions:He}}),mouseInteractionCb:He=>gn({type:Ct.IncrementalSnapshot,data:{source:ft.MouseInteraction,...He}}),scrollCb:J,viewportResizeCb:He=>gn({type:Ct.IncrementalSnapshot,data:{source:ft.ViewportResize,...He}}),inputCb:He=>gn({type:Ct.IncrementalSnapshot,data:{source:ft.Input,...He}}),mediaInteractionCb:He=>gn({type:Ct.IncrementalSnapshot,data:{source:ft.MediaInteraction,...He}}),styleSheetRuleCb:He=>gn({type:Ct.IncrementalSnapshot,data:{source:ft.StyleSheetRule,...He}}),styleDeclarationCb:He=>gn({type:Ct.IncrementalSnapshot,data:{source:ft.StyleDeclaration,...He}}),canvasMutationCb:oe,fontCb:He=>gn({type:Ct.IncrementalSnapshot,data:{source:ft.Font,...He}}),selectionCb:He=>{gn({type:Ct.IncrementalSnapshot,data:{source:ft.Selection,...He}})},customElementCb:He=>{gn({type:Ct.IncrementalSnapshot,data:{source:ft.CustomElement,...He}})},blockClass:s,ignoreClass:a,ignoreSelector:u,maskTextClass:c,maskTextSelector:f,maskInputOptions:fe,inlineStylesheet:p,sampling:_,recordDOM:M,recordCanvas:O,inlineImages:F,userTriggeredOnInput:k,collectFonts:H,doc:ze,maskInputFn:S,maskTextFn:E,keepIframeSrcFn:W,blockSelector:o,slimDOMOptions:de,dataURLOptions:T,mirror:Bs,iframeManager:ve,stylesheetManager:ue,shadowDomManager:Xe,processedNodeManager:xe,canvasManager:bx,ignoreCSSAttributes:Y,plugins:((je=j?.filter(He=>He.observer))==null?void 0:je.map(He=>({observer:He.observer,options:He.options,callback:gr=>gn({type:Ct.Plugin,data:{plugin:He.name,payload:gr}})})))||[]},C)};ve.addLoadListener(ze=>{try{Ee.push(pt(ze.contentDocument))}catch(je){console.warn(je)}});const Ce=()=>{hv(),Ee.push(pt(document)),ry=!0};return["interactive","complete"].includes(document.readyState)?Ce():(Ee.push(Er("DOMContentLoaded",()=>{gn({type:Ct.DomContentLoaded,data:{}}),P==="DOMContentLoaded"&&Ce()})),Ee.push(Er("load",()=>{gn({type:Ct.Load,data:{}}),P==="load"&&Ce()},window))),()=>{Ee.forEach(ze=>{try{ze()}catch(je){String(je).toLowerCase().includes("cross-origin")||console.warn(je)}}),xe.destroy(),ry=!1,LSe()}}catch(Ee){console.warn(Ee)}}fp.addCustomEvent=(t,e)=>{if(!ry)throw new Error("please add custom event after start recording");gn({type:Ct.Custom,data:{tag:t,payload:e}})};fp.freezePage=()=>{Tl.forEach(t=>t.freeze())};fp.takeFullSnapshot=t=>{if(!ry)throw new Error("please take full snapshot after start recording");hv(t)};fp.mirror=Bs;var BU;(function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"})(BU||(BU={}));const uEe="rrweb",cEe={maskAllInputs:!0,maskTextSelector:"*",maskInputOptions:void 0},dEe={additionalSampleRate:1,batchSize:50,flushInterval:5e3,recordOptions:{slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,recordCrossOriginIframes:!1}},HU=dEe;class fEe extends Ns{constructor(e){super(uEe),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({},HU.recordOptions),e?.recordOptions),cEe);this.config=Object.assign(Object.assign(Object.assign({},HU),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=fp(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(T4,n),be.info("RRWebPlugin events sent to RUM",{eventType:T4,eventCount:this.recordingEvents.length}),this.recordingEvents=[]}}var hEe=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},cA;(function(t){t.Path="PATH",t.Hash="HASH",t.PathAndHash="PATH_AND_HASH"})(cA||(cA={}));const oB="us-west-2",dA=`https://dataplane.rum.${oB}.amazonaws.com`,iB=()=>({unique:!1,domain:window.location.hostname,path:"/",sameSite:"Strict",secure:!0}),aB=t=>({allowCookies:!1,batchLimit:100,client:Uge,compressionStrategy:{enabled:!0},cookieAttributes:t,debug:!1,disableAutoPageView:!1,dispatchInterval:5*1e3,enableRumClient:!0,enableXRay:!1,endpoint:dA,endpointUrl:new URL(dA),eventCacheSize:1e3,eventPluginsToLoad:[],pageIdFormat:cA.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 pEe=class{constructor(e,n,r,s={}){var{cookieAttributes:o}=s,a=hEe(s,["cookieAttributes"]);this.eventBus=new X7,typeof r>"u"&&(r="us-west-2"),this.applicationId=e;const u=Object.assign(Object.assign({},iB()),o);this.config=Object.assign(Object.assign({fetchFunction:fetch},aB(u)),a),this.config.sessionId&&(this.config.suppressSessionStartEvent=!0),this.config.endpoint=a.endpoint?a.endpoint:dA.replace(oB,r),this.config.endpointUrl=new URL(this.config.endpoint),be.configure(this.config.debug),be.info("Initialized RUM Slim"),this.eventCache=new Kme({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;[Lv,Uv,Fc,`${Lv}_${this.applicationId}`,`${Uv}_${this.applicationId}`,`${Fc}_${this.applicationId}`].forEach(r=>jme(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 Fge(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 zme(r);return this.config.disableAutoPageView||s.addPlugin(new fve),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 $U;(function(t){t.Path="PATH",t.Hash="HASH",t.PathAndHash="PATH_AND_HASH"})($U||($U={}));const gEe=t=>Object.assign(Object.assign({},aB(t)),{signing:!0,telemetries:[Ks.Errors,Ks.Performance,Ks.Http,Ks.Replay]});class mEe extends pEe{constructor(e,n,r,s={}){super(e,n,r,Object.assign(Object.assign({},gEe(iB())),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(hme),r.setCognitoCredentialProviderFactory((s,o,a,u)=>{const c={identityPoolId:a,guestRoleArn:u,cookieAttributes:s.cookieAttributes};return a&&u?new Ime(c,o).ChainAnonymousCredentialsProvider:new Ome(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(ez,e)}registerDomEvents(e){this.pluginManager.updatePlugin(Q7,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 ove(e)],[Ks.Performance]:e=>[new lve(e),new pve(e),new kve(e)],[Ks.Interaction]:e=>[new cR(e)],[Ks.Http]:e=>[new zve(e),new Lve(e)],[Ks.Replay]:e=>[new fEe(e)]}}}const lB={recordPageView:()=>{},recordError:()=>{},recordEvent:()=>{},recordTiming:()=>{}},vEe=/([?&](token|access_token|id_token|authorization)=[^&]*)|\/messages\/[a-z0-9_-]+/gi;function uB(t){return t.replace(vEe,"[redacted]")}function yEe(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 uB(t.slice(0,r))}function bEe(t){const e=uB(t.message);if(e===t.message)return t;const n=new Error(e);return n.name=t.name,n.stack=t.stack,n}function SEe(t){return{recordPageView(e){t.recordPageView(yEe(e))},recordError(e,n){t.recordError(bEe(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 qU(t){return t instanceof Error?t:new Error(String(t))}function EEe(t){window.addEventListener("error",e=>{t.recordError(qU(e.error??e.message))}),window.addEventListener("unhandledrejection",e=>{t.recordError(qU(e.reason))})}function CEe(){const{appMonitorId:t,identityPoolId:e,region:n}=xy().rum;if(!t)return lB;const r=new mEe(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=SEe(r);return EEe(s),s}const cB=A.createContext(lB);function $Ae(){return A.useContext(cB)}const fA="remit.theme",wEe="dark";function WU(){return typeof localStorage>"u"?"system":localStorage.getItem(fA)??"system"}function hA(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(wEe,e)}function qAe(t){typeof localStorage<"u"&&(t==="system"?localStorage.removeItem(fA):localStorage.setItem(fA,t)),hA(t)}const xEe=()=>{if(typeof window>"u"||(hA(WU()),typeof window.matchMedia!="function"))return;const t=window.matchMedia("(prefers-color-scheme: dark)"),e=()=>{hA(WU())};typeof t.addEventListener=="function"?t.addEventListener("change",e):t.addListener(e)},_Ee=(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);Ll(s[0])&&(s[0]=`react-i18next:: ${s[0]}`),t?.services?.logger?.warn?t.services.logger.warn(...s):console?.warn&&console.warn(...s)},GU={},pA=(t,e,n,r)=>{Ll(n)&&GU[n]||(Ll(n)&&(GU[n]=new Date),_Ee(t,e,n,r))},dB=(t,e)=>()=>{if(t.isInitialized)e();else{const n=()=>{setTimeout(()=>{t.off("initialized",n)},0),e()};t.on("initialized",n)}},gA=(t,e,n)=>{t.loadNamespaces(e,dB(t,n))},VU=(t,e,n,r)=>{if(Ll(n)&&(n=[n]),t.options.preload&&t.options.preload.indexOf(e)>-1)return gA(t,n,r);n.forEach(s=>{t.options.ns.indexOf(s)<0&&t.options.ns.push(s)}),t.loadLanguages(e,dB(t,r))},AEe=(t,e,n={})=>!e.languages||!e.languages.length?(pA(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}}),Ll=t=>typeof t=="string",TEe=t=>typeof t=="object"&&t!==null,REe=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,IEe={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},OEe=t=>IEe[t],NEe=t=>t.replace(REe,OEe);let mA={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:NEe};const MEe=(t={})=>{mA={...mA,...t}},PEe=()=>mA;let fB;const kEe=t=>{fB=t},DEe=()=>fB,LEe={type:"3rdParty",init(t){MEe(t.options.react),kEe(t)}},UEe=A.createContext();class FEe{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const zEe=(t,e)=>{const n=A.useRef();return A.useEffect(()=>{n.current=t},[t,e]),n.current},hB=(t,e,n,r)=>t.getFixedT(e,n,r),jEe=(t,e,n,r)=>A.useCallback(hB(t,e,n,r),[t,e,n,r]),BEe=(t,e={})=>{const{i18n:n}=e,{i18n:r,defaultNS:s}=A.useContext(UEe)||{},o=n||r||DEe();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new FEe),!o){pA(o,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const R=(O,I)=>Ll(I)?I:TEe(I)&&Ll(I.defaultValue)?I.defaultValue:Array.isArray(O)?O[O.length-1]:O,M=[R,{},!1];return M.t=R,M.i18n={},M.ready=!1,M}o.options.react?.wait&&pA(o,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const a={...PEe(),...o.options.react,...e},{useSuspense:u,keyPrefix:c}=a;let f=t||s||o.options?.defaultNS;f=Ll(f)?[f]:f||["translation"],o.reportNamespaces.addUsedNamespaces?.(f);const p=(o.isInitialized||o.initializedStoreOnce)&&f.every(R=>AEe(R,o,a)),g=jEe(o,e.lng||null,a.nsMode==="fallback"?f:f[0],c),m=()=>g,y=()=>hB(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=zEe(C),_=A.useRef(!0);A.useEffect(()=>{const{bindI18n:R,bindI18nStore:M}=a;_.current=!0,!p&&!u&&(e.lng?VU(o,e.lng,f,()=>{_.current&&E(y)}):gA(o,f,()=>{_.current&&E(y)})),p&&w&&w!==C&&_.current&&E(y);const O=()=>{_.current&&E(y)};return R&&o?.on(R,O),M&&o?.store.on(M,O),()=>{_.current=!1,o&&R&&R?.split(" ").forEach(I=>o.off(I,O)),M&&o&&M.split(" ").forEach(I=>o.store.off(I,O))}},[o,C]),A.useEffect(()=>{_.current&&p&&E(m)},[o,c,p]);const T=[S,o,p];if(T.t=S,T.i18n=o,T.ready=p,p||!p&&!u)return T;throw new Promise(R=>{e.lng?VU(o,e.lng,f,()=>R()):gA(o,f,()=>R())})},HEe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts",...t,headers:{"Content-Type":"application/json",...t.headers}}),$Ee=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/oauth/microsoft/start",...t,headers:{"Content-Type":"application/json",...t.headers}}),qEe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/test-connection",...t,headers:{"Content-Type":"application/json",...t.headers}}),WEe=t=>(t.client??Ze).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}",...t}),GEe=t=>(t.client??Ze).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}",...t,headers:{"Content-Type":"application/json",...t.headers}}),VEe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/filters",...t}),KEe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/filters",...t,headers:{"Content-Type":"application/json",...t.headers}}),YEe=t=>(t.client??Ze).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/filters/{filterId}",...t}),ZEe=t=>(t.client??Ze).put({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/folder-roles/{role}",...t,headers:{"Content-Type":"application/json",...t.headers}}),XEe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/mailboxes",...t}),QEe=t=>(t.client??Ze).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/mailboxes/{mailboxId}",...t,headers:{"Content-Type":"application/json",...t.headers}}),JEe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/organize",...t,headers:{"Content-Type":"application/json",...t.headers}}),eCe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/organize/preview",...t,headers:{"Content-Type":"application/json",...t.headers}}),tCe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/organize/{organizeJobId}",...t}),nCe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/sync",...t}),rCe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/sync/status",...t}),sCe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/addresses/search",...t}),oCe=t=>(t.client??Ze).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/addresses/{addressId}",...t,headers:{"Content-Type":"application/json",...t.headers}}),iCe=t=>(t?.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/config",...t}),WAe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/mailboxes/{mailboxId}/threads",...t}),aCe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/mailboxes/{mailboxId}/threads/search",...t}),lCe=t=>(t.client??Ze).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/me",...t,headers:{"Content-Type":"application/json",...t.headers}}),uCe=t=>(t?.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/me/export",...t}),cCe=t=>(t?.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/me/vip-suggestions",...t}),dCe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/delete",...t,headers:{"Content-Type":"application/json",...t.headers}}),fCe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/flags",...t,headers:{"Content-Type":"application/json",...t.headers}}),hCe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/move",...t,headers:{"Content-Type":"application/json",...t.headers}}),pCe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/{messageId}",...t}),gCe=t=>(t.client??Ze).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/{messageId}/flags",...t,headers:{"Content-Type":"application/json",...t.headers}}),mCe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/{messageId}/raw",...t}),vCe=t=>(t?.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox",...t}),yCe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox",...t,headers:{"Content-Type":"application/json",...t.headers}}),bCe=t=>(t.client??Ze).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}",...t}),SCe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}",...t}),ECe=t=>(t.client??Ze).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}",...t,headers:{"Content-Type":"application/json",...t.headers}}),CCe=t=>(t.client??Ze).post({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}/send",...t}),wCe=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/search/semantic",...t}),xCe=t=>(t?.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/threads",...t}),_Ce=t=>(t.client??Ze).get({security:[{name:"Authorization",type:"apiKey"}],url:"/threads/{threadId}/messages",...t}),GAe=t=>({mutationFn:async n=>{const{data:r}=await HEe({...t,...n,throwOnError:!0});return r}}),hr=(t,e,n,r)=>{const s={_id:t,baseUrl:e?.baseUrl||(e?.client??Ze).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]},VAe=t=>({mutationFn:async n=>{const{data:r}=await $Ee({...t,...n,throwOnError:!0});return r}}),KAe=t=>({mutationFn:async n=>{const{data:r}=await qEe({...t,...n,throwOnError:!0});return r}}),YAe=t=>({mutationFn:async n=>{const{data:r}=await WEe({...t,...n,throwOnError:!0});return r}}),ZAe=t=>({mutationFn:async n=>{const{data:r}=await GEe({...t,...n,throwOnError:!0});return r}}),ACe=t=>hr("filterOperationsListFilters",t),XAe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await VEe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:ACe(t)}),QAe=t=>({mutationFn:async n=>{const{data:r}=await KEe({...t,...n,throwOnError:!0});return r}}),JAe=t=>({mutationFn:async n=>{const{data:r}=await YEe({...t,...n,throwOnError:!0});return r}}),eTe=t=>({mutationFn:async n=>{const{data:r}=await ZEe({...t,...n,throwOnError:!0});return r}}),TCe=t=>hr("mailboxOperationsListMailboxes",t),tTe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await XEe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:TCe(t)}),nTe=t=>({mutationFn:async n=>{const{data:r}=await QEe({...t,...n,throwOnError:!0});return r}}),rTe=t=>({mutationFn:async n=>{const{data:r}=await JEe({...t,...n,throwOnError:!0});return r}}),sTe=t=>({mutationFn:async n=>{const{data:r}=await eCe({...t,...n,throwOnError:!0});return r}}),RCe=t=>hr("organizeJobDetailOperationsGetOrganizeJob",t),oTe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await tCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:RCe(t)}),iTe=t=>({mutationFn:async n=>{const{data:r}=await nCe({...t,...n,throwOnError:!0});return r}}),ICe=t=>hr("syncOperationsGetSyncStatus",t),aTe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await rCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:ICe(t)}),OCe=t=>hr("addressOperationsSearchAddresses",t),lTe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await sCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:OCe(t)}),uTe=t=>({mutationFn:async n=>{const{data:r}=await oCe({...t,...n,throwOnError:!0});return r}}),NCe=t=>hr("configOperationsGetConfig",t),MCe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await iCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:NCe(t)}),cTe=t=>hr("threadOperationsListThreads",t),PCe=t=>hr("threadOperationsSearchThreads",t),dTe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await aCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:PCe(t)}),fTe=t=>({mutationFn:async n=>{const{data:r}=await lCe({...t,...n,throwOnError:!0});return r}}),hTe=t=>({mutationFn:async n=>{const{data:r}=await uCe({...t,...n,throwOnError:!0});return r}}),kCe=t=>hr("meOperationsListVipSuggestions",t),pTe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await cCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:kCe(t)}),gTe=t=>({mutationFn:async n=>{const{data:r}=await dCe({...t,...n,throwOnError:!0});return r}}),mTe=t=>({mutationFn:async n=>{const{data:r}=await fCe({...t,...n,throwOnError:!0});return r}}),vTe=t=>({mutationFn:async n=>{const{data:r}=await hCe({...t,...n,throwOnError:!0});return r}}),DCe=t=>hr("messageOperationsDescribeMessage",t),yTe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await pCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:DCe(t)}),bTe=t=>({mutationFn:async n=>{const{data:r}=await gCe({...t,...n,throwOnError:!0});return r}}),LCe=t=>hr("messageOperationsGetRawMessage",t),STe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await mCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:LCe(t)}),pB=t=>hr("outboxOperationsListOutboxMessages",t),ETe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await vCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:pB(t)}),CTe=t=>({mutationFn:async n=>{const{data:r}=await yCe({...t,...n,throwOnError:!0});return r}}),wTe=t=>({mutationFn:async n=>{const{data:r}=await bCe({...t,...n,throwOnError:!0});return r}}),UCe=t=>hr("outboxDetailOperationsGetOutboxMessage",t),FCe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await SCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:UCe(t)}),xTe=t=>({mutationFn:async n=>{const{data:r}=await ECe({...t,...n,throwOnError:!0});return r}}),_Te=t=>({mutationFn:async n=>{const{data:r}=await CCe({...t,...n,throwOnError:!0});return r}}),zCe=t=>hr("semanticSearchOperationsSemanticSearch",t),ATe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await wCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:zCe(t)}),jCe=t=>hr("unifiedThreadOperationsListAllThreads",t),BCe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await xCe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:jCe(t)}),HCe=t=>hr("threadDetailOperationsListThreadMessages",t),TTe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await _Ce({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:HCe(t)}),gB=A.createContext(void 0),KU={isOpen:!1,mode:"new"},$Ce=2e3,qCe=6e4,WCe=({children:t})=>{const[e,n]=A.useState(KU),[r,s]=A.useState(),o=A.useRef(0),a=GF(),{data:u}=Pfe({...FCe({path:{outboxMessageId:r??""}}),enabled:!!r,refetchInterval:y=>{const S=y.state.data?.status;return S==="sent"||S==="failed"||S==="blocked"||Date.now()-o.current>qCe?!1:$Ce}});A.useEffect(()=>{if(!u||!r)return;(u.status==="sent"||u.status==="failed"||u.status==="blocked")&&(s(void 0),a.invalidateQueries({queryKey:pB()}))},[u,r,a]);const c=A.useCallback(y=>{n({...y,isOpen:!0})},[]),f=A.useCallback(()=>{n(KU)},[]),p=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:p,startSendPolling:g}),[e,c,f,p,g]);return D.jsx(gB.Provider,{value:m,children:t})},RTe=()=>{const t=A.useContext(gB);if(!t)throw new Error("useCompose must be used within a ComposeProvider");return t},Sx=(...t)=>c8(J6(t)),GCe={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"}},VCe={error:JZ,warning:uX,info:rX},KCe={error:"Error",warning:"Warning",info:"Information"},YCe=({id:t,severity:e,title:n,detail:r,onDismiss:s})=>{const o=GCe[e],a=VCe[e];return D.jsxs("div",{role:e==="error"?"alert":"status","aria-live":e==="error"?"assertive":"polite",className:Sx("pointer-events-auto flex items-start gap-3 rounded-md border bg-canvas px-3 py-2 shadow-lg",o.container),children:[D.jsx(a,{className:Sx("size-5 shrink-0 mt-0.5",o.icon),"aria-hidden":"true"}),D.jsxs("div",{className:"flex-1 min-w-0",children:[D.jsx("p",{className:Sx("text-sm font-medium",o.title),children:n}),r&&D.jsx("p",{className:"mt-0.5 text-xs text-fg-muted break-words",children:r})]}),D.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 ${KCe[e].toLowerCase()}`,children:D.jsx(gh,{className:"size-4","aria-hidden":"true"})})]})},ZCe=({errors:t,onDismiss:e})=>t.length===0?null:D.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:D.jsx("div",{className:"flex w-full max-w-md flex-col gap-2",children:t.map(n=>D.jsx(YCe,{id:n.id,severity:n.severity,title:n.title,detail:n.detail,onDismiss:e},n.id))})}),YU=5,ITe=(t,e,n)=>({title:t,detail:mB(n)??e,error:n}),mB=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}},OTe=t=>{const e=mB(t);return e?e.startsWith("Message not found"):!1},XCe=(t,e,n)=>t.severity===n&&t.title===e.title&&t.detail===e.detail,QCe=(t,e)=>{const r=[...t.filter(s=>!XCe(s,{title:e.title,detail:e.detail,severity:e.severity},e.severity)),e];return r.length<=YU?r:r.slice(r.length-YU)},JCe=(t,e)=>t.filter(n=>n.id!==e),ewe=(t,e,n)=>({id:e,severity:t.severity??"error",title:t.title,detail:t.detail,createdAt:n}),vB=A.createContext(void 0),twe=()=>typeof globalThis.crypto<"u"&&typeof globalThis.crypto.randomUUID=="function"?globalThis.crypto.randomUUID():`banner-${Date.now()}-${Math.random().toString(36).slice(2,10)}`,nwe=({children:t})=>{const[e,n]=A.useState([]),r=A.useCallback(u=>{if(u.error!=null&&W8(u.error))return zl(u.error).correlationId;const c=ewe(u,twe(),Date.now());return n(f=>QCe(f,c)),c.id},[]),s=A.useCallback(u=>{n(c=>JCe(c,u))},[]),o=A.useCallback(()=>{n([])},[]),a=A.useMemo(()=>({errors:e,pushError:r,dismissError:s,clearAll:o}),[e,r,s,o]);return D.jsxs(vB.Provider,{value:a,children:[t,D.jsx(ZCe,{errors:e,onDismiss:s})]})},NTe=()=>{const t=A.useContext(vB);if(!t)throw new Error("useErrorBanners must be used within an ErrorBannerProvider");return t},rwe=({error:t,reset:e,info:n})=>{const r=Ny(t),s=zl(t,{recoverable:r,componentStack:n?.componentStack});return D.jsx(Q8,{fatal:s,onRetry:r?e:void 0})},hp=ape()({component:owe,errorComponent:rwe}),swe=()=>{const{t}=BEe("common",{useSuspense:!1});return D.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 owe(){return D.jsxs(nwe,{children:[D.jsxs(WCe,{children:[D.jsx(swe,{}),D.jsx("main",{id:"main-content",className:"h-dvh overflow-hidden",children:D.jsx(A.Suspense,{fallback:D.jsx(KA,{}),children:D.jsx(x7,{})})})]}),D.jsx(X8,{})]})}const iwe=fr("/")({beforeLoad:()=>{throw s7({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 ZU;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(ZU||(ZU={}));const Oe=Tt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Sa=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 xi 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 xi))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()}}xi.create=t=>new xi(t);const vA=(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 awe=vA;function lwe(){return awe}const uwe=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=lwe(),r=uwe({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===vA?void 0:vA].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 Ke;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 Ke;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 Ke=Object.freeze({status:"aborted"}),Xf=t=>({status:"dirty",value:t}),Ms=t=>({status:"valid",value:t}),XU=t=>t.status==="aborted",QU=t=>t.status==="dirty",Gc=t=>t.status==="valid",sy=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 Ba{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 JU=(t,e)=>{if(Gc(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 xi(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 Sa(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:Sa(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:Sa(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(sy(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:Sa(e)},s=this._parseSync({data:e,path:r.path,parent:r});return JU(r,s)}"~validate"(e){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Sa(e)};if(!this["~standard"].async)try{const r=this._parseSync({data:e,path:[],parent:n});return Gc(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=>Gc(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:Sa(e)},s=this._parse({data:e,path:r.path,parent:r}),o=await(sy(s)?s:Promise.resolve(s));return JU(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 Yc({schema:this,typeName:Ye.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 Ma.create(this,this._def)}nullable(){return Zc.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return xo.create(this)}promise(){return ly.create(this,this._def)}or(e){return iy.create([this,e],this._def)}and(e){return ay.create(this,e,this._def)}transform(e){return new Yc({...st(this._def),schema:this,typeName:Ye.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new bA({...st(this._def),innerType:this,defaultValue:n,typeName:Ye.ZodDefault})}brand(){return new Mwe({typeName:Ye.ZodBranded,type:this,...st(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new SA({...st(this._def),innerType:this,catchValue:n,typeName:Ye.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return qR.create(this,e)}readonly(){return EA.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const cwe=/^c[^\s-]{8,}$/i,dwe=/^[0-9a-z]+$/,fwe=/^[0-9A-HJKMNP-TV-Z]{26}$/i,hwe=/^[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,pwe=/^[a-z0-9_-]{21}$/i,gwe=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,mwe=/^[-+]?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)?)??$/,vwe=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,ywe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Ex;const bwe=/^(?:(?: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])$/,Swe=/^(?:(?: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])$/,Ewe=/^(([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]))$/,Cwe=/^(([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])$/,wwe=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,xwe=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,yB="((\\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])))",_we=new RegExp(`^${yB}$`);function bB(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 Awe(t){return new RegExp(`^${bB(t)}$`)}function Twe(t){let e=`${yB}T${bB(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 Rwe(t,e){return!!((e==="v4"||!e)&&bwe.test(t)||(e==="v6"||!e)&&Ewe.test(t))}function Iwe(t,e){if(!gwe.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 Owe(t,e){return!!((e==="v4"||!e)&&Swe.test(t)||(e==="v6"||!e)&&Cwe.test(t))}class hi 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}),Ke}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")vwe.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")Ex||(Ex=new RegExp(ywe,"u")),Ex.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")hwe.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")pwe.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")cwe.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")dwe.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")fwe.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"?Twe(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"?_we.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{code:ge.invalid_string,validation:"date",message:o.message}),r.dirty()):o.kind==="time"?Awe(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"?mwe.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"duration",code:ge.invalid_string,message:o.message}),r.dirty()):o.kind==="ip"?Rwe(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"?Iwe(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"?Owe(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"?wwe.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"base64",code:ge.invalid_string,message:o.message}),r.dirty()):o.kind==="base64url"?xwe.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 hi({...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 hi({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new hi({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new hi({...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}}hi.create=t=>new hi({checks:[],typeName:Ye.ZodString,coerce:t?.coerce??!1,...st(t)});function Nwe(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 Vl 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}),Ke}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"?Nwe(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 Vl({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:Me.toString(s)}]})}_addCheck(e){return new Vl({...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)}}Vl.create=t=>new Vl({checks:[],typeName:Ye.ZodNumber,coerce:t?.coerce||!1,...st(t)});class Kl 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}),Ke}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 Kl({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:Me.toString(s)}]})}_addCheck(e){return new Kl({...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}}Kl.create=t=>new Kl({checks:[],typeName:Ye.ZodBigInt,coerce:t?.coerce??!1,...st(t)});class oy 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}),Ke}return Ms(e.data)}}oy.create=t=>new oy({typeName:Ye.ZodBoolean,coerce:t?.coerce||!1,...st(t)});class Vc 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}),Ke}if(Number.isNaN(e.data.getTime())){const o=this._getOrReturnCtx(e);return _e(o,{code:ge.invalid_date}),Ke}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 Vc({...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}}Vc.create=t=>new Vc({checks:[],coerce:t?.coerce||!1,typeName:Ye.ZodDate,...st(t)});class e5 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}),Ke}return Ms(e.data)}}e5.create=t=>new e5({typeName:Ye.ZodSymbol,...st(t)});class t5 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}),Ke}return Ms(e.data)}}t5.create=t=>new t5({typeName:Ye.ZodUndefined,...st(t)});class n5 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}),Ke}return Ms(e.data)}}n5.create=t=>new n5({typeName:Ye.ZodNull,...st(t)});class r5 extends wt{constructor(){super(...arguments),this._any=!0}_parse(e){return Ms(e.data)}}r5.create=t=>new r5({typeName:Ye.ZodAny,...st(t)});class s5 extends wt{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Ms(e.data)}}s5.create=t=>new s5({typeName:Ye.ZodUnknown,...st(t)});class Ha extends wt{_parse(e){const n=this._getOrReturnCtx(e);return _e(n,{code:ge.invalid_type,expected:Oe.never,received:n.parsedType}),Ke}}Ha.create=t=>new Ha({typeName:Ye.ZodNever,...st(t)});class o5 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}),Ke}return Ms(e.data)}}o5.create=t=>new o5({typeName:Ye.ZodVoid,...st(t)});class xo 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}),Ke;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 Ba(n,a,n.path,u)))).then(a=>us.mergeArray(r,a));const o=[...n.data].map((a,u)=>s.type._parseSync(new Ba(n,a,n.path,u)));return us.mergeArray(r,o)}get element(){return this._def.type}min(e,n){return new xo({...this._def,minLength:{value:e,message:Me.toString(n)}})}max(e,n){return new xo({...this._def,maxLength:{value:e,message:Me.toString(n)}})}length(e,n){return new xo({...this._def,exactLength:{value:e,message:Me.toString(n)}})}nonempty(e){return this.min(1,e)}}xo.create=(t,e)=>new xo({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Ye.ZodArray,...st(e)});function mc(t){if(t instanceof _n){const e={};for(const n in t.shape){const r=t.shape[n];e[n]=Ma.create(mc(r))}return new _n({...t._def,shape:()=>e})}else return t instanceof xo?new xo({...t._def,type:mc(t.element)}):t instanceof Ma?Ma.create(mc(t.unwrap())):t instanceof Zc?Zc.create(mc(t.unwrap())):t instanceof Yl?Yl.create(t.items.map(e=>mc(e))):t}class _n 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}),Ke}const{status:r,ctx:s}=this._processInputParams(e),{shape:o,keys:a}=this._getCached(),u=[];if(!(this._def.catchall instanceof Ha&&this._def.unknownKeys==="strip"))for(const f in s.data)a.includes(f)||u.push(f);const c=[];for(const f of a){const p=o[f],g=s.data[f];c.push({key:{status:"valid",value:f},value:p._parse(new Ba(s,g,s.path,f)),alwaysSet:f in s.data})}if(this._def.catchall instanceof Ha){const f=this._def.unknownKeys;if(f==="passthrough")for(const p of u)c.push({key:{status:"valid",value:p},value:{status:"valid",value:s.data[p]}});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 p of u){const g=s.data[p];c.push({key:{status:"valid",value:p},value:f._parse(new Ba(s,g,s.path,p)),alwaysSet:p in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const f=[];for(const p of c){const g=await p.key,m=await p.value;f.push({key:g,value:m,alwaysSet:p.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 _n({...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 _n({...this._def,unknownKeys:"strip"})}passthrough(){return new _n({...this._def,unknownKeys:"passthrough"})}extend(e){return new _n({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new _n({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Ye.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new _n({...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 _n({...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 _n({...this._def,shape:()=>n})}deepPartial(){return mc(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 _n({...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 Ma;)o=o._def.innerType;n[r]=o}return new _n({...this._def,shape:()=>n})}keyof(){return SB(Tt.objectKeys(this.shape))}}_n.create=(t,e)=>new _n({shape:()=>t,unknownKeys:"strip",catchall:Ha.create(),typeName:Ye.ZodObject,...st(e)});_n.strictCreate=(t,e)=>new _n({shape:()=>t,unknownKeys:"strict",catchall:Ha.create(),typeName:Ye.ZodObject,...st(e)});_n.lazycreate=(t,e)=>new _n({shape:t,unknownKeys:"strip",catchall:Ha.create(),typeName:Ye.ZodObject,...st(e)});class iy 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 xi(u.ctx.common.issues));return _e(n,{code:ge.invalid_union,unionErrors:a}),Ke}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},p=c._parseSync({data:n.data,path:n.path,parent:f});if(p.status==="valid")return p;p.status==="dirty"&&!o&&(o={result:p,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 xi(c));return _e(n,{code:ge.invalid_union,unionErrors:u}),Ke}}get options(){return this._def.options}}iy.create=(t,e)=>new iy({options:t,typeName:Ye.ZodUnion,...st(e)});function yA(t,e){const n=Sa(t),r=Sa(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=yA(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=yA(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 ay extends wt{_parse(e){const{status:n,ctx:r}=this._processInputParams(e),s=(o,a)=>{if(XU(o)||XU(a))return Ke;const u=yA(o.value,a.value);return u.valid?((QU(o)||QU(a))&&n.dirty(),{status:n.value,value:u.data}):(_e(r,{code:ge.invalid_intersection_types}),Ke)};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}))}}ay.create=(t,e,n)=>new ay({left:t,right:e,typeName:Ye.ZodIntersection,...st(n)});class Yl 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}),Ke;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"}),Ke;!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 Ba(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 Yl({...this._def,rest:e})}}Yl.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Yl({items:t,typeName:Ye.ZodTuple,rest:null,...st(e)})};class i5 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}),Ke;const s=this._def.keyType,o=this._def.valueType,a=[...r.data.entries()].map(([u,c],f)=>({key:s._parse(new Ba(r,u,r.path,[f,"key"])),value:o._parse(new Ba(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,p=await c.value;if(f.status==="aborted"||p.status==="aborted")return Ke;(f.status==="dirty"||p.status==="dirty")&&n.dirty(),u.set(f.value,p.value)}return{status:n.value,value:u}})}else{const u=new Map;for(const c of a){const f=c.key,p=c.value;if(f.status==="aborted"||p.status==="aborted")return Ke;(f.status==="dirty"||p.status==="dirty")&&n.dirty(),u.set(f.value,p.value)}return{status:n.value,value:u}}}}i5.create=(t,e,n)=>new i5({valueType:e,keyType:t,typeName:Ye.ZodMap,...st(n)});class $h 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}),Ke;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 p of c){if(p.status==="aborted")return Ke;p.status==="dirty"&&n.dirty(),f.add(p.value)}return{status:n.value,value:f}}const u=[...r.data.values()].map((c,f)=>o._parse(new Ba(r,c,r.path,f)));return r.common.async?Promise.all(u).then(c=>a(c)):a(u)}min(e,n){return new $h({...this._def,minSize:{value:e,message:Me.toString(n)}})}max(e,n){return new $h({...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)}}$h.create=(t,e)=>new $h({valueType:t,minSize:null,maxSize:null,typeName:Ye.ZodSet,...st(e)});class a5 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})}}a5.create=(t,e)=>new a5({getter:t,typeName:Ye.ZodLazy,...st(e)});class l5 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}),Ke}return{status:"valid",value:e.data}}get value(){return this._def.value}}l5.create=(t,e)=>new l5({value:t,typeName:Ye.ZodLiteral,...st(e)});function SB(t,e){return new Kc({values:t,typeName:Ye.ZodEnum,...st(e)})}class Kc 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}),Ke}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}),Ke}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 Kc.create(e,{...this._def,...n})}exclude(e,n=this._def){return Kc.create(this.options.filter(r=>!e.includes(r)),{...this._def,...n})}}Kc.create=SB;class u5 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}),Ke}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}),Ke}return Ms(e.data)}get enum(){return this._def.values}}u5.create=(t,e)=>new u5({values:t,typeName:Ye.ZodNativeEnum,...st(e)});class ly 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}),Ke;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})))}}ly.create=(t,e)=>new ly({type:t,typeName:Ye.ZodPromise,...st(e)});class Yc extends wt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ye.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 Ke;const c=await this._def.schema._parseAsync({data:u,path:r.path,parent:r});return c.status==="aborted"?Ke:c.status==="dirty"||n.value==="dirty"?Xf(c.value):c});{if(n.value==="aborted")return Ke;const u=this._def.schema._parseSync({data:a,path:r.path,parent:r});return u.status==="aborted"?Ke:u.status==="dirty"||n.value==="dirty"?Xf(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"?Ke:(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"?Ke:(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(!Gc(a))return Ke;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=>Gc(a)?Promise.resolve(s.transform(a.value,o)).then(u=>({status:n.value,value:u})):Ke);Tt.assertNever(s)}}Yc.create=(t,e,n)=>new Yc({schema:t,typeName:Ye.ZodEffects,effect:e,...st(n)});Yc.createWithPreprocess=(t,e,n)=>new Yc({schema:e,effect:{type:"preprocess",transform:t},typeName:Ye.ZodEffects,...st(n)});class Ma extends wt{_parse(e){return this._getType(e)===Oe.undefined?Ms(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Ma.create=(t,e)=>new Ma({innerType:t,typeName:Ye.ZodOptional,...st(e)});class Zc extends wt{_parse(e){return this._getType(e)===Oe.null?Ms(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Zc.create=(t,e)=>new Zc({innerType:t,typeName:Ye.ZodNullable,...st(e)});class bA 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}}bA.create=(t,e)=>new bA({innerType:t,typeName:Ye.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...st(e)});class SA 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 sy(s)?s.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new xi(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new xi(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}SA.create=(t,e)=>new SA({innerType:t,typeName:Ye.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...st(e)});class c5 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}),Ke}return{status:"valid",value:e.data}}}c5.create=t=>new c5({typeName:Ye.ZodNaN,...st(t)});class Mwe 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 qR 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"?Ke:o.status==="dirty"?(n.dirty(),Xf(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"?Ke: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 qR({in:e,out:n,typeName:Ye.ZodPipeline})}}class EA extends wt{_parse(e){const n=this._def.innerType._parse(e),r=s=>(Gc(s)&&(s.value=Object.freeze(s.value)),s);return sy(n)?n.then(s=>r(s)):r(n)}unwrap(){return this._def.innerType}}EA.create=(t,e)=>new EA({innerType:t,typeName:Ye.ZodReadonly,...st(e)});var Ye;(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"})(Ye||(Ye={}));const wr=hi.create;Vl.create;Kl.create;const Pwe=oy.create;Vc.create;Ha.create;xo.create;const fd=_n.create;iy.create;ay.create;Yl.create;Kc.create;ly.create;Ma.create;Zc.create;const MTe={string:(t=>hi.create({...t,coerce:!0})),number:(t=>Vl.create({...t,coerce:!0})),boolean:(t=>oy.create({...t,coerce:!0})),bigint:(t=>Kl.create({...t,coerce:!0})),date:(t=>Vc.create({...t,coerce:!0}))},kwe=xy().apiUrl;Ze.setConfig({baseUrl:kwe,fetch:Z6});Ze.interceptors.error.use((t,e)=>{if(t instanceof Wx||!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 Wx(r,e.status,n)});const Cx={Inbox:"inbox",Drafts:"drafts",Sent:"sent",Archive:"archive",Junk:"junk",Trash:"trash",All:"all",Flagged:"flagged"},PTe={inbox:"Inbox",drafts:"Drafts",sent:"Sent",archive:"Archive",junk:"Junk",trash:"Trash",all:"All",flagged:"Flagged"},d5=["inbox","flagged","drafts","sent","archive","all","junk","trash"];function Dwe(t){const e=new Map,n=[...t].sort((r,s)=>d5.indexOf(Cx[r.role])-d5.indexOf(Cx[s.role]));for(const r of n){if(!r.mailboxId||e.has(r.mailboxId))continue;const s=Cx[r.role];s&&e.set(r.mailboxId,s)}return e}const Lwe=t=>{const e=t.split("/");return e[e.length-1]||t};function kTe(t,e,n){const r=t.displayNameOverride?.trim();if(r)return r;const s=Lwe(t.fullPath);return!e||!n?s:n(`sidebar.${e}`,s)}const Uwe=new Set(["sent","drafts","trash"]),DTe=t=>t===void 0||!Uwe.has(t),Fwe=new Map;function LTe(t){const e=new Map;for(const n of t){const r=Dwe(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 UTe(t,e){const n=e[0];if(!t)return n?{mailboxId:n}:{};for(const s of e){const o=t.get(s);if(o&&_J(o)!==void 0)return{mailboxId:s,folder:o}}if(!n)return{};const r=t.get(n);return{mailboxId:n,...r?{folder:r}:{}}}const zwe=A.createContext(null),FTe=()=>A.useContext(zwe)??{accounts:[],mailboxNameIndex:new Map,accountNameIndex:new Map,resultFolderIndex:Fwe,searchQuery:"",searchInput:"",searchViewKey:"",onSearchChange:()=>{},onSearchClear:()=>{},onSearchClearQuery:()=>{},intelligenceOpen:!1,onToggleIntelligence:()=>{},onSetIntelligenceOpen:()=>{}},jwe=()=>Wn(()=>import("./mail-BL0cT4JK.js").then(t=>t.m),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11])),Bwe=fd({q:wr().optional()}),Hwe=fr("/mail")({loader:({context:{queryClient:t}})=>{t.prefetchQuery(MCe()),t.prefetchQuery({...BCe(),staleTime:6e4})},component:or(jwe,"component"),validateSearch:Bwe}),$we=()=>Wn(()=>import("./onboarding-2Bv1_vGQ.js"),__vite__mapDeps([12,13,3,9,5,4])),qwe=fr("/onboarding")({component:or($we,"component")}),Wwe=()=>Wn(()=>import("./settings-Dl3nKIbz.js"),[]),zTe=[{id:"accounts",label:"Accounts",icon:D.jsx(r8,{className:"size-4"})},{id:"senders",label:"Senders & Rules",icon:D.jsx(cX,{className:"size-4"})},{id:"folders",label:"Folder roles",icon:D.jsx(nX,{className:"size-4"})},{id:"filters",label:"Filters",icon:D.jsx(tX,{className:"size-4"})},{id:"appearance",label:"Appearance",icon:D.jsx(oX,{className:"size-4"})},{id:"advanced",label:"Advanced",icon:D.jsx(dX,{className:"size-4"})}],jTe={accounts:"/settings/accounts",senders:"/settings/senders",folders:"/settings/folders",filters:"/settings/filters",appearance:"/settings/appearance",advanced:"/settings/advanced"},Gwe=fr("/settings")({component:or(Wwe,"component")}),Vwe=()=>Wn(()=>import("./index-CvtYybGM.js"),__vite__mapDeps([14,7])),Kwe=()=>Wn(()=>import("./index-DtqBFgK5.js"),[]),Ywe=fd({selectedMessageId:wr().optional(),selectedThreadId:wr().optional(),selectedMailboxId:wr().optional(),q:wr().optional()}),Zwe=fr("/mail/")({component:or(Kwe,"component"),validateSearch:Ywe,errorComponent:or(Vwe,"errorComponent")}),Xwe=()=>Wn(()=>import("./_mailboxId-DtqBFgK5.js"),[]),Qwe=fd({selectedMessageId:wr().optional(),selectedThreadId:wr().optional(),q:wr().optional()}),Jwe=fr("/mail/$mailboxId")({component:or(Xwe,"component"),validateSearch:Qwe}),exe=()=>Wn(()=>import("./flagged-CRl7woNZ.js"),__vite__mapDeps([15,7])),txe=()=>Wn(()=>import("./flagged-DtqBFgK5.js"),[]),nxe=fd({selectedMessageId:wr().optional(),q:wr().optional()}),rxe=fr("/mail/flagged")({component:or(txe,"component"),validateSearch:nxe,errorComponent:or(exe,"errorComponent")}),sxe=()=>Wn(()=>import("./outbox-DtqBFgK5.js"),[]),oxe=fd({selectedOutboxMessageId:wr().optional(),q:wr().optional()}),ixe=fr("/mail/outbox")({component:or(sxe,"component"),validateSearch:oxe}),axe=()=>Wn(()=>import("./index-Cg1pkjPF.js"),[]),lxe=fr("/settings/")({component:or(axe,"component")}),uxe=()=>Wn(()=>import("./accounts-8nCxmJG7.js"),__vite__mapDeps([16,6,4,5,17,2,13,3,9,7,8])),cxe=fd({editAccountId:wr().optional(),focusSmtp:Pwe().optional(),connected:wr().optional(),oauthError:wr().optional()}),dxe=fr("/settings/accounts")({component:or(uxe,"component"),validateSearch:cxe}),fxe=()=>Wn(()=>import("./advanced-Cw06uIH9.js"),__vite__mapDeps([18,17,2])),hxe=fr("/settings/advanced")({component:or(fxe,"component")}),pxe=()=>Wn(()=>import("./appearance-DM-MsplT.js"),__vite__mapDeps([19,17,2])),gxe=fr("/settings/appearance")({component:or(pxe,"component")}),mxe=()=>Wn(()=>import("./filters-B3PEiAak.js"),__vite__mapDeps([20,17,2,10,5,7])),vxe=fr("/settings/filters")({component:or(mxe,"component")}),yxe=()=>Wn(()=>import("./folders-CpuJKgqa.js"),__vite__mapDeps([21,9,11,17,2,5,7])),bxe=fr("/settings/folders")({component:or(yxe,"component")}),Sxe=()=>Wn(()=>import("./senders-D7L8i6pE.js"),__vite__mapDeps([22,3,17,2,5,7,1,8])),Exe=fr("/settings/senders")({component:or(Sxe,"component")}),Cxe=()=>Wn(()=>import("./suggested-vips-Dfe3W5Wz.js"),[]),wxe=fr("/settings/suggested-vips")({component:or(Cxe,"component")}),xxe=iwe.update({id:"/",path:"/",getParentRoute:()=>hp}),pp=Hwe.update({id:"/mail",path:"/mail",getParentRoute:()=>hp}),_xe=qwe.update({id:"/onboarding",path:"/onboarding",getParentRoute:()=>hp}),Ni=Gwe.update({id:"/settings",path:"/settings",getParentRoute:()=>hp}),Axe=Zwe.update({id:"/",path:"/",getParentRoute:()=>pp}),Txe=Jwe.update({id:"/$mailboxId",path:"/$mailboxId",getParentRoute:()=>pp}),Rxe=rxe.update({id:"/flagged",path:"/flagged",getParentRoute:()=>pp}),Ixe=ixe.update({id:"/outbox",path:"/outbox",getParentRoute:()=>pp}),Oxe=lxe.update({id:"/",path:"/",getParentRoute:()=>Ni}),Nxe=dxe.update({id:"/accounts",path:"/accounts",getParentRoute:()=>Ni}),Mxe=hxe.update({id:"/advanced",path:"/advanced",getParentRoute:()=>Ni}),Pxe=gxe.update({id:"/appearance",path:"/appearance",getParentRoute:()=>Ni}),kxe=vxe.update({id:"/filters",path:"/filters",getParentRoute:()=>Ni}),Dxe=bxe.update({id:"/folders",path:"/folders",getParentRoute:()=>Ni}),Lxe=Exe.update({id:"/senders",path:"/senders",getParentRoute:()=>Ni}),Uxe=wxe.update({id:"/suggested-vips",path:"/suggested-vips",getParentRoute:()=>Ni}),Fxe={MailMailboxIdRoute:Txe,MailFlaggedRoute:Rxe,MailOutboxRoute:Ixe,MailIndexRoute:Axe},zxe=pp._addFileChildren(Fxe),jxe={SettingsAccountsRoute:Nxe,SettingsAdvancedRoute:Mxe,SettingsAppearanceRoute:Pxe,SettingsFiltersRoute:kxe,SettingsFoldersRoute:Dxe,SettingsSendersRoute:Lxe,SettingsSuggestedVipsRoute:Uxe,SettingsIndexRoute:Oxe},Bxe=Ni._addFileChildren(jxe),Hxe={IndexRoute:xxe,MailRoute:zxe,OnboardingRoute:_xe,SettingsRoute:Bxe},$xe=hp._addFileChildren(Hxe)._addFileTypes(),qxe=(t,e)=>{const n=wpe({routeTree:$xe,context:{queryClient:t},defaultPreload:"intent"});return n.subscribe("onResolved",r=>{e.recordPageView(r.toLocation.pathname)}),n},qe=t=>typeof t=="string",Uf=()=>{let t,e;const n=new Promise((r,s)=>{t=r,e=s});return n.resolve=t,n.reject=e,n},f5=t=>t==null?"":""+t,Wxe=(t,e,n)=>{t.forEach(r=>{e[r]&&(n[r]=e[r])})},Gxe=/###/g,h5=t=>t&&t.indexOf("###")>-1?t.replace(Gxe,"."):t,p5=t=>!t||qe(t),fh=(t,e,n)=>{const r=qe(e)?e.split("."):e;let s=0;for(;s<r.length-1;){if(p5(t))return{};const o=h5(r[s]);!t[o]&&n&&(t[o]=new n),Object.prototype.hasOwnProperty.call(t,o)?t=t[o]:t={},++s}return p5(t)?{}:{obj:t,k:h5(r[s])}},g5=(t,e,n)=>{const{obj:r,k:s}=fh(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=fh(t,a,Object);for(;u.obj===void 0&&a.length;)o=`${a[a.length-1]}.${o}`,a=a.slice(0,a.length-1),u=fh(t,a,Object),u?.obj&&typeof u.obj[`${u.k}.${o}`]<"u"&&(u.obj=void 0);u.obj[`${u.k}.${o}`]=n},Vxe=(t,e,n,r)=>{const{obj:s,k:o}=fh(t,e,Object);s[o]=s[o]||[],s[o].push(n)},uy=(t,e)=>{const{obj:n,k:r}=fh(t,e);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},Kxe=(t,e,n)=>{const r=uy(t,n);return r!==void 0?r:uy(e,n)},EB=(t,e,n)=>{for(const r in e)r!=="__proto__"&&r!=="constructor"&&(r in t?qe(t[r])||t[r]instanceof String||qe(e[r])||e[r]instanceof String?n&&(t[r]=e[r]):EB(t[r],e[r],n):t[r]=e[r]);return t},oc=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Yxe={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const Zxe=t=>qe(t)?t.replace(/[&<>"'\/]/g,e=>Yxe[e]):t;class Xxe{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 Qxe=[" ",",","?","!",";"],Jxe=new Xxe(20),e_e=(t,e,n)=>{e=e||"",n=n||"";const r=Qxe.filter(a=>e.indexOf(a)<0&&n.indexOf(a)<0);if(r.length===0)return!0;const s=Jxe.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},CA=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},cy=t=>t?.replace("_","-"),t_e={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 dy{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||t_e,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:(qe(e[0])&&(e[0]=`${r}${this.prefix} ${e[0]}`),this.logger[n](e))}create(e){return new dy(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new dy(this.logger,e)}}var wo=new dy;class Rb{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 m5 extends Rb{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):qe(r)&&o?u.push(...r.split(o)):u.push(r)));const c=uy(this.data,u);return!c&&!n&&!r&&e.indexOf(".")>-1&&(e=u[0],n=u[1],r=u.slice(2).join(".")),c||!a||!qe(r)?c:CA(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),g5(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)(qe(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=uy(this.data,u)||{};a.skipCopy||(r=JSON.parse(JSON.stringify(r))),s?EB(c,r,o):c={...c,...r},g5(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 CB={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 v5={},y5=t=>!qe(t)&&typeof t!="boolean"&&typeof t!="number";class fy extends Rb{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Wxe(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=wo.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&&!e_e(e,r,s);if(a&&!u){const c=e.match(this.interpolator.nestingRegexp);if(c&&c.length>0)return{key:e,namespaces:qe(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:qe(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,p=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(f?.toLowerCase()==="cimode"){if(p){const F=n.nsSeparator||this.options.nsSeparator;return s?{res:`${c}${F}${a}`,usedKey:a,exactUsedKey:a,usedLng:f,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:`${c}${F}${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,_=n.count!==void 0&&!qe(n.count),T=fy.hasDefaultValue(n),R=_?this.pluralResolver.getSuffix(f,n.count,n):"",M=n.ordinal&&_?this.pluralResolver.getSuffix(f,n.count,{ordinal:!1}):"",O=_&&!n.ordinal&&n.count===0,I=O&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${R}`]||n[`defaultValue${M}`]||n.defaultValue;let P=m;w&&!m&&T&&(P=I);const k=y5(P),H=Object.prototype.toString.apply(P);if(w&&P&&k&&E.indexOf(H)<0&&!(qe(C)&&Array.isArray(P))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const F=this.options.returnedObjectHandler?this.options.returnedObjectHandler(y,P,{...n,ns:u}):`key '${a} (${this.language})' returned an object instead of string.`;return s?(g.res=F,g.usedParams=this.getUsedParamsDetails(n),g):F}if(o){const F=Array.isArray(P),j=F?[]:{},W=F?S:y;for(const Y in P)if(Object.prototype.hasOwnProperty.call(P,Y)){const ne=`${W}${o}${Y}`;T&&!m?j[Y]=this.translate(ne,{...n,defaultValue:y5(I)?I[Y]:void 0,joinArrays:!1,ns:u}):j[Y]=this.translate(ne,{...n,joinArrays:!1,ns:u}),j[Y]===ne&&(j[Y]=P[Y])}m=j}}else if(w&&qe(C)&&Array.isArray(m))m=m.join(C),m&&(m=this.extendTranslation(m,e,n,r));else{let F=!1,j=!1;!this.isValidLookup(m)&&T&&(F=!0,m=I),this.isValidLookup(m)||(j=!0,m=a);const Y=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&j?void 0:m,ne=T&&I!==m&&this.options.updateMissing;if(j||F||ne){if(this.logger.log(ne?"updateKey":"missingKey",f,c,a,ne?I: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 $=[];const ee=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&ee&&ee[0])for(let de=0;de<ee.length;de++)$.push(ee[de]);else this.options.saveMissingTo==="all"?$=this.languageUtils.toResolveHierarchy(n.lng||this.language):$.push(n.lng||this.language);const fe=(de,Ae,L)=>{const V=T&&L!==m?L:Y;this.options.missingKeyHandler?this.options.missingKeyHandler(de,c,Ae,V,ne,n):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(de,c,Ae,V,ne,n),this.emit("missingKey",de,c,Ae,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&_?$.forEach(de=>{const Ae=this.pluralResolver.getSuffixes(de,n);O&&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}`]||I)})}):fe($,a,I))}m=this.extendTranslation(m,e,n,g,r),j&&m===a&&this.options.appendNamespaceToMissingKey&&(m=`${c}:${a}`),(j||F)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}:${a}`:a,F?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=qe(e)&&(r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let p;if(f){const m=e.match(this.interpolator.nestingRegexp);p=m&&m.length}let g=r.replace&&!qe(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;p<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=qe(u)?[u]:u;return e!=null&&c?.length&&r.applyPostProcessor!==!1&&(e=CB.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 qe(e)&&(e=[e]),e.forEach(c=>{if(this.isValidLookup(r))return;const f=this.extractFromKey(c,n),p=f.key;s=p;let g=f.namespaces;this.options.fallbackNS&&(g=g.concat(this.options.fallbackNS));const m=n.count!==void 0&&!qe(n.count),y=m&&!n.ordinal&&n.count===0,S=n.context!==void 0&&(qe(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,!v5[`${E[0]}-${C}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(u)&&(v5[`${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 _=[p];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(_,p,w,C,n);else{let R;m&&(R=this.pluralResolver.getSuffix(w,n.count,n));const M=`${this.options.pluralSeparator}zero`,O=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(m&&(_.push(p+R),n.ordinal&&R.indexOf(O)===0&&_.push(p+R.replace(O,this.options.pluralSeparator)),y&&_.push(p+M)),S){const I=`${p}${this.options.contextSeparator}${n.context}`;_.push(I),m&&(_.push(I+R),n.ordinal&&R.indexOf(O)===0&&_.push(I+R.replace(O,this.options.pluralSeparator)),y&&_.push(I+M))}}let T;for(;T=_.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&&!qe(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 b5{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=wo.create("languageUtils")}getScriptPartFromCode(e){if(e=cy(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=cy(e),!e||e.indexOf("-")<0)return e;const n=e.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(e){if(qe(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)),qe(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 qe(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))):qe(e)&&o(this.formatLanguageCode(e)),r.forEach(a=>{s.indexOf(a)<0&&o(this.formatLanguageCode(a))}),s}}const S5={zero:0,one:1,two:2,few:3,many:4,other:5},E5={select:t=>t===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class n_e{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=n,this.logger=wo.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=cy(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!"),E5;if(!e.match(/-|_/))return E5;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)=>S5[s]-S5[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 C5=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=Kxe(t,e,n);return!o&&s&&qe(n)&&(o=CA(t,n,r),o===void 0&&(o=CA(e,n,r))),o},wx=t=>t.replace(/\$/g,"$$$$");class r_e{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=wo.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:p,unescapePrefix:g,nestingPrefix:m,nestingPrefixEscaped:y,nestingSuffix:S,nestingSuffixEscaped:E,nestingOptionsSeparator:C,maxReplaces:w,alwaysFormat:_}=e.interpolation;this.escape=n!==void 0?n:Zxe,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=o?oc(o):a||"{{",this.suffix=u?oc(u):c||"}}",this.formatSeparator=f||",",this.unescapePrefix=p?"":g||"-",this.unescapeSuffix=this.unescapePrefix?"":p||"",this.nestingPrefix=m?oc(m):y||oc("$t("),this.nestingSuffix=S?oc(S):E||oc(")"),this.nestingOptionsSeparator=C||",",this.maxReplaces=w||1e3,this.alwaysFormat=_!==void 0?_:!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=C5(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(C5(n,c,E,this.options.keySeparator,this.options.ignoreJSONStructure),C,r,{...s,...n,interpolationkey:E})};this.resetRegExp();const p=s?.missingInterpolationHandler||this.options.missingInterpolationHandler,g=s?.interpolation?.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:y=>wx(y)},{regex:this.regexp,safeValue:y=>this.escapeValue?wx(this.escape(y)):wx(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 p=="function"){const C=p(e,o,s);a=qe(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!qe(a)&&!this.useRawValueToEscape&&(a=f5(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 p=this.nestingOptionsSeparator;if(c.indexOf(p)<0)return c;const g=c.split(new RegExp(`${p}[ ]*{`));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}${p}${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&&!qe(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 p=s[1].split(this.formatSeparator).map(g=>g.trim());s[1]=p.shift(),c=p,f=!0}if(o=n(u.call(this,s[1].trim(),a),a),o&&s[0]===e&&!qe(o))return o;qe(o)||(o=f5(o)),o||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`),o=""),f&&(o=c.reduce((p,g)=>this.format(p,g,r.lng,{...r,interpolationkey:s[1].trim()}),o.trim())),e=e.replace(s[0],o),this.regexp.lastIndex=0}return e}}const s_e=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,""),p=u.trim();n[p]||(n[p]=f),f==="false"&&(n[p]=!1),f==="true"&&(n[p]=!0),isNaN(f)||(n[p]=parseInt(f,10))}})}return{formatName:e,formatOptions:n}},ic=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(cy(r),s),e[a]=u),u(n)}};class o_e{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=wo.create("formatter"),this.options=e,this.formats={number:ic((n,r)=>{const s=new Intl.NumberFormat(n,{...r});return o=>s.format(o)}),currency:ic((n,r)=>{const s=new Intl.NumberFormat(n,{...r,style:"currency"});return o=>s.format(o)}),datetime:ic((n,r)=>{const s=new Intl.DateTimeFormat(n,{...r});return o=>s.format(o)}),relativetime:ic((n,r)=>{const s=new Intl.RelativeTimeFormat(n,{...r});return o=>s.format(o,r.range||"day")}),list:ic((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()]=ic(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:p}=s_e(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,{...p,...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 i_e=(t,e)=>{t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)};class a_e extends Rb{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=wo.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 p=!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,p=!1,a[m]===void 0&&(a[m]=!0),o[m]===void 0&&(o[m]=!0),c[g]===void 0&&(c[g]=!0)))}),p||(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=>{Vxe(c.loaded,[o],a),i_e(c,e),n&&c.errors.push(n),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(f=>{u[f]||(u[f]={});const p=c.loaded[f];p.length&&p.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,p)=>{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&&p&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,e,n,r,s+1,o*2,a)},o);return}a(f,p)},c=this.backend[r].bind(this.backend);if(c.length===2){try{const f=c(e,n);f&&typeof f.then=="function"?f.then(p=>u(null,p)).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();qe(e)&&(e=this.languageUtils.toResolveHierarchy(e)),qe(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 p;f.length===5?p=f(e,n,r,s,c):p=f(e,n,r,s),p&&typeof p.then=="function"?p.then(g=>u(null,g)).catch(u):u(null,p)}catch(p){u(p)}else f(e,n,r,s,u,c)}!e||!e[0]||this.store.addResource(e[0],n,r,s)}}}const w5=()=>({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]),qe(t[1])&&(e.defaultValue=t[1]),qe(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}}),x5=t=>(qe(t.ns)&&(t.ns=[t.ns]),qe(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),qe(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),Lm=()=>{},l_e=t=>{Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(n=>{typeof t[n]=="function"&&(t[n]=t[n].bind(t))})};class qh extends Rb{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=x5(e),this.services={},this.logger=wo,this.modules={external:[]},l_e(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&&(qe(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const s=w5();this.options={...s,...this.options,...x5(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=p=>p?typeof p=="function"?new p:p:null;if(!this.options.isClone){this.modules.logger?wo.init(o(this.modules.logger),this.options):wo.init(null,this.options);let p;this.modules.formatter?p=this.modules.formatter:p=o_e;const g=new b5(this.options);this.store=new m5(this.options.resources,this.options);const m=this.services;m.logger=wo,m.resourceStore=this.store,m.languageUtils=g,m.pluralResolver=new n_e(g,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),p&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(m.formatter=o(p),m.formatter.init(m,this.options),this.options.interpolation.format=m.formatter.format.bind(m.formatter)),m.interpolator=new r_e(this.options),m.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},m.backendConnector=new a_e(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 fy(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=Lm),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const p=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);p.length>0&&p[0]!=="dev"&&(this.options.lng=p[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(p=>{this[p]=function(){return e.store[p](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(p=>{this[p]=function(){return e.store[p](...arguments),e}});const c=Uf(),f=()=>{const p=(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 p(null,this.t.bind(this));this.changeLanguage(this.options.lng,p)};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]:Lm;const s=qe(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=Uf();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=Lm),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"&&CB.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=Uf();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=qe(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,p=>{a(p,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,p=new Array(f>2?f-2:0),g=2;g<f;g++)p[g-2]=arguments[g];c=s.options.overloadTranslationOptionHandler([a,u].concat(p))}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 qe(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=Uf();return this.options.ns?(qe(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=Uf();qe(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 b5(w5());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]:Lm;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((p,g)=>(p[g]={...c[f][g]},p),{})),{});o.store=new m5(u,s),o.services.resourceStore=o.store}return o.translator=new fy(o.services,s),o.translator.on("*",function(u){for(var c=arguments.length,f=new Array(c>1?c-1:0),p=1;p<c;p++)f[p-1]=arguments[p];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:u_e,forEach:c_e}=[];function d_e(t){return c_e.call(u_e.call(arguments,1),e=>{if(e)for(const n in e)t[n]===void 0&&(t[n]=e[n])}),t}function f_e(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 _5=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,h_e=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(!_5.test(r.domain))throw new TypeError("option domain is invalid");o+=`; Domain=${r.domain}`}if(r.path){if(!_5.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},A5={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=h_e(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 p_e={name:"cookie",lookup(t){let{lookupCookie:e}=t;if(e&&typeof document<"u")return A5.read(e)||void 0},cacheUserLanguage(t,e){let{lookupCookie:n,cookieMinutes:r,cookieDomain:s,cookieOptions:o}=e;n&&typeof document<"u"&&A5.create(n,t,r,s,o)}},g_e={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}},m_e={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 ac=null;const T5=()=>{if(ac!==null)return ac;try{if(ac=typeof window<"u"&&window.localStorage!==null,!ac)return!1;const t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch{ac=!1}return ac};var v_e={name:"localStorage",lookup(t){let{lookupLocalStorage:e}=t;if(e&&T5())return window.localStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupLocalStorage:n}=e;n&&T5()&&window.localStorage.setItem(n,t)}};let lc=null;const R5=()=>{if(lc!==null)return lc;try{if(lc=typeof window<"u"&&window.sessionStorage!==null,!lc)return!1;const t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch{lc=!1}return lc};var y_e={name:"sessionStorage",lookup(t){let{lookupSessionStorage:e}=t;if(e&&R5())return window.sessionStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupSessionStorage:n}=e;n&&R5()&&window.sessionStorage.setItem(n,t)}},b_e={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}},S_e={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}},E_e={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}},C_e={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 wB=!1;try{document.cookie,wB=!0}catch{}const xB=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];wB||xB.splice(1,1);const w_e=()=>({order:xB,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:t=>t});class _B{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=d_e(n,this.options||{},w_e()),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(p_e),this.addDetector(g_e),this.addDetector(v_e),this.addDetector(y_e),this.addDetector(b_e),this.addDetector(S_e),this.addDetector(E_e),this.addDetector(C_e),this.addDetector(m_e)}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&&!f_e(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)}))}}_B.type="languageDetector";function x_e(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=__e(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 __e(t,e){if(t){if(typeof t=="string")return I5(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)?I5(t,e):void 0}}function I5(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 wA(t){"@babel/helpers - typeof";return wA=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},wA(t)}var AB=["__proto__","constructor","prototype"];function TB(t){return!(typeof t!="string"||t.length===0||t.length>128||AB.indexOf(t)>-1||t.indexOf("..")>-1||t.indexOf("\\")>-1||/[?#%\s@]/.test(t)||/[\x00-\x1F\x7F]/.test(t))}function RB(t){return!(!TB(t)||t.indexOf("/")>-1)}function A_e(t){return TB(t)}var T_e={lng:RB,ns:A_e};function Um(t){return typeof t!="string"?t:t.replace(/[\r\n\x00-\x1F\x7F]/g," ")}function R_e(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 IB(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":wA(XMLHttpRequest))==="object"}function I_e(t){return!!t&&typeof t.then=="function"}function O_e(t){return I_e(t)?t:Promise.resolve(t)}var N_e=/\{\{(.+?)\}\}/g;function O5(t,e){var n=!1,r=t.replace(N_e,function(s,o){var a=o.trim();if(AB.indexOf(a)>-1)return s;var u=e[a];if(u==null)return s;var c=T_e[a]||RB,f=String(u).split("+"),p=x_e(f),g;try{for(p.s();!(g=p.n()).done;){var m=g.value;if(!c(m))return n=!0,s}}catch(y){p.e(y)}finally{p.f()}return f.join("+")});return n?null:r}function N5(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 M5(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?N5(Object(n),!0).forEach(function(r){M_e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):N5(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function M_e(t,e,n){return(e=P_e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function P_e(t){var e=k_e(t,"string");return Zl(e)=="symbol"?e:e+""}function k_e(t,e){if(Zl(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Zl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Zl(t){"@babel/helpers - typeof";return Zl=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},Zl(t)}var $a=typeof fetch=="function"?fetch:void 0;typeof global<"u"&&global.fetch?$a=global.fetch:typeof window<"u"&&window.fetch&&($a=window.fetch);var Wh;IB()&&(typeof global<"u"&&global.XMLHttpRequest?Wh=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&(Wh=window.XMLHttpRequest));var hy;typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?hy=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(hy=window.ActiveXObject));typeof $a!="function"&&($a=void 0);if(!$a&&!Wh&&!hy)try{Wn(()=>import("./browser-ponyfill-A3QWHdug.js").then(t=>t.b),[]).then(function(t){$a=t.default}).catch(function(){})}catch{}var OB=["__proto__","constructor","prototype"],xA=function(e,n){if(n&&Zl(n)==="object"){for(var r="",s=0,o=Object.keys(n);s<o.length;s++){var a=o[s];OB.indexOf(a)>-1||(r+="&"+encodeURIComponent(a)+"="+encodeURIComponent(n[a]))}if(!r)return e;e=e+(e.indexOf("?")!==-1?"&":"?")+r.slice(1)}return e},P5=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):$a(e,n).then(o).catch(r)},D_e=function(e,n,r,s){e.queryStringParams&&(n=xA(n,e.queryStringParams));var o=M5({},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=M5({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{P5(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(p){delete u[p]}),P5(n,u,s,c),e._omitFetchOptions=!0}catch(p){s(p)}}},L_e=function(e,n,r,s){r&&Zl(r)==="object"&&(r=xA("",r).slice(1)),e.queryStringParams&&(n=xA(n,e.queryStringParams));try{var o=Wh?new Wh:new hy("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];OB.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(p){console&&console.log(p)}},U_e=function(e,n,r,s){if(typeof r=="function"&&(s=r,r=void 0),s=s||function(){},$a&&n.indexOf("file:")!==0)return D_e(e,n,r,s);if(IB()||typeof ActiveXObject=="function")return L_e(e,n,r,s);s(new Error("No fetch and no xhr implementation found!"))};function Xc(t){"@babel/helpers - typeof";return Xc=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},Xc(t)}function k5(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 xx(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?k5(Object(n),!0).forEach(function(r){NB(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):k5(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function F_e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function z_e(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,MB(r.key),r)}}function j_e(t,e,n){return e&&z_e(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function NB(t,e,n){return(e=MB(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function MB(t){var e=B_e(t,"string");return Xc(e)=="symbol"?e:e+""}function B_e(t,e){if(Xc(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Xc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var H_e=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 NB({},r,s||"")},parseLoadPayload:function(n,r){},request:U_e,reloadInterval:typeof window<"u"?!1:3600*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},PB=(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]:{};F_e(this,t),this.services=e,this.options=n,this.allOptions=r,this.type="backend",this.init(e,n,r)}return j_e(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=xx(xx(xx({},H_e()),this.options||{}),s),this.allOptions=o,this.services&&this.options.reloadInterval){var a=setInterval(function(){return r.reload()},this.options.reloadInterval);Xc(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=O_e(c),c.then(function(f){if(!f)return a(null,{});var p=O5(f,{lng:n.join("+"),ns:s.join("+")});if(p==null){var g=n.map(Um).join(", "),m=s.map(Um).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(p,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),p=Um(R_e(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 "+p+"; status code: "+m.status,!0);if(m&&m.status>=400&&m.status<500)return r("failed loading "+p+"; 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 "+p+": "+Um(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 "+p+" 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,p=[],g=[];n.forEach(function(m){var y=u.options.addPath;typeof u.options.addPath=="function"&&(y=u.options.addPath(m,r));var S=O5(y,{lng:m,ns:r});if(S==null){f+=1,a&&f===n.length&&a(p,g);return}u.options.request(u.options,S,c,function(E,C){f+=1,p.push(E),g.push(C),f===n.length&&typeof a=="function"&&a(p,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(p){return f(p)}),c.forEach(function(p){n.allOptions.ns.forEach(function(g){s.read(p,g,"read",null,null,function(m,y){m&&a.warn("loading namespace ".concat(g," for language ").concat(p," failed"),m),!m&&y&&a.log("loaded namespace ".concat(g," for language ").concat(p),y),s.loaded("".concat(p,"|").concat(g),m,y)})})})}}}])})();PB.type="backend";pr.use(PB).use(_B).use(LEe).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 $_e=({authProvider:t,rootElementId:e="root"})=>{JJ(),xEe(),t.configure(),Ype(t);const n=CEe();$J(n);const r=new Sfe({queryCache:new qF({onError:Jpe}),mutationCache:new $F({onError:ege}),defaultOptions:{queries:{staleTime:3e4,gcTime:5*6e4,retry:1}}}),s=qxe(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;Npe.createRoot(o).render(D.jsx(A.StrictMode,{children:D.jsx(cB.Provider,{value:n,children:D.jsxs(Efe,{client:r,children:[D.jsx(Qpe,{value:t,children:D.jsx(a,{children:D.jsx(Ape,{router:s})})}),!1]})})}))};$_e({authProvider:Xde});export{Nfe as $,QZ as A,Km as B,KM as C,YX as D,sAe as E,eX as F,op as G,tr as H,rX as I,u_ as J,DF as K,GF as L,sX as M,Cfe as N,s8 as O,eAe as P,gfe as Q,z as R,aX as S,lX as T,_fe as U,Ife as V,Afe as W,gh as X,Tfe as Y,Ur as Z,IN as _,qn as a,sTe as a$,DL as a0,Rfe as a1,Mfe as a2,fs as a3,Wr as a4,Yhe as a5,RTe as a6,tR as a7,tTe as a8,Dwe as a9,TCe as aA,mTe as aB,HCe as aC,jCe as aD,bTe as aE,vTe as aF,gTe as aG,uTe as aH,d5 as aI,Lwe as aJ,b7 as aK,STe as aL,yTe as aM,OTe as aN,TTe as aO,ATe as aP,UTe as aQ,K_e as aR,BCe as aS,Ny as aT,OCe as aU,zl as aV,E7 as aW,xCe as aX,pB as aY,aCe as aZ,dCe as a_,Sx as aa,lAe as ab,xP as ac,ree as ad,y7 as ae,BEe as af,kTe as ag,FTe as ah,$Ae as ai,Pfe as aj,DCe as ak,Z6 as al,CTe as am,xTe as an,ETe as ao,lTe as ap,MCe as aq,NTe as ar,FCe as as,mB as at,_Te as au,ITe as av,wTe as aw,Wn as ax,cTe as ay,PCe as az,dn as b,zy as b$,rTe as b0,oTe as b1,iTe as b2,dTe as b3,rAe as b4,WAe as b5,DTe as b6,LTe as b7,qa as b8,nCe as b9,WU as bA,qAe as bB,XAe as bC,ACe as bD,JAe as bE,QAe as bF,EJ as bG,Q_e as bH,SJ as bI,eTe as bJ,nTe as bK,Cx as bL,PTe as bM,pTe as bN,kCe as bO,wh as bP,bfe as bQ,UF as bR,Og as bS,d9 as bT,No as bU,bT as bV,Ai as bW,Ioe as bX,Ti as bY,Eoe as bZ,c9 as b_,G8 as ba,xy as bb,zwe as bc,Y_e as bd,KA as be,x7 as bf,NCe as bg,iAe as bh,KAe as bi,GAe as bj,ZAe as bk,fd as bl,Pwe as bm,wr as bn,MTe as bo,fTe as bp,hTe as bq,dxe as br,VAe as bs,YAe as bt,zTe as bu,jTe as bv,aTe as bw,UJ as bx,tAe as by,LJ as bz,J6 as c,G9 as c0,Wre as c1,Poe as c2,Hoe as c3,Vre as c4,jre as c5,Dy as c6,nT as c7,s9 as c8,zoe as c9,Vy as cA,tp as cB,joe as cC,Jh as cD,Boe as cE,koe as cF,Doe as ca,Qre as cb,Ooe as cc,AT as cd,a9 as ce,Kre as cf,woe as cg,xoe as ch,mte as ci,nu as cj,ate as ck,ite as cl,tT as cm,Z9 as cn,Coe as co,cte as cp,Xre as cq,Toe as cr,rT as cs,_oe as ct,Woe as cu,tF as cv,V_e as cw,Qh as cx,nAe as cy,CT as cz,oP as d,JZ as e,KX as f,Hx as g,Z_e as h,r8 as i,D as j,OQ as k,iX as l,TJ as m,_J as n,J_e as o,X_e as p,MQ as q,A as r,eS as s,uX as t,kQ as u,K6 as v,t8 as w,q_e as x,W_e as y,oAe as z};