/*! For license information please see main.f65a015c.js.LICENSE.txt */
(()=>{var e={9359:(e,t,n)=>{"use strict";n.d(t,{W:()=>li});var r=n(9684),o=n(825);const i="AAD",a="OIDC",s="none";var c=n(4430);const l="client_info_decoding_error",u="client_info_empty_error",d="token_parsing_error",h="null_or_empty_token",p="endpoints_resolution_error",f="network_error",g="openid_config_error",m="hash_not_deserialized",v="invalid_state",y="state_mismatch",C="state_not_found",b="nonce_mismatch",w="auth_time_not_found",T="max_age_transpired",S="multiple_matching_tokens",k="multiple_matching_accounts",E="multiple_matching_appMetadata",A="request_cannot_be_made",I="cannot_remove_empty_scope",R="cannot_append_scopeset",_="empty_input_scopeset",N="device_code_polling_cancelled",O="device_code_expired",P="device_code_unknown_error",x="no_account_in_silent_request",M="invalid_cache_record",L="invalid_cache_environment",q="no_account_found",D="no_crypto_object",U="unexpected_credential_type",H="invalid_assertion",F="invalid_client_credential",B="token_refresh_required",K="user_timeout_reached",j="token_claims_cnf_required_for_signedjwt",z="authorization_code_missing_from_server_response",W="binding_key_not_removed",G="end_session_endpoint_not_supported",V="key_id_missing",Q="no_network_connectivity",Z="user_canceled",Y="missing_tenant_id_error",J="method_not_implemented",$="nested_app_auth_bridge_disabled",X={[l]:"The client info could not be parsed/decoded correctly",[u]:"The client info was empty",[d]:"Token cannot be parsed",[h]:"The token is null or empty",[p]:"Endpoints cannot be resolved",[f]:"Network request failed",[g]:"Could not retrieve endpoints. Check your authority and verify the .well-known/openid-configuration endpoint returns the required endpoints.",[m]:"The hash parameters could not be deserialized",[v]:"State was not the expected format",[y]:"State mismatch error",[C]:"State not found",[b]:"Nonce mismatch error",[w]:"Max Age was requested and the ID token is missing the auth_time variable. auth_time is an optional claim and is not enabled by default - it must be enabled. See https://aka.ms/msaljs/optional-claims for more information.",[T]:"Max Age is set to 0, or too much time has elapsed since the last end-user authentication.",[S]:"The cache contains multiple tokens satisfying the requirements. Call AcquireToken again providing more requirements such as authority or account.",[k]:"The cache contains multiple accounts satisfying the given parameters. Please pass more info to obtain the correct account",[E]:"The cache contains multiple appMetadata satisfying the given parameters. Please pass more info to obtain the correct appMetadata",[A]:"Token request cannot be made without authorization code or refresh token.",[I]:"Cannot remove null or empty scope from ScopeSet",[R]:"Cannot append ScopeSet",[_]:"Empty input ScopeSet cannot be processed",[N]:"Caller has cancelled token endpoint polling during device code flow by setting DeviceCodeRequest.cancel = true.",[O]:"Device code is expired.",[P]:"Device code stopped polling for unknown reasons.",[x]:"Please pass an account object, silent flow is not supported without account information",[M]:"Cache record object was null or undefined.",[L]:"Invalid environment when attempting to create cache entry",[q]:"No account found in cache for given key.",[D]:"No crypto object detected.",[U]:"Unexpected credential type.",[H]:"Client assertion must meet requirements described in https://tools.ietf.org/html/rfc7515",[F]:"Client credential (secret, certificate, or assertion) must not be empty when creating a confidential client. An application should at most have one credential",[B]:"Cannot return token from cache because it must be refreshed. This may be due to one of the following reasons: forceRefresh parameter is set to true, claims have been requested, there is no cached access token or it is expired.",[K]:"User defined timeout for device code polling reached",[j]:"Cannot generate a POP jwt if the token_claims are not populated",[z]:"Server response does not contain an authorization code to proceed",[W]:"Could not remove the credential's binding key from storage.",[G]:"The provided authority does not support logout",[V]:"A keyId value is missing from the requested bound token's cache record and is required to match the token to it's stored binding key.",[Q]:"No network connectivity. Check your internet connection.",[Z]:"User cancelled the flow.",[Y]:"A tenant id - not common, organizations, or consumers - must be specified when using the client_credentials flow.",[J]:"This method has not been implemented",[$]:"The nested app auth bridge is disabled"};class ee extends c.l4{constructor(e,t){super(e,t?"".concat(X[e],": ").concat(t):X[e]),this.name="ClientAuthError",Object.setPrototypeOf(this,ee.prototype)}}function te(e,t){return new ee(e,t)}const ne={createNewGuid:()=>{throw te(J)},base64Decode:()=>{throw te(J)},base64Encode:()=>{throw te(J)},base64UrlEncode:()=>{throw te(J)},encodeKid:()=>{throw te(J)},async getPublicKeyThumbprint(){throw te(J)},async removeTokenBindingKey(){throw te(J)},async clearKeystore(){throw te(J)},async signJwt(){throw te(J)},async hashString(){throw te(J)}},re="@azure/msal-common",oe="14.14.1";function ie(e,t){const n=function(e){if(!e)throw te(h);const t=/^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/.exec(e);if(!t||t.length<4)throw te(d);return t[2]}(e);try{const e=t(n);return JSON.parse(e)}catch(r){throw te(d)}}function ae(e,t){if(0===t||Date.now()-3e5>e+t)throw te(T)}function se(){return Math.round((new Date).getTime()/1e3)}function ce(e,t){const n=Number(e)||0;return se()+t>n}function le(e){return[ve(e),ye(e),Ce(e),be(e),we(e)].join(o.Bv.CACHE_KEY_SEPARATOR).toLowerCase()}function ue(e,t,n,r,i){return{credentialType:o.d3.ID_TOKEN,homeAccountId:e,environment:t,clientId:r,secret:n,realm:i}}function de(e,t,n,r,i,a,s,c,l,u,d,h,p,f,g){var m,v;const y={homeAccountId:e,credentialType:o.d3.ACCESS_TOKEN,secret:n,cachedAt:se().toString(),expiresOn:s.toString(),extendedExpiresOn:c.toString(),environment:t,clientId:r,realm:i,target:a,tokenType:d||o.hO.BEARER};if(h&&(y.userAssertionHash=h),u&&(y.refreshOn=u.toString()),f&&(y.requestedClaims=f,y.requestedClaimsHash=g),(null===(m=y.tokenType)||void 0===m?void 0:m.toLowerCase())!==o.hO.BEARER.toLowerCase())switch(y.credentialType=o.d3.ACCESS_TOKEN_WITH_AUTH_SCHEME,y.tokenType){case o.hO.POP:const e=ie(n,l);if(null===e||void 0===e||null===(v=e.cnf)||void 0===v||!v.kid)throw te(j);y.keyId=e.cnf.kid;break;case o.hO.SSH:y.keyId=p}return y}function he(e,t,n,r,i,a,s){const c={credentialType:o.d3.REFRESH_TOKEN,homeAccountId:e,environment:t,clientId:r,secret:n};return a&&(c.userAssertionHash=a),i&&(c.familyId=i),s&&(c.expiresOn=s.toString()),c}function pe(e){return e.hasOwnProperty("homeAccountId")&&e.hasOwnProperty("environment")&&e.hasOwnProperty("credentialType")&&e.hasOwnProperty("clientId")&&e.hasOwnProperty("secret")}function fe(e){return!!e&&(pe(e)&&e.hasOwnProperty("realm")&&e.hasOwnProperty("target")&&(e.credentialType===o.d3.ACCESS_TOKEN||e.credentialType===o.d3.ACCESS_TOKEN_WITH_AUTH_SCHEME))}function ge(e){return!!e&&(pe(e)&&e.hasOwnProperty("realm")&&e.credentialType===o.d3.ID_TOKEN)}function me(e){return!!e&&(pe(e)&&e.credentialType===o.d3.REFRESH_TOKEN)}function ve(e){return[e.homeAccountId,e.environment].join(o.Bv.CACHE_KEY_SEPARATOR).toLowerCase()}function ye(e){const t=e.credentialType===o.d3.REFRESH_TOKEN&&e.familyId||e.clientId;return[e.credentialType,t,e.realm||""].join(o.Bv.CACHE_KEY_SEPARATOR).toLowerCase()}function Ce(e){return(e.target||"").toLowerCase()}function be(e){return(e.requestedClaimsHash||"").toLowerCase()}function we(e){return e.tokenType&&e.tokenType.toLowerCase()!==o.hO.BEARER.toLowerCase()?e.tokenType.toLowerCase():""}function Te(){return se()+o.QU.REFRESH_TIME_SECONDS}function Se(e,t,n){e.authorization_endpoint=t.authorization_endpoint,e.token_endpoint=t.token_endpoint,e.end_session_endpoint=t.end_session_endpoint,e.issuer=t.issuer,e.endpointsFromNetwork=n,e.jwks_uri=t.jwks_uri}function ke(e,t,n){e.aliases=t.aliases,e.preferred_cache=t.preferred_cache,e.preferred_network=t.preferred_network,e.aliasesFromNetwork=n}function Ee(e){return e.expiresAt<=se()}const Ae="redirect_uri_empty",Ie="claims_request_parsing_error",Re="authority_uri_insecure",_e="url_parse_error",Ne="empty_url_error",Oe="empty_input_scopes_error",Pe="invalid_prompt_value",xe="invalid_claims",Me="token_request_empty",Le="logout_request_empty",qe="invalid_code_challenge_method",De="pkce_params_missing",Ue="invalid_cloud_discovery_metadata",He="invalid_authority_metadata",Fe="untrusted_authority",Be="missing_ssh_jwk",Ke="missing_ssh_kid",je="missing_nonce_authentication_header",ze="invalid_authentication_header",We="cannot_set_OIDCOptions",Ge="cannot_allow_native_broker",Ve="authority_mismatch",Qe={[Ae]:"A redirect URI is required for all calls, and none has been set.",[Ie]:"Could not parse the given claims request object.",[Re]:"Authority URIs must use https.  Please see here for valid authority configuration options: https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-js-initializing-client-applications#configuration-options",[_e]:"URL could not be parsed into appropriate segments.",[Ne]:"URL was empty or null.",[Oe]:"Scopes cannot be passed as null, undefined or empty array because they are required to obtain an access token.",[Pe]:"Please see here for valid configuration options: https://azuread.github.io/microsoft-authentication-library-for-js/ref/modules/_azure_msal_common.html#commonauthorizationurlrequest",[xe]:"Given claims parameter must be a stringified JSON object.",[Me]:"Token request was empty and not found in cache.",[Le]:"The logout request was null or undefined.",[qe]:'code_challenge_method passed is invalid. Valid values are "plain" and "S256".',[De]:"Both params: code_challenge and code_challenge_method are to be passed if to be sent in the request",[Ue]:"Invalid cloudDiscoveryMetadata provided. Must be a stringified JSON object containing tenant_discovery_endpoint and metadata fields",[He]:"Invalid authorityMetadata provided. Must by a stringified JSON object containing authorization_endpoint, token_endpoint, issuer fields.",[Fe]:"The provided authority is not a trusted authority. Please include this authority in the knownAuthorities config parameter.",[Be]:"Missing sshJwk in SSH certificate request. A stringified JSON Web Key is required when using the SSH authentication scheme.",[Ke]:"Missing sshKid in SSH certificate request. A string that uniquely identifies the public SSH key is required when using the SSH authentication scheme.",[je]:"Unable to find an authentication header containing server nonce. Either the Authentication-Info or WWW-Authenticate headers must be present in order to obtain a server nonce.",[ze]:"Invalid authentication header provided",[We]:"Cannot set OIDCOptions parameter. Please change the protocol mode to OIDC or use a non-Microsoft authority.",[Ge]:"Cannot set allowNativeBroker parameter to true when not in AAD protocol mode.",[Ve]:"Authority mismatch error. Authority provided in login request or PublicClientApplication config does not match the environment of the provided account. Please use a matching account or make an interactive request to login to this authority."};class Ze extends c.l4{constructor(e){super(e,Qe[e]),this.name="ClientConfigurationError",Object.setPrototypeOf(this,Ze.prototype)}}function Ye(e){return new Ze(e)}class Je{static isEmptyObj(e){if(e)try{const t=JSON.parse(e);return 0===Object.keys(t).length}catch(t){}return!0}static startsWith(e,t){return 0===e.indexOf(t)}static endsWith(e,t){return e.length>=t.length&&e.lastIndexOf(t)===e.length-t.length}static queryStringToObject(e){const t={},n=e.split("&"),r=e=>decodeURIComponent(e.replace(/\+/g," "));return n.forEach((e=>{if(e.trim()){const[n,o]=e.split(/=(.+)/g,2);n&&o&&(t[r(n)]=r(o))}})),t}static trimArrayEntries(e){return e.map((e=>e.trim()))}static removeEmptyStringsFromArray(e){return e.filter((e=>!!e))}static jsonParseHelper(e){try{return JSON.parse(e)}catch(t){return null}}static matchPattern(e,t){return new RegExp(e.replace(/\\/g,"\\\\").replace(/\*/g,"[^ ]*").replace(/\?/g,"\\?")).test(t)}}class $e{constructor(e){const t=e?Je.trimArrayEntries([...e]):[],n=t?Je.removeEmptyStringsFromArray(t):[];this.validateInputScopes(n),this.scopes=new Set,n.forEach((e=>this.scopes.add(e)))}static fromString(e){const t=(e||o.gT.EMPTY_STRING).split(" ");return new $e(t)}static createSearchScopes(e){const t=new $e(e);return t.containsOnlyOIDCScopes()?t.removeScope(o.gT.OFFLINE_ACCESS_SCOPE):t.removeOIDCScopes(),t}validateInputScopes(e){if(!e||e.length<1)throw Ye(Oe)}containsScope(e){const t=this.printScopesLowerCase().split(" "),n=new $e(t);return!!e&&n.scopes.has(e.toLowerCase())}containsScopeSet(e){return!(!e||e.scopes.size<=0)&&(this.scopes.size>=e.scopes.size&&e.asArray().every((e=>this.containsScope(e))))}containsOnlyOIDCScopes(){let e=0;return o.$f.forEach((t=>{this.containsScope(t)&&(e+=1)})),this.scopes.size===e}appendScope(e){e&&this.scopes.add(e.trim())}appendScopes(e){try{e.forEach((e=>this.appendScope(e)))}catch(t){throw te(R)}}removeScope(e){if(!e)throw te(I);this.scopes.delete(e.trim())}removeOIDCScopes(){o.$f.forEach((e=>{this.scopes.delete(e)}))}unionScopeSets(e){if(!e)throw te(_);const t=new Set;return e.scopes.forEach((e=>t.add(e.toLowerCase()))),this.scopes.forEach((e=>t.add(e.toLowerCase()))),t}intersectingScopeSets(e){if(!e)throw te(_);e.containsOnlyOIDCScopes()||e.removeOIDCScopes();const t=this.unionScopeSets(e),n=e.getScopeCount(),r=this.getScopeCount();return t.size<r+n}getScopeCount(){return this.scopes.size}asArray(){const e=[];return this.scopes.forEach((t=>e.push(t))),e}printScopes(){if(this.scopes){return this.asArray().join(" ")}return o.gT.EMPTY_STRING}printScopesLowerCase(){return this.printScopes().toLowerCase()}}function Xe(e,t){if(!e)throw te(u);try{const n=t(e);return JSON.parse(n)}catch(n){throw te(l)}}function et(e){if(!e)throw te(l);const t=e.split(o.Bv.CLIENT_INFO_SEPARATOR,2);return{uid:t[0],utid:t.length<2?o.gT.EMPTY_STRING:t[1]}}function tt(e,t){return!!e&&!!t&&e===t.split(".")[1]}function nt(e,t,n,r){if(r){const{oid:t,sub:n,tid:o,name:i,tfp:a,acr:s}=r,c=o||a||s||"";return{tenantId:c,localAccountId:t||n||"",name:i,isHomeTenant:tt(c,e)}}return{tenantId:n,localAccountId:t,isHomeTenant:tt(n,e)}}function rt(e,t,n,r){let o=e;if(t){const{isHomeTenant:n,...r}=t;o={...e,...r}}if(n){const{isHomeTenant:t,...i}=nt(e.homeAccountId,e.localAccountId,e.tenantId,n);return o={...o,...i,idTokenClaims:n,idToken:r},o}return o}const ot=0,it=1,at=2,st=3;function ct(e){if(e){return e.tid||e.tfp||e.acr||null}return null}class lt{generateAccountId(){return[this.homeAccountId,this.environment].join(o.Bv.CACHE_KEY_SEPARATOR).toLowerCase()}generateAccountKey(){return lt.generateAccountCacheKey({homeAccountId:this.homeAccountId,environment:this.environment,tenantId:this.realm,username:this.username,localAccountId:this.localAccountId})}getAccountInfo(){return{homeAccountId:this.homeAccountId,environment:this.environment,tenantId:this.realm,username:this.username,localAccountId:this.localAccountId,name:this.name,nativeAccountId:this.nativeAccountId,authorityType:this.authorityType,tenantProfiles:new Map((this.tenantProfiles||[]).map((e=>[e.tenantId,e])))}}isSingleTenant(){return!this.tenantProfiles}static generateAccountCacheKey(e){const t=e.homeAccountId.split(".")[1];return[e.homeAccountId,e.environment||"",t||e.tenantId||""].join(o.Bv.CACHE_KEY_SEPARATOR).toLowerCase()}static createAccount(e,t,n){var r,a,s,c,l,u,d,h;const p=new lt;let f;t.authorityType===it?p.authorityType=o.iR.ADFS_ACCOUNT_TYPE:t.protocolMode===i?p.authorityType=o.iR.MSSTS_ACCOUNT_TYPE:p.authorityType=o.iR.GENERIC_ACCOUNT_TYPE,e.clientInfo&&n&&(f=Xe(e.clientInfo,n)),p.clientInfo=e.clientInfo,p.homeAccountId=e.homeAccountId,p.nativeAccountId=e.nativeAccountId;const g=e.environment||t&&t.getPreferredCache();if(!g)throw te(L);p.environment=g,p.realm=(null===(r=f)||void 0===r?void 0:r.utid)||ct(e.idTokenClaims)||"",p.localAccountId=(null===(a=f)||void 0===a?void 0:a.uid)||(null===(s=e.idTokenClaims)||void 0===s?void 0:s.oid)||(null===(c=e.idTokenClaims)||void 0===c?void 0:c.sub)||"";const m=(null===(l=e.idTokenClaims)||void 0===l?void 0:l.preferred_username)||(null===(u=e.idTokenClaims)||void 0===u?void 0:u.upn),v=null!==(d=e.idTokenClaims)&&void 0!==d&&d.emails?e.idTokenClaims.emails[0]:null;if(p.username=m||v||"",p.name=(null===(h=e.idTokenClaims)||void 0===h?void 0:h.name)||"",p.cloudGraphHostName=e.cloudGraphHostName,p.msGraphHost=e.msGraphHost,e.tenantProfiles)p.tenantProfiles=e.tenantProfiles;else{const t=nt(e.homeAccountId,p.localAccountId,p.realm,e.idTokenClaims);p.tenantProfiles=[t]}return p}static createFromAccountInfo(e,t,n){var r;const i=new lt;return i.authorityType=e.authorityType||o.iR.GENERIC_ACCOUNT_TYPE,i.homeAccountId=e.homeAccountId,i.localAccountId=e.localAccountId,i.nativeAccountId=e.nativeAccountId,i.realm=e.tenantId,i.environment=e.environment,i.username=e.username,i.name=e.name,i.cloudGraphHostName=t,i.msGraphHost=n,i.tenantProfiles=Array.from((null===(r=e.tenantProfiles)||void 0===r?void 0:r.values())||[]),i}static generateHomeAccountId(e,t,n,r,o){if(t!==it&&t!==at){if(e)try{const t=Xe(e,r.base64Decode);if(t.uid&&t.utid)return"".concat(t.uid,".").concat(t.utid)}catch(i){}n.warning("No client info in response")}return(null===o||void 0===o?void 0:o.sub)||""}static isAccountEntity(e){return!!e&&(e.hasOwnProperty("homeAccountId")&&e.hasOwnProperty("environment")&&e.hasOwnProperty("realm")&&e.hasOwnProperty("localAccountId")&&e.hasOwnProperty("username")&&e.hasOwnProperty("authorityType"))}static accountInfoIsEqual(e,t,n){if(!e||!t)return!1;let r=!0;if(n){const n=e.idTokenClaims||{},o=t.idTokenClaims||{};r=n.iat===o.iat&&n.nonce===o.nonce}return e.homeAccountId===t.homeAccountId&&e.localAccountId===t.localAccountId&&e.username===t.username&&e.tenantId===t.tenantId&&e.environment===t.environment&&e.nativeAccountId===t.nativeAccountId&&r}}function ut(e){return e.startsWith("#/")?e.substring(2):e.startsWith("#")||e.startsWith("?")?e.substring(1):e}function dt(e){if(!e||e.indexOf("=")<0)return null;try{const t=ut(e),n=Object.fromEntries(new URLSearchParams(t));if(n.code||n.error||n.error_description||n.state)return n}catch(t){throw te(m)}return null}class ht{get urlString(){return this._urlString}constructor(e){if(this._urlString=e,!this._urlString)throw Ye(Ne);e.includes("#")||(this._urlString=ht.canonicalizeUri(e))}static canonicalizeUri(e){if(e){let t=e.toLowerCase();return Je.endsWith(t,"?")?t=t.slice(0,-1):Je.endsWith(t,"?/")&&(t=t.slice(0,-2)),Je.endsWith(t,"/")||(t+="/"),t}return e}validateAsUri(){let e;try{e=this.getUrlComponents()}catch(t){throw Ye(_e)}if(!e.HostNameAndPort||!e.PathSegments)throw Ye(_e);if(!e.Protocol||"https:"!==e.Protocol.toLowerCase())throw Ye(Re)}static appendQueryString(e,t){return t?e.indexOf("?")<0?"".concat(e,"?").concat(t):"".concat(e,"&").concat(t):e}static removeHashFromUrl(e){return ht.canonicalizeUri(e.split("#")[0])}replaceTenantPath(e){const t=this.getUrlComponents(),n=t.PathSegments;return!e||0===n.length||n[0]!==o.Nb.COMMON&&n[0]!==o.Nb.ORGANIZATIONS||(n[0]=e),ht.constructAuthorityUriFromObject(t)}getUrlComponents(){const e=RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?"),t=this.urlString.match(e);if(!t)throw Ye(_e);const n={Protocol:t[1],HostNameAndPort:t[4],AbsolutePath:t[5],QueryString:t[7]};let r=n.AbsolutePath.split("/");return r=r.filter((e=>e&&e.length>0)),n.PathSegments=r,n.QueryString&&n.QueryString.endsWith("/")&&(n.QueryString=n.QueryString.substring(0,n.QueryString.length-1)),n}static getDomainFromUrl(e){const t=RegExp("^([^:/?#]+://)?([^/?#]*)"),n=e.match(t);if(!n)throw Ye(_e);return n[2]}static getAbsoluteUrl(e,t){if(e[0]===o.gT.FORWARD_SLASH){const n=new ht(t).getUrlComponents();return n.Protocol+"//"+n.HostNameAndPort+e}return e}static constructAuthorityUriFromObject(e){return new ht(e.Protocol+"//"+e.HostNameAndPort+"/"+e.PathSegments.join("/"))}static hashContainsKnownProperties(e){return!!dt(e)}}const pt={"login.microsoftonline.com":{token_endpoint:"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/token",jwks_uri:"https://login.microsoftonline.com/{tenantid}/discovery/v2.0/keys",issuer:"https://login.microsoftonline.com/{tenantid}/v2.0",authorization_endpoint:"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/authorize",end_session_endpoint:"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/logout"},"login.chinacloudapi.cn":{token_endpoint:"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/token",jwks_uri:"https://login.chinacloudapi.cn/{tenantid}/discovery/v2.0/keys",issuer:"https://login.partner.microsoftonline.cn/{tenantid}/v2.0",authorization_endpoint:"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/authorize",end_session_endpoint:"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/logout"},"login.microsoftonline.us":{token_endpoint:"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/token",jwks_uri:"https://login.microsoftonline.us/{tenantid}/discovery/v2.0/keys",issuer:"https://login.microsoftonline.us/{tenantid}/v2.0",authorization_endpoint:"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/authorize",end_session_endpoint:"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/logout"}},ft={tenant_discovery_endpoint:"https://{canonicalAuthority}/v2.0/.well-known/openid-configuration",metadata:[{preferred_network:"login.microsoftonline.com",preferred_cache:"login.windows.net",aliases:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{preferred_network:"login.partner.microsoftonline.cn",preferred_cache:"login.partner.microsoftonline.cn",aliases:["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{preferred_network:"login.microsoftonline.de",preferred_cache:"login.microsoftonline.de",aliases:["login.microsoftonline.de"]},{preferred_network:"login.microsoftonline.us",preferred_cache:"login.microsoftonline.us",aliases:["login.microsoftonline.us","login.usgovcloudapi.net"]},{preferred_network:"login-us.microsoftonline.com",preferred_cache:"login-us.microsoftonline.com",aliases:["login-us.microsoftonline.com"]}]},gt=new Set;function mt(e,t,n,r){if(null===r||void 0===r||r.trace("getAliasesFromMetadata called with source: ".concat(n)),e&&t){const o=vt(t,e);if(o)return null===r||void 0===r||r.trace("getAliasesFromMetadata: found cloud discovery metadata in ".concat(n,", returning aliases")),o.aliases;null===r||void 0===r||r.trace("getAliasesFromMetadata: did not find cloud discovery metadata in ".concat(n))}return null}function vt(e,t){for(let n=0;n<e.length;n++){const r=e[n];if(r.aliases.includes(t))return r}return null}ft.metadata.forEach((e=>{e.aliases.forEach((e=>{gt.add(e)}))}));const yt="cache_quota_exceeded",Ct="cache_error_unknown",bt={[yt]:"Exceeded cache storage capacity.",[Ct]:"Unexpected error occurred when using cache storage."};class wt extends Error{constructor(e,t){const n=t||(bt[e]?bt[e]:bt[Ct]);super("".concat(e,": ").concat(n)),Object.setPrototypeOf(this,wt.prototype),this.name="CacheError",this.errorCode=e,this.errorMessage=n}}class Tt{constructor(e,t,n,r){this.clientId=e,this.cryptoImpl=t,this.commonLogger=n.clone(re,oe),this.staticAuthorityOptions=r}getAllAccounts(e){return this.buildTenantProfiles(this.getAccountsFilteredBy(e||{}),e)}getAccountInfoFilteredBy(e){const t=this.getAllAccounts(e);if(t.length>1){return t.sort((e=>e.idTokenClaims?-1:1))[0]}return 1===t.length?t[0]:null}getBaseAccountInfo(e){const t=this.getAccountsFilteredBy(e);return t.length>0?t[0].getAccountInfo():null}buildTenantProfiles(e,t){return e.flatMap((e=>this.getTenantProfilesFromAccountEntity(e,null===t||void 0===t?void 0:t.tenantId,t)))}getTenantedAccountInfoByFilter(e,t,n,r){let o,i=null;if(r&&!this.tenantProfileMatchesFilter(n,r))return null;const a=this.getIdToken(e,t,n.tenantId);return a&&(o=ie(a.secret,this.cryptoImpl.base64Decode),!this.idTokenClaimsMatchTenantProfileFilter(o,r))?null:(i=rt(e,n,o,null===a||void 0===a?void 0:a.secret),i)}getTenantProfilesFromAccountEntity(e,t,n){const r=e.getAccountInfo();let o=r.tenantProfiles||new Map;const i=this.getTokenKeys();if(t){const e=o.get(t);if(!e)return[];o=new Map([[t,e]])}const a=[];return o.forEach((e=>{const t=this.getTenantedAccountInfoByFilter(r,i,e,n);t&&a.push(t)})),a}tenantProfileMatchesFilter(e,t){return!(t.localAccountId&&!this.matchLocalAccountIdFromTenantProfile(e,t.localAccountId))&&((!t.name||e.name===t.name)&&(void 0===t.isHomeTenant||e.isHomeTenant===t.isHomeTenant))}idTokenClaimsMatchTenantProfileFilter(e,t){if(t){if(t.localAccountId&&!this.matchLocalAccountIdFromTokenClaims(e,t.localAccountId))return!1;if(t.loginHint&&!this.matchLoginHintFromTokenClaims(e,t.loginHint))return!1;if(t.username&&!this.matchUsername(e.preferred_username,t.username))return!1;if(t.name&&!this.matchName(e,t.name))return!1;if(t.sid&&!this.matchSid(e,t.sid))return!1}return!0}async saveCacheRecord(e,t,n){if(!e)throw te(M);try{e.account&&this.setAccount(e.account),e.idToken&&!1!==(null===t||void 0===t?void 0:t.idToken)&&this.setIdTokenCredential(e.idToken),e.accessToken&&!1!==(null===t||void 0===t?void 0:t.accessToken)&&await this.saveAccessToken(e.accessToken),e.refreshToken&&!1!==(null===t||void 0===t?void 0:t.refreshToken)&&this.setRefreshTokenCredential(e.refreshToken),e.appMetadata&&this.setAppMetadata(e.appMetadata)}catch(s){var r,o;if(null===(r=this.commonLogger)||void 0===r||r.error("CacheManager.saveCacheRecord: failed"),s instanceof Error){var i,a;if(null===(i=this.commonLogger)||void 0===i||i.errorPii("CacheManager.saveCacheRecord: ".concat(s.message),n),"QuotaExceededError"===s.name||"NS_ERROR_DOM_QUOTA_REACHED"===s.name||s.message.includes("exceeded the quota"))throw null===(a=this.commonLogger)||void 0===a||a.error("CacheManager.saveCacheRecord: exceeded storage quota",n),new wt(yt);throw new wt(s.name,s.message)}throw null===(o=this.commonLogger)||void 0===o||o.errorPii("CacheManager.saveCacheRecord: ".concat(s),n),new wt(Ct)}}async saveAccessToken(e){const t={clientId:e.clientId,credentialType:e.credentialType,environment:e.environment,homeAccountId:e.homeAccountId,realm:e.realm,tokenType:e.tokenType,requestedClaimsHash:e.requestedClaimsHash},n=this.getTokenKeys(),r=$e.fromString(e.target),o=[];n.accessToken.forEach((e=>{if(!this.accessTokenKeyMatchesFilter(e,t,!1))return;const n=this.getAccessTokenCredential(e);if(n&&this.credentialMatchesFilter(n,t)){$e.fromString(n.target).intersectingScopeSets(r)&&o.push(this.removeAccessToken(e))}})),await Promise.all(o),this.setAccessTokenCredential(e)}getAccountsFilteredBy(e){const t=this.getAccountKeys(),n=[];return t.forEach((t=>{var r;if(!this.isAccountKey(t,e.homeAccountId))return;const o=this.getAccount(t,this.commonLogger);if(!o)return;if(e.homeAccountId&&!this.matchHomeAccountId(o,e.homeAccountId))return;if(e.username&&!this.matchUsername(o.username,e.username))return;if(e.environment&&!this.matchEnvironment(o,e.environment))return;if(e.realm&&!this.matchRealm(o,e.realm))return;if(e.nativeAccountId&&!this.matchNativeAccountId(o,e.nativeAccountId))return;if(e.authorityType&&!this.matchAuthorityType(o,e.authorityType))return;const i={localAccountId:null===e||void 0===e?void 0:e.localAccountId,name:null===e||void 0===e?void 0:e.name},a=null===(r=o.tenantProfiles)||void 0===r?void 0:r.filter((e=>this.tenantProfileMatchesFilter(e,i)));a&&0===a.length||n.push(o)})),n}isAccountKey(e,t,n){return!(e.split(o.Bv.CACHE_KEY_SEPARATOR).length<3)&&(!(t&&!e.toLowerCase().includes(t.toLowerCase()))&&!(n&&!e.toLowerCase().includes(n.toLowerCase())))}isCredentialKey(e){if(e.split(o.Bv.CACHE_KEY_SEPARATOR).length<6)return!1;const t=e.toLowerCase();if(-1===t.indexOf(o.d3.ID_TOKEN.toLowerCase())&&-1===t.indexOf(o.d3.ACCESS_TOKEN.toLowerCase())&&-1===t.indexOf(o.d3.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase())&&-1===t.indexOf(o.d3.REFRESH_TOKEN.toLowerCase()))return!1;if(t.indexOf(o.d3.REFRESH_TOKEN.toLowerCase())>-1){const e="".concat(o.d3.REFRESH_TOKEN).concat(o.Bv.CACHE_KEY_SEPARATOR).concat(this.clientId).concat(o.Bv.CACHE_KEY_SEPARATOR),n="".concat(o.d3.REFRESH_TOKEN).concat(o.Bv.CACHE_KEY_SEPARATOR).concat(o.ch).concat(o.Bv.CACHE_KEY_SEPARATOR);if(-1===t.indexOf(e.toLowerCase())&&-1===t.indexOf(n.toLowerCase()))return!1}else if(-1===t.indexOf(this.clientId.toLowerCase()))return!1;return!0}credentialMatchesFilter(e,t){if(t.clientId&&!this.matchClientId(e,t.clientId))return!1;if(t.userAssertionHash&&!this.matchUserAssertionHash(e,t.userAssertionHash))return!1;if("string"===typeof t.homeAccountId&&!this.matchHomeAccountId(e,t.homeAccountId))return!1;if(t.environment&&!this.matchEnvironment(e,t.environment))return!1;if(t.realm&&!this.matchRealm(e,t.realm))return!1;if(t.credentialType&&!this.matchCredentialType(e,t.credentialType))return!1;if(t.familyId&&!this.matchFamilyId(e,t.familyId))return!1;if(t.target&&!this.matchTarget(e,t.target))return!1;if((t.requestedClaimsHash||e.requestedClaimsHash)&&e.requestedClaimsHash!==t.requestedClaimsHash)return!1;if(e.credentialType===o.d3.ACCESS_TOKEN_WITH_AUTH_SCHEME){if(t.tokenType&&!this.matchTokenType(e,t.tokenType))return!1;if(t.tokenType===o.hO.SSH&&t.keyId&&!this.matchKeyId(e,t.keyId))return!1}return!0}getAppMetadataFilteredBy(e){const t=this.getKeys(),n={};return t.forEach((t=>{if(!this.isAppMetadata(t))return;const r=this.getAppMetadata(t);r&&(e.environment&&!this.matchEnvironment(r,e.environment)||e.clientId&&!this.matchClientId(r,e.clientId)||(n[t]=r))})),n}getAuthorityMetadataByAlias(e){const t=this.getAuthorityMetadataKeys();let n=null;return t.forEach((t=>{if(!this.isAuthorityMetadata(t)||-1===t.indexOf(this.clientId))return;const r=this.getAuthorityMetadata(t);r&&-1!==r.aliases.indexOf(e)&&(n=r)})),n}async removeAllAccounts(){const e=this.getAccountKeys(),t=[];e.forEach((e=>{t.push(this.removeAccount(e))})),await Promise.all(t)}async removeAccount(e){const t=this.getAccount(e,this.commonLogger);t&&(await this.removeAccountContext(t),this.removeItem(e))}async removeAccountContext(e){const t=this.getTokenKeys(),n=e.generateAccountId(),r=[];t.idToken.forEach((e=>{0===e.indexOf(n)&&this.removeIdToken(e)})),t.accessToken.forEach((e=>{0===e.indexOf(n)&&r.push(this.removeAccessToken(e))})),t.refreshToken.forEach((e=>{0===e.indexOf(n)&&this.removeRefreshToken(e)})),await Promise.all(r)}updateOutdatedCachedAccount(e,t,n){if(t&&t.isSingleTenant()){var r;null===(r=this.commonLogger)||void 0===r||r.verbose("updateOutdatedCachedAccount: Found a single-tenant (outdated) account entity in the cache, migrating to multi-tenant account entity");const o=this.getAccountKeys().filter((e=>e.startsWith(t.homeAccountId))),i=[];o.forEach((e=>{const t=this.getCachedAccountEntity(e);t&&i.push(t)}));const a=i.find((e=>tt(e.realm,e.homeAccountId)))||i[0];a.tenantProfiles=i.map((e=>({tenantId:e.realm,localAccountId:e.localAccountId,name:e.name,isHomeTenant:tt(e.realm,e.homeAccountId)})));const s=Tt.toObject(new lt,{...a}),c=s.generateAccountKey();return o.forEach((t=>{t!==c&&this.removeOutdatedAccount(e)})),this.setAccount(s),null===n||void 0===n||n.verbose("Updated an outdated account entity in the cache"),s}return t}async removeAccessToken(e){const t=this.getAccessTokenCredential(e);if(t){if(t.credentialType.toLowerCase()===o.d3.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase()&&t.tokenType===o.hO.POP){const e=t.keyId;if(e)try{await this.cryptoImpl.removeTokenBindingKey(e)}catch(n){throw te(W)}}return this.removeItem(e)}}removeAppMetadata(){return this.getKeys().forEach((e=>{this.isAppMetadata(e)&&this.removeItem(e)})),!0}readAccountFromCache(e){const t=lt.generateAccountCacheKey(e);return this.getAccount(t,this.commonLogger)}getIdToken(e,t,n,r,i){this.commonLogger.trace("CacheManager - getIdToken called");const a={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:o.d3.ID_TOKEN,clientId:this.clientId,realm:n},s=this.getIdTokensByFilter(a,t),c=s.size;if(c<1)return this.commonLogger.info("CacheManager:getIdToken - No token found"),null;if(c>1){let t=s;if(!n){const n=new Map;s.forEach(((t,r)=>{t.realm===e.tenantId&&n.set(r,t)}));const r=n.size;if(r<1)return this.commonLogger.info("CacheManager:getIdToken - Multiple ID tokens found for account but none match account entity tenant id, returning first result"),s.values().next().value;if(1===r)return this.commonLogger.info("CacheManager:getIdToken - Multiple ID tokens found for account, defaulting to home tenant profile"),n.values().next().value;t=n}return this.commonLogger.info("CacheManager:getIdToken - Multiple matching ID tokens found, clearing them"),t.forEach(((e,t)=>{this.removeIdToken(t)})),r&&i&&r.addFields({multiMatchedID:s.size},i),null}return this.commonLogger.info("CacheManager:getIdToken - Returning ID token"),s.values().next().value}getIdTokensByFilter(e,t){const n=t&&t.idToken||this.getTokenKeys().idToken,r=new Map;return n.forEach((t=>{if(!this.idTokenKeyMatchesFilter(t,{clientId:this.clientId,...e}))return;const n=this.getIdTokenCredential(t);n&&this.credentialMatchesFilter(n,e)&&r.set(t,n)})),r}idTokenKeyMatchesFilter(e,t){const n=e.toLowerCase();return(!t.clientId||-1!==n.indexOf(t.clientId.toLowerCase()))&&(!t.homeAccountId||-1!==n.indexOf(t.homeAccountId.toLowerCase()))}removeIdToken(e){this.removeItem(e)}removeRefreshToken(e){this.removeItem(e)}getAccessToken(e,t,n,r,i,a){this.commonLogger.trace("CacheManager - getAccessToken called");const s=$e.createSearchScopes(t.scopes),c=t.authenticationScheme||o.hO.BEARER,l=c&&c.toLowerCase()!==o.hO.BEARER.toLowerCase()?o.d3.ACCESS_TOKEN_WITH_AUTH_SCHEME:o.d3.ACCESS_TOKEN,u={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:l,clientId:this.clientId,realm:r||e.tenantId,target:s,tokenType:c,keyId:t.sshKid,requestedClaimsHash:t.requestedClaimsHash},d=n&&n.accessToken||this.getTokenKeys().accessToken,h=[];d.forEach((e=>{if(this.accessTokenKeyMatchesFilter(e,u,!0)){const t=this.getAccessTokenCredential(e);t&&this.credentialMatchesFilter(t,u)&&h.push(t)}}));const p=h.length;return p<1?(this.commonLogger.info("CacheManager:getAccessToken - No token found"),null):p>1?(this.commonLogger.info("CacheManager:getAccessToken - Multiple access tokens found, clearing them"),h.forEach((e=>{this.removeAccessToken(le(e))})),i&&a&&i.addFields({multiMatchedAT:h.length},a),null):(this.commonLogger.info("CacheManager:getAccessToken - Returning access token"),h[0])}accessTokenKeyMatchesFilter(e,t,n){const r=e.toLowerCase();if(t.clientId&&-1===r.indexOf(t.clientId.toLowerCase()))return!1;if(t.homeAccountId&&-1===r.indexOf(t.homeAccountId.toLowerCase()))return!1;if(t.realm&&-1===r.indexOf(t.realm.toLowerCase()))return!1;if(t.requestedClaimsHash&&-1===r.indexOf(t.requestedClaimsHash.toLowerCase()))return!1;if(t.target){const e=t.target.asArray();for(let t=0;t<e.length;t++){if(n&&!r.includes(e[t].toLowerCase()))return!1;if(!n&&r.includes(e[t].toLowerCase()))return!0}}return!0}getAccessTokensByFilter(e){const t=this.getTokenKeys(),n=[];return t.accessToken.forEach((t=>{if(!this.accessTokenKeyMatchesFilter(t,e,!0))return;const r=this.getAccessTokenCredential(t);r&&this.credentialMatchesFilter(r,e)&&n.push(r)})),n}getRefreshToken(e,t,n,r,i){this.commonLogger.trace("CacheManager - getRefreshToken called");const a=t?o.ch:void 0,s={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:o.d3.REFRESH_TOKEN,clientId:this.clientId,familyId:a},c=n&&n.refreshToken||this.getTokenKeys().refreshToken,l=[];c.forEach((e=>{if(this.refreshTokenKeyMatchesFilter(e,s)){const t=this.getRefreshTokenCredential(e);t&&this.credentialMatchesFilter(t,s)&&l.push(t)}}));const u=l.length;return u<1?(this.commonLogger.info("CacheManager:getRefreshToken - No refresh token found."),null):(u>1&&r&&i&&r.addFields({multiMatchedRT:u},i),this.commonLogger.info("CacheManager:getRefreshToken - returning refresh token"),l[0])}refreshTokenKeyMatchesFilter(e,t){const n=e.toLowerCase();return(!t.familyId||-1!==n.indexOf(t.familyId.toLowerCase()))&&(!(!t.familyId&&t.clientId&&-1===n.indexOf(t.clientId.toLowerCase()))&&(!t.homeAccountId||-1!==n.indexOf(t.homeAccountId.toLowerCase())))}readAppMetadataFromCache(e){const t={environment:e,clientId:this.clientId},n=this.getAppMetadataFilteredBy(t),r=Object.keys(n).map((e=>n[e])),o=r.length;if(o<1)return null;if(o>1)throw te(E);return r[0]}isAppMetadataFOCI(e){const t=this.readAppMetadataFromCache(e);return!(!t||t.familyId!==o.ch)}matchHomeAccountId(e,t){return!("string"!==typeof e.homeAccountId||t!==e.homeAccountId)}matchLocalAccountIdFromTokenClaims(e,t){return t===(e.oid||e.sub)}matchLocalAccountIdFromTenantProfile(e,t){return e.localAccountId===t}matchName(e,t){var n;return!(t.toLowerCase()!==(null===(n=e.name)||void 0===n?void 0:n.toLowerCase()))}matchUsername(e,t){return!(!e||"string"!==typeof e||(null===t||void 0===t?void 0:t.toLowerCase())!==e.toLowerCase())}matchUserAssertionHash(e,t){return!(!e.userAssertionHash||t!==e.userAssertionHash)}matchEnvironment(e,t){if(this.staticAuthorityOptions){const n=function(e,t){let n;const r=e.canonicalAuthority;if(r){var i;const a=new ht(r).getUrlComponents().HostNameAndPort;n=mt(a,null===(i=e.cloudDiscoveryMetadata)||void 0===i?void 0:i.metadata,o.pQ.CONFIG,t)||mt(a,ft.metadata,o.pQ.HARDCODED_VALUES,t)||e.knownAuthorities}return n||[]}(this.staticAuthorityOptions,this.commonLogger);if(n.includes(t)&&n.includes(e.environment))return!0}const n=this.getAuthorityMetadataByAlias(t);return!!(n&&n.aliases.indexOf(e.environment)>-1)}matchCredentialType(e,t){return e.credentialType&&t.toLowerCase()===e.credentialType.toLowerCase()}matchClientId(e,t){return!(!e.clientId||t!==e.clientId)}matchFamilyId(e,t){return!(!e.familyId||t!==e.familyId)}matchRealm(e,t){var n;return!((null===(n=e.realm)||void 0===n?void 0:n.toLowerCase())!==t.toLowerCase())}matchNativeAccountId(e,t){return!(!e.nativeAccountId||t!==e.nativeAccountId)}matchLoginHintFromTokenClaims(e,t){return e.login_hint===t||(e.preferred_username===t||e.upn===t)}matchSid(e,t){return e.sid===t}matchAuthorityType(e,t){return!(!e.authorityType||t.toLowerCase()!==e.authorityType.toLowerCase())}matchTarget(e,t){if(e.credentialType!==o.d3.ACCESS_TOKEN&&e.credentialType!==o.d3.ACCESS_TOKEN_WITH_AUTH_SCHEME||!e.target)return!1;return $e.fromString(e.target).containsScopeSet(t)}matchTokenType(e,t){return!(!e.tokenType||e.tokenType!==t)}matchKeyId(e,t){return!(!e.keyId||e.keyId!==t)}isAppMetadata(e){return-1!==e.indexOf(o.dg)}isAuthorityMetadata(e){return-1!==e.indexOf(o.QU.CACHE_KEY)}generateAuthorityMetadataCacheKey(e){return"".concat(o.QU.CACHE_KEY,"-").concat(this.clientId,"-").concat(e)}static toObject(e,t){for(const n in t)e[n]=t[n];return e}}class St extends Tt{setAccount(){throw te(J)}getAccount(){throw te(J)}getCachedAccountEntity(){throw te(J)}setIdTokenCredential(){throw te(J)}getIdTokenCredential(){throw te(J)}setAccessTokenCredential(){throw te(J)}getAccessTokenCredential(){throw te(J)}setRefreshTokenCredential(){throw te(J)}getRefreshTokenCredential(){throw te(J)}setAppMetadata(){throw te(J)}getAppMetadata(){throw te(J)}setServerTelemetry(){throw te(J)}getServerTelemetry(){throw te(J)}setAuthorityMetadata(){throw te(J)}getAuthorityMetadata(){throw te(J)}getAuthorityMetadataKeys(){throw te(J)}setThrottlingCache(){throw te(J)}getThrottlingCache(){throw te(J)}removeItem(){throw te(J)}getKeys(){throw te(J)}getAccountKeys(){throw te(J)}getTokenKeys(){throw te(J)}async clear(){throw te(J)}updateCredentialCacheKey(){throw te(J)}removeOutdatedAccount(){throw te(J)}}const kt={tokenRenewalOffsetSeconds:o.$A,preventCorsPreflight:!1},Et={loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:r.i.Info,correlationId:o.gT.EMPTY_STRING},At={claimsBasedCachingEnabled:!1},It={async sendGetRequestAsync(){throw te(J)},async sendPostRequestAsync(){throw te(J)}},Rt={sku:o.gT.SKU,version:oe,cpu:o.gT.EMPTY_STRING,os:o.gT.EMPTY_STRING},_t={clientSecret:o.gT.EMPTY_STRING,clientAssertion:void 0},Nt={azureCloudInstance:s,tenant:"".concat(o.gT.DEFAULT_COMMON_TENANT)},Ot={application:{appName:"",appVersion:""}};function Pt(e){return e.authOptions.authority.options.protocolMode===a}const xt={sendGetRequestAsync:()=>Promise.reject(te(J)),sendPostRequestAsync:()=>Promise.reject(te(J))},Mt={AcquireTokenByCode:"acquireTokenByCode",AcquireTokenByRefreshToken:"acquireTokenByRefreshToken",AcquireTokenSilent:"acquireTokenSilent",AcquireTokenSilentAsync:"acquireTokenSilentAsync",AcquireTokenPopup:"acquireTokenPopup",AcquireTokenPreRedirect:"acquireTokenPreRedirect",AcquireTokenRedirect:"acquireTokenRedirect",CryptoOptsGetPublicKeyThumbprint:"cryptoOptsGetPublicKeyThumbprint",CryptoOptsSignJwt:"cryptoOptsSignJwt",SilentCacheClientAcquireToken:"silentCacheClientAcquireToken",SilentIframeClientAcquireToken:"silentIframeClientAcquireToken",AwaitConcurrentIframe:"awaitConcurrentIframe",SilentRefreshClientAcquireToken:"silentRefreshClientAcquireToken",SsoSilent:"ssoSilent",StandardInteractionClientGetDiscoveredAuthority:"standardInteractionClientGetDiscoveredAuthority",FetchAccountIdWithNativeBroker:"fetchAccountIdWithNativeBroker",NativeInteractionClientAcquireToken:"nativeInteractionClientAcquireToken",BaseClientCreateTokenRequestHeaders:"baseClientCreateTokenRequestHeaders",RefreshTokenClientExecutePostToTokenEndpoint:"refreshTokenClientExecutePostToTokenEndpoint",AuthorizationCodeClientExecutePostToTokenEndpoint:"authorizationCodeClientExecutePostToTokenEndpoint",BrokerHandhshake:"brokerHandshake",AcquireTokenByRefreshTokenInBroker:"acquireTokenByRefreshTokenInBroker",AcquireTokenByBroker:"acquireTokenByBroker",RefreshTokenClientExecuteTokenRequest:"refreshTokenClientExecuteTokenRequest",RefreshTokenClientAcquireToken:"refreshTokenClientAcquireToken",RefreshTokenClientAcquireTokenWithCachedRefreshToken:"refreshTokenClientAcquireTokenWithCachedRefreshToken",RefreshTokenClientAcquireTokenByRefreshToken:"refreshTokenClientAcquireTokenByRefreshToken",RefreshTokenClientCreateTokenRequestBody:"refreshTokenClientCreateTokenRequestBody",AcquireTokenFromCache:"acquireTokenFromCache",SilentFlowClientAcquireCachedToken:"silentFlowClientAcquireCachedToken",SilentFlowClientGenerateResultFromCacheRecord:"silentFlowClientGenerateResultFromCacheRecord",AcquireTokenBySilentIframe:"acquireTokenBySilentIframe",InitializeBaseRequest:"initializeBaseRequest",InitializeSilentRequest:"initializeSilentRequest",InitializeClientApplication:"initializeClientApplication",PopupClientTokenHelper:"popupClientTokenHelper",SilentIframeClientTokenHelper:"silentIframeClientTokenHelper",SilentHandlerInitiateAuthRequest:"silentHandlerInitiateAuthRequest",SilentHandlerMonitorIframeForHash:"silentHandlerMonitorIframeForHash",SilentHandlerLoadFrame:"silentHandlerLoadFrame",SilentHandlerLoadFrameSync:"silentHandlerLoadFrameSync",StandardInteractionClientCreateAuthCodeClient:"standardInteractionClientCreateAuthCodeClient",StandardInteractionClientGetClientConfiguration:"standardInteractionClientGetClientConfiguration",StandardInteractionClientInitializeAuthorizationRequest:"standardInteractionClientInitializeAuthorizationRequest",StandardInteractionClientInitializeAuthorizationCodeRequest:"standardInteractionClientInitializeAuthorizationCodeRequest",GetAuthCodeUrl:"getAuthCodeUrl",HandleCodeResponseFromServer:"handleCodeResponseFromServer",HandleCodeResponse:"handleCodeResponse",UpdateTokenEndpointAuthority:"updateTokenEndpointAuthority",AuthClientAcquireToken:"authClientAcquireToken",AuthClientExecuteTokenRequest:"authClientExecuteTokenRequest",AuthClientCreateTokenRequestBody:"authClientCreateTokenRequestBody",AuthClientCreateQueryString:"authClientCreateQueryString",PopTokenGenerateCnf:"popTokenGenerateCnf",PopTokenGenerateKid:"popTokenGenerateKid",HandleServerTokenResponse:"handleServerTokenResponse",DeserializeResponse:"deserializeResponse",AuthorityFactoryCreateDiscoveredInstance:"authorityFactoryCreateDiscoveredInstance",AuthorityResolveEndpointsAsync:"authorityResolveEndpointsAsync",AuthorityResolveEndpointsFromLocalSources:"authorityResolveEndpointsFromLocalSources",AuthorityGetCloudDiscoveryMetadataFromNetwork:"authorityGetCloudDiscoveryMetadataFromNetwork",AuthorityUpdateCloudDiscoveryMetadata:"authorityUpdateCloudDiscoveryMetadata",AuthorityGetEndpointMetadataFromNetwork:"authorityGetEndpointMetadataFromNetwork",AuthorityUpdateEndpointMetadata:"authorityUpdateEndpointMetadata",AuthorityUpdateMetadataWithRegionalInformation:"authorityUpdateMetadataWithRegionalInformation",RegionDiscoveryDetectRegion:"regionDiscoveryDetectRegion",RegionDiscoveryGetRegionFromIMDS:"regionDiscoveryGetRegionFromIMDS",RegionDiscoveryGetCurrentVersion:"regionDiscoveryGetCurrentVersion",AcquireTokenByCodeAsync:"acquireTokenByCodeAsync",GetEndpointMetadataFromNetwork:"getEndpointMetadataFromNetwork",GetCloudDiscoveryMetadataFromNetworkMeasurement:"getCloudDiscoveryMetadataFromNetworkMeasurement",HandleRedirectPromiseMeasurement:"handleRedirectPromise",HandleNativeRedirectPromiseMeasurement:"handleNativeRedirectPromise",UpdateCloudDiscoveryMetadataMeasurement:"updateCloudDiscoveryMetadataMeasurement",UsernamePasswordClientAcquireToken:"usernamePasswordClientAcquireToken",NativeMessageHandlerHandshake:"nativeMessageHandlerHandshake",NativeGenerateAuthResult:"nativeGenerateAuthResult",RemoveHiddenIframe:"removeHiddenIframe",ClearTokensAndKeysWithClaims:"clearTokensAndKeysWithClaims",CacheManagerGetRefreshToken:"cacheManagerGetRefreshToken",GeneratePkceCodes:"generatePkceCodes",GenerateCodeVerifier:"generateCodeVerifier",GenerateCodeChallengeFromVerifier:"generateCodeChallengeFromVerifier",Sha256Digest:"sha256Digest",GetRandomValues:"getRandomValues"},Lt=(new Map([[Mt.AcquireTokenByCode,"ATByCode"],[Mt.AcquireTokenByRefreshToken,"ATByRT"],[Mt.AcquireTokenSilent,"ATS"],[Mt.AcquireTokenSilentAsync,"ATSAsync"],[Mt.AcquireTokenPopup,"ATPopup"],[Mt.AcquireTokenRedirect,"ATRedirect"],[Mt.CryptoOptsGetPublicKeyThumbprint,"CryptoGetPKThumb"],[Mt.CryptoOptsSignJwt,"CryptoSignJwt"],[Mt.SilentCacheClientAcquireToken,"SltCacheClientAT"],[Mt.SilentIframeClientAcquireToken,"SltIframeClientAT"],[Mt.SilentRefreshClientAcquireToken,"SltRClientAT"],[Mt.SsoSilent,"SsoSlt"],[Mt.StandardInteractionClientGetDiscoveredAuthority,"StdIntClientGetDiscAuth"],[Mt.FetchAccountIdWithNativeBroker,"FetchAccIdWithNtvBroker"],[Mt.NativeInteractionClientAcquireToken,"NtvIntClientAT"],[Mt.BaseClientCreateTokenRequestHeaders,"BaseClientCreateTReqHead"],[Mt.RefreshTokenClientExecutePostToTokenEndpoint,"RTClientExecPost"],[Mt.AuthorizationCodeClientExecutePostToTokenEndpoint,"AuthCodeClientExecPost"],[Mt.BrokerHandhshake,"BrokerHandshake"],[Mt.AcquireTokenByRefreshTokenInBroker,"ATByRTInBroker"],[Mt.AcquireTokenByBroker,"ATByBroker"],[Mt.RefreshTokenClientExecuteTokenRequest,"RTClientExecTReq"],[Mt.RefreshTokenClientAcquireToken,"RTClientAT"],[Mt.RefreshTokenClientAcquireTokenWithCachedRefreshToken,"RTClientATWithCachedRT"],[Mt.RefreshTokenClientAcquireTokenByRefreshToken,"RTClientATByRT"],[Mt.RefreshTokenClientCreateTokenRequestBody,"RTClientCreateTReqBody"],[Mt.AcquireTokenFromCache,"ATFromCache"],[Mt.SilentFlowClientAcquireCachedToken,"SltFlowClientATCached"],[Mt.SilentFlowClientGenerateResultFromCacheRecord,"SltFlowClientGenResFromCache"],[Mt.AcquireTokenBySilentIframe,"ATBySltIframe"],[Mt.InitializeBaseRequest,"InitBaseReq"],[Mt.InitializeSilentRequest,"InitSltReq"],[Mt.InitializeClientApplication,"InitClientApplication"],[Mt.SilentIframeClientTokenHelper,"SIClientTHelper"],[Mt.SilentHandlerInitiateAuthRequest,"SHandlerInitAuthReq"],[Mt.SilentHandlerMonitorIframeForHash,"SltHandlerMonitorIframeForHash"],[Mt.SilentHandlerLoadFrame,"SHandlerLoadFrame"],[Mt.SilentHandlerLoadFrameSync,"SHandlerLoadFrameSync"],[Mt.StandardInteractionClientCreateAuthCodeClient,"StdIntClientCreateAuthCodeClient"],[Mt.StandardInteractionClientGetClientConfiguration,"StdIntClientGetClientConf"],[Mt.StandardInteractionClientInitializeAuthorizationRequest,"StdIntClientInitAuthReq"],[Mt.StandardInteractionClientInitializeAuthorizationCodeRequest,"StdIntClientInitAuthCodeReq"],[Mt.GetAuthCodeUrl,"GetAuthCodeUrl"],[Mt.HandleCodeResponseFromServer,"HandleCodeResFromServer"],[Mt.HandleCodeResponse,"HandleCodeResp"],[Mt.UpdateTokenEndpointAuthority,"UpdTEndpointAuth"],[Mt.AuthClientAcquireToken,"AuthClientAT"],[Mt.AuthClientExecuteTokenRequest,"AuthClientExecTReq"],[Mt.AuthClientCreateTokenRequestBody,"AuthClientCreateTReqBody"],[Mt.AuthClientCreateQueryString,"AuthClientCreateQueryStr"],[Mt.PopTokenGenerateCnf,"PopTGenCnf"],[Mt.PopTokenGenerateKid,"PopTGenKid"],[Mt.HandleServerTokenResponse,"HandleServerTRes"],[Mt.DeserializeResponse,"DeserializeRes"],[Mt.AuthorityFactoryCreateDiscoveredInstance,"AuthFactCreateDiscInst"],[Mt.AuthorityResolveEndpointsAsync,"AuthResolveEndpointsAsync"],[Mt.AuthorityResolveEndpointsFromLocalSources,"AuthResolveEndpointsFromLocal"],[Mt.AuthorityGetCloudDiscoveryMetadataFromNetwork,"AuthGetCDMetaFromNet"],[Mt.AuthorityUpdateCloudDiscoveryMetadata,"AuthUpdCDMeta"],[Mt.AuthorityGetEndpointMetadataFromNetwork,"AuthUpdCDMetaFromNet"],[Mt.AuthorityUpdateEndpointMetadata,"AuthUpdEndpointMeta"],[Mt.AuthorityUpdateMetadataWithRegionalInformation,"AuthUpdMetaWithRegInfo"],[Mt.RegionDiscoveryDetectRegion,"RegDiscDetectReg"],[Mt.RegionDiscoveryGetRegionFromIMDS,"RegDiscGetRegFromIMDS"],[Mt.RegionDiscoveryGetCurrentVersion,"RegDiscGetCurrentVer"],[Mt.AcquireTokenByCodeAsync,"ATByCodeAsync"],[Mt.GetEndpointMetadataFromNetwork,"GetEndpointMetaFromNet"],[Mt.GetCloudDiscoveryMetadataFromNetworkMeasurement,"GetCDMetaFromNet"],[Mt.HandleRedirectPromiseMeasurement,"HandleRedirectPromise"],[Mt.HandleNativeRedirectPromiseMeasurement,"HandleNtvRedirectPromise"],[Mt.UpdateCloudDiscoveryMetadataMeasurement,"UpdateCDMeta"],[Mt.UsernamePasswordClientAcquireToken,"UserPassClientAT"],[Mt.NativeMessageHandlerHandshake,"NtvMsgHandlerHandshake"],[Mt.NativeGenerateAuthResult,"NtvGenAuthRes"],[Mt.RemoveHiddenIframe,"RemoveHiddenIframe"],[Mt.ClearTokensAndKeysWithClaims,"ClearTAndKeysWithClaims"],[Mt.CacheManagerGetRefreshToken,"CacheManagerGetRT"],[Mt.GeneratePkceCodes,"GenPkceCodes"],[Mt.GenerateCodeVerifier,"GenCodeVerifier"],[Mt.GenerateCodeChallengeFromVerifier,"GenCodeChallengeFromVerifier"],[Mt.Sha256Digest,"Sha256Digest"],[Mt.GetRandomValues,"GetRandomValues"]]),1);new Set(["accessTokenSize","durationMs","idTokenSize","matsSilentStatus","matsHttpStatus","refreshTokenSize","queuedTimeMs","startTimeMs","status","multiMatchedAT","multiMatchedID","multiMatchedRT"]);class qt{startMeasurement(){}endMeasurement(){}flushMeasurement(){return null}}class Dt{generateId(){return"callback-id"}startMeasurement(e,t){return{end:()=>null,discard:()=>{},add:()=>{},increment:()=>{},event:{eventId:this.generateId(),status:Lt,authority:"",libraryName:"",libraryVersion:"",clientId:"",name:e,startTimeMs:Date.now(),correlationId:t||""},measurement:new qt}}startPerformanceMeasurement(){return new qt}calculateQueuedTime(){return 0}addQueueMeasurement(){}setPreQueueTime(){}endMeasurement(){return null}discardMeasurements(){}removePerformanceCallback(){return!0}addPerformanceCallback(){return""}emitEvents(){}addFields(){}incrementFields(){}cacheEventByCorrelationId(){}}var Ut=n(4190);class Ht{navigateInternal(e,t){return Ht.defaultNavigateWindow(e,t)}navigateExternal(e,t){return Ht.defaultNavigateWindow(e,t)}static defaultNavigateWindow(e,t){return t.noHistory?window.location.replace(e):window.location.assign(e),new Promise((e=>{setTimeout((()=>{e(!0)}),t.timeout)}))}}const Ft="pkce_not_created",Bt="crypto_nonexistent",Kt="empty_navigate_uri",jt="hash_empty_error",zt="no_state_in_hash",Wt="hash_does_not_contain_known_properties",Gt="unable_to_parse_state",Vt="state_interaction_type_mismatch",Qt="interaction_in_progress",Zt="popup_window_error",Yt="empty_window_error",Jt="user_cancelled",$t="monitor_popup_timeout",Xt="monitor_window_timeout",en="redirect_in_iframe",tn="block_iframe_reload",nn="block_nested_popups",rn="iframe_closed_prematurely",on="silent_logout_unsupported",an="no_account_error",sn="silent_prompt_value_error",cn="no_token_request_cache_error",ln="unable_to_parse_token_request_cache_error",un="no_cached_authority_error",dn="auth_request_not_set_error",hn="invalid_cache_type",pn="non_browser_environment",fn="database_not_open",gn="no_network_connectivity",mn="post_request_failed",vn="get_request_failed",yn="failed_to_parse_response",Cn="unable_to_load_token",bn="crypto_key_not_found",wn="auth_code_required",Tn="auth_code_or_nativeAccountId_required",Sn="spa_code_and_nativeAccountId_present",kn="database_unavailable",En="unable_to_acquire_token_from_native_platform",An="native_handshake_timeout",In="native_extension_not_installed",Rn="native_connection_not_established",_n="uninitialized_public_client_application",Nn="native_prompt_not_supported",On="invalid_base64_string",Pn="invalid_pop_token_request",xn="failed_to_retry",Mn="For more visit: aka.ms/msaljs/browser-errors",Ln={[Ft]:"The PKCE code challenge and verifier could not be generated.",[Bt]:"The crypto object or function is not available.",[Kt]:"Navigation URI is empty. Please check stack trace for more info.",[jt]:"Hash value cannot be processed because it is empty. Please verify that your redirectUri is not clearing the hash. ".concat(Mn),[zt]:"Hash does not contain state. Please verify that the request originated from msal.",[Wt]:"Hash does not contain known properites. Please verify that your redirectUri is not changing the hash.  ".concat(Mn),[Gt]:"Unable to parse state. Please verify that the request originated from msal.",[Vt]:"Hash contains state but the interaction type does not match the caller.",[Qt]:"Interaction is currently in progress. Please ensure that this interaction has been completed before calling an interactive API.   ".concat(Mn),[Zt]:"Error opening popup window. This can happen if you are using IE or if popups are blocked in the browser.",[Yt]:"window.open returned null or undefined window object.",[Jt]:"User cancelled the flow.",[$t]:"Token acquisition in popup failed due to timeout.  ".concat(Mn),[Xt]:"Token acquisition in iframe failed due to timeout.  ".concat(Mn),[en]:"Redirects are not supported for iframed or brokered applications. Please ensure you are using MSAL.js in a top frame of the window if using the redirect APIs, or use the popup APIs.",[tn]:"Request was blocked inside an iframe because MSAL detected an authentication response.  ".concat(Mn),[nn]:"Request was blocked inside a popup because MSAL detected it was running in a popup.",[rn]:"The iframe being monitored was closed prematurely.",[on]:"Silent logout not supported. Please call logoutRedirect or logoutPopup instead.",[an]:"No account object provided to acquireTokenSilent and no active account has been set. Please call setActiveAccount or provide an account on the request.",[sn]:"The value given for the prompt value is not valid for silent requests - must be set to 'none' or 'no_session'.",[cn]:"No token request found in cache.",[ln]:"The cached token request could not be parsed.",[un]:"No cached authority found.",[dn]:"Auth Request not set. Please ensure initiateAuthRequest was called from the InteractionHandler",[hn]:"Invalid cache type",[pn]:"Login and token requests are not supported in non-browser environments.",[fn]:"Database is not open!",[gn]:"No network connectivity. Check your internet connection.",[mn]:"Network request failed: If the browser threw a CORS error, check that the redirectUri is registered in the Azure App Portal as type 'SPA'",[vn]:"Network request failed. Please check the network trace to determine root cause.",[yn]:"Failed to parse network response. Check network trace.",[Cn]:"Error loading token to cache.",[bn]:"Cryptographic Key or Keypair not found in browser storage.",[wn]:"An authorization code must be provided (as the `code` property on the request) to this flow.",[Tn]:"An authorization code or nativeAccountId must be provided to this flow.",[Sn]:"Request cannot contain both spa code and native account id.",[kn]:"IndexedDB, which is required for persistent cryptographic key storage, is unavailable. This may be caused by browser privacy features which block persistent storage in third-party contexts.",[En]:"Unable to acquire token from native platform.  ".concat(Mn),[An]:"Timed out while attempting to establish connection to browser extension",[In]:"Native extension is not installed. If you think this is a mistake call the initialize function.",[Rn]:"Connection to native platform has not been established. Please install a compatible browser extension and run initialize().  ".concat(Mn),[_n]:"You must call and await the initialize function before attempting to call any other MSAL API.  ".concat(Mn),[Nn]:"The provided prompt is not supported by the native platform. This request should be routed to the web based flow.",[On]:"Invalid base64 encoded string.",[Pn]:"Invalid PoP token request. The request should not have both a popKid value and signPopToken set to true.",[xn]:"Unable to retry failed auth code redemption due to usage of the onRedirectNavigate request parameter. Please set onRedirectNavigate on the PublicClientApplication configuration instead or call loginRedirect again."};class qn extends c.l4{constructor(e){super(e,Ln[e]),Object.setPrototypeOf(this,qn.prototype),this.name="BrowserAuthError"}}function Dn(e){return new qn(e)}class Un{async sendGetRequestAsync(e,t){let n;try{n=await fetch(e,{method:Ut.EC.GET,headers:this.getFetchHeaders(t)})}catch(r){throw window.navigator.onLine?Dn(vn):Dn(gn)}try{return{headers:this.getHeaderDict(n.headers),body:await n.json(),status:n.status}}catch(r){throw Dn(yn)}}async sendPostRequestAsync(e,t){const n=t&&t.body||o.gT.EMPTY_STRING;let r;try{r=await fetch(e,{method:Ut.EC.POST,headers:this.getFetchHeaders(t),body:n})}catch(i){throw window.navigator.onLine?Dn(mn):Dn(gn)}try{return{headers:this.getHeaderDict(r.headers),body:await r.json(),status:r.status}}catch(i){throw Dn(yn)}}getFetchHeaders(e){const t=new Headers;if(!e||!e.headers)return t;const n=e.headers;return Object.keys(n).forEach((e=>{t.append(e,n[e])})),t}getHeaderDict(e){const t={};return e.forEach(((e,n)=>{t[n]=e})),t}}const Hn=1e4;const Fn="3.21.0";class Bn{static loggerCallback(e,t){switch(e){case r.i.Error:return void console.error(t);case r.i.Info:return void console.info(t);case r.i.Verbose:return void console.debug(t);case r.i.Warning:return void console.warn(t);default:return void console.log(t)}}constructor(e){var t,n;let c;this.browserEnvironment="undefined"!==typeof window,this.config=function(e,t){let{auth:n,cache:c,system:l,telemetry:u}=e;const d={clientId:o.gT.EMPTY_STRING,authority:"".concat(o.gT.DEFAULT_AUTHORITY),knownAuthorities:[],cloudDiscoveryMetadata:o.gT.EMPTY_STRING,authorityMetadata:o.gT.EMPTY_STRING,redirectUri:o.gT.EMPTY_STRING,postLogoutRedirectUri:o.gT.EMPTY_STRING,navigateToLoginRequestUrl:!0,clientCapabilities:[],protocolMode:i,OIDCOptions:{serverResponseType:o.rg.FRAGMENT,defaultScopes:[o.gT.OPENID_SCOPE,o.gT.PROFILE_SCOPE,o.gT.OFFLINE_ACCESS_SCOPE]},azureCloudOptions:{azureCloudInstance:s,tenant:o.gT.EMPTY_STRING},skipAuthorityMetadataCache:!1,supportsNestedAppAuth:!1},h={cacheLocation:Ut.Ix.SessionStorage,temporaryCacheLocation:Ut.Ix.SessionStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!(!c||c.cacheLocation!==Ut.Ix.LocalStorage),claimsBasedCachingEnabled:!1},p={loggerCallback:()=>{},logLevel:r.i.Info,piiLoggingEnabled:!1},f={...{...kt,loggerOptions:p,networkClient:t?new Un:xt,navigationClient:new Ht,loadFrameTimeout:0,windowHashTimeout:(null===l||void 0===l?void 0:l.loadFrameTimeout)||6e4,iframeHashTimeout:(null===l||void 0===l?void 0:l.loadFrameTimeout)||Hn,navigateFrameWait:0,redirectNavigationTimeout:3e4,asyncPopups:!1,allowRedirectInIframe:!1,allowNativeBroker:!1,nativeBrokerHandshakeTimeout:(null===l||void 0===l?void 0:l.nativeBrokerHandshakeTimeout)||2e3,pollIntervalMilliseconds:Ut.qx.DEFAULT_POLL_INTERVAL_MS},...l,loggerOptions:(null===l||void 0===l?void 0:l.loggerOptions)||p},g={application:{appName:o.gT.EMPTY_STRING,appVersion:o.gT.EMPTY_STRING},client:new Dt};(null===n||void 0===n?void 0:n.protocolMode)!==a&&null!==n&&void 0!==n&&n.OIDCOptions&&new r.Y(f.loggerOptions).warning(JSON.stringify(Ye(We)));if(null!==n&&void 0!==n&&n.protocolMode&&n.protocolMode!==i&&null!==f&&void 0!==f&&f.allowNativeBroker)throw Ye(Ge);return{auth:{...d,...n,OIDCOptions:{...d.OIDCOptions,...null===n||void 0===n?void 0:n.OIDCOptions}},cache:{...h,...c},system:f,telemetry:{...g,...u}}}(e,this.browserEnvironment);try{c=window[Ut.Ix.SessionStorage]}catch(f){}const l=null===(t=c)||void 0===t?void 0:t.getItem(Ut.bg),u=null===(n=c)||void 0===n||null===(n=n.getItem(Ut.PK))||void 0===n?void 0:n.toLowerCase(),d="true"===u||"false"!==u&&void 0,h={...this.config.system.loggerOptions},p=l&&Object.keys(r.i).includes(l)?r.i[l]:void 0;p&&(h.loggerCallback=Bn.loggerCallback,h.logLevel=p),void 0!==d&&(h.piiLoggingEnabled=d),this.logger=new r.Y(h,"@azure/msal-browser",Fn),this.available=!1}getConfig(){return this.config}getLogger(){return this.logger}isAvailable(){return this.available}isBrowserEnvironment(){return this.browserEnvironment}}class Kn extends Bn{getModuleName(){return Kn.MODULE_NAME}getId(){return Kn.ID}async initialize(){return this.available="undefined"!==typeof window,this.available}}Kn.MODULE_NAME="",Kn.ID="StandardOperatingContext";const jn="missing_kid_error",zn="missing_alg_error",Wn={[jn]:"The JOSE Header for the requested JWT, JWS or JWK object requires a keyId to be configured as the 'kid' header claim. No 'kid' value was provided.",[zn]:"The JOSE Header for the requested JWT, JWS or JWK object requires an algorithm to be specified as the 'alg' header claim. No 'alg' value was provided."};class Gn extends c.l4{constructor(e,t){super(e,t),this.name="JoseHeaderError",Object.setPrototypeOf(this,Gn.prototype)}}function Vn(e){return new Gn(e,Wn[e])}class Qn{constructor(e){this.typ=e.typ,this.alg=e.alg,this.kid=e.kid}static getShrHeaderString(e){if(!e.kid)throw Vn(jn);if(!e.alg)throw Vn(zn);const t=new Qn({typ:e.typ||o.xd.Pop,kid:e.kid,alg:e.alg});return JSON.stringify(t)}}function Zn(e){return encodeURIComponent(Jn(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"))}function Yn(e){return $n(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function Jn(e){return $n((new TextEncoder).encode(e))}function $n(e){const t=Array.from(e,(e=>String.fromCodePoint(e))).join("");return btoa(t)}function Xn(e){return(new TextDecoder).decode(function(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw Dn(On)}const n=atob(t);return Uint8Array.from(n,(e=>e.codePointAt(0)||0))}(e))}const er="SHA-256",tr=new Uint8Array([1,0,1]),nr="0123456789abcdef",rr=new Uint32Array(1),or={name:"RSASSA-PKCS1-v1_5",hash:er,modulusLength:2048,publicExponent:tr};async function ir(e,t,n){null===t||void 0===t||t.addQueueMeasurement(Mt.Sha256Digest,n);const r=(new TextEncoder).encode(e);return window.crypto.subtle.digest(er,r)}function ar(e){return window.crypto.getRandomValues(e)}function sr(){return window.crypto.getRandomValues(rr),rr[0]}function cr(){const e=Date.now(),t=1024*sr()+(1023&sr()),n=new Uint8Array(16),r=Math.trunc(t/2**30),o=t&2**30-1,i=sr();n[0]=e/2**40,n[1]=e/2**32,n[2]=e/2**24,n[3]=e/65536,n[4]=e/256,n[5]=e,n[6]=112|r>>>8,n[7]=r,n[8]=128|o>>>24,n[9]=o>>>16,n[10]=o>>>8,n[11]=o,n[12]=i>>>24,n[13]=i>>>16,n[14]=i>>>8,n[15]=i;let a="";for(let s=0;s<n.length;s++)a+=nr.charAt(n[s]>>>4),a+=nr.charAt(15&n[s]),3!==s&&5!==s&&7!==s&&9!==s||(a+="-");return a}async function lr(e){return window.crypto.subtle.exportKey(Ut.Mm,e)}async function ur(e){const t=await ir(e);return Yn(new Uint8Array(t))}class dr{constructor(){this.dbName=Ut.H4,this.version=Ut.kd,this.tableName=Ut.Gv,this.dbOpen=!1}async open(){return new Promise(((e,t)=>{const n=window.indexedDB.open(this.dbName,this.version);n.addEventListener("upgradeneeded",(e=>{e.target.result.createObjectStore(this.tableName)})),n.addEventListener("success",(t=>{const n=t;this.db=n.target.result,this.dbOpen=!0,e()})),n.addEventListener("error",(()=>t(Dn(kn))))}))}closeConnection(){const e=this.db;e&&this.dbOpen&&(e.close(),this.dbOpen=!1)}async validateDbIsOpen(){if(!this.dbOpen)return this.open()}async getItem(e){return await this.validateDbIsOpen(),new Promise(((t,n)=>{if(!this.db)return n(Dn(fn));const r=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).get(e);r.addEventListener("success",(e=>{const n=e;this.closeConnection(),t(n.target.result)})),r.addEventListener("error",(e=>{this.closeConnection(),n(e)}))}))}async setItem(e,t){return await this.validateDbIsOpen(),new Promise(((n,r)=>{if(!this.db)return r(Dn(fn));const o=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).put(t,e);o.addEventListener("success",(()=>{this.closeConnection(),n()})),o.addEventListener("error",(e=>{this.closeConnection(),r(e)}))}))}async removeItem(e){return await this.validateDbIsOpen(),new Promise(((t,n)=>{if(!this.db)return n(Dn(fn));const r=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).delete(e);r.addEventListener("success",(()=>{this.closeConnection(),t()})),r.addEventListener("error",(e=>{this.closeConnection(),n(e)}))}))}async getKeys(){return await this.validateDbIsOpen(),new Promise(((e,t)=>{if(!this.db)return t(Dn(fn));const n=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).getAllKeys();n.addEventListener("success",(t=>{const n=t;this.closeConnection(),e(n.target.result)})),n.addEventListener("error",(e=>{this.closeConnection(),t(e)}))}))}async containsKey(e){return await this.validateDbIsOpen(),new Promise(((t,n)=>{if(!this.db)return n(Dn(fn));const r=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).count(e);r.addEventListener("success",(e=>{const n=e;this.closeConnection(),t(1===n.target.result)})),r.addEventListener("error",(e=>{this.closeConnection(),n(e)}))}))}async deleteDatabase(){return this.db&&this.dbOpen&&this.closeConnection(),new Promise(((e,t)=>{const n=window.indexedDB.deleteDatabase(Ut.H4),r=setTimeout((()=>t(!1)),200);n.addEventListener("success",(()=>(clearTimeout(r),e(!0)))),n.addEventListener("blocked",(()=>(clearTimeout(r),e(!0)))),n.addEventListener("error",(()=>(clearTimeout(r),t(!1))))}))}}class hr{constructor(){this.cache=new Map}getItem(e){return this.cache.get(e)||null}setItem(e,t){this.cache.set(e,t)}removeItem(e){this.cache.delete(e)}getKeys(){const e=[];return this.cache.forEach(((t,n)=>{e.push(n)})),e}containsKey(e){return this.cache.has(e)}clear(){this.cache.clear()}}class pr{constructor(e){this.inMemoryCache=new hr,this.indexedDBCache=new dr,this.logger=e}handleDatabaseAccessError(e){if(!(e instanceof qn&&e.errorCode===kn))throw e;this.logger.error("Could not access persistent storage. This may be caused by browser privacy features which block persistent storage in third-party contexts.")}async getItem(e){const t=this.inMemoryCache.getItem(e);if(!t)try{return this.logger.verbose("Queried item not found in in-memory cache, now querying persistent storage."),await this.indexedDBCache.getItem(e)}catch(n){this.handleDatabaseAccessError(n)}return t}async setItem(e,t){this.inMemoryCache.setItem(e,t);try{await this.indexedDBCache.setItem(e,t)}catch(n){this.handleDatabaseAccessError(n)}}async removeItem(e){this.inMemoryCache.removeItem(e);try{await this.indexedDBCache.removeItem(e)}catch(t){this.handleDatabaseAccessError(t)}}async getKeys(){const e=this.inMemoryCache.getKeys();if(0===e.length)try{return this.logger.verbose("In-memory cache is empty, now querying persistent storage."),await this.indexedDBCache.getKeys()}catch(t){this.handleDatabaseAccessError(t)}return e}async containsKey(e){const t=this.inMemoryCache.containsKey(e);if(!t)try{return this.logger.verbose("Key not found in in-memory cache, now querying persistent storage."),await this.indexedDBCache.containsKey(e)}catch(n){this.handleDatabaseAccessError(n)}return t}clearInMemory(){this.logger.verbose("Deleting in-memory keystore"),this.inMemoryCache.clear(),this.logger.verbose("In-memory keystore deleted")}async clearPersistent(){try{this.logger.verbose("Deleting persistent keystore");const e=await this.indexedDBCache.deleteDatabase();return e&&this.logger.verbose("Persistent keystore deleted"),e}catch(e){return this.handleDatabaseAccessError(e),!1}}}class fr{constructor(e,t){this.logger=e,function(e){if(!("crypto"in window))throw e.error("BrowserCrypto: crypto interface is unavailable"),Dn(Bt);e.verbose("BrowserCrypto: modern crypto interface available")}(e),this.cache=new pr(this.logger),this.performanceClient=t}createNewGuid(){return cr()}base64Encode(e){return Jn(e)}base64Decode(e){return Xn(e)}base64UrlEncode(e){return Zn(e)}encodeKid(e){return this.base64UrlEncode(JSON.stringify({kid:e}))}async getPublicKeyThumbprint(e){var t;const n=null===(t=this.performanceClient)||void 0===t?void 0:t.startMeasurement(Mt.CryptoOptsGetPublicKeyThumbprint,e.correlationId),r=await async function(e,t){return window.crypto.subtle.generateKey(or,e,t)}(fr.EXTRACTABLE,fr.POP_KEY_USAGES),o=await lr(r.publicKey),i=gr({e:o.e,kty:o.kty,n:o.n}),a=await this.hashString(i),s=await lr(r.privateKey),c=await async function(e,t,n){return window.crypto.subtle.importKey(Ut.Mm,e,or,t,n)}(s,!1,["sign"]);return await this.cache.setItem(a,{privateKey:c,publicKey:r.publicKey,requestMethod:e.resourceRequestMethod,requestUri:e.resourceRequestUri}),n&&n.end({success:!0}),a}async removeTokenBindingKey(e){await this.cache.removeItem(e);return!await this.cache.containsKey(e)}async clearKeystore(){this.cache.clearInMemory();try{return await this.cache.clearPersistent(),!0}catch(e){return e instanceof Error?this.logger.error("Clearing keystore failed with error: ".concat(e.message)):this.logger.error("Clearing keystore failed with unknown error"),!1}}async signJwt(e,t,n,r){var o;const i=null===(o=this.performanceClient)||void 0===o?void 0:o.startMeasurement(Mt.CryptoOptsSignJwt,r),a=await this.cache.getItem(t);if(!a)throw Dn(bn);const s=await lr(a.publicKey),c=gr(s),l=Zn(JSON.stringify({kid:t})),u=Zn(Qn.getShrHeaderString({...null===n||void 0===n?void 0:n.header,alg:s.alg,kid:l}));e.cnf={jwk:JSON.parse(c)};const d=Zn(JSON.stringify(e)),h="".concat(u,".").concat(d),p=(new TextEncoder).encode(h),f=await async function(e,t){return window.crypto.subtle.sign(or,e,t)}(a.privateKey,p),g=Yn(new Uint8Array(f)),m="".concat(h,".").concat(g);return i&&i.end({success:!0}),m}async hashString(e){return ur(e)}}function gr(e){return JSON.stringify(e,Object.keys(e).sort())}fr.POP_KEY_USAGES=["sign","verify"],fr.EXTRACTABLE=!0;const mr=(e,t,n,r,o)=>function(){n.trace("Executing function ".concat(t));const i=null===r||void 0===r?void 0:r.startMeasurement(t,o);if(o){const e=t+"CallCount";null===r||void 0===r||r.incrementFields({[e]:1},o)}try{const r=e(...arguments);return null===i||void 0===i||i.end({success:!0}),n.trace("Returning result from ".concat(t)),r}catch(a){n.trace("Error occurred in ".concat(t));try{n.trace(JSON.stringify(a))}catch(a){n.trace("Unable to print error message.")}throw null===i||void 0===i||i.end({success:!1},a),a}},vr=(e,t,n,r,o)=>function(){n.trace("Executing function ".concat(t));const i=null===r||void 0===r?void 0:r.startMeasurement(t,o);if(o){const e=t+"CallCount";null===r||void 0===r||r.incrementFields({[e]:1},o)}return null===r||void 0===r||r.setPreQueueTime(t,o),e(...arguments).then((e=>(n.trace("Returning result from ".concat(t)),null===i||void 0===i||i.end({success:!0}),e))).catch((e=>{n.trace("Error occurred in ".concat(t));try{n.trace(JSON.stringify(e))}catch(e){n.trace("Unable to print error message.")}throw null===i||void 0===i||i.end({success:!1},e),e}))};class yr{constructor(e,t,n,r){this.networkInterface=e,this.logger=t,this.performanceClient=n,this.correlationId=r}async detectRegion(e,t){var n;null===(n=this.performanceClient)||void 0===n||n.addQueueMeasurement(Mt.RegionDiscoveryDetectRegion,this.correlationId);let r=e;if(r)t.region_source=o.W.ENVIRONMENT_VARIABLE;else{const e=yr.IMDS_OPTIONS;try{const n=await vr(this.getRegionFromIMDS.bind(this),Mt.RegionDiscoveryGetRegionFromIMDS,this.logger,this.performanceClient,this.correlationId)(o.gT.IMDS_VERSION,e);if(n.status===o.YY.httpSuccess&&(r=n.body,t.region_source=o.W.IMDS),n.status===o.YY.httpBadRequest){const n=await vr(this.getCurrentVersion.bind(this),Mt.RegionDiscoveryGetCurrentVersion,this.logger,this.performanceClient,this.correlationId)(e);if(!n)return t.region_source=o.W.FAILED_AUTO_DETECTION,null;const i=await vr(this.getRegionFromIMDS.bind(this),Mt.RegionDiscoveryGetRegionFromIMDS,this.logger,this.performanceClient,this.correlationId)(n,e);i.status===o.YY.httpSuccess&&(r=i.body,t.region_source=o.W.IMDS)}}catch(i){return t.region_source=o.W.FAILED_AUTO_DETECTION,null}}return r||(t.region_source=o.W.FAILED_AUTO_DETECTION),r||null}async getRegionFromIMDS(e,t){var n;return null===(n=this.performanceClient)||void 0===n||n.addQueueMeasurement(Mt.RegionDiscoveryGetRegionFromIMDS,this.correlationId),this.networkInterface.sendGetRequestAsync("".concat(o.gT.IMDS_ENDPOINT,"?api-version=").concat(e,"&format=text"),t,o.gT.IMDS_TIMEOUT)}async getCurrentVersion(e){var t;null===(t=this.performanceClient)||void 0===t||t.addQueueMeasurement(Mt.RegionDiscoveryGetCurrentVersion,this.correlationId);try{const t=await this.networkInterface.sendGetRequestAsync("".concat(o.gT.IMDS_ENDPOINT,"?format=json"),e);return t.status===o.YY.httpBadRequest&&t.body&&t.body["newest-versions"]&&t.body["newest-versions"].length>0?t.body["newest-versions"][0]:null}catch(n){return null}}}yr.IMDS_OPTIONS={headers:{Metadata:"true"}};class Cr{constructor(e,t,n,r,o,i,a,s){this.canonicalAuthority=e,this._canonicalAuthority.validateAsUri(),this.networkInterface=t,this.cacheManager=n,this.authorityOptions=r,this.regionDiscoveryMetadata={region_used:void 0,region_source:void 0,region_outcome:void 0},this.logger=o,this.performanceClient=a,this.correlationId=i,this.managedIdentity=s||!1,this.regionDiscovery=new yr(t,this.logger,this.performanceClient,this.correlationId)}getAuthorityType(e){if(e.HostNameAndPort.endsWith(o.gT.CIAM_AUTH_URL))return st;const t=e.PathSegments;if(t.length)switch(t[0].toLowerCase()){case o.gT.ADFS:return it;case o.gT.DSTS:return at}return ot}get authorityType(){return this.getAuthorityType(this.canonicalAuthorityUrlComponents)}get protocolMode(){return this.authorityOptions.protocolMode}get options(){return this.authorityOptions}get canonicalAuthority(){return this._canonicalAuthority.urlString}set canonicalAuthority(e){this._canonicalAuthority=new ht(e),this._canonicalAuthority.validateAsUri(),this._canonicalAuthorityUrlComponents=null}get canonicalAuthorityUrlComponents(){return this._canonicalAuthorityUrlComponents||(this._canonicalAuthorityUrlComponents=this._canonicalAuthority.getUrlComponents()),this._canonicalAuthorityUrlComponents}get hostnameAndPort(){return this.canonicalAuthorityUrlComponents.HostNameAndPort.toLowerCase()}get tenant(){return this.canonicalAuthorityUrlComponents.PathSegments[0]}get authorizationEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.authorization_endpoint);throw te(p)}get tokenEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint);throw te(p)}get deviceCodeEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint.replace("/token","/devicecode"));throw te(p)}get endSessionEndpoint(){if(this.discoveryComplete()){if(!this.metadata.end_session_endpoint)throw te(G);return this.replacePath(this.metadata.end_session_endpoint)}throw te(p)}get selfSignedJwtAudience(){if(this.discoveryComplete())return this.replacePath(this.metadata.issuer);throw te(p)}get jwksUri(){if(this.discoveryComplete())return this.replacePath(this.metadata.jwks_uri);throw te(p)}canReplaceTenant(e){return 1===e.PathSegments.length&&!Cr.reservedTenantDomains.has(e.PathSegments[0])&&this.getAuthorityType(e)===ot&&this.protocolMode===i}replaceTenant(e){return e.replace(/{tenant}|{tenantid}/g,this.tenant)}replacePath(e){let t=e;const n=new ht(this.metadata.canonical_authority).getUrlComponents(),r=n.PathSegments;return this.canonicalAuthorityUrlComponents.PathSegments.forEach(((e,o)=>{let i=r[o];if(0===o&&this.canReplaceTenant(n)){const e=new ht(this.metadata.authorization_endpoint).getUrlComponents().PathSegments[0];i!==e&&(this.logger.verbose("Replacing tenant domain name ".concat(i," with id ").concat(e)),i=e)}e!==i&&(t=t.replace("/".concat(i,"/"),"/".concat(e,"/")))})),this.replaceTenant(t)}get defaultOpenIdConfigurationEndpoint(){const e=this.hostnameAndPort;return this.canonicalAuthority.endsWith("v2.0/")||this.authorityType===it||this.protocolMode!==i&&!this.isAliasOfKnownMicrosoftAuthority(e)?"".concat(this.canonicalAuthority,".well-known/openid-configuration"):"".concat(this.canonicalAuthority,"v2.0/.well-known/openid-configuration")}discoveryComplete(){return!!this.metadata}async resolveEndpointsAsync(){var e,t;null===(e=this.performanceClient)||void 0===e||e.addQueueMeasurement(Mt.AuthorityResolveEndpointsAsync,this.correlationId);const n=this.getCurrentMetadataEntity(),r=await vr(this.updateCloudDiscoveryMetadata.bind(this),Mt.AuthorityUpdateCloudDiscoveryMetadata,this.logger,this.performanceClient,this.correlationId)(n);this.canonicalAuthority=this.canonicalAuthority.replace(this.hostnameAndPort,n.preferred_network);const o=await vr(this.updateEndpointMetadata.bind(this),Mt.AuthorityUpdateEndpointMetadata,this.logger,this.performanceClient,this.correlationId)(n);this.updateCachedMetadata(n,r,{source:o}),null===(t=this.performanceClient)||void 0===t||t.addFields({cloudDiscoverySource:r,authorityEndpointSource:o},this.correlationId)}getCurrentMetadataEntity(){let e=this.cacheManager.getAuthorityMetadataByAlias(this.hostnameAndPort);return e||(e={aliases:[],preferred_cache:this.hostnameAndPort,preferred_network:this.hostnameAndPort,canonical_authority:this.canonicalAuthority,authorization_endpoint:"",token_endpoint:"",end_session_endpoint:"",issuer:"",aliasesFromNetwork:!1,endpointsFromNetwork:!1,expiresAt:Te(),jwks_uri:""}),e}updateCachedMetadata(e,t,n){t!==o.pQ.CACHE&&(null===n||void 0===n?void 0:n.source)!==o.pQ.CACHE&&(e.expiresAt=Te(),e.canonical_authority=this.canonicalAuthority);const r=this.cacheManager.generateAuthorityMetadataCacheKey(e.preferred_cache);this.cacheManager.setAuthorityMetadata(r,e),this.metadata=e}async updateEndpointMetadata(e){var t;null===(t=this.performanceClient)||void 0===t||t.addQueueMeasurement(Mt.AuthorityUpdateEndpointMetadata,this.correlationId);const n=this.updateEndpointMetadataFromLocalSources(e);if(n){var r;if(n.source===o.pQ.HARDCODED_VALUES)if(null!==(r=this.authorityOptions.azureRegionConfiguration)&&void 0!==r&&r.azureRegion&&n.metadata){Se(e,await vr(this.updateMetadataWithRegionalInformation.bind(this),Mt.AuthorityUpdateMetadataWithRegionalInformation,this.logger,this.performanceClient,this.correlationId)(n.metadata),!1),e.canonical_authority=this.canonicalAuthority}return n.source}let i=await vr(this.getEndpointMetadataFromNetwork.bind(this),Mt.AuthorityGetEndpointMetadataFromNetwork,this.logger,this.performanceClient,this.correlationId)();var a;if(i)return null!==(a=this.authorityOptions.azureRegionConfiguration)&&void 0!==a&&a.azureRegion&&(i=await vr(this.updateMetadataWithRegionalInformation.bind(this),Mt.AuthorityUpdateMetadataWithRegionalInformation,this.logger,this.performanceClient,this.correlationId)(i)),Se(e,i,!0),o.pQ.NETWORK;throw te(g,this.defaultOpenIdConfigurationEndpoint)}updateEndpointMetadataFromLocalSources(e){this.logger.verbose("Attempting to get endpoint metadata from authority configuration");const t=this.getEndpointMetadataFromConfig();if(t)return this.logger.verbose("Found endpoint metadata in authority configuration"),Se(e,t,!1),{source:o.pQ.CONFIG};if(this.logger.verbose("Did not find endpoint metadata in the config... Attempting to get endpoint metadata from the hardcoded values."),this.authorityOptions.skipAuthorityMetadataCache)this.logger.verbose("Skipping hardcoded metadata cache since skipAuthorityMetadataCache is set to true. Attempting to get endpoint metadata from the network metadata cache.");else{const t=this.getEndpointMetadataFromHardcodedValues();if(t)return Se(e,t,!1),{source:o.pQ.HARDCODED_VALUES,metadata:t};this.logger.verbose("Did not find endpoint metadata in hardcoded values... Attempting to get endpoint metadata from the network metadata cache.")}const n=Ee(e);return this.isAuthoritySameType(e)&&e.endpointsFromNetwork&&!n?(this.logger.verbose("Found endpoint metadata in the cache."),{source:o.pQ.CACHE}):(n&&this.logger.verbose("The metadata entity is expired."),null)}isAuthoritySameType(e){return new ht(e.canonical_authority).getUrlComponents().PathSegments.length===this.canonicalAuthorityUrlComponents.PathSegments.length}getEndpointMetadataFromConfig(){if(this.authorityOptions.authorityMetadata)try{return JSON.parse(this.authorityOptions.authorityMetadata)}catch(e){throw Ye(He)}return null}async getEndpointMetadataFromNetwork(){var e;null===(e=this.performanceClient)||void 0===e||e.addQueueMeasurement(Mt.AuthorityGetEndpointMetadataFromNetwork,this.correlationId);const t={},n=this.defaultOpenIdConfigurationEndpoint;this.logger.verbose("Authority.getEndpointMetadataFromNetwork: attempting to retrieve OAuth endpoints from ".concat(n));try{const e=await this.networkInterface.sendGetRequestAsync(n,t),r=function(e){return e.hasOwnProperty("authorization_endpoint")&&e.hasOwnProperty("token_endpoint")&&e.hasOwnProperty("issuer")&&e.hasOwnProperty("jwks_uri")}(e.body);return r?e.body:(this.logger.verbose("Authority.getEndpointMetadataFromNetwork: could not parse response as OpenID configuration"),null)}catch(r){return this.logger.verbose("Authority.getEndpointMetadataFromNetwork: ".concat(r)),null}}getEndpointMetadataFromHardcodedValues(){return this.hostnameAndPort in pt?pt[this.hostnameAndPort]:null}async updateMetadataWithRegionalInformation(e){var t,n;null===(t=this.performanceClient)||void 0===t||t.addQueueMeasurement(Mt.AuthorityUpdateMetadataWithRegionalInformation,this.correlationId);const r=null===(n=this.authorityOptions.azureRegionConfiguration)||void 0===n?void 0:n.azureRegion;if(r){var i;if(r!==o.gT.AZURE_REGION_AUTO_DISCOVER_FLAG)return this.regionDiscoveryMetadata.region_outcome=o.ki.CONFIGURED_NO_AUTO_DETECTION,this.regionDiscoveryMetadata.region_used=r,Cr.replaceWithRegionalInformation(e,r);const t=await vr(this.regionDiscovery.detectRegion.bind(this.regionDiscovery),Mt.RegionDiscoveryDetectRegion,this.logger,this.performanceClient,this.correlationId)(null===(i=this.authorityOptions.azureRegionConfiguration)||void 0===i?void 0:i.environmentRegion,this.regionDiscoveryMetadata);if(t)return this.regionDiscoveryMetadata.region_outcome=o.ki.AUTO_DETECTION_REQUESTED_SUCCESSFUL,this.regionDiscoveryMetadata.region_used=t,Cr.replaceWithRegionalInformation(e,t);this.regionDiscoveryMetadata.region_outcome=o.ki.AUTO_DETECTION_REQUESTED_FAILED}return e}async updateCloudDiscoveryMetadata(e){var t;null===(t=this.performanceClient)||void 0===t||t.addQueueMeasurement(Mt.AuthorityUpdateCloudDiscoveryMetadata,this.correlationId);const n=this.updateCloudDiscoveryMetadataFromLocalSources(e);if(n)return n;const r=await vr(this.getCloudDiscoveryMetadataFromNetwork.bind(this),Mt.AuthorityGetCloudDiscoveryMetadataFromNetwork,this.logger,this.performanceClient,this.correlationId)();if(r)return ke(e,r,!0),o.pQ.NETWORK;throw Ye(Fe)}updateCloudDiscoveryMetadataFromLocalSources(e){this.logger.verbose("Attempting to get cloud discovery metadata  from authority configuration"),this.logger.verbosePii("Known Authorities: ".concat(this.authorityOptions.knownAuthorities||o.gT.NOT_APPLICABLE)),this.logger.verbosePii("Authority Metadata: ".concat(this.authorityOptions.authorityMetadata||o.gT.NOT_APPLICABLE)),this.logger.verbosePii("Canonical Authority: ".concat(e.canonical_authority||o.gT.NOT_APPLICABLE));const t=this.getCloudDiscoveryMetadataFromConfig();if(t)return this.logger.verbose("Found cloud discovery metadata in authority configuration"),ke(e,t,!1),o.pQ.CONFIG;if(this.logger.verbose("Did not find cloud discovery metadata in the config... Attempting to get cloud discovery metadata from the hardcoded values."),this.options.skipAuthorityMetadataCache)this.logger.verbose("Skipping hardcoded cloud discovery metadata cache since skipAuthorityMetadataCache is set to true. Attempting to get cloud discovery metadata from the network metadata cache.");else{const t=(n=this.hostnameAndPort,vt(ft.metadata,n));if(t)return this.logger.verbose("Found cloud discovery metadata from hardcoded values."),ke(e,t,!1),o.pQ.HARDCODED_VALUES;this.logger.verbose("Did not find cloud discovery metadata in hardcoded values... Attempting to get cloud discovery metadata from the network metadata cache.")}var n;const r=Ee(e);return this.isAuthoritySameType(e)&&e.aliasesFromNetwork&&!r?(this.logger.verbose("Found cloud discovery metadata in the cache."),o.pQ.CACHE):(r&&this.logger.verbose("The metadata entity is expired."),null)}getCloudDiscoveryMetadataFromConfig(){if(this.authorityType===st)return this.logger.verbose("CIAM authorities do not support cloud discovery metadata, generate the aliases from authority host."),Cr.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort);if(this.authorityOptions.cloudDiscoveryMetadata){this.logger.verbose("The cloud discovery metadata has been provided as a network response, in the config.");try{this.logger.verbose("Attempting to parse the cloud discovery metadata.");const e=vt(JSON.parse(this.authorityOptions.cloudDiscoveryMetadata).metadata,this.hostnameAndPort);if(this.logger.verbose("Parsed the cloud discovery metadata."),e)return this.logger.verbose("There is returnable metadata attached to the parsed cloud discovery metadata."),e;this.logger.verbose("There is no metadata attached to the parsed cloud discovery metadata.")}catch(e){throw this.logger.verbose("Unable to parse the cloud discovery metadata. Throwing Invalid Cloud Discovery Metadata Error."),Ye(Ue)}}return this.isInKnownAuthorities()?(this.logger.verbose("The host is included in knownAuthorities. Creating new cloud discovery metadata from the host."),Cr.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)):null}async getCloudDiscoveryMetadataFromNetwork(){var e;null===(e=this.performanceClient)||void 0===e||e.addQueueMeasurement(Mt.AuthorityGetCloudDiscoveryMetadataFromNetwork,this.correlationId);const t="".concat(o.gT.AAD_INSTANCE_DISCOVERY_ENDPT).concat(this.canonicalAuthority,"oauth2/v2.0/authorize"),n={};let r=null;try{const e=await this.networkInterface.sendGetRequestAsync(t,n);let i,a;if(function(e){return e.hasOwnProperty("tenant_discovery_endpoint")&&e.hasOwnProperty("metadata")}(e.body))i=e.body,a=i.metadata,this.logger.verbosePii("tenant_discovery_endpoint is: ".concat(i.tenant_discovery_endpoint));else{if(!function(e){return e.hasOwnProperty("error")&&e.hasOwnProperty("error_description")}(e.body))return this.logger.error("AAD did not return a CloudInstanceDiscoveryResponse or CloudInstanceDiscoveryErrorResponse"),null;if(this.logger.warning("A CloudInstanceDiscoveryErrorResponse was returned. The cloud instance discovery network request's status code is: ".concat(e.status)),i=e.body,i.error===o.gT.INVALID_INSTANCE)return this.logger.error("The CloudInstanceDiscoveryErrorResponse error is invalid_instance."),null;this.logger.warning("The CloudInstanceDiscoveryErrorResponse error is ".concat(i.error)),this.logger.warning("The CloudInstanceDiscoveryErrorResponse error description is ".concat(i.error_description)),this.logger.warning("Setting the value of the CloudInstanceDiscoveryMetadata (returned from the network) to []"),a=[]}this.logger.verbose("Attempting to find a match between the developer's authority and the CloudInstanceDiscoveryMetadata returned from the network request."),r=vt(a,this.hostnameAndPort)}catch(i){if(i instanceof c.l4)this.logger.error("There was a network error while attempting to get the cloud discovery instance metadata.\nError: ".concat(i.errorCode,"\nError Description: ").concat(i.errorMessage));else{const e=i;this.logger.error("A non-MSALJS error was thrown while attempting to get the cloud instance discovery metadata.\nError: ".concat(e.name,"\nError Description: ").concat(e.message))}return null}return r||(this.logger.warning("The developer's authority was not found within the CloudInstanceDiscoveryMetadata returned from the network request."),this.logger.verbose("Creating custom Authority for custom domain scenario."),r=Cr.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)),r}isInKnownAuthorities(){return this.authorityOptions.knownAuthorities.filter((e=>e&&ht.getDomainFromUrl(e).toLowerCase()===this.hostnameAndPort)).length>0}static generateAuthority(e,t){let n;if(t&&t.azureCloudInstance!==s){const e=t.tenant?t.tenant:o.gT.DEFAULT_COMMON_TENANT;n="".concat(t.azureCloudInstance,"/").concat(e,"/")}return n||e}static createCloudDiscoveryMetadataFromHost(e){return{preferred_network:e,preferred_cache:e,aliases:[e]}}getPreferredCache(){if(this.managedIdentity)return o.gT.DEFAULT_AUTHORITY_HOST;if(this.discoveryComplete())return this.metadata.preferred_cache;throw te(p)}isAlias(e){return this.metadata.aliases.indexOf(e)>-1}isAliasOfKnownMicrosoftAuthority(e){return gt.has(e)}static isPublicCloudAuthority(e){return o.gT.KNOWN_PUBLIC_CLOUDS.indexOf(e)>=0}static buildRegionalAuthorityString(e,t,n){const r=new ht(e);r.validateAsUri();const i=r.getUrlComponents();let a="".concat(t,".").concat(i.HostNameAndPort);this.isPublicCloudAuthority(i.HostNameAndPort)&&(a="".concat(t,".").concat(o.gT.REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX));const s=ht.constructAuthorityUriFromObject({...r.getUrlComponents(),HostNameAndPort:a}).urlString;return n?"".concat(s,"?").concat(n):s}static replaceWithRegionalInformation(e,t){const n={...e};return n.authorization_endpoint=Cr.buildRegionalAuthorityString(n.authorization_endpoint,t),n.token_endpoint=Cr.buildRegionalAuthorityString(n.token_endpoint,t),n.end_session_endpoint&&(n.end_session_endpoint=Cr.buildRegionalAuthorityString(n.end_session_endpoint,t)),n}static transformCIAMAuthority(e){let t=e;const n=new ht(e).getUrlComponents();if(0===n.PathSegments.length&&n.HostNameAndPort.endsWith(o.gT.CIAM_AUTH_URL)){const e=n.HostNameAndPort.split(".")[0];t="".concat(t).concat(e).concat(o.gT.AAD_TENANT_DOMAIN_SUFFIX)}return t}}function br(e){return e.endsWith(o.gT.FORWARD_SLASH)?e:"".concat(e).concat(o.gT.FORWARD_SLASH)}Cr.reservedTenantDomains=new Set(["{tenant}","{tenantid}",o.Nb.COMMON,o.Nb.CONSUMERS,o.Nb.ORGANIZATIONS]);const wr="no_tokens_found",Tr="native_account_unavailable",Sr="refresh_token_expired",kr="bad_token",Er=["interaction_required","consent_required","login_required",kr],Ar=["message_only","additional_action","basic_action","user_password_expired","consent_required","bad_token"],Ir={[wr]:"No refresh token found in the cache. Please sign-in.",[Tr]:"The requested account is not available in the native broker. It may have been deleted or logged out. Please sign-in again using an interactive API.",[Sr]:"Refresh token has expired.",[kr]:"Identity provider returned bad_token due to an expired or invalid refresh token. Please invoke an interactive API to resolve."};Ir[wr],Ir[Tr],Ir[kr];class Rr extends c.l4{constructor(e,t,n,r,i,a,s,c){super(e,t,n),Object.setPrototypeOf(this,Rr.prototype),this.timestamp=r||o.gT.EMPTY_STRING,this.traceId=i||o.gT.EMPTY_STRING,this.correlationId=a||o.gT.EMPTY_STRING,this.claims=s||o.gT.EMPTY_STRING,this.name="InteractionRequiredAuthError",this.errorNo=c}}function _r(e,t,n){const r=!!e&&Er.indexOf(e)>-1,o=!!n&&Ar.indexOf(n)>-1,i=!!t&&Er.some((e=>t.indexOf(e)>-1));return r||i||o}function Nr(e){return new Rr(e,Ir[e])}class Or{static setRequestState(e,t,n){const r=Or.generateLibraryState(e,n);return t?"".concat(r).concat(o.gT.RESOURCE_DELIM).concat(t):r}static generateLibraryState(e,t){if(!e)throw te(D);const n={id:e.createNewGuid()};t&&(n.meta=t);const r=JSON.stringify(n);return e.base64Encode(r)}static parseRequestState(e,t){if(!e)throw te(D);if(!t)throw te(v);try{const n=t.split(o.gT.RESOURCE_DELIM),r=n[0],i=n.length>1?n.slice(1).join(o.gT.RESOURCE_DELIM):o.gT.EMPTY_STRING,a=e.base64Decode(r),s=JSON.parse(a);return{userRequestState:i||o.gT.EMPTY_STRING,libraryState:s}}catch(n){throw te(v)}}}const Pr="home_account_id",xr="UPN";var Mr=n(2838),Lr=n(4777);class qr{constructor(e){this.validateWindowStorage(e),this.windowStorage=window[e]}validateWindowStorage(e){if(e!==Ut.Ix.LocalStorage&&e!==Ut.Ix.SessionStorage||!window[e])throw(0,Mr.Z1)(Lr.m4)}getItem(e){return this.windowStorage.getItem(e)}setItem(e,t){this.windowStorage.setItem(e,t)}removeItem(e){this.windowStorage.removeItem(e)}getKeys(){return Object.keys(this.windowStorage)}containsKey(e){return this.windowStorage.hasOwnProperty(e)}}function Dr(e,t){if(!t)return null;try{return Or.parseRequestState(e,t).libraryState.meta}catch(n){throw te(v)}}class Ur extends Tt{constructor(e,t,n,r,o,i){super(e,n,r,o),this.COOKIE_LIFE_MULTIPLIER=864e5,this.cacheConfig=t,this.logger=r,this.internalStorage=new hr,this.browserStorage=this.setupBrowserStorage(this.cacheConfig.cacheLocation),this.temporaryCacheStorage=this.setupTemporaryCacheStorage(this.cacheConfig.temporaryCacheLocation,this.cacheConfig.cacheLocation),t.cacheMigrationEnabled&&(this.migrateCacheEntries(),this.createKeyMaps()),this.performanceClient=i}setupBrowserStorage(e){switch(e){case Ut.Ix.LocalStorage:case Ut.Ix.SessionStorage:try{return new qr(e)}catch(t){this.logger.verbose(t);break}}return this.cacheConfig.cacheLocation=Ut.Ix.MemoryStorage,new hr}setupTemporaryCacheStorage(e,t){switch(t){case Ut.Ix.LocalStorage:case Ut.Ix.SessionStorage:try{return new qr(e||Ut.Ix.SessionStorage)}catch(n){return this.logger.verbose(n),this.internalStorage}case Ut.Ix.MemoryStorage:default:return this.internalStorage}}migrateCacheEntries(){const e="".concat(o.gT.CACHE_PREFIX,".").concat(o.Vi.ID_TOKEN),t="".concat(o.gT.CACHE_PREFIX,".").concat(o.Vi.CLIENT_INFO),n="".concat(o.gT.CACHE_PREFIX,".").concat(o.Vi.ERROR),r="".concat(o.gT.CACHE_PREFIX,".").concat(o.Vi.ERROR_DESC),i=[this.browserStorage.getItem(e),this.browserStorage.getItem(t),this.browserStorage.getItem(n),this.browserStorage.getItem(r)];[o.Vi.ID_TOKEN,o.Vi.CLIENT_INFO,o.Vi.ERROR,o.Vi.ERROR_DESC].forEach(((e,t)=>{const n=i[t];n&&this.setTemporaryCache(e,n,!0)}))}createKeyMaps(){this.logger.trace("BrowserCacheManager - createKeyMaps called.");const e=this.getItem(Ut.Oq.ACCOUNT_KEYS),t=this.getItem("".concat(Ut.Oq.TOKEN_KEYS,".").concat(this.clientId));if(e&&t)return void this.logger.verbose("BrowserCacheManager:createKeyMaps - account and token key maps already exist, skipping migration.");this.browserStorage.getKeys().forEach((e=>{if(this.isCredentialKey(e)){const t=this.getItem(e);if(t){const n=this.validateAndParseJson(t);if(n&&n.hasOwnProperty("credentialType"))switch(n.credentialType){case o.d3.ID_TOKEN:if(ge(n)){this.logger.trace("BrowserCacheManager:createKeyMaps - idToken found, saving key to token key map"),this.logger.tracePii("BrowserCacheManager:createKeyMaps - idToken with key: ".concat(e," found, saving key to token key map"));const t=n,r=this.updateCredentialCacheKey(e,t);return void this.addTokenKey(r,o.d3.ID_TOKEN)}this.logger.trace("BrowserCacheManager:createKeyMaps - key found matching idToken schema with value containing idToken credentialType field but value failed IdTokenEntity validation, skipping."),this.logger.tracePii("BrowserCacheManager:createKeyMaps - failed idToken validation on key: ".concat(e));break;case o.d3.ACCESS_TOKEN:case o.d3.ACCESS_TOKEN_WITH_AUTH_SCHEME:if(fe(n)){this.logger.trace("BrowserCacheManager:createKeyMaps - accessToken found, saving key to token key map"),this.logger.tracePii("BrowserCacheManager:createKeyMaps - accessToken with key: ".concat(e," found, saving key to token key map"));const t=n,r=this.updateCredentialCacheKey(e,t);return void this.addTokenKey(r,o.d3.ACCESS_TOKEN)}this.logger.trace("BrowserCacheManager:createKeyMaps - key found matching accessToken schema with value containing accessToken credentialType field but value failed AccessTokenEntity validation, skipping."),this.logger.tracePii("BrowserCacheManager:createKeyMaps - failed accessToken validation on key: ".concat(e));break;case o.d3.REFRESH_TOKEN:if(me(n)){this.logger.trace("BrowserCacheManager:createKeyMaps - refreshToken found, saving key to token key map"),this.logger.tracePii("BrowserCacheManager:createKeyMaps - refreshToken with key: ".concat(e," found, saving key to token key map"));const t=n,r=this.updateCredentialCacheKey(e,t);return void this.addTokenKey(r,o.d3.REFRESH_TOKEN)}this.logger.trace("BrowserCacheManager:createKeyMaps - key found matching refreshToken schema with value containing refreshToken credentialType field but value failed RefreshTokenEntity validation, skipping."),this.logger.tracePii("BrowserCacheManager:createKeyMaps - failed refreshToken validation on key: ".concat(e))}}}if(this.isAccountKey(e)){const t=this.getItem(e);if(t){const n=this.validateAndParseJson(t);n&&lt.isAccountEntity(n)&&(this.logger.trace("BrowserCacheManager:createKeyMaps - account found, saving key to account key map"),this.logger.tracePii("BrowserCacheManager:createKeyMaps - account with key: ".concat(e," found, saving key to account key map")),this.addAccountKeyToMap(e))}}}))}validateAndParseJson(e){try{const t=JSON.parse(e);return t&&"object"===typeof t?t:null}catch(t){return null}}getItem(e){return this.browserStorage.getItem(e)}setItem(e,t){this.browserStorage.setItem(e,t)}getAccount(e,t){this.logger.trace("BrowserCacheManager.getAccount called");const n=this.getCachedAccountEntity(e);return this.updateOutdatedCachedAccount(e,n,t)}getCachedAccountEntity(e){const t=this.getItem(e);if(!t)return this.removeAccountKeyFromMap(e),null;const n=this.validateAndParseJson(t);return n&&lt.isAccountEntity(n)?Tt.toObject(new lt,n):(this.removeAccountKeyFromMap(e),null)}setAccount(e){this.logger.trace("BrowserCacheManager.setAccount called");const t=e.generateAccountKey();this.setItem(t,JSON.stringify(e)),this.addAccountKeyToMap(t)}getAccountKeys(){this.logger.trace("BrowserCacheManager.getAccountKeys called");const e=this.getItem(Ut.Oq.ACCOUNT_KEYS);return e?JSON.parse(e):(this.logger.verbose("BrowserCacheManager.getAccountKeys - No account keys found"),[])}addAccountKeyToMap(e){this.logger.trace("BrowserCacheManager.addAccountKeyToMap called"),this.logger.tracePii("BrowserCacheManager.addAccountKeyToMap called with key: ".concat(e));const t=this.getAccountKeys();-1===t.indexOf(e)?(t.push(e),this.setItem(Ut.Oq.ACCOUNT_KEYS,JSON.stringify(t)),this.logger.verbose("BrowserCacheManager.addAccountKeyToMap account key added")):this.logger.verbose("BrowserCacheManager.addAccountKeyToMap account key already exists in map")}removeAccountKeyFromMap(e){this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap called"),this.logger.tracePii("BrowserCacheManager.removeAccountKeyFromMap called with key: ".concat(e));const t=this.getAccountKeys(),n=t.indexOf(e);n>-1?(t.splice(n,1),this.setItem(Ut.Oq.ACCOUNT_KEYS,JSON.stringify(t)),this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap account key removed")):this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap key not found in existing map")}async removeAccount(e){super.removeAccount(e),this.removeAccountKeyFromMap(e)}removeOutdatedAccount(e){this.removeItem(e),this.removeAccountKeyFromMap(e)}removeIdToken(e){super.removeIdToken(e),this.removeTokenKey(e,o.d3.ID_TOKEN)}async removeAccessToken(e){super.removeAccessToken(e),this.removeTokenKey(e,o.d3.ACCESS_TOKEN)}removeRefreshToken(e){super.removeRefreshToken(e),this.removeTokenKey(e,o.d3.REFRESH_TOKEN)}getTokenKeys(){this.logger.trace("BrowserCacheManager.getTokenKeys called");const e=this.getItem("".concat(Ut.Oq.TOKEN_KEYS,".").concat(this.clientId));if(e){const t=this.validateAndParseJson(e);if(t&&t.hasOwnProperty("idToken")&&t.hasOwnProperty("accessToken")&&t.hasOwnProperty("refreshToken"))return t;this.logger.error("BrowserCacheManager.getTokenKeys - Token keys found but in an unknown format. Returning empty key map.")}else this.logger.verbose("BrowserCacheManager.getTokenKeys - No token keys found");return{idToken:[],accessToken:[],refreshToken:[]}}addTokenKey(e,t){this.logger.trace("BrowserCacheManager addTokenKey called");const n=this.getTokenKeys();switch(t){case o.d3.ID_TOKEN:-1===n.idToken.indexOf(e)&&(this.logger.info("BrowserCacheManager: addTokenKey - idToken added to map"),n.idToken.push(e));break;case o.d3.ACCESS_TOKEN:-1===n.accessToken.indexOf(e)&&(this.logger.info("BrowserCacheManager: addTokenKey - accessToken added to map"),n.accessToken.push(e));break;case o.d3.REFRESH_TOKEN:-1===n.refreshToken.indexOf(e)&&(this.logger.info("BrowserCacheManager: addTokenKey - refreshToken added to map"),n.refreshToken.push(e));break;default:throw this.logger.error("BrowserCacheManager:addTokenKey - CredentialType provided invalid. CredentialType: ".concat(t)),te(U)}this.setItem("".concat(Ut.Oq.TOKEN_KEYS,".").concat(this.clientId),JSON.stringify(n))}removeTokenKey(e,t){this.logger.trace("BrowserCacheManager removeTokenKey called");const n=this.getTokenKeys();switch(t){case o.d3.ID_TOKEN:this.logger.infoPii("BrowserCacheManager: removeTokenKey - attempting to remove idToken with key: ".concat(e," from map"));const r=n.idToken.indexOf(e);r>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - idToken removed from map"),n.idToken.splice(r,1)):this.logger.info("BrowserCacheManager: removeTokenKey - idToken does not exist in map. Either it was previously removed or it was never added.");break;case o.d3.ACCESS_TOKEN:this.logger.infoPii("BrowserCacheManager: removeTokenKey - attempting to remove accessToken with key: ".concat(e," from map"));const i=n.accessToken.indexOf(e);i>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - accessToken removed from map"),n.accessToken.splice(i,1)):this.logger.info("BrowserCacheManager: removeTokenKey - accessToken does not exist in map. Either it was previously removed or it was never added.");break;case o.d3.REFRESH_TOKEN:this.logger.infoPii("BrowserCacheManager: removeTokenKey - attempting to remove refreshToken with key: ".concat(e," from map"));const a=n.refreshToken.indexOf(e);a>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - refreshToken removed from map"),n.refreshToken.splice(a,1)):this.logger.info("BrowserCacheManager: removeTokenKey - refreshToken does not exist in map. Either it was previously removed or it was never added.");break;default:throw this.logger.error("BrowserCacheManager:removeTokenKey - CredentialType provided invalid. CredentialType: ".concat(t)),te(U)}this.setItem("".concat(Ut.Oq.TOKEN_KEYS,".").concat(this.clientId),JSON.stringify(n))}getIdTokenCredential(e){const t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),this.removeTokenKey(e,o.d3.ID_TOKEN),null;const n=this.validateAndParseJson(t);return n&&ge(n)?(this.logger.trace("BrowserCacheManager.getIdTokenCredential: cache hit"),n):(this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),this.removeTokenKey(e,o.d3.ID_TOKEN),null)}setIdTokenCredential(e){this.logger.trace("BrowserCacheManager.setIdTokenCredential called");const t=le(e);this.setItem(t,JSON.stringify(e)),this.addTokenKey(t,o.d3.ID_TOKEN)}getAccessTokenCredential(e){const t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),this.removeTokenKey(e,o.d3.ACCESS_TOKEN),null;const n=this.validateAndParseJson(t);return n&&fe(n)?(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: cache hit"),n):(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),this.removeTokenKey(e,o.d3.ACCESS_TOKEN),null)}setAccessTokenCredential(e){this.logger.trace("BrowserCacheManager.setAccessTokenCredential called");const t=le(e);this.setItem(t,JSON.stringify(e)),this.addTokenKey(t,o.d3.ACCESS_TOKEN)}getRefreshTokenCredential(e){const t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),this.removeTokenKey(e,o.d3.REFRESH_TOKEN),null;const n=this.validateAndParseJson(t);return n&&me(n)?(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: cache hit"),n):(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),this.removeTokenKey(e,o.d3.REFRESH_TOKEN),null)}setRefreshTokenCredential(e){this.logger.trace("BrowserCacheManager.setRefreshTokenCredential called");const t=le(e);this.setItem(t,JSON.stringify(e)),this.addTokenKey(t,o.d3.REFRESH_TOKEN)}getAppMetadata(e){const t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null;const n=this.validateAndParseJson(t);return n&&(r=e,(i=n)&&0===r.indexOf(o.dg)&&i.hasOwnProperty("clientId")&&i.hasOwnProperty("environment"))?(this.logger.trace("BrowserCacheManager.getAppMetadata: cache hit"),n):(this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null);var r,i}setAppMetadata(e){this.logger.trace("BrowserCacheManager.setAppMetadata called");const t=function(e){let{environment:t,clientId:n}=e;return[o.dg,t,n].join(o.Bv.CACHE_KEY_SEPARATOR).toLowerCase()}(e);this.setItem(t,JSON.stringify(e))}getServerTelemetry(e){const t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null;const n=this.validateAndParseJson(t);return n&&function(e,t){const n=0===e.indexOf(o.HN.CACHE_KEY);let r=!0;return t&&(r=t.hasOwnProperty("failedRequests")&&t.hasOwnProperty("errors")&&t.hasOwnProperty("cacheHits")),n&&r}(e,n)?(this.logger.trace("BrowserCacheManager.getServerTelemetry: cache hit"),n):(this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null)}setServerTelemetry(e,t){this.logger.trace("BrowserCacheManager.setServerTelemetry called"),this.setItem(e,JSON.stringify(t))}getAuthorityMetadata(e){const t=this.internalStorage.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getAuthorityMetadata: called, no cache hit"),null;const n=this.validateAndParseJson(t);return n&&function(e,t){return!!t&&0===e.indexOf(o.QU.CACHE_KEY)&&t.hasOwnProperty("aliases")&&t.hasOwnProperty("preferred_cache")&&t.hasOwnProperty("preferred_network")&&t.hasOwnProperty("canonical_authority")&&t.hasOwnProperty("authorization_endpoint")&&t.hasOwnProperty("token_endpoint")&&t.hasOwnProperty("issuer")&&t.hasOwnProperty("aliasesFromNetwork")&&t.hasOwnProperty("endpointsFromNetwork")&&t.hasOwnProperty("expiresAt")&&t.hasOwnProperty("jwks_uri")}(e,n)?(this.logger.trace("BrowserCacheManager.getAuthorityMetadata: cache hit"),n):null}getAuthorityMetadataKeys(){return this.internalStorage.getKeys().filter((e=>this.isAuthorityMetadata(e)))}setWrapperMetadata(e,t){this.internalStorage.setItem(Ut.Bs.WRAPPER_SKU,e),this.internalStorage.setItem(Ut.Bs.WRAPPER_VER,t)}getWrapperMetadata(){return[this.internalStorage.getItem(Ut.Bs.WRAPPER_SKU)||o.gT.EMPTY_STRING,this.internalStorage.getItem(Ut.Bs.WRAPPER_VER)||o.gT.EMPTY_STRING]}setAuthorityMetadata(e,t){this.logger.trace("BrowserCacheManager.setAuthorityMetadata called"),this.internalStorage.setItem(e,JSON.stringify(t))}getActiveAccount(){const e=this.generateCacheKey(o.Vi.ACTIVE_ACCOUNT_FILTERS),t=this.getItem(e);if(!t){this.logger.trace("BrowserCacheManager.getActiveAccount: No active account filters cache schema found, looking for legacy schema");const e=this.generateCacheKey(o.Vi.ACTIVE_ACCOUNT),t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found"),null;const n=this.getAccountInfoFilteredBy({localAccountId:t});return n?(this.logger.trace("BrowserCacheManager.getActiveAccount: Legacy active account cache schema found"),this.logger.trace("BrowserCacheManager.getActiveAccount: Adding active account filters cache schema"),this.setActiveAccount(n),n):null}const n=this.validateAndParseJson(t);return n?(this.logger.trace("BrowserCacheManager.getActiveAccount: Active account filters schema found"),this.getAccountInfoFilteredBy({homeAccountId:n.homeAccountId,localAccountId:n.localAccountId,tenantId:n.tenantId})):(this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found"),null)}setActiveAccount(e){const t=this.generateCacheKey(o.Vi.ACTIVE_ACCOUNT_FILTERS),n=this.generateCacheKey(o.Vi.ACTIVE_ACCOUNT);if(e){this.logger.verbose("setActiveAccount: Active account set");const r={homeAccountId:e.homeAccountId,localAccountId:e.localAccountId,tenantId:e.tenantId};this.browserStorage.setItem(t,JSON.stringify(r)),this.browserStorage.setItem(n,e.localAccountId)}else this.logger.verbose("setActiveAccount: No account passed, active account not set"),this.browserStorage.removeItem(t),this.browserStorage.removeItem(n)}getThrottlingCache(e){const t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null;const n=this.validateAndParseJson(t);return n&&function(e,t){let n=!1;e&&(n=0===e.indexOf(o.bb.THROTTLING_PREFIX));let r=!0;return t&&(r=t.hasOwnProperty("throttleTime")),n&&r}(e,n)?(this.logger.trace("BrowserCacheManager.getThrottlingCache: cache hit"),n):(this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null)}setThrottlingCache(e,t){this.logger.trace("BrowserCacheManager.setThrottlingCache called"),this.setItem(e,JSON.stringify(t))}getTemporaryCache(e,t){const n=t?this.generateCacheKey(e):e;if(this.cacheConfig.storeAuthStateInCookie){const e=this.getItemCookie(n);if(e)return this.logger.trace("BrowserCacheManager.getTemporaryCache: storeAuthStateInCookies set to true, retrieving from cookies"),e}const r=this.temporaryCacheStorage.getItem(n);if(!r){if(this.cacheConfig.cacheLocation===Ut.Ix.LocalStorage){const e=this.browserStorage.getItem(n);if(e)return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item found in local storage"),e}return this.logger.trace("BrowserCacheManager.getTemporaryCache: No cache item found in local storage"),null}return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item returned"),r}setTemporaryCache(e,t,n){const r=n?this.generateCacheKey(e):e;this.temporaryCacheStorage.setItem(r,t),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.setTemporaryCache: storeAuthStateInCookie set to true, setting item cookie"),this.setItemCookie(r,t))}removeItem(e){this.browserStorage.removeItem(e)}removeTemporaryItem(e){this.temporaryCacheStorage.removeItem(e),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.removeItem: storeAuthStateInCookie is true, clearing item cookie"),this.clearItemCookie(e))}getKeys(){return this.browserStorage.getKeys()}async clear(){await this.removeAllAccounts(),this.removeAppMetadata(),this.temporaryCacheStorage.getKeys().forEach((e=>{-1===e.indexOf(o.gT.CACHE_PREFIX)&&-1===e.indexOf(this.clientId)||this.removeTemporaryItem(e)})),this.browserStorage.getKeys().forEach((e=>{-1===e.indexOf(o.gT.CACHE_PREFIX)&&-1===e.indexOf(this.clientId)||this.browserStorage.removeItem(e)})),this.internalStorage.clear()}async clearTokensAndKeysWithClaims(e,t){e.addQueueMeasurement(Mt.ClearTokensAndKeysWithClaims,t);const n=this.getTokenKeys(),r=[];n.accessToken.forEach((e=>{const t=this.getAccessTokenCredential(e);null!==t&&void 0!==t&&t.requestedClaimsHash&&e.includes(t.requestedClaimsHash.toLowerCase())&&r.push(this.removeAccessToken(e))})),await Promise.all(r),r.length>0&&this.logger.warning("".concat(r.length," access tokens with claims in the cache keys have been removed from the cache."))}setItemCookie(e,t,n){let r="".concat(encodeURIComponent(e),"=").concat(encodeURIComponent(t),";path=/;SameSite=Lax;");if(n){const e=this.getCookieExpirationTime(n);r+="expires=".concat(e,";")}this.cacheConfig.secureCookies&&(r+="Secure;"),document.cookie=r}getItemCookie(e){const t="".concat(encodeURIComponent(e),"="),n=document.cookie.split(";");for(let r=0;r<n.length;r++){let e=n[r];for(;" "===e.charAt(0);)e=e.substring(1);if(0===e.indexOf(t))return decodeURIComponent(e.substring(t.length,e.length))}return o.gT.EMPTY_STRING}clearMsalCookies(){const e="".concat(o.gT.CACHE_PREFIX,".").concat(this.clientId);document.cookie.split(";").forEach((t=>{for(;" "===t.charAt(0);)t=t.substring(1);if(0===t.indexOf(e)){const e=t.split("=")[0];this.clearItemCookie(e)}}))}clearItemCookie(e){this.setItemCookie(e,o.gT.EMPTY_STRING,-1)}getCookieExpirationTime(e){const t=new Date;return new Date(t.getTime()+e*this.COOKIE_LIFE_MULTIPLIER).toUTCString()}generateCacheKey(e){return this.validateAndParseJson(e)?JSON.stringify(e):Je.startsWith(e,o.gT.CACHE_PREFIX)||Je.startsWith(e,o.Vi.ADAL_ID_TOKEN)?e:"".concat(o.gT.CACHE_PREFIX,".").concat(this.clientId,".").concat(e)}generateAuthorityKey(e){const{libraryState:{id:t}}=Or.parseRequestState(this.cryptoImpl,e);return this.generateCacheKey("".concat(Ut.c4.AUTHORITY,".").concat(t))}generateNonceKey(e){const{libraryState:{id:t}}=Or.parseRequestState(this.cryptoImpl,e);return this.generateCacheKey("".concat(Ut.c4.NONCE_IDTOKEN,".").concat(t))}generateStateKey(e){const{libraryState:{id:t}}=Or.parseRequestState(this.cryptoImpl,e);return this.generateCacheKey("".concat(Ut.c4.REQUEST_STATE,".").concat(t))}getCachedAuthority(e){const t=this.generateStateKey(e),n=this.getTemporaryCache(t);if(!n)return null;const r=this.generateAuthorityKey(n);return this.getTemporaryCache(r)}updateCacheEntries(e,t,n,r,o){this.logger.trace("BrowserCacheManager.updateCacheEntries called");const i=this.generateStateKey(e);this.setTemporaryCache(i,e,!1);const a=this.generateNonceKey(e);this.setTemporaryCache(a,t,!1);const s=this.generateAuthorityKey(e);if(this.setTemporaryCache(s,n,!1),o){const e={credential:o.homeAccountId,type:Pr};this.setTemporaryCache(Ut.c4.CCS_CREDENTIAL,JSON.stringify(e),!0)}else if(r){const e={credential:r,type:xr};this.setTemporaryCache(Ut.c4.CCS_CREDENTIAL,JSON.stringify(e),!0)}}resetRequestCache(e){this.logger.trace("BrowserCacheManager.resetRequestCache called"),e&&(this.temporaryCacheStorage.getKeys().forEach((t=>{-1!==t.indexOf(e)&&this.removeTemporaryItem(t)})),this.removeTemporaryItem(this.generateStateKey(e)),this.removeTemporaryItem(this.generateNonceKey(e)),this.removeTemporaryItem(this.generateAuthorityKey(e))),this.removeTemporaryItem(this.generateCacheKey(Ut.c4.REQUEST_PARAMS)),this.removeTemporaryItem(this.generateCacheKey(Ut.c4.ORIGIN_URI)),this.removeTemporaryItem(this.generateCacheKey(Ut.c4.URL_HASH)),this.removeTemporaryItem(this.generateCacheKey(Ut.c4.CORRELATION_ID)),this.removeTemporaryItem(this.generateCacheKey(Ut.c4.CCS_CREDENTIAL)),this.removeTemporaryItem(this.generateCacheKey(Ut.c4.NATIVE_REQUEST)),this.removeTemporaryItem(this.generateCacheKey(Ut.c4.REDIRECT_REQUEST)),this.setInteractionInProgress(!1)}cleanRequestByState(e){if(this.logger.trace("BrowserCacheManager.cleanRequestByState called"),e){const t=this.generateStateKey(e),n=this.temporaryCacheStorage.getItem(t);this.logger.infoPii("BrowserCacheManager.cleanRequestByState: Removing temporary cache items for state: ".concat(n)),this.resetRequestCache(n||o.gT.EMPTY_STRING)}this.clearMsalCookies()}cleanRequestByInteractionType(e){this.logger.trace("BrowserCacheManager.cleanRequestByInteractionType called"),this.temporaryCacheStorage.getKeys().forEach((t=>{if(-1===t.indexOf(Ut.c4.REQUEST_STATE))return;const n=this.temporaryCacheStorage.getItem(t);if(!n)return;const r=Dr(this.cryptoImpl,n);r&&r.interactionType===e&&(this.logger.infoPii("BrowserCacheManager.cleanRequestByInteractionType: Removing temporary cache items for state: ".concat(n)),this.resetRequestCache(n))})),this.clearMsalCookies(),this.setInteractionInProgress(!1)}generateRequestRetriedKey(){return"".concat(o.gT.CACHE_PREFIX,".").concat(Ut.c4.REQUEST_RETRY,".").concat(this.clientId)}getRequestRetried(){const e=this.generateRequestRetriedKey(),t=this.getTemporaryCache(e);return t?parseInt(t):null}setRequestRetried(){this.logger.trace("BrowserCacheManager.setRequestRetried called");const e=this.generateRequestRetriedKey();this.setTemporaryCache(e,"1",!1)}removeRequestRetried(){const e=this.generateRequestRetriedKey();this.removeTemporaryItem(e)}cacheRedirectRequest(e){this.logger.trace("BrowserCacheManager.cacheRedirectRequest called");const{...t}=e;delete t.onRedirectNavigate;const n=JSON.stringify(t);this.setTemporaryCache(Ut.c4.REDIRECT_REQUEST,n,!0)}getCachedRedirectRequest(){this.logger.trace("BrowserCacheManager.getCachedRedirectRequest called");const e=this.getTemporaryCache(Ut.c4.REDIRECT_REQUEST,!0);if(e){let n;this.removeTemporaryItem(this.generateCacheKey(Ut.c4.REDIRECT_REQUEST));try{n=JSON.parse(e)}catch(t){return this.logger.errorPii("Attempted to parse: ".concat(e)),void this.logger.error("Parsing cached redirect request threw with error: ".concat(t))}if(n)return n}else this.logger.error("No cached redirect request found.")}cacheCodeRequest(e){this.logger.trace("BrowserCacheManager.cacheCodeRequest called");const t=Jn(JSON.stringify(e));this.setTemporaryCache(Ut.c4.REQUEST_PARAMS,t,!0)}getCachedRequest(e){this.logger.trace("BrowserCacheManager.getCachedRequest called");const t=this.getTemporaryCache(Ut.c4.REQUEST_PARAMS,!0);if(!t)throw Dn(cn);let n;try{n=JSON.parse(Xn(t))}catch(r){throw this.logger.errorPii("Attempted to parse: ".concat(t)),this.logger.error("Parsing cached token request threw with error: ".concat(r)),Dn(ln)}if(this.removeTemporaryItem(this.generateCacheKey(Ut.c4.REQUEST_PARAMS)),!n.authority){const t=this.generateAuthorityKey(e),r=this.getTemporaryCache(t);if(!r)throw Dn(un);n.authority=r}return n}getCachedNativeRequest(){this.logger.trace("BrowserCacheManager.getCachedNativeRequest called");const e=this.getTemporaryCache(Ut.c4.NATIVE_REQUEST,!0);if(!e)return this.logger.trace("BrowserCacheManager.getCachedNativeRequest: No cached native request found"),null;const t=this.validateAndParseJson(e);return t||(this.logger.error("BrowserCacheManager.getCachedNativeRequest: Unable to parse native request"),null)}isInteractionInProgress(e){const t=this.getInteractionInProgress();return e?t===this.clientId:!!t}getInteractionInProgress(){const e="".concat(o.gT.CACHE_PREFIX,".").concat(Ut.c4.INTERACTION_STATUS_KEY);return this.getTemporaryCache(e,!1)}setInteractionInProgress(e){const t="".concat(o.gT.CACHE_PREFIX,".").concat(Ut.c4.INTERACTION_STATUS_KEY);if(e){if(this.getInteractionInProgress())throw Dn(Qt);this.setTemporaryCache(t,this.clientId,!1)}else e||this.getInteractionInProgress()!==this.clientId||this.removeTemporaryItem(t)}getLegacyLoginHint(){const e=this.getTemporaryCache(o.Vi.ADAL_ID_TOKEN);e&&(this.browserStorage.removeItem(o.Vi.ADAL_ID_TOKEN),this.logger.verbose("Cached ADAL id token retrieved."));const t=this.getTemporaryCache(o.Vi.ID_TOKEN,!0);t&&(this.browserStorage.removeItem(this.generateCacheKey(o.Vi.ID_TOKEN)),this.logger.verbose("Cached MSAL.js v1 id token retrieved"));const n=t||e;if(n){const e=ie(n,Xn);if(e.preferred_username)return this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, setting ADAL/MSAL v1 preferred_username as loginHint"),e.preferred_username;if(e.upn)return this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, setting ADAL/MSAL v1 upn as loginHint"),e.upn;this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, however, no account hint claim found. Enable preferred_username or upn id token claim to get SSO.")}return null}updateCredentialCacheKey(e,t){const n=le(t);if(e!==n){const r=this.getItem(e);if(r)return this.browserStorage.removeItem(e),this.setItem(n,r),this.logger.verbose("Updated an outdated ".concat(t.credentialType," cache key")),n;this.logger.error("Attempted to update an outdated ".concat(t.credentialType," cache key but no item matching the outdated key was found in storage"))}return e}async hydrateCache(e,t){var n,r,o;const i=ue(null===(n=e.account)||void 0===n?void 0:n.homeAccountId,null===(r=e.account)||void 0===r?void 0:r.environment,e.idToken,this.clientId,e.tenantId);let a;t.claims&&(a=await this.cryptoImpl.hashString(t.claims));const s={idToken:i,accessToken:de(null===(o=e.account)||void 0===o?void 0:o.homeAccountId,e.account.environment,e.accessToken,this.clientId,e.tenantId,e.scopes.join(" "),e.expiresOn?e.expiresOn.getTime()/1e3:0,e.extExpiresOn?e.extExpiresOn.getTime()/1e3:0,Xn,void 0,e.tokenType,void 0,t.sshKid,t.claims,a)};return this.saveCacheRecord(s)}async saveCacheRecord(e,t,n){try{await super.saveCacheRecord(e,t,n)}catch(r){if(r instanceof wt&&this.performanceClient&&n)try{const e=this.getTokenKeys();this.performanceClient.addFields({cacheRtCount:e.refreshToken.length,cacheIdCount:e.idToken.length,cacheAtCount:e.accessToken.length},n)}catch(r){}throw r}}}function Hr(){return window.parent!==window}function Fr(){return window.location.href.split("?")[0].split("#")[0]}function Br(){if("undefined"!==typeof window&&window.opener&&window.opener!==window&&"string"===typeof window.name&&0===window.name.indexOf("".concat(Ut.qx.POPUP_NAME_PREFIX,".")))throw Dn(nn)}function Kr(e){if(!e)throw Dn(_n)}function jr(e){!function(){if("undefined"===typeof window)throw Dn(pn)}(),function(){if(ht.hashContainsKnownProperties(window.location.hash)&&Hr())throw Dn(tn)}(),Br(),Kr(e)}function zr(e,t){if(jr(e),function(e){if(Hr()&&!e)throw Dn(en)}(t.system.allowRedirectInIframe),t.cache.cacheLocation===Ut.Ix.MemoryStorage&&!t.cache.storeAuthStateInCookie)throw(0,Mr.Z1)(Lr.xC)}function Wr(e){const t=document.createElement("link");t.rel="preconnect",t.href=new URL(e).origin,t.crossOrigin="anonymous",document.head.appendChild(t),window.setTimeout((()=>{try{document.head.removeChild(t)}catch{}}),1e4)}var Gr=n(3057);class Vr{constructor(e,t){this.eventCallbacks=new Map,this.logger=e,this.browserCrypto=t,this.listeningToStorageEvents=!1,this.handleAccountCacheChange=this.handleAccountCacheChange.bind(this)}addEventCallback(e){if("undefined"!==typeof window){const t=cr();return this.eventCallbacks.set(t,e),this.logger.verbose("Event callback registered with id: ".concat(t)),t}return null}removeEventCallback(e){this.eventCallbacks.delete(e),this.logger.verbose("Event callback ".concat(e," removed."))}enableAccountStorageEvents(){"undefined"!==typeof window&&(this.listeningToStorageEvents?this.logger.verbose("Account storage listener already registered."):(this.logger.verbose("Adding account storage listener."),this.listeningToStorageEvents=!0,window.addEventListener("storage",this.handleAccountCacheChange)))}disableAccountStorageEvents(){"undefined"!==typeof window&&(this.listeningToStorageEvents?(this.logger.verbose("Removing account storage listener."),window.removeEventListener("storage",this.handleAccountCacheChange),this.listeningToStorageEvents=!1):this.logger.verbose("No account storage listener registered."))}emitEvent(e,t,n,r){if("undefined"!==typeof window){const o={eventType:e,interactionType:t||null,payload:n||null,error:r||null,timestamp:Date.now()};this.logger.info("Emitting event: ".concat(e)),this.eventCallbacks.forEach(((t,n)=>{this.logger.verbose("Emitting event to callback ".concat(n,": ").concat(e)),t.apply(null,[o])}))}}handleAccountCacheChange(e){try{var t;null!==(t=e.key)&&void 0!==t&&t.includes(o.Vi.ACTIVE_ACCOUNT_FILTERS)&&this.emitEvent(Gr.t.ACTIVE_ACCOUNT_CHANGED);const n=e.newValue||e.oldValue;if(!n)return;const r=JSON.parse(n);if("object"!==typeof r||!lt.isAccountEntity(r))return;const i=Tt.toObject(new lt,r).getAccountInfo();!e.oldValue&&e.newValue?(this.logger.info("Account was added to cache in a different window"),this.emitEvent(Gr.t.ACCOUNT_ADDED,void 0,i)):!e.newValue&&e.oldValue&&(this.logger.info("Account was removed from cache in a different window"),this.emitEvent(Gr.t.ACCOUNT_REMOVED,void 0,i))}catch(e){return}}}class Qr extends c.l4{constructor(e,t,n,r,o){super(e,t,n),this.name="ServerError",this.errorNo=r,this.status=o,Object.setPrototypeOf(this,Qr.prototype)}}class Zr{static generateThrottlingStorageKey(e){return"".concat(o.bb.THROTTLING_PREFIX,".").concat(JSON.stringify(e))}static preProcess(e,t){const n=Zr.generateThrottlingStorageKey(t),r=e.getThrottlingCache(n);if(r){var i;if(r.throttleTime<Date.now())return void e.removeItem(n);throw new Qr((null===(i=r.errorCodes)||void 0===i?void 0:i.join(" "))||o.gT.EMPTY_STRING,r.errorMessage,r.subError)}}static postProcess(e,t,n){if(Zr.checkResponseStatus(n)||Zr.checkResponseForRetryAfter(n)){const r={throttleTime:Zr.calculateThrottleTime(parseInt(n.headers[o.SZ.RETRY_AFTER])),error:n.body.error,errorCodes:n.body.error_codes,errorMessage:n.body.error_description,subError:n.body.suberror};e.setThrottlingCache(Zr.generateThrottlingStorageKey(t),r)}}static checkResponseStatus(e){return 429===e.status||e.status>=500&&e.status<600}static checkResponseForRetryAfter(e){return!!e.headers&&(e.headers.hasOwnProperty(o.SZ.RETRY_AFTER)&&(e.status<200||e.status>=300))}static calculateThrottleTime(e){const t=e<=0?0:e,n=Date.now()/1e3;return Math.floor(1e3*Math.min(n+(t||o.bb.DEFAULT_THROTTLE_TIME_SECONDS),n+o.bb.DEFAULT_MAX_THROTTLE_TIME_SECONDS))}static removeThrottle(e,t,n,r){const o={clientId:t,authority:n.authority,scopes:n.scopes,homeAccountIdentifier:r,claims:n.claims,authenticationScheme:n.authenticationScheme,resourceRequestMethod:n.resourceRequestMethod,resourceRequestUri:n.resourceRequestUri,shrClaims:n.shrClaims,sshKid:n.sshKid},i=this.generateThrottlingStorageKey(o);e.removeItem(i)}}class Yr{constructor(e,t){this.networkClient=e,this.cacheManager=t}async sendPostRequest(e,t,n){let r;Zr.preProcess(this.cacheManager,e);try{r=await this.networkClient.sendPostRequestAsync(t,n)}catch(o){throw o instanceof c.l4?o:te(f)}return Zr.postProcess(this.cacheManager,e,r),r}}const Jr="client_id",$r="response_type",Xr="token_type",eo="req_cnf",to="return_spa_code";class no{static validateRedirectUri(e){if(!e)throw Ye(Ae)}static validatePrompt(e){const t=[];for(const n in o.NJ)t.push(o.NJ[n]);if(t.indexOf(e)<0)throw Ye(Pe)}static validateClaims(e){try{JSON.parse(e)}catch(t){throw Ye(xe)}}static validateCodeChallengeParams(e,t){if(!e||!t)throw Ye(De);this.validateCodeChallengeMethod(t)}static validateCodeChallengeMethod(e){if([o.VX.PLAIN,o.VX.S256].indexOf(e)<0)throw Ye(qe)}}class ro{constructor(){this.parameters=new Map}addResponseTypeCode(){this.parameters.set($r,encodeURIComponent(o.gT.CODE_RESPONSE_TYPE))}addResponseTypeForTokenAndIdToken(){this.parameters.set($r,encodeURIComponent("".concat(o.gT.TOKEN_RESPONSE_TYPE," ").concat(o.gT.ID_TOKEN_RESPONSE_TYPE)))}addResponseMode(e){this.parameters.set("response_mode",encodeURIComponent(e||o.vw.QUERY))}addNativeBroker(){this.parameters.set("nativebroker",encodeURIComponent("1"))}addScopes(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o.f_;!t||n.includes("openid")||e.includes("openid")||n.push("openid");const r=t?[...e||[],...n]:e||[],i=new $e(r);this.parameters.set("scope",encodeURIComponent(i.printScopes()))}addClientId(e){this.parameters.set(Jr,encodeURIComponent(e))}addRedirectUri(e){no.validateRedirectUri(e),this.parameters.set("redirect_uri",encodeURIComponent(e))}addPostLogoutRedirectUri(e){no.validateRedirectUri(e),this.parameters.set("post_logout_redirect_uri",encodeURIComponent(e))}addIdTokenHint(e){this.parameters.set("id_token_hint",encodeURIComponent(e))}addDomainHint(e){this.parameters.set("domain_hint",encodeURIComponent(e))}addLoginHint(e){this.parameters.set("login_hint",encodeURIComponent(e))}addCcsUpn(e){this.parameters.set(o.SZ.CCS_HEADER,encodeURIComponent("UPN:".concat(e)))}addCcsOid(e){this.parameters.set(o.SZ.CCS_HEADER,encodeURIComponent("Oid:".concat(e.uid,"@").concat(e.utid)))}addSid(e){this.parameters.set("sid",encodeURIComponent(e))}addClaims(e,t){const n=this.addClientCapabilitiesToClaims(e,t);no.validateClaims(n),this.parameters.set("claims",encodeURIComponent(n))}addCorrelationId(e){this.parameters.set("client-request-id",encodeURIComponent(e))}addLibraryInfo(e){this.parameters.set("x-client-SKU",e.sku),this.parameters.set("x-client-VER",e.version),e.os&&this.parameters.set("x-client-OS",e.os),e.cpu&&this.parameters.set("x-client-CPU",e.cpu)}addApplicationTelemetry(e){null!==e&&void 0!==e&&e.appName&&this.parameters.set("x-app-name",e.appName),null!==e&&void 0!==e&&e.appVersion&&this.parameters.set("x-app-ver",e.appVersion)}addPrompt(e){no.validatePrompt(e),this.parameters.set("".concat("prompt"),encodeURIComponent(e))}addState(e){e&&this.parameters.set("state",encodeURIComponent(e))}addNonce(e){this.parameters.set("nonce",encodeURIComponent(e))}addCodeChallengeParams(e,t){if(no.validateCodeChallengeParams(e,t),!e||!t)throw Ye(De);this.parameters.set("code_challenge",encodeURIComponent(e)),this.parameters.set("code_challenge_method",encodeURIComponent(t))}addAuthorizationCode(e){this.parameters.set("code",encodeURIComponent(e))}addDeviceCode(e){this.parameters.set("device_code",encodeURIComponent(e))}addRefreshToken(e){this.parameters.set("refresh_token",encodeURIComponent(e))}addCodeVerifier(e){this.parameters.set("code_verifier",encodeURIComponent(e))}addClientSecret(e){this.parameters.set("client_secret",encodeURIComponent(e))}addClientAssertion(e){e&&this.parameters.set("client_assertion",encodeURIComponent(e))}addClientAssertionType(e){e&&this.parameters.set("client_assertion_type",encodeURIComponent(e))}addOboAssertion(e){this.parameters.set("assertion",encodeURIComponent(e))}addRequestTokenUse(e){this.parameters.set("requested_token_use",encodeURIComponent(e))}addGrantType(e){this.parameters.set("grant_type",encodeURIComponent(e))}addClientInfo(){this.parameters.set(o.sR,"1")}addExtraQueryParameters(e){Object.entries(e).forEach((e=>{let[t,n]=e;!this.parameters.has(t)&&n&&this.parameters.set(t,n)}))}addClientCapabilitiesToClaims(e,t){let n;if(e)try{n=JSON.parse(e)}catch(r){throw Ye(xe)}else n={};return t&&t.length>0&&(n.hasOwnProperty(o.As.ACCESS_TOKEN)||(n[o.As.ACCESS_TOKEN]={}),n[o.As.ACCESS_TOKEN][o.As.XMS_CC]={values:t}),JSON.stringify(n)}addUsername(e){this.parameters.set(o.Ge.username,encodeURIComponent(e))}addPassword(e){this.parameters.set(o.Ge.password,encodeURIComponent(e))}addPopToken(e){e&&(this.parameters.set(Xr,o.hO.POP),this.parameters.set(eo,encodeURIComponent(e)))}addSshJwk(e){e&&(this.parameters.set(Xr,o.hO.SSH),this.parameters.set(eo,encodeURIComponent(e)))}addServerTelemetry(e){this.parameters.set("x-client-current-telemetry",e.generateCurrentRequestHeaderValue()),this.parameters.set("x-client-last-telemetry",e.generateLastRequestHeaderValue())}addThrottling(){this.parameters.set("x-ms-lib-capability",o.bb.X_MS_LIB_CAPABILITY_VALUE)}addLogoutHint(e){this.parameters.set("logout_hint",encodeURIComponent(e))}createQueryString(){const e=new Array;return this.parameters.forEach(((t,n)=>{e.push("".concat(n,"=").concat(t))})),e.join("&")}}async function oo(e,t,n,r,o,i,a){null===a||void 0===a||a.addQueueMeasurement(Mt.AuthorityFactoryCreateDiscoveredInstance,i);const s=Cr.transformCIAMAuthority(br(e)),c=new Cr(s,t,n,r,o,i,a);try{return await vr(c.resolveEndpointsAsync.bind(c),Mt.AuthorityResolveEndpointsAsync,o,a,i)(),c}catch(l){throw te(p)}}class io{constructor(e,t){this.config=function(e){let{authOptions:t,systemOptions:n,loggerOptions:o,cacheOptions:i,storageInterface:a,networkInterface:s,cryptoInterface:c,clientCredentials:l,libraryInfo:u,telemetry:d,serverTelemetryManager:h,persistencePlugin:p,serializableCache:f}=e;const g={...Et,...o};return{authOptions:(m=t,{clientCapabilities:[],azureCloudOptions:Nt,skipAuthorityMetadataCache:!1,...m}),systemOptions:{...kt,...n},loggerOptions:g,cacheOptions:{...At,...i},storageInterface:a||new St(t.clientId,ne,new r.Y(g)),networkInterface:s||It,cryptoInterface:c||ne,clientCredentials:l||_t,libraryInfo:{...Rt,...u},telemetry:{...Ot,...d},serverTelemetryManager:h||null,persistencePlugin:p||null,serializableCache:f||null};var m}(e),this.logger=new r.Y(this.config.loggerOptions,re,oe),this.cryptoUtils=this.config.cryptoInterface,this.cacheManager=this.config.storageInterface,this.networkClient=this.config.networkInterface,this.networkManager=new Yr(this.networkClient,this.cacheManager),this.serverTelemetryManager=this.config.serverTelemetryManager,this.authority=this.config.authOptions.authority,this.performanceClient=t}createTokenRequestHeaders(e){const t={};if(t[o.SZ.CONTENT_TYPE]=o.gT.URL_FORM_CONTENT_TYPE,!this.config.systemOptions.preventCorsPreflight&&e)switch(e.type){case Pr:try{const n=et(e.credential);t[o.SZ.CCS_HEADER]="Oid:".concat(n.uid,"@").concat(n.utid)}catch(n){this.logger.verbose("Could not parse home account ID for CCS Header: "+n)}break;case xr:t[o.SZ.CCS_HEADER]="UPN: ".concat(e.credential)}return t}async executePostToTokenEndpoint(e,t,n,r,i,a){var s,c,l,u;a&&(null===(u=this.performanceClient)||void 0===u||u.addQueueMeasurement(a,i));const d=await this.networkManager.sendPostRequest(r,e,{body:t,headers:n});return null===(s=this.performanceClient)||void 0===s||s.addFields({refreshTokenSize:(null===(c=d.body.refresh_token)||void 0===c?void 0:c.length)||0,httpVerToken:(null===(l=d.headers)||void 0===l?void 0:l[o.SZ.X_MS_HTTP_VERSION])||""},i),this.config.serverTelemetryManager&&d.status<500&&429!==d.status&&this.config.serverTelemetryManager.clearTelemetryCache(),d}async updateAuthority(e,t){var n;null===(n=this.performanceClient)||void 0===n||n.addQueueMeasurement(Mt.UpdateTokenEndpointAuthority,t);const r="https://".concat(e,"/").concat(this.authority.tenant,"/"),o=await oo(r,this.networkClient,this.cacheManager,this.authority.options,this.logger,t,this.performanceClient);this.authority=o}createTokenQueryParameters(e){const t=new ro;return e.tokenQueryParameters&&t.addExtraQueryParameters(e.tokenQueryParameters),t.createQueryString()}}const ao="sw";class so{constructor(e,t){this.cryptoUtils=e,this.performanceClient=t}async generateCnf(e,t){var n;null===(n=this.performanceClient)||void 0===n||n.addQueueMeasurement(Mt.PopTokenGenerateCnf,e.correlationId);const r=await vr(this.generateKid.bind(this),Mt.PopTokenGenerateCnf,t,this.performanceClient,e.correlationId)(e),o=this.cryptoUtils.base64UrlEncode(JSON.stringify(r));return{kid:r.kid,reqCnfString:o}}async generateKid(e){var t;null===(t=this.performanceClient)||void 0===t||t.addQueueMeasurement(Mt.PopTokenGenerateKid,e.correlationId);return{kid:await this.cryptoUtils.getPublicKeyThumbprint(e),xms_ksl:ao}}async signPopToken(e,t,n){return this.signPayload(e,t,n)}async signPayload(e,t,n,r){const{resourceRequestMethod:o,resourceRequestUri:i,shrClaims:a,shrNonce:s,shrOptions:c}=n,l=i?new ht(i):void 0,u=null===l||void 0===l?void 0:l.getUrlComponents();return this.cryptoUtils.signJwt({at:e,ts:se(),m:null===o||void 0===o?void 0:o.toUpperCase(),u:null===u||void 0===u?void 0:u.HostNameAndPort,nonce:s||this.cryptoUtils.createNewGuid(),p:null===u||void 0===u?void 0:u.AbsolutePath,q:null!==u&&void 0!==u&&u.QueryString?[[],u.QueryString]:void 0,client_claims:a||void 0,...r},t,c,n.correlationId)}}class co{constructor(e,t){this.cache=e,this.hasChanged=t}get cacheHasChanged(){return this.hasChanged}get tokenCache(){return this.cache}}class lo{constructor(e,t,n,r,o,i,a){this.clientId=e,this.cacheStorage=t,this.cryptoObj=n,this.logger=r,this.serializableCache=o,this.persistencePlugin=i,this.performanceClient=a}validateServerAuthorizationCodeResponse(e,t){if(!e.state||!t)throw e.state?te(C,"Cached State"):te(C,"Server State");let n,r;try{n=decodeURIComponent(e.state)}catch(o){throw te(v,e.state)}try{r=decodeURIComponent(t)}catch(o){throw te(v,e.state)}if(n!==r)throw te(y);if(e.error||e.error_description||e.suberror){const t=function(e){var t,n;const r="code=",o=null===(t=e.error_uri)||void 0===t?void 0:t.lastIndexOf(r);return o&&o>=0?null===(n=e.error_uri)||void 0===n?void 0:n.substring(o+5):void 0}(e);if(_r(e.error,e.error_description,e.suberror))throw new Rr(e.error||"",e.error_description,e.suberror,e.timestamp||"",e.trace_id||"",e.correlation_id||"",e.claims||"",t);throw new Qr(e.error||"",e.error_description,e.suberror,t)}}validateTokenResponse(e,t){if(e.error||e.error_description||e.suberror){var n;const r="Error(s): ".concat(e.error_codes||o.gT.NOT_AVAILABLE," - Timestamp: ").concat(e.timestamp||o.gT.NOT_AVAILABLE," - Description: ").concat(e.error_description||o.gT.NOT_AVAILABLE," - Correlation ID: ").concat(e.correlation_id||o.gT.NOT_AVAILABLE," - Trace ID: ").concat(e.trace_id||o.gT.NOT_AVAILABLE),i=null!==(n=e.error_codes)&&void 0!==n&&n.length?e.error_codes[0]:void 0,a=new Qr(e.error,r,e.suberror,i,e.status);if(t&&e.status&&e.status>=o.oj.SERVER_ERROR_RANGE_START&&e.status<=o.oj.SERVER_ERROR_RANGE_END)return void this.logger.warning("executeTokenRequest:validateTokenResponse - AAD is currently unavailable and the access token is unable to be refreshed.\n".concat(a));if(t&&e.status&&e.status>=o.oj.CLIENT_ERROR_RANGE_START&&e.status<=o.oj.CLIENT_ERROR_RANGE_END)return void this.logger.warning("executeTokenRequest:validateTokenResponse - AAD is currently available but is unable to refresh the access token.\n".concat(a));if(_r(e.error,e.error_description,e.suberror))throw new Rr(e.error,e.error_description,e.suberror,e.timestamp||o.gT.EMPTY_STRING,e.trace_id||o.gT.EMPTY_STRING,e.correlation_id||o.gT.EMPTY_STRING,e.claims||o.gT.EMPTY_STRING,i);throw a}}async handleServerTokenResponse(e,t,n,r,i,a,s,c,l){var u;let d,h;if(null===(u=this.performanceClient)||void 0===u||u.addQueueMeasurement(Mt.HandleServerTokenResponse,e.correlation_id),e.id_token){if(d=ie(e.id_token||o.gT.EMPTY_STRING,this.cryptoObj.base64Decode),i&&i.nonce&&d.nonce!==i.nonce)throw te(b);if(r.maxAge||0===r.maxAge){const e=d.auth_time;if(!e)throw te(w);ae(e,r.maxAge)}}this.homeAccountIdentifier=lt.generateHomeAccountId(e.client_info||o.gT.EMPTY_STRING,t.authorityType,this.logger,this.cryptoObj,d),i&&i.state&&(h=Or.parseRequestState(this.cryptoObj,i.state)),e.key_id=e.key_id||r.sshKid||void 0;const p=this.generateCacheRecord(e,t,n,r,d,a,i);let f;try{if(this.persistencePlugin&&this.serializableCache&&(this.logger.verbose("Persistence enabled, calling beforeCacheAccess"),f=new co(this.serializableCache,!0),await this.persistencePlugin.beforeCacheAccess(f)),s&&!c&&p.account){const e=p.account.generateAccountKey();if(!this.cacheStorage.getAccount(e,this.logger))return this.logger.warning("Account used to refresh tokens not in persistence, refreshed tokens will not be stored in the cache"),await lo.generateAuthenticationResult(this.cryptoObj,t,p,!1,r,d,h,void 0,l)}await this.cacheStorage.saveCacheRecord(p,r.storeInCache,r.correlationId)}finally{this.persistencePlugin&&this.serializableCache&&f&&(this.logger.verbose("Persistence enabled, calling afterCacheAccess"),await this.persistencePlugin.afterCacheAccess(f))}return lo.generateAuthenticationResult(this.cryptoObj,t,p,!1,r,d,h,e,l)}generateCacheRecord(e,t,n,r,o,i,a){const s=t.getPreferredCache();if(!s)throw te(L);const c=ct(o);let l,u;e.id_token&&o&&(l=ue(this.homeAccountIdentifier,s,e.id_token,this.clientId,c||""),u=uo(this.cacheStorage,t,this.homeAccountIdentifier,this.cryptoObj.base64Decode,o,e.client_info,s,c,a,void 0,this.logger));let d=null;if(e.access_token){const o=e.scope?$e.fromString(e.scope):new $e(r.scopes||[]),a=("string"===typeof e.expires_in?parseInt(e.expires_in,10):e.expires_in)||0,l=("string"===typeof e.ext_expires_in?parseInt(e.ext_expires_in,10):e.ext_expires_in)||0,u=("string"===typeof e.refresh_in?parseInt(e.refresh_in,10):e.refresh_in)||void 0,h=n+a,p=h+l,f=u&&u>0?n+u:void 0;d=de(this.homeAccountIdentifier,s,e.access_token,this.clientId,c||t.tenant||"",o.printScopes(),h,p,this.cryptoObj.base64Decode,f,e.token_type,i,e.key_id,r.claims,r.requestedClaimsHash)}let h=null;if(e.refresh_token){let t;if(e.refresh_token_expires_in){t=n+("string"===typeof e.refresh_token_expires_in?parseInt(e.refresh_token_expires_in,10):e.refresh_token_expires_in)}h=he(this.homeAccountIdentifier,s,e.refresh_token,this.clientId,e.foci,i,t)}let p=null;return e.foci&&(p={clientId:this.clientId,environment:s,familyId:e.foci}),{account:u,idToken:l,accessToken:d,refreshToken:h,appMetadata:p}}static async generateAuthenticationResult(e,t,n,r,i,a,s,c,l){var u,d,h,p,f;let g,m,v=o.gT.EMPTY_STRING,y=[],C=null,b=o.gT.EMPTY_STRING;if(n.accessToken){if(n.accessToken.tokenType!==o.hO.POP||i.popKid)v=n.accessToken.secret;else{const t=new so(e),{secret:r,keyId:o}=n.accessToken;if(!o)throw te(V);v=await t.signPopToken(r,o,i)}y=$e.fromString(n.accessToken.target).asArray(),C=new Date(1e3*Number(n.accessToken.expiresOn)),g=new Date(1e3*Number(n.accessToken.extendedExpiresOn)),n.accessToken.refreshOn&&(m=new Date(1e3*Number(n.accessToken.refreshOn)))}n.appMetadata&&(b=n.appMetadata.familyId===o.ch?o.ch:"");const w=(null===a||void 0===a?void 0:a.oid)||(null===a||void 0===a?void 0:a.sub)||"",T=(null===a||void 0===a?void 0:a.tid)||"";null!==c&&void 0!==c&&c.spa_accountid&&n.account&&(n.account.nativeAccountId=null===c||void 0===c?void 0:c.spa_accountid);const S=n.account?rt(n.account.getAccountInfo(),void 0,a,null===(u=n.idToken)||void 0===u?void 0:u.secret):null;return{authority:t.canonicalAuthority,uniqueId:w,tenantId:T,scopes:y,account:S,idToken:(null===n||void 0===n||null===(d=n.idToken)||void 0===d?void 0:d.secret)||"",idTokenClaims:a||{},accessToken:v,fromCache:r,expiresOn:C,extExpiresOn:g,refreshOn:m,correlationId:i.correlationId,requestId:l||o.gT.EMPTY_STRING,familyId:b,tokenType:(null===(h=n.accessToken)||void 0===h?void 0:h.tokenType)||o.gT.EMPTY_STRING,state:s?s.userRequestState:o.gT.EMPTY_STRING,cloudGraphHostName:(null===(p=n.account)||void 0===p?void 0:p.cloudGraphHostName)||o.gT.EMPTY_STRING,msGraphHost:(null===(f=n.account)||void 0===f?void 0:f.msGraphHost)||o.gT.EMPTY_STRING,code:null===c||void 0===c?void 0:c.spa_code,fromNativeBroker:!1}}}function uo(e,t,n,r,o,i,a,s,c,l,u){null===u||void 0===u||u.verbose("setCachedAccount called");const d=e.getAccountKeys().find((e=>e.startsWith(n)));let h=null;d&&(h=e.getAccount(d,u));const p=h||lt.createAccount({homeAccountId:n,idTokenClaims:o,clientInfo:i,environment:a,cloudGraphHostName:null===c||void 0===c?void 0:c.cloud_graph_host_name,msGraphHost:null===c||void 0===c?void 0:c.msgraph_host,nativeAccountId:l},t,r),f=p.tenantProfiles||[],g=s||p.realm;if(g&&!f.find((e=>e.tenantId===g))){const e=nt(n,p.localAccountId,g,o);f.push(e)}return p.tenantProfiles=f,p}async function ho(e,t,n){if("string"===typeof e)return e;return e({clientId:t,tokenEndpoint:n})}class po extends io{constructor(e,t){var n;super(e,t),this.includeRedirectUri=!0,this.oidcDefaultScopes=null===(n=this.config.authOptions.authority.options.OIDCOptions)||void 0===n?void 0:n.defaultScopes}async getAuthCodeUrl(e){var t;null===(t=this.performanceClient)||void 0===t||t.addQueueMeasurement(Mt.GetAuthCodeUrl,e.correlationId);const n=await vr(this.createAuthCodeUrlQueryString.bind(this),Mt.AuthClientCreateQueryString,this.logger,this.performanceClient,e.correlationId)(e);return ht.appendQueryString(this.authority.authorizationEndpoint,n)}async acquireToken(e,t){var n,r;if(null===(n=this.performanceClient)||void 0===n||n.addQueueMeasurement(Mt.AuthClientAcquireToken,e.correlationId),!e.code)throw te(A);const i=se(),a=await vr(this.executeTokenRequest.bind(this),Mt.AuthClientExecuteTokenRequest,this.logger,this.performanceClient,e.correlationId)(this.authority,e),s=null===(r=a.headers)||void 0===r?void 0:r[o.SZ.X_MS_REQUEST_ID],c=new lo(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin,this.performanceClient);return c.validateTokenResponse(a.body),vr(c.handleServerTokenResponse.bind(c),Mt.HandleServerTokenResponse,this.logger,this.performanceClient,e.correlationId)(a.body,this.authority,i,e,t,void 0,void 0,void 0,s)}handleFragmentResponse(e,t){if(new lo(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,null,null).validateServerAuthorizationCodeResponse(e,t),!e.code)throw te(z);return e}getLogoutUri(e){if(!e)throw Ye(Le);const t=this.createLogoutUrlQueryString(e);return ht.appendQueryString(this.authority.endSessionEndpoint,t)}async executeTokenRequest(e,t){var n,r;null===(n=this.performanceClient)||void 0===n||n.addQueueMeasurement(Mt.AuthClientExecuteTokenRequest,t.correlationId);const i=this.createTokenQueryParameters(t),a=ht.appendQueryString(e.tokenEndpoint,i),s=await vr(this.createTokenRequestBody.bind(this),Mt.AuthClientCreateTokenRequestBody,this.logger,this.performanceClient,t.correlationId)(t);let c;if(t.clientInfo)try{const e=Xe(t.clientInfo,this.cryptoUtils.base64Decode);c={credential:"".concat(e.uid).concat(o.Bv.CLIENT_INFO_SEPARATOR).concat(e.utid),type:Pr}}catch(d){this.logger.verbose("Could not parse client info for CCS Header: "+d)}const l=this.createTokenRequestHeaders(c||t.ccsCredential),u={clientId:(null===(r=t.tokenBodyParameters)||void 0===r?void 0:r.clientId)||this.config.authOptions.clientId,authority:e.canonicalAuthority,scopes:t.scopes,claims:t.claims,authenticationScheme:t.authenticationScheme,resourceRequestMethod:t.resourceRequestMethod,resourceRequestUri:t.resourceRequestUri,shrClaims:t.shrClaims,sshKid:t.sshKid};return vr(this.executePostToTokenEndpoint.bind(this),Mt.AuthorizationCodeClientExecutePostToTokenEndpoint,this.logger,this.performanceClient,t.correlationId)(a,s,l,u,t.correlationId,Mt.AuthorizationCodeClientExecutePostToTokenEndpoint)}async createTokenRequestBody(e){var t,n;null===(t=this.performanceClient)||void 0===t||t.addQueueMeasurement(Mt.AuthClientCreateTokenRequestBody,e.correlationId);const r=new ro;if(r.addClientId((null===(n=e.tokenBodyParameters)||void 0===n?void 0:n[Jr])||this.config.authOptions.clientId),this.includeRedirectUri?r.addRedirectUri(e.redirectUri):no.validateRedirectUri(e.redirectUri),r.addScopes(e.scopes,!0,this.oidcDefaultScopes),r.addAuthorizationCode(e.code),r.addLibraryInfo(this.config.libraryInfo),r.addApplicationTelemetry(this.config.telemetry.application),r.addThrottling(),this.serverTelemetryManager&&!Pt(this.config)&&r.addServerTelemetry(this.serverTelemetryManager),e.codeVerifier&&r.addCodeVerifier(e.codeVerifier),this.config.clientCredentials.clientSecret&&r.addClientSecret(this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){const t=this.config.clientCredentials.clientAssertion;r.addClientAssertion(await ho(t.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),r.addClientAssertionType(t.assertionType)}if(r.addGrantType(o.qJ.AUTHORIZATION_CODE_GRANT),r.addClientInfo(),e.authenticationScheme===o.hO.POP){const t=new so(this.cryptoUtils,this.performanceClient);let n;if(e.popKid)n=this.cryptoUtils.encodeKid(e.popKid);else{n=(await vr(t.generateCnf.bind(t),Mt.PopTokenGenerateCnf,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString}r.addPopToken(n)}else if(e.authenticationScheme===o.hO.SSH){if(!e.sshJwk)throw Ye(Be);r.addSshJwk(e.sshJwk)}const i=e.correlationId||this.config.cryptoInterface.createNewGuid();let a;if(r.addCorrelationId(i),(!Je.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&r.addClaims(e.claims,this.config.authOptions.clientCapabilities),e.clientInfo)try{const t=Xe(e.clientInfo,this.cryptoUtils.base64Decode);a={credential:"".concat(t.uid).concat(o.Bv.CLIENT_INFO_SEPARATOR).concat(t.utid),type:Pr}}catch(s){this.logger.verbose("Could not parse client info for CCS Header: "+s)}else a=e.ccsCredential;if(this.config.systemOptions.preventCorsPreflight&&a)switch(a.type){case Pr:try{const e=et(a.credential);r.addCcsOid(e)}catch(s){this.logger.verbose("Could not parse home account ID for CCS Header: "+s)}break;case xr:r.addCcsUpn(a.credential)}return e.tokenBodyParameters&&r.addExtraQueryParameters(e.tokenBodyParameters),!e.enableSpaAuthorizationCode||e.tokenBodyParameters&&e.tokenBodyParameters[to]||r.addExtraQueryParameters({[to]:"1"}),r.createQueryString()}async createAuthCodeUrlQueryString(e){var t,n;null===(t=this.performanceClient)||void 0===t||t.addQueueMeasurement(Mt.AuthClientCreateQueryString,e.correlationId);const r=new ro;r.addClientId((null===(n=e.extraQueryParameters)||void 0===n?void 0:n[Jr])||this.config.authOptions.clientId);const i=[...e.scopes||[],...e.extraScopesToConsent||[]];r.addScopes(i,!0,this.oidcDefaultScopes),r.addRedirectUri(e.redirectUri);const a=e.correlationId||this.config.cryptoInterface.createNewGuid();if(r.addCorrelationId(a),r.addResponseMode(e.responseMode),r.addResponseTypeCode(),r.addLibraryInfo(this.config.libraryInfo),Pt(this.config)||r.addApplicationTelemetry(this.config.telemetry.application),r.addClientInfo(),e.codeChallenge&&e.codeChallengeMethod&&r.addCodeChallengeParams(e.codeChallenge,e.codeChallengeMethod),e.prompt&&r.addPrompt(e.prompt),e.domainHint&&r.addDomainHint(e.domainHint),e.prompt!==o.NJ.SELECT_ACCOUNT)if(e.sid&&e.prompt===o.NJ.NONE)this.logger.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from request"),r.addSid(e.sid);else if(e.account){const t=this.extractAccountSid(e.account);let n=this.extractLoginHint(e.account);if(n&&e.domainHint&&(this.logger.warning('AuthorizationCodeClient.createAuthCodeUrlQueryString: "domainHint" param is set, skipping opaque "login_hint" claim. Please consider not passing domainHint'),n=null),n){this.logger.verbose("createAuthCodeUrlQueryString: login_hint claim present on account"),r.addLoginHint(n);try{const t=et(e.account.homeAccountId);r.addCcsOid(t)}catch(s){this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(t&&e.prompt===o.NJ.NONE){this.logger.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from account"),r.addSid(t);try{const t=et(e.account.homeAccountId);r.addCcsOid(t)}catch(s){this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(e.loginHint)this.logger.verbose("createAuthCodeUrlQueryString: Adding login_hint from request"),r.addLoginHint(e.loginHint),r.addCcsUpn(e.loginHint);else if(e.account.username){this.logger.verbose("createAuthCodeUrlQueryString: Adding login_hint from account"),r.addLoginHint(e.account.username);try{const t=et(e.account.homeAccountId);r.addCcsOid(t)}catch(s){this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}}else e.loginHint&&(this.logger.verbose("createAuthCodeUrlQueryString: No account, adding login_hint from request"),r.addLoginHint(e.loginHint),r.addCcsUpn(e.loginHint));else this.logger.verbose("createAuthCodeUrlQueryString: Prompt is select_account, ignoring account hints");if(e.nonce&&r.addNonce(e.nonce),e.state&&r.addState(e.state),(e.claims||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&r.addClaims(e.claims,this.config.authOptions.clientCapabilities),e.extraQueryParameters&&r.addExtraQueryParameters(e.extraQueryParameters),e.nativeBroker&&(r.addNativeBroker(),e.authenticationScheme===o.hO.POP)){const t=new so(this.cryptoUtils);let n;if(e.popKid)n=this.cryptoUtils.encodeKid(e.popKid);else{n=(await vr(t.generateCnf.bind(t),Mt.PopTokenGenerateCnf,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString}r.addPopToken(n)}return r.createQueryString()}createLogoutUrlQueryString(e){const t=new ro;return e.postLogoutRedirectUri&&t.addPostLogoutRedirectUri(e.postLogoutRedirectUri),e.correlationId&&t.addCorrelationId(e.correlationId),e.idTokenHint&&t.addIdTokenHint(e.idTokenHint),e.state&&t.addState(e.state),e.logoutHint&&t.addLogoutHint(e.logoutHint),e.extraQueryParameters&&t.addExtraQueryParameters(e.extraQueryParameters),t.createQueryString()}extractAccountSid(e){var t;return(null===(t=e.idTokenClaims)||void 0===t?void 0:t.sid)||null}extractLoginHint(e){var t;return(null===(t=e.idTokenClaims)||void 0===t?void 0:t.login_hint)||null}}const fo="|";function go(e){const{skus:t,libraryName:n,libraryVersion:r,extensionName:o,extensionVersion:i}=e,a=new Map([[0,[n,r]],[2,[o,i]]]);let s=[];if(null!==t&&void 0!==t&&t.length){if(s=t.split(","),s.length<4)return t}else s=Array.from({length:4},(()=>fo));return a.forEach(((e,t)=>{var n,r;2===e.length&&null!==(n=e[0])&&void 0!==n&&n.length&&null!==(r=e[1])&&void 0!==r&&r.length&&function(e){const{skuArr:t,index:n,skuName:r,skuVersion:o}=e;if(n>=t.length)return;t[n]=[r,o].join(fo)}({skuArr:s,index:t,skuName:e[0],skuVersion:e[1]})})),s.join(",")}class mo{constructor(e,t){this.cacheOutcome=o.To.NOT_APPLICABLE,this.cacheManager=t,this.apiId=e.apiId,this.correlationId=e.correlationId,this.wrapperSKU=e.wrapperSKU||o.gT.EMPTY_STRING,this.wrapperVer=e.wrapperVer||o.gT.EMPTY_STRING,this.telemetryCacheKey=o.HN.CACHE_KEY+o.Bv.CACHE_KEY_SEPARATOR+e.clientId}generateCurrentRequestHeaderValue(){const e="".concat(this.apiId).concat(o.HN.VALUE_SEPARATOR).concat(this.cacheOutcome),t=[this.wrapperSKU,this.wrapperVer],n=this.getNativeBrokerErrorCode();null!==n&&void 0!==n&&n.length&&t.push("broker_error=".concat(n));const r=t.join(o.HN.VALUE_SEPARATOR),i=[e,this.getRegionDiscoveryFields()].join(o.HN.VALUE_SEPARATOR);return[o.HN.SCHEMA_VERSION,i,r].join(o.HN.CATEGORY_SEPARATOR)}generateLastRequestHeaderValue(){const e=this.getLastRequests(),t=mo.maxErrorsToSend(e),n=e.failedRequests.slice(0,2*t).join(o.HN.VALUE_SEPARATOR),r=e.errors.slice(0,t).join(o.HN.VALUE_SEPARATOR),i=e.errors.length,a=[i,t<i?o.HN.OVERFLOW_TRUE:o.HN.OVERFLOW_FALSE].join(o.HN.VALUE_SEPARATOR);return[o.HN.SCHEMA_VERSION,e.cacheHits,n,r,a].join(o.HN.CATEGORY_SEPARATOR)}cacheFailedRequest(e){const t=this.getLastRequests();t.errors.length>=o.HN.MAX_CACHED_ERRORS&&(t.failedRequests.shift(),t.failedRequests.shift(),t.errors.shift()),t.failedRequests.push(this.apiId,this.correlationId),e instanceof Error&&e&&e.toString()?e instanceof c.l4?e.subError?t.errors.push(e.subError):e.errorCode?t.errors.push(e.errorCode):t.errors.push(e.toString()):t.errors.push(e.toString()):t.errors.push(o.HN.UNKNOWN_ERROR),this.cacheManager.setServerTelemetry(this.telemetryCacheKey,t)}incrementCacheHits(){const e=this.getLastRequests();return e.cacheHits+=1,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,e),e.cacheHits}getLastRequests(){return this.cacheManager.getServerTelemetry(this.telemetryCacheKey)||{failedRequests:[],errors:[],cacheHits:0}}clearTelemetryCache(){const e=this.getLastRequests(),t=mo.maxErrorsToSend(e);if(t===e.errors.length)this.cacheManager.removeItem(this.telemetryCacheKey);else{const n={failedRequests:e.failedRequests.slice(2*t),errors:e.errors.slice(t),cacheHits:0};this.cacheManager.setServerTelemetry(this.telemetryCacheKey,n)}}static maxErrorsToSend(e){let t,n=0,r=0;const i=e.errors.length;for(t=0;t<i;t++){const i=e.failedRequests[2*t]||o.gT.EMPTY_STRING,a=e.failedRequests[2*t+1]||o.gT.EMPTY_STRING,s=e.errors[t]||o.gT.EMPTY_STRING;if(r+=i.toString().length+a.toString().length+s.length+3,!(r<o.HN.MAX_LAST_HEADER_BYTES))break;n+=1}return n}getRegionDiscoveryFields(){const e=[];return e.push(this.regionUsed||o.gT.EMPTY_STRING),e.push(this.regionSource||o.gT.EMPTY_STRING),e.push(this.regionOutcome||o.gT.EMPTY_STRING),e.join(",")}updateRegionDiscoveryMetadata(e){this.regionUsed=e.region_used,this.regionSource=e.region_source,this.regionOutcome=e.region_outcome}setCacheOutcome(e){this.cacheOutcome=e}setNativeBrokerErrorCode(e){const t=this.getLastRequests();t.nativeBrokerErrorCode=e,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,t)}getNativeBrokerErrorCode(){return this.getLastRequests().nativeBrokerErrorCode}clearNativeBrokerErrorCode(){const e=this.getLastRequests();delete e.nativeBrokerErrorCode,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,e)}static makeExtraSkuString(e){return go(e)}}class vo{constructor(e,t,n,r,o,i,a,s,c){this.config=e,this.browserStorage=t,this.browserCrypto=n,this.networkClient=this.config.system.networkClient,this.eventHandler=o,this.navigationClient=i,this.nativeMessageHandler=s,this.correlationId=c||cr(),this.logger=r.clone(Ut.qx.MSAL_SKU,Fn,this.correlationId),this.performanceClient=a}async clearCacheOnLogout(e){if(e){lt.accountInfoIsEqual(e,this.browserStorage.getActiveAccount(),!1)&&(this.logger.verbose("Setting active account to null"),this.browserStorage.setActiveAccount(null));try{await this.browserStorage.removeAccount(lt.generateAccountCacheKey(e)),this.logger.verbose("Cleared cache items belonging to the account provided in the logout request.")}catch(t){this.logger.error("Account provided in logout request was not found. Local cache unchanged.")}}else try{this.logger.verbose("No account provided in logout request, clearing all cache items.",this.correlationId),await this.browserStorage.clear(),await this.browserCrypto.clearKeystore()}catch(n){this.logger.error("Attempted to clear all MSAL cache items and failed. Local cache unchanged.")}}getRedirectUri(e){this.logger.verbose("getRedirectUri called");const t=e||this.config.auth.redirectUri||Fr();return ht.getAbsoluteUrl(t,Fr())}initializeServerTelemetryManager(e,t){this.logger.verbose("initializeServerTelemetryManager called");const n={clientId:this.config.auth.clientId,correlationId:this.correlationId,apiId:e,forceRefresh:t||!1,wrapperSKU:this.browserStorage.getWrapperMetadata()[0],wrapperVer:this.browserStorage.getWrapperMetadata()[1]};return new mo(n,this.browserStorage)}async getDiscoveredAuthority(e,t,n){this.performanceClient.addQueueMeasurement(Mt.StandardInteractionClientGetDiscoveredAuthority,this.correlationId);const r={protocolMode:this.config.auth.protocolMode,OIDCOptions:this.config.auth.OIDCOptions,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata,skipAuthorityMetadataCache:this.config.auth.skipAuthorityMetadataCache},o=e||this.config.auth.authority,i=Cr.generateAuthority(o,t||this.config.auth.azureCloudOptions),a=await vr(oo,Mt.AuthorityFactoryCreateDiscoveredInstance,this.logger,this.performanceClient,this.correlationId)(i,this.config.system.networkClient,this.browserStorage,r,this.logger,this.correlationId,this.performanceClient);if(n&&!a.isAlias(n.environment))throw Ye(Ve);return a}}const yo=32;async function Co(e,t,n){e.addQueueMeasurement(Mt.GeneratePkceCodes,n);const r=mr(bo,Mt.GenerateCodeVerifier,t,e,n)(e,t,n);return{verifier:r,challenge:await vr(wo,Mt.GenerateCodeChallengeFromVerifier,t,e,n)(r,e,t,n)}}function bo(e,t,n){try{const r=new Uint8Array(yo);mr(ar,Mt.GetRandomValues,t,e,n)(r);return Yn(r)}catch(r){throw Dn(Ft)}}async function wo(e,t,n,r){t.addQueueMeasurement(Mt.GenerateCodeChallengeFromVerifier,r);try{const o=await vr(ir,Mt.Sha256Digest,n,t,r)(e,t,r);return Yn(new Uint8Array(o))}catch(o){throw Dn(Ft)}}async function To(e,t,n,r){n.addQueueMeasurement(Mt.InitializeBaseRequest,e.correlationId);const i=e.authority||t.auth.authority,a=[...e&&e.scopes||[]],s={...e,correlationId:e.correlationId,authority:i,scopes:a};if(s.authenticationScheme){if(s.authenticationScheme===o.hO.SSH){if(!e.sshJwk)throw Ye(Be);if(!e.sshKid)throw Ye(Ke)}r.verbose('Authentication Scheme set to "'.concat(s.authenticationScheme,'" as configured in Auth request'))}else s.authenticationScheme=o.hO.BEARER,r.verbose('Authentication Scheme wasn\'t explicitly set in request, defaulting to "Bearer" request');return t.cache.claimsBasedCachingEnabled&&e.claims&&!Je.isEmptyObj(e.claims)&&(s.requestedClaimsHash=await ur(e.claims)),s}async function So(e,t,n,r,o){r.addQueueMeasurement(Mt.InitializeSilentRequest,e.correlationId);const i=await vr(To,Mt.InitializeBaseRequest,o,r,e.correlationId)(e,n,r,o);return{...e,...i,account:t,forceRefresh:e.forceRefresh||!1}}class ko extends vo{async initializeAuthorizationCodeRequest(e){this.performanceClient.addQueueMeasurement(Mt.StandardInteractionClientInitializeAuthorizationCodeRequest,this.correlationId);const t=await vr(Co,Mt.GeneratePkceCodes,this.logger,this.performanceClient,this.correlationId)(this.performanceClient,this.logger,this.correlationId),n={...e,redirectUri:e.redirectUri,code:o.gT.EMPTY_STRING,codeVerifier:t.verifier};return e.codeChallenge=t.challenge,e.codeChallengeMethod=o.gT.S256_CODE_CHALLENGE_METHOD,n}initializeLogoutRequest(e){this.logger.verbose("initializeLogoutRequest called",null===e||void 0===e?void 0:e.correlationId);const t={correlationId:this.correlationId||cr(),...e};if(e)if(e.logoutHint)this.logger.verbose("logoutHint has already been set in logoutRequest");else if(e.account){const n=this.getLogoutHintFromIdTokenClaims(e.account);n&&(this.logger.verbose("Setting logoutHint to login_hint ID Token Claim value for the account provided"),t.logoutHint=n)}else this.logger.verbose("logoutHint was not set and account was not passed into logout request, logoutHint will not be set");else this.logger.verbose("logoutHint will not be set since no logout request was configured");return e&&null===e.postLogoutRedirectUri?this.logger.verbose("postLogoutRedirectUri passed as null, not setting post logout redirect uri",t.correlationId):e&&e.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to uri set on logout request",t.correlationId),t.postLogoutRedirectUri=ht.getAbsoluteUrl(e.postLogoutRedirectUri,Fr())):null===this.config.auth.postLogoutRedirectUri?this.logger.verbose("postLogoutRedirectUri configured as null and no uri set on request, not passing post logout redirect",t.correlationId):this.config.auth.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to configured uri",t.correlationId),t.postLogoutRedirectUri=ht.getAbsoluteUrl(this.config.auth.postLogoutRedirectUri,Fr())):(this.logger.verbose("Setting postLogoutRedirectUri to current page",t.correlationId),t.postLogoutRedirectUri=ht.getAbsoluteUrl(Fr(),Fr())),t}getLogoutHintFromIdTokenClaims(e){const t=e.idTokenClaims;if(t){if(t.login_hint)return t.login_hint;this.logger.verbose("The ID Token Claims tied to the provided account do not contain a login_hint claim, logoutHint will not be added to logout request")}else this.logger.verbose("The provided account does not contain ID Token Claims, logoutHint will not be added to logout request");return null}async createAuthCodeClient(e,t,n,r){this.performanceClient.addQueueMeasurement(Mt.StandardInteractionClientCreateAuthCodeClient,this.correlationId);const o=await vr(this.getClientConfiguration.bind(this),Mt.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,this.correlationId)(e,t,n,r);return new po(o,this.performanceClient)}async getClientConfiguration(e,t,n,r){this.performanceClient.addQueueMeasurement(Mt.StandardInteractionClientGetClientConfiguration,this.correlationId);const i=await vr(this.getDiscoveredAuthority.bind(this),Mt.StandardInteractionClientGetDiscoveredAuthority,this.logger,this.performanceClient,this.correlationId)(t,n,r),a=this.config.system.loggerOptions;return{authOptions:{clientId:this.config.auth.clientId,authority:i,clientCapabilities:this.config.auth.clientCapabilities},systemOptions:{tokenRenewalOffsetSeconds:this.config.system.tokenRenewalOffsetSeconds,preventCorsPreflight:!0},loggerOptions:{loggerCallback:a.loggerCallback,piiLoggingEnabled:a.piiLoggingEnabled,logLevel:a.logLevel,correlationId:this.correlationId},cacheOptions:{claimsBasedCachingEnabled:this.config.cache.claimsBasedCachingEnabled},cryptoInterface:this.browserCrypto,networkInterface:this.networkClient,storageInterface:this.browserStorage,serverTelemetryManager:e,libraryInfo:{sku:Ut.qx.MSAL_SKU,version:Fn,cpu:o.gT.EMPTY_STRING,os:o.gT.EMPTY_STRING},telemetry:this.config.telemetry}}async initializeAuthorizationRequest(e,t){this.performanceClient.addQueueMeasurement(Mt.StandardInteractionClientInitializeAuthorizationRequest,this.correlationId);const n=this.getRedirectUri(e.redirectUri),r={interactionType:t},i=Or.setRequestState(this.browserCrypto,e&&e.state||o.gT.EMPTY_STRING,r),a={...await vr(To,Mt.InitializeBaseRequest,this.logger,this.performanceClient,this.correlationId)({...e,correlationId:this.correlationId},this.config,this.performanceClient,this.logger),redirectUri:n,state:i,nonce:e.nonce||cr(),responseMode:this.config.auth.OIDCOptions.serverResponseType},s=e.account||this.browserStorage.getActiveAccount();if(s&&(this.logger.verbose("Setting validated request account",this.correlationId),this.logger.verbosePii("Setting validated request account: ".concat(s.homeAccountId),this.correlationId),a.account=s),!a.loginHint&&!s){const e=this.browserStorage.getLegacyLoginHint();e&&(a.loginHint=e)}return a}}var Eo=n(7093);const Ao="user_switch",Io={[Ao]:"User attempted to switch accounts in the native broker, which is not allowed. All new accounts must sign-in through the standard web flow first, please try again."};class Ro extends c.l4{constructor(e,t,n){super(e,t),Object.setPrototypeOf(this,Ro.prototype),this.name="NativeAuthError",this.ext=n}}function _o(e){return!(!e.ext||!e.ext.status||"PERSISTENT_ERROR"!==e.ext.status&&"DISABLED"!==e.ext.status)||(!(!e.ext||!e.ext.error||-2147186943!==e.ext.error)||"ContentError"===e.errorCode)}function No(e,t,n){if(n&&n.status)switch(n.status){case"ACCOUNT_UNAVAILABLE":return Nr(Tr);case"USER_INTERACTION_REQUIRED":return new Rr(e,t);case"USER_CANCEL":return Dn(Jt);case"NO_NETWORK":return Dn(gn)}return new Ro(e,Io[e]||t,n)}class Oo extends io{constructor(e,t){super(e,t)}async acquireToken(e){var t,n;null===(t=this.performanceClient)||void 0===t||t.addQueueMeasurement(Mt.RefreshTokenClientAcquireToken,e.correlationId);const r=se(),i=await vr(this.executeTokenRequest.bind(this),Mt.RefreshTokenClientExecuteTokenRequest,this.logger,this.performanceClient,e.correlationId)(e,this.authority),a=null===(n=i.headers)||void 0===n?void 0:n[o.SZ.X_MS_REQUEST_ID],s=new lo(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin);return s.validateTokenResponse(i.body),vr(s.handleServerTokenResponse.bind(s),Mt.HandleServerTokenResponse,this.logger,this.performanceClient,e.correlationId)(i.body,this.authority,r,e,void 0,void 0,!0,e.forceCache,a)}async acquireTokenByRefreshToken(e){var t;if(!e)throw Ye(Me);if(null===(t=this.performanceClient)||void 0===t||t.addQueueMeasurement(Mt.RefreshTokenClientAcquireTokenByRefreshToken,e.correlationId),!e.account)throw te(x);if(this.cacheManager.isAppMetadataFOCI(e.account.environment))try{return await vr(this.acquireTokenWithCachedRefreshToken.bind(this),Mt.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,e.correlationId)(e,!0)}catch(n){const t=n instanceof Rr&&n.errorCode===wr,r=n instanceof Qr&&n.errorCode===o.D1.INVALID_GRANT_ERROR&&n.subError===o.D1.CLIENT_MISMATCH_ERROR;if(t||r)return vr(this.acquireTokenWithCachedRefreshToken.bind(this),Mt.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,e.correlationId)(e,!1);throw n}return vr(this.acquireTokenWithCachedRefreshToken.bind(this),Mt.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,e.correlationId)(e,!1)}async acquireTokenWithCachedRefreshToken(e,t){var n;null===(n=this.performanceClient)||void 0===n||n.addQueueMeasurement(Mt.RefreshTokenClientAcquireTokenWithCachedRefreshToken,e.correlationId);const r=mr(this.cacheManager.getRefreshToken.bind(this.cacheManager),Mt.CacheManagerGetRefreshToken,this.logger,this.performanceClient,e.correlationId)(e.account,t,void 0,this.performanceClient,e.correlationId);if(!r)throw Nr(wr);if(r.expiresOn&&ce(r.expiresOn,e.refreshTokenExpirationOffsetSeconds||300))throw Nr(Sr);const i={...e,refreshToken:r.secret,authenticationScheme:e.authenticationScheme||o.hO.BEARER,ccsCredential:{credential:e.account.homeAccountId,type:Pr}};try{return await vr(this.acquireToken.bind(this),Mt.RefreshTokenClientAcquireToken,this.logger,this.performanceClient,e.correlationId)(i)}catch(a){if(a instanceof Rr&&a.subError===kr){this.logger.verbose("acquireTokenWithRefreshToken: bad refresh token, removing from cache");const e=le(r);this.cacheManager.removeRefreshToken(e)}throw a}}async executeTokenRequest(e,t){var n,r;null===(n=this.performanceClient)||void 0===n||n.addQueueMeasurement(Mt.RefreshTokenClientExecuteTokenRequest,e.correlationId);const o=this.createTokenQueryParameters(e),i=ht.appendQueryString(t.tokenEndpoint,o),a=await vr(this.createTokenRequestBody.bind(this),Mt.RefreshTokenClientCreateTokenRequestBody,this.logger,this.performanceClient,e.correlationId)(e),s=this.createTokenRequestHeaders(e.ccsCredential),c={clientId:(null===(r=e.tokenBodyParameters)||void 0===r?void 0:r.clientId)||this.config.authOptions.clientId,authority:t.canonicalAuthority,scopes:e.scopes,claims:e.claims,authenticationScheme:e.authenticationScheme,resourceRequestMethod:e.resourceRequestMethod,resourceRequestUri:e.resourceRequestUri,shrClaims:e.shrClaims,sshKid:e.sshKid};return vr(this.executePostToTokenEndpoint.bind(this),Mt.RefreshTokenClientExecutePostToTokenEndpoint,this.logger,this.performanceClient,e.correlationId)(i,a,s,c,e.correlationId,Mt.RefreshTokenClientExecutePostToTokenEndpoint)}async createTokenRequestBody(e){var t,n,r;null===(t=this.performanceClient)||void 0===t||t.addQueueMeasurement(Mt.RefreshTokenClientCreateTokenRequestBody,e.correlationId);const i=e.correlationId,a=new ro;if(a.addClientId((null===(n=e.tokenBodyParameters)||void 0===n?void 0:n[Jr])||this.config.authOptions.clientId),e.redirectUri&&a.addRedirectUri(e.redirectUri),a.addScopes(e.scopes,!0,null===(r=this.config.authOptions.authority.options.OIDCOptions)||void 0===r?void 0:r.defaultScopes),a.addGrantType(o.qJ.REFRESH_TOKEN_GRANT),a.addClientInfo(),a.addLibraryInfo(this.config.libraryInfo),a.addApplicationTelemetry(this.config.telemetry.application),a.addThrottling(),this.serverTelemetryManager&&!Pt(this.config)&&a.addServerTelemetry(this.serverTelemetryManager),a.addCorrelationId(i),a.addRefreshToken(e.refreshToken),this.config.clientCredentials.clientSecret&&a.addClientSecret(this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){const t=this.config.clientCredentials.clientAssertion;a.addClientAssertion(await ho(t.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),a.addClientAssertionType(t.assertionType)}if(e.authenticationScheme===o.hO.POP){const t=new so(this.cryptoUtils,this.performanceClient);let n;if(e.popKid)n=this.cryptoUtils.encodeKid(e.popKid);else{n=(await vr(t.generateCnf.bind(t),Mt.PopTokenGenerateCnf,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString}a.addPopToken(n)}else if(e.authenticationScheme===o.hO.SSH){if(!e.sshJwk)throw Ye(Be);a.addSshJwk(e.sshJwk)}if((!Je.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&a.addClaims(e.claims,this.config.authOptions.clientCapabilities),this.config.systemOptions.preventCorsPreflight&&e.ccsCredential)switch(e.ccsCredential.type){case Pr:try{const t=et(e.ccsCredential.credential);a.addCcsOid(t)}catch(s){this.logger.verbose("Could not parse home account ID for CCS Header: "+s)}break;case xr:a.addCcsUpn(e.ccsCredential.credential)}return e.tokenBodyParameters&&a.addExtraQueryParameters(e.tokenBodyParameters),a.createQueryString()}}class Po extends io{constructor(e,t){super(e,t)}async acquireToken(e){try{var t;const[n,r]=await this.acquireCachedToken({...e,scopes:null!==(t=e.scopes)&&void 0!==t&&t.length?e.scopes:[...o.f_]});if(r===o.To.PROACTIVELY_REFRESHED){this.logger.info("SilentFlowClient:acquireCachedToken - Cached access token's refreshOn property has been exceeded'. It's not expired, but must be refreshed.");new Oo(this.config,this.performanceClient).acquireTokenByRefreshToken(e).catch((()=>{}))}return n}catch(n){if(n instanceof ee&&n.errorCode===B){return new Oo(this.config,this.performanceClient).acquireTokenByRefreshToken(e)}throw n}}async acquireCachedToken(e){var t;null===(t=this.performanceClient)||void 0===t||t.addQueueMeasurement(Mt.SilentFlowClientAcquireCachedToken,e.correlationId);let n=o.To.NOT_APPLICABLE;if(e.forceRefresh||!this.config.cacheOptions.claimsBasedCachingEnabled&&!Je.isEmptyObj(e.claims))throw this.setCacheOutcome(o.To.FORCE_REFRESH_OR_CLAIMS,e.correlationId),te(B);if(!e.account)throw te(x);const r=e.account.tenantId||function(e){var t;const n=null===(t=new ht(e).getUrlComponents().PathSegments.slice(-1)[0])||void 0===t?void 0:t.toLowerCase();switch(n){case o.Nb.COMMON:case o.Nb.ORGANIZATIONS:case o.Nb.CONSUMERS:return;default:return n}}(e.authority),i=this.cacheManager.getTokenKeys(),a=this.cacheManager.getAccessToken(e.account,e,i,r,this.performanceClient,e.correlationId);if(!a)throw this.setCacheOutcome(o.To.NO_CACHED_ACCESS_TOKEN,e.correlationId),te(B);if(s=a.cachedAt,Number(s)>se()||ce(a.expiresOn,this.config.systemOptions.tokenRenewalOffsetSeconds))throw this.setCacheOutcome(o.To.CACHED_ACCESS_TOKEN_EXPIRED,e.correlationId),te(B);var s;a.refreshOn&&ce(a.refreshOn,0)&&(n=o.To.PROACTIVELY_REFRESHED);const c=e.authority||this.authority.getPreferredCache(),l={account:this.cacheManager.readAccountFromCache(e.account),accessToken:a,idToken:this.cacheManager.getIdToken(e.account,i,r,this.performanceClient,e.correlationId),refreshToken:null,appMetadata:this.cacheManager.readAppMetadataFromCache(c)};return this.setCacheOutcome(n,e.correlationId),this.config.serverTelemetryManager&&this.config.serverTelemetryManager.incrementCacheHits(),[await vr(this.generateResultFromCacheRecord.bind(this),Mt.SilentFlowClientGenerateResultFromCacheRecord,this.logger,this.performanceClient,e.correlationId)(l,e),n]}setCacheOutcome(e,t){var n,r;null===(n=this.serverTelemetryManager)||void 0===n||n.setCacheOutcome(e),null===(r=this.performanceClient)||void 0===r||r.addFields({cacheOutcome:e},t),e!==o.To.NOT_APPLICABLE&&this.logger.info("Token refresh is required due to cache outcome: ".concat(e))}async generateResultFromCacheRecord(e,t){var n;let r;if(null===(n=this.performanceClient)||void 0===n||n.addQueueMeasurement(Mt.SilentFlowClientGenerateResultFromCacheRecord,t.correlationId),e.idToken&&(r=ie(e.idToken.secret,this.config.cryptoInterface.base64Decode)),t.maxAge||0===t.maxAge){var o;const e=null===(o=r)||void 0===o?void 0:o.auth_time;if(!e)throw te(w);ae(e,t.maxAge)}return lo.generateAuthenticationResult(this.cryptoUtils,this.authority,e,!0,t,r)}}class xo extends ko{async acquireToken(e){this.performanceClient.addQueueMeasurement(Mt.SilentCacheClientAcquireToken,e.correlationId);const t=this.initializeServerTelemetryManager(Ut.WN.acquireTokenSilent_silentFlow),n=await vr(this.getClientConfiguration.bind(this),Mt.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,this.correlationId)(t,e.authority,e.azureCloudOptions,e.account),r=new Po(n,this.performanceClient);this.logger.verbose("Silent auth client created");try{const t=(await vr(r.acquireCachedToken.bind(r),Mt.SilentFlowClientAcquireCachedToken,this.logger,this.performanceClient,e.correlationId)(e))[0];return this.performanceClient.addFields({fromCache:!0},e.correlationId),t}catch(o){throw o instanceof qn&&o.errorCode===bn&&this.logger.verbose("Signing keypair for bound access token not found. Refreshing bound access token and generating a new crypto keypair."),o}}logout(e){this.logger.verbose("logoutRedirect called");const t=this.initializeLogoutRequest(e);return this.clearCacheOnLogout(null===t||void 0===t?void 0:t.account)}}const Mo="brk_client_id",Lo="brk_redirect_uri";class qo extends vo{constructor(e,t,n,r,o,i,a,s,c,l,u,d){var h;super(e,t,n,r,o,i,s,c,d),this.apiId=a,this.accountId=l,this.nativeMessageHandler=c,this.nativeStorageManager=u,this.silentCacheClient=new xo(e,this.nativeStorageManager,n,r,o,i,s,c,d),this.serverTelemetryManager=this.initializeServerTelemetryManager(this.apiId);const p=this.nativeMessageHandler.getExtensionId()===Ut.BD.PREFERRED_EXTENSION_ID?"chrome":null!==(h=this.nativeMessageHandler.getExtensionId())&&void 0!==h&&h.length?"unknown":void 0;this.skus=mo.makeExtraSkuString({libraryName:Ut.qx.MSAL_SKU,libraryVersion:Fn,extensionName:p,extensionVersion:this.nativeMessageHandler.getExtensionVersion()})}addRequestSKUs(e){e.extraParameters={...e.extraParameters,"x-client-xtra-sku":this.skus}}async acquireToken(e){this.performanceClient.addQueueMeasurement(Mt.NativeInteractionClientAcquireToken,e.correlationId),this.logger.trace("NativeInteractionClient - acquireToken called.");const t=this.performanceClient.startMeasurement(Mt.NativeInteractionClientAcquireToken,e.correlationId),n=se();try{const o=await this.initializeNativeRequest(e);try{const e=await this.acquireTokensFromCache(this.accountId,o);return t.end({success:!0,isNativeBroker:!1,fromCache:!0}),e}catch(r){this.logger.info("MSAL internal Cache does not contain tokens, proceed to make a native call")}const{...i}=o,a={method:Ut.Ky.GetToken,request:i},s=await this.nativeMessageHandler.sendMessage(a),c=this.validateNativeResponse(s);return await this.handleNativeResponse(c,o,n).then((e=>(t.end({success:!0,isNativeBroker:!0,requestId:e.requestId}),this.serverTelemetryManager.clearNativeBrokerErrorCode(),e))).catch((e=>{throw t.end({success:!1,errorCode:e.errorCode,subErrorCode:e.subError,isNativeBroker:!0}),e}))}catch(r){throw r instanceof Ro&&this.serverTelemetryManager.setNativeBrokerErrorCode(r.errorCode),r}}createSilentCacheRequest(e,t){return{authority:e.authority,correlationId:this.correlationId,scopes:$e.fromString(e.scope).asArray(),account:t,forceRefresh:!1}}async acquireTokensFromCache(e,t){if(!e)throw this.logger.warning("NativeInteractionClient:acquireTokensFromCache - No nativeAccountId provided"),te(q);const n=this.browserStorage.getBaseAccountInfo({nativeAccountId:e});if(!n)throw te(q);try{const e=this.createSilentCacheRequest(t,n),r=await this.silentCacheClient.acquireToken(e),o={...n,idTokenClaims:null===r||void 0===r?void 0:r.idTokenClaims,idToken:null===r||void 0===r?void 0:r.idToken};return{...r,account:o}}catch(r){throw r}}async acquireTokenRedirect(e,t){this.logger.trace("NativeInteractionClient - acquireTokenRedirect called.");const{...n}=e;delete n.onRedirectNavigate;const r=await this.initializeNativeRequest(n),o={method:Ut.Ky.GetToken,request:r};try{const e=await this.nativeMessageHandler.sendMessage(o);this.validateNativeResponse(e)}catch(s){if(s instanceof Ro&&(this.serverTelemetryManager.setNativeBrokerErrorCode(s.errorCode),_o(s)))throw s}this.browserStorage.setTemporaryCache(Ut.c4.NATIVE_REQUEST,JSON.stringify(r),!0);const i={apiId:Ut.WN.acquireTokenRedirect,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},a=this.config.auth.navigateToLoginRequestUrl?window.location.href:this.getRedirectUri(e.redirectUri);t.end({success:!0}),await this.navigationClient.navigateExternal(a,i)}async handleRedirectPromise(e,t){if(this.logger.trace("NativeInteractionClient - handleRedirectPromise called."),!this.browserStorage.isInteractionInProgress(!0))return this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null."),null;const n=this.browserStorage.getCachedNativeRequest();if(!n)return this.logger.verbose("NativeInteractionClient - handleRedirectPromise called but there is no cached request, returning null."),e&&t&&(null===e||void 0===e||e.addFields({errorCode:"no_cached_request"},t)),null;const{prompt:r,...o}=n;r&&this.logger.verbose("NativeInteractionClient - handleRedirectPromise called and prompt was included in the original request, removing prompt from cached request to prevent second interaction with native broker window."),this.browserStorage.removeItem(this.browserStorage.generateCacheKey(Ut.c4.NATIVE_REQUEST));const i={method:Ut.Ky.GetToken,request:o},a=se();try{this.logger.verbose("NativeInteractionClient - handleRedirectPromise sending message to native broker.");const e=await this.nativeMessageHandler.sendMessage(i);this.validateNativeResponse(e);const t=this.handleNativeResponse(e,o,a);this.browserStorage.setInteractionInProgress(!1);const n=await t;return this.serverTelemetryManager.clearNativeBrokerErrorCode(),n}catch(s){throw this.browserStorage.setInteractionInProgress(!1),s}}logout(){return this.logger.trace("NativeInteractionClient - logout called."),Promise.reject("Logout not implemented yet")}async handleNativeResponse(e,t,n){var r;this.logger.trace("NativeInteractionClient - handleNativeResponse called.");const o=ie(e.id_token,Xn),i=this.createHomeAccountIdentifier(e,o);if(i!==(null===(r=this.browserStorage.getAccountInfoFilteredBy({nativeAccountId:t.accountId}))||void 0===r?void 0:r.homeAccountId)&&e.account.id!==t.accountId)throw No(Ao);const a=await this.getDiscoveredAuthority(t.authority),s=uo(this.browserStorage,a,i,Xn,o,e.client_info,void 0,o.tid,void 0,e.account.id,this.logger),c=await this.generateAuthenticationResult(e,t,o,s,a.canonicalAuthority,n);return this.cacheAccount(s),this.cacheNativeTokens(e,t,i,o,e.access_token,c.tenantId,n),c}createHomeAccountIdentifier(e,t){return lt.generateHomeAccountId(e.client_info||o.gT.EMPTY_STRING,ot,this.logger,this.browserCrypto,t)}generateScopes(e,t){return e.scope?$e.fromString(e.scope):$e.fromString(t.scope)}async generatePopAccessToken(e,t){if(t.tokenType===o.hO.POP&&t.signPopToken){if(e.shr)return this.logger.trace("handleNativeServerResponse: SHR is enabled in native layer"),e.shr;const n=new so(this.browserCrypto),r={resourceRequestMethod:t.resourceRequestMethod,resourceRequestUri:t.resourceRequestUri,shrClaims:t.shrClaims,shrNonce:t.shrNonce};if(!t.keyId)throw te(V);return n.signPopToken(e.access_token,t.keyId,r)}return e.access_token}async generateAuthenticationResult(e,t,n,r,i,a){const s=this.addTelemetryFromNativeResponse(e),c=e.scope?$e.fromString(e.scope):$e.fromString(t.scope),l=e.account.properties||{},u=l.UID||n.oid||n.sub||o.gT.EMPTY_STRING,d=l.TenantId||n.tid||o.gT.EMPTY_STRING,h=rt(r.getAccountInfo(),void 0,n,e.id_token);h.nativeAccountId!==e.account.id&&(h.nativeAccountId=e.account.id);const p=await this.generatePopAccessToken(e,t),f=t.tokenType===o.hO.POP?o.hO.POP:o.hO.BEARER;return{authority:i,uniqueId:u,tenantId:d,scopes:c.asArray(),account:h,idToken:e.id_token,idTokenClaims:n,accessToken:p,fromCache:!!s&&this.isResponseFromCache(s),expiresOn:new Date(1e3*Number(a+e.expires_in)),tokenType:f,correlationId:this.correlationId,state:e.state,fromNativeBroker:!0}}cacheAccount(e){this.browserStorage.setAccount(e),this.browserStorage.removeAccountContext(e).catch((e=>{this.logger.error("Error occurred while removing account context from browser storage. ".concat(e))}))}cacheNativeTokens(e,t,n,r,i,a,s){const c=ue(n,t.authority,e.id_token||"",t.clientId,r.tid||""),l=s+(t.tokenType===o.hO.POP?o.gT.SHR_NONCE_VALIDITY:("string"===typeof e.expires_in?parseInt(e.expires_in,10):e.expires_in)||0),u=this.generateScopes(e,t),d={idToken:c,accessToken:de(n,t.authority,i,t.clientId,r.tid||a,u.printScopes(),l,0,Xn,void 0,t.tokenType,void 0,t.keyId)};this.nativeStorageManager.saveCacheRecord(d,t.storeInCache)}addTelemetryFromNativeResponse(e){const t=this.getMATSFromResponse(e);return t?(this.performanceClient.addFields({extensionId:this.nativeMessageHandler.getExtensionId(),extensionVersion:this.nativeMessageHandler.getExtensionVersion(),matsBrokerVersion:t.broker_version,matsAccountJoinOnStart:t.account_join_on_start,matsAccountJoinOnEnd:t.account_join_on_end,matsDeviceJoin:t.device_join,matsPromptBehavior:t.prompt_behavior,matsApiErrorCode:t.api_error_code,matsUiVisible:t.ui_visible,matsSilentCode:t.silent_code,matsSilentBiSubCode:t.silent_bi_sub_code,matsSilentMessage:t.silent_message,matsSilentStatus:t.silent_status,matsHttpStatus:t.http_status,matsHttpEventCount:t.http_event_count},this.correlationId),t):null}validateNativeResponse(e){if(e.hasOwnProperty("access_token")&&e.hasOwnProperty("id_token")&&e.hasOwnProperty("client_info")&&e.hasOwnProperty("account")&&e.hasOwnProperty("scope")&&e.hasOwnProperty("expires_in"))return e;throw(0,c.MD)(Eo.g,"Response missing expected properties.")}getMATSFromResponse(e){if(e.properties.MATS)try{return JSON.parse(e.properties.MATS)}catch(t){this.logger.error("NativeInteractionClient - Error parsing MATS telemetry, returning null instead")}return null}isResponseFromCache(e){return"undefined"===typeof e.is_cached?(this.logger.verbose("NativeInteractionClient - MATS telemetry does not contain field indicating if response was served from cache. Returning false."),!1):!!e.is_cached}async initializeNativeRequest(e){this.logger.trace("NativeInteractionClient - initializeNativeRequest called");const t=e.authority||this.config.auth.authority;e.account&&await this.getDiscoveredAuthority(t,e.azureCloudOptions,e.account);const n=new ht(t);n.validateAsUri();const{scopes:r,...i}=e,a=new $e(r||[]);a.appendScopes(o.f_);const s={...i,accountId:this.accountId,clientId:this.config.auth.clientId,authority:n.urlString,scope:a.printScopes(),redirectUri:this.getRedirectUri(e.redirectUri),prompt:(()=>{switch(this.apiId){case Ut.WN.ssoSilent:case Ut.WN.acquireTokenSilent_silentFlow:return this.logger.trace("initializeNativeRequest: silent request sets prompt to none"),o.NJ.NONE}if(e.prompt)switch(e.prompt){case o.NJ.NONE:case o.NJ.CONSENT:case o.NJ.LOGIN:return this.logger.trace("initializeNativeRequest: prompt is compatible with native flow"),e.prompt;default:throw this.logger.trace("initializeNativeRequest: prompt = ".concat(e.prompt," is not compatible with native flow")),Dn(Nn)}else this.logger.trace("initializeNativeRequest: prompt was not provided")})(),correlationId:this.correlationId,tokenType:e.authenticationScheme,windowTitleSubstring:document.title,extraParameters:{...e.extraQueryParameters,...e.tokenQueryParameters},extendedExpiryToken:!1,keyId:e.popKid};if(s.signPopToken&&e.popKid)throw Dn(Pn);if(this.handleExtraBrokerParams(s),s.extraParameters=s.extraParameters||{},s.extraParameters.telemetry=Ut.BD.MATS_TELEMETRY,e.authenticationScheme===o.hO.POP){const t={resourceRequestUri:e.resourceRequestUri,resourceRequestMethod:e.resourceRequestMethod,shrClaims:e.shrClaims,shrNonce:e.shrNonce},n=new so(this.browserCrypto);let r;if(s.keyId)r=this.browserCrypto.base64UrlEncode(JSON.stringify({kid:s.keyId})),s.signPopToken=!1;else{const o=await vr(n.generateCnf.bind(n),Mt.PopTokenGenerateCnf,this.logger,this.performanceClient,e.correlationId)(t,this.logger);r=o.reqCnfString,s.keyId=o.kid,s.signPopToken=!0}s.reqCnf=r}return this.addRequestSKUs(s),s}handleExtraBrokerParams(e){if(e.extraParameters&&e.extraParameters.hasOwnProperty(Mo)&&e.extraParameters.hasOwnProperty(Lo)&&e.extraParameters.hasOwnProperty(Jr)){const t=e.extraParameters[Jr],n=e.redirectUri,r=e.extraParameters[Lo];e.extraParameters={child_client_id:t,child_redirect_uri:n},e.redirectUri=r}}}class Do{constructor(e,t,n,r){this.logger=e,this.handshakeTimeoutMs=t,this.extensionId=r,this.resolvers=new Map,this.handshakeResolvers=new Map,this.messageChannel=new MessageChannel,this.windowListener=this.onWindowMessage.bind(this),this.performanceClient=n,this.handshakeEvent=n.startMeasurement(Mt.NativeMessageHandlerHandshake)}async sendMessage(e){this.logger.trace("NativeMessageHandler - sendMessage called.");const t={channel:Ut.BD.CHANNEL_ID,extensionId:this.extensionId,responseId:cr(),body:e};return this.logger.trace("NativeMessageHandler - Sending request to browser extension"),this.logger.tracePii("NativeMessageHandler - Sending request to browser extension: ".concat(JSON.stringify(t))),this.messageChannel.port1.postMessage(t),new Promise(((e,n)=>{this.resolvers.set(t.responseId,{resolve:e,reject:n})}))}static async createProvider(e,t,n){e.trace("NativeMessageHandler - createProvider called.");try{const r=new Do(e,t,n,Ut.BD.PREFERRED_EXTENSION_ID);return await r.sendHandshakeRequest(),r}catch(r){const o=new Do(e,t,n);return await o.sendHandshakeRequest(),o}}async sendHandshakeRequest(){this.logger.trace("NativeMessageHandler - sendHandshakeRequest called."),window.addEventListener("message",this.windowListener,!1);const e={channel:Ut.BD.CHANNEL_ID,extensionId:this.extensionId,responseId:cr(),body:{method:Ut.Ky.HandshakeRequest}};return this.handshakeEvent.add({extensionId:this.extensionId,extensionHandshakeTimeoutMs:this.handshakeTimeoutMs}),this.messageChannel.port1.onmessage=e=>{this.onChannelMessage(e)},window.postMessage(e,window.origin,[this.messageChannel.port2]),new Promise(((t,n)=>{this.handshakeResolvers.set(e.responseId,{resolve:t,reject:n}),this.timeoutId=window.setTimeout((()=>{window.removeEventListener("message",this.windowListener,!1),this.messageChannel.port1.close(),this.messageChannel.port2.close(),this.handshakeEvent.end({extensionHandshakeTimedOut:!0,success:!1}),n(Dn(An)),this.handshakeResolvers.delete(e.responseId)}),this.handshakeTimeoutMs)}))}onWindowMessage(e){if(this.logger.trace("NativeMessageHandler - onWindowMessage called"),e.source!==window)return;const t=e.data;if(t.channel&&t.channel===Ut.BD.CHANNEL_ID&&(!t.extensionId||t.extensionId===this.extensionId)&&t.body.method===Ut.Ky.HandshakeRequest){const e=this.handshakeResolvers.get(t.responseId);if(!e)return void this.logger.trace("NativeMessageHandler.onWindowMessage - resolver can't be found for request ".concat(t.responseId));this.logger.verbose(t.extensionId?"Extension with id: ".concat(t.extensionId," not installed"):"No extension installed"),clearTimeout(this.timeoutId),this.messageChannel.port1.close(),this.messageChannel.port2.close(),window.removeEventListener("message",this.windowListener,!1),this.handshakeEvent.end({success:!1,extensionInstalled:!1}),e.reject(Dn(In))}}onChannelMessage(e){this.logger.trace("NativeMessageHandler - onChannelMessage called.");const t=e.data,n=this.resolvers.get(t.responseId),r=this.handshakeResolvers.get(t.responseId);try{const e=t.body.method;if(e===Ut.Ky.Response){if(!n)return;const e=t.body.response;if(this.logger.trace("NativeMessageHandler - Received response from browser extension"),this.logger.tracePii("NativeMessageHandler - Received response from browser extension: ".concat(JSON.stringify(e))),"Success"!==e.status)n.reject(No(e.code,e.description,e.ext));else{if(!e.result)throw(0,c.MD)(Eo.g,"Event does not contain result.");e.result.code&&e.result.description?n.reject(No(e.result.code,e.result.description,e.result.ext)):n.resolve(e.result)}this.resolvers.delete(t.responseId)}else if(e===Ut.Ky.HandshakeResponse){if(!r)return void this.logger.trace("NativeMessageHandler.onChannelMessage - resolver can't be found for request ".concat(t.responseId));clearTimeout(this.timeoutId),window.removeEventListener("message",this.windowListener,!1),this.extensionId=t.extensionId,this.extensionVersion=t.body.version,this.logger.verbose("NativeMessageHandler - Received HandshakeResponse from extension: ".concat(this.extensionId)),this.handshakeEvent.end({extensionInstalled:!0,success:!0}),r.resolve(),this.handshakeResolvers.delete(t.responseId)}}catch(o){this.logger.error("Error parsing response from WAM Extension"),this.logger.errorPii("Error parsing response from WAM Extension: ".concat(o)),this.logger.errorPii("Unable to parse ".concat(e)),n?n.reject(o):r&&r.reject(o)}}getExtensionId(){return this.extensionId}getExtensionVersion(){return this.extensionVersion}static isNativeAvailable(e,t,n,r){if(t.trace("isNativeAvailable called"),!e.system.allowNativeBroker)return t.trace("isNativeAvailable: allowNativeBroker is not enabled, returning false"),!1;if(!n)return t.trace("isNativeAvailable: WAM extension provider is not initialized, returning false"),!1;if(r)switch(r){case o.hO.BEARER:case o.hO.POP:return t.trace("isNativeAvailable: authenticationScheme is supported, returning true"),!0;default:return t.trace("isNativeAvailable: authenticationScheme is not supported, returning false"),!1}return!0}}class Uo{constructor(e,t,n,r,o){this.authModule=e,this.browserStorage=t,this.authCodeRequest=n,this.logger=r,this.performanceClient=o}async handleCodeResponse(e,t){let n;this.performanceClient.addQueueMeasurement(Mt.HandleCodeResponse,t.correlationId);try{n=this.authModule.handleFragmentResponse(e,t.state)}catch(r){throw r instanceof Qr&&r.subError===Jt?Dn(Jt):r}return vr(this.handleCodeResponseFromServer.bind(this),Mt.HandleCodeResponseFromServer,this.logger,this.performanceClient,t.correlationId)(n,t)}async handleCodeResponseFromServer(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(this.performanceClient.addQueueMeasurement(Mt.HandleCodeResponseFromServer,t.correlationId),this.logger.trace("InteractionHandler.handleCodeResponseFromServer called"),this.authCodeRequest.code=e.code,e.cloud_instance_host_name&&await vr(this.authModule.updateAuthority.bind(this.authModule),Mt.UpdateTokenEndpointAuthority,this.logger,this.performanceClient,t.correlationId)(e.cloud_instance_host_name,t.correlationId),n&&(e.nonce=t.nonce||void 0),e.state=t.state,e.client_info)this.authCodeRequest.clientInfo=e.client_info;else{const e=this.createCcsCredentials(t);e&&(this.authCodeRequest.ccsCredential=e)}return await vr(this.authModule.acquireToken.bind(this.authModule),Mt.AuthClientAcquireToken,this.logger,this.performanceClient,t.correlationId)(this.authCodeRequest,e)}createCcsCredentials(e){return e.account?{credential:e.account.homeAccountId,type:Pr}:e.loginHint?{credential:e.loginHint,type:xr}:null}}function Ho(e,t,n){const r=dt(e);if(!r)throw ut(e)?(n.error("A ".concat(t," is present in the iframe but it does not contain known properties. It's likely that the ").concat(t," has been replaced by code running on the redirectUri page.")),n.errorPii("The ".concat(t," detected is: ").concat(e)),Dn(Wt)):(n.error("The request has returned to the redirectUri but a ".concat(t," is not present. It's likely that the ").concat(t," has been removed or the page has been redirected by code running on the redirectUri page.")),Dn(jt));return r}class Fo extends ko{constructor(e,t,n,r,o,i,a,s,c,l){super(e,t,n,r,o,i,a,c,l),this.unloadWindow=this.unloadWindow.bind(this),this.nativeStorage=s}acquireToken(e){try{const t=this.generatePopupName(e.scopes||o.f_,e.authority||this.config.auth.authority),n=e.popupWindowAttributes||{};if(this.config.system.asyncPopups)return this.logger.verbose("asyncPopups set to true, acquiring token"),this.acquireTokenPopupAsync(e,t,n);{this.logger.verbose("asyncPopup set to false, opening popup before acquiring token");const r=this.openSizedPopup("about:blank",t,n);return this.acquireTokenPopupAsync(e,t,n,r)}}catch(t){return Promise.reject(t)}}logout(e){try{this.logger.verbose("logoutPopup called");const t=this.initializeLogoutRequest(e),n=this.generateLogoutPopupName(t),r=e&&e.authority,o=e&&e.mainWindowRedirectUri,i=(null===e||void 0===e?void 0:e.popupWindowAttributes)||{};if(this.config.system.asyncPopups)return this.logger.verbose("asyncPopups set to true"),this.logoutPopupAsync(t,n,i,r,void 0,o);{this.logger.verbose("asyncPopup set to false, opening popup");const e=this.openSizedPopup("about:blank",n,i);return this.logoutPopupAsync(t,n,i,r,e,o)}}catch(t){return Promise.reject(t)}}async acquireTokenPopupAsync(e,t,n,r){this.logger.verbose("acquireTokenPopupAsync called");const o=this.initializeServerTelemetryManager(Ut.WN.acquireTokenPopup),i=await vr(this.initializeAuthorizationRequest.bind(this),Mt.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,this.correlationId)(e,Ut.s_.Popup);let a;Wr(i.authority);try{const s=await vr(this.initializeAuthorizationCodeRequest.bind(this),Mt.StandardInteractionClientInitializeAuthorizationCodeRequest,this.logger,this.performanceClient,this.correlationId)(i);return a=await vr(this.createAuthCodeClient.bind(this),Mt.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)(o,i.authority,i.azureCloudOptions,i.account),await vr(this.acquireTokenPopupAsyncHelper.bind(this),Mt.PopupClientTokenHelper,this.logger,this.performanceClient,this.correlationId)(a,s,i,e,t,n,r)}catch(s){if(r&&r.close(),s instanceof c.l4&&(s.setCorrelationId(this.correlationId),o.cacheFailedRequest(s)),!a||!(s instanceof Qr)||s.errorCode!==Ut.qx.INVALID_GRANT_ERROR)throw s;this.performanceClient.addFields({retryError:s.errorCode},this.correlationId);const l=await vr(this.initializeAuthorizationCodeRequest.bind(this),Mt.StandardInteractionClientInitializeAuthorizationCodeRequest,this.logger,this.performanceClient,this.correlationId)(i);return await vr(this.acquireTokenPopupAsyncHelper.bind(this),Mt.PopupClientTokenHelper,this.logger,this.performanceClient,this.correlationId)(a,l,i,e,t,n,r)}}async acquireTokenPopupAsyncHelper(e,t,n,r,o,i,a){const s=n.correlationId;this.performanceClient.addQueueMeasurement(Mt.PopupClientTokenHelper,s);const c=Do.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,r.authenticationScheme);let l;c&&(l=this.performanceClient.startMeasurement(Mt.FetchAccountIdWithNativeBroker,r.correlationId));const u=await e.getAuthCodeUrl({...n,nativeBroker:c}),d=new Uo(e,this.browserStorage,t,this.logger,this.performanceClient),h={popup:a,popupName:o,popupWindowAttributes:i},p=this.initiateAuthRequest(u,h);this.eventHandler.emitEvent(Gr.t.POPUP_OPENED,Ut.s_.Popup,{popupWindow:p},null);const f=await this.monitorPopupForHash(p),g=mr(Ho,Mt.DeserializeResponse,this.logger,this.performanceClient,this.correlationId)(f,this.config.auth.OIDCOptions.serverResponseType,this.logger);if(Zr.removeThrottle(this.browserStorage,this.config.auth.clientId,t),g.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),l&&l.end({success:!0,isNativeBroker:!0}),!this.nativeMessageHandler)throw Dn(Rn);const e=new qo(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Ut.WN.acquireTokenPopup,this.performanceClient,this.nativeMessageHandler,g.accountId,this.nativeStorage,n.correlationId),{userRequestState:t}=Or.parseRequestState(this.browserCrypto,n.state);return e.acquireToken({...n,state:t,prompt:void 0})}return await d.handleCodeResponse(g,n)}async logoutPopupAsync(e,t,n,r,o,i){this.logger.verbose("logoutPopupAsync called"),this.eventHandler.emitEvent(Gr.t.LOGOUT_START,Ut.s_.Popup,e);const s=this.initializeServerTelemetryManager(Ut.WN.logoutPopup);try{await this.clearCacheOnLogout(e.account);const c=await vr(this.createAuthCodeClient.bind(this),Mt.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)(s,r,void 0,e.account||void 0);try{c.authority.endSessionEndpoint}catch{var l;if(null!==(l=e.account)&&void 0!==l&&l.homeAccountId&&e.postLogoutRedirectUri&&c.authority.protocolMode===a){var u;if(this.browserStorage.removeAccount(null===(u=e.account)||void 0===u?void 0:u.homeAccountId),this.eventHandler.emitEvent(Gr.t.LOGOUT_SUCCESS,Ut.s_.Popup,e),i){const e={apiId:Ut.WN.logoutPopup,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},t=ht.getAbsoluteUrl(i,Fr());await this.navigationClient.navigateInternal(t,e)}return void(o&&o.close())}}const d=c.getLogoutUri(e);this.eventHandler.emitEvent(Gr.t.LOGOUT_SUCCESS,Ut.s_.Popup,e);const h=this.openPopup(d,{popupName:t,popupWindowAttributes:n,popup:o});if(this.eventHandler.emitEvent(Gr.t.POPUP_OPENED,Ut.s_.Popup,{popupWindow:h},null),await this.monitorPopupForHash(h).catch((()=>{})),i){const e={apiId:Ut.WN.logoutPopup,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},t=ht.getAbsoluteUrl(i,Fr());this.logger.verbose("Redirecting main window to url specified in the request"),this.logger.verbosePii("Redirecting main window to: ".concat(t)),await this.navigationClient.navigateInternal(t,e)}else this.logger.verbose("No main window navigation requested")}catch(d){throw o&&o.close(),d instanceof c.l4&&(d.setCorrelationId(this.correlationId),s.cacheFailedRequest(d)),this.browserStorage.setInteractionInProgress(!1),this.eventHandler.emitEvent(Gr.t.LOGOUT_FAILURE,Ut.s_.Popup,null,d),this.eventHandler.emitEvent(Gr.t.LOGOUT_END,Ut.s_.Popup),d}this.eventHandler.emitEvent(Gr.t.LOGOUT_END,Ut.s_.Popup)}initiateAuthRequest(e,t){if(e)return this.logger.infoPii("Navigate to: ".concat(e)),this.openPopup(e,t);throw this.logger.error("Navigate url is empty"),Dn(Kt)}monitorPopupForHash(e){return new Promise(((t,n)=>{this.logger.verbose("PopupHandler.monitorPopupForHash - polling started");const r=setInterval((()=>{if(e.closed)return this.logger.error("PopupHandler.monitorPopupForHash - window closed"),clearInterval(r),void n(Dn(Jt));let i="";try{i=e.location.href}catch(c){}if(!i||"about:blank"===i)return;clearInterval(r);let a="";const s=this.config.auth.OIDCOptions.serverResponseType;e&&(a=s===o.rg.QUERY?e.location.search:e.location.hash),this.logger.verbose("PopupHandler.monitorPopupForHash - popup window is on same origin as caller"),t(a)}),this.config.system.pollIntervalMilliseconds)})).finally((()=>{this.cleanPopup(e)}))}openPopup(e,t){try{let n;if(t.popup?(n=t.popup,this.logger.verbosePii("Navigating popup window to: ".concat(e)),n.location.assign(e)):"undefined"===typeof t.popup&&(this.logger.verbosePii("Opening popup window to: ".concat(e)),n=this.openSizedPopup(e,t.popupName,t.popupWindowAttributes)),!n)throw Dn(Yt);return n.focus&&n.focus(),this.currentWindow=n,window.addEventListener("beforeunload",this.unloadWindow),n}catch(n){throw this.logger.error("error opening popup "+n.message),this.browserStorage.setInteractionInProgress(!1),Dn(Zt)}}openSizedPopup(e,t,n){var r,o,i,a;const s=window.screenLeft?window.screenLeft:window.screenX,c=window.screenTop?window.screenTop:window.screenY,l=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,u=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;let d=null===(r=n.popupSize)||void 0===r?void 0:r.width,h=null===(o=n.popupSize)||void 0===o?void 0:o.height,p=null===(i=n.popupPosition)||void 0===i?void 0:i.top,f=null===(a=n.popupPosition)||void 0===a?void 0:a.left;return(!d||d<0||d>l)&&(this.logger.verbose("Default popup window width used. Window width not configured or invalid."),d=Ut.qx.POPUP_WIDTH),(!h||h<0||h>u)&&(this.logger.verbose("Default popup window height used. Window height not configured or invalid."),h=Ut.qx.POPUP_HEIGHT),(!p||p<0||p>u)&&(this.logger.verbose("Default popup window top position used. Window top not configured or invalid."),p=Math.max(0,u/2-Ut.qx.POPUP_HEIGHT/2+c)),(!f||f<0||f>l)&&(this.logger.verbose("Default popup window left position used. Window left not configured or invalid."),f=Math.max(0,l/2-Ut.qx.POPUP_WIDTH/2+s)),window.open(e,t,"width=".concat(d,", height=").concat(h,", top=").concat(p,", left=").concat(f,", scrollbars=yes"))}unloadWindow(e){this.browserStorage.cleanRequestByInteractionType(Ut.s_.Popup),this.currentWindow&&this.currentWindow.close(),e.preventDefault()}cleanPopup(e){e&&e.close(),window.removeEventListener("beforeunload",this.unloadWindow),this.browserStorage.setInteractionInProgress(!1)}generatePopupName(e,t){return"".concat(Ut.qx.POPUP_NAME_PREFIX,".").concat(this.config.auth.clientId,".").concat(e.join("-"),".").concat(t,".").concat(this.correlationId)}generateLogoutPopupName(e){const t=e.account&&e.account.homeAccountId;return"".concat(Ut.qx.POPUP_NAME_PREFIX,".").concat(this.config.auth.clientId,".").concat(t,".").concat(this.correlationId)}}class Bo{constructor(e,t,n,r,o){this.authModule=e,this.browserStorage=t,this.authCodeRequest=n,this.logger=r,this.performanceClient=o}async initiateAuthRequest(e,t){if(this.logger.verbose("RedirectHandler.initiateAuthRequest called"),e){t.redirectStartPage&&(this.logger.verbose("RedirectHandler.initiateAuthRequest: redirectStartPage set, caching start page"),this.browserStorage.setTemporaryCache(Ut.c4.ORIGIN_URI,t.redirectStartPage,!0)),this.browserStorage.setTemporaryCache(Ut.c4.CORRELATION_ID,this.authCodeRequest.correlationId,!0),this.browserStorage.cacheCodeRequest(this.authCodeRequest),this.logger.infoPii("RedirectHandler.initiateAuthRequest: Navigate to: ".concat(e));const n={apiId:Ut.WN.acquireTokenRedirect,timeout:t.redirectTimeout,noHistory:!1};if("function"===typeof t.onRedirectNavigate){this.logger.verbose("RedirectHandler.initiateAuthRequest: Invoking onRedirectNavigate callback");return!1!==t.onRedirectNavigate(e)?(this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate did not return false, navigating"),void await t.navigationClient.navigateExternal(e,n)):void this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate returned false, stopping navigation")}return this.logger.verbose("RedirectHandler.initiateAuthRequest: Navigating window to navigate url"),void await t.navigationClient.navigateExternal(e,n)}throw this.logger.info("RedirectHandler.initiateAuthRequest: Navigate url is empty"),Dn(Kt)}async handleCodeResponse(e,t){this.logger.verbose("RedirectHandler.handleCodeResponse called"),this.browserStorage.setInteractionInProgress(!1);const n=this.browserStorage.generateStateKey(t),r=this.browserStorage.getTemporaryCache(n);if(!r)throw te(C,"Cached State");let o;try{o=this.authModule.handleFragmentResponse(e,r)}catch(c){throw c instanceof Qr&&c.subError===Jt?Dn(Jt):c}const i=this.browserStorage.generateNonceKey(r),a=this.browserStorage.getTemporaryCache(i);if(this.authCodeRequest.code=o.code,o.cloud_instance_host_name&&await vr(this.authModule.updateAuthority.bind(this.authModule),Mt.UpdateTokenEndpointAuthority,this.logger,this.performanceClient,this.authCodeRequest.correlationId)(o.cloud_instance_host_name,this.authCodeRequest.correlationId),o.nonce=a||void 0,o.state=r,o.client_info)this.authCodeRequest.clientInfo=o.client_info;else{const e=this.checkCcsCredentials();e&&(this.authCodeRequest.ccsCredential=e)}const s=await this.authModule.acquireToken(this.authCodeRequest,o);return this.browserStorage.cleanRequestByState(t),this.browserStorage.removeRequestRetried(),s}checkCcsCredentials(){const e=this.browserStorage.getTemporaryCache(Ut.c4.CCS_CREDENTIAL,!0);if(e)try{return JSON.parse(e)}catch(t){this.authModule.logger.error("Cache credential could not be parsed"),this.authModule.logger.errorPii("Cache credential could not be parsed: ".concat(e))}return null}}class Ko extends ko{constructor(e,t,n,r,o,i,a,s,c,l){super(e,t,n,r,o,i,a,c,l),this.nativeStorage=s}async acquireToken(e){e.onRedirectNavigate?this.logger.warning("Unable to cache redirect request, onRedirectNavigate request option has been deprecated. Please set onRedirectNavigate on PublicClientApplication config instead."):this.browserStorage.cacheRedirectRequest(e);const t=await vr(this.initializeAuthorizationRequest.bind(this),Mt.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,this.correlationId)(e,Ut.s_.Redirect);this.browserStorage.updateCacheEntries(t.state,t.nonce,t.authority,t.loginHint||"",t.account||null);const n=this.initializeServerTelemetryManager(Ut.WN.acquireTokenRedirect),r=e=>{e.persisted&&(this.logger.verbose("Page was restored from back/forward cache. Clearing temporary cache."),this.browserStorage.cleanRequestByState(t.state),this.eventHandler.emitEvent(Gr.t.RESTORE_FROM_BFCACHE,Ut.s_.Redirect))};try{const o=await vr(this.initializeAuthorizationCodeRequest.bind(this),Mt.StandardInteractionClientInitializeAuthorizationCodeRequest,this.logger,this.performanceClient,this.correlationId)(t),i=await vr(this.createAuthCodeClient.bind(this),Mt.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)(n,t.authority,t.azureCloudOptions,t.account),a=new Bo(i,this.browserStorage,o,this.logger,this.performanceClient),s=await i.getAuthCodeUrl({...t,nativeBroker:Do.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,e.authenticationScheme)}),c=this.getRedirectStartPage(e.redirectStartPage);return this.logger.verbosePii("Redirect start page: ".concat(c)),window.addEventListener("pageshow",r),await a.initiateAuthRequest(s,{navigationClient:this.navigationClient,redirectTimeout:this.config.system.redirectNavigationTimeout,redirectStartPage:c,onRedirectNavigate:e.onRedirectNavigate||this.config.auth.onRedirectNavigate})}catch(o){throw o instanceof c.l4&&(o.setCorrelationId(this.correlationId),n.cacheFailedRequest(o)),window.removeEventListener("pageshow",r),this.browserStorage.cleanRequestByState(t.state),o}}async handleRedirectPromise(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;const n=this.initializeServerTelemetryManager(Ut.WN.handleRedirectPromise);try{if(!this.browserStorage.isInteractionInProgress(!0))return this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null."),null;const[r,i]=this.getRedirectResponse(e||"");if(!r)return this.logger.info("handleRedirectPromise did not detect a response as a result of a redirect. Cleaning temporary cache."),this.browserStorage.cleanRequestByInteractionType(Ut.s_.Redirect),t.event.errorCode="no_server_response",null;const a=this.browserStorage.getTemporaryCache(Ut.c4.ORIGIN_URI,!0)||o.gT.EMPTY_STRING,s=ht.removeHashFromUrl(a);if(s===ht.removeHashFromUrl(window.location.href)&&this.config.auth.navigateToLoginRequestUrl){this.logger.verbose("Current page is loginRequestUrl, handling response"),a.indexOf("#")>-1&&function(e){const t=e.split("#");t.shift(),window.location.hash=t.length>0?t.join("#"):""}(a);return await this.handleResponse(r,n)}if(!this.config.auth.navigateToLoginRequestUrl)return this.logger.verbose("NavigateToLoginRequestUrl set to false, handling response"),await this.handleResponse(r,n);if(!Hr()||this.config.system.allowRedirectInIframe){this.browserStorage.setTemporaryCache(Ut.c4.URL_HASH,i,!0);const e={apiId:Ut.WN.handleRedirectPromise,timeout:this.config.system.redirectNavigationTimeout,noHistory:!0};let t=!0;if(a&&"null"!==a)this.logger.verbose("Navigating to loginRequestUrl: ".concat(a)),t=await this.navigationClient.navigateInternal(a,e);else{const n=function(){const e=new ht(window.location.href).getUrlComponents();return"".concat(e.Protocol,"//").concat(e.HostNameAndPort,"/")}();this.browserStorage.setTemporaryCache(Ut.c4.ORIGIN_URI,n,!0),this.logger.warning("Unable to get valid login request url from cache, redirecting to home page"),t=await this.navigationClient.navigateInternal(n,e)}if(!t)return await this.handleResponse(r,n)}return null}catch(r){if(r instanceof c.l4&&(r.setCorrelationId(this.correlationId),n.cacheFailedRequest(r)),r instanceof Qr&&r.errorCode===Ut.qx.INVALID_GRANT_ERROR){this.performanceClient.addFields({retryError:r.errorCode},this.correlationId);if(this.browserStorage.getRequestRetried())throw this.logger.error("Retried request already detected. Throwing error."),this.browserStorage.removeRequestRetried(),r;const e=this.browserStorage.getCachedRedirectRequest();if(!e)throw this.logger.error("Unable to retry. Please retry with redirect request"),this.browserStorage.setRequestRetried(),Dn(xn);return this.browserStorage.setRequestRetried(),await this.acquireToken(e),null}throw this.browserStorage.removeTemporaryItem(this.browserStorage.generateCacheKey(Ut.c4.REDIRECT_REQUEST)),this.browserStorage.removeRequestRetried(),r}finally{this.browserStorage.cleanRequestByInteractionType(Ut.s_.Redirect)}}getRedirectResponse(e){this.logger.verbose("getRedirectResponseHash called");let t=e;t||(t=this.config.auth.OIDCOptions.serverResponseType===o.rg.QUERY?window.location.search:window.location.hash);let n=dt(t);if(n){try{!function(e,t,n){if(!e.state)throw Dn(zt);const r=Dr(t,e.state);if(!r)throw Dn(Gt);if(r.interactionType!==n)throw Dn(Vt)}(n,this.browserCrypto,Ut.s_.Redirect)}catch(a){return a instanceof c.l4&&this.logger.error("Interaction type validation failed due to ".concat(a.errorCode,": ").concat(a.errorMessage)),[null,""]}return(r=window).location.hash="","function"===typeof r.history.replaceState&&r.history.replaceState(null,"","".concat(r.location.origin).concat(r.location.pathname).concat(r.location.search)),this.logger.verbose("Hash contains known properties, returning response hash"),[n,t]}var r;const i=this.browserStorage.getTemporaryCache(Ut.c4.URL_HASH,!0);return this.browserStorage.removeItem(this.browserStorage.generateCacheKey(Ut.c4.URL_HASH)),i&&(n=dt(i),n)?(this.logger.verbose("Hash does not contain known properties, returning cached hash"),[n,i]):[null,""]}async handleResponse(e,t){const n=e.state;if(!n)throw Dn(zt);const r=this.browserStorage.getCachedRequest(n);if(this.logger.verbose("handleResponse called, retrieved cached request"),e.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),!this.nativeMessageHandler)throw Dn(Rn);const t=new qo(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Ut.WN.acquireTokenPopup,this.performanceClient,this.nativeMessageHandler,e.accountId,this.nativeStorage,r.correlationId),{userRequestState:o}=Or.parseRequestState(this.browserCrypto,n);return t.acquireToken({...r,state:o,prompt:void 0}).finally((()=>{this.browserStorage.cleanRequestByState(n)}))}const o=this.browserStorage.getCachedAuthority(n);if(!o)throw Dn(un);const i=await vr(this.createAuthCodeClient.bind(this),Mt.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)(t,o);Zr.removeThrottle(this.browserStorage,this.config.auth.clientId,r);return new Bo(i,this.browserStorage,r,this.logger,this.performanceClient).handleCodeResponse(e,n)}async logout(e){this.logger.verbose("logoutRedirect called");const t=this.initializeLogoutRequest(e),n=this.initializeServerTelemetryManager(Ut.WN.logout);try{this.eventHandler.emitEvent(Gr.t.LOGOUT_START,Ut.s_.Redirect,e),await this.clearCacheOnLogout(t.account);const i={apiId:Ut.WN.logout,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},s=await vr(this.createAuthCodeClient.bind(this),Mt.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)(n,e&&e.authority,void 0,e&&e.account||void 0);if(s.authority.protocolMode===a)try{s.authority.endSessionEndpoint}catch{var r,o;if(null!==(r=t.account)&&void 0!==r&&r.homeAccountId)return this.browserStorage.removeAccount(null===(o=t.account)||void 0===o?void 0:o.homeAccountId),void this.eventHandler.emitEvent(Gr.t.LOGOUT_SUCCESS,Ut.s_.Redirect,t)}const c=s.getLogoutUri(t);if(this.eventHandler.emitEvent(Gr.t.LOGOUT_SUCCESS,Ut.s_.Redirect,t),!e||"function"!==typeof e.onRedirectNavigate)return this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0),void await this.navigationClient.navigateExternal(c,i);if(!1!==e.onRedirectNavigate(c))return this.logger.verbose("Logout onRedirectNavigate did not return false, navigating"),this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0),void await this.navigationClient.navigateExternal(c,i);this.browserStorage.setInteractionInProgress(!1),this.logger.verbose("Logout onRedirectNavigate returned false, stopping navigation")}catch(i){throw i instanceof c.l4&&(i.setCorrelationId(this.correlationId),n.cacheFailedRequest(i)),this.eventHandler.emitEvent(Gr.t.LOGOUT_FAILURE,Ut.s_.Redirect,null,i),this.eventHandler.emitEvent(Gr.t.LOGOUT_END,Ut.s_.Redirect),i}this.eventHandler.emitEvent(Gr.t.LOGOUT_END,Ut.s_.Redirect)}getRedirectStartPage(e){const t=e||window.location.href;return ht.getAbsoluteUrl(t,Fr())}}async function jo(e,t,n,r,o){if(t.addQueueMeasurement(Mt.SilentHandlerInitiateAuthRequest,r),!e)throw n.info("Navigate url is empty"),Dn(Kt);return o?vr(Wo,Mt.SilentHandlerLoadFrame,n,t,r)(e,o,t,r):mr(Go,Mt.SilentHandlerLoadFrameSync,n,t,r)(e)}async function zo(e,t,n,r,i,a,s){return r.addQueueMeasurement(Mt.SilentHandlerMonitorIframeForHash,a),new Promise(((r,a)=>{t<Hn&&i.warning("system.loadFrameTimeout or system.iframeHashTimeout set to lower (".concat(t,"ms) than the default (").concat(Hn,"ms). This may result in timeouts."));const c=window.setTimeout((()=>{window.clearInterval(l),a(Dn(Xt))}),t),l=window.setInterval((()=>{let t="";const n=e.contentWindow;try{t=n?n.location.href:""}catch(a){}if(!t||"about:blank"===t)return;let i="";n&&(i=s===o.rg.QUERY?n.location.search:n.location.hash),window.clearTimeout(c),window.clearInterval(l),r(i)}),n)})).finally((()=>{mr(Qo,Mt.RemoveHiddenIframe,i,r,a)(e)}))}function Wo(e,t,n,r){return n.addQueueMeasurement(Mt.SilentHandlerLoadFrame,r),new Promise(((n,r)=>{const o=Vo();window.setTimeout((()=>{o?(o.src=e,n(o)):r("Unable to load iframe")}),t)}))}function Go(e){const t=Vo();return t.src=e,t}function Vo(){const e=document.createElement("iframe");return e.className="msalSilentIframe",e.style.visibility="hidden",e.style.position="absolute",e.style.width=e.style.height="0",e.style.border="0",e.setAttribute("sandbox","allow-scripts allow-same-origin allow-forms"),document.body.appendChild(e),e}function Qo(e){document.body===e.parentNode&&document.body.removeChild(e)}class Zo extends ko{constructor(e,t,n,r,o,i,a,s,c,l,u){super(e,t,n,r,o,i,s,l,u),this.apiId=a,this.nativeStorage=c}async acquireToken(e){this.performanceClient.addQueueMeasurement(Mt.SilentIframeClientAcquireToken,e.correlationId),e.loginHint||e.sid||e.account&&e.account.username||this.logger.warning("No user hint provided. The authorization server may need more information to complete this request.");const t={...e};t.prompt?t.prompt!==o.NJ.NONE&&t.prompt!==o.NJ.NO_SESSION&&(this.logger.warning("SilentIframeClient. Replacing invalid prompt ".concat(t.prompt," with ").concat(o.NJ.NONE)),t.prompt=o.NJ.NONE):t.prompt=o.NJ.NONE;const n=await vr(this.initializeAuthorizationRequest.bind(this),Mt.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,e.correlationId)(t,Ut.s_.Silent);Wr(n.authority);const r=this.initializeServerTelemetryManager(this.apiId);let i;try{return i=await vr(this.createAuthCodeClient.bind(this),Mt.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,e.correlationId)(r,n.authority,n.azureCloudOptions,n.account),await vr(this.silentTokenHelper.bind(this),Mt.SilentIframeClientTokenHelper,this.logger,this.performanceClient,e.correlationId)(i,n)}catch(a){if(a instanceof c.l4&&(a.setCorrelationId(this.correlationId),r.cacheFailedRequest(a)),!i||!(a instanceof Qr)||a.errorCode!==Ut.qx.INVALID_GRANT_ERROR)throw a;this.performanceClient.addFields({retryError:a.errorCode},this.correlationId);const n=await vr(this.initializeAuthorizationRequest.bind(this),Mt.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,e.correlationId)(t,Ut.s_.Silent);return await vr(this.silentTokenHelper.bind(this),Mt.SilentIframeClientTokenHelper,this.logger,this.performanceClient,this.correlationId)(i,n)}}logout(){return Promise.reject(Dn(on))}async silentTokenHelper(e,t){const n=t.correlationId;this.performanceClient.addQueueMeasurement(Mt.SilentIframeClientTokenHelper,n);const r=await vr(this.initializeAuthorizationCodeRequest.bind(this),Mt.StandardInteractionClientInitializeAuthorizationCodeRequest,this.logger,this.performanceClient,n)(t),i=await vr(e.getAuthCodeUrl.bind(e),Mt.GetAuthCodeUrl,this.logger,this.performanceClient,n)({...t,nativeBroker:Do.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,t.authenticationScheme)}),a=new Uo(e,this.browserStorage,r,this.logger,this.performanceClient),s=await vr(jo,Mt.SilentHandlerInitiateAuthRequest,this.logger,this.performanceClient,n)(i,this.performanceClient,this.logger,n,this.config.system.navigateFrameWait),c=this.config.auth.OIDCOptions.serverResponseType,l=await vr(zo,Mt.SilentHandlerMonitorIframeForHash,this.logger,this.performanceClient,n)(s,this.config.system.iframeHashTimeout,this.config.system.pollIntervalMilliseconds,this.performanceClient,this.logger,n,c),u=mr(Ho,Mt.DeserializeResponse,this.logger,this.performanceClient,this.correlationId)(l,c,this.logger);if(u.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),!this.nativeMessageHandler)throw Dn(Rn);const e=new qo(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.apiId,this.performanceClient,this.nativeMessageHandler,u.accountId,this.browserStorage,n),{userRequestState:r}=Or.parseRequestState(this.browserCrypto,t.state);return vr(e.acquireToken.bind(e),Mt.NativeInteractionClientAcquireToken,this.logger,this.performanceClient,n)({...t,state:r,prompt:t.prompt||o.NJ.NONE})}return vr(a.handleCodeResponse.bind(a),Mt.HandleCodeResponse,this.logger,this.performanceClient,n)(u,t)}}class Yo extends ko{async acquireToken(e){this.performanceClient.addQueueMeasurement(Mt.SilentRefreshClientAcquireToken,e.correlationId);const t=await vr(To,Mt.InitializeBaseRequest,this.logger,this.performanceClient,e.correlationId)(e,this.config,this.performanceClient,this.logger),n={...e,...t};e.redirectUri&&(n.redirectUri=this.getRedirectUri(e.redirectUri));const r=this.initializeServerTelemetryManager(Ut.WN.acquireTokenSilent_silentFlow),o=await this.createRefreshTokenClient(r,n.authority,n.azureCloudOptions,n.account);return vr(o.acquireTokenByRefreshToken.bind(o),Mt.RefreshTokenClientAcquireTokenByRefreshToken,this.logger,this.performanceClient,e.correlationId)(n).catch((e=>{throw e.setCorrelationId(this.correlationId),r.cacheFailedRequest(e),e}))}logout(){return Promise.reject(Dn(on))}async createRefreshTokenClient(e,t,n,r){const o=await vr(this.getClientConfiguration.bind(this),Mt.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,this.correlationId)(e,t,n,r);return new Oo(o,this.performanceClient)}}class Jo{constructor(e,t,n,r){this.isBrowserEnvironment="undefined"!==typeof window,this.config=e,this.storage=t,this.logger=n,this.cryptoObj=r}loadExternalTokens(e,t,n){if(!this.isBrowserEnvironment)throw Dn(pn);const r=t.id_token?ie(t.id_token,Xn):void 0,o={protocolMode:this.config.auth.protocolMode,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata,skipAuthorityMetadataCache:this.config.auth.skipAuthorityMetadataCache},i=e.authority?new Cr(Cr.generateAuthority(e.authority,e.azureCloudOptions),this.config.system.networkClient,this.storage,o,this.logger,e.correlationId||cr()):void 0,a=this.loadAccount(e,n.clientInfo||t.client_info||"",r,i),s=this.loadIdToken(t,a.homeAccountId,a.environment,a.realm),c=this.loadAccessToken(e,t,a.homeAccountId,a.environment,a.realm,n),l=this.loadRefreshToken(t,a.homeAccountId,a.environment);return this.generateAuthenticationResult(e,{account:a,idToken:s,accessToken:c,refreshToken:l},r,i)}loadAccount(e,t,n,r){if(this.logger.verbose("TokenCache - loading account"),e.account){const t=lt.createFromAccountInfo(e.account);return this.storage.setAccount(t),t}if(!r||!t&&!n)throw this.logger.error("TokenCache - if an account is not provided on the request, authority and either clientInfo or idToken must be provided instead."),Dn(Cn);const o=lt.generateHomeAccountId(t,r.authorityType,this.logger,this.cryptoObj,n),i=null===n||void 0===n?void 0:n.tid,a=uo(this.storage,r,o,Xn,n,t,r.hostnameAndPort,i,void 0,void 0,this.logger);return this.storage.setAccount(a),a}loadIdToken(e,t,n,r){if(!e.id_token)return this.logger.verbose("TokenCache - no id token found in response"),null;this.logger.verbose("TokenCache - loading id token");const o=ue(t,n,e.id_token,this.config.auth.clientId,r);return this.storage.setIdTokenCredential(o),o}loadAccessToken(e,t,n,r,o,i){if(!t.access_token)return this.logger.verbose("TokenCache - no access token found in response"),null;if(!t.expires_in)return this.logger.error("TokenCache - no expiration set on the access token. Cannot add it to the cache."),null;if(!t.scope&&(!e.scopes||!e.scopes.length))return this.logger.error("TokenCache - scopes not specified in the request or response. Cannot add token to the cache."),null;this.logger.verbose("TokenCache - loading access token");const a=t.scope?$e.fromString(t.scope):new $e(e.scopes),s=i.expiresOn||t.expires_in+(new Date).getTime()/1e3,c=i.extendedExpiresOn||(t.ext_expires_in||t.expires_in)+(new Date).getTime()/1e3,l=de(n,r,t.access_token,this.config.auth.clientId,o,a.printScopes(),s,c,Xn);return this.storage.setAccessTokenCredential(l),l}loadRefreshToken(e,t,n){if(!e.refresh_token)return this.logger.verbose("TokenCache - no refresh token found in response"),null;this.logger.verbose("TokenCache - loading refresh token");const r=he(t,n,e.refresh_token,this.config.auth.clientId,e.foci,void 0,e.refresh_token_expires_in);return this.storage.setRefreshTokenCredential(r),r}generateAuthenticationResult(e,t,n,r){var o,i,a;let s,c="",l=[],u=null;null!==t&&void 0!==t&&t.accessToken&&(c=t.accessToken.secret,l=$e.fromString(t.accessToken.target).asArray(),u=new Date(1e3*Number(t.accessToken.expiresOn)),s=new Date(1e3*Number(t.accessToken.extendedExpiresOn)));const d=t.account;return{authority:r?r.canonicalAuthority:"",uniqueId:t.account.localAccountId,tenantId:t.account.realm,scopes:l,account:d.getAccountInfo(),idToken:(null===(o=t.idToken)||void 0===o?void 0:o.secret)||"",idTokenClaims:n||{},accessToken:c,fromCache:!0,expiresOn:u,correlationId:e.correlationId||"",requestId:"",extExpiresOn:s,familyId:(null===(i=t.refreshToken)||void 0===i?void 0:i.familyId)||"",tokenType:(null===t||void 0===t||null===(a=t.accessToken)||void 0===a?void 0:a.tokenType)||"",state:e.state||"",cloudGraphHostName:d.cloudGraphHostName||"",msGraphHost:d.msGraphHost||"",fromNativeBroker:!1}}}class $o extends po{constructor(e){super(e),this.includeRedirectUri=!1}}class Xo extends ko{constructor(e,t,n,r,o,i,a,s,c,l){super(e,t,n,r,o,i,s,c,l),this.apiId=a}async acquireToken(e){if(!e.code)throw Dn(wn);const t=await vr(this.initializeAuthorizationRequest.bind(this),Mt.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,e.correlationId)(e,Ut.s_.Silent),n=this.initializeServerTelemetryManager(this.apiId);try{const r={...t,code:e.code},o=await vr(this.getClientConfiguration.bind(this),Mt.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,e.correlationId)(n,t.authority,t.azureCloudOptions,t.account),i=new $o(o);this.logger.verbose("Auth code client created");const a=new Uo(i,this.browserStorage,r,this.logger,this.performanceClient);return await vr(a.handleCodeResponseFromServer.bind(a),Mt.HandleCodeResponseFromServer,this.logger,this.performanceClient,e.correlationId)({code:e.code,msgraph_host:e.msGraphHost,cloud_graph_host_name:e.cloudGraphHostName,cloud_instance_host_name:e.cloudInstanceHostName},t,!1)}catch(r){throw r instanceof c.l4&&(r.setCorrelationId(this.correlationId),n.cacheFailedRequest(r)),r}}logout(){return Promise.reject(Dn(on))}}function ei(e){const t=null===e||void 0===e?void 0:e.idTokenClaims;return null!==t&&void 0!==t&&t.tfp||null!==t&&void 0!==t&&t.acr?"B2C":null!==t&&void 0!==t&&t.tid?"9188040d-6c67-4c5b-b112-36a304b66dad"===(null===t||void 0===t?void 0:t.tid)?"MSA":"AAD":void 0}function ti(e,t){try{jr(e)}catch(n){throw t.end({success:!1},n),n}}class ni{constructor(e){this.operatingContext=e,this.isBrowserEnvironment=this.operatingContext.isBrowserEnvironment(),this.config=e.getConfig(),this.initialized=!1,this.logger=this.operatingContext.getLogger(),this.networkClient=this.config.system.networkClient,this.navigationClient=this.config.system.navigationClient,this.redirectResponse=new Map,this.hybridAuthCodeResponses=new Map,this.performanceClient=this.config.telemetry.client,this.browserCrypto=this.isBrowserEnvironment?new fr(this.logger,this.performanceClient):ne,this.eventHandler=new Vr(this.logger,this.browserCrypto),this.browserStorage=this.isBrowserEnvironment?new Ur(this.config.auth.clientId,this.config.cache,this.browserCrypto,this.logger,function(e){const t=e.cloudDiscoveryMetadata;let n;if(t)try{n=JSON.parse(t)}catch(r){throw Ye(Ue)}return{canonicalAuthority:e.authority?br(e.authority):void 0,knownAuthorities:e.knownAuthorities,cloudDiscoveryMetadata:n}}(this.config.auth),this.performanceClient):((e,t)=>{const n={cacheLocation:Ut.Ix.MemoryStorage,temporaryCacheLocation:Ut.Ix.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!1};return new Ur(e,n,ne,t)})(this.config.auth.clientId,this.logger);const t={cacheLocation:Ut.Ix.MemoryStorage,temporaryCacheLocation:Ut.Ix.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!1};this.nativeInternalStorage=new Ur(this.config.auth.clientId,t,this.browserCrypto,this.logger,void 0,this.performanceClient),this.tokenCache=new Jo(this.config,this.browserStorage,this.logger,this.browserCrypto),this.activeSilentTokenRequests=new Map,this.trackPageVisibility=this.trackPageVisibility.bind(this),this.trackPageVisibilityWithMeasurement=this.trackPageVisibilityWithMeasurement.bind(this)}static async createController(e,t){const n=new ni(e);return await n.initialize(t),n}trackPageVisibility(e){e&&(this.logger.info("Perf: Visibility change detected"),this.performanceClient.incrementFields({visibilityChangeCount:1},e))}async initialize(e){if(this.logger.trace("initialize called"),this.initialized)return void this.logger.info("initialize has already been called, exiting early.");const t=(null===e||void 0===e?void 0:e.correlationId)||this.getRequestCorrelationId(),n=this.config.system.allowNativeBroker,r=this.performanceClient.startMeasurement(Mt.InitializeClientApplication,t);if(this.eventHandler.emitEvent(Gr.t.INITIALIZE_START),n)try{this.nativeExtensionProvider=await Do.createProvider(this.logger,this.config.system.nativeBrokerHandshakeTimeout,this.performanceClient)}catch(o){this.logger.verbose(o)}this.config.cache.claimsBasedCachingEnabled||(this.logger.verbose("Claims-based caching is disabled. Clearing the previous cache with claims"),await vr(this.browserStorage.clearTokensAndKeysWithClaims.bind(this.browserStorage),Mt.ClearTokensAndKeysWithClaims,this.logger,this.performanceClient,t)(this.performanceClient,t)),this.initialized=!0,this.eventHandler.emitEvent(Gr.t.INITIALIZE_END),r.end({allowNativeBroker:n,success:!0})}async handleRedirectPromise(e){if(this.logger.verbose("handleRedirectPromise called"),Kr(this.initialized),this.isBrowserEnvironment){const t=e||"";let n=this.redirectResponse.get(t);return"undefined"===typeof n?(n=this.handleRedirectPromiseInternal(e),this.redirectResponse.set(t,n),this.logger.verbose("handleRedirectPromise has been called for the first time, storing the promise")):this.logger.verbose("handleRedirectPromise has been called previously, returning the result from the first call"),n}return this.logger.verbose("handleRedirectPromise returns null, not browser environment"),null}async handleRedirectPromiseInternal(e){const t=this.getAllAccounts(),n=this.browserStorage.getCachedNativeRequest(),r=n&&Do.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider)&&this.nativeExtensionProvider&&!e,o=r?null===n||void 0===n?void 0:n.correlationId:this.browserStorage.getTemporaryCache(Ut.c4.CORRELATION_ID,!0)||"",i=this.performanceClient.startMeasurement(Mt.AcquireTokenRedirect,o);let a;if(this.eventHandler.emitEvent(Gr.t.HANDLE_REDIRECT_START,Ut.s_.Redirect),r&&this.nativeExtensionProvider){this.logger.trace("handleRedirectPromise - acquiring token from native platform");const e=new qo(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Ut.WN.handleRedirectPromise,this.performanceClient,this.nativeExtensionProvider,n.accountId,this.nativeInternalStorage,n.correlationId);a=vr(e.handleRedirectPromise.bind(e),Mt.HandleNativeRedirectPromiseMeasurement,this.logger,this.performanceClient,i.event.correlationId)(this.performanceClient,i.event.correlationId)}else{this.logger.trace("handleRedirectPromise - acquiring token from web flow");const t=this.createRedirectClient(o);a=vr(t.handleRedirectPromise.bind(t),Mt.HandleRedirectPromiseMeasurement,this.logger,this.performanceClient,i.event.correlationId)(e,i)}return a.then((e=>{if(e){t.length<this.getAllAccounts().length?(this.eventHandler.emitEvent(Gr.t.LOGIN_SUCCESS,Ut.s_.Redirect,e),this.logger.verbose("handleRedirectResponse returned result, login success")):(this.eventHandler.emitEvent(Gr.t.ACQUIRE_TOKEN_SUCCESS,Ut.s_.Redirect,e),this.logger.verbose("handleRedirectResponse returned result, acquire token success")),i.end({success:!0,accountType:ei(e.account)})}else i.event.errorCode?i.end({success:!1}):i.discard();return this.eventHandler.emitEvent(Gr.t.HANDLE_REDIRECT_END,Ut.s_.Redirect),e})).catch((e=>{const n=e;throw t.length>0?this.eventHandler.emitEvent(Gr.t.ACQUIRE_TOKEN_FAILURE,Ut.s_.Redirect,null,n):this.eventHandler.emitEvent(Gr.t.LOGIN_FAILURE,Ut.s_.Redirect,null,n),this.eventHandler.emitEvent(Gr.t.HANDLE_REDIRECT_END,Ut.s_.Redirect),i.end({success:!1},n),e}))}async acquireTokenRedirect(e){const t=this.getRequestCorrelationId(e);this.logger.verbose("acquireTokenRedirect called",t);const n=this.performanceClient.startMeasurement(Mt.AcquireTokenPreRedirect,t);n.add({accountType:ei(e.account),scenarioId:e.scenarioId});const r=e.onRedirectNavigate;if(r)e.onRedirectNavigate=e=>{const t="function"===typeof r?r(e):void 0;return!1!==t?n.end({success:!0}):n.discard(),t};else{const e=this.config.auth.onRedirectNavigate;this.config.auth.onRedirectNavigate=t=>{const r="function"===typeof e?e(t):void 0;return!1!==r?n.end({success:!0}):n.discard(),r}}const o=this.getAllAccounts().length>0;try{let r;if(zr(this.initialized,this.config),this.browserStorage.setInteractionInProgress(!0),o?this.eventHandler.emitEvent(Gr.t.ACQUIRE_TOKEN_START,Ut.s_.Redirect,e):this.eventHandler.emitEvent(Gr.t.LOGIN_START,Ut.s_.Redirect,e),this.nativeExtensionProvider&&this.canUseNative(e)){r=new qo(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Ut.WN.acquireTokenRedirect,this.performanceClient,this.nativeExtensionProvider,this.getNativeAccountId(e),this.nativeInternalStorage,t).acquireTokenRedirect(e,n).catch((n=>{if(n instanceof Ro&&_o(n)){this.nativeExtensionProvider=void 0;return this.createRedirectClient(t).acquireToken(e)}if(n instanceof Rr){this.logger.verbose("acquireTokenRedirect - Resolving interaction required error thrown by native broker by falling back to web flow");return this.createRedirectClient(t).acquireToken(e)}throw this.browserStorage.setInteractionInProgress(!1),n}))}else{r=this.createRedirectClient(t).acquireToken(e)}return await r}catch(i){throw n.end({success:!1},i),o?this.eventHandler.emitEvent(Gr.t.ACQUIRE_TOKEN_FAILURE,Ut.s_.Redirect,null,i):this.eventHandler.emitEvent(Gr.t.LOGIN_FAILURE,Ut.s_.Redirect,null,i),i}}acquireTokenPopup(e){const t=this.getRequestCorrelationId(e),n=this.performanceClient.startMeasurement(Mt.AcquireTokenPopup,t);n.add({scenarioId:e.scenarioId,accountType:ei(e.account)});try{this.logger.verbose("acquireTokenPopup called",t),ti(this.initialized,n),this.browserStorage.setInteractionInProgress(!0)}catch(i){return Promise.reject(i)}const r=this.getAllAccounts();let o;if(r.length>0?this.eventHandler.emitEvent(Gr.t.ACQUIRE_TOKEN_START,Ut.s_.Popup,e):this.eventHandler.emitEvent(Gr.t.LOGIN_START,Ut.s_.Popup,e),this.canUseNative(e))o=this.acquireTokenNative({...e,correlationId:t},Ut.WN.acquireTokenPopup).then((e=>(this.browserStorage.setInteractionInProgress(!1),n.end({success:!0,isNativeBroker:!0,requestId:e.requestId,accountType:ei(e.account)}),e))).catch((n=>{if(n instanceof Ro&&_o(n)){this.nativeExtensionProvider=void 0;return this.createPopupClient(t).acquireToken(e)}if(n instanceof Rr){this.logger.verbose("acquireTokenPopup - Resolving interaction required error thrown by native broker by falling back to web flow");return this.createPopupClient(t).acquireToken(e)}throw this.browserStorage.setInteractionInProgress(!1),n}));else{o=this.createPopupClient(t).acquireToken(e)}return o.then((e=>(r.length<this.getAllAccounts().length?this.eventHandler.emitEvent(Gr.t.LOGIN_SUCCESS,Ut.s_.Popup,e):this.eventHandler.emitEvent(Gr.t.ACQUIRE_TOKEN_SUCCESS,Ut.s_.Popup,e),n.end({success:!0,requestId:e.requestId,accessTokenSize:e.accessToken.length,idTokenSize:e.idToken.length,accountType:ei(e.account)}),e))).catch((e=>(r.length>0?this.eventHandler.emitEvent(Gr.t.ACQUIRE_TOKEN_FAILURE,Ut.s_.Popup,null,e):this.eventHandler.emitEvent(Gr.t.LOGIN_FAILURE,Ut.s_.Popup,null,e),n.end({success:!1},e),Promise.reject(e))))}trackPageVisibilityWithMeasurement(){const e=this.ssoSilentMeasurement||this.acquireTokenByCodeAsyncMeasurement;e&&(this.logger.info("Perf: Visibility change detected in ",e.event.name),e.increment({visibilityChangeCount:1}))}async ssoSilent(e){var t,n;const r=this.getRequestCorrelationId(e),o={...e,prompt:e.prompt,correlationId:r};let i;if(this.ssoSilentMeasurement=this.performanceClient.startMeasurement(Mt.SsoSilent,r),null===(t=this.ssoSilentMeasurement)||void 0===t||t.add({scenarioId:e.scenarioId,accountType:ei(e.account)}),ti(this.initialized,this.ssoSilentMeasurement),null===(n=this.ssoSilentMeasurement)||void 0===n||n.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement),this.logger.verbose("ssoSilent called",r),this.eventHandler.emitEvent(Gr.t.SSO_SILENT_START,Ut.s_.Silent,o),this.canUseNative(o))i=this.acquireTokenNative(o,Ut.WN.ssoSilent).catch((e=>{if(e instanceof Ro&&_o(e)){this.nativeExtensionProvider=void 0;return this.createSilentIframeClient(o.correlationId).acquireToken(o)}throw e}));else{i=this.createSilentIframeClient(o.correlationId).acquireToken(o)}return i.then((e=>{var t;return this.eventHandler.emitEvent(Gr.t.SSO_SILENT_SUCCESS,Ut.s_.Silent,e),null===(t=this.ssoSilentMeasurement)||void 0===t||t.end({success:!0,isNativeBroker:e.fromNativeBroker,requestId:e.requestId,accessTokenSize:e.accessToken.length,idTokenSize:e.idToken.length,accountType:ei(e.account)}),e})).catch((e=>{var t;throw this.eventHandler.emitEvent(Gr.t.SSO_SILENT_FAILURE,Ut.s_.Silent,null,e),null===(t=this.ssoSilentMeasurement)||void 0===t||t.end({success:!1},e),e})).finally((()=>{document.removeEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement)}))}async acquireTokenByCode(e){const t=this.getRequestCorrelationId(e);this.logger.trace("acquireTokenByCode called",t);const n=this.performanceClient.startMeasurement(Mt.AcquireTokenByCode,t);ti(this.initialized,n),this.eventHandler.emitEvent(Gr.t.ACQUIRE_TOKEN_BY_CODE_START,Ut.s_.Silent,e),n.add({scenarioId:e.scenarioId});try{if(e.code&&e.nativeAccountId)throw Dn(Sn);if(e.code){const r=e.code;let o=this.hybridAuthCodeResponses.get(r);return o?(this.logger.verbose("Existing acquireTokenByCode request found",t),n.discard()):(this.logger.verbose("Initiating new acquireTokenByCode request",t),o=this.acquireTokenByCodeAsync({...e,correlationId:t}).then((e=>(this.eventHandler.emitEvent(Gr.t.ACQUIRE_TOKEN_BY_CODE_SUCCESS,Ut.s_.Silent,e),this.hybridAuthCodeResponses.delete(r),n.end({success:!0,isNativeBroker:e.fromNativeBroker,requestId:e.requestId,accessTokenSize:e.accessToken.length,idTokenSize:e.idToken.length,accountType:ei(e.account)}),e))).catch((e=>{throw this.hybridAuthCodeResponses.delete(r),this.eventHandler.emitEvent(Gr.t.ACQUIRE_TOKEN_BY_CODE_FAILURE,Ut.s_.Silent,null,e),n.end({success:!1},e),e})),this.hybridAuthCodeResponses.set(r,o)),await o}if(e.nativeAccountId){if(this.canUseNative(e,e.nativeAccountId)){const r=await this.acquireTokenNative({...e,correlationId:t},Ut.WN.acquireTokenByCode,e.nativeAccountId).catch((e=>{throw e instanceof Ro&&_o(e)&&(this.nativeExtensionProvider=void 0),e}));return n.end({accountType:ei(r.account),success:!0}),r}throw Dn(En)}throw Dn(Tn)}catch(r){throw this.eventHandler.emitEvent(Gr.t.ACQUIRE_TOKEN_BY_CODE_FAILURE,Ut.s_.Silent,null,r),n.end({success:!1},r),r}}async acquireTokenByCodeAsync(e){var t;this.logger.trace("acquireTokenByCodeAsync called",e.correlationId),this.acquireTokenByCodeAsyncMeasurement=this.performanceClient.startMeasurement(Mt.AcquireTokenByCodeAsync,e.correlationId),null===(t=this.acquireTokenByCodeAsyncMeasurement)||void 0===t||t.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement);const n=this.createSilentAuthCodeClient(e.correlationId);return await n.acquireToken(e).then((e=>{var t;return null===(t=this.acquireTokenByCodeAsyncMeasurement)||void 0===t||t.end({success:!0,fromCache:e.fromCache,isNativeBroker:e.fromNativeBroker,requestId:e.requestId}),e})).catch((e=>{var t;throw null===(t=this.acquireTokenByCodeAsyncMeasurement)||void 0===t||t.end({success:!1},e),e})).finally((()=>{document.removeEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement)}))}async acquireTokenFromCache(e,t){switch(this.performanceClient.addQueueMeasurement(Mt.AcquireTokenFromCache,e.correlationId),t){case Ut.lu.Default:case Ut.lu.AccessToken:case Ut.lu.AccessTokenAndRefreshToken:const t=this.createSilentCacheClient(e.correlationId);return vr(t.acquireToken.bind(t),Mt.SilentCacheClientAcquireToken,this.logger,this.performanceClient,e.correlationId)(e);default:throw te(B)}}async acquireTokenByRefreshToken(e,t){switch(this.performanceClient.addQueueMeasurement(Mt.AcquireTokenByRefreshToken,e.correlationId),t){case Ut.lu.Default:case Ut.lu.AccessTokenAndRefreshToken:case Ut.lu.RefreshToken:case Ut.lu.RefreshTokenAndNetwork:const t=this.createSilentRefreshClient(e.correlationId);return vr(t.acquireToken.bind(t),Mt.SilentRefreshClientAcquireToken,this.logger,this.performanceClient,e.correlationId)(e);default:throw te(B)}}async acquireTokenBySilentIframe(e){this.performanceClient.addQueueMeasurement(Mt.AcquireTokenBySilentIframe,e.correlationId);const t=this.createSilentIframeClient(e.correlationId);return vr(t.acquireToken.bind(t),Mt.SilentIframeClientAcquireToken,this.logger,this.performanceClient,e.correlationId)(e)}async logout(e){const t=this.getRequestCorrelationId(e);return this.logger.warning("logout API is deprecated and will be removed in msal-browser v3.0.0. Use logoutRedirect instead.",t),this.logoutRedirect({correlationId:t,...e})}async logoutRedirect(e){const t=this.getRequestCorrelationId(e);zr(this.initialized,this.config),this.browserStorage.setInteractionInProgress(!0);return this.createRedirectClient(t).logout(e)}logoutPopup(e){try{const t=this.getRequestCorrelationId(e);jr(this.initialized),this.browserStorage.setInteractionInProgress(!0);return this.createPopupClient(t).logout(e)}catch(t){return Promise.reject(t)}}async clearCache(e){const t=this.getRequestCorrelationId(e);return this.createSilentCacheClient(t).logout(e)}getAllAccounts(e){return function(e,t,n,r){return e.verbose("getAllAccounts called"),n?t.getAllAccounts(r):[]}(this.logger,this.browserStorage,this.isBrowserEnvironment,e)}getAccount(e){return function(e,t,n){if(t.trace("getAccount called"),0===Object.keys(e).length)return t.warning("getAccount: No accountFilter provided"),null;const r=n.getAccountInfoFilteredBy(e);return r?(t.verbose("getAccount: Account matching provided filter found, returning"),r):(t.verbose("getAccount: No matching account found, returning null"),null)}(e,this.logger,this.browserStorage)}getAccountByUsername(e){return function(e,t,n){if(t.trace("getAccountByUsername called"),!e)return t.warning("getAccountByUsername: No username provided"),null;const r=n.getAccountInfoFilteredBy({username:e});return r?(t.verbose("getAccountByUsername: Account matching username found, returning"),t.verbosePii("getAccountByUsername: Returning signed-in accounts matching username: ".concat(e)),r):(t.verbose("getAccountByUsername: No matching account found, returning null"),null)}(e,this.logger,this.browserStorage)}getAccountByHomeId(e){return function(e,t,n){if(t.trace("getAccountByHomeId called"),!e)return t.warning("getAccountByHomeId: No homeAccountId provided"),null;const r=n.getAccountInfoFilteredBy({homeAccountId:e});return r?(t.verbose("getAccountByHomeId: Account matching homeAccountId found, returning"),t.verbosePii("getAccountByHomeId: Returning signed-in accounts matching homeAccountId: ".concat(e)),r):(t.verbose("getAccountByHomeId: No matching account found, returning null"),null)}(e,this.logger,this.browserStorage)}getAccountByLocalId(e){return function(e,t,n){if(t.trace("getAccountByLocalId called"),!e)return t.warning("getAccountByLocalId: No localAccountId provided"),null;const r=n.getAccountInfoFilteredBy({localAccountId:e});return r?(t.verbose("getAccountByLocalId: Account matching localAccountId found, returning"),t.verbosePii("getAccountByLocalId: Returning signed-in accounts matching localAccountId: ".concat(e)),r):(t.verbose("getAccountByLocalId: No matching account found, returning null"),null)}(e,this.logger,this.browserStorage)}setActiveAccount(e){!function(e,t){t.setActiveAccount(e)}(e,this.browserStorage)}getActiveAccount(){return this.browserStorage.getActiveAccount()}async hydrateCache(e,t){this.logger.verbose("hydrateCache called");const n=lt.createFromAccountInfo(e.account,e.cloudGraphHostName,e.msGraphHost);return this.browserStorage.setAccount(n),e.fromNativeBroker?(this.logger.verbose("Response was from native broker, storing in-memory"),this.nativeInternalStorage.hydrateCache(e,t)):this.browserStorage.hydrateCache(e,t)}async acquireTokenNative(e,t,n){if(this.logger.trace("acquireTokenNative called"),!this.nativeExtensionProvider)throw Dn(Rn);return new qo(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,t,this.performanceClient,this.nativeExtensionProvider,n||this.getNativeAccountId(e),this.nativeInternalStorage,e.correlationId).acquireToken(e)}canUseNative(e,t){if(this.logger.trace("canUseNative called"),!Do.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider,e.authenticationScheme))return this.logger.trace("canUseNative: isNativeAvailable returned false, returning false"),!1;if(e.prompt)switch(e.prompt){case o.NJ.NONE:case o.NJ.CONSENT:case o.NJ.LOGIN:this.logger.trace("canUseNative: prompt is compatible with native flow");break;default:return this.logger.trace("canUseNative: prompt = ".concat(e.prompt," is not compatible with native flow, returning false")),!1}return!(!t&&!this.getNativeAccountId(e))||(this.logger.trace("canUseNative: nativeAccountId is not available, returning false"),!1)}getNativeAccountId(e){const t=e.account||this.getAccount({loginHint:e.loginHint,sid:e.sid})||this.getActiveAccount();return t&&t.nativeAccountId||""}createPopupClient(e){return new Fo(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)}createRedirectClient(e){return new Ko(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)}createSilentIframeClient(e){return new Zo(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Ut.WN.ssoSilent,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)}createSilentCacheClient(e){return new xo(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeExtensionProvider,e)}createSilentRefreshClient(e){return new Yo(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeExtensionProvider,e)}createSilentAuthCodeClient(e){return new Xo(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Ut.WN.acquireTokenByCode,this.performanceClient,this.nativeExtensionProvider,e)}addEventCallback(e){return this.eventHandler.addEventCallback(e)}removeEventCallback(e){this.eventHandler.removeEventCallback(e)}addPerformanceCallback(e){return this.performanceClient.addPerformanceCallback(e)}removePerformanceCallback(e){return this.performanceClient.removePerformanceCallback(e)}enableAccountStorageEvents(){this.eventHandler.enableAccountStorageEvents()}disableAccountStorageEvents(){this.eventHandler.disableAccountStorageEvents()}getTokenCache(){return this.tokenCache}getLogger(){return this.logger}setLogger(e){this.logger=e}initializeWrapperLibrary(e,t){this.browserStorage.setWrapperMetadata(e,t)}setNavigationClient(e){this.navigationClient=e}getConfiguration(){return this.config}getPerformanceClient(){return this.performanceClient}isBrowserEnv(){return this.isBrowserEnvironment}getEventHandler(){return this.eventHandler}getRequestCorrelationId(e){return null!==e&&void 0!==e&&e.correlationId?e.correlationId:this.isBrowserEnvironment?cr():o.gT.EMPTY_STRING}async loginRedirect(e){const t=this.getRequestCorrelationId(e);return this.logger.verbose("loginRedirect called",t),this.acquireTokenRedirect({correlationId:t,...e||Ut.yo})}loginPopup(e){const t=this.getRequestCorrelationId(e);return this.logger.verbose("loginPopup called",t),this.acquireTokenPopup({correlationId:t,...e||Ut.yo})}async acquireTokenSilent(e){const t=this.getRequestCorrelationId(e),n=this.performanceClient.startMeasurement(Mt.AcquireTokenSilent,t);n.add({cacheLookupPolicy:e.cacheLookupPolicy,scenarioId:e.scenarioId}),ti(this.initialized,n),this.logger.verbose("acquireTokenSilent called",t);const r=e.account||this.getActiveAccount();if(!r)throw Dn(an);n.add({accountType:ei(r)});const i={clientId:this.config.auth.clientId,authority:e.authority||o.gT.EMPTY_STRING,scopes:e.scopes,homeAccountIdentifier:r.homeAccountId,claims:e.claims,authenticationScheme:e.authenticationScheme,resourceRequestMethod:e.resourceRequestMethod,resourceRequestUri:e.resourceRequestUri,shrClaims:e.shrClaims,sshKid:e.sshKid,shrOptions:e.shrOptions},a=JSON.stringify(i),s=this.activeSilentTokenRequests.get(a);if("undefined"===typeof s){this.logger.verbose("acquireTokenSilent called for the first time, storing active request",t);const o=vr(this.acquireTokenSilentAsync.bind(this),Mt.AcquireTokenSilentAsync,this.logger,this.performanceClient,t)({...e,correlationId:t},r).then((t=>(this.activeSilentTokenRequests.delete(a),n.end({success:!0,fromCache:t.fromCache,isNativeBroker:t.fromNativeBroker,cacheLookupPolicy:e.cacheLookupPolicy,requestId:t.requestId,accessTokenSize:t.accessToken.length,idTokenSize:t.idToken.length}),t))).catch((e=>{throw this.activeSilentTokenRequests.delete(a),n.end({success:!1},e),e}));return this.activeSilentTokenRequests.set(a,o),{...await o,state:e.state}}return this.logger.verbose("acquireTokenSilent has been called previously, returning the result from the first call",t),n.discard(),{...await s,state:e.state}}async acquireTokenSilentAsync(e,t){const n=()=>this.trackPageVisibility(e.correlationId);this.performanceClient.addQueueMeasurement(Mt.AcquireTokenSilentAsync,e.correlationId),this.eventHandler.emitEvent(Gr.t.ACQUIRE_TOKEN_START,Ut.s_.Silent,e),e.correlationId&&this.performanceClient.incrementFields({visibilityChangeCount:0},e.correlationId),document.addEventListener("visibilitychange",n);const r=await vr(So,Mt.InitializeSilentRequest,this.logger,this.performanceClient,e.correlationId)(e,t,this.config,this.performanceClient,this.logger),o=e.cacheLookupPolicy||Ut.lu.Default;return this.acquireTokenSilentNoIframe(r,o).catch((async e=>{const t=function(e,t){const n=!(e instanceof Rr&&e.subError!==kr),r=e.errorCode===Ut.qx.INVALID_GRANT_ERROR||e.errorCode===B,o=n&&r||e.errorCode===wr||e.errorCode===Sr,i=Ut.se.includes(t);return o&&i}(e,o);if(t){if(this.activeIframeRequest){if(o!==Ut.lu.Skip){const[t,n]=this.activeIframeRequest;this.logger.verbose("Iframe request is already in progress, awaiting resolution for request with correlationId: ".concat(n),r.correlationId);const i=this.performanceClient.startMeasurement(Mt.AwaitConcurrentIframe,r.correlationId);i.add({awaitIframeCorrelationId:n});const a=await t;if(i.end({success:a}),a)return this.logger.verbose("Parallel iframe request with correlationId: ".concat(n," succeeded. Retrying cache and/or RT redemption"),r.correlationId),this.acquireTokenSilentNoIframe(r,o);throw this.logger.info("Iframe request with correlationId: ".concat(n," failed. Interaction is required.")),e}return this.logger.warning("Another iframe request is currently in progress and CacheLookupPolicy is set to Skip. This may result in degraded performance and/or reliability for both calls. Please consider changing the CacheLookupPolicy to take advantage of request queuing and token cache.",r.correlationId),vr(this.acquireTokenBySilentIframe.bind(this),Mt.AcquireTokenBySilentIframe,this.logger,this.performanceClient,r.correlationId)(r)}{let e;return this.activeIframeRequest=[new Promise((t=>{e=t})),r.correlationId],this.logger.verbose("Refresh token expired/invalid or CacheLookupPolicy is set to Skip, attempting acquire token by iframe.",r.correlationId),vr(this.acquireTokenBySilentIframe.bind(this),Mt.AcquireTokenBySilentIframe,this.logger,this.performanceClient,r.correlationId)(r).then((t=>(e(!0),t))).catch((t=>{throw e(!1),t})).finally((()=>{this.activeIframeRequest=void 0}))}}throw e})).then((t=>(this.eventHandler.emitEvent(Gr.t.ACQUIRE_TOKEN_SUCCESS,Ut.s_.Silent,t),e.correlationId&&this.performanceClient.addFields({fromCache:t.fromCache,isNativeBroker:t.fromNativeBroker,requestId:t.requestId},e.correlationId),t))).catch((e=>{throw this.eventHandler.emitEvent(Gr.t.ACQUIRE_TOKEN_FAILURE,Ut.s_.Silent,null,e),e})).finally((()=>{document.removeEventListener("visibilitychange",n)}))}async acquireTokenSilentNoIframe(e,t){return Do.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider,e.authenticationScheme)&&e.account.nativeAccountId?(this.logger.verbose("acquireTokenSilent - attempting to acquire token from native platform"),this.acquireTokenNative(e,Ut.WN.acquireTokenSilent_silentFlow).catch((async e=>{if(e instanceof Ro&&_o(e))throw this.logger.verbose("acquireTokenSilent - native platform unavailable, falling back to web flow"),this.nativeExtensionProvider=void 0,te(B);throw e}))):(this.logger.verbose("acquireTokenSilent - attempting to acquire token from web flow"),vr(this.acquireTokenFromCache.bind(this),Mt.AcquireTokenFromCache,this.logger,this.performanceClient,e.correlationId)(e,t).catch((n=>{if(t===Ut.lu.AccessToken)throw n;return this.eventHandler.emitEvent(Gr.t.ACQUIRE_TOKEN_NETWORK_START,Ut.s_.Silent,e),vr(this.acquireTokenByRefreshToken.bind(this),Mt.AcquireTokenByRefreshToken,this.logger,this.performanceClient,e.correlationId)(e,t)})))}}class ri{static async createPublicClientApplication(e){const t=await async function(e,t){const n=new Kn(e);return await n.initialize(),ni.createController(n,t)}(e);return new ri(e,t)}constructor(e,t){this.controller=t||new ni(new Kn(e))}async initialize(e){return this.controller.initialize(e)}async acquireTokenPopup(e){return this.controller.acquireTokenPopup(e)}acquireTokenRedirect(e){return this.controller.acquireTokenRedirect(e)}acquireTokenSilent(e){return this.controller.acquireTokenSilent(e)}acquireTokenByCode(e){return this.controller.acquireTokenByCode(e)}addEventCallback(e){return this.controller.addEventCallback(e)}removeEventCallback(e){return this.controller.removeEventCallback(e)}addPerformanceCallback(e){return this.controller.addPerformanceCallback(e)}removePerformanceCallback(e){return this.controller.removePerformanceCallback(e)}enableAccountStorageEvents(){this.controller.enableAccountStorageEvents()}disableAccountStorageEvents(){this.controller.disableAccountStorageEvents()}getAccount(e){return this.controller.getAccount(e)}getAccountByHomeId(e){return this.controller.getAccountByHomeId(e)}getAccountByLocalId(e){return this.controller.getAccountByLocalId(e)}getAccountByUsername(e){return this.controller.getAccountByUsername(e)}getAllAccounts(e){return this.controller.getAllAccounts(e)}handleRedirectPromise(e){return this.controller.handleRedirectPromise(e)}loginPopup(e){return this.controller.loginPopup(e)}loginRedirect(e){return this.controller.loginRedirect(e)}logout(e){return this.controller.logout(e)}logoutRedirect(e){return this.controller.logoutRedirect(e)}logoutPopup(e){return this.controller.logoutPopup(e)}ssoSilent(e){return this.controller.ssoSilent(e)}getTokenCache(){return this.controller.getTokenCache()}getLogger(){return this.controller.getLogger()}setLogger(e){this.controller.setLogger(e)}setActiveAccount(e){this.controller.setActiveAccount(e)}getActiveAccount(){return this.controller.getActiveAccount()}initializeWrapperLibrary(e,t){return this.controller.initializeWrapperLibrary(e,t)}setNavigationClient(e){this.controller.setNavigationClient(e)}getConfiguration(){return this.controller.getConfiguration()}async hydrateCache(e,t){return this.controller.hydrateCache(e,t)}clearCache(e){return this.controller.clearCache(e)}}const oi='{\n    "issuer": "'.concat("https://login.veracity.com/a68572e3-63ce-4bc1-acdc-b64943502e9d/v2.0/",'",\n    "authorization_endpoint": "').concat("https://login.veracity.com/a68572e3-63ce-4bc1-acdc-b64943502e9d/oauth2/v2.0/authorize?p=b2c_1a_signinwithadfsidp",'",\n    "token_endpoint": "').concat("https://login.veracity.com/a68572e3-63ce-4bc1-acdc-b64943502e9d/oauth2/v2.0/token?p=b2c_1a_signinwithadfsidp",'",\n    "end_session_endpoint": "').concat("https://login.veracity.com/a68572e3-63ce-4bc1-acdc-b64943502e9d/oauth2/v2.0/logout?p=b2c_1a_signinwithadfsidp",'",\n    "jwks_uri": "').concat("https://login.veracity.com/a68572e3-63ce-4bc1-acdc-b64943502e9d/discovery/v2.0/keys?p=b2c_1a_signinwithadfsidp",'",\n    "response_modes_supported": [\n        "query",\n        "fragment",\n        "form_post"\n    ],\n    "response_types_supported": [\n        "code",\n        "code id_token",\n        "code token",\n        "code id_token token",\n        "id_token",\n        "id_token token",\n        "token",\n        "token id_token"\n    ],\n    "scopes_supported": [\n        "openid"\n    ],\n    "subject_types_supported": [\n        "pairwise"\n    ],\n    "id_token_signing_alg_values_supported": [\n        "RS256"\n    ],\n    "token_endpoint_auth_methods_supported": [\n        "client_secret_post",\n        "client_secret_basic"\n    ],\n    "claims_supported": [\n        "dnvglAccountName",\n        "myDnvglGuid",\n        "userId",\n        "oid",\n        "name",\n        "given_name",\n        "family_name",\n        "sub",\n        "email",\n        "upn",\n        "mfaType",\n        "mfa_required",\n        "authenticatedBy",\n        "iss",\n        "iat",\n        "exp",\n        "aud",\n        "acr",\n        "nonce",\n        "auth_time"\n    ]\n}');var ii,ai,si;const ci={auth:{clientId:null!==(ii="686faf8c-42dc-4c15-a2d4-eba82f0b3c2f")?ii:"",authority:null!==(ai="https://login.veracity.com/a68572e3-63ce-4bc1-acdc-b64943502e9d/")?ai:"",knownAuthorities:"login.veracity.com".split(","),redirectUri:null!==(si="/fpp/admin/")?si:"",navigateToLoginRequestUrl:"true"==="false".toLowerCase(),authorityMetadata:oi}},li=new ri(ci);!li.getActiveAccount()&&li.getAllAccounts().length>0&&li.setActiveAccount(li.getAllAccounts()[0]),li.addEventCallback((e=>{if(e.eventType===Gr.t.LOGIN_SUCCESS&&e.payload.account){const t=e.payload.account;li.setActiveAccount(t)}e.eventType===Gr.t.LOGOUT_SUCCESS&&li.getAllAccounts().length>0&&li.setActiveAccount(li.getAllAccounts()[0]),e.eventType===Gr.t.LOGIN_FAILURE&&console.log(JSON.stringify(e))}))},8278:(e,t,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}var o;n.d(t,{Ep:()=>d,J0:()=>s,LX:()=>I,RQ:()=>M,WK:()=>H,X3:()=>U,Zn:()=>_,aU:()=>o,cP:()=>h,cm:()=>P,fp:()=>g,lX:()=>a,pC:()=>x}),function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(o||(o={}));const i="popstate";function a(e){return void 0===e&&(e={}),p((function(e,t){let{pathname:n,search:r,hash:o}=e.location;return u("",{pathname:n,search:r,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){return"string"===typeof t?t:d(t)}),null,e)}function s(e,t){if(!1===e||null===e||"undefined"===typeof e)throw new Error(t)}function c(e,t){if(!e){"undefined"!==typeof console&&console.warn(t);try{throw new Error(t)}catch(n){}}}function l(e,t){return{usr:e.state,key:e.key,idx:t}}function u(e,t,n,o){return void 0===n&&(n=null),r({pathname:"string"===typeof e?e:e.pathname,search:"",hash:""},"string"===typeof t?h(t):t,{state:n,key:t&&t.key||o||Math.random().toString(36).substr(2,8)})}function d(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(t+="#"===r.charAt(0)?r:"#"+r),t}function h(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function p(e,t,n,a){void 0===a&&(a={});let{window:c=document.defaultView,v5Compat:h=!1}=a,p=c.history,f=o.Pop,g=null,m=v();function v(){return(p.state||{idx:null}).idx}function y(){f=o.Pop;let e=v(),t=null==e?null:e-m;m=e,g&&g({action:f,location:b.location,delta:t})}function C(e){let t="null"!==c.location.origin?c.location.origin:c.location.href,n="string"===typeof e?e:d(e);return s(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==m&&(m=0,p.replaceState(r({},p.state,{idx:m}),""));let b={get action(){return f},get location(){return e(c,p)},listen(e){if(g)throw new Error("A history only accepts one active listener");return c.addEventListener(i,y),g=e,()=>{c.removeEventListener(i,y),g=null}},createHref:e=>t(c,e),createURL:C,encodeLocation(e){let t=C(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){f=o.Push;let r=u(b.location,e,t);n&&n(r,e),m=v()+1;let i=l(r,m),a=b.createHref(r);try{p.pushState(i,"",a)}catch(s){if(s instanceof DOMException&&"DataCloneError"===s.name)throw s;c.location.assign(a)}h&&g&&g({action:f,location:b.location,delta:1})},replace:function(e,t){f=o.Replace;let r=u(b.location,e,t);n&&n(r,e),m=v();let i=l(r,m),a=b.createHref(r);p.replaceState(i,"",a),h&&g&&g({action:f,location:b.location,delta:0})},go:e=>p.go(e)};return b}var f;!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(f||(f={}));new Set(["lazy","caseSensitive","path","id","index","children"]);function g(e,t,n){void 0===n&&(n="/");let r=_(("string"===typeof t?h(t):t).pathname||"/",n);if(null==r)return null;let o=m(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(o);let i=null;for(let a=0;null==i&&a<o.length;++a)i=A(o[a],R(r));return i}function m(e,t,n,r){void 0===t&&(t=[]),void 0===n&&(n=[]),void 0===r&&(r="");let o=(e,o,i)=>{let a={relativePath:void 0===i?e.path||"":i,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};a.relativePath.startsWith("/")&&(s(a.relativePath.startsWith(r),'Absolute route path "'+a.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),a.relativePath=a.relativePath.slice(r.length));let c=M([r,a.relativePath]),l=n.concat(a);e.children&&e.children.length>0&&(s(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+c+'".'),m(e.children,t,l,c)),(null!=e.path||e.index)&&t.push({path:c,score:E(c,e.index),routesMeta:l})};return e.forEach(((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let r of v(e.path))o(e,t,r);else o(e,t)})),t}function v(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(0===r.length)return o?[i,""]:[i];let a=v(r.join("/")),s=[];return s.push(...a.map((e=>""===e?i:[i,e].join("/")))),o&&s.push(...a),s.map((t=>e.startsWith("/")&&""===t?"/":t))}const y=/^:[\w-]+$/,C=3,b=2,w=1,T=10,S=-2,k=e=>"*"===e;function E(e,t){let n=e.split("/"),r=n.length;return n.some(k)&&(r+=S),t&&(r+=b),n.filter((e=>!k(e))).reduce(((e,t)=>e+(y.test(t)?C:""===t?w:T)),r)}function A(e,t){let{routesMeta:n}=e,r={},o="/",i=[];for(let a=0;a<n.length;++a){let e=n[a],s=a===n.length-1,c="/"===o?t:t.slice(o.length)||"/",l=I({path:e.relativePath,caseSensitive:e.caseSensitive,end:s},c);if(!l)return null;Object.assign(r,l.params);let u=e.route;i.push({params:r,pathname:M([o,l.pathname]),pathnameBase:L(M([o,l.pathnameBase])),route:u}),"/"!==l.pathnameBase&&(o=M([o,l.pathnameBase]))}return i}function I(e,t){"string"===typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=function(e,t,n){void 0===t&&(t=!1);void 0===n&&(n=!0);c("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were "'+e.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+e.replace(/\*$/,"/*")+'".');let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((e,t,n)=>(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")));e.endsWith("*")?(r.push({paramName:"*"}),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))");let i=new RegExp(o,t?void 0:"i");return[i,r]}(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let i=o[0],a=i.replace(/(.)\/+$/,"$1"),s=o.slice(1);return{params:r.reduce(((e,t,n)=>{let{paramName:r,isOptional:o}=t;if("*"===r){let e=s[n]||"";a=i.slice(0,i.length-e.length).replace(/(.)\/+$/,"$1")}const l=s[n];return e[r]=o&&!l?void 0:function(e,t){try{return decodeURIComponent(e)}catch(n){return c(!1,'The value for the URL param "'+t+'" will not be decoded because the string "'+e+'" is a malformed URL segment. This is probably due to a bad percent encoding ('+n+")."),e}}(l||"",r),e}),{}),pathname:i,pathnameBase:a,pattern:e}}function R(e){try{return decodeURI(e)}catch(t){return c(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function _(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function N(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"].  Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function O(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function P(e,t){let n=O(e);return t?n.map(((t,n)=>n===e.length-1?t.pathname:t.pathnameBase)):n.map((e=>e.pathnameBase))}function x(e,t,n,o){let i;void 0===o&&(o=!1),"string"===typeof e?i=h(e):(i=r({},e),s(!i.pathname||!i.pathname.includes("?"),N("?","pathname","search",i)),s(!i.pathname||!i.pathname.includes("#"),N("#","pathname","hash",i)),s(!i.search||!i.search.includes("#"),N("#","search","hash",i)));let a,c=""===e||""===i.pathname,l=c?"/":i.pathname;if(null==l)a=n;else{let e=t.length-1;if(!o&&l.startsWith("..")){let t=l.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}a=e>=0?t[e]:"/"}let u=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:o=""}="string"===typeof e?h(e):e,i=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:i,search:q(r),hash:D(o)}}(i,a),d=l&&"/"!==l&&l.endsWith("/"),p=(c||"."===l)&&n.endsWith("/");return u.pathname.endsWith("/")||!d&&!p||(u.pathname+="/"),u}const M=e=>e.join("/").replace(/\/\/+/g,"/"),L=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),q=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",D=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";class U extends Error{}function H(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"boolean"===typeof e.internal&&"data"in e}const F=["post","put","patch","delete"],B=(new Set(F),["get",...F]);new Set(B),new Set([301,302,303,307,308]),new Set([307,308]);Symbol("deferred")},8890:function(e,t){var n;!function(t,n){"use strict";"object"===typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!==typeof window?window:this,(function(r,o){"use strict";var i=[],a=Object.getPrototypeOf,s=i.slice,c=i.flat?function(e){return i.flat.call(e)}:function(e){return i.concat.apply([],e)},l=i.push,u=i.indexOf,d={},h=d.toString,p=d.hasOwnProperty,f=p.toString,g=f.call(Object),m={},v=function(e){return"function"===typeof e&&"number"!==typeof e.nodeType&&"function"!==typeof e.item},y=function(e){return null!=e&&e===e.window},C=r.document,b={type:!0,src:!0,nonce:!0,noModule:!0};function w(e,t,n){var r,o,i=(n=n||C).createElement("script");if(i.text=e,t)for(r in b)(o=t[r]||t.getAttribute&&t.getAttribute(r))&&i.setAttribute(r,o);n.head.appendChild(i).parentNode.removeChild(i)}function T(e){return null==e?e+"":"object"===typeof e||"function"===typeof e?d[h.call(e)]||"object":typeof e}var S="3.7.1",k=/HTML$/i,E=function(e,t){return new E.fn.init(e,t)};function A(e){var t=!!e&&"length"in e&&e.length,n=T(e);return!v(e)&&!y(e)&&("array"===n||0===t||"number"===typeof t&&t>0&&t-1 in e)}function I(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}E.fn=E.prototype={jquery:S,constructor:E,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=E.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return E.each(this,e)},map:function(e){return this.pushStack(E.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(E.grep(this,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(E.grep(this,(function(e,t){return t%2})))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:l,sort:i.sort,splice:i.splice},E.extend=E.fn.extend=function(){var e,t,n,r,o,i,a=arguments[0]||{},s=1,c=arguments.length,l=!1;for("boolean"===typeof a&&(l=a,a=arguments[s]||{},s++),"object"===typeof a||v(a)||(a={}),s===c&&(a=this,s--);s<c;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(E.isPlainObject(r)||(o=Array.isArray(r)))?(n=a[t],i=o&&!Array.isArray(n)?[]:o||E.isPlainObject(n)?n:{},o=!1,a[t]=E.extend(l,i,r)):void 0!==r&&(a[t]=r));return a},E.extend({expando:"jQuery"+(S+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==h.call(e))&&(!(t=a(e))||"function"===typeof(n=p.call(t,"constructor")&&t.constructor)&&f.call(n)===g)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){w(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(A(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},text:function(e){var t,n="",r=0,o=e.nodeType;if(!o)for(;t=e[r++];)n+=E.text(t);return 1===o||11===o?e.textContent:9===o?e.documentElement.textContent:3===o||4===o?e.nodeValue:n},makeArray:function(e,t){var n=t||[];return null!=e&&(A(Object(e))?E.merge(n,"string"===typeof e?[e]:e):l.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:u.call(t,e,n)},isXMLDoc:function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!k.test(t||n&&n.nodeName||"HTML")},merge:function(e,t){for(var n=+t.length,r=0,o=e.length;r<n;r++)e[o++]=t[r];return e.length=o,e},grep:function(e,t,n){for(var r=[],o=0,i=e.length,a=!n;o<i;o++)!t(e[o],o)!==a&&r.push(e[o]);return r},map:function(e,t,n){var r,o,i=0,a=[];if(A(e))for(r=e.length;i<r;i++)null!=(o=t(e[i],i,n))&&a.push(o);else for(i in e)null!=(o=t(e[i],i,n))&&a.push(o);return c(a)},guid:1,support:m}),"function"===typeof Symbol&&(E.fn[Symbol.iterator]=i[Symbol.iterator]),E.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(e,t){d["[object "+t+"]"]=t.toLowerCase()}));var R=i.pop,_=i.sort,N=i.splice,O="[\\x20\\t\\r\\n\\f]",P=new RegExp("^"+O+"+|((?:^|[^\\\\])(?:\\\\.)*)"+O+"+$","g");E.contains=function(e,t){var n=t&&t.parentNode;return e===n||!(!n||1!==n.nodeType||!(e.contains?e.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))};var x=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function M(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e}E.escapeSelector=function(e){return(e+"").replace(x,M)};var L=C,q=l;!function(){var e,t,n,o,a,c,l,d,h,f,g=q,v=E.expando,y=0,C=0,b=ee(),w=ee(),T=ee(),S=ee(),k=function(e,t){return e===t&&(a=!0),0},A="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",x="(?:\\\\[\\da-fA-F]{1,6}"+O+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",M="\\["+O+"*("+x+")(?:"+O+"*([*^$|!~]?=)"+O+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+x+"))|)"+O+"*\\]",D=":("+x+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+M+")*)|.*)\\)|)",U=new RegExp(O+"+","g"),H=new RegExp("^"+O+"*,"+O+"*"),F=new RegExp("^"+O+"*([>+~]|"+O+")"+O+"*"),B=new RegExp(O+"|>"),K=new RegExp(D),j=new RegExp("^"+x+"$"),z={ID:new RegExp("^#("+x+")"),CLASS:new RegExp("^\\.("+x+")"),TAG:new RegExp("^("+x+"|[*])"),ATTR:new RegExp("^"+M),PSEUDO:new RegExp("^"+D),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+O+"*(even|odd|(([+-]|)(\\d*)n|)"+O+"*(?:([+-]|)"+O+"*(\\d+)|))"+O+"*\\)|)","i"),bool:new RegExp("^(?:"+A+")$","i"),needsContext:new RegExp("^"+O+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+O+"*((?:-\\d)?\\d*)"+O+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,G=/^h\d$/i,V=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Q=/[+~]/,Z=new RegExp("\\\\[\\da-fA-F]{1,6}"+O+"?|\\\\([^\\r\\n\\f])","g"),Y=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},J=function(){ce()},$=he((function(e){return!0===e.disabled&&I(e,"fieldset")}),{dir:"parentNode",next:"legend"});try{g.apply(i=s.call(L.childNodes),L.childNodes),i[L.childNodes.length].nodeType}catch(Ce){g={apply:function(e,t){q.apply(e,s.call(t))},call:function(e){q.apply(e,s.call(arguments,1))}}}function X(e,t,n,r){var o,i,a,s,l,u,p,f=t&&t.ownerDocument,y=t?t.nodeType:9;if(n=n||[],"string"!==typeof e||!e||1!==y&&9!==y&&11!==y)return n;if(!r&&(ce(t),t=t||c,d)){if(11!==y&&(l=V.exec(e)))if(o=l[1]){if(9===y){if(!(a=t.getElementById(o)))return n;if(a.id===o)return g.call(n,a),n}else if(f&&(a=f.getElementById(o))&&X.contains(t,a)&&a.id===o)return g.call(n,a),n}else{if(l[2])return g.apply(n,t.getElementsByTagName(e)),n;if((o=l[3])&&t.getElementsByClassName)return g.apply(n,t.getElementsByClassName(o)),n}if(!S[e+" "]&&(!h||!h.test(e))){if(p=e,f=t,1===y&&(B.test(e)||F.test(e))){for((f=Q.test(e)&&se(t.parentNode)||t)==t&&m.scope||((s=t.getAttribute("id"))?s=E.escapeSelector(s):t.setAttribute("id",s=v)),i=(u=ue(e)).length;i--;)u[i]=(s?"#"+s:":scope")+" "+de(u[i]);p=u.join(",")}try{return g.apply(n,f.querySelectorAll(p)),n}catch(C){S(e,!0)}finally{s===v&&t.removeAttribute("id")}}}return ye(e.replace(P,"$1"),t,n,r)}function ee(){var e=[];return function n(r,o){return e.push(r+" ")>t.cacheLength&&delete n[e.shift()],n[r+" "]=o}}function te(e){return e[v]=!0,e}function ne(e){var t=c.createElement("fieldset");try{return!!e(t)}catch(Ce){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function re(e){return function(t){return I(t,"input")&&t.type===e}}function oe(e){return function(t){return(I(t,"input")||I(t,"button"))&&t.type===e}}function ie(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&$(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function ae(e){return te((function(t){return t=+t,te((function(n,r){for(var o,i=e([],n.length,t),a=i.length;a--;)n[o=i[a]]&&(n[o]=!(r[o]=n[o]))}))}))}function se(e){return e&&"undefined"!==typeof e.getElementsByTagName&&e}function ce(e){var n,r=e?e.ownerDocument||e:L;return r!=c&&9===r.nodeType&&r.documentElement?(l=(c=r).documentElement,d=!E.isXMLDoc(c),f=l.matches||l.webkitMatchesSelector||l.msMatchesSelector,l.msMatchesSelector&&L!=c&&(n=c.defaultView)&&n.top!==n&&n.addEventListener("unload",J),m.getById=ne((function(e){return l.appendChild(e).id=E.expando,!c.getElementsByName||!c.getElementsByName(E.expando).length})),m.disconnectedMatch=ne((function(e){return f.call(e,"*")})),m.scope=ne((function(){return c.querySelectorAll(":scope")})),m.cssHas=ne((function(){try{return c.querySelector(":has(*,:jqfake)"),!1}catch(Ce){return!0}})),m.getById?(t.filter.ID=function(e){var t=e.replace(Z,Y);return function(e){return e.getAttribute("id")===t}},t.find.ID=function(e,t){if("undefined"!==typeof t.getElementById&&d){var n=t.getElementById(e);return n?[n]:[]}}):(t.filter.ID=function(e){var t=e.replace(Z,Y);return function(e){var n="undefined"!==typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},t.find.ID=function(e,t){if("undefined"!==typeof t.getElementById&&d){var n,r,o,i=t.getElementById(e);if(i){if((n=i.getAttributeNode("id"))&&n.value===e)return[i];for(o=t.getElementsByName(e),r=0;i=o[r++];)if((n=i.getAttributeNode("id"))&&n.value===e)return[i]}return[]}}),t.find.TAG=function(e,t){return"undefined"!==typeof t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},t.find.CLASS=function(e,t){if("undefined"!==typeof t.getElementsByClassName&&d)return t.getElementsByClassName(e)},h=[],ne((function(e){var t;l.appendChild(e).innerHTML="<a id='"+v+"' href='' disabled='disabled'></a><select id='"+v+"-\r\\' disabled='disabled'><option selected=''></option></select>",e.querySelectorAll("[selected]").length||h.push("\\["+O+"*(?:value|"+A+")"),e.querySelectorAll("[id~="+v+"-]").length||h.push("~="),e.querySelectorAll("a#"+v+"+*").length||h.push(".#.+[+~]"),e.querySelectorAll(":checked").length||h.push(":checked"),(t=c.createElement("input")).setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),l.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&h.push(":enabled",":disabled"),(t=c.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||h.push("\\["+O+"*name"+O+"*="+O+"*(?:''|\"\")")})),m.cssHas||h.push(":has"),h=h.length&&new RegExp(h.join("|")),k=function(e,t){if(e===t)return a=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!m.sortDetached&&t.compareDocumentPosition(e)===n?e===c||e.ownerDocument==L&&X.contains(L,e)?-1:t===c||t.ownerDocument==L&&X.contains(L,t)?1:o?u.call(o,e)-u.call(o,t):0:4&n?-1:1)},c):c}for(e in X.matches=function(e,t){return X(e,null,null,t)},X.matchesSelector=function(e,t){if(ce(e),d&&!S[t+" "]&&(!h||!h.test(t)))try{var n=f.call(e,t);if(n||m.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(Ce){S(t,!0)}return X(t,c,null,[e]).length>0},X.contains=function(e,t){return(e.ownerDocument||e)!=c&&ce(e),E.contains(e,t)},X.attr=function(e,n){(e.ownerDocument||e)!=c&&ce(e);var r=t.attrHandle[n.toLowerCase()],o=r&&p.call(t.attrHandle,n.toLowerCase())?r(e,n,!d):void 0;return void 0!==o?o:e.getAttribute(n)},X.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},E.uniqueSort=function(e){var t,n=[],r=0,i=0;if(a=!m.sortStable,o=!m.sortStable&&s.call(e,0),_.call(e,k),a){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)N.call(e,n[r],1)}return o=null,e},E.fn.uniqueSort=function(){return this.pushStack(E.uniqueSort(s.apply(this)))},t=E.expr={cacheLength:50,createPseudo:te,match:z,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Z,Y),e[3]=(e[3]||e[4]||e[5]||"").replace(Z,Y),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||X.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&X.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return z.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&K.test(n)&&(t=ue(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Z,Y).toLowerCase();return"*"===e?function(){return!0}:function(e){return I(e,t)}},CLASS:function(e){var t=b[e+" "];return t||(t=new RegExp("(^|"+O+")"+e+"("+O+"|$)"))&&b(e,(function(e){return t.test("string"===typeof e.className&&e.className||"undefined"!==typeof e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(r){var o=X.attr(r,e);return null==o?"!="===t:!t||(o+="","="===t?o===n:"!="===t?o!==n:"^="===t?n&&0===o.indexOf(n):"*="===t?n&&o.indexOf(n)>-1:"$="===t?n&&o.slice(-n.length)===n:"~="===t?(" "+o.replace(U," ")+" ").indexOf(n)>-1:"|="===t&&(o===n||o.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,o){var i="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===o?function(e){return!!e.parentNode}:function(t,n,c){var l,u,d,h,p,f=i!==a?"nextSibling":"previousSibling",g=t.parentNode,m=s&&t.nodeName.toLowerCase(),C=!c&&!s,b=!1;if(g){if(i){for(;f;){for(d=t;d=d[f];)if(s?I(d,m):1===d.nodeType)return!1;p=f="only"===e&&!p&&"nextSibling"}return!0}if(p=[a?g.firstChild:g.lastChild],a&&C){for(b=(h=(l=(u=g[v]||(g[v]={}))[e]||[])[0]===y&&l[1])&&l[2],d=h&&g.childNodes[h];d=++h&&d&&d[f]||(b=h=0)||p.pop();)if(1===d.nodeType&&++b&&d===t){u[e]=[y,h,b];break}}else if(C&&(b=h=(l=(u=t[v]||(t[v]={}))[e]||[])[0]===y&&l[1]),!1===b)for(;(d=++h&&d&&d[f]||(b=h=0)||p.pop())&&(!(s?I(d,m):1===d.nodeType)||!++b||(C&&((u=d[v]||(d[v]={}))[e]=[y,b]),d!==t)););return(b-=o)===r||b%r===0&&b/r>=0}}},PSEUDO:function(e,n){var r,o=t.pseudos[e]||t.setFilters[e.toLowerCase()]||X.error("unsupported pseudo: "+e);return o[v]?o(n):o.length>1?(r=[e,e,"",n],t.setFilters.hasOwnProperty(e.toLowerCase())?te((function(e,t){for(var r,i=o(e,n),a=i.length;a--;)e[r=u.call(e,i[a])]=!(t[r]=i[a])})):function(e){return o(e,0,r)}):o}},pseudos:{not:te((function(e){var t=[],n=[],r=ve(e.replace(P,"$1"));return r[v]?te((function(e,t,n,o){for(var i,a=r(e,null,o,[]),s=e.length;s--;)(i=a[s])&&(e[s]=!(t[s]=i))})):function(e,o,i){return t[0]=e,r(t,null,i,n),t[0]=null,!n.pop()}})),has:te((function(e){return function(t){return X(e,t).length>0}})),contains:te((function(e){return e=e.replace(Z,Y),function(t){return(t.textContent||E.text(t)).indexOf(e)>-1}})),lang:te((function(e){return j.test(e||"")||X.error("unsupported lang: "+e),e=e.replace(Z,Y).toLowerCase(),function(t){var n;do{if(n=d?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(e){var t=r.location&&r.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===l},focus:function(e){return e===function(){try{return c.activeElement}catch(e){}}()&&c.hasFocus()&&!!(e.type||e.href||~e.tabIndex)},enabled:ie(!1),disabled:ie(!0),checked:function(e){return I(e,"input")&&!!e.checked||I(e,"option")&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!t.pseudos.empty(e)},header:function(e){return G.test(e.nodeName)},input:function(e){return W.test(e.nodeName)},button:function(e){return I(e,"input")&&"button"===e.type||I(e,"button")},text:function(e){var t;return I(e,"input")&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ae((function(){return[0]})),last:ae((function(e,t){return[t-1]})),eq:ae((function(e,t,n){return[n<0?n+t:n]})),even:ae((function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e})),odd:ae((function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e})),lt:ae((function(e,t,n){var r;for(r=n<0?n+t:n>t?t:n;--r>=0;)e.push(r);return e})),gt:ae((function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e}))}},t.pseudos.nth=t.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})t.pseudos[e]=re(e);for(e in{submit:!0,reset:!0})t.pseudos[e]=oe(e);function le(){}function ue(e,n){var r,o,i,a,s,c,l,u=w[e+" "];if(u)return n?0:u.slice(0);for(s=e,c=[],l=t.preFilter;s;){for(a in r&&!(o=H.exec(s))||(o&&(s=s.slice(o[0].length)||s),c.push(i=[])),r=!1,(o=F.exec(s))&&(r=o.shift(),i.push({value:r,type:o[0].replace(P," ")}),s=s.slice(r.length)),t.filter)!(o=z[a].exec(s))||l[a]&&!(o=l[a](o))||(r=o.shift(),i.push({value:r,type:a,matches:o}),s=s.slice(r.length));if(!r)break}return n?s.length:s?X.error(e):w(e,c).slice(0)}function de(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function he(e,t,n){var r=t.dir,o=t.next,i=o||r,a=n&&"parentNode"===i,s=C++;return t.first?function(t,n,o){for(;t=t[r];)if(1===t.nodeType||a)return e(t,n,o);return!1}:function(t,n,c){var l,u,d=[y,s];if(c){for(;t=t[r];)if((1===t.nodeType||a)&&e(t,n,c))return!0}else for(;t=t[r];)if(1===t.nodeType||a)if(u=t[v]||(t[v]={}),o&&I(t,o))t=t[r]||t;else{if((l=u[i])&&l[0]===y&&l[1]===s)return d[2]=l[2];if(u[i]=d,d[2]=e(t,n,c))return!0}return!1}}function pe(e){return e.length>1?function(t,n,r){for(var o=e.length;o--;)if(!e[o](t,n,r))return!1;return!0}:e[0]}function fe(e,t,n,r,o){for(var i,a=[],s=0,c=e.length,l=null!=t;s<c;s++)(i=e[s])&&(n&&!n(i,r,o)||(a.push(i),l&&t.push(s)));return a}function ge(e,t,n,r,o,i){return r&&!r[v]&&(r=ge(r)),o&&!o[v]&&(o=ge(o,i)),te((function(i,a,s,c){var l,d,h,p,f=[],m=[],v=a.length,y=i||function(e,t,n){for(var r=0,o=t.length;r<o;r++)X(e,t[r],n);return n}(t||"*",s.nodeType?[s]:s,[]),C=!e||!i&&t?y:fe(y,f,e,s,c);if(n?n(C,p=o||(i?e:v||r)?[]:a,s,c):p=C,r)for(l=fe(p,m),r(l,[],s,c),d=l.length;d--;)(h=l[d])&&(p[m[d]]=!(C[m[d]]=h));if(i){if(o||e){if(o){for(l=[],d=p.length;d--;)(h=p[d])&&l.push(C[d]=h);o(null,p=[],l,c)}for(d=p.length;d--;)(h=p[d])&&(l=o?u.call(i,h):f[d])>-1&&(i[l]=!(a[l]=h))}}else p=fe(p===a?p.splice(v,p.length):p),o?o(null,a,p,c):g.apply(a,p)}))}function me(e){for(var r,o,i,a=e.length,s=t.relative[e[0].type],c=s||t.relative[" "],l=s?1:0,d=he((function(e){return e===r}),c,!0),h=he((function(e){return u.call(r,e)>-1}),c,!0),p=[function(e,t,o){var i=!s&&(o||t!=n)||((r=t).nodeType?d(e,t,o):h(e,t,o));return r=null,i}];l<a;l++)if(o=t.relative[e[l].type])p=[he(pe(p),o)];else{if((o=t.filter[e[l].type].apply(null,e[l].matches))[v]){for(i=++l;i<a&&!t.relative[e[i].type];i++);return ge(l>1&&pe(p),l>1&&de(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(P,"$1"),o,l<i&&me(e.slice(l,i)),i<a&&me(e=e.slice(i)),i<a&&de(e))}p.push(o)}return pe(p)}function ve(e,r){var o,i=[],a=[],s=T[e+" "];if(!s){for(r||(r=ue(e)),o=r.length;o--;)(s=me(r[o]))[v]?i.push(s):a.push(s);s=T(e,function(e,r){var o=r.length>0,i=e.length>0,a=function(a,s,l,u,h){var p,f,m,v=0,C="0",b=a&&[],w=[],T=n,S=a||i&&t.find.TAG("*",h),k=y+=null==T?1:Math.random()||.1,A=S.length;for(h&&(n=s==c||s||h);C!==A&&null!=(p=S[C]);C++){if(i&&p){for(f=0,s||p.ownerDocument==c||(ce(p),l=!d);m=e[f++];)if(m(p,s||c,l)){g.call(u,p);break}h&&(y=k)}o&&((p=!m&&p)&&v--,a&&b.push(p))}if(v+=C,o&&C!==v){for(f=0;m=r[f++];)m(b,w,s,l);if(a){if(v>0)for(;C--;)b[C]||w[C]||(w[C]=R.call(u));w=fe(w)}g.apply(u,w),h&&!a&&w.length>0&&v+r.length>1&&E.uniqueSort(u)}return h&&(y=k,n=T),b};return o?te(a):a}(a,i)),s.selector=e}return s}function ye(e,n,r,o){var i,a,s,c,l,u="function"===typeof e&&e,h=!o&&ue(e=u.selector||e);if(r=r||[],1===h.length){if((a=h[0]=h[0].slice(0)).length>2&&"ID"===(s=a[0]).type&&9===n.nodeType&&d&&t.relative[a[1].type]){if(!(n=(t.find.ID(s.matches[0].replace(Z,Y),n)||[])[0]))return r;u&&(n=n.parentNode),e=e.slice(a.shift().value.length)}for(i=z.needsContext.test(e)?0:a.length;i--&&(s=a[i],!t.relative[c=s.type]);)if((l=t.find[c])&&(o=l(s.matches[0].replace(Z,Y),Q.test(a[0].type)&&se(n.parentNode)||n))){if(a.splice(i,1),!(e=o.length&&de(a)))return g.apply(r,o),r;break}}return(u||ve(e,h))(o,n,!d,r,!n||Q.test(e)&&se(n.parentNode)||n),r}le.prototype=t.filters=t.pseudos,t.setFilters=new le,m.sortStable=v.split("").sort(k).join("")===v,ce(),m.sortDetached=ne((function(e){return 1&e.compareDocumentPosition(c.createElement("fieldset"))})),E.find=X,E.expr[":"]=E.expr.pseudos,E.unique=E.uniqueSort,X.compile=ve,X.select=ye,X.setDocument=ce,X.tokenize=ue,X.escape=E.escapeSelector,X.getText=E.text,X.isXML=E.isXMLDoc,X.selectors=E.expr,X.support=E.support,X.uniqueSort=E.uniqueSort}();var D=function(e,t,n){for(var r=[],o=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(o&&E(e).is(n))break;r.push(e)}return r},U=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},H=E.expr.match.needsContext,F=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function B(e,t,n){return v(t)?E.grep(e,(function(e,r){return!!t.call(e,r,e)!==n})):t.nodeType?E.grep(e,(function(e){return e===t!==n})):"string"!==typeof t?E.grep(e,(function(e){return u.call(t,e)>-1!==n})):E.filter(t,e,n)}E.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?E.find.matchesSelector(r,e)?[r]:[]:E.find.matches(e,E.grep(t,(function(e){return 1===e.nodeType})))},E.fn.extend({find:function(e){var t,n,r=this.length,o=this;if("string"!==typeof e)return this.pushStack(E(e).filter((function(){for(t=0;t<r;t++)if(E.contains(o[t],this))return!0})));for(n=this.pushStack([]),t=0;t<r;t++)E.find(e,o[t],n);return r>1?E.uniqueSort(n):n},filter:function(e){return this.pushStack(B(this,e||[],!1))},not:function(e){return this.pushStack(B(this,e||[],!0))},is:function(e){return!!B(this,"string"===typeof e&&H.test(e)?E(e):e||[],!1).length}});var K,j=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(E.fn.init=function(e,t,n){var r,o;if(!e)return this;if(n=n||K,"string"===typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:j.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof E?t[0]:t,E.merge(this,E.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:C,!0)),F.test(r[1])&&E.isPlainObject(t))for(r in t)v(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(o=C.getElementById(r[2]))&&(this[0]=o,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):v(e)?void 0!==n.ready?n.ready(e):e(E):E.makeArray(e,this)}).prototype=E.fn,K=E(C);var z=/^(?:parents|prev(?:Until|All))/,W={children:!0,contents:!0,next:!0,prev:!0};function G(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}E.fn.extend({has:function(e){var t=E(e,this),n=t.length;return this.filter((function(){for(var e=0;e<n;e++)if(E.contains(this,t[e]))return!0}))},closest:function(e,t){var n,r=0,o=this.length,i=[],a="string"!==typeof e&&E(e);if(!H.test(e))for(;r<o;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&E.find.matchesSelector(n,e))){i.push(n);break}return this.pushStack(i.length>1?E.uniqueSort(i):i)},index:function(e){return e?"string"===typeof e?u.call(E(e),this[0]):u.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(E.uniqueSort(E.merge(this.get(),E(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),E.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return D(e,"parentNode")},parentsUntil:function(e,t,n){return D(e,"parentNode",n)},next:function(e){return G(e,"nextSibling")},prev:function(e){return G(e,"previousSibling")},nextAll:function(e){return D(e,"nextSibling")},prevAll:function(e){return D(e,"previousSibling")},nextUntil:function(e,t,n){return D(e,"nextSibling",n)},prevUntil:function(e,t,n){return D(e,"previousSibling",n)},siblings:function(e){return U((e.parentNode||{}).firstChild,e)},children:function(e){return U(e.firstChild)},contents:function(e){return null!=e.contentDocument&&a(e.contentDocument)?e.contentDocument:(I(e,"template")&&(e=e.content||e),E.merge([],e.childNodes))}},(function(e,t){E.fn[e]=function(n,r){var o=E.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"===typeof r&&(o=E.filter(r,o)),this.length>1&&(W[e]||E.uniqueSort(o),z.test(e)&&o.reverse()),this.pushStack(o)}}));var V=/[^\x20\t\r\n\f]+/g;function Q(e){return e}function Z(e){throw e}function Y(e,t,n,r){var o;try{e&&v(o=e.promise)?o.call(e).done(t).fail(n):e&&v(o=e.then)?o.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}E.Callbacks=function(e){e="string"===typeof e?function(e){var t={};return E.each(e.match(V)||[],(function(e,n){t[n]=!0})),t}(e):E.extend({},e);var t,n,r,o,i=[],a=[],s=-1,c=function(){for(o=o||e.once,r=t=!0;a.length;s=-1)for(n=a.shift();++s<i.length;)!1===i[s].apply(n[0],n[1])&&e.stopOnFalse&&(s=i.length,n=!1);e.memory||(n=!1),t=!1,o&&(i=n?[]:"")},l={add:function(){return i&&(n&&!t&&(s=i.length-1,a.push(n)),function t(n){E.each(n,(function(n,r){v(r)?e.unique&&l.has(r)||i.push(r):r&&r.length&&"string"!==T(r)&&t(r)}))}(arguments),n&&!t&&c()),this},remove:function(){return E.each(arguments,(function(e,t){for(var n;(n=E.inArray(t,i,n))>-1;)i.splice(n,1),n<=s&&s--})),this},has:function(e){return e?E.inArray(e,i)>-1:i.length>0},empty:function(){return i&&(i=[]),this},disable:function(){return o=a=[],i=n="",this},disabled:function(){return!i},lock:function(){return o=a=[],n||t||(i=n=""),this},locked:function(){return!!o},fireWith:function(e,n){return o||(n=[e,(n=n||[]).slice?n.slice():n],a.push(n),t||c()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l},E.extend({Deferred:function(e){var t=[["notify","progress",E.Callbacks("memory"),E.Callbacks("memory"),2],["resolve","done",E.Callbacks("once memory"),E.Callbacks("once memory"),0,"resolved"],["reject","fail",E.Callbacks("once memory"),E.Callbacks("once memory"),1,"rejected"]],n="pending",o={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},catch:function(e){return o.then(null,e)},pipe:function(){var e=arguments;return E.Deferred((function(n){E.each(t,(function(t,r){var o=v(e[r[4]])&&e[r[4]];i[r[1]]((function(){var e=o&&o.apply(this,arguments);e&&v(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,o?[e]:arguments)}))})),e=null})).promise()},then:function(e,n,o){var i=0;function a(e,t,n,o){return function(){var s=this,c=arguments,l=function(){var r,l;if(!(e<i)){if((r=n.apply(s,c))===t.promise())throw new TypeError("Thenable self-resolution");l=r&&("object"===typeof r||"function"===typeof r)&&r.then,v(l)?o?l.call(r,a(i,t,Q,o),a(i,t,Z,o)):(i++,l.call(r,a(i,t,Q,o),a(i,t,Z,o),a(i,t,Q,t.notifyWith))):(n!==Q&&(s=void 0,c=[r]),(o||t.resolveWith)(s,c))}},u=o?l:function(){try{l()}catch(r){E.Deferred.exceptionHook&&E.Deferred.exceptionHook(r,u.error),e+1>=i&&(n!==Z&&(s=void 0,c=[r]),t.rejectWith(s,c))}};e?u():(E.Deferred.getErrorHook?u.error=E.Deferred.getErrorHook():E.Deferred.getStackHook&&(u.error=E.Deferred.getStackHook()),r.setTimeout(u))}}return E.Deferred((function(r){t[0][3].add(a(0,r,v(o)?o:Q,r.notifyWith)),t[1][3].add(a(0,r,v(e)?e:Q)),t[2][3].add(a(0,r,v(n)?n:Z))})).promise()},promise:function(e){return null!=e?E.extend(e,o):o}},i={};return E.each(t,(function(e,r){var a=r[2],s=r[5];o[r[1]]=a.add,s&&a.add((function(){n=s}),t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),a.add(r[3].fire),i[r[0]]=function(){return i[r[0]+"With"](this===i?void 0:this,arguments),this},i[r[0]+"With"]=a.fireWith})),o.promise(i),e&&e.call(i,i),i},when:function(e){var t=arguments.length,n=t,r=Array(n),o=s.call(arguments),i=E.Deferred(),a=function(e){return function(n){r[e]=this,o[e]=arguments.length>1?s.call(arguments):n,--t||i.resolveWith(r,o)}};if(t<=1&&(Y(e,i.done(a(n)).resolve,i.reject,!t),"pending"===i.state()||v(o[n]&&o[n].then)))return i.then();for(;n--;)Y(o[n],a(n),i.reject);return i.promise()}});var J=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;E.Deferred.exceptionHook=function(e,t){r.console&&r.console.warn&&e&&J.test(e.name)&&r.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},E.readyException=function(e){r.setTimeout((function(){throw e}))};var $=E.Deferred();function X(){C.removeEventListener("DOMContentLoaded",X),r.removeEventListener("load",X),E.ready()}E.fn.ready=function(e){return $.then(e).catch((function(e){E.readyException(e)})),this},E.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--E.readyWait:E.isReady)||(E.isReady=!0,!0!==e&&--E.readyWait>0||$.resolveWith(C,[E]))}}),E.ready.then=$.then,"complete"===C.readyState||"loading"!==C.readyState&&!C.documentElement.doScroll?r.setTimeout(E.ready):(C.addEventListener("DOMContentLoaded",X),r.addEventListener("load",X));var ee=function(e,t,n,r,o,i,a){var s=0,c=e.length,l=null==n;if("object"===T(n))for(s in o=!0,n)ee(e,t,s,n[s],!0,i,a);else if(void 0!==r&&(o=!0,v(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(E(e),n)})),t))for(;s<c;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return o?e:l?t.call(e):c?t(e[0],n):i},te=/^-ms-/,ne=/-([a-z])/g;function re(e,t){return t.toUpperCase()}function oe(e){return e.replace(te,"ms-").replace(ne,re)}var ie=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function ae(){this.expando=E.expando+ae.uid++}ae.uid=1,ae.prototype={cache:function(e){var t=e[this.expando];return t||(t={},ie(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,o=this.cache(e);if("string"===typeof t)o[oe(t)]=n;else for(r in t)o[oe(r)]=t[r];return o},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][oe(t)]},access:function(e,t,n){return void 0===t||t&&"string"===typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(oe):(t=oe(t))in r?[t]:t.match(V)||[]).length;for(;n--;)delete r[t[n]]}(void 0===t||E.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!E.isEmptyObject(t)}};var se=new ae,ce=new ae,le=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,ue=/[A-Z]/g;function de(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(ue,"-$&").toLowerCase(),"string"===typeof(n=e.getAttribute(r))){try{n=function(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:le.test(e)?JSON.parse(e):e)}(n)}catch(o){}ce.set(e,t,n)}else n=void 0;return n}E.extend({hasData:function(e){return ce.hasData(e)||se.hasData(e)},data:function(e,t,n){return ce.access(e,t,n)},removeData:function(e,t){ce.remove(e,t)},_data:function(e,t,n){return se.access(e,t,n)},_removeData:function(e,t){se.remove(e,t)}}),E.fn.extend({data:function(e,t){var n,r,o,i=this[0],a=i&&i.attributes;if(void 0===e){if(this.length&&(o=ce.get(i),1===i.nodeType&&!se.get(i,"hasDataAttrs"))){for(n=a.length;n--;)a[n]&&0===(r=a[n].name).indexOf("data-")&&(r=oe(r.slice(5)),de(i,r,o[r]));se.set(i,"hasDataAttrs",!0)}return o}return"object"===typeof e?this.each((function(){ce.set(this,e)})):ee(this,(function(t){var n;if(i&&void 0===t)return void 0!==(n=ce.get(i,e))||void 0!==(n=de(i,e))?n:void 0;this.each((function(){ce.set(this,e,t)}))}),null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each((function(){ce.remove(this,e)}))}}),E.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=se.get(e,t),n&&(!r||Array.isArray(n)?r=se.access(e,t,E.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=E.queue(e,t),r=n.length,o=n.shift(),i=E._queueHooks(e,t);"inprogress"===o&&(o=n.shift(),r--),o&&("fx"===t&&n.unshift("inprogress"),delete i.stop,o.call(e,(function(){E.dequeue(e,t)}),i)),!r&&i&&i.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return se.get(e,n)||se.access(e,n,{empty:E.Callbacks("once memory").add((function(){se.remove(e,[t+"queue",n])}))})}}),E.fn.extend({queue:function(e,t){var n=2;return"string"!==typeof e&&(t=e,e="fx",n--),arguments.length<n?E.queue(this[0],e):void 0===t?this:this.each((function(){var n=E.queue(this,e,t);E._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&E.dequeue(this,e)}))},dequeue:function(e){return this.each((function(){E.dequeue(this,e)}))},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,o=E.Deferred(),i=this,a=this.length,s=function(){--r||o.resolveWith(i,[i])};for("string"!==typeof e&&(t=e,e=void 0),e=e||"fx";a--;)(n=se.get(i[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),o.promise(t)}});var he=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,pe=new RegExp("^(?:([+-])=|)("+he+")([a-z%]*)$","i"),fe=["Top","Right","Bottom","Left"],ge=C.documentElement,me=function(e){return E.contains(e.ownerDocument,e)},ve={composed:!0};ge.getRootNode&&(me=function(e){return E.contains(e.ownerDocument,e)||e.getRootNode(ve)===e.ownerDocument});var ye=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&me(e)&&"none"===E.css(e,"display")};function Ce(e,t,n,r){var o,i,a=20,s=r?function(){return r.cur()}:function(){return E.css(e,t,"")},c=s(),l=n&&n[3]||(E.cssNumber[t]?"":"px"),u=e.nodeType&&(E.cssNumber[t]||"px"!==l&&+c)&&pe.exec(E.css(e,t));if(u&&u[3]!==l){for(c/=2,l=l||u[3],u=+c||1;a--;)E.style(e,t,u+l),(1-i)*(1-(i=s()/c||.5))<=0&&(a=0),u/=i;u*=2,E.style(e,t,u+l),n=n||[]}return n&&(u=+u||+c||0,o=n[1]?u+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=u,r.end=o)),o}var be={};function we(e){var t,n=e.ownerDocument,r=e.nodeName,o=be[r];return o||(t=n.body.appendChild(n.createElement(r)),o=E.css(t,"display"),t.parentNode.removeChild(t),"none"===o&&(o="block"),be[r]=o,o)}function Te(e,t){for(var n,r,o=[],i=0,a=e.length;i<a;i++)(r=e[i]).style&&(n=r.style.display,t?("none"===n&&(o[i]=se.get(r,"display")||null,o[i]||(r.style.display="")),""===r.style.display&&ye(r)&&(o[i]=we(r))):"none"!==n&&(o[i]="none",se.set(r,"display",n)));for(i=0;i<a;i++)null!=o[i]&&(e[i].style.display=o[i]);return e}E.fn.extend({show:function(){return Te(this,!0)},hide:function(){return Te(this)},toggle:function(e){return"boolean"===typeof e?e?this.show():this.hide():this.each((function(){ye(this)?E(this).show():E(this).hide()}))}});var Se=/^(?:checkbox|radio)$/i,ke=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,Ee=/^$|^module$|\/(?:java|ecma)script/i;!function(){var e=C.createDocumentFragment().appendChild(C.createElement("div")),t=C.createElement("input");t.setAttribute("type","radio"),t.setAttribute("checked","checked"),t.setAttribute("name","t"),e.appendChild(t),m.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,e.innerHTML="<textarea>x</textarea>",m.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue,e.innerHTML="<option></option>",m.option=!!e.lastChild}();var Ae={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function Ie(e,t){var n;return n="undefined"!==typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!==typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&I(e,t)?E.merge([e],n):n}function Re(e,t){for(var n=0,r=e.length;n<r;n++)se.set(e[n],"globalEval",!t||se.get(t[n],"globalEval"))}Ae.tbody=Ae.tfoot=Ae.colgroup=Ae.caption=Ae.thead,Ae.th=Ae.td,m.option||(Ae.optgroup=Ae.option=[1,"<select multiple='multiple'>","</select>"]);var _e=/<|&#?\w+;/;function Ne(e,t,n,r,o){for(var i,a,s,c,l,u,d=t.createDocumentFragment(),h=[],p=0,f=e.length;p<f;p++)if((i=e[p])||0===i)if("object"===T(i))E.merge(h,i.nodeType?[i]:i);else if(_e.test(i)){for(a=a||d.appendChild(t.createElement("div")),s=(ke.exec(i)||["",""])[1].toLowerCase(),c=Ae[s]||Ae._default,a.innerHTML=c[1]+E.htmlPrefilter(i)+c[2],u=c[0];u--;)a=a.lastChild;E.merge(h,a.childNodes),(a=d.firstChild).textContent=""}else h.push(t.createTextNode(i));for(d.textContent="",p=0;i=h[p++];)if(r&&E.inArray(i,r)>-1)o&&o.push(i);else if(l=me(i),a=Ie(d.appendChild(i),"script"),l&&Re(a),n)for(u=0;i=a[u++];)Ee.test(i.type||"")&&n.push(i);return d}var Oe=/^([^.]*)(?:\.(.+)|)/;function Pe(){return!0}function xe(){return!1}function Me(e,t,n,r,o,i){var a,s;if("object"===typeof t){for(s in"string"!==typeof n&&(r=r||n,n=void 0),t)Me(e,s,n,r,t[s],i);return e}if(null==r&&null==o?(o=n,r=n=void 0):null==o&&("string"===typeof n?(o=r,r=void 0):(o=r,r=n,n=void 0)),!1===o)o=xe;else if(!o)return e;return 1===i&&(a=o,o=function(e){return E().off(e),a.apply(this,arguments)},o.guid=a.guid||(a.guid=E.guid++)),e.each((function(){E.event.add(this,t,o,r,n)}))}function Le(e,t,n){n?(se.set(e,t,!1),E.event.add(e,t,{namespace:!1,handler:function(e){var n,r=se.get(this,t);if(1&e.isTrigger&&this[t]){if(r)(E.event.special[t]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),se.set(this,t,r),this[t](),n=se.get(this,t),se.set(this,t,!1),r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n}else r&&(se.set(this,t,E.event.trigger(r[0],r.slice(1),this)),e.stopPropagation(),e.isImmediatePropagationStopped=Pe)}})):void 0===se.get(e,t)&&E.event.add(e,t,Pe)}E.event={global:{},add:function(e,t,n,r,o){var i,a,s,c,l,u,d,h,p,f,g,m=se.get(e);if(ie(e))for(n.handler&&(n=(i=n).handler,o=i.selector),o&&E.find.matchesSelector(ge,o),n.guid||(n.guid=E.guid++),(c=m.events)||(c=m.events=Object.create(null)),(a=m.handle)||(a=m.handle=function(t){return"undefined"!==typeof E&&E.event.triggered!==t.type?E.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(V)||[""]).length;l--;)p=g=(s=Oe.exec(t[l])||[])[1],f=(s[2]||"").split(".").sort(),p&&(d=E.event.special[p]||{},p=(o?d.delegateType:d.bindType)||p,d=E.event.special[p]||{},u=E.extend({type:p,origType:g,data:r,handler:n,guid:n.guid,selector:o,needsContext:o&&E.expr.match.needsContext.test(o),namespace:f.join(".")},i),(h=c[p])||((h=c[p]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(e,r,f,a)||e.addEventListener&&e.addEventListener(p,a)),d.add&&(d.add.call(e,u),u.handler.guid||(u.handler.guid=n.guid)),o?h.splice(h.delegateCount++,0,u):h.push(u),E.event.global[p]=!0)},remove:function(e,t,n,r,o){var i,a,s,c,l,u,d,h,p,f,g,m=se.hasData(e)&&se.get(e);if(m&&(c=m.events)){for(l=(t=(t||"").match(V)||[""]).length;l--;)if(p=g=(s=Oe.exec(t[l])||[])[1],f=(s[2]||"").split(".").sort(),p){for(d=E.event.special[p]||{},h=c[p=(r?d.delegateType:d.bindType)||p]||[],s=s[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=i=h.length;i--;)u=h[i],!o&&g!==u.origType||n&&n.guid!==u.guid||s&&!s.test(u.namespace)||r&&r!==u.selector&&("**"!==r||!u.selector)||(h.splice(i,1),u.selector&&h.delegateCount--,d.remove&&d.remove.call(e,u));a&&!h.length&&(d.teardown&&!1!==d.teardown.call(e,f,m.handle)||E.removeEvent(e,p,m.handle),delete c[p])}else for(p in c)E.event.remove(e,p+t[l],n,r,!0);E.isEmptyObject(c)&&se.remove(e,"handle events")}},dispatch:function(e){var t,n,r,o,i,a,s=new Array(arguments.length),c=E.event.fix(e),l=(se.get(this,"events")||Object.create(null))[c.type]||[],u=E.event.special[c.type]||{};for(s[0]=c,t=1;t<arguments.length;t++)s[t]=arguments[t];if(c.delegateTarget=this,!u.preDispatch||!1!==u.preDispatch.call(this,c)){for(a=E.event.handlers.call(this,c,l),t=0;(o=a[t++])&&!c.isPropagationStopped();)for(c.currentTarget=o.elem,n=0;(i=o.handlers[n++])&&!c.isImmediatePropagationStopped();)c.rnamespace&&!1!==i.namespace&&!c.rnamespace.test(i.namespace)||(c.handleObj=i,c.data=i.data,void 0!==(r=((E.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,s))&&!1===(c.result=r)&&(c.preventDefault(),c.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,c),c.result}},handlers:function(e,t){var n,r,o,i,a,s=[],c=t.delegateCount,l=e.target;if(c&&l.nodeType&&!("click"===e.type&&e.button>=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(i=[],a={},n=0;n<c;n++)void 0===a[o=(r=t[n]).selector+" "]&&(a[o]=r.needsContext?E(o,this).index(l)>-1:E.find(o,this,null,[l]).length),a[o]&&i.push(r);i.length&&s.push({elem:l,handlers:i})}return l=this,c<t.length&&s.push({elem:l,handlers:t.slice(c)}),s},addProp:function(e,t){Object.defineProperty(E.Event.prototype,e,{enumerable:!0,configurable:!0,get:v(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[E.expando]?e:new E.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return Se.test(t.type)&&t.click&&I(t,"input")&&Le(t,"click",!0),!1},trigger:function(e){var t=this||e;return Se.test(t.type)&&t.click&&I(t,"input")&&Le(t,"click"),!0},_default:function(e){var t=e.target;return Se.test(t.type)&&t.click&&I(t,"input")&&se.get(t,"click")||I(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},E.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},E.Event=function(e,t){if(!(this instanceof E.Event))return new E.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Pe:xe,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&E.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[E.expando]=!0},E.Event.prototype={constructor:E.Event,isDefaultPrevented:xe,isPropagationStopped:xe,isImmediatePropagationStopped:xe,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Pe,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Pe,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Pe,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},E.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},E.event.addProp),E.each({focus:"focusin",blur:"focusout"},(function(e,t){function n(e){if(C.documentMode){var n=se.get(this,"handle"),r=E.event.fix(e);r.type="focusin"===e.type?"focus":"blur",r.isSimulated=!0,n(e),r.target===r.currentTarget&&n(r)}else E.event.simulate(t,e.target,E.event.fix(e))}E.event.special[e]={setup:function(){var r;if(Le(this,e,!0),!C.documentMode)return!1;(r=se.get(this,t))||this.addEventListener(t,n),se.set(this,t,(r||0)+1)},trigger:function(){return Le(this,e),!0},teardown:function(){var e;if(!C.documentMode)return!1;(e=se.get(this,t)-1)?se.set(this,t,e):(this.removeEventListener(t,n),se.remove(this,t))},_default:function(t){return se.get(t.target,e)},delegateType:t},E.event.special[t]={setup:function(){var r=this.ownerDocument||this.document||this,o=C.documentMode?this:r,i=se.get(o,t);i||(C.documentMode?this.addEventListener(t,n):r.addEventListener(e,n,!0)),se.set(o,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,o=C.documentMode?this:r,i=se.get(o,t)-1;i?se.set(o,t,i):(C.documentMode?this.removeEventListener(t,n):r.removeEventListener(e,n,!0),se.remove(o,t))}}})),E.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(e,t){E.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=e.relatedTarget,o=e.handleObj;return r&&(r===this||E.contains(this,r))||(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}})),E.fn.extend({on:function(e,t,n,r){return Me(this,e,t,n,r)},one:function(e,t,n,r){return Me(this,e,t,n,r,1)},off:function(e,t,n){var r,o;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,E(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"===typeof e){for(o in e)this.off(o,t,e[o]);return this}return!1!==t&&"function"!==typeof t||(n=t,t=void 0),!1===n&&(n=xe),this.each((function(){E.event.remove(this,e,n,t)}))}});var qe=/<script|<style|<link/i,De=/checked\s*(?:[^=]|=\s*.checked.)/i,Ue=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function He(e,t){return I(e,"table")&&I(11!==t.nodeType?t:t.firstChild,"tr")&&E(e).children("tbody")[0]||e}function Fe(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Be(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Ke(e,t){var n,r,o,i,a,s;if(1===t.nodeType){if(se.hasData(e)&&(s=se.get(e).events))for(o in se.remove(t,"handle events"),s)for(n=0,r=s[o].length;n<r;n++)E.event.add(t,o,s[o][n]);ce.hasData(e)&&(i=ce.access(e),a=E.extend({},i),ce.set(t,a))}}function je(e,t){var n=t.nodeName.toLowerCase();"input"===n&&Se.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function ze(e,t,n,r){t=c(t);var o,i,a,s,l,u,d=0,h=e.length,p=h-1,f=t[0],g=v(f);if(g||h>1&&"string"===typeof f&&!m.checkClone&&De.test(f))return e.each((function(o){var i=e.eq(o);g&&(t[0]=f.call(this,o,i.html())),ze(i,t,n,r)}));if(h&&(i=(o=Ne(t,e[0].ownerDocument,!1,e,r)).firstChild,1===o.childNodes.length&&(o=i),i||r)){for(s=(a=E.map(Ie(o,"script"),Fe)).length;d<h;d++)l=o,d!==p&&(l=E.clone(l,!0,!0),s&&E.merge(a,Ie(l,"script"))),n.call(e[d],l,d);if(s)for(u=a[a.length-1].ownerDocument,E.map(a,Be),d=0;d<s;d++)l=a[d],Ee.test(l.type||"")&&!se.access(l,"globalEval")&&E.contains(u,l)&&(l.src&&"module"!==(l.type||"").toLowerCase()?E._evalUrl&&!l.noModule&&E._evalUrl(l.src,{nonce:l.nonce||l.getAttribute("nonce")},u):w(l.textContent.replace(Ue,""),l,u))}return e}function We(e,t,n){for(var r,o=t?E.filter(t,e):e,i=0;null!=(r=o[i]);i++)n||1!==r.nodeType||E.cleanData(Ie(r)),r.parentNode&&(n&&me(r)&&Re(Ie(r,"script")),r.parentNode.removeChild(r));return e}E.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,o,i,a,s=e.cloneNode(!0),c=me(e);if(!m.noCloneChecked&&(1===e.nodeType||11===e.nodeType)&&!E.isXMLDoc(e))for(a=Ie(s),r=0,o=(i=Ie(e)).length;r<o;r++)je(i[r],a[r]);if(t)if(n)for(i=i||Ie(e),a=a||Ie(s),r=0,o=i.length;r<o;r++)Ke(i[r],a[r]);else Ke(e,s);return(a=Ie(s,"script")).length>0&&Re(a,!c&&Ie(e,"script")),s},cleanData:function(e){for(var t,n,r,o=E.event.special,i=0;void 0!==(n=e[i]);i++)if(ie(n)){if(t=n[se.expando]){if(t.events)for(r in t.events)o[r]?E.event.remove(n,r):E.removeEvent(n,r,t.handle);n[se.expando]=void 0}n[ce.expando]&&(n[ce.expando]=void 0)}}}),E.fn.extend({detach:function(e){return We(this,e,!0)},remove:function(e){return We(this,e)},text:function(e){return ee(this,(function(e){return void 0===e?E.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return ze(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||He(this,e).appendChild(e)}))},prepend:function(){return ze(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=He(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return ze(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return ze(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(E.cleanData(Ie(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return E.clone(this,e,t)}))},html:function(e){return ee(this,(function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"===typeof e&&!qe.test(e)&&!Ae[(ke.exec(e)||["",""])[1].toLowerCase()]){e=E.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(E.cleanData(Ie(t,!1)),t.innerHTML=e);t=0}catch(o){}}t&&this.empty().append(e)}),null,e,arguments.length)},replaceWith:function(){var e=[];return ze(this,arguments,(function(t){var n=this.parentNode;E.inArray(this,e)<0&&(E.cleanData(Ie(this)),n&&n.replaceChild(t,this))}),e)}}),E.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(e,t){E.fn[e]=function(e){for(var n,r=[],o=E(e),i=o.length-1,a=0;a<=i;a++)n=a===i?this:this.clone(!0),E(o[a])[t](n),l.apply(r,n.get());return this.pushStack(r)}}));var Ge=new RegExp("^("+he+")(?!px)[a-z%]+$","i"),Ve=/^--/,Qe=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=r),t.getComputedStyle(e)},Ze=function(e,t,n){var r,o,i={};for(o in t)i[o]=e.style[o],e.style[o]=t[o];for(o in r=n.call(e),t)e.style[o]=i[o];return r},Ye=new RegExp(fe.join("|"),"i");function Je(e,t,n){var r,o,i,a,s=Ve.test(t),c=e.style;return(n=n||Qe(e))&&(a=n.getPropertyValue(t)||n[t],s&&a&&(a=a.replace(P,"$1")||void 0),""!==a||me(e)||(a=E.style(e,t)),!m.pixelBoxStyles()&&Ge.test(a)&&Ye.test(t)&&(r=c.width,o=c.minWidth,i=c.maxWidth,c.minWidth=c.maxWidth=c.width=a,a=n.width,c.width=r,c.minWidth=o,c.maxWidth=i)),void 0!==a?a+"":a}function $e(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(u){l.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",u.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",ge.appendChild(l).appendChild(u);var e=r.getComputedStyle(u);n="1%"!==e.top,c=12===t(e.marginLeft),u.style.right="60%",a=36===t(e.right),o=36===t(e.width),u.style.position="absolute",i=12===t(u.offsetWidth/3),ge.removeChild(l),u=null}}function t(e){return Math.round(parseFloat(e))}var n,o,i,a,s,c,l=C.createElement("div"),u=C.createElement("div");u.style&&(u.style.backgroundClip="content-box",u.cloneNode(!0).style.backgroundClip="",m.clearCloneStyle="content-box"===u.style.backgroundClip,E.extend(m,{boxSizingReliable:function(){return e(),o},pixelBoxStyles:function(){return e(),a},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),c},scrollboxSize:function(){return e(),i},reliableTrDimensions:function(){var e,t,n,o;return null==s&&(e=C.createElement("table"),t=C.createElement("tr"),n=C.createElement("div"),e.style.cssText="position:absolute;left:-11111px;border-collapse:separate",t.style.cssText="box-sizing:content-box;border:1px solid",t.style.height="1px",n.style.height="9px",n.style.display="block",ge.appendChild(e).appendChild(t).appendChild(n),o=r.getComputedStyle(t),s=parseInt(o.height,10)+parseInt(o.borderTopWidth,10)+parseInt(o.borderBottomWidth,10)===t.offsetHeight,ge.removeChild(e)),s}}))}();var Xe=["Webkit","Moz","ms"],et=C.createElement("div").style,tt={};function nt(e){var t=E.cssProps[e]||tt[e];return t||(e in et?e:tt[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),n=Xe.length;n--;)if((e=Xe[n]+t)in et)return e}(e)||e)}var rt=/^(none|table(?!-c[ea]).+)/,ot={position:"absolute",visibility:"hidden",display:"block"},it={letterSpacing:"0",fontWeight:"400"};function at(e,t,n){var r=pe.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function st(e,t,n,r,o,i){var a="width"===t?1:0,s=0,c=0,l=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(l+=E.css(e,n+fe[a],!0,o)),r?("content"===n&&(c-=E.css(e,"padding"+fe[a],!0,o)),"margin"!==n&&(c-=E.css(e,"border"+fe[a]+"Width",!0,o))):(c+=E.css(e,"padding"+fe[a],!0,o),"padding"!==n?c+=E.css(e,"border"+fe[a]+"Width",!0,o):s+=E.css(e,"border"+fe[a]+"Width",!0,o));return!r&&i>=0&&(c+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-i-c-s-.5))||0),c+l}function ct(e,t,n){var r=Qe(e),o=(!m.boxSizingReliable()||n)&&"border-box"===E.css(e,"boxSizing",!1,r),i=o,a=Je(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(Ge.test(a)){if(!n)return a;a="auto"}return(!m.boxSizingReliable()&&o||!m.reliableTrDimensions()&&I(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===E.css(e,"display",!1,r))&&e.getClientRects().length&&(o="border-box"===E.css(e,"boxSizing",!1,r),(i=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+st(e,t,n||(o?"border":"content"),i,r,a)+"px"}function lt(e,t,n,r,o){return new lt.prototype.init(e,t,n,r,o)}E.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Je(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,i,a,s=oe(t),c=Ve.test(t),l=e.style;if(c||(t=nt(s)),a=E.cssHooks[t]||E.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(o=a.get(e,!1,r))?o:l[t];"string"===(i=typeof n)&&(o=pe.exec(n))&&o[1]&&(n=Ce(e,t,o),i="number"),null!=n&&n===n&&("number"!==i||c||(n+=o&&o[3]||(E.cssNumber[s]?"":"px")),m.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(c?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var o,i,a,s=oe(t);return Ve.test(t)||(t=nt(s)),(a=E.cssHooks[t]||E.cssHooks[s])&&"get"in a&&(o=a.get(e,!0,n)),void 0===o&&(o=Je(e,t,r)),"normal"===o&&t in it&&(o=it[t]),""===n||n?(i=parseFloat(o),!0===n||isFinite(i)?i||0:o):o}}),E.each(["height","width"],(function(e,t){E.cssHooks[t]={get:function(e,n,r){if(n)return!rt.test(E.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?ct(e,t,r):Ze(e,ot,(function(){return ct(e,t,r)}))},set:function(e,n,r){var o,i=Qe(e),a=!m.scrollboxSize()&&"absolute"===i.position,s=(a||r)&&"border-box"===E.css(e,"boxSizing",!1,i),c=r?st(e,t,r,s,i):0;return s&&a&&(c-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(i[t])-st(e,t,"border",!1,i)-.5)),c&&(o=pe.exec(n))&&"px"!==(o[3]||"px")&&(e.style[t]=n,n=E.css(e,t)),at(0,n,c)}}})),E.cssHooks.marginLeft=$e(m.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(Je(e,"marginLeft"))||e.getBoundingClientRect().left-Ze(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),E.each({margin:"",padding:"",border:"Width"},(function(e,t){E.cssHooks[e+t]={expand:function(n){for(var r=0,o={},i="string"===typeof n?n.split(" "):[n];r<4;r++)o[e+fe[r]+t]=i[r]||i[r-2]||i[0];return o}},"margin"!==e&&(E.cssHooks[e+t].set=at)})),E.fn.extend({css:function(e,t){return ee(this,(function(e,t,n){var r,o,i={},a=0;if(Array.isArray(t)){for(r=Qe(e),o=t.length;a<o;a++)i[t[a]]=E.css(e,t[a],!1,r);return i}return void 0!==n?E.style(e,t,n):E.css(e,t)}),e,t,arguments.length>1)}}),E.Tween=lt,lt.prototype={constructor:lt,init:function(e,t,n,r,o,i){this.elem=e,this.prop=n,this.easing=o||E.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=i||(E.cssNumber[n]?"":"px")},cur:function(){var e=lt.propHooks[this.prop];return e&&e.get?e.get(this):lt.propHooks._default.get(this)},run:function(e){var t,n=lt.propHooks[this.prop];return this.options.duration?this.pos=t=E.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):lt.propHooks._default.set(this),this}},lt.prototype.init.prototype=lt.prototype,lt.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=E.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){E.fx.step[e.prop]?E.fx.step[e.prop](e):1!==e.elem.nodeType||!E.cssHooks[e.prop]&&null==e.elem.style[nt(e.prop)]?e.elem[e.prop]=e.now:E.style(e.elem,e.prop,e.now+e.unit)}}},lt.propHooks.scrollTop=lt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},E.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},E.fx=lt.prototype.init,E.fx.step={};var ut,dt,ht=/^(?:toggle|show|hide)$/,pt=/queueHooks$/;function ft(){dt&&(!1===C.hidden&&r.requestAnimationFrame?r.requestAnimationFrame(ft):r.setTimeout(ft,E.fx.interval),E.fx.tick())}function gt(){return r.setTimeout((function(){ut=void 0})),ut=Date.now()}function mt(e,t){var n,r=0,o={height:e};for(t=t?1:0;r<4;r+=2-t)o["margin"+(n=fe[r])]=o["padding"+n]=e;return t&&(o.opacity=o.width=e),o}function vt(e,t,n){for(var r,o=(yt.tweeners[t]||[]).concat(yt.tweeners["*"]),i=0,a=o.length;i<a;i++)if(r=o[i].call(n,t,e))return r}function yt(e,t,n){var r,o,i=0,a=yt.prefilters.length,s=E.Deferred().always((function(){delete c.elem})),c=function(){if(o)return!1;for(var t=ut||gt(),n=Math.max(0,l.startTime+l.duration-t),r=1-(n/l.duration||0),i=0,a=l.tweens.length;i<a;i++)l.tweens[i].run(r);return s.notifyWith(e,[l,r,n]),r<1&&a?n:(a||s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:E.extend({},t),opts:E.extend(!0,{specialEasing:{},easing:E.easing._default},n),originalProperties:t,originalOptions:n,startTime:ut||gt(),duration:n.duration,tweens:[],createTween:function(t,n){var r=E.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(o)return this;for(o=!0;n<r;n++)l.tweens[n].run(1);return t?(s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l,t])):s.rejectWith(e,[l,t]),this}}),u=l.props;for(!function(e,t){var n,r,o,i,a;for(n in e)if(o=t[r=oe(n)],i=e[n],Array.isArray(i)&&(o=i[1],i=e[n]=i[0]),n!==r&&(e[r]=i,delete e[n]),(a=E.cssHooks[r])&&"expand"in a)for(n in i=a.expand(i),delete e[r],i)n in e||(e[n]=i[n],t[n]=o);else t[r]=o}(u,l.opts.specialEasing);i<a;i++)if(r=yt.prefilters[i].call(l,e,u,l.opts))return v(r.stop)&&(E._queueHooks(l.elem,l.opts.queue).stop=r.stop.bind(r)),r;return E.map(u,vt,l),v(l.opts.start)&&l.opts.start.call(e,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),E.fx.timer(E.extend(c,{elem:e,anim:l,queue:l.opts.queue})),l}E.Animation=E.extend(yt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return Ce(n.elem,e,pe.exec(t),n),n}]},tweener:function(e,t){v(e)?(t=e,e=["*"]):e=e.match(V);for(var n,r=0,o=e.length;r<o;r++)n=e[r],yt.tweeners[n]=yt.tweeners[n]||[],yt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,o,i,a,s,c,l,u,d="width"in t||"height"in t,h=this,p={},f=e.style,g=e.nodeType&&ye(e),m=se.get(e,"fxshow");for(r in n.queue||(null==(a=E._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,h.always((function(){h.always((function(){a.unqueued--,E.queue(e,"fx").length||a.empty.fire()}))}))),t)if(o=t[r],ht.test(o)){if(delete t[r],i=i||"toggle"===o,o===(g?"hide":"show")){if("show"!==o||!m||void 0===m[r])continue;g=!0}p[r]=m&&m[r]||E.style(e,r)}if((c=!E.isEmptyObject(t))||!E.isEmptyObject(p))for(r in d&&1===e.nodeType&&(n.overflow=[f.overflow,f.overflowX,f.overflowY],null==(l=m&&m.display)&&(l=se.get(e,"display")),"none"===(u=E.css(e,"display"))&&(l?u=l:(Te([e],!0),l=e.style.display||l,u=E.css(e,"display"),Te([e]))),("inline"===u||"inline-block"===u&&null!=l)&&"none"===E.css(e,"float")&&(c||(h.done((function(){f.display=l})),null==l&&(u=f.display,l="none"===u?"":u)),f.display="inline-block")),n.overflow&&(f.overflow="hidden",h.always((function(){f.overflow=n.overflow[0],f.overflowX=n.overflow[1],f.overflowY=n.overflow[2]}))),c=!1,p)c||(m?"hidden"in m&&(g=m.hidden):m=se.access(e,"fxshow",{display:l}),i&&(m.hidden=!g),g&&Te([e],!0),h.done((function(){for(r in g||Te([e]),se.remove(e,"fxshow"),p)E.style(e,r,p[r])}))),c=vt(g?m[r]:0,r,h),r in m||(m[r]=c.start,g&&(c.end=c.start,c.start=0))}],prefilter:function(e,t){t?yt.prefilters.unshift(e):yt.prefilters.push(e)}}),E.speed=function(e,t,n){var r=e&&"object"===typeof e?E.extend({},e):{complete:n||!n&&t||v(e)&&e,duration:e,easing:n&&t||t&&!v(t)&&t};return E.fx.off?r.duration=0:"number"!==typeof r.duration&&(r.duration in E.fx.speeds?r.duration=E.fx.speeds[r.duration]:r.duration=E.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){v(r.old)&&r.old.call(this),r.queue&&E.dequeue(this,r.queue)},r},E.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ye).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var o=E.isEmptyObject(e),i=E.speed(t,n,r),a=function(){var t=yt(this,E.extend({},e),i);(o||se.get(this,"finish"))&&t.stop(!0)};return a.finish=a,o||!1===i.queue?this.each(a):this.queue(i.queue,a)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!==typeof e&&(n=t,t=e,e=void 0),t&&this.queue(e||"fx",[]),this.each((function(){var t=!0,o=null!=e&&e+"queueHooks",i=E.timers,a=se.get(this);if(o)a[o]&&a[o].stop&&r(a[o]);else for(o in a)a[o]&&a[o].stop&&pt.test(o)&&r(a[o]);for(o=i.length;o--;)i[o].elem!==this||null!=e&&i[o].queue!==e||(i[o].anim.stop(n),t=!1,i.splice(o,1));!t&&n||E.dequeue(this,e)}))},finish:function(e){return!1!==e&&(e=e||"fx"),this.each((function(){var t,n=se.get(this),r=n[e+"queue"],o=n[e+"queueHooks"],i=E.timers,a=r?r.length:0;for(n.finish=!0,E.queue(this,e,[]),o&&o.stop&&o.stop.call(this,!0),t=i.length;t--;)i[t].elem===this&&i[t].queue===e&&(i[t].anim.stop(!0),i.splice(t,1));for(t=0;t<a;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish}))}}),E.each(["toggle","show","hide"],(function(e,t){var n=E.fn[t];E.fn[t]=function(e,r,o){return null==e||"boolean"===typeof e?n.apply(this,arguments):this.animate(mt(t,!0),e,r,o)}})),E.each({slideDown:mt("show"),slideUp:mt("hide"),slideToggle:mt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(e,t){E.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}})),E.timers=[],E.fx.tick=function(){var e,t=0,n=E.timers;for(ut=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||E.fx.stop(),ut=void 0},E.fx.timer=function(e){E.timers.push(e),E.fx.start()},E.fx.interval=13,E.fx.start=function(){dt||(dt=!0,ft())},E.fx.stop=function(){dt=null},E.fx.speeds={slow:600,fast:200,_default:400},E.fn.delay=function(e,t){return e=E.fx&&E.fx.speeds[e]||e,t=t||"fx",this.queue(t,(function(t,n){var o=r.setTimeout(t,e);n.stop=function(){r.clearTimeout(o)}}))},function(){var e=C.createElement("input"),t=C.createElement("select").appendChild(C.createElement("option"));e.type="checkbox",m.checkOn=""!==e.value,m.optSelected=t.selected,(e=C.createElement("input")).value="t",e.type="radio",m.radioValue="t"===e.value}();var Ct,bt=E.expr.attrHandle;E.fn.extend({attr:function(e,t){return ee(this,E.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each((function(){E.removeAttr(this,e)}))}}),E.extend({attr:function(e,t,n){var r,o,i=e.nodeType;if(3!==i&&8!==i&&2!==i)return"undefined"===typeof e.getAttribute?E.prop(e,t,n):(1===i&&E.isXMLDoc(e)||(o=E.attrHooks[t.toLowerCase()]||(E.expr.match.bool.test(t)?Ct:void 0)),void 0!==n?null===n?void E.removeAttr(e,t):o&&"set"in o&&void 0!==(r=o.set(e,n,t))?r:(e.setAttribute(t,n+""),n):o&&"get"in o&&null!==(r=o.get(e,t))?r:null==(r=E.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!m.radioValue&&"radio"===t&&I(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,o=t&&t.match(V);if(o&&1===e.nodeType)for(;n=o[r++];)e.removeAttribute(n)}}),Ct={set:function(e,t,n){return!1===t?E.removeAttr(e,n):e.setAttribute(n,n),n}},E.each(E.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=bt[t]||E.find.attr;bt[t]=function(e,t,r){var o,i,a=t.toLowerCase();return r||(i=bt[a],bt[a]=o,o=null!=n(e,t,r)?a:null,bt[a]=i),o}}));var wt=/^(?:input|select|textarea|button)$/i,Tt=/^(?:a|area)$/i;function St(e){return(e.match(V)||[]).join(" ")}function kt(e){return e.getAttribute&&e.getAttribute("class")||""}function Et(e){return Array.isArray(e)?e:"string"===typeof e&&e.match(V)||[]}E.fn.extend({prop:function(e,t){return ee(this,E.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[E.propFix[e]||e]}))}}),E.extend({prop:function(e,t,n){var r,o,i=e.nodeType;if(3!==i&&8!==i&&2!==i)return 1===i&&E.isXMLDoc(e)||(t=E.propFix[t]||t,o=E.propHooks[t]),void 0!==n?o&&"set"in o&&void 0!==(r=o.set(e,n,t))?r:e[t]=n:o&&"get"in o&&null!==(r=o.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=E.find.attr(e,"tabindex");return t?parseInt(t,10):wt.test(e.nodeName)||Tt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),m.optSelected||(E.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),E.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){E.propFix[this.toLowerCase()]=this})),E.fn.extend({addClass:function(e){var t,n,r,o,i,a;return v(e)?this.each((function(t){E(this).addClass(e.call(this,t,kt(this)))})):(t=Et(e)).length?this.each((function(){if(r=kt(this),n=1===this.nodeType&&" "+St(r)+" "){for(i=0;i<t.length;i++)o=t[i],n.indexOf(" "+o+" ")<0&&(n+=o+" ");a=St(n),r!==a&&this.setAttribute("class",a)}})):this},removeClass:function(e){var t,n,r,o,i,a;return v(e)?this.each((function(t){E(this).removeClass(e.call(this,t,kt(this)))})):arguments.length?(t=Et(e)).length?this.each((function(){if(r=kt(this),n=1===this.nodeType&&" "+St(r)+" "){for(i=0;i<t.length;i++)for(o=t[i];n.indexOf(" "+o+" ")>-1;)n=n.replace(" "+o+" "," ");a=St(n),r!==a&&this.setAttribute("class",a)}})):this:this.attr("class","")},toggleClass:function(e,t){var n,r,o,i,a=typeof e,s="string"===a||Array.isArray(e);return v(e)?this.each((function(n){E(this).toggleClass(e.call(this,n,kt(this),t),t)})):"boolean"===typeof t&&s?t?this.addClass(e):this.removeClass(e):(n=Et(e),this.each((function(){if(s)for(i=E(this),o=0;o<n.length;o++)r=n[o],i.hasClass(r)?i.removeClass(r):i.addClass(r);else void 0!==e&&"boolean"!==a||((r=kt(this))&&se.set(this,"__className__",r),this.setAttribute&&this.setAttribute("class",r||!1===e?"":se.get(this,"__className__")||""))})))},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+St(kt(n))+" ").indexOf(t)>-1)return!0;return!1}});var At=/\r/g;E.fn.extend({val:function(e){var t,n,r,o=this[0];return arguments.length?(r=v(e),this.each((function(n){var o;1===this.nodeType&&(null==(o=r?e.call(this,n,E(this).val()):e)?o="":"number"===typeof o?o+="":Array.isArray(o)&&(o=E.map(o,(function(e){return null==e?"":e+""}))),(t=E.valHooks[this.type]||E.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,o,"value")||(this.value=o))}))):o?(t=E.valHooks[o.type]||E.valHooks[o.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(o,"value"))?n:"string"===typeof(n=o.value)?n.replace(At,""):null==n?"":n:void 0}}),E.extend({valHooks:{option:{get:function(e){var t=E.find.attr(e,"value");return null!=t?t:St(E.text(e))}},select:{get:function(e){var t,n,r,o=e.options,i=e.selectedIndex,a="select-one"===e.type,s=a?null:[],c=a?i+1:o.length;for(r=i<0?c:a?i:0;r<c;r++)if(((n=o[r]).selected||r===i)&&!n.disabled&&(!n.parentNode.disabled||!I(n.parentNode,"optgroup"))){if(t=E(n).val(),a)return t;s.push(t)}return s},set:function(e,t){for(var n,r,o=e.options,i=E.makeArray(t),a=o.length;a--;)((r=o[a]).selected=E.inArray(E.valHooks.option.get(r),i)>-1)&&(n=!0);return n||(e.selectedIndex=-1),i}}}}),E.each(["radio","checkbox"],(function(){E.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=E.inArray(E(e).val(),t)>-1}},m.checkOn||(E.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}));var It=r.location,Rt={guid:Date.now()},_t=/\?/;E.parseXML=function(e){var t,n;if(!e||"string"!==typeof e)return null;try{t=(new r.DOMParser).parseFromString(e,"text/xml")}catch(o){}return n=t&&t.getElementsByTagName("parsererror")[0],t&&!n||E.error("Invalid XML: "+(n?E.map(n.childNodes,(function(e){return e.textContent})).join("\n"):e)),t};var Nt=/^(?:focusinfocus|focusoutblur)$/,Ot=function(e){e.stopPropagation()};E.extend(E.event,{trigger:function(e,t,n,o){var i,a,s,c,l,u,d,h,f=[n||C],g=p.call(e,"type")?e.type:e,m=p.call(e,"namespace")?e.namespace.split("."):[];if(a=h=s=n=n||C,3!==n.nodeType&&8!==n.nodeType&&!Nt.test(g+E.event.triggered)&&(g.indexOf(".")>-1&&(m=g.split("."),g=m.shift(),m.sort()),l=g.indexOf(":")<0&&"on"+g,(e=e[E.expando]?e:new E.Event(g,"object"===typeof e&&e)).isTrigger=o?2:3,e.namespace=m.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:E.makeArray(t,[e]),d=E.event.special[g]||{},o||!d.trigger||!1!==d.trigger.apply(n,t))){if(!o&&!d.noBubble&&!y(n)){for(c=d.delegateType||g,Nt.test(c+g)||(a=a.parentNode);a;a=a.parentNode)f.push(a),s=a;s===(n.ownerDocument||C)&&f.push(s.defaultView||s.parentWindow||r)}for(i=0;(a=f[i++])&&!e.isPropagationStopped();)h=a,e.type=i>1?c:d.bindType||g,(u=(se.get(a,"events")||Object.create(null))[e.type]&&se.get(a,"handle"))&&u.apply(a,t),(u=l&&a[l])&&u.apply&&ie(a)&&(e.result=u.apply(a,t),!1===e.result&&e.preventDefault());return e.type=g,o||e.isDefaultPrevented()||d._default&&!1!==d._default.apply(f.pop(),t)||!ie(n)||l&&v(n[g])&&!y(n)&&((s=n[l])&&(n[l]=null),E.event.triggered=g,e.isPropagationStopped()&&h.addEventListener(g,Ot),n[g](),e.isPropagationStopped()&&h.removeEventListener(g,Ot),E.event.triggered=void 0,s&&(n[l]=s)),e.result}},simulate:function(e,t,n){var r=E.extend(new E.Event,n,{type:e,isSimulated:!0});E.event.trigger(r,null,t)}}),E.fn.extend({trigger:function(e,t){return this.each((function(){E.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return E.event.trigger(e,t,n,!0)}});var Pt=/\[\]$/,xt=/\r?\n/g,Mt=/^(?:submit|button|image|reset|file)$/i,Lt=/^(?:input|select|textarea|keygen)/i;function qt(e,t,n,r){var o;if(Array.isArray(t))E.each(t,(function(t,o){n||Pt.test(e)?r(e,o):qt(e+"["+("object"===typeof o&&null!=o?t:"")+"]",o,n,r)}));else if(n||"object"!==T(t))r(e,t);else for(o in t)qt(e+"["+o+"]",t[o],n,r)}E.param=function(e,t){var n,r=[],o=function(e,t){var n=v(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!E.isPlainObject(e))E.each(e,(function(){o(this.name,this.value)}));else for(n in e)qt(n,e[n],t,o);return r.join("&")},E.fn.extend({serialize:function(){return E.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=E.prop(this,"elements");return e?E.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!E(this).is(":disabled")&&Lt.test(this.nodeName)&&!Mt.test(e)&&(this.checked||!Se.test(e))})).map((function(e,t){var n=E(this).val();return null==n?null:Array.isArray(n)?E.map(n,(function(e){return{name:t.name,value:e.replace(xt,"\r\n")}})):{name:t.name,value:n.replace(xt,"\r\n")}})).get()}});var Dt=/%20/g,Ut=/#.*$/,Ht=/([?&])_=[^&]*/,Ft=/^(.*?):[ \t]*([^\r\n]*)$/gm,Bt=/^(?:GET|HEAD)$/,Kt=/^\/\//,jt={},zt={},Wt="*/".concat("*"),Gt=C.createElement("a");function Vt(e){return function(t,n){"string"!==typeof t&&(n=t,t="*");var r,o=0,i=t.toLowerCase().match(V)||[];if(v(n))for(;r=i[o++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function Qt(e,t,n,r){var o={},i=e===zt;function a(s){var c;return o[s]=!0,E.each(e[s]||[],(function(e,s){var l=s(t,n,r);return"string"!==typeof l||i||o[l]?i?!(c=l):void 0:(t.dataTypes.unshift(l),a(l),!1)})),c}return a(t.dataTypes[0])||!o["*"]&&a("*")}function Zt(e,t){var n,r,o=E.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((o[n]?e:r||(r={}))[n]=t[n]);return r&&E.extend(!0,e,r),e}Gt.href=It.href,E.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:It.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(It.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Wt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":E.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Zt(Zt(e,E.ajaxSettings),t):Zt(E.ajaxSettings,e)},ajaxPrefilter:Vt(jt),ajaxTransport:Vt(zt),ajax:function(e,t){"object"===typeof e&&(t=e,e=void 0),t=t||{};var n,o,i,a,s,c,l,u,d,h,p=E.ajaxSetup({},t),f=p.context||p,g=p.context&&(f.nodeType||f.jquery)?E(f):E.event,m=E.Deferred(),v=E.Callbacks("once memory"),y=p.statusCode||{},b={},w={},T="canceled",S={readyState:0,getResponseHeader:function(e){var t;if(l){if(!a)for(a={};t=Ft.exec(i);)a[t[1].toLowerCase()+" "]=(a[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=a[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return l?i:null},setRequestHeader:function(e,t){return null==l&&(e=w[e.toLowerCase()]=w[e.toLowerCase()]||e,b[e]=t),this},overrideMimeType:function(e){return null==l&&(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(l)S.always(e[S.status]);else for(t in e)y[t]=[y[t],e[t]];return this},abort:function(e){var t=e||T;return n&&n.abort(t),k(0,t),this}};if(m.promise(S),p.url=((e||p.url||It.href)+"").replace(Kt,It.protocol+"//"),p.type=t.method||t.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(V)||[""],null==p.crossDomain){c=C.createElement("a");try{c.href=p.url,c.href=c.href,p.crossDomain=Gt.protocol+"//"+Gt.host!==c.protocol+"//"+c.host}catch(A){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!==typeof p.data&&(p.data=E.param(p.data,p.traditional)),Qt(jt,p,t,S),l)return S;for(d in(u=E.event&&p.global)&&0===E.active++&&E.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Bt.test(p.type),o=p.url.replace(Ut,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(Dt,"+")):(h=p.url.slice(o.length),p.data&&(p.processData||"string"===typeof p.data)&&(o+=(_t.test(o)?"&":"?")+p.data,delete p.data),!1===p.cache&&(o=o.replace(Ht,"$1"),h=(_t.test(o)?"&":"?")+"_="+Rt.guid+++h),p.url=o+h),p.ifModified&&(E.lastModified[o]&&S.setRequestHeader("If-Modified-Since",E.lastModified[o]),E.etag[o]&&S.setRequestHeader("If-None-Match",E.etag[o])),(p.data&&p.hasContent&&!1!==p.contentType||t.contentType)&&S.setRequestHeader("Content-Type",p.contentType),S.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Wt+"; q=0.01":""):p.accepts["*"]),p.headers)S.setRequestHeader(d,p.headers[d]);if(p.beforeSend&&(!1===p.beforeSend.call(f,S,p)||l))return S.abort();if(T="abort",v.add(p.complete),S.done(p.success),S.fail(p.error),n=Qt(zt,p,t,S)){if(S.readyState=1,u&&g.trigger("ajaxSend",[S,p]),l)return S;p.async&&p.timeout>0&&(s=r.setTimeout((function(){S.abort("timeout")}),p.timeout));try{l=!1,n.send(b,k)}catch(A){if(l)throw A;k(-1,A)}}else k(-1,"No Transport");function k(e,t,a,c){var d,h,C,b,w,T=t;l||(l=!0,s&&r.clearTimeout(s),n=void 0,i=c||"",S.readyState=e>0?4:0,d=e>=200&&e<300||304===e,a&&(b=function(e,t,n){for(var r,o,i,a,s=e.contents,c=e.dataTypes;"*"===c[0];)c.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(o in s)if(s[o]&&s[o].test(r)){c.unshift(o);break}if(c[0]in n)i=c[0];else{for(o in n){if(!c[0]||e.converters[o+" "+c[0]]){i=o;break}a||(a=o)}i=i||a}if(i)return i!==c[0]&&c.unshift(i),n[i]}(p,S,a)),!d&&E.inArray("script",p.dataTypes)>-1&&E.inArray("json",p.dataTypes)<0&&(p.converters["text script"]=function(){}),b=function(e,t,n,r){var o,i,a,s,c,l={},u=e.dataTypes.slice();if(u[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];for(i=u.shift();i;)if(e.responseFields[i]&&(n[e.responseFields[i]]=t),!c&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),c=i,i=u.shift())if("*"===i)i=c;else if("*"!==c&&c!==i){if(!(a=l[c+" "+i]||l["* "+i]))for(o in l)if((s=o.split(" "))[1]===i&&(a=l[c+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[o]:!0!==l[o]&&(i=s[0],u.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(A){return{state:"parsererror",error:a?A:"No conversion from "+c+" to "+i}}}return{state:"success",data:t}}(p,b,S,d),d?(p.ifModified&&((w=S.getResponseHeader("Last-Modified"))&&(E.lastModified[o]=w),(w=S.getResponseHeader("etag"))&&(E.etag[o]=w)),204===e||"HEAD"===p.type?T="nocontent":304===e?T="notmodified":(T=b.state,h=b.data,d=!(C=b.error))):(C=T,!e&&T||(T="error",e<0&&(e=0))),S.status=e,S.statusText=(t||T)+"",d?m.resolveWith(f,[h,T,S]):m.rejectWith(f,[S,T,C]),S.statusCode(y),y=void 0,u&&g.trigger(d?"ajaxSuccess":"ajaxError",[S,p,d?h:C]),v.fireWith(f,[S,T]),u&&(g.trigger("ajaxComplete",[S,p]),--E.active||E.event.trigger("ajaxStop")))}return S},getJSON:function(e,t,n){return E.get(e,t,n,"json")},getScript:function(e,t){return E.get(e,void 0,t,"script")}}),E.each(["get","post"],(function(e,t){E[t]=function(e,n,r,o){return v(n)&&(o=o||r,r=n,n=void 0),E.ajax(E.extend({url:e,type:t,dataType:o,data:n,success:r},E.isPlainObject(e)&&e))}})),E.ajaxPrefilter((function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")})),E._evalUrl=function(e,t,n){return E.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){E.globalEval(e,t,n)}})},E.fn.extend({wrapAll:function(e){var t;return this[0]&&(v(e)&&(e=e.call(this[0])),t=E(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return v(e)?this.each((function(t){E(this).wrapInner(e.call(this,t))})):this.each((function(){var t=E(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=v(e);return this.each((function(n){E(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){E(this).replaceWith(this.childNodes)})),this}}),E.expr.pseudos.hidden=function(e){return!E.expr.pseudos.visible(e)},E.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},E.ajaxSettings.xhr=function(){try{return new r.XMLHttpRequest}catch(e){}};var Yt={0:200,1223:204},Jt=E.ajaxSettings.xhr();m.cors=!!Jt&&"withCredentials"in Jt,m.ajax=Jt=!!Jt,E.ajaxTransport((function(e){var t,n;if(m.cors||Jt&&!e.crossDomain)return{send:function(o,i){var a,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(a in e.xhrFields)s[a]=e.xhrFields[a];for(a in e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||o["X-Requested-With"]||(o["X-Requested-With"]="XMLHttpRequest"),o)s.setRequestHeader(a,o[a]);t=function(e){return function(){t&&(t=n=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!==typeof s.status?i(0,"error"):i(s.status,s.statusText):i(Yt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!==typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=t(),n=s.onerror=s.ontimeout=t("error"),void 0!==s.onabort?s.onabort=n:s.onreadystatechange=function(){4===s.readyState&&r.setTimeout((function(){t&&n()}))},t=t("abort");try{s.send(e.hasContent&&e.data||null)}catch(c){if(t)throw c}},abort:function(){t&&t()}}})),E.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),E.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return E.globalEval(e),e}}}),E.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),E.ajaxTransport("script",(function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(r,o){t=E("<script>").attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&o("error"===e.type?404:200,e.type)}),C.head.appendChild(t[0])},abort:function(){n&&n()}}}));var $t=[],Xt=/(=)\?(?=&|$)|\?\?/;E.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=$t.pop()||E.expando+"_"+Rt.guid++;return this[e]=!0,e}}),E.ajaxPrefilter("json jsonp",(function(e,t,n){var o,i,a,s=!1!==e.jsonp&&(Xt.test(e.url)?"url":"string"===typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Xt.test(e.data)&&"data");if(s||"jsonp"===e.dataTypes[0])return o=e.jsonpCallback=v(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,s?e[s]=e[s].replace(Xt,"$1"+o):!1!==e.jsonp&&(e.url+=(_t.test(e.url)?"&":"?")+e.jsonp+"="+o),e.converters["script json"]=function(){return a||E.error(o+" was not called"),a[0]},e.dataTypes[0]="json",i=r[o],r[o]=function(){a=arguments},n.always((function(){void 0===i?E(r).removeProp(o):r[o]=i,e[o]&&(e.jsonpCallback=t.jsonpCallback,$t.push(o)),a&&v(i)&&i(a[0]),a=i=void 0})),"script"})),m.createHTMLDocument=function(){var e=C.implementation.createHTMLDocument("").body;return e.innerHTML="<form></form><form></form>",2===e.childNodes.length}(),E.parseHTML=function(e,t,n){return"string"!==typeof e?[]:("boolean"===typeof t&&(n=t,t=!1),t||(m.createHTMLDocument?((r=(t=C.implementation.createHTMLDocument("")).createElement("base")).href=C.location.href,t.head.appendChild(r)):t=C),i=!n&&[],(o=F.exec(e))?[t.createElement(o[1])]:(o=Ne([e],t,i),i&&i.length&&E(i).remove(),E.merge([],o.childNodes)));var r,o,i},E.fn.load=function(e,t,n){var r,o,i,a=this,s=e.indexOf(" ");return s>-1&&(r=St(e.slice(s)),e=e.slice(0,s)),v(t)?(n=t,t=void 0):t&&"object"===typeof t&&(o="POST"),a.length>0&&E.ajax({url:e,type:o||"GET",dataType:"html",data:t}).done((function(e){i=arguments,a.html(r?E("<div>").append(E.parseHTML(e)).find(r):e)})).always(n&&function(e,t){a.each((function(){n.apply(this,i||[e.responseText,t,e])}))}),this},E.expr.pseudos.animated=function(e){return E.grep(E.timers,(function(t){return e===t.elem})).length},E.offset={setOffset:function(e,t,n){var r,o,i,a,s,c,l=E.css(e,"position"),u=E(e),d={};"static"===l&&(e.style.position="relative"),s=u.offset(),i=E.css(e,"top"),c=E.css(e,"left"),("absolute"===l||"fixed"===l)&&(i+c).indexOf("auto")>-1?(a=(r=u.position()).top,o=r.left):(a=parseFloat(i)||0,o=parseFloat(c)||0),v(t)&&(t=t.call(e,n,E.extend({},s))),null!=t.top&&(d.top=t.top-s.top+a),null!=t.left&&(d.left=t.left-s.left+o),"using"in t?t.using.call(e,d):u.css(d)}},E.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each((function(t){E.offset.setOffset(this,e,t)}));var t,n,r=this[0];return r?r.getClientRects().length?(t=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],o={top:0,left:0};if("fixed"===E.css(r,"position"))t=r.getBoundingClientRect();else{for(t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===E.css(e,"position");)e=e.parentNode;e&&e!==r&&1===e.nodeType&&((o=E(e).offset()).top+=E.css(e,"borderTopWidth",!0),o.left+=E.css(e,"borderLeftWidth",!0))}return{top:t.top-o.top-E.css(r,"marginTop",!0),left:t.left-o.left-E.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent;e&&"static"===E.css(e,"position");)e=e.offsetParent;return e||ge}))}}),E.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(e,t){var n="pageYOffset"===t;E.fn[e]=function(r){return ee(this,(function(e,r,o){var i;if(y(e)?i=e:9===e.nodeType&&(i=e.defaultView),void 0===o)return i?i[t]:e[r];i?i.scrollTo(n?i.pageXOffset:o,n?o:i.pageYOffset):e[r]=o}),e,r,arguments.length)}})),E.each(["top","left"],(function(e,t){E.cssHooks[t]=$e(m.pixelPosition,(function(e,n){if(n)return n=Je(e,t),Ge.test(n)?E(e).position()[t]+"px":n}))})),E.each({Height:"height",Width:"width"},(function(e,t){E.each({padding:"inner"+e,content:t,"":"outer"+e},(function(n,r){E.fn[r]=function(o,i){var a=arguments.length&&(n||"boolean"!==typeof o),s=n||(!0===o||!0===i?"margin":"border");return ee(this,(function(t,n,o){var i;return y(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(i=t.documentElement,Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])):void 0===o?E.css(t,n,s):E.style(t,n,o,s)}),t,a?o:void 0,a)}}))})),E.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(e,t){E.fn[t]=function(e){return this.on(t,e)}})),E.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.on("mouseenter",e).on("mouseleave",t||e)}}),E.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(e,t){E.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}));var en=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;E.proxy=function(e,t){var n,r,o;if("string"===typeof t&&(n=e[t],t=e,e=n),v(e))return r=s.call(arguments,2),o=function(){return e.apply(t||this,r.concat(s.call(arguments)))},o.guid=e.guid=e.guid||E.guid++,o},E.holdReady=function(e){e?E.readyWait++:E.ready(!0)},E.isArray=Array.isArray,E.parseJSON=JSON.parse,E.nodeName=I,E.isFunction=v,E.isWindow=y,E.camelCase=oe,E.type=T,E.now=Date.now,E.isNumeric=function(e){var t=E.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},E.trim=function(e){return null==e?"":(e+"").replace(en,"$1")},void 0===(n=function(){return E}.apply(t,[]))||(e.exports=n);var tn=r.jQuery,nn=r.$;return E.noConflict=function(e){return r.$===E&&(r.$=nn),e&&r.jQuery===E&&(r.jQuery=tn),E},"undefined"===typeof o&&(r.jQuery=r.$=E),E}))},4463:(e,t,n)=>{"use strict";var r=n(2791),o=n(5296);function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a=new Set,s={};function c(e,t){l(e,t),l(e+"Capture",t)}function l(e,t){for(s[e]=t,e=0;e<t.length;e++)a.add(t[e])}var u=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),d=Object.prototype.hasOwnProperty,h=/^[: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]*$/,p={},f={};function g(e,t,n,r,o,i,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var m={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){m[e]=new g(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];m[t]=new g(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){m[e]=new g(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){m[e]=new g(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){m[e]=new g(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){m[e]=new g(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){m[e]=new g(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){m[e]=new g(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){m[e]=new g(e,5,!1,e.toLowerCase(),null,!1,!1)}));var v=/[\-:]([a-z])/g;function y(e){return e[1].toUpperCase()}function C(e,t,n,r){var o=m.hasOwnProperty(t)?m[t]:null;(null!==o?0!==o.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null===t||"undefined"===typeof t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!d.call(f,e)||!d.call(p,e)&&(h.test(e)?f[e]=!0:(p[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(v,y);m[t]=new g(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(v,y);m[t]=new g(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(v,y);m[t]=new g(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){m[e]=new g(e,1,!1,e.toLowerCase(),null,!1,!1)})),m.xlinkHref=new g("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){m[e]=new g(e,1,!1,e.toLowerCase(),null,!0,!0)}));var b=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,w=Symbol.for("react.element"),T=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),A=Symbol.for("react.provider"),I=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),_=Symbol.for("react.suspense"),N=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),P=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var x=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var M=Symbol.iterator;function L(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=M&&e[M]||e["@@iterator"])?e:null}var q,D=Object.assign;function U(e){if(void 0===q)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);q=t&&t[1]||""}return"\n"+q+e}var H=!1;function F(e,t){if(!e||H)return"";H=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(l){var r=l}Reflect.construct(e,[],t)}else{try{t.call()}catch(l){r=l}e.call(t.prototype)}else{try{throw Error()}catch(l){r=l}e()}}catch(l){if(l&&r&&"string"===typeof l.stack){for(var o=l.stack.split("\n"),i=r.stack.split("\n"),a=o.length-1,s=i.length-1;1<=a&&0<=s&&o[a]!==i[s];)s--;for(;1<=a&&0<=s;a--,s--)if(o[a]!==i[s]){if(1!==a||1!==s)do{if(a--,0>--s||o[a]!==i[s]){var c="\n"+o[a].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}}while(1<=a&&0<=s);break}}}finally{H=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?U(e):""}function B(e){switch(e.tag){case 5:return U(e.type);case 16:return U("Lazy");case 13:return U("Suspense");case 19:return U("SuspenseList");case 0:case 2:case 15:return e=F(e.type,!1);case 11:return e=F(e.type.render,!1);case 1:return e=F(e.type,!0);default:return""}}function K(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case S:return"Fragment";case T:return"Portal";case E:return"Profiler";case k:return"StrictMode";case _:return"Suspense";case N:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case I:return(e.displayName||"Context")+".Consumer";case A:return(e._context.displayName||"Context")+".Provider";case R:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case O:return null!==(t=e.displayName||null)?t:K(e.type)||"Memo";case P:t=e._payload,e=e._init;try{return K(e(t))}catch(n){}}return null}function j(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return K(t);case 8:return t===k?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"===typeof t)return t.displayName||t.name||null;if("string"===typeof t)return t}return null}function z(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function W(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function G(e){e._valueTracker||(e._valueTracker=function(e){var t=W(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function V(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=W(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Q(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Z(e,t){var n=t.checked;return D({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function Y(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=z(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function J(e,t){null!=(t=t.checked)&&C(e,"checked",t,!1)}function $(e,t){J(e,t);var n=z(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,n):t.hasOwnProperty("defaultValue")&&ee(e,t.type,z(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function X(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ee(e,t,n){"number"===t&&Q(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var te=Array.isArray;function ne(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+z(n),t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function re(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(i(91));return D({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function oe(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(i(92));if(te(n)){if(1<n.length)throw Error(i(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:z(n)}}function ie(e,t){var n=z(t.value),r=z(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function ae(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function se(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ce(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?se(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var le,ue,de=(ue=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((le=le||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=le.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ue(e,t)}))}:ue);function he(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var pe={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},fe=["Webkit","ms","Moz","O"];function ge(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||pe.hasOwnProperty(e)&&pe[e]?(""+t).trim():t+"px"}function me(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=ge(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(pe).forEach((function(e){fe.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),pe[t]=pe[e]}))}));var ve=D({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ye(e,t){if(t){if(ve[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(i(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(i(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(i(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(i(62))}}function Ce(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){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 be=null;function we(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Te=null,Se=null,ke=null;function Ee(e){if(e=bo(e)){if("function"!==typeof Te)throw Error(i(280));var t=e.stateNode;t&&(t=To(t),Te(e.stateNode,e.type,t))}}function Ae(e){Se?ke?ke.push(e):ke=[e]:Se=e}function Ie(){if(Se){var e=Se,t=ke;if(ke=Se=null,Ee(e),t)for(e=0;e<t.length;e++)Ee(t[e])}}function Re(e,t){return e(t)}function _e(){}var Ne=!1;function Oe(e,t,n){if(Ne)return e(t,n);Ne=!0;try{return Re(e,t,n)}finally{Ne=!1,(null!==Se||null!==ke)&&(_e(),Ie())}}function Pe(e,t){var n=e.stateNode;if(null===n)return null;var r=To(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!==typeof n)throw Error(i(231,t,typeof n));return n}var xe=!1;if(u)try{var Me={};Object.defineProperty(Me,"passive",{get:function(){xe=!0}}),window.addEventListener("test",Me,Me),window.removeEventListener("test",Me,Me)}catch(ue){xe=!1}function Le(e,t,n,r,o,i,a,s,c){var l=Array.prototype.slice.call(arguments,3);try{t.apply(n,l)}catch(u){this.onError(u)}}var qe=!1,De=null,Ue=!1,He=null,Fe={onError:function(e){qe=!0,De=e}};function Be(e,t,n,r,o,i,a,s,c){qe=!1,De=null,Le.apply(Fe,arguments)}function Ke(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function je(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function ze(e){if(Ke(e)!==e)throw Error(i(188))}function We(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=Ke(e)))throw Error(i(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(null===o)break;var a=o.alternate;if(null===a){if(null!==(r=o.return)){n=r;continue}break}if(o.child===a.child){for(a=o.child;a;){if(a===n)return ze(o),e;if(a===r)return ze(o),t;a=a.sibling}throw Error(i(188))}if(n.return!==r.return)n=o,r=a;else{for(var s=!1,c=o.child;c;){if(c===n){s=!0,n=o,r=a;break}if(c===r){s=!0,r=o,n=a;break}c=c.sibling}if(!s){for(c=a.child;c;){if(c===n){s=!0,n=a,r=o;break}if(c===r){s=!0,r=a,n=o;break}c=c.sibling}if(!s)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(3!==n.tag)throw Error(i(188));return n.stateNode.current===n?e:t}(e))?Ge(e):null}function Ge(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=Ge(e);if(null!==t)return t;e=e.sibling}return null}var Ve=o.unstable_scheduleCallback,Qe=o.unstable_cancelCallback,Ze=o.unstable_shouldYield,Ye=o.unstable_requestPaint,Je=o.unstable_now,$e=o.unstable_getCurrentPriorityLevel,Xe=o.unstable_ImmediatePriority,et=o.unstable_UserBlockingPriority,tt=o.unstable_NormalPriority,nt=o.unstable_LowPriority,rt=o.unstable_IdlePriority,ot=null,it=null;var at=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(st(e)/ct|0)|0},st=Math.log,ct=Math.LN2;var lt=64,ut=4194304;function dt(e){switch(e&-e){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: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 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ht(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,a=268435455&n;if(0!==a){var s=a&~o;0!==s?r=dt(s):0!==(i&=a)&&(r=dt(i))}else 0!==(a=n&~o)?r=dt(a):0!==i&&(r=dt(i));if(0===r)return 0;if(0!==t&&t!==r&&0===(t&o)&&((o=r&-r)>=(i=t&-t)||16===o&&0!==(4194240&i)))return t;if(0!==(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)o=1<<(n=31-at(t)),r|=e[n],t&=~o;return r}function pt(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64: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 t+5e3;default:return-1}}function ft(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function gt(){var e=lt;return 0===(4194240&(lt<<=1))&&(lt=64),e}function mt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function vt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-at(t)]=n}function yt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-at(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var Ct=0;function bt(e){return 1<(e&=-e)?4<e?0!==(268435455&e)?16:536870912:4:1}var wt,Tt,St,kt,Et,At=!1,It=[],Rt=null,_t=null,Nt=null,Ot=new Map,Pt=new Map,xt=[],Mt="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 submit".split(" ");function Lt(e,t){switch(e){case"focusin":case"focusout":Rt=null;break;case"dragenter":case"dragleave":_t=null;break;case"mouseover":case"mouseout":Nt=null;break;case"pointerover":case"pointerout":Ot.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Pt.delete(t.pointerId)}}function qt(e,t,n,r,o,i){return null===e||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[o]},null!==t&&(null!==(t=bo(t))&&Tt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==o&&-1===t.indexOf(o)&&t.push(o),e)}function Dt(e){var t=Co(e.target);if(null!==t){var n=Ke(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=je(n)))return e.blockedOn=t,void Et(e.priority,(function(){St(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Ut(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Zt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=bo(n))&&Tt(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);be=r,n.target.dispatchEvent(r),be=null,t.shift()}return!0}function Ht(e,t,n){Ut(e)&&n.delete(t)}function Ft(){At=!1,null!==Rt&&Ut(Rt)&&(Rt=null),null!==_t&&Ut(_t)&&(_t=null),null!==Nt&&Ut(Nt)&&(Nt=null),Ot.forEach(Ht),Pt.forEach(Ht)}function Bt(e,t){e.blockedOn===t&&(e.blockedOn=null,At||(At=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,Ft)))}function Kt(e){function t(t){return Bt(t,e)}if(0<It.length){Bt(It[0],e);for(var n=1;n<It.length;n++){var r=It[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==Rt&&Bt(Rt,e),null!==_t&&Bt(_t,e),null!==Nt&&Bt(Nt,e),Ot.forEach(t),Pt.forEach(t),n=0;n<xt.length;n++)(r=xt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<xt.length&&null===(n=xt[0]).blockedOn;)Dt(n),null===n.blockedOn&&xt.shift()}var jt=b.ReactCurrentBatchConfig,zt=!0;function Wt(e,t,n,r){var o=Ct,i=jt.transition;jt.transition=null;try{Ct=1,Vt(e,t,n,r)}finally{Ct=o,jt.transition=i}}function Gt(e,t,n,r){var o=Ct,i=jt.transition;jt.transition=null;try{Ct=4,Vt(e,t,n,r)}finally{Ct=o,jt.transition=i}}function Vt(e,t,n,r){if(zt){var o=Zt(e,t,n,r);if(null===o)zr(e,t,r,Qt,n),Lt(e,r);else if(function(e,t,n,r,o){switch(t){case"focusin":return Rt=qt(Rt,e,t,n,r,o),!0;case"dragenter":return _t=qt(_t,e,t,n,r,o),!0;case"mouseover":return Nt=qt(Nt,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return Ot.set(i,qt(Ot.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,Pt.set(i,qt(Pt.get(i)||null,e,t,n,r,o)),!0}return!1}(o,e,t,n,r))r.stopPropagation();else if(Lt(e,r),4&t&&-1<Mt.indexOf(e)){for(;null!==o;){var i=bo(o);if(null!==i&&wt(i),null===(i=Zt(e,t,n,r))&&zr(e,t,r,Qt,n),i===o)break;o=i}null!==o&&r.stopPropagation()}else zr(e,t,r,null,n)}}var Qt=null;function Zt(e,t,n,r){if(Qt=null,null!==(e=Co(e=we(r))))if(null===(t=Ke(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=je(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Qt=e,null}function Yt(e){switch(e){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch($e()){case Xe:return 1;case et:return 4;case tt:case nt:return 16;case rt:return 536870912;default:return 16}default:return 16}}var Jt=null,$t=null,Xt=null;function en(){if(Xt)return Xt;var e,t,n=$t,r=n.length,o="value"in Jt?Jt.value:Jt.textContent,i=o.length;for(e=0;e<r&&n[e]===o[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===o[i-t];t++);return Xt=o.slice(e,1<t?1-t:void 0)}function tn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function nn(){return!0}function rn(){return!1}function on(e){function t(t,n,r,o,i){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=o,this.target=i,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(o):o[a]);return this.isDefaultPrevented=(null!=o.defaultPrevented?o.defaultPrevented:!1===o.returnValue)?nn:rn,this.isPropagationStopped=rn,this}return D(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=nn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=nn)},persist:function(){},isPersistent:nn}),t}var an,sn,cn,ln={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},un=on(ln),dn=D({},ln,{view:0,detail:0}),hn=on(dn),pn=D({},dn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:En,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==cn&&(cn&&"mousemove"===e.type?(an=e.screenX-cn.screenX,sn=e.screenY-cn.screenY):sn=an=0,cn=e),an)},movementY:function(e){return"movementY"in e?e.movementY:sn}}),fn=on(pn),gn=on(D({},pn,{dataTransfer:0})),mn=on(D({},dn,{relatedTarget:0})),vn=on(D({},ln,{animationName:0,elapsedTime:0,pseudoElement:0})),yn=D({},ln,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Cn=on(yn),bn=on(D({},ln,{data:0})),wn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Tn={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"},Sn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function kn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Sn[e])&&!!t[e]}function En(){return kn}var An=D({},dn,{key:function(e){if(e.key){var t=wn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=tn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Tn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:En,charCode:function(e){return"keypress"===e.type?tn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?tn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),In=on(An),Rn=on(D({},pn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),_n=on(D({},dn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:En})),Nn=on(D({},ln,{propertyName:0,elapsedTime:0,pseudoElement:0})),On=D({},pn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Pn=on(On),xn=[9,13,27,32],Mn=u&&"CompositionEvent"in window,Ln=null;u&&"documentMode"in document&&(Ln=document.documentMode);var qn=u&&"TextEvent"in window&&!Ln,Dn=u&&(!Mn||Ln&&8<Ln&&11>=Ln),Un=String.fromCharCode(32),Hn=!1;function Fn(e,t){switch(e){case"keyup":return-1!==xn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Bn(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var Kn=!1;var jn={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 zn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!jn[e.type]:"textarea"===t}function Wn(e,t,n,r){Ae(r),0<(t=Gr(t,"onChange")).length&&(n=new un("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Gn=null,Vn=null;function Qn(e){Ur(e,0)}function Zn(e){if(V(wo(e)))return e}function Yn(e,t){if("change"===e)return t}var Jn=!1;if(u){var $n;if(u){var Xn="oninput"in document;if(!Xn){var er=document.createElement("div");er.setAttribute("oninput","return;"),Xn="function"===typeof er.oninput}$n=Xn}else $n=!1;Jn=$n&&(!document.documentMode||9<document.documentMode)}function tr(){Gn&&(Gn.detachEvent("onpropertychange",nr),Vn=Gn=null)}function nr(e){if("value"===e.propertyName&&Zn(Vn)){var t=[];Wn(t,Vn,e,we(e)),Oe(Qn,t)}}function rr(e,t,n){"focusin"===e?(tr(),Vn=n,(Gn=t).attachEvent("onpropertychange",nr)):"focusout"===e&&tr()}function or(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Zn(Vn)}function ir(e,t){if("click"===e)return Zn(t)}function ar(e,t){if("input"===e||"change"===e)return Zn(t)}var sr="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t};function cr(e,t){if(sr(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!d.call(t,o)||!sr(e[o],t[o]))return!1}return!0}function lr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ur(e,t){var n,r=lr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=lr(r)}}function dr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?dr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function hr(){for(var e=window,t=Q();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=Q((e=t.contentWindow).document)}return t}function pr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function fr(e){var t=hr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&dr(n.ownerDocument.documentElement,n)){if(null!==r&&pr(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=void 0===r.end?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=ur(n,i);var a=ur(n,r);o&&a&&(1!==e.rangeCount||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&((t=t.createRange()).setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"===typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var gr=u&&"documentMode"in document&&11>=document.documentMode,mr=null,vr=null,yr=null,Cr=!1;function br(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;Cr||null==mr||mr!==Q(r)||("selectionStart"in(r=mr)&&pr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},yr&&cr(yr,r)||(yr=r,0<(r=Gr(vr,"onSelect")).length&&(t=new un("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=mr)))}function wr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Tr={animationend:wr("Animation","AnimationEnd"),animationiteration:wr("Animation","AnimationIteration"),animationstart:wr("Animation","AnimationStart"),transitionend:wr("Transition","TransitionEnd")},Sr={},kr={};function Er(e){if(Sr[e])return Sr[e];if(!Tr[e])return e;var t,n=Tr[e];for(t in n)if(n.hasOwnProperty(t)&&t in kr)return Sr[e]=n[t];return e}u&&(kr=document.createElement("div").style,"AnimationEvent"in window||(delete Tr.animationend.animation,delete Tr.animationiteration.animation,delete Tr.animationstart.animation),"TransitionEvent"in window||delete Tr.transitionend.transition);var Ar=Er("animationend"),Ir=Er("animationiteration"),Rr=Er("animationstart"),_r=Er("transitionend"),Nr=new Map,Or="abort auxClick 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(" ");function Pr(e,t){Nr.set(e,t),c(t,[e])}for(var xr=0;xr<Or.length;xr++){var Mr=Or[xr];Pr(Mr.toLowerCase(),"on"+(Mr[0].toUpperCase()+Mr.slice(1)))}Pr(Ar,"onAnimationEnd"),Pr(Ir,"onAnimationIteration"),Pr(Rr,"onAnimationStart"),Pr("dblclick","onDoubleClick"),Pr("focusin","onFocus"),Pr("focusout","onBlur"),Pr(_r,"onTransitionEnd"),l("onMouseEnter",["mouseout","mouseover"]),l("onMouseLeave",["mouseout","mouseover"]),l("onPointerEnter",["pointerout","pointerover"]),l("onPointerLeave",["pointerout","pointerover"]),c("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),c("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),c("onBeforeInput",["compositionend","keypress","textInput","paste"]),c("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Lr="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(" "),qr=new Set("cancel close invalid load scroll toggle".split(" ").concat(Lr));function Dr(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,o,a,s,c,l){if(Be.apply(this,arguments),qe){if(!qe)throw Error(i(198));var u=De;qe=!1,De=null,Ue||(Ue=!0,He=u)}}(r,t,void 0,e),e.currentTarget=null}function Ur(e,t){t=0!==(4&t);for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==i&&o.isPropagationStopped())break e;Dr(o,s,l),i=c}else for(a=0;a<r.length;a++){if(c=(s=r[a]).instance,l=s.currentTarget,s=s.listener,c!==i&&o.isPropagationStopped())break e;Dr(o,s,l),i=c}}}if(Ue)throw e=He,Ue=!1,He=null,e}function Hr(e,t){var n=t[mo];void 0===n&&(n=t[mo]=new Set);var r=e+"__bubble";n.has(r)||(jr(t,e,2,!1),n.add(r))}function Fr(e,t,n){var r=0;t&&(r|=4),jr(n,e,r,t)}var Br="_reactListening"+Math.random().toString(36).slice(2);function Kr(e){if(!e[Br]){e[Br]=!0,a.forEach((function(t){"selectionchange"!==t&&(qr.has(t)||Fr(t,!1,e),Fr(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Br]||(t[Br]=!0,Fr("selectionchange",!1,t))}}function jr(e,t,n,r){switch(Yt(t)){case 1:var o=Wt;break;case 4:o=Gt;break;default:o=Vt}n=o.bind(null,t,n,e),o=void 0,!xe||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(o=!0),r?void 0!==o?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):void 0!==o?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function zr(e,t,n,r,o){var i=r;if(0===(1&t)&&0===(2&t)&&null!==r)e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===o||8===s.nodeType&&s.parentNode===o)break;if(4===a)for(a=r.return;null!==a;){var c=a.tag;if((3===c||4===c)&&((c=a.stateNode.containerInfo)===o||8===c.nodeType&&c.parentNode===o))return;a=a.return}for(;null!==s;){if(null===(a=Co(s)))return;if(5===(c=a.tag)||6===c){r=i=a;continue e}s=s.parentNode}}r=r.return}Oe((function(){var r=i,o=we(n),a=[];e:{var s=Nr.get(e);if(void 0!==s){var c=un,l=e;switch(e){case"keypress":if(0===tn(n))break e;case"keydown":case"keyup":c=In;break;case"focusin":l="focus",c=mn;break;case"focusout":l="blur",c=mn;break;case"beforeblur":case"afterblur":c=mn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":c=fn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":c=gn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":c=_n;break;case Ar:case Ir:case Rr:c=vn;break;case _r:c=Nn;break;case"scroll":c=hn;break;case"wheel":c=Pn;break;case"copy":case"cut":case"paste":c=Cn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":c=Rn}var u=0!==(4&t),d=!u&&"scroll"===e,h=u?null!==s?s+"Capture":null:s;u=[];for(var p,f=r;null!==f;){var g=(p=f).stateNode;if(5===p.tag&&null!==g&&(p=g,null!==h&&(null!=(g=Pe(f,h))&&u.push(Wr(f,g,p)))),d)break;f=f.return}0<u.length&&(s=new c(s,l,null,n,o),a.push({event:s,listeners:u}))}}if(0===(7&t)){if(c="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===be||!(l=n.relatedTarget||n.fromElement)||!Co(l)&&!l[go])&&(c||s)&&(s=o.window===o?o:(s=o.ownerDocument)?s.defaultView||s.parentWindow:window,c?(c=r,null!==(l=(l=n.relatedTarget||n.toElement)?Co(l):null)&&(l!==(d=Ke(l))||5!==l.tag&&6!==l.tag)&&(l=null)):(c=null,l=r),c!==l)){if(u=fn,g="onMouseLeave",h="onMouseEnter",f="mouse","pointerout"!==e&&"pointerover"!==e||(u=Rn,g="onPointerLeave",h="onPointerEnter",f="pointer"),d=null==c?s:wo(c),p=null==l?s:wo(l),(s=new u(g,f+"leave",c,n,o)).target=d,s.relatedTarget=p,g=null,Co(o)===r&&((u=new u(h,f+"enter",l,n,o)).target=p,u.relatedTarget=d,g=u),d=g,c&&l)e:{for(h=l,f=0,p=u=c;p;p=Vr(p))f++;for(p=0,g=h;g;g=Vr(g))p++;for(;0<f-p;)u=Vr(u),f--;for(;0<p-f;)h=Vr(h),p--;for(;f--;){if(u===h||null!==h&&u===h.alternate)break e;u=Vr(u),h=Vr(h)}u=null}else u=null;null!==c&&Qr(a,s,c,u,!1),null!==l&&null!==d&&Qr(a,d,l,u,!0)}if("select"===(c=(s=r?wo(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===c&&"file"===s.type)var m=Yn;else if(zn(s))if(Jn)m=ar;else{m=or;var v=rr}else(c=s.nodeName)&&"input"===c.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(m=ir);switch(m&&(m=m(e,r))?Wn(a,m,n,o):(v&&v(e,s,r),"focusout"===e&&(v=s._wrapperState)&&v.controlled&&"number"===s.type&&ee(s,"number",s.value)),v=r?wo(r):window,e){case"focusin":(zn(v)||"true"===v.contentEditable)&&(mr=v,vr=r,yr=null);break;case"focusout":yr=vr=mr=null;break;case"mousedown":Cr=!0;break;case"contextmenu":case"mouseup":case"dragend":Cr=!1,br(a,n,o);break;case"selectionchange":if(gr)break;case"keydown":case"keyup":br(a,n,o)}var y;if(Mn)e:{switch(e){case"compositionstart":var C="onCompositionStart";break e;case"compositionend":C="onCompositionEnd";break e;case"compositionupdate":C="onCompositionUpdate";break e}C=void 0}else Kn?Fn(e,n)&&(C="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(C="onCompositionStart");C&&(Dn&&"ko"!==n.locale&&(Kn||"onCompositionStart"!==C?"onCompositionEnd"===C&&Kn&&(y=en()):($t="value"in(Jt=o)?Jt.value:Jt.textContent,Kn=!0)),0<(v=Gr(r,C)).length&&(C=new bn(C,e,null,n,o),a.push({event:C,listeners:v}),y?C.data=y:null!==(y=Bn(n))&&(C.data=y))),(y=qn?function(e,t){switch(e){case"compositionend":return Bn(t);case"keypress":return 32!==t.which?null:(Hn=!0,Un);case"textInput":return(e=t.data)===Un&&Hn?null:e;default:return null}}(e,n):function(e,t){if(Kn)return"compositionend"===e||!Mn&&Fn(e,t)?(e=en(),Xt=$t=Jt=null,Kn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Dn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Gr(r,"onBeforeInput")).length&&(o=new bn("onBeforeInput","beforeinput",null,n,o),a.push({event:o,listeners:r}),o.data=y))}Ur(a,t)}))}function Wr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Gr(e,t){for(var n=t+"Capture",r=[];null!==e;){var o=e,i=o.stateNode;5===o.tag&&null!==i&&(o=i,null!=(i=Pe(e,n))&&r.unshift(Wr(e,i,o)),null!=(i=Pe(e,t))&&r.push(Wr(e,i,o))),e=e.return}return r}function Vr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Qr(e,t,n,r,o){for(var i=t._reactName,a=[];null!==n&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(null!==c&&c===r)break;5===s.tag&&null!==l&&(s=l,o?null!=(c=Pe(n,i))&&a.unshift(Wr(n,c,s)):o||null!=(c=Pe(n,i))&&a.push(Wr(n,c,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}var Zr=/\r\n?/g,Yr=/\u0000|\uFFFD/g;function Jr(e){return("string"===typeof e?e:""+e).replace(Zr,"\n").replace(Yr,"")}function $r(e,t,n){if(t=Jr(t),Jr(e)!==t&&n)throw Error(i(425))}function Xr(){}var eo=null,to=null;function no(e,t){return"textarea"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var ro="function"===typeof setTimeout?setTimeout:void 0,oo="function"===typeof clearTimeout?clearTimeout:void 0,io="function"===typeof Promise?Promise:void 0,ao="function"===typeof queueMicrotask?queueMicrotask:"undefined"!==typeof io?function(e){return io.resolve(null).then(e).catch(so)}:ro;function so(e){setTimeout((function(){throw e}))}function co(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&8===o.nodeType)if("/$"===(n=o.data)){if(0===r)return e.removeChild(o),void Kt(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=o}while(n);Kt(t)}function lo(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function uo(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var ho=Math.random().toString(36).slice(2),po="__reactFiber$"+ho,fo="__reactProps$"+ho,go="__reactContainer$"+ho,mo="__reactEvents$"+ho,vo="__reactListeners$"+ho,yo="__reactHandles$"+ho;function Co(e){var t=e[po];if(t)return t;for(var n=e.parentNode;n;){if(t=n[go]||n[po]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=uo(e);null!==e;){if(n=e[po])return n;e=uo(e)}return t}n=(e=n).parentNode}return null}function bo(e){return!(e=e[po]||e[go])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function wo(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(i(33))}function To(e){return e[fo]||null}var So=[],ko=-1;function Eo(e){return{current:e}}function Ao(e){0>ko||(e.current=So[ko],So[ko]=null,ko--)}function Io(e,t){ko++,So[ko]=e.current,e.current=t}var Ro={},_o=Eo(Ro),No=Eo(!1),Oo=Ro;function Po(e,t){var n=e.type.contextTypes;if(!n)return Ro;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function xo(e){return null!==(e=e.childContextTypes)&&void 0!==e}function Mo(){Ao(No),Ao(_o)}function Lo(e,t,n){if(_o.current!==Ro)throw Error(i(168));Io(_o,t),Io(No,n)}function qo(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in t))throw Error(i(108,j(e)||"Unknown",o));return D({},n,r)}function Do(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ro,Oo=_o.current,Io(_o,e),Io(No,No.current),!0}function Uo(e,t,n){var r=e.stateNode;if(!r)throw Error(i(169));n?(e=qo(e,t,Oo),r.__reactInternalMemoizedMergedChildContext=e,Ao(No),Ao(_o),Io(_o,e)):Ao(No),Io(No,n)}var Ho=null,Fo=!1,Bo=!1;function Ko(e){null===Ho?Ho=[e]:Ho.push(e)}function jo(){if(!Bo&&null!==Ho){Bo=!0;var e=0,t=Ct;try{var n=Ho;for(Ct=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Ho=null,Fo=!1}catch(o){throw null!==Ho&&(Ho=Ho.slice(e+1)),Ve(Xe,jo),o}finally{Ct=t,Bo=!1}}return null}var zo=[],Wo=0,Go=null,Vo=0,Qo=[],Zo=0,Yo=null,Jo=1,$o="";function Xo(e,t){zo[Wo++]=Vo,zo[Wo++]=Go,Go=e,Vo=t}function ei(e,t,n){Qo[Zo++]=Jo,Qo[Zo++]=$o,Qo[Zo++]=Yo,Yo=e;var r=Jo;e=$o;var o=32-at(r)-1;r&=~(1<<o),n+=1;var i=32-at(t)+o;if(30<i){var a=o-o%5;i=(r&(1<<a)-1).toString(32),r>>=a,o-=a,Jo=1<<32-at(t)+o|n<<o|r,$o=i+e}else Jo=1<<i|n<<o|r,$o=e}function ti(e){null!==e.return&&(Xo(e,1),ei(e,1,0))}function ni(e){for(;e===Go;)Go=zo[--Wo],zo[Wo]=null,Vo=zo[--Wo],zo[Wo]=null;for(;e===Yo;)Yo=Qo[--Zo],Qo[Zo]=null,$o=Qo[--Zo],Qo[Zo]=null,Jo=Qo[--Zo],Qo[Zo]=null}var ri=null,oi=null,ii=!1,ai=null;function si(e,t){var n=Pl(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function ci(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,ri=e,oi=lo(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,ri=e,oi=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==Yo?{id:Jo,overflow:$o}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Pl(18,null,null,0)).stateNode=t,n.return=e,e.child=n,ri=e,oi=null,!0);default:return!1}}function li(e){return 0!==(1&e.mode)&&0===(128&e.flags)}function ui(e){if(ii){var t=oi;if(t){var n=t;if(!ci(e,t)){if(li(e))throw Error(i(418));t=lo(n.nextSibling);var r=ri;t&&ci(e,t)?si(r,n):(e.flags=-4097&e.flags|2,ii=!1,ri=e)}}else{if(li(e))throw Error(i(418));e.flags=-4097&e.flags|2,ii=!1,ri=e}}}function di(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;ri=e}function hi(e){if(e!==ri)return!1;if(!ii)return di(e),ii=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!no(e.type,e.memoizedProps)),t&&(t=oi)){if(li(e))throw pi(),Error(i(418));for(;t;)si(e,t),t=lo(t.nextSibling)}if(di(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(i(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){oi=lo(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}oi=null}}else oi=ri?lo(e.stateNode.nextSibling):null;return!0}function pi(){for(var e=oi;e;)e=lo(e.nextSibling)}function fi(){oi=ri=null,ii=!1}function gi(e){null===ai?ai=[e]:ai.push(e)}var mi=b.ReactCurrentBatchConfig;function vi(e,t){if(e&&e.defaultProps){for(var n in t=D({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var yi=Eo(null),Ci=null,bi=null,wi=null;function Ti(){wi=bi=Ci=null}function Si(e){var t=yi.current;Ao(yi),e._currentValue=t}function ki(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Ei(e,t){Ci=e,wi=bi=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(bs=!0),e.firstContext=null)}function Ai(e){var t=e._currentValue;if(wi!==e)if(e={context:e,memoizedValue:t,next:null},null===bi){if(null===Ci)throw Error(i(308));bi=e,Ci.dependencies={lanes:0,firstContext:e}}else bi=bi.next=e;return t}var Ii=null;function Ri(e){null===Ii?Ii=[e]:Ii.push(e)}function _i(e,t,n,r){var o=t.interleaved;return null===o?(n.next=n,Ri(t)):(n.next=o.next,o.next=n),t.interleaved=n,Ni(e,r)}function Ni(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Oi=!1;function Pi(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function xi(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Mi(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Li(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!==(2&_c)){var o=r.pending;return null===o?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Ni(e,n)}return null===(o=r.interleaved)?(t.next=t,Ri(r)):(t.next=o.next,o.next=t),r.interleaved=t,Ni(e,n)}function qi(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!==(4194240&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,yt(e,n)}}function Di(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var o=null,i=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===i?o=i=a:i=i.next=a,n=n.next}while(null!==n);null===i?o=i=t:i=i.next=t}else o=i=t;return n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Ui(e,t,n,r){var o=e.updateQueue;Oi=!1;var i=o.firstBaseUpdate,a=o.lastBaseUpdate,s=o.shared.pending;if(null!==s){o.shared.pending=null;var c=s,l=c.next;c.next=null,null===a?i=l:a.next=l,a=c;var u=e.alternate;null!==u&&((s=(u=u.updateQueue).lastBaseUpdate)!==a&&(null===s?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(null!==i){var d=o.baseState;for(a=0,u=l=c=null,s=i;;){var h=s.lane,p=s.eventTime;if((r&h)===h){null!==u&&(u=u.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var f=e,g=s;switch(h=t,p=n,g.tag){case 1:if("function"===typeof(f=g.payload)){d=f.call(p,d,h);break e}d=f;break e;case 3:f.flags=-65537&f.flags|128;case 0:if(null===(h="function"===typeof(f=g.payload)?f.call(p,d,h):f)||void 0===h)break e;d=D({},d,h);break e;case 2:Oi=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(h=o.effects)?o.effects=[s]:h.push(s))}else p={eventTime:p,lane:h,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===u?(l=u=p,c=d):u=u.next=p,a|=h;if(null===(s=s.next)){if(null===(s=o.shared.pending))break;s=(h=s).next,h.next=null,o.lastBaseUpdate=h,o.shared.pending=null}}if(null===u&&(c=d),o.baseState=c,o.firstBaseUpdate=l,o.lastBaseUpdate=u,null!==(t=o.shared.interleaved)){o=t;do{a|=o.lane,o=o.next}while(o!==t)}else null===i&&(o.shared.lanes=0);Dc|=a,e.lanes=a,e.memoizedState=d}}function Hi(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(null!==o){if(r.callback=null,r=n,"function"!==typeof o)throw Error(i(191,o));o.call(r)}}}var Fi=(new r.Component).refs;function Bi(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:D({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var Ki={isMounted:function(e){return!!(e=e._reactInternals)&&Ke(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=tl(),o=nl(e),i=Mi(r,o);i.payload=t,void 0!==n&&null!==n&&(i.callback=n),null!==(t=Li(e,i,o))&&(rl(t,e,o,r),qi(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=tl(),o=nl(e),i=Mi(r,o);i.tag=1,i.payload=t,void 0!==n&&null!==n&&(i.callback=n),null!==(t=Li(e,i,o))&&(rl(t,e,o,r),qi(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=tl(),r=nl(e),o=Mi(n,r);o.tag=2,void 0!==t&&null!==t&&(o.callback=t),null!==(t=Li(e,o,r))&&(rl(t,e,r,n),qi(t,e,r))}};function ji(e,t,n,r,o,i,a){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,i,a):!t.prototype||!t.prototype.isPureReactComponent||(!cr(n,r)||!cr(o,i))}function zi(e,t,n){var r=!1,o=Ro,i=t.contextType;return"object"===typeof i&&null!==i?i=Ai(i):(o=xo(t)?Oo:_o.current,i=(r=null!==(r=t.contextTypes)&&void 0!==r)?Po(e,o):Ro),t=new t(n,i),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=Ki,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function Wi(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ki.enqueueReplaceState(t,t.state,null)}function Gi(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=Fi,Pi(e);var i=t.contextType;"object"===typeof i&&null!==i?o.context=Ai(i):(i=xo(t)?Oo:_o.current,o.context=Po(e,i)),o.state=e.memoizedState,"function"===typeof(i=t.getDerivedStateFromProps)&&(Bi(e,t,i,n),o.state=e.memoizedState),"function"===typeof t.getDerivedStateFromProps||"function"===typeof o.getSnapshotBeforeUpdate||"function"!==typeof o.UNSAFE_componentWillMount&&"function"!==typeof o.componentWillMount||(t=o.state,"function"===typeof o.componentWillMount&&o.componentWillMount(),"function"===typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&Ki.enqueueReplaceState(o,o.state,null),Ui(e,n,o,r),o.state=e.memoizedState),"function"===typeof o.componentDidMount&&(e.flags|=4194308)}function Vi(e,t,n){if(null!==(e=n.ref)&&"function"!==typeof e&&"object"!==typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(i(309));var r=n.stateNode}if(!r)throw Error(i(147,e));var o=r,a=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===a?t.ref:(t=function(e){var t=o.refs;t===Fi&&(t=o.refs={}),null===e?delete t[a]:t[a]=e},t._stringRef=a,t)}if("string"!==typeof e)throw Error(i(284));if(!n._owner)throw Error(i(290,e))}return e}function Qi(e,t){throw e=Object.prototype.toString.call(t),Error(i(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Zi(e){return(0,e._init)(e._payload)}function Yi(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=Ml(e,t)).index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function s(t){return e&&null===t.alternate&&(t.flags|=2),t}function c(e,t,n,r){return null===t||6!==t.tag?((t=Ul(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function l(e,t,n,r){var i=n.type;return i===S?d(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===i||"object"===typeof i&&null!==i&&i.$$typeof===P&&Zi(i)===t.type)?((r=o(t,n.props)).ref=Vi(e,t,n),r.return=e,r):((r=Ll(n.type,n.key,n.props,null,e.mode,r)).ref=Vi(e,t,n),r.return=e,r)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Hl(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function d(e,t,n,r,i){return null===t||7!==t.tag?((t=ql(n,e.mode,r,i)).return=e,t):((t=o(t,n)).return=e,t)}function h(e,t,n){if("string"===typeof t&&""!==t||"number"===typeof t)return(t=Ul(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case w:return(n=Ll(t.type,t.key,t.props,null,e.mode,n)).ref=Vi(e,null,t),n.return=e,n;case T:return(t=Hl(t,e.mode,n)).return=e,t;case P:return h(e,(0,t._init)(t._payload),n)}if(te(t)||L(t))return(t=ql(t,e.mode,n,null)).return=e,t;Qi(e,t)}return null}function p(e,t,n,r){var o=null!==t?t.key:null;if("string"===typeof n&&""!==n||"number"===typeof n)return null!==o?null:c(e,t,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case w:return n.key===o?l(e,t,n,r):null;case T:return n.key===o?u(e,t,n,r):null;case P:return p(e,t,(o=n._init)(n._payload),r)}if(te(n)||L(n))return null!==o?null:d(e,t,n,r,null);Qi(e,n)}return null}function f(e,t,n,r,o){if("string"===typeof r&&""!==r||"number"===typeof r)return c(t,e=e.get(n)||null,""+r,o);if("object"===typeof r&&null!==r){switch(r.$$typeof){case w:return l(t,e=e.get(null===r.key?n:r.key)||null,r,o);case T:return u(t,e=e.get(null===r.key?n:r.key)||null,r,o);case P:return f(e,t,n,(0,r._init)(r._payload),o)}if(te(r)||L(r))return d(t,e=e.get(n)||null,r,o,null);Qi(t,r)}return null}function g(o,i,s,c){for(var l=null,u=null,d=i,g=i=0,m=null;null!==d&&g<s.length;g++){d.index>g?(m=d,d=null):m=d.sibling;var v=p(o,d,s[g],c);if(null===v){null===d&&(d=m);break}e&&d&&null===v.alternate&&t(o,d),i=a(v,i,g),null===u?l=v:u.sibling=v,u=v,d=m}if(g===s.length)return n(o,d),ii&&Xo(o,g),l;if(null===d){for(;g<s.length;g++)null!==(d=h(o,s[g],c))&&(i=a(d,i,g),null===u?l=d:u.sibling=d,u=d);return ii&&Xo(o,g),l}for(d=r(o,d);g<s.length;g++)null!==(m=f(d,o,g,s[g],c))&&(e&&null!==m.alternate&&d.delete(null===m.key?g:m.key),i=a(m,i,g),null===u?l=m:u.sibling=m,u=m);return e&&d.forEach((function(e){return t(o,e)})),ii&&Xo(o,g),l}function m(o,s,c,l){var u=L(c);if("function"!==typeof u)throw Error(i(150));if(null==(c=u.call(c)))throw Error(i(151));for(var d=u=null,g=s,m=s=0,v=null,y=c.next();null!==g&&!y.done;m++,y=c.next()){g.index>m?(v=g,g=null):v=g.sibling;var C=p(o,g,y.value,l);if(null===C){null===g&&(g=v);break}e&&g&&null===C.alternate&&t(o,g),s=a(C,s,m),null===d?u=C:d.sibling=C,d=C,g=v}if(y.done)return n(o,g),ii&&Xo(o,m),u;if(null===g){for(;!y.done;m++,y=c.next())null!==(y=h(o,y.value,l))&&(s=a(y,s,m),null===d?u=y:d.sibling=y,d=y);return ii&&Xo(o,m),u}for(g=r(o,g);!y.done;m++,y=c.next())null!==(y=f(g,o,m,y.value,l))&&(e&&null!==y.alternate&&g.delete(null===y.key?m:y.key),s=a(y,s,m),null===d?u=y:d.sibling=y,d=y);return e&&g.forEach((function(e){return t(o,e)})),ii&&Xo(o,m),u}return function e(r,i,a,c){if("object"===typeof a&&null!==a&&a.type===S&&null===a.key&&(a=a.props.children),"object"===typeof a&&null!==a){switch(a.$$typeof){case w:e:{for(var l=a.key,u=i;null!==u;){if(u.key===l){if((l=a.type)===S){if(7===u.tag){n(r,u.sibling),(i=o(u,a.props.children)).return=r,r=i;break e}}else if(u.elementType===l||"object"===typeof l&&null!==l&&l.$$typeof===P&&Zi(l)===u.type){n(r,u.sibling),(i=o(u,a.props)).ref=Vi(r,u,a),i.return=r,r=i;break e}n(r,u);break}t(r,u),u=u.sibling}a.type===S?((i=ql(a.props.children,r.mode,c,a.key)).return=r,r=i):((c=Ll(a.type,a.key,a.props,null,r.mode,c)).ref=Vi(r,i,a),c.return=r,r=c)}return s(r);case T:e:{for(u=a.key;null!==i;){if(i.key===u){if(4===i.tag&&i.stateNode.containerInfo===a.containerInfo&&i.stateNode.implementation===a.implementation){n(r,i.sibling),(i=o(i,a.children||[])).return=r,r=i;break e}n(r,i);break}t(r,i),i=i.sibling}(i=Hl(a,r.mode,c)).return=r,r=i}return s(r);case P:return e(r,i,(u=a._init)(a._payload),c)}if(te(a))return g(r,i,a,c);if(L(a))return m(r,i,a,c);Qi(r,a)}return"string"===typeof a&&""!==a||"number"===typeof a?(a=""+a,null!==i&&6===i.tag?(n(r,i.sibling),(i=o(i,a)).return=r,r=i):(n(r,i),(i=Ul(a,r.mode,c)).return=r,r=i),s(r)):n(r,i)}}var Ji=Yi(!0),$i=Yi(!1),Xi={},ea=Eo(Xi),ta=Eo(Xi),na=Eo(Xi);function ra(e){if(e===Xi)throw Error(i(174));return e}function oa(e,t){switch(Io(na,t),Io(ta,e),Io(ea,Xi),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ce(null,"");break;default:t=ce(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Ao(ea),Io(ea,t)}function ia(){Ao(ea),Ao(ta),Ao(na)}function aa(e){ra(na.current);var t=ra(ea.current),n=ce(t,e.type);t!==n&&(Io(ta,e),Io(ea,n))}function sa(e){ta.current===e&&(Ao(ea),Ao(ta))}var ca=Eo(0);function la(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ua=[];function da(){for(var e=0;e<ua.length;e++)ua[e]._workInProgressVersionPrimary=null;ua.length=0}var ha=b.ReactCurrentDispatcher,pa=b.ReactCurrentBatchConfig,fa=0,ga=null,ma=null,va=null,ya=!1,Ca=!1,ba=0,wa=0;function Ta(){throw Error(i(321))}function Sa(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!sr(e[n],t[n]))return!1;return!0}function ka(e,t,n,r,o,a){if(fa=a,ga=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ha.current=null===e||null===e.memoizedState?ss:cs,e=n(r,o),Ca){a=0;do{if(Ca=!1,ba=0,25<=a)throw Error(i(301));a+=1,va=ma=null,t.updateQueue=null,ha.current=ls,e=n(r,o)}while(Ca)}if(ha.current=as,t=null!==ma&&null!==ma.next,fa=0,va=ma=ga=null,ya=!1,t)throw Error(i(300));return e}function Ea(){var e=0!==ba;return ba=0,e}function Aa(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===va?ga.memoizedState=va=e:va=va.next=e,va}function Ia(){if(null===ma){var e=ga.alternate;e=null!==e?e.memoizedState:null}else e=ma.next;var t=null===va?ga.memoizedState:va.next;if(null!==t)va=t,ma=e;else{if(null===e)throw Error(i(310));e={memoizedState:(ma=e).memoizedState,baseState:ma.baseState,baseQueue:ma.baseQueue,queue:ma.queue,next:null},null===va?ga.memoizedState=va=e:va=va.next=e}return va}function Ra(e,t){return"function"===typeof t?t(e):t}function _a(e){var t=Ia(),n=t.queue;if(null===n)throw Error(i(311));n.lastRenderedReducer=e;var r=ma,o=r.baseQueue,a=n.pending;if(null!==a){if(null!==o){var s=o.next;o.next=a.next,a.next=s}r.baseQueue=o=a,n.pending=null}if(null!==o){a=o.next,r=r.baseState;var c=s=null,l=null,u=a;do{var d=u.lane;if((fa&d)===d)null!==l&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var h={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};null===l?(c=l=h,s=r):l=l.next=h,ga.lanes|=d,Dc|=d}u=u.next}while(null!==u&&u!==a);null===l?s=r:l.next=c,sr(r,t.memoizedState)||(bs=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=l,n.lastRenderedState=r}if(null!==(e=n.interleaved)){o=e;do{a=o.lane,ga.lanes|=a,Dc|=a,o=o.next}while(o!==e)}else null===o&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Na(e){var t=Ia(),n=t.queue;if(null===n)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,a=t.memoizedState;if(null!==o){n.pending=null;var s=o=o.next;do{a=e(a,s.action),s=s.next}while(s!==o);sr(a,t.memoizedState)||(bs=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function Oa(){}function Pa(e,t){var n=ga,r=Ia(),o=t(),a=!sr(r.memoizedState,o);if(a&&(r.memoizedState=o,bs=!0),r=r.queue,za(La.bind(null,n,r,e),[e]),r.getSnapshot!==t||a||null!==va&&1&va.memoizedState.tag){if(n.flags|=2048,Ha(9,Ma.bind(null,n,r,o,t),void 0,null),null===Nc)throw Error(i(349));0!==(30&fa)||xa(n,t,o)}return o}function xa(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=ga.updateQueue)?(t={lastEffect:null,stores:null},ga.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Ma(e,t,n,r){t.value=n,t.getSnapshot=r,qa(t)&&Da(e)}function La(e,t,n){return n((function(){qa(t)&&Da(e)}))}function qa(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!sr(e,n)}catch(r){return!0}}function Da(e){var t=Ni(e,1);null!==t&&rl(t,e,1,-1)}function Ua(e){var t=Aa();return"function"===typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ra,lastRenderedState:e},t.queue=e,e=e.dispatch=ns.bind(null,ga,e),[t.memoizedState,e]}function Ha(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=ga.updateQueue)?(t={lastEffect:null,stores:null},ga.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Fa(){return Ia().memoizedState}function Ba(e,t,n,r){var o=Aa();ga.flags|=e,o.memoizedState=Ha(1|t,n,void 0,void 0===r?null:r)}function Ka(e,t,n,r){var o=Ia();r=void 0===r?null:r;var i=void 0;if(null!==ma){var a=ma.memoizedState;if(i=a.destroy,null!==r&&Sa(r,a.deps))return void(o.memoizedState=Ha(t,n,i,r))}ga.flags|=e,o.memoizedState=Ha(1|t,n,i,r)}function ja(e,t){return Ba(8390656,8,e,t)}function za(e,t){return Ka(2048,8,e,t)}function Wa(e,t){return Ka(4,2,e,t)}function Ga(e,t){return Ka(4,4,e,t)}function Va(e,t){return"function"===typeof t?(e=e(),t(e),function(){t(null)}):null!==t&&void 0!==t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Qa(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,Ka(4,4,Va.bind(null,t,e),n)}function Za(){}function Ya(e,t){var n=Ia();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Sa(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ja(e,t){var n=Ia();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Sa(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function $a(e,t,n){return 0===(21&fa)?(e.baseState&&(e.baseState=!1,bs=!0),e.memoizedState=n):(sr(n,t)||(n=gt(),ga.lanes|=n,Dc|=n,e.baseState=!0),t)}function Xa(e,t){var n=Ct;Ct=0!==n&&4>n?n:4,e(!0);var r=pa.transition;pa.transition={};try{e(!1),t()}finally{Ct=n,pa.transition=r}}function es(){return Ia().memoizedState}function ts(e,t,n){var r=nl(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},rs(e))os(t,n);else if(null!==(n=_i(e,t,n,r))){rl(n,e,r,tl()),is(n,t,r)}}function ns(e,t,n){var r=nl(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(rs(e))os(t,o);else{var i=e.alternate;if(0===e.lanes&&(null===i||0===i.lanes)&&null!==(i=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=i(a,n);if(o.hasEagerState=!0,o.eagerState=s,sr(s,a)){var c=t.interleaved;return null===c?(o.next=o,Ri(t)):(o.next=c.next,c.next=o),void(t.interleaved=o)}}catch(l){}null!==(n=_i(e,t,o,r))&&(rl(n,e,r,o=tl()),is(n,t,r))}}function rs(e){var t=e.alternate;return e===ga||null!==t&&t===ga}function os(e,t){Ca=ya=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function is(e,t,n){if(0!==(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,yt(e,n)}}var as={readContext:Ai,useCallback:Ta,useContext:Ta,useEffect:Ta,useImperativeHandle:Ta,useInsertionEffect:Ta,useLayoutEffect:Ta,useMemo:Ta,useReducer:Ta,useRef:Ta,useState:Ta,useDebugValue:Ta,useDeferredValue:Ta,useTransition:Ta,useMutableSource:Ta,useSyncExternalStore:Ta,useId:Ta,unstable_isNewReconciler:!1},ss={readContext:Ai,useCallback:function(e,t){return Aa().memoizedState=[e,void 0===t?null:t],e},useContext:Ai,useEffect:ja,useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,Ba(4194308,4,Va.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ba(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ba(4,2,e,t)},useMemo:function(e,t){var n=Aa();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Aa();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=ts.bind(null,ga,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Aa().memoizedState=e},useState:Ua,useDebugValue:Za,useDeferredValue:function(e){return Aa().memoizedState=e},useTransition:function(){var e=Ua(!1),t=e[0];return e=Xa.bind(null,e[1]),Aa().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ga,o=Aa();if(ii){if(void 0===n)throw Error(i(407));n=n()}else{if(n=t(),null===Nc)throw Error(i(349));0!==(30&fa)||xa(r,t,n)}o.memoizedState=n;var a={value:n,getSnapshot:t};return o.queue=a,ja(La.bind(null,r,a,e),[e]),r.flags|=2048,Ha(9,Ma.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=Aa(),t=Nc.identifierPrefix;if(ii){var n=$o;t=":"+t+"R"+(n=(Jo&~(1<<32-at(Jo)-1)).toString(32)+n),0<(n=ba++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=wa++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},cs={readContext:Ai,useCallback:Ya,useContext:Ai,useEffect:za,useImperativeHandle:Qa,useInsertionEffect:Wa,useLayoutEffect:Ga,useMemo:Ja,useReducer:_a,useRef:Fa,useState:function(){return _a(Ra)},useDebugValue:Za,useDeferredValue:function(e){return $a(Ia(),ma.memoizedState,e)},useTransition:function(){return[_a(Ra)[0],Ia().memoizedState]},useMutableSource:Oa,useSyncExternalStore:Pa,useId:es,unstable_isNewReconciler:!1},ls={readContext:Ai,useCallback:Ya,useContext:Ai,useEffect:za,useImperativeHandle:Qa,useInsertionEffect:Wa,useLayoutEffect:Ga,useMemo:Ja,useReducer:Na,useRef:Fa,useState:function(){return Na(Ra)},useDebugValue:Za,useDeferredValue:function(e){var t=Ia();return null===ma?t.memoizedState=e:$a(t,ma.memoizedState,e)},useTransition:function(){return[Na(Ra)[0],Ia().memoizedState]},useMutableSource:Oa,useSyncExternalStore:Pa,useId:es,unstable_isNewReconciler:!1};function us(e,t){try{var n="",r=t;do{n+=B(r),r=r.return}while(r);var o=n}catch(i){o="\nError generating stack: "+i.message+"\n"+i.stack}return{value:e,source:t,stack:o,digest:null}}function ds(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function hs(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}var ps="function"===typeof WeakMap?WeakMap:Map;function fs(e,t,n){(n=Mi(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Wc||(Wc=!0,Gc=r),hs(0,t)},n}function gs(e,t,n){(n=Mi(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"===typeof r){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){hs(0,t)}}var i=e.stateNode;return null!==i&&"function"===typeof i.componentDidCatch&&(n.callback=function(){hs(0,t),"function"!==typeof r&&(null===Vc?Vc=new Set([this]):Vc.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function ms(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new ps;var o=new Set;r.set(t,o)}else void 0===(o=r.get(t))&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=Al.bind(null,e,t,n),t.then(e,e))}function vs(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function ys(e,t,n,r,o){return 0===(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Mi(-1,1)).tag=2,Li(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var Cs=b.ReactCurrentOwner,bs=!1;function ws(e,t,n,r){t.child=null===e?$i(t,null,n,r):Ji(t,e.child,n,r)}function Ts(e,t,n,r,o){n=n.render;var i=t.ref;return Ei(t,o),r=ka(e,t,n,r,i,o),n=Ea(),null===e||bs?(ii&&n&&ti(t),t.flags|=1,ws(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Ws(e,t,o))}function Ss(e,t,n,r,o){if(null===e){var i=n.type;return"function"!==typeof i||xl(i)||void 0!==i.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Ll(n.type,null,r,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=i,ks(e,t,i,r,o))}if(i=e.child,0===(e.lanes&o)){var a=i.memoizedProps;if((n=null!==(n=n.compare)?n:cr)(a,r)&&e.ref===t.ref)return Ws(e,t,o)}return t.flags|=1,(e=Ml(i,r)).ref=t.ref,e.return=t,t.child=e}function ks(e,t,n,r,o){if(null!==e){var i=e.memoizedProps;if(cr(i,r)&&e.ref===t.ref){if(bs=!1,t.pendingProps=r=i,0===(e.lanes&o))return t.lanes=e.lanes,Ws(e,t,o);0!==(131072&e.flags)&&(bs=!0)}}return Is(e,t,n,r,o)}function Es(e,t,n){var r=t.pendingProps,o=r.children,i=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0===(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Io(Mc,xc),xc|=n;else{if(0===(1073741824&n))return e=null!==i?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Io(Mc,xc),xc|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==i?i.baseLanes:n,Io(Mc,xc),xc|=r}else null!==i?(r=i.baseLanes|n,t.memoizedState=null):r=n,Io(Mc,xc),xc|=r;return ws(e,t,o,n),t.child}function As(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Is(e,t,n,r,o){var i=xo(n)?Oo:_o.current;return i=Po(t,i),Ei(t,o),n=ka(e,t,n,r,i,o),r=Ea(),null===e||bs?(ii&&r&&ti(t),t.flags|=1,ws(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Ws(e,t,o))}function Rs(e,t,n,r,o){if(xo(n)){var i=!0;Do(t)}else i=!1;if(Ei(t,o),null===t.stateNode)zs(e,t),zi(t,n,r),Gi(t,n,r,o),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var c=a.context,l=n.contextType;"object"===typeof l&&null!==l?l=Ai(l):l=Po(t,l=xo(n)?Oo:_o.current);var u=n.getDerivedStateFromProps,d="function"===typeof u||"function"===typeof a.getSnapshotBeforeUpdate;d||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==r||c!==l)&&Wi(t,a,r,l),Oi=!1;var h=t.memoizedState;a.state=h,Ui(t,r,a,o),c=t.memoizedState,s!==r||h!==c||No.current||Oi?("function"===typeof u&&(Bi(t,n,u,r),c=t.memoizedState),(s=Oi||ji(t,n,s,r,h,c,l))?(d||"function"!==typeof a.UNSAFE_componentWillMount&&"function"!==typeof a.componentWillMount||("function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"===typeof a.componentDidMount&&(t.flags|=4194308)):("function"===typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),a.props=r,a.state=c,a.context=l,r=s):("function"===typeof a.componentDidMount&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,xi(e,t),s=t.memoizedProps,l=t.type===t.elementType?s:vi(t.type,s),a.props=l,d=t.pendingProps,h=a.context,"object"===typeof(c=n.contextType)&&null!==c?c=Ai(c):c=Po(t,c=xo(n)?Oo:_o.current);var p=n.getDerivedStateFromProps;(u="function"===typeof p||"function"===typeof a.getSnapshotBeforeUpdate)||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==d||h!==c)&&Wi(t,a,r,c),Oi=!1,h=t.memoizedState,a.state=h,Ui(t,r,a,o);var f=t.memoizedState;s!==d||h!==f||No.current||Oi?("function"===typeof p&&(Bi(t,n,p,r),f=t.memoizedState),(l=Oi||ji(t,n,l,r,h,f,c)||!1)?(u||"function"!==typeof a.UNSAFE_componentWillUpdate&&"function"!==typeof a.componentWillUpdate||("function"===typeof a.componentWillUpdate&&a.componentWillUpdate(r,f,c),"function"===typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,f,c)),"function"===typeof a.componentDidUpdate&&(t.flags|=4),"function"===typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=f),a.props=r,a.state=f,a.context=c,r=l):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return _s(e,t,n,r,i,o)}function _s(e,t,n,r,o,i){As(e,t);var a=0!==(128&t.flags);if(!r&&!a)return o&&Uo(t,n,!1),Ws(e,t,i);r=t.stateNode,Cs.current=t;var s=a&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=Ji(t,e.child,null,i),t.child=Ji(t,null,s,i)):ws(e,t,s,i),t.memoizedState=r.state,o&&Uo(t,n,!0),t.child}function Ns(e){var t=e.stateNode;t.pendingContext?Lo(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Lo(0,t.context,!1),oa(e,t.containerInfo)}function Os(e,t,n,r,o){return fi(),gi(o),t.flags|=256,ws(e,t,n,r),t.child}var Ps,xs,Ms,Ls,qs={dehydrated:null,treeContext:null,retryLane:0};function Ds(e){return{baseLanes:e,cachePool:null,transitions:null}}function Us(e,t,n){var r,o=t.pendingProps,a=ca.current,s=!1,c=0!==(128&t.flags);if((r=c)||(r=(null===e||null!==e.memoizedState)&&0!==(2&a)),r?(s=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(a|=1),Io(ca,1&a),null===e)return ui(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0===(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(c=o.children,e=o.fallback,s?(o=t.mode,s=t.child,c={mode:"hidden",children:c},0===(1&o)&&null!==s?(s.childLanes=0,s.pendingProps=c):s=Dl(c,o,0,null),e=ql(e,o,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Ds(n),t.memoizedState=qs,e):Hs(t,c));if(null!==(a=e.memoizedState)&&null!==(r=a.dehydrated))return function(e,t,n,r,o,a,s){if(n)return 256&t.flags?(t.flags&=-257,Fs(e,t,s,r=ds(Error(i(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(a=r.fallback,o=t.mode,r=Dl({mode:"visible",children:r.children},o,0,null),(a=ql(a,o,s,null)).flags|=2,r.return=t,a.return=t,r.sibling=a,t.child=r,0!==(1&t.mode)&&Ji(t,e.child,null,s),t.child.memoizedState=Ds(s),t.memoizedState=qs,a);if(0===(1&t.mode))return Fs(e,t,s,null);if("$!"===o.data){if(r=o.nextSibling&&o.nextSibling.dataset)var c=r.dgst;return r=c,Fs(e,t,s,r=ds(a=Error(i(419)),r,void 0))}if(c=0!==(s&e.childLanes),bs||c){if(null!==(r=Nc)){switch(s&-s){case 4:o=2;break;case 16:o=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}0!==(o=0!==(o&(r.suspendedLanes|s))?0:o)&&o!==a.retryLane&&(a.retryLane=o,Ni(e,o),rl(r,e,o,-1))}return ml(),Fs(e,t,s,r=ds(Error(i(421))))}return"$?"===o.data?(t.flags|=128,t.child=e.child,t=Rl.bind(null,e),o._reactRetry=t,null):(e=a.treeContext,oi=lo(o.nextSibling),ri=t,ii=!0,ai=null,null!==e&&(Qo[Zo++]=Jo,Qo[Zo++]=$o,Qo[Zo++]=Yo,Jo=e.id,$o=e.overflow,Yo=t),t=Hs(t,r.children),t.flags|=4096,t)}(e,t,c,o,r,a,n);if(s){s=o.fallback,c=t.mode,r=(a=e.child).sibling;var l={mode:"hidden",children:o.children};return 0===(1&c)&&t.child!==a?((o=t.child).childLanes=0,o.pendingProps=l,t.deletions=null):(o=Ml(a,l)).subtreeFlags=14680064&a.subtreeFlags,null!==r?s=Ml(r,s):(s=ql(s,c,n,null)).flags|=2,s.return=t,o.return=t,o.sibling=s,t.child=o,o=s,s=t.child,c=null===(c=e.child.memoizedState)?Ds(n):{baseLanes:c.baseLanes|n,cachePool:null,transitions:c.transitions},s.memoizedState=c,s.childLanes=e.childLanes&~n,t.memoizedState=qs,o}return e=(s=e.child).sibling,o=Ml(s,{mode:"visible",children:o.children}),0===(1&t.mode)&&(o.lanes=n),o.return=t,o.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=o,t.memoizedState=null,o}function Hs(e,t){return(t=Dl({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Fs(e,t,n,r){return null!==r&&gi(r),Ji(t,e.child,null,n),(e=Hs(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Bs(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),ki(e.return,t,n)}function Ks(e,t,n,r,o){var i=e.memoizedState;null===i?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function js(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(ws(e,t,r.children,n),0!==(2&(r=ca.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!==(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Bs(e,n,t);else if(19===e.tag)Bs(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Io(ca,r),0===(1&t.mode))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===la(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Ks(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===la(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Ks(t,!0,n,null,i);break;case"together":Ks(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function zs(e,t){0===(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ws(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Dc|=t.lanes,0===(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(i(153));if(null!==t.child){for(n=Ml(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Ml(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Gs(e,t){if(!ii)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Vs(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=14680064&o.subtreeFlags,r|=14680064&o.flags,o.return=e,o=o.sibling;else for(o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Qs(e,t,n){var r=t.pendingProps;switch(ni(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Vs(t),null;case 1:case 17:return xo(t.type)&&Mo(),Vs(t),null;case 3:return r=t.stateNode,ia(),Ao(No),Ao(_o),da(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(hi(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0===(256&t.flags)||(t.flags|=1024,null!==ai&&(sl(ai),ai=null))),xs(e,t),Vs(t),null;case 5:sa(t);var o=ra(na.current);if(n=t.type,null!==e&&null!=t.stateNode)Ms(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(i(166));return Vs(t),null}if(e=ra(ea.current),hi(t)){r=t.stateNode,n=t.type;var a=t.memoizedProps;switch(r[po]=t,r[fo]=a,e=0!==(1&t.mode),n){case"dialog":Hr("cancel",r),Hr("close",r);break;case"iframe":case"object":case"embed":Hr("load",r);break;case"video":case"audio":for(o=0;o<Lr.length;o++)Hr(Lr[o],r);break;case"source":Hr("error",r);break;case"img":case"image":case"link":Hr("error",r),Hr("load",r);break;case"details":Hr("toggle",r);break;case"input":Y(r,a),Hr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},Hr("invalid",r);break;case"textarea":oe(r,a),Hr("invalid",r)}for(var c in ye(n,a),o=null,a)if(a.hasOwnProperty(c)){var l=a[c];"children"===c?"string"===typeof l?r.textContent!==l&&(!0!==a.suppressHydrationWarning&&$r(r.textContent,l,e),o=["children",l]):"number"===typeof l&&r.textContent!==""+l&&(!0!==a.suppressHydrationWarning&&$r(r.textContent,l,e),o=["children",""+l]):s.hasOwnProperty(c)&&null!=l&&"onScroll"===c&&Hr("scroll",r)}switch(n){case"input":G(r),X(r,a,!0);break;case"textarea":G(r),ae(r);break;case"select":case"option":break;default:"function"===typeof a.onClick&&(r.onclick=Xr)}r=o,t.updateQueue=r,null!==r&&(t.flags|=4)}else{c=9===o.nodeType?o:o.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=se(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=c.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"===typeof r.is?e=c.createElement(n,{is:r.is}):(e=c.createElement(n),"select"===n&&(c=e,r.multiple?c.multiple=!0:r.size&&(c.size=r.size))):e=c.createElementNS(e,n),e[po]=t,e[fo]=r,Ps(e,t,!1,!1),t.stateNode=e;e:{switch(c=Ce(n,r),n){case"dialog":Hr("cancel",e),Hr("close",e),o=r;break;case"iframe":case"object":case"embed":Hr("load",e),o=r;break;case"video":case"audio":for(o=0;o<Lr.length;o++)Hr(Lr[o],e);o=r;break;case"source":Hr("error",e),o=r;break;case"img":case"image":case"link":Hr("error",e),Hr("load",e),o=r;break;case"details":Hr("toggle",e),o=r;break;case"input":Y(e,r),o=Z(e,r),Hr("invalid",e);break;case"option":default:o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=D({},r,{value:void 0}),Hr("invalid",e);break;case"textarea":oe(e,r),o=re(e,r),Hr("invalid",e)}for(a in ye(n,o),l=o)if(l.hasOwnProperty(a)){var u=l[a];"style"===a?me(e,u):"dangerouslySetInnerHTML"===a?null!=(u=u?u.__html:void 0)&&de(e,u):"children"===a?"string"===typeof u?("textarea"!==n||""!==u)&&he(e,u):"number"===typeof u&&he(e,""+u):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(s.hasOwnProperty(a)?null!=u&&"onScroll"===a&&Hr("scroll",e):null!=u&&C(e,a,u,c))}switch(n){case"input":G(e),X(e,r,!1);break;case"textarea":G(e),ae(e);break;case"option":null!=r.value&&e.setAttribute("value",""+z(r.value));break;case"select":e.multiple=!!r.multiple,null!=(a=r.value)?ne(e,!!r.multiple,a,!1):null!=r.defaultValue&&ne(e,!!r.multiple,r.defaultValue,!0);break;default:"function"===typeof o.onClick&&(e.onclick=Xr)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Vs(t),null;case 6:if(e&&null!=t.stateNode)Ls(e,t,e.memoizedProps,r);else{if("string"!==typeof r&&null===t.stateNode)throw Error(i(166));if(n=ra(na.current),ra(ea.current),hi(t)){if(r=t.stateNode,n=t.memoizedProps,r[po]=t,(a=r.nodeValue!==n)&&null!==(e=ri))switch(e.tag){case 3:$r(r.nodeValue,n,0!==(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&$r(r.nodeValue,n,0!==(1&e.mode))}a&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[po]=t,t.stateNode=r}return Vs(t),null;case 13:if(Ao(ca),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(ii&&null!==oi&&0!==(1&t.mode)&&0===(128&t.flags))pi(),fi(),t.flags|=98560,a=!1;else if(a=hi(t),null!==r&&null!==r.dehydrated){if(null===e){if(!a)throw Error(i(318));if(!(a=null!==(a=t.memoizedState)?a.dehydrated:null))throw Error(i(317));a[po]=t}else fi(),0===(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Vs(t),a=!1}else null!==ai&&(sl(ai),ai=null),a=!0;if(!a)return 65536&t.flags?t:null}return 0!==(128&t.flags)?(t.lanes=n,t):((r=null!==r)!==(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,0!==(1&t.mode)&&(null===e||0!==(1&ca.current)?0===Lc&&(Lc=3):ml())),null!==t.updateQueue&&(t.flags|=4),Vs(t),null);case 4:return ia(),xs(e,t),null===e&&Kr(t.stateNode.containerInfo),Vs(t),null;case 10:return Si(t.type._context),Vs(t),null;case 19:if(Ao(ca),null===(a=t.memoizedState))return Vs(t),null;if(r=0!==(128&t.flags),null===(c=a.rendering))if(r)Gs(a,!1);else{if(0!==Lc||null!==e&&0!==(128&e.flags))for(e=t.child;null!==e;){if(null!==(c=la(e))){for(t.flags|=128,Gs(a,!1),null!==(r=c.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(a=n).flags&=14680066,null===(c=a.alternate)?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=c.childLanes,a.lanes=c.lanes,a.child=c.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=c.memoizedProps,a.memoizedState=c.memoizedState,a.updateQueue=c.updateQueue,a.type=c.type,e=c.dependencies,a.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Io(ca,1&ca.current|2),t.child}e=e.sibling}null!==a.tail&&Je()>jc&&(t.flags|=128,r=!0,Gs(a,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=la(c))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Gs(a,!0),null===a.tail&&"hidden"===a.tailMode&&!c.alternate&&!ii)return Vs(t),null}else 2*Je()-a.renderingStartTime>jc&&1073741824!==n&&(t.flags|=128,r=!0,Gs(a,!1),t.lanes=4194304);a.isBackwards?(c.sibling=t.child,t.child=c):(null!==(n=a.last)?n.sibling=c:t.child=c,a.last=c)}return null!==a.tail?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Je(),t.sibling=null,n=ca.current,Io(ca,r?1&n|2:1&n),t):(Vs(t),null);case 22:case 23:return hl(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!==(1&t.mode)?0!==(1073741824&xc)&&(Vs(t),6&t.subtreeFlags&&(t.flags|=8192)):Vs(t),null;case 24:case 25:return null}throw Error(i(156,t.tag))}function Zs(e,t){switch(ni(t),t.tag){case 1:return xo(t.type)&&Mo(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return ia(),Ao(No),Ao(_o),da(),0!==(65536&(e=t.flags))&&0===(128&e)?(t.flags=-65537&e|128,t):null;case 5:return sa(t),null;case 13:if(Ao(ca),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(i(340));fi()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Ao(ca),null;case 4:return ia(),null;case 10:return Si(t.type._context),null;case 22:case 23:return hl(),null;default:return null}}Ps=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},xs=function(){},Ms=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,ra(ea.current);var i,a=null;switch(n){case"input":o=Z(e,o),r=Z(e,r),a=[];break;case"select":o=D({},o,{value:void 0}),r=D({},r,{value:void 0}),a=[];break;case"textarea":o=re(e,o),r=re(e,r),a=[];break;default:"function"!==typeof o.onClick&&"function"===typeof r.onClick&&(e.onclick=Xr)}for(u in ye(n,r),n=null,o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&null!=o[u])if("style"===u){var c=o[u];for(i in c)c.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else"dangerouslySetInnerHTML"!==u&&"children"!==u&&"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(s.hasOwnProperty(u)?a||(a=[]):(a=a||[]).push(u,null));for(u in r){var l=r[u];if(c=null!=o?o[u]:void 0,r.hasOwnProperty(u)&&l!==c&&(null!=l||null!=c))if("style"===u)if(c){for(i in c)!c.hasOwnProperty(i)||l&&l.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in l)l.hasOwnProperty(i)&&c[i]!==l[i]&&(n||(n={}),n[i]=l[i])}else n||(a||(a=[]),a.push(u,n)),n=l;else"dangerouslySetInnerHTML"===u?(l=l?l.__html:void 0,c=c?c.__html:void 0,null!=l&&c!==l&&(a=a||[]).push(u,l)):"children"===u?"string"!==typeof l&&"number"!==typeof l||(a=a||[]).push(u,""+l):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&(s.hasOwnProperty(u)?(null!=l&&"onScroll"===u&&Hr("scroll",e),a||c===l||(a=[])):(a=a||[]).push(u,l))}n&&(a=a||[]).push("style",n);var u=a;(t.updateQueue=u)&&(t.flags|=4)}},Ls=function(e,t,n,r){n!==r&&(t.flags|=4)};var Ys=!1,Js=!1,$s="function"===typeof WeakSet?WeakSet:Set,Xs=null;function ec(e,t){var n=e.ref;if(null!==n)if("function"===typeof n)try{n(null)}catch(r){El(e,t,r)}else n.current=null}function tc(e,t,n){try{n()}catch(r){El(e,t,r)}}var nc=!1;function rc(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,void 0!==i&&tc(t,n,i)}o=o.next}while(o!==r)}}function oc(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ic(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"===typeof t?t(e):t.current=e}}function ac(e){var t=e.alternate;null!==t&&(e.alternate=null,ac(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[po],delete t[fo],delete t[mo],delete t[vo],delete t[yo])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function sc(e){return 5===e.tag||3===e.tag||4===e.tag}function cc(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||sc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function lc(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=Xr));else if(4!==r&&null!==(e=e.child))for(lc(e,t,n),e=e.sibling;null!==e;)lc(e,t,n),e=e.sibling}function uc(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(uc(e,t,n),e=e.sibling;null!==e;)uc(e,t,n),e=e.sibling}var dc=null,hc=!1;function pc(e,t,n){for(n=n.child;null!==n;)fc(e,t,n),n=n.sibling}function fc(e,t,n){if(it&&"function"===typeof it.onCommitFiberUnmount)try{it.onCommitFiberUnmount(ot,n)}catch(s){}switch(n.tag){case 5:Js||ec(n,t);case 6:var r=dc,o=hc;dc=null,pc(e,t,n),hc=o,null!==(dc=r)&&(hc?(e=dc,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):dc.removeChild(n.stateNode));break;case 18:null!==dc&&(hc?(e=dc,n=n.stateNode,8===e.nodeType?co(e.parentNode,n):1===e.nodeType&&co(e,n),Kt(e)):co(dc,n.stateNode));break;case 4:r=dc,o=hc,dc=n.stateNode.containerInfo,hc=!0,pc(e,t,n),dc=r,hc=o;break;case 0:case 11:case 14:case 15:if(!Js&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){o=r=r.next;do{var i=o,a=i.destroy;i=i.tag,void 0!==a&&(0!==(2&i)||0!==(4&i))&&tc(n,t,a),o=o.next}while(o!==r)}pc(e,t,n);break;case 1:if(!Js&&(ec(n,t),"function"===typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){El(n,t,s)}pc(e,t,n);break;case 21:pc(e,t,n);break;case 22:1&n.mode?(Js=(r=Js)||null!==n.memoizedState,pc(e,t,n),Js=r):pc(e,t,n);break;default:pc(e,t,n)}}function gc(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new $s),t.forEach((function(t){var r=_l.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function mc(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var o=n[r];try{var a=e,s=t,c=s;e:for(;null!==c;){switch(c.tag){case 5:dc=c.stateNode,hc=!1;break e;case 3:case 4:dc=c.stateNode.containerInfo,hc=!0;break e}c=c.return}if(null===dc)throw Error(i(160));fc(a,s,o),dc=null,hc=!1;var l=o.alternate;null!==l&&(l.return=null),o.return=null}catch(u){El(o,t,u)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)vc(t,e),t=t.sibling}function vc(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(mc(t,e),yc(e),4&r){try{rc(3,e,e.return),oc(3,e)}catch(m){El(e,e.return,m)}try{rc(5,e,e.return)}catch(m){El(e,e.return,m)}}break;case 1:mc(t,e),yc(e),512&r&&null!==n&&ec(n,n.return);break;case 5:if(mc(t,e),yc(e),512&r&&null!==n&&ec(n,n.return),32&e.flags){var o=e.stateNode;try{he(o,"")}catch(m){El(e,e.return,m)}}if(4&r&&null!=(o=e.stateNode)){var a=e.memoizedProps,s=null!==n?n.memoizedProps:a,c=e.type,l=e.updateQueue;if(e.updateQueue=null,null!==l)try{"input"===c&&"radio"===a.type&&null!=a.name&&J(o,a),Ce(c,s);var u=Ce(c,a);for(s=0;s<l.length;s+=2){var d=l[s],h=l[s+1];"style"===d?me(o,h):"dangerouslySetInnerHTML"===d?de(o,h):"children"===d?he(o,h):C(o,d,h,u)}switch(c){case"input":$(o,a);break;case"textarea":ie(o,a);break;case"select":var p=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!a.multiple;var f=a.value;null!=f?ne(o,!!a.multiple,f,!1):p!==!!a.multiple&&(null!=a.defaultValue?ne(o,!!a.multiple,a.defaultValue,!0):ne(o,!!a.multiple,a.multiple?[]:"",!1))}o[fo]=a}catch(m){El(e,e.return,m)}}break;case 6:if(mc(t,e),yc(e),4&r){if(null===e.stateNode)throw Error(i(162));o=e.stateNode,a=e.memoizedProps;try{o.nodeValue=a}catch(m){El(e,e.return,m)}}break;case 3:if(mc(t,e),yc(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Kt(t.containerInfo)}catch(m){El(e,e.return,m)}break;case 4:default:mc(t,e),yc(e);break;case 13:mc(t,e),yc(e),8192&(o=e.child).flags&&(a=null!==o.memoizedState,o.stateNode.isHidden=a,!a||null!==o.alternate&&null!==o.alternate.memoizedState||(Kc=Je())),4&r&&gc(e);break;case 22:if(d=null!==n&&null!==n.memoizedState,1&e.mode?(Js=(u=Js)||d,mc(t,e),Js=u):mc(t,e),yc(e),8192&r){if(u=null!==e.memoizedState,(e.stateNode.isHidden=u)&&!d&&0!==(1&e.mode))for(Xs=e,d=e.child;null!==d;){for(h=Xs=d;null!==Xs;){switch(f=(p=Xs).child,p.tag){case 0:case 11:case 14:case 15:rc(4,p,p.return);break;case 1:ec(p,p.return);var g=p.stateNode;if("function"===typeof g.componentWillUnmount){r=p,n=p.return;try{t=r,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(m){El(r,n,m)}}break;case 5:ec(p,p.return);break;case 22:if(null!==p.memoizedState){Tc(h);continue}}null!==f?(f.return=p,Xs=f):Tc(h)}d=d.sibling}e:for(d=null,h=e;;){if(5===h.tag){if(null===d){d=h;try{o=h.stateNode,u?"function"===typeof(a=o.style).setProperty?a.setProperty("display","none","important"):a.display="none":(c=h.stateNode,s=void 0!==(l=h.memoizedProps.style)&&null!==l&&l.hasOwnProperty("display")?l.display:null,c.style.display=ge("display",s))}catch(m){El(e,e.return,m)}}}else if(6===h.tag){if(null===d)try{h.stateNode.nodeValue=u?"":h.memoizedProps}catch(m){El(e,e.return,m)}}else if((22!==h.tag&&23!==h.tag||null===h.memoizedState||h===e)&&null!==h.child){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;null===h.sibling;){if(null===h.return||h.return===e)break e;d===h&&(d=null),h=h.return}d===h&&(d=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:mc(t,e),yc(e),4&r&&gc(e);case 21:}}function yc(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(sc(n)){var r=n;break e}n=n.return}throw Error(i(160))}switch(r.tag){case 5:var o=r.stateNode;32&r.flags&&(he(o,""),r.flags&=-33),uc(e,cc(e),o);break;case 3:case 4:var a=r.stateNode.containerInfo;lc(e,cc(e),a);break;default:throw Error(i(161))}}catch(s){El(e,e.return,s)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function Cc(e,t,n){Xs=e,bc(e,t,n)}function bc(e,t,n){for(var r=0!==(1&e.mode);null!==Xs;){var o=Xs,i=o.child;if(22===o.tag&&r){var a=null!==o.memoizedState||Ys;if(!a){var s=o.alternate,c=null!==s&&null!==s.memoizedState||Js;s=Ys;var l=Js;if(Ys=a,(Js=c)&&!l)for(Xs=o;null!==Xs;)c=(a=Xs).child,22===a.tag&&null!==a.memoizedState?Sc(o):null!==c?(c.return=a,Xs=c):Sc(o);for(;null!==i;)Xs=i,bc(i,t,n),i=i.sibling;Xs=o,Ys=s,Js=l}wc(e)}else 0!==(8772&o.subtreeFlags)&&null!==i?(i.return=o,Xs=i):wc(e)}}function wc(e){for(;null!==Xs;){var t=Xs;if(0!==(8772&t.flags)){var n=t.alternate;try{if(0!==(8772&t.flags))switch(t.tag){case 0:case 11:case 15:Js||oc(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!Js)if(null===n)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:vi(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;null!==a&&Hi(t,a,r);break;case 3:var s=t.updateQueue;if(null!==s){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}Hi(t,s,n)}break;case 5:var c=t.stateNode;if(null===n&&4&t.flags){n=c;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var u=t.alternate;if(null!==u){var d=u.memoizedState;if(null!==d){var h=d.dehydrated;null!==h&&Kt(h)}}}break;default:throw Error(i(163))}Js||512&t.flags&&ic(t)}catch(p){El(t,t.return,p)}}if(t===e){Xs=null;break}if(null!==(n=t.sibling)){n.return=t.return,Xs=n;break}Xs=t.return}}function Tc(e){for(;null!==Xs;){var t=Xs;if(t===e){Xs=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Xs=n;break}Xs=t.return}}function Sc(e){for(;null!==Xs;){var t=Xs;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{oc(4,t)}catch(c){El(t,n,c)}break;case 1:var r=t.stateNode;if("function"===typeof r.componentDidMount){var o=t.return;try{r.componentDidMount()}catch(c){El(t,o,c)}}var i=t.return;try{ic(t)}catch(c){El(t,i,c)}break;case 5:var a=t.return;try{ic(t)}catch(c){El(t,a,c)}}}catch(c){El(t,t.return,c)}if(t===e){Xs=null;break}var s=t.sibling;if(null!==s){s.return=t.return,Xs=s;break}Xs=t.return}}var kc,Ec=Math.ceil,Ac=b.ReactCurrentDispatcher,Ic=b.ReactCurrentOwner,Rc=b.ReactCurrentBatchConfig,_c=0,Nc=null,Oc=null,Pc=0,xc=0,Mc=Eo(0),Lc=0,qc=null,Dc=0,Uc=0,Hc=0,Fc=null,Bc=null,Kc=0,jc=1/0,zc=null,Wc=!1,Gc=null,Vc=null,Qc=!1,Zc=null,Yc=0,Jc=0,$c=null,Xc=-1,el=0;function tl(){return 0!==(6&_c)?Je():-1!==Xc?Xc:Xc=Je()}function nl(e){return 0===(1&e.mode)?1:0!==(2&_c)&&0!==Pc?Pc&-Pc:null!==mi.transition?(0===el&&(el=gt()),el):0!==(e=Ct)?e:e=void 0===(e=window.event)?16:Yt(e.type)}function rl(e,t,n,r){if(50<Jc)throw Jc=0,$c=null,Error(i(185));vt(e,n,r),0!==(2&_c)&&e===Nc||(e===Nc&&(0===(2&_c)&&(Uc|=n),4===Lc&&cl(e,Pc)),ol(e,r),1===n&&0===_c&&0===(1&t.mode)&&(jc=Je()+500,Fo&&jo()))}function ol(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var a=31-at(i),s=1<<a,c=o[a];-1===c?0!==(s&n)&&0===(s&r)||(o[a]=pt(s,t)):c<=t&&(e.expiredLanes|=s),i&=~s}}(e,t);var r=ht(e,e===Nc?Pc:0);if(0===r)null!==n&&Qe(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Qe(n),1===t)0===e.tag?function(e){Fo=!0,Ko(e)}(ll.bind(null,e)):Ko(ll.bind(null,e)),ao((function(){0===(6&_c)&&jo()})),n=null;else{switch(bt(r)){case 1:n=Xe;break;case 4:n=et;break;case 16:default:n=tt;break;case 536870912:n=rt}n=Nl(n,il.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function il(e,t){if(Xc=-1,el=0,0!==(6&_c))throw Error(i(327));var n=e.callbackNode;if(Sl()&&e.callbackNode!==n)return null;var r=ht(e,e===Nc?Pc:0);if(0===r)return null;if(0!==(30&r)||0!==(r&e.expiredLanes)||t)t=vl(e,r);else{t=r;var o=_c;_c|=2;var a=gl();for(Nc===e&&Pc===t||(zc=null,jc=Je()+500,pl(e,t));;)try{Cl();break}catch(c){fl(e,c)}Ti(),Ac.current=a,_c=o,null!==Oc?t=0:(Nc=null,Pc=0,t=Lc)}if(0!==t){if(2===t&&(0!==(o=ft(e))&&(r=o,t=al(e,o))),1===t)throw n=qc,pl(e,0),cl(e,r),ol(e,Je()),n;if(6===t)cl(e,r);else{if(o=e.current.alternate,0===(30&r)&&!function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var o=n[r],i=o.getSnapshot;o=o.value;try{if(!sr(i(),o))return!1}catch(s){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(o)&&(2===(t=vl(e,r))&&(0!==(a=ft(e))&&(r=a,t=al(e,a))),1===t))throw n=qc,pl(e,0),cl(e,r),ol(e,Je()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(i(345));case 2:case 5:Tl(e,Bc,zc);break;case 3:if(cl(e,r),(130023424&r)===r&&10<(t=Kc+500-Je())){if(0!==ht(e,0))break;if(((o=e.suspendedLanes)&r)!==r){tl(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=ro(Tl.bind(null,e,Bc,zc),t);break}Tl(e,Bc,zc);break;case 4:if(cl(e,r),(4194240&r)===r)break;for(t=e.eventTimes,o=-1;0<r;){var s=31-at(r);a=1<<s,(s=t[s])>o&&(o=s),r&=~a}if(r=o,10<(r=(120>(r=Je()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Ec(r/1960))-r)){e.timeoutHandle=ro(Tl.bind(null,e,Bc,zc),r);break}Tl(e,Bc,zc);break;default:throw Error(i(329))}}}return ol(e,Je()),e.callbackNode===n?il.bind(null,e):null}function al(e,t){var n=Fc;return e.current.memoizedState.isDehydrated&&(pl(e,t).flags|=256),2!==(e=vl(e,t))&&(t=Bc,Bc=n,null!==t&&sl(t)),e}function sl(e){null===Bc?Bc=e:Bc.push.apply(Bc,e)}function cl(e,t){for(t&=~Hc,t&=~Uc,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-at(t),r=1<<n;e[n]=-1,t&=~r}}function ll(e){if(0!==(6&_c))throw Error(i(327));Sl();var t=ht(e,0);if(0===(1&t))return ol(e,Je()),null;var n=vl(e,t);if(0!==e.tag&&2===n){var r=ft(e);0!==r&&(t=r,n=al(e,r))}if(1===n)throw n=qc,pl(e,0),cl(e,t),ol(e,Je()),n;if(6===n)throw Error(i(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Tl(e,Bc,zc),ol(e,Je()),null}function ul(e,t){var n=_c;_c|=1;try{return e(t)}finally{0===(_c=n)&&(jc=Je()+500,Fo&&jo())}}function dl(e){null!==Zc&&0===Zc.tag&&0===(6&_c)&&Sl();var t=_c;_c|=1;var n=Rc.transition,r=Ct;try{if(Rc.transition=null,Ct=1,e)return e()}finally{Ct=r,Rc.transition=n,0===(6&(_c=t))&&jo()}}function hl(){xc=Mc.current,Ao(Mc)}function pl(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,oo(n)),null!==Oc)for(n=Oc.return;null!==n;){var r=n;switch(ni(r),r.tag){case 1:null!==(r=r.type.childContextTypes)&&void 0!==r&&Mo();break;case 3:ia(),Ao(No),Ao(_o),da();break;case 5:sa(r);break;case 4:ia();break;case 13:case 19:Ao(ca);break;case 10:Si(r.type._context);break;case 22:case 23:hl()}n=n.return}if(Nc=e,Oc=e=Ml(e.current,null),Pc=xc=t,Lc=0,qc=null,Hc=Uc=Dc=0,Bc=Fc=null,null!==Ii){for(t=0;t<Ii.length;t++)if(null!==(r=(n=Ii[t]).interleaved)){n.interleaved=null;var o=r.next,i=n.pending;if(null!==i){var a=i.next;i.next=o,r.next=a}n.pending=r}Ii=null}return e}function fl(e,t){for(;;){var n=Oc;try{if(Ti(),ha.current=as,ya){for(var r=ga.memoizedState;null!==r;){var o=r.queue;null!==o&&(o.pending=null),r=r.next}ya=!1}if(fa=0,va=ma=ga=null,Ca=!1,ba=0,Ic.current=null,null===n||null===n.return){Lc=1,qc=t,Oc=null;break}e:{var a=e,s=n.return,c=n,l=t;if(t=Pc,c.flags|=32768,null!==l&&"object"===typeof l&&"function"===typeof l.then){var u=l,d=c,h=d.tag;if(0===(1&d.mode)&&(0===h||11===h||15===h)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var f=vs(s);if(null!==f){f.flags&=-257,ys(f,s,c,0,t),1&f.mode&&ms(a,u,t),l=u;var g=(t=f).updateQueue;if(null===g){var m=new Set;m.add(l),t.updateQueue=m}else g.add(l);break e}if(0===(1&t)){ms(a,u,t),ml();break e}l=Error(i(426))}else if(ii&&1&c.mode){var v=vs(s);if(null!==v){0===(65536&v.flags)&&(v.flags|=256),ys(v,s,c,0,t),gi(us(l,c));break e}}a=l=us(l,c),4!==Lc&&(Lc=2),null===Fc?Fc=[a]:Fc.push(a),a=s;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t,Di(a,fs(0,l,t));break e;case 1:c=l;var y=a.type,C=a.stateNode;if(0===(128&a.flags)&&("function"===typeof y.getDerivedStateFromError||null!==C&&"function"===typeof C.componentDidCatch&&(null===Vc||!Vc.has(C)))){a.flags|=65536,t&=-t,a.lanes|=t,Di(a,gs(a,c,t));break e}}a=a.return}while(null!==a)}wl(n)}catch(b){t=b,Oc===n&&null!==n&&(Oc=n=n.return);continue}break}}function gl(){var e=Ac.current;return Ac.current=as,null===e?as:e}function ml(){0!==Lc&&3!==Lc&&2!==Lc||(Lc=4),null===Nc||0===(268435455&Dc)&&0===(268435455&Uc)||cl(Nc,Pc)}function vl(e,t){var n=_c;_c|=2;var r=gl();for(Nc===e&&Pc===t||(zc=null,pl(e,t));;)try{yl();break}catch(o){fl(e,o)}if(Ti(),_c=n,Ac.current=r,null!==Oc)throw Error(i(261));return Nc=null,Pc=0,Lc}function yl(){for(;null!==Oc;)bl(Oc)}function Cl(){for(;null!==Oc&&!Ze();)bl(Oc)}function bl(e){var t=kc(e.alternate,e,xc);e.memoizedProps=e.pendingProps,null===t?wl(e):Oc=t,Ic.current=null}function wl(e){var t=e;do{var n=t.alternate;if(e=t.return,0===(32768&t.flags)){if(null!==(n=Qs(n,t,xc)))return void(Oc=n)}else{if(null!==(n=Zs(n,t)))return n.flags&=32767,void(Oc=n);if(null===e)return Lc=6,void(Oc=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(Oc=t);Oc=t=e}while(null!==t);0===Lc&&(Lc=5)}function Tl(e,t,n){var r=Ct,o=Rc.transition;try{Rc.transition=null,Ct=1,function(e,t,n,r){do{Sl()}while(null!==Zc);if(0!==(6&_c))throw Error(i(327));n=e.finishedWork;var o=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(i(177));e.callbackNode=null,e.callbackPriority=0;var a=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-at(n),i=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~i}}(e,a),e===Nc&&(Oc=Nc=null,Pc=0),0===(2064&n.subtreeFlags)&&0===(2064&n.flags)||Qc||(Qc=!0,Nl(tt,(function(){return Sl(),null}))),a=0!==(15990&n.flags),0!==(15990&n.subtreeFlags)||a){a=Rc.transition,Rc.transition=null;var s=Ct;Ct=1;var c=_c;_c|=4,Ic.current=null,function(e,t){if(eo=zt,pr(e=hr())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var o=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch(w){n=null;break e}var s=0,c=-1,l=-1,u=0,d=0,h=e,p=null;t:for(;;){for(var f;h!==n||0!==o&&3!==h.nodeType||(c=s+o),h!==a||0!==r&&3!==h.nodeType||(l=s+r),3===h.nodeType&&(s+=h.nodeValue.length),null!==(f=h.firstChild);)p=h,h=f;for(;;){if(h===e)break t;if(p===n&&++u===o&&(c=s),p===a&&++d===r&&(l=s),null!==(f=h.nextSibling))break;p=(h=p).parentNode}h=f}n=-1===c||-1===l?null:{start:c,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(to={focusedElem:e,selectionRange:n},zt=!1,Xs=t;null!==Xs;)if(e=(t=Xs).child,0!==(1028&t.subtreeFlags)&&null!==e)e.return=t,Xs=e;else for(;null!==Xs;){t=Xs;try{var g=t.alternate;if(0!==(1024&t.flags))switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==g){var m=g.memoizedProps,v=g.memoizedState,y=t.stateNode,C=y.getSnapshotBeforeUpdate(t.elementType===t.type?m:vi(t.type,m),v);y.__reactInternalSnapshotBeforeUpdate=C}break;case 3:var b=t.stateNode.containerInfo;1===b.nodeType?b.textContent="":9===b.nodeType&&b.documentElement&&b.removeChild(b.documentElement);break;default:throw Error(i(163))}}catch(w){El(t,t.return,w)}if(null!==(e=t.sibling)){e.return=t.return,Xs=e;break}Xs=t.return}g=nc,nc=!1}(e,n),vc(n,e),fr(to),zt=!!eo,to=eo=null,e.current=n,Cc(n,e,o),Ye(),_c=c,Ct=s,Rc.transition=a}else e.current=n;if(Qc&&(Qc=!1,Zc=e,Yc=o),a=e.pendingLanes,0===a&&(Vc=null),function(e){if(it&&"function"===typeof it.onCommitFiberRoot)try{it.onCommitFiberRoot(ot,e,void 0,128===(128&e.current.flags))}catch(t){}}(n.stateNode),ol(e,Je()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(Wc)throw Wc=!1,e=Gc,Gc=null,e;0!==(1&Yc)&&0!==e.tag&&Sl(),a=e.pendingLanes,0!==(1&a)?e===$c?Jc++:(Jc=0,$c=e):Jc=0,jo()}(e,t,n,r)}finally{Rc.transition=o,Ct=r}return null}function Sl(){if(null!==Zc){var e=bt(Yc),t=Rc.transition,n=Ct;try{if(Rc.transition=null,Ct=16>e?16:e,null===Zc)var r=!1;else{if(e=Zc,Zc=null,Yc=0,0!==(6&_c))throw Error(i(331));var o=_c;for(_c|=4,Xs=e.current;null!==Xs;){var a=Xs,s=a.child;if(0!==(16&Xs.flags)){var c=a.deletions;if(null!==c){for(var l=0;l<c.length;l++){var u=c[l];for(Xs=u;null!==Xs;){var d=Xs;switch(d.tag){case 0:case 11:case 15:rc(8,d,a)}var h=d.child;if(null!==h)h.return=d,Xs=h;else for(;null!==Xs;){var p=(d=Xs).sibling,f=d.return;if(ac(d),d===u){Xs=null;break}if(null!==p){p.return=f,Xs=p;break}Xs=f}}}var g=a.alternate;if(null!==g){var m=g.child;if(null!==m){g.child=null;do{var v=m.sibling;m.sibling=null,m=v}while(null!==m)}}Xs=a}}if(0!==(2064&a.subtreeFlags)&&null!==s)s.return=a,Xs=s;else e:for(;null!==Xs;){if(0!==(2048&(a=Xs).flags))switch(a.tag){case 0:case 11:case 15:rc(9,a,a.return)}var y=a.sibling;if(null!==y){y.return=a.return,Xs=y;break e}Xs=a.return}}var C=e.current;for(Xs=C;null!==Xs;){var b=(s=Xs).child;if(0!==(2064&s.subtreeFlags)&&null!==b)b.return=s,Xs=b;else e:for(s=C;null!==Xs;){if(0!==(2048&(c=Xs).flags))try{switch(c.tag){case 0:case 11:case 15:oc(9,c)}}catch(T){El(c,c.return,T)}if(c===s){Xs=null;break e}var w=c.sibling;if(null!==w){w.return=c.return,Xs=w;break e}Xs=c.return}}if(_c=o,jo(),it&&"function"===typeof it.onPostCommitFiberRoot)try{it.onPostCommitFiberRoot(ot,e)}catch(T){}r=!0}return r}finally{Ct=n,Rc.transition=t}}return!1}function kl(e,t,n){e=Li(e,t=fs(0,t=us(n,t),1),1),t=tl(),null!==e&&(vt(e,1,t),ol(e,t))}function El(e,t,n){if(3===e.tag)kl(e,e,n);else for(;null!==t;){if(3===t.tag){kl(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"===typeof t.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===Vc||!Vc.has(r))){t=Li(t,e=gs(t,e=us(n,e),1),1),e=tl(),null!==t&&(vt(t,1,e),ol(t,e));break}}t=t.return}}function Al(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=tl(),e.pingedLanes|=e.suspendedLanes&n,Nc===e&&(Pc&n)===n&&(4===Lc||3===Lc&&(130023424&Pc)===Pc&&500>Je()-Kc?pl(e,0):Hc|=n),ol(e,t)}function Il(e,t){0===t&&(0===(1&e.mode)?t=1:(t=ut,0===(130023424&(ut<<=1))&&(ut=4194304)));var n=tl();null!==(e=Ni(e,t))&&(vt(e,t,n),ol(e,n))}function Rl(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Il(e,n)}function _l(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;null!==o&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(i(314))}null!==r&&r.delete(t),Il(e,n)}function Nl(e,t){return Ve(e,t)}function Ol(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Pl(e,t,n,r){return new Ol(e,t,n,r)}function xl(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Ml(e,t){var n=e.alternate;return null===n?((n=Pl(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ll(e,t,n,r,o,a){var s=2;if(r=e,"function"===typeof e)xl(e)&&(s=1);else if("string"===typeof e)s=5;else e:switch(e){case S:return ql(n.children,o,a,t);case k:s=8,o|=8;break;case E:return(e=Pl(12,n,t,2|o)).elementType=E,e.lanes=a,e;case _:return(e=Pl(13,n,t,o)).elementType=_,e.lanes=a,e;case N:return(e=Pl(19,n,t,o)).elementType=N,e.lanes=a,e;case x:return Dl(n,o,a,t);default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case A:s=10;break e;case I:s=9;break e;case R:s=11;break e;case O:s=14;break e;case P:s=16,r=null;break e}throw Error(i(130,null==e?e:typeof e,""))}return(t=Pl(s,n,t,o)).elementType=e,t.type=r,t.lanes=a,t}function ql(e,t,n,r){return(e=Pl(7,e,r,t)).lanes=n,e}function Dl(e,t,n,r){return(e=Pl(22,e,r,t)).elementType=x,e.lanes=n,e.stateNode={isHidden:!1},e}function Ul(e,t,n){return(e=Pl(6,e,null,t)).lanes=n,e}function Hl(e,t,n){return(t=Pl(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Fl(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=mt(0),this.expirationTimes=mt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=mt(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Bl(e,t,n,r,o,i,a,s,c){return e=new Fl(e,t,n,s,c),1===t?(t=1,!0===i&&(t|=8)):t=0,i=Pl(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Pi(i),e}function Kl(e){if(!e)return Ro;e:{if(Ke(e=e._reactInternals)!==e||1!==e.tag)throw Error(i(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(xo(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(i(171))}if(1===e.tag){var n=e.type;if(xo(n))return qo(e,n,t)}return t}function jl(e,t,n,r,o,i,a,s,c){return(e=Bl(n,r,!0,e,0,i,0,s,c)).context=Kl(null),n=e.current,(i=Mi(r=tl(),o=nl(n))).callback=void 0!==t&&null!==t?t:null,Li(n,i,o),e.current.lanes=o,vt(e,o,r),ol(e,r),e}function zl(e,t,n,r){var o=t.current,i=tl(),a=nl(o);return n=Kl(n),null===t.context?t.context=n:t.pendingContext=n,(t=Mi(i,a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Li(o,t,a))&&(rl(e,o,a,i),qi(e,o,a)),a}function Wl(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Gl(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Vl(e,t){Gl(e,t),(e=e.alternate)&&Gl(e,t)}kc=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||No.current)bs=!0;else{if(0===(e.lanes&n)&&0===(128&t.flags))return bs=!1,function(e,t,n){switch(t.tag){case 3:Ns(t),fi();break;case 5:aa(t);break;case 1:xo(t.type)&&Do(t);break;case 4:oa(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;Io(yi,r._currentValue),r._currentValue=o;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Io(ca,1&ca.current),t.flags|=128,null):0!==(n&t.child.childLanes)?Us(e,t,n):(Io(ca,1&ca.current),null!==(e=Ws(e,t,n))?e.sibling:null);Io(ca,1&ca.current);break;case 19:if(r=0!==(n&t.childLanes),0!==(128&e.flags)){if(r)return js(e,t,n);t.flags|=128}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null,o.lastEffect=null),Io(ca,ca.current),r)break;return null;case 22:case 23:return t.lanes=0,Es(e,t,n)}return Ws(e,t,n)}(e,t,n);bs=0!==(131072&e.flags)}else bs=!1,ii&&0!==(1048576&t.flags)&&ei(t,Vo,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;zs(e,t),e=t.pendingProps;var o=Po(t,_o.current);Ei(t,n),o=ka(null,t,r,e,o,n);var a=Ea();return t.flags|=1,"object"===typeof o&&null!==o&&"function"===typeof o.render&&void 0===o.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,xo(r)?(a=!0,Do(t)):a=!1,t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,Pi(t),o.updater=Ki,t.stateNode=o,o._reactInternals=t,Gi(t,r,e,n),t=_s(null,t,r,!0,a,n)):(t.tag=0,ii&&a&&ti(t),ws(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(zs(e,t),e=t.pendingProps,r=(o=r._init)(r._payload),t.type=r,o=t.tag=function(e){if("function"===typeof e)return xl(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===R)return 11;if(e===O)return 14}return 2}(r),e=vi(r,e),o){case 0:t=Is(null,t,r,e,n);break e;case 1:t=Rs(null,t,r,e,n);break e;case 11:t=Ts(null,t,r,e,n);break e;case 14:t=Ss(null,t,r,vi(r.type,e),n);break e}throw Error(i(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,Is(e,t,r,o=t.elementType===r?o:vi(r,o),n);case 1:return r=t.type,o=t.pendingProps,Rs(e,t,r,o=t.elementType===r?o:vi(r,o),n);case 3:e:{if(Ns(t),null===e)throw Error(i(387));r=t.pendingProps,o=(a=t.memoizedState).element,xi(e,t),Ui(t,r,null,n);var s=t.memoizedState;if(r=s.element,a.isDehydrated){if(a={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=a,t.memoizedState=a,256&t.flags){t=Os(e,t,r,n,o=us(Error(i(423)),t));break e}if(r!==o){t=Os(e,t,r,n,o=us(Error(i(424)),t));break e}for(oi=lo(t.stateNode.containerInfo.firstChild),ri=t,ii=!0,ai=null,n=$i(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(fi(),r===o){t=Ws(e,t,n);break e}ws(e,t,r,n)}t=t.child}return t;case 5:return aa(t),null===e&&ui(t),r=t.type,o=t.pendingProps,a=null!==e?e.memoizedProps:null,s=o.children,no(r,o)?s=null:null!==a&&no(r,a)&&(t.flags|=32),As(e,t),ws(e,t,s,n),t.child;case 6:return null===e&&ui(t),null;case 13:return Us(e,t,n);case 4:return oa(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Ji(t,null,r,n):ws(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,Ts(e,t,r,o=t.elementType===r?o:vi(r,o),n);case 7:return ws(e,t,t.pendingProps,n),t.child;case 8:case 12:return ws(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,a=t.memoizedProps,s=o.value,Io(yi,r._currentValue),r._currentValue=s,null!==a)if(sr(a.value,s)){if(a.children===o.children&&!No.current){t=Ws(e,t,n);break e}}else for(null!==(a=t.child)&&(a.return=t);null!==a;){var c=a.dependencies;if(null!==c){s=a.child;for(var l=c.firstContext;null!==l;){if(l.context===r){if(1===a.tag){(l=Mi(-1,n&-n)).tag=2;var u=a.updateQueue;if(null!==u){var d=(u=u.shared).pending;null===d?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}a.lanes|=n,null!==(l=a.alternate)&&(l.lanes|=n),ki(a.return,n,t),c.lanes|=n;break}l=l.next}}else if(10===a.tag)s=a.type===t.type?null:a.child;else if(18===a.tag){if(null===(s=a.return))throw Error(i(341));s.lanes|=n,null!==(c=s.alternate)&&(c.lanes|=n),ki(s,n,t),s=a.sibling}else s=a.child;if(null!==s)s.return=a;else for(s=a;null!==s;){if(s===t){s=null;break}if(null!==(a=s.sibling)){a.return=s.return,s=a;break}s=s.return}a=s}ws(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Ei(t,n),r=r(o=Ai(o)),t.flags|=1,ws(e,t,r,n),t.child;case 14:return o=vi(r=t.type,t.pendingProps),Ss(e,t,r,o=vi(r.type,o),n);case 15:return ks(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:vi(r,o),zs(e,t),t.tag=1,xo(r)?(e=!0,Do(t)):e=!1,Ei(t,n),zi(t,r,o),Gi(t,r,o,n),_s(null,t,r,!0,e,n);case 19:return js(e,t,n);case 22:return Es(e,t,n)}throw Error(i(156,t.tag))};var Ql="function"===typeof reportError?reportError:function(e){console.error(e)};function Zl(e){this._internalRoot=e}function Yl(e){this._internalRoot=e}function Jl(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function $l(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Xl(){}function eu(e,t,n,r,o){var i=n._reactRootContainer;if(i){var a=i;if("function"===typeof o){var s=o;o=function(){var e=Wl(a);s.call(e)}}zl(t,a,e,o)}else a=function(e,t,n,r,o){if(o){if("function"===typeof r){var i=r;r=function(){var e=Wl(a);i.call(e)}}var a=jl(t,r,e,0,null,!1,0,"",Xl);return e._reactRootContainer=a,e[go]=a.current,Kr(8===e.nodeType?e.parentNode:e),dl(),a}for(;o=e.lastChild;)e.removeChild(o);if("function"===typeof r){var s=r;r=function(){var e=Wl(c);s.call(e)}}var c=Bl(e,0,!1,null,0,!1,0,"",Xl);return e._reactRootContainer=c,e[go]=c.current,Kr(8===e.nodeType?e.parentNode:e),dl((function(){zl(t,c,n,r)})),c}(n,t,e,o,r);return Wl(a)}Yl.prototype.render=Zl.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(i(409));zl(e,t,null,null)},Yl.prototype.unmount=Zl.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;dl((function(){zl(null,e,null,null)})),t[go]=null}},Yl.prototype.unstable_scheduleHydration=function(e){if(e){var t=kt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<xt.length&&0!==t&&t<xt[n].priority;n++);xt.splice(n,0,e),0===n&&Dt(e)}},wt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=dt(t.pendingLanes);0!==n&&(yt(t,1|n),ol(t,Je()),0===(6&_c)&&(jc=Je()+500,jo()))}break;case 13:dl((function(){var t=Ni(e,1);if(null!==t){var n=tl();rl(t,e,1,n)}})),Vl(e,1)}},Tt=function(e){if(13===e.tag){var t=Ni(e,134217728);if(null!==t)rl(t,e,134217728,tl());Vl(e,134217728)}},St=function(e){if(13===e.tag){var t=nl(e),n=Ni(e,t);if(null!==n)rl(n,e,t,tl());Vl(e,t)}},kt=function(){return Ct},Et=function(e,t){var n=Ct;try{return Ct=e,t()}finally{Ct=n}},Te=function(e,t,n){switch(t){case"input":if($(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=To(r);if(!o)throw Error(i(90));V(r),$(r,o)}}}break;case"textarea":ie(e,n);break;case"select":null!=(t=n.value)&&ne(e,!!n.multiple,t,!1)}},Re=ul,_e=dl;var tu={usingClientEntryPoint:!1,Events:[bo,wo,To,Ae,Ie,ul]},nu={findFiberByHostInstance:Co,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},ru={bundleType:nu.bundleType,version:nu.version,rendererPackageName:nu.rendererPackageName,rendererConfig:nu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:b.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=We(e))?null:e.stateNode},findFiberByHostInstance:nu.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var ou=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ou.isDisabled&&ou.supportsFiber)try{ot=ou.inject(ru),it=ou}catch(ue){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tu,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Jl(t))throw Error(i(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:T,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.createRoot=function(e,t){if(!Jl(e))throw Error(i(299));var n=!1,r="",o=Ql;return null!==t&&void 0!==t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(o=t.onRecoverableError)),t=Bl(e,1,!1,null,0,n,0,r,o),e[go]=t.current,Kr(8===e.nodeType?e.parentNode:e),new Zl(t)},t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"===typeof e.render)throw Error(i(188));throw e=Object.keys(e).join(","),Error(i(268,e))}return e=null===(e=We(t))?null:e.stateNode},t.flushSync=function(e){return dl(e)},t.hydrate=function(e,t,n){if(!$l(t))throw Error(i(200));return eu(null,e,t,!0,n)},t.hydrateRoot=function(e,t,n){if(!Jl(e))throw Error(i(405));var r=null!=n&&n.hydratedSources||null,o=!1,a="",s=Ql;if(null!==n&&void 0!==n&&(!0===n.unstable_strictMode&&(o=!0),void 0!==n.identifierPrefix&&(a=n.identifierPrefix),void 0!==n.onRecoverableError&&(s=n.onRecoverableError)),t=jl(t,null,e,1,null!=n?n:null,o,0,a,s),e[go]=t.current,Kr(e),r)for(e=0;e<r.length;e++)o=(o=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new Yl(t)},t.render=function(e,t,n){if(!$l(t))throw Error(i(200));return eu(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!$l(e))throw Error(i(40));return!!e._reactRootContainer&&(dl((function(){eu(null,null,e,!1,(function(){e._reactRootContainer=null,e[go]=null}))})),!0)},t.unstable_batchedUpdates=ul,t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!$l(n))throw Error(i(200));if(null==e||void 0===e._reactInternals)throw Error(i(38));return eu(e,t,n,!1,r)},t.version="18.2.0-next-9e3b772b8-20220608"},1250:(e,t,n)=>{"use strict";var r=n(4164);t.createRoot=r.createRoot,t.hydrateRoot=r.hydrateRoot},4164:(e,t,n)=>{"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(4463)},1087:(e,t,n)=>{"use strict";var r,o;n.d(t,{OL:()=>C,VK:()=>g,rU:()=>y});var i=n(2791),a=n(4164),s=n(7689),c=n(8278);function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l.apply(this,arguments)}function u(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const d=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],h=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"];const p=i.createContext({isTransitioning:!1});new Map;const f=(r||(r=n.t(i,2))).startTransition;(o||(o=n.t(a,2))).flushSync,(r||(r=n.t(i,2))).useId;function g(e){let{basename:t,children:n,future:r,window:o}=e,a=i.useRef();null==a.current&&(a.current=(0,c.lX)({window:o,v5Compat:!0}));let l=a.current,[u,d]=i.useState({action:l.action,location:l.location}),{v7_startTransition:h}=r||{},p=i.useCallback((e=>{h&&f?f((()=>d(e))):d(e)}),[d,h]);return i.useLayoutEffect((()=>l.listen(p)),[l,p]),i.createElement(s.F0,{basename:t,children:n,location:u.location,navigationType:u.action,navigator:l,future:r})}const m="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement,v=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,y=i.forwardRef((function(e,t){let n,{onClick:r,relative:o,reloadDocument:a,replace:h,state:p,target:f,to:g,preventScrollReset:y,unstable_viewTransition:C}=e,b=u(e,d),{basename:w}=i.useContext(s.Us),T=!1;if("string"===typeof g&&v.test(g)&&(n=g,m))try{let e=new URL(window.location.href),t=g.startsWith("//")?new URL(e.protocol+g):new URL(g),n=(0,c.Zn)(t.pathname,w);t.origin===e.origin&&null!=n?g=n+t.search+t.hash:T=!0}catch(E){}let S=(0,s.oQ)(g,{relative:o}),k=function(e,t){let{target:n,replace:r,state:o,preventScrollReset:a,relative:l,unstable_viewTransition:u}=void 0===t?{}:t,d=(0,s.s0)(),h=(0,s.TH)(),p=(0,s.WU)(e,{relative:l});return i.useCallback((t=>{if(function(e,t){return 0===e.button&&(!t||"_self"===t)&&!function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)}(t,n)){t.preventDefault();let n=void 0!==r?r:(0,c.Ep)(h)===(0,c.Ep)(p);d(e,{replace:n,state:o,preventScrollReset:a,relative:l,unstable_viewTransition:u})}}),[h,d,p,r,o,n,e,a,l,u])}(g,{replace:h,state:p,target:f,preventScrollReset:y,relative:o,unstable_viewTransition:C});return i.createElement("a",l({},b,{href:n||S,onClick:T||a?r:function(e){r&&r(e),e.defaultPrevented||k(e)},ref:t,target:f}))}));const C=i.forwardRef((function(e,t){let{"aria-current":n="page",caseSensitive:r=!1,className:o="",end:a=!1,style:d,to:f,unstable_viewTransition:g,children:m}=e,v=u(e,h),C=(0,s.WU)(f,{relative:v.relative}),w=(0,s.TH)(),S=i.useContext(s.FR),{navigator:k,basename:E}=i.useContext(s.Us),A=null!=S&&function(e,t){void 0===t&&(t={});let n=i.useContext(p);null==n&&(0,c.J0)(!1);let{basename:r}=T(b.useViewTransitionState),o=(0,s.WU)(e,{relative:t.relative});if(!n.isTransitioning)return!1;let a=(0,c.Zn)(n.currentLocation.pathname,r)||n.currentLocation.pathname,l=(0,c.Zn)(n.nextLocation.pathname,r)||n.nextLocation.pathname;return null!=(0,c.LX)(o.pathname,l)||null!=(0,c.LX)(o.pathname,a)}(C)&&!0===g,I=k.encodeLocation?k.encodeLocation(C).pathname:C.pathname,R=w.pathname,_=S&&S.navigation&&S.navigation.location?S.navigation.location.pathname:null;r||(R=R.toLowerCase(),_=_?_.toLowerCase():null,I=I.toLowerCase()),_&&E&&(_=(0,c.Zn)(_,E)||_);const N="/"!==I&&I.endsWith("/")?I.length-1:I.length;let O,P=R===I||!a&&R.startsWith(I)&&"/"===R.charAt(N),x=null!=_&&(_===I||!a&&_.startsWith(I)&&"/"===_.charAt(I.length)),M={isActive:P,isPending:x,isTransitioning:A},L=P?n:void 0;O="function"===typeof o?o(M):[o,P?"active":null,x?"pending":null,A?"transitioning":null].filter(Boolean).join(" ");let q="function"===typeof d?d(M):d;return i.createElement(y,l({},v,{"aria-current":L,className:O,ref:t,style:q,to:f,unstable_viewTransition:g}),"function"===typeof m?m(M):m)}));var b,w;function T(e){let t=i.useContext(s.w3);return t||(0,c.J0)(!1),t}(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(b||(b={})),function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(w||(w={}))},7689:(e,t,n)=>{"use strict";var r;n.d(t,{AW:()=>q,F0:()=>D,FR:()=>c,Fg:()=>M,TH:()=>g,UO:()=>b,Us:()=>l,WU:()=>w,Z5:()=>U,j3:()=>L,oQ:()=>p,pC:()=>C,s0:()=>v,w3:()=>s});var o=n(2791),i=n(8278);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}const s=o.createContext(null);const c=o.createContext(null);const l=o.createContext(null);const u=o.createContext(null);const d=o.createContext({outlet:null,matches:[],isDataRoute:!1});const h=o.createContext(null);function p(e,t){let{relative:n}=void 0===t?{}:t;f()||(0,i.J0)(!1);let{basename:r,navigator:a}=o.useContext(l),{hash:s,pathname:c,search:u}=w(e,{relative:n}),d=c;return"/"!==r&&(d="/"===c?r:(0,i.RQ)([r,c])),a.createHref({pathname:d,search:u,hash:s})}function f(){return null!=o.useContext(u)}function g(){return f()||(0,i.J0)(!1),o.useContext(u).location}function m(e){o.useContext(l).static||o.useLayoutEffect(e)}function v(){let{isDataRoute:e}=o.useContext(d);return e?function(){let{router:e}=N(R.UseNavigateStable),t=P(_.UseNavigateStable),n=o.useRef(!1);return m((()=>{n.current=!0})),o.useCallback((function(r,o){void 0===o&&(o={}),n.current&&("number"===typeof r?e.navigate(r):e.navigate(r,a({fromRouteId:t},o)))}),[e,t])}():function(){f()||(0,i.J0)(!1);let e=o.useContext(s),{basename:t,future:n,navigator:r}=o.useContext(l),{matches:a}=o.useContext(d),{pathname:c}=g(),u=JSON.stringify((0,i.cm)(a,n.v7_relativeSplatPath)),h=o.useRef(!1);return m((()=>{h.current=!0})),o.useCallback((function(n,o){if(void 0===o&&(o={}),!h.current)return;if("number"===typeof n)return void r.go(n);let a=(0,i.pC)(n,JSON.parse(u),c,"path"===o.relative);null==e&&"/"!==t&&(a.pathname="/"===a.pathname?t:(0,i.RQ)([t,a.pathname])),(o.replace?r.replace:r.push)(a,o.state,o)}),[t,r,u,c,e])}()}const y=o.createContext(null);function C(e){let t=o.useContext(d).outlet;return t?o.createElement(y.Provider,{value:e},t):t}function b(){let{matches:e}=o.useContext(d),t=e[e.length-1];return t?t.params:{}}function w(e,t){let{relative:n}=void 0===t?{}:t,{future:r}=o.useContext(l),{matches:a}=o.useContext(d),{pathname:s}=g(),c=JSON.stringify((0,i.cm)(a,r.v7_relativeSplatPath));return o.useMemo((()=>(0,i.pC)(e,JSON.parse(c),s,"path"===n)),[e,c,s,n])}function T(e,t,n,r){f()||(0,i.J0)(!1);let{navigator:s}=o.useContext(l),{matches:c}=o.useContext(d),h=c[c.length-1],p=h?h.params:{},m=(h&&h.pathname,h?h.pathnameBase:"/");h&&h.route;let v,y=g();if(t){var C;let e="string"===typeof t?(0,i.cP)(t):t;"/"===m||(null==(C=e.pathname)?void 0:C.startsWith(m))||(0,i.J0)(!1),v=e}else v=y;let b=v.pathname||"/",w="/"===m?b:b.slice(m.length)||"/",T=(0,i.fp)(e,{pathname:w});let S=I(T&&T.map((e=>Object.assign({},e,{params:Object.assign({},p,e.params),pathname:(0,i.RQ)([m,s.encodeLocation?s.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?m:(0,i.RQ)([m,s.encodeLocation?s.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),c,n,r);return t&&S?o.createElement(u.Provider,{value:{location:a({pathname:"/",search:"",hash:"",state:null,key:"default"},v),navigationType:i.aU.Pop}},S):S}function S(){let e=function(){var e;let t=o.useContext(h),n=O(_.UseRouteError),r=P(_.UseRouteError);if(void 0!==t)return t;return null==(e=n.errors)?void 0:e[r]}(),t=(0,i.WK)(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:r};return o.createElement(o.Fragment,null,o.createElement("h2",null,"Unexpected Application Error!"),o.createElement("h3",{style:{fontStyle:"italic"}},t),n?o.createElement("pre",{style:a},n):null,null)}const k=o.createElement(S,null);class E extends o.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?o.createElement(d.Provider,{value:this.props.routeContext},o.createElement(h.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function A(e){let{routeContext:t,match:n,children:r}=e,i=o.useContext(s);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),o.createElement(d.Provider,{value:t},r)}function I(e,t,n,r){var a;if(void 0===t&&(t=[]),void 0===n&&(n=null),void 0===r&&(r=null),null==e){var s;if(null==(s=n)||!s.errors)return null;e=n.matches}let c=e,l=null==(a=n)?void 0:a.errors;if(null!=l){let e=c.findIndex((e=>e.route.id&&(null==l?void 0:l[e.route.id])));e>=0||(0,i.J0)(!1),c=c.slice(0,Math.min(c.length,e+1))}let u=!1,d=-1;if(n&&r&&r.v7_partialHydration)for(let o=0;o<c.length;o++){let e=c[o];if((e.route.HydrateFallback||e.route.hydrateFallbackElement)&&(d=o),e.route.id){let{loaderData:t,errors:r}=n,o=e.route.loader&&void 0===t[e.route.id]&&(!r||void 0===r[e.route.id]);if(e.route.lazy||o){u=!0,c=d>=0?c.slice(0,d+1):[c[0]];break}}}return c.reduceRight(((e,r,i)=>{let a,s=!1,h=null,p=null;var f;n&&(a=l&&r.route.id?l[r.route.id]:void 0,h=r.route.errorElement||k,u&&(d<0&&0===i?(f="route-fallback",!1||x[f]||(x[f]=!0),s=!0,p=null):d===i&&(s=!0,p=r.route.hydrateFallbackElement||null)));let g=t.concat(c.slice(0,i+1)),m=()=>{let t;return t=a?h:s?p:r.route.Component?o.createElement(r.route.Component,null):r.route.element?r.route.element:e,o.createElement(A,{match:r,routeContext:{outlet:e,matches:g,isDataRoute:null!=n},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||0===i)?o.createElement(E,{location:n.location,revalidation:n.revalidation,component:h,error:a,children:m(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):m()}),null)}var R=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(R||{}),_=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(_||{});function N(e){let t=o.useContext(s);return t||(0,i.J0)(!1),t}function O(e){let t=o.useContext(c);return t||(0,i.J0)(!1),t}function P(e){let t=function(e){let t=o.useContext(d);return t||(0,i.J0)(!1),t}(),n=t.matches[t.matches.length-1];return n.route.id||(0,i.J0)(!1),n.route.id}const x={};(r||(r=n.t(o,2))).startTransition;function M(e){let{to:t,replace:n,state:r,relative:a}=e;f()||(0,i.J0)(!1);let{future:s,static:c}=o.useContext(l),{matches:u}=o.useContext(d),{pathname:h}=g(),p=v(),m=(0,i.pC)(t,(0,i.cm)(u,s.v7_relativeSplatPath),h,"path"===a),y=JSON.stringify(m);return o.useEffect((()=>p(JSON.parse(y),{replace:n,state:r,relative:a})),[p,y,a,n,r]),null}function L(e){return C(e.context)}function q(e){(0,i.J0)(!1)}function D(e){let{basename:t="/",children:n=null,location:r,navigationType:s=i.aU.Pop,navigator:c,static:d=!1,future:h}=e;f()&&(0,i.J0)(!1);let p=t.replace(/^\/*/,"/"),g=o.useMemo((()=>({basename:p,navigator:c,static:d,future:a({v7_relativeSplatPath:!1},h)})),[p,h,c,d]);"string"===typeof r&&(r=(0,i.cP)(r));let{pathname:m="/",search:v="",hash:y="",state:C=null,key:b="default"}=r,w=o.useMemo((()=>{let e=(0,i.Zn)(m,p);return null==e?null:{location:{pathname:e,search:v,hash:y,state:C,key:b},navigationType:s}}),[p,m,v,y,C,b,s]);return null==w?null:o.createElement(l.Provider,{value:g},o.createElement(u.Provider,{children:n,value:w}))}function U(e){let{children:t,location:n}=e;return T(H(t),n)}new Promise((()=>{}));o.Component;function H(e,t){void 0===t&&(t=[]);let n=[];return o.Children.forEach(e,((e,r)=>{if(!o.isValidElement(e))return;let a=[...t,r];if(e.type===o.Fragment)return void n.push.apply(n,H(e.props.children,a));e.type!==q&&(0,i.J0)(!1),e.props.index&&e.props.children&&(0,i.J0)(!1);let s={id:e.props.id||a.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(s.children=H(e.props.children,a)),n.push(s)})),n}},6374:(e,t,n)=>{"use strict";var r=n(2791),o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function l(e,t,n){var r,i={},l=null,u=null;for(r in void 0!==n&&(l=""+n),void 0!==t.key&&(l=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,r)&&!c.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:l,ref:u,props:i,_owner:s.current}}t.Fragment=i,t.jsx=l,t.jsxs=l},9117:(e,t)=>{"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),c=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.iterator;var f={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,m={};function v(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||f}function y(){}function C(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||f}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=v.prototype;var b=C.prototype=new y;b.constructor=C,g(b,v.prototype),b.isPureReactComponent=!0;var w=Array.isArray,T=Object.prototype.hasOwnProperty,S={current:null},k={key:!0,ref:!0,__self:!0,__source:!0};function E(e,t,r){var o,i={},a=null,s=null;if(null!=t)for(o in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)T.call(t,o)&&!k.hasOwnProperty(o)&&(i[o]=t[o]);var c=arguments.length-2;if(1===c)i.children=r;else if(1<c){for(var l=Array(c),u=0;u<c;u++)l[u]=arguments[u+2];i.children=l}if(e&&e.defaultProps)for(o in c=e.defaultProps)void 0===i[o]&&(i[o]=c[o]);return{$$typeof:n,type:e,key:a,ref:s,props:i,_owner:S.current}}function A(e){return"object"===typeof e&&null!==e&&e.$$typeof===n}var I=/\/+/g;function R(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function _(e,t,o,i,a){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var c=!1;if(null===e)c=!0;else switch(s){case"string":case"number":c=!0;break;case"object":switch(e.$$typeof){case n:case r:c=!0}}if(c)return a=a(c=e),e=""===i?"."+R(c,0):i,w(a)?(o="",null!=e&&(o=e.replace(I,"$&/")+"/"),_(a,t,o,"",(function(e){return e}))):null!=a&&(A(a)&&(a=function(e,t){return{$$typeof:n,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,o+(!a.key||c&&c.key===a.key?"":(""+a.key).replace(I,"$&/")+"/")+e)),t.push(a)),1;if(c=0,i=""===i?".":i+":",w(e))for(var l=0;l<e.length;l++){var u=i+R(s=e[l],l);c+=_(s,t,o,u,a)}else if(u=function(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=p&&e[p]||e["@@iterator"])?e:null}(e),"function"===typeof u)for(e=u.call(e),l=0;!(s=e.next()).done;)c+=_(s=s.value,t,o,u=i+R(s,l++),a);else if("object"===s)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return c}function N(e,t,n){if(null==e)return e;var r=[],o=0;return _(e,r,"","",(function(e){return t.call(n,e,o++)})),r}function O(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var P={current:null},x={transition:null},M={ReactCurrentDispatcher:P,ReactCurrentBatchConfig:x,ReactCurrentOwner:S};t.Children={map:N,forEach:function(e,t,n){N(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return N(e,(function(){t++})),t},toArray:function(e){return N(e,(function(e){return e}))||[]},only:function(e){if(!A(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=v,t.Fragment=o,t.Profiler=a,t.PureComponent=C,t.StrictMode=i,t.Suspense=u,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=M,t.cloneElement=function(e,t,r){if(null===e||void 0===e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var o=g({},e.props),i=e.key,a=e.ref,s=e._owner;if(null!=t){if(void 0!==t.ref&&(a=t.ref,s=S.current),void 0!==t.key&&(i=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(l in t)T.call(t,l)&&!k.hasOwnProperty(l)&&(o[l]=void 0===t[l]&&void 0!==c?c[l]:t[l])}var l=arguments.length-2;if(1===l)o.children=r;else if(1<l){c=Array(l);for(var u=0;u<l;u++)c[u]=arguments[u+2];o.children=c}return{$$typeof:n,type:e.type,key:i,ref:a,props:o,_owner:s}},t.createContext=function(e){return(e={$$typeof:c,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:s,_context:e},e.Consumer=e},t.createElement=E,t.createFactory=function(e){var t=E.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:l,render:e}},t.isValidElement=A,t.lazy=function(e){return{$$typeof:h,_payload:{_status:-1,_result:e},_init:O}},t.memo=function(e,t){return{$$typeof:d,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=x.transition;x.transition={};try{e()}finally{x.transition=t}},t.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},t.useCallback=function(e,t){return P.current.useCallback(e,t)},t.useContext=function(e){return P.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return P.current.useDeferredValue(e)},t.useEffect=function(e,t){return P.current.useEffect(e,t)},t.useId=function(){return P.current.useId()},t.useImperativeHandle=function(e,t,n){return P.current.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return P.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return P.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return P.current.useMemo(e,t)},t.useReducer=function(e,t,n){return P.current.useReducer(e,t,n)},t.useRef=function(e){return P.current.useRef(e)},t.useState=function(e){return P.current.useState(e)},t.useSyncExternalStore=function(e,t,n){return P.current.useSyncExternalStore(e,t,n)},t.useTransition=function(){return P.current.useTransition()},t.version="18.2.0"},2791:(e,t,n)=>{"use strict";e.exports=n(9117)},184:(e,t,n)=>{"use strict";e.exports=n(6374)},6813:(e,t)=>{"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(!(0<i(o,t)))break e;e[r]=t,e[n]=o,n=r}}function r(e){return 0===e.length?null:e[0]}function o(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length,a=o>>>1;r<a;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<o&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else{if(!(l<o&&0>i(u,n)))break e;e[r]=u,e[l]=n,r=l}}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"===typeof performance&&"function"===typeof performance.now){var a=performance;t.unstable_now=function(){return a.now()}}else{var s=Date,c=s.now();t.unstable_now=function(){return s.now()-c}}var l=[],u=[],d=1,h=null,p=3,f=!1,g=!1,m=!1,v="function"===typeof setTimeout?setTimeout:null,y="function"===typeof clearTimeout?clearTimeout:null,C="undefined"!==typeof setImmediate?setImmediate:null;function b(e){for(var t=r(u);null!==t;){if(null===t.callback)o(u);else{if(!(t.startTime<=e))break;o(u),t.sortIndex=t.expirationTime,n(l,t)}t=r(u)}}function w(e){if(m=!1,b(e),!g)if(null!==r(l))g=!0,x(T);else{var t=r(u);null!==t&&M(w,t.startTime-e)}}function T(e,n){g=!1,m&&(m=!1,y(A),A=-1),f=!0;var i=p;try{for(b(n),h=r(l);null!==h&&(!(h.expirationTime>n)||e&&!_());){var a=h.callback;if("function"===typeof a){h.callback=null,p=h.priorityLevel;var s=a(h.expirationTime<=n);n=t.unstable_now(),"function"===typeof s?h.callback=s:h===r(l)&&o(l),b(n)}else o(l);h=r(l)}if(null!==h)var c=!0;else{var d=r(u);null!==d&&M(w,d.startTime-n),c=!1}return c}finally{h=null,p=i,f=!1}}"undefined"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var S,k=!1,E=null,A=-1,I=5,R=-1;function _(){return!(t.unstable_now()-R<I)}function N(){if(null!==E){var e=t.unstable_now();R=e;var n=!0;try{n=E(!0,e)}finally{n?S():(k=!1,E=null)}}else k=!1}if("function"===typeof C)S=function(){C(N)};else if("undefined"!==typeof MessageChannel){var O=new MessageChannel,P=O.port2;O.port1.onmessage=N,S=function(){P.postMessage(null)}}else S=function(){v(N,0)};function x(e){E=e,k||(k=!0,S())}function M(e,n){A=v((function(){e(t.unstable_now())}),n)}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(e){e.callback=null},t.unstable_continueExecution=function(){g||f||(g=!0,x(T))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return p},t.unstable_getFirstCallbackNode=function(){return r(l)},t.unstable_next=function(e){switch(p){case 1:case 2:case 3:var t=3;break;default:t=p}var n=p;p=t;try{return e()}finally{p=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=p;p=e;try{return t()}finally{p=n}},t.unstable_scheduleCallback=function(e,o,i){var a=t.unstable_now();switch("object"===typeof i&&null!==i?i="number"===typeof(i=i.delay)&&0<i?a+i:a:i=a,e){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return e={id:d++,callback:o,priorityLevel:e,startTime:i,expirationTime:s=i+s,sortIndex:-1},i>a?(e.sortIndex=i,n(u,e),null===r(l)&&e===r(u)&&(m?(y(A),A=-1):m=!0,M(w,i-a))):(e.sortIndex=s,n(l,e),g||f||(g=!0,x(T))),e},t.unstable_shouldYield=_,t.unstable_wrapCallback=function(e){var t=p;return function(){var n=p;p=t;try{return e.apply(this,arguments)}finally{p=n}}}},5296:(e,t,n)=>{"use strict";e.exports=n(6813)},7399:e=>{e.exports={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}},7468:(e,t,n)=>{"use strict";function r(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}n.d(t,{Z:()=>r})},864:(e,t,n)=>{"use strict";function r(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}n.d(t,{Z:()=>r})},6033:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(3);function o(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,(0,r.Z)(t,e))}},3:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(7468);function o(e,t){return e.get((0,r.Z)(e,t))}},2346:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(864);function o(e,t,n){(0,r.Z)(e,t),t.set(e,n)}},3092:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(3);function o(e,t,n){return function(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}(e,(0,r.Z)(t,e),n),n}},3889:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(7468);function o(e,t,n){return(0,r.Z)(t,e),n}},101:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(864);function o(e,t){(0,r.Z)(e,t),t.add(e)}},2838:(e,t,n)=>{"use strict";n.d(t,{Z1:()=>s});var r=n(4430),o=n(4777);const i={[o.m4]:"Given storage configuration option was not supported.",[o.hJ]:"Stub instance of Public Client Application was called. If using msal-react, please ensure context is not used without a provider. For more visit: aka.ms/msaljs/browser-errors",[o.xC]:"Redirect cannot be supported. In-memory storage was selected and storeAuthStateInCookie=false, which would cause the library to be unable to handle the incoming hash. If you would like to use the redirect API, please use session/localStorage or set storeAuthStateInCookie=true."};o.m4,i[o.m4],o.hJ,i[o.hJ],o.xC,i[o.xC];class a extends r.l4{constructor(e,t){super(e,t),this.name="BrowserConfigurationAuthError",Object.setPrototypeOf(this,a.prototype)}}function s(e){return new a(e,i[e])}},4777:(e,t,n)=>{"use strict";n.d(t,{hJ:()=>o,m4:()=>r,xC:()=>i});const r="storage_not_supported",o="stubbed_public_client_application_called",i="in_mem_redirect_unavailable"},3057:(e,t,n)=>{"use strict";n.d(t,{t:()=>r});const r={INITIALIZE_START:"msal:initializeStart",INITIALIZE_END:"msal:initializeEnd",ACCOUNT_ADDED:"msal:accountAdded",ACCOUNT_REMOVED:"msal:accountRemoved",ACTIVE_ACCOUNT_CHANGED:"msal:activeAccountChanged",LOGIN_START:"msal:loginStart",LOGIN_SUCCESS:"msal:loginSuccess",LOGIN_FAILURE:"msal:loginFailure",ACQUIRE_TOKEN_START:"msal:acquireTokenStart",ACQUIRE_TOKEN_SUCCESS:"msal:acquireTokenSuccess",ACQUIRE_TOKEN_FAILURE:"msal:acquireTokenFailure",ACQUIRE_TOKEN_NETWORK_START:"msal:acquireTokenFromNetworkStart",SSO_SILENT_START:"msal:ssoSilentStart",SSO_SILENT_SUCCESS:"msal:ssoSilentSuccess",SSO_SILENT_FAILURE:"msal:ssoSilentFailure",ACQUIRE_TOKEN_BY_CODE_START:"msal:acquireTokenByCodeStart",ACQUIRE_TOKEN_BY_CODE_SUCCESS:"msal:acquireTokenByCodeSuccess",ACQUIRE_TOKEN_BY_CODE_FAILURE:"msal:acquireTokenByCodeFailure",HANDLE_REDIRECT_START:"msal:handleRedirectStart",HANDLE_REDIRECT_END:"msal:handleRedirectEnd",POPUP_OPENED:"msal:popupOpened",LOGOUT_START:"msal:logoutStart",LOGOUT_SUCCESS:"msal:logoutSuccess",LOGOUT_FAILURE:"msal:logoutFailure",LOGOUT_END:"msal:logoutEnd",RESTORE_FROM_BFCACHE:"msal:restoreFromBFCache"}},4190:(e,t,n)=>{"use strict";n.d(t,{$H:()=>f,BD:()=>i,Bs:()=>d,EC:()=>c,Gv:()=>b,H4:()=>y,Ix:()=>s,Ky:()=>a,Mm:()=>m,Oq:()=>u,PK:()=>k,WN:()=>h,bg:()=>S,c4:()=>l,kd:()=>C,lA:()=>v,lu:()=>w,qx:()=>o,s_:()=>p,se:()=>T,yo:()=>g});var r=n(825);const o={INTERACTION_IN_PROGRESS_VALUE:"interaction_in_progress",INVALID_GRANT_ERROR:"invalid_grant",POPUP_WIDTH:483,POPUP_HEIGHT:600,POPUP_NAME_PREFIX:"msal",DEFAULT_POLL_INTERVAL_MS:30,MSAL_SKU:"msal.js.browser"},i={CHANNEL_ID:"53ee284d-920a-4b59-9d30-a60315b26836",PREFERRED_EXTENSION_ID:"ppnbnpeolgkicgegkbkbjmhlideopiji",MATS_TELEMETRY:"MATS"},a={HandshakeRequest:"Handshake",HandshakeResponse:"HandshakeResponse",GetToken:"GetToken",Response:"Response"},s={LocalStorage:"localStorage",SessionStorage:"sessionStorage",MemoryStorage:"memoryStorage"},c={GET:"GET",POST:"POST"},l={AUTHORITY:"authority",ACQUIRE_TOKEN_ACCOUNT:"acquireToken.account",SESSION_STATE:"session.state",REQUEST_STATE:"request.state",NONCE_IDTOKEN:"nonce.id_token",ORIGIN_URI:"request.origin",RENEW_STATUS:"token.renew.status",URL_HASH:"urlHash",REQUEST_PARAMS:"request.params",SCOPES:"scopes",INTERACTION_STATUS_KEY:"interaction.status",CCS_CREDENTIAL:"ccs.credential",CORRELATION_ID:"request.correlationId",NATIVE_REQUEST:"request.native",REDIRECT_CONTEXT:"request.redirect.context",REDIRECT_REQUEST:"request.redirect",REQUEST_RETRY:"request.retry"},u={ACCOUNT_KEYS:"msal.account.keys",TOKEN_KEYS:"msal.token.keys"},d={WRAPPER_SKU:"wrapper.sku",WRAPPER_VER:"wrapper.version"},h={acquireTokenRedirect:861,acquireTokenPopup:862,ssoSilent:863,acquireTokenSilent_authCode:864,handleRedirectPromise:865,acquireTokenByCode:866,acquireTokenSilent_silentFlow:61,logout:961,logoutPopup:962};var p;!function(e){e.Redirect="redirect",e.Popup="popup",e.Silent="silent",e.None="none"}(p||(p={}));const f={Startup:"startup",Login:"login",Logout:"logout",AcquireToken:"acquireToken",SsoSilent:"ssoSilent",HandleRedirect:"handleRedirect",None:"none"},g={scopes:r.f_},m="jwk",v={React:"@azure/msal-react",Angular:"@azure/msal-angular"},y="msal.db",C=1,b="".concat(y,".keys"),w={Default:0,AccessToken:1,AccessTokenAndRefreshToken:2,RefreshToken:3,RefreshTokenAndNetwork:4,Skip:5},T=[w.Default,w.Skip,w.RefreshTokenAndNetwork],S="msal.browser.log.level",k="msal.browser.log.pii"},4430:(e,t,n)=>{"use strict";n.d(t,{MD:()=>s,l4:()=>a});var r=n(825),o=n(7093);const i={[o.g]:"Unexpected error in authentication.",[o.D]:"Post request failed from the network, could be a 4xx/5xx or a network unavailability. Please check the exact error code for details."};o.g,i[o.g],o.D,i[o.D];class a extends Error{constructor(e,t,n){super(t?"".concat(e,": ").concat(t):e),Object.setPrototypeOf(this,a.prototype),this.errorCode=e||r.gT.EMPTY_STRING,this.errorMessage=t||r.gT.EMPTY_STRING,this.subError=n||r.gT.EMPTY_STRING,this.name="AuthError"}setCorrelationId(e){this.correlationId=e}}function s(e,t){return new a(e,t?"".concat(i[e]," ").concat(t):i[e])}},7093:(e,t,n)=>{"use strict";n.d(t,{D:()=>o,g:()=>r});const r="unexpected_error",o="post_request_failed"},9684:(e,t,n)=>{"use strict";n.d(t,{Y:()=>i,i:()=>r});var r,o=n(825);!function(e){e[e.Error=0]="Error",e[e.Warning=1]="Warning",e[e.Info=2]="Info",e[e.Verbose=3]="Verbose",e[e.Trace=4]="Trace"}(r||(r={}));class i{constructor(e,t,n){this.level=r.Info;const a=e||i.createDefaultLoggerOptions();this.localCallback=a.loggerCallback||(()=>{}),this.piiLoggingEnabled=a.piiLoggingEnabled||!1,this.level="number"===typeof a.logLevel?a.logLevel:r.Info,this.correlationId=a.correlationId||o.gT.EMPTY_STRING,this.packageName=t||o.gT.EMPTY_STRING,this.packageVersion=n||o.gT.EMPTY_STRING}static createDefaultLoggerOptions(){return{loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:r.Info}}clone(e,t,n){return new i({loggerCallback:this.localCallback,piiLoggingEnabled:this.piiLoggingEnabled,logLevel:this.level,correlationId:n||this.correlationId},e,t)}logMessage(e,t){if(t.logLevel>this.level||!this.piiLoggingEnabled&&t.containsPii)return;const n=(new Date).toUTCString(),o="[".concat(n,"] : [").concat(t.correlationId||this.correlationId||"","]"),i="".concat(o," : ").concat(this.packageName,"@").concat(this.packageVersion," : ").concat(r[t.logLevel]," - ").concat(e);this.executeCallback(t.logLevel,i,t.containsPii||!1)}executeCallback(e,t,n){this.localCallback&&this.localCallback(e,t,n)}error(e,t){this.logMessage(e,{logLevel:r.Error,containsPii:!1,correlationId:t||o.gT.EMPTY_STRING})}errorPii(e,t){this.logMessage(e,{logLevel:r.Error,containsPii:!0,correlationId:t||o.gT.EMPTY_STRING})}warning(e,t){this.logMessage(e,{logLevel:r.Warning,containsPii:!1,correlationId:t||o.gT.EMPTY_STRING})}warningPii(e,t){this.logMessage(e,{logLevel:r.Warning,containsPii:!0,correlationId:t||o.gT.EMPTY_STRING})}info(e,t){this.logMessage(e,{logLevel:r.Info,containsPii:!1,correlationId:t||o.gT.EMPTY_STRING})}infoPii(e,t){this.logMessage(e,{logLevel:r.Info,containsPii:!0,correlationId:t||o.gT.EMPTY_STRING})}verbose(e,t){this.logMessage(e,{logLevel:r.Verbose,containsPii:!1,correlationId:t||o.gT.EMPTY_STRING})}verbosePii(e,t){this.logMessage(e,{logLevel:r.Verbose,containsPii:!0,correlationId:t||o.gT.EMPTY_STRING})}trace(e,t){this.logMessage(e,{logLevel:r.Trace,containsPii:!1,correlationId:t||o.gT.EMPTY_STRING})}tracePii(e,t){this.logMessage(e,{logLevel:r.Trace,containsPii:!0,correlationId:t||o.gT.EMPTY_STRING})}isPiiLoggingEnabled(){return this.piiLoggingEnabled||!1}}},825:(e,t,n)=>{"use strict";n.d(t,{$A:()=>M,$f:()=>a,As:()=>u,Bv:()=>v,D1:()=>I,Ge:()=>R,HN:()=>k,NJ:()=>d,Nb:()=>l,QU:()=>T,SZ:()=>s,To:()=>P,VX:()=>h,Vi:()=>c,W:()=>N,YY:()=>_,bb:()=>A,ch:()=>w,d3:()=>y,dg:()=>C,f_:()=>i,gT:()=>r,hO:()=>E,iR:()=>m,ki:()=>O,oj:()=>o,pQ:()=>S,qJ:()=>g,rg:()=>p,sR:()=>b,vw:()=>f,xd:()=>x});const r={LIBRARY_NAME:"MSAL.JS",SKU:"msal.js.common",CACHE_PREFIX:"msal",DEFAULT_AUTHORITY:"https://login.microsoftonline.com/common/",DEFAULT_AUTHORITY_HOST:"login.microsoftonline.com",DEFAULT_COMMON_TENANT:"common",ADFS:"adfs",DSTS:"dstsv2",AAD_INSTANCE_DISCOVERY_ENDPT:"https://login.microsoftonline.com/common/discovery/instance?api-version=1.1&authorization_endpoint=",CIAM_AUTH_URL:".ciamlogin.com",AAD_TENANT_DOMAIN_SUFFIX:".onmicrosoft.com",RESOURCE_DELIM:"|",NO_ACCOUNT:"NO_ACCOUNT",CLAIMS:"claims",CONSUMER_UTID:"9188040d-6c67-4c5b-b112-36a304b66dad",OPENID_SCOPE:"openid",PROFILE_SCOPE:"profile",OFFLINE_ACCESS_SCOPE:"offline_access",EMAIL_SCOPE:"email",CODE_RESPONSE_TYPE:"code",CODE_GRANT_TYPE:"authorization_code",RT_GRANT_TYPE:"refresh_token",FRAGMENT_RESPONSE_MODE:"fragment",S256_CODE_CHALLENGE_METHOD:"S256",URL_FORM_CONTENT_TYPE:"application/x-www-form-urlencoded;charset=utf-8",AUTHORIZATION_PENDING:"authorization_pending",NOT_DEFINED:"not_defined",EMPTY_STRING:"",NOT_APPLICABLE:"N/A",NOT_AVAILABLE:"Not Available",FORWARD_SLASH:"/",IMDS_ENDPOINT:"http://169.254.169.254/metadata/instance/compute/location",IMDS_VERSION:"2020-06-01",IMDS_TIMEOUT:2e3,AZURE_REGION_AUTO_DISCOVER_FLAG:"TryAutoDetect",REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX:"login.microsoft.com",KNOWN_PUBLIC_CLOUDS:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"],TOKEN_RESPONSE_TYPE:"token",ID_TOKEN_RESPONSE_TYPE:"id_token",SHR_NONCE_VALIDITY:240,INVALID_INSTANCE:"invalid_instance"},o={SUCCESS:200,SUCCESS_RANGE_START:200,SUCCESS_RANGE_END:299,REDIRECT:302,CLIENT_ERROR:400,CLIENT_ERROR_RANGE_START:400,BAD_REQUEST:400,UNAUTHORIZED:401,NOT_FOUND:404,REQUEST_TIMEOUT:408,TOO_MANY_REQUESTS:429,CLIENT_ERROR_RANGE_END:499,SERVER_ERROR:500,SERVER_ERROR_RANGE_START:500,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504,SERVER_ERROR_RANGE_END:599,MULTI_SIDED_ERROR:600},i=[r.OPENID_SCOPE,r.PROFILE_SCOPE,r.OFFLINE_ACCESS_SCOPE],a=[...i,r.EMAIL_SCOPE],s={CONTENT_TYPE:"Content-Type",RETRY_AFTER:"Retry-After",CCS_HEADER:"X-AnchorMailbox",WWWAuthenticate:"WWW-Authenticate",AuthenticationInfo:"Authentication-Info",X_MS_REQUEST_ID:"x-ms-request-id",X_MS_HTTP_VERSION:"x-ms-httpver"},c={ID_TOKEN:"idtoken",CLIENT_INFO:"client.info",ADAL_ID_TOKEN:"adal.idtoken",ERROR:"error",ERROR_DESC:"error.description",ACTIVE_ACCOUNT:"active-account",ACTIVE_ACCOUNT_FILTERS:"active-account-filters"},l={COMMON:"common",ORGANIZATIONS:"organizations",CONSUMERS:"consumers"},u={ACCESS_TOKEN:"access_token",XMS_CC:"xms_cc"},d={LOGIN:"login",SELECT_ACCOUNT:"select_account",CONSENT:"consent",NONE:"none",CREATE:"create",NO_SESSION:"no_session"},h={PLAIN:"plain",S256:"S256"},p={QUERY:"query",FRAGMENT:"fragment"},f={...p,FORM_POST:"form_post"},g={IMPLICIT_GRANT:"implicit",AUTHORIZATION_CODE_GRANT:"authorization_code",CLIENT_CREDENTIALS_GRANT:"client_credentials",RESOURCE_OWNER_PASSWORD_GRANT:"password",REFRESH_TOKEN_GRANT:"refresh_token",DEVICE_CODE_GRANT:"device_code",JWT_BEARER:"urn:ietf:params:oauth:grant-type:jwt-bearer"},m={MSSTS_ACCOUNT_TYPE:"MSSTS",ADFS_ACCOUNT_TYPE:"ADFS",MSAV1_ACCOUNT_TYPE:"MSA",GENERIC_ACCOUNT_TYPE:"Generic"},v={CACHE_KEY_SEPARATOR:"-",CLIENT_INFO_SEPARATOR:"."},y={ID_TOKEN:"IdToken",ACCESS_TOKEN:"AccessToken",ACCESS_TOKEN_WITH_AUTH_SCHEME:"AccessToken_With_AuthScheme",REFRESH_TOKEN:"RefreshToken"},C="appmetadata",b="client_info",w="1",T={CACHE_KEY:"authority-metadata",REFRESH_TIME_SECONDS:86400},S={CONFIG:"config",CACHE:"cache",NETWORK:"network",HARDCODED_VALUES:"hardcoded_values"},k={SCHEMA_VERSION:5,MAX_CUR_HEADER_BYTES:80,MAX_LAST_HEADER_BYTES:330,MAX_CACHED_ERRORS:50,CACHE_KEY:"server-telemetry",CATEGORY_SEPARATOR:"|",VALUE_SEPARATOR:",",OVERFLOW_TRUE:"1",OVERFLOW_FALSE:"0",UNKNOWN_ERROR:"unknown_error"},E={BEARER:"Bearer",POP:"pop",SSH:"ssh-cert"},A={DEFAULT_THROTTLE_TIME_SECONDS:60,DEFAULT_MAX_THROTTLE_TIME_SECONDS:3600,THROTTLING_PREFIX:"throttling",X_MS_LIB_CAPABILITY_VALUE:"retry-after, h429"},I={INVALID_GRANT_ERROR:"invalid_grant",CLIENT_MISMATCH_ERROR:"client_mismatch"},R={username:"username",password:"password"},_={httpSuccess:200,httpBadRequest:400},N={FAILED_AUTO_DETECTION:"1",INTERNAL_CACHE:"2",ENVIRONMENT_VARIABLE:"3",IMDS:"4"},O={CONFIGURED_MATCHES_DETECTED:"1",CONFIGURED_NO_AUTO_DETECTION:"2",CONFIGURED_NOT_DETECTED:"3",AUTO_DETECTION_REQUESTED_SUCCESSFUL:"4",AUTO_DETECTION_REQUESTED_FAILED:"5"},P={NOT_APPLICABLE:"0",FORCE_REFRESH_OR_CLAIMS:"1",NO_CACHED_ACCESS_TOKEN:"2",CACHED_ACCESS_TOKEN_EXPIRED:"3",PROACTIVELY_REFRESHED:"4"},x={Jwt:"JWT",Jwk:"JWK",Pop:"pop"},M=300},382:(e,t,n)=>{"use strict";n.d(t,{rL:()=>y,Fp:()=>C});var r=n(2791),o=n(2838),i=n(4777);const a={initialize:()=>Promise.reject((0,o.Z1)(i.hJ)),acquireTokenPopup:()=>Promise.reject((0,o.Z1)(i.hJ)),acquireTokenRedirect:()=>Promise.reject((0,o.Z1)(i.hJ)),acquireTokenSilent:()=>Promise.reject((0,o.Z1)(i.hJ)),acquireTokenByCode:()=>Promise.reject((0,o.Z1)(i.hJ)),getAllAccounts:()=>[],getAccount:()=>null,getAccountByHomeId:()=>null,getAccountByUsername:()=>null,getAccountByLocalId:()=>null,handleRedirectPromise:()=>Promise.reject((0,o.Z1)(i.hJ)),loginPopup:()=>Promise.reject((0,o.Z1)(i.hJ)),loginRedirect:()=>Promise.reject((0,o.Z1)(i.hJ)),logout:()=>Promise.reject((0,o.Z1)(i.hJ)),logoutRedirect:()=>Promise.reject((0,o.Z1)(i.hJ)),logoutPopup:()=>Promise.reject((0,o.Z1)(i.hJ)),ssoSilent:()=>Promise.reject((0,o.Z1)(i.hJ)),addEventCallback:()=>null,removeEventCallback:()=>{},addPerformanceCallback:()=>"",removePerformanceCallback:()=>!1,enableAccountStorageEvents:()=>{},disableAccountStorageEvents:()=>{},getTokenCache:()=>{throw(0,o.Z1)(i.hJ)},getLogger:()=>{throw(0,o.Z1)(i.hJ)},setLogger:()=>{},setActiveAccount:()=>{},getActiveAccount:()=>null,initializeWrapperLibrary:()=>{},setNavigationClient:()=>{},getConfiguration:()=>{throw(0,o.Z1)(i.hJ)},hydrateCache:()=>Promise.reject((0,o.Z1)(i.hJ)),clearCache:()=>Promise.reject((0,o.Z1)(i.hJ))};var s=n(4190),c=n(9684);const l={instance:a,inProgress:s.$H.None,accounts:[],logger:new c.Y({})},u=r.createContext(l);u.Consumer;var d=n(3057);class h{static getInteractionStatusFromEvent(e,t){switch(e.eventType){case d.t.LOGIN_START:return s.$H.Login;case d.t.SSO_SILENT_START:return s.$H.SsoSilent;case d.t.ACQUIRE_TOKEN_START:if(e.interactionType===s.s_.Redirect||e.interactionType===s.s_.Popup)return s.$H.AcquireToken;break;case d.t.HANDLE_REDIRECT_START:return s.$H.HandleRedirect;case d.t.LOGOUT_START:return s.$H.Logout;case d.t.SSO_SILENT_SUCCESS:case d.t.SSO_SILENT_FAILURE:if(t&&t!==s.$H.SsoSilent)break;return s.$H.None;case d.t.LOGOUT_END:if(t&&t!==s.$H.Logout)break;return s.$H.None;case d.t.HANDLE_REDIRECT_END:if(t&&t!==s.$H.HandleRedirect)break;return s.$H.None;case d.t.LOGIN_SUCCESS:case d.t.LOGIN_FAILURE:case d.t.ACQUIRE_TOKEN_SUCCESS:case d.t.ACQUIRE_TOKEN_FAILURE:case d.t.RESTORE_FROM_BFCACHE:if(e.interactionType===s.s_.Redirect||e.interactionType===s.s_.Popup){if(t&&t!==s.$H.Login&&t!==s.$H.AcquireToken)break;return s.$H.None}}return null}}function p(e,t){if(e.length!==t.length)return!1;const n=[...t];return e.every((e=>{const t=n.shift();return!(!e||!t)&&(e.homeAccountId===t.homeAccountId&&e.localAccountId===t.localAccountId&&e.username===t.username)}))}const f="@azure/msal-react",g="2.0.22",m={UNBLOCK_INPROGRESS:"UNBLOCK_INPROGRESS",EVENT:"EVENT"},v=(e,t)=>{const{type:n,payload:r}=t;let o=e.inProgress;switch(n){case m.UNBLOCK_INPROGRESS:e.inProgress===s.$H.Startup&&(o=s.$H.None,r.logger.info("MsalProvider - handleRedirectPromise resolved, setting inProgress to 'none'"));break;case m.EVENT:const t=r.message,i=h.getInteractionStatusFromEvent(t,e.inProgress);i&&(r.logger.info("MsalProvider - ".concat(t.eventType," results in setting inProgress from ").concat(e.inProgress," to ").concat(i)),o=i);break;default:throw new Error("Unknown action type: ".concat(n))}const i=r.instance.getAllAccounts();return o===e.inProgress||p(i,e.accounts)?o!==e.inProgress?{...e,inProgress:o}:p(i,e.accounts)?e:{...e,accounts:i}:{...e,inProgress:o,accounts:i}};function y(e){let{instance:t,children:n}=e;(0,r.useEffect)((()=>{t.initializeWrapperLibrary(s.lA.React,g)}),[t]);const o=(0,r.useMemo)((()=>t.getLogger().clone(f,g)),[t]),[i,a]=(0,r.useReducer)(v,void 0,(()=>({inProgress:s.$H.Startup,accounts:t.getAllAccounts()})));(0,r.useEffect)((()=>{const e=t.addEventCallback((e=>{a({payload:{instance:t,logger:o,message:e},type:m.EVENT})}));return o.verbose("MsalProvider - Registered event callback with id: ".concat(e)),t.initialize().then((()=>{t.handleRedirectPromise().catch((()=>{})).finally((()=>{a({payload:{instance:t,logger:o},type:m.UNBLOCK_INPROGRESS})}))})).catch((()=>{})),()=>{e&&(o.verbose("MsalProvider - Removing event callback ".concat(e)),t.removeEventCallback(e))}}),[t,o]);const c={instance:t,inProgress:i.inProgress,accounts:i.accounts,logger:o};return r.createElement(u.Provider,{value:c},n)}const C=()=>(0,r.useContext)(u);var b=n(4430);b.l4},1623:(e,t,n)=>{"use strict";n.d(t,{j:()=>d});var r,o,i,a=n(2346),s=n(6033),c=n(3092),l=n(8974),u=n(5391),d=new(r=new WeakMap,o=new WeakMap,i=new WeakMap,class extends l.l{constructor(){super(),(0,a.Z)(this,r,{writable:!0,value:void 0}),(0,a.Z)(this,o,{writable:!0,value:void 0}),(0,a.Z)(this,i,{writable:!0,value:void 0}),(0,c.Z)(this,i,(e=>{if(!u.sk&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}))}onSubscribe(){(0,s.Z)(this,o)||this.setEventListener((0,s.Z)(this,i))}onUnsubscribe(){var e;this.hasListeners()||(null===(e=(0,s.Z)(this,o))||void 0===e||e.call(this),(0,c.Z)(this,o,void 0))}setEventListener(e){var t;(0,c.Z)(this,i,e),null===(t=(0,s.Z)(this,o))||void 0===t||t.call(this),(0,c.Z)(this,o,e((e=>{"boolean"===typeof e?this.setFocused(e):this.onFocus()})))}setFocused(e){(0,s.Z)(this,r)!==e&&((0,c.Z)(this,r,e),this.onFocus())}onFocus(){this.listeners.forEach((e=>{e()}))}isFocused(){var e;return"boolean"===typeof(0,s.Z)(this,r)?(0,s.Z)(this,r):"hidden"!==(null===(e=globalThis.document)||void 0===e?void 0:e.visibilityState)}})},2756:(e,t,n)=>{"use strict";n.d(t,{R:()=>y,m:()=>m});var r,o,i,a,s,c=n(101),l=n(2346),u=n(3889),d=n(6033),h=n(3092),p=n(7211),f=n(5662),g=n(8609),m=(r=new WeakMap,o=new WeakMap,i=new WeakMap,a=new WeakMap,s=new WeakSet,class extends f.F{constructor(e){super(),(0,c.Z)(this,s),(0,l.Z)(this,r,{writable:!0,value:void 0}),(0,l.Z)(this,o,{writable:!0,value:void 0}),(0,l.Z)(this,i,{writable:!0,value:void 0}),(0,l.Z)(this,a,{writable:!0,value:void 0}),this.mutationId=e.mutationId,(0,h.Z)(this,o,e.defaultOptions),(0,h.Z)(this,i,e.mutationCache),(0,h.Z)(this,r,[]),this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options={...(0,d.Z)(this,o),...e},this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){(0,d.Z)(this,r).includes(e)||((0,d.Z)(this,r).push(e),this.clearGcTimeout(),(0,d.Z)(this,i).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){(0,h.Z)(this,r,(0,d.Z)(this,r).filter((t=>t!==e))),this.scheduleGc(),(0,d.Z)(this,i).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){(0,d.Z)(this,r).length||("pending"===this.state.status?this.scheduleGc():(0,d.Z)(this,i).remove(this))}continue(){var e,t;return null!==(e=null===(t=(0,d.Z)(this,a))||void 0===t?void 0:t.continue())&&void 0!==e?e:this.execute(this.state.variables)}async execute(e){const t=()=>{var t;return(0,h.Z)(this,a,(0,g.Mz)({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(e,t)=>{(0,u.Z)(this,s,v).call(this,{type:"failed",failureCount:e,error:t})},onPause:()=>{(0,u.Z)(this,s,v).call(this,{type:"pause"})},onContinue:()=>{(0,u.Z)(this,s,v).call(this,{type:"continue"})},retry:null!==(t=this.options.retry)&&void 0!==t?t:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode})),(0,d.Z)(this,a).promise},n="pending"===this.state.status;try{var r,o,c,l,p,f,m,y;if(!n){var C,b,w,T;(0,u.Z)(this,s,v).call(this,{type:"pending",variables:e}),await(null===(C=(b=(0,d.Z)(this,i).config).onMutate)||void 0===C?void 0:C.call(b,e,this));const t=await(null===(w=(T=this.options).onMutate)||void 0===w?void 0:w.call(T,e));t!==this.state.context&&(0,u.Z)(this,s,v).call(this,{type:"pending",context:t,variables:e})}const a=await t();return await(null===(r=(o=(0,d.Z)(this,i).config).onSuccess)||void 0===r?void 0:r.call(o,a,e,this.state.context,this)),await(null===(c=(l=this.options).onSuccess)||void 0===c?void 0:c.call(l,a,e,this.state.context)),await(null===(p=(f=(0,d.Z)(this,i).config).onSettled)||void 0===p?void 0:p.call(f,a,null,this.state.variables,this.state.context,this)),await(null===(m=(y=this.options).onSettled)||void 0===m?void 0:m.call(y,a,null,e,this.state.context)),(0,u.Z)(this,s,v).call(this,{type:"success",data:a}),a}catch(O){try{var S,k,E,A,I,R,_,N;throw await(null===(S=(k=(0,d.Z)(this,i).config).onError)||void 0===S?void 0:S.call(k,O,e,this.state.context,this)),await(null===(E=(A=this.options).onError)||void 0===E?void 0:E.call(A,O,e,this.state.context)),await(null===(I=(R=(0,d.Z)(this,i).config).onSettled)||void 0===I?void 0:I.call(R,void 0,O,this.state.variables,this.state.context,this)),await(null===(_=(N=this.options).onSettled)||void 0===_?void 0:_.call(N,void 0,O,e,this.state.context)),O}finally{(0,u.Z)(this,s,v).call(this,{type:"error",error:O})}}}});function v(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!(0,g.Kw)(this.options.networkMode),status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),p.V.batch((()=>{(0,d.Z)(this,r).forEach((t=>{t.onMutationUpdate(e)})),(0,d.Z)(this,i).notify({mutation:this,type:"updated",action:e})}))}function y(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}},7211:(e,t,n)=>{"use strict";n.d(t,{V:()=>r});var r=function(){let e=[],t=0,n=e=>{e()},r=e=>{e()},o=e=>setTimeout(e,0);const i=r=>{t?e.push(r):o((()=>{n(r)}))},a=()=>{const t=e;e=[],t.length&&o((()=>{r((()=>{t.forEach((e=>{n(e)}))}))}))};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||a()}return n},batchCalls:e=>function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];i((()=>{e(...n)}))},schedule:i,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{o=e}}}()},1901:(e,t,n)=>{"use strict";n.d(t,{N:()=>d});var r,o,i,a=n(2346),s=n(6033),c=n(3092),l=n(8974),u=n(5391),d=new(r=new WeakMap,o=new WeakMap,i=new WeakMap,class extends l.l{constructor(){super(),(0,a.Z)(this,r,{writable:!0,value:!0}),(0,a.Z)(this,o,{writable:!0,value:void 0}),(0,a.Z)(this,i,{writable:!0,value:void 0}),(0,c.Z)(this,i,(e=>{if(!u.sk&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}))}onSubscribe(){(0,s.Z)(this,o)||this.setEventListener((0,s.Z)(this,i))}onUnsubscribe(){var e;this.hasListeners()||(null===(e=(0,s.Z)(this,o))||void 0===e||e.call(this),(0,c.Z)(this,o,void 0))}setEventListener(e){var t;(0,c.Z)(this,i,e),null===(t=(0,s.Z)(this,o))||void 0===t||t.call(this),(0,c.Z)(this,o,e(this.setOnline.bind(this)))}setOnline(e){(0,s.Z)(this,r)!==e&&((0,c.Z)(this,r,e),this.listeners.forEach((t=>{t(e)})))}isOnline(){return(0,s.Z)(this,r)}})},5662:(e,t,n)=>{"use strict";n.d(t,{F:()=>c});var r,o=n(2346),i=n(6033),a=n(3092),s=n(5391),c=(r=new WeakMap,class{constructor(){(0,o.Z)(this,r,{writable:!0,value:void 0})}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),(0,s.PN)(this.gcTime)&&(0,a.Z)(this,r,setTimeout((()=>{this.optionalRemove()}),this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,null!==e&&void 0!==e?e:s.sk?1/0:3e5)}clearGcTimeout(){(0,i.Z)(this,r)&&(clearTimeout((0,i.Z)(this,r)),(0,a.Z)(this,r,void 0))}})},8609:(e,t,n)=>{"use strict";n.d(t,{DV:()=>l,Kw:()=>s,Mz:()=>u});var r=n(1623),o=n(1901),i=n(5391);function a(e){return Math.min(1e3*2**e,3e4)}function s(e){return"online"!==(null!==e&&void 0!==e?e:"online")||o.N.isOnline()}var c=class{constructor(e){this.revert=null===e||void 0===e?void 0:e.revert,this.silent=null===e||void 0===e?void 0:e.silent}};function l(e){return e instanceof c}function u(e){let t,n,l,u=!1,d=0,h=!1;const p=new Promise(((e,t)=>{n=e,l=t})),f=()=>!r.j.isFocused()||"always"!==e.networkMode&&!o.N.isOnline(),g=r=>{var o,i;h||(h=!0,null===(o=e.onSuccess)||void 0===o||o.call(e,r),null===(i=t)||void 0===i||i(),n(r))},m=n=>{var r,o;h||(h=!0,null===(r=e.onError)||void 0===r||r.call(e,n),null===(o=t)||void 0===o||o(),l(n))},v=()=>new Promise((n=>{var r;t=e=>{const t=h||!f();return t&&n(e),t},null===(r=e.onPause)||void 0===r||r.call(e)})).then((()=>{var n;(t=void 0,h)||(null===(n=e.onContinue)||void 0===n||n.call(e))})),y=()=>{if(h)return;let t;try{t=e.fn()}catch(n){t=Promise.reject(n)}Promise.resolve(t).then(g).catch((t=>{var n,r,o;if(h)return;const s=null!==(n=e.retry)&&void 0!==n?n:i.sk?0:3,c=null!==(r=e.retryDelay)&&void 0!==r?r:a,l="function"===typeof c?c(d,t):c,p=!0===s||"number"===typeof s&&d<s||"function"===typeof s&&s(d,t);!u&&p?(d++,null===(o=e.onFail)||void 0===o||o.call(e,d,t),(0,i._v)(l).then((()=>{if(f())return v()})).then((()=>{u?m(t):y()}))):m(t)}))};return s(e.networkMode)?y():v().then(y),{promise:p,cancel:t=>{var n;h||(m(new c(t)),null===(n=e.abort)||void 0===n||n.call(e))},continue:()=>{var e;return(null===(e=t)||void 0===e?void 0:e())?p:Promise.resolve()},cancelRetry:()=>{u=!0},continueRetry:()=>{u=!1}}}},8974:(e,t,n)=>{"use strict";n.d(t,{l:()=>r});var r=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}},5391:(e,t,n)=>{"use strict";n.d(t,{Ht:()=>w,Kp:()=>s,PN:()=>a,Rm:()=>u,SE:()=>i,VS:()=>f,VX:()=>b,X7:()=>l,Ym:()=>d,ZT:()=>o,_v:()=>y,_x:()=>c,oE:()=>C,sk:()=>r,to:()=>h});var r="undefined"===typeof window||"Deno"in window;function o(){}function i(e,t){return"function"===typeof e?e(t):e}function a(e){return"number"===typeof e&&e>=0&&e!==1/0}function s(e,t){return Math.max(e+(t||0)-Date.now(),0)}function c(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:i,queryKey:a,stale:s}=e;if(a)if(r){if(t.queryHash!==u(a,t.options))return!1}else if(!h(t.queryKey,a))return!1;if("all"!==n){const e=t.isActive();if("active"===n&&!e)return!1;if("inactive"===n&&e)return!1}return("boolean"!==typeof s||t.isStale()===s)&&(("undefined"===typeof o||o===t.state.fetchStatus)&&!(i&&!i(t)))}function l(e,t){const{exact:n,status:r,predicate:o,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(d(t.options.mutationKey)!==d(i))return!1}else if(!h(t.options.mutationKey,i))return!1}return(!r||t.state.status===r)&&!(o&&!o(t))}function u(e,t){return((null===t||void 0===t?void 0:t.queryKeyHashFn)||d)(e)}function d(e){return JSON.stringify(e,((e,t)=>m(t)?Object.keys(t).sort().reduce(((e,n)=>(e[n]=t[n],e)),{}):t))}function h(e,t){return e===t||typeof e===typeof t&&(!(!e||!t||"object"!==typeof e||"object"!==typeof t)&&!Object.keys(t).some((n=>!h(e[n],t[n]))))}function p(e,t){if(e===t)return e;const n=g(e)&&g(t);if(n||m(e)&&m(t)){const r=n?e:Object.keys(e),o=r.length,i=n?t:Object.keys(t),a=i.length,s=n?[]:{};let c=0;for(let l=0;l<a;l++){const o=n?l:i[l];!n&&void 0===e[o]&&void 0===t[o]&&r.includes(o)?(s[o]=void 0,c++):(s[o]=p(e[o],t[o]),s[o]===e[o]&&void 0!==e[o]&&c++)}return o===a&&c===o?e:s}return t}function f(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function g(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function m(e){if(!v(e))return!1;const t=e.constructor;if("undefined"===typeof t)return!0;const n=t.prototype;return!!v(n)&&!!n.hasOwnProperty("isPrototypeOf")}function v(e){return"[object Object]"===Object.prototype.toString.call(e)}function y(e){return new Promise((t=>{setTimeout(t,e)}))}function C(e,t,n){return"function"===typeof n.structuralSharing?n.structuralSharing(e,t):!1!==n.structuralSharing?p(e,t):t}function b(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const r=[...e,t];return n&&r.length>n?r.slice(1):r}function w(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}},3713:(e,t,n)=>{"use strict";n.d(t,{NL:()=>a,aH:()=>s});var r=n(2791),o=n(184),i=r.createContext(void 0),a=e=>{const t=r.useContext(i);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},s=e=>{let{client:t,children:n}=e;return r.useEffect((()=>(t.mount(),()=>{t.unmount()})),[t]),(0,o.jsx)(i.Provider,{value:t,children:n})}},9230:(e,t,n)=>{"use strict";n.d(t,{Db:()=>f,$G:()=>C});var r=n(2791);n(7399);Object.create(null);const o={};function i(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];"string"===typeof t[0]&&o[t[0]]||("string"===typeof t[0]&&(o[t[0]]=new Date),function(){if(console&&console.warn){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];"string"===typeof t[0]&&(t[0]="react-i18next:: ".concat(t[0])),console.warn(...t)}}(...t))}const a=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout((()=>{e.off("initialized",n)}),0),t()};e.on("initialized",n)}};function s(e,t,n){e.loadNamespaces(t,a(e,n))}function c(e,t,n,r){"string"===typeof n&&(n=[n]),n.forEach((t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)})),e.loadLanguages(t,a(e,r))}const l=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,u={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"\xa9","&#169;":"\xa9","&reg;":"\xae","&#174;":"\xae","&hellip;":"\u2026","&#8230;":"\u2026","&#x2F;":"/","&#47;":"/"},d=e=>u[e];let h,p={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(l,d)};const f={type:"3rdParty",init(e){!function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};p={...p,...e}}(e.options.react),function(e){h=e}(e)}},g=(0,r.createContext)();class m{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach((e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)}))}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const v=(e,t)=>{const n=(0,r.useRef)();return(0,r.useEffect)((()=>{n.current=t?n.current:e}),[e,t]),n.current};function y(e,t,n,r){return e.getFixedT(t,n,r)}function C(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{i18n:n}=t,{i18n:o,defaultNS:a}=(0,r.useContext)(g)||{},l=n||o||h;if(l&&!l.reportNamespaces&&(l.reportNamespaces=new m),!l){i("You will need to pass in an i18next instance by using initReactI18next");const e=(e,t)=>"string"===typeof t?t:t&&"object"===typeof t&&"string"===typeof t.defaultValue?t.defaultValue:Array.isArray(e)?e[e.length-1]:e,t=[e,{},!1];return t.t=e,t.i18n={},t.ready=!1,t}l.options.react&&void 0!==l.options.react.wait&&i("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const u={...p,...l.options.react,...t},{useSuspense:d,keyPrefix:f}=u;let C=e||a||l.options&&l.options.defaultNS;C="string"===typeof C?[C]:C||["translation"],l.reportNamespaces.addUsedNamespaces&&l.reportNamespaces.addUsedNamespaces(C);const b=(l.isInitialized||l.initializedStoreOnce)&&C.every((e=>function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.languages&&t.languages.length?void 0!==t.options.ignoreJSONStructure?t.hasLoadedNamespace(e,{lng:n.lng,precheck:(t,r)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}):function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=t.languages[0],o=!!t.options&&t.options.fallbackLng,i=t.languages[t.languages.length-1];if("cimode"===r.toLowerCase())return!0;const a=(e,n)=>{const r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===r||2===r};return!(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!a(t.isLanguageChangingTo,e))&&(!!t.hasResourceBundle(r,e)||!(t.services.backendConnector.backend&&(!t.options.resources||t.options.partialBundledLanguages))||!(!a(r,e)||o&&!a(i,e)))}(e,t,n):(i("i18n.languages were undefined or empty",t.languages),!0)}(e,l,u))),w=function(e,t,n,o){return(0,r.useCallback)(y(e,t,n,o),[e,t,n,o])}(l,t.lng||null,"fallback"===u.nsMode?C:C[0],f),T=()=>w,S=()=>y(l,t.lng||null,"fallback"===u.nsMode?C:C[0],f),[k,E]=(0,r.useState)(T);let A=C.join();t.lng&&(A="".concat(t.lng).concat(A));const I=v(A),R=(0,r.useRef)(!0);(0,r.useEffect)((()=>{const{bindI18n:e,bindI18nStore:n}=u;function r(){R.current&&E(S)}return R.current=!0,b||d||(t.lng?c(l,t.lng,C,(()=>{R.current&&E(S)})):s(l,C,(()=>{R.current&&E(S)}))),b&&I&&I!==A&&R.current&&E(S),e&&l&&l.on(e,r),n&&l&&l.store.on(n,r),()=>{R.current=!1,e&&l&&e.split(" ").forEach((e=>l.off(e,r))),n&&l&&n.split(" ").forEach((e=>l.store.off(e,r)))}}),[l,A]);const _=(0,r.useRef)(!0);(0,r.useEffect)((()=>{R.current&&!_.current&&E(T),_.current=!1}),[l,f]);const N=[k,l,b];if(N.t=k,N.i18n=l,N.ready=b,b)return N;if(!b&&!d)return N;throw new Promise((e=>{t.lng?c(l,t.lng,C,(()=>e())):s(l,C,(()=>e()))}))}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}n.m=e,n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;n.t=function(r,o){if(1&o&&(r=this(r)),8&o)return r;if("object"===typeof r&&r){if(4&o&&r.__esModule)return r;if(16&o&&"function"===typeof r.then)return r}var i=Object.create(null);n.r(i);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&o&&r;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((e=>a[e]=()=>r[e]));return a.default=()=>r,n.d(i,a),i}})(),n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce(((t,r)=>(n.f[r](e,t),t)),[])),n.u=e=>"static/js/"+e+"."+{48:"dabe8d49",169:"53f95750",481:"1fee817b",496:"381eb9ee",829:"e22c2bc9",961:"e3fe97c2"}[e]+".chunk.js",n.miniCssF=e=>"static/css/"+e+"."+{48:"627166be",169:"839c8273",961:"2bc81c9f"}[e]+".chunk.css",n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={},t="clientapp:";n.l=(r,o,i,a)=>{if(e[r])e[r].push(o);else{var s,c;if(void 0!==i)for(var l=document.getElementsByTagName("script"),u=0;u<l.length;u++){var d=l[u];if(d.getAttribute("src")==r||d.getAttribute("data-webpack")==t+i){s=d;break}}s||(c=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,n.nc&&s.setAttribute("nonce",n.nc),s.setAttribute("data-webpack",t+i),s.src=r),e[r]=[o];var h=(t,n)=>{s.onerror=s.onload=null,clearTimeout(p);var o=e[r];if(delete e[r],s.parentNode&&s.parentNode.removeChild(s),o&&o.forEach((e=>e(n))),t)return t(n)},p=setTimeout(h.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=h.bind(null,s.onerror),s.onload=h.bind(null,s.onload),c&&document.head.appendChild(s)}}})(),n.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),n.p="/fpp/",(()=>{if("undefined"!==typeof document){var e=e=>new Promise(((t,r)=>{var o=n.miniCssF(e),i=n.p+o;if(((e,t)=>{for(var n=document.getElementsByTagName("link"),r=0;r<n.length;r++){var o=(a=n[r]).getAttribute("data-href")||a.getAttribute("href");if("stylesheet"===a.rel&&(o===e||o===t))return a}var i=document.getElementsByTagName("style");for(r=0;r<i.length;r++){var a;if((o=(a=i[r]).getAttribute("data-href"))===e||o===t)return a}})(o,i))return t();((e,t,n,r,o)=>{var i=document.createElement("link");i.rel="stylesheet",i.type="text/css",i.onerror=i.onload=n=>{if(i.onerror=i.onload=null,"load"===n.type)r();else{var a=n&&n.type,s=n&&n.target&&n.target.href||t,c=new Error("Loading CSS chunk "+e+" failed.\n("+a+": "+s+")");c.name="ChunkLoadError",c.code="CSS_CHUNK_LOAD_FAILED",c.type=a,c.request=s,i.parentNode&&i.parentNode.removeChild(i),o(c)}},i.href=t,n?n.parentNode.insertBefore(i,n.nextSibling):document.head.appendChild(i)})(e,i,null,t,r)})),t={179:0};n.f.miniCss=(n,r)=>{t[n]?r.push(t[n]):0!==t[n]&&{48:1,169:1,961:1}[n]&&r.push(t[n]=e(n).then((()=>{t[n]=0}),(e=>{throw delete t[n],e})))}}})(),(()=>{var e={179:0};n.f.j=(t,r)=>{var o=n.o(e,t)?e[t]:void 0;if(0!==o)if(o)r.push(o[2]);else{var i=new Promise(((n,r)=>o=e[t]=[n,r]));r.push(o[2]=i);var a=n.p+n.u(t),s=new Error;n.l(a,(r=>{if(n.o(e,t)&&(0!==(o=e[t])&&(e[t]=void 0),o)){var i=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;s.message="Loading chunk "+t+" failed.\n("+i+": "+a+")",s.name="ChunkLoadError",s.type=i,s.request=a,o[1](s)}}),"chunk-"+t,t)}};var t=(t,r)=>{var o,i,a=r[0],s=r[1],c=r[2],l=0;if(a.some((t=>0!==e[t]))){for(o in s)n.o(s,o)&&(n.m[o]=s[o]);if(c)c(n)}for(t&&t(r);l<a.length;l++)i=a[l],n.o(e,i)&&e[i]&&e[i][0](),e[i]=0},r=self.webpackChunkclientapp=self.webpackChunkclientapp||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})(),(()=>{"use strict";var e=n(1250),t=(n(8890),n(1087)),r=n(7689),o=n(184);const i=()=>(0,o.jsx)("h1",{children:"Page Not Found"});var a=n(2791);const s=(0,a.lazy)((async()=>await Promise.all([n.e(829),n.e(481),n.e(48)]).then(n.bind(n,1048)))),c=(0,a.lazy)((async()=>await Promise.all([n.e(829),n.e(169),n.e(961)]).then(n.bind(n,9014)))),l=()=>(0,o.jsx)(a.Suspense,{children:(0,o.jsxs)(r.Z5,{children:[(0,o.jsxs)(r.AW,{path:"fpp",children:[(0,o.jsx)(r.AW,{path:"admin/*",element:(0,o.jsx)(c,{})}),(0,o.jsx)(r.AW,{path:"*",element:(0,o.jsx)(s,{})}),(0,o.jsx)(r.AW,{path:"",element:(0,o.jsx)(i,{})})]}),(0,o.jsx)(r.AW,{path:"*",element:(0,o.jsx)(i,{})})]})});var u,d,h,p,f,g,m,v,y,C,b=n(2346),w=n(6033),T=n(3092),S=n(5391),k=n(101),E=n(3889),A=n(7211),I=n(8609),R=n(5662),_=(u=new WeakMap,d=new WeakMap,h=new WeakMap,p=new WeakMap,f=new WeakMap,g=new WeakMap,m=new WeakMap,v=new WeakMap,y=new WeakSet,C=new WeakSet,class extends R.F{constructor(e){super(),(0,k.Z)(this,C),(0,k.Z)(this,y),(0,b.Z)(this,u,{writable:!0,value:void 0}),(0,b.Z)(this,d,{writable:!0,value:void 0}),(0,b.Z)(this,h,{writable:!0,value:void 0}),(0,b.Z)(this,p,{writable:!0,value:void 0}),(0,b.Z)(this,f,{writable:!0,value:void 0}),(0,b.Z)(this,g,{writable:!0,value:void 0}),(0,b.Z)(this,m,{writable:!0,value:void 0}),(0,b.Z)(this,v,{writable:!0,value:void 0}),(0,T.Z)(this,v,!1),(0,T.Z)(this,m,e.defaultOptions),(0,E.Z)(this,y,N).call(this,e.options),(0,T.Z)(this,g,[]),(0,T.Z)(this,h,e.cache),this.queryKey=e.queryKey,this.queryHash=e.queryHash,(0,T.Z)(this,u,e.state||function(e){const t="function"===typeof e.initialData?e.initialData():e.initialData,n="undefined"!==typeof t,r=n?"function"===typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?null!==r&&void 0!==r?r:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}(this.options)),this.state=(0,w.Z)(this,u),this.scheduleGc()}get meta(){return this.options.meta}optionalRemove(){(0,w.Z)(this,g).length||"idle"!==this.state.fetchStatus||(0,w.Z)(this,h).remove(this)}setData(e,t){const n=(0,S.oE)(this.state.data,e,this.options);return(0,E.Z)(this,C,O).call(this,{data:n,type:"success",dataUpdatedAt:null===t||void 0===t?void 0:t.updatedAt,manual:null===t||void 0===t?void 0:t.manual}),n}setState(e,t){(0,E.Z)(this,C,O).call(this,{type:"setState",state:e,setStateOptions:t})}cancel(e){var t;const n=(0,w.Z)(this,p);return null===(t=(0,w.Z)(this,f))||void 0===t||t.cancel(e),n?n.then(S.ZT).catch(S.ZT):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState((0,w.Z)(this,u))}isActive(){return(0,w.Z)(this,g).some((e=>!1!==e.options.enabled))}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||(0,w.Z)(this,g).some((e=>e.getCurrentResult().isStale))}isStaleByTime(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.state.isInvalidated||!this.state.dataUpdatedAt||!(0,S.Kp)(this.state.dataUpdatedAt,e)}onFocus(){var e;const t=(0,w.Z)(this,g).find((e=>e.shouldFetchOnWindowFocus()));null===t||void 0===t||t.refetch({cancelRefetch:!1}),null===(e=(0,w.Z)(this,f))||void 0===e||e.continue()}onOnline(){var e;const t=(0,w.Z)(this,g).find((e=>e.shouldFetchOnReconnect()));null===t||void 0===t||t.refetch({cancelRefetch:!1}),null===(e=(0,w.Z)(this,f))||void 0===e||e.continue()}addObserver(e){(0,w.Z)(this,g).includes(e)||((0,w.Z)(this,g).push(e),this.clearGcTimeout(),(0,w.Z)(this,h).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){(0,w.Z)(this,g).includes(e)&&((0,T.Z)(this,g,(0,w.Z)(this,g).filter((t=>t!==e))),(0,w.Z)(this,g).length||((0,w.Z)(this,f)&&((0,w.Z)(this,v)?(0,w.Z)(this,f).cancel({revert:!0}):(0,w.Z)(this,f).cancelRetry()),this.scheduleGc()),(0,w.Z)(this,h).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return(0,w.Z)(this,g).length}invalidate(){this.state.isInvalidated||(0,E.Z)(this,C,O).call(this,{type:"invalidate"})}fetch(e,t){var n,r;if("idle"!==this.state.fetchStatus)if(this.state.dataUpdatedAt&&null!==t&&void 0!==t&&t.cancelRefetch)this.cancel({silent:!0});else if((0,w.Z)(this,p)){var o;return null===(o=(0,w.Z)(this,f))||void 0===o||o.continueRetry(),(0,w.Z)(this,p)}if(e&&(0,E.Z)(this,y,N).call(this,e),!this.options.queryFn){const e=(0,w.Z)(this,g).find((e=>e.options.queryFn));e&&(0,E.Z)(this,y,N).call(this,e.options)}const i=new AbortController,a={queryKey:this.queryKey,meta:this.meta},s=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>((0,T.Z)(this,v,!0),i.signal)})};s(a);const c={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:()=>this.options.queryFn?((0,T.Z)(this,v,!1),this.options.persister?this.options.persister(this.options.queryFn,a,this):this.options.queryFn(a)):Promise.reject(new Error("Missing queryFn: '".concat(this.options.queryHash,"'")))};var l;(s(c),null===(n=this.options.behavior)||void 0===n||n.onFetch(c,this),(0,T.Z)(this,d,this.state),"idle"===this.state.fetchStatus||this.state.fetchMeta!==(null===(r=c.fetchOptions)||void 0===r?void 0:r.meta))&&(0,E.Z)(this,C,O).call(this,{type:"fetch",meta:null===(l=c.fetchOptions)||void 0===l?void 0:l.meta});const u=e=>{var t,n,r,o;((0,I.DV)(e)&&e.silent||(0,E.Z)(this,C,O).call(this,{type:"error",error:e}),(0,I.DV)(e))||(null===(t=(n=(0,w.Z)(this,h).config).onError)||void 0===t||t.call(n,e,this),null===(r=(o=(0,w.Z)(this,h).config).onSettled)||void 0===r||r.call(o,this.state.data,e,this));this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return(0,T.Z)(this,f,(0,I.Mz)({fn:c.fetchFn,abort:i.abort.bind(i),onSuccess:e=>{var t,n,r,o;"undefined"!==typeof e?(this.setData(e),null===(t=(n=(0,w.Z)(this,h).config).onSuccess)||void 0===t||t.call(n,e,this),null===(r=(o=(0,w.Z)(this,h).config).onSettled)||void 0===r||r.call(o,e,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1):u(new Error("".concat(this.queryHash," data is undefined")))},onError:u,onFail:(e,t)=>{(0,E.Z)(this,C,O).call(this,{type:"failed",failureCount:e,error:t})},onPause:()=>{(0,E.Z)(this,C,O).call(this,{type:"pause"})},onContinue:()=>{(0,E.Z)(this,C,O).call(this,{type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode})),(0,T.Z)(this,p,(0,w.Z)(this,f).promise),(0,w.Z)(this,p)}});function N(e){this.options={...(0,w.Z)(this,m),...e},this.updateGcTime(this.options.gcTime)}function O(e){this.state=(t=>{var n,r;switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null!==(n=e.meta)&&void 0!==n?n:null,fetchStatus:(0,I.Kw)(this.options.networkMode)?"fetching":"paused",...!t.dataUpdatedAt&&{error:null,status:"pending"}};case"success":return{...t,data:e.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:null!==(r=e.dataUpdatedAt)&&void 0!==r?r:Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=e.error;return(0,I.DV)(o)&&o.revert&&(0,w.Z)(this,d)?{...(0,w.Z)(this,d),fetchStatus:"idle"}:{...t,error:o,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),A.V.batch((()=>{(0,w.Z)(this,g).forEach((e=>{e.onQueryUpdate()})),(0,w.Z)(this,h).notify({query:this,type:"updated",action:e})}))}var P,x,M,L,q,D,U,H,F,B,K,j,z=n(8974),W=(P=new WeakMap,class extends z.l{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(),(0,b.Z)(this,P,{writable:!0,value:void 0}),this.config=e,(0,T.Z)(this,P,new Map)}build(e,t,n){var r;const o=t.queryKey,i=null!==(r=t.queryHash)&&void 0!==r?r:(0,S.Rm)(o,t);let a=this.get(i);return a||(a=new _({cache:this,queryKey:o,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(o)}),this.add(a)),a}add(e){(0,w.Z)(this,P).has(e.queryHash)||((0,w.Z)(this,P).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=(0,w.Z)(this,P).get(e.queryHash);t&&(e.destroy(),t===e&&(0,w.Z)(this,P).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){A.V.batch((()=>{this.getAll().forEach((e=>{this.remove(e)}))}))}get(e){return(0,w.Z)(this,P).get(e)}getAll(){return[...(0,w.Z)(this,P).values()]}find(e){const t={exact:!0,...e};return this.getAll().find((e=>(0,S._x)(t,e)))}findAll(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=this.getAll();return Object.keys(e).length>0?t.filter((t=>(0,S._x)(e,t))):t}notify(e){A.V.batch((()=>{this.listeners.forEach((t=>{t(e)}))}))}onFocus(){A.V.batch((()=>{this.getAll().forEach((e=>{e.onFocus()}))}))}onOnline(){A.V.batch((()=>{this.getAll().forEach((e=>{e.onOnline()}))}))}}),G=n(2756),V=(x=new WeakMap,M=new WeakMap,L=new WeakMap,class extends z.l{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(),(0,b.Z)(this,x,{writable:!0,value:void 0}),(0,b.Z)(this,M,{writable:!0,value:void 0}),(0,b.Z)(this,L,{writable:!0,value:void 0}),this.config=e,(0,T.Z)(this,x,[]),(0,T.Z)(this,M,0)}build(e,t,n){var r;const o=new G.m({mutationCache:this,mutationId:(0,T.Z)(this,M,(r=(0,w.Z)(this,M),++r)),options:e.defaultMutationOptions(t),state:n});return this.add(o),o}add(e){(0,w.Z)(this,x).push(e),this.notify({type:"added",mutation:e})}remove(e){(0,T.Z)(this,x,(0,w.Z)(this,x).filter((t=>t!==e))),this.notify({type:"removed",mutation:e})}clear(){A.V.batch((()=>{(0,w.Z)(this,x).forEach((e=>{this.remove(e)}))}))}getAll(){return(0,w.Z)(this,x)}find(e){const t={exact:!0,...e};return(0,w.Z)(this,x).find((e=>(0,S.X7)(t,e)))}findAll(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,w.Z)(this,x).filter((t=>(0,S.X7)(e,t)))}notify(e){A.V.batch((()=>{this.listeners.forEach((t=>{t(e)}))}))}resumePausedMutations(){var e;return(0,T.Z)(this,L,(null!==(e=(0,w.Z)(this,L))&&void 0!==e?e:Promise.resolve()).then((()=>{const e=(0,w.Z)(this,x).filter((e=>e.state.isPaused));return A.V.batch((()=>e.reduce(((e,t)=>e.then((()=>t.continue().catch(S.ZT)))),Promise.resolve())))})).then((()=>{(0,T.Z)(this,L,void 0)}))),(0,w.Z)(this,L)}}),Q=n(1623),Z=n(1901);function Y(e){return{onFetch:(t,n)=>{const r=async()=>{var n,r,o;const i=t.options,a=null===(n=t.fetchOptions)||void 0===n||null===(n=n.meta)||void 0===n||null===(n=n.fetchMore)||void 0===n?void 0:n.direction,s=(null===(r=t.state.data)||void 0===r?void 0:r.pages)||[],c=(null===(o=t.state.data)||void 0===o?void 0:o.pageParams)||[],l={pages:[],pageParams:[]};let u=!1;const d=t.options.queryFn||(()=>Promise.reject(new Error("Missing queryFn: '".concat(t.options.queryHash,"'")))),h=async(e,n,r)=>{if(u)return Promise.reject();if(null==n&&e.pages.length)return Promise.resolve(e);const o={queryKey:t.queryKey,pageParam:n,direction:r?"backward":"forward",meta:t.options.meta};var i;i=o,Object.defineProperty(i,"signal",{enumerable:!0,get:()=>(t.signal.aborted?u=!0:t.signal.addEventListener("abort",(()=>{u=!0})),t.signal)});const a=await d(o),{maxPages:s}=t.options,c=r?S.Ht:S.VX;return{pages:c(e.pages,a,s),pageParams:c(e.pageParams,n,s)}};let p;if(a&&s.length){const e="backward"===a,t={pages:s,pageParams:c},n=(e?$:J)(i,t);p=await h(t,n,e)}else{var f;p=await h(l,null!==(f=c[0])&&void 0!==f?f:i.initialPageParam);const t=null!==e&&void 0!==e?e:s.length;for(let e=1;e<t;e++){const e=J(i,p);p=await h(p,e)}}return p};t.options.persister?t.fetchFn=()=>{var e,o;return null===(e=(o=t.options).persister)||void 0===e?void 0:e.call(o,r,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=r}}}function J(e,t){let{pages:n,pageParams:r}=t;const o=n.length-1;return e.getNextPageParam(n[o],n,r[o],r)}function $(e,t){var n;let{pages:r,pageParams:o}=t;return null===(n=e.getPreviousPageParam)||void 0===n?void 0:n.call(e,r[0],r,o[0],o)}var X=(q=new WeakMap,D=new WeakMap,U=new WeakMap,H=new WeakMap,F=new WeakMap,B=new WeakMap,K=new WeakMap,j=new WeakMap,class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,b.Z)(this,q,{writable:!0,value:void 0}),(0,b.Z)(this,D,{writable:!0,value:void 0}),(0,b.Z)(this,U,{writable:!0,value:void 0}),(0,b.Z)(this,H,{writable:!0,value:void 0}),(0,b.Z)(this,F,{writable:!0,value:void 0}),(0,b.Z)(this,B,{writable:!0,value:void 0}),(0,b.Z)(this,K,{writable:!0,value:void 0}),(0,b.Z)(this,j,{writable:!0,value:void 0}),(0,T.Z)(this,q,e.queryCache||new W),(0,T.Z)(this,D,e.mutationCache||new V),(0,T.Z)(this,U,e.defaultOptions||{}),(0,T.Z)(this,H,new Map),(0,T.Z)(this,F,new Map),(0,T.Z)(this,B,0)}mount(){var e;(0,T.Z)(this,B,(e=(0,w.Z)(this,B),e++,e)),1===(0,w.Z)(this,B)&&((0,T.Z)(this,K,Q.j.subscribe((()=>{Q.j.isFocused()&&(this.resumePausedMutations(),(0,w.Z)(this,q).onFocus())}))),(0,T.Z)(this,j,Z.N.subscribe((()=>{Z.N.isOnline()&&(this.resumePausedMutations(),(0,w.Z)(this,q).onOnline())}))))}unmount(){var e,t,n;(0,T.Z)(this,B,(e=(0,w.Z)(this,B),e--,e)),0===(0,w.Z)(this,B)&&(null===(t=(0,w.Z)(this,K))||void 0===t||t.call(this),(0,T.Z)(this,K,void 0),null===(n=(0,w.Z)(this,j))||void 0===n||n.call(this),(0,T.Z)(this,j,void 0))}isFetching(e){return(0,w.Z)(this,q).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return(0,w.Z)(this,D).findAll({...e,status:"pending"}).length}getQueryData(e){var t;const n=this.defaultQueryOptions({queryKey:e});return null===(t=(0,w.Z)(this,q).get(n.queryHash))||void 0===t?void 0:t.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);return void 0!==t?Promise.resolve(t):this.fetchQuery(e)}getQueriesData(e){return this.getQueryCache().findAll(e).map((e=>{let{queryKey:t,state:n}=e;return[t,n.data]}))}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=(0,w.Z)(this,q).get(r.queryHash),i=null===o||void 0===o?void 0:o.state.data,a=(0,S.SE)(t,i);if("undefined"!==typeof a)return(0,w.Z)(this,q).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return A.V.batch((()=>this.getQueryCache().findAll(e).map((e=>{let{queryKey:r}=e;return[r,this.setQueryData(r,t,n)]}))))}getQueryState(e){var t;const n=this.defaultQueryOptions({queryKey:e});return null===(t=(0,w.Z)(this,q).get(n.queryHash))||void 0===t?void 0:t.state}removeQueries(e){const t=(0,w.Z)(this,q);A.V.batch((()=>{t.findAll(e).forEach((e=>{t.remove(e)}))}))}resetQueries(e,t){const n=(0,w.Z)(this,q),r={type:"active",...e};return A.V.batch((()=>(n.findAll(e).forEach((e=>{e.reset()})),this.refetchQueries(r,t))))}cancelQueries(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t={revert:!0,...arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}},n=A.V.batch((()=>(0,w.Z)(this,q).findAll(e).map((e=>e.cancel(t)))));return Promise.all(n).then(S.ZT).catch(S.ZT)}invalidateQueries(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return A.V.batch((()=>{var n,r;if((0,w.Z)(this,q).findAll(e).forEach((e=>{e.invalidate()})),"none"===e.refetchType)return Promise.resolve();const o={...e,type:null!==(n=null!==(r=e.refetchType)&&void 0!==r?r:e.type)&&void 0!==n?n:"active"};return this.refetchQueries(o,t)}))}refetchQueries(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;const r={...n,cancelRefetch:null===(e=null===n||void 0===n?void 0:n.cancelRefetch)||void 0===e||e},o=A.V.batch((()=>(0,w.Z)(this,q).findAll(t).filter((e=>!e.isDisabled())).map((e=>{let t=e.fetch(void 0,r);return r.throwOnError||(t=t.catch(S.ZT)),"paused"===e.state.fetchStatus?Promise.resolve():t}))));return Promise.all(o).then(S.ZT)}fetchQuery(e){const t=this.defaultQueryOptions(e);"undefined"===typeof t.retry&&(t.retry=!1);const n=(0,w.Z)(this,q).build(this,t);return n.isStaleByTime(t.staleTime)?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(S.ZT).catch(S.ZT)}fetchInfiniteQuery(e){return e.behavior=Y(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(S.ZT).catch(S.ZT)}resumePausedMutations(){return(0,w.Z)(this,D).resumePausedMutations()}getQueryCache(){return(0,w.Z)(this,q)}getMutationCache(){return(0,w.Z)(this,D)}getDefaultOptions(){return(0,w.Z)(this,U)}setDefaultOptions(e){(0,T.Z)(this,U,e)}setQueryDefaults(e,t){(0,w.Z)(this,H).set((0,S.Ym)(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...(0,w.Z)(this,H).values()];let n={};return t.forEach((t=>{(0,S.to)(e,t.queryKey)&&(n={...n,...t.defaultOptions})})),n}setMutationDefaults(e,t){(0,w.Z)(this,F).set((0,S.Ym)(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...(0,w.Z)(this,F).values()];let n={};return t.forEach((t=>{(0,S.to)(e,t.mutationKey)&&(n={...n,...t.defaultOptions})})),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...(0,w.Z)(this,U).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=(0,S.Rm)(t.queryKey,t)),"undefined"===typeof t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),"undefined"===typeof t.throwOnError&&(t.throwOnError=!!t.suspense),"undefined"===typeof t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t}defaultMutationOptions(e){return null!==e&&void 0!==e&&e._defaulted?e:{...(0,w.Z)(this,U).mutations,...(null===e||void 0===e?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){(0,w.Z)(this,q).clear(),(0,w.Z)(this,D).clear()}}),ee=n(3713),te=n(382);const ne={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class re{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||ne,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,r){return r&&!this.debug?null:("string"===typeof e[0]&&(e[0]="".concat(n).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}create(e){return new re(this.logger,{prefix:"".concat(this.prefix,":").concat(e,":"),...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new re(this.logger,e)}}var oe=new re;class ie{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach((e=>{this.observers[e]||(this.observers[e]=new Map);const n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)})),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(this.observers[e]){Array.from(this.observers[e].entries()).forEach((e=>{let[t,r]=e;for(let o=0;o<r;o++)t(...n)}))}if(this.observers["*"]){Array.from(this.observers["*"].entries()).forEach((t=>{let[r,o]=t;for(let i=0;i<o;i++)r.apply(r,[e,...n])}))}}}function ae(){let e,t;const n=new Promise(((n,r)=>{e=n,t=r}));return n.resolve=e,n.reject=t,n}function se(e){return null==e?"":""+e}const ce=/###/g;function le(e,t,n){function r(e){return e&&e.indexOf("###")>-1?e.replace(ce,"."):e}function o(){return!e||"string"===typeof e}const i="string"!==typeof t?t:t.split(".");let a=0;for(;a<i.length-1;){if(o())return{};const t=r(i[a]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++a}return o()?{}:{obj:e,k:r(i[a])}}function ue(e,t,n){const{obj:r,k:o}=le(e,t,Object);if(void 0!==r||1===t.length)return void(r[o]=n);let i=t[t.length-1],a=t.slice(0,t.length-1),s=le(e,a,Object);for(;void 0===s.obj&&a.length;)i="".concat(a[a.length-1],".").concat(i),a=a.slice(0,a.length-1),s=le(e,a,Object),s&&s.obj&&"undefined"!==typeof s.obj["".concat(s.k,".").concat(i)]&&(s.obj=void 0);s.obj["".concat(s.k,".").concat(i)]=n}function de(e,t){const{obj:n,k:r}=le(e,t);if(n)return n[r]}function he(e,t,n){for(const r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?"string"===typeof e[r]||e[r]instanceof String||"string"===typeof t[r]||t[r]instanceof String?n&&(e[r]=t[r]):he(e[r],t[r],n):e[r]=t[r]);return e}function pe(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var fe={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function ge(e){return"string"===typeof e?e.replace(/[&<>"'\/]/g,(e=>fe[e])):e}const me=[" ",",","?","!",";"],ve=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}(20);function ye(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let o=e;for(let i=0;i<r.length;){if(!o||"object"!==typeof o)return;let e,t="";for(let a=i;a<r.length;++a)if(a!==i&&(t+=n),t+=r[a],e=o[t],void 0!==e){if(["string","number","boolean"].indexOf(typeof e)>-1&&a<r.length-1)continue;i+=a-i+1;break}o=e}return o}function Ce(e){return e&&e.indexOf("_")>0?e.replace("_","-"):e}class be extends ie{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],n&&(Array.isArray(n)?a.push(...n):"string"===typeof n&&o?a.push(...n.split(o)):a.push(n)));const s=de(this.data,a);return!s&&!t&&!n&&e.indexOf(".")>-1&&(e=a[0],t=a[1],n=a.slice(2).join(".")),s||!i||"string"!==typeof n?s:ye(this.data&&this.data[e]&&this.data[e][t],n,o)}addResource(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1};const i=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator;let a=[e,t];n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(a=e.split("."),r=t,t=a[1]),this.addNamespaces(t),ue(this.data,a,r),o.silent||this.emit("added",e,t,n,r)}addResources(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(const o in n)"string"!==typeof n[o]&&"[object Array]"!==Object.prototype.toString.apply(n[o])||this.addResource(e,t,o,n[o],{silent:!0});r.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1,skipCopy:!1},a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),r=n,n=t,t=a[1]),this.addNamespaces(t);let s=de(this.data,a)||{};i.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?he(s,n,o):s={...s,...n},ue(this.data,a,s),i.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?{...this.getResource(e,t)}:this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find((e=>t[e]&&Object.keys(t[e]).length>0))}toJSON(){return this.data}}var we={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach((e=>{this.processors[e]&&(t=this.processors[e].process(t,n,r,o))})),t}};const Te={};class Se extends ie{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),function(e,t,n){e.forEach((e=>{t[e]&&(n[e]=t[e])}))}(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=oe.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(void 0===e||null===e)return!1;const n=this.resolve(e,t);return n&&void 0!==n.res}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let o=t.ns||this.options.defaultNS||[];const i=n&&e.indexOf(n)>-1,a=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!function(e,t,n){t=t||"",n=n||"";const r=me.filter((e=>t.indexOf(e)<0&&n.indexOf(e)<0));if(0===r.length)return!0;const o=ve.getRegExp("(".concat(r.map((e=>"?"===e?"\\?":e)).join("|"),")"));let i=!o.test(e);if(!i){const t=e.indexOf(n);t>0&&!o.test(e.substring(0,t))&&(i=!0)}return i}(e,n,r);if(i&&!a){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:o};const i=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(i[0])>-1)&&(o=i.shift()),e=i.join(r)}return"string"===typeof o&&(o=[o]),{key:e,namespaces:o}}translate(e,t,n){if("object"!==typeof t&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),"object"===typeof t&&(t={...t}),t||(t={}),void 0===e||null===e)return"";Array.isArray(e)||(e=[String(e)]);const r=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,o=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,{key:i,namespaces:a}=this.extractFromKey(e[e.length-1],t),s=a[a.length-1],c=t.lng||this.language,l=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&"cimode"===c.toLowerCase()){if(l){const e=t.nsSeparator||this.options.nsSeparator;return r?{res:"".concat(s).concat(e).concat(i),usedKey:i,exactUsedKey:i,usedLng:c,usedNS:s,usedParams:this.getUsedParamsDetails(t)}:"".concat(s).concat(e).concat(i)}return r?{res:i,usedKey:i,exactUsedKey:i,usedLng:c,usedNS:s,usedParams:this.getUsedParamsDetails(t)}:i}const u=this.resolve(e,t);let d=u&&u.res;const h=u&&u.usedKey||i,p=u&&u.exactUsedKey||i,f=Object.prototype.toString.apply(d),g=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,m=!this.i18nFormat||this.i18nFormat.handleAsObject;if(m&&d&&("string"!==typeof d&&"boolean"!==typeof d&&"number"!==typeof d)&&["[object Number]","[object Function]","[object RegExp]"].indexOf(f)<0&&("string"!==typeof g||"[object Array]"!==f)){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,d,{...t,ns:a}):"key '".concat(i," (").concat(this.language,")' returned an object instead of string.");return r?(u.res=e,u.usedParams=this.getUsedParamsDetails(t),u):e}if(o){const e="[object Array]"===f,n=e?[]:{},r=e?p:h;for(const i in d)if(Object.prototype.hasOwnProperty.call(d,i)){const e="".concat(r).concat(o).concat(i);n[i]=this.translate(e,{...t,joinArrays:!1,ns:a}),n[i]===e&&(n[i]=d[i])}d=n}}else if(m&&"string"===typeof g&&"[object Array]"===f)d=d.join(g),d&&(d=this.extendTranslation(d,e,t,n));else{let r=!1,a=!1;const l=void 0!==t.count&&"string"!==typeof t.count,h=Se.hasDefaultValue(t),p=l?this.pluralResolver.getSuffix(c,t.count,t):"",f=t.ordinal&&l?this.pluralResolver.getSuffix(c,t.count,{ordinal:!1}):"",g=l&&!t.ordinal&&0===t.count&&this.pluralResolver.shouldUseIntlApi(),m=g&&t["defaultValue".concat(this.options.pluralSeparator,"zero")]||t["defaultValue".concat(p)]||t["defaultValue".concat(f)]||t.defaultValue;!this.isValidLookup(d)&&h&&(r=!0,d=m),this.isValidLookup(d)||(a=!0,d=i);const v=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&a?void 0:d,y=h&&m!==d&&this.options.updateMissing;if(a||r||y){if(this.logger.log(y?"updateKey":"missingKey",c,s,i,y?m:d),o){const e=this.resolve(i,{...t,keySeparator:!1});e&&e.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 e=[];const n=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&n&&n[0])for(let t=0;t<n.length;t++)e.push(n[t]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(t.lng||this.language):e.push(t.lng||this.language);const r=(e,n,r)=>{const o=h&&r!==d?r:v;this.options.missingKeyHandler?this.options.missingKeyHandler(e,s,n,o,y,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(e,s,n,o,y,t),this.emit("missingKey",e,s,n,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&l?e.forEach((e=>{const n=this.pluralResolver.getSuffixes(e,t);g&&t["defaultValue".concat(this.options.pluralSeparator,"zero")]&&n.indexOf("".concat(this.options.pluralSeparator,"zero"))<0&&n.push("".concat(this.options.pluralSeparator,"zero")),n.forEach((n=>{r([e],i+n,t["defaultValue".concat(n)]||m)}))})):r(e,i,m))}d=this.extendTranslation(d,e,t,u,n),a&&d===i&&this.options.appendNamespaceToMissingKey&&(d="".concat(s,":").concat(i)),(a||r)&&this.options.parseMissingKeyHandler&&(d="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(s,":").concat(i):i,r?d:void 0):this.options.parseMissingKeyHandler(d))}return r?(u.res=d,u.usedParams=this.getUsedParamsDetails(t),u):d}extendTranslation(e,t,n,r,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const a="string"===typeof e&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let s;if(a){const t=e.match(this.interpolator.nestingRegexp);s=t&&t.length}let c=n.replace&&"string"!==typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(c={...this.options.interpolation.defaultVariables,...c}),e=this.interpolator.interpolate(e,c,n.lng||this.language,n),a){const t=e.match(this.interpolator.nestingRegexp);s<(t&&t.length)&&(n.nest=!1)}!n.lng&&"v1"!==this.options.compatibilityAPI&&r&&r.res&&(n.lng=r.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,r=new Array(e),a=0;a<e;a++)r[a]=arguments[a];return o&&o[0]===r[0]&&!n.context?(i.logger.warn("It seems you are nesting recursively key: ".concat(r[0]," in key: ").concat(t[0])),null):i.translate(...r,t)}),n)),n.interpolation&&this.interpolator.reset()}const a=n.postProcess||this.options.postProcess,s="string"===typeof a?[a]:a;return void 0!==e&&null!==e&&s&&s.length&&!1!==n.applyPostProcessor&&(e=we.handle(s,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e){let t,n,r,o,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"===typeof e&&(e=[e]),e.forEach((e=>{if(this.isValidLookup(t))return;const s=this.extractFromKey(e,a),c=s.key;n=c;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));const u=void 0!==a.count&&"string"!==typeof a.count,d=u&&!a.ordinal&&0===a.count&&this.pluralResolver.shouldUseIntlApi(),h=void 0!==a.context&&("string"===typeof a.context||"number"===typeof a.context)&&""!==a.context,p=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);l.forEach((e=>{this.isValidLookup(t)||(i=e,!Te["".concat(p[0],"-").concat(e)]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(i)&&(Te["".concat(p[0],"-").concat(e)]=!0,this.logger.warn('key "'.concat(n,'" for languages "').concat(p.join(", "),'" won\'t get resolved as namespace "').concat(i,'" 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!!!")),p.forEach((n=>{if(this.isValidLookup(t))return;o=n;const i=[c];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(i,c,n,e,a);else{let e;u&&(e=this.pluralResolver.getSuffix(n,a.count,a));const t="".concat(this.options.pluralSeparator,"zero"),r="".concat(this.options.pluralSeparator,"ordinal").concat(this.options.pluralSeparator);if(u&&(i.push(c+e),a.ordinal&&0===e.indexOf(r)&&i.push(c+e.replace(r,this.options.pluralSeparator)),d&&i.push(c+t)),h){const n="".concat(c).concat(this.options.contextSeparator).concat(a.context);i.push(n),u&&(i.push(n+e),a.ordinal&&0===e.indexOf(r)&&i.push(n+e.replace(r,this.options.pluralSeparator)),d&&i.push(n+t))}}let s;for(;s=i.pop();)this.isValidLookup(t)||(r=s,t=this.getResource(n,e,s,a))})))}))})),{res:t,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:i}}isValidLookup(e){return void 0!==e&&!(!this.options.returnNull&&null===e)&&!(!this.options.returnEmptyString&&""===e)}getResource(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&"string"!==typeof e.replace;let r=n?e.replace:e;if(n&&"undefined"!==typeof e.count&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(const e of t)delete r[e]}return r}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,12)&&void 0!==e[n])return!0;return!1}}function ke(e){return e.charAt(0).toUpperCase()+e.slice(1)}class Ee{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=oe.create("languageUtils")}getScriptPartFromCode(e){if(!(e=Ce(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=Ce(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if("string"===typeof e&&e.indexOf("-")>-1){const t=["hans","hant","latn","cyrl","cans","mong","arab"];let n=e.split("-");return this.options.lowerCaseLng?n=n.map((e=>e.toLowerCase())):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=ke(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=ke(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=ke(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach((e=>{if(t)return;const n=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(n)||(t=n)})),!t&&this.options.supportedLngs&&e.forEach((e=>{if(t)return;const n=this.getLanguagePartFromCode(e);if(this.isSupportedCode(n))return t=n;t=this.options.supportedLngs.find((e=>e===n?e:e.indexOf("-")<0&&n.indexOf("-")<0?void 0:0===e.indexOf(n)?e:void 0))})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"===typeof e&&(e=e(t)),"string"===typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),r=[],o=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"===typeof e&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):"string"===typeof e&&o(this.formatLanguageCode(e)),n.forEach((e=>{r.indexOf(e)<0&&o(this.formatLanguageCode(e))})),r}}let Ae=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],Ie={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}};const Re=["v1","v2","v3"],_e=["v4"],Ne={zero:0,one:1,two:2,few:3,many:4,other:5};class Oe{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=oe.create("pluralResolver"),this.options.compatibilityJSON&&!_e.includes(this.options.compatibilityJSON)||"undefined"!==typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=function(){const e={};return Ae.forEach((t=>{t.lngs.forEach((n=>{e[n]={numbers:t.nr,plurals:Ie[t.fc]}}))})),e}()}addRule(e,t){this.rules[e]=t}getRule(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(Ce("dev"===e?"en":e),{type:t.ordinal?"ordinal":"cardinal"})}catch(n){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map((e=>"".concat(t).concat(e)))}getSuffixes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getRule(e,t);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort(((e,t)=>Ne[e]-Ne[t])).map((e=>"".concat(this.options.prepend).concat(t.ordinal?"ordinal".concat(this.options.prepend):"").concat(e))):n.numbers.map((n=>this.getSuffix(e,n,t))):[]}getSuffix(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=this.getRule(e,n);return r?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(n.ordinal?"ordinal".concat(this.options.prepend):"").concat(r.select(t)):this.getSuffixRetroCompatible(r,t):(this.logger.warn("no plural rule found for: ".concat(e)),"")}getSuffixRetroCompatible(e,t){const n=e.noAbs?e.plurals(t):e.plurals(Math.abs(t));let r=e.numbers[n];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===r?r="plural":1===r&&(r=""));const o=()=>this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString();return"v1"===this.options.compatibilityJSON?1===r?"":"number"===typeof r?"_plural_".concat(r.toString()):o():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?o():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!Re.includes(this.options.compatibilityJSON)}}function Pe(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=function(e,t,n){const r=de(e,n);return void 0!==r?r:de(t,n)}(e,t,n);return!i&&o&&"string"===typeof n&&(i=ye(e,n,r),void 0===i&&(i=ye(t,n,r))),i}class xe{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=oe.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(e=>e),this.init(e)}init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const t=e.interpolation;this.escape=void 0!==t.escape?t.escape:ge,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?pe(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?pe(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?pe(t.nestingPrefix):t.nestingPrefixEscaped||pe("$t("),this.nestingSuffix=t.nestingSuffix?pe(t.nestingSuffix):t.nestingSuffixEscaped||pe(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>e&&e.source===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,"".concat(this.prefix,"(.+?)").concat(this.suffix)),this.regexpUnescape=e(this.regexpUnescape,"".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix)),this.nestingRegexp=e(this.nestingRegexp,"".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix))}interpolate(e,t,n,r){let o,i,a;const s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(e){return e.replace(/\$/g,"$$$$")}const l=e=>{if(e.indexOf(this.formatSeparator)<0){const o=Pe(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(o,void 0,n,{...r,...t,interpolationkey:e}):o}const o=e.split(this.formatSeparator),i=o.shift().trim(),a=o.join(this.formatSeparator).trim();return this.format(Pe(t,s,i,this.options.keySeparator,this.options.ignoreJSONStructure),a,n,{...r,...t,interpolationkey:i})};this.resetRegExp();const u=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,d=r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>c(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?c(this.escape(e)):c(e)}].forEach((t=>{for(a=0;o=t.regex.exec(e);){const n=o[1].trim();if(i=l(n),void 0===i)if("function"===typeof u){const t=u(e,o,r);i="string"===typeof t?t:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))i="";else{if(d){i=o[0];continue}this.logger.warn("missed to pass in variable ".concat(n," for interpolating ").concat(e)),i=""}else"string"===typeof i||this.useRawValueToEscape||(i=se(i));const s=t.safeValue(i);if(e=e.replace(o[0],s),d?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,a++,a>=this.maxReplaces)break}})),e}nest(e,t){let n,r,o,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};function a(e,t){const n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;const r=e.split(new RegExp("".concat(n,"[ ]*{")));let i="{".concat(r[1]);e=r[0],i=this.interpolate(i,o);const a=i.match(/'/g),s=i.match(/"/g);(a&&a.length%2===0&&!s||s.length%2!==0)&&(i=i.replace(/'/g,'"'));try{o=JSON.parse(i),t&&(o={...t,...o})}catch(c){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),c),"".concat(e).concat(n).concat(i)}return delete o.defaultValue,e}for(;n=this.nestingRegexp.exec(e);){let s=[];o={...i},o=o.replace&&"string"!==typeof o.replace?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let c=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){const e=n[1].split(this.formatSeparator).map((e=>e.trim()));n[1]=e.shift(),s=e,c=!0}if(r=t(a.call(this,n[1].trim(),o),o),r&&n[0]===e&&"string"!==typeof r)return r;"string"!==typeof r&&(r=se(r)),r||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),r=""),c&&(r=s.reduce(((e,t)=>this.format(e,t,i.lng,{...i,interpolationkey:n[1].trim()})),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}function Me(e){const t={};return function(n,r,o){const i=r+JSON.stringify(o);let a=t[i];return a||(a=e(Ce(r),o),t[i]=a),a(n)}}class Le{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=oe.create("formatter"),this.options=e,this.formats={number:Me(((e,t)=>{const n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)})),currency:Me(((e,t)=>{const n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)})),datetime:Me(((e,t)=>{const n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)})),relativetime:Me(((e,t)=>{const n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")})),list:Me(((e,t)=>{const n=new Intl.ListFormat(e,{...t});return e=>n.format(e)}))},this.init(e)}init(e){const t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Me(t)}format(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return t.split(this.formatSeparator).reduce(((e,t)=>{const{formatName:o,formatOptions:i}=function(e){let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);"currency"===t&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):"relativetime"===t&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach((e=>{if(!e)return;const[t,...r]=e.split(":"),o=r.join(":").trim().replace(/^'+|'+$/g,"");n[t.trim()]||(n[t.trim()]=o),"false"===o&&(n[t.trim()]=!1),"true"===o&&(n[t.trim()]=!0),isNaN(o)||(n[t.trim()]=parseInt(o,10))}))}return{formatName:t,formatOptions:n}}(t);if(this.formats[o]){let t=e;try{const a=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},s=a.locale||a.lng||r.locale||r.lng||n;t=this.formats[o](e,s,{...i,...r,...a})}catch(a){this.logger.warn(a)}return t}return this.logger.warn("there was no format function for ".concat(o)),e}),e)}}class qe extends ie{constructor(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=oe.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,r.backend,r)}queueLoad(e,t,n,r){const o={},i={},a={},s={};return e.forEach((e=>{let r=!0;t.forEach((t=>{const a="".concat(e,"|").concat(t);!n.reload&&this.store.hasResourceBundle(e,t)?this.state[a]=2:this.state[a]<0||(1===this.state[a]?void 0===i[a]&&(i[a]=!0):(this.state[a]=1,r=!1,void 0===i[a]&&(i[a]=!0),void 0===o[a]&&(o[a]=!0),void 0===s[t]&&(s[t]=!0)))})),r||(a[e]=!0)})),(Object.keys(o).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(o),pending:Object.keys(i),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){const r=e.split("|"),o=r[0],i=r[1];t&&this.emit("failedLoading",o,i,t),n&&this.store.addResourceBundle(o,i,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2;const a={};this.queue.forEach((n=>{!function(e,t,n,r){const{obj:o,k:i}=le(e,t,Object);o[i]=o[i]||[],r&&(o[i]=o[i].concat(n)),r||o[i].push(n)}(n.loaded,[o],i),function(e,t){void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)}(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach((e=>{a[e]||(a[e]={});const t=n.loaded[e];t.length&&t.forEach((t=>{void 0===a[e][t]&&(a[e][t]=!0)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((e=>!e.done))}read(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,i=arguments.length>5?arguments[5]:void 0;if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:o,callback:i});this.readingCalls++;const a=(a,s)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}a&&s&&r<this.maxRetries?setTimeout((()=>{this.read.call(this,e,t,n,r+1,2*o,i)}),o):i(a,s)},s=this.backend[n].bind(this.backend);if(2!==s.length)return s(e,t,a);try{const n=s(e,t);n&&"function"===typeof n.then?n.then((e=>a(null,e))).catch(a):a(null,n)}catch(c){a(c)}}prepareLoading(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=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."),r&&r();"string"===typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"===typeof t&&(t=[t]);const o=this.queueLoad(e,t,n,r);if(!o.toLoad.length)return o.pending.length||r(),null;o.toLoad.forEach((e=>{this.loadOne(e)}))}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=e.split("|"),r=n[0],o=n[1];this.read(r,o,"read",void 0,void 0,((n,i)=>{n&&this.logger.warn("".concat(t,"loading namespace ").concat(o," for language ").concat(r," failed"),n),!n&&i&&this.logger.log("".concat(t,"loaded namespace ").concat(o," for language ").concat(r),i),this.loaded(e,n,i)}))}saveMissing(e,t,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t))this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(t,'" 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!!!");else if(void 0!==n&&null!==n&&""!==n){if(this.backend&&this.backend.create){const c={...i,isUpdate:o},l=this.backend.create.bind(this.backend);if(l.length<6)try{let o;o=5===l.length?l(e,t,n,r,c):l(e,t,n,r),o&&"function"===typeof o.then?o.then((e=>a(null,e))).catch(a):a(null,o)}catch(s){a(s)}else l(e,t,n,r,a,c)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}}function De(){return{debug:!1,initImmediate:!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:function(e){let t={};if("object"===typeof e[1]&&(t=e[1]),"string"===typeof e[1]&&(t.defaultValue=e[1]),"string"===typeof e[2]&&(t.tDescription=e[2]),"object"===typeof e[2]||"object"===typeof e[3]){const n=e[3]||e[2];Object.keys(n).forEach((e=>{t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function Ue(e){return"string"===typeof e.ns&&(e.ns=[e.ns]),"string"===typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"===typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function He(){}class Fe extends ie{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;var n;if(super(),this.options=Ue(e),this.services={},this.logger=oe,this.modules={external:[]},n=this,Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach((e=>{"function"===typeof n[e]&&(n[e]=n[e].bind(n))})),t&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,t),this;setTimeout((()=>{this.init(e,t)}),0)}}init(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,"function"===typeof t&&(n=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&("string"===typeof t.ns?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const r=De();function o(e){return e?"function"===typeof e?new e:e:null}if(this.options={...r,...this.options,...Ue(t)},"v1"!==this.options.compatibilityAPI&&(this.options.interpolation={...r.interpolation,...this.options.interpolation}),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),!this.options.isClone){let t;this.modules.logger?oe.init(o(this.modules.logger),this.options):oe.init(null,this.options),this.modules.formatter?t=this.modules.formatter:"undefined"!==typeof Intl&&(t=Le);const n=new Ee(this.options);this.store=new be(this.options.resources,this.options);const i=this.services;i.logger=oe,i.resourceStore=this.store,i.languageUtils=n,i.pluralResolver=new Oe(n,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!t||this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format||(i.formatter=o(t),i.formatter.init(i,this.options),this.options.interpolation.format=i.formatter.format.bind(i.formatter)),i.interpolator=new xe(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new qe(o(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit(t,...r)})),this.modules.languageDetector&&(i.languageDetector=o(this.modules.languageDetector),i.languageDetector.init&&i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=o(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new Se(this.services,this.options),this.translator.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit(t,...r)})),this.modules.external.forEach((e=>{e.init&&e.init(this)}))}if(this.format=this.options.interpolation.format,n||(n=He),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[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((t=>{this[t]=function(){return e.store[t](...arguments)}}));["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((t=>{this[t]=function(){return e.store[t](...arguments),e}}));const i=ae(),a=()=>{const e=(e,t)=>{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),i.resolve(t),n(e,t)};if(this.languages&&"v1"!==this.options.compatibilityAPI&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initImmediate?a():setTimeout(a,0),i}loadResources(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:He;const n="string"===typeof e?e:this.language;if("function"===typeof e&&(t=e),!this.options.resources||this.options.partialBundledLanguages){if(n&&"cimode"===n.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return t();const e=[],r=t=>{if(!t)return;if("cimode"===t)return;this.services.languageUtils.toResolveHierarchy(t).forEach((t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)}))};if(n)r(n);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((e=>r(e)))}this.options.preload&&this.options.preload.forEach((e=>r(e))),this.services.backendConnector.load(e,this.options.ns,(e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),t(e)}))}else t(null)}reloadResources(e,t,n){const r=ae();return e||(e=this.languages),t||(t=this.options.ns),n||(n=He),this.services.backendConnector.reload(e,t,(e=>{r.resolve(),n(e)})),r}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"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&we.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(let t=0;t<this.languages.length;t++){const e=this.languages[t];if(!(["cimode","dev"].indexOf(e)>-1)&&this.store.hasLanguageSomeTranslations(e)){this.resolvedLanguage=e;break}}}changeLanguage(e,t){var n=this;this.isLanguageChangingTo=e;const r=ae();this.emit("languageChanging",e);const o=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(e,i)=>{i?(o(i),this.translator.changeLanguage(i),this.isLanguageChangingTo=void 0,this.emit("languageChanged",i),this.logger.log("languageChanged",i)):this.isLanguageChangingTo=void 0,r.resolve((function(){return n.t(...arguments)})),t&&t(e,(function(){return n.t(...arguments)}))},a=t=>{e||t||!this.services.languageDetector||(t=[]);const n="string"===typeof t?t:this.services.languageUtils.getBestMatchFromCodes(t);n&&(this.language||o(n),this.translator.language||this.translator.changeLanguage(n),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(n)),this.loadResources(n,(e=>{i(e,n)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e):a(this.services.languageDetector.detect()),r}getFixedT(e,t,n){var r=this;const o=function(e,t){let i;if("object"!==typeof t){for(var a=arguments.length,s=new Array(a>2?a-2:0),c=2;c<a;c++)s[c-2]=arguments[c];i=r.options.overloadTranslationOptionHandler([e,t].concat(s))}else i={...t};i.lng=i.lng||o.lng,i.lngs=i.lngs||o.lngs,i.ns=i.ns||o.ns,i.keyPrefix=i.keyPrefix||n||o.keyPrefix;const l=r.options.keySeparator||".";let u;return u=i.keyPrefix&&Array.isArray(e)?e.map((e=>"".concat(i.keyPrefix).concat(l).concat(e))):i.keyPrefix?"".concat(i.keyPrefix).concat(l).concat(e):e,r.t(u,i)};return"string"===typeof e?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=n,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&void 0!==arguments[1]?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 n=t.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const i=(e,t)=>{const n=this.services.backendConnector.state["".concat(e,"|").concat(t)];return-1===n||2===n};if(t.precheck){const e=t.precheck(this,i);if(void 0!==e)return e}return!!this.hasResourceBundle(n,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!i(n,e)||r&&!i(o,e)))}loadNamespaces(e,t){const n=ae();return this.options.ns?("string"===typeof e&&(e=[e]),e.forEach((e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)})),this.loadResources((e=>{n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=ae();"string"===typeof e&&(e=[e]);const r=this.options.preload||[],o=e.filter((e=>r.indexOf(e)<0));return o.length?(this.options.preload=r.concat(o),this.loadResources((e=>{n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const t=this.services&&this.services.languageUtils||new Ee(De());return["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"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){return new Fe(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}cloneInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:He;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},o=new Fe(r);void 0===e.debug&&void 0===e.prefix||(o.logger=o.logger.clone(e));return["store","services","language"].forEach((e=>{o[e]=this[e]})),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},n&&(o.store=new be(this.store.data,r),o.services.resourceStore=o.store),o.translator=new Se(o.services,r),o.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];o.emit(e,...n)})),o.init(r,t),o.translator.options=r,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 Be=Fe.createInstance();Be.createInstance=Fe.createInstance;Be.createInstance,Be.dir,Be.init,Be.loadResources,Be.reloadResources,Be.use,Be.changeLanguage,Be.getFixedT,Be.t,Be.exists,Be.setDefaultNamespace,Be.hasLoadedNamespace,Be.loadNamespaces,Be.loadLanguages;var Ke=n(9230);const je={en:{client:JSON.parse('{"filters":{"errors":{"empty":{"multiselect":"Please select at least one value for {{filterName}}."}}}}')}};Be.use(Ke.Db).init({lng:"en",debug:!0,resources:je,interpolation:{escapeValue:!1}});const ze=new X({defaultOptions:{queries:{refetchOnWindowFocus:!1}}}),We=e=>{let{msalInstance:n}=e;return(0,o.jsx)(te.rL,{instance:n,children:(0,o.jsx)(ee.aH,{client:ze,children:(0,o.jsx)(t.VK,{children:(0,o.jsx)(l,{})})})})},Ge=e=>{null!==e&&e instanceof Function&&n.e(496).then(n.bind(n,1496)).then((t=>{let{getCLS:n,getFID:r,getFCP:o,getLCP:i,getTTFB:a}=t;n(e),r(e),o(e),i(e),a(e)})).catch((e=>{console.error(e)}))};var Ve=n(9359);const Qe=document.getElementById("root");if(null===Qe)throw new Error("Can't find root element");e.createRoot(Qe).render((0,o.jsx)(We,{msalInstance:Ve.W})),Ge()})()})();
//# sourceMappingURL=main.f65a015c.js.map