@equinor/fusion-framework-cli 9.11.0 → 9.11.1
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.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 9.11.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`036ec15`](https://github.com/equinor/fusion-framework/commit/036ec151ace9c051ded41798ab94b8ee5e3d4461)]:
|
|
8
|
+
- @equinor/fusion-framework-app@9.0.2
|
|
9
|
+
|
|
3
10
|
## 9.11.0
|
|
4
11
|
|
|
5
12
|
### Minor Changes
|
|
@@ -71,7 +71,7 @@ Error: `+c.errorCode+`
|
|
|
71
71
|
Error Description: `+c.errorMessage):(l=c,this.logger.error(`A non-MSALJS error was thrown while attempting to get the cloud instance discovery metadata.
|
|
72
72
|
Error: `+l.name+`
|
|
73
73
|
Error Description: `+l.message)),[2,null];case 4:return i||(this.logger.warning("The developer's authority was not found within the CloudInstanceDiscoveryMetadata returned from the network request."),this.logger.verbose("Creating custom Authority for custom domain scenario."),i=t.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)),[2,i]}})})},t.prototype.getCloudDiscoveryMetadataFromHarcodedValues=function(){return this.canonicalAuthority in Ob?Ob[this.canonicalAuthority]:null},t.prototype.isInKnownAuthorities=function(){var e=this,r=this.authorityOptions.knownAuthorities.filter(function(n){return Ue.getDomainFromUrl(n).toLowerCase()===e.hostnameAndPort});return r.length>0},t.generateAuthority=function(e,r){var n;if(r&&r.azureCloudInstance!==jh.None){var i=r.tenant?r.tenant:A.DEFAULT_COMMON_TENANT;n=r.azureCloudInstance+"/"+i+"/"}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 i=e[n];if(i.aliases.indexOf(r)>-1)return i}return null},t.prototype.getPreferredCache=function(){if(this.discoveryComplete())return this.metadata.preferred_cache;throw se.createEndpointDiscoveryIncompleteError("Discovery incomplete.")},t.prototype.isAlias=function(e){return this.metadata.aliases.indexOf(e)>-1},t.isPublicCloudAuthority=function(e){return A.KNOWN_PUBLIC_CLOUDS.indexOf(e)>=0},t.buildRegionalAuthorityString=function(e,r,n){var i=new Ue(e);i.validateAsUri();var o=i.getUrlComponents(),a=r+"."+o.HostNameAndPort;this.isPublicCloudAuthority(o.HostNameAndPort)&&(a=r+"."+A.REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX);var s=Ue.constructAuthorityUriFromObject(rt(rt({},i.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,A.REGIONAL_AUTH_NON_MSI_QUERY_STRING),e.end_session_endpoint&&(e.end_session_endpoint=t.buildRegionalAuthorityString(e.end_session_endpoint,r)),e},t.transformCIAMAuthority=function(e){var r=e.endsWith(A.FORWARD_SLASH)?e:""+e+A.FORWARD_SLASH,n=new Ue(e),i=n.getUrlComponents();if(i.PathSegments.length===0&&i.HostNameAndPort.endsWith(A.CIAM_AUTH_URL)){var o=i.HostNameAndPort.split(".")[0];r=""+r+o+A.AAD_TENANT_DOMAIN_SUFFIX}return r},t.reservedTenantDomains=new Set(["{tenant}","{tenantid}",sc.COMMON,sc.CONSUMERS,sc.ORGANIZATIONS]),t}();/*! @azure/msal-common v13.3.1 2023-10-27 */var V2=function(){function t(){}return t.createDiscoveredInstance=function(e,r,n,i,o,a,s){return Te(this,void 0,void 0,function(){var c,l,d;return Pe(this,function(u){switch(u.label){case 0:a==null||a.addQueueMeasurement(L.AuthorityFactoryCreateDiscoveredInstance,s),c=Bh.transformCIAMAuthority(e),l=t.createInstance(c,r,n,i,o,a,s),u.label=1;case 1:return u.trys.push([1,3,,4]),a==null||a.setPreQueueTime(L.AuthorityResolveEndpointsAsync,s),[4,l.resolveEndpointsAsync()];case 2:return u.sent(),[2,l];case 3:throw d=u.sent(),se.createEndpointDiscoveryIncompleteError(d);case 4:return[2]}})})},t.createInstance=function(e,r,n,i,o,a,s){if(ae.isEmpty(e))throw wt.createUrlEmptyError();return new Bh(e,r,n,i,o,a,s)},t}();/*! @azure/msal-common v13.3.1 2023-10-27 */var F2=function(){function t(){this.failedRequests=[],this.errors=[],this.cacheHits=0}return t.isServerTelemetryEntity=function(e,r){var n=e.indexOf($r.CACHE_KEY)===0,i=!0;return r&&(i=r.hasOwnProperty("failedRequests")&&r.hasOwnProperty("errors")&&r.hasOwnProperty("cacheHits")),n&&i},t}();/*! @azure/msal-common v13.3.1 2023-10-27 */var Lb=function(){function t(){}return t.isThrottlingEntity=function(e,r){var n=!1;e&&(n=e.indexOf(dh.THROTTLING_PREFIX)===0);var i=!0;return r&&(i=r.hasOwnProperty("throttleTime")),n&&i},t}();/*! @azure/msal-common v13.3.1 2023-10-27 */var zL={sendGetRequestAsync:function(){var t="Network interface - sendGetRequestAsync() has not been implemented for the Network interface.";return Promise.reject(fe.createUnexpectedError(t))},sendPostRequestAsync:function(){var t="Network interface - sendPostRequestAsync() has not been implemented for the Network interface.";return Promise.reject(fe.createUnexpectedError(t))}};/*! @azure/msal-common v13.3.1 2023-10-27 */var Ef={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."}},Nb=function(t){Vn(e,t);function e(r,n){var i=t.call(this,r,n)||this;return i.name="JoseHeaderError",Object.setPrototypeOf(i,e.prototype),i}return e.createMissingKidError=function(){return new e(Ef.missingKidError.code,Ef.missingKidError.desc)},e.createMissingAlgError=function(){return new e(Ef.missingAlgError.code,Ef.missingAlgError.desc)},e}(fe);/*! @azure/msal-common v13.3.1 2023-10-27 */var jL=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 Nb.createMissingKidError();if(!e.alg)throw Nb.createMissingAlgError();var r=new t({typ:e.typ||L4.Pop,kid:e.kid,alg:e.alg});return JSON.stringify(r)},t}();/*! @azure/msal-common v13.3.1 2023-10-27 */var UL=function(){function t(e,r){this.cacheOutcome=za.NO_CACHE_HIT,this.cacheManager=r,this.apiId=e.apiId,this.correlationId=e.correlationId,this.wrapperSKU=e.wrapperSKU||A.EMPTY_STRING,this.wrapperVer=e.wrapperVer||A.EMPTY_STRING,this.telemetryCacheKey=$r.CACHE_KEY+_r.CACHE_KEY_SEPARATOR+e.clientId}return t.prototype.generateCurrentRequestHeaderValue=function(){var e=""+this.apiId+$r.VALUE_SEPARATOR+this.cacheOutcome,r=[this.wrapperSKU,this.wrapperVer].join($r.VALUE_SEPARATOR),n=this.getRegionDiscoveryFields(),i=[e,n].join($r.VALUE_SEPARATOR);return[$r.SCHEMA_VERSION,i,r].join($r.CATEGORY_SEPARATOR)},t.prototype.generateLastRequestHeaderValue=function(){var e=this.getLastRequests(),r=t.maxErrorsToSend(e),n=e.failedRequests.slice(0,2*r).join($r.VALUE_SEPARATOR),i=e.errors.slice(0,r).join($r.VALUE_SEPARATOR),o=e.errors.length,a=r<o?$r.OVERFLOW_TRUE:$r.OVERFLOW_FALSE,s=[o,a].join($r.VALUE_SEPARATOR);return[$r.SCHEMA_VERSION,e.cacheHits,n,i,s].join($r.CATEGORY_SEPARATOR)},t.prototype.cacheFailedRequest=function(e){var r=this.getLastRequests();r.errors.length>=$r.MAX_CACHED_ERRORS&&(r.failedRequests.shift(),r.failedRequests.shift(),r.errors.shift()),r.failedRequests.push(this.apiId,this.correlationId),ae.isEmpty(e.subError)?ae.isEmpty(e.errorCode)?e&&e.toString()?r.errors.push(e.toString()):r.errors.push($r.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 F2,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 i=new F2;i.failedRequests=e.failedRequests.slice(r*2),i.errors=e.errors.slice(r),this.cacheManager.setServerTelemetry(this.telemetryCacheKey,i)}},t.maxErrorsToSend=function(e){var r,n=0,i=0,o=e.errors.length;for(r=0;r<o;r++){var a=e.failedRequests[2*r]||A.EMPTY_STRING,s=e.failedRequests[2*r+1]||A.EMPTY_STRING,c=e.errors[r]||A.EMPTY_STRING;if(i+=a.toString().length+s.toString().length+c.length+3,i<$r.MAX_LAST_HEADER_BYTES)n+=1;else break}return n},t.prototype.getRegionDiscoveryFields=function(){var e=[];return e.push(this.regionUsed||A.EMPTY_STRING),e.push(this.regionSource||A.EMPTY_STRING),e.push(this.regionOutcome||A.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 v13.3.1 2023-10-27 */var Gk=function(){function t(e,r,n,i,o,a){this.authority=r,this.libraryName=i,this.libraryVersion=o,this.applicationTelemetry=a,this.clientId=e,this.logger=n,this.callbacks=new Map,this.eventsByCorrelationId=new Map,this.queueMeasurements=new Map,this.preQueueTimeByCorrelationId=new Map}return t.prototype.startPerformanceMeasurement=function(e,r){return{}},t.prototype.startPerformanceMeasuremeant=function(e,r){return{}},t.prototype.getIntFields=function(){return HL},t.prototype.getPreQueueTime=function(e,r){var n=this.preQueueTimeByCorrelationId.get(r);if(n){if(n.name!==e){this.logger.trace("PerformanceClient.getPreQueueTime: no pre-queue time found for "+e+", unable to add queue measurement");return}}else{this.logger.trace("PerformanceClient.getPreQueueTime: no pre-queue times found for correlationId: "+r+", unable to add queue measurement");return}return n.time},t.prototype.calculateQueuedTime=function(e,r){return e<1?(this.logger.trace("PerformanceClient: preQueueTime should be a positive integer and not "+e),0):r<1?(this.logger.trace("PerformanceClient: currentTime should be a positive integer and not "+r),0):r<e?(this.logger.trace("PerformanceClient: currentTime is less than preQueueTime, check how time is being retrieved"),0):r-e},t.prototype.addQueueMeasurement=function(e,r,n,i){if(!r){this.logger.trace("PerformanceClient.addQueueMeasurement: correlationId not provided for "+e+", cannot add queue measurement");return}if(n===0)this.logger.trace("PerformanceClient.addQueueMeasurement: queue time provided for "+e+" is "+n);else if(!n){this.logger.trace("PerformanceClient.addQueueMeasurement: no queue time provided for "+e);return}var o={eventName:e,queueTime:n,manuallyCompleted:i},a=this.queueMeasurements.get(r);if(a)a.push(o),this.queueMeasurements.set(r,a);else{this.logger.trace("PerformanceClient.addQueueMeasurement: adding correlationId "+r+" to queue measurements");var s=[o];this.queueMeasurements.set(r,s)}this.preQueueTimeByCorrelationId.delete(r)},t.prototype.startMeasurement=function(e,r){var n=this,i,o,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:N2.InProgress,authority:this.authority,libraryName:this.libraryName,libraryVersion:this.libraryVersion,clientId:this.clientId,name:e,startTimeMs:Date.now(),correlationId:a,appName:(i=this.applicationTelemetry)===null||i===void 0?void 0:i.appName,appVersion:(o=this.applicationTelemetry)===null||o===void 0?void 0:o.appVersion};return this.cacheEventByCorrelationId(c),{endMeasurement:function(l){return n.endMeasurement(rt(rt({},c),l),s)},discardMeasurement:function(){return n.discardMeasurements(c.correlationId)},addStaticFields:function(l){return n.addStaticFields(l,c.correlationId)},increment:function(l){return n.increment(l,c.correlationId)},measurement:s,event:c}},t.prototype.endMeasurement=function(e,r){var n=this,i,o,a=this.eventsByCorrelationId.get(e.correlationId);if(!a)return this.logger.trace("PerformanceClient: Measurement not found for "+e.eventId,e.correlationId),null;var s=e.eventId===a.eventId,c={totalQueueTime:0,totalQueueCount:0,manuallyCompletedCount:0};s?(c=this.getQueueInfo(e.correlationId),this.discardCache(a.correlationId)):(i=a.incompleteSubMeasurements)===null||i===void 0||i.delete(e.eventId),r==null||r.endMeasurement();var l=r==null?void 0:r.flushMeasurement();if(!l)return this.logger.trace("PerformanceClient: Performance measurement not taken",a.correlationId),null;if(this.logger.trace("PerformanceClient: Performance measurement ended for "+e.name+": "+l+" ms",e.correlationId),!s)return a[e.name+"DurationMs"]=Math.floor(l),rt({},a);var d=rt(rt({},a),e),u=0;return(o=d.incompleteSubMeasurements)===null||o===void 0||o.forEach(function(h){n.logger.trace("PerformanceClient: Incomplete submeasurement "+h.name+" found for "+e.name,d.correlationId),u++}),d.incompleteSubMeasurements=void 0,d=rt(rt({},d),{durationMs:Math.round(l),queuedTimeMs:c.totalQueueTime,queuedCount:c.totalQueueCount,queuedManuallyCompletedCount:c.manuallyCompletedCount,status:N2.Completed,incompleteSubsCount:u}),this.truncateIntegralFields(d,this.getIntFields()),this.emitEvents([d],e.correlationId),d},t.prototype.addStaticFields=function(e,r){this.logger.trace("PerformanceClient: Updating static fields");var n=this.eventsByCorrelationId.get(r);n?this.eventsByCorrelationId.set(r,rt(rt({},n),e)):this.logger.trace("PerformanceClient: Event not found for",r)},t.prototype.increment=function(e,r){this.logger.trace("PerformanceClient: Updating counters");var n=this.eventsByCorrelationId.get(r);if(n)for(var i in e)n.hasOwnProperty(i)||(n[i]=0),n[i]+=e[i];else this.logger.trace("PerformanceClient: Event not found for",r)},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.incompleteSubMeasurements=r.incompleteSubMeasurements||new Map,r.incompleteSubMeasurements.set(e.eventId,{name:e.name,startTimeMs:e.startTimeMs})):(this.logger.trace("PerformanceClient: Performance measurement for "+e.name+" started",e.correlationId),this.eventsByCorrelationId.set(e.correlationId,rt({},e)))},t.prototype.getQueueInfo=function(e){var r=this.queueMeasurements.get(e);r||this.logger.trace("PerformanceClient: no queue measurements found for for correlationId: "+e);var n=0,i=0,o=0;return r==null||r.forEach(function(a){n+=a.queueTime,i++,o+=a.manuallyCompleted?1:0}),{totalQueueTime:n,totalQueueCount:i,manuallyCompletedCount:o}},t.prototype.discardMeasurements=function(e){this.logger.trace("PerformanceClient: Performance measurements discarded",e),this.eventsByCorrelationId.delete(e)},t.prototype.discardCache=function(e){this.discardMeasurements(e),this.logger.trace("PerformanceClient: QueueMeasurements discarded",e),this.queueMeasurements.delete(e),this.logger.trace("PerformanceClient: Pre-queue times discarded",e),this.preQueueTimeByCorrelationId.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(i,o){n.logger.trace("PerformanceClient: Emitting event to callback "+o,r),i.apply(null,[e])})},t.prototype.truncateIntegralFields=function(e,r){r.forEach(function(n){n in e&&typeof e[n]=="number"&&(e[n]=Math.floor(e[n]))})},t}();/*! @azure/msal-common v13.3.1 2023-10-27 */var Db=function(){function t(){}return t.prototype.startMeasurement=function(){},t.prototype.endMeasurement=function(){},t.prototype.flushMeasurement=function(){return null},t}(),BL=function(t){Vn(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 Db},e.prototype.startPerformanceMeasurement=function(){return new Db},e.prototype.calculateQueuedTime=function(r,n){return 0},e.prototype.addQueueMeasurement=function(r,n,i){},e.prototype.setPreQueueTime=function(r,n){},e}(Gk);/*! @azure/msal-browser v2.38.3 2023-10-27 */var Y={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."},spaCodeAndNativeAccountPresent:{code:"spa_code_and_nativeAccountId_present",desc:"Request cannot contain both spa code and native account id."},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."}},ne=function(t){jr(e,t);function e(r,n){var i=t.call(this,r,n)||this;return Object.setPrototypeOf(i,e.prototype),i.name="BrowserAuthError",i}return e.createPkceNotGeneratedError=function(r){return new e(Y.pkceNotGenerated.code,Y.pkceNotGenerated.desc+" Detail:"+r)},e.createCryptoNotAvailableError=function(r){return new e(Y.cryptoDoesNotExist.code,Y.cryptoDoesNotExist.desc+" Detail:"+r)},e.createHttpMethodNotImplementedError=function(r){return new e(Y.httpMethodNotImplementedError.code,Y.httpMethodNotImplementedError.desc+" Given Method: "+r)},e.createEmptyNavigationUriError=function(){return new e(Y.emptyNavigateUriError.code,Y.emptyNavigateUriError.desc)},e.createEmptyHashError=function(r){return new e(Y.hashEmptyError.code,Y.hashEmptyError.desc+" Given Url: "+r)},e.createHashDoesNotContainStateError=function(){return new e(Y.hashDoesNotContainStateError.code,Y.hashDoesNotContainStateError.desc)},e.createHashDoesNotContainKnownPropertiesError=function(){return new e(Y.hashDoesNotContainKnownPropertiesError.code,Y.hashDoesNotContainKnownPropertiesError.desc)},e.createUnableToParseStateError=function(){return new e(Y.unableToParseStateError.code,Y.unableToParseStateError.desc)},e.createStateInteractionTypeMismatchError=function(){return new e(Y.stateInteractionTypeMismatchError.code,Y.stateInteractionTypeMismatchError.desc)},e.createInteractionInProgressError=function(){return new e(Y.interactionInProgress.code,Y.interactionInProgress.desc)},e.createPopupWindowError=function(r){var n=Y.popupWindowError.desc;return n=ae.isEmpty(r)?n:n+" Details: "+r,new e(Y.popupWindowError.code,n)},e.createEmptyWindowCreatedError=function(){return new e(Y.emptyWindowError.code,Y.emptyWindowError.desc)},e.createUserCancelledError=function(){return new e(Y.userCancelledError.code,Y.userCancelledError.desc)},e.createMonitorPopupTimeoutError=function(){return new e(Y.monitorPopupTimeoutError.code,Y.monitorPopupTimeoutError.desc)},e.createMonitorIframeTimeoutError=function(){return new e(Y.monitorIframeTimeoutError.code,Y.monitorIframeTimeoutError.desc)},e.createRedirectInIframeError=function(r){return new e(Y.redirectInIframeError.code,Y.redirectInIframeError.desc+" (window.parent !== window) => "+r)},e.createBlockReloadInHiddenIframeError=function(){return new e(Y.blockTokenRequestsInHiddenIframeError.code,Y.blockTokenRequestsInHiddenIframeError.desc)},e.createBlockAcquireTokenInPopupsError=function(){return new e(Y.blockAcquireTokenInPopupsError.code,Y.blockAcquireTokenInPopupsError.desc)},e.createIframeClosedPrematurelyError=function(){return new e(Y.iframeClosedPrematurelyError.code,Y.iframeClosedPrematurelyError.desc)},e.createSilentLogoutUnsupportedError=function(){return new e(Y.silentLogoutUnsupportedError.code,Y.silentLogoutUnsupportedError.desc)},e.createNoAccountError=function(){return new e(Y.noAccountError.code,Y.noAccountError.desc)},e.createSilentPromptValueError=function(r){return new e(Y.silentPromptValueError.code,Y.silentPromptValueError.desc+" Given value: "+r)},e.createUnableToParseTokenRequestCacheError=function(){return new e(Y.unableToParseTokenRequestCacheError.code,Y.unableToParseTokenRequestCacheError.desc)},e.createNoTokenRequestCacheError=function(){return new e(Y.noTokenRequestCacheError.code,Y.noTokenRequestCacheError.desc)},e.createAuthRequestNotSetError=function(){return new e(Y.authRequestNotSet.code,Y.authRequestNotSet.desc)},e.createNoCachedAuthorityError=function(){return new e(Y.noCachedAuthorityError.code,Y.noCachedAuthorityError.desc)},e.createInvalidCacheTypeError=function(){return new e(Y.invalidCacheType.code,""+Y.invalidCacheType.desc)},e.createNonBrowserEnvironmentError=function(){return new e(Y.notInBrowserEnvironment.code,Y.notInBrowserEnvironment.desc)},e.createDatabaseNotOpenError=function(){return new e(Y.databaseNotOpen.code,Y.databaseNotOpen.desc)},e.createNoNetworkConnectivityError=function(){return new e(Y.noNetworkConnectivity.code,Y.noNetworkConnectivity.desc)},e.createPostRequestFailedError=function(r,n){return new e(Y.postRequestFailed.code,Y.postRequestFailed.desc+" | Network client threw: "+r+" | Attempted to reach: "+n.split("?")[0])},e.createGetRequestFailedError=function(r,n){return new e(Y.getRequestFailed.code,Y.getRequestFailed.desc+" | Network client threw: "+r+" | Attempted to reach: "+n.split("?")[0])},e.createFailedToParseNetworkResponseError=function(r){return new e(Y.failedToParseNetworkResponse.code,Y.failedToParseNetworkResponse.desc+" | Attempted to reach: "+r.split("?")[0])},e.createUnableToLoadTokenError=function(r){return new e(Y.unableToLoadTokenError.code,Y.unableToLoadTokenError.desc+" | "+r)},e.createSigningKeyNotFoundInStorageError=function(r){return new e(Y.signingKeyNotFoundInStorage.code,Y.signingKeyNotFoundInStorage.desc+" | No match found for KeyId: "+r)},e.createAuthCodeRequiredError=function(){return new e(Y.authCodeRequired.code,Y.authCodeRequired.desc)},e.createAuthCodeOrNativeAccountIdRequiredError=function(){return new e(Y.authCodeOrNativeAccountRequired.code,Y.authCodeOrNativeAccountRequired.desc)},e.createSpaCodeAndNativeAccountIdPresentError=function(){return new e(Y.spaCodeAndNativeAccountPresent.code,Y.spaCodeAndNativeAccountPresent.desc)},e.createDatabaseUnavailableError=function(){return new e(Y.databaseUnavailable.code,Y.databaseUnavailable.desc)},e.createUnableToAcquireTokenFromNativePlatformError=function(){return new e(Y.unableToAcquireTokenFromNativePlatform.code,Y.unableToAcquireTokenFromNativePlatform.desc)},e.createNativeHandshakeTimeoutError=function(){return new e(Y.nativeHandshakeTimeout.code,Y.nativeHandshakeTimeout.desc)},e.createNativeExtensionNotInstalledError=function(){return new e(Y.nativeExtensionNotInstalled.code,Y.nativeExtensionNotInstalled.desc)},e.createNativeConnectionNotEstablishedError=function(){return new e(Y.nativeConnectionNotEstablished.code,Y.nativeConnectionNotEstablished.desc)},e.createNativeBrokerCalledBeforeInitialize=function(){return new e(Y.nativeBrokerCalledBeforeInitialize.code,Y.nativeBrokerCalledBeforeInitialize.desc)},e.createNativePromptParameterNotSupportedError=function(){return new e(Y.nativePromptNotSupported.code,Y.nativePromptNotSupported.desc)},e}(fe);/*! @azure/msal-browser v2.38.3 2023-10-27 */var ji={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"},Iu={CHANNEL_ID:"53ee284d-920a-4b59-9d30-a60315b26836",PREFERRED_EXTENSION_ID:"ppnbnpeolgkicgegkbkbjmhlideopiji",MATS_TELEMETRY:"MATS"},ta;(function(t){t.HandshakeRequest="Handshake",t.HandshakeResponse="HandshakeResponse",t.GetToken="GetToken",t.Response="Response"})(ta||(ta={}));var lr;(function(t){t.LocalStorage="localStorage",t.SessionStorage="sessionStorage",t.MemoryStorage="memoryStorage"})(lr||(lr={}));var mo;(function(t){t.GET="GET",t.POST="POST"})(mo||(mo={}));var Ge;(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",t.REDIRECT_CONTEXT="request.redirect.context"})(Ge||(Ge={}));var ho;(function(t){t.ACCOUNT_KEYS="msal.account.keys",t.TOKEN_KEYS="msal.token.keys"})(ho||(ho={}));var Nl;(function(t){t.WRAPPER_SKU="wrapper.sku",t.WRAPPER_VER="wrapper.version"})(Nl||(Nl={}));var bt;(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"})(bt||(bt={}));var de;(function(t){t.Redirect="redirect",t.Popup="popup",t.Silent="silent",t.None="none"})(de||(de={}));var Vb;(function(t){t.Startup="startup",t.Login="login",t.Logout="logout",t.AcquireToken="acquireToken",t.SsoSilent="ssoSilent",t.HandleRedirect="handleRedirect",t.None="none"})(Vb||(Vb={}));var Fb={scopes:g1},ud="jwk",zb;(function(t){t.React="@azure/msal-react",t.Angular="@azure/msal-angular"})(zb||(zb={}));var F4="msal.db",qL=1,WL=F4+".keys",Mn;(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"})(Mn||(Mn={}));/*! @azure/msal-browser v2.38.3 2023-10-27 */var In={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."}},z2=function(t){jr(e,t);function e(r,n){var i=t.call(this,r,n)||this;return i.name="BrowserConfigurationAuthError",Object.setPrototypeOf(i,e.prototype),i}return e.createRedirectUriEmptyError=function(){return new e(In.redirectUriNotSet.code,In.redirectUriNotSet.desc)},e.createPostLogoutRedirectUriEmptyError=function(){return new e(In.postLogoutUriNotSet.code,In.postLogoutUriNotSet.desc)},e.createStorageNotSupportedError=function(r){return new e(In.storageNotSupportedError.code,In.storageNotSupportedError.desc+" Given Location: "+r)},e.createRedirectCallbacksNotSetError=function(){return new e(In.noRedirectCallbacksSet.code,In.noRedirectCallbacksSet.desc)},e.createStubPcaInstanceCalledError=function(){return new e(In.stubPcaInstanceCalled.code,In.stubPcaInstanceCalled.desc)},e.createInMemoryRedirectUnavailableError=function(){return new e(In.inMemRedirectUnavailable.code,In.inMemRedirectUnavailable.desc)},e.createEntropyNotProvided=function(){return new e(In.entropyNotProvided.code,In.entropyNotProvided.desc)},e}(fe);/*! @azure/msal-browser v2.38.3 2023-10-27 */var jb=function(){function t(e){this.validateWindowStorage(e),this.windowStorage=window[e]}return t.prototype.validateWindowStorage=function(e){if(e!==lr.LocalStorage&&e!==lr.SessionStorage)throw z2.createStorageNotSupportedError(e);var r=!!window[e];if(!r)throw z2.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.38.3 2023-10-27 */var z4=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.38.3 2023-10-27 */var Kk=function(){function t(){}return t.extractBrowserRequestState=function(e,r){if(ae.isEmpty(r))return null;try{var n=aa.parseRequestState(e,r);return n.libraryState.meta}catch(i){throw se.createInvalidStateError(r,i)}},t.parseServerResponseFromHash=function(e){if(!e)return{};var r=new Ue(e);return Ue.getDeserializedHash(r.getHash())},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var j4=function(t){jr(e,t);function e(r,n,i,o){var a=t.call(this,r,i,o)||this;return a.COOKIE_LIFE_MULTIPLIER=24*60*60*1e3,a.cacheConfig=n,a.logger=o,a.internalStorage=new z4,a.browserStorage=a.setupBrowserStorage(a.cacheConfig.cacheLocation),a.temporaryCacheStorage=a.setupTemporaryCacheStorage(a.cacheConfig.temporaryCacheLocation,a.cacheConfig.cacheLocation),n.cacheMigrationEnabled&&(a.migrateCacheEntries(),a.createKeyMaps()),a}return e.prototype.setupBrowserStorage=function(r){switch(r){case lr.LocalStorage:case lr.SessionStorage:try{return new jb(r)}catch(n){this.logger.verbose(n);break}}return this.cacheConfig.cacheLocation=lr.MemoryStorage,new z4},e.prototype.setupTemporaryCacheStorage=function(r,n){switch(n){case lr.LocalStorage:case lr.SessionStorage:try{return new jb(r||lr.SessionStorage)}catch(i){return this.logger.verbose(i),this.internalStorage}case lr.MemoryStorage:default:return this.internalStorage}},e.prototype.migrateCacheEntries=function(){var r=this,n=A.CACHE_PREFIX+"."+gr.ID_TOKEN,i=A.CACHE_PREFIX+"."+gr.CLIENT_INFO,o=A.CACHE_PREFIX+"."+gr.ERROR,a=A.CACHE_PREFIX+"."+gr.ERROR_DESC,s=this.browserStorage.getItem(n),c=this.browserStorage.getItem(i),l=this.browserStorage.getItem(o),d=this.browserStorage.getItem(a),u=[s,c,l,d],h=[gr.ID_TOKEN,gr.CLIENT_INFO,gr.ERROR,gr.ERROR_DESC];h.forEach(function(f,p){return r.migrateCacheEntry(f,u[p])})},e.prototype.migrateCacheEntry=function(r,n){n&&this.setTemporaryCache(r,n,!0)},e.prototype.createKeyMaps=function(){var r=this;this.logger.trace("BrowserCacheManager - createKeyMaps called.");var n=this.getItem(ho.ACCOUNT_KEYS),i=this.getItem(ho.TOKEN_KEYS+"."+this.clientId);if(n&&i){this.logger.verbose("BrowserCacheManager:createKeyMaps - account and token key maps already exist, skipping migration.");return}var o=this.browserStorage.getKeys();o.forEach(function(a){if(r.isCredentialKey(a)){var s=r.getItem(a);if(s){var c=r.validateAndParseJson(s);if(c&&c.hasOwnProperty("credentialType"))switch(c.credentialType){case ge.ID_TOKEN:if(Ks.isIdTokenEntity(c)){r.logger.trace("BrowserCacheManager:createKeyMaps - idToken found, saving key to token key map"),r.logger.tracePii("BrowserCacheManager:createKeyMaps - idToken with key: "+a+" found, saving key to token key map");var l=Rn.toObject(new Ks,c),d=r.updateCredentialCacheKey(a,l);r.addTokenKey(d,ge.ID_TOKEN);return}else r.logger.trace("BrowserCacheManager:createKeyMaps - key found matching idToken schema with value containing idToken credentialType field but value failed IdTokenEntity validation, skipping."),r.logger.tracePii("BrowserCacheManager:createKeyMaps - failed idToken validation on key: "+a);break;case ge.ACCESS_TOKEN:case ge.ACCESS_TOKEN_WITH_AUTH_SCHEME:if(Ys.isAccessTokenEntity(c)){r.logger.trace("BrowserCacheManager:createKeyMaps - accessToken found, saving key to token key map"),r.logger.tracePii("BrowserCacheManager:createKeyMaps - accessToken with key: "+a+" found, saving key to token key map");var u=Rn.toObject(new Ys,c),d=r.updateCredentialCacheKey(a,u);r.addTokenKey(d,ge.ACCESS_TOKEN);return}else r.logger.trace("BrowserCacheManager:createKeyMaps - key found matching accessToken schema with value containing accessToken credentialType field but value failed AccessTokenEntity validation, skipping."),r.logger.tracePii("BrowserCacheManager:createKeyMaps - failed accessToken validation on key: "+a);break;case ge.REFRESH_TOKEN:if(Ol.isRefreshTokenEntity(c)){r.logger.trace("BrowserCacheManager:createKeyMaps - refreshToken found, saving key to token key map"),r.logger.tracePii("BrowserCacheManager:createKeyMaps - refreshToken with key: "+a+" found, saving key to token key map");var h=Rn.toObject(new Ol,c),d=r.updateCredentialCacheKey(a,h);r.addTokenKey(d,ge.REFRESH_TOKEN);return}else r.logger.trace("BrowserCacheManager:createKeyMaps - key found matching refreshToken schema with value containing refreshToken credentialType field but value failed RefreshTokenEntity validation, skipping."),r.logger.tracePii("BrowserCacheManager:createKeyMaps - failed refreshToken validation on key: "+a);break}}}if(r.isAccountKey(a)){var s=r.getItem(a);if(s){var f=r.validateAndParseJson(s);f&&Dr.isAccountEntity(f)&&(r.logger.trace("BrowserCacheManager:createKeyMaps - account found, saving key to account key map"),r.logger.tracePii("BrowserCacheManager:createKeyMaps - account with key: "+a+" found, saving key to account key map"),r.addAccountKeyToMap(a))}}})},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){this.logger.trace("BrowserCacheManager.getAccount called");var n=this.getItem(r);if(!n)return this.removeAccountKeyFromMap(r),null;var i=this.validateAndParseJson(n);return!i||!Dr.isAccountEntity(i)?(this.removeAccountKeyFromMap(r),null):Rn.toObject(new Dr,i)},e.prototype.setAccount=function(r){this.logger.trace("BrowserCacheManager.setAccount called");var n=r.generateAccountKey();this.setItem(n,JSON.stringify(r)),this.addAccountKeyToMap(n)},e.prototype.getAccountKeys=function(){this.logger.trace("BrowserCacheManager.getAccountKeys called");var r=this.getItem(ho.ACCOUNT_KEYS);return r?JSON.parse(r):(this.logger.verbose("BrowserCacheManager.getAccountKeys - No account keys found"),[])},e.prototype.addAccountKeyToMap=function(r){this.logger.trace("BrowserCacheManager.addAccountKeyToMap called"),this.logger.tracePii("BrowserCacheManager.addAccountKeyToMap called with key: "+r);var n=this.getAccountKeys();n.indexOf(r)===-1?(n.push(r),this.setItem(ho.ACCOUNT_KEYS,JSON.stringify(n)),this.logger.verbose("BrowserCacheManager.addAccountKeyToMap account key added")):this.logger.verbose("BrowserCacheManager.addAccountKeyToMap account key already exists in map")},e.prototype.removeAccountKeyFromMap=function(r){this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap called"),this.logger.tracePii("BrowserCacheManager.removeAccountKeyFromMap called with key: "+r);var n=this.getAccountKeys(),i=n.indexOf(r);i>-1?(n.splice(i,1),this.setItem(ho.ACCOUNT_KEYS,JSON.stringify(n)),this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap account key removed")):this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap key not found in existing map")},e.prototype.removeAccount=function(r){return B(this,void 0,void 0,function(){return q(this,function(n){return t.prototype.removeAccount.call(this,r),this.removeAccountKeyFromMap(r),[2]})})},e.prototype.removeIdToken=function(r){t.prototype.removeIdToken.call(this,r),this.removeTokenKey(r,ge.ID_TOKEN)},e.prototype.removeAccessToken=function(r){return B(this,void 0,void 0,function(){return q(this,function(n){return t.prototype.removeAccessToken.call(this,r),this.removeTokenKey(r,ge.ACCESS_TOKEN),[2]})})},e.prototype.removeRefreshToken=function(r){t.prototype.removeRefreshToken.call(this,r),this.removeTokenKey(r,ge.REFRESH_TOKEN)},e.prototype.getTokenKeys=function(){this.logger.trace("BrowserCacheManager.getTokenKeys called");var r=this.getItem(ho.TOKEN_KEYS+"."+this.clientId);if(r){var n=this.validateAndParseJson(r);if(n&&n.hasOwnProperty("idToken")&&n.hasOwnProperty("accessToken")&&n.hasOwnProperty("refreshToken"))return n;this.logger.error("BrowserCacheManager.getTokenKeys - Token keys found but in an unknown format. Returning empty key map.")}else this.logger.verbose("BrowserCacheManager.getTokenKeys - No token keys found");return{idToken:[],accessToken:[],refreshToken:[]}},e.prototype.addTokenKey=function(r,n){this.logger.trace("BrowserCacheManager addTokenKey called");var i=this.getTokenKeys();switch(n){case ge.ID_TOKEN:i.idToken.indexOf(r)===-1&&(this.logger.info("BrowserCacheManager: addTokenKey - idToken added to map"),i.idToken.push(r));break;case ge.ACCESS_TOKEN:i.accessToken.indexOf(r)===-1&&(this.logger.info("BrowserCacheManager: addTokenKey - accessToken added to map"),i.accessToken.push(r));break;case ge.REFRESH_TOKEN:i.refreshToken.indexOf(r)===-1&&(this.logger.info("BrowserCacheManager: addTokenKey - refreshToken added to map"),i.refreshToken.push(r));break;default:this.logger.error("BrowserCacheManager:addTokenKey - CredentialType provided invalid. CredentialType: "+n),se.createUnexpectedCredentialTypeError()}this.setItem(ho.TOKEN_KEYS+"."+this.clientId,JSON.stringify(i))},e.prototype.removeTokenKey=function(r,n){this.logger.trace("BrowserCacheManager removeTokenKey called");var i=this.getTokenKeys();switch(n){case ge.ID_TOKEN:this.logger.infoPii("BrowserCacheManager: removeTokenKey - attempting to remove idToken with key: "+r+" from map");var o=i.idToken.indexOf(r);o>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - idToken removed from map"),i.idToken.splice(o,1)):this.logger.info("BrowserCacheManager: removeTokenKey - idToken does not exist in map. Either it was previously removed or it was never added.");break;case ge.ACCESS_TOKEN:this.logger.infoPii("BrowserCacheManager: removeTokenKey - attempting to remove accessToken with key: "+r+" from map");var a=i.accessToken.indexOf(r);a>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - accessToken removed from map"),i.accessToken.splice(a,1)):this.logger.info("BrowserCacheManager: removeTokenKey - accessToken does not exist in map. Either it was previously removed or it was never added.");break;case ge.REFRESH_TOKEN:this.logger.infoPii("BrowserCacheManager: removeTokenKey - attempting to remove refreshToken with key: "+r+" from map");var s=i.refreshToken.indexOf(r);s>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - refreshToken removed from map"),i.refreshToken.splice(s,1)):this.logger.info("BrowserCacheManager: removeTokenKey - refreshToken does not exist in map. Either it was previously removed or it was never added.");break;default:this.logger.error("BrowserCacheManager:removeTokenKey - CredentialType provided invalid. CredentialType: "+n),se.createUnexpectedCredentialTypeError()}this.setItem(ho.TOKEN_KEYS+"."+this.clientId,JSON.stringify(i))},e.prototype.getIdTokenCredential=function(r){var n=this.getItem(r);if(!n)return this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),this.removeTokenKey(r,ge.ID_TOKEN),null;var i=this.validateAndParseJson(n);return!i||!Ks.isIdTokenEntity(i)?(this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),this.removeTokenKey(r,ge.ID_TOKEN),null):(this.logger.trace("BrowserCacheManager.getIdTokenCredential: cache hit"),Rn.toObject(new Ks,i))},e.prototype.setIdTokenCredential=function(r){this.logger.trace("BrowserCacheManager.setIdTokenCredential called");var n=r.generateCredentialKey();this.setItem(n,JSON.stringify(r)),this.addTokenKey(n,ge.ID_TOKEN)},e.prototype.getAccessTokenCredential=function(r){var n=this.getItem(r);if(!n)return this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),this.removeTokenKey(r,ge.ACCESS_TOKEN),null;var i=this.validateAndParseJson(n);return!i||!Ys.isAccessTokenEntity(i)?(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),this.removeTokenKey(r,ge.ACCESS_TOKEN),null):(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: cache hit"),Rn.toObject(new Ys,i))},e.prototype.setAccessTokenCredential=function(r){this.logger.trace("BrowserCacheManager.setAccessTokenCredential called");var n=r.generateCredentialKey();this.setItem(n,JSON.stringify(r)),this.addTokenKey(n,ge.ACCESS_TOKEN)},e.prototype.getRefreshTokenCredential=function(r){var n=this.getItem(r);if(!n)return this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),this.removeTokenKey(r,ge.REFRESH_TOKEN),null;var i=this.validateAndParseJson(n);return!i||!Ol.isRefreshTokenEntity(i)?(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),this.removeTokenKey(r,ge.REFRESH_TOKEN),null):(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: cache hit"),Rn.toObject(new Ol,i))},e.prototype.setRefreshTokenCredential=function(r){this.logger.trace("BrowserCacheManager.setRefreshTokenCredential called");var n=r.generateCredentialKey();this.setItem(n,JSON.stringify(r)),this.addTokenKey(n,ge.REFRESH_TOKEN)},e.prototype.getAppMetadata=function(r){var n=this.getItem(r);if(!n)return this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null;var i=this.validateAndParseJson(n);return!i||!D4.isAppMetadataEntity(r,i)?(this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getAppMetadata: cache hit"),Rn.toObject(new D4,i))},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 i=this.validateAndParseJson(n);return!i||!F2.isServerTelemetryEntity(r,i)?(this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getServerTelemetry: cache hit"),Rn.toObject(new F2,i))},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 i=this.validateAndParseJson(n);return i&&V4.isAuthorityMetadataEntity(r,i)?(this.logger.trace("BrowserCacheManager.getAuthorityMetadata: cache hit"),Rn.toObject(new V4,i)):null},e.prototype.getAuthorityMetadataKeys=function(){var r=this,n=this.internalStorage.getKeys();return n.filter(function(i){return r.isAuthorityMetadata(i)})},e.prototype.setWrapperMetadata=function(r,n){this.internalStorage.setItem(Nl.WRAPPER_SKU,r),this.internalStorage.setItem(Nl.WRAPPER_VER,n)},e.prototype.getWrapperMetadata=function(){var r=this.internalStorage.getItem(Nl.WRAPPER_SKU)||A.EMPTY_STRING,n=this.internalStorage.getItem(Nl.WRAPPER_VER)||A.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(gr.ACTIVE_ACCOUNT_FILTERS),n=this.getItem(r);if(!n){this.logger.trace("BrowserCacheManager.getActiveAccount: No active account filters cache schema found, looking for legacy schema");var i=this.generateCacheKey(gr.ACTIVE_ACCOUNT),o=this.getItem(i);if(!o)return this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found"),null;var a=this.getAccountInfoByFilter({localAccountId:o})[0]||null;return a?(this.logger.trace("BrowserCacheManager.getActiveAccount: Legacy active account cache schema found"),this.logger.trace("BrowserCacheManager.getActiveAccount: Adding active account filters cache schema"),this.setActiveAccount(a),a):null}var s=this.validateAndParseJson(n);return s?(this.logger.trace("BrowserCacheManager.getActiveAccount: Active account filters schema found"),this.getAccountInfoByFilter({homeAccountId:s.homeAccountId,localAccountId:s.localAccountId})[0]||null):(this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found"),null)},e.prototype.setActiveAccount=function(r){var n=this.generateCacheKey(gr.ACTIVE_ACCOUNT_FILTERS),i=this.generateCacheKey(gr.ACTIVE_ACCOUNT);if(r){this.logger.verbose("setActiveAccount: Active account set");var o={homeAccountId:r.homeAccountId,localAccountId:r.localAccountId};this.browserStorage.setItem(n,JSON.stringify(o)),this.browserStorage.setItem(i,r.localAccountId)}else this.logger.verbose("setActiveAccount: No account passed, active account not set"),this.browserStorage.removeItem(n),this.browserStorage.removeItem(i)},e.prototype.getAccountInfoByFilter=function(r){var n=this.getAllAccounts();return this.logger.trace("BrowserCacheManager.getAccountInfoByFilter: total "+n.length+" accounts found"),n.filter(function(i){return!(r.username&&r.username.toLowerCase()!==i.username.toLowerCase()||r.homeAccountId&&r.homeAccountId!==i.homeAccountId||r.localAccountId&&r.localAccountId!==i.localAccountId||r.tenantId&&r.tenantId!==i.tenantId||r.environment&&r.environment!==i.environment)})},e.prototype.getAccountInfoByHints=function(r,n){var i=this.getAllAccounts().filter(function(o){if(n){var a=o.idTokenClaims&&o.idTokenClaims.sid;return n===a}return r?r===o.username:!1});if(i.length===1)return i[0];if(i.length>1)throw se.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 i=this.validateAndParseJson(n);return!i||!Lb.isThrottlingEntity(r,i)?(this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getThrottlingCache: cache hit"),Rn.toObject(new Lb,i))},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 i=n?this.generateCacheKey(r):r;if(this.cacheConfig.storeAuthStateInCookie){var o=this.getItemCookie(i);if(o)return this.logger.trace("BrowserCacheManager.getTemporaryCache: storeAuthStateInCookies set to true, retrieving from cookies"),o}var a=this.temporaryCacheStorage.getItem(i);if(!a){if(this.cacheConfig.cacheLocation===lr.LocalStorage){var s=this.browserStorage.getItem(i);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,i){var o=i?this.generateCacheKey(r):r;this.temporaryCacheStorage.setItem(o,n),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.setTemporaryCache: storeAuthStateInCookie set to true, setting item cookie"),this.setItemCookie(o,n))},e.prototype.removeItem=function(r){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))},e.prototype.containsKey=function(r){return this.browserStorage.containsKey(r)||this.temporaryCacheStorage.containsKey(r)},e.prototype.getKeys=function(){return my(this.browserStorage.getKeys(),this.temporaryCacheStorage.getKeys())},e.prototype.clear=function(){return B(this,void 0,void 0,function(){var r=this;return q(this,function(n){switch(n.label){case 0:return[4,this.removeAllAccounts()];case 1:return n.sent(),this.removeAppMetadata(),this.getKeys().forEach(function(i){(r.browserStorage.containsKey(i)||r.temporaryCacheStorage.containsKey(i))&&(i.indexOf(A.CACHE_PREFIX)!==-1||i.indexOf(r.clientId)!==-1)&&r.removeItem(i)}),this.internalStorage.clear(),[2]}})})},e.prototype.clearTokensAndKeysWithClaims=function(){return B(this,void 0,void 0,function(){var r,n,i=this;return q(this,function(o){switch(o.label){case 0:return this.logger.trace("BrowserCacheManager.clearTokensAndKeysWithClaims called"),r=this.getTokenKeys(),n=[],r.accessToken.forEach(function(a){var s=i.getAccessTokenCredential(a);s!=null&&s.requestedClaimsHash&&a.includes(s.requestedClaimsHash.toLowerCase())&&n.push(i.removeAccessToken(a))}),[4,Promise.all(n)];case 1:return o.sent(),n.length>0&&this.logger.warning(n.length+" access tokens with claims in the cache keys have been removed from the cache."),[2]}})})},e.prototype.setItemCookie=function(r,n,i){var o=encodeURIComponent(r)+"="+encodeURIComponent(n)+";path=/;SameSite=Lax;";if(i){var a=this.getCookieExpirationTime(i);o+="expires="+a+";"}this.cacheConfig.secureCookies&&(o+="Secure;"),document.cookie=o},e.prototype.getItemCookie=function(r){for(var n=encodeURIComponent(r)+"=",i=document.cookie.split(";"),o=0;o<i.length;o++){for(var a=i[o];a.charAt(0)===" ";)a=a.substring(1);if(a.indexOf(n)===0)return decodeURIComponent(a.substring(n.length,a.length))}return A.EMPTY_STRING},e.prototype.clearMsalCookies=function(){var r=this,n=A.CACHE_PREFIX+"."+this.clientId,i=document.cookie.split(";");i.forEach(function(o){for(;o.charAt(0)===" ";)o=o.substring(1);if(o.indexOf(n)===0){var a=o.split("=")[0];r.clearItemCookie(a)}})},e.prototype.clearItemCookie=function(r){this.setItemCookie(r,A.EMPTY_STRING,-1)},e.prototype.getCookieExpirationTime=function(r){var n=new Date,i=new Date(n.getTime()+r*this.COOKIE_LIFE_MULTIPLIER);return i.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):ae.startsWith(r,A.CACHE_PREFIX)||ae.startsWith(r,gr.ADAL_ID_TOKEN)?r:A.CACHE_PREFIX+"."+this.clientId+"."+r},e.prototype.generateAuthorityKey=function(r){var n=aa.parseRequestState(this.cryptoImpl,r).libraryState.id;return this.generateCacheKey(Ge.AUTHORITY+"."+n)},e.prototype.generateNonceKey=function(r){var n=aa.parseRequestState(this.cryptoImpl,r).libraryState.id;return this.generateCacheKey(Ge.NONCE_IDTOKEN+"."+n)},e.prototype.generateStateKey=function(r){var n=aa.parseRequestState(this.cryptoImpl,r).libraryState.id;return this.generateCacheKey(Ge.REQUEST_STATE+"."+n)},e.prototype.getCachedAuthority=function(r){var n=this.generateStateKey(r),i=this.getTemporaryCache(n);if(!i)return null;var o=this.generateAuthorityKey(i);return this.getTemporaryCache(o)},e.prototype.updateCacheEntries=function(r,n,i,o,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,i,!1),a){var d={credential:a.homeAccountId,type:Kn.HOME_ACCOUNT_ID};this.setTemporaryCache(Ge.CCS_CREDENTIAL,JSON.stringify(d),!0)}else if(!ae.isEmpty(o)){var d={credential:o,type:Kn.UPN};this.setTemporaryCache(Ge.CCS_CREDENTIAL,JSON.stringify(d),!0)}},e.prototype.resetRequestCache=function(r){var n=this;this.logger.trace("BrowserCacheManager.resetRequestCache called"),ae.isEmpty(r)||this.getKeys().forEach(function(i){i.indexOf(r)!==-1&&n.removeItem(i)}),r&&(this.removeItem(this.generateStateKey(r)),this.removeItem(this.generateNonceKey(r)),this.removeItem(this.generateAuthorityKey(r))),this.removeItem(this.generateCacheKey(Ge.REQUEST_PARAMS)),this.removeItem(this.generateCacheKey(Ge.ORIGIN_URI)),this.removeItem(this.generateCacheKey(Ge.URL_HASH)),this.removeItem(this.generateCacheKey(Ge.CORRELATION_ID)),this.removeItem(this.generateCacheKey(Ge.CCS_CREDENTIAL)),this.removeItem(this.generateCacheKey(Ge.NATIVE_REQUEST)),this.setInteractionInProgress(!1)},e.prototype.cleanRequestByState=function(r){if(this.logger.trace("BrowserCacheManager.cleanRequestByState called"),r){var n=this.generateStateKey(r),i=this.temporaryCacheStorage.getItem(n);this.logger.infoPii("BrowserCacheManager.cleanRequestByState: Removing temporary cache items for state: "+i),this.resetRequestCache(i||A.EMPTY_STRING)}this.clearMsalCookies()},e.prototype.cleanRequestByInteractionType=function(r){var n=this;this.logger.trace("BrowserCacheManager.cleanRequestByInteractionType called"),this.getKeys().forEach(function(i){if(i.indexOf(Ge.REQUEST_STATE)!==-1){var o=n.temporaryCacheStorage.getItem(i);if(o){var a=Kk.extractBrowserRequestState(n.cryptoImpl,o);a&&a.interactionType===r&&(n.logger.infoPii("BrowserCacheManager.cleanRequestByInteractionType: Removing temporary cache items for state: "+o),n.resetRequestCache(o))}}}),this.clearMsalCookies(),this.setInteractionInProgress(!1)},e.prototype.cacheCodeRequest=function(r,n){this.logger.trace("BrowserCacheManager.cacheCodeRequest called");var i=n.base64Encode(JSON.stringify(r));this.setTemporaryCache(Ge.REQUEST_PARAMS,i,!0)},e.prototype.getCachedRequest=function(r,n){this.logger.trace("BrowserCacheManager.getCachedRequest called");var i=this.getTemporaryCache(Ge.REQUEST_PARAMS,!0);if(!i)throw ne.createNoTokenRequestCacheError();var o=this.validateAndParseJson(n.base64Decode(i));if(!o)throw ne.createUnableToParseTokenRequestCacheError();if(this.removeItem(this.generateCacheKey(Ge.REQUEST_PARAMS)),ae.isEmpty(o.authority)){var a=this.generateAuthorityKey(r),s=this.getTemporaryCache(a);if(!s)throw ne.createNoCachedAuthorityError();o.authority=s}return o},e.prototype.getCachedNativeRequest=function(){this.logger.trace("BrowserCacheManager.getCachedNativeRequest called");var r=this.getTemporaryCache(Ge.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=A.CACHE_PREFIX+"."+Ge.INTERACTION_STATUS_KEY;return this.getTemporaryCache(r,!1)},e.prototype.setInteractionInProgress=function(r){var n=A.CACHE_PREFIX+"."+Ge.INTERACTION_STATUS_KEY;if(r){if(this.getInteractionInProgress())throw ne.createInteractionInProgressError();this.setTemporaryCache(n,this.clientId,!1)}else!r&&this.getInteractionInProgress()===this.clientId&&this.removeItem(n)},e.prototype.getLegacyLoginHint=function(){var r=this.getTemporaryCache(gr.ADAL_ID_TOKEN);r&&(this.browserStorage.removeItem(gr.ADAL_ID_TOKEN),this.logger.verbose("Cached ADAL id token retrieved."));var n=this.getTemporaryCache(gr.ID_TOKEN,!0);n&&(this.removeItem(this.generateCacheKey(gr.ID_TOKEN)),this.logger.verbose("Cached MSAL.js v1 id token retrieved"));var i=n||r;if(i){var o=new Ao(i,this.cryptoImpl);if(o.claims&&o.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"),o.claims.preferred_username;if(o.claims&&o.claims.upn)return this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, setting ADAL/MSAL v1 upn as loginHint"),o.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 i=n.generateCredentialKey();if(r!==i){var o=this.getItem(r);if(o)return this.removeItem(r),this.setItem(i,o),this.logger.verbose("Updated an outdated "+n.credentialType+" cache key"),i;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.prototype.getRedirectRequestContext=function(){return this.getTemporaryCache(Ge.REDIRECT_CONTEXT,!0)},e.prototype.setRedirectRequestContext=function(r){this.setTemporaryCache(Ge.REDIRECT_CONTEXT,r,!0)},e}(Rn),GL=function(t,e){var r={cacheLocation:lr.MemoryStorage,temporaryCacheLocation:lr.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!0};return new j4(t,r,H2,e)};/*! @azure/msal-browser v2.38.3 2023-10-27 */var Cv="@azure/msal-browser",ph="2.38.3";/*! @azure/msal-browser v2.38.3 2023-10-27 */var KL=function(){function t(){}return t.prototype.sendGetRequestAsync=function(e,r){return B(this,void 0,void 0,function(){var n,i,o;return q(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,fetch(e,{method:mo.GET,headers:this.getFetchHeaders(r)})];case 1:return n=a.sent(),[3,3];case 2:throw i=a.sent(),window.navigator.onLine?ne.createGetRequestFailedError(i,e):ne.createNoNetworkConnectivityError();case 3:return a.trys.push([3,5,,6]),o={headers:this.getHeaderDict(n.headers)},[4,n.json()];case 4:return[2,(o.body=a.sent(),o.status=n.status,o)];case 5:throw a.sent(),ne.createFailedToParseNetworkResponseError(e);case 6:return[2]}})})},t.prototype.sendPostRequestAsync=function(e,r){return B(this,void 0,void 0,function(){var n,i,o,a;return q(this,function(s){switch(s.label){case 0:n=r&&r.body||A.EMPTY_STRING,s.label=1;case 1:return s.trys.push([1,3,,4]),[4,fetch(e,{method:mo.POST,headers:this.getFetchHeaders(r),body:n})];case 2:return i=s.sent(),[3,4];case 3:throw o=s.sent(),window.navigator.onLine?ne.createPostRequestFailedError(o,e):ne.createNoNetworkConnectivityError();case 4:return s.trys.push([4,6,,7]),a={headers:this.getHeaderDict(i.headers)},[4,i.json()];case 5:return[2,(a.body=s.sent(),a.status=i.status,a)];case 6:throw s.sent(),ne.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(i){r.append(i,n[i])}),r},t.prototype.getHeaderDict=function(e){var r={};return e.forEach(function(n,i){r[i]=n}),r},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var YL=function(){function t(){}return t.prototype.sendGetRequestAsync=function(e,r){return B(this,void 0,void 0,function(){return q(this,function(n){return[2,this.sendRequestAsync(e,mo.GET,r)]})})},t.prototype.sendPostRequestAsync=function(e,r){return B(this,void 0,void 0,function(){return q(this,function(n){return[2,this.sendRequestAsync(e,mo.POST,r)]})})},t.prototype.sendRequestAsync=function(e,r,n){var i=this;return new Promise(function(o,a){var s=new XMLHttpRequest;if(s.open(r,e,!0),i.setXhrHeaders(s,n),s.onload=function(){(s.status<200||s.status>=300)&&(r===mo.POST?a(ne.createPostRequestFailedError("Failed with status "+s.status,e)):a(ne.createGetRequestFailedError("Failed with status "+s.status,e)));try{var c=JSON.parse(s.responseText),l={headers:i.getHeaderDict(s),body:c,status:s.status};o(l)}catch{a(ne.createFailedToParseNetworkResponseError(e))}},s.onerror=function(){window.navigator.onLine?r===mo.POST?a(ne.createPostRequestFailedError("Failed with status "+s.status,e)):a(ne.createGetRequestFailedError("Failed with status "+s.status,e)):a(ne.createNoNetworkConnectivityError())},r===mo.POST&&n&&n.body)s.send(n.body);else if(r===mo.GET)s.send();else throw ne.createHttpMethodNotImplementedError(r)})},t.prototype.setXhrHeaders=function(e,r){if(r&&r.headers){var n=r.headers;Object.keys(n).forEach(function(i){e.setRequestHeader(i,n[i])})}},t.prototype.getHeaderDict=function(e){var r=e.getAllResponseHeaders(),n=r.trim().split(/[\r\n]+/),i={};return n.forEach(function(o){var a=o.split(": "),s=a.shift(),c=a.join(": ");s&&c&&(i[s]=c)}),i},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var er=function(){function t(){}return t.clearHash=function(e){e.location.hash=A.EMPTY_STRING,typeof e.history.replaceState=="function"&&e.history.replaceState(null,A.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("#"):A.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(ji.POPUP_NAME_PREFIX+".")===0},t.getCurrentUri=function(){return window.location.href.split("?")[0].split("#")[0]},t.getHomepage=function(){var e=new Ue(window.location.href),r=e.getUrlComponents();return r.Protocol+"//"+r.HostNameAndPort+"/"},t.getBrowserNetworkClient=function(){return window.fetch&&window.Headers?new KL:new YL},t.blockReloadInHiddenIframes=function(){var e=Ue.hashContainsKnownProperties(window.location.hash);if(e&&t.isInIframe())throw ne.createBlockReloadInHiddenIframeError()},t.blockRedirectInIframe=function(e,r){var n=t.isInIframe();if(e===de.Redirect&&n&&!r)throw ne.createRedirectInIframeError(n)},t.blockAcquireTokenInPopups=function(){if(t.isInPopup())throw ne.createBlockAcquireTokenInPopupsError()},t.blockNonBrowserEnvironment=function(e){if(!e)throw ne.createNonBrowserEnvironmentError()},t.blockNativeBrokerCalledBeforeInitialized=function(e,r){if(e&&!r)throw ne.createNativeBrokerCalledBeforeInitialize()},t.detectIEOrEdge=function(){var e=window.navigator.userAgent,r=e.indexOf("MSIE "),n=e.indexOf("Trident/"),i=e.indexOf("Edge/"),o=r>0||n>0,a=i>0;return o||a},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Yk=function(){function t(e,r,n,i,o,a,s,c,l){this.config=e,this.browserStorage=r,this.browserCrypto=n,this.networkClient=this.config.system.networkClient,this.eventHandler=o,this.navigationClient=a,this.nativeMessageHandler=c,this.correlationId=l||this.browserCrypto.createNewGuid(),this.logger=i.clone(ji.MSAL_SKU,ph,this.correlationId),this.performanceClient=s}return t.prototype.clearCacheOnLogout=function(e){return B(this,void 0,void 0,function(){return q(this,function(r){switch(r.label){case 0:if(!e)return[3,5];Dr.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(Dr.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,r){return B(this,void 0,void 0,function(){var n,i,o,a;return q(this,function(s){switch(s.label){case 0:return this.performanceClient.addQueueMeasurement(L.InitializeBaseRequest,e.correlationId),this.logger.verbose("Initializing BaseAuthRequest"),n=e.authority||this.config.auth.authority,r?[4,this.validateRequestAuthority(n,r)]:[3,2];case 1:s.sent(),s.label=2;case 2:if(i=my(e&&e.scopes||[]),o=ue(ue({},e),{correlationId:this.correlationId,authority:n,scopes:i}),!o.authenticationScheme)o.authenticationScheme=at.BEARER,this.logger.verbose(`Authentication Scheme wasn't explicitly set in request, defaulting to "Bearer" request`);else{if(o.authenticationScheme===at.SSH){if(!e.sshJwk)throw wt.createMissingSshJwkError();if(!e.sshKid)throw wt.createMissingSshKidError()}this.logger.verbose('Authentication Scheme set to "'+o.authenticationScheme+'" as configured in Auth request')}return this.config.cache.claimsBasedCachingEnabled&&e.claims&&!ae.isEmptyObj(e.claims)?(a=o,[4,this.browserCrypto.hashString(e.claims)]):[3,4];case 3:a.requestedClaimsHash=s.sent(),s.label=4;case 4:return[2,o]}})})},t.prototype.getRedirectUri=function(e){this.logger.verbose("getRedirectUri called");var r=e||this.config.auth.redirectUri||er.getCurrentUri();return Ue.getAbsoluteUrl(r,er.getCurrentUri())},t.prototype.validateRequestAuthority=function(e,r){return B(this,void 0,void 0,function(){var n;return q(this,function(i){switch(i.label){case 0:return[4,this.getDiscoveredAuthority(e)];case 1:if(n=i.sent(),!n.isAlias(r.environment))throw wt.createAuthorityMismatchError();return[2]}})})},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 UL(n,this.browserStorage)},t.prototype.getDiscoveredAuthority=function(e){return B(this,void 0,void 0,function(){var r;return q(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,V2.createDiscoveredInstance(e,this.config.system.networkClient,this.browserStorage,r,this.logger)]):[3,2];case 1:return[2,n.sent()];case 2:return this.logger.verbose("Creating discovered authority with configured authority"),[4,V2.createDiscoveredInstance(this.config.auth.authority,this.config.system.networkClient,this.browserStorage,r,this.logger)];case 3:return[2,n.sent()]}})})},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Td=function(t){jr(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.initializeAuthorizationCodeRequest=function(r){return B(this,void 0,void 0,function(){var n,i;return q(this,function(o){switch(o.label){case 0:return this.performanceClient.addQueueMeasurement(L.StandardInteractionClientInitializeAuthorizationCodeRequest,r.correlationId),this.logger.verbose("initializeAuthorizationRequest called",r.correlationId),[4,this.browserCrypto.generatePkceCodes()];case 1:return n=o.sent(),i=ue(ue({},r),{redirectUri:r.redirectUri,code:A.EMPTY_STRING,codeVerifier:n.verifier}),r.codeChallenge=n.challenge,r.codeChallengeMethod=A.S256_CODE_CHALLENGE_METHOD,[2,i]}})})},e.prototype.initializeLogoutRequest=function(r){this.logger.verbose("initializeLogoutRequest called",r==null?void 0:r.correlationId);var n=ue({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 i=this.getLogoutHintFromIdTokenClaims(r.account);i&&(this.logger.verbose("Setting logoutHint to login_hint ID Token Claim value for the account provided"),n.logoutHint=i)}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=Ue.getAbsoluteUrl(r.postLogoutRedirectUri,er.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=Ue.getAbsoluteUrl(this.config.auth.postLogoutRedirectUri,er.getCurrentUri())):(this.logger.verbose("Setting postLogoutRedirectUri to current page",n.correlationId),n.postLogoutRedirectUri=Ue.getAbsoluteUrl(er.getCurrentUri(),er.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,i){return B(this,void 0,void 0,function(){var o;return q(this,function(a){switch(a.label){case 0:return this.performanceClient.addQueueMeasurement(L.StandardInteractionClientCreateAuthCodeClient,this.correlationId),this.performanceClient.setPreQueueTime(L.StandardInteractionClientGetClientConfiguration,this.correlationId),[4,this.getClientConfiguration(r,n,i)];case 1:return o=a.sent(),[2,new Bk(o,this.performanceClient)]}})})},e.prototype.getClientConfiguration=function(r,n,i){return B(this,void 0,void 0,function(){var o,a;return q(this,function(s){switch(s.label){case 0:return this.performanceClient.addQueueMeasurement(L.StandardInteractionClientGetClientConfiguration,this.correlationId),this.logger.verbose("getClientConfiguration called",this.correlationId),this.performanceClient.setPreQueueTime(L.StandardInteractionClientGetDiscoveredAuthority,this.correlationId),[4,this.getDiscoveredAuthority(n,i)];case 1:return o=s.sent(),a=this.config.system.loggerOptions,[2,{authOptions:{clientId:this.config.auth.clientId,authority:o,clientCapabilities:this.config.auth.clientCapabilities},systemOptions:{tokenRenewalOffsetSeconds:this.config.system.tokenRenewalOffsetSeconds,preventCorsPreflight:!0},loggerOptions:{loggerCallback:a.loggerCallback,piiLoggingEnabled:a.piiLoggingEnabled,logLevel:a.logLevel,correlationId:this.correlationId},cacheOptions:{claimsBasedCachingEnabled:this.config.cache.claimsBasedCachingEnabled},cryptoInterface:this.browserCrypto,networkInterface:this.networkClient,storageInterface:this.browserStorage,serverTelemetryManager:r,libraryInfo:{sku:ji.MSAL_SKU,version:ph,cpu:A.EMPTY_STRING,os:A.EMPTY_STRING},telemetry:this.config.telemetry}]}})})},e.prototype.validateAndExtractStateFromHash=function(r,n,i){if(this.logger.verbose("validateAndExtractStateFromHash called",i),!r.state)throw ne.createHashDoesNotContainStateError();var o=Kk.extractBrowserRequestState(this.browserCrypto,r.state);if(!o)throw ne.createUnableToParseStateError();if(o.interactionType!==n)throw ne.createStateInteractionTypeMismatchError();return this.logger.verbose("Returning state from hash",i),r.state},e.prototype.getDiscoveredAuthority=function(r,n){var i;return B(this,void 0,void 0,function(){var o,a,s,c;return q(this,function(l){switch(l.label){case 0:return this.performanceClient.addQueueMeasurement(L.StandardInteractionClientGetDiscoveredAuthority,this.correlationId),this.logger.verbose("getDiscoveredAuthority called",this.correlationId),o=(i=this.performanceClient)===null||i===void 0?void 0:i.startMeasurement(L.StandardInteractionClientGetDiscoveredAuthority,this.correlationId),a={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},s=r||this.config.auth.authority,c=Bh.generateAuthority(s,n||this.config.auth.azureCloudOptions),this.logger.verbose("Creating discovered authority with configured authority",this.correlationId),this.performanceClient.setPreQueueTime(L.AuthorityFactoryCreateDiscoveredInstance,this.correlationId),[4,V2.createDiscoveredInstance(c,this.config.system.networkClient,this.browserStorage,a,this.logger,this.performanceClient,this.correlationId).then(function(d){return o.endMeasurement({success:!0}),d}).catch(function(d){throw o.endMeasurement({errorCode:d.errorCode,subErrorCode:d.subError,success:!1}),d})];case 1:return[2,l.sent()]}})})},e.prototype.initializeAuthorizationRequest=function(r,n){return B(this,void 0,void 0,function(){var i,o,a,s,c,l,d;return q(this,function(u){switch(u.label){case 0:return this.performanceClient.addQueueMeasurement(L.StandardInteractionClientInitializeAuthorizationRequest,this.correlationId),this.logger.verbose("initializeAuthorizationRequest called",this.correlationId),i=this.getRedirectUri(r.redirectUri),o={interactionType:n},a=aa.setRequestState(this.browserCrypto,r&&r.state||A.EMPTY_STRING,o),this.performanceClient.setPreQueueTime(L.InitializeBaseRequest,this.correlationId),c=[{}],[4,this.initializeBaseRequest(r)];case 1:return s=ue.apply(void 0,[ue.apply(void 0,c.concat([u.sent()])),{redirectUri:i,state:a,nonce:r.nonce||this.browserCrypto.createNewGuid(),responseMode:M2.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),ae.isEmpty(s.loginHint)&&!l&&(d=this.browserStorage.getLegacyLoginHint(),d&&(s.loginHint=d)),[2,s]}})})},e}(Yk);/*! @azure/msal-browser v2.38.3 2023-10-27 */var _y=function(){function t(e,r,n,i,o){this.authModule=e,this.browserStorage=r,this.authCodeRequest=n,this.logger=i,this.performanceClient=o}return t.prototype.handleCodeResponseFromHash=function(e,r,n,i){return B(this,void 0,void 0,function(){var o,a,s;return q(this,function(c){if(this.performanceClient.addQueueMeasurement(L.HandleCodeResponseFromHash,this.authCodeRequest.correlationId),this.logger.verbose("InteractionHandler.handleCodeResponse called"),ae.isEmpty(e))throw ne.createEmptyHashError(e);if(o=this.browserStorage.generateStateKey(r),a=this.browserStorage.getTemporaryCache(o),!a)throw se.createStateNotFoundError("Cached State");try{s=this.authModule.handleFragmentResponse(e,a)}catch(l){throw l instanceof xc&&l.subError===Y.userCancelledError.code?ne.createUserCancelledError():l}return this.performanceClient.setPreQueueTime(L.HandleCodeResponseFromServer,this.authCodeRequest.correlationId),[2,this.handleCodeResponseFromServer(s,r,n,i)]})})},t.prototype.handleCodeResponseFromServer=function(e,r,n,i,o){return o===void 0&&(o=!0),B(this,void 0,void 0,function(){var a,s,c,l,d,u;return q(this,function(h){switch(h.label){case 0:if(this.performanceClient.addQueueMeasurement(L.HandleCodeResponseFromServer,this.authCodeRequest.correlationId),this.logger.trace("InteractionHandler.handleCodeResponseFromServer called"),a=this.browserStorage.generateStateKey(r),s=this.browserStorage.getTemporaryCache(a),!s)throw se.createStateNotFoundError("Cached State");return c=this.browserStorage.generateNonceKey(s),l=this.browserStorage.getTemporaryCache(c),this.authCodeRequest.code=e.code,e.cloud_instance_host_name?(this.performanceClient.setPreQueueTime(L.UpdateTokenEndpointAuthority,this.authCodeRequest.correlationId),[4,this.updateTokenEndpointAuthority(e.cloud_instance_host_name,n,i)]):[3,2];case 1:h.sent(),h.label=2;case 2:return o&&(e.nonce=l||void 0),e.state=s,e.client_info?this.authCodeRequest.clientInfo=e.client_info:(d=this.checkCcsCredentials(),d&&(this.authCodeRequest.ccsCredential=d)),this.performanceClient.setPreQueueTime(L.AuthClientAcquireToken,this.authCodeRequest.correlationId),[4,this.authModule.acquireToken(this.authCodeRequest,e)];case 3:return u=h.sent(),this.browserStorage.cleanRequestByState(r),[2,u]}})})},t.prototype.updateTokenEndpointAuthority=function(e,r,n){return B(this,void 0,void 0,function(){var i,o;return q(this,function(a){switch(a.label){case 0:return this.performanceClient.addQueueMeasurement(L.UpdateTokenEndpointAuthority,this.authCodeRequest.correlationId),i="https://"+e+"/"+r.tenant+"/",[4,V2.createDiscoveredInstance(i,n,this.browserStorage,r.options,this.logger,this.performanceClient,this.authCodeRequest.correlationId)];case 1:return o=a.sent(),this.authModule.updateAuthority(o),[2]}})})},t.prototype.checkCcsCredentials=function(){var e=this.browserStorage.getTemporaryCache(Ge.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.38.3 2023-10-27 */var Ub=function(t){jr(e,t);function e(r,n,i,o,a,s){var c=t.call(this,r,n,i,o,s)||this;return c.browserCrypto=a,c}return e.prototype.initiateAuthRequest=function(r,n){return B(this,void 0,void 0,function(){var i,o;return q(this,function(a){switch(a.label){case 0:return this.logger.verbose("RedirectHandler.initiateAuthRequest called"),ae.isEmpty(r)?[3,7]:(n.redirectStartPage&&(this.logger.verbose("RedirectHandler.initiateAuthRequest: redirectStartPage set, caching start page"),this.browserStorage.setTemporaryCache(Ge.ORIGIN_URI,n.redirectStartPage,!0)),this.browserStorage.setTemporaryCache(Ge.CORRELATION_ID,this.authCodeRequest.correlationId,!0),this.browserStorage.cacheCodeRequest(this.authCodeRequest,this.browserCrypto),this.logger.infoPii("RedirectHandler.initiateAuthRequest: Navigate to: "+r),i={apiId:bt.acquireTokenRedirect,timeout:n.redirectTimeout,noHistory:!1},typeof n.onRedirectNavigate!="function"?[3,4]:(this.logger.verbose("RedirectHandler.initiateAuthRequest: Invoking onRedirectNavigate callback"),o=n.onRedirectNavigate(r),o===!1?[3,2]:(this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate did not return false, navigating"),[4,n.navigationClient.navigateExternal(r,i)])));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,i)];case 5:return a.sent(),[2];case 6:return[3,8];case 7:throw this.logger.info("RedirectHandler.initiateAuthRequest: Navigate url is empty"),ne.createEmptyNavigationUriError();case 8:return[2]}})})},e.prototype.handleCodeResponseFromHash=function(r,n,i,o){return B(this,void 0,void 0,function(){var a,s,c,l,d,u,h;return q(this,function(f){switch(f.label){case 0:if(this.logger.verbose("RedirectHandler.handleCodeResponse called"),ae.isEmpty(r))throw ne.createEmptyHashError(r);if(this.browserStorage.setInteractionInProgress(!1),a=this.browserStorage.generateStateKey(n),s=this.browserStorage.getTemporaryCache(a),!s)throw se.createStateNotFoundError("Cached State");try{c=this.authModule.handleFragmentResponse(r,s)}catch(p){throw p instanceof xc&&p.subError===Y.userCancelledError.code?ne.createUserCancelledError():p}return l=this.browserStorage.generateNonceKey(s),d=this.browserStorage.getTemporaryCache(l),this.authCodeRequest.code=c.code,c.cloud_instance_host_name?[4,this.updateTokenEndpointAuthority(c.cloud_instance_host_name,i,o)]:[3,2];case 1:f.sent(),f.label=2;case 2:return c.nonce=d||void 0,c.state=s,c.client_info?this.authCodeRequest.clientInfo=c.client_info:(u=this.checkCcsCredentials(),u&&(this.authCodeRequest.ccsCredential=u)),[4,this.authModule.acquireToken(this.authCodeRequest,c)];case 3:return h=f.sent(),this.browserStorage.cleanRequestByState(n),[2,h]}})})},e}(_y);/*! @azure/msal-browser v2.38.3 2023-10-27 */var Se;(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",t.RESTORE_FROM_BFCACHE="msal:restoreFromBFCache"})(Se||(Se={}));/*! @azure/msal-browser v2.38.3 2023-10-27 */var Da;(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"})(Da||(Da={}));var iu={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"}},_o=function(t){jr(e,t);function e(r,n,i){var o=t.call(this,r,n)||this;return Object.setPrototypeOf(o,e.prototype),o.name="NativeAuthError",o.ext=i,o}return e.prototype.isFatal=function(){if(this.ext&&this.ext.status&&(this.ext.status===Da.PERSISTENT_ERROR||this.ext.status===Da.DISABLED))return!0;switch(this.errorCode){case iu.extensionError.code:return!0;default:return!1}},e.createError=function(r,n,i){if(i&&i.status)switch(i.status){case Da.ACCOUNT_UNAVAILABLE:return Bi.createNativeAccountUnavailableError();case Da.USER_INTERACTION_REQUIRED:return new Bi(r,n);case Da.USER_CANCEL:return ne.createUserCancelledError();case Da.NO_NETWORK:return ne.createNoNetworkConnectivityError()}return new e(r,n,i)},e.createUserSwitchError=function(){return new e(iu.userSwitch.code,iu.userSwitch.desc)},e.createTokensNotFoundInCacheError=function(){return new e(iu.tokensNotFoundInCache.code,iu.tokensNotFoundInCache.desc)},e}(fe);/*! @azure/msal-browser v2.38.3 2023-10-27 */var Qk=function(t){jr(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.acquireToken=function(r){return B(this,void 0,void 0,function(){var n,i,o,a,s;return q(this,function(c){switch(c.label){case 0:return n=this.performanceClient.startMeasurement(L.SilentCacheClientAcquireToken,r.correlationId),i=this.initializeServerTelemetryManager(bt.acquireTokenSilent_silentFlow),[4,this.createSilentFlowClient(i,r.authority,r.azureCloudOptions)];case 1:o=c.sent(),this.logger.verbose("Silent auth client created"),c.label=2;case 2:return c.trys.push([2,4,,5]),[4,o.acquireCachedToken(r)];case 3:return a=c.sent(),n.endMeasurement({success:!0,fromCache:!0}),[2,a];case 4:throw s=c.sent(),s instanceof ne&&s.errorCode===Y.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 fe&&s.errorCode||void 0,subErrorCode:s instanceof fe&&s.subError||void 0,success:!1}),s;case 5:return[2]}})})},e.prototype.logout=function(){return Promise.reject(ne.createSilentLogoutUnsupportedError())},e.prototype.createSilentFlowClient=function(r,n,i){return B(this,void 0,void 0,function(){var o;return q(this,function(a){switch(a.label){case 0:return this.performanceClient.setPreQueueTime(L.StandardInteractionClientGetClientConfiguration,this.correlationId),[4,this.getClientConfiguration(r,n,i)];case 1:return o=a.sent(),[2,new LL(o,this.performanceClient)]}})})},e.prototype.initializeSilentRequest=function(r,n){return B(this,void 0,void 0,function(){var i;return q(this,function(o){switch(o.label){case 0:return this.performanceClient.addQueueMeasurement(L.InitializeSilentRequest,this.correlationId),this.performanceClient.setPreQueueTime(L.InitializeBaseRequest,this.correlationId),i=[ue({},r)],[4,this.initializeBaseRequest(r,n)];case 1:return[2,ue.apply(void 0,[ue.apply(void 0,i.concat([o.sent()])),{account:n,forceRefresh:r.forceRefresh||!1}])]}})})},e}(Td);/*! @azure/msal-browser v2.38.3 2023-10-27 */var Jl=function(t){jr(e,t);function e(r,n,i,o,a,s,c,l,d,u,h,f){var p=t.call(this,r,n,i,o,a,s,l,d,f)||this;return p.apiId=c,p.accountId=u,p.nativeMessageHandler=d,p.nativeStorageManager=h,p.silentCacheClient=new Qk(r,p.nativeStorageManager,i,o,a,s,l,d,f),p}return e.prototype.acquireToken=function(r){return B(this,void 0,void 0,function(){var n,i,o,a,s,c,l;return q(this,function(d){switch(d.label){case 0:return this.logger.trace("NativeInteractionClient - acquireToken called."),n=this.performanceClient.startMeasurement(L.NativeInteractionClientAcquireToken,r.correlationId),i=_i.nowSeconds(),[4,this.initializeNativeRequest(r)];case 1:o=d.sent(),d.label=2;case 2:return d.trys.push([2,4,,5]),[4,this.acquireTokensFromCache(this.accountId,o)];case 3:return a=d.sent(),n.endMeasurement({success:!0,isNativeBroker:!1,fromCache:!0}),[2,a];case 4:return d.sent(),this.logger.info("MSAL internal Cache does not contain tokens, proceed to make a native call"),[3,5];case 5:return s={method:ta.GetToken,request:o},[4,this.nativeMessageHandler.sendMessage(s)];case 6:return c=d.sent(),l=this.validateNativeResponse(c),[2,this.handleNativeResponse(l,o,i).then(function(u){return n.endMeasurement({success:!0,isNativeBroker:!0,requestId:u.requestId}),u}).catch(function(u){throw n.endMeasurement({success:!1,errorCode:u.errorCode,subErrorCode:u.subError,isNativeBroker:!0}),u})]}})})},e.prototype.createSilentCacheRequest=function(r,n){return{authority:r.authority,correlationId:this.correlationId,scopes:Jr.fromString(r.scope).asArray(),account:n,forceRefresh:!1}},e.prototype.acquireTokensFromCache=function(r,n){return B(this,void 0,void 0,function(){var i,o,a,s;return q(this,function(c){switch(c.label){case 0:if(!r)throw this.logger.warning("NativeInteractionClient:acquireTokensFromCache - No nativeAccountId provided"),se.createNoAccountFoundError();if(i=this.browserStorage.getAccountInfoFilteredBy({nativeAccountId:r}),!i)throw se.createNoAccountFoundError();c.label=1;case 1:return c.trys.push([1,3,,4]),o=this.createSilentCacheRequest(n,i),[4,this.silentCacheClient.acquireToken(o)];case 2:return a=c.sent(),[2,a];case 3:throw s=c.sent(),s;case 4:return[2]}})})},e.prototype.acquireTokenRedirect=function(r){return B(this,void 0,void 0,function(){var n,i,o,a,s,c;return q(this,function(l){switch(l.label){case 0:return this.logger.trace("NativeInteractionClient - acquireTokenRedirect called."),[4,this.initializeNativeRequest(r)];case 1:n=l.sent(),i={method:ta.GetToken,request:n},l.label=2;case 2:return l.trys.push([2,4,,5]),[4,this.nativeMessageHandler.sendMessage(i)];case 3:return o=l.sent(),this.validateNativeResponse(o),[3,5];case 4:if(a=l.sent(),a instanceof _o&&a.isFatal())throw a;return[3,5];case 5:return this.browserStorage.setTemporaryCache(Ge.NATIVE_REQUEST,JSON.stringify(n),!0),s={apiId:bt.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 B(this,void 0,void 0,function(){var r,n,i,o,a,s,c,l;return q(this,function(d){switch(d.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,i=Pb(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(Ge.NATIVE_REQUEST)),o={method:ta.GetToken,request:i},a=_i.nowSeconds(),d.label=1;case 1:return d.trys.push([1,3,,4]),this.logger.verbose("NativeInteractionClient - handleRedirectPromise sending message to native broker."),[4,this.nativeMessageHandler.sendMessage(o)];case 2:return s=d.sent(),this.validateNativeResponse(s),c=this.handleNativeResponse(s,i,a),this.browserStorage.setInteractionInProgress(!1),[2,c];case 3:throw l=d.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,i){return B(this,void 0,void 0,function(){var o,a,s,c,l,d;return q(this,function(u){switch(u.label){case 0:if(this.logger.trace("NativeInteractionClient - handleNativeResponse called."),r.account.id!==n.accountId)throw _o.createUserSwitchError();return[4,this.getDiscoveredAuthority(n.authority)];case 1:return o=u.sent(),a=o.getPreferredCache(),s=this.createIdTokenObj(r),c=this.createHomeAccountIdentifier(r,s),l=this.createAccountEntity(r,c,s,a),[4,this.generateAuthenticationResult(r,n,s,l,o.canonicalAuthority,i)];case 2:return d=u.sent(),this.cacheAccount(l),this.cacheNativeTokens(r,n,c,l,s,d.accessToken,d.tenantId,i),[2,d]}})})},e.prototype.createIdTokenObj=function(r){return new Ao(r.id_token||A.EMPTY_STRING,this.browserCrypto)},e.prototype.createHomeAccountIdentifier=function(r,n){var i=Dr.generateHomeAccountId(r.client_info||A.EMPTY_STRING,hn.Default,this.logger,this.browserCrypto,n);return i},e.prototype.createAccountEntity=function(r,n,i,o){return Dr.createAccount(r.client_info,n,i,void 0,void 0,void 0,o,r.account.id)},e.prototype.generateScopes=function(r,n){return r.scope?Jr.fromString(r.scope):Jr.fromString(n.scope)},e.prototype.generatePopAccessToken=function(r,n){return B(this,void 0,void 0,function(){var i,o;return q(this,function(a){switch(a.label){case 0:if(n.tokenType!==at.POP)return[3,2];if(r.shr)return this.logger.trace("handleNativeServerResponse: SHR is enabled in native layer"),[2,r.shr];if(i=new dd(this.browserCrypto),o={resourceRequestMethod:n.resourceRequestMethod,resourceRequestUri:n.resourceRequestUri,shrClaims:n.shrClaims,shrNonce:n.shrNonce},!n.keyId)throw se.createKeyIdMissingError();return[4,i.signPopToken(r.access_token,n.keyId,o)];case 1:return[2,a.sent()];case 2:return[2,r.access_token]}})})},e.prototype.generateAuthenticationResult=function(r,n,i,o,a,s){return B(this,void 0,void 0,function(){var c,l,d,u,h,f,p,m;return q(this,function(w){switch(w.label){case 0:return c=this.addTelemetryFromNativeResponse(r),l=r.scope?Jr.fromString(r.scope):Jr.fromString(n.scope),d=r.account.properties||{},u=d.UID||i.claims.oid||i.claims.sub||A.EMPTY_STRING,h=d.TenantId||i.claims.tid||A.EMPTY_STRING,[4,this.generatePopAccessToken(r,n)];case 1:return f=w.sent(),p=n.tokenType===at.POP?at.POP:at.BEARER,m={authority:a,uniqueId:u,tenantId:h,scopes:l.asArray(),account:o.getAccountInfo(),idToken:r.id_token,idTokenClaims:i.claims,accessToken:f,fromCache:c?this.isResponseFromCache(c):!1,expiresOn:new Date(Number(s+r.expires_in)*1e3),tokenType:p,correlationId:this.correlationId,state:r.state,fromNativeBroker:!0},[2,m]}})})},e.prototype.cacheAccount=function(r){var n=this;this.browserStorage.setAccount(r),this.browserStorage.removeAccountContext(r).catch(function(i){n.logger.error("Error occurred while removing account context from browser storage. "+i)})},e.prototype.cacheNativeTokens=function(r,n,i,o,a,s,c,l){var d=Ks.createIdTokenEntity(i,n.authority,r.id_token||A.EMPTY_STRING,n.clientId,a.claims.tid||A.EMPTY_STRING),u=n.tokenType===at.POP?A.SHR_NONCE_VALIDITY:(typeof r.expires_in=="string"?parseInt(r.expires_in,10):r.expires_in)||0,h=l+u,f=this.generateScopes(r,n),p=Ys.createAccessTokenEntity(i,n.authority,s,n.clientId,a?a.claims.tid||A.EMPTY_STRING:c,f.printScopes(),h,0,this.browserCrypto),m=new fh(o,d,p);this.nativeStorageManager.saveCacheRecord(m)},e.prototype.addTelemetryFromNativeResponse=function(r){var n=this.getMATSFromResponse(r);return n?(this.performanceClient.addStaticFields({extensionId:this.nativeMessageHandler.getExtensionId(),extensionVersion:this.nativeMessageHandler.getExtensionVersion(),matsBrokerVersion:n.broker_version,matsAccountJoinOnStart:n.account_join_on_start,matsAccountJoinOnEnd:n.account_join_on_end,matsDeviceJoin:n.device_join,matsPromptBehavior:n.prompt_behavior,matsApiErrorCode:n.api_error_code,matsUiVisible:n.ui_visible,matsSilentCode:n.silent_code,matsSilentBiSubCode:n.silent_bi_sub_code,matsSilentMessage:n.silent_message,matsSilentStatus:n.silent_status,matsHttpStatus:n.http_status,matsHttpEventCount:n.http_event_count},this.correlationId),n):null},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 _o.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 B(this,void 0,void 0,function(){var n,i,o,a,s,c,l,d,u,h,f=this;return q(this,function(p){switch(p.label){case 0:return this.logger.trace("NativeInteractionClient - initializeNativeRequest called"),n=r.authority||this.config.auth.authority,r.account?[4,this.validateRequestAuthority(n,r.account)]:[3,2];case 1:p.sent(),p.label=2;case 2:return i=new Ue(n),i.validateAsUri(),o=r.scopes,a=Pb(r,["scopes"]),s=new Jr(o||[]),s.appendScopes(g1),c=function(){switch(f.apiId){case bt.ssoSilent:case bt.acquireTokenSilent_silentFlow:return f.logger.trace("initializeNativeRequest: silent request sets prompt to none"),rn.NONE}if(!r.prompt){f.logger.trace("initializeNativeRequest: prompt was not provided");return}switch(r.prompt){case rn.NONE:case rn.CONSENT:case rn.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"),ne.createNativePromptParameterNotSupportedError()}},l=ue(ue({},a),{accountId:this.accountId,clientId:this.config.auth.clientId,authority:i.urlString,scope:s.printScopes(),redirectUri:this.getRedirectUri(r.redirectUri),prompt:c(),correlationId:this.correlationId,tokenType:r.authenticationScheme,windowTitleSubstring:document.title,extraParameters:ue(ue(ue({},r.extraQueryParameters),r.tokenQueryParameters),{telemetry:Iu.MATS_TELEMETRY}),extendedExpiryToken:!1}),r.authenticationScheme!==at.POP?[3,4]:(d={resourceRequestUri:r.resourceRequestUri,resourceRequestMethod:r.resourceRequestMethod,shrClaims:r.shrClaims,shrNonce:r.shrNonce},u=new dd(this.browserCrypto),[4,u.generateCnf(d)]);case 3:h=p.sent(),l.reqCnf=h.reqCnfString,l.keyId=h.kid,p.label=4;case 4:return[2,l]}})})},e}(Yk);/*! @azure/msal-browser v2.38.3 2023-10-27 */var cc=function(){function t(e,r,n,i){this.logger=e,this.handshakeTimeoutMs=r,this.extensionId=i,this.resolvers=new Map,this.handshakeResolvers=new Map,this.responseId=0,this.messageChannel=new MessageChannel,this.windowListener=this.onWindowMessage.bind(this),this.performanceClient=n,this.handshakeEvent=n.startMeasurement(L.NativeMessageHandlerHandshake)}return t.prototype.sendMessage=function(e){return B(this,void 0,void 0,function(){var r,n=this;return q(this,function(i){return this.logger.trace("NativeMessageHandler - sendMessage called."),r={channel:Iu.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(o,a){n.resolvers.set(r.responseId,{resolve:o,reject:a})})]})})},t.createProvider=function(e,r,n){return B(this,void 0,void 0,function(){var i,o;return q(this,function(a){switch(a.label){case 0:e.trace("NativeMessageHandler - createProvider called."),a.label=1;case 1:return a.trys.push([1,3,,5]),i=new t(e,r,n,Iu.PREFERRED_EXTENSION_ID),[4,i.sendHandshakeRequest()];case 2:return a.sent(),[2,i];case 3:return a.sent(),o=new t(e,r,n),[4,o.sendHandshakeRequest()];case 4:return a.sent(),[2,o];case 5:return[2]}})})},t.prototype.sendHandshakeRequest=function(){return B(this,void 0,void 0,function(){var e,r=this;return q(this,function(n){return this.logger.trace("NativeMessageHandler - sendHandshakeRequest called."),window.addEventListener("message",this.windowListener,!1),e={channel:Iu.CHANNEL_ID,extensionId:this.extensionId,responseId:this.responseId++,body:{method:ta.HandshakeRequest}},this.handshakeEvent.addStaticFields({extensionId:this.extensionId,extensionHandshakeTimeoutMs:this.handshakeTimeoutMs}),this.messageChannel.port1.onmessage=function(i){r.onChannelMessage(i)},window.postMessage(e,window.origin,[this.messageChannel.port2]),[2,new Promise(function(i,o){r.handshakeResolvers.set(e.responseId,{resolve:i,reject:o}),r.timeoutId=window.setTimeout(function(){window.removeEventListener("message",r.windowListener,!1),r.messageChannel.port1.close(),r.messageChannel.port2.close(),r.handshakeEvent.endMeasurement({extensionHandshakeTimedOut:!0,success:!1}),o(ne.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!==Iu.CHANNEL_ID)&&!(r.extensionId&&r.extensionId!==this.extensionId)&&r.body.method===ta.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&&(this.handshakeEvent.endMeasurement({success:!1,extensionInstalled:!1}),n.reject(ne.createNativeExtensionNotInstalledError()))}}},t.prototype.onChannelMessage=function(e){this.logger.trace("NativeMessageHandler - onChannelMessage called.");var r=e.data,n=this.resolvers.get(r.responseId),i=this.handshakeResolvers.get(r.responseId);try{var o=r.body.method;if(o===ta.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(_o.createError(a.code,a.description,a.ext));else if(a.result)a.result.code&&a.result.description?n.reject(_o.createError(a.result.code,a.result.description,a.result.ext)):n.resolve(a.result);else throw fe.createUnexpectedError("Event does not contain result.");this.resolvers.delete(r.responseId)}else if(o===ta.HandshakeResponse){if(!i)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),this.handshakeEvent.endMeasurement({extensionInstalled:!0,success:!0}),i.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):i&&i.reject(s)}},t.prototype.getExtensionId=function(){return this.extensionId},t.prototype.getExtensionVersion=function(){return this.extensionVersion},t.isNativeAvailable=function(e,r,n,i){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(i)switch(i){case at.BEARER:case at.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.38.3 2023-10-27 */var QL=function(t){jr(e,t);function e(r,n,i,o,a,s,c,l,d,u){var h=t.call(this,r,n,i,o,a,s,c,d,u)||this;return h.nativeStorage=l,h}return e.prototype.acquireToken=function(r){return B(this,void 0,void 0,function(){var n,i,o,a,s,c,l,d,u,h=this;return q(this,function(f){switch(f.label){case 0:return this.performanceClient.setPreQueueTime(L.StandardInteractionClientInitializeAuthorizationRequest,r.correlationId),[4,this.initializeAuthorizationRequest(r,de.Redirect)];case 1:n=f.sent(),this.browserStorage.updateCacheEntries(n.state,n.nonce,n.authority,n.loginHint||A.EMPTY_STRING,n.account||null),i=this.initializeServerTelemetryManager(bt.acquireTokenRedirect),o=function(p){p.persisted&&(h.logger.verbose("Page was restored from back/forward cache. Clearing temporary cache."),h.browserStorage.cleanRequestByState(n.state),h.eventHandler.emitEvent(Se.RESTORE_FROM_BFCACHE,de.Redirect))},f.label=2;case 2:return f.trys.push([2,7,,8]),this.performanceClient.setPreQueueTime(L.StandardInteractionClientInitializeAuthorizationCodeRequest,r.correlationId),[4,this.initializeAuthorizationCodeRequest(n)];case 3:return a=f.sent(),this.performanceClient.setPreQueueTime(L.StandardInteractionClientCreateAuthCodeClient,r.correlationId),[4,this.createAuthCodeClient(i,n.authority,n.azureCloudOptions)];case 4:return s=f.sent(),this.logger.verbose("Auth code client created"),c=new Ub(s,this.browserStorage,a,this.logger,this.browserCrypto,this.performanceClient),[4,s.getAuthCodeUrl(ue(ue({},n),{nativeBroker:cc.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,r.authenticationScheme)}))];case 5:return l=f.sent(),d=this.getRedirectStartPage(r.redirectStartPage),this.logger.verbosePii("Redirect start page: "+d),window.addEventListener("pageshow",o),[4,c.initiateAuthRequest(l,{navigationClient:this.navigationClient,redirectTimeout:this.config.system.redirectNavigationTimeout,redirectStartPage:d,onRedirectNavigate:r.onRedirectNavigate})];case 6:return[2,f.sent()];case 7:throw u=f.sent(),u instanceof fe&&u.setCorrelationId(this.correlationId),window.removeEventListener("pageshow",o),i.cacheFailedRequest(u),this.browserStorage.cleanRequestByState(n.state),u;case 8:return[2]}})})},e.prototype.handleRedirectPromise=function(r){return B(this,void 0,void 0,function(){var n,i,o,a,s,c,l,d,u,h,f,p;return q(this,function(m){switch(m.label){case 0:n=this.initializeServerTelemetryManager(bt.handleRedirectPromise),m.label=1;case 1:if(m.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(i=this.getRedirectResponseHash(r||window.location.hash),!i)return this.logger.info("handleRedirectPromise did not detect a response hash as a result of a redirect. Cleaning temporary cache."),this.browserStorage.cleanRequestByInteractionType(de.Redirect),[2,null];o=void 0;try{a=Ue.getDeserializedHash(i),o=this.validateAndExtractStateFromHash(a,de.Redirect),this.logger.verbose("State extracted from hash")}catch(w){return this.logger.info("handleRedirectPromise was unable to extract state due to: "+w),this.browserStorage.cleanRequestByInteractionType(de.Redirect),[2,null]}return s=this.browserStorage.getTemporaryCache(Ge.ORIGIN_URI,!0)||A.EMPTY_STRING,c=Ue.removeHashFromUrl(s),l=Ue.removeHashFromUrl(window.location.href),c===l&&this.config.auth.navigateToLoginRequestUrl?(this.logger.verbose("Current page is loginRequestUrl, handling hash"),[4,this.handleHash(i,o,n)]):[3,3];case 2:return d=m.sent(),s.indexOf("#")>-1&&er.replaceHash(s),[2,d];case 3:return this.config.auth.navigateToLoginRequestUrl?[3,4]:(this.logger.verbose("NavigateToLoginRequestUrl set to false, handling hash"),[2,this.handleHash(i,o,n)]);case 4:return!er.isInIframe()||this.config.system.allowRedirectInIframe?(this.browserStorage.setTemporaryCache(Ge.URL_HASH,i,!0),u={apiId:bt.handleRedirectPromise,timeout:this.config.system.redirectNavigationTimeout,noHistory:!0},h=!0,!s||s==="null"?(f=er.getHomepage(),this.browserStorage.setTemporaryCache(Ge.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,u)]):[3,6]):[3,9];case 5:return h=m.sent(),[3,8];case 6:return this.logger.verbose("Navigating to loginRequestUrl: "+s),[4,this.navigationClient.navigateInternal(s,u)];case 7:h=m.sent(),m.label=8;case 8:if(!h)return[2,this.handleHash(i,o,n)];m.label=9;case 9:return[2,null];case 10:throw p=m.sent(),p instanceof fe&&p.setCorrelationId(this.correlationId),n.cacheFailedRequest(p),this.browserStorage.cleanRequestByInteractionType(de.Redirect),p;case 11:return[2]}})})},e.prototype.getRedirectResponseHash=function(r){this.logger.verbose("getRedirectResponseHash called");var n=Ue.hashContainsKnownProperties(r);if(n)return er.clearHash(window),this.logger.verbose("Hash contains known properties, returning response hash"),r;var i=this.browserStorage.getTemporaryCache(Ge.URL_HASH,!0);return this.browserStorage.removeItem(this.browserStorage.generateCacheKey(Ge.URL_HASH)),this.logger.verbose("Hash does not contain known properties, returning cached hash"),i},e.prototype.handleHash=function(r,n,i){return B(this,void 0,void 0,function(){var o,a,s,c,l,d,u,h=this;return q(this,function(f){switch(f.label){case 0:if(o=this.browserStorage.getCachedRequest(n,this.browserCrypto),this.logger.verbose("handleHash called, retrieved cached request"),a=Ue.getDeserializedHash(r),a.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),!this.nativeMessageHandler)throw ne.createNativeConnectionNotEstablishedError();return s=new Jl(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,bt.acquireTokenPopup,this.performanceClient,this.nativeMessageHandler,a.accountId,this.nativeStorage,o.correlationId),c=aa.parseRequestState(this.browserCrypto,n).userRequestState,[2,s.acquireToken(ue(ue({},o),{state:c,prompt:void 0})).finally(function(){h.browserStorage.cleanRequestByState(n)})]}if(l=this.browserStorage.getCachedAuthority(n),!l)throw ne.createNoCachedAuthorityError();return this.performanceClient.setPreQueueTime(L.StandardInteractionClientCreateAuthCodeClient,o.correlationId),[4,this.createAuthCodeClient(i,l)];case 1:return d=f.sent(),this.logger.verbose("Auth code client created"),L2.removeThrottle(this.browserStorage,this.config.auth.clientId,o),u=new Ub(d,this.browserStorage,o,this.logger,this.browserCrypto,this.performanceClient),[4,u.handleCodeResponseFromHash(r,n,d.authority,this.networkClient)];case 2:return[2,f.sent()]}})})},e.prototype.logout=function(r){return B(this,void 0,void 0,function(){var n,i,o,a,s,c,l;return q(this,function(d){switch(d.label){case 0:this.logger.verbose("logoutRedirect called"),n=this.initializeLogoutRequest(r),i=this.initializeServerTelemetryManager(bt.logout),d.label=1;case 1:return d.trys.push([1,10,,11]),this.eventHandler.emitEvent(Se.LOGOUT_START,de.Redirect,r),[4,this.clearCacheOnLogout(n.account)];case 2:return d.sent(),o={apiId:bt.logout,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},this.performanceClient.setPreQueueTime(L.StandardInteractionClientCreateAuthCodeClient,n.correlationId),[4,this.createAuthCodeClient(i,r&&r.authority)];case 3:return a=d.sent(),this.logger.verbose("Auth code client created"),s=a.getLogoutUri(n),this.eventHandler.emitEvent(Se.LOGOUT_SUCCESS,de.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,o)])):[3,7];case 4:return d.sent(),[2];case 5:this.browserStorage.setInteractionInProgress(!1),this.logger.verbose("Logout onRedirectNavigate returned false, stopping navigation"),d.label=6;case 6:return[3,9];case 7:return this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0),[4,this.navigationClient.navigateExternal(s,o)];case 8:return d.sent(),[2];case 9:return[3,11];case 10:throw l=d.sent(),l instanceof fe&&l.setCorrelationId(this.correlationId),i.cacheFailedRequest(l),this.eventHandler.emitEvent(Se.LOGOUT_FAILURE,de.Redirect,null,l),this.eventHandler.emitEvent(Se.LOGOUT_END,de.Redirect),l;case 11:return this.eventHandler.emitEvent(Se.LOGOUT_END,de.Redirect),[2]}})})},e.prototype.getRedirectStartPage=function(r){var n=r||window.location.href;return Ue.getAbsoluteUrl(n,er.getCurrentUri())},e}(Td);/*! @azure/msal-browser v2.38.3 2023-10-27 */var XL=function(t){jr(e,t);function e(r,n,i,o,a,s,c,l,d,u){var h=t.call(this,r,n,i,o,a,s,c,d,u)||this;return h.unloadWindow=h.unloadWindow.bind(h),h.nativeStorage=l,h}return e.prototype.acquireToken=function(r){try{var n=this.generatePopupName(r.scopes||g1,r.authority||this.config.auth.authority),i=r.popupWindowAttributes||{};if(this.config.system.asyncPopups)return this.logger.verbose("asyncPopups set to true, acquiring token"),this.acquireTokenPopupAsync(r,n,i);this.logger.verbose("asyncPopup set to false, opening popup before acquiring token");var o=this.openSizedPopup("about:blank",n,i);return this.acquireTokenPopupAsync(r,n,i,o)}catch(a){return Promise.reject(a)}},e.prototype.logout=function(r){try{this.logger.verbose("logoutPopup called");var n=this.initializeLogoutRequest(r),i=this.generateLogoutPopupName(n),o=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,i,s,o,void 0,a);this.logger.verbose("asyncPopup set to false, opening popup");var c=this.openSizedPopup("about:blank",i,s);return this.logoutPopupAsync(n,i,s,o,c,a)}catch(l){return Promise.reject(l)}},e.prototype.acquireTokenPopupAsync=function(r,n,i,o){return B(this,void 0,void 0,function(){var a,s,c,l,d,u,h,f,p,m,w,g,v,b,E,k,x,S=this;return q(this,function($){switch($.label){case 0:return this.logger.verbose("acquireTokenPopupAsync called"),a=this.initializeServerTelemetryManager(bt.acquireTokenPopup),this.performanceClient.setPreQueueTime(L.StandardInteractionClientInitializeAuthorizationRequest,r.correlationId),[4,this.initializeAuthorizationRequest(r,de.Popup)];case 1:s=$.sent(),this.browserStorage.updateCacheEntries(s.state,s.nonce,s.authority,s.loginHint||A.EMPTY_STRING,s.account||null),$.label=2;case 2:return $.trys.push([2,8,,9]),this.performanceClient.setPreQueueTime(L.StandardInteractionClientInitializeAuthorizationCodeRequest,r.correlationId),[4,this.initializeAuthorizationCodeRequest(s)];case 3:return c=$.sent(),this.performanceClient.setPreQueueTime(L.StandardInteractionClientCreateAuthCodeClient,r.correlationId),[4,this.createAuthCodeClient(a,s.authority,s.azureCloudOptions)];case 4:return l=$.sent(),this.logger.verbose("Auth code client created"),d=cc.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,r.authenticationScheme),u=void 0,d&&(u=this.performanceClient.startMeasurement(L.FetchAccountIdWithNativeBroker,r.correlationId)),[4,l.getAuthCodeUrl(ue(ue({},s),{nativeBroker:d}))];case 5:return h=$.sent(),f=new _y(l,this.browserStorage,c,this.logger,this.performanceClient),p={popup:o,popupName:n,popupWindowAttributes:i},m=this.initiateAuthRequest(h,p),this.eventHandler.emitEvent(Se.POPUP_OPENED,de.Popup,{popupWindow:m},null),[4,this.monitorPopupForHash(m)];case 6:if(w=$.sent(),g=Ue.getDeserializedHash(w),v=this.validateAndExtractStateFromHash(g,de.Popup,s.correlationId),L2.removeThrottle(this.browserStorage,this.config.auth.clientId,c),g.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),u&&u.endMeasurement({success:!0,isNativeBroker:!0}),!this.nativeMessageHandler)throw ne.createNativeConnectionNotEstablishedError();return b=new Jl(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,bt.acquireTokenPopup,this.performanceClient,this.nativeMessageHandler,g.accountId,this.nativeStorage,s.correlationId),E=aa.parseRequestState(this.browserCrypto,v).userRequestState,[2,b.acquireToken(ue(ue({},s),{state:E,prompt:void 0})).finally(function(){S.browserStorage.cleanRequestByState(v)})]}return[4,f.handleCodeResponseFromHash(w,v,l.authority,this.networkClient)];case 7:return k=$.sent(),[2,k];case 8:throw x=$.sent(),o&&o.close(),x instanceof fe&&x.setCorrelationId(this.correlationId),a.cacheFailedRequest(x),this.browserStorage.cleanRequestByState(s.state),x;case 9:return[2]}})})},e.prototype.logoutPopupAsync=function(r,n,i,o,a,s){return B(this,void 0,void 0,function(){var c,l,d,u,h,f,p;return q(this,function(m){switch(m.label){case 0:this.logger.verbose("logoutPopupAsync called"),this.eventHandler.emitEvent(Se.LOGOUT_START,de.Popup,r),c=this.initializeServerTelemetryManager(bt.logoutPopup),m.label=1;case 1:return m.trys.push([1,5,,6]),[4,this.clearCacheOnLogout(r.account)];case 2:return m.sent(),this.performanceClient.setPreQueueTime(L.StandardInteractionClientCreateAuthCodeClient,r.correlationId),[4,this.createAuthCodeClient(c,o)];case 3:return l=m.sent(),this.logger.verbose("Auth code client created"),d=l.getLogoutUri(r),this.eventHandler.emitEvent(Se.LOGOUT_SUCCESS,de.Popup,r),u=this.openPopup(d,{popupName:n,popupWindowAttributes:i,popup:a}),this.eventHandler.emitEvent(Se.POPUP_OPENED,de.Popup,{popupWindow:u},null),[4,this.waitForLogoutPopup(u)];case 4:return m.sent(),s?(h={apiId:bt.logoutPopup,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},f=Ue.getAbsoluteUrl(s,er.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,h)):this.logger.verbose("No main window navigation requested"),[3,6];case 5:throw p=m.sent(),a&&a.close(),p instanceof fe&&p.setCorrelationId(this.correlationId),this.browserStorage.setInteractionInProgress(!1),this.eventHandler.emitEvent(Se.LOGOUT_FAILURE,de.Popup,null,p),this.eventHandler.emitEvent(Se.LOGOUT_END,de.Popup),c.cacheFailedRequest(p),p;case 6:return this.eventHandler.emitEvent(Se.LOGOUT_END,de.Popup),[2]}})})},e.prototype.initiateAuthRequest=function(r,n){if(ae.isEmpty(r))throw this.logger.error("Navigate url is empty"),ne.createEmptyNavigationUriError();return this.logger.infoPii("Navigate to: "+r),this.openPopup(r,n)},e.prototype.monitorPopupForHash=function(r){var n=this;return new Promise(function(i,o){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),o(ne.createUserCancelledError());return}var l=A.EMPTY_STRING,d=A.EMPTY_STRING;try{l=r.location.href,d=r.location.hash}catch{}ae.isEmpty(l)||l==="about:blank"||(n.logger.verbose("PopupHandler.monitorPopupForHash - popup window is on same origin as caller"),s++,d?(n.logger.verbose("PopupHandler.monitorPopupForHash - found hash in url"),clearInterval(c),n.cleanPopup(r),Ue.hashContainsKnownProperties(d)?(n.logger.verbose("PopupHandler.monitorPopupForHash - hash contains known properties, returning."),i(d)):(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: "+d),o(ne.createHashDoesNotContainKnownPropertiesError()))):s>a&&(n.logger.error("PopupHandler.monitorPopupForHash - unable to find hash in url, timing out"),clearInterval(c),o(ne.createMonitorPopupTimeoutError())))},n.config.system.pollIntervalMilliseconds)})},e.prototype.waitForLogoutPopup=function(r){var n=this;return new Promise(function(i){n.logger.verbose("PopupHandler.waitForLogoutPopup - polling started");var o=setInterval(function(){r.closed&&(n.logger.error("PopupHandler.waitForLogoutPopup - window closed"),n.cleanPopup(),clearInterval(o),i());var a=A.EMPTY_STRING;try{a=r.location.href}catch{}ae.isEmpty(a)||a==="about:blank"||(n.logger.verbose("PopupHandler.waitForLogoutPopup - popup window is on same origin as caller, closing."),clearInterval(o),n.cleanPopup(r),i())},n.config.system.pollIntervalMilliseconds)})},e.prototype.openPopup=function(r,n){try{var i=void 0;if(n.popup?(i=n.popup,this.logger.verbosePii("Navigating popup window to: "+r),i.location.assign(r)):typeof n.popup>"u"&&(this.logger.verbosePii("Opening popup window to: "+r),i=this.openSizedPopup(r,n.popupName,n.popupWindowAttributes)),!i)throw ne.createEmptyWindowCreatedError();return i.focus&&i.focus(),this.currentWindow=i,window.addEventListener("beforeunload",this.unloadWindow),i}catch(o){throw this.logger.error("error opening popup "+o.message),this.browserStorage.setInteractionInProgress(!1),ne.createPopupWindowError(o.toString())}},e.prototype.openSizedPopup=function(r,n,i){var o,a,s,c,l=window.screenLeft?window.screenLeft:window.screenX,d=window.screenTop?window.screenTop:window.screenY,u=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,h=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,f=(o=i.popupSize)===null||o===void 0?void 0:o.width,p=(a=i.popupSize)===null||a===void 0?void 0:a.height,m=(s=i.popupPosition)===null||s===void 0?void 0:s.top,w=(c=i.popupPosition)===null||c===void 0?void 0:c.left;return(!f||f<0||f>u)&&(this.logger.verbose("Default popup window width used. Window width not configured or invalid."),f=ji.POPUP_WIDTH),(!p||p<0||p>h)&&(this.logger.verbose("Default popup window height used. Window height not configured or invalid."),p=ji.POPUP_HEIGHT),(!m||m<0||m>h)&&(this.logger.verbose("Default popup window top position used. Window top not configured or invalid."),m=Math.max(0,h/2-ji.POPUP_HEIGHT/2+d)),(!w||w<0||w>u)&&(this.logger.verbose("Default popup window left position used. Window left not configured or invalid."),w=Math.max(0,u/2-ji.POPUP_WIDTH/2+l)),window.open(r,n,"width="+f+", height="+p+", top="+m+", left="+w+", scrollbars=yes")},e.prototype.unloadWindow=function(r){this.browserStorage.cleanRequestByInteractionType(de.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 ji.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 ji.POPUP_NAME_PREFIX+"."+this.config.auth.clientId+"."+n+"."+this.correlationId},e}(Td);/*! @azure/msal-browser v2.38.3 2023-10-27 */var JL=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.38.3 2023-10-27 */var eN=6e4,U4=6e3,tN=3e4,rN=2e3;function nN(t,e){var r=t.auth,n=t.cache,i=t.system,o=t.telemetry,a={clientId:A.EMPTY_STRING,authority:""+A.DEFAULT_AUTHORITY,knownAuthorities:[],cloudDiscoveryMetadata:A.EMPTY_STRING,authorityMetadata:A.EMPTY_STRING,redirectUri:A.EMPTY_STRING,postLogoutRedirectUri:A.EMPTY_STRING,navigateToLoginRequestUrl:!0,clientCapabilities:[],protocolMode:Uh.AAD,azureCloudOptions:{azureCloudInstance:jh.None,tenant:A.EMPTY_STRING},skipAuthorityMetadataCache:!1},s={cacheLocation:lr.SessionStorage,temporaryCacheLocation:lr.SessionStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!!(n&&n.cacheLocation===lr.LocalStorage),claimsBasedCachingEnabled:!0},c={loggerCallback:function(){},logLevel:Gt.Info,piiLoggingEnabled:!1},l=ue(ue({},Uk),{loggerOptions:c,networkClient:e?er.getBrowserNetworkClient():zL,navigationClient:new JL,loadFrameTimeout:0,windowHashTimeout:(i==null?void 0:i.loadFrameTimeout)||eN,iframeHashTimeout:(i==null?void 0:i.loadFrameTimeout)||U4,navigateFrameWait:e&&er.detectIEOrEdge()?500:0,redirectNavigationTimeout:tN,asyncPopups:!1,allowRedirectInIframe:!1,allowNativeBroker:!1,nativeBrokerHandshakeTimeout:(i==null?void 0:i.nativeBrokerHandshakeTimeout)||rN,pollIntervalMilliseconds:ji.DEFAULT_POLL_INTERVAL_MS,cryptoOptions:{useMsrCrypto:!1,entropy:void 0}}),d=ue(ue({},i),{loggerOptions:(i==null?void 0:i.loggerOptions)||c}),u={application:{appName:A.EMPTY_STRING,appVersion:A.EMPTY_STRING}},h={auth:ue(ue({},a),r),cache:ue(ue({},s),n),system:ue(ue({},l),d),telemetry:ue(ue({},u),o)};return h}/*! @azure/msal-browser v2.38.3 2023-10-27 */var Xk=function(t){jr(e,t);function e(r,n,i,o,a,s){var c=t.call(this,r,n,i,o,s)||this;return c.navigateFrameWait=a.navigateFrameWait,c.pollIntervalMilliseconds=a.pollIntervalMilliseconds,c}return e.prototype.initiateAuthRequest=function(r){return B(this,void 0,void 0,function(){return q(this,function(n){switch(n.label){case 0:if(this.performanceClient.addQueueMeasurement(L.SilentHandlerInitiateAuthRequest,this.authCodeRequest.correlationId),ae.isEmpty(r))throw this.logger.info("Navigate url is empty"),ne.createEmptyNavigationUriError();return this.navigateFrameWait?(this.performanceClient.setPreQueueTime(L.SilentHandlerLoadFrame,this.authCodeRequest.correlationId),[4,this.loadFrame(r)]):[3,2];case 1:return[2,n.sent()];case 2:return[2,this.loadFrameSync(r)]}})})},e.prototype.monitorIframeForHash=function(r,n){var i=this;return this.performanceClient.addQueueMeasurement(L.SilentHandlerMonitorIframeForHash,this.authCodeRequest.correlationId),new Promise(function(o,a){n<U4&&i.logger.warning("system.loadFrameTimeout or system.iframeHashTimeout set to lower ("+n+"ms) than the default ("+U4+"ms). This may result in timeouts.");var s=window.performance.now(),c=s+n,l=setInterval(function(){if(window.performance.now()>c){i.removeHiddenIframe(r),clearInterval(l),a(ne.createMonitorIframeTimeoutError());return}var d=A.EMPTY_STRING,u=r.contentWindow;try{d=u?u.location.href:A.EMPTY_STRING}catch{}if(!ae.isEmpty(d)){var h=u?u.location.hash:A.EMPTY_STRING;if(Ue.hashContainsKnownProperties(h)){i.removeHiddenIframe(r),clearInterval(l),o(h);return}}},i.pollIntervalMilliseconds)})},e.prototype.loadFrame=function(r){var n=this;return this.performanceClient.addQueueMeasurement(L.SilentHandlerLoadFrame,this.authCodeRequest.correlationId),new Promise(function(i,o){var a=n.createHiddenIframe();setTimeout(function(){if(!a){o("Unable to load iframe");return}a.src=r,i(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}(_y);/*! @azure/msal-browser v2.38.3 2023-10-27 */var iN=function(t){jr(e,t);function e(r,n,i,o,a,s,c,l,d,u,h){var f=t.call(this,r,n,i,o,a,s,l,u,h)||this;return f.apiId=c,f.nativeStorage=d,f}return e.prototype.acquireToken=function(r){return B(this,void 0,void 0,function(){var n,i,o,a,s;return q(this,function(c){switch(c.label){case 0:if(this.performanceClient.addQueueMeasurement(L.SilentIframeClientAcquireToken,r.correlationId),this.logger.verbose("acquireTokenByIframe called"),n=this.performanceClient.startMeasurement(L.SilentIframeClientAcquireToken,r.correlationId),ae.isEmpty(r.loginHint)&&ae.isEmpty(r.sid)&&(!r.account||ae.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!==rn.NONE&&r.prompt!==rn.NO_SESSION)throw n.endMeasurement({success:!1}),ne.createSilentPromptValueError(r.prompt);return this.performanceClient.setPreQueueTime(L.StandardInteractionClientInitializeAuthorizationRequest,r.correlationId),[4,this.initializeAuthorizationRequest(ue(ue({},r),{prompt:r.prompt||rn.NONE}),de.Silent)];case 1:i=c.sent(),this.browserStorage.updateCacheEntries(i.state,i.nonce,i.authority,i.loginHint||A.EMPTY_STRING,i.account||null),o=this.initializeServerTelemetryManager(this.apiId),c.label=2;case 2:return c.trys.push([2,5,,6]),this.performanceClient.setPreQueueTime(L.StandardInteractionClientCreateAuthCodeClient,r.correlationId),[4,this.createAuthCodeClient(o,i.authority,i.azureCloudOptions)];case 3:return a=c.sent(),this.logger.verbose("Auth code client created"),this.performanceClient.setPreQueueTime(L.SilentIframeClientTokenHelper,r.correlationId),[4,this.silentTokenHelper(a,i).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 fe&&s.setCorrelationId(this.correlationId),o.cacheFailedRequest(s),this.browserStorage.cleanRequestByState(i.state),n.endMeasurement({errorCode:s instanceof fe&&s.errorCode||void 0,subErrorCode:s instanceof fe&&s.subError||void 0,success:!1}),s;case 6:return[2]}})})},e.prototype.logout=function(){return Promise.reject(ne.createSilentLogoutUnsupportedError())},e.prototype.silentTokenHelper=function(r,n){return B(this,void 0,void 0,function(){var i,o,a,s,c,l,d,u,h,f=this;return q(this,function(p){switch(p.label){case 0:return this.performanceClient.addQueueMeasurement(L.SilentIframeClientTokenHelper,n.correlationId),this.performanceClient.setPreQueueTime(L.StandardInteractionClientInitializeAuthorizationCodeRequest,n.correlationId),[4,this.initializeAuthorizationCodeRequest(n)];case 1:return i=p.sent(),this.performanceClient.setPreQueueTime(L.GetAuthCodeUrl,n.correlationId),[4,r.getAuthCodeUrl(ue(ue({},n),{nativeBroker:cc.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,n.authenticationScheme)}))];case 2:return o=p.sent(),a=new Xk(r,this.browserStorage,i,this.logger,this.config.system,this.performanceClient),this.performanceClient.setPreQueueTime(L.SilentHandlerInitiateAuthRequest,n.correlationId),[4,a.initiateAuthRequest(o)];case 3:return s=p.sent(),this.performanceClient.setPreQueueTime(L.SilentHandlerMonitorIframeForHash,n.correlationId),[4,a.monitorIframeForHash(s,this.config.system.iframeHashTimeout)];case 4:if(c=p.sent(),l=Ue.getDeserializedHash(c),d=this.validateAndExtractStateFromHash(l,de.Silent,i.correlationId),l.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),!this.nativeMessageHandler)throw ne.createNativeConnectionNotEstablishedError();return u=new Jl(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.apiId,this.performanceClient,this.nativeMessageHandler,l.accountId,this.browserStorage,this.correlationId),h=aa.parseRequestState(this.browserCrypto,d).userRequestState,[2,u.acquireToken(ue(ue({},n),{state:h,prompt:n.prompt||rn.NONE})).finally(function(){f.browserStorage.cleanRequestByState(d)})]}return this.performanceClient.setPreQueueTime(L.HandleCodeResponseFromHash,n.correlationId),[2,a.handleCodeResponseFromHash(c,d,r.authority,this.networkClient)]}})})},e}(Td);/*! @azure/msal-browser v2.38.3 2023-10-27 */var oN=function(t){jr(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.acquireToken=function(r){return B(this,void 0,void 0,function(){var n,i,o,a,s,c=this;return q(this,function(l){switch(l.label){case 0:return this.performanceClient.addQueueMeasurement(L.SilentRefreshClientAcquireToken,r.correlationId),this.performanceClient.setPreQueueTime(L.InitializeBaseRequest,r.correlationId),i=[ue({},r)],[4,this.initializeBaseRequest(r,r.account)];case 1:return n=ue.apply(void 0,i.concat([l.sent()])),o=this.performanceClient.startMeasurement(L.SilentRefreshClientAcquireToken,n.correlationId),a=this.initializeServerTelemetryManager(bt.acquireTokenSilent_silentFlow),[4,this.createRefreshTokenClient(a,n.authority,n.azureCloudOptions)];case 2:return s=l.sent(),this.logger.verbose("Refresh token client created"),this.performanceClient.setPreQueueTime(L.RefreshTokenClientAcquireTokenByRefreshToken,r.correlationId),[2,s.acquireTokenByRefreshToken(n).then(function(d){return o.endMeasurement({success:!0,fromCache:d.fromCache,requestId:d.requestId}),d}).catch(function(d){throw d instanceof fe&&d.setCorrelationId(c.correlationId),a.cacheFailedRequest(d),o.endMeasurement({errorCode:d.errorCode,subErrorCode:d.subError,success:!1}),d})]}})})},e.prototype.logout=function(){return Promise.reject(ne.createSilentLogoutUnsupportedError())},e.prototype.createRefreshTokenClient=function(r,n,i){return B(this,void 0,void 0,function(){var o;return q(this,function(a){switch(a.label){case 0:return this.performanceClient.setPreQueueTime(L.StandardInteractionClientGetClientConfiguration,this.correlationId),[4,this.getClientConfiguration(r,n,i)];case 1:return o=a.sent(),[2,new qk(o,this.performanceClient)]}})})},e}(Td);/*! @azure/msal-browser v2.38.3 2023-10-27 */var aN=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,i){var o=this;if(typeof window<"u"){var a={eventType:e,interactionType:r||null,payload:n||null,error:i||null,timestamp:Date.now()};this.logger.info("Emitting event: "+e),this.eventCallbacks.forEach(function(s,c){o.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"||!Dr.isAccountEntity(n))return;var i=Rn.toObject(new Dr,n),o=i.getAccountInfo();!e.oldValue&&e.newValue?(this.logger.info("Account was added to cache in a different window"),this.emitEvent(Se.ACCOUNT_ADDED,void 0,o)):!e.newValue&&e.oldValue&&(this.logger.info("Account was removed from cache in a different window"),this.emitEvent(Se.ACCOUNT_REMOVED,void 0,o))}catch{return}},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Kr=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.38.3 2023-10-27 */var Jk=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,Kr.decimalToHex(e[0])+Kr.decimalToHex(e[1])+Kr.decimalToHex(e[2])+Kr.decimalToHex(e[3])+"-"+Kr.decimalToHex(e[4])+Kr.decimalToHex(e[5])+"-"+Kr.decimalToHex(e[6])+Kr.decimalToHex(e[7])+"-"+Kr.decimalToHex(e[8])+Kr.decimalToHex(e[9])+"-"+Kr.decimalToHex(e[10])+Kr.decimalToHex(e[11])+Kr.decimalToHex(e[12])+Kr.decimalToHex(e[13])+Kr.decimalToHex(e[14])+Kr.decimalToHex(e[15])}catch{for(var r="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx",n="0123456789abcdef",i=0,o=A.EMPTY_STRING,a=0;a<36;a++)r[a]!=="-"&&r[a]!=="4"&&(i=Math.random()*16|0),r[a]==="x"?o+=n[i]:r[a]==="y"?(i&=3,i|=8,o+=n[i]):o+=r[a];return o}},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.38.3 2023-10-27 */var sa=function(){function t(){}return t.stringToUtf8Arr=function(e){for(var r,n=0,i=e.length,o=0;o<i;o++)r=e.charCodeAt(o),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),i=0;i<e.length;i++)n[i]=e.charCodeAt(i);return r},t.utf8ArrToString=function(e){for(var r=A.EMPTY_STRING,n=void 0,i=e.length,o=0;o<i;o++)n=e[o],r+=String.fromCharCode(n>251&&n<254&&o+5<i?(n-252)*1073741824+(e[++o]-128<<24)+(e[++o]-128<<18)+(e[++o]-128<<12)+(e[++o]-128<<6)+e[++o]-128:n>247&&n<252&&o+4<i?(n-248<<24)+(e[++o]-128<<18)+(e[++o]-128<<12)+(e[++o]-128<<6)+e[++o]-128:n>239&&n<248&&o+3<i?(n-240<<18)+(e[++o]-128<<12)+(e[++o]-128<<6)+e[++o]-128:n>223&&n<240&&o+2<i?(n-224<<12)+(e[++o]-128<<6)+e[++o]-128:n>191&&n<224&&o+1<i?(n-192<<6)+e[++o]-128:n);return r},t.getSortedObjectString=function(e){return JSON.stringify(e,Object.keys(e).sort())},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var eS=function(){function t(){}return t.prototype.urlEncode=function(e){return encodeURIComponent(this.encode(e).replace(/=/g,A.EMPTY_STRING).replace(/\+/g,"-").replace(/\//g,"_"))},t.prototype.urlEncodeArr=function(e){return this.base64EncArr(e).replace(/=/g,A.EMPTY_STRING).replace(/\+/g,"-").replace(/\//g,"_")},t.prototype.encode=function(e){var r=sa.stringToUtf8Arr(e);return this.base64EncArr(r)},t.prototype.base64EncArr=function(e){for(var r=(3-e.length%3)%3,n=A.EMPTY_STRING,i=void 0,o=e.length,a=0,s=0;s<o;s++)i=s%3,a|=e[s]<<(16>>>i&24),(i===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.38.3 2023-10-27 */var sN=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 sa.utf8ArrToString(n)},t.prototype.base64DecToArr=function(e,r){for(var n=e.replace(/[^A-Za-z0-9\+\/]/g,A.EMPTY_STRING),i=n.length,o=r?Math.ceil((i*3+1>>>2)/r)*r:i*3+1>>>2,a=new Uint8Array(o),s=void 0,c=void 0,l=0,d=0,u=0;u<i;u++)if(c=u&3,l|=this.b64ToUint6(n.charCodeAt(u))<<18-6*c,c===3||i-u===1){for(s=0;s<3&&d<o;s++,d++)a[d]=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.38.3 2023-10-27 */var cN=32,lN=function(){function t(e){this.base64Encode=new eS,this.cryptoObj=e}return t.prototype.generateCodes=function(){return B(this,void 0,void 0,function(){var e,r;return q(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(cN);this.cryptoObj.getRandomValues(e);var r=this.base64Encode.urlEncodeArr(e);return r}catch(n){throw ne.createPkceNotGeneratedError(n)}},t.prototype.generateCodeChallengeFromVerifier=function(e){return B(this,void 0,void 0,function(){var r,n;return q(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.cryptoObj.sha256Digest(e)];case 1:return r=i.sent(),[2,this.base64Encode.urlEncodeArr(new Uint8Array(r))];case 2:throw n=i.sent(),ne.createPkceNotGeneratedError(n);case 3:return[2]}})})},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var dN=function(){function t(){}return t.prototype.getRandomValues=function(e){return window.crypto.getRandomValues(e)},t.prototype.generateKey=function(e,r,n){return B(this,void 0,void 0,function(){return q(this,function(i){return[2,window.crypto.subtle.generateKey(e,r,n)]})})},t.prototype.exportKey=function(e){return B(this,void 0,void 0,function(){return q(this,function(r){return[2,window.crypto.subtle.exportKey(ud,e)]})})},t.prototype.importKey=function(e,r,n,i){return B(this,void 0,void 0,function(){return q(this,function(o){return[2,window.crypto.subtle.importKey(ud,e,r,n,i)]})})},t.prototype.sign=function(e,r,n){return B(this,void 0,void 0,function(){return q(this,function(i){return[2,window.crypto.subtle.sign(e,r,n)]})})},t.prototype.digest=function(e,r){return B(this,void 0,void 0,function(){return q(this,function(n){return[2,window.crypto.subtle.digest(e,r)]})})},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var uN=function(){function t(){}return t.prototype.initPrng=function(e){return window.msrCrypto.initPrng(my(e))},t.prototype.getRandomValues=function(e){return window.msrCrypto.getRandomValues(e)},t.prototype.generateKey=function(e,r,n){return B(this,void 0,void 0,function(){return q(this,function(i){return[2,window.msrCrypto.subtle.generateKey(e,r,n)]})})},t.prototype.exportKey=function(e){return B(this,void 0,void 0,function(){return q(this,function(r){return[2,window.msrCrypto.subtle.exportKey(ud,e)]})})},t.prototype.importKey=function(e,r,n,i){return B(this,void 0,void 0,function(){return q(this,function(o){return[2,window.msrCrypto.subtle.importKey(ud,e,r,n,i)]})})},t.prototype.sign=function(e,r,n){return B(this,void 0,void 0,function(){return q(this,function(i){return[2,window.msrCrypto.subtle.sign(e,r,n)]})})},t.prototype.digest=function(e,r){return B(this,void 0,void 0,function(){return q(this,function(n){return[2,window.msrCrypto.subtle.digest(e,r)]})})},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var hN=function(){function t(){}return t.prototype.getRandomValues=function(e){return window.msCrypto.getRandomValues(e)},t.prototype.generateKey=function(e,r,n){return B(this,void 0,void 0,function(){return q(this,function(i){return[2,new Promise(function(o,a){var s=window.msCrypto.subtle.generateKey(e,r,n);s.addEventListener("complete",function(c){o(c.target.result)}),s.addEventListener("error",function(c){a(c)})})]})})},t.prototype.exportKey=function(e){return B(this,void 0,void 0,function(){return q(this,function(r){return[2,new Promise(function(n,i){var o=window.msCrypto.subtle.exportKey(ud,e);o.addEventListener("complete",function(a){var s=a.target.result,c=sa.utf8ArrToString(new Uint8Array(s)).replace(/\r/g,A.EMPTY_STRING).replace(/\n/g,A.EMPTY_STRING).replace(/\t/g,A.EMPTY_STRING).split(" ").join(A.EMPTY_STRING).replace("\0",A.EMPTY_STRING);try{n(JSON.parse(c))}catch(l){i(l)}}),o.addEventListener("error",function(a){i(a)})})]})})},t.prototype.importKey=function(e,r,n,i){return B(this,void 0,void 0,function(){var o,a;return q(this,function(s){return o=sa.getSortedObjectString(e),a=sa.stringToArrayBuffer(o),[2,new Promise(function(c,l){var d=window.msCrypto.subtle.importKey(ud,a,r,n,i);d.addEventListener("complete",function(u){c(u.target.result)}),d.addEventListener("error",function(u){l(u)})})]})})},t.prototype.sign=function(e,r,n){return B(this,void 0,void 0,function(){return q(this,function(i){return[2,new Promise(function(o,a){var s=window.msCrypto.subtle.sign(e,r,n);s.addEventListener("complete",function(c){o(c.target.result)}),s.addEventListener("error",function(c){a(c)})})]})})},t.prototype.digest=function(e,r){return B(this,void 0,void 0,function(){return q(this,function(n){return[2,new Promise(function(i,o){var a=window.msCrypto.subtle.digest(e,r.buffer);a.addEventListener("complete",function(s){i(s.target.result)}),a.addEventListener("error",function(s){o(s)})})]})})},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var fN="RSASSA-PKCS1-v1_5",Bb="SHA-256",pN=2048,mN=new Uint8Array([1,0,1]),tS=function(){function t(e,r){var n,i;if(this.logger=e,this.cryptoOptions=r,this.hasBrowserCrypto())this.logger.verbose("BrowserCrypto: modern crypto interface available"),this.subtleCrypto=new dN;else if(this.hasIECrypto())this.logger.verbose("BrowserCrypto: MS crypto interface available"),this.subtleCrypto=new hN;else if(this.hasMsrCrypto()&&(!((n=this.cryptoOptions)===null||n===void 0)&&n.useMsrCrypto))this.logger.verbose("BrowserCrypto: MSR crypto interface available"),this.subtleCrypto=new uN;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."),ne.createCryptoNotAvailableError("Browser crypto, msCrypto, or msrCrypto interfaces not available.");if(this.subtleCrypto.initPrng){if(this.logger.verbose("BrowserCrypto: Interface requires entropy"),!(!((i=this.cryptoOptions)===null||i===void 0)&&i.entropy))throw this.logger.error("BrowserCrypto: Interface requires entropy but none provided."),z2.createEntropyNotProvided();this.logger.verbose("BrowserCrypto: Entropy provided"),this.subtleCrypto.initPrng(this.cryptoOptions.entropy)}this.keygenAlgorithmOptions={name:fN,hash:Bb,modulusLength:pN,publicExponent:mN}}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 B(this,void 0,void 0,function(){var r;return q(this,function(n){return r=sa.stringToUtf8Arr(e),[2,this.subtleCrypto.digest({name:Bb},r)]})})},t.prototype.getRandomValues=function(e){return this.subtleCrypto.getRandomValues(e)},t.prototype.generateKeyPair=function(e,r){return B(this,void 0,void 0,function(){return q(this,function(n){return[2,this.subtleCrypto.generateKey(this.keygenAlgorithmOptions,e,r)]})})},t.prototype.exportJwk=function(e){return B(this,void 0,void 0,function(){return q(this,function(r){return[2,this.subtleCrypto.exportKey(e)]})})},t.prototype.importJwk=function(e,r,n){return B(this,void 0,void 0,function(){return q(this,function(i){return[2,this.subtleCrypto.importKey(e,this.keygenAlgorithmOptions,r,n)]})})},t.prototype.sign=function(e,r){return B(this,void 0,void 0,function(){return q(this,function(n){return[2,this.subtleCrypto.sign(this.keygenAlgorithmOptions,e,r)]})})},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var vN=function(){function t(){this.dbName=F4,this.version=qL,this.tableName=WL,this.dbOpen=!1}return t.prototype.open=function(){return B(this,void 0,void 0,function(){var e=this;return q(this,function(r){return[2,new Promise(function(n,i){var o=window.indexedDB.open(e.dbName,e.version);o.addEventListener("upgradeneeded",function(a){var s=a;s.target.result.createObjectStore(e.tableName)}),o.addEventListener("success",function(a){var s=a;e.db=s.target.result,e.dbOpen=!0,n()}),o.addEventListener("error",function(){return i(ne.createDatabaseUnavailableError())})})]})})},t.prototype.closeConnection=function(){var e=this.db;e&&this.dbOpen&&(e.close(),this.dbOpen=!1)},t.prototype.validateDbIsOpen=function(){return B(this,void 0,void 0,function(){return q(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 B(this,void 0,void 0,function(){var r=this;return q(this,function(n){switch(n.label){case 0:return[4,this.validateDbIsOpen()];case 1:return n.sent(),[2,new Promise(function(i,o){if(!r.db)return o(ne.createDatabaseNotOpenError());var a=r.db.transaction([r.tableName],"readonly"),s=a.objectStore(r.tableName),c=s.get(e);c.addEventListener("success",function(l){var d=l;r.closeConnection(),i(d.target.result)}),c.addEventListener("error",function(l){r.closeConnection(),o(l)})})]}})})},t.prototype.setItem=function(e,r){return B(this,void 0,void 0,function(){var n=this;return q(this,function(i){switch(i.label){case 0:return[4,this.validateDbIsOpen()];case 1:return i.sent(),[2,new Promise(function(o,a){if(!n.db)return a(ne.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(),o()}),l.addEventListener("error",function(d){n.closeConnection(),a(d)})})]}})})},t.prototype.removeItem=function(e){return B(this,void 0,void 0,function(){var r=this;return q(this,function(n){switch(n.label){case 0:return[4,this.validateDbIsOpen()];case 1:return n.sent(),[2,new Promise(function(i,o){if(!r.db)return o(ne.createDatabaseNotOpenError());var a=r.db.transaction([r.tableName],"readwrite"),s=a.objectStore(r.tableName),c=s.delete(e);c.addEventListener("success",function(){r.closeConnection(),i()}),c.addEventListener("error",function(l){r.closeConnection(),o(l)})})]}})})},t.prototype.getKeys=function(){return B(this,void 0,void 0,function(){var e=this;return q(this,function(r){switch(r.label){case 0:return[4,this.validateDbIsOpen()];case 1:return r.sent(),[2,new Promise(function(n,i){if(!e.db)return i(ne.createDatabaseNotOpenError());var o=e.db.transaction([e.tableName],"readonly"),a=o.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(),i(c)})})]}})})},t.prototype.containsKey=function(e){return B(this,void 0,void 0,function(){var r=this;return q(this,function(n){switch(n.label){case 0:return[4,this.validateDbIsOpen()];case 1:return n.sent(),[2,new Promise(function(i,o){if(!r.db)return o(ne.createDatabaseNotOpenError());var a=r.db.transaction([r.tableName],"readonly"),s=a.objectStore(r.tableName),c=s.count(e);c.addEventListener("success",function(l){var d=l;r.closeConnection(),i(d.target.result===1)}),c.addEventListener("error",function(l){r.closeConnection(),o(l)})})]}})})},t.prototype.deleteDatabase=function(){return B(this,void 0,void 0,function(){return q(this,function(e){return this.db&&this.dbOpen&&this.closeConnection(),[2,new Promise(function(r,n){var i=window.indexedDB.deleteDatabase(F4);i.addEventListener("success",function(){return r(!0)}),i.addEventListener("blocked",function(){return r(!0)}),i.addEventListener("error",function(){return n(!1)})})]})})},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var qb=function(){function t(e,r){this.inMemoryCache=new z4,this.indexedDBCache=new vN,this.logger=e,this.storeName=r}return t.prototype.handleDatabaseAccessError=function(e){if(e instanceof ne&&e.errorCode===Y.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 B(this,void 0,void 0,function(){var r,n;return q(this,function(i){switch(i.label){case 0:if(r=this.inMemoryCache.getItem(e),r)return[3,4];i.label=1;case 1:return i.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,i.sent()];case 3:return n=i.sent(),this.handleDatabaseAccessError(n),[3,4];case 4:return[2,r]}})})},t.prototype.setItem=function(e,r){return B(this,void 0,void 0,function(){var n;return q(this,function(i){switch(i.label){case 0:this.inMemoryCache.setItem(e,r),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.indexedDBCache.setItem(e,r)];case 2:return i.sent(),[3,4];case 3:return n=i.sent(),this.handleDatabaseAccessError(n),[3,4];case 4:return[2]}})})},t.prototype.removeItem=function(e){return B(this,void 0,void 0,function(){var r;return q(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 B(this,void 0,void 0,function(){var e,r;return q(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 B(this,void 0,void 0,function(){var r,n;return q(this,function(i){switch(i.label){case 0:if(r=this.inMemoryCache.containsKey(e),r)return[3,4];i.label=1;case 1:return i.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,i.sent()];case 3:return n=i.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 B(this,void 0,void 0,function(){var e,r;return q(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.38.3 2023-10-27 */var j2;(function(t){t.asymmetricKeys="asymmetricKeys",t.symmetricKeys="symmetricKeys"})(j2||(j2={}));var gN=function(){function t(e){this.logger=e,this.asymmetricKeys=new qb(this.logger,j2.asymmetricKeys),this.symmetricKeys=new qb(this.logger,j2.symmetricKeys)}return t.prototype.clear=function(){return B(this,void 0,void 0,function(){var e;return q(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.38.3 2023-10-27 */var yN=function(){function t(e,r,n){this.logger=e,this.browserCrypto=new tS(this.logger,n),this.b64Encode=new eS,this.b64Decode=new sN,this.guidGenerator=new Jk(this.browserCrypto),this.pkceGenerator=new lN(this.browserCrypto),this.cache=new gN(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 B(this,void 0,void 0,function(){return q(this,function(e){return[2,this.pkceGenerator.generateCodes()]})})},t.prototype.getPublicKeyThumbprint=function(e){var r;return B(this,void 0,void 0,function(){var n,i,o,a,s,c,l,d;return q(this,function(u){switch(u.label){case 0:return n=(r=this.performanceClient)===null||r===void 0?void 0:r.startMeasurement(L.CryptoOptsGetPublicKeyThumbprint,e.correlationId),[4,this.browserCrypto.generateKeyPair(t.EXTRACTABLE,t.POP_KEY_USAGES)];case 1:return i=u.sent(),[4,this.browserCrypto.exportJwk(i.publicKey)];case 2:return o=u.sent(),a={e:o.e,kty:o.kty,n:o.n},s=sa.getSortedObjectString(a),[4,this.hashString(s)];case 3:return c=u.sent(),[4,this.browserCrypto.exportJwk(i.privateKey)];case 4:return l=u.sent(),[4,this.browserCrypto.importJwk(l,!1,["sign"])];case 5:return d=u.sent(),[4,this.cache.asymmetricKeys.setItem(c,{privateKey:d,publicKey:i.publicKey,requestMethod:e.resourceRequestMethod,requestUri:e.resourceRequestUri})];case 6:return u.sent(),n&&n.endMeasurement({success:!0}),[2,c]}})})},t.prototype.removeTokenBindingKey=function(e){return B(this,void 0,void 0,function(){var r;return q(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 B(this,void 0,void 0,function(){return q(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 i;return B(this,void 0,void 0,function(){var o,a,s,c,l,d,u,h,f,p,m,w,g;return q(this,function(v){switch(v.label){case 0:return o=(i=this.performanceClient)===null||i===void 0?void 0:i.startMeasurement(L.CryptoOptsSignJwt,n),[4,this.cache.asymmetricKeys.getItem(r)];case 1:if(a=v.sent(),!a)throw ne.createSigningKeyNotFoundInStorageError(r);return[4,this.browserCrypto.exportJwk(a.publicKey)];case 2:return s=v.sent(),c=sa.getSortedObjectString(s),l=this.b64Encode.urlEncode(JSON.stringify({kid:r})),d=jL.getShrHeaderString({kid:l,alg:s.alg}),u=this.b64Encode.urlEncode(d),e.cnf={jwk:JSON.parse(c)},h=this.b64Encode.urlEncode(JSON.stringify(e)),f=u+"."+h,p=sa.stringToArrayBuffer(f),[4,this.browserCrypto.sign(a.privateKey,p)];case 3:return m=v.sent(),w=this.b64Encode.urlEncodeArr(new Uint8Array(m)),g=f+"."+w,o&&o.endMeasurement({success:!0}),[2,g]}})})},t.prototype.hashString=function(e){return B(this,void 0,void 0,function(){var r,n;return q(this,function(i){switch(i.label){case 0:return[4,this.browserCrypto.sha256Digest(e)];case 1:return r=i.sent(),n=new Uint8Array(r),[2,this.b64Encode.urlEncodeArr(n)]}})})},t.POP_KEY_USAGES=["sign","verify"],t.EXTRACTABLE=!0,t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Wb=function(){function t(e,r){this.correlationId=r,this.measureName=t.makeMeasureName(e,r),this.startMark=t.makeStartMark(e,r),this.endMark=t.makeEndMark(e,r)}return t.makeMeasureName=function(e,r){return"msal.measure."+e+"."+r},t.makeStartMark=function(e,r){return"msal.start."+e+"."+r},t.makeEndMark=function(e,r){return"msal.end."+e+"."+r},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.flushMeasurements=function(e,r){if(t.supportsBrowserPerformance())try{r.forEach(function(n){var i=t.makeMeasureName(n.name,e),o=window.performance.getEntriesByName(i,"measure");o.length>0&&(window.performance.clearMeasures(i),window.performance.clearMarks(t.makeStartMark(i,e)),window.performance.clearMarks(t.makeEndMark(i,e)))})}catch{}},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.38.3 2023-10-27 */var _N=function(t){jr(e,t);function e(r,n,i,o,a,s,c){var l=t.call(this,r,n,i,o,a,s)||this;return l.browserCrypto=new tS(l.logger,c),l.guidGenerator=new Jk(l.browserCrypto),l}return e.prototype.startPerformanceMeasuremeant=function(r,n){return new Wb(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.deleteIncompleteSubMeasurements=function(r){var n=this.eventsByCorrelationId.get(r.event.correlationId),i=n&&n.eventId===r.event.eventId,o=[];i&&(n!=null&&n.incompleteSubMeasurements)&&n.incompleteSubMeasurements.forEach(function(a){o.push(ue({},a))}),o.length>0&&Wb.flushMeasurements(r.event.correlationId,o)},e.prototype.supportsBrowserPerformanceNow=function(){return typeof window<"u"&&typeof window.performance<"u"&&typeof window.performance.now=="function"},e.prototype.startMeasurement=function(r,n){var i=this,o=this.getPageVisibility(),a=t.prototype.startMeasurement.call(this,r,n);return ue(ue({},a),{endMeasurement:function(s){var c=a.endMeasurement(ue({startPageVisibility:o,endPageVisibility:i.getPageVisibility()},s));return i.deleteIncompleteSubMeasurements(a),c},discardMeasurement:function(){a.discardMeasurement(),i.deleteIncompleteSubMeasurements(a),a.measurement.flushMeasurement()}})},e.prototype.setPreQueueTime=function(r,n){if(!this.supportsBrowserPerformanceNow()){this.logger.trace("BrowserPerformanceClient: window performance API not available, unable to set telemetry queue time for "+r);return}if(!n){this.logger.trace("BrowserPerformanceClient: correlationId for "+r+" not provided, unable to set telemetry queue time");return}var i=this.preQueueTimeByCorrelationId.get(n);i&&(this.logger.trace("BrowserPerformanceClient: Incomplete pre-queue "+i.name+" found",n),this.addQueueMeasurement(i.name,n,void 0,!0)),this.preQueueTimeByCorrelationId.set(n,{name:r,time:window.performance.now()})},e.prototype.addQueueMeasurement=function(r,n,i,o){if(!this.supportsBrowserPerformanceNow()){this.logger.trace("BrowserPerformanceClient: window performance API not available, unable to add queue measurement for "+r);return}if(!n){this.logger.trace("BrowserPerformanceClient: correlationId for "+r+" not provided, unable to add queue measurement");return}var a=t.prototype.getPreQueueTime.call(this,r,n);if(a){var s=window.performance.now(),c=i||t.prototype.calculateQueuedTime.call(this,a,s);return t.prototype.addQueueMeasurement.call(this,r,n,c,o)}},e}(Gk);/*! @azure/msal-browser v2.38.3 2023-10-27 */var bN=function(){function t(e,r,n,i){this.isBrowserEnvironment=typeof window<"u",this.config=e,this.storage=r,this.logger=n,this.cryptoObj=i}return t.prototype.loadExternalTokens=function(e,r,n){if(this.logger.info("TokenCache - loadExternalTokens called"),!r.id_token)throw ne.createUnableToLoadTokenError("Please ensure server response includes id token.");var i=new Ao(r.id_token,this.cryptoObj),o,a;if(e.account){var s=this.loadAccount(i,e.account.environment,void 0,void 0,e.account.homeAccountId);o=new fh(s,this.loadIdToken(i,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=Bh.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 Bh(c,this.config.system.networkClient,this.storage,l,this.logger),n.clientInfo){this.logger.trace("TokenCache - homeAccountId from options");var s=this.loadAccount(i,a.hostnameAndPort,n.clientInfo,a.authorityType);o=new fh(s,this.loadIdToken(i,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(i,a.hostnameAndPort,r.client_info,a.authorityType);o=new fh(s,this.loadIdToken(i,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 ne.createUnableToLoadTokenError("Please provide clientInfo in the response or options.")}else throw ne.createUnableToLoadTokenError("Please provide a request with an account or a request with authority.");return this.generateAuthenticationResult(e,i,o,a)},t.prototype.loadAccount=function(e,r,n,i,o){var a;if(o?a=o:i!==void 0&&n&&(a=Dr.generateHomeAccountId(n,i,this.logger,this.cryptoObj,e)),!a)throw ne.createUnableToLoadTokenError("Unexpected missing homeAccountId");var s=n?Dr.createAccount(n,a,e,void 0,void 0,void 0,r):Dr.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 ne.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.")},t.prototype.loadIdToken=function(e,r,n,i){var o=Ks.createIdTokenEntity(r,n,e.rawToken,this.config.auth.clientId,i);if(this.isBrowserEnvironment)return this.logger.verbose("TokenCache - loading id token"),this.storage.setIdTokenCredential(o),o;throw ne.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.")},t.prototype.loadAccessToken=function(e,r,n,i,o,a){if(!r.access_token)return this.logger.verbose("TokenCache - No access token provided for caching"),null;if(!r.expires_in)throw ne.createUnableToLoadTokenError("Please ensure server response includes expires_in value.");if(!a.extendedExpiresOn)throw ne.createUnableToLoadTokenError("Please provide an extendedExpiresOn value in the options.");var s=new Jr(e.scopes).printScopes(),c=a.expiresOn||r.expires_in+new Date().getTime()/1e3,l=a.extendedExpiresOn,d=Ys.createAccessTokenEntity(n,i,r.access_token,this.config.auth.clientId,o,s,c,l,this.cryptoObj);if(this.isBrowserEnvironment)return this.logger.verbose("TokenCache - loading access token"),this.storage.setAccessTokenCredential(d),d;throw ne.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.")},t.prototype.loadRefreshToken=function(e,r,n,i){if(!r.refresh_token)return this.logger.verbose("TokenCache - No refresh token provided for caching"),null;var o=Ol.createRefreshTokenEntity(n,i,r.refresh_token,this.config.auth.clientId);if(this.isBrowserEnvironment)return this.logger.verbose("TokenCache - loading refresh token"),this.storage.setRefreshTokenCredential(o),o;throw ne.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.")},t.prototype.generateAuthenticationResult=function(e,r,n,i){var o,a,s,c=A.EMPTY_STRING,l=[],d=null,u;n!=null&&n.accessToken&&(c=n.accessToken.secret,l=Jr.fromString(n.accessToken.target).asArray(),d=new Date(Number(n.accessToken.expiresOn)*1e3),u=new Date(Number(n.accessToken.extendedExpiresOn)*1e3));var h=(r==null?void 0:r.claims.oid)||(r==null?void 0:r.claims.sub)||A.EMPTY_STRING,f=(r==null?void 0:r.claims.tid)||A.EMPTY_STRING;return{authority:i?i.canonicalAuthority:A.EMPTY_STRING,uniqueId:h,tenantId:f,scopes:l,account:n!=null&&n.account?n.account.getAccountInfo():null,idToken:r?r.rawToken:A.EMPTY_STRING,idTokenClaims:r?r.claims:{},accessToken:c,fromCache:!0,expiresOn:d,correlationId:e.correlationId||A.EMPTY_STRING,requestId:A.EMPTY_STRING,extExpiresOn:u,familyId:A.EMPTY_STRING,tokenType:((o=n==null?void 0:n.accessToken)===null||o===void 0?void 0:o.tokenType)||A.EMPTY_STRING,state:A.EMPTY_STRING,cloudGraphHostName:((a=n==null?void 0:n.account)===null||a===void 0?void 0:a.cloudGraphHostName)||A.EMPTY_STRING,msGraphHost:((s=n==null?void 0:n.account)===null||s===void 0?void 0:s.msGraphHost)||A.EMPTY_STRING,code:void 0,fromNativeBroker:!1}},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var wN=function(t){jr(e,t);function e(r){var n=t.call(this,r)||this;return n.includeRedirectUri=!1,n}return e}(Bk);/*! @azure/msal-browser v2.38.3 2023-10-27 */var xN=function(t){jr(e,t);function e(r,n,i,o,a,s,c,l,d,u){var h=t.call(this,r,n,i,o,a,s,l,d,u)||this;return h.apiId=c,h}return e.prototype.acquireToken=function(r){return B(this,void 0,void 0,function(){var n,i,o,a,s,c,l;return q(this,function(d){switch(d.label){case 0:if(this.logger.trace("SilentAuthCodeClient.acquireToken called"),!r.code)throw ne.createAuthCodeRequiredError();return this.performanceClient.setPreQueueTime(L.StandardInteractionClientInitializeAuthorizationRequest,r.correlationId),[4,this.initializeAuthorizationRequest(r,de.Silent)];case 1:n=d.sent(),this.browserStorage.updateCacheEntries(n.state,n.nonce,n.authority,n.loginHint||A.EMPTY_STRING,n.account||null),i=this.initializeServerTelemetryManager(this.apiId),d.label=2;case 2:return d.trys.push([2,4,,5]),o=ue(ue({},n),{code:r.code}),this.performanceClient.setPreQueueTime(L.StandardInteractionClientGetClientConfiguration,r.correlationId),[4,this.getClientConfiguration(i,n.authority)];case 3:return a=d.sent(),s=new wN(a),this.logger.verbose("Auth code client created"),c=new Xk(s,this.browserStorage,o,this.logger,this.config.system,this.performanceClient),[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=d.sent(),l instanceof fe&&l.setCorrelationId(this.correlationId),i.cacheFailedRequest(l),this.browserStorage.cleanRequestByState(n.state),l;case 5:return[2]}})})},e.prototype.logout=function(){return Promise.reject(ne.createSilentLogoutUnsupportedError())},e}(Td);/*! @azure/msal-browser v2.38.3 2023-10-27 */var CN=function(){function t(e){this.isBrowserEnvironment=typeof window<"u",this.config=nN(e,this.isBrowserEnvironment),this.initialized=!1,this.logger=new j0(this.config.system.loggerOptions,Cv,ph),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 _N(this.config.auth.clientId,this.config.auth.authority,this.logger,Cv,ph,this.config.telemetry.application,this.config.system.cryptoOptions):new BL(this.config.auth.clientId,this.config.auth.authority,this.logger,Cv,ph,this.config.telemetry.application),this.browserCrypto=this.isBrowserEnvironment?new yN(this.logger,this.performanceClient,this.config.system.cryptoOptions):H2,this.eventHandler=new aN(this.logger,this.browserCrypto),this.browserStorage=this.isBrowserEnvironment?new j4(this.config.auth.clientId,this.config.cache,this.browserCrypto,this.logger):GL(this.config.auth.clientId,this.logger);var r={cacheLocation:lr.MemoryStorage,temporaryCacheLocation:lr.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!0};this.nativeInternalStorage=new j4(this.config.auth.clientId,r,this.browserCrypto,this.logger),this.tokenCache=new bN(this.config,this.browserStorage,this.logger,this.browserCrypto),this.trackPageVisibilityWithMeasurement=this.trackPageVisibilityWithMeasurement.bind(this)}return t.prototype.initialize=function(){return B(this,void 0,void 0,function(){var e,r,n,i,o;return q(this,function(a){switch(a.label){case 0:if(this.logger.trace("initialize called"),this.initialized)return this.logger.info("initialize has already been called, exiting early."),[2];if(e=this.config.system.allowNativeBroker,r=this.performanceClient.startMeasurement(L.InitializeClientApplication),this.eventHandler.emitEvent(Se.INITIALIZE_START),!e)return[3,4];a.label=1;case 1:return a.trys.push([1,3,,4]),n=this,[4,cc.createProvider(this.logger,this.config.system.nativeBrokerHandshakeTimeout,this.performanceClient)];case 2:return n.nativeExtensionProvider=a.sent(),[3,4];case 3:return i=a.sent(),this.logger.verbose(i),[3,4];case 4:return this.config.cache.claimsBasedCachingEnabled?[3,6]:(this.logger.verbose("Claims-based caching is disabled. Clearing the previous cache with claims"),o=this.performanceClient.startMeasurement(L.ClearTokensAndKeysWithClaims),[4,this.browserStorage.clearTokensAndKeysWithClaims()]);case 5:a.sent(),o.endMeasurement({success:!0}),a.label=6;case 6:return this.initialized=!0,this.eventHandler.emitEvent(Se.INITIALIZE_END),r.endMeasurement({allowNativeBroker:e,success:!0}),[2]}})})},t.prototype.handleRedirectPromise=function(e){return B(this,void 0,void 0,function(){var r,n,i,o,a,s,c,l,d=this;return q(this,function(u){return this.logger.verbose("handleRedirectPromise called"),er.blockNativeBrokerCalledBeforeInitialized(this.config.system.allowNativeBroker,this.initialized),r=this.getAllAccounts(),this.isBrowserEnvironment?(n=e||A.EMPTY_STRING,i=this.redirectResponse.get(n),typeof i>"u"?(this.eventHandler.emitEvent(Se.HANDLE_REDIRECT_START,de.Redirect),this.logger.verbose("handleRedirectPromise has been called for the first time, storing the promise"),o=this.browserStorage.getCachedNativeRequest(),a=void 0,o&&cc.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider)&&this.nativeExtensionProvider&&!e?(this.logger.trace("handleRedirectPromise - acquiring token from native platform"),s=new Jl(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,bt.handleRedirectPromise,this.performanceClient,this.nativeExtensionProvider,o.accountId,this.nativeInternalStorage,o.correlationId),a=s.handleRedirectPromise()):(this.logger.trace("handleRedirectPromise - acquiring token from web flow"),c=this.browserStorage.getTemporaryCache(Ge.CORRELATION_ID,!0)||A.EMPTY_STRING,l=this.createRedirectClient(c),a=l.handleRedirectPromise(e)),i=a.then(function(h){if(h){var f=r.length<d.getAllAccounts().length;f?(d.eventHandler.emitEvent(Se.LOGIN_SUCCESS,de.Redirect,h),d.logger.verbose("handleRedirectResponse returned result, login success")):(d.eventHandler.emitEvent(Se.ACQUIRE_TOKEN_SUCCESS,de.Redirect,h),d.logger.verbose("handleRedirectResponse returned result, acquire token success"))}return d.eventHandler.emitEvent(Se.HANDLE_REDIRECT_END,de.Redirect),h}).catch(function(h){throw r.length>0?d.eventHandler.emitEvent(Se.ACQUIRE_TOKEN_FAILURE,de.Redirect,null,h):d.eventHandler.emitEvent(Se.LOGIN_FAILURE,de.Redirect,null,h),d.eventHandler.emitEvent(Se.HANDLE_REDIRECT_END,de.Redirect),h}),this.redirectResponse.set(n,i)):this.logger.verbose("handleRedirectPromise has been called previously, returning the result from the first call"),[2,i]):(this.logger.verbose("handleRedirectPromise returns null, not browser environment"),[2,null])})})},t.prototype.acquireTokenRedirect=function(e){return B(this,void 0,void 0,function(){var r,n,i,o,a,s=this;return q(this,function(c){return r=this.getRequestCorrelationId(e),this.logger.verbose("acquireTokenRedirect called",r),this.preflightBrowserEnvironmentCheck(de.Redirect),n=this.getAllAccounts().length>0,n?this.eventHandler.emitEvent(Se.ACQUIRE_TOKEN_START,de.Redirect,e):this.eventHandler.emitEvent(Se.LOGIN_START,de.Redirect,e),this.nativeExtensionProvider&&this.canUseNative(e)?(o=new Jl(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,bt.acquireTokenRedirect,this.performanceClient,this.nativeExtensionProvider,this.getNativeAccountId(e),this.nativeInternalStorage,e.correlationId),i=o.acquireTokenRedirect(e).catch(function(l){if(l instanceof _o&&l.isFatal()){s.nativeExtensionProvider=void 0;var d=s.createRedirectClient(e.correlationId);return d.acquireToken(e)}else if(l instanceof Bi){s.logger.verbose("acquireTokenRedirect - Resolving interaction required error thrown by native broker by falling back to web flow");var d=s.createRedirectClient(e.correlationId);return d.acquireToken(e)}throw s.browserStorage.setInteractionInProgress(!1),l})):(a=this.createRedirectClient(e.correlationId),i=a.acquireToken(e)),[2,i.catch(function(l){throw n?s.eventHandler.emitEvent(Se.ACQUIRE_TOKEN_FAILURE,de.Redirect,null,l):s.eventHandler.emitEvent(Se.LOGIN_FAILURE,de.Redirect,null,l),l})]})})},t.prototype.acquireTokenPopup=function(e){var r=this,n=this.getRequestCorrelationId(e),i=this.performanceClient.startMeasurement(L.AcquireTokenPopup,n);try{this.logger.verbose("acquireTokenPopup called",n),this.preflightBrowserEnvironmentCheck(de.Popup)}catch(c){return Promise.reject(c)}var o=this.getAllAccounts();o.length>0?this.eventHandler.emitEvent(Se.ACQUIRE_TOKEN_START,de.Popup,e):this.eventHandler.emitEvent(Se.LOGIN_START,de.Popup,e);var a;if(this.canUseNative(e))a=this.acquireTokenNative(e,bt.acquireTokenPopup).then(function(c){return r.browserStorage.setInteractionInProgress(!1),i.endMeasurement({success:!0,isNativeBroker:!0,requestId:c.requestId}),c}).catch(function(c){if(c instanceof _o&&c.isFatal()){r.nativeExtensionProvider=void 0;var l=r.createPopupClient(e.correlationId);return l.acquireToken(e)}else if(c instanceof Bi){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=o.length<r.getAllAccounts().length;return l?r.eventHandler.emitEvent(Se.LOGIN_SUCCESS,de.Popup,c):r.eventHandler.emitEvent(Se.ACQUIRE_TOKEN_SUCCESS,de.Popup,c),i.addStaticFields({accessTokenSize:c.accessToken.length,idTokenSize:c.idToken.length}),i.endMeasurement({success:!0,requestId:c.requestId}),c}).catch(function(c){return o.length>0?r.eventHandler.emitEvent(Se.ACQUIRE_TOKEN_FAILURE,de.Popup,null,c):r.eventHandler.emitEvent(Se.LOGIN_FAILURE,de.Popup,null,c),i.endMeasurement({errorCode:c.errorCode,subErrorCode:c.subError,success:!1}),Promise.reject(c)})},t.prototype.trackPageVisibilityWithMeasurement=function(){var e=this.ssoSilentMeasurement||this.acquireTokenByCodeAsyncMeasurement;e&&(this.logger.info("Perf: Visibility change detected in ",e.event.name),e.increment({visibilityChangeCount:1}))},t.prototype.ssoSilent=function(e){var r;return B(this,void 0,void 0,function(){var n,i,o,a,s=this;return q(this,function(c){return n=this.getRequestCorrelationId(e),i=ue(ue({},e),{prompt:e.prompt,correlationId:n}),this.preflightBrowserEnvironmentCheck(de.Silent),this.ssoSilentMeasurement=this.performanceClient.startMeasurement(L.SsoSilent,n),(r=this.ssoSilentMeasurement)===null||r===void 0||r.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement),this.logger.verbose("ssoSilent called",n),this.eventHandler.emitEvent(Se.SSO_SILENT_START,de.Silent,i),this.canUseNative(i)?o=this.acquireTokenNative(i,bt.ssoSilent).catch(function(l){if(l instanceof _o&&l.isFatal()){s.nativeExtensionProvider=void 0;var d=s.createSilentIframeClient(i.correlationId);return d.acquireToken(i)}throw l}):(a=this.createSilentIframeClient(i.correlationId),o=a.acquireToken(i)),[2,o.then(function(l){var d,u;return s.eventHandler.emitEvent(Se.SSO_SILENT_SUCCESS,de.Silent,l),(d=s.ssoSilentMeasurement)===null||d===void 0||d.addStaticFields({accessTokenSize:l.accessToken.length,idTokenSize:l.idToken.length}),(u=s.ssoSilentMeasurement)===null||u===void 0||u.endMeasurement({success:!0,isNativeBroker:l.fromNativeBroker,requestId:l.requestId}),l}).catch(function(l){var d;throw s.eventHandler.emitEvent(Se.SSO_SILENT_FAILURE,de.Silent,null,l),(d=s.ssoSilentMeasurement)===null||d===void 0||d.endMeasurement({errorCode:l.errorCode,subErrorCode:l.subError,success:!1}),l}).finally(function(){document.removeEventListener("visibilitychange",s.trackPageVisibilityWithMeasurement)})]})})},t.prototype.acquireTokenByCode=function(e){return B(this,void 0,void 0,function(){var r,n,i,o,a=this;return q(this,function(s){r=this.getRequestCorrelationId(e),this.preflightBrowserEnvironmentCheck(de.Silent),this.logger.trace("acquireTokenByCode called",r),this.eventHandler.emitEvent(Se.ACQUIRE_TOKEN_BY_CODE_START,de.Silent,e),n=this.performanceClient.startMeasurement(L.AcquireTokenByCode,e.correlationId);try{if(e.code&&e.nativeAccountId)throw ne.createSpaCodeAndNativeAccountIdPresentError();if(e.code)return i=e.code,o=this.hybridAuthCodeResponses.get(i),o?(this.logger.verbose("Existing acquireTokenByCode request found",e.correlationId),n.discardMeasurement()):(this.logger.verbose("Initiating new acquireTokenByCode request",r),o=this.acquireTokenByCodeAsync(ue(ue({},e),{correlationId:r})).then(function(c){return a.eventHandler.emitEvent(Se.ACQUIRE_TOKEN_BY_CODE_SUCCESS,de.Silent,c),a.hybridAuthCodeResponses.delete(i),n.addStaticFields({accessTokenSize:c.accessToken.length,idTokenSize:c.idToken.length}),n.endMeasurement({success:!0,isNativeBroker:c.fromNativeBroker,requestId:c.requestId}),c}).catch(function(c){throw a.hybridAuthCodeResponses.delete(i),a.eventHandler.emitEvent(Se.ACQUIRE_TOKEN_BY_CODE_FAILURE,de.Silent,null,c),n.endMeasurement({errorCode:c.errorCode,subErrorCode:c.subError,success:!1}),c}),this.hybridAuthCodeResponses.set(i,o)),[2,o];if(e.nativeAccountId){if(this.canUseNative(e,e.nativeAccountId))return[2,this.acquireTokenNative(e,bt.acquireTokenByCode,e.nativeAccountId).catch(function(c){throw c instanceof _o&&c.isFatal()&&(a.nativeExtensionProvider=void 0),c})];throw ne.createUnableToAcquireTokenFromNativePlatformError()}else throw ne.createAuthCodeOrNativeAccountIdRequiredError()}catch(c){throw this.eventHandler.emitEvent(Se.ACQUIRE_TOKEN_BY_CODE_FAILURE,de.Silent,null,c),n.endMeasurement({errorCode:c instanceof fe&&c.errorCode||void 0,subErrorCode:c instanceof fe&&c.subError||void 0,success:!1}),c}return[2]})})},t.prototype.acquireTokenByCodeAsync=function(e){var r;return B(this,void 0,void 0,function(){var n,i,o=this;return q(this,function(a){switch(a.label){case 0:return this.logger.trace("acquireTokenByCodeAsync called",e.correlationId),this.acquireTokenByCodeAsyncMeasurement=this.performanceClient.startMeasurement(L.AcquireTokenByCodeAsync,e.correlationId),(r=this.acquireTokenByCodeAsyncMeasurement)===null||r===void 0||r.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement),n=this.createSilentAuthCodeClient(e.correlationId),[4,n.acquireToken(e).then(function(s){var c;return(c=o.acquireTokenByCodeAsyncMeasurement)===null||c===void 0||c.endMeasurement({success:!0,fromCache:s.fromCache,isNativeBroker:s.fromNativeBroker,requestId:s.requestId}),s}).catch(function(s){var c;throw(c=o.acquireTokenByCodeAsyncMeasurement)===null||c===void 0||c.endMeasurement({errorCode:s.errorCode,subErrorCode:s.subError,success:!1}),s}).finally(function(){document.removeEventListener("visibilitychange",o.trackPageVisibilityWithMeasurement)})];case 1:return i=a.sent(),[2,i]}})})},t.prototype.acquireTokenFromCache=function(e,r,n){return B(this,void 0,void 0,function(){return q(this,function(i){switch(this.performanceClient.addQueueMeasurement(L.AcquireTokenFromCache,r.correlationId),n.cacheLookupPolicy){case Mn.Default:case Mn.AccessToken:case Mn.AccessTokenAndRefreshToken:return[2,e.acquireToken(r)];default:throw se.createRefreshRequiredError()}return[2]})})},t.prototype.acquireTokenByRefreshToken=function(e,r){return B(this,void 0,void 0,function(){var n;return q(this,function(i){switch(this.performanceClient.addQueueMeasurement(L.AcquireTokenByRefreshToken,e.correlationId),r.cacheLookupPolicy){case Mn.Default:case Mn.AccessTokenAndRefreshToken:case Mn.RefreshToken:case Mn.RefreshTokenAndNetwork:return n=this.createSilentRefreshClient(e.correlationId),this.performanceClient.setPreQueueTime(L.SilentRefreshClientAcquireToken,e.correlationId),[2,n.acquireToken(e)];default:throw se.createRefreshRequiredError()}return[2]})})},t.prototype.acquireTokenBySilentIframe=function(e){return B(this,void 0,void 0,function(){var r;return q(this,function(n){return this.performanceClient.addQueueMeasurement(L.AcquireTokenBySilentIframe,e.correlationId),r=this.createSilentIframeClient(e.correlationId),this.performanceClient.setPreQueueTime(L.SilentIframeClientAcquireToken,e.correlationId),[2,r.acquireToken(e)]})})},t.prototype.logout=function(e){return B(this,void 0,void 0,function(){var r;return q(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(ue({correlationId:r},e))]})})},t.prototype.logoutRedirect=function(e){return B(this,void 0,void 0,function(){var r,n;return q(this,function(i){return r=this.getRequestCorrelationId(e),this.preflightBrowserEnvironmentCheck(de.Redirect),n=this.createRedirectClient(r),[2,n.logout(e)]})})},t.prototype.logoutPopup=function(e){try{var r=this.getRequestCorrelationId(e);this.preflightBrowserEnvironmentCheck(de.Popup);var n=this.createPopupClient(r);return n.logout(e)}catch(i){return Promise.reject(i)}},t.prototype.getAllAccounts=function(){return this.logger.verbose("getAllAccounts called"),this.isBrowserEnvironment?this.browserStorage.getAllAccounts():[]},t.prototype.getAccountByUsername=function(e){if(this.logger.trace("getAccountByUsername called"),!e)return this.logger.warning("getAccountByUsername: No username provided"),null;var r=this.browserStorage.getAccountInfoFilteredBy({username:e});return r?(this.logger.verbose("getAccountByUsername: Account matching username found, returning"),this.logger.verbosePii("getAccountByUsername: Returning signed-in accounts matching username: "+e),r):(this.logger.verbose("getAccountByUsername: No matching account found, returning null"),null)},t.prototype.getAccountByHomeId=function(e){if(this.logger.trace("getAccountByHomeId called"),!e)return this.logger.warning("getAccountByHomeId: No homeAccountId provided"),null;var r=this.browserStorage.getAccountInfoFilteredBy({homeAccountId:e});return r?(this.logger.verbose("getAccountByHomeId: Account matching homeAccountId found, returning"),this.logger.verbosePii("getAccountByHomeId: Returning signed-in accounts matching homeAccountId: "+e),r):(this.logger.verbose("getAccountByHomeId: No matching account found, returning null"),null)},t.prototype.getAccountByLocalId=function(e){if(this.logger.trace("getAccountByLocalId called"),!e)return this.logger.warning("getAccountByLocalId: No localAccountId provided"),null;var r=this.browserStorage.getAccountInfoFilteredBy({localAccountId:e});return r?(this.logger.verbose("getAccountByLocalId: Account matching localAccountId found, returning"),this.logger.verbosePii("getAccountByLocalId: Returning signed-in accounts matching localAccountId: "+e),r):(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"),er.blockNonBrowserEnvironment(this.isBrowserEnvironment),er.blockRedirectInIframe(e,this.config.system.allowRedirectInIframe),er.blockReloadInHiddenIframes(),er.blockAcquireTokenInPopups(),er.blockNativeBrokerCalledBeforeInitialized(this.config.system.allowNativeBroker,this.initialized),e===de.Redirect&&this.config.cache.cacheLocation===lr.MemoryStorage&&!this.config.cache.storeAuthStateInCookie)throw z2.createInMemoryRedirectUnavailableError();(e===de.Redirect||e===de.Popup)&&this.preflightInteractiveRequest(r)},t.prototype.preflightInteractiveRequest=function(e){this.logger.verbose("preflightInteractiveRequest called, validating app environment"),er.blockReloadInHiddenIframes(),e&&this.browserStorage.setInteractionInProgress(!0)},t.prototype.acquireTokenNative=function(e,r,n){return B(this,void 0,void 0,function(){var i;return q(this,function(o){if(this.logger.trace("acquireTokenNative called"),!this.nativeExtensionProvider)throw ne.createNativeConnectionNotEstablishedError();return i=new Jl(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,i.acquireToken(e)]})})},t.prototype.canUseNative=function(e,r){if(this.logger.trace("canUseNative called"),!cc.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 rn.NONE:case rn.CONSENT:case rn.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 XL(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 QL(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 iN(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,bt.ssoSilent,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)},t.prototype.createSilentCacheClient=function(e){return new Qk(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeExtensionProvider,e)},t.prototype.createSilentRefreshClient=function(e){return new oN(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeExtensionProvider,e)},t.prototype.createSilentAuthCodeClient=function(e){return new xN(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,bt.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():A.EMPTY_STRING},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var EN=function(t){jr(e,t);function e(r){var n=t.call(this,r)||this;return n.astsAsyncMeasurement=void 0,n.activeSilentTokenRequests=new Map,n.trackPageVisibility=n.trackPageVisibility.bind(n),n}return e.prototype.loginRedirect=function(r){return B(this,void 0,void 0,function(){var n;return q(this,function(i){return n=this.getRequestCorrelationId(r),this.logger.verbose("loginRedirect called",n),[2,this.acquireTokenRedirect(ue({correlationId:n},r||Fb))]})})},e.prototype.loginPopup=function(r){var n=this.getRequestCorrelationId(r);return this.logger.verbose("loginPopup called",n),this.acquireTokenPopup(ue({correlationId:n},r||Fb))},e.prototype.acquireTokenSilent=function(r){return B(this,void 0,void 0,function(){var n,i,o,a,s,c,l,d=this;return q(this,function(u){if(n=this.getRequestCorrelationId(r),i=this.performanceClient.startMeasurement(L.AcquireTokenSilent,n),i.addStaticFields({cacheLookupPolicy:r.cacheLookupPolicy}),this.preflightBrowserEnvironmentCheck(de.Silent),this.logger.verbose("acquireTokenSilent called",n),o=r.account||this.getActiveAccount(),!o)throw ne.createNoAccountError();return a={clientId:this.config.auth.clientId,authority:r.authority||A.EMPTY_STRING,scopes:r.scopes,homeAccountIdentifier:o.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),this.performanceClient.setPreQueueTime(L.AcquireTokenSilentAsync,n),l=this.acquireTokenSilentAsync(ue(ue({},r),{correlationId:n}),o).then(function(h){return d.activeSilentTokenRequests.delete(s),i.addStaticFields({accessTokenSize:h.accessToken.length,idTokenSize:h.idToken.length}),i.endMeasurement({success:!0,fromCache:h.fromCache,isNativeBroker:h.fromNativeBroker,cacheLookupPolicy:r.cacheLookupPolicy,requestId:h.requestId}),h}).catch(function(h){throw d.activeSilentTokenRequests.delete(s),i.endMeasurement({errorCode:h.errorCode,subErrorCode:h.subError,success:!1}),h}),this.activeSilentTokenRequests.set(s,l),[2,l]):(this.logger.verbose("acquireTokenSilent has been called previously, returning the result from the first call",n),i.discardMeasurement(),[2,c])})})},e.prototype.trackPageVisibility=function(){this.astsAsyncMeasurement&&(this.logger.info("Perf: Visibility change detected"),this.astsAsyncMeasurement.increment({visibilityChangeCount:1}))},e.prototype.acquireTokenSilentAsync=function(r,n){var i;return B(this,void 0,void 0,function(){var o,a,s,c,l,d=this;return q(this,function(u){switch(u.label){case 0:return this.performanceClient.addQueueMeasurement(L.AcquireTokenSilentAsync,r.correlationId),this.eventHandler.emitEvent(Se.ACQUIRE_TOKEN_START,de.Silent,r),this.astsAsyncMeasurement=this.performanceClient.startMeasurement(L.AcquireTokenSilentAsync,r.correlationId),(i=this.astsAsyncMeasurement)===null||i===void 0||i.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibility),cc.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider,r.authenticationScheme)&&n.nativeAccountId?(this.logger.verbose("acquireTokenSilent - attempting to acquire token from native platform"),a=ue(ue({},r),{account:n}),o=this.acquireTokenNative(a,bt.acquireTokenSilent_silentFlow).catch(function(h){return B(d,void 0,void 0,function(){var f;return q(this,function(p){if(h instanceof _o&&h.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 h})})}),[3,3]):[3,1];case 1:return this.logger.verbose("acquireTokenSilent - attempting to acquire token from web flow"),s=this.createSilentCacheClient(r.correlationId),this.performanceClient.setPreQueueTime(L.InitializeSilentRequest,r.correlationId),[4,s.initializeSilentRequest(r,n)];case 2:c=u.sent(),l=ue(ue({},r),{cacheLookupPolicy:r.cacheLookupPolicy||Mn.Default}),this.performanceClient.setPreQueueTime(L.AcquireTokenFromCache,c.correlationId),o=this.acquireTokenFromCache(s,c,l).catch(function(h){if(l.cacheLookupPolicy===Mn.AccessToken)throw h;return er.blockReloadInHiddenIframes(),d.eventHandler.emitEvent(Se.ACQUIRE_TOKEN_NETWORK_START,de.Silent,c),d.performanceClient.setPreQueueTime(L.AcquireTokenByRefreshToken,c.correlationId),d.acquireTokenByRefreshToken(c,l).catch(function(f){var p=f instanceof xc,m=f instanceof Bi,w=f.errorCode===Ll.noTokensFoundError.code,g=f.errorCode===ji.INVALID_GRANT_ERROR;if((!p||!g||m||l.cacheLookupPolicy===Mn.AccessTokenAndRefreshToken||l.cacheLookupPolicy===Mn.RefreshToken)&&l.cacheLookupPolicy!==Mn.Skip&&!w)throw f;return d.logger.verbose("Refresh token expired/invalid or CacheLookupPolicy is set to Skip, attempting acquire token by iframe.",r.correlationId),d.performanceClient.setPreQueueTime(L.AcquireTokenBySilentIframe,c.correlationId),d.acquireTokenBySilentIframe(c)})}),u.label=3;case 3:return[2,o.then(function(h){var f;return d.eventHandler.emitEvent(Se.ACQUIRE_TOKEN_SUCCESS,de.Silent,h),(f=d.astsAsyncMeasurement)===null||f===void 0||f.endMeasurement({success:!0,fromCache:h.fromCache,isNativeBroker:h.fromNativeBroker,requestId:h.requestId}),h}).catch(function(h){var f;throw d.eventHandler.emitEvent(Se.ACQUIRE_TOKEN_FAILURE,de.Silent,null,h),(f=d.astsAsyncMeasurement)===null||f===void 0||f.endMeasurement({errorCode:h.errorCode,subErrorCode:h.subError,success:!1}),h}).finally(function(){document.removeEventListener("visibilitychange",d.trackPageVisibility)})]}})})},e}(CN);const Gb="redirect";var Kb=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};class kN extends EN{get account(){return this.getAllAccounts().find(n=>{var i;return((i=n.idTokenClaims)===null||i===void 0?void 0:i.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){return Kb(this,arguments,void 0,function*(r,n=Gb,i=!0){var o;const a=(r==null?void 0:r.loginHint)||((o=this.account)===null||o===void 0?void 0:o.username),s=(r==null?void 0:r.scopes)||[],c=Object.assign(Object.assign({},r),{loginHint:a,scopes:s});if(a&&i){this.logger.verbose("Attempting to login in silently");try{return yield this.ssoSilent(c)}catch{this.logger.verbose("Silent login attempt failed")}}switch(this.logger.verbose(`Attempting to login in by [${n}]`),n){case"popup":return this.loginPopup(c);case"redirect":return this.loginRedirect(c)}})}acquireToken(){return Kb(this,arguments,void 0,function*(e={scopes:[]},r=Gb,n=!0){const i=yield this.account;if(n&&i){this.logger.verbose("Attempting to acquire token in silently");try{return yield this.acquireTokenSilent(Object.assign({account:i},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 SN=(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")},AN=(t,e,r,n,i)=>{const o=Object.assign({clientId:e,redirectUri:SN(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(i||kN)(t,{auth:o,cache:a,system:s})};class rS extends j0{constructor(e){super({logLevel:e,loggerCallback:(...r)=>this.loggerCallback(...r)}),this.getLogType=r=>{switch(r){case Gt.Error:return"error";case Gt.Warning:return"warn";case Gt.Info:return"info";case Gt.Verbose:default:return"debug"}}}loggerCallback(e,r,n){console[this.getLogType(e)]("%c FUSION::MSAL %c %s","border: 1px solid;","border: none;",r)}}var Ev=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const IN="default";class TN{get defaultClient(){return this.getClient(IN)}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=AN(r.tenantId,r.clientId,r.redirectUri,r.config);return n.setLogger(new rS(0)),n}handleRedirect(){return Ev(this,void 0,void 0,function*(){const{redirectUri:e}=this.defaultConfig||{};if(window.location.pathname===e){const r=this.defaultClient,n=r.getLogger(),{requestOrigin:i}=r;yield r.handleRedirectPromise(),i===e?(n.warning(`detected callback loop from url ${e}, redirecting to root`),window.location.replace("/")):window.location.replace(i||"/")}return null})}acquireToken(e){return this.defaultClient.acquireToken(e)}acquireAccessToken(e){return Ev(this,void 0,void 0,function*(){const r=yield this.acquireToken(e);return r?r.accessToken:void 0})}login(){return Ev(this,void 0,void 0,function*(){yield this.defaultClient.login()})}}var PN=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const nS={name:"auth",configure:t=>{var e;const r=new _L;return!((e=t==null?void 0:t.auth)===null||e===void 0)&&e.defaultConfig&&r.configureDefault(t.auth.defaultConfig),r},initialize:t=>PN(void 0,[t],void 0,function*({config:e}){const r=new TN(e);return e.requiresAuth&&(yield r.handleRedirect(),r.defaultAccount||(yield r.login())),r})},RN=(t,e)=>({module:nS,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??{};n&&Object.entries(n).forEach(([i,o])=>r.configureClient(i,o))}});var by=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const MN=t=>{var e;return{id:t.id,isChildType:t.isChildType,parentTypeIds:(e=t.parentTypeIds)!==null&&e!==void 0?e:[]}},wy=t=>{var e,r,n,i;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:MN(t.type),value:(i=t.value)!==null&&i!==void 0?i:{}}},$N=t=>by(void 0,void 0,void 0,function*(){const e=yield t.json();return wy(e)}),ZN=t=>by(void 0,void 0,void 0,function*(){return(yield t.json()).map(wy)}),HN=t=>by(void 0,void 0,void 0,function*(){return(yield t.json()).map(wy)});var ON=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},LN=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)},wp;class NN{constructor(e,r={}){this.config=r,wp.set(this,void 0),ON(this,wp,e,"f")}requireInstance(e){return LN(this,wp,"f").requireInstance(e)}setContextType(e){this.config.contextType=e}setContextFilter(e){this.config.contextFilter=e}connectParentContext(e){this.config.connectParentContext=e}setContextParameterFn(e){this.config.contextParameterFn=e}setValidateContext(e){this.config.validateContext=e}setResolveContext(e){this.config.resolveContext=e}setResolveInitialContext(e){this.config.resolveInitialContext=e}setContextClient(e,r=1*60*1e3){this.config.client={get:typeof e.get=="function"?{key:({id:n})=>n,client:{fn:e.get},expire:r}:e.get,query:typeof e.query=="function"?{key:n=>JSON.stringify(n),client:{fn:e.query},expire:r}:e.query},e.related&&(this.config.client.related=typeof e.related=="function"?{key:n=>JSON.stringify(n),client:{fn:e.related},expire:r}:e.related)}}wp=new WeakMap;const iS=/^(?:(?:[0-9a-fA-F]){8}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){12})$/,oS=(t,e=iS)=>t.replace(/^\/+/,"").split("/").find(r=>r.match(e)),DN=t=>!!t.match(iS);function VN(t,e){return r=>{const{extract:n=oS,validate:i=DN}=e??{},o=n(r);if(!o)return Pt;if(i(o))return t.contextClient.resolveContext(o);throw Error(`Failed to validate context [${o}] from path [${r}]`)}}const FN=({ref:t})=>{const e=t==null?void 0:t.context;if(!e)throw Error(["resolveContextFromNavigation","ref does not support context!"].join(`
|
|
74
|
-
`));return e.currentContext?sn(e.currentContext):Pt},zN=t=>({ref:e,modules:r})=>{var n,i;const{context:o,navigation:a}=r,s=VN(o,t==null?void 0:t.path),c=(n=a==null?void 0:a.path.pathname)!==null&&n!==void 0?n:(i=e.navigation)===null||i===void 0?void 0:i.path.pathname;return Ql(c?s(c):Pt,FN({ref:e,modules:r})).pipe(WO())};var kf=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})},Yb=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)},xp;class jN{constructor(){this.defaultExpireTime=1*60*1e3,xp.set(this,[])}addConfigBuilder(e){Yb(this,xp,"f").push(e)}_getServiceProvider(e){return kf(this,void 0,void 0,function*(){var r;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 kf(this,void 0,void 0,function*(){var r,n;const i=yield Yb(this,xp,"f").reduce((o,a)=>kf(this,void 0,void 0,function*(){const s=new NN(e,yield o);return yield Promise.resolve(a(s)),Object.assign(o,s.config)}),Promise.resolve({}));return(r=i.resolveInitialContext)!==null&&r!==void 0||(i.resolveInitialContext=zN()),(n=i.client)!==null&&n!==void 0||(i.client=yield kf(this,void 0,void 0,function*(){const a=yield(yield this._getServiceProvider(e)).createContextClient("json$");return{get:{client:{fn:s=>a.get("v1",s,{selector:$N})},key:({id:s})=>s,expire:this.defaultExpireTime},query:{client:{fn:s=>a.query("v1",{query:s},{selector:ZN})},key:s=>JSON.stringify(s),expire:this.defaultExpireTime},related:{client:{fn:s=>a.related("v1",{id:s.item.id,query:{filter:s.filter}},{selector:HN})},key:s=>JSON.stringify(s),expire:this.defaultExpireTime}}})),i})}}xp=new WeakMap;var UN=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!t(e[i],r[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(o=Object.keys(e),n=o.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;i--!==0;){var a=o[i];if(!t(e[a],r[a]))return!1}return!0}return e!==e&&r!==r};const BN=r3(UN);var Qb;(function(t){t.IDLE="idle",t.ACTIVE="active",t.FAILED="failed",t.CANCELED="canceled"})(Qb||(Qb={}));const qN=t=>e=>e.pipe(M4(t)),WN=t=>e=>e.pipe(Nn(t)),GN=t=>e=>e.pipe(gt(t)),B4=t=>t.pipe(Ce(e=>e.value));let Sf;const KN=new Uint8Array(16);function YN(){if(!Sf&&(Sf=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Sf))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Sf(KN)}const QN=/^(?:[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 XN(t){return typeof t=="string"&&QN.test(t)}const Zr=[];for(let t=0;t<256;++t)Zr.push((t+256).toString(16).slice(1));function aS(t,e=0){return Zr[t[e+0]]+Zr[t[e+1]]+Zr[t[e+2]]+Zr[t[e+3]]+"-"+Zr[t[e+4]]+Zr[t[e+5]]+"-"+Zr[t[e+6]]+Zr[t[e+7]]+"-"+Zr[t[e+8]]+Zr[t[e+9]]+"-"+Zr[t[e+10]]+Zr[t[e+11]]+Zr[t[e+12]]+Zr[t[e+13]]+Zr[t[e+14]]+Zr[t[e+15]]}function JN(t){if(!XN(t))throw TypeError("Invalid UUID");let e;const 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 eD(t){t=unescape(encodeURIComponent(t));const e=[];for(let r=0;r<t.length;++r)e.push(t.charCodeAt(r));return e}const tD="6ba7b810-9dad-11d1-80b4-00c04fd430c8",rD="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function nD(t,e,r){function n(i,o,a,s){var c;if(typeof i=="string"&&(i=eD(i)),typeof o=="string"&&(o=JN(o)),((c=o)===null||c===void 0?void 0:c.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let l=new Uint8Array(16+i.length);if(l.set(o),l.set(i,o.length),l=r(l),l[6]=l[6]&15|e,l[8]=l[8]&63|128,a){s=s||0;for(let d=0;d<16;++d)a[s+d]=l[d];return a}return aS(l)}try{n.name=t}catch{}return n.DNS=tD,n.URL=rD,n}const iD=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Xb={randomUUID:iD};function U2(t,e,r){if(Xb.randomUUID&&!e&&!t)return Xb.randomUUID();t=t||{};const n=t.random||(t.rng||YN)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){r=r||0;for(let i=0;i<16;++i)e[r+i]=n[i];return e}return aS(n)}function oD(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 kv(t,e){return t<<e|t>>>32-e}function aD(t){const e=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof t=="string"){const a=unescape(encodeURIComponent(t));t=[];for(let s=0;s<a.length;++s)t.push(a.charCodeAt(s))}else Array.isArray(t)||(t=Array.prototype.slice.call(t));t.push(128);const n=t.length/4+2,i=Math.ceil(n/16),o=new Array(i);for(let a=0;a<i;++a){const s=new Uint32Array(16);for(let c=0;c<16;++c)s[c]=t[a*64+c*4]<<24|t[a*64+c*4+1]<<16|t[a*64+c*4+2]<<8|t[a*64+c*4+3];o[a]=s}o[i-1][14]=(t.length-1)*8/Math.pow(2,32),o[i-1][14]=Math.floor(o[i-1][14]),o[i-1][15]=(t.length-1)*8&4294967295;for(let a=0;a<i;++a){const s=new Uint32Array(80);for(let f=0;f<16;++f)s[f]=o[a][f];for(let f=16;f<80;++f)s[f]=kv(s[f-3]^s[f-8]^s[f-14]^s[f-16],1);let c=r[0],l=r[1],d=r[2],u=r[3],h=r[4];for(let f=0;f<80;++f){const p=Math.floor(f/20),m=kv(c,5)+oD(p,l,d,u)+h+e[p]+s[f]>>>0;h=u,u=d,d=kv(l,30)>>>0,l=c,c=m}r[0]=r[0]+c>>>0,r[1]=r[1]+l>>>0,r[2]=r[2]+d>>>0,r[3]=r[3]+u>>>0,r[4]=r[4]+h>>>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]}const sD=nD("v5",80,aD);class q4 extends Error{constructor(e,r){super(r.message,{cause:r.cause}),this.type=e,this.name="QueryClientError",this.request=r.request}}function Wn(t){for(var e=arguments.length,r=Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];throw Error("[Immer] minified error nr: "+t+(r.length?" "+r.map(function(i){return"'"+i+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function cs(t){return!!t&&!!t[tt]}function Qi(t){var e;return!!t&&(function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===gD}(t)||Array.isArray(t)||!!t[a8]||!!(!((e=t.constructor)===null||e===void 0)&&e[a8])||xy(t)||Cy(t))}function Jb(t){return cs(t)||Wn(23,t),t[tt].t}function hd(t,e,r){r===void 0&&(r=!1),Pd(t)===0?(r?Object.keys:Iy)(t).forEach(function(n){r&&typeof n=="symbol"||e(n,t[n],t)}):t.forEach(function(n,i){return e(i,n,t)})}function Pd(t){var e=t[tt];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:xy(t)?2:Cy(t)?3:0}function W4(t,e){return Pd(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function cD(t,e){return Pd(t)===2?t.get(e):t[e]}function sS(t,e,r){var n=Pd(t);n===2?t.set(e,r):n===3?t.add(r):t[e]=r}function lD(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function xy(t){return mD&&t instanceof Map}function Cy(t){return vD&&t instanceof Set}function Sr(t){return t.o||t.t}function Ey(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=yD(t);delete e[tt];for(var r=Iy(e),n=0;n<r.length;n++){var i=r[n],o=e[i];o.writable===!1&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(e[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:t[i]})}return Object.create(Object.getPrototypeOf(t),e)}function ky(t,e){return e===void 0&&(e=!1),Sy(t)||cs(t)||!Qi(t)||(Pd(t)>1&&(t.set=t.add=t.clear=t.delete=dD),Object.freeze(t),e&&hd(t,function(r,n){return ky(n,!0)},!0)),t}function dD(){Wn(2)}function Sy(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function ko(t){var e=K4[t];return e||Wn(18,t),e}function uD(t,e){K4[t]||(K4[t]=e)}function B2(){return Wh}function Sv(t,e){e&&(ko("Patches"),t.u=[],t.s=[],t.v=e)}function q2(t){G4(t),t.p.forEach(hD),t.p=null}function G4(t){t===Wh&&(Wh=t.l)}function e8(t){return Wh={p:[],l:Wh,h:t,m:!0,_:0}}function hD(t){var e=t[tt];e.i===0||e.i===1?e.j():e.g=!0}function Av(t,e){e._=e.p.length;var r=e.p[0],n=t!==void 0&&t!==r;return e.h.O||ko("ES5").S(e,t,n),n?(r[tt].P&&(q2(e),Wn(4)),Qi(t)&&(t=W2(e,t),e.l||G2(e,t)),e.u&&ko("Patches").M(r[tt].t,t,e.u,e.s)):t=W2(e,r,[]),q2(e),e.u&&e.v(e.u,e.s),t!==cS?t:void 0}function W2(t,e,r){if(Sy(e))return e;var n=e[tt];if(!n)return hd(e,function(s,c){return t8(t,n,e,s,c,r)},!0),e;if(n.A!==t)return e;if(!n.P)return G2(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=Ey(n.k):n.o,o=i,a=!1;n.i===3&&(o=new Set(i),i.clear(),a=!0),hd(o,function(s,c){return t8(t,n,i,s,c,r,a)}),G2(t,i,!1),r&&t.u&&ko("Patches").N(n,r,t.u,t.s)}return n.o}function t8(t,e,r,n,i,o,a){if(cs(i)){var s=W2(t,i,o&&e&&e.i!==3&&!W4(e.R,n)?o.concat(n):void 0);if(sS(r,n,s),!cs(s))return;t.m=!1}else a&&r.add(i);if(Qi(i)&&!Sy(i)){if(!t.h.D&&t._<1)return;W2(t,i),e&&e.A.l||G2(t,i)}}function G2(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&ky(e,r)}function Iv(t,e){var r=t[tt];return(r?Sr(r):t)[e]}function r8(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=Object.getPrototypeOf(r)}}function Wo(t){t.P||(t.P=!0,t.l&&Wo(t.l))}function Tv(t){t.o||(t.o=Ey(t.t))}function qh(t,e,r){var n=xy(e)?ko("MapSet").F(e,r):Cy(e)?ko("MapSet").T(e,r):t.O?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:B2(),P:!1,I:!1,R:{},l:o,t:i,k:null,o:null,j:null,C:!1},c=s,l=Y4;a&&(c=[s],l=Tu);var d=Proxy.revocable(c,l),u=d.revoke,h=d.proxy;return s.k=h,s.j=u,h}(e,r):ko("ES5").J(e,r);return(r?r.A:B2()).p.push(n),n}function fD(t){return cs(t)||Wn(22,t),function e(r){if(!Qi(r))return r;var n,i=r[tt],o=Pd(r);if(i){if(!i.P&&(i.i<4||!ko("ES5").K(i)))return i.t;i.I=!0,n=n8(r,o),i.I=!1}else n=n8(r,o);return hd(n,function(a,s){i&&cD(i.t,a)===s||sS(n,a,e(s))}),o===3?new Set(n):n}(t)}function n8(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Ey(t)}function pD(){function t(s,c){function l(){this.constructor=s}i(s,c),s.prototype=(l.prototype=c.prototype,new l)}function e(s){s.o||(s.R=new Map,s.o=new Map(s.t))}function r(s){s.o||(s.o=new Set,s.t.forEach(function(c){if(Qi(c)){var l=qh(s.A.h,c,s);s.p.set(c,l),s.o.add(l)}else s.o.add(c)}))}function n(s){s.g&&Wn(3,JSON.stringify(Sr(s)))}var i=function(s,c){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,d){l.__proto__=d}||function(l,d){for(var u in d)d.hasOwnProperty(u)&&(l[u]=d[u])})(s,c)},o=function(){function s(l,d){return this[tt]={i:2,l:d,A:d?d.A:B2(),P:!1,I:!1,o:void 0,R:void 0,t:l,k:this,C:!1,g:!1},this}t(s,Map);var c=s.prototype;return Object.defineProperty(c,"size",{get:function(){return Sr(this[tt]).size}}),c.has=function(l){return Sr(this[tt]).has(l)},c.set=function(l,d){var u=this[tt];return n(u),Sr(u).has(l)&&Sr(u).get(l)===d||(e(u),Wo(u),u.R.set(l,!0),u.o.set(l,d),u.R.set(l,!0)),this},c.delete=function(l){if(!this.has(l))return!1;var d=this[tt];return n(d),e(d),Wo(d),d.t.has(l)?d.R.set(l,!1):d.R.delete(l),d.o.delete(l),!0},c.clear=function(){var l=this[tt];n(l),Sr(l).size&&(e(l),Wo(l),l.R=new Map,hd(l.t,function(d){l.R.set(d,!1)}),l.o.clear())},c.forEach=function(l,d){var u=this;Sr(this[tt]).forEach(function(h,f){l.call(d,u.get(f),f,u)})},c.get=function(l){var d=this[tt];n(d);var u=Sr(d).get(l);if(d.I||!Qi(u)||u!==d.t.get(l))return u;var h=qh(d.A.h,u,d);return e(d),d.o.set(l,h),h},c.keys=function(){return Sr(this[tt]).keys()},c.values=function(){var l,d=this,u=this.keys();return(l={})[Af]=function(){return d.values()},l.next=function(){var h=u.next();return h.done?h:{done:!1,value:d.get(h.value)}},l},c.entries=function(){var l,d=this,u=this.keys();return(l={})[Af]=function(){return d.entries()},l.next=function(){var h=u.next();if(h.done)return h;var f=d.get(h.value);return{done:!1,value:[h.value,f]}},l},c[Af]=function(){return this.entries()},s}(),a=function(){function s(l,d){return this[tt]={i:3,l:d,A:d?d.A:B2(),P:!1,I:!1,o:void 0,t:l,k:this,p:new Map,g:!1,C:!1},this}t(s,Set);var c=s.prototype;return Object.defineProperty(c,"size",{get:function(){return Sr(this[tt]).size}}),c.has=function(l){var d=this[tt];return n(d),d.o?!!d.o.has(l)||!(!d.p.has(l)||!d.o.has(d.p.get(l))):d.t.has(l)},c.add=function(l){var d=this[tt];return n(d),this.has(l)||(r(d),Wo(d),d.o.add(l)),this},c.delete=function(l){if(!this.has(l))return!1;var d=this[tt];return n(d),r(d),Wo(d),d.o.delete(l)||!!d.p.has(l)&&d.o.delete(d.p.get(l))},c.clear=function(){var l=this[tt];n(l),Sr(l).size&&(r(l),Wo(l),l.o.clear())},c.values=function(){var l=this[tt];return n(l),r(l),l.o.values()},c.entries=function(){var l=this[tt];return n(l),r(l),l.o.entries()},c.keys=function(){return this.values()},c[Af]=function(){return this.values()},c.forEach=function(l,d){for(var u=this.values(),h=u.next();!h.done;)l.call(d,h.value,h.value,this),h=u.next()},s}();uD("MapSet",{F:function(s,c){return new o(s,c)},T:function(s,c){return new a(s,c)}})}var i8,Wh,Ay=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",mD=typeof Map<"u",vD=typeof Set<"u",o8=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",cS=Ay?Symbol.for("immer-nothing"):((i8={})["immer-nothing"]=!0,i8),a8=Ay?Symbol.for("immer-draftable"):"__$immer_draftable",tt=Ay?Symbol.for("immer-state"):"__$immer_state",Af=typeof Symbol<"u"&&Symbol.iterator||"@@iterator",gD=""+Object.prototype.constructor,Iy=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,yD=Object.getOwnPropertyDescriptors||function(t){var e={};return Iy(t).forEach(function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)}),e},K4={},Y4={get:function(t,e){if(e===tt)return t;var r=Sr(t);if(!W4(r,e))return function(i,o,a){var s,c=r8(o,a);return c?"value"in c?c.value:(s=c.get)===null||s===void 0?void 0:s.call(i.k):void 0}(t,r,e);var n=r[e];return t.I||!Qi(n)?n:n===Iv(t.t,e)?(Tv(t),t.o[e]=qh(t.A.h,n,t)):n},has:function(t,e){return e in Sr(t)},ownKeys:function(t){return Reflect.ownKeys(Sr(t))},set:function(t,e,r){var n=r8(Sr(t),e);if(n!=null&&n.set)return n.set.call(t.k,r),!0;if(!t.P){var i=Iv(Sr(t),e),o=i==null?void 0:i[tt];if(o&&o.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(lD(r,i)&&(r!==void 0||W4(t.t,e)))return!0;Tv(t),Wo(t)}return t.o[e]===r&&(r!==void 0||e in t.o)||Number.isNaN(r)&&Number.isNaN(t.o[e])||(t.o[e]=r,t.R[e]=!0),!0},deleteProperty:function(t,e){return Iv(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,Tv(t),Wo(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=Sr(t),n=Reflect.getOwnPropertyDescriptor(r,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:r[e]}},defineProperty:function(){Wn(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Wn(12)}},Tu={};hd(Y4,function(t,e){Tu[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),Tu.deleteProperty=function(t,e){return Tu.set.call(this,t,e,void 0)},Tu.set=function(t,e,r){return Y4.set.call(this,t[0],e,r,t[0])};var _D=function(){function t(r){var n=this;this.O=o8,this.D=!0,this.produce=function(i,o,a){if(typeof i=="function"&&typeof o!="function"){var s=o;o=i;var c=n;return function(m){var w=this;m===void 0&&(m=s);for(var g=arguments.length,v=Array(g>1?g-1:0),b=1;b<g;b++)v[b-1]=arguments[b];return c.produce(m,function(E){var k;return(k=o).call.apply(k,[w,E].concat(v))})}}var l;if(typeof o!="function"&&Wn(6),a!==void 0&&typeof a!="function"&&Wn(7),Qi(i)){var d=e8(n),u=qh(n,i,void 0),h=!0;try{l=o(u),h=!1}finally{h?q2(d):G4(d)}return typeof Promise<"u"&&l instanceof Promise?l.then(function(m){return Sv(d,a),Av(m,d)},function(m){throw q2(d),m}):(Sv(d,a),Av(l,d))}if(!i||typeof i!="object"){if((l=o(i))===void 0&&(l=i),l===cS&&(l=void 0),n.D&&ky(l,!0),a){var f=[],p=[];ko("Patches").M(i,l,f,p),a(f,p)}return l}Wn(21,i)},this.produceWithPatches=function(i,o){if(typeof i=="function")return function(l){for(var d=arguments.length,u=Array(d>1?d-1:0),h=1;h<d;h++)u[h-1]=arguments[h];return n.produceWithPatches(l,function(f){return i.apply(void 0,[f].concat(u))})};var a,s,c=n.produce(i,o,function(l,d){a=l,s=d});return typeof Promise<"u"&&c instanceof Promise?c.then(function(l){return[l,a,s]}):[c,a,s]},typeof(r==null?void 0:r.useProxies)=="boolean"&&this.setUseProxies(r.useProxies),typeof(r==null?void 0:r.autoFreeze)=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var e=t.prototype;return e.createDraft=function(r){Qi(r)||Wn(8),cs(r)&&(r=fD(r));var n=e8(this),i=qh(this,r,void 0);return i[tt].C=!0,G4(n),i},e.finishDraft=function(r,n){var i=r&&r[tt],o=i.A;return Sv(o,n),Av(void 0,o)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!o8&&Wn(20),this.O=r},e.applyPatches=function(r,n){var i;for(i=n.length-1;i>=0;i--){var o=n[i];if(o.path.length===0&&o.op==="replace"){r=o.value;break}}i>-1&&(n=n.slice(i+1));var a=ko("Patches").$;return cs(r)?a(r,n):this.produce(r,function(s){return a(s,n)})},t}(),ei=new _D,lS=ei.produce;ei.produceWithPatches.bind(ei);ei.setAutoFreeze.bind(ei);ei.setUseProxies.bind(ei);ei.applyPatches.bind(ei);ei.createDraft.bind(ei);ei.finishDraft.bind(ei);const Rd=(...t)=>Be(e=>t.includes(e.type));var Yr=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)},bD=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},so,Zi;class y1 extends Ne{get action$(){return Yr(this,so,"f").asObservable()}get value(){return Yr(this,Zi,"f").value}get closed(){return Yr(this,Zi,"f").closed||Yr(this,so,"f").closed}constructor(e,r){super(i=>Yr(this,Zi,"f").subscribe(i)),so.set(this,new on),Zi.set(this,void 0);const n="getInitialState"in e?e.getInitialState():r;bD(this,Zi,new Id(n),"f"),Yr(this,so,"f").pipe(Ok(e,n),Zk()).subscribe(Yr(this,Zi,"f")),this.reset=()=>Yr(this,Zi,"f").next(n)}next(e){Yr(this,so,"f").next(e)}addEffect(e,r){const n=typeof e=="string"?this.action$.pipe(Rd(e)):this.action$,i=r||e;return n.pipe(Nn(o=>Vt(new Promise((a,s)=>{try{a(i(o,this.value))}catch(c){s(c)}})).pipe(Ft(a=>(console.warn("unhandled effect",a),Pt)))),Be(o=>!!o),I2(A2)).subscribe(Yr(this,so,"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(Ft(n=>(console.trace("unhandled exception, epic closed!",n),Pt)),I2(A2)).subscribe(Yr(this,so,"f"))}unsubscribe(){Yr(this,so,"f").unsubscribe(),Yr(this,Zi,"f").unsubscribe()}complete(){Yr(this,so,"f").complete(),Yr(this,Zi,"f").complete()}asObservable(){return Yr(this,Zi,"f").asObservable()}}so=new WeakMap,Zi=new WeakMap;const dS=(t,e)=>Object.entries(t).reduce((r,[n,i])=>Object.assign(r,{[n]:typeof i=="function"?(...o)=>e.next(i(...o)):dS(i,e)}),{});function br(t,e){function r(...n){if(e){const i=e(...n);if(!i)throw new Error("prepareAction did not return an object");return Object.assign(Object.assign({type:t,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:t,payload:n[0]}}return r.toString=()=>`${t}`,r.type=t,r.match=n=>n.type===t,r}const Cp="::",Ty=t=>new RegExp(`${Cp}${t}$`),s8=t=>t.type.replace(Ty("\\w+$"),"");function vo(t,e,r,n){const i=br([t,"request"].join(Cp),e);return r&&Object.assign(i,{success:br([t,"success"].join(Cp),r)}),n&&Object.assign(i,{failure:br([t,"failure"].join(Cp),n)}),i}const wD=t=>!!t.type.match(/::request$/),xD=t=>!!t.type.match(Ty("success")),CD=t=>!!t.type.match(Ty("failure")),ED=t=>xD(t)||CD(t);function c8(t){return Qi(t)?lS(t,()=>{}):t}function kD(t){return typeof t=="function"}function Md(t,e){const[r,n,i]=SD(e);let o;if(kD(t))o=()=>c8(t());else{const s=c8(t);o=()=>s}function a(s=o(),c){let l=[r[c.type],...n.filter(({matcher:d})=>d(c)).map(({reducer:d})=>d)];return l.filter(d=>!!d).length===0&&(l=[i]),l.reduce((d,u)=>{if(u)if(cs(d)){const f=u(d,c);return f===void 0?d:f}else{if(Qi(d))return lS(d,h=>u(h,c));{const h=u(d,c);if(h===void 0){if(d===null)return d;throw Error("A case reducer on a non-draftable value must not return undefined")}return h}}return d},s)}return a.getInitialState=o,a}function SD(t){const e={},r=[];let n;const i={addCase(o,a){const s=typeof o=="string"?o:o.type;if(s in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[s]=a,i},addMatcher(o,a){return r.push({matcher:o,reducer:a}),i},addDefaultCase(o){return n=o,i}};return t(i),[e,r,n]}function AD(t,e){const r=typeof e=="function"?e:Md(e.initial,o=>e.builder(o,t)),n=new y1(r),i=dS(t,n);return{actions:t,dispatch:i,subject:n}}const ID=()=>({request:br("client/request",(e,r)=>{var n,i,o;return r??(r={}),(n=r.transaction)!==null&&n!==void 0||(r.transaction=U2()),(i=r.created)!==null&&i!==void 0||(r.created=Date.now()),(o=r.task)!==null&&o!==void 0||(r.task=new fk),{payload:e,meta:r}}),retry:br("client/retry",e=>({payload:e})),success:br("client/success",(e,r)=>({payload:e,meta:r})),cancel:br("client/cancel",e=>({payload:e})),failure:br("client/failure",(e,r)=>({payload:e,meta:r})),error:br("client/error",(e,r)=>({payload:e,meta:r}))}),Tr=ID(),uS=t=>e=>e.pipe(Be(Tr.request.match),Nn(r=>{const{meta:n}=r,{transaction:i}=n,o=new AbortController,{signal:a}=o;return new Ne(s=>{s.add(e.pipe(Be(Tr.cancel.match)).subscribe(c=>{c.payload.transaction===i&&(a.aborted||o.abort(),s.complete())})),s.add(Vt(t(r,a)).subscribe({next:c=>s.next(c),error:c=>s.next(Tr.error(c,{request:r})),complete:()=>s.complete()}))})})),TD=t=>(t=Object.assign({},{count:0,delay:0},t),(e,r)=>e.pipe(uS(n=>e.pipe(Be(Tr.failure.match),Be(i=>i.meta.request===n),fy(r),gt(([i,o])=>{var a,s;const{transaction:c}=n.meta,l=o[c];if(!l)return Pt;const d=(s=(a=l.retry)===null||a===void 0?void 0:a.length)!==null&&s!==void 0?s:0,u=Object.assign({},t,n.meta.retry);if(d>=u.count)throw u.count?Error("maximum retries executed!",{cause:i.payload}):i.payload;return(typeof u.delay=="function"?Vt(u.delay(i.payload.cause)).pipe(Ft(f=>{throw Error("failed to resolve delay",{cause:f})})):jO(u.delay)).pipe(Ce(()=>Tr.retry(n)))}))))),PD=t=>e=>e.pipe(uS((r,n)=>Vt(t(r.payload,n)).pipe(Ce(i=>Tr.success(i,{request:r})),Ft(i=>sn(Tr.failure(Error(`failed to execute request for transaction ${r.meta.transaction}`,{cause:i}),{request:r})))))),RD=t=>t.pipe(Be(Tr.retry.match),Ce(e=>e.payload)),hS=()=>Be(t=>t.status==="complete"),MD=(t={})=>Md(t,e=>e.addCase(Tr.request,(r,n)=>{const{transaction:i,task:o,ref:a,created:s}=n.meta;r[i]={transaction:i,task:o,ref:a,created:s}}).addCase(Tr.success,(r,n)=>{const{request:i}=n.meta,{transaction:o,ref:a}=i.meta,s=r[o];if(s){const c={status:"complete",transaction:o,ref:a,value:n.payload,args:i.payload,created:s.created,completed:Date.now()};s.task.next(c),s.task.complete()}delete r[o]}).addCase(Tr.retry,(r,n)=>{var i;const{transaction:o}=n.payload.meta,a=r[o];a&&((i=a.retry)!==null&&i!==void 0||(a.retry=[]),a.retry.push(Date.now()))}).addCase(Tr.cancel,(r,n)=>{const{transaction:i,reason:o}=n.payload;if(r[i]){const a=Object.assign({},Jb(r[i]));a.task.error(new q4("abort",{request:a,message:o??"request was canceled"})),delete r[i]}}).addCase(Tr.failure,(r,n)=>{var i;const{payload:o,meta:a}=n,{transaction:s}=a.request.meta,c=r[s];c&&((i=c.errors)!==null&&i!==void 0||(c.errors=[]),c.errors.push(o))}).addCase(Tr.error,(r,n)=>{const{payload:i,meta:o}=n,{transaction:a}=o.request.meta;if(r[a]){const s=Object.assign({},Jb(r[a]));s.task.error(new q4("error",{request:s,message:`failed to process task [${a}]`,cause:i.cause})),delete r[a]}}));var $D=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})},qt=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)},l8=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},nr,Zs;class d8 extends Ne{get closed(){return qt(this,nr,"f").closed}get state$(){return qt(this,nr,"f")}get action$(){return qt(this,nr,"f").action$}get success$(){return this.action$.pipe(Be(Tr.success.match),Ce(({payload:e})=>e))}get error$(){return this.action$.pipe(Rd("client/error"),fy(qt(this,nr,"f")),Ce(([e,r])=>{const{payload:n,meta:i}=e,{transaction:o}=i.request.meta,a=r[e.meta.request.meta.transaction];return new q4("error",{request:a,message:`failed to process task [${o}]`,cause:n})}))}constructor(e,r){super(o=>qt(this,nr,"f").subscribe(o)),nr.set(this,void 0),Zs.set(this,void 0);const n={};l8(this,nr,new y1(MD(n)),"f"),l8(this,Zs,new Rr(()=>qt(this,nr,"f").complete()),"f"),qt(this,Zs,"f").add(qt(this,nr,"f").addFlow(PD(e))),qt(this,Zs,"f").add(qt(this,nr,"f").addFlow(RD));const i=Object.assign({count:0,delay:0},r==null?void 0:r.retry);qt(this,Zs,"f").add(qt(this,nr,"f").addFlow(TD(i)))}next(e,r){const{ref:n,retry:i,task:o}=r??{},a=Tr.request(e,{ref:n,retry:i,task:o});return qt(this,nr,"f").next(a),a.meta}nextAsync(e,r){return $D(this,void 0,void 0,function*(){return Lr(this.next(e,r).task.pipe(hS()))})}getTaskByTransaction(e){const r=qt(this,nr,"f").value[e];return r==null?void 0:r.task}getTaskByRef(e){const r=Object.values(qt(this,nr,"f").value).find(n=>n.ref===e);return r==null?void 0:r.task}cancelTaskByRef(e,r){const n=Object.values(qt(this,nr,"f").value).find(i=>i.ref===e);n!=null&&n.ref&&this.cancel(n.transaction,r)}cancel(e,r){if(e)qt(this,nr,"f").value[e]&&(r??(r=`[${e}]: transaction canceled`),qt(this,nr,"f").next(Tr.cancel({transaction:e,reason:r})));else for(const n of Object.keys(qt(this,nr,"f").value))this.cancel(n,"all transactions canceled")}on(e,r){return qt(this,nr,"f").addEffect(Tr[e].type,n=>{r(n,this)})}complete(){qt(this,Zs,"f").unsubscribe()}asObservable(){return qt(this,nr,"f").asObservable()}}nr=new WeakMap,Zs=new WeakMap;function ZD(){return{set:br("cache/set",(t,e)=>({payload:{key:t,entry:e}})),remove:br("cache/remove",t=>({payload:t})),invalidate:br("cache/invalidate",t=>({payload:t})),trim:br("cache/trim",t=>({payload:t}))}}const Kc=ZD(),HD=(t,e)=>{var r,n;return((r=e.updated)!==null&&r!==void 0?r:0)-((n=t.updated)!==null&&n!==void 0?n:0)};function OD(t,e={}){return Md(e,r=>r.addCase(t.set,(n,i)=>{var o;const{key:a,entry:s}=i.payload,c=n[a];if(c)c.updated=Date.now(),(o=c.updates)!==null&&o!==void 0||(c.updates=0),c.updates++;else{const l=Date.now();n[a]=Object.assign(Object.assign({},s),{created:l,updated:l})}}).addCase(t.remove,(n,i)=>{delete n[i.payload]}).addCase(t.invalidate,(n,i)=>{const o=n[i.payload];o&&delete o.updated}).addCase(t.trim,(n,i)=>{var o,a;const{payload:s}=i,c=(o=s.sort)!==null&&o!==void 0?o:HD,l=Object.keys(n),d=Object.entries(n).filter(([u,h])=>!s.validate||s.validate(h)).sort((u,h)=>c(u[1],h[1])).slice(0,(a=s.size)!==null&&a!==void 0?a:Number.MAX_SAFE_INTEGER).map(([u])=>u);if(l.length!==d.length)for(const u of l){const h=d.indexOf(u);h!==-1?d.splice(h,1):delete n[u]}}))}var Mi=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)},LD=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Tn;class u8{get state(){return Mi(this,Tn,"f").value}get state$(){return Mi(this,Tn,"f").asObservable()}constructor(e){Tn.set(this,void 0);const{trimming:r,initial:n}=e??{};LD(this,Tn,new y1(OD(Kc,n)),"f"),r&&Mi(this,Tn,"f").addEffect("cache/set",()=>Mi(this,Tn,"f").next(Kc.trim(r)))}setItem(...e){Mi(this,Tn,"f").next(Kc.set(...e))}getItem(e){return Mi(this,Tn,"f").value[e]}removeItem(e){Mi(this,Tn,"f").next(Kc.remove(e))}invalidate(e){Mi(this,Tn,"f").next(Kc.invalidate(e))}trim(e){Mi(this,Tn,"f").next(Kc.trim(e))}reset(){Mi(this,Tn,"f").reset()}complete(){Mi(this,Tn,"f").complete()}}Tn=new WeakMap;var mt=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)},Yc=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},ND=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 i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r},Hs,co,Ia,ul,hl,Pu,Ep,Q4;const DD=(t=0)=>e=>{var r;return((r=e.updated)!==null&&r!==void 0?r:0)+t>Date.now()},VD=t=>{if(typeof t=="function")return t;switch(t){case"concat":return qN;case"merge":return WN;case"switch":default:return GN}};class Or{get client(){return mt(this,co,"f")}get cache(){return mt(this,Ia,"f")}constructor(e){var r;Hs.set(this,new Rr),co.set(this,void 0),Ia.set(this,void 0),ul.set(this,new on),hl.set(this,{}),Pu.set(this,void 0),Ep.set(this,void 0),Q4.set(this,U2()),Yc(this,Pu,i=>sD(e.key(i),mt(this,Q4,"f")),"f"),Yc(this,Ep,(r=e==null?void 0:e.validate)!==null&&r!==void 0?r:DD(e==null?void 0:e.expire),"f"),e.client instanceof d8?Yc(this,co,e.client,"f"):(Yc(this,co,new d8(e.client.fn,e.client.options),"f"),mt(this,Hs,"f").add(()=>mt(this,co,"f").complete())),e.cache instanceof u8?Yc(this,Ia,e.cache,"f"):(Yc(this,Ia,new u8(e.cache||{}),"f"),mt(this,Hs,"f").add(()=>mt(this,Ia,"f").complete()));const n=VD(e.queueOperator);mt(this,Hs,"f").add(()=>mt(this,ul,"f").complete()),mt(this,Hs,"f").add(mt(this,ul,"f").pipe(n(i=>{const{args:o,options:a}=i;return new Ne(s=>{const{task:c,transaction:l}=mt(this,co,"f").next(o,a);s.add(c.pipe(Ft(()=>Pt)).subscribe(s)),s.add(()=>{setTimeout(()=>mt(this,co,"f").cancel(l))})})}),hS(),Lk(()=>!mt(this,co,"f").closed)).subscribe(i=>{const{args:o,value:a,transaction:s,ref:c}=i,l=c??mt(this,Pu,"f").call(this,o);mt(this,Ia,"f").setItem(l,{value:a,args:o,transaction:s})}))}next(e,r){mt(this,ul,"f").next({args:e,options:r})}query(e,r){return this._query(e,r)}queryAsync(e,r){const n=r||{},{awaitResolve:i}=n,o=ND(n,["awaitResolve"]);return(i?fr:Lr)(this._query(e,o))}complete(){mt(this,Hs,"f").unsubscribe()}_query(e,r){const n=mt(this,Pu,"f").call(this,e),i=this._createTask(n,e,r);return r!=null&&r.signal&&r.signal.addEventListener("abort",()=>{mt(this,co,"f").cancelTaskByRef(n,"abort signal triggered by caller")}),i}_createTask(e,r,n){const i=new on,o=new Ne(a=>{var s;if(!mt(this,hl,"f")[e])mt(this,hl,"f")[e]=o;else return mt(this,hl,"f")[e].subscribe(a);i.pipe(P2(()=>{delete mt(this,hl,"f")[e]})).subscribe(a);const c=mt(this,Ia,"f").getItem(e);c&&i.next(Object.assign(Object.assign({},c),{status:"cache"}));const l=((s=n==null?void 0:n.cache)===null||s===void 0?void 0:s.validate)||mt(this,Ep,"f");c&&l(c,r)?i.complete():mt(this,ul,"f").next({args:r,options:{ref:e,task:i,retry:n==null?void 0:n.retry}})}).pipe(YO());return o}}Hs=new WeakMap,co=new WeakMap,Ia=new WeakMap,ul=new WeakMap,hl=new WeakMap,Pu=new WeakMap,Ep=new WeakMap,Q4=new WeakMap;Or.extractQueryValue=B4;var Ca=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)},h8=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Ru,No;class FD extends Ne{get currentContext(){return Ca(this,No,"f").value}get currentContext$(){return Ca(this,No,"f").asObservable()}get client(){return Ca(this,Ru,"f")}constructor(e){super(r=>Ca(this,No,"f").subscribe(r)),Ru.set(this,void 0),No.set(this,void 0),h8(this,Ru,new Or(e),"f"),h8(this,No,new Id(void 0),"f")}setCurrentContext(e){typeof e=="string"?this.resolveContext(e).pipe(Ft(()=>Pt)).subscribe(r=>this.setCurrentContext(r)):BN(e,Ca(this,No,"f").value)||Ca(this,No,"f").next(e)}resolveContext(e){return Ca(this,Ru,"f").query({id:e}).pipe(Ce(r=>r.value),Ft(r=>{throw r.cause?r.cause:r}))}resolveContextAsync(e,r){return(r!=null&&r.awaitResolve?fr:Lr)(this.resolveContext(e))}dispose(){Ca(this,No,"f").complete()}}Ru=new WeakMap,No=new WeakMap;var ou=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})},et=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)},Es=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Do,kp,Mu,Hi,Os,Ls,$u,Sp,Ap;let zD=class{get contextClient(){return et(this,Do,"f")}get queryClient(){return et(this,kp,"f")}get currentContext$(){return et(this,Do,"f").currentContext$}get currentContext(){return et(this,Do,"f").currentContext}set currentContext(e){if(console.warn("@deprecated","ContextProvider.currentContext","use setCurrentContextById|setCurrentContext|clearCurrentContext"),e===void 0)throw Error("not allowed to set current context as undefined undefined!");this.setCurrentContextAsync(e)}constructor(e){var r,n,i;Do.set(this,void 0),kp.set(this,void 0),Mu.set(this,void 0),Hi.set(this,void 0),Os.set(this,new Rr),Ls.set(this,void 0),$u.set(this,void 0),Sp.set(this,void 0),Ap.set(this,new on);const{config:o,event:a}=e;e.parentContext&&console.warn("@deprecated","parentContext as arg is deprecated, use ContextProvider.connectParentContext"),Es(this,Hi,a,"f"),o.resolveContext&&(this.resolveContext=(r=o.resolveContext)===null||r===void 0?void 0:r.bind(this)),o.validateContext&&(this.validateContext=(n=o.validateContext)===null||n===void 0?void 0:n.bind(this)),Es(this,Ls,o.contextType,"f"),Es(this,$u,o.contextFilter,"f"),Es(this,Do,new FD(o.client.get),"f"),Es(this,kp,new Or(o.client.query),"f"),o.client.related&&Es(this,Mu,new Or(o.client.related),"f"),Es(this,Sp,(i=o.contextParameterFn)!==null&&i!==void 0?i:s=>({search:s.search,filter:{type:s.type}}),"f"),et(this,Hi,"f")&&(et(this,Os,"f").add(this.currentContext$.pipe(R2()).subscribe(([s,c])=>{var l;(l=et(this,Hi,"f"))===null||l===void 0||l.dispatchEvent("onCurrentContextChanged",{source:this,canBubble:!0,detail:{previous:s,next:c}})})),et(this,Os,"f").add(et(this,Hi,"f").addEventListener("onCurrentContextChanged",s=>{s.source!==this&&s.detail.next!==void 0&&this.setCurrentContext(s.detail.next)}))),et(this,Os,"f").add(et(this,Ap,"f").pipe(gt(s=>s),ld(s=>console.debug("ContextProvider::#contextQueue",s))).subscribe(s=>{et(this,Do,"f").setCurrentContext(s??null)}))}connectParentContext(e,r){const i=e.currentContext$.pipe(Be(o=>o!==void 0),Be((o,a)=>{var s;return r!=null&&r.skipFirst&&a<=1?(console.debug("ContextProvider::connectParentContext","skipping first item",o),!1):((s=this.currentContext)===null||s===void 0?void 0:s.id)!==(o==null?void 0:o.id)}),gt(o=>ou(this,void 0,void 0,function*(){var a;if(!o)return{next:o};const s=yield(a=et(this,Hi,"f"))===null||a===void 0?void 0:a.dispatchEvent("onParentContextChanged",{source:this,detail:o,cancelable:!0});return{next:o,canceled:s==null?void 0:s.canceled}})),Be(o=>!o.canceled),gt(({next:o})=>this.setCurrentContext(o,{validate:!0,resolve:!0}).pipe(Ft(a=>(console.warn("ContextProvider::onParentContextChanged","setCurrentContext",a),Pt)))),Ft(o=>(console.warn("ContextProvider::onParentContextChanged","unhandled exception",o),Pt))).subscribe();return et(this,Os,"f").add(i),i}setCurrentContextById(e){return new Ne(r=>{try{et(this,Do,"f").resolveContext(e).pipe(Be(n=>!!n),gt(n=>this.setCurrentContext(n))).subscribe(r)}catch(n){r.error(n)}})}setCurrentContextByIdAsync(e){return fr(this.setCurrentContextById(e))}setCurrentContext(e,r){const n=new on,i=new on,o=this._setCurrentContext(e,r).pipe(ld(a=>i.next(a)),Xl(n),P2(()=>i.complete()),Ft(a=>(i.error(a),Pt)));return et(this,Ap,"f").next(o),i.pipe(P2(()=>n.next(!0)))}_setCurrentContext(e,r){return new Ne(n=>{var i;if(e===this.currentContext)return n.next(e),n.complete();if(e&&(r!=null&&r.validate)&&!this.validateContext(e)){if(!r.resolve)return(i=et(this,Hi,"f"))===null||i===void 0||i.dispatchEvent("onSetContextValidationFailed",{source:this,detail:{context:e}}),n.error(Error("failed to validate provided context"));if(r.resolve)return sn(e).pipe(gt(o=>ou(this,void 0,void 0,function*(){var a;const s=yield(a=et(this,Hi,"f"))===null||a===void 0?void 0:a.dispatchEvent("onSetContextResolve",{source:this,cancelable:!0,detail:{context:o}});if(s!=null&&s.canceled)throw Error("resolving of context was canceled");return o})),gt(o=>this.resolveContext(o).pipe(Ce(a=>({context:o,resolved:a})))),gt(o=>ou(this,[o],void 0,function*({context:a,resolved:s}){var c;const l=yield(c=et(this,Hi,"f"))===null||c===void 0?void 0:c.dispatchEvent("onSetContextResolved",{source:this,cancelable:!0,detail:{context:a,resolved:s}});if(l!=null&&l.canceled)throw Error("resolving of context was canceled");return s})),gt(o=>this._setCurrentContext(o))).subscribe(n)}return sn(e).pipe(gt(o=>ou(this,void 0,void 0,function*(){var a;const s=yield(a=et(this,Hi,"f"))===null||a===void 0?void 0:a.dispatchEvent("onCurrentContextChange",{source:this,canBubble:!0,cancelable:!0,detail:{context:o}});if(s!=null&&s.canceled)throw Error("change of context was aborted");return o}))).subscribe(o=>{n.next(o),n.complete()})})}setCurrentContextAsync(e,r){return ou(this,void 0,void 0,function*(){return fr(this.setCurrentContext(e,r))})}queryContext(e){const r=this.queryClient.query(et(this,Sp,"f").call(this,{search:e,type:et(this,Ls,"f")})).pipe(Ft(n=>{throw n.name==="QueryClientError"?n.cause:n}),Ce(n=>n.value));return et(this,$u,"f")?r.pipe(Ce(et(this,$u,"f"))):r}queryContextAsync(e){return fr(this.queryContext(e))}validateContext(e){return et(this,Ls,"f")?et(this,Ls,"f").map(r=>r.toLowerCase()).includes(e.type.id.toLowerCase()):!0}resolveContext(e){return this.relatedContexts({item:e,filter:{type:et(this,Ls,"f")}}).pipe(Ce(r=>r.filter(n=>this.validateContext(n))),Ce(r=>{const n=r.shift();if(!n)throw Error("failed to resolve context");return r.length&&console.warn("ContextProvider::relatedContext","multiple items found 🤣",r),n}))}resolveContextAsync(e){return fr(this.resolveContext(e))}relatedContexts(e){return et(this,Mu,"f")?et(this,Mu,"f").query(e).pipe(Ce(({value:r})=>r),Ft(r=>{throw r.cause?r.cause:r})):Ak(()=>Error("ContextProvider::relatedContexts - no client defined for resolving related context"))}relatedContextsAsync(e){return fr(this.relatedContexts(e))}clearCurrentContext(){this.setCurrentContext(null)}dispose(){et(this,Os,"f").unsubscribe(),et(this,Do,"f").dispose()}};Do=new WeakMap,kp=new WeakMap,Mu=new WeakMap,Hi=new WeakMap,Os=new WeakMap,Ls=new WeakMap,$u=new WeakMap,Sp=new WeakMap,Ap=new WeakMap;var jD=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const UD="context",BD={name:UD,configure:()=>new jN,initialize:function(t){return jD(this,void 0,void 0,function*(){var e;const r=yield t.config.createConfig(t),n=t.hasModule("event")?yield t.requireInstance("event"):void 0,i=(e=t.ref)===null||e===void 0?void 0:e.context,o=new zD({config:r,event:n,parentContext:i}),a=new Rr(()=>o.dispose());return this.postInitialize=s=>new Ne(c=>{const l=r.resolveInitialContext?Vt(r.resolveInitialContext(s)).pipe(Be(d=>!!d),gt(d=>s.modules.context.setCurrentContext(d,{validate:!0,resolve:!0}))):Pt;c.add(l.pipe(Ft(d=>(console.warn("ContextModule.postInitialize","failed to resolve initial context",d),Pt))).subscribe({next:d=>{console.debug("ContextModule.postInitialize",`initial context was resolved to [${d?d.id:"none"}]`,d)},complete:()=>{r.connectParentContext!==!1&&i&&o.connectParentContext(i),c.complete()}}))}),this.dispose=()=>a.unsubscribe(),o})}};var f8=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};class qD{constructor(e){this.clientKey=e.clientKey,this.endpoint=e.endpoint,this.clientCtor=e.clientCtor}createHttpClientClient(e){return f8(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 f8(this,void 0,void 0,function*(){if(!this.endpoint)throw Error("no endpoint defined!");return new this.clientCtor({http:e,endpoint:this.endpoint})})}}var Pv=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};class WD{constructor(e,r){this._client=e,this._http=r}get environment(){return this._client.environment}resolveServices(){return this._client.fetchEnvironment()}resolveService(e){return Pv(this,void 0,void 0,function*(){return this._client.resolveService(e)})}createClient(e,r){return Pv(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 Pv(this,void 0,void 0,function*(){const{key:n,alias:i}=typeof e=="string"?{key:e,alias:e}:e,{uri:o,defaultScopes:a}=yield this.resolveService(n);r.addConfig(zk(i,{baseUri:o,defaultScopes:a}))})}}var Rv=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})},p8=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)},GD=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Zu;const m8="services";class KD{get environment(){var e;const r=(e=p8(this,Zu,"f").cache.getItem(m8))===null||e===void 0?void 0:e.value;if(!r)throw Error("no cached environment found");return r}constructor({http:e,endpoint:r}){Zu.set(this,void 0),this.http=e,this.endpoint=r,GD(this,Zu,new Or({client:{fn:()=>e.fetch$(r,{selector:this.selector.bind(this)})},key:()=>m8,expire:5*60*1e3}),"f")}fetchEnvironment(){return Rv(this,void 0,void 0,function*(){return Lr(Or.extractQueryValue(p8(this,Zu,"f").query(void 0,{cache:{suppressInvalid:!0}})))})}selector(e){return Rv(this,void 0,void 0,function*(){const r=yield e.json(),n=r.services.reduce((i,o)=>{var a;return Object.assign(i,{[o.key]:{clientId:r.clientId,uri:o.uri,defaultScopes:(a=o.defaultScopes)!==null&&a!==void 0?a:[r.clientId+"/.default"]}})},{});return Object.assign(Object.assign({},r),{services:n})})}resolveService(e){return Rv(this,void 0,void 0,function*(){try{const{services:r}=yield this.fetchEnvironment();return r[e]}catch(r){throw console.error(r),r}})}}Zu=new WeakMap;const YD="serviceDiscovery";var QD=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const XD={name:YD,configure:()=>new qD({clientCtor:KD,clientKey:"service_discovery",endpoint:"/_discovery/environments/current"}),initialize:t=>QD(void 0,[t],void 0,function*({config:e,requireInstance:r}){const n=yield r("http"),i=yield e.createHttpClientClient(n),o=yield e.createClient(i);return new WD(o,n)})};class JD{}var bi;(function(t){t.v1="1.0",t.v2="2.0"})(bi||(bi={}));class oi extends Error{constructor(e,r){super(`unsupported version ${e}`,{cause:r}),this.version=e}}const eV=(t,e)=>{var r;const n=(r=bi[t])!==null&&r!==void 0?r:t;switch(n){case bi.v2:throw new oi(t);case bi.v1:default:{const{id:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/contexts/${i}/?${String(o)}`}}},tV=(t,e,r)=>[eV(t,e),r],rV=(t,e,r="json")=>(n,i)=>t[r](...tV(e,n,i));var nV=["eq","ne","gt","ge","lt","le"],If=["and","or","not"],iV=["any","all"],oV=["startswith","endswith","contains"],aV=["expand","levels","select","skip","top","count","orderby","filter"],v8=/\((.*)\)/,g8=/(?!indexof)\((\w+)\)/,y8;(function(t){t.sum="sum",t.min="min",t.max="max",t.average="average",t.countdistinct="countdistinct"})(y8||(y8={}));var Oo="";function fS(t){var e=t===void 0?{}:t,r=e.select,n=e.search,i=e.skiptoken,o=e.format,a=e.top,s=e.skip,c=e.filter,l=e.transform,d=e.orderBy,u=e.key,h=e.count,f=e.expand,p=e.action,m=e.func,w="",g=[],v={};if(u!=null&&(w+="(".concat(bo(u,g),")")),(c||typeof h=="object")&&(v.$filter=Gh(typeof h=="object"?h:c,g)),l&&(v.$apply=pS(l)),f&&(v.$expand=Ip(f)),d&&(v.$orderby=Py(d)),h&&(typeof h=="boolean"?v.$count=!0:w+="/$count"),typeof a=="number"&&(v.$top=a),typeof s=="number"&&(v.$skip=s),p&&(w+="/".concat(p)),m){if(typeof m=="string")w+="/".concat(m);else if(typeof m=="object"){var b=Object.keys(m)[0],E=bo(m[b],g);w+="/".concat(b),E!==""&&(w+="(".concat(E,")"))}}return g.length>0&&Object.assign(v,g.reduce(function(k,x){var S;return Object.assign(k,(S={},S["@".concat(x.name)]=bo(x.value),S))},{})),uV(w,pr({$select:r,$search:n,$skiptoken:i,$format:o},v))}function Mv(t,e,r){return r===void 0&&(r=[]),"".concat(t," eq ").concat(bo(e,r))}function Gh(t,e,r){return t===void 0&&(t={}),e===void 0&&(e=[]),r===void 0&&(r=""),(Array.isArray(t)?t:[t]).reduce(function(o,a){if(a){var s=n(a,e,r);s&&o.push(s)}return o},[]).join(" and ");function n(o,a,s){o===void 0&&(o={}),a===void 0&&(a=[]),s===void 0&&(s="");var c="";if(typeof o=="string")c=o;else if(o&&typeof o=="object"){var l=Object.keys(o).reduce(function(d,u){var h=o[u];if(h===void 0)return d;var f="";if(s?u===Oo?f=s:g8.test(u)?f=u.replace(g8,function(v,b){return b.trim()===Oo?"(".concat(s,")"):"(".concat(s,"/").concat(b.trim(),")")}):v8.test(u)?f=u.replace(v8,function(v,b){return b.trim()===Oo?"(".concat(s,")"):"(".concat(s,"/").concat(b.trim(),")")}):f="".concat(s,"/").concat(u):f=u,u===Oo&&Array.isArray(h))return d.concat(h.map(function(v){return Mv(f,v)}));if(["number","string","boolean"].indexOf(typeof h)!==-1||h instanceof Date||h===null)d.push(Mv(f,h,a));else if(Array.isArray(h)){var p=u,m=h.map(function(v){return Gh(v,a,s)}).filter(function(v){return v}).map(function(v){return If.indexOf(p)!==-1?"(".concat(v,")"):v});m.length&&(If.indexOf(p)!==-1?m.length&&(p==="not"?d.push(_8(m)):d.push("(".concat(m.join(" ".concat(p," ")),")"))):d.push(m.join(" ".concat(p," "))))}else if(If.indexOf(f)!==-1){var w=f,m=Object.keys(h).map(function(b){var E;return n((E={},E[b]=h[b],E))});m.length&&(w==="not"?d.push(_8(m)):d.push("(".concat(m.join(" ".concat(w," ")),")")))}else if(typeof h=="object")if("type"in h)d.push(Mv(f,h,a));else{var g=Object.keys(h);g.forEach(function(v){if(h[v]!==void 0)if(nV.indexOf(v)!==-1)d.push("".concat(f," ").concat(v," ").concat(bo(h[v],a)));else if(If.indexOf(v)!==-1)Array.isArray(h[v])?d.push(h[v].map(function(x){return"("+n(x,a,f)+")"}).join(" ".concat(v," "))):d.push("("+n(h[v],a,f)+")");else if(iV.indexOf(v)!==-1){var b=i(u.toLowerCase(),h[v],v,f);b&&d.push(b)}else if(v==="has")d.push("".concat(f," ").concat(v," ").concat(bo(h[v],a)));else if(v==="in"){var E=Array.isArray(h[v])?h[v]:h[v].value.map(function(x){return{type:h[v].type,value:x}});d.push(f+" in ("+E.map(function(x){return bo(x,a)}).join(",")+")")}else if(oV.indexOf(v)!==-1)d.push("".concat(v,"(").concat(f,",").concat(bo(h[v],a),")"));else{var k=n(h,a,f);k&&d.push(k)}})}else throw new Error("Unexpected value type: ".concat(h));return d},[]);c=l.join(" and ")}return c}function i(o,a,s,c){var l="";if(typeof a=="string"||a instanceof String)l=sV(o,a,s,c);else if(a){var d=Array.isArray(a)?a.reduce(function(h,f){return f.hasOwnProperty(Oo)?(h.hasOwnProperty(Oo)||(h[Oo]=[]),h[Oo].push(f[Oo]),h):pr(pr({},h),f)},{}):a,u=n(d,e,o);l="".concat(c,"/").concat(s,"(").concat(u?"".concat(o,":").concat(u):"",")")}return l}}function sV(t,e,r,n){var i="",o=r=="all"?"ne":"eq";return i="".concat(n,"/").concat(r,"(").concat(t,": ").concat(t," ").concat(o," '").concat(e,"')"),i}function cV(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 bo(t,e){if(typeof t=="string")return"'".concat(cV(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 bo(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],i=r[1];return"".concat(n,"=").concat(bo(i,e))}).join(",")}return t}function Ip(t){if(typeof t=="number")return t;if(typeof t=="string")return t.indexOf("/")===-1?t:t.split("/").reverse().reduce(function(r,n,i,o){return i===0?"$expand=".concat(n):i===o.length-1?"".concat(n,"(").concat(r,")"):"$expand=".concat(n,"(").concat(r,")")},"");if(Array.isArray(t))return"".concat(t.map(function(r){return Ip(r)}).join(","));if(typeof t=="object"){var e=Object.keys(t);return e.some(function(r){return aV.indexOf(r.toLowerCase())!==-1})?e.map(function(r){var n;switch(r){case"filter":n=Gh(t[r]);break;case"orderBy":n=Py(t[r]);break;case"levels":case"count":case"skip":case"top":n="".concat(t[r]);break;default:n=Ip(t[r])}return"$".concat(r.toLowerCase(),"=").concat(n)}).join(";"):e.map(function(r){var n=Ip(t[r]);return n?"".concat(r,"(").concat(n,")"):r}).join(",")}return""}function pS(t){var e=Array.isArray(t)?t:[t],r=e.reduce(function(n,i){var o=i.aggregate,a=i.filter,s=i.groupBy,c=ak(i,["aggregate","filter","groupBy"]),l=Object.keys(c);if(l.length)throw new Error("Unsupported transform(s): ".concat(l));if(o&&n.push("aggregate(".concat(lV(o),")")),a){var d=Gh(a);d&&n.push("filter(".concat(Gh(d),")"))}return s&&n.push("groupby(".concat(dV(s),")")),n},[]);return r.join("/")||void 0}function lV(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 i=r[n];if(!i.with&&i.as)return"".concat(n," as ").concat(i.as);if(!i.with)throw new Error("'with' property required for '".concat(n,"'"));if(!i.as)throw new Error("'as' property required for '".concat(n,"'"));return"".concat(n," with ").concat(i.with," as ").concat(i.as)})}).join(",")}function dV(t){if(!t.properties)throw new Error("'properties' property required for groupBy");var e="(".concat(t.properties.join(","),")");return t.transform&&(e+=",".concat(pS(t.transform))),e}function Py(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],i=r[1];return Py(i,"".concat(n,"/"))}).map(function(r){return"".concat(e).concat(r)}).join(","):"".concat(e).concat(String(t))}function uV(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 _8(t){return"not(".concat(t.join(" and "),")")}const hV=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]})}},{}),fV=t=>Object.entries(t).filter(([e,r])=>!!r).reduce((e,[r,n])=>{switch(r){case"filter":return Object.assign(Object.assign({},e),{[r]:hV(n)});default:return Object.assign(Object.assign({},e),{[r]:t[r]})}},{}),pV=t=>typeof t=="string"?t:fS(fV(t)),mV=(t,e)=>{var r;const n=(r=bi[t])!==null&&r!==void 0?r:t;switch(n){case bi.v2:throw new oi(t);case bi.v1:default:{const{query:i,includeDeleted:o}=e,a=new URLSearchParams(pV(i));return a.append("api-version",n),o&&a.append("includeDeleted","true"),`/contexts/?${String(a)}`}}},vV=(t,e,r)=>[mV(t,e),r],gV=(t,e,r="json")=>(n,i)=>t[r](...vV(e,n,i)),yV=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]})}},{}),_V=t=>Object.entries(t).filter(([e,r])=>!!r).reduce((e,[r,n])=>{switch(r){case"filter":return Object.assign(Object.assign({},e),{[r]:yV(n)});default:return Object.assign(Object.assign({},e),{[r]:t[r]})}},{}),bV=t=>typeof t=="string"?t:fS(_V(t)),wV=(t,e)=>{var r;const n=(r=bi[t])!==null&&r!==void 0?r:t;switch(n){case bi.v2:throw new oi(t);case bi.v1:default:{const{id:i,query:o}=e,a=new URLSearchParams(bV(o||""));return a.append("api-version",n),`/contexts/${i}/relations?${String(a)}`}}},xV=(t,e,r)=>[wV(t,e),r],CV=(t,e,r="json")=>(n,i)=>t[r](...xV(e,n,i));class EV{get Version(){return bi}constructor(e,r){this._client=e,this._method=r}get(e,...r){return rV(this._client,e,this._method)(...r)}query(e,...r){return gV(this._client,e,this._method)(...r)}related(e,...r){return CV(this._client,e,this._method)(...r)}}const kV=(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)}`}}},SV=(t,e,r)=>{const n=kV(t,e),i=Object.assign({},{method:"Delete"},r);return[n,i]},AV=(t,e,r="fetch")=>(n,i)=>t[r](...SV(e,n,i)),IV=(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)}`}}},TV=(t,e,r)=>[IV(t,e),r],PV=(t,e,r="json")=>(n,i)=>t[r](...TV(e,n,i)),RV=(t,e)=>{switch(t){case"v1":default:{const r=new URLSearchParams;return r.append("api-version",t),`/bookmarks?${String(r)}`}}},MV=(t,e,r)=>{const n=RV(t),i=new Headers;i.append("content-type","application/json");const o=Object.assign({},{method:"post",body:JSON.stringify(e),headers:i},r);return[n,o]},$V=(t,e,r="json")=>(n,i)=>t[r](...MV(e,n,i)),ZV=(t,e)=>{switch(t){case"v1":default:{const r=new URLSearchParams;return r.append("api-version",t),`/bookmarks/${e.id}?${String(r)}`}}},HV=(t,e,r)=>{const n=ZV(t,e),i=new Headers;i.append("content-type","application/json");const o=Object.assign({},{method:"patch",body:JSON.stringify(e),headers:i},r);return[n,o]},OV=(t,e,r="json")=>(n,i)=>t[r](...HV(e,n,i)),LV=t=>{switch(t){case"v1":default:{const e=new URLSearchParams;return e.append("api-version",t),`persons/me/bookmarks/?${String(e)}`}}},NV=(t,e)=>[LV(t),e],DV=(t,e,r="json")=>n=>t[r](...NV(e,n)),VV=(t,e)=>{switch(t){case"v1":default:{const r=new URLSearchParams;return r.append("api-version",t),`/persons/me/bookmarks/favourites?${String(r)}`}}},FV=(t,e,r)=>{const n=VV(t),i=new Headers;i.append("content-type","application/json");const o=Object.assign({},{method:"post",body:JSON.stringify(e),headers:i},r);return[n,o]},zV=(t,e,r="json")=>(n,i)=>t[r](...FV(e,n,i)),jV=(t,e)=>{switch(t){case"v1":default:{const{bookmarkId:r}=e,n=new URLSearchParams;return n.append("api-version","1.0"),`/persons/me/bookmarks/favourites/${r}/?${String(n)}`}}},UV=(t,e,r)=>{const n=jV(t,e),i=Object.assign({},{method:"Delete"},r);return[n,i]},BV=(t,e,r="fetch")=>(n,i)=>t[r](...UV(e,n,i)),qV=(t,e)=>{switch(t){case"v1":default:{const{bookmarkId:r}=e,n=new URLSearchParams;return n.append("api-version",t),`/persons/me/bookmarks/favourites/${r}?${String(n)}`}}},WV=(t,e,r)=>{const n=qV(t,e),i=new Headers;i.append("content-type","application/json");const o=Object.assign({},{method:"head",headers:i},r);return[n,o]},GV=(t,e,r="json")=>(n,i)=>t[r](...WV(e,n,i));class KV{constructor(e,r){this._client=e,this._method=r}get(e,...r){return PV(this._client,e,this._method)(...r)}getAll(e){return DV(this._client,e,this._method)()}post(e,...r){return $V(this._client,e,this._method)(...r)}patch(e,...r){return OV(this._client,e,this._method)(...r)}delete(e,...r){return AV(this._client,e,this._method)(...r)}addFavorite(e,...r){return zV(this._client,e,this._method)(...r)}removeFavorite(e,...r){return BV(this._client,e,this._method)(...r)}verifyFavorite(e,...r){return GV(this._client,e,this._method)(...r)}}const YV=(t,e)=>{var r;const n=(r=Ht[t])!==null&&r!==void 0?r:t;switch(n){case Ht.v2:throw new oi(t);case Ht.v1:default:{const{id:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/notification/${i}/?${String(o)}`}}},QV=(t,e,r)=>[YV(t,e),r],XV=(t,e,r="json")=>(n,i)=>t[r](...QV(e,n,i)),JV=(t,e)=>{var r;const n=(r=Ht[t])!==null&&r!==void 0?r:t;switch(n){case Ht.v2:throw new oi(t);case Ht.v1:default:{const{userId:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/person/${i}/notifications/?${String(o)}`}}},eF=(t,e,r)=>{const n=JV(t,e),i=new Headers;i.append("content-type","application/json");const o=Object.assign({},{method:"post",body:JSON.stringify(e),headers:i},r);return[n,o]},tF=(t,e,r="json")=>(n,i)=>t[r](...eF(e,n,i)),rF=(t,e)=>{var r;const n=(r=Ht[t])!==null&&r!==void 0?r:t;switch(n){case Ht.v2:throw new oi(t);case Ht.v1:default:{const{id:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/notification/${i}/?${String(o)}`}}},nF=(t,e,r)=>{const n=rF(t,e),i=new Headers;i.append("content-type","application/json");const o=Object.assign({},{method:"patch",body:JSON.stringify(e),headers:i},r);return[n,o]},iF=(t,e,r="json")=>(n,i)=>t[r](...nF(e,n,i)),oF=(t,e)=>{var r;const n=(r=Ht[t])!==null&&r!==void 0?r:t;switch(n){case Ht.v2:throw new oi(t);case Ht.v1:default:{const{userId:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/person/${i}/notifications/?${String(o)}`}}},aF=(t,e,r)=>[oF(t,e),r],sF=(t,e,r="json")=>(n,i)=>t[r](...aF(e,n,i)),cF=(t,e)=>{var r;const n=(r=Ht[t])!==null&&r!==void 0?r:t;switch(n){case Ht.v2:throw new oi(t);case Ht.v1:default:{const{id:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/notification/${i}/?${String(o)}`}}},lF=(t,e,r)=>{const n=cF(t,e),i=new Headers;i.append("content-type","application/json");const o=Object.assign({},{method:"delete",headers:i},r);return[n,o]},dF=(t,e,r="json")=>(n,i)=>t[r](...lF(e,n,i));var Ht;(function(t){t.v1="1.0",t.v2="2.0"})(Ht||(Ht={}));const uF=(t,e)=>{var r;const n=(r=Ht[t])!==null&&r!==void 0?r:t;switch(n){case Ht.v2:throw new oi(t);case Ht.v1:default:{const{userId:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/person/${i}/notifications/settings/?${String(o)}`}}},hF=(t,e,r)=>{const n=uF(t,e),i=new Headers;i.append("content-type","application/json");const o=Object.assign({},{method:"put",body:JSON.stringify(e),headers:i},r);return[n,o]},fF=(t,e,r="json")=>(n,i)=>t[r](...hF(e,n,i)),pF=(t,e)=>{var r;const n=(r=Ht[t])!==null&&r!==void 0?r:t;switch(n){case Ht.v2:throw new oi(t);case Ht.v1:default:{const{userId:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/person/${i}/notifications/settings/?${String(o)}`}}},mF=(t,e,r)=>[pF(t,e),r],vF=(t,e,r="json")=>(n,i)=>t[r](...mF(e,n,i));class gF{get Version(){return Ht}constructor(e,r){this._client=e,this._method=r}getAll(e,...r){return sF(this._client,e,this._method)(...r)}getById(e,...r){return XV(this._client,e,this._method)(...r)}setSeenByUser(e,...r){return iF(this._client,e,this._method)(...r)}create(e,...r){return tF(this._client,e,this._method)(...r)}delete(e,...r){return dF(this._client,e,this._method)(...r)}getSettings(e,...r){return vF(this._client,e,this._method)(...r)}updateSettings(e,...r){return fF(this._client,e,this._method)(...r)}}var Ci;(function(t){t.v2="2.0",t.v4="4.0"})(Ci||(Ci={}));const yF=(t,e)=>{var r;const n=(r=Ci[t])!==null&&r!==void 0?r:t;switch(n){case Ci.v4:{const{azureId:i,expand:o}=e,a=new URLSearchParams;return a.append("api-version",n),o&&a.append("$expand",o.join(",")),`/persons/${i}?${String(a)}`}default:throw new oi(t)}},_F=(t,e,r)=>[yF(t,e),r],bF=(t,e,r="json")=>(n,i)=>t[r](..._F(e,n,i)),wF=(t,e)=>{var r;const n=(r=Ci[t])!==null&&r!==void 0?r:t;switch(n){case Ci.v2:{const{search:i}=e,o=new URLSearchParams;return o.append("api-version",n),o.append("$search",i),`/persons?${String(o)}`}default:throw new oi(t)}},xF=(t,e,r)=>[wF(t,e),r],CF=(t,e,r="json")=>(n,i)=>t[r](...xF(e,n,i)),EF=(t,e)=>{var r;const n=(r=Ci[t])!==null&&r!==void 0?r:t;switch(n){case Ci.v2:{const{azureId:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/persons/${i}/photo?${String(o)}`}default:throw new oi(t)}},kF=(t,e,r)=>[EF(t,e),r],SF=(t,e,r="blob")=>(n,i)=>t[r](...kF(e,n,i));class AF{get Version(){return Ci}constructor(e){this._client=e}get(e,r,n,i){return bF(this._client,e,r)(n,i)}query(e,r,n,i){return CF(this._client,e,r)(n,i)}photo(e,r,n,i){return SF(this._client,e,r)(n,i)}}var Hu=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};class IF extends Error{constructor(e,r,n){super(e,n),this.response=r,this.name="ApiProviderError"}}const Tf=t=>Hu(void 0,void 0,void 0,function*(){var e;if(!t.ok){const{headers:r,status:n,statusText:i,type:o,url:a,bodyUsed:s}=t,c=(e=r.get("content-type"))===null||e===void 0?void 0:e.match(/application\/(\w*)?[+]?json/),l=!s&&(yield c?t.json():t.text());throw new IF("failed to execute request, response was not ok",{headers:r,status:n,statusText:i,type:o,url:a,data:l})}});class TF{constructor({createClient:e}){this._createClientFn=e}createNotificationClient(e){return Hu(this,void 0,void 0,function*(){const r=yield this._createClientFn("notification");return r.responseHandler.add("validate_api_request",Tf),new gF(r,e)})}createBookmarksClient(e){return Hu(this,void 0,void 0,function*(){const r=yield this._createClientFn("bookmarks");return r.responseHandler.add("validate_api_request",Tf),new KV(r,e)})}createContextClient(e){return Hu(this,void 0,void 0,function*(){const r=yield this._createClientFn("context");return r.responseHandler.add("validate_api_request",Tf),new EV(r,e)})}createPeopleClient(){return Hu(this,void 0,void 0,function*(){const e=yield this._createClientFn("people");return e.responseHandler.add("validate_api_request",Tf),new AF(e)})}}var mS=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const PF="services",RF=(t,e)=>r=>mS(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}`)}),vS={name:PF,configure:()=>new JD,initialize:t=>mS(void 0,[t],void 0,function*({ref:e,config:r,requireInstance:n,hasModule:i}){if(!r.createClient){const o=yield n("http"),a=i("serviceDiscovery")?yield n("serviceDiscovery"):e==null?void 0:e.serviceDiscovery;r.createClient=RF(o,a)}if(!r.createClient)throw Error("missing configuration for creating API client");return new TF(r)})},MF=t=>{t.addConfig({module:vS})};class $F extends JO{constructor(){super([oL,nS,py,XD,vS,BD]),this.logger=new ok("FrameworkConfigurator")}configureHttp(...e){this.addConfig(yL(...e))}configureHttpClient(...e){this.addConfig(zk(...e))}configureMsal(...e){this.addConfig(RN(...e))}configureServiceDiscovery(e){this.configureHttpClient("service_discovery",e.client)}}var ZF=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const HF=(t,e)=>ZF(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}),gS=y.createContext(null),OF=gS.Provider,yS=y.createContext({}),LF=yS.Provider,NF=()=>y.useContext(yS),DF=t=>NF()[t];var VF=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const FF=t=>y.lazy(()=>VF(void 0,void 0,void 0,function*(){const e=new $F;yield t(e);const r=yield HF(e);return{default:({children:n})=>_.jsx(OF,{value:r,children:_.jsx(LF,{value:r.modules,children:n})})}})),ln=()=>{let t=y.useContext(gS);return t||console.warn("could not locate fusion in context!"),t??(t=window.Fusion),t||console.error("Could not load framework, might not be initiated?"),t},_S=t=>{const r=ln().modules[t];return r||console.warn(`the requested module [${r}] is not included in the framework instance`),r},zF=t=>{const{configure:e,fallback:r,children:n}=t,i=y.useMemo(()=>FF(e),[e]);return _.jsx(y.Suspense,{fallback:r,children:_.jsx(i,{children:n})})};function ct(){return ct=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},ct.apply(this,arguments)}function fd(t){"@babel/helpers - typeof";return fd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fd(t)}function $v(t){return t&&fd(t)==="object"&&t.constructor===Object}function bS(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{clone:!0},n=r.clone?ct({},t):t;return $v(t)&&$v(e)&&Object.keys(e).forEach(function(i){i!=="__proto__"&&($v(e[i])&&i in t?n[i]=bS(t[i],e[i],r):n[i]=e[i])}),n}function jF(t,e){if(fd(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(fd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function UF(t){var e=jF(t,"string");return fd(e)=="symbol"?e:String(e)}var BF=typeof Symbol=="function"&&Symbol.for;const wS=BF?Symbol.for("mui.nested"):"__THEME_NESTED__";var qF=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];function WF(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.disableGlobal,r=e===void 0?!1:e,n=t.productionPrefix,i=n===void 0?"jss":n,o=t.seed,a=o===void 0?"":o,s=a===""?"":"".concat(a,"-"),c=0,l=function(){return c+=1,c};return function(d,u){var h=u.options.name;if(h&&h.indexOf("Mui")===0&&!u.options.link&&!r){if(qF.indexOf(d.key)!==-1)return"Mui-".concat(d.key);var f="".concat(s).concat(h,"-").concat(d.key);return!u.options.theme[wS]||a!==""?f:"".concat(f,"-").concat(l())}return"".concat(s).concat(i).concat(l())}}var b8=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_1=(typeof window>"u"?"undefined":b8(window))==="object"&&(typeof document>"u"?"undefined":b8(document))==="object"&&document.nodeType===9;function w8(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,UF(n.key),n)}}function xS(t,e,r){return e&&w8(t.prototype,e),r&&w8(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function X4(t,e){return X4=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},X4(t,e)}function CS(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,X4(t,e)}function x8(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ES(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,o;for(o=0;o<n.length;o++)i=n[o],!(e.indexOf(i)>=0)&&(r[i]=t[i]);return r}var GF={}.constructor;function J4(t){if(t==null||typeof t!="object")return t;if(Array.isArray(t))return t.map(J4);if(t.constructor!==GF)return t;var e={};for(var r in t)e[r]=J4(t[r]);return e}function Ry(t,e,r){t===void 0&&(t="unnamed");var n=r.jss,i=J4(e),o=n.plugins.onCreateRule(t,i,r);return o||(t[0],null)}var C8=function(e,r){for(var n="",i=0;i<e.length&&e[i]!=="!important";i++)n&&(n+=r),n+=e[i];return n},lc=function(e){if(!Array.isArray(e))return e;var r="";if(Array.isArray(e[0]))for(var n=0;n<e.length&&e[n]!=="!important";n++)r&&(r+=", "),r+=C8(e[n]," ");else r=C8(e,", ");return e[e.length-1]==="!important"&&(r+=" !important"),r};function $d(t){return t&&t.format===!1?{linebreak:"",space:""}:{linebreak:`
|
|
74
|
+
`));return e.currentContext?sn(e.currentContext):Pt},zN=t=>({ref:e,modules:r})=>{var n,i;const{context:o,navigation:a}=r,s=VN(o,t==null?void 0:t.path),c=(n=a==null?void 0:a.path.pathname)!==null&&n!==void 0?n:(i=e.navigation)===null||i===void 0?void 0:i.path.pathname;return Ql(c?s(c):Pt,FN({ref:e,modules:r})).pipe(WO())};var kf=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})},Yb=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)},xp;class jN{constructor(){this.defaultExpireTime=1*60*1e3,xp.set(this,[])}addConfigBuilder(e){Yb(this,xp,"f").push(e)}_getServiceProvider(e){return kf(this,void 0,void 0,function*(){var r;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 kf(this,void 0,void 0,function*(){var r,n;const i=yield Yb(this,xp,"f").reduce((o,a)=>kf(this,void 0,void 0,function*(){const s=new NN(e,yield o);return yield Promise.resolve(a(s)),Object.assign(o,s.config)}),Promise.resolve({}));return(r=i.resolveInitialContext)!==null&&r!==void 0||(i.resolveInitialContext=zN()),(n=i.client)!==null&&n!==void 0||(i.client=yield kf(this,void 0,void 0,function*(){const a=yield(yield this._getServiceProvider(e)).createContextClient("json$");return{get:{client:{fn:s=>a.get("v1",s,{selector:$N})},key:({id:s})=>s,expire:this.defaultExpireTime},query:{client:{fn:s=>a.query("v1",{query:s},{selector:ZN})},key:s=>JSON.stringify(s),expire:this.defaultExpireTime},related:{client:{fn:s=>a.related("v1",{id:s.item.id,query:{filter:s.filter}},{selector:HN})},key:s=>JSON.stringify(s),expire:this.defaultExpireTime}}})),i})}}xp=new WeakMap;var UN=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!t(e[i],r[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(o=Object.keys(e),n=o.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;i--!==0;){var a=o[i];if(!t(e[a],r[a]))return!1}return!0}return e!==e&&r!==r};const BN=r3(UN);var Qb;(function(t){t.IDLE="idle",t.ACTIVE="active",t.FAILED="failed",t.CANCELED="canceled"})(Qb||(Qb={}));const qN=t=>e=>e.pipe(M4(t)),WN=t=>e=>e.pipe(Nn(t)),GN=t=>e=>e.pipe(gt(t)),B4=t=>t.pipe(Ce(e=>e.value));let Sf;const KN=new Uint8Array(16);function YN(){if(!Sf&&(Sf=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Sf))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Sf(KN)}const QN=/^(?:[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 XN(t){return typeof t=="string"&&QN.test(t)}const Zr=[];for(let t=0;t<256;++t)Zr.push((t+256).toString(16).slice(1));function aS(t,e=0){return Zr[t[e+0]]+Zr[t[e+1]]+Zr[t[e+2]]+Zr[t[e+3]]+"-"+Zr[t[e+4]]+Zr[t[e+5]]+"-"+Zr[t[e+6]]+Zr[t[e+7]]+"-"+Zr[t[e+8]]+Zr[t[e+9]]+"-"+Zr[t[e+10]]+Zr[t[e+11]]+Zr[t[e+12]]+Zr[t[e+13]]+Zr[t[e+14]]+Zr[t[e+15]]}function JN(t){if(!XN(t))throw TypeError("Invalid UUID");let e;const 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 eD(t){t=unescape(encodeURIComponent(t));const e=[];for(let r=0;r<t.length;++r)e.push(t.charCodeAt(r));return e}const tD="6ba7b810-9dad-11d1-80b4-00c04fd430c8",rD="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function nD(t,e,r){function n(i,o,a,s){var c;if(typeof i=="string"&&(i=eD(i)),typeof o=="string"&&(o=JN(o)),((c=o)===null||c===void 0?void 0:c.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let l=new Uint8Array(16+i.length);if(l.set(o),l.set(i,o.length),l=r(l),l[6]=l[6]&15|e,l[8]=l[8]&63|128,a){s=s||0;for(let d=0;d<16;++d)a[s+d]=l[d];return a}return aS(l)}try{n.name=t}catch{}return n.DNS=tD,n.URL=rD,n}const iD=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Xb={randomUUID:iD};function U2(t,e,r){if(Xb.randomUUID&&!e&&!t)return Xb.randomUUID();t=t||{};const n=t.random||(t.rng||YN)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){r=r||0;for(let i=0;i<16;++i)e[r+i]=n[i];return e}return aS(n)}function oD(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 kv(t,e){return t<<e|t>>>32-e}function aD(t){const e=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof t=="string"){const a=unescape(encodeURIComponent(t));t=[];for(let s=0;s<a.length;++s)t.push(a.charCodeAt(s))}else Array.isArray(t)||(t=Array.prototype.slice.call(t));t.push(128);const n=t.length/4+2,i=Math.ceil(n/16),o=new Array(i);for(let a=0;a<i;++a){const s=new Uint32Array(16);for(let c=0;c<16;++c)s[c]=t[a*64+c*4]<<24|t[a*64+c*4+1]<<16|t[a*64+c*4+2]<<8|t[a*64+c*4+3];o[a]=s}o[i-1][14]=(t.length-1)*8/Math.pow(2,32),o[i-1][14]=Math.floor(o[i-1][14]),o[i-1][15]=(t.length-1)*8&4294967295;for(let a=0;a<i;++a){const s=new Uint32Array(80);for(let f=0;f<16;++f)s[f]=o[a][f];for(let f=16;f<80;++f)s[f]=kv(s[f-3]^s[f-8]^s[f-14]^s[f-16],1);let c=r[0],l=r[1],d=r[2],u=r[3],h=r[4];for(let f=0;f<80;++f){const p=Math.floor(f/20),m=kv(c,5)+oD(p,l,d,u)+h+e[p]+s[f]>>>0;h=u,u=d,d=kv(l,30)>>>0,l=c,c=m}r[0]=r[0]+c>>>0,r[1]=r[1]+l>>>0,r[2]=r[2]+d>>>0,r[3]=r[3]+u>>>0,r[4]=r[4]+h>>>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]}const sD=nD("v5",80,aD);class q4 extends Error{constructor(e,r){super(r.message,{cause:r.cause}),this.type=e,this.name="QueryClientError",this.request=r.request}}function Wn(t){for(var e=arguments.length,r=Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];throw Error("[Immer] minified error nr: "+t+(r.length?" "+r.map(function(i){return"'"+i+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function cs(t){return!!t&&!!t[tt]}function Qi(t){var e;return!!t&&(function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===gD}(t)||Array.isArray(t)||!!t[a8]||!!(!((e=t.constructor)===null||e===void 0)&&e[a8])||xy(t)||Cy(t))}function Jb(t){return cs(t)||Wn(23,t),t[tt].t}function hd(t,e,r){r===void 0&&(r=!1),Pd(t)===0?(r?Object.keys:Iy)(t).forEach(function(n){r&&typeof n=="symbol"||e(n,t[n],t)}):t.forEach(function(n,i){return e(i,n,t)})}function Pd(t){var e=t[tt];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:xy(t)?2:Cy(t)?3:0}function W4(t,e){return Pd(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function cD(t,e){return Pd(t)===2?t.get(e):t[e]}function sS(t,e,r){var n=Pd(t);n===2?t.set(e,r):n===3?t.add(r):t[e]=r}function lD(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function xy(t){return mD&&t instanceof Map}function Cy(t){return vD&&t instanceof Set}function Sr(t){return t.o||t.t}function Ey(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=yD(t);delete e[tt];for(var r=Iy(e),n=0;n<r.length;n++){var i=r[n],o=e[i];o.writable===!1&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(e[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:t[i]})}return Object.create(Object.getPrototypeOf(t),e)}function ky(t,e){return e===void 0&&(e=!1),Sy(t)||cs(t)||!Qi(t)||(Pd(t)>1&&(t.set=t.add=t.clear=t.delete=dD),Object.freeze(t),e&&hd(t,function(r,n){return ky(n,!0)},!0)),t}function dD(){Wn(2)}function Sy(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function ko(t){var e=K4[t];return e||Wn(18,t),e}function uD(t,e){K4[t]||(K4[t]=e)}function B2(){return Wh}function Sv(t,e){e&&(ko("Patches"),t.u=[],t.s=[],t.v=e)}function q2(t){G4(t),t.p.forEach(hD),t.p=null}function G4(t){t===Wh&&(Wh=t.l)}function e8(t){return Wh={p:[],l:Wh,h:t,m:!0,_:0}}function hD(t){var e=t[tt];e.i===0||e.i===1?e.j():e.g=!0}function Av(t,e){e._=e.p.length;var r=e.p[0],n=t!==void 0&&t!==r;return e.h.O||ko("ES5").S(e,t,n),n?(r[tt].P&&(q2(e),Wn(4)),Qi(t)&&(t=W2(e,t),e.l||G2(e,t)),e.u&&ko("Patches").M(r[tt].t,t,e.u,e.s)):t=W2(e,r,[]),q2(e),e.u&&e.v(e.u,e.s),t!==cS?t:void 0}function W2(t,e,r){if(Sy(e))return e;var n=e[tt];if(!n)return hd(e,function(s,c){return t8(t,n,e,s,c,r)},!0),e;if(n.A!==t)return e;if(!n.P)return G2(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=Ey(n.k):n.o,o=i,a=!1;n.i===3&&(o=new Set(i),i.clear(),a=!0),hd(o,function(s,c){return t8(t,n,i,s,c,r,a)}),G2(t,i,!1),r&&t.u&&ko("Patches").N(n,r,t.u,t.s)}return n.o}function t8(t,e,r,n,i,o,a){if(cs(i)){var s=W2(t,i,o&&e&&e.i!==3&&!W4(e.R,n)?o.concat(n):void 0);if(sS(r,n,s),!cs(s))return;t.m=!1}else a&&r.add(i);if(Qi(i)&&!Sy(i)){if(!t.h.D&&t._<1)return;W2(t,i),e&&e.A.l||G2(t,i)}}function G2(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&ky(e,r)}function Iv(t,e){var r=t[tt];return(r?Sr(r):t)[e]}function r8(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=Object.getPrototypeOf(r)}}function Wo(t){t.P||(t.P=!0,t.l&&Wo(t.l))}function Tv(t){t.o||(t.o=Ey(t.t))}function qh(t,e,r){var n=xy(e)?ko("MapSet").F(e,r):Cy(e)?ko("MapSet").T(e,r):t.O?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:B2(),P:!1,I:!1,R:{},l:o,t:i,k:null,o:null,j:null,C:!1},c=s,l=Y4;a&&(c=[s],l=Tu);var d=Proxy.revocable(c,l),u=d.revoke,h=d.proxy;return s.k=h,s.j=u,h}(e,r):ko("ES5").J(e,r);return(r?r.A:B2()).p.push(n),n}function fD(t){return cs(t)||Wn(22,t),function e(r){if(!Qi(r))return r;var n,i=r[tt],o=Pd(r);if(i){if(!i.P&&(i.i<4||!ko("ES5").K(i)))return i.t;i.I=!0,n=n8(r,o),i.I=!1}else n=n8(r,o);return hd(n,function(a,s){i&&cD(i.t,a)===s||sS(n,a,e(s))}),o===3?new Set(n):n}(t)}function n8(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Ey(t)}function pD(){function t(s,c){function l(){this.constructor=s}i(s,c),s.prototype=(l.prototype=c.prototype,new l)}function e(s){s.o||(s.R=new Map,s.o=new Map(s.t))}function r(s){s.o||(s.o=new Set,s.t.forEach(function(c){if(Qi(c)){var l=qh(s.A.h,c,s);s.p.set(c,l),s.o.add(l)}else s.o.add(c)}))}function n(s){s.g&&Wn(3,JSON.stringify(Sr(s)))}var i=function(s,c){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,d){l.__proto__=d}||function(l,d){for(var u in d)d.hasOwnProperty(u)&&(l[u]=d[u])})(s,c)},o=function(){function s(l,d){return this[tt]={i:2,l:d,A:d?d.A:B2(),P:!1,I:!1,o:void 0,R:void 0,t:l,k:this,C:!1,g:!1},this}t(s,Map);var c=s.prototype;return Object.defineProperty(c,"size",{get:function(){return Sr(this[tt]).size}}),c.has=function(l){return Sr(this[tt]).has(l)},c.set=function(l,d){var u=this[tt];return n(u),Sr(u).has(l)&&Sr(u).get(l)===d||(e(u),Wo(u),u.R.set(l,!0),u.o.set(l,d),u.R.set(l,!0)),this},c.delete=function(l){if(!this.has(l))return!1;var d=this[tt];return n(d),e(d),Wo(d),d.t.has(l)?d.R.set(l,!1):d.R.delete(l),d.o.delete(l),!0},c.clear=function(){var l=this[tt];n(l),Sr(l).size&&(e(l),Wo(l),l.R=new Map,hd(l.t,function(d){l.R.set(d,!1)}),l.o.clear())},c.forEach=function(l,d){var u=this;Sr(this[tt]).forEach(function(h,f){l.call(d,u.get(f),f,u)})},c.get=function(l){var d=this[tt];n(d);var u=Sr(d).get(l);if(d.I||!Qi(u)||u!==d.t.get(l))return u;var h=qh(d.A.h,u,d);return e(d),d.o.set(l,h),h},c.keys=function(){return Sr(this[tt]).keys()},c.values=function(){var l,d=this,u=this.keys();return(l={})[Af]=function(){return d.values()},l.next=function(){var h=u.next();return h.done?h:{done:!1,value:d.get(h.value)}},l},c.entries=function(){var l,d=this,u=this.keys();return(l={})[Af]=function(){return d.entries()},l.next=function(){var h=u.next();if(h.done)return h;var f=d.get(h.value);return{done:!1,value:[h.value,f]}},l},c[Af]=function(){return this.entries()},s}(),a=function(){function s(l,d){return this[tt]={i:3,l:d,A:d?d.A:B2(),P:!1,I:!1,o:void 0,t:l,k:this,p:new Map,g:!1,C:!1},this}t(s,Set);var c=s.prototype;return Object.defineProperty(c,"size",{get:function(){return Sr(this[tt]).size}}),c.has=function(l){var d=this[tt];return n(d),d.o?!!d.o.has(l)||!(!d.p.has(l)||!d.o.has(d.p.get(l))):d.t.has(l)},c.add=function(l){var d=this[tt];return n(d),this.has(l)||(r(d),Wo(d),d.o.add(l)),this},c.delete=function(l){if(!this.has(l))return!1;var d=this[tt];return n(d),r(d),Wo(d),d.o.delete(l)||!!d.p.has(l)&&d.o.delete(d.p.get(l))},c.clear=function(){var l=this[tt];n(l),Sr(l).size&&(r(l),Wo(l),l.o.clear())},c.values=function(){var l=this[tt];return n(l),r(l),l.o.values()},c.entries=function(){var l=this[tt];return n(l),r(l),l.o.entries()},c.keys=function(){return this.values()},c[Af]=function(){return this.values()},c.forEach=function(l,d){for(var u=this.values(),h=u.next();!h.done;)l.call(d,h.value,h.value,this),h=u.next()},s}();uD("MapSet",{F:function(s,c){return new o(s,c)},T:function(s,c){return new a(s,c)}})}var i8,Wh,Ay=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",mD=typeof Map<"u",vD=typeof Set<"u",o8=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",cS=Ay?Symbol.for("immer-nothing"):((i8={})["immer-nothing"]=!0,i8),a8=Ay?Symbol.for("immer-draftable"):"__$immer_draftable",tt=Ay?Symbol.for("immer-state"):"__$immer_state",Af=typeof Symbol<"u"&&Symbol.iterator||"@@iterator",gD=""+Object.prototype.constructor,Iy=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,yD=Object.getOwnPropertyDescriptors||function(t){var e={};return Iy(t).forEach(function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)}),e},K4={},Y4={get:function(t,e){if(e===tt)return t;var r=Sr(t);if(!W4(r,e))return function(i,o,a){var s,c=r8(o,a);return c?"value"in c?c.value:(s=c.get)===null||s===void 0?void 0:s.call(i.k):void 0}(t,r,e);var n=r[e];return t.I||!Qi(n)?n:n===Iv(t.t,e)?(Tv(t),t.o[e]=qh(t.A.h,n,t)):n},has:function(t,e){return e in Sr(t)},ownKeys:function(t){return Reflect.ownKeys(Sr(t))},set:function(t,e,r){var n=r8(Sr(t),e);if(n!=null&&n.set)return n.set.call(t.k,r),!0;if(!t.P){var i=Iv(Sr(t),e),o=i==null?void 0:i[tt];if(o&&o.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(lD(r,i)&&(r!==void 0||W4(t.t,e)))return!0;Tv(t),Wo(t)}return t.o[e]===r&&(r!==void 0||e in t.o)||Number.isNaN(r)&&Number.isNaN(t.o[e])||(t.o[e]=r,t.R[e]=!0),!0},deleteProperty:function(t,e){return Iv(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,Tv(t),Wo(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=Sr(t),n=Reflect.getOwnPropertyDescriptor(r,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:r[e]}},defineProperty:function(){Wn(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Wn(12)}},Tu={};hd(Y4,function(t,e){Tu[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),Tu.deleteProperty=function(t,e){return Tu.set.call(this,t,e,void 0)},Tu.set=function(t,e,r){return Y4.set.call(this,t[0],e,r,t[0])};var _D=function(){function t(r){var n=this;this.O=o8,this.D=!0,this.produce=function(i,o,a){if(typeof i=="function"&&typeof o!="function"){var s=o;o=i;var c=n;return function(m){var w=this;m===void 0&&(m=s);for(var g=arguments.length,v=Array(g>1?g-1:0),b=1;b<g;b++)v[b-1]=arguments[b];return c.produce(m,function(E){var k;return(k=o).call.apply(k,[w,E].concat(v))})}}var l;if(typeof o!="function"&&Wn(6),a!==void 0&&typeof a!="function"&&Wn(7),Qi(i)){var d=e8(n),u=qh(n,i,void 0),h=!0;try{l=o(u),h=!1}finally{h?q2(d):G4(d)}return typeof Promise<"u"&&l instanceof Promise?l.then(function(m){return Sv(d,a),Av(m,d)},function(m){throw q2(d),m}):(Sv(d,a),Av(l,d))}if(!i||typeof i!="object"){if((l=o(i))===void 0&&(l=i),l===cS&&(l=void 0),n.D&&ky(l,!0),a){var f=[],p=[];ko("Patches").M(i,l,f,p),a(f,p)}return l}Wn(21,i)},this.produceWithPatches=function(i,o){if(typeof i=="function")return function(l){for(var d=arguments.length,u=Array(d>1?d-1:0),h=1;h<d;h++)u[h-1]=arguments[h];return n.produceWithPatches(l,function(f){return i.apply(void 0,[f].concat(u))})};var a,s,c=n.produce(i,o,function(l,d){a=l,s=d});return typeof Promise<"u"&&c instanceof Promise?c.then(function(l){return[l,a,s]}):[c,a,s]},typeof(r==null?void 0:r.useProxies)=="boolean"&&this.setUseProxies(r.useProxies),typeof(r==null?void 0:r.autoFreeze)=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var e=t.prototype;return e.createDraft=function(r){Qi(r)||Wn(8),cs(r)&&(r=fD(r));var n=e8(this),i=qh(this,r,void 0);return i[tt].C=!0,G4(n),i},e.finishDraft=function(r,n){var i=r&&r[tt],o=i.A;return Sv(o,n),Av(void 0,o)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!o8&&Wn(20),this.O=r},e.applyPatches=function(r,n){var i;for(i=n.length-1;i>=0;i--){var o=n[i];if(o.path.length===0&&o.op==="replace"){r=o.value;break}}i>-1&&(n=n.slice(i+1));var a=ko("Patches").$;return cs(r)?a(r,n):this.produce(r,function(s){return a(s,n)})},t}(),ei=new _D,lS=ei.produce;ei.produceWithPatches.bind(ei);ei.setAutoFreeze.bind(ei);ei.setUseProxies.bind(ei);ei.applyPatches.bind(ei);ei.createDraft.bind(ei);ei.finishDraft.bind(ei);const Rd=(...t)=>Be(e=>t.includes(e.type));var Yr=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)},bD=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},so,Zi;class y1 extends Ne{get action$(){return Yr(this,so,"f").asObservable()}get value(){return Yr(this,Zi,"f").value}get closed(){return Yr(this,Zi,"f").closed||Yr(this,so,"f").closed}constructor(e,r){super(i=>Yr(this,Zi,"f").subscribe(i)),so.set(this,new on),Zi.set(this,void 0);const n="getInitialState"in e?e.getInitialState():r;bD(this,Zi,new Id(n),"f"),Yr(this,so,"f").pipe(Ok(e,n),Zk()).subscribe(Yr(this,Zi,"f")),this.reset=()=>Yr(this,Zi,"f").next(n)}next(e){Yr(this,so,"f").next(e)}addEffect(e,r){const n=typeof e=="string"?this.action$.pipe(Rd(e)):this.action$,i=r||e;return n.pipe(Nn(o=>Vt(new Promise((a,s)=>{try{a(i(o,this.value))}catch(c){s(c)}})).pipe(Ft(a=>(console.warn("unhandled effect",a),Pt)))),Be(o=>!!o),I2(A2)).subscribe(Yr(this,so,"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(Ft(n=>(console.trace("unhandled exception, epic closed!",n),Pt)),I2(A2)).subscribe(Yr(this,so,"f"))}unsubscribe(){Yr(this,so,"f").unsubscribe(),Yr(this,Zi,"f").unsubscribe()}complete(){Yr(this,so,"f").complete(),Yr(this,Zi,"f").complete()}asObservable(){return Yr(this,Zi,"f").asObservable()}}so=new WeakMap,Zi=new WeakMap;const dS=(t,e)=>Object.entries(t).reduce((r,[n,i])=>Object.assign(r,{[n]:typeof i=="function"?(...o)=>e.next(i(...o)):dS(i,e)}),{});function br(t,e){function r(...n){if(e){const i=e(...n);if(!i)throw new Error("prepareAction did not return an object");return Object.assign(Object.assign({type:t,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:t,payload:n[0]}}return r.toString=()=>`${t}`,r.type=t,r.match=n=>n.type===t,r}const Cp="::",Ty=t=>new RegExp(`${Cp}${t}$`),s8=t=>t.type.replace(Ty("\\w+$"),"");function vo(t,e,r,n){const i=br([t,"request"].join(Cp),e);return r&&Object.assign(i,{success:br([t,"success"].join(Cp),r)}),n&&Object.assign(i,{failure:br([t,"failure"].join(Cp),n)}),i}const wD=t=>!!t.type.match(/::request$/),xD=t=>!!t.type.match(Ty("success")),CD=t=>!!t.type.match(Ty("failure")),ED=t=>xD(t)||CD(t);function c8(t){return Qi(t)?lS(t,()=>{}):t}function kD(t){return typeof t=="function"}function Md(t,e){const[r,n,i]=SD(e);let o;if(kD(t))o=()=>c8(t());else{const s=c8(t);o=()=>s}function a(s=o(),c){let l=[r[c.type],...n.filter(({matcher:d})=>d(c)).map(({reducer:d})=>d)];return l.filter(d=>!!d).length===0&&(l=[i]),l.reduce((d,u)=>{if(u)if(cs(d)){const f=u(d,c);return f===void 0?d:f}else{if(Qi(d))return lS(d,h=>u(h,c));{const h=u(d,c);if(h===void 0){if(d===null)return d;throw Error("A case reducer on a non-draftable value must not return undefined")}return h}}return d},s)}return a.getInitialState=o,a}function SD(t){const e={},r=[];let n;const i={addCase(o,a){const s=typeof o=="string"?o:o.type;if(s in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[s]=a,i},addMatcher(o,a){return r.push({matcher:o,reducer:a}),i},addDefaultCase(o){return n=o,i}};return t(i),[e,r,n]}function AD(t,e){const r=typeof e=="function"?e:Md(e.initial,o=>e.builder(o,t)),n=new y1(r),i=dS(t,n);return{actions:t,dispatch:i,subject:n}}const ID=()=>({request:br("client/request",(e,r)=>{var n,i,o;return r??(r={}),(n=r.transaction)!==null&&n!==void 0||(r.transaction=U2()),(i=r.created)!==null&&i!==void 0||(r.created=Date.now()),(o=r.task)!==null&&o!==void 0||(r.task=new fk),{payload:e,meta:r}}),retry:br("client/retry",e=>({payload:e})),success:br("client/success",(e,r)=>({payload:e,meta:r})),cancel:br("client/cancel",e=>({payload:e})),failure:br("client/failure",(e,r)=>({payload:e,meta:r})),error:br("client/error",(e,r)=>({payload:e,meta:r}))}),Tr=ID(),uS=t=>e=>e.pipe(Be(Tr.request.match),Nn(r=>{const{meta:n}=r,{transaction:i}=n,o=new AbortController,{signal:a}=o;return new Ne(s=>{s.add(e.pipe(Be(Tr.cancel.match)).subscribe(c=>{c.payload.transaction===i&&(a.aborted||o.abort(),s.complete())})),s.add(Vt(t(r,a)).subscribe({next:c=>s.next(c),error:c=>s.next(Tr.error(c,{request:r})),complete:()=>s.complete()}))})})),TD=t=>(t=Object.assign({},{count:0,delay:0},t),(e,r)=>e.pipe(uS(n=>e.pipe(Be(Tr.failure.match),Be(i=>i.meta.request===n),fy(r),gt(([i,o])=>{var a,s;const{transaction:c}=n.meta,l=o[c];if(!l)return Pt;const d=(s=(a=l.retry)===null||a===void 0?void 0:a.length)!==null&&s!==void 0?s:0,u=Object.assign({},t,n.meta.retry);if(d>=u.count)throw u.count?Error("maximum retries executed!",{cause:i.payload}):i.payload;return(typeof u.delay=="function"?Vt(u.delay(i.payload.cause)).pipe(Ft(f=>{throw Error("failed to resolve delay",{cause:f})})):jO(u.delay)).pipe(Ce(()=>Tr.retry(n)))}))))),PD=t=>e=>e.pipe(uS((r,n)=>Vt(t(r.payload,n)).pipe(Ce(i=>Tr.success(i,{request:r})),Ft(i=>sn(Tr.failure(Error(`failed to execute request for transaction ${r.meta.transaction}`,{cause:i}),{request:r})))))),RD=t=>t.pipe(Be(Tr.retry.match),Ce(e=>e.payload)),hS=()=>Be(t=>t.status==="complete"),MD=(t={})=>Md(t,e=>e.addCase(Tr.request,(r,n)=>{const{transaction:i,task:o,ref:a,created:s}=n.meta;r[i]={transaction:i,task:o,ref:a,created:s}}).addCase(Tr.success,(r,n)=>{const{request:i}=n.meta,{transaction:o,ref:a}=i.meta,s=r[o];if(s){const c={status:"complete",transaction:o,ref:a,value:n.payload,args:i.payload,created:s.created,completed:Date.now()};s.task.next(c),s.task.complete()}delete r[o]}).addCase(Tr.retry,(r,n)=>{var i;const{transaction:o}=n.payload.meta,a=r[o];a&&((i=a.retry)!==null&&i!==void 0||(a.retry=[]),a.retry.push(Date.now()))}).addCase(Tr.cancel,(r,n)=>{const{transaction:i,reason:o}=n.payload;if(r[i]){const a=Object.assign({},Jb(r[i]));a.task.error(new q4("abort",{request:a,message:o??"request was canceled"})),delete r[i]}}).addCase(Tr.failure,(r,n)=>{var i;const{payload:o,meta:a}=n,{transaction:s}=a.request.meta,c=r[s];c&&((i=c.errors)!==null&&i!==void 0||(c.errors=[]),c.errors.push(o))}).addCase(Tr.error,(r,n)=>{const{payload:i,meta:o}=n,{transaction:a}=o.request.meta;if(r[a]){const s=Object.assign({},Jb(r[a]));s.task.error(new q4("error",{request:s,message:`failed to process task [${a}]`,cause:i.cause})),delete r[a]}}));var $D=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})},qt=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)},l8=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},nr,Zs;class d8 extends Ne{get closed(){return qt(this,nr,"f").closed}get state$(){return qt(this,nr,"f")}get action$(){return qt(this,nr,"f").action$}get success$(){return this.action$.pipe(Be(Tr.success.match),Ce(({payload:e})=>e))}get error$(){return this.action$.pipe(Rd("client/error"),fy(qt(this,nr,"f")),Ce(([e,r])=>{const{payload:n,meta:i}=e,{transaction:o}=i.request.meta,a=r[e.meta.request.meta.transaction];return new q4("error",{request:a,message:`failed to process task [${o}]`,cause:n})}))}constructor(e,r){super(o=>qt(this,nr,"f").subscribe(o)),nr.set(this,void 0),Zs.set(this,void 0);const n={};l8(this,nr,new y1(MD(n)),"f"),l8(this,Zs,new Rr(()=>qt(this,nr,"f").complete()),"f"),qt(this,Zs,"f").add(qt(this,nr,"f").addFlow(PD(e))),qt(this,Zs,"f").add(qt(this,nr,"f").addFlow(RD));const i=Object.assign({count:0,delay:0},r==null?void 0:r.retry);qt(this,Zs,"f").add(qt(this,nr,"f").addFlow(TD(i)))}next(e,r){const{ref:n,retry:i,task:o}=r??{},a=Tr.request(e,{ref:n,retry:i,task:o});return qt(this,nr,"f").next(a),a.meta}nextAsync(e,r){return $D(this,void 0,void 0,function*(){return Lr(this.next(e,r).task.pipe(hS()))})}getTaskByTransaction(e){const r=qt(this,nr,"f").value[e];return r==null?void 0:r.task}getTaskByRef(e){const r=Object.values(qt(this,nr,"f").value).find(n=>n.ref===e);return r==null?void 0:r.task}cancelTaskByRef(e,r){const n=Object.values(qt(this,nr,"f").value).find(i=>i.ref===e);n!=null&&n.ref&&this.cancel(n.transaction,r)}cancel(e,r){if(e)qt(this,nr,"f").value[e]&&(r??(r=`[${e}]: transaction canceled`),qt(this,nr,"f").next(Tr.cancel({transaction:e,reason:r})));else for(const n of Object.keys(qt(this,nr,"f").value))this.cancel(n,"all transactions canceled")}on(e,r){return qt(this,nr,"f").addEffect(Tr[e].type,n=>{r(n,this)})}complete(){qt(this,Zs,"f").unsubscribe()}asObservable(){return qt(this,nr,"f").asObservable()}}nr=new WeakMap,Zs=new WeakMap;function ZD(){return{set:br("cache/set",(t,e)=>({payload:{key:t,entry:e}})),remove:br("cache/remove",t=>({payload:t})),invalidate:br("cache/invalidate",t=>({payload:t})),trim:br("cache/trim",t=>({payload:t}))}}const Kc=ZD(),HD=(t,e)=>{var r,n;return((r=e.updated)!==null&&r!==void 0?r:0)-((n=t.updated)!==null&&n!==void 0?n:0)};function OD(t,e={}){return Md(e,r=>r.addCase(t.set,(n,i)=>{var o;const{key:a,entry:s}=i.payload,c=n[a];if(c)c.updated=Date.now(),(o=c.updates)!==null&&o!==void 0||(c.updates=0),c.updates++;else{const l=Date.now();n[a]=Object.assign(Object.assign({},s),{created:l,updated:l})}}).addCase(t.remove,(n,i)=>{delete n[i.payload]}).addCase(t.invalidate,(n,i)=>{const o=n[i.payload];o&&delete o.updated}).addCase(t.trim,(n,i)=>{var o,a;const{payload:s}=i,c=(o=s.sort)!==null&&o!==void 0?o:HD,l=Object.keys(n),d=Object.entries(n).filter(([u,h])=>!s.validate||s.validate(h)).sort((u,h)=>c(u[1],h[1])).slice(0,(a=s.size)!==null&&a!==void 0?a:Number.MAX_SAFE_INTEGER).map(([u])=>u);if(l.length!==d.length)for(const u of l){const h=d.indexOf(u);h!==-1?d.splice(h,1):delete n[u]}}))}var Mi=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)},LD=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Tn;class u8{get state(){return Mi(this,Tn,"f").value}get state$(){return Mi(this,Tn,"f").asObservable()}constructor(e){Tn.set(this,void 0);const{trimming:r,initial:n}=e??{};LD(this,Tn,new y1(OD(Kc,n)),"f"),r&&Mi(this,Tn,"f").addEffect("cache/set",()=>Mi(this,Tn,"f").next(Kc.trim(r)))}setItem(...e){Mi(this,Tn,"f").next(Kc.set(...e))}getItem(e){return Mi(this,Tn,"f").value[e]}removeItem(e){Mi(this,Tn,"f").next(Kc.remove(e))}invalidate(e){Mi(this,Tn,"f").next(Kc.invalidate(e))}trim(e){Mi(this,Tn,"f").next(Kc.trim(e))}reset(){Mi(this,Tn,"f").reset()}complete(){Mi(this,Tn,"f").complete()}}Tn=new WeakMap;var mt=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)},Yc=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},ND=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 i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r},Hs,co,Ia,ul,hl,Pu,Ep,Q4;const DD=(t=0)=>e=>{var r;return((r=e.updated)!==null&&r!==void 0?r:0)+t>Date.now()},VD=t=>{if(typeof t=="function")return t;switch(t){case"concat":return qN;case"merge":return WN;case"switch":default:return GN}};class Or{get client(){return mt(this,co,"f")}get cache(){return mt(this,Ia,"f")}constructor(e){var r;Hs.set(this,new Rr),co.set(this,void 0),Ia.set(this,void 0),ul.set(this,new on),hl.set(this,{}),Pu.set(this,void 0),Ep.set(this,void 0),Q4.set(this,U2()),Yc(this,Pu,i=>sD(e.key(i),mt(this,Q4,"f")),"f"),Yc(this,Ep,(r=e==null?void 0:e.validate)!==null&&r!==void 0?r:DD(e==null?void 0:e.expire),"f"),e.client instanceof d8?Yc(this,co,e.client,"f"):(Yc(this,co,new d8(e.client.fn,e.client.options),"f"),mt(this,Hs,"f").add(()=>mt(this,co,"f").complete())),e.cache instanceof u8?Yc(this,Ia,e.cache,"f"):(Yc(this,Ia,new u8(e.cache||{}),"f"),mt(this,Hs,"f").add(()=>mt(this,Ia,"f").complete()));const n=VD(e.queueOperator);mt(this,Hs,"f").add(()=>mt(this,ul,"f").complete()),mt(this,Hs,"f").add(mt(this,ul,"f").pipe(n(i=>{const{args:o,options:a}=i;return new Ne(s=>{const{task:c,transaction:l}=mt(this,co,"f").next(o,a);s.add(c.pipe(Ft(()=>Pt)).subscribe(s)),s.add(()=>{setTimeout(()=>mt(this,co,"f").cancel(l))})})}),hS(),Lk(()=>!mt(this,co,"f").closed)).subscribe(i=>{const{args:o,value:a,transaction:s,ref:c}=i,l=c??mt(this,Pu,"f").call(this,o);mt(this,Ia,"f").setItem(l,{value:a,args:o,transaction:s})}))}next(e,r){mt(this,ul,"f").next({args:e,options:r})}query(e,r){return this._query(e,r)}queryAsync(e,r){const n=r||{},{awaitResolve:i}=n,o=ND(n,["awaitResolve"]);return(i?fr:Lr)(this._query(e,o))}complete(){mt(this,Hs,"f").unsubscribe()}_query(e,r){const n=mt(this,Pu,"f").call(this,e),i=this._createTask(n,e,r);return r!=null&&r.signal&&r.signal.addEventListener("abort",()=>{mt(this,co,"f").cancelTaskByRef(n,"abort signal triggered by caller")}),i}_createTask(e,r,n){const i=new on,o=new Ne(a=>{var s;if(!mt(this,hl,"f")[e])mt(this,hl,"f")[e]=o;else return mt(this,hl,"f")[e].subscribe(a);i.pipe(P2(()=>{delete mt(this,hl,"f")[e]})).subscribe(a);const c=mt(this,Ia,"f").getItem(e);c&&i.next(Object.assign(Object.assign({},c),{status:"cache"}));const l=((s=n==null?void 0:n.cache)===null||s===void 0?void 0:s.validate)||mt(this,Ep,"f");c&&l(c,r)?i.complete():mt(this,ul,"f").next({args:r,options:{ref:e,task:i,retry:n==null?void 0:n.retry}})}).pipe(YO());return o}}Hs=new WeakMap,co=new WeakMap,Ia=new WeakMap,ul=new WeakMap,hl=new WeakMap,Pu=new WeakMap,Ep=new WeakMap,Q4=new WeakMap;Or.extractQueryValue=B4;var Ca=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)},h8=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Ru,No;class FD extends Ne{get currentContext(){return Ca(this,No,"f").value}get currentContext$(){return Ca(this,No,"f").asObservable()}get client(){return Ca(this,Ru,"f")}constructor(e){super(r=>Ca(this,No,"f").subscribe(r)),Ru.set(this,void 0),No.set(this,void 0),h8(this,Ru,new Or(e),"f"),h8(this,No,new Id(void 0),"f")}setCurrentContext(e){typeof e=="string"?this.resolveContext(e).pipe(Ft(()=>Pt)).subscribe(r=>this.setCurrentContext(r)):BN(e,Ca(this,No,"f").value)||Ca(this,No,"f").next(e)}resolveContext(e){return Ca(this,Ru,"f").query({id:e}).pipe(Ce(r=>r.value),Ft(r=>{throw r.cause?r.cause:r}))}resolveContextAsync(e,r){return(r!=null&&r.awaitResolve?fr:Lr)(this.resolveContext(e))}dispose(){Ca(this,No,"f").complete()}}Ru=new WeakMap,No=new WeakMap;var ou=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})},et=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)},Es=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Do,kp,Mu,Hi,Os,Ls,$u,Sp,Ap;let zD=class{get contextClient(){return et(this,Do,"f")}get queryClient(){return et(this,kp,"f")}get currentContext$(){return et(this,Do,"f").currentContext$}get currentContext(){return et(this,Do,"f").currentContext}set currentContext(e){if(console.warn("@deprecated","ContextProvider.currentContext","use setCurrentContextById|setCurrentContext|clearCurrentContext"),e===void 0)throw Error("not allowed to set current context as undefined undefined!");this.setCurrentContextAsync(e)}constructor(e){var r,n,i;Do.set(this,void 0),kp.set(this,void 0),Mu.set(this,void 0),Hi.set(this,void 0),Os.set(this,new Rr),Ls.set(this,void 0),$u.set(this,void 0),Sp.set(this,void 0),Ap.set(this,new on);const{config:o,event:a}=e;e.parentContext&&console.warn("@deprecated","parentContext as arg is deprecated, use ContextProvider.connectParentContext"),Es(this,Hi,a,"f"),o.resolveContext&&(this.resolveContext=(r=o.resolveContext)===null||r===void 0?void 0:r.bind(this)),o.validateContext&&(this.validateContext=(n=o.validateContext)===null||n===void 0?void 0:n.bind(this)),Es(this,Ls,o.contextType,"f"),Es(this,$u,o.contextFilter,"f"),Es(this,Do,new FD(o.client.get),"f"),Es(this,kp,new Or(o.client.query),"f"),o.client.related&&Es(this,Mu,new Or(o.client.related),"f"),Es(this,Sp,(i=o.contextParameterFn)!==null&&i!==void 0?i:s=>({search:s.search,filter:{type:s.type}}),"f"),et(this,Hi,"f")&&(et(this,Os,"f").add(this.currentContext$.pipe(R2()).subscribe(([s,c])=>{var l;(l=et(this,Hi,"f"))===null||l===void 0||l.dispatchEvent("onCurrentContextChanged",{source:this,canBubble:!0,detail:{previous:s,next:c}})})),et(this,Os,"f").add(et(this,Hi,"f").addEventListener("onCurrentContextChanged",s=>{s.source!==this&&s.detail.next!==void 0&&this.setCurrentContext(s.detail.next)}))),et(this,Os,"f").add(et(this,Ap,"f").pipe(gt(s=>s),ld(s=>console.debug("ContextProvider::#contextQueue",s))).subscribe(s=>{et(this,Do,"f").setCurrentContext(s??null)}))}connectParentContext(e,r){const i=e.currentContext$.pipe(Be(o=>o!==void 0),Be((o,a)=>{var s;return r!=null&&r.skipFirst&&a<=1?(console.debug("ContextProvider::connectParentContext","skipping first item",o),!1):((s=this.currentContext)===null||s===void 0?void 0:s.id)!==(o==null?void 0:o.id)}),gt(o=>ou(this,void 0,void 0,function*(){var a;if(!o)return{next:o};const s=yield(a=et(this,Hi,"f"))===null||a===void 0?void 0:a.dispatchEvent("onParentContextChanged",{source:this,detail:o,cancelable:!0});return{next:o,canceled:s==null?void 0:s.canceled}})),Be(o=>!o.canceled),gt(({next:o})=>this.setCurrentContext(o,{validate:!0,resolve:!0}).pipe(Ft(a=>(console.warn("ContextProvider::onParentContextChanged","setCurrentContext",a),Pt)))),Ft(o=>(console.warn("ContextProvider::onParentContextChanged","unhandled exception",o),Pt))).subscribe();return et(this,Os,"f").add(i),i}setCurrentContextById(e){return new Ne(r=>{try{et(this,Do,"f").resolveContext(e).pipe(Be(n=>!!n),gt(n=>this.setCurrentContext(n))).subscribe(r)}catch(n){r.error(n)}})}setCurrentContextByIdAsync(e){return fr(this.setCurrentContextById(e))}setCurrentContext(e,r){const n=new on,i=new on,o=this._setCurrentContext(e,r).pipe(ld(a=>i.next(a)),Xl(n),P2(()=>i.complete()),Ft(a=>(i.error(a),Pt)));return et(this,Ap,"f").next(o),i.pipe(P2(()=>n.next(!0)))}_setCurrentContext(e,r){return new Ne(n=>{var i;if(e===this.currentContext)return n.next(e),n.complete();if(e&&(r!=null&&r.validate)&&!this.validateContext(e)){if(!r.resolve)return(i=et(this,Hi,"f"))===null||i===void 0||i.dispatchEvent("onSetContextValidationFailed",{source:this,detail:{context:e}}),n.error(Error("failed to validate provided context"));if(r.resolve)return sn(e).pipe(gt(o=>ou(this,void 0,void 0,function*(){var a;const s=yield(a=et(this,Hi,"f"))===null||a===void 0?void 0:a.dispatchEvent("onSetContextResolve",{source:this,cancelable:!0,detail:{context:o}});if(s!=null&&s.canceled)throw Error("resolving of context was canceled");return o})),gt(o=>this.resolveContext(o).pipe(Ce(a=>({context:o,resolved:a})))),gt(o=>ou(this,[o],void 0,function*({context:a,resolved:s}){var c;const l=yield(c=et(this,Hi,"f"))===null||c===void 0?void 0:c.dispatchEvent("onSetContextResolved",{source:this,cancelable:!0,detail:{context:a,resolved:s}});if(l!=null&&l.canceled)throw Error("resolving of context was canceled");return s})),gt(o=>this._setCurrentContext(o))).subscribe(n)}return sn(e).pipe(gt(o=>ou(this,void 0,void 0,function*(){var a;const s=yield(a=et(this,Hi,"f"))===null||a===void 0?void 0:a.dispatchEvent("onCurrentContextChange",{source:this,canBubble:!0,cancelable:!0,detail:{context:o}});if(s!=null&&s.canceled)throw Error("change of context was aborted");return o}))).subscribe(o=>{n.next(o),n.complete()})})}setCurrentContextAsync(e,r){return ou(this,void 0,void 0,function*(){return fr(this.setCurrentContext(e,r))})}queryContext(e){const r=this.queryClient.query(et(this,Sp,"f").call(this,{search:e,type:et(this,Ls,"f")})).pipe(Ft(n=>{throw n.name==="QueryClientError"?n.cause:n}),Ce(n=>n.value));return et(this,$u,"f")?r.pipe(Ce(et(this,$u,"f"))):r}queryContextAsync(e){return fr(this.queryContext(e))}validateContext(e){return et(this,Ls,"f")?et(this,Ls,"f").map(r=>r.toLowerCase()).includes(e.type.id.toLowerCase()):!0}resolveContext(e){return this.relatedContexts({item:e,filter:{type:et(this,Ls,"f")}}).pipe(Ce(r=>r.filter(n=>this.validateContext(n))),Ce(r=>{const n=r.shift();if(!n)throw Error("failed to resolve context");return r.length&&console.warn("ContextProvider::relatedContext","multiple items found 🤣",r),n}))}resolveContextAsync(e){return fr(this.resolveContext(e))}relatedContexts(e){return et(this,Mu,"f")?et(this,Mu,"f").query(e).pipe(Ce(({value:r})=>r),Ft(r=>{throw r.cause?r.cause:r})):Ak(()=>Error("ContextProvider::relatedContexts - no client defined for resolving related context"))}relatedContextsAsync(e){return fr(this.relatedContexts(e))}clearCurrentContext(){this.setCurrentContext(null)}dispose(){et(this,Os,"f").unsubscribe(),et(this,Do,"f").dispose()}};Do=new WeakMap,kp=new WeakMap,Mu=new WeakMap,Hi=new WeakMap,Os=new WeakMap,Ls=new WeakMap,$u=new WeakMap,Sp=new WeakMap,Ap=new WeakMap;var jD=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const UD="context",BD={name:UD,configure:()=>new jN,initialize:function(t){return jD(this,void 0,void 0,function*(){var e;const r=yield t.config.createConfig(t),n=t.hasModule("event")?yield t.requireInstance("event"):void 0,i=(e=t.ref)===null||e===void 0?void 0:e.context,o=new zD({config:r,event:n,parentContext:i}),a=new Rr(()=>o.dispose());return this.postInitialize=s=>new Ne(c=>{const l=r.resolveInitialContext?Vt(r.resolveInitialContext(s)).pipe(Be(d=>!!d),gt(d=>s.modules.context.setCurrentContext(d,{validate:!0,resolve:!0}))):Pt;c.add(l.pipe(Ft(d=>(console.warn("ContextModule.postInitialize","failed to resolve initial context",d),Pt))).subscribe({next:d=>{console.debug("ContextModule.postInitialize",`initial context was resolved to [${d?d.id:"none"}]`,d)},complete:()=>{r.connectParentContext!==!1&&i&&o.connectParentContext(i),c.complete()}}))}),this.dispose=()=>a.unsubscribe(),o})}};var f8=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};class qD{constructor(e){this.clientKey=e.clientKey,this.endpoint=e.endpoint,this.clientCtor=e.clientCtor}createHttpClientClient(e){return f8(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 f8(this,void 0,void 0,function*(){if(!this.endpoint)throw Error("no endpoint defined!");return new this.clientCtor({http:e,endpoint:this.endpoint})})}}var Pv=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};class WD{constructor(e,r){this._client=e,this._http=r}get environment(){return this._client.environment}resolveServices(){return this._client.fetchEnvironment()}resolveService(e){return Pv(this,void 0,void 0,function*(){return this._client.resolveService(e)})}createClient(e,r){return Pv(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 Pv(this,void 0,void 0,function*(){const{key:n,alias:i}=typeof e=="string"?{key:e,alias:e}:e,{uri:o,defaultScopes:a}=yield this.resolveService(n);r.addConfig(zk(i,{baseUri:o,defaultScopes:a}))})}}var Rv=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})},p8=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)},GD=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Zu;const m8="services";class KD{get environment(){var e;const r=(e=p8(this,Zu,"f").cache.getItem(m8))===null||e===void 0?void 0:e.value;if(!r)throw Error("no cached environment found");return r}constructor({http:e,endpoint:r}){Zu.set(this,void 0),this.http=e,this.endpoint=r,GD(this,Zu,new Or({client:{fn:()=>e.fetch$(r,{selector:this.selector.bind(this)})},key:()=>m8,expire:5*60*1e3}),"f")}fetchEnvironment(){return Rv(this,void 0,void 0,function*(){return Lr(Or.extractQueryValue(p8(this,Zu,"f").query(void 0,{cache:{suppressInvalid:!0}})))})}selector(e){return Rv(this,void 0,void 0,function*(){const r=yield e.json(),n=r.services.reduce((i,o)=>{var a;return Object.assign(i,{[o.key]:{clientId:r.clientId,uri:o.uri,defaultScopes:(a=o.defaultScopes)!==null&&a!==void 0?a:[r.clientId+"/.default"]}})},{});return Object.assign(Object.assign({},r),{services:n})})}resolveService(e){return Rv(this,void 0,void 0,function*(){try{const{services:r}=yield this.fetchEnvironment();return r[e]}catch(r){throw console.error(r),r}})}}Zu=new WeakMap;const YD="serviceDiscovery";var QD=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const XD={name:YD,configure:()=>new qD({clientCtor:KD,clientKey:"service_discovery",endpoint:"/_discovery/environments/current"}),initialize:t=>QD(void 0,[t],void 0,function*({config:e,requireInstance:r}){const n=yield r("http"),i=yield e.createHttpClientClient(n),o=yield e.createClient(i);return new WD(o,n)})};class JD{}var bi;(function(t){t.v1="1.0",t.v2="2.0"})(bi||(bi={}));class oi extends Error{constructor(e,r){super(`unsupported version ${e}`,{cause:r}),this.version=e}}const eV=(t,e)=>{var r;const n=(r=bi[t])!==null&&r!==void 0?r:t;switch(n){case bi.v2:throw new oi(t);case bi.v1:default:{const{id:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/contexts/${i}/?${String(o)}`}}},tV=(t,e,r)=>[eV(t,e),r],rV=(t,e,r="json")=>(n,i)=>t[r](...tV(e,n,i));var nV=["eq","ne","gt","ge","lt","le"],If=["and","or","not"],iV=["any","all"],oV=["startswith","endswith","contains"],aV=["expand","levels","select","skip","top","count","orderby","filter"],v8=/\((.*)\)/,g8=/(?!indexof)\((\w+)\)/,y8;(function(t){t.sum="sum",t.min="min",t.max="max",t.average="average",t.countdistinct="countdistinct"})(y8||(y8={}));var Oo="";function fS(t){var e=t===void 0?{}:t,r=e.select,n=e.search,i=e.skiptoken,o=e.format,a=e.top,s=e.skip,c=e.filter,l=e.transform,d=e.orderBy,u=e.key,h=e.count,f=e.expand,p=e.action,m=e.func,w="",g=[],v={};if(u!=null&&(w+="(".concat(bo(u,g),")")),(c||typeof h=="object")&&(v.$filter=Gh(typeof h=="object"?h:c,g)),l&&(v.$apply=pS(l)),f&&(v.$expand=Ip(f)),d&&(v.$orderby=Py(d)),h&&(typeof h=="boolean"?v.$count=!0:w+="/$count"),typeof a=="number"&&(v.$top=a),typeof s=="number"&&(v.$skip=s),p&&(w+="/".concat(p)),m){if(typeof m=="string")w+="/".concat(m);else if(typeof m=="object"){var b=Object.keys(m)[0],E=bo(m[b],g);w+="/".concat(b),E!==""&&(w+="(".concat(E,")"))}}return g.length>0&&Object.assign(v,g.reduce(function(k,x){var S;return Object.assign(k,(S={},S["@".concat(x.name)]=bo(x.value),S))},{})),uV(w,pr({$select:r,$search:n,$skiptoken:i,$format:o},v))}function Mv(t,e,r){return r===void 0&&(r=[]),"".concat(t," eq ").concat(bo(e,r))}function Gh(t,e,r){return t===void 0&&(t={}),e===void 0&&(e=[]),r===void 0&&(r=""),(Array.isArray(t)?t:[t]).reduce(function(o,a){if(a){var s=n(a,e,r);s&&o.push(s)}return o},[]).join(" and ");function n(o,a,s){o===void 0&&(o={}),a===void 0&&(a=[]),s===void 0&&(s="");var c="";if(typeof o=="string")c=o;else if(o&&typeof o=="object"){var l=Object.keys(o).reduce(function(d,u){var h=o[u];if(h===void 0)return d;var f="";if(s?u===Oo?f=s:g8.test(u)?f=u.replace(g8,function(v,b){return b.trim()===Oo?"(".concat(s,")"):"(".concat(s,"/").concat(b.trim(),")")}):v8.test(u)?f=u.replace(v8,function(v,b){return b.trim()===Oo?"(".concat(s,")"):"(".concat(s,"/").concat(b.trim(),")")}):f="".concat(s,"/").concat(u):f=u,u===Oo&&Array.isArray(h))return d.concat(h.map(function(v){return Mv(f,v)}));if(["number","string","boolean"].indexOf(typeof h)!==-1||h instanceof Date||h===null)d.push(Mv(f,h,a));else if(Array.isArray(h)){var p=u,m=h.map(function(v){return Gh(v,a,s)}).filter(function(v){return v}).map(function(v){return If.indexOf(p)!==-1?"(".concat(v,")"):v});m.length&&(If.indexOf(p)!==-1?m.length&&(p==="not"?d.push(_8(m)):d.push("(".concat(m.join(" ".concat(p," ")),")"))):d.push(m.join(" ".concat(p," "))))}else if(If.indexOf(f)!==-1){var w=f,m=Object.keys(h).map(function(b){var E;return n((E={},E[b]=h[b],E))});m.length&&(w==="not"?d.push(_8(m)):d.push("(".concat(m.join(" ".concat(w," ")),")")))}else if(typeof h=="object")if("type"in h)d.push(Mv(f,h,a));else{var g=Object.keys(h);g.forEach(function(v){if(h[v]!==void 0)if(nV.indexOf(v)!==-1)d.push("".concat(f," ").concat(v," ").concat(bo(h[v],a)));else if(If.indexOf(v)!==-1)Array.isArray(h[v])?d.push(h[v].map(function(x){return"("+n(x,a,f)+")"}).join(" ".concat(v," "))):d.push("("+n(h[v],a,f)+")");else if(iV.indexOf(v)!==-1){var b=i(u.toLowerCase(),h[v],v,f);b&&d.push(b)}else if(v==="has")d.push("".concat(f," ").concat(v," ").concat(bo(h[v],a)));else if(v==="in"){var E=Array.isArray(h[v])?h[v]:h[v].value.map(function(x){return{type:h[v].type,value:x}});d.push(f+" in ("+E.map(function(x){return bo(x,a)}).join(",")+")")}else if(oV.indexOf(v)!==-1)d.push("".concat(v,"(").concat(f,",").concat(bo(h[v],a),")"));else{var k=n(h,a,f);k&&d.push(k)}})}else throw new Error("Unexpected value type: ".concat(h));return d},[]);c=l.join(" and ")}return c}function i(o,a,s,c){var l="";if(typeof a=="string"||a instanceof String)l=sV(o,a,s,c);else if(a){var d=Array.isArray(a)?a.reduce(function(h,f){return f.hasOwnProperty(Oo)?(h.hasOwnProperty(Oo)||(h[Oo]=[]),h[Oo].push(f[Oo]),h):pr(pr({},h),f)},{}):a,u=n(d,e,o);l="".concat(c,"/").concat(s,"(").concat(u?"".concat(o,":").concat(u):"",")")}return l}}function sV(t,e,r,n){var i="",o=r=="all"?"ne":"eq";return i="".concat(n,"/").concat(r,"(").concat(t,": ").concat(t," ").concat(o," '").concat(e,"')"),i}function cV(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 bo(t,e){if(typeof t=="string")return"'".concat(cV(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 bo(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],i=r[1];return"".concat(n,"=").concat(bo(i,e))}).join(",")}return t}function Ip(t){if(typeof t=="number")return t;if(typeof t=="string")return t.indexOf("/")===-1?t:t.split("/").reverse().reduce(function(r,n,i,o){return i===0?"$expand=".concat(n):i===o.length-1?"".concat(n,"(").concat(r,")"):"$expand=".concat(n,"(").concat(r,")")},"");if(Array.isArray(t))return"".concat(t.map(function(r){return Ip(r)}).join(","));if(typeof t=="object"){var e=Object.keys(t);return e.some(function(r){return aV.indexOf(r.toLowerCase())!==-1})?e.map(function(r){var n;switch(r){case"filter":n=Gh(t[r]);break;case"orderBy":n=Py(t[r]);break;case"levels":case"count":case"skip":case"top":n="".concat(t[r]);break;default:n=Ip(t[r])}return"$".concat(r.toLowerCase(),"=").concat(n)}).join(";"):e.map(function(r){var n=Ip(t[r]);return n?"".concat(r,"(").concat(n,")"):r}).join(",")}return""}function pS(t){var e=Array.isArray(t)?t:[t],r=e.reduce(function(n,i){var o=i.aggregate,a=i.filter,s=i.groupBy,c=ak(i,["aggregate","filter","groupBy"]),l=Object.keys(c);if(l.length)throw new Error("Unsupported transform(s): ".concat(l));if(o&&n.push("aggregate(".concat(lV(o),")")),a){var d=Gh(a);d&&n.push("filter(".concat(Gh(d),")"))}return s&&n.push("groupby(".concat(dV(s),")")),n},[]);return r.join("/")||void 0}function lV(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 i=r[n];if(!i.with&&i.as)return"".concat(n," as ").concat(i.as);if(!i.with)throw new Error("'with' property required for '".concat(n,"'"));if(!i.as)throw new Error("'as' property required for '".concat(n,"'"));return"".concat(n," with ").concat(i.with," as ").concat(i.as)})}).join(",")}function dV(t){if(!t.properties)throw new Error("'properties' property required for groupBy");var e="(".concat(t.properties.join(","),")");return t.transform&&(e+=",".concat(pS(t.transform))),e}function Py(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],i=r[1];return Py(i,"".concat(n,"/"))}).map(function(r){return"".concat(e).concat(r)}).join(","):"".concat(e).concat(String(t))}function uV(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 _8(t){return"not(".concat(t.join(" and "),")")}const hV=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]})}},{}),fV=t=>Object.entries(t).filter(([e,r])=>!!r).reduce((e,[r,n])=>{switch(r){case"filter":return Object.assign(Object.assign({},e),{[r]:hV(n)});default:return Object.assign(Object.assign({},e),{[r]:t[r]})}},{}),pV=t=>typeof t=="string"?t:fS(fV(t)),mV=(t,e)=>{var r;const n=(r=bi[t])!==null&&r!==void 0?r:t;switch(n){case bi.v2:throw new oi(t);case bi.v1:default:{const{query:i,includeDeleted:o}=e,a=new URLSearchParams(pV(i));return a.append("api-version",n),o&&a.append("includeDeleted","true"),`/contexts/?${String(a)}`}}},vV=(t,e,r)=>[mV(t,e),r],gV=(t,e,r="json")=>(n,i)=>t[r](...vV(e,n,i)),yV=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]})}},{}),_V=t=>Object.entries(t).filter(([e,r])=>!!r).reduce((e,[r,n])=>{switch(r){case"filter":return Object.assign(Object.assign({},e),{[r]:yV(n)});default:return Object.assign(Object.assign({},e),{[r]:t[r]})}},{}),bV=t=>typeof t=="string"?t:fS(_V(t)),wV=(t,e)=>{var r;const n=(r=bi[t])!==null&&r!==void 0?r:t;switch(n){case bi.v2:throw new oi(t);case bi.v1:default:{const{id:i,query:o}=e,a=new URLSearchParams(bV(o||""));return a.append("api-version",n),`/contexts/${i}/relations?${String(a)}`}}},xV=(t,e,r)=>[wV(t,e),r],CV=(t,e,r="json")=>(n,i)=>t[r](...xV(e,n,i));class EV{get Version(){return bi}constructor(e,r){this._client=e,this._method=r}get(e,...r){return rV(this._client,e,this._method)(...r)}query(e,...r){return gV(this._client,e,this._method)(...r)}related(e,...r){return CV(this._client,e,this._method)(...r)}}const kV=(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)}`}}},SV=(t,e,r)=>{const n=kV(t,e),i=Object.assign({},{method:"Delete"},r);return[n,i]},AV=(t,e,r="fetch")=>(n,i)=>t[r](...SV(e,n,i)),IV=(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)}`}}},TV=(t,e,r)=>[IV(t,e),r],PV=(t,e,r="json")=>(n,i)=>t[r](...TV(e,n,i)),RV=(t,e)=>{switch(t){case"v1":default:{const r=new URLSearchParams;return r.append("api-version",t),`/bookmarks?${String(r)}`}}},MV=(t,e,r)=>{const n=RV(t),i=new Headers;i.append("content-type","application/json");const o=Object.assign({},{method:"post",body:JSON.stringify(e),headers:i},r);return[n,o]},$V=(t,e,r="json")=>(n,i)=>t[r](...MV(e,n,i)),ZV=(t,e)=>{switch(t){case"v1":default:{const r=new URLSearchParams;return r.append("api-version",t),`/bookmarks/${e.id}?${String(r)}`}}},HV=(t,e,r)=>{const n=ZV(t,e),i=new Headers;i.append("content-type","application/json");const o=Object.assign({},{method:"patch",body:JSON.stringify(e),headers:i},r);return[n,o]},OV=(t,e,r="json")=>(n,i)=>t[r](...HV(e,n,i)),LV=t=>{switch(t){case"v1":default:{const e=new URLSearchParams;return e.append("api-version",t),`persons/me/bookmarks/?${String(e)}`}}},NV=(t,e)=>[LV(t),e],DV=(t,e,r="json")=>n=>t[r](...NV(e,n)),VV=(t,e)=>{switch(t){case"v1":default:{const r=new URLSearchParams;return r.append("api-version",t),`/persons/me/bookmarks/favourites?${String(r)}`}}},FV=(t,e,r)=>{const n=VV(t),i=new Headers;i.append("content-type","application/json");const o=Object.assign({},{method:"post",body:JSON.stringify(e),headers:i},r);return[n,o]},zV=(t,e,r="json")=>(n,i)=>t[r](...FV(e,n,i)),jV=(t,e)=>{switch(t){case"v1":default:{const{bookmarkId:r}=e,n=new URLSearchParams;return n.append("api-version","1.0"),`/persons/me/bookmarks/favourites/${r}/?${String(n)}`}}},UV=(t,e,r)=>{const n=jV(t,e),i=Object.assign({},{method:"Delete"},r);return[n,i]},BV=(t,e,r="fetch")=>(n,i)=>t[r](...UV(e,n,i)),qV=(t,e)=>{switch(t){case"v1":default:{const{bookmarkId:r}=e,n=new URLSearchParams;return n.append("api-version",t),`/persons/me/bookmarks/favourites/${r}?${String(n)}`}}},WV=(t,e,r)=>{const n=qV(t,e),i=new Headers;i.append("content-type","application/json");const o=Object.assign({},{method:"head",headers:i},r);return[n,o]},GV=(t,e,r="json")=>(n,i)=>t[r](...WV(e,n,i));class KV{constructor(e,r){this._client=e,this._method=r}get(e,...r){return PV(this._client,e,this._method)(...r)}getAll(e){return DV(this._client,e,this._method)()}post(e,...r){return $V(this._client,e,this._method)(...r)}patch(e,...r){return OV(this._client,e,this._method)(...r)}delete(e,...r){return AV(this._client,e,this._method)(...r)}addFavorite(e,...r){return zV(this._client,e,this._method)(...r)}removeFavorite(e,...r){return BV(this._client,e,this._method)(...r)}verifyFavorite(e,...r){return GV(this._client,e,this._method)(...r)}}const YV=(t,e)=>{var r;const n=(r=Ht[t])!==null&&r!==void 0?r:t;switch(n){case Ht.v2:throw new oi(t);case Ht.v1:default:{const{id:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/notification/${i}/?${String(o)}`}}},QV=(t,e,r)=>[YV(t,e),r],XV=(t,e,r="json")=>(n,i)=>t[r](...QV(e,n,i)),JV=(t,e)=>{var r;const n=(r=Ht[t])!==null&&r!==void 0?r:t;switch(n){case Ht.v2:throw new oi(t);case Ht.v1:default:{const{userId:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/person/${i}/notifications/?${String(o)}`}}},eF=(t,e,r)=>{const n=JV(t,e),i=new Headers;i.append("content-type","application/json");const o=Object.assign({},{method:"post",body:JSON.stringify(e),headers:i},r);return[n,o]},tF=(t,e,r="json")=>(n,i)=>t[r](...eF(e,n,i)),rF=(t,e)=>{var r;const n=(r=Ht[t])!==null&&r!==void 0?r:t;switch(n){case Ht.v2:throw new oi(t);case Ht.v1:default:{const{id:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/notification/${i}/?${String(o)}`}}},nF=(t,e,r)=>{const n=rF(t,e),i=new Headers;i.append("content-type","application/json");const o=Object.assign({},{method:"patch",body:JSON.stringify(e),headers:i},r);return[n,o]},iF=(t,e,r="json")=>(n,i)=>t[r](...nF(e,n,i)),oF=(t,e)=>{var r;const n=(r=Ht[t])!==null&&r!==void 0?r:t;switch(n){case Ht.v2:throw new oi(t);case Ht.v1:default:{const{userId:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/person/${i}/notifications/?${String(o)}`}}},aF=(t,e,r)=>[oF(t,e),r],sF=(t,e,r="json")=>(n,i)=>t[r](...aF(e,n,i)),cF=(t,e)=>{var r;const n=(r=Ht[t])!==null&&r!==void 0?r:t;switch(n){case Ht.v2:throw new oi(t);case Ht.v1:default:{const{id:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/notification/${i}/?${String(o)}`}}},lF=(t,e,r)=>{const n=cF(t,e),i=new Headers;i.append("content-type","application/json");const o=Object.assign({},{method:"delete",headers:i},r);return[n,o]},dF=(t,e,r="json")=>(n,i)=>t[r](...lF(e,n,i));var Ht;(function(t){t.v1="1.0",t.v2="2.0"})(Ht||(Ht={}));const uF=(t,e)=>{var r;const n=(r=Ht[t])!==null&&r!==void 0?r:t;switch(n){case Ht.v2:throw new oi(t);case Ht.v1:default:{const{userId:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/person/${i}/notifications/settings/?${String(o)}`}}},hF=(t,e,r)=>{const n=uF(t,e),i=new Headers;i.append("content-type","application/json");const o=Object.assign({},{method:"put",body:JSON.stringify(e),headers:i},r);return[n,o]},fF=(t,e,r="json")=>(n,i)=>t[r](...hF(e,n,i)),pF=(t,e)=>{var r;const n=(r=Ht[t])!==null&&r!==void 0?r:t;switch(n){case Ht.v2:throw new oi(t);case Ht.v1:default:{const{userId:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/person/${i}/notifications/settings/?${String(o)}`}}},mF=(t,e,r)=>[pF(t,e),r],vF=(t,e,r="json")=>(n,i)=>t[r](...mF(e,n,i));class gF{get Version(){return Ht}constructor(e,r){this._client=e,this._method=r}getAll(e,...r){return sF(this._client,e,this._method)(...r)}getById(e,...r){return XV(this._client,e,this._method)(...r)}setSeenByUser(e,...r){return iF(this._client,e,this._method)(...r)}create(e,...r){return tF(this._client,e,this._method)(...r)}delete(e,...r){return dF(this._client,e,this._method)(...r)}getSettings(e,...r){return vF(this._client,e,this._method)(...r)}updateSettings(e,...r){return fF(this._client,e,this._method)(...r)}}var Ci;(function(t){t.v2="2.0",t.v4="4.0"})(Ci||(Ci={}));const yF=(t,e)=>{var r;const n=(r=Ci[t])!==null&&r!==void 0?r:t;switch(n){case Ci.v4:{const{azureId:i,expand:o}=e,a=new URLSearchParams;return a.append("api-version",n),o&&a.append("$expand",o.join(",")),`/persons/${i}?${String(a)}`}default:throw new oi(t)}},_F=(t,e,r)=>[yF(t,e),r],bF=(t,e,r="json")=>(n,i)=>t[r](..._F(e,n,i)),wF=(t,e)=>{var r;const n=(r=Ci[t])!==null&&r!==void 0?r:t;switch(n){case Ci.v2:{const{search:i}=e,o=new URLSearchParams;return o.append("api-version",n),o.append("$search",i),`/persons?${String(o)}`}default:throw new oi(t)}},xF=(t,e,r)=>[wF(t,e),r],CF=(t,e,r="json")=>(n,i)=>t[r](...xF(e,n,i)),EF=(t,e)=>{var r;const n=(r=Ci[t])!==null&&r!==void 0?r:t;switch(n){case Ci.v2:{const{azureId:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/persons/${i}/photo?${String(o)}`}default:throw new oi(t)}},kF=(t,e,r)=>[EF(t,e),r],SF=(t,e,r="blob")=>(n,i)=>t[r](...kF(e,n,i));class AF{get Version(){return Ci}constructor(e){this._client=e}get(e,r,n,i){return bF(this._client,e,r)(n,i)}query(e,r,n,i){return CF(this._client,e,r)(n,i)}photo(e,r,n,i){return SF(this._client,e,r)(n,i)}}var Hu=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};class IF extends Error{constructor(e,r,n){super(e,n),this.response=r,this.name="ApiProviderError"}}const Tf=t=>Hu(void 0,void 0,void 0,function*(){var e;if(!t.ok){const{headers:r,status:n,statusText:i,type:o,url:a,bodyUsed:s}=t,c=(e=r.get("content-type"))===null||e===void 0?void 0:e.match(/application\/(\w*)?[+]?json/),l=!s&&(yield c?t.json():t.text());throw new IF("failed to execute request, response was not ok",{headers:r,status:n,statusText:i,type:o,url:a,data:l})}});class TF{constructor({createClient:e}){this._createClientFn=e}createNotificationClient(e){return Hu(this,void 0,void 0,function*(){const r=yield this._createClientFn("notification");return r.responseHandler.add("validate_api_request",Tf),new gF(r,e)})}createBookmarksClient(e){return Hu(this,void 0,void 0,function*(){const r=yield this._createClientFn("bookmarks");return r.responseHandler.add("validate_api_request",Tf),new KV(r,e)})}createContextClient(e){return Hu(this,void 0,void 0,function*(){const r=yield this._createClientFn("context");return r.responseHandler.add("validate_api_request",Tf),new EV(r,e)})}createPeopleClient(){return Hu(this,void 0,void 0,function*(){const e=yield this._createClientFn("people");return e.responseHandler.add("validate_api_request",Tf),new AF(e)})}}var mS=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const PF="services",RF=(t,e)=>r=>mS(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}`)}),vS={name:PF,configure:()=>new JD,initialize:t=>mS(void 0,[t],void 0,function*({ref:e,config:r,requireInstance:n,hasModule:i}){if(!r.createClient){const o=yield n("http"),a=i("serviceDiscovery")?yield n("serviceDiscovery"):e==null?void 0:e.serviceDiscovery;r.createClient=RF(o,a)}if(!r.createClient)throw Error("missing configuration for creating API client");return new TF(r)})},MF=t=>{t.addConfig({module:vS})};class $F extends JO{constructor(){super([oL,nS,py,XD,vS,BD]),this.logger=new ok("FrameworkConfigurator")}configureHttp(...e){this.addConfig(yL(...e))}configureHttpClient(...e){this.addConfig(zk(...e))}configureMsal(...e){this.addConfig(RN(...e))}configureServiceDiscovery(e){this.configureHttpClient("service_discovery",e.client)}}var ZF=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const HF=(t,e)=>ZF(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}),gS=y.createContext(null),OF=gS.Provider,yS=y.createContext({}),LF=yS.Provider,NF=()=>y.useContext(yS),DF=t=>NF()[t];var VF=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const FF=t=>y.lazy(()=>VF(void 0,void 0,void 0,function*(){const e=new $F;yield t(e);const r=yield HF(e);return{default:({children:n})=>_.jsx(OF,{value:r,children:_.jsx(LF,{value:r.modules,children:n})})}})),ln=()=>{let t=y.useContext(gS);return t||console.warn("could not locate fusion in context!"),t??(t=window.Fusion),t||console.error("Could not load framework, might not be initiated?"),t},_S=t=>{const r=ln().modules[t];return r||console.warn(`the requested module [${r}] is not included in the framework instance`),r},zF=t=>{const{configure:e,fallback:r,children:n}=t,i=y.useMemo(()=>FF(e),[e]);return _.jsx(y.Suspense,{fallback:r,children:_.jsx(i,{children:n})})};function ct(){return ct=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},ct.apply(this,arguments)}function fd(t){"@babel/helpers - typeof";return fd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fd(t)}function $v(t){return t&&fd(t)==="object"&&t.constructor===Object}function bS(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{clone:!0},n=r.clone?ct({},t):t;return $v(t)&&$v(e)&&Object.keys(e).forEach(function(i){i!=="__proto__"&&($v(e[i])&&i in t?n[i]=bS(t[i],e[i],r):n[i]=e[i])}),n}function jF(t,e){if(fd(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(fd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function UF(t){var e=jF(t,"string");return fd(e)=="symbol"?e:e+""}var BF=typeof Symbol=="function"&&Symbol.for;const wS=BF?Symbol.for("mui.nested"):"__THEME_NESTED__";var qF=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];function WF(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.disableGlobal,r=e===void 0?!1:e,n=t.productionPrefix,i=n===void 0?"jss":n,o=t.seed,a=o===void 0?"":o,s=a===""?"":"".concat(a,"-"),c=0,l=function(){return c+=1,c};return function(d,u){var h=u.options.name;if(h&&h.indexOf("Mui")===0&&!u.options.link&&!r){if(qF.indexOf(d.key)!==-1)return"Mui-".concat(d.key);var f="".concat(s).concat(h,"-").concat(d.key);return!u.options.theme[wS]||a!==""?f:"".concat(f,"-").concat(l())}return"".concat(s).concat(i).concat(l())}}var b8=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_1=(typeof window>"u"?"undefined":b8(window))==="object"&&(typeof document>"u"?"undefined":b8(document))==="object"&&document.nodeType===9;function w8(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,UF(n.key),n)}}function xS(t,e,r){return e&&w8(t.prototype,e),r&&w8(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function X4(t,e){return X4=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},X4(t,e)}function CS(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,X4(t,e)}function x8(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ES(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,o;for(o=0;o<n.length;o++)i=n[o],!(e.indexOf(i)>=0)&&(r[i]=t[i]);return r}var GF={}.constructor;function J4(t){if(t==null||typeof t!="object")return t;if(Array.isArray(t))return t.map(J4);if(t.constructor!==GF)return t;var e={};for(var r in t)e[r]=J4(t[r]);return e}function Ry(t,e,r){t===void 0&&(t="unnamed");var n=r.jss,i=J4(e),o=n.plugins.onCreateRule(t,i,r);return o||(t[0],null)}var C8=function(e,r){for(var n="",i=0;i<e.length&&e[i]!=="!important";i++)n&&(n+=r),n+=e[i];return n},lc=function(e){if(!Array.isArray(e))return e;var r="";if(Array.isArray(e[0]))for(var n=0;n<e.length&&e[n]!=="!important";n++)r&&(r+=", "),r+=C8(e[n]," ");else r=C8(e,", ");return e[e.length-1]==="!important"&&(r+=" !important"),r};function $d(t){return t&&t.format===!1?{linebreak:"",space:""}:{linebreak:`
|
|
75
75
|
`,space:" "}}function au(t,e){for(var r="",n=0;n<e;n++)r+=" ";return r+t}function Kh(t,e,r){r===void 0&&(r={});var n="";if(!e)return n;var i=r,o=i.indent,a=o===void 0?0:o,s=e.fallbacks;r.format===!1&&(a=-1/0);var c=$d(r),l=c.linebreak,d=c.space;if(t&&a++,s)if(Array.isArray(s))for(var u=0;u<s.length;u++){var h=s[u];for(var f in h){var p=h[f];p!=null&&(n&&(n+=l),n+=au(f+":"+d+lc(p)+";",a))}}else for(var m in s){var w=s[m];w!=null&&(n&&(n+=l),n+=au(m+":"+d+lc(w)+";",a))}for(var g in e){var v=e[g];v!=null&&g!=="fallbacks"&&(n&&(n+=l),n+=au(g+":"+d+lc(v)+";",a))}return!n&&!r.allowEmpty||!t?n:(a--,n&&(n=""+l+n+l),au(""+t+d+"{"+n,a)+au("}",a))}var KF=/([[\].#*$><+~=|^:(),"'`\s])/g,E8=typeof CSS<"u"&&CSS.escape,My=function(t){return E8?E8(t):t.replace(KF,"\\$1")},kS=function(){function t(r,n,i){this.type="style",this.isProcessed=!1;var o=i.sheet,a=i.Renderer;this.key=r,this.options=i,this.style=n,o?this.renderer=o.renderer:a&&(this.renderer=new a)}var e=t.prototype;return e.prop=function(n,i,o){if(i===void 0)return this.style[n];var a=o?o.force:!1;if(!a&&this.style[n]===i)return this;var s=i;(!o||o.process!==!1)&&(s=this.options.jss.plugins.onChangeValue(i,n,this));var c=s==null||s===!1,l=n in this.style;if(c&&!l&&!a)return this;var d=c&&l;if(d?delete this.style[n]:this.style[n]=s,this.renderable&&this.renderer)return d?this.renderer.removeProperty(this.renderable,n):this.renderer.setProperty(this.renderable,n,s),this;var u=this.options.sheet;return u&&u.attached,this},t}(),e5=function(t){CS(e,t);function e(n,i,o){var a;a=t.call(this,n,i,o)||this;var s=o.selector,c=o.scoped,l=o.sheet,d=o.generateId;return s?a.selectorText=s:c!==!1&&(a.id=d(x8(x8(a)),l),a.selectorText="."+My(a.id)),a}var r=e.prototype;return r.applyTo=function(i){var o=this.renderer;if(o){var a=this.toJSON();for(var s in a)o.setProperty(i,s,a[s])}return this},r.toJSON=function(){var i={};for(var o in this.style){var a=this.style[o];typeof a!="object"?i[o]=a:Array.isArray(a)&&(i[o]=lc(a))}return i},r.toString=function(i){var o=this.options.sheet,a=o?o.options.link:!1,s=a?ct({},i,{allowEmpty:!0}):i;return Kh(this.selectorText,this.style,s)},xS(e,[{key:"selector",set:function(i){if(i!==this.selectorText){this.selectorText=i;var o=this.renderer,a=this.renderable;if(!(!a||!o)){var s=o.setSelector(a,i);s||o.replaceRule(a,this)}}},get:function(){return this.selectorText}}]),e}(kS),YF={onCreateRule:function(e,r,n){return e[0]==="@"||n.parent&&n.parent.type==="keyframes"?null:new e5(e,r,n)}},Zv={indent:1,children:!0},QF=/@([\w-]+)/,XF=function(){function t(r,n,i){this.type="conditional",this.isProcessed=!1,this.key=r;var o=r.match(QF);this.at=o?o[1]:"unknown",this.query=i.name||"@"+this.at,this.options=i,this.rules=new U0(ct({},i,{parent:this}));for(var a in n)this.rules.add(a,n[a]);this.rules.process()}var e=t.prototype;return e.getRule=function(n){return this.rules.get(n)},e.indexOf=function(n){return this.rules.indexOf(n)},e.addRule=function(n,i,o){var a=this.rules.add(n,i,o);return a?(this.options.jss.plugins.onProcessRule(a),a):null},e.replaceRule=function(n,i,o){var a=this.rules.replace(n,i,o);return a&&this.options.jss.plugins.onProcessRule(a),a},e.toString=function(n){n===void 0&&(n=Zv);var i=$d(n),o=i.linebreak;if(n.indent==null&&(n.indent=Zv.indent),n.children==null&&(n.children=Zv.children),n.children===!1)return this.query+" {}";var a=this.rules.toString(n);return a?this.query+" {"+o+a+o+"}":""},t}(),JF=/@container|@media|@supports\s+/,ez={onCreateRule:function(e,r,n){return JF.test(e)?new XF(e,r,n):null}},Hv={indent:1,children:!0},tz=/@keyframes\s+([\w-]+)/,t5=function(){function t(r,n,i){this.type="keyframes",this.at="@keyframes",this.isProcessed=!1;var o=r.match(tz);o&&o[1]?this.name=o[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=i;var a=i.scoped,s=i.sheet,c=i.generateId;this.id=a===!1?this.name:My(c(this,s)),this.rules=new U0(ct({},i,{parent:this}));for(var l in n)this.rules.add(l,n[l],ct({},i,{parent:this}));this.rules.process()}var e=t.prototype;return e.toString=function(n){n===void 0&&(n=Hv);var i=$d(n),o=i.linebreak;if(n.indent==null&&(n.indent=Hv.indent),n.children==null&&(n.children=Hv.children),n.children===!1)return this.at+" "+this.id+" {}";var a=this.rules.toString(n);return a&&(a=""+o+a+o),this.at+" "+this.id+" {"+a+"}"},t}(),rz=/@keyframes\s+/,nz=/\$([\w-]+)/g,r5=function(e,r){return typeof e=="string"?e.replace(nz,function(n,i){return i in r?r[i]:n}):e},k8=function(e,r,n){var i=e[r],o=r5(i,n);o!==i&&(e[r]=o)},iz={onCreateRule:function(e,r,n){return typeof e=="string"&&rz.test(e)?new t5(e,r,n):null},onProcessStyle:function(e,r,n){return r.type!=="style"||!n||("animation-name"in e&&k8(e,"animation-name",n.keyframes),"animation"in e&&k8(e,"animation",n.keyframes)),e},onChangeValue:function(e,r,n){var i=n.options.sheet;if(!i)return e;switch(r){case"animation":return r5(e,i.keyframes);case"animation-name":return r5(e,i.keyframes);default:return e}}},oz=function(t){CS(e,t);function e(){return t.apply(this,arguments)||this}var r=e.prototype;return r.toString=function(i){var o=this.options.sheet,a=o?o.options.link:!1,s=a?ct({},i,{allowEmpty:!0}):i;return Kh(this.key,this.style,s)},e}(kS),az={onCreateRule:function(e,r,n){return n.parent&&n.parent.type==="keyframes"?new oz(e,r,n):null}},sz=function(){function t(r,n,i){this.type="font-face",this.at="@font-face",this.isProcessed=!1,this.key=r,this.style=n,this.options=i}var e=t.prototype;return e.toString=function(n){var i=$d(n),o=i.linebreak;if(Array.isArray(this.style)){for(var a="",s=0;s<this.style.length;s++)a+=Kh(this.at,this.style[s]),this.style[s+1]&&(a+=o);return a}return Kh(this.at,this.style,n)},t}(),cz=/@font-face/,lz={onCreateRule:function(e,r,n){return cz.test(e)?new sz(e,r,n):null}},dz=function(){function t(r,n,i){this.type="viewport",this.at="@viewport",this.isProcessed=!1,this.key=r,this.style=n,this.options=i}var e=t.prototype;return e.toString=function(n){return Kh(this.key,this.style,n)},t}(),uz={onCreateRule:function(e,r,n){return e==="@viewport"||e==="@-ms-viewport"?new dz(e,r,n):null}},hz=function(){function t(r,n,i){this.type="simple",this.isProcessed=!1,this.key=r,this.value=n,this.options=i}var e=t.prototype;return e.toString=function(n){if(Array.isArray(this.value)){for(var i="",o=0;o<this.value.length;o++)i+=this.key+" "+this.value[o]+";",this.value[o+1]&&(i+=`
|
|
76
76
|
`);return i}return this.key+" "+this.value+";"},t}(),fz={"@charset":!0,"@import":!0,"@namespace":!0},pz={onCreateRule:function(e,r,n){return e in fz?new hz(e,r,n):null}},S8=[YF,ez,iz,az,lz,uz,pz],mz={process:!0},A8={force:!0,process:!0},U0=function(){function t(r){this.map={},this.raw={},this.index=[],this.counter=0,this.options=r,this.classes=r.classes,this.keyframes=r.keyframes}var e=t.prototype;return e.add=function(n,i,o){var a=this.options,s=a.parent,c=a.sheet,l=a.jss,d=a.Renderer,u=a.generateId,h=a.scoped,f=ct({classes:this.classes,parent:s,sheet:c,jss:l,Renderer:d,generateId:u,scoped:h,name:n,keyframes:this.keyframes,selector:void 0},o),p=n;n in this.raw&&(p=n+"-d"+this.counter++),this.raw[p]=i,p in this.classes&&(f.selector="."+My(this.classes[p]));var m=Ry(p,i,f);if(!m)return null;this.register(m);var w=f.index===void 0?this.index.length:f.index;return this.index.splice(w,0,m),m},e.replace=function(n,i,o){var a=this.get(n),s=this.index.indexOf(a);a&&this.remove(a);var c=o;return s!==-1&&(c=ct({},o,{index:s})),this.add(n,i,c)},e.get=function(n){return this.map[n]},e.remove=function(n){this.unregister(n),delete this.raw[n.key],this.index.splice(this.index.indexOf(n),1)},e.indexOf=function(n){return this.index.indexOf(n)},e.process=function(){var n=this.options.jss.plugins;this.index.slice(0).forEach(n.onProcessRule,n)},e.register=function(n){this.map[n.key]=n,n instanceof e5?(this.map[n.selector]=n,n.id&&(this.classes[n.key]=n.id)):n instanceof t5&&this.keyframes&&(this.keyframes[n.name]=n.id)},e.unregister=function(n){delete this.map[n.key],n instanceof e5?(delete this.map[n.selector],delete this.classes[n.key]):n instanceof t5&&delete this.keyframes[n.name]},e.update=function(){var n,i,o;if(typeof(arguments.length<=0?void 0:arguments[0])=="string"?(n=arguments.length<=0?void 0:arguments[0],i=arguments.length<=1?void 0:arguments[1],o=arguments.length<=2?void 0:arguments[2]):(i=arguments.length<=0?void 0:arguments[0],o=arguments.length<=1?void 0:arguments[1],n=null),n)this.updateOne(this.get(n),i,o);else for(var a=0;a<this.index.length;a++)this.updateOne(this.index[a],i,o)},e.updateOne=function(n,i,o){o===void 0&&(o=mz);var a=this.options,s=a.jss.plugins,c=a.sheet;if(n.rules instanceof t){n.rules.update(i,o);return}var l=n.style;if(s.onUpdate(i,n,c,o),o.process&&l&&l!==n.style){s.onProcessStyle(n.style,n,c);for(var d in n.style){var u=n.style[d],h=l[d];u!==h&&n.prop(d,u,A8)}for(var f in l){var p=n.style[f],m=l[f];p==null&&p!==m&&n.prop(f,null,A8)}}},e.toString=function(n){for(var i="",o=this.options.sheet,a=o?o.options.link:!1,s=$d(n),c=s.linebreak,l=0;l<this.index.length;l++){var d=this.index[l],u=d.toString(n);!u&&!a||(i&&(i+=c),i+=u)}return i},t}(),SS=function(){function t(r,n){this.attached=!1,this.deployed=!1,this.classes={},this.keyframes={},this.options=ct({},n,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),n.Renderer&&(this.renderer=new n.Renderer(this)),this.rules=new U0(this.options);for(var i in r)this.rules.add(i,r[i]);this.rules.process()}var e=t.prototype;return e.attach=function(){return this.attached?this:(this.renderer&&this.renderer.attach(),this.attached=!0,this.deployed||this.deploy(),this)},e.detach=function(){return this.attached?(this.renderer&&this.renderer.detach(),this.attached=!1,this):this},e.addRule=function(n,i,o){var a=this.queue;this.attached&&!a&&(this.queue=[]);var s=this.rules.add(n,i,o);return s?(this.options.jss.plugins.onProcessRule(s),this.attached?(this.deployed&&(a?a.push(s):(this.insertRule(s),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0))),s):(this.deployed=!1,s)):null},e.replaceRule=function(n,i,o){var a=this.rules.get(n);if(!a)return this.addRule(n,i,o);var s=this.rules.replace(n,i,o);return s&&this.options.jss.plugins.onProcessRule(s),this.attached?(this.deployed&&this.renderer&&(s?a.renderable&&this.renderer.replaceRule(a.renderable,s):this.renderer.deleteRule(a)),s):(this.deployed=!1,s)},e.insertRule=function(n){this.renderer&&this.renderer.insertRule(n)},e.addRules=function(n,i){var o=[];for(var a in n){var s=this.addRule(a,n[a],i);s&&o.push(s)}return o},e.getRule=function(n){return this.rules.get(n)},e.deleteRule=function(n){var i=typeof n=="object"?n:this.rules.get(n);return!i||this.attached&&!i.renderable?!1:(this.rules.remove(i),this.attached&&i.renderable&&this.renderer?this.renderer.deleteRule(i.renderable):!0)},e.indexOf=function(n){return this.rules.indexOf(n)},e.deploy=function(){return this.renderer&&this.renderer.deploy(),this.deployed=!0,this},e.update=function(){var n;return(n=this.rules).update.apply(n,arguments),this},e.updateOne=function(n,i,o){return this.rules.updateOne(n,i,o),this},e.toString=function(n){return this.rules.toString(n)},t}(),vz=function(){function t(){this.plugins={internal:[],external:[]},this.registry={}}var e=t.prototype;return e.onCreateRule=function(n,i,o){for(var a=0;a<this.registry.onCreateRule.length;a++){var s=this.registry.onCreateRule[a](n,i,o);if(s)return s}return null},e.onProcessRule=function(n){if(!n.isProcessed){for(var i=n.options.sheet,o=0;o<this.registry.onProcessRule.length;o++)this.registry.onProcessRule[o](n,i);n.style&&this.onProcessStyle(n.style,n,i),n.isProcessed=!0}},e.onProcessStyle=function(n,i,o){for(var a=0;a<this.registry.onProcessStyle.length;a++)i.style=this.registry.onProcessStyle[a](i.style,i,o)},e.onProcessSheet=function(n){for(var i=0;i<this.registry.onProcessSheet.length;i++)this.registry.onProcessSheet[i](n)},e.onUpdate=function(n,i,o,a){for(var s=0;s<this.registry.onUpdate.length;s++)this.registry.onUpdate[s](n,i,o,a)},e.onChangeValue=function(n,i,o){for(var a=n,s=0;s<this.registry.onChangeValue.length;s++)a=this.registry.onChangeValue[s](a,i,o);return a},e.use=function(n,i){i===void 0&&(i={queue:"external"});var o=this.plugins[i.queue];o.indexOf(n)===-1&&(o.push(n),this.registry=[].concat(this.plugins.external,this.plugins.internal).reduce(function(a,s){for(var c in s)c in a&&a[c].push(s[c]);return a},{onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}))},t}(),gz=function(){function t(){this.registry=[]}var e=t.prototype;return e.add=function(n){var i=this.registry,o=n.options.index;if(i.indexOf(n)===-1){if(i.length===0||o>=this.index){i.push(n);return}for(var a=0;a<i.length;a++)if(i[a].options.index>o){i.splice(a,0,n);return}}},e.reset=function(){this.registry=[]},e.remove=function(n){var i=this.registry.indexOf(n);this.registry.splice(i,1)},e.toString=function(n){for(var i=n===void 0?{}:n,o=i.attached,a=ES(i,["attached"]),s=$d(a),c=s.linebreak,l="",d=0;d<this.registry.length;d++){var u=this.registry[d];o!=null&&u.attached!==o||(l&&(l+=c),l+=u.toString(a))}return l},xS(t,[{key:"index",get:function(){return this.registry.length===0?0:this.registry[this.registry.length-1].options.index}}]),t}(),mh=new gz,n5=typeof globalThis<"u"?globalThis:typeof window<"u"&&window.Math===Math?window:typeof self<"u"&&self.Math===Math?self:Function("return this")(),i5="2f1acc6c3a606b082e5eef5e54414ffb";n5[i5]==null&&(n5[i5]=0);var I8=n5[i5]++,T8=function(e){e===void 0&&(e={});var r=0,n=function(o,a){r+=1;var s="",c="";return a&&(a.options.classNamePrefix&&(c=a.options.classNamePrefix),a.options.jss.id!=null&&(s=String(a.options.jss.id))),e.minify?""+(c||"c")+I8+s+r:c+o.key+"-"+I8+(s?"-"+s:"")+"-"+r};return n},AS=function(e){var r;return function(){return r||(r=e()),r}},yz=function(e,r){try{return e.attributeStyleMap?e.attributeStyleMap.get(r):e.style.getPropertyValue(r)}catch{return""}},_z=function(e,r,n){try{var i=n;if(Array.isArray(n)&&(i=lc(n)),e.attributeStyleMap)e.attributeStyleMap.set(r,i);else{var o=i?i.indexOf("!important"):-1,a=o>-1?i.substr(0,o-1):i;e.style.setProperty(r,a,o>-1?"important":"")}}catch{return!1}return!0},bz=function(e,r){try{e.attributeStyleMap?e.attributeStyleMap.delete(r):e.style.removeProperty(r)}catch{}},wz=function(e,r){return e.selectorText=r,e.selectorText===r},IS=AS(function(){return document.querySelector("head")});function xz(t,e){for(var r=0;r<t.length;r++){var n=t[r];if(n.attached&&n.options.index>e.index&&n.options.insertionPoint===e.insertionPoint)return n}return null}function Cz(t,e){for(var r=t.length-1;r>=0;r--){var n=t[r];if(n.attached&&n.options.insertionPoint===e.insertionPoint)return n}return null}function Ez(t){for(var e=IS(),r=0;r<e.childNodes.length;r++){var n=e.childNodes[r];if(n.nodeType===8&&n.nodeValue.trim()===t)return n}return null}function kz(t){var e=mh.registry;if(e.length>0){var r=xz(e,t);if(r&&r.renderer)return{parent:r.renderer.element.parentNode,node:r.renderer.element};if(r=Cz(e,t),r&&r.renderer)return{parent:r.renderer.element.parentNode,node:r.renderer.element.nextSibling}}var n=t.insertionPoint;if(n&&typeof n=="string"){var i=Ez(n);if(i)return{parent:i.parentNode,node:i.nextSibling}}return!1}function Sz(t,e){var r=e.insertionPoint,n=kz(e);if(n!==!1&&n.parent){n.parent.insertBefore(t,n.node);return}if(r&&typeof r.nodeType=="number"){var i=r,o=i.parentNode;o&&o.insertBefore(t,i.nextSibling);return}IS().appendChild(t)}var Az=AS(function(){var t=document.querySelector('meta[property="csp-nonce"]');return t?t.getAttribute("content"):null}),P8=function(e,r,n){try{"insertRule"in e?e.insertRule(r,n):"appendRule"in e&&e.appendRule(r)}catch{return!1}return e.cssRules[n]},R8=function(e,r){var n=e.cssRules.length;return r===void 0||r>n?n:r},Iz=function(){var e=document.createElement("style");return e.textContent=`
|
|
77
77
|
`,e},Tz=function(){function t(r){this.getPropertyValue=yz,this.setProperty=_z,this.removeProperty=bz,this.setSelector=wz,this.hasInsertedRules=!1,this.cssRules=[],r&&mh.add(r),this.sheet=r;var n=this.sheet?this.sheet.options:{},i=n.media,o=n.meta,a=n.element;this.element=a||Iz(),this.element.setAttribute("data-jss",""),i&&this.element.setAttribute("media",i),o&&this.element.setAttribute("data-meta",o);var s=Az();s&&this.element.setAttribute("nonce",s)}var e=t.prototype;return e.attach=function(){if(!(this.element.parentNode||!this.sheet)){Sz(this.element,this.sheet.options);var n=!!(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&n&&(this.hasInsertedRules=!1,this.deploy())}},e.detach=function(){if(this.sheet){var n=this.element.parentNode;n&&n.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent=`
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "9.11.
|
|
1
|
+
export declare const version = "9.11.1";
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const version = '9.11.
|
|
1
|
+
export const version = '9.11.1';
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/fusion-framework-cli",
|
|
3
|
-
"version": "9.11.
|
|
3
|
+
"version": "9.11.1",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"Fusion",
|
|
6
6
|
"Fusion Framework",
|
|
@@ -50,9 +50,9 @@
|
|
|
50
50
|
"vite-plugin-environment": "^1.1.3",
|
|
51
51
|
"vite-plugin-restart": "^0.4.0",
|
|
52
52
|
"vite-tsconfig-paths": "^4.2.0",
|
|
53
|
-
"@equinor/fusion-framework-app": "^9.0.
|
|
54
|
-
"@equinor/fusion-framework-react-components-people-provider": "^1.3.1",
|
|
53
|
+
"@equinor/fusion-framework-app": "^9.0.2",
|
|
55
54
|
"@equinor/fusion-framework-module-feature-flag": "^1.1.0",
|
|
55
|
+
"@equinor/fusion-framework-react-components-people-provider": "^1.3.1",
|
|
56
56
|
"@equinor/fusion-observable": "^8.2.0"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
@@ -72,19 +72,19 @@
|
|
|
72
72
|
"rxjs": "^7.8.1",
|
|
73
73
|
"styled-components": "^6.0.7",
|
|
74
74
|
"typescript": "^5.4.2",
|
|
75
|
+
"@equinor/fusion-framework-app": "^9.0.2",
|
|
75
76
|
"@equinor/fusion-framework": "^7.1.1",
|
|
76
|
-
"@equinor/fusion-framework-app": "^9.0.1",
|
|
77
|
-
"@equinor/fusion-framework-module-bookmark": "^1.2.0",
|
|
78
77
|
"@equinor/fusion-framework-module-app": "^5.3.0",
|
|
78
|
+
"@equinor/fusion-framework-module-bookmark": "^1.2.0",
|
|
79
79
|
"@equinor/fusion-framework-module-http": "^5.2.0",
|
|
80
80
|
"@equinor/fusion-framework-module-msal": "^3.1.0",
|
|
81
81
|
"@equinor/fusion-framework-module-context": "^5.0.0",
|
|
82
82
|
"@equinor/fusion-framework-module-navigation": "^4.0.0",
|
|
83
|
-
"@equinor/fusion-framework-react": "^7.0.1",
|
|
84
83
|
"@equinor/fusion-framework-module-services": "^4.0.1",
|
|
84
|
+
"@equinor/fusion-framework-react": "^7.0.1",
|
|
85
85
|
"@equinor/fusion-framework-react-components-bookmark": "^0.4.1",
|
|
86
|
-
"@equinor/fusion-
|
|
87
|
-
"@equinor/fusion-
|
|
86
|
+
"@equinor/fusion-query": "^4.1.0",
|
|
87
|
+
"@equinor/fusion-framework-react-module-bookmark": "^2.1.1"
|
|
88
88
|
},
|
|
89
89
|
"scripts": {
|
|
90
90
|
"prebuild": "pnpm build:source",
|