@abtnode/webapp 1.16.20-beta-20c7fb25 → 1.16.20-beta-e32e39d7
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/blocklet.yml +1 -1
- package/build/asset-manifest.json +4 -4
- package/build/index.html +1 -1
- package/build/service-worker.js +1 -1
- package/build/static/js/4775.b0cede7b.chunk.js +1 -0
- package/build/static/js/9277.babc5673.chunk.js +1 -0
- package/build/static/js/{main.6b6478e4.js → main.c88b220e.js} +2 -2
- package/package.json +1 -1
- package/build/static/js/4775.c9c59b2e.chunk.js +0 -1
- package/build/static/js/9277.b9c7a9e7.chunk.js +0 -1
- /package/build/static/js/{main.6b6478e4.js.LICENSE.txt → main.c88b220e.js.LICENSE.txt} +0 -0
package/blocklet.yml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"files": {
|
|
3
3
|
"main.css": "./static/css/main.c9e90622.css",
|
|
4
|
-
"main.js": "./static/js/main.
|
|
4
|
+
"main.js": "./static/js/main.c88b220e.js",
|
|
5
5
|
"static/js/9041.77cacdd7.chunk.js": "./static/js/9041.77cacdd7.chunk.js",
|
|
6
6
|
"static/js/2960.6a54b27f.chunk.js": "./static/js/2960.6a54b27f.chunk.js",
|
|
7
7
|
"static/js/3389.72b7e591.chunk.js": "./static/js/3389.72b7e591.chunk.js",
|
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
"static/js/1366.da3d7a8e.chunk.js": "./static/js/1366.da3d7a8e.chunk.js",
|
|
23
23
|
"static/js/6580.8cdb4aa4.chunk.js": "./static/js/6580.8cdb4aa4.chunk.js",
|
|
24
24
|
"static/js/2365.a3571172.chunk.js": "./static/js/2365.a3571172.chunk.js",
|
|
25
|
-
"static/js/9277.
|
|
25
|
+
"static/js/9277.babc5673.chunk.js": "./static/js/9277.babc5673.chunk.js",
|
|
26
26
|
"static/css/8973.9cab926a.chunk.css": "./static/css/8973.9cab926a.chunk.css",
|
|
27
27
|
"static/js/8973.639c0cf3.chunk.js": "./static/js/8973.639c0cf3.chunk.js",
|
|
28
|
-
"static/js/4775.
|
|
28
|
+
"static/js/4775.b0cede7b.chunk.js": "./static/js/4775.b0cede7b.chunk.js",
|
|
29
29
|
"static/js/8986.0c6ecc50.chunk.js": "./static/js/8986.0c6ecc50.chunk.js",
|
|
30
30
|
"static/js/2537.a919ce43.chunk.js": "./static/js/2537.a919ce43.chunk.js",
|
|
31
31
|
"static/js/3216.4aabeb78.chunk.js": "./static/js/3216.4aabeb78.chunk.js",
|
|
@@ -131,6 +131,6 @@
|
|
|
131
131
|
},
|
|
132
132
|
"entrypoints": [
|
|
133
133
|
"static/css/main.c9e90622.css",
|
|
134
|
-
"static/js/main.
|
|
134
|
+
"static/js/main.c88b220e.js"
|
|
135
135
|
]
|
|
136
136
|
}
|
package/build/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!doctype html><html lang="en"><head><base href="/"/><meta charset="utf-8"/><link rel="shortcut icon" href="favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"/><meta name="theme-color" content="#000000"/><script>"https:"===window.location.protocol&&document.write('<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests" />')</script><link rel="manifest" href="manifest.json"/><link rel="stylesheet" href="icons/css/all.css"/><title>Blocklet Server</title><script src="api/env"></script><script defer="defer" src="./static/js/main.
|
|
1
|
+
<!doctype html><html lang="en"><head><base href="/"/><meta charset="utf-8"/><link rel="shortcut icon" href="favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"/><meta name="theme-color" content="#000000"/><script>"https:"===window.location.protocol&&document.write('<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests" />')</script><link rel="manifest" href="manifest.json"/><link rel="stylesheet" href="icons/css/all.css"/><title>Blocklet Server</title><script src="api/env"></script><script defer="defer" src="./static/js/main.c88b220e.js"></script><link href="./static/css/main.c9e90622.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
package/build/service-worker.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e={522:()=>{try{self["workbox:core:6.5.3"]&&_()}catch(e){}},434:()=>{try{self["workbox:expiration:6.5.3"]&&_()}catch(e){}},290:()=>{try{self["workbox:precaching:6.5.3"]&&_()}catch(e){}},92:()=>{try{self["workbox:routing:6.5.3"]&&_()}catch(e){}},559:()=>{try{self["workbox:strategies:6.5.3"]&&_()}catch(e){}}},t={};function s(n){var a=t[n];if(void 0!==a)return a.exports;var r=t[n]={exports:{}};return e[n](r,r.exports,s),r.exports}(()=>{s(522);const e=function(e){let t=e;for(var s=arguments.length,n=new Array(s>1?s-1:0),a=1;a<s;a++)n[a-1]=arguments[a];return n.length>0&&(t+=" :: ".concat(JSON.stringify(n))),t};class t extends Error{constructor(t,s){super(e(t,s)),this.name=t,this.details=s}}const n=new Set;const a={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!==typeof registration?registration.scope:""},r=e=>[a.prefix,e,a.suffix].filter((e=>e&&e.length>0)).join("-"),i=e=>e||r(a.precache),c=e=>e||r(a.runtime);function o(e,t){const s=new URL(e);for(const n of t)s.searchParams.delete(n);return s.href}let h;function l(e){e.then((()=>{}))}class u{constructor(){this.promise=new Promise(((e,t)=>{this.resolve=e,this.reject=t}))}}const d=e=>new URL(String(e),location.href).href.replace(new RegExp("^".concat(location.origin)),"");function f(e,t){const s=t();return e.waitUntil(s),s}async function p(e,s){let n=null;if(e.url){n=new URL(e.url).origin}if(n!==self.location.origin)throw new t("cross-origin-copy-response",{origin:n});const a=e.clone(),r={headers:new Headers(a.headers),status:a.status,statusText:a.statusText},i=s?s(r):r,c=function(){if(void 0===h){const t=new Response("");if("body"in t)try{new Response(t.body),h=!0}catch(e){h=!1}h=!1}return h}()?a.body:await a.blob();return new Response(c,i)}s(290);function g(e){if(!e)throw new t("add-to-cache-list-unexpected-type",{entry:e});if("string"===typeof e){const t=new URL(e,location.href);return{cacheKey:t.href,url:t.href}}const{revision:s,url:n}=e;if(!n)throw new t("add-to-cache-list-unexpected-type",{entry:e});if(!s){const e=new URL(n,location.href);return{cacheKey:e.href,url:e.href}}const a=new URL(n,location.href),r=new URL(n,location.href);return a.searchParams.set("__WB_REVISION__",s),{cacheKey:a.href,url:r.href}}class w{constructor(){this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=async e=>{let{request:t,state:s}=e;s&&(s.originalRequest=t)},this.cachedResponseWillBeUsed=async e=>{let{event:t,state:s,cachedResponse:n}=e;if("install"===t.type&&s&&s.originalRequest&&s.originalRequest instanceof Request){const e=s.originalRequest.url;n?this.notUpdatedURLs.push(e):this.updatedURLs.push(e)}return n}}}class y{constructor(e){let{precacheController:t}=e;this.cacheKeyWillBeUsed=async e=>{let{request:t,params:s}=e;const n=(null===s||void 0===s?void 0:s.cacheKey)||this._precacheController.getCacheKeyForURL(t.url);return n?new Request(n,{headers:t.headers}):t},this._precacheController=t}}s(559);function m(e){return"string"===typeof e?new Request(e):e}class _{constructor(e,t){this._cacheKeys={},Object.assign(this,t),this.event=t.event,this._strategy=e,this._handlerDeferred=new u,this._extendLifetimePromises=[],this._plugins=[...e.plugins],this._pluginStateMap=new Map;for(const s of this._plugins)this._pluginStateMap.set(s,{});this.event.waitUntil(this._handlerDeferred.promise)}async fetch(e){const{event:s}=this;let n=m(e);if("navigate"===n.mode&&s instanceof FetchEvent&&s.preloadResponse){const e=await s.preloadResponse;if(e)return e}const a=this.hasCallback("fetchDidFail")?n.clone():null;try{for(const e of this.iterateCallbacks("requestWillFetch"))n=await e({request:n.clone(),event:s})}catch(i){if(i instanceof Error)throw new t("plugin-error-request-will-fetch",{thrownErrorMessage:i.message})}const r=n.clone();try{let e;e=await fetch(n,"navigate"===n.mode?void 0:this._strategy.fetchOptions);for(const t of this.iterateCallbacks("fetchDidSucceed"))e=await t({event:s,request:r,response:e});return e}catch(c){throw a&&await this.runCallbacks("fetchDidFail",{error:c,event:s,originalRequest:a.clone(),request:r.clone()}),c}}async fetchAndCachePut(e){const t=await this.fetch(e),s=t.clone();return this.waitUntil(this.cachePut(e,s)),t}async cacheMatch(e){const t=m(e);let s;const{cacheName:n,matchOptions:a}=this._strategy,r=await this.getCacheKey(t,"read"),i=Object.assign(Object.assign({},a),{cacheName:n});s=await caches.match(r,i);for(const c of this.iterateCallbacks("cachedResponseWillBeUsed"))s=await c({cacheName:n,matchOptions:a,cachedResponse:s,request:r,event:this.event})||void 0;return s}async cachePut(e,s){const a=m(e);var r;await(r=0,new Promise((e=>setTimeout(e,r))));const i=await this.getCacheKey(a,"write");if(!s)throw new t("cache-put-with-no-response",{url:d(i.url)});const c=await this._ensureResponseSafeToCache(s);if(!c)return!1;const{cacheName:h,matchOptions:l}=this._strategy,u=await self.caches.open(h),f=this.hasCallback("cacheDidUpdate"),p=f?await async function(e,t,s,n){const a=o(t.url,s);if(t.url===a)return e.match(t,n);const r=Object.assign(Object.assign({},n),{ignoreSearch:!0}),i=await e.keys(t,r);for(const c of i)if(a===o(c.url,s))return e.match(c,n)}(u,i.clone(),["__WB_REVISION__"],l):null;try{await u.put(i,f?c.clone():c)}catch(g){if(g instanceof Error)throw"QuotaExceededError"===g.name&&await async function(){for(const e of n)await e()}(),g}for(const t of this.iterateCallbacks("cacheDidUpdate"))await t({cacheName:h,oldResponse:p,newResponse:c.clone(),request:i,event:this.event});return!0}async getCacheKey(e,t){const s="".concat(e.url," | ").concat(t);if(!this._cacheKeys[s]){let n=e;for(const e of this.iterateCallbacks("cacheKeyWillBeUsed"))n=m(await e({mode:t,request:n,event:this.event,params:this.params}));this._cacheKeys[s]=n}return this._cacheKeys[s]}hasCallback(e){for(const t of this._strategy.plugins)if(e in t)return!0;return!1}async runCallbacks(e,t){for(const s of this.iterateCallbacks(e))await s(t)}*iterateCallbacks(e){for(const t of this._strategy.plugins)if("function"===typeof t[e]){const s=this._pluginStateMap.get(t),n=n=>{const a=Object.assign(Object.assign({},n),{state:s});return t[e](a)};yield n}}waitUntil(e){return this._extendLifetimePromises.push(e),e}async doneWaiting(){let e;for(;e=this._extendLifetimePromises.shift();)await e}destroy(){this._handlerDeferred.resolve(null)}async _ensureResponseSafeToCache(e){let t=e,s=!1;for(const n of this.iterateCallbacks("cacheWillUpdate"))if(t=await n({request:this.request,response:t,event:this.event})||void 0,s=!0,!t)break;return s||t&&200!==t.status&&(t=void 0),t}}class v{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.cacheName=c(e.cacheName),this.plugins=e.plugins||[],this.fetchOptions=e.fetchOptions,this.matchOptions=e.matchOptions}handle(e){const[t]=this.handleAll(e);return t}handleAll(e){e instanceof FetchEvent&&(e={event:e,request:e.request});const t=e.event,s="string"===typeof e.request?new Request(e.request):e.request,n="params"in e?e.params:void 0,a=new _(this,{event:t,request:s,params:n}),r=this._getResponse(a,s,t);return[r,this._awaitComplete(r,a,s,t)]}async _getResponse(e,s,n){let a;await e.runCallbacks("handlerWillStart",{event:n,request:s});try{if(a=await this._handle(s,e),!a||"error"===a.type)throw new t("no-response",{url:s.url})}catch(r){if(r instanceof Error)for(const t of e.iterateCallbacks("handlerDidError"))if(a=await t({error:r,event:n,request:s}),a)break;if(!a)throw r}for(const t of e.iterateCallbacks("handlerWillRespond"))a=await t({event:n,request:s,response:a});return a}async _awaitComplete(e,t,s,n){let a,r;try{a=await e}catch(r){}try{await t.runCallbacks("handlerDidRespond",{event:n,request:s,response:a}),await t.doneWaiting()}catch(i){i instanceof Error&&(r=i)}if(await t.runCallbacks("handlerDidComplete",{event:n,request:s,response:a,error:r}),t.destroy(),r)throw r}}class b extends v{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.cacheName=i(e.cacheName),super(e),this._fallbackToNetwork=!1!==e.fallbackToNetwork,this.plugins.push(b.copyRedirectedCacheableResponsesPlugin)}async _handle(e,t){const s=await t.cacheMatch(e);return s||(t.event&&"install"===t.event.type?await this._handleInstall(e,t):await this._handleFetch(e,t))}async _handleFetch(e,s){let n;const a=s.params||{};if(!this._fallbackToNetwork)throw new t("missing-precache-entry",{cacheName:this.cacheName,url:e.url});{0;const t=a.integrity,r=e.integrity,i=!r||r===t;if(n=await s.fetch(new Request(e,{integrity:"no-cors"!==e.mode?r||t:void 0})),t&&i&&"no-cors"!==e.mode){this._useDefaultCacheabilityPluginIfNeeded();await s.cachePut(e,n.clone());0}}return n}async _handleInstall(e,s){this._useDefaultCacheabilityPluginIfNeeded();const n=await s.fetch(e);if(!await s.cachePut(e,n.clone()))throw new t("bad-precaching-response",{url:e.url,status:n.status});return n}_useDefaultCacheabilityPluginIfNeeded(){let e=null,t=0;for(const[s,n]of this.plugins.entries())n!==b.copyRedirectedCacheableResponsesPlugin&&(n===b.defaultPrecacheCacheabilityPlugin&&(e=s),n.cacheWillUpdate&&t++);0===t?this.plugins.push(b.defaultPrecacheCacheabilityPlugin):t>1&&null!==e&&this.plugins.splice(e,1)}}b.defaultPrecacheCacheabilityPlugin={async cacheWillUpdate(e){let{response:t}=e;return!t||t.status>=400?null:t}},b.copyRedirectedCacheableResponsesPlugin={async cacheWillUpdate(e){let{response:t}=e;return t.redirected?await p(t):t}};class R{constructor(){let{cacheName:e,plugins:t=[],fallbackToNetwork:s=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._urlsToCacheKeys=new Map,this._urlsToCacheModes=new Map,this._cacheKeysToIntegrities=new Map,this._strategy=new b({cacheName:i(e),plugins:[...t,new y({precacheController:this})],fallbackToNetwork:s}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this._strategy}precache(e){this.addToCacheList(e),this._installAndActiveListenersAdded||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this._installAndActiveListenersAdded=!0)}addToCacheList(e){const s=[];for(const n of e){"string"===typeof n?s.push(n):n&&void 0===n.revision&&s.push(n.url);const{cacheKey:e,url:a}=g(n),r="string"!==typeof n&&n.revision?"reload":"default";if(this._urlsToCacheKeys.has(a)&&this._urlsToCacheKeys.get(a)!==e)throw new t("add-to-cache-list-conflicting-entries",{firstEntry:this._urlsToCacheKeys.get(a),secondEntry:e});if("string"!==typeof n&&n.integrity){if(this._cacheKeysToIntegrities.has(e)&&this._cacheKeysToIntegrities.get(e)!==n.integrity)throw new t("add-to-cache-list-conflicting-integrities",{url:a});this._cacheKeysToIntegrities.set(e,n.integrity)}if(this._urlsToCacheKeys.set(a,e),this._urlsToCacheModes.set(a,r),s.length>0){const e="Workbox is precaching URLs without revision "+"info: ".concat(s.join(", "),"\nThis is generally NOT safe. ")+"Learn more at https://bit.ly/wb-precache";console.warn(e)}}}install(e){return f(e,(async()=>{const t=new w;this.strategy.plugins.push(t);for(const[a,r]of this._urlsToCacheKeys){const t=this._cacheKeysToIntegrities.get(r),s=this._urlsToCacheModes.get(a),n=new Request(a,{integrity:t,cache:s,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:r},request:n,event:e}))}const{updatedURLs:s,notUpdatedURLs:n}=t;return{updatedURLs:s,notUpdatedURLs:n}}))}activate(e){return f(e,(async()=>{const e=await self.caches.open(this.strategy.cacheName),t=await e.keys(),s=new Set(this._urlsToCacheKeys.values()),n=[];for(const a of t)s.has(a.url)||(await e.delete(a),n.push(a.url));return{deletedURLs:n}}))}getURLsToCacheKeys(){return this._urlsToCacheKeys}getCachedURLs(){return[...this._urlsToCacheKeys.keys()]}getCacheKeyForURL(e){const t=new URL(e,location.href);return this._urlsToCacheKeys.get(t.href)}getIntegrityForCacheKey(e){return this._cacheKeysToIntegrities.get(e)}async matchPrecache(e){const t=e instanceof Request?e.url:e,s=this.getCacheKeyForURL(t);if(s){return(await self.caches.open(this.strategy.cacheName)).match(s)}}createHandlerBoundToURL(e){const s=this.getCacheKeyForURL(e);if(!s)throw new t("non-precached-url",{url:e});return t=>(t.request=new Request(e),t.params=Object.assign({cacheKey:s},t.params),this.strategy.handle(t))}}let x;const C=()=>(x||(x=new R),x);s(92);const E=e=>e&&"object"===typeof e?e:{handle:e};class L{constructor(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"GET";this.handler=E(t),this.match=e,this.method=s}setCatchHandler(e){this.catchHandler=E(e)}}class q extends L{constructor(e,t,s){super((t=>{let{url:s}=t;const n=e.exec(s.href);if(n&&(s.origin===location.origin||0===n.index))return n.slice(1)}),t,s)}}class D{constructor(){this._routes=new Map,this._defaultHandlerMap=new Map}get routes(){return this._routes}addFetchListener(){self.addEventListener("fetch",(e=>{const{request:t}=e,s=this.handleRequest({request:t,event:e});s&&e.respondWith(s)}))}addCacheListener(){self.addEventListener("message",(e=>{if(e.data&&"CACHE_URLS"===e.data.type){const{payload:t}=e.data;0;const s=Promise.all(t.urlsToCache.map((t=>{"string"===typeof t&&(t=[t]);const s=new Request(...t);return this.handleRequest({request:s,event:e})})));e.waitUntil(s),e.ports&&e.ports[0]&&s.then((()=>e.ports[0].postMessage(!0)))}}))}handleRequest(e){let{request:t,event:s}=e;const n=new URL(t.url,location.href);if(!n.protocol.startsWith("http"))return void 0;const a=n.origin===location.origin,{params:r,route:i}=this.findMatchingRoute({event:s,request:t,sameOrigin:a,url:n});let c=i&&i.handler;const o=t.method;if(!c&&this._defaultHandlerMap.has(o)&&(c=this._defaultHandlerMap.get(o)),!c)return void 0;let h;try{h=c.handle({url:n,request:t,event:s,params:r})}catch(u){h=Promise.reject(u)}const l=i&&i.catchHandler;return h instanceof Promise&&(this._catchHandler||l)&&(h=h.catch((async e=>{if(l){0;try{return await l.handle({url:n,request:t,event:s,params:r})}catch(a){a instanceof Error&&(e=a)}}if(this._catchHandler)return this._catchHandler.handle({url:n,request:t,event:s});throw e}))),h}findMatchingRoute(e){let{url:t,sameOrigin:s,request:n,event:a}=e;const r=this._routes.get(n.method)||[];for(const i of r){let e;const r=i.match({url:t,sameOrigin:s,request:n,event:a});if(r)return e=r,(Array.isArray(e)&&0===e.length||r.constructor===Object&&0===Object.keys(r).length||"boolean"===typeof r)&&(e=void 0),{route:i,params:e}}return{}}setDefaultHandler(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GET";this._defaultHandlerMap.set(t,E(e))}setCatchHandler(e){this._catchHandler=E(e)}registerRoute(e){this._routes.has(e.method)||this._routes.set(e.method,[]),this._routes.get(e.method).push(e)}unregisterRoute(e){if(!this._routes.has(e.method))throw new t("unregister-route-but-not-found-with-method",{method:e.method});const s=this._routes.get(e.method).indexOf(e);if(!(s>-1))throw new t("unregister-route-route-not-registered");this._routes.get(e.method).splice(s,1)}}let U;const k=()=>(U||(U=new D,U.addFetchListener(),U.addCacheListener()),U);function T(e,s,n){let a;if("string"===typeof e){const t=new URL(e,location.href);0;a=new L((e=>{let{url:s}=e;return s.href===t.href}),s,n)}else if(e instanceof RegExp)a=new q(e,s,n);else if("function"===typeof e)a=new L(e,s,n);else{if(!(e instanceof L))throw new t("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});a=e}return k().registerRoute(a),a}class N extends L{constructor(e,t){super((s=>{let{request:n}=s;const a=e.getURLsToCacheKeys();for(const r of function(e){let{ignoreURLParametersMatching:t=[/^utm_/,/^fbclid$/],directoryIndex:s="index.html",cleanURLs:n=!0,urlManipulation:a}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){const r=new URL(e,location.href);r.hash="",yield r.href;const i=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];for(const s of[...e.searchParams.keys()])t.some((e=>e.test(s)))&&e.searchParams.delete(s);return e}(r,t);if(yield i.href,s&&i.pathname.endsWith("/")){const e=new URL(i.href);e.pathname+=s,yield e.href}if(n){const e=new URL(i.href);e.pathname+=".html",yield e.href}if(a){const e=a({url:r});for(const t of e)yield t.href}}()}(n.url,t)){const t=a.get(r);if(t){return{cacheKey:t,integrity:e.getIntegrityForCacheKey(t)}}}}),e.strategy)}}const I=(e,t)=>t.some((t=>e instanceof t));let K,M;const A=new WeakMap,P=new WeakMap,S=new WeakMap,O=new WeakMap,W=new WeakMap;let B={get(e,t,s){if(e instanceof IDBTransaction){if("done"===t)return P.get(e);if("objectStoreNames"===t)return e.objectStoreNames||S.get(e);if("store"===t)return s.objectStoreNames[1]?void 0:s.objectStore(s.objectStoreNames[0])}return H(e[t])},set:(e,t,s)=>(e[t]=s,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function j(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(M||(M=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(){for(var t=arguments.length,s=new Array(t),n=0;n<t;n++)s[n]=arguments[n];return e.apply(V(this),s),H(A.get(this))}:function(){for(var t=arguments.length,s=new Array(t),n=0;n<t;n++)s[n]=arguments[n];return H(e.apply(V(this),s))}:function(t){for(var s=arguments.length,n=new Array(s>1?s-1:0),a=1;a<s;a++)n[a-1]=arguments[a];const r=e.call(V(this),t,...n);return S.set(r,t.sort?t.sort():[t]),H(r)}}function F(e){return"function"===typeof e?j(e):(e instanceof IDBTransaction&&function(e){if(P.has(e))return;const t=new Promise(((t,s)=>{const n=()=>{e.removeEventListener("complete",a),e.removeEventListener("error",r),e.removeEventListener("abort",r)},a=()=>{t(),n()},r=()=>{s(e.error||new DOMException("AbortError","AbortError")),n()};e.addEventListener("complete",a),e.addEventListener("error",r),e.addEventListener("abort",r)}));P.set(e,t)}(e),I(e,K||(K=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,B):e)}function H(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,s)=>{const n=()=>{e.removeEventListener("success",a),e.removeEventListener("error",r)},a=()=>{t(H(e.result)),n()},r=()=>{s(e.error),n()};e.addEventListener("success",a),e.addEventListener("error",r)}));return t.then((t=>{t instanceof IDBCursor&&A.set(t,e)})).catch((()=>{})),W.set(t,e),t}(e);if(O.has(e))return O.get(e);const t=F(e);return t!==e&&(O.set(e,t),W.set(t,e)),t}const V=e=>W.get(e);const G=["get","getKey","getAll","getAllKeys","count"],Q=["put","add","delete","clear"],$=new Map;function J(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!==typeof t)return;if($.get(t))return $.get(t);const s=t.replace(/FromIndex$/,""),n=t!==s,a=Q.includes(s);if(!(s in(n?IDBIndex:IDBObjectStore).prototype)||!a&&!G.includes(s))return;const r=async function(e){const t=this.transaction(e,a?"readwrite":"readonly");let r=t.store;for(var i=arguments.length,c=new Array(i>1?i-1:0),o=1;o<i;o++)c[o-1]=arguments[o];return n&&(r=r.index(c.shift())),(await Promise.all([r[s](...c),a&&t.done]))[0]};return $.set(t,r),r}B=(e=>({...e,get:(t,s,n)=>J(t,s)||e.get(t,s,n),has:(t,s)=>!!J(t,s)||e.has(t,s)}))(B);s(434);const z="cache-entries",X=e=>{const t=new URL(e,location.href);return t.hash="",t.href};class Y{constructor(e){this._db=null,this._cacheName=e}_upgradeDb(e){const t=e.createObjectStore(z,{keyPath:"id"});t.createIndex("cacheName","cacheName",{unique:!1}),t.createIndex("timestamp","timestamp",{unique:!1})}_upgradeDbAndDeleteOldDbs(e){this._upgradeDb(e),this._cacheName&&function(e){let{blocked:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const s=indexedDB.deleteDatabase(e);t&&s.addEventListener("blocked",(e=>t(e.oldVersion,e))),H(s).then((()=>{}))}(this._cacheName)}async setTimestamp(e,t){const s={url:e=X(e),timestamp:t,cacheName:this._cacheName,id:this._getId(e)},n=(await this.getDb()).transaction(z,"readwrite",{durability:"relaxed"});await n.store.put(s),await n.done}async getTimestamp(e){const t=await this.getDb(),s=await t.get(z,this._getId(e));return null===s||void 0===s?void 0:s.timestamp}async expireEntries(e,t){const s=await this.getDb();let n=await s.transaction(z).store.index("timestamp").openCursor(null,"prev");const a=[];let r=0;for(;n;){const s=n.value;s.cacheName===this._cacheName&&(e&&s.timestamp<e||t&&r>=t?a.push(n.value):r++),n=await n.continue()}const i=[];for(const c of a)await s.delete(z,c.id),i.push(c.url);return i}_getId(e){return this._cacheName+"|"+X(e)}async getDb(){return this._db||(this._db=await function(e,t){let{blocked:s,upgrade:n,blocking:a,terminated:r}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i=indexedDB.open(e,t),c=H(i);return n&&i.addEventListener("upgradeneeded",(e=>{n(H(i.result),e.oldVersion,e.newVersion,H(i.transaction),e)})),s&&i.addEventListener("blocked",(e=>s(e.oldVersion,e.newVersion,e))),c.then((e=>{r&&e.addEventListener("close",(()=>r())),a&&e.addEventListener("versionchange",(e=>a(e.oldVersion,e.newVersion,e)))})).catch((()=>{})),c}("workbox-expiration",1,{upgrade:this._upgradeDbAndDeleteOldDbs.bind(this)})),this._db}}class Z{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._isRunning=!1,this._rerunRequested=!1,this._maxEntries=t.maxEntries,this._maxAgeSeconds=t.maxAgeSeconds,this._matchOptions=t.matchOptions,this._cacheName=e,this._timestampModel=new Y(e)}async expireEntries(){if(this._isRunning)return void(this._rerunRequested=!0);this._isRunning=!0;const e=this._maxAgeSeconds?Date.now()-1e3*this._maxAgeSeconds:0,t=await this._timestampModel.expireEntries(e,this._maxEntries),s=await self.caches.open(this._cacheName);for(const n of t)await s.delete(n,this._matchOptions);this._isRunning=!1,this._rerunRequested&&(this._rerunRequested=!1,l(this.expireEntries()))}async updateTimestamp(e){await this._timestampModel.setTimestamp(e,Date.now())}async isURLExpired(e){if(this._maxAgeSeconds){const t=await this._timestampModel.getTimestamp(e),s=Date.now()-1e3*this._maxAgeSeconds;return void 0===t||t<s}return!1}async delete(){this._rerunRequested=!1,await this._timestampModel.expireEntries(1/0)}}const ee={cacheWillUpdate:async e=>{let{response:t}=e;return 200===t.status||0===t.status?t:null}};var te;(function(e){C().precache(e)})(([{'revision':'56dd800b2af0f98561c4602e6337f758','url':'./index.html'},{'revision':null,'url':'./static/css/1371.f696fdbf.chunk.css'},{'revision':null,'url':'./static/css/3826.a5e3e6d6.chunk.css'},{'revision':null,'url':'./static/css/4665.5d6e9197.chunk.css'},{'revision':null,'url':'./static/css/7657.cc1ab277.chunk.css'},{'revision':null,'url':'./static/css/7676.7f909312.chunk.css'},{'revision':null,'url':'./static/css/8219.f696fdbf.chunk.css'},{'revision':null,'url':'./static/css/8973.9cab926a.chunk.css'},{'revision':null,'url':'./static/css/main.c9e90622.css'},{'revision':null,'url':'./static/js/1185.4672e754.chunk.js'},{'revision':null,'url':'./static/js/1294.8ccea539.chunk.js'},{'revision':null,'url':'./static/js/1361.c522d24a.chunk.js'},{'revision':null,'url':'./static/js/1366.da3d7a8e.chunk.js'},{'revision':null,'url':'./static/js/1371.08ecc84e.chunk.js'},{'revision':null,'url':'./static/js/1494.35b60e8f.chunk.js'},{'revision':null,'url':'./static/js/1524.dd0af8c0.chunk.js'},{'revision':null,'url':'./static/js/1633.5c43bf43.chunk.js'},{'revision':null,'url':'./static/js/1667.3001639f.chunk.js'},{'revision':null,'url':'./static/js/1685.00ac41cb.chunk.js'},{'revision':null,'url':'./static/js/1826.2ee3d019.chunk.js'},{'revision':null,'url':'./static/js/2129.fd2cfa2b.chunk.js'},{'revision':null,'url':'./static/js/2168.0e7f9ae7.chunk.js'},{'revision':null,'url':'./static/js/2294.6d1e1f1d.chunk.js'},{'revision':null,'url':'./static/js/2334.311ae46d.chunk.js'},{'revision':null,'url':'./static/js/2365.a3571172.chunk.js'},{'revision':null,'url':'./static/js/2529.061c5064.chunk.js'},{'revision':null,'url':'./static/js/253.e339f2b0.chunk.js'},{'revision':null,'url':'./static/js/2537.a919ce43.chunk.js'},{'revision':null,'url':'./static/js/2564.777b4d9f.chunk.js'},{'revision':null,'url':'./static/js/2611.3b62474f.chunk.js'},{'revision':null,'url':'./static/js/271.f7901bf2.chunk.js'},{'revision':null,'url':'./static/js/2720.147ae463.chunk.js'},{'revision':null,'url':'./static/js/2828.89d42424.chunk.js'},{'revision':null,'url':'./static/js/2911.92a82b04.chunk.js'},{'revision':null,'url':'./static/js/2960.6a54b27f.chunk.js'},{'revision':null,'url':'./static/js/3111.f44a8d78.chunk.js'},{'revision':null,'url':'./static/js/3135.f99a1aa8.chunk.js'},{'revision':null,'url':'./static/js/3137.93dab4d8.chunk.js'},{'revision':null,'url':'./static/js/3216.4aabeb78.chunk.js'},{'revision':null,'url':'./static/js/3389.72b7e591.chunk.js'},{'revision':null,'url':'./static/js/3476.47d6170f.chunk.js'},{'revision':null,'url':'./static/js/3633.02809898.chunk.js'},{'revision':null,'url':'./static/js/3732.d5b401f7.chunk.js'},{'revision':null,'url':'./static/js/3826.d40f6fa7.chunk.js'},{'revision':null,'url':'./static/js/3829.2ca489ad.chunk.js'},{'revision':null,'url':'./static/js/3883.46d0ebdd.chunk.js'},{'revision':null,'url':'./static/js/3896.de9209b2.chunk.js'},{'revision':null,'url':'./static/js/4074.e94a9635.chunk.js'},{'revision':null,'url':'./static/js/4104.d4d484aa.chunk.js'},{'revision':null,'url':'./static/js/4240.ecc8270b.chunk.js'},{'revision':null,'url':'./static/js/4241.fe0e853e.chunk.js'},{'revision':null,'url':'./static/js/4274.75f87895.chunk.js'},{'revision':null,'url':'./static/js/4349.b225724a.chunk.js'},{'revision':null,'url':'./static/js/442.d95b0c5a.chunk.js'},{'revision':null,'url':'./static/js/4435.5212440d.chunk.js'},{'revision':null,'url':'./static/js/4448.d67840f3.chunk.js'},{'revision':null,'url':'./static/js/4471.c2380391.chunk.js'},{'revision':null,'url':'./static/js/4590.39f2b68f.chunk.js'},{'revision':null,'url':'./static/js/4631.f627efb4.chunk.js'},{'revision':null,'url':'./static/js/4775.c9c59b2e.chunk.js'},{'revision':null,'url':'./static/js/4901.7dab9c36.chunk.js'},{'revision':null,'url':'./static/js/4906.b8af826c.chunk.js'},{'revision':null,'url':'./static/js/506.e1874511.chunk.js'},{'revision':null,'url':'./static/js/5074.5643e827.chunk.js'},{'revision':null,'url':'./static/js/5396.56766685.chunk.js'},{'revision':null,'url':'./static/js/5509.2e6eb7fd.chunk.js'},{'revision':null,'url':'./static/js/5526.1c49cfe0.chunk.js'},{'revision':null,'url':'./static/js/5555.3e38d927.chunk.js'},{'revision':null,'url':'./static/js/556.cfa178eb.chunk.js'},{'revision':null,'url':'./static/js/5672.b32c024f.chunk.js'},{'revision':null,'url':'./static/js/5760.82f7dc8f.chunk.js'},{'revision':null,'url':'./static/js/5804.996e83bb.chunk.js'},{'revision':null,'url':'./static/js/5979.bd3d3c0f.chunk.js'},{'revision':null,'url':'./static/js/6490.8f3553c2.chunk.js'},{'revision':null,'url':'./static/js/6511.978080d1.chunk.js'},{'revision':null,'url':'./static/js/6547.01abc819.chunk.js'},{'revision':null,'url':'./static/js/6580.8cdb4aa4.chunk.js'},{'revision':null,'url':'./static/js/6602.34495e3d.chunk.js'},{'revision':null,'url':'./static/js/6780.0338caf8.chunk.js'},{'revision':null,'url':'./static/js/6830.1a23c027.chunk.js'},{'revision':null,'url':'./static/js/6931.e9297d29.chunk.js'},{'revision':null,'url':'./static/js/6950.9b84af05.chunk.js'},{'revision':null,'url':'./static/js/7020.2fd6f467.chunk.js'},{'revision':null,'url':'./static/js/7022.02d74e90.chunk.js'},{'revision':null,'url':'./static/js/7150.9849325f.chunk.js'},{'revision':null,'url':'./static/js/744.74c12fbb.chunk.js'},{'revision':null,'url':'./static/js/7534.c27466a0.chunk.js'},{'revision':null,'url':'./static/js/7638.98fe2185.chunk.js'},{'revision':null,'url':'./static/js/7657.380e09e9.chunk.js'},{'revision':null,'url':'./static/js/7676.1bd862b3.chunk.js'},{'revision':null,'url':'./static/js/7687.1a079d52.chunk.js'},{'revision':null,'url':'./static/js/7718.49194e44.chunk.js'},{'revision':null,'url':'./static/js/7913.2359b90e.chunk.js'},{'revision':null,'url':'./static/js/8219.33f29652.chunk.js'},{'revision':null,'url':'./static/js/8249.b3efc43c.chunk.js'},{'revision':null,'url':'./static/js/8262.39716df6.chunk.js'},{'revision':null,'url':'./static/js/8382.e1c429ed.chunk.js'},{'revision':null,'url':'./static/js/8537.d5e4e119.chunk.js'},{'revision':null,'url':'./static/js/8585.b9c88d3c.chunk.js'},{'revision':null,'url':'./static/js/8606.a872b105.chunk.js'},{'revision':null,'url':'./static/js/8973.639c0cf3.chunk.js'},{'revision':null,'url':'./static/js/8986.0c6ecc50.chunk.js'},{'revision':null,'url':'./static/js/9038.aa97e3e5.chunk.js'},{'revision':null,'url':'./static/js/9041.77cacdd7.chunk.js'},{'revision':null,'url':'./static/js/9249.c5031d0b.chunk.js'},{'revision':null,'url':'./static/js/9277.b9c7a9e7.chunk.js'},{'revision':null,'url':'./static/js/9327.4b32dd25.chunk.js'},{'revision':null,'url':'./static/js/95.f2b78229.chunk.js'},{'revision':null,'url':'./static/js/9517.ac659c32.chunk.js'},{'revision':null,'url':'./static/js/9552.82c09530.chunk.js'},{'revision':null,'url':'./static/js/9580.5599a514.chunk.js'},{'revision':null,'url':'./static/js/9662.df51b9e7.chunk.js'},{'revision':null,'url':'./static/js/main.6b6478e4.js'},{'revision':null,'url':'./static/media/lato-all-400-normal.3dc1eff492ab1f598560.woff'},{'revision':null,'url':'./static/media/lato-all-700-normal.1e7707c9ec98d9b97e7f.woff'},{'revision':null,'url':'./static/media/lato-latin-400-normal.be36596da218e1eec01c.woff2'},{'revision':null,'url':'./static/media/lato-latin-700-normal.8f28e0e1fdb195149f1c.woff2'},{'revision':null,'url':'./static/media/lato-latin-ext-400-normal.361f3dbb9db6a5980326.woff2'},{'revision':null,'url':'./static/media/lato-latin-ext-700-normal.9c8812eaec45956201e1.woff2'},{'revision':'3f75f5574309bf1ab1a642cae6cec338','url':'./static/media/logo.60f66bbe1ce9674a4df4e374c9d97fc4.svg'},{'revision':null,'url':'./static/media/ubuntu-mono-all-400-normal.c879328bc62e9c68268f.woff'},{'revision':null,'url':'./static/media/ubuntu-mono-cyrillic-400-normal.c367f416832eb8f1b846.woff2'},{'revision':null,'url':'./static/media/ubuntu-mono-cyrillic-ext-400-normal.eda1c4946b1f7bf58386.woff2'},{'revision':null,'url':'./static/media/ubuntu-mono-greek-400-normal.22f3bfc91f79c342bdf4.woff2'},{'revision':null,'url':'./static/media/ubuntu-mono-greek-ext-400-normal.b3459900ea8a25d1f7c2.woff2'},{'revision':null,'url':'./static/media/ubuntu-mono-latin-400-normal.18e32d9d743af28f913e.woff2'},{'revision':null,'url':'./static/media/ubuntu-mono-latin-ext-400-normal.b56e2315611d10838ad5.woff2'}]||[]).filter((e=>"/"!==e.url&&!e.url.includes("index.html")))),function(e){const t=C();T(new N(t,e))}(te),self.addEventListener("activate",(()=>self.clients.claim())),self.addEventListener("activate",(()=>{console.log("Service Worker activated")})),self.addEventListener("install",(e=>{console.log("Service Worker installed"),e.waitUntil(self.skipWaiting())}));const se=e=>"GET"!==e.method||(!!e.url.includes("/api")||(!!e.url.includes("__meta__.js")||!!e.url.includes("__blocklet__.js")));T((e=>{const{request:t}=e;return!se(t)&&t.url.includes("/static/")}),new class extends v{async _handle(e,s){let n,a=await s.cacheMatch(e);if(a)0;else{0;try{a=await s.fetchAndCachePut(e)}catch(r){r instanceof Error&&(n=r)}0}if(!a)throw new t("no-response",{url:e.url,error:n});return a}}({cacheName:"static",plugins:[new class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.cachedResponseWillBeUsed=async e=>{let{event:t,request:s,cacheName:n,cachedResponse:a}=e;if(!a)return null;const r=this._isResponseDateFresh(a),i=this._getCacheExpiration(n);l(i.expireEntries());const c=i.updateTimestamp(s.url);if(t)try{t.waitUntil(c)}catch(o){0}return r?a:null},this.cacheDidUpdate=async e=>{let{cacheName:t,request:s}=e;const n=this._getCacheExpiration(t);await n.updateTimestamp(s.url),await n.expireEntries()},this._config=e,this._maxAgeSeconds=e.maxAgeSeconds,this._cacheExpirations=new Map,e.purgeOnQuotaError&&function(e){n.add(e)}((()=>this.deleteCacheAndMetadata()))}_getCacheExpiration(e){if(e===c())throw new t("expire-custom-caches-only");let s=this._cacheExpirations.get(e);return s||(s=new Z(e,this._config),this._cacheExpirations.set(e,s)),s}_isResponseDateFresh(e){if(!this._maxAgeSeconds)return!0;const t=this._getDateHeaderTimestamp(e);if(null===t)return!0;return t>=Date.now()-1e3*this._maxAgeSeconds}_getDateHeaderTimestamp(e){if(!e.headers.has("date"))return null;const t=e.headers.get("date"),s=new Date(t).getTime();return isNaN(s)?null:s}async deleteCacheAndMetadata(){for(const[e,t]of this._cacheExpirations)await self.caches.delete(e),await t.delete();this._cacheExpirations=new Map}}({maxEntries:200})]})),T((e=>{const{request:t}=e;return!se(t)&&(t.url.includes("/images/")||t.url.includes("/icons/"))}),new class extends v{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),this.plugins.some((e=>"cacheWillUpdate"in e))||this.plugins.unshift(ee)}async _handle(e,s){const n=s.fetchAndCachePut(e).catch((()=>{}));s.waitUntil(n);let a,r=await s.cacheMatch(e);if(r)0;else{0;try{r=await n}catch(i){i instanceof Error&&(a=i)}}if(!r)throw new t("no-response",{url:e.url,error:a});return r}})})()})();
|
|
1
|
+
(()=>{"use strict";var e={522:()=>{try{self["workbox:core:6.5.3"]&&_()}catch(e){}},434:()=>{try{self["workbox:expiration:6.5.3"]&&_()}catch(e){}},290:()=>{try{self["workbox:precaching:6.5.3"]&&_()}catch(e){}},92:()=>{try{self["workbox:routing:6.5.3"]&&_()}catch(e){}},559:()=>{try{self["workbox:strategies:6.5.3"]&&_()}catch(e){}}},t={};function s(n){var a=t[n];if(void 0!==a)return a.exports;var r=t[n]={exports:{}};return e[n](r,r.exports,s),r.exports}(()=>{s(522);const e=function(e){let t=e;for(var s=arguments.length,n=new Array(s>1?s-1:0),a=1;a<s;a++)n[a-1]=arguments[a];return n.length>0&&(t+=" :: ".concat(JSON.stringify(n))),t};class t extends Error{constructor(t,s){super(e(t,s)),this.name=t,this.details=s}}const n=new Set;const a={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!==typeof registration?registration.scope:""},r=e=>[a.prefix,e,a.suffix].filter((e=>e&&e.length>0)).join("-"),i=e=>e||r(a.precache),c=e=>e||r(a.runtime);function o(e,t){const s=new URL(e);for(const n of t)s.searchParams.delete(n);return s.href}let h;function l(e){e.then((()=>{}))}class u{constructor(){this.promise=new Promise(((e,t)=>{this.resolve=e,this.reject=t}))}}const d=e=>new URL(String(e),location.href).href.replace(new RegExp("^".concat(location.origin)),"");function f(e,t){const s=t();return e.waitUntil(s),s}async function p(e,s){let n=null;if(e.url){n=new URL(e.url).origin}if(n!==self.location.origin)throw new t("cross-origin-copy-response",{origin:n});const a=e.clone(),r={headers:new Headers(a.headers),status:a.status,statusText:a.statusText},i=s?s(r):r,c=function(){if(void 0===h){const t=new Response("");if("body"in t)try{new Response(t.body),h=!0}catch(e){h=!1}h=!1}return h}()?a.body:await a.blob();return new Response(c,i)}s(290);function g(e){if(!e)throw new t("add-to-cache-list-unexpected-type",{entry:e});if("string"===typeof e){const t=new URL(e,location.href);return{cacheKey:t.href,url:t.href}}const{revision:s,url:n}=e;if(!n)throw new t("add-to-cache-list-unexpected-type",{entry:e});if(!s){const e=new URL(n,location.href);return{cacheKey:e.href,url:e.href}}const a=new URL(n,location.href),r=new URL(n,location.href);return a.searchParams.set("__WB_REVISION__",s),{cacheKey:a.href,url:r.href}}class w{constructor(){this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=async e=>{let{request:t,state:s}=e;s&&(s.originalRequest=t)},this.cachedResponseWillBeUsed=async e=>{let{event:t,state:s,cachedResponse:n}=e;if("install"===t.type&&s&&s.originalRequest&&s.originalRequest instanceof Request){const e=s.originalRequest.url;n?this.notUpdatedURLs.push(e):this.updatedURLs.push(e)}return n}}}class y{constructor(e){let{precacheController:t}=e;this.cacheKeyWillBeUsed=async e=>{let{request:t,params:s}=e;const n=(null===s||void 0===s?void 0:s.cacheKey)||this._precacheController.getCacheKeyForURL(t.url);return n?new Request(n,{headers:t.headers}):t},this._precacheController=t}}s(559);function m(e){return"string"===typeof e?new Request(e):e}class _{constructor(e,t){this._cacheKeys={},Object.assign(this,t),this.event=t.event,this._strategy=e,this._handlerDeferred=new u,this._extendLifetimePromises=[],this._plugins=[...e.plugins],this._pluginStateMap=new Map;for(const s of this._plugins)this._pluginStateMap.set(s,{});this.event.waitUntil(this._handlerDeferred.promise)}async fetch(e){const{event:s}=this;let n=m(e);if("navigate"===n.mode&&s instanceof FetchEvent&&s.preloadResponse){const e=await s.preloadResponse;if(e)return e}const a=this.hasCallback("fetchDidFail")?n.clone():null;try{for(const e of this.iterateCallbacks("requestWillFetch"))n=await e({request:n.clone(),event:s})}catch(i){if(i instanceof Error)throw new t("plugin-error-request-will-fetch",{thrownErrorMessage:i.message})}const r=n.clone();try{let e;e=await fetch(n,"navigate"===n.mode?void 0:this._strategy.fetchOptions);for(const t of this.iterateCallbacks("fetchDidSucceed"))e=await t({event:s,request:r,response:e});return e}catch(c){throw a&&await this.runCallbacks("fetchDidFail",{error:c,event:s,originalRequest:a.clone(),request:r.clone()}),c}}async fetchAndCachePut(e){const t=await this.fetch(e),s=t.clone();return this.waitUntil(this.cachePut(e,s)),t}async cacheMatch(e){const t=m(e);let s;const{cacheName:n,matchOptions:a}=this._strategy,r=await this.getCacheKey(t,"read"),i=Object.assign(Object.assign({},a),{cacheName:n});s=await caches.match(r,i);for(const c of this.iterateCallbacks("cachedResponseWillBeUsed"))s=await c({cacheName:n,matchOptions:a,cachedResponse:s,request:r,event:this.event})||void 0;return s}async cachePut(e,s){const a=m(e);var r;await(r=0,new Promise((e=>setTimeout(e,r))));const i=await this.getCacheKey(a,"write");if(!s)throw new t("cache-put-with-no-response",{url:d(i.url)});const c=await this._ensureResponseSafeToCache(s);if(!c)return!1;const{cacheName:h,matchOptions:l}=this._strategy,u=await self.caches.open(h),f=this.hasCallback("cacheDidUpdate"),p=f?await async function(e,t,s,n){const a=o(t.url,s);if(t.url===a)return e.match(t,n);const r=Object.assign(Object.assign({},n),{ignoreSearch:!0}),i=await e.keys(t,r);for(const c of i)if(a===o(c.url,s))return e.match(c,n)}(u,i.clone(),["__WB_REVISION__"],l):null;try{await u.put(i,f?c.clone():c)}catch(g){if(g instanceof Error)throw"QuotaExceededError"===g.name&&await async function(){for(const e of n)await e()}(),g}for(const t of this.iterateCallbacks("cacheDidUpdate"))await t({cacheName:h,oldResponse:p,newResponse:c.clone(),request:i,event:this.event});return!0}async getCacheKey(e,t){const s="".concat(e.url," | ").concat(t);if(!this._cacheKeys[s]){let n=e;for(const e of this.iterateCallbacks("cacheKeyWillBeUsed"))n=m(await e({mode:t,request:n,event:this.event,params:this.params}));this._cacheKeys[s]=n}return this._cacheKeys[s]}hasCallback(e){for(const t of this._strategy.plugins)if(e in t)return!0;return!1}async runCallbacks(e,t){for(const s of this.iterateCallbacks(e))await s(t)}*iterateCallbacks(e){for(const t of this._strategy.plugins)if("function"===typeof t[e]){const s=this._pluginStateMap.get(t),n=n=>{const a=Object.assign(Object.assign({},n),{state:s});return t[e](a)};yield n}}waitUntil(e){return this._extendLifetimePromises.push(e),e}async doneWaiting(){let e;for(;e=this._extendLifetimePromises.shift();)await e}destroy(){this._handlerDeferred.resolve(null)}async _ensureResponseSafeToCache(e){let t=e,s=!1;for(const n of this.iterateCallbacks("cacheWillUpdate"))if(t=await n({request:this.request,response:t,event:this.event})||void 0,s=!0,!t)break;return s||t&&200!==t.status&&(t=void 0),t}}class v{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.cacheName=c(e.cacheName),this.plugins=e.plugins||[],this.fetchOptions=e.fetchOptions,this.matchOptions=e.matchOptions}handle(e){const[t]=this.handleAll(e);return t}handleAll(e){e instanceof FetchEvent&&(e={event:e,request:e.request});const t=e.event,s="string"===typeof e.request?new Request(e.request):e.request,n="params"in e?e.params:void 0,a=new _(this,{event:t,request:s,params:n}),r=this._getResponse(a,s,t);return[r,this._awaitComplete(r,a,s,t)]}async _getResponse(e,s,n){let a;await e.runCallbacks("handlerWillStart",{event:n,request:s});try{if(a=await this._handle(s,e),!a||"error"===a.type)throw new t("no-response",{url:s.url})}catch(r){if(r instanceof Error)for(const t of e.iterateCallbacks("handlerDidError"))if(a=await t({error:r,event:n,request:s}),a)break;if(!a)throw r}for(const t of e.iterateCallbacks("handlerWillRespond"))a=await t({event:n,request:s,response:a});return a}async _awaitComplete(e,t,s,n){let a,r;try{a=await e}catch(r){}try{await t.runCallbacks("handlerDidRespond",{event:n,request:s,response:a}),await t.doneWaiting()}catch(i){i instanceof Error&&(r=i)}if(await t.runCallbacks("handlerDidComplete",{event:n,request:s,response:a,error:r}),t.destroy(),r)throw r}}class b extends v{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.cacheName=i(e.cacheName),super(e),this._fallbackToNetwork=!1!==e.fallbackToNetwork,this.plugins.push(b.copyRedirectedCacheableResponsesPlugin)}async _handle(e,t){const s=await t.cacheMatch(e);return s||(t.event&&"install"===t.event.type?await this._handleInstall(e,t):await this._handleFetch(e,t))}async _handleFetch(e,s){let n;const a=s.params||{};if(!this._fallbackToNetwork)throw new t("missing-precache-entry",{cacheName:this.cacheName,url:e.url});{0;const t=a.integrity,r=e.integrity,i=!r||r===t;if(n=await s.fetch(new Request(e,{integrity:"no-cors"!==e.mode?r||t:void 0})),t&&i&&"no-cors"!==e.mode){this._useDefaultCacheabilityPluginIfNeeded();await s.cachePut(e,n.clone());0}}return n}async _handleInstall(e,s){this._useDefaultCacheabilityPluginIfNeeded();const n=await s.fetch(e);if(!await s.cachePut(e,n.clone()))throw new t("bad-precaching-response",{url:e.url,status:n.status});return n}_useDefaultCacheabilityPluginIfNeeded(){let e=null,t=0;for(const[s,n]of this.plugins.entries())n!==b.copyRedirectedCacheableResponsesPlugin&&(n===b.defaultPrecacheCacheabilityPlugin&&(e=s),n.cacheWillUpdate&&t++);0===t?this.plugins.push(b.defaultPrecacheCacheabilityPlugin):t>1&&null!==e&&this.plugins.splice(e,1)}}b.defaultPrecacheCacheabilityPlugin={async cacheWillUpdate(e){let{response:t}=e;return!t||t.status>=400?null:t}},b.copyRedirectedCacheableResponsesPlugin={async cacheWillUpdate(e){let{response:t}=e;return t.redirected?await p(t):t}};class R{constructor(){let{cacheName:e,plugins:t=[],fallbackToNetwork:s=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._urlsToCacheKeys=new Map,this._urlsToCacheModes=new Map,this._cacheKeysToIntegrities=new Map,this._strategy=new b({cacheName:i(e),plugins:[...t,new y({precacheController:this})],fallbackToNetwork:s}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this._strategy}precache(e){this.addToCacheList(e),this._installAndActiveListenersAdded||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this._installAndActiveListenersAdded=!0)}addToCacheList(e){const s=[];for(const n of e){"string"===typeof n?s.push(n):n&&void 0===n.revision&&s.push(n.url);const{cacheKey:e,url:a}=g(n),r="string"!==typeof n&&n.revision?"reload":"default";if(this._urlsToCacheKeys.has(a)&&this._urlsToCacheKeys.get(a)!==e)throw new t("add-to-cache-list-conflicting-entries",{firstEntry:this._urlsToCacheKeys.get(a),secondEntry:e});if("string"!==typeof n&&n.integrity){if(this._cacheKeysToIntegrities.has(e)&&this._cacheKeysToIntegrities.get(e)!==n.integrity)throw new t("add-to-cache-list-conflicting-integrities",{url:a});this._cacheKeysToIntegrities.set(e,n.integrity)}if(this._urlsToCacheKeys.set(a,e),this._urlsToCacheModes.set(a,r),s.length>0){const e="Workbox is precaching URLs without revision "+"info: ".concat(s.join(", "),"\nThis is generally NOT safe. ")+"Learn more at https://bit.ly/wb-precache";console.warn(e)}}}install(e){return f(e,(async()=>{const t=new w;this.strategy.plugins.push(t);for(const[a,r]of this._urlsToCacheKeys){const t=this._cacheKeysToIntegrities.get(r),s=this._urlsToCacheModes.get(a),n=new Request(a,{integrity:t,cache:s,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:r},request:n,event:e}))}const{updatedURLs:s,notUpdatedURLs:n}=t;return{updatedURLs:s,notUpdatedURLs:n}}))}activate(e){return f(e,(async()=>{const e=await self.caches.open(this.strategy.cacheName),t=await e.keys(),s=new Set(this._urlsToCacheKeys.values()),n=[];for(const a of t)s.has(a.url)||(await e.delete(a),n.push(a.url));return{deletedURLs:n}}))}getURLsToCacheKeys(){return this._urlsToCacheKeys}getCachedURLs(){return[...this._urlsToCacheKeys.keys()]}getCacheKeyForURL(e){const t=new URL(e,location.href);return this._urlsToCacheKeys.get(t.href)}getIntegrityForCacheKey(e){return this._cacheKeysToIntegrities.get(e)}async matchPrecache(e){const t=e instanceof Request?e.url:e,s=this.getCacheKeyForURL(t);if(s){return(await self.caches.open(this.strategy.cacheName)).match(s)}}createHandlerBoundToURL(e){const s=this.getCacheKeyForURL(e);if(!s)throw new t("non-precached-url",{url:e});return t=>(t.request=new Request(e),t.params=Object.assign({cacheKey:s},t.params),this.strategy.handle(t))}}let x;const C=()=>(x||(x=new R),x);s(92);const E=e=>e&&"object"===typeof e?e:{handle:e};class L{constructor(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"GET";this.handler=E(t),this.match=e,this.method=s}setCatchHandler(e){this.catchHandler=E(e)}}class q extends L{constructor(e,t,s){super((t=>{let{url:s}=t;const n=e.exec(s.href);if(n&&(s.origin===location.origin||0===n.index))return n.slice(1)}),t,s)}}class D{constructor(){this._routes=new Map,this._defaultHandlerMap=new Map}get routes(){return this._routes}addFetchListener(){self.addEventListener("fetch",(e=>{const{request:t}=e,s=this.handleRequest({request:t,event:e});s&&e.respondWith(s)}))}addCacheListener(){self.addEventListener("message",(e=>{if(e.data&&"CACHE_URLS"===e.data.type){const{payload:t}=e.data;0;const s=Promise.all(t.urlsToCache.map((t=>{"string"===typeof t&&(t=[t]);const s=new Request(...t);return this.handleRequest({request:s,event:e})})));e.waitUntil(s),e.ports&&e.ports[0]&&s.then((()=>e.ports[0].postMessage(!0)))}}))}handleRequest(e){let{request:t,event:s}=e;const n=new URL(t.url,location.href);if(!n.protocol.startsWith("http"))return void 0;const a=n.origin===location.origin,{params:r,route:i}=this.findMatchingRoute({event:s,request:t,sameOrigin:a,url:n});let c=i&&i.handler;const o=t.method;if(!c&&this._defaultHandlerMap.has(o)&&(c=this._defaultHandlerMap.get(o)),!c)return void 0;let h;try{h=c.handle({url:n,request:t,event:s,params:r})}catch(u){h=Promise.reject(u)}const l=i&&i.catchHandler;return h instanceof Promise&&(this._catchHandler||l)&&(h=h.catch((async e=>{if(l){0;try{return await l.handle({url:n,request:t,event:s,params:r})}catch(a){a instanceof Error&&(e=a)}}if(this._catchHandler)return this._catchHandler.handle({url:n,request:t,event:s});throw e}))),h}findMatchingRoute(e){let{url:t,sameOrigin:s,request:n,event:a}=e;const r=this._routes.get(n.method)||[];for(const i of r){let e;const r=i.match({url:t,sameOrigin:s,request:n,event:a});if(r)return e=r,(Array.isArray(e)&&0===e.length||r.constructor===Object&&0===Object.keys(r).length||"boolean"===typeof r)&&(e=void 0),{route:i,params:e}}return{}}setDefaultHandler(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GET";this._defaultHandlerMap.set(t,E(e))}setCatchHandler(e){this._catchHandler=E(e)}registerRoute(e){this._routes.has(e.method)||this._routes.set(e.method,[]),this._routes.get(e.method).push(e)}unregisterRoute(e){if(!this._routes.has(e.method))throw new t("unregister-route-but-not-found-with-method",{method:e.method});const s=this._routes.get(e.method).indexOf(e);if(!(s>-1))throw new t("unregister-route-route-not-registered");this._routes.get(e.method).splice(s,1)}}let U;const k=()=>(U||(U=new D,U.addFetchListener(),U.addCacheListener()),U);function T(e,s,n){let a;if("string"===typeof e){const t=new URL(e,location.href);0;a=new L((e=>{let{url:s}=e;return s.href===t.href}),s,n)}else if(e instanceof RegExp)a=new q(e,s,n);else if("function"===typeof e)a=new L(e,s,n);else{if(!(e instanceof L))throw new t("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});a=e}return k().registerRoute(a),a}class N extends L{constructor(e,t){super((s=>{let{request:n}=s;const a=e.getURLsToCacheKeys();for(const r of function(e){let{ignoreURLParametersMatching:t=[/^utm_/,/^fbclid$/],directoryIndex:s="index.html",cleanURLs:n=!0,urlManipulation:a}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){const r=new URL(e,location.href);r.hash="",yield r.href;const i=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];for(const s of[...e.searchParams.keys()])t.some((e=>e.test(s)))&&e.searchParams.delete(s);return e}(r,t);if(yield i.href,s&&i.pathname.endsWith("/")){const e=new URL(i.href);e.pathname+=s,yield e.href}if(n){const e=new URL(i.href);e.pathname+=".html",yield e.href}if(a){const e=a({url:r});for(const t of e)yield t.href}}()}(n.url,t)){const t=a.get(r);if(t){return{cacheKey:t,integrity:e.getIntegrityForCacheKey(t)}}}}),e.strategy)}}const I=(e,t)=>t.some((t=>e instanceof t));let K,M;const A=new WeakMap,P=new WeakMap,S=new WeakMap,O=new WeakMap,W=new WeakMap;let B={get(e,t,s){if(e instanceof IDBTransaction){if("done"===t)return P.get(e);if("objectStoreNames"===t)return e.objectStoreNames||S.get(e);if("store"===t)return s.objectStoreNames[1]?void 0:s.objectStore(s.objectStoreNames[0])}return H(e[t])},set:(e,t,s)=>(e[t]=s,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function j(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(M||(M=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(){for(var t=arguments.length,s=new Array(t),n=0;n<t;n++)s[n]=arguments[n];return e.apply(V(this),s),H(A.get(this))}:function(){for(var t=arguments.length,s=new Array(t),n=0;n<t;n++)s[n]=arguments[n];return H(e.apply(V(this),s))}:function(t){for(var s=arguments.length,n=new Array(s>1?s-1:0),a=1;a<s;a++)n[a-1]=arguments[a];const r=e.call(V(this),t,...n);return S.set(r,t.sort?t.sort():[t]),H(r)}}function F(e){return"function"===typeof e?j(e):(e instanceof IDBTransaction&&function(e){if(P.has(e))return;const t=new Promise(((t,s)=>{const n=()=>{e.removeEventListener("complete",a),e.removeEventListener("error",r),e.removeEventListener("abort",r)},a=()=>{t(),n()},r=()=>{s(e.error||new DOMException("AbortError","AbortError")),n()};e.addEventListener("complete",a),e.addEventListener("error",r),e.addEventListener("abort",r)}));P.set(e,t)}(e),I(e,K||(K=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,B):e)}function H(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,s)=>{const n=()=>{e.removeEventListener("success",a),e.removeEventListener("error",r)},a=()=>{t(H(e.result)),n()},r=()=>{s(e.error),n()};e.addEventListener("success",a),e.addEventListener("error",r)}));return t.then((t=>{t instanceof IDBCursor&&A.set(t,e)})).catch((()=>{})),W.set(t,e),t}(e);if(O.has(e))return O.get(e);const t=F(e);return t!==e&&(O.set(e,t),W.set(t,e)),t}const V=e=>W.get(e);const G=["get","getKey","getAll","getAllKeys","count"],Q=["put","add","delete","clear"],$=new Map;function J(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!==typeof t)return;if($.get(t))return $.get(t);const s=t.replace(/FromIndex$/,""),n=t!==s,a=Q.includes(s);if(!(s in(n?IDBIndex:IDBObjectStore).prototype)||!a&&!G.includes(s))return;const r=async function(e){const t=this.transaction(e,a?"readwrite":"readonly");let r=t.store;for(var i=arguments.length,c=new Array(i>1?i-1:0),o=1;o<i;o++)c[o-1]=arguments[o];return n&&(r=r.index(c.shift())),(await Promise.all([r[s](...c),a&&t.done]))[0]};return $.set(t,r),r}B=(e=>({...e,get:(t,s,n)=>J(t,s)||e.get(t,s,n),has:(t,s)=>!!J(t,s)||e.has(t,s)}))(B);s(434);const z="cache-entries",X=e=>{const t=new URL(e,location.href);return t.hash="",t.href};class Y{constructor(e){this._db=null,this._cacheName=e}_upgradeDb(e){const t=e.createObjectStore(z,{keyPath:"id"});t.createIndex("cacheName","cacheName",{unique:!1}),t.createIndex("timestamp","timestamp",{unique:!1})}_upgradeDbAndDeleteOldDbs(e){this._upgradeDb(e),this._cacheName&&function(e){let{blocked:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const s=indexedDB.deleteDatabase(e);t&&s.addEventListener("blocked",(e=>t(e.oldVersion,e))),H(s).then((()=>{}))}(this._cacheName)}async setTimestamp(e,t){const s={url:e=X(e),timestamp:t,cacheName:this._cacheName,id:this._getId(e)},n=(await this.getDb()).transaction(z,"readwrite",{durability:"relaxed"});await n.store.put(s),await n.done}async getTimestamp(e){const t=await this.getDb(),s=await t.get(z,this._getId(e));return null===s||void 0===s?void 0:s.timestamp}async expireEntries(e,t){const s=await this.getDb();let n=await s.transaction(z).store.index("timestamp").openCursor(null,"prev");const a=[];let r=0;for(;n;){const s=n.value;s.cacheName===this._cacheName&&(e&&s.timestamp<e||t&&r>=t?a.push(n.value):r++),n=await n.continue()}const i=[];for(const c of a)await s.delete(z,c.id),i.push(c.url);return i}_getId(e){return this._cacheName+"|"+X(e)}async getDb(){return this._db||(this._db=await function(e,t){let{blocked:s,upgrade:n,blocking:a,terminated:r}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i=indexedDB.open(e,t),c=H(i);return n&&i.addEventListener("upgradeneeded",(e=>{n(H(i.result),e.oldVersion,e.newVersion,H(i.transaction),e)})),s&&i.addEventListener("blocked",(e=>s(e.oldVersion,e.newVersion,e))),c.then((e=>{r&&e.addEventListener("close",(()=>r())),a&&e.addEventListener("versionchange",(e=>a(e.oldVersion,e.newVersion,e)))})).catch((()=>{})),c}("workbox-expiration",1,{upgrade:this._upgradeDbAndDeleteOldDbs.bind(this)})),this._db}}class Z{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._isRunning=!1,this._rerunRequested=!1,this._maxEntries=t.maxEntries,this._maxAgeSeconds=t.maxAgeSeconds,this._matchOptions=t.matchOptions,this._cacheName=e,this._timestampModel=new Y(e)}async expireEntries(){if(this._isRunning)return void(this._rerunRequested=!0);this._isRunning=!0;const e=this._maxAgeSeconds?Date.now()-1e3*this._maxAgeSeconds:0,t=await this._timestampModel.expireEntries(e,this._maxEntries),s=await self.caches.open(this._cacheName);for(const n of t)await s.delete(n,this._matchOptions);this._isRunning=!1,this._rerunRequested&&(this._rerunRequested=!1,l(this.expireEntries()))}async updateTimestamp(e){await this._timestampModel.setTimestamp(e,Date.now())}async isURLExpired(e){if(this._maxAgeSeconds){const t=await this._timestampModel.getTimestamp(e),s=Date.now()-1e3*this._maxAgeSeconds;return void 0===t||t<s}return!1}async delete(){this._rerunRequested=!1,await this._timestampModel.expireEntries(1/0)}}const ee={cacheWillUpdate:async e=>{let{response:t}=e;return 200===t.status||0===t.status?t:null}};var te;(function(e){C().precache(e)})(([{'revision':'92cf7f9bb3818950ab6cc12a13365bcc','url':'./index.html'},{'revision':null,'url':'./static/css/1371.f696fdbf.chunk.css'},{'revision':null,'url':'./static/css/3826.a5e3e6d6.chunk.css'},{'revision':null,'url':'./static/css/4665.5d6e9197.chunk.css'},{'revision':null,'url':'./static/css/7657.cc1ab277.chunk.css'},{'revision':null,'url':'./static/css/7676.7f909312.chunk.css'},{'revision':null,'url':'./static/css/8219.f696fdbf.chunk.css'},{'revision':null,'url':'./static/css/8973.9cab926a.chunk.css'},{'revision':null,'url':'./static/css/main.c9e90622.css'},{'revision':null,'url':'./static/js/1185.4672e754.chunk.js'},{'revision':null,'url':'./static/js/1294.8ccea539.chunk.js'},{'revision':null,'url':'./static/js/1361.c522d24a.chunk.js'},{'revision':null,'url':'./static/js/1366.da3d7a8e.chunk.js'},{'revision':null,'url':'./static/js/1371.08ecc84e.chunk.js'},{'revision':null,'url':'./static/js/1494.35b60e8f.chunk.js'},{'revision':null,'url':'./static/js/1524.dd0af8c0.chunk.js'},{'revision':null,'url':'./static/js/1633.5c43bf43.chunk.js'},{'revision':null,'url':'./static/js/1667.3001639f.chunk.js'},{'revision':null,'url':'./static/js/1685.00ac41cb.chunk.js'},{'revision':null,'url':'./static/js/1826.2ee3d019.chunk.js'},{'revision':null,'url':'./static/js/2129.fd2cfa2b.chunk.js'},{'revision':null,'url':'./static/js/2168.0e7f9ae7.chunk.js'},{'revision':null,'url':'./static/js/2294.6d1e1f1d.chunk.js'},{'revision':null,'url':'./static/js/2334.311ae46d.chunk.js'},{'revision':null,'url':'./static/js/2365.a3571172.chunk.js'},{'revision':null,'url':'./static/js/2529.061c5064.chunk.js'},{'revision':null,'url':'./static/js/253.e339f2b0.chunk.js'},{'revision':null,'url':'./static/js/2537.a919ce43.chunk.js'},{'revision':null,'url':'./static/js/2564.777b4d9f.chunk.js'},{'revision':null,'url':'./static/js/2611.3b62474f.chunk.js'},{'revision':null,'url':'./static/js/271.f7901bf2.chunk.js'},{'revision':null,'url':'./static/js/2720.147ae463.chunk.js'},{'revision':null,'url':'./static/js/2828.89d42424.chunk.js'},{'revision':null,'url':'./static/js/2911.92a82b04.chunk.js'},{'revision':null,'url':'./static/js/2960.6a54b27f.chunk.js'},{'revision':null,'url':'./static/js/3111.f44a8d78.chunk.js'},{'revision':null,'url':'./static/js/3135.f99a1aa8.chunk.js'},{'revision':null,'url':'./static/js/3137.93dab4d8.chunk.js'},{'revision':null,'url':'./static/js/3216.4aabeb78.chunk.js'},{'revision':null,'url':'./static/js/3389.72b7e591.chunk.js'},{'revision':null,'url':'./static/js/3476.47d6170f.chunk.js'},{'revision':null,'url':'./static/js/3633.02809898.chunk.js'},{'revision':null,'url':'./static/js/3732.d5b401f7.chunk.js'},{'revision':null,'url':'./static/js/3826.d40f6fa7.chunk.js'},{'revision':null,'url':'./static/js/3829.2ca489ad.chunk.js'},{'revision':null,'url':'./static/js/3883.46d0ebdd.chunk.js'},{'revision':null,'url':'./static/js/3896.de9209b2.chunk.js'},{'revision':null,'url':'./static/js/4074.e94a9635.chunk.js'},{'revision':null,'url':'./static/js/4104.d4d484aa.chunk.js'},{'revision':null,'url':'./static/js/4240.ecc8270b.chunk.js'},{'revision':null,'url':'./static/js/4241.fe0e853e.chunk.js'},{'revision':null,'url':'./static/js/4274.75f87895.chunk.js'},{'revision':null,'url':'./static/js/4349.b225724a.chunk.js'},{'revision':null,'url':'./static/js/442.d95b0c5a.chunk.js'},{'revision':null,'url':'./static/js/4435.5212440d.chunk.js'},{'revision':null,'url':'./static/js/4448.d67840f3.chunk.js'},{'revision':null,'url':'./static/js/4471.c2380391.chunk.js'},{'revision':null,'url':'./static/js/4590.39f2b68f.chunk.js'},{'revision':null,'url':'./static/js/4631.f627efb4.chunk.js'},{'revision':null,'url':'./static/js/4775.b0cede7b.chunk.js'},{'revision':null,'url':'./static/js/4901.7dab9c36.chunk.js'},{'revision':null,'url':'./static/js/4906.b8af826c.chunk.js'},{'revision':null,'url':'./static/js/506.e1874511.chunk.js'},{'revision':null,'url':'./static/js/5074.5643e827.chunk.js'},{'revision':null,'url':'./static/js/5396.56766685.chunk.js'},{'revision':null,'url':'./static/js/5509.2e6eb7fd.chunk.js'},{'revision':null,'url':'./static/js/5526.1c49cfe0.chunk.js'},{'revision':null,'url':'./static/js/5555.3e38d927.chunk.js'},{'revision':null,'url':'./static/js/556.cfa178eb.chunk.js'},{'revision':null,'url':'./static/js/5672.b32c024f.chunk.js'},{'revision':null,'url':'./static/js/5760.82f7dc8f.chunk.js'},{'revision':null,'url':'./static/js/5804.996e83bb.chunk.js'},{'revision':null,'url':'./static/js/5979.bd3d3c0f.chunk.js'},{'revision':null,'url':'./static/js/6490.8f3553c2.chunk.js'},{'revision':null,'url':'./static/js/6511.978080d1.chunk.js'},{'revision':null,'url':'./static/js/6547.01abc819.chunk.js'},{'revision':null,'url':'./static/js/6580.8cdb4aa4.chunk.js'},{'revision':null,'url':'./static/js/6602.34495e3d.chunk.js'},{'revision':null,'url':'./static/js/6780.0338caf8.chunk.js'},{'revision':null,'url':'./static/js/6830.1a23c027.chunk.js'},{'revision':null,'url':'./static/js/6931.e9297d29.chunk.js'},{'revision':null,'url':'./static/js/6950.9b84af05.chunk.js'},{'revision':null,'url':'./static/js/7020.2fd6f467.chunk.js'},{'revision':null,'url':'./static/js/7022.02d74e90.chunk.js'},{'revision':null,'url':'./static/js/7150.9849325f.chunk.js'},{'revision':null,'url':'./static/js/744.74c12fbb.chunk.js'},{'revision':null,'url':'./static/js/7534.c27466a0.chunk.js'},{'revision':null,'url':'./static/js/7638.98fe2185.chunk.js'},{'revision':null,'url':'./static/js/7657.380e09e9.chunk.js'},{'revision':null,'url':'./static/js/7676.1bd862b3.chunk.js'},{'revision':null,'url':'./static/js/7687.1a079d52.chunk.js'},{'revision':null,'url':'./static/js/7718.49194e44.chunk.js'},{'revision':null,'url':'./static/js/7913.2359b90e.chunk.js'},{'revision':null,'url':'./static/js/8219.33f29652.chunk.js'},{'revision':null,'url':'./static/js/8249.b3efc43c.chunk.js'},{'revision':null,'url':'./static/js/8262.39716df6.chunk.js'},{'revision':null,'url':'./static/js/8382.e1c429ed.chunk.js'},{'revision':null,'url':'./static/js/8537.d5e4e119.chunk.js'},{'revision':null,'url':'./static/js/8585.b9c88d3c.chunk.js'},{'revision':null,'url':'./static/js/8606.a872b105.chunk.js'},{'revision':null,'url':'./static/js/8973.639c0cf3.chunk.js'},{'revision':null,'url':'./static/js/8986.0c6ecc50.chunk.js'},{'revision':null,'url':'./static/js/9038.aa97e3e5.chunk.js'},{'revision':null,'url':'./static/js/9041.77cacdd7.chunk.js'},{'revision':null,'url':'./static/js/9249.c5031d0b.chunk.js'},{'revision':null,'url':'./static/js/9277.babc5673.chunk.js'},{'revision':null,'url':'./static/js/9327.4b32dd25.chunk.js'},{'revision':null,'url':'./static/js/95.f2b78229.chunk.js'},{'revision':null,'url':'./static/js/9517.ac659c32.chunk.js'},{'revision':null,'url':'./static/js/9552.82c09530.chunk.js'},{'revision':null,'url':'./static/js/9580.5599a514.chunk.js'},{'revision':null,'url':'./static/js/9662.df51b9e7.chunk.js'},{'revision':null,'url':'./static/js/main.c88b220e.js'},{'revision':null,'url':'./static/media/lato-all-400-normal.3dc1eff492ab1f598560.woff'},{'revision':null,'url':'./static/media/lato-all-700-normal.1e7707c9ec98d9b97e7f.woff'},{'revision':null,'url':'./static/media/lato-latin-400-normal.be36596da218e1eec01c.woff2'},{'revision':null,'url':'./static/media/lato-latin-700-normal.8f28e0e1fdb195149f1c.woff2'},{'revision':null,'url':'./static/media/lato-latin-ext-400-normal.361f3dbb9db6a5980326.woff2'},{'revision':null,'url':'./static/media/lato-latin-ext-700-normal.9c8812eaec45956201e1.woff2'},{'revision':'3f75f5574309bf1ab1a642cae6cec338','url':'./static/media/logo.60f66bbe1ce9674a4df4e374c9d97fc4.svg'},{'revision':null,'url':'./static/media/ubuntu-mono-all-400-normal.c879328bc62e9c68268f.woff'},{'revision':null,'url':'./static/media/ubuntu-mono-cyrillic-400-normal.c367f416832eb8f1b846.woff2'},{'revision':null,'url':'./static/media/ubuntu-mono-cyrillic-ext-400-normal.eda1c4946b1f7bf58386.woff2'},{'revision':null,'url':'./static/media/ubuntu-mono-greek-400-normal.22f3bfc91f79c342bdf4.woff2'},{'revision':null,'url':'./static/media/ubuntu-mono-greek-ext-400-normal.b3459900ea8a25d1f7c2.woff2'},{'revision':null,'url':'./static/media/ubuntu-mono-latin-400-normal.18e32d9d743af28f913e.woff2'},{'revision':null,'url':'./static/media/ubuntu-mono-latin-ext-400-normal.b56e2315611d10838ad5.woff2'}]||[]).filter((e=>"/"!==e.url&&!e.url.includes("index.html")))),function(e){const t=C();T(new N(t,e))}(te),self.addEventListener("activate",(()=>self.clients.claim())),self.addEventListener("activate",(()=>{console.log("Service Worker activated")})),self.addEventListener("install",(e=>{console.log("Service Worker installed"),e.waitUntil(self.skipWaiting())}));const se=e=>"GET"!==e.method||(!!e.url.includes("/api")||(!!e.url.includes("__meta__.js")||!!e.url.includes("__blocklet__.js")));T((e=>{const{request:t}=e;return!se(t)&&t.url.includes("/static/")}),new class extends v{async _handle(e,s){let n,a=await s.cacheMatch(e);if(a)0;else{0;try{a=await s.fetchAndCachePut(e)}catch(r){r instanceof Error&&(n=r)}0}if(!a)throw new t("no-response",{url:e.url,error:n});return a}}({cacheName:"static",plugins:[new class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.cachedResponseWillBeUsed=async e=>{let{event:t,request:s,cacheName:n,cachedResponse:a}=e;if(!a)return null;const r=this._isResponseDateFresh(a),i=this._getCacheExpiration(n);l(i.expireEntries());const c=i.updateTimestamp(s.url);if(t)try{t.waitUntil(c)}catch(o){0}return r?a:null},this.cacheDidUpdate=async e=>{let{cacheName:t,request:s}=e;const n=this._getCacheExpiration(t);await n.updateTimestamp(s.url),await n.expireEntries()},this._config=e,this._maxAgeSeconds=e.maxAgeSeconds,this._cacheExpirations=new Map,e.purgeOnQuotaError&&function(e){n.add(e)}((()=>this.deleteCacheAndMetadata()))}_getCacheExpiration(e){if(e===c())throw new t("expire-custom-caches-only");let s=this._cacheExpirations.get(e);return s||(s=new Z(e,this._config),this._cacheExpirations.set(e,s)),s}_isResponseDateFresh(e){if(!this._maxAgeSeconds)return!0;const t=this._getDateHeaderTimestamp(e);if(null===t)return!0;return t>=Date.now()-1e3*this._maxAgeSeconds}_getDateHeaderTimestamp(e){if(!e.headers.has("date"))return null;const t=e.headers.get("date"),s=new Date(t).getTime();return isNaN(s)?null:s}async deleteCacheAndMetadata(){for(const[e,t]of this._cacheExpirations)await self.caches.delete(e),await t.delete();this._cacheExpirations=new Map}}({maxEntries:200})]})),T((e=>{const{request:t}=e;return!se(t)&&(t.url.includes("/images/")||t.url.includes("/icons/"))}),new class extends v{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),this.plugins.some((e=>"cacheWillUpdate"in e))||this.plugins.unshift(ee)}async _handle(e,s){const n=s.fetchAndCachePut(e).catch((()=>{}));s.waitUntil(n);let a,r=await s.cacheMatch(e);if(r)0;else{0;try{r=await n}catch(i){i instanceof Error&&(a=i)}}if(!r)throw new t("no-response",{url:e.url,error:a});return r}})})()})();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[4775],{19371:function(e,n,t){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.splitNavigationBySection=n.flattenNavigation=n.checkLink=n.joinLink=n.cleanOrphanNavigation=n.filterNavigation=n.nestNavigationList=n.isMatchSection=n.deepWalk=n.parseNavigation=void 0;const o=i(t(10905)),a=i(t(50482)),l=i(t(8708)),r=i(t(3785)),s=i(t(24914)),c=i(t(25842)),d=i(t(6352)),u=i(t(56977)),m=i(t(6018)),v=t(65873),f=i(t(32828)),p=t(45239);Object.defineProperty(n,"checkLink",{enumerable:!0,get:function(){return p.checkLink}});const h="header",g="/",x="/",k="/";function b(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{},{key:t="children",order:i="first"}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!function e(o){let{index:a=0,parent:l=null,level:r=0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Array.isArray(o)?o.forEach(((n,t)=>{e(n,{index:t,parent:l,level:r+1})})):o&&("first"===i&&n(o,l,{index:a,level:r}),e(o[t],{parent:o,level:r}),"last"===i&&n(o,l,{index:a,level:r}))}(e)}function j(e,n){return!(n!==h||!(0,r.default)(e))||(Array.isArray(e)?e.includes(n):e===n)}function y(e){try{return JSON.parse(e)}catch{return e}}function Z(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if((0,m.default)(n||""))return n;const t=u.default.join(e,n||x);return t.length>1&&t.endsWith("/")?t.slice(0,t.length-1):t}function L(e,n){let{strict:t=!0}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=e,o=n;if(t||(i=i||"/",o=o||"/"),(0,v.isObject)(i)&&(0,v.isString)(o)&&(0,p.checkLink)(o))return Object.keys(i).reduce(((e,n)=>(e[n]=Z(i[n],o),e)),{});if((0,v.isString)(i)&&(0,p.checkLink)(i)&&(0,v.isObject)(o))return Object.keys(o).reduce(((e,n)=>(e[n]=Z(i,o[n]),e)),{});if((0,v.isString)(i)&&(0,v.isString)(o))return(0,p.checkLink)(i)||(0,p.checkLink)(o)?Z(i,o):o;if((0,v.isObject)(i)&&(0,v.isObject)(o)){return[...new Set([...Object.keys(i),...Object.keys(o)])].reduce(((e,n)=>(e[n]=Z(i[n],o[n]),e)),{})}return o}function N(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],{depth:n=1,transform:t=(e=>e)}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=(0,c.default)(e),o=[];return b(i,((e,i,a)=>{let{level:l}=a;if(l>=n){const{items:n=[]}=e;if(n&&Array.isArray(n)&&n.length>0){delete e.items;const a=n.map((n=>t(n,e)));if(i)i.items.push(...a);else{const n=t((0,s.default)(e,["items"]),i);o.push(n,...a)}}else if(1===l){const n=t((0,s.default)(e,["items"]),i);o.push(n)}}else 1===l&&o.push(e)}),{key:"items",order:"last"}),o}function S(e,n){return n&&Array.isArray(e.items)?e.items.filter((t=>(0,r.default)(t.section)?j(e.section,n):!!j(t.section,n))).map((e=>({...e,section:n}))):[]}function w(e){const n=(0,c.default)(e),t=[];for(const i of n){const o=(0,c.default)((0,s.default)(i,["items"])),a=[];function l(e,n){const t=S(e,n);a.push({...o,section:n,items:t})}if(Array.isArray(i.section))for(const r of i.section)l(i,r);else if(i.section){const{section:d}=i;l(i,d)}else if(i.items&&i.items.length>0){const u=i.items.reduce(((e,n)=>{const{section:t=[h]}=n||{};return e.push(...t),e}),[]),m=[...new Set(u)];for(const v of m)l(i,v)}else a.push({...i,section:h});t.push(...a)}return t}function C(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const n=(0,c.default)(e);return n.reduceRight(((e,t,i)=>{if(t.parent){const e=n.find((e=>t.section&&e.section?e.section===t.section&&e.id===t.parent:e.id===t.parent));e&&(e.items||(e.items=[]),e.items=[t,...e.items]),n.splice(i,1)}return null}),null),n}n.deepWalk=b,n.isMatchSection=j,n.joinLink=function(e,n){const t=(0,c.default)(e);return b(t,((e,t)=>{const i=e.component||e.child;if(i){const t=n.find((e=>e.name===i));t&&(e.link=L(t.link,e.link,{strict:!1}))}else t&&(e.link=L(t.link,e.link))}),{key:"items"}),t},n.flattenNavigation=N,n.splitNavigationBySection=w,n.nestNavigationList=C,n.filterNavigation=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const t=C(e);return b(t,(e=>{if(null!==e&&void 0!==e&&e.component&&(n.some((n=>n.name===e.component))||(e.visible=!1)),e.items&&e.items.length)for(let n=e.items.length-1;n>=0;n--)!1===e.items[n].visible&&e.items.splice(n,1)}),{key:"items"}),t.filter((e=>{var n;return!1!==e.visible&&!(e.items&&Array.isArray(e.items)&&e.items.length>0&&null!==(n=e.items)&&void 0!==n&&n.every((e=>!1===e.visible)))}))},n.cleanOrphanNavigation=function(e){return e.map((e=>e.items&&Array.isArray(e.items)&&1===e.items.length&&["header","footer","",void 0,null].includes(e.section)?e.items[0]:e))},n.parseNavigation=function(){var e;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{beforeProcess:i=(e=>e)}=t,{navigationList:r,components:s}=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=[],t=function t(i){var o,a;let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=[],{children:s=[],meta:u={}}=i,m=(0,c.default)((null===u||void 0===u?void 0:u.navigation)||[]);(0,f.default)(u)&&!1!==(null===(o=i.meta)||void 0===o||null===(a=o.capabilities)||void 0===a?void 0:a.navigation)&&r.push(...m);const v=l.name||"",p=l.mountPoint||g,k=i===e?"":u.name||"",b=i===e?"":i.mountPoint||g;for(const e of s){var j,y,Z,L;if(!(0,f.default)(e.meta))continue;const i=e.meta.name,o=e.mountPoint,a=[v,k,i].filter(Boolean).join("."),l=e.meta.navigation||[],s=(0,d.default)(p,b,o);!1!==(null===(j=e.meta)||void 0===j||null===(y=j.capabilities)||void 0===y?void 0:y.navigation)&&n.push({did:e.meta.did,name:a,link:s,title:e.meta.title||"",navigation:l.map((e=>({section:h,...e})))});const c=m.find((e=>!!e.component&&e.component===i));if(c){if(!c.link)if(e.meta.navigation&&e.meta.navigation.length>0){const n=t(e,{mountPoint:b,name:k});var N;n.length>0&&(c.items=null!==(N=c.items)&&void 0!==N?N:[],c.items.push(...n))}else c.link=x}else if(!1!==(null===(Z=e.meta)||void 0===Z||null===(L=Z.capabilities)||void 0===L?void 0:L.navigation)){const n=t(e,{mountPoint:b,name:k}),o={title:e.meta.title,component:i,id:e.meta.did};n.length>0?(o.items=n,o.link=void 0):o.link=x,r.push(o)}}return r}(e);return{navigationList:t,components:n}}(n),u=(null===n||void 0===n||null===(e=n.settings)||void 0===e?void 0:e.navigations)||[],m=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;const t=N((0,c.default)(e),{depth:n,transform:(e,n)=>{var t;return n&&(e._parent||(e._parent=n.id,n.component||(e.link=L(n.link,e.link))),e.section=e.section||n.section||[h],e.visible=null!==(t=e.visible)&&void 0!==t?t:n.visible),e.component=[n.component,e.component].filter(Boolean).join("."),e}});return b(t,(e=>{e.items&&e.items.length>0&&e.items.reduceRight(((n,t)=>{if(t._parent){const n=e.items.findIndex((e=>e.id===t._parent));n>=0&&e.items.splice(n,1),delete t._parent}return null}),null)}),{key:"items"}),t}(i(r)),v=N(w(function(e){const n=(0,c.default)(e).filter((e=>e.id));return b(n,((e,n)=>{var t;if(e.items&&e.items.length){for(let n=e.items.length-1;n>=0;n--)e.items[n].id||e.items.splice(n,1);0===e.items.length&&e.component&&(e.link=e.link||x)}n&&(e.parent=n.id,e.id=[n.id,e.id].join(k)),e.from=e.from||"yaml",e.visible=null===(t=e.visible)||void 0===t||t}),{key:"items"}),n}(m)).reduce(((e,n)=>{const t=["bottom","social","sessionManager"].includes(n.section);let i=!1;const o=s.find((e=>"/"===e.link));if(o&&n.id===o.did&&(i=!0),t||i){if(n.items&&n.items.length>0)return e.push(...n.items.map((e=>{const{section:t}=n,i=L(n.link,e.link),o=[n.component,e.component].filter(Boolean).join(".");return{...e,section:t,link:i,component:o,parent:""}}))),e;if(i)return e}return e.push(n),e}),[]),{transform(e,n){let{component:t}=e;return null!==n&&void 0!==n&&n.component&&(t=[n.component,e.component].filter(Boolean).join(".")),{...e,component:t}}});return{navigationList:(0,o.default)(u.map((e=>{const n={...e};return n.role&&(n.role=y(n.role)),n.section&&(n.section=y(n.section)),n.title&&(n.title=y(n.title)),n.link&&(n.link=y(n.link)),n})),v,((e,n)=>{const t=["id","section"];return(0,a.default)((0,l.default)(e,t),(0,l.default)(n,t))})),components:s,builtinList:v}}},14775:(e,n,t)=>{t.r(n),t.d(n,{default:()=>dn});var i=t(5057),o=t(39948),a=t(56556),l=t(49127),r=t(80576),s=t(6041),c=t(74490),d=t(72904),u=t(25228),m=t(51177),v=t(95301),f=t(11750),p=t(39067),h=t(86229),g=t(55498),x=t(12673),k=t(13128),b=t(68420),j=t(61059),y=t(92706),Z=t.n(y),L=t(55898),N=t.n(L),S=t(17540),w=t(86272),C=t.n(w),P=t(26271),O=t.n(P),E=t(50482),A=t.n(E),R=t(20877),T=t(36095),_=t(96266);function M(e){let{prevPath:n,nextPath:t}=e;const i=n.length,o=t.length;return!(i!==o||!A()(n.slice(0,i-1),t.slice(0,o-1)))}function I(e){let{treeNode:n}=e;const{locale:t}=(0,b.PE)();return(0,_.jsxs)(_.Fragment,{children:[n.icon&&(0,_.jsx)(g.JO,{style:{marginRight:4},icon:n.icon}),function(){const{title:e,subtitle:a}=n;let l=e,r=a;return O()(e)&&(l=e[t]),!(0,i.isValidElement)(a)&&O()(a)&&(r=a[t]),(0,_.jsxs)(o.Z,{display:"flex",alignItems:"center",children:[(0,_.jsx)(f.Z,{variant:"subtitle1",fontSize:16,children:l}),a&&(0,_.jsx)(f.Z,{variant:"body2",color:"gray",ml:1.5,lineHeight:1,children:r})]})}()]})}function D(e){let{treeData:n,setTreeData:t,renderActions:i}=e;const o=n.map((e=>({...e,expanded:!0}))),a={};return"undefined"!==typeof window&&(a.context=window),(0,_.jsx)(T.W,{backend:R.HTML5Backend,...a,children:(0,_.jsx)(S.oP,{generateNodeProps:e=>({buttons:i({data:e.node,className:"list-item-actions"}),icons:(0,_.jsx)(g.JO,{icon:"ic:round-drag-indicator"}),title:(0,_.jsx)(I,{treeNode:e.node})}),maxDepth:2,isVirtualized:!1,treeData:o,onChange:t,canDrop:M,theme:C()})})}I.propTypes={treeNode:N().object.isRequired},D.propTypes={treeData:N().object.isRequired,setTreeData:N().func,renderActions:N().func},D.defaultProps={setTreeData:()=>{},renderActions:()=>{}};const W=D;var z=t(28726),J=t(68598),F=t(67680),B=t(53070),q=t(47020),G=t(41899),V=t(11251),K=t(24914),H=t.n(K),U=t(8708),Q=t.n(U),Y=t(82488),X=t.n(Y),$=t(78164),ee=t.n($),ne=t(75506),te=t.n(ne),ie=t(2765),oe=t.n(ie),ae=t(25842),le=t.n(ae),re=t(80506),se=t(19371),ce=t(6352),de=t.n(ce),ue=t(2842),me=t(6018),ve=t.n(me),fe=t(76811),pe=t(63838),he=t(65873),ge=t(27156),xe=t(23985),ke=t(11819),be=t(19654),je=t(90067),ye=t(44067),Ze=t(12594);function Le(e){let{fullWidth:n,multiple:t,required:i,label:a,placeholer:l,options:d,helperText:u,error:v,margin:p,...h}=e;const g=d.find((e=>e.value===h.value)),x=null===g||void 0===g?void 0:g.title;return(0,_.jsxs)(r.Z,{margin:p,fullWidth:n,error:v,children:[(0,_.jsx)(s.Z,{children:"".concat(a).concat(i?"*":"")}),(0,_.jsxs)(m.Z,{multiple:t,input:(0,_.jsx)(Ze.Z,{defaultValue:x,sx:{flex:1},required:i,label:a,inputProps:{margin:p}}),renderValue:e=>{if(t)return(0,_.jsx)(o.Z,{sx:{display:"flex",flexWrap:"wrap",gap:.5},children:e.map((e=>{const n=d.find((n=>n.value===e));return n&&n.title&&(0,_.jsx)(be.Z,{size:"small",label:n.title},e)}))});const n=d.find((n=>n.value===e));return n&&n.title&&(0,_.jsxs)(o.Z,{children:[(0,_.jsx)(f.Z,{component:"span",children:n.title}),(0,_.jsx)(f.Z,{marginLeft:1,component:"span",variant:"body2",color:"text.secondary",children:n.description})]})},...h,children:[(0,_.jsx)(c.Z,{disabled:!0,children:(0,_.jsx)("em",{children:l})}),!t&&(0,_.jsx)(c.Z,{value:"",children:"None"}),d.map((e=>e&&e.value&&(0,_.jsxs)(c.Z,{value:e.value,children:[(0,_.jsx)(ye.Z,{children:e.title}),e.description&&(0,_.jsx)(f.Z,{variant:"body2",color:"text.secondary",children:e.description})]},e.value)))]}),(0,_.jsx)(je.Z,{children:u})]})}Le.propTypes={error:N().bool,required:N().bool,multiple:N().bool,fullWidth:N().bool,label:N().string,placeholer:N().string,options:N().array,helperText:N().string,margin:N().string},Le.defaultProps={error:!1,required:!1,multiple:!1,fullWidth:!1,label:"",placeholer:"",options:[],helperText:"",margin:""};const Ne=Le,Se="en";function we(e){let{sx:n,onAdd:t,onChange:l,locales:r,localeMap:s,onRemoveLocale:c}=e;const{t:d}=(0,b.PE)(),u=(0,i.useRef)(),[m,v]=(0,i.useState)(null),p=(0,x.Z)({currentLocale:Se,localeList:[],inputLocale:"",localeError:""}),h=(0,i.useMemo)((()=>!!m),[m]),k=(0,i.useMemo)((()=>r.includes(p.currentLocale)?p.currentLocale:Se),[r,p.currentLocale]),j=(0,i.useMemo)((()=>Object.keys((0,he.omit)(s,[...p.localeList,Se])).map((e=>({title:s[e],value:e})))),[p.localeList]),y=(0,i.useMemo)((()=>{var e;const n=s[Se]||(null===(e=Object.values(s))||void 0===e?void 0:e[0]);return"Default (".concat(n,")")}),[s]);function Z(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const n=function(e){return e?"en"!==e&&!p.localeList.includes(e)||d("navigation.form.localeExists",{value:e}):d("common.requiredErrorText",{name:"Locale"})}(null===e||void 0===e?void 0:e.trim());return p.localeError=!0!==n?n:"",n}function L(){var e;const n=null===(e=p.inputLocale)||void 0===e?void 0:e.trim();!0===Z(n)&&(N(),p.localeList.push(n),p.currentLocale=n,t(n))}function N(){v(null),p.inputLocale="",p.localeError=""}return(0,i.useEffect)((()=>{p.localeList=[...r]}),[r,p]),(0,pe.Z)("enter",(()=>{setTimeout((()=>{L()}))}),{target:u}),(0,_.jsxs)(_.Fragment,{children:[(0,_.jsxs)(ge.Z,{sx:n,value:k,onChange:(e,n)=>{p.currentLocale=n,l(n)},children:[(0,_.jsx)(xe.Z,{label:y,value:"en"}),p.localeList.map((e=>(0,_.jsx)(xe.Z,{sx:{position:"relative"},label:(0,_.jsxs)(_.Fragment,{children:[s[e],(0,_.jsx)(F.Z,{size:"small",color:"inherit",sx:{position:"absolute",top:0,right:0},onClick:n=>{!function(e,n){e.preventDefault(),e.stopPropagation(),p.localeList=(0,he.without)(p.localeList,n),c(n),n===p.currentLocale&&(p.currentLocale=Se)}(n,e)},children:(0,_.jsx)(g.JO,{icon:"mdi:close",height:14})})]}),value:e},e))),(0,_.jsx)(F.Z,{color:"primary",disableFocusRipple:!0,sx:{width:"48px"},onClick:e=>{v(e.currentTarget)},children:(0,_.jsx)(g.JO,{icon:"mdi:plus"})})]}),(0,_.jsx)(ke.ZP,{open:h,anchorEl:m,onClose:N,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:(0,_.jsxs)(o.Z,{sx:{p:2,width:"270px"},children:[(0,_.jsx)(f.Z,{variant:"subtitle2",children:d("navigation.form.localePlaceholder")}),(0,_.jsx)(o.Z,{mt:1,children:(0,_.jsx)(Ne,{required:!0,fullWidth:!0,label:"Locale",value:p.inputLocale,options:j,onChange:function(e){const{value:n}=e.target;Z(n),p.inputLocale=n},error:!!p.localeError,helperText:p.localeError||" "})}),(0,_.jsx)(o.Z,{display:"flex",justifyContent:"flex-end",children:(0,_.jsx)(a.Z,{size:"small",variant:"contained",onClick:L,children:d("common.confirm")})})]})})]})}we.propTypes={sx:N().any,onAdd:N().func,onChange:N().func,onRemoveLocale:N().func,localeMap:N().object,locales:N().array},we.defaultProps={sx:null,onAdd:()=>{},onChange:()=>{},onRemoveLocale:()=>{},localeMap:{},locales:[]};const Ce=we;var Pe=t(17425),Oe=t(29054);const Ee="en",Ae={title:{[Ee]:""},link:{[Ee]:""}};function Re(e){let{icon:n}=e;const[t,o]=(0,i.useState)(!1);return(0,G.Z)((async()=>{o(!1),await(0,g.GL)(n),o(!0)}),[n]),n?t?(0,_.jsx)(g.JO,{icon:n}):(0,_.jsx)(g.JO,{color:"#f06f6e",icon:"ic:baseline-error"}):(0,_.jsx)(g.JO,{icon:"codicon:blank"})}Re.propTypes={icon:N().string.isRequired};const Te=(0,i.forwardRef)((function(e,n){let{section:t,components:a,rawNavigations:l}=e;const{roles:s}=(0,Pe.DJ)(),{t:c,locale:d}=(0,b.PE)(),{blocklet:u}=(0,Oe.y0)(),m=(0,i.useMemo)((()=>{const e=u.environments.find((e=>"BLOCKLET_APP_LANGUAGES"===e.key));return(e?e.value.split(","):["en","zh"]).filter((e=>fe.SUPPORTED_LANGUAGES[e])).reduce(((e,n)=>(e[n]=fe.SUPPORTED_LANGUAGES[n].nativeName,e)),{})}),[u.environments]),v=(0,i.useRef)((()=>{})),[p,{setFalse:j,setTrue:y}]=(0,V.Z)(!1),Z=(0,x.Z)({isRoot:!0,type:"add",linkDisabled:!1,locale:Ee,formState:le()(Ae),get localeList(){return ee()(Object.keys(this.formState.title),Ee)}}),{handleSubmit:L,control:N,watch:S,setValue:w,clearErrors:C,formState:{errors:P}}=(0,re.cI)({mode:"onChange",defaultValues:{id:void 0,title:void 0,icon:void 0,link:void 0,component:void 0,parent:void 0,role:[]}});(0,i.useEffect)((()=>{w("title",Z.formState.title[Z.locale]),w("link",Z.formState.link[Z.locale])}),[w,Z.locale,p]);const E=S("component"),A=S("title"),R=S("link"),T=S("icon"),M=S("parent");(0,i.useEffect)((()=>{Z.formState.title[Z.locale]=A}),[A]),(0,i.useEffect)((()=>{Z.formState.link[Z.locale]=R}),[R]);const I=(0,i.useMemo)((()=>l.find((e=>{if(E){return a.find((e=>e.name===E)).did===e.id}return e.id===M}))),[a,l,E,M]),D=(0,i.useMemo)((()=>{if(null!==I&&void 0!==I&&I.component){const e=a.find((e=>e.name===I.component)),{link:n}=e||{},t=O()(n)?n[Z.locale]:n;if(E)return(0,ue.QT)(t);const i=O()(I.link)?I.link[Z.locale]:I.link;return(0,ue.QT)(de()(t,i||"/"))}return null}),[a,Z.locale,I,E]),W=(0,i.useMemo)((()=>{const{component:e}=I||{},n=a.find((n=>n.name===e)),{navigation:i=[]}=n||{};return(0,se.flattenNavigation)(i,{transform:(e,n)=>(null!==n&&void 0!==n&&n.section&&(e.section=e.section||n.section),e)}).filter((e=>e.link)).filter((e=>(0,se.isMatchSection)(e.section,t))).map((e=>({label:e.link,title:e.title[d]||e.title})))}),[I,a,t,d]),G=(0,i.useMemo)((()=>{const e={add:c("common.create"),edit:c("common.edit")}[Z.type];return e?"".concat(e," ").concat(c("navigation.navigation")):"--"}),[Z.type,c]),K=(0,i.useCallback)((()=>{Z.isRoot=!0,Z.locale=Ee,Z.type="add",Z.linkDisabled=!1,v.current=()=>{},w("id",void 0),w("icon",void 0),w("title",void 0),w("link",void 0),w("component",void 0),w("parent",void 0),w("role",[]),Z.formState=le()(Ae),C()}),[C,w,Z]),U=(0,i.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Z.localeList.length>0&&(new Set(X()(Z.formState.title)).size>1&&(e.title=Z.formState.title),new Set(X()(Z.formState.link)).size>1&&(e.link=Z.formState.link)),te()(e.role)&&(e.role=void 0),e}),[Z.formState.link,Z.formState.title,Z.localeList]),Y=(0,i.useCallback)((()=>{j(),setTimeout((()=>{K()}))}),[K,j]),$=(0,i.useCallback)((function(){let{parent:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};Z.type="add",Z.isRoot=!e,w("parent",null===e||void 0===e?void 0:e.id),v.current=e=>{n(Y,e)},y()}),[Y,y,w,Z]),ne=(0,i.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};const{id:t,title:i,icon:o,link:a,parent:l,component:r,role:s=[]}=e;w("id",t),w("icon",o),"tmpl"===e.from&&(Z.linkDisabled=!0),oe()(i)?Z.formState.title=Z.localeList.reduce(((e,n)=>(e[n]=i,e)),{[Ee]:i}):O()(i)?Z.formState.title=le()(i):Z.formState.title={},oe()(a)?Z.formState.link=Z.localeList.reduce(((e,n)=>(e[n]=a,e)),{[Ee]:a}):O()(a)?Z.formState.link=le()(a):Z.formState.link={},w("component",r),w("parent",l),w("role",s||[]),y(),Z.type="edit",Z.isRoot=!l,v.current=e=>{const t=Q()(e,["id","title","icon","link","role"]);n(Y,t)}}),[Y,y,w,Z]);function ie(e){const n=null===e||void 0===e?void 0:e.trim();return n?!(n.length>24)||c("navigation.form.titleTooLong",{len:24}):c("common.requiredErrorText",{name:c("navigation.form.title")})}function ae(e){const n=null===e||void 0===e?void 0:e.trim();return n?!!(0,se.checkLink)(n)||c("navigation.form.invalidLink"):!!Z.isRoot||c("common.requiredErrorText",{name:c("navigation.form.link")})}(0,i.useImperativeHandle)(n,(()=>({add:$,edit:ne,close:Y})),[$,Y,ne]);const ce=(0,i.useCallback)((e=>{Z.locale=e,Z.formState.title[e]||(Z.formState.title[e]=""),Z.formState.link[e]||(Z.formState.link[e]=""),setTimeout((()=>{C()}))}),[C,Z]),me=(0,i.useCallback)((()=>{const{title:e,link:n}=Z.formState;for(const t of Object.keys(e)){const n=ie(e[t]);if(!0!==n)return n}for(const t of Object.keys(n)){const e=ae(n[t]);if(!0!==e)return e}return!0}),[Z.formState]),pe=(0,i.useCallback)((e=>{const n=me();!0===n?v.current(U(e)):h.Z.error(n)}),[me,U]),he=(0,i.useCallback)((e=>{Z.formState.title=H()(Z.formState.title,e),Z.formState.link=H()(Z.formState.link,e)}),[Z.formState]),ge=(0,i.useCallback)((e=>{var n,t;Z.locale=e,Z.formState.title[e]=null===(n=Z.formState.title)||void 0===n?void 0:n[Ee],Z.formState.link[e]=null===(t=Z.formState.link)||void 0===t?void 0:t[Ee],setTimeout((()=>{C()}))}),[C,Z]);return(0,_.jsxs)(k.ZP,{open:p,title:G,onClose:Y,actions:(0,_.jsx)(z.Z,{onClick:L(pe),color:"primary",autoFocus:!0,variant:"contained",children:c("common.confirm")}),children:[(0,_.jsx)(Ce,{sx:{mb:1},onAdd:ge,onChange:ce,onRemoveLocale:he,localeMap:m,locales:Z.localeList}),(0,_.jsxs)("form",{noValidate:!0,autoComplete:"off",children:[(0,_.jsx)(re.Qr,{name:"title",control:N,rules:{validate:ie},render:e=>{var n,t;let{field:i}=e;return(0,_.jsx)(q.Z,{fullWidth:!0,variant:"outlined",margin:"dense",required:!0,placeholder:c("navigation.form.titlePlaceholder"),label:c("navigation.form.title"),disabled:Z.isEdit,error:!(null===P||void 0===P||null===(n=P.title)||void 0===n||!n.message),helperText:(null===P||void 0===P||null===(t=P.title)||void 0===t?void 0:t.message)||" ",...i})}}),(0,_.jsx)(re.Qr,{name:"icon",control:N,rules:{validate:async function(e){const n=null===e||void 0===e?void 0:e.trim();if(n)try{await(0,g.GL)(n)}catch{return c("navigation.form.invalidIcon")}return!0}},render:e=>{var n,t;let{field:i}=e;return(0,_.jsx)(q.Z,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:c("navigation.form.iconPlaceholder"),label:c("navigation.form.icon"),error:!(null===P||void 0===P||null===(n=P.icon)||void 0===n||!n.message),disabled:Z.locale!==Ee,helperText:(null===P||void 0===P||null===(t=P.icon)||void 0===t?void 0:t.message)||(0,_.jsx)(o.Z,{display:"flex",children:(0,_.jsxs)(o.Z,{component:"a",href:"https://icones.js.org",target:"_blank",display:"flex",alignItems:"center",children:[c("navigation.form.findMoreIcon")," ",(0,_.jsx)(g.JO,{style:{marginLeft:4},icon:"radix-icons:external-link"})]})}),...i,InputProps:{endAdornment:(0,_.jsx)(B.Z,{position:"end",children:(0,_.jsx)(F.Z,{sx:{cursor:"default"},disableFocusRipple:!0,disableRipple:!0,children:T&&(0,_.jsx)(Re,{icon:T})})})}})}}),Z.isRoot&&(0,_.jsx)(re.Qr,{name:"component",control:N,render:e=>{var n,t;let{field:i}=e;return(0,_.jsx)(Ne,{fullWidth:!0,margin:"dense",disabled:"edit"===Z.type||Z.locale!==Ee,label:c("navigation.form.component"),placeholer:c("navigation.form.componentPlaceholder"),options:a.map((e=>({title:e.title,value:e.name,description:e.link}))),error:!(null===P||void 0===P||null===(n=P.component)||void 0===n||!n.message),helperText:(null===P||void 0===P||null===(t=P.component)||void 0===t?void 0:t.message)||" ",...H()(i,"ref")})}}),(0,_.jsx)(re.Qr,{name:"link",control:N,rules:{validate:ae},render:e=>{let{field:n}=e;return(0,_.jsx)(r.Z,{fullWidth:!0,margin:"dense",children:(0,_.jsx)(J.Z,{disablePortal:!0,freeSolo:!0,blurOnSelect:!0,autoSelect:!0,fullWidth:!0,disabled:Z.linkDisabled,isOptionEqualToValue:e=>e.label,options:W,renderInput:e=>{var n,t;return(0,_.jsx)(q.Z,{...e,placeholder:c("navigation.form.linkPlaceholder"),label:c("navigation.form.link"),error:!(null===P||void 0===P||null===(n=P.link)||void 0===n||!n.message),helperText:(null===P||void 0===P||null===(t=P.link)||void 0===t?void 0:t.message)||"/abc/bcd or /abc or https://arcblock.io",InputProps:{startAdornment:D?(0,_.jsx)(B.Z,{position:"start",sx:{textDecoration:ve()(R||"")?"line-through":""},children:D}):null}})},renderOption:(e,n)=>(0,_.jsxs)(o.Z,{component:"li",...e,children:[n.label,(0,_.jsx)(f.Z,{marginLeft:1,component:"span",variant:"body2",color:"text.secondary",children:n.title})]}),margin:"dense",...n,onChange:()=>{},onInputChange:(e,t)=>{n.onChange(t)}})})}}),["dashboard","sessionManager"].includes(t)&&(0,_.jsx)(re.Qr,{name:"role",control:N,render:e=>{var n,t;let{field:i}=e;return(0,_.jsx)(Ne,{fullWidth:!0,multiple:!0,margin:"dense",label:c("navigation.form.role"),placeholer:c("navigation.form.rolePlaceholder"),options:s.map((e=>({title:e.title,value:e.name}))),error:!(null===P||void 0===P||null===(n=P.role)||void 0===n||!n.message),helperText:(null===P||void 0===P||null===(t=P.role)||void 0===t?void 0:t.message)||" ",...H()(i,"ref")})}})]})]})}));Te.propTypes={section:N().string,components:N().array,rawNavigations:N().array},Te.defaultProps={section:"",components:[],rawNavigations:[]};const _e=Te;function Me(e){let{className:n,add:t,edit:o,toggle:a,del:l,data:r,section:s}=e;const{t:c}=(0,b.PE)(),d=["yaml","tmpl"].includes(r.from),u=(0,i.isValidElement)(r.subtitle);function m(e){e.preventDefault(),e.stopPropagation()}const v=(0,i.useCallback)((e=>{m(e),t(r)}),[t,r]),f=(0,i.useCallback)((e=>{m(e),o(r)}),[o,r]),p=(0,i.useCallback)((e=>{m(e),a(r)}),[a,r]),h=(0,i.useCallback)((e=>{m(e),l(r)}),[l,r]);return(0,_.jsxs)("div",{className:n,children:[!r.parent&&["header","footer","dashboard"].includes(s)&&(0,_.jsx)("span",{title:c(u?"navigation.action.noAddSub":"navigation.action.addSub"),children:(0,_.jsx)(F.Z,{size:"small",color:"success",onClick:v,disabled:u,children:(0,_.jsx)(g.JO,{icon:"mdi:plus-box-outline"})})}),(0,_.jsx)("span",{title:c(u?"navigation.action.noEdit":"navigation.action.edit"),children:(0,_.jsx)(F.Z,{size:"small",color:"primary",onClick:f,disabled:u,children:(0,_.jsx)(g.JO,{icon:"mdi:pencil"})})}),(0,_.jsx)("span",{title:u?c("navigation.action.noEdit"):r.visible?c("navigation.action.hide"):c("navigation.action.show"),children:(0,_.jsx)(F.Z,{size:"small",color:"warning",onClick:p,disabled:u,children:!1===r.visible?(0,_.jsx)(g.JO,{icon:"mdi:eye-off-outline"}):(0,_.jsx)(g.JO,{icon:"mdi:eye-outline"})})}),(0,_.jsx)("span",{title:c(d&&!u?"navigation.action.noDel":"navigation.action.del"),children:(0,_.jsx)(F.Z,{disabled:d&&!u,size:"small",color:"error",onClick:h,children:(0,_.jsx)(g.JO,{icon:"mdi:delete"})})})]})}Me.propTypes={data:N().object.isRequired,className:N().string,add:N().func,edit:N().func,toggle:N().func,del:N().func,section:N().string},Me.defaultProps={className:"",add:()=>{},edit:()=>{},toggle:()=>{},del:()=>{},section:""};const Ie=Me;var De=t(3785),We=t.n(De),ze=t(79683),Je=t.n(ze),Fe=t(35432),Be=t(14491);const qe="/",Ge="header",Ve={sessionManager:[{id:"/sessionManager",title:{en:"Manage",zh:"\u7ba1\u7406"},section:["sessionManager"],icon:"ion:settings-outline",link:"".concat(Fe.WELLKNOWN_SERVICE_PATH_PREFIX,"/admin"),role:["owner","admin"],from:"tmpl"}],dashboard:[{id:"/team",title:{en:"Access",zh:"\u8bbf\u95ee\u63a7\u5236"},role:["owner","admin","member"],section:["dashboard"],link:"",from:"tmpl",items:[{id:"member",title:{en:"Members",zh:"\u6210\u5458"},icon:"ant-design:user-outlined",link:"".concat(Fe.WELLKNOWN_SERVICE_PATH_PREFIX,"/admin/members"),from:"tmpl"},{id:"passport",title:{en:"Passport",zh:"\u901a\u884c\u8bc1"},icon:"icon-park-outline:passport",link:"".concat(Fe.WELLKNOWN_SERVICE_PATH_PREFIX,"/admin/passports"),from:"tmpl"}]},{id:"/dashboard",title:"Blocklet",role:["owner","admin"],section:["dashboard"],link:"",from:"tmpl",items:[{id:"dashboard",title:{en:"Dashboard",zh:"\u4eea\u8868\u76d8"},icon:"ant-design:dashboard-outlined",link:"".concat(Fe.WELLKNOWN_SERVICE_PATH_PREFIX,"/admin"),from:"tmpl"}]}]};function Ke(e,n){return e.section&&n.section?e.section===n.section&&e.id===n.id:e.id===n.id}function He(){const{blocklet:e,actions:n}=(0,Oe.y0)(),{navigationList:t,components:o,builtinList:a}=(0,se.parseNavigation)(e,{beforeProcess(e){const n=le()(e);return Ve.dashboard.forEach((e=>{n.some((n=>n.id===e.id))||n.push(e)})),n.some((e=>e.id&&(e.section||[]).includes("sessionManager")))||n.push(...Ve.sessionManager),n}}),l=(0,x.Z)({rawNavigation:le()(t),activeSection:Ge,components:o}),r=(0,i.useMemo)((()=>(0,se.nestNavigationList)(l.rawNavigation)),[l.rawNavigation]),s=(0,i.useMemo)((()=>{const e=(0,se.filterNavigation)(l.rawNavigation,o),n=(0,se.joinLink)(e,o);return(0,se.cleanOrphanNavigation)(n)}),[o,l.rawNavigation]);function c(e){if(!e.id)return"";const n=(0,se.flattenNavigation)((0,se.joinLink)(r,o)),t=n.find((n=>n.id===e.id));function i(e){let{name:n}=e;return(0,_.jsx)(be.Z,{label:"Uninstalled: ".concat(n),color:"error",size:"small",variant:"outlined",sx:{fontSize:10,height:20}})}if(null!==t&&void 0!==t&&t.component){if(!o.some((e=>e.name===t.component)))return(0,_.jsx)(i,{name:t.component})}else if(t.parent){const e=n.find((e=>e.id===t.parent));if(null!==e&&void 0!==e&&e.component&&!o.some((n=>n.name===e.component)))return(0,_.jsx)(i,{name:e.component})}return null===t||void 0===t?void 0:t.link}function d(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:qe;return e.map((e=>{const t=o.find((n=>n.name===e.component)),i=(null===t||void 0===t?void 0:t.link)||n,a=e.items||[],{link:l}=e;return{title:e.title,subtitle:c(e),link:l,icon:e.icon,children:d(a,l||qe),section:e.section,visible:e.visible,parent:e.parent,component:e.component,id:e.id,role:e.role,from:e.from,__base:i}}))}async function u(e){const t=e.map((e=>Je()(e,We()))).map((e=>{const n={...e};return n.role&&Array.isArray(n.role)&&(n.role=JSON.stringify(n.role)),n.section&&Array.isArray(n.section)&&(n.section=JSON.stringify(n.section)),n.title&&n.title instanceof Object&&(n.title=JSON.stringify(n.title)),n.link&&n.link instanceof Object&&(n.link=JSON.stringify(n.link)),n}));await n.configNavigations(t)}return{state:l,navigation:s,components:o,getNavigationFullLink:c,updateActiveSection:function(e){l.activeSection=e},updateNavigationItem:function(e){!function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const n=l.rawNavigation.map((n=>{const t=e.find((e=>Ke({...e,section:l.activeSection},n)));return t?{...n,...t}:n}));l.rawNavigation=n}([e])},delNavigationItem:function(e){const n=l.rawNavigation.filter((n=>n.id===e||n.parent===e)).map((e=>e.id));l.rawNavigation=l.rawNavigation.filter((e=>!n.includes(e.id)))},addNavigationItem:function(){const e={...arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},id:(0,Be.x0)(),section:l.activeSection,visible:!0};l.rawNavigation=[...l.rawNavigation,e]},updateNavigationTree:function(e){const n=[];(0,se.deepWalk)(e,((e,t)=>{const i={...H()(e,["children","expand"]),parent:null===t||void 0===t?void 0:t.id};n.push(i)}));const t=l.rawNavigation.filter((e=>{if(!l.activeSection)return!1;const t=n.find((n=>Ke(n,e)));return!t||!(0,se.isMatchSection)(t.section,l.activeSection)}));l.rawNavigation=[...t,...n]},getNavigation:function(e){return d(le()(r).filter((n=>(0,se.isMatchSection)(n.section,e))))},saveNavigationList:u,resetNavigation:async function(){await u([]),l.rawNavigation=le()(a)}}}var Ue,Qe=t(71171),Ye=t(1192),Xe=t(2484),$e=t(5873),en=t(88764),nn=t(55402),tn=t(5939),on=t(33518),an=t(49522);function ln(e){var n,t,i,a;let{className:l,navigation:r}=e;const{blocklet:s}=(0,Oe.y0)(),{logoUrl:c}=(0,an.Z)({blocklet:s}),d=null===s||void 0===s||null===(n=s.environments)||void 0===n||null===(t=n.find((e=>e.key===fe.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_OWNER)))||void 0===t?void 0:t.value,u=null===s||void 0===s||null===(i=s.environments)||void 0===i||null===(a=i.find((e=>e.key===fe.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_YEAR)))||void 0===a?void 0:a.value,m=d||u?{owner:d,year:u}:void 0,v={appId:s.appDid,appLogo:c,appName:s.meta.title,enableConnect:!0,enableLocale:!1,navigation:r,copyright:m};return(0,_.jsx)(en.Z,{children:(0,_.jsxs)(o.Z,{className:l,children:[(0,_.jsx)(Ye.Z,{meta:v}),(0,_.jsx)(o.Z,{children:(0,_.jsx)($e.Z,{meta:v,invalidPathFallback:()=>{},headerProps:{style:{display:"none"}},children:(0,_.jsx)(nn.ZP,{container:!0,spacing:2,children:new Array(6).fill().map(((e,n)=>(0,_.jsxs)(nn.ZP,{item:!0,xs:4,children:[(0,_.jsx)(tn.Z,{animation:!1,variant:"rectangular",width:"100%",height:120}),(0,_.jsxs)(o.Z,{sx:{pt:.5},children:[(0,_.jsx)(tn.Z,{animation:!1}),(0,_.jsx)(tn.Z,{width:"60%",animation:!1})]})]},n)))})})}),(0,_.jsx)(Xe.Z,{meta:v})]})})}ln.propTypes={className:N().string,navigation:N().array},ln.defaultProps={className:"",navigation:[]};const rn=(0,on.Z)(ln)(Ue||(Ue=(0,Qe.Z)(["\n .dashboard {\n height: auto !important;\n }\n .dashboard-content + div {\n display: none;\n }\n"]))),sn={login:Z(),logout:Z(),switch:Z(),switchDid:Z(),switchProfile:Z(),switchPassport:Z(),useDid:()=>({walletDid:"abcdefghijklmnopqrstuvwxyz"}),useOAuth:()=>({logoutOAuth:Z(),bindOAuth:Z(),configs:{},switchOAuthPassport:Z()})},cn={header:"Header",footer:"Footer",bottom:"Footer Link",social:"Footer Social",dashboard:"Dashboard",sessionManager:"SessionManager"};const dn=function(){const{t:e}=(0,b.PE)(),{blocklet:n}=(0,Oe.y0)(),t=(0,i.useRef)(null),{roles:y}=(0,Pe.DJ)(),Z=(0,d.Z)((e=>e.breakpoints.down("md"))),L=(0,x.Z)({saveLoading:!1,resetLoading:!1,showResetConfirm:!1,mockRole:"owner"}),{state:N,navigation:S,getNavigation:w,saveNavigationList:C,resetNavigation:P,updateActiveSection:O,updateNavigationTree:E,updateNavigationItem:A,delNavigationItem:R,addNavigationItem:T}=He(),M=(0,i.useCallback)((e=>{t.current.add({parent:e},((e,n)=>{T(n),e()}))}),[T]),I=(0,i.useCallback)((function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};switch(e){case"edit":t.current.edit(n,((e,n)=>{A(n),e()}));break;case"toggle":A({id:n.id,visible:!n.visible});break;case"del":R(n.id)}}),[R,A]),D=(0,i.useCallback)((async()=>{try{L.saveLoading=!0,await C(N.rawNavigation),h.Z.success(e("common.succeeded"))}catch(n){h.Z.error((0,_.jsxs)(o.Z,{children:[(0,_.jsx)(f.Z,{variant:"subtitle2",children:e("navigation.actionFailed")}),(0,_.jsx)(f.Z,{variant:"body1",children:(0,Be.Z)(n)||n.error})]}))}finally{L.saveLoading=!1}}),[N.rawNavigation,L,C,e]),z=(0,i.useCallback)((async()=>{try{L.resetLoading=!0,await P(),h.Z.success(e("navigation.action.resetSuccessful"),{variant:"success"})}catch(n){h.Z.error((0,_.jsxs)(o.Z,{children:[(0,_.jsx)(f.Z,{variant:"subtitle2",children:e("navigation.actionFailed")}),(0,_.jsx)(f.Z,{variant:"body1",children:(0,Be.Z)(n)||n.error})]}))}finally{L.resetLoading=!1}}),[L,P,e]),J=(0,i.useMemo)((()=>({session:{...sn,user:{did:n.appDid,fullName:"Preview User",role:L.mockRole}}})),[n.appDid,L.mockRole]);return(0,_.jsxs)(_.Fragment,{children:[Z&&(0,_.jsx)(m.Z,{fullWidth:!0,size:"small",value:N.activeSection,onChange:e=>O(e.target.value),children:Object.keys(cn).map((e=>(0,_.jsxs)(c.Z,{value:e,children:[cn[e]," (".concat(w(e).length,")")]})))}),!Z&&(0,_.jsx)(l.Z,{variant:"outlined",children:Object.keys(cn).map((e=>(0,_.jsxs)(a.Z,{variant:N.activeSection===e?"contained":void 0,onClick:()=>O(e),children:[cn[e]," (".concat(w(e).length,")")]},e)))}),(0,_.jsxs)(v.Z,{variant:"dense",sx:{paddingLeft:"0px !important",paddingRight:"0px !important",mt:2},children:[(0,_.jsx)(f.Z,{variant:"h6",component:"div",sx:{flexGrow:1},children:e("common.config")}),(0,_.jsx)(l.Z,{variant:"outlined",children:(0,_.jsx)(p.Z,{size:"small",variant:"outlined",color:"error",startIcon:(0,_.jsx)(g.JO,{icon:"system-uicons:reset"}),sx:{mr:2},loading:L.resetLoading,loadingPosition:"start",onClick:()=>{L.showResetConfirm=!0},children:e("navigation.action.reset")})}),(0,_.jsxs)(l.Z,{variant:"outlined",children:[(0,_.jsx)(a.Z,{size:"small",variant:"outlined",startIcon:(0,_.jsx)(g.JO,{icon:"mdi:plus"}),onClick:()=>M(),children:e("navigation.action.new")}),(0,_.jsx)(p.Z,{size:"small",variant:"contained",startIcon:(0,_.jsx)(g.JO,{icon:"mdi:content-save"}),loading:L.saveLoading,loadingPosition:"start",onClick:D,children:e("common.save")})]})]}),(0,_.jsx)(u.Z,{variant:"outlined",sx:{display:"flex",height:280,overflow:"hidden"},children:(0,_.jsx)(u.Z,{elevation:0,sx:{flex:1,overflow:"auto"},children:(0,_.jsx)(W,{treeData:w(N.activeSection),setTreeData:E,renderActions:e=>{let{data:n,className:t}=e;return(0,_.jsx)(Ie,{data:n,className:t,section:N.activeSection,add:function(){return M(...arguments)},del:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return I("del",...n)},edit:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return I("edit",...n)},toggle:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return I("toggle",...n)}})}})})}),(0,_.jsxs)(v.Z,{variant:"dense",sx:{paddingLeft:"0px !important",paddingRight:"0px !important",mt:3},children:[(0,_.jsx)(f.Z,{variant:"h6",component:"div",sx:{flexGrow:1},children:e("common.preview")}),(0,_.jsxs)(r.Z,{sx:{m:1,minWidth:120},size:"small",children:[(0,_.jsx)(s.Z,{children:e("common.role")}),(0,_.jsx)(m.Z,{value:L.mockRole,label:"Role",onChange:e=>{L.mockRole=e.target.value},children:y.map((e=>(0,_.jsx)(c.Z,{value:e.name,children:e.title},e.name)))})]})]}),(0,_.jsx)(u.Z,{variant:"outlined",children:(0,_.jsx)(j.B3.Provider,{value:J,children:(0,_.jsx)(rn,{navigation:S})})}),(0,_.jsx)(_e,{ref:t,section:N.activeSection,components:N.components,rawNavigations:N.rawNavigation}),(0,_.jsx)(k.I4,{confirmButton:{text:e("common.confirm"),props:{variant:"contained",color:"error"}},cancelButton:{text:e("common.cancel"),props:{color:"primary"}},open:L.showResetConfirm,title:e("navigation.action.restConfirmTitle"),onConfirm:async()=>{await z(),L.showResetConfirm=!1},onCancel:()=>{L.showResetConfirm=!1},children:(0,_.jsx)("p",{children:e("navigation.action.restConfirmDesc")})})]})}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[9277],{56742:(e,n,i)=>{const{toBuffer:t,toAddress:o}=i(49394),{base32:r}=i(46422);e.exports={encode:e=>{if(!e)return e;const n=t(o(e));return r.encode(n)}}},44543:(e,n,i)=>{const t=i(57156);e.exports=(e,n)=>t(e)===t(n)},92726:(e,n,i)=>{"use strict";i.d(n,{Z:()=>x});var t,o=i(71171),r=i(5057),a=i(55898),s=i.n(a),l=i(33518),d=i(67680),c=i(61533),m=i(74490),u=i(45267),p=i(46954),f=i(44067),h=i(96266);function x(e){let{actions:n,size:i,...t}=e;const[o,a]=(0,r.useState)(null),s=Boolean(o),l=e=>{try{e.stopPropagation(),e.preventDefault()}catch{}a(null)};return(0,h.jsxs)(g,{...t,children:[(0,h.jsx)(d.Z,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"actions-menu-icon",onClick:e=>{try{e.stopPropagation(),e.preventDefault()}catch{}a(e.currentTarget)},size:i,children:(0,h.jsx)(u.Z,{})}),(0,h.jsx)(c.Z,{id:"actions-menu","data-cy":"actions-menu",anchorEl:o,keepMounted:!0,open:s,onClose:l,PaperProps:{},children:n.map(((e,n)=>{if("function"===typeof e)return e({close:l});const{icon:i,text:t,onClick:o,disabled:a=!1,...s}=e;return(0,r.createElement)(m.Z,{...s,disabled:a,dense:!0,onClick:async e=>{await o(e),l()},key:n,"data-cy":"actions-menu-".concat(n)},(0,h.jsx)(p.Z,{style:{minWidth:24,marginRight:8},children:i}),(0,h.jsx)(f.Z,{primary:t}))}))})]})}x.propTypes={actions:s().array,size:s().oneOf(["small","medium","large"])},x.defaultProps={actions:[],size:"small"};const g=l.Z.div(t||(t=(0,o.Z)([""])))},99277:(e,n,i)=>{"use strict";i.r(n),i.d(n,{default:()=>Le});var t=i(71171),o=i(28726),r=i(33518),a=i(5057),s=i(17655),l=i(76720),d=i(64886),c=i(68420),m=i(19778),u=i(38242),p=i(11750),f=i(29054),h=i(58238),x=i(17450),g=i(14491),v=i(81010),j=i(4651),y=i(55898),b=i.n(y),Z=i(44919),k=i(76416),D=i(93938),P=i(39948),C=i(38763),T=i(75392),S=i(67680),R=i(11819),w=i(75239),A=i(96366),E=i(72904),I=i(56742),F=i(49714),q=i(18067),z=i(25710),N=i(44846),L=i(63406),_=i(74511),B=i(88574),O=i(86229),M=i(76811),W=i(70461),U=i(96266);const H=e=>["waiting","creating","renewaling"].includes(e);function K(e){var n,i;const{t:t}=(0,c.PE)(),[o,r]=(0,a.useState)(!1),{inService:s}=(0,h.h6)(),[l,d]=(0,a.useState)(null),{siteId:m,domain:u,onAdd:p,children:x,did:g}=e,[v,j]=(0,a.useState)(!1),{api:y,ws:{useSubscription:b}}=(0,h.h6)(),{mode:Z,actions:{refreshDomainStatus:k}}=(0,f.y0)(),D=(0,_.Z)((async()=>{const{cert:e}=await y.findCertificateByDomain({input:{domain:u,did:g}});return e})),P=(e,n)=>{e.domain===u&&(j(!1),r(!1),s&&"setup"!==Z&&("success"===n?O.Z.success(t("setup.domain.genCertSuccess",{domain:e.domain})):"error"===n&&O.Z.error(t("setup.domain.genCertFailed",{domain:e.domain,message:e.message}))))};if((0,a.useEffect)((()=>{var e;D.loading||j(H(null===(e=D.value)||void 0===e?void 0:e.status))}),[D.loading,null===(n=D.value)||void 0===n?void 0:n.status]),b(M.BlockletEvents.certError,(e=>P(e,"error"))),b(M.BlockletEvents.certIssued,(e=>{D.retry(),k(e.domain),P(e,"success")})),D.loading)return"";if("normal"===(null===(i=D.value)||void 0===i?void 0:i.status))return"";const C={title:t("router.cert.genLetsEncryptCert.title"),description:(0,U.jsxs)("div",{children:[(0,U.jsx)(B.Z,{type:"success",children:t("router.cert.genLetsEncryptCert.dnsTip")}),t("router.cert.genLetsEncryptCert.description")]}),confirm:t("common.confirm"),onConfirm:async()=>{r(!0);try{await y.issueLetsEncryptCert({input:{siteId:m,domain:u,did:g,inBlockletSetup:"setup"===Z}}),p(),j(!0)}catch(e){console.error(e),j(!1)}finally{r(!1),d(null)}},onCancel:()=>{r(!1),d(null)}};return(0,U.jsxs)(U.Fragment,{children:[v?(0,U.jsx)(w.Z,{title:t("router.cert.issuing"),children:(0,U.jsx)(N.Z,{size:12})}):x({loading:o,open:e=>{e.stopPropagation(),d(C)}}),l&&(0,U.jsx)(W.Z,{color:"primary",title:l.title,description:l.description,confirm:l.confirm,params:l.params,onConfirm:l.onConfirm,onCancel:l.onCancel})]})}function V(e){const{domain:n,domainStatus:i,...t}=e;return!(0,g.rM)(n)||null!==i&&void 0!==i&&i.isHttps?"":(0,U.jsx)(K,{domain:n,...t})}K.propTypes={domain:b().string.isRequired,did:b().string.isRequired,siteId:b().string.isRequired,onAdd:b().func,children:b().any},K.defaultProps={onAdd:()=>{},children:null},V.propTypes={domain:b().string.isRequired,domainStatus:b().shape({isHttps:b().bool}).isRequired,did:b().string.isRequired,onAdd:b().func,children:b().any},V.defaultProps={onAdd:()=>{},children:null};var Y=i(11593),G=i(74490),X=i(31853),J=i(51233),Q=i(49983),$=i(96538),ee=i(38898),ne=i(47020),ie=i(92706),te=i.n(ie),oe=i(11854),re=i.n(oe),ae=i(6352),se=i.n(ae),le=i(60344),de=i(12937);function ce(e){let{domain:n,resolvedTarget:i,...t}=e;const{t:o,locale:r}=(0,c.PE)();return(0,U.jsxs)(P.Z,{sx:{backgroundColor:"rgb(236, 251, 253)",borderColor:"rgb(236, 251, 253)",borderRadius:"8px",padding:"12px"},...t,children:[(0,U.jsxs)(P.Z,{display:"flex",children:[o("router.domain.setup.tipStart"),n&&(0,U.jsx)(P.Z,{mx:.5,color:"primary.main",fontWeight:"fontWeightBold",children:n}),o("router.domain.setup.tipEnd"),":"]}),(0,U.jsxs)(P.Z,{sx:{"&>div":{mb:0},marginTop:"8px"},children:[(0,U.jsx)(me,{label:o("router.domain.setup.recordType"),value:"CNAME",locale:r}),(0,U.jsx)(me,{label:o("router.domain.setup.recordValue"),value:i,locale:r})]})]})}function me(e){let{locale:n,label:i,value:t}=e;const o=(0,E.Z)((e=>e.breakpoints.down("md"))),r=(0,A.Z)();return(0,U.jsx)(d.Z,{name:i,nameWidth:120,children:(0,U.jsxs)(P.Z,{sx:{display:"flex",alignItems:"center",lineHeight:1},children:[(0,U.jsx)(p.Z,{component:"span",color:"primary.main",overflow:"auto",sx:o?{maxWidth:"95%",wordWrap:"break-word"}:{wordWrap:"break-word"},children:t}),(0,U.jsx)(de.q,{content:t,locale:n,style:{marginLeft:"4px",color:r.palette.text.secondary}})]})})}function ue(e){let{siteId:n,teamDid:i,cnameDomain:t,defaultCustomDomain:r,onInputDomain:a,appId:s,appPk:l,onSuccess:d,disabled:m,autoFocus:u,inBlockletSetup:p,...f}=e;const{t:x,locale:v}=(0,c.PE)(),{api:j,info:y}=(0,h.h6)(),[b,Z]=(0,X.Z)({domain:r,error:null,type:null!==y&&void 0!==y&&y.nftDomainUrl?"nftDomain":"inputDomain",showNFTDomainAuth:!1});let k="";y.nftDomainUrl&&(k=se()(y.nftDomainUrl,"/api"));const D=async e=>{let{domain:t,nftDid:o,chainHost:r}=e;try{const e=(0,J.sf)(t);await j.addDomainAlias({input:{id:n,type:"nft-domain",domainAlias:e,nftDid:o,chainHost:r,teamDid:i,inBlockletSetup:p}}),await(0,g._v)(2e3),Z({confirmSetting:null,showNFTDomainAuth:!1}),d({domain:e,type:b.type,nftDid:o,chainHost:r})}finally{Z({openAuthNFTDomain:!1})}},C={inputDomain:{name:x("router.domainAlias.inputDomain"),component:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(ne.Z,{label:x("router.domainAlias.add.domainDescription"),helperText:b.error||x("router.domainAlias.add.helperText"),inputProps:{"data-cy":"domain-name-input"},fullWidth:!0,disabled:m,value:b.domain,onChange:e=>{var n;const i=re()(null===(n=e.target)||void 0===n?void 0:n.value);Z({domain:i});const t=(0,g.ub)(i,v);Z({domain:i,error:t}),a({domain:i,error:t})},autoFocus:u,onBlur:()=>{b.domain||Z({error:null})},size:"small",variant:"outlined",error:!!b.error}),(0,U.jsx)(ce,{domain:b.domain,resolvedTarget:t,style:{marginTop:"8px"}})]})}};null!==y&&void 0!==y&&y.nftDomainUrl&&(C.nftDomain={name:x("router.domainAlias.nftDomain"),component:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(P.Z,{sx:{maxWidth:"640px",color:"text.secondary",fontSize:"14px"},children:[(0,U.jsx)("div",{children:x("router.domainAlias.addDomainNFT.tips")}),(0,U.jsxs)("div",{children:[x("router.domainAlias.addDomainNFT.buyTip"),(0,U.jsxs)(ee.Z,{href:y.nftDomainUrl,sx:{fontSize:"14px",display:"inline-flex",alignItems:"center"},target:"_blank",children:[(0,U.jsx)("i",{children:x("router.domainAlias.addDomainNFT.buy")}),(0,U.jsx)($.Z,{fontSize:"small"})]})]})]}),(0,U.jsx)(o.Z,{sx:{marginTop:"8px"},disabled:m,onClick:()=>Z({showNFTDomainAuth:!0}),variant:"contained",children:x("router.domainAlias.addDomainNFT.showNFT")}),(0,U.jsx)(Q.Z,{open:b.showNFTDomainAuth,popup:!0,useSocket:!1,action:"authorize",baseUrl:k,checkFn:le.od.create({baseURL:k}).get,extraParams:{delegatee:s,delegateePk:l},onSuccess:D,onClose:()=>Z({showNFTDomainAuth:!1}),checkTimeout:3e5,showDownload:!1,messages:{title:x("router.domainAlias.addDomainNFT.connect.title"),scan:x("router.domainAlias.addDomainNFT.connect.scan"),confirm:x("router.domainAlias.addDomainNFT.connect.confirm"),success:x("router.domainAlias.addDomainNFT.connect.success")}})]})});const T=Object.keys(C);return T.sort((e=>"inputDomain"===e?1:-1)),(0,U.jsx)(P.Z,{...f,children:(0,U.jsx)(P.Z,{sx:{display:"flex",flexDirection:"column",justifyContent:"flex-start",gap:"1em"},children:T.map(((e,n)=>{var i,t;return(0,U.jsxs)(P.Z,{children:[T.length>1&&(0,U.jsx)(P.Z,{children:"".concat(x("optionsOrder.".concat(n+1)),": ").concat(null===(i=C[e])||void 0===i?void 0:i.name)}),(0,U.jsx)(P.Z,{sx:{marginTop:"8px"},children:null===(t=C[e])||void 0===t?void 0:t.component})]},e)}))})})}function pe(e){let{id:n,children:i,title:t,teamDid:o,systemDomains:r,appId:a,appPk:s}=e;const{t:l}=(0,c.PE)(),{api:d}=(0,h.h6)(),[m,u]=(0,X.Z)({loading:!1,confirmSetting:null}),p=r.find((e=>(0,F.isDidDomain)(e))),f={title:t||l("router.domainAlias.add.title"),description:function(e,i,t){return(0,U.jsx)(ue,{siteId:n,teamDid:o,cnameDomain:p,onSuccess:()=>u({confirmSetting:null}),onInputDomain:n=>{let{domain:o,error:r}=n;i({...e,domain:o,__disableConfirm:!!r}),t(r)},appId:a,appPk:s})},confirm:l("common.confirm"),cancel:l("common.cancel"),params:{domain:"",__disableConfirm:!0},onConfirm:async e=>{if(!m.loading){u({loading:!0});try{await d.addDomainAlias({input:{id:n,domainAlias:(0,J.sf)(e.domain),teamDid:o}}),await(0,g._v)(2e3),u({confirmSetting:null})}finally{u({loading:!1})}}},onCancel:()=>{u({loading:!1,confirmSetting:null})}},x=e=>{e.stopPropagation(),u({confirmSetting:f})};return(0,U.jsxs)(U.Fragment,{children:["function"===typeof i?i({loading:m.loading,open:x}):(0,U.jsxs)(G.Z,{onClick:x,className:"rule-action","data-cy":"action-add-domain-alias",children:[m.loading?(0,U.jsx)(N.Z,{size:16}):(0,U.jsx)(Y.Z,{style:{fontSize:18,marginRight:5}}),l("router.domainAlias.add.title")]}),m.confirmSetting&&(0,U.jsx)(W.Z,{title:m.confirmSetting.title,description:m.confirmSetting.description,confirm:m.confirmSetting.confirm,cancel:m.confirmSetting.cancel,params:m.confirmSetting.params,onConfirm:m.confirmSetting.onConfirm,onCancel:m.confirmSetting.onCancel,color:"primary",loading:m.loading,maxWidth:"lg"})]})}ce.propTypes={domain:b().string,resolvedTarget:b().string.isRequired},ce.defaultProps={domain:""},me.propTypes={locale:b().string.isRequired,label:b().string.isRequired,value:b().string.isRequired},ue.propTypes={siteId:b().string.isRequired,teamDid:b().string.isRequired,cnameDomain:b().string.isRequired,defaultCustomDomain:b().string,onInputDomain:b().func,onSuccess:b().func,appId:b().string,appPk:b().string,disabled:b().bool,autoFocus:b().bool,inBlockletSetup:b().bool},ue.defaultProps={defaultCustomDomain:"",onInputDomain:te(),onSuccess:te(),appId:"",appPk:"",disabled:!1,autoFocus:!0,inBlockletSetup:!1},pe.propTypes={id:b().string.isRequired,children:b().any,title:b().string,teamDid:b().string,systemDomains:b().arrayOf(b().string).isRequired,appId:b().string,appPk:b().string.isRequired},pe.defaultProps={children:null,title:"",teamDid:"",appId:null};var fe=i(46954),he=i(44067),xe=i(27773),ge=i(92726);function ve(e){const{t:n}=(0,c.PE)(),[i,t]=(0,a.useState)(!1),[r,s]=(0,a.useState)(null),{id:l,domain:d,children:m,teamDid:u}=e,{api:p}=(0,h.h6)(),f={title:n("router.domainAlias.delete.title"),description:n("router.domainAlias.delete.description"),confirm:n("common.confirm"),onConfirm:async()=>{t(!0);try{await p.deleteDomainAlias({input:{id:l,domainAlias:d,teamDid:u}}),await(0,g._v)(2e3)}catch(e){O.Z.error(e.message)}finally{s(null),t(!1)}},onCancel:()=>{t(!1),s(null)}},x=e=>{e.stopPropagation(),s(f)};return(0,U.jsxs)(U.Fragment,{children:["function"===typeof m?m({loading:i,open:x}):(0,U.jsxs)(o.Z,{edge:"end",onClick:x,size:"small",className:"rule-action",color:"error","data-cy":"action-delete-domain-alias",children:[i?(0,U.jsx)(N.Z,{size:16}):(0,U.jsx)(xe.default,{style:{fontSize:16}}),n("router.domainAlias.delete.title")]}),r&&(0,U.jsx)(W.Z,{title:r.title,description:r.description,confirm:r.confirm,params:r.params,onConfirm:r.onConfirm,onCancel:r.onCancel})]})}function je(e){let{site:n,domain:i,blocklet:t}=e;const{t:o}=(0,c.PE)(),r=i.value===window.location.hostname;return(0,U.jsx)(ge.Z,{"data-cy":"domain-actions",size:"large",actions:[e=>{var a;let{close:s}=e;return(0,U.jsx)(ve,{id:n.id,domain:i.value,teamDid:null===t||void 0===t||null===(a=t.meta)||void 0===a?void 0:a.did,children:e=>{let{open:n}=e;return(0,U.jsx)(w.Z,{title:r?o("blocklet.router.currentDomainTip"):"",children:(0,U.jsx)("span",{children:(0,U.jsxs)(G.Z,{disabled:i.isProtected||r,dense:!0,onClick:e=>{s(),n(e)},"data-cy":"action-toggle-block",children:[(0,U.jsx)(fe.Z,{style:{minWidth:24,marginRight:8},children:(0,U.jsx)(xe.default,{})}),(0,U.jsx)(he.Z,{primary:o("common.delete")})]},"remove")})})}})}]})}ve.propTypes={id:b().string.isRequired,domain:b().string.isRequired,children:b().any,teamDid:b().string},ve.defaultProps={children:null,teamDid:""},je.propTypes={site:b().object.isRequired,domain:b().object.isRequired,blocklet:b().object.isRequired},je.defaultProps={};var ye=i(31942),be=i(69569);const Ze=b().shape({href:b().string,accessibility:b().shape({loading:b().bool,accessible:b().bool}),domainStatus:b().shape({isHttps:b().bool,matchedCert:b().object}),dns:b().shape({resolved:b().bool,ip:b().string})});var ke,De=i(43681),Pe=i.n(De);function Ce(e){let{certificate:n}=e;const[i,t]=(0,a.useState)(null),o=(0,h.h6)(),{t:r,locale:s}=(0,c.PE)(),l=()=>{t(null)},d=Boolean(i);return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(ye.Z,{"aria-owns":d?"mouse-over-popover":void 0,onMouseEnter:e=>{t(e.currentTarget)},onMouseLeave:l,style:{color:"#44cdc6",fontSize:20,cursor:"pointer"}}),(0,U.jsx)(R.ZP,{id:"mouse-over-popover",style:{pointerEvents:"none"},open:d,anchorEl:i,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},onClose:l,disableRestoreFocus:!0,children:(0,U.jsx)(C.Z,{children:(0,U.jsxs)(T.Z,{style:{display:"flex"},children:[(0,U.jsx)("div",{children:(0,U.jsx)("img",{src:"".concat(o.imgPrefix,"/https-certificate-icon.png"),alt:"certificate icon",style:{maxHeight:"100%",maxWidth:"100%"}})}),(0,U.jsxs)(p.Z,{component:"div",style:{marginLeft:"16px"},children:[(0,U.jsx)(p.Z,{component:"div",style:{fontWeight:"bold"},children:n.domain}),(0,U.jsx)(p.Z,{component:"div",children:"".concat(r("common.issuer"),": ").concat(Pe()(n,"issuer.commonName",""))}),(0,U.jsx)(p.Z,{component:"div",children:"".concat(r("router.cert.issuedOn"),": ").concat((0,g.pz)(n.validFrom,s))}),(0,U.jsx)(p.Z,{component:"div",children:"".concat(r("router.cert.expiryOn"),": ").concat((0,g.pz)(n.validTo,s))})]})]})})})]})}function Te(e){let{domain:n,filters:i}=e;const{t:t}=(0,c.PE)(),{value:o,domainStatus:r}=n;if(!(0,g.rM)(o))return null;let s=null,l=null;const{isHttps:d,matchedCert:m}=r;if(!(0,g.ao)(o)){const{dns:{resolved:e,ip:n}={}}=r;s=e||"127.0.0.1"===n?(0,U.jsx)(w.Z,{title:t("router.domain.verify.ok"),children:(0,U.jsx)(be.Z,{color:"success"})}):(0,U.jsx)(w.Z,{title:t("router.domain.verify.notResolved"),children:(0,U.jsx)(be.Z,{color:"error"})})}l=d?(0,U.jsx)(Ce,{certificate:m}):(0,U.jsx)(w.Z,{title:t("router.domain.https.bad"),children:(0,U.jsx)(ye.Z,{style:{color:"#D0021B",fontSize:20,cursor:"pointer"}})});const u=i.map((e=>"domain"===e?s:"http"===e?l:null));return(0,a.createElement)(a.Fragment,null,...u)}Ce.propTypes={certificate:b().object},Ce.defaultProps={certificate:{}},Te.propTypes={domain:Ze.isRequired,filters:b().array},Te.defaultProps={filters:["domain","http"]};const Se=(0,L.V)(Ae,"mutate_blocklets"),Re=(0,L.V)(Ae,"",g.Wf);function we(e){const{inService:n}=(0,h.h6)(),{blocklet:i,loadingRuntimeInfo:t}=(0,f.y0)();let o=Se;return n&&(o=Re),(0,U.jsx)(o,{...e,blocklet:i,inService:n,loadingRuntimeInfo:t})}function Ae(e){var n,i,t,r;let{hasPermission:d,blocklet:m,loadingRuntimeInfo:p,inService:f,listOnly:h}=e;const{t:x}=(0,c.PE)(),[v,y]=(0,a.useState)(!1),b=(0,E.Z)((e=>e.breakpoints.down("md"))),k=(0,a.useMemo)((()=>{let e=d;return(0,j.ep)(m)&&(e=e&&f),e}),[d,f,m]),{site:C}=m,T=(0,a.useMemo)((()=>{var e;return(0,g.oE)(null===(e=m.site)||void 0===e?void 0:e.domainAliases)}),[null===(n=m.site)||void 0===n?void 0:n.domainAliases]),S=[],R=[],w=(0,I.encode)(m.appPid),A=null===(i=m.environments)||void 0===i||null===(t=i.find((e=>"BLOCKLET_APP_PK"===e.key)))||void 0===t?void 0:t.value,q=(0,g.M6)(T);return T.forEach((e=>{const n=e.value||"";(0,F.isDidDomain)(n)&&!n.startsWith(w)?R.push(e):S.push(e)})),(0,U.jsxs)(U.Fragment,{children:[!h&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(P.Z,{className:"title first",display:"flex",justifyContent:"space-between",alignItems:"center",children:[(0,U.jsx)(P.Z,{children:x("common.domain")}),k&&(0,U.jsx)(pe,{id:C.id,title:x("router.domain.add.title"),teamDid:null===(r=m.meta)||void 0===r?void 0:r.did,appId:m.appPid,appPk:A,systemDomains:null===q||void 0===q?void 0:q.map((e=>e.value)),children:e=>{let{open:n}=e;return(0,U.jsxs)(o.Z,{style:{marginLeft:16},variant:"contained",color:"primary","data-cy":"add-domain-alias",onClick:n,disabled:(0,u.isInProgress)(m.status),children:[(0,U.jsx)(Z.Z,{style:{fontSize:"1.3em",marginRight:4}}),x("common.add")]})}})]}),!1===(0,u.isAccessible)(m.status)&&(0,U.jsx)(P.Z,{mt:1.5,mb:1.5,children:(0,U.jsx)(D.Z,{severity:"warning",children:x("blocklet.router.noRunning")})})]}),(0,U.jsx)(P.Z,{sx:{display:"flex",flexDirection:"column",gap:1},children:(v?T:S).map((e=>{var n,i;const t=e.value;return(0,U.jsxs)(a.Fragment,{children:[b&&(0,U.jsxs)(P.Z,{display:"flex",flexDirection:"column",children:[(0,U.jsx)(P.Z,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:(0,U.jsx)(Ee,{domain:e,target:"_blank",children:e.value})}),(0,U.jsxs)(P.Z,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[(0,U.jsxs)(P.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:1},children:[(0,U.jsx)(Te,{domain:e,filters:["domain"]},"".concat(e.value,"-domain")),(0,U.jsx)(qe,{siteId:null===(n=m.site)||void 0===n?void 0:n.id,domain:e,blocklet:m,hasMutatePermission:k})]}),(0,U.jsx)(P.Z,{sx:{button:{padding:0}},children:(0,U.jsx)(Fe,{hasMutatePermission:k,site:C,domain:e,blocklet:m})})]})]},t),!b&&(0,U.jsxs)(P.Z,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[(0,U.jsxs)(P.Z,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[(0,U.jsx)(Te,{domain:e,filters:["domain"]},"".concat(e.value,"-domain")),(0,U.jsx)(P.Z,{sx:{ml:2,mr:.5},children:(0,U.jsx)(Ee,{domain:e,target:"_blank",children:e.value})}),(0,U.jsx)(qe,{siteId:null===(i=m.site)||void 0===i?void 0:i.id,domain:e,blocklet:m,hasMutatePermission:k})]}),(0,U.jsx)(P.Z,{sx:{button:{padding:0}},children:(0,U.jsx)(Fe,{hasMutatePermission:k,site:C,domain:e,blocklet:m})})]},t)]},t)}))}),R.length>0&&(0,U.jsx)("div",{style:{marginLeft:"20px",marginTop:"12px"},children:(0,U.jsx)(o.Z,{endIcon:v?(0,U.jsx)(s.Z,{}):(0,U.jsx)(l.Z,{}),onClick:()=>y(!v),children:x(v?"common.collapseAll":"blocklet.router.showAllDomains")})}),!T.length&&(p?(0,U.jsx)(N.Z,{size:16}):(0,U.jsx)(z.Z,{children:x("common.empty")}))]})}function Ee(e){let{domain:n,children:i,...t}=e;const{t:o}=(0,c.PE)(),{href:r,accessibility:a}=n;return!a||a.loading?(0,U.jsxs)(Ie,{...t,children:[i,(0,U.jsx)(w.Z,{title:o("blocklet.router.checkUrlAccessible"),placement:"top-end",children:(0,U.jsx)("span",{className:"status",children:(0,U.jsx)(N.Z,{size:12})})})]}):a.accessible?(0,U.jsx)(Ie,{...t,children:(0,U.jsx)("a",{href:r,target:"_blank",rel:"noopener noreferrer",children:i})}):(0,U.jsx)(Ie,{...t,children:(0,U.jsx)(w.Z,{title:o("blocklet.router.urlInaccessible"),placement:"top-end",children:(0,U.jsx)("span",{children:i})})})}we.propTypes={listOnly:b().bool},we.defaultProps={listOnly:!1},Ae.propTypes={hasPermission:b().bool,blocklet:b().object.isRequired,loadingRuntimeInfo:b().bool,inService:b().bool.isRequired,listOnly:b().bool},Ae.defaultProps={hasPermission:!1,loadingRuntimeInfo:!1,listOnly:!1},Ee.propTypes={domain:Ze.isRequired,children:b().any.isRequired};const Ie=r.Z.span(ke||(ke=(0,t.Z)(["\n &,\n & > * {\n color: #222;\n font-size: 18px;\n word-break: break-all;\n }\n\n .status {\n margin-left: 8px;\n }\n"])));function Fe(e){let{hasMutatePermission:n,site:i,domain:t,blocklet:o}=e;const r=(0,A.Z)(),{t:a}=(0,c.PE)();return n&&!t.isProtected?(0,U.jsx)(je,{site:i,domain:t,blocklet:o}):(0,U.jsx)(w.Z,{title:a("blocklet.router.domainLockTooltip"),placement:"top",children:(0,U.jsx)(S.Z,{disabled:!0,size:"large",style:{pointerEvents:"auto",paddingTop:0,paddingBottom:0},children:(0,U.jsx)(q.Z,{style:{fill:r.palette.text.disabled}})})})}function qe(e){let{siteId:n,domain:i,blocklet:t,hasMutatePermission:r}=e;const s=(0,A.Z)(),{t:l}=(0,c.PE)(),[d,m]=(0,a.useState)(null),u=()=>{m(null)};return(0,U.jsxs)(P.Z,{sx:{display:"flex",justifyContent:"flex-start",alignItems:"center",gap:1},children:["nft-domain"===i.type&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(k.Z,{onMouseEnter:e=>{m(e.currentTarget)},onMouseLeave:u,style:{cursor:"pointer",fill:s.palette.primary.main}}),(0,U.jsx)(R.ZP,{id:"mouse-over-popover",style:{pointerEvents:"none"},open:Boolean(d),anchorEl:d,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},onClose:u,disableRestoreFocus:!0,children:(0,U.jsx)(C.Z,{children:(0,U.jsxs)(T.Z,{style:{display:"flex",flexDirection:"column"},children:[(0,U.jsxs)(p.Z,{component:"div",style:{display:"flex",alignItems:"center"},children:[(0,U.jsx)(k.Z,{style:{fill:s.palette.primary.main}}),(0,U.jsx)(p.Z,{component:"span",style:{marginLeft:"8px",fontSize:"18px",fontWeight:"bolder"},children:l("router.domainAlias.nftDomain")})]}),(0,U.jsxs)(p.Z,{component:"div",style:{display:"flex",marginTop:"12px"},children:[(0,U.jsx)(p.Z,{component:"span",style:{width:"80px",marginRight:"8px"},children:l("common.domain")}),(0,U.jsx)(p.Z,{component:"span",children:i.value})]}),(0,U.jsxs)(p.Z,{component:"div",style:{display:"flex"},children:[(0,U.jsx)(p.Z,{component:"span",style:{width:"80px",marginRight:"8px"},children:"NFT"}),(0,U.jsx)(x.Z,{did:i.nftDid})]})]})})})]}),(0,U.jsx)(Te,{domain:i,filters:["http"]},"".concat(i.value,"-http")),r&&(0,U.jsx)(V,{siteId:n,domain:i.value,domainStatus:i.domainStatus,did:t.meta.did,children:e=>{let{open:n}=e;return(0,U.jsx)(o.Z,{sx:{padding:0},size:"small",onClick:e=>n(e),children:l("router.cert.genLetsEncryptCert.title")})}})]})}var ze;Fe.propTypes={hasMutatePermission:b().bool.isRequired,site:b().object.isRequired,domain:Ze.isRequired,blocklet:b().object.isRequired},qe.propTypes={siteId:b().string.isRequired,domain:Ze.isRequired,blocklet:b().object.isRequired,hasMutatePermission:b().bool.isRequired};const Ne={arcblock:"ArcBlock",ethereum:"Ethereum"};function Le(){var e,n,i,t,r;const{t:p,locale:y}=(0,c.PE)(),{info:b,inService:Z}=(0,h.h6)(),[k,D]=(0,a.useState)(!1),{blocklet:P}=(0,f.y0)(),{appDid:C,appPid:T,migratedFrom:S=[]}=P,R=null===(e=P.environments.find((e=>"BLOCKLET_APP_CHAIN_TYPE"===e.key)))||void 0===e?void 0:e.value,w=[C?{name:p("blocklet.appId"),value:(0,U.jsx)(x.Z,{did:C})}:null,T?{name:p("blocklet.appPid"),value:(0,U.jsx)(x.Z,{did:T})}:null,(null===S||void 0===S?void 0:S.length)>1?{name:p("blocklet.alsoKnownAs"),value:(0,U.jsxs)("div",{children:[(k?S.slice(1):S.slice(1,2)).map((e=>(0,U.jsx)(x.Z,{did:e.appDid}))),S.length>2&&(0,U.jsx)(o.Z,{style:{marginLeft:"18px"},endIcon:k?(0,U.jsx)(s.Z,{}):(0,U.jsx)(l.Z,{}),onClick:()=>D(!k),children:p(k?"common.collapseAll":"blocklet.router.showAllDIDs")})]})}:null,{name:p("common.name"),value:(0,u.getDisplayName)(P,!0)},{name:p("common.status"),value:(0,U.jsx)(v.Z,{status:P.status,source:P.source})},(0,j.ep)(P)?{name:"NFT",value:(0,U.jsx)(x.Z,{external:!0,href:(0,g.E8)(null===P||void 0===P||null===(n=P.controller)||void 0===n?void 0:n.chainHost,null===P||void 0===P||null===(i=P.controller)||void 0===i?void 0:i.nftId,"asset"),did:null===P||void 0===P||null===(t=P.controller)||void 0===t?void 0:t.nftId})}:null,{name:p("blocklet.installedAt"),value:(0,g.B2)(P.installedAt,y)},{name:p("blocklet.overview.accessControl"),value:p("team.whoCanAccess.".concat((0,u.getWhoCanAccess)(P),".title"))},{name:p("common.owner"),value:null!==(r=P.settings)&&void 0!==r&&r.owner?(0,U.jsx)(x.Z,{did:P.settings.owner.did}):"--"},{name:p("blocklet.config.walletType.name"),value:Ne[R||"arcblock"]||R},P.externalSkSource?{name:p("blocklet.skSource"),value:P.externalSkSource}:null].filter(Boolean);Z&&w.push({name:p("common.serverDid"),value:(0,U.jsx)(x.Z,{did:b.did})},{name:p("common.serverVersion"),value:(0,U.jsx)(m.Z,{children:b.version})});return(0,U.jsxs)(_e,{component:"div",children:[(0,U.jsx)(we,{}),(0,U.jsx)("div",{className:"title",children:(0,U.jsx)("span",{children:p("common.basicInfo")})}),(0,U.jsx)("div",{className:"basicInfo",children:(A=w,A.map((e=>(0,U.jsx)(d.Z,{style:{display:"flex",alignItems:"flex-start"},valueComponent:"div",nameWidth:120,name:e.name,nameFormatter:()=>e.name,children:e.value},e.name))))})]});var A}Le.propTypes={};const _e=(0,r.Z)(p.Z)(ze||(ze=(0,t.Z)(["\n .title {\n font-size: 1.2rem;\n font-weight: bold;\n margin-top: ",";\n margin-bottom: ",";\n\n &.first {\n margin-top: 0;\n }\n }\n"])),(e=>e.theme.spacing(5)),(e=>e.theme.spacing(3)))},51233:(e,n,i)=>{"use strict";i.d(n,{Rw:()=>c,fX:()=>d,sf:()=>m});var t=i(35432),o=i(44543),r=i.n(o),a=i(76811),s=i(32828);const l=(e,n)=>{if(e.type===t.ROUTING_RULE_TYPES.REDIRECT){if(!e.url)return new Error("".concat(n("router.validation.redirectUrlRequired")));if(!e.redirectCode)return new Error("redirect ".concat(n("router.validation.redirectCodeRequired")))}else if(e.type===t.ROUTING_RULE_TYPES.BLOCKLET&&!e.did)return new Error(n("router.validation.didRequired"));return null},d=(e,n)=>{const i=l(e,n);return i||(e.pathPrefix.length?e.pathPrefix.length>150?new Error(n("router.validation.pathPrefixTooLong",{length:150})):null:new Error(n("router.validation.pathPrefixCannotBeEmpty")))},c=e=>{let{params:n,blocklets:i,blocklet:t,locale:o="en"}=e;if(t){let e=(t.children||[]).find((e=>(0,s.default)(e.meta)&&r()(e.mountPoint,n.pathPrefix)));if("gateway"!==t.meta.group&&"/"===n.pathPrefix&&(e="/"),e)return{zh:"\u6302\u8f7d\u70b9 ".concat(n.pathPrefix," \u5df2\u5b58\u5728\uff0c\u8bf7\u4f7f\u7528\u5176\u4ed6\u6302\u8f7d\u70b9"),en:"The mount point ".concat(n.pathPrefix," already exist, please use another mount point")}[o]}const l=i.find((e=>e.meta.did===n.did));if(!l)return"";const d=l.meta.interfaces.find((e=>"web"===e.type));return d&&d.prefix!==a.BLOCKLET_DYNAMIC_PATH_PREFIX&&n.pathPrefix!==d.prefix?{zh:"\u8be5 blocklet \u53ea\u80fd\u6302\u8f7d\u5728 ".concat(d.prefix),en:"This blocklet can only be mounted on ".concat(d.prefix)}[o]:""},m=e=>{if(!e||"string"!==typeof e)return e;let n=e.trim();try{return n=n.toLowerCase(),n.startsWith("http://")||n.startsWith("https://")?new URL(n).hostname:n}catch(i){return console.error("format domain failed",i),n}}}}]);
|