@equinor/fusion-framework-cli 0.3.14 → 0.3.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -58,7 +58,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
58
58
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
59
59
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
60
60
|
PERFORMANCE OF THIS SOFTWARE.
|
|
61
|
-
***************************************************************************** */var Ed=function(t,e){return Ed=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},Ed(t,e)};function Mt(t,e){Ed(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var ve=function(){return ve=Object.assign||function(e){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},ve.apply(this,arguments)};function K(t,e,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(u){try{l(n.next(u))}catch(h){a(h)}}function c(u){try{l(n.throw(u))}catch(h){a(h)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((n=n.apply(t,e||[])).next())})}function G(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(l){return function(u){return c([l,u])}}function c(l){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=l[0]&2?o.return:l[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,l[1])).done)return i;switch(o=0,i&&(l=[l[0]&2,i.value]),l[0]){case 0:case 1:i=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,o=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]<i[3])){r.label=l[1];break}if(l[0]===6&&r.label<i[1]){r.label=i[1],i=l;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(l);break}i[2]&&r.ops.pop(),r.trys.pop();continue}l=e.call(t,r)}catch(u){l=[6,u],o=0}finally{n=i=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function yl(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;for(var n=Array(t),o=0,e=0;e<r;e++)for(var i=arguments[e],a=0,s=i.length;a<s;a++,o++)n[o]=i[a];return n}/*! @azure/msal-common v8.0.0 2022-11-07 */var _={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=",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:"",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",REGIONAL_AUTH_NON_MSI_QUERY_STRING:"allowestsrnonmsi=true",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},ts=[_.OPENID_SCOPE,_.PROFILE_SCOPE,_.OFFLINE_ACCESS_SCOPE],Tp=yl(ts,[_.EMAIL_SCOPE]),hr;(function(t){t.CONTENT_TYPE="Content-Type",t.RETRY_AFTER="Retry-After",t.CCS_HEADER="X-AnchorMailbox",t.WWWAuthenticate="WWW-Authenticate",t.AuthenticationInfo="Authentication-Info",t.X_MS_REQUEST_ID="x-ms-request-id"})(hr||(hr={}));var He;(function(t){t.ID_TOKEN="idtoken",t.CLIENT_INFO="client.info",t.ADAL_ID_TOKEN="adal.idtoken",t.ERROR="error",t.ERROR_DESC="error.description",t.ACTIVE_ACCOUNT="active-account",t.ACTIVE_ACCOUNT_FILTERS="active-account-filters"})(He||(He={}));var Mc;(function(t){t.COMMON="common",t.ORGANIZATIONS="organizations",t.CONSUMERS="consumers"})(Mc||(Mc={}));var Q;(function(t){t.CLIENT_ID="client_id",t.REDIRECT_URI="redirect_uri",t.RESPONSE_TYPE="response_type",t.RESPONSE_MODE="response_mode",t.GRANT_TYPE="grant_type",t.CLAIMS="claims",t.SCOPE="scope",t.ERROR="error",t.ERROR_DESCRIPTION="error_description",t.ACCESS_TOKEN="access_token",t.ID_TOKEN="id_token",t.REFRESH_TOKEN="refresh_token",t.EXPIRES_IN="expires_in",t.STATE="state",t.NONCE="nonce",t.PROMPT="prompt",t.SESSION_STATE="session_state",t.CLIENT_INFO="client_info",t.CODE="code",t.CODE_CHALLENGE="code_challenge",t.CODE_CHALLENGE_METHOD="code_challenge_method",t.CODE_VERIFIER="code_verifier",t.CLIENT_REQUEST_ID="client-request-id",t.X_CLIENT_SKU="x-client-SKU",t.X_CLIENT_VER="x-client-VER",t.X_CLIENT_OS="x-client-OS",t.X_CLIENT_CPU="x-client-CPU",t.X_CLIENT_CURR_TELEM="x-client-current-telemetry",t.X_CLIENT_LAST_TELEM="x-client-last-telemetry",t.X_MS_LIB_CAPABILITY="x-ms-lib-capability",t.X_APP_NAME="x-app-name",t.X_APP_VER="x-app-ver",t.POST_LOGOUT_URI="post_logout_redirect_uri",t.ID_TOKEN_HINT="id_token_hint",t.DEVICE_CODE="device_code",t.CLIENT_SECRET="client_secret",t.CLIENT_ASSERTION="client_assertion",t.CLIENT_ASSERTION_TYPE="client_assertion_type",t.TOKEN_TYPE="token_type",t.REQ_CNF="req_cnf",t.OBO_ASSERTION="assertion",t.REQUESTED_TOKEN_USE="requested_token_use",t.ON_BEHALF_OF="on_behalf_of",t.FOCI="foci",t.CCS_HEADER="X-AnchorMailbox",t.RETURN_SPA_CODE="return_spa_code",t.NATIVE_BROKER="nativebroker",t.LOGOUT_HINT="logout_hint"})(Q||(Q={}));var Vo;(function(t){t.ACCESS_TOKEN="access_token",t.XMS_CC="xms_cc"})(Vo||(Vo={}));var mt={LOGIN:"login",SELECT_ACCOUNT:"select_account",CONSENT:"consent",NONE:"none",CREATE:"create",NO_SESSION:"no_session"},ya;(function(t){t.ACCOUNT="account",t.SID="sid",t.LOGIN_HINT="login_hint",t.ID_TOKEN="id_token",t.DOMAIN_HINT="domain_hint",t.ORGANIZATIONS="organizations",t.CONSUMERS="consumers",t.ACCOUNT_ID="accountIdentifier",t.HOMEACCOUNT_ID="homeAccountIdentifier"})(ya||(ya={}));var bp={PLAIN:"plain",S256:"S256"},Uc;(function(t){t.QUERY="query",t.FRAGMENT="fragment",t.FORM_POST="form_post"})(Uc||(Uc={}));var Lc;(function(t){t.IMPLICIT_GRANT="implicit",t.AUTHORIZATION_CODE_GRANT="authorization_code",t.CLIENT_CREDENTIALS_GRANT="client_credentials",t.RESOURCE_OWNER_PASSWORD_GRANT="password",t.REFRESH_TOKEN_GRANT="refresh_token",t.DEVICE_CODE_GRANT="device_code",t.JWT_BEARER="urn:ietf:params:oauth:grant-type:jwt-bearer"})(Lc||(Lc={}));var Fr;(function(t){t.MSSTS_ACCOUNT_TYPE="MSSTS",t.ADFS_ACCOUNT_TYPE="ADFS",t.MSAV1_ACCOUNT_TYPE="MSA",t.GENERIC_ACCOUNT_TYPE="Generic"})(Fr||(Fr={}));var Ft;(function(t){t.CACHE_KEY_SEPARATOR="-",t.CLIENT_INFO_SEPARATOR="."})(Ft||(Ft={}));var ee;(function(t){t.ID_TOKEN="IdToken",t.ACCESS_TOKEN="AccessToken",t.ACCESS_TOKEN_WITH_AUTH_SCHEME="AccessToken_With_AuthScheme",t.REFRESH_TOKEN="RefreshToken"})(ee||(ee={}));var to;(function(t){t.ACCOUNT="Account",t.CREDENTIAL="Credential",t.ID_TOKEN="IdToken",t.ACCESS_TOKEN="AccessToken",t.REFRESH_TOKEN="RefreshToken",t.APP_METADATA="AppMetadata",t.TEMPORARY="TempCache",t.TELEMETRY="Telemetry",t.UNDEFINED="Undefined",t.THROTTLING="Throttling"})(to||(to={}));var Br;(function(t){t[t.ADFS=1001]="ADFS",t[t.MSA=1002]="MSA",t[t.MSSTS=1003]="MSSTS",t[t.GENERIC=1004]="GENERIC",t[t.ACCESS_TOKEN=2001]="ACCESS_TOKEN",t[t.REFRESH_TOKEN=2002]="REFRESH_TOKEN",t[t.ID_TOKEN=2003]="ID_TOKEN",t[t.APP_METADATA=3001]="APP_METADATA",t[t.UNDEFINED=9999]="UNDEFINED"})(Br||(Br={}));var Cd="appmetadata",AC="client_info",Dc="1",_a={CACHE_KEY:"authority-metadata",REFRESH_TIME_SECONDS:3600*24},qt;(function(t){t.CONFIG="config",t.CACHE="cache",t.NETWORK="network",t.HARDCODED_VALUES="hardcoded_values"})(qt||(qt={}));var Ye={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"},le;(function(t){t.BEARER="Bearer",t.POP="pop",t.SSH="ssh-cert"})(le||(le={}));var wa={DEFAULT_THROTTLE_TIME_SECONDS:60,DEFAULT_MAX_THROTTLE_TIME_SECONDS:3600,THROTTLING_PREFIX:"throttling",X_MS_LIB_CAPABILITY_VALUE:"retry-after, h429"},Ip={INVALID_GRANT_ERROR:"invalid_grant",CLIENT_MISMATCH_ERROR:"client_mismatch"},Hc;(function(t){t.username="username",t.password="password"})(Hc||(Hc={}));var Wo;(function(t){t[t.httpSuccess=200]="httpSuccess",t[t.httpBadRequest=400]="httpBadRequest"})(Wo||(Wo={}));var gn;(function(t){t.FAILED_AUTO_DETECTION="1",t.INTERNAL_CACHE="2",t.ENVIRONMENT_VARIABLE="3",t.IMDS="4"})(gn||(gn={}));var Gn;(function(t){t.CONFIGURED_MATCHES_DETECTED="1",t.CONFIGURED_NO_AUTO_DETECTION="2",t.CONFIGURED_NOT_DETECTED="3",t.AUTO_DETECTION_REQUESTED_SUCCESSFUL="4",t.AUTO_DETECTION_REQUESTED_FAILED="5"})(Gn||(Gn={}));var Jn;(function(t){t.NO_CACHE_HIT="0",t.FORCE_REFRESH="1",t.NO_CACHED_ACCESS_TOKEN="2",t.CACHED_ACCESS_TOKEN_EXPIRED="3",t.REFRESH_CACHED_ACCESS_TOKEN="4"})(Jn||(Jn={}));var Sd;(function(t){t.Jwt="JWT",t.Jwk="JWK"})(Sd||(Sd={}));/*! @azure/msal-common v8.0.0 2022-11-07 */var As={unexpectedError:{code:"unexpected_error",desc:"Unexpected error in authentication."},postRequestFailed:{code:"post_request_failed",desc:"Post request failed from the network, could be a 4xx/5xx or a network unavailability. Please check the exact error code for details."}},z=function(t){Mt(e,t);function e(r,n,o){var i=this,a=n?r+": "+n:r;return i=t.call(this,a)||this,Object.setPrototypeOf(i,e.prototype),i.errorCode=r||_.EMPTY_STRING,i.errorMessage=n||_.EMPTY_STRING,i.subError=o||_.EMPTY_STRING,i.name="AuthError",i}return e.prototype.setCorrelationId=function(r){this.correlationId=r},e.createUnexpectedError=function(r){return new e(As.unexpectedError.code,As.unexpectedError.desc+": "+r)},e.createPostRequestFailed=function(r){return new e(As.postRequestFailed.code,As.postRequestFailed.desc+": "+r)},e}(Error);/*! @azure/msal-common v8.0.0 2022-11-07 */var Fc={createNewGuid:function(){var t="Crypto interface - createNewGuid() has not been implemented";throw z.createUnexpectedError(t)},base64Decode:function(){var t="Crypto interface - base64Decode() has not been implemented";throw z.createUnexpectedError(t)},base64Encode:function(){var t="Crypto interface - base64Encode() has not been implemented";throw z.createUnexpectedError(t)},generatePkceCodes:function(){return K(this,void 0,void 0,function(){var t;return G(this,function(e){throw t="Crypto interface - generatePkceCodes() has not been implemented",z.createUnexpectedError(t)})})},getPublicKeyThumbprint:function(){return K(this,void 0,void 0,function(){var t;return G(this,function(e){throw t="Crypto interface - getPublicKeyThumbprint() has not been implemented",z.createUnexpectedError(t)})})},removeTokenBindingKey:function(){return K(this,void 0,void 0,function(){var t;return G(this,function(e){throw t="Crypto interface - removeTokenBindingKey() has not been implemented",z.createUnexpectedError(t)})})},clearKeystore:function(){return K(this,void 0,void 0,function(){var t;return G(this,function(e){throw t="Crypto interface - clearKeystore() has not been implemented",z.createUnexpectedError(t)})})},signJwt:function(){return K(this,void 0,void 0,function(){var t;return G(this,function(e){throw t="Crypto interface - signJwt() has not been implemented",z.createUnexpectedError(t)})})},hashString:function(){return K(this,void 0,void 0,function(){var t;return G(this,function(e){throw t="Crypto interface - hashString() has not been implemented",z.createUnexpectedError(t)})})}};/*! @azure/msal-common v8.0.0 2022-11-07 */var A={clientInfoDecodingError:{code:"client_info_decoding_error",desc:"The client info could not be parsed/decoded correctly. Please review the trace to determine the root cause."},clientInfoEmptyError:{code:"client_info_empty_error",desc:"The client info was empty. Please review the trace to determine the root cause."},tokenParsingError:{code:"token_parsing_error",desc:"Token cannot be parsed. Please review stack trace to determine root cause."},nullOrEmptyToken:{code:"null_or_empty_token",desc:"The token is null or empty. Please review the trace to determine the root cause."},endpointResolutionError:{code:"endpoints_resolution_error",desc:"Error: could not resolve endpoints. Please check network and try again."},networkError:{code:"network_error",desc:"Network request failed. Please check network trace to determine root cause."},unableToGetOpenidConfigError:{code:"openid_config_error",desc:"Could not retrieve endpoints. Check your authority and verify the .well-known/openid-configuration endpoint returns the required endpoints."},hashNotDeserialized:{code:"hash_not_deserialized",desc:"The hash parameters could not be deserialized. Please review the trace to determine the root cause."},blankGuidGenerated:{code:"blank_guid_generated",desc:"The guid generated was blank. Please review the trace to determine the root cause."},invalidStateError:{code:"invalid_state",desc:"State was not the expected format. Please check the logs to determine whether the request was sent using ProtocolUtils.setRequestState()."},stateMismatchError:{code:"state_mismatch",desc:"State mismatch error. Please check your network. Continued requests may cause cache overflow."},stateNotFoundError:{code:"state_not_found",desc:"State not found"},nonceMismatchError:{code:"nonce_mismatch",desc:"Nonce mismatch error. This may be caused by a race condition in concurrent requests."},nonceNotFoundError:{code:"nonce_not_found",desc:"nonce not found"},authTimeNotFoundError:{code:"auth_time_not_found",desc:"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."},maxAgeTranspiredError:{code:"max_age_transpired",desc:"Max Age is set to 0, or too much time has elapsed since the last end-user authentication."},noTokensFoundError:{code:"no_tokens_found",desc:"No tokens were found for the given scopes, and no authorization code was passed to acquireToken. You must retrieve an authorization code before making a call to acquireToken()."},multipleMatchingTokens:{code:"multiple_matching_tokens",desc:"The cache contains multiple tokens satisfying the requirements. Call AcquireToken again providing more requirements such as authority or account."},multipleMatchingAccounts:{code:"multiple_matching_accounts",desc:"The cache contains multiple accounts satisfying the given parameters. Please pass more info to obtain the correct account"},multipleMatchingAppMetadata:{code:"multiple_matching_appMetadata",desc:"The cache contains multiple appMetadata satisfying the given parameters. Please pass more info to obtain the correct appMetadata"},tokenRequestCannotBeMade:{code:"request_cannot_be_made",desc:"Token request cannot be made without authorization code or refresh token."},appendEmptyScopeError:{code:"cannot_append_empty_scope",desc:"Cannot append null or empty scope to ScopeSet. Please check the stack trace for more info."},removeEmptyScopeError:{code:"cannot_remove_empty_scope",desc:"Cannot remove null or empty scope from ScopeSet. Please check the stack trace for more info."},appendScopeSetError:{code:"cannot_append_scopeset",desc:"Cannot append ScopeSet due to error."},emptyInputScopeSetError:{code:"empty_input_scopeset",desc:"Empty input ScopeSet cannot be processed."},DeviceCodePollingCancelled:{code:"device_code_polling_cancelled",desc:"Caller has cancelled token endpoint polling during device code flow by setting DeviceCodeRequest.cancel = true."},DeviceCodeExpired:{code:"device_code_expired",desc:"Device code is expired."},DeviceCodeUnknownError:{code:"device_code_unknown_error",desc:"Device code stopped polling for unknown reasons."},NoAccountInSilentRequest:{code:"no_account_in_silent_request",desc:"Please pass an account object, silent flow is not supported without account information"},invalidCacheRecord:{code:"invalid_cache_record",desc:"Cache record object was null or undefined."},invalidCacheEnvironment:{code:"invalid_cache_environment",desc:"Invalid environment when attempting to create cache entry"},noAccountFound:{code:"no_account_found",desc:"No account found in cache for given key."},CachePluginError:{code:"no cache plugin set on CacheManager",desc:"ICachePlugin needs to be set before using readFromStorage or writeFromStorage"},noCryptoObj:{code:"no_crypto_object",desc:"No crypto object detected. This is required for the following operation: "},invalidCacheType:{code:"invalid_cache_type",desc:"Invalid cache type"},unexpectedAccountType:{code:"unexpected_account_type",desc:"Unexpected account type."},unexpectedCredentialType:{code:"unexpected_credential_type",desc:"Unexpected credential type."},invalidAssertion:{code:"invalid_assertion",desc:"Client assertion must meet requirements described in https://tools.ietf.org/html/rfc7515"},invalidClientCredential:{code:"invalid_client_credential",desc:"Client credential (secret, certificate, or assertion) must not be empty when creating a confidential client. An application should at most have one credential"},tokenRefreshRequired:{code:"token_refresh_required",desc:"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."},userTimeoutReached:{code:"user_timeout_reached",desc:"User defined timeout for device code polling reached"},tokenClaimsRequired:{code:"token_claims_cnf_required_for_signedjwt",desc:"Cannot generate a POP jwt if the token_claims are not populated"},noAuthorizationCodeFromServer:{code:"authorization_code_missing_from_server_response",desc:"Server response does not contain an authorization code to proceed"},noAzureRegionDetected:{code:"no_azure_region_detected",desc:"No azure region was detected and no fallback was made available"},accessTokenEntityNullError:{code:"access_token_entity_null",desc:"Access token entity is null, please check logs and cache to ensure a valid access token is present."},bindingKeyNotRemovedError:{code:"binding_key_not_removed",desc:"Could not remove the credential's binding key from storage."},logoutNotSupported:{code:"end_session_endpoint_not_supported",desc:"Provided authority does not support logout."},keyIdMissing:{code:"key_id_missing",desc:"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."}},D=function(t){Mt(e,t);function e(r,n){var o=t.call(this,r,n)||this;return o.name="ClientAuthError",Object.setPrototypeOf(o,e.prototype),o}return e.createClientInfoDecodingError=function(r){return new e(A.clientInfoDecodingError.code,A.clientInfoDecodingError.desc+" Failed with error: "+r)},e.createClientInfoEmptyError=function(){return new e(A.clientInfoEmptyError.code,""+A.clientInfoEmptyError.desc)},e.createTokenParsingError=function(r){return new e(A.tokenParsingError.code,A.tokenParsingError.desc+" Failed with error: "+r)},e.createTokenNullOrEmptyError=function(r){return new e(A.nullOrEmptyToken.code,A.nullOrEmptyToken.desc+" Raw Token Value: "+r)},e.createEndpointDiscoveryIncompleteError=function(r){return new e(A.endpointResolutionError.code,A.endpointResolutionError.desc+" Detail: "+r)},e.createNetworkError=function(r,n){return new e(A.networkError.code,A.networkError.desc+" | Fetch client threw: "+n+" | Attempted to reach: "+r.split("?")[0])},e.createUnableToGetOpenidConfigError=function(r){return new e(A.unableToGetOpenidConfigError.code,A.unableToGetOpenidConfigError.desc+" Attempted to retrieve endpoints from: "+r)},e.createHashNotDeserializedError=function(r){return new e(A.hashNotDeserialized.code,A.hashNotDeserialized.desc+" Given Object: "+r)},e.createInvalidStateError=function(r,n){return new e(A.invalidStateError.code,A.invalidStateError.desc+" Invalid State: "+r+", Root Err: "+n)},e.createStateMismatchError=function(){return new e(A.stateMismatchError.code,A.stateMismatchError.desc)},e.createStateNotFoundError=function(r){return new e(A.stateNotFoundError.code,A.stateNotFoundError.desc+": "+r)},e.createNonceMismatchError=function(){return new e(A.nonceMismatchError.code,A.nonceMismatchError.desc)},e.createAuthTimeNotFoundError=function(){return new e(A.authTimeNotFoundError.code,A.authTimeNotFoundError.desc)},e.createMaxAgeTranspiredError=function(){return new e(A.maxAgeTranspiredError.code,A.maxAgeTranspiredError.desc)},e.createNonceNotFoundError=function(r){return new e(A.nonceNotFoundError.code,A.nonceNotFoundError.desc+": "+r)},e.createMultipleMatchingTokensInCacheError=function(){return new e(A.multipleMatchingTokens.code,A.multipleMatchingTokens.desc+".")},e.createMultipleMatchingAccountsInCacheError=function(){return new e(A.multipleMatchingAccounts.code,A.multipleMatchingAccounts.desc)},e.createMultipleMatchingAppMetadataInCacheError=function(){return new e(A.multipleMatchingAppMetadata.code,A.multipleMatchingAppMetadata.desc)},e.createTokenRequestCannotBeMadeError=function(){return new e(A.tokenRequestCannotBeMade.code,A.tokenRequestCannotBeMade.desc)},e.createAppendEmptyScopeToSetError=function(r){return new e(A.appendEmptyScopeError.code,A.appendEmptyScopeError.desc+" Given Scope: "+r)},e.createRemoveEmptyScopeFromSetError=function(r){return new e(A.removeEmptyScopeError.code,A.removeEmptyScopeError.desc+" Given Scope: "+r)},e.createAppendScopeSetError=function(r){return new e(A.appendScopeSetError.code,A.appendScopeSetError.desc+" Detail Error: "+r)},e.createEmptyInputScopeSetError=function(){return new e(A.emptyInputScopeSetError.code,""+A.emptyInputScopeSetError.desc)},e.createDeviceCodeCancelledError=function(){return new e(A.DeviceCodePollingCancelled.code,""+A.DeviceCodePollingCancelled.desc)},e.createDeviceCodeExpiredError=function(){return new e(A.DeviceCodeExpired.code,""+A.DeviceCodeExpired.desc)},e.createDeviceCodeUnknownError=function(){return new e(A.DeviceCodeUnknownError.code,""+A.DeviceCodeUnknownError.desc)},e.createNoAccountInSilentRequestError=function(){return new e(A.NoAccountInSilentRequest.code,""+A.NoAccountInSilentRequest.desc)},e.createNullOrUndefinedCacheRecord=function(){return new e(A.invalidCacheRecord.code,A.invalidCacheRecord.desc)},e.createInvalidCacheEnvironmentError=function(){return new e(A.invalidCacheEnvironment.code,A.invalidCacheEnvironment.desc)},e.createNoAccountFoundError=function(){return new e(A.noAccountFound.code,A.noAccountFound.desc)},e.createCachePluginError=function(){return new e(A.CachePluginError.code,""+A.CachePluginError.desc)},e.createNoCryptoObjectError=function(r){return new e(A.noCryptoObj.code,""+A.noCryptoObj.desc+r)},e.createInvalidCacheTypeError=function(){return new e(A.invalidCacheType.code,""+A.invalidCacheType.desc)},e.createUnexpectedAccountTypeError=function(){return new e(A.unexpectedAccountType.code,""+A.unexpectedAccountType.desc)},e.createUnexpectedCredentialTypeError=function(){return new e(A.unexpectedCredentialType.code,""+A.unexpectedCredentialType.desc)},e.createInvalidAssertionError=function(){return new e(A.invalidAssertion.code,""+A.invalidAssertion.desc)},e.createInvalidCredentialError=function(){return new e(A.invalidClientCredential.code,""+A.invalidClientCredential.desc)},e.createRefreshRequiredError=function(){return new e(A.tokenRefreshRequired.code,A.tokenRefreshRequired.desc)},e.createUserTimeoutReachedError=function(){return new e(A.userTimeoutReached.code,A.userTimeoutReached.desc)},e.createTokenClaimsRequiredError=function(){return new e(A.tokenClaimsRequired.code,A.tokenClaimsRequired.desc)},e.createNoAuthCodeInServerResponseError=function(){return new e(A.noAuthorizationCodeFromServer.code,A.noAuthorizationCodeFromServer.desc)},e.createBindingKeyNotRemovedError=function(){return new e(A.bindingKeyNotRemovedError.code,A.bindingKeyNotRemovedError.desc)},e.createLogoutNotSupportedError=function(){return new e(A.logoutNotSupported.code,A.logoutNotSupported.desc)},e.createKeyIdMissingError=function(){return new e(A.keyIdMissing.code,A.keyIdMissing.desc)},e}(z);/*! @azure/msal-common v8.0.0 2022-11-07 */var x=function(){function t(){}return t.decodeAuthToken=function(e){if(t.isEmpty(e))throw D.createTokenNullOrEmptyError(e);var r=/^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/,n=r.exec(e);if(!n||n.length<4)throw D.createTokenParsingError("Given token is malformed: "+JSON.stringify(e));var o={header:n[1],JWSPayload:n[2],JWSSig:n[3]};return o},t.isEmpty=function(e){return typeof e>"u"||!e||e.length===0},t.isEmptyObj=function(e){if(e&&!t.isEmpty(e))try{var r=JSON.parse(e);return Object.keys(r).length===0}catch{}return!0},t.startsWith=function(e,r){return e.indexOf(r)===0},t.endsWith=function(e,r){return e.length>=r.length&&e.lastIndexOf(r)===e.length-r.length},t.queryStringToObject=function(e){var r={},n=e.split("&"),o=function(i){return decodeURIComponent(i.replace(/\+/g," "))};return n.forEach(function(i){if(i.trim()){var a=i.split(/=(.+)/g,2),s=a[0],c=a[1];s&&c&&(r[o(s)]=o(c))}}),r},t.trimArrayEntries=function(e){return e.map(function(r){return r.trim()})},t.removeEmptyStringsFromArray=function(e){return e.filter(function(r){return!t.isEmpty(r)})},t.jsonParseHelper=function(e){try{return JSON.parse(e)}catch{return null}},t.matchPattern=function(e,r){var n=new RegExp(e.replace(/\\/g,"\\\\").replace(/\*/g,"[^ ]*").replace(/\?/g,"\\?"));return n.test(r)},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var xe;(function(t){t[t.Error=0]="Error",t[t.Warning=1]="Warning",t[t.Info=2]="Info",t[t.Verbose=3]="Verbose",t[t.Trace=4]="Trace"})(xe||(xe={}));var jh=function(){function t(e,r,n){this.level=xe.Info;var o=function(){};this.localCallback=e.loggerCallback||o,this.piiLoggingEnabled=e.piiLoggingEnabled||!1,this.level=typeof e.logLevel=="number"?e.logLevel:xe.Info,this.correlationId=e.correlationId||_.EMPTY_STRING,this.packageName=r||_.EMPTY_STRING,this.packageVersion=n||_.EMPTY_STRING}return t.prototype.clone=function(e,r,n){return new t({loggerCallback:this.localCallback,piiLoggingEnabled:this.piiLoggingEnabled,logLevel:this.level,correlationId:n||this.correlationId},e,r)},t.prototype.logMessage=function(e,r){if(!(r.logLevel>this.level||!this.piiLoggingEnabled&&r.containsPii)){var n=new Date().toUTCString(),o;x.isEmpty(r.correlationId)?x.isEmpty(this.correlationId)?o="["+n+"]":o="["+n+"] : ["+this.correlationId+"]":o="["+n+"] : ["+r.correlationId+"]";var i=o+" : "+this.packageName+"@"+this.packageVersion+" : "+xe[r.logLevel]+" - "+e;this.executeCallback(r.logLevel,i,r.containsPii||!1)}},t.prototype.executeCallback=function(e,r,n){this.localCallback&&this.localCallback(e,r,n)},t.prototype.error=function(e,r){this.logMessage(e,{logLevel:xe.Error,containsPii:!1,correlationId:r||_.EMPTY_STRING})},t.prototype.errorPii=function(e,r){this.logMessage(e,{logLevel:xe.Error,containsPii:!0,correlationId:r||_.EMPTY_STRING})},t.prototype.warning=function(e,r){this.logMessage(e,{logLevel:xe.Warning,containsPii:!1,correlationId:r||_.EMPTY_STRING})},t.prototype.warningPii=function(e,r){this.logMessage(e,{logLevel:xe.Warning,containsPii:!0,correlationId:r||_.EMPTY_STRING})},t.prototype.info=function(e,r){this.logMessage(e,{logLevel:xe.Info,containsPii:!1,correlationId:r||_.EMPTY_STRING})},t.prototype.infoPii=function(e,r){this.logMessage(e,{logLevel:xe.Info,containsPii:!0,correlationId:r||_.EMPTY_STRING})},t.prototype.verbose=function(e,r){this.logMessage(e,{logLevel:xe.Verbose,containsPii:!1,correlationId:r||_.EMPTY_STRING})},t.prototype.verbosePii=function(e,r){this.logMessage(e,{logLevel:xe.Verbose,containsPii:!0,correlationId:r||_.EMPTY_STRING})},t.prototype.trace=function(e,r){this.logMessage(e,{logLevel:xe.Trace,containsPii:!1,correlationId:r||_.EMPTY_STRING})},t.prototype.tracePii=function(e,r){this.logMessage(e,{logLevel:xe.Trace,containsPii:!0,correlationId:r||_.EMPTY_STRING})},t.prototype.isPiiLoggingEnabled=function(){return this.piiLoggingEnabled||!1},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var RC="@azure/msal-common",Sy="8.0.0";/*! @azure/msal-common v8.0.0 2022-11-07 */var $a;(function(t){t[t.None=0]="None",t.AzurePublic="https://login.microsoftonline.com",t.AzurePpe="https://login.windows-ppe.net",t.AzureChina="https://login.chinacloudapi.cn",t.AzureGermany="https://login.microsoftonline.de",t.AzureUsGovernment="https://login.microsoftonline.us"})($a||($a={}));/*! @azure/msal-common v8.0.0 2022-11-07 */var za=function(){function t(){}return t.prototype.generateAccountId=function(){return t.generateAccountIdForCacheKey(this.homeAccountId,this.environment)},t.prototype.generateCredentialId=function(){return t.generateCredentialIdForCacheKey(this.credentialType,this.clientId,this.realm,this.familyId)},t.prototype.generateTarget=function(){return t.generateTargetForCacheKey(this.target)},t.prototype.generateCredentialKey=function(){return t.generateCredentialCacheKey(this.homeAccountId,this.environment,this.credentialType,this.clientId,this.realm,this.target,this.familyId,this.tokenType,this.requestedClaimsHash)},t.prototype.generateType=function(){switch(this.credentialType){case ee.ID_TOKEN:return Br.ID_TOKEN;case ee.ACCESS_TOKEN:case ee.ACCESS_TOKEN_WITH_AUTH_SCHEME:return Br.ACCESS_TOKEN;case ee.REFRESH_TOKEN:return Br.REFRESH_TOKEN;default:throw D.createUnexpectedCredentialTypeError()}},t.getCredentialType=function(e){return e.indexOf(ee.ACCESS_TOKEN.toLowerCase())!==-1?e.indexOf(ee.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase())!==-1?ee.ACCESS_TOKEN_WITH_AUTH_SCHEME:ee.ACCESS_TOKEN:e.indexOf(ee.ID_TOKEN.toLowerCase())!==-1?ee.ID_TOKEN:e.indexOf(ee.REFRESH_TOKEN.toLowerCase())!==-1?ee.REFRESH_TOKEN:_.NOT_DEFINED},t.generateCredentialCacheKey=function(e,r,n,o,i,a,s,c,l){var u=[this.generateAccountIdForCacheKey(e,r),this.generateCredentialIdForCacheKey(n,o,i,s),this.generateTargetForCacheKey(a),this.generateClaimsHashForCacheKey(l),this.generateSchemeForCacheKey(c)];return u.join(Ft.CACHE_KEY_SEPARATOR).toLowerCase()},t.generateAccountIdForCacheKey=function(e,r){var n=[e,r];return n.join(Ft.CACHE_KEY_SEPARATOR).toLowerCase()},t.generateCredentialIdForCacheKey=function(e,r,n,o){var i=e===ee.REFRESH_TOKEN&&o||r,a=[e,i,n||_.EMPTY_STRING];return a.join(Ft.CACHE_KEY_SEPARATOR).toLowerCase()},t.generateTargetForCacheKey=function(e){return(e||_.EMPTY_STRING).toLowerCase()},t.generateClaimsHashForCacheKey=function(e){return(e||_.EMPTY_STRING).toLowerCase()},t.generateSchemeForCacheKey=function(e){return e&&e.toLowerCase()!==le.BEARER.toLowerCase()?e.toLowerCase():_.EMPTY_STRING},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var Y={redirectUriNotSet:{code:"redirect_uri_empty",desc:"A redirect URI is required for all calls, and none has been set."},postLogoutUriNotSet:{code:"post_logout_uri_empty",desc:"A post logout redirect has not been set."},claimsRequestParsingError:{code:"claims_request_parsing_error",desc:"Could not parse the given claims request object."},authorityUriInsecure:{code:"authority_uri_insecure",desc:"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"},urlParseError:{code:"url_parse_error",desc:"URL could not be parsed into appropriate segments."},urlEmptyError:{code:"empty_url_error",desc:"URL was empty or null."},emptyScopesError:{code:"empty_input_scopes_error",desc:"Scopes cannot be passed as null, undefined or empty array because they are required to obtain an access token."},nonArrayScopesError:{code:"nonarray_input_scopes_error",desc:"Scopes cannot be passed as non-array."},clientIdSingleScopeError:{code:"clientid_input_scopes_error",desc:"Client ID can only be provided as a single scope."},invalidPrompt:{code:"invalid_prompt_value",desc:"Supported prompt values are 'login', 'select_account', 'consent', 'create', 'none' and 'no_session'. Please see here for valid configuration options: https://azuread.github.io/microsoft-authentication-library-for-js/ref/modules/_azure_msal_common.html#commonauthorizationurlrequest"},invalidClaimsRequest:{code:"invalid_claims",desc:"Given claims parameter must be a stringified JSON object."},tokenRequestEmptyError:{code:"token_request_empty",desc:"Token request was empty and not found in cache."},logoutRequestEmptyError:{code:"logout_request_empty",desc:"The logout request was null or undefined."},invalidCodeChallengeMethod:{code:"invalid_code_challenge_method",desc:'code_challenge_method passed is invalid. Valid values are "plain" and "S256".'},invalidCodeChallengeParams:{code:"pkce_params_missing",desc:"Both params: code_challenge and code_challenge_method are to be passed if to be sent in the request"},invalidCloudDiscoveryMetadata:{code:"invalid_cloud_discovery_metadata",desc:"Invalid cloudDiscoveryMetadata provided. Must be a stringified JSON object containing tenant_discovery_endpoint and metadata fields"},invalidAuthorityMetadata:{code:"invalid_authority_metadata",desc:"Invalid authorityMetadata provided. Must by a stringified JSON object containing authorization_endpoint, token_endpoint, issuer fields."},untrustedAuthority:{code:"untrusted_authority",desc:"The provided authority is not a trusted authority. Please include this authority in the knownAuthorities config parameter."},invalidAzureCloudInstance:{code:"invalid_azure_cloud_instance",desc:"Invalid AzureCloudInstance provided. Please refer MSAL JS docs: aks.ms/msaljs/azure_cloud_instance for valid values"},missingSshJwk:{code:"missing_ssh_jwk",desc:"Missing sshJwk in SSH certificate request. A stringified JSON Web Key is required when using the SSH authentication scheme."},missingSshKid:{code:"missing_ssh_kid",desc:"Missing sshKid in SSH certificate request. A string that uniquely identifies the public SSH key is required when using the SSH authentication scheme."},missingNonceAuthenticationHeader:{code:"missing_nonce_authentication_header",desc:"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."},invalidAuthenticationHeader:{code:"invalid_authentication_header",desc:"Invalid authentication header provided"}},Ee=function(t){Mt(e,t);function e(r,n){var o=t.call(this,r,n)||this;return o.name="ClientConfigurationError",Object.setPrototypeOf(o,e.prototype),o}return e.createRedirectUriEmptyError=function(){return new e(Y.redirectUriNotSet.code,Y.redirectUriNotSet.desc)},e.createPostLogoutRedirectUriEmptyError=function(){return new e(Y.postLogoutUriNotSet.code,Y.postLogoutUriNotSet.desc)},e.createClaimsRequestParsingError=function(r){return new e(Y.claimsRequestParsingError.code,Y.claimsRequestParsingError.desc+" Given value: "+r)},e.createInsecureAuthorityUriError=function(r){return new e(Y.authorityUriInsecure.code,Y.authorityUriInsecure.desc+" Given URI: "+r)},e.createUrlParseError=function(r){return new e(Y.urlParseError.code,Y.urlParseError.desc+" Given Error: "+r)},e.createUrlEmptyError=function(){return new e(Y.urlEmptyError.code,Y.urlEmptyError.desc)},e.createEmptyScopesArrayError=function(){return new e(Y.emptyScopesError.code,""+Y.emptyScopesError.desc)},e.createClientIdSingleScopeError=function(r){return new e(Y.clientIdSingleScopeError.code,Y.clientIdSingleScopeError.desc+" Given Scopes: "+r)},e.createInvalidPromptError=function(r){return new e(Y.invalidPrompt.code,Y.invalidPrompt.desc+" Given value: "+r)},e.createInvalidClaimsRequestError=function(){return new e(Y.invalidClaimsRequest.code,Y.invalidClaimsRequest.desc)},e.createEmptyLogoutRequestError=function(){return new e(Y.logoutRequestEmptyError.code,Y.logoutRequestEmptyError.desc)},e.createEmptyTokenRequestError=function(){return new e(Y.tokenRequestEmptyError.code,Y.tokenRequestEmptyError.desc)},e.createInvalidCodeChallengeMethodError=function(){return new e(Y.invalidCodeChallengeMethod.code,Y.invalidCodeChallengeMethod.desc)},e.createInvalidCodeChallengeParamsError=function(){return new e(Y.invalidCodeChallengeParams.code,Y.invalidCodeChallengeParams.desc)},e.createInvalidCloudDiscoveryMetadataError=function(){return new e(Y.invalidCloudDiscoveryMetadata.code,Y.invalidCloudDiscoveryMetadata.desc)},e.createInvalidAuthorityMetadataError=function(){return new e(Y.invalidAuthorityMetadata.code,Y.invalidAuthorityMetadata.desc)},e.createUntrustedAuthorityError=function(){return new e(Y.untrustedAuthority.code,Y.untrustedAuthority.desc)},e.createInvalidAzureCloudInstanceError=function(){return new e(Y.invalidAzureCloudInstance.code,Y.invalidAzureCloudInstance.desc)},e.createMissingSshJwkError=function(){return new e(Y.missingSshJwk.code,Y.missingSshJwk.desc)},e.createMissingSshKidError=function(){return new e(Y.missingSshKid.code,Y.missingSshKid.desc)},e.createMissingNonceAuthenticationHeadersError=function(){return new e(Y.missingNonceAuthenticationHeader.code,Y.missingNonceAuthenticationHeader.desc)},e.createInvalidAuthenticationHeaderError=function(r,n){return new e(Y.invalidAuthenticationHeader.code,Y.invalidAuthenticationHeader.desc+". Invalid header: "+r+". Details: "+n)},e}(D);/*! @azure/msal-common v8.0.0 2022-11-07 */var Ct=function(){function t(e){var r=this,n=e?x.trimArrayEntries(yl(e)):[],o=n?x.removeEmptyStringsFromArray(n):[];this.validateInputScopes(o),this.scopes=new Set,o.forEach(function(i){return r.scopes.add(i)})}return t.fromString=function(e){var r=e||_.EMPTY_STRING,n=r.split(" ");return new t(n)},t.prototype.validateInputScopes=function(e){if(!e||e.length<1)throw Ee.createEmptyScopesArrayError()},t.prototype.containsScope=function(e){var r=this.printScopesLowerCase().split(" "),n=new t(r);return x.isEmpty(e)?!1:n.scopes.has(e.toLowerCase())},t.prototype.containsScopeSet=function(e){var r=this;return!e||e.scopes.size<=0?!1:this.scopes.size>=e.scopes.size&&e.asArray().every(function(n){return r.containsScope(n)})},t.prototype.containsOnlyOIDCScopes=function(){var e=this,r=0;return Tp.forEach(function(n){e.containsScope(n)&&(r+=1)}),this.scopes.size===r},t.prototype.appendScope=function(e){x.isEmpty(e)||this.scopes.add(e.trim())},t.prototype.appendScopes=function(e){var r=this;try{e.forEach(function(n){return r.appendScope(n)})}catch(n){throw D.createAppendScopeSetError(n)}},t.prototype.removeScope=function(e){if(x.isEmpty(e))throw D.createRemoveEmptyScopeFromSetError(e);this.scopes.delete(e.trim())},t.prototype.removeOIDCScopes=function(){var e=this;Tp.forEach(function(r){e.scopes.delete(r)})},t.prototype.unionScopeSets=function(e){if(!e)throw D.createEmptyInputScopeSetError();var r=new Set;return e.scopes.forEach(function(n){return r.add(n.toLowerCase())}),this.scopes.forEach(function(n){return r.add(n.toLowerCase())}),r},t.prototype.intersectingScopeSets=function(e){if(!e)throw D.createEmptyInputScopeSetError();e.containsOnlyOIDCScopes()||e.removeOIDCScopes();var r=this.unionScopeSets(e),n=e.getScopeCount(),o=this.getScopeCount(),i=r.size;return i<o+n},t.prototype.getScopeCount=function(){return this.scopes.size},t.prototype.asArray=function(){var e=[];return this.scopes.forEach(function(r){return e.push(r)}),e},t.prototype.printScopes=function(){if(this.scopes){var e=this.asArray();return e.join(" ")}return _.EMPTY_STRING},t.prototype.printScopesLowerCase=function(){return this.printScopes().toLowerCase()},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */function $c(t,e){if(x.isEmpty(t))throw D.createClientInfoEmptyError();try{var r=e.base64Decode(t);return JSON.parse(r)}catch(n){throw D.createClientInfoDecodingError(n.message)}}function Yo(t){if(x.isEmpty(t))throw D.createClientInfoDecodingError("Home account ID was empty.");var e=t.split(Ft.CLIENT_INFO_SEPARATOR,2);return{uid:e[0],utid:e.length<2?_.EMPTY_STRING:e[1]}}/*! @azure/msal-common v8.0.0 2022-11-07 */var Wt;(function(t){t[t.Default=0]="Default",t[t.Adfs=1]="Adfs",t[t.Dsts=2]="Dsts"})(Wt||(Wt={}));/*! @azure/msal-common v8.0.0 2022-11-07 */var tt=function(){function t(){}return t.prototype.generateAccountId=function(){var e=[this.homeAccountId,this.environment];return e.join(Ft.CACHE_KEY_SEPARATOR).toLowerCase()},t.prototype.generateAccountKey=function(){return t.generateAccountCacheKey({homeAccountId:this.homeAccountId,environment:this.environment,tenantId:this.realm,username:this.username,localAccountId:this.localAccountId})},t.prototype.generateType=function(){switch(this.authorityType){case Fr.ADFS_ACCOUNT_TYPE:return Br.ADFS;case Fr.MSAV1_ACCOUNT_TYPE:return Br.MSA;case Fr.MSSTS_ACCOUNT_TYPE:return Br.MSSTS;case Fr.GENERIC_ACCOUNT_TYPE:return Br.GENERIC;default:throw D.createUnexpectedAccountTypeError()}},t.prototype.getAccountInfo=function(){return{homeAccountId:this.homeAccountId,environment:this.environment,tenantId:this.realm,username:this.username,localAccountId:this.localAccountId,name:this.name,idTokenClaims:this.idTokenClaims,nativeAccountId:this.nativeAccountId}},t.generateAccountCacheKey=function(e){var r=[e.homeAccountId,e.environment||_.EMPTY_STRING,e.tenantId||_.EMPTY_STRING];return r.join(Ft.CACHE_KEY_SEPARATOR).toLowerCase()},t.createAccount=function(e,r,n,o,i,a,s,c){var l,u,h,d,f,m,v=new t;v.authorityType=Fr.MSSTS_ACCOUNT_TYPE,v.clientInfo=e,v.homeAccountId=r,v.nativeAccountId=c;var E=s||o&&o.getPreferredCache();if(!E)throw D.createInvalidCacheEnvironmentError();if(v.environment=E,v.realm=((l=n==null?void 0:n.claims)===null||l===void 0?void 0:l.tid)||_.EMPTY_STRING,n){v.idTokenClaims=n.claims,v.localAccountId=((u=n==null?void 0:n.claims)===null||u===void 0?void 0:u.oid)||((h=n==null?void 0:n.claims)===null||h===void 0?void 0:h.sub)||_.EMPTY_STRING;var g=(d=n==null?void 0:n.claims)===null||d===void 0?void 0:d.preferred_username,p=!((f=n==null?void 0:n.claims)===null||f===void 0)&&f.emails?n.claims.emails[0]:null;v.username=g||p||_.EMPTY_STRING,v.name=(m=n==null?void 0:n.claims)===null||m===void 0?void 0:m.name}return v.cloudGraphHostName=i,v.msGraphHost=a,v},t.createGenericAccount=function(e,r,n,o,i,a){var s,c,l,u,h=new t;h.authorityType=n&&n.authorityType===Wt.Adfs?Fr.ADFS_ACCOUNT_TYPE:Fr.GENERIC_ACCOUNT_TYPE,h.homeAccountId=e,h.realm=_.EMPTY_STRING;var d=a||n&&n.getPreferredCache();if(!d)throw D.createInvalidCacheEnvironmentError();return r&&(h.localAccountId=((s=r==null?void 0:r.claims)===null||s===void 0?void 0:s.oid)||((c=r==null?void 0:r.claims)===null||c===void 0?void 0:c.sub)||_.EMPTY_STRING,h.username=((l=r==null?void 0:r.claims)===null||l===void 0?void 0:l.upn)||_.EMPTY_STRING,h.name=((u=r==null?void 0:r.claims)===null||u===void 0?void 0:u.name)||_.EMPTY_STRING,h.idTokenClaims=r==null?void 0:r.claims),h.environment=d,h.cloudGraphHostName=o,h.msGraphHost=i,h},t.generateHomeAccountId=function(e,r,n,o,i){var a,s=!((a=i==null?void 0:i.claims)===null||a===void 0)&&a.sub?i.claims.sub:_.EMPTY_STRING;if(r===Wt.Adfs||r===Wt.Dsts)return s;if(e)try{var c=$c(e,o);if(!x.isEmpty(c.uid)&&!x.isEmpty(c.utid))return""+c.uid+Ft.CLIENT_INFO_SEPARATOR+c.utid}catch{}return n.verbose("No client info in response"),s},t.isAccountEntity=function(e){return e?e.hasOwnProperty("homeAccountId")&&e.hasOwnProperty("environment")&&e.hasOwnProperty("realm")&&e.hasOwnProperty("localAccountId")&&e.hasOwnProperty("username")&&e.hasOwnProperty("authorityType"):!1},t.accountInfoIsEqual=function(e,r,n){if(!e||!r)return!1;var o=!0;if(n){var i=e.idTokenClaims||{},a=r.idTokenClaims||{};o=i.iat===a.iat&&i.nonce===a.nonce}return e.homeAccountId===r.homeAccountId&&e.localAccountId===r.localAccountId&&e.username===r.username&&e.tenantId===r.tenantId&&e.environment===r.environment&&e.nativeAccountId===r.nativeAccountId&&o},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var kr=function(){function t(e,r){if(x.isEmpty(e))throw D.createTokenNullOrEmptyError(e);this.rawToken=e,this.claims=t.extractTokenClaims(e,r)}return t.extractTokenClaims=function(e,r){var n=x.decodeAuthToken(e);try{var o=n.JWSPayload,i=r.base64Decode(o);return JSON.parse(i)}catch(a){throw D.createTokenParsingError(a)}},t.checkMaxAge=function(e,r){var n=3e5;if(r===0||Date.now()-n>e+r)throw D.createMaxAgeTranspiredError()},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var or=function(){function t(e,r){this.clientId=e,this.cryptoImpl=r}return t.prototype.getAllAccounts=function(){var e=this,r=this.getAccountsFilteredBy(),n=Object.keys(r).map(function(a){return r[a]}),o=n.length;if(o<1)return[];var i=n.map(function(a){var s=t.toObject(new tt,a),c=s.getAccountInfo(),l=e.readIdTokenFromCache(e.clientId,c);return l&&!c.idTokenClaims&&(c.idToken=l.secret,c.idTokenClaims=new kr(l.secret,e.cryptoImpl).claims),c});return i},t.prototype.saveCacheRecord=function(e){return K(this,void 0,void 0,function(){return G(this,function(r){switch(r.label){case 0:if(!e)throw D.createNullOrUndefinedCacheRecord();return e.account&&this.setAccount(e.account),e.idToken&&this.setIdTokenCredential(e.idToken),e.accessToken?[4,this.saveAccessToken(e.accessToken)]:[3,2];case 1:r.sent(),r.label=2;case 2:return e.refreshToken&&this.setRefreshTokenCredential(e.refreshToken),e.appMetadata&&this.setAppMetadata(e.appMetadata),[2]}})})},t.prototype.saveAccessToken=function(e){return K(this,void 0,void 0,function(){var r,n,o,i,a=this;return G(this,function(s){switch(s.label){case 0:return r=this.getCredentialsFilteredBy({clientId:e.clientId,credentialType:e.credentialType,environment:e.environment,homeAccountId:e.homeAccountId,realm:e.realm,tokenType:e.tokenType,requestedClaimsHash:e.requestedClaimsHash}),n=Ct.fromString(e.target),o=Object.keys(r.accessTokens).map(function(c){return r.accessTokens[c]}),o?(i=[],o.forEach(function(c){var l=Ct.fromString(c.target);l.intersectingScopeSets(n)&&i.push(a.removeCredential(c))}),[4,Promise.all(i)]):[3,2];case 1:s.sent(),s.label=2;case 2:return this.setAccessTokenCredential(e),[2]}})})},t.prototype.getAccountsFilteredBy=function(e){return this.getAccountsFilteredByInternal(e?e.homeAccountId:_.EMPTY_STRING,e?e.environment:_.EMPTY_STRING,e?e.realm:_.EMPTY_STRING,e?e.nativeAccountId:_.EMPTY_STRING)},t.prototype.getAccountsFilteredByInternal=function(e,r,n,o){var i=this,a=this.getKeys(),s={};return a.forEach(function(c){var l=i.getAccount(c);!l||!!e&&!i.matchHomeAccountId(l,e)||!!r&&!i.matchEnvironment(l,r)||!!n&&!i.matchRealm(l,n)||!!o&&!i.matchNativeAccountId(l,o)||(s[c]=l)}),s},t.prototype.getCredentialsFilteredBy=function(e){return this.getCredentialsFilteredByInternal(e.homeAccountId,e.environment,e.credentialType,e.clientId,e.familyId,e.realm,e.target,e.userAssertionHash,e.tokenType,e.keyId,e.requestedClaimsHash)},t.prototype.getCredentialsFilteredByInternal=function(e,r,n,o,i,a,s,c,l,u,h){var d=this,f=this.getKeys(),m={idTokens:{},accessTokens:{},refreshTokens:{}};return f.forEach(function(v){var E=za.getCredentialType(v);if(E!==_.NOT_DEFINED){var g=d.getSpecificCredential(v,E);if(!!g&&!(!!c&&!d.matchUserAssertionHash(g,c))&&!(typeof e=="string"&&!d.matchHomeAccountId(g,e))&&!(!!r&&!d.matchEnvironment(g,r))&&!(!!a&&!d.matchRealm(g,a))&&!(!!n&&!d.matchCredentialType(g,n))&&!(!!o&&!d.matchClientId(g,o))&&!(!!i&&!d.matchFamilyId(g,i))&&!(!!s&&!d.matchTarget(g,s))&&!((h||g.requestedClaimsHash)&&g.requestedClaimsHash!==h)&&!(n===ee.ACCESS_TOKEN_WITH_AUTH_SCHEME&&(!!l&&!d.matchTokenType(g,l)||l===le.SSH&&u&&!d.matchKeyId(g,u)))){var p=d.updateCredentialCacheKey(v,g);switch(E){case ee.ID_TOKEN:m.idTokens[p]=g;break;case ee.ACCESS_TOKEN:case ee.ACCESS_TOKEN_WITH_AUTH_SCHEME:m.accessTokens[p]=g;break;case ee.REFRESH_TOKEN:m.refreshTokens[p]=g;break}}}}),m},t.prototype.getAppMetadataFilteredBy=function(e){return this.getAppMetadataFilteredByInternal(e.environment,e.clientId)},t.prototype.getAppMetadataFilteredByInternal=function(e,r){var n=this,o=this.getKeys(),i={};return o.forEach(function(a){if(!!n.isAppMetadata(a)){var s=n.getAppMetadata(a);!s||!!e&&!n.matchEnvironment(s,e)||!!r&&!n.matchClientId(s,r)||(i[a]=s)}}),i},t.prototype.getAuthorityMetadataByAlias=function(e){var r=this,n=this.getAuthorityMetadataKeys(),o=null;return n.forEach(function(i){if(!(!r.isAuthorityMetadata(i)||i.indexOf(r.clientId)===-1)){var a=r.getAuthorityMetadata(i);!a||a.aliases.indexOf(e)!==-1&&(o=a)}}),o},t.prototype.removeAllAccounts=function(){return K(this,void 0,void 0,function(){var e,r,n=this;return G(this,function(o){switch(o.label){case 0:return e=this.getKeys(),r=[],e.forEach(function(i){var a=n.getAccount(i);!a||r.push(n.removeAccount(i))}),[4,Promise.all(r)];case 1:return o.sent(),[2,!0]}})})},t.prototype.removeAccount=function(e){return K(this,void 0,void 0,function(){var r;return G(this,function(n){switch(n.label){case 0:if(r=this.getAccount(e),!r)throw D.createNoAccountFoundError();return[4,this.removeAccountContext(r)];case 1:return[2,n.sent()&&this.removeItem(e,to.ACCOUNT)]}})})},t.prototype.removeAccountContext=function(e){return K(this,void 0,void 0,function(){var r,n,o,i=this;return G(this,function(a){switch(a.label){case 0:return r=this.getKeys(),n=e.generateAccountId(),o=[],r.forEach(function(s){var c=za.getCredentialType(s);if(c!==_.NOT_DEFINED){var l=i.getSpecificCredential(s,c);!!l&&n===l.generateAccountId()&&o.push(i.removeCredential(l))}}),[4,Promise.all(o)];case 1:return a.sent(),[2,!0]}})})},t.prototype.removeCredential=function(e){return K(this,void 0,void 0,function(){var r,n,o;return G(this,function(i){switch(i.label){case 0:if(r=e.generateCredentialKey(),e.credentialType.toLowerCase()!==ee.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase())return[3,4];if(e.tokenType!==le.POP)return[3,4];if(n=e,o=n.keyId,!o)return[3,4];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.cryptoImpl.removeTokenBindingKey(o)];case 2:return i.sent(),[3,4];case 3:throw i.sent(),D.createBindingKeyNotRemovedError();case 4:return[2,this.removeItem(r,to.CREDENTIAL)]}})})},t.prototype.removeAppMetadata=function(){var e=this,r=this.getKeys();return r.forEach(function(n){e.isAppMetadata(n)&&e.removeItem(n,to.APP_METADATA)}),!0},t.prototype.readCacheRecord=function(e,r,n,o){var i=this.readAccountFromCache(e),a=this.readIdTokenFromCache(r,e),s=this.readAccessTokenFromCache(r,e,n),c=this.readRefreshTokenFromCache(r,e,!1),l=this.readAppMetadataFromCache(o,r);return i&&a&&(i.idTokenClaims=new kr(a.secret,this.cryptoImpl).claims),{account:i,idToken:a,accessToken:s,refreshToken:c,appMetadata:l}},t.prototype.readAccountFromCache=function(e){var r=tt.generateAccountCacheKey(e);return this.getAccount(r)},t.prototype.readAccountFromCacheWithNativeAccountId=function(e){var r={nativeAccountId:e},n=this.getAccountsFilteredBy(r),o=Object.keys(n).map(function(i){return n[i]});if(o.length<1)return null;if(o.length>1)throw D.createMultipleMatchingAccountsInCacheError();return n[0]},t.prototype.readIdTokenFromCache=function(e,r){var n={homeAccountId:r.homeAccountId,environment:r.environment,credentialType:ee.ID_TOKEN,clientId:e,realm:r.tenantId},o=this.getCredentialsFilteredBy(n),i=Object.keys(o.idTokens).map(function(s){return o.idTokens[s]}),a=i.length;if(a<1)return null;if(a>1)throw D.createMultipleMatchingTokensInCacheError();return i[0]},t.prototype.readAccessTokenFromCache=function(e,r,n){var o=new Ct(n.scopes||[]),i=n.authenticationScheme||le.BEARER,a=i&&i.toLowerCase()!==le.BEARER.toLowerCase()?ee.ACCESS_TOKEN_WITH_AUTH_SCHEME:ee.ACCESS_TOKEN,s={homeAccountId:r.homeAccountId,environment:r.environment,credentialType:a,clientId:e,realm:r.tenantId,target:o.printScopesLowerCase(),tokenType:i,keyId:n.sshKid,requestedClaimsHash:n.requestedClaimsHash},c=this.getCredentialsFilteredBy(s),l=Object.keys(c.accessTokens).map(function(h){return c.accessTokens[h]}),u=l.length;if(u<1)return null;if(u>1)throw D.createMultipleMatchingTokensInCacheError();return l[0]},t.prototype.readRefreshTokenFromCache=function(e,r,n){var o=n?Dc:void 0,i={homeAccountId:r.homeAccountId,environment:r.environment,credentialType:ee.REFRESH_TOKEN,clientId:e,familyId:o},a=this.getCredentialsFilteredBy(i),s=Object.keys(a.refreshTokens).map(function(l){return a.refreshTokens[l]}),c=s.length;return c<1?null:s[0]},t.prototype.readAppMetadataFromCache=function(e,r){var n={environment:e,clientId:r},o=this.getAppMetadataFilteredBy(n),i=Object.keys(o).map(function(s){return o[s]}),a=i.length;if(a<1)return null;if(a>1)throw D.createMultipleMatchingAppMetadataInCacheError();return i[0]},t.prototype.isAppMetadataFOCI=function(e,r){var n=this.readAppMetadataFromCache(e,r);return!!(n&&n.familyId===Dc)},t.prototype.matchHomeAccountId=function(e,r){return typeof e.homeAccountId=="string"&&r===e.homeAccountId},t.prototype.matchUserAssertionHash=function(e,r){return!!(e.userAssertionHash&&r===e.userAssertionHash)},t.prototype.matchEnvironment=function(e,r){var n=this.getAuthorityMetadataByAlias(r);return!!(n&&n.aliases.indexOf(e.environment)>-1)},t.prototype.matchCredentialType=function(e,r){return e.credentialType&&r.toLowerCase()===e.credentialType.toLowerCase()},t.prototype.matchClientId=function(e,r){return!!(e.clientId&&r===e.clientId)},t.prototype.matchFamilyId=function(e,r){return!!(e.familyId&&r===e.familyId)},t.prototype.matchRealm=function(e,r){return!!(e.realm&&r===e.realm)},t.prototype.matchNativeAccountId=function(e,r){return!!(e.nativeAccountId&&r===e.nativeAccountId)},t.prototype.matchTarget=function(e,r){var n=e.credentialType!==ee.ACCESS_TOKEN&&e.credentialType!==ee.ACCESS_TOKEN_WITH_AUTH_SCHEME;if(n||!e.target)return!1;var o=Ct.fromString(e.target),i=Ct.fromString(r);return i.containsOnlyOIDCScopes()?i.removeScope(_.OFFLINE_ACCESS_SCOPE):i.removeOIDCScopes(),o.containsScopeSet(i)},t.prototype.matchTokenType=function(e,r){return!!(e.tokenType&&e.tokenType===r)},t.prototype.matchKeyId=function(e,r){return!!(e.keyId&&e.keyId===r)},t.prototype.isAppMetadata=function(e){return e.indexOf(Cd)!==-1},t.prototype.isAuthorityMetadata=function(e){return e.indexOf(_a.CACHE_KEY)!==-1},t.prototype.generateAuthorityMetadataCacheKey=function(e){return _a.CACHE_KEY+"-"+this.clientId+"-"+e},t.prototype.getSpecificCredential=function(e,r){switch(r){case ee.ID_TOKEN:return this.getIdTokenCredential(e);case ee.ACCESS_TOKEN:case ee.ACCESS_TOKEN_WITH_AUTH_SCHEME:return this.getAccessTokenCredential(e);case ee.REFRESH_TOKEN:return this.getRefreshTokenCredential(e);default:return null}},t.toObject=function(e,r){for(var n in r)e[n]=r[n];return e},t}(),PC=function(t){Mt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.setAccount=function(){var r="Storage interface - setAccount() has not been implemented for the cacheStorage interface.";throw z.createUnexpectedError(r)},e.prototype.getAccount=function(){var r="Storage interface - getAccount() has not been implemented for the cacheStorage interface.";throw z.createUnexpectedError(r)},e.prototype.setIdTokenCredential=function(){var r="Storage interface - setIdTokenCredential() has not been implemented for the cacheStorage interface.";throw z.createUnexpectedError(r)},e.prototype.getIdTokenCredential=function(){var r="Storage interface - getIdTokenCredential() has not been implemented for the cacheStorage interface.";throw z.createUnexpectedError(r)},e.prototype.setAccessTokenCredential=function(){var r="Storage interface - setAccessTokenCredential() has not been implemented for the cacheStorage interface.";throw z.createUnexpectedError(r)},e.prototype.getAccessTokenCredential=function(){var r="Storage interface - getAccessTokenCredential() has not been implemented for the cacheStorage interface.";throw z.createUnexpectedError(r)},e.prototype.setRefreshTokenCredential=function(){var r="Storage interface - setRefreshTokenCredential() has not been implemented for the cacheStorage interface.";throw z.createUnexpectedError(r)},e.prototype.getRefreshTokenCredential=function(){var r="Storage interface - getRefreshTokenCredential() has not been implemented for the cacheStorage interface.";throw z.createUnexpectedError(r)},e.prototype.setAppMetadata=function(){var r="Storage interface - setAppMetadata() has not been implemented for the cacheStorage interface.";throw z.createUnexpectedError(r)},e.prototype.getAppMetadata=function(){var r="Storage interface - getAppMetadata() has not been implemented for the cacheStorage interface.";throw z.createUnexpectedError(r)},e.prototype.setServerTelemetry=function(){var r="Storage interface - setServerTelemetry() has not been implemented for the cacheStorage interface.";throw z.createUnexpectedError(r)},e.prototype.getServerTelemetry=function(){var r="Storage interface - getServerTelemetry() has not been implemented for the cacheStorage interface.";throw z.createUnexpectedError(r)},e.prototype.setAuthorityMetadata=function(){var r="Storage interface - setAuthorityMetadata() has not been implemented for the cacheStorage interface.";throw z.createUnexpectedError(r)},e.prototype.getAuthorityMetadata=function(){var r="Storage interface - getAuthorityMetadata() has not been implemented for the cacheStorage interface.";throw z.createUnexpectedError(r)},e.prototype.getAuthorityMetadataKeys=function(){var r="Storage interface - getAuthorityMetadataKeys() has not been implemented for the cacheStorage interface.";throw z.createUnexpectedError(r)},e.prototype.setThrottlingCache=function(){var r="Storage interface - setThrottlingCache() has not been implemented for the cacheStorage interface.";throw z.createUnexpectedError(r)},e.prototype.getThrottlingCache=function(){var r="Storage interface - getThrottlingCache() has not been implemented for the cacheStorage interface.";throw z.createUnexpectedError(r)},e.prototype.removeItem=function(){var r="Storage interface - removeItem() has not been implemented for the cacheStorage interface.";throw z.createUnexpectedError(r)},e.prototype.containsKey=function(){var r="Storage interface - containsKey() has not been implemented for the cacheStorage interface.";throw z.createUnexpectedError(r)},e.prototype.getKeys=function(){var r="Storage interface - getKeys() has not been implemented for the cacheStorage interface.";throw z.createUnexpectedError(r)},e.prototype.clear=function(){return K(this,void 0,void 0,function(){var r;return G(this,function(n){throw r="Storage interface - clear() has not been implemented for the cacheStorage interface.",z.createUnexpectedError(r)})})},e.prototype.updateCredentialCacheKey=function(){var r="Storage interface - updateCredentialCacheKey() has not been implemented for the cacheStorage interface.";throw z.createUnexpectedError(r)},e}(or);/*! @azure/msal-common v8.0.0 2022-11-07 */var NC=300,Ty={tokenRenewalOffsetSeconds:NC,preventCorsPreflight:!1,proxyUrl:_.EMPTY_STRING},OC={loggerCallback:function(){},piiLoggingEnabled:!1,logLevel:xe.Info,correlationId:_.EMPTY_STRING},xC={sendGetRequestAsync:function(){return K(this,void 0,void 0,function(){var t;return G(this,function(e){throw t="Network interface - sendGetRequestAsync() has not been implemented",z.createUnexpectedError(t)})})},sendPostRequestAsync:function(){return K(this,void 0,void 0,function(){var t;return G(this,function(e){throw t="Network interface - sendPostRequestAsync() has not been implemented",z.createUnexpectedError(t)})})}},MC={sku:_.SKU,version:Sy,cpu:_.EMPTY_STRING,os:_.EMPTY_STRING},UC={clientSecret:_.EMPTY_STRING,clientAssertion:void 0},LC={azureCloudInstance:$a.None,tenant:""+_.DEFAULT_COMMON_TENANT},DC={application:{appName:"",appVersion:""}};function HC(t){var e=t.authOptions,r=t.systemOptions,n=t.loggerOptions,o=t.storageInterface,i=t.networkInterface,a=t.cryptoInterface,s=t.clientCredentials,c=t.libraryInfo,l=t.telemetry,u=t.serverTelemetryManager,h=t.persistencePlugin,d=t.serializableCache,f=ve(ve({},OC),n);return{authOptions:FC(e),systemOptions:ve(ve({},Ty),r),loggerOptions:f,storageInterface:o||new PC(e.clientId,Fc),networkInterface:i||xC,cryptoInterface:a||Fc,clientCredentials:s||UC,libraryInfo:ve(ve({},MC),c),telemetry:ve(ve({},DC),l),serverTelemetryManager:u||null,persistencePlugin:h||null,serializableCache:d||null}}function FC(t){return ve({clientCapabilities:[],azureCloudOptions:LC,skipAuthorityMetadataCache:!1},t)}/*! @azure/msal-common v8.0.0 2022-11-07 */var vo=function(t){Mt(e,t);function e(r,n,o){var i=t.call(this,r,n,o)||this;return i.name="ServerError",Object.setPrototypeOf(i,e.prototype),i}return e}(z);/*! @azure/msal-common v8.0.0 2022-11-07 */var zc=function(){function t(){}return t.generateThrottlingStorageKey=function(e){return wa.THROTTLING_PREFIX+"."+JSON.stringify(e)},t.preProcess=function(e,r){var n,o=t.generateThrottlingStorageKey(r),i=e.getThrottlingCache(o);if(i){if(i.throttleTime<Date.now()){e.removeItem(o,to.THROTTLING);return}throw new vo(((n=i.errorCodes)===null||n===void 0?void 0:n.join(" "))||_.EMPTY_STRING,i.errorMessage,i.subError)}},t.postProcess=function(e,r,n){if(t.checkResponseStatus(n)||t.checkResponseForRetryAfter(n)){var o={throttleTime:t.calculateThrottleTime(parseInt(n.headers[hr.RETRY_AFTER])),error:n.body.error,errorCodes:n.body.error_codes,errorMessage:n.body.error_description,subError:n.body.suberror};e.setThrottlingCache(t.generateThrottlingStorageKey(r),o)}},t.checkResponseStatus=function(e){return e.status===429||e.status>=500&&e.status<600},t.checkResponseForRetryAfter=function(e){return e.headers?e.headers.hasOwnProperty(hr.RETRY_AFTER)&&(e.status<200||e.status>=300):!1},t.calculateThrottleTime=function(e){var r=e<=0?0:e,n=Date.now()/1e3;return Math.floor(Math.min(n+(r||wa.DEFAULT_THROTTLE_TIME_SECONDS),n+wa.DEFAULT_MAX_THROTTLE_TIME_SECONDS)*1e3)},t.removeThrottle=function(e,r,n,o){var i={clientId:r,authority:n.authority,scopes:n.scopes,homeAccountIdentifier:o,claims:n.claims,authenticationScheme:n.authenticationScheme,resourceRequestMethod:n.resourceRequestMethod,resourceRequestUri:n.resourceRequestUri,shrClaims:n.shrClaims,sshKid:n.sshKid},a=this.generateThrottlingStorageKey(i);return e.removeItem(a,to.THROTTLING)},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var $C=function(){function t(e,r){this.networkClient=e,this.cacheManager=r}return t.prototype.sendPostRequest=function(e,r,n){return K(this,void 0,void 0,function(){var o,i;return G(this,function(a){switch(a.label){case 0:zc.preProcess(this.cacheManager,e),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.networkClient.sendPostRequestAsync(r,n)];case 2:return o=a.sent(),[3,4];case 3:throw i=a.sent(),i instanceof z?i:D.createNetworkError(r,i);case 4:return zc.postProcess(this.cacheManager,e,o),[2,o]}})})},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var Dt;(function(t){t.HOME_ACCOUNT_ID="home_account_id",t.UPN="UPN"})(Dt||(Dt={}));/*! @azure/msal-common v8.0.0 2022-11-07 */var Bh=function(){function t(e,r){this.config=HC(e),this.logger=new jh(this.config.loggerOptions,RC,Sy),this.cryptoUtils=this.config.cryptoInterface,this.cacheManager=this.config.storageInterface,this.networkClient=this.config.networkInterface,this.networkManager=new $C(this.networkClient,this.cacheManager),this.serverTelemetryManager=this.config.serverTelemetryManager,this.authority=this.config.authOptions.authority,this.performanceClient=r}return t.prototype.createTokenRequestHeaders=function(e){var r={};if(r[hr.CONTENT_TYPE]=_.URL_FORM_CONTENT_TYPE,!this.config.systemOptions.preventCorsPreflight&&e)switch(e.type){case Dt.HOME_ACCOUNT_ID:try{var n=Yo(e.credential);r[hr.CCS_HEADER]="Oid:"+n.uid+"@"+n.utid}catch(o){this.logger.verbose("Could not parse home account ID for CCS Header: "+o)}break;case Dt.UPN:r[hr.CCS_HEADER]="UPN: "+e.credential;break}return r},t.prototype.executePostToTokenEndpoint=function(e,r,n,o){return K(this,void 0,void 0,function(){var i;return G(this,function(a){switch(a.label){case 0:return[4,this.networkManager.sendPostRequest(o,e,{body:r,headers:n,proxyUrl:this.config.systemOptions.proxyUrl})];case 1:return i=a.sent(),this.config.serverTelemetryManager&&i.status<500&&i.status!==429&&this.config.serverTelemetryManager.clearTelemetryCache(),[2,i]}})})},t.prototype.updateAuthority=function(e){if(!e.discoveryComplete())throw D.createEndpointDiscoveryIncompleteError("Updated authority has not completed endpoint discovery.");this.authority=e},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var qn=function(){function t(){}return t.validateRedirectUri=function(e){if(x.isEmpty(e))throw Ee.createRedirectUriEmptyError()},t.validatePrompt=function(e){var r=[];for(var n in mt)r.push(mt[n]);if(r.indexOf(e)<0)throw Ee.createInvalidPromptError(e)},t.validateClaims=function(e){try{JSON.parse(e)}catch{throw Ee.createInvalidClaimsRequestError()}},t.validateCodeChallengeParams=function(e,r){if(x.isEmpty(e)||x.isEmpty(r))throw Ee.createInvalidCodeChallengeParamsError();this.validateCodeChallengeMethod(r)},t.validateCodeChallengeMethod=function(e){if([bp.PLAIN,bp.S256].indexOf(e)<0)throw Ee.createInvalidCodeChallengeMethodError()},t.sanitizeEQParams=function(e,r){return e?(r.forEach(function(n,o){e[o]&&delete e[o]}),e):{}},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var Qo=function(){function t(){this.parameters=new Map}return t.prototype.addResponseTypeCode=function(){this.parameters.set(Q.RESPONSE_TYPE,encodeURIComponent(_.CODE_RESPONSE_TYPE))},t.prototype.addResponseTypeForTokenAndIdToken=function(){this.parameters.set(Q.RESPONSE_TYPE,encodeURIComponent(_.TOKEN_RESPONSE_TYPE+" "+_.ID_TOKEN_RESPONSE_TYPE))},t.prototype.addResponseMode=function(e){this.parameters.set(Q.RESPONSE_MODE,encodeURIComponent(e||Uc.QUERY))},t.prototype.addNativeBroker=function(){this.parameters.set(Q.NATIVE_BROKER,encodeURIComponent("1"))},t.prototype.addScopes=function(e,r){r===void 0&&(r=!0);var n=r?yl(e||[],ts):e||[],o=new Ct(n);this.parameters.set(Q.SCOPE,encodeURIComponent(o.printScopes()))},t.prototype.addClientId=function(e){this.parameters.set(Q.CLIENT_ID,encodeURIComponent(e))},t.prototype.addRedirectUri=function(e){qn.validateRedirectUri(e),this.parameters.set(Q.REDIRECT_URI,encodeURIComponent(e))},t.prototype.addPostLogoutRedirectUri=function(e){qn.validateRedirectUri(e),this.parameters.set(Q.POST_LOGOUT_URI,encodeURIComponent(e))},t.prototype.addIdTokenHint=function(e){this.parameters.set(Q.ID_TOKEN_HINT,encodeURIComponent(e))},t.prototype.addDomainHint=function(e){this.parameters.set(ya.DOMAIN_HINT,encodeURIComponent(e))},t.prototype.addLoginHint=function(e){this.parameters.set(ya.LOGIN_HINT,encodeURIComponent(e))},t.prototype.addCcsUpn=function(e){this.parameters.set(hr.CCS_HEADER,encodeURIComponent("UPN:"+e))},t.prototype.addCcsOid=function(e){this.parameters.set(hr.CCS_HEADER,encodeURIComponent("Oid:"+e.uid+"@"+e.utid))},t.prototype.addSid=function(e){this.parameters.set(ya.SID,encodeURIComponent(e))},t.prototype.addClaims=function(e,r){var n=this.addClientCapabilitiesToClaims(e,r);qn.validateClaims(n),this.parameters.set(Q.CLAIMS,encodeURIComponent(n))},t.prototype.addCorrelationId=function(e){this.parameters.set(Q.CLIENT_REQUEST_ID,encodeURIComponent(e))},t.prototype.addLibraryInfo=function(e){this.parameters.set(Q.X_CLIENT_SKU,e.sku),this.parameters.set(Q.X_CLIENT_VER,e.version),e.os&&this.parameters.set(Q.X_CLIENT_OS,e.os),e.cpu&&this.parameters.set(Q.X_CLIENT_CPU,e.cpu)},t.prototype.addApplicationTelemetry=function(e){e!=null&&e.appName&&this.parameters.set(Q.X_APP_NAME,e.appName),e!=null&&e.appVersion&&this.parameters.set(Q.X_APP_VER,e.appVersion)},t.prototype.addPrompt=function(e){qn.validatePrompt(e),this.parameters.set(""+Q.PROMPT,encodeURIComponent(e))},t.prototype.addState=function(e){x.isEmpty(e)||this.parameters.set(Q.STATE,encodeURIComponent(e))},t.prototype.addNonce=function(e){this.parameters.set(Q.NONCE,encodeURIComponent(e))},t.prototype.addCodeChallengeParams=function(e,r){if(qn.validateCodeChallengeParams(e,r),e&&r)this.parameters.set(Q.CODE_CHALLENGE,encodeURIComponent(e)),this.parameters.set(Q.CODE_CHALLENGE_METHOD,encodeURIComponent(r));else throw Ee.createInvalidCodeChallengeParamsError()},t.prototype.addAuthorizationCode=function(e){this.parameters.set(Q.CODE,encodeURIComponent(e))},t.prototype.addDeviceCode=function(e){this.parameters.set(Q.DEVICE_CODE,encodeURIComponent(e))},t.prototype.addRefreshToken=function(e){this.parameters.set(Q.REFRESH_TOKEN,encodeURIComponent(e))},t.prototype.addCodeVerifier=function(e){this.parameters.set(Q.CODE_VERIFIER,encodeURIComponent(e))},t.prototype.addClientSecret=function(e){this.parameters.set(Q.CLIENT_SECRET,encodeURIComponent(e))},t.prototype.addClientAssertion=function(e){x.isEmpty(e)||this.parameters.set(Q.CLIENT_ASSERTION,encodeURIComponent(e))},t.prototype.addClientAssertionType=function(e){x.isEmpty(e)||this.parameters.set(Q.CLIENT_ASSERTION_TYPE,encodeURIComponent(e))},t.prototype.addOboAssertion=function(e){this.parameters.set(Q.OBO_ASSERTION,encodeURIComponent(e))},t.prototype.addRequestTokenUse=function(e){this.parameters.set(Q.REQUESTED_TOKEN_USE,encodeURIComponent(e))},t.prototype.addGrantType=function(e){this.parameters.set(Q.GRANT_TYPE,encodeURIComponent(e))},t.prototype.addClientInfo=function(){this.parameters.set(AC,"1")},t.prototype.addExtraQueryParameters=function(e){var r=this;qn.sanitizeEQParams(e,this.parameters),Object.keys(e).forEach(function(n){r.parameters.set(n,e[n])})},t.prototype.addClientCapabilitiesToClaims=function(e,r){var n;if(!e)n={};else try{n=JSON.parse(e)}catch{throw Ee.createInvalidClaimsRequestError()}return r&&r.length>0&&(n.hasOwnProperty(Vo.ACCESS_TOKEN)||(n[Vo.ACCESS_TOKEN]={}),n[Vo.ACCESS_TOKEN][Vo.XMS_CC]={values:r}),JSON.stringify(n)},t.prototype.addUsername=function(e){this.parameters.set(Hc.username,encodeURIComponent(e))},t.prototype.addPassword=function(e){this.parameters.set(Hc.password,encodeURIComponent(e))},t.prototype.addPopToken=function(e){x.isEmpty(e)||(this.parameters.set(Q.TOKEN_TYPE,le.POP),this.parameters.set(Q.REQ_CNF,encodeURIComponent(e)))},t.prototype.addSshJwk=function(e){x.isEmpty(e)||(this.parameters.set(Q.TOKEN_TYPE,le.SSH),this.parameters.set(Q.REQ_CNF,encodeURIComponent(e)))},t.prototype.addServerTelemetry=function(e){this.parameters.set(Q.X_CLIENT_CURR_TELEM,e.generateCurrentRequestHeaderValue()),this.parameters.set(Q.X_CLIENT_LAST_TELEM,e.generateLastRequestHeaderValue())},t.prototype.addThrottling=function(){this.parameters.set(Q.X_MS_LIB_CAPABILITY,wa.X_MS_LIB_CAPABILITY_VALUE)},t.prototype.addLogoutHint=function(e){this.parameters.set(Q.LOGOUT_HINT,encodeURIComponent(e))},t.prototype.createQueryString=function(){var e=new Array;return this.parameters.forEach(function(r,n){e.push(n+"="+r)}),e.join("&")},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var ja=function(t){Mt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.createIdTokenEntity=function(r,n,o,i,a){var s=new e;return s.credentialType=ee.ID_TOKEN,s.homeAccountId=r,s.environment=n,s.clientId=i,s.secret=o,s.realm=a,s},e.isIdTokenEntity=function(r){return r?r.hasOwnProperty("homeAccountId")&&r.hasOwnProperty("environment")&&r.hasOwnProperty("credentialType")&&r.hasOwnProperty("realm")&&r.hasOwnProperty("clientId")&&r.hasOwnProperty("secret")&&r.credentialType===ee.ID_TOKEN:!1},e}(za);/*! @azure/msal-common v8.0.0 2022-11-07 */var Jt=function(){function t(){}return t.nowSeconds=function(){return Math.round(new Date().getTime()/1e3)},t.isTokenExpired=function(e,r){var n=Number(e)||0,o=t.nowSeconds()+r;return o>n},t.wasClockTurnedBack=function(e){var r=Number(e);return r>t.nowSeconds()},t.delay=function(e,r){return new Promise(function(n){return setTimeout(function(){return n(r)},e)})},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var Ba=function(t){Mt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.createAccessTokenEntity=function(r,n,o,i,a,s,c,l,u,h,d,f,m,v,E){var g,p,y=new e;y.homeAccountId=r,y.credentialType=ee.ACCESS_TOKEN,y.secret=o;var w=Jt.nowSeconds();if(y.cachedAt=w.toString(),y.expiresOn=c.toString(),y.extendedExpiresOn=l.toString(),h&&(y.refreshOn=h.toString()),y.environment=n,y.clientId=i,y.realm=a,y.target=s,y.userAssertionHash=f,y.tokenType=x.isEmpty(d)?le.BEARER:d,v&&(y.requestedClaims=v,y.requestedClaimsHash=E),((g=y.tokenType)===null||g===void 0?void 0:g.toLowerCase())!==le.BEARER.toLowerCase())switch(y.credentialType=ee.ACCESS_TOKEN_WITH_AUTH_SCHEME,y.tokenType){case le.POP:var k=kr.extractTokenClaims(o,u);if(!(!((p=k==null?void 0:k.cnf)===null||p===void 0)&&p.kid))throw D.createTokenClaimsRequiredError();y.keyId=k.cnf.kid;break;case le.SSH:y.keyId=m}return y},e.isAccessTokenEntity=function(r){return r?r.hasOwnProperty("homeAccountId")&&r.hasOwnProperty("environment")&&r.hasOwnProperty("credentialType")&&r.hasOwnProperty("realm")&&r.hasOwnProperty("clientId")&&r.hasOwnProperty("secret")&&r.hasOwnProperty("target")&&(r.credentialType===ee.ACCESS_TOKEN||r.credentialType===ee.ACCESS_TOKEN_WITH_AUTH_SCHEME):!1},e}(za);/*! @azure/msal-common v8.0.0 2022-11-07 */var jc=function(t){Mt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.createRefreshTokenEntity=function(r,n,o,i,a,s){var c=new e;return c.clientId=i,c.credentialType=ee.REFRESH_TOKEN,c.environment=n,c.homeAccountId=r,c.secret=o,c.userAssertionHash=s,a&&(c.familyId=a),c},e.isRefreshTokenEntity=function(r){return r?r.hasOwnProperty("homeAccountId")&&r.hasOwnProperty("environment")&&r.hasOwnProperty("credentialType")&&r.hasOwnProperty("clientId")&&r.hasOwnProperty("secret")&&r.credentialType===ee.REFRESH_TOKEN:!1},e}(za);/*! @azure/msal-common v8.0.0 2022-11-07 */var kp=["interaction_required","consent_required","login_required"],zC=["message_only","additional_action","basic_action","user_password_expired","consent_required"],ta={noTokensFoundError:{code:"no_tokens_found",desc:"No refresh token found in the cache. Please sign-in."},native_account_unavailable:{code:"native_account_unavailable",desc:"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."}},lr=function(t){Mt(e,t);function e(r,n,o){var i=t.call(this,r,n,o)||this;return i.name="InteractionRequiredAuthError",Object.setPrototypeOf(i,e.prototype),i}return e.isInteractionRequiredError=function(r,n,o){var i=!!r&&kp.indexOf(r)>-1,a=!!o&&zC.indexOf(o)>-1,s=!!n&&kp.some(function(c){return n.indexOf(c)>-1});return i||s||a},e.createNoTokensFoundError=function(){return new e(ta.noTokensFoundError.code,ta.noTokensFoundError.desc)},e.createNativeAccountUnavailableError=function(){return new e(ta.native_account_unavailable.code,ta.native_account_unavailable.desc)},e}(z);/*! @azure/msal-common v8.0.0 2022-11-07 */var Qs=function(){function t(e,r,n,o,i){this.account=e||null,this.idToken=r||null,this.accessToken=n||null,this.refreshToken=o||null,this.appMetadata=i||null}return t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var Wr=function(){function t(){}return t.setRequestState=function(e,r,n){var o=t.generateLibraryState(e,n);return x.isEmpty(r)?o:""+o+_.RESOURCE_DELIM+r},t.generateLibraryState=function(e,r){if(!e)throw D.createNoCryptoObjectError("generateLibraryState");var n={id:e.createNewGuid()};r&&(n.meta=r);var o=JSON.stringify(n);return e.base64Encode(o)},t.parseRequestState=function(e,r){if(!e)throw D.createNoCryptoObjectError("parseRequestState");if(x.isEmpty(r))throw D.createInvalidStateError(r,"Null, undefined or empty state");try{var n=r.split(_.RESOURCE_DELIM),o=n[0],i=n.length>1?n.slice(1).join(_.RESOURCE_DELIM):_.EMPTY_STRING,a=e.base64Decode(o),s=JSON.parse(a);return{userRequestState:x.isEmpty(i)?_.EMPTY_STRING:i,libraryState:s}}catch(c){throw D.createInvalidStateError(r,c)}},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var oe=function(){function t(e){if(this._urlString=e,x.isEmpty(this._urlString))throw Ee.createUrlEmptyError();x.isEmpty(this.getHash())&&(this._urlString=t.canonicalizeUri(e))}return Object.defineProperty(t.prototype,"urlString",{get:function(){return this._urlString},enumerable:!1,configurable:!0}),t.canonicalizeUri=function(e){if(e){var r=e.toLowerCase();return x.endsWith(r,"?")?r=r.slice(0,-1):x.endsWith(r,"?/")&&(r=r.slice(0,-2)),x.endsWith(r,"/")||(r+="/"),r}return e},t.prototype.validateAsUri=function(){var e;try{e=this.getUrlComponents()}catch(r){throw Ee.createUrlParseError(r)}if(!e.HostNameAndPort||!e.PathSegments)throw Ee.createUrlParseError("Given url string: "+this.urlString);if(!e.Protocol||e.Protocol.toLowerCase()!=="https:")throw Ee.createInsecureAuthorityUriError(this.urlString)},t.appendQueryString=function(e,r){return x.isEmpty(r)?e:e.indexOf("?")<0?e+"?"+r:e+"&"+r},t.removeHashFromUrl=function(e){return t.canonicalizeUri(e.split("#")[0])},t.prototype.replaceTenantPath=function(e){var r=this.getUrlComponents(),n=r.PathSegments;return e&&n.length!==0&&(n[0]===Mc.COMMON||n[0]===Mc.ORGANIZATIONS)&&(n[0]=e),t.constructAuthorityUriFromObject(r)},t.prototype.getHash=function(){return t.parseHash(this.urlString)},t.prototype.getUrlComponents=function(){var e=RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?"),r=this.urlString.match(e);if(!r)throw Ee.createUrlParseError("Given url string: "+this.urlString);var n={Protocol:r[1],HostNameAndPort:r[4],AbsolutePath:r[5],QueryString:r[7]},o=n.AbsolutePath.split("/");return o=o.filter(function(i){return i&&i.length>0}),n.PathSegments=o,!x.isEmpty(n.QueryString)&&n.QueryString.endsWith("/")&&(n.QueryString=n.QueryString.substring(0,n.QueryString.length-1)),n},t.getDomainFromUrl=function(e){var r=RegExp("^([^:/?#]+://)?([^/?#]*)"),n=e.match(r);if(!n)throw Ee.createUrlParseError("Given url string: "+e);return n[2]},t.getAbsoluteUrl=function(e,r){if(e[0]===_.FORWARD_SLASH){var n=new t(r),o=n.getUrlComponents();return o.Protocol+"//"+o.HostNameAndPort+e}return e},t.parseHash=function(e){var r=e.indexOf("#"),n=e.indexOf("#/");return n>-1?e.substring(n+2):r>-1?e.substring(r+1):_.EMPTY_STRING},t.parseQueryString=function(e){var r=e.indexOf("?"),n=e.indexOf("/?");return n>-1?e.substring(n+2):r>-1?e.substring(r+1):_.EMPTY_STRING},t.constructAuthorityUriFromObject=function(e){return new t(e.Protocol+"//"+e.HostNameAndPort+"/"+e.PathSegments.join("/"))},t.getDeserializedHash=function(e){if(x.isEmpty(e))return{};var r=t.parseHash(e),n=x.queryStringToObject(x.isEmpty(r)?e:r);if(!n)throw D.createHashNotDeserializedError(JSON.stringify(n));return n},t.getDeserializedQueryString=function(e){if(x.isEmpty(e))return{};var r=t.parseQueryString(e),n=x.queryStringToObject(x.isEmpty(r)?e:r);if(!n)throw D.createHashNotDeserializedError(JSON.stringify(n));return n},t.hashContainsKnownProperties=function(e){if(x.isEmpty(e)||e.indexOf("=")<0)return!1;var r=t.getDeserializedHash(e);return!!(r.code||r.error_description||r.error||r.state)},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var Td;(function(t){t.SW="sw",t.UHW="uhw"})(Td||(Td={}));var vi=function(){function t(e){this.cryptoUtils=e}return t.prototype.generateCnf=function(e){return K(this,void 0,void 0,function(){var r,n,o;return G(this,function(i){switch(i.label){case 0:return[4,this.generateKid(e)];case 1:return r=i.sent(),n=this.cryptoUtils.base64Encode(JSON.stringify(r)),o={kid:r.kid,reqCnfString:n},[4,this.cryptoUtils.hashString(n)];case 2:return[2,(o.reqCnfHash=i.sent(),o)]}})})},t.prototype.generateKid=function(e){return K(this,void 0,void 0,function(){var r;return G(this,function(n){switch(n.label){case 0:return[4,this.cryptoUtils.getPublicKeyThumbprint(e)];case 1:return r=n.sent(),[2,{kid:r,xms_ksl:Td.SW}]}})})},t.prototype.signPopToken=function(e,r,n){return K(this,void 0,void 0,function(){return G(this,function(o){return[2,this.signPayload(e,r,n)]})})},t.prototype.signPayload=function(e,r,n,o){return K(this,void 0,void 0,function(){var i,a,s,c,l,u;return G(this,function(h){switch(h.label){case 0:return i=n.resourceRequestMethod,a=n.resourceRequestUri,s=n.shrClaims,c=n.shrNonce,l=a?new oe(a):void 0,u=l==null?void 0:l.getUrlComponents(),[4,this.cryptoUtils.signJwt(ve({at:e,ts:Jt.nowSeconds(),m:i==null?void 0:i.toUpperCase(),u:u==null?void 0:u.HostNameAndPort,nonce:c||this.cryptoUtils.createNewGuid(),p:u==null?void 0:u.AbsolutePath,q:u!=null&&u.QueryString?[[],u.QueryString]:void 0,client_claims:s||void 0},o),r,n.correlationId)];case 1:return[2,h.sent()]}})})},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var bd=function(){function t(){}return t.prototype.generateAppMetadataKey=function(){return t.generateAppMetadataCacheKey(this.environment,this.clientId)},t.generateAppMetadataCacheKey=function(e,r){var n=[Cd,e,r];return n.join(Ft.CACHE_KEY_SEPARATOR).toLowerCase()},t.createAppMetadataEntity=function(e,r,n){var o=new t;return o.clientId=e,o.environment=r,n&&(o.familyId=n),o},t.isAppMetadataEntity=function(e,r){return r?e.indexOf(Cd)===0&&r.hasOwnProperty("clientId")&&r.hasOwnProperty("environment"):!1},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var jC=function(){function t(e,r){this.cache=e,this.hasChanged=r}return Object.defineProperty(t.prototype,"cacheHasChanged",{get:function(){return this.hasChanged},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tokenCache",{get:function(){return this.cache},enumerable:!1,configurable:!0}),t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var Bc=function(){function t(e,r,n,o,i,a){this.clientId=e,this.cacheStorage=r,this.cryptoObj=n,this.logger=o,this.serializableCache=i,this.persistencePlugin=a}return t.prototype.validateServerAuthorizationCodeResponse=function(e,r,n){if(!e.state||!r)throw e.state?D.createStateNotFoundError("Cached State"):D.createStateNotFoundError("Server State");if(decodeURIComponent(e.state)!==decodeURIComponent(r))throw D.createStateMismatchError();if(e.error||e.error_description||e.suberror)throw lr.isInteractionRequiredError(e.error,e.error_description,e.suberror)?new lr(e.error||_.EMPTY_STRING,e.error_description,e.suberror):new vo(e.error||_.EMPTY_STRING,e.error_description,e.suberror);e.client_info&&$c(e.client_info,n)},t.prototype.validateTokenResponse=function(e){if(e.error||e.error_description||e.suberror){if(lr.isInteractionRequiredError(e.error,e.error_description,e.suberror))throw new lr(e.error,e.error_description,e.suberror);var r=e.error_codes+" - ["+e.timestamp+"]: "+e.error_description+" - Correlation ID: "+e.correlation_id+" - Trace ID: "+e.trace_id;throw new vo(e.error,r,e.suberror)}},t.prototype.handleServerTokenResponse=function(e,r,n,o,i,a,s,c,l){return K(this,void 0,void 0,function(){var u,h,d,f,m,v,E;return G(this,function(g){switch(g.label){case 0:if(e.id_token){if(u=new kr(e.id_token||_.EMPTY_STRING,this.cryptoObj),i&&!x.isEmpty(i.nonce)&&u.claims.nonce!==i.nonce)throw D.createNonceMismatchError();if(o.maxAge||o.maxAge===0){if(h=u.claims.auth_time,!h)throw D.createAuthTimeNotFoundError();kr.checkMaxAge(h,o.maxAge)}}this.homeAccountIdentifier=tt.generateHomeAccountId(e.client_info||_.EMPTY_STRING,r.authorityType,this.logger,this.cryptoObj,u),!!i&&!!i.state&&(d=Wr.parseRequestState(this.cryptoObj,i.state)),e.key_id=e.key_id||o.sshKid||void 0,f=this.generateCacheRecord(e,r,n,o,u,a,i),g.label=1;case 1:return g.trys.push([1,,5,8]),this.persistencePlugin&&this.serializableCache?(this.logger.verbose("Persistence enabled, calling beforeCacheAccess"),m=new jC(this.serializableCache,!0),[4,this.persistencePlugin.beforeCacheAccess(m)]):[3,3];case 2:g.sent(),g.label=3;case 3:return s&&!c&&f.account&&(v=f.account.generateAccountKey(),E=this.cacheStorage.getAccount(v),!E)?(this.logger.warning("Account used to refresh tokens not in persistence, refreshed tokens will not be stored in the cache"),[2,t.generateAuthenticationResult(this.cryptoObj,r,f,!1,o,u,d,void 0,l)]):[4,this.cacheStorage.saveCacheRecord(f)];case 4:return g.sent(),[3,8];case 5:return this.persistencePlugin&&this.serializableCache&&m?(this.logger.verbose("Persistence enabled, calling afterCacheAccess"),[4,this.persistencePlugin.afterCacheAccess(m)]):[3,7];case 6:g.sent(),g.label=7;case 7:return[7];case 8:return[2,t.generateAuthenticationResult(this.cryptoObj,r,f,!1,o,u,d,e.spa_code,l)]}})})},t.prototype.generateCacheRecord=function(e,r,n,o,i,a,s){var c=r.getPreferredCache();if(x.isEmpty(c))throw D.createInvalidCacheEnvironmentError();var l,u;!x.isEmpty(e.id_token)&&!!i&&(l=ja.createIdTokenEntity(this.homeAccountIdentifier,c,e.id_token||_.EMPTY_STRING,this.clientId,i.claims.tid||_.EMPTY_STRING),u=this.generateAccountEntity(e,i,r,s));var h=null;if(!x.isEmpty(e.access_token)){var d=e.scope?Ct.fromString(e.scope):new Ct(o.scopes||[]),f=(typeof e.expires_in=="string"?parseInt(e.expires_in,10):e.expires_in)||0,m=(typeof e.ext_expires_in=="string"?parseInt(e.ext_expires_in,10):e.ext_expires_in)||0,v=(typeof e.refresh_in=="string"?parseInt(e.refresh_in,10):e.refresh_in)||void 0,E=n+f,g=E+m,p=v&&v>0?n+v:void 0;h=Ba.createAccessTokenEntity(this.homeAccountIdentifier,c,e.access_token||_.EMPTY_STRING,this.clientId,i?i.claims.tid||_.EMPTY_STRING:r.tenant,d.printScopes(),E,g,this.cryptoObj,p,e.token_type,a,e.key_id,o.claims,o.requestedClaimsHash)}var y=null;x.isEmpty(e.refresh_token)||(y=jc.createRefreshTokenEntity(this.homeAccountIdentifier,c,e.refresh_token||_.EMPTY_STRING,this.clientId,e.foci,a));var w=null;return x.isEmpty(e.foci)||(w=bd.createAppMetadataEntity(this.clientId,c,e.foci)),new Qs(u,l,h,y,w)},t.prototype.generateAccountEntity=function(e,r,n,o){var i=n.authorityType,a=o?o.cloud_graph_host_name:_.EMPTY_STRING,s=o?o.msgraph_host:_.EMPTY_STRING;if(i===Wt.Adfs)return this.logger.verbose("Authority type is ADFS, creating ADFS account"),tt.createGenericAccount(this.homeAccountIdentifier,r,n,a,s);if(x.isEmpty(e.client_info)&&n.protocolMode==="AAD")throw D.createClientInfoEmptyError();return e.client_info?tt.createAccount(e.client_info,this.homeAccountIdentifier,r,n,a,s):tt.createGenericAccount(this.homeAccountIdentifier,r,n,a,s)},t.generateAuthenticationResult=function(e,r,n,o,i,a,s,c,l){var u,h,d;return K(this,void 0,void 0,function(){var f,m,v,E,g,p,y,w,k,P,M;return G(this,function(O){switch(O.label){case 0:if(f=_.EMPTY_STRING,m=[],v=null,g=_.EMPTY_STRING,!n.accessToken)return[3,4];if(n.accessToken.tokenType!==le.POP)return[3,2];if(p=new vi(e),y=n.accessToken,w=y.secret,k=y.keyId,!k)throw D.createKeyIdMissingError();return[4,p.signPopToken(w,k,i)];case 1:return f=O.sent(),[3,3];case 2:f=n.accessToken.secret,O.label=3;case 3:m=Ct.fromString(n.accessToken.target).asArray(),v=new Date(Number(n.accessToken.expiresOn)*1e3),E=new Date(Number(n.accessToken.extendedExpiresOn)*1e3),O.label=4;case 4:return n.appMetadata&&(g=n.appMetadata.familyId===Dc?Dc:_.EMPTY_STRING),P=(a==null?void 0:a.claims.oid)||(a==null?void 0:a.claims.sub)||_.EMPTY_STRING,M=(a==null?void 0:a.claims.tid)||_.EMPTY_STRING,[2,{authority:r.canonicalAuthority,uniqueId:P,tenantId:M,scopes:m,account:n.account?n.account.getAccountInfo():null,idToken:a?a.rawToken:_.EMPTY_STRING,idTokenClaims:a?a.claims:{},accessToken:f,fromCache:o,expiresOn:v,correlationId:i.correlationId,requestId:l||_.EMPTY_STRING,extExpiresOn:E,familyId:g,tokenType:((u=n.accessToken)===null||u===void 0?void 0:u.tokenType)||_.EMPTY_STRING,state:s?s.userRequestState:_.EMPTY_STRING,cloudGraphHostName:((h=n.account)===null||h===void 0?void 0:h.cloudGraphHostName)||_.EMPTY_STRING,msGraphHost:((d=n.account)===null||d===void 0?void 0:d.msGraphHost)||_.EMPTY_STRING,code:c,fromNativeBroker:!1}]}})})},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var by=function(t){Mt(e,t);function e(r){var n=t.call(this,r)||this;return n.includeRedirectUri=!0,n}return e.prototype.getAuthCodeUrl=function(r){return K(this,void 0,void 0,function(){var n;return G(this,function(o){switch(o.label){case 0:return[4,this.createAuthCodeUrlQueryString(r)];case 1:return n=o.sent(),[2,oe.appendQueryString(this.authority.authorizationEndpoint,n)]}})})},e.prototype.acquireToken=function(r,n){var o;return K(this,void 0,void 0,function(){var i,a,s,c;return G(this,function(l){switch(l.label){case 0:if(this.logger.info("in acquireToken call"),!r||x.isEmpty(r.code))throw D.createTokenRequestCannotBeMadeError();return i=Jt.nowSeconds(),[4,this.executeTokenRequest(this.authority,r)];case 1:return a=l.sent(),s=(o=a.headers)===null||o===void 0?void 0:o[hr.X_MS_REQUEST_ID],c=new Bc(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin),c.validateTokenResponse(a.body),[4,c.handleServerTokenResponse(a.body,this.authority,i,r,n,void 0,void 0,void 0,s)];case 2:return[2,l.sent()]}})})},e.prototype.handleFragmentResponse=function(r,n){var o=new Bc(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,null,null),i=new oe(r),a=oe.getDeserializedHash(i.getHash());if(o.validateServerAuthorizationCodeResponse(a,n,this.cryptoUtils),!a.code)throw D.createNoAuthCodeInServerResponseError();return ve(ve({},a),{code:a.code})},e.prototype.getLogoutUri=function(r){if(!r)throw Ee.createEmptyLogoutRequestError();var n=this.createLogoutUrlQueryString(r);return oe.appendQueryString(this.authority.endSessionEndpoint,n)},e.prototype.executeTokenRequest=function(r,n){return K(this,void 0,void 0,function(){var o,i,a,s,c,l,u;return G(this,function(h){switch(h.label){case 0:return o={clientId:this.config.authOptions.clientId,authority:r.canonicalAuthority,scopes:n.scopes,claims:n.claims,authenticationScheme:n.authenticationScheme,resourceRequestMethod:n.resourceRequestMethod,resourceRequestUri:n.resourceRequestUri,shrClaims:n.shrClaims,sshKid:n.sshKid},[4,this.createTokenRequestBody(n)];case 1:if(i=h.sent(),a=this.createTokenQueryParameters(n),s=void 0,n.clientInfo)try{c=$c(n.clientInfo,this.cryptoUtils),s={credential:""+c.uid+Ft.CLIENT_INFO_SEPARATOR+c.utid,type:Dt.HOME_ACCOUNT_ID}}catch(d){this.logger.verbose("Could not parse client info for CCS Header: "+d)}return l=this.createTokenRequestHeaders(s||n.ccsCredential),u=x.isEmpty(a)?r.tokenEndpoint:r.tokenEndpoint+"?"+a,[2,this.executePostToTokenEndpoint(u,i,l,o)]}})})},e.prototype.createTokenQueryParameters=function(r){var n=new Qo;return r.tokenQueryParameters&&n.addExtraQueryParameters(r.tokenQueryParameters),n.createQueryString()},e.prototype.createTokenRequestBody=function(r){return K(this,void 0,void 0,function(){var n,o,i,a,s,c,l,l,u;return G(this,function(h){switch(h.label){case 0:return n=new Qo,n.addClientId(this.config.authOptions.clientId),this.includeRedirectUri?n.addRedirectUri(r.redirectUri):qn.validateRedirectUri(r.redirectUri),n.addScopes(r.scopes),n.addAuthorizationCode(r.code),n.addLibraryInfo(this.config.libraryInfo),n.addApplicationTelemetry(this.config.telemetry.application),n.addThrottling(),this.serverTelemetryManager&&n.addServerTelemetry(this.serverTelemetryManager),r.codeVerifier&&n.addCodeVerifier(r.codeVerifier),this.config.clientCredentials.clientSecret&&n.addClientSecret(this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion&&(o=this.config.clientCredentials.clientAssertion,n.addClientAssertion(o.assertion),n.addClientAssertionType(o.assertionType)),n.addGrantType(Lc.AUTHORIZATION_CODE_GRANT),n.addClientInfo(),r.authenticationScheme!==le.POP?[3,2]:(i=new vi(this.cryptoUtils),[4,i.generateCnf(r)]);case 1:return a=h.sent(),n.addPopToken(a.reqCnfString),[3,3];case 2:if(r.authenticationScheme===le.SSH)if(r.sshJwk)n.addSshJwk(r.sshJwk);else throw Ee.createMissingSshJwkError();h.label=3;case 3:if(s=r.correlationId||this.config.cryptoInterface.createNewGuid(),n.addCorrelationId(s),(!x.isEmptyObj(r.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&n.addClaims(r.claims,this.config.authOptions.clientCapabilities),c=void 0,r.clientInfo)try{l=$c(r.clientInfo,this.cryptoUtils),c={credential:""+l.uid+Ft.CLIENT_INFO_SEPARATOR+l.utid,type:Dt.HOME_ACCOUNT_ID}}catch(d){this.logger.verbose("Could not parse client info for CCS Header: "+d)}else c=r.ccsCredential;if(this.config.systemOptions.preventCorsPreflight&&c)switch(c.type){case Dt.HOME_ACCOUNT_ID:try{l=Yo(c.credential),n.addCcsOid(l)}catch(d){this.logger.verbose("Could not parse home account ID for CCS Header: "+d)}break;case Dt.UPN:n.addCcsUpn(c.credential);break}return r.tokenBodyParameters&&n.addExtraQueryParameters(r.tokenBodyParameters),r.enableSpaAuthorizationCode&&(!r.tokenBodyParameters||!r.tokenBodyParameters[Q.RETURN_SPA_CODE])&&n.addExtraQueryParameters((u={},u[Q.RETURN_SPA_CODE]="1",u)),[2,n.createQueryString()]}})})},e.prototype.createAuthCodeUrlQueryString=function(r){return K(this,void 0,void 0,function(){var n,o,i,a,s,c,c,c,l,u;return G(this,function(h){switch(h.label){case 0:if(n=new Qo,n.addClientId(this.config.authOptions.clientId),o=yl(r.scopes||[],r.extraScopesToConsent||[]),n.addScopes(o),n.addRedirectUri(r.redirectUri),i=r.correlationId||this.config.cryptoInterface.createNewGuid(),n.addCorrelationId(i),n.addResponseMode(r.responseMode),n.addResponseTypeCode(),n.addLibraryInfo(this.config.libraryInfo),n.addApplicationTelemetry(this.config.telemetry.application),n.addClientInfo(),r.codeChallenge&&r.codeChallengeMethod&&n.addCodeChallengeParams(r.codeChallenge,r.codeChallengeMethod),r.prompt&&n.addPrompt(r.prompt),r.domainHint&&n.addDomainHint(r.domainHint),r.prompt!==mt.SELECT_ACCOUNT)if(r.sid&&r.prompt===mt.NONE)this.logger.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from request"),n.addSid(r.sid);else if(r.account){if(a=this.extractAccountSid(r.account),s=this.extractLoginHint(r.account),s){this.logger.verbose("createAuthCodeUrlQueryString: login_hint claim present on account"),n.addLoginHint(s);try{c=Yo(r.account.homeAccountId),n.addCcsOid(c)}catch{this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(a&&r.prompt===mt.NONE){this.logger.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from account"),n.addSid(a);try{c=Yo(r.account.homeAccountId),n.addCcsOid(c)}catch{this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(r.loginHint)this.logger.verbose("createAuthCodeUrlQueryString: Adding login_hint from request"),n.addLoginHint(r.loginHint),n.addCcsUpn(r.loginHint);else if(r.account.username){this.logger.verbose("createAuthCodeUrlQueryString: Adding login_hint from account"),n.addLoginHint(r.account.username);try{c=Yo(r.account.homeAccountId),n.addCcsOid(c)}catch{this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}}else r.loginHint&&(this.logger.verbose("createAuthCodeUrlQueryString: No account, adding login_hint from request"),n.addLoginHint(r.loginHint),n.addCcsUpn(r.loginHint));else this.logger.verbose("createAuthCodeUrlQueryString: Prompt is select_account, ignoring account hints");return r.nonce&&n.addNonce(r.nonce),r.state&&n.addState(r.state),(!x.isEmpty(r.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&n.addClaims(r.claims,this.config.authOptions.clientCapabilities),r.extraQueryParameters&&n.addExtraQueryParameters(r.extraQueryParameters),r.nativeBroker?(n.addNativeBroker(),r.authenticationScheme!==le.POP?[3,2]:(l=new vi(this.cryptoUtils),[4,l.generateCnf(r)])):[3,2];case 1:u=h.sent(),n.addPopToken(u.reqCnfHash),h.label=2;case 2:return[2,n.createQueryString()]}})})},e.prototype.createLogoutUrlQueryString=function(r){var n=new Qo;return r.postLogoutRedirectUri&&n.addPostLogoutRedirectUri(r.postLogoutRedirectUri),r.correlationId&&n.addCorrelationId(r.correlationId),r.idTokenHint&&n.addIdTokenHint(r.idTokenHint),r.state&&n.addState(r.state),r.logoutHint&&n.addLogoutHint(r.logoutHint),r.extraQueryParameters&&n.addExtraQueryParameters(r.extraQueryParameters),n.createQueryString()},e.prototype.extractAccountSid=function(r){var n;return((n=r.idTokenClaims)===null||n===void 0?void 0:n.sid)||null},e.prototype.extractLoginHint=function(r){var n;return((n=r.idTokenClaims)===null||n===void 0?void 0:n.login_hint)||null},e}(Bh);/*! @azure/msal-common v8.0.0 2022-11-07 */var je;(function(t){t.AcquireTokenByCode="acquireTokenByCode",t.AcquireTokenByRefreshToken="acquireTokenByRefreshToken",t.AcquireTokenSilent="acquireTokenSilent",t.AcquireTokenSilentAsync="acquireTokenSilentAsync",t.AcquireTokenPopup="acquireTokenPopup",t.CryptoOptsGetPublicKeyThumbprint="cryptoOptsGetPublicKeyThumbprint",t.CryptoOptsSignJwt="cryptoOptsSignJwt",t.SilentCacheClientAcquireToken="silentCacheClientAcquireToken",t.SilentIframeClientAcquireToken="silentIframeClientAcquireToken",t.SilentRefreshClientAcquireToken="silentRefreshClientAcquireToken",t.SsoSilent="ssoSilent",t.StandardInteractionClientGetDiscoveredAuthority="standardInteractionClientGetDiscoveredAuthority",t.FetchAccountIdWithNativeBroker="fetchAccountIdWithNativeBroker",t.NativeInteractionClientAcquireToken="nativeInteractionClientAcquireToken",t.BaseClientCreateTokenRequestHeaders="baseClientCreateTokenRequestHeaders",t.BrokerHandhshake="brokerHandshake",t.AcquireTokenByRefreshTokenInBroker="acquireTokenByRefreshTokenInBroker",t.AcquireTokenByBroker="acquireTokenByBroker",t.RefreshTokenClientExecuteTokenRequest="refreshTokenClientExecuteTokenRequest",t.RefreshTokenClientAcquireToken="refreshTokenClientAcquireToken",t.RefreshTokenClientAcquireTokenWithCachedRefreshToken="refreshTokenClientAcquireTokenWithCachedRefreshToken"})(je||(je={}));var Jo;(function(t){t[t.NotStarted=0]="NotStarted",t[t.InProgress=1]="InProgress",t[t.Completed=2]="Completed"})(Jo||(Jo={}));/*! @azure/msal-common v8.0.0 2022-11-07 */var Iy=function(t){Mt(e,t);function e(r,n){return t.call(this,r,n)||this}return e.prototype.acquireToken=function(r){var n,o,i;return K(this,void 0,void 0,function(){var a,s,c,l,u,h=this;return G(this,function(d){switch(d.label){case 0:return a=(n=this.performanceClient)===null||n===void 0?void 0:n.startMeasurement(je.RefreshTokenClientAcquireToken,r.correlationId),this.logger.verbose("RefreshTokenClientAcquireToken called",r.correlationId),s=Jt.nowSeconds(),[4,this.executeTokenRequest(r,this.authority)];case 1:return c=d.sent(),a==null||a.addStaticFields({refreshTokenSize:((o=c.body.refresh_token)===null||o===void 0?void 0:o.length)||0}),l=(i=c.headers)===null||i===void 0?void 0:i[hr.X_MS_REQUEST_ID],u=new Bc(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin),u.validateTokenResponse(c.body),[2,u.handleServerTokenResponse(c.body,this.authority,s,r,void 0,void 0,!0,r.forceCache,l).then(function(f){return a==null||a.endMeasurement({success:!0}),f}).catch(function(f){throw h.logger.verbose("Error in fetching refresh token",r.correlationId),a==null||a.endMeasurement({errorCode:f.errorCode,subErrorCode:f.subError,success:!1}),f})]}})})},e.prototype.acquireTokenByRefreshToken=function(r){return K(this,void 0,void 0,function(){var n,o,i;return G(this,function(a){if(!r)throw Ee.createEmptyTokenRequestError();if(!r.account)throw D.createNoAccountInSilentRequestError();if(n=this.cacheManager.isAppMetadataFOCI(r.account.environment,this.config.authOptions.clientId),n)try{return[2,this.acquireTokenWithCachedRefreshToken(r,!0)]}catch(s){if(o=s instanceof lr&&s.errorCode===ta.noTokensFoundError.code,i=s instanceof vo&&s.errorCode===Ip.INVALID_GRANT_ERROR&&s.subError===Ip.CLIENT_MISMATCH_ERROR,o||i)return[2,this.acquireTokenWithCachedRefreshToken(r,!1)];throw s}return[2,this.acquireTokenWithCachedRefreshToken(r,!1)]})})},e.prototype.acquireTokenWithCachedRefreshToken=function(r,n){var o;return K(this,void 0,void 0,function(){var i,a,s;return G(this,function(c){if(i=(o=this.performanceClient)===null||o===void 0?void 0:o.startMeasurement(je.RefreshTokenClientAcquireTokenWithCachedRefreshToken,r.correlationId),this.logger.verbose("RefreshTokenClientAcquireTokenWithCachedRefreshToken called",r.correlationId),a=this.cacheManager.readRefreshTokenFromCache(this.config.authOptions.clientId,r.account,n),!a)throw i==null||i.discardMeasurement(),lr.createNoTokensFoundError();return i==null||i.endMeasurement({success:!0}),s=ve(ve({},r),{refreshToken:a.secret,authenticationScheme:r.authenticationScheme||le.BEARER,ccsCredential:{credential:r.account.homeAccountId,type:Dt.HOME_ACCOUNT_ID}}),[2,this.acquireToken(s)]})})},e.prototype.executeTokenRequest=function(r,n){var o;return K(this,void 0,void 0,function(){var i,a,s,c,l,u;return G(this,function(h){switch(h.label){case 0:return i=(o=this.performanceClient)===null||o===void 0?void 0:o.startMeasurement(je.RefreshTokenClientExecuteTokenRequest,r.correlationId),[4,this.createTokenRequestBody(r)];case 1:return a=h.sent(),s=this.createTokenQueryParameters(r),c=this.createTokenRequestHeaders(r.ccsCredential),l={clientId:this.config.authOptions.clientId,authority:n.canonicalAuthority,scopes:r.scopes,claims:r.claims,authenticationScheme:r.authenticationScheme,resourceRequestMethod:r.resourceRequestMethod,resourceRequestUri:r.resourceRequestUri,shrClaims:r.shrClaims,sshKid:r.sshKid},u=oe.appendQueryString(n.tokenEndpoint,s),[2,this.executePostToTokenEndpoint(u,a,c,l).then(function(d){return i==null||i.endMeasurement({success:!0}),d}).catch(function(d){throw i==null||i.endMeasurement({success:!1}),d})]}})})},e.prototype.createTokenQueryParameters=function(r){var n=new Qo;return r.tokenQueryParameters&&n.addExtraQueryParameters(r.tokenQueryParameters),n.createQueryString()},e.prototype.createTokenRequestBody=function(r){var n;return K(this,void 0,void 0,function(){var o,i,a,s,c,l,u;return G(this,function(h){switch(h.label){case 0:return o=r.correlationId,i=(n=this.performanceClient)===null||n===void 0?void 0:n.startMeasurement(je.BaseClientCreateTokenRequestHeaders,o),a=new Qo,a.addClientId(this.config.authOptions.clientId),a.addScopes(r.scopes),a.addGrantType(Lc.REFRESH_TOKEN_GRANT),a.addClientInfo(),a.addLibraryInfo(this.config.libraryInfo),a.addApplicationTelemetry(this.config.telemetry.application),a.addThrottling(),this.serverTelemetryManager&&a.addServerTelemetry(this.serverTelemetryManager),a.addCorrelationId(o),a.addRefreshToken(r.refreshToken),this.config.clientCredentials.clientSecret&&a.addClientSecret(this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion&&(s=this.config.clientCredentials.clientAssertion,a.addClientAssertion(s.assertion),a.addClientAssertionType(s.assertionType)),r.authenticationScheme!==le.POP?[3,2]:(c=new vi(this.cryptoUtils),[4,c.generateCnf(r)]);case 1:return l=h.sent(),a.addPopToken(l.reqCnfString),[3,3];case 2:if(r.authenticationScheme===le.SSH)if(r.sshJwk)a.addSshJwk(r.sshJwk);else throw i==null||i.endMeasurement({success:!1}),Ee.createMissingSshJwkError();h.label=3;case 3:if((!x.isEmptyObj(r.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&a.addClaims(r.claims,this.config.authOptions.clientCapabilities),this.config.systemOptions.preventCorsPreflight&&r.ccsCredential)switch(r.ccsCredential.type){case Dt.HOME_ACCOUNT_ID:try{u=Yo(r.ccsCredential.credential),a.addCcsOid(u)}catch(d){this.logger.verbose("Could not parse home account ID for CCS Header: "+d)}break;case Dt.UPN:a.addCcsUpn(r.ccsCredential.credential);break}return i==null||i.endMeasurement({success:!0}),[2,a.createQueryString()]}})})},e}(Bh);/*! @azure/msal-common v8.0.0 2022-11-07 */var BC=function(t){Mt(e,t);function e(r,n){return t.call(this,r,n)||this}return e.prototype.acquireToken=function(r){return K(this,void 0,void 0,function(){var n,o;return G(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.acquireCachedToken(r)];case 1:return[2,i.sent()];case 2:if(n=i.sent(),n instanceof D&&n.errorCode===A.tokenRefreshRequired.code)return o=new Iy(this.config,this.performanceClient),[2,o.acquireTokenByRefreshToken(r)];throw n;case 3:return[2]}})})},e.prototype.acquireCachedToken=function(r){var n,o,i,a;return K(this,void 0,void 0,function(){var s,c;return G(this,function(l){switch(l.label){case 0:if(!r)throw Ee.createEmptyTokenRequestError();if(r.forceRefresh)throw(n=this.serverTelemetryManager)===null||n===void 0||n.setCacheOutcome(Jn.FORCE_REFRESH),this.logger.info("SilentFlowClient:acquireCachedToken - Skipping cache because forceRefresh is true."),D.createRefreshRequiredError();if(!r.account)throw D.createNoAccountInSilentRequestError();if(s=r.authority||this.authority.getPreferredCache(),c=this.cacheManager.readCacheRecord(r.account,this.config.authOptions.clientId,r,s),c.accessToken){if(Jt.wasClockTurnedBack(c.accessToken.cachedAt)||Jt.isTokenExpired(c.accessToken.expiresOn,this.config.systemOptions.tokenRenewalOffsetSeconds))throw(i=this.serverTelemetryManager)===null||i===void 0||i.setCacheOutcome(Jn.CACHED_ACCESS_TOKEN_EXPIRED),this.logger.info("SilentFlowClient:acquireCachedToken - Cached access token is expired or will expire within "+this.config.systemOptions.tokenRenewalOffsetSeconds+" seconds."),D.createRefreshRequiredError();if(c.accessToken.refreshOn&&Jt.isTokenExpired(c.accessToken.refreshOn,0))throw(a=this.serverTelemetryManager)===null||a===void 0||a.setCacheOutcome(Jn.REFRESH_CACHED_ACCESS_TOKEN),this.logger.info("SilentFlowClient:acquireCachedToken - Cached access token's refreshOn property has been exceeded'."),D.createRefreshRequiredError()}else throw(o=this.serverTelemetryManager)===null||o===void 0||o.setCacheOutcome(Jn.NO_CACHED_ACCESS_TOKEN),this.logger.info("SilentFlowClient:acquireCachedToken - No access token found in cache for the given properties."),D.createRefreshRequiredError();return this.config.serverTelemetryManager&&this.config.serverTelemetryManager.incrementCacheHits(),[4,this.generateResultFromCacheRecord(c,r)];case 1:return[2,l.sent()]}})})},e.prototype.generateResultFromCacheRecord=function(r,n){return K(this,void 0,void 0,function(){var o,i;return G(this,function(a){switch(a.label){case 0:if(r.idToken&&(o=new kr(r.idToken.secret,this.config.cryptoInterface)),n.maxAge||n.maxAge===0){if(i=o==null?void 0:o.claims.auth_time,!i)throw D.createAuthTimeNotFoundError();kr.checkMaxAge(i,n.maxAge)}return[4,Bc.generateAuthenticationResult(this.cryptoUtils,this.authority,r,!0,n,o)];case 1:return[2,a.sent()]}})})},e}(Bh);/*! @azure/msal-common v8.0.0 2022-11-07 */function qC(t){return t.hasOwnProperty("authorization_endpoint")&&t.hasOwnProperty("token_endpoint")&&t.hasOwnProperty("issuer")&&t.hasOwnProperty("jwks_uri")}/*! @azure/msal-common v8.0.0 2022-11-07 */var ky={endpointMetadata:{"https://login.microsoftonline.com/common/":{token_endpoint:"https://login.microsoftonline.com/common/oauth2/v2.0/token",token_endpoint_auth_methods_supported:["client_secret_post","private_key_jwt","client_secret_basic"],jwks_uri:"https://login.microsoftonline.com/common/discovery/v2.0/keys",response_modes_supported:["query","fragment","form_post"],subject_types_supported:["pairwise"],id_token_signing_alg_values_supported:["RS256"],response_types_supported:["code","id_token","code id_token","id_token token"],scopes_supported:["openid","profile","email","offline_access"],issuer:"https://login.microsoftonline.com/{tenantid}/v2.0",request_uri_parameter_supported:!1,userinfo_endpoint:"https://graph.microsoft.com/oidc/userinfo",authorization_endpoint:"https://login.microsoftonline.com/common/oauth2/v2.0/authorize",device_authorization_endpoint:"https://login.microsoftonline.com/common/oauth2/v2.0/devicecode",http_logout_supported:!0,frontchannel_logout_supported:!0,end_session_endpoint:"https://login.microsoftonline.com/common/oauth2/v2.0/logout",claims_supported:["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],kerberos_endpoint:"https://login.microsoftonline.com/common/kerberos",tenant_region_scope:null,cloud_instance_name:"microsoftonline.com",cloud_graph_host_name:"graph.windows.net",msgraph_host:"graph.microsoft.com",rbac_url:"https://pas.windows.net"},"https://login.chinacloudapi.cn/common/":{token_endpoint:"https://login.chinacloudapi.cn/common/oauth2/v2.0/token",token_endpoint_auth_methods_supported:["client_secret_post","private_key_jwt","client_secret_basic"],jwks_uri:"https://login.chinacloudapi.cn/common/discovery/v2.0/keys",response_modes_supported:["query","fragment","form_post"],subject_types_supported:["pairwise"],id_token_signing_alg_values_supported:["RS256"],response_types_supported:["code","id_token","code id_token","id_token token"],scopes_supported:["openid","profile","email","offline_access"],issuer:"https://login.partner.microsoftonline.cn/{tenantid}/v2.0",request_uri_parameter_supported:!1,userinfo_endpoint:"https://microsoftgraph.chinacloudapi.cn/oidc/userinfo",authorization_endpoint:"https://login.chinacloudapi.cn/common/oauth2/v2.0/authorize",device_authorization_endpoint:"https://login.chinacloudapi.cn/common/oauth2/v2.0/devicecode",http_logout_supported:!0,frontchannel_logout_supported:!0,end_session_endpoint:"https://login.chinacloudapi.cn/common/oauth2/v2.0/logout",claims_supported:["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],kerberos_endpoint:"https://login.chinacloudapi.cn/common/kerberos",tenant_region_scope:null,cloud_instance_name:"partner.microsoftonline.cn",cloud_graph_host_name:"graph.chinacloudapi.cn",msgraph_host:"microsoftgraph.chinacloudapi.cn",rbac_url:"https://pas.chinacloudapi.cn"},"https://login.microsoftonline.us/common/":{token_endpoint:"https://login.microsoftonline.us/common/oauth2/v2.0/token",token_endpoint_auth_methods_supported:["client_secret_post","private_key_jwt","client_secret_basic"],jwks_uri:"https://login.microsoftonline.us/common/discovery/v2.0/keys",response_modes_supported:["query","fragment","form_post"],subject_types_supported:["pairwise"],id_token_signing_alg_values_supported:["RS256"],response_types_supported:["code","id_token","code id_token","id_token token"],scopes_supported:["openid","profile","email","offline_access"],issuer:"https://login.microsoftonline.us/{tenantid}/v2.0",request_uri_parameter_supported:!1,userinfo_endpoint:"https://graph.microsoft.com/oidc/userinfo",authorization_endpoint:"https://login.microsoftonline.us/common/oauth2/v2.0/authorize",device_authorization_endpoint:"https://login.microsoftonline.us/common/oauth2/v2.0/devicecode",http_logout_supported:!0,frontchannel_logout_supported:!0,end_session_endpoint:"https://login.microsoftonline.us/common/oauth2/v2.0/logout",claims_supported:["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],kerberos_endpoint:"https://login.microsoftonline.us/common/kerberos",tenant_region_scope:null,cloud_instance_name:"microsoftonline.us",cloud_graph_host_name:"graph.windows.net",msgraph_host:"graph.microsoft.com",rbac_url:"https://pasff.usgovcloudapi.net"},"https://login.microsoftonline.com/consumers/":{token_endpoint:"https://login.microsoftonline.com/consumers/oauth2/v2.0/token",token_endpoint_auth_methods_supported:["client_secret_post","private_key_jwt","client_secret_basic"],jwks_uri:"https://login.microsoftonline.com/consumers/discovery/v2.0/keys",response_modes_supported:["query","fragment","form_post"],subject_types_supported:["pairwise"],id_token_signing_alg_values_supported:["RS256"],response_types_supported:["code","id_token","code id_token","id_token token"],scopes_supported:["openid","profile","email","offline_access"],issuer:"https://login.microsoftonline.com/9188040d-6c67-4c5b-b112-36a304b66dad/v2.0",request_uri_parameter_supported:!1,userinfo_endpoint:"https://graph.microsoft.com/oidc/userinfo",authorization_endpoint:"https://login.microsoftonline.com/consumers/oauth2/v2.0/authorize",device_authorization_endpoint:"https://login.microsoftonline.com/consumers/oauth2/v2.0/devicecode",http_logout_supported:!0,frontchannel_logout_supported:!0,end_session_endpoint:"https://login.microsoftonline.com/consumers/oauth2/v2.0/logout",claims_supported:["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],kerberos_endpoint:"https://login.microsoftonline.com/consumers/kerberos",tenant_region_scope:null,cloud_instance_name:"microsoftonline.com",cloud_graph_host_name:"graph.windows.net",msgraph_host:"graph.microsoft.com",rbac_url:"https://pas.windows.net"},"https://login.chinacloudapi.cn/consumers/":{token_endpoint:"https://login.chinacloudapi.cn/consumers/oauth2/v2.0/token",token_endpoint_auth_methods_supported:["client_secret_post","private_key_jwt","client_secret_basic"],jwks_uri:"https://login.chinacloudapi.cn/consumers/discovery/v2.0/keys",response_modes_supported:["query","fragment","form_post"],subject_types_supported:["pairwise"],id_token_signing_alg_values_supported:["RS256"],response_types_supported:["code","id_token","code id_token","id_token token"],scopes_supported:["openid","profile","email","offline_access"],issuer:"https://login.partner.microsoftonline.cn/9188040d-6c67-4c5b-b112-36a304b66dad/v2.0",request_uri_parameter_supported:!1,userinfo_endpoint:"https://microsoftgraph.chinacloudapi.cn/oidc/userinfo",authorization_endpoint:"https://login.chinacloudapi.cn/consumers/oauth2/v2.0/authorize",device_authorization_endpoint:"https://login.chinacloudapi.cn/consumers/oauth2/v2.0/devicecode",http_logout_supported:!0,frontchannel_logout_supported:!0,end_session_endpoint:"https://login.chinacloudapi.cn/consumers/oauth2/v2.0/logout",claims_supported:["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],kerberos_endpoint:"https://login.chinacloudapi.cn/consumers/kerberos",tenant_region_scope:null,cloud_instance_name:"partner.microsoftonline.cn",cloud_graph_host_name:"graph.chinacloudapi.cn",msgraph_host:"microsoftgraph.chinacloudapi.cn",rbac_url:"https://pas.chinacloudapi.cn"},"https://login.microsoftonline.us/consumers/":{token_endpoint:"https://login.microsoftonline.us/consumers/oauth2/v2.0/token",token_endpoint_auth_methods_supported:["client_secret_post","private_key_jwt","client_secret_basic"],jwks_uri:"https://login.microsoftonline.us/consumers/discovery/v2.0/keys",response_modes_supported:["query","fragment","form_post"],subject_types_supported:["pairwise"],id_token_signing_alg_values_supported:["RS256"],response_types_supported:["code","id_token","code id_token","id_token token"],scopes_supported:["openid","profile","email","offline_access"],issuer:"https://login.microsoftonline.us/9188040d-6c67-4c5b-b112-36a304b66dad/v2.0",request_uri_parameter_supported:!1,userinfo_endpoint:"https://graph.microsoft.com/oidc/userinfo",authorization_endpoint:"https://login.microsoftonline.us/consumers/oauth2/v2.0/authorize",device_authorization_endpoint:"https://login.microsoftonline.us/consumers/oauth2/v2.0/devicecode",http_logout_supported:!0,frontchannel_logout_supported:!0,end_session_endpoint:"https://login.microsoftonline.us/consumers/oauth2/v2.0/logout",claims_supported:["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],kerberos_endpoint:"https://login.microsoftonline.us/consumers/kerberos",tenant_region_scope:null,cloud_instance_name:"microsoftonline.us",cloud_graph_host_name:"graph.windows.net",msgraph_host:"graph.microsoft.com",rbac_url:"https://pasff.usgovcloudapi.net"},"https://login.microsoftonline.com/organizations/":{token_endpoint:"https://login.microsoftonline.com/organizations/oauth2/v2.0/token",token_endpoint_auth_methods_supported:["client_secret_post","private_key_jwt","client_secret_basic"],jwks_uri:"https://login.microsoftonline.com/organizations/discovery/v2.0/keys",response_modes_supported:["query","fragment","form_post"],subject_types_supported:["pairwise"],id_token_signing_alg_values_supported:["RS256"],response_types_supported:["code","id_token","code id_token","id_token token"],scopes_supported:["openid","profile","email","offline_access"],issuer:"https://login.microsoftonline.com/{tenantid}/v2.0",request_uri_parameter_supported:!1,userinfo_endpoint:"https://graph.microsoft.com/oidc/userinfo",authorization_endpoint:"https://login.microsoftonline.com/organizations/oauth2/v2.0/authorize",device_authorization_endpoint:"https://login.microsoftonline.com/organizations/oauth2/v2.0/devicecode",http_logout_supported:!0,frontchannel_logout_supported:!0,end_session_endpoint:"https://login.microsoftonline.com/organizations/oauth2/v2.0/logout",claims_supported:["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],kerberos_endpoint:"https://login.microsoftonline.com/organizations/kerberos",tenant_region_scope:null,cloud_instance_name:"microsoftonline.com",cloud_graph_host_name:"graph.windows.net",msgraph_host:"graph.microsoft.com",rbac_url:"https://pas.windows.net"},"https://login.chinacloudapi.cn/organizations/":{token_endpoint:"https://login.chinacloudapi.cn/organizations/oauth2/v2.0/token",token_endpoint_auth_methods_supported:["client_secret_post","private_key_jwt","client_secret_basic"],jwks_uri:"https://login.chinacloudapi.cn/organizations/discovery/v2.0/keys",response_modes_supported:["query","fragment","form_post"],subject_types_supported:["pairwise"],id_token_signing_alg_values_supported:["RS256"],response_types_supported:["code","id_token","code id_token","id_token token"],scopes_supported:["openid","profile","email","offline_access"],issuer:"https://login.partner.microsoftonline.cn/{tenantid}/v2.0",request_uri_parameter_supported:!1,userinfo_endpoint:"https://microsoftgraph.chinacloudapi.cn/oidc/userinfo",authorization_endpoint:"https://login.chinacloudapi.cn/organizations/oauth2/v2.0/authorize",device_authorization_endpoint:"https://login.chinacloudapi.cn/organizations/oauth2/v2.0/devicecode",http_logout_supported:!0,frontchannel_logout_supported:!0,end_session_endpoint:"https://login.chinacloudapi.cn/organizations/oauth2/v2.0/logout",claims_supported:["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],kerberos_endpoint:"https://login.chinacloudapi.cn/organizations/kerberos",tenant_region_scope:null,cloud_instance_name:"partner.microsoftonline.cn",cloud_graph_host_name:"graph.chinacloudapi.cn",msgraph_host:"microsoftgraph.chinacloudapi.cn",rbac_url:"https://pas.chinacloudapi.cn"},"https://login.microsoftonline.us/organizations/":{token_endpoint:"https://login.microsoftonline.us/organizations/oauth2/v2.0/token",token_endpoint_auth_methods_supported:["client_secret_post","private_key_jwt","client_secret_basic"],jwks_uri:"https://login.microsoftonline.us/organizations/discovery/v2.0/keys",response_modes_supported:["query","fragment","form_post"],subject_types_supported:["pairwise"],id_token_signing_alg_values_supported:["RS256"],response_types_supported:["code","id_token","code id_token","id_token token"],scopes_supported:["openid","profile","email","offline_access"],issuer:"https://login.microsoftonline.us/{tenantid}/v2.0",request_uri_parameter_supported:!1,userinfo_endpoint:"https://graph.microsoft.com/oidc/userinfo",authorization_endpoint:"https://login.microsoftonline.us/organizations/oauth2/v2.0/authorize",device_authorization_endpoint:"https://login.microsoftonline.us/organizations/oauth2/v2.0/devicecode",http_logout_supported:!0,frontchannel_logout_supported:!0,end_session_endpoint:"https://login.microsoftonline.us/organizations/oauth2/v2.0/logout",claims_supported:["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],kerberos_endpoint:"https://login.microsoftonline.us/organizations/kerberos",tenant_region_scope:null,cloud_instance_name:"microsoftonline.us",cloud_graph_host_name:"graph.windows.net",msgraph_host:"graph.microsoft.com",rbac_url:"https://pasff.usgovcloudapi.net"}},instanceDiscoveryMetadata:{"https://login.microsoftonline.com/common/":{tenant_discovery_endpoint:"https://login.microsoftonline.com/common/v2.0/.well-known/openid-configuration","api-version":"1.1",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"]}]},"https://login.chinacloudapi.cn/common/":{tenant_discovery_endpoint:"https://login.chinacloudapi.cn/common/v2.0/.well-known/openid-configuration","api-version":"1.1",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"]}]},"https://login.microsoftonline.us/common/":{tenant_discovery_endpoint:"https://login.microsoftonline.us/common/v2.0/.well-known/openid-configuration","api-version":"1.1",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"]}]},"https://login.microsoftonline.com/consumers/":{tenant_discovery_endpoint:"https://login.microsoftonline.com/consumers/v2.0/.well-known/openid-configuration","api-version":"1.1",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"]}]},"https://login.chinacloudapi.cn/consumers/":{tenant_discovery_endpoint:"https://login.chinacloudapi.cn/consumers/v2.0/.well-known/openid-configuration","api-version":"1.1",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"]}]},"https://login.microsoftonline.us/consumers/":{tenant_discovery_endpoint:"https://login.microsoftonline.us/consumers/v2.0/.well-known/openid-configuration","api-version":"1.1",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"]}]},"https://login.microsoftonline.com/organizations/":{tenant_discovery_endpoint:"https://login.microsoftonline.com/organizations/v2.0/.well-known/openid-configuration","api-version":"1.1",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"]}]},"https://login.chinacloudapi.cn/organizations/":{tenant_discovery_endpoint:"https://login.chinacloudapi.cn/organizations/v2.0/.well-known/openid-configuration","api-version":"1.1",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"]}]},"https://login.microsoftonline.us/organizations/":{tenant_discovery_endpoint:"https://login.microsoftonline.us/organizations/v2.0/.well-known/openid-configuration","api-version":"1.1",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"]}]}}},Ap=ky.endpointMetadata,Rp=ky.instanceDiscoveryMetadata;/*! @azure/msal-common v8.0.0 2022-11-07 */var qc;(function(t){t.AAD="AAD",t.OIDC="OIDC"})(qc||(qc={}));/*! @azure/msal-common v8.0.0 2022-11-07 */var Id=function(){function t(){this.expiresAt=Jt.nowSeconds()+_a.REFRESH_TIME_SECONDS}return t.prototype.updateCloudDiscoveryMetadata=function(e,r){this.aliases=e.aliases,this.preferred_cache=e.preferred_cache,this.preferred_network=e.preferred_network,this.aliasesFromNetwork=r},t.prototype.updateEndpointMetadata=function(e,r){this.authorization_endpoint=e.authorization_endpoint,this.token_endpoint=e.token_endpoint,this.end_session_endpoint=e.end_session_endpoint,this.issuer=e.issuer,this.endpointsFromNetwork=r,this.jwks_uri=e.jwks_uri},t.prototype.updateCanonicalAuthority=function(e){this.canonical_authority=e},t.prototype.resetExpiresAt=function(){this.expiresAt=Jt.nowSeconds()+_a.REFRESH_TIME_SECONDS},t.prototype.isExpired=function(){return this.expiresAt<=Jt.nowSeconds()},t.isAuthorityMetadataEntity=function(e,r){return r?e.indexOf(_a.CACHE_KEY)===0&&r.hasOwnProperty("aliases")&&r.hasOwnProperty("preferred_cache")&&r.hasOwnProperty("preferred_network")&&r.hasOwnProperty("canonical_authority")&&r.hasOwnProperty("authorization_endpoint")&&r.hasOwnProperty("token_endpoint")&&r.hasOwnProperty("issuer")&&r.hasOwnProperty("aliasesFromNetwork")&&r.hasOwnProperty("endpointsFromNetwork")&&r.hasOwnProperty("expiresAt")&&r.hasOwnProperty("jwks_uri"):!1},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */function KC(t){return t.hasOwnProperty("tenant_discovery_endpoint")&&t.hasOwnProperty("metadata")}/*! @azure/msal-common v8.0.0 2022-11-07 */var GC=function(){function t(e){this.networkInterface=e}return t.prototype.detectRegion=function(e,r,n){return K(this,void 0,void 0,function(){var o,i,a,s,c;return G(this,function(l){switch(l.label){case 0:if(o=e,o)return[3,8];i=t.IMDS_OPTIONS,n&&(i.proxyUrl=n),l.label=1;case 1:return l.trys.push([1,6,,7]),[4,this.getRegionFromIMDS(_.IMDS_VERSION,i)];case 2:return a=l.sent(),a.status===Wo.httpSuccess&&(o=a.body,r.region_source=gn.IMDS),a.status!==Wo.httpBadRequest?[3,5]:[4,this.getCurrentVersion(i)];case 3:return s=l.sent(),s?[4,this.getRegionFromIMDS(s,i)]:(r.region_source=gn.FAILED_AUTO_DETECTION,[2,null]);case 4:c=l.sent(),c.status===Wo.httpSuccess&&(o=c.body,r.region_source=gn.IMDS),l.label=5;case 5:return[3,7];case 6:return l.sent(),r.region_source=gn.FAILED_AUTO_DETECTION,[2,null];case 7:return[3,9];case 8:r.region_source=gn.ENVIRONMENT_VARIABLE,l.label=9;case 9:return o||(r.region_source=gn.FAILED_AUTO_DETECTION),[2,o||null]}})})},t.prototype.getRegionFromIMDS=function(e,r){return K(this,void 0,void 0,function(){return G(this,function(n){return[2,this.networkInterface.sendGetRequestAsync(_.IMDS_ENDPOINT+"?api-version="+e+"&format=text",r,_.IMDS_TIMEOUT)]})})},t.prototype.getCurrentVersion=function(e){return K(this,void 0,void 0,function(){var r;return G(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.networkInterface.sendGetRequestAsync(_.IMDS_ENDPOINT+"?format=json",e)];case 1:return r=n.sent(),r.status===Wo.httpBadRequest&&r.body&&r.body["newest-versions"]&&r.body["newest-versions"].length>0?[2,r.body["newest-versions"][0]]:[2,null];case 2:return n.sent(),[2,null];case 3:return[2]}})})},t.IMDS_OPTIONS={headers:{Metadata:"true"}},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var Kc=function(){function t(e,r,n,o,i){this.canonicalAuthority=e,this._canonicalAuthority.validateAsUri(),this.networkInterface=r,this.cacheManager=n,this.authorityOptions=o,this.regionDiscovery=new GC(r),this.regionDiscoveryMetadata={region_used:void 0,region_source:void 0,region_outcome:void 0},this.proxyUrl=i||_.EMPTY_STRING}return Object.defineProperty(t.prototype,"authorityType",{get:function(){var e=this.canonicalAuthorityUrlComponents.PathSegments;if(e.length)switch(e[0].toLowerCase()){case _.ADFS:return Wt.Adfs;case _.DSTS:return Wt.Dsts}return Wt.Default},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"protocolMode",{get:function(){return this.authorityOptions.protocolMode},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"options",{get:function(){return this.authorityOptions},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canonicalAuthority",{get:function(){return this._canonicalAuthority.urlString},set:function(e){this._canonicalAuthority=new oe(e),this._canonicalAuthority.validateAsUri(),this._canonicalAuthorityUrlComponents=null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canonicalAuthorityUrlComponents",{get:function(){return this._canonicalAuthorityUrlComponents||(this._canonicalAuthorityUrlComponents=this._canonicalAuthority.getUrlComponents()),this._canonicalAuthorityUrlComponents},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hostnameAndPort",{get:function(){return this.canonicalAuthorityUrlComponents.HostNameAndPort.toLowerCase()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tenant",{get:function(){return this.canonicalAuthorityUrlComponents.PathSegments[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"authorizationEndpoint",{get:function(){if(this.discoveryComplete()){var e=this.replacePath(this.metadata.authorization_endpoint);return this.replaceTenant(e)}else throw D.createEndpointDiscoveryIncompleteError("Discovery incomplete.")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tokenEndpoint",{get:function(){if(this.discoveryComplete()){var e=this.replacePath(this.metadata.token_endpoint);return this.replaceTenant(e)}else throw D.createEndpointDiscoveryIncompleteError("Discovery incomplete.")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"deviceCodeEndpoint",{get:function(){if(this.discoveryComplete()){var e=this.replacePath(this.metadata.token_endpoint.replace("/token","/devicecode"));return this.replaceTenant(e)}else throw D.createEndpointDiscoveryIncompleteError("Discovery incomplete.")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"endSessionEndpoint",{get:function(){if(this.discoveryComplete()){if(!this.metadata.end_session_endpoint)throw D.createLogoutNotSupportedError();var e=this.replacePath(this.metadata.end_session_endpoint);return this.replaceTenant(e)}else throw D.createEndpointDiscoveryIncompleteError("Discovery incomplete.")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"selfSignedJwtAudience",{get:function(){if(this.discoveryComplete()){var e=this.replacePath(this.metadata.issuer);return this.replaceTenant(e)}else throw D.createEndpointDiscoveryIncompleteError("Discovery incomplete.")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"jwksUri",{get:function(){if(this.discoveryComplete()){var e=this.replacePath(this.metadata.jwks_uri);return this.replaceTenant(e)}else throw D.createEndpointDiscoveryIncompleteError("Discovery incomplete.")},enumerable:!1,configurable:!0}),t.prototype.replaceTenant=function(e){return e.replace(/{tenant}|{tenantid}/g,this.tenant)},t.prototype.replacePath=function(e){var r=e,n=new oe(this.metadata.canonical_authority),o=n.getUrlComponents().PathSegments,i=this.canonicalAuthorityUrlComponents.PathSegments;return i.forEach(function(a,s){var c=o[s];a!==c&&(r=r.replace("/"+c+"/","/"+a+"/"))}),r},Object.defineProperty(t.prototype,"defaultOpenIdConfigurationEndpoint",{get:function(){return this.authorityType===Wt.Adfs||this.authorityType===Wt.Dsts||this.protocolMode===qc.OIDC?this.canonicalAuthority+".well-known/openid-configuration":this.canonicalAuthority+"v2.0/.well-known/openid-configuration"},enumerable:!1,configurable:!0}),t.prototype.discoveryComplete=function(){return!!this.metadata},t.prototype.resolveEndpointsAsync=function(){return K(this,void 0,void 0,function(){var e,r,n,o;return G(this,function(i){switch(i.label){case 0:return e=this.cacheManager.getAuthorityMetadataByAlias(this.hostnameAndPort),e||(e=new Id,e.updateCanonicalAuthority(this.canonicalAuthority)),[4,this.updateCloudDiscoveryMetadata(e)];case 1:return r=i.sent(),this.canonicalAuthority=this.canonicalAuthority.replace(this.hostnameAndPort,e.preferred_network),[4,this.updateEndpointMetadata(e)];case 2:return n=i.sent(),r!==qt.CACHE&&n!==qt.CACHE&&(e.resetExpiresAt(),e.updateCanonicalAuthority(this.canonicalAuthority)),o=this.cacheManager.generateAuthorityMetadataCacheKey(e.preferred_cache),this.cacheManager.setAuthorityMetadata(o,e),this.metadata=e,[2]}})})},t.prototype.updateEndpointMetadata=function(e){var r,n;return K(this,void 0,void 0,function(){var o,i;return G(this,function(a){switch(a.label){case 0:return o=this.getEndpointMetadataFromConfig(),o?(e.updateEndpointMetadata(o,!1),[2,qt.CONFIG]):this.isAuthoritySameType(e)&&e.endpointsFromNetwork&&!e.isExpired()?[2,qt.CACHE]:(i=this.getEndpointMetadataFromHardcodedValues(),[4,this.getEndpointMetadataFromNetwork()]);case 1:return o=a.sent(),o?!((r=this.authorityOptions.azureRegionConfiguration)===null||r===void 0)&&r.azureRegion?[4,this.updateMetadataWithRegionalInformation(o)]:[3,3]:[3,4];case 2:o=a.sent(),a.label=3;case 3:return e.updateEndpointMetadata(o,!0),[2,qt.NETWORK];case 4:return i&&!this.authorityOptions.skipAuthorityMetadataCache?!((n=this.authorityOptions.azureRegionConfiguration)===null||n===void 0)&&n.azureRegion?[4,this.updateMetadataWithRegionalInformation(i)]:[3,6]:[3,7];case 5:i=a.sent(),a.label=6;case 6:return e.updateEndpointMetadata(i,!1),[2,qt.HARDCODED_VALUES];case 7:throw D.createUnableToGetOpenidConfigError(this.defaultOpenIdConfigurationEndpoint)}})})},t.prototype.isAuthoritySameType=function(e){var r=new oe(e.canonical_authority),n=r.getUrlComponents().PathSegments;return n.length===this.canonicalAuthorityUrlComponents.PathSegments.length},t.prototype.getEndpointMetadataFromConfig=function(){if(this.authorityOptions.authorityMetadata)try{return JSON.parse(this.authorityOptions.authorityMetadata)}catch{throw Ee.createInvalidAuthorityMetadataError()}return null},t.prototype.getEndpointMetadataFromNetwork=function(){return K(this,void 0,void 0,function(){var e,r;return G(this,function(n){switch(n.label){case 0:e={},this.proxyUrl&&(e.proxyUrl=this.proxyUrl),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.networkInterface.sendGetRequestAsync(this.defaultOpenIdConfigurationEndpoint,e)];case 2:return r=n.sent(),[2,qC(r.body)?r.body:null];case 3:return n.sent(),[2,null];case 4:return[2]}})})},t.prototype.getEndpointMetadataFromHardcodedValues=function(){return this.canonicalAuthority in Ap?Ap[this.canonicalAuthority]:null},t.prototype.updateMetadataWithRegionalInformation=function(e){var r,n,o,i,a;return K(this,void 0,void 0,function(){var s,c;return G(this,function(l){switch(l.label){case 0:return[4,this.regionDiscovery.detectRegion((r=this.authorityOptions.azureRegionConfiguration)===null||r===void 0?void 0:r.environmentRegion,this.regionDiscoveryMetadata,this.proxyUrl)];case 1:return s=l.sent(),c=((n=this.authorityOptions.azureRegionConfiguration)===null||n===void 0?void 0:n.azureRegion)===_.AZURE_REGION_AUTO_DISCOVER_FLAG?s:(o=this.authorityOptions.azureRegionConfiguration)===null||o===void 0?void 0:o.azureRegion,((i=this.authorityOptions.azureRegionConfiguration)===null||i===void 0?void 0:i.azureRegion)===_.AZURE_REGION_AUTO_DISCOVER_FLAG?this.regionDiscoveryMetadata.region_outcome=s?Gn.AUTO_DETECTION_REQUESTED_SUCCESSFUL:Gn.AUTO_DETECTION_REQUESTED_FAILED:s?this.regionDiscoveryMetadata.region_outcome=((a=this.authorityOptions.azureRegionConfiguration)===null||a===void 0?void 0:a.azureRegion)===s?Gn.CONFIGURED_MATCHES_DETECTED:Gn.CONFIGURED_NOT_DETECTED:this.regionDiscoveryMetadata.region_outcome=Gn.CONFIGURED_NO_AUTO_DETECTION,c?(this.regionDiscoveryMetadata.region_used=c,[2,t.replaceWithRegionalInformation(e,c)]):[2,e]}})})},t.prototype.updateCloudDiscoveryMetadata=function(e){return K(this,void 0,void 0,function(){var r,n;return G(this,function(o){switch(o.label){case 0:return r=this.getCloudDiscoveryMetadataFromConfig(),r?(e.updateCloudDiscoveryMetadata(r,!1),[2,qt.CONFIG]):this.isAuthoritySameType(e)&&e.aliasesFromNetwork&&!e.isExpired()?[2,qt.CACHE]:(n=this.getCloudDiscoveryMetadataFromHarcodedValues(),[4,this.getCloudDiscoveryMetadataFromNetwork()]);case 1:if(r=o.sent(),r)return e.updateCloudDiscoveryMetadata(r,!0),[2,qt.NETWORK];if(n&&!this.options.skipAuthorityMetadataCache)return e.updateCloudDiscoveryMetadata(n,!1),[2,qt.HARDCODED_VALUES];throw Ee.createUntrustedAuthorityError()}})})},t.prototype.getCloudDiscoveryMetadataFromConfig=function(){if(this.authorityOptions.cloudDiscoveryMetadata)try{var e=JSON.parse(this.authorityOptions.cloudDiscoveryMetadata),r=t.getCloudDiscoveryMetadataFromNetworkResponse(e.metadata,this.hostnameAndPort);if(r)return r}catch{throw Ee.createInvalidCloudDiscoveryMetadataError()}return this.isInKnownAuthorities()?t.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort):null},t.prototype.getCloudDiscoveryMetadataFromNetwork=function(){return K(this,void 0,void 0,function(){var e,r,n,o,i;return G(this,function(a){switch(a.label){case 0:e=""+_.AAD_INSTANCE_DISCOVERY_ENDPT+this.canonicalAuthority+"oauth2/v2.0/authorize",r={},this.proxyUrl&&(r.proxyUrl=this.proxyUrl),n=null,a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.networkInterface.sendGetRequestAsync(e,r)];case 2:return o=a.sent(),i=KC(o.body)?o.body.metadata:[],i.length===0?[2,null]:(n=t.getCloudDiscoveryMetadataFromNetworkResponse(i,this.hostnameAndPort),[3,4]);case 3:return a.sent(),[2,null];case 4:return n||(n=t.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)),[2,n]}})})},t.prototype.getCloudDiscoveryMetadataFromHarcodedValues=function(){return this.canonicalAuthority in Rp?Rp[this.canonicalAuthority]:null},t.prototype.isInKnownAuthorities=function(){var e=this,r=this.authorityOptions.knownAuthorities.filter(function(n){return oe.getDomainFromUrl(n).toLowerCase()===e.hostnameAndPort});return r.length>0},t.generateAuthority=function(e,r){var n;if(r&&r.azureCloudInstance!==$a.None){var o=r.tenant?r.tenant:_.DEFAULT_COMMON_TENANT;n=r.azureCloudInstance+"/"+o+"/"}return n||e},t.createCloudDiscoveryMetadataFromHost=function(e){return{preferred_network:e,preferred_cache:e,aliases:[e]}},t.getCloudDiscoveryMetadataFromNetworkResponse=function(e,r){for(var n=0;n<e.length;n++){var o=e[n];if(o.aliases.indexOf(r)>-1)return o}return null},t.prototype.getPreferredCache=function(){if(this.discoveryComplete())return this.metadata.preferred_cache;throw D.createEndpointDiscoveryIncompleteError("Discovery incomplete.")},t.prototype.isAlias=function(e){return this.metadata.aliases.indexOf(e)>-1},t.isPublicCloudAuthority=function(e){return _.KNOWN_PUBLIC_CLOUDS.indexOf(e)>=0},t.buildRegionalAuthorityString=function(e,r,n){var o=new oe(e);o.validateAsUri();var i=o.getUrlComponents(),a=r+"."+i.HostNameAndPort;this.isPublicCloudAuthority(i.HostNameAndPort)&&(a=r+"."+_.REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX);var s=oe.constructAuthorityUriFromObject(ve(ve({},o.getUrlComponents()),{HostNameAndPort:a})).urlString;return n?s+"?"+n:s},t.replaceWithRegionalInformation=function(e,r){return e.authorization_endpoint=t.buildRegionalAuthorityString(e.authorization_endpoint,r),e.token_endpoint=t.buildRegionalAuthorityString(e.token_endpoint,r,_.REGIONAL_AUTH_NON_MSI_QUERY_STRING),e.end_session_endpoint&&(e.end_session_endpoint=t.buildRegionalAuthorityString(e.end_session_endpoint,r)),e},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var Gc=function(){function t(){}return t.createDiscoveredInstance=function(e,r,n,o,i){return K(this,void 0,void 0,function(){var a,s;return G(this,function(c){switch(c.label){case 0:a=t.createInstance(e,r,n,o,i),c.label=1;case 1:return c.trys.push([1,3,,4]),[4,a.resolveEndpointsAsync()];case 2:return c.sent(),[2,a];case 3:throw s=c.sent(),D.createEndpointDiscoveryIncompleteError(s);case 4:return[2]}})})},t.createInstance=function(e,r,n,o,i){if(x.isEmpty(e))throw Ee.createUrlEmptyError();return new Kc(e,r,n,o,i)},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var Vc=function(){function t(){this.failedRequests=[],this.errors=[],this.cacheHits=0}return t.isServerTelemetryEntity=function(e,r){var n=e.indexOf(Ye.CACHE_KEY)===0,o=!0;return r&&(o=r.hasOwnProperty("failedRequests")&&r.hasOwnProperty("errors")&&r.hasOwnProperty("cacheHits")),n&&o},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var Pp=function(){function t(){}return t.isThrottlingEntity=function(e,r){var n=!1;e&&(n=e.indexOf(wa.THROTTLING_PREFIX)===0);var o=!0;return r&&(o=r.hasOwnProperty("throttleTime")),n&&o},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var VC={sendGetRequestAsync:function(){var t="Network interface - sendGetRequestAsync() has not been implemented for the Network interface.";return Promise.reject(z.createUnexpectedError(t))},sendPostRequestAsync:function(){var t="Network interface - sendPostRequestAsync() has not been implemented for the Network interface.";return Promise.reject(z.createUnexpectedError(t))}};/*! @azure/msal-common v8.0.0 2022-11-07 */var Rs={missingKidError:{code:"missing_kid_error",desc:"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."},missingAlgError:{code:"missing_alg_error",desc:"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."}},Np=function(t){Mt(e,t);function e(r,n){var o=t.call(this,r,n)||this;return o.name="JoseHeaderError",Object.setPrototypeOf(o,e.prototype),o}return e.createMissingKidError=function(){return new e(Rs.missingKidError.code,Rs.missingKidError.desc)},e.createMissingAlgError=function(){return new e(Rs.missingAlgError.code,Rs.missingAlgError.desc)},e}(z);/*! @azure/msal-common v8.0.0 2022-11-07 */var WC=function(){function t(e){this.typ=e.typ,this.alg=e.alg,this.kid=e.kid}return t.getShrHeaderString=function(e){if(!e.kid)throw Np.createMissingKidError();if(!e.alg)throw Np.createMissingAlgError();var r=new t({typ:e.typ||Sd.Jwt,kid:e.kid,alg:e.alg});return JSON.stringify(r)},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var YC=function(){function t(e,r){this.cacheOutcome=Jn.NO_CACHE_HIT,this.cacheManager=r,this.apiId=e.apiId,this.correlationId=e.correlationId,this.wrapperSKU=e.wrapperSKU||_.EMPTY_STRING,this.wrapperVer=e.wrapperVer||_.EMPTY_STRING,this.telemetryCacheKey=Ye.CACHE_KEY+Ft.CACHE_KEY_SEPARATOR+e.clientId}return t.prototype.generateCurrentRequestHeaderValue=function(){var e=""+this.apiId+Ye.VALUE_SEPARATOR+this.cacheOutcome,r=[this.wrapperSKU,this.wrapperVer].join(Ye.VALUE_SEPARATOR),n=this.getRegionDiscoveryFields(),o=[e,n].join(Ye.VALUE_SEPARATOR);return[Ye.SCHEMA_VERSION,o,r].join(Ye.CATEGORY_SEPARATOR)},t.prototype.generateLastRequestHeaderValue=function(){var e=this.getLastRequests(),r=t.maxErrorsToSend(e),n=e.failedRequests.slice(0,2*r).join(Ye.VALUE_SEPARATOR),o=e.errors.slice(0,r).join(Ye.VALUE_SEPARATOR),i=e.errors.length,a=r<i?Ye.OVERFLOW_TRUE:Ye.OVERFLOW_FALSE,s=[i,a].join(Ye.VALUE_SEPARATOR);return[Ye.SCHEMA_VERSION,e.cacheHits,n,o,s].join(Ye.CATEGORY_SEPARATOR)},t.prototype.cacheFailedRequest=function(e){var r=this.getLastRequests();r.errors.length>=Ye.MAX_CACHED_ERRORS&&(r.failedRequests.shift(),r.failedRequests.shift(),r.errors.shift()),r.failedRequests.push(this.apiId,this.correlationId),x.isEmpty(e.subError)?x.isEmpty(e.errorCode)?!!e&&e.toString()?r.errors.push(e.toString()):r.errors.push(Ye.UNKNOWN_ERROR):r.errors.push(e.errorCode):r.errors.push(e.subError),this.cacheManager.setServerTelemetry(this.telemetryCacheKey,r)},t.prototype.incrementCacheHits=function(){var e=this.getLastRequests();return e.cacheHits+=1,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,e),e.cacheHits},t.prototype.getLastRequests=function(){var e=new Vc,r=this.cacheManager.getServerTelemetry(this.telemetryCacheKey);return r||e},t.prototype.clearTelemetryCache=function(){var e=this.getLastRequests(),r=t.maxErrorsToSend(e),n=e.errors.length;if(r===n)this.cacheManager.removeItem(this.telemetryCacheKey);else{var o=new Vc;o.failedRequests=e.failedRequests.slice(r*2),o.errors=e.errors.slice(r),this.cacheManager.setServerTelemetry(this.telemetryCacheKey,o)}},t.maxErrorsToSend=function(e){var r,n=0,o=0,i=e.errors.length;for(r=0;r<i;r++){var a=e.failedRequests[2*r]||_.EMPTY_STRING,s=e.failedRequests[2*r+1]||_.EMPTY_STRING,c=e.errors[r]||_.EMPTY_STRING;if(o+=a.toString().length+s.toString().length+c.length+3,o<Ye.MAX_LAST_HEADER_BYTES)n+=1;else break}return n},t.prototype.getRegionDiscoveryFields=function(){var e=[];return e.push(this.regionUsed||_.EMPTY_STRING),e.push(this.regionSource||_.EMPTY_STRING),e.push(this.regionOutcome||_.EMPTY_STRING),e.join(",")},t.prototype.updateRegionDiscoveryMetadata=function(e){this.regionUsed=e.region_used,this.regionSource=e.region_source,this.regionOutcome=e.region_outcome},t.prototype.setCacheOutcome=function(e){this.cacheOutcome=e},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var Ay=function(){function t(e,r,n,o,i,a){this.authority=r,this.libraryName=o,this.libraryVersion=i,this.applicationTelemetry=a,this.clientId=e,this.logger=n,this.callbacks=new Map,this.eventsByCorrelationId=new Map,this.staticFieldsByCorrelationId=new Map,this.measurementsById=new Map}return t.prototype.startMeasurement=function(e,r){var n=this,o,i,a=r||this.generateId();r||this.logger.info("PerformanceClient: No correlation id provided for "+e+", generating",a),this.logger.trace("PerformanceClient: Performance measurement started for "+e,a);var s=this.startPerformanceMeasuremeant(e,a);s.startMeasurement();var c={eventId:this.generateId(),status:Jo.InProgress,authority:this.authority,libraryName:this.libraryName,libraryVersion:this.libraryVersion,clientId:this.clientId,name:e,startTimeMs:Date.now(),correlationId:a};this.cacheEventByCorrelationId(c);var l={appName:(o=this.applicationTelemetry)===null||o===void 0?void 0:o.appName,appVersion:(i=this.applicationTelemetry)===null||i===void 0?void 0:i.appVersion};return this.addStaticFields(l,a),this.cacheMeasurement(c,s),{endMeasurement:function(u){var h=n.endMeasurement(ve(ve({},c),u));return h&&n.cacheEventByCorrelationId(h),h},flushMeasurement:function(){return n.flushMeasurements(c.name,c.correlationId)},discardMeasurement:function(){return n.discardMeasurements(c.correlationId)},addStaticFields:function(u){return n.addStaticFields(u,c.correlationId)},measurement:s,event:c}},t.prototype.endMeasurement=function(e){var r=this.measurementsById.get(e.eventId);if(r){this.measurementsById.delete(e.eventId),r.endMeasurement();var n=r.flushMeasurement();if(n!==null){this.logger.trace("PerformanceClient: Performance measurement ended for "+e.name+": "+n+" ms",e.correlationId);var o=ve(ve({durationMs:Math.round(n)},e),{status:Jo.Completed});return o}else this.logger.trace("PerformanceClient: Performance measurement not taken",e.correlationId)}else this.logger.trace("PerformanceClient: Measurement not found for "+e.eventId,e.correlationId);return null},t.prototype.addStaticFields=function(e,r){var n=this.staticFieldsByCorrelationId.get(r);n?(this.logger.trace("PerformanceClient: Updating static fields"),this.staticFieldsByCorrelationId.set(r,ve(ve({},n),e))):(this.logger.trace("PerformanceClient: Adding static fields"),this.staticFieldsByCorrelationId.set(r,e))},t.prototype.cacheEventByCorrelationId=function(e){var r=this.eventsByCorrelationId.get(e.correlationId);r?(this.logger.trace("PerformanceClient: Performance measurement for "+e.name+" added/updated",e.correlationId),r.set(e.eventId,e)):(this.logger.trace("PerformanceClient: Performance measurement for "+e.name+" started",e.correlationId),this.eventsByCorrelationId.set(e.correlationId,new Map().set(e.eventId,e)))},t.prototype.cacheMeasurement=function(e,r){this.measurementsById.set(e.eventId,r)},t.prototype.flushMeasurements=function(e,r){var n=this;this.logger.trace("PerformanceClient: Performance measurements flushed for "+e,r);var o=this.eventsByCorrelationId.get(r);if(o){this.discardMeasurements(r);var i=[];o.forEach(function(d){if(d.name!==e&&d.status!==Jo.Completed){n.logger.trace("PerformanceClient: Incomplete submeasurement "+d.name+" found for "+e,r);var f=n.endMeasurement(d);f&&i.push(f)}i.push(d)});var a=i.sort(function(d,f){return d.startTimeMs-f.startTimeMs}),s=a.filter(function(d){return d.name===e&&d.status===Jo.Completed});if(s.length>0){s.length>1&&this.logger.verbose("PerformanceClient: Multiple distinct top-level performance events found, using the first",r);var c=s[0];this.logger.verbose("PerformanceClient: Measurement found for "+e,r);var l=a.reduce(function(d,f){if(f.name!==e){n.logger.trace("PerformanceClient: Complete submeasurement found for "+f.name,r);var m=f.name+"DurationMs";d[m]?n.logger.verbose("PerformanceClient: Submeasurement for "+e+" already exists for "+f.name+", ignoring",r):d[m]=f.durationMs}return d},c),u=this.staticFieldsByCorrelationId.get(r),h=ve(ve({},l),u);this.emitEvents([h],l.correlationId)}else this.logger.verbose("PerformanceClient: No completed top-level measurements found for "+e,r)}else this.logger.verbose("PerformanceClient: No measurements found",r)},t.prototype.discardMeasurements=function(e){this.logger.trace("PerformanceClient: Performance measurements discarded",e),this.eventsByCorrelationId.delete(e)},t.prototype.addPerformanceCallback=function(e){var r=this.generateId();return this.callbacks.set(r,e),this.logger.verbose("PerformanceClient: Performance callback registered with id: "+r),r},t.prototype.removePerformanceCallback=function(e){var r=this.callbacks.delete(e);return r?this.logger.verbose("PerformanceClient: Performance callback "+e+" removed."):this.logger.verbose("PerformanceClient: Performance callback "+e+" not removed."),r},t.prototype.emitEvents=function(e,r){var n=this;this.logger.verbose("PerformanceClient: Emitting performance events",r),this.callbacks.forEach(function(o,i){n.logger.trace("PerformanceClient: Emitting event to callback "+i,r),o.apply(null,[e])})},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var QC=function(){function t(){}return t.prototype.startMeasurement=function(){},t.prototype.endMeasurement=function(){},t.prototype.flushMeasurement=function(){return null},t}(),JC=function(t){Mt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.generateId=function(){return"callback-id"},e.prototype.startPerformanceMeasuremeant=function(){return new QC},e}(Ay);/*! @azure/msal-browser v2.31.0 2022-11-07 */var I={pkceNotGenerated:{code:"pkce_not_created",desc:"The PKCE code challenge and verifier could not be generated."},cryptoDoesNotExist:{code:"crypto_nonexistent",desc:"The crypto object or function is not available."},httpMethodNotImplementedError:{code:"http_method_not_implemented",desc:"The HTTP method given has not been implemented in this library."},emptyNavigateUriError:{code:"empty_navigate_uri",desc:"Navigation URI is empty. Please check stack trace for more info."},hashEmptyError:{code:"hash_empty_error",desc:"Hash value cannot be processed because it is empty. Please verify that your redirectUri is not clearing the hash. For more visit: aka.ms/msaljs/browser-errors."},hashDoesNotContainStateError:{code:"no_state_in_hash",desc:"Hash does not contain state. Please verify that the request originated from msal."},hashDoesNotContainKnownPropertiesError:{code:"hash_does_not_contain_known_properties",desc:"Hash does not contain known properites. Please verify that your redirectUri is not changing the hash. For more visit: aka.ms/msaljs/browser-errors."},unableToParseStateError:{code:"unable_to_parse_state",desc:"Unable to parse state. Please verify that the request originated from msal."},stateInteractionTypeMismatchError:{code:"state_interaction_type_mismatch",desc:"Hash contains state but the interaction type does not match the caller."},interactionInProgress:{code:"interaction_in_progress",desc:"Interaction is currently in progress. Please ensure that this interaction has been completed before calling an interactive API. For more visit: aka.ms/msaljs/browser-errors."},popupWindowError:{code:"popup_window_error",desc:"Error opening popup window. This can happen if you are using IE or if popups are blocked in the browser."},emptyWindowError:{code:"empty_window_error",desc:"window.open returned null or undefined window object."},userCancelledError:{code:"user_cancelled",desc:"User cancelled the flow."},monitorPopupTimeoutError:{code:"monitor_window_timeout",desc:"Token acquisition in popup failed due to timeout. For more visit: aka.ms/msaljs/browser-errors."},monitorIframeTimeoutError:{code:"monitor_window_timeout",desc:"Token acquisition in iframe failed due to timeout. For more visit: aka.ms/msaljs/browser-errors."},redirectInIframeError:{code:"redirect_in_iframe",desc:"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."},blockTokenRequestsInHiddenIframeError:{code:"block_iframe_reload",desc:"Request was blocked inside an iframe because MSAL detected an authentication response. For more visit: aka.ms/msaljs/browser-errors"},blockAcquireTokenInPopupsError:{code:"block_nested_popups",desc:"Request was blocked inside a popup because MSAL detected it was running in a popup."},iframeClosedPrematurelyError:{code:"iframe_closed_prematurely",desc:"The iframe being monitored was closed prematurely."},silentLogoutUnsupportedError:{code:"silent_logout_unsupported",desc:"Silent logout not supported. Please call logoutRedirect or logoutPopup instead."},noAccountError:{code:"no_account_error",desc:"No account object provided to acquireTokenSilent and no active account has been set. Please call setActiveAccount or provide an account on the request."},silentPromptValueError:{code:"silent_prompt_value_error",desc:"The value given for the prompt value is not valid for silent requests - must be set to 'none' or 'no_session'."},noTokenRequestCacheError:{code:"no_token_request_cache_error",desc:"No token request found in cache."},unableToParseTokenRequestCacheError:{code:"unable_to_parse_token_request_cache_error",desc:"The cached token request could not be parsed."},noCachedAuthorityError:{code:"no_cached_authority_error",desc:"No cached authority found."},authRequestNotSet:{code:"auth_request_not_set_error",desc:"Auth Request not set. Please ensure initiateAuthRequest was called from the InteractionHandler"},invalidCacheType:{code:"invalid_cache_type",desc:"Invalid cache type"},notInBrowserEnvironment:{code:"non_browser_environment",desc:"Login and token requests are not supported in non-browser environments."},databaseNotOpen:{code:"database_not_open",desc:"Database is not open!"},noNetworkConnectivity:{code:"no_network_connectivity",desc:"No network connectivity. Check your internet connection."},postRequestFailed:{code:"post_request_failed",desc:"Network request failed: If the browser threw a CORS error, check that the redirectUri is registered in the Azure App Portal as type 'SPA'"},getRequestFailed:{code:"get_request_failed",desc:"Network request failed. Please check the network trace to determine root cause."},failedToParseNetworkResponse:{code:"failed_to_parse_response",desc:"Failed to parse network response. Check network trace."},unableToLoadTokenError:{code:"unable_to_load_token",desc:"Error loading token to cache."},signingKeyNotFoundInStorage:{code:"crypto_key_not_found",desc:"Cryptographic Key or Keypair not found in browser storage."},authCodeRequired:{code:"auth_code_required",desc:"An authorization code must be provided (as the `code` property on the request) to this flow."},authCodeOrNativeAccountRequired:{code:"auth_code_or_nativeAccountId_required",desc:"An authorization code or nativeAccountId must be provided to this flow."},databaseUnavailable:{code:"database_unavailable",desc:"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."},unableToAcquireTokenFromNativePlatform:{code:"unable_to_acquire_token_from_native_platform",desc:"Unable to acquire token from native platform. For a list of possible reasons visit aka.ms/msaljs/browser-errors."},nativeHandshakeTimeout:{code:"native_handshake_timeout",desc:"Timed out while attempting to establish connection to browser extension"},nativeExtensionNotInstalled:{code:"native_extension_not_installed",desc:"Native extension is not installed. If you think this is a mistake call the initialize function."},nativeConnectionNotEstablished:{code:"native_connection_not_established",desc:"Connection to native platform has not been established. Please install a compatible browser extension and run initialize(). For more please visit aka.ms/msaljs/browser-errors."},nativeBrokerCalledBeforeInitialize:{code:"native_broker_called_before_initialize",desc:"You must call and await the initialize function before attempting to call any other MSAL API when native brokering is enabled. For more please visit aka.ms/msaljs/browser-errors."},nativePromptNotSupported:{code:"native_prompt_not_supported",desc:"The provided prompt is not supported by the native platform. This request should be routed to the web based flow."}},N=function(t){ot(e,t);function e(r,n){var o=t.call(this,r,n)||this;return Object.setPrototypeOf(o,e.prototype),o.name="BrowserAuthError",o}return e.createPkceNotGeneratedError=function(r){return new e(I.pkceNotGenerated.code,I.pkceNotGenerated.desc+" Detail:"+r)},e.createCryptoNotAvailableError=function(r){return new e(I.cryptoDoesNotExist.code,I.cryptoDoesNotExist.desc+" Detail:"+r)},e.createHttpMethodNotImplementedError=function(r){return new e(I.httpMethodNotImplementedError.code,I.httpMethodNotImplementedError.desc+" Given Method: "+r)},e.createEmptyNavigationUriError=function(){return new e(I.emptyNavigateUriError.code,I.emptyNavigateUriError.desc)},e.createEmptyHashError=function(r){return new e(I.hashEmptyError.code,I.hashEmptyError.desc+" Given Url: "+r)},e.createHashDoesNotContainStateError=function(){return new e(I.hashDoesNotContainStateError.code,I.hashDoesNotContainStateError.desc)},e.createHashDoesNotContainKnownPropertiesError=function(){return new e(I.hashDoesNotContainKnownPropertiesError.code,I.hashDoesNotContainKnownPropertiesError.desc)},e.createUnableToParseStateError=function(){return new e(I.unableToParseStateError.code,I.unableToParseStateError.desc)},e.createStateInteractionTypeMismatchError=function(){return new e(I.stateInteractionTypeMismatchError.code,I.stateInteractionTypeMismatchError.desc)},e.createInteractionInProgressError=function(){return new e(I.interactionInProgress.code,I.interactionInProgress.desc)},e.createPopupWindowError=function(r){var n=I.popupWindowError.desc;return n=x.isEmpty(r)?n:n+" Details: "+r,new e(I.popupWindowError.code,n)},e.createEmptyWindowCreatedError=function(){return new e(I.emptyWindowError.code,I.emptyWindowError.desc)},e.createUserCancelledError=function(){return new e(I.userCancelledError.code,I.userCancelledError.desc)},e.createMonitorPopupTimeoutError=function(){return new e(I.monitorPopupTimeoutError.code,I.monitorPopupTimeoutError.desc)},e.createMonitorIframeTimeoutError=function(){return new e(I.monitorIframeTimeoutError.code,I.monitorIframeTimeoutError.desc)},e.createRedirectInIframeError=function(r){return new e(I.redirectInIframeError.code,I.redirectInIframeError.desc+" (window.parent !== window) => "+r)},e.createBlockReloadInHiddenIframeError=function(){return new e(I.blockTokenRequestsInHiddenIframeError.code,I.blockTokenRequestsInHiddenIframeError.desc)},e.createBlockAcquireTokenInPopupsError=function(){return new e(I.blockAcquireTokenInPopupsError.code,I.blockAcquireTokenInPopupsError.desc)},e.createIframeClosedPrematurelyError=function(){return new e(I.iframeClosedPrematurelyError.code,I.iframeClosedPrematurelyError.desc)},e.createSilentLogoutUnsupportedError=function(){return new e(I.silentLogoutUnsupportedError.code,I.silentLogoutUnsupportedError.desc)},e.createNoAccountError=function(){return new e(I.noAccountError.code,I.noAccountError.desc)},e.createSilentPromptValueError=function(r){return new e(I.silentPromptValueError.code,I.silentPromptValueError.desc+" Given value: "+r)},e.createUnableToParseTokenRequestCacheError=function(){return new e(I.unableToParseTokenRequestCacheError.code,I.unableToParseTokenRequestCacheError.desc)},e.createNoTokenRequestCacheError=function(){return new e(I.noTokenRequestCacheError.code,I.noTokenRequestCacheError.desc)},e.createAuthRequestNotSetError=function(){return new e(I.authRequestNotSet.code,I.authRequestNotSet.desc)},e.createNoCachedAuthorityError=function(){return new e(I.noCachedAuthorityError.code,I.noCachedAuthorityError.desc)},e.createInvalidCacheTypeError=function(){return new e(I.invalidCacheType.code,""+I.invalidCacheType.desc)},e.createNonBrowserEnvironmentError=function(){return new e(I.notInBrowserEnvironment.code,I.notInBrowserEnvironment.desc)},e.createDatabaseNotOpenError=function(){return new e(I.databaseNotOpen.code,I.databaseNotOpen.desc)},e.createNoNetworkConnectivityError=function(){return new e(I.noNetworkConnectivity.code,I.noNetworkConnectivity.desc)},e.createPostRequestFailedError=function(r,n){return new e(I.postRequestFailed.code,I.postRequestFailed.desc+" | Network client threw: "+r+" | Attempted to reach: "+n.split("?")[0])},e.createGetRequestFailedError=function(r,n){return new e(I.getRequestFailed.code,I.getRequestFailed.desc+" | Network client threw: "+r+" | Attempted to reach: "+n.split("?")[0])},e.createFailedToParseNetworkResponseError=function(r){return new e(I.failedToParseNetworkResponse.code,I.failedToParseNetworkResponse.desc+" | Attempted to reach: "+r.split("?")[0])},e.createUnableToLoadTokenError=function(r){return new e(I.unableToLoadTokenError.code,I.unableToLoadTokenError.desc+" | "+r)},e.createSigningKeyNotFoundInStorageError=function(r){return new e(I.signingKeyNotFoundInStorage.code,I.signingKeyNotFoundInStorage.desc+" | No match found for KeyId: "+r)},e.createAuthCodeRequiredError=function(){return new e(I.authCodeRequired.code,I.authCodeRequired.desc)},e.createAuthCodeOrNativeAccountIdRequiredError=function(){return new e(I.authCodeOrNativeAccountRequired.code,I.authCodeOrNativeAccountRequired.desc)},e.createDatabaseUnavailableError=function(){return new e(I.databaseUnavailable.code,I.databaseUnavailable.desc)},e.createUnableToAcquireTokenFromNativePlatformError=function(){return new e(I.unableToAcquireTokenFromNativePlatform.code,I.unableToAcquireTokenFromNativePlatform.desc)},e.createNativeHandshakeTimeoutError=function(){return new e(I.nativeHandshakeTimeout.code,I.nativeHandshakeTimeout.desc)},e.createNativeExtensionNotInstalledError=function(){return new e(I.nativeExtensionNotInstalled.code,I.nativeExtensionNotInstalled.desc)},e.createNativeConnectionNotEstablishedError=function(){return new e(I.nativeConnectionNotEstablished.code,I.nativeConnectionNotEstablished.desc)},e.createNativeBrokerCalledBeforeInitialize=function(){return new e(I.nativeBrokerCalledBeforeInitialize.code,I.nativeBrokerCalledBeforeInitialize.desc)},e.createNativePromptParameterNotSupportedError=function(){return new e(I.nativePromptNotSupported.code,I.nativePromptNotSupported.desc)},e}(z);/*! @azure/msal-browser v2.31.0 2022-11-07 */var cr={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"},ra={CHANNEL_ID:"53ee284d-920a-4b59-9d30-a60315b26836",PREFERRED_EXTENSION_ID:"ppnbnpeolgkicgegkbkbjmhlideopiji",MATS_TELEMETRY:"MATS"},qr;(function(t){t.HandshakeRequest="Handshake",t.HandshakeResponse="HandshakeResponse",t.GetToken="GetToken",t.Response="Response"})(qr||(qr={}));var pt;(function(t){t.LocalStorage="localStorage",t.SessionStorage="sessionStorage",t.MemoryStorage="memoryStorage"})(pt||(pt={}));var _r;(function(t){t.GET="GET",t.POST="POST"})(_r||(_r={}));var ae;(function(t){t.AUTHORITY="authority",t.ACQUIRE_TOKEN_ACCOUNT="acquireToken.account",t.SESSION_STATE="session.state",t.REQUEST_STATE="request.state",t.NONCE_IDTOKEN="nonce.id_token",t.ORIGIN_URI="request.origin",t.RENEW_STATUS="token.renew.status",t.URL_HASH="urlHash",t.REQUEST_PARAMS="request.params",t.SCOPES="scopes",t.INTERACTION_STATUS_KEY="interaction.status",t.CCS_CREDENTIAL="ccs.credential",t.CORRELATION_ID="request.correlationId",t.NATIVE_REQUEST="request.native"})(ae||(ae={}));var Xo;(function(t){t.WRAPPER_SKU="wrapper.sku",t.WRAPPER_VER="wrapper.version"})(Xo||(Xo={}));var ye;(function(t){t[t.acquireTokenRedirect=861]="acquireTokenRedirect",t[t.acquireTokenPopup=862]="acquireTokenPopup",t[t.ssoSilent=863]="ssoSilent",t[t.acquireTokenSilent_authCode=864]="acquireTokenSilent_authCode",t[t.handleRedirectPromise=865]="handleRedirectPromise",t[t.acquireTokenByCode=866]="acquireTokenByCode",t[t.acquireTokenSilent_silentFlow=61]="acquireTokenSilent_silentFlow",t[t.logout=961]="logout",t[t.logoutPopup=962]="logoutPopup"})(ye||(ye={}));var F;(function(t){t.Redirect="redirect",t.Popup="popup",t.Silent="silent",t.None="none"})(F||(F={}));var Op;(function(t){t.Startup="startup",t.Login="login",t.Logout="logout",t.AcquireToken="acquireToken",t.SsoSilent="ssoSilent",t.HandleRedirect="handleRedirect",t.None="none"})(Op||(Op={}));var xp={scopes:ts},yi="jwk",Mp;(function(t){t.React="@azure/msal-react",t.Angular="@azure/msal-angular"})(Mp||(Mp={}));var kd="msal.db",XC=1,ZC=kd+".keys",At;(function(t){t[t.Default=0]="Default",t[t.AccessToken=1]="AccessToken",t[t.AccessTokenAndRefreshToken=2]="AccessTokenAndRefreshToken",t[t.RefreshToken=3]="RefreshToken",t[t.RefreshTokenAndNetwork=4]="RefreshTokenAndNetwork",t[t.Skip=5]="Skip"})(At||(At={}));/*! @azure/msal-browser v2.31.0 2022-11-07 */var kt={redirectUriNotSet:{code:"redirect_uri_empty",desc:"A redirect URI is required for all calls, and none has been set."},postLogoutUriNotSet:{code:"post_logout_uri_empty",desc:"A post logout redirect has not been set."},storageNotSupportedError:{code:"storage_not_supported",desc:"Given storage configuration option was not supported."},noRedirectCallbacksSet:{code:"no_redirect_callbacks",desc:"No redirect callbacks have been set. Please call setRedirectCallbacks() with the appropriate function arguments before continuing. More information is available here: https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics."},invalidCallbackObject:{code:"invalid_callback_object",desc:"The object passed for the callback was invalid. More information is available here: https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics."},stubPcaInstanceCalled:{code:"stubbed_public_client_application_called",desc:"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"},inMemRedirectUnavailable:{code:"in_mem_redirect_unavailable",desc:"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."},entropyNotProvided:{code:"entropy_not_provided",desc:"The available browser crypto interface requires entropy set via system.cryptoOptions.entropy configuration option."}},Wc=function(t){ot(e,t);function e(r,n){var o=t.call(this,r,n)||this;return o.name="BrowserConfigurationAuthError",Object.setPrototypeOf(o,e.prototype),o}return e.createRedirectUriEmptyError=function(){return new e(kt.redirectUriNotSet.code,kt.redirectUriNotSet.desc)},e.createPostLogoutRedirectUriEmptyError=function(){return new e(kt.postLogoutUriNotSet.code,kt.postLogoutUriNotSet.desc)},e.createStorageNotSupportedError=function(r){return new e(kt.storageNotSupportedError.code,kt.storageNotSupportedError.desc+" Given Location: "+r)},e.createRedirectCallbacksNotSetError=function(){return new e(kt.noRedirectCallbacksSet.code,kt.noRedirectCallbacksSet.desc)},e.createStubPcaInstanceCalledError=function(){return new e(kt.stubPcaInstanceCalled.code,kt.stubPcaInstanceCalled.desc)},e.createInMemoryRedirectUnavailableError=function(){return new e(kt.inMemRedirectUnavailable.code,kt.inMemRedirectUnavailable.desc)},e.createEntropyNotProvided=function(){return new e(kt.entropyNotProvided.code,kt.entropyNotProvided.desc)},e}(z);/*! @azure/msal-browser v2.31.0 2022-11-07 */var Up=function(){function t(e){this.validateWindowStorage(e),this.windowStorage=window[e]}return t.prototype.validateWindowStorage=function(e){if(e!==pt.LocalStorage&&e!==pt.SessionStorage)throw Wc.createStorageNotSupportedError(e);var r=!!window[e];if(!r)throw Wc.createStorageNotSupportedError(e)},t.prototype.getItem=function(e){return this.windowStorage.getItem(e)},t.prototype.setItem=function(e,r){this.windowStorage.setItem(e,r)},t.prototype.removeItem=function(e){this.windowStorage.removeItem(e)},t.prototype.getKeys=function(){return Object.keys(this.windowStorage)},t.prototype.containsKey=function(e){return this.windowStorage.hasOwnProperty(e)},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var Ad=function(){function t(){this.cache=new Map}return t.prototype.getItem=function(e){return this.cache.get(e)||null},t.prototype.setItem=function(e,r){this.cache.set(e,r)},t.prototype.removeItem=function(e){this.cache.delete(e)},t.prototype.getKeys=function(){var e=[];return this.cache.forEach(function(r,n){e.push(n)}),e},t.prototype.containsKey=function(e){return this.cache.has(e)},t.prototype.clear=function(){this.cache.clear()},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var Ry=function(){function t(){}return t.extractBrowserRequestState=function(e,r){if(x.isEmpty(r))return null;try{var n=Wr.parseRequestState(e,r);return n.libraryState.meta}catch(o){throw D.createInvalidStateError(r,o)}},t.parseServerResponseFromHash=function(e){if(!e)return{};var r=new oe(e);return oe.getDeserializedHash(r.getHash())},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var Rd=function(t){ot(e,t);function e(r,n,o,i){var a=t.call(this,r,o)||this;return a.COOKIE_LIFE_MULTIPLIER=24*60*60*1e3,a.cacheConfig=n,a.logger=i,a.internalStorage=new Ad,a.browserStorage=a.setupBrowserStorage(a.cacheConfig.cacheLocation),a.temporaryCacheStorage=a.setupTemporaryCacheStorage(a.cacheConfig.cacheLocation),a.migrateCacheEntries(),a}return e.prototype.setupBrowserStorage=function(r){switch(r){case pt.LocalStorage:case pt.SessionStorage:try{return new Up(r)}catch(n){this.logger.verbose(n);break}}return this.cacheConfig.cacheLocation=pt.MemoryStorage,new Ad},e.prototype.setupTemporaryCacheStorage=function(r){switch(r){case pt.LocalStorage:case pt.SessionStorage:try{return new Up(pt.SessionStorage)}catch(n){return this.logger.verbose(n),this.internalStorage}case pt.MemoryStorage:default:return this.internalStorage}},e.prototype.migrateCacheEntries=function(){var r=this,n=_.CACHE_PREFIX+"."+He.ID_TOKEN,o=_.CACHE_PREFIX+"."+He.CLIENT_INFO,i=_.CACHE_PREFIX+"."+He.ERROR,a=_.CACHE_PREFIX+"."+He.ERROR_DESC,s=this.browserStorage.getItem(n),c=this.browserStorage.getItem(o),l=this.browserStorage.getItem(i),u=this.browserStorage.getItem(a),h=[s,c,l,u],d=[He.ID_TOKEN,He.CLIENT_INFO,He.ERROR,He.ERROR_DESC];d.forEach(function(f,m){return r.migrateCacheEntry(f,h[m])})},e.prototype.migrateCacheEntry=function(r,n){n&&this.setTemporaryCache(r,n,!0)},e.prototype.validateAndParseJson=function(r){try{var n=JSON.parse(r);return n&&typeof n=="object"?n:null}catch{return null}},e.prototype.getItem=function(r){return this.browserStorage.getItem(r)},e.prototype.setItem=function(r,n){this.browserStorage.setItem(r,n)},e.prototype.getAccount=function(r){var n=this.getItem(r);if(!n)return null;var o=this.validateAndParseJson(n);return!o||!tt.isAccountEntity(o)?null:or.toObject(new tt,o)},e.prototype.setAccount=function(r){this.logger.trace("BrowserCacheManager.setAccount called");var n=r.generateAccountKey();this.setItem(n,JSON.stringify(r))},e.prototype.getIdTokenCredential=function(r){var n=this.getItem(r);if(!n)return this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),null;var o=this.validateAndParseJson(n);return!o||!ja.isIdTokenEntity(o)?(this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getIdTokenCredential: cache hit"),or.toObject(new ja,o))},e.prototype.setIdTokenCredential=function(r){this.logger.trace("BrowserCacheManager.setIdTokenCredential called");var n=r.generateCredentialKey();this.setItem(n,JSON.stringify(r))},e.prototype.getAccessTokenCredential=function(r){var n=this.getItem(r);if(!n)return this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),null;var o=this.validateAndParseJson(n);return!o||!Ba.isAccessTokenEntity(o)?(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: cache hit"),or.toObject(new Ba,o))},e.prototype.setAccessTokenCredential=function(r){this.logger.trace("BrowserCacheManager.setAccessTokenCredential called");var n=r.generateCredentialKey();this.setItem(n,JSON.stringify(r))},e.prototype.getRefreshTokenCredential=function(r){var n=this.getItem(r);if(!n)return this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),null;var o=this.validateAndParseJson(n);return!o||!jc.isRefreshTokenEntity(o)?(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: cache hit"),or.toObject(new jc,o))},e.prototype.setRefreshTokenCredential=function(r){this.logger.trace("BrowserCacheManager.setRefreshTokenCredential called");var n=r.generateCredentialKey();this.setItem(n,JSON.stringify(r))},e.prototype.getAppMetadata=function(r){var n=this.getItem(r);if(!n)return this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null;var o=this.validateAndParseJson(n);return!o||!bd.isAppMetadataEntity(r,o)?(this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getAppMetadata: cache hit"),or.toObject(new bd,o))},e.prototype.setAppMetadata=function(r){this.logger.trace("BrowserCacheManager.setAppMetadata called");var n=r.generateAppMetadataKey();this.setItem(n,JSON.stringify(r))},e.prototype.getServerTelemetry=function(r){var n=this.getItem(r);if(!n)return this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null;var o=this.validateAndParseJson(n);return!o||!Vc.isServerTelemetryEntity(r,o)?(this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getServerTelemetry: cache hit"),or.toObject(new Vc,o))},e.prototype.setServerTelemetry=function(r,n){this.logger.trace("BrowserCacheManager.setServerTelemetry called"),this.setItem(r,JSON.stringify(n))},e.prototype.getAuthorityMetadata=function(r){var n=this.internalStorage.getItem(r);if(!n)return this.logger.trace("BrowserCacheManager.getAuthorityMetadata: called, no cache hit"),null;var o=this.validateAndParseJson(n);return o&&Id.isAuthorityMetadataEntity(r,o)?(this.logger.trace("BrowserCacheManager.getAuthorityMetadata: cache hit"),or.toObject(new Id,o)):null},e.prototype.getAuthorityMetadataKeys=function(){var r=this,n=this.internalStorage.getKeys();return n.filter(function(o){return r.isAuthorityMetadata(o)})},e.prototype.setWrapperMetadata=function(r,n){this.internalStorage.setItem(Xo.WRAPPER_SKU,r),this.internalStorage.setItem(Xo.WRAPPER_VER,n)},e.prototype.getWrapperMetadata=function(){var r=this.internalStorage.getItem(Xo.WRAPPER_SKU)||_.EMPTY_STRING,n=this.internalStorage.getItem(Xo.WRAPPER_VER)||_.EMPTY_STRING;return[r,n]},e.prototype.setAuthorityMetadata=function(r,n){this.logger.trace("BrowserCacheManager.setAuthorityMetadata called"),this.internalStorage.setItem(r,JSON.stringify(n))},e.prototype.getActiveAccount=function(){var r=this.generateCacheKey(He.ACTIVE_ACCOUNT_FILTERS),n=this.getItem(r);if(!n){this.logger.trace("No active account filters cache schema found, looking for legacy schema");var o=this.generateCacheKey(He.ACTIVE_ACCOUNT),i=this.getItem(o);if(!i)return this.logger.trace("No active account found"),null;var a=this.getAccountInfoByFilter({localAccountId:i})[0]||null;return a?(this.logger.trace("Legacy active account cache schema found"),this.logger.trace("Adding active account filters cache schema"),this.setActiveAccount(a),a):null}var s=this.validateAndParseJson(n);return s?(this.logger.trace("Active account filters schema found"),this.getAccountInfoByFilter({homeAccountId:s.homeAccountId,localAccountId:s.localAccountId})[0]||null):(this.logger.trace("No active account found"),null)},e.prototype.setActiveAccount=function(r){var n=this.generateCacheKey(He.ACTIVE_ACCOUNT_FILTERS),o=this.generateCacheKey(He.ACTIVE_ACCOUNT);if(r){this.logger.verbose("setActiveAccount: Active account set");var i={homeAccountId:r.homeAccountId,localAccountId:r.localAccountId};this.browserStorage.setItem(n,JSON.stringify(i)),this.browserStorage.setItem(o,r.localAccountId)}else this.logger.verbose("setActiveAccount: No account passed, active account not set"),this.browserStorage.removeItem(n),this.browserStorage.removeItem(o)},e.prototype.getAccountInfoByFilter=function(r){var n=this.getAllAccounts();return n.filter(function(o){return!(r.username&&r.username.toLowerCase()!==o.username.toLowerCase()||r.homeAccountId&&r.homeAccountId!==o.homeAccountId||r.localAccountId&&r.localAccountId!==o.localAccountId||r.tenantId&&r.tenantId!==o.tenantId||r.environment&&r.environment!==o.environment)})},e.prototype.getAccountInfoByHints=function(r,n){var o=this.getAllAccounts().filter(function(i){if(n){var a=i.idTokenClaims&&i.idTokenClaims.sid;return n===a}return r?r===i.username:!1});if(o.length===1)return o[0];if(o.length>1)throw D.createMultipleMatchingAccountsInCacheError();return null},e.prototype.getThrottlingCache=function(r){var n=this.getItem(r);if(!n)return this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null;var o=this.validateAndParseJson(n);return!o||!Pp.isThrottlingEntity(r,o)?(this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getThrottlingCache: cache hit"),or.toObject(new Pp,o))},e.prototype.setThrottlingCache=function(r,n){this.logger.trace("BrowserCacheManager.setThrottlingCache called"),this.setItem(r,JSON.stringify(n))},e.prototype.getTemporaryCache=function(r,n){var o=n?this.generateCacheKey(r):r;if(this.cacheConfig.storeAuthStateInCookie){var i=this.getItemCookie(o);if(i)return this.logger.trace("BrowserCacheManager.getTemporaryCache: storeAuthStateInCookies set to true, retrieving from cookies"),i}var a=this.temporaryCacheStorage.getItem(o);if(!a){if(this.cacheConfig.cacheLocation===pt.LocalStorage){var s=this.browserStorage.getItem(o);if(s)return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item found in local storage"),s}return this.logger.trace("BrowserCacheManager.getTemporaryCache: No cache item found in local storage"),null}return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item returned"),a},e.prototype.setTemporaryCache=function(r,n,o){var i=o?this.generateCacheKey(r):r;this.temporaryCacheStorage.setItem(i,n),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.setTemporaryCache: storeAuthStateInCookie set to true, setting item cookie"),this.setItemCookie(i,n))},e.prototype.removeItem=function(r){return this.browserStorage.removeItem(r),this.temporaryCacheStorage.removeItem(r),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.removeItem: storeAuthStateInCookie is true, clearing item cookie"),this.clearItemCookie(r)),!0},e.prototype.containsKey=function(r){return this.browserStorage.containsKey(r)||this.temporaryCacheStorage.containsKey(r)},e.prototype.getKeys=function(){return zh(this.browserStorage.getKeys(),this.temporaryCacheStorage.getKeys())},e.prototype.clear=function(){return S(this,void 0,void 0,function(){var r=this;return T(this,function(n){switch(n.label){case 0:return[4,this.removeAllAccounts()];case 1:return n.sent(),this.removeAppMetadata(),this.getKeys().forEach(function(o){(r.browserStorage.containsKey(o)||r.temporaryCacheStorage.containsKey(o))&&(o.indexOf(_.CACHE_PREFIX)!==-1||o.indexOf(r.clientId)!==-1)&&r.removeItem(o)}),this.internalStorage.clear(),[2]}})})},e.prototype.setItemCookie=function(r,n,o){var i=encodeURIComponent(r)+"="+encodeURIComponent(n)+";path=/;SameSite=Lax;";if(o){var a=this.getCookieExpirationTime(o);i+="expires="+a+";"}this.cacheConfig.secureCookies&&(i+="Secure;"),document.cookie=i},e.prototype.getItemCookie=function(r){for(var n=encodeURIComponent(r)+"=",o=document.cookie.split(";"),i=0;i<o.length;i++){for(var a=o[i];a.charAt(0)===" ";)a=a.substring(1);if(a.indexOf(n)===0)return decodeURIComponent(a.substring(n.length,a.length))}return _.EMPTY_STRING},e.prototype.clearMsalCookies=function(){var r=this,n=_.CACHE_PREFIX+"."+this.clientId,o=document.cookie.split(";");o.forEach(function(i){for(;i.charAt(0)===" ";)i=i.substring(1);if(i.indexOf(n)===0){var a=i.split("=")[0];r.clearItemCookie(a)}})},e.prototype.clearItemCookie=function(r){this.setItemCookie(r,_.EMPTY_STRING,-1)},e.prototype.getCookieExpirationTime=function(r){var n=new Date,o=new Date(n.getTime()+r*this.COOKIE_LIFE_MULTIPLIER);return o.toUTCString()},e.prototype.getCache=function(){return this.browserStorage},e.prototype.setCache=function(){},e.prototype.generateCacheKey=function(r){var n=this.validateAndParseJson(r);return n?JSON.stringify(r):x.startsWith(r,_.CACHE_PREFIX)||x.startsWith(r,He.ADAL_ID_TOKEN)?r:_.CACHE_PREFIX+"."+this.clientId+"."+r},e.prototype.generateAuthorityKey=function(r){var n=Wr.parseRequestState(this.cryptoImpl,r).libraryState.id;return this.generateCacheKey(ae.AUTHORITY+"."+n)},e.prototype.generateNonceKey=function(r){var n=Wr.parseRequestState(this.cryptoImpl,r).libraryState.id;return this.generateCacheKey(ae.NONCE_IDTOKEN+"."+n)},e.prototype.generateStateKey=function(r){var n=Wr.parseRequestState(this.cryptoImpl,r).libraryState.id;return this.generateCacheKey(ae.REQUEST_STATE+"."+n)},e.prototype.getCachedAuthority=function(r){var n=this.generateStateKey(r),o=this.getTemporaryCache(n);if(!o)return null;var i=this.generateAuthorityKey(o);return this.getTemporaryCache(i)},e.prototype.updateCacheEntries=function(r,n,o,i,a){this.logger.trace("BrowserCacheManager.updateCacheEntries called");var s=this.generateStateKey(r);this.setTemporaryCache(s,r,!1);var c=this.generateNonceKey(r);this.setTemporaryCache(c,n,!1);var l=this.generateAuthorityKey(r);if(this.setTemporaryCache(l,o,!1),a){var u={credential:a.homeAccountId,type:Dt.HOME_ACCOUNT_ID};this.setTemporaryCache(ae.CCS_CREDENTIAL,JSON.stringify(u),!0)}else if(!x.isEmpty(i)){var u={credential:i,type:Dt.UPN};this.setTemporaryCache(ae.CCS_CREDENTIAL,JSON.stringify(u),!0)}},e.prototype.resetRequestCache=function(r){var n=this;this.logger.trace("BrowserCacheManager.resetRequestCache called"),x.isEmpty(r)||this.getKeys().forEach(function(o){o.indexOf(r)!==-1&&n.removeItem(o)}),r&&(this.removeItem(this.generateStateKey(r)),this.removeItem(this.generateNonceKey(r)),this.removeItem(this.generateAuthorityKey(r))),this.removeItem(this.generateCacheKey(ae.REQUEST_PARAMS)),this.removeItem(this.generateCacheKey(ae.ORIGIN_URI)),this.removeItem(this.generateCacheKey(ae.URL_HASH)),this.removeItem(this.generateCacheKey(ae.CORRELATION_ID)),this.removeItem(this.generateCacheKey(ae.CCS_CREDENTIAL)),this.removeItem(this.generateCacheKey(ae.NATIVE_REQUEST)),this.setInteractionInProgress(!1)},e.prototype.cleanRequestByState=function(r){if(this.logger.trace("BrowserCacheManager.cleanRequestByState called"),r){var n=this.generateStateKey(r),o=this.temporaryCacheStorage.getItem(n);this.logger.infoPii("BrowserCacheManager.cleanRequestByState: Removing temporary cache items for state: "+o),this.resetRequestCache(o||_.EMPTY_STRING)}this.clearMsalCookies()},e.prototype.cleanRequestByInteractionType=function(r){var n=this;this.logger.trace("BrowserCacheManager.cleanRequestByInteractionType called"),this.getKeys().forEach(function(o){if(o.indexOf(ae.REQUEST_STATE)!==-1){var i=n.temporaryCacheStorage.getItem(o);if(!!i){var a=Ry.extractBrowserRequestState(n.cryptoImpl,i);a&&a.interactionType===r&&(n.logger.infoPii("BrowserCacheManager.cleanRequestByInteractionType: Removing temporary cache items for state: "+i),n.resetRequestCache(i))}}}),this.clearMsalCookies(),this.setInteractionInProgress(!1)},e.prototype.cacheCodeRequest=function(r,n){this.logger.trace("BrowserCacheManager.cacheCodeRequest called");var o=n.base64Encode(JSON.stringify(r));this.setTemporaryCache(ae.REQUEST_PARAMS,o,!0)},e.prototype.getCachedRequest=function(r,n){this.logger.trace("BrowserCacheManager.getCachedRequest called");var o=this.getTemporaryCache(ae.REQUEST_PARAMS,!0);if(!o)throw N.createNoTokenRequestCacheError();var i=this.validateAndParseJson(n.base64Decode(o));if(!i)throw N.createUnableToParseTokenRequestCacheError();if(this.removeItem(this.generateCacheKey(ae.REQUEST_PARAMS)),x.isEmpty(i.authority)){var a=this.generateAuthorityKey(r),s=this.getTemporaryCache(a);if(!s)throw N.createNoCachedAuthorityError();i.authority=s}return i},e.prototype.getCachedNativeRequest=function(){this.logger.trace("BrowserCacheManager.getCachedNativeRequest called");var r=this.getTemporaryCache(ae.NATIVE_REQUEST,!0);if(!r)return this.logger.trace("BrowserCacheManager.getCachedNativeRequest: No cached native request found"),null;var n=this.validateAndParseJson(r);return n||(this.logger.error("BrowserCacheManager.getCachedNativeRequest: Unable to parse native request"),null)},e.prototype.isInteractionInProgress=function(r){var n=this.getInteractionInProgress();return r?n===this.clientId:!!n},e.prototype.getInteractionInProgress=function(){var r=_.CACHE_PREFIX+"."+ae.INTERACTION_STATUS_KEY;return this.getTemporaryCache(r,!1)},e.prototype.setInteractionInProgress=function(r){var n=_.CACHE_PREFIX+"."+ae.INTERACTION_STATUS_KEY;if(r){if(this.getInteractionInProgress())throw N.createInteractionInProgressError();this.setTemporaryCache(n,this.clientId,!1)}else!r&&this.getInteractionInProgress()===this.clientId&&this.removeItem(n)},e.prototype.getLegacyLoginHint=function(){var r=this.getTemporaryCache(He.ADAL_ID_TOKEN);r&&(this.browserStorage.removeItem(He.ADAL_ID_TOKEN),this.logger.verbose("Cached ADAL id token retrieved."));var n=this.getTemporaryCache(He.ID_TOKEN,!0);n&&(this.removeItem(this.generateCacheKey(He.ID_TOKEN)),this.logger.verbose("Cached MSAL.js v1 id token retrieved"));var o=n||r;if(o){var i=new kr(o,this.cryptoImpl);if(i.claims&&i.claims.preferred_username)return this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, setting ADAL/MSAL v1 preferred_username as loginHint"),i.claims.preferred_username;if(i.claims&&i.claims.upn)return this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, setting ADAL/MSAL v1 upn as loginHint"),i.claims.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},e.prototype.updateCredentialCacheKey=function(r,n){var o=n.generateCredentialKey();if(r!==o){var i=this.getItem(r);if(i)return this.removeItem(r),this.setItem(o,i),this.logger.verbose("Updated an outdated "+n.credentialType+" cache key"),o;this.logger.error("Attempted to update an outdated "+n.credentialType+" cache key but no item matching the outdated key was found in storage")}return r},e}(or),eS=function(t,e){var r={cacheLocation:pt.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1};return new Rd(t,r,Fc,e)};/*! @azure/msal-browser v2.31.0 2022-11-07 */var ou="@azure/msal-browser",Ea="2.31.0";/*! @azure/msal-browser v2.31.0 2022-11-07 */var tS=function(){function t(){}return t.prototype.sendGetRequestAsync=function(e,r){return S(this,void 0,void 0,function(){var n,o,i;return T(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,fetch(e,{method:_r.GET,headers:this.getFetchHeaders(r)})];case 1:return n=a.sent(),[3,3];case 2:throw o=a.sent(),window.navigator.onLine?N.createGetRequestFailedError(o,e):N.createNoNetworkConnectivityError();case 3:return a.trys.push([3,5,,6]),i={headers:this.getHeaderDict(n.headers)},[4,n.json()];case 4:return[2,(i.body=a.sent(),i.status=n.status,i)];case 5:throw a.sent(),N.createFailedToParseNetworkResponseError(e);case 6:return[2]}})})},t.prototype.sendPostRequestAsync=function(e,r){return S(this,void 0,void 0,function(){var n,o,i,a;return T(this,function(s){switch(s.label){case 0:n=r&&r.body||_.EMPTY_STRING,s.label=1;case 1:return s.trys.push([1,3,,4]),[4,fetch(e,{method:_r.POST,headers:this.getFetchHeaders(r),body:n})];case 2:return o=s.sent(),[3,4];case 3:throw i=s.sent(),window.navigator.onLine?N.createPostRequestFailedError(i,e):N.createNoNetworkConnectivityError();case 4:return s.trys.push([4,6,,7]),a={headers:this.getHeaderDict(o.headers)},[4,o.json()];case 5:return[2,(a.body=s.sent(),a.status=o.status,a)];case 6:throw s.sent(),N.createFailedToParseNetworkResponseError(e);case 7:return[2]}})})},t.prototype.getFetchHeaders=function(e){var r=new Headers;if(!(e&&e.headers))return r;var n=e.headers;return Object.keys(n).forEach(function(o){r.append(o,n[o])}),r},t.prototype.getHeaderDict=function(e){var r={};return e.forEach(function(n,o){r[o]=n}),r},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var rS=function(){function t(){}return t.prototype.sendGetRequestAsync=function(e,r){return S(this,void 0,void 0,function(){return T(this,function(n){return[2,this.sendRequestAsync(e,_r.GET,r)]})})},t.prototype.sendPostRequestAsync=function(e,r){return S(this,void 0,void 0,function(){return T(this,function(n){return[2,this.sendRequestAsync(e,_r.POST,r)]})})},t.prototype.sendRequestAsync=function(e,r,n){var o=this;return new Promise(function(i,a){var s=new XMLHttpRequest;if(s.open(r,e,!0),o.setXhrHeaders(s,n),s.onload=function(){(s.status<200||s.status>=300)&&(r===_r.POST?a(N.createPostRequestFailedError("Failed with status "+s.status,e)):a(N.createGetRequestFailedError("Failed with status "+s.status,e)));try{var c=JSON.parse(s.responseText),l={headers:o.getHeaderDict(s),body:c,status:s.status};i(l)}catch{a(N.createFailedToParseNetworkResponseError(e))}},s.onerror=function(){window.navigator.onLine?r===_r.POST?a(N.createPostRequestFailedError("Failed with status "+s.status,e)):a(N.createGetRequestFailedError("Failed with status "+s.status,e)):a(N.createNoNetworkConnectivityError())},r===_r.POST&&n&&n.body)s.send(n.body);else if(r===_r.GET)s.send();else throw N.createHttpMethodNotImplementedError(r)})},t.prototype.setXhrHeaders=function(e,r){if(r&&r.headers){var n=r.headers;Object.keys(n).forEach(function(o){e.setRequestHeader(o,n[o])})}},t.prototype.getHeaderDict=function(e){var r=e.getAllResponseHeaders(),n=r.trim().split(/[\r\n]+/),o={};return n.forEach(function(i){var a=i.split(": "),s=a.shift(),c=a.join(": ");s&&c&&(o[s]=c)}),o},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var Oe=function(){function t(){}return t.clearHash=function(e){e.location.hash=_.EMPTY_STRING,typeof e.history.replaceState=="function"&&e.history.replaceState(null,_.EMPTY_STRING,""+e.location.origin+e.location.pathname+e.location.search)},t.replaceHash=function(e){var r=e.split("#");r.shift(),window.location.hash=r.length>0?r.join("#"):_.EMPTY_STRING},t.isInIframe=function(){return window.parent!==window},t.isInPopup=function(){return typeof window<"u"&&!!window.opener&&window.opener!==window&&typeof window.name=="string"&&window.name.indexOf(cr.POPUP_NAME_PREFIX+".")===0},t.getCurrentUri=function(){return window.location.href.split("?")[0].split("#")[0]},t.getHomepage=function(){var e=new oe(window.location.href),r=e.getUrlComponents();return r.Protocol+"//"+r.HostNameAndPort+"/"},t.getBrowserNetworkClient=function(){return window.fetch&&window.Headers?new tS:new rS},t.blockReloadInHiddenIframes=function(){var e=oe.hashContainsKnownProperties(window.location.hash);if(e&&t.isInIframe())throw N.createBlockReloadInHiddenIframeError()},t.blockRedirectInIframe=function(e,r){var n=t.isInIframe();if(e===F.Redirect&&n&&!r)throw N.createRedirectInIframeError(n)},t.blockAcquireTokenInPopups=function(){if(t.isInPopup())throw N.createBlockAcquireTokenInPopupsError()},t.blockNonBrowserEnvironment=function(e){if(!e)throw N.createNonBrowserEnvironmentError()},t.blockNativeBrokerCalledBeforeInitialized=function(e,r){if(e&&!r)throw N.createNativeBrokerCalledBeforeInitialize()},t.detectIEOrEdge=function(){var e=window.navigator.userAgent,r=e.indexOf("MSIE "),n=e.indexOf("Trident/"),o=e.indexOf("Edge/"),i=r>0||n>0,a=o>0;return i||a},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var Py=function(){function t(e,r,n,o,i,a,s,c,l){this.config=e,this.browserStorage=r,this.browserCrypto=n,this.networkClient=this.config.system.networkClient,this.eventHandler=i,this.navigationClient=a,this.nativeMessageHandler=c,this.correlationId=l||this.browserCrypto.createNewGuid(),this.logger=o.clone(cr.MSAL_SKU,Ea,this.correlationId),this.performanceClient=s}return t.prototype.clearCacheOnLogout=function(e){return S(this,void 0,void 0,function(){return T(this,function(r){switch(r.label){case 0:if(!e)return[3,5];tt.accountInfoIsEqual(e,this.browserStorage.getActiveAccount(),!1)&&(this.logger.verbose("Setting active account to null"),this.browserStorage.setActiveAccount(null)),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.browserStorage.removeAccount(tt.generateAccountCacheKey(e))];case 2:return r.sent(),this.logger.verbose("Cleared cache items belonging to the account provided in the logout request."),[3,4];case 3:return r.sent(),this.logger.error("Account provided in logout request was not found. Local cache unchanged."),[3,4];case 4:return[3,9];case 5:return r.trys.push([5,8,,9]),this.logger.verbose("No account provided in logout request, clearing all cache items.",this.correlationId),[4,this.browserStorage.clear()];case 6:return r.sent(),[4,this.browserCrypto.clearKeystore()];case 7:return r.sent(),[3,9];case 8:return r.sent(),this.logger.error("Attempted to clear all MSAL cache items and failed. Local cache unchanged."),[3,9];case 9:return[2]}})})},t.prototype.initializeBaseRequest=function(e){return S(this,void 0,void 0,function(){var r,n,o,i;return T(this,function(a){switch(a.label){case 0:if(this.logger.verbose("Initializing BaseAuthRequest"),r=e.authority||this.config.auth.authority,n=zh(e&&e.scopes||[]),o=$($({},e),{correlationId:this.correlationId,authority:r,scopes:n}),!o.authenticationScheme)o.authenticationScheme=le.BEARER,this.logger.verbose(`Authentication Scheme wasn't explicitly set in request, defaulting to "Bearer" request`);else{if(o.authenticationScheme===le.SSH){if(!e.sshJwk)throw Ee.createMissingSshJwkError();if(!e.sshKid)throw Ee.createMissingSshKidError()}this.logger.verbose('Authentication Scheme set to "'+o.authenticationScheme+'" as configured in Auth request')}return e.claims&&!x.isEmpty(e.claims)?(i=o,[4,this.browserCrypto.hashString(e.claims)]):[3,2];case 1:i.requestedClaimsHash=a.sent(),a.label=2;case 2:return[2,o]}})})},t.prototype.getRedirectUri=function(e){this.logger.verbose("getRedirectUri called");var r=e||this.config.auth.redirectUri||Oe.getCurrentUri();return oe.getAbsoluteUrl(r,Oe.getCurrentUri())},t.prototype.initializeServerTelemetryManager=function(e,r){this.logger.verbose("initializeServerTelemetryManager called");var n={clientId:this.config.auth.clientId,correlationId:this.correlationId,apiId:e,forceRefresh:r||!1,wrapperSKU:this.browserStorage.getWrapperMetadata()[0],wrapperVer:this.browserStorage.getWrapperMetadata()[1]};return new YC(n,this.browserStorage)},t.prototype.getDiscoveredAuthority=function(e){return S(this,void 0,void 0,function(){var r;return T(this,function(n){switch(n.label){case 0:return this.logger.verbose("getDiscoveredAuthority called"),r={protocolMode:this.config.auth.protocolMode,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata},e?(this.logger.verbose("Creating discovered authority with request authority"),[4,Gc.createDiscoveredInstance(e,this.config.system.networkClient,this.browserStorage,r)]):[3,2];case 1:return[2,n.sent()];case 2:return this.logger.verbose("Creating discovered authority with configured authority"),[4,Gc.createDiscoveredInstance(this.config.auth.authority,this.config.system.networkClient,this.browserStorage,r)];case 3:return[2,n.sent()]}})})},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var Ri=function(t){ot(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.initializeAuthorizationCodeRequest=function(r){return S(this,void 0,void 0,function(){var n,o;return T(this,function(i){switch(i.label){case 0:return this.logger.verbose("initializeAuthorizationRequest called",r.correlationId),[4,this.browserCrypto.generatePkceCodes()];case 1:return n=i.sent(),o=$($({},r),{redirectUri:r.redirectUri,code:_.EMPTY_STRING,codeVerifier:n.verifier}),r.codeChallenge=n.challenge,r.codeChallengeMethod=_.S256_CODE_CHALLENGE_METHOD,[2,o]}})})},e.prototype.initializeLogoutRequest=function(r){this.logger.verbose("initializeLogoutRequest called",r==null?void 0:r.correlationId);var n=$({correlationId:this.correlationId||this.browserCrypto.createNewGuid()},r);if(r)if(r.logoutHint)this.logger.verbose("logoutHint has already been set in logoutRequest");else if(r.account){var o=this.getLogoutHintFromIdTokenClaims(r.account);o&&(this.logger.verbose("Setting logoutHint to login_hint ID Token Claim value for the account provided"),n.logoutHint=o)}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!r||r.postLogoutRedirectUri!==null?r&&r.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to uri set on logout request",n.correlationId),n.postLogoutRedirectUri=oe.getAbsoluteUrl(r.postLogoutRedirectUri,Oe.getCurrentUri())):this.config.auth.postLogoutRedirectUri===null?this.logger.verbose("postLogoutRedirectUri configured as null and no uri set on request, not passing post logout redirect",n.correlationId):this.config.auth.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to configured uri",n.correlationId),n.postLogoutRedirectUri=oe.getAbsoluteUrl(this.config.auth.postLogoutRedirectUri,Oe.getCurrentUri())):(this.logger.verbose("Setting postLogoutRedirectUri to current page",n.correlationId),n.postLogoutRedirectUri=oe.getAbsoluteUrl(Oe.getCurrentUri(),Oe.getCurrentUri())):this.logger.verbose("postLogoutRedirectUri passed as null, not setting post logout redirect uri",n.correlationId),n},e.prototype.getLogoutHintFromIdTokenClaims=function(r){var n=r.idTokenClaims;if(n){if(n.login_hint)return n.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},e.prototype.createAuthCodeClient=function(r,n,o){return S(this,void 0,void 0,function(){var i;return T(this,function(a){switch(a.label){case 0:return[4,this.getClientConfiguration(r,n,o)];case 1:return i=a.sent(),[2,new by(i)]}})})},e.prototype.getClientConfiguration=function(r,n,o){return S(this,void 0,void 0,function(){var i;return T(this,function(a){switch(a.label){case 0:return this.logger.verbose("getClientConfiguration called",this.correlationId),[4,this.getDiscoveredAuthority(n,o)];case 1:return i=a.sent(),[2,{authOptions:{clientId:this.config.auth.clientId,authority:i,clientCapabilities:this.config.auth.clientCapabilities},systemOptions:{tokenRenewalOffsetSeconds:this.config.system.tokenRenewalOffsetSeconds,preventCorsPreflight:!0},loggerOptions:{loggerCallback:this.config.system.loggerOptions.loggerCallback,piiLoggingEnabled:this.config.system.loggerOptions.piiLoggingEnabled,logLevel:this.config.system.loggerOptions.logLevel,correlationId:this.correlationId},cryptoInterface:this.browserCrypto,networkInterface:this.networkClient,storageInterface:this.browserStorage,serverTelemetryManager:r,libraryInfo:{sku:cr.MSAL_SKU,version:Ea,cpu:_.EMPTY_STRING,os:_.EMPTY_STRING},telemetry:this.config.telemetry}]}})})},e.prototype.validateAndExtractStateFromHash=function(r,n,o){if(this.logger.verbose("validateAndExtractStateFromHash called",o),!r.state)throw N.createHashDoesNotContainStateError();var i=Ry.extractBrowserRequestState(this.browserCrypto,r.state);if(!i)throw N.createUnableToParseStateError();if(i.interactionType!==n)throw N.createStateInteractionTypeMismatchError();return this.logger.verbose("Returning state from hash",o),r.state},e.prototype.getDiscoveredAuthority=function(r,n){return S(this,void 0,void 0,function(){var o,i,a,s;return T(this,function(c){switch(c.label){case 0:return this.logger.verbose("getDiscoveredAuthority called",this.correlationId),o=this.performanceClient.startMeasurement(je.StandardInteractionClientGetDiscoveredAuthority,this.correlationId),i={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},a=r||this.config.auth.authority,s=Kc.generateAuthority(a,n||this.config.auth.azureCloudOptions),this.logger.verbose("Creating discovered authority with configured authority",this.correlationId),[4,Gc.createDiscoveredInstance(s,this.config.system.networkClient,this.browserStorage,i).then(function(l){return o.endMeasurement({success:!0}),l}).catch(function(l){throw o.endMeasurement({errorCode:l.errorCode,subErrorCode:l.subError,success:!1}),l})];case 1:return[2,c.sent()]}})})},e.prototype.initializeAuthorizationRequest=function(r,n){return S(this,void 0,void 0,function(){var o,i,a,s,c,l,u;return T(this,function(h){switch(h.label){case 0:return this.logger.verbose("initializeAuthorizationRequest called",this.correlationId),o=this.getRedirectUri(r.redirectUri),i={interactionType:n},a=Wr.setRequestState(this.browserCrypto,r&&r.state||_.EMPTY_STRING,i),c=[{}],[4,this.initializeBaseRequest(r)];case 1:return s=$.apply(void 0,[$.apply(void 0,c.concat([h.sent()])),{redirectUri:o,state:a,nonce:r.nonce||this.browserCrypto.createNewGuid(),responseMode:Uc.FRAGMENT}]),l=r.account||this.browserStorage.getActiveAccount(),l&&(this.logger.verbose("Setting validated request account",this.correlationId),this.logger.verbosePii("Setting validated request account: "+l.homeAccountId,this.correlationId),s.account=l),x.isEmpty(s.loginHint)&&!l&&(u=this.browserStorage.getLegacyLoginHint(),u&&(s.loginHint=u)),[2,s]}})})},e}(Py);/*! @azure/msal-browser v2.31.0 2022-11-07 */var qh=function(){function t(e,r,n,o){this.authModule=e,this.browserStorage=r,this.authCodeRequest=n,this.logger=o}return t.prototype.handleCodeResponseFromHash=function(e,r,n,o){return S(this,void 0,void 0,function(){var i,a,s;return T(this,function(c){if(this.logger.verbose("InteractionHandler.handleCodeResponse called"),x.isEmpty(e))throw N.createEmptyHashError(e);if(i=this.browserStorage.generateStateKey(r),a=this.browserStorage.getTemporaryCache(i),!a)throw D.createStateNotFoundError("Cached State");try{s=this.authModule.handleFragmentResponse(e,a)}catch(l){throw l instanceof vo&&l.subError===I.userCancelledError.code?N.createUserCancelledError():l}return[2,this.handleCodeResponseFromServer(s,r,n,o)]})})},t.prototype.handleCodeResponseFromServer=function(e,r,n,o,i){return i===void 0&&(i=!0),S(this,void 0,void 0,function(){var a,s,c,l,u,h;return T(this,function(d){switch(d.label){case 0:if(this.logger.trace("InteractionHandler.handleCodeResponseFromServer called"),a=this.browserStorage.generateStateKey(r),s=this.browserStorage.getTemporaryCache(a),!s)throw D.createStateNotFoundError("Cached State");return c=this.browserStorage.generateNonceKey(s),l=this.browserStorage.getTemporaryCache(c),this.authCodeRequest.code=e.code,e.cloud_instance_host_name?[4,this.updateTokenEndpointAuthority(e.cloud_instance_host_name,n,o)]:[3,2];case 1:d.sent(),d.label=2;case 2:return i&&(e.nonce=l||void 0),e.state=s,e.client_info?this.authCodeRequest.clientInfo=e.client_info:(u=this.checkCcsCredentials(),u&&(this.authCodeRequest.ccsCredential=u)),[4,this.authModule.acquireToken(this.authCodeRequest,e)];case 3:return h=d.sent(),this.browserStorage.cleanRequestByState(r),[2,h]}})})},t.prototype.updateTokenEndpointAuthority=function(e,r,n){return S(this,void 0,void 0,function(){var o,i;return T(this,function(a){switch(a.label){case 0:return o="https://"+e+"/"+r.tenant+"/",[4,Gc.createDiscoveredInstance(o,n,this.browserStorage,r.options)];case 1:return i=a.sent(),this.authModule.updateAuthority(i),[2]}})})},t.prototype.checkCcsCredentials=function(){var e=this.browserStorage.getTemporaryCache(ae.CCS_CREDENTIAL,!0);if(e)try{return JSON.parse(e)}catch{this.authModule.logger.error("Cache credential could not be parsed"),this.authModule.logger.errorPii("Cache credential could not be parsed: "+e)}return null},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var Lp=function(t){ot(e,t);function e(r,n,o,i,a){var s=t.call(this,r,n,o,i)||this;return s.browserCrypto=a,s}return e.prototype.initiateAuthRequest=function(r,n){return S(this,void 0,void 0,function(){var o,i;return T(this,function(a){switch(a.label){case 0:return this.logger.verbose("RedirectHandler.initiateAuthRequest called"),x.isEmpty(r)?[3,7]:(n.redirectStartPage&&(this.logger.verbose("RedirectHandler.initiateAuthRequest: redirectStartPage set, caching start page"),this.browserStorage.setTemporaryCache(ae.ORIGIN_URI,n.redirectStartPage,!0)),this.browserStorage.setTemporaryCache(ae.CORRELATION_ID,this.authCodeRequest.correlationId,!0),this.browserStorage.cacheCodeRequest(this.authCodeRequest,this.browserCrypto),this.logger.infoPii("RedirectHandler.initiateAuthRequest: Navigate to: "+r),o={apiId:ye.acquireTokenRedirect,timeout:n.redirectTimeout,noHistory:!1},typeof n.onRedirectNavigate!="function"?[3,4]:(this.logger.verbose("RedirectHandler.initiateAuthRequest: Invoking onRedirectNavigate callback"),i=n.onRedirectNavigate(r),i===!1?[3,2]:(this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate did not return false, navigating"),[4,n.navigationClient.navigateExternal(r,o)])));case 1:return a.sent(),[2];case 2:return this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate returned false, stopping navigation"),[2];case 3:return[3,6];case 4:return this.logger.verbose("RedirectHandler.initiateAuthRequest: Navigating window to navigate url"),[4,n.navigationClient.navigateExternal(r,o)];case 5:return a.sent(),[2];case 6:return[3,8];case 7:throw this.logger.info("RedirectHandler.initiateAuthRequest: Navigate url is empty"),N.createEmptyNavigationUriError();case 8:return[2]}})})},e.prototype.handleCodeResponseFromHash=function(r,n,o,i){return S(this,void 0,void 0,function(){var a,s,c,l,u,h,d;return T(this,function(f){switch(f.label){case 0:if(this.logger.verbose("RedirectHandler.handleCodeResponse called"),x.isEmpty(r))throw N.createEmptyHashError(r);if(this.browserStorage.setInteractionInProgress(!1),a=this.browserStorage.generateStateKey(n),s=this.browserStorage.getTemporaryCache(a),!s)throw D.createStateNotFoundError("Cached State");try{c=this.authModule.handleFragmentResponse(r,s)}catch(m){throw m instanceof vo&&m.subError===I.userCancelledError.code?N.createUserCancelledError():m}return l=this.browserStorage.generateNonceKey(s),u=this.browserStorage.getTemporaryCache(l),this.authCodeRequest.code=c.code,c.cloud_instance_host_name?[4,this.updateTokenEndpointAuthority(c.cloud_instance_host_name,o,i)]:[3,2];case 1:f.sent(),f.label=2;case 2:return c.nonce=u||void 0,c.state=s,c.client_info?this.authCodeRequest.clientInfo=c.client_info:(h=this.checkCcsCredentials(),h&&(this.authCodeRequest.ccsCredential=h)),[4,this.authModule.acquireToken(this.authCodeRequest,c)];case 3:return d=f.sent(),this.browserStorage.cleanRequestByState(n),[2,d]}})})},e}(qh);/*! @azure/msal-browser v2.31.0 2022-11-07 */var q;(function(t){t.INITIALIZE_START="msal:initializeStart",t.INITIALIZE_END="msal:initializeEnd",t.ACCOUNT_ADDED="msal:accountAdded",t.ACCOUNT_REMOVED="msal:accountRemoved",t.LOGIN_START="msal:loginStart",t.LOGIN_SUCCESS="msal:loginSuccess",t.LOGIN_FAILURE="msal:loginFailure",t.ACQUIRE_TOKEN_START="msal:acquireTokenStart",t.ACQUIRE_TOKEN_SUCCESS="msal:acquireTokenSuccess",t.ACQUIRE_TOKEN_FAILURE="msal:acquireTokenFailure",t.ACQUIRE_TOKEN_NETWORK_START="msal:acquireTokenFromNetworkStart",t.SSO_SILENT_START="msal:ssoSilentStart",t.SSO_SILENT_SUCCESS="msal:ssoSilentSuccess",t.SSO_SILENT_FAILURE="msal:ssoSilentFailure",t.ACQUIRE_TOKEN_BY_CODE_START="msal:acquireTokenByCodeStart",t.ACQUIRE_TOKEN_BY_CODE_SUCCESS="msal:acquireTokenByCodeSuccess",t.ACQUIRE_TOKEN_BY_CODE_FAILURE="msal:acquireTokenByCodeFailure",t.HANDLE_REDIRECT_START="msal:handleRedirectStart",t.HANDLE_REDIRECT_END="msal:handleRedirectEnd",t.POPUP_OPENED="msal:popupOpened",t.LOGOUT_START="msal:logoutStart",t.LOGOUT_SUCCESS="msal:logoutSuccess",t.LOGOUT_FAILURE="msal:logoutFailure",t.LOGOUT_END="msal:logoutEnd"})(q||(q={}));/*! @azure/msal-browser v2.31.0 2022-11-07 */var mn;(function(t){t.USER_INTERACTION_REQUIRED="USER_INTERACTION_REQUIRED",t.USER_CANCEL="USER_CANCEL",t.NO_NETWORK="NO_NETWORK",t.TRANSIENT_ERROR="TRANSIENT_ERROR",t.PERSISTENT_ERROR="PERSISTENT_ERROR",t.DISABLED="DISABLED",t.ACCOUNT_UNAVAILABLE="ACCOUNT_UNAVAILABLE"})(mn||(mn={}));var Bi={extensionError:{code:"ContentError"},userSwitch:{code:"user_switch",desc:"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."},tokensNotFoundInCache:{code:"tokens_not_found_in_internal_memory_cache",desc:"Tokens not cached in MSAL JS internal memory, please make the WAM request"}},Er=function(t){ot(e,t);function e(r,n,o){var i=t.call(this,r,n)||this;return Object.setPrototypeOf(i,e.prototype),i.name="NativeAuthError",i.ext=o,i}return e.prototype.isFatal=function(){if(this.ext&&this.ext.status&&(this.ext.status===mn.PERSISTENT_ERROR||this.ext.status===mn.DISABLED))return!0;switch(this.errorCode){case Bi.extensionError.code:return!0;default:return!1}},e.createError=function(r,n,o){if(o&&o.status)switch(o.status){case mn.ACCOUNT_UNAVAILABLE:return lr.createNativeAccountUnavailableError();case mn.USER_INTERACTION_REQUIRED:return new lr(r,n);case mn.USER_CANCEL:return N.createUserCancelledError();case mn.NO_NETWORK:return N.createNoNetworkConnectivityError()}return new e(r,n,o)},e.createUserSwitchError=function(){return new e(Bi.userSwitch.code,Bi.userSwitch.desc)},e.createTokensNotFoundInCacheError=function(){return new e(Bi.tokensNotFoundInCache.code,Bi.tokensNotFoundInCache.desc)},e}(z);/*! @azure/msal-browser v2.31.0 2022-11-07 */var Ny=function(t){ot(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.acquireToken=function(r){return S(this,void 0,void 0,function(){var n,o,i,a,s;return T(this,function(c){switch(c.label){case 0:return n=this.performanceClient.startMeasurement(je.SilentCacheClientAcquireToken,r.correlationId),o=this.initializeServerTelemetryManager(ye.acquireTokenSilent_silentFlow),[4,this.createSilentFlowClient(o,r.authority,r.azureCloudOptions)];case 1:i=c.sent(),this.logger.verbose("Silent auth client created"),c.label=2;case 2:return c.trys.push([2,4,,5]),[4,i.acquireCachedToken(r)];case 3:return a=c.sent(),n.endMeasurement({success:!0,fromCache:!0}),[2,a];case 4:throw s=c.sent(),s instanceof N&&s.errorCode===I.signingKeyNotFoundInStorage.code&&this.logger.verbose("Signing keypair for bound access token not found. Refreshing bound access token and generating a new crypto keypair."),n.endMeasurement({errorCode:s instanceof z&&s.errorCode||void 0,subErrorCode:s instanceof z&&s.subError||void 0,success:!1}),s;case 5:return[2]}})})},e.prototype.logout=function(){return Promise.reject(N.createSilentLogoutUnsupportedError())},e.prototype.createSilentFlowClient=function(r,n,o){return S(this,void 0,void 0,function(){var i;return T(this,function(a){switch(a.label){case 0:return[4,this.getClientConfiguration(r,n,o)];case 1:return i=a.sent(),[2,new BC(i,this.performanceClient)]}})})},e.prototype.initializeSilentRequest=function(r,n){return S(this,void 0,void 0,function(){var o;return T(this,function(i){switch(i.label){case 0:return o=[$({},r)],[4,this.initializeBaseRequest(r)];case 1:return[2,$.apply(void 0,[$.apply(void 0,o.concat([i.sent()])),{account:n,forceRefresh:r.forceRefresh||!1}])]}})})},e}(Ri);/*! @azure/msal-browser v2.31.0 2022-11-07 */var si=function(t){ot(e,t);function e(r,n,o,i,a,s,c,l,u,h,d,f){var m=t.call(this,r,n,o,i,a,s,l,u,f)||this;return m.apiId=c,m.accountId=h,m.nativeMessageHandler=u,m.nativeStorageManager=d,m.silentCacheClient=new Ny(r,m.nativeStorageManager,o,i,a,s,l,u,f),m}return e.prototype.acquireToken=function(r){return S(this,void 0,void 0,function(){var n,o,i,a,s,c,l;return T(this,function(u){switch(u.label){case 0:return this.logger.trace("NativeInteractionClient - acquireToken called."),n=this.performanceClient.startMeasurement(je.NativeInteractionClientAcquireToken,r.correlationId),o=Jt.nowSeconds(),[4,this.initializeNativeRequest(r)];case 1:i=u.sent(),u.label=2;case 2:return u.trys.push([2,4,,5]),[4,this.acquireTokensFromCache(this.accountId,i)];case 3:return a=u.sent(),n.endMeasurement({success:!0,isNativeBroker:!1,fromCache:!0}),[2,a];case 4:return u.sent(),this.logger.info("MSAL internal Cache does not contain tokens, proceed to make a native call"),[3,5];case 5:return s={method:qr.GetToken,request:i},[4,this.nativeMessageHandler.sendMessage(s)];case 6:return c=u.sent(),l=this.validateNativeResponse(c),[2,this.handleNativeResponse(l,i,o).then(function(h){return n.endMeasurement({success:!0,isNativeBroker:!0,requestId:h.requestId}),h}).catch(function(h){throw n.endMeasurement({success:!1,errorCode:h.errorCode,subErrorCode:h.subError,isNativeBroker:!0}),h})]}})})},e.prototype.createSilentCacheRequest=function(r,n){return{authority:r.authority,correlationId:this.correlationId,scopes:Ct.fromString(r.scope).asArray(),account:n,forceRefresh:!1}},e.prototype.acquireTokensFromCache=function(r,n){return S(this,void 0,void 0,function(){var o,i,a,s,c;return T(this,function(l){switch(l.label){case 0:if(o=this.browserStorage.readAccountFromCacheWithNativeAccountId(r),!o)throw D.createNoAccountFoundError();i=o.getAccountInfo(),l.label=1;case 1:return l.trys.push([1,3,,4]),a=this.createSilentCacheRequest(n,i),[4,this.silentCacheClient.acquireToken(a)];case 2:return s=l.sent(),[2,s];case 3:throw c=l.sent(),c;case 4:return[2]}})})},e.prototype.acquireTokenRedirect=function(r){return S(this,void 0,void 0,function(){var n,o,i,a,s,c;return T(this,function(l){switch(l.label){case 0:return this.logger.trace("NativeInteractionClient - acquireTokenRedirect called."),[4,this.initializeNativeRequest(r)];case 1:n=l.sent(),o={method:qr.GetToken,request:n},l.label=2;case 2:return l.trys.push([2,4,,5]),[4,this.nativeMessageHandler.sendMessage(o)];case 3:return i=l.sent(),this.validateNativeResponse(i),[3,5];case 4:if(a=l.sent(),a instanceof Er&&a.isFatal())throw a;return[3,5];case 5:return this.browserStorage.setTemporaryCache(ae.NATIVE_REQUEST,JSON.stringify(n),!0),s={apiId:ye.acquireTokenRedirect,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},c=this.config.auth.navigateToLoginRequestUrl?window.location.href:this.getRedirectUri(r.redirectUri),[4,this.navigationClient.navigateExternal(c,s)];case 6:return l.sent(),[2]}})})},e.prototype.handleRedirectPromise=function(){return S(this,void 0,void 0,function(){var r,n,o,i,a,s,c,l;return T(this,function(u){switch(u.label){case 0: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."),[2,null];if(r=this.browserStorage.getCachedNativeRequest(),!r)return this.logger.verbose("NativeInteractionClient - handleRedirectPromise called but there is no cached request, returning null."),[2,null];n=r.prompt,o=Sp(r,["prompt"]),n&&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(ae.NATIVE_REQUEST)),i={method:qr.GetToken,request:o},a=Jt.nowSeconds(),u.label=1;case 1:return u.trys.push([1,3,,4]),this.logger.verbose("NativeInteractionClient - handleRedirectPromise sending message to native broker."),[4,this.nativeMessageHandler.sendMessage(i)];case 2:return s=u.sent(),this.validateNativeResponse(s),c=this.handleNativeResponse(s,o,a),this.browserStorage.setInteractionInProgress(!1),[2,c];case 3:throw l=u.sent(),this.browserStorage.setInteractionInProgress(!1),l;case 4:return[2]}})})},e.prototype.logout=function(){return this.logger.trace("NativeInteractionClient - logout called."),Promise.reject("Logout not implemented yet")},e.prototype.handleNativeResponse=function(r,n,o){return S(this,void 0,void 0,function(){var i,a,s,c,l,u,h,d,f,m,v,E,g,p,y,w,k,P,M,O,se=this;return T(this,function(B){switch(B.label){case 0:if(this.logger.trace("NativeInteractionClient - handleNativeResponse called."),i=this.getMATSFromResponse(r),this.performanceClient.addStaticFields({extensionId:this.nativeMessageHandler.getExtensionId(),extensionVersion:this.nativeMessageHandler.getExtensionVersion(),matsBrokerVersion:i?i.broker_version:void 0,matsAccountJoinOnStart:i?i.account_join_on_start:void 0,matsAccountJoinOnEnd:i?i.account_join_on_end:void 0,matsDeviceJoin:i?i.device_join:void 0,matsPromptBehavior:i?i.prompt_behavior:void 0,matsApiErrorCode:i?i.api_error_code:void 0,matsUiVisible:i?i.ui_visible:void 0,matsSilentCode:i?i.silent_code:void 0,matsSilentBiSubCode:i?i.silent_bi_sub_code:void 0,matsSilentMessage:i?i.silent_message:void 0,matsSilentStatus:i?i.silent_status:void 0,matsHttpStatus:i?i.http_status:void 0,matsHttpEventCount:i?i.http_event_count:void 0},this.correlationId),r.account.id!==n.accountId)throw Er.createUserSwitchError();return a=new kr(r.id_token||_.EMPTY_STRING,this.browserCrypto),[4,this.getDiscoveredAuthority(n.authority)];case 1:switch(s=B.sent(),c=s.getPreferredCache(),l=tt.generateHomeAccountId(r.client_info||_.EMPTY_STRING,Wt.Default,this.logger,this.browserCrypto,a),u=tt.createAccount(r.client_info,l,a,void 0,void 0,void 0,c,r.account.id),this.browserStorage.setAccount(u),h=r.scope?Ct.fromString(r.scope):Ct.fromString(n.scope),d=r.account.properties||{},f=d.UID||a.claims.oid||a.claims.sub||_.EMPTY_STRING,m=d.TenantId||a.claims.tid||_.EMPTY_STRING,E=le.BEARER,g=n.tokenType,g){case le.POP:return[3,2]}return[3,4];case 2:if(E=le.POP,r.shr)return this.logger.trace("handleNativeServerResponse: SHR is enabled in native layer"),v=r.shr,[3,5];if(p=new vi(this.browserCrypto),y={resourceRequestMethod:n.resourceRequestMethod,resourceRequestUri:n.resourceRequestUri,shrClaims:n.shrClaims,shrNonce:n.shrNonce},!n.keyId)throw D.createKeyIdMissingError();return[4,p.signPopToken(r.access_token,n.keyId,y)];case 3:return v=B.sent(),[3,5];case 4:v=r.access_token,B.label=5;case 5:return w={authority:s.canonicalAuthority,uniqueId:f,tenantId:m,scopes:h.asArray(),account:u.getAccountInfo(),idToken:r.id_token,idTokenClaims:a.claims,accessToken:v,fromCache:i?this.isResponseFromCache(i):!1,expiresOn:new Date(Number(o+r.expires_in)*1e3),tokenType:E,correlationId:this.correlationId,state:r.state,fromNativeBroker:!0},k=ja.createIdTokenEntity(l,n.authority,r.id_token||_.EMPTY_STRING,n.clientId,a.claims.tid||_.EMPTY_STRING),this.nativeStorageManager.setIdTokenCredential(k),P=E===le.POP?_.SHR_NONCE_VALIDITY:(typeof r.expires_in=="string"?parseInt(r.expires_in,10):r.expires_in)||0,M=o+P,O=Ba.createAccessTokenEntity(l,n.authority,v,n.clientId,m,h.printScopes(),M,0,this.browserCrypto),this.nativeStorageManager.setAccessTokenCredential(O),this.browserStorage.removeAccountContext(u).catch(function(_t){se.logger.error("Error occurred while removing account context from browser storage. "+_t)}),[2,w]}})})},e.prototype.validateNativeResponse=function(r){if(r.hasOwnProperty("access_token")&&r.hasOwnProperty("id_token")&&r.hasOwnProperty("client_info")&&r.hasOwnProperty("account")&&r.hasOwnProperty("scope")&&r.hasOwnProperty("expires_in"))return r;throw Er.createUnexpectedError("Response missing expected properties.")},e.prototype.getMATSFromResponse=function(r){if(r.properties.MATS)try{return JSON.parse(r.properties.MATS)}catch{this.logger.error("NativeInteractionClient - Error parsing MATS telemetry, returning null instead")}return null},e.prototype.isResponseFromCache=function(r){return typeof r.is_cached>"u"?(this.logger.verbose("NativeInteractionClient - MATS telemetry does not contain field indicating if response was served from cache. Returning false."),!1):!!r.is_cached},e.prototype.initializeNativeRequest=function(r){return S(this,void 0,void 0,function(){var n,o,i,a,s,c,l,u,h,d,f=this;return T(this,function(m){switch(m.label){case 0:return this.logger.trace("NativeInteractionClient - initializeNativeRequest called"),n=r.authority||this.config.auth.authority,o=new oe(n),o.validateAsUri(),i=r.scopes,a=Sp(r,["scopes"]),s=new Ct(i||[]),s.appendScopes(ts),c=function(){switch(f.apiId){case ye.ssoSilent:case ye.acquireTokenSilent_silentFlow:return f.logger.trace("initializeNativeRequest: silent request sets prompt to none"),mt.NONE}if(!r.prompt){f.logger.trace("initializeNativeRequest: prompt was not provided");return}switch(r.prompt){case mt.NONE:case mt.CONSENT:case mt.LOGIN:return f.logger.trace("initializeNativeRequest: prompt is compatible with native flow"),r.prompt;default:throw f.logger.trace("initializeNativeRequest: prompt = "+r.prompt+" is not compatible with native flow"),N.createNativePromptParameterNotSupportedError()}},l=$($({},a),{accountId:this.accountId,clientId:this.config.auth.clientId,authority:o.urlString,scope:s.printScopes(),redirectUri:this.getRedirectUri(r.redirectUri),prompt:c(),correlationId:this.correlationId,tokenType:r.authenticationScheme,windowTitleSubstring:document.title,extraParameters:$($($({},r.extraQueryParameters),r.tokenQueryParameters),{telemetry:ra.MATS_TELEMETRY}),extendedExpiryToken:!1}),r.authenticationScheme!==le.POP?[3,2]:(u={resourceRequestUri:r.resourceRequestUri,resourceRequestMethod:r.resourceRequestMethod,shrClaims:r.shrClaims,shrNonce:r.shrNonce},h=new vi(this.browserCrypto),[4,h.generateCnf(u)]);case 1:d=m.sent(),l.reqCnf=d.reqCnfHash,l.keyId=d.kid,m.label=2;case 2:return[2,l]}})})},e}(Py);/*! @azure/msal-browser v2.31.0 2022-11-07 */var ro=function(){function t(e,r,n){this.logger=e,this.handshakeTimeoutMs=r,this.extensionId=n,this.resolvers=new Map,this.handshakeResolvers=new Map,this.responseId=0,this.messageChannel=new MessageChannel,this.windowListener=this.onWindowMessage.bind(this)}return t.prototype.sendMessage=function(e){return S(this,void 0,void 0,function(){var r,n=this;return T(this,function(o){return this.logger.trace("NativeMessageHandler - sendMessage called."),r={channel:ra.CHANNEL_ID,extensionId:this.extensionId,responseId:this.responseId++,body:e},this.logger.trace("NativeMessageHandler - Sending request to browser extension"),this.logger.tracePii("NativeMessageHandler - Sending request to browser extension: "+JSON.stringify(r)),this.messageChannel.port1.postMessage(r),[2,new Promise(function(i,a){n.resolvers.set(r.responseId,{resolve:i,reject:a})})]})})},t.createProvider=function(e,r){return S(this,void 0,void 0,function(){var n,o;return T(this,function(i){switch(i.label){case 0:e.trace("NativeMessageHandler - createProvider called."),i.label=1;case 1:return i.trys.push([1,3,,5]),n=new t(e,r,ra.PREFERRED_EXTENSION_ID),[4,n.sendHandshakeRequest()];case 2:return i.sent(),[2,n];case 3:return i.sent(),o=new t(e,r),[4,o.sendHandshakeRequest()];case 4:return i.sent(),[2,o];case 5:return[2]}})})},t.prototype.sendHandshakeRequest=function(){return S(this,void 0,void 0,function(){var e,r=this;return T(this,function(n){return this.logger.trace("NativeMessageHandler - sendHandshakeRequest called."),window.addEventListener("message",this.windowListener,!1),e={channel:ra.CHANNEL_ID,extensionId:this.extensionId,responseId:this.responseId++,body:{method:qr.HandshakeRequest}},this.messageChannel.port1.onmessage=function(o){r.onChannelMessage(o)},window.postMessage(e,window.origin,[this.messageChannel.port2]),[2,new Promise(function(o,i){r.handshakeResolvers.set(e.responseId,{resolve:o,reject:i}),r.timeoutId=window.setTimeout(function(){window.removeEventListener("message",r.windowListener,!1),r.messageChannel.port1.close(),r.messageChannel.port2.close(),i(N.createNativeHandshakeTimeoutError()),r.handshakeResolvers.delete(e.responseId)},r.handshakeTimeoutMs)})]})})},t.prototype.onWindowMessage=function(e){if(this.logger.trace("NativeMessageHandler - onWindowMessage called"),e.source===window){var r=e.data;if(!(!r.channel||r.channel!==ra.CHANNEL_ID)&&!(r.extensionId&&r.extensionId!==this.extensionId)&&r.body.method===qr.HandshakeRequest){this.logger.verbose(r.extensionId?"Extension with id: "+r.extensionId+" not installed":"No extension installed"),clearTimeout(this.timeoutId),this.messageChannel.port1.close(),this.messageChannel.port2.close(),window.removeEventListener("message",this.windowListener,!1);var n=this.handshakeResolvers.get(r.responseId);n&&n.reject(N.createNativeExtensionNotInstalledError())}}},t.prototype.onChannelMessage=function(e){this.logger.trace("NativeMessageHandler - onChannelMessage called.");var r=e.data,n=this.resolvers.get(r.responseId),o=this.handshakeResolvers.get(r.responseId);try{var i=r.body.method;if(i===qr.Response){if(!n)return;var a=r.body.response;if(this.logger.trace("NativeMessageHandler - Received response from browser extension"),this.logger.tracePii("NativeMessageHandler - Received response from browser extension: "+JSON.stringify(a)),a.status!=="Success")n.reject(Er.createError(a.code,a.description,a.ext));else if(a.result)a.result.code&&a.result.description?n.reject(Er.createError(a.result.code,a.result.description,a.result.ext)):n.resolve(a.result);else throw z.createUnexpectedError("Event does not contain result.");this.resolvers.delete(r.responseId)}else if(i===qr.HandshakeResponse){if(!o)return;clearTimeout(this.timeoutId),window.removeEventListener("message",this.windowListener,!1),this.extensionId=r.extensionId,this.extensionVersion=r.body.version,this.logger.verbose("NativeMessageHandler - Received HandshakeResponse from extension: "+this.extensionId),o.resolve(),this.handshakeResolvers.delete(r.responseId)}}catch(s){this.logger.error("Error parsing response from WAM Extension"),this.logger.errorPii("Error parsing response from WAM Extension: "+s.toString()),this.logger.errorPii("Unable to parse "+e),n?n.reject(s):o&&o.reject(s)}},t.prototype.getExtensionId=function(){return this.extensionId},t.prototype.getExtensionVersion=function(){return this.extensionVersion},t.isNativeAvailable=function(e,r,n,o){if(r.trace("isNativeAvailable called"),!e.system.allowNativeBroker)return r.trace("isNativeAvailable: allowNativeBroker is not enabled, returning false"),!1;if(!n)return r.trace("isNativeAvailable: WAM extension provider is not initialized, returning false"),!1;if(o)switch(o){case le.BEARER:case le.POP:return r.trace("isNativeAvailable: authenticationScheme is supported, returning true"),!0;default:return r.trace("isNativeAvailable: authenticationScheme is not supported, returning false"),!1}return!0},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var nS=function(t){ot(e,t);function e(r,n,o,i,a,s,c,l,u,h){var d=t.call(this,r,n,o,i,a,s,c,u,h)||this;return d.nativeStorage=l,d}return e.prototype.acquireToken=function(r){return S(this,void 0,void 0,function(){var n,o,i,a,s,c,l,u,h,d=this;return T(this,function(f){switch(f.label){case 0:return[4,this.initializeAuthorizationRequest(r,F.Redirect)];case 1:n=f.sent(),this.browserStorage.updateCacheEntries(n.state,n.nonce,n.authority,n.loginHint||_.EMPTY_STRING,n.account||null),o=this.initializeServerTelemetryManager(ye.acquireTokenRedirect),i=function(m){m.persisted&&(d.logger.verbose("Page was restored from back/forward cache. Clearing temporary cache."),d.browserStorage.cleanRequestByState(n.state))},f.label=2;case 2:return f.trys.push([2,7,,8]),[4,this.initializeAuthorizationCodeRequest(n)];case 3:return a=f.sent(),[4,this.createAuthCodeClient(o,n.authority,n.azureCloudOptions)];case 4:return s=f.sent(),this.logger.verbose("Auth code client created"),c=new Lp(s,this.browserStorage,a,this.logger,this.browserCrypto),[4,s.getAuthCodeUrl($($({},n),{nativeBroker:ro.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,r.authenticationScheme)}))];case 5:return l=f.sent(),u=this.getRedirectStartPage(r.redirectStartPage),this.logger.verbosePii("Redirect start page: "+u),window.addEventListener("pageshow",i),[4,c.initiateAuthRequest(l,{navigationClient:this.navigationClient,redirectTimeout:this.config.system.redirectNavigationTimeout,redirectStartPage:u,onRedirectNavigate:r.onRedirectNavigate})];case 6:return[2,f.sent()];case 7:throw h=f.sent(),h instanceof z&&h.setCorrelationId(this.correlationId),window.removeEventListener("pageshow",i),o.cacheFailedRequest(h),this.browserStorage.cleanRequestByState(n.state),h;case 8:return[2]}})})},e.prototype.handleRedirectPromise=function(r){return S(this,void 0,void 0,function(){var n,o,i,a,s,c,l,u,h,d,f,m;return T(this,function(v){switch(v.label){case 0:n=this.initializeServerTelemetryManager(ye.handleRedirectPromise),v.label=1;case 1:if(v.trys.push([1,10,,11]),!this.browserStorage.isInteractionInProgress(!0))return this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null."),[2,null];if(o=this.getRedirectResponseHash(r||window.location.hash),!o)return this.logger.info("handleRedirectPromise did not detect a response hash as a result of a redirect. Cleaning temporary cache."),this.browserStorage.cleanRequestByInteractionType(F.Redirect),[2,null];i=void 0;try{a=oe.getDeserializedHash(o),i=this.validateAndExtractStateFromHash(a,F.Redirect),this.logger.verbose("State extracted from hash")}catch(E){return this.logger.info("handleRedirectPromise was unable to extract state due to: "+E),this.browserStorage.cleanRequestByInteractionType(F.Redirect),[2,null]}return s=this.browserStorage.getTemporaryCache(ae.ORIGIN_URI,!0)||_.EMPTY_STRING,c=oe.removeHashFromUrl(s),l=oe.removeHashFromUrl(window.location.href),c===l&&this.config.auth.navigateToLoginRequestUrl?(this.logger.verbose("Current page is loginRequestUrl, handling hash"),[4,this.handleHash(o,i,n)]):[3,3];case 2:return u=v.sent(),s.indexOf("#")>-1&&Oe.replaceHash(s),[2,u];case 3:return this.config.auth.navigateToLoginRequestUrl?[3,4]:(this.logger.verbose("NavigateToLoginRequestUrl set to false, handling hash"),[2,this.handleHash(o,i,n)]);case 4:return!Oe.isInIframe()||this.config.system.allowRedirectInIframe?(this.browserStorage.setTemporaryCache(ae.URL_HASH,o,!0),h={apiId:ye.handleRedirectPromise,timeout:this.config.system.redirectNavigationTimeout,noHistory:!0},d=!0,!s||s==="null"?(f=Oe.getHomepage(),this.browserStorage.setTemporaryCache(ae.ORIGIN_URI,f,!0),this.logger.warning("Unable to get valid login request url from cache, redirecting to home page"),[4,this.navigationClient.navigateInternal(f,h)]):[3,6]):[3,9];case 5:return d=v.sent(),[3,8];case 6:return this.logger.verbose("Navigating to loginRequestUrl: "+s),[4,this.navigationClient.navigateInternal(s,h)];case 7:d=v.sent(),v.label=8;case 8:if(!d)return[2,this.handleHash(o,i,n)];v.label=9;case 9:return[2,null];case 10:throw m=v.sent(),m instanceof z&&m.setCorrelationId(this.correlationId),n.cacheFailedRequest(m),this.browserStorage.cleanRequestByInteractionType(F.Redirect),m;case 11:return[2]}})})},e.prototype.getRedirectResponseHash=function(r){this.logger.verbose("getRedirectResponseHash called");var n=oe.hashContainsKnownProperties(r);if(n)return Oe.clearHash(window),this.logger.verbose("Hash contains known properties, returning response hash"),r;var o=this.browserStorage.getTemporaryCache(ae.URL_HASH,!0);return this.browserStorage.removeItem(this.browserStorage.generateCacheKey(ae.URL_HASH)),this.logger.verbose("Hash does not contain known properties, returning cached hash"),o},e.prototype.handleHash=function(r,n,o){return S(this,void 0,void 0,function(){var i,a,s,c,l,u,h,d=this;return T(this,function(f){switch(f.label){case 0:if(i=this.browserStorage.getCachedRequest(n,this.browserCrypto),this.logger.verbose("handleHash called, retrieved cached request"),a=oe.getDeserializedHash(r),a.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),!this.nativeMessageHandler)throw N.createNativeConnectionNotEstablishedError();return s=new si(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,ye.acquireTokenPopup,this.performanceClient,this.nativeMessageHandler,a.accountId,this.browserStorage,i.correlationId),c=Wr.parseRequestState(this.browserCrypto,n).userRequestState,[2,s.acquireToken($($({},i),{state:c,prompt:void 0})).finally(function(){d.browserStorage.cleanRequestByState(n)})]}if(l=this.browserStorage.getCachedAuthority(n),!l)throw N.createNoCachedAuthorityError();return[4,this.createAuthCodeClient(o,l)];case 1:return u=f.sent(),this.logger.verbose("Auth code client created"),zc.removeThrottle(this.browserStorage,this.config.auth.clientId,i),h=new Lp(u,this.browserStorage,i,this.logger,this.browserCrypto),[4,h.handleCodeResponseFromHash(r,n,u.authority,this.networkClient)];case 2:return[2,f.sent()]}})})},e.prototype.logout=function(r){return S(this,void 0,void 0,function(){var n,o,i,a,s,c,l;return T(this,function(u){switch(u.label){case 0:this.logger.verbose("logoutRedirect called"),n=this.initializeLogoutRequest(r),o=this.initializeServerTelemetryManager(ye.logout),u.label=1;case 1:return u.trys.push([1,10,,11]),this.eventHandler.emitEvent(q.LOGOUT_START,F.Redirect,r),[4,this.clearCacheOnLogout(n.account)];case 2:return u.sent(),i={apiId:ye.logout,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},[4,this.createAuthCodeClient(o,r&&r.authority)];case 3:return a=u.sent(),this.logger.verbose("Auth code client created"),s=a.getLogoutUri(n),this.eventHandler.emitEvent(q.LOGOUT_SUCCESS,F.Redirect,n),r&&typeof r.onRedirectNavigate=="function"?(c=r.onRedirectNavigate(s),c===!1?[3,5]:(this.logger.verbose("Logout onRedirectNavigate did not return false, navigating"),this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0),[4,this.navigationClient.navigateExternal(s,i)])):[3,7];case 4:return u.sent(),[2];case 5:this.browserStorage.setInteractionInProgress(!1),this.logger.verbose("Logout onRedirectNavigate returned false, stopping navigation"),u.label=6;case 6:return[3,9];case 7:return this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0),[4,this.navigationClient.navigateExternal(s,i)];case 8:return u.sent(),[2];case 9:return[3,11];case 10:throw l=u.sent(),l instanceof z&&l.setCorrelationId(this.correlationId),o.cacheFailedRequest(l),this.eventHandler.emitEvent(q.LOGOUT_FAILURE,F.Redirect,null,l),this.eventHandler.emitEvent(q.LOGOUT_END,F.Redirect),l;case 11:return this.eventHandler.emitEvent(q.LOGOUT_END,F.Redirect),[2]}})})},e.prototype.getRedirectStartPage=function(r){var n=r||window.location.href;return oe.getAbsoluteUrl(n,Oe.getCurrentUri())},e}(Ri);/*! @azure/msal-browser v2.31.0 2022-11-07 */var oS=function(t){ot(e,t);function e(r,n,o,i,a,s,c,l,u,h){var d=t.call(this,r,n,o,i,a,s,c,u,h)||this;return d.unloadWindow=d.unloadWindow.bind(d),d.nativeStorage=l,d}return e.prototype.acquireToken=function(r){try{var n=this.generatePopupName(r.scopes||ts,r.authority||this.config.auth.authority),o=r.popupWindowAttributes||{};if(this.config.system.asyncPopups)return this.logger.verbose("asyncPopups set to true, acquiring token"),this.acquireTokenPopupAsync(r,n,o);this.logger.verbose("asyncPopup set to false, opening popup before acquiring token");var i=this.openSizedPopup("about:blank",n,o);return this.acquireTokenPopupAsync(r,n,o,i)}catch(a){return Promise.reject(a)}},e.prototype.logout=function(r){try{this.logger.verbose("logoutPopup called");var n=this.initializeLogoutRequest(r),o=this.generateLogoutPopupName(n),i=r&&r.authority,a=r&&r.mainWindowRedirectUri,s=(r==null?void 0:r.popupWindowAttributes)||{};if(this.config.system.asyncPopups)return this.logger.verbose("asyncPopups set to true"),this.logoutPopupAsync(n,o,s,i,void 0,a);this.logger.verbose("asyncPopup set to false, opening popup");var c=this.openSizedPopup("about:blank",o,s);return this.logoutPopupAsync(n,o,s,i,c,a)}catch(l){return Promise.reject(l)}},e.prototype.acquireTokenPopupAsync=function(r,n,o,i){return S(this,void 0,void 0,function(){var a,s,c,l,u,h,d,f,m,v,E,g,p,y,w,k,P,M=this;return T(this,function(O){switch(O.label){case 0:return this.logger.verbose("acquireTokenPopupAsync called"),a=this.initializeServerTelemetryManager(ye.acquireTokenPopup),[4,this.initializeAuthorizationRequest(r,F.Popup)];case 1:s=O.sent(),this.browserStorage.updateCacheEntries(s.state,s.nonce,s.authority,s.loginHint||_.EMPTY_STRING,s.account||null),O.label=2;case 2:return O.trys.push([2,8,,9]),[4,this.initializeAuthorizationCodeRequest(s)];case 3:return c=O.sent(),[4,this.createAuthCodeClient(a,s.authority,s.azureCloudOptions)];case 4:return l=O.sent(),this.logger.verbose("Auth code client created"),u=ro.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,r.authenticationScheme),h=void 0,u&&(h=this.performanceClient.startMeasurement(je.FetchAccountIdWithNativeBroker,r.correlationId)),[4,l.getAuthCodeUrl($($({},s),{nativeBroker:u}))];case 5:return d=O.sent(),f=new qh(l,this.browserStorage,c,this.logger),m={popup:i,popupName:n,popupWindowAttributes:o},v=this.initiateAuthRequest(d,m),this.eventHandler.emitEvent(q.POPUP_OPENED,F.Popup,{popupWindow:v},null),[4,this.monitorPopupForHash(v)];case 6:if(E=O.sent(),g=oe.getDeserializedHash(E),p=this.validateAndExtractStateFromHash(g,F.Popup,s.correlationId),zc.removeThrottle(this.browserStorage,this.config.auth.clientId,c),g.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),h&&h.endMeasurement({success:!0,isNativeBroker:!0}),!this.nativeMessageHandler)throw N.createNativeConnectionNotEstablishedError();return y=new si(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,ye.acquireTokenPopup,this.performanceClient,this.nativeMessageHandler,g.accountId,this.nativeStorage,s.correlationId),w=Wr.parseRequestState(this.browserCrypto,p).userRequestState,[2,y.acquireToken($($({},s),{state:w,prompt:void 0})).finally(function(){M.browserStorage.cleanRequestByState(p)})]}return[4,f.handleCodeResponseFromHash(E,p,l.authority,this.networkClient)];case 7:return k=O.sent(),[2,k];case 8:throw P=O.sent(),i&&i.close(),P instanceof z&&P.setCorrelationId(this.correlationId),a.cacheFailedRequest(P),this.browserStorage.cleanRequestByState(s.state),P;case 9:return[2]}})})},e.prototype.logoutPopupAsync=function(r,n,o,i,a,s){return S(this,void 0,void 0,function(){var c,l,u,h,d,f,m;return T(this,function(v){switch(v.label){case 0:this.logger.verbose("logoutPopupAsync called"),this.eventHandler.emitEvent(q.LOGOUT_START,F.Popup,r),c=this.initializeServerTelemetryManager(ye.logoutPopup),v.label=1;case 1:return v.trys.push([1,5,,6]),[4,this.clearCacheOnLogout(r.account)];case 2:return v.sent(),[4,this.createAuthCodeClient(c,i)];case 3:return l=v.sent(),this.logger.verbose("Auth code client created"),u=l.getLogoutUri(r),this.eventHandler.emitEvent(q.LOGOUT_SUCCESS,F.Popup,r),h=this.openPopup(u,{popupName:n,popupWindowAttributes:o,popup:a}),this.eventHandler.emitEvent(q.POPUP_OPENED,F.Popup,{popupWindow:h},null),[4,this.waitForLogoutPopup(h)];case 4:return v.sent(),s?(d={apiId:ye.logoutPopup,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},f=oe.getAbsoluteUrl(s,Oe.getCurrentUri()),this.logger.verbose("Redirecting main window to url specified in the request"),this.logger.verbosePii("Redirecting main window to: "+f),this.navigationClient.navigateInternal(f,d)):this.logger.verbose("No main window navigation requested"),[3,6];case 5:throw m=v.sent(),a&&a.close(),m instanceof z&&m.setCorrelationId(this.correlationId),this.browserStorage.setInteractionInProgress(!1),this.eventHandler.emitEvent(q.LOGOUT_FAILURE,F.Popup,null,m),this.eventHandler.emitEvent(q.LOGOUT_END,F.Popup),c.cacheFailedRequest(m),m;case 6:return this.eventHandler.emitEvent(q.LOGOUT_END,F.Popup),[2]}})})},e.prototype.initiateAuthRequest=function(r,n){if(x.isEmpty(r))throw this.logger.error("Navigate url is empty"),N.createEmptyNavigationUriError();return this.logger.infoPii("Navigate to: "+r),this.openPopup(r,n)},e.prototype.monitorPopupForHash=function(r){var n=this;return new Promise(function(o,i){var a=n.config.system.windowHashTimeout/n.config.system.pollIntervalMilliseconds,s=0;n.logger.verbose("PopupHandler.monitorPopupForHash - polling started");var c=setInterval(function(){if(r.closed){n.logger.error("PopupHandler.monitorPopupForHash - window closed"),n.cleanPopup(),clearInterval(c),i(N.createUserCancelledError());return}var l=_.EMPTY_STRING,u=_.EMPTY_STRING;try{l=r.location.href,u=r.location.hash}catch{}x.isEmpty(l)||l==="about:blank"||(n.logger.verbose("PopupHandler.monitorPopupForHash - popup window is on same origin as caller"),s++,u?(n.logger.verbose("PopupHandler.monitorPopupForHash - found hash in url"),clearInterval(c),n.cleanPopup(r),oe.hashContainsKnownProperties(u)?(n.logger.verbose("PopupHandler.monitorPopupForHash - hash contains known properties, returning."),o(u)):(n.logger.error("PopupHandler.monitorPopupForHash - found hash in url but it does not contain known properties. Check that your router is not changing the hash prematurely."),n.logger.errorPii("PopupHandler.monitorPopupForHash - hash found: "+u),i(N.createHashDoesNotContainKnownPropertiesError()))):s>a&&(n.logger.error("PopupHandler.monitorPopupForHash - unable to find hash in url, timing out"),clearInterval(c),i(N.createMonitorPopupTimeoutError())))},n.config.system.pollIntervalMilliseconds)})},e.prototype.waitForLogoutPopup=function(r){var n=this;return new Promise(function(o){n.logger.verbose("PopupHandler.waitForLogoutPopup - polling started");var i=setInterval(function(){r.closed&&(n.logger.error("PopupHandler.waitForLogoutPopup - window closed"),n.cleanPopup(),clearInterval(i),o());var a=_.EMPTY_STRING;try{a=r.location.href}catch{}x.isEmpty(a)||a==="about:blank"||(n.logger.verbose("PopupHandler.waitForLogoutPopup - popup window is on same origin as caller, closing."),clearInterval(i),n.cleanPopup(r),o())},n.config.system.pollIntervalMilliseconds)})},e.prototype.openPopup=function(r,n){try{var o=void 0;if(n.popup?(o=n.popup,this.logger.verbosePii("Navigating popup window to: "+r),o.location.assign(r)):typeof n.popup>"u"&&(this.logger.verbosePii("Opening popup window to: "+r),o=this.openSizedPopup(r,n.popupName,n.popupWindowAttributes)),!o)throw N.createEmptyWindowCreatedError();return o.focus&&o.focus(),this.currentWindow=o,window.addEventListener("beforeunload",this.unloadWindow),o}catch(i){throw this.logger.error("error opening popup "+i.message),this.browserStorage.setInteractionInProgress(!1),N.createPopupWindowError(i.toString())}},e.prototype.openSizedPopup=function(r,n,o){var i,a,s,c,l=window.screenLeft?window.screenLeft:window.screenX,u=window.screenTop?window.screenTop:window.screenY,h=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,d=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,f=(i=o.popupSize)===null||i===void 0?void 0:i.width,m=(a=o.popupSize)===null||a===void 0?void 0:a.height,v=(s=o.popupPosition)===null||s===void 0?void 0:s.top,E=(c=o.popupPosition)===null||c===void 0?void 0:c.left;return(!f||f<0||f>h)&&(this.logger.verbose("Default popup window width used. Window width not configured or invalid."),f=cr.POPUP_WIDTH),(!m||m<0||m>d)&&(this.logger.verbose("Default popup window height used. Window height not configured or invalid."),m=cr.POPUP_HEIGHT),(!v||v<0||v>d)&&(this.logger.verbose("Default popup window top position used. Window top not configured or invalid."),v=Math.max(0,d/2-cr.POPUP_HEIGHT/2+u)),(!E||E<0||E>h)&&(this.logger.verbose("Default popup window left position used. Window left not configured or invalid."),E=Math.max(0,h/2-cr.POPUP_WIDTH/2+l)),window.open(r,n,"width="+f+", height="+m+", top="+v+", left="+E+", scrollbars=yes")},e.prototype.unloadWindow=function(r){this.browserStorage.cleanRequestByInteractionType(F.Popup),this.currentWindow&&this.currentWindow.close(),r.preventDefault()},e.prototype.cleanPopup=function(r){r&&r.close(),window.removeEventListener("beforeunload",this.unloadWindow),this.browserStorage.setInteractionInProgress(!1)},e.prototype.generatePopupName=function(r,n){return cr.POPUP_NAME_PREFIX+"."+this.config.auth.clientId+"."+r.join("-")+"."+n+"."+this.correlationId},e.prototype.generateLogoutPopupName=function(r){var n=r.account&&r.account.homeAccountId;return cr.POPUP_NAME_PREFIX+"."+this.config.auth.clientId+"."+n+"."+this.correlationId},e}(Ri);/*! @azure/msal-browser v2.31.0 2022-11-07 */var iS=function(){function t(){}return t.prototype.navigateInternal=function(e,r){return t.defaultNavigateWindow(e,r)},t.prototype.navigateExternal=function(e,r){return t.defaultNavigateWindow(e,r)},t.defaultNavigateWindow=function(e,r){return r.noHistory?window.location.replace(e):window.location.assign(e),new Promise(function(n){setTimeout(function(){n(!0)},r.timeout)})},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var aS=6e4,Pd=6e3,sS=3e4,cS=2e3;function lS(t,e){var r=t.auth,n=t.cache,o=t.system,i=t.telemetry,a={clientId:_.EMPTY_STRING,authority:""+_.DEFAULT_AUTHORITY,knownAuthorities:[],cloudDiscoveryMetadata:_.EMPTY_STRING,authorityMetadata:_.EMPTY_STRING,redirectUri:_.EMPTY_STRING,postLogoutRedirectUri:_.EMPTY_STRING,navigateToLoginRequestUrl:!0,clientCapabilities:[],protocolMode:qc.AAD,azureCloudOptions:{azureCloudInstance:$a.None,tenant:_.EMPTY_STRING},skipAuthorityMetadataCache:!1},s={cacheLocation:pt.SessionStorage,storeAuthStateInCookie:!1,secureCookies:!1},c={loggerCallback:function(){},logLevel:xe.Info,piiLoggingEnabled:!1},l=$($({},Ty),{loggerOptions:c,networkClient:e?Oe.getBrowserNetworkClient():VC,navigationClient:new iS,loadFrameTimeout:0,windowHashTimeout:(o==null?void 0:o.loadFrameTimeout)||aS,iframeHashTimeout:(o==null?void 0:o.loadFrameTimeout)||Pd,navigateFrameWait:e&&Oe.detectIEOrEdge()?500:0,redirectNavigationTimeout:sS,asyncPopups:!1,allowRedirectInIframe:!1,allowNativeBroker:!1,nativeBrokerHandshakeTimeout:(o==null?void 0:o.nativeBrokerHandshakeTimeout)||cS,pollIntervalMilliseconds:cr.DEFAULT_POLL_INTERVAL_MS,cryptoOptions:{useMsrCrypto:!1,entropy:void 0}}),u={application:{appName:_.EMPTY_STRING,appVersion:_.EMPTY_STRING}},h={auth:$($({},a),r),cache:$($({},s),n),system:$($({},l),o),telemetry:$($({},u),i)};return h}/*! @azure/msal-browser v2.31.0 2022-11-07 */var Oy=function(t){ot(e,t);function e(r,n,o,i,a){var s=t.call(this,r,n,o,i)||this;return s.navigateFrameWait=a.navigateFrameWait,s.pollIntervalMilliseconds=a.pollIntervalMilliseconds,s}return e.prototype.initiateAuthRequest=function(r){return S(this,void 0,void 0,function(){var n;return T(this,function(o){switch(o.label){case 0:if(x.isEmpty(r))throw this.logger.info("Navigate url is empty"),N.createEmptyNavigationUriError();return this.navigateFrameWait?[4,this.loadFrame(r)]:[3,2];case 1:return n=o.sent(),[3,3];case 2:n=this.loadFrameSync(r),o.label=3;case 3:return[2,n]}})})},e.prototype.monitorIframeForHash=function(r,n){var o=this;return new Promise(function(i,a){n<Pd&&o.logger.warning("system.loadFrameTimeout or system.iframeHashTimeout set to lower ("+n+"ms) than the default ("+Pd+"ms). This may result in timeouts.");var s=window.performance.now(),c=s+n,l=setInterval(function(){if(window.performance.now()>c){o.removeHiddenIframe(r),clearInterval(l),a(N.createMonitorIframeTimeoutError());return}var u=_.EMPTY_STRING,h=r.contentWindow;try{u=h?h.location.href:_.EMPTY_STRING}catch{}if(!x.isEmpty(u)){var d=h?h.location.hash:_.EMPTY_STRING;if(oe.hashContainsKnownProperties(d)){o.removeHiddenIframe(r),clearInterval(l),i(d);return}}},o.pollIntervalMilliseconds)})},e.prototype.loadFrame=function(r){var n=this;return new Promise(function(o,i){var a=n.createHiddenIframe();setTimeout(function(){if(!a){i("Unable to load iframe");return}a.src=r,o(a)},n.navigateFrameWait)})},e.prototype.loadFrameSync=function(r){var n=this.createHiddenIframe();return n.src=r,n},e.prototype.createHiddenIframe=function(){var r=document.createElement("iframe");return r.style.visibility="hidden",r.style.position="absolute",r.style.width=r.style.height="0",r.style.border="0",r.setAttribute("sandbox","allow-scripts allow-same-origin allow-forms"),document.getElementsByTagName("body")[0].appendChild(r),r},e.prototype.removeHiddenIframe=function(r){document.body===r.parentNode&&document.body.removeChild(r)},e}(qh);/*! @azure/msal-browser v2.31.0 2022-11-07 */var uS=function(t){ot(e,t);function e(r,n,o,i,a,s,c,l,u,h,d){var f=t.call(this,r,n,o,i,a,s,l,h,d)||this;return f.apiId=c,f.nativeStorage=u,f}return e.prototype.acquireToken=function(r){return S(this,void 0,void 0,function(){var n,o,i,a,s;return T(this,function(c){switch(c.label){case 0:if(this.logger.verbose("acquireTokenByIframe called"),n=this.performanceClient.startMeasurement(je.SilentIframeClientAcquireToken,r.correlationId),x.isEmpty(r.loginHint)&&x.isEmpty(r.sid)&&(!r.account||x.isEmpty(r.account.username))&&this.logger.warning("No user hint provided. The authorization server may need more information to complete this request."),r.prompt&&r.prompt!==mt.NONE&&r.prompt!==mt.NO_SESSION)throw n.endMeasurement({success:!1}),N.createSilentPromptValueError(r.prompt);return[4,this.initializeAuthorizationRequest($($({},r),{prompt:r.prompt||mt.NONE}),F.Silent)];case 1:o=c.sent(),this.browserStorage.updateCacheEntries(o.state,o.nonce,o.authority,o.loginHint||_.EMPTY_STRING,o.account||null),i=this.initializeServerTelemetryManager(this.apiId),c.label=2;case 2:return c.trys.push([2,5,,6]),[4,this.createAuthCodeClient(i,o.authority,o.azureCloudOptions)];case 3:return a=c.sent(),this.logger.verbose("Auth code client created"),[4,this.silentTokenHelper(a,o).then(function(l){return n.endMeasurement({success:!0,fromCache:!1,requestId:l.requestId}),l})];case 4:return[2,c.sent()];case 5:throw s=c.sent(),s instanceof z&&s.setCorrelationId(this.correlationId),i.cacheFailedRequest(s),this.browserStorage.cleanRequestByState(o.state),n.endMeasurement({errorCode:s instanceof z&&s.errorCode||void 0,subErrorCode:s instanceof z&&s.subError||void 0,success:!1}),s;case 6:return[2]}})})},e.prototype.logout=function(){return Promise.reject(N.createSilentLogoutUnsupportedError())},e.prototype.silentTokenHelper=function(r,n){return S(this,void 0,void 0,function(){var o,i,a,s,c,l,u,h,d,f=this;return T(this,function(m){switch(m.label){case 0:return[4,this.initializeAuthorizationCodeRequest(n)];case 1:return o=m.sent(),[4,r.getAuthCodeUrl($($({},n),{nativeBroker:ro.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,n.authenticationScheme)}))];case 2:return i=m.sent(),a=new Oy(r,this.browserStorage,o,this.logger,this.config.system),[4,a.initiateAuthRequest(i)];case 3:return s=m.sent(),[4,a.monitorIframeForHash(s,this.config.system.iframeHashTimeout)];case 4:if(c=m.sent(),l=oe.getDeserializedHash(c),u=this.validateAndExtractStateFromHash(l,F.Silent,o.correlationId),l.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),!this.nativeMessageHandler)throw N.createNativeConnectionNotEstablishedError();return h=new si(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.apiId,this.performanceClient,this.nativeMessageHandler,l.accountId,this.browserStorage,this.correlationId),d=Wr.parseRequestState(this.browserCrypto,u).userRequestState,[2,h.acquireToken($($({},n),{state:d,prompt:n.prompt||mt.NONE})).finally(function(){f.browserStorage.cleanRequestByState(u)})]}return[2,a.handleCodeResponseFromHash(c,u,r.authority,this.networkClient)]}})})},e}(Ri);/*! @azure/msal-browser v2.31.0 2022-11-07 */var dS=function(t){ot(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.acquireToken=function(r){return S(this,void 0,void 0,function(){var n,o,i,a,s,c=this;return T(this,function(l){switch(l.label){case 0:return o=[$({},r)],[4,this.initializeBaseRequest(r)];case 1:return n=$.apply(void 0,o.concat([l.sent()])),i=this.performanceClient.startMeasurement(je.SilentRefreshClientAcquireToken,n.correlationId),a=this.initializeServerTelemetryManager(ye.acquireTokenSilent_silentFlow),[4,this.createRefreshTokenClient(a,n.authority,n.azureCloudOptions)];case 2:return s=l.sent(),this.logger.verbose("Refresh token client created"),[2,s.acquireTokenByRefreshToken(n).then(function(u){return i.endMeasurement({success:!0,fromCache:u.fromCache,requestId:u.requestId}),u}).catch(function(u){throw u instanceof z&&u.setCorrelationId(c.correlationId),a.cacheFailedRequest(u),i.endMeasurement({errorCode:u.errorCode,subErrorCode:u.subError,success:!1}),u})]}})})},e.prototype.logout=function(){return Promise.reject(N.createSilentLogoutUnsupportedError())},e.prototype.createRefreshTokenClient=function(r,n,o){return S(this,void 0,void 0,function(){var i;return T(this,function(a){switch(a.label){case 0:return[4,this.getClientConfiguration(r,n,o)];case 1:return i=a.sent(),[2,new Iy(i,this.performanceClient)]}})})},e}(Ri);/*! @azure/msal-browser v2.31.0 2022-11-07 */var hS=function(){function t(e,r){this.eventCallbacks=new Map,this.logger=e,this.browserCrypto=r,this.listeningToStorageEvents=!1,this.handleAccountCacheChange=this.handleAccountCacheChange.bind(this)}return t.prototype.addEventCallback=function(e){if(typeof window<"u"){var r=this.browserCrypto.createNewGuid();return this.eventCallbacks.set(r,e),this.logger.verbose("Event callback registered with id: "+r),r}return null},t.prototype.removeEventCallback=function(e){this.eventCallbacks.delete(e),this.logger.verbose("Event callback "+e+" removed.")},t.prototype.enableAccountStorageEvents=function(){typeof window>"u"||(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)))},t.prototype.disableAccountStorageEvents=function(){typeof window>"u"||(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."))},t.prototype.emitEvent=function(e,r,n,o){var i=this;if(typeof window<"u"){var a={eventType:e,interactionType:r||null,payload:n||null,error:o||null,timestamp:Date.now()};this.logger.info("Emitting event: "+e),this.eventCallbacks.forEach(function(s,c){i.logger.verbose("Emitting event to callback "+c+": "+e),s.apply(null,[a])})}},t.prototype.handleAccountCacheChange=function(e){try{var r=e.newValue||e.oldValue;if(!r)return;var n=JSON.parse(r);if(typeof n!="object"||!tt.isAccountEntity(n))return;var o=or.toObject(new tt,n),i=o.getAccountInfo();!e.oldValue&&e.newValue?(this.logger.info("Account was added to cache in a different window"),this.emitEvent(q.ACCOUNT_ADDED,void 0,i)):!e.newValue&&e.oldValue&&(this.logger.info("Account was removed from cache in a different window"),this.emitEvent(q.ACCOUNT_REMOVED,void 0,i))}catch{return}},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var ut=function(){function t(){}return t.decimalToHex=function(e){for(var r=e.toString(16);r.length<2;)r="0"+r;return r},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var xy=function(){function t(e){this.cryptoObj=e}return t.prototype.generateGuid=function(){try{var e=new Uint8Array(16);return this.cryptoObj.getRandomValues(e),e[6]|=64,e[6]&=79,e[8]|=128,e[8]&=191,ut.decimalToHex(e[0])+ut.decimalToHex(e[1])+ut.decimalToHex(e[2])+ut.decimalToHex(e[3])+"-"+ut.decimalToHex(e[4])+ut.decimalToHex(e[5])+"-"+ut.decimalToHex(e[6])+ut.decimalToHex(e[7])+"-"+ut.decimalToHex(e[8])+ut.decimalToHex(e[9])+"-"+ut.decimalToHex(e[10])+ut.decimalToHex(e[11])+ut.decimalToHex(e[12])+ut.decimalToHex(e[13])+ut.decimalToHex(e[14])+ut.decimalToHex(e[15])}catch{for(var r="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx",n="0123456789abcdef",o=0,i=_.EMPTY_STRING,a=0;a<36;a++)r[a]!=="-"&&r[a]!=="4"&&(o=Math.random()*16|0),r[a]==="x"?i+=n[o]:r[a]==="y"?(o&=3,o|=8,i+=n[o]):i+=r[a];return i}},t.prototype.isGuid=function(e){var r=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;return r.test(e)},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var Yr=function(){function t(){}return t.stringToUtf8Arr=function(e){for(var r,n=0,o=e.length,i=0;i<o;i++)r=e.charCodeAt(i),n+=r<128?1:r<2048?2:r<65536?3:r<2097152?4:r<67108864?5:6;for(var a=new Uint8Array(n),s=0,c=0;s<n;c++)r=e.charCodeAt(c),r<128?a[s++]=r:r<2048?(a[s++]=192+(r>>>6),a[s++]=128+(r&63)):r<65536?(a[s++]=224+(r>>>12),a[s++]=128+(r>>>6&63),a[s++]=128+(r&63)):r<2097152?(a[s++]=240+(r>>>18),a[s++]=128+(r>>>12&63),a[s++]=128+(r>>>6&63),a[s++]=128+(r&63)):r<67108864?(a[s++]=248+(r>>>24),a[s++]=128+(r>>>18&63),a[s++]=128+(r>>>12&63),a[s++]=128+(r>>>6&63),a[s++]=128+(r&63)):(a[s++]=252+(r>>>30),a[s++]=128+(r>>>24&63),a[s++]=128+(r>>>18&63),a[s++]=128+(r>>>12&63),a[s++]=128+(r>>>6&63),a[s++]=128+(r&63));return a},t.stringToArrayBuffer=function(e){for(var r=new ArrayBuffer(e.length),n=new Uint8Array(r),o=0;o<e.length;o++)n[o]=e.charCodeAt(o);return r},t.utf8ArrToString=function(e){for(var r=_.EMPTY_STRING,n=void 0,o=e.length,i=0;i<o;i++)n=e[i],r+=String.fromCharCode(n>251&&n<254&&i+5<o?(n-252)*1073741824+(e[++i]-128<<24)+(e[++i]-128<<18)+(e[++i]-128<<12)+(e[++i]-128<<6)+e[++i]-128:n>247&&n<252&&i+4<o?(n-248<<24)+(e[++i]-128<<18)+(e[++i]-128<<12)+(e[++i]-128<<6)+e[++i]-128:n>239&&n<248&&i+3<o?(n-240<<18)+(e[++i]-128<<12)+(e[++i]-128<<6)+e[++i]-128:n>223&&n<240&&i+2<o?(n-224<<12)+(e[++i]-128<<6)+e[++i]-128:n>191&&n<224&&i+1<o?(n-192<<6)+e[++i]-128:n);return r},t.getSortedObjectString=function(e){return JSON.stringify(e,Object.keys(e).sort())},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var My=function(){function t(){}return t.prototype.urlEncode=function(e){return encodeURIComponent(this.encode(e).replace(/=/g,_.EMPTY_STRING).replace(/\+/g,"-").replace(/\//g,"_"))},t.prototype.urlEncodeArr=function(e){return this.base64EncArr(e).replace(/=/g,_.EMPTY_STRING).replace(/\+/g,"-").replace(/\//g,"_")},t.prototype.encode=function(e){var r=Yr.stringToUtf8Arr(e);return this.base64EncArr(r)},t.prototype.base64EncArr=function(e){for(var r=(3-e.length%3)%3,n=_.EMPTY_STRING,o=void 0,i=e.length,a=0,s=0;s<i;s++)o=s%3,a|=e[s]<<(16>>>o&24),(o===2||e.length-s===1)&&(n+=String.fromCharCode(this.uint6ToB64(a>>>18&63),this.uint6ToB64(a>>>12&63),this.uint6ToB64(a>>>6&63),this.uint6ToB64(a&63)),a=0);return r===0?n:n.substring(0,n.length-r)+(r===1?"=":"==")},t.prototype.uint6ToB64=function(e){return e<26?e+65:e<52?e+71:e<62?e-4:e===62?43:e===63?47:65},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var fS=function(){function t(){}return t.prototype.decode=function(e){var r=e.replace(/-/g,"+").replace(/_/g,"/");switch(r.length%4){case 0:break;case 2:r+="==";break;case 3:r+="=";break;default:throw new Error("Invalid base64 string")}var n=this.base64DecToArr(r);return Yr.utf8ArrToString(n)},t.prototype.base64DecToArr=function(e,r){for(var n=e.replace(/[^A-Za-z0-9\+\/]/g,_.EMPTY_STRING),o=n.length,i=r?Math.ceil((o*3+1>>>2)/r)*r:o*3+1>>>2,a=new Uint8Array(i),s=void 0,c=void 0,l=0,u=0,h=0;h<o;h++)if(c=h&3,l|=this.b64ToUint6(n.charCodeAt(h))<<18-6*c,c===3||o-h===1){for(s=0;s<3&&u<i;s++,u++)a[u]=l>>>(16>>>s&24)&255;l=0}return a},t.prototype.b64ToUint6=function(e){return e>64&&e<91?e-65:e>96&&e<123?e-71:e>47&&e<58?e+4:e===43?62:e===47?63:0},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var pS=32,gS=function(){function t(e){this.base64Encode=new My,this.cryptoObj=e}return t.prototype.generateCodes=function(){return S(this,void 0,void 0,function(){var e,r;return T(this,function(n){switch(n.label){case 0:return e=this.generateCodeVerifier(),[4,this.generateCodeChallengeFromVerifier(e)];case 1:return r=n.sent(),[2,{verifier:e,challenge:r}]}})})},t.prototype.generateCodeVerifier=function(){try{var e=new Uint8Array(pS);this.cryptoObj.getRandomValues(e);var r=this.base64Encode.urlEncodeArr(e);return r}catch(n){throw N.createPkceNotGeneratedError(n)}},t.prototype.generateCodeChallengeFromVerifier=function(e){return S(this,void 0,void 0,function(){var r,n;return T(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,this.cryptoObj.sha256Digest(e)];case 1:return r=o.sent(),[2,this.base64Encode.urlEncodeArr(new Uint8Array(r))];case 2:throw n=o.sent(),N.createPkceNotGeneratedError(n);case 3:return[2]}})})},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var mS=function(){function t(){}return t.prototype.getRandomValues=function(e){return window.crypto.getRandomValues(e)},t.prototype.generateKey=function(e,r,n){return S(this,void 0,void 0,function(){return T(this,function(o){return[2,window.crypto.subtle.generateKey(e,r,n)]})})},t.prototype.exportKey=function(e){return S(this,void 0,void 0,function(){return T(this,function(r){return[2,window.crypto.subtle.exportKey(yi,e)]})})},t.prototype.importKey=function(e,r,n,o){return S(this,void 0,void 0,function(){return T(this,function(i){return[2,window.crypto.subtle.importKey(yi,e,r,n,o)]})})},t.prototype.sign=function(e,r,n){return S(this,void 0,void 0,function(){return T(this,function(o){return[2,window.crypto.subtle.sign(e,r,n)]})})},t.prototype.digest=function(e,r){return S(this,void 0,void 0,function(){return T(this,function(n){return[2,window.crypto.subtle.digest(e,r)]})})},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var vS=function(){function t(){}return t.prototype.initPrng=function(e){return window.msrCrypto.initPrng(zh(e))},t.prototype.getRandomValues=function(e){return window.msrCrypto.getRandomValues(e)},t.prototype.generateKey=function(e,r,n){return S(this,void 0,void 0,function(){return T(this,function(o){return[2,window.msrCrypto.subtle.generateKey(e,r,n)]})})},t.prototype.exportKey=function(e){return S(this,void 0,void 0,function(){return T(this,function(r){return[2,window.msrCrypto.subtle.exportKey(yi,e)]})})},t.prototype.importKey=function(e,r,n,o){return S(this,void 0,void 0,function(){return T(this,function(i){return[2,window.msrCrypto.subtle.importKey(yi,e,r,n,o)]})})},t.prototype.sign=function(e,r,n){return S(this,void 0,void 0,function(){return T(this,function(o){return[2,window.msrCrypto.subtle.sign(e,r,n)]})})},t.prototype.digest=function(e,r){return S(this,void 0,void 0,function(){return T(this,function(n){return[2,window.msrCrypto.subtle.digest(e,r)]})})},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var yS=function(){function t(){}return t.prototype.getRandomValues=function(e){return window.msCrypto.getRandomValues(e)},t.prototype.generateKey=function(e,r,n){return S(this,void 0,void 0,function(){return T(this,function(o){return[2,new Promise(function(i,a){var s=window.msCrypto.subtle.generateKey(e,r,n);s.addEventListener("complete",function(c){i(c.target.result)}),s.addEventListener("error",function(c){a(c)})})]})})},t.prototype.exportKey=function(e){return S(this,void 0,void 0,function(){return T(this,function(r){return[2,new Promise(function(n,o){var i=window.msCrypto.subtle.exportKey(yi,e);i.addEventListener("complete",function(a){var s=a.target.result,c=Yr.utf8ArrToString(new Uint8Array(s)).replace(/\r/g,_.EMPTY_STRING).replace(/\n/g,_.EMPTY_STRING).replace(/\t/g,_.EMPTY_STRING).split(" ").join(_.EMPTY_STRING).replace("\0",_.EMPTY_STRING);try{n(JSON.parse(c))}catch(l){o(l)}}),i.addEventListener("error",function(a){o(a)})})]})})},t.prototype.importKey=function(e,r,n,o){return S(this,void 0,void 0,function(){var i,a;return T(this,function(s){return i=Yr.getSortedObjectString(e),a=Yr.stringToArrayBuffer(i),[2,new Promise(function(c,l){var u=window.msCrypto.subtle.importKey(yi,a,r,n,o);u.addEventListener("complete",function(h){c(h.target.result)}),u.addEventListener("error",function(h){l(h)})})]})})},t.prototype.sign=function(e,r,n){return S(this,void 0,void 0,function(){return T(this,function(o){return[2,new Promise(function(i,a){var s=window.msCrypto.subtle.sign(e,r,n);s.addEventListener("complete",function(c){i(c.target.result)}),s.addEventListener("error",function(c){a(c)})})]})})},t.prototype.digest=function(e,r){return S(this,void 0,void 0,function(){return T(this,function(n){return[2,new Promise(function(o,i){var a=window.msCrypto.subtle.digest(e,r.buffer);a.addEventListener("complete",function(s){o(s.target.result)}),a.addEventListener("error",function(s){i(s)})})]})})},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var _S="RSASSA-PKCS1-v1_5",Dp="SHA-256",wS=2048,ES=new Uint8Array([1,0,1]),Uy=function(){function t(e,r){var n,o;if(this.logger=e,this.cryptoOptions=r,this.hasBrowserCrypto())this.logger.verbose("BrowserCrypto: modern crypto interface available"),this.subtleCrypto=new mS;else if(this.hasIECrypto())this.logger.verbose("BrowserCrypto: MS crypto interface available"),this.subtleCrypto=new yS;else if(this.hasMsrCrypto()&&((n=this.cryptoOptions)===null||n===void 0?void 0:n.useMsrCrypto))this.logger.verbose("BrowserCrypto: MSR crypto interface available"),this.subtleCrypto=new vS;else throw this.hasMsrCrypto()&&this.logger.info("BrowserCrypto: MSR Crypto interface available but system.cryptoOptions.useMsrCrypto not enabled"),this.logger.error("BrowserCrypto: No crypto interfaces available."),N.createCryptoNotAvailableError("Browser crypto, msCrypto, or msrCrypto interfaces not available.");if(this.subtleCrypto.initPrng){if(this.logger.verbose("BrowserCrypto: Interface requires entropy"),!(!((o=this.cryptoOptions)===null||o===void 0)&&o.entropy))throw this.logger.error("BrowserCrypto: Interface requires entropy but none provided."),Wc.createEntropyNotProvided();this.logger.verbose("BrowserCrypto: Entropy provided"),this.subtleCrypto.initPrng(this.cryptoOptions.entropy)}this.keygenAlgorithmOptions={name:_S,hash:Dp,modulusLength:wS,publicExponent:ES}}return t.prototype.hasIECrypto=function(){return"msCrypto"in window},t.prototype.hasBrowserCrypto=function(){return"crypto"in window},t.prototype.hasMsrCrypto=function(){return"msrCrypto"in window},t.prototype.sha256Digest=function(e){return S(this,void 0,void 0,function(){var r;return T(this,function(n){return r=Yr.stringToUtf8Arr(e),[2,this.subtleCrypto.digest({name:Dp},r)]})})},t.prototype.getRandomValues=function(e){return this.subtleCrypto.getRandomValues(e)},t.prototype.generateKeyPair=function(e,r){return S(this,void 0,void 0,function(){return T(this,function(n){return[2,this.subtleCrypto.generateKey(this.keygenAlgorithmOptions,e,r)]})})},t.prototype.exportJwk=function(e){return S(this,void 0,void 0,function(){return T(this,function(r){return[2,this.subtleCrypto.exportKey(e)]})})},t.prototype.importJwk=function(e,r,n){return S(this,void 0,void 0,function(){return T(this,function(o){return[2,this.subtleCrypto.importKey(e,this.keygenAlgorithmOptions,r,n)]})})},t.prototype.sign=function(e,r){return S(this,void 0,void 0,function(){return T(this,function(n){return[2,this.subtleCrypto.sign(this.keygenAlgorithmOptions,e,r)]})})},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var CS=function(){function t(){this.dbName=kd,this.version=XC,this.tableName=ZC,this.dbOpen=!1}return t.prototype.open=function(){return S(this,void 0,void 0,function(){var e=this;return T(this,function(r){return[2,new Promise(function(n,o){var i=window.indexedDB.open(e.dbName,e.version);i.addEventListener("upgradeneeded",function(a){var s=a;s.target.result.createObjectStore(e.tableName)}),i.addEventListener("success",function(a){var s=a;e.db=s.target.result,e.dbOpen=!0,n()}),i.addEventListener("error",function(){return o(N.createDatabaseUnavailableError())})})]})})},t.prototype.closeConnection=function(){var e=this.db;e&&this.dbOpen&&(e.close(),this.dbOpen=!1)},t.prototype.validateDbIsOpen=function(){return S(this,void 0,void 0,function(){return T(this,function(e){switch(e.label){case 0:return this.dbOpen?[3,2]:[4,this.open()];case 1:return[2,e.sent()];case 2:return[2]}})})},t.prototype.getItem=function(e){return S(this,void 0,void 0,function(){var r=this;return T(this,function(n){switch(n.label){case 0:return[4,this.validateDbIsOpen()];case 1:return n.sent(),[2,new Promise(function(o,i){if(!r.db)return i(N.createDatabaseNotOpenError());var a=r.db.transaction([r.tableName],"readonly"),s=a.objectStore(r.tableName),c=s.get(e);c.addEventListener("success",function(l){var u=l;r.closeConnection(),o(u.target.result)}),c.addEventListener("error",function(l){r.closeConnection(),i(l)})})]}})})},t.prototype.setItem=function(e,r){return S(this,void 0,void 0,function(){var n=this;return T(this,function(o){switch(o.label){case 0:return[4,this.validateDbIsOpen()];case 1:return o.sent(),[2,new Promise(function(i,a){if(!n.db)return a(N.createDatabaseNotOpenError());var s=n.db.transaction([n.tableName],"readwrite"),c=s.objectStore(n.tableName),l=c.put(r,e);l.addEventListener("success",function(){n.closeConnection(),i()}),l.addEventListener("error",function(u){n.closeConnection(),a(u)})})]}})})},t.prototype.removeItem=function(e){return S(this,void 0,void 0,function(){var r=this;return T(this,function(n){switch(n.label){case 0:return[4,this.validateDbIsOpen()];case 1:return n.sent(),[2,new Promise(function(o,i){if(!r.db)return i(N.createDatabaseNotOpenError());var a=r.db.transaction([r.tableName],"readwrite"),s=a.objectStore(r.tableName),c=s.delete(e);c.addEventListener("success",function(){r.closeConnection(),o()}),c.addEventListener("error",function(l){r.closeConnection(),i(l)})})]}})})},t.prototype.getKeys=function(){return S(this,void 0,void 0,function(){var e=this;return T(this,function(r){switch(r.label){case 0:return[4,this.validateDbIsOpen()];case 1:return r.sent(),[2,new Promise(function(n,o){if(!e.db)return o(N.createDatabaseNotOpenError());var i=e.db.transaction([e.tableName],"readonly"),a=i.objectStore(e.tableName),s=a.getAllKeys();s.addEventListener("success",function(c){var l=c;e.closeConnection(),n(l.target.result)}),s.addEventListener("error",function(c){e.closeConnection(),o(c)})})]}})})},t.prototype.containsKey=function(e){return S(this,void 0,void 0,function(){var r=this;return T(this,function(n){switch(n.label){case 0:return[4,this.validateDbIsOpen()];case 1:return n.sent(),[2,new Promise(function(o,i){if(!r.db)return i(N.createDatabaseNotOpenError());var a=r.db.transaction([r.tableName],"readonly"),s=a.objectStore(r.tableName),c=s.count(e);c.addEventListener("success",function(l){var u=l;r.closeConnection(),o(u.target.result===1)}),c.addEventListener("error",function(l){r.closeConnection(),i(l)})})]}})})},t.prototype.deleteDatabase=function(){return S(this,void 0,void 0,function(){return T(this,function(e){return this.db&&this.dbOpen&&this.closeConnection(),[2,new Promise(function(r,n){var o=window.indexedDB.deleteDatabase(kd);o.addEventListener("success",function(){return r(!0)}),o.addEventListener("blocked",function(){return r(!0)}),o.addEventListener("error",function(){return n(!1)})})]})})},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var Hp=function(){function t(e,r){this.inMemoryCache=new Ad,this.indexedDBCache=new CS,this.logger=e,this.storeName=r}return t.prototype.handleDatabaseAccessError=function(e){if(e instanceof N&&e.errorCode===I.databaseUnavailable.code)this.logger.error("Could not access persistent storage. This may be caused by browser privacy features which block persistent storage in third-party contexts.");else throw e},t.prototype.getItem=function(e){return S(this,void 0,void 0,function(){var r,n;return T(this,function(o){switch(o.label){case 0:if(r=this.inMemoryCache.getItem(e),r)return[3,4];o.label=1;case 1:return o.trys.push([1,3,,4]),this.logger.verbose("Queried item not found in in-memory cache, now querying persistent storage."),[4,this.indexedDBCache.getItem(e)];case 2:return[2,o.sent()];case 3:return n=o.sent(),this.handleDatabaseAccessError(n),[3,4];case 4:return[2,r]}})})},t.prototype.setItem=function(e,r){return S(this,void 0,void 0,function(){var n;return T(this,function(o){switch(o.label){case 0:this.inMemoryCache.setItem(e,r),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.indexedDBCache.setItem(e,r)];case 2:return o.sent(),[3,4];case 3:return n=o.sent(),this.handleDatabaseAccessError(n),[3,4];case 4:return[2]}})})},t.prototype.removeItem=function(e){return S(this,void 0,void 0,function(){var r;return T(this,function(n){switch(n.label){case 0:this.inMemoryCache.removeItem(e),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.indexedDBCache.removeItem(e)];case 2:return n.sent(),[3,4];case 3:return r=n.sent(),this.handleDatabaseAccessError(r),[3,4];case 4:return[2]}})})},t.prototype.getKeys=function(){return S(this,void 0,void 0,function(){var e,r;return T(this,function(n){switch(n.label){case 0:if(e=this.inMemoryCache.getKeys(),e.length!==0)return[3,4];n.label=1;case 1:return n.trys.push([1,3,,4]),this.logger.verbose("In-memory cache is empty, now querying persistent storage."),[4,this.indexedDBCache.getKeys()];case 2:return[2,n.sent()];case 3:return r=n.sent(),this.handleDatabaseAccessError(r),[3,4];case 4:return[2,e]}})})},t.prototype.containsKey=function(e){return S(this,void 0,void 0,function(){var r,n;return T(this,function(o){switch(o.label){case 0:if(r=this.inMemoryCache.containsKey(e),r)return[3,4];o.label=1;case 1:return o.trys.push([1,3,,4]),this.logger.verbose("Key not found in in-memory cache, now querying persistent storage."),[4,this.indexedDBCache.containsKey(e)];case 2:return[2,o.sent()];case 3:return n=o.sent(),this.handleDatabaseAccessError(n),[3,4];case 4:return[2,r]}})})},t.prototype.clearInMemory=function(){this.logger.verbose("Deleting in-memory keystore "+this.storeName),this.inMemoryCache.clear(),this.logger.verbose("In-memory keystore "+this.storeName+" deleted")},t.prototype.clearPersistent=function(){return S(this,void 0,void 0,function(){var e,r;return T(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),this.logger.verbose("Deleting persistent keystore"),[4,this.indexedDBCache.deleteDatabase()];case 1:return e=n.sent(),e&&this.logger.verbose("Persistent keystore deleted"),[2,e];case 2:return r=n.sent(),this.handleDatabaseAccessError(r),[2,!1];case 3:return[2]}})})},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var Yc;(function(t){t.asymmetricKeys="asymmetricKeys",t.symmetricKeys="symmetricKeys"})(Yc||(Yc={}));var SS=function(){function t(e){this.logger=e,this.asymmetricKeys=new Hp(this.logger,Yc.asymmetricKeys),this.symmetricKeys=new Hp(this.logger,Yc.symmetricKeys)}return t.prototype.clear=function(){return S(this,void 0,void 0,function(){var e;return T(this,function(r){switch(r.label){case 0:this.asymmetricKeys.clearInMemory(),this.symmetricKeys.clearInMemory(),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.asymmetricKeys.clearPersistent()];case 2:return r.sent(),[2,!0];case 3:return e=r.sent(),e instanceof Error?this.logger.error("Clearing keystore failed with error: "+e.message):this.logger.error("Clearing keystore failed with unknown error"),[2,!1];case 4:return[2]}})})},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var TS=function(){function t(e,r,n){this.logger=e,this.browserCrypto=new Uy(this.logger,n),this.b64Encode=new My,this.b64Decode=new fS,this.guidGenerator=new xy(this.browserCrypto),this.pkceGenerator=new gS(this.browserCrypto),this.cache=new SS(this.logger),this.performanceClient=r}return t.prototype.createNewGuid=function(){return this.guidGenerator.generateGuid()},t.prototype.base64Encode=function(e){return this.b64Encode.encode(e)},t.prototype.base64Decode=function(e){return this.b64Decode.decode(e)},t.prototype.generatePkceCodes=function(){return S(this,void 0,void 0,function(){return T(this,function(e){return[2,this.pkceGenerator.generateCodes()]})})},t.prototype.getPublicKeyThumbprint=function(e){var r;return S(this,void 0,void 0,function(){var n,o,i,a,s,c,l,u;return T(this,function(h){switch(h.label){case 0:return n=(r=this.performanceClient)===null||r===void 0?void 0:r.startMeasurement(je.CryptoOptsGetPublicKeyThumbprint,e.correlationId),[4,this.browserCrypto.generateKeyPair(t.EXTRACTABLE,t.POP_KEY_USAGES)];case 1:return o=h.sent(),[4,this.browserCrypto.exportJwk(o.publicKey)];case 2:return i=h.sent(),a={e:i.e,kty:i.kty,n:i.n},s=Yr.getSortedObjectString(a),[4,this.hashString(s)];case 3:return c=h.sent(),[4,this.browserCrypto.exportJwk(o.privateKey)];case 4:return l=h.sent(),[4,this.browserCrypto.importJwk(l,!1,["sign"])];case 5:return u=h.sent(),[4,this.cache.asymmetricKeys.setItem(c,{privateKey:u,publicKey:o.publicKey,requestMethod:e.resourceRequestMethod,requestUri:e.resourceRequestUri})];case 6:return h.sent(),n&&n.endMeasurement({success:!0}),[2,c]}})})},t.prototype.removeTokenBindingKey=function(e){return S(this,void 0,void 0,function(){var r;return T(this,function(n){switch(n.label){case 0:return[4,this.cache.asymmetricKeys.removeItem(e)];case 1:return n.sent(),[4,this.cache.asymmetricKeys.containsKey(e)];case 2:return r=n.sent(),[2,!r]}})})},t.prototype.clearKeystore=function(){return S(this,void 0,void 0,function(){return T(this,function(e){switch(e.label){case 0:return[4,this.cache.clear()];case 1:return[2,e.sent()]}})})},t.prototype.signJwt=function(e,r,n){var o;return S(this,void 0,void 0,function(){var i,a,s,c,l,u,h,d,f,m,v,E,g;return T(this,function(p){switch(p.label){case 0:return i=(o=this.performanceClient)===null||o===void 0?void 0:o.startMeasurement(je.CryptoOptsSignJwt,n),[4,this.cache.asymmetricKeys.getItem(r)];case 1:if(a=p.sent(),!a)throw N.createSigningKeyNotFoundInStorageError(r);return[4,this.browserCrypto.exportJwk(a.publicKey)];case 2:return s=p.sent(),c=Yr.getSortedObjectString(s),l=this.b64Encode.urlEncode(JSON.stringify({kid:r})),u=WC.getShrHeaderString({kid:l,alg:s.alg}),h=this.b64Encode.urlEncode(u),e.cnf={jwk:JSON.parse(c)},d=this.b64Encode.urlEncode(JSON.stringify(e)),f=h+"."+d,m=Yr.stringToArrayBuffer(f),[4,this.browserCrypto.sign(a.privateKey,m)];case 3:return v=p.sent(),E=this.b64Encode.urlEncodeArr(new Uint8Array(v)),g=f+"."+E,i&&i.endMeasurement({success:!0}),[2,g]}})})},t.prototype.hashString=function(e){return S(this,void 0,void 0,function(){var r,n;return T(this,function(o){switch(o.label){case 0:return[4,this.browserCrypto.sha256Digest(e)];case 1:return r=o.sent(),n=new Uint8Array(r),[2,this.b64Encode.urlEncodeArr(n)]}})})},t.POP_KEY_USAGES=["sign","verify"],t.EXTRACTABLE=!0,t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var bS=function(){function t(e,r,n,o){this.isBrowserEnvironment=typeof window<"u",this.config=e,this.storage=r,this.logger=n,this.cryptoObj=o}return t.prototype.loadExternalTokens=function(e,r,n){if(this.logger.info("TokenCache - loadExternalTokens called"),!r.id_token)throw N.createUnableToLoadTokenError("Please ensure server response includes id token.");var o=new kr(r.id_token,this.cryptoObj),i,a;if(e.account){var s=this.loadAccount(o,e.account.environment,void 0,void 0,e.account.homeAccountId);i=new Qs(s,this.loadIdToken(o,s.homeAccountId,e.account.environment,e.account.tenantId),this.loadAccessToken(e,r,s.homeAccountId,e.account.environment,e.account.tenantId,n),this.loadRefreshToken(e,r,s.homeAccountId,e.account.environment))}else if(e.authority){var c=Kc.generateAuthority(e.authority,e.azureCloudOptions),l={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};if(a=new Kc(c,this.config.system.networkClient,this.storage,l),n.clientInfo){this.logger.trace("TokenCache - homeAccountId from options");var s=this.loadAccount(o,a.hostnameAndPort,n.clientInfo,a.authorityType);i=new Qs(s,this.loadIdToken(o,s.homeAccountId,a.hostnameAndPort,a.tenant),this.loadAccessToken(e,r,s.homeAccountId,a.hostnameAndPort,a.tenant,n),this.loadRefreshToken(e,r,s.homeAccountId,a.hostnameAndPort))}else if(r.client_info){this.logger.trace("TokenCache - homeAccountId from response");var s=this.loadAccount(o,a.hostnameAndPort,r.client_info,a.authorityType);i=new Qs(s,this.loadIdToken(o,s.homeAccountId,a.hostnameAndPort,a.tenant),this.loadAccessToken(e,r,s.homeAccountId,a.hostnameAndPort,a.tenant,n),this.loadRefreshToken(e,r,s.homeAccountId,a.hostnameAndPort))}else throw N.createUnableToLoadTokenError("Please provide clientInfo in the response or options.")}else throw N.createUnableToLoadTokenError("Please provide a request with an account or a request with authority.");return this.generateAuthenticationResult(e,o,i,a)},t.prototype.loadAccount=function(e,r,n,o,i){var a;if(i?a=i:o!==void 0&&n&&(a=tt.generateHomeAccountId(n,o,this.logger,this.cryptoObj,e)),!a)throw N.createUnableToLoadTokenError("Unexpected missing homeAccountId");var s=n?tt.createAccount(n,a,e,void 0,void 0,void 0,r):tt.createGenericAccount(a,e,void 0,void 0,void 0,r);if(this.isBrowserEnvironment)return this.logger.verbose("TokenCache - loading account"),this.storage.setAccount(s),s;throw N.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.")},t.prototype.loadIdToken=function(e,r,n,o){var i=ja.createIdTokenEntity(r,n,e.rawToken,this.config.auth.clientId,o);if(this.isBrowserEnvironment)return this.logger.verbose("TokenCache - loading id token"),this.storage.setIdTokenCredential(i),i;throw N.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.")},t.prototype.loadAccessToken=function(e,r,n,o,i,a){if(!r.access_token)return this.logger.verbose("TokenCache - No access token provided for caching"),null;if(!r.expires_in)throw N.createUnableToLoadTokenError("Please ensure server response includes expires_in value.");if(!a.extendedExpiresOn)throw N.createUnableToLoadTokenError("Please provide an extendedExpiresOn value in the options.");var s=new Ct(e.scopes).printScopes(),c=a.expiresOn||r.expires_in+new Date().getTime()/1e3,l=a.extendedExpiresOn,u=Ba.createAccessTokenEntity(n,o,r.access_token,this.config.auth.clientId,i,s,c,l,this.cryptoObj);if(this.isBrowserEnvironment)return this.logger.verbose("TokenCache - loading access token"),this.storage.setAccessTokenCredential(u),u;throw N.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.")},t.prototype.loadRefreshToken=function(e,r,n,o){if(!r.refresh_token)return this.logger.verbose("TokenCache - No refresh token provided for caching"),null;var i=jc.createRefreshTokenEntity(n,o,r.refresh_token,this.config.auth.clientId);if(this.isBrowserEnvironment)return this.logger.verbose("TokenCache - loading refresh token"),this.storage.setRefreshTokenCredential(i),i;throw N.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.")},t.prototype.generateAuthenticationResult=function(e,r,n,o){var i,a,s,c=_.EMPTY_STRING,l=[],u=null,h;n!=null&&n.accessToken&&(c=n.accessToken.secret,l=Ct.fromString(n.accessToken.target).asArray(),u=new Date(Number(n.accessToken.expiresOn)*1e3),h=new Date(Number(n.accessToken.extendedExpiresOn)*1e3));var d=(r==null?void 0:r.claims.oid)||(r==null?void 0:r.claims.sub)||_.EMPTY_STRING,f=(r==null?void 0:r.claims.tid)||_.EMPTY_STRING;return{authority:o?o.canonicalAuthority:_.EMPTY_STRING,uniqueId:d,tenantId:f,scopes:l,account:n!=null&&n.account?n.account.getAccountInfo():null,idToken:r?r.rawToken:_.EMPTY_STRING,idTokenClaims:r?r.claims:{},accessToken:c,fromCache:!0,expiresOn:u,correlationId:e.correlationId||_.EMPTY_STRING,requestId:_.EMPTY_STRING,extExpiresOn:h,familyId:_.EMPTY_STRING,tokenType:((i=n==null?void 0:n.accessToken)===null||i===void 0?void 0:i.tokenType)||_.EMPTY_STRING,state:_.EMPTY_STRING,cloudGraphHostName:((a=n==null?void 0:n.account)===null||a===void 0?void 0:a.cloudGraphHostName)||_.EMPTY_STRING,msGraphHost:((s=n==null?void 0:n.account)===null||s===void 0?void 0:s.msGraphHost)||_.EMPTY_STRING,code:void 0,fromNativeBroker:!1}},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var IS=function(t){ot(e,t);function e(r){var n=t.call(this,r)||this;return n.includeRedirectUri=!1,n}return e}(by);/*! @azure/msal-browser v2.31.0 2022-11-07 */var kS=function(t){ot(e,t);function e(r,n,o,i,a,s,c,l,u,h){var d=t.call(this,r,n,o,i,a,s,l,u,h)||this;return d.apiId=c,d}return e.prototype.acquireToken=function(r){return S(this,void 0,void 0,function(){var n,o,i,a,s,c,l;return T(this,function(u){switch(u.label){case 0:if(this.logger.trace("SilentAuthCodeClient.acquireToken called"),!r.code)throw N.createAuthCodeRequiredError();return[4,this.initializeAuthorizationRequest(r,F.Silent)];case 1:n=u.sent(),this.browserStorage.updateCacheEntries(n.state,n.nonce,n.authority,n.loginHint||_.EMPTY_STRING,n.account||null),o=this.initializeServerTelemetryManager(this.apiId),u.label=2;case 2:return u.trys.push([2,4,,5]),i=$($({},n),{code:r.code}),[4,this.getClientConfiguration(o,n.authority)];case 3:return a=u.sent(),s=new IS(a),this.logger.verbose("Auth code client created"),c=new Oy(s,this.browserStorage,i,this.logger,this.config.system),[2,c.handleCodeResponseFromServer({code:r.code,msgraph_host:r.msGraphHost,cloud_graph_host_name:r.cloudGraphHostName,cloud_instance_host_name:r.cloudInstanceHostName},n.state,s.authority,this.networkClient,!1)];case 4:throw l=u.sent(),l instanceof z&&l.setCorrelationId(this.correlationId),o.cacheFailedRequest(l),this.browserStorage.cleanRequestByState(n.state),l;case 5:return[2]}})})},e.prototype.logout=function(){return Promise.reject(N.createSilentLogoutUnsupportedError())},e}(Ri);/*! @azure/msal-browser v2.31.0 2022-11-07 */var AS=function(){function t(e,r){this.correlationId=r,this.measureName="msal.measure."+e+"."+this.correlationId,this.startMark="msal.start."+e+"."+this.correlationId,this.endMark="msal.end."+e+"."+this.correlationId}return t.supportsBrowserPerformance=function(){return typeof window<"u"&&typeof window.performance<"u"&&typeof window.performance.mark=="function"&&typeof window.performance.measure=="function"&&typeof window.performance.clearMarks=="function"&&typeof window.performance.clearMeasures=="function"&&typeof window.performance.getEntriesByName=="function"},t.prototype.startMeasurement=function(){if(t.supportsBrowserPerformance())try{window.performance.mark(this.startMark)}catch{}},t.prototype.endMeasurement=function(){if(t.supportsBrowserPerformance())try{window.performance.mark(this.endMark),window.performance.measure(this.measureName,this.startMark,this.endMark)}catch{}},t.prototype.flushMeasurement=function(){if(t.supportsBrowserPerformance())try{var e=window.performance.getEntriesByName(this.measureName,"measure");if(e.length>0){var r=e[0].duration;return window.performance.clearMeasures(this.measureName),window.performance.clearMarks(this.startMark),window.performance.clearMarks(this.endMark),r}}catch{}return null},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var RS=function(t){ot(e,t);function e(r,n,o,i,a,s,c){var l=t.call(this,r,n,o,i,a,s)||this;return l.browserCrypto=new Uy(l.logger,c),l.guidGenerator=new xy(l.browserCrypto),l}return e.prototype.startPerformanceMeasuremeant=function(r,n){return new AS(r,n)},e.prototype.generateId=function(){return this.guidGenerator.generateGuid()},e.prototype.getPageVisibility=function(){var r;return((r=document.visibilityState)===null||r===void 0?void 0:r.toString())||null},e.prototype.startMeasurement=function(r,n){var o=this,i=this.getPageVisibility(),a=t.prototype.startMeasurement.call(this,r,n);return $($({},a),{endMeasurement:function(s){return a.endMeasurement($({startPageVisibility:i,endPageVisibility:o.getPageVisibility()},s))}})},e}(Ay);/*! @azure/msal-browser v2.31.0 2022-11-07 */var PS=function(){function t(e){this.isBrowserEnvironment=typeof window<"u",this.config=lS(e,this.isBrowserEnvironment),this.initialized=!1,this.logger=new jh(this.config.system.loggerOptions,ou,Ea),this.networkClient=this.config.system.networkClient,this.navigationClient=this.config.system.navigationClient,this.redirectResponse=new Map,this.hybridAuthCodeResponses=new Map,this.performanceClient=this.isBrowserEnvironment?new RS(this.config.auth.clientId,this.config.auth.authority,this.logger,ou,Ea,this.config.telemetry.application,this.config.system.cryptoOptions):new JC(this.config.auth.clientId,this.config.auth.authority,this.logger,ou,Ea,this.config.telemetry.application),this.browserCrypto=this.isBrowserEnvironment?new TS(this.logger,this.performanceClient,this.config.system.cryptoOptions):Fc,this.eventHandler=new hS(this.logger,this.browserCrypto),this.browserStorage=this.isBrowserEnvironment?new Rd(this.config.auth.clientId,this.config.cache,this.browserCrypto,this.logger):eS(this.config.auth.clientId,this.logger);var r={cacheLocation:pt.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1};this.nativeInternalStorage=new Rd(this.config.auth.clientId,r,this.browserCrypto,this.logger),this.tokenCache=new bS(this.config,this.browserStorage,this.logger,this.browserCrypto)}return t.prototype.initialize=function(){return S(this,void 0,void 0,function(){var e,r;return T(this,function(n){switch(n.label){case 0:if(this.logger.trace("initialize called"),this.initialized)return this.logger.info("initialize has already been called, exiting early."),[2];if(this.eventHandler.emitEvent(q.INITIALIZE_START),!this.config.system.allowNativeBroker)return[3,4];n.label=1;case 1:return n.trys.push([1,3,,4]),e=this,[4,ro.createProvider(this.logger,this.config.system.nativeBrokerHandshakeTimeout)];case 2:return e.nativeExtensionProvider=n.sent(),[3,4];case 3:return r=n.sent(),this.logger.verbose(r),[3,4];case 4:return this.initialized=!0,this.eventHandler.emitEvent(q.INITIALIZE_END),[2]}})})},t.prototype.handleRedirectPromise=function(e){return S(this,void 0,void 0,function(){var r,n,o,i,a,s,c,l,u=this;return T(this,function(h){return this.logger.verbose("handleRedirectPromise called"),Oe.blockNativeBrokerCalledBeforeInitialized(this.config.system.allowNativeBroker,this.initialized),r=this.getAllAccounts(),this.isBrowserEnvironment?(n=e||_.EMPTY_STRING,o=this.redirectResponse.get(n),typeof o>"u"?(this.eventHandler.emitEvent(q.HANDLE_REDIRECT_START,F.Redirect),this.logger.verbose("handleRedirectPromise has been called for the first time, storing the promise"),i=this.browserStorage.getCachedNativeRequest(),a=void 0,i&&ro.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider)&&this.nativeExtensionProvider&&!e?(this.logger.trace("handleRedirectPromise - acquiring token from native platform"),s=new si(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,ye.handleRedirectPromise,this.performanceClient,this.nativeExtensionProvider,i.accountId,this.nativeInternalStorage,i.correlationId),a=s.handleRedirectPromise()):(this.logger.trace("handleRedirectPromise - acquiring token from web flow"),c=this.browserStorage.getTemporaryCache(ae.CORRELATION_ID,!0)||_.EMPTY_STRING,l=this.createRedirectClient(c),a=l.handleRedirectPromise(e)),o=a.then(function(d){if(d){var f=r.length<u.getAllAccounts().length;f?(u.eventHandler.emitEvent(q.LOGIN_SUCCESS,F.Redirect,d),u.logger.verbose("handleRedirectResponse returned result, login success")):(u.eventHandler.emitEvent(q.ACQUIRE_TOKEN_SUCCESS,F.Redirect,d),u.logger.verbose("handleRedirectResponse returned result, acquire token success"))}return u.eventHandler.emitEvent(q.HANDLE_REDIRECT_END,F.Redirect),d}).catch(function(d){throw r.length>0?u.eventHandler.emitEvent(q.ACQUIRE_TOKEN_FAILURE,F.Redirect,null,d):u.eventHandler.emitEvent(q.LOGIN_FAILURE,F.Redirect,null,d),u.eventHandler.emitEvent(q.HANDLE_REDIRECT_END,F.Redirect),d}),this.redirectResponse.set(n,o)):this.logger.verbose("handleRedirectPromise has been called previously, returning the result from the first call"),[2,o]):(this.logger.verbose("handleRedirectPromise returns null, not browser environment"),[2,null])})})},t.prototype.acquireTokenRedirect=function(e){return S(this,void 0,void 0,function(){var r,n,o,i,a,s=this;return T(this,function(c){return r=this.getRequestCorrelationId(e),this.logger.verbose("acquireTokenRedirect called",r),this.preflightBrowserEnvironmentCheck(F.Redirect),n=this.getAllAccounts().length>0,n?this.eventHandler.emitEvent(q.ACQUIRE_TOKEN_START,F.Redirect,e):this.eventHandler.emitEvent(q.LOGIN_START,F.Redirect,e),this.nativeExtensionProvider&&this.canUseNative(e)?(i=new si(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,ye.acquireTokenRedirect,this.performanceClient,this.nativeExtensionProvider,this.getNativeAccountId(e),this.nativeInternalStorage,e.correlationId),o=i.acquireTokenRedirect(e).catch(function(l){if(l instanceof Er&&l.isFatal()){s.nativeExtensionProvider=void 0;var u=s.createRedirectClient(e.correlationId);return u.acquireToken(e)}else if(l instanceof lr){s.logger.verbose("acquireTokenRedirect - Resolving interaction required error thrown by native broker by falling back to web flow");var u=s.createRedirectClient(e.correlationId);return u.acquireToken(e)}throw s.browserStorage.setInteractionInProgress(!1),l})):(a=this.createRedirectClient(e.correlationId),o=a.acquireToken(e)),[2,o.catch(function(l){throw n?s.eventHandler.emitEvent(q.ACQUIRE_TOKEN_FAILURE,F.Redirect,null,l):s.eventHandler.emitEvent(q.LOGIN_FAILURE,F.Redirect,null,l),l})]})})},t.prototype.acquireTokenPopup=function(e){var r=this,n=this.getRequestCorrelationId(e),o=this.performanceClient.startMeasurement(je.AcquireTokenPopup,n);try{this.logger.verbose("acquireTokenPopup called",n),this.preflightBrowserEnvironmentCheck(F.Popup)}catch(c){return Promise.reject(c)}var i=this.getAllAccounts();i.length>0?this.eventHandler.emitEvent(q.ACQUIRE_TOKEN_START,F.Popup,e):this.eventHandler.emitEvent(q.LOGIN_START,F.Popup,e);var a;if(this.canUseNative(e))a=this.acquireTokenNative(e,ye.acquireTokenPopup).then(function(c){return r.browserStorage.setInteractionInProgress(!1),o.endMeasurement({success:!0,isNativeBroker:!0,requestId:c.requestId}),o.flushMeasurement(),c}).catch(function(c){if(c instanceof Er&&c.isFatal()){r.nativeExtensionProvider=void 0;var l=r.createPopupClient(e.correlationId);return l.acquireToken(e)}else if(c instanceof lr){r.logger.verbose("acquireTokenPopup - Resolving interaction required error thrown by native broker by falling back to web flow");var l=r.createPopupClient(e.correlationId);return l.acquireToken(e)}throw r.browserStorage.setInteractionInProgress(!1),c});else{var s=this.createPopupClient(e.correlationId);a=s.acquireToken(e)}return a.then(function(c){var l=i.length<r.getAllAccounts().length;return l?r.eventHandler.emitEvent(q.LOGIN_SUCCESS,F.Popup,c):r.eventHandler.emitEvent(q.ACQUIRE_TOKEN_SUCCESS,F.Popup,c),o.addStaticFields({accessTokenSize:c.accessToken.length,idTokenSize:c.idToken.length}),o.endMeasurement({success:!0,requestId:c.requestId}),o.flushMeasurement(),c}).catch(function(c){return i.length>0?r.eventHandler.emitEvent(q.ACQUIRE_TOKEN_FAILURE,F.Popup,null,c):r.eventHandler.emitEvent(q.LOGIN_FAILURE,F.Popup,null,c),o.endMeasurement({errorCode:c.errorCode,subErrorCode:c.subError,success:!1}),o.flushMeasurement(),Promise.reject(c)})},t.prototype.ssoSilent=function(e){return S(this,void 0,void 0,function(){var r,n,o,i,a,s=this;return T(this,function(c){return r=this.getRequestCorrelationId(e),n=$($({},e),{prompt:e.prompt,correlationId:r}),this.preflightBrowserEnvironmentCheck(F.Silent),o=this.performanceClient.startMeasurement(je.SsoSilent,r),this.logger.verbose("ssoSilent called",r),this.eventHandler.emitEvent(q.SSO_SILENT_START,F.Silent,n),this.canUseNative(n)?i=this.acquireTokenNative(n,ye.ssoSilent).catch(function(l){if(l instanceof Er&&l.isFatal()){s.nativeExtensionProvider=void 0;var u=s.createSilentIframeClient(n.correlationId);return u.acquireToken(n)}throw l}):(a=this.createSilentIframeClient(n.correlationId),i=a.acquireToken(n)),[2,i.then(function(l){return s.eventHandler.emitEvent(q.SSO_SILENT_SUCCESS,F.Silent,l),o.addStaticFields({accessTokenSize:l.accessToken.length,idTokenSize:l.idToken.length}),o.endMeasurement({success:!0,isNativeBroker:l.fromNativeBroker,requestId:l.requestId}),o.flushMeasurement(),l}).catch(function(l){throw s.eventHandler.emitEvent(q.SSO_SILENT_FAILURE,F.Silent,null,l),o.endMeasurement({errorCode:l.errorCode,subErrorCode:l.subError,success:!1}),o.flushMeasurement(),l})]})})},t.prototype.acquireTokenByCode=function(e){return S(this,void 0,void 0,function(){var r,n,o,i,a=this;return T(this,function(s){r=this.getRequestCorrelationId(e),this.preflightBrowserEnvironmentCheck(F.Silent),this.logger.trace("acquireTokenByCode called",r),this.eventHandler.emitEvent(q.ACQUIRE_TOKEN_BY_CODE_START,F.Silent,e),n=this.performanceClient.startMeasurement(je.AcquireTokenByCode,e.correlationId);try{if(e.code)return o=e.code,i=this.hybridAuthCodeResponses.get(o),i?(this.logger.verbose("Existing acquireTokenByCode request found",e.correlationId),n.endMeasurement({success:!0}),n.discardMeasurement()):(this.logger.verbose("Initiating new acquireTokenByCode request",r),i=this.acquireTokenByCodeAsync($($({},e),{correlationId:r})).then(function(c){return a.eventHandler.emitEvent(q.ACQUIRE_TOKEN_BY_CODE_SUCCESS,F.Silent,c),a.hybridAuthCodeResponses.delete(o),n.addStaticFields({accessTokenSize:c.accessToken.length,idTokenSize:c.idToken.length}),n.endMeasurement({success:!0,isNativeBroker:c.fromNativeBroker,requestId:c.requestId}),n.flushMeasurement(),c}).catch(function(c){throw a.hybridAuthCodeResponses.delete(o),a.eventHandler.emitEvent(q.ACQUIRE_TOKEN_BY_CODE_FAILURE,F.Silent,null,c),n.endMeasurement({errorCode:c.errorCode,subErrorCode:c.subError,success:!1}),n.flushMeasurement(),c}),this.hybridAuthCodeResponses.set(o,i)),[2,i];if(e.nativeAccountId){if(this.canUseNative(e,e.nativeAccountId))return[2,this.acquireTokenNative(e,ye.acquireTokenByCode,e.nativeAccountId).catch(function(c){throw c instanceof Er&&c.isFatal()&&(a.nativeExtensionProvider=void 0),c})];throw N.createUnableToAcquireTokenFromNativePlatformError()}else throw N.createAuthCodeOrNativeAccountIdRequiredError()}catch(c){throw this.eventHandler.emitEvent(q.ACQUIRE_TOKEN_BY_CODE_FAILURE,F.Silent,null,c),n.endMeasurement({errorCode:c instanceof z&&c.errorCode||void 0,subErrorCode:c instanceof z&&c.subError||void 0,success:!1}),c}return[2]})})},t.prototype.acquireTokenByCodeAsync=function(e){return S(this,void 0,void 0,function(){var r,n;return T(this,function(o){switch(o.label){case 0:return this.logger.trace("acquireTokenByCodeAsync called",e.correlationId),r=this.createSilentAuthCodeClient(e.correlationId),[4,r.acquireToken(e)];case 1:return n=o.sent(),[2,n]}})})},t.prototype.acquireTokenFromCache=function(e,r,n){return S(this,void 0,void 0,function(){return T(this,function(o){switch(n.cacheLookupPolicy){case At.Default:case At.AccessToken:case At.AccessTokenAndRefreshToken:return[2,e.acquireToken(r)];default:throw D.createRefreshRequiredError()}return[2]})})},t.prototype.acquireTokenByRefreshToken=function(e,r){return S(this,void 0,void 0,function(){var n;return T(this,function(o){switch(r.cacheLookupPolicy){case At.Default:case At.AccessTokenAndRefreshToken:case At.RefreshToken:case At.RefreshTokenAndNetwork:return n=this.createSilentRefreshClient(e.correlationId),[2,n.acquireToken(e)];default:throw D.createRefreshRequiredError()}return[2]})})},t.prototype.acquireTokenBySilentIframe=function(e){return S(this,void 0,void 0,function(){var r;return T(this,function(n){return r=this.createSilentIframeClient(e.correlationId),[2,r.acquireToken(e)]})})},t.prototype.logout=function(e){return S(this,void 0,void 0,function(){var r;return T(this,function(n){return r=this.getRequestCorrelationId(e),this.logger.warning("logout API is deprecated and will be removed in msal-browser v3.0.0. Use logoutRedirect instead.",r),[2,this.logoutRedirect($({correlationId:r},e))]})})},t.prototype.logoutRedirect=function(e){return S(this,void 0,void 0,function(){var r,n;return T(this,function(o){return r=this.getRequestCorrelationId(e),this.preflightBrowserEnvironmentCheck(F.Redirect),n=this.createRedirectClient(r),[2,n.logout(e)]})})},t.prototype.logoutPopup=function(e){try{var r=this.getRequestCorrelationId(e);this.preflightBrowserEnvironmentCheck(F.Popup);var n=this.createPopupClient(r);return n.logout(e)}catch(o){return Promise.reject(o)}},t.prototype.getAllAccounts=function(){return this.logger.verbose("getAllAccounts called"),this.isBrowserEnvironment?this.browserStorage.getAllAccounts():[]},t.prototype.getAccountByUsername=function(e){var r=this.getAllAccounts();return!x.isEmpty(e)&&r&&r.length?(this.logger.verbose("Account matching username found, returning"),this.logger.verbosePii("Returning signed-in accounts matching username: "+e),r.filter(function(n){return n.username.toLowerCase()===e.toLowerCase()})[0]||null):(this.logger.verbose("getAccountByUsername: No matching account found, returning null"),null)},t.prototype.getAccountByHomeId=function(e){var r=this.getAllAccounts();return!x.isEmpty(e)&&r&&r.length?(this.logger.verbose("Account matching homeAccountId found, returning"),this.logger.verbosePii("Returning signed-in accounts matching homeAccountId: "+e),r.filter(function(n){return n.homeAccountId===e})[0]||null):(this.logger.verbose("getAccountByHomeId: No matching account found, returning null"),null)},t.prototype.getAccountByLocalId=function(e){var r=this.getAllAccounts();return!x.isEmpty(e)&&r&&r.length?(this.logger.verbose("Account matching localAccountId found, returning"),this.logger.verbosePii("Returning signed-in accounts matching localAccountId: "+e),r.filter(function(n){return n.localAccountId===e})[0]||null):(this.logger.verbose("getAccountByLocalId: No matching account found, returning null"),null)},t.prototype.setActiveAccount=function(e){this.browserStorage.setActiveAccount(e)},t.prototype.getActiveAccount=function(){return this.browserStorage.getActiveAccount()},t.prototype.preflightBrowserEnvironmentCheck=function(e,r){if(r===void 0&&(r=!0),this.logger.verbose("preflightBrowserEnvironmentCheck started"),Oe.blockNonBrowserEnvironment(this.isBrowserEnvironment),Oe.blockRedirectInIframe(e,this.config.system.allowRedirectInIframe),Oe.blockReloadInHiddenIframes(),Oe.blockAcquireTokenInPopups(),Oe.blockNativeBrokerCalledBeforeInitialized(this.config.system.allowNativeBroker,this.initialized),e===F.Redirect&&this.config.cache.cacheLocation===pt.MemoryStorage&&!this.config.cache.storeAuthStateInCookie)throw Wc.createInMemoryRedirectUnavailableError();(e===F.Redirect||e===F.Popup)&&this.preflightInteractiveRequest(r)},t.prototype.preflightInteractiveRequest=function(e){this.logger.verbose("preflightInteractiveRequest called, validating app environment"),Oe.blockReloadInHiddenIframes(),e&&this.browserStorage.setInteractionInProgress(!0)},t.prototype.acquireTokenNative=function(e,r,n){return S(this,void 0,void 0,function(){var o;return T(this,function(i){if(this.logger.trace("acquireTokenNative called"),!this.nativeExtensionProvider)throw N.createNativeConnectionNotEstablishedError();return o=new si(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,r,this.performanceClient,this.nativeExtensionProvider,n||this.getNativeAccountId(e),this.nativeInternalStorage,e.correlationId),[2,o.acquireToken(e)]})})},t.prototype.canUseNative=function(e,r){if(this.logger.trace("canUseNative called"),!ro.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 mt.NONE:case mt.CONSENT:case mt.LOGIN:this.logger.trace("canUseNative: prompt is compatible with native flow");break;default:return this.logger.trace("canUseNative: prompt = "+e.prompt+" is not compatible with native flow, returning false"),!1}return!r&&!this.getNativeAccountId(e)?(this.logger.trace("canUseNative: nativeAccountId is not available, returning false"),!1):!0},t.prototype.getNativeAccountId=function(e){var r=e.account||this.browserStorage.getAccountInfoByHints(e.loginHint,e.sid)||this.getActiveAccount();return r&&r.nativeAccountId||""},t.prototype.createPopupClient=function(e){return new oS(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)},t.prototype.createRedirectClient=function(e){return new nS(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)},t.prototype.createSilentIframeClient=function(e){return new uS(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,ye.ssoSilent,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)},t.prototype.createSilentCacheClient=function(e){return new Ny(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeExtensionProvider,e)},t.prototype.createSilentRefreshClient=function(e){return new dS(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeExtensionProvider,e)},t.prototype.createSilentAuthCodeClient=function(e){return new kS(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,ye.acquireTokenByCode,this.performanceClient,this.nativeExtensionProvider,e)},t.prototype.addEventCallback=function(e){return this.eventHandler.addEventCallback(e)},t.prototype.removeEventCallback=function(e){this.eventHandler.removeEventCallback(e)},t.prototype.addPerformanceCallback=function(e){return this.performanceClient.addPerformanceCallback(e)},t.prototype.removePerformanceCallback=function(e){return this.performanceClient.removePerformanceCallback(e)},t.prototype.enableAccountStorageEvents=function(){this.eventHandler.enableAccountStorageEvents()},t.prototype.disableAccountStorageEvents=function(){this.eventHandler.disableAccountStorageEvents()},t.prototype.getTokenCache=function(){return this.tokenCache},t.prototype.getLogger=function(){return this.logger},t.prototype.setLogger=function(e){this.logger=e},t.prototype.initializeWrapperLibrary=function(e,r){this.browserStorage.setWrapperMetadata(e,r)},t.prototype.setNavigationClient=function(e){this.navigationClient=e},t.prototype.getConfiguration=function(){return this.config},t.prototype.getRequestCorrelationId=function(e){return e!=null&&e.correlationId?e.correlationId:this.isBrowserEnvironment?this.browserCrypto.createNewGuid():_.EMPTY_STRING},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var NS=function(t){ot(e,t);function e(r){var n=t.call(this,r)||this;return n.activeSilentTokenRequests=new Map,n}return e.prototype.loginRedirect=function(r){return S(this,void 0,void 0,function(){var n;return T(this,function(o){return n=this.getRequestCorrelationId(r),this.logger.verbose("loginRedirect called",n),[2,this.acquireTokenRedirect($({correlationId:n},r||xp))]})})},e.prototype.loginPopup=function(r){var n=this.getRequestCorrelationId(r);return this.logger.verbose("loginPopup called",n),this.acquireTokenPopup($({correlationId:n},r||xp))},e.prototype.acquireTokenSilent=function(r){return S(this,void 0,void 0,function(){var n,o,i,a,s,c,l,u=this;return T(this,function(h){if(n=this.getRequestCorrelationId(r),o=this.performanceClient.startMeasurement(je.AcquireTokenSilent,n),o.addStaticFields({cacheLookupPolicy:r.cacheLookupPolicy}),this.preflightBrowserEnvironmentCheck(F.Silent),this.logger.verbose("acquireTokenSilent called",n),i=r.account||this.getActiveAccount(),!i)throw N.createNoAccountError();return a={clientId:this.config.auth.clientId,authority:r.authority||_.EMPTY_STRING,scopes:r.scopes,homeAccountIdentifier:i.homeAccountId,claims:r.claims,authenticationScheme:r.authenticationScheme,resourceRequestMethod:r.resourceRequestMethod,resourceRequestUri:r.resourceRequestUri,shrClaims:r.shrClaims,sshKid:r.sshKid},s=JSON.stringify(a),c=this.activeSilentTokenRequests.get(s),typeof c>"u"?(this.logger.verbose("acquireTokenSilent called for the first time, storing active request",n),l=this.acquireTokenSilentAsync($($({},r),{correlationId:n}),i).then(function(d){return u.activeSilentTokenRequests.delete(s),o.addStaticFields({accessTokenSize:d.accessToken.length,idTokenSize:d.idToken.length}),o.endMeasurement({success:!0,fromCache:d.fromCache,isNativeBroker:d.fromNativeBroker,requestId:d.requestId}),o.flushMeasurement(),d}).catch(function(d){throw u.activeSilentTokenRequests.delete(s),o.endMeasurement({errorCode:d.errorCode,subErrorCode:d.subError,success:!1}),o.flushMeasurement(),d}),this.activeSilentTokenRequests.set(s,l),[2,l]):(this.logger.verbose("acquireTokenSilent has been called previously, returning the result from the first call",n),o.endMeasurement({success:!0}),o.discardMeasurement(),[2,c])})})},e.prototype.acquireTokenSilentAsync=function(r,n){return S(this,void 0,void 0,function(){var o,i,a,s,c,l,u=this;return T(this,function(h){switch(h.label){case 0:return this.eventHandler.emitEvent(q.ACQUIRE_TOKEN_START,F.Silent,r),o=this.performanceClient.startMeasurement(je.AcquireTokenSilentAsync,r.correlationId),ro.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider,r.authenticationScheme)&&n.nativeAccountId?(this.logger.verbose("acquireTokenSilent - attempting to acquire token from native platform"),a=$($({},r),{account:n}),i=this.acquireTokenNative(a,ye.acquireTokenSilent_silentFlow).catch(function(d){return S(u,void 0,void 0,function(){var f;return T(this,function(m){if(d instanceof Er&&d.isFatal())return this.logger.verbose("acquireTokenSilent - native platform unavailable, falling back to web flow"),this.nativeExtensionProvider=void 0,f=this.createSilentIframeClient(r.correlationId),[2,f.acquireToken(r)];throw d})})}),[3,3]):[3,1];case 1:return this.logger.verbose("acquireTokenSilent - attempting to acquire token from web flow"),s=this.createSilentCacheClient(r.correlationId),[4,s.initializeSilentRequest(r,n)];case 2:c=h.sent(),l=$($({},r),{cacheLookupPolicy:r.cacheLookupPolicy||At.Default}),i=this.acquireTokenFromCache(s,c,l).catch(function(d){if(l.cacheLookupPolicy===At.AccessToken)throw d;return Oe.blockReloadInHiddenIframes(),u.eventHandler.emitEvent(q.ACQUIRE_TOKEN_NETWORK_START,F.Silent,c),u.acquireTokenByRefreshToken(c,l).catch(function(f){var m=f instanceof vo,v=f instanceof lr,E=f.errorCode===cr.INVALID_GRANT_ERROR;if((!m||!E||v||l.cacheLookupPolicy===At.AccessTokenAndRefreshToken||l.cacheLookupPolicy===At.RefreshToken)&&l.cacheLookupPolicy!==At.Skip)throw f;return u.logger.verbose("Refresh token expired/invalid or CacheLookupPolicy is set to Skip, attempting acquire token by iframe.",r.correlationId),u.acquireTokenBySilentIframe(c)})}),h.label=3;case 3:return[2,i.then(function(d){return u.eventHandler.emitEvent(q.ACQUIRE_TOKEN_SUCCESS,F.Silent,d),o.endMeasurement({success:!0,fromCache:d.fromCache,isNativeBroker:d.fromNativeBroker,requestId:d.requestId}),d}).catch(function(d){throw u.eventHandler.emitEvent(q.ACQUIRE_TOKEN_FAILURE,F.Silent,null,d),o.endMeasurement({errorCode:d.errorCode,subErrorCode:d.subError,success:!1}),d})]}})})},e}(PS);const Fp="redirect";var $p=globalThis&&globalThis.__awaiter||function(t,e,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(u){try{l(n.next(u))}catch(h){a(h)}}function c(u){try{l(n.throw(u))}catch(h){a(h)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};class OS extends NS{get account(){return this.getAllAccounts().find(n=>{var o;return((o=n.idTokenClaims)===null||o===void 0?void 0:o.aud)===this.clientId})}get hasValidClaims(){var e;const r=(e=this.account)===null||e===void 0?void 0:e.idTokenClaims;if(r){const n=Math.ceil(Date.now()/1e3);return r.exp>n}return!1}get clientId(){var e;return(e=this.config.auth)===null||e===void 0?void 0:e.clientId}get requestOrigin(){return this.browserStorage.getTemporaryCache("request.origin",!0)}constructor(e,r){super(r),this.tenantId=e}login(e,r=Fp,n=!0){var o;return $p(this,void 0,void 0,function*(){const i=(e==null?void 0:e.loginHint)||((o=this.account)===null||o===void 0?void 0:o.username),a=(e==null?void 0:e.scopes)||[],s=Object.assign(Object.assign({},e),{loginHint:i,scopes:a});if(i&&n){this.logger.verbose("Attempting to login in silently");try{return yield this.ssoSilent(s)}catch{this.logger.verbose("Silent login attempt failed")}}switch(this.logger.verbose(`Attempting to login in by [${r}]`),r){case"popup":return this.loginPopup(s);case"redirect":return this.loginRedirect(s)}})}acquireToken(e={scopes:[]},r=Fp,n=!0){return $p(this,void 0,void 0,function*(){const o=yield this.account;if(n&&o){this.logger.verbose("Attempting to acquire token in silently");try{return yield this.acquireTokenSilent(Object.assign({account:o},e))}catch{this.logger.info("Expected to navigate away from the current page but timeout occurred.")}}switch(this.logger.verbose(`Attempting to acquire token by [${r}]`),r){case"popup":return this.acquireTokenPopup(e);case"redirect":return this.acquireTokenRedirect(e)}})}}const xS=(t,e=window.location.origin)=>{t=t.match(/^http[s]?/)?t:e+t;const{origin:r,pathname:n}=new URL(t);return r+n.replace(/([^:]\/)\/+/g,"$1")},MS=(t,e,r,n,o)=>{const i=Object.assign({clientId:e,redirectUri:xS(r||""),navigateToLoginRequestUrl:!1,authority:`https://login.microsoftonline.com/${t}`},n==null?void 0:n.auth),a=Object.assign({cacheLocation:"localStorage"},n==null?void 0:n.cache),s=n==null?void 0:n.system;return new(o||OS)(t,{auth:i,cache:a,system:s})};class Ly extends jh{constructor(e){super({logLevel:e,loggerCallback:(...r)=>this.loggerCallback(...r)}),this.getLogType=r=>{switch(r){case xe.Error:return"error";case xe.Warning:return"warn";case xe.Info:return"info";case xe.Verbose:default:return"debug"}}}loggerCallback(e,r,n){console[this.getLogType(e)]("%c FUSION::MSAL %c %s","border: 1px solid;","border: none;",r)}}var iu=globalThis&&globalThis.__awaiter||function(t,e,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(u){try{l(n.next(u))}catch(h){a(h)}}function c(u){try{l(n.throw(u))}catch(h){a(h)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const US="default";class LS{get defaultClient(){return this.getClient(US)}get defaultAccount(){return this.defaultClient.account}get defaultConfig(){return this._config.defaultConfig}constructor(e){this._config=e,this._clients={}}getClient(e){return this._clients[e]||(this._clients[e]=this.createClient(e)),this._clients[e]}createClient(e){const r=e?this._config.getClientConfig(e):this._config.defaultConfig;if(!r)throw Error("Could not find any config");const n=MS(r.tenantId,r.clientId,r.redirectUri,r.config);return n.setLogger(new Ly(0)),n}handleRedirect(){return iu(this,void 0,void 0,function*(){const{redirectUri:e}=this.defaultConfig||{};if(window.location.pathname===e){const r=this.defaultClient,n=r.getLogger(),{requestOrigin:o}=r;yield r.handleRedirectPromise(),o===e?(n.warning(`detected callback loop from url ${e}, redirecting to root`),window.location.replace("/")):window.location.replace(o||"/")}return null})}acquireToken(e){return this.defaultClient.acquireToken(e)}acquireAccessToken(e){return iu(this,void 0,void 0,function*(){const r=yield this.acquireToken(e);return r?r.accessToken:void 0})}login(){return iu(this,void 0,void 0,function*(){yield this.defaultClient.login()})}}var DS=globalThis&&globalThis.__awaiter||function(t,e,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(u){try{l(n.next(u))}catch(h){a(h)}}function c(u){try{l(n.throw(u))}catch(h){a(h)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const Dy={name:"auth",configure:t=>{var e;const r=new IC;return!((e=t==null?void 0:t.auth)===null||e===void 0)&&e.defaultConfig&&r.configureDefault(t.auth.defaultConfig),r},initialize:({config:t})=>DS(void 0,void 0,void 0,function*(){const e=new LS(t);return t.requiresAuth&&(yield e.handleRedirect(),e.defaultAccount||(yield e.login())),e})},HS=(t,e)=>({module:Dy,configure:r=>{r.configureDefault(t),(e==null?void 0:e.requiresAuth)!==void 0&&(r.requiresAuth=e==null?void 0:e.requiresAuth);const{clients:n}=e!=null?e:{};n&&Object.entries(n).forEach(([o,i])=>r.configureClient(o,i))}});var Hy=globalThis&&globalThis.__awaiter||function(t,e,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(u){try{l(n.next(u))}catch(h){a(h)}}function c(u){try{l(n.throw(u))}catch(h){a(h)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const FS=t=>{var e;return{id:t.id,isChildType:t.isChildType,parentTypeIds:(e=t.parentTypeIds)!==null&&e!==void 0?e:[]}},Fy=t=>{var e,r,n,o;return{id:t.id,externalId:(e=t.externalId)!==null&&e!==void 0?e:void 0,isActive:t.isActive,isDeleted:t.isDeleted,created:new Date(t.created),source:(r=t.source)!==null&&r!==void 0?r:void 0,title:(n=t.title)!==null&&n!==void 0?n:void 0,type:FS(t.type),value:(o=t.value)!==null&&o!==void 0?o:{}}},$S=t=>Hy(void 0,void 0,void 0,function*(){const e=yield t.json();return Fy(e)}),zS=t=>Hy(void 0,void 0,void 0,function*(){return(yield t.json()).map(Fy)});var Ps=globalThis&&globalThis.__awaiter||function(t,e,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(u){try{l(n.next(u))}catch(h){a(h)}}function c(u){try{l(n.throw(u))}catch(h){a(h)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};class jS{constructor(){this.defaultExpireTime=1*60*1e3}_createContextClientGet(e){return Ps(this,void 0,void 0,function*(){const r=yield e.createContextClient("json$");return{fn:n=>r.get("v1",n,{selector:$S})}})}_createContextClientQuery(e){return Ps(this,void 0,void 0,function*(){const r=yield e.createContextClient("json$");return{fn:n=>r.query("v1",{query:n},{selector:zS})}})}_getServiceProvider(e){var r;return Ps(this,void 0,void 0,function*(){if(e.hasModule("services"))return e.requireInstance("services");{const n=(r=e.ref)===null||r===void 0?void 0:r.services;if(n)return n;throw Error("no service services provider configures [ServicesModule]")}})}createConfig(e){return Ps(this,void 0,void 0,function*(){const r=yield this._getServiceProvider(e),n={getContext:{query:{client:yield this._createContextClientGet(r),key:({id:o})=>o,expire:this.defaultExpireTime}},queryContext:{client:yield this._createContextClientQuery(r),key:o=>JSON.stringify(o),expire:this.defaultExpireTime}};return this.processConfig(n)})}processConfig(e){return e}}var zp;(function(t){t.IDLE="idle",t.ACTIVE="active",t.FAILED="failed",t.CANCELED="canceled"})(zp||(zp={}));const BS=t=>e=>e.pipe(Qn(t)),qS=t=>t.pipe(yt(e=>e.value));var Ns,KS=new Uint8Array(16);function GS(){if(!Ns&&(Ns=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!Ns))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ns(KS)}const VS=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function $y(t){return typeof t=="string"&&VS.test(t)}var Qe=[];for(var au=0;au<256;++au)Qe.push((au+256).toString(16).substr(1));function zy(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=(Qe[t[e+0]]+Qe[t[e+1]]+Qe[t[e+2]]+Qe[t[e+3]]+"-"+Qe[t[e+4]]+Qe[t[e+5]]+"-"+Qe[t[e+6]]+Qe[t[e+7]]+"-"+Qe[t[e+8]]+Qe[t[e+9]]+"-"+Qe[t[e+10]]+Qe[t[e+11]]+Qe[t[e+12]]+Qe[t[e+13]]+Qe[t[e+14]]+Qe[t[e+15]]).toLowerCase();if(!$y(r))throw TypeError("Stringified UUID is invalid");return r}function WS(t){if(!$y(t))throw TypeError("Invalid UUID");var e,r=new Uint8Array(16);return r[0]=(e=parseInt(t.slice(0,8),16))>>>24,r[1]=e>>>16&255,r[2]=e>>>8&255,r[3]=e&255,r[4]=(e=parseInt(t.slice(9,13),16))>>>8,r[5]=e&255,r[6]=(e=parseInt(t.slice(14,18),16))>>>8,r[7]=e&255,r[8]=(e=parseInt(t.slice(19,23),16))>>>8,r[9]=e&255,r[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,r[11]=e/4294967296&255,r[12]=e>>>24&255,r[13]=e>>>16&255,r[14]=e>>>8&255,r[15]=e&255,r}function YS(t){t=unescape(encodeURIComponent(t));for(var e=[],r=0;r<t.length;++r)e.push(t.charCodeAt(r));return e}var QS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",JS="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function XS(t,e,r){function n(o,i,a,s){if(typeof o=="string"&&(o=YS(o)),typeof i=="string"&&(i=WS(i)),i.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var c=new Uint8Array(16+o.length);if(c.set(i),c.set(o,i.length),c=r(c),c[6]=c[6]&15|e,c[8]=c[8]&63|128,a){s=s||0;for(var l=0;l<16;++l)a[s+l]=c[l];return a}return zy(c)}try{n.name=t}catch{}return n.DNS=QS,n.URL=JS,n}function jy(t,e,r){t=t||{};var n=t.random||(t.rng||GS)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){r=r||0;for(var o=0;o<16;++o)e[r+o]=n[o];return e}return zy(n)}function ZS(t,e,r,n){switch(t){case 0:return e&r^~e&n;case 1:return e^r^n;case 2:return e&r^e&n^r&n;case 3:return e^r^n}}function su(t,e){return t<<e|t>>>32-e}function eT(t){var e=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof t=="string"){var n=unescape(encodeURIComponent(t));t=[];for(var o=0;o<n.length;++o)t.push(n.charCodeAt(o))}else Array.isArray(t)||(t=Array.prototype.slice.call(t));t.push(128);for(var i=t.length/4+2,a=Math.ceil(i/16),s=new Array(a),c=0;c<a;++c){for(var l=new Uint32Array(16),u=0;u<16;++u)l[u]=t[c*64+u*4]<<24|t[c*64+u*4+1]<<16|t[c*64+u*4+2]<<8|t[c*64+u*4+3];s[c]=l}s[a-1][14]=(t.length-1)*8/Math.pow(2,32),s[a-1][14]=Math.floor(s[a-1][14]),s[a-1][15]=(t.length-1)*8&4294967295;for(var h=0;h<a;++h){for(var d=new Uint32Array(80),f=0;f<16;++f)d[f]=s[h][f];for(var m=16;m<80;++m)d[m]=su(d[m-3]^d[m-8]^d[m-14]^d[m-16],1);for(var v=r[0],E=r[1],g=r[2],p=r[3],y=r[4],w=0;w<80;++w){var k=Math.floor(w/20),P=su(v,5)+ZS(k,E,g,p)+y+e[k]+d[w]>>>0;y=p,p=g,g=su(E,30)>>>0,E=v,v=P}r[0]=r[0]+v>>>0,r[1]=r[1]+E>>>0,r[2]=r[2]+g>>>0,r[3]=r[3]+p>>>0,r[4]=r[4]+y>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}var tT=XS("v5",80,eT);const rT=tT;class Nd extends Error{constructor(e,r,n){super(r),this.type=e,this.cause=n}}const _i=(...t)=>Ai(e=>t.includes(e.type));var dt=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},nT=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,r,n,o){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?o.call(t,r):o?o.value=r:e.set(t,r),r},vr,rr;class By extends Ie{get action$(){return dt(this,vr,"f").asObservable()}get value(){return dt(this,rr,"f").value}get closed(){return dt(this,rr,"f").closed||dt(this,vr,"f").closed}constructor(e,r){super(n=>dt(this,rr,"f").subscribe(n)),this.__initial=r,vr.set(this,new Gr),rr.set(this,void 0),nT(this,rr,new gl(r),"f"),dt(this,vr,"f").pipe(Fh(e,r),my()).subscribe(dt(this,rr,"f"))}next(e){dt(this,vr,"f").next(e)}addEffect(e,r){const n=typeof e=="string"?this.action$.pipe(_i(e)):this.action$,o=r||e;return n.pipe(mo(i=>br(new Promise((a,s)=>{try{a(o(i,this.value))}catch(c){s(c)}})).pipe(rn(a=>(console.warn("unhandled effect",a),po)))),Ai(i=>!!i),Oc(Nc)).subscribe(dt(this,vr,"f"))}addEpic(e){const r=e(this.action$,this);if(!r)throw new TypeError(`addEpic: one of the provided effects "${e.name||"<anonymous>"}" does not return a stream. Double check you're not missing a return statement!`);return r.pipe(rn(n=>(console.trace("unhandled exception, epic closed!",n),po)),Oc(Nc)).subscribe(dt(this,vr,"f"))}reset(){dt(this,rr,"f").next(this.__initial)}unsubscribe(){dt(this,vr,"f").unsubscribe(),dt(this,rr,"f").unsubscribe()}complete(){dt(this,vr,"f").complete(),dt(this,rr,"f").complete()}asObservable(){return dt(this,rr,"f").asObservable()}}vr=new WeakMap,rr=new WeakMap;class Od extends Error{constructor(e,r,n){super(n!=null?n:r.message),this.action=e,this.cause=r}}const qy=t=>(e,r)=>new Ie(n=>{const{meta:{controller:o,transaction:i}}=e;if(o.signal.aborted)return n.next({type:"cancel",payload:{transaction:i,reason:`request [${i}] was aborted!`}}),n.complete();if(n.add(t.pipe(_i("cancel")).subscribe(a=>{a.payload.transaction===i&&(o.signal.aborted||o.abort(),n.complete())})),n.add(vd(o.signal,"abort").subscribe(()=>{n.next({type:"cancel",payload:{transaction:i,reason:`request [${i}] was aborted!`}}),n.complete()})),r)return r(n)}),oT=t=>(t=Object.assign({},{count:0,delay:0},t),(e,r)=>{const n=qy(e);return e.pipe(_i("failure"),iC(r),Qn(([o,i])=>{var a,s;const{request:c}=o.meta,{transaction:l}=c.meta,u=i[l];if(!u)return po;const h=(s=(a=u.retry)===null||a===void 0?void 0:a.length)!==null&&s!==void 0?s:0,d={type:"retry",payload:o.meta.request},f=Object.assign({},t,c.meta.retry);return n(c,m=>{if(h>=f.count){const E=f.count?"maximum retries executed!":o.payload.message;return m.next({type:"error",payload:new Od(o,o.payload.cause,E),meta:{request:c}}),m.complete()}return(typeof f.delay=="function"?br(f.delay(o.payload.cause)):YE(f.delay)).pipe(yt(()=>d),rn(E=>ml({type:"error",payload:new Od(d,E,"failed to resolve delay"),meta:{request:c}}))).subscribe(m)})}))}),iT=t=>e=>{const r=qy(e);return e.pipe(_i("request","retry"),mo(n=>{const o=n.type==="request"?n:n.payload;return r(o,i=>{br(t(o.payload,o.meta.controller.signal)).pipe(yt(a=>({type:"success",payload:a,meta:{request:o}})),rn(a=>ml({type:"failure",payload:new Od(n,a,`failed to execute request for transaction ${o.meta.transaction}`),meta:{request:o}}))).subscribe(i)})}))},Ky=()=>Ai(t=>t.status==="complete"),aT=()=>(t,e)=>{switch(e.type){case"request":{const{transaction:r,task:n,ref:o}=e.meta;return Object.assign({},t,{[r]:{transaction:r,task:n,ref:o,created:Date.now()}})}case"retry":{const{transaction:r}=e.payload.meta,n=Object.assign({},t[r]);if(n)return n.retry=n.retry?[...n.retry,Date.now()]:[],Object.assign({},t,{[r]:n});break}case"failure":{const{transaction:r}=e.meta.request.meta,n=Object.assign({},t[r]);if(n)return n.errors=n.errors?[...n.errors,e.payload]:[],Object.assign({},t,{[r]:n});break}case"cancel":{const{transaction:r,reason:n}=e.payload,o=t[r];if(o){o.task.error(new Nd("abort","request was canceled",new Error(n)));const i=Object.assign({},t);return delete i[r],i}break}case"error":{const{transaction:r}=e.meta.request.meta,n=t[r];if(n){n.task.error(new Nd("error","failed to execute request",e.payload));const o=Object.assign({},t);return delete o[r],o}break}case"success":{const{request:r}=e.meta,{transaction:n,ref:o}=r.meta,i=t[n];if(i){const a={status:"complete",transaction:n,ref:o,value:e.payload,args:r.payload,created:i.created,completed:Date.now()};i.task.next(a),i.task.complete();const s=Object.assign({},t);return delete s[n],s}break}}return t};var sT=globalThis&&globalThis.__awaiter||function(t,e,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(u){try{l(n.next(u))}catch(h){a(h)}}function c(u){try{l(n.throw(u))}catch(h){a(h)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((n=n.apply(t,e||[])).next())})},We=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},jp=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,r,n,o){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?o.call(t,r):o?o.value=r:e.set(t,r),r},Je,Ao;class Bp extends Ie{get action$(){return We(this,Je,"f").action$}get closed(){return We(this,Je,"f").closed}get success$(){return this.action$.pipe(_i("success"),yt(({payload:e})=>e))}get error$(){return this.action$.pipe(_i("error"),yt(({payload:e})=>new Nd("error","failed to execute request",e)))}constructor(e,r){super(o=>We(this,Je,"f").subscribe(o)),Je.set(this,void 0),Ao.set(this,void 0),jp(this,Je,new By(aT(),{}),"f"),jp(this,Ao,new an(()=>We(this,Je,"f").complete()),"f"),We(this,Ao,"f").add(We(this,Je,"f").addEpic(iT(e)));const n=Object.assign({count:0,delay:0},r==null?void 0:r.retry);We(this,Ao,"f").add(We(this,Je,"f").addEpic(oT(n)))}next(e,r){return this._next(e,r).meta}nextAsync(e,r){return sT(this,void 0,void 0,function*(){return go(this.next(e,r).task.pipe(Ky()))})}getTaskByTransaction(e){const r=We(this,Je,"f").value[e];return r&&r.task}getTaskByRef(e){const r=Object.values(We(this,Je,"f").value).find(n=>n.ref===e);return r&&r.task}cancel(e,r){if(e&&We(this,Je,"f").value[e])r!=null||(r=`[${e}]: transaction canceled`),We(this,Je,"f").next({type:"cancel",payload:{transaction:e,reason:r}});else for(const n of Object.keys(We(this,Je,"f").value))this.cancel(n,`[${e}]: all transactions canceled`)}on(e,r){return We(this,Je,"f").addEffect(e,n=>{r(n,this)})}complete(){We(this,Ao,"f").unsubscribe()}asObservable(){return We(this,Je,"f").asObservable()}_next(e,r){const n=Object.assign({transaction:jy(),controller:new AbortController,task:new ey},r!=null?r:{}),o={type:"request",payload:e,meta:n};return We(this,Je,"f").next(o),o}}Je=new WeakMap,Ao=new WeakMap;const cT=(t,e)=>{var r,n;return((r=e.updated)!==null&&r!==void 0?r:0)-((n=t.updated)!==null&&n!==void 0?n:0)},lT=()=>(t,e)=>{var r,n,o,i,a;const{type:s,payload:c}=e;switch(s){case"set":{const{key:l,value:u}=c,h=t.data[l],d=Object.assign(Object.assign(Object.assign({},h),u),{created:(r=h==null?void 0:h.created)!==null&&r!==void 0?r:Date.now(),updated:Date.now(),updates:((n=h==null?void 0:h.updates)!==null&&n!==void 0?n:-1)+1}),f=Object.assign(Object.assign({},t.data),{[l]:d});return Object.assign(Object.assign({},t),{data:f,lastTransaction:d.transaction})}case"clear":{const l=Object.assign({},t.data);return delete l[c.key],Object.assign(Object.assign({},t),{data:l})}case"invalidate":{const{key:l}=c,u=t.data[l];if(u){const h=Object.assign(Object.assign({},t.data),{[l]:Object.assign(Object.assign({},u),{updated:void 0})});return Object.assign(Object.assign({},t),{data:h})}break}case"reset":return{data:(o=c.data)!==null&&o!==void 0?o:{}};case"trim":{const l=(i=c.sort)!==null&&i!==void 0?i:cT,h=Object.entries(t.data).sort((f,m)=>l(f[1],m[1])).filter(([f,m])=>!c.validate||c.validate(m)).slice(0,(a=c.size)!==null&&a!==void 0?a:Number.MAX_SAFE_INTEGER).reduce((f,[m,v])=>Object.assign(f,{[m]:v}),{});return Object.keys(h).length===Object.keys(t.data).length?t:{lastTransaction:t.lastTransaction&&Object.keys(h).includes(t.lastTransaction)?t.lastTransaction:Object.values(h)[0].transaction,data:h}}}return t},uT=t=>{const e=t.lastTransaction,r=Object.values(t.data);return e?r.find(n=>n.transaction===e):r.sort((n,o)=>{var i,a;return((i=n.updated)!==null&&i!==void 0?i:0)-((a=o.updated)!==null&&a!==void 0?a:0)}).pop()};class qp extends By{get data$(){return this.pipe(yt(e=>e.data))}get latest(){return uT(this.value)}constructor(e){const{trimming:r,initial:n}=e;super(lT(),{data:n!=null?n:{}}),r&&this.addEffect("set",()=>this.trim(r))}setItem(e,r){this.next({type:"set",payload:{key:e,value:r}})}getItem(e){return this.value.data[e]}invalidate(e){this.next({type:"invalidate",payload:{key:e}})}trim(e){this.next({type:"trim",payload:e})}}var me=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Io=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,r,n,o){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?o.call(t,r):o?o.value=r:e.set(t,r),r},dT=globalThis&&globalThis.__rest||function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]]);return r},Kn,nr,Ur,Ro,Po,Js,xd;const hT=(t=0)=>e=>{var r;return((r=e.updated)!==null&&r!==void 0?r:0)+t>Date.now()};class Kt extends Ie{get client(){return me(this,nr,"f")}get state$(){return me(this,Ur,"f")}constructor(e){var r,n;super(i=>me(this,Ur,"f").pipe(yt(({data:a})=>a)).subscribe(i)),Kn.set(this,new an),nr.set(this,void 0),Ur.set(this,void 0),Ro.set(this,new Gr),Po.set(this,void 0),Js.set(this,void 0),xd.set(this,jy()),Io(this,Po,i=>rT(e.key(i),me(this,xd,"f")),"f"),Io(this,Js,(r=e==null?void 0:e.validate)!==null&&r!==void 0?r:hT(e==null?void 0:e.expire),"f"),e.client instanceof Bp?Io(this,nr,e.client,"f"):(Io(this,nr,new Bp(e.client.fn,e.client.options),"f"),me(this,Kn,"f").add(()=>me(this,nr,"f").complete())),e.cache instanceof qp?Io(this,Ur,e.cache,"f"):(Io(this,Ur,new qp(e.cache||{}),"f"),me(this,Kn,"f").add(()=>me(this,Ur,"f").complete()));const o=(n=e.queueOperator)!==null&&n!==void 0?n:BS;me(this,Kn,"f").add(()=>me(this,Ro,"f").complete()),me(this,Kn,"f").add(me(this,Ro,"f").pipe(o(({args:i,options:a})=>new Ie(s=>{const{task:c,transaction:l}=me(this,nr,"f").next(i,a);s.add(c.pipe(rn(()=>po)).subscribe(s)),s.add(()=>{me(this,nr,"f").cancel(l)})})),Ky(),_y(()=>!me(this,nr,"f").closed)).subscribe(i=>{const{args:a,value:s,transaction:c,ref:l}=i,u=l!=null?l:me(this,Po,"f").call(this,a);me(this,Ur,"f").setItem(u,{value:s,args:a,transaction:c})}))}next(e,r){me(this,Ro,"f").next({args:e,options:r})}query(e,r){var n;const o=me(this,Po,"f").call(this,e);return(n=me(this,nr,"f").getTaskByRef(o))!==null&&n!==void 0?n:this._createTask(o,e,r)}queryAsync(e,r){const n=r||{},{awaitResolve:o}=n,i=dT(n,["awaitResolve"]);return(o?xc:go)(this._query(e,i))}complete(){me(this,Kn,"f").unsubscribe()}_query(e,r){var n;const o=me(this,Po,"f").call(this,e);return(n=me(this,nr,"f").getTaskByRef(o))!==null&&n!==void 0?n:this._createTask(o,e,r)}_createTask(e,r,n){var o;const i=new ey,a=me(this,Ur,"f").getItem(e);if(a){const{value:l,args:u,created:h,updated:d,updates:f,transaction:m}=a,v={status:"cache",value:l,args:u,created:h,updated:d,updates:f,transaction:m};i.next(v)}const s=((o=n==null?void 0:n.cache)===null||o===void 0?void 0:o.validate)||me(this,Js,"f");return a&&s(a,r)?i.complete():me(this,Ro,"f").next({args:r,options:{ref:e,task:i}}),i.asObservable()}}Kn=new WeakMap,nr=new WeakMap,Ur=new WeakMap,Ro=new WeakMap,Po=new WeakMap,Js=new WeakMap,xd=new WeakMap;Kt.extractQueryValue=qS;var dn=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Kp=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,r,n,o){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?o.call(t,r):o?o.value=r:e.set(t,r),r},na,Lr;class fT extends Ie{get currentContext(){return dn(this,Lr,"f").value}get currentContext$(){return dn(this,Lr,"f").asObservable()}get client(){return dn(this,na,"f")}constructor(e){super(r=>dn(this,Lr,"f").subscribe(r)),na.set(this,void 0),Lr.set(this,void 0),Kp(this,na,new Kt(e.query),"f"),Kp(this,Lr,new gl(e.initial),"f")}setCurrentContext(e){typeof e=="string"?this.resolveContext(e).pipe(rn(()=>po)).subscribe(r=>dn(this,Lr,"f").next(r)):e!==dn(this,Lr,"f").value&&dn(this,Lr,"f").next(e)}resolveContext(e){return dn(this,na,"f").query({id:e}).pipe(yt(r=>r.value))}}na=new WeakMap,Lr=new WeakMap;var ht=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},qi=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,r,n,o){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?o.call(t,r):o?o.value=r:e.set(t,r),r},Dr,Xs,oa,No,Zs,ia;class pT{get contextClient(){return ht(this,Dr,"f")}get queryClient(){return ht(this,Xs,"f")}queryContext(e){const r=this.queryClient.query({search:e,filter:{type:ht(this,Zs,"f")}}).pipe(yt(n=>n.value));return ht(this,ia,"f")?r.pipe(yt(ht(this,ia,"f"))):r}queryContextAsync(e){return xc(this.queryContext(e))}get currentContext$(){return ht(this,Dr,"f").currentContext$}get currentContext(){return ht(this,Dr,"f").currentContext}set currentContext(e){ht(this,oa,"f")?ht(this,oa,"f").dispatchEvent("onCurrentContextChange",{source:this,canBubble:!0,cancelable:!0,detail:{context:e}}).then(r=>{r.canceled||ht(this,Dr,"f").setCurrentContext(e)}):ht(this,Dr,"f").setCurrentContext(e)}constructor(e){Dr.set(this,void 0),Xs.set(this,void 0),oa.set(this,void 0),No.set(this,new an),Zs.set(this,void 0),ia.set(this,void 0);const{config:r,event:n,parentContext:o}=e;qi(this,Zs,r.contextType,"f"),qi(this,ia,r.contextFilter,"f"),qi(this,Dr,new fT(r.getContext),"f"),qi(this,Xs,new Kt(r.queryContext),"f"),n&&(qi(this,oa,n,"f"),ht(this,No,"f").add(ht(this,Dr,"f").currentContext$.pipe(yy()).subscribe(([i,a])=>{n.dispatchEvent("onCurrentContextChanged",{source:this,canBubble:!0,detail:{previous:i,next:a}})})),ht(this,No,"f").add(n.addEventListener("onCurrentContextChanged",i=>{i.source!==this&&(this.currentContext=i.detail.next)}))),o&&ht(this,No,"f").add(o.contextClient.currentContext$.subscribe(i=>this.currentContext=i))}dispose(){ht(this,No,"f").unsubscribe()}}Dr=new WeakMap,Xs=new WeakMap,oa=new WeakMap,No=new WeakMap,Zs=new WeakMap,ia=new WeakMap;var gT=globalThis&&globalThis.__awaiter||function(t,e,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(u){try{l(n.next(u))}catch(h){a(h)}}function c(u){try{l(n.throw(u))}catch(h){a(h)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const mT="context",vT={name:mT,configure:()=>new jS,initialize:t=>gT(void 0,void 0,void 0,function*(){var e;const r=yield t.config.createConfig(t),n=t.hasModule("event")?yield t.requireInstance("event"):void 0,o=(e=t.ref)===null||e===void 0?void 0:e.context;return new pT({config:r,event:n,parentContext:o})}),dispose:t=>{t.instance.dispose()}},yT="modulepreload",_T=function(t){return"/"+t},Gp={},wT=function(e,r,n){if(!r||r.length===0)return e();const o=document.getElementsByTagName("link");return Promise.all(r.map(i=>{if(i=_T(i),i in Gp)return;Gp[i]=!0;const a=i.endsWith(".css"),s=a?'[rel="stylesheet"]':"";if(!!n)for(let u=o.length-1;u>=0;u--){const h=o[u];if(h.href===i&&(!a||h.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${s}`))return;const l=document.createElement("link");if(l.rel=a?"stylesheet":yT,a||(l.as="script",l.crossOrigin=""),l.href=i,document.head.appendChild(l),a)return new Promise((u,h)=>{l.addEventListener("load",u),l.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>e())},ET=(t,e)=>JSON.stringify(t)===JSON.stringify(e);var ft=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Os=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,r,n,o){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?o.call(t,r):o?o.value=r:e.set(t,r),r},Oo,aa,sa,xo,hn;class CT extends Ie{get current(){return ft(this,xo,"f").value}get current$(){return ft(this,xo,"f").pipe(my(ET))}constructor(e){super(o=>this.current$.subscribe(o)),Oo.set(this,void 0),aa.set(this,void 0),sa.set(this,void 0),xo.set(this,void 0),hn.set(this,new an);const{event:r,config:n}=e;Os(this,xo,new gl(void 0),"f"),Os(this,Oo,new Kt(n.getApp),"f"),Os(this,aa,new Kt(n.getApps),"f"),Os(this,sa,new Kt(n.getConfig),"f"),ft(this,hn,"f").add(ft(this,Oo,"f").complete),ft(this,hn,"f").add(ft(this,aa,"f").complete),ft(this,hn,"f").add(ft(this,sa,"f").complete),ft(this,hn,"f").add(this.current$.pipe(yy(),_y(()=>!!r)).subscribe(([o,i])=>{r==null||r.dispatchEvent("onCurrentAppChanged",{source:this,detail:{previous:o,next:i}})}))}getApp(e){return Kt.extractQueryValue(ft(this,Oo,"f").query({appKey:e}).pipe(rn(r=>{throw Error("failed to load manifest",{cause:r})})))}getAllApps(){return Kt.extractQueryValue(ft(this,aa,"f").query())}getAppConfig(e,r){return Kt.extractQueryValue(ft(this,sa,"f").query({appKey:e,tag:r}).pipe(rn(n=>{throw Error("failed to load config",{cause:n})})))}setCurrentApp(e){return new Promise((r,n)=>{const o=ft(this,Oo,"f").query({appKey:e});ft(this,hn,"f").add(Kt.extractQueryValue(o).subscribe({next:i=>ft(this,xo,"f").next(i),error:n,complete:r}))})}loadApp(e){const r=this.getApp(e).pipe(Qn(o=>go(br(wT(()=>import(o.entry),[])).pipe(yt(i=>({manifest:o,module:i})))))),n=this.getAppConfig(e).pipe(yt(o=>({config:o})));return QE(r,n).pipe(Fh((o,i)=>Object.assign({},o,i),{}),Ai(o=>["manifest","module","config"].every(i=>!!o[i])),vy(()=>"failed to load application"))}dispose(){ft(this,hn,"f").unsubscribe()}}Oo=new WeakMap,aa=new WeakMap,sa=new WeakMap,xo=new WeakMap,hn=new WeakMap;var ST=globalThis&&globalThis.__awaiter||function(t,e,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(u){try{l(n.next(u))}catch(h){a(h)}}function c(u){try{l(n.throw(u))}catch(h){a(h)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const Md="app",TT={name:Md,configure:()=>new bT,initialize:t=>ST(void 0,void 0,void 0,function*(){const e=yield t.config.createConfig(t),r=yield t.requireInstance("event").catch(()=>{});return new CT({config:e,event:r})}),dispose:t=>{t.instance.dispose()}};var Vp=globalThis&&globalThis.__awaiter||function(t,e,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(u){try{l(n.next(u))}catch(h){a(h)}}function c(u){try{l(n.throw(u))}catch(h){a(h)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};class bT{constructor(){this.defaultExpireTime=1*60*1e3}_createHttpClient(e){return Vp(this,void 0,void 0,function*(){const r=yield e.requireInstance("http");if(r.hasClient(Md))return r.createClient(Md);{const n=yield e.requireInstance("serviceDiscovery");try{return yield n.createClient("app")}catch{return yield n.createClient("portal")}}})}createConfig(e){return Vp(this,void 0,void 0,function*(){const r=yield this._createHttpClient(e),n={getApp:{client:{fn:({appKey:o})=>r.json$(`/api/apps/${o}`)},key:({appKey:o})=>o},getApps:{client:{fn:()=>r.json$("/api/apps")},key:()=>"apps"},getConfig:{client:{fn:({appKey:o,tag:i})=>r.json$(`/api/apps/${o}/config${i?`?tag=${i}`:""}`)},key:o=>JSON.stringify(o)}};return this.processConfig(n)})}processConfig(e){return e}}var Wp=globalThis&&globalThis.__awaiter||function(t,e,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(u){try{l(n.next(u))}catch(h){a(h)}}function c(u){try{l(n.throw(u))}catch(h){a(h)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};class IT{constructor(e){this.clientKey=e.clientKey,this.endpoint=e.endpoint,this.clientCtor=e.clientCtor}createHttpClientClient(e){return Wp(this,void 0,void 0,function*(){if(!this.clientKey)throw Error("no http client for service discovery is provided!");return e.createClient(this.clientKey)})}createClient(e){return Wp(this,void 0,void 0,function*(){if(!this.endpoint)throw Error("no endpoint defined!");return new this.clientCtor({http:e,endpoint:this.endpoint})})}}var cu=globalThis&&globalThis.__awaiter||function(t,e,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(u){try{l(n.next(u))}catch(h){a(h)}}function c(u){try{l(n.throw(u))}catch(h){a(h)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};class kT{constructor(e,r){this._client=e,this._http=r}get environment(){return this._client.environment}resolveService(e){return cu(this,void 0,void 0,function*(){return this._client.resolveService(e)})}createClient(e,r){return cu(this,void 0,void 0,function*(){const n=yield this.resolveService(e);if(!n)throw Error(`Could not load configuration of service [${e}]`);return this._http.createClient(Object.assign(Object.assign({},r),{baseUri:n.uri,defaultScopes:n.defaultScopes}))})}configureClient(e,r){return cu(this,void 0,void 0,function*(){const{key:n,alias:o}=typeof e=="string"?{key:e,alias:e}:e,{uri:i,defaultScopes:a}=yield this.resolveService(n);r.addConfig(Cy(o,{baseUri:i,defaultScopes:a}))})}}var Yp=globalThis&&globalThis.__awaiter||function(t,e,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(u){try{l(n.next(u))}catch(h){a(h)}}function c(u){try{l(n.throw(u))}catch(h){a(h)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((n=n.apply(t,e||[])).next())})},AT=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},RT=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,r,n,o){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?o.call(t,r):o?o.value=r:e.set(t,r),r},ec;class PT{get environment(){return go(Kt.extractQueryValue(AT(this,ec,"f").query(void 0,{cache:{suppressInvalid:!0}})))}constructor({http:e,endpoint:r}){ec.set(this,void 0),this.http=e,this.endpoint=r,RT(this,ec,new Kt({client:{fn:()=>e.fetch$(r,{selector:this.selector.bind(this)}).pipe(yd(n=>console.log("\u{1F525}",n)))},key:()=>"services",expire:5*60*1e3}),"f")}selector(e){return Yp(this,void 0,void 0,function*(){const r=yield e.json(),n=r.services.reduce((o,i)=>Object.assign(o,{[i.key]:{clientId:r.clientId,uri:i.uri,defaultScopes:[r.clientId+"/.default"]}}),{});return Object.assign(Object.assign({},r),{services:n})})}resolveService(e){return Yp(this,void 0,void 0,function*(){try{const{services:r}=yield this.environment;return r[e]}catch(r){throw console.error(r),r}})}}ec=new WeakMap;const NT="serviceDiscovery";var OT=globalThis&&globalThis.__awaiter||function(t,e,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(u){try{l(n.next(u))}catch(h){a(h)}}function c(u){try{l(n.throw(u))}catch(h){a(h)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const xT={name:NT,configure:()=>new IT({clientCtor:PT,clientKey:"service_discovery",endpoint:"/_discovery/environments/current"}),initialize:({config:t,requireInstance:e})=>OT(void 0,void 0,void 0,function*(){const r=yield e("http"),n=yield t.createHttpClientClient(r),o=yield t.createClient(n);return new kT(o,r)})};class MT{}class Gy extends Error{constructor(e,r){super(`unsupported version ${e}`,{cause:r}),this.version=e}}const UT=(t,e)=>{var r;const n=(r=Qr[t])!==null&&r!==void 0?r:t;switch(n){case Qr.v2:throw new Gy(t);case Qr.v1:default:{const{id:o}=e,i=new URLSearchParams;return i.append("api-version",n),`/contexts/${o}/?${String(i)}`}}},LT=(t,e,r)=>[UT(t,e),r],DT=(t,e,r="json")=>(n,o)=>t[r](...LT(e,n,o));var HT=["eq","ne","gt","ge","lt","le"],xs=["and","or","not"],FT=["any","all"],$T=["startswith","endswith","contains"],zT=["expand","levels","select","skip","top","count","orderby","filter"],Qp=/\((.*)\)/,Jp=/(?!indexof)\((\w+)\)/,Xp;(function(t){t.sum="sum",t.min="min",t.max="max",t.average="average",t.countdistinct="countdistinct"})(Xp||(Xp={}));var Mr="";function jT(t){var e=t===void 0?{}:t,r=e.select,n=e.search,o=e.skiptoken,i=e.format,a=e.top,s=e.skip,c=e.filter,l=e.transform,u=e.orderBy,h=e.key,d=e.count,f=e.expand,m=e.action,v=e.func,E="",g=[],p={};if(h!=null&&(E+="(".concat(Cr(h,g),")")),(c||typeof d=="object")&&(p.$filter=qa(typeof d=="object"?d:c,g)),l&&(p.$apply=Vy(l)),f&&(p.$expand=tc(f)),u&&(p.$orderby=Kh(u)),d&&(typeof d=="boolean"?p.$count=!0:E+="/$count"),typeof a=="number"&&(p.$top=a),typeof s=="number"&&(p.$skip=s),m&&(E+="/".concat(m)),v){if(typeof v=="string")E+="/".concat(v);else if(typeof v=="object"){var y=Object.keys(v)[0],w=Cr(v[y],g);E+="/".concat(y),w!==""&&(E+="(".concat(w,")"))}}return g.length>0&&Object.assign(p,g.reduce(function(k,P){var M;return Object.assign(k,(M={},M["@".concat(P.name)]=Cr(P.value),M))},{})),VT(E,ho({$select:r,$search:n,$skiptoken:o,$format:i},p))}function lu(t,e,r){return r===void 0&&(r=[]),"".concat(t," eq ").concat(Cr(e,r))}function qa(t,e,r){return t===void 0&&(t={}),e===void 0&&(e=[]),r===void 0&&(r=""),(Array.isArray(t)?t:[t]).reduce(function(i,a){if(a){var s=n(a,e,r);s&&i.push(s)}return i},[]).join(" and ");function n(i,a,s){i===void 0&&(i={}),a===void 0&&(a=[]),s===void 0&&(s="");var c="";if(typeof i=="string")c=i;else if(i&&typeof i=="object"){var l=Object.keys(i).reduce(function(u,h){var d=i[h];if(d===void 0)return u;var f="";if(s?h===Mr?f=s:Jp.test(h)?f=h.replace(Jp,function(p,y){return y.trim()===Mr?"(".concat(s,")"):"(".concat(s,"/").concat(y.trim(),")")}):Qp.test(h)?f=h.replace(Qp,function(p,y){return y.trim()===Mr?"(".concat(s,")"):"(".concat(s,"/").concat(y.trim(),")")}):f="".concat(s,"/").concat(h):f=h,h===Mr&&Array.isArray(d))return u.concat(d.map(function(p){return lu(f,p)}));if(["number","string","boolean"].indexOf(typeof d)!==-1||d instanceof Date||d===null)u.push(lu(f,d,a));else if(Array.isArray(d)){var m=h,v=d.map(function(p){return qa(p,a,s)}).filter(function(p){return p}).map(function(p){return xs.indexOf(m)!==-1?"(".concat(p,")"):p});v.length&&(xs.indexOf(m)!==-1?v.length&&(m==="not"?u.push(Zp(v)):u.push("(".concat(v.join(" ".concat(m," ")),")"))):u.push(v.join(" ".concat(m," "))))}else if(xs.indexOf(f)!==-1){var E=f,v=Object.keys(d).map(function(y){var w;return n((w={},w[y]=d[y],w))});v.length&&(E==="not"?u.push(Zp(v)):u.push("(".concat(v.join(" ".concat(E," ")),")")))}else if(typeof d=="object")if("type"in d)u.push(lu(f,d,a));else{var g=Object.keys(d);g.forEach(function(p){if(d[p]!==void 0)if(HT.indexOf(p)!==-1)u.push("".concat(f," ").concat(p," ").concat(Cr(d[p],a)));else if(xs.indexOf(p)!==-1)Array.isArray(d[p])?u.push(d[p].map(function(P){return"("+n(P,a,f)+")"}).join(" ".concat(p," "))):u.push("("+n(d[p],a,f)+")");else if(FT.indexOf(p)!==-1){var y=o(h.toLowerCase(),d[p],p,f);y&&u.push(y)}else if(p==="has")u.push("".concat(f," ").concat(p," ").concat(Cr(d[p],a)));else if(p==="in"){var w=Array.isArray(d[p])?d[p]:d[p].value.map(function(P){return{type:d[p].type,value:P}});u.push(f+" in ("+w.map(function(P){return Cr(P,a)}).join(",")+")")}else if($T.indexOf(p)!==-1)u.push("".concat(p,"(").concat(f,",").concat(Cr(d[p],a),")"));else{var k=n(d,a,f);k&&u.push(k)}})}else throw new Error("Unexpected value type: ".concat(d));return u},[]);c=l.join(" and ")}return c}function o(i,a,s,c){var l="";if(typeof a=="string"||a instanceof String)l=BT(i,a,s,c);else if(a){var u=Array.isArray(a)?a.reduce(function(d,f){return f.hasOwnProperty(Mr)?(d.hasOwnProperty(Mr)||(d[Mr]=[]),d[Mr].push(f[Mr]),d):ho(ho({},d),f)},{}):a,h=n(u,e,i);l="".concat(c,"/").concat(s,"(").concat(h?"".concat(i,":").concat(h):"",")")}return l}}function BT(t,e,r,n){var o="",i=r=="all"?"ne":"eq";return o="".concat(n,"/").concat(r,"(").concat(t,": ").concat(t," ").concat(i," '").concat(e,"')"),o}function qT(t){return t=t.replace(/%/g,"%25"),t=t.replace(/\+/g,"%2B"),t=t.replace(/\//g,"%2F"),t=t.replace(/\?/g,"%3F"),t=t.replace(/#/g,"%23"),t=t.replace(/&/g,"%26"),t=t.replace(/'/g,"''"),t}function Cr(t,e){if(typeof t=="string")return"'".concat(qT(t),"'");if(t instanceof Date)return t.toISOString();if(typeof t=="number")return t;if(Array.isArray(t))return"[".concat(t.map(function(r){return Cr(r)}).join(","),"]");if(t===null)return t;if(typeof t=="object")switch(t.type){case"raw":case"guid":return t.value;case"duration":return"duration'".concat(t.value,"'");case"binary":return"binary'".concat(t.value,"'");case"alias":return Array.isArray(e)&&e.push(t),"@".concat(t.name);case"json":return escape(JSON.stringify(t.value));case"decimal":return"".concat(t.value,"M");default:return Object.entries(t).filter(function(r){var n=r[1];return n!==void 0}).map(function(r){var n=r[0],o=r[1];return"".concat(n,"=").concat(Cr(o,e))}).join(",")}return t}function tc(t){if(typeof t=="number")return t;if(typeof t=="string")return t.indexOf("/")===-1?t:t.split("/").reverse().reduce(function(r,n,o,i){return o===0?"$expand=".concat(n):o===i.length-1?"".concat(n,"(").concat(r,")"):"$expand=".concat(n,"(").concat(r,")")},"");if(Array.isArray(t))return"".concat(t.map(function(r){return tc(r)}).join(","));if(typeof t=="object"){var e=Object.keys(t);return e.some(function(r){return zT.indexOf(r.toLowerCase())!==-1})?e.map(function(r){var n;switch(r){case"filter":n=qa(t[r]);break;case"orderBy":n=Kh(t[r]);break;case"levels":case"count":case"skip":case"top":n="".concat(t[r]);break;default:n=tc(t[r])}return"$".concat(r.toLowerCase(),"=").concat(n)}).join(";"):e.map(function(r){var n=tc(t[r]);return n?"".concat(r,"(").concat(n,")"):r}).join(",")}return""}function Vy(t){var e=Array.isArray(t)?t:[t],r=e.reduce(function(n,o){var i=o.aggregate,a=o.filter,s=o.groupBy,c=Yv(o,["aggregate","filter","groupBy"]),l=Object.keys(c);if(l.length)throw new Error("Unsupported transform(s): ".concat(l));if(i&&n.push("aggregate(".concat(KT(i),")")),a){var u=qa(a);u&&n.push("filter(".concat(qa(u),")"))}return s&&n.push("groupby(".concat(GT(s),")")),n},[]);return r.join("/")||void 0}function KT(t){var e=Array.isArray(t)?t:[t];return e.map(function(r){return typeof r=="string"?r:Object.keys(r).map(function(n){var o=r[n];if(!o.with)throw new Error("'with' property required for '".concat(n,"'"));if(!o.as)throw new Error("'as' property required for '".concat(n,"'"));return"".concat(n," with ").concat(o.with," as ").concat(o.as)})}).join(",")}function GT(t){if(!t.properties)throw new Error("'properties' property required for groupBy");var e="(".concat(t.properties.join(","),")");return t.transform&&(e+=",".concat(Vy(t.transform))),e}function Kh(t,e){return e===void 0&&(e=""),Array.isArray(t)?t.map(function(r){return Array.isArray(r)&&r.length===2&&["asc","desc"].indexOf(r[1])!==-1?r.join(" "):r}).map(function(r){return"".concat(e).concat(String(r))}).join(","):typeof t=="object"?Object.entries(t).map(function(r){var n=r[0],o=r[1];return Kh(o,"".concat(n,"/"))}).map(function(r){return"".concat(e).concat(r)}).join(","):"".concat(e).concat(String(t))}function VT(t,e){var r=Object.getOwnPropertyNames(e).filter(function(n){return e[n]!==void 0&&e[n]!==""}).map(function(n){return"".concat(n,"=").concat(e[n])});return r.length?"".concat(t,"?").concat(r.join("&")):t}function Zp(t){return"not(".concat(t.join(" and "),")")}const WT=t=>Object.keys(t).reduce((e,r)=>{var n;switch(r){case"type":return!((n=t[r])===null||n===void 0)&&n.length?Object.assign(Object.assign({},e),{[r]:{in:t[r]}}):e;default:return Object.assign(Object.assign({},e),{[r]:t[r]})}},{}),YT=t=>Object.keys(t).reduce((e,r)=>{switch(r){case"filter":return Object.assign(Object.assign({},e),{[r]:WT(t.filter)});default:return Object.assign(Object.assign({},e),{[r]:t[r]})}},{}),QT=t=>typeof t=="string"?t:jT(YT(t)),JT=(t,e)=>{var r;const n=(r=Qr[t])!==null&&r!==void 0?r:t;switch(n){case Qr.v2:throw new Gy(t);case Qr.v1:default:{const{query:o,includeDeleted:i}=e,a=new URLSearchParams(QT(o));return a.append("api-version",n),i&&a.append("includeDeleted","true"),`/contexts/?${String(a)}`}}},XT=(t,e,r)=>[JT(t,e),r],ZT=(t,e,r="json")=>(n,o)=>t[r](...XT(e,n,o));class e1{get Version(){return Qr}constructor(e,r){this._client=e,this._method=r}get(e,...r){return DT(this._client,e,this._method)(...r)}query(e,...r){return ZT(this._client,e,this._method)(...r)}}var Qr;(function(t){t.v1="1.0",t.v2="2.0"})(Qr||(Qr={}));const t1=(t,e)=>{switch(t){case"v1":{const{id:r}=e,n=new URLSearchParams;return n.append("api-version","1.0"),`/bookmarks/${r}/?${String(n)}`}default:{const{id:r}=e,n=new URLSearchParams;return n.append("api-version",t),`/bookmarks/${r}/?${String(n)}`}}},r1=(t,e,r)=>{const n=t1(t,e),o=Object.assign({},{method:"Delete"},r);return[n,o]},n1=(t,e,r="json")=>(n,o)=>t[r](...r1(e,n,o)),o1=n1,i1=(t,e)=>{switch(t){case"v1":{const{id:r}=e,n=new URLSearchParams;return n.append("api-version","1.0"),`/bookmarks/${r}/?${String(n)}`}default:{const{id:r}=e,n=new URLSearchParams;return n.append("api-version",t),`/bookmarks/${r}/?${String(n)}`}}},a1=(t,e,r)=>[i1(t,e),r],s1=(t,e,r="json")=>(n,o)=>t[r](...a1(e,n,o)),c1=s1,l1=(t,e)=>{switch(t){case"v1":{const r=new URLSearchParams;return r.append("api-version","1.0"),`/bookmarks?${String(r)}`}default:{const r=new URLSearchParams;return r.append("api-version",t),`/bookmarks?${String(r)}`}}},u1=(t,e,r)=>{const n=l1(t),o=new Headers;o.append("content-type","application/json");const i=Object.assign({},{method:"post",body:JSON.stringify(e),headers:o},r);return[n,i]},d1=(t,e,r="json")=>(n,o)=>t[r](...u1(e,n,o)),h1=d1;class f1{constructor(e,r){this._client=e,this._method=r}get(e,...r){return c1(this._client,e,this._method)(...r)}post(e,...r){return h1(this._client,e,this._method)(...r)}delete(e,...r){return o1(this._client,e,this._method)(...r)}}const p1=f1;var eg=globalThis&&globalThis.__awaiter||function(t,e,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(u){try{l(n.next(u))}catch(h){a(h)}}function c(u){try{l(n.throw(u))}catch(h){a(h)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};class g1{constructor({createClient:e}){this._createClientFn=e}createBookmarksClient(e){return eg(this,void 0,void 0,function*(){const r=yield this._createClientFn("bookmarks");return new p1(r,e)})}createContextClient(e){return eg(this,void 0,void 0,function*(){const r=yield this._createClientFn("context");return new e1(r,e)})}}var Wy=globalThis&&globalThis.__awaiter||function(t,e,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(u){try{l(n.next(u))}catch(h){a(h)}}function c(u){try{l(n.throw(u))}catch(h){a(h)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const m1="services",v1=(t,e)=>r=>Wy(void 0,void 0,void 0,function*(){if(t.hasClient(r))return t.createClient(r);if(e)return e.createClient(r);throw Error(`failed to create http client for service ${r}`)}),y1={name:m1,configure:()=>new MT,initialize:({ref:t,config:e,requireInstance:r,hasModule:n})=>Wy(void 0,void 0,void 0,function*(){if(!e.createClient){const o=yield r("http"),i=n("serviceDiscovery")?yield r("serviceDiscovery"):t==null?void 0:t.serviceDiscovery;e.createClient=v1(o,i)}if(!e.createClient)throw Error("missing configuration for creating API client");return new g1(e)})},_1=y1;class w1 extends sC{constructor(){super([pC,Dy,$h,xT,_1,TT,vT]),this.logger=new Wv("FrameworkConfigurator")}configureHttp(...e){this.addConfig(bC(...e))}configureHttpClient(...e){this.addConfig(Cy(...e))}configureMsal(...e){this.addConfig(HS(...e))}configureServiceDiscovery(e){this.configureHttpClient("service_discovery",e.client)}}var E1=globalThis&&globalThis.__awaiter||function(t,e,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(u){try{l(n.next(u))}catch(h){a(h)}}function c(u){try{l(n.throw(u))}catch(h){a(h)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const C1=(t,e)=>E1(void 0,void 0,void 0,function*(){const r=yield t.initialize(e),n={modules:r};return window.Fusion=n,r.event.dispatchEvent("onFrameworkLoaded",{detail:n}),n});var _l={exports:{}},wl={};/**
|
|
61
|
+
***************************************************************************** */var Ed=function(t,e){return Ed=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},Ed(t,e)};function Mt(t,e){Ed(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var ve=function(){return ve=Object.assign||function(e){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},ve.apply(this,arguments)};function K(t,e,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(u){try{l(n.next(u))}catch(h){a(h)}}function c(u){try{l(n.throw(u))}catch(h){a(h)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((n=n.apply(t,e||[])).next())})}function G(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(l){return function(u){return c([l,u])}}function c(l){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=l[0]&2?o.return:l[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,l[1])).done)return i;switch(o=0,i&&(l=[l[0]&2,i.value]),l[0]){case 0:case 1:i=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,o=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]<i[3])){r.label=l[1];break}if(l[0]===6&&r.label<i[1]){r.label=i[1],i=l;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(l);break}i[2]&&r.ops.pop(),r.trys.pop();continue}l=e.call(t,r)}catch(u){l=[6,u],o=0}finally{n=i=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function yl(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;for(var n=Array(t),o=0,e=0;e<r;e++)for(var i=arguments[e],a=0,s=i.length;a<s;a++,o++)n[o]=i[a];return n}/*! @azure/msal-common v8.0.0 2022-11-07 */var _={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=",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:"",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",REGIONAL_AUTH_NON_MSI_QUERY_STRING:"allowestsrnonmsi=true",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},ts=[_.OPENID_SCOPE,_.PROFILE_SCOPE,_.OFFLINE_ACCESS_SCOPE],Tp=yl(ts,[_.EMAIL_SCOPE]),hr;(function(t){t.CONTENT_TYPE="Content-Type",t.RETRY_AFTER="Retry-After",t.CCS_HEADER="X-AnchorMailbox",t.WWWAuthenticate="WWW-Authenticate",t.AuthenticationInfo="Authentication-Info",t.X_MS_REQUEST_ID="x-ms-request-id"})(hr||(hr={}));var He;(function(t){t.ID_TOKEN="idtoken",t.CLIENT_INFO="client.info",t.ADAL_ID_TOKEN="adal.idtoken",t.ERROR="error",t.ERROR_DESC="error.description",t.ACTIVE_ACCOUNT="active-account",t.ACTIVE_ACCOUNT_FILTERS="active-account-filters"})(He||(He={}));var Mc;(function(t){t.COMMON="common",t.ORGANIZATIONS="organizations",t.CONSUMERS="consumers"})(Mc||(Mc={}));var Q;(function(t){t.CLIENT_ID="client_id",t.REDIRECT_URI="redirect_uri",t.RESPONSE_TYPE="response_type",t.RESPONSE_MODE="response_mode",t.GRANT_TYPE="grant_type",t.CLAIMS="claims",t.SCOPE="scope",t.ERROR="error",t.ERROR_DESCRIPTION="error_description",t.ACCESS_TOKEN="access_token",t.ID_TOKEN="id_token",t.REFRESH_TOKEN="refresh_token",t.EXPIRES_IN="expires_in",t.STATE="state",t.NONCE="nonce",t.PROMPT="prompt",t.SESSION_STATE="session_state",t.CLIENT_INFO="client_info",t.CODE="code",t.CODE_CHALLENGE="code_challenge",t.CODE_CHALLENGE_METHOD="code_challenge_method",t.CODE_VERIFIER="code_verifier",t.CLIENT_REQUEST_ID="client-request-id",t.X_CLIENT_SKU="x-client-SKU",t.X_CLIENT_VER="x-client-VER",t.X_CLIENT_OS="x-client-OS",t.X_CLIENT_CPU="x-client-CPU",t.X_CLIENT_CURR_TELEM="x-client-current-telemetry",t.X_CLIENT_LAST_TELEM="x-client-last-telemetry",t.X_MS_LIB_CAPABILITY="x-ms-lib-capability",t.X_APP_NAME="x-app-name",t.X_APP_VER="x-app-ver",t.POST_LOGOUT_URI="post_logout_redirect_uri",t.ID_TOKEN_HINT="id_token_hint",t.DEVICE_CODE="device_code",t.CLIENT_SECRET="client_secret",t.CLIENT_ASSERTION="client_assertion",t.CLIENT_ASSERTION_TYPE="client_assertion_type",t.TOKEN_TYPE="token_type",t.REQ_CNF="req_cnf",t.OBO_ASSERTION="assertion",t.REQUESTED_TOKEN_USE="requested_token_use",t.ON_BEHALF_OF="on_behalf_of",t.FOCI="foci",t.CCS_HEADER="X-AnchorMailbox",t.RETURN_SPA_CODE="return_spa_code",t.NATIVE_BROKER="nativebroker",t.LOGOUT_HINT="logout_hint"})(Q||(Q={}));var Vo;(function(t){t.ACCESS_TOKEN="access_token",t.XMS_CC="xms_cc"})(Vo||(Vo={}));var mt={LOGIN:"login",SELECT_ACCOUNT:"select_account",CONSENT:"consent",NONE:"none",CREATE:"create",NO_SESSION:"no_session"},ya;(function(t){t.ACCOUNT="account",t.SID="sid",t.LOGIN_HINT="login_hint",t.ID_TOKEN="id_token",t.DOMAIN_HINT="domain_hint",t.ORGANIZATIONS="organizations",t.CONSUMERS="consumers",t.ACCOUNT_ID="accountIdentifier",t.HOMEACCOUNT_ID="homeAccountIdentifier"})(ya||(ya={}));var bp={PLAIN:"plain",S256:"S256"},Uc;(function(t){t.QUERY="query",t.FRAGMENT="fragment",t.FORM_POST="form_post"})(Uc||(Uc={}));var Lc;(function(t){t.IMPLICIT_GRANT="implicit",t.AUTHORIZATION_CODE_GRANT="authorization_code",t.CLIENT_CREDENTIALS_GRANT="client_credentials",t.RESOURCE_OWNER_PASSWORD_GRANT="password",t.REFRESH_TOKEN_GRANT="refresh_token",t.DEVICE_CODE_GRANT="device_code",t.JWT_BEARER="urn:ietf:params:oauth:grant-type:jwt-bearer"})(Lc||(Lc={}));var Fr;(function(t){t.MSSTS_ACCOUNT_TYPE="MSSTS",t.ADFS_ACCOUNT_TYPE="ADFS",t.MSAV1_ACCOUNT_TYPE="MSA",t.GENERIC_ACCOUNT_TYPE="Generic"})(Fr||(Fr={}));var Ft;(function(t){t.CACHE_KEY_SEPARATOR="-",t.CLIENT_INFO_SEPARATOR="."})(Ft||(Ft={}));var ee;(function(t){t.ID_TOKEN="IdToken",t.ACCESS_TOKEN="AccessToken",t.ACCESS_TOKEN_WITH_AUTH_SCHEME="AccessToken_With_AuthScheme",t.REFRESH_TOKEN="RefreshToken"})(ee||(ee={}));var to;(function(t){t.ACCOUNT="Account",t.CREDENTIAL="Credential",t.ID_TOKEN="IdToken",t.ACCESS_TOKEN="AccessToken",t.REFRESH_TOKEN="RefreshToken",t.APP_METADATA="AppMetadata",t.TEMPORARY="TempCache",t.TELEMETRY="Telemetry",t.UNDEFINED="Undefined",t.THROTTLING="Throttling"})(to||(to={}));var Br;(function(t){t[t.ADFS=1001]="ADFS",t[t.MSA=1002]="MSA",t[t.MSSTS=1003]="MSSTS",t[t.GENERIC=1004]="GENERIC",t[t.ACCESS_TOKEN=2001]="ACCESS_TOKEN",t[t.REFRESH_TOKEN=2002]="REFRESH_TOKEN",t[t.ID_TOKEN=2003]="ID_TOKEN",t[t.APP_METADATA=3001]="APP_METADATA",t[t.UNDEFINED=9999]="UNDEFINED"})(Br||(Br={}));var Cd="appmetadata",AC="client_info",Dc="1",_a={CACHE_KEY:"authority-metadata",REFRESH_TIME_SECONDS:3600*24},qt;(function(t){t.CONFIG="config",t.CACHE="cache",t.NETWORK="network",t.HARDCODED_VALUES="hardcoded_values"})(qt||(qt={}));var Ye={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"},le;(function(t){t.BEARER="Bearer",t.POP="pop",t.SSH="ssh-cert"})(le||(le={}));var wa={DEFAULT_THROTTLE_TIME_SECONDS:60,DEFAULT_MAX_THROTTLE_TIME_SECONDS:3600,THROTTLING_PREFIX:"throttling",X_MS_LIB_CAPABILITY_VALUE:"retry-after, h429"},Ip={INVALID_GRANT_ERROR:"invalid_grant",CLIENT_MISMATCH_ERROR:"client_mismatch"},Hc;(function(t){t.username="username",t.password="password"})(Hc||(Hc={}));var Wo;(function(t){t[t.httpSuccess=200]="httpSuccess",t[t.httpBadRequest=400]="httpBadRequest"})(Wo||(Wo={}));var gn;(function(t){t.FAILED_AUTO_DETECTION="1",t.INTERNAL_CACHE="2",t.ENVIRONMENT_VARIABLE="3",t.IMDS="4"})(gn||(gn={}));var Gn;(function(t){t.CONFIGURED_MATCHES_DETECTED="1",t.CONFIGURED_NO_AUTO_DETECTION="2",t.CONFIGURED_NOT_DETECTED="3",t.AUTO_DETECTION_REQUESTED_SUCCESSFUL="4",t.AUTO_DETECTION_REQUESTED_FAILED="5"})(Gn||(Gn={}));var Jn;(function(t){t.NO_CACHE_HIT="0",t.FORCE_REFRESH="1",t.NO_CACHED_ACCESS_TOKEN="2",t.CACHED_ACCESS_TOKEN_EXPIRED="3",t.REFRESH_CACHED_ACCESS_TOKEN="4"})(Jn||(Jn={}));var Sd;(function(t){t.Jwt="JWT",t.Jwk="JWK"})(Sd||(Sd={}));/*! @azure/msal-common v8.0.0 2022-11-07 */var As={unexpectedError:{code:"unexpected_error",desc:"Unexpected error in authentication."},postRequestFailed:{code:"post_request_failed",desc:"Post request failed from the network, could be a 4xx/5xx or a network unavailability. Please check the exact error code for details."}},z=function(t){Mt(e,t);function e(r,n,o){var i=this,a=n?r+": "+n:r;return i=t.call(this,a)||this,Object.setPrototypeOf(i,e.prototype),i.errorCode=r||_.EMPTY_STRING,i.errorMessage=n||_.EMPTY_STRING,i.subError=o||_.EMPTY_STRING,i.name="AuthError",i}return e.prototype.setCorrelationId=function(r){this.correlationId=r},e.createUnexpectedError=function(r){return new e(As.unexpectedError.code,As.unexpectedError.desc+": "+r)},e.createPostRequestFailed=function(r){return new e(As.postRequestFailed.code,As.postRequestFailed.desc+": "+r)},e}(Error);/*! @azure/msal-common v8.0.0 2022-11-07 */var Fc={createNewGuid:function(){var t="Crypto interface - createNewGuid() has not been implemented";throw z.createUnexpectedError(t)},base64Decode:function(){var t="Crypto interface - base64Decode() has not been implemented";throw z.createUnexpectedError(t)},base64Encode:function(){var t="Crypto interface - base64Encode() has not been implemented";throw z.createUnexpectedError(t)},generatePkceCodes:function(){return K(this,void 0,void 0,function(){var t;return G(this,function(e){throw t="Crypto interface - generatePkceCodes() has not been implemented",z.createUnexpectedError(t)})})},getPublicKeyThumbprint:function(){return K(this,void 0,void 0,function(){var t;return G(this,function(e){throw t="Crypto interface - getPublicKeyThumbprint() has not been implemented",z.createUnexpectedError(t)})})},removeTokenBindingKey:function(){return K(this,void 0,void 0,function(){var t;return G(this,function(e){throw t="Crypto interface - removeTokenBindingKey() has not been implemented",z.createUnexpectedError(t)})})},clearKeystore:function(){return K(this,void 0,void 0,function(){var t;return G(this,function(e){throw t="Crypto interface - clearKeystore() has not been implemented",z.createUnexpectedError(t)})})},signJwt:function(){return K(this,void 0,void 0,function(){var t;return G(this,function(e){throw t="Crypto interface - signJwt() has not been implemented",z.createUnexpectedError(t)})})},hashString:function(){return K(this,void 0,void 0,function(){var t;return G(this,function(e){throw t="Crypto interface - hashString() has not been implemented",z.createUnexpectedError(t)})})}};/*! @azure/msal-common v8.0.0 2022-11-07 */var A={clientInfoDecodingError:{code:"client_info_decoding_error",desc:"The client info could not be parsed/decoded correctly. Please review the trace to determine the root cause."},clientInfoEmptyError:{code:"client_info_empty_error",desc:"The client info was empty. Please review the trace to determine the root cause."},tokenParsingError:{code:"token_parsing_error",desc:"Token cannot be parsed. Please review stack trace to determine root cause."},nullOrEmptyToken:{code:"null_or_empty_token",desc:"The token is null or empty. Please review the trace to determine the root cause."},endpointResolutionError:{code:"endpoints_resolution_error",desc:"Error: could not resolve endpoints. Please check network and try again."},networkError:{code:"network_error",desc:"Network request failed. Please check network trace to determine root cause."},unableToGetOpenidConfigError:{code:"openid_config_error",desc:"Could not retrieve endpoints. Check your authority and verify the .well-known/openid-configuration endpoint returns the required endpoints."},hashNotDeserialized:{code:"hash_not_deserialized",desc:"The hash parameters could not be deserialized. Please review the trace to determine the root cause."},blankGuidGenerated:{code:"blank_guid_generated",desc:"The guid generated was blank. Please review the trace to determine the root cause."},invalidStateError:{code:"invalid_state",desc:"State was not the expected format. Please check the logs to determine whether the request was sent using ProtocolUtils.setRequestState()."},stateMismatchError:{code:"state_mismatch",desc:"State mismatch error. Please check your network. Continued requests may cause cache overflow."},stateNotFoundError:{code:"state_not_found",desc:"State not found"},nonceMismatchError:{code:"nonce_mismatch",desc:"Nonce mismatch error. This may be caused by a race condition in concurrent requests."},nonceNotFoundError:{code:"nonce_not_found",desc:"nonce not found"},authTimeNotFoundError:{code:"auth_time_not_found",desc:"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."},maxAgeTranspiredError:{code:"max_age_transpired",desc:"Max Age is set to 0, or too much time has elapsed since the last end-user authentication."},noTokensFoundError:{code:"no_tokens_found",desc:"No tokens were found for the given scopes, and no authorization code was passed to acquireToken. You must retrieve an authorization code before making a call to acquireToken()."},multipleMatchingTokens:{code:"multiple_matching_tokens",desc:"The cache contains multiple tokens satisfying the requirements. Call AcquireToken again providing more requirements such as authority or account."},multipleMatchingAccounts:{code:"multiple_matching_accounts",desc:"The cache contains multiple accounts satisfying the given parameters. Please pass more info to obtain the correct account"},multipleMatchingAppMetadata:{code:"multiple_matching_appMetadata",desc:"The cache contains multiple appMetadata satisfying the given parameters. Please pass more info to obtain the correct appMetadata"},tokenRequestCannotBeMade:{code:"request_cannot_be_made",desc:"Token request cannot be made without authorization code or refresh token."},appendEmptyScopeError:{code:"cannot_append_empty_scope",desc:"Cannot append null or empty scope to ScopeSet. Please check the stack trace for more info."},removeEmptyScopeError:{code:"cannot_remove_empty_scope",desc:"Cannot remove null or empty scope from ScopeSet. Please check the stack trace for more info."},appendScopeSetError:{code:"cannot_append_scopeset",desc:"Cannot append ScopeSet due to error."},emptyInputScopeSetError:{code:"empty_input_scopeset",desc:"Empty input ScopeSet cannot be processed."},DeviceCodePollingCancelled:{code:"device_code_polling_cancelled",desc:"Caller has cancelled token endpoint polling during device code flow by setting DeviceCodeRequest.cancel = true."},DeviceCodeExpired:{code:"device_code_expired",desc:"Device code is expired."},DeviceCodeUnknownError:{code:"device_code_unknown_error",desc:"Device code stopped polling for unknown reasons."},NoAccountInSilentRequest:{code:"no_account_in_silent_request",desc:"Please pass an account object, silent flow is not supported without account information"},invalidCacheRecord:{code:"invalid_cache_record",desc:"Cache record object was null or undefined."},invalidCacheEnvironment:{code:"invalid_cache_environment",desc:"Invalid environment when attempting to create cache entry"},noAccountFound:{code:"no_account_found",desc:"No account found in cache for given key."},CachePluginError:{code:"no cache plugin set on CacheManager",desc:"ICachePlugin needs to be set before using readFromStorage or writeFromStorage"},noCryptoObj:{code:"no_crypto_object",desc:"No crypto object detected. This is required for the following operation: "},invalidCacheType:{code:"invalid_cache_type",desc:"Invalid cache type"},unexpectedAccountType:{code:"unexpected_account_type",desc:"Unexpected account type."},unexpectedCredentialType:{code:"unexpected_credential_type",desc:"Unexpected credential type."},invalidAssertion:{code:"invalid_assertion",desc:"Client assertion must meet requirements described in https://tools.ietf.org/html/rfc7515"},invalidClientCredential:{code:"invalid_client_credential",desc:"Client credential (secret, certificate, or assertion) must not be empty when creating a confidential client. An application should at most have one credential"},tokenRefreshRequired:{code:"token_refresh_required",desc:"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."},userTimeoutReached:{code:"user_timeout_reached",desc:"User defined timeout for device code polling reached"},tokenClaimsRequired:{code:"token_claims_cnf_required_for_signedjwt",desc:"Cannot generate a POP jwt if the token_claims are not populated"},noAuthorizationCodeFromServer:{code:"authorization_code_missing_from_server_response",desc:"Server response does not contain an authorization code to proceed"},noAzureRegionDetected:{code:"no_azure_region_detected",desc:"No azure region was detected and no fallback was made available"},accessTokenEntityNullError:{code:"access_token_entity_null",desc:"Access token entity is null, please check logs and cache to ensure a valid access token is present."},bindingKeyNotRemovedError:{code:"binding_key_not_removed",desc:"Could not remove the credential's binding key from storage."},logoutNotSupported:{code:"end_session_endpoint_not_supported",desc:"Provided authority does not support logout."},keyIdMissing:{code:"key_id_missing",desc:"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."}},D=function(t){Mt(e,t);function e(r,n){var o=t.call(this,r,n)||this;return o.name="ClientAuthError",Object.setPrototypeOf(o,e.prototype),o}return e.createClientInfoDecodingError=function(r){return new e(A.clientInfoDecodingError.code,A.clientInfoDecodingError.desc+" Failed with error: "+r)},e.createClientInfoEmptyError=function(){return new e(A.clientInfoEmptyError.code,""+A.clientInfoEmptyError.desc)},e.createTokenParsingError=function(r){return new e(A.tokenParsingError.code,A.tokenParsingError.desc+" Failed with error: "+r)},e.createTokenNullOrEmptyError=function(r){return new e(A.nullOrEmptyToken.code,A.nullOrEmptyToken.desc+" Raw Token Value: "+r)},e.createEndpointDiscoveryIncompleteError=function(r){return new e(A.endpointResolutionError.code,A.endpointResolutionError.desc+" Detail: "+r)},e.createNetworkError=function(r,n){return new e(A.networkError.code,A.networkError.desc+" | Fetch client threw: "+n+" | Attempted to reach: "+r.split("?")[0])},e.createUnableToGetOpenidConfigError=function(r){return new e(A.unableToGetOpenidConfigError.code,A.unableToGetOpenidConfigError.desc+" Attempted to retrieve endpoints from: "+r)},e.createHashNotDeserializedError=function(r){return new e(A.hashNotDeserialized.code,A.hashNotDeserialized.desc+" Given Object: "+r)},e.createInvalidStateError=function(r,n){return new e(A.invalidStateError.code,A.invalidStateError.desc+" Invalid State: "+r+", Root Err: "+n)},e.createStateMismatchError=function(){return new e(A.stateMismatchError.code,A.stateMismatchError.desc)},e.createStateNotFoundError=function(r){return new e(A.stateNotFoundError.code,A.stateNotFoundError.desc+": "+r)},e.createNonceMismatchError=function(){return new e(A.nonceMismatchError.code,A.nonceMismatchError.desc)},e.createAuthTimeNotFoundError=function(){return new e(A.authTimeNotFoundError.code,A.authTimeNotFoundError.desc)},e.createMaxAgeTranspiredError=function(){return new e(A.maxAgeTranspiredError.code,A.maxAgeTranspiredError.desc)},e.createNonceNotFoundError=function(r){return new e(A.nonceNotFoundError.code,A.nonceNotFoundError.desc+": "+r)},e.createMultipleMatchingTokensInCacheError=function(){return new e(A.multipleMatchingTokens.code,A.multipleMatchingTokens.desc+".")},e.createMultipleMatchingAccountsInCacheError=function(){return new e(A.multipleMatchingAccounts.code,A.multipleMatchingAccounts.desc)},e.createMultipleMatchingAppMetadataInCacheError=function(){return new e(A.multipleMatchingAppMetadata.code,A.multipleMatchingAppMetadata.desc)},e.createTokenRequestCannotBeMadeError=function(){return new e(A.tokenRequestCannotBeMade.code,A.tokenRequestCannotBeMade.desc)},e.createAppendEmptyScopeToSetError=function(r){return new e(A.appendEmptyScopeError.code,A.appendEmptyScopeError.desc+" Given Scope: "+r)},e.createRemoveEmptyScopeFromSetError=function(r){return new e(A.removeEmptyScopeError.code,A.removeEmptyScopeError.desc+" Given Scope: "+r)},e.createAppendScopeSetError=function(r){return new e(A.appendScopeSetError.code,A.appendScopeSetError.desc+" Detail Error: "+r)},e.createEmptyInputScopeSetError=function(){return new e(A.emptyInputScopeSetError.code,""+A.emptyInputScopeSetError.desc)},e.createDeviceCodeCancelledError=function(){return new e(A.DeviceCodePollingCancelled.code,""+A.DeviceCodePollingCancelled.desc)},e.createDeviceCodeExpiredError=function(){return new e(A.DeviceCodeExpired.code,""+A.DeviceCodeExpired.desc)},e.createDeviceCodeUnknownError=function(){return new e(A.DeviceCodeUnknownError.code,""+A.DeviceCodeUnknownError.desc)},e.createNoAccountInSilentRequestError=function(){return new e(A.NoAccountInSilentRequest.code,""+A.NoAccountInSilentRequest.desc)},e.createNullOrUndefinedCacheRecord=function(){return new e(A.invalidCacheRecord.code,A.invalidCacheRecord.desc)},e.createInvalidCacheEnvironmentError=function(){return new e(A.invalidCacheEnvironment.code,A.invalidCacheEnvironment.desc)},e.createNoAccountFoundError=function(){return new e(A.noAccountFound.code,A.noAccountFound.desc)},e.createCachePluginError=function(){return new e(A.CachePluginError.code,""+A.CachePluginError.desc)},e.createNoCryptoObjectError=function(r){return new e(A.noCryptoObj.code,""+A.noCryptoObj.desc+r)},e.createInvalidCacheTypeError=function(){return new e(A.invalidCacheType.code,""+A.invalidCacheType.desc)},e.createUnexpectedAccountTypeError=function(){return new e(A.unexpectedAccountType.code,""+A.unexpectedAccountType.desc)},e.createUnexpectedCredentialTypeError=function(){return new e(A.unexpectedCredentialType.code,""+A.unexpectedCredentialType.desc)},e.createInvalidAssertionError=function(){return new e(A.invalidAssertion.code,""+A.invalidAssertion.desc)},e.createInvalidCredentialError=function(){return new e(A.invalidClientCredential.code,""+A.invalidClientCredential.desc)},e.createRefreshRequiredError=function(){return new e(A.tokenRefreshRequired.code,A.tokenRefreshRequired.desc)},e.createUserTimeoutReachedError=function(){return new e(A.userTimeoutReached.code,A.userTimeoutReached.desc)},e.createTokenClaimsRequiredError=function(){return new e(A.tokenClaimsRequired.code,A.tokenClaimsRequired.desc)},e.createNoAuthCodeInServerResponseError=function(){return new e(A.noAuthorizationCodeFromServer.code,A.noAuthorizationCodeFromServer.desc)},e.createBindingKeyNotRemovedError=function(){return new e(A.bindingKeyNotRemovedError.code,A.bindingKeyNotRemovedError.desc)},e.createLogoutNotSupportedError=function(){return new e(A.logoutNotSupported.code,A.logoutNotSupported.desc)},e.createKeyIdMissingError=function(){return new e(A.keyIdMissing.code,A.keyIdMissing.desc)},e}(z);/*! @azure/msal-common v8.0.0 2022-11-07 */var x=function(){function t(){}return t.decodeAuthToken=function(e){if(t.isEmpty(e))throw D.createTokenNullOrEmptyError(e);var r=/^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/,n=r.exec(e);if(!n||n.length<4)throw D.createTokenParsingError("Given token is malformed: "+JSON.stringify(e));var o={header:n[1],JWSPayload:n[2],JWSSig:n[3]};return o},t.isEmpty=function(e){return typeof e>"u"||!e||e.length===0},t.isEmptyObj=function(e){if(e&&!t.isEmpty(e))try{var r=JSON.parse(e);return Object.keys(r).length===0}catch{}return!0},t.startsWith=function(e,r){return e.indexOf(r)===0},t.endsWith=function(e,r){return e.length>=r.length&&e.lastIndexOf(r)===e.length-r.length},t.queryStringToObject=function(e){var r={},n=e.split("&"),o=function(i){return decodeURIComponent(i.replace(/\+/g," "))};return n.forEach(function(i){if(i.trim()){var a=i.split(/=(.+)/g,2),s=a[0],c=a[1];s&&c&&(r[o(s)]=o(c))}}),r},t.trimArrayEntries=function(e){return e.map(function(r){return r.trim()})},t.removeEmptyStringsFromArray=function(e){return e.filter(function(r){return!t.isEmpty(r)})},t.jsonParseHelper=function(e){try{return JSON.parse(e)}catch{return null}},t.matchPattern=function(e,r){var n=new RegExp(e.replace(/\\/g,"\\\\").replace(/\*/g,"[^ ]*").replace(/\?/g,"\\?"));return n.test(r)},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var xe;(function(t){t[t.Error=0]="Error",t[t.Warning=1]="Warning",t[t.Info=2]="Info",t[t.Verbose=3]="Verbose",t[t.Trace=4]="Trace"})(xe||(xe={}));var jh=function(){function t(e,r,n){this.level=xe.Info;var o=function(){};this.localCallback=e.loggerCallback||o,this.piiLoggingEnabled=e.piiLoggingEnabled||!1,this.level=typeof e.logLevel=="number"?e.logLevel:xe.Info,this.correlationId=e.correlationId||_.EMPTY_STRING,this.packageName=r||_.EMPTY_STRING,this.packageVersion=n||_.EMPTY_STRING}return t.prototype.clone=function(e,r,n){return new t({loggerCallback:this.localCallback,piiLoggingEnabled:this.piiLoggingEnabled,logLevel:this.level,correlationId:n||this.correlationId},e,r)},t.prototype.logMessage=function(e,r){if(!(r.logLevel>this.level||!this.piiLoggingEnabled&&r.containsPii)){var n=new Date().toUTCString(),o;x.isEmpty(r.correlationId)?x.isEmpty(this.correlationId)?o="["+n+"]":o="["+n+"] : ["+this.correlationId+"]":o="["+n+"] : ["+r.correlationId+"]";var i=o+" : "+this.packageName+"@"+this.packageVersion+" : "+xe[r.logLevel]+" - "+e;this.executeCallback(r.logLevel,i,r.containsPii||!1)}},t.prototype.executeCallback=function(e,r,n){this.localCallback&&this.localCallback(e,r,n)},t.prototype.error=function(e,r){this.logMessage(e,{logLevel:xe.Error,containsPii:!1,correlationId:r||_.EMPTY_STRING})},t.prototype.errorPii=function(e,r){this.logMessage(e,{logLevel:xe.Error,containsPii:!0,correlationId:r||_.EMPTY_STRING})},t.prototype.warning=function(e,r){this.logMessage(e,{logLevel:xe.Warning,containsPii:!1,correlationId:r||_.EMPTY_STRING})},t.prototype.warningPii=function(e,r){this.logMessage(e,{logLevel:xe.Warning,containsPii:!0,correlationId:r||_.EMPTY_STRING})},t.prototype.info=function(e,r){this.logMessage(e,{logLevel:xe.Info,containsPii:!1,correlationId:r||_.EMPTY_STRING})},t.prototype.infoPii=function(e,r){this.logMessage(e,{logLevel:xe.Info,containsPii:!0,correlationId:r||_.EMPTY_STRING})},t.prototype.verbose=function(e,r){this.logMessage(e,{logLevel:xe.Verbose,containsPii:!1,correlationId:r||_.EMPTY_STRING})},t.prototype.verbosePii=function(e,r){this.logMessage(e,{logLevel:xe.Verbose,containsPii:!0,correlationId:r||_.EMPTY_STRING})},t.prototype.trace=function(e,r){this.logMessage(e,{logLevel:xe.Trace,containsPii:!1,correlationId:r||_.EMPTY_STRING})},t.prototype.tracePii=function(e,r){this.logMessage(e,{logLevel:xe.Trace,containsPii:!0,correlationId:r||_.EMPTY_STRING})},t.prototype.isPiiLoggingEnabled=function(){return this.piiLoggingEnabled||!1},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var RC="@azure/msal-common",Sy="8.0.0";/*! @azure/msal-common v8.0.0 2022-11-07 */var $a;(function(t){t[t.None=0]="None",t.AzurePublic="https://login.microsoftonline.com",t.AzurePpe="https://login.windows-ppe.net",t.AzureChina="https://login.chinacloudapi.cn",t.AzureGermany="https://login.microsoftonline.de",t.AzureUsGovernment="https://login.microsoftonline.us"})($a||($a={}));/*! @azure/msal-common v8.0.0 2022-11-07 */var za=function(){function t(){}return t.prototype.generateAccountId=function(){return t.generateAccountIdForCacheKey(this.homeAccountId,this.environment)},t.prototype.generateCredentialId=function(){return t.generateCredentialIdForCacheKey(this.credentialType,this.clientId,this.realm,this.familyId)},t.prototype.generateTarget=function(){return t.generateTargetForCacheKey(this.target)},t.prototype.generateCredentialKey=function(){return t.generateCredentialCacheKey(this.homeAccountId,this.environment,this.credentialType,this.clientId,this.realm,this.target,this.familyId,this.tokenType,this.requestedClaimsHash)},t.prototype.generateType=function(){switch(this.credentialType){case ee.ID_TOKEN:return Br.ID_TOKEN;case ee.ACCESS_TOKEN:case ee.ACCESS_TOKEN_WITH_AUTH_SCHEME:return Br.ACCESS_TOKEN;case ee.REFRESH_TOKEN:return Br.REFRESH_TOKEN;default:throw D.createUnexpectedCredentialTypeError()}},t.getCredentialType=function(e){return e.indexOf(ee.ACCESS_TOKEN.toLowerCase())!==-1?e.indexOf(ee.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase())!==-1?ee.ACCESS_TOKEN_WITH_AUTH_SCHEME:ee.ACCESS_TOKEN:e.indexOf(ee.ID_TOKEN.toLowerCase())!==-1?ee.ID_TOKEN:e.indexOf(ee.REFRESH_TOKEN.toLowerCase())!==-1?ee.REFRESH_TOKEN:_.NOT_DEFINED},t.generateCredentialCacheKey=function(e,r,n,o,i,a,s,c,l){var u=[this.generateAccountIdForCacheKey(e,r),this.generateCredentialIdForCacheKey(n,o,i,s),this.generateTargetForCacheKey(a),this.generateClaimsHashForCacheKey(l),this.generateSchemeForCacheKey(c)];return u.join(Ft.CACHE_KEY_SEPARATOR).toLowerCase()},t.generateAccountIdForCacheKey=function(e,r){var n=[e,r];return n.join(Ft.CACHE_KEY_SEPARATOR).toLowerCase()},t.generateCredentialIdForCacheKey=function(e,r,n,o){var i=e===ee.REFRESH_TOKEN&&o||r,a=[e,i,n||_.EMPTY_STRING];return a.join(Ft.CACHE_KEY_SEPARATOR).toLowerCase()},t.generateTargetForCacheKey=function(e){return(e||_.EMPTY_STRING).toLowerCase()},t.generateClaimsHashForCacheKey=function(e){return(e||_.EMPTY_STRING).toLowerCase()},t.generateSchemeForCacheKey=function(e){return e&&e.toLowerCase()!==le.BEARER.toLowerCase()?e.toLowerCase():_.EMPTY_STRING},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var Y={redirectUriNotSet:{code:"redirect_uri_empty",desc:"A redirect URI is required for all calls, and none has been set."},postLogoutUriNotSet:{code:"post_logout_uri_empty",desc:"A post logout redirect has not been set."},claimsRequestParsingError:{code:"claims_request_parsing_error",desc:"Could not parse the given claims request object."},authorityUriInsecure:{code:"authority_uri_insecure",desc:"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"},urlParseError:{code:"url_parse_error",desc:"URL could not be parsed into appropriate segments."},urlEmptyError:{code:"empty_url_error",desc:"URL was empty or null."},emptyScopesError:{code:"empty_input_scopes_error",desc:"Scopes cannot be passed as null, undefined or empty array because they are required to obtain an access token."},nonArrayScopesError:{code:"nonarray_input_scopes_error",desc:"Scopes cannot be passed as non-array."},clientIdSingleScopeError:{code:"clientid_input_scopes_error",desc:"Client ID can only be provided as a single scope."},invalidPrompt:{code:"invalid_prompt_value",desc:"Supported prompt values are 'login', 'select_account', 'consent', 'create', 'none' and 'no_session'. Please see here for valid configuration options: https://azuread.github.io/microsoft-authentication-library-for-js/ref/modules/_azure_msal_common.html#commonauthorizationurlrequest"},invalidClaimsRequest:{code:"invalid_claims",desc:"Given claims parameter must be a stringified JSON object."},tokenRequestEmptyError:{code:"token_request_empty",desc:"Token request was empty and not found in cache."},logoutRequestEmptyError:{code:"logout_request_empty",desc:"The logout request was null or undefined."},invalidCodeChallengeMethod:{code:"invalid_code_challenge_method",desc:'code_challenge_method passed is invalid. Valid values are "plain" and "S256".'},invalidCodeChallengeParams:{code:"pkce_params_missing",desc:"Both params: code_challenge and code_challenge_method are to be passed if to be sent in the request"},invalidCloudDiscoveryMetadata:{code:"invalid_cloud_discovery_metadata",desc:"Invalid cloudDiscoveryMetadata provided. Must be a stringified JSON object containing tenant_discovery_endpoint and metadata fields"},invalidAuthorityMetadata:{code:"invalid_authority_metadata",desc:"Invalid authorityMetadata provided. Must by a stringified JSON object containing authorization_endpoint, token_endpoint, issuer fields."},untrustedAuthority:{code:"untrusted_authority",desc:"The provided authority is not a trusted authority. Please include this authority in the knownAuthorities config parameter."},invalidAzureCloudInstance:{code:"invalid_azure_cloud_instance",desc:"Invalid AzureCloudInstance provided. Please refer MSAL JS docs: aks.ms/msaljs/azure_cloud_instance for valid values"},missingSshJwk:{code:"missing_ssh_jwk",desc:"Missing sshJwk in SSH certificate request. A stringified JSON Web Key is required when using the SSH authentication scheme."},missingSshKid:{code:"missing_ssh_kid",desc:"Missing sshKid in SSH certificate request. A string that uniquely identifies the public SSH key is required when using the SSH authentication scheme."},missingNonceAuthenticationHeader:{code:"missing_nonce_authentication_header",desc:"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."},invalidAuthenticationHeader:{code:"invalid_authentication_header",desc:"Invalid authentication header provided"}},Ee=function(t){Mt(e,t);function e(r,n){var o=t.call(this,r,n)||this;return o.name="ClientConfigurationError",Object.setPrototypeOf(o,e.prototype),o}return e.createRedirectUriEmptyError=function(){return new e(Y.redirectUriNotSet.code,Y.redirectUriNotSet.desc)},e.createPostLogoutRedirectUriEmptyError=function(){return new e(Y.postLogoutUriNotSet.code,Y.postLogoutUriNotSet.desc)},e.createClaimsRequestParsingError=function(r){return new e(Y.claimsRequestParsingError.code,Y.claimsRequestParsingError.desc+" Given value: "+r)},e.createInsecureAuthorityUriError=function(r){return new e(Y.authorityUriInsecure.code,Y.authorityUriInsecure.desc+" Given URI: "+r)},e.createUrlParseError=function(r){return new e(Y.urlParseError.code,Y.urlParseError.desc+" Given Error: "+r)},e.createUrlEmptyError=function(){return new e(Y.urlEmptyError.code,Y.urlEmptyError.desc)},e.createEmptyScopesArrayError=function(){return new e(Y.emptyScopesError.code,""+Y.emptyScopesError.desc)},e.createClientIdSingleScopeError=function(r){return new e(Y.clientIdSingleScopeError.code,Y.clientIdSingleScopeError.desc+" Given Scopes: "+r)},e.createInvalidPromptError=function(r){return new e(Y.invalidPrompt.code,Y.invalidPrompt.desc+" Given value: "+r)},e.createInvalidClaimsRequestError=function(){return new e(Y.invalidClaimsRequest.code,Y.invalidClaimsRequest.desc)},e.createEmptyLogoutRequestError=function(){return new e(Y.logoutRequestEmptyError.code,Y.logoutRequestEmptyError.desc)},e.createEmptyTokenRequestError=function(){return new e(Y.tokenRequestEmptyError.code,Y.tokenRequestEmptyError.desc)},e.createInvalidCodeChallengeMethodError=function(){return new e(Y.invalidCodeChallengeMethod.code,Y.invalidCodeChallengeMethod.desc)},e.createInvalidCodeChallengeParamsError=function(){return new e(Y.invalidCodeChallengeParams.code,Y.invalidCodeChallengeParams.desc)},e.createInvalidCloudDiscoveryMetadataError=function(){return new e(Y.invalidCloudDiscoveryMetadata.code,Y.invalidCloudDiscoveryMetadata.desc)},e.createInvalidAuthorityMetadataError=function(){return new e(Y.invalidAuthorityMetadata.code,Y.invalidAuthorityMetadata.desc)},e.createUntrustedAuthorityError=function(){return new e(Y.untrustedAuthority.code,Y.untrustedAuthority.desc)},e.createInvalidAzureCloudInstanceError=function(){return new e(Y.invalidAzureCloudInstance.code,Y.invalidAzureCloudInstance.desc)},e.createMissingSshJwkError=function(){return new e(Y.missingSshJwk.code,Y.missingSshJwk.desc)},e.createMissingSshKidError=function(){return new e(Y.missingSshKid.code,Y.missingSshKid.desc)},e.createMissingNonceAuthenticationHeadersError=function(){return new e(Y.missingNonceAuthenticationHeader.code,Y.missingNonceAuthenticationHeader.desc)},e.createInvalidAuthenticationHeaderError=function(r,n){return new e(Y.invalidAuthenticationHeader.code,Y.invalidAuthenticationHeader.desc+". Invalid header: "+r+". Details: "+n)},e}(D);/*! @azure/msal-common v8.0.0 2022-11-07 */var Ct=function(){function t(e){var r=this,n=e?x.trimArrayEntries(yl(e)):[],o=n?x.removeEmptyStringsFromArray(n):[];this.validateInputScopes(o),this.scopes=new Set,o.forEach(function(i){return r.scopes.add(i)})}return t.fromString=function(e){var r=e||_.EMPTY_STRING,n=r.split(" ");return new t(n)},t.prototype.validateInputScopes=function(e){if(!e||e.length<1)throw Ee.createEmptyScopesArrayError()},t.prototype.containsScope=function(e){var r=this.printScopesLowerCase().split(" "),n=new t(r);return x.isEmpty(e)?!1:n.scopes.has(e.toLowerCase())},t.prototype.containsScopeSet=function(e){var r=this;return!e||e.scopes.size<=0?!1:this.scopes.size>=e.scopes.size&&e.asArray().every(function(n){return r.containsScope(n)})},t.prototype.containsOnlyOIDCScopes=function(){var e=this,r=0;return Tp.forEach(function(n){e.containsScope(n)&&(r+=1)}),this.scopes.size===r},t.prototype.appendScope=function(e){x.isEmpty(e)||this.scopes.add(e.trim())},t.prototype.appendScopes=function(e){var r=this;try{e.forEach(function(n){return r.appendScope(n)})}catch(n){throw D.createAppendScopeSetError(n)}},t.prototype.removeScope=function(e){if(x.isEmpty(e))throw D.createRemoveEmptyScopeFromSetError(e);this.scopes.delete(e.trim())},t.prototype.removeOIDCScopes=function(){var e=this;Tp.forEach(function(r){e.scopes.delete(r)})},t.prototype.unionScopeSets=function(e){if(!e)throw D.createEmptyInputScopeSetError();var r=new Set;return e.scopes.forEach(function(n){return r.add(n.toLowerCase())}),this.scopes.forEach(function(n){return r.add(n.toLowerCase())}),r},t.prototype.intersectingScopeSets=function(e){if(!e)throw D.createEmptyInputScopeSetError();e.containsOnlyOIDCScopes()||e.removeOIDCScopes();var r=this.unionScopeSets(e),n=e.getScopeCount(),o=this.getScopeCount(),i=r.size;return i<o+n},t.prototype.getScopeCount=function(){return this.scopes.size},t.prototype.asArray=function(){var e=[];return this.scopes.forEach(function(r){return e.push(r)}),e},t.prototype.printScopes=function(){if(this.scopes){var e=this.asArray();return e.join(" ")}return _.EMPTY_STRING},t.prototype.printScopesLowerCase=function(){return this.printScopes().toLowerCase()},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */function $c(t,e){if(x.isEmpty(t))throw D.createClientInfoEmptyError();try{var r=e.base64Decode(t);return JSON.parse(r)}catch(n){throw D.createClientInfoDecodingError(n.message)}}function Yo(t){if(x.isEmpty(t))throw D.createClientInfoDecodingError("Home account ID was empty.");var e=t.split(Ft.CLIENT_INFO_SEPARATOR,2);return{uid:e[0],utid:e.length<2?_.EMPTY_STRING:e[1]}}/*! @azure/msal-common v8.0.0 2022-11-07 */var Wt;(function(t){t[t.Default=0]="Default",t[t.Adfs=1]="Adfs",t[t.Dsts=2]="Dsts"})(Wt||(Wt={}));/*! @azure/msal-common v8.0.0 2022-11-07 */var tt=function(){function t(){}return t.prototype.generateAccountId=function(){var e=[this.homeAccountId,this.environment];return e.join(Ft.CACHE_KEY_SEPARATOR).toLowerCase()},t.prototype.generateAccountKey=function(){return t.generateAccountCacheKey({homeAccountId:this.homeAccountId,environment:this.environment,tenantId:this.realm,username:this.username,localAccountId:this.localAccountId})},t.prototype.generateType=function(){switch(this.authorityType){case Fr.ADFS_ACCOUNT_TYPE:return Br.ADFS;case Fr.MSAV1_ACCOUNT_TYPE:return Br.MSA;case Fr.MSSTS_ACCOUNT_TYPE:return Br.MSSTS;case Fr.GENERIC_ACCOUNT_TYPE:return Br.GENERIC;default:throw D.createUnexpectedAccountTypeError()}},t.prototype.getAccountInfo=function(){return{homeAccountId:this.homeAccountId,environment:this.environment,tenantId:this.realm,username:this.username,localAccountId:this.localAccountId,name:this.name,idTokenClaims:this.idTokenClaims,nativeAccountId:this.nativeAccountId}},t.generateAccountCacheKey=function(e){var r=[e.homeAccountId,e.environment||_.EMPTY_STRING,e.tenantId||_.EMPTY_STRING];return r.join(Ft.CACHE_KEY_SEPARATOR).toLowerCase()},t.createAccount=function(e,r,n,o,i,a,s,c){var l,u,h,d,f,m,v=new t;v.authorityType=Fr.MSSTS_ACCOUNT_TYPE,v.clientInfo=e,v.homeAccountId=r,v.nativeAccountId=c;var E=s||o&&o.getPreferredCache();if(!E)throw D.createInvalidCacheEnvironmentError();if(v.environment=E,v.realm=((l=n==null?void 0:n.claims)===null||l===void 0?void 0:l.tid)||_.EMPTY_STRING,n){v.idTokenClaims=n.claims,v.localAccountId=((u=n==null?void 0:n.claims)===null||u===void 0?void 0:u.oid)||((h=n==null?void 0:n.claims)===null||h===void 0?void 0:h.sub)||_.EMPTY_STRING;var g=(d=n==null?void 0:n.claims)===null||d===void 0?void 0:d.preferred_username,p=!((f=n==null?void 0:n.claims)===null||f===void 0)&&f.emails?n.claims.emails[0]:null;v.username=g||p||_.EMPTY_STRING,v.name=(m=n==null?void 0:n.claims)===null||m===void 0?void 0:m.name}return v.cloudGraphHostName=i,v.msGraphHost=a,v},t.createGenericAccount=function(e,r,n,o,i,a){var s,c,l,u,h=new t;h.authorityType=n&&n.authorityType===Wt.Adfs?Fr.ADFS_ACCOUNT_TYPE:Fr.GENERIC_ACCOUNT_TYPE,h.homeAccountId=e,h.realm=_.EMPTY_STRING;var d=a||n&&n.getPreferredCache();if(!d)throw D.createInvalidCacheEnvironmentError();return r&&(h.localAccountId=((s=r==null?void 0:r.claims)===null||s===void 0?void 0:s.oid)||((c=r==null?void 0:r.claims)===null||c===void 0?void 0:c.sub)||_.EMPTY_STRING,h.username=((l=r==null?void 0:r.claims)===null||l===void 0?void 0:l.upn)||_.EMPTY_STRING,h.name=((u=r==null?void 0:r.claims)===null||u===void 0?void 0:u.name)||_.EMPTY_STRING,h.idTokenClaims=r==null?void 0:r.claims),h.environment=d,h.cloudGraphHostName=o,h.msGraphHost=i,h},t.generateHomeAccountId=function(e,r,n,o,i){var a,s=!((a=i==null?void 0:i.claims)===null||a===void 0)&&a.sub?i.claims.sub:_.EMPTY_STRING;if(r===Wt.Adfs||r===Wt.Dsts)return s;if(e)try{var c=$c(e,o);if(!x.isEmpty(c.uid)&&!x.isEmpty(c.utid))return""+c.uid+Ft.CLIENT_INFO_SEPARATOR+c.utid}catch{}return n.verbose("No client info in response"),s},t.isAccountEntity=function(e){return e?e.hasOwnProperty("homeAccountId")&&e.hasOwnProperty("environment")&&e.hasOwnProperty("realm")&&e.hasOwnProperty("localAccountId")&&e.hasOwnProperty("username")&&e.hasOwnProperty("authorityType"):!1},t.accountInfoIsEqual=function(e,r,n){if(!e||!r)return!1;var o=!0;if(n){var i=e.idTokenClaims||{},a=r.idTokenClaims||{};o=i.iat===a.iat&&i.nonce===a.nonce}return e.homeAccountId===r.homeAccountId&&e.localAccountId===r.localAccountId&&e.username===r.username&&e.tenantId===r.tenantId&&e.environment===r.environment&&e.nativeAccountId===r.nativeAccountId&&o},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var kr=function(){function t(e,r){if(x.isEmpty(e))throw D.createTokenNullOrEmptyError(e);this.rawToken=e,this.claims=t.extractTokenClaims(e,r)}return t.extractTokenClaims=function(e,r){var n=x.decodeAuthToken(e);try{var o=n.JWSPayload,i=r.base64Decode(o);return JSON.parse(i)}catch(a){throw D.createTokenParsingError(a)}},t.checkMaxAge=function(e,r){var n=3e5;if(r===0||Date.now()-n>e+r)throw D.createMaxAgeTranspiredError()},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var or=function(){function t(e,r){this.clientId=e,this.cryptoImpl=r}return t.prototype.getAllAccounts=function(){var e=this,r=this.getAccountsFilteredBy(),n=Object.keys(r).map(function(a){return r[a]}),o=n.length;if(o<1)return[];var i=n.map(function(a){var s=t.toObject(new tt,a),c=s.getAccountInfo(),l=e.readIdTokenFromCache(e.clientId,c);return l&&!c.idTokenClaims&&(c.idToken=l.secret,c.idTokenClaims=new kr(l.secret,e.cryptoImpl).claims),c});return i},t.prototype.saveCacheRecord=function(e){return K(this,void 0,void 0,function(){return G(this,function(r){switch(r.label){case 0:if(!e)throw D.createNullOrUndefinedCacheRecord();return e.account&&this.setAccount(e.account),e.idToken&&this.setIdTokenCredential(e.idToken),e.accessToken?[4,this.saveAccessToken(e.accessToken)]:[3,2];case 1:r.sent(),r.label=2;case 2:return e.refreshToken&&this.setRefreshTokenCredential(e.refreshToken),e.appMetadata&&this.setAppMetadata(e.appMetadata),[2]}})})},t.prototype.saveAccessToken=function(e){return K(this,void 0,void 0,function(){var r,n,o,i,a=this;return G(this,function(s){switch(s.label){case 0:return r=this.getCredentialsFilteredBy({clientId:e.clientId,credentialType:e.credentialType,environment:e.environment,homeAccountId:e.homeAccountId,realm:e.realm,tokenType:e.tokenType,requestedClaimsHash:e.requestedClaimsHash}),n=Ct.fromString(e.target),o=Object.keys(r.accessTokens).map(function(c){return r.accessTokens[c]}),o?(i=[],o.forEach(function(c){var l=Ct.fromString(c.target);l.intersectingScopeSets(n)&&i.push(a.removeCredential(c))}),[4,Promise.all(i)]):[3,2];case 1:s.sent(),s.label=2;case 2:return this.setAccessTokenCredential(e),[2]}})})},t.prototype.getAccountsFilteredBy=function(e){return this.getAccountsFilteredByInternal(e?e.homeAccountId:_.EMPTY_STRING,e?e.environment:_.EMPTY_STRING,e?e.realm:_.EMPTY_STRING,e?e.nativeAccountId:_.EMPTY_STRING)},t.prototype.getAccountsFilteredByInternal=function(e,r,n,o){var i=this,a=this.getKeys(),s={};return a.forEach(function(c){var l=i.getAccount(c);!l||!!e&&!i.matchHomeAccountId(l,e)||!!r&&!i.matchEnvironment(l,r)||!!n&&!i.matchRealm(l,n)||!!o&&!i.matchNativeAccountId(l,o)||(s[c]=l)}),s},t.prototype.getCredentialsFilteredBy=function(e){return this.getCredentialsFilteredByInternal(e.homeAccountId,e.environment,e.credentialType,e.clientId,e.familyId,e.realm,e.target,e.userAssertionHash,e.tokenType,e.keyId,e.requestedClaimsHash)},t.prototype.getCredentialsFilteredByInternal=function(e,r,n,o,i,a,s,c,l,u,h){var d=this,f=this.getKeys(),m={idTokens:{},accessTokens:{},refreshTokens:{}};return f.forEach(function(v){var E=za.getCredentialType(v);if(E!==_.NOT_DEFINED){var g=d.getSpecificCredential(v,E);if(!!g&&!(!!c&&!d.matchUserAssertionHash(g,c))&&!(typeof e=="string"&&!d.matchHomeAccountId(g,e))&&!(!!r&&!d.matchEnvironment(g,r))&&!(!!a&&!d.matchRealm(g,a))&&!(!!n&&!d.matchCredentialType(g,n))&&!(!!o&&!d.matchClientId(g,o))&&!(!!i&&!d.matchFamilyId(g,i))&&!(!!s&&!d.matchTarget(g,s))&&!((h||g.requestedClaimsHash)&&g.requestedClaimsHash!==h)&&!(n===ee.ACCESS_TOKEN_WITH_AUTH_SCHEME&&(!!l&&!d.matchTokenType(g,l)||l===le.SSH&&u&&!d.matchKeyId(g,u)))){var p=d.updateCredentialCacheKey(v,g);switch(E){case ee.ID_TOKEN:m.idTokens[p]=g;break;case ee.ACCESS_TOKEN:case ee.ACCESS_TOKEN_WITH_AUTH_SCHEME:m.accessTokens[p]=g;break;case ee.REFRESH_TOKEN:m.refreshTokens[p]=g;break}}}}),m},t.prototype.getAppMetadataFilteredBy=function(e){return this.getAppMetadataFilteredByInternal(e.environment,e.clientId)},t.prototype.getAppMetadataFilteredByInternal=function(e,r){var n=this,o=this.getKeys(),i={};return o.forEach(function(a){if(!!n.isAppMetadata(a)){var s=n.getAppMetadata(a);!s||!!e&&!n.matchEnvironment(s,e)||!!r&&!n.matchClientId(s,r)||(i[a]=s)}}),i},t.prototype.getAuthorityMetadataByAlias=function(e){var r=this,n=this.getAuthorityMetadataKeys(),o=null;return n.forEach(function(i){if(!(!r.isAuthorityMetadata(i)||i.indexOf(r.clientId)===-1)){var a=r.getAuthorityMetadata(i);!a||a.aliases.indexOf(e)!==-1&&(o=a)}}),o},t.prototype.removeAllAccounts=function(){return K(this,void 0,void 0,function(){var e,r,n=this;return G(this,function(o){switch(o.label){case 0:return e=this.getKeys(),r=[],e.forEach(function(i){var a=n.getAccount(i);!a||r.push(n.removeAccount(i))}),[4,Promise.all(r)];case 1:return o.sent(),[2,!0]}})})},t.prototype.removeAccount=function(e){return K(this,void 0,void 0,function(){var r;return G(this,function(n){switch(n.label){case 0:if(r=this.getAccount(e),!r)throw D.createNoAccountFoundError();return[4,this.removeAccountContext(r)];case 1:return[2,n.sent()&&this.removeItem(e,to.ACCOUNT)]}})})},t.prototype.removeAccountContext=function(e){return K(this,void 0,void 0,function(){var r,n,o,i=this;return G(this,function(a){switch(a.label){case 0:return r=this.getKeys(),n=e.generateAccountId(),o=[],r.forEach(function(s){var c=za.getCredentialType(s);if(c!==_.NOT_DEFINED){var l=i.getSpecificCredential(s,c);!!l&&n===l.generateAccountId()&&o.push(i.removeCredential(l))}}),[4,Promise.all(o)];case 1:return a.sent(),[2,!0]}})})},t.prototype.removeCredential=function(e){return K(this,void 0,void 0,function(){var r,n,o;return G(this,function(i){switch(i.label){case 0:if(r=e.generateCredentialKey(),e.credentialType.toLowerCase()!==ee.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase())return[3,4];if(e.tokenType!==le.POP)return[3,4];if(n=e,o=n.keyId,!o)return[3,4];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.cryptoImpl.removeTokenBindingKey(o)];case 2:return i.sent(),[3,4];case 3:throw i.sent(),D.createBindingKeyNotRemovedError();case 4:return[2,this.removeItem(r,to.CREDENTIAL)]}})})},t.prototype.removeAppMetadata=function(){var e=this,r=this.getKeys();return r.forEach(function(n){e.isAppMetadata(n)&&e.removeItem(n,to.APP_METADATA)}),!0},t.prototype.readCacheRecord=function(e,r,n,o){var i=this.readAccountFromCache(e),a=this.readIdTokenFromCache(r,e),s=this.readAccessTokenFromCache(r,e,n),c=this.readRefreshTokenFromCache(r,e,!1),l=this.readAppMetadataFromCache(o,r);return i&&a&&(i.idTokenClaims=new kr(a.secret,this.cryptoImpl).claims),{account:i,idToken:a,accessToken:s,refreshToken:c,appMetadata:l}},t.prototype.readAccountFromCache=function(e){var r=tt.generateAccountCacheKey(e);return this.getAccount(r)},t.prototype.readAccountFromCacheWithNativeAccountId=function(e){var r={nativeAccountId:e},n=this.getAccountsFilteredBy(r),o=Object.keys(n).map(function(i){return n[i]});if(o.length<1)return null;if(o.length>1)throw D.createMultipleMatchingAccountsInCacheError();return n[0]},t.prototype.readIdTokenFromCache=function(e,r){var n={homeAccountId:r.homeAccountId,environment:r.environment,credentialType:ee.ID_TOKEN,clientId:e,realm:r.tenantId},o=this.getCredentialsFilteredBy(n),i=Object.keys(o.idTokens).map(function(s){return o.idTokens[s]}),a=i.length;if(a<1)return null;if(a>1)throw D.createMultipleMatchingTokensInCacheError();return i[0]},t.prototype.readAccessTokenFromCache=function(e,r,n){var o=new Ct(n.scopes||[]),i=n.authenticationScheme||le.BEARER,a=i&&i.toLowerCase()!==le.BEARER.toLowerCase()?ee.ACCESS_TOKEN_WITH_AUTH_SCHEME:ee.ACCESS_TOKEN,s={homeAccountId:r.homeAccountId,environment:r.environment,credentialType:a,clientId:e,realm:r.tenantId,target:o.printScopesLowerCase(),tokenType:i,keyId:n.sshKid,requestedClaimsHash:n.requestedClaimsHash},c=this.getCredentialsFilteredBy(s),l=Object.keys(c.accessTokens).map(function(h){return c.accessTokens[h]}),u=l.length;if(u<1)return null;if(u>1)throw D.createMultipleMatchingTokensInCacheError();return l[0]},t.prototype.readRefreshTokenFromCache=function(e,r,n){var o=n?Dc:void 0,i={homeAccountId:r.homeAccountId,environment:r.environment,credentialType:ee.REFRESH_TOKEN,clientId:e,familyId:o},a=this.getCredentialsFilteredBy(i),s=Object.keys(a.refreshTokens).map(function(l){return a.refreshTokens[l]}),c=s.length;return c<1?null:s[0]},t.prototype.readAppMetadataFromCache=function(e,r){var n={environment:e,clientId:r},o=this.getAppMetadataFilteredBy(n),i=Object.keys(o).map(function(s){return o[s]}),a=i.length;if(a<1)return null;if(a>1)throw D.createMultipleMatchingAppMetadataInCacheError();return i[0]},t.prototype.isAppMetadataFOCI=function(e,r){var n=this.readAppMetadataFromCache(e,r);return!!(n&&n.familyId===Dc)},t.prototype.matchHomeAccountId=function(e,r){return typeof e.homeAccountId=="string"&&r===e.homeAccountId},t.prototype.matchUserAssertionHash=function(e,r){return!!(e.userAssertionHash&&r===e.userAssertionHash)},t.prototype.matchEnvironment=function(e,r){var n=this.getAuthorityMetadataByAlias(r);return!!(n&&n.aliases.indexOf(e.environment)>-1)},t.prototype.matchCredentialType=function(e,r){return e.credentialType&&r.toLowerCase()===e.credentialType.toLowerCase()},t.prototype.matchClientId=function(e,r){return!!(e.clientId&&r===e.clientId)},t.prototype.matchFamilyId=function(e,r){return!!(e.familyId&&r===e.familyId)},t.prototype.matchRealm=function(e,r){return!!(e.realm&&r===e.realm)},t.prototype.matchNativeAccountId=function(e,r){return!!(e.nativeAccountId&&r===e.nativeAccountId)},t.prototype.matchTarget=function(e,r){var n=e.credentialType!==ee.ACCESS_TOKEN&&e.credentialType!==ee.ACCESS_TOKEN_WITH_AUTH_SCHEME;if(n||!e.target)return!1;var o=Ct.fromString(e.target),i=Ct.fromString(r);return i.containsOnlyOIDCScopes()?i.removeScope(_.OFFLINE_ACCESS_SCOPE):i.removeOIDCScopes(),o.containsScopeSet(i)},t.prototype.matchTokenType=function(e,r){return!!(e.tokenType&&e.tokenType===r)},t.prototype.matchKeyId=function(e,r){return!!(e.keyId&&e.keyId===r)},t.prototype.isAppMetadata=function(e){return e.indexOf(Cd)!==-1},t.prototype.isAuthorityMetadata=function(e){return e.indexOf(_a.CACHE_KEY)!==-1},t.prototype.generateAuthorityMetadataCacheKey=function(e){return _a.CACHE_KEY+"-"+this.clientId+"-"+e},t.prototype.getSpecificCredential=function(e,r){switch(r){case ee.ID_TOKEN:return this.getIdTokenCredential(e);case ee.ACCESS_TOKEN:case ee.ACCESS_TOKEN_WITH_AUTH_SCHEME:return this.getAccessTokenCredential(e);case ee.REFRESH_TOKEN:return this.getRefreshTokenCredential(e);default:return null}},t.toObject=function(e,r){for(var n in r)e[n]=r[n];return e},t}(),PC=function(t){Mt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.setAccount=function(){var r="Storage interface - setAccount() has not been implemented for the cacheStorage interface.";throw z.createUnexpectedError(r)},e.prototype.getAccount=function(){var r="Storage interface - getAccount() has not been implemented for the cacheStorage interface.";throw z.createUnexpectedError(r)},e.prototype.setIdTokenCredential=function(){var r="Storage interface - setIdTokenCredential() has not been implemented for the cacheStorage interface.";throw z.createUnexpectedError(r)},e.prototype.getIdTokenCredential=function(){var r="Storage interface - getIdTokenCredential() has not been implemented for the cacheStorage interface.";throw z.createUnexpectedError(r)},e.prototype.setAccessTokenCredential=function(){var r="Storage interface - setAccessTokenCredential() has not been implemented for the cacheStorage interface.";throw z.createUnexpectedError(r)},e.prototype.getAccessTokenCredential=function(){var r="Storage interface - getAccessTokenCredential() has not been implemented for the cacheStorage interface.";throw z.createUnexpectedError(r)},e.prototype.setRefreshTokenCredential=function(){var r="Storage interface - setRefreshTokenCredential() has not been implemented for the cacheStorage interface.";throw z.createUnexpectedError(r)},e.prototype.getRefreshTokenCredential=function(){var r="Storage interface - getRefreshTokenCredential() has not been implemented for the cacheStorage interface.";throw z.createUnexpectedError(r)},e.prototype.setAppMetadata=function(){var r="Storage interface - setAppMetadata() has not been implemented for the cacheStorage interface.";throw z.createUnexpectedError(r)},e.prototype.getAppMetadata=function(){var r="Storage interface - getAppMetadata() has not been implemented for the cacheStorage interface.";throw z.createUnexpectedError(r)},e.prototype.setServerTelemetry=function(){var r="Storage interface - setServerTelemetry() has not been implemented for the cacheStorage interface.";throw z.createUnexpectedError(r)},e.prototype.getServerTelemetry=function(){var r="Storage interface - getServerTelemetry() has not been implemented for the cacheStorage interface.";throw z.createUnexpectedError(r)},e.prototype.setAuthorityMetadata=function(){var r="Storage interface - setAuthorityMetadata() has not been implemented for the cacheStorage interface.";throw z.createUnexpectedError(r)},e.prototype.getAuthorityMetadata=function(){var r="Storage interface - getAuthorityMetadata() has not been implemented for the cacheStorage interface.";throw z.createUnexpectedError(r)},e.prototype.getAuthorityMetadataKeys=function(){var r="Storage interface - getAuthorityMetadataKeys() has not been implemented for the cacheStorage interface.";throw z.createUnexpectedError(r)},e.prototype.setThrottlingCache=function(){var r="Storage interface - setThrottlingCache() has not been implemented for the cacheStorage interface.";throw z.createUnexpectedError(r)},e.prototype.getThrottlingCache=function(){var r="Storage interface - getThrottlingCache() has not been implemented for the cacheStorage interface.";throw z.createUnexpectedError(r)},e.prototype.removeItem=function(){var r="Storage interface - removeItem() has not been implemented for the cacheStorage interface.";throw z.createUnexpectedError(r)},e.prototype.containsKey=function(){var r="Storage interface - containsKey() has not been implemented for the cacheStorage interface.";throw z.createUnexpectedError(r)},e.prototype.getKeys=function(){var r="Storage interface - getKeys() has not been implemented for the cacheStorage interface.";throw z.createUnexpectedError(r)},e.prototype.clear=function(){return K(this,void 0,void 0,function(){var r;return G(this,function(n){throw r="Storage interface - clear() has not been implemented for the cacheStorage interface.",z.createUnexpectedError(r)})})},e.prototype.updateCredentialCacheKey=function(){var r="Storage interface - updateCredentialCacheKey() has not been implemented for the cacheStorage interface.";throw z.createUnexpectedError(r)},e}(or);/*! @azure/msal-common v8.0.0 2022-11-07 */var NC=300,Ty={tokenRenewalOffsetSeconds:NC,preventCorsPreflight:!1,proxyUrl:_.EMPTY_STRING},OC={loggerCallback:function(){},piiLoggingEnabled:!1,logLevel:xe.Info,correlationId:_.EMPTY_STRING},xC={sendGetRequestAsync:function(){return K(this,void 0,void 0,function(){var t;return G(this,function(e){throw t="Network interface - sendGetRequestAsync() has not been implemented",z.createUnexpectedError(t)})})},sendPostRequestAsync:function(){return K(this,void 0,void 0,function(){var t;return G(this,function(e){throw t="Network interface - sendPostRequestAsync() has not been implemented",z.createUnexpectedError(t)})})}},MC={sku:_.SKU,version:Sy,cpu:_.EMPTY_STRING,os:_.EMPTY_STRING},UC={clientSecret:_.EMPTY_STRING,clientAssertion:void 0},LC={azureCloudInstance:$a.None,tenant:""+_.DEFAULT_COMMON_TENANT},DC={application:{appName:"",appVersion:""}};function HC(t){var e=t.authOptions,r=t.systemOptions,n=t.loggerOptions,o=t.storageInterface,i=t.networkInterface,a=t.cryptoInterface,s=t.clientCredentials,c=t.libraryInfo,l=t.telemetry,u=t.serverTelemetryManager,h=t.persistencePlugin,d=t.serializableCache,f=ve(ve({},OC),n);return{authOptions:FC(e),systemOptions:ve(ve({},Ty),r),loggerOptions:f,storageInterface:o||new PC(e.clientId,Fc),networkInterface:i||xC,cryptoInterface:a||Fc,clientCredentials:s||UC,libraryInfo:ve(ve({},MC),c),telemetry:ve(ve({},DC),l),serverTelemetryManager:u||null,persistencePlugin:h||null,serializableCache:d||null}}function FC(t){return ve({clientCapabilities:[],azureCloudOptions:LC,skipAuthorityMetadataCache:!1},t)}/*! @azure/msal-common v8.0.0 2022-11-07 */var vo=function(t){Mt(e,t);function e(r,n,o){var i=t.call(this,r,n,o)||this;return i.name="ServerError",Object.setPrototypeOf(i,e.prototype),i}return e}(z);/*! @azure/msal-common v8.0.0 2022-11-07 */var zc=function(){function t(){}return t.generateThrottlingStorageKey=function(e){return wa.THROTTLING_PREFIX+"."+JSON.stringify(e)},t.preProcess=function(e,r){var n,o=t.generateThrottlingStorageKey(r),i=e.getThrottlingCache(o);if(i){if(i.throttleTime<Date.now()){e.removeItem(o,to.THROTTLING);return}throw new vo(((n=i.errorCodes)===null||n===void 0?void 0:n.join(" "))||_.EMPTY_STRING,i.errorMessage,i.subError)}},t.postProcess=function(e,r,n){if(t.checkResponseStatus(n)||t.checkResponseForRetryAfter(n)){var o={throttleTime:t.calculateThrottleTime(parseInt(n.headers[hr.RETRY_AFTER])),error:n.body.error,errorCodes:n.body.error_codes,errorMessage:n.body.error_description,subError:n.body.suberror};e.setThrottlingCache(t.generateThrottlingStorageKey(r),o)}},t.checkResponseStatus=function(e){return e.status===429||e.status>=500&&e.status<600},t.checkResponseForRetryAfter=function(e){return e.headers?e.headers.hasOwnProperty(hr.RETRY_AFTER)&&(e.status<200||e.status>=300):!1},t.calculateThrottleTime=function(e){var r=e<=0?0:e,n=Date.now()/1e3;return Math.floor(Math.min(n+(r||wa.DEFAULT_THROTTLE_TIME_SECONDS),n+wa.DEFAULT_MAX_THROTTLE_TIME_SECONDS)*1e3)},t.removeThrottle=function(e,r,n,o){var i={clientId:r,authority:n.authority,scopes:n.scopes,homeAccountIdentifier:o,claims:n.claims,authenticationScheme:n.authenticationScheme,resourceRequestMethod:n.resourceRequestMethod,resourceRequestUri:n.resourceRequestUri,shrClaims:n.shrClaims,sshKid:n.sshKid},a=this.generateThrottlingStorageKey(i);return e.removeItem(a,to.THROTTLING)},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var $C=function(){function t(e,r){this.networkClient=e,this.cacheManager=r}return t.prototype.sendPostRequest=function(e,r,n){return K(this,void 0,void 0,function(){var o,i;return G(this,function(a){switch(a.label){case 0:zc.preProcess(this.cacheManager,e),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.networkClient.sendPostRequestAsync(r,n)];case 2:return o=a.sent(),[3,4];case 3:throw i=a.sent(),i instanceof z?i:D.createNetworkError(r,i);case 4:return zc.postProcess(this.cacheManager,e,o),[2,o]}})})},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var Dt;(function(t){t.HOME_ACCOUNT_ID="home_account_id",t.UPN="UPN"})(Dt||(Dt={}));/*! @azure/msal-common v8.0.0 2022-11-07 */var Bh=function(){function t(e,r){this.config=HC(e),this.logger=new jh(this.config.loggerOptions,RC,Sy),this.cryptoUtils=this.config.cryptoInterface,this.cacheManager=this.config.storageInterface,this.networkClient=this.config.networkInterface,this.networkManager=new $C(this.networkClient,this.cacheManager),this.serverTelemetryManager=this.config.serverTelemetryManager,this.authority=this.config.authOptions.authority,this.performanceClient=r}return t.prototype.createTokenRequestHeaders=function(e){var r={};if(r[hr.CONTENT_TYPE]=_.URL_FORM_CONTENT_TYPE,!this.config.systemOptions.preventCorsPreflight&&e)switch(e.type){case Dt.HOME_ACCOUNT_ID:try{var n=Yo(e.credential);r[hr.CCS_HEADER]="Oid:"+n.uid+"@"+n.utid}catch(o){this.logger.verbose("Could not parse home account ID for CCS Header: "+o)}break;case Dt.UPN:r[hr.CCS_HEADER]="UPN: "+e.credential;break}return r},t.prototype.executePostToTokenEndpoint=function(e,r,n,o){return K(this,void 0,void 0,function(){var i;return G(this,function(a){switch(a.label){case 0:return[4,this.networkManager.sendPostRequest(o,e,{body:r,headers:n,proxyUrl:this.config.systemOptions.proxyUrl})];case 1:return i=a.sent(),this.config.serverTelemetryManager&&i.status<500&&i.status!==429&&this.config.serverTelemetryManager.clearTelemetryCache(),[2,i]}})})},t.prototype.updateAuthority=function(e){if(!e.discoveryComplete())throw D.createEndpointDiscoveryIncompleteError("Updated authority has not completed endpoint discovery.");this.authority=e},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var qn=function(){function t(){}return t.validateRedirectUri=function(e){if(x.isEmpty(e))throw Ee.createRedirectUriEmptyError()},t.validatePrompt=function(e){var r=[];for(var n in mt)r.push(mt[n]);if(r.indexOf(e)<0)throw Ee.createInvalidPromptError(e)},t.validateClaims=function(e){try{JSON.parse(e)}catch{throw Ee.createInvalidClaimsRequestError()}},t.validateCodeChallengeParams=function(e,r){if(x.isEmpty(e)||x.isEmpty(r))throw Ee.createInvalidCodeChallengeParamsError();this.validateCodeChallengeMethod(r)},t.validateCodeChallengeMethod=function(e){if([bp.PLAIN,bp.S256].indexOf(e)<0)throw Ee.createInvalidCodeChallengeMethodError()},t.sanitizeEQParams=function(e,r){return e?(r.forEach(function(n,o){e[o]&&delete e[o]}),e):{}},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var Qo=function(){function t(){this.parameters=new Map}return t.prototype.addResponseTypeCode=function(){this.parameters.set(Q.RESPONSE_TYPE,encodeURIComponent(_.CODE_RESPONSE_TYPE))},t.prototype.addResponseTypeForTokenAndIdToken=function(){this.parameters.set(Q.RESPONSE_TYPE,encodeURIComponent(_.TOKEN_RESPONSE_TYPE+" "+_.ID_TOKEN_RESPONSE_TYPE))},t.prototype.addResponseMode=function(e){this.parameters.set(Q.RESPONSE_MODE,encodeURIComponent(e||Uc.QUERY))},t.prototype.addNativeBroker=function(){this.parameters.set(Q.NATIVE_BROKER,encodeURIComponent("1"))},t.prototype.addScopes=function(e,r){r===void 0&&(r=!0);var n=r?yl(e||[],ts):e||[],o=new Ct(n);this.parameters.set(Q.SCOPE,encodeURIComponent(o.printScopes()))},t.prototype.addClientId=function(e){this.parameters.set(Q.CLIENT_ID,encodeURIComponent(e))},t.prototype.addRedirectUri=function(e){qn.validateRedirectUri(e),this.parameters.set(Q.REDIRECT_URI,encodeURIComponent(e))},t.prototype.addPostLogoutRedirectUri=function(e){qn.validateRedirectUri(e),this.parameters.set(Q.POST_LOGOUT_URI,encodeURIComponent(e))},t.prototype.addIdTokenHint=function(e){this.parameters.set(Q.ID_TOKEN_HINT,encodeURIComponent(e))},t.prototype.addDomainHint=function(e){this.parameters.set(ya.DOMAIN_HINT,encodeURIComponent(e))},t.prototype.addLoginHint=function(e){this.parameters.set(ya.LOGIN_HINT,encodeURIComponent(e))},t.prototype.addCcsUpn=function(e){this.parameters.set(hr.CCS_HEADER,encodeURIComponent("UPN:"+e))},t.prototype.addCcsOid=function(e){this.parameters.set(hr.CCS_HEADER,encodeURIComponent("Oid:"+e.uid+"@"+e.utid))},t.prototype.addSid=function(e){this.parameters.set(ya.SID,encodeURIComponent(e))},t.prototype.addClaims=function(e,r){var n=this.addClientCapabilitiesToClaims(e,r);qn.validateClaims(n),this.parameters.set(Q.CLAIMS,encodeURIComponent(n))},t.prototype.addCorrelationId=function(e){this.parameters.set(Q.CLIENT_REQUEST_ID,encodeURIComponent(e))},t.prototype.addLibraryInfo=function(e){this.parameters.set(Q.X_CLIENT_SKU,e.sku),this.parameters.set(Q.X_CLIENT_VER,e.version),e.os&&this.parameters.set(Q.X_CLIENT_OS,e.os),e.cpu&&this.parameters.set(Q.X_CLIENT_CPU,e.cpu)},t.prototype.addApplicationTelemetry=function(e){e!=null&&e.appName&&this.parameters.set(Q.X_APP_NAME,e.appName),e!=null&&e.appVersion&&this.parameters.set(Q.X_APP_VER,e.appVersion)},t.prototype.addPrompt=function(e){qn.validatePrompt(e),this.parameters.set(""+Q.PROMPT,encodeURIComponent(e))},t.prototype.addState=function(e){x.isEmpty(e)||this.parameters.set(Q.STATE,encodeURIComponent(e))},t.prototype.addNonce=function(e){this.parameters.set(Q.NONCE,encodeURIComponent(e))},t.prototype.addCodeChallengeParams=function(e,r){if(qn.validateCodeChallengeParams(e,r),e&&r)this.parameters.set(Q.CODE_CHALLENGE,encodeURIComponent(e)),this.parameters.set(Q.CODE_CHALLENGE_METHOD,encodeURIComponent(r));else throw Ee.createInvalidCodeChallengeParamsError()},t.prototype.addAuthorizationCode=function(e){this.parameters.set(Q.CODE,encodeURIComponent(e))},t.prototype.addDeviceCode=function(e){this.parameters.set(Q.DEVICE_CODE,encodeURIComponent(e))},t.prototype.addRefreshToken=function(e){this.parameters.set(Q.REFRESH_TOKEN,encodeURIComponent(e))},t.prototype.addCodeVerifier=function(e){this.parameters.set(Q.CODE_VERIFIER,encodeURIComponent(e))},t.prototype.addClientSecret=function(e){this.parameters.set(Q.CLIENT_SECRET,encodeURIComponent(e))},t.prototype.addClientAssertion=function(e){x.isEmpty(e)||this.parameters.set(Q.CLIENT_ASSERTION,encodeURIComponent(e))},t.prototype.addClientAssertionType=function(e){x.isEmpty(e)||this.parameters.set(Q.CLIENT_ASSERTION_TYPE,encodeURIComponent(e))},t.prototype.addOboAssertion=function(e){this.parameters.set(Q.OBO_ASSERTION,encodeURIComponent(e))},t.prototype.addRequestTokenUse=function(e){this.parameters.set(Q.REQUESTED_TOKEN_USE,encodeURIComponent(e))},t.prototype.addGrantType=function(e){this.parameters.set(Q.GRANT_TYPE,encodeURIComponent(e))},t.prototype.addClientInfo=function(){this.parameters.set(AC,"1")},t.prototype.addExtraQueryParameters=function(e){var r=this;qn.sanitizeEQParams(e,this.parameters),Object.keys(e).forEach(function(n){r.parameters.set(n,e[n])})},t.prototype.addClientCapabilitiesToClaims=function(e,r){var n;if(!e)n={};else try{n=JSON.parse(e)}catch{throw Ee.createInvalidClaimsRequestError()}return r&&r.length>0&&(n.hasOwnProperty(Vo.ACCESS_TOKEN)||(n[Vo.ACCESS_TOKEN]={}),n[Vo.ACCESS_TOKEN][Vo.XMS_CC]={values:r}),JSON.stringify(n)},t.prototype.addUsername=function(e){this.parameters.set(Hc.username,encodeURIComponent(e))},t.prototype.addPassword=function(e){this.parameters.set(Hc.password,encodeURIComponent(e))},t.prototype.addPopToken=function(e){x.isEmpty(e)||(this.parameters.set(Q.TOKEN_TYPE,le.POP),this.parameters.set(Q.REQ_CNF,encodeURIComponent(e)))},t.prototype.addSshJwk=function(e){x.isEmpty(e)||(this.parameters.set(Q.TOKEN_TYPE,le.SSH),this.parameters.set(Q.REQ_CNF,encodeURIComponent(e)))},t.prototype.addServerTelemetry=function(e){this.parameters.set(Q.X_CLIENT_CURR_TELEM,e.generateCurrentRequestHeaderValue()),this.parameters.set(Q.X_CLIENT_LAST_TELEM,e.generateLastRequestHeaderValue())},t.prototype.addThrottling=function(){this.parameters.set(Q.X_MS_LIB_CAPABILITY,wa.X_MS_LIB_CAPABILITY_VALUE)},t.prototype.addLogoutHint=function(e){this.parameters.set(Q.LOGOUT_HINT,encodeURIComponent(e))},t.prototype.createQueryString=function(){var e=new Array;return this.parameters.forEach(function(r,n){e.push(n+"="+r)}),e.join("&")},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var ja=function(t){Mt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.createIdTokenEntity=function(r,n,o,i,a){var s=new e;return s.credentialType=ee.ID_TOKEN,s.homeAccountId=r,s.environment=n,s.clientId=i,s.secret=o,s.realm=a,s},e.isIdTokenEntity=function(r){return r?r.hasOwnProperty("homeAccountId")&&r.hasOwnProperty("environment")&&r.hasOwnProperty("credentialType")&&r.hasOwnProperty("realm")&&r.hasOwnProperty("clientId")&&r.hasOwnProperty("secret")&&r.credentialType===ee.ID_TOKEN:!1},e}(za);/*! @azure/msal-common v8.0.0 2022-11-07 */var Jt=function(){function t(){}return t.nowSeconds=function(){return Math.round(new Date().getTime()/1e3)},t.isTokenExpired=function(e,r){var n=Number(e)||0,o=t.nowSeconds()+r;return o>n},t.wasClockTurnedBack=function(e){var r=Number(e);return r>t.nowSeconds()},t.delay=function(e,r){return new Promise(function(n){return setTimeout(function(){return n(r)},e)})},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var Ba=function(t){Mt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.createAccessTokenEntity=function(r,n,o,i,a,s,c,l,u,h,d,f,m,v,E){var g,p,y=new e;y.homeAccountId=r,y.credentialType=ee.ACCESS_TOKEN,y.secret=o;var w=Jt.nowSeconds();if(y.cachedAt=w.toString(),y.expiresOn=c.toString(),y.extendedExpiresOn=l.toString(),h&&(y.refreshOn=h.toString()),y.environment=n,y.clientId=i,y.realm=a,y.target=s,y.userAssertionHash=f,y.tokenType=x.isEmpty(d)?le.BEARER:d,v&&(y.requestedClaims=v,y.requestedClaimsHash=E),((g=y.tokenType)===null||g===void 0?void 0:g.toLowerCase())!==le.BEARER.toLowerCase())switch(y.credentialType=ee.ACCESS_TOKEN_WITH_AUTH_SCHEME,y.tokenType){case le.POP:var k=kr.extractTokenClaims(o,u);if(!(!((p=k==null?void 0:k.cnf)===null||p===void 0)&&p.kid))throw D.createTokenClaimsRequiredError();y.keyId=k.cnf.kid;break;case le.SSH:y.keyId=m}return y},e.isAccessTokenEntity=function(r){return r?r.hasOwnProperty("homeAccountId")&&r.hasOwnProperty("environment")&&r.hasOwnProperty("credentialType")&&r.hasOwnProperty("realm")&&r.hasOwnProperty("clientId")&&r.hasOwnProperty("secret")&&r.hasOwnProperty("target")&&(r.credentialType===ee.ACCESS_TOKEN||r.credentialType===ee.ACCESS_TOKEN_WITH_AUTH_SCHEME):!1},e}(za);/*! @azure/msal-common v8.0.0 2022-11-07 */var jc=function(t){Mt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.createRefreshTokenEntity=function(r,n,o,i,a,s){var c=new e;return c.clientId=i,c.credentialType=ee.REFRESH_TOKEN,c.environment=n,c.homeAccountId=r,c.secret=o,c.userAssertionHash=s,a&&(c.familyId=a),c},e.isRefreshTokenEntity=function(r){return r?r.hasOwnProperty("homeAccountId")&&r.hasOwnProperty("environment")&&r.hasOwnProperty("credentialType")&&r.hasOwnProperty("clientId")&&r.hasOwnProperty("secret")&&r.credentialType===ee.REFRESH_TOKEN:!1},e}(za);/*! @azure/msal-common v8.0.0 2022-11-07 */var kp=["interaction_required","consent_required","login_required"],zC=["message_only","additional_action","basic_action","user_password_expired","consent_required"],ta={noTokensFoundError:{code:"no_tokens_found",desc:"No refresh token found in the cache. Please sign-in."},native_account_unavailable:{code:"native_account_unavailable",desc:"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."}},lr=function(t){Mt(e,t);function e(r,n,o){var i=t.call(this,r,n,o)||this;return i.name="InteractionRequiredAuthError",Object.setPrototypeOf(i,e.prototype),i}return e.isInteractionRequiredError=function(r,n,o){var i=!!r&&kp.indexOf(r)>-1,a=!!o&&zC.indexOf(o)>-1,s=!!n&&kp.some(function(c){return n.indexOf(c)>-1});return i||s||a},e.createNoTokensFoundError=function(){return new e(ta.noTokensFoundError.code,ta.noTokensFoundError.desc)},e.createNativeAccountUnavailableError=function(){return new e(ta.native_account_unavailable.code,ta.native_account_unavailable.desc)},e}(z);/*! @azure/msal-common v8.0.0 2022-11-07 */var Qs=function(){function t(e,r,n,o,i){this.account=e||null,this.idToken=r||null,this.accessToken=n||null,this.refreshToken=o||null,this.appMetadata=i||null}return t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var Wr=function(){function t(){}return t.setRequestState=function(e,r,n){var o=t.generateLibraryState(e,n);return x.isEmpty(r)?o:""+o+_.RESOURCE_DELIM+r},t.generateLibraryState=function(e,r){if(!e)throw D.createNoCryptoObjectError("generateLibraryState");var n={id:e.createNewGuid()};r&&(n.meta=r);var o=JSON.stringify(n);return e.base64Encode(o)},t.parseRequestState=function(e,r){if(!e)throw D.createNoCryptoObjectError("parseRequestState");if(x.isEmpty(r))throw D.createInvalidStateError(r,"Null, undefined or empty state");try{var n=r.split(_.RESOURCE_DELIM),o=n[0],i=n.length>1?n.slice(1).join(_.RESOURCE_DELIM):_.EMPTY_STRING,a=e.base64Decode(o),s=JSON.parse(a);return{userRequestState:x.isEmpty(i)?_.EMPTY_STRING:i,libraryState:s}}catch(c){throw D.createInvalidStateError(r,c)}},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var oe=function(){function t(e){if(this._urlString=e,x.isEmpty(this._urlString))throw Ee.createUrlEmptyError();x.isEmpty(this.getHash())&&(this._urlString=t.canonicalizeUri(e))}return Object.defineProperty(t.prototype,"urlString",{get:function(){return this._urlString},enumerable:!1,configurable:!0}),t.canonicalizeUri=function(e){if(e){var r=e.toLowerCase();return x.endsWith(r,"?")?r=r.slice(0,-1):x.endsWith(r,"?/")&&(r=r.slice(0,-2)),x.endsWith(r,"/")||(r+="/"),r}return e},t.prototype.validateAsUri=function(){var e;try{e=this.getUrlComponents()}catch(r){throw Ee.createUrlParseError(r)}if(!e.HostNameAndPort||!e.PathSegments)throw Ee.createUrlParseError("Given url string: "+this.urlString);if(!e.Protocol||e.Protocol.toLowerCase()!=="https:")throw Ee.createInsecureAuthorityUriError(this.urlString)},t.appendQueryString=function(e,r){return x.isEmpty(r)?e:e.indexOf("?")<0?e+"?"+r:e+"&"+r},t.removeHashFromUrl=function(e){return t.canonicalizeUri(e.split("#")[0])},t.prototype.replaceTenantPath=function(e){var r=this.getUrlComponents(),n=r.PathSegments;return e&&n.length!==0&&(n[0]===Mc.COMMON||n[0]===Mc.ORGANIZATIONS)&&(n[0]=e),t.constructAuthorityUriFromObject(r)},t.prototype.getHash=function(){return t.parseHash(this.urlString)},t.prototype.getUrlComponents=function(){var e=RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?"),r=this.urlString.match(e);if(!r)throw Ee.createUrlParseError("Given url string: "+this.urlString);var n={Protocol:r[1],HostNameAndPort:r[4],AbsolutePath:r[5],QueryString:r[7]},o=n.AbsolutePath.split("/");return o=o.filter(function(i){return i&&i.length>0}),n.PathSegments=o,!x.isEmpty(n.QueryString)&&n.QueryString.endsWith("/")&&(n.QueryString=n.QueryString.substring(0,n.QueryString.length-1)),n},t.getDomainFromUrl=function(e){var r=RegExp("^([^:/?#]+://)?([^/?#]*)"),n=e.match(r);if(!n)throw Ee.createUrlParseError("Given url string: "+e);return n[2]},t.getAbsoluteUrl=function(e,r){if(e[0]===_.FORWARD_SLASH){var n=new t(r),o=n.getUrlComponents();return o.Protocol+"//"+o.HostNameAndPort+e}return e},t.parseHash=function(e){var r=e.indexOf("#"),n=e.indexOf("#/");return n>-1?e.substring(n+2):r>-1?e.substring(r+1):_.EMPTY_STRING},t.parseQueryString=function(e){var r=e.indexOf("?"),n=e.indexOf("/?");return n>-1?e.substring(n+2):r>-1?e.substring(r+1):_.EMPTY_STRING},t.constructAuthorityUriFromObject=function(e){return new t(e.Protocol+"//"+e.HostNameAndPort+"/"+e.PathSegments.join("/"))},t.getDeserializedHash=function(e){if(x.isEmpty(e))return{};var r=t.parseHash(e),n=x.queryStringToObject(x.isEmpty(r)?e:r);if(!n)throw D.createHashNotDeserializedError(JSON.stringify(n));return n},t.getDeserializedQueryString=function(e){if(x.isEmpty(e))return{};var r=t.parseQueryString(e),n=x.queryStringToObject(x.isEmpty(r)?e:r);if(!n)throw D.createHashNotDeserializedError(JSON.stringify(n));return n},t.hashContainsKnownProperties=function(e){if(x.isEmpty(e)||e.indexOf("=")<0)return!1;var r=t.getDeserializedHash(e);return!!(r.code||r.error_description||r.error||r.state)},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var Td;(function(t){t.SW="sw",t.UHW="uhw"})(Td||(Td={}));var vi=function(){function t(e){this.cryptoUtils=e}return t.prototype.generateCnf=function(e){return K(this,void 0,void 0,function(){var r,n,o;return G(this,function(i){switch(i.label){case 0:return[4,this.generateKid(e)];case 1:return r=i.sent(),n=this.cryptoUtils.base64Encode(JSON.stringify(r)),o={kid:r.kid,reqCnfString:n},[4,this.cryptoUtils.hashString(n)];case 2:return[2,(o.reqCnfHash=i.sent(),o)]}})})},t.prototype.generateKid=function(e){return K(this,void 0,void 0,function(){var r;return G(this,function(n){switch(n.label){case 0:return[4,this.cryptoUtils.getPublicKeyThumbprint(e)];case 1:return r=n.sent(),[2,{kid:r,xms_ksl:Td.SW}]}})})},t.prototype.signPopToken=function(e,r,n){return K(this,void 0,void 0,function(){return G(this,function(o){return[2,this.signPayload(e,r,n)]})})},t.prototype.signPayload=function(e,r,n,o){return K(this,void 0,void 0,function(){var i,a,s,c,l,u;return G(this,function(h){switch(h.label){case 0:return i=n.resourceRequestMethod,a=n.resourceRequestUri,s=n.shrClaims,c=n.shrNonce,l=a?new oe(a):void 0,u=l==null?void 0:l.getUrlComponents(),[4,this.cryptoUtils.signJwt(ve({at:e,ts:Jt.nowSeconds(),m:i==null?void 0:i.toUpperCase(),u:u==null?void 0:u.HostNameAndPort,nonce:c||this.cryptoUtils.createNewGuid(),p:u==null?void 0:u.AbsolutePath,q:u!=null&&u.QueryString?[[],u.QueryString]:void 0,client_claims:s||void 0},o),r,n.correlationId)];case 1:return[2,h.sent()]}})})},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var bd=function(){function t(){}return t.prototype.generateAppMetadataKey=function(){return t.generateAppMetadataCacheKey(this.environment,this.clientId)},t.generateAppMetadataCacheKey=function(e,r){var n=[Cd,e,r];return n.join(Ft.CACHE_KEY_SEPARATOR).toLowerCase()},t.createAppMetadataEntity=function(e,r,n){var o=new t;return o.clientId=e,o.environment=r,n&&(o.familyId=n),o},t.isAppMetadataEntity=function(e,r){return r?e.indexOf(Cd)===0&&r.hasOwnProperty("clientId")&&r.hasOwnProperty("environment"):!1},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var jC=function(){function t(e,r){this.cache=e,this.hasChanged=r}return Object.defineProperty(t.prototype,"cacheHasChanged",{get:function(){return this.hasChanged},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tokenCache",{get:function(){return this.cache},enumerable:!1,configurable:!0}),t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var Bc=function(){function t(e,r,n,o,i,a){this.clientId=e,this.cacheStorage=r,this.cryptoObj=n,this.logger=o,this.serializableCache=i,this.persistencePlugin=a}return t.prototype.validateServerAuthorizationCodeResponse=function(e,r,n){if(!e.state||!r)throw e.state?D.createStateNotFoundError("Cached State"):D.createStateNotFoundError("Server State");if(decodeURIComponent(e.state)!==decodeURIComponent(r))throw D.createStateMismatchError();if(e.error||e.error_description||e.suberror)throw lr.isInteractionRequiredError(e.error,e.error_description,e.suberror)?new lr(e.error||_.EMPTY_STRING,e.error_description,e.suberror):new vo(e.error||_.EMPTY_STRING,e.error_description,e.suberror);e.client_info&&$c(e.client_info,n)},t.prototype.validateTokenResponse=function(e){if(e.error||e.error_description||e.suberror){if(lr.isInteractionRequiredError(e.error,e.error_description,e.suberror))throw new lr(e.error,e.error_description,e.suberror);var r=e.error_codes+" - ["+e.timestamp+"]: "+e.error_description+" - Correlation ID: "+e.correlation_id+" - Trace ID: "+e.trace_id;throw new vo(e.error,r,e.suberror)}},t.prototype.handleServerTokenResponse=function(e,r,n,o,i,a,s,c,l){return K(this,void 0,void 0,function(){var u,h,d,f,m,v,E;return G(this,function(g){switch(g.label){case 0:if(e.id_token){if(u=new kr(e.id_token||_.EMPTY_STRING,this.cryptoObj),i&&!x.isEmpty(i.nonce)&&u.claims.nonce!==i.nonce)throw D.createNonceMismatchError();if(o.maxAge||o.maxAge===0){if(h=u.claims.auth_time,!h)throw D.createAuthTimeNotFoundError();kr.checkMaxAge(h,o.maxAge)}}this.homeAccountIdentifier=tt.generateHomeAccountId(e.client_info||_.EMPTY_STRING,r.authorityType,this.logger,this.cryptoObj,u),!!i&&!!i.state&&(d=Wr.parseRequestState(this.cryptoObj,i.state)),e.key_id=e.key_id||o.sshKid||void 0,f=this.generateCacheRecord(e,r,n,o,u,a,i),g.label=1;case 1:return g.trys.push([1,,5,8]),this.persistencePlugin&&this.serializableCache?(this.logger.verbose("Persistence enabled, calling beforeCacheAccess"),m=new jC(this.serializableCache,!0),[4,this.persistencePlugin.beforeCacheAccess(m)]):[3,3];case 2:g.sent(),g.label=3;case 3:return s&&!c&&f.account&&(v=f.account.generateAccountKey(),E=this.cacheStorage.getAccount(v),!E)?(this.logger.warning("Account used to refresh tokens not in persistence, refreshed tokens will not be stored in the cache"),[2,t.generateAuthenticationResult(this.cryptoObj,r,f,!1,o,u,d,void 0,l)]):[4,this.cacheStorage.saveCacheRecord(f)];case 4:return g.sent(),[3,8];case 5:return this.persistencePlugin&&this.serializableCache&&m?(this.logger.verbose("Persistence enabled, calling afterCacheAccess"),[4,this.persistencePlugin.afterCacheAccess(m)]):[3,7];case 6:g.sent(),g.label=7;case 7:return[7];case 8:return[2,t.generateAuthenticationResult(this.cryptoObj,r,f,!1,o,u,d,e.spa_code,l)]}})})},t.prototype.generateCacheRecord=function(e,r,n,o,i,a,s){var c=r.getPreferredCache();if(x.isEmpty(c))throw D.createInvalidCacheEnvironmentError();var l,u;!x.isEmpty(e.id_token)&&!!i&&(l=ja.createIdTokenEntity(this.homeAccountIdentifier,c,e.id_token||_.EMPTY_STRING,this.clientId,i.claims.tid||_.EMPTY_STRING),u=this.generateAccountEntity(e,i,r,s));var h=null;if(!x.isEmpty(e.access_token)){var d=e.scope?Ct.fromString(e.scope):new Ct(o.scopes||[]),f=(typeof e.expires_in=="string"?parseInt(e.expires_in,10):e.expires_in)||0,m=(typeof e.ext_expires_in=="string"?parseInt(e.ext_expires_in,10):e.ext_expires_in)||0,v=(typeof e.refresh_in=="string"?parseInt(e.refresh_in,10):e.refresh_in)||void 0,E=n+f,g=E+m,p=v&&v>0?n+v:void 0;h=Ba.createAccessTokenEntity(this.homeAccountIdentifier,c,e.access_token||_.EMPTY_STRING,this.clientId,i?i.claims.tid||_.EMPTY_STRING:r.tenant,d.printScopes(),E,g,this.cryptoObj,p,e.token_type,a,e.key_id,o.claims,o.requestedClaimsHash)}var y=null;x.isEmpty(e.refresh_token)||(y=jc.createRefreshTokenEntity(this.homeAccountIdentifier,c,e.refresh_token||_.EMPTY_STRING,this.clientId,e.foci,a));var w=null;return x.isEmpty(e.foci)||(w=bd.createAppMetadataEntity(this.clientId,c,e.foci)),new Qs(u,l,h,y,w)},t.prototype.generateAccountEntity=function(e,r,n,o){var i=n.authorityType,a=o?o.cloud_graph_host_name:_.EMPTY_STRING,s=o?o.msgraph_host:_.EMPTY_STRING;if(i===Wt.Adfs)return this.logger.verbose("Authority type is ADFS, creating ADFS account"),tt.createGenericAccount(this.homeAccountIdentifier,r,n,a,s);if(x.isEmpty(e.client_info)&&n.protocolMode==="AAD")throw D.createClientInfoEmptyError();return e.client_info?tt.createAccount(e.client_info,this.homeAccountIdentifier,r,n,a,s):tt.createGenericAccount(this.homeAccountIdentifier,r,n,a,s)},t.generateAuthenticationResult=function(e,r,n,o,i,a,s,c,l){var u,h,d;return K(this,void 0,void 0,function(){var f,m,v,E,g,p,y,w,k,P,M;return G(this,function(O){switch(O.label){case 0:if(f=_.EMPTY_STRING,m=[],v=null,g=_.EMPTY_STRING,!n.accessToken)return[3,4];if(n.accessToken.tokenType!==le.POP)return[3,2];if(p=new vi(e),y=n.accessToken,w=y.secret,k=y.keyId,!k)throw D.createKeyIdMissingError();return[4,p.signPopToken(w,k,i)];case 1:return f=O.sent(),[3,3];case 2:f=n.accessToken.secret,O.label=3;case 3:m=Ct.fromString(n.accessToken.target).asArray(),v=new Date(Number(n.accessToken.expiresOn)*1e3),E=new Date(Number(n.accessToken.extendedExpiresOn)*1e3),O.label=4;case 4:return n.appMetadata&&(g=n.appMetadata.familyId===Dc?Dc:_.EMPTY_STRING),P=(a==null?void 0:a.claims.oid)||(a==null?void 0:a.claims.sub)||_.EMPTY_STRING,M=(a==null?void 0:a.claims.tid)||_.EMPTY_STRING,[2,{authority:r.canonicalAuthority,uniqueId:P,tenantId:M,scopes:m,account:n.account?n.account.getAccountInfo():null,idToken:a?a.rawToken:_.EMPTY_STRING,idTokenClaims:a?a.claims:{},accessToken:f,fromCache:o,expiresOn:v,correlationId:i.correlationId,requestId:l||_.EMPTY_STRING,extExpiresOn:E,familyId:g,tokenType:((u=n.accessToken)===null||u===void 0?void 0:u.tokenType)||_.EMPTY_STRING,state:s?s.userRequestState:_.EMPTY_STRING,cloudGraphHostName:((h=n.account)===null||h===void 0?void 0:h.cloudGraphHostName)||_.EMPTY_STRING,msGraphHost:((d=n.account)===null||d===void 0?void 0:d.msGraphHost)||_.EMPTY_STRING,code:c,fromNativeBroker:!1}]}})})},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var by=function(t){Mt(e,t);function e(r){var n=t.call(this,r)||this;return n.includeRedirectUri=!0,n}return e.prototype.getAuthCodeUrl=function(r){return K(this,void 0,void 0,function(){var n;return G(this,function(o){switch(o.label){case 0:return[4,this.createAuthCodeUrlQueryString(r)];case 1:return n=o.sent(),[2,oe.appendQueryString(this.authority.authorizationEndpoint,n)]}})})},e.prototype.acquireToken=function(r,n){var o;return K(this,void 0,void 0,function(){var i,a,s,c;return G(this,function(l){switch(l.label){case 0:if(this.logger.info("in acquireToken call"),!r||x.isEmpty(r.code))throw D.createTokenRequestCannotBeMadeError();return i=Jt.nowSeconds(),[4,this.executeTokenRequest(this.authority,r)];case 1:return a=l.sent(),s=(o=a.headers)===null||o===void 0?void 0:o[hr.X_MS_REQUEST_ID],c=new Bc(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin),c.validateTokenResponse(a.body),[4,c.handleServerTokenResponse(a.body,this.authority,i,r,n,void 0,void 0,void 0,s)];case 2:return[2,l.sent()]}})})},e.prototype.handleFragmentResponse=function(r,n){var o=new Bc(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,null,null),i=new oe(r),a=oe.getDeserializedHash(i.getHash());if(o.validateServerAuthorizationCodeResponse(a,n,this.cryptoUtils),!a.code)throw D.createNoAuthCodeInServerResponseError();return ve(ve({},a),{code:a.code})},e.prototype.getLogoutUri=function(r){if(!r)throw Ee.createEmptyLogoutRequestError();var n=this.createLogoutUrlQueryString(r);return oe.appendQueryString(this.authority.endSessionEndpoint,n)},e.prototype.executeTokenRequest=function(r,n){return K(this,void 0,void 0,function(){var o,i,a,s,c,l,u;return G(this,function(h){switch(h.label){case 0:return o={clientId:this.config.authOptions.clientId,authority:r.canonicalAuthority,scopes:n.scopes,claims:n.claims,authenticationScheme:n.authenticationScheme,resourceRequestMethod:n.resourceRequestMethod,resourceRequestUri:n.resourceRequestUri,shrClaims:n.shrClaims,sshKid:n.sshKid},[4,this.createTokenRequestBody(n)];case 1:if(i=h.sent(),a=this.createTokenQueryParameters(n),s=void 0,n.clientInfo)try{c=$c(n.clientInfo,this.cryptoUtils),s={credential:""+c.uid+Ft.CLIENT_INFO_SEPARATOR+c.utid,type:Dt.HOME_ACCOUNT_ID}}catch(d){this.logger.verbose("Could not parse client info for CCS Header: "+d)}return l=this.createTokenRequestHeaders(s||n.ccsCredential),u=x.isEmpty(a)?r.tokenEndpoint:r.tokenEndpoint+"?"+a,[2,this.executePostToTokenEndpoint(u,i,l,o)]}})})},e.prototype.createTokenQueryParameters=function(r){var n=new Qo;return r.tokenQueryParameters&&n.addExtraQueryParameters(r.tokenQueryParameters),n.createQueryString()},e.prototype.createTokenRequestBody=function(r){return K(this,void 0,void 0,function(){var n,o,i,a,s,c,l,l,u;return G(this,function(h){switch(h.label){case 0:return n=new Qo,n.addClientId(this.config.authOptions.clientId),this.includeRedirectUri?n.addRedirectUri(r.redirectUri):qn.validateRedirectUri(r.redirectUri),n.addScopes(r.scopes),n.addAuthorizationCode(r.code),n.addLibraryInfo(this.config.libraryInfo),n.addApplicationTelemetry(this.config.telemetry.application),n.addThrottling(),this.serverTelemetryManager&&n.addServerTelemetry(this.serverTelemetryManager),r.codeVerifier&&n.addCodeVerifier(r.codeVerifier),this.config.clientCredentials.clientSecret&&n.addClientSecret(this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion&&(o=this.config.clientCredentials.clientAssertion,n.addClientAssertion(o.assertion),n.addClientAssertionType(o.assertionType)),n.addGrantType(Lc.AUTHORIZATION_CODE_GRANT),n.addClientInfo(),r.authenticationScheme!==le.POP?[3,2]:(i=new vi(this.cryptoUtils),[4,i.generateCnf(r)]);case 1:return a=h.sent(),n.addPopToken(a.reqCnfString),[3,3];case 2:if(r.authenticationScheme===le.SSH)if(r.sshJwk)n.addSshJwk(r.sshJwk);else throw Ee.createMissingSshJwkError();h.label=3;case 3:if(s=r.correlationId||this.config.cryptoInterface.createNewGuid(),n.addCorrelationId(s),(!x.isEmptyObj(r.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&n.addClaims(r.claims,this.config.authOptions.clientCapabilities),c=void 0,r.clientInfo)try{l=$c(r.clientInfo,this.cryptoUtils),c={credential:""+l.uid+Ft.CLIENT_INFO_SEPARATOR+l.utid,type:Dt.HOME_ACCOUNT_ID}}catch(d){this.logger.verbose("Could not parse client info for CCS Header: "+d)}else c=r.ccsCredential;if(this.config.systemOptions.preventCorsPreflight&&c)switch(c.type){case Dt.HOME_ACCOUNT_ID:try{l=Yo(c.credential),n.addCcsOid(l)}catch(d){this.logger.verbose("Could not parse home account ID for CCS Header: "+d)}break;case Dt.UPN:n.addCcsUpn(c.credential);break}return r.tokenBodyParameters&&n.addExtraQueryParameters(r.tokenBodyParameters),r.enableSpaAuthorizationCode&&(!r.tokenBodyParameters||!r.tokenBodyParameters[Q.RETURN_SPA_CODE])&&n.addExtraQueryParameters((u={},u[Q.RETURN_SPA_CODE]="1",u)),[2,n.createQueryString()]}})})},e.prototype.createAuthCodeUrlQueryString=function(r){return K(this,void 0,void 0,function(){var n,o,i,a,s,c,c,c,l,u;return G(this,function(h){switch(h.label){case 0:if(n=new Qo,n.addClientId(this.config.authOptions.clientId),o=yl(r.scopes||[],r.extraScopesToConsent||[]),n.addScopes(o),n.addRedirectUri(r.redirectUri),i=r.correlationId||this.config.cryptoInterface.createNewGuid(),n.addCorrelationId(i),n.addResponseMode(r.responseMode),n.addResponseTypeCode(),n.addLibraryInfo(this.config.libraryInfo),n.addApplicationTelemetry(this.config.telemetry.application),n.addClientInfo(),r.codeChallenge&&r.codeChallengeMethod&&n.addCodeChallengeParams(r.codeChallenge,r.codeChallengeMethod),r.prompt&&n.addPrompt(r.prompt),r.domainHint&&n.addDomainHint(r.domainHint),r.prompt!==mt.SELECT_ACCOUNT)if(r.sid&&r.prompt===mt.NONE)this.logger.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from request"),n.addSid(r.sid);else if(r.account){if(a=this.extractAccountSid(r.account),s=this.extractLoginHint(r.account),s){this.logger.verbose("createAuthCodeUrlQueryString: login_hint claim present on account"),n.addLoginHint(s);try{c=Yo(r.account.homeAccountId),n.addCcsOid(c)}catch{this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(a&&r.prompt===mt.NONE){this.logger.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from account"),n.addSid(a);try{c=Yo(r.account.homeAccountId),n.addCcsOid(c)}catch{this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(r.loginHint)this.logger.verbose("createAuthCodeUrlQueryString: Adding login_hint from request"),n.addLoginHint(r.loginHint),n.addCcsUpn(r.loginHint);else if(r.account.username){this.logger.verbose("createAuthCodeUrlQueryString: Adding login_hint from account"),n.addLoginHint(r.account.username);try{c=Yo(r.account.homeAccountId),n.addCcsOid(c)}catch{this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}}else r.loginHint&&(this.logger.verbose("createAuthCodeUrlQueryString: No account, adding login_hint from request"),n.addLoginHint(r.loginHint),n.addCcsUpn(r.loginHint));else this.logger.verbose("createAuthCodeUrlQueryString: Prompt is select_account, ignoring account hints");return r.nonce&&n.addNonce(r.nonce),r.state&&n.addState(r.state),(!x.isEmpty(r.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&n.addClaims(r.claims,this.config.authOptions.clientCapabilities),r.extraQueryParameters&&n.addExtraQueryParameters(r.extraQueryParameters),r.nativeBroker?(n.addNativeBroker(),r.authenticationScheme!==le.POP?[3,2]:(l=new vi(this.cryptoUtils),[4,l.generateCnf(r)])):[3,2];case 1:u=h.sent(),n.addPopToken(u.reqCnfHash),h.label=2;case 2:return[2,n.createQueryString()]}})})},e.prototype.createLogoutUrlQueryString=function(r){var n=new Qo;return r.postLogoutRedirectUri&&n.addPostLogoutRedirectUri(r.postLogoutRedirectUri),r.correlationId&&n.addCorrelationId(r.correlationId),r.idTokenHint&&n.addIdTokenHint(r.idTokenHint),r.state&&n.addState(r.state),r.logoutHint&&n.addLogoutHint(r.logoutHint),r.extraQueryParameters&&n.addExtraQueryParameters(r.extraQueryParameters),n.createQueryString()},e.prototype.extractAccountSid=function(r){var n;return((n=r.idTokenClaims)===null||n===void 0?void 0:n.sid)||null},e.prototype.extractLoginHint=function(r){var n;return((n=r.idTokenClaims)===null||n===void 0?void 0:n.login_hint)||null},e}(Bh);/*! @azure/msal-common v8.0.0 2022-11-07 */var je;(function(t){t.AcquireTokenByCode="acquireTokenByCode",t.AcquireTokenByRefreshToken="acquireTokenByRefreshToken",t.AcquireTokenSilent="acquireTokenSilent",t.AcquireTokenSilentAsync="acquireTokenSilentAsync",t.AcquireTokenPopup="acquireTokenPopup",t.CryptoOptsGetPublicKeyThumbprint="cryptoOptsGetPublicKeyThumbprint",t.CryptoOptsSignJwt="cryptoOptsSignJwt",t.SilentCacheClientAcquireToken="silentCacheClientAcquireToken",t.SilentIframeClientAcquireToken="silentIframeClientAcquireToken",t.SilentRefreshClientAcquireToken="silentRefreshClientAcquireToken",t.SsoSilent="ssoSilent",t.StandardInteractionClientGetDiscoveredAuthority="standardInteractionClientGetDiscoveredAuthority",t.FetchAccountIdWithNativeBroker="fetchAccountIdWithNativeBroker",t.NativeInteractionClientAcquireToken="nativeInteractionClientAcquireToken",t.BaseClientCreateTokenRequestHeaders="baseClientCreateTokenRequestHeaders",t.BrokerHandhshake="brokerHandshake",t.AcquireTokenByRefreshTokenInBroker="acquireTokenByRefreshTokenInBroker",t.AcquireTokenByBroker="acquireTokenByBroker",t.RefreshTokenClientExecuteTokenRequest="refreshTokenClientExecuteTokenRequest",t.RefreshTokenClientAcquireToken="refreshTokenClientAcquireToken",t.RefreshTokenClientAcquireTokenWithCachedRefreshToken="refreshTokenClientAcquireTokenWithCachedRefreshToken"})(je||(je={}));var Jo;(function(t){t[t.NotStarted=0]="NotStarted",t[t.InProgress=1]="InProgress",t[t.Completed=2]="Completed"})(Jo||(Jo={}));/*! @azure/msal-common v8.0.0 2022-11-07 */var Iy=function(t){Mt(e,t);function e(r,n){return t.call(this,r,n)||this}return e.prototype.acquireToken=function(r){var n,o,i;return K(this,void 0,void 0,function(){var a,s,c,l,u,h=this;return G(this,function(d){switch(d.label){case 0:return a=(n=this.performanceClient)===null||n===void 0?void 0:n.startMeasurement(je.RefreshTokenClientAcquireToken,r.correlationId),this.logger.verbose("RefreshTokenClientAcquireToken called",r.correlationId),s=Jt.nowSeconds(),[4,this.executeTokenRequest(r,this.authority)];case 1:return c=d.sent(),a==null||a.addStaticFields({refreshTokenSize:((o=c.body.refresh_token)===null||o===void 0?void 0:o.length)||0}),l=(i=c.headers)===null||i===void 0?void 0:i[hr.X_MS_REQUEST_ID],u=new Bc(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin),u.validateTokenResponse(c.body),[2,u.handleServerTokenResponse(c.body,this.authority,s,r,void 0,void 0,!0,r.forceCache,l).then(function(f){return a==null||a.endMeasurement({success:!0}),f}).catch(function(f){throw h.logger.verbose("Error in fetching refresh token",r.correlationId),a==null||a.endMeasurement({errorCode:f.errorCode,subErrorCode:f.subError,success:!1}),f})]}})})},e.prototype.acquireTokenByRefreshToken=function(r){return K(this,void 0,void 0,function(){var n,o,i;return G(this,function(a){if(!r)throw Ee.createEmptyTokenRequestError();if(!r.account)throw D.createNoAccountInSilentRequestError();if(n=this.cacheManager.isAppMetadataFOCI(r.account.environment,this.config.authOptions.clientId),n)try{return[2,this.acquireTokenWithCachedRefreshToken(r,!0)]}catch(s){if(o=s instanceof lr&&s.errorCode===ta.noTokensFoundError.code,i=s instanceof vo&&s.errorCode===Ip.INVALID_GRANT_ERROR&&s.subError===Ip.CLIENT_MISMATCH_ERROR,o||i)return[2,this.acquireTokenWithCachedRefreshToken(r,!1)];throw s}return[2,this.acquireTokenWithCachedRefreshToken(r,!1)]})})},e.prototype.acquireTokenWithCachedRefreshToken=function(r,n){var o;return K(this,void 0,void 0,function(){var i,a,s;return G(this,function(c){if(i=(o=this.performanceClient)===null||o===void 0?void 0:o.startMeasurement(je.RefreshTokenClientAcquireTokenWithCachedRefreshToken,r.correlationId),this.logger.verbose("RefreshTokenClientAcquireTokenWithCachedRefreshToken called",r.correlationId),a=this.cacheManager.readRefreshTokenFromCache(this.config.authOptions.clientId,r.account,n),!a)throw i==null||i.discardMeasurement(),lr.createNoTokensFoundError();return i==null||i.endMeasurement({success:!0}),s=ve(ve({},r),{refreshToken:a.secret,authenticationScheme:r.authenticationScheme||le.BEARER,ccsCredential:{credential:r.account.homeAccountId,type:Dt.HOME_ACCOUNT_ID}}),[2,this.acquireToken(s)]})})},e.prototype.executeTokenRequest=function(r,n){var o;return K(this,void 0,void 0,function(){var i,a,s,c,l,u;return G(this,function(h){switch(h.label){case 0:return i=(o=this.performanceClient)===null||o===void 0?void 0:o.startMeasurement(je.RefreshTokenClientExecuteTokenRequest,r.correlationId),[4,this.createTokenRequestBody(r)];case 1:return a=h.sent(),s=this.createTokenQueryParameters(r),c=this.createTokenRequestHeaders(r.ccsCredential),l={clientId:this.config.authOptions.clientId,authority:n.canonicalAuthority,scopes:r.scopes,claims:r.claims,authenticationScheme:r.authenticationScheme,resourceRequestMethod:r.resourceRequestMethod,resourceRequestUri:r.resourceRequestUri,shrClaims:r.shrClaims,sshKid:r.sshKid},u=oe.appendQueryString(n.tokenEndpoint,s),[2,this.executePostToTokenEndpoint(u,a,c,l).then(function(d){return i==null||i.endMeasurement({success:!0}),d}).catch(function(d){throw i==null||i.endMeasurement({success:!1}),d})]}})})},e.prototype.createTokenQueryParameters=function(r){var n=new Qo;return r.tokenQueryParameters&&n.addExtraQueryParameters(r.tokenQueryParameters),n.createQueryString()},e.prototype.createTokenRequestBody=function(r){var n;return K(this,void 0,void 0,function(){var o,i,a,s,c,l,u;return G(this,function(h){switch(h.label){case 0:return o=r.correlationId,i=(n=this.performanceClient)===null||n===void 0?void 0:n.startMeasurement(je.BaseClientCreateTokenRequestHeaders,o),a=new Qo,a.addClientId(this.config.authOptions.clientId),a.addScopes(r.scopes),a.addGrantType(Lc.REFRESH_TOKEN_GRANT),a.addClientInfo(),a.addLibraryInfo(this.config.libraryInfo),a.addApplicationTelemetry(this.config.telemetry.application),a.addThrottling(),this.serverTelemetryManager&&a.addServerTelemetry(this.serverTelemetryManager),a.addCorrelationId(o),a.addRefreshToken(r.refreshToken),this.config.clientCredentials.clientSecret&&a.addClientSecret(this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion&&(s=this.config.clientCredentials.clientAssertion,a.addClientAssertion(s.assertion),a.addClientAssertionType(s.assertionType)),r.authenticationScheme!==le.POP?[3,2]:(c=new vi(this.cryptoUtils),[4,c.generateCnf(r)]);case 1:return l=h.sent(),a.addPopToken(l.reqCnfString),[3,3];case 2:if(r.authenticationScheme===le.SSH)if(r.sshJwk)a.addSshJwk(r.sshJwk);else throw i==null||i.endMeasurement({success:!1}),Ee.createMissingSshJwkError();h.label=3;case 3:if((!x.isEmptyObj(r.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&a.addClaims(r.claims,this.config.authOptions.clientCapabilities),this.config.systemOptions.preventCorsPreflight&&r.ccsCredential)switch(r.ccsCredential.type){case Dt.HOME_ACCOUNT_ID:try{u=Yo(r.ccsCredential.credential),a.addCcsOid(u)}catch(d){this.logger.verbose("Could not parse home account ID for CCS Header: "+d)}break;case Dt.UPN:a.addCcsUpn(r.ccsCredential.credential);break}return i==null||i.endMeasurement({success:!0}),[2,a.createQueryString()]}})})},e}(Bh);/*! @azure/msal-common v8.0.0 2022-11-07 */var BC=function(t){Mt(e,t);function e(r,n){return t.call(this,r,n)||this}return e.prototype.acquireToken=function(r){return K(this,void 0,void 0,function(){var n,o;return G(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.acquireCachedToken(r)];case 1:return[2,i.sent()];case 2:if(n=i.sent(),n instanceof D&&n.errorCode===A.tokenRefreshRequired.code)return o=new Iy(this.config,this.performanceClient),[2,o.acquireTokenByRefreshToken(r)];throw n;case 3:return[2]}})})},e.prototype.acquireCachedToken=function(r){var n,o,i,a;return K(this,void 0,void 0,function(){var s,c;return G(this,function(l){switch(l.label){case 0:if(!r)throw Ee.createEmptyTokenRequestError();if(r.forceRefresh)throw(n=this.serverTelemetryManager)===null||n===void 0||n.setCacheOutcome(Jn.FORCE_REFRESH),this.logger.info("SilentFlowClient:acquireCachedToken - Skipping cache because forceRefresh is true."),D.createRefreshRequiredError();if(!r.account)throw D.createNoAccountInSilentRequestError();if(s=r.authority||this.authority.getPreferredCache(),c=this.cacheManager.readCacheRecord(r.account,this.config.authOptions.clientId,r,s),c.accessToken){if(Jt.wasClockTurnedBack(c.accessToken.cachedAt)||Jt.isTokenExpired(c.accessToken.expiresOn,this.config.systemOptions.tokenRenewalOffsetSeconds))throw(i=this.serverTelemetryManager)===null||i===void 0||i.setCacheOutcome(Jn.CACHED_ACCESS_TOKEN_EXPIRED),this.logger.info("SilentFlowClient:acquireCachedToken - Cached access token is expired or will expire within "+this.config.systemOptions.tokenRenewalOffsetSeconds+" seconds."),D.createRefreshRequiredError();if(c.accessToken.refreshOn&&Jt.isTokenExpired(c.accessToken.refreshOn,0))throw(a=this.serverTelemetryManager)===null||a===void 0||a.setCacheOutcome(Jn.REFRESH_CACHED_ACCESS_TOKEN),this.logger.info("SilentFlowClient:acquireCachedToken - Cached access token's refreshOn property has been exceeded'."),D.createRefreshRequiredError()}else throw(o=this.serverTelemetryManager)===null||o===void 0||o.setCacheOutcome(Jn.NO_CACHED_ACCESS_TOKEN),this.logger.info("SilentFlowClient:acquireCachedToken - No access token found in cache for the given properties."),D.createRefreshRequiredError();return this.config.serverTelemetryManager&&this.config.serverTelemetryManager.incrementCacheHits(),[4,this.generateResultFromCacheRecord(c,r)];case 1:return[2,l.sent()]}})})},e.prototype.generateResultFromCacheRecord=function(r,n){return K(this,void 0,void 0,function(){var o,i;return G(this,function(a){switch(a.label){case 0:if(r.idToken&&(o=new kr(r.idToken.secret,this.config.cryptoInterface)),n.maxAge||n.maxAge===0){if(i=o==null?void 0:o.claims.auth_time,!i)throw D.createAuthTimeNotFoundError();kr.checkMaxAge(i,n.maxAge)}return[4,Bc.generateAuthenticationResult(this.cryptoUtils,this.authority,r,!0,n,o)];case 1:return[2,a.sent()]}})})},e}(Bh);/*! @azure/msal-common v8.0.0 2022-11-07 */function qC(t){return t.hasOwnProperty("authorization_endpoint")&&t.hasOwnProperty("token_endpoint")&&t.hasOwnProperty("issuer")&&t.hasOwnProperty("jwks_uri")}/*! @azure/msal-common v8.0.0 2022-11-07 */var ky={endpointMetadata:{"https://login.microsoftonline.com/common/":{token_endpoint:"https://login.microsoftonline.com/common/oauth2/v2.0/token",token_endpoint_auth_methods_supported:["client_secret_post","private_key_jwt","client_secret_basic"],jwks_uri:"https://login.microsoftonline.com/common/discovery/v2.0/keys",response_modes_supported:["query","fragment","form_post"],subject_types_supported:["pairwise"],id_token_signing_alg_values_supported:["RS256"],response_types_supported:["code","id_token","code id_token","id_token token"],scopes_supported:["openid","profile","email","offline_access"],issuer:"https://login.microsoftonline.com/{tenantid}/v2.0",request_uri_parameter_supported:!1,userinfo_endpoint:"https://graph.microsoft.com/oidc/userinfo",authorization_endpoint:"https://login.microsoftonline.com/common/oauth2/v2.0/authorize",device_authorization_endpoint:"https://login.microsoftonline.com/common/oauth2/v2.0/devicecode",http_logout_supported:!0,frontchannel_logout_supported:!0,end_session_endpoint:"https://login.microsoftonline.com/common/oauth2/v2.0/logout",claims_supported:["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],kerberos_endpoint:"https://login.microsoftonline.com/common/kerberos",tenant_region_scope:null,cloud_instance_name:"microsoftonline.com",cloud_graph_host_name:"graph.windows.net",msgraph_host:"graph.microsoft.com",rbac_url:"https://pas.windows.net"},"https://login.chinacloudapi.cn/common/":{token_endpoint:"https://login.chinacloudapi.cn/common/oauth2/v2.0/token",token_endpoint_auth_methods_supported:["client_secret_post","private_key_jwt","client_secret_basic"],jwks_uri:"https://login.chinacloudapi.cn/common/discovery/v2.0/keys",response_modes_supported:["query","fragment","form_post"],subject_types_supported:["pairwise"],id_token_signing_alg_values_supported:["RS256"],response_types_supported:["code","id_token","code id_token","id_token token"],scopes_supported:["openid","profile","email","offline_access"],issuer:"https://login.partner.microsoftonline.cn/{tenantid}/v2.0",request_uri_parameter_supported:!1,userinfo_endpoint:"https://microsoftgraph.chinacloudapi.cn/oidc/userinfo",authorization_endpoint:"https://login.chinacloudapi.cn/common/oauth2/v2.0/authorize",device_authorization_endpoint:"https://login.chinacloudapi.cn/common/oauth2/v2.0/devicecode",http_logout_supported:!0,frontchannel_logout_supported:!0,end_session_endpoint:"https://login.chinacloudapi.cn/common/oauth2/v2.0/logout",claims_supported:["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],kerberos_endpoint:"https://login.chinacloudapi.cn/common/kerberos",tenant_region_scope:null,cloud_instance_name:"partner.microsoftonline.cn",cloud_graph_host_name:"graph.chinacloudapi.cn",msgraph_host:"microsoftgraph.chinacloudapi.cn",rbac_url:"https://pas.chinacloudapi.cn"},"https://login.microsoftonline.us/common/":{token_endpoint:"https://login.microsoftonline.us/common/oauth2/v2.0/token",token_endpoint_auth_methods_supported:["client_secret_post","private_key_jwt","client_secret_basic"],jwks_uri:"https://login.microsoftonline.us/common/discovery/v2.0/keys",response_modes_supported:["query","fragment","form_post"],subject_types_supported:["pairwise"],id_token_signing_alg_values_supported:["RS256"],response_types_supported:["code","id_token","code id_token","id_token token"],scopes_supported:["openid","profile","email","offline_access"],issuer:"https://login.microsoftonline.us/{tenantid}/v2.0",request_uri_parameter_supported:!1,userinfo_endpoint:"https://graph.microsoft.com/oidc/userinfo",authorization_endpoint:"https://login.microsoftonline.us/common/oauth2/v2.0/authorize",device_authorization_endpoint:"https://login.microsoftonline.us/common/oauth2/v2.0/devicecode",http_logout_supported:!0,frontchannel_logout_supported:!0,end_session_endpoint:"https://login.microsoftonline.us/common/oauth2/v2.0/logout",claims_supported:["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],kerberos_endpoint:"https://login.microsoftonline.us/common/kerberos",tenant_region_scope:null,cloud_instance_name:"microsoftonline.us",cloud_graph_host_name:"graph.windows.net",msgraph_host:"graph.microsoft.com",rbac_url:"https://pasff.usgovcloudapi.net"},"https://login.microsoftonline.com/consumers/":{token_endpoint:"https://login.microsoftonline.com/consumers/oauth2/v2.0/token",token_endpoint_auth_methods_supported:["client_secret_post","private_key_jwt","client_secret_basic"],jwks_uri:"https://login.microsoftonline.com/consumers/discovery/v2.0/keys",response_modes_supported:["query","fragment","form_post"],subject_types_supported:["pairwise"],id_token_signing_alg_values_supported:["RS256"],response_types_supported:["code","id_token","code id_token","id_token token"],scopes_supported:["openid","profile","email","offline_access"],issuer:"https://login.microsoftonline.com/9188040d-6c67-4c5b-b112-36a304b66dad/v2.0",request_uri_parameter_supported:!1,userinfo_endpoint:"https://graph.microsoft.com/oidc/userinfo",authorization_endpoint:"https://login.microsoftonline.com/consumers/oauth2/v2.0/authorize",device_authorization_endpoint:"https://login.microsoftonline.com/consumers/oauth2/v2.0/devicecode",http_logout_supported:!0,frontchannel_logout_supported:!0,end_session_endpoint:"https://login.microsoftonline.com/consumers/oauth2/v2.0/logout",claims_supported:["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],kerberos_endpoint:"https://login.microsoftonline.com/consumers/kerberos",tenant_region_scope:null,cloud_instance_name:"microsoftonline.com",cloud_graph_host_name:"graph.windows.net",msgraph_host:"graph.microsoft.com",rbac_url:"https://pas.windows.net"},"https://login.chinacloudapi.cn/consumers/":{token_endpoint:"https://login.chinacloudapi.cn/consumers/oauth2/v2.0/token",token_endpoint_auth_methods_supported:["client_secret_post","private_key_jwt","client_secret_basic"],jwks_uri:"https://login.chinacloudapi.cn/consumers/discovery/v2.0/keys",response_modes_supported:["query","fragment","form_post"],subject_types_supported:["pairwise"],id_token_signing_alg_values_supported:["RS256"],response_types_supported:["code","id_token","code id_token","id_token token"],scopes_supported:["openid","profile","email","offline_access"],issuer:"https://login.partner.microsoftonline.cn/9188040d-6c67-4c5b-b112-36a304b66dad/v2.0",request_uri_parameter_supported:!1,userinfo_endpoint:"https://microsoftgraph.chinacloudapi.cn/oidc/userinfo",authorization_endpoint:"https://login.chinacloudapi.cn/consumers/oauth2/v2.0/authorize",device_authorization_endpoint:"https://login.chinacloudapi.cn/consumers/oauth2/v2.0/devicecode",http_logout_supported:!0,frontchannel_logout_supported:!0,end_session_endpoint:"https://login.chinacloudapi.cn/consumers/oauth2/v2.0/logout",claims_supported:["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],kerberos_endpoint:"https://login.chinacloudapi.cn/consumers/kerberos",tenant_region_scope:null,cloud_instance_name:"partner.microsoftonline.cn",cloud_graph_host_name:"graph.chinacloudapi.cn",msgraph_host:"microsoftgraph.chinacloudapi.cn",rbac_url:"https://pas.chinacloudapi.cn"},"https://login.microsoftonline.us/consumers/":{token_endpoint:"https://login.microsoftonline.us/consumers/oauth2/v2.0/token",token_endpoint_auth_methods_supported:["client_secret_post","private_key_jwt","client_secret_basic"],jwks_uri:"https://login.microsoftonline.us/consumers/discovery/v2.0/keys",response_modes_supported:["query","fragment","form_post"],subject_types_supported:["pairwise"],id_token_signing_alg_values_supported:["RS256"],response_types_supported:["code","id_token","code id_token","id_token token"],scopes_supported:["openid","profile","email","offline_access"],issuer:"https://login.microsoftonline.us/9188040d-6c67-4c5b-b112-36a304b66dad/v2.0",request_uri_parameter_supported:!1,userinfo_endpoint:"https://graph.microsoft.com/oidc/userinfo",authorization_endpoint:"https://login.microsoftonline.us/consumers/oauth2/v2.0/authorize",device_authorization_endpoint:"https://login.microsoftonline.us/consumers/oauth2/v2.0/devicecode",http_logout_supported:!0,frontchannel_logout_supported:!0,end_session_endpoint:"https://login.microsoftonline.us/consumers/oauth2/v2.0/logout",claims_supported:["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],kerberos_endpoint:"https://login.microsoftonline.us/consumers/kerberos",tenant_region_scope:null,cloud_instance_name:"microsoftonline.us",cloud_graph_host_name:"graph.windows.net",msgraph_host:"graph.microsoft.com",rbac_url:"https://pasff.usgovcloudapi.net"},"https://login.microsoftonline.com/organizations/":{token_endpoint:"https://login.microsoftonline.com/organizations/oauth2/v2.0/token",token_endpoint_auth_methods_supported:["client_secret_post","private_key_jwt","client_secret_basic"],jwks_uri:"https://login.microsoftonline.com/organizations/discovery/v2.0/keys",response_modes_supported:["query","fragment","form_post"],subject_types_supported:["pairwise"],id_token_signing_alg_values_supported:["RS256"],response_types_supported:["code","id_token","code id_token","id_token token"],scopes_supported:["openid","profile","email","offline_access"],issuer:"https://login.microsoftonline.com/{tenantid}/v2.0",request_uri_parameter_supported:!1,userinfo_endpoint:"https://graph.microsoft.com/oidc/userinfo",authorization_endpoint:"https://login.microsoftonline.com/organizations/oauth2/v2.0/authorize",device_authorization_endpoint:"https://login.microsoftonline.com/organizations/oauth2/v2.0/devicecode",http_logout_supported:!0,frontchannel_logout_supported:!0,end_session_endpoint:"https://login.microsoftonline.com/organizations/oauth2/v2.0/logout",claims_supported:["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],kerberos_endpoint:"https://login.microsoftonline.com/organizations/kerberos",tenant_region_scope:null,cloud_instance_name:"microsoftonline.com",cloud_graph_host_name:"graph.windows.net",msgraph_host:"graph.microsoft.com",rbac_url:"https://pas.windows.net"},"https://login.chinacloudapi.cn/organizations/":{token_endpoint:"https://login.chinacloudapi.cn/organizations/oauth2/v2.0/token",token_endpoint_auth_methods_supported:["client_secret_post","private_key_jwt","client_secret_basic"],jwks_uri:"https://login.chinacloudapi.cn/organizations/discovery/v2.0/keys",response_modes_supported:["query","fragment","form_post"],subject_types_supported:["pairwise"],id_token_signing_alg_values_supported:["RS256"],response_types_supported:["code","id_token","code id_token","id_token token"],scopes_supported:["openid","profile","email","offline_access"],issuer:"https://login.partner.microsoftonline.cn/{tenantid}/v2.0",request_uri_parameter_supported:!1,userinfo_endpoint:"https://microsoftgraph.chinacloudapi.cn/oidc/userinfo",authorization_endpoint:"https://login.chinacloudapi.cn/organizations/oauth2/v2.0/authorize",device_authorization_endpoint:"https://login.chinacloudapi.cn/organizations/oauth2/v2.0/devicecode",http_logout_supported:!0,frontchannel_logout_supported:!0,end_session_endpoint:"https://login.chinacloudapi.cn/organizations/oauth2/v2.0/logout",claims_supported:["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],kerberos_endpoint:"https://login.chinacloudapi.cn/organizations/kerberos",tenant_region_scope:null,cloud_instance_name:"partner.microsoftonline.cn",cloud_graph_host_name:"graph.chinacloudapi.cn",msgraph_host:"microsoftgraph.chinacloudapi.cn",rbac_url:"https://pas.chinacloudapi.cn"},"https://login.microsoftonline.us/organizations/":{token_endpoint:"https://login.microsoftonline.us/organizations/oauth2/v2.0/token",token_endpoint_auth_methods_supported:["client_secret_post","private_key_jwt","client_secret_basic"],jwks_uri:"https://login.microsoftonline.us/organizations/discovery/v2.0/keys",response_modes_supported:["query","fragment","form_post"],subject_types_supported:["pairwise"],id_token_signing_alg_values_supported:["RS256"],response_types_supported:["code","id_token","code id_token","id_token token"],scopes_supported:["openid","profile","email","offline_access"],issuer:"https://login.microsoftonline.us/{tenantid}/v2.0",request_uri_parameter_supported:!1,userinfo_endpoint:"https://graph.microsoft.com/oidc/userinfo",authorization_endpoint:"https://login.microsoftonline.us/organizations/oauth2/v2.0/authorize",device_authorization_endpoint:"https://login.microsoftonline.us/organizations/oauth2/v2.0/devicecode",http_logout_supported:!0,frontchannel_logout_supported:!0,end_session_endpoint:"https://login.microsoftonline.us/organizations/oauth2/v2.0/logout",claims_supported:["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],kerberos_endpoint:"https://login.microsoftonline.us/organizations/kerberos",tenant_region_scope:null,cloud_instance_name:"microsoftonline.us",cloud_graph_host_name:"graph.windows.net",msgraph_host:"graph.microsoft.com",rbac_url:"https://pasff.usgovcloudapi.net"}},instanceDiscoveryMetadata:{"https://login.microsoftonline.com/common/":{tenant_discovery_endpoint:"https://login.microsoftonline.com/common/v2.0/.well-known/openid-configuration","api-version":"1.1",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"]}]},"https://login.chinacloudapi.cn/common/":{tenant_discovery_endpoint:"https://login.chinacloudapi.cn/common/v2.0/.well-known/openid-configuration","api-version":"1.1",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"]}]},"https://login.microsoftonline.us/common/":{tenant_discovery_endpoint:"https://login.microsoftonline.us/common/v2.0/.well-known/openid-configuration","api-version":"1.1",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"]}]},"https://login.microsoftonline.com/consumers/":{tenant_discovery_endpoint:"https://login.microsoftonline.com/consumers/v2.0/.well-known/openid-configuration","api-version":"1.1",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"]}]},"https://login.chinacloudapi.cn/consumers/":{tenant_discovery_endpoint:"https://login.chinacloudapi.cn/consumers/v2.0/.well-known/openid-configuration","api-version":"1.1",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"]}]},"https://login.microsoftonline.us/consumers/":{tenant_discovery_endpoint:"https://login.microsoftonline.us/consumers/v2.0/.well-known/openid-configuration","api-version":"1.1",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"]}]},"https://login.microsoftonline.com/organizations/":{tenant_discovery_endpoint:"https://login.microsoftonline.com/organizations/v2.0/.well-known/openid-configuration","api-version":"1.1",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"]}]},"https://login.chinacloudapi.cn/organizations/":{tenant_discovery_endpoint:"https://login.chinacloudapi.cn/organizations/v2.0/.well-known/openid-configuration","api-version":"1.1",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"]}]},"https://login.microsoftonline.us/organizations/":{tenant_discovery_endpoint:"https://login.microsoftonline.us/organizations/v2.0/.well-known/openid-configuration","api-version":"1.1",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"]}]}}},Ap=ky.endpointMetadata,Rp=ky.instanceDiscoveryMetadata;/*! @azure/msal-common v8.0.0 2022-11-07 */var qc;(function(t){t.AAD="AAD",t.OIDC="OIDC"})(qc||(qc={}));/*! @azure/msal-common v8.0.0 2022-11-07 */var Id=function(){function t(){this.expiresAt=Jt.nowSeconds()+_a.REFRESH_TIME_SECONDS}return t.prototype.updateCloudDiscoveryMetadata=function(e,r){this.aliases=e.aliases,this.preferred_cache=e.preferred_cache,this.preferred_network=e.preferred_network,this.aliasesFromNetwork=r},t.prototype.updateEndpointMetadata=function(e,r){this.authorization_endpoint=e.authorization_endpoint,this.token_endpoint=e.token_endpoint,this.end_session_endpoint=e.end_session_endpoint,this.issuer=e.issuer,this.endpointsFromNetwork=r,this.jwks_uri=e.jwks_uri},t.prototype.updateCanonicalAuthority=function(e){this.canonical_authority=e},t.prototype.resetExpiresAt=function(){this.expiresAt=Jt.nowSeconds()+_a.REFRESH_TIME_SECONDS},t.prototype.isExpired=function(){return this.expiresAt<=Jt.nowSeconds()},t.isAuthorityMetadataEntity=function(e,r){return r?e.indexOf(_a.CACHE_KEY)===0&&r.hasOwnProperty("aliases")&&r.hasOwnProperty("preferred_cache")&&r.hasOwnProperty("preferred_network")&&r.hasOwnProperty("canonical_authority")&&r.hasOwnProperty("authorization_endpoint")&&r.hasOwnProperty("token_endpoint")&&r.hasOwnProperty("issuer")&&r.hasOwnProperty("aliasesFromNetwork")&&r.hasOwnProperty("endpointsFromNetwork")&&r.hasOwnProperty("expiresAt")&&r.hasOwnProperty("jwks_uri"):!1},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */function KC(t){return t.hasOwnProperty("tenant_discovery_endpoint")&&t.hasOwnProperty("metadata")}/*! @azure/msal-common v8.0.0 2022-11-07 */var GC=function(){function t(e){this.networkInterface=e}return t.prototype.detectRegion=function(e,r,n){return K(this,void 0,void 0,function(){var o,i,a,s,c;return G(this,function(l){switch(l.label){case 0:if(o=e,o)return[3,8];i=t.IMDS_OPTIONS,n&&(i.proxyUrl=n),l.label=1;case 1:return l.trys.push([1,6,,7]),[4,this.getRegionFromIMDS(_.IMDS_VERSION,i)];case 2:return a=l.sent(),a.status===Wo.httpSuccess&&(o=a.body,r.region_source=gn.IMDS),a.status!==Wo.httpBadRequest?[3,5]:[4,this.getCurrentVersion(i)];case 3:return s=l.sent(),s?[4,this.getRegionFromIMDS(s,i)]:(r.region_source=gn.FAILED_AUTO_DETECTION,[2,null]);case 4:c=l.sent(),c.status===Wo.httpSuccess&&(o=c.body,r.region_source=gn.IMDS),l.label=5;case 5:return[3,7];case 6:return l.sent(),r.region_source=gn.FAILED_AUTO_DETECTION,[2,null];case 7:return[3,9];case 8:r.region_source=gn.ENVIRONMENT_VARIABLE,l.label=9;case 9:return o||(r.region_source=gn.FAILED_AUTO_DETECTION),[2,o||null]}})})},t.prototype.getRegionFromIMDS=function(e,r){return K(this,void 0,void 0,function(){return G(this,function(n){return[2,this.networkInterface.sendGetRequestAsync(_.IMDS_ENDPOINT+"?api-version="+e+"&format=text",r,_.IMDS_TIMEOUT)]})})},t.prototype.getCurrentVersion=function(e){return K(this,void 0,void 0,function(){var r;return G(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.networkInterface.sendGetRequestAsync(_.IMDS_ENDPOINT+"?format=json",e)];case 1:return r=n.sent(),r.status===Wo.httpBadRequest&&r.body&&r.body["newest-versions"]&&r.body["newest-versions"].length>0?[2,r.body["newest-versions"][0]]:[2,null];case 2:return n.sent(),[2,null];case 3:return[2]}})})},t.IMDS_OPTIONS={headers:{Metadata:"true"}},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var Kc=function(){function t(e,r,n,o,i){this.canonicalAuthority=e,this._canonicalAuthority.validateAsUri(),this.networkInterface=r,this.cacheManager=n,this.authorityOptions=o,this.regionDiscovery=new GC(r),this.regionDiscoveryMetadata={region_used:void 0,region_source:void 0,region_outcome:void 0},this.proxyUrl=i||_.EMPTY_STRING}return Object.defineProperty(t.prototype,"authorityType",{get:function(){var e=this.canonicalAuthorityUrlComponents.PathSegments;if(e.length)switch(e[0].toLowerCase()){case _.ADFS:return Wt.Adfs;case _.DSTS:return Wt.Dsts}return Wt.Default},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"protocolMode",{get:function(){return this.authorityOptions.protocolMode},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"options",{get:function(){return this.authorityOptions},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canonicalAuthority",{get:function(){return this._canonicalAuthority.urlString},set:function(e){this._canonicalAuthority=new oe(e),this._canonicalAuthority.validateAsUri(),this._canonicalAuthorityUrlComponents=null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canonicalAuthorityUrlComponents",{get:function(){return this._canonicalAuthorityUrlComponents||(this._canonicalAuthorityUrlComponents=this._canonicalAuthority.getUrlComponents()),this._canonicalAuthorityUrlComponents},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hostnameAndPort",{get:function(){return this.canonicalAuthorityUrlComponents.HostNameAndPort.toLowerCase()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tenant",{get:function(){return this.canonicalAuthorityUrlComponents.PathSegments[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"authorizationEndpoint",{get:function(){if(this.discoveryComplete()){var e=this.replacePath(this.metadata.authorization_endpoint);return this.replaceTenant(e)}else throw D.createEndpointDiscoveryIncompleteError("Discovery incomplete.")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tokenEndpoint",{get:function(){if(this.discoveryComplete()){var e=this.replacePath(this.metadata.token_endpoint);return this.replaceTenant(e)}else throw D.createEndpointDiscoveryIncompleteError("Discovery incomplete.")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"deviceCodeEndpoint",{get:function(){if(this.discoveryComplete()){var e=this.replacePath(this.metadata.token_endpoint.replace("/token","/devicecode"));return this.replaceTenant(e)}else throw D.createEndpointDiscoveryIncompleteError("Discovery incomplete.")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"endSessionEndpoint",{get:function(){if(this.discoveryComplete()){if(!this.metadata.end_session_endpoint)throw D.createLogoutNotSupportedError();var e=this.replacePath(this.metadata.end_session_endpoint);return this.replaceTenant(e)}else throw D.createEndpointDiscoveryIncompleteError("Discovery incomplete.")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"selfSignedJwtAudience",{get:function(){if(this.discoveryComplete()){var e=this.replacePath(this.metadata.issuer);return this.replaceTenant(e)}else throw D.createEndpointDiscoveryIncompleteError("Discovery incomplete.")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"jwksUri",{get:function(){if(this.discoveryComplete()){var e=this.replacePath(this.metadata.jwks_uri);return this.replaceTenant(e)}else throw D.createEndpointDiscoveryIncompleteError("Discovery incomplete.")},enumerable:!1,configurable:!0}),t.prototype.replaceTenant=function(e){return e.replace(/{tenant}|{tenantid}/g,this.tenant)},t.prototype.replacePath=function(e){var r=e,n=new oe(this.metadata.canonical_authority),o=n.getUrlComponents().PathSegments,i=this.canonicalAuthorityUrlComponents.PathSegments;return i.forEach(function(a,s){var c=o[s];a!==c&&(r=r.replace("/"+c+"/","/"+a+"/"))}),r},Object.defineProperty(t.prototype,"defaultOpenIdConfigurationEndpoint",{get:function(){return this.authorityType===Wt.Adfs||this.authorityType===Wt.Dsts||this.protocolMode===qc.OIDC?this.canonicalAuthority+".well-known/openid-configuration":this.canonicalAuthority+"v2.0/.well-known/openid-configuration"},enumerable:!1,configurable:!0}),t.prototype.discoveryComplete=function(){return!!this.metadata},t.prototype.resolveEndpointsAsync=function(){return K(this,void 0,void 0,function(){var e,r,n,o;return G(this,function(i){switch(i.label){case 0:return e=this.cacheManager.getAuthorityMetadataByAlias(this.hostnameAndPort),e||(e=new Id,e.updateCanonicalAuthority(this.canonicalAuthority)),[4,this.updateCloudDiscoveryMetadata(e)];case 1:return r=i.sent(),this.canonicalAuthority=this.canonicalAuthority.replace(this.hostnameAndPort,e.preferred_network),[4,this.updateEndpointMetadata(e)];case 2:return n=i.sent(),r!==qt.CACHE&&n!==qt.CACHE&&(e.resetExpiresAt(),e.updateCanonicalAuthority(this.canonicalAuthority)),o=this.cacheManager.generateAuthorityMetadataCacheKey(e.preferred_cache),this.cacheManager.setAuthorityMetadata(o,e),this.metadata=e,[2]}})})},t.prototype.updateEndpointMetadata=function(e){var r,n;return K(this,void 0,void 0,function(){var o,i;return G(this,function(a){switch(a.label){case 0:return o=this.getEndpointMetadataFromConfig(),o?(e.updateEndpointMetadata(o,!1),[2,qt.CONFIG]):this.isAuthoritySameType(e)&&e.endpointsFromNetwork&&!e.isExpired()?[2,qt.CACHE]:(i=this.getEndpointMetadataFromHardcodedValues(),[4,this.getEndpointMetadataFromNetwork()]);case 1:return o=a.sent(),o?!((r=this.authorityOptions.azureRegionConfiguration)===null||r===void 0)&&r.azureRegion?[4,this.updateMetadataWithRegionalInformation(o)]:[3,3]:[3,4];case 2:o=a.sent(),a.label=3;case 3:return e.updateEndpointMetadata(o,!0),[2,qt.NETWORK];case 4:return i&&!this.authorityOptions.skipAuthorityMetadataCache?!((n=this.authorityOptions.azureRegionConfiguration)===null||n===void 0)&&n.azureRegion?[4,this.updateMetadataWithRegionalInformation(i)]:[3,6]:[3,7];case 5:i=a.sent(),a.label=6;case 6:return e.updateEndpointMetadata(i,!1),[2,qt.HARDCODED_VALUES];case 7:throw D.createUnableToGetOpenidConfigError(this.defaultOpenIdConfigurationEndpoint)}})})},t.prototype.isAuthoritySameType=function(e){var r=new oe(e.canonical_authority),n=r.getUrlComponents().PathSegments;return n.length===this.canonicalAuthorityUrlComponents.PathSegments.length},t.prototype.getEndpointMetadataFromConfig=function(){if(this.authorityOptions.authorityMetadata)try{return JSON.parse(this.authorityOptions.authorityMetadata)}catch{throw Ee.createInvalidAuthorityMetadataError()}return null},t.prototype.getEndpointMetadataFromNetwork=function(){return K(this,void 0,void 0,function(){var e,r;return G(this,function(n){switch(n.label){case 0:e={},this.proxyUrl&&(e.proxyUrl=this.proxyUrl),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.networkInterface.sendGetRequestAsync(this.defaultOpenIdConfigurationEndpoint,e)];case 2:return r=n.sent(),[2,qC(r.body)?r.body:null];case 3:return n.sent(),[2,null];case 4:return[2]}})})},t.prototype.getEndpointMetadataFromHardcodedValues=function(){return this.canonicalAuthority in Ap?Ap[this.canonicalAuthority]:null},t.prototype.updateMetadataWithRegionalInformation=function(e){var r,n,o,i,a;return K(this,void 0,void 0,function(){var s,c;return G(this,function(l){switch(l.label){case 0:return[4,this.regionDiscovery.detectRegion((r=this.authorityOptions.azureRegionConfiguration)===null||r===void 0?void 0:r.environmentRegion,this.regionDiscoveryMetadata,this.proxyUrl)];case 1:return s=l.sent(),c=((n=this.authorityOptions.azureRegionConfiguration)===null||n===void 0?void 0:n.azureRegion)===_.AZURE_REGION_AUTO_DISCOVER_FLAG?s:(o=this.authorityOptions.azureRegionConfiguration)===null||o===void 0?void 0:o.azureRegion,((i=this.authorityOptions.azureRegionConfiguration)===null||i===void 0?void 0:i.azureRegion)===_.AZURE_REGION_AUTO_DISCOVER_FLAG?this.regionDiscoveryMetadata.region_outcome=s?Gn.AUTO_DETECTION_REQUESTED_SUCCESSFUL:Gn.AUTO_DETECTION_REQUESTED_FAILED:s?this.regionDiscoveryMetadata.region_outcome=((a=this.authorityOptions.azureRegionConfiguration)===null||a===void 0?void 0:a.azureRegion)===s?Gn.CONFIGURED_MATCHES_DETECTED:Gn.CONFIGURED_NOT_DETECTED:this.regionDiscoveryMetadata.region_outcome=Gn.CONFIGURED_NO_AUTO_DETECTION,c?(this.regionDiscoveryMetadata.region_used=c,[2,t.replaceWithRegionalInformation(e,c)]):[2,e]}})})},t.prototype.updateCloudDiscoveryMetadata=function(e){return K(this,void 0,void 0,function(){var r,n;return G(this,function(o){switch(o.label){case 0:return r=this.getCloudDiscoveryMetadataFromConfig(),r?(e.updateCloudDiscoveryMetadata(r,!1),[2,qt.CONFIG]):this.isAuthoritySameType(e)&&e.aliasesFromNetwork&&!e.isExpired()?[2,qt.CACHE]:(n=this.getCloudDiscoveryMetadataFromHarcodedValues(),[4,this.getCloudDiscoveryMetadataFromNetwork()]);case 1:if(r=o.sent(),r)return e.updateCloudDiscoveryMetadata(r,!0),[2,qt.NETWORK];if(n&&!this.options.skipAuthorityMetadataCache)return e.updateCloudDiscoveryMetadata(n,!1),[2,qt.HARDCODED_VALUES];throw Ee.createUntrustedAuthorityError()}})})},t.prototype.getCloudDiscoveryMetadataFromConfig=function(){if(this.authorityOptions.cloudDiscoveryMetadata)try{var e=JSON.parse(this.authorityOptions.cloudDiscoveryMetadata),r=t.getCloudDiscoveryMetadataFromNetworkResponse(e.metadata,this.hostnameAndPort);if(r)return r}catch{throw Ee.createInvalidCloudDiscoveryMetadataError()}return this.isInKnownAuthorities()?t.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort):null},t.prototype.getCloudDiscoveryMetadataFromNetwork=function(){return K(this,void 0,void 0,function(){var e,r,n,o,i;return G(this,function(a){switch(a.label){case 0:e=""+_.AAD_INSTANCE_DISCOVERY_ENDPT+this.canonicalAuthority+"oauth2/v2.0/authorize",r={},this.proxyUrl&&(r.proxyUrl=this.proxyUrl),n=null,a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.networkInterface.sendGetRequestAsync(e,r)];case 2:return o=a.sent(),i=KC(o.body)?o.body.metadata:[],i.length===0?[2,null]:(n=t.getCloudDiscoveryMetadataFromNetworkResponse(i,this.hostnameAndPort),[3,4]);case 3:return a.sent(),[2,null];case 4:return n||(n=t.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)),[2,n]}})})},t.prototype.getCloudDiscoveryMetadataFromHarcodedValues=function(){return this.canonicalAuthority in Rp?Rp[this.canonicalAuthority]:null},t.prototype.isInKnownAuthorities=function(){var e=this,r=this.authorityOptions.knownAuthorities.filter(function(n){return oe.getDomainFromUrl(n).toLowerCase()===e.hostnameAndPort});return r.length>0},t.generateAuthority=function(e,r){var n;if(r&&r.azureCloudInstance!==$a.None){var o=r.tenant?r.tenant:_.DEFAULT_COMMON_TENANT;n=r.azureCloudInstance+"/"+o+"/"}return n||e},t.createCloudDiscoveryMetadataFromHost=function(e){return{preferred_network:e,preferred_cache:e,aliases:[e]}},t.getCloudDiscoveryMetadataFromNetworkResponse=function(e,r){for(var n=0;n<e.length;n++){var o=e[n];if(o.aliases.indexOf(r)>-1)return o}return null},t.prototype.getPreferredCache=function(){if(this.discoveryComplete())return this.metadata.preferred_cache;throw D.createEndpointDiscoveryIncompleteError("Discovery incomplete.")},t.prototype.isAlias=function(e){return this.metadata.aliases.indexOf(e)>-1},t.isPublicCloudAuthority=function(e){return _.KNOWN_PUBLIC_CLOUDS.indexOf(e)>=0},t.buildRegionalAuthorityString=function(e,r,n){var o=new oe(e);o.validateAsUri();var i=o.getUrlComponents(),a=r+"."+i.HostNameAndPort;this.isPublicCloudAuthority(i.HostNameAndPort)&&(a=r+"."+_.REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX);var s=oe.constructAuthorityUriFromObject(ve(ve({},o.getUrlComponents()),{HostNameAndPort:a})).urlString;return n?s+"?"+n:s},t.replaceWithRegionalInformation=function(e,r){return e.authorization_endpoint=t.buildRegionalAuthorityString(e.authorization_endpoint,r),e.token_endpoint=t.buildRegionalAuthorityString(e.token_endpoint,r,_.REGIONAL_AUTH_NON_MSI_QUERY_STRING),e.end_session_endpoint&&(e.end_session_endpoint=t.buildRegionalAuthorityString(e.end_session_endpoint,r)),e},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var Gc=function(){function t(){}return t.createDiscoveredInstance=function(e,r,n,o,i){return K(this,void 0,void 0,function(){var a,s;return G(this,function(c){switch(c.label){case 0:a=t.createInstance(e,r,n,o,i),c.label=1;case 1:return c.trys.push([1,3,,4]),[4,a.resolveEndpointsAsync()];case 2:return c.sent(),[2,a];case 3:throw s=c.sent(),D.createEndpointDiscoveryIncompleteError(s);case 4:return[2]}})})},t.createInstance=function(e,r,n,o,i){if(x.isEmpty(e))throw Ee.createUrlEmptyError();return new Kc(e,r,n,o,i)},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var Vc=function(){function t(){this.failedRequests=[],this.errors=[],this.cacheHits=0}return t.isServerTelemetryEntity=function(e,r){var n=e.indexOf(Ye.CACHE_KEY)===0,o=!0;return r&&(o=r.hasOwnProperty("failedRequests")&&r.hasOwnProperty("errors")&&r.hasOwnProperty("cacheHits")),n&&o},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var Pp=function(){function t(){}return t.isThrottlingEntity=function(e,r){var n=!1;e&&(n=e.indexOf(wa.THROTTLING_PREFIX)===0);var o=!0;return r&&(o=r.hasOwnProperty("throttleTime")),n&&o},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var VC={sendGetRequestAsync:function(){var t="Network interface - sendGetRequestAsync() has not been implemented for the Network interface.";return Promise.reject(z.createUnexpectedError(t))},sendPostRequestAsync:function(){var t="Network interface - sendPostRequestAsync() has not been implemented for the Network interface.";return Promise.reject(z.createUnexpectedError(t))}};/*! @azure/msal-common v8.0.0 2022-11-07 */var Rs={missingKidError:{code:"missing_kid_error",desc:"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."},missingAlgError:{code:"missing_alg_error",desc:"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."}},Np=function(t){Mt(e,t);function e(r,n){var o=t.call(this,r,n)||this;return o.name="JoseHeaderError",Object.setPrototypeOf(o,e.prototype),o}return e.createMissingKidError=function(){return new e(Rs.missingKidError.code,Rs.missingKidError.desc)},e.createMissingAlgError=function(){return new e(Rs.missingAlgError.code,Rs.missingAlgError.desc)},e}(z);/*! @azure/msal-common v8.0.0 2022-11-07 */var WC=function(){function t(e){this.typ=e.typ,this.alg=e.alg,this.kid=e.kid}return t.getShrHeaderString=function(e){if(!e.kid)throw Np.createMissingKidError();if(!e.alg)throw Np.createMissingAlgError();var r=new t({typ:e.typ||Sd.Jwt,kid:e.kid,alg:e.alg});return JSON.stringify(r)},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var YC=function(){function t(e,r){this.cacheOutcome=Jn.NO_CACHE_HIT,this.cacheManager=r,this.apiId=e.apiId,this.correlationId=e.correlationId,this.wrapperSKU=e.wrapperSKU||_.EMPTY_STRING,this.wrapperVer=e.wrapperVer||_.EMPTY_STRING,this.telemetryCacheKey=Ye.CACHE_KEY+Ft.CACHE_KEY_SEPARATOR+e.clientId}return t.prototype.generateCurrentRequestHeaderValue=function(){var e=""+this.apiId+Ye.VALUE_SEPARATOR+this.cacheOutcome,r=[this.wrapperSKU,this.wrapperVer].join(Ye.VALUE_SEPARATOR),n=this.getRegionDiscoveryFields(),o=[e,n].join(Ye.VALUE_SEPARATOR);return[Ye.SCHEMA_VERSION,o,r].join(Ye.CATEGORY_SEPARATOR)},t.prototype.generateLastRequestHeaderValue=function(){var e=this.getLastRequests(),r=t.maxErrorsToSend(e),n=e.failedRequests.slice(0,2*r).join(Ye.VALUE_SEPARATOR),o=e.errors.slice(0,r).join(Ye.VALUE_SEPARATOR),i=e.errors.length,a=r<i?Ye.OVERFLOW_TRUE:Ye.OVERFLOW_FALSE,s=[i,a].join(Ye.VALUE_SEPARATOR);return[Ye.SCHEMA_VERSION,e.cacheHits,n,o,s].join(Ye.CATEGORY_SEPARATOR)},t.prototype.cacheFailedRequest=function(e){var r=this.getLastRequests();r.errors.length>=Ye.MAX_CACHED_ERRORS&&(r.failedRequests.shift(),r.failedRequests.shift(),r.errors.shift()),r.failedRequests.push(this.apiId,this.correlationId),x.isEmpty(e.subError)?x.isEmpty(e.errorCode)?!!e&&e.toString()?r.errors.push(e.toString()):r.errors.push(Ye.UNKNOWN_ERROR):r.errors.push(e.errorCode):r.errors.push(e.subError),this.cacheManager.setServerTelemetry(this.telemetryCacheKey,r)},t.prototype.incrementCacheHits=function(){var e=this.getLastRequests();return e.cacheHits+=1,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,e),e.cacheHits},t.prototype.getLastRequests=function(){var e=new Vc,r=this.cacheManager.getServerTelemetry(this.telemetryCacheKey);return r||e},t.prototype.clearTelemetryCache=function(){var e=this.getLastRequests(),r=t.maxErrorsToSend(e),n=e.errors.length;if(r===n)this.cacheManager.removeItem(this.telemetryCacheKey);else{var o=new Vc;o.failedRequests=e.failedRequests.slice(r*2),o.errors=e.errors.slice(r),this.cacheManager.setServerTelemetry(this.telemetryCacheKey,o)}},t.maxErrorsToSend=function(e){var r,n=0,o=0,i=e.errors.length;for(r=0;r<i;r++){var a=e.failedRequests[2*r]||_.EMPTY_STRING,s=e.failedRequests[2*r+1]||_.EMPTY_STRING,c=e.errors[r]||_.EMPTY_STRING;if(o+=a.toString().length+s.toString().length+c.length+3,o<Ye.MAX_LAST_HEADER_BYTES)n+=1;else break}return n},t.prototype.getRegionDiscoveryFields=function(){var e=[];return e.push(this.regionUsed||_.EMPTY_STRING),e.push(this.regionSource||_.EMPTY_STRING),e.push(this.regionOutcome||_.EMPTY_STRING),e.join(",")},t.prototype.updateRegionDiscoveryMetadata=function(e){this.regionUsed=e.region_used,this.regionSource=e.region_source,this.regionOutcome=e.region_outcome},t.prototype.setCacheOutcome=function(e){this.cacheOutcome=e},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var Ay=function(){function t(e,r,n,o,i,a){this.authority=r,this.libraryName=o,this.libraryVersion=i,this.applicationTelemetry=a,this.clientId=e,this.logger=n,this.callbacks=new Map,this.eventsByCorrelationId=new Map,this.staticFieldsByCorrelationId=new Map,this.measurementsById=new Map}return t.prototype.startMeasurement=function(e,r){var n=this,o,i,a=r||this.generateId();r||this.logger.info("PerformanceClient: No correlation id provided for "+e+", generating",a),this.logger.trace("PerformanceClient: Performance measurement started for "+e,a);var s=this.startPerformanceMeasuremeant(e,a);s.startMeasurement();var c={eventId:this.generateId(),status:Jo.InProgress,authority:this.authority,libraryName:this.libraryName,libraryVersion:this.libraryVersion,clientId:this.clientId,name:e,startTimeMs:Date.now(),correlationId:a};this.cacheEventByCorrelationId(c);var l={appName:(o=this.applicationTelemetry)===null||o===void 0?void 0:o.appName,appVersion:(i=this.applicationTelemetry)===null||i===void 0?void 0:i.appVersion};return this.addStaticFields(l,a),this.cacheMeasurement(c,s),{endMeasurement:function(u){var h=n.endMeasurement(ve(ve({},c),u));return h&&n.cacheEventByCorrelationId(h),h},flushMeasurement:function(){return n.flushMeasurements(c.name,c.correlationId)},discardMeasurement:function(){return n.discardMeasurements(c.correlationId)},addStaticFields:function(u){return n.addStaticFields(u,c.correlationId)},measurement:s,event:c}},t.prototype.endMeasurement=function(e){var r=this.measurementsById.get(e.eventId);if(r){this.measurementsById.delete(e.eventId),r.endMeasurement();var n=r.flushMeasurement();if(n!==null){this.logger.trace("PerformanceClient: Performance measurement ended for "+e.name+": "+n+" ms",e.correlationId);var o=ve(ve({durationMs:Math.round(n)},e),{status:Jo.Completed});return o}else this.logger.trace("PerformanceClient: Performance measurement not taken",e.correlationId)}else this.logger.trace("PerformanceClient: Measurement not found for "+e.eventId,e.correlationId);return null},t.prototype.addStaticFields=function(e,r){var n=this.staticFieldsByCorrelationId.get(r);n?(this.logger.trace("PerformanceClient: Updating static fields"),this.staticFieldsByCorrelationId.set(r,ve(ve({},n),e))):(this.logger.trace("PerformanceClient: Adding static fields"),this.staticFieldsByCorrelationId.set(r,e))},t.prototype.cacheEventByCorrelationId=function(e){var r=this.eventsByCorrelationId.get(e.correlationId);r?(this.logger.trace("PerformanceClient: Performance measurement for "+e.name+" added/updated",e.correlationId),r.set(e.eventId,e)):(this.logger.trace("PerformanceClient: Performance measurement for "+e.name+" started",e.correlationId),this.eventsByCorrelationId.set(e.correlationId,new Map().set(e.eventId,e)))},t.prototype.cacheMeasurement=function(e,r){this.measurementsById.set(e.eventId,r)},t.prototype.flushMeasurements=function(e,r){var n=this;this.logger.trace("PerformanceClient: Performance measurements flushed for "+e,r);var o=this.eventsByCorrelationId.get(r);if(o){this.discardMeasurements(r);var i=[];o.forEach(function(d){if(d.name!==e&&d.status!==Jo.Completed){n.logger.trace("PerformanceClient: Incomplete submeasurement "+d.name+" found for "+e,r);var f=n.endMeasurement(d);f&&i.push(f)}i.push(d)});var a=i.sort(function(d,f){return d.startTimeMs-f.startTimeMs}),s=a.filter(function(d){return d.name===e&&d.status===Jo.Completed});if(s.length>0){s.length>1&&this.logger.verbose("PerformanceClient: Multiple distinct top-level performance events found, using the first",r);var c=s[0];this.logger.verbose("PerformanceClient: Measurement found for "+e,r);var l=a.reduce(function(d,f){if(f.name!==e){n.logger.trace("PerformanceClient: Complete submeasurement found for "+f.name,r);var m=f.name+"DurationMs";d[m]?n.logger.verbose("PerformanceClient: Submeasurement for "+e+" already exists for "+f.name+", ignoring",r):d[m]=f.durationMs}return d},c),u=this.staticFieldsByCorrelationId.get(r),h=ve(ve({},l),u);this.emitEvents([h],l.correlationId)}else this.logger.verbose("PerformanceClient: No completed top-level measurements found for "+e,r)}else this.logger.verbose("PerformanceClient: No measurements found",r)},t.prototype.discardMeasurements=function(e){this.logger.trace("PerformanceClient: Performance measurements discarded",e),this.eventsByCorrelationId.delete(e)},t.prototype.addPerformanceCallback=function(e){var r=this.generateId();return this.callbacks.set(r,e),this.logger.verbose("PerformanceClient: Performance callback registered with id: "+r),r},t.prototype.removePerformanceCallback=function(e){var r=this.callbacks.delete(e);return r?this.logger.verbose("PerformanceClient: Performance callback "+e+" removed."):this.logger.verbose("PerformanceClient: Performance callback "+e+" not removed."),r},t.prototype.emitEvents=function(e,r){var n=this;this.logger.verbose("PerformanceClient: Emitting performance events",r),this.callbacks.forEach(function(o,i){n.logger.trace("PerformanceClient: Emitting event to callback "+i,r),o.apply(null,[e])})},t}();/*! @azure/msal-common v8.0.0 2022-11-07 */var QC=function(){function t(){}return t.prototype.startMeasurement=function(){},t.prototype.endMeasurement=function(){},t.prototype.flushMeasurement=function(){return null},t}(),JC=function(t){Mt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.generateId=function(){return"callback-id"},e.prototype.startPerformanceMeasuremeant=function(){return new QC},e}(Ay);/*! @azure/msal-browser v2.31.0 2022-11-07 */var I={pkceNotGenerated:{code:"pkce_not_created",desc:"The PKCE code challenge and verifier could not be generated."},cryptoDoesNotExist:{code:"crypto_nonexistent",desc:"The crypto object or function is not available."},httpMethodNotImplementedError:{code:"http_method_not_implemented",desc:"The HTTP method given has not been implemented in this library."},emptyNavigateUriError:{code:"empty_navigate_uri",desc:"Navigation URI is empty. Please check stack trace for more info."},hashEmptyError:{code:"hash_empty_error",desc:"Hash value cannot be processed because it is empty. Please verify that your redirectUri is not clearing the hash. For more visit: aka.ms/msaljs/browser-errors."},hashDoesNotContainStateError:{code:"no_state_in_hash",desc:"Hash does not contain state. Please verify that the request originated from msal."},hashDoesNotContainKnownPropertiesError:{code:"hash_does_not_contain_known_properties",desc:"Hash does not contain known properites. Please verify that your redirectUri is not changing the hash. For more visit: aka.ms/msaljs/browser-errors."},unableToParseStateError:{code:"unable_to_parse_state",desc:"Unable to parse state. Please verify that the request originated from msal."},stateInteractionTypeMismatchError:{code:"state_interaction_type_mismatch",desc:"Hash contains state but the interaction type does not match the caller."},interactionInProgress:{code:"interaction_in_progress",desc:"Interaction is currently in progress. Please ensure that this interaction has been completed before calling an interactive API. For more visit: aka.ms/msaljs/browser-errors."},popupWindowError:{code:"popup_window_error",desc:"Error opening popup window. This can happen if you are using IE or if popups are blocked in the browser."},emptyWindowError:{code:"empty_window_error",desc:"window.open returned null or undefined window object."},userCancelledError:{code:"user_cancelled",desc:"User cancelled the flow."},monitorPopupTimeoutError:{code:"monitor_window_timeout",desc:"Token acquisition in popup failed due to timeout. For more visit: aka.ms/msaljs/browser-errors."},monitorIframeTimeoutError:{code:"monitor_window_timeout",desc:"Token acquisition in iframe failed due to timeout. For more visit: aka.ms/msaljs/browser-errors."},redirectInIframeError:{code:"redirect_in_iframe",desc:"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."},blockTokenRequestsInHiddenIframeError:{code:"block_iframe_reload",desc:"Request was blocked inside an iframe because MSAL detected an authentication response. For more visit: aka.ms/msaljs/browser-errors"},blockAcquireTokenInPopupsError:{code:"block_nested_popups",desc:"Request was blocked inside a popup because MSAL detected it was running in a popup."},iframeClosedPrematurelyError:{code:"iframe_closed_prematurely",desc:"The iframe being monitored was closed prematurely."},silentLogoutUnsupportedError:{code:"silent_logout_unsupported",desc:"Silent logout not supported. Please call logoutRedirect or logoutPopup instead."},noAccountError:{code:"no_account_error",desc:"No account object provided to acquireTokenSilent and no active account has been set. Please call setActiveAccount or provide an account on the request."},silentPromptValueError:{code:"silent_prompt_value_error",desc:"The value given for the prompt value is not valid for silent requests - must be set to 'none' or 'no_session'."},noTokenRequestCacheError:{code:"no_token_request_cache_error",desc:"No token request found in cache."},unableToParseTokenRequestCacheError:{code:"unable_to_parse_token_request_cache_error",desc:"The cached token request could not be parsed."},noCachedAuthorityError:{code:"no_cached_authority_error",desc:"No cached authority found."},authRequestNotSet:{code:"auth_request_not_set_error",desc:"Auth Request not set. Please ensure initiateAuthRequest was called from the InteractionHandler"},invalidCacheType:{code:"invalid_cache_type",desc:"Invalid cache type"},notInBrowserEnvironment:{code:"non_browser_environment",desc:"Login and token requests are not supported in non-browser environments."},databaseNotOpen:{code:"database_not_open",desc:"Database is not open!"},noNetworkConnectivity:{code:"no_network_connectivity",desc:"No network connectivity. Check your internet connection."},postRequestFailed:{code:"post_request_failed",desc:"Network request failed: If the browser threw a CORS error, check that the redirectUri is registered in the Azure App Portal as type 'SPA'"},getRequestFailed:{code:"get_request_failed",desc:"Network request failed. Please check the network trace to determine root cause."},failedToParseNetworkResponse:{code:"failed_to_parse_response",desc:"Failed to parse network response. Check network trace."},unableToLoadTokenError:{code:"unable_to_load_token",desc:"Error loading token to cache."},signingKeyNotFoundInStorage:{code:"crypto_key_not_found",desc:"Cryptographic Key or Keypair not found in browser storage."},authCodeRequired:{code:"auth_code_required",desc:"An authorization code must be provided (as the `code` property on the request) to this flow."},authCodeOrNativeAccountRequired:{code:"auth_code_or_nativeAccountId_required",desc:"An authorization code or nativeAccountId must be provided to this flow."},databaseUnavailable:{code:"database_unavailable",desc:"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."},unableToAcquireTokenFromNativePlatform:{code:"unable_to_acquire_token_from_native_platform",desc:"Unable to acquire token from native platform. For a list of possible reasons visit aka.ms/msaljs/browser-errors."},nativeHandshakeTimeout:{code:"native_handshake_timeout",desc:"Timed out while attempting to establish connection to browser extension"},nativeExtensionNotInstalled:{code:"native_extension_not_installed",desc:"Native extension is not installed. If you think this is a mistake call the initialize function."},nativeConnectionNotEstablished:{code:"native_connection_not_established",desc:"Connection to native platform has not been established. Please install a compatible browser extension and run initialize(). For more please visit aka.ms/msaljs/browser-errors."},nativeBrokerCalledBeforeInitialize:{code:"native_broker_called_before_initialize",desc:"You must call and await the initialize function before attempting to call any other MSAL API when native brokering is enabled. For more please visit aka.ms/msaljs/browser-errors."},nativePromptNotSupported:{code:"native_prompt_not_supported",desc:"The provided prompt is not supported by the native platform. This request should be routed to the web based flow."}},N=function(t){ot(e,t);function e(r,n){var o=t.call(this,r,n)||this;return Object.setPrototypeOf(o,e.prototype),o.name="BrowserAuthError",o}return e.createPkceNotGeneratedError=function(r){return new e(I.pkceNotGenerated.code,I.pkceNotGenerated.desc+" Detail:"+r)},e.createCryptoNotAvailableError=function(r){return new e(I.cryptoDoesNotExist.code,I.cryptoDoesNotExist.desc+" Detail:"+r)},e.createHttpMethodNotImplementedError=function(r){return new e(I.httpMethodNotImplementedError.code,I.httpMethodNotImplementedError.desc+" Given Method: "+r)},e.createEmptyNavigationUriError=function(){return new e(I.emptyNavigateUriError.code,I.emptyNavigateUriError.desc)},e.createEmptyHashError=function(r){return new e(I.hashEmptyError.code,I.hashEmptyError.desc+" Given Url: "+r)},e.createHashDoesNotContainStateError=function(){return new e(I.hashDoesNotContainStateError.code,I.hashDoesNotContainStateError.desc)},e.createHashDoesNotContainKnownPropertiesError=function(){return new e(I.hashDoesNotContainKnownPropertiesError.code,I.hashDoesNotContainKnownPropertiesError.desc)},e.createUnableToParseStateError=function(){return new e(I.unableToParseStateError.code,I.unableToParseStateError.desc)},e.createStateInteractionTypeMismatchError=function(){return new e(I.stateInteractionTypeMismatchError.code,I.stateInteractionTypeMismatchError.desc)},e.createInteractionInProgressError=function(){return new e(I.interactionInProgress.code,I.interactionInProgress.desc)},e.createPopupWindowError=function(r){var n=I.popupWindowError.desc;return n=x.isEmpty(r)?n:n+" Details: "+r,new e(I.popupWindowError.code,n)},e.createEmptyWindowCreatedError=function(){return new e(I.emptyWindowError.code,I.emptyWindowError.desc)},e.createUserCancelledError=function(){return new e(I.userCancelledError.code,I.userCancelledError.desc)},e.createMonitorPopupTimeoutError=function(){return new e(I.monitorPopupTimeoutError.code,I.monitorPopupTimeoutError.desc)},e.createMonitorIframeTimeoutError=function(){return new e(I.monitorIframeTimeoutError.code,I.monitorIframeTimeoutError.desc)},e.createRedirectInIframeError=function(r){return new e(I.redirectInIframeError.code,I.redirectInIframeError.desc+" (window.parent !== window) => "+r)},e.createBlockReloadInHiddenIframeError=function(){return new e(I.blockTokenRequestsInHiddenIframeError.code,I.blockTokenRequestsInHiddenIframeError.desc)},e.createBlockAcquireTokenInPopupsError=function(){return new e(I.blockAcquireTokenInPopupsError.code,I.blockAcquireTokenInPopupsError.desc)},e.createIframeClosedPrematurelyError=function(){return new e(I.iframeClosedPrematurelyError.code,I.iframeClosedPrematurelyError.desc)},e.createSilentLogoutUnsupportedError=function(){return new e(I.silentLogoutUnsupportedError.code,I.silentLogoutUnsupportedError.desc)},e.createNoAccountError=function(){return new e(I.noAccountError.code,I.noAccountError.desc)},e.createSilentPromptValueError=function(r){return new e(I.silentPromptValueError.code,I.silentPromptValueError.desc+" Given value: "+r)},e.createUnableToParseTokenRequestCacheError=function(){return new e(I.unableToParseTokenRequestCacheError.code,I.unableToParseTokenRequestCacheError.desc)},e.createNoTokenRequestCacheError=function(){return new e(I.noTokenRequestCacheError.code,I.noTokenRequestCacheError.desc)},e.createAuthRequestNotSetError=function(){return new e(I.authRequestNotSet.code,I.authRequestNotSet.desc)},e.createNoCachedAuthorityError=function(){return new e(I.noCachedAuthorityError.code,I.noCachedAuthorityError.desc)},e.createInvalidCacheTypeError=function(){return new e(I.invalidCacheType.code,""+I.invalidCacheType.desc)},e.createNonBrowserEnvironmentError=function(){return new e(I.notInBrowserEnvironment.code,I.notInBrowserEnvironment.desc)},e.createDatabaseNotOpenError=function(){return new e(I.databaseNotOpen.code,I.databaseNotOpen.desc)},e.createNoNetworkConnectivityError=function(){return new e(I.noNetworkConnectivity.code,I.noNetworkConnectivity.desc)},e.createPostRequestFailedError=function(r,n){return new e(I.postRequestFailed.code,I.postRequestFailed.desc+" | Network client threw: "+r+" | Attempted to reach: "+n.split("?")[0])},e.createGetRequestFailedError=function(r,n){return new e(I.getRequestFailed.code,I.getRequestFailed.desc+" | Network client threw: "+r+" | Attempted to reach: "+n.split("?")[0])},e.createFailedToParseNetworkResponseError=function(r){return new e(I.failedToParseNetworkResponse.code,I.failedToParseNetworkResponse.desc+" | Attempted to reach: "+r.split("?")[0])},e.createUnableToLoadTokenError=function(r){return new e(I.unableToLoadTokenError.code,I.unableToLoadTokenError.desc+" | "+r)},e.createSigningKeyNotFoundInStorageError=function(r){return new e(I.signingKeyNotFoundInStorage.code,I.signingKeyNotFoundInStorage.desc+" | No match found for KeyId: "+r)},e.createAuthCodeRequiredError=function(){return new e(I.authCodeRequired.code,I.authCodeRequired.desc)},e.createAuthCodeOrNativeAccountIdRequiredError=function(){return new e(I.authCodeOrNativeAccountRequired.code,I.authCodeOrNativeAccountRequired.desc)},e.createDatabaseUnavailableError=function(){return new e(I.databaseUnavailable.code,I.databaseUnavailable.desc)},e.createUnableToAcquireTokenFromNativePlatformError=function(){return new e(I.unableToAcquireTokenFromNativePlatform.code,I.unableToAcquireTokenFromNativePlatform.desc)},e.createNativeHandshakeTimeoutError=function(){return new e(I.nativeHandshakeTimeout.code,I.nativeHandshakeTimeout.desc)},e.createNativeExtensionNotInstalledError=function(){return new e(I.nativeExtensionNotInstalled.code,I.nativeExtensionNotInstalled.desc)},e.createNativeConnectionNotEstablishedError=function(){return new e(I.nativeConnectionNotEstablished.code,I.nativeConnectionNotEstablished.desc)},e.createNativeBrokerCalledBeforeInitialize=function(){return new e(I.nativeBrokerCalledBeforeInitialize.code,I.nativeBrokerCalledBeforeInitialize.desc)},e.createNativePromptParameterNotSupportedError=function(){return new e(I.nativePromptNotSupported.code,I.nativePromptNotSupported.desc)},e}(z);/*! @azure/msal-browser v2.31.0 2022-11-07 */var cr={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"},ra={CHANNEL_ID:"53ee284d-920a-4b59-9d30-a60315b26836",PREFERRED_EXTENSION_ID:"ppnbnpeolgkicgegkbkbjmhlideopiji",MATS_TELEMETRY:"MATS"},qr;(function(t){t.HandshakeRequest="Handshake",t.HandshakeResponse="HandshakeResponse",t.GetToken="GetToken",t.Response="Response"})(qr||(qr={}));var pt;(function(t){t.LocalStorage="localStorage",t.SessionStorage="sessionStorage",t.MemoryStorage="memoryStorage"})(pt||(pt={}));var _r;(function(t){t.GET="GET",t.POST="POST"})(_r||(_r={}));var ae;(function(t){t.AUTHORITY="authority",t.ACQUIRE_TOKEN_ACCOUNT="acquireToken.account",t.SESSION_STATE="session.state",t.REQUEST_STATE="request.state",t.NONCE_IDTOKEN="nonce.id_token",t.ORIGIN_URI="request.origin",t.RENEW_STATUS="token.renew.status",t.URL_HASH="urlHash",t.REQUEST_PARAMS="request.params",t.SCOPES="scopes",t.INTERACTION_STATUS_KEY="interaction.status",t.CCS_CREDENTIAL="ccs.credential",t.CORRELATION_ID="request.correlationId",t.NATIVE_REQUEST="request.native"})(ae||(ae={}));var Xo;(function(t){t.WRAPPER_SKU="wrapper.sku",t.WRAPPER_VER="wrapper.version"})(Xo||(Xo={}));var ye;(function(t){t[t.acquireTokenRedirect=861]="acquireTokenRedirect",t[t.acquireTokenPopup=862]="acquireTokenPopup",t[t.ssoSilent=863]="ssoSilent",t[t.acquireTokenSilent_authCode=864]="acquireTokenSilent_authCode",t[t.handleRedirectPromise=865]="handleRedirectPromise",t[t.acquireTokenByCode=866]="acquireTokenByCode",t[t.acquireTokenSilent_silentFlow=61]="acquireTokenSilent_silentFlow",t[t.logout=961]="logout",t[t.logoutPopup=962]="logoutPopup"})(ye||(ye={}));var F;(function(t){t.Redirect="redirect",t.Popup="popup",t.Silent="silent",t.None="none"})(F||(F={}));var Op;(function(t){t.Startup="startup",t.Login="login",t.Logout="logout",t.AcquireToken="acquireToken",t.SsoSilent="ssoSilent",t.HandleRedirect="handleRedirect",t.None="none"})(Op||(Op={}));var xp={scopes:ts},yi="jwk",Mp;(function(t){t.React="@azure/msal-react",t.Angular="@azure/msal-angular"})(Mp||(Mp={}));var kd="msal.db",XC=1,ZC=kd+".keys",At;(function(t){t[t.Default=0]="Default",t[t.AccessToken=1]="AccessToken",t[t.AccessTokenAndRefreshToken=2]="AccessTokenAndRefreshToken",t[t.RefreshToken=3]="RefreshToken",t[t.RefreshTokenAndNetwork=4]="RefreshTokenAndNetwork",t[t.Skip=5]="Skip"})(At||(At={}));/*! @azure/msal-browser v2.31.0 2022-11-07 */var kt={redirectUriNotSet:{code:"redirect_uri_empty",desc:"A redirect URI is required for all calls, and none has been set."},postLogoutUriNotSet:{code:"post_logout_uri_empty",desc:"A post logout redirect has not been set."},storageNotSupportedError:{code:"storage_not_supported",desc:"Given storage configuration option was not supported."},noRedirectCallbacksSet:{code:"no_redirect_callbacks",desc:"No redirect callbacks have been set. Please call setRedirectCallbacks() with the appropriate function arguments before continuing. More information is available here: https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics."},invalidCallbackObject:{code:"invalid_callback_object",desc:"The object passed for the callback was invalid. More information is available here: https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics."},stubPcaInstanceCalled:{code:"stubbed_public_client_application_called",desc:"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"},inMemRedirectUnavailable:{code:"in_mem_redirect_unavailable",desc:"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."},entropyNotProvided:{code:"entropy_not_provided",desc:"The available browser crypto interface requires entropy set via system.cryptoOptions.entropy configuration option."}},Wc=function(t){ot(e,t);function e(r,n){var o=t.call(this,r,n)||this;return o.name="BrowserConfigurationAuthError",Object.setPrototypeOf(o,e.prototype),o}return e.createRedirectUriEmptyError=function(){return new e(kt.redirectUriNotSet.code,kt.redirectUriNotSet.desc)},e.createPostLogoutRedirectUriEmptyError=function(){return new e(kt.postLogoutUriNotSet.code,kt.postLogoutUriNotSet.desc)},e.createStorageNotSupportedError=function(r){return new e(kt.storageNotSupportedError.code,kt.storageNotSupportedError.desc+" Given Location: "+r)},e.createRedirectCallbacksNotSetError=function(){return new e(kt.noRedirectCallbacksSet.code,kt.noRedirectCallbacksSet.desc)},e.createStubPcaInstanceCalledError=function(){return new e(kt.stubPcaInstanceCalled.code,kt.stubPcaInstanceCalled.desc)},e.createInMemoryRedirectUnavailableError=function(){return new e(kt.inMemRedirectUnavailable.code,kt.inMemRedirectUnavailable.desc)},e.createEntropyNotProvided=function(){return new e(kt.entropyNotProvided.code,kt.entropyNotProvided.desc)},e}(z);/*! @azure/msal-browser v2.31.0 2022-11-07 */var Up=function(){function t(e){this.validateWindowStorage(e),this.windowStorage=window[e]}return t.prototype.validateWindowStorage=function(e){if(e!==pt.LocalStorage&&e!==pt.SessionStorage)throw Wc.createStorageNotSupportedError(e);var r=!!window[e];if(!r)throw Wc.createStorageNotSupportedError(e)},t.prototype.getItem=function(e){return this.windowStorage.getItem(e)},t.prototype.setItem=function(e,r){this.windowStorage.setItem(e,r)},t.prototype.removeItem=function(e){this.windowStorage.removeItem(e)},t.prototype.getKeys=function(){return Object.keys(this.windowStorage)},t.prototype.containsKey=function(e){return this.windowStorage.hasOwnProperty(e)},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var Ad=function(){function t(){this.cache=new Map}return t.prototype.getItem=function(e){return this.cache.get(e)||null},t.prototype.setItem=function(e,r){this.cache.set(e,r)},t.prototype.removeItem=function(e){this.cache.delete(e)},t.prototype.getKeys=function(){var e=[];return this.cache.forEach(function(r,n){e.push(n)}),e},t.prototype.containsKey=function(e){return this.cache.has(e)},t.prototype.clear=function(){this.cache.clear()},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var Ry=function(){function t(){}return t.extractBrowserRequestState=function(e,r){if(x.isEmpty(r))return null;try{var n=Wr.parseRequestState(e,r);return n.libraryState.meta}catch(o){throw D.createInvalidStateError(r,o)}},t.parseServerResponseFromHash=function(e){if(!e)return{};var r=new oe(e);return oe.getDeserializedHash(r.getHash())},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var Rd=function(t){ot(e,t);function e(r,n,o,i){var a=t.call(this,r,o)||this;return a.COOKIE_LIFE_MULTIPLIER=24*60*60*1e3,a.cacheConfig=n,a.logger=i,a.internalStorage=new Ad,a.browserStorage=a.setupBrowserStorage(a.cacheConfig.cacheLocation),a.temporaryCacheStorage=a.setupTemporaryCacheStorage(a.cacheConfig.cacheLocation),a.migrateCacheEntries(),a}return e.prototype.setupBrowserStorage=function(r){switch(r){case pt.LocalStorage:case pt.SessionStorage:try{return new Up(r)}catch(n){this.logger.verbose(n);break}}return this.cacheConfig.cacheLocation=pt.MemoryStorage,new Ad},e.prototype.setupTemporaryCacheStorage=function(r){switch(r){case pt.LocalStorage:case pt.SessionStorage:try{return new Up(pt.SessionStorage)}catch(n){return this.logger.verbose(n),this.internalStorage}case pt.MemoryStorage:default:return this.internalStorage}},e.prototype.migrateCacheEntries=function(){var r=this,n=_.CACHE_PREFIX+"."+He.ID_TOKEN,o=_.CACHE_PREFIX+"."+He.CLIENT_INFO,i=_.CACHE_PREFIX+"."+He.ERROR,a=_.CACHE_PREFIX+"."+He.ERROR_DESC,s=this.browserStorage.getItem(n),c=this.browserStorage.getItem(o),l=this.browserStorage.getItem(i),u=this.browserStorage.getItem(a),h=[s,c,l,u],d=[He.ID_TOKEN,He.CLIENT_INFO,He.ERROR,He.ERROR_DESC];d.forEach(function(f,m){return r.migrateCacheEntry(f,h[m])})},e.prototype.migrateCacheEntry=function(r,n){n&&this.setTemporaryCache(r,n,!0)},e.prototype.validateAndParseJson=function(r){try{var n=JSON.parse(r);return n&&typeof n=="object"?n:null}catch{return null}},e.prototype.getItem=function(r){return this.browserStorage.getItem(r)},e.prototype.setItem=function(r,n){this.browserStorage.setItem(r,n)},e.prototype.getAccount=function(r){var n=this.getItem(r);if(!n)return null;var o=this.validateAndParseJson(n);return!o||!tt.isAccountEntity(o)?null:or.toObject(new tt,o)},e.prototype.setAccount=function(r){this.logger.trace("BrowserCacheManager.setAccount called");var n=r.generateAccountKey();this.setItem(n,JSON.stringify(r))},e.prototype.getIdTokenCredential=function(r){var n=this.getItem(r);if(!n)return this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),null;var o=this.validateAndParseJson(n);return!o||!ja.isIdTokenEntity(o)?(this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getIdTokenCredential: cache hit"),or.toObject(new ja,o))},e.prototype.setIdTokenCredential=function(r){this.logger.trace("BrowserCacheManager.setIdTokenCredential called");var n=r.generateCredentialKey();this.setItem(n,JSON.stringify(r))},e.prototype.getAccessTokenCredential=function(r){var n=this.getItem(r);if(!n)return this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),null;var o=this.validateAndParseJson(n);return!o||!Ba.isAccessTokenEntity(o)?(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: cache hit"),or.toObject(new Ba,o))},e.prototype.setAccessTokenCredential=function(r){this.logger.trace("BrowserCacheManager.setAccessTokenCredential called");var n=r.generateCredentialKey();this.setItem(n,JSON.stringify(r))},e.prototype.getRefreshTokenCredential=function(r){var n=this.getItem(r);if(!n)return this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),null;var o=this.validateAndParseJson(n);return!o||!jc.isRefreshTokenEntity(o)?(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: cache hit"),or.toObject(new jc,o))},e.prototype.setRefreshTokenCredential=function(r){this.logger.trace("BrowserCacheManager.setRefreshTokenCredential called");var n=r.generateCredentialKey();this.setItem(n,JSON.stringify(r))},e.prototype.getAppMetadata=function(r){var n=this.getItem(r);if(!n)return this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null;var o=this.validateAndParseJson(n);return!o||!bd.isAppMetadataEntity(r,o)?(this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getAppMetadata: cache hit"),or.toObject(new bd,o))},e.prototype.setAppMetadata=function(r){this.logger.trace("BrowserCacheManager.setAppMetadata called");var n=r.generateAppMetadataKey();this.setItem(n,JSON.stringify(r))},e.prototype.getServerTelemetry=function(r){var n=this.getItem(r);if(!n)return this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null;var o=this.validateAndParseJson(n);return!o||!Vc.isServerTelemetryEntity(r,o)?(this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getServerTelemetry: cache hit"),or.toObject(new Vc,o))},e.prototype.setServerTelemetry=function(r,n){this.logger.trace("BrowserCacheManager.setServerTelemetry called"),this.setItem(r,JSON.stringify(n))},e.prototype.getAuthorityMetadata=function(r){var n=this.internalStorage.getItem(r);if(!n)return this.logger.trace("BrowserCacheManager.getAuthorityMetadata: called, no cache hit"),null;var o=this.validateAndParseJson(n);return o&&Id.isAuthorityMetadataEntity(r,o)?(this.logger.trace("BrowserCacheManager.getAuthorityMetadata: cache hit"),or.toObject(new Id,o)):null},e.prototype.getAuthorityMetadataKeys=function(){var r=this,n=this.internalStorage.getKeys();return n.filter(function(o){return r.isAuthorityMetadata(o)})},e.prototype.setWrapperMetadata=function(r,n){this.internalStorage.setItem(Xo.WRAPPER_SKU,r),this.internalStorage.setItem(Xo.WRAPPER_VER,n)},e.prototype.getWrapperMetadata=function(){var r=this.internalStorage.getItem(Xo.WRAPPER_SKU)||_.EMPTY_STRING,n=this.internalStorage.getItem(Xo.WRAPPER_VER)||_.EMPTY_STRING;return[r,n]},e.prototype.setAuthorityMetadata=function(r,n){this.logger.trace("BrowserCacheManager.setAuthorityMetadata called"),this.internalStorage.setItem(r,JSON.stringify(n))},e.prototype.getActiveAccount=function(){var r=this.generateCacheKey(He.ACTIVE_ACCOUNT_FILTERS),n=this.getItem(r);if(!n){this.logger.trace("No active account filters cache schema found, looking for legacy schema");var o=this.generateCacheKey(He.ACTIVE_ACCOUNT),i=this.getItem(o);if(!i)return this.logger.trace("No active account found"),null;var a=this.getAccountInfoByFilter({localAccountId:i})[0]||null;return a?(this.logger.trace("Legacy active account cache schema found"),this.logger.trace("Adding active account filters cache schema"),this.setActiveAccount(a),a):null}var s=this.validateAndParseJson(n);return s?(this.logger.trace("Active account filters schema found"),this.getAccountInfoByFilter({homeAccountId:s.homeAccountId,localAccountId:s.localAccountId})[0]||null):(this.logger.trace("No active account found"),null)},e.prototype.setActiveAccount=function(r){var n=this.generateCacheKey(He.ACTIVE_ACCOUNT_FILTERS),o=this.generateCacheKey(He.ACTIVE_ACCOUNT);if(r){this.logger.verbose("setActiveAccount: Active account set");var i={homeAccountId:r.homeAccountId,localAccountId:r.localAccountId};this.browserStorage.setItem(n,JSON.stringify(i)),this.browserStorage.setItem(o,r.localAccountId)}else this.logger.verbose("setActiveAccount: No account passed, active account not set"),this.browserStorage.removeItem(n),this.browserStorage.removeItem(o)},e.prototype.getAccountInfoByFilter=function(r){var n=this.getAllAccounts();return n.filter(function(o){return!(r.username&&r.username.toLowerCase()!==o.username.toLowerCase()||r.homeAccountId&&r.homeAccountId!==o.homeAccountId||r.localAccountId&&r.localAccountId!==o.localAccountId||r.tenantId&&r.tenantId!==o.tenantId||r.environment&&r.environment!==o.environment)})},e.prototype.getAccountInfoByHints=function(r,n){var o=this.getAllAccounts().filter(function(i){if(n){var a=i.idTokenClaims&&i.idTokenClaims.sid;return n===a}return r?r===i.username:!1});if(o.length===1)return o[0];if(o.length>1)throw D.createMultipleMatchingAccountsInCacheError();return null},e.prototype.getThrottlingCache=function(r){var n=this.getItem(r);if(!n)return this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null;var o=this.validateAndParseJson(n);return!o||!Pp.isThrottlingEntity(r,o)?(this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getThrottlingCache: cache hit"),or.toObject(new Pp,o))},e.prototype.setThrottlingCache=function(r,n){this.logger.trace("BrowserCacheManager.setThrottlingCache called"),this.setItem(r,JSON.stringify(n))},e.prototype.getTemporaryCache=function(r,n){var o=n?this.generateCacheKey(r):r;if(this.cacheConfig.storeAuthStateInCookie){var i=this.getItemCookie(o);if(i)return this.logger.trace("BrowserCacheManager.getTemporaryCache: storeAuthStateInCookies set to true, retrieving from cookies"),i}var a=this.temporaryCacheStorage.getItem(o);if(!a){if(this.cacheConfig.cacheLocation===pt.LocalStorage){var s=this.browserStorage.getItem(o);if(s)return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item found in local storage"),s}return this.logger.trace("BrowserCacheManager.getTemporaryCache: No cache item found in local storage"),null}return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item returned"),a},e.prototype.setTemporaryCache=function(r,n,o){var i=o?this.generateCacheKey(r):r;this.temporaryCacheStorage.setItem(i,n),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.setTemporaryCache: storeAuthStateInCookie set to true, setting item cookie"),this.setItemCookie(i,n))},e.prototype.removeItem=function(r){return this.browserStorage.removeItem(r),this.temporaryCacheStorage.removeItem(r),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.removeItem: storeAuthStateInCookie is true, clearing item cookie"),this.clearItemCookie(r)),!0},e.prototype.containsKey=function(r){return this.browserStorage.containsKey(r)||this.temporaryCacheStorage.containsKey(r)},e.prototype.getKeys=function(){return zh(this.browserStorage.getKeys(),this.temporaryCacheStorage.getKeys())},e.prototype.clear=function(){return S(this,void 0,void 0,function(){var r=this;return T(this,function(n){switch(n.label){case 0:return[4,this.removeAllAccounts()];case 1:return n.sent(),this.removeAppMetadata(),this.getKeys().forEach(function(o){(r.browserStorage.containsKey(o)||r.temporaryCacheStorage.containsKey(o))&&(o.indexOf(_.CACHE_PREFIX)!==-1||o.indexOf(r.clientId)!==-1)&&r.removeItem(o)}),this.internalStorage.clear(),[2]}})})},e.prototype.setItemCookie=function(r,n,o){var i=encodeURIComponent(r)+"="+encodeURIComponent(n)+";path=/;SameSite=Lax;";if(o){var a=this.getCookieExpirationTime(o);i+="expires="+a+";"}this.cacheConfig.secureCookies&&(i+="Secure;"),document.cookie=i},e.prototype.getItemCookie=function(r){for(var n=encodeURIComponent(r)+"=",o=document.cookie.split(";"),i=0;i<o.length;i++){for(var a=o[i];a.charAt(0)===" ";)a=a.substring(1);if(a.indexOf(n)===0)return decodeURIComponent(a.substring(n.length,a.length))}return _.EMPTY_STRING},e.prototype.clearMsalCookies=function(){var r=this,n=_.CACHE_PREFIX+"."+this.clientId,o=document.cookie.split(";");o.forEach(function(i){for(;i.charAt(0)===" ";)i=i.substring(1);if(i.indexOf(n)===0){var a=i.split("=")[0];r.clearItemCookie(a)}})},e.prototype.clearItemCookie=function(r){this.setItemCookie(r,_.EMPTY_STRING,-1)},e.prototype.getCookieExpirationTime=function(r){var n=new Date,o=new Date(n.getTime()+r*this.COOKIE_LIFE_MULTIPLIER);return o.toUTCString()},e.prototype.getCache=function(){return this.browserStorage},e.prototype.setCache=function(){},e.prototype.generateCacheKey=function(r){var n=this.validateAndParseJson(r);return n?JSON.stringify(r):x.startsWith(r,_.CACHE_PREFIX)||x.startsWith(r,He.ADAL_ID_TOKEN)?r:_.CACHE_PREFIX+"."+this.clientId+"."+r},e.prototype.generateAuthorityKey=function(r){var n=Wr.parseRequestState(this.cryptoImpl,r).libraryState.id;return this.generateCacheKey(ae.AUTHORITY+"."+n)},e.prototype.generateNonceKey=function(r){var n=Wr.parseRequestState(this.cryptoImpl,r).libraryState.id;return this.generateCacheKey(ae.NONCE_IDTOKEN+"."+n)},e.prototype.generateStateKey=function(r){var n=Wr.parseRequestState(this.cryptoImpl,r).libraryState.id;return this.generateCacheKey(ae.REQUEST_STATE+"."+n)},e.prototype.getCachedAuthority=function(r){var n=this.generateStateKey(r),o=this.getTemporaryCache(n);if(!o)return null;var i=this.generateAuthorityKey(o);return this.getTemporaryCache(i)},e.prototype.updateCacheEntries=function(r,n,o,i,a){this.logger.trace("BrowserCacheManager.updateCacheEntries called");var s=this.generateStateKey(r);this.setTemporaryCache(s,r,!1);var c=this.generateNonceKey(r);this.setTemporaryCache(c,n,!1);var l=this.generateAuthorityKey(r);if(this.setTemporaryCache(l,o,!1),a){var u={credential:a.homeAccountId,type:Dt.HOME_ACCOUNT_ID};this.setTemporaryCache(ae.CCS_CREDENTIAL,JSON.stringify(u),!0)}else if(!x.isEmpty(i)){var u={credential:i,type:Dt.UPN};this.setTemporaryCache(ae.CCS_CREDENTIAL,JSON.stringify(u),!0)}},e.prototype.resetRequestCache=function(r){var n=this;this.logger.trace("BrowserCacheManager.resetRequestCache called"),x.isEmpty(r)||this.getKeys().forEach(function(o){o.indexOf(r)!==-1&&n.removeItem(o)}),r&&(this.removeItem(this.generateStateKey(r)),this.removeItem(this.generateNonceKey(r)),this.removeItem(this.generateAuthorityKey(r))),this.removeItem(this.generateCacheKey(ae.REQUEST_PARAMS)),this.removeItem(this.generateCacheKey(ae.ORIGIN_URI)),this.removeItem(this.generateCacheKey(ae.URL_HASH)),this.removeItem(this.generateCacheKey(ae.CORRELATION_ID)),this.removeItem(this.generateCacheKey(ae.CCS_CREDENTIAL)),this.removeItem(this.generateCacheKey(ae.NATIVE_REQUEST)),this.setInteractionInProgress(!1)},e.prototype.cleanRequestByState=function(r){if(this.logger.trace("BrowserCacheManager.cleanRequestByState called"),r){var n=this.generateStateKey(r),o=this.temporaryCacheStorage.getItem(n);this.logger.infoPii("BrowserCacheManager.cleanRequestByState: Removing temporary cache items for state: "+o),this.resetRequestCache(o||_.EMPTY_STRING)}this.clearMsalCookies()},e.prototype.cleanRequestByInteractionType=function(r){var n=this;this.logger.trace("BrowserCacheManager.cleanRequestByInteractionType called"),this.getKeys().forEach(function(o){if(o.indexOf(ae.REQUEST_STATE)!==-1){var i=n.temporaryCacheStorage.getItem(o);if(!!i){var a=Ry.extractBrowserRequestState(n.cryptoImpl,i);a&&a.interactionType===r&&(n.logger.infoPii("BrowserCacheManager.cleanRequestByInteractionType: Removing temporary cache items for state: "+i),n.resetRequestCache(i))}}}),this.clearMsalCookies(),this.setInteractionInProgress(!1)},e.prototype.cacheCodeRequest=function(r,n){this.logger.trace("BrowserCacheManager.cacheCodeRequest called");var o=n.base64Encode(JSON.stringify(r));this.setTemporaryCache(ae.REQUEST_PARAMS,o,!0)},e.prototype.getCachedRequest=function(r,n){this.logger.trace("BrowserCacheManager.getCachedRequest called");var o=this.getTemporaryCache(ae.REQUEST_PARAMS,!0);if(!o)throw N.createNoTokenRequestCacheError();var i=this.validateAndParseJson(n.base64Decode(o));if(!i)throw N.createUnableToParseTokenRequestCacheError();if(this.removeItem(this.generateCacheKey(ae.REQUEST_PARAMS)),x.isEmpty(i.authority)){var a=this.generateAuthorityKey(r),s=this.getTemporaryCache(a);if(!s)throw N.createNoCachedAuthorityError();i.authority=s}return i},e.prototype.getCachedNativeRequest=function(){this.logger.trace("BrowserCacheManager.getCachedNativeRequest called");var r=this.getTemporaryCache(ae.NATIVE_REQUEST,!0);if(!r)return this.logger.trace("BrowserCacheManager.getCachedNativeRequest: No cached native request found"),null;var n=this.validateAndParseJson(r);return n||(this.logger.error("BrowserCacheManager.getCachedNativeRequest: Unable to parse native request"),null)},e.prototype.isInteractionInProgress=function(r){var n=this.getInteractionInProgress();return r?n===this.clientId:!!n},e.prototype.getInteractionInProgress=function(){var r=_.CACHE_PREFIX+"."+ae.INTERACTION_STATUS_KEY;return this.getTemporaryCache(r,!1)},e.prototype.setInteractionInProgress=function(r){var n=_.CACHE_PREFIX+"."+ae.INTERACTION_STATUS_KEY;if(r){if(this.getInteractionInProgress())throw N.createInteractionInProgressError();this.setTemporaryCache(n,this.clientId,!1)}else!r&&this.getInteractionInProgress()===this.clientId&&this.removeItem(n)},e.prototype.getLegacyLoginHint=function(){var r=this.getTemporaryCache(He.ADAL_ID_TOKEN);r&&(this.browserStorage.removeItem(He.ADAL_ID_TOKEN),this.logger.verbose("Cached ADAL id token retrieved."));var n=this.getTemporaryCache(He.ID_TOKEN,!0);n&&(this.removeItem(this.generateCacheKey(He.ID_TOKEN)),this.logger.verbose("Cached MSAL.js v1 id token retrieved"));var o=n||r;if(o){var i=new kr(o,this.cryptoImpl);if(i.claims&&i.claims.preferred_username)return this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, setting ADAL/MSAL v1 preferred_username as loginHint"),i.claims.preferred_username;if(i.claims&&i.claims.upn)return this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, setting ADAL/MSAL v1 upn as loginHint"),i.claims.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},e.prototype.updateCredentialCacheKey=function(r,n){var o=n.generateCredentialKey();if(r!==o){var i=this.getItem(r);if(i)return this.removeItem(r),this.setItem(o,i),this.logger.verbose("Updated an outdated "+n.credentialType+" cache key"),o;this.logger.error("Attempted to update an outdated "+n.credentialType+" cache key but no item matching the outdated key was found in storage")}return r},e}(or),eS=function(t,e){var r={cacheLocation:pt.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1};return new Rd(t,r,Fc,e)};/*! @azure/msal-browser v2.31.0 2022-11-07 */var ou="@azure/msal-browser",Ea="2.31.0";/*! @azure/msal-browser v2.31.0 2022-11-07 */var tS=function(){function t(){}return t.prototype.sendGetRequestAsync=function(e,r){return S(this,void 0,void 0,function(){var n,o,i;return T(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,fetch(e,{method:_r.GET,headers:this.getFetchHeaders(r)})];case 1:return n=a.sent(),[3,3];case 2:throw o=a.sent(),window.navigator.onLine?N.createGetRequestFailedError(o,e):N.createNoNetworkConnectivityError();case 3:return a.trys.push([3,5,,6]),i={headers:this.getHeaderDict(n.headers)},[4,n.json()];case 4:return[2,(i.body=a.sent(),i.status=n.status,i)];case 5:throw a.sent(),N.createFailedToParseNetworkResponseError(e);case 6:return[2]}})})},t.prototype.sendPostRequestAsync=function(e,r){return S(this,void 0,void 0,function(){var n,o,i,a;return T(this,function(s){switch(s.label){case 0:n=r&&r.body||_.EMPTY_STRING,s.label=1;case 1:return s.trys.push([1,3,,4]),[4,fetch(e,{method:_r.POST,headers:this.getFetchHeaders(r),body:n})];case 2:return o=s.sent(),[3,4];case 3:throw i=s.sent(),window.navigator.onLine?N.createPostRequestFailedError(i,e):N.createNoNetworkConnectivityError();case 4:return s.trys.push([4,6,,7]),a={headers:this.getHeaderDict(o.headers)},[4,o.json()];case 5:return[2,(a.body=s.sent(),a.status=o.status,a)];case 6:throw s.sent(),N.createFailedToParseNetworkResponseError(e);case 7:return[2]}})})},t.prototype.getFetchHeaders=function(e){var r=new Headers;if(!(e&&e.headers))return r;var n=e.headers;return Object.keys(n).forEach(function(o){r.append(o,n[o])}),r},t.prototype.getHeaderDict=function(e){var r={};return e.forEach(function(n,o){r[o]=n}),r},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var rS=function(){function t(){}return t.prototype.sendGetRequestAsync=function(e,r){return S(this,void 0,void 0,function(){return T(this,function(n){return[2,this.sendRequestAsync(e,_r.GET,r)]})})},t.prototype.sendPostRequestAsync=function(e,r){return S(this,void 0,void 0,function(){return T(this,function(n){return[2,this.sendRequestAsync(e,_r.POST,r)]})})},t.prototype.sendRequestAsync=function(e,r,n){var o=this;return new Promise(function(i,a){var s=new XMLHttpRequest;if(s.open(r,e,!0),o.setXhrHeaders(s,n),s.onload=function(){(s.status<200||s.status>=300)&&(r===_r.POST?a(N.createPostRequestFailedError("Failed with status "+s.status,e)):a(N.createGetRequestFailedError("Failed with status "+s.status,e)));try{var c=JSON.parse(s.responseText),l={headers:o.getHeaderDict(s),body:c,status:s.status};i(l)}catch{a(N.createFailedToParseNetworkResponseError(e))}},s.onerror=function(){window.navigator.onLine?r===_r.POST?a(N.createPostRequestFailedError("Failed with status "+s.status,e)):a(N.createGetRequestFailedError("Failed with status "+s.status,e)):a(N.createNoNetworkConnectivityError())},r===_r.POST&&n&&n.body)s.send(n.body);else if(r===_r.GET)s.send();else throw N.createHttpMethodNotImplementedError(r)})},t.prototype.setXhrHeaders=function(e,r){if(r&&r.headers){var n=r.headers;Object.keys(n).forEach(function(o){e.setRequestHeader(o,n[o])})}},t.prototype.getHeaderDict=function(e){var r=e.getAllResponseHeaders(),n=r.trim().split(/[\r\n]+/),o={};return n.forEach(function(i){var a=i.split(": "),s=a.shift(),c=a.join(": ");s&&c&&(o[s]=c)}),o},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var Oe=function(){function t(){}return t.clearHash=function(e){e.location.hash=_.EMPTY_STRING,typeof e.history.replaceState=="function"&&e.history.replaceState(null,_.EMPTY_STRING,""+e.location.origin+e.location.pathname+e.location.search)},t.replaceHash=function(e){var r=e.split("#");r.shift(),window.location.hash=r.length>0?r.join("#"):_.EMPTY_STRING},t.isInIframe=function(){return window.parent!==window},t.isInPopup=function(){return typeof window<"u"&&!!window.opener&&window.opener!==window&&typeof window.name=="string"&&window.name.indexOf(cr.POPUP_NAME_PREFIX+".")===0},t.getCurrentUri=function(){return window.location.href.split("?")[0].split("#")[0]},t.getHomepage=function(){var e=new oe(window.location.href),r=e.getUrlComponents();return r.Protocol+"//"+r.HostNameAndPort+"/"},t.getBrowserNetworkClient=function(){return window.fetch&&window.Headers?new tS:new rS},t.blockReloadInHiddenIframes=function(){var e=oe.hashContainsKnownProperties(window.location.hash);if(e&&t.isInIframe())throw N.createBlockReloadInHiddenIframeError()},t.blockRedirectInIframe=function(e,r){var n=t.isInIframe();if(e===F.Redirect&&n&&!r)throw N.createRedirectInIframeError(n)},t.blockAcquireTokenInPopups=function(){if(t.isInPopup())throw N.createBlockAcquireTokenInPopupsError()},t.blockNonBrowserEnvironment=function(e){if(!e)throw N.createNonBrowserEnvironmentError()},t.blockNativeBrokerCalledBeforeInitialized=function(e,r){if(e&&!r)throw N.createNativeBrokerCalledBeforeInitialize()},t.detectIEOrEdge=function(){var e=window.navigator.userAgent,r=e.indexOf("MSIE "),n=e.indexOf("Trident/"),o=e.indexOf("Edge/"),i=r>0||n>0,a=o>0;return i||a},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var Py=function(){function t(e,r,n,o,i,a,s,c,l){this.config=e,this.browserStorage=r,this.browserCrypto=n,this.networkClient=this.config.system.networkClient,this.eventHandler=i,this.navigationClient=a,this.nativeMessageHandler=c,this.correlationId=l||this.browserCrypto.createNewGuid(),this.logger=o.clone(cr.MSAL_SKU,Ea,this.correlationId),this.performanceClient=s}return t.prototype.clearCacheOnLogout=function(e){return S(this,void 0,void 0,function(){return T(this,function(r){switch(r.label){case 0:if(!e)return[3,5];tt.accountInfoIsEqual(e,this.browserStorage.getActiveAccount(),!1)&&(this.logger.verbose("Setting active account to null"),this.browserStorage.setActiveAccount(null)),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.browserStorage.removeAccount(tt.generateAccountCacheKey(e))];case 2:return r.sent(),this.logger.verbose("Cleared cache items belonging to the account provided in the logout request."),[3,4];case 3:return r.sent(),this.logger.error("Account provided in logout request was not found. Local cache unchanged."),[3,4];case 4:return[3,9];case 5:return r.trys.push([5,8,,9]),this.logger.verbose("No account provided in logout request, clearing all cache items.",this.correlationId),[4,this.browserStorage.clear()];case 6:return r.sent(),[4,this.browserCrypto.clearKeystore()];case 7:return r.sent(),[3,9];case 8:return r.sent(),this.logger.error("Attempted to clear all MSAL cache items and failed. Local cache unchanged."),[3,9];case 9:return[2]}})})},t.prototype.initializeBaseRequest=function(e){return S(this,void 0,void 0,function(){var r,n,o,i;return T(this,function(a){switch(a.label){case 0:if(this.logger.verbose("Initializing BaseAuthRequest"),r=e.authority||this.config.auth.authority,n=zh(e&&e.scopes||[]),o=$($({},e),{correlationId:this.correlationId,authority:r,scopes:n}),!o.authenticationScheme)o.authenticationScheme=le.BEARER,this.logger.verbose(`Authentication Scheme wasn't explicitly set in request, defaulting to "Bearer" request`);else{if(o.authenticationScheme===le.SSH){if(!e.sshJwk)throw Ee.createMissingSshJwkError();if(!e.sshKid)throw Ee.createMissingSshKidError()}this.logger.verbose('Authentication Scheme set to "'+o.authenticationScheme+'" as configured in Auth request')}return e.claims&&!x.isEmpty(e.claims)?(i=o,[4,this.browserCrypto.hashString(e.claims)]):[3,2];case 1:i.requestedClaimsHash=a.sent(),a.label=2;case 2:return[2,o]}})})},t.prototype.getRedirectUri=function(e){this.logger.verbose("getRedirectUri called");var r=e||this.config.auth.redirectUri||Oe.getCurrentUri();return oe.getAbsoluteUrl(r,Oe.getCurrentUri())},t.prototype.initializeServerTelemetryManager=function(e,r){this.logger.verbose("initializeServerTelemetryManager called");var n={clientId:this.config.auth.clientId,correlationId:this.correlationId,apiId:e,forceRefresh:r||!1,wrapperSKU:this.browserStorage.getWrapperMetadata()[0],wrapperVer:this.browserStorage.getWrapperMetadata()[1]};return new YC(n,this.browserStorage)},t.prototype.getDiscoveredAuthority=function(e){return S(this,void 0,void 0,function(){var r;return T(this,function(n){switch(n.label){case 0:return this.logger.verbose("getDiscoveredAuthority called"),r={protocolMode:this.config.auth.protocolMode,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata},e?(this.logger.verbose("Creating discovered authority with request authority"),[4,Gc.createDiscoveredInstance(e,this.config.system.networkClient,this.browserStorage,r)]):[3,2];case 1:return[2,n.sent()];case 2:return this.logger.verbose("Creating discovered authority with configured authority"),[4,Gc.createDiscoveredInstance(this.config.auth.authority,this.config.system.networkClient,this.browserStorage,r)];case 3:return[2,n.sent()]}})})},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var Ri=function(t){ot(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.initializeAuthorizationCodeRequest=function(r){return S(this,void 0,void 0,function(){var n,o;return T(this,function(i){switch(i.label){case 0:return this.logger.verbose("initializeAuthorizationRequest called",r.correlationId),[4,this.browserCrypto.generatePkceCodes()];case 1:return n=i.sent(),o=$($({},r),{redirectUri:r.redirectUri,code:_.EMPTY_STRING,codeVerifier:n.verifier}),r.codeChallenge=n.challenge,r.codeChallengeMethod=_.S256_CODE_CHALLENGE_METHOD,[2,o]}})})},e.prototype.initializeLogoutRequest=function(r){this.logger.verbose("initializeLogoutRequest called",r==null?void 0:r.correlationId);var n=$({correlationId:this.correlationId||this.browserCrypto.createNewGuid()},r);if(r)if(r.logoutHint)this.logger.verbose("logoutHint has already been set in logoutRequest");else if(r.account){var o=this.getLogoutHintFromIdTokenClaims(r.account);o&&(this.logger.verbose("Setting logoutHint to login_hint ID Token Claim value for the account provided"),n.logoutHint=o)}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!r||r.postLogoutRedirectUri!==null?r&&r.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to uri set on logout request",n.correlationId),n.postLogoutRedirectUri=oe.getAbsoluteUrl(r.postLogoutRedirectUri,Oe.getCurrentUri())):this.config.auth.postLogoutRedirectUri===null?this.logger.verbose("postLogoutRedirectUri configured as null and no uri set on request, not passing post logout redirect",n.correlationId):this.config.auth.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to configured uri",n.correlationId),n.postLogoutRedirectUri=oe.getAbsoluteUrl(this.config.auth.postLogoutRedirectUri,Oe.getCurrentUri())):(this.logger.verbose("Setting postLogoutRedirectUri to current page",n.correlationId),n.postLogoutRedirectUri=oe.getAbsoluteUrl(Oe.getCurrentUri(),Oe.getCurrentUri())):this.logger.verbose("postLogoutRedirectUri passed as null, not setting post logout redirect uri",n.correlationId),n},e.prototype.getLogoutHintFromIdTokenClaims=function(r){var n=r.idTokenClaims;if(n){if(n.login_hint)return n.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},e.prototype.createAuthCodeClient=function(r,n,o){return S(this,void 0,void 0,function(){var i;return T(this,function(a){switch(a.label){case 0:return[4,this.getClientConfiguration(r,n,o)];case 1:return i=a.sent(),[2,new by(i)]}})})},e.prototype.getClientConfiguration=function(r,n,o){return S(this,void 0,void 0,function(){var i;return T(this,function(a){switch(a.label){case 0:return this.logger.verbose("getClientConfiguration called",this.correlationId),[4,this.getDiscoveredAuthority(n,o)];case 1:return i=a.sent(),[2,{authOptions:{clientId:this.config.auth.clientId,authority:i,clientCapabilities:this.config.auth.clientCapabilities},systemOptions:{tokenRenewalOffsetSeconds:this.config.system.tokenRenewalOffsetSeconds,preventCorsPreflight:!0},loggerOptions:{loggerCallback:this.config.system.loggerOptions.loggerCallback,piiLoggingEnabled:this.config.system.loggerOptions.piiLoggingEnabled,logLevel:this.config.system.loggerOptions.logLevel,correlationId:this.correlationId},cryptoInterface:this.browserCrypto,networkInterface:this.networkClient,storageInterface:this.browserStorage,serverTelemetryManager:r,libraryInfo:{sku:cr.MSAL_SKU,version:Ea,cpu:_.EMPTY_STRING,os:_.EMPTY_STRING},telemetry:this.config.telemetry}]}})})},e.prototype.validateAndExtractStateFromHash=function(r,n,o){if(this.logger.verbose("validateAndExtractStateFromHash called",o),!r.state)throw N.createHashDoesNotContainStateError();var i=Ry.extractBrowserRequestState(this.browserCrypto,r.state);if(!i)throw N.createUnableToParseStateError();if(i.interactionType!==n)throw N.createStateInteractionTypeMismatchError();return this.logger.verbose("Returning state from hash",o),r.state},e.prototype.getDiscoveredAuthority=function(r,n){return S(this,void 0,void 0,function(){var o,i,a,s;return T(this,function(c){switch(c.label){case 0:return this.logger.verbose("getDiscoveredAuthority called",this.correlationId),o=this.performanceClient.startMeasurement(je.StandardInteractionClientGetDiscoveredAuthority,this.correlationId),i={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},a=r||this.config.auth.authority,s=Kc.generateAuthority(a,n||this.config.auth.azureCloudOptions),this.logger.verbose("Creating discovered authority with configured authority",this.correlationId),[4,Gc.createDiscoveredInstance(s,this.config.system.networkClient,this.browserStorage,i).then(function(l){return o.endMeasurement({success:!0}),l}).catch(function(l){throw o.endMeasurement({errorCode:l.errorCode,subErrorCode:l.subError,success:!1}),l})];case 1:return[2,c.sent()]}})})},e.prototype.initializeAuthorizationRequest=function(r,n){return S(this,void 0,void 0,function(){var o,i,a,s,c,l,u;return T(this,function(h){switch(h.label){case 0:return this.logger.verbose("initializeAuthorizationRequest called",this.correlationId),o=this.getRedirectUri(r.redirectUri),i={interactionType:n},a=Wr.setRequestState(this.browserCrypto,r&&r.state||_.EMPTY_STRING,i),c=[{}],[4,this.initializeBaseRequest(r)];case 1:return s=$.apply(void 0,[$.apply(void 0,c.concat([h.sent()])),{redirectUri:o,state:a,nonce:r.nonce||this.browserCrypto.createNewGuid(),responseMode:Uc.FRAGMENT}]),l=r.account||this.browserStorage.getActiveAccount(),l&&(this.logger.verbose("Setting validated request account",this.correlationId),this.logger.verbosePii("Setting validated request account: "+l.homeAccountId,this.correlationId),s.account=l),x.isEmpty(s.loginHint)&&!l&&(u=this.browserStorage.getLegacyLoginHint(),u&&(s.loginHint=u)),[2,s]}})})},e}(Py);/*! @azure/msal-browser v2.31.0 2022-11-07 */var qh=function(){function t(e,r,n,o){this.authModule=e,this.browserStorage=r,this.authCodeRequest=n,this.logger=o}return t.prototype.handleCodeResponseFromHash=function(e,r,n,o){return S(this,void 0,void 0,function(){var i,a,s;return T(this,function(c){if(this.logger.verbose("InteractionHandler.handleCodeResponse called"),x.isEmpty(e))throw N.createEmptyHashError(e);if(i=this.browserStorage.generateStateKey(r),a=this.browserStorage.getTemporaryCache(i),!a)throw D.createStateNotFoundError("Cached State");try{s=this.authModule.handleFragmentResponse(e,a)}catch(l){throw l instanceof vo&&l.subError===I.userCancelledError.code?N.createUserCancelledError():l}return[2,this.handleCodeResponseFromServer(s,r,n,o)]})})},t.prototype.handleCodeResponseFromServer=function(e,r,n,o,i){return i===void 0&&(i=!0),S(this,void 0,void 0,function(){var a,s,c,l,u,h;return T(this,function(d){switch(d.label){case 0:if(this.logger.trace("InteractionHandler.handleCodeResponseFromServer called"),a=this.browserStorage.generateStateKey(r),s=this.browserStorage.getTemporaryCache(a),!s)throw D.createStateNotFoundError("Cached State");return c=this.browserStorage.generateNonceKey(s),l=this.browserStorage.getTemporaryCache(c),this.authCodeRequest.code=e.code,e.cloud_instance_host_name?[4,this.updateTokenEndpointAuthority(e.cloud_instance_host_name,n,o)]:[3,2];case 1:d.sent(),d.label=2;case 2:return i&&(e.nonce=l||void 0),e.state=s,e.client_info?this.authCodeRequest.clientInfo=e.client_info:(u=this.checkCcsCredentials(),u&&(this.authCodeRequest.ccsCredential=u)),[4,this.authModule.acquireToken(this.authCodeRequest,e)];case 3:return h=d.sent(),this.browserStorage.cleanRequestByState(r),[2,h]}})})},t.prototype.updateTokenEndpointAuthority=function(e,r,n){return S(this,void 0,void 0,function(){var o,i;return T(this,function(a){switch(a.label){case 0:return o="https://"+e+"/"+r.tenant+"/",[4,Gc.createDiscoveredInstance(o,n,this.browserStorage,r.options)];case 1:return i=a.sent(),this.authModule.updateAuthority(i),[2]}})})},t.prototype.checkCcsCredentials=function(){var e=this.browserStorage.getTemporaryCache(ae.CCS_CREDENTIAL,!0);if(e)try{return JSON.parse(e)}catch{this.authModule.logger.error("Cache credential could not be parsed"),this.authModule.logger.errorPii("Cache credential could not be parsed: "+e)}return null},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var Lp=function(t){ot(e,t);function e(r,n,o,i,a){var s=t.call(this,r,n,o,i)||this;return s.browserCrypto=a,s}return e.prototype.initiateAuthRequest=function(r,n){return S(this,void 0,void 0,function(){var o,i;return T(this,function(a){switch(a.label){case 0:return this.logger.verbose("RedirectHandler.initiateAuthRequest called"),x.isEmpty(r)?[3,7]:(n.redirectStartPage&&(this.logger.verbose("RedirectHandler.initiateAuthRequest: redirectStartPage set, caching start page"),this.browserStorage.setTemporaryCache(ae.ORIGIN_URI,n.redirectStartPage,!0)),this.browserStorage.setTemporaryCache(ae.CORRELATION_ID,this.authCodeRequest.correlationId,!0),this.browserStorage.cacheCodeRequest(this.authCodeRequest,this.browserCrypto),this.logger.infoPii("RedirectHandler.initiateAuthRequest: Navigate to: "+r),o={apiId:ye.acquireTokenRedirect,timeout:n.redirectTimeout,noHistory:!1},typeof n.onRedirectNavigate!="function"?[3,4]:(this.logger.verbose("RedirectHandler.initiateAuthRequest: Invoking onRedirectNavigate callback"),i=n.onRedirectNavigate(r),i===!1?[3,2]:(this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate did not return false, navigating"),[4,n.navigationClient.navigateExternal(r,o)])));case 1:return a.sent(),[2];case 2:return this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate returned false, stopping navigation"),[2];case 3:return[3,6];case 4:return this.logger.verbose("RedirectHandler.initiateAuthRequest: Navigating window to navigate url"),[4,n.navigationClient.navigateExternal(r,o)];case 5:return a.sent(),[2];case 6:return[3,8];case 7:throw this.logger.info("RedirectHandler.initiateAuthRequest: Navigate url is empty"),N.createEmptyNavigationUriError();case 8:return[2]}})})},e.prototype.handleCodeResponseFromHash=function(r,n,o,i){return S(this,void 0,void 0,function(){var a,s,c,l,u,h,d;return T(this,function(f){switch(f.label){case 0:if(this.logger.verbose("RedirectHandler.handleCodeResponse called"),x.isEmpty(r))throw N.createEmptyHashError(r);if(this.browserStorage.setInteractionInProgress(!1),a=this.browserStorage.generateStateKey(n),s=this.browserStorage.getTemporaryCache(a),!s)throw D.createStateNotFoundError("Cached State");try{c=this.authModule.handleFragmentResponse(r,s)}catch(m){throw m instanceof vo&&m.subError===I.userCancelledError.code?N.createUserCancelledError():m}return l=this.browserStorage.generateNonceKey(s),u=this.browserStorage.getTemporaryCache(l),this.authCodeRequest.code=c.code,c.cloud_instance_host_name?[4,this.updateTokenEndpointAuthority(c.cloud_instance_host_name,o,i)]:[3,2];case 1:f.sent(),f.label=2;case 2:return c.nonce=u||void 0,c.state=s,c.client_info?this.authCodeRequest.clientInfo=c.client_info:(h=this.checkCcsCredentials(),h&&(this.authCodeRequest.ccsCredential=h)),[4,this.authModule.acquireToken(this.authCodeRequest,c)];case 3:return d=f.sent(),this.browserStorage.cleanRequestByState(n),[2,d]}})})},e}(qh);/*! @azure/msal-browser v2.31.0 2022-11-07 */var q;(function(t){t.INITIALIZE_START="msal:initializeStart",t.INITIALIZE_END="msal:initializeEnd",t.ACCOUNT_ADDED="msal:accountAdded",t.ACCOUNT_REMOVED="msal:accountRemoved",t.LOGIN_START="msal:loginStart",t.LOGIN_SUCCESS="msal:loginSuccess",t.LOGIN_FAILURE="msal:loginFailure",t.ACQUIRE_TOKEN_START="msal:acquireTokenStart",t.ACQUIRE_TOKEN_SUCCESS="msal:acquireTokenSuccess",t.ACQUIRE_TOKEN_FAILURE="msal:acquireTokenFailure",t.ACQUIRE_TOKEN_NETWORK_START="msal:acquireTokenFromNetworkStart",t.SSO_SILENT_START="msal:ssoSilentStart",t.SSO_SILENT_SUCCESS="msal:ssoSilentSuccess",t.SSO_SILENT_FAILURE="msal:ssoSilentFailure",t.ACQUIRE_TOKEN_BY_CODE_START="msal:acquireTokenByCodeStart",t.ACQUIRE_TOKEN_BY_CODE_SUCCESS="msal:acquireTokenByCodeSuccess",t.ACQUIRE_TOKEN_BY_CODE_FAILURE="msal:acquireTokenByCodeFailure",t.HANDLE_REDIRECT_START="msal:handleRedirectStart",t.HANDLE_REDIRECT_END="msal:handleRedirectEnd",t.POPUP_OPENED="msal:popupOpened",t.LOGOUT_START="msal:logoutStart",t.LOGOUT_SUCCESS="msal:logoutSuccess",t.LOGOUT_FAILURE="msal:logoutFailure",t.LOGOUT_END="msal:logoutEnd"})(q||(q={}));/*! @azure/msal-browser v2.31.0 2022-11-07 */var mn;(function(t){t.USER_INTERACTION_REQUIRED="USER_INTERACTION_REQUIRED",t.USER_CANCEL="USER_CANCEL",t.NO_NETWORK="NO_NETWORK",t.TRANSIENT_ERROR="TRANSIENT_ERROR",t.PERSISTENT_ERROR="PERSISTENT_ERROR",t.DISABLED="DISABLED",t.ACCOUNT_UNAVAILABLE="ACCOUNT_UNAVAILABLE"})(mn||(mn={}));var Bi={extensionError:{code:"ContentError"},userSwitch:{code:"user_switch",desc:"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."},tokensNotFoundInCache:{code:"tokens_not_found_in_internal_memory_cache",desc:"Tokens not cached in MSAL JS internal memory, please make the WAM request"}},Er=function(t){ot(e,t);function e(r,n,o){var i=t.call(this,r,n)||this;return Object.setPrototypeOf(i,e.prototype),i.name="NativeAuthError",i.ext=o,i}return e.prototype.isFatal=function(){if(this.ext&&this.ext.status&&(this.ext.status===mn.PERSISTENT_ERROR||this.ext.status===mn.DISABLED))return!0;switch(this.errorCode){case Bi.extensionError.code:return!0;default:return!1}},e.createError=function(r,n,o){if(o&&o.status)switch(o.status){case mn.ACCOUNT_UNAVAILABLE:return lr.createNativeAccountUnavailableError();case mn.USER_INTERACTION_REQUIRED:return new lr(r,n);case mn.USER_CANCEL:return N.createUserCancelledError();case mn.NO_NETWORK:return N.createNoNetworkConnectivityError()}return new e(r,n,o)},e.createUserSwitchError=function(){return new e(Bi.userSwitch.code,Bi.userSwitch.desc)},e.createTokensNotFoundInCacheError=function(){return new e(Bi.tokensNotFoundInCache.code,Bi.tokensNotFoundInCache.desc)},e}(z);/*! @azure/msal-browser v2.31.0 2022-11-07 */var Ny=function(t){ot(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.acquireToken=function(r){return S(this,void 0,void 0,function(){var n,o,i,a,s;return T(this,function(c){switch(c.label){case 0:return n=this.performanceClient.startMeasurement(je.SilentCacheClientAcquireToken,r.correlationId),o=this.initializeServerTelemetryManager(ye.acquireTokenSilent_silentFlow),[4,this.createSilentFlowClient(o,r.authority,r.azureCloudOptions)];case 1:i=c.sent(),this.logger.verbose("Silent auth client created"),c.label=2;case 2:return c.trys.push([2,4,,5]),[4,i.acquireCachedToken(r)];case 3:return a=c.sent(),n.endMeasurement({success:!0,fromCache:!0}),[2,a];case 4:throw s=c.sent(),s instanceof N&&s.errorCode===I.signingKeyNotFoundInStorage.code&&this.logger.verbose("Signing keypair for bound access token not found. Refreshing bound access token and generating a new crypto keypair."),n.endMeasurement({errorCode:s instanceof z&&s.errorCode||void 0,subErrorCode:s instanceof z&&s.subError||void 0,success:!1}),s;case 5:return[2]}})})},e.prototype.logout=function(){return Promise.reject(N.createSilentLogoutUnsupportedError())},e.prototype.createSilentFlowClient=function(r,n,o){return S(this,void 0,void 0,function(){var i;return T(this,function(a){switch(a.label){case 0:return[4,this.getClientConfiguration(r,n,o)];case 1:return i=a.sent(),[2,new BC(i,this.performanceClient)]}})})},e.prototype.initializeSilentRequest=function(r,n){return S(this,void 0,void 0,function(){var o;return T(this,function(i){switch(i.label){case 0:return o=[$({},r)],[4,this.initializeBaseRequest(r)];case 1:return[2,$.apply(void 0,[$.apply(void 0,o.concat([i.sent()])),{account:n,forceRefresh:r.forceRefresh||!1}])]}})})},e}(Ri);/*! @azure/msal-browser v2.31.0 2022-11-07 */var si=function(t){ot(e,t);function e(r,n,o,i,a,s,c,l,u,h,d,f){var m=t.call(this,r,n,o,i,a,s,l,u,f)||this;return m.apiId=c,m.accountId=h,m.nativeMessageHandler=u,m.nativeStorageManager=d,m.silentCacheClient=new Ny(r,m.nativeStorageManager,o,i,a,s,l,u,f),m}return e.prototype.acquireToken=function(r){return S(this,void 0,void 0,function(){var n,o,i,a,s,c,l;return T(this,function(u){switch(u.label){case 0:return this.logger.trace("NativeInteractionClient - acquireToken called."),n=this.performanceClient.startMeasurement(je.NativeInteractionClientAcquireToken,r.correlationId),o=Jt.nowSeconds(),[4,this.initializeNativeRequest(r)];case 1:i=u.sent(),u.label=2;case 2:return u.trys.push([2,4,,5]),[4,this.acquireTokensFromCache(this.accountId,i)];case 3:return a=u.sent(),n.endMeasurement({success:!0,isNativeBroker:!1,fromCache:!0}),[2,a];case 4:return u.sent(),this.logger.info("MSAL internal Cache does not contain tokens, proceed to make a native call"),[3,5];case 5:return s={method:qr.GetToken,request:i},[4,this.nativeMessageHandler.sendMessage(s)];case 6:return c=u.sent(),l=this.validateNativeResponse(c),[2,this.handleNativeResponse(l,i,o).then(function(h){return n.endMeasurement({success:!0,isNativeBroker:!0,requestId:h.requestId}),h}).catch(function(h){throw n.endMeasurement({success:!1,errorCode:h.errorCode,subErrorCode:h.subError,isNativeBroker:!0}),h})]}})})},e.prototype.createSilentCacheRequest=function(r,n){return{authority:r.authority,correlationId:this.correlationId,scopes:Ct.fromString(r.scope).asArray(),account:n,forceRefresh:!1}},e.prototype.acquireTokensFromCache=function(r,n){return S(this,void 0,void 0,function(){var o,i,a,s,c;return T(this,function(l){switch(l.label){case 0:if(o=this.browserStorage.readAccountFromCacheWithNativeAccountId(r),!o)throw D.createNoAccountFoundError();i=o.getAccountInfo(),l.label=1;case 1:return l.trys.push([1,3,,4]),a=this.createSilentCacheRequest(n,i),[4,this.silentCacheClient.acquireToken(a)];case 2:return s=l.sent(),[2,s];case 3:throw c=l.sent(),c;case 4:return[2]}})})},e.prototype.acquireTokenRedirect=function(r){return S(this,void 0,void 0,function(){var n,o,i,a,s,c;return T(this,function(l){switch(l.label){case 0:return this.logger.trace("NativeInteractionClient - acquireTokenRedirect called."),[4,this.initializeNativeRequest(r)];case 1:n=l.sent(),o={method:qr.GetToken,request:n},l.label=2;case 2:return l.trys.push([2,4,,5]),[4,this.nativeMessageHandler.sendMessage(o)];case 3:return i=l.sent(),this.validateNativeResponse(i),[3,5];case 4:if(a=l.sent(),a instanceof Er&&a.isFatal())throw a;return[3,5];case 5:return this.browserStorage.setTemporaryCache(ae.NATIVE_REQUEST,JSON.stringify(n),!0),s={apiId:ye.acquireTokenRedirect,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},c=this.config.auth.navigateToLoginRequestUrl?window.location.href:this.getRedirectUri(r.redirectUri),[4,this.navigationClient.navigateExternal(c,s)];case 6:return l.sent(),[2]}})})},e.prototype.handleRedirectPromise=function(){return S(this,void 0,void 0,function(){var r,n,o,i,a,s,c,l;return T(this,function(u){switch(u.label){case 0: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."),[2,null];if(r=this.browserStorage.getCachedNativeRequest(),!r)return this.logger.verbose("NativeInteractionClient - handleRedirectPromise called but there is no cached request, returning null."),[2,null];n=r.prompt,o=Sp(r,["prompt"]),n&&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(ae.NATIVE_REQUEST)),i={method:qr.GetToken,request:o},a=Jt.nowSeconds(),u.label=1;case 1:return u.trys.push([1,3,,4]),this.logger.verbose("NativeInteractionClient - handleRedirectPromise sending message to native broker."),[4,this.nativeMessageHandler.sendMessage(i)];case 2:return s=u.sent(),this.validateNativeResponse(s),c=this.handleNativeResponse(s,o,a),this.browserStorage.setInteractionInProgress(!1),[2,c];case 3:throw l=u.sent(),this.browserStorage.setInteractionInProgress(!1),l;case 4:return[2]}})})},e.prototype.logout=function(){return this.logger.trace("NativeInteractionClient - logout called."),Promise.reject("Logout not implemented yet")},e.prototype.handleNativeResponse=function(r,n,o){return S(this,void 0,void 0,function(){var i,a,s,c,l,u,h,d,f,m,v,E,g,p,y,w,k,P,M,O,se=this;return T(this,function(B){switch(B.label){case 0:if(this.logger.trace("NativeInteractionClient - handleNativeResponse called."),i=this.getMATSFromResponse(r),this.performanceClient.addStaticFields({extensionId:this.nativeMessageHandler.getExtensionId(),extensionVersion:this.nativeMessageHandler.getExtensionVersion(),matsBrokerVersion:i?i.broker_version:void 0,matsAccountJoinOnStart:i?i.account_join_on_start:void 0,matsAccountJoinOnEnd:i?i.account_join_on_end:void 0,matsDeviceJoin:i?i.device_join:void 0,matsPromptBehavior:i?i.prompt_behavior:void 0,matsApiErrorCode:i?i.api_error_code:void 0,matsUiVisible:i?i.ui_visible:void 0,matsSilentCode:i?i.silent_code:void 0,matsSilentBiSubCode:i?i.silent_bi_sub_code:void 0,matsSilentMessage:i?i.silent_message:void 0,matsSilentStatus:i?i.silent_status:void 0,matsHttpStatus:i?i.http_status:void 0,matsHttpEventCount:i?i.http_event_count:void 0},this.correlationId),r.account.id!==n.accountId)throw Er.createUserSwitchError();return a=new kr(r.id_token||_.EMPTY_STRING,this.browserCrypto),[4,this.getDiscoveredAuthority(n.authority)];case 1:switch(s=B.sent(),c=s.getPreferredCache(),l=tt.generateHomeAccountId(r.client_info||_.EMPTY_STRING,Wt.Default,this.logger,this.browserCrypto,a),u=tt.createAccount(r.client_info,l,a,void 0,void 0,void 0,c,r.account.id),this.browserStorage.setAccount(u),h=r.scope?Ct.fromString(r.scope):Ct.fromString(n.scope),d=r.account.properties||{},f=d.UID||a.claims.oid||a.claims.sub||_.EMPTY_STRING,m=d.TenantId||a.claims.tid||_.EMPTY_STRING,E=le.BEARER,g=n.tokenType,g){case le.POP:return[3,2]}return[3,4];case 2:if(E=le.POP,r.shr)return this.logger.trace("handleNativeServerResponse: SHR is enabled in native layer"),v=r.shr,[3,5];if(p=new vi(this.browserCrypto),y={resourceRequestMethod:n.resourceRequestMethod,resourceRequestUri:n.resourceRequestUri,shrClaims:n.shrClaims,shrNonce:n.shrNonce},!n.keyId)throw D.createKeyIdMissingError();return[4,p.signPopToken(r.access_token,n.keyId,y)];case 3:return v=B.sent(),[3,5];case 4:v=r.access_token,B.label=5;case 5:return w={authority:s.canonicalAuthority,uniqueId:f,tenantId:m,scopes:h.asArray(),account:u.getAccountInfo(),idToken:r.id_token,idTokenClaims:a.claims,accessToken:v,fromCache:i?this.isResponseFromCache(i):!1,expiresOn:new Date(Number(o+r.expires_in)*1e3),tokenType:E,correlationId:this.correlationId,state:r.state,fromNativeBroker:!0},k=ja.createIdTokenEntity(l,n.authority,r.id_token||_.EMPTY_STRING,n.clientId,a.claims.tid||_.EMPTY_STRING),this.nativeStorageManager.setIdTokenCredential(k),P=E===le.POP?_.SHR_NONCE_VALIDITY:(typeof r.expires_in=="string"?parseInt(r.expires_in,10):r.expires_in)||0,M=o+P,O=Ba.createAccessTokenEntity(l,n.authority,v,n.clientId,m,h.printScopes(),M,0,this.browserCrypto),this.nativeStorageManager.setAccessTokenCredential(O),this.browserStorage.removeAccountContext(u).catch(function(_t){se.logger.error("Error occurred while removing account context from browser storage. "+_t)}),[2,w]}})})},e.prototype.validateNativeResponse=function(r){if(r.hasOwnProperty("access_token")&&r.hasOwnProperty("id_token")&&r.hasOwnProperty("client_info")&&r.hasOwnProperty("account")&&r.hasOwnProperty("scope")&&r.hasOwnProperty("expires_in"))return r;throw Er.createUnexpectedError("Response missing expected properties.")},e.prototype.getMATSFromResponse=function(r){if(r.properties.MATS)try{return JSON.parse(r.properties.MATS)}catch{this.logger.error("NativeInteractionClient - Error parsing MATS telemetry, returning null instead")}return null},e.prototype.isResponseFromCache=function(r){return typeof r.is_cached>"u"?(this.logger.verbose("NativeInteractionClient - MATS telemetry does not contain field indicating if response was served from cache. Returning false."),!1):!!r.is_cached},e.prototype.initializeNativeRequest=function(r){return S(this,void 0,void 0,function(){var n,o,i,a,s,c,l,u,h,d,f=this;return T(this,function(m){switch(m.label){case 0:return this.logger.trace("NativeInteractionClient - initializeNativeRequest called"),n=r.authority||this.config.auth.authority,o=new oe(n),o.validateAsUri(),i=r.scopes,a=Sp(r,["scopes"]),s=new Ct(i||[]),s.appendScopes(ts),c=function(){switch(f.apiId){case ye.ssoSilent:case ye.acquireTokenSilent_silentFlow:return f.logger.trace("initializeNativeRequest: silent request sets prompt to none"),mt.NONE}if(!r.prompt){f.logger.trace("initializeNativeRequest: prompt was not provided");return}switch(r.prompt){case mt.NONE:case mt.CONSENT:case mt.LOGIN:return f.logger.trace("initializeNativeRequest: prompt is compatible with native flow"),r.prompt;default:throw f.logger.trace("initializeNativeRequest: prompt = "+r.prompt+" is not compatible with native flow"),N.createNativePromptParameterNotSupportedError()}},l=$($({},a),{accountId:this.accountId,clientId:this.config.auth.clientId,authority:o.urlString,scope:s.printScopes(),redirectUri:this.getRedirectUri(r.redirectUri),prompt:c(),correlationId:this.correlationId,tokenType:r.authenticationScheme,windowTitleSubstring:document.title,extraParameters:$($($({},r.extraQueryParameters),r.tokenQueryParameters),{telemetry:ra.MATS_TELEMETRY}),extendedExpiryToken:!1}),r.authenticationScheme!==le.POP?[3,2]:(u={resourceRequestUri:r.resourceRequestUri,resourceRequestMethod:r.resourceRequestMethod,shrClaims:r.shrClaims,shrNonce:r.shrNonce},h=new vi(this.browserCrypto),[4,h.generateCnf(u)]);case 1:d=m.sent(),l.reqCnf=d.reqCnfHash,l.keyId=d.kid,m.label=2;case 2:return[2,l]}})})},e}(Py);/*! @azure/msal-browser v2.31.0 2022-11-07 */var ro=function(){function t(e,r,n){this.logger=e,this.handshakeTimeoutMs=r,this.extensionId=n,this.resolvers=new Map,this.handshakeResolvers=new Map,this.responseId=0,this.messageChannel=new MessageChannel,this.windowListener=this.onWindowMessage.bind(this)}return t.prototype.sendMessage=function(e){return S(this,void 0,void 0,function(){var r,n=this;return T(this,function(o){return this.logger.trace("NativeMessageHandler - sendMessage called."),r={channel:ra.CHANNEL_ID,extensionId:this.extensionId,responseId:this.responseId++,body:e},this.logger.trace("NativeMessageHandler - Sending request to browser extension"),this.logger.tracePii("NativeMessageHandler - Sending request to browser extension: "+JSON.stringify(r)),this.messageChannel.port1.postMessage(r),[2,new Promise(function(i,a){n.resolvers.set(r.responseId,{resolve:i,reject:a})})]})})},t.createProvider=function(e,r){return S(this,void 0,void 0,function(){var n,o;return T(this,function(i){switch(i.label){case 0:e.trace("NativeMessageHandler - createProvider called."),i.label=1;case 1:return i.trys.push([1,3,,5]),n=new t(e,r,ra.PREFERRED_EXTENSION_ID),[4,n.sendHandshakeRequest()];case 2:return i.sent(),[2,n];case 3:return i.sent(),o=new t(e,r),[4,o.sendHandshakeRequest()];case 4:return i.sent(),[2,o];case 5:return[2]}})})},t.prototype.sendHandshakeRequest=function(){return S(this,void 0,void 0,function(){var e,r=this;return T(this,function(n){return this.logger.trace("NativeMessageHandler - sendHandshakeRequest called."),window.addEventListener("message",this.windowListener,!1),e={channel:ra.CHANNEL_ID,extensionId:this.extensionId,responseId:this.responseId++,body:{method:qr.HandshakeRequest}},this.messageChannel.port1.onmessage=function(o){r.onChannelMessage(o)},window.postMessage(e,window.origin,[this.messageChannel.port2]),[2,new Promise(function(o,i){r.handshakeResolvers.set(e.responseId,{resolve:o,reject:i}),r.timeoutId=window.setTimeout(function(){window.removeEventListener("message",r.windowListener,!1),r.messageChannel.port1.close(),r.messageChannel.port2.close(),i(N.createNativeHandshakeTimeoutError()),r.handshakeResolvers.delete(e.responseId)},r.handshakeTimeoutMs)})]})})},t.prototype.onWindowMessage=function(e){if(this.logger.trace("NativeMessageHandler - onWindowMessage called"),e.source===window){var r=e.data;if(!(!r.channel||r.channel!==ra.CHANNEL_ID)&&!(r.extensionId&&r.extensionId!==this.extensionId)&&r.body.method===qr.HandshakeRequest){this.logger.verbose(r.extensionId?"Extension with id: "+r.extensionId+" not installed":"No extension installed"),clearTimeout(this.timeoutId),this.messageChannel.port1.close(),this.messageChannel.port2.close(),window.removeEventListener("message",this.windowListener,!1);var n=this.handshakeResolvers.get(r.responseId);n&&n.reject(N.createNativeExtensionNotInstalledError())}}},t.prototype.onChannelMessage=function(e){this.logger.trace("NativeMessageHandler - onChannelMessage called.");var r=e.data,n=this.resolvers.get(r.responseId),o=this.handshakeResolvers.get(r.responseId);try{var i=r.body.method;if(i===qr.Response){if(!n)return;var a=r.body.response;if(this.logger.trace("NativeMessageHandler - Received response from browser extension"),this.logger.tracePii("NativeMessageHandler - Received response from browser extension: "+JSON.stringify(a)),a.status!=="Success")n.reject(Er.createError(a.code,a.description,a.ext));else if(a.result)a.result.code&&a.result.description?n.reject(Er.createError(a.result.code,a.result.description,a.result.ext)):n.resolve(a.result);else throw z.createUnexpectedError("Event does not contain result.");this.resolvers.delete(r.responseId)}else if(i===qr.HandshakeResponse){if(!o)return;clearTimeout(this.timeoutId),window.removeEventListener("message",this.windowListener,!1),this.extensionId=r.extensionId,this.extensionVersion=r.body.version,this.logger.verbose("NativeMessageHandler - Received HandshakeResponse from extension: "+this.extensionId),o.resolve(),this.handshakeResolvers.delete(r.responseId)}}catch(s){this.logger.error("Error parsing response from WAM Extension"),this.logger.errorPii("Error parsing response from WAM Extension: "+s.toString()),this.logger.errorPii("Unable to parse "+e),n?n.reject(s):o&&o.reject(s)}},t.prototype.getExtensionId=function(){return this.extensionId},t.prototype.getExtensionVersion=function(){return this.extensionVersion},t.isNativeAvailable=function(e,r,n,o){if(r.trace("isNativeAvailable called"),!e.system.allowNativeBroker)return r.trace("isNativeAvailable: allowNativeBroker is not enabled, returning false"),!1;if(!n)return r.trace("isNativeAvailable: WAM extension provider is not initialized, returning false"),!1;if(o)switch(o){case le.BEARER:case le.POP:return r.trace("isNativeAvailable: authenticationScheme is supported, returning true"),!0;default:return r.trace("isNativeAvailable: authenticationScheme is not supported, returning false"),!1}return!0},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var nS=function(t){ot(e,t);function e(r,n,o,i,a,s,c,l,u,h){var d=t.call(this,r,n,o,i,a,s,c,u,h)||this;return d.nativeStorage=l,d}return e.prototype.acquireToken=function(r){return S(this,void 0,void 0,function(){var n,o,i,a,s,c,l,u,h,d=this;return T(this,function(f){switch(f.label){case 0:return[4,this.initializeAuthorizationRequest(r,F.Redirect)];case 1:n=f.sent(),this.browserStorage.updateCacheEntries(n.state,n.nonce,n.authority,n.loginHint||_.EMPTY_STRING,n.account||null),o=this.initializeServerTelemetryManager(ye.acquireTokenRedirect),i=function(m){m.persisted&&(d.logger.verbose("Page was restored from back/forward cache. Clearing temporary cache."),d.browserStorage.cleanRequestByState(n.state))},f.label=2;case 2:return f.trys.push([2,7,,8]),[4,this.initializeAuthorizationCodeRequest(n)];case 3:return a=f.sent(),[4,this.createAuthCodeClient(o,n.authority,n.azureCloudOptions)];case 4:return s=f.sent(),this.logger.verbose("Auth code client created"),c=new Lp(s,this.browserStorage,a,this.logger,this.browserCrypto),[4,s.getAuthCodeUrl($($({},n),{nativeBroker:ro.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,r.authenticationScheme)}))];case 5:return l=f.sent(),u=this.getRedirectStartPage(r.redirectStartPage),this.logger.verbosePii("Redirect start page: "+u),window.addEventListener("pageshow",i),[4,c.initiateAuthRequest(l,{navigationClient:this.navigationClient,redirectTimeout:this.config.system.redirectNavigationTimeout,redirectStartPage:u,onRedirectNavigate:r.onRedirectNavigate})];case 6:return[2,f.sent()];case 7:throw h=f.sent(),h instanceof z&&h.setCorrelationId(this.correlationId),window.removeEventListener("pageshow",i),o.cacheFailedRequest(h),this.browserStorage.cleanRequestByState(n.state),h;case 8:return[2]}})})},e.prototype.handleRedirectPromise=function(r){return S(this,void 0,void 0,function(){var n,o,i,a,s,c,l,u,h,d,f,m;return T(this,function(v){switch(v.label){case 0:n=this.initializeServerTelemetryManager(ye.handleRedirectPromise),v.label=1;case 1:if(v.trys.push([1,10,,11]),!this.browserStorage.isInteractionInProgress(!0))return this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null."),[2,null];if(o=this.getRedirectResponseHash(r||window.location.hash),!o)return this.logger.info("handleRedirectPromise did not detect a response hash as a result of a redirect. Cleaning temporary cache."),this.browserStorage.cleanRequestByInteractionType(F.Redirect),[2,null];i=void 0;try{a=oe.getDeserializedHash(o),i=this.validateAndExtractStateFromHash(a,F.Redirect),this.logger.verbose("State extracted from hash")}catch(E){return this.logger.info("handleRedirectPromise was unable to extract state due to: "+E),this.browserStorage.cleanRequestByInteractionType(F.Redirect),[2,null]}return s=this.browserStorage.getTemporaryCache(ae.ORIGIN_URI,!0)||_.EMPTY_STRING,c=oe.removeHashFromUrl(s),l=oe.removeHashFromUrl(window.location.href),c===l&&this.config.auth.navigateToLoginRequestUrl?(this.logger.verbose("Current page is loginRequestUrl, handling hash"),[4,this.handleHash(o,i,n)]):[3,3];case 2:return u=v.sent(),s.indexOf("#")>-1&&Oe.replaceHash(s),[2,u];case 3:return this.config.auth.navigateToLoginRequestUrl?[3,4]:(this.logger.verbose("NavigateToLoginRequestUrl set to false, handling hash"),[2,this.handleHash(o,i,n)]);case 4:return!Oe.isInIframe()||this.config.system.allowRedirectInIframe?(this.browserStorage.setTemporaryCache(ae.URL_HASH,o,!0),h={apiId:ye.handleRedirectPromise,timeout:this.config.system.redirectNavigationTimeout,noHistory:!0},d=!0,!s||s==="null"?(f=Oe.getHomepage(),this.browserStorage.setTemporaryCache(ae.ORIGIN_URI,f,!0),this.logger.warning("Unable to get valid login request url from cache, redirecting to home page"),[4,this.navigationClient.navigateInternal(f,h)]):[3,6]):[3,9];case 5:return d=v.sent(),[3,8];case 6:return this.logger.verbose("Navigating to loginRequestUrl: "+s),[4,this.navigationClient.navigateInternal(s,h)];case 7:d=v.sent(),v.label=8;case 8:if(!d)return[2,this.handleHash(o,i,n)];v.label=9;case 9:return[2,null];case 10:throw m=v.sent(),m instanceof z&&m.setCorrelationId(this.correlationId),n.cacheFailedRequest(m),this.browserStorage.cleanRequestByInteractionType(F.Redirect),m;case 11:return[2]}})})},e.prototype.getRedirectResponseHash=function(r){this.logger.verbose("getRedirectResponseHash called");var n=oe.hashContainsKnownProperties(r);if(n)return Oe.clearHash(window),this.logger.verbose("Hash contains known properties, returning response hash"),r;var o=this.browserStorage.getTemporaryCache(ae.URL_HASH,!0);return this.browserStorage.removeItem(this.browserStorage.generateCacheKey(ae.URL_HASH)),this.logger.verbose("Hash does not contain known properties, returning cached hash"),o},e.prototype.handleHash=function(r,n,o){return S(this,void 0,void 0,function(){var i,a,s,c,l,u,h,d=this;return T(this,function(f){switch(f.label){case 0:if(i=this.browserStorage.getCachedRequest(n,this.browserCrypto),this.logger.verbose("handleHash called, retrieved cached request"),a=oe.getDeserializedHash(r),a.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),!this.nativeMessageHandler)throw N.createNativeConnectionNotEstablishedError();return s=new si(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,ye.acquireTokenPopup,this.performanceClient,this.nativeMessageHandler,a.accountId,this.browserStorage,i.correlationId),c=Wr.parseRequestState(this.browserCrypto,n).userRequestState,[2,s.acquireToken($($({},i),{state:c,prompt:void 0})).finally(function(){d.browserStorage.cleanRequestByState(n)})]}if(l=this.browserStorage.getCachedAuthority(n),!l)throw N.createNoCachedAuthorityError();return[4,this.createAuthCodeClient(o,l)];case 1:return u=f.sent(),this.logger.verbose("Auth code client created"),zc.removeThrottle(this.browserStorage,this.config.auth.clientId,i),h=new Lp(u,this.browserStorage,i,this.logger,this.browserCrypto),[4,h.handleCodeResponseFromHash(r,n,u.authority,this.networkClient)];case 2:return[2,f.sent()]}})})},e.prototype.logout=function(r){return S(this,void 0,void 0,function(){var n,o,i,a,s,c,l;return T(this,function(u){switch(u.label){case 0:this.logger.verbose("logoutRedirect called"),n=this.initializeLogoutRequest(r),o=this.initializeServerTelemetryManager(ye.logout),u.label=1;case 1:return u.trys.push([1,10,,11]),this.eventHandler.emitEvent(q.LOGOUT_START,F.Redirect,r),[4,this.clearCacheOnLogout(n.account)];case 2:return u.sent(),i={apiId:ye.logout,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},[4,this.createAuthCodeClient(o,r&&r.authority)];case 3:return a=u.sent(),this.logger.verbose("Auth code client created"),s=a.getLogoutUri(n),this.eventHandler.emitEvent(q.LOGOUT_SUCCESS,F.Redirect,n),r&&typeof r.onRedirectNavigate=="function"?(c=r.onRedirectNavigate(s),c===!1?[3,5]:(this.logger.verbose("Logout onRedirectNavigate did not return false, navigating"),this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0),[4,this.navigationClient.navigateExternal(s,i)])):[3,7];case 4:return u.sent(),[2];case 5:this.browserStorage.setInteractionInProgress(!1),this.logger.verbose("Logout onRedirectNavigate returned false, stopping navigation"),u.label=6;case 6:return[3,9];case 7:return this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0),[4,this.navigationClient.navigateExternal(s,i)];case 8:return u.sent(),[2];case 9:return[3,11];case 10:throw l=u.sent(),l instanceof z&&l.setCorrelationId(this.correlationId),o.cacheFailedRequest(l),this.eventHandler.emitEvent(q.LOGOUT_FAILURE,F.Redirect,null,l),this.eventHandler.emitEvent(q.LOGOUT_END,F.Redirect),l;case 11:return this.eventHandler.emitEvent(q.LOGOUT_END,F.Redirect),[2]}})})},e.prototype.getRedirectStartPage=function(r){var n=r||window.location.href;return oe.getAbsoluteUrl(n,Oe.getCurrentUri())},e}(Ri);/*! @azure/msal-browser v2.31.0 2022-11-07 */var oS=function(t){ot(e,t);function e(r,n,o,i,a,s,c,l,u,h){var d=t.call(this,r,n,o,i,a,s,c,u,h)||this;return d.unloadWindow=d.unloadWindow.bind(d),d.nativeStorage=l,d}return e.prototype.acquireToken=function(r){try{var n=this.generatePopupName(r.scopes||ts,r.authority||this.config.auth.authority),o=r.popupWindowAttributes||{};if(this.config.system.asyncPopups)return this.logger.verbose("asyncPopups set to true, acquiring token"),this.acquireTokenPopupAsync(r,n,o);this.logger.verbose("asyncPopup set to false, opening popup before acquiring token");var i=this.openSizedPopup("about:blank",n,o);return this.acquireTokenPopupAsync(r,n,o,i)}catch(a){return Promise.reject(a)}},e.prototype.logout=function(r){try{this.logger.verbose("logoutPopup called");var n=this.initializeLogoutRequest(r),o=this.generateLogoutPopupName(n),i=r&&r.authority,a=r&&r.mainWindowRedirectUri,s=(r==null?void 0:r.popupWindowAttributes)||{};if(this.config.system.asyncPopups)return this.logger.verbose("asyncPopups set to true"),this.logoutPopupAsync(n,o,s,i,void 0,a);this.logger.verbose("asyncPopup set to false, opening popup");var c=this.openSizedPopup("about:blank",o,s);return this.logoutPopupAsync(n,o,s,i,c,a)}catch(l){return Promise.reject(l)}},e.prototype.acquireTokenPopupAsync=function(r,n,o,i){return S(this,void 0,void 0,function(){var a,s,c,l,u,h,d,f,m,v,E,g,p,y,w,k,P,M=this;return T(this,function(O){switch(O.label){case 0:return this.logger.verbose("acquireTokenPopupAsync called"),a=this.initializeServerTelemetryManager(ye.acquireTokenPopup),[4,this.initializeAuthorizationRequest(r,F.Popup)];case 1:s=O.sent(),this.browserStorage.updateCacheEntries(s.state,s.nonce,s.authority,s.loginHint||_.EMPTY_STRING,s.account||null),O.label=2;case 2:return O.trys.push([2,8,,9]),[4,this.initializeAuthorizationCodeRequest(s)];case 3:return c=O.sent(),[4,this.createAuthCodeClient(a,s.authority,s.azureCloudOptions)];case 4:return l=O.sent(),this.logger.verbose("Auth code client created"),u=ro.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,r.authenticationScheme),h=void 0,u&&(h=this.performanceClient.startMeasurement(je.FetchAccountIdWithNativeBroker,r.correlationId)),[4,l.getAuthCodeUrl($($({},s),{nativeBroker:u}))];case 5:return d=O.sent(),f=new qh(l,this.browserStorage,c,this.logger),m={popup:i,popupName:n,popupWindowAttributes:o},v=this.initiateAuthRequest(d,m),this.eventHandler.emitEvent(q.POPUP_OPENED,F.Popup,{popupWindow:v},null),[4,this.monitorPopupForHash(v)];case 6:if(E=O.sent(),g=oe.getDeserializedHash(E),p=this.validateAndExtractStateFromHash(g,F.Popup,s.correlationId),zc.removeThrottle(this.browserStorage,this.config.auth.clientId,c),g.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),h&&h.endMeasurement({success:!0,isNativeBroker:!0}),!this.nativeMessageHandler)throw N.createNativeConnectionNotEstablishedError();return y=new si(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,ye.acquireTokenPopup,this.performanceClient,this.nativeMessageHandler,g.accountId,this.nativeStorage,s.correlationId),w=Wr.parseRequestState(this.browserCrypto,p).userRequestState,[2,y.acquireToken($($({},s),{state:w,prompt:void 0})).finally(function(){M.browserStorage.cleanRequestByState(p)})]}return[4,f.handleCodeResponseFromHash(E,p,l.authority,this.networkClient)];case 7:return k=O.sent(),[2,k];case 8:throw P=O.sent(),i&&i.close(),P instanceof z&&P.setCorrelationId(this.correlationId),a.cacheFailedRequest(P),this.browserStorage.cleanRequestByState(s.state),P;case 9:return[2]}})})},e.prototype.logoutPopupAsync=function(r,n,o,i,a,s){return S(this,void 0,void 0,function(){var c,l,u,h,d,f,m;return T(this,function(v){switch(v.label){case 0:this.logger.verbose("logoutPopupAsync called"),this.eventHandler.emitEvent(q.LOGOUT_START,F.Popup,r),c=this.initializeServerTelemetryManager(ye.logoutPopup),v.label=1;case 1:return v.trys.push([1,5,,6]),[4,this.clearCacheOnLogout(r.account)];case 2:return v.sent(),[4,this.createAuthCodeClient(c,i)];case 3:return l=v.sent(),this.logger.verbose("Auth code client created"),u=l.getLogoutUri(r),this.eventHandler.emitEvent(q.LOGOUT_SUCCESS,F.Popup,r),h=this.openPopup(u,{popupName:n,popupWindowAttributes:o,popup:a}),this.eventHandler.emitEvent(q.POPUP_OPENED,F.Popup,{popupWindow:h},null),[4,this.waitForLogoutPopup(h)];case 4:return v.sent(),s?(d={apiId:ye.logoutPopup,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},f=oe.getAbsoluteUrl(s,Oe.getCurrentUri()),this.logger.verbose("Redirecting main window to url specified in the request"),this.logger.verbosePii("Redirecting main window to: "+f),this.navigationClient.navigateInternal(f,d)):this.logger.verbose("No main window navigation requested"),[3,6];case 5:throw m=v.sent(),a&&a.close(),m instanceof z&&m.setCorrelationId(this.correlationId),this.browserStorage.setInteractionInProgress(!1),this.eventHandler.emitEvent(q.LOGOUT_FAILURE,F.Popup,null,m),this.eventHandler.emitEvent(q.LOGOUT_END,F.Popup),c.cacheFailedRequest(m),m;case 6:return this.eventHandler.emitEvent(q.LOGOUT_END,F.Popup),[2]}})})},e.prototype.initiateAuthRequest=function(r,n){if(x.isEmpty(r))throw this.logger.error("Navigate url is empty"),N.createEmptyNavigationUriError();return this.logger.infoPii("Navigate to: "+r),this.openPopup(r,n)},e.prototype.monitorPopupForHash=function(r){var n=this;return new Promise(function(o,i){var a=n.config.system.windowHashTimeout/n.config.system.pollIntervalMilliseconds,s=0;n.logger.verbose("PopupHandler.monitorPopupForHash - polling started");var c=setInterval(function(){if(r.closed){n.logger.error("PopupHandler.monitorPopupForHash - window closed"),n.cleanPopup(),clearInterval(c),i(N.createUserCancelledError());return}var l=_.EMPTY_STRING,u=_.EMPTY_STRING;try{l=r.location.href,u=r.location.hash}catch{}x.isEmpty(l)||l==="about:blank"||(n.logger.verbose("PopupHandler.monitorPopupForHash - popup window is on same origin as caller"),s++,u?(n.logger.verbose("PopupHandler.monitorPopupForHash - found hash in url"),clearInterval(c),n.cleanPopup(r),oe.hashContainsKnownProperties(u)?(n.logger.verbose("PopupHandler.monitorPopupForHash - hash contains known properties, returning."),o(u)):(n.logger.error("PopupHandler.monitorPopupForHash - found hash in url but it does not contain known properties. Check that your router is not changing the hash prematurely."),n.logger.errorPii("PopupHandler.monitorPopupForHash - hash found: "+u),i(N.createHashDoesNotContainKnownPropertiesError()))):s>a&&(n.logger.error("PopupHandler.monitorPopupForHash - unable to find hash in url, timing out"),clearInterval(c),i(N.createMonitorPopupTimeoutError())))},n.config.system.pollIntervalMilliseconds)})},e.prototype.waitForLogoutPopup=function(r){var n=this;return new Promise(function(o){n.logger.verbose("PopupHandler.waitForLogoutPopup - polling started");var i=setInterval(function(){r.closed&&(n.logger.error("PopupHandler.waitForLogoutPopup - window closed"),n.cleanPopup(),clearInterval(i),o());var a=_.EMPTY_STRING;try{a=r.location.href}catch{}x.isEmpty(a)||a==="about:blank"||(n.logger.verbose("PopupHandler.waitForLogoutPopup - popup window is on same origin as caller, closing."),clearInterval(i),n.cleanPopup(r),o())},n.config.system.pollIntervalMilliseconds)})},e.prototype.openPopup=function(r,n){try{var o=void 0;if(n.popup?(o=n.popup,this.logger.verbosePii("Navigating popup window to: "+r),o.location.assign(r)):typeof n.popup>"u"&&(this.logger.verbosePii("Opening popup window to: "+r),o=this.openSizedPopup(r,n.popupName,n.popupWindowAttributes)),!o)throw N.createEmptyWindowCreatedError();return o.focus&&o.focus(),this.currentWindow=o,window.addEventListener("beforeunload",this.unloadWindow),o}catch(i){throw this.logger.error("error opening popup "+i.message),this.browserStorage.setInteractionInProgress(!1),N.createPopupWindowError(i.toString())}},e.prototype.openSizedPopup=function(r,n,o){var i,a,s,c,l=window.screenLeft?window.screenLeft:window.screenX,u=window.screenTop?window.screenTop:window.screenY,h=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,d=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,f=(i=o.popupSize)===null||i===void 0?void 0:i.width,m=(a=o.popupSize)===null||a===void 0?void 0:a.height,v=(s=o.popupPosition)===null||s===void 0?void 0:s.top,E=(c=o.popupPosition)===null||c===void 0?void 0:c.left;return(!f||f<0||f>h)&&(this.logger.verbose("Default popup window width used. Window width not configured or invalid."),f=cr.POPUP_WIDTH),(!m||m<0||m>d)&&(this.logger.verbose("Default popup window height used. Window height not configured or invalid."),m=cr.POPUP_HEIGHT),(!v||v<0||v>d)&&(this.logger.verbose("Default popup window top position used. Window top not configured or invalid."),v=Math.max(0,d/2-cr.POPUP_HEIGHT/2+u)),(!E||E<0||E>h)&&(this.logger.verbose("Default popup window left position used. Window left not configured or invalid."),E=Math.max(0,h/2-cr.POPUP_WIDTH/2+l)),window.open(r,n,"width="+f+", height="+m+", top="+v+", left="+E+", scrollbars=yes")},e.prototype.unloadWindow=function(r){this.browserStorage.cleanRequestByInteractionType(F.Popup),this.currentWindow&&this.currentWindow.close(),r.preventDefault()},e.prototype.cleanPopup=function(r){r&&r.close(),window.removeEventListener("beforeunload",this.unloadWindow),this.browserStorage.setInteractionInProgress(!1)},e.prototype.generatePopupName=function(r,n){return cr.POPUP_NAME_PREFIX+"."+this.config.auth.clientId+"."+r.join("-")+"."+n+"."+this.correlationId},e.prototype.generateLogoutPopupName=function(r){var n=r.account&&r.account.homeAccountId;return cr.POPUP_NAME_PREFIX+"."+this.config.auth.clientId+"."+n+"."+this.correlationId},e}(Ri);/*! @azure/msal-browser v2.31.0 2022-11-07 */var iS=function(){function t(){}return t.prototype.navigateInternal=function(e,r){return t.defaultNavigateWindow(e,r)},t.prototype.navigateExternal=function(e,r){return t.defaultNavigateWindow(e,r)},t.defaultNavigateWindow=function(e,r){return r.noHistory?window.location.replace(e):window.location.assign(e),new Promise(function(n){setTimeout(function(){n(!0)},r.timeout)})},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var aS=6e4,Pd=6e3,sS=3e4,cS=2e3;function lS(t,e){var r=t.auth,n=t.cache,o=t.system,i=t.telemetry,a={clientId:_.EMPTY_STRING,authority:""+_.DEFAULT_AUTHORITY,knownAuthorities:[],cloudDiscoveryMetadata:_.EMPTY_STRING,authorityMetadata:_.EMPTY_STRING,redirectUri:_.EMPTY_STRING,postLogoutRedirectUri:_.EMPTY_STRING,navigateToLoginRequestUrl:!0,clientCapabilities:[],protocolMode:qc.AAD,azureCloudOptions:{azureCloudInstance:$a.None,tenant:_.EMPTY_STRING},skipAuthorityMetadataCache:!1},s={cacheLocation:pt.SessionStorage,storeAuthStateInCookie:!1,secureCookies:!1},c={loggerCallback:function(){},logLevel:xe.Info,piiLoggingEnabled:!1},l=$($({},Ty),{loggerOptions:c,networkClient:e?Oe.getBrowserNetworkClient():VC,navigationClient:new iS,loadFrameTimeout:0,windowHashTimeout:(o==null?void 0:o.loadFrameTimeout)||aS,iframeHashTimeout:(o==null?void 0:o.loadFrameTimeout)||Pd,navigateFrameWait:e&&Oe.detectIEOrEdge()?500:0,redirectNavigationTimeout:sS,asyncPopups:!1,allowRedirectInIframe:!1,allowNativeBroker:!1,nativeBrokerHandshakeTimeout:(o==null?void 0:o.nativeBrokerHandshakeTimeout)||cS,pollIntervalMilliseconds:cr.DEFAULT_POLL_INTERVAL_MS,cryptoOptions:{useMsrCrypto:!1,entropy:void 0}}),u={application:{appName:_.EMPTY_STRING,appVersion:_.EMPTY_STRING}},h={auth:$($({},a),r),cache:$($({},s),n),system:$($({},l),o),telemetry:$($({},u),i)};return h}/*! @azure/msal-browser v2.31.0 2022-11-07 */var Oy=function(t){ot(e,t);function e(r,n,o,i,a){var s=t.call(this,r,n,o,i)||this;return s.navigateFrameWait=a.navigateFrameWait,s.pollIntervalMilliseconds=a.pollIntervalMilliseconds,s}return e.prototype.initiateAuthRequest=function(r){return S(this,void 0,void 0,function(){var n;return T(this,function(o){switch(o.label){case 0:if(x.isEmpty(r))throw this.logger.info("Navigate url is empty"),N.createEmptyNavigationUriError();return this.navigateFrameWait?[4,this.loadFrame(r)]:[3,2];case 1:return n=o.sent(),[3,3];case 2:n=this.loadFrameSync(r),o.label=3;case 3:return[2,n]}})})},e.prototype.monitorIframeForHash=function(r,n){var o=this;return new Promise(function(i,a){n<Pd&&o.logger.warning("system.loadFrameTimeout or system.iframeHashTimeout set to lower ("+n+"ms) than the default ("+Pd+"ms). This may result in timeouts.");var s=window.performance.now(),c=s+n,l=setInterval(function(){if(window.performance.now()>c){o.removeHiddenIframe(r),clearInterval(l),a(N.createMonitorIframeTimeoutError());return}var u=_.EMPTY_STRING,h=r.contentWindow;try{u=h?h.location.href:_.EMPTY_STRING}catch{}if(!x.isEmpty(u)){var d=h?h.location.hash:_.EMPTY_STRING;if(oe.hashContainsKnownProperties(d)){o.removeHiddenIframe(r),clearInterval(l),i(d);return}}},o.pollIntervalMilliseconds)})},e.prototype.loadFrame=function(r){var n=this;return new Promise(function(o,i){var a=n.createHiddenIframe();setTimeout(function(){if(!a){i("Unable to load iframe");return}a.src=r,o(a)},n.navigateFrameWait)})},e.prototype.loadFrameSync=function(r){var n=this.createHiddenIframe();return n.src=r,n},e.prototype.createHiddenIframe=function(){var r=document.createElement("iframe");return r.style.visibility="hidden",r.style.position="absolute",r.style.width=r.style.height="0",r.style.border="0",r.setAttribute("sandbox","allow-scripts allow-same-origin allow-forms"),document.getElementsByTagName("body")[0].appendChild(r),r},e.prototype.removeHiddenIframe=function(r){document.body===r.parentNode&&document.body.removeChild(r)},e}(qh);/*! @azure/msal-browser v2.31.0 2022-11-07 */var uS=function(t){ot(e,t);function e(r,n,o,i,a,s,c,l,u,h,d){var f=t.call(this,r,n,o,i,a,s,l,h,d)||this;return f.apiId=c,f.nativeStorage=u,f}return e.prototype.acquireToken=function(r){return S(this,void 0,void 0,function(){var n,o,i,a,s;return T(this,function(c){switch(c.label){case 0:if(this.logger.verbose("acquireTokenByIframe called"),n=this.performanceClient.startMeasurement(je.SilentIframeClientAcquireToken,r.correlationId),x.isEmpty(r.loginHint)&&x.isEmpty(r.sid)&&(!r.account||x.isEmpty(r.account.username))&&this.logger.warning("No user hint provided. The authorization server may need more information to complete this request."),r.prompt&&r.prompt!==mt.NONE&&r.prompt!==mt.NO_SESSION)throw n.endMeasurement({success:!1}),N.createSilentPromptValueError(r.prompt);return[4,this.initializeAuthorizationRequest($($({},r),{prompt:r.prompt||mt.NONE}),F.Silent)];case 1:o=c.sent(),this.browserStorage.updateCacheEntries(o.state,o.nonce,o.authority,o.loginHint||_.EMPTY_STRING,o.account||null),i=this.initializeServerTelemetryManager(this.apiId),c.label=2;case 2:return c.trys.push([2,5,,6]),[4,this.createAuthCodeClient(i,o.authority,o.azureCloudOptions)];case 3:return a=c.sent(),this.logger.verbose("Auth code client created"),[4,this.silentTokenHelper(a,o).then(function(l){return n.endMeasurement({success:!0,fromCache:!1,requestId:l.requestId}),l})];case 4:return[2,c.sent()];case 5:throw s=c.sent(),s instanceof z&&s.setCorrelationId(this.correlationId),i.cacheFailedRequest(s),this.browserStorage.cleanRequestByState(o.state),n.endMeasurement({errorCode:s instanceof z&&s.errorCode||void 0,subErrorCode:s instanceof z&&s.subError||void 0,success:!1}),s;case 6:return[2]}})})},e.prototype.logout=function(){return Promise.reject(N.createSilentLogoutUnsupportedError())},e.prototype.silentTokenHelper=function(r,n){return S(this,void 0,void 0,function(){var o,i,a,s,c,l,u,h,d,f=this;return T(this,function(m){switch(m.label){case 0:return[4,this.initializeAuthorizationCodeRequest(n)];case 1:return o=m.sent(),[4,r.getAuthCodeUrl($($({},n),{nativeBroker:ro.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,n.authenticationScheme)}))];case 2:return i=m.sent(),a=new Oy(r,this.browserStorage,o,this.logger,this.config.system),[4,a.initiateAuthRequest(i)];case 3:return s=m.sent(),[4,a.monitorIframeForHash(s,this.config.system.iframeHashTimeout)];case 4:if(c=m.sent(),l=oe.getDeserializedHash(c),u=this.validateAndExtractStateFromHash(l,F.Silent,o.correlationId),l.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),!this.nativeMessageHandler)throw N.createNativeConnectionNotEstablishedError();return h=new si(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.apiId,this.performanceClient,this.nativeMessageHandler,l.accountId,this.browserStorage,this.correlationId),d=Wr.parseRequestState(this.browserCrypto,u).userRequestState,[2,h.acquireToken($($({},n),{state:d,prompt:n.prompt||mt.NONE})).finally(function(){f.browserStorage.cleanRequestByState(u)})]}return[2,a.handleCodeResponseFromHash(c,u,r.authority,this.networkClient)]}})})},e}(Ri);/*! @azure/msal-browser v2.31.0 2022-11-07 */var dS=function(t){ot(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.acquireToken=function(r){return S(this,void 0,void 0,function(){var n,o,i,a,s,c=this;return T(this,function(l){switch(l.label){case 0:return o=[$({},r)],[4,this.initializeBaseRequest(r)];case 1:return n=$.apply(void 0,o.concat([l.sent()])),i=this.performanceClient.startMeasurement(je.SilentRefreshClientAcquireToken,n.correlationId),a=this.initializeServerTelemetryManager(ye.acquireTokenSilent_silentFlow),[4,this.createRefreshTokenClient(a,n.authority,n.azureCloudOptions)];case 2:return s=l.sent(),this.logger.verbose("Refresh token client created"),[2,s.acquireTokenByRefreshToken(n).then(function(u){return i.endMeasurement({success:!0,fromCache:u.fromCache,requestId:u.requestId}),u}).catch(function(u){throw u instanceof z&&u.setCorrelationId(c.correlationId),a.cacheFailedRequest(u),i.endMeasurement({errorCode:u.errorCode,subErrorCode:u.subError,success:!1}),u})]}})})},e.prototype.logout=function(){return Promise.reject(N.createSilentLogoutUnsupportedError())},e.prototype.createRefreshTokenClient=function(r,n,o){return S(this,void 0,void 0,function(){var i;return T(this,function(a){switch(a.label){case 0:return[4,this.getClientConfiguration(r,n,o)];case 1:return i=a.sent(),[2,new Iy(i,this.performanceClient)]}})})},e}(Ri);/*! @azure/msal-browser v2.31.0 2022-11-07 */var hS=function(){function t(e,r){this.eventCallbacks=new Map,this.logger=e,this.browserCrypto=r,this.listeningToStorageEvents=!1,this.handleAccountCacheChange=this.handleAccountCacheChange.bind(this)}return t.prototype.addEventCallback=function(e){if(typeof window<"u"){var r=this.browserCrypto.createNewGuid();return this.eventCallbacks.set(r,e),this.logger.verbose("Event callback registered with id: "+r),r}return null},t.prototype.removeEventCallback=function(e){this.eventCallbacks.delete(e),this.logger.verbose("Event callback "+e+" removed.")},t.prototype.enableAccountStorageEvents=function(){typeof window>"u"||(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)))},t.prototype.disableAccountStorageEvents=function(){typeof window>"u"||(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."))},t.prototype.emitEvent=function(e,r,n,o){var i=this;if(typeof window<"u"){var a={eventType:e,interactionType:r||null,payload:n||null,error:o||null,timestamp:Date.now()};this.logger.info("Emitting event: "+e),this.eventCallbacks.forEach(function(s,c){i.logger.verbose("Emitting event to callback "+c+": "+e),s.apply(null,[a])})}},t.prototype.handleAccountCacheChange=function(e){try{var r=e.newValue||e.oldValue;if(!r)return;var n=JSON.parse(r);if(typeof n!="object"||!tt.isAccountEntity(n))return;var o=or.toObject(new tt,n),i=o.getAccountInfo();!e.oldValue&&e.newValue?(this.logger.info("Account was added to cache in a different window"),this.emitEvent(q.ACCOUNT_ADDED,void 0,i)):!e.newValue&&e.oldValue&&(this.logger.info("Account was removed from cache in a different window"),this.emitEvent(q.ACCOUNT_REMOVED,void 0,i))}catch{return}},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var ut=function(){function t(){}return t.decimalToHex=function(e){for(var r=e.toString(16);r.length<2;)r="0"+r;return r},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var xy=function(){function t(e){this.cryptoObj=e}return t.prototype.generateGuid=function(){try{var e=new Uint8Array(16);return this.cryptoObj.getRandomValues(e),e[6]|=64,e[6]&=79,e[8]|=128,e[8]&=191,ut.decimalToHex(e[0])+ut.decimalToHex(e[1])+ut.decimalToHex(e[2])+ut.decimalToHex(e[3])+"-"+ut.decimalToHex(e[4])+ut.decimalToHex(e[5])+"-"+ut.decimalToHex(e[6])+ut.decimalToHex(e[7])+"-"+ut.decimalToHex(e[8])+ut.decimalToHex(e[9])+"-"+ut.decimalToHex(e[10])+ut.decimalToHex(e[11])+ut.decimalToHex(e[12])+ut.decimalToHex(e[13])+ut.decimalToHex(e[14])+ut.decimalToHex(e[15])}catch{for(var r="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx",n="0123456789abcdef",o=0,i=_.EMPTY_STRING,a=0;a<36;a++)r[a]!=="-"&&r[a]!=="4"&&(o=Math.random()*16|0),r[a]==="x"?i+=n[o]:r[a]==="y"?(o&=3,o|=8,i+=n[o]):i+=r[a];return i}},t.prototype.isGuid=function(e){var r=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;return r.test(e)},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var Yr=function(){function t(){}return t.stringToUtf8Arr=function(e){for(var r,n=0,o=e.length,i=0;i<o;i++)r=e.charCodeAt(i),n+=r<128?1:r<2048?2:r<65536?3:r<2097152?4:r<67108864?5:6;for(var a=new Uint8Array(n),s=0,c=0;s<n;c++)r=e.charCodeAt(c),r<128?a[s++]=r:r<2048?(a[s++]=192+(r>>>6),a[s++]=128+(r&63)):r<65536?(a[s++]=224+(r>>>12),a[s++]=128+(r>>>6&63),a[s++]=128+(r&63)):r<2097152?(a[s++]=240+(r>>>18),a[s++]=128+(r>>>12&63),a[s++]=128+(r>>>6&63),a[s++]=128+(r&63)):r<67108864?(a[s++]=248+(r>>>24),a[s++]=128+(r>>>18&63),a[s++]=128+(r>>>12&63),a[s++]=128+(r>>>6&63),a[s++]=128+(r&63)):(a[s++]=252+(r>>>30),a[s++]=128+(r>>>24&63),a[s++]=128+(r>>>18&63),a[s++]=128+(r>>>12&63),a[s++]=128+(r>>>6&63),a[s++]=128+(r&63));return a},t.stringToArrayBuffer=function(e){for(var r=new ArrayBuffer(e.length),n=new Uint8Array(r),o=0;o<e.length;o++)n[o]=e.charCodeAt(o);return r},t.utf8ArrToString=function(e){for(var r=_.EMPTY_STRING,n=void 0,o=e.length,i=0;i<o;i++)n=e[i],r+=String.fromCharCode(n>251&&n<254&&i+5<o?(n-252)*1073741824+(e[++i]-128<<24)+(e[++i]-128<<18)+(e[++i]-128<<12)+(e[++i]-128<<6)+e[++i]-128:n>247&&n<252&&i+4<o?(n-248<<24)+(e[++i]-128<<18)+(e[++i]-128<<12)+(e[++i]-128<<6)+e[++i]-128:n>239&&n<248&&i+3<o?(n-240<<18)+(e[++i]-128<<12)+(e[++i]-128<<6)+e[++i]-128:n>223&&n<240&&i+2<o?(n-224<<12)+(e[++i]-128<<6)+e[++i]-128:n>191&&n<224&&i+1<o?(n-192<<6)+e[++i]-128:n);return r},t.getSortedObjectString=function(e){return JSON.stringify(e,Object.keys(e).sort())},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var My=function(){function t(){}return t.prototype.urlEncode=function(e){return encodeURIComponent(this.encode(e).replace(/=/g,_.EMPTY_STRING).replace(/\+/g,"-").replace(/\//g,"_"))},t.prototype.urlEncodeArr=function(e){return this.base64EncArr(e).replace(/=/g,_.EMPTY_STRING).replace(/\+/g,"-").replace(/\//g,"_")},t.prototype.encode=function(e){var r=Yr.stringToUtf8Arr(e);return this.base64EncArr(r)},t.prototype.base64EncArr=function(e){for(var r=(3-e.length%3)%3,n=_.EMPTY_STRING,o=void 0,i=e.length,a=0,s=0;s<i;s++)o=s%3,a|=e[s]<<(16>>>o&24),(o===2||e.length-s===1)&&(n+=String.fromCharCode(this.uint6ToB64(a>>>18&63),this.uint6ToB64(a>>>12&63),this.uint6ToB64(a>>>6&63),this.uint6ToB64(a&63)),a=0);return r===0?n:n.substring(0,n.length-r)+(r===1?"=":"==")},t.prototype.uint6ToB64=function(e){return e<26?e+65:e<52?e+71:e<62?e-4:e===62?43:e===63?47:65},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var fS=function(){function t(){}return t.prototype.decode=function(e){var r=e.replace(/-/g,"+").replace(/_/g,"/");switch(r.length%4){case 0:break;case 2:r+="==";break;case 3:r+="=";break;default:throw new Error("Invalid base64 string")}var n=this.base64DecToArr(r);return Yr.utf8ArrToString(n)},t.prototype.base64DecToArr=function(e,r){for(var n=e.replace(/[^A-Za-z0-9\+\/]/g,_.EMPTY_STRING),o=n.length,i=r?Math.ceil((o*3+1>>>2)/r)*r:o*3+1>>>2,a=new Uint8Array(i),s=void 0,c=void 0,l=0,u=0,h=0;h<o;h++)if(c=h&3,l|=this.b64ToUint6(n.charCodeAt(h))<<18-6*c,c===3||o-h===1){for(s=0;s<3&&u<i;s++,u++)a[u]=l>>>(16>>>s&24)&255;l=0}return a},t.prototype.b64ToUint6=function(e){return e>64&&e<91?e-65:e>96&&e<123?e-71:e>47&&e<58?e+4:e===43?62:e===47?63:0},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var pS=32,gS=function(){function t(e){this.base64Encode=new My,this.cryptoObj=e}return t.prototype.generateCodes=function(){return S(this,void 0,void 0,function(){var e,r;return T(this,function(n){switch(n.label){case 0:return e=this.generateCodeVerifier(),[4,this.generateCodeChallengeFromVerifier(e)];case 1:return r=n.sent(),[2,{verifier:e,challenge:r}]}})})},t.prototype.generateCodeVerifier=function(){try{var e=new Uint8Array(pS);this.cryptoObj.getRandomValues(e);var r=this.base64Encode.urlEncodeArr(e);return r}catch(n){throw N.createPkceNotGeneratedError(n)}},t.prototype.generateCodeChallengeFromVerifier=function(e){return S(this,void 0,void 0,function(){var r,n;return T(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,this.cryptoObj.sha256Digest(e)];case 1:return r=o.sent(),[2,this.base64Encode.urlEncodeArr(new Uint8Array(r))];case 2:throw n=o.sent(),N.createPkceNotGeneratedError(n);case 3:return[2]}})})},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var mS=function(){function t(){}return t.prototype.getRandomValues=function(e){return window.crypto.getRandomValues(e)},t.prototype.generateKey=function(e,r,n){return S(this,void 0,void 0,function(){return T(this,function(o){return[2,window.crypto.subtle.generateKey(e,r,n)]})})},t.prototype.exportKey=function(e){return S(this,void 0,void 0,function(){return T(this,function(r){return[2,window.crypto.subtle.exportKey(yi,e)]})})},t.prototype.importKey=function(e,r,n,o){return S(this,void 0,void 0,function(){return T(this,function(i){return[2,window.crypto.subtle.importKey(yi,e,r,n,o)]})})},t.prototype.sign=function(e,r,n){return S(this,void 0,void 0,function(){return T(this,function(o){return[2,window.crypto.subtle.sign(e,r,n)]})})},t.prototype.digest=function(e,r){return S(this,void 0,void 0,function(){return T(this,function(n){return[2,window.crypto.subtle.digest(e,r)]})})},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var vS=function(){function t(){}return t.prototype.initPrng=function(e){return window.msrCrypto.initPrng(zh(e))},t.prototype.getRandomValues=function(e){return window.msrCrypto.getRandomValues(e)},t.prototype.generateKey=function(e,r,n){return S(this,void 0,void 0,function(){return T(this,function(o){return[2,window.msrCrypto.subtle.generateKey(e,r,n)]})})},t.prototype.exportKey=function(e){return S(this,void 0,void 0,function(){return T(this,function(r){return[2,window.msrCrypto.subtle.exportKey(yi,e)]})})},t.prototype.importKey=function(e,r,n,o){return S(this,void 0,void 0,function(){return T(this,function(i){return[2,window.msrCrypto.subtle.importKey(yi,e,r,n,o)]})})},t.prototype.sign=function(e,r,n){return S(this,void 0,void 0,function(){return T(this,function(o){return[2,window.msrCrypto.subtle.sign(e,r,n)]})})},t.prototype.digest=function(e,r){return S(this,void 0,void 0,function(){return T(this,function(n){return[2,window.msrCrypto.subtle.digest(e,r)]})})},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var yS=function(){function t(){}return t.prototype.getRandomValues=function(e){return window.msCrypto.getRandomValues(e)},t.prototype.generateKey=function(e,r,n){return S(this,void 0,void 0,function(){return T(this,function(o){return[2,new Promise(function(i,a){var s=window.msCrypto.subtle.generateKey(e,r,n);s.addEventListener("complete",function(c){i(c.target.result)}),s.addEventListener("error",function(c){a(c)})})]})})},t.prototype.exportKey=function(e){return S(this,void 0,void 0,function(){return T(this,function(r){return[2,new Promise(function(n,o){var i=window.msCrypto.subtle.exportKey(yi,e);i.addEventListener("complete",function(a){var s=a.target.result,c=Yr.utf8ArrToString(new Uint8Array(s)).replace(/\r/g,_.EMPTY_STRING).replace(/\n/g,_.EMPTY_STRING).replace(/\t/g,_.EMPTY_STRING).split(" ").join(_.EMPTY_STRING).replace("\0",_.EMPTY_STRING);try{n(JSON.parse(c))}catch(l){o(l)}}),i.addEventListener("error",function(a){o(a)})})]})})},t.prototype.importKey=function(e,r,n,o){return S(this,void 0,void 0,function(){var i,a;return T(this,function(s){return i=Yr.getSortedObjectString(e),a=Yr.stringToArrayBuffer(i),[2,new Promise(function(c,l){var u=window.msCrypto.subtle.importKey(yi,a,r,n,o);u.addEventListener("complete",function(h){c(h.target.result)}),u.addEventListener("error",function(h){l(h)})})]})})},t.prototype.sign=function(e,r,n){return S(this,void 0,void 0,function(){return T(this,function(o){return[2,new Promise(function(i,a){var s=window.msCrypto.subtle.sign(e,r,n);s.addEventListener("complete",function(c){i(c.target.result)}),s.addEventListener("error",function(c){a(c)})})]})})},t.prototype.digest=function(e,r){return S(this,void 0,void 0,function(){return T(this,function(n){return[2,new Promise(function(o,i){var a=window.msCrypto.subtle.digest(e,r.buffer);a.addEventListener("complete",function(s){o(s.target.result)}),a.addEventListener("error",function(s){i(s)})})]})})},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var _S="RSASSA-PKCS1-v1_5",Dp="SHA-256",wS=2048,ES=new Uint8Array([1,0,1]),Uy=function(){function t(e,r){var n,o;if(this.logger=e,this.cryptoOptions=r,this.hasBrowserCrypto())this.logger.verbose("BrowserCrypto: modern crypto interface available"),this.subtleCrypto=new mS;else if(this.hasIECrypto())this.logger.verbose("BrowserCrypto: MS crypto interface available"),this.subtleCrypto=new yS;else if(this.hasMsrCrypto()&&((n=this.cryptoOptions)===null||n===void 0?void 0:n.useMsrCrypto))this.logger.verbose("BrowserCrypto: MSR crypto interface available"),this.subtleCrypto=new vS;else throw this.hasMsrCrypto()&&this.logger.info("BrowserCrypto: MSR Crypto interface available but system.cryptoOptions.useMsrCrypto not enabled"),this.logger.error("BrowserCrypto: No crypto interfaces available."),N.createCryptoNotAvailableError("Browser crypto, msCrypto, or msrCrypto interfaces not available.");if(this.subtleCrypto.initPrng){if(this.logger.verbose("BrowserCrypto: Interface requires entropy"),!(!((o=this.cryptoOptions)===null||o===void 0)&&o.entropy))throw this.logger.error("BrowserCrypto: Interface requires entropy but none provided."),Wc.createEntropyNotProvided();this.logger.verbose("BrowserCrypto: Entropy provided"),this.subtleCrypto.initPrng(this.cryptoOptions.entropy)}this.keygenAlgorithmOptions={name:_S,hash:Dp,modulusLength:wS,publicExponent:ES}}return t.prototype.hasIECrypto=function(){return"msCrypto"in window},t.prototype.hasBrowserCrypto=function(){return"crypto"in window},t.prototype.hasMsrCrypto=function(){return"msrCrypto"in window},t.prototype.sha256Digest=function(e){return S(this,void 0,void 0,function(){var r;return T(this,function(n){return r=Yr.stringToUtf8Arr(e),[2,this.subtleCrypto.digest({name:Dp},r)]})})},t.prototype.getRandomValues=function(e){return this.subtleCrypto.getRandomValues(e)},t.prototype.generateKeyPair=function(e,r){return S(this,void 0,void 0,function(){return T(this,function(n){return[2,this.subtleCrypto.generateKey(this.keygenAlgorithmOptions,e,r)]})})},t.prototype.exportJwk=function(e){return S(this,void 0,void 0,function(){return T(this,function(r){return[2,this.subtleCrypto.exportKey(e)]})})},t.prototype.importJwk=function(e,r,n){return S(this,void 0,void 0,function(){return T(this,function(o){return[2,this.subtleCrypto.importKey(e,this.keygenAlgorithmOptions,r,n)]})})},t.prototype.sign=function(e,r){return S(this,void 0,void 0,function(){return T(this,function(n){return[2,this.subtleCrypto.sign(this.keygenAlgorithmOptions,e,r)]})})},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var CS=function(){function t(){this.dbName=kd,this.version=XC,this.tableName=ZC,this.dbOpen=!1}return t.prototype.open=function(){return S(this,void 0,void 0,function(){var e=this;return T(this,function(r){return[2,new Promise(function(n,o){var i=window.indexedDB.open(e.dbName,e.version);i.addEventListener("upgradeneeded",function(a){var s=a;s.target.result.createObjectStore(e.tableName)}),i.addEventListener("success",function(a){var s=a;e.db=s.target.result,e.dbOpen=!0,n()}),i.addEventListener("error",function(){return o(N.createDatabaseUnavailableError())})})]})})},t.prototype.closeConnection=function(){var e=this.db;e&&this.dbOpen&&(e.close(),this.dbOpen=!1)},t.prototype.validateDbIsOpen=function(){return S(this,void 0,void 0,function(){return T(this,function(e){switch(e.label){case 0:return this.dbOpen?[3,2]:[4,this.open()];case 1:return[2,e.sent()];case 2:return[2]}})})},t.prototype.getItem=function(e){return S(this,void 0,void 0,function(){var r=this;return T(this,function(n){switch(n.label){case 0:return[4,this.validateDbIsOpen()];case 1:return n.sent(),[2,new Promise(function(o,i){if(!r.db)return i(N.createDatabaseNotOpenError());var a=r.db.transaction([r.tableName],"readonly"),s=a.objectStore(r.tableName),c=s.get(e);c.addEventListener("success",function(l){var u=l;r.closeConnection(),o(u.target.result)}),c.addEventListener("error",function(l){r.closeConnection(),i(l)})})]}})})},t.prototype.setItem=function(e,r){return S(this,void 0,void 0,function(){var n=this;return T(this,function(o){switch(o.label){case 0:return[4,this.validateDbIsOpen()];case 1:return o.sent(),[2,new Promise(function(i,a){if(!n.db)return a(N.createDatabaseNotOpenError());var s=n.db.transaction([n.tableName],"readwrite"),c=s.objectStore(n.tableName),l=c.put(r,e);l.addEventListener("success",function(){n.closeConnection(),i()}),l.addEventListener("error",function(u){n.closeConnection(),a(u)})})]}})})},t.prototype.removeItem=function(e){return S(this,void 0,void 0,function(){var r=this;return T(this,function(n){switch(n.label){case 0:return[4,this.validateDbIsOpen()];case 1:return n.sent(),[2,new Promise(function(o,i){if(!r.db)return i(N.createDatabaseNotOpenError());var a=r.db.transaction([r.tableName],"readwrite"),s=a.objectStore(r.tableName),c=s.delete(e);c.addEventListener("success",function(){r.closeConnection(),o()}),c.addEventListener("error",function(l){r.closeConnection(),i(l)})})]}})})},t.prototype.getKeys=function(){return S(this,void 0,void 0,function(){var e=this;return T(this,function(r){switch(r.label){case 0:return[4,this.validateDbIsOpen()];case 1:return r.sent(),[2,new Promise(function(n,o){if(!e.db)return o(N.createDatabaseNotOpenError());var i=e.db.transaction([e.tableName],"readonly"),a=i.objectStore(e.tableName),s=a.getAllKeys();s.addEventListener("success",function(c){var l=c;e.closeConnection(),n(l.target.result)}),s.addEventListener("error",function(c){e.closeConnection(),o(c)})})]}})})},t.prototype.containsKey=function(e){return S(this,void 0,void 0,function(){var r=this;return T(this,function(n){switch(n.label){case 0:return[4,this.validateDbIsOpen()];case 1:return n.sent(),[2,new Promise(function(o,i){if(!r.db)return i(N.createDatabaseNotOpenError());var a=r.db.transaction([r.tableName],"readonly"),s=a.objectStore(r.tableName),c=s.count(e);c.addEventListener("success",function(l){var u=l;r.closeConnection(),o(u.target.result===1)}),c.addEventListener("error",function(l){r.closeConnection(),i(l)})})]}})})},t.prototype.deleteDatabase=function(){return S(this,void 0,void 0,function(){return T(this,function(e){return this.db&&this.dbOpen&&this.closeConnection(),[2,new Promise(function(r,n){var o=window.indexedDB.deleteDatabase(kd);o.addEventListener("success",function(){return r(!0)}),o.addEventListener("blocked",function(){return r(!0)}),o.addEventListener("error",function(){return n(!1)})})]})})},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var Hp=function(){function t(e,r){this.inMemoryCache=new Ad,this.indexedDBCache=new CS,this.logger=e,this.storeName=r}return t.prototype.handleDatabaseAccessError=function(e){if(e instanceof N&&e.errorCode===I.databaseUnavailable.code)this.logger.error("Could not access persistent storage. This may be caused by browser privacy features which block persistent storage in third-party contexts.");else throw e},t.prototype.getItem=function(e){return S(this,void 0,void 0,function(){var r,n;return T(this,function(o){switch(o.label){case 0:if(r=this.inMemoryCache.getItem(e),r)return[3,4];o.label=1;case 1:return o.trys.push([1,3,,4]),this.logger.verbose("Queried item not found in in-memory cache, now querying persistent storage."),[4,this.indexedDBCache.getItem(e)];case 2:return[2,o.sent()];case 3:return n=o.sent(),this.handleDatabaseAccessError(n),[3,4];case 4:return[2,r]}})})},t.prototype.setItem=function(e,r){return S(this,void 0,void 0,function(){var n;return T(this,function(o){switch(o.label){case 0:this.inMemoryCache.setItem(e,r),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.indexedDBCache.setItem(e,r)];case 2:return o.sent(),[3,4];case 3:return n=o.sent(),this.handleDatabaseAccessError(n),[3,4];case 4:return[2]}})})},t.prototype.removeItem=function(e){return S(this,void 0,void 0,function(){var r;return T(this,function(n){switch(n.label){case 0:this.inMemoryCache.removeItem(e),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.indexedDBCache.removeItem(e)];case 2:return n.sent(),[3,4];case 3:return r=n.sent(),this.handleDatabaseAccessError(r),[3,4];case 4:return[2]}})})},t.prototype.getKeys=function(){return S(this,void 0,void 0,function(){var e,r;return T(this,function(n){switch(n.label){case 0:if(e=this.inMemoryCache.getKeys(),e.length!==0)return[3,4];n.label=1;case 1:return n.trys.push([1,3,,4]),this.logger.verbose("In-memory cache is empty, now querying persistent storage."),[4,this.indexedDBCache.getKeys()];case 2:return[2,n.sent()];case 3:return r=n.sent(),this.handleDatabaseAccessError(r),[3,4];case 4:return[2,e]}})})},t.prototype.containsKey=function(e){return S(this,void 0,void 0,function(){var r,n;return T(this,function(o){switch(o.label){case 0:if(r=this.inMemoryCache.containsKey(e),r)return[3,4];o.label=1;case 1:return o.trys.push([1,3,,4]),this.logger.verbose("Key not found in in-memory cache, now querying persistent storage."),[4,this.indexedDBCache.containsKey(e)];case 2:return[2,o.sent()];case 3:return n=o.sent(),this.handleDatabaseAccessError(n),[3,4];case 4:return[2,r]}})})},t.prototype.clearInMemory=function(){this.logger.verbose("Deleting in-memory keystore "+this.storeName),this.inMemoryCache.clear(),this.logger.verbose("In-memory keystore "+this.storeName+" deleted")},t.prototype.clearPersistent=function(){return S(this,void 0,void 0,function(){var e,r;return T(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),this.logger.verbose("Deleting persistent keystore"),[4,this.indexedDBCache.deleteDatabase()];case 1:return e=n.sent(),e&&this.logger.verbose("Persistent keystore deleted"),[2,e];case 2:return r=n.sent(),this.handleDatabaseAccessError(r),[2,!1];case 3:return[2]}})})},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var Yc;(function(t){t.asymmetricKeys="asymmetricKeys",t.symmetricKeys="symmetricKeys"})(Yc||(Yc={}));var SS=function(){function t(e){this.logger=e,this.asymmetricKeys=new Hp(this.logger,Yc.asymmetricKeys),this.symmetricKeys=new Hp(this.logger,Yc.symmetricKeys)}return t.prototype.clear=function(){return S(this,void 0,void 0,function(){var e;return T(this,function(r){switch(r.label){case 0:this.asymmetricKeys.clearInMemory(),this.symmetricKeys.clearInMemory(),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.asymmetricKeys.clearPersistent()];case 2:return r.sent(),[2,!0];case 3:return e=r.sent(),e instanceof Error?this.logger.error("Clearing keystore failed with error: "+e.message):this.logger.error("Clearing keystore failed with unknown error"),[2,!1];case 4:return[2]}})})},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var TS=function(){function t(e,r,n){this.logger=e,this.browserCrypto=new Uy(this.logger,n),this.b64Encode=new My,this.b64Decode=new fS,this.guidGenerator=new xy(this.browserCrypto),this.pkceGenerator=new gS(this.browserCrypto),this.cache=new SS(this.logger),this.performanceClient=r}return t.prototype.createNewGuid=function(){return this.guidGenerator.generateGuid()},t.prototype.base64Encode=function(e){return this.b64Encode.encode(e)},t.prototype.base64Decode=function(e){return this.b64Decode.decode(e)},t.prototype.generatePkceCodes=function(){return S(this,void 0,void 0,function(){return T(this,function(e){return[2,this.pkceGenerator.generateCodes()]})})},t.prototype.getPublicKeyThumbprint=function(e){var r;return S(this,void 0,void 0,function(){var n,o,i,a,s,c,l,u;return T(this,function(h){switch(h.label){case 0:return n=(r=this.performanceClient)===null||r===void 0?void 0:r.startMeasurement(je.CryptoOptsGetPublicKeyThumbprint,e.correlationId),[4,this.browserCrypto.generateKeyPair(t.EXTRACTABLE,t.POP_KEY_USAGES)];case 1:return o=h.sent(),[4,this.browserCrypto.exportJwk(o.publicKey)];case 2:return i=h.sent(),a={e:i.e,kty:i.kty,n:i.n},s=Yr.getSortedObjectString(a),[4,this.hashString(s)];case 3:return c=h.sent(),[4,this.browserCrypto.exportJwk(o.privateKey)];case 4:return l=h.sent(),[4,this.browserCrypto.importJwk(l,!1,["sign"])];case 5:return u=h.sent(),[4,this.cache.asymmetricKeys.setItem(c,{privateKey:u,publicKey:o.publicKey,requestMethod:e.resourceRequestMethod,requestUri:e.resourceRequestUri})];case 6:return h.sent(),n&&n.endMeasurement({success:!0}),[2,c]}})})},t.prototype.removeTokenBindingKey=function(e){return S(this,void 0,void 0,function(){var r;return T(this,function(n){switch(n.label){case 0:return[4,this.cache.asymmetricKeys.removeItem(e)];case 1:return n.sent(),[4,this.cache.asymmetricKeys.containsKey(e)];case 2:return r=n.sent(),[2,!r]}})})},t.prototype.clearKeystore=function(){return S(this,void 0,void 0,function(){return T(this,function(e){switch(e.label){case 0:return[4,this.cache.clear()];case 1:return[2,e.sent()]}})})},t.prototype.signJwt=function(e,r,n){var o;return S(this,void 0,void 0,function(){var i,a,s,c,l,u,h,d,f,m,v,E,g;return T(this,function(p){switch(p.label){case 0:return i=(o=this.performanceClient)===null||o===void 0?void 0:o.startMeasurement(je.CryptoOptsSignJwt,n),[4,this.cache.asymmetricKeys.getItem(r)];case 1:if(a=p.sent(),!a)throw N.createSigningKeyNotFoundInStorageError(r);return[4,this.browserCrypto.exportJwk(a.publicKey)];case 2:return s=p.sent(),c=Yr.getSortedObjectString(s),l=this.b64Encode.urlEncode(JSON.stringify({kid:r})),u=WC.getShrHeaderString({kid:l,alg:s.alg}),h=this.b64Encode.urlEncode(u),e.cnf={jwk:JSON.parse(c)},d=this.b64Encode.urlEncode(JSON.stringify(e)),f=h+"."+d,m=Yr.stringToArrayBuffer(f),[4,this.browserCrypto.sign(a.privateKey,m)];case 3:return v=p.sent(),E=this.b64Encode.urlEncodeArr(new Uint8Array(v)),g=f+"."+E,i&&i.endMeasurement({success:!0}),[2,g]}})})},t.prototype.hashString=function(e){return S(this,void 0,void 0,function(){var r,n;return T(this,function(o){switch(o.label){case 0:return[4,this.browserCrypto.sha256Digest(e)];case 1:return r=o.sent(),n=new Uint8Array(r),[2,this.b64Encode.urlEncodeArr(n)]}})})},t.POP_KEY_USAGES=["sign","verify"],t.EXTRACTABLE=!0,t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var bS=function(){function t(e,r,n,o){this.isBrowserEnvironment=typeof window<"u",this.config=e,this.storage=r,this.logger=n,this.cryptoObj=o}return t.prototype.loadExternalTokens=function(e,r,n){if(this.logger.info("TokenCache - loadExternalTokens called"),!r.id_token)throw N.createUnableToLoadTokenError("Please ensure server response includes id token.");var o=new kr(r.id_token,this.cryptoObj),i,a;if(e.account){var s=this.loadAccount(o,e.account.environment,void 0,void 0,e.account.homeAccountId);i=new Qs(s,this.loadIdToken(o,s.homeAccountId,e.account.environment,e.account.tenantId),this.loadAccessToken(e,r,s.homeAccountId,e.account.environment,e.account.tenantId,n),this.loadRefreshToken(e,r,s.homeAccountId,e.account.environment))}else if(e.authority){var c=Kc.generateAuthority(e.authority,e.azureCloudOptions),l={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};if(a=new Kc(c,this.config.system.networkClient,this.storage,l),n.clientInfo){this.logger.trace("TokenCache - homeAccountId from options");var s=this.loadAccount(o,a.hostnameAndPort,n.clientInfo,a.authorityType);i=new Qs(s,this.loadIdToken(o,s.homeAccountId,a.hostnameAndPort,a.tenant),this.loadAccessToken(e,r,s.homeAccountId,a.hostnameAndPort,a.tenant,n),this.loadRefreshToken(e,r,s.homeAccountId,a.hostnameAndPort))}else if(r.client_info){this.logger.trace("TokenCache - homeAccountId from response");var s=this.loadAccount(o,a.hostnameAndPort,r.client_info,a.authorityType);i=new Qs(s,this.loadIdToken(o,s.homeAccountId,a.hostnameAndPort,a.tenant),this.loadAccessToken(e,r,s.homeAccountId,a.hostnameAndPort,a.tenant,n),this.loadRefreshToken(e,r,s.homeAccountId,a.hostnameAndPort))}else throw N.createUnableToLoadTokenError("Please provide clientInfo in the response or options.")}else throw N.createUnableToLoadTokenError("Please provide a request with an account or a request with authority.");return this.generateAuthenticationResult(e,o,i,a)},t.prototype.loadAccount=function(e,r,n,o,i){var a;if(i?a=i:o!==void 0&&n&&(a=tt.generateHomeAccountId(n,o,this.logger,this.cryptoObj,e)),!a)throw N.createUnableToLoadTokenError("Unexpected missing homeAccountId");var s=n?tt.createAccount(n,a,e,void 0,void 0,void 0,r):tt.createGenericAccount(a,e,void 0,void 0,void 0,r);if(this.isBrowserEnvironment)return this.logger.verbose("TokenCache - loading account"),this.storage.setAccount(s),s;throw N.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.")},t.prototype.loadIdToken=function(e,r,n,o){var i=ja.createIdTokenEntity(r,n,e.rawToken,this.config.auth.clientId,o);if(this.isBrowserEnvironment)return this.logger.verbose("TokenCache - loading id token"),this.storage.setIdTokenCredential(i),i;throw N.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.")},t.prototype.loadAccessToken=function(e,r,n,o,i,a){if(!r.access_token)return this.logger.verbose("TokenCache - No access token provided for caching"),null;if(!r.expires_in)throw N.createUnableToLoadTokenError("Please ensure server response includes expires_in value.");if(!a.extendedExpiresOn)throw N.createUnableToLoadTokenError("Please provide an extendedExpiresOn value in the options.");var s=new Ct(e.scopes).printScopes(),c=a.expiresOn||r.expires_in+new Date().getTime()/1e3,l=a.extendedExpiresOn,u=Ba.createAccessTokenEntity(n,o,r.access_token,this.config.auth.clientId,i,s,c,l,this.cryptoObj);if(this.isBrowserEnvironment)return this.logger.verbose("TokenCache - loading access token"),this.storage.setAccessTokenCredential(u),u;throw N.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.")},t.prototype.loadRefreshToken=function(e,r,n,o){if(!r.refresh_token)return this.logger.verbose("TokenCache - No refresh token provided for caching"),null;var i=jc.createRefreshTokenEntity(n,o,r.refresh_token,this.config.auth.clientId);if(this.isBrowserEnvironment)return this.logger.verbose("TokenCache - loading refresh token"),this.storage.setRefreshTokenCredential(i),i;throw N.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.")},t.prototype.generateAuthenticationResult=function(e,r,n,o){var i,a,s,c=_.EMPTY_STRING,l=[],u=null,h;n!=null&&n.accessToken&&(c=n.accessToken.secret,l=Ct.fromString(n.accessToken.target).asArray(),u=new Date(Number(n.accessToken.expiresOn)*1e3),h=new Date(Number(n.accessToken.extendedExpiresOn)*1e3));var d=(r==null?void 0:r.claims.oid)||(r==null?void 0:r.claims.sub)||_.EMPTY_STRING,f=(r==null?void 0:r.claims.tid)||_.EMPTY_STRING;return{authority:o?o.canonicalAuthority:_.EMPTY_STRING,uniqueId:d,tenantId:f,scopes:l,account:n!=null&&n.account?n.account.getAccountInfo():null,idToken:r?r.rawToken:_.EMPTY_STRING,idTokenClaims:r?r.claims:{},accessToken:c,fromCache:!0,expiresOn:u,correlationId:e.correlationId||_.EMPTY_STRING,requestId:_.EMPTY_STRING,extExpiresOn:h,familyId:_.EMPTY_STRING,tokenType:((i=n==null?void 0:n.accessToken)===null||i===void 0?void 0:i.tokenType)||_.EMPTY_STRING,state:_.EMPTY_STRING,cloudGraphHostName:((a=n==null?void 0:n.account)===null||a===void 0?void 0:a.cloudGraphHostName)||_.EMPTY_STRING,msGraphHost:((s=n==null?void 0:n.account)===null||s===void 0?void 0:s.msGraphHost)||_.EMPTY_STRING,code:void 0,fromNativeBroker:!1}},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var IS=function(t){ot(e,t);function e(r){var n=t.call(this,r)||this;return n.includeRedirectUri=!1,n}return e}(by);/*! @azure/msal-browser v2.31.0 2022-11-07 */var kS=function(t){ot(e,t);function e(r,n,o,i,a,s,c,l,u,h){var d=t.call(this,r,n,o,i,a,s,l,u,h)||this;return d.apiId=c,d}return e.prototype.acquireToken=function(r){return S(this,void 0,void 0,function(){var n,o,i,a,s,c,l;return T(this,function(u){switch(u.label){case 0:if(this.logger.trace("SilentAuthCodeClient.acquireToken called"),!r.code)throw N.createAuthCodeRequiredError();return[4,this.initializeAuthorizationRequest(r,F.Silent)];case 1:n=u.sent(),this.browserStorage.updateCacheEntries(n.state,n.nonce,n.authority,n.loginHint||_.EMPTY_STRING,n.account||null),o=this.initializeServerTelemetryManager(this.apiId),u.label=2;case 2:return u.trys.push([2,4,,5]),i=$($({},n),{code:r.code}),[4,this.getClientConfiguration(o,n.authority)];case 3:return a=u.sent(),s=new IS(a),this.logger.verbose("Auth code client created"),c=new Oy(s,this.browserStorage,i,this.logger,this.config.system),[2,c.handleCodeResponseFromServer({code:r.code,msgraph_host:r.msGraphHost,cloud_graph_host_name:r.cloudGraphHostName,cloud_instance_host_name:r.cloudInstanceHostName},n.state,s.authority,this.networkClient,!1)];case 4:throw l=u.sent(),l instanceof z&&l.setCorrelationId(this.correlationId),o.cacheFailedRequest(l),this.browserStorage.cleanRequestByState(n.state),l;case 5:return[2]}})})},e.prototype.logout=function(){return Promise.reject(N.createSilentLogoutUnsupportedError())},e}(Ri);/*! @azure/msal-browser v2.31.0 2022-11-07 */var AS=function(){function t(e,r){this.correlationId=r,this.measureName="msal.measure."+e+"."+this.correlationId,this.startMark="msal.start."+e+"."+this.correlationId,this.endMark="msal.end."+e+"."+this.correlationId}return t.supportsBrowserPerformance=function(){return typeof window<"u"&&typeof window.performance<"u"&&typeof window.performance.mark=="function"&&typeof window.performance.measure=="function"&&typeof window.performance.clearMarks=="function"&&typeof window.performance.clearMeasures=="function"&&typeof window.performance.getEntriesByName=="function"},t.prototype.startMeasurement=function(){if(t.supportsBrowserPerformance())try{window.performance.mark(this.startMark)}catch{}},t.prototype.endMeasurement=function(){if(t.supportsBrowserPerformance())try{window.performance.mark(this.endMark),window.performance.measure(this.measureName,this.startMark,this.endMark)}catch{}},t.prototype.flushMeasurement=function(){if(t.supportsBrowserPerformance())try{var e=window.performance.getEntriesByName(this.measureName,"measure");if(e.length>0){var r=e[0].duration;return window.performance.clearMeasures(this.measureName),window.performance.clearMarks(this.startMark),window.performance.clearMarks(this.endMark),r}}catch{}return null},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var RS=function(t){ot(e,t);function e(r,n,o,i,a,s,c){var l=t.call(this,r,n,o,i,a,s)||this;return l.browserCrypto=new Uy(l.logger,c),l.guidGenerator=new xy(l.browserCrypto),l}return e.prototype.startPerformanceMeasuremeant=function(r,n){return new AS(r,n)},e.prototype.generateId=function(){return this.guidGenerator.generateGuid()},e.prototype.getPageVisibility=function(){var r;return((r=document.visibilityState)===null||r===void 0?void 0:r.toString())||null},e.prototype.startMeasurement=function(r,n){var o=this,i=this.getPageVisibility(),a=t.prototype.startMeasurement.call(this,r,n);return $($({},a),{endMeasurement:function(s){return a.endMeasurement($({startPageVisibility:i,endPageVisibility:o.getPageVisibility()},s))}})},e}(Ay);/*! @azure/msal-browser v2.31.0 2022-11-07 */var PS=function(){function t(e){this.isBrowserEnvironment=typeof window<"u",this.config=lS(e,this.isBrowserEnvironment),this.initialized=!1,this.logger=new jh(this.config.system.loggerOptions,ou,Ea),this.networkClient=this.config.system.networkClient,this.navigationClient=this.config.system.navigationClient,this.redirectResponse=new Map,this.hybridAuthCodeResponses=new Map,this.performanceClient=this.isBrowserEnvironment?new RS(this.config.auth.clientId,this.config.auth.authority,this.logger,ou,Ea,this.config.telemetry.application,this.config.system.cryptoOptions):new JC(this.config.auth.clientId,this.config.auth.authority,this.logger,ou,Ea,this.config.telemetry.application),this.browserCrypto=this.isBrowserEnvironment?new TS(this.logger,this.performanceClient,this.config.system.cryptoOptions):Fc,this.eventHandler=new hS(this.logger,this.browserCrypto),this.browserStorage=this.isBrowserEnvironment?new Rd(this.config.auth.clientId,this.config.cache,this.browserCrypto,this.logger):eS(this.config.auth.clientId,this.logger);var r={cacheLocation:pt.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1};this.nativeInternalStorage=new Rd(this.config.auth.clientId,r,this.browserCrypto,this.logger),this.tokenCache=new bS(this.config,this.browserStorage,this.logger,this.browserCrypto)}return t.prototype.initialize=function(){return S(this,void 0,void 0,function(){var e,r;return T(this,function(n){switch(n.label){case 0:if(this.logger.trace("initialize called"),this.initialized)return this.logger.info("initialize has already been called, exiting early."),[2];if(this.eventHandler.emitEvent(q.INITIALIZE_START),!this.config.system.allowNativeBroker)return[3,4];n.label=1;case 1:return n.trys.push([1,3,,4]),e=this,[4,ro.createProvider(this.logger,this.config.system.nativeBrokerHandshakeTimeout)];case 2:return e.nativeExtensionProvider=n.sent(),[3,4];case 3:return r=n.sent(),this.logger.verbose(r),[3,4];case 4:return this.initialized=!0,this.eventHandler.emitEvent(q.INITIALIZE_END),[2]}})})},t.prototype.handleRedirectPromise=function(e){return S(this,void 0,void 0,function(){var r,n,o,i,a,s,c,l,u=this;return T(this,function(h){return this.logger.verbose("handleRedirectPromise called"),Oe.blockNativeBrokerCalledBeforeInitialized(this.config.system.allowNativeBroker,this.initialized),r=this.getAllAccounts(),this.isBrowserEnvironment?(n=e||_.EMPTY_STRING,o=this.redirectResponse.get(n),typeof o>"u"?(this.eventHandler.emitEvent(q.HANDLE_REDIRECT_START,F.Redirect),this.logger.verbose("handleRedirectPromise has been called for the first time, storing the promise"),i=this.browserStorage.getCachedNativeRequest(),a=void 0,i&&ro.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider)&&this.nativeExtensionProvider&&!e?(this.logger.trace("handleRedirectPromise - acquiring token from native platform"),s=new si(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,ye.handleRedirectPromise,this.performanceClient,this.nativeExtensionProvider,i.accountId,this.nativeInternalStorage,i.correlationId),a=s.handleRedirectPromise()):(this.logger.trace("handleRedirectPromise - acquiring token from web flow"),c=this.browserStorage.getTemporaryCache(ae.CORRELATION_ID,!0)||_.EMPTY_STRING,l=this.createRedirectClient(c),a=l.handleRedirectPromise(e)),o=a.then(function(d){if(d){var f=r.length<u.getAllAccounts().length;f?(u.eventHandler.emitEvent(q.LOGIN_SUCCESS,F.Redirect,d),u.logger.verbose("handleRedirectResponse returned result, login success")):(u.eventHandler.emitEvent(q.ACQUIRE_TOKEN_SUCCESS,F.Redirect,d),u.logger.verbose("handleRedirectResponse returned result, acquire token success"))}return u.eventHandler.emitEvent(q.HANDLE_REDIRECT_END,F.Redirect),d}).catch(function(d){throw r.length>0?u.eventHandler.emitEvent(q.ACQUIRE_TOKEN_FAILURE,F.Redirect,null,d):u.eventHandler.emitEvent(q.LOGIN_FAILURE,F.Redirect,null,d),u.eventHandler.emitEvent(q.HANDLE_REDIRECT_END,F.Redirect),d}),this.redirectResponse.set(n,o)):this.logger.verbose("handleRedirectPromise has been called previously, returning the result from the first call"),[2,o]):(this.logger.verbose("handleRedirectPromise returns null, not browser environment"),[2,null])})})},t.prototype.acquireTokenRedirect=function(e){return S(this,void 0,void 0,function(){var r,n,o,i,a,s=this;return T(this,function(c){return r=this.getRequestCorrelationId(e),this.logger.verbose("acquireTokenRedirect called",r),this.preflightBrowserEnvironmentCheck(F.Redirect),n=this.getAllAccounts().length>0,n?this.eventHandler.emitEvent(q.ACQUIRE_TOKEN_START,F.Redirect,e):this.eventHandler.emitEvent(q.LOGIN_START,F.Redirect,e),this.nativeExtensionProvider&&this.canUseNative(e)?(i=new si(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,ye.acquireTokenRedirect,this.performanceClient,this.nativeExtensionProvider,this.getNativeAccountId(e),this.nativeInternalStorage,e.correlationId),o=i.acquireTokenRedirect(e).catch(function(l){if(l instanceof Er&&l.isFatal()){s.nativeExtensionProvider=void 0;var u=s.createRedirectClient(e.correlationId);return u.acquireToken(e)}else if(l instanceof lr){s.logger.verbose("acquireTokenRedirect - Resolving interaction required error thrown by native broker by falling back to web flow");var u=s.createRedirectClient(e.correlationId);return u.acquireToken(e)}throw s.browserStorage.setInteractionInProgress(!1),l})):(a=this.createRedirectClient(e.correlationId),o=a.acquireToken(e)),[2,o.catch(function(l){throw n?s.eventHandler.emitEvent(q.ACQUIRE_TOKEN_FAILURE,F.Redirect,null,l):s.eventHandler.emitEvent(q.LOGIN_FAILURE,F.Redirect,null,l),l})]})})},t.prototype.acquireTokenPopup=function(e){var r=this,n=this.getRequestCorrelationId(e),o=this.performanceClient.startMeasurement(je.AcquireTokenPopup,n);try{this.logger.verbose("acquireTokenPopup called",n),this.preflightBrowserEnvironmentCheck(F.Popup)}catch(c){return Promise.reject(c)}var i=this.getAllAccounts();i.length>0?this.eventHandler.emitEvent(q.ACQUIRE_TOKEN_START,F.Popup,e):this.eventHandler.emitEvent(q.LOGIN_START,F.Popup,e);var a;if(this.canUseNative(e))a=this.acquireTokenNative(e,ye.acquireTokenPopup).then(function(c){return r.browserStorage.setInteractionInProgress(!1),o.endMeasurement({success:!0,isNativeBroker:!0,requestId:c.requestId}),o.flushMeasurement(),c}).catch(function(c){if(c instanceof Er&&c.isFatal()){r.nativeExtensionProvider=void 0;var l=r.createPopupClient(e.correlationId);return l.acquireToken(e)}else if(c instanceof lr){r.logger.verbose("acquireTokenPopup - Resolving interaction required error thrown by native broker by falling back to web flow");var l=r.createPopupClient(e.correlationId);return l.acquireToken(e)}throw r.browserStorage.setInteractionInProgress(!1),c});else{var s=this.createPopupClient(e.correlationId);a=s.acquireToken(e)}return a.then(function(c){var l=i.length<r.getAllAccounts().length;return l?r.eventHandler.emitEvent(q.LOGIN_SUCCESS,F.Popup,c):r.eventHandler.emitEvent(q.ACQUIRE_TOKEN_SUCCESS,F.Popup,c),o.addStaticFields({accessTokenSize:c.accessToken.length,idTokenSize:c.idToken.length}),o.endMeasurement({success:!0,requestId:c.requestId}),o.flushMeasurement(),c}).catch(function(c){return i.length>0?r.eventHandler.emitEvent(q.ACQUIRE_TOKEN_FAILURE,F.Popup,null,c):r.eventHandler.emitEvent(q.LOGIN_FAILURE,F.Popup,null,c),o.endMeasurement({errorCode:c.errorCode,subErrorCode:c.subError,success:!1}),o.flushMeasurement(),Promise.reject(c)})},t.prototype.ssoSilent=function(e){return S(this,void 0,void 0,function(){var r,n,o,i,a,s=this;return T(this,function(c){return r=this.getRequestCorrelationId(e),n=$($({},e),{prompt:e.prompt,correlationId:r}),this.preflightBrowserEnvironmentCheck(F.Silent),o=this.performanceClient.startMeasurement(je.SsoSilent,r),this.logger.verbose("ssoSilent called",r),this.eventHandler.emitEvent(q.SSO_SILENT_START,F.Silent,n),this.canUseNative(n)?i=this.acquireTokenNative(n,ye.ssoSilent).catch(function(l){if(l instanceof Er&&l.isFatal()){s.nativeExtensionProvider=void 0;var u=s.createSilentIframeClient(n.correlationId);return u.acquireToken(n)}throw l}):(a=this.createSilentIframeClient(n.correlationId),i=a.acquireToken(n)),[2,i.then(function(l){return s.eventHandler.emitEvent(q.SSO_SILENT_SUCCESS,F.Silent,l),o.addStaticFields({accessTokenSize:l.accessToken.length,idTokenSize:l.idToken.length}),o.endMeasurement({success:!0,isNativeBroker:l.fromNativeBroker,requestId:l.requestId}),o.flushMeasurement(),l}).catch(function(l){throw s.eventHandler.emitEvent(q.SSO_SILENT_FAILURE,F.Silent,null,l),o.endMeasurement({errorCode:l.errorCode,subErrorCode:l.subError,success:!1}),o.flushMeasurement(),l})]})})},t.prototype.acquireTokenByCode=function(e){return S(this,void 0,void 0,function(){var r,n,o,i,a=this;return T(this,function(s){r=this.getRequestCorrelationId(e),this.preflightBrowserEnvironmentCheck(F.Silent),this.logger.trace("acquireTokenByCode called",r),this.eventHandler.emitEvent(q.ACQUIRE_TOKEN_BY_CODE_START,F.Silent,e),n=this.performanceClient.startMeasurement(je.AcquireTokenByCode,e.correlationId);try{if(e.code)return o=e.code,i=this.hybridAuthCodeResponses.get(o),i?(this.logger.verbose("Existing acquireTokenByCode request found",e.correlationId),n.endMeasurement({success:!0}),n.discardMeasurement()):(this.logger.verbose("Initiating new acquireTokenByCode request",r),i=this.acquireTokenByCodeAsync($($({},e),{correlationId:r})).then(function(c){return a.eventHandler.emitEvent(q.ACQUIRE_TOKEN_BY_CODE_SUCCESS,F.Silent,c),a.hybridAuthCodeResponses.delete(o),n.addStaticFields({accessTokenSize:c.accessToken.length,idTokenSize:c.idToken.length}),n.endMeasurement({success:!0,isNativeBroker:c.fromNativeBroker,requestId:c.requestId}),n.flushMeasurement(),c}).catch(function(c){throw a.hybridAuthCodeResponses.delete(o),a.eventHandler.emitEvent(q.ACQUIRE_TOKEN_BY_CODE_FAILURE,F.Silent,null,c),n.endMeasurement({errorCode:c.errorCode,subErrorCode:c.subError,success:!1}),n.flushMeasurement(),c}),this.hybridAuthCodeResponses.set(o,i)),[2,i];if(e.nativeAccountId){if(this.canUseNative(e,e.nativeAccountId))return[2,this.acquireTokenNative(e,ye.acquireTokenByCode,e.nativeAccountId).catch(function(c){throw c instanceof Er&&c.isFatal()&&(a.nativeExtensionProvider=void 0),c})];throw N.createUnableToAcquireTokenFromNativePlatformError()}else throw N.createAuthCodeOrNativeAccountIdRequiredError()}catch(c){throw this.eventHandler.emitEvent(q.ACQUIRE_TOKEN_BY_CODE_FAILURE,F.Silent,null,c),n.endMeasurement({errorCode:c instanceof z&&c.errorCode||void 0,subErrorCode:c instanceof z&&c.subError||void 0,success:!1}),c}return[2]})})},t.prototype.acquireTokenByCodeAsync=function(e){return S(this,void 0,void 0,function(){var r,n;return T(this,function(o){switch(o.label){case 0:return this.logger.trace("acquireTokenByCodeAsync called",e.correlationId),r=this.createSilentAuthCodeClient(e.correlationId),[4,r.acquireToken(e)];case 1:return n=o.sent(),[2,n]}})})},t.prototype.acquireTokenFromCache=function(e,r,n){return S(this,void 0,void 0,function(){return T(this,function(o){switch(n.cacheLookupPolicy){case At.Default:case At.AccessToken:case At.AccessTokenAndRefreshToken:return[2,e.acquireToken(r)];default:throw D.createRefreshRequiredError()}return[2]})})},t.prototype.acquireTokenByRefreshToken=function(e,r){return S(this,void 0,void 0,function(){var n;return T(this,function(o){switch(r.cacheLookupPolicy){case At.Default:case At.AccessTokenAndRefreshToken:case At.RefreshToken:case At.RefreshTokenAndNetwork:return n=this.createSilentRefreshClient(e.correlationId),[2,n.acquireToken(e)];default:throw D.createRefreshRequiredError()}return[2]})})},t.prototype.acquireTokenBySilentIframe=function(e){return S(this,void 0,void 0,function(){var r;return T(this,function(n){return r=this.createSilentIframeClient(e.correlationId),[2,r.acquireToken(e)]})})},t.prototype.logout=function(e){return S(this,void 0,void 0,function(){var r;return T(this,function(n){return r=this.getRequestCorrelationId(e),this.logger.warning("logout API is deprecated and will be removed in msal-browser v3.0.0. Use logoutRedirect instead.",r),[2,this.logoutRedirect($({correlationId:r},e))]})})},t.prototype.logoutRedirect=function(e){return S(this,void 0,void 0,function(){var r,n;return T(this,function(o){return r=this.getRequestCorrelationId(e),this.preflightBrowserEnvironmentCheck(F.Redirect),n=this.createRedirectClient(r),[2,n.logout(e)]})})},t.prototype.logoutPopup=function(e){try{var r=this.getRequestCorrelationId(e);this.preflightBrowserEnvironmentCheck(F.Popup);var n=this.createPopupClient(r);return n.logout(e)}catch(o){return Promise.reject(o)}},t.prototype.getAllAccounts=function(){return this.logger.verbose("getAllAccounts called"),this.isBrowserEnvironment?this.browserStorage.getAllAccounts():[]},t.prototype.getAccountByUsername=function(e){var r=this.getAllAccounts();return!x.isEmpty(e)&&r&&r.length?(this.logger.verbose("Account matching username found, returning"),this.logger.verbosePii("Returning signed-in accounts matching username: "+e),r.filter(function(n){return n.username.toLowerCase()===e.toLowerCase()})[0]||null):(this.logger.verbose("getAccountByUsername: No matching account found, returning null"),null)},t.prototype.getAccountByHomeId=function(e){var r=this.getAllAccounts();return!x.isEmpty(e)&&r&&r.length?(this.logger.verbose("Account matching homeAccountId found, returning"),this.logger.verbosePii("Returning signed-in accounts matching homeAccountId: "+e),r.filter(function(n){return n.homeAccountId===e})[0]||null):(this.logger.verbose("getAccountByHomeId: No matching account found, returning null"),null)},t.prototype.getAccountByLocalId=function(e){var r=this.getAllAccounts();return!x.isEmpty(e)&&r&&r.length?(this.logger.verbose("Account matching localAccountId found, returning"),this.logger.verbosePii("Returning signed-in accounts matching localAccountId: "+e),r.filter(function(n){return n.localAccountId===e})[0]||null):(this.logger.verbose("getAccountByLocalId: No matching account found, returning null"),null)},t.prototype.setActiveAccount=function(e){this.browserStorage.setActiveAccount(e)},t.prototype.getActiveAccount=function(){return this.browserStorage.getActiveAccount()},t.prototype.preflightBrowserEnvironmentCheck=function(e,r){if(r===void 0&&(r=!0),this.logger.verbose("preflightBrowserEnvironmentCheck started"),Oe.blockNonBrowserEnvironment(this.isBrowserEnvironment),Oe.blockRedirectInIframe(e,this.config.system.allowRedirectInIframe),Oe.blockReloadInHiddenIframes(),Oe.blockAcquireTokenInPopups(),Oe.blockNativeBrokerCalledBeforeInitialized(this.config.system.allowNativeBroker,this.initialized),e===F.Redirect&&this.config.cache.cacheLocation===pt.MemoryStorage&&!this.config.cache.storeAuthStateInCookie)throw Wc.createInMemoryRedirectUnavailableError();(e===F.Redirect||e===F.Popup)&&this.preflightInteractiveRequest(r)},t.prototype.preflightInteractiveRequest=function(e){this.logger.verbose("preflightInteractiveRequest called, validating app environment"),Oe.blockReloadInHiddenIframes(),e&&this.browserStorage.setInteractionInProgress(!0)},t.prototype.acquireTokenNative=function(e,r,n){return S(this,void 0,void 0,function(){var o;return T(this,function(i){if(this.logger.trace("acquireTokenNative called"),!this.nativeExtensionProvider)throw N.createNativeConnectionNotEstablishedError();return o=new si(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,r,this.performanceClient,this.nativeExtensionProvider,n||this.getNativeAccountId(e),this.nativeInternalStorage,e.correlationId),[2,o.acquireToken(e)]})})},t.prototype.canUseNative=function(e,r){if(this.logger.trace("canUseNative called"),!ro.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 mt.NONE:case mt.CONSENT:case mt.LOGIN:this.logger.trace("canUseNative: prompt is compatible with native flow");break;default:return this.logger.trace("canUseNative: prompt = "+e.prompt+" is not compatible with native flow, returning false"),!1}return!r&&!this.getNativeAccountId(e)?(this.logger.trace("canUseNative: nativeAccountId is not available, returning false"),!1):!0},t.prototype.getNativeAccountId=function(e){var r=e.account||this.browserStorage.getAccountInfoByHints(e.loginHint,e.sid)||this.getActiveAccount();return r&&r.nativeAccountId||""},t.prototype.createPopupClient=function(e){return new oS(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)},t.prototype.createRedirectClient=function(e){return new nS(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)},t.prototype.createSilentIframeClient=function(e){return new uS(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,ye.ssoSilent,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)},t.prototype.createSilentCacheClient=function(e){return new Ny(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeExtensionProvider,e)},t.prototype.createSilentRefreshClient=function(e){return new dS(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeExtensionProvider,e)},t.prototype.createSilentAuthCodeClient=function(e){return new kS(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,ye.acquireTokenByCode,this.performanceClient,this.nativeExtensionProvider,e)},t.prototype.addEventCallback=function(e){return this.eventHandler.addEventCallback(e)},t.prototype.removeEventCallback=function(e){this.eventHandler.removeEventCallback(e)},t.prototype.addPerformanceCallback=function(e){return this.performanceClient.addPerformanceCallback(e)},t.prototype.removePerformanceCallback=function(e){return this.performanceClient.removePerformanceCallback(e)},t.prototype.enableAccountStorageEvents=function(){this.eventHandler.enableAccountStorageEvents()},t.prototype.disableAccountStorageEvents=function(){this.eventHandler.disableAccountStorageEvents()},t.prototype.getTokenCache=function(){return this.tokenCache},t.prototype.getLogger=function(){return this.logger},t.prototype.setLogger=function(e){this.logger=e},t.prototype.initializeWrapperLibrary=function(e,r){this.browserStorage.setWrapperMetadata(e,r)},t.prototype.setNavigationClient=function(e){this.navigationClient=e},t.prototype.getConfiguration=function(){return this.config},t.prototype.getRequestCorrelationId=function(e){return e!=null&&e.correlationId?e.correlationId:this.isBrowserEnvironment?this.browserCrypto.createNewGuid():_.EMPTY_STRING},t}();/*! @azure/msal-browser v2.31.0 2022-11-07 */var NS=function(t){ot(e,t);function e(r){var n=t.call(this,r)||this;return n.activeSilentTokenRequests=new Map,n}return e.prototype.loginRedirect=function(r){return S(this,void 0,void 0,function(){var n;return T(this,function(o){return n=this.getRequestCorrelationId(r),this.logger.verbose("loginRedirect called",n),[2,this.acquireTokenRedirect($({correlationId:n},r||xp))]})})},e.prototype.loginPopup=function(r){var n=this.getRequestCorrelationId(r);return this.logger.verbose("loginPopup called",n),this.acquireTokenPopup($({correlationId:n},r||xp))},e.prototype.acquireTokenSilent=function(r){return S(this,void 0,void 0,function(){var n,o,i,a,s,c,l,u=this;return T(this,function(h){if(n=this.getRequestCorrelationId(r),o=this.performanceClient.startMeasurement(je.AcquireTokenSilent,n),o.addStaticFields({cacheLookupPolicy:r.cacheLookupPolicy}),this.preflightBrowserEnvironmentCheck(F.Silent),this.logger.verbose("acquireTokenSilent called",n),i=r.account||this.getActiveAccount(),!i)throw N.createNoAccountError();return a={clientId:this.config.auth.clientId,authority:r.authority||_.EMPTY_STRING,scopes:r.scopes,homeAccountIdentifier:i.homeAccountId,claims:r.claims,authenticationScheme:r.authenticationScheme,resourceRequestMethod:r.resourceRequestMethod,resourceRequestUri:r.resourceRequestUri,shrClaims:r.shrClaims,sshKid:r.sshKid},s=JSON.stringify(a),c=this.activeSilentTokenRequests.get(s),typeof c>"u"?(this.logger.verbose("acquireTokenSilent called for the first time, storing active request",n),l=this.acquireTokenSilentAsync($($({},r),{correlationId:n}),i).then(function(d){return u.activeSilentTokenRequests.delete(s),o.addStaticFields({accessTokenSize:d.accessToken.length,idTokenSize:d.idToken.length}),o.endMeasurement({success:!0,fromCache:d.fromCache,isNativeBroker:d.fromNativeBroker,requestId:d.requestId}),o.flushMeasurement(),d}).catch(function(d){throw u.activeSilentTokenRequests.delete(s),o.endMeasurement({errorCode:d.errorCode,subErrorCode:d.subError,success:!1}),o.flushMeasurement(),d}),this.activeSilentTokenRequests.set(s,l),[2,l]):(this.logger.verbose("acquireTokenSilent has been called previously, returning the result from the first call",n),o.endMeasurement({success:!0}),o.discardMeasurement(),[2,c])})})},e.prototype.acquireTokenSilentAsync=function(r,n){return S(this,void 0,void 0,function(){var o,i,a,s,c,l,u=this;return T(this,function(h){switch(h.label){case 0:return this.eventHandler.emitEvent(q.ACQUIRE_TOKEN_START,F.Silent,r),o=this.performanceClient.startMeasurement(je.AcquireTokenSilentAsync,r.correlationId),ro.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider,r.authenticationScheme)&&n.nativeAccountId?(this.logger.verbose("acquireTokenSilent - attempting to acquire token from native platform"),a=$($({},r),{account:n}),i=this.acquireTokenNative(a,ye.acquireTokenSilent_silentFlow).catch(function(d){return S(u,void 0,void 0,function(){var f;return T(this,function(m){if(d instanceof Er&&d.isFatal())return this.logger.verbose("acquireTokenSilent - native platform unavailable, falling back to web flow"),this.nativeExtensionProvider=void 0,f=this.createSilentIframeClient(r.correlationId),[2,f.acquireToken(r)];throw d})})}),[3,3]):[3,1];case 1:return this.logger.verbose("acquireTokenSilent - attempting to acquire token from web flow"),s=this.createSilentCacheClient(r.correlationId),[4,s.initializeSilentRequest(r,n)];case 2:c=h.sent(),l=$($({},r),{cacheLookupPolicy:r.cacheLookupPolicy||At.Default}),i=this.acquireTokenFromCache(s,c,l).catch(function(d){if(l.cacheLookupPolicy===At.AccessToken)throw d;return Oe.blockReloadInHiddenIframes(),u.eventHandler.emitEvent(q.ACQUIRE_TOKEN_NETWORK_START,F.Silent,c),u.acquireTokenByRefreshToken(c,l).catch(function(f){var m=f instanceof vo,v=f instanceof lr,E=f.errorCode===cr.INVALID_GRANT_ERROR;if((!m||!E||v||l.cacheLookupPolicy===At.AccessTokenAndRefreshToken||l.cacheLookupPolicy===At.RefreshToken)&&l.cacheLookupPolicy!==At.Skip)throw f;return u.logger.verbose("Refresh token expired/invalid or CacheLookupPolicy is set to Skip, attempting acquire token by iframe.",r.correlationId),u.acquireTokenBySilentIframe(c)})}),h.label=3;case 3:return[2,i.then(function(d){return u.eventHandler.emitEvent(q.ACQUIRE_TOKEN_SUCCESS,F.Silent,d),o.endMeasurement({success:!0,fromCache:d.fromCache,isNativeBroker:d.fromNativeBroker,requestId:d.requestId}),d}).catch(function(d){throw u.eventHandler.emitEvent(q.ACQUIRE_TOKEN_FAILURE,F.Silent,null,d),o.endMeasurement({errorCode:d.errorCode,subErrorCode:d.subError,success:!1}),d})]}})})},e}(PS);const Fp="redirect";var $p=globalThis&&globalThis.__awaiter||function(t,e,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(u){try{l(n.next(u))}catch(h){a(h)}}function c(u){try{l(n.throw(u))}catch(h){a(h)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};class OS extends NS{get account(){return this.getAllAccounts().find(n=>{var o;return((o=n.idTokenClaims)===null||o===void 0?void 0:o.aud)===this.clientId})}get hasValidClaims(){var e;const r=(e=this.account)===null||e===void 0?void 0:e.idTokenClaims;if(r){const n=Math.ceil(Date.now()/1e3);return r.exp>n}return!1}get clientId(){var e;return(e=this.config.auth)===null||e===void 0?void 0:e.clientId}get requestOrigin(){return this.browserStorage.getTemporaryCache("request.origin",!0)}constructor(e,r){super(r),this.tenantId=e}login(e,r=Fp,n=!0){var o;return $p(this,void 0,void 0,function*(){const i=(e==null?void 0:e.loginHint)||((o=this.account)===null||o===void 0?void 0:o.username),a=(e==null?void 0:e.scopes)||[],s=Object.assign(Object.assign({},e),{loginHint:i,scopes:a});if(i&&n){this.logger.verbose("Attempting to login in silently");try{return yield this.ssoSilent(s)}catch{this.logger.verbose("Silent login attempt failed")}}switch(this.logger.verbose(`Attempting to login in by [${r}]`),r){case"popup":return this.loginPopup(s);case"redirect":return this.loginRedirect(s)}})}acquireToken(e={scopes:[]},r=Fp,n=!0){return $p(this,void 0,void 0,function*(){const o=yield this.account;if(n&&o){this.logger.verbose("Attempting to acquire token in silently");try{return yield this.acquireTokenSilent(Object.assign({account:o},e))}catch{this.logger.info("Expected to navigate away from the current page but timeout occurred.")}}switch(this.logger.verbose(`Attempting to acquire token by [${r}]`),r){case"popup":return this.acquireTokenPopup(e);case"redirect":return this.acquireTokenRedirect(e)}})}}const xS=(t,e=window.location.origin)=>{t=t.match(/^http[s]?/)?t:e+t;const{origin:r,pathname:n}=new URL(t);return r+n.replace(/([^:]\/)\/+/g,"$1")},MS=(t,e,r,n,o)=>{const i=Object.assign({clientId:e,redirectUri:xS(r||""),navigateToLoginRequestUrl:!1,authority:`https://login.microsoftonline.com/${t}`},n==null?void 0:n.auth),a=Object.assign({cacheLocation:"localStorage"},n==null?void 0:n.cache),s=n==null?void 0:n.system;return new(o||OS)(t,{auth:i,cache:a,system:s})};class Ly extends jh{constructor(e){super({logLevel:e,loggerCallback:(...r)=>this.loggerCallback(...r)}),this.getLogType=r=>{switch(r){case xe.Error:return"error";case xe.Warning:return"warn";case xe.Info:return"info";case xe.Verbose:default:return"debug"}}}loggerCallback(e,r,n){console[this.getLogType(e)]("%c FUSION::MSAL %c %s","border: 1px solid;","border: none;",r)}}var iu=globalThis&&globalThis.__awaiter||function(t,e,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(u){try{l(n.next(u))}catch(h){a(h)}}function c(u){try{l(n.throw(u))}catch(h){a(h)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const US="default";class LS{get defaultClient(){return this.getClient(US)}get defaultAccount(){return this.defaultClient.account}get defaultConfig(){return this._config.defaultConfig}constructor(e){this._config=e,this._clients={}}getClient(e){return this._clients[e]||(this._clients[e]=this.createClient(e)),this._clients[e]}createClient(e){const r=e?this._config.getClientConfig(e):this._config.defaultConfig;if(!r)throw Error("Could not find any config");const n=MS(r.tenantId,r.clientId,r.redirectUri,r.config);return n.setLogger(new Ly(0)),n}handleRedirect(){return iu(this,void 0,void 0,function*(){const{redirectUri:e}=this.defaultConfig||{};if(window.location.pathname===e){const r=this.defaultClient,n=r.getLogger(),{requestOrigin:o}=r;yield r.handleRedirectPromise(),o===e?(n.warning(`detected callback loop from url ${e}, redirecting to root`),window.location.replace("/")):window.location.replace(o||"/")}return null})}acquireToken(e){return this.defaultClient.acquireToken(e)}acquireAccessToken(e){return iu(this,void 0,void 0,function*(){const r=yield this.acquireToken(e);return r?r.accessToken:void 0})}login(){return iu(this,void 0,void 0,function*(){yield this.defaultClient.login()})}}var DS=globalThis&&globalThis.__awaiter||function(t,e,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(u){try{l(n.next(u))}catch(h){a(h)}}function c(u){try{l(n.throw(u))}catch(h){a(h)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const Dy={name:"auth",configure:t=>{var e;const r=new IC;return!((e=t==null?void 0:t.auth)===null||e===void 0)&&e.defaultConfig&&r.configureDefault(t.auth.defaultConfig),r},initialize:({config:t})=>DS(void 0,void 0,void 0,function*(){const e=new LS(t);return t.requiresAuth&&(yield e.handleRedirect(),e.defaultAccount||(yield e.login())),e})},HS=(t,e)=>({module:Dy,configure:r=>{r.configureDefault(t),(e==null?void 0:e.requiresAuth)!==void 0&&(r.requiresAuth=e==null?void 0:e.requiresAuth);const{clients:n}=e!=null?e:{};n&&Object.entries(n).forEach(([o,i])=>r.configureClient(o,i))}});var Hy=globalThis&&globalThis.__awaiter||function(t,e,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(u){try{l(n.next(u))}catch(h){a(h)}}function c(u){try{l(n.throw(u))}catch(h){a(h)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const FS=t=>{var e;return{id:t.id,isChildType:t.isChildType,parentTypeIds:(e=t.parentTypeIds)!==null&&e!==void 0?e:[]}},Fy=t=>{var e,r,n,o;return{id:t.id,externalId:(e=t.externalId)!==null&&e!==void 0?e:void 0,isActive:t.isActive,isDeleted:t.isDeleted,created:new Date(t.created),source:(r=t.source)!==null&&r!==void 0?r:void 0,title:(n=t.title)!==null&&n!==void 0?n:void 0,type:FS(t.type),value:(o=t.value)!==null&&o!==void 0?o:{}}},$S=t=>Hy(void 0,void 0,void 0,function*(){const e=yield t.json();return Fy(e)}),zS=t=>Hy(void 0,void 0,void 0,function*(){return(yield t.json()).map(Fy)});var Ps=globalThis&&globalThis.__awaiter||function(t,e,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(u){try{l(n.next(u))}catch(h){a(h)}}function c(u){try{l(n.throw(u))}catch(h){a(h)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};class jS{constructor(){this.defaultExpireTime=1*60*1e3}_createContextClientGet(e){return Ps(this,void 0,void 0,function*(){const r=yield e.createContextClient("json$");return{fn:n=>r.get("v1",n,{selector:$S})}})}_createContextClientQuery(e){return Ps(this,void 0,void 0,function*(){const r=yield e.createContextClient("json$");return{fn:n=>r.query("v1",{query:n},{selector:zS})}})}_getServiceProvider(e){var r;return Ps(this,void 0,void 0,function*(){if(e.hasModule("services"))return e.requireInstance("services");{const n=(r=e.ref)===null||r===void 0?void 0:r.services;if(n)return n;throw Error("no service services provider configures [ServicesModule]")}})}createConfig(e){return Ps(this,void 0,void 0,function*(){const r=yield this._getServiceProvider(e),n={getContext:{query:{client:yield this._createContextClientGet(r),key:({id:o})=>o,expire:this.defaultExpireTime}},queryContext:{client:yield this._createContextClientQuery(r),key:o=>JSON.stringify(o),expire:this.defaultExpireTime}};return this.processConfig(n)})}processConfig(e){return e}}var zp;(function(t){t.IDLE="idle",t.ACTIVE="active",t.FAILED="failed",t.CANCELED="canceled"})(zp||(zp={}));const BS=t=>e=>e.pipe(Qn(t)),qS=t=>t.pipe(yt(e=>e.value));var Ns,KS=new Uint8Array(16);function GS(){if(!Ns&&(Ns=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!Ns))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ns(KS)}const VS=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function $y(t){return typeof t=="string"&&VS.test(t)}var Qe=[];for(var au=0;au<256;++au)Qe.push((au+256).toString(16).substr(1));function zy(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=(Qe[t[e+0]]+Qe[t[e+1]]+Qe[t[e+2]]+Qe[t[e+3]]+"-"+Qe[t[e+4]]+Qe[t[e+5]]+"-"+Qe[t[e+6]]+Qe[t[e+7]]+"-"+Qe[t[e+8]]+Qe[t[e+9]]+"-"+Qe[t[e+10]]+Qe[t[e+11]]+Qe[t[e+12]]+Qe[t[e+13]]+Qe[t[e+14]]+Qe[t[e+15]]).toLowerCase();if(!$y(r))throw TypeError("Stringified UUID is invalid");return r}function WS(t){if(!$y(t))throw TypeError("Invalid UUID");var e,r=new Uint8Array(16);return r[0]=(e=parseInt(t.slice(0,8),16))>>>24,r[1]=e>>>16&255,r[2]=e>>>8&255,r[3]=e&255,r[4]=(e=parseInt(t.slice(9,13),16))>>>8,r[5]=e&255,r[6]=(e=parseInt(t.slice(14,18),16))>>>8,r[7]=e&255,r[8]=(e=parseInt(t.slice(19,23),16))>>>8,r[9]=e&255,r[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,r[11]=e/4294967296&255,r[12]=e>>>24&255,r[13]=e>>>16&255,r[14]=e>>>8&255,r[15]=e&255,r}function YS(t){t=unescape(encodeURIComponent(t));for(var e=[],r=0;r<t.length;++r)e.push(t.charCodeAt(r));return e}var QS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",JS="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function XS(t,e,r){function n(o,i,a,s){if(typeof o=="string"&&(o=YS(o)),typeof i=="string"&&(i=WS(i)),i.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var c=new Uint8Array(16+o.length);if(c.set(i),c.set(o,i.length),c=r(c),c[6]=c[6]&15|e,c[8]=c[8]&63|128,a){s=s||0;for(var l=0;l<16;++l)a[s+l]=c[l];return a}return zy(c)}try{n.name=t}catch{}return n.DNS=QS,n.URL=JS,n}function jy(t,e,r){t=t||{};var n=t.random||(t.rng||GS)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){r=r||0;for(var o=0;o<16;++o)e[r+o]=n[o];return e}return zy(n)}function ZS(t,e,r,n){switch(t){case 0:return e&r^~e&n;case 1:return e^r^n;case 2:return e&r^e&n^r&n;case 3:return e^r^n}}function su(t,e){return t<<e|t>>>32-e}function eT(t){var e=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof t=="string"){var n=unescape(encodeURIComponent(t));t=[];for(var o=0;o<n.length;++o)t.push(n.charCodeAt(o))}else Array.isArray(t)||(t=Array.prototype.slice.call(t));t.push(128);for(var i=t.length/4+2,a=Math.ceil(i/16),s=new Array(a),c=0;c<a;++c){for(var l=new Uint32Array(16),u=0;u<16;++u)l[u]=t[c*64+u*4]<<24|t[c*64+u*4+1]<<16|t[c*64+u*4+2]<<8|t[c*64+u*4+3];s[c]=l}s[a-1][14]=(t.length-1)*8/Math.pow(2,32),s[a-1][14]=Math.floor(s[a-1][14]),s[a-1][15]=(t.length-1)*8&4294967295;for(var h=0;h<a;++h){for(var d=new Uint32Array(80),f=0;f<16;++f)d[f]=s[h][f];for(var m=16;m<80;++m)d[m]=su(d[m-3]^d[m-8]^d[m-14]^d[m-16],1);for(var v=r[0],E=r[1],g=r[2],p=r[3],y=r[4],w=0;w<80;++w){var k=Math.floor(w/20),P=su(v,5)+ZS(k,E,g,p)+y+e[k]+d[w]>>>0;y=p,p=g,g=su(E,30)>>>0,E=v,v=P}r[0]=r[0]+v>>>0,r[1]=r[1]+E>>>0,r[2]=r[2]+g>>>0,r[3]=r[3]+p>>>0,r[4]=r[4]+y>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}var tT=XS("v5",80,eT);const rT=tT;class Nd extends Error{constructor(e,r,n){super(r),this.type=e,this.cause=n}}const _i=(...t)=>Ai(e=>t.includes(e.type));var dt=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},nT=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,r,n,o){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?o.call(t,r):o?o.value=r:e.set(t,r),r},vr,rr;class By extends Ie{get action$(){return dt(this,vr,"f").asObservable()}get value(){return dt(this,rr,"f").value}get closed(){return dt(this,rr,"f").closed||dt(this,vr,"f").closed}constructor(e,r){super(o=>dt(this,rr,"f").subscribe(o)),vr.set(this,new Gr),rr.set(this,void 0);const n="getInitialState"in e?e.getInitialState():r;nT(this,rr,new gl(n),"f"),dt(this,vr,"f").pipe(Fh(e,n),my()).subscribe(dt(this,rr,"f")),this.reset=()=>dt(this,rr,"f").next(n)}next(e){dt(this,vr,"f").next(e)}addEffect(e,r){const n=typeof e=="string"?this.action$.pipe(_i(e)):this.action$,o=r||e;return n.pipe(mo(i=>br(new Promise((a,s)=>{try{a(o(i,this.value))}catch(c){s(c)}})).pipe(rn(a=>(console.warn("unhandled effect",a),po)))),Ai(i=>!!i),Oc(Nc)).subscribe(dt(this,vr,"f"))}addEpic(e){return this.addFlow(e)}addFlow(e){const r=e(this.action$,this);if(!r)throw new TypeError(`addEpic: one of the provided effects "${e.name||"<anonymous>"}" does not return a stream. Double check you're not missing a return statement!`);return r.pipe(rn(n=>(console.trace("unhandled exception, epic closed!",n),po)),Oc(Nc)).subscribe(dt(this,vr,"f"))}unsubscribe(){dt(this,vr,"f").unsubscribe(),dt(this,rr,"f").unsubscribe()}complete(){dt(this,vr,"f").complete(),dt(this,rr,"f").complete()}asObservable(){return dt(this,rr,"f").asObservable()}}vr=new WeakMap,rr=new WeakMap;class Od extends Error{constructor(e,r,n){super(n!=null?n:r.message),this.action=e,this.cause=r}}const qy=t=>(e,r)=>new Ie(n=>{const{meta:{controller:o,transaction:i}}=e;if(o.signal.aborted)return n.next({type:"cancel",payload:{transaction:i,reason:`request [${i}] was aborted!`}}),n.complete();if(n.add(t.pipe(_i("cancel")).subscribe(a=>{a.payload.transaction===i&&(o.signal.aborted||o.abort(),n.complete())})),n.add(vd(o.signal,"abort").subscribe(()=>{n.next({type:"cancel",payload:{transaction:i,reason:`request [${i}] was aborted!`}}),n.complete()})),r)return r(n)}),oT=t=>(t=Object.assign({},{count:0,delay:0},t),(e,r)=>{const n=qy(e);return e.pipe(_i("failure"),iC(r),Qn(([o,i])=>{var a,s;const{request:c}=o.meta,{transaction:l}=c.meta,u=i[l];if(!u)return po;const h=(s=(a=u.retry)===null||a===void 0?void 0:a.length)!==null&&s!==void 0?s:0,d={type:"retry",payload:o.meta.request},f=Object.assign({},t,c.meta.retry);return n(c,m=>{if(h>=f.count){const E=f.count?"maximum retries executed!":o.payload.message;return m.next({type:"error",payload:new Od(o,o.payload.cause,E),meta:{request:c}}),m.complete()}return(typeof f.delay=="function"?br(f.delay(o.payload.cause)):YE(f.delay)).pipe(yt(()=>d),rn(E=>ml({type:"error",payload:new Od(d,E,"failed to resolve delay"),meta:{request:c}}))).subscribe(m)})}))}),iT=t=>e=>{const r=qy(e);return e.pipe(_i("request","retry"),mo(n=>{const o=n.type==="request"?n:n.payload;return r(o,i=>{br(t(o.payload,o.meta.controller.signal)).pipe(yt(a=>({type:"success",payload:a,meta:{request:o}})),rn(a=>ml({type:"failure",payload:new Od(n,a,`failed to execute request for transaction ${o.meta.transaction}`),meta:{request:o}}))).subscribe(i)})}))},Ky=()=>Ai(t=>t.status==="complete"),aT=()=>(t,e)=>{switch(e.type){case"request":{const{transaction:r,task:n,ref:o}=e.meta;return Object.assign({},t,{[r]:{transaction:r,task:n,ref:o,created:Date.now()}})}case"retry":{const{transaction:r}=e.payload.meta,n=Object.assign({},t[r]);if(n)return n.retry=n.retry?[...n.retry,Date.now()]:[],Object.assign({},t,{[r]:n});break}case"failure":{const{transaction:r}=e.meta.request.meta,n=Object.assign({},t[r]);if(n)return n.errors=n.errors?[...n.errors,e.payload]:[],Object.assign({},t,{[r]:n});break}case"cancel":{const{transaction:r,reason:n}=e.payload,o=t[r];if(o){o.task.error(new Nd("abort","request was canceled",new Error(n)));const i=Object.assign({},t);return delete i[r],i}break}case"error":{const{transaction:r}=e.meta.request.meta,n=t[r];if(n){n.task.error(new Nd("error","failed to execute request",e.payload));const o=Object.assign({},t);return delete o[r],o}break}case"success":{const{request:r}=e.meta,{transaction:n,ref:o}=r.meta,i=t[n];if(i){const a={status:"complete",transaction:n,ref:o,value:e.payload,args:r.payload,created:i.created,completed:Date.now()};i.task.next(a),i.task.complete();const s=Object.assign({},t);return delete s[n],s}break}}return t};var sT=globalThis&&globalThis.__awaiter||function(t,e,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(u){try{l(n.next(u))}catch(h){a(h)}}function c(u){try{l(n.throw(u))}catch(h){a(h)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((n=n.apply(t,e||[])).next())})},We=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},jp=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,r,n,o){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?o.call(t,r):o?o.value=r:e.set(t,r),r},Je,Ao;class Bp extends Ie{get action$(){return We(this,Je,"f").action$}get closed(){return We(this,Je,"f").closed}get success$(){return this.action$.pipe(_i("success"),yt(({payload:e})=>e))}get error$(){return this.action$.pipe(_i("error"),yt(({payload:e})=>new Nd("error","failed to execute request",e)))}constructor(e,r){super(o=>We(this,Je,"f").subscribe(o)),Je.set(this,void 0),Ao.set(this,void 0),jp(this,Je,new By(aT(),{}),"f"),jp(this,Ao,new an(()=>We(this,Je,"f").complete()),"f"),We(this,Ao,"f").add(We(this,Je,"f").addEpic(iT(e)));const n=Object.assign({count:0,delay:0},r==null?void 0:r.retry);We(this,Ao,"f").add(We(this,Je,"f").addEpic(oT(n)))}next(e,r){return this._next(e,r).meta}nextAsync(e,r){return sT(this,void 0,void 0,function*(){return go(this.next(e,r).task.pipe(Ky()))})}getTaskByTransaction(e){const r=We(this,Je,"f").value[e];return r&&r.task}getTaskByRef(e){const r=Object.values(We(this,Je,"f").value).find(n=>n.ref===e);return r&&r.task}cancel(e,r){if(e&&We(this,Je,"f").value[e])r!=null||(r=`[${e}]: transaction canceled`),We(this,Je,"f").next({type:"cancel",payload:{transaction:e,reason:r}});else for(const n of Object.keys(We(this,Je,"f").value))this.cancel(n,`[${e}]: all transactions canceled`)}on(e,r){return We(this,Je,"f").addEffect(e,n=>{r(n,this)})}complete(){We(this,Ao,"f").unsubscribe()}asObservable(){return We(this,Je,"f").asObservable()}_next(e,r){const n=Object.assign({transaction:jy(),controller:new AbortController,task:new ey},r!=null?r:{}),o={type:"request",payload:e,meta:n};return We(this,Je,"f").next(o),o}}Je=new WeakMap,Ao=new WeakMap;const cT=(t,e)=>{var r,n;return((r=e.updated)!==null&&r!==void 0?r:0)-((n=t.updated)!==null&&n!==void 0?n:0)},lT=()=>(t,e)=>{var r,n,o,i,a;const{type:s,payload:c}=e;switch(s){case"set":{const{key:l,value:u}=c,h=t.data[l],d=Object.assign(Object.assign(Object.assign({},h),u),{created:(r=h==null?void 0:h.created)!==null&&r!==void 0?r:Date.now(),updated:Date.now(),updates:((n=h==null?void 0:h.updates)!==null&&n!==void 0?n:-1)+1}),f=Object.assign(Object.assign({},t.data),{[l]:d});return Object.assign(Object.assign({},t),{data:f,lastTransaction:d.transaction})}case"clear":{const l=Object.assign({},t.data);return delete l[c.key],Object.assign(Object.assign({},t),{data:l})}case"invalidate":{const{key:l}=c,u=t.data[l];if(u){const h=Object.assign(Object.assign({},t.data),{[l]:Object.assign(Object.assign({},u),{updated:void 0})});return Object.assign(Object.assign({},t),{data:h})}break}case"reset":return{data:(o=c.data)!==null&&o!==void 0?o:{}};case"trim":{const l=(i=c.sort)!==null&&i!==void 0?i:cT,h=Object.entries(t.data).sort((f,m)=>l(f[1],m[1])).filter(([f,m])=>!c.validate||c.validate(m)).slice(0,(a=c.size)!==null&&a!==void 0?a:Number.MAX_SAFE_INTEGER).reduce((f,[m,v])=>Object.assign(f,{[m]:v}),{});return Object.keys(h).length===Object.keys(t.data).length?t:{lastTransaction:t.lastTransaction&&Object.keys(h).includes(t.lastTransaction)?t.lastTransaction:Object.values(h)[0].transaction,data:h}}}return t},uT=t=>{const e=t.lastTransaction,r=Object.values(t.data);return e?r.find(n=>n.transaction===e):r.sort((n,o)=>{var i,a;return((i=n.updated)!==null&&i!==void 0?i:0)-((a=o.updated)!==null&&a!==void 0?a:0)}).pop()};class qp extends By{get data$(){return this.pipe(yt(e=>e.data))}get latest(){return uT(this.value)}constructor(e){const{trimming:r,initial:n}=e;super(lT(),{data:n!=null?n:{}}),r&&this.addEffect("set",()=>this.trim(r))}setItem(e,r){this.next({type:"set",payload:{key:e,value:r}})}getItem(e){return this.value.data[e]}invalidate(e){this.next({type:"invalidate",payload:{key:e}})}trim(e){this.next({type:"trim",payload:e})}}var me=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Io=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,r,n,o){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?o.call(t,r):o?o.value=r:e.set(t,r),r},dT=globalThis&&globalThis.__rest||function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]]);return r},Kn,nr,Ur,Ro,Po,Js,xd;const hT=(t=0)=>e=>{var r;return((r=e.updated)!==null&&r!==void 0?r:0)+t>Date.now()};class Kt extends Ie{get client(){return me(this,nr,"f")}get state$(){return me(this,Ur,"f")}constructor(e){var r,n;super(i=>me(this,Ur,"f").pipe(yt(({data:a})=>a)).subscribe(i)),Kn.set(this,new an),nr.set(this,void 0),Ur.set(this,void 0),Ro.set(this,new Gr),Po.set(this,void 0),Js.set(this,void 0),xd.set(this,jy()),Io(this,Po,i=>rT(e.key(i),me(this,xd,"f")),"f"),Io(this,Js,(r=e==null?void 0:e.validate)!==null&&r!==void 0?r:hT(e==null?void 0:e.expire),"f"),e.client instanceof Bp?Io(this,nr,e.client,"f"):(Io(this,nr,new Bp(e.client.fn,e.client.options),"f"),me(this,Kn,"f").add(()=>me(this,nr,"f").complete())),e.cache instanceof qp?Io(this,Ur,e.cache,"f"):(Io(this,Ur,new qp(e.cache||{}),"f"),me(this,Kn,"f").add(()=>me(this,Ur,"f").complete()));const o=(n=e.queueOperator)!==null&&n!==void 0?n:BS;me(this,Kn,"f").add(()=>me(this,Ro,"f").complete()),me(this,Kn,"f").add(me(this,Ro,"f").pipe(o(({args:i,options:a})=>new Ie(s=>{const{task:c,transaction:l}=me(this,nr,"f").next(i,a);s.add(c.pipe(rn(()=>po)).subscribe(s)),s.add(()=>{me(this,nr,"f").cancel(l)})})),Ky(),_y(()=>!me(this,nr,"f").closed)).subscribe(i=>{const{args:a,value:s,transaction:c,ref:l}=i,u=l!=null?l:me(this,Po,"f").call(this,a);me(this,Ur,"f").setItem(u,{value:s,args:a,transaction:c})}))}next(e,r){me(this,Ro,"f").next({args:e,options:r})}query(e,r){var n;const o=me(this,Po,"f").call(this,e);return(n=me(this,nr,"f").getTaskByRef(o))!==null&&n!==void 0?n:this._createTask(o,e,r)}queryAsync(e,r){const n=r||{},{awaitResolve:o}=n,i=dT(n,["awaitResolve"]);return(o?xc:go)(this._query(e,i))}complete(){me(this,Kn,"f").unsubscribe()}_query(e,r){var n;const o=me(this,Po,"f").call(this,e);return(n=me(this,nr,"f").getTaskByRef(o))!==null&&n!==void 0?n:this._createTask(o,e,r)}_createTask(e,r,n){var o;const i=new ey,a=me(this,Ur,"f").getItem(e);if(a){const{value:l,args:u,created:h,updated:d,updates:f,transaction:m}=a,v={status:"cache",value:l,args:u,created:h,updated:d,updates:f,transaction:m};i.next(v)}const s=((o=n==null?void 0:n.cache)===null||o===void 0?void 0:o.validate)||me(this,Js,"f");return a&&s(a,r)?i.complete():me(this,Ro,"f").next({args:r,options:{ref:e,task:i}}),i.asObservable()}}Kn=new WeakMap,nr=new WeakMap,Ur=new WeakMap,Ro=new WeakMap,Po=new WeakMap,Js=new WeakMap,xd=new WeakMap;Kt.extractQueryValue=qS;var dn=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Kp=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,r,n,o){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?o.call(t,r):o?o.value=r:e.set(t,r),r},na,Lr;class fT extends Ie{get currentContext(){return dn(this,Lr,"f").value}get currentContext$(){return dn(this,Lr,"f").asObservable()}get client(){return dn(this,na,"f")}constructor(e){super(r=>dn(this,Lr,"f").subscribe(r)),na.set(this,void 0),Lr.set(this,void 0),Kp(this,na,new Kt(e.query),"f"),Kp(this,Lr,new gl(e.initial),"f")}setCurrentContext(e){typeof e=="string"?this.resolveContext(e).pipe(rn(()=>po)).subscribe(r=>dn(this,Lr,"f").next(r)):e!==dn(this,Lr,"f").value&&dn(this,Lr,"f").next(e)}resolveContext(e){return dn(this,na,"f").query({id:e}).pipe(yt(r=>r.value))}}na=new WeakMap,Lr=new WeakMap;var ht=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},qi=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,r,n,o){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?o.call(t,r):o?o.value=r:e.set(t,r),r},Dr,Xs,oa,No,Zs,ia;class pT{get contextClient(){return ht(this,Dr,"f")}get queryClient(){return ht(this,Xs,"f")}queryContext(e){const r=this.queryClient.query({search:e,filter:{type:ht(this,Zs,"f")}}).pipe(yt(n=>n.value));return ht(this,ia,"f")?r.pipe(yt(ht(this,ia,"f"))):r}queryContextAsync(e){return xc(this.queryContext(e))}get currentContext$(){return ht(this,Dr,"f").currentContext$}get currentContext(){return ht(this,Dr,"f").currentContext}set currentContext(e){ht(this,oa,"f")?ht(this,oa,"f").dispatchEvent("onCurrentContextChange",{source:this,canBubble:!0,cancelable:!0,detail:{context:e}}).then(r=>{r.canceled||ht(this,Dr,"f").setCurrentContext(e)}):ht(this,Dr,"f").setCurrentContext(e)}constructor(e){Dr.set(this,void 0),Xs.set(this,void 0),oa.set(this,void 0),No.set(this,new an),Zs.set(this,void 0),ia.set(this,void 0);const{config:r,event:n,parentContext:o}=e;qi(this,Zs,r.contextType,"f"),qi(this,ia,r.contextFilter,"f"),qi(this,Dr,new fT(r.getContext),"f"),qi(this,Xs,new Kt(r.queryContext),"f"),n&&(qi(this,oa,n,"f"),ht(this,No,"f").add(ht(this,Dr,"f").currentContext$.pipe(yy()).subscribe(([i,a])=>{n.dispatchEvent("onCurrentContextChanged",{source:this,canBubble:!0,detail:{previous:i,next:a}})})),ht(this,No,"f").add(n.addEventListener("onCurrentContextChanged",i=>{i.source!==this&&(this.currentContext=i.detail.next)}))),o&&ht(this,No,"f").add(o.contextClient.currentContext$.subscribe(i=>this.currentContext=i))}dispose(){ht(this,No,"f").unsubscribe()}}Dr=new WeakMap,Xs=new WeakMap,oa=new WeakMap,No=new WeakMap,Zs=new WeakMap,ia=new WeakMap;var gT=globalThis&&globalThis.__awaiter||function(t,e,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(u){try{l(n.next(u))}catch(h){a(h)}}function c(u){try{l(n.throw(u))}catch(h){a(h)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const mT="context",vT={name:mT,configure:()=>new jS,initialize:t=>gT(void 0,void 0,void 0,function*(){var e;const r=yield t.config.createConfig(t),n=t.hasModule("event")?yield t.requireInstance("event"):void 0,o=(e=t.ref)===null||e===void 0?void 0:e.context;return new pT({config:r,event:n,parentContext:o})}),dispose:t=>{t.instance.dispose()}},yT="modulepreload",_T=function(t){return"/"+t},Gp={},wT=function(e,r,n){if(!r||r.length===0)return e();const o=document.getElementsByTagName("link");return Promise.all(r.map(i=>{if(i=_T(i),i in Gp)return;Gp[i]=!0;const a=i.endsWith(".css"),s=a?'[rel="stylesheet"]':"";if(!!n)for(let u=o.length-1;u>=0;u--){const h=o[u];if(h.href===i&&(!a||h.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${s}`))return;const l=document.createElement("link");if(l.rel=a?"stylesheet":yT,a||(l.as="script",l.crossOrigin=""),l.href=i,document.head.appendChild(l),a)return new Promise((u,h)=>{l.addEventListener("load",u),l.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>e())},ET=(t,e)=>JSON.stringify(t)===JSON.stringify(e);var ft=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Os=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,r,n,o){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?o.call(t,r):o?o.value=r:e.set(t,r),r},Oo,aa,sa,xo,hn;class CT extends Ie{get current(){return ft(this,xo,"f").value}get current$(){return ft(this,xo,"f").pipe(my(ET))}constructor(e){super(o=>this.current$.subscribe(o)),Oo.set(this,void 0),aa.set(this,void 0),sa.set(this,void 0),xo.set(this,void 0),hn.set(this,new an);const{event:r,config:n}=e;Os(this,xo,new gl(void 0),"f"),Os(this,Oo,new Kt(n.getApp),"f"),Os(this,aa,new Kt(n.getApps),"f"),Os(this,sa,new Kt(n.getConfig),"f"),ft(this,hn,"f").add(ft(this,Oo,"f").complete),ft(this,hn,"f").add(ft(this,aa,"f").complete),ft(this,hn,"f").add(ft(this,sa,"f").complete),ft(this,hn,"f").add(this.current$.pipe(yy(),_y(()=>!!r)).subscribe(([o,i])=>{r==null||r.dispatchEvent("onCurrentAppChanged",{source:this,detail:{previous:o,next:i}})}))}getApp(e){return Kt.extractQueryValue(ft(this,Oo,"f").query({appKey:e}).pipe(rn(r=>{throw Error("failed to load manifest",{cause:r})})))}getAllApps(){return Kt.extractQueryValue(ft(this,aa,"f").query())}getAppConfig(e,r){return Kt.extractQueryValue(ft(this,sa,"f").query({appKey:e,tag:r}).pipe(rn(n=>{throw Error("failed to load config",{cause:n})})))}setCurrentApp(e){return new Promise((r,n)=>{const o=ft(this,Oo,"f").query({appKey:e});ft(this,hn,"f").add(Kt.extractQueryValue(o).subscribe({next:i=>ft(this,xo,"f").next(i),error:n,complete:r}))})}loadApp(e){const r=this.getApp(e).pipe(Qn(o=>go(br(wT(()=>import(o.entry),[])).pipe(yt(i=>({manifest:o,module:i})))))),n=this.getAppConfig(e).pipe(yt(o=>({config:o})));return QE(r,n).pipe(Fh((o,i)=>Object.assign({},o,i),{}),Ai(o=>["manifest","module","config"].every(i=>!!o[i])),vy(()=>"failed to load application"))}dispose(){ft(this,hn,"f").unsubscribe()}}Oo=new WeakMap,aa=new WeakMap,sa=new WeakMap,xo=new WeakMap,hn=new WeakMap;var ST=globalThis&&globalThis.__awaiter||function(t,e,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(u){try{l(n.next(u))}catch(h){a(h)}}function c(u){try{l(n.throw(u))}catch(h){a(h)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const Md="app",TT={name:Md,configure:()=>new bT,initialize:t=>ST(void 0,void 0,void 0,function*(){const e=yield t.config.createConfig(t),r=yield t.requireInstance("event").catch(()=>{});return new CT({config:e,event:r})}),dispose:t=>{t.instance.dispose()}};var Vp=globalThis&&globalThis.__awaiter||function(t,e,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(u){try{l(n.next(u))}catch(h){a(h)}}function c(u){try{l(n.throw(u))}catch(h){a(h)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};class bT{constructor(){this.defaultExpireTime=1*60*1e3}_createHttpClient(e){return Vp(this,void 0,void 0,function*(){const r=yield e.requireInstance("http");if(r.hasClient(Md))return r.createClient(Md);{const n=yield e.requireInstance("serviceDiscovery");try{return yield n.createClient("app")}catch{return yield n.createClient("portal")}}})}createConfig(e){return Vp(this,void 0,void 0,function*(){const r=yield this._createHttpClient(e),n={getApp:{client:{fn:({appKey:o})=>r.json$(`/api/apps/${o}`)},key:({appKey:o})=>o},getApps:{client:{fn:()=>r.json$("/api/apps")},key:()=>"apps"},getConfig:{client:{fn:({appKey:o,tag:i})=>r.json$(`/api/apps/${o}/config${i?`?tag=${i}`:""}`)},key:o=>JSON.stringify(o)}};return this.processConfig(n)})}processConfig(e){return e}}var Wp=globalThis&&globalThis.__awaiter||function(t,e,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(u){try{l(n.next(u))}catch(h){a(h)}}function c(u){try{l(n.throw(u))}catch(h){a(h)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};class IT{constructor(e){this.clientKey=e.clientKey,this.endpoint=e.endpoint,this.clientCtor=e.clientCtor}createHttpClientClient(e){return Wp(this,void 0,void 0,function*(){if(!this.clientKey)throw Error("no http client for service discovery is provided!");return e.createClient(this.clientKey)})}createClient(e){return Wp(this,void 0,void 0,function*(){if(!this.endpoint)throw Error("no endpoint defined!");return new this.clientCtor({http:e,endpoint:this.endpoint})})}}var cu=globalThis&&globalThis.__awaiter||function(t,e,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(u){try{l(n.next(u))}catch(h){a(h)}}function c(u){try{l(n.throw(u))}catch(h){a(h)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};class kT{constructor(e,r){this._client=e,this._http=r}get environment(){return this._client.environment}resolveService(e){return cu(this,void 0,void 0,function*(){return this._client.resolveService(e)})}createClient(e,r){return cu(this,void 0,void 0,function*(){const n=yield this.resolveService(e);if(!n)throw Error(`Could not load configuration of service [${e}]`);return this._http.createClient(Object.assign(Object.assign({},r),{baseUri:n.uri,defaultScopes:n.defaultScopes}))})}configureClient(e,r){return cu(this,void 0,void 0,function*(){const{key:n,alias:o}=typeof e=="string"?{key:e,alias:e}:e,{uri:i,defaultScopes:a}=yield this.resolveService(n);r.addConfig(Cy(o,{baseUri:i,defaultScopes:a}))})}}var Yp=globalThis&&globalThis.__awaiter||function(t,e,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(u){try{l(n.next(u))}catch(h){a(h)}}function c(u){try{l(n.throw(u))}catch(h){a(h)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((n=n.apply(t,e||[])).next())})},AT=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},RT=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,r,n,o){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?o.call(t,r):o?o.value=r:e.set(t,r),r},ec;class PT{get environment(){return go(Kt.extractQueryValue(AT(this,ec,"f").query(void 0,{cache:{suppressInvalid:!0}})))}constructor({http:e,endpoint:r}){ec.set(this,void 0),this.http=e,this.endpoint=r,RT(this,ec,new Kt({client:{fn:()=>e.fetch$(r,{selector:this.selector.bind(this)}).pipe(yd(n=>console.log("\u{1F525}",n)))},key:()=>"services",expire:5*60*1e3}),"f")}selector(e){return Yp(this,void 0,void 0,function*(){const r=yield e.json(),n=r.services.reduce((o,i)=>Object.assign(o,{[i.key]:{clientId:r.clientId,uri:i.uri,defaultScopes:[r.clientId+"/.default"]}}),{});return Object.assign(Object.assign({},r),{services:n})})}resolveService(e){return Yp(this,void 0,void 0,function*(){try{const{services:r}=yield this.environment;return r[e]}catch(r){throw console.error(r),r}})}}ec=new WeakMap;const NT="serviceDiscovery";var OT=globalThis&&globalThis.__awaiter||function(t,e,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(u){try{l(n.next(u))}catch(h){a(h)}}function c(u){try{l(n.throw(u))}catch(h){a(h)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const xT={name:NT,configure:()=>new IT({clientCtor:PT,clientKey:"service_discovery",endpoint:"/_discovery/environments/current"}),initialize:({config:t,requireInstance:e})=>OT(void 0,void 0,void 0,function*(){const r=yield e("http"),n=yield t.createHttpClientClient(r),o=yield t.createClient(n);return new kT(o,r)})};class MT{}class Gy extends Error{constructor(e,r){super(`unsupported version ${e}`,{cause:r}),this.version=e}}const UT=(t,e)=>{var r;const n=(r=Qr[t])!==null&&r!==void 0?r:t;switch(n){case Qr.v2:throw new Gy(t);case Qr.v1:default:{const{id:o}=e,i=new URLSearchParams;return i.append("api-version",n),`/contexts/${o}/?${String(i)}`}}},LT=(t,e,r)=>[UT(t,e),r],DT=(t,e,r="json")=>(n,o)=>t[r](...LT(e,n,o));var HT=["eq","ne","gt","ge","lt","le"],xs=["and","or","not"],FT=["any","all"],$T=["startswith","endswith","contains"],zT=["expand","levels","select","skip","top","count","orderby","filter"],Qp=/\((.*)\)/,Jp=/(?!indexof)\((\w+)\)/,Xp;(function(t){t.sum="sum",t.min="min",t.max="max",t.average="average",t.countdistinct="countdistinct"})(Xp||(Xp={}));var Mr="";function jT(t){var e=t===void 0?{}:t,r=e.select,n=e.search,o=e.skiptoken,i=e.format,a=e.top,s=e.skip,c=e.filter,l=e.transform,u=e.orderBy,h=e.key,d=e.count,f=e.expand,m=e.action,v=e.func,E="",g=[],p={};if(h!=null&&(E+="(".concat(Cr(h,g),")")),(c||typeof d=="object")&&(p.$filter=qa(typeof d=="object"?d:c,g)),l&&(p.$apply=Vy(l)),f&&(p.$expand=tc(f)),u&&(p.$orderby=Kh(u)),d&&(typeof d=="boolean"?p.$count=!0:E+="/$count"),typeof a=="number"&&(p.$top=a),typeof s=="number"&&(p.$skip=s),m&&(E+="/".concat(m)),v){if(typeof v=="string")E+="/".concat(v);else if(typeof v=="object"){var y=Object.keys(v)[0],w=Cr(v[y],g);E+="/".concat(y),w!==""&&(E+="(".concat(w,")"))}}return g.length>0&&Object.assign(p,g.reduce(function(k,P){var M;return Object.assign(k,(M={},M["@".concat(P.name)]=Cr(P.value),M))},{})),VT(E,ho({$select:r,$search:n,$skiptoken:o,$format:i},p))}function lu(t,e,r){return r===void 0&&(r=[]),"".concat(t," eq ").concat(Cr(e,r))}function qa(t,e,r){return t===void 0&&(t={}),e===void 0&&(e=[]),r===void 0&&(r=""),(Array.isArray(t)?t:[t]).reduce(function(i,a){if(a){var s=n(a,e,r);s&&i.push(s)}return i},[]).join(" and ");function n(i,a,s){i===void 0&&(i={}),a===void 0&&(a=[]),s===void 0&&(s="");var c="";if(typeof i=="string")c=i;else if(i&&typeof i=="object"){var l=Object.keys(i).reduce(function(u,h){var d=i[h];if(d===void 0)return u;var f="";if(s?h===Mr?f=s:Jp.test(h)?f=h.replace(Jp,function(p,y){return y.trim()===Mr?"(".concat(s,")"):"(".concat(s,"/").concat(y.trim(),")")}):Qp.test(h)?f=h.replace(Qp,function(p,y){return y.trim()===Mr?"(".concat(s,")"):"(".concat(s,"/").concat(y.trim(),")")}):f="".concat(s,"/").concat(h):f=h,h===Mr&&Array.isArray(d))return u.concat(d.map(function(p){return lu(f,p)}));if(["number","string","boolean"].indexOf(typeof d)!==-1||d instanceof Date||d===null)u.push(lu(f,d,a));else if(Array.isArray(d)){var m=h,v=d.map(function(p){return qa(p,a,s)}).filter(function(p){return p}).map(function(p){return xs.indexOf(m)!==-1?"(".concat(p,")"):p});v.length&&(xs.indexOf(m)!==-1?v.length&&(m==="not"?u.push(Zp(v)):u.push("(".concat(v.join(" ".concat(m," ")),")"))):u.push(v.join(" ".concat(m," "))))}else if(xs.indexOf(f)!==-1){var E=f,v=Object.keys(d).map(function(y){var w;return n((w={},w[y]=d[y],w))});v.length&&(E==="not"?u.push(Zp(v)):u.push("(".concat(v.join(" ".concat(E," ")),")")))}else if(typeof d=="object")if("type"in d)u.push(lu(f,d,a));else{var g=Object.keys(d);g.forEach(function(p){if(d[p]!==void 0)if(HT.indexOf(p)!==-1)u.push("".concat(f," ").concat(p," ").concat(Cr(d[p],a)));else if(xs.indexOf(p)!==-1)Array.isArray(d[p])?u.push(d[p].map(function(P){return"("+n(P,a,f)+")"}).join(" ".concat(p," "))):u.push("("+n(d[p],a,f)+")");else if(FT.indexOf(p)!==-1){var y=o(h.toLowerCase(),d[p],p,f);y&&u.push(y)}else if(p==="has")u.push("".concat(f," ").concat(p," ").concat(Cr(d[p],a)));else if(p==="in"){var w=Array.isArray(d[p])?d[p]:d[p].value.map(function(P){return{type:d[p].type,value:P}});u.push(f+" in ("+w.map(function(P){return Cr(P,a)}).join(",")+")")}else if($T.indexOf(p)!==-1)u.push("".concat(p,"(").concat(f,",").concat(Cr(d[p],a),")"));else{var k=n(d,a,f);k&&u.push(k)}})}else throw new Error("Unexpected value type: ".concat(d));return u},[]);c=l.join(" and ")}return c}function o(i,a,s,c){var l="";if(typeof a=="string"||a instanceof String)l=BT(i,a,s,c);else if(a){var u=Array.isArray(a)?a.reduce(function(d,f){return f.hasOwnProperty(Mr)?(d.hasOwnProperty(Mr)||(d[Mr]=[]),d[Mr].push(f[Mr]),d):ho(ho({},d),f)},{}):a,h=n(u,e,i);l="".concat(c,"/").concat(s,"(").concat(h?"".concat(i,":").concat(h):"",")")}return l}}function BT(t,e,r,n){var o="",i=r=="all"?"ne":"eq";return o="".concat(n,"/").concat(r,"(").concat(t,": ").concat(t," ").concat(i," '").concat(e,"')"),o}function qT(t){return t=t.replace(/%/g,"%25"),t=t.replace(/\+/g,"%2B"),t=t.replace(/\//g,"%2F"),t=t.replace(/\?/g,"%3F"),t=t.replace(/#/g,"%23"),t=t.replace(/&/g,"%26"),t=t.replace(/'/g,"''"),t}function Cr(t,e){if(typeof t=="string")return"'".concat(qT(t),"'");if(t instanceof Date)return t.toISOString();if(typeof t=="number")return t;if(Array.isArray(t))return"[".concat(t.map(function(r){return Cr(r)}).join(","),"]");if(t===null)return t;if(typeof t=="object")switch(t.type){case"raw":case"guid":return t.value;case"duration":return"duration'".concat(t.value,"'");case"binary":return"binary'".concat(t.value,"'");case"alias":return Array.isArray(e)&&e.push(t),"@".concat(t.name);case"json":return escape(JSON.stringify(t.value));case"decimal":return"".concat(t.value,"M");default:return Object.entries(t).filter(function(r){var n=r[1];return n!==void 0}).map(function(r){var n=r[0],o=r[1];return"".concat(n,"=").concat(Cr(o,e))}).join(",")}return t}function tc(t){if(typeof t=="number")return t;if(typeof t=="string")return t.indexOf("/")===-1?t:t.split("/").reverse().reduce(function(r,n,o,i){return o===0?"$expand=".concat(n):o===i.length-1?"".concat(n,"(").concat(r,")"):"$expand=".concat(n,"(").concat(r,")")},"");if(Array.isArray(t))return"".concat(t.map(function(r){return tc(r)}).join(","));if(typeof t=="object"){var e=Object.keys(t);return e.some(function(r){return zT.indexOf(r.toLowerCase())!==-1})?e.map(function(r){var n;switch(r){case"filter":n=qa(t[r]);break;case"orderBy":n=Kh(t[r]);break;case"levels":case"count":case"skip":case"top":n="".concat(t[r]);break;default:n=tc(t[r])}return"$".concat(r.toLowerCase(),"=").concat(n)}).join(";"):e.map(function(r){var n=tc(t[r]);return n?"".concat(r,"(").concat(n,")"):r}).join(",")}return""}function Vy(t){var e=Array.isArray(t)?t:[t],r=e.reduce(function(n,o){var i=o.aggregate,a=o.filter,s=o.groupBy,c=Yv(o,["aggregate","filter","groupBy"]),l=Object.keys(c);if(l.length)throw new Error("Unsupported transform(s): ".concat(l));if(i&&n.push("aggregate(".concat(KT(i),")")),a){var u=qa(a);u&&n.push("filter(".concat(qa(u),")"))}return s&&n.push("groupby(".concat(GT(s),")")),n},[]);return r.join("/")||void 0}function KT(t){var e=Array.isArray(t)?t:[t];return e.map(function(r){return typeof r=="string"?r:Object.keys(r).map(function(n){var o=r[n];if(!o.with)throw new Error("'with' property required for '".concat(n,"'"));if(!o.as)throw new Error("'as' property required for '".concat(n,"'"));return"".concat(n," with ").concat(o.with," as ").concat(o.as)})}).join(",")}function GT(t){if(!t.properties)throw new Error("'properties' property required for groupBy");var e="(".concat(t.properties.join(","),")");return t.transform&&(e+=",".concat(Vy(t.transform))),e}function Kh(t,e){return e===void 0&&(e=""),Array.isArray(t)?t.map(function(r){return Array.isArray(r)&&r.length===2&&["asc","desc"].indexOf(r[1])!==-1?r.join(" "):r}).map(function(r){return"".concat(e).concat(String(r))}).join(","):typeof t=="object"?Object.entries(t).map(function(r){var n=r[0],o=r[1];return Kh(o,"".concat(n,"/"))}).map(function(r){return"".concat(e).concat(r)}).join(","):"".concat(e).concat(String(t))}function VT(t,e){var r=Object.getOwnPropertyNames(e).filter(function(n){return e[n]!==void 0&&e[n]!==""}).map(function(n){return"".concat(n,"=").concat(e[n])});return r.length?"".concat(t,"?").concat(r.join("&")):t}function Zp(t){return"not(".concat(t.join(" and "),")")}const WT=t=>Object.keys(t).reduce((e,r)=>{var n;switch(r){case"type":return!((n=t[r])===null||n===void 0)&&n.length?Object.assign(Object.assign({},e),{[r]:{in:t[r]}}):e;default:return Object.assign(Object.assign({},e),{[r]:t[r]})}},{}),YT=t=>Object.keys(t).reduce((e,r)=>{switch(r){case"filter":return Object.assign(Object.assign({},e),{[r]:WT(t.filter)});default:return Object.assign(Object.assign({},e),{[r]:t[r]})}},{}),QT=t=>typeof t=="string"?t:jT(YT(t)),JT=(t,e)=>{var r;const n=(r=Qr[t])!==null&&r!==void 0?r:t;switch(n){case Qr.v2:throw new Gy(t);case Qr.v1:default:{const{query:o,includeDeleted:i}=e,a=new URLSearchParams(QT(o));return a.append("api-version",n),i&&a.append("includeDeleted","true"),`/contexts/?${String(a)}`}}},XT=(t,e,r)=>[JT(t,e),r],ZT=(t,e,r="json")=>(n,o)=>t[r](...XT(e,n,o));class e1{get Version(){return Qr}constructor(e,r){this._client=e,this._method=r}get(e,...r){return DT(this._client,e,this._method)(...r)}query(e,...r){return ZT(this._client,e,this._method)(...r)}}var Qr;(function(t){t.v1="1.0",t.v2="2.0"})(Qr||(Qr={}));const t1=(t,e)=>{switch(t){case"v1":{const{id:r}=e,n=new URLSearchParams;return n.append("api-version","1.0"),`/bookmarks/${r}/?${String(n)}`}default:{const{id:r}=e,n=new URLSearchParams;return n.append("api-version",t),`/bookmarks/${r}/?${String(n)}`}}},r1=(t,e,r)=>{const n=t1(t,e),o=Object.assign({},{method:"Delete"},r);return[n,o]},n1=(t,e,r="json")=>(n,o)=>t[r](...r1(e,n,o)),o1=n1,i1=(t,e)=>{switch(t){case"v1":{const{id:r}=e,n=new URLSearchParams;return n.append("api-version","1.0"),`/bookmarks/${r}/?${String(n)}`}default:{const{id:r}=e,n=new URLSearchParams;return n.append("api-version",t),`/bookmarks/${r}/?${String(n)}`}}},a1=(t,e,r)=>[i1(t,e),r],s1=(t,e,r="json")=>(n,o)=>t[r](...a1(e,n,o)),c1=s1,l1=(t,e)=>{switch(t){case"v1":{const r=new URLSearchParams;return r.append("api-version","1.0"),`/bookmarks?${String(r)}`}default:{const r=new URLSearchParams;return r.append("api-version",t),`/bookmarks?${String(r)}`}}},u1=(t,e,r)=>{const n=l1(t),o=new Headers;o.append("content-type","application/json");const i=Object.assign({},{method:"post",body:JSON.stringify(e),headers:o},r);return[n,i]},d1=(t,e,r="json")=>(n,o)=>t[r](...u1(e,n,o)),h1=d1;class f1{constructor(e,r){this._client=e,this._method=r}get(e,...r){return c1(this._client,e,this._method)(...r)}post(e,...r){return h1(this._client,e,this._method)(...r)}delete(e,...r){return o1(this._client,e,this._method)(...r)}}const p1=f1;var eg=globalThis&&globalThis.__awaiter||function(t,e,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(u){try{l(n.next(u))}catch(h){a(h)}}function c(u){try{l(n.throw(u))}catch(h){a(h)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};class g1{constructor({createClient:e}){this._createClientFn=e}createBookmarksClient(e){return eg(this,void 0,void 0,function*(){const r=yield this._createClientFn("bookmarks");return new p1(r,e)})}createContextClient(e){return eg(this,void 0,void 0,function*(){const r=yield this._createClientFn("context");return new e1(r,e)})}}var Wy=globalThis&&globalThis.__awaiter||function(t,e,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(u){try{l(n.next(u))}catch(h){a(h)}}function c(u){try{l(n.throw(u))}catch(h){a(h)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const m1="services",v1=(t,e)=>r=>Wy(void 0,void 0,void 0,function*(){if(t.hasClient(r))return t.createClient(r);if(e)return e.createClient(r);throw Error(`failed to create http client for service ${r}`)}),y1={name:m1,configure:()=>new MT,initialize:({ref:t,config:e,requireInstance:r,hasModule:n})=>Wy(void 0,void 0,void 0,function*(){if(!e.createClient){const o=yield r("http"),i=n("serviceDiscovery")?yield r("serviceDiscovery"):t==null?void 0:t.serviceDiscovery;e.createClient=v1(o,i)}if(!e.createClient)throw Error("missing configuration for creating API client");return new g1(e)})},_1=y1;class w1 extends sC{constructor(){super([pC,Dy,$h,xT,_1,TT,vT]),this.logger=new Wv("FrameworkConfigurator")}configureHttp(...e){this.addConfig(bC(...e))}configureHttpClient(...e){this.addConfig(Cy(...e))}configureMsal(...e){this.addConfig(HS(...e))}configureServiceDiscovery(e){this.configureHttpClient("service_discovery",e.client)}}var E1=globalThis&&globalThis.__awaiter||function(t,e,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(u){try{l(n.next(u))}catch(h){a(h)}}function c(u){try{l(n.throw(u))}catch(h){a(h)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const C1=(t,e)=>E1(void 0,void 0,void 0,function*(){const r=yield t.initialize(e),n={modules:r};return window.Fusion=n,r.event.dispatchEvent("onFrameworkLoaded",{detail:n}),n});var _l={exports:{}},wl={};/**
|
|
62
62
|
* @license React
|
|
63
63
|
* react-jsx-runtime.production.min.js
|
|
64
64
|
*
|