@equinor/fusion-framework-cli 7.0.4 → 7.0.6

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
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## 7.0.6 (2023-05-22)
7
+
8
+ **Note:** Version bump only for package @equinor/fusion-framework-cli
9
+
10
+ ## [7.0.5](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-cli@7.0.4...@equinor/fusion-framework-cli@7.0.5) (2023-05-12)
11
+
12
+ **Note:** Version bump only for package @equinor/fusion-framework-cli
13
+
6
14
  ## [7.0.4](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-cli@7.0.3...@equinor/fusion-framework-cli@7.0.4) (2023-05-11)
7
15
 
8
16
  **Note:** Version bump only for package @equinor/fusion-framework-cli
@@ -71,7 +71,7 @@ Error: `+s.errorCode+`
71
71
  Error Description: `+s.errorMessage):(c=s,this.logger.error(`A non-MSALJS error was thrown while attempting to get the cloud instance discovery metadata.
72
72
  Error: `+c.name+`
73
73
  Error Description: `+c.message)),[2,null];case 4:return n||(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."),n=t.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)),[2,n]}})})},t.prototype.getCloudDiscoveryMetadataFromHarcodedValues=function(){return this.canonicalAuthority in pw?pw[this.canonicalAuthority]:null},t.prototype.isInKnownAuthorities=function(){var e=this,r=this.authorityOptions.knownAuthorities.filter(function(n){return pt.getDomainFromUrl(n).toLowerCase()===e.hostnameAndPort});return r.length>0},t.generateAuthority=function(e,r){var n;if(r&&r.azureCloudInstance!==hu.None){var i=r.tenant?r.tenant:$.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 me.createEndpointDiscoveryIncompleteError("Discovery incomplete.")},t.prototype.isAlias=function(e){return this.metadata.aliases.indexOf(e)>-1},t.isPublicCloudAuthority=function(e){return $.KNOWN_PUBLIC_CLOUDS.indexOf(e)>=0},t.buildRegionalAuthorityString=function(e,r,n){var i=new pt(e);i.validateAsUri();var o=i.getUrlComponents(),a=r+"."+o.HostNameAndPort;this.isPublicCloudAuthority(o.HostNameAndPort)&&(a=r+"."+$.REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX);var s=pt.constructAuthorityUriFromObject(Pt(Pt({},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,$.REGIONAL_AUTH_NON_MSI_QUERY_STRING),e.end_session_endpoint&&(e.end_session_endpoint=t.buildRegionalAuthorityString(e.end_session_endpoint,r)),e},t}();/*! @azure/msal-common v9.1.1 2023-01-19 */var Rp=function(){function t(){}return t.createDiscoveredInstance=function(e,r,n,i,o,a){return Oe(this,void 0,void 0,function(){var s,c;return Ne(this,function(l){switch(l.label){case 0:s=t.createInstance(e,r,n,i,o,a),l.label=1;case 1:return l.trys.push([1,3,,4]),[4,s.resolveEndpointsAsync()];case 2:return l.sent(),[2,s];case 3:throw c=l.sent(),me.createEndpointDiscoveryIncompleteError(c);case 4:return[2]}})})},t.createInstance=function(e,r,n,i,o,a){if(fe.isEmpty(e))throw Wt.createUrlEmptyError();return new Tp(e,r,n,i,o,a)},t}();/*! @azure/msal-common v9.1.1 2023-01-19 */var Dp=function(){function t(){this.failedRequests=[],this.errors=[],this.cacheHits=0}return t.isServerTelemetryEntity=function(e,r){var n=e.indexOf(nn.CACHE_KEY)===0,i=!0;return r&&(i=r.hasOwnProperty("failedRequests")&&r.hasOwnProperty("errors")&&r.hasOwnProperty("cacheHits")),n&&i},t}();/*! @azure/msal-common v9.1.1 2023-01-19 */var vw=function(){function t(){}return t.isThrottlingEntity=function(e,r){var n=!1;e&&(n=e.indexOf(Ch.THROTTLING_PREFIX)===0);var i=!0;return r&&(i=r.hasOwnProperty("throttleTime")),n&&i},t}();/*! @azure/msal-common v9.1.1 2023-01-19 */var uF={sendGetRequestAsync:function(){var t="Network interface - sendGetRequestAsync() has not been implemented for the Network interface.";return Promise.reject(Ee.createUnexpectedError(t))},sendPostRequestAsync:function(){var t="Network interface - sendPostRequestAsync() has not been implemented for the Network interface.";return Promise.reject(Ee.createUnexpectedError(t))}};/*! @azure/msal-common v9.1.1 2023-01-19 */var df={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."}},mw=function(t){li(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(df.missingKidError.code,df.missingKidError.desc)},e.createMissingAlgError=function(){return new e(df.missingAlgError.code,df.missingAlgError.desc)},e}(Ee);/*! @azure/msal-common v9.1.1 2023-01-19 */var fF=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 mw.createMissingKidError();if(!e.alg)throw mw.createMissingAlgError();var r=new t({typ:e.typ||M6.Jwt,kid:e.kid,alg:e.alg});return JSON.stringify(r)},t}();/*! @azure/msal-common v9.1.1 2023-01-19 */var pF=function(){function t(e,r){this.cacheOutcome=Gc.NO_CACHE_HIT,this.cacheManager=r,this.apiId=e.apiId,this.correlationId=e.correlationId,this.wrapperSKU=e.wrapperSKU||$.EMPTY_STRING,this.wrapperVer=e.wrapperVer||$.EMPTY_STRING,this.telemetryCacheKey=nn.CACHE_KEY+ni.CACHE_KEY_SEPARATOR+e.clientId}return t.prototype.generateCurrentRequestHeaderValue=function(){var e=""+this.apiId+nn.VALUE_SEPARATOR+this.cacheOutcome,r=[this.wrapperSKU,this.wrapperVer].join(nn.VALUE_SEPARATOR),n=this.getRegionDiscoveryFields(),i=[e,n].join(nn.VALUE_SEPARATOR);return[nn.SCHEMA_VERSION,i,r].join(nn.CATEGORY_SEPARATOR)},t.prototype.generateLastRequestHeaderValue=function(){var e=this.getLastRequests(),r=t.maxErrorsToSend(e),n=e.failedRequests.slice(0,2*r).join(nn.VALUE_SEPARATOR),i=e.errors.slice(0,r).join(nn.VALUE_SEPARATOR),o=e.errors.length,a=r<o?nn.OVERFLOW_TRUE:nn.OVERFLOW_FALSE,s=[o,a].join(nn.VALUE_SEPARATOR);return[nn.SCHEMA_VERSION,e.cacheHits,n,i,s].join(nn.CATEGORY_SEPARATOR)},t.prototype.cacheFailedRequest=function(e){var r=this.getLastRequests();r.errors.length>=nn.MAX_CACHED_ERRORS&&(r.failedRequests.shift(),r.failedRequests.shift(),r.errors.shift()),r.failedRequests.push(this.apiId,this.correlationId),fe.isEmpty(e.subError)?fe.isEmpty(e.errorCode)?e&&e.toString()?r.errors.push(e.toString()):r.errors.push(nn.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 Dp,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 Dp;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]||$.EMPTY_STRING,s=e.failedRequests[2*r+1]||$.EMPTY_STRING,c=e.errors[r]||$.EMPTY_STRING;if(i+=a.toString().length+s.toString().length+c.length+3,i<nn.MAX_LAST_HEADER_BYTES)n+=1;else break}return n},t.prototype.getRegionDiscoveryFields=function(){var e=[];return e.push(this.regionUsed||$.EMPTY_STRING),e.push(this.regionSource||$.EMPTY_STRING),e.push(this.regionOutcome||$.EMPTY_STRING),e.join(",")},t.prototype.updateRegionDiscoveryMetadata=function(e){this.regionUsed=e.region_used,this.regionSource=e.region_source,this.regionOutcome=e.region_outcome},t.prototype.setCacheOutcome=function(e){this.cacheOutcome=e},t}();/*! @azure/msal-common v9.1.1 2023-01-19 */var j$=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.staticFieldsByCorrelationId=new Map,this.measurementsById=new Map,this.countersByCorrelationId=new Map}return t.prototype.startPerformanceMeasurement=function(e,r){return{}},t.prototype.startPerformanceMeasuremeant=function(e,r){return{}},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,c=this.startPerformanceMeasuremeant(e,a);if(c.startMeasurement)c.startMeasurement(),s=c;else{var l=this.startPerformanceMeasurement(e,a);l.startMeasurement(),s=l}var d={eventId:this.generateId(),status:yl.InProgress,authority:this.authority,libraryName:this.libraryName,libraryVersion:this.libraryVersion,clientId:this.clientId,name:e,startTimeMs:Date.now(),correlationId:a};this.cacheEventByCorrelationId(d);var h={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.addStaticFields(h,a),this.cacheMeasurement(d,s),{endMeasurement:function(u){var f=n.endMeasurement(Pt(Pt({},d),u));return f&&n.cacheEventByCorrelationId(f),f},flushMeasurement:function(){return n.flushMeasurements(d.name,d.correlationId)},discardMeasurement:function(){return n.discardMeasurements(d.correlationId)},addStaticFields:function(u){return n.addStaticFields(u,d.correlationId)},increment:function(u){return n.increment(u,d.correlationId)},measurement:s,event:d}},t.prototype.endMeasurement=function(e){var r=this.measurementsById.get(e.eventId);if(r){this.measurementsById.delete(e.eventId),r.endMeasurement();var n=r.flushMeasurement();if(n!==null){this.logger.trace("PerformanceClient: Performance measurement ended for "+e.name+": "+n+" ms",e.correlationId);var i=Pt(Pt({durationMs:Math.round(n)},e),{status:yl.Completed});return i}else this.logger.trace("PerformanceClient: Performance measurement not taken",e.correlationId)}else this.logger.trace("PerformanceClient: Measurement not found for "+e.eventId,e.correlationId);return null},t.prototype.addStaticFields=function(e,r){var n=this.staticFieldsByCorrelationId.get(r);n?(this.logger.trace("PerformanceClient: Updating static fields"),this.staticFieldsByCorrelationId.set(r,Pt(Pt({},n),e))):(this.logger.trace("PerformanceClient: Adding static fields"),this.staticFieldsByCorrelationId.set(r,e))},t.prototype.increment=function(e,r){var n=this.countersByCorrelationId.get(r);if(!n){this.logger.trace("PerformanceClient: Setting counters"),this.countersByCorrelationId.set(r,Pt({},e));return}this.logger.trace("PerformanceClient: Updating counters");for(var i in e)n.hasOwnProperty(i)||(n[i]=0),n[i]+=e[i]},t.prototype.cacheEventByCorrelationId=function(e){var r=this.eventsByCorrelationId.get(e.correlationId);r?(this.logger.trace("PerformanceClient: Performance measurement for "+e.name+" added/updated",e.correlationId),r.set(e.eventId,e)):(this.logger.trace("PerformanceClient: Performance measurement for "+e.name+" started",e.correlationId),this.eventsByCorrelationId.set(e.correlationId,new Map().set(e.eventId,e)))},t.prototype.cacheMeasurement=function(e,r){this.measurementsById.set(e.eventId,r)},t.prototype.flushMeasurements=function(e,r){var n=this;this.logger.trace("PerformanceClient: Performance measurements flushed for "+e,r);var i=this.eventsByCorrelationId.get(r),o=this.staticFieldsByCorrelationId.get(r),a=this.countersByCorrelationId.get(r);if(i){this.discardCache(r);var s=[];i.forEach(function(f){if(f.name!==e&&f.status!==yl.Completed){n.logger.trace("PerformanceClient: Incomplete submeasurement "+f.name+" found for "+e,r);var v=n.endMeasurement(f);v&&s.push(v)}s.push(f)});var c=s.sort(function(f,v){return f.startTimeMs-v.startTimeMs}),l=c.filter(function(f){return f.name===e&&f.status===yl.Completed});if(l.length>0){l.length>1&&this.logger.verbose("PerformanceClient: Multiple distinct top-level performance events found, using the first",r);var d=l[0];this.logger.verbose("PerformanceClient: Measurement found for "+e,r);var h=c.reduce(function(f,v){if(v.name!==e){n.logger.trace("PerformanceClient: Complete submeasurement found for "+v.name,r);var p=v.name+"DurationMs";f[p]?n.logger.verbose("PerformanceClient: Submeasurement for "+e+" already exists for "+v.name+", ignoring",r):f[p]=v.durationMs}return f},d),u=Pt(Pt(Pt({},h),o),a);this.emitEvents([u],h.correlationId)}else this.logger.verbose("PerformanceClient: No completed top-level measurements found for "+e,r)}else this.logger.verbose("PerformanceClient: No measurements found",r)},t.prototype.discardMeasurements=function(e){this.logger.trace("PerformanceClient: Performance measurements discarded",e),this.eventsByCorrelationId.delete(e)},t.prototype.discardCache=function(e){this.discardMeasurements(e),this.logger.trace("PerformanceClient: Static fields discarded",e),this.staticFieldsByCorrelationId.delete(e),this.logger.trace("PerformanceClient: Counters discarded",e),this.countersByCorrelationId.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}();/*! @azure/msal-common v9.1.1 2023-01-19 */var gw=function(){function t(){}return t.prototype.startMeasurement=function(){},t.prototype.endMeasurement=function(){},t.prototype.flushMeasurement=function(){return null},t}(),vF=function(t){li(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 gw},e.prototype.startPerformanceMeasurement=function(){return new gw},e}(j$);/*! @azure/msal-browser v2.32.2 2023-01-10 */var se={pkceNotGenerated:{code:"pkce_not_created",desc:"The PKCE code challenge and verifier could not be generated."},cryptoDoesNotExist:{code:"crypto_nonexistent",desc:"The crypto object or function is not available."},httpMethodNotImplementedError:{code:"http_method_not_implemented",desc:"The HTTP method given has not been implemented in this library."},emptyNavigateUriError:{code:"empty_navigate_uri",desc:"Navigation URI is empty. Please check stack trace for more info."},hashEmptyError:{code:"hash_empty_error",desc:"Hash value cannot be processed because it is empty. Please verify that your redirectUri is not clearing the hash. For more visit: aka.ms/msaljs/browser-errors."},hashDoesNotContainStateError:{code:"no_state_in_hash",desc:"Hash does not contain state. Please verify that the request originated from msal."},hashDoesNotContainKnownPropertiesError:{code:"hash_does_not_contain_known_properties",desc:"Hash does not contain known properites. Please verify that your redirectUri is not changing the hash. For more visit: aka.ms/msaljs/browser-errors."},unableToParseStateError:{code:"unable_to_parse_state",desc:"Unable to parse state. Please verify that the request originated from msal."},stateInteractionTypeMismatchError:{code:"state_interaction_type_mismatch",desc:"Hash contains state but the interaction type does not match the caller."},interactionInProgress:{code:"interaction_in_progress",desc:"Interaction is currently in progress. Please ensure that this interaction has been completed before calling an interactive API. For more visit: aka.ms/msaljs/browser-errors."},popupWindowError:{code:"popup_window_error",desc:"Error opening popup window. This can happen if you are using IE or if popups are blocked in the browser."},emptyWindowError:{code:"empty_window_error",desc:"window.open returned null or undefined window object."},userCancelledError:{code:"user_cancelled",desc:"User cancelled the flow."},monitorPopupTimeoutError:{code:"monitor_window_timeout",desc:"Token acquisition in popup failed due to timeout. For more visit: aka.ms/msaljs/browser-errors."},monitorIframeTimeoutError:{code:"monitor_window_timeout",desc:"Token acquisition in iframe failed due to timeout. For more visit: aka.ms/msaljs/browser-errors."},redirectInIframeError:{code:"redirect_in_iframe",desc:"Redirects are not supported for iframed or brokered applications. Please ensure you are using MSAL.js in a top frame of the window if using the redirect APIs, or use the popup APIs."},blockTokenRequestsInHiddenIframeError:{code:"block_iframe_reload",desc:"Request was blocked inside an iframe because MSAL detected an authentication response. For more visit: aka.ms/msaljs/browser-errors"},blockAcquireTokenInPopupsError:{code:"block_nested_popups",desc:"Request was blocked inside a popup because MSAL detected it was running in a popup."},iframeClosedPrematurelyError:{code:"iframe_closed_prematurely",desc:"The iframe being monitored was closed prematurely."},silentLogoutUnsupportedError:{code:"silent_logout_unsupported",desc:"Silent logout not supported. Please call logoutRedirect or logoutPopup instead."},noAccountError:{code:"no_account_error",desc:"No account object provided to acquireTokenSilent and no active account has been set. Please call setActiveAccount or provide an account on the request."},silentPromptValueError:{code:"silent_prompt_value_error",desc:"The value given for the prompt value is not valid for silent requests - must be set to 'none' or 'no_session'."},noTokenRequestCacheError:{code:"no_token_request_cache_error",desc:"No token request found in cache."},unableToParseTokenRequestCacheError:{code:"unable_to_parse_token_request_cache_error",desc:"The cached token request could not be parsed."},noCachedAuthorityError:{code:"no_cached_authority_error",desc:"No cached authority found."},authRequestNotSet:{code:"auth_request_not_set_error",desc:"Auth Request not set. Please ensure initiateAuthRequest was called from the InteractionHandler"},invalidCacheType:{code:"invalid_cache_type",desc:"Invalid cache type"},notInBrowserEnvironment:{code:"non_browser_environment",desc:"Login and token requests are not supported in non-browser environments."},databaseNotOpen:{code:"database_not_open",desc:"Database is not open!"},noNetworkConnectivity:{code:"no_network_connectivity",desc:"No network connectivity. Check your internet connection."},postRequestFailed:{code:"post_request_failed",desc:"Network request failed: If the browser threw a CORS error, check that the redirectUri is registered in the Azure App Portal as type 'SPA'"},getRequestFailed:{code:"get_request_failed",desc:"Network request failed. Please check the network trace to determine root cause."},failedToParseNetworkResponse:{code:"failed_to_parse_response",desc:"Failed to parse network response. Check network trace."},unableToLoadTokenError:{code:"unable_to_load_token",desc:"Error loading token to cache."},signingKeyNotFoundInStorage:{code:"crypto_key_not_found",desc:"Cryptographic Key or Keypair not found in browser storage."},authCodeRequired:{code:"auth_code_required",desc:"An authorization code must be provided (as the `code` property on the request) to this flow."},authCodeOrNativeAccountRequired:{code:"auth_code_or_nativeAccountId_required",desc:"An authorization code or nativeAccountId must be provided to this flow."},databaseUnavailable:{code:"database_unavailable",desc:"IndexedDB, which is required for persistent cryptographic key storage, is unavailable. This may be caused by browser privacy features which block persistent storage in third-party contexts."},unableToAcquireTokenFromNativePlatform:{code:"unable_to_acquire_token_from_native_platform",desc:"Unable to acquire token from native platform. For a list of possible reasons visit aka.ms/msaljs/browser-errors."},nativeHandshakeTimeout:{code:"native_handshake_timeout",desc:"Timed out while attempting to establish connection to browser extension"},nativeExtensionNotInstalled:{code:"native_extension_not_installed",desc:"Native extension is not installed. If you think this is a mistake call the initialize function."},nativeConnectionNotEstablished:{code:"native_connection_not_established",desc:"Connection to native platform has not been established. Please install a compatible browser extension and run initialize(). For more please visit aka.ms/msaljs/browser-errors."},nativeBrokerCalledBeforeInitialize:{code:"native_broker_called_before_initialize",desc:"You must call and await the initialize function before attempting to call any other MSAL API when native brokering is enabled. For more please visit aka.ms/msaljs/browser-errors."},nativePromptNotSupported:{code:"native_prompt_not_supported",desc:"The provided prompt is not supported by the native platform. This request should be routed to the web based flow."}},ue=function(t){pn(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(se.pkceNotGenerated.code,se.pkceNotGenerated.desc+" Detail:"+r)},e.createCryptoNotAvailableError=function(r){return new e(se.cryptoDoesNotExist.code,se.cryptoDoesNotExist.desc+" Detail:"+r)},e.createHttpMethodNotImplementedError=function(r){return new e(se.httpMethodNotImplementedError.code,se.httpMethodNotImplementedError.desc+" Given Method: "+r)},e.createEmptyNavigationUriError=function(){return new e(se.emptyNavigateUriError.code,se.emptyNavigateUriError.desc)},e.createEmptyHashError=function(r){return new e(se.hashEmptyError.code,se.hashEmptyError.desc+" Given Url: "+r)},e.createHashDoesNotContainStateError=function(){return new e(se.hashDoesNotContainStateError.code,se.hashDoesNotContainStateError.desc)},e.createHashDoesNotContainKnownPropertiesError=function(){return new e(se.hashDoesNotContainKnownPropertiesError.code,se.hashDoesNotContainKnownPropertiesError.desc)},e.createUnableToParseStateError=function(){return new e(se.unableToParseStateError.code,se.unableToParseStateError.desc)},e.createStateInteractionTypeMismatchError=function(){return new e(se.stateInteractionTypeMismatchError.code,se.stateInteractionTypeMismatchError.desc)},e.createInteractionInProgressError=function(){return new e(se.interactionInProgress.code,se.interactionInProgress.desc)},e.createPopupWindowError=function(r){var n=se.popupWindowError.desc;return n=fe.isEmpty(r)?n:n+" Details: "+r,new e(se.popupWindowError.code,n)},e.createEmptyWindowCreatedError=function(){return new e(se.emptyWindowError.code,se.emptyWindowError.desc)},e.createUserCancelledError=function(){return new e(se.userCancelledError.code,se.userCancelledError.desc)},e.createMonitorPopupTimeoutError=function(){return new e(se.monitorPopupTimeoutError.code,se.monitorPopupTimeoutError.desc)},e.createMonitorIframeTimeoutError=function(){return new e(se.monitorIframeTimeoutError.code,se.monitorIframeTimeoutError.desc)},e.createRedirectInIframeError=function(r){return new e(se.redirectInIframeError.code,se.redirectInIframeError.desc+" (window.parent !== window) => "+r)},e.createBlockReloadInHiddenIframeError=function(){return new e(se.blockTokenRequestsInHiddenIframeError.code,se.blockTokenRequestsInHiddenIframeError.desc)},e.createBlockAcquireTokenInPopupsError=function(){return new e(se.blockAcquireTokenInPopupsError.code,se.blockAcquireTokenInPopupsError.desc)},e.createIframeClosedPrematurelyError=function(){return new e(se.iframeClosedPrematurelyError.code,se.iframeClosedPrematurelyError.desc)},e.createSilentLogoutUnsupportedError=function(){return new e(se.silentLogoutUnsupportedError.code,se.silentLogoutUnsupportedError.desc)},e.createNoAccountError=function(){return new e(se.noAccountError.code,se.noAccountError.desc)},e.createSilentPromptValueError=function(r){return new e(se.silentPromptValueError.code,se.silentPromptValueError.desc+" Given value: "+r)},e.createUnableToParseTokenRequestCacheError=function(){return new e(se.unableToParseTokenRequestCacheError.code,se.unableToParseTokenRequestCacheError.desc)},e.createNoTokenRequestCacheError=function(){return new e(se.noTokenRequestCacheError.code,se.noTokenRequestCacheError.desc)},e.createAuthRequestNotSetError=function(){return new e(se.authRequestNotSet.code,se.authRequestNotSet.desc)},e.createNoCachedAuthorityError=function(){return new e(se.noCachedAuthorityError.code,se.noCachedAuthorityError.desc)},e.createInvalidCacheTypeError=function(){return new e(se.invalidCacheType.code,""+se.invalidCacheType.desc)},e.createNonBrowserEnvironmentError=function(){return new e(se.notInBrowserEnvironment.code,se.notInBrowserEnvironment.desc)},e.createDatabaseNotOpenError=function(){return new e(se.databaseNotOpen.code,se.databaseNotOpen.desc)},e.createNoNetworkConnectivityError=function(){return new e(se.noNetworkConnectivity.code,se.noNetworkConnectivity.desc)},e.createPostRequestFailedError=function(r,n){return new e(se.postRequestFailed.code,se.postRequestFailed.desc+" | Network client threw: "+r+" | Attempted to reach: "+n.split("?")[0])},e.createGetRequestFailedError=function(r,n){return new e(se.getRequestFailed.code,se.getRequestFailed.desc+" | Network client threw: "+r+" | Attempted to reach: "+n.split("?")[0])},e.createFailedToParseNetworkResponseError=function(r){return new e(se.failedToParseNetworkResponse.code,se.failedToParseNetworkResponse.desc+" | Attempted to reach: "+r.split("?")[0])},e.createUnableToLoadTokenError=function(r){return new e(se.unableToLoadTokenError.code,se.unableToLoadTokenError.desc+" | "+r)},e.createSigningKeyNotFoundInStorageError=function(r){return new e(se.signingKeyNotFoundInStorage.code,se.signingKeyNotFoundInStorage.desc+" | No match found for KeyId: "+r)},e.createAuthCodeRequiredError=function(){return new e(se.authCodeRequired.code,se.authCodeRequired.desc)},e.createAuthCodeOrNativeAccountIdRequiredError=function(){return new e(se.authCodeOrNativeAccountRequired.code,se.authCodeOrNativeAccountRequired.desc)},e.createDatabaseUnavailableError=function(){return new e(se.databaseUnavailable.code,se.databaseUnavailable.desc)},e.createUnableToAcquireTokenFromNativePlatformError=function(){return new e(se.unableToAcquireTokenFromNativePlatform.code,se.unableToAcquireTokenFromNativePlatform.desc)},e.createNativeHandshakeTimeoutError=function(){return new e(se.nativeHandshakeTimeout.code,se.nativeHandshakeTimeout.desc)},e.createNativeExtensionNotInstalledError=function(){return new e(se.nativeExtensionNotInstalled.code,se.nativeExtensionNotInstalled.desc)},e.createNativeConnectionNotEstablishedError=function(){return new e(se.nativeConnectionNotEstablished.code,se.nativeConnectionNotEstablished.desc)},e.createNativeBrokerCalledBeforeInitialize=function(){return new e(se.nativeBrokerCalledBeforeInitialize.code,se.nativeBrokerCalledBeforeInitialize.desc)},e.createNativePromptParameterNotSupportedError=function(){return new e(se.nativePromptNotSupported.code,se.nativePromptNotSupported.desc)},e}(Ee);/*! @azure/msal-browser v2.32.2 2023-01-10 */var po={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"},X2={CHANNEL_ID:"53ee284d-920a-4b59-9d30-a60315b26836",PREFERRED_EXTENSION_ID:"ppnbnpeolgkicgegkbkbjmhlideopiji",MATS_TELEMETRY:"MATS"},Ia;(function(t){t.HandshakeRequest="Handshake",t.HandshakeResponse="HandshakeResponse",t.GetToken="GetToken",t.Response="Response"})(Ia||(Ia={}));var kn;(function(t){t.LocalStorage="localStorage",t.SessionStorage="sessionStorage",t.MemoryStorage="memoryStorage"})(kn||(kn={}));var qo;(function(t){t.GET="GET",t.POST="POST"})(qo||(qo={}));var ut;(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"})(ut||(ut={}));var _l;(function(t){t.WRAPPER_SKU="wrapper.sku",t.WRAPPER_VER="wrapper.version"})(_l||(_l={}));var Vt;(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"})(Vt||(Vt={}));var xe;(function(t){t.Redirect="redirect",t.Popup="popup",t.Silent="silent",t.None="none"})(xe||(xe={}));var yw;(function(t){t.Startup="startup",t.Login="login",t.Logout="logout",t.AcquireToken="acquireToken",t.SsoSilent="ssoSilent",t.HandleRedirect="handleRedirect",t.None="none"})(yw||(yw={}));var _w={scopes:t0},rd="jwk",bw;(function(t){t.React="@azure/msal-react",t.Angular="@azure/msal-angular"})(bw||(bw={}));var H6="msal.db",mF=1,gF=H6+".keys",Zn;(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"})(Zn||(Zn={}));/*! @azure/msal-browser v2.32.2 2023-01-10 */var Qn={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."}},Vp=function(t){pn(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(Qn.redirectUriNotSet.code,Qn.redirectUriNotSet.desc)},e.createPostLogoutRedirectUriEmptyError=function(){return new e(Qn.postLogoutUriNotSet.code,Qn.postLogoutUriNotSet.desc)},e.createStorageNotSupportedError=function(r){return new e(Qn.storageNotSupportedError.code,Qn.storageNotSupportedError.desc+" Given Location: "+r)},e.createRedirectCallbacksNotSetError=function(){return new e(Qn.noRedirectCallbacksSet.code,Qn.noRedirectCallbacksSet.desc)},e.createStubPcaInstanceCalledError=function(){return new e(Qn.stubPcaInstanceCalled.code,Qn.stubPcaInstanceCalled.desc)},e.createInMemoryRedirectUnavailableError=function(){return new e(Qn.inMemRedirectUnavailable.code,Qn.inMemRedirectUnavailable.desc)},e.createEntropyNotProvided=function(){return new e(Qn.entropyNotProvided.code,Qn.entropyNotProvided.desc)},e}(Ee);/*! @azure/msal-browser v2.32.2 2023-01-10 */var ww=function(){function t(e){this.validateWindowStorage(e),this.windowStorage=window[e]}return t.prototype.validateWindowStorage=function(e){if(e!==kn.LocalStorage&&e!==kn.SessionStorage)throw Vp.createStorageNotSupportedError(e);var r=!!window[e];if(!r)throw Vp.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.32.2 2023-01-10 */var T6=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.32.2 2023-01-10 */var q$=function(){function t(){}return t.extractBrowserRequestState=function(e,r){if(fe.isEmpty(r))return null;try{var n=La.parseRequestState(e,r);return n.libraryState.meta}catch(i){throw me.createInvalidStateError(r,i)}},t.parseServerResponseFromHash=function(e){if(!e)return{};var r=new pt(e);return pt.getDeserializedHash(r.getHash())},t}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var R6=function(t){pn(e,t);function e(r,n,i,o){var a=t.call(this,r,i)||this;return a.COOKIE_LIFE_MULTIPLIER=24*60*60*1e3,a.cacheConfig=n,a.logger=o,a.internalStorage=new T6,a.browserStorage=a.setupBrowserStorage(a.cacheConfig.cacheLocation),a.temporaryCacheStorage=a.setupTemporaryCacheStorage(a.cacheConfig.cacheLocation),a.migrateCacheEntries(),a}return e.prototype.setupBrowserStorage=function(r){switch(r){case kn.LocalStorage:case kn.SessionStorage:try{return new ww(r)}catch(n){this.logger.verbose(n);break}}return this.cacheConfig.cacheLocation=kn.MemoryStorage,new T6},e.prototype.setupTemporaryCacheStorage=function(r){switch(r){case kn.LocalStorage:case kn.SessionStorage:try{return new ww(kn.SessionStorage)}catch(n){return this.logger.verbose(n),this.internalStorage}case kn.MemoryStorage:default:return this.internalStorage}},e.prototype.migrateCacheEntries=function(){var r=this,n=$.CACHE_PREFIX+"."+Ir.ID_TOKEN,i=$.CACHE_PREFIX+"."+Ir.CLIENT_INFO,o=$.CACHE_PREFIX+"."+Ir.ERROR,a=$.CACHE_PREFIX+"."+Ir.ERROR_DESC,s=this.browserStorage.getItem(n),c=this.browserStorage.getItem(i),l=this.browserStorage.getItem(o),d=this.browserStorage.getItem(a),h=[s,c,l,d],u=[Ir.ID_TOKEN,Ir.CLIENT_INFO,Ir.ERROR,Ir.ERROR_DESC];u.forEach(function(f,v){return r.migrateCacheEntry(f,h[v])})},e.prototype.migrateCacheEntry=function(r,n){n&&this.setTemporaryCache(r,n,!0)},e.prototype.validateAndParseJson=function(r){try{var n=JSON.parse(r);return n&&typeof n=="object"?n:null}catch{return null}},e.prototype.getItem=function(r){return this.browserStorage.getItem(r)},e.prototype.setItem=function(r,n){this.browserStorage.setItem(r,n)},e.prototype.getAccount=function(r){var n=this.getItem(r);if(!n)return null;var i=this.validateAndParseJson(n);return!i||!hn.isAccountEntity(i)?null:co.toObject(new hn,i)},e.prototype.setAccount=function(r){this.logger.trace("BrowserCacheManager.setAccount called");var n=r.generateAccountKey();this.setItem(n,JSON.stringify(r))},e.prototype.getIdTokenCredential=function(r){var n=this.getItem(r);if(!n)return this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),null;var i=this.validateAndParseJson(n);return!i||!fu.isIdTokenEntity(i)?(this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getIdTokenCredential: cache hit"),co.toObject(new fu,i))},e.prototype.setIdTokenCredential=function(r){this.logger.trace("BrowserCacheManager.setIdTokenCredential called");var n=r.generateCredentialKey();this.setItem(n,JSON.stringify(r))},e.prototype.getAccessTokenCredential=function(r){var n=this.getItem(r);if(!n)return this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),null;var i=this.validateAndParseJson(n);return!i||!pu.isAccessTokenEntity(i)?(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: cache hit"),co.toObject(new pu,i))},e.prototype.setAccessTokenCredential=function(r){this.logger.trace("BrowserCacheManager.setAccessTokenCredential called");var n=r.generateCredentialKey();this.setItem(n,JSON.stringify(r))},e.prototype.getRefreshTokenCredential=function(r){var n=this.getItem(r);if(!n)return this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),null;var i=this.validateAndParseJson(n);return!i||!Pp.isRefreshTokenEntity(i)?(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: cache hit"),co.toObject(new Pp,i))},e.prototype.setRefreshTokenCredential=function(r){this.logger.trace("BrowserCacheManager.setRefreshTokenCredential called");var n=r.generateCredentialKey();this.setItem(n,JSON.stringify(r))},e.prototype.getAppMetadata=function(r){var n=this.getItem(r);if(!n)return this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null;var i=this.validateAndParseJson(n);return!i||!P6.isAppMetadataEntity(r,i)?(this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getAppMetadata: cache hit"),co.toObject(new P6,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||!Dp.isServerTelemetryEntity(r,i)?(this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getServerTelemetry: cache hit"),co.toObject(new Dp,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&&I6.isAuthorityMetadataEntity(r,i)?(this.logger.trace("BrowserCacheManager.getAuthorityMetadata: cache hit"),co.toObject(new I6,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(_l.WRAPPER_SKU,r),this.internalStorage.setItem(_l.WRAPPER_VER,n)},e.prototype.getWrapperMetadata=function(){var r=this.internalStorage.getItem(_l.WRAPPER_SKU)||$.EMPTY_STRING,n=this.internalStorage.getItem(_l.WRAPPER_VER)||$.EMPTY_STRING;return[r,n]},e.prototype.setAuthorityMetadata=function(r,n){this.logger.trace("BrowserCacheManager.setAuthorityMetadata called"),this.internalStorage.setItem(r,JSON.stringify(n))},e.prototype.getActiveAccount=function(){var r=this.generateCacheKey(Ir.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(Ir.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(Ir.ACTIVE_ACCOUNT_FILTERS),i=this.generateCacheKey(Ir.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 me.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||!vw.isThrottlingEntity(r,i)?(this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getThrottlingCache: cache hit"),co.toObject(new vw,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===kn.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){return this.browserStorage.removeItem(r),this.temporaryCacheStorage.removeItem(r),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.removeItem: storeAuthStateInCookie is true, clearing item cookie"),this.clearItemCookie(r)),!0},e.prototype.containsKey=function(r){return this.browserStorage.containsKey(r)||this.temporaryCacheStorage.containsKey(r)},e.prototype.getKeys=function(){return w7(this.browserStorage.getKeys(),this.temporaryCacheStorage.getKeys())},e.prototype.clear=function(){return te(this,void 0,void 0,function(){var r=this;return re(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($.CACHE_PREFIX)!==-1||i.indexOf(r.clientId)!==-1)&&r.removeItem(i)}),this.internalStorage.clear(),[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 $.EMPTY_STRING},e.prototype.clearMsalCookies=function(){var r=this,n=$.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,$.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):fe.startsWith(r,$.CACHE_PREFIX)||fe.startsWith(r,Ir.ADAL_ID_TOKEN)?r:$.CACHE_PREFIX+"."+this.clientId+"."+r},e.prototype.generateAuthorityKey=function(r){var n=La.parseRequestState(this.cryptoImpl,r).libraryState.id;return this.generateCacheKey(ut.AUTHORITY+"."+n)},e.prototype.generateNonceKey=function(r){var n=La.parseRequestState(this.cryptoImpl,r).libraryState.id;return this.generateCacheKey(ut.NONCE_IDTOKEN+"."+n)},e.prototype.generateStateKey=function(r){var n=La.parseRequestState(this.cryptoImpl,r).libraryState.id;return this.generateCacheKey(ut.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:gi.HOME_ACCOUNT_ID};this.setTemporaryCache(ut.CCS_CREDENTIAL,JSON.stringify(d),!0)}else if(!fe.isEmpty(o)){var d={credential:o,type:gi.UPN};this.setTemporaryCache(ut.CCS_CREDENTIAL,JSON.stringify(d),!0)}},e.prototype.resetRequestCache=function(r){var n=this;this.logger.trace("BrowserCacheManager.resetRequestCache called"),fe.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(ut.REQUEST_PARAMS)),this.removeItem(this.generateCacheKey(ut.ORIGIN_URI)),this.removeItem(this.generateCacheKey(ut.URL_HASH)),this.removeItem(this.generateCacheKey(ut.CORRELATION_ID)),this.removeItem(this.generateCacheKey(ut.CCS_CREDENTIAL)),this.removeItem(this.generateCacheKey(ut.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||$.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(ut.REQUEST_STATE)!==-1){var o=n.temporaryCacheStorage.getItem(i);if(o){var a=q$.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(ut.REQUEST_PARAMS,i,!0)},e.prototype.getCachedRequest=function(r,n){this.logger.trace("BrowserCacheManager.getCachedRequest called");var i=this.getTemporaryCache(ut.REQUEST_PARAMS,!0);if(!i)throw ue.createNoTokenRequestCacheError();var o=this.validateAndParseJson(n.base64Decode(i));if(!o)throw ue.createUnableToParseTokenRequestCacheError();if(this.removeItem(this.generateCacheKey(ut.REQUEST_PARAMS)),fe.isEmpty(o.authority)){var a=this.generateAuthorityKey(r),s=this.getTemporaryCache(a);if(!s)throw ue.createNoCachedAuthorityError();o.authority=s}return o},e.prototype.getCachedNativeRequest=function(){this.logger.trace("BrowserCacheManager.getCachedNativeRequest called");var r=this.getTemporaryCache(ut.NATIVE_REQUEST,!0);if(!r)return this.logger.trace("BrowserCacheManager.getCachedNativeRequest: No cached native request found"),null;var n=this.validateAndParseJson(r);return n||(this.logger.error("BrowserCacheManager.getCachedNativeRequest: Unable to parse native request"),null)},e.prototype.isInteractionInProgress=function(r){var n=this.getInteractionInProgress();return r?n===this.clientId:!!n},e.prototype.getInteractionInProgress=function(){var r=$.CACHE_PREFIX+"."+ut.INTERACTION_STATUS_KEY;return this.getTemporaryCache(r,!1)},e.prototype.setInteractionInProgress=function(r){var n=$.CACHE_PREFIX+"."+ut.INTERACTION_STATUS_KEY;if(r){if(this.getInteractionInProgress())throw ue.createInteractionInProgressError();this.setTemporaryCache(n,this.clientId,!1)}else!r&&this.getInteractionInProgress()===this.clientId&&this.removeItem(n)},e.prototype.getLegacyLoginHint=function(){var r=this.getTemporaryCache(Ir.ADAL_ID_TOKEN);r&&(this.browserStorage.removeItem(Ir.ADAL_ID_TOKEN),this.logger.verbose("Cached ADAL id token retrieved."));var n=this.getTemporaryCache(Ir.ID_TOKEN,!0);n&&(this.removeItem(this.generateCacheKey(Ir.ID_TOKEN)),this.logger.verbose("Cached MSAL.js v1 id token retrieved"));var i=n||r;if(i){var o=new da(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(ut.REDIRECT_CONTEXT,!0)},e.prototype.setRedirectRequestContext=function(r){this.setTemporaryCache(ut.REDIRECT_CONTEXT,r,!0)},e}(co),yF=function(t,e){var r={cacheLocation:kn.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1};return new R6(t,r,Ap,e)};/*! @azure/msal-browser v2.32.2 2023-01-10 */var Dm="@azure/msal-browser",kh="2.32.2";/*! @azure/msal-browser v2.32.2 2023-01-10 */var _F=function(){function t(){}return t.prototype.sendGetRequestAsync=function(e,r){return te(this,void 0,void 0,function(){var n,i,o;return re(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,fetch(e,{method:qo.GET,headers:this.getFetchHeaders(r)})];case 1:return n=a.sent(),[3,3];case 2:throw i=a.sent(),window.navigator.onLine?ue.createGetRequestFailedError(i,e):ue.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(),ue.createFailedToParseNetworkResponseError(e);case 6:return[2]}})})},t.prototype.sendPostRequestAsync=function(e,r){return te(this,void 0,void 0,function(){var n,i,o,a;return re(this,function(s){switch(s.label){case 0:n=r&&r.body||$.EMPTY_STRING,s.label=1;case 1:return s.trys.push([1,3,,4]),[4,fetch(e,{method:qo.POST,headers:this.getFetchHeaders(r),body:n})];case 2:return i=s.sent(),[3,4];case 3:throw o=s.sent(),window.navigator.onLine?ue.createPostRequestFailedError(o,e):ue.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(),ue.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.32.2 2023-01-10 */var bF=function(){function t(){}return t.prototype.sendGetRequestAsync=function(e,r){return te(this,void 0,void 0,function(){return re(this,function(n){return[2,this.sendRequestAsync(e,qo.GET,r)]})})},t.prototype.sendPostRequestAsync=function(e,r){return te(this,void 0,void 0,function(){return re(this,function(n){return[2,this.sendRequestAsync(e,qo.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===qo.POST?a(ue.createPostRequestFailedError("Failed with status "+s.status,e)):a(ue.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(ue.createFailedToParseNetworkResponseError(e))}},s.onerror=function(){window.navigator.onLine?r===qo.POST?a(ue.createPostRequestFailedError("Failed with status "+s.status,e)):a(ue.createGetRequestFailedError("Failed with status "+s.status,e)):a(ue.createNoNetworkConnectivityError())},r===qo.POST&&n&&n.body)s.send(n.body);else if(r===qo.GET)s.send();else throw ue.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.32.2 2023-01-10 */var ur=function(){function t(){}return t.clearHash=function(e){e.location.hash=$.EMPTY_STRING,typeof e.history.replaceState=="function"&&e.history.replaceState(null,$.EMPTY_STRING,""+e.location.origin+e.location.pathname+e.location.search)},t.replaceHash=function(e){var r=e.split("#");r.shift(),window.location.hash=r.length>0?r.join("#"):$.EMPTY_STRING},t.isInIframe=function(){return window.parent!==window},t.isInPopup=function(){return typeof window<"u"&&!!window.opener&&window.opener!==window&&typeof window.name=="string"&&window.name.indexOf(po.POPUP_NAME_PREFIX+".")===0},t.getCurrentUri=function(){return window.location.href.split("?")[0].split("#")[0]},t.getHomepage=function(){var e=new pt(window.location.href),r=e.getUrlComponents();return r.Protocol+"//"+r.HostNameAndPort+"/"},t.getBrowserNetworkClient=function(){return window.fetch&&window.Headers?new _F:new bF},t.blockReloadInHiddenIframes=function(){var e=pt.hashContainsKnownProperties(window.location.hash);if(e&&t.isInIframe())throw ue.createBlockReloadInHiddenIframeError()},t.blockRedirectInIframe=function(e,r){var n=t.isInIframe();if(e===xe.Redirect&&n&&!r)throw ue.createRedirectInIframeError(n)},t.blockAcquireTokenInPopups=function(){if(t.isInPopup())throw ue.createBlockAcquireTokenInPopupsError()},t.blockNonBrowserEnvironment=function(e){if(!e)throw ue.createNonBrowserEnvironmentError()},t.blockNativeBrokerCalledBeforeInitialized=function(e,r){if(e&&!r)throw ue.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.32.2 2023-01-10 */var W$=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(po.MSAL_SKU,kh,this.correlationId),this.performanceClient=s}return t.prototype.clearCacheOnLogout=function(e){return te(this,void 0,void 0,function(){return re(this,function(r){switch(r.label){case 0:if(!e)return[3,5];hn.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(hn.generateAccountCacheKey(e))];case 2:return r.sent(),this.logger.verbose("Cleared cache items belonging to the account provided in the logout request."),[3,4];case 3:return r.sent(),this.logger.error("Account provided in logout request was not found. Local cache unchanged."),[3,4];case 4:return[3,9];case 5:return r.trys.push([5,8,,9]),this.logger.verbose("No account provided in logout request, clearing all cache items.",this.correlationId),[4,this.browserStorage.clear()];case 6:return r.sent(),[4,this.browserCrypto.clearKeystore()];case 7:return r.sent(),[3,9];case 8:return r.sent(),this.logger.error("Attempted to clear all MSAL cache items and failed. Local cache unchanged."),[3,9];case 9:return[2]}})})},t.prototype.initializeBaseRequest=function(e){return te(this,void 0,void 0,function(){var r,n,i,o;return re(this,function(a){switch(a.label){case 0:if(this.logger.verbose("Initializing BaseAuthRequest"),r=e.authority||this.config.auth.authority,n=w7(e&&e.scopes||[]),i=ze(ze({},e),{correlationId:this.correlationId,authority:r,scopes:n}),!i.authenticationScheme)i.authenticationScheme=St.BEARER,this.logger.verbose(`Authentication Scheme wasn't explicitly set in request, defaulting to "Bearer" request`);else{if(i.authenticationScheme===St.SSH){if(!e.sshJwk)throw Wt.createMissingSshJwkError();if(!e.sshKid)throw Wt.createMissingSshKidError()}this.logger.verbose('Authentication Scheme set to "'+i.authenticationScheme+'" as configured in Auth request')}return e.claims&&!fe.isEmpty(e.claims)?(o=i,[4,this.browserCrypto.hashString(e.claims)]):[3,2];case 1:o.requestedClaimsHash=a.sent(),a.label=2;case 2:return[2,i]}})})},t.prototype.getRedirectUri=function(e){this.logger.verbose("getRedirectUri called");var r=e||this.config.auth.redirectUri||ur.getCurrentUri();return pt.getAbsoluteUrl(r,ur.getCurrentUri())},t.prototype.initializeServerTelemetryManager=function(e,r){this.logger.verbose("initializeServerTelemetryManager called");var n={clientId:this.config.auth.clientId,correlationId:this.correlationId,apiId:e,forceRefresh:r||!1,wrapperSKU:this.browserStorage.getWrapperMetadata()[0],wrapperVer:this.browserStorage.getWrapperMetadata()[1]};return new pF(n,this.browserStorage)},t.prototype.getDiscoveredAuthority=function(e){return te(this,void 0,void 0,function(){var r;return re(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,Rp.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,Rp.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.32.2 2023-01-10 */var Wd=function(t){pn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.initializeAuthorizationCodeRequest=function(r){return te(this,void 0,void 0,function(){var n,i;return re(this,function(o){switch(o.label){case 0:return this.logger.verbose("initializeAuthorizationRequest called",r.correlationId),[4,this.browserCrypto.generatePkceCodes()];case 1:return n=o.sent(),i=ze(ze({},r),{redirectUri:r.redirectUri,code:$.EMPTY_STRING,codeVerifier:n.verifier}),r.codeChallenge=n.challenge,r.codeChallengeMethod=$.S256_CODE_CHALLENGE_METHOD,[2,i]}})})},e.prototype.initializeLogoutRequest=function(r){this.logger.verbose("initializeLogoutRequest called",r==null?void 0:r.correlationId);var n=ze({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=pt.getAbsoluteUrl(r.postLogoutRedirectUri,ur.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=pt.getAbsoluteUrl(this.config.auth.postLogoutRedirectUri,ur.getCurrentUri())):(this.logger.verbose("Setting postLogoutRedirectUri to current page",n.correlationId),n.postLogoutRedirectUri=pt.getAbsoluteUrl(ur.getCurrentUri(),ur.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 te(this,void 0,void 0,function(){var o;return re(this,function(a){switch(a.label){case 0:return[4,this.getClientConfiguration(r,n,i)];case 1:return o=a.sent(),[2,new F$(o)]}})})},e.prototype.getClientConfiguration=function(r,n,i){return te(this,void 0,void 0,function(){var o,a;return re(this,function(s){switch(s.label){case 0:return this.logger.verbose("getClientConfiguration called",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},cryptoInterface:this.browserCrypto,networkInterface:this.networkClient,storageInterface:this.browserStorage,serverTelemetryManager:r,libraryInfo:{sku:po.MSAL_SKU,version:kh,cpu:$.EMPTY_STRING,os:$.EMPTY_STRING},telemetry:this.config.telemetry}]}})})},e.prototype.validateAndExtractStateFromHash=function(r,n,i){if(this.logger.verbose("validateAndExtractStateFromHash called",i),!r.state)throw ue.createHashDoesNotContainStateError();var o=q$.extractBrowserRequestState(this.browserCrypto,r.state);if(!o)throw ue.createUnableToParseStateError();if(o.interactionType!==n)throw ue.createStateInteractionTypeMismatchError();return this.logger.verbose("Returning state from hash",i),r.state},e.prototype.getDiscoveredAuthority=function(r,n){var i;return te(this,void 0,void 0,function(){var o,a,s,c;return re(this,function(l){switch(l.label){case 0:return this.logger.verbose("getDiscoveredAuthority called",this.correlationId),o=(i=this.performanceClient)===null||i===void 0?void 0:i.startMeasurement(Fr.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=Tp.generateAuthority(s,n||this.config.auth.azureCloudOptions),this.logger.verbose("Creating discovered authority with configured authority",this.correlationId),[4,Rp.createDiscoveredInstance(c,this.config.system.networkClient,this.browserStorage,a,this.logger).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 te(this,void 0,void 0,function(){var i,o,a,s,c,l,d;return re(this,function(h){switch(h.label){case 0:return this.logger.verbose("initializeAuthorizationRequest called",this.correlationId),i=this.getRedirectUri(r.redirectUri),o={interactionType:n},a=La.setRequestState(this.browserCrypto,r&&r.state||$.EMPTY_STRING,o),c=[{}],[4,this.initializeBaseRequest(r)];case 1:return s=ze.apply(void 0,[ze.apply(void 0,c.concat([h.sent()])),{redirectUri:i,state:a,nonce:r.nonce||this.browserCrypto.createNewGuid(),responseMode:Cp.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),fe.isEmpty(s.loginHint)&&!l&&(d=this.browserStorage.getLegacyLoginHint(),d&&(s.loginHint=d)),[2,s]}})})},e}(W$);/*! @azure/msal-browser v2.32.2 2023-01-10 */var C7=function(){function t(e,r,n,i){this.authModule=e,this.browserStorage=r,this.authCodeRequest=n,this.logger=i}return t.prototype.handleCodeResponseFromHash=function(e,r,n,i){return te(this,void 0,void 0,function(){var o,a,s;return re(this,function(c){if(this.logger.verbose("InteractionHandler.handleCodeResponse called"),fe.isEmpty(e))throw ue.createEmptyHashError(e);if(o=this.browserStorage.generateStateKey(r),a=this.browserStorage.getTemporaryCache(o),!a)throw me.createStateNotFoundError("Cached State");try{s=this.authModule.handleFragmentResponse(e,a)}catch(l){throw l instanceof d1&&l.subError===se.userCancelledError.code?ue.createUserCancelledError():l}return[2,this.handleCodeResponseFromServer(s,r,n,i)]})})},t.prototype.handleCodeResponseFromServer=function(e,r,n,i,o){return o===void 0&&(o=!0),te(this,void 0,void 0,function(){var a,s,c,l,d,h;return re(this,function(u){switch(u.label){case 0:if(this.logger.trace("InteractionHandler.handleCodeResponseFromServer called"),a=this.browserStorage.generateStateKey(r),s=this.browserStorage.getTemporaryCache(a),!s)throw me.createStateNotFoundError("Cached State");return c=this.browserStorage.generateNonceKey(s),l=this.browserStorage.getTemporaryCache(c),this.authCodeRequest.code=e.code,e.cloud_instance_host_name?[4,this.updateTokenEndpointAuthority(e.cloud_instance_host_name,n,i)]:[3,2];case 1:u.sent(),u.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)),[4,this.authModule.acquireToken(this.authCodeRequest,e)];case 3:return h=u.sent(),this.browserStorage.cleanRequestByState(r),[2,h]}})})},t.prototype.updateTokenEndpointAuthority=function(e,r,n){return te(this,void 0,void 0,function(){var i,o;return re(this,function(a){switch(a.label){case 0:return i="https://"+e+"/"+r.tenant+"/",[4,Rp.createDiscoveredInstance(i,n,this.browserStorage,r.options,this.logger)];case 1:return o=a.sent(),this.authModule.updateAuthority(o),[2]}})})},t.prototype.checkCcsCredentials=function(){var e=this.browserStorage.getTemporaryCache(ut.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.32.2 2023-01-10 */var xw=function(t){pn(e,t);function e(r,n,i,o,a){var s=t.call(this,r,n,i,o)||this;return s.browserCrypto=a,s}return e.prototype.initiateAuthRequest=function(r,n){return te(this,void 0,void 0,function(){var i,o;return re(this,function(a){switch(a.label){case 0:return this.logger.verbose("RedirectHandler.initiateAuthRequest called"),fe.isEmpty(r)?[3,7]:(n.redirectStartPage&&(this.logger.verbose("RedirectHandler.initiateAuthRequest: redirectStartPage set, caching start page"),this.browserStorage.setTemporaryCache(ut.ORIGIN_URI,n.redirectStartPage,!0)),this.browserStorage.setTemporaryCache(ut.CORRELATION_ID,this.authCodeRequest.correlationId,!0),this.browserStorage.cacheCodeRequest(this.authCodeRequest,this.browserCrypto),this.logger.infoPii("RedirectHandler.initiateAuthRequest: Navigate to: "+r),i={apiId:Vt.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"),ue.createEmptyNavigationUriError();case 8:return[2]}})})},e.prototype.handleCodeResponseFromHash=function(r,n,i,o){return te(this,void 0,void 0,function(){var a,s,c,l,d,h,u;return re(this,function(f){switch(f.label){case 0:if(this.logger.verbose("RedirectHandler.handleCodeResponse called"),fe.isEmpty(r))throw ue.createEmptyHashError(r);if(this.browserStorage.setInteractionInProgress(!1),a=this.browserStorage.generateStateKey(n),s=this.browserStorage.getTemporaryCache(a),!s)throw me.createStateNotFoundError("Cached State");try{c=this.authModule.handleFragmentResponse(r,s)}catch(v){throw v instanceof d1&&v.subError===se.userCancelledError.code?ue.createUserCancelledError():v}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:(h=this.checkCcsCredentials(),h&&(this.authCodeRequest.ccsCredential=h)),[4,this.authModule.acquireToken(this.authCodeRequest,c)];case 3:return u=f.sent(),this.browserStorage.cleanRequestByState(n),[2,u]}})})},e}(C7);/*! @azure/msal-browser v2.32.2 2023-01-10 */var Ve;(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"})(Ve||(Ve={}));/*! @azure/msal-browser v2.32.2 2023-01-10 */var ys;(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"})(ys||(ys={}));var b2={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"}},Xo=function(t){pn(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===ys.PERSISTENT_ERROR||this.ext.status===ys.DISABLED))return!0;switch(this.errorCode){case b2.extensionError.code:return!0;default:return!1}},e.createError=function(r,n,i){if(i&&i.status)switch(i.status){case ys.ACCOUNT_UNAVAILABLE:return go.createNativeAccountUnavailableError();case ys.USER_INTERACTION_REQUIRED:return new go(r,n);case ys.USER_CANCEL:return ue.createUserCancelledError();case ys.NO_NETWORK:return ue.createNoNetworkConnectivityError()}return new e(r,n,i)},e.createUserSwitchError=function(){return new e(b2.userSwitch.code,b2.userSwitch.desc)},e.createTokensNotFoundInCacheError=function(){return new e(b2.tokensNotFoundInCache.code,b2.tokensNotFoundInCache.desc)},e}(Ee);/*! @azure/msal-browser v2.32.2 2023-01-10 */var G$=function(t){pn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.acquireToken=function(r){return te(this,void 0,void 0,function(){var n,i,o,a,s;return re(this,function(c){switch(c.label){case 0:return n=this.performanceClient.startMeasurement(Fr.SilentCacheClientAcquireToken,r.correlationId),i=this.initializeServerTelemetryManager(Vt.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 ue&&s.errorCode===se.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 Ee&&s.errorCode||void 0,subErrorCode:s instanceof Ee&&s.subError||void 0,success:!1}),s;case 5:return[2]}})})},e.prototype.logout=function(){return Promise.reject(ue.createSilentLogoutUnsupportedError())},e.prototype.createSilentFlowClient=function(r,n,i){return te(this,void 0,void 0,function(){var o;return re(this,function(a){switch(a.label){case 0:return[4,this.getClientConfiguration(r,n,i)];case 1:return o=a.sent(),[2,new sF(o,this.performanceClient)]}})})},e.prototype.initializeSilentRequest=function(r,n){return te(this,void 0,void 0,function(){var i;return re(this,function(o){switch(o.label){case 0:return i=[ze({},r)],[4,this.initializeBaseRequest(r)];case 1:return[2,ze.apply(void 0,[ze.apply(void 0,i.concat([o.sent()])),{account:n,forceRefresh:r.forceRefresh||!1}])]}})})},e}(Wd);/*! @azure/msal-browser v2.32.2 2023-01-10 */var Hl=function(t){pn(e,t);function e(r,n,i,o,a,s,c,l,d,h,u,f){var v=t.call(this,r,n,i,o,a,s,l,d,f)||this;return v.apiId=c,v.accountId=h,v.nativeMessageHandler=d,v.nativeStorageManager=u,v.silentCacheClient=new G$(r,v.nativeStorageManager,i,o,a,s,l,d,f),v}return e.prototype.acquireToken=function(r){return te(this,void 0,void 0,function(){var n,i,o,a,s,c,l;return re(this,function(d){switch(d.label){case 0:return this.logger.trace("NativeInteractionClient - acquireToken called."),n=this.performanceClient.startMeasurement(Fr.NativeInteractionClientAcquireToken,r.correlationId),i=Yi.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:Ia.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(h){return n.endMeasurement({success:!0,isNativeBroker:!0,requestId:h.requestId}),h}).catch(function(h){throw n.endMeasurement({success:!1,errorCode:h.errorCode,subErrorCode:h.subError,isNativeBroker:!0}),h})]}})})},e.prototype.createSilentCacheRequest=function(r,n){return{authority:r.authority,correlationId:this.correlationId,scopes:Dn.fromString(r.scope).asArray(),account:n,forceRefresh:!1}},e.prototype.acquireTokensFromCache=function(r,n){return te(this,void 0,void 0,function(){var i,o,a,s,c;return re(this,function(l){switch(l.label){case 0:if(i=this.browserStorage.readAccountFromCacheWithNativeAccountId(r),!i)throw me.createNoAccountFoundError();o=i.getAccountInfo(),l.label=1;case 1:return l.trys.push([1,3,,4]),a=this.createSilentCacheRequest(n,o),[4,this.silentCacheClient.acquireToken(a)];case 2:return s=l.sent(),[2,s];case 3:throw c=l.sent(),c;case 4:return[2]}})})},e.prototype.acquireTokenRedirect=function(r){return te(this,void 0,void 0,function(){var n,i,o,a,s,c;return re(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:Ia.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 Xo&&a.isFatal())throw a;return[3,5];case 5:return this.browserStorage.setTemporaryCache(ut.NATIVE_REQUEST,JSON.stringify(n),!0),s={apiId:Vt.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 te(this,void 0,void 0,function(){var r,n,i,o,a,s,c,l;return re(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=cw(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(ut.NATIVE_REQUEST)),o={method:Ia.GetToken,request:i},a=Yi.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 te(this,void 0,void 0,function(){var o,a,s,c,l,d,h,u,f,v,p,_,m,g,b,w,x,C,S,M,T=this;return re(this,function(I){switch(I.label){case 0:if(this.logger.trace("NativeInteractionClient - handleNativeResponse called."),o=this.getMATSFromResponse(r),this.performanceClient.addStaticFields({extensionId:this.nativeMessageHandler.getExtensionId(),extensionVersion:this.nativeMessageHandler.getExtensionVersion(),matsBrokerVersion:o?o.broker_version:void 0,matsAccountJoinOnStart:o?o.account_join_on_start:void 0,matsAccountJoinOnEnd:o?o.account_join_on_end:void 0,matsDeviceJoin:o?o.device_join:void 0,matsPromptBehavior:o?o.prompt_behavior:void 0,matsApiErrorCode:o?o.api_error_code:void 0,matsUiVisible:o?o.ui_visible:void 0,matsSilentCode:o?o.silent_code:void 0,matsSilentBiSubCode:o?o.silent_bi_sub_code:void 0,matsSilentMessage:o?o.silent_message:void 0,matsSilentStatus:o?o.silent_status:void 0,matsHttpStatus:o?o.http_status:void 0,matsHttpEventCount:o?o.http_event_count:void 0},this.correlationId),r.account.id!==n.accountId)throw Xo.createUserSwitchError();return a=new da(r.id_token||$.EMPTY_STRING,this.browserCrypto),[4,this.getDiscoveredAuthority(n.authority)];case 1:switch(s=I.sent(),c=s.getPreferredCache(),l=hn.generateHomeAccountId(r.client_info||$.EMPTY_STRING,Bi.Default,this.logger,this.browserCrypto,a),d=hn.createAccount(r.client_info,l,a,void 0,void 0,void 0,c,r.account.id),this.browserStorage.setAccount(d),h=r.scope?Dn.fromString(r.scope):Dn.fromString(n.scope),u=r.account.properties||{},f=u.UID||a.claims.oid||a.claims.sub||$.EMPTY_STRING,v=u.TenantId||a.claims.tid||$.EMPTY_STRING,_=St.BEARER,m=n.tokenType,m){case St.POP:return[3,2]}return[3,4];case 2:if(_=St.POP,r.shr)return this.logger.trace("handleNativeServerResponse: SHR is enabled in native layer"),p=r.shr,[3,5];if(g=new td(this.browserCrypto),b={resourceRequestMethod:n.resourceRequestMethod,resourceRequestUri:n.resourceRequestUri,shrClaims:n.shrClaims,shrNonce:n.shrNonce},!n.keyId)throw me.createKeyIdMissingError();return[4,g.signPopToken(r.access_token,n.keyId,b)];case 3:return p=I.sent(),[3,5];case 4:p=r.access_token,I.label=5;case 5:return w={authority:s.canonicalAuthority,uniqueId:f,tenantId:v,scopes:h.asArray(),account:d.getAccountInfo(),idToken:r.id_token,idTokenClaims:a.claims,accessToken:p,fromCache:o?this.isResponseFromCache(o):!1,expiresOn:new Date(Number(i+r.expires_in)*1e3),tokenType:_,correlationId:this.correlationId,state:r.state,fromNativeBroker:!0},x=fu.createIdTokenEntity(l,n.authority,r.id_token||$.EMPTY_STRING,n.clientId,a.claims.tid||$.EMPTY_STRING),this.nativeStorageManager.setIdTokenCredential(x),C=_===St.POP?$.SHR_NONCE_VALIDITY:(typeof r.expires_in=="string"?parseInt(r.expires_in,10):r.expires_in)||0,S=i+C,M=pu.createAccessTokenEntity(l,n.authority,p,n.clientId,v,h.printScopes(),S,0,this.browserCrypto),this.nativeStorageManager.setAccessTokenCredential(M),this.browserStorage.removeAccountContext(d).catch(function(N){T.logger.error("Error occurred while removing account context from browser storage. "+N)}),[2,w]}})})},e.prototype.validateNativeResponse=function(r){if(r.hasOwnProperty("access_token")&&r.hasOwnProperty("id_token")&&r.hasOwnProperty("client_info")&&r.hasOwnProperty("account")&&r.hasOwnProperty("scope")&&r.hasOwnProperty("expires_in"))return r;throw Xo.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 te(this,void 0,void 0,function(){var n,i,o,a,s,c,l,d,h,u,f=this;return re(this,function(v){switch(v.label){case 0:return this.logger.trace("NativeInteractionClient - initializeNativeRequest called"),n=r.authority||this.config.auth.authority,i=new pt(n),i.validateAsUri(),o=r.scopes,a=cw(r,["scopes"]),s=new Dn(o||[]),s.appendScopes(t0),c=function(){switch(f.apiId){case Vt.ssoSilent:case Vt.acquireTokenSilent_silentFlow:return f.logger.trace("initializeNativeRequest: silent request sets prompt to none"),$n.NONE}if(!r.prompt){f.logger.trace("initializeNativeRequest: prompt was not provided");return}switch(r.prompt){case $n.NONE:case $n.CONSENT:case $n.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"),ue.createNativePromptParameterNotSupportedError()}},l=ze(ze({},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:ze(ze(ze({},r.extraQueryParameters),r.tokenQueryParameters),{telemetry:X2.MATS_TELEMETRY}),extendedExpiryToken:!1}),r.authenticationScheme!==St.POP?[3,2]:(d={resourceRequestUri:r.resourceRequestUri,resourceRequestMethod:r.resourceRequestMethod,shrClaims:r.shrClaims,shrNonce:r.shrNonce},h=new td(this.browserCrypto),[4,h.generateCnf(d)]);case 1:u=v.sent(),l.reqCnf=u.reqCnfHash,l.keyId=u.kid,v.label=2;case 2:return[2,l]}})})},e}(W$);/*! @azure/msal-browser v2.32.2 2023-01-10 */var r1=function(){function t(e,r,n){this.logger=e,this.handshakeTimeoutMs=r,this.extensionId=n,this.resolvers=new Map,this.handshakeResolvers=new Map,this.responseId=0,this.messageChannel=new MessageChannel,this.windowListener=this.onWindowMessage.bind(this)}return t.prototype.sendMessage=function(e){return te(this,void 0,void 0,function(){var r,n=this;return re(this,function(i){return this.logger.trace("NativeMessageHandler - sendMessage called."),r={channel:X2.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){return te(this,void 0,void 0,function(){var n,i;return re(this,function(o){switch(o.label){case 0:e.trace("NativeMessageHandler - createProvider called."),o.label=1;case 1:return o.trys.push([1,3,,5]),n=new t(e,r,X2.PREFERRED_EXTENSION_ID),[4,n.sendHandshakeRequest()];case 2:return o.sent(),[2,n];case 3:return o.sent(),i=new t(e,r),[4,i.sendHandshakeRequest()];case 4:return o.sent(),[2,i];case 5:return[2]}})})},t.prototype.sendHandshakeRequest=function(){return te(this,void 0,void 0,function(){var e,r=this;return re(this,function(n){return this.logger.trace("NativeMessageHandler - sendHandshakeRequest called."),window.addEventListener("message",this.windowListener,!1),e={channel:X2.CHANNEL_ID,extensionId:this.extensionId,responseId:this.responseId++,body:{method:Ia.HandshakeRequest}},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(),o(ue.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!==X2.CHANNEL_ID)&&!(r.extensionId&&r.extensionId!==this.extensionId)&&r.body.method===Ia.HandshakeRequest){this.logger.verbose(r.extensionId?"Extension with id: "+r.extensionId+" not installed":"No extension installed"),clearTimeout(this.timeoutId),this.messageChannel.port1.close(),this.messageChannel.port2.close(),window.removeEventListener("message",this.windowListener,!1);var n=this.handshakeResolvers.get(r.responseId);n&&n.reject(ue.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===Ia.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(Xo.createError(a.code,a.description,a.ext));else if(a.result)a.result.code&&a.result.description?n.reject(Xo.createError(a.result.code,a.result.description,a.result.ext)):n.resolve(a.result);else throw Ee.createUnexpectedError("Event does not contain result.");this.resolvers.delete(r.responseId)}else if(o===Ia.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),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 St.BEARER:case St.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.32.2 2023-01-10 */var wF=function(t){pn(e,t);function e(r,n,i,o,a,s,c,l,d,h){var u=t.call(this,r,n,i,o,a,s,c,d,h)||this;return u.nativeStorage=l,u}return e.prototype.acquireToken=function(r){return te(this,void 0,void 0,function(){var n,i,o,a,s,c,l,d,h,u=this;return re(this,function(f){switch(f.label){case 0:return[4,this.initializeAuthorizationRequest(r,xe.Redirect)];case 1:n=f.sent(),this.browserStorage.updateCacheEntries(n.state,n.nonce,n.authority,n.loginHint||$.EMPTY_STRING,n.account||null),i=this.initializeServerTelemetryManager(Vt.acquireTokenRedirect),o=function(v){v.persisted&&(u.logger.verbose("Page was restored from back/forward cache. Clearing temporary cache."),u.browserStorage.cleanRequestByState(n.state))},f.label=2;case 2:return f.trys.push([2,7,,8]),[4,this.initializeAuthorizationCodeRequest(n)];case 3:return a=f.sent(),[4,this.createAuthCodeClient(i,n.authority,n.azureCloudOptions)];case 4:return s=f.sent(),this.logger.verbose("Auth code client created"),c=new xw(s,this.browserStorage,a,this.logger,this.browserCrypto),[4,s.getAuthCodeUrl(ze(ze({},n),{nativeBroker:r1.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 h=f.sent(),h instanceof Ee&&h.setCorrelationId(this.correlationId),window.removeEventListener("pageshow",o),i.cacheFailedRequest(h),this.browserStorage.cleanRequestByState(n.state),h;case 8:return[2]}})})},e.prototype.handleRedirectPromise=function(r){return te(this,void 0,void 0,function(){var n,i,o,a,s,c,l,d,h,u,f,v;return re(this,function(p){switch(p.label){case 0:n=this.initializeServerTelemetryManager(Vt.handleRedirectPromise),p.label=1;case 1:if(p.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(xe.Redirect),[2,null];o=void 0;try{a=pt.getDeserializedHash(i),o=this.validateAndExtractStateFromHash(a,xe.Redirect),this.logger.verbose("State extracted from hash")}catch(_){return this.logger.info("handleRedirectPromise was unable to extract state due to: "+_),this.browserStorage.cleanRequestByInteractionType(xe.Redirect),[2,null]}return s=this.browserStorage.getTemporaryCache(ut.ORIGIN_URI,!0)||$.EMPTY_STRING,c=pt.removeHashFromUrl(s),l=pt.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=p.sent(),s.indexOf("#")>-1&&ur.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!ur.isInIframe()||this.config.system.allowRedirectInIframe?(this.browserStorage.setTemporaryCache(ut.URL_HASH,i,!0),h={apiId:Vt.handleRedirectPromise,timeout:this.config.system.redirectNavigationTimeout,noHistory:!0},u=!0,!s||s==="null"?(f=ur.getHomepage(),this.browserStorage.setTemporaryCache(ut.ORIGIN_URI,f,!0),this.logger.warning("Unable to get valid login request url from cache, redirecting to home page"),[4,this.navigationClient.navigateInternal(f,h)]):[3,6]):[3,9];case 5:return u=p.sent(),[3,8];case 6:return this.logger.verbose("Navigating to loginRequestUrl: "+s),[4,this.navigationClient.navigateInternal(s,h)];case 7:u=p.sent(),p.label=8;case 8:if(!u)return[2,this.handleHash(i,o,n)];p.label=9;case 9:return[2,null];case 10:throw v=p.sent(),v instanceof Ee&&v.setCorrelationId(this.correlationId),n.cacheFailedRequest(v),this.browserStorage.cleanRequestByInteractionType(xe.Redirect),v;case 11:return[2]}})})},e.prototype.getRedirectResponseHash=function(r){this.logger.verbose("getRedirectResponseHash called");var n=pt.hashContainsKnownProperties(r);if(n)return ur.clearHash(window),this.logger.verbose("Hash contains known properties, returning response hash"),r;var i=this.browserStorage.getTemporaryCache(ut.URL_HASH,!0);return this.browserStorage.removeItem(this.browserStorage.generateCacheKey(ut.URL_HASH)),this.logger.verbose("Hash does not contain known properties, returning cached hash"),i},e.prototype.handleHash=function(r,n,i){return te(this,void 0,void 0,function(){var o,a,s,c,l,d,h,u=this;return re(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=pt.getDeserializedHash(r),a.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),!this.nativeMessageHandler)throw ue.createNativeConnectionNotEstablishedError();return s=new Hl(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Vt.acquireTokenPopup,this.performanceClient,this.nativeMessageHandler,a.accountId,this.browserStorage,o.correlationId),c=La.parseRequestState(this.browserCrypto,n).userRequestState,[2,s.acquireToken(ze(ze({},o),{state:c,prompt:void 0})).finally(function(){u.browserStorage.cleanRequestByState(n)})]}if(l=this.browserStorage.getCachedAuthority(n),!l)throw ue.createNoCachedAuthorityError();return[4,this.createAuthCodeClient(i,l)];case 1:return d=f.sent(),this.logger.verbose("Auth code client created"),$p.removeThrottle(this.browserStorage,this.config.auth.clientId,o),h=new xw(d,this.browserStorage,o,this.logger,this.browserCrypto),[4,h.handleCodeResponseFromHash(r,n,d.authority,this.networkClient)];case 2:return[2,f.sent()]}})})},e.prototype.logout=function(r){return te(this,void 0,void 0,function(){var n,i,o,a,s,c,l;return re(this,function(d){switch(d.label){case 0:this.logger.verbose("logoutRedirect called"),n=this.initializeLogoutRequest(r),i=this.initializeServerTelemetryManager(Vt.logout),d.label=1;case 1:return d.trys.push([1,10,,11]),this.eventHandler.emitEvent(Ve.LOGOUT_START,xe.Redirect,r),[4,this.clearCacheOnLogout(n.account)];case 2:return d.sent(),o={apiId:Vt.logout,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},[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(Ve.LOGOUT_SUCCESS,xe.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 Ee&&l.setCorrelationId(this.correlationId),i.cacheFailedRequest(l),this.eventHandler.emitEvent(Ve.LOGOUT_FAILURE,xe.Redirect,null,l),this.eventHandler.emitEvent(Ve.LOGOUT_END,xe.Redirect),l;case 11:return this.eventHandler.emitEvent(Ve.LOGOUT_END,xe.Redirect),[2]}})})},e.prototype.getRedirectStartPage=function(r){var n=r||window.location.href;return pt.getAbsoluteUrl(n,ur.getCurrentUri())},e}(Wd);/*! @azure/msal-browser v2.32.2 2023-01-10 */var xF=function(t){pn(e,t);function e(r,n,i,o,a,s,c,l,d,h){var u=t.call(this,r,n,i,o,a,s,c,d,h)||this;return u.unloadWindow=u.unloadWindow.bind(u),u.nativeStorage=l,u}return e.prototype.acquireToken=function(r){try{var n=this.generatePopupName(r.scopes||t0,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 te(this,void 0,void 0,function(){var a,s,c,l,d,h,u,f,v,p,_,m,g,b,w,x,C,S=this;return re(this,function(M){switch(M.label){case 0:return this.logger.verbose("acquireTokenPopupAsync called"),a=this.initializeServerTelemetryManager(Vt.acquireTokenPopup),[4,this.initializeAuthorizationRequest(r,xe.Popup)];case 1:s=M.sent(),this.browserStorage.updateCacheEntries(s.state,s.nonce,s.authority,s.loginHint||$.EMPTY_STRING,s.account||null),M.label=2;case 2:return M.trys.push([2,8,,9]),[4,this.initializeAuthorizationCodeRequest(s)];case 3:return c=M.sent(),[4,this.createAuthCodeClient(a,s.authority,s.azureCloudOptions)];case 4:return l=M.sent(),this.logger.verbose("Auth code client created"),d=r1.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,r.authenticationScheme),h=void 0,d&&(h=this.performanceClient.startMeasurement(Fr.FetchAccountIdWithNativeBroker,r.correlationId)),[4,l.getAuthCodeUrl(ze(ze({},s),{nativeBroker:d}))];case 5:return u=M.sent(),f=new C7(l,this.browserStorage,c,this.logger),v={popup:o,popupName:n,popupWindowAttributes:i},p=this.initiateAuthRequest(u,v),this.eventHandler.emitEvent(Ve.POPUP_OPENED,xe.Popup,{popupWindow:p},null),[4,this.monitorPopupForHash(p)];case 6:if(_=M.sent(),m=pt.getDeserializedHash(_),g=this.validateAndExtractStateFromHash(m,xe.Popup,s.correlationId),$p.removeThrottle(this.browserStorage,this.config.auth.clientId,c),m.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),h&&h.endMeasurement({success:!0,isNativeBroker:!0}),!this.nativeMessageHandler)throw ue.createNativeConnectionNotEstablishedError();return b=new Hl(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Vt.acquireTokenPopup,this.performanceClient,this.nativeMessageHandler,m.accountId,this.nativeStorage,s.correlationId),w=La.parseRequestState(this.browserCrypto,g).userRequestState,[2,b.acquireToken(ze(ze({},s),{state:w,prompt:void 0})).finally(function(){S.browserStorage.cleanRequestByState(g)})]}return[4,f.handleCodeResponseFromHash(_,g,l.authority,this.networkClient)];case 7:return x=M.sent(),[2,x];case 8:throw C=M.sent(),o&&o.close(),C instanceof Ee&&C.setCorrelationId(this.correlationId),a.cacheFailedRequest(C),this.browserStorage.cleanRequestByState(s.state),C;case 9:return[2]}})})},e.prototype.logoutPopupAsync=function(r,n,i,o,a,s){return te(this,void 0,void 0,function(){var c,l,d,h,u,f,v;return re(this,function(p){switch(p.label){case 0:this.logger.verbose("logoutPopupAsync called"),this.eventHandler.emitEvent(Ve.LOGOUT_START,xe.Popup,r),c=this.initializeServerTelemetryManager(Vt.logoutPopup),p.label=1;case 1:return p.trys.push([1,5,,6]),[4,this.clearCacheOnLogout(r.account)];case 2:return p.sent(),[4,this.createAuthCodeClient(c,o)];case 3:return l=p.sent(),this.logger.verbose("Auth code client created"),d=l.getLogoutUri(r),this.eventHandler.emitEvent(Ve.LOGOUT_SUCCESS,xe.Popup,r),h=this.openPopup(d,{popupName:n,popupWindowAttributes:i,popup:a}),this.eventHandler.emitEvent(Ve.POPUP_OPENED,xe.Popup,{popupWindow:h},null),[4,this.waitForLogoutPopup(h)];case 4:return p.sent(),s?(u={apiId:Vt.logoutPopup,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},f=pt.getAbsoluteUrl(s,ur.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,u)):this.logger.verbose("No main window navigation requested"),[3,6];case 5:throw v=p.sent(),a&&a.close(),v instanceof Ee&&v.setCorrelationId(this.correlationId),this.browserStorage.setInteractionInProgress(!1),this.eventHandler.emitEvent(Ve.LOGOUT_FAILURE,xe.Popup,null,v),this.eventHandler.emitEvent(Ve.LOGOUT_END,xe.Popup),c.cacheFailedRequest(v),v;case 6:return this.eventHandler.emitEvent(Ve.LOGOUT_END,xe.Popup),[2]}})})},e.prototype.initiateAuthRequest=function(r,n){if(fe.isEmpty(r))throw this.logger.error("Navigate url is empty"),ue.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(ue.createUserCancelledError());return}var l=$.EMPTY_STRING,d=$.EMPTY_STRING;try{l=r.location.href,d=r.location.hash}catch{}fe.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),pt.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(ue.createHashDoesNotContainKnownPropertiesError()))):s>a&&(n.logger.error("PopupHandler.monitorPopupForHash - unable to find hash in url, timing out"),clearInterval(c),o(ue.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=$.EMPTY_STRING;try{a=r.location.href}catch{}fe.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 ue.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),ue.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,h=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,u=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,f=(o=i.popupSize)===null||o===void 0?void 0:o.width,v=(a=i.popupSize)===null||a===void 0?void 0:a.height,p=(s=i.popupPosition)===null||s===void 0?void 0:s.top,_=(c=i.popupPosition)===null||c===void 0?void 0:c.left;return(!f||f<0||f>h)&&(this.logger.verbose("Default popup window width used. Window width not configured or invalid."),f=po.POPUP_WIDTH),(!v||v<0||v>u)&&(this.logger.verbose("Default popup window height used. Window height not configured or invalid."),v=po.POPUP_HEIGHT),(!p||p<0||p>u)&&(this.logger.verbose("Default popup window top position used. Window top not configured or invalid."),p=Math.max(0,u/2-po.POPUP_HEIGHT/2+d)),(!_||_<0||_>h)&&(this.logger.verbose("Default popup window left position used. Window left not configured or invalid."),_=Math.max(0,h/2-po.POPUP_WIDTH/2+l)),window.open(r,n,"width="+f+", height="+v+", top="+p+", left="+_+", scrollbars=yes")},e.prototype.unloadWindow=function(r){this.browserStorage.cleanRequestByInteractionType(xe.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 po.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 po.POPUP_NAME_PREFIX+"."+this.config.auth.clientId+"."+n+"."+this.correlationId},e}(Wd);/*! @azure/msal-browser v2.32.2 2023-01-10 */var zF=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.32.2 2023-01-10 */var CF=6e4,D6=6e3,kF=3e4,EF=2e3;function SF(t,e){var r=t.auth,n=t.cache,i=t.system,o=t.telemetry,a={clientId:$.EMPTY_STRING,authority:""+$.DEFAULT_AUTHORITY,knownAuthorities:[],cloudDiscoveryMetadata:$.EMPTY_STRING,authorityMetadata:$.EMPTY_STRING,redirectUri:$.EMPTY_STRING,postLogoutRedirectUri:$.EMPTY_STRING,navigateToLoginRequestUrl:!0,clientCapabilities:[],protocolMode:Hp.AAD,azureCloudOptions:{azureCloudInstance:hu.None,tenant:$.EMPTY_STRING},skipAuthorityMetadataCache:!1},s={cacheLocation:kn.SessionStorage,storeAuthStateInCookie:!1,secureCookies:!1},c={loggerCallback:function(){},logLevel:lr.Info,piiLoggingEnabled:!1},l=ze(ze({},N$),{loggerOptions:c,networkClient:e?ur.getBrowserNetworkClient():uF,navigationClient:new zF,loadFrameTimeout:0,windowHashTimeout:(i==null?void 0:i.loadFrameTimeout)||CF,iframeHashTimeout:(i==null?void 0:i.loadFrameTimeout)||D6,navigateFrameWait:e&&ur.detectIEOrEdge()?500:0,redirectNavigationTimeout:kF,asyncPopups:!1,allowRedirectInIframe:!1,allowNativeBroker:!1,nativeBrokerHandshakeTimeout:(i==null?void 0:i.nativeBrokerHandshakeTimeout)||EF,pollIntervalMilliseconds:po.DEFAULT_POLL_INTERVAL_MS,cryptoOptions:{useMsrCrypto:!1,entropy:void 0}}),d=ze(ze({},i),{loggerOptions:(i==null?void 0:i.loggerOptions)||c}),h={application:{appName:$.EMPTY_STRING,appVersion:$.EMPTY_STRING}},u={auth:ze(ze({},a),r),cache:ze(ze({},s),n),system:ze(ze({},l),d),telemetry:ze(ze({},h),o)};return u}/*! @azure/msal-browser v2.32.2 2023-01-10 */var K$=function(t){pn(e,t);function e(r,n,i,o,a){var s=t.call(this,r,n,i,o)||this;return s.navigateFrameWait=a.navigateFrameWait,s.pollIntervalMilliseconds=a.pollIntervalMilliseconds,s}return e.prototype.initiateAuthRequest=function(r){return te(this,void 0,void 0,function(){var n;return re(this,function(i){switch(i.label){case 0:if(fe.isEmpty(r))throw this.logger.info("Navigate url is empty"),ue.createEmptyNavigationUriError();return this.navigateFrameWait?[4,this.loadFrame(r)]:[3,2];case 1:return n=i.sent(),[3,3];case 2:n=this.loadFrameSync(r),i.label=3;case 3:return[2,n]}})})},e.prototype.monitorIframeForHash=function(r,n){var i=this;return new Promise(function(o,a){n<D6&&i.logger.warning("system.loadFrameTimeout or system.iframeHashTimeout set to lower ("+n+"ms) than the default ("+D6+"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(ue.createMonitorIframeTimeoutError());return}var d=$.EMPTY_STRING,h=r.contentWindow;try{d=h?h.location.href:$.EMPTY_STRING}catch{}if(!fe.isEmpty(d)){var u=h?h.location.hash:$.EMPTY_STRING;if(pt.hashContainsKnownProperties(u)){i.removeHiddenIframe(r),clearInterval(l),o(u);return}}},i.pollIntervalMilliseconds)})},e.prototype.loadFrame=function(r){var n=this;return 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}(C7);/*! @azure/msal-browser v2.32.2 2023-01-10 */var AF=function(t){pn(e,t);function e(r,n,i,o,a,s,c,l,d,h,u){var f=t.call(this,r,n,i,o,a,s,l,h,u)||this;return f.apiId=c,f.nativeStorage=d,f}return e.prototype.acquireToken=function(r){return te(this,void 0,void 0,function(){var n,i,o,a,s;return re(this,function(c){switch(c.label){case 0:if(this.logger.verbose("acquireTokenByIframe called"),n=this.performanceClient.startMeasurement(Fr.SilentIframeClientAcquireToken,r.correlationId),fe.isEmpty(r.loginHint)&&fe.isEmpty(r.sid)&&(!r.account||fe.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!==$n.NONE&&r.prompt!==$n.NO_SESSION)throw n.endMeasurement({success:!1}),ue.createSilentPromptValueError(r.prompt);return[4,this.initializeAuthorizationRequest(ze(ze({},r),{prompt:r.prompt||$n.NONE}),xe.Silent)];case 1:i=c.sent(),this.browserStorage.updateCacheEntries(i.state,i.nonce,i.authority,i.loginHint||$.EMPTY_STRING,i.account||null),o=this.initializeServerTelemetryManager(this.apiId),c.label=2;case 2:return c.trys.push([2,5,,6]),[4,this.createAuthCodeClient(o,i.authority,i.azureCloudOptions)];case 3:return a=c.sent(),this.logger.verbose("Auth code client created"),[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 Ee&&s.setCorrelationId(this.correlationId),o.cacheFailedRequest(s),this.browserStorage.cleanRequestByState(i.state),n.endMeasurement({errorCode:s instanceof Ee&&s.errorCode||void 0,subErrorCode:s instanceof Ee&&s.subError||void 0,success:!1}),s;case 6:return[2]}})})},e.prototype.logout=function(){return Promise.reject(ue.createSilentLogoutUnsupportedError())},e.prototype.silentTokenHelper=function(r,n){return te(this,void 0,void 0,function(){var i,o,a,s,c,l,d,h,u,f=this;return re(this,function(v){switch(v.label){case 0:return[4,this.initializeAuthorizationCodeRequest(n)];case 1:return i=v.sent(),[4,r.getAuthCodeUrl(ze(ze({},n),{nativeBroker:r1.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,n.authenticationScheme)}))];case 2:return o=v.sent(),a=new K$(r,this.browserStorage,i,this.logger,this.config.system),[4,a.initiateAuthRequest(o)];case 3:return s=v.sent(),[4,a.monitorIframeForHash(s,this.config.system.iframeHashTimeout)];case 4:if(c=v.sent(),l=pt.getDeserializedHash(c),d=this.validateAndExtractStateFromHash(l,xe.Silent,i.correlationId),l.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),!this.nativeMessageHandler)throw ue.createNativeConnectionNotEstablishedError();return h=new Hl(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.apiId,this.performanceClient,this.nativeMessageHandler,l.accountId,this.browserStorage,this.correlationId),u=La.parseRequestState(this.browserCrypto,d).userRequestState,[2,h.acquireToken(ze(ze({},n),{state:u,prompt:n.prompt||$n.NONE})).finally(function(){f.browserStorage.cleanRequestByState(d)})]}return[2,a.handleCodeResponseFromHash(c,d,r.authority,this.networkClient)]}})})},e}(Wd);/*! @azure/msal-browser v2.32.2 2023-01-10 */var MF=function(t){pn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.acquireToken=function(r){return te(this,void 0,void 0,function(){var n,i,o,a,s,c=this;return re(this,function(l){switch(l.label){case 0:return i=[ze({},r)],[4,this.initializeBaseRequest(r)];case 1:return n=ze.apply(void 0,i.concat([l.sent()])),o=this.performanceClient.startMeasurement(Fr.SilentRefreshClientAcquireToken,n.correlationId),a=this.initializeServerTelemetryManager(Vt.acquireTokenSilent_silentFlow),[4,this.createRefreshTokenClient(a,n.authority,n.azureCloudOptions)];case 2:return s=l.sent(),this.logger.verbose("Refresh token client created"),[2,s.acquireTokenByRefreshToken(n).then(function(d){return o.endMeasurement({success:!0,fromCache:d.fromCache,requestId:d.requestId}),d}).catch(function(d){throw d instanceof Ee&&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(ue.createSilentLogoutUnsupportedError())},e.prototype.createRefreshTokenClient=function(r,n,i){return te(this,void 0,void 0,function(){var o;return re(this,function(a){switch(a.label){case 0:return[4,this.getClientConfiguration(r,n,i)];case 1:return o=a.sent(),[2,new B$(o,this.performanceClient)]}})})},e}(Wd);/*! @azure/msal-browser v2.32.2 2023-01-10 */var $F=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"||!hn.isAccountEntity(n))return;var i=co.toObject(new hn,n),o=i.getAccountInfo();!e.oldValue&&e.newValue?(this.logger.info("Account was added to cache in a different window"),this.emitEvent(Ve.ACCOUNT_ADDED,void 0,o)):!e.newValue&&e.oldValue&&(this.logger.info("Account was removed from cache in a different window"),this.emitEvent(Ve.ACCOUNT_REMOVED,void 0,o))}catch{return}},t}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var wn=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.32.2 2023-01-10 */var Y$=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,wn.decimalToHex(e[0])+wn.decimalToHex(e[1])+wn.decimalToHex(e[2])+wn.decimalToHex(e[3])+"-"+wn.decimalToHex(e[4])+wn.decimalToHex(e[5])+"-"+wn.decimalToHex(e[6])+wn.decimalToHex(e[7])+"-"+wn.decimalToHex(e[8])+wn.decimalToHex(e[9])+"-"+wn.decimalToHex(e[10])+wn.decimalToHex(e[11])+wn.decimalToHex(e[12])+wn.decimalToHex(e[13])+wn.decimalToHex(e[14])+wn.decimalToHex(e[15])}catch{for(var r="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx",n="0123456789abcdef",i=0,o=$.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.32.2 2023-01-10 */var Oa=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=$.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.32.2 2023-01-10 */var X$=function(){function t(){}return t.prototype.urlEncode=function(e){return encodeURIComponent(this.encode(e).replace(/=/g,$.EMPTY_STRING).replace(/\+/g,"-").replace(/\//g,"_"))},t.prototype.urlEncodeArr=function(e){return this.base64EncArr(e).replace(/=/g,$.EMPTY_STRING).replace(/\+/g,"-").replace(/\//g,"_")},t.prototype.encode=function(e){var r=Oa.stringToUtf8Arr(e);return this.base64EncArr(r)},t.prototype.base64EncArr=function(e){for(var r=(3-e.length%3)%3,n=$.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.32.2 2023-01-10 */var PF=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 Oa.utf8ArrToString(n)},t.prototype.base64DecToArr=function(e,r){for(var n=e.replace(/[^A-Za-z0-9\+\/]/g,$.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,h=0;h<i;h++)if(c=h&3,l|=this.b64ToUint6(n.charCodeAt(h))<<18-6*c,c===3||i-h===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.32.2 2023-01-10 */var IF=32,HF=function(){function t(e){this.base64Encode=new X$,this.cryptoObj=e}return t.prototype.generateCodes=function(){return te(this,void 0,void 0,function(){var e,r;return re(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(IF);this.cryptoObj.getRandomValues(e);var r=this.base64Encode.urlEncodeArr(e);return r}catch(n){throw ue.createPkceNotGeneratedError(n)}},t.prototype.generateCodeChallengeFromVerifier=function(e){return te(this,void 0,void 0,function(){var r,n;return re(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(),ue.createPkceNotGeneratedError(n);case 3:return[2]}})})},t}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var TF=function(){function t(){}return t.prototype.getRandomValues=function(e){return window.crypto.getRandomValues(e)},t.prototype.generateKey=function(e,r,n){return te(this,void 0,void 0,function(){return re(this,function(i){return[2,window.crypto.subtle.generateKey(e,r,n)]})})},t.prototype.exportKey=function(e){return te(this,void 0,void 0,function(){return re(this,function(r){return[2,window.crypto.subtle.exportKey(rd,e)]})})},t.prototype.importKey=function(e,r,n,i){return te(this,void 0,void 0,function(){return re(this,function(o){return[2,window.crypto.subtle.importKey(rd,e,r,n,i)]})})},t.prototype.sign=function(e,r,n){return te(this,void 0,void 0,function(){return re(this,function(i){return[2,window.crypto.subtle.sign(e,r,n)]})})},t.prototype.digest=function(e,r){return te(this,void 0,void 0,function(){return re(this,function(n){return[2,window.crypto.subtle.digest(e,r)]})})},t}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var RF=function(){function t(){}return t.prototype.initPrng=function(e){return window.msrCrypto.initPrng(w7(e))},t.prototype.getRandomValues=function(e){return window.msrCrypto.getRandomValues(e)},t.prototype.generateKey=function(e,r,n){return te(this,void 0,void 0,function(){return re(this,function(i){return[2,window.msrCrypto.subtle.generateKey(e,r,n)]})})},t.prototype.exportKey=function(e){return te(this,void 0,void 0,function(){return re(this,function(r){return[2,window.msrCrypto.subtle.exportKey(rd,e)]})})},t.prototype.importKey=function(e,r,n,i){return te(this,void 0,void 0,function(){return re(this,function(o){return[2,window.msrCrypto.subtle.importKey(rd,e,r,n,i)]})})},t.prototype.sign=function(e,r,n){return te(this,void 0,void 0,function(){return re(this,function(i){return[2,window.msrCrypto.subtle.sign(e,r,n)]})})},t.prototype.digest=function(e,r){return te(this,void 0,void 0,function(){return re(this,function(n){return[2,window.msrCrypto.subtle.digest(e,r)]})})},t}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var DF=function(){function t(){}return t.prototype.getRandomValues=function(e){return window.msCrypto.getRandomValues(e)},t.prototype.generateKey=function(e,r,n){return te(this,void 0,void 0,function(){return re(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 te(this,void 0,void 0,function(){return re(this,function(r){return[2,new Promise(function(n,i){var o=window.msCrypto.subtle.exportKey(rd,e);o.addEventListener("complete",function(a){var s=a.target.result,c=Oa.utf8ArrToString(new Uint8Array(s)).replace(/\r/g,$.EMPTY_STRING).replace(/\n/g,$.EMPTY_STRING).replace(/\t/g,$.EMPTY_STRING).split(" ").join($.EMPTY_STRING).replace("\0",$.EMPTY_STRING);try{n(JSON.parse(c))}catch(l){i(l)}}),o.addEventListener("error",function(a){i(a)})})]})})},t.prototype.importKey=function(e,r,n,i){return te(this,void 0,void 0,function(){var o,a;return re(this,function(s){return o=Oa.getSortedObjectString(e),a=Oa.stringToArrayBuffer(o),[2,new Promise(function(c,l){var d=window.msCrypto.subtle.importKey(rd,a,r,n,i);d.addEventListener("complete",function(h){c(h.target.result)}),d.addEventListener("error",function(h){l(h)})})]})})},t.prototype.sign=function(e,r,n){return te(this,void 0,void 0,function(){return re(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 te(this,void 0,void 0,function(){return re(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.32.2 2023-01-10 */var VF="RSASSA-PKCS1-v1_5",zw="SHA-256",LF=2048,OF=new Uint8Array([1,0,1]),Q$=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 TF;else if(this.hasIECrypto())this.logger.verbose("BrowserCrypto: MS crypto interface available"),this.subtleCrypto=new DF;else if(this.hasMsrCrypto()&&(!((n=this.cryptoOptions)===null||n===void 0)&&n.useMsrCrypto))this.logger.verbose("BrowserCrypto: MSR crypto interface available"),this.subtleCrypto=new RF;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."),ue.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."),Vp.createEntropyNotProvided();this.logger.verbose("BrowserCrypto: Entropy provided"),this.subtleCrypto.initPrng(this.cryptoOptions.entropy)}this.keygenAlgorithmOptions={name:VF,hash:zw,modulusLength:LF,publicExponent:OF}}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 te(this,void 0,void 0,function(){var r;return re(this,function(n){return r=Oa.stringToUtf8Arr(e),[2,this.subtleCrypto.digest({name:zw},r)]})})},t.prototype.getRandomValues=function(e){return this.subtleCrypto.getRandomValues(e)},t.prototype.generateKeyPair=function(e,r){return te(this,void 0,void 0,function(){return re(this,function(n){return[2,this.subtleCrypto.generateKey(this.keygenAlgorithmOptions,e,r)]})})},t.prototype.exportJwk=function(e){return te(this,void 0,void 0,function(){return re(this,function(r){return[2,this.subtleCrypto.exportKey(e)]})})},t.prototype.importJwk=function(e,r,n){return te(this,void 0,void 0,function(){return re(this,function(i){return[2,this.subtleCrypto.importKey(e,this.keygenAlgorithmOptions,r,n)]})})},t.prototype.sign=function(e,r){return te(this,void 0,void 0,function(){return re(this,function(n){return[2,this.subtleCrypto.sign(this.keygenAlgorithmOptions,e,r)]})})},t}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var NF=function(){function t(){this.dbName=H6,this.version=mF,this.tableName=gF,this.dbOpen=!1}return t.prototype.open=function(){return te(this,void 0,void 0,function(){var e=this;return re(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(ue.createDatabaseUnavailableError())})})]})})},t.prototype.closeConnection=function(){var e=this.db;e&&this.dbOpen&&(e.close(),this.dbOpen=!1)},t.prototype.validateDbIsOpen=function(){return te(this,void 0,void 0,function(){return re(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 te(this,void 0,void 0,function(){var r=this;return re(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(ue.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 te(this,void 0,void 0,function(){var n=this;return re(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(ue.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 te(this,void 0,void 0,function(){var r=this;return re(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(ue.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 te(this,void 0,void 0,function(){var e=this;return re(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(ue.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 te(this,void 0,void 0,function(){var r=this;return re(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(ue.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 te(this,void 0,void 0,function(){return re(this,function(e){return this.db&&this.dbOpen&&this.closeConnection(),[2,new Promise(function(r,n){var i=window.indexedDB.deleteDatabase(H6);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.32.2 2023-01-10 */var Cw=function(){function t(e,r){this.inMemoryCache=new T6,this.indexedDBCache=new NF,this.logger=e,this.storeName=r}return t.prototype.handleDatabaseAccessError=function(e){if(e instanceof ue&&e.errorCode===se.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 te(this,void 0,void 0,function(){var r,n;return re(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 te(this,void 0,void 0,function(){var n;return re(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 te(this,void 0,void 0,function(){var r;return re(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 te(this,void 0,void 0,function(){var e,r;return re(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 te(this,void 0,void 0,function(){var r,n;return re(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 te(this,void 0,void 0,function(){var e,r;return re(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.32.2 2023-01-10 */var Lp;(function(t){t.asymmetricKeys="asymmetricKeys",t.symmetricKeys="symmetricKeys"})(Lp||(Lp={}));var FF=function(){function t(e){this.logger=e,this.asymmetricKeys=new Cw(this.logger,Lp.asymmetricKeys),this.symmetricKeys=new Cw(this.logger,Lp.symmetricKeys)}return t.prototype.clear=function(){return te(this,void 0,void 0,function(){var e;return re(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.32.2 2023-01-10 */var BF=function(){function t(e,r,n){this.logger=e,this.browserCrypto=new Q$(this.logger,n),this.b64Encode=new X$,this.b64Decode=new PF,this.guidGenerator=new Y$(this.browserCrypto),this.pkceGenerator=new HF(this.browserCrypto),this.cache=new FF(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 te(this,void 0,void 0,function(){return re(this,function(e){return[2,this.pkceGenerator.generateCodes()]})})},t.prototype.getPublicKeyThumbprint=function(e){var r;return te(this,void 0,void 0,function(){var n,i,o,a,s,c,l,d;return re(this,function(h){switch(h.label){case 0:return n=(r=this.performanceClient)===null||r===void 0?void 0:r.startMeasurement(Fr.CryptoOptsGetPublicKeyThumbprint,e.correlationId),[4,this.browserCrypto.generateKeyPair(t.EXTRACTABLE,t.POP_KEY_USAGES)];case 1:return i=h.sent(),[4,this.browserCrypto.exportJwk(i.publicKey)];case 2:return o=h.sent(),a={e:o.e,kty:o.kty,n:o.n},s=Oa.getSortedObjectString(a),[4,this.hashString(s)];case 3:return c=h.sent(),[4,this.browserCrypto.exportJwk(i.privateKey)];case 4:return l=h.sent(),[4,this.browserCrypto.importJwk(l,!1,["sign"])];case 5:return d=h.sent(),[4,this.cache.asymmetricKeys.setItem(c,{privateKey:d,publicKey:i.publicKey,requestMethod:e.resourceRequestMethod,requestUri:e.resourceRequestUri})];case 6:return h.sent(),n&&n.endMeasurement({success:!0}),[2,c]}})})},t.prototype.removeTokenBindingKey=function(e){return te(this,void 0,void 0,function(){var r;return re(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 te(this,void 0,void 0,function(){return re(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 te(this,void 0,void 0,function(){var o,a,s,c,l,d,h,u,f,v,p,_,m;return re(this,function(g){switch(g.label){case 0:return o=(i=this.performanceClient)===null||i===void 0?void 0:i.startMeasurement(Fr.CryptoOptsSignJwt,n),[4,this.cache.asymmetricKeys.getItem(r)];case 1:if(a=g.sent(),!a)throw ue.createSigningKeyNotFoundInStorageError(r);return[4,this.browserCrypto.exportJwk(a.publicKey)];case 2:return s=g.sent(),c=Oa.getSortedObjectString(s),l=this.b64Encode.urlEncode(JSON.stringify({kid:r})),d=fF.getShrHeaderString({kid:l,alg:s.alg}),h=this.b64Encode.urlEncode(d),e.cnf={jwk:JSON.parse(c)},u=this.b64Encode.urlEncode(JSON.stringify(e)),f=h+"."+u,v=Oa.stringToArrayBuffer(f),[4,this.browserCrypto.sign(a.privateKey,v)];case 3:return p=g.sent(),_=this.b64Encode.urlEncodeArr(new Uint8Array(p)),m=f+"."+_,o&&o.endMeasurement({success:!0}),[2,m]}})})},t.prototype.hashString=function(e){return te(this,void 0,void 0,function(){var r,n;return re(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.32.2 2023-01-10 */var UF=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 ue.createUnableToLoadTokenError("Please ensure server response includes id token.");var i=new da(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 v4(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=Tp.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 Tp(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 v4(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 v4(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 ue.createUnableToLoadTokenError("Please provide clientInfo in the response or options.")}else throw ue.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=hn.generateHomeAccountId(n,i,this.logger,this.cryptoObj,e)),!a)throw ue.createUnableToLoadTokenError("Unexpected missing homeAccountId");var s=n?hn.createAccount(n,a,e,void 0,void 0,void 0,r):hn.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 ue.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.")},t.prototype.loadIdToken=function(e,r,n,i){var o=fu.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 ue.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 ue.createUnableToLoadTokenError("Please ensure server response includes expires_in value.");if(!a.extendedExpiresOn)throw ue.createUnableToLoadTokenError("Please provide an extendedExpiresOn value in the options.");var s=new Dn(e.scopes).printScopes(),c=a.expiresOn||r.expires_in+new Date().getTime()/1e3,l=a.extendedExpiresOn,d=pu.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 ue.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=Pp.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 ue.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.")},t.prototype.generateAuthenticationResult=function(e,r,n,i){var o,a,s,c=$.EMPTY_STRING,l=[],d=null,h;n!=null&&n.accessToken&&(c=n.accessToken.secret,l=Dn.fromString(n.accessToken.target).asArray(),d=new Date(Number(n.accessToken.expiresOn)*1e3),h=new Date(Number(n.accessToken.extendedExpiresOn)*1e3));var u=(r==null?void 0:r.claims.oid)||(r==null?void 0:r.claims.sub)||$.EMPTY_STRING,f=(r==null?void 0:r.claims.tid)||$.EMPTY_STRING;return{authority:i?i.canonicalAuthority:$.EMPTY_STRING,uniqueId:u,tenantId:f,scopes:l,account:n!=null&&n.account?n.account.getAccountInfo():null,idToken:r?r.rawToken:$.EMPTY_STRING,idTokenClaims:r?r.claims:{},accessToken:c,fromCache:!0,expiresOn:d,correlationId:e.correlationId||$.EMPTY_STRING,requestId:$.EMPTY_STRING,extExpiresOn:h,familyId:$.EMPTY_STRING,tokenType:((o=n==null?void 0:n.accessToken)===null||o===void 0?void 0:o.tokenType)||$.EMPTY_STRING,state:$.EMPTY_STRING,cloudGraphHostName:((a=n==null?void 0:n.account)===null||a===void 0?void 0:a.cloudGraphHostName)||$.EMPTY_STRING,msGraphHost:((s=n==null?void 0:n.account)===null||s===void 0?void 0:s.msGraphHost)||$.EMPTY_STRING,code:void 0,fromNativeBroker:!1}},t}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var jF=function(t){pn(e,t);function e(r){var n=t.call(this,r)||this;return n.includeRedirectUri=!1,n}return e}(F$);/*! @azure/msal-browser v2.32.2 2023-01-10 */var qF=function(t){pn(e,t);function e(r,n,i,o,a,s,c,l,d,h){var u=t.call(this,r,n,i,o,a,s,l,d,h)||this;return u.apiId=c,u}return e.prototype.acquireToken=function(r){return te(this,void 0,void 0,function(){var n,i,o,a,s,c,l;return re(this,function(d){switch(d.label){case 0:if(this.logger.trace("SilentAuthCodeClient.acquireToken called"),!r.code)throw ue.createAuthCodeRequiredError();return[4,this.initializeAuthorizationRequest(r,xe.Silent)];case 1:n=d.sent(),this.browserStorage.updateCacheEntries(n.state,n.nonce,n.authority,n.loginHint||$.EMPTY_STRING,n.account||null),i=this.initializeServerTelemetryManager(this.apiId),d.label=2;case 2:return d.trys.push([2,4,,5]),o=ze(ze({},n),{code:r.code}),[4,this.getClientConfiguration(i,n.authority)];case 3:return a=d.sent(),s=new jF(a),this.logger.verbose("Auth code client created"),c=new K$(s,this.browserStorage,o,this.logger,this.config.system),[2,c.handleCodeResponseFromServer({code:r.code,msgraph_host:r.msGraphHost,cloud_graph_host_name:r.cloudGraphHostName,cloud_instance_host_name:r.cloudInstanceHostName},n.state,s.authority,this.networkClient,!1)];case 4:throw l=d.sent(),l instanceof Ee&&l.setCorrelationId(this.correlationId),i.cacheFailedRequest(l),this.browserStorage.cleanRequestByState(n.state),l;case 5:return[2]}})})},e.prototype.logout=function(){return Promise.reject(ue.createSilentLogoutUnsupportedError())},e}(Wd);/*! @azure/msal-browser v2.32.2 2023-01-10 */var WF=function(){function t(e,r){this.correlationId=r,this.measureName="msal.measure."+e+"."+this.correlationId,this.startMark="msal.start."+e+"."+this.correlationId,this.endMark="msal.end."+e+"."+this.correlationId}return t.supportsBrowserPerformance=function(){return typeof window<"u"&&typeof window.performance<"u"&&typeof window.performance.mark=="function"&&typeof window.performance.measure=="function"&&typeof window.performance.clearMarks=="function"&&typeof window.performance.clearMeasures=="function"&&typeof window.performance.getEntriesByName=="function"},t.prototype.startMeasurement=function(){if(t.supportsBrowserPerformance())try{window.performance.mark(this.startMark)}catch{}},t.prototype.endMeasurement=function(){if(t.supportsBrowserPerformance())try{window.performance.mark(this.endMark),window.performance.measure(this.measureName,this.startMark,this.endMark)}catch{}},t.prototype.flushMeasurement=function(){if(t.supportsBrowserPerformance())try{var e=window.performance.getEntriesByName(this.measureName,"measure");if(e.length>0){var r=e[0].duration;return window.performance.clearMeasures(this.measureName),window.performance.clearMarks(this.startMark),window.performance.clearMarks(this.endMark),r}}catch{}return null},t}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var GF=function(t){pn(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 Q$(l.logger,c),l.guidGenerator=new Y$(l.browserCrypto),l}return e.prototype.startPerformanceMeasurement=function(r,n){return new WF(r,n)},e.prototype.generateId=function(){return this.guidGenerator.generateGuid()},e.prototype.getPageVisibility=function(){var r;return((r=document.visibilityState)===null||r===void 0?void 0:r.toString())||null},e.prototype.startMeasurement=function(r,n){var i=this,o=this.getPageVisibility(),a=t.prototype.startMeasurement.call(this,r,n);return ze(ze({},a),{endMeasurement:function(s){return a.endMeasurement(ze({startPageVisibility:o,endPageVisibility:i.getPageVisibility()},s))}})},e}(j$);/*! @azure/msal-browser v2.32.2 2023-01-10 */var KF=function(){function t(e){this.isBrowserEnvironment=typeof window<"u",this.config=SF(e,this.isBrowserEnvironment),this.initialized=!1,this.logger=new x7(this.config.system.loggerOptions,Dm,kh),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 GF(this.config.auth.clientId,this.config.auth.authority,this.logger,Dm,kh,this.config.telemetry.application,this.config.system.cryptoOptions):new vF(this.config.auth.clientId,this.config.auth.authority,this.logger,Dm,kh,this.config.telemetry.application),this.browserCrypto=this.isBrowserEnvironment?new BF(this.logger,this.performanceClient,this.config.system.cryptoOptions):Ap,this.eventHandler=new $F(this.logger,this.browserCrypto),this.browserStorage=this.isBrowserEnvironment?new R6(this.config.auth.clientId,this.config.cache,this.browserCrypto,this.logger):yF(this.config.auth.clientId,this.logger);var r={cacheLocation:kn.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1};this.nativeInternalStorage=new R6(this.config.auth.clientId,r,this.browserCrypto,this.logger),this.tokenCache=new UF(this.config,this.browserStorage,this.logger,this.browserCrypto)}return t.prototype.initialize=function(){return te(this,void 0,void 0,function(){var e,r;return re(this,function(n){switch(n.label){case 0:if(this.logger.trace("initialize called"),this.initialized)return this.logger.info("initialize has already been called, exiting early."),[2];if(this.eventHandler.emitEvent(Ve.INITIALIZE_START),!this.config.system.allowNativeBroker)return[3,4];n.label=1;case 1:return n.trys.push([1,3,,4]),e=this,[4,r1.createProvider(this.logger,this.config.system.nativeBrokerHandshakeTimeout)];case 2:return e.nativeExtensionProvider=n.sent(),[3,4];case 3:return r=n.sent(),this.logger.verbose(r),[3,4];case 4:return this.initialized=!0,this.eventHandler.emitEvent(Ve.INITIALIZE_END),[2]}})})},t.prototype.handleRedirectPromise=function(e){return te(this,void 0,void 0,function(){var r,n,i,o,a,s,c,l,d=this;return re(this,function(h){return this.logger.verbose("handleRedirectPromise called"),ur.blockNativeBrokerCalledBeforeInitialized(this.config.system.allowNativeBroker,this.initialized),r=this.getAllAccounts(),this.isBrowserEnvironment?(n=e||$.EMPTY_STRING,i=this.redirectResponse.get(n),typeof i>"u"?(this.eventHandler.emitEvent(Ve.HANDLE_REDIRECT_START,xe.Redirect),this.logger.verbose("handleRedirectPromise has been called for the first time, storing the promise"),o=this.browserStorage.getCachedNativeRequest(),a=void 0,o&&r1.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider)&&this.nativeExtensionProvider&&!e?(this.logger.trace("handleRedirectPromise - acquiring token from native platform"),s=new Hl(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Vt.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(ut.CORRELATION_ID,!0)||$.EMPTY_STRING,l=this.createRedirectClient(c),a=l.handleRedirectPromise(e)),i=a.then(function(u){if(u){var f=r.length<d.getAllAccounts().length;f?(d.eventHandler.emitEvent(Ve.LOGIN_SUCCESS,xe.Redirect,u),d.logger.verbose("handleRedirectResponse returned result, login success")):(d.eventHandler.emitEvent(Ve.ACQUIRE_TOKEN_SUCCESS,xe.Redirect,u),d.logger.verbose("handleRedirectResponse returned result, acquire token success"))}return d.eventHandler.emitEvent(Ve.HANDLE_REDIRECT_END,xe.Redirect),u}).catch(function(u){throw r.length>0?d.eventHandler.emitEvent(Ve.ACQUIRE_TOKEN_FAILURE,xe.Redirect,null,u):d.eventHandler.emitEvent(Ve.LOGIN_FAILURE,xe.Redirect,null,u),d.eventHandler.emitEvent(Ve.HANDLE_REDIRECT_END,xe.Redirect),u}),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 te(this,void 0,void 0,function(){var r,n,i,o,a,s=this;return re(this,function(c){return r=this.getRequestCorrelationId(e),this.logger.verbose("acquireTokenRedirect called",r),this.preflightBrowserEnvironmentCheck(xe.Redirect),n=this.getAllAccounts().length>0,n?this.eventHandler.emitEvent(Ve.ACQUIRE_TOKEN_START,xe.Redirect,e):this.eventHandler.emitEvent(Ve.LOGIN_START,xe.Redirect,e),this.nativeExtensionProvider&&this.canUseNative(e)?(o=new Hl(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Vt.acquireTokenRedirect,this.performanceClient,this.nativeExtensionProvider,this.getNativeAccountId(e),this.nativeInternalStorage,e.correlationId),i=o.acquireTokenRedirect(e).catch(function(l){if(l instanceof Xo&&l.isFatal()){s.nativeExtensionProvider=void 0;var d=s.createRedirectClient(e.correlationId);return d.acquireToken(e)}else if(l instanceof go){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(Ve.ACQUIRE_TOKEN_FAILURE,xe.Redirect,null,l):s.eventHandler.emitEvent(Ve.LOGIN_FAILURE,xe.Redirect,null,l),l})]})})},t.prototype.acquireTokenPopup=function(e){var r=this,n=this.getRequestCorrelationId(e),i=this.performanceClient.startMeasurement(Fr.AcquireTokenPopup,n);try{this.logger.verbose("acquireTokenPopup called",n),this.preflightBrowserEnvironmentCheck(xe.Popup)}catch(c){return Promise.reject(c)}var o=this.getAllAccounts();o.length>0?this.eventHandler.emitEvent(Ve.ACQUIRE_TOKEN_START,xe.Popup,e):this.eventHandler.emitEvent(Ve.LOGIN_START,xe.Popup,e);var a;if(this.canUseNative(e))a=this.acquireTokenNative(e,Vt.acquireTokenPopup).then(function(c){return r.browserStorage.setInteractionInProgress(!1),i.endMeasurement({success:!0,isNativeBroker:!0,requestId:c.requestId}),i.flushMeasurement(),c}).catch(function(c){if(c instanceof Xo&&c.isFatal()){r.nativeExtensionProvider=void 0;var l=r.createPopupClient(e.correlationId);return l.acquireToken(e)}else if(c instanceof go){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(Ve.LOGIN_SUCCESS,xe.Popup,c):r.eventHandler.emitEvent(Ve.ACQUIRE_TOKEN_SUCCESS,xe.Popup,c),i.addStaticFields({accessTokenSize:c.accessToken.length,idTokenSize:c.idToken.length}),i.endMeasurement({success:!0,requestId:c.requestId}),i.flushMeasurement(),c}).catch(function(c){return o.length>0?r.eventHandler.emitEvent(Ve.ACQUIRE_TOKEN_FAILURE,xe.Popup,null,c):r.eventHandler.emitEvent(Ve.LOGIN_FAILURE,xe.Popup,null,c),i.endMeasurement({errorCode:c.errorCode,subErrorCode:c.subError,success:!1}),i.flushMeasurement(),Promise.reject(c)})},t.prototype.ssoSilent=function(e){return te(this,void 0,void 0,function(){var r,n,i,o,a,s=this;return re(this,function(c){return r=this.getRequestCorrelationId(e),n=ze(ze({},e),{prompt:e.prompt,correlationId:r}),this.preflightBrowserEnvironmentCheck(xe.Silent),i=this.performanceClient.startMeasurement(Fr.SsoSilent,r),this.logger.verbose("ssoSilent called",r),this.eventHandler.emitEvent(Ve.SSO_SILENT_START,xe.Silent,n),this.canUseNative(n)?o=this.acquireTokenNative(n,Vt.ssoSilent).catch(function(l){if(l instanceof Xo&&l.isFatal()){s.nativeExtensionProvider=void 0;var d=s.createSilentIframeClient(n.correlationId);return d.acquireToken(n)}throw l}):(a=this.createSilentIframeClient(n.correlationId),o=a.acquireToken(n)),[2,o.then(function(l){return s.eventHandler.emitEvent(Ve.SSO_SILENT_SUCCESS,xe.Silent,l),i.addStaticFields({accessTokenSize:l.accessToken.length,idTokenSize:l.idToken.length}),i.endMeasurement({success:!0,isNativeBroker:l.fromNativeBroker,requestId:l.requestId}),i.flushMeasurement(),l}).catch(function(l){throw s.eventHandler.emitEvent(Ve.SSO_SILENT_FAILURE,xe.Silent,null,l),i.endMeasurement({errorCode:l.errorCode,subErrorCode:l.subError,success:!1}),i.flushMeasurement(),l})]})})},t.prototype.acquireTokenByCode=function(e){return te(this,void 0,void 0,function(){var r,n,i,o,a=this;return re(this,function(s){r=this.getRequestCorrelationId(e),this.preflightBrowserEnvironmentCheck(xe.Silent),this.logger.trace("acquireTokenByCode called",r),this.eventHandler.emitEvent(Ve.ACQUIRE_TOKEN_BY_CODE_START,xe.Silent,e),n=this.performanceClient.startMeasurement(Fr.AcquireTokenByCode,e.correlationId);try{if(e.code)return i=e.code,o=this.hybridAuthCodeResponses.get(i),o?(this.logger.verbose("Existing acquireTokenByCode request found",e.correlationId),n.endMeasurement({success:!0}),n.discardMeasurement()):(this.logger.verbose("Initiating new acquireTokenByCode request",r),o=this.acquireTokenByCodeAsync(ze(ze({},e),{correlationId:r})).then(function(c){return a.eventHandler.emitEvent(Ve.ACQUIRE_TOKEN_BY_CODE_SUCCESS,xe.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}),n.flushMeasurement(),c}).catch(function(c){throw a.hybridAuthCodeResponses.delete(i),a.eventHandler.emitEvent(Ve.ACQUIRE_TOKEN_BY_CODE_FAILURE,xe.Silent,null,c),n.endMeasurement({errorCode:c.errorCode,subErrorCode:c.subError,success:!1}),n.flushMeasurement(),c}),this.hybridAuthCodeResponses.set(i,o)),[2,o];if(e.nativeAccountId){if(this.canUseNative(e,e.nativeAccountId))return[2,this.acquireTokenNative(e,Vt.acquireTokenByCode,e.nativeAccountId).catch(function(c){throw c instanceof Xo&&c.isFatal()&&(a.nativeExtensionProvider=void 0),c})];throw ue.createUnableToAcquireTokenFromNativePlatformError()}else throw ue.createAuthCodeOrNativeAccountIdRequiredError()}catch(c){throw this.eventHandler.emitEvent(Ve.ACQUIRE_TOKEN_BY_CODE_FAILURE,xe.Silent,null,c),n.endMeasurement({errorCode:c instanceof Ee&&c.errorCode||void 0,subErrorCode:c instanceof Ee&&c.subError||void 0,success:!1}),c}return[2]})})},t.prototype.acquireTokenByCodeAsync=function(e){return te(this,void 0,void 0,function(){var r,n;return re(this,function(i){switch(i.label){case 0:return this.logger.trace("acquireTokenByCodeAsync called",e.correlationId),r=this.createSilentAuthCodeClient(e.correlationId),[4,r.acquireToken(e)];case 1:return n=i.sent(),[2,n]}})})},t.prototype.acquireTokenFromCache=function(e,r,n){return te(this,void 0,void 0,function(){return re(this,function(i){switch(n.cacheLookupPolicy){case Zn.Default:case Zn.AccessToken:case Zn.AccessTokenAndRefreshToken:return[2,e.acquireToken(r)];default:throw me.createRefreshRequiredError()}return[2]})})},t.prototype.acquireTokenByRefreshToken=function(e,r){return te(this,void 0,void 0,function(){var n;return re(this,function(i){switch(r.cacheLookupPolicy){case Zn.Default:case Zn.AccessTokenAndRefreshToken:case Zn.RefreshToken:case Zn.RefreshTokenAndNetwork:return n=this.createSilentRefreshClient(e.correlationId),[2,n.acquireToken(e)];default:throw me.createRefreshRequiredError()}return[2]})})},t.prototype.acquireTokenBySilentIframe=function(e){return te(this,void 0,void 0,function(){var r;return re(this,function(n){return r=this.createSilentIframeClient(e.correlationId),[2,r.acquireToken(e)]})})},t.prototype.logout=function(e){return te(this,void 0,void 0,function(){var r;return re(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(ze({correlationId:r},e))]})})},t.prototype.logoutRedirect=function(e){return te(this,void 0,void 0,function(){var r,n;return re(this,function(i){return r=this.getRequestCorrelationId(e),this.preflightBrowserEnvironmentCheck(xe.Redirect),n=this.createRedirectClient(r),[2,n.logout(e)]})})},t.prototype.logoutPopup=function(e){try{var r=this.getRequestCorrelationId(e);this.preflightBrowserEnvironmentCheck(xe.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){var r=this.getAllAccounts();return!fe.isEmpty(e)&&r&&r.length?(this.logger.verbose("Account matching username found, returning"),this.logger.verbosePii("Returning signed-in accounts matching username: "+e),r.filter(function(n){return n.username.toLowerCase()===e.toLowerCase()})[0]||null):(this.logger.verbose("getAccountByUsername: No matching account found, returning null"),null)},t.prototype.getAccountByHomeId=function(e){var r=this.getAllAccounts();return!fe.isEmpty(e)&&r&&r.length?(this.logger.verbose("Account matching homeAccountId found, returning"),this.logger.verbosePii("Returning signed-in accounts matching homeAccountId: "+e),r.filter(function(n){return n.homeAccountId===e})[0]||null):(this.logger.verbose("getAccountByHomeId: No matching account found, returning null"),null)},t.prototype.getAccountByLocalId=function(e){var r=this.getAllAccounts();return!fe.isEmpty(e)&&r&&r.length?(this.logger.verbose("Account matching localAccountId found, returning"),this.logger.verbosePii("Returning signed-in accounts matching localAccountId: "+e),r.filter(function(n){return n.localAccountId===e})[0]||null):(this.logger.verbose("getAccountByLocalId: No matching account found, returning null"),null)},t.prototype.setActiveAccount=function(e){this.browserStorage.setActiveAccount(e)},t.prototype.getActiveAccount=function(){return this.browserStorage.getActiveAccount()},t.prototype.preflightBrowserEnvironmentCheck=function(e,r){if(r===void 0&&(r=!0),this.logger.verbose("preflightBrowserEnvironmentCheck started"),ur.blockNonBrowserEnvironment(this.isBrowserEnvironment),ur.blockRedirectInIframe(e,this.config.system.allowRedirectInIframe),ur.blockReloadInHiddenIframes(),ur.blockAcquireTokenInPopups(),ur.blockNativeBrokerCalledBeforeInitialized(this.config.system.allowNativeBroker,this.initialized),e===xe.Redirect&&this.config.cache.cacheLocation===kn.MemoryStorage&&!this.config.cache.storeAuthStateInCookie)throw Vp.createInMemoryRedirectUnavailableError();(e===xe.Redirect||e===xe.Popup)&&this.preflightInteractiveRequest(r)},t.prototype.preflightInteractiveRequest=function(e){this.logger.verbose("preflightInteractiveRequest called, validating app environment"),ur.blockReloadInHiddenIframes(),e&&this.browserStorage.setInteractionInProgress(!0)},t.prototype.acquireTokenNative=function(e,r,n){return te(this,void 0,void 0,function(){var i;return re(this,function(o){if(this.logger.trace("acquireTokenNative called"),!this.nativeExtensionProvider)throw ue.createNativeConnectionNotEstablishedError();return i=new Hl(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"),!r1.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 $n.NONE:case $n.CONSENT:case $n.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 xF(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 wF(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 AF(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Vt.ssoSilent,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)},t.prototype.createSilentCacheClient=function(e){return new G$(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeExtensionProvider,e)},t.prototype.createSilentRefreshClient=function(e){return new MF(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeExtensionProvider,e)},t.prototype.createSilentAuthCodeClient=function(e){return new qF(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Vt.acquireTokenByCode,this.performanceClient,this.nativeExtensionProvider,e)},t.prototype.addEventCallback=function(e){return this.eventHandler.addEventCallback(e)},t.prototype.removeEventCallback=function(e){this.eventHandler.removeEventCallback(e)},t.prototype.addPerformanceCallback=function(e){return this.performanceClient.addPerformanceCallback(e)},t.prototype.removePerformanceCallback=function(e){return this.performanceClient.removePerformanceCallback(e)},t.prototype.enableAccountStorageEvents=function(){this.eventHandler.enableAccountStorageEvents()},t.prototype.disableAccountStorageEvents=function(){this.eventHandler.disableAccountStorageEvents()},t.prototype.getTokenCache=function(){return this.tokenCache},t.prototype.getLogger=function(){return this.logger},t.prototype.setLogger=function(e){this.logger=e},t.prototype.initializeWrapperLibrary=function(e,r){this.browserStorage.setWrapperMetadata(e,r)},t.prototype.setNavigationClient=function(e){this.navigationClient=e},t.prototype.getConfiguration=function(){return this.config},t.prototype.getRequestCorrelationId=function(e){return e!=null&&e.correlationId?e.correlationId:this.isBrowserEnvironment?this.browserCrypto.createNewGuid():$.EMPTY_STRING},t}();/*! @azure/msal-browser v2.32.2 2023-01-10 */var YF=function(t){pn(e,t);function e(r){var n=t.call(this,r)||this;return n.activeSilentTokenRequests=new Map,n}return e.prototype.loginRedirect=function(r){return te(this,void 0,void 0,function(){var n;return re(this,function(i){return n=this.getRequestCorrelationId(r),this.logger.verbose("loginRedirect called",n),[2,this.acquireTokenRedirect(ze({correlationId:n},r||_w))]})})},e.prototype.loginPopup=function(r){var n=this.getRequestCorrelationId(r);return this.logger.verbose("loginPopup called",n),this.acquireTokenPopup(ze({correlationId:n},r||_w))},e.prototype.acquireTokenSilent=function(r){return te(this,void 0,void 0,function(){var n,i,o,a,s,c,l,d=this;return re(this,function(h){if(n=this.getRequestCorrelationId(r),i=this.performanceClient.startMeasurement(Fr.AcquireTokenSilent,n),i.addStaticFields({cacheLookupPolicy:r.cacheLookupPolicy}),this.preflightBrowserEnvironmentCheck(xe.Silent),this.logger.verbose("acquireTokenSilent called",n),o=r.account||this.getActiveAccount(),!o)throw ue.createNoAccountError();return a={clientId:this.config.auth.clientId,authority:r.authority||$.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),l=this.acquireTokenSilentAsync(ze(ze({},r),{correlationId:n}),o).then(function(u){return d.activeSilentTokenRequests.delete(s),i.addStaticFields({accessTokenSize:u.accessToken.length,idTokenSize:u.idToken.length}),i.endMeasurement({success:!0,fromCache:u.fromCache,isNativeBroker:u.fromNativeBroker,cacheLookupPolicy:r.cacheLookupPolicy,requestId:u.requestId}),i.flushMeasurement(),u}).catch(function(u){throw d.activeSilentTokenRequests.delete(s),i.endMeasurement({errorCode:u.errorCode,subErrorCode:u.subError,success:!1}),i.flushMeasurement(),u}),this.activeSilentTokenRequests.set(s,l),[2,l]):(this.logger.verbose("acquireTokenSilent has been called previously, returning the result from the first call",n),i.endMeasurement({success:!0}),i.discardMeasurement(),[2,c])})})},e.prototype.acquireTokenSilentAsync=function(r,n){return te(this,void 0,void 0,function(){var i,o,a,s,c,l,d=this;return re(this,function(h){switch(h.label){case 0:return this.eventHandler.emitEvent(Ve.ACQUIRE_TOKEN_START,xe.Silent,r),i=this.performanceClient.startMeasurement(Fr.AcquireTokenSilentAsync,r.correlationId),r1.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider,r.authenticationScheme)&&n.nativeAccountId?(this.logger.verbose("acquireTokenSilent - attempting to acquire token from native platform"),a=ze(ze({},r),{account:n}),o=this.acquireTokenNative(a,Vt.acquireTokenSilent_silentFlow).catch(function(u){return te(d,void 0,void 0,function(){var f;return re(this,function(v){if(u instanceof Xo&&u.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 u})})}),[3,3]):[3,1];case 1:return this.logger.verbose("acquireTokenSilent - attempting to acquire token from web flow"),s=this.createSilentCacheClient(r.correlationId),[4,s.initializeSilentRequest(r,n)];case 2:c=h.sent(),l=ze(ze({},r),{cacheLookupPolicy:r.cacheLookupPolicy||Zn.Default}),o=this.acquireTokenFromCache(s,c,l).catch(function(u){if(l.cacheLookupPolicy===Zn.AccessToken)throw u;return ur.blockReloadInHiddenIframes(),d.eventHandler.emitEvent(Ve.ACQUIRE_TOKEN_NETWORK_START,xe.Silent,c),d.acquireTokenByRefreshToken(c,l).catch(function(f){var v=f instanceof d1,p=f instanceof go,_=f.errorCode===po.INVALID_GRANT_ERROR;if((!v||!_||p||l.cacheLookupPolicy===Zn.AccessTokenAndRefreshToken||l.cacheLookupPolicy===Zn.RefreshToken)&&l.cacheLookupPolicy!==Zn.Skip)throw f;return d.logger.verbose("Refresh token expired/invalid or CacheLookupPolicy is set to Skip, attempting acquire token by iframe.",r.correlationId),d.acquireTokenBySilentIframe(c)})}),h.label=3;case 3:return[2,o.then(function(u){return d.eventHandler.emitEvent(Ve.ACQUIRE_TOKEN_SUCCESS,xe.Silent,u),i.endMeasurement({success:!0,fromCache:u.fromCache,isNativeBroker:u.fromNativeBroker,requestId:u.requestId}),u}).catch(function(u){throw d.eventHandler.emitEvent(Ve.ACQUIRE_TOKEN_FAILURE,xe.Silent,null,u),i.endMeasurement({errorCode:u.errorCode,subErrorCode:u.subError,success:!1}),u})]}})})},e}(KF);const kw="redirect";var Ew=globalThis&&globalThis.__awaiter||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(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};class XF extends YF{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,r=kw,n=!0){var i;return Ew(this,void 0,void 0,function*(){const o=(e==null?void 0:e.loginHint)||((i=this.account)===null||i===void 0?void 0:i.username),a=(e==null?void 0:e.scopes)||[],s=Object.assign(Object.assign({},e),{loginHint:o,scopes:a});if(o&&n){this.logger.verbose("Attempting to login in silently");try{return yield this.ssoSilent(s)}catch{this.logger.verbose("Silent login attempt failed")}}switch(this.logger.verbose(`Attempting to login in by [${r}]`),r){case"popup":return this.loginPopup(s);case"redirect":return this.loginRedirect(s)}})}acquireToken(e={scopes:[]},r=kw,n=!0){return Ew(this,void 0,void 0,function*(){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 QF=(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")},JF=(t,e,r,n,i)=>{const o=Object.assign({clientId:e,redirectUri:QF(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||XF)(t,{auth:o,cache:a,system:s})};class J$ extends x7{constructor(e){super({logLevel:e,loggerCallback:(...r)=>this.loggerCallback(...r)}),this.getLogType=r=>{switch(r){case lr.Error:return"error";case lr.Warning:return"warn";case lr.Info:return"info";case lr.Verbose:default:return"debug"}}}loggerCallback(e,r,n){console[this.getLogType(e)]("%c FUSION::MSAL %c %s","border: 1px solid;","border: none;",r)}}var Vm=globalThis&&globalThis.__awaiter||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(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const ZF="default";class eB{get defaultClient(){return this.getClient(ZF)}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=JF(r.tenantId,r.clientId,r.redirectUri,r.config);return n.setLogger(new J$(0)),n}handleRedirect(){return Vm(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 Vm(this,void 0,void 0,function*(){const r=yield this.acquireToken(e);return r?r.accessToken:void 0})}login(){return Vm(this,void 0,void 0,function*(){yield this.defaultClient.login()})}}var tB=globalThis&&globalThis.__awaiter||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(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const Z$={name:"auth",configure:t=>{var e;const r=new jN;return!((e=t==null?void 0:t.auth)===null||e===void 0)&&e.defaultConfig&&r.configureDefault(t.auth.defaultConfig),r},initialize:({config:t})=>tB(void 0,void 0,void 0,function*(){const e=new eB(t);return t.requiresAuth&&(yield e.handleRedirect(),e.defaultAccount||(yield e.login())),e})},rB=(t,e)=>({module:Z$,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 k7=globalThis&&globalThis.__awaiter||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(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const nB=t=>{var e;return{id:t.id,isChildType:t.isChildType,parentTypeIds:(e=t.parentTypeIds)!==null&&e!==void 0?e:[]}},E7=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:nB(t.type),value:(i=t.value)!==null&&i!==void 0?i:{}}},iB=t=>k7(void 0,void 0,void 0,function*(){const e=yield t.json();return E7(e)}),oB=t=>k7(void 0,void 0,void 0,function*(){return(yield t.json()).map(E7)}),aB=t=>k7(void 0,void 0,void 0,function*(){return(yield t.json()).map(E7)});var sB=globalThis&&globalThis.__classPrivateFieldSet||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},cB=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},m4;class lB{constructor(e,r={}){this.config=r,m4.set(this,void 0),sB(this,m4,e,"f")}requireInstance(e){return cB(this,m4,"f").requireInstance(e)}setContextType(e){this.config.contextType=e}setContextFilter(e){this.config.contextFilter=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)}}m4=new WeakMap;const dB=/^(?:(?:[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})$/,hB=t=>t.replace(/^\/+/,"").split("/").shift(),uB=t=>!!t.match(dB),fB=(t,e)=>r=>{const{extract:n=hB,validate:i=uB}=e??{},o=n(r);if(!o)return Br;if(i(o))return t.contextClient.resolveContext(o);throw Error(`Failed to validate context [${o}] from path [${r}]`)},pB=({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?So(e.currentContext):Br},vB=t=>({ref:e,modules:r})=>{const{context:n,navigation:i}=r,o=fB(n,t==null?void 0:t.path);return cN(i?o(i.path.pathname):Br,pB({ref:e,modules:r})).pipe(wN())};var hf=globalThis&&globalThis.__awaiter||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(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})},Sw=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},g4;class mB{constructor(){this.defaultExpireTime=1*60*1e3,g4.set(this,[])}addConfigBuilder(e){Sw(this,g4,"f").push(e)}_getServiceProvider(e){var r;return hf(this,void 0,void 0,function*(){if(e.hasModule("services"))return e.requireInstance("services");{const n=(r=e.ref)===null||r===void 0?void 0:r.services;if(n)return n;throw Error("no service services provider configures [ServicesModule]")}})}createConfig(e){var r,n;return hf(this,void 0,void 0,function*(){const i=yield Sw(this,g4,"f").reduce((o,a)=>hf(this,void 0,void 0,function*(){const s=new lB(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=vB()),(n=i.client)!==null&&n!==void 0||(i.client=yield(()=>hf(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:iB})},key:({id:s})=>s,expire:this.defaultExpireTime},query:{client:{fn:s=>a.query("v1",{query:s},{selector:oB})},key:s=>JSON.stringify(s),expire:this.defaultExpireTime},related:{client:{fn:s=>a.related("v1",{id:s.item.id,query:{filter:s.filter}},{selector:aB})},key:s=>JSON.stringify(s),expire:this.defaultExpireTime}}}))()),i})}}g4=new WeakMap;var gB=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},Aw;(function(t){t.IDLE="idle",t.ACTIVE="active",t.FAILED="failed",t.CANCELED="canceled"})(Aw||(Aw={}));const yB=t=>e=>e.pipe(gN(t)),_B=t=>e=>e.pipe(wo(t)),bB=t=>e=>e.pipe(nr(t)),wB=t=>t.pipe(zt(e=>e.value));var uf,xB=new Uint8Array(16);function zB(){if(!uf&&(uf=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!uf))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return uf(xB)}const CB=/^(?:[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 eP(t){return typeof t=="string"&&CB.test(t)}var on=[];for(var Lm=0;Lm<256;++Lm)on.push((Lm+256).toString(16).substr(1));function tP(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=(on[t[e+0]]+on[t[e+1]]+on[t[e+2]]+on[t[e+3]]+"-"+on[t[e+4]]+on[t[e+5]]+"-"+on[t[e+6]]+on[t[e+7]]+"-"+on[t[e+8]]+on[t[e+9]]+"-"+on[t[e+10]]+on[t[e+11]]+on[t[e+12]]+on[t[e+13]]+on[t[e+14]]+on[t[e+15]]).toLowerCase();if(!eP(r))throw TypeError("Stringified UUID is invalid");return r}function kB(t){if(!eP(t))throw TypeError("Invalid UUID");var e,r=new Uint8Array(16);return r[0]=(e=parseInt(t.slice(0,8),16))>>>24,r[1]=e>>>16&255,r[2]=e>>>8&255,r[3]=e&255,r[4]=(e=parseInt(t.slice(9,13),16))>>>8,r[5]=e&255,r[6]=(e=parseInt(t.slice(14,18),16))>>>8,r[7]=e&255,r[8]=(e=parseInt(t.slice(19,23),16))>>>8,r[9]=e&255,r[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,r[11]=e/4294967296&255,r[12]=e>>>24&255,r[13]=e>>>16&255,r[14]=e>>>8&255,r[15]=e&255,r}function EB(t){t=unescape(encodeURIComponent(t));for(var e=[],r=0;r<t.length;++r)e.push(t.charCodeAt(r));return e}var SB="6ba7b810-9dad-11d1-80b4-00c04fd430c8",AB="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function MB(t,e,r){function n(i,o,a,s){if(typeof i=="string"&&(i=EB(i)),typeof o=="string"&&(o=kB(o)),o.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var c=new Uint8Array(16+i.length);if(c.set(o),c.set(i,o.length),c=r(c),c[6]=c[6]&15|e,c[8]=c[8]&63|128,a){s=s||0;for(var l=0;l<16;++l)a[s+l]=c[l];return a}return tP(c)}try{n.name=t}catch{}return n.DNS=SB,n.URL=AB,n}function rP(t,e,r){t=t||{};var n=t.random||(t.rng||zB)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){r=r||0;for(var i=0;i<16;++i)e[r+i]=n[i];return e}return tP(n)}function $B(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 Om(t,e){return t<<e|t>>>32-e}function PB(t){var e=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof t=="string"){var n=unescape(encodeURIComponent(t));t=[];for(var i=0;i<n.length;++i)t.push(n.charCodeAt(i))}else Array.isArray(t)||(t=Array.prototype.slice.call(t));t.push(128);for(var o=t.length/4+2,a=Math.ceil(o/16),s=new Array(a),c=0;c<a;++c){for(var l=new Uint32Array(16),d=0;d<16;++d)l[d]=t[c*64+d*4]<<24|t[c*64+d*4+1]<<16|t[c*64+d*4+2]<<8|t[c*64+d*4+3];s[c]=l}s[a-1][14]=(t.length-1)*8/Math.pow(2,32),s[a-1][14]=Math.floor(s[a-1][14]),s[a-1][15]=(t.length-1)*8&4294967295;for(var h=0;h<a;++h){for(var u=new Uint32Array(80),f=0;f<16;++f)u[f]=s[h][f];for(var v=16;v<80;++v)u[v]=Om(u[v-3]^u[v-8]^u[v-14]^u[v-16],1);for(var p=r[0],_=r[1],m=r[2],g=r[3],b=r[4],w=0;w<80;++w){var x=Math.floor(w/20),C=Om(p,5)+$B(x,_,m,g)+b+e[x]+u[w]>>>0;b=g,g=m,m=Om(_,30)>>>0,_=p,p=C}r[0]=r[0]+p>>>0,r[1]=r[1]+_>>>0,r[2]=r[2]+m>>>0,r[3]=r[3]+g>>>0,r[4]=r[4]+b>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}var IB=MB("v5",80,PB);const HB=IB;class V6 extends Error{constructor(e,r){super(r.message,{cause:r.cause}),this.type=e,this.name="QueryClientError",this.request=r.request}}const Gd=(...t)=>Jt(e=>t.includes(e.type));var xn=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},TB=globalThis&&globalThis.__classPrivateFieldSet||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},Oo,io;class r5 extends it{get action$(){return xn(this,Oo,"f").asObservable()}get value(){return xn(this,io,"f").value}get closed(){return xn(this,io,"f").closed||xn(this,Oo,"f").closed}constructor(e,r){super(i=>xn(this,io,"f").subscribe(i)),Oo.set(this,new Ki),io.set(this,void 0);const n="getInitialState"in e?e.getInitialState():r;TB(this,io,new qd(n),"f"),xn(this,Oo,"f").pipe(I$(e,n),$$()).subscribe(xn(this,io,"f")),this.reset=()=>xn(this,io,"f").next(n)}next(e){xn(this,Oo,"f").next(e)}addEffect(e,r){const n=typeof e=="string"?this.action$.pipe(Gd(e)):this.action$,i=r||e;return n.pipe(wo(o=>Or(new Promise((a,s)=>{try{a(i(o,this.value))}catch(c){s(c)}})).pipe(Ar(a=>(console.warn("unhandled effect",a),Br)))),Jt(o=>!!o),xp(wp)).subscribe(xn(this,Oo,"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(Ar(n=>(console.trace("unhandled exception, epic closed!",n),Br)),xp(wp)).subscribe(xn(this,Oo,"f"))}unsubscribe(){xn(this,Oo,"f").unsubscribe(),xn(this,io,"f").unsubscribe()}complete(){xn(this,Oo,"f").complete(),xn(this,io,"f").complete()}asObservable(){return xn(this,io,"f").asObservable()}}Oo=new WeakMap,io=new WeakMap;const nP=(t,e)=>Object.entries(t).reduce((r,[n,i])=>Object.assign(r,{[n]:typeof i=="function"?(...o)=>e.next(i(...o)):nP(i,e)}),{});function ln(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 y4="::",S7=t=>new RegExp(`${y4}\\${t}$`),Mw=t=>t.type.replace(S7("\\w+$"),"");function Wo(t,e,r,n){const i=ln([t,"request"].join(y4),e);return r&&Object.assign(i,{success:ln([t,"success"].join(y4),r)}),n&&Object.assign(i,{failure:ln([t,"failure"].join(y4),n)}),i}const RB=t=>!!t.type.match(/::request$/),DB=t=>!!t.type.match(S7("success")),VB=t=>!!t.type.match(S7("failure")),LB=t=>DB(t)||VB(t);function vi(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 Gs(t){return!!t&&!!t[yt]}function Ao(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)===KB}(t)||Array.isArray(t)||!!t[Vw]||!!(!((e=t.constructor)===null||e===void 0)&&e[Vw])||A7(t)||M7(t))}function $w(t){return Gs(t)||vi(23,t),t[yt].t}function nd(t,e,r){r===void 0&&(r=!1),Kd(t)===0?(r?Object.keys:T7)(t).forEach(function(n){r&&typeof n=="symbol"||e(n,t[n],t)}):t.forEach(function(n,i){return e(i,n,t)})}function Kd(t){var e=t[yt];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:A7(t)?2:M7(t)?3:0}function L6(t,e){return Kd(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function OB(t,e){return Kd(t)===2?t.get(e):t[e]}function iP(t,e,r){var n=Kd(t);n===2?t.set(e,r):n===3?t.add(r):t[e]=r}function NB(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function A7(t){return WB&&t instanceof Map}function M7(t){return GB&&t instanceof Set}function jr(t){return t.o||t.t}function $7(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=YB(t);delete e[yt];for(var r=T7(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 P7(t,e){return e===void 0&&(e=!1),I7(t)||Gs(t)||!Ao(t)||(Kd(t)>1&&(t.set=t.add=t.clear=t.delete=FB),Object.freeze(t),e&&nd(t,function(r,n){return P7(n,!0)},!0)),t}function FB(){vi(2)}function I7(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function aa(t){var e=N6[t];return e||vi(18,t),e}function BB(t,e){N6[t]||(N6[t]=e)}function Op(){return mu}function Nm(t,e){e&&(aa("Patches"),t.u=[],t.s=[],t.v=e)}function Np(t){O6(t),t.p.forEach(UB),t.p=null}function O6(t){t===mu&&(mu=t.l)}function Pw(t){return mu={p:[],l:mu,h:t,m:!0,_:0}}function UB(t){var e=t[yt];e.i===0||e.i===1?e.j():e.O=!0}function Fm(t,e){e._=e.p.length;var r=e.p[0],n=t!==void 0&&t!==r;return e.h.g||aa("ES5").S(e,t,n),n?(r[yt].P&&(Np(e),vi(4)),Ao(t)&&(t=Fp(e,t),e.l||Bp(e,t)),e.u&&aa("Patches").M(r[yt].t,t,e.u,e.s)):t=Fp(e,r,[]),Np(e),e.u&&e.v(e.u,e.s),t!==oP?t:void 0}function Fp(t,e,r){if(I7(e))return e;var n=e[yt];if(!n)return nd(e,function(s,c){return Iw(t,n,e,s,c,r)},!0),e;if(n.A!==t)return e;if(!n.P)return Bp(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=$7(n.k):n.o,o=i,a=!1;n.i===3&&(o=new Set(i),i.clear(),a=!0),nd(o,function(s,c){return Iw(t,n,i,s,c,r,a)}),Bp(t,i,!1),r&&t.u&&aa("Patches").N(n,r,t.u,t.s)}return n.o}function Iw(t,e,r,n,i,o,a){if(Gs(i)){var s=Fp(t,i,o&&e&&e.i!==3&&!L6(e.R,n)?o.concat(n):void 0);if(iP(r,n,s),!Gs(s))return;t.m=!1}else a&&r.add(i);if(Ao(i)&&!I7(i)){if(!t.h.D&&t._<1)return;Fp(t,i),e&&e.A.l||Bp(t,i)}}function Bp(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&P7(e,r)}function Bm(t,e){var r=t[yt];return(r?jr(r):t)[e]}function Hw(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 ka(t){t.P||(t.P=!0,t.l&&ka(t.l))}function Um(t){t.o||(t.o=$7(t.t))}function vu(t,e,r){var n=A7(e)?aa("MapSet").F(e,r):M7(e)?aa("MapSet").T(e,r):t.g?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:Op(),P:!1,I:!1,R:{},l:o,t:i,k:null,o:null,j:null,C:!1},c=s,l=F6;a&&(c=[s],l=Q2);var d=Proxy.revocable(c,l),h=d.revoke,u=d.proxy;return s.k=u,s.j=h,u}(e,r):aa("ES5").J(e,r);return(r?r.A:Op()).p.push(n),n}function jB(t){return Gs(t)||vi(22,t),function e(r){if(!Ao(r))return r;var n,i=r[yt],o=Kd(r);if(i){if(!i.P&&(i.i<4||!aa("ES5").K(i)))return i.t;i.I=!0,n=Tw(r,o),i.I=!1}else n=Tw(r,o);return nd(n,function(a,s){i&&OB(i.t,a)===s||iP(n,a,e(s))}),o===3?new Set(n):n}(t)}function Tw(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return $7(t)}function qB(){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(Ao(c)){var l=vu(s.A.h,c,s);s.p.set(c,l),s.o.add(l)}else s.o.add(c)}))}function n(s){s.O&&vi(3,JSON.stringify(jr(s)))}var i=function(s,c){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,d){l.__proto__=d}||function(l,d){for(var h in d)d.hasOwnProperty(h)&&(l[h]=d[h])})(s,c)},o=function(){function s(l,d){return this[yt]={i:2,l:d,A:d?d.A:Op(),P:!1,I:!1,o:void 0,R:void 0,t:l,k:this,C:!1,O:!1},this}t(s,Map);var c=s.prototype;return Object.defineProperty(c,"size",{get:function(){return jr(this[yt]).size}}),c.has=function(l){return jr(this[yt]).has(l)},c.set=function(l,d){var h=this[yt];return n(h),jr(h).has(l)&&jr(h).get(l)===d||(e(h),ka(h),h.R.set(l,!0),h.o.set(l,d),h.R.set(l,!0)),this},c.delete=function(l){if(!this.has(l))return!1;var d=this[yt];return n(d),e(d),ka(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[yt];n(l),jr(l).size&&(e(l),ka(l),l.R=new Map,nd(l.t,function(d){l.R.set(d,!1)}),l.o.clear())},c.forEach=function(l,d){var h=this;jr(this[yt]).forEach(function(u,f){l.call(d,h.get(f),f,h)})},c.get=function(l){var d=this[yt];n(d);var h=jr(d).get(l);if(d.I||!Ao(h)||h!==d.t.get(l))return h;var u=vu(d.A.h,h,d);return e(d),d.o.set(l,u),u},c.keys=function(){return jr(this[yt]).keys()},c.values=function(){var l,d=this,h=this.keys();return(l={})[ff]=function(){return d.values()},l.next=function(){var u=h.next();return u.done?u:{done:!1,value:d.get(u.value)}},l},c.entries=function(){var l,d=this,h=this.keys();return(l={})[ff]=function(){return d.entries()},l.next=function(){var u=h.next();if(u.done)return u;var f=d.get(u.value);return{done:!1,value:[u.value,f]}},l},c[ff]=function(){return this.entries()},s}(),a=function(){function s(l,d){return this[yt]={i:3,l:d,A:d?d.A:Op(),P:!1,I:!1,o:void 0,t:l,k:this,p:new Map,O:!1,C:!1},this}t(s,Set);var c=s.prototype;return Object.defineProperty(c,"size",{get:function(){return jr(this[yt]).size}}),c.has=function(l){var d=this[yt];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[yt];return n(d),this.has(l)||(r(d),ka(d),d.o.add(l)),this},c.delete=function(l){if(!this.has(l))return!1;var d=this[yt];return n(d),r(d),ka(d),d.o.delete(l)||!!d.p.has(l)&&d.o.delete(d.p.get(l))},c.clear=function(){var l=this[yt];n(l),jr(l).size&&(r(l),ka(l),l.o.clear())},c.values=function(){var l=this[yt];return n(l),r(l),l.o.values()},c.entries=function(){var l=this[yt];return n(l),r(l),l.o.entries()},c.keys=function(){return this.values()},c[ff]=function(){return this.values()},c.forEach=function(l,d){for(var h=this.values(),u=h.next();!u.done;)l.call(d,u.value,u.value,this),u=h.next()},s}();BB("MapSet",{F:function(s,c){return new o(s,c)},T:function(s,c){return new a(s,c)}})}var Rw,mu,H7=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",WB=typeof Map<"u",GB=typeof Set<"u",Dw=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",oP=H7?Symbol.for("immer-nothing"):((Rw={})["immer-nothing"]=!0,Rw),Vw=H7?Symbol.for("immer-draftable"):"__$immer_draftable",yt=H7?Symbol.for("immer-state"):"__$immer_state",ff=typeof Symbol<"u"&&Symbol.iterator||"@@iterator",KB=""+Object.prototype.constructor,T7=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,YB=Object.getOwnPropertyDescriptors||function(t){var e={};return T7(t).forEach(function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)}),e},N6={},F6={get:function(t,e){if(e===yt)return t;var r=jr(t);if(!L6(r,e))return function(i,o,a){var s,c=Hw(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||!Ao(n)?n:n===Bm(t.t,e)?(Um(t),t.o[e]=vu(t.A.h,n,t)):n},has:function(t,e){return e in jr(t)},ownKeys:function(t){return Reflect.ownKeys(jr(t))},set:function(t,e,r){var n=Hw(jr(t),e);if(n!=null&&n.set)return n.set.call(t.k,r),!0;if(!t.P){var i=Bm(jr(t),e),o=i==null?void 0:i[yt];if(o&&o.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(NB(r,i)&&(r!==void 0||L6(t.t,e)))return!0;Um(t),ka(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 Bm(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,Um(t),ka(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=jr(t),n=Reflect.getOwnPropertyDescriptor(r,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:r[e]}},defineProperty:function(){vi(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){vi(12)}},Q2={};nd(F6,function(t,e){Q2[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),Q2.deleteProperty=function(t,e){return Q2.set.call(this,t,e,void 0)},Q2.set=function(t,e,r){return F6.set.call(this,t[0],e,r,t[0])};var XB=function(){function t(r){var n=this;this.g=Dw,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(p){var _=this;p===void 0&&(p=s);for(var m=arguments.length,g=Array(m>1?m-1:0),b=1;b<m;b++)g[b-1]=arguments[b];return c.produce(p,function(w){var x;return(x=o).call.apply(x,[_,w].concat(g))})}}var l;if(typeof o!="function"&&vi(6),a!==void 0&&typeof a!="function"&&vi(7),Ao(i)){var d=Pw(n),h=vu(n,i,void 0),u=!0;try{l=o(h),u=!1}finally{u?Np(d):O6(d)}return typeof Promise<"u"&&l instanceof Promise?l.then(function(p){return Nm(d,a),Fm(p,d)},function(p){throw Np(d),p}):(Nm(d,a),Fm(l,d))}if(!i||typeof i!="object"){if((l=o(i))===void 0&&(l=i),l===oP&&(l=void 0),n.D&&P7(l,!0),a){var f=[],v=[];aa("Patches").M(i,l,f,v),a(f,v)}return l}vi(21,i)},this.produceWithPatches=function(i,o){if(typeof i=="function")return function(l){for(var d=arguments.length,h=Array(d>1?d-1:0),u=1;u<d;u++)h[u-1]=arguments[u];return n.produceWithPatches(l,function(f){return i.apply(void 0,[f].concat(h))})};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){Ao(r)||vi(8),Gs(r)&&(r=jB(r));var n=Pw(this),i=vu(this,r,void 0);return i[yt].C=!0,O6(n),i},e.finishDraft=function(r,n){var i=r&&r[yt],o=i.A;return Nm(o,n),Fm(void 0,o)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!Dw&&vi(20),this.g=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=aa("Patches").$;return Gs(r)?a(r,n):this.produce(r,function(s){return a(s,n)})},t}(),ki=new XB,aP=ki.produce;ki.produceWithPatches.bind(ki);ki.setAutoFreeze.bind(ki);ki.setUseProxies.bind(ki);ki.applyPatches.bind(ki);ki.createDraft.bind(ki);ki.finishDraft.bind(ki);function Lw(t){return Ao(t)?aP(t,()=>{}):t}function QB(t){return typeof t=="function"}function r0(t,e){const[r,n,i]=JB(e);let o;if(QB(t))o=()=>Lw(t());else{const s=Lw(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,h)=>{if(h)if(Gs(d)){const f=h(d,c);return f===void 0?d:f}else{if(Ao(d))return aP(d,u=>h(u,c));{const u=h(d,c);if(u===void 0){if(d===null)return d;throw Error("A case reducer on a non-draftable value must not return undefined")}return u}}return d},s)}return a.getInitialState=o,a}function JB(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 ZB(t,e){const r=typeof e=="function"?e:r0(e.initial,o=>e.builder(o,t)),n=new r5(r),i=nP(t,n);return{actions:t,dispatch:i,subject:n}}const eU=()=>({request:ln("client/request",(e,r)=>{var n,i,o,a;return r??(r={}),(n=r.transaction)!==null&&n!==void 0||(r.transaction=rP()),(i=r.created)!==null&&i!==void 0||(r.created=Date.now()),(o=r.controller)!==null&&o!==void 0||(r.controller=new AbortController),(a=r.task)!==null&&a!==void 0||(r.task=new l$),{payload:e,meta:r}}),retry:ln("client/retry",e=>({payload:e})),success:ln("client/success",(e,r)=>({payload:e,meta:r})),cancel:ln("client/cancel",e=>({payload:e})),failure:ln("client/failure",(e,r)=>({payload:e,meta:r})),error:ln("client/error",(e,r)=>({payload:e,meta:r}))}),Cr=eU(),sP=t=>e=>e.pipe(Jt(Cr.request.match),wo(r=>{const{meta:{controller:n,transaction:i}}=r;return new it(o=>{if(n.signal.aborted)return o.next(Cr.cancel({transaction:i,reason:`request [${i}] was aborted!`})),o.complete();o.add(e.pipe(Jt(Cr.cancel.match)).subscribe(a=>{a.payload.transaction===i&&(n.signal.aborted||n.abort(),o.complete())})),o.add(x6(n.signal,"abort").subscribe(()=>{o.next(Cr.cancel({transaction:i,reason:`request [${i}] was aborted!`})),o.complete()})),o.add(Or(t(r)).subscribe({next:a=>o.next(a),error:a=>o.next(Cr.error(a,{request:r})),complete:()=>o.complete()}))})})),tU=t=>(t=Object.assign({},{count:0,delay:0},t),(e,r)=>e.pipe(sP(n=>e.pipe(Jt(Cr.failure.match),Jt(i=>i.meta.request===n),R$(r),nr(([i,o])=>{var a,s;const{transaction:c}=n.meta,l=o[c];if(!l)return Br;const d=(s=(a=l.retry)===null||a===void 0?void 0:a.length)!==null&&s!==void 0?s:0,h=Object.assign({},t,n.meta.retry);if(d>=h.count)throw h.count?Error("maximum retries executed!",{cause:i.payload}):i.payload;return(typeof h.delay=="function"?Or(h.delay(i.payload.cause)).pipe(Ar(f=>{throw Error("failed to resolve delay",{cause:f})})):vN(h.delay)).pipe(zt(()=>Cr.retry(n)))}))))),rU=t=>e=>e.pipe(sP(r=>Or(t(r.payload,r.meta.controller.signal)).pipe(zt(n=>Cr.success(n,{request:r})),Ar(n=>So(Cr.failure(Error(`failed to execute request for transaction ${r.meta.transaction}`,{cause:n}),{request:r})))))),nU=t=>t.pipe(Jt(Cr.retry.match),zt(e=>e.payload)),cP=()=>Jt(t=>t.status==="complete"),iU=(t={})=>r0(t,e=>e.addCase(Cr.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(Cr.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(Cr.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(Cr.cancel,(r,n)=>{const{transaction:i,reason:o}=n.payload;if(r[i]){const a=Object.assign({},$w(r[i]));a.task.error(new V6("abort",{request:a,message:o??"request was canceled"})),delete r[i]}}).addCase(Cr.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(Cr.error,(r,n)=>{const{payload:i,meta:o}=n,{transaction:a}=o.request.meta;if(r[a]){const s=Object.assign({},$w(r[a]));s.task.error(new V6("error",{request:s,message:`failed to process task [${a}]`,cause:i.cause})),delete r[a]}}));var oU=globalThis&&globalThis.__awaiter||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(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})},vr=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Ow=globalThis&&globalThis.__classPrivateFieldSet||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},br,Ic;class Nw extends it{get closed(){return vr(this,br,"f").closed}get state$(){return vr(this,br,"f")}get action$(){return vr(this,br,"f").action$}get success$(){return this.action$.pipe(Jt(Cr.success.match),zt(({payload:e})=>e))}get error$(){return this.action$.pipe(Gd("client/error"),R$(vr(this,br,"f")),zt(([e,r])=>{const{payload:n,meta:i}=e,{transaction:o}=i.request.meta,a=r[e.meta.request.meta.transaction];return new V6("error",{request:a,message:`failed to process task [${o}]`,cause:n})}))}constructor(e,r){super(o=>vr(this,br,"f").subscribe(o)),br.set(this,void 0),Ic.set(this,void 0);const n={};Ow(this,br,new r5(iU(n)),"f"),Ow(this,Ic,new Un(()=>vr(this,br,"f").complete()),"f"),vr(this,Ic,"f").add(vr(this,br,"f").addFlow(rU(e))),vr(this,Ic,"f").add(vr(this,br,"f").addFlow(nU));const i=Object.assign({count:0,delay:0},r==null?void 0:r.retry);vr(this,Ic,"f").add(vr(this,br,"f").addFlow(tU(i)))}next(e,r){const n=Cr.request(e,r);return vr(this,br,"f").next(n),n.meta}nextAsync(e,r){return oU(this,void 0,void 0,function*(){return Fi(this.next(e,r).task.pipe(cP()))})}getTaskByTransaction(e){const r=vr(this,br,"f").value[e];return r&&r.task}getTaskByRef(e){const r=Object.values(vr(this,br,"f").value).find(n=>n.ref===e);return r&&r.task}cancel(e,r){if(e)e&&vr(this,br,"f").value[e]&&(r??(r=`[${e}]: transaction canceled`),vr(this,br,"f").next(Cr.cancel({transaction:e,reason:r})));else for(const n of Object.keys(vr(this,br,"f").value))this.cancel(n,"all transactions canceled")}on(e,r){return vr(this,br,"f").addEffect(Cr[e].type,n=>{r(n,this)})}complete(){vr(this,Ic,"f").unsubscribe()}asObservable(){return vr(this,br,"f").asObservable()}}br=new WeakMap,Ic=new WeakMap;function aU(){return{set:ln("cache/set",(t,e)=>({payload:{key:t,entry:e}})),remove:ln("cache/remove",t=>({payload:t})),invalidate:ln("cache/invalidate",t=>({payload:t})),trim:ln("cache/trim",t=>({payload:t}))}}const H1=aU(),sU=(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 cU(t,e={}){return r0(e,r=>r.addCase(t.set,(n,i)=>{var o;const{key:a,entry:s}=i.payload,c=n[a];c?(c.updated=Date.now(),(o=c.updates)!==null&&o!==void 0||(c.updates=0),c.updates++):n[a]=Object.assign(Object.assign({},s),{created:Date.now()})}).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:sU,l=Object.keys(n),d=Object.entries(n).filter(([h,u])=>!s.validate||s.validate(u)).sort((h,u)=>c(h[1],u[1])).slice(0,(a=s.size)!==null&&a!==void 0?a:Number.MAX_SAFE_INTEGER).map(([h])=>h);if(l.length!==d.length)for(const h of l){const u=d.indexOf(h);u!==-1?d.splice(u,1):delete n[h]}}))}var Vo=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},lU=globalThis&&globalThis.__classPrivateFieldSet||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},ui;class Fw{get state$(){return Vo(this,ui,"f").asObservable()}constructor(e){ui.set(this,void 0);const{trimming:r,initial:n}=e;lU(this,ui,new r5(cU(H1,n)),"f"),r&&Vo(this,ui,"f").addEffect("cache/set",()=>Vo(this,ui,"f").next(H1.trim(r)))}setItem(...e){Vo(this,ui,"f").next(H1.set(...e))}getItem(e){return Vo(this,ui,"f").value[e]}removeItem(e){Vo(this,ui,"f").next(H1.remove(e))}invalidate(e){Vo(this,ui,"f").next(H1.invalidate(e))}trim(e){Vo(this,ui,"f").next(H1.trim(e))}reset(){Vo(this,ui,"f").reset()}complete(){Vo(this,ui,"f").complete()}}ui=new WeakMap;var Ft=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},T1=globalThis&&globalThis.__classPrivateFieldSet||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},dU=globalThis&&globalThis.__rest||function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var 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},Hc,oo,hs,X1,Q1,_4,B6;const hU=(t=0)=>e=>{var r;return((r=e.updated)!==null&&r!==void 0?r:0)+t>Date.now()},uU=t=>{if(typeof t=="function")return t;switch(t){case"concat":return yB;case"merge":return _B;case"switch":default:return bB}};class Sn{get client(){return Ft(this,oo,"f")}get cache(){return Ft(this,hs,"f")}constructor(e){var r;Hc.set(this,new Un),oo.set(this,void 0),hs.set(this,void 0),X1.set(this,new Ki),Q1.set(this,void 0),_4.set(this,void 0),B6.set(this,rP()),T1(this,Q1,i=>HB(e.key(i),Ft(this,B6,"f")),"f"),T1(this,_4,(r=e==null?void 0:e.validate)!==null&&r!==void 0?r:hU(e==null?void 0:e.expire),"f"),e.client instanceof Nw?T1(this,oo,e.client,"f"):(T1(this,oo,new Nw(e.client.fn,e.client.options),"f"),Ft(this,Hc,"f").add(()=>Ft(this,oo,"f").complete())),e.cache instanceof Fw?T1(this,hs,e.cache,"f"):(T1(this,hs,new Fw(e.cache||{}),"f"),Ft(this,Hc,"f").add(()=>Ft(this,hs,"f").complete()));const n=uU(e.queueOperator);Ft(this,Hc,"f").add(()=>Ft(this,X1,"f").complete()),Ft(this,Hc,"f").add(Ft(this,X1,"f").pipe(n(({args:i,options:o})=>new it(a=>{const{task:s,transaction:c}=Ft(this,oo,"f").next(i,o);a.add(s.pipe(Ar(()=>Br)).subscribe(a)),a.add(()=>{setTimeout(()=>Ft(this,oo,"f").cancel(c))})})),cP(),T$(()=>!Ft(this,oo,"f").closed)).subscribe(i=>{const{args:o,value:a,transaction:s,ref:c}=i,l=c??Ft(this,Q1,"f").call(this,o);Ft(this,hs,"f").setItem(l,{value:a,args:o,transaction:s})}))}next(e,r){Ft(this,X1,"f").next({args:e,options:r})}query(e,r){var n;const i=Ft(this,Q1,"f").call(this,e);return(n=Ft(this,oo,"f").getTaskByRef(i))!==null&&n!==void 0?n:this._createTask(i,e,r)}queryAsync(e,r){const n=r||{},{awaitResolve:i}=n,o=dU(n,["awaitResolve"]);return(i?Kr:Fi)(this._query(e,o))}complete(){Ft(this,Hc,"f").unsubscribe()}_query(e,r){var n;const i=Ft(this,Q1,"f").call(this,e);return(n=Ft(this,oo,"f").getTaskByRef(i))!==null&&n!==void 0?n:this._createTask(i,e,r)}_createTask(e,r,n){var i;const o=new l$,a=Ft(this,hs,"f").getItem(e);if(a){const{value:l,args:d,created:h,updated:u,updates:f,transaction:v}=a,p={status:"cache",value:l,args:d,created:h,updated:u,updates:f,transaction:v};o.next(p)}const s=((i=n==null?void 0:n.cache)===null||i===void 0?void 0:i.validate)||Ft(this,_4,"f");return a&&s(a,r)?o.complete():Ft(this,X1,"f").next({args:r,options:{ref:e,task:o}}),o.asObservable()}}Hc=new WeakMap,oo=new WeakMap,hs=new WeakMap,X1=new WeakMap,Q1=new WeakMap,_4=new WeakMap,B6=new WeakMap;Sn.extractQueryValue=wB;var os=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Bw=globalThis&&globalThis.__classPrivateFieldSet||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},J2,ya;class fU extends it{get currentContext(){return os(this,ya,"f").value}get currentContext$(){return os(this,ya,"f").asObservable()}get client(){return os(this,J2,"f")}constructor(e){super(r=>os(this,ya,"f").subscribe(r)),J2.set(this,void 0),ya.set(this,void 0),Bw(this,J2,new Sn(e),"f"),Bw(this,ya,new qd(void 0),"f")}setCurrentContext(e){typeof e=="string"?this.resolveContext(e).pipe(Ar(()=>Br)).subscribe(r=>this.setCurrentContext(r)):gB(e,os(this,ya,"f").value)||os(this,ya,"f").next(e)}resolveContext(e){return os(this,J2,"f").query({id:e}).pipe(zt(r=>r.value),Ar(r=>{throw r.cause?r.cause:r}))}resolveContextAsync(e,r){return(r!=null&&r.awaitResolve?Kr:Fi)(this.resolveContext(e))}dispose(){os(this,ya,"f").complete()}}J2=new WeakMap,ya=new WeakMap;var w2=globalThis&&globalThis.__awaiter||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(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})},vt=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},mc=globalThis&&globalThis.__classPrivateFieldSet||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},_a,b4,Z2,ao,Tc,Rc,eh,w4,x4;let pU=class{get contextClient(){return vt(this,_a,"f")}get queryClient(){return vt(this,b4,"f")}get currentContext$(){return vt(this,_a,"f").currentContext$}get currentContext(){return vt(this,_a,"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;_a.set(this,void 0),b4.set(this,void 0),Z2.set(this,void 0),ao.set(this,void 0),Tc.set(this,new Un),Rc.set(this,void 0),eh.set(this,void 0),w4.set(this,void 0),x4.set(this,new Ki);const{config:o,event:a}=e;e.parentContext&&console.warn("@deprecated","parentContext as arg is deprecated, use ContextProvider.connectParentContext"),mc(this,ao,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)),mc(this,Rc,o.contextType,"f"),mc(this,eh,o.contextFilter,"f"),mc(this,_a,new fU(o.client.get),"f"),mc(this,b4,new Sn(o.client.query),"f"),o.client.related&&mc(this,Z2,new Sn(o.client.related),"f"),mc(this,w4,(i=o.contextParameterFn)!==null&&i!==void 0?i:s=>({search:s.search,filter:{type:s.type}}),"f"),vt(this,ao,"f")&&(vt(this,Tc,"f").add(this.currentContext$.pipe(z6()).subscribe(([s,c])=>{var l;(l=vt(this,ao,"f"))===null||l===void 0||l.dispatchEvent("onCurrentContextChanged",{source:this,canBubble:!0,detail:{previous:s,next:c}})})),vt(this,Tc,"f").add(vt(this,ao,"f").addEventListener("onCurrentContextChanged",s=>{s.source!==this&&s.detail.next!==void 0&&this.setCurrentContext(s.detail.next)}))),vt(this,Tc,"f").add(vt(this,x4,"f").pipe(nr(s=>s),ed(s=>console.debug("ContextProvider::#contextQueue",s))).subscribe(s=>vt(this,_a,"f").setCurrentContext(s??null)))}connectParentContext(e,r){const i=e.currentContext$.pipe(Jt(o=>o!==void 0),Jt((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)}),nr(o=>w2(this,void 0,void 0,function*(){var a;if(o){const s=yield(a=vt(this,ao,"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}}return{next:o}})),Jt(o=>!o.canceled),nr(({next:o})=>this.setCurrentContext(o,{validate:!0,resolve:!0}).pipe(Ar(a=>(console.warn("ContextProvider::onParentContextChanged","setCurrentContext",a),Br)))),Ar(o=>(console.warn("ContextProvider::onParentContextChanged","unhandled exception",o),Br))).subscribe();return vt(this,Tc,"f").add(i),i}setCurrentContextById(e){return new it(r=>{try{vt(this,_a,"f").resolveContext(e).pipe(Jt(n=>!!n),nr(n=>this.setCurrentContext(n))).subscribe(r)}catch(n){r.error(n)}})}setCurrentContextByIdAsync(e){return Kr(this.setCurrentContextById(e))}setCurrentContext(e,r){const n=new Ki,i=new Ki,o=this._setCurrentContext(e,r).pipe(ed(a=>i.next(a)),H$(n),nw(()=>i.complete()),Ar(a=>(i.error(a),Br)));return vt(this,x4,"f").next(o),i.pipe(nw(()=>n.next(!0)))}_setCurrentContext(e,r){return new it(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=vt(this,ao,"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 So(e).pipe(nr(o=>w2(this,void 0,void 0,function*(){var a;const s=yield(a=vt(this,ao,"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})),nr(o=>this.resolveContext(o).pipe(zt(a=>({context:o,resolved:a})))),nr(({context:o,resolved:a})=>w2(this,void 0,void 0,function*(){var s;const c=yield(s=vt(this,ao,"f"))===null||s===void 0?void 0:s.dispatchEvent("onSetContextResolved",{source:this,cancelable:!0,detail:{context:o,resolved:a}});if(c!=null&&c.canceled)throw Error("resolving of context was canceled");return a})),nr(o=>this.setCurrentContext(o))).subscribe(n)}return So(e).pipe(nr(o=>w2(this,void 0,void 0,function*(){var a;const s=yield(a=vt(this,ao,"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 w2(this,void 0,void 0,function*(){return Kr(this.setCurrentContext(e,r))})}queryContext(e){const r=this.queryClient.query(vt(this,w4,"f").call(this,{search:e,type:vt(this,Rc,"f")})).pipe(zt(n=>n.value));return vt(this,eh,"f")?r.pipe(zt(vt(this,eh,"f"))):r}queryContextAsync(e){return Kr(this.queryContext(e))}validateContext(e){return vt(this,Rc,"f")?vt(this,Rc,"f").map(r=>r.toLowerCase()).includes(e.type.id.toLowerCase()):!0}resolveContext(e){return this.relatedContexts({item:e,filter:{type:vt(this,Rc,"f")}}).pipe(zt(r=>r.filter(n=>this.validateContext(n))),zt(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 Kr(this.resolveContext(e))}relatedContexts(e){return vt(this,Z2,"f")?vt(this,Z2,"f").query(e).pipe(zt(({value:r})=>r),Ar(r=>{throw r.cause?r.cause:r})):z$(()=>Error("ContextProvider::relatedContexts - no client defined for resolving related context"))}relatedContextsAsync(e){return Kr(this.relatedContexts(e))}clearCurrentContext(){this.setCurrentContext(null)}dispose(){vt(this,Tc,"f").unsubscribe(),vt(this,_a,"f").dispose()}};_a=new WeakMap,b4=new WeakMap,Z2=new WeakMap,ao=new WeakMap,Tc=new WeakMap,Rc=new WeakMap,eh=new WeakMap,w4=new WeakMap,x4=new WeakMap;var vU=globalThis&&globalThis.__awaiter||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(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const mU="context",gU={name:mU,configure:()=>new mB,initialize:function(t){var e;return vU(this,void 0,void 0,function*(){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 pU({config:r,event:n,parentContext:i}),a=new Un(()=>o.dispose());return this.postInitialize=s=>new it(c=>{const l=r.resolveInitialContext?Or(r.resolveInitialContext(s)).pipe(Jt(d=>!!d),nr(d=>s.modules.context.setCurrentContext(d,{validate:!0,resolve:!0}))):Br;c.add(l.pipe(Ar(d=>(console.warn("ContextModule.postInitialize","failed to resolve initial context",d),Br))).subscribe({next:d=>{console.debug("ContextModule.postInitialize",`initial context was resolved to [${d?d.id:"none"}]`,d)},complete:()=>{o.connectParentContext(i),c.complete()}}))}),this.dispose=()=>a.unsubscribe(),o})}};var Uw=globalThis&&globalThis.__awaiter||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(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};class yU{constructor(e){this.clientKey=e.clientKey,this.endpoint=e.endpoint,this.clientCtor=e.clientCtor}createHttpClientClient(e){return Uw(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 Uw(this,void 0,void 0,function*(){if(!this.endpoint)throw Error("no endpoint defined!");return new this.clientCtor({http:e,endpoint:this.endpoint})})}}var jm=globalThis&&globalThis.__awaiter||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(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};class _U{constructor(e,r){this._client=e,this._http=r}get environment(){return this._client.environment}resolveServices(){return this._client.fetchEnvironment()}resolveService(e){return jm(this,void 0,void 0,function*(){return this._client.resolveService(e)})}createClient(e,r){return jm(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 jm(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(L$(i,{baseUri:o,defaultScopes:a}))})}}var qm=globalThis&&globalThis.__awaiter||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(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})},jw=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},bU=globalThis&&globalThis.__classPrivateFieldSet||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},th;const qw="services";class wU{get environment(){var e;const r=(e=jw(this,th,"f").cache.getItem(qw))===null||e===void 0?void 0:e.value;if(!r)throw Error("no cached environment found");return r}constructor({http:e,endpoint:r}){th.set(this,void 0),this.http=e,this.endpoint=r,bU(this,th,new Sn({client:{fn:()=>e.fetch$(r,{selector:this.selector.bind(this)})},key:()=>qw,expire:5*60*1e3}),"f")}fetchEnvironment(){return qm(this,void 0,void 0,function*(){return Fi(Sn.extractQueryValue(jw(this,th,"f").query(void 0,{cache:{suppressInvalid:!0}})))})}selector(e){return qm(this,void 0,void 0,function*(){const r=yield e.json(),n=r.services.reduce((i,o)=>Object.assign(i,{[o.key]:{clientId:r.clientId,uri:o.uri,defaultScopes:[r.clientId+"/.default"]}}),{});return Object.assign(Object.assign({},r),{services:n})})}resolveService(e){return qm(this,void 0,void 0,function*(){try{const{services:r}=yield this.fetchEnvironment();return r[e]}catch(r){throw console.error(r),r}})}}th=new WeakMap;const xU="serviceDiscovery";var zU=globalThis&&globalThis.__awaiter||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(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const CU={name:xU,configure:()=>new yU({clientCtor:wU,clientKey:"service_discovery",endpoint:"/_discovery/environments/current"}),initialize:({config:t,requireInstance:e})=>zU(void 0,void 0,void 0,function*(){const r=yield e("http"),n=yield t.createHttpClientClient(r),i=yield t.createClient(n);return new _U(i,r)})};class kU{}class ha extends Error{constructor(e,r){super(`unsupported version ${e}`,{cause:r}),this.version=e}}const EU=(t,e)=>{var r;const n=(r=Xi[t])!==null&&r!==void 0?r:t;switch(n){case Xi.v2:throw new ha(t);case Xi.v1:default:{const{id:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/contexts/${i}/?${String(o)}`}}},SU=(t,e,r)=>[EU(t,e),r],AU=(t,e,r="json")=>(n,i)=>t[r](...SU(e,n,i));var MU=["eq","ne","gt","ge","lt","le"],pf=["and","or","not"],$U=["any","all"],PU=["startswith","endswith","contains"],IU=["expand","levels","select","skip","top","count","orderby","filter"],Ww=/\((.*)\)/,Gw=/(?!indexof)\((\w+)\)/,Kw;(function(t){t.sum="sum",t.min="min",t.max="max",t.average="average",t.countdistinct="countdistinct"})(Kw||(Kw={}));var va="";function lP(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,h=e.key,u=e.count,f=e.expand,v=e.action,p=e.func,_="",m=[],g={};if(h!=null&&(_+="(".concat(Qo(h,m),")")),(c||typeof u=="object")&&(g.$filter=gu(typeof u=="object"?u:c,m)),l&&(g.$apply=dP(l)),f&&(g.$expand=z4(f)),d&&(g.$orderby=R7(d)),u&&(typeof u=="boolean"?g.$count=!0:_+="/$count"),typeof a=="number"&&(g.$top=a),typeof s=="number"&&(g.$skip=s),v&&(_+="/".concat(v)),p){if(typeof p=="string")_+="/".concat(p);else if(typeof p=="object"){var b=Object.keys(p)[0],w=Qo(p[b],m);_+="/".concat(b),w!==""&&(_+="(".concat(w,")"))}}return m.length>0&&Object.assign(g,m.reduce(function(x,C){var S;return Object.assign(x,(S={},S["@".concat(C.name)]=Qo(C.value),S))},{})),VU(_,fr({$select:r,$search:n,$skiptoken:i,$format:o},g))}function Wm(t,e,r){return r===void 0&&(r=[]),"".concat(t," eq ").concat(Qo(e,r))}function gu(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,h){var u=o[h];if(u===void 0)return d;var f="";if(s?h===va?f=s:Gw.test(h)?f=h.replace(Gw,function(g,b){return b.trim()===va?"(".concat(s,")"):"(".concat(s,"/").concat(b.trim(),")")}):Ww.test(h)?f=h.replace(Ww,function(g,b){return b.trim()===va?"(".concat(s,")"):"(".concat(s,"/").concat(b.trim(),")")}):f="".concat(s,"/").concat(h):f=h,h===va&&Array.isArray(u))return d.concat(u.map(function(g){return Wm(f,g)}));if(["number","string","boolean"].indexOf(typeof u)!==-1||u instanceof Date||u===null)d.push(Wm(f,u,a));else if(Array.isArray(u)){var v=h,p=u.map(function(g){return gu(g,a,s)}).filter(function(g){return g}).map(function(g){return pf.indexOf(v)!==-1?"(".concat(g,")"):g});p.length&&(pf.indexOf(v)!==-1?p.length&&(v==="not"?d.push(Yw(p)):d.push("(".concat(p.join(" ".concat(v," ")),")"))):d.push(p.join(" ".concat(v," "))))}else if(pf.indexOf(f)!==-1){var _=f,p=Object.keys(u).map(function(b){var w;return n((w={},w[b]=u[b],w))});p.length&&(_==="not"?d.push(Yw(p)):d.push("(".concat(p.join(" ".concat(_," ")),")")))}else if(typeof u=="object")if("type"in u)d.push(Wm(f,u,a));else{var m=Object.keys(u);m.forEach(function(g){if(u[g]!==void 0)if(MU.indexOf(g)!==-1)d.push("".concat(f," ").concat(g," ").concat(Qo(u[g],a)));else if(pf.indexOf(g)!==-1)Array.isArray(u[g])?d.push(u[g].map(function(C){return"("+n(C,a,f)+")"}).join(" ".concat(g," "))):d.push("("+n(u[g],a,f)+")");else if($U.indexOf(g)!==-1){var b=i(h.toLowerCase(),u[g],g,f);b&&d.push(b)}else if(g==="has")d.push("".concat(f," ").concat(g," ").concat(Qo(u[g],a)));else if(g==="in"){var w=Array.isArray(u[g])?u[g]:u[g].value.map(function(C){return{type:u[g].type,value:C}});d.push(f+" in ("+w.map(function(C){return Qo(C,a)}).join(",")+")")}else if(PU.indexOf(g)!==-1)d.push("".concat(g,"(").concat(f,",").concat(Qo(u[g],a),")"));else{var x=n(u,a,f);x&&d.push(x)}})}else throw new Error("Unexpected value type: ".concat(u));return d},[]);c=l.join(" and ")}return c}function i(o,a,s,c){var l="";if(typeof a=="string"||a instanceof String)l=HU(o,a,s,c);else if(a){var d=Array.isArray(a)?a.reduce(function(u,f){return f.hasOwnProperty(va)?(u.hasOwnProperty(va)||(u[va]=[]),u[va].push(f[va]),u):fr(fr({},u),f)},{}):a,h=n(d,e,o);l="".concat(c,"/").concat(s,"(").concat(h?"".concat(o,":").concat(h):"",")")}return l}}function HU(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 TU(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 Qo(t,e){if(typeof t=="string")return"'".concat(TU(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 Qo(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(Qo(i,e))}).join(",")}return t}function z4(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 z4(r)}).join(","));if(typeof t=="object"){var e=Object.keys(t);return e.some(function(r){return IU.indexOf(r.toLowerCase())!==-1})?e.map(function(r){var n;switch(r){case"filter":n=gu(t[r]);break;case"orderBy":n=R7(t[r]);break;case"levels":case"count":case"skip":case"top":n="".concat(t[r]);break;default:n=z4(t[r])}return"$".concat(r.toLowerCase(),"=").concat(n)}).join(";"):e.map(function(r){var n=z4(t[r]);return n?"".concat(r,"(").concat(n,")"):r}).join(",")}return""}function dP(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=n$(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(RU(o),")")),a){var d=gu(a);d&&n.push("filter(".concat(gu(d),")"))}return s&&n.push("groupby(".concat(DU(s),")")),n},[]);return r.join("/")||void 0}function RU(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)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 DU(t){if(!t.properties)throw new Error("'properties' property required for groupBy");var e="(".concat(t.properties.join(","),")");return t.transform&&(e+=",".concat(dP(t.transform))),e}function R7(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 R7(i,"".concat(n,"/"))}).map(function(r){return"".concat(e).concat(r)}).join(","):"".concat(e).concat(String(t))}function VU(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 Yw(t){return"not(".concat(t.join(" and "),")")}const LU=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]})}},{}),OU=t=>Object.entries(t).filter(([e,r])=>!!r).reduce((e,[r,n])=>{switch(r){case"filter":return Object.assign(Object.assign({},e),{[r]:LU(n)});default:return Object.assign(Object.assign({},e),{[r]:t[r]})}},{}),NU=t=>typeof t=="string"?t:lP(OU(t)),FU=(t,e)=>{var r;const n=(r=Xi[t])!==null&&r!==void 0?r:t;switch(n){case Xi.v2:throw new ha(t);case Xi.v1:default:{const{query:i,includeDeleted:o}=e,a=new URLSearchParams(NU(i));return a.append("api-version",n),o&&a.append("includeDeleted","true"),`/contexts/?${String(a)}`}}},BU=(t,e,r)=>[FU(t,e),r],UU=(t,e,r="json")=>(n,i)=>t[r](...BU(e,n,i)),jU=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]})}},{}),qU=t=>Object.entries(t).filter(([e,r])=>!!r).reduce((e,[r,n])=>{switch(r){case"filter":return Object.assign(Object.assign({},e),{[r]:jU(n)});default:return Object.assign(Object.assign({},e),{[r]:t[r]})}},{}),WU=t=>typeof t=="string"?t:lP(qU(t)),GU=(t,e)=>{var r;const n=(r=Xi[t])!==null&&r!==void 0?r:t;switch(n){case Xi.v2:throw new ha(t);case Xi.v1:default:{const{id:i,query:o}=e,a=new URLSearchParams(WU(o||""));return a.append("api-version",n),`/contexts/${i}/relations?${String(a)}`}}},KU=(t,e,r)=>[GU(t,e),r],YU=(t,e,r="json")=>(n,i)=>t[r](...KU(e,n,i));class XU{get Version(){return Xi}constructor(e,r){this._client=e,this._method=r}get(e,...r){return AU(this._client,e,this._method)(...r)}query(e,...r){return UU(this._client,e,this._method)(...r)}related(e,...r){return YU(this._client,e,this._method)(...r)}}var Xi;(function(t){t.v1="1.0",t.v2="2.0"})(Xi||(Xi={}));const QU=(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)}`}}},JU=(t,e,r)=>{const n=QU(t,e),i=Object.assign({},{method:"Delete"},r);return[n,i]},ZU=(t,e,r="fetch")=>(n,i)=>t[r](...JU(e,n,i)),ej=ZU,tj=(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)}`}}},rj=(t,e,r)=>[tj(t,e),r],nj=(t,e,r="json")=>(n,i)=>t[r](...rj(e,n,i)),ij=nj,oj=(t,e)=>{switch(t){case"v1":default:{const r=new URLSearchParams;return r.append("api-version",t),`/bookmarks?${String(r)}`}}},aj=(t,e,r)=>{const n=oj(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]},sj=(t,e,r="json")=>(n,i)=>t[r](...aj(e,n,i)),cj=sj,lj=(t,e)=>{switch(t){case"v1":default:{const r=new URLSearchParams;return r.append("api-version",t),`/bookmarks/${e.id}?${String(r)}`}}},dj=(t,e,r)=>{const n=lj(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]},hj=(t,e,r="json")=>(n,i)=>t[r](...dj(e,n,i)),uj=hj,fj=t=>{switch(t){case"v1":default:{const e=new URLSearchParams;return e.append("api-version",t),`persons/me/bookmarks/?${String(e)}`}}},pj=(t,e)=>[fj(t),e],vj=(t,e,r="json")=>n=>t[r](...pj(e,n)),mj=vj,gj=(t,e)=>{switch(t){case"v1":default:{const r=new URLSearchParams;return r.append("api-version",t),`/persons/me/bookmarks/favourites?${String(r)}`}}},yj=(t,e,r)=>{const n=gj(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]},_j=(t,e,r="json")=>(n,i)=>t[r](...yj(e,n,i)),bj=_j,wj=(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)}`}}},xj=(t,e,r)=>{const n=wj(t,e),i=Object.assign({},{method:"Delete"},r);return[n,i]},zj=(t,e,r="fetch")=>(n,i)=>t[r](...xj(e,n,i)),Cj=zj,kj=(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)}`}}},Ej=(t,e,r)=>{const n=kj(t,e),i=new Headers;i.append("content-type","application/json");const o=Object.assign({},{method:"head",headers:i},r);return[n,o]},Sj=(t,e,r="json")=>(n,i)=>t[r](...Ej(e,n,i)),Aj=Sj;class Mj{constructor(e,r){this._client=e,this._method=r}get(e,...r){return ij(this._client,e,this._method)(...r)}getAll(e){return mj(this._client,e,this._method)()}post(e,...r){return cj(this._client,e,this._method)(...r)}patch(e,...r){return uj(this._client,e,this._method)(...r)}delete(e,...r){return ej(this._client,e,this._method)(...r)}addFavorite(e,...r){return bj(this._client,e,this._method)(...r)}removeFavorite(e,...r){return Cj(this._client,e,this._method)(...r)}verifyFavorite(e,...r){return Aj(this._client,e,this._method)(...r)}}const $j=Mj,Pj=(t,e)=>{var r;const n=(r=Zt[t])!==null&&r!==void 0?r:t;switch(n){case Zt.v2:throw new ha(t);case Zt.v1:default:{const{id:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/notification/${i}/?${String(o)}`}}},Ij=(t,e,r)=>[Pj(t,e),r],Hj=(t,e,r="json")=>(n,i)=>t[r](...Ij(e,n,i)),Tj=(t,e)=>{var r;const n=(r=Zt[t])!==null&&r!==void 0?r:t;switch(n){case Zt.v2:throw new ha(t);case Zt.v1:default:{const{userId:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/person/${i}/notifications/?${String(o)}`}}},Rj=(t,e,r)=>{const n=Tj(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]},Dj=(t,e,r="json")=>(n,i)=>t[r](...Rj(e,n,i)),Vj=(t,e)=>{var r;const n=(r=Zt[t])!==null&&r!==void 0?r:t;switch(n){case Zt.v2:throw new ha(t);case Zt.v1:default:{const{id:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/notification/${i}/?${String(o)}`}}},Lj=(t,e,r)=>{const n=Vj(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]},Oj=(t,e,r="json")=>(n,i)=>t[r](...Lj(e,n,i)),Nj=(t,e)=>{var r;const n=(r=Zt[t])!==null&&r!==void 0?r:t;switch(n){case Zt.v2:throw new ha(t);case Zt.v1:default:{const{userId:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/person/${i}/notifications/?${String(o)}`}}},Fj=(t,e,r)=>[Nj(t,e),r],Bj=(t,e,r="json")=>(n,i)=>t[r](...Fj(e,n,i)),Uj=(t,e)=>{var r;const n=(r=Zt[t])!==null&&r!==void 0?r:t;switch(n){case Zt.v2:throw new ha(t);case Zt.v1:default:{const{id:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/notification/${i}/?${String(o)}`}}},jj=(t,e,r)=>{const n=Uj(t,e),i=new Headers;i.append("content-type","application/json");const o=Object.assign({},{method:"delete",headers:i},r);return[n,o]},qj=(t,e,r="json")=>(n,i)=>t[r](...jj(e,n,i));var Zt;(function(t){t.v1="1.0",t.v2="2.0"})(Zt||(Zt={}));const Wj=(t,e)=>{var r;const n=(r=Zt[t])!==null&&r!==void 0?r:t;switch(n){case Zt.v2:throw new ha(t);case Zt.v1:default:{const{userId:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/person/${i}/notifications/settings/?${String(o)}`}}},Gj=(t,e,r)=>{const n=Wj(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]},Kj=(t,e,r="json")=>(n,i)=>t[r](...Gj(e,n,i)),Yj=Kj,Xj=(t,e)=>{var r;const n=(r=Zt[t])!==null&&r!==void 0?r:t;switch(n){case Zt.v2:throw new ha(t);case Zt.v1:default:{const{userId:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/person/${i}/notifications/settings/?${String(o)}`}}},Qj=(t,e,r)=>[Xj(t,e),r],Jj=(t,e,r="json")=>(n,i)=>t[r](...Qj(e,n,i)),Zj=Jj;class eq{get Version(){return Zt}constructor(e,r){this._client=e,this._method=r}getAll(e,...r){return Bj(this._client,e,this._method)(...r)}getById(e,...r){return Hj(this._client,e,this._method)(...r)}setSeenByUser(e,...r){return Oj(this._client,e,this._method)(...r)}create(e,...r){return Dj(this._client,e,this._method)(...r)}delete(e,...r){return qj(this._client,e,this._method)(...r)}getSettings(e,...r){return Zj(this._client,e,this._method)(...r)}updateSettings(e,...r){return Yj(this._client,e,this._method)(...r)}}var C4=globalThis&&globalThis.__awaiter||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(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};class tq extends Error{constructor(e,r,n){super(e,n),this.response=r,this.name="ApiProviderError"}}const Gm=t=>C4(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 tq("failed to execute request, response was not ok",{headers:r,status:n,statusText:i,type:o,url:a,data:l})}});class rq{constructor({createClient:e}){this._createClientFn=e}createNotificationClient(e){return C4(this,void 0,void 0,function*(){const r=yield this._createClientFn("notification");return r.responseHandler.add("validate_api_request",Gm),new eq(r,e)})}createBookmarksClient(e){return C4(this,void 0,void 0,function*(){const r=yield this._createClientFn("bookmarks");return r.responseHandler.add("validate_api_request",Gm),new $j(r,e)})}createContextClient(e){return C4(this,void 0,void 0,function*(){const r=yield this._createClientFn("context");return r.responseHandler.add("validate_api_request",Gm),new XU(r,e)})}}var hP=globalThis&&globalThis.__awaiter||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(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const nq="services",iq=(t,e)=>r=>hP(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}`)}),oq={name:nq,configure:()=>new kU,initialize:({ref:t,config:e,requireInstance:r,hasModule:n})=>hP(void 0,void 0,void 0,function*(){if(!e.createClient){const i=yield r("http"),o=n("serviceDiscovery")?yield r("serviceDiscovery"):t==null?void 0:t.serviceDiscovery;e.createClient=iq(i,o)}if(!e.createClient)throw Error("missing configuration for creating API client");return new rq(e)})},aq=oq;class sq extends EN{constructor(){super([IN,Z$,b7,CU,aq,gU]),this.logger=new r$("FrameworkConfigurator")}configureHttp(...e){this.addConfig(UN(...e))}configureHttpClient(...e){this.addConfig(L$(...e))}configureMsal(...e){this.addConfig(rB(...e))}configureServiceDiscovery(e){this.configureHttpClient("service_discovery",e.client)}}var cq=globalThis&&globalThis.__awaiter||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(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const lq=(t,e)=>cq(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}),uP=y.createContext(null),dq=uP.Provider;var hq=globalThis&&globalThis.__awaiter||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(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const uq=t=>y.lazy(()=>hq(void 0,void 0,void 0,function*(){const e=new sq;yield t(e);const r=yield lq(e);return{default:({children:n})=>z(dq,Object.assign({value:r},{children:n}))}})),jn=()=>{let t=y.useContext(uP);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},fq=t=>{const e=y.useMemo(()=>uq(t.configure),[t.configure]);return z(y.Suspense,Object.assign({fallback:t.fallback},{children:z(e,{children:t.children})}))};function At(){return At=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},At.apply(this,arguments)}function id(t){return id=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},id(t)}function Km(t){return t&&id(t)==="object"&&t.constructor===Object}function fP(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{clone:!0},n=r.clone?At({},t):t;return Km(t)&&Km(e)&&Object.keys(e).forEach(function(i){i!=="__proto__"&&(Km(e[i])&&i in t?n[i]=fP(t[i],e[i],r):n[i]=e[i])}),n}var le={},pq={get exports(){return le},set exports(t){le=t}},vq="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",mq=vq,gq=mq;function pP(){}function vP(){}vP.resetWarningCache=pP;var yq=function(){function t(n,i,o,a,s,c){if(c!==gq){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}t.isRequired=t;function e(){return t}var r={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:vP,resetWarningCache:pP};return r.PropTypes=r,r};pq.exports=yq();function _q(t,e){if(id(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(id(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function bq(t){var e=_q(t,"string");return id(e)==="symbol"?e:String(e)}var wq=typeof Symbol=="function"&&Symbol.for;const mP=wq?Symbol.for("mui.nested"):"__THEME_NESTED__";var xq=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];function zq(){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,h){var u=h.options.name;if(u&&u.indexOf("Mui")===0&&!h.options.link&&!r){if(xq.indexOf(d.key)!==-1)return"Mui-".concat(d.key);var f="".concat(s).concat(u,"-").concat(d.key);return!h.options.theme[mP]||a!==""?f:"".concat(f,"-").concat(l())}return"".concat(s).concat(i).concat(l())}}var Xw=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},n0=(typeof window>"u"?"undefined":Xw(window))==="object"&&(typeof document>"u"?"undefined":Xw(document))==="object"&&document.nodeType===9;function Qw(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,bq(n.key),n)}}function gP(t,e,r){return e&&Qw(t.prototype,e),r&&Qw(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function U6(t,e){return U6=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},U6(t,e)}function yP(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,U6(t,e)}function Jw(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _P(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 Cq={}.constructor;function j6(t){if(t==null||typeof t!="object")return t;if(Array.isArray(t))return t.map(j6);if(t.constructor!==Cq)return t;var e={};for(var r in t)e[r]=j6(t[r]);return e}function D7(t,e,r){t===void 0&&(t="unnamed");var n=r.jss,i=j6(e),o=n.plugins.onCreateRule(t,i,r);return o||(t[0],null)}var Zw=function(e,r){for(var n="",i=0;i<e.length&&e[i]!=="!important";i++)n&&(n+=r),n+=e[i];return n},n1=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+=Zw(e[n]," ");else r=Zw(e,", ");return e[e.length-1]==="!important"&&(r+=" !important"),r};function Yd(t){return t&&t.format===!1?{linebreak:"",space:""}:{linebreak:`
