@hopara/iframe 2.4.57 → 2.4.58
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/build/client.js +1 -1
- package/build/service-worker.js +1 -1
- package/build/types/src/client/index.d.ts +43 -0
- package/build/types/src/demo/Demo.d.ts +5 -0
- package/build/types/src/demo/index.d.ts +1 -0
- package/build/types/src/events/EventEmitter.d.ts +15 -0
- package/build/types/src/events/EventReceiver.d.ts +5 -0
- package/build/types/src/events/Events.d.ts +69 -0
- package/build/types/src/index.d.ts +1 -0
- package/build/types/src/service-worker.d.ts +1 -0
- package/build/types/src/view/Provider.d.ts +73 -0
- package/build/types/src/view/Router.d.ts +1 -0
- package/build/types/src/view/View.d.ts +24 -0
- package/build/types/src/view/index.d.ts +1 -0
- package/package.json +8 -8
- package/src/client/index.ts +256 -0
- package/src/demo/Demo.tsx +119 -0
- package/src/demo/index.tsx +7 -0
- package/src/demo/resources/assets-data.json +20552 -0
- package/src/demo/resources/buildings-data.json +56 -0
- package/src/demo/resources/sensors-data.json +830 -0
- package/src/events/EventEmitter.ts +90 -0
- package/src/events/EventReceiver.ts +24 -0
- package/src/events/Events.ts +86 -0
- package/src/index.ts +2 -0
- package/src/react-app-env.d.ts +9 -0
- package/src/service-worker.ts +1 -0
- package/src/view/Provider.tsx +258 -0
- package/src/view/Router.tsx +35 -0
- package/src/view/View.tsx +159 -0
- package/src/view/index.tsx +20 -0
- package/tasks/preprocessHTML.js +0 -74
package/build/service-worker.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(){"use strict";var __webpack_modules__={22:function(){try{self["workbox:broadcast-update:7.2.0"]&&_()}catch(e){}},289:function(){try{self["workbox:precaching:7.2.0"]&&_()}catch(e){}},324:function(){try{self["workbox:expiration:7.2.0"]&&_()}catch(e){}},325:function(){try{self["workbox:routing:7.2.0"]&&_()}catch(e){}},884:function(){try{self["workbox:strategies:7.2.0"]&&_()}catch(e){}},930:function(){try{self["workbox:core:7.2.0"]&&_()}catch(e){}}};var __webpack_module_cache__={};function __webpack_require__(moduleId){var cachedModule=__webpack_module_cache__[moduleId];if(cachedModule!==undefined){return cachedModule.exports}var module=__webpack_module_cache__[moduleId]={exports:{}};__webpack_modules__[moduleId](module,module.exports,__webpack_require__);return module.exports}var _version=__webpack_require__(930);const messages_messages={"invalid-value":({paramName,validValueDescription,value})=>{if(!paramName||!validValueDescription){throw new Error(`Unexpected input to 'invalid-value' error.`)}return`The '${paramName}' parameter was given a value with an `+`unexpected value. ${validValueDescription} Received a value of `+`${JSON.stringify(value)}.`},"not-an-array":({moduleName,className,funcName,paramName})=>{if(!moduleName||!className||!funcName||!paramName){throw new Error(`Unexpected input to 'not-an-array' error.`)}return`The parameter '${paramName}' passed into `+`'${moduleName}.${className}.${funcName}()' must be an array.`},"incorrect-type":({expectedType,paramName,moduleName,className,funcName})=>{if(!expectedType||!paramName||!moduleName||!funcName){throw new Error(`Unexpected input to 'incorrect-type' error.`)}const classNameStr=className?`${className}.`:"";return`The parameter '${paramName}' passed into `+`'${moduleName}.${classNameStr}`+`${funcName}()' must be of type ${expectedType}.`},"incorrect-class":({expectedClassName,paramName,moduleName,className,funcName,isReturnValueProblem})=>{if(!expectedClassName||!moduleName||!funcName){throw new Error(`Unexpected input to 'incorrect-class' error.`)}const classNameStr=className?`${className}.`:"";if(isReturnValueProblem){return`The return value from `+`'${moduleName}.${classNameStr}${funcName}()' `+`must be an instance of class ${expectedClassName}.`}return`The parameter '${paramName}' passed into `+`'${moduleName}.${classNameStr}${funcName}()' `+`must be an instance of class ${expectedClassName}.`},"missing-a-method":({expectedMethod,paramName,moduleName,className,funcName})=>{if(!expectedMethod||!paramName||!moduleName||!className||!funcName){throw new Error(`Unexpected input to 'missing-a-method' error.`)}return`${moduleName}.${className}.${funcName}() expected the `+`'${paramName}' parameter to expose a '${expectedMethod}' method.`},"add-to-cache-list-unexpected-type":({entry})=>`An unexpected entry was passed to `+`'workbox-precaching.PrecacheController.addToCacheList()' The entry `+`'${JSON.stringify(entry)}' isn't supported. You must supply an array of `+`strings with one or more characters, objects with a url property or `+`Request objects.`,"add-to-cache-list-conflicting-entries":({firstEntry,secondEntry})=>{if(!firstEntry||!secondEntry){throw new Error(`Unexpected input to `+`'add-to-cache-list-duplicate-entries' error.`)}return`Two of the entries passed to `+`'workbox-precaching.PrecacheController.addToCacheList()' had the URL `+`${firstEntry} but different revision details. Workbox is `+`unable to cache and version the asset correctly. Please remove one `+`of the entries.`},"plugin-error-request-will-fetch":({thrownErrorMessage})=>{if(!thrownErrorMessage){throw new Error(`Unexpected input to `+`'plugin-error-request-will-fetch', error.`)}return`An error was thrown by a plugins 'requestWillFetch()' method. `+`The thrown error message was: '${thrownErrorMessage}'.`},"invalid-cache-name":({cacheNameId,value})=>{if(!cacheNameId){throw new Error(`Expected a 'cacheNameId' for error 'invalid-cache-name'`)}return`You must provide a name containing at least one character for `+`setCacheDetails({${cacheNameId}: '...'}). Received a value of `+`'${JSON.stringify(value)}'`},"unregister-route-but-not-found-with-method":({method})=>{if(!method){throw new Error(`Unexpected input to `+`'unregister-route-but-not-found-with-method' error.`)}return`The route you're trying to unregister was not previously `+`registered for the method type '${method}'.`},"unregister-route-route-not-registered":()=>`The route you're trying to unregister was not previously `+`registered.`,"queue-replay-failed":({name})=>`Replaying the background sync queue '${name}' failed.`,"duplicate-queue-name":({name})=>`The Queue name '${name}' is already being used. `+`All instances of backgroundSync.Queue must be given unique names.`,"expired-test-without-max-age":({methodName,paramName})=>`The '${methodName}()' method can only be used when the `+`'${paramName}' is used in the constructor.`,"unsupported-route-type":({moduleName,className,funcName,paramName})=>`The supplied '${paramName}' parameter was an unsupported type. `+`Please check the docs for ${moduleName}.${className}.${funcName} for `+`valid input types.`,"not-array-of-class":({value,expectedClass,moduleName,className,funcName,paramName})=>`The supplied '${paramName}' parameter must be an array of `+`'${expectedClass}' objects. Received '${JSON.stringify(value)},'. `+`Please check the call to ${moduleName}.${className}.${funcName}() `+`to fix the issue.`,"max-entries-or-age-required":({moduleName,className,funcName})=>`You must define either config.maxEntries or config.maxAgeSeconds`+`in ${moduleName}.${className}.${funcName}`,"statuses-or-headers-required":({moduleName,className,funcName})=>`You must define either config.statuses or config.headers`+`in ${moduleName}.${className}.${funcName}`,"invalid-string":({moduleName,funcName,paramName})=>{if(!paramName||!moduleName||!funcName){throw new Error(`Unexpected input to 'invalid-string' error.`)}return`When using strings, the '${paramName}' parameter must start with `+`'http' (for cross-origin matches) or '/' (for same-origin matches). `+`Please see the docs for ${moduleName}.${funcName}() for `+`more info.`},"channel-name-required":()=>`You must provide a channelName to construct a `+`BroadcastCacheUpdate instance.`,"invalid-responses-are-same-args":()=>`The arguments passed into responsesAreSame() appear to be `+`invalid. Please ensure valid Responses are used.`,"expire-custom-caches-only":()=>`You must provide a 'cacheName' property when using the `+`expiration plugin with a runtime caching strategy.`,"unit-must-be-bytes":({normalizedRangeHeader})=>{if(!normalizedRangeHeader){throw new Error(`Unexpected input to 'unit-must-be-bytes' error.`)}return`The 'unit' portion of the Range header must be set to 'bytes'. `+`The Range header provided was "${normalizedRangeHeader}"`},"single-range-only":({normalizedRangeHeader})=>{if(!normalizedRangeHeader){throw new Error(`Unexpected input to 'single-range-only' error.`)}return`Multiple ranges are not supported. Please use a single start `+`value, and optional end value. The Range header provided was `+`"${normalizedRangeHeader}"`},"invalid-range-values":({normalizedRangeHeader})=>{if(!normalizedRangeHeader){throw new Error(`Unexpected input to 'invalid-range-values' error.`)}return`The Range header is missing both start and end values. At least `+`one of those values is needed. The Range header provided was `+`"${normalizedRangeHeader}"`},"no-range-header":()=>`No Range header was found in the Request provided.`,"range-not-satisfiable":({size,start,end})=>`The start (${start}) and end (${end}) values in the Range are `+`not satisfiable by the cached response, which is ${size} bytes.`,"attempt-to-cache-non-get-request":({url,method})=>`Unable to cache '${url}' because it is a '${method}' request and `+`only 'GET' requests can be cached.`,"cache-put-with-no-response":({url})=>`There was an attempt to cache '${url}' but the response was not `+`defined.`,"no-response":({url,error})=>{let message=`The strategy could not generate a response for '${url}'.`;if(error){message+=` The underlying error is ${error}.`}return message},"bad-precaching-response":({url,status})=>`The precaching request for '${url}' failed`+(status?` with an HTTP status of ${status}.`:`.`),"non-precached-url":({url})=>`createHandlerBoundToURL('${url}') was called, but that URL is `+`not precached. Please pass in a URL that is precached instead.`,"add-to-cache-list-conflicting-integrities":({url})=>`Two of the entries passed to `+`'workbox-precaching.PrecacheController.addToCacheList()' had the URL `+`${url} with different integrity values. Please remove one of them.`,"missing-precache-entry":({cacheName,url})=>`Unable to find a precached response in ${cacheName} for ${url}.`,"cross-origin-copy-response":({origin})=>`workbox-core.copyResponse() can only be used with same-origin `+`responses. It was passed a response with origin ${origin}.`,"opaque-streams-source":({type})=>{const message=`One of the workbox-streams sources resulted in an `+`'${type}' response.`;if(type==="opaqueredirect"){return`${message} Please do not use a navigation request that results `+`in a redirect as a source.`}return`${message} Please ensure your sources are CORS-enabled.`}};const fallback=(code,...args)=>{let msg=code;if(args.length>0){msg+=` :: ${JSON.stringify(args)}`}return msg};const generatorFunction=(code,details={})=>{const message=messages[code];if(!message){throw new Error(`Unable to find message for code '${code}'.`)}return message(details)};const messageGenerator=true?fallback:0;class WorkboxError_WorkboxError extends Error{constructor(errorCode,details){const message=messageGenerator(errorCode,details);super(message);this.name=errorCode;this.details=details}}const isArray=(value,details)=>{if(!Array.isArray(value)){throw new WorkboxError("not-an-array",details)}};const hasMethod=(object,expectedMethod,details)=>{const type=typeof object[expectedMethod];if(type!=="function"){details["expectedMethod"]=expectedMethod;throw new WorkboxError("missing-a-method",details)}};const isType=(object,expectedType,details)=>{if(typeof object!==expectedType){details["expectedType"]=expectedType;throw new WorkboxError("incorrect-type",details)}};const isInstance=(object,expectedClass,details)=>{if(!(object instanceof expectedClass)){details["expectedClassName"]=expectedClass.name;throw new WorkboxError("incorrect-class",details)}};const isOneOf=(value,validValues,details)=>{if(!validValues.includes(value)){details["validValueDescription"]=`Valid values are ${JSON.stringify(validValues)}.`;throw new WorkboxError("invalid-value",details)}};const isArrayOfClass=(value,expectedClass,details)=>{const error=new WorkboxError("not-array-of-class",details);if(!Array.isArray(value)){throw error}for(const item of value){if(!(item instanceof expectedClass)){throw error}}};const finalAssertExports=true?null:0;function dontWaitFor(promise){void promise.then((()=>{}))}const logger_logger=true?null:0;const instanceOfAny=(object,constructors)=>constructors.some((c=>object instanceof c));let idbProxyableTypes;let cursorAdvanceMethods;function getIdbProxyableTypes(){return idbProxyableTypes||(idbProxyableTypes=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function getCursorAdvanceMethods(){return cursorAdvanceMethods||(cursorAdvanceMethods=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const cursorRequestMap=new WeakMap;const transactionDoneMap=new WeakMap;const transactionStoreNamesMap=new WeakMap;const transformCache=new WeakMap;const reverseTransformCache=new WeakMap;function promisifyRequest(request){const promise=new Promise(((resolve,reject)=>{const unlisten=()=>{request.removeEventListener("success",success);request.removeEventListener("error",error)};const success=()=>{resolve(wrap(request.result));unlisten()};const error=()=>{reject(request.error);unlisten()};request.addEventListener("success",success);request.addEventListener("error",error)}));promise.then((value=>{if(value instanceof IDBCursor){cursorRequestMap.set(value,request)}})).catch((()=>{}));reverseTransformCache.set(promise,request);return promise}function cacheDonePromiseForTransaction(tx){if(transactionDoneMap.has(tx))return;const done=new Promise(((resolve,reject)=>{const unlisten=()=>{tx.removeEventListener("complete",complete);tx.removeEventListener("error",error);tx.removeEventListener("abort",error)};const complete=()=>{resolve();unlisten()};const error=()=>{reject(tx.error||new DOMException("AbortError","AbortError"));unlisten()};tx.addEventListener("complete",complete);tx.addEventListener("error",error);tx.addEventListener("abort",error)}));transactionDoneMap.set(tx,done)}let idbProxyTraps={get(target,prop,receiver){if(target instanceof IDBTransaction){if(prop==="done")return transactionDoneMap.get(target);if(prop==="objectStoreNames"){return target.objectStoreNames||transactionStoreNamesMap.get(target)}if(prop==="store"){return receiver.objectStoreNames[1]?undefined:receiver.objectStore(receiver.objectStoreNames[0])}}return wrap(target[prop])},set(target,prop,value){target[prop]=value;return true},has(target,prop){if(target instanceof IDBTransaction&&(prop==="done"||prop==="store")){return true}return prop in target}};function replaceTraps(callback){idbProxyTraps=callback(idbProxyTraps)}function wrapFunction(func){if(func===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)){return function(storeNames,...args){const tx=func.call(unwrap(this),storeNames,...args);transactionStoreNamesMap.set(tx,storeNames.sort?storeNames.sort():[storeNames]);return wrap(tx)}}if(getCursorAdvanceMethods().includes(func)){return function(...args){func.apply(unwrap(this),args);return wrap(cursorRequestMap.get(this))}}return function(...args){return wrap(func.apply(unwrap(this),args))}}function transformCachableValue(value){if(typeof value==="function")return wrapFunction(value);if(value instanceof IDBTransaction)cacheDonePromiseForTransaction(value);if(instanceOfAny(value,getIdbProxyableTypes()))return new Proxy(value,idbProxyTraps);return value}function wrap(value){if(value instanceof IDBRequest)return promisifyRequest(value);if(transformCache.has(value))return transformCache.get(value);const newValue=transformCachableValue(value);if(newValue!==value){transformCache.set(value,newValue);reverseTransformCache.set(newValue,value)}return newValue}const unwrap=value=>reverseTransformCache.get(value);function openDB(name,version,{blocked,upgrade,blocking,terminated}={}){const request=indexedDB.open(name,version);const openPromise=wrap(request);if(upgrade){request.addEventListener("upgradeneeded",(event=>{upgrade(wrap(request.result),event.oldVersion,event.newVersion,wrap(request.transaction),event)}))}if(blocked){request.addEventListener("blocked",(event=>blocked(event.oldVersion,event.newVersion,event)))}openPromise.then((db=>{if(terminated)db.addEventListener("close",(()=>terminated()));if(blocking){db.addEventListener("versionchange",(event=>blocking(event.oldVersion,event.newVersion,event)))}})).catch((()=>{}));return openPromise}function deleteDB(name,{blocked}={}){const request=indexedDB.deleteDatabase(name);if(blocked){request.addEventListener("blocked",(event=>blocked(event.oldVersion,event)))}return wrap(request).then((()=>undefined))}const readMethods=["get","getKey","getAll","getAllKeys","count"];const writeMethods=["put","add","delete","clear"];const cachedMethods=new Map;function getMethod(target,prop){if(!(target instanceof IDBDatabase&&!(prop in target)&&typeof prop==="string")){return}if(cachedMethods.get(prop))return cachedMethods.get(prop);const targetFuncName=prop.replace(/FromIndex$/,"");const useIndex=prop!==targetFuncName;const isWrite=writeMethods.includes(targetFuncName);if(!(targetFuncName in(useIndex?IDBIndex:IDBObjectStore).prototype)||!(isWrite||readMethods.includes(targetFuncName))){return}const method=async function(storeName,...args){const tx=this.transaction(storeName,isWrite?"readwrite":"readonly");let target=tx.store;if(useIndex)target=target.index(args.shift());return(await Promise.all([target[targetFuncName](...args),isWrite&&tx.done]))[0]};cachedMethods.set(prop,method);return method}replaceTraps((oldTraps=>({...oldTraps,get:(target,prop,receiver)=>getMethod(target,prop)||oldTraps.get(target,prop,receiver),has:(target,prop)=>!!getMethod(target,prop)||oldTraps.has(target,prop)})));var workbox_expiration_version=__webpack_require__(324);const DB_NAME="workbox-expiration";const CACHE_OBJECT_STORE="cache-entries";const normalizeURL=unNormalizedUrl=>{const url=new URL(unNormalizedUrl,location.href);url.hash="";return url.href};class CacheTimestampsModel{constructor(cacheName){this._db=null;this._cacheName=cacheName}_upgradeDb(db){const objStore=db.createObjectStore(CACHE_OBJECT_STORE,{keyPath:"id"});objStore.createIndex("cacheName","cacheName",{unique:false});objStore.createIndex("timestamp","timestamp",{unique:false})}_upgradeDbAndDeleteOldDbs(db){this._upgradeDb(db);if(this._cacheName){void deleteDB(this._cacheName)}}async setTimestamp(url,timestamp){url=normalizeURL(url);const entry={url,timestamp,cacheName:this._cacheName,id:this._getId(url)};const db=await this.getDb();const tx=db.transaction(CACHE_OBJECT_STORE,"readwrite",{durability:"relaxed"});await tx.store.put(entry);await tx.done}async getTimestamp(url){const db=await this.getDb();const entry=await db.get(CACHE_OBJECT_STORE,this._getId(url));return entry===null||entry===void 0?void 0:entry.timestamp}async expireEntries(minTimestamp,maxCount){const db=await this.getDb();let cursor=await db.transaction(CACHE_OBJECT_STORE).store.index("timestamp").openCursor(null,"prev");const entriesToDelete=[];let entriesNotDeletedCount=0;while(cursor){const result=cursor.value;if(result.cacheName===this._cacheName){if(minTimestamp&&result.timestamp<minTimestamp||maxCount&&entriesNotDeletedCount>=maxCount){entriesToDelete.push(cursor.value)}else{entriesNotDeletedCount++}}cursor=await cursor.continue()}const urlsDeleted=[];for(const entry of entriesToDelete){await db.delete(CACHE_OBJECT_STORE,entry.id);urlsDeleted.push(entry.url)}return urlsDeleted}_getId(url){return this._cacheName+"|"+normalizeURL(url)}async getDb(){if(!this._db){this._db=await openDB(DB_NAME,1,{upgrade:this._upgradeDbAndDeleteOldDbs.bind(this)})}return this._db}}class CacheExpiration{constructor(cacheName,config={}){this._isRunning=false;this._rerunRequested=false;if(false){}this._maxEntries=config.maxEntries;this._maxAgeSeconds=config.maxAgeSeconds;this._matchOptions=config.matchOptions;this._cacheName=cacheName;this._timestampModel=new CacheTimestampsModel(cacheName)}async expireEntries(){if(this._isRunning){this._rerunRequested=true;return}this._isRunning=true;const minTimestamp=this._maxAgeSeconds?Date.now()-this._maxAgeSeconds*1e3:0;const urlsExpired=await this._timestampModel.expireEntries(minTimestamp,this._maxEntries);const cache=await self.caches.open(this._cacheName);for(const url of urlsExpired){await cache.delete(url,this._matchOptions)}if(false){}this._isRunning=false;if(this._rerunRequested){this._rerunRequested=false;dontWaitFor(this.expireEntries())}}async updateTimestamp(url){if(false){}await this._timestampModel.setTimestamp(url,Date.now())}async isURLExpired(url){if(!this._maxAgeSeconds){if(false){}return false}else{const timestamp=await this._timestampModel.getTimestamp(url);const expireOlderThan=Date.now()-this._maxAgeSeconds*1e3;return timestamp!==undefined?timestamp<expireOlderThan:true}}async delete(){this._rerunRequested=false;await this._timestampModel.expireEntries(Infinity)}}const _cacheNameDetails={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:typeof registration!=="undefined"?registration.scope:""};const _createCacheName=cacheName=>[_cacheNameDetails.prefix,cacheName,_cacheNameDetails.suffix].filter((value=>value&&value.length>0)).join("-");const eachCacheNameDetail=fn=>{for(const key of Object.keys(_cacheNameDetails)){fn(key)}};const cacheNames_cacheNames={updateDetails:details=>{eachCacheNameDetail((key=>{if(typeof details[key]==="string"){_cacheNameDetails[key]=details[key]}}))},getGoogleAnalyticsName:userCacheName=>userCacheName||_createCacheName(_cacheNameDetails.googleAnalytics),getPrecacheName:userCacheName=>userCacheName||_createCacheName(_cacheNameDetails.precache),getPrefix:()=>_cacheNameDetails.prefix,getRuntimeName:userCacheName=>userCacheName||_createCacheName(_cacheNameDetails.runtime),getSuffix:()=>_cacheNameDetails.suffix};const getFriendlyURL=url=>{const urlObj=new URL(String(url),location.href);return urlObj.href.replace(new RegExp(`^${location.origin}`),"")};const quotaErrorCallbacks=new Set;function registerQuotaErrorCallback(callback){if(false){}quotaErrorCallbacks.add(callback);if(false){}}class ExpirationPlugin{constructor(config={}){this.cachedResponseWillBeUsed=async({event,request,cacheName,cachedResponse})=>{if(!cachedResponse){return null}const isFresh=this._isResponseDateFresh(cachedResponse);const cacheExpiration=this._getCacheExpiration(cacheName);dontWaitFor(cacheExpiration.expireEntries());const updateTimestampDone=cacheExpiration.updateTimestamp(request.url);if(event){try{event.waitUntil(updateTimestampDone)}catch(error){if(false){}}}return isFresh?cachedResponse:null};this.cacheDidUpdate=async({cacheName,request})=>{if(false){}const cacheExpiration=this._getCacheExpiration(cacheName);await cacheExpiration.updateTimestamp(request.url);await cacheExpiration.expireEntries()};if(false){}this._config=config;this._maxAgeSeconds=config.maxAgeSeconds;this._cacheExpirations=new Map;if(config.purgeOnQuotaError){registerQuotaErrorCallback((()=>this.deleteCacheAndMetadata()))}}_getCacheExpiration(cacheName){if(cacheName===cacheNames_cacheNames.getRuntimeName()){throw new WorkboxError_WorkboxError("expire-custom-caches-only")}let cacheExpiration=this._cacheExpirations.get(cacheName);if(!cacheExpiration){cacheExpiration=new CacheExpiration(cacheName,this._config);this._cacheExpirations.set(cacheName,cacheExpiration)}return cacheExpiration}_isResponseDateFresh(cachedResponse){if(!this._maxAgeSeconds){return true}const dateHeaderTimestamp=this._getDateHeaderTimestamp(cachedResponse);if(dateHeaderTimestamp===null){return true}const now=Date.now();return dateHeaderTimestamp>=now-this._maxAgeSeconds*1e3}_getDateHeaderTimestamp(cachedResponse){if(!cachedResponse.headers.has("date")){return null}const dateHeader=cachedResponse.headers.get("date");const parsedDate=new Date(dateHeader);const headerTime=parsedDate.getTime();if(isNaN(headerTime)){return null}return headerTime}async deleteCacheAndMetadata(){for(const[cacheName,cacheExpiration]of this._cacheExpirations){await self.caches.delete(cacheName);await cacheExpiration.delete()}this._cacheExpirations=new Map}}function waitUntil(event,asyncFn){const returnPromise=asyncFn();event.waitUntil(returnPromise);return returnPromise}var workbox_precaching_version=__webpack_require__(289);const REVISION_SEARCH_PARAM="__WB_REVISION__";function createCacheKey(entry){if(!entry){throw new WorkboxError_WorkboxError("add-to-cache-list-unexpected-type",{entry})}if(typeof entry==="string"){const urlObject=new URL(entry,location.href);return{cacheKey:urlObject.href,url:urlObject.href}}const{revision,url}=entry;if(!url){throw new WorkboxError_WorkboxError("add-to-cache-list-unexpected-type",{entry})}if(!revision){const urlObject=new URL(url,location.href);return{cacheKey:urlObject.href,url:urlObject.href}}const cacheKeyURL=new URL(url,location.href);const originalURL=new URL(url,location.href);cacheKeyURL.searchParams.set(REVISION_SEARCH_PARAM,revision);return{cacheKey:cacheKeyURL.href,url:originalURL.href}}class PrecacheInstallReportPlugin{constructor(){this.updatedURLs=[];this.notUpdatedURLs=[];this.handlerWillStart=async({request,state})=>{if(state){state.originalRequest=request}};this.cachedResponseWillBeUsed=async({event,state,cachedResponse})=>{if(event.type==="install"){if(state&&state.originalRequest&&state.originalRequest instanceof Request){const url=state.originalRequest.url;if(cachedResponse){this.notUpdatedURLs.push(url)}else{this.updatedURLs.push(url)}}}return cachedResponse}}}class PrecacheCacheKeyPlugin{constructor({precacheController}){this.cacheKeyWillBeUsed=async({request,params})=>{const cacheKey=(params===null||params===void 0?void 0:params.cacheKey)||this._precacheController.getCacheKeyForURL(request.url);return cacheKey?new Request(cacheKey,{headers:request.headers}):request};this._precacheController=precacheController}}const logGroup=(groupTitle,deletedURLs)=>{logger.groupCollapsed(groupTitle);for(const url of deletedURLs){logger.log(url)}logger.groupEnd()};function printCleanupDetails(deletedURLs){const deletionCount=deletedURLs.length;if(deletionCount>0){logger.groupCollapsed(`During precaching cleanup, `+`${deletionCount} cached `+`request${deletionCount===1?" was":"s were"} deleted.`);logGroup("Deleted Cache Requests",deletedURLs);logger.groupEnd()}}function _nestedGroup(groupTitle,urls){if(urls.length===0){return}logger.groupCollapsed(groupTitle);for(const url of urls){logger.log(url)}logger.groupEnd()}function printInstallDetails(urlsToPrecache,urlsAlreadyPrecached){const precachedCount=urlsToPrecache.length;const alreadyPrecachedCount=urlsAlreadyPrecached.length;if(precachedCount||alreadyPrecachedCount){let message=`Precaching ${precachedCount} file${precachedCount===1?"":"s"}.`;if(alreadyPrecachedCount>0){message+=` ${alreadyPrecachedCount} `+`file${alreadyPrecachedCount===1?" is":"s are"} already cached.`}logger.groupCollapsed(message);_nestedGroup(`View newly precached URLs.`,urlsToPrecache);_nestedGroup(`View previously precached URLs.`,urlsAlreadyPrecached);logger.groupEnd()}}let supportStatus;function canConstructResponseFromBodyStream(){if(supportStatus===undefined){const testResponse=new Response("");if("body"in testResponse){try{new Response(testResponse.body);supportStatus=true}catch(error){supportStatus=false}}supportStatus=false}return supportStatus}async function copyResponse(response,modifier){let origin=null;if(response.url){const responseURL=new URL(response.url);origin=responseURL.origin}if(origin!==self.location.origin){throw new WorkboxError_WorkboxError("cross-origin-copy-response",{origin})}const clonedResponse=response.clone();const responseInit={headers:new Headers(clonedResponse.headers),status:clonedResponse.status,statusText:clonedResponse.statusText};const modifiedResponseInit=modifier?modifier(responseInit):responseInit;const body=canConstructResponseFromBodyStream()?clonedResponse.body:await clonedResponse.blob();return new Response(body,modifiedResponseInit)}function stripParams(fullURL,ignoreParams){const strippedURL=new URL(fullURL);for(const param of ignoreParams){strippedURL.searchParams.delete(param)}return strippedURL.href}async function cacheMatchIgnoreParams(cache,request,ignoreParams,matchOptions){const strippedRequestURL=stripParams(request.url,ignoreParams);if(request.url===strippedRequestURL){return cache.match(request,matchOptions)}const keysOptions=Object.assign(Object.assign({},matchOptions),{ignoreSearch:true});const cacheKeys=await cache.keys(request,keysOptions);for(const cacheKey of cacheKeys){const strippedCacheKeyURL=stripParams(cacheKey.url,ignoreParams);if(strippedRequestURL===strippedCacheKeyURL){return cache.match(cacheKey,matchOptions)}}return}class Deferred{constructor(){this.promise=new Promise(((resolve,reject)=>{this.resolve=resolve;this.reject=reject}))}}async function executeQuotaErrorCallbacks(){if(false){}for(const callback of quotaErrorCallbacks){await callback();if(false){}}if(false){}}function timeout(ms){return new Promise((resolve=>setTimeout(resolve,ms)))}var workbox_strategies_version=__webpack_require__(884);function toRequest(input){return typeof input==="string"?new Request(input):input}class StrategyHandler{constructor(strategy,options){this._cacheKeys={};if(false){}Object.assign(this,options);this.event=options.event;this._strategy=strategy;this._handlerDeferred=new Deferred;this._extendLifetimePromises=[];this._plugins=[...strategy.plugins];this._pluginStateMap=new Map;for(const plugin of this._plugins){this._pluginStateMap.set(plugin,{})}this.event.waitUntil(this._handlerDeferred.promise)}async fetch(input){const{event}=this;let request=toRequest(input);if(request.mode==="navigate"&&event instanceof FetchEvent&&event.preloadResponse){const possiblePreloadResponse=await event.preloadResponse;if(possiblePreloadResponse){if(false){}return possiblePreloadResponse}}const originalRequest=this.hasCallback("fetchDidFail")?request.clone():null;try{for(const cb of this.iterateCallbacks("requestWillFetch")){request=await cb({request:request.clone(),event})}}catch(err){if(err instanceof Error){throw new WorkboxError_WorkboxError("plugin-error-request-will-fetch",{thrownErrorMessage:err.message})}}const pluginFilteredRequest=request.clone();try{let fetchResponse;fetchResponse=await fetch(request,request.mode==="navigate"?undefined:this._strategy.fetchOptions);if(false){}for(const callback of this.iterateCallbacks("fetchDidSucceed")){fetchResponse=await callback({event,request:pluginFilteredRequest,response:fetchResponse})}return fetchResponse}catch(error){if(false){}if(originalRequest){await this.runCallbacks("fetchDidFail",{error,event,originalRequest:originalRequest.clone(),request:pluginFilteredRequest.clone()})}throw error}}async fetchAndCachePut(input){const response=await this.fetch(input);const responseClone=response.clone();void this.waitUntil(this.cachePut(input,responseClone));return response}async cacheMatch(key){const request=toRequest(key);let cachedResponse;const{cacheName,matchOptions}=this._strategy;const effectiveRequest=await this.getCacheKey(request,"read");const multiMatchOptions=Object.assign(Object.assign({},matchOptions),{cacheName});cachedResponse=await caches.match(effectiveRequest,multiMatchOptions);if(false){}for(const callback of this.iterateCallbacks("cachedResponseWillBeUsed")){cachedResponse=await callback({cacheName,matchOptions,cachedResponse,request:effectiveRequest,event:this.event})||undefined}return cachedResponse}async cachePut(key,response){const request=toRequest(key);await timeout(0);const effectiveRequest=await this.getCacheKey(request,"write");if(false){}if(!response){if(false){}throw new WorkboxError_WorkboxError("cache-put-with-no-response",{url:getFriendlyURL(effectiveRequest.url)})}const responseToCache=await this._ensureResponseSafeToCache(response);if(!responseToCache){if(false){}return false}const{cacheName,matchOptions}=this._strategy;const cache=await self.caches.open(cacheName);const hasCacheUpdateCallback=this.hasCallback("cacheDidUpdate");const oldResponse=hasCacheUpdateCallback?await cacheMatchIgnoreParams(cache,effectiveRequest.clone(),["__WB_REVISION__"],matchOptions):null;if(false){}try{await cache.put(effectiveRequest,hasCacheUpdateCallback?responseToCache.clone():responseToCache)}catch(error){if(error instanceof Error){if(error.name==="QuotaExceededError"){await executeQuotaErrorCallbacks()}throw error}}for(const callback of this.iterateCallbacks("cacheDidUpdate")){await callback({cacheName,oldResponse,newResponse:responseToCache.clone(),request:effectiveRequest,event:this.event})}return true}async getCacheKey(request,mode){const key=`${request.url} | ${mode}`;if(!this._cacheKeys[key]){let effectiveRequest=request;for(const callback of this.iterateCallbacks("cacheKeyWillBeUsed")){effectiveRequest=toRequest(await callback({mode,request:effectiveRequest,event:this.event,params:this.params}))}this._cacheKeys[key]=effectiveRequest}return this._cacheKeys[key]}hasCallback(name){for(const plugin of this._strategy.plugins){if(name in plugin){return true}}return false}async runCallbacks(name,param){for(const callback of this.iterateCallbacks(name)){await callback(param)}}*iterateCallbacks(name){for(const plugin of this._strategy.plugins){if(typeof plugin[name]==="function"){const state=this._pluginStateMap.get(plugin);const statefulCallback=param=>{const statefulParam=Object.assign(Object.assign({},param),{state});return plugin[name](statefulParam)};yield statefulCallback}}}waitUntil(promise){this._extendLifetimePromises.push(promise);return promise}async doneWaiting(){let promise;while(promise=this._extendLifetimePromises.shift()){await promise}}destroy(){this._handlerDeferred.resolve(null)}async _ensureResponseSafeToCache(response){let responseToCache=response;let pluginsUsed=false;for(const callback of this.iterateCallbacks("cacheWillUpdate")){responseToCache=await callback({request:this.request,response:responseToCache,event:this.event})||undefined;pluginsUsed=true;if(!responseToCache){break}}if(!pluginsUsed){if(responseToCache&&responseToCache.status!==200){responseToCache=undefined}if(false){}}return responseToCache}}class Strategy_Strategy{constructor(options={}){this.cacheName=cacheNames_cacheNames.getRuntimeName(options.cacheName);this.plugins=options.plugins||[];this.fetchOptions=options.fetchOptions;this.matchOptions=options.matchOptions}handle(options){const[responseDone]=this.handleAll(options);return responseDone}handleAll(options){if(options instanceof FetchEvent){options={event:options,request:options.request}}const event=options.event;const request=typeof options.request==="string"?new Request(options.request):options.request;const params="params"in options?options.params:undefined;const handler=new StrategyHandler(this,{event,request,params});const responseDone=this._getResponse(handler,request,event);const handlerDone=this._awaitComplete(responseDone,handler,request,event);return[responseDone,handlerDone]}async _getResponse(handler,request,event){await handler.runCallbacks("handlerWillStart",{event,request});let response=undefined;try{response=await this._handle(request,handler);if(!response||response.type==="error"){throw new WorkboxError_WorkboxError("no-response",{url:request.url})}}catch(error){if(error instanceof Error){for(const callback of handler.iterateCallbacks("handlerDidError")){response=await callback({error,event,request});if(response){break}}}if(!response){throw error}else if(false){}}for(const callback of handler.iterateCallbacks("handlerWillRespond")){response=await callback({event,request,response})}return response}async _awaitComplete(responseDone,handler,request,event){let response;let error;try{response=await responseDone}catch(error){}try{await handler.runCallbacks("handlerDidRespond",{event,request,response});await handler.doneWaiting()}catch(waitUntilError){if(waitUntilError instanceof Error){error=waitUntilError}}await handler.runCallbacks("handlerDidComplete",{event,request,response,error});handler.destroy();if(error){throw error}}}class PrecacheStrategy extends Strategy_Strategy{constructor(options={}){options.cacheName=cacheNames_cacheNames.getPrecacheName(options.cacheName);super(options);this._fallbackToNetwork=options.fallbackToNetwork===false?false:true;this.plugins.push(PrecacheStrategy.copyRedirectedCacheableResponsesPlugin)}async _handle(request,handler){const response=await handler.cacheMatch(request);if(response){return response}if(handler.event&&handler.event.type==="install"){return await this._handleInstall(request,handler)}return await this._handleFetch(request,handler)}async _handleFetch(request,handler){let response;const params=handler.params||{};if(this._fallbackToNetwork){if(false){}const integrityInManifest=params.integrity;const integrityInRequest=request.integrity;const noIntegrityConflict=!integrityInRequest||integrityInRequest===integrityInManifest;response=await handler.fetch(new Request(request,{integrity:request.mode!=="no-cors"?integrityInRequest||integrityInManifest:undefined}));if(integrityInManifest&&noIntegrityConflict&&request.mode!=="no-cors"){this._useDefaultCacheabilityPluginIfNeeded();const wasCached=await handler.cachePut(request,response.clone());if(false){}}}else{throw new WorkboxError_WorkboxError("missing-precache-entry",{cacheName:this.cacheName,url:request.url})}if(false){}return response}async _handleInstall(request,handler){this._useDefaultCacheabilityPluginIfNeeded();const response=await handler.fetch(request);const wasCached=await handler.cachePut(request,response.clone());if(!wasCached){throw new WorkboxError_WorkboxError("bad-precaching-response",{url:request.url,status:response.status})}return response}_useDefaultCacheabilityPluginIfNeeded(){let defaultPluginIndex=null;let cacheWillUpdatePluginCount=0;for(const[index,plugin]of this.plugins.entries()){if(plugin===PrecacheStrategy.copyRedirectedCacheableResponsesPlugin){continue}if(plugin===PrecacheStrategy.defaultPrecacheCacheabilityPlugin){defaultPluginIndex=index}if(plugin.cacheWillUpdate){cacheWillUpdatePluginCount++}}if(cacheWillUpdatePluginCount===0){this.plugins.push(PrecacheStrategy.defaultPrecacheCacheabilityPlugin)}else if(cacheWillUpdatePluginCount>1&&defaultPluginIndex!==null){this.plugins.splice(defaultPluginIndex,1)}}}PrecacheStrategy.defaultPrecacheCacheabilityPlugin={async cacheWillUpdate({response}){if(!response||response.status>=400){return null}return response}};PrecacheStrategy.copyRedirectedCacheableResponsesPlugin={async cacheWillUpdate({response}){return response.redirected?await copyResponse(response):response}};class PrecacheController{constructor({cacheName,plugins=[],fallbackToNetwork=true}={}){this._urlsToCacheKeys=new Map;this._urlsToCacheModes=new Map;this._cacheKeysToIntegrities=new Map;this._strategy=new PrecacheStrategy({cacheName:cacheNames_cacheNames.getPrecacheName(cacheName),plugins:[...plugins,new PrecacheCacheKeyPlugin({precacheController:this})],fallbackToNetwork});this.install=this.install.bind(this);this.activate=this.activate.bind(this)}get strategy(){return this._strategy}precache(entries){this.addToCacheList(entries);if(!this._installAndActiveListenersAdded){self.addEventListener("install",this.install);self.addEventListener("activate",this.activate);this._installAndActiveListenersAdded=true}}addToCacheList(entries){if(false){}const urlsToWarnAbout=[];for(const entry of entries){if(typeof entry==="string"){urlsToWarnAbout.push(entry)}else if(entry&&entry.revision===undefined){urlsToWarnAbout.push(entry.url)}const{cacheKey,url}=createCacheKey(entry);const cacheMode=typeof entry!=="string"&&entry.revision?"reload":"default";if(this._urlsToCacheKeys.has(url)&&this._urlsToCacheKeys.get(url)!==cacheKey){throw new WorkboxError_WorkboxError("add-to-cache-list-conflicting-entries",{firstEntry:this._urlsToCacheKeys.get(url),secondEntry:cacheKey})}if(typeof entry!=="string"&&entry.integrity){if(this._cacheKeysToIntegrities.has(cacheKey)&&this._cacheKeysToIntegrities.get(cacheKey)!==entry.integrity){throw new WorkboxError_WorkboxError("add-to-cache-list-conflicting-integrities",{url})}this._cacheKeysToIntegrities.set(cacheKey,entry.integrity)}this._urlsToCacheKeys.set(url,cacheKey);this._urlsToCacheModes.set(url,cacheMode);if(urlsToWarnAbout.length>0){const warningMessage=`Workbox is precaching URLs without revision `+`info: ${urlsToWarnAbout.join(", ")}\nThis is generally NOT safe. `+`Learn more at https://bit.ly/wb-precache`;if(true){console.warn(warningMessage)}else{}}}}install(event){return waitUntil(event,(async()=>{const installReportPlugin=new PrecacheInstallReportPlugin;this.strategy.plugins.push(installReportPlugin);for(const[url,cacheKey]of this._urlsToCacheKeys){const integrity=this._cacheKeysToIntegrities.get(cacheKey);const cacheMode=this._urlsToCacheModes.get(url);const request=new Request(url,{integrity,cache:cacheMode,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey},request,event}))}const{updatedURLs,notUpdatedURLs}=installReportPlugin;if(false){}return{updatedURLs,notUpdatedURLs}}))}activate(event){return waitUntil(event,(async()=>{const cache=await self.caches.open(this.strategy.cacheName);const currentlyCachedRequests=await cache.keys();const expectedCacheKeys=new Set(this._urlsToCacheKeys.values());const deletedURLs=[];for(const request of currentlyCachedRequests){if(!expectedCacheKeys.has(request.url)){await cache.delete(request);deletedURLs.push(request.url)}}if(false){}return{deletedURLs}}))}getURLsToCacheKeys(){return this._urlsToCacheKeys}getCachedURLs(){return[...this._urlsToCacheKeys.keys()]}getCacheKeyForURL(url){const urlObject=new URL(url,location.href);return this._urlsToCacheKeys.get(urlObject.href)}getIntegrityForCacheKey(cacheKey){return this._cacheKeysToIntegrities.get(cacheKey)}async matchPrecache(request){const url=request instanceof Request?request.url:request;const cacheKey=this.getCacheKeyForURL(url);if(cacheKey){const cache=await self.caches.open(this.strategy.cacheName);return cache.match(cacheKey)}return undefined}createHandlerBoundToURL(url){const cacheKey=this.getCacheKeyForURL(url);if(!cacheKey){throw new WorkboxError_WorkboxError("non-precached-url",{url})}return options=>{options.request=new Request(url);options.params=Object.assign({cacheKey},options.params);return this.strategy.handle(options)}}}let precacheController;const getOrCreatePrecacheController_getOrCreatePrecacheController=()=>{if(!precacheController){precacheController=new PrecacheController}return precacheController};function addPlugins(plugins){const precacheController=getOrCreatePrecacheController();precacheController.strategy.plugins.push(...plugins)}var workbox_routing_version=__webpack_require__(325);const defaultMethod="GET";const validMethods=null&&["DELETE","GET","HEAD","PATCH","POST","PUT"];const normalizeHandler=handler=>{if(handler&&typeof handler==="object"){if(false){}return handler}else{if(false){}return{handle:handler}}};class Route{constructor(match,handler,method=defaultMethod){if(false){}this.handler=normalizeHandler(handler);this.match=match;this.method=method}setCatchHandler(handler){this.catchHandler=normalizeHandler(handler)}}class RegExpRoute extends Route{constructor(regExp,handler,method){if(false){}const match=({url})=>{const result=regExp.exec(url.href);if(!result){return}if(url.origin!==location.origin&&result.index!==0){if(false){}return}return result.slice(1)};super(match,handler,method)}}class Router{constructor(){this._routes=new Map;this._defaultHandlerMap=new Map}get routes(){return this._routes}addFetchListener(){self.addEventListener("fetch",(event=>{const{request}=event;const responsePromise=this.handleRequest({request,event});if(responsePromise){event.respondWith(responsePromise)}}))}addCacheListener(){self.addEventListener("message",(event=>{if(event.data&&event.data.type==="CACHE_URLS"){const{payload}=event.data;if(false){}const requestPromises=Promise.all(payload.urlsToCache.map((entry=>{if(typeof entry==="string"){entry=[entry]}const request=new Request(...entry);return this.handleRequest({request,event})})));event.waitUntil(requestPromises);if(event.ports&&event.ports[0]){void requestPromises.then((()=>event.ports[0].postMessage(true)))}}}))}handleRequest({request,event}){if(false){}const url=new URL(request.url,location.href);if(!url.protocol.startsWith("http")){if(false){}return}const sameOrigin=url.origin===location.origin;const{params,route}=this.findMatchingRoute({event,request,sameOrigin,url});let handler=route&&route.handler;const debugMessages=[];if(false){}const method=request.method;if(!handler&&this._defaultHandlerMap.has(method)){if(false){}handler=this._defaultHandlerMap.get(method)}if(!handler){if(false){}return}if(false){}let responsePromise;try{responsePromise=handler.handle({url,request,event,params})}catch(err){responsePromise=Promise.reject(err)}const catchHandler=route&&route.catchHandler;if(responsePromise instanceof Promise&&(this._catchHandler||catchHandler)){responsePromise=responsePromise.catch((async err=>{if(catchHandler){if(false){}try{return await catchHandler.handle({url,request,event,params})}catch(catchErr){if(catchErr instanceof Error){err=catchErr}}}if(this._catchHandler){if(false){}return this._catchHandler.handle({url,request,event})}throw err}))}return responsePromise}findMatchingRoute({url,sameOrigin,request,event}){const routes=this._routes.get(request.method)||[];for(const route of routes){let params;const matchResult=route.match({url,sameOrigin,request,event});if(matchResult){if(false){}params=matchResult;if(Array.isArray(params)&¶ms.length===0){params=undefined}else if(matchResult.constructor===Object&&Object.keys(matchResult).length===0){params=undefined}else if(typeof matchResult==="boolean"){params=undefined}return{route,params}}}return{}}setDefaultHandler(handler,method=defaultMethod){this._defaultHandlerMap.set(method,normalizeHandler(handler))}setCatchHandler(handler){this._catchHandler=normalizeHandler(handler)}registerRoute(route){if(false){}if(!this._routes.has(route.method)){this._routes.set(route.method,[])}this._routes.get(route.method).push(route)}unregisterRoute(route){if(!this._routes.has(route.method)){throw new WorkboxError_WorkboxError("unregister-route-but-not-found-with-method",{method:route.method})}const routeIndex=this._routes.get(route.method).indexOf(route);if(routeIndex>-1){this._routes.get(route.method).splice(routeIndex,1)}else{throw new WorkboxError_WorkboxError("unregister-route-route-not-registered")}}}let defaultRouter;const getOrCreateDefaultRouter_getOrCreateDefaultRouter=()=>{if(!defaultRouter){defaultRouter=new Router;defaultRouter.addFetchListener();defaultRouter.addCacheListener()}return defaultRouter};function registerRoute(capture,handler,method){let route;if(typeof capture==="string"){const captureUrl=new URL(capture,location.href);if(false){}const matchCallback=({url})=>{if(false){}return url.href===captureUrl.href};route=new Route(matchCallback,handler,method)}else if(capture instanceof RegExp){route=new RegExpRoute(capture,handler,method)}else if(typeof capture==="function"){route=new Route(capture,handler,method)}else if(capture instanceof Route){route=capture}else{throw new WorkboxError_WorkboxError("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"})}const defaultRouter=getOrCreateDefaultRouter_getOrCreateDefaultRouter();defaultRouter.registerRoute(route);return route}function removeIgnoredSearchParams(urlObject,ignoreURLParametersMatching=[]){for(const paramName of[...urlObject.searchParams.keys()]){if(ignoreURLParametersMatching.some((regExp=>regExp.test(paramName)))){urlObject.searchParams.delete(paramName)}}return urlObject}function*generateURLVariations(url,{ignoreURLParametersMatching=[/^utm_/,/^fbclid$/],directoryIndex="index.html",cleanURLs=true,urlManipulation}={}){const urlObject=new URL(url,location.href);urlObject.hash="";yield urlObject.href;const urlWithoutIgnoredParams=removeIgnoredSearchParams(urlObject,ignoreURLParametersMatching);yield urlWithoutIgnoredParams.href;if(directoryIndex&&urlWithoutIgnoredParams.pathname.endsWith("/")){const directoryURL=new URL(urlWithoutIgnoredParams.href);directoryURL.pathname+=directoryIndex;yield directoryURL.href}if(cleanURLs){const cleanURL=new URL(urlWithoutIgnoredParams.href);cleanURL.pathname+=".html";yield cleanURL.href}if(urlManipulation){const additionalURLs=urlManipulation({url:urlObject});for(const urlToAttempt of additionalURLs){yield urlToAttempt.href}}}class PrecacheRoute extends Route{constructor(precacheController,options){const match=({request})=>{const urlsToCacheKeys=precacheController.getURLsToCacheKeys();for(const possibleURL of generateURLVariations(request.url,options)){const cacheKey=urlsToCacheKeys.get(possibleURL);if(cacheKey){const integrity=precacheController.getIntegrityForCacheKey(cacheKey);return{cacheKey,integrity}}}if(false){}return};super(match,precacheController.strategy)}}function addRoute(options){const precacheController=getOrCreatePrecacheController_getOrCreatePrecacheController();const precacheRoute=new PrecacheRoute(precacheController,options);registerRoute(precacheRoute)}const SUBSTRING_TO_FIND="-precache-";const deleteOutdatedCaches_deleteOutdatedCaches=async(currentPrecacheName,substringToFind=SUBSTRING_TO_FIND)=>{const cacheNames=await self.caches.keys();const cacheNamesToDelete=cacheNames.filter((cacheName=>cacheName.includes(substringToFind)&&cacheName.includes(self.registration.scope)&&cacheName!==currentPrecacheName));await Promise.all(cacheNamesToDelete.map((cacheName=>self.caches.delete(cacheName))));return cacheNamesToDelete};function cleanupOutdatedCaches(){self.addEventListener("activate",(event=>{const cacheName=cacheNames.getPrecacheName();event.waitUntil(deleteOutdatedCaches(cacheName).then((cachesDeleted=>{if(false){}})))}))}function createHandlerBoundToURL(url){const precacheController=getOrCreatePrecacheController();return precacheController.createHandlerBoundToURL(url)}function getCacheKeyForURL(url){const precacheController=getOrCreatePrecacheController();return precacheController.getCacheKeyForURL(url)}function matchPrecache(request){const precacheController=getOrCreatePrecacheController();return precacheController.matchPrecache(request)}function precache(entries){const precacheController=getOrCreatePrecacheController_getOrCreatePrecacheController();precacheController.precache(entries)}function precacheAndRoute(entries,options){precache(entries);addRoute(options)}class PrecacheFallbackPlugin{constructor({fallbackURL,precacheController}){this.handlerDidError=()=>this._precacheController.matchPrecache(this._fallbackURL);this._fallbackURL=fallbackURL;this._precacheController=precacheController||getOrCreatePrecacheController()}}class NavigationRoute extends Route{constructor(handler,{allowlist=[/./],denylist=[]}={}){if(false){}super((options=>this._match(options)),handler);this._allowlist=allowlist;this._denylist=denylist}_match({url,request}){if(request&&request.mode!=="navigate"){return false}const pathnameAndSearch=url.pathname+url.search;for(const regExp of this._denylist){if(regExp.test(pathnameAndSearch)){if(false){}return false}}if(this._allowlist.some((regExp=>regExp.test(pathnameAndSearch)))){if(false){}return true}if(false){}return false}}function setCatchHandler(handler){const defaultRouter=getOrCreateDefaultRouter();defaultRouter.setCatchHandler(handler)}function setDefaultHandler(handler){const defaultRouter=getOrCreateDefaultRouter();defaultRouter.setDefaultHandler(handler)}const utils_messages_messages={strategyStart:(strategyName,request)=>`Using ${strategyName} to respond to '${getFriendlyURL(request.url)}'`,printFinalResponse:response=>{if(response){logger_logger.groupCollapsed(`View the final response here.`);logger_logger.log(response||"[No response returned]");logger_logger.groupEnd()}}};class CacheFirst extends Strategy_Strategy{async _handle(request,handler){const logs=[];if(false){}let response=await handler.cacheMatch(request);let error=undefined;if(!response){if(false){}try{response=await handler.fetchAndCachePut(request)}catch(err){if(err instanceof Error){error=err}}if(false){}}else{if(false){}}if(false){}if(!response){throw new WorkboxError_WorkboxError("no-response",{url:request.url,error})}return response}}class CacheOnly extends(null&&Strategy){async _handle(request,handler){if(false){}const response=await handler.cacheMatch(request);if(false){}if(!response){throw new WorkboxError("no-response",{url:request.url})}return response}}const cacheOkAndOpaquePlugin={cacheWillUpdate:async({response})=>{if(response.status===200||response.status===0){return response}return null}};class NetworkFirst extends Strategy_Strategy{constructor(options={}){super(options);if(!this.plugins.some((p=>"cacheWillUpdate"in p))){this.plugins.unshift(cacheOkAndOpaquePlugin)}this._networkTimeoutSeconds=options.networkTimeoutSeconds||0;if(false){}}async _handle(request,handler){const logs=[];if(false){}const promises=[];let timeoutId;if(this._networkTimeoutSeconds){const{id,promise}=this._getTimeoutPromise({request,logs,handler});timeoutId=id;promises.push(promise)}const networkPromise=this._getNetworkPromise({timeoutId,request,logs,handler});promises.push(networkPromise);const response=await handler.waitUntil((async()=>await handler.waitUntil(Promise.race(promises))||await networkPromise)());if(false){}if(!response){throw new WorkboxError_WorkboxError("no-response",{url:request.url})}return response}_getTimeoutPromise({request,logs,handler}){let timeoutId;const timeoutPromise=new Promise((resolve=>{const onNetworkTimeout=async()=>{if(false){}resolve(await handler.cacheMatch(request))};timeoutId=setTimeout(onNetworkTimeout,this._networkTimeoutSeconds*1e3)}));return{promise:timeoutPromise,id:timeoutId}}async _getNetworkPromise({timeoutId,request,logs,handler}){let error;let response;try{response=await handler.fetchAndCachePut(request)}catch(fetchError){if(fetchError instanceof Error){error=fetchError}}if(timeoutId){clearTimeout(timeoutId)}if(false){}if(error||!response){response=await handler.cacheMatch(request);if(false){}}return response}}class NetworkOnly extends Strategy_Strategy{constructor(options={}){super(options);this._networkTimeoutSeconds=options.networkTimeoutSeconds||0}async _handle(request,handler){if(false){}let error=undefined;let response;try{const promises=[handler.fetch(request)];if(this._networkTimeoutSeconds){const timeoutPromise=timeout(this._networkTimeoutSeconds*1e3);promises.push(timeoutPromise)}response=await Promise.race(promises);if(!response){throw new Error(`Timed out the network response after `+`${this._networkTimeoutSeconds} seconds.`)}}catch(err){if(err instanceof Error){error=err}}if(false){}if(!response){throw new WorkboxError_WorkboxError("no-response",{url:request.url,error})}return response}}class StaleWhileRevalidate extends Strategy_Strategy{constructor(options={}){super(options);if(!this.plugins.some((p=>"cacheWillUpdate"in p))){this.plugins.unshift(cacheOkAndOpaquePlugin)}}async _handle(request,handler){const logs=[];if(false){}const fetchAndCachePromise=handler.fetchAndCachePut(request).catch((()=>{}));void handler.waitUntil(fetchAndCachePromise);let response=await handler.cacheMatch(request);let error;if(response){if(false){}}else{if(false){}try{response=await fetchAndCachePromise}catch(err){if(err instanceof Error){error=err}}}if(false){}if(!response){throw new WorkboxError_WorkboxError("no-response",{url:request.url,error})}return response}}const manifest=[{'revision':'7b8f8981b67d0912c08d99f65f46d9f1','url':'client.js'},{'revision':'30edb279985669f9bd29a86afdec05ef','url':'index.html'}];precacheAndRoute(manifest.filter((entry=>entry.url!=="/index.html")));registerRoute((({url})=>url.origin===self.location.origin&&url.pathname.endsWith(".png")),new StaleWhileRevalidate({cacheName:"images",plugins:[new ExpirationPlugin({maxEntries:50})]}));self.addEventListener("message",(event=>{if(event.data&&event.data.type==="SKIP_WAITING"){self.skipWaiting()}}));let canConstructReadableStream_supportStatus;function canConstructReadableStream(){if(canConstructReadableStream_supportStatus===undefined){try{new ReadableStream({start(){}});canConstructReadableStream_supportStatus=true}catch(error){canConstructReadableStream_supportStatus=false}}return canConstructReadableStream_supportStatus}const MAX_RETRY_TIME=2e3;async function resultingClientExists(resultingClientId){if(!resultingClientId){return}let existingWindows=await self.clients.matchAll({type:"window"});const existingWindowIds=new Set(existingWindows.map((w=>w.id)));let resultingWindow;const startTime=performance.now();while(performance.now()-startTime<MAX_RETRY_TIME){existingWindows=await self.clients.matchAll({type:"window"});resultingWindow=existingWindows.find((w=>{if(resultingClientId){return w.id===resultingClientId}else{return!existingWindowIds.has(w.id)}}));if(resultingWindow){break}await timeout(100)}return resultingWindow}const workbox_core_cacheNames_cacheNames={get googleAnalytics(){return cacheNames_cacheNames.getGoogleAnalyticsName()},get precache(){return cacheNames_cacheNames.getPrecacheName()},get prefix(){return cacheNames_cacheNames.getPrefix()},get runtime(){return cacheNames_cacheNames.getRuntimeName()},get suffix(){return cacheNames_cacheNames.getSuffix()}};function clientsClaim(){self.addEventListener("activate",(()=>self.clients.claim()))}function setCacheNameDetails(details){if(false){}cacheNames.updateDetails(details)}function skipWaiting(){if(false){}void self.skipWaiting()}var workbox_broadcast_update_version=__webpack_require__(22);const responsesAreSame=(firstResponse,secondResponse,headersToCheck)=>{if(false){}const atLeastOneHeaderAvailable=headersToCheck.some((header=>firstResponse.headers.has(header)&&secondResponse.headers.has(header)));if(!atLeastOneHeaderAvailable){if(false){}return true}return headersToCheck.every((header=>{const headerStateComparison=firstResponse.headers.has(header)===secondResponse.headers.has(header);const headerValueComparison=firstResponse.headers.get(header)===secondResponse.headers.get(header);return headerStateComparison&&headerValueComparison}))};const CACHE_UPDATED_MESSAGE_TYPE="CACHE_UPDATED";const CACHE_UPDATED_MESSAGE_META="workbox-broadcast-update";const NOTIFY_ALL_CLIENTS=true;const DEFAULT_HEADERS_TO_CHECK=["content-length","etag","last-modified"];const isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);function defaultPayloadGenerator(data){return{cacheName:data.cacheName,updatedURL:data.request.url}}class BroadcastCacheUpdate{constructor({generatePayload,headersToCheck,notifyAllClients}={}){this._headersToCheck=headersToCheck||DEFAULT_HEADERS_TO_CHECK;this._generatePayload=generatePayload||defaultPayloadGenerator;this._notifyAllClients=notifyAllClients!==null&¬ifyAllClients!==void 0?notifyAllClients:NOTIFY_ALL_CLIENTS}async notifyIfUpdated(options){if(false){}if(!options.oldResponse){return}if(!responsesAreSame(options.oldResponse,options.newResponse,this._headersToCheck)){if(false){}const messageData={type:CACHE_UPDATED_MESSAGE_TYPE,meta:CACHE_UPDATED_MESSAGE_META,payload:this._generatePayload(options)};if(options.request.mode==="navigate"){let resultingClientId;if(options.event instanceof FetchEvent){resultingClientId=options.event.resultingClientId}const resultingWin=await resultingClientExists(resultingClientId);if(!resultingWin||isSafari){await timeout(3500)}}if(this._notifyAllClients){const windows=await self.clients.matchAll({type:"window"});for(const win of windows){win.postMessage(messageData)}}else{if(options.event instanceof FetchEvent){const client=await self.clients.get(options.event.clientId);client===null||client===void 0?void 0:client.postMessage(messageData)}}}}}class BroadcastUpdatePlugin{constructor(options){this.cacheDidUpdate=async options=>{dontWaitFor(this._broadcastUpdate.notifyIfUpdated(options))};this._broadcastUpdate=new BroadcastCacheUpdate(options)}}class CacheService{static getCleanURL(url){const indexOfQuery=url.indexOf("?");return indexOfQuery>0?url.substring(0,indexOfQuery):url}static async invalidateUrl(cacheName,url){try{const cache=await caches.open(cacheName);const requests=await cache.keys();requests.forEach((request=>{const cacheUrl=CacheService.getCleanURL(request.url);const urlToInvalidate=CacheService.getCleanURL(url);if(!urlToInvalidate.startsWith(cacheUrl))return;cache.delete(request)}))}catch{}}static async invalidateAll(cacheNames){cacheNames.forEach((async cacheName=>{const cache=await caches.open(cacheName);const requests=await cache.keys();requests.forEach((request=>{cache.delete(request)}))}))}static async delete(cacheName){try{await caches.delete(cacheName)}catch{}}}class CacheInvalidatePlugin{constructor({cacheName}){this.cacheName=void 0;this.cacheName=cacheName}async fetchDidSucceed({request,response}){CacheService.invalidateUrl(this.cacheName,request.url);return response}}class DedupStaleWhileRevalidateStrategy extends StaleWhileRevalidate{constructor(...args){super(...args);this.requestsInProgress=new Map}async _handle(request,handler){const requestInProgress=this.requestsInProgress.get(request.url);if(requestInProgress){const dedupedResponse=await requestInProgress.promise;return dedupedResponse.clone()}let done;this.requestsInProgress.set(request.url,{promise:new Promise((resolve=>{done=resolve})),done});const response=await super._handle(request,handler);done(response.clone());this.requestsInProgress.delete(request.url);return response}}class DedupCacheFirstStrategy extends CacheFirst{constructor(...args){super(...args);this.requestsInProgress=new Map}async _handle(request,handler){const requestInProgress=this.requestsInProgress.get(request.url);if(requestInProgress){const dedupedResponse=await requestInProgress.promise;return dedupedResponse.clone()}let done;this.requestsInProgress.set(request.url,{promise:new Promise((resolve=>{done=resolve})),done});const response=await super._handle(request,handler);done(response.clone());this.requestsInProgress.delete(request.url);return response}}let ConfigEnvironment=function(ConfigEnvironment){ConfigEnvironment["DEVELOPMENT"]="development";ConfigEnvironment["SYSTEM_TEST"]="systemTest";ConfigEnvironment["TEST"]="test";ConfigEnvironment["PRODUCTION"]="production";ConfigEnvironment["LOCAL"]="local";return ConfigEnvironment}({});const HOPARA_ENV_KEY="HOPARA_ENV";class ConfigMap extends Map{constructor(newMap){super();this.environment=void 0;Object.keys(newMap).forEach((configName=>{this.set(configName,newMap[configName])}));this.setEnvFromFile();this.environment=this.getHoparaEnvironment()}setEnvFromFile(){try{var _window;if((_window=window)!==null&&_window!==void 0&&_window.__env__){Object.keys(window.__env__).map((key=>{this.set(key,{development:window.__env__[key]})}))}}catch(_){return _}}getValueFromNodeEnvironment(key){var _process$env$key;return(_process$env$key={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:undefined,WDS_SOCKET_PATH:undefined,WDS_SOCKET_PORT:undefined,FAST_REFRESH:true,REACT_APP_BUILD_NUMBER:"10188",REACT_APP_IS_EMBEDDED:"true",REACT_APP_PACKAGE_VERSION:"2.4.57"}[key])!==null&&_process$env$key!==void 0?_process$env$key:{NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:undefined,WDS_SOCKET_PATH:undefined,WDS_SOCKET_PORT:undefined,FAST_REFRESH:true,REACT_APP_BUILD_NUMBER:"10188",REACT_APP_IS_EMBEDDED:"true",REACT_APP_PACKAGE_VERSION:"2.4.57"}[`REACT_APP_${key}`]}getHoparaEnvironment(){var _this$getValueFromNod;const env=(_this$getValueFromNod=this.getValueFromNodeEnvironment(HOPARA_ENV_KEY))!==null&&_this$getValueFromNod!==void 0?_this$getValueFromNod:"production";if(!env)return ConfigEnvironment.DEVELOPMENT;if(env==="local")return ConfigEnvironment.LOCAL;if(env==="production")return ConfigEnvironment.PRODUCTION;if(env==="test")return ConfigEnvironment.TEST;if(env==="systemTest")return ConfigEnvironment.SYSTEM_TEST;return ConfigEnvironment.DEVELOPMENT}isDevelopment(){return this.environment===ConfigEnvironment.DEVELOPMENT}setEnv(env){this.environment=env}getValue(key,tenant){var _this$get,_configValues$this$en;if(key===HOPARA_ENV_KEY)return this.getHoparaEnvironment();const fromNodeEnv=this.getValueFromNodeEnvironment(key);if(fromNodeEnv)return fromNodeEnv;const tenantKey=tenant?`${tenant.toUpperCase()}_${key}`:key;const configValues=(_this$get=this.get(tenantKey))!==null&&_this$get!==void 0?_this$get:this.get(key);if(!configValues)return"";const value=(_configValues$this$en=configValues[this.environment])!==null&&_configValues$this$en!==void 0?_configValues$this$en:configValues[ConfigEnvironment.DEVELOPMENT];return typeof value==="function"?value():value}getValueAsBoolean(key,tenant){return this.getValue(key,tenant)==="true"}}const configMap={[HOPARA_ENV_KEY]:{development:"development",test:"test",production:"production",local:"local"},BUILD_NUMBER:{development:"000"},PACKAGE_VERSION:{development:"0.0.0"},AUTH_ENABLED:{development:"true"},PUBLIC_URL:{development:""},SYSTEM_TEST:{development:"false",systemTest:"true"},BASE_PATHNAME:{development:"",test:"",production:"",local:""},BASE_URL:{development:"http://localhost:3000",test:"https://test.hopara.app",production:"https://hopara.app",local:"http://localhost:3000"},VISUALIZATION_API_ADDRESS:{development:"http://localhost:8081",test:"https://visualization.test.hopara.app",production:"https://visualization.hopara.app",systemTest:"http://localhost:1234"},BFF_API_ADDRESS:{development:"http://localhost:8086",test:"https://bff.test.hopara.app",production:"https://bff.hopara.app",systemTest:"http://localhost:1234"},NOTIFICATION_API_ADDRESS:{development:"http://localhost:8085",test:"https://notification.test.hopara.app",production:"https://notification.hopara.app",systemTest:"http://localhost:1234"},DATASET_API_ADDRESS:{development:"http://localhost:8000",test:"https://dataset.test.hopara.app",production:"https://dataset.hopara.app",systemTest:"http://localhost:1234"},TEMPLATE_API_ADDRESS:{development:"http://localhost:8089",test:"https://template.test.hopara.app",production:"https://template.hopara.app",local:"https://template.hopara.app",systemTest:"http://localhost:1234"},RESOURCE_API_ADDRESS:{development:"http://localhost:2022",test:"https://resource.test.hopara.app",production:"https://resource.hopara.app",local:"https://resource.hopara.app",systemTest:"https://resource.test.hopara.app"},AUTH_API_ADDRESS:{development:"http://localhost:8088",test:"https://auth.test.hopara.app",production:"https://auth.hopara.app",local:"https://auth.hopara.app",systemTest:"http://localhost:1234"},TENANT_API_ADDRESS:{development:"http://localhost:2021",test:"https://tenant.test.hopara.app",production:"https://tenant.hopara.app",local:"https://tenant.hopara.app",systemTest:"http://localhost:1234"},IMAGES_API_ADDRESS:{development:"https://images.hopara.app"},REPORT_API_ADDRESS:{development:"https://report.test.hopara.app",production:"https://report.hopara.app"},HOPARA_THEME_MODE:{development:"HOPARA"},STYLE_INTERFACE:{development:"aphrodite"},ENABLE_MAP:{development:"true",systemTest:"false"},ARCGIS_API_TOKEN:{development:"AAPKe1f53068399740f39871d71c84e6c8ecFKw2zeYlVDGYjbtVi7cxjVAfXQCegLG-vMbhwvN1eFtdDnbHa-jSi5IMTnzUxJN4"},MAPTILER_API_TOKEN:{development:"t0AYWwS0LsMuX1Of2myK&c=adasd"},GOOGLE_MAPS_API_KEY:{development:"AIzaSyAC42qeOUIZ0j7T-b_c9MXvG3-Wtld8Be4"},DATADOG_RUM_APPLICATION_ID:{development:"f06f0e23-915e-4d89-a7d8-c2a2cc7fb558"},DATADOG_RUM_CLIENT_TOKEN:{development:"pub618fbb810aa5ce569295aadf30b70d67"},DATADOG_RUM_SITE:{development:"us5.datadoghq.com"},IS_EMBEDDED:{development:"false"},IS_TOUCH_DEVICE:{development:()=>{var _window2;return`${((_window2=window)===null||_window2===void 0?void 0:_window2.matchMedia)&&window.matchMedia("(any-hover: none)").matches}`}},IS_HEADLESS_DEVICE:{development:()=>`${navigator.webdriver||/HeadlessChrome/.test(window.navigator.userAgent)}`,test:()=>`false`,systemTest:()=>`false`},IS_SMALL_WIDTH_SCREEN:{development:()=>{var _window3;return`${((_window3=window)===null||_window3===void 0?void 0:_window3.matchMedia)&&window.matchMedia("(max-width: 767.5px)").matches}`}},IS_SMALL_HEIGHT_SCREEN:{development:()=>{var _window4;return`${((_window4=window)===null||_window4===void 0?void 0:_window4.matchMedia)&&window.matchMedia("(max-height: 520px)").matches}`}}};const Config=new ConfigMap(configMap);let ResourceCacheKey=function(ResourceCacheKey){ResourceCacheKey["ICON"]="resource-icons";ResourceCacheKey["IMAGE"]="resource-images";ResourceCacheKey["MODEL"]="resource-models";return ResourceCacheKey}({});let ResourceType=function(ResourceType){ResourceType["ICON"]="icon";ResourceType["IMAGE"]="image";ResourceType["MODEL"]="model";return ResourceType}({});const pathPosition={[ResourceType.ICON]:3,[ResourceType.IMAGE]:5,[ResourceType.MODEL]:5};const shouldIgnorePath=(splittedPath,paramPosition,allowSubPaths)=>!allowSubPaths&&splittedPath.length>paramPosition+2;const isPathOfType=(path,type,paramPosition,allowSubPaths=false)=>{const splittedPath=path.split("/");if(shouldIgnorePath(splittedPath,paramPosition,allowSubPaths))return false;return splittedPath[paramPosition]&&splittedPath[paramPosition]===type};const urlMachesResourceType=(resourceType,allowSubPaths)=>({url})=>url.origin===Config.getValue("RESOURCE_API_ADDRESS")&&isPathOfType(url.pathname,resourceType,pathPosition[resourceType],allowSubPaths);const BFF_VISUALIZATION_CACHE_KEY="bff-visualization";class CacheKeyPlugin{constructor({headers}){this.headers=void 0;this.headers=headers}getUrlWithCacheKeys(request){const cacheUrl=new URL(request.url);this.headers.forEach((header=>{cacheUrl.searchParams.set(`_header_${header}`,request.headers.get(header)||"")}));return cacheUrl.toString()}async cacheKeyWillBeUsed({request}){return this.getUrlWithCacheKeys(request)}}class PassThroughStrategy{constructor({plugins}){this.plugins=void 0;this.plugins=plugins}getHandleOptions(options){return{...options,event:options,request:typeof options.request==="string"?new Request(options.request):options.request}}executePlugins(options){const handleOptions=this.getHandleOptions(options);return Promise.all(this.plugins.map((plugin=>plugin.fetchDidSucceed({request:handleOptions.request}))))}handle(options){this.executePlugins(options);return null}}clientsClaim();self.addEventListener("install",(()=>{self.skipWaiting();const keys=[...Object.values(ResourceCacheKey),BFF_VISUALIZATION_CACHE_KEY];CacheService.invalidateAll(keys)}));registerRoute(urlMachesResourceType(ResourceType.ICON),new DedupCacheFirstStrategy({cacheName:ResourceCacheKey.ICON,plugins:[new ExpirationPlugin({maxAgeSeconds:60*60*24*7,maxEntries:2e3,purgeOnQuotaError:true,matchOptions:{ignoreVary:true}})]}),"GET");registerRoute(urlMachesResourceType(ResourceType.IMAGE),new DedupStaleWhileRevalidateStrategy({cacheName:ResourceCacheKey.IMAGE,plugins:[new ExpirationPlugin({maxEntries:50,matchOptions:{ignoreVary:true}})]}),"GET");registerRoute(urlMachesResourceType(ResourceType.IMAGE,true),new PassThroughStrategy({plugins:[new CacheInvalidatePlugin({cacheName:ResourceCacheKey.IMAGE})]}),"PUT");registerRoute(urlMachesResourceType(ResourceType.MODEL),new DedupStaleWhileRevalidateStrategy({cacheName:ResourceCacheKey.MODEL,plugins:[new ExpirationPlugin({maxEntries:8,matchOptions:{ignoreVary:true}}),new CacheKeyPlugin({headers:["Accept"]})]}),"GET");registerRoute(urlMachesResourceType(ResourceType.MODEL,true),new PassThroughStrategy({plugins:[new CacheInvalidatePlugin({cacheName:ResourceCacheKey.MODEL})]}),"PUT");registerRoute((({url})=>url.origin===Config.getValue("BFF_API_ADDRESS")&&url.pathname.startsWith("/visualization/")),new DedupStaleWhileRevalidateStrategy({cacheName:BFF_VISUALIZATION_CACHE_KEY,plugins:[new ExpirationPlugin({maxEntries:100,matchOptions:{ignoreVary:true}}),new BroadcastUpdatePlugin,new CacheKeyPlugin({headers:["Tenant"]})]}),"GET");registerRoute((({url})=>url.origin===Config.getValue("VISUALIZATION_API_ADDRESS")&&url.pathname.startsWith("/visualization")),new PassThroughStrategy({plugins:[new CacheInvalidatePlugin({cacheName:BFF_VISUALIZATION_CACHE_KEY})]}),"PUT")})();
|
|
1
|
+
(function(){"use strict";var __webpack_modules__={22:function(){try{self["workbox:broadcast-update:7.2.0"]&&_()}catch(e){}},289:function(){try{self["workbox:precaching:7.2.0"]&&_()}catch(e){}},324:function(){try{self["workbox:expiration:7.2.0"]&&_()}catch(e){}},325:function(){try{self["workbox:routing:7.2.0"]&&_()}catch(e){}},884:function(){try{self["workbox:strategies:7.2.0"]&&_()}catch(e){}},930:function(){try{self["workbox:core:7.2.0"]&&_()}catch(e){}}};var __webpack_module_cache__={};function __webpack_require__(moduleId){var cachedModule=__webpack_module_cache__[moduleId];if(cachedModule!==undefined){return cachedModule.exports}var module=__webpack_module_cache__[moduleId]={exports:{}};__webpack_modules__[moduleId](module,module.exports,__webpack_require__);return module.exports}var _version=__webpack_require__(930);const messages_messages={"invalid-value":({paramName,validValueDescription,value})=>{if(!paramName||!validValueDescription){throw new Error(`Unexpected input to 'invalid-value' error.`)}return`The '${paramName}' parameter was given a value with an `+`unexpected value. ${validValueDescription} Received a value of `+`${JSON.stringify(value)}.`},"not-an-array":({moduleName,className,funcName,paramName})=>{if(!moduleName||!className||!funcName||!paramName){throw new Error(`Unexpected input to 'not-an-array' error.`)}return`The parameter '${paramName}' passed into `+`'${moduleName}.${className}.${funcName}()' must be an array.`},"incorrect-type":({expectedType,paramName,moduleName,className,funcName})=>{if(!expectedType||!paramName||!moduleName||!funcName){throw new Error(`Unexpected input to 'incorrect-type' error.`)}const classNameStr=className?`${className}.`:"";return`The parameter '${paramName}' passed into `+`'${moduleName}.${classNameStr}`+`${funcName}()' must be of type ${expectedType}.`},"incorrect-class":({expectedClassName,paramName,moduleName,className,funcName,isReturnValueProblem})=>{if(!expectedClassName||!moduleName||!funcName){throw new Error(`Unexpected input to 'incorrect-class' error.`)}const classNameStr=className?`${className}.`:"";if(isReturnValueProblem){return`The return value from `+`'${moduleName}.${classNameStr}${funcName}()' `+`must be an instance of class ${expectedClassName}.`}return`The parameter '${paramName}' passed into `+`'${moduleName}.${classNameStr}${funcName}()' `+`must be an instance of class ${expectedClassName}.`},"missing-a-method":({expectedMethod,paramName,moduleName,className,funcName})=>{if(!expectedMethod||!paramName||!moduleName||!className||!funcName){throw new Error(`Unexpected input to 'missing-a-method' error.`)}return`${moduleName}.${className}.${funcName}() expected the `+`'${paramName}' parameter to expose a '${expectedMethod}' method.`},"add-to-cache-list-unexpected-type":({entry})=>`An unexpected entry was passed to `+`'workbox-precaching.PrecacheController.addToCacheList()' The entry `+`'${JSON.stringify(entry)}' isn't supported. You must supply an array of `+`strings with one or more characters, objects with a url property or `+`Request objects.`,"add-to-cache-list-conflicting-entries":({firstEntry,secondEntry})=>{if(!firstEntry||!secondEntry){throw new Error(`Unexpected input to `+`'add-to-cache-list-duplicate-entries' error.`)}return`Two of the entries passed to `+`'workbox-precaching.PrecacheController.addToCacheList()' had the URL `+`${firstEntry} but different revision details. Workbox is `+`unable to cache and version the asset correctly. Please remove one `+`of the entries.`},"plugin-error-request-will-fetch":({thrownErrorMessage})=>{if(!thrownErrorMessage){throw new Error(`Unexpected input to `+`'plugin-error-request-will-fetch', error.`)}return`An error was thrown by a plugins 'requestWillFetch()' method. `+`The thrown error message was: '${thrownErrorMessage}'.`},"invalid-cache-name":({cacheNameId,value})=>{if(!cacheNameId){throw new Error(`Expected a 'cacheNameId' for error 'invalid-cache-name'`)}return`You must provide a name containing at least one character for `+`setCacheDetails({${cacheNameId}: '...'}). Received a value of `+`'${JSON.stringify(value)}'`},"unregister-route-but-not-found-with-method":({method})=>{if(!method){throw new Error(`Unexpected input to `+`'unregister-route-but-not-found-with-method' error.`)}return`The route you're trying to unregister was not previously `+`registered for the method type '${method}'.`},"unregister-route-route-not-registered":()=>`The route you're trying to unregister was not previously `+`registered.`,"queue-replay-failed":({name})=>`Replaying the background sync queue '${name}' failed.`,"duplicate-queue-name":({name})=>`The Queue name '${name}' is already being used. `+`All instances of backgroundSync.Queue must be given unique names.`,"expired-test-without-max-age":({methodName,paramName})=>`The '${methodName}()' method can only be used when the `+`'${paramName}' is used in the constructor.`,"unsupported-route-type":({moduleName,className,funcName,paramName})=>`The supplied '${paramName}' parameter was an unsupported type. `+`Please check the docs for ${moduleName}.${className}.${funcName} for `+`valid input types.`,"not-array-of-class":({value,expectedClass,moduleName,className,funcName,paramName})=>`The supplied '${paramName}' parameter must be an array of `+`'${expectedClass}' objects. Received '${JSON.stringify(value)},'. `+`Please check the call to ${moduleName}.${className}.${funcName}() `+`to fix the issue.`,"max-entries-or-age-required":({moduleName,className,funcName})=>`You must define either config.maxEntries or config.maxAgeSeconds`+`in ${moduleName}.${className}.${funcName}`,"statuses-or-headers-required":({moduleName,className,funcName})=>`You must define either config.statuses or config.headers`+`in ${moduleName}.${className}.${funcName}`,"invalid-string":({moduleName,funcName,paramName})=>{if(!paramName||!moduleName||!funcName){throw new Error(`Unexpected input to 'invalid-string' error.`)}return`When using strings, the '${paramName}' parameter must start with `+`'http' (for cross-origin matches) or '/' (for same-origin matches). `+`Please see the docs for ${moduleName}.${funcName}() for `+`more info.`},"channel-name-required":()=>`You must provide a channelName to construct a `+`BroadcastCacheUpdate instance.`,"invalid-responses-are-same-args":()=>`The arguments passed into responsesAreSame() appear to be `+`invalid. Please ensure valid Responses are used.`,"expire-custom-caches-only":()=>`You must provide a 'cacheName' property when using the `+`expiration plugin with a runtime caching strategy.`,"unit-must-be-bytes":({normalizedRangeHeader})=>{if(!normalizedRangeHeader){throw new Error(`Unexpected input to 'unit-must-be-bytes' error.`)}return`The 'unit' portion of the Range header must be set to 'bytes'. `+`The Range header provided was "${normalizedRangeHeader}"`},"single-range-only":({normalizedRangeHeader})=>{if(!normalizedRangeHeader){throw new Error(`Unexpected input to 'single-range-only' error.`)}return`Multiple ranges are not supported. Please use a single start `+`value, and optional end value. The Range header provided was `+`"${normalizedRangeHeader}"`},"invalid-range-values":({normalizedRangeHeader})=>{if(!normalizedRangeHeader){throw new Error(`Unexpected input to 'invalid-range-values' error.`)}return`The Range header is missing both start and end values. At least `+`one of those values is needed. The Range header provided was `+`"${normalizedRangeHeader}"`},"no-range-header":()=>`No Range header was found in the Request provided.`,"range-not-satisfiable":({size,start,end})=>`The start (${start}) and end (${end}) values in the Range are `+`not satisfiable by the cached response, which is ${size} bytes.`,"attempt-to-cache-non-get-request":({url,method})=>`Unable to cache '${url}' because it is a '${method}' request and `+`only 'GET' requests can be cached.`,"cache-put-with-no-response":({url})=>`There was an attempt to cache '${url}' but the response was not `+`defined.`,"no-response":({url,error})=>{let message=`The strategy could not generate a response for '${url}'.`;if(error){message+=` The underlying error is ${error}.`}return message},"bad-precaching-response":({url,status})=>`The precaching request for '${url}' failed`+(status?` with an HTTP status of ${status}.`:`.`),"non-precached-url":({url})=>`createHandlerBoundToURL('${url}') was called, but that URL is `+`not precached. Please pass in a URL that is precached instead.`,"add-to-cache-list-conflicting-integrities":({url})=>`Two of the entries passed to `+`'workbox-precaching.PrecacheController.addToCacheList()' had the URL `+`${url} with different integrity values. Please remove one of them.`,"missing-precache-entry":({cacheName,url})=>`Unable to find a precached response in ${cacheName} for ${url}.`,"cross-origin-copy-response":({origin})=>`workbox-core.copyResponse() can only be used with same-origin `+`responses. It was passed a response with origin ${origin}.`,"opaque-streams-source":({type})=>{const message=`One of the workbox-streams sources resulted in an `+`'${type}' response.`;if(type==="opaqueredirect"){return`${message} Please do not use a navigation request that results `+`in a redirect as a source.`}return`${message} Please ensure your sources are CORS-enabled.`}};const fallback=(code,...args)=>{let msg=code;if(args.length>0){msg+=` :: ${JSON.stringify(args)}`}return msg};const generatorFunction=(code,details={})=>{const message=messages[code];if(!message){throw new Error(`Unable to find message for code '${code}'.`)}return message(details)};const messageGenerator=true?fallback:0;class WorkboxError_WorkboxError extends Error{constructor(errorCode,details){const message=messageGenerator(errorCode,details);super(message);this.name=errorCode;this.details=details}}const isArray=(value,details)=>{if(!Array.isArray(value)){throw new WorkboxError("not-an-array",details)}};const hasMethod=(object,expectedMethod,details)=>{const type=typeof object[expectedMethod];if(type!=="function"){details["expectedMethod"]=expectedMethod;throw new WorkboxError("missing-a-method",details)}};const isType=(object,expectedType,details)=>{if(typeof object!==expectedType){details["expectedType"]=expectedType;throw new WorkboxError("incorrect-type",details)}};const isInstance=(object,expectedClass,details)=>{if(!(object instanceof expectedClass)){details["expectedClassName"]=expectedClass.name;throw new WorkboxError("incorrect-class",details)}};const isOneOf=(value,validValues,details)=>{if(!validValues.includes(value)){details["validValueDescription"]=`Valid values are ${JSON.stringify(validValues)}.`;throw new WorkboxError("invalid-value",details)}};const isArrayOfClass=(value,expectedClass,details)=>{const error=new WorkboxError("not-array-of-class",details);if(!Array.isArray(value)){throw error}for(const item of value){if(!(item instanceof expectedClass)){throw error}}};const finalAssertExports=true?null:0;function dontWaitFor(promise){void promise.then((()=>{}))}const logger_logger=true?null:0;const instanceOfAny=(object,constructors)=>constructors.some((c=>object instanceof c));let idbProxyableTypes;let cursorAdvanceMethods;function getIdbProxyableTypes(){return idbProxyableTypes||(idbProxyableTypes=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function getCursorAdvanceMethods(){return cursorAdvanceMethods||(cursorAdvanceMethods=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const cursorRequestMap=new WeakMap;const transactionDoneMap=new WeakMap;const transactionStoreNamesMap=new WeakMap;const transformCache=new WeakMap;const reverseTransformCache=new WeakMap;function promisifyRequest(request){const promise=new Promise(((resolve,reject)=>{const unlisten=()=>{request.removeEventListener("success",success);request.removeEventListener("error",error)};const success=()=>{resolve(wrap(request.result));unlisten()};const error=()=>{reject(request.error);unlisten()};request.addEventListener("success",success);request.addEventListener("error",error)}));promise.then((value=>{if(value instanceof IDBCursor){cursorRequestMap.set(value,request)}})).catch((()=>{}));reverseTransformCache.set(promise,request);return promise}function cacheDonePromiseForTransaction(tx){if(transactionDoneMap.has(tx))return;const done=new Promise(((resolve,reject)=>{const unlisten=()=>{tx.removeEventListener("complete",complete);tx.removeEventListener("error",error);tx.removeEventListener("abort",error)};const complete=()=>{resolve();unlisten()};const error=()=>{reject(tx.error||new DOMException("AbortError","AbortError"));unlisten()};tx.addEventListener("complete",complete);tx.addEventListener("error",error);tx.addEventListener("abort",error)}));transactionDoneMap.set(tx,done)}let idbProxyTraps={get(target,prop,receiver){if(target instanceof IDBTransaction){if(prop==="done")return transactionDoneMap.get(target);if(prop==="objectStoreNames"){return target.objectStoreNames||transactionStoreNamesMap.get(target)}if(prop==="store"){return receiver.objectStoreNames[1]?undefined:receiver.objectStore(receiver.objectStoreNames[0])}}return wrap(target[prop])},set(target,prop,value){target[prop]=value;return true},has(target,prop){if(target instanceof IDBTransaction&&(prop==="done"||prop==="store")){return true}return prop in target}};function replaceTraps(callback){idbProxyTraps=callback(idbProxyTraps)}function wrapFunction(func){if(func===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)){return function(storeNames,...args){const tx=func.call(unwrap(this),storeNames,...args);transactionStoreNamesMap.set(tx,storeNames.sort?storeNames.sort():[storeNames]);return wrap(tx)}}if(getCursorAdvanceMethods().includes(func)){return function(...args){func.apply(unwrap(this),args);return wrap(cursorRequestMap.get(this))}}return function(...args){return wrap(func.apply(unwrap(this),args))}}function transformCachableValue(value){if(typeof value==="function")return wrapFunction(value);if(value instanceof IDBTransaction)cacheDonePromiseForTransaction(value);if(instanceOfAny(value,getIdbProxyableTypes()))return new Proxy(value,idbProxyTraps);return value}function wrap(value){if(value instanceof IDBRequest)return promisifyRequest(value);if(transformCache.has(value))return transformCache.get(value);const newValue=transformCachableValue(value);if(newValue!==value){transformCache.set(value,newValue);reverseTransformCache.set(newValue,value)}return newValue}const unwrap=value=>reverseTransformCache.get(value);function openDB(name,version,{blocked,upgrade,blocking,terminated}={}){const request=indexedDB.open(name,version);const openPromise=wrap(request);if(upgrade){request.addEventListener("upgradeneeded",(event=>{upgrade(wrap(request.result),event.oldVersion,event.newVersion,wrap(request.transaction),event)}))}if(blocked){request.addEventListener("blocked",(event=>blocked(event.oldVersion,event.newVersion,event)))}openPromise.then((db=>{if(terminated)db.addEventListener("close",(()=>terminated()));if(blocking){db.addEventListener("versionchange",(event=>blocking(event.oldVersion,event.newVersion,event)))}})).catch((()=>{}));return openPromise}function deleteDB(name,{blocked}={}){const request=indexedDB.deleteDatabase(name);if(blocked){request.addEventListener("blocked",(event=>blocked(event.oldVersion,event)))}return wrap(request).then((()=>undefined))}const readMethods=["get","getKey","getAll","getAllKeys","count"];const writeMethods=["put","add","delete","clear"];const cachedMethods=new Map;function getMethod(target,prop){if(!(target instanceof IDBDatabase&&!(prop in target)&&typeof prop==="string")){return}if(cachedMethods.get(prop))return cachedMethods.get(prop);const targetFuncName=prop.replace(/FromIndex$/,"");const useIndex=prop!==targetFuncName;const isWrite=writeMethods.includes(targetFuncName);if(!(targetFuncName in(useIndex?IDBIndex:IDBObjectStore).prototype)||!(isWrite||readMethods.includes(targetFuncName))){return}const method=async function(storeName,...args){const tx=this.transaction(storeName,isWrite?"readwrite":"readonly");let target=tx.store;if(useIndex)target=target.index(args.shift());return(await Promise.all([target[targetFuncName](...args),isWrite&&tx.done]))[0]};cachedMethods.set(prop,method);return method}replaceTraps((oldTraps=>({...oldTraps,get:(target,prop,receiver)=>getMethod(target,prop)||oldTraps.get(target,prop,receiver),has:(target,prop)=>!!getMethod(target,prop)||oldTraps.has(target,prop)})));var workbox_expiration_version=__webpack_require__(324);const DB_NAME="workbox-expiration";const CACHE_OBJECT_STORE="cache-entries";const normalizeURL=unNormalizedUrl=>{const url=new URL(unNormalizedUrl,location.href);url.hash="";return url.href};class CacheTimestampsModel{constructor(cacheName){this._db=null;this._cacheName=cacheName}_upgradeDb(db){const objStore=db.createObjectStore(CACHE_OBJECT_STORE,{keyPath:"id"});objStore.createIndex("cacheName","cacheName",{unique:false});objStore.createIndex("timestamp","timestamp",{unique:false})}_upgradeDbAndDeleteOldDbs(db){this._upgradeDb(db);if(this._cacheName){void deleteDB(this._cacheName)}}async setTimestamp(url,timestamp){url=normalizeURL(url);const entry={url,timestamp,cacheName:this._cacheName,id:this._getId(url)};const db=await this.getDb();const tx=db.transaction(CACHE_OBJECT_STORE,"readwrite",{durability:"relaxed"});await tx.store.put(entry);await tx.done}async getTimestamp(url){const db=await this.getDb();const entry=await db.get(CACHE_OBJECT_STORE,this._getId(url));return entry===null||entry===void 0?void 0:entry.timestamp}async expireEntries(minTimestamp,maxCount){const db=await this.getDb();let cursor=await db.transaction(CACHE_OBJECT_STORE).store.index("timestamp").openCursor(null,"prev");const entriesToDelete=[];let entriesNotDeletedCount=0;while(cursor){const result=cursor.value;if(result.cacheName===this._cacheName){if(minTimestamp&&result.timestamp<minTimestamp||maxCount&&entriesNotDeletedCount>=maxCount){entriesToDelete.push(cursor.value)}else{entriesNotDeletedCount++}}cursor=await cursor.continue()}const urlsDeleted=[];for(const entry of entriesToDelete){await db.delete(CACHE_OBJECT_STORE,entry.id);urlsDeleted.push(entry.url)}return urlsDeleted}_getId(url){return this._cacheName+"|"+normalizeURL(url)}async getDb(){if(!this._db){this._db=await openDB(DB_NAME,1,{upgrade:this._upgradeDbAndDeleteOldDbs.bind(this)})}return this._db}}class CacheExpiration{constructor(cacheName,config={}){this._isRunning=false;this._rerunRequested=false;if(false){}this._maxEntries=config.maxEntries;this._maxAgeSeconds=config.maxAgeSeconds;this._matchOptions=config.matchOptions;this._cacheName=cacheName;this._timestampModel=new CacheTimestampsModel(cacheName)}async expireEntries(){if(this._isRunning){this._rerunRequested=true;return}this._isRunning=true;const minTimestamp=this._maxAgeSeconds?Date.now()-this._maxAgeSeconds*1e3:0;const urlsExpired=await this._timestampModel.expireEntries(minTimestamp,this._maxEntries);const cache=await self.caches.open(this._cacheName);for(const url of urlsExpired){await cache.delete(url,this._matchOptions)}if(false){}this._isRunning=false;if(this._rerunRequested){this._rerunRequested=false;dontWaitFor(this.expireEntries())}}async updateTimestamp(url){if(false){}await this._timestampModel.setTimestamp(url,Date.now())}async isURLExpired(url){if(!this._maxAgeSeconds){if(false){}return false}else{const timestamp=await this._timestampModel.getTimestamp(url);const expireOlderThan=Date.now()-this._maxAgeSeconds*1e3;return timestamp!==undefined?timestamp<expireOlderThan:true}}async delete(){this._rerunRequested=false;await this._timestampModel.expireEntries(Infinity)}}const _cacheNameDetails={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:typeof registration!=="undefined"?registration.scope:""};const _createCacheName=cacheName=>[_cacheNameDetails.prefix,cacheName,_cacheNameDetails.suffix].filter((value=>value&&value.length>0)).join("-");const eachCacheNameDetail=fn=>{for(const key of Object.keys(_cacheNameDetails)){fn(key)}};const cacheNames_cacheNames={updateDetails:details=>{eachCacheNameDetail((key=>{if(typeof details[key]==="string"){_cacheNameDetails[key]=details[key]}}))},getGoogleAnalyticsName:userCacheName=>userCacheName||_createCacheName(_cacheNameDetails.googleAnalytics),getPrecacheName:userCacheName=>userCacheName||_createCacheName(_cacheNameDetails.precache),getPrefix:()=>_cacheNameDetails.prefix,getRuntimeName:userCacheName=>userCacheName||_createCacheName(_cacheNameDetails.runtime),getSuffix:()=>_cacheNameDetails.suffix};const getFriendlyURL=url=>{const urlObj=new URL(String(url),location.href);return urlObj.href.replace(new RegExp(`^${location.origin}`),"")};const quotaErrorCallbacks=new Set;function registerQuotaErrorCallback(callback){if(false){}quotaErrorCallbacks.add(callback);if(false){}}class ExpirationPlugin{constructor(config={}){this.cachedResponseWillBeUsed=async({event,request,cacheName,cachedResponse})=>{if(!cachedResponse){return null}const isFresh=this._isResponseDateFresh(cachedResponse);const cacheExpiration=this._getCacheExpiration(cacheName);dontWaitFor(cacheExpiration.expireEntries());const updateTimestampDone=cacheExpiration.updateTimestamp(request.url);if(event){try{event.waitUntil(updateTimestampDone)}catch(error){if(false){}}}return isFresh?cachedResponse:null};this.cacheDidUpdate=async({cacheName,request})=>{if(false){}const cacheExpiration=this._getCacheExpiration(cacheName);await cacheExpiration.updateTimestamp(request.url);await cacheExpiration.expireEntries()};if(false){}this._config=config;this._maxAgeSeconds=config.maxAgeSeconds;this._cacheExpirations=new Map;if(config.purgeOnQuotaError){registerQuotaErrorCallback((()=>this.deleteCacheAndMetadata()))}}_getCacheExpiration(cacheName){if(cacheName===cacheNames_cacheNames.getRuntimeName()){throw new WorkboxError_WorkboxError("expire-custom-caches-only")}let cacheExpiration=this._cacheExpirations.get(cacheName);if(!cacheExpiration){cacheExpiration=new CacheExpiration(cacheName,this._config);this._cacheExpirations.set(cacheName,cacheExpiration)}return cacheExpiration}_isResponseDateFresh(cachedResponse){if(!this._maxAgeSeconds){return true}const dateHeaderTimestamp=this._getDateHeaderTimestamp(cachedResponse);if(dateHeaderTimestamp===null){return true}const now=Date.now();return dateHeaderTimestamp>=now-this._maxAgeSeconds*1e3}_getDateHeaderTimestamp(cachedResponse){if(!cachedResponse.headers.has("date")){return null}const dateHeader=cachedResponse.headers.get("date");const parsedDate=new Date(dateHeader);const headerTime=parsedDate.getTime();if(isNaN(headerTime)){return null}return headerTime}async deleteCacheAndMetadata(){for(const[cacheName,cacheExpiration]of this._cacheExpirations){await self.caches.delete(cacheName);await cacheExpiration.delete()}this._cacheExpirations=new Map}}function waitUntil(event,asyncFn){const returnPromise=asyncFn();event.waitUntil(returnPromise);return returnPromise}var workbox_precaching_version=__webpack_require__(289);const REVISION_SEARCH_PARAM="__WB_REVISION__";function createCacheKey(entry){if(!entry){throw new WorkboxError_WorkboxError("add-to-cache-list-unexpected-type",{entry})}if(typeof entry==="string"){const urlObject=new URL(entry,location.href);return{cacheKey:urlObject.href,url:urlObject.href}}const{revision,url}=entry;if(!url){throw new WorkboxError_WorkboxError("add-to-cache-list-unexpected-type",{entry})}if(!revision){const urlObject=new URL(url,location.href);return{cacheKey:urlObject.href,url:urlObject.href}}const cacheKeyURL=new URL(url,location.href);const originalURL=new URL(url,location.href);cacheKeyURL.searchParams.set(REVISION_SEARCH_PARAM,revision);return{cacheKey:cacheKeyURL.href,url:originalURL.href}}class PrecacheInstallReportPlugin{constructor(){this.updatedURLs=[];this.notUpdatedURLs=[];this.handlerWillStart=async({request,state})=>{if(state){state.originalRequest=request}};this.cachedResponseWillBeUsed=async({event,state,cachedResponse})=>{if(event.type==="install"){if(state&&state.originalRequest&&state.originalRequest instanceof Request){const url=state.originalRequest.url;if(cachedResponse){this.notUpdatedURLs.push(url)}else{this.updatedURLs.push(url)}}}return cachedResponse}}}class PrecacheCacheKeyPlugin{constructor({precacheController}){this.cacheKeyWillBeUsed=async({request,params})=>{const cacheKey=(params===null||params===void 0?void 0:params.cacheKey)||this._precacheController.getCacheKeyForURL(request.url);return cacheKey?new Request(cacheKey,{headers:request.headers}):request};this._precacheController=precacheController}}const logGroup=(groupTitle,deletedURLs)=>{logger.groupCollapsed(groupTitle);for(const url of deletedURLs){logger.log(url)}logger.groupEnd()};function printCleanupDetails(deletedURLs){const deletionCount=deletedURLs.length;if(deletionCount>0){logger.groupCollapsed(`During precaching cleanup, `+`${deletionCount} cached `+`request${deletionCount===1?" was":"s were"} deleted.`);logGroup("Deleted Cache Requests",deletedURLs);logger.groupEnd()}}function _nestedGroup(groupTitle,urls){if(urls.length===0){return}logger.groupCollapsed(groupTitle);for(const url of urls){logger.log(url)}logger.groupEnd()}function printInstallDetails(urlsToPrecache,urlsAlreadyPrecached){const precachedCount=urlsToPrecache.length;const alreadyPrecachedCount=urlsAlreadyPrecached.length;if(precachedCount||alreadyPrecachedCount){let message=`Precaching ${precachedCount} file${precachedCount===1?"":"s"}.`;if(alreadyPrecachedCount>0){message+=` ${alreadyPrecachedCount} `+`file${alreadyPrecachedCount===1?" is":"s are"} already cached.`}logger.groupCollapsed(message);_nestedGroup(`View newly precached URLs.`,urlsToPrecache);_nestedGroup(`View previously precached URLs.`,urlsAlreadyPrecached);logger.groupEnd()}}let supportStatus;function canConstructResponseFromBodyStream(){if(supportStatus===undefined){const testResponse=new Response("");if("body"in testResponse){try{new Response(testResponse.body);supportStatus=true}catch(error){supportStatus=false}}supportStatus=false}return supportStatus}async function copyResponse(response,modifier){let origin=null;if(response.url){const responseURL=new URL(response.url);origin=responseURL.origin}if(origin!==self.location.origin){throw new WorkboxError_WorkboxError("cross-origin-copy-response",{origin})}const clonedResponse=response.clone();const responseInit={headers:new Headers(clonedResponse.headers),status:clonedResponse.status,statusText:clonedResponse.statusText};const modifiedResponseInit=modifier?modifier(responseInit):responseInit;const body=canConstructResponseFromBodyStream()?clonedResponse.body:await clonedResponse.blob();return new Response(body,modifiedResponseInit)}function stripParams(fullURL,ignoreParams){const strippedURL=new URL(fullURL);for(const param of ignoreParams){strippedURL.searchParams.delete(param)}return strippedURL.href}async function cacheMatchIgnoreParams(cache,request,ignoreParams,matchOptions){const strippedRequestURL=stripParams(request.url,ignoreParams);if(request.url===strippedRequestURL){return cache.match(request,matchOptions)}const keysOptions=Object.assign(Object.assign({},matchOptions),{ignoreSearch:true});const cacheKeys=await cache.keys(request,keysOptions);for(const cacheKey of cacheKeys){const strippedCacheKeyURL=stripParams(cacheKey.url,ignoreParams);if(strippedRequestURL===strippedCacheKeyURL){return cache.match(cacheKey,matchOptions)}}return}class Deferred{constructor(){this.promise=new Promise(((resolve,reject)=>{this.resolve=resolve;this.reject=reject}))}}async function executeQuotaErrorCallbacks(){if(false){}for(const callback of quotaErrorCallbacks){await callback();if(false){}}if(false){}}function timeout(ms){return new Promise((resolve=>setTimeout(resolve,ms)))}var workbox_strategies_version=__webpack_require__(884);function toRequest(input){return typeof input==="string"?new Request(input):input}class StrategyHandler{constructor(strategy,options){this._cacheKeys={};if(false){}Object.assign(this,options);this.event=options.event;this._strategy=strategy;this._handlerDeferred=new Deferred;this._extendLifetimePromises=[];this._plugins=[...strategy.plugins];this._pluginStateMap=new Map;for(const plugin of this._plugins){this._pluginStateMap.set(plugin,{})}this.event.waitUntil(this._handlerDeferred.promise)}async fetch(input){const{event}=this;let request=toRequest(input);if(request.mode==="navigate"&&event instanceof FetchEvent&&event.preloadResponse){const possiblePreloadResponse=await event.preloadResponse;if(possiblePreloadResponse){if(false){}return possiblePreloadResponse}}const originalRequest=this.hasCallback("fetchDidFail")?request.clone():null;try{for(const cb of this.iterateCallbacks("requestWillFetch")){request=await cb({request:request.clone(),event})}}catch(err){if(err instanceof Error){throw new WorkboxError_WorkboxError("plugin-error-request-will-fetch",{thrownErrorMessage:err.message})}}const pluginFilteredRequest=request.clone();try{let fetchResponse;fetchResponse=await fetch(request,request.mode==="navigate"?undefined:this._strategy.fetchOptions);if(false){}for(const callback of this.iterateCallbacks("fetchDidSucceed")){fetchResponse=await callback({event,request:pluginFilteredRequest,response:fetchResponse})}return fetchResponse}catch(error){if(false){}if(originalRequest){await this.runCallbacks("fetchDidFail",{error,event,originalRequest:originalRequest.clone(),request:pluginFilteredRequest.clone()})}throw error}}async fetchAndCachePut(input){const response=await this.fetch(input);const responseClone=response.clone();void this.waitUntil(this.cachePut(input,responseClone));return response}async cacheMatch(key){const request=toRequest(key);let cachedResponse;const{cacheName,matchOptions}=this._strategy;const effectiveRequest=await this.getCacheKey(request,"read");const multiMatchOptions=Object.assign(Object.assign({},matchOptions),{cacheName});cachedResponse=await caches.match(effectiveRequest,multiMatchOptions);if(false){}for(const callback of this.iterateCallbacks("cachedResponseWillBeUsed")){cachedResponse=await callback({cacheName,matchOptions,cachedResponse,request:effectiveRequest,event:this.event})||undefined}return cachedResponse}async cachePut(key,response){const request=toRequest(key);await timeout(0);const effectiveRequest=await this.getCacheKey(request,"write");if(false){}if(!response){if(false){}throw new WorkboxError_WorkboxError("cache-put-with-no-response",{url:getFriendlyURL(effectiveRequest.url)})}const responseToCache=await this._ensureResponseSafeToCache(response);if(!responseToCache){if(false){}return false}const{cacheName,matchOptions}=this._strategy;const cache=await self.caches.open(cacheName);const hasCacheUpdateCallback=this.hasCallback("cacheDidUpdate");const oldResponse=hasCacheUpdateCallback?await cacheMatchIgnoreParams(cache,effectiveRequest.clone(),["__WB_REVISION__"],matchOptions):null;if(false){}try{await cache.put(effectiveRequest,hasCacheUpdateCallback?responseToCache.clone():responseToCache)}catch(error){if(error instanceof Error){if(error.name==="QuotaExceededError"){await executeQuotaErrorCallbacks()}throw error}}for(const callback of this.iterateCallbacks("cacheDidUpdate")){await callback({cacheName,oldResponse,newResponse:responseToCache.clone(),request:effectiveRequest,event:this.event})}return true}async getCacheKey(request,mode){const key=`${request.url} | ${mode}`;if(!this._cacheKeys[key]){let effectiveRequest=request;for(const callback of this.iterateCallbacks("cacheKeyWillBeUsed")){effectiveRequest=toRequest(await callback({mode,request:effectiveRequest,event:this.event,params:this.params}))}this._cacheKeys[key]=effectiveRequest}return this._cacheKeys[key]}hasCallback(name){for(const plugin of this._strategy.plugins){if(name in plugin){return true}}return false}async runCallbacks(name,param){for(const callback of this.iterateCallbacks(name)){await callback(param)}}*iterateCallbacks(name){for(const plugin of this._strategy.plugins){if(typeof plugin[name]==="function"){const state=this._pluginStateMap.get(plugin);const statefulCallback=param=>{const statefulParam=Object.assign(Object.assign({},param),{state});return plugin[name](statefulParam)};yield statefulCallback}}}waitUntil(promise){this._extendLifetimePromises.push(promise);return promise}async doneWaiting(){let promise;while(promise=this._extendLifetimePromises.shift()){await promise}}destroy(){this._handlerDeferred.resolve(null)}async _ensureResponseSafeToCache(response){let responseToCache=response;let pluginsUsed=false;for(const callback of this.iterateCallbacks("cacheWillUpdate")){responseToCache=await callback({request:this.request,response:responseToCache,event:this.event})||undefined;pluginsUsed=true;if(!responseToCache){break}}if(!pluginsUsed){if(responseToCache&&responseToCache.status!==200){responseToCache=undefined}if(false){}}return responseToCache}}class Strategy_Strategy{constructor(options={}){this.cacheName=cacheNames_cacheNames.getRuntimeName(options.cacheName);this.plugins=options.plugins||[];this.fetchOptions=options.fetchOptions;this.matchOptions=options.matchOptions}handle(options){const[responseDone]=this.handleAll(options);return responseDone}handleAll(options){if(options instanceof FetchEvent){options={event:options,request:options.request}}const event=options.event;const request=typeof options.request==="string"?new Request(options.request):options.request;const params="params"in options?options.params:undefined;const handler=new StrategyHandler(this,{event,request,params});const responseDone=this._getResponse(handler,request,event);const handlerDone=this._awaitComplete(responseDone,handler,request,event);return[responseDone,handlerDone]}async _getResponse(handler,request,event){await handler.runCallbacks("handlerWillStart",{event,request});let response=undefined;try{response=await this._handle(request,handler);if(!response||response.type==="error"){throw new WorkboxError_WorkboxError("no-response",{url:request.url})}}catch(error){if(error instanceof Error){for(const callback of handler.iterateCallbacks("handlerDidError")){response=await callback({error,event,request});if(response){break}}}if(!response){throw error}else if(false){}}for(const callback of handler.iterateCallbacks("handlerWillRespond")){response=await callback({event,request,response})}return response}async _awaitComplete(responseDone,handler,request,event){let response;let error;try{response=await responseDone}catch(error){}try{await handler.runCallbacks("handlerDidRespond",{event,request,response});await handler.doneWaiting()}catch(waitUntilError){if(waitUntilError instanceof Error){error=waitUntilError}}await handler.runCallbacks("handlerDidComplete",{event,request,response,error});handler.destroy();if(error){throw error}}}class PrecacheStrategy extends Strategy_Strategy{constructor(options={}){options.cacheName=cacheNames_cacheNames.getPrecacheName(options.cacheName);super(options);this._fallbackToNetwork=options.fallbackToNetwork===false?false:true;this.plugins.push(PrecacheStrategy.copyRedirectedCacheableResponsesPlugin)}async _handle(request,handler){const response=await handler.cacheMatch(request);if(response){return response}if(handler.event&&handler.event.type==="install"){return await this._handleInstall(request,handler)}return await this._handleFetch(request,handler)}async _handleFetch(request,handler){let response;const params=handler.params||{};if(this._fallbackToNetwork){if(false){}const integrityInManifest=params.integrity;const integrityInRequest=request.integrity;const noIntegrityConflict=!integrityInRequest||integrityInRequest===integrityInManifest;response=await handler.fetch(new Request(request,{integrity:request.mode!=="no-cors"?integrityInRequest||integrityInManifest:undefined}));if(integrityInManifest&&noIntegrityConflict&&request.mode!=="no-cors"){this._useDefaultCacheabilityPluginIfNeeded();const wasCached=await handler.cachePut(request,response.clone());if(false){}}}else{throw new WorkboxError_WorkboxError("missing-precache-entry",{cacheName:this.cacheName,url:request.url})}if(false){}return response}async _handleInstall(request,handler){this._useDefaultCacheabilityPluginIfNeeded();const response=await handler.fetch(request);const wasCached=await handler.cachePut(request,response.clone());if(!wasCached){throw new WorkboxError_WorkboxError("bad-precaching-response",{url:request.url,status:response.status})}return response}_useDefaultCacheabilityPluginIfNeeded(){let defaultPluginIndex=null;let cacheWillUpdatePluginCount=0;for(const[index,plugin]of this.plugins.entries()){if(plugin===PrecacheStrategy.copyRedirectedCacheableResponsesPlugin){continue}if(plugin===PrecacheStrategy.defaultPrecacheCacheabilityPlugin){defaultPluginIndex=index}if(plugin.cacheWillUpdate){cacheWillUpdatePluginCount++}}if(cacheWillUpdatePluginCount===0){this.plugins.push(PrecacheStrategy.defaultPrecacheCacheabilityPlugin)}else if(cacheWillUpdatePluginCount>1&&defaultPluginIndex!==null){this.plugins.splice(defaultPluginIndex,1)}}}PrecacheStrategy.defaultPrecacheCacheabilityPlugin={async cacheWillUpdate({response}){if(!response||response.status>=400){return null}return response}};PrecacheStrategy.copyRedirectedCacheableResponsesPlugin={async cacheWillUpdate({response}){return response.redirected?await copyResponse(response):response}};class PrecacheController{constructor({cacheName,plugins=[],fallbackToNetwork=true}={}){this._urlsToCacheKeys=new Map;this._urlsToCacheModes=new Map;this._cacheKeysToIntegrities=new Map;this._strategy=new PrecacheStrategy({cacheName:cacheNames_cacheNames.getPrecacheName(cacheName),plugins:[...plugins,new PrecacheCacheKeyPlugin({precacheController:this})],fallbackToNetwork});this.install=this.install.bind(this);this.activate=this.activate.bind(this)}get strategy(){return this._strategy}precache(entries){this.addToCacheList(entries);if(!this._installAndActiveListenersAdded){self.addEventListener("install",this.install);self.addEventListener("activate",this.activate);this._installAndActiveListenersAdded=true}}addToCacheList(entries){if(false){}const urlsToWarnAbout=[];for(const entry of entries){if(typeof entry==="string"){urlsToWarnAbout.push(entry)}else if(entry&&entry.revision===undefined){urlsToWarnAbout.push(entry.url)}const{cacheKey,url}=createCacheKey(entry);const cacheMode=typeof entry!=="string"&&entry.revision?"reload":"default";if(this._urlsToCacheKeys.has(url)&&this._urlsToCacheKeys.get(url)!==cacheKey){throw new WorkboxError_WorkboxError("add-to-cache-list-conflicting-entries",{firstEntry:this._urlsToCacheKeys.get(url),secondEntry:cacheKey})}if(typeof entry!=="string"&&entry.integrity){if(this._cacheKeysToIntegrities.has(cacheKey)&&this._cacheKeysToIntegrities.get(cacheKey)!==entry.integrity){throw new WorkboxError_WorkboxError("add-to-cache-list-conflicting-integrities",{url})}this._cacheKeysToIntegrities.set(cacheKey,entry.integrity)}this._urlsToCacheKeys.set(url,cacheKey);this._urlsToCacheModes.set(url,cacheMode);if(urlsToWarnAbout.length>0){const warningMessage=`Workbox is precaching URLs without revision `+`info: ${urlsToWarnAbout.join(", ")}\nThis is generally NOT safe. `+`Learn more at https://bit.ly/wb-precache`;if(true){console.warn(warningMessage)}else{}}}}install(event){return waitUntil(event,(async()=>{const installReportPlugin=new PrecacheInstallReportPlugin;this.strategy.plugins.push(installReportPlugin);for(const[url,cacheKey]of this._urlsToCacheKeys){const integrity=this._cacheKeysToIntegrities.get(cacheKey);const cacheMode=this._urlsToCacheModes.get(url);const request=new Request(url,{integrity,cache:cacheMode,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey},request,event}))}const{updatedURLs,notUpdatedURLs}=installReportPlugin;if(false){}return{updatedURLs,notUpdatedURLs}}))}activate(event){return waitUntil(event,(async()=>{const cache=await self.caches.open(this.strategy.cacheName);const currentlyCachedRequests=await cache.keys();const expectedCacheKeys=new Set(this._urlsToCacheKeys.values());const deletedURLs=[];for(const request of currentlyCachedRequests){if(!expectedCacheKeys.has(request.url)){await cache.delete(request);deletedURLs.push(request.url)}}if(false){}return{deletedURLs}}))}getURLsToCacheKeys(){return this._urlsToCacheKeys}getCachedURLs(){return[...this._urlsToCacheKeys.keys()]}getCacheKeyForURL(url){const urlObject=new URL(url,location.href);return this._urlsToCacheKeys.get(urlObject.href)}getIntegrityForCacheKey(cacheKey){return this._cacheKeysToIntegrities.get(cacheKey)}async matchPrecache(request){const url=request instanceof Request?request.url:request;const cacheKey=this.getCacheKeyForURL(url);if(cacheKey){const cache=await self.caches.open(this.strategy.cacheName);return cache.match(cacheKey)}return undefined}createHandlerBoundToURL(url){const cacheKey=this.getCacheKeyForURL(url);if(!cacheKey){throw new WorkboxError_WorkboxError("non-precached-url",{url})}return options=>{options.request=new Request(url);options.params=Object.assign({cacheKey},options.params);return this.strategy.handle(options)}}}let precacheController;const getOrCreatePrecacheController_getOrCreatePrecacheController=()=>{if(!precacheController){precacheController=new PrecacheController}return precacheController};function addPlugins(plugins){const precacheController=getOrCreatePrecacheController();precacheController.strategy.plugins.push(...plugins)}var workbox_routing_version=__webpack_require__(325);const defaultMethod="GET";const validMethods=null&&["DELETE","GET","HEAD","PATCH","POST","PUT"];const normalizeHandler=handler=>{if(handler&&typeof handler==="object"){if(false){}return handler}else{if(false){}return{handle:handler}}};class Route{constructor(match,handler,method=defaultMethod){if(false){}this.handler=normalizeHandler(handler);this.match=match;this.method=method}setCatchHandler(handler){this.catchHandler=normalizeHandler(handler)}}class RegExpRoute extends Route{constructor(regExp,handler,method){if(false){}const match=({url})=>{const result=regExp.exec(url.href);if(!result){return}if(url.origin!==location.origin&&result.index!==0){if(false){}return}return result.slice(1)};super(match,handler,method)}}class Router{constructor(){this._routes=new Map;this._defaultHandlerMap=new Map}get routes(){return this._routes}addFetchListener(){self.addEventListener("fetch",(event=>{const{request}=event;const responsePromise=this.handleRequest({request,event});if(responsePromise){event.respondWith(responsePromise)}}))}addCacheListener(){self.addEventListener("message",(event=>{if(event.data&&event.data.type==="CACHE_URLS"){const{payload}=event.data;if(false){}const requestPromises=Promise.all(payload.urlsToCache.map((entry=>{if(typeof entry==="string"){entry=[entry]}const request=new Request(...entry);return this.handleRequest({request,event})})));event.waitUntil(requestPromises);if(event.ports&&event.ports[0]){void requestPromises.then((()=>event.ports[0].postMessage(true)))}}}))}handleRequest({request,event}){if(false){}const url=new URL(request.url,location.href);if(!url.protocol.startsWith("http")){if(false){}return}const sameOrigin=url.origin===location.origin;const{params,route}=this.findMatchingRoute({event,request,sameOrigin,url});let handler=route&&route.handler;const debugMessages=[];if(false){}const method=request.method;if(!handler&&this._defaultHandlerMap.has(method)){if(false){}handler=this._defaultHandlerMap.get(method)}if(!handler){if(false){}return}if(false){}let responsePromise;try{responsePromise=handler.handle({url,request,event,params})}catch(err){responsePromise=Promise.reject(err)}const catchHandler=route&&route.catchHandler;if(responsePromise instanceof Promise&&(this._catchHandler||catchHandler)){responsePromise=responsePromise.catch((async err=>{if(catchHandler){if(false){}try{return await catchHandler.handle({url,request,event,params})}catch(catchErr){if(catchErr instanceof Error){err=catchErr}}}if(this._catchHandler){if(false){}return this._catchHandler.handle({url,request,event})}throw err}))}return responsePromise}findMatchingRoute({url,sameOrigin,request,event}){const routes=this._routes.get(request.method)||[];for(const route of routes){let params;const matchResult=route.match({url,sameOrigin,request,event});if(matchResult){if(false){}params=matchResult;if(Array.isArray(params)&¶ms.length===0){params=undefined}else if(matchResult.constructor===Object&&Object.keys(matchResult).length===0){params=undefined}else if(typeof matchResult==="boolean"){params=undefined}return{route,params}}}return{}}setDefaultHandler(handler,method=defaultMethod){this._defaultHandlerMap.set(method,normalizeHandler(handler))}setCatchHandler(handler){this._catchHandler=normalizeHandler(handler)}registerRoute(route){if(false){}if(!this._routes.has(route.method)){this._routes.set(route.method,[])}this._routes.get(route.method).push(route)}unregisterRoute(route){if(!this._routes.has(route.method)){throw new WorkboxError_WorkboxError("unregister-route-but-not-found-with-method",{method:route.method})}const routeIndex=this._routes.get(route.method).indexOf(route);if(routeIndex>-1){this._routes.get(route.method).splice(routeIndex,1)}else{throw new WorkboxError_WorkboxError("unregister-route-route-not-registered")}}}let defaultRouter;const getOrCreateDefaultRouter_getOrCreateDefaultRouter=()=>{if(!defaultRouter){defaultRouter=new Router;defaultRouter.addFetchListener();defaultRouter.addCacheListener()}return defaultRouter};function registerRoute(capture,handler,method){let route;if(typeof capture==="string"){const captureUrl=new URL(capture,location.href);if(false){}const matchCallback=({url})=>{if(false){}return url.href===captureUrl.href};route=new Route(matchCallback,handler,method)}else if(capture instanceof RegExp){route=new RegExpRoute(capture,handler,method)}else if(typeof capture==="function"){route=new Route(capture,handler,method)}else if(capture instanceof Route){route=capture}else{throw new WorkboxError_WorkboxError("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"})}const defaultRouter=getOrCreateDefaultRouter_getOrCreateDefaultRouter();defaultRouter.registerRoute(route);return route}function removeIgnoredSearchParams(urlObject,ignoreURLParametersMatching=[]){for(const paramName of[...urlObject.searchParams.keys()]){if(ignoreURLParametersMatching.some((regExp=>regExp.test(paramName)))){urlObject.searchParams.delete(paramName)}}return urlObject}function*generateURLVariations(url,{ignoreURLParametersMatching=[/^utm_/,/^fbclid$/],directoryIndex="index.html",cleanURLs=true,urlManipulation}={}){const urlObject=new URL(url,location.href);urlObject.hash="";yield urlObject.href;const urlWithoutIgnoredParams=removeIgnoredSearchParams(urlObject,ignoreURLParametersMatching);yield urlWithoutIgnoredParams.href;if(directoryIndex&&urlWithoutIgnoredParams.pathname.endsWith("/")){const directoryURL=new URL(urlWithoutIgnoredParams.href);directoryURL.pathname+=directoryIndex;yield directoryURL.href}if(cleanURLs){const cleanURL=new URL(urlWithoutIgnoredParams.href);cleanURL.pathname+=".html";yield cleanURL.href}if(urlManipulation){const additionalURLs=urlManipulation({url:urlObject});for(const urlToAttempt of additionalURLs){yield urlToAttempt.href}}}class PrecacheRoute extends Route{constructor(precacheController,options){const match=({request})=>{const urlsToCacheKeys=precacheController.getURLsToCacheKeys();for(const possibleURL of generateURLVariations(request.url,options)){const cacheKey=urlsToCacheKeys.get(possibleURL);if(cacheKey){const integrity=precacheController.getIntegrityForCacheKey(cacheKey);return{cacheKey,integrity}}}if(false){}return};super(match,precacheController.strategy)}}function addRoute(options){const precacheController=getOrCreatePrecacheController_getOrCreatePrecacheController();const precacheRoute=new PrecacheRoute(precacheController,options);registerRoute(precacheRoute)}const SUBSTRING_TO_FIND="-precache-";const deleteOutdatedCaches_deleteOutdatedCaches=async(currentPrecacheName,substringToFind=SUBSTRING_TO_FIND)=>{const cacheNames=await self.caches.keys();const cacheNamesToDelete=cacheNames.filter((cacheName=>cacheName.includes(substringToFind)&&cacheName.includes(self.registration.scope)&&cacheName!==currentPrecacheName));await Promise.all(cacheNamesToDelete.map((cacheName=>self.caches.delete(cacheName))));return cacheNamesToDelete};function cleanupOutdatedCaches(){self.addEventListener("activate",(event=>{const cacheName=cacheNames.getPrecacheName();event.waitUntil(deleteOutdatedCaches(cacheName).then((cachesDeleted=>{if(false){}})))}))}function createHandlerBoundToURL(url){const precacheController=getOrCreatePrecacheController();return precacheController.createHandlerBoundToURL(url)}function getCacheKeyForURL(url){const precacheController=getOrCreatePrecacheController();return precacheController.getCacheKeyForURL(url)}function matchPrecache(request){const precacheController=getOrCreatePrecacheController();return precacheController.matchPrecache(request)}function precache(entries){const precacheController=getOrCreatePrecacheController_getOrCreatePrecacheController();precacheController.precache(entries)}function precacheAndRoute(entries,options){precache(entries);addRoute(options)}class PrecacheFallbackPlugin{constructor({fallbackURL,precacheController}){this.handlerDidError=()=>this._precacheController.matchPrecache(this._fallbackURL);this._fallbackURL=fallbackURL;this._precacheController=precacheController||getOrCreatePrecacheController()}}class NavigationRoute extends Route{constructor(handler,{allowlist=[/./],denylist=[]}={}){if(false){}super((options=>this._match(options)),handler);this._allowlist=allowlist;this._denylist=denylist}_match({url,request}){if(request&&request.mode!=="navigate"){return false}const pathnameAndSearch=url.pathname+url.search;for(const regExp of this._denylist){if(regExp.test(pathnameAndSearch)){if(false){}return false}}if(this._allowlist.some((regExp=>regExp.test(pathnameAndSearch)))){if(false){}return true}if(false){}return false}}function setCatchHandler(handler){const defaultRouter=getOrCreateDefaultRouter();defaultRouter.setCatchHandler(handler)}function setDefaultHandler(handler){const defaultRouter=getOrCreateDefaultRouter();defaultRouter.setDefaultHandler(handler)}const utils_messages_messages={strategyStart:(strategyName,request)=>`Using ${strategyName} to respond to '${getFriendlyURL(request.url)}'`,printFinalResponse:response=>{if(response){logger_logger.groupCollapsed(`View the final response here.`);logger_logger.log(response||"[No response returned]");logger_logger.groupEnd()}}};class CacheFirst extends Strategy_Strategy{async _handle(request,handler){const logs=[];if(false){}let response=await handler.cacheMatch(request);let error=undefined;if(!response){if(false){}try{response=await handler.fetchAndCachePut(request)}catch(err){if(err instanceof Error){error=err}}if(false){}}else{if(false){}}if(false){}if(!response){throw new WorkboxError_WorkboxError("no-response",{url:request.url,error})}return response}}class CacheOnly extends(null&&Strategy){async _handle(request,handler){if(false){}const response=await handler.cacheMatch(request);if(false){}if(!response){throw new WorkboxError("no-response",{url:request.url})}return response}}const cacheOkAndOpaquePlugin={cacheWillUpdate:async({response})=>{if(response.status===200||response.status===0){return response}return null}};class NetworkFirst extends Strategy_Strategy{constructor(options={}){super(options);if(!this.plugins.some((p=>"cacheWillUpdate"in p))){this.plugins.unshift(cacheOkAndOpaquePlugin)}this._networkTimeoutSeconds=options.networkTimeoutSeconds||0;if(false){}}async _handle(request,handler){const logs=[];if(false){}const promises=[];let timeoutId;if(this._networkTimeoutSeconds){const{id,promise}=this._getTimeoutPromise({request,logs,handler});timeoutId=id;promises.push(promise)}const networkPromise=this._getNetworkPromise({timeoutId,request,logs,handler});promises.push(networkPromise);const response=await handler.waitUntil((async()=>await handler.waitUntil(Promise.race(promises))||await networkPromise)());if(false){}if(!response){throw new WorkboxError_WorkboxError("no-response",{url:request.url})}return response}_getTimeoutPromise({request,logs,handler}){let timeoutId;const timeoutPromise=new Promise((resolve=>{const onNetworkTimeout=async()=>{if(false){}resolve(await handler.cacheMatch(request))};timeoutId=setTimeout(onNetworkTimeout,this._networkTimeoutSeconds*1e3)}));return{promise:timeoutPromise,id:timeoutId}}async _getNetworkPromise({timeoutId,request,logs,handler}){let error;let response;try{response=await handler.fetchAndCachePut(request)}catch(fetchError){if(fetchError instanceof Error){error=fetchError}}if(timeoutId){clearTimeout(timeoutId)}if(false){}if(error||!response){response=await handler.cacheMatch(request);if(false){}}return response}}class NetworkOnly extends Strategy_Strategy{constructor(options={}){super(options);this._networkTimeoutSeconds=options.networkTimeoutSeconds||0}async _handle(request,handler){if(false){}let error=undefined;let response;try{const promises=[handler.fetch(request)];if(this._networkTimeoutSeconds){const timeoutPromise=timeout(this._networkTimeoutSeconds*1e3);promises.push(timeoutPromise)}response=await Promise.race(promises);if(!response){throw new Error(`Timed out the network response after `+`${this._networkTimeoutSeconds} seconds.`)}}catch(err){if(err instanceof Error){error=err}}if(false){}if(!response){throw new WorkboxError_WorkboxError("no-response",{url:request.url,error})}return response}}class StaleWhileRevalidate extends Strategy_Strategy{constructor(options={}){super(options);if(!this.plugins.some((p=>"cacheWillUpdate"in p))){this.plugins.unshift(cacheOkAndOpaquePlugin)}}async _handle(request,handler){const logs=[];if(false){}const fetchAndCachePromise=handler.fetchAndCachePut(request).catch((()=>{}));void handler.waitUntil(fetchAndCachePromise);let response=await handler.cacheMatch(request);let error;if(response){if(false){}}else{if(false){}try{response=await fetchAndCachePromise}catch(err){if(err instanceof Error){error=err}}}if(false){}if(!response){throw new WorkboxError_WorkboxError("no-response",{url:request.url,error})}return response}}const manifest=[{'revision':'386cbb79f30d8bcf3750f1a295cab3d8','url':'client.js'},{'revision':'92ea3a6b9992958f09df37c1f7644e86','url':'index.html'}];precacheAndRoute(manifest.filter((entry=>entry.url!=="/index.html")));registerRoute((({url})=>url.origin===self.location.origin&&url.pathname.endsWith(".png")),new StaleWhileRevalidate({cacheName:"images",plugins:[new ExpirationPlugin({maxEntries:50})]}));self.addEventListener("message",(event=>{if(event.data&&event.data.type==="SKIP_WAITING"){self.skipWaiting()}}));let canConstructReadableStream_supportStatus;function canConstructReadableStream(){if(canConstructReadableStream_supportStatus===undefined){try{new ReadableStream({start(){}});canConstructReadableStream_supportStatus=true}catch(error){canConstructReadableStream_supportStatus=false}}return canConstructReadableStream_supportStatus}const MAX_RETRY_TIME=2e3;async function resultingClientExists(resultingClientId){if(!resultingClientId){return}let existingWindows=await self.clients.matchAll({type:"window"});const existingWindowIds=new Set(existingWindows.map((w=>w.id)));let resultingWindow;const startTime=performance.now();while(performance.now()-startTime<MAX_RETRY_TIME){existingWindows=await self.clients.matchAll({type:"window"});resultingWindow=existingWindows.find((w=>{if(resultingClientId){return w.id===resultingClientId}else{return!existingWindowIds.has(w.id)}}));if(resultingWindow){break}await timeout(100)}return resultingWindow}const workbox_core_cacheNames_cacheNames={get googleAnalytics(){return cacheNames_cacheNames.getGoogleAnalyticsName()},get precache(){return cacheNames_cacheNames.getPrecacheName()},get prefix(){return cacheNames_cacheNames.getPrefix()},get runtime(){return cacheNames_cacheNames.getRuntimeName()},get suffix(){return cacheNames_cacheNames.getSuffix()}};function clientsClaim(){self.addEventListener("activate",(()=>self.clients.claim()))}function setCacheNameDetails(details){if(false){}cacheNames.updateDetails(details)}function skipWaiting(){if(false){}void self.skipWaiting()}var workbox_broadcast_update_version=__webpack_require__(22);const responsesAreSame=(firstResponse,secondResponse,headersToCheck)=>{if(false){}const atLeastOneHeaderAvailable=headersToCheck.some((header=>firstResponse.headers.has(header)&&secondResponse.headers.has(header)));if(!atLeastOneHeaderAvailable){if(false){}return true}return headersToCheck.every((header=>{const headerStateComparison=firstResponse.headers.has(header)===secondResponse.headers.has(header);const headerValueComparison=firstResponse.headers.get(header)===secondResponse.headers.get(header);return headerStateComparison&&headerValueComparison}))};const CACHE_UPDATED_MESSAGE_TYPE="CACHE_UPDATED";const CACHE_UPDATED_MESSAGE_META="workbox-broadcast-update";const NOTIFY_ALL_CLIENTS=true;const DEFAULT_HEADERS_TO_CHECK=["content-length","etag","last-modified"];const isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);function defaultPayloadGenerator(data){return{cacheName:data.cacheName,updatedURL:data.request.url}}class BroadcastCacheUpdate{constructor({generatePayload,headersToCheck,notifyAllClients}={}){this._headersToCheck=headersToCheck||DEFAULT_HEADERS_TO_CHECK;this._generatePayload=generatePayload||defaultPayloadGenerator;this._notifyAllClients=notifyAllClients!==null&¬ifyAllClients!==void 0?notifyAllClients:NOTIFY_ALL_CLIENTS}async notifyIfUpdated(options){if(false){}if(!options.oldResponse){return}if(!responsesAreSame(options.oldResponse,options.newResponse,this._headersToCheck)){if(false){}const messageData={type:CACHE_UPDATED_MESSAGE_TYPE,meta:CACHE_UPDATED_MESSAGE_META,payload:this._generatePayload(options)};if(options.request.mode==="navigate"){let resultingClientId;if(options.event instanceof FetchEvent){resultingClientId=options.event.resultingClientId}const resultingWin=await resultingClientExists(resultingClientId);if(!resultingWin||isSafari){await timeout(3500)}}if(this._notifyAllClients){const windows=await self.clients.matchAll({type:"window"});for(const win of windows){win.postMessage(messageData)}}else{if(options.event instanceof FetchEvent){const client=await self.clients.get(options.event.clientId);client===null||client===void 0?void 0:client.postMessage(messageData)}}}}}class BroadcastUpdatePlugin{constructor(options){this.cacheDidUpdate=async options=>{dontWaitFor(this._broadcastUpdate.notifyIfUpdated(options))};this._broadcastUpdate=new BroadcastCacheUpdate(options)}}class CacheService{static getCleanURL(url){const indexOfQuery=url.indexOf("?");return indexOfQuery>0?url.substring(0,indexOfQuery):url}static async invalidateUrl(cacheName,url){try{const cache=await caches.open(cacheName);const requests=await cache.keys();requests.forEach((request=>{const cacheUrl=CacheService.getCleanURL(request.url);const urlToInvalidate=CacheService.getCleanURL(url);if(!urlToInvalidate.startsWith(cacheUrl))return;cache.delete(request)}))}catch{}}static async invalidateAll(cacheNames){cacheNames.forEach((async cacheName=>{const cache=await caches.open(cacheName);const requests=await cache.keys();requests.forEach((request=>{cache.delete(request)}))}))}static async delete(cacheName){try{await caches.delete(cacheName)}catch{}}}class CacheInvalidatePlugin{constructor({cacheName}){this.cacheName=void 0;this.cacheName=cacheName}async fetchDidSucceed({request,response}){CacheService.invalidateUrl(this.cacheName,request.url);return response}}class DedupStaleWhileRevalidateStrategy extends StaleWhileRevalidate{constructor(...args){super(...args);this.requestsInProgress=new Map}async _handle(request,handler){const requestInProgress=this.requestsInProgress.get(request.url);if(requestInProgress){const dedupedResponse=await requestInProgress.promise;return dedupedResponse.clone()}let done;this.requestsInProgress.set(request.url,{promise:new Promise((resolve=>{done=resolve})),done});const response=await super._handle(request,handler);done(response.clone());this.requestsInProgress.delete(request.url);return response}}class DedupCacheFirstStrategy extends CacheFirst{constructor(...args){super(...args);this.requestsInProgress=new Map}async _handle(request,handler){const requestInProgress=this.requestsInProgress.get(request.url);if(requestInProgress){const dedupedResponse=await requestInProgress.promise;return dedupedResponse.clone()}let done;this.requestsInProgress.set(request.url,{promise:new Promise((resolve=>{done=resolve})),done});const response=await super._handle(request,handler);done(response.clone());this.requestsInProgress.delete(request.url);return response}}let ConfigEnvironment=function(ConfigEnvironment){ConfigEnvironment["DEVELOPMENT"]="development";ConfigEnvironment["SYSTEM_TEST"]="systemTest";ConfigEnvironment["TEST"]="test";ConfigEnvironment["PRODUCTION"]="production";ConfigEnvironment["LOCAL"]="local";return ConfigEnvironment}({});const HOPARA_ENV_KEY="HOPARA_ENV";class ConfigMap extends Map{constructor(newMap){super();this.environment=void 0;Object.keys(newMap).forEach((configName=>{this.set(configName,newMap[configName])}));this.setEnvFromFile();this.environment=this.getHoparaEnvironment()}setEnvFromFile(){try{var _window;if((_window=window)!==null&&_window!==void 0&&_window.__env__){Object.keys(window.__env__).map((key=>{this.set(key,{development:window.__env__[key]})}))}}catch(_){return _}}getValueFromNodeEnvironment(key){var _process$env$key;return(_process$env$key={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:undefined,WDS_SOCKET_PATH:undefined,WDS_SOCKET_PORT:undefined,FAST_REFRESH:true,REACT_APP_BUILD_NUMBER:"10190",REACT_APP_IS_EMBEDDED:"true",REACT_APP_PACKAGE_VERSION:"2.4.58"}[key])!==null&&_process$env$key!==void 0?_process$env$key:{NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:undefined,WDS_SOCKET_PATH:undefined,WDS_SOCKET_PORT:undefined,FAST_REFRESH:true,REACT_APP_BUILD_NUMBER:"10190",REACT_APP_IS_EMBEDDED:"true",REACT_APP_PACKAGE_VERSION:"2.4.58"}[`REACT_APP_${key}`]}getHoparaEnvironment(){var _this$getValueFromNod;const env=(_this$getValueFromNod=this.getValueFromNodeEnvironment(HOPARA_ENV_KEY))!==null&&_this$getValueFromNod!==void 0?_this$getValueFromNod:"production";if(!env)return ConfigEnvironment.DEVELOPMENT;if(env==="local")return ConfigEnvironment.LOCAL;if(env==="production")return ConfigEnvironment.PRODUCTION;if(env==="test")return ConfigEnvironment.TEST;if(env==="systemTest")return ConfigEnvironment.SYSTEM_TEST;return ConfigEnvironment.DEVELOPMENT}isDevelopment(){return this.environment===ConfigEnvironment.DEVELOPMENT}setEnv(env){this.environment=env}getValue(key,tenant){var _this$get,_configValues$this$en;if(key===HOPARA_ENV_KEY)return this.getHoparaEnvironment();const fromNodeEnv=this.getValueFromNodeEnvironment(key);if(fromNodeEnv)return fromNodeEnv;const tenantKey=tenant?`${tenant.toUpperCase()}_${key}`:key;const configValues=(_this$get=this.get(tenantKey))!==null&&_this$get!==void 0?_this$get:this.get(key);if(!configValues)return"";const value=(_configValues$this$en=configValues[this.environment])!==null&&_configValues$this$en!==void 0?_configValues$this$en:configValues[ConfigEnvironment.DEVELOPMENT];return typeof value==="function"?value():value}getValueAsBoolean(key,tenant){return this.getValue(key,tenant)==="true"}}const configMap={[HOPARA_ENV_KEY]:{development:"development",test:"test",production:"production",local:"local"},BUILD_NUMBER:{development:"000"},PACKAGE_VERSION:{development:"0.0.0"},AUTH_ENABLED:{development:"true"},PUBLIC_URL:{development:""},SYSTEM_TEST:{development:"false",systemTest:"true"},BASE_PATHNAME:{development:"",test:"",production:"",local:""},BASE_URL:{development:"http://localhost:3000",test:"https://test.hopara.app",production:"https://hopara.app",local:"http://localhost:3000"},VISUALIZATION_API_ADDRESS:{development:"http://localhost:8081",test:"https://visualization.test.hopara.app",production:"https://visualization.hopara.app",systemTest:"http://localhost:1234"},BFF_API_ADDRESS:{development:"http://localhost:8086",test:"https://bff.test.hopara.app",production:"https://bff.hopara.app",systemTest:"http://localhost:1234"},NOTIFICATION_API_ADDRESS:{development:"http://localhost:8085",test:"https://notification.test.hopara.app",production:"https://notification.hopara.app",systemTest:"http://localhost:1234"},DATASET_API_ADDRESS:{development:"http://localhost:8000",test:"https://dataset.test.hopara.app",production:"https://dataset.hopara.app",systemTest:"http://localhost:1234"},TEMPLATE_API_ADDRESS:{development:"http://localhost:8089",test:"https://template.test.hopara.app",production:"https://template.hopara.app",local:"https://template.hopara.app",systemTest:"http://localhost:1234"},RESOURCE_API_ADDRESS:{development:"http://localhost:2022",test:"https://resource.test.hopara.app",production:"https://resource.hopara.app",local:"https://resource.hopara.app",systemTest:"https://resource.test.hopara.app"},AUTH_API_ADDRESS:{development:"http://localhost:8088",test:"https://auth.test.hopara.app",production:"https://auth.hopara.app",local:"https://auth.hopara.app",systemTest:"http://localhost:1234"},TENANT_API_ADDRESS:{development:"http://localhost:2021",test:"https://tenant.test.hopara.app",production:"https://tenant.hopara.app",local:"https://tenant.hopara.app",systemTest:"http://localhost:1234"},IMAGES_API_ADDRESS:{development:"https://images.hopara.app"},REPORT_API_ADDRESS:{development:"https://report.test.hopara.app",production:"https://report.hopara.app"},HOPARA_THEME_MODE:{development:"HOPARA"},STYLE_INTERFACE:{development:"aphrodite"},ENABLE_MAP:{development:"true",systemTest:"false"},ARCGIS_API_TOKEN:{development:"AAPKe1f53068399740f39871d71c84e6c8ecFKw2zeYlVDGYjbtVi7cxjVAfXQCegLG-vMbhwvN1eFtdDnbHa-jSi5IMTnzUxJN4"},MAPTILER_API_TOKEN:{development:"t0AYWwS0LsMuX1Of2myK&c=adasd"},GOOGLE_MAPS_API_KEY:{development:"AIzaSyAC42qeOUIZ0j7T-b_c9MXvG3-Wtld8Be4"},DATADOG_RUM_APPLICATION_ID:{development:"f06f0e23-915e-4d89-a7d8-c2a2cc7fb558"},DATADOG_RUM_CLIENT_TOKEN:{development:"pub618fbb810aa5ce569295aadf30b70d67"},DATADOG_RUM_SITE:{development:"us5.datadoghq.com"},IS_EMBEDDED:{development:"false"},IS_TOUCH_DEVICE:{development:()=>{var _window2;return`${((_window2=window)===null||_window2===void 0?void 0:_window2.matchMedia)&&window.matchMedia("(any-hover: none)").matches}`}},IS_HEADLESS_DEVICE:{development:()=>`${navigator.webdriver||/HeadlessChrome/.test(window.navigator.userAgent)}`,test:()=>`false`,systemTest:()=>`false`},IS_SMALL_WIDTH_SCREEN:{development:()=>{var _window3;return`${((_window3=window)===null||_window3===void 0?void 0:_window3.matchMedia)&&window.matchMedia("(max-width: 767.5px)").matches}`}},IS_SMALL_HEIGHT_SCREEN:{development:()=>{var _window4;return`${((_window4=window)===null||_window4===void 0?void 0:_window4.matchMedia)&&window.matchMedia("(max-height: 520px)").matches}`}}};const Config=new ConfigMap(configMap);let ResourceCacheKey=function(ResourceCacheKey){ResourceCacheKey["ICON"]="resource-icons";ResourceCacheKey["IMAGE"]="resource-images";ResourceCacheKey["MODEL"]="resource-models";return ResourceCacheKey}({});let ResourceType=function(ResourceType){ResourceType["ICON"]="icon";ResourceType["IMAGE"]="image";ResourceType["MODEL"]="model";return ResourceType}({});const pathPosition={[ResourceType.ICON]:3,[ResourceType.IMAGE]:5,[ResourceType.MODEL]:5};const shouldIgnorePath=(splittedPath,paramPosition,allowSubPaths)=>!allowSubPaths&&splittedPath.length>paramPosition+2;const isPathOfType=(path,type,paramPosition,allowSubPaths=false)=>{const splittedPath=path.split("/");if(shouldIgnorePath(splittedPath,paramPosition,allowSubPaths))return false;return splittedPath[paramPosition]&&splittedPath[paramPosition]===type};const urlMachesResourceType=(resourceType,allowSubPaths)=>({url})=>url.origin===Config.getValue("RESOURCE_API_ADDRESS")&&isPathOfType(url.pathname,resourceType,pathPosition[resourceType],allowSubPaths);const BFF_VISUALIZATION_CACHE_KEY="bff-visualization";class CacheKeyPlugin{constructor({headers}){this.headers=void 0;this.headers=headers}getUrlWithCacheKeys(request){const cacheUrl=new URL(request.url);this.headers.forEach((header=>{cacheUrl.searchParams.set(`_header_${header}`,request.headers.get(header)||"")}));return cacheUrl.toString()}async cacheKeyWillBeUsed({request}){return this.getUrlWithCacheKeys(request)}}class PassThroughStrategy{constructor({plugins}){this.plugins=void 0;this.plugins=plugins}getHandleOptions(options){return{...options,event:options,request:typeof options.request==="string"?new Request(options.request):options.request}}executePlugins(options){const handleOptions=this.getHandleOptions(options);return Promise.all(this.plugins.map((plugin=>plugin.fetchDidSucceed({request:handleOptions.request}))))}handle(options){this.executePlugins(options);return null}}clientsClaim();self.addEventListener("install",(()=>{self.skipWaiting();const keys=[...Object.values(ResourceCacheKey),BFF_VISUALIZATION_CACHE_KEY];CacheService.invalidateAll(keys)}));registerRoute(urlMachesResourceType(ResourceType.ICON),new DedupCacheFirstStrategy({cacheName:ResourceCacheKey.ICON,plugins:[new ExpirationPlugin({maxAgeSeconds:60*60*24*7,maxEntries:2e3,purgeOnQuotaError:true,matchOptions:{ignoreVary:true}})]}),"GET");registerRoute(urlMachesResourceType(ResourceType.IMAGE),new DedupStaleWhileRevalidateStrategy({cacheName:ResourceCacheKey.IMAGE,plugins:[new ExpirationPlugin({maxEntries:50,matchOptions:{ignoreVary:true}})]}),"GET");registerRoute(urlMachesResourceType(ResourceType.IMAGE,true),new PassThroughStrategy({plugins:[new CacheInvalidatePlugin({cacheName:ResourceCacheKey.IMAGE})]}),"PUT");registerRoute(urlMachesResourceType(ResourceType.MODEL),new DedupStaleWhileRevalidateStrategy({cacheName:ResourceCacheKey.MODEL,plugins:[new ExpirationPlugin({maxEntries:8,matchOptions:{ignoreVary:true}}),new CacheKeyPlugin({headers:["Accept"]})]}),"GET");registerRoute(urlMachesResourceType(ResourceType.MODEL,true),new PassThroughStrategy({plugins:[new CacheInvalidatePlugin({cacheName:ResourceCacheKey.MODEL})]}),"PUT");registerRoute((({url})=>url.origin===Config.getValue("BFF_API_ADDRESS")&&url.pathname.startsWith("/visualization/")),new DedupStaleWhileRevalidateStrategy({cacheName:BFF_VISUALIZATION_CACHE_KEY,plugins:[new ExpirationPlugin({maxEntries:100,matchOptions:{ignoreVary:true}}),new BroadcastUpdatePlugin,new CacheKeyPlugin({headers:["Tenant"]})]}),"GET");registerRoute((({url})=>url.origin===Config.getValue("VISUALIZATION_API_ADDRESS")&&url.pathname.startsWith("/visualization")),new PassThroughStrategy({plugins:[new CacheInvalidatePlugin({cacheName:BFF_VISUALIZATION_CACHE_KEY})]}),"PUT")})();
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { CallbackFunctionData, InitData, PostMessageEvent } from '../events/Events';
|
|
2
|
+
interface CallbackAction {
|
|
3
|
+
name: string;
|
|
4
|
+
callback: (data: any) => void;
|
|
5
|
+
}
|
|
6
|
+
export interface HoparaIframeConfig extends InitData {
|
|
7
|
+
targetElementId?: string;
|
|
8
|
+
targetElement?: HTMLElement | null;
|
|
9
|
+
version?: string;
|
|
10
|
+
debug?: boolean;
|
|
11
|
+
embeddedUrl?: string;
|
|
12
|
+
callbacks?: CallbackAction[];
|
|
13
|
+
}
|
|
14
|
+
export declare class Hopara {
|
|
15
|
+
private static _version;
|
|
16
|
+
config: HoparaIframeConfig;
|
|
17
|
+
private iframe?;
|
|
18
|
+
private readyEventTimeoutId?;
|
|
19
|
+
private readonly readyEventTimeoutMs;
|
|
20
|
+
constructor(config: HoparaIframeConfig);
|
|
21
|
+
private getIframeSrc;
|
|
22
|
+
private getIframeStyle;
|
|
23
|
+
private createIframe;
|
|
24
|
+
private getEventData;
|
|
25
|
+
private handleReadyEvent;
|
|
26
|
+
private handleLoadDataEvent;
|
|
27
|
+
handleCallbackFunctionEvent(event: PostMessageEvent<CallbackFunctionData>): void;
|
|
28
|
+
listenerFunction(event: PostMessageEvent<any>): void | Promise<void>;
|
|
29
|
+
private cachedListenerFunction;
|
|
30
|
+
private createListeners;
|
|
31
|
+
private removeListeners;
|
|
32
|
+
private scheduleReadyEventTimeout;
|
|
33
|
+
private clearReadyEventTimeout;
|
|
34
|
+
private reloadTargetWindow;
|
|
35
|
+
private doInit;
|
|
36
|
+
refresh(): void;
|
|
37
|
+
update(config: Partial<HoparaIframeConfig>): void;
|
|
38
|
+
destroy(): void;
|
|
39
|
+
static init(config: HoparaIframeConfig): Hopara | undefined;
|
|
40
|
+
static moduleVersion(): string;
|
|
41
|
+
moduleVersion(): string;
|
|
42
|
+
}
|
|
43
|
+
export default Hopara;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { DataLoader, FilterSet, LoaderResponse } from '@hopara/dataset';
|
|
2
|
+
import { Row } from '@hopara/dataset';
|
|
3
|
+
export declare class EventEmitter {
|
|
4
|
+
private static sendMessage;
|
|
5
|
+
static ready(): void;
|
|
6
|
+
static init(config: any, targetWindow: Window): void;
|
|
7
|
+
static loadDataRequest(dataLoader: Partial<DataLoader>, filterSet: FilterSet): void;
|
|
8
|
+
static getRows(response: any, error?: Error): any;
|
|
9
|
+
static getColumns(response: any, error?: Error): any;
|
|
10
|
+
static getError(response: any, error?: Error): Error | undefined;
|
|
11
|
+
static loadDataResponse(config: any, dataLoader: Partial<DataLoader>, response: any[] | LoaderResponse, error: Error | undefined, targetWindow: Window): void;
|
|
12
|
+
static refresh(config: any, targetWindow: Window): void;
|
|
13
|
+
static update(config: any, targetWindow: Window): void;
|
|
14
|
+
static callback(name: string, row: Row): void;
|
|
15
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { ConfigEnvironment } from '@hopara/config';
|
|
2
|
+
import { FilterSet } from '@hopara/dataset';
|
|
3
|
+
import { Position } from '@hopara/components/src/view-state/ViewState';
|
|
4
|
+
import { SelectedFilter } from '@hopara/components/src/filter/domain/SelectedFilter';
|
|
5
|
+
import { InitialRow } from '@hopara/components/src/initial-row/InitialRow';
|
|
6
|
+
import { PlainError } from '@hopara/dataset/src/repository/LoaderDatasetRepository';
|
|
7
|
+
import { PlainDataLoader } from '@hopara/dataset/src/loader/DataLoader';
|
|
8
|
+
import { HoparaTab } from '../view/Provider';
|
|
9
|
+
import { Language } from '@hopara/browser';
|
|
10
|
+
export declare enum EventType {
|
|
11
|
+
INIT = "init",
|
|
12
|
+
READY = "ready",
|
|
13
|
+
UPDATE = "update",
|
|
14
|
+
LOAD_DATA = "loadData",
|
|
15
|
+
LOAD_DATA_RESPONSE = "loadDataResponse",
|
|
16
|
+
UPDATE_DATA = "updateData",
|
|
17
|
+
UPDATE_DATA_RESPONSE = "updateDataResponse",
|
|
18
|
+
REFRESH = "refresh",
|
|
19
|
+
FUNCTION_CALLBACK = "functionCallback"
|
|
20
|
+
}
|
|
21
|
+
export declare const HOPARA_EVENT_TYPE = "__hopara__eventType__";
|
|
22
|
+
export interface EventData {
|
|
23
|
+
[HOPARA_EVENT_TYPE]?: EventType;
|
|
24
|
+
}
|
|
25
|
+
export interface InitData extends EventData {
|
|
26
|
+
accessToken?: string;
|
|
27
|
+
refreshToken?: string;
|
|
28
|
+
visualizationId?: string;
|
|
29
|
+
fallbackVisualizationId?: string;
|
|
30
|
+
visualizationScope?: string;
|
|
31
|
+
tenant?: string;
|
|
32
|
+
env?: ConfigEnvironment;
|
|
33
|
+
initialPosition?: Position;
|
|
34
|
+
initialRow?: InitialRow;
|
|
35
|
+
dataLoaders?: PlainDataLoader[];
|
|
36
|
+
darkMode?: boolean;
|
|
37
|
+
callbackNames?: string[];
|
|
38
|
+
filters?: Partial<SelectedFilter>[];
|
|
39
|
+
language?: Language | `${Language}`;
|
|
40
|
+
initialTab?: HoparaTab | `${HoparaTab}`;
|
|
41
|
+
navigationControls?: boolean;
|
|
42
|
+
}
|
|
43
|
+
export interface LoadDataRequestData extends EventData {
|
|
44
|
+
data: {
|
|
45
|
+
query: string;
|
|
46
|
+
source: string;
|
|
47
|
+
};
|
|
48
|
+
filterSet: FilterSet;
|
|
49
|
+
}
|
|
50
|
+
export interface LoadDataResponseData extends EventData {
|
|
51
|
+
data: {
|
|
52
|
+
query: string;
|
|
53
|
+
source: string;
|
|
54
|
+
};
|
|
55
|
+
rows: any[];
|
|
56
|
+
columns: any[];
|
|
57
|
+
error?: PlainError;
|
|
58
|
+
}
|
|
59
|
+
export interface CallbackFunctionData extends EventData {
|
|
60
|
+
name: string;
|
|
61
|
+
row: any;
|
|
62
|
+
}
|
|
63
|
+
export interface PostMessageEvent<D> extends MessageEvent {
|
|
64
|
+
origin: string;
|
|
65
|
+
data: D;
|
|
66
|
+
}
|
|
67
|
+
export declare const isReadyEvent: (event: PostMessageEvent<EventData>) => event is PostMessageEvent<EventData>;
|
|
68
|
+
export declare const isLoadDataEvent: (event: PostMessageEvent<EventData>) => event is PostMessageEvent<LoadDataRequestData>;
|
|
69
|
+
export declare const isCallbackFunctionEvent: (event: PostMessageEvent<EventData>) => event is PostMessageEvent<CallbackFunctionData>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const anyFn: () => {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@hopara/service-worker';
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { InitialRow } from '@hopara/components/src/initial-row/InitialRow';
|
|
3
|
+
import { HoparaController } from '@hopara/components/src/hoc/HoparaController';
|
|
4
|
+
import { ConfigEnvironment } from '@hopara/config';
|
|
5
|
+
import { CallbackFunction } from '@hopara/components/src/action/ActionReducer';
|
|
6
|
+
import { SelectedFilter } from '@hopara/components/src/filter/domain/SelectedFilter';
|
|
7
|
+
import { Authorization } from '@hopara/authorization';
|
|
8
|
+
import { FilterStore } from '@hopara/components/src/filter/state/FilterStore';
|
|
9
|
+
import QueryStore from '@hopara/components/src/query/QueryStore';
|
|
10
|
+
import { PlainDataLoader } from '@hopara/dataset/src/loader/DataLoader';
|
|
11
|
+
import { Language } from '@hopara/browser';
|
|
12
|
+
export declare enum HoparaTab {
|
|
13
|
+
OBJECTS = "objects",
|
|
14
|
+
LAYERS = "layers",
|
|
15
|
+
SETTINGS = "settings",
|
|
16
|
+
VISUALIZATION = "visualization"
|
|
17
|
+
}
|
|
18
|
+
export type EmbeddedProps = {
|
|
19
|
+
env?: ConfigEnvironment;
|
|
20
|
+
visualizationId: string;
|
|
21
|
+
fallbackVisualizationId?: string;
|
|
22
|
+
visualizationScope?: string;
|
|
23
|
+
accessToken: string;
|
|
24
|
+
refreshToken?: string;
|
|
25
|
+
tenant?: string;
|
|
26
|
+
dataLoaders?: PlainDataLoader[];
|
|
27
|
+
initialRow?: InitialRow;
|
|
28
|
+
controller?: HoparaController;
|
|
29
|
+
darkMode?: boolean;
|
|
30
|
+
callbacks?: CallbackFunction[];
|
|
31
|
+
attribution?: boolean;
|
|
32
|
+
filters?: Partial<SelectedFilter>[];
|
|
33
|
+
language?: Language;
|
|
34
|
+
initialTab?: HoparaTab;
|
|
35
|
+
navigationControls?: boolean;
|
|
36
|
+
};
|
|
37
|
+
interface ProviderStateProps extends EmbeddedProps {
|
|
38
|
+
stateVisualizationId: string;
|
|
39
|
+
stateFallbackVisualizationId: string;
|
|
40
|
+
stateTenant: string;
|
|
41
|
+
stateAuthorization?: Authorization;
|
|
42
|
+
filterStore: FilterStore;
|
|
43
|
+
queryStore: QueryStore;
|
|
44
|
+
}
|
|
45
|
+
interface ProviderStateActions {
|
|
46
|
+
onLoad: (navigateToTabUrl: any) => void;
|
|
47
|
+
onUpdate: () => void;
|
|
48
|
+
onVisualizationChanged: (navigateFn: any, tenant: string) => void;
|
|
49
|
+
forceRefresh: () => void;
|
|
50
|
+
onTabChange: (navigateFn: any, tab: HoparaTab) => void;
|
|
51
|
+
}
|
|
52
|
+
export declare const EmbeddedProvider: import("react-redux").ConnectedComponent<(props: ProviderStateProps & ProviderStateActions) => import("react/jsx-runtime").JSX.Element, {
|
|
53
|
+
env?: ConfigEnvironment | undefined;
|
|
54
|
+
visualizationId: string;
|
|
55
|
+
fallbackVisualizationId?: string | undefined;
|
|
56
|
+
visualizationScope?: string | undefined;
|
|
57
|
+
accessToken: string;
|
|
58
|
+
refreshToken?: string | undefined;
|
|
59
|
+
tenant?: string | undefined;
|
|
60
|
+
dataLoaders?: PlainDataLoader[] | undefined;
|
|
61
|
+
initialRow?: InitialRow | undefined;
|
|
62
|
+
controller?: HoparaController | undefined;
|
|
63
|
+
darkMode?: boolean | undefined;
|
|
64
|
+
callbacks?: CallbackFunction[] | undefined;
|
|
65
|
+
attribution?: boolean | undefined;
|
|
66
|
+
filters?: Partial<SelectedFilter>[] | undefined;
|
|
67
|
+
language?: Language | undefined;
|
|
68
|
+
initialTab?: HoparaTab | undefined;
|
|
69
|
+
navigationControls?: boolean | undefined;
|
|
70
|
+
context?: React.Context<import("react-redux").ReactReduxContextValue<any, import("redux").AnyAction>> | undefined;
|
|
71
|
+
store?: import("redux").Store<any, import("redux").AnyAction> | undefined;
|
|
72
|
+
}>;
|
|
73
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Router: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { EmbeddedProps } from './Provider';
|
|
3
|
+
import { InitData, PostMessageEvent } from '../events/Events';
|
|
4
|
+
import { PureComponent } from '@hopara/design-system';
|
|
5
|
+
type Props = {
|
|
6
|
+
children?: React.ReactElement;
|
|
7
|
+
};
|
|
8
|
+
export declare class View extends PureComponent<Props, EmbeddedProps> {
|
|
9
|
+
constructor(props: any);
|
|
10
|
+
private dataLoaderAsPostMessage;
|
|
11
|
+
private callbacksAsPostMessage;
|
|
12
|
+
private getVisualizationId;
|
|
13
|
+
handleInitEvent(event: PostMessageEvent<InitData>, callback?: () => void): void;
|
|
14
|
+
private shouldSkipEvent;
|
|
15
|
+
initMessageListener(event: PostMessageEvent<InitData>): void;
|
|
16
|
+
cachedInitMessageListener: EventListenerOrEventListenerObject;
|
|
17
|
+
registerToReceiveMessage(): void;
|
|
18
|
+
cachedRegisterToReceiveMessage: any;
|
|
19
|
+
componentDidMount(): void;
|
|
20
|
+
unregisterToReceiveMessage(): void;
|
|
21
|
+
componentWillUnmount(): void;
|
|
22
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|