74
+ `));return e.currentContext?So(e.currentContext):Br},vB=t=>({ref:e,modules:r})=>{const{context:n,navigation:i}=r,o=fB(n,t==null?void 0:t.path);return cN(i?o(i.path.pathname):Br,pB({ref:e,modules:r})).pipe(wN())};var hf=globalThis&&globalThis.__awaiter||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(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})},Sw=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},g4;class mB{constructor(){this.defaultExpireTime=1*60*1e3,g4.set(this,[])}addConfigBuilder(e){Sw(this,g4,"f").push(e)}_getServiceProvider(e){var r;return hf(this,void 0,void 0,function*(){if(e.hasModule("services"))return e.requireInstance("services");{const n=(r=e.ref)===null||r===void 0?void 0:r.services;if(n)return n;throw Error("no service services provider configures [ServicesModule]")}})}createConfig(e){var r,n;return hf(this,void 0,void 0,function*(){const i=yield Sw(this,g4,"f").reduce((o,a)=>hf(this,void 0,void 0,function*(){const s=new lB(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=vB()),(n=i.client)!==null&&n!==void 0||(i.client=yield(()=>hf(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:iB})},key:({id:s})=>s,expire:this.defaultExpireTime},query:{client:{fn:s=>a.query("v1",{query:s},{selector:oB})},key:s=>JSON.stringify(s),expire:this.defaultExpireTime},related:{client:{fn:s=>a.related("v1",{id:s.item.id,query:{filter:s.filter}},{selector:aB})},key:s=>JSON.stringify(s),expire:this.defaultExpireTime}}}))()),i})}}g4=new WeakMap;var gB=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},Aw;(function(t){t.IDLE="idle",t.ACTIVE="active",t.FAILED="failed",t.CANCELED="canceled"})(Aw||(Aw={}));const yB=t=>e=>e.pipe(gN(t)),_B=t=>e=>e.pipe(wo(t)),bB=t=>e=>e.pipe(nr(t)),wB=t=>t.pipe(zt(e=>e.value));var uf,xB=new Uint8Array(16);function zB(){if(!uf&&(uf=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!uf))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return uf(xB)}const CB=/^(?:[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 eP(t){return typeof t=="string"&&CB.test(t)}var on=[];for(var Lm=0;Lm<256;++Lm)on.push((Lm+256).toString(16).substr(1));function tP(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=(on[t[e+0]]+on[t[e+1]]+on[t[e+2]]+on[t[e+3]]+"-"+on[t[e+4]]+on[t[e+5]]+"-"+on[t[e+6]]+on[t[e+7]]+"-"+on[t[e+8]]+on[t[e+9]]+"-"+on[t[e+10]]+on[t[e+11]]+on[t[e+12]]+on[t[e+13]]+on[t[e+14]]+on[t[e+15]]).toLowerCase();if(!eP(r))throw TypeError("Stringified UUID is invalid");return r}function kB(t){if(!eP(t))throw TypeError("Invalid UUID");var e,r=new Uint8Array(16);return r[0]=(e=parseInt(t.slice(0,8),16))>>>24,r[1]=e>>>16&255,r[2]=e>>>8&255,r[3]=e&255,r[4]=(e=parseInt(t.slice(9,13),16))>>>8,r[5]=e&255,r[6]=(e=parseInt(t.slice(14,18),16))>>>8,r[7]=e&255,r[8]=(e=parseInt(t.slice(19,23),16))>>>8,r[9]=e&255,r[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,r[11]=e/4294967296&255,r[12]=e>>>24&255,r[13]=e>>>16&255,r[14]=e>>>8&255,r[15]=e&255,r}function EB(t){t=unescape(encodeURIComponent(t));for(var e=[],r=0;r<t.length;++r)e.push(t.charCodeAt(r));return e}var SB="6ba7b810-9dad-11d1-80b4-00c04fd430c8",AB="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function MB(t,e,r){function n(i,o,a,s){if(typeof i=="string"&&(i=EB(i)),typeof o=="string"&&(o=kB(o)),o.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var c=new Uint8Array(16+i.length);if(c.set(o),c.set(i,o.length),c=r(c),c[6]=c[6]&15|e,c[8]=c[8]&63|128,a){s=s||0;for(var l=0;l<16;++l)a[s+l]=c[l];return a}return tP(c)}try{n.name=t}catch{}return n.DNS=SB,n.URL=AB,n}function rP(t,e,r){t=t||{};var n=t.random||(t.rng||zB)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){r=r||0;for(var i=0;i<16;++i)e[r+i]=n[i];return e}return tP(n)}function $B(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 Om(t,e){return t<<e|t>>>32-e}function PB(t){var e=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof t=="string"){var n=unescape(encodeURIComponent(t));t=[];for(var i=0;i<n.length;++i)t.push(n.charCodeAt(i))}else Array.isArray(t)||(t=Array.prototype.slice.call(t));t.push(128);for(var o=t.length/4+2,a=Math.ceil(o/16),s=new Array(a),c=0;c<a;++c){for(var l=new Uint32Array(16),d=0;d<16;++d)l[d]=t[c*64+d*4]<<24|t[c*64+d*4+1]<<16|t[c*64+d*4+2]<<8|t[c*64+d*4+3];s[c]=l}s[a-1][14]=(t.length-1)*8/Math.pow(2,32),s[a-1][14]=Math.floor(s[a-1][14]),s[a-1][15]=(t.length-1)*8&4294967295;for(var h=0;h<a;++h){for(var u=new Uint32Array(80),f=0;f<16;++f)u[f]=s[h][f];for(var v=16;v<80;++v)u[v]=Om(u[v-3]^u[v-8]^u[v-14]^u[v-16],1);for(var p=r[0],_=r[1],m=r[2],g=r[3],b=r[4],w=0;w<80;++w){var x=Math.floor(w/20),C=Om(p,5)+$B(x,_,m,g)+b+e[x]+u[w]>>>0;b=g,g=m,m=Om(_,30)>>>0,_=p,p=C}r[0]=r[0]+p>>>0,r[1]=r[1]+_>>>0,r[2]=r[2]+m>>>0,r[3]=r[3]+g>>>0,r[4]=r[4]+b>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}var IB=MB("v5",80,PB);const HB=IB;class V6 extends Error{constructor(e,r){super(r.message,{cause:r.cause}),this.type=e,this.name="QueryClientError",this.request=r.request}}const Gd=(...t)=>Jt(e=>t.includes(e.type));var xn=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},TB=globalThis&&globalThis.__classPrivateFieldSet||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},Oo,io;class r5 extends it{get action$(){return xn(this,Oo,"f").asObservable()}get value(){return xn(this,io,"f").value}get closed(){return xn(this,io,"f").closed||xn(this,Oo,"f").closed}constructor(e,r){super(i=>xn(this,io,"f").subscribe(i)),Oo.set(this,new Ki),io.set(this,void 0);const n="getInitialState"in e?e.getInitialState():r;TB(this,io,new qd(n),"f"),xn(this,Oo,"f").pipe(I$(e,n),$$()).subscribe(xn(this,io,"f")),this.reset=()=>xn(this,io,"f").next(n)}next(e){xn(this,Oo,"f").next(e)}addEffect(e,r){const n=typeof e=="string"?this.action$.pipe(Gd(e)):this.action$,i=r||e;return n.pipe(wo(o=>Or(new Promise((a,s)=>{try{a(i(o,this.value))}catch(c){s(c)}})).pipe(Ar(a=>(console.warn("unhandled effect",a),Br)))),Jt(o=>!!o),xp(wp)).subscribe(xn(this,Oo,"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(Ar(n=>(console.trace("unhandled exception, epic closed!",n),Br)),xp(wp)).subscribe(xn(this,Oo,"f"))}unsubscribe(){xn(this,Oo,"f").unsubscribe(),xn(this,io,"f").unsubscribe()}complete(){xn(this,Oo,"f").complete(),xn(this,io,"f").complete()}asObservable(){return xn(this,io,"f").asObservable()}}Oo=new WeakMap,io=new WeakMap;const nP=(t,e)=>Object.entries(t).reduce((r,[n,i])=>Object.assign(r,{[n]:typeof i=="function"?(...o)=>e.next(i(...o)):nP(i,e)}),{});function ln(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 y4="::",S7=t=>new RegExp(`${y4}\\${t}$`),Mw=t=>t.type.replace(S7("\\w+$"),"");function Wo(t,e,r,n){const i=ln([t,"request"].join(y4),e);return r&&Object.assign(i,{success:ln([t,"success"].join(y4),r)}),n&&Object.assign(i,{failure:ln([t,"failure"].join(y4),n)}),i}const RB=t=>!!t.type.match(/::request$/),DB=t=>!!t.type.match(S7("success")),VB=t=>!!t.type.match(S7("failure")),LB=t=>DB(t)||VB(t);function vi(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 Gs(t){return!!t&&!!t[yt]}function Ao(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)===KB}(t)||Array.isArray(t)||!!t[Vw]||!!(!((e=t.constructor)===null||e===void 0)&&e[Vw])||A7(t)||M7(t))}function $w(t){return Gs(t)||vi(23,t),t[yt].t}function nd(t,e,r){r===void 0&&(r=!1),Kd(t)===0?(r?Object.keys:T7)(t).forEach(function(n){r&&typeof n=="symbol"||e(n,t[n],t)}):t.forEach(function(n,i){return e(i,n,t)})}function Kd(t){var e=t[yt];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:A7(t)?2:M7(t)?3:0}function L6(t,e){return Kd(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function OB(t,e){return Kd(t)===2?t.get(e):t[e]}function iP(t,e,r){var n=Kd(t);n===2?t.set(e,r):n===3?t.add(r):t[e]=r}function NB(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function A7(t){return WB&&t instanceof Map}function M7(t){return GB&&t instanceof Set}function jr(t){return t.o||t.t}function $7(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=YB(t);delete e[yt];for(var r=T7(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 P7(t,e){return e===void 0&&(e=!1),I7(t)||Gs(t)||!Ao(t)||(Kd(t)>1&&(t.set=t.add=t.clear=t.delete=FB),Object.freeze(t),e&&nd(t,function(r,n){return P7(n,!0)},!0)),t}function FB(){vi(2)}function I7(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function aa(t){var e=N6[t];return e||vi(18,t),e}function BB(t,e){N6[t]||(N6[t]=e)}function Op(){return mu}function Nm(t,e){e&&(aa("Patches"),t.u=[],t.s=[],t.v=e)}function Np(t){O6(t),t.p.forEach(UB),t.p=null}function O6(t){t===mu&&(mu=t.l)}function Pw(t){return mu={p:[],l:mu,h:t,m:!0,_:0}}function UB(t){var e=t[yt];e.i===0||e.i===1?e.j():e.O=!0}function Fm(t,e){e._=e.p.length;var r=e.p[0],n=t!==void 0&&t!==r;return e.h.g||aa("ES5").S(e,t,n),n?(r[yt].P&&(Np(e),vi(4)),Ao(t)&&(t=Fp(e,t),e.l||Bp(e,t)),e.u&&aa("Patches").M(r[yt].t,t,e.u,e.s)):t=Fp(e,r,[]),Np(e),e.u&&e.v(e.u,e.s),t!==oP?t:void 0}function Fp(t,e,r){if(I7(e))return e;var n=e[yt];if(!n)return nd(e,function(s,c){return Iw(t,n,e,s,c,r)},!0),e;if(n.A!==t)return e;if(!n.P)return Bp(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=$7(n.k):n.o,o=i,a=!1;n.i===3&&(o=new Set(i),i.clear(),a=!0),nd(o,function(s,c){return Iw(t,n,i,s,c,r,a)}),Bp(t,i,!1),r&&t.u&&aa("Patches").N(n,r,t.u,t.s)}return n.o}function Iw(t,e,r,n,i,o,a){if(Gs(i)){var s=Fp(t,i,o&&e&&e.i!==3&&!L6(e.R,n)?o.concat(n):void 0);if(iP(r,n,s),!Gs(s))return;t.m=!1}else a&&r.add(i);if(Ao(i)&&!I7(i)){if(!t.h.D&&t._<1)return;Fp(t,i),e&&e.A.l||Bp(t,i)}}function Bp(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&P7(e,r)}function Bm(t,e){var r=t[yt];return(r?jr(r):t)[e]}function Hw(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 ka(t){t.P||(t.P=!0,t.l&&ka(t.l))}function Um(t){t.o||(t.o=$7(t.t))}function vu(t,e,r){var n=A7(e)?aa("MapSet").F(e,r):M7(e)?aa("MapSet").T(e,r):t.g?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:Op(),P:!1,I:!1,R:{},l:o,t:i,k:null,o:null,j:null,C:!1},c=s,l=F6;a&&(c=[s],l=Q2);var d=Proxy.revocable(c,l),h=d.revoke,u=d.proxy;return s.k=u,s.j=h,u}(e,r):aa("ES5").J(e,r);return(r?r.A:Op()).p.push(n),n}function jB(t){return Gs(t)||vi(22,t),function e(r){if(!Ao(r))return r;var n,i=r[yt],o=Kd(r);if(i){if(!i.P&&(i.i<4||!aa("ES5").K(i)))return i.t;i.I=!0,n=Tw(r,o),i.I=!1}else n=Tw(r,o);return nd(n,function(a,s){i&&OB(i.t,a)===s||iP(n,a,e(s))}),o===3?new Set(n):n}(t)}function Tw(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return $7(t)}function qB(){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(Ao(c)){var l=vu(s.A.h,c,s);s.p.set(c,l),s.o.add(l)}else s.o.add(c)}))}function n(s){s.O&&vi(3,JSON.stringify(jr(s)))}var i=function(s,c){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,d){l.__proto__=d}||function(l,d){for(var h in d)d.hasOwnProperty(h)&&(l[h]=d[h])})(s,c)},o=function(){function s(l,d){return this[yt]={i:2,l:d,A:d?d.A:Op(),P:!1,I:!1,o:void 0,R:void 0,t:l,k:this,C:!1,O:!1},this}t(s,Map);var c=s.prototype;return Object.defineProperty(c,"size",{get:function(){return jr(this[yt]).size}}),c.has=function(l){return jr(this[yt]).has(l)},c.set=function(l,d){var h=this[yt];return n(h),jr(h).has(l)&&jr(h).get(l)===d||(e(h),ka(h),h.R.set(l,!0),h.o.set(l,d),h.R.set(l,!0)),this},c.delete=function(l){if(!this.has(l))return!1;var d=this[yt];return n(d),e(d),ka(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[yt];n(l),jr(l).size&&(e(l),ka(l),l.R=new Map,nd(l.t,function(d){l.R.set(d,!1)}),l.o.clear())},c.forEach=function(l,d){var h=this;jr(this[yt]).forEach(function(u,f){l.call(d,h.get(f),f,h)})},c.get=function(l){var d=this[yt];n(d);var h=jr(d).get(l);if(d.I||!Ao(h)||h!==d.t.get(l))return h;var u=vu(d.A.h,h,d);return e(d),d.o.set(l,u),u},c.keys=function(){return jr(this[yt]).keys()},c.values=function(){var l,d=this,h=this.keys();return(l={})[ff]=function(){return d.values()},l.next=function(){var u=h.next();return u.done?u:{done:!1,value:d.get(u.value)}},l},c.entries=function(){var l,d=this,h=this.keys();return(l={})[ff]=function(){return d.entries()},l.next=function(){var u=h.next();if(u.done)return u;var f=d.get(u.value);return{done:!1,value:[u.value,f]}},l},c[ff]=function(){return this.entries()},s}(),a=function(){function s(l,d){return this[yt]={i:3,l:d,A:d?d.A:Op(),P:!1,I:!1,o:void 0,t:l,k:this,p:new Map,O:!1,C:!1},this}t(s,Set);var c=s.prototype;return Object.defineProperty(c,"size",{get:function(){return jr(this[yt]).size}}),c.has=function(l){var d=this[yt];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[yt];return n(d),this.has(l)||(r(d),ka(d),d.o.add(l)),this},c.delete=function(l){if(!this.has(l))return!1;var d=this[yt];return n(d),r(d),ka(d),d.o.delete(l)||!!d.p.has(l)&&d.o.delete(d.p.get(l))},c.clear=function(){var l=this[yt];n(l),jr(l).size&&(r(l),ka(l),l.o.clear())},c.values=function(){var l=this[yt];return n(l),r(l),l.o.values()},c.entries=function(){var l=this[yt];return n(l),r(l),l.o.entries()},c.keys=function(){return this.values()},c[ff]=function(){return this.values()},c.forEach=function(l,d){for(var h=this.values(),u=h.next();!u.done;)l.call(d,u.value,u.value,this),u=h.next()},s}();BB("MapSet",{F:function(s,c){return new o(s,c)},T:function(s,c){return new a(s,c)}})}var Rw,mu,H7=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",WB=typeof Map<"u",GB=typeof Set<"u",Dw=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",oP=H7?Symbol.for("immer-nothing"):((Rw={})["immer-nothing"]=!0,Rw),Vw=H7?Symbol.for("immer-draftable"):"__$immer_draftable",yt=H7?Symbol.for("immer-state"):"__$immer_state",ff=typeof Symbol<"u"&&Symbol.iterator||"@@iterator",KB=""+Object.prototype.constructor,T7=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,YB=Object.getOwnPropertyDescriptors||function(t){var e={};return T7(t).forEach(function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)}),e},N6={},F6={get:function(t,e){if(e===yt)return t;var r=jr(t);if(!L6(r,e))return function(i,o,a){var s,c=Hw(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||!Ao(n)?n:n===Bm(t.t,e)?(Um(t),t.o[e]=vu(t.A.h,n,t)):n},has:function(t,e){return e in jr(t)},ownKeys:function(t){return Reflect.ownKeys(jr(t))},set:function(t,e,r){var n=Hw(jr(t),e);if(n!=null&&n.set)return n.set.call(t.k,r),!0;if(!t.P){var i=Bm(jr(t),e),o=i==null?void 0:i[yt];if(o&&o.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(NB(r,i)&&(r!==void 0||L6(t.t,e)))return!0;Um(t),ka(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 Bm(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,Um(t),ka(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=jr(t),n=Reflect.getOwnPropertyDescriptor(r,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:r[e]}},defineProperty:function(){vi(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){vi(12)}},Q2={};nd(F6,function(t,e){Q2[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),Q2.deleteProperty=function(t,e){return Q2.set.call(this,t,e,void 0)},Q2.set=function(t,e,r){return F6.set.call(this,t[0],e,r,t[0])};var XB=function(){function t(r){var n=this;this.g=Dw,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(p){var _=this;p===void 0&&(p=s);for(var m=arguments.length,g=Array(m>1?m-1:0),b=1;b<m;b++)g[b-1]=arguments[b];return c.produce(p,function(w){var x;return(x=o).call.apply(x,[_,w].concat(g))})}}var l;if(typeof o!="function"&&vi(6),a!==void 0&&typeof a!="function"&&vi(7),Ao(i)){var d=Pw(n),h=vu(n,i,void 0),u=!0;try{l=o(h),u=!1}finally{u?Np(d):O6(d)}return typeof Promise<"u"&&l instanceof Promise?l.then(function(p){return Nm(d,a),Fm(p,d)},function(p){throw Np(d),p}):(Nm(d,a),Fm(l,d))}if(!i||typeof i!="object"){if((l=o(i))===void 0&&(l=i),l===oP&&(l=void 0),n.D&&P7(l,!0),a){var f=[],v=[];aa("Patches").M(i,l,f,v),a(f,v)}return l}vi(21,i)},this.produceWithPatches=function(i,o){if(typeof i=="function")return function(l){for(var d=arguments.length,h=Array(d>1?d-1:0),u=1;u<d;u++)h[u-1]=arguments[u];return n.produceWithPatches(l,function(f){return i.apply(void 0,[f].concat(h))})};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){Ao(r)||vi(8),Gs(r)&&(r=jB(r));var n=Pw(this),i=vu(this,r,void 0);return i[yt].C=!0,O6(n),i},e.finishDraft=function(r,n){var i=r&&r[yt],o=i.A;return Nm(o,n),Fm(void 0,o)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!Dw&&vi(20),this.g=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=aa("Patches").$;return Gs(r)?a(r,n):this.produce(r,function(s){return a(s,n)})},t}(),ki=new XB,aP=ki.produce;ki.produceWithPatches.bind(ki);ki.setAutoFreeze.bind(ki);ki.setUseProxies.bind(ki);ki.applyPatches.bind(ki);ki.createDraft.bind(ki);ki.finishDraft.bind(ki);function Lw(t){return Ao(t)?aP(t,()=>{}):t}function QB(t){return typeof t=="function"}function r0(t,e){const[r,n,i]=JB(e);let o;if(QB(t))o=()=>Lw(t());else{const s=Lw(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,h)=>{if(h)if(Gs(d)){const f=h(d,c);return f===void 0?d:f}else{if(Ao(d))return aP(d,u=>h(u,c));{const u=h(d,c);if(u===void 0){if(d===null)return d;throw Error("A case reducer on a non-draftable value must not return undefined")}return u}}return d},s)}return a.getInitialState=o,a}function JB(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 ZB(t,e){const r=typeof e=="function"?e:r0(e.initial,o=>e.builder(o,t)),n=new r5(r),i=nP(t,n);return{actions:t,dispatch:i,subject:n}}const eU=()=>({request:ln("client/request",(e,r)=>{var n,i,o,a;return r??(r={}),(n=r.transaction)!==null&&n!==void 0||(r.transaction=rP()),(i=r.created)!==null&&i!==void 0||(r.created=Date.now()),(o=r.controller)!==null&&o!==void 0||(r.controller=new AbortController),(a=r.task)!==null&&a!==void 0||(r.task=new l$),{payload:e,meta:r}}),retry:ln("client/retry",e=>({payload:e})),success:ln("client/success",(e,r)=>({payload:e,meta:r})),cancel:ln("client/cancel",e=>({payload:e})),failure:ln("client/failure",(e,r)=>({payload:e,meta:r})),error:ln("client/error",(e,r)=>({payload:e,meta:r}))}),Cr=eU(),sP=t=>e=>e.pipe(Jt(Cr.request.match),wo(r=>{const{meta:{controller:n,transaction:i}}=r;return new it(o=>{if(n.signal.aborted)return o.next(Cr.cancel({transaction:i,reason:`request [${i}] was aborted!`})),o.complete();o.add(e.pipe(Jt(Cr.cancel.match)).subscribe(a=>{a.payload.transaction===i&&(n.signal.aborted||n.abort(),o.complete())})),o.add(x6(n.signal,"abort").subscribe(()=>{o.next(Cr.cancel({transaction:i,reason:`request [${i}] was aborted!`})),o.complete()})),o.add(Or(t(r)).subscribe({next:a=>o.next(a),error:a=>o.next(Cr.error(a,{request:r})),complete:()=>o.complete()}))})})),tU=t=>(t=Object.assign({},{count:0,delay:0},t),(e,r)=>e.pipe(sP(n=>e.pipe(Jt(Cr.failure.match),Jt(i=>i.meta.request===n),R$(r),nr(([i,o])=>{var a,s;const{transaction:c}=n.meta,l=o[c];if(!l)return Br;const d=(s=(a=l.retry)===null||a===void 0?void 0:a.length)!==null&&s!==void 0?s:0,h=Object.assign({},t,n.meta.retry);if(d>=h.count)throw h.count?Error("maximum retries executed!",{cause:i.payload}):i.payload;return(typeof h.delay=="function"?Or(h.delay(i.payload.cause)).pipe(Ar(f=>{throw Error("failed to resolve delay",{cause:f})})):vN(h.delay)).pipe(zt(()=>Cr.retry(n)))}))))),rU=t=>e=>e.pipe(sP(r=>Or(t(r.payload,r.meta.controller.signal)).pipe(zt(n=>Cr.success(n,{request:r})),Ar(n=>So(Cr.failure(Error(`failed to execute request for transaction ${r.meta.transaction}`,{cause:n}),{request:r})))))),nU=t=>t.pipe(Jt(Cr.retry.match),zt(e=>e.payload)),cP=()=>Jt(t=>t.status==="complete"),iU=(t={})=>r0(t,e=>e.addCase(Cr.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(Cr.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(Cr.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(Cr.cancel,(r,n)=>{const{transaction:i,reason:o}=n.payload;if(r[i]){const a=Object.assign({},$w(r[i]));a.task.error(new V6("abort",{request:a,message:o??"request was canceled"})),delete r[i]}}).addCase(Cr.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(Cr.error,(r,n)=>{const{payload:i,meta:o}=n,{transaction:a}=o.request.meta;if(r[a]){const s=Object.assign({},$w(r[a]));s.task.error(new V6("error",{request:s,message:`failed to process task [${a}]`,cause:i.cause})),delete r[a]}}));var oU=globalThis&&globalThis.__awaiter||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(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})},vr=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Ow=globalThis&&globalThis.__classPrivateFieldSet||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},br,Ic;class Nw extends it{get closed(){return vr(this,br,"f").closed}get state$(){return vr(this,br,"f")}get action$(){return vr(this,br,"f").action$}get success$(){return this.action$.pipe(Jt(Cr.success.match),zt(({payload:e})=>e))}get error$(){return this.action$.pipe(Gd("client/error"),R$(vr(this,br,"f")),zt(([e,r])=>{const{payload:n,meta:i}=e,{transaction:o}=i.request.meta,a=r[e.meta.request.meta.transaction];return new V6("error",{request:a,message:`failed to process task [${o}]`,cause:n})}))}constructor(e,r){super(o=>vr(this,br,"f").subscribe(o)),br.set(this,void 0),Ic.set(this,void 0);const n={};Ow(this,br,new r5(iU(n)),"f"),Ow(this,Ic,new Un(()=>vr(this,br,"f").complete()),"f"),vr(this,Ic,"f").add(vr(this,br,"f").addFlow(rU(e))),vr(this,Ic,"f").add(vr(this,br,"f").addFlow(nU));const i=Object.assign({count:0,delay:0},r==null?void 0:r.retry);vr(this,Ic,"f").add(vr(this,br,"f").addFlow(tU(i)))}next(e,r){const n=Cr.request(e,r);return vr(this,br,"f").next(n),n.meta}nextAsync(e,r){return oU(this,void 0,void 0,function*(){return Fi(this.next(e,r).task.pipe(cP()))})}getTaskByTransaction(e){const r=vr(this,br,"f").value[e];return r&&r.task}getTaskByRef(e){const r=Object.values(vr(this,br,"f").value).find(n=>n.ref===e);return r&&r.task}cancel(e,r){if(e)e&&vr(this,br,"f").value[e]&&(r??(r=`[${e}]: transaction canceled`),vr(this,br,"f").next(Cr.cancel({transaction:e,reason:r})));else for(const n of Object.keys(vr(this,br,"f").value))this.cancel(n,"all transactions canceled")}on(e,r){return vr(this,br,"f").addEffect(Cr[e].type,n=>{r(n,this)})}complete(){vr(this,Ic,"f").unsubscribe()}asObservable(){return vr(this,br,"f").asObservable()}}br=new WeakMap,Ic=new WeakMap;function aU(){return{set:ln("cache/set",(t,e)=>({payload:{key:t,entry:e}})),remove:ln("cache/remove",t=>({payload:t})),invalidate:ln("cache/invalidate",t=>({payload:t})),trim:ln("cache/trim",t=>({payload:t}))}}const H1=aU(),sU=(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 cU(t,e={}){return r0(e,r=>r.addCase(t.set,(n,i)=>{var o;const{key:a,entry:s}=i.payload,c=n[a];c?(c.updated=Date.now(),(o=c.updates)!==null&&o!==void 0||(c.updates=0),c.updates++):n[a]=Object.assign(Object.assign({},s),{created:Date.now()})}).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:sU,l=Object.keys(n),d=Object.entries(n).filter(([h,u])=>!s.validate||s.validate(u)).sort((h,u)=>c(h[1],u[1])).slice(0,(a=s.size)!==null&&a!==void 0?a:Number.MAX_SAFE_INTEGER).map(([h])=>h);if(l.length!==d.length)for(const h of l){const u=d.indexOf(h);u!==-1?d.splice(u,1):delete n[h]}}))}var Vo=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},lU=globalThis&&globalThis.__classPrivateFieldSet||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},ui;class Fw{get state$(){return Vo(this,ui,"f").asObservable()}constructor(e){ui.set(this,void 0);const{trimming:r,initial:n}=e;lU(this,ui,new r5(cU(H1,n)),"f"),r&&Vo(this,ui,"f").addEffect("cache/set",()=>Vo(this,ui,"f").next(H1.trim(r)))}setItem(...e){Vo(this,ui,"f").next(H1.set(...e))}getItem(e){return Vo(this,ui,"f").value[e]}removeItem(e){Vo(this,ui,"f").next(H1.remove(e))}invalidate(e){Vo(this,ui,"f").next(H1.invalidate(e))}trim(e){Vo(this,ui,"f").next(H1.trim(e))}reset(){Vo(this,ui,"f").reset()}complete(){Vo(this,ui,"f").complete()}}ui=new WeakMap;var Ft=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},T1=globalThis&&globalThis.__classPrivateFieldSet||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},dU=globalThis&&globalThis.__rest||function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var 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},Hc,oo,hs,X1,Q1,_4,B6;const hU=(t=0)=>e=>{var r;return((r=e.updated)!==null&&r!==void 0?r:0)+t>Date.now()},uU=t=>{if(typeof t=="function")return t;switch(t){case"concat":return yB;case"merge":return _B;case"switch":default:return bB}};class Sn{get client(){return Ft(this,oo,"f")}get cache(){return Ft(this,hs,"f")}constructor(e){var r;Hc.set(this,new Un),oo.set(this,void 0),hs.set(this,void 0),X1.set(this,new Ki),Q1.set(this,void 0),_4.set(this,void 0),B6.set(this,rP()),T1(this,Q1,i=>HB(e.key(i),Ft(this,B6,"f")),"f"),T1(this,_4,(r=e==null?void 0:e.validate)!==null&&r!==void 0?r:hU(e==null?void 0:e.expire),"f"),e.client instanceof Nw?T1(this,oo,e.client,"f"):(T1(this,oo,new Nw(e.client.fn,e.client.options),"f"),Ft(this,Hc,"f").add(()=>Ft(this,oo,"f").complete())),e.cache instanceof Fw?T1(this,hs,e.cache,"f"):(T1(this,hs,new Fw(e.cache||{}),"f"),Ft(this,Hc,"f").add(()=>Ft(this,hs,"f").complete()));const n=uU(e.queueOperator);Ft(this,Hc,"f").add(()=>Ft(this,X1,"f").complete()),Ft(this,Hc,"f").add(Ft(this,X1,"f").pipe(n(({args:i,options:o})=>new it(a=>{const{task:s,transaction:c}=Ft(this,oo,"f").next(i,o);a.add(s.pipe(Ar(()=>Br)).subscribe(a)),a.add(()=>{setTimeout(()=>Ft(this,oo,"f").cancel(c))})})),cP(),T$(()=>!Ft(this,oo,"f").closed)).subscribe(i=>{const{args:o,value:a,transaction:s,ref:c}=i,l=c??Ft(this,Q1,"f").call(this,o);Ft(this,hs,"f").setItem(l,{value:a,args:o,transaction:s})}))}next(e,r){Ft(this,X1,"f").next({args:e,options:r})}query(e,r){var n;const i=Ft(this,Q1,"f").call(this,e);return(n=Ft(this,oo,"f").getTaskByRef(i))!==null&&n!==void 0?n:this._createTask(i,e,r)}queryAsync(e,r){const n=r||{},{awaitResolve:i}=n,o=dU(n,["awaitResolve"]);return(i?Kr:Fi)(this._query(e,o))}complete(){Ft(this,Hc,"f").unsubscribe()}_query(e,r){var n;const i=Ft(this,Q1,"f").call(this,e);return(n=Ft(this,oo,"f").getTaskByRef(i))!==null&&n!==void 0?n:this._createTask(i,e,r)}_createTask(e,r,n){var i;const o=new l$,a=Ft(this,hs,"f").getItem(e);if(a){const{value:l,args:d,created:h,updated:u,updates:f,transaction:v}=a,p={status:"cache",value:l,args:d,created:h,updated:u,updates:f,transaction:v};o.next(p)}const s=((i=n==null?void 0:n.cache)===null||i===void 0?void 0:i.validate)||Ft(this,_4,"f");return a&&s(a,r)?o.complete():Ft(this,X1,"f").next({args:r,options:{ref:e,task:o}}),o.asObservable()}}Hc=new WeakMap,oo=new WeakMap,hs=new WeakMap,X1=new WeakMap,Q1=new WeakMap,_4=new WeakMap,B6=new WeakMap;Sn.extractQueryValue=wB;var os=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Bw=globalThis&&globalThis.__classPrivateFieldSet||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},J2,ya;class fU extends it{get currentContext(){return os(this,ya,"f").value}get currentContext$(){return os(this,ya,"f").asObservable()}get client(){return os(this,J2,"f")}constructor(e){super(r=>os(this,ya,"f").subscribe(r)),J2.set(this,void 0),ya.set(this,void 0),Bw(this,J2,new Sn(e),"f"),Bw(this,ya,new qd(void 0),"f")}setCurrentContext(e){typeof e=="string"?this.resolveContext(e).pipe(Ar(()=>Br)).subscribe(r=>this.setCurrentContext(r)):gB(e,os(this,ya,"f").value)||os(this,ya,"f").next(e)}resolveContext(e){return os(this,J2,"f").query({id:e}).pipe(zt(r=>r.value),Ar(r=>{throw r.cause?r.cause:r}))}resolveContextAsync(e,r){return(r!=null&&r.awaitResolve?Kr:Fi)(this.resolveContext(e))}dispose(){os(this,ya,"f").complete()}}J2=new WeakMap,ya=new WeakMap;var w2=globalThis&&globalThis.__awaiter||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(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})},vt=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},mc=globalThis&&globalThis.__classPrivateFieldSet||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},_a,b4,Z2,ao,Tc,Rc,eh,w4,x4;let pU=class{get contextClient(){return vt(this,_a,"f")}get queryClient(){return vt(this,b4,"f")}get currentContext$(){return vt(this,_a,"f").currentContext$}get currentContext(){return vt(this,_a,"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;_a.set(this,void 0),b4.set(this,void 0),Z2.set(this,void 0),ao.set(this,void 0),Tc.set(this,new Un),Rc.set(this,void 0),eh.set(this,void 0),w4.set(this,void 0),x4.set(this,new Ki);const{config:o,event:a}=e;e.parentContext&&console.warn("@deprecated","parentContext as arg is deprecated, use ContextProvider.connectParentContext"),mc(this,ao,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)),mc(this,Rc,o.contextType,"f"),mc(this,eh,o.contextFilter,"f"),mc(this,_a,new fU(o.client.get),"f"),mc(this,b4,new Sn(o.client.query),"f"),o.client.related&&mc(this,Z2,new Sn(o.client.related),"f"),mc(this,w4,(i=o.contextParameterFn)!==null&&i!==void 0?i:s=>({search:s.search,filter:{type:s.type}}),"f"),vt(this,ao,"f")&&(vt(this,Tc,"f").add(this.currentContext$.pipe(z6()).subscribe(([s,c])=>{var l;(l=vt(this,ao,"f"))===null||l===void 0||l.dispatchEvent("onCurrentContextChanged",{source:this,canBubble:!0,detail:{previous:s,next:c}})})),vt(this,Tc,"f").add(vt(this,ao,"f").addEventListener("onCurrentContextChanged",s=>{s.source!==this&&s.detail.next!==void 0&&this.setCurrentContext(s.detail.next)}))),vt(this,Tc,"f").add(vt(this,x4,"f").pipe(nr(s=>s),ed(s=>console.debug("ContextProvider::#contextQueue",s))).subscribe(s=>vt(this,_a,"f").setCurrentContext(s??null)))}connectParentContext(e,r){const i=e.currentContext$.pipe(Jt(o=>o!==void 0),Jt((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)}),nr(o=>w2(this,void 0,void 0,function*(){var a;if(o){const s=yield(a=vt(this,ao,"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}}return{next:o}})),Jt(o=>!o.canceled),nr(({next:o})=>this.setCurrentContext(o,{validate:!0,resolve:!0}).pipe(Ar(a=>(console.warn("ContextProvider::onParentContextChanged","setCurrentContext",a),Br)))),Ar(o=>(console.warn("ContextProvider::onParentContextChanged","unhandled exception",o),Br))).subscribe();return vt(this,Tc,"f").add(i),i}setCurrentContextById(e){return new it(r=>{try{vt(this,_a,"f").resolveContext(e).pipe(Jt(n=>!!n),nr(n=>this.setCurrentContext(n))).subscribe(r)}catch(n){r.error(n)}})}setCurrentContextByIdAsync(e){return Kr(this.setCurrentContextById(e))}setCurrentContext(e,r){const n=new Ki,i=new Ki,o=this._setCurrentContext(e,r).pipe(ed(a=>i.next(a)),H$(n),nw(()=>i.complete()),Ar(a=>(i.error(a),Br)));return vt(this,x4,"f").next(o),i.pipe(nw(()=>n.next(!0)))}_setCurrentContext(e,r){return new it(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=vt(this,ao,"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 So(e).pipe(nr(o=>w2(this,void 0,void 0,function*(){var a;const s=yield(a=vt(this,ao,"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})),nr(o=>this.resolveContext(o).pipe(zt(a=>({context:o,resolved:a})))),nr(({context:o,resolved:a})=>w2(this,void 0,void 0,function*(){var s;const c=yield(s=vt(this,ao,"f"))===null||s===void 0?void 0:s.dispatchEvent("onSetContextResolved",{source:this,cancelable:!0,detail:{context:o,resolved:a}});if(c!=null&&c.canceled)throw Error("resolving of context was canceled");return a})),nr(o=>this._setCurrentContext(o))).subscribe(n)}return So(e).pipe(nr(o=>w2(this,void 0,void 0,function*(){var a;const s=yield(a=vt(this,ao,"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 w2(this,void 0,void 0,function*(){return Kr(this.setCurrentContext(e,r))})}queryContext(e){const r=this.queryClient.query(vt(this,w4,"f").call(this,{search:e,type:vt(this,Rc,"f")})).pipe(zt(n=>n.value));return vt(this,eh,"f")?r.pipe(zt(vt(this,eh,"f"))):r}queryContextAsync(e){return Kr(this.queryContext(e))}validateContext(e){return vt(this,Rc,"f")?vt(this,Rc,"f").map(r=>r.toLowerCase()).includes(e.type.id.toLowerCase()):!0}resolveContext(e){return this.relatedContexts({item:e,filter:{type:vt(this,Rc,"f")}}).pipe(zt(r=>r.filter(n=>this.validateContext(n))),zt(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 Kr(this.resolveContext(e))}relatedContexts(e){return vt(this,Z2,"f")?vt(this,Z2,"f").query(e).pipe(zt(({value:r})=>r),Ar(r=>{throw r.cause?r.cause:r})):z$(()=>Error("ContextProvider::relatedContexts - no client defined for resolving related context"))}relatedContextsAsync(e){return Kr(this.relatedContexts(e))}clearCurrentContext(){this.setCurrentContext(null)}dispose(){vt(this,Tc,"f").unsubscribe(),vt(this,_a,"f").dispose()}};_a=new WeakMap,b4=new WeakMap,Z2=new WeakMap,ao=new WeakMap,Tc=new WeakMap,Rc=new WeakMap,eh=new WeakMap,w4=new WeakMap,x4=new WeakMap;var vU=globalThis&&globalThis.__awaiter||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(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const mU="context",gU={name:mU,configure:()=>new mB,initialize:function(t){var e;return vU(this,void 0,void 0,function*(){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 pU({config:r,event:n,parentContext:i}),a=new Un(()=>o.dispose());return this.postInitialize=s=>new it(c=>{const l=r.resolveInitialContext?Or(r.resolveInitialContext(s)).pipe(Jt(d=>!!d),nr(d=>s.modules.context.setCurrentContext(d,{validate:!0,resolve:!0}))):Br;c.add(l.pipe(Ar(d=>(console.warn("ContextModule.postInitialize","failed to resolve initial context",d),Br))).subscribe({next:d=>{console.debug("ContextModule.postInitialize",`initial context was resolved to [${d?d.id:"none"}]`,d)},complete:()=>{o.connectParentContext(i),c.complete()}}))}),this.dispose=()=>a.unsubscribe(),o})}};var Uw=globalThis&&globalThis.__awaiter||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(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};class yU{constructor(e){this.clientKey=e.clientKey,this.endpoint=e.endpoint,this.clientCtor=e.clientCtor}createHttpClientClient(e){return Uw(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 Uw(this,void 0,void 0,function*(){if(!this.endpoint)throw Error("no endpoint defined!");return new this.clientCtor({http:e,endpoint:this.endpoint})})}}var jm=globalThis&&globalThis.__awaiter||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(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};class _U{constructor(e,r){this._client=e,this._http=r}get environment(){return this._client.environment}resolveServices(){return this._client.fetchEnvironment()}resolveService(e){return jm(this,void 0,void 0,function*(){return this._client.resolveService(e)})}createClient(e,r){return jm(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 jm(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(L$(i,{baseUri:o,defaultScopes:a}))})}}var qm=globalThis&&globalThis.__awaiter||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(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})},jw=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},bU=globalThis&&globalThis.__classPrivateFieldSet||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},th;const qw="services";class wU{get environment(){var e;const r=(e=jw(this,th,"f").cache.getItem(qw))===null||e===void 0?void 0:e.value;if(!r)throw Error("no cached environment found");return r}constructor({http:e,endpoint:r}){th.set(this,void 0),this.http=e,this.endpoint=r,bU(this,th,new Sn({client:{fn:()=>e.fetch$(r,{selector:this.selector.bind(this)})},key:()=>qw,expire:5*60*1e3}),"f")}fetchEnvironment(){return qm(this,void 0,void 0,function*(){return Fi(Sn.extractQueryValue(jw(this,th,"f").query(void 0,{cache:{suppressInvalid:!0}})))})}selector(e){return qm(this,void 0,void 0,function*(){const r=yield e.json(),n=r.services.reduce((i,o)=>Object.assign(i,{[o.key]:{clientId:r.clientId,uri:o.uri,defaultScopes:[r.clientId+"/.default"]}}),{});return Object.assign(Object.assign({},r),{services:n})})}resolveService(e){return qm(this,void 0,void 0,function*(){try{const{services:r}=yield this.fetchEnvironment();return r[e]}catch(r){throw console.error(r),r}})}}th=new WeakMap;const xU="serviceDiscovery";var zU=globalThis&&globalThis.__awaiter||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(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const CU={name:xU,configure:()=>new yU({clientCtor:wU,clientKey:"service_discovery",endpoint:"/_discovery/environments/current"}),initialize:({config:t,requireInstance:e})=>zU(void 0,void 0,void 0,function*(){const r=yield e("http"),n=yield t.createHttpClientClient(r),i=yield t.createClient(n);return new _U(i,r)})};class kU{}class ha extends Error{constructor(e,r){super(`unsupported version ${e}`,{cause:r}),this.version=e}}const EU=(t,e)=>{var r;const n=(r=Xi[t])!==null&&r!==void 0?r:t;switch(n){case Xi.v2:throw new ha(t);case Xi.v1:default:{const{id:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/contexts/${i}/?${String(o)}`}}},SU=(t,e,r)=>[EU(t,e),r],AU=(t,e,r="json")=>(n,i)=>t[r](...SU(e,n,i));var MU=["eq","ne","gt","ge","lt","le"],pf=["and","or","not"],$U=["any","all"],PU=["startswith","endswith","contains"],IU=["expand","levels","select","skip","top","count","orderby","filter"],Ww=/\((.*)\)/,Gw=/(?!indexof)\((\w+)\)/,Kw;(function(t){t.sum="sum",t.min="min",t.max="max",t.average="average",t.countdistinct="countdistinct"})(Kw||(Kw={}));var va="";function lP(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,h=e.key,u=e.count,f=e.expand,v=e.action,p=e.func,_="",m=[],g={};if(h!=null&&(_+="(".concat(Qo(h,m),")")),(c||typeof u=="object")&&(g.$filter=gu(typeof u=="object"?u:c,m)),l&&(g.$apply=dP(l)),f&&(g.$expand=z4(f)),d&&(g.$orderby=R7(d)),u&&(typeof u=="boolean"?g.$count=!0:_+="/$count"),typeof a=="number"&&(g.$top=a),typeof s=="number"&&(g.$skip=s),v&&(_+="/".concat(v)),p){if(typeof p=="string")_+="/".concat(p);else if(typeof p=="object"){var b=Object.keys(p)[0],w=Qo(p[b],m);_+="/".concat(b),w!==""&&(_+="(".concat(w,")"))}}return m.length>0&&Object.assign(g,m.reduce(function(x,C){var S;return Object.assign(x,(S={},S["@".concat(C.name)]=Qo(C.value),S))},{})),VU(_,fr({$select:r,$search:n,$skiptoken:i,$format:o},g))}function Wm(t,e,r){return r===void 0&&(r=[]),"".concat(t," eq ").concat(Qo(e,r))}function gu(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,h){var u=o[h];if(u===void 0)return d;var f="";if(s?h===va?f=s:Gw.test(h)?f=h.replace(Gw,function(g,b){return b.trim()===va?"(".concat(s,")"):"(".concat(s,"/").concat(b.trim(),")")}):Ww.test(h)?f=h.replace(Ww,function(g,b){return b.trim()===va?"(".concat(s,")"):"(".concat(s,"/").concat(b.trim(),")")}):f="".concat(s,"/").concat(h):f=h,h===va&&Array.isArray(u))return d.concat(u.map(function(g){return Wm(f,g)}));if(["number","string","boolean"].indexOf(typeof u)!==-1||u instanceof Date||u===null)d.push(Wm(f,u,a));else if(Array.isArray(u)){var v=h,p=u.map(function(g){return gu(g,a,s)}).filter(function(g){return g}).map(function(g){return pf.indexOf(v)!==-1?"(".concat(g,")"):g});p.length&&(pf.indexOf(v)!==-1?p.length&&(v==="not"?d.push(Yw(p)):d.push("(".concat(p.join(" ".concat(v," ")),")"))):d.push(p.join(" ".concat(v," "))))}else if(pf.indexOf(f)!==-1){var _=f,p=Object.keys(u).map(function(b){var w;return n((w={},w[b]=u[b],w))});p.length&&(_==="not"?d.push(Yw(p)):d.push("(".concat(p.join(" ".concat(_," ")),")")))}else if(typeof u=="object")if("type"in u)d.push(Wm(f,u,a));else{var m=Object.keys(u);m.forEach(function(g){if(u[g]!==void 0)if(MU.indexOf(g)!==-1)d.push("".concat(f," ").concat(g," ").concat(Qo(u[g],a)));else if(pf.indexOf(g)!==-1)Array.isArray(u[g])?d.push(u[g].map(function(C){return"("+n(C,a,f)+")"}).join(" ".concat(g," "))):d.push("("+n(u[g],a,f)+")");else if($U.indexOf(g)!==-1){var b=i(h.toLowerCase(),u[g],g,f);b&&d.push(b)}else if(g==="has")d.push("".concat(f," ").concat(g," ").concat(Qo(u[g],a)));else if(g==="in"){var w=Array.isArray(u[g])?u[g]:u[g].value.map(function(C){return{type:u[g].type,value:C}});d.push(f+" in ("+w.map(function(C){return Qo(C,a)}).join(",")+")")}else if(PU.indexOf(g)!==-1)d.push("".concat(g,"(").concat(f,",").concat(Qo(u[g],a),")"));else{var x=n(u,a,f);x&&d.push(x)}})}else throw new Error("Unexpected value type: ".concat(u));return d},[]);c=l.join(" and ")}return c}function i(o,a,s,c){var l="";if(typeof a=="string"||a instanceof String)l=HU(o,a,s,c);else if(a){var d=Array.isArray(a)?a.reduce(function(u,f){return f.hasOwnProperty(va)?(u.hasOwnProperty(va)||(u[va]=[]),u[va].push(f[va]),u):fr(fr({},u),f)},{}):a,h=n(d,e,o);l="".concat(c,"/").concat(s,"(").concat(h?"".concat(o,":").concat(h):"",")")}return l}}function HU(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 TU(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 Qo(t,e){if(typeof t=="string")return"'".concat(TU(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 Qo(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(Qo(i,e))}).join(",")}return t}function z4(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 z4(r)}).join(","));if(typeof t=="object"){var e=Object.keys(t);return e.some(function(r){return IU.indexOf(r.toLowerCase())!==-1})?e.map(function(r){var n;switch(r){case"filter":n=gu(t[r]);break;case"orderBy":n=R7(t[r]);break;case"levels":case"count":case"skip":case"top":n="".concat(t[r]);break;default:n=z4(t[r])}return"$".concat(r.toLowerCase(),"=").concat(n)}).join(";"):e.map(function(r){var n=z4(t[r]);return n?"".concat(r,"(").concat(n,")"):r}).join(",")}return""}function dP(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=n$(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(RU(o),")")),a){var d=gu(a);d&&n.push("filter(".concat(gu(d),")"))}return s&&n.push("groupby(".concat(DU(s),")")),n},[]);return r.join("/")||void 0}function RU(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)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 DU(t){if(!t.properties)throw new Error("'properties' property required for groupBy");var e="(".concat(t.properties.join(","),")");return t.transform&&(e+=",".concat(dP(t.transform))),e}function R7(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 R7(i,"".concat(n,"/"))}).map(function(r){return"".concat(e).concat(r)}).join(","):"".concat(e).concat(String(t))}function VU(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 Yw(t){return"not(".concat(t.join(" and "),")")}const LU=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]})}},{}),OU=t=>Object.entries(t).filter(([e,r])=>!!r).reduce((e,[r,n])=>{switch(r){case"filter":return Object.assign(Object.assign({},e),{[r]:LU(n)});default:return Object.assign(Object.assign({},e),{[r]:t[r]})}},{}),NU=t=>typeof t=="string"?t:lP(OU(t)),FU=(t,e)=>{var r;const n=(r=Xi[t])!==null&&r!==void 0?r:t;switch(n){case Xi.v2:throw new ha(t);case Xi.v1:default:{const{query:i,includeDeleted:o}=e,a=new URLSearchParams(NU(i));return a.append("api-version",n),o&&a.append("includeDeleted","true"),`/contexts/?${String(a)}`}}},BU=(t,e,r)=>[FU(t,e),r],UU=(t,e,r="json")=>(n,i)=>t[r](...BU(e,n,i)),jU=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]})}},{}),qU=t=>Object.entries(t).filter(([e,r])=>!!r).reduce((e,[r,n])=>{switch(r){case"filter":return Object.assign(Object.assign({},e),{[r]:jU(n)});default:return Object.assign(Object.assign({},e),{[r]:t[r]})}},{}),WU=t=>typeof t=="string"?t:lP(qU(t)),GU=(t,e)=>{var r;const n=(r=Xi[t])!==null&&r!==void 0?r:t;switch(n){case Xi.v2:throw new ha(t);case Xi.v1:default:{const{id:i,query:o}=e,a=new URLSearchParams(WU(o||""));return a.append("api-version",n),`/contexts/${i}/relations?${String(a)}`}}},KU=(t,e,r)=>[GU(t,e),r],YU=(t,e,r="json")=>(n,i)=>t[r](...KU(e,n,i));class XU{get Version(){return Xi}constructor(e,r){this._client=e,this._method=r}get(e,...r){return AU(this._client,e,this._method)(...r)}query(e,...r){return UU(this._client,e,this._method)(...r)}related(e,...r){return YU(this._client,e,this._method)(...r)}}var Xi;(function(t){t.v1="1.0",t.v2="2.0"})(Xi||(Xi={}));const QU=(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)}`}}},JU=(t,e,r)=>{const n=QU(t,e),i=Object.assign({},{method:"Delete"},r);return[n,i]},ZU=(t,e,r="fetch")=>(n,i)=>t[r](...JU(e,n,i)),ej=ZU,tj=(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)}`}}},rj=(t,e,r)=>[tj(t,e),r],nj=(t,e,r="json")=>(n,i)=>t[r](...rj(e,n,i)),ij=nj,oj=(t,e)=>{switch(t){case"v1":default:{const r=new URLSearchParams;return r.append("api-version",t),`/bookmarks?${String(r)}`}}},aj=(t,e,r)=>{const n=oj(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]},sj=(t,e,r="json")=>(n,i)=>t[r](...aj(e,n,i)),cj=sj,lj=(t,e)=>{switch(t){case"v1":default:{const r=new URLSearchParams;return r.append("api-version",t),`/bookmarks/${e.id}?${String(r)}`}}},dj=(t,e,r)=>{const n=lj(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]},hj=(t,e,r="json")=>(n,i)=>t[r](...dj(e,n,i)),uj=hj,fj=t=>{switch(t){case"v1":default:{const e=new URLSearchParams;return e.append("api-version",t),`persons/me/bookmarks/?${String(e)}`}}},pj=(t,e)=>[fj(t),e],vj=(t,e,r="json")=>n=>t[r](...pj(e,n)),mj=vj,gj=(t,e)=>{switch(t){case"v1":default:{const r=new URLSearchParams;return r.append("api-version",t),`/persons/me/bookmarks/favourites?${String(r)}`}}},yj=(t,e,r)=>{const n=gj(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]},_j=(t,e,r="json")=>(n,i)=>t[r](...yj(e,n,i)),bj=_j,wj=(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)}`}}},xj=(t,e,r)=>{const n=wj(t,e),i=Object.assign({},{method:"Delete"},r);return[n,i]},zj=(t,e,r="fetch")=>(n,i)=>t[r](...xj(e,n,i)),Cj=zj,kj=(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)}`}}},Ej=(t,e,r)=>{const n=kj(t,e),i=new Headers;i.append("content-type","application/json");const o=Object.assign({},{method:"head",headers:i},r);return[n,o]},Sj=(t,e,r="json")=>(n,i)=>t[r](...Ej(e,n,i)),Aj=Sj;class Mj{constructor(e,r){this._client=e,this._method=r}get(e,...r){return ij(this._client,e,this._method)(...r)}getAll(e){return mj(this._client,e,this._method)()}post(e,...r){return cj(this._client,e,this._method)(...r)}patch(e,...r){return uj(this._client,e,this._method)(...r)}delete(e,...r){return ej(this._client,e,this._method)(...r)}addFavorite(e,...r){return bj(this._client,e,this._method)(...r)}removeFavorite(e,...r){return Cj(this._client,e,this._method)(...r)}verifyFavorite(e,...r){return Aj(this._client,e,this._method)(...r)}}const $j=Mj,Pj=(t,e)=>{var r;const n=(r=Zt[t])!==null&&r!==void 0?r:t;switch(n){case Zt.v2:throw new ha(t);case Zt.v1:default:{const{id:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/notification/${i}/?${String(o)}`}}},Ij=(t,e,r)=>[Pj(t,e),r],Hj=(t,e,r="json")=>(n,i)=>t[r](...Ij(e,n,i)),Tj=(t,e)=>{var r;const n=(r=Zt[t])!==null&&r!==void 0?r:t;switch(n){case Zt.v2:throw new ha(t);case Zt.v1:default:{const{userId:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/person/${i}/notifications/?${String(o)}`}}},Rj=(t,e,r)=>{const n=Tj(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]},Dj=(t,e,r="json")=>(n,i)=>t[r](...Rj(e,n,i)),Vj=(t,e)=>{var r;const n=(r=Zt[t])!==null&&r!==void 0?r:t;switch(n){case Zt.v2:throw new ha(t);case Zt.v1:default:{const{id:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/notification/${i}/?${String(o)}`}}},Lj=(t,e,r)=>{const n=Vj(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]},Oj=(t,e,r="json")=>(n,i)=>t[r](...Lj(e,n,i)),Nj=(t,e)=>{var r;const n=(r=Zt[t])!==null&&r!==void 0?r:t;switch(n){case Zt.v2:throw new ha(t);case Zt.v1:default:{const{userId:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/person/${i}/notifications/?${String(o)}`}}},Fj=(t,e,r)=>[Nj(t,e),r],Bj=(t,e,r="json")=>(n,i)=>t[r](...Fj(e,n,i)),Uj=(t,e)=>{var r;const n=(r=Zt[t])!==null&&r!==void 0?r:t;switch(n){case Zt.v2:throw new ha(t);case Zt.v1:default:{const{id:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/notification/${i}/?${String(o)}`}}},jj=(t,e,r)=>{const n=Uj(t,e),i=new Headers;i.append("content-type","application/json");const o=Object.assign({},{method:"delete",headers:i},r);return[n,o]},qj=(t,e,r="json")=>(n,i)=>t[r](...jj(e,n,i));var Zt;(function(t){t.v1="1.0",t.v2="2.0"})(Zt||(Zt={}));const Wj=(t,e)=>{var r;const n=(r=Zt[t])!==null&&r!==void 0?r:t;switch(n){case Zt.v2:throw new ha(t);case Zt.v1:default:{const{userId:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/person/${i}/notifications/settings/?${String(o)}`}}},Gj=(t,e,r)=>{const n=Wj(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]},Kj=(t,e,r="json")=>(n,i)=>t[r](...Gj(e,n,i)),Yj=Kj,Xj=(t,e)=>{var r;const n=(r=Zt[t])!==null&&r!==void 0?r:t;switch(n){case Zt.v2:throw new ha(t);case Zt.v1:default:{const{userId:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/person/${i}/notifications/settings/?${String(o)}`}}},Qj=(t,e,r)=>[Xj(t,e),r],Jj=(t,e,r="json")=>(n,i)=>t[r](...Qj(e,n,i)),Zj=Jj;class eq{get Version(){return Zt}constructor(e,r){this._client=e,this._method=r}getAll(e,...r){return Bj(this._client,e,this._method)(...r)}getById(e,...r){return Hj(this._client,e,this._method)(...r)}setSeenByUser(e,...r){return Oj(this._client,e,this._method)(...r)}create(e,...r){return Dj(this._client,e,this._method)(...r)}delete(e,...r){return qj(this._client,e,this._method)(...r)}getSettings(e,...r){return Zj(this._client,e,this._method)(...r)}updateSettings(e,...r){return Yj(this._client,e,this._method)(...r)}}var C4=globalThis&&globalThis.__awaiter||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(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};class tq extends Error{constructor(e,r,n){super(e,n),this.response=r,this.name="ApiProviderError"}}const Gm=t=>C4(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 tq("failed to execute request, response was not ok",{headers:r,status:n,statusText:i,type:o,url:a,data:l})}});class rq{constructor({createClient:e}){this._createClientFn=e}createNotificationClient(e){return C4(this,void 0,void 0,function*(){const r=yield this._createClientFn("notification");return r.responseHandler.add("validate_api_request",Gm),new eq(r,e)})}createBookmarksClient(e){return C4(this,void 0,void 0,function*(){const r=yield this._createClientFn("bookmarks");return r.responseHandler.add("validate_api_request",Gm),new $j(r,e)})}createContextClient(e){return C4(this,void 0,void 0,function*(){const r=yield this._createClientFn("context");return r.responseHandler.add("validate_api_request",Gm),new XU(r,e)})}}var hP=globalThis&&globalThis.__awaiter||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(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const nq="services",iq=(t,e)=>r=>hP(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}`)}),oq={name:nq,configure:()=>new kU,initialize:({ref:t,config:e,requireInstance:r,hasModule:n})=>hP(void 0,void 0,void 0,function*(){if(!e.createClient){const i=yield r("http"),o=n("serviceDiscovery")?yield r("serviceDiscovery"):t==null?void 0:t.serviceDiscovery;e.createClient=iq(i,o)}if(!e.createClient)throw Error("missing configuration for creating API client");return new rq(e)})},aq=oq;class sq extends EN{constructor(){super([IN,Z$,b7,CU,aq,gU]),this.logger=new r$("FrameworkConfigurator")}configureHttp(...e){this.addConfig(UN(...e))}configureHttpClient(...e){this.addConfig(L$(...e))}configureMsal(...e){this.addConfig(rB(...e))}configureServiceDiscovery(e){this.configureHttpClient("service_discovery",e.client)}}var cq=globalThis&&globalThis.__awaiter||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(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const lq=(t,e)=>cq(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}),uP=y.createContext(null),dq=uP.Provider;var hq=globalThis&&globalThis.__awaiter||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(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const uq=t=>y.lazy(()=>hq(void 0,void 0,void 0,function*(){const e=new sq;yield t(e);const r=yield lq(e);return{default:({children:n})=>z(dq,Object.assign({value:r},{children:n}))}})),jn=()=>{let t=y.useContext(uP);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},fq=t=>{const e=y.useMemo(()=>uq(t.configure),[t.configure]);return z(y.Suspense,Object.assign({fallback:t.fallback},{children:z(e,{children:t.children})}))};function At(){return At=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},At.apply(this,arguments)}function id(t){return id=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},id(t)}function Km(t){return t&&id(t)==="object"&&t.constructor===Object}function fP(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{clone:!0},n=r.clone?At({},t):t;return Km(t)&&Km(e)&&Object.keys(e).forEach(function(i){i!=="__proto__"&&(Km(e[i])&&i in t?n[i]=fP(t[i],e[i],r):n[i]=e[i])}),n}var le={},pq={get exports(){return le},set exports(t){le=t}},vq="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",mq=vq,gq=mq;function pP(){}function vP(){}vP.resetWarningCache=pP;var yq=function(){function t(n,i,o,a,s,c){if(c!==gq){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}t.isRequired=t;function e(){return t}var r={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:vP,resetWarningCache:pP};return r.PropTypes=r,r};pq.exports=yq();function _q(t,e){if(id(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(id(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function bq(t){var e=_q(t,"string");return id(e)==="symbol"?e:String(e)}var wq=typeof Symbol=="function"&&Symbol.for;const mP=wq?Symbol.for("mui.nested"):"__THEME_NESTED__";var xq=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];function zq(){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,h){var u=h.options.name;if(u&&u.indexOf("Mui")===0&&!h.options.link&&!r){if(xq.indexOf(d.key)!==-1)return"Mui-".concat(d.key);var f="".concat(s).concat(u,"-").concat(d.key);return!h.options.theme[mP]||a!==""?f:"".concat(f,"-").concat(l())}return"".concat(s).concat(i).concat(l())}}var Xw=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},n0=(typeof window>"u"?"undefined":Xw(window))==="object"&&(typeof document>"u"?"undefined":Xw(document))==="object"&&document.nodeType===9;function Qw(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,bq(n.key),n)}}function gP(t,e,r){return e&&Qw(t.prototype,e),r&&Qw(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function U6(t,e){return U6=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},U6(t,e)}function yP(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,U6(t,e)}function Jw(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _P(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 Cq={}.constructor;function j6(t){if(t==null||typeof t!="object")return t;if(Array.isArray(t))return t.map(j6);if(t.constructor!==Cq)return t;var e={};for(var r in t)e[r]=j6(t[r]);return e}function D7(t,e,r){t===void 0&&(t="unnamed");var n=r.jss,i=j6(e),o=n.plugins.onCreateRule(t,i,r);return o||(t[0],null)}var Zw=function(e,r){for(var n="",i=0;i<e.length&&e[i]!=="!important";i++)n&&(n+=r),n+=e[i];return n},n1=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+=Zw(e[n]," ");else r=Zw(e,", ");return e[e.length-1]==="!important"&&(r+=" !important"),r};function Yd(t){return t&&t.format===!1?{linebreak:"",space:""}:{linebreak:`
75
75
  `,space:" "}}function x2(t,e){for(var r="",n=0;n<e;n++)r+=" ";return r+t}function yu(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=Yd(r),l=c.linebreak,d=c.space;if(t&&a++,s)if(Array.isArray(s))for(var h=0;h<s.length;h++){var u=s[h];for(var f in u){var v=u[f];v!=null&&(n&&(n+=l),n+=x2(f+":"+d+n1(v)+";",a))}}else for(var p in s){var _=s[p];_!=null&&(n&&(n+=l),n+=x2(p+":"+d+n1(_)+";",a))}for(var m in e){var g=e[m];g!=null&&m!=="fallbacks"&&(n&&(n+=l),n+=x2(m+":"+d+n1(g)+";",a))}return!n&&!r.allowEmpty||!t?n:(a--,n&&(n=""+l+n+l),x2(""+t+d+"{"+n,a)+x2("}",a))}var kq=/([[\].#*$><+~=|^:(),"'`\s])/g,ex=typeof CSS<"u"&&CSS.escape,V7=function(t){return ex?ex(t):t.replace(kq,"\\$1")},bP=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 h=this.options.sheet;return h&&h.attached,this},t}(),q6=function(t){yP(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(Jw(Jw(a)),l),a.selectorText="."+V7(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]=n1(a))}return i},r.toString=function(i){var o=this.options.sheet,a=o?o.options.link:!1,s=a?At({},i,{allowEmpty:!0}):i;return yu(this.selectorText,this.style,s)},gP(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}(bP),Eq={onCreateRule:function(e,r,n){return e[0]==="@"||n.parent&&n.parent.type==="keyframes"?null:new q6(e,r,n)}},Ym={indent:1,children:!0},Sq=/@([\w-]+)/,Aq=function(){function t(r,n,i){this.type="conditional",this.isProcessed=!1,this.key=r;var o=r.match(Sq);this.at=o?o[1]:"unknown",this.query=i.name||"@"+this.at,this.options=i,this.rules=new n5(At({},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=Ym);var i=Yd(n),o=i.linebreak;if(n.indent==null&&(n.indent=Ym.indent),n.children==null&&(n.children=Ym.children),n.children===!1)return this.query+" {}";var a=this.rules.toString(n);return a?this.query+" {"+o+a+o+"}":""},t}(),Mq=/@media|@supports\s+/,$q={onCreateRule:function(e,r,n){return Mq.test(e)?new Aq(e,r,n):null}},Xm={indent:1,children:!0},Pq=/@keyframes\s+([\w-]+)/,W6=function(){function t(r,n,i){this.type="keyframes",this.at="@keyframes",this.isProcessed=!1;var o=r.match(Pq);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:V7(c(this,s)),this.rules=new n5(At({},i,{parent:this}));for(var l in n)this.rules.add(l,n[l],At({},i,{parent:this}));this.rules.process()}var e=t.prototype;return e.toString=function(n){n===void 0&&(n=Xm);var i=Yd(n),o=i.linebreak;if(n.indent==null&&(n.indent=Xm.indent),n.children==null&&(n.children=Xm.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}(),Iq=/@keyframes\s+/,Hq=/\$([\w-]+)/g,G6=function(e,r){return typeof e=="string"?e.replace(Hq,function(n,i){return i in r?r[i]:n}):e},tx=function(e,r,n){var i=e[r],o=G6(i,n);o!==i&&(e[r]=o)},Tq={onCreateRule:function(e,r,n){return typeof e=="string"&&Iq.test(e)?new W6(e,r,n):null},onProcessStyle:function(e,r,n){return r.type!=="style"||!n||("animation-name"in e&&tx(e,"animation-name",n.keyframes),"animation"in e&&tx(e,"animation",n.keyframes)),e},onChangeValue:function(e,r,n){var i=n.options.sheet;if(!i)return e;switch(r){case"animation":return G6(e,i.keyframes);case"animation-name":return G6(e,i.keyframes);default:return e}}},Rq=function(t){yP(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?At({},i,{allowEmpty:!0}):i;return yu(this.key,this.style,s)},e}(bP),Dq={onCreateRule:function(e,r,n){return n.parent&&n.parent.type==="keyframes"?new Rq(e,r,n):null}},Vq=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=Yd(n),o=i.linebreak;if(Array.isArray(this.style)){for(var a="",s=0;s<this.style.length;s++)a+=yu(this.at,this.style[s]),this.style[s+1]&&(a+=o);return a}return yu(this.at,this.style,n)},t}(),Lq=/@font-face/,Oq={onCreateRule:function(e,r,n){return Lq.test(e)?new Vq(e,r,n):null}},Nq=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 yu(this.key,this.style,n)},t}(),Fq={onCreateRule:function(e,r,n){return e==="@viewport"||e==="@-ms-viewport"?new Nq(e,r,n):null}},Bq=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}(),Uq={"@charset":!0,"@import":!0,"@namespace":!0},jq={onCreateRule:function(e,r,n){return e in Uq?new Bq(e,r,n):null}},rx=[Eq,$q,Tq,Dq,Oq,Fq,jq],qq={process:!0},nx={force:!0,process:!0},n5=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,h=a.generateId,u=a.scoped,f=At({classes:this.classes,parent:s,sheet:c,jss:l,Renderer:d,generateId:h,scoped:u,name:n,keyframes:this.keyframes,selector:void 0},o),v=n;n in this.raw&&(v=n+"-d"+this.counter++),this.raw[v]=i,v in this.classes&&(f.selector="."+V7(this.classes[v]));var p=D7(v,i,f);if(!p)return null;this.register(p);var _=f.index===void 0?this.index.length:f.index;return this.index.splice(_,0,p),p},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=At({},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 q6?(this.map[n.selector]=n,n.id&&(this.classes[n.key]=n.id)):n instanceof W6&&this.keyframes&&(this.keyframes[n.name]=n.id)},e.unregister=function(n){delete this.map[n.key],n instanceof q6?(delete this.map[n.selector],delete this.classes[n.key]):n instanceof W6&&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=qq);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 h=n.style[d],u=l[d];h!==u&&n.prop(d,h,nx)}for(var f in l){var v=n.style[f],p=l[f];v==null&&v!==p&&n.prop(f,null,nx)}}},e.toString=function(n){for(var i="",o=this.options.sheet,a=o?o.options.link:!1,s=Yd(n),c=s.linebreak,l=0;l<this.index.length;l++){var d=this.index[l],h=d.toString(n);!h&&!a||(i&&(i+=c),i+=h)}return i},t}(),wP=function(){function t(r,n){this.attached=!1,this.deployed=!1,this.classes={},this.keyframes={},this.options=At({},n,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),n.Renderer&&(this.renderer=new n.Renderer(this)),this.rules=new n5(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}(),Wq=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}(),Gq=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=_P(i,["attached"]),s=Yd(a),c=s.linebreak,l="",d=0;d<this.registry.length;d++){var h=this.registry[d];o!=null&&h.attached!==o||(l&&(l+=c),l+=h.toString(a))}return l},gP(t,[{key:"index",get:function(){return this.registry.length===0?0:this.registry[this.registry.length-1].options.index}}]),t}(),Eh=new Gq,K6=typeof globalThis<"u"?globalThis:typeof window<"u"&&window.Math===Math?window:typeof self<"u"&&self.Math===Math?self:Function("return this")(),Y6="2f1acc6c3a606b082e5eef5e54414ffb";K6[Y6]==null&&(K6[Y6]=0);var ix=K6[Y6]++,ox=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")+ix+s+r:c+o.key+"-"+ix+(s?"-"+s:"")+"-"+r};return n},xP=function(e){var r;return function(){return r||(r=e()),r}},Kq=function(e,r){try{return e.attributeStyleMap?e.attributeStyleMap.get(r):e.style.getPropertyValue(r)}catch{return""}},Yq=function(e,r,n){try{var i=n;if(Array.isArray(n)&&(i=n1(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},Xq=function(e,r){try{e.attributeStyleMap?e.attributeStyleMap.delete(r):e.style.removeProperty(r)}catch{}},Qq=function(e,r){return e.selectorText=r,e.selectorText===r},zP=xP(function(){return document.querySelector("head")});function Jq(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 Zq(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 eW(t){for(var e=zP(),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 tW(t){var e=Eh.registry;if(e.length>0){var r=Jq(e,t);if(r&&r.renderer)return{parent:r.renderer.element.parentNode,node:r.renderer.element};if(r=Zq(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=eW(n);if(i)return{parent:i.parentNode,node:i.nextSibling}}return!1}function rW(t,e){var r=e.insertionPoint,n=tW(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}zP().appendChild(t)}var nW=xP(function(){var t=document.querySelector('meta[property="csp-nonce"]');return t?t.getAttribute("content"):null}),ax=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]},sx=function(e,r){var n=e.cssRules.length;return r===void 0||r>n?n:r},iW=function(){var e=document.createElement("style");return e.textContent=`
77
77
  `,e},oW=function(){function t(r){this.getPropertyValue=Kq,this.setProperty=Yq,this.removeProperty=Xq,this.setSelector=Qq,this.hasInsertedRules=!1,this.cssRules=[],r&&Eh.add(r),this.sheet=r;var n=this.sheet?this.sheet.options:{},i=n.media,o=n.meta,a=n.element;this.element=a||iW(),this.element.setAttribute("data-jss",""),i&&this.element.setAttribute("media",i),o&&this.element.setAttribute("data-meta",o);var s=nW();s&&this.element.setAttribute("nonce",s)}var e=t.prototype;return e.attach=function(){if(!(this.element.parentNode||!this.sheet)){rW(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=`
@@ -442,7 +442,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
442
442
  * LICENSE.md file in the root directory of this source tree.
443
443
  *
444
444
  * @license MIT
445
- */function GX(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}const KX=typeof Object.is=="function"?Object.is:GX,{useState:YX,useEffect:XX,useLayoutEffect:QX,useDebugValue:JX}=Fa;function ZX(t,e,r){const n=e(),[{inst:i},o]=YX({inst:{value:n,getSnapshot:e}});return QX(()=>{i.value=n,i.getSnapshot=e,m3(i)&&o({inst:i})},[t,n,e]),XX(()=>(m3(i)&&o({inst:i}),t(()=>{m3(i)&&o({inst:i})})),[t]),JX(n),n}function m3(t){const e=t.getSnapshot,r=t.value;try{const n=e();return!KX(r,n)}catch{return!0}}function eQ(t,e,r){return e()}const tQ=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",rQ=!tQ,nQ=rQ?eQ:ZX,iQ="useSyncExternalStore"in Fa?(t=>t.useSyncExternalStore)(Fa):nQ,Z7=y.createContext(null),ey=y.createContext(null),MI=y.createContext(null),b5=y.createContext(null),Qd=y.createContext({outlet:null,matches:[]}),$I=y.createContext(null);function h8(){return h8=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},h8.apply(this,arguments)}function ty(){return y.useContext(b5)!=null}function oQ(){return ty()||Ei(!1),y.useContext(b5).location}const aQ=y.createContext(null);function sQ(t){let e=y.useContext(Qd).outlet;return e&&y.createElement(aQ.Provider,{value:t},e)}function cQ(){let{matches:t}=y.useContext(Qd),e=t[t.length-1];return e?e.params:{}}function lQ(t,e){ty()||Ei(!1);let{navigator:r}=y.useContext(MI),n=y.useContext(ey),{matches:i}=y.useContext(Qd),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let s=o?o.pathnameBase:"/";o&&o.route;let c=oQ(),l;if(e){var d;let p=typeof e=="string"?J7(e):e;s==="/"||(d=p.pathname)!=null&&d.startsWith(s)||Ei(!1),l=p}else l=c;let h=l.pathname||"/",u=s==="/"?h:h.slice(s.length)||"/",f=$X(t,{pathname:u}),v=fQ(f&&f.map(p=>Object.assign({},p,{params:Object.assign({},a,p.params),pathname:Dl([s,r.encodeLocation?r.encodeLocation(p.pathname).pathname:p.pathname]),pathnameBase:p.pathnameBase==="/"?s:Dl([s,r.encodeLocation?r.encodeLocation(p.pathnameBase).pathname:p.pathnameBase])})),i,n||void 0);return e&&v?y.createElement(b5.Provider,{value:{location:h8({pathname:"/",search:"",hash:"",state:null,key:"default"},l),navigationType:Gp.Pop}},v):v}function dQ(){let t=gQ(),e=WX(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},o=null;return y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},e),r?y.createElement("pre",{style:i},r):null,o)}class hQ extends y.Component{constructor(e){super(e),this.state={location:e.location,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,r){return r.location!==e.location?{error:e.error,location:e.location}:{error:e.error||r.error,location:r.location}}componentDidCatch(e,r){console.error("React Router caught the following error during render",e,r)}render(){return this.state.error?y.createElement(Qd.Provider,{value:this.props.routeContext},y.createElement($I.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function uQ(t){let{routeContext:e,match:r,children:n}=t,i=y.useContext(Z7);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),y.createElement(Qd.Provider,{value:e},n)}function fQ(t,e,r){if(e===void 0&&(e=[]),t==null)if(r!=null&&r.errors)t=r.matches;else return null;let n=t,i=r==null?void 0:r.errors;if(i!=null){let o=n.findIndex(a=>a.route.id&&(i==null?void 0:i[a.route.id]));o>=0||Ei(!1),n=n.slice(0,Math.min(n.length,o+1))}return n.reduceRight((o,a,s)=>{let c=a.route.id?i==null?void 0:i[a.route.id]:null,l=null;r&&(a.route.ErrorBoundary?l=y.createElement(a.route.ErrorBoundary,null):a.route.errorElement?l=a.route.errorElement:l=y.createElement(dQ,null));let d=e.concat(n.slice(0,s+1)),h=()=>{let u=o;return c?u=l:a.route.Component?u=y.createElement(a.route.Component,null):a.route.element&&(u=a.route.element),y.createElement(uQ,{match:a,routeContext:{outlet:o,matches:d},children:u})};return r&&(a.route.ErrorBoundary||a.route.errorElement||s===0)?y.createElement(hQ,{location:r.location,component:l,error:c,children:h(),routeContext:{outlet:null,matches:d}}):h()},null)}var tz;(function(t){t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator"})(tz||(tz={}));var Kp;(function(t){t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator"})(Kp||(Kp={}));function pQ(t){let e=y.useContext(ey);return e||Ei(!1),e}function vQ(t){let e=y.useContext(Qd);return e||Ei(!1),e}function mQ(t){let e=vQ(),r=e.matches[e.matches.length-1];return r.route.id||Ei(!1),r.route.id}function gQ(){var t;let e=y.useContext($I),r=pQ(Kp.UseRouteError),n=mQ(Kp.UseRouteError);return e||((t=r.errors)==null?void 0:t[n])}function yQ(t){let{fallbackElement:e,router:r}=t,n=y.useCallback(()=>r.state,[r]),i=iQ(r.subscribe,n,n),o=y.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:c=>r.navigate(c),push:(c,l,d)=>r.navigate(c,{state:l,preventScrollReset:d==null?void 0:d.preventScrollReset}),replace:(c,l,d)=>r.navigate(c,{replace:!0,state:l,preventScrollReset:d==null?void 0:d.preventScrollReset})}),[r]),a=r.basename||"/",s=y.useMemo(()=>({router:r,navigator:o,static:!1,basename:a}),[r,o,a]);return y.createElement(y.Fragment,null,y.createElement(Z7.Provider,{value:s},y.createElement(ey.Provider,{value:i},y.createElement(wQ,{basename:r.basename,location:r.state.location,navigationType:r.state.historyAction,navigator:o},r.state.initialized?y.createElement(xQ,null):e))),null)}function _Q(t){return sQ(t.context)}function bQ(t){Ei(!1)}function wQ(t){let{basename:e="/",children:r=null,location:n,navigationType:i=Gp.Pop,navigator:o,static:a=!1}=t;ty()&&Ei(!1);let s=e.replace(/^\/*/,"/"),c=y.useMemo(()=>({basename:s,navigator:o,static:a}),[s,o,a]);typeof n=="string"&&(n=J7(n));let{pathname:l="/",search:d="",hash:h="",state:u=null,key:f="default"}=n,v=y.useMemo(()=>{let p=AI(l,s);return p==null?null:{location:{pathname:p,search:d,hash:h,state:u,key:f},navigationType:i}},[s,l,d,h,u,f,i]);return v==null?null:y.createElement(MI.Provider,{value:c},y.createElement(b5.Provider,{children:r,value:v}))}function xQ(t){let{children:e,location:r}=t,n=y.useContext(Z7),i=n&&!e?n.router.routes:u8(e);return lQ(i,r)}var rz;(function(t){t[t.pending=0]="pending",t[t.success=1]="success",t[t.error=2]="error"})(rz||(rz={}));new Promise(()=>{});function u8(t,e){e===void 0&&(e=[]);let r=[];return y.Children.forEach(t,(n,i)=>{if(!y.isValidElement(n))return;let o=[...e,i];if(n.type===y.Fragment){r.push.apply(r,u8(n.props.children,o));return}n.type!==bQ&&Ei(!1),!n.props.index||!n.props.children||Ei(!1);let a={id:n.props.id||o.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(a.children=u8(n.props.children,o)),r.push(a)}),r}const zQ=(t,e,r)=>{y.useEffect(()=>{const n=t.subscribe(e);return n.add(r),()=>n.unsubscribe()},[t,e])},CQ=(t,e,r)=>{y.useLayoutEffect(()=>{const n=t.subscribe(e);return n.add(r),()=>n.unsubscribe()},[t,e])};function xu(t,e){const[r]=y.useState(e==null?void 0:e.initial),[n,i]=y.useState(r),[o,a]=y.useState(null),[s,c]=y.useState(!1),l=y.useCallback(()=>{a(null),i(r),c(!1)},[i,a,c,r]);y.useLayoutEffect(()=>{const h=t.value;return h&&i(h),l},[i,l,t]);const d=y.useMemo(()=>({next:i,error:a,complete:()=>c(!0)}),[i,a,c]);return CQ(t,d,e==null?void 0:e.teardown),{value:n,error:o,complete:s}}const f8=({error:t})=>pe(Fn,{children:[pe("div",{style:{marginTop:20,border:"1px solid"},children:[z("h4",{style:{backgroundColor:"rgb(153, 0, 37)",color:"white",padding:10,margin:0},children:t.message}),z("section",{style:{padding:10},children:t.stack&&z("pre",{children:t.stack})})]}),t.cause&&z(f8,{error:t.cause})]}),kQ=t=>{const{appKey:e}=t,r=jn(),n=y.useRef(null),[i,o]=y.useState(!1),[a,s]=y.useState(),{value:c}=xu(y.useMemo(()=>r.modules.app.current$,[r.modules.app]));return y.useEffect(()=>{r.modules.app.setCurrentApp(e)},[e,r]),y.useEffect(()=>{o(!0),s(void 0);const l=new Un;return l.add(c==null?void 0:c.initialize().subscribe({next:({manifest:d,script:h,config:u})=>{const[f]=window.location.pathname.match(/\/?apps\/[a-z|-]+(\/)?/g)??[""],v=document.createElement("div");if(v.style.height="100%",!n.current)throw Error("Missing application mounting point");n.current.appendChild(v),n.current.style.height="100%";const p=h.renderApp??h.default;l.add(p(v,{fusion:r,env:{basename:f,config:u,manifest:d}})),l.add(()=>v.remove())},complete:()=>{o(!1)},error:d=>{s(d)}})),()=>l.unsubscribe()},[r,c,n]),a?a.cause instanceof Os?pe("div",{children:[z("h2",{children:"🔥 Failed to load application manifest 🤬"}),z("h3",{children:a.cause.type}),z(f8,{error:a}),";"]}):pe("div",{children:[z("h2",{children:"🔥 Failed to load application 🤬"}),z(f8,{error:a}),";"]}):z("section",{ref:n,children:i&&z(sI,{text:"Loading Application"})})},EQ=()=>{const t=jn().modules.app;if(!t)throw Error("Current framework does not have AppModule configured");const e=y.useMemo(()=>t.current$,[t]),{value:r}=xu(e);return{currentApp:r,setCurrentApp:y.useMemo(()=>t.setCurrentApp.bind(t),[t]),clearCurrentApp:y.useMemo(()=>t.clearCurrentApp.bind(t),[t])}};class w5 extends CustomEvent{constructor(e){super(w5.eventName,e)}}w5.eventName="select";class cd extends CustomEvent{constructor(e){super(cd.eventName,e)}}cd.eventName="fwc-searchabledropdown-controller-connect";var ch;class PI extends On{constructor(){super(...arguments),this.resolverCallbacks=[],ch.set(this,void 0)}createRenderRoot(){return this}connectResolver(e){Y1(this,ch,e,"f"),this.resolverCallbacks.forEach(r=>{r(e)})}removeResolver(){this.resolverCallbacks.forEach(e=>{e()})}connectedCallback(){super.connectedCallback(),this.addEventListener(cd.eventName,this.handleElementConnect)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(cd.eventName,this.handleElementConnect)}handleElementConnect(e){const{disconnectedCallback:r,updateResolver:n}=e.detail;r(()=>{this.resolverCallbacks.filter(i=>i!==n)}),et(this,ch,"f")&&n(et(this,ch,"f")),this.resolverCallbacks.push(n),e.preventDefault(),e.stopPropagation()}}ch=new WeakMap;/**
445
+ */function GX(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}const KX=typeof Object.is=="function"?Object.is:GX,{useState:YX,useEffect:XX,useLayoutEffect:QX,useDebugValue:JX}=Fa;function ZX(t,e,r){const n=e(),[{inst:i},o]=YX({inst:{value:n,getSnapshot:e}});return QX(()=>{i.value=n,i.getSnapshot=e,m3(i)&&o({inst:i})},[t,n,e]),XX(()=>(m3(i)&&o({inst:i}),t(()=>{m3(i)&&o({inst:i})})),[t]),JX(n),n}function m3(t){const e=t.getSnapshot,r=t.value;try{const n=e();return!KX(r,n)}catch{return!0}}function eQ(t,e,r){return e()}const tQ=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",rQ=!tQ,nQ=rQ?eQ:ZX,iQ="useSyncExternalStore"in Fa?(t=>t.useSyncExternalStore)(Fa):nQ,Z7=y.createContext(null),ey=y.createContext(null),MI=y.createContext(null),b5=y.createContext(null),Qd=y.createContext({outlet:null,matches:[]}),$I=y.createContext(null);function h8(){return h8=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},h8.apply(this,arguments)}function ty(){return y.useContext(b5)!=null}function oQ(){return ty()||Ei(!1),y.useContext(b5).location}const aQ=y.createContext(null);function sQ(t){let e=y.useContext(Qd).outlet;return e&&y.createElement(aQ.Provider,{value:t},e)}function cQ(){let{matches:t}=y.useContext(Qd),e=t[t.length-1];return e?e.params:{}}function lQ(t,e){ty()||Ei(!1);let{navigator:r}=y.useContext(MI),n=y.useContext(ey),{matches:i}=y.useContext(Qd),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let s=o?o.pathnameBase:"/";o&&o.route;let c=oQ(),l;if(e){var d;let p=typeof e=="string"?J7(e):e;s==="/"||(d=p.pathname)!=null&&d.startsWith(s)||Ei(!1),l=p}else l=c;let h=l.pathname||"/",u=s==="/"?h:h.slice(s.length)||"/",f=$X(t,{pathname:u}),v=fQ(f&&f.map(p=>Object.assign({},p,{params:Object.assign({},a,p.params),pathname:Dl([s,r.encodeLocation?r.encodeLocation(p.pathname).pathname:p.pathname]),pathnameBase:p.pathnameBase==="/"?s:Dl([s,r.encodeLocation?r.encodeLocation(p.pathnameBase).pathname:p.pathnameBase])})),i,n||void 0);return e&&v?y.createElement(b5.Provider,{value:{location:h8({pathname:"/",search:"",hash:"",state:null,key:"default"},l),navigationType:Gp.Pop}},v):v}function dQ(){let t=gQ(),e=WX(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},o=null;return y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},e),r?y.createElement("pre",{style:i},r):null,o)}class hQ extends y.Component{constructor(e){super(e),this.state={location:e.location,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,r){return r.location!==e.location?{error:e.error,location:e.location}:{error:e.error||r.error,location:r.location}}componentDidCatch(e,r){console.error("React Router caught the following error during render",e,r)}render(){return this.state.error?y.createElement(Qd.Provider,{value:this.props.routeContext},y.createElement($I.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function uQ(t){let{routeContext:e,match:r,children:n}=t,i=y.useContext(Z7);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),y.createElement(Qd.Provider,{value:e},n)}function fQ(t,e,r){if(e===void 0&&(e=[]),t==null)if(r!=null&&r.errors)t=r.matches;else return null;let n=t,i=r==null?void 0:r.errors;if(i!=null){let o=n.findIndex(a=>a.route.id&&(i==null?void 0:i[a.route.id]));o>=0||Ei(!1),n=n.slice(0,Math.min(n.length,o+1))}return n.reduceRight((o,a,s)=>{let c=a.route.id?i==null?void 0:i[a.route.id]:null,l=null;r&&(a.route.ErrorBoundary?l=y.createElement(a.route.ErrorBoundary,null):a.route.errorElement?l=a.route.errorElement:l=y.createElement(dQ,null));let d=e.concat(n.slice(0,s+1)),h=()=>{let u=o;return c?u=l:a.route.Component?u=y.createElement(a.route.Component,null):a.route.element&&(u=a.route.element),y.createElement(uQ,{match:a,routeContext:{outlet:o,matches:d},children:u})};return r&&(a.route.ErrorBoundary||a.route.errorElement||s===0)?y.createElement(hQ,{location:r.location,component:l,error:c,children:h(),routeContext:{outlet:null,matches:d}}):h()},null)}var tz;(function(t){t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator"})(tz||(tz={}));var Kp;(function(t){t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator"})(Kp||(Kp={}));function pQ(t){let e=y.useContext(ey);return e||Ei(!1),e}function vQ(t){let e=y.useContext(Qd);return e||Ei(!1),e}function mQ(t){let e=vQ(),r=e.matches[e.matches.length-1];return r.route.id||Ei(!1),r.route.id}function gQ(){var t;let e=y.useContext($I),r=pQ(Kp.UseRouteError),n=mQ(Kp.UseRouteError);return e||((t=r.errors)==null?void 0:t[n])}function yQ(t){let{fallbackElement:e,router:r}=t,n=y.useCallback(()=>r.state,[r]),i=iQ(r.subscribe,n,n),o=y.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:c=>r.navigate(c),push:(c,l,d)=>r.navigate(c,{state:l,preventScrollReset:d==null?void 0:d.preventScrollReset}),replace:(c,l,d)=>r.navigate(c,{replace:!0,state:l,preventScrollReset:d==null?void 0:d.preventScrollReset})}),[r]),a=r.basename||"/",s=y.useMemo(()=>({router:r,navigator:o,static:!1,basename:a}),[r,o,a]);return y.createElement(y.Fragment,null,y.createElement(Z7.Provider,{value:s},y.createElement(ey.Provider,{value:i},y.createElement(wQ,{basename:r.basename,location:r.state.location,navigationType:r.state.historyAction,navigator:o},r.state.initialized?y.createElement(xQ,null):e))),null)}function _Q(t){return sQ(t.context)}function bQ(t){Ei(!1)}function wQ(t){let{basename:e="/",children:r=null,location:n,navigationType:i=Gp.Pop,navigator:o,static:a=!1}=t;ty()&&Ei(!1);let s=e.replace(/^\/*/,"/"),c=y.useMemo(()=>({basename:s,navigator:o,static:a}),[s,o,a]);typeof n=="string"&&(n=J7(n));let{pathname:l="/",search:d="",hash:h="",state:u=null,key:f="default"}=n,v=y.useMemo(()=>{let p=AI(l,s);return p==null?null:{location:{pathname:p,search:d,hash:h,state:u,key:f},navigationType:i}},[s,l,d,h,u,f,i]);return v==null?null:y.createElement(MI.Provider,{value:c},y.createElement(b5.Provider,{children:r,value:v}))}function xQ(t){let{children:e,location:r}=t,n=y.useContext(Z7),i=n&&!e?n.router.routes:u8(e);return lQ(i,r)}var rz;(function(t){t[t.pending=0]="pending",t[t.success=1]="success",t[t.error=2]="error"})(rz||(rz={}));new Promise(()=>{});function u8(t,e){e===void 0&&(e=[]);let r=[];return y.Children.forEach(t,(n,i)=>{if(!y.isValidElement(n))return;let o=[...e,i];if(n.type===y.Fragment){r.push.apply(r,u8(n.props.children,o));return}n.type!==bQ&&Ei(!1),!n.props.index||!n.props.children||Ei(!1);let a={id:n.props.id||o.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(a.children=u8(n.props.children,o)),r.push(a)}),r}const zQ=(t,e,r)=>{y.useEffect(()=>{const n=t.subscribe(e);return n.add(r),()=>n.unsubscribe()},[t,e])},CQ=(t,e,r)=>{y.useLayoutEffect(()=>{const n=t.subscribe(e);return n.add(r),()=>n.unsubscribe()},[t,e])};function xu(t,e){const[r]=y.useState(e==null?void 0:e.initial),[n,i]=y.useState(r),[o,a]=y.useState(null),[s,c]=y.useState(!1),l=y.useCallback(()=>{a(null),i(r),c(!1)},[i,a,c,r]);y.useLayoutEffect(()=>{const h=t.value;return h&&i(h),l},[i,l,t]);const d=y.useMemo(()=>({next:i,error:a,complete:()=>c(!0)}),[i,a,c]);return CQ(t,d,e==null?void 0:e.teardown),{value:n,error:o,complete:s}}const f8=({error:t})=>pe(Fn,{children:[pe("div",{style:{marginTop:20,border:"1px solid"},children:[z("h4",{style:{backgroundColor:"rgb(153, 0, 37)",color:"white",padding:10,margin:0},children:t.message}),z("section",{style:{padding:10},children:t.stack&&z("pre",{children:t.stack})})]}),t.cause&&z(f8,{error:t.cause})]}),kQ=t=>{const{appKey:e}=t,r=jn(),n=y.useRef(null),[i,o]=y.useState(!1),[a,s]=y.useState(),{value:c}=xu(y.useMemo(()=>r.modules.app.current$,[r.modules.app]));return y.useEffect(()=>{r.modules.app.setCurrentApp(e)},[e,r]),y.useEffect(()=>{o(!0),s(void 0);const l=new Un;return l.add(c==null?void 0:c.initialize().subscribe({next:({manifest:d,script:h,config:u})=>{const[f]=window.location.pathname.match(/\/?apps\/[a-z|-]+(\/)?/g)??[""],v=document.createElement("div");if(v.style.height="100%",!n.current)throw Error("Missing application mounting point");n.current.appendChild(v),n.current.style.height="100%";const p=h.renderApp??h.default;l.add(p(v,{fusion:r,env:{basename:f,config:u,manifest:d}})),l.add(()=>v.remove())},complete:()=>{o(!1)},error:d=>{s(d)}})),()=>l.unsubscribe()},[r,c,n]),a?a.cause instanceof Os?pe("div",{children:[z("h2",{children:"🔥 Failed to load application manifest 🤬"}),z("h3",{children:a.cause.type}),z(f8,{error:a}),";"]}):pe("div",{children:[z("h2",{children:"🔥 Failed to load application 🤬"}),z(f8,{error:a}),";"]}):z("section",{ref:n,children:i&&z(sI,{text:"Loading Application"})})},EQ=()=>{const t=jn().modules.app;if(!t)throw Error("Current framework does not have AppModule configured");const e=y.useMemo(()=>t.current$,[t]),{value:r,error:n}=xu(e);return{currentApp:r,setCurrentApp:y.useMemo(()=>t.setCurrentApp.bind(t),[t]),clearCurrentApp:y.useMemo(()=>t.clearCurrentApp.bind(t),[t]),error:n}};class w5 extends CustomEvent{constructor(e){super(w5.eventName,e)}}w5.eventName="select";class cd extends CustomEvent{constructor(e){super(cd.eventName,e)}}cd.eventName="fwc-searchabledropdown-controller-connect";var ch;class PI extends On{constructor(){super(...arguments),this.resolverCallbacks=[],ch.set(this,void 0)}createRenderRoot(){return this}connectResolver(e){Y1(this,ch,e,"f"),this.resolverCallbacks.forEach(r=>{r(e)})}removeResolver(){this.resolverCallbacks.forEach(e=>{e()})}connectedCallback(){super.connectedCallback(),this.addEventListener(cd.eventName,this.handleElementConnect)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(cd.eventName,this.handleElementConnect)}handleElementConnect(e){const{disconnectedCallback:r,updateResolver:n}=e.detail;r(()=>{this.resolverCallbacks.filter(i=>i!==n)}),et(this,ch,"f")&&n(et(this,ch,"f")),this.resolverCallbacks.push(n),e.preventDefault(),e.stopPropagation()}}ch=new WeakMap;/**
446
446
  * @license
447
447
  * Copyright 2017 Google LLC
448
448
  * SPDX-License-Identifier: BSD-3-Clause
@@ -20,7 +20,7 @@
20
20
  };
21
21
  </script>
22
22
 
23
- <script type="module" crossorigin src="/assets/index-e35213ab.js"></script>
23
+ <script type="module" crossorigin src="/assets/index-976dd3f3.js"></script>
24
24
 
25
25
  <body style="height: 100vh;">
26
26
  <div id="root" style="height: 100%;"></div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/fusion-framework-cli",
3
- "version": "7.0.4",
3
+ "version": "7.0.6",
4
4
  "keywords": [
5
5
  "Fusion",
6
6
  "Fusion Framework",
@@ -27,7 +27,7 @@
27
27
  "@equinor/eds-core-react": "^0.30.0",
28
28
  "@equinor/eds-icons": "^0.19.1",
29
29
  "@equinor/eds-tokens": "^0.9.0",
30
- "@equinor/fusion-framework-app": "^7.0.10",
30
+ "@equinor/fusion-framework-app": "^7.0.12",
31
31
  "@equinor/fusion-observable": "^8.0.0",
32
32
  "@vitejs/plugin-react": "^3.1.0",
33
33
  "commander": "^10.0.0",
@@ -48,10 +48,10 @@
48
48
  "@equinor/eds-tokens": "^0.9.0",
49
49
  "@equinor/fusion-framework-app": "^7.0.4",
50
50
  "@equinor/fusion-framework-module-bookmark": "^1.0.4",
51
- "@equinor/fusion-framework-module-context": "^4.0.4",
52
- "@equinor/fusion-framework-react": "^5.0.10",
53
- "@equinor/fusion-framework-react-components-bookmark": "^0.1.5",
54
- "@equinor/fusion-framework-react-module-bookmark": "^2.0.4",
51
+ "@equinor/fusion-framework-module-context": "^4.0.5",
52
+ "@equinor/fusion-framework-react": "^5.1.0",
53
+ "@equinor/fusion-framework-react-components-bookmark": "^0.1.7",
54
+ "@equinor/fusion-framework-react-module-bookmark": "^2.0.6",
55
55
  "@equinor/fusion-query": "^3.0.1",
56
56
  "@equinor/fusion-react-button": "^0.8.1",
57
57
  "@equinor/fusion-react-context-selector": "^0.4.3",
@@ -71,5 +71,5 @@
71
71
  "styled-components": "^5.3.9",
72
72
  "typescript": "^4.9.3"
73
73
  },
74
- "gitHead": "b369a37e2b205b8d91d9b9a8907195f7f673a344"
74
+ "gitHead": "b7d1b547049cb9ac3038d2ceded4cb0b851eb052"
75
75
  }