tako-cli 0.2.3 → 0.2.4

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.
@@ -52,7 +52,7 @@
52
52
  </script>
53
53
 
54
54
  <title>TAKO</title>
55
- <script type="module" crossorigin src="/assets/index--axLOH7Y.js"></script>
55
+ <script type="module" crossorigin src="/assets/index-D_s90DDs.js"></script>
56
56
  <link rel="stylesheet" crossorigin href="/assets/index-C4pzYytY.css">
57
57
  <link rel="manifest" href="/manifest.webmanifest"></head>
58
58
  <body>
@@ -1,2 +1,2 @@
1
1
  try{self["workbox:core:7.3.0"]&&_()}catch{}const J=(s,...e)=>{let t=s;return e.length>0&&(t+=` :: ${JSON.stringify(e)}`),t},X=J;class l extends Error{constructor(e,t){const n=X(e,t);super(n),this.name=e,this.details=t}}const d={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:typeof registration<"u"?registration.scope:""},T=s=>[d.prefix,s,d.suffix].filter(e=>e&&e.length>0).join("-"),Y=s=>{for(const e of Object.keys(d))s(e)},k={updateDetails:s=>{Y(e=>{typeof s[e]=="string"&&(d[e]=s[e])})},getGoogleAnalyticsName:s=>s||T(d.googleAnalytics),getPrecacheName:s=>s||T(d.precache),getPrefix:()=>d.prefix,getRuntimeName:s=>s||T(d.runtime),getSuffix:()=>d.suffix};function v(s,e){const t=e();return s.waitUntil(t),t}try{self["workbox:precaching:7.3.0"]&&_()}catch{}const Z="__WB_REVISION__";function ee(s){if(!s)throw new l("add-to-cache-list-unexpected-type",{entry:s});if(typeof s=="string"){const i=new URL(s,location.href);return{cacheKey:i.href,url:i.href}}const{revision:e,url:t}=s;if(!t)throw new l("add-to-cache-list-unexpected-type",{entry:s});if(!e){const i=new URL(t,location.href);return{cacheKey:i.href,url:i.href}}const n=new URL(t,location.href),a=new URL(t,location.href);return n.searchParams.set(Z,e),{cacheKey:n.href,url:a.href}}class te{constructor(){this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=async({request:e,state:t})=>{t&&(t.originalRequest=e)},this.cachedResponseWillBeUsed=async({event:e,state:t,cachedResponse:n})=>{if(e.type==="install"&&t&&t.originalRequest&&t.originalRequest instanceof Request){const a=t.originalRequest.url;n?this.notUpdatedURLs.push(a):this.updatedURLs.push(a)}return n}}}class se{constructor({precacheController:e}){this.cacheKeyWillBeUsed=async({request:t,params:n})=>{const a=n?.cacheKey||this._precacheController.getCacheKeyForURL(t.url);return a?new Request(a,{headers:t.headers}):t},this._precacheController=e}}let w;function ne(){if(w===void 0){const s=new Response("");if("body"in s)try{new Response(s.body),w=!0}catch{w=!1}w=!1}return w}async function ae(s,e){let t=null;if(s.url&&(t=new URL(s.url).origin),t!==self.location.origin)throw new l("cross-origin-copy-response",{origin:t});const n=s.clone(),i={headers:new Headers(n.headers),status:n.status,statusText:n.statusText},r=ne()?n.body:await n.blob();return new Response(r,i)}const ie=s=>new URL(String(s),location.href).href.replace(new RegExp(`^${location.origin}`),"");function O(s,e){const t=new URL(s);for(const n of e)t.searchParams.delete(n);return t.href}async function re(s,e,t,n){const a=O(e.url,t);if(e.url===a)return s.match(e,n);const i=Object.assign(Object.assign({},n),{ignoreSearch:!0}),r=await s.keys(e,i);for(const c of r){const o=O(c.url,t);if(a===o)return s.match(c,n)}}class ce{constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}}const q=new Set;async function oe(){for(const s of q)await s()}function he(s){return new Promise(e=>setTimeout(e,s))}try{self["workbox:strategies:7.3.0"]&&_()}catch{}function x(s){return typeof s=="string"?new Request(s):s}class le{constructor(e,t){this._cacheKeys={},Object.assign(this,t),this.event=t.event,this._strategy=e,this._handlerDeferred=new ce,this._extendLifetimePromises=[],this._plugins=[...e.plugins],this._pluginStateMap=new Map;for(const n of this._plugins)this._pluginStateMap.set(n,{});this.event.waitUntil(this._handlerDeferred.promise)}async fetch(e){const{event:t}=this;let n=x(e);if(n.mode==="navigate"&&t instanceof FetchEvent&&t.preloadResponse){const r=await t.preloadResponse;if(r)return r}const a=this.hasCallback("fetchDidFail")?n.clone():null;try{for(const r of this.iterateCallbacks("requestWillFetch"))n=await r({request:n.clone(),event:t})}catch(r){if(r instanceof Error)throw new l("plugin-error-request-will-fetch",{thrownErrorMessage:r.message})}const i=n.clone();try{let r;r=await fetch(n,n.mode==="navigate"?void 0:this._strategy.fetchOptions);for(const c of this.iterateCallbacks("fetchDidSucceed"))r=await c({event:t,request:i,response:r});return r}catch(r){throw a&&await this.runCallbacks("fetchDidFail",{error:r,event:t,originalRequest:a.clone(),request:i.clone()}),r}}async fetchAndCachePut(e){const t=await this.fetch(e),n=t.clone();return this.waitUntil(this.cachePut(e,n)),t}async cacheMatch(e){const t=x(e);let n;const{cacheName:a,matchOptions:i}=this._strategy,r=await this.getCacheKey(t,"read"),c=Object.assign(Object.assign({},i),{cacheName:a});n=await caches.match(r,c);for(const o of this.iterateCallbacks("cachedResponseWillBeUsed"))n=await o({cacheName:a,matchOptions:i,cachedResponse:n,request:r,event:this.event})||void 0;return n}async cachePut(e,t){const n=x(e);await he(0);const a=await this.getCacheKey(n,"write");if(!t)throw new l("cache-put-with-no-response",{url:ie(a.url)});const i=await this._ensureResponseSafeToCache(t);if(!i)return!1;const{cacheName:r,matchOptions:c}=this._strategy,o=await self.caches.open(r),h=this.hasCallback("cacheDidUpdate"),m=h?await re(o,a.clone(),["__WB_REVISION__"],c):null;try{await o.put(a,h?i.clone():i)}catch(u){if(u instanceof Error)throw u.name==="QuotaExceededError"&&await oe(),u}for(const u of this.iterateCallbacks("cacheDidUpdate"))await u({cacheName:r,oldResponse:m,newResponse:i.clone(),request:a,event:this.event});return!0}async getCacheKey(e,t){const n=`${e.url} | ${t}`;if(!this._cacheKeys[n]){let a=e;for(const i of this.iterateCallbacks("cacheKeyWillBeUsed"))a=x(await i({mode:t,request:a,event:this.event,params:this.params}));this._cacheKeys[n]=a}return this._cacheKeys[n]}hasCallback(e){for(const t of this._strategy.plugins)if(e in t)return!0;return!1}async runCallbacks(e,t){for(const n of this.iterateCallbacks(e))await n(t)}*iterateCallbacks(e){for(const t of this._strategy.plugins)if(typeof t[e]=="function"){const n=this._pluginStateMap.get(t);yield i=>{const r=Object.assign(Object.assign({},i),{state:n});return t[e](r)}}}waitUntil(e){return this._extendLifetimePromises.push(e),e}async doneWaiting(){for(;this._extendLifetimePromises.length;){const e=this._extendLifetimePromises.splice(0),n=(await Promise.allSettled(e)).find(a=>a.status==="rejected");if(n)throw n.reason}}destroy(){this._handlerDeferred.resolve(null)}async _ensureResponseSafeToCache(e){let t=e,n=!1;for(const a of this.iterateCallbacks("cacheWillUpdate"))if(t=await a({request:this.request,response:t,event:this.event})||void 0,n=!0,!t)break;return n||t&&t.status!==200&&(t=void 0),t}}class M{constructor(e={}){this.cacheName=k.getRuntimeName(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,n=typeof e.request=="string"?new Request(e.request):e.request,a="params"in e?e.params:void 0,i=new le(this,{event:t,request:n,params:a}),r=this._getResponse(i,n,t),c=this._awaitComplete(r,i,n,t);return[r,c]}async _getResponse(e,t,n){await e.runCallbacks("handlerWillStart",{event:n,request:t});let a;try{if(a=await this._handle(t,e),!a||a.type==="error")throw new l("no-response",{url:t.url})}catch(i){if(i instanceof Error){for(const r of e.iterateCallbacks("handlerDidError"))if(a=await r({error:i,event:n,request:t}),a)break}if(!a)throw i}for(const i of e.iterateCallbacks("handlerWillRespond"))a=await i({event:n,request:t,response:a});return a}async _awaitComplete(e,t,n,a){let i,r;try{i=await e}catch{}try{await t.runCallbacks("handlerDidRespond",{event:a,request:n,response:i}),await t.doneWaiting()}catch(c){c instanceof Error&&(r=c)}if(await t.runCallbacks("handlerDidComplete",{event:a,request:n,response:i,error:r}),t.destroy(),r)throw r}}class p extends M{constructor(e={}){e.cacheName=k.getPrecacheName(e.cacheName),super(e),this._fallbackToNetwork=e.fallbackToNetwork!==!1,this.plugins.push(p.copyRedirectedCacheableResponsesPlugin)}async _handle(e,t){const n=await t.cacheMatch(e);return n||(t.event&&t.event.type==="install"?await this._handleInstall(e,t):await this._handleFetch(e,t))}async _handleFetch(e,t){let n;const a=t.params||{};if(this._fallbackToNetwork){const i=a.integrity,r=e.integrity,c=!r||r===i;n=await t.fetch(new Request(e,{integrity:e.mode!=="no-cors"?r||i:void 0})),i&&c&&e.mode!=="no-cors"&&(this._useDefaultCacheabilityPluginIfNeeded(),await t.cachePut(e,n.clone()))}else throw new l("missing-precache-entry",{cacheName:this.cacheName,url:e.url});return n}async _handleInstall(e,t){this._useDefaultCacheabilityPluginIfNeeded();const n=await t.fetch(e);if(!await t.cachePut(e,n.clone()))throw new l("bad-precaching-response",{url:e.url,status:n.status});return n}_useDefaultCacheabilityPluginIfNeeded(){let e=null,t=0;for(const[n,a]of this.plugins.entries())a!==p.copyRedirectedCacheableResponsesPlugin&&(a===p.defaultPrecacheCacheabilityPlugin&&(e=n),a.cacheWillUpdate&&t++);t===0?this.plugins.push(p.defaultPrecacheCacheabilityPlugin):t>1&&e!==null&&this.plugins.splice(e,1)}}p.defaultPrecacheCacheabilityPlugin={async cacheWillUpdate({response:s}){return!s||s.status>=400?null:s}};p.copyRedirectedCacheableResponsesPlugin={async cacheWillUpdate({response:s}){return s.redirected?await ae(s):s}};class ue{constructor({cacheName:e,plugins:t=[],fallbackToNetwork:n=!0}={}){this._urlsToCacheKeys=new Map,this._urlsToCacheModes=new Map,this._cacheKeysToIntegrities=new Map,this._strategy=new p({cacheName:k.getPrecacheName(e),plugins:[...t,new se({precacheController:this})],fallbackToNetwork:n}),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 t=[];for(const n of e){typeof n=="string"?t.push(n):n&&n.revision===void 0&&t.push(n.url);const{cacheKey:a,url:i}=ee(n),r=typeof n!="string"&&n.revision?"reload":"default";if(this._urlsToCacheKeys.has(i)&&this._urlsToCacheKeys.get(i)!==a)throw new l("add-to-cache-list-conflicting-entries",{firstEntry:this._urlsToCacheKeys.get(i),secondEntry:a});if(typeof n!="string"&&n.integrity){if(this._cacheKeysToIntegrities.has(a)&&this._cacheKeysToIntegrities.get(a)!==n.integrity)throw new l("add-to-cache-list-conflicting-integrities",{url:i});this._cacheKeysToIntegrities.set(a,n.integrity)}if(this._urlsToCacheKeys.set(i,a),this._urlsToCacheModes.set(i,r),t.length>0){const c=`Workbox is precaching URLs without revision info: ${t.join(", ")}
2
- This is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(c)}}}install(e){return v(e,async()=>{const t=new te;this.strategy.plugins.push(t);for(const[i,r]of this._urlsToCacheKeys){const c=this._cacheKeysToIntegrities.get(r),o=this._urlsToCacheModes.get(i),h=new Request(i,{integrity:c,cache:o,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:r},request:h,event:e}))}const{updatedURLs:n,notUpdatedURLs:a}=t;return{updatedURLs:n,notUpdatedURLs:a}})}activate(e){return v(e,async()=>{const t=await self.caches.open(this.strategy.cacheName),n=await t.keys(),a=new Set(this._urlsToCacheKeys.values()),i=[];for(const r of n)a.has(r.url)||(await t.delete(r),i.push(r.url));return{deletedURLs:i}})}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,n=this.getCacheKeyForURL(t);if(n)return(await self.caches.open(this.strategy.cacheName)).match(n)}createHandlerBoundToURL(e){const t=this.getCacheKeyForURL(e);if(!t)throw new l("non-precached-url",{url:e});return n=>(n.request=new Request(e),n.params=Object.assign({cacheKey:t},n.params),this.strategy.handle(n))}}let D;const H=()=>(D||(D=new ue),D);try{self["workbox:routing:7.3.0"]&&_()}catch{}const V="GET",E=s=>s&&typeof s=="object"?s:{handle:s};class b{constructor(e,t,n=V){this.handler=E(t),this.match=e,this.method=n}setCatchHandler(e){this.catchHandler=E(e)}}class de extends b{constructor(e,t,n){const a=({url:i})=>{const r=e.exec(i.href);if(r&&!(i.origin!==location.origin&&r.index!==0))return r.slice(1)};super(a,t,n)}}class fe{constructor(){this._routes=new Map,this._defaultHandlerMap=new Map}get routes(){return this._routes}addFetchListener(){self.addEventListener("fetch",(e=>{const{request:t}=e,n=this.handleRequest({request:t,event:e});n&&e.respondWith(n)}))}addCacheListener(){self.addEventListener("message",(e=>{if(e.data&&e.data.type==="CACHE_URLS"){const{payload:t}=e.data,n=Promise.all(t.urlsToCache.map(a=>{typeof a=="string"&&(a=[a]);const i=new Request(...a);return this.handleRequest({request:i,event:e})}));e.waitUntil(n),e.ports&&e.ports[0]&&n.then(()=>e.ports[0].postMessage(!0))}}))}handleRequest({request:e,event:t}){const n=new URL(e.url,location.href);if(!n.protocol.startsWith("http"))return;const a=n.origin===location.origin,{params:i,route:r}=this.findMatchingRoute({event:t,request:e,sameOrigin:a,url:n});let c=r&&r.handler;const o=e.method;if(!c&&this._defaultHandlerMap.has(o)&&(c=this._defaultHandlerMap.get(o)),!c)return;let h;try{h=c.handle({url:n,request:e,event:t,params:i})}catch(u){h=Promise.reject(u)}const m=r&&r.catchHandler;return h instanceof Promise&&(this._catchHandler||m)&&(h=h.catch(async u=>{if(m)try{return await m.handle({url:n,request:e,event:t,params:i})}catch(K){K instanceof Error&&(u=K)}if(this._catchHandler)return this._catchHandler.handle({url:n,request:e,event:t});throw u})),h}findMatchingRoute({url:e,sameOrigin:t,request:n,event:a}){const i=this._routes.get(n.method)||[];for(const r of i){let c;const o=r.match({url:e,sameOrigin:t,request:n,event:a});if(o)return c=o,(Array.isArray(c)&&c.length===0||o.constructor===Object&&Object.keys(o).length===0||typeof o=="boolean")&&(c=void 0),{route:r,params:c}}return{}}setDefaultHandler(e,t=V){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 l("unregister-route-but-not-found-with-method",{method:e.method});const t=this._routes.get(e.method).indexOf(e);if(t>-1)this._routes.get(e.method).splice(t,1);else throw new l("unregister-route-route-not-registered")}}let y;const pe=()=>(y||(y=new fe,y.addFetchListener(),y.addCacheListener()),y);function g(s,e,t){let n;if(typeof s=="string"){const i=new URL(s,location.href),r=({url:c})=>c.href===i.href;n=new b(r,e,t)}else if(s instanceof RegExp)n=new de(s,e,t);else if(typeof s=="function")n=new b(s,e,t);else if(s instanceof b)n=s;else throw new l("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});return pe().registerRoute(n),n}function ge(s,e=[]){for(const t of[...s.searchParams.keys()])e.some(n=>n.test(t))&&s.searchParams.delete(t);return s}function*me(s,{ignoreURLParametersMatching:e=[/^utm_/,/^fbclid$/],directoryIndex:t="index.html",cleanURLs:n=!0,urlManipulation:a}={}){const i=new URL(s,location.href);i.hash="",yield i.href;const r=ge(i,e);if(yield r.href,t&&r.pathname.endsWith("/")){const c=new URL(r.href);c.pathname+=t,yield c.href}if(n){const c=new URL(r.href);c.pathname+=".html",yield c.href}if(a){const c=a({url:i});for(const o of c)yield o.href}}class we extends b{constructor(e,t){const n=({request:a})=>{const i=e.getURLsToCacheKeys();for(const r of me(a.url,t)){const c=i.get(r);if(c){const o=e.getIntegrityForCacheKey(c);return{cacheKey:c,integrity:o}}}};super(n,e.strategy)}}function ye(s){const e=H(),t=new we(e,s);g(t)}function _e(s){H().precache(s)}function Re(s,e){_e(s),ye(e)}class $ extends M{async _handle(e,t){let n=await t.cacheMatch(e),a;if(!n)try{n=await t.fetchAndCachePut(e)}catch(i){i instanceof Error&&(a=i)}if(!n)throw new l("no-response",{url:e.url,error:a});return n}}const be={cacheWillUpdate:async({response:s})=>s.status===200||s.status===0?s:null};class S extends M{constructor(e={}){super(e),this.plugins.some(t=>"cacheWillUpdate"in t)||this.plugins.unshift(be),this._networkTimeoutSeconds=e.networkTimeoutSeconds||0}async _handle(e,t){const n=[],a=[];let i;if(this._networkTimeoutSeconds){const{id:o,promise:h}=this._getTimeoutPromise({request:e,logs:n,handler:t});i=o,a.push(h)}const r=this._getNetworkPromise({timeoutId:i,request:e,logs:n,handler:t});a.push(r);const c=await t.waitUntil((async()=>await t.waitUntil(Promise.race(a))||await r)());if(!c)throw new l("no-response",{url:e.url});return c}_getTimeoutPromise({request:e,logs:t,handler:n}){let a;return{promise:new Promise(r=>{a=setTimeout(async()=>{r(await n.cacheMatch(e))},this._networkTimeoutSeconds*1e3)}),id:a}}async _getNetworkPromise({timeoutId:e,request:t,logs:n,handler:a}){let i,r;try{r=await a.fetchAndCachePut(t)}catch(c){c instanceof Error&&(i=c)}return e&&clearTimeout(e),(i||!r)&&(r=await a.cacheMatch(t)),r}}function Q(s){s.then(()=>{})}const Ce=(s,e)=>e.some(t=>s instanceof t);let W,B;function xe(){return W||(W=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Ee(){return B||(B=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const G=new WeakMap,N=new WeakMap,z=new WeakMap,L=new WeakMap,A=new WeakMap;function ke(s){const e=new Promise((t,n)=>{const a=()=>{s.removeEventListener("success",i),s.removeEventListener("error",r)},i=()=>{t(f(s.result)),a()},r=()=>{n(s.error),a()};s.addEventListener("success",i),s.addEventListener("error",r)});return e.then(t=>{t instanceof IDBCursor&&G.set(t,s)}).catch(()=>{}),A.set(e,s),e}function Te(s){if(N.has(s))return;const e=new Promise((t,n)=>{const a=()=>{s.removeEventListener("complete",i),s.removeEventListener("error",r),s.removeEventListener("abort",r)},i=()=>{t(),a()},r=()=>{n(s.error||new DOMException("AbortError","AbortError")),a()};s.addEventListener("complete",i),s.addEventListener("error",r),s.addEventListener("abort",r)});N.set(s,e)}let I={get(s,e,t){if(s instanceof IDBTransaction){if(e==="done")return N.get(s);if(e==="objectStoreNames")return s.objectStoreNames||z.get(s);if(e==="store")return t.objectStoreNames[1]?void 0:t.objectStore(t.objectStoreNames[0])}return f(s[e])},set(s,e,t){return s[e]=t,!0},has(s,e){return s instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in s}};function De(s){I=s(I)}function Le(s){return s===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...t){const n=s.call(U(this),e,...t);return z.set(n,e.sort?e.sort():[e]),f(n)}:Ee().includes(s)?function(...e){return s.apply(U(this),e),f(G.get(this))}:function(...e){return f(s.apply(U(this),e))}}function Ue(s){return typeof s=="function"?Le(s):(s instanceof IDBTransaction&&Te(s),Ce(s,xe())?new Proxy(s,I):s)}function f(s){if(s instanceof IDBRequest)return ke(s);if(L.has(s))return L.get(s);const e=Ue(s);return e!==s&&(L.set(s,e),A.set(e,s)),e}const U=s=>A.get(s);function Pe(s,e,{blocked:t,upgrade:n,blocking:a,terminated:i}={}){const r=indexedDB.open(s,e),c=f(r);return n&&r.addEventListener("upgradeneeded",o=>{n(f(r.result),o.oldVersion,o.newVersion,f(r.transaction),o)}),t&&r.addEventListener("blocked",o=>t(o.oldVersion,o.newVersion,o)),c.then(o=>{i&&o.addEventListener("close",()=>i()),a&&o.addEventListener("versionchange",h=>a(h.oldVersion,h.newVersion,h))}).catch(()=>{}),c}function Ne(s,{blocked:e}={}){const t=indexedDB.deleteDatabase(s);return e&&t.addEventListener("blocked",n=>e(n.oldVersion,n)),f(t).then(()=>{})}const Ie=["get","getKey","getAll","getAllKeys","count"],Me=["put","add","delete","clear"],P=new Map;function j(s,e){if(!(s instanceof IDBDatabase&&!(e in s)&&typeof e=="string"))return;if(P.get(e))return P.get(e);const t=e.replace(/FromIndex$/,""),n=e!==t,a=Me.includes(t);if(!(t in(n?IDBIndex:IDBObjectStore).prototype)||!(a||Ie.includes(t)))return;const i=async function(r,...c){const o=this.transaction(r,a?"readwrite":"readonly");let h=o.store;return n&&(h=h.index(c.shift())),(await Promise.all([h[t](...c),a&&o.done]))[0]};return P.set(e,i),i}De(s=>({...s,get:(e,t,n)=>j(e,t)||s.get(e,t,n),has:(e,t)=>!!j(e,t)||s.has(e,t)}));try{self["workbox:expiration:7.3.0"]&&_()}catch{}const Se="workbox-expiration",R="cache-entries",F=s=>{const e=new URL(s,location.href);return e.hash="",e.href};class Ae{constructor(e){this._db=null,this._cacheName=e}_upgradeDb(e){const t=e.createObjectStore(R,{keyPath:"id"});t.createIndex("cacheName","cacheName",{unique:!1}),t.createIndex("timestamp","timestamp",{unique:!1})}_upgradeDbAndDeleteOldDbs(e){this._upgradeDb(e),this._cacheName&&Ne(this._cacheName)}async setTimestamp(e,t){e=F(e);const n={url:e,timestamp:t,cacheName:this._cacheName,id:this._getId(e)},i=(await this.getDb()).transaction(R,"readwrite",{durability:"relaxed"});await i.store.put(n),await i.done}async getTimestamp(e){const n=await(await this.getDb()).get(R,this._getId(e));return n?.timestamp}async expireEntries(e,t){const n=await this.getDb();let a=await n.transaction(R).store.index("timestamp").openCursor(null,"prev");const i=[];let r=0;for(;a;){const o=a.value;o.cacheName===this._cacheName&&(e&&o.timestamp<e||t&&r>=t?i.push(a.value):r++),a=await a.continue()}const c=[];for(const o of i)await n.delete(R,o.id),c.push(o.url);return c}_getId(e){return this._cacheName+"|"+F(e)}async getDb(){return this._db||(this._db=await Pe(Se,1,{upgrade:this._upgradeDbAndDeleteOldDbs.bind(this)})),this._db}}class Ke{constructor(e,t={}){this._isRunning=!1,this._rerunRequested=!1,this._maxEntries=t.maxEntries,this._maxAgeSeconds=t.maxAgeSeconds,this._matchOptions=t.matchOptions,this._cacheName=e,this._timestampModel=new Ae(e)}async expireEntries(){if(this._isRunning){this._rerunRequested=!0;return}this._isRunning=!0;const e=this._maxAgeSeconds?Date.now()-this._maxAgeSeconds*1e3:0,t=await this._timestampModel.expireEntries(e,this._maxEntries),n=await self.caches.open(this._cacheName);for(const a of t)await n.delete(a,this._matchOptions);this._isRunning=!1,this._rerunRequested&&(this._rerunRequested=!1,Q(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),n=Date.now()-this._maxAgeSeconds*1e3;return t!==void 0?t<n:!0}else return!1}async delete(){this._rerunRequested=!1,await this._timestampModel.expireEntries(1/0)}}function ve(s){q.add(s)}class C{constructor(e={}){this.cachedResponseWillBeUsed=async({event:t,request:n,cacheName:a,cachedResponse:i})=>{if(!i)return null;const r=this._isResponseDateFresh(i),c=this._getCacheExpiration(a);Q(c.expireEntries());const o=c.updateTimestamp(n.url);if(t)try{t.waitUntil(o)}catch{}return r?i:null},this.cacheDidUpdate=async({cacheName:t,request:n})=>{const a=this._getCacheExpiration(t);await a.updateTimestamp(n.url),await a.expireEntries()},this._config=e,this._maxAgeSeconds=e.maxAgeSeconds,this._cacheExpirations=new Map,e.purgeOnQuotaError&&ve(()=>this.deleteCacheAndMetadata())}_getCacheExpiration(e){if(e===k.getRuntimeName())throw new l("expire-custom-caches-only");let t=this._cacheExpirations.get(e);return t||(t=new Ke(e,this._config),this._cacheExpirations.set(e,t)),t}_isResponseDateFresh(e){if(!this._maxAgeSeconds)return!0;const t=this._getDateHeaderTimestamp(e);if(t===null)return!0;const n=Date.now();return t>=n-this._maxAgeSeconds*1e3}_getDateHeaderTimestamp(e){if(!e.headers.has("date"))return null;const t=e.headers.get("date"),a=new Date(t).getTime();return isNaN(a)?null:a}async deleteCacheAndMetadata(){for(const[e,t]of this._cacheExpirations)await self.caches.delete(e),await t.delete();this._cacheExpirations=new Map}}Re([{"revision":"af3b94907e1c72ede058ff0a360cb81c","url":"pwa-64x64.png"},{"revision":"3d5ebc32ce06672905530164d954f366","url":"pwa-512x512.png"},{"revision":"a084007dad655a444c1f1d67deda9c08","url":"pwa-192x192.png"},{"revision":"3d5ebc32ce06672905530164d954f366","url":"maskable-icon-512x512.png"},{"revision":"50ea6f66963b8987830a358ff2c0f3b9","url":"mask-icon.svg"},{"revision":"fb50a178ed9b9c9e15f59fe91ba8933e","url":"index.html"},{"revision":"8352fffd3bff65890929eb23e44fead3","url":"icon.svg"},{"revision":"e7779fbd164d4be26bdae4b68266c391","url":"favicon.ico"},{"revision":"c04f450760de44f5a0f6d573eadd8ec6","url":"apple-touch-icon-180x180.png"},{"revision":null,"url":"assets/yaml-Buea-lGh.js"},{"revision":null,"url":"assets/xml-sdJ4AIDG.js"},{"revision":null,"url":"assets/workbox-window.prod.es5-BIl4cyR9.js"},{"revision":null,"url":"assets/typescript-BPQ3VLAy.js"},{"revision":null,"url":"assets/tsx-COt5Ahok.js"},{"revision":null,"url":"assets/toml-vGWfd6FD.js"},{"revision":null,"url":"assets/swift-D82vCrfD.js"},{"revision":null,"url":"assets/sql-BLtJtn59.js"},{"revision":null,"url":"assets/shellscript-Yzrsuije.js"},{"revision":null,"url":"assets/scss-OYdSNvt2.js"},{"revision":null,"url":"assets/rust-B1yitclQ.js"},{"revision":null,"url":"assets/python-B6aJPvgy.js"},{"revision":null,"url":"assets/powershell-Dpen1YoG.js"},{"revision":null,"url":"assets/php-Dhbhpdrm.js"},{"revision":null,"url":"assets/markdown-Cvjx9yec.js"},{"revision":null,"url":"assets/make-CHLpvVh8.js"},{"revision":null,"url":"assets/kotlin-BdnUsdx6.js"},{"revision":null,"url":"assets/jsx-g9-lgVsj.js"},{"revision":null,"url":"assets/json-Cp-IABpG.js"},{"revision":null,"url":"assets/javascript-wDzz0qaB.js"},{"revision":null,"url":"assets/java-CylS5w8V.js"},{"revision":null,"url":"assets/ini-BEwlwnbL.js"},{"revision":null,"url":"assets/index-C4pzYytY.css"},{"revision":null,"url":"assets/index--axLOH7Y.js"},{"revision":null,"url":"assets/html-GMplVEZG.js"},{"revision":null,"url":"assets/graphql-ChdNCCLP.js"},{"revision":null,"url":"assets/go-CxLEBnE3.js"},{"revision":null,"url":"assets/github-light-DAi9KRSo.js"},{"revision":null,"url":"assets/github-dark-DHJKELXO.js"},{"revision":null,"url":"assets/dockerfile-BcOcwvcX.js"},{"revision":null,"url":"assets/diff-D97Zzqfu.js"},{"revision":null,"url":"assets/css-DPfMkruS.js"},{"revision":null,"url":"assets/csharp-COcwbKMJ.js"},{"revision":null,"url":"assets/c-BIGW1oBm.js"},{"revision":"c04f450760de44f5a0f6d573eadd8ec6","url":"apple-touch-icon-180x180.png"},{"revision":"e7779fbd164d4be26bdae4b68266c391","url":"favicon.ico"},{"revision":"50ea6f66963b8987830a358ff2c0f3b9","url":"mask-icon.svg"},{"revision":"3d5ebc32ce06672905530164d954f366","url":"maskable-icon-512x512.png"},{"revision":"a084007dad655a444c1f1d67deda9c08","url":"pwa-192x192.png"},{"revision":"3d5ebc32ce06672905530164d954f366","url":"pwa-512x512.png"},{"revision":"af3b94907e1c72ede058ff0a360cb81c","url":"pwa-64x64.png"},{"revision":"9ea9cc293b5c631c3270ea177ef48be5","url":"manifest.webmanifest"}]);g(({url:s})=>s.pathname==="/api/sessions",new S({cacheName:"api-sessions",networkTimeoutSeconds:10,plugins:[new C({maxEntries:10,maxAgeSeconds:300})]}));g(({url:s})=>/^\/api\/sessions\/[^/]+$/.test(s.pathname),new S({cacheName:"api-session-detail",networkTimeoutSeconds:10,plugins:[new C({maxEntries:20,maxAgeSeconds:300})]}));g(({url:s})=>s.pathname==="/api/machines",new S({cacheName:"api-machines",networkTimeoutSeconds:10,plugins:[new C({maxEntries:5,maxAgeSeconds:600})]}));g(/^https:\/\/cdn\.socket\.io\/.*/,new $({cacheName:"cdn-socketio",plugins:[new C({maxEntries:5,maxAgeSeconds:3600*24*30})]}));g(/^https:\/\/telegram\.org\/.*/,new $({cacheName:"cdn-telegram",plugins:[new C({maxEntries:5,maxAgeSeconds:3600*24*7})]}));self.addEventListener("push",s=>{const e=s.data?.json();if(!e)return;const t=e.title||"Tako",n=e.body??"",a=e.icon??"/pwa-192x192.png",i=e.badge??"/pwa-64x64.png",r=e.data,c=e.tag;s.waitUntil(self.registration.showNotification(t,{body:n,icon:a,badge:i,data:r,tag:c}))});self.addEventListener("notificationclick",s=>{s.notification.close();const t=s.notification.data?.url??"/";s.waitUntil(self.clients.openWindow(t))});
2
+ This is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(c)}}}install(e){return v(e,async()=>{const t=new te;this.strategy.plugins.push(t);for(const[i,r]of this._urlsToCacheKeys){const c=this._cacheKeysToIntegrities.get(r),o=this._urlsToCacheModes.get(i),h=new Request(i,{integrity:c,cache:o,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:r},request:h,event:e}))}const{updatedURLs:n,notUpdatedURLs:a}=t;return{updatedURLs:n,notUpdatedURLs:a}})}activate(e){return v(e,async()=>{const t=await self.caches.open(this.strategy.cacheName),n=await t.keys(),a=new Set(this._urlsToCacheKeys.values()),i=[];for(const r of n)a.has(r.url)||(await t.delete(r),i.push(r.url));return{deletedURLs:i}})}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,n=this.getCacheKeyForURL(t);if(n)return(await self.caches.open(this.strategy.cacheName)).match(n)}createHandlerBoundToURL(e){const t=this.getCacheKeyForURL(e);if(!t)throw new l("non-precached-url",{url:e});return n=>(n.request=new Request(e),n.params=Object.assign({cacheKey:t},n.params),this.strategy.handle(n))}}let D;const H=()=>(D||(D=new ue),D);try{self["workbox:routing:7.3.0"]&&_()}catch{}const V="GET",E=s=>s&&typeof s=="object"?s:{handle:s};class b{constructor(e,t,n=V){this.handler=E(t),this.match=e,this.method=n}setCatchHandler(e){this.catchHandler=E(e)}}class de extends b{constructor(e,t,n){const a=({url:i})=>{const r=e.exec(i.href);if(r&&!(i.origin!==location.origin&&r.index!==0))return r.slice(1)};super(a,t,n)}}class fe{constructor(){this._routes=new Map,this._defaultHandlerMap=new Map}get routes(){return this._routes}addFetchListener(){self.addEventListener("fetch",(e=>{const{request:t}=e,n=this.handleRequest({request:t,event:e});n&&e.respondWith(n)}))}addCacheListener(){self.addEventListener("message",(e=>{if(e.data&&e.data.type==="CACHE_URLS"){const{payload:t}=e.data,n=Promise.all(t.urlsToCache.map(a=>{typeof a=="string"&&(a=[a]);const i=new Request(...a);return this.handleRequest({request:i,event:e})}));e.waitUntil(n),e.ports&&e.ports[0]&&n.then(()=>e.ports[0].postMessage(!0))}}))}handleRequest({request:e,event:t}){const n=new URL(e.url,location.href);if(!n.protocol.startsWith("http"))return;const a=n.origin===location.origin,{params:i,route:r}=this.findMatchingRoute({event:t,request:e,sameOrigin:a,url:n});let c=r&&r.handler;const o=e.method;if(!c&&this._defaultHandlerMap.has(o)&&(c=this._defaultHandlerMap.get(o)),!c)return;let h;try{h=c.handle({url:n,request:e,event:t,params:i})}catch(u){h=Promise.reject(u)}const m=r&&r.catchHandler;return h instanceof Promise&&(this._catchHandler||m)&&(h=h.catch(async u=>{if(m)try{return await m.handle({url:n,request:e,event:t,params:i})}catch(K){K instanceof Error&&(u=K)}if(this._catchHandler)return this._catchHandler.handle({url:n,request:e,event:t});throw u})),h}findMatchingRoute({url:e,sameOrigin:t,request:n,event:a}){const i=this._routes.get(n.method)||[];for(const r of i){let c;const o=r.match({url:e,sameOrigin:t,request:n,event:a});if(o)return c=o,(Array.isArray(c)&&c.length===0||o.constructor===Object&&Object.keys(o).length===0||typeof o=="boolean")&&(c=void 0),{route:r,params:c}}return{}}setDefaultHandler(e,t=V){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 l("unregister-route-but-not-found-with-method",{method:e.method});const t=this._routes.get(e.method).indexOf(e);if(t>-1)this._routes.get(e.method).splice(t,1);else throw new l("unregister-route-route-not-registered")}}let y;const pe=()=>(y||(y=new fe,y.addFetchListener(),y.addCacheListener()),y);function g(s,e,t){let n;if(typeof s=="string"){const i=new URL(s,location.href),r=({url:c})=>c.href===i.href;n=new b(r,e,t)}else if(s instanceof RegExp)n=new de(s,e,t);else if(typeof s=="function")n=new b(s,e,t);else if(s instanceof b)n=s;else throw new l("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});return pe().registerRoute(n),n}function ge(s,e=[]){for(const t of[...s.searchParams.keys()])e.some(n=>n.test(t))&&s.searchParams.delete(t);return s}function*me(s,{ignoreURLParametersMatching:e=[/^utm_/,/^fbclid$/],directoryIndex:t="index.html",cleanURLs:n=!0,urlManipulation:a}={}){const i=new URL(s,location.href);i.hash="",yield i.href;const r=ge(i,e);if(yield r.href,t&&r.pathname.endsWith("/")){const c=new URL(r.href);c.pathname+=t,yield c.href}if(n){const c=new URL(r.href);c.pathname+=".html",yield c.href}if(a){const c=a({url:i});for(const o of c)yield o.href}}class we extends b{constructor(e,t){const n=({request:a})=>{const i=e.getURLsToCacheKeys();for(const r of me(a.url,t)){const c=i.get(r);if(c){const o=e.getIntegrityForCacheKey(c);return{cacheKey:c,integrity:o}}}};super(n,e.strategy)}}function ye(s){const e=H(),t=new we(e,s);g(t)}function _e(s){H().precache(s)}function Re(s,e){_e(s),ye(e)}class $ extends M{async _handle(e,t){let n=await t.cacheMatch(e),a;if(!n)try{n=await t.fetchAndCachePut(e)}catch(i){i instanceof Error&&(a=i)}if(!n)throw new l("no-response",{url:e.url,error:a});return n}}const be={cacheWillUpdate:async({response:s})=>s.status===200||s.status===0?s:null};class S extends M{constructor(e={}){super(e),this.plugins.some(t=>"cacheWillUpdate"in t)||this.plugins.unshift(be),this._networkTimeoutSeconds=e.networkTimeoutSeconds||0}async _handle(e,t){const n=[],a=[];let i;if(this._networkTimeoutSeconds){const{id:o,promise:h}=this._getTimeoutPromise({request:e,logs:n,handler:t});i=o,a.push(h)}const r=this._getNetworkPromise({timeoutId:i,request:e,logs:n,handler:t});a.push(r);const c=await t.waitUntil((async()=>await t.waitUntil(Promise.race(a))||await r)());if(!c)throw new l("no-response",{url:e.url});return c}_getTimeoutPromise({request:e,logs:t,handler:n}){let a;return{promise:new Promise(r=>{a=setTimeout(async()=>{r(await n.cacheMatch(e))},this._networkTimeoutSeconds*1e3)}),id:a}}async _getNetworkPromise({timeoutId:e,request:t,logs:n,handler:a}){let i,r;try{r=await a.fetchAndCachePut(t)}catch(c){c instanceof Error&&(i=c)}return e&&clearTimeout(e),(i||!r)&&(r=await a.cacheMatch(t)),r}}function Q(s){s.then(()=>{})}const Ce=(s,e)=>e.some(t=>s instanceof t);let W,B;function xe(){return W||(W=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Ee(){return B||(B=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const G=new WeakMap,N=new WeakMap,z=new WeakMap,L=new WeakMap,A=new WeakMap;function ke(s){const e=new Promise((t,n)=>{const a=()=>{s.removeEventListener("success",i),s.removeEventListener("error",r)},i=()=>{t(f(s.result)),a()},r=()=>{n(s.error),a()};s.addEventListener("success",i),s.addEventListener("error",r)});return e.then(t=>{t instanceof IDBCursor&&G.set(t,s)}).catch(()=>{}),A.set(e,s),e}function Te(s){if(N.has(s))return;const e=new Promise((t,n)=>{const a=()=>{s.removeEventListener("complete",i),s.removeEventListener("error",r),s.removeEventListener("abort",r)},i=()=>{t(),a()},r=()=>{n(s.error||new DOMException("AbortError","AbortError")),a()};s.addEventListener("complete",i),s.addEventListener("error",r),s.addEventListener("abort",r)});N.set(s,e)}let I={get(s,e,t){if(s instanceof IDBTransaction){if(e==="done")return N.get(s);if(e==="objectStoreNames")return s.objectStoreNames||z.get(s);if(e==="store")return t.objectStoreNames[1]?void 0:t.objectStore(t.objectStoreNames[0])}return f(s[e])},set(s,e,t){return s[e]=t,!0},has(s,e){return s instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in s}};function De(s){I=s(I)}function Le(s){return s===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...t){const n=s.call(U(this),e,...t);return z.set(n,e.sort?e.sort():[e]),f(n)}:Ee().includes(s)?function(...e){return s.apply(U(this),e),f(G.get(this))}:function(...e){return f(s.apply(U(this),e))}}function Ue(s){return typeof s=="function"?Le(s):(s instanceof IDBTransaction&&Te(s),Ce(s,xe())?new Proxy(s,I):s)}function f(s){if(s instanceof IDBRequest)return ke(s);if(L.has(s))return L.get(s);const e=Ue(s);return e!==s&&(L.set(s,e),A.set(e,s)),e}const U=s=>A.get(s);function Pe(s,e,{blocked:t,upgrade:n,blocking:a,terminated:i}={}){const r=indexedDB.open(s,e),c=f(r);return n&&r.addEventListener("upgradeneeded",o=>{n(f(r.result),o.oldVersion,o.newVersion,f(r.transaction),o)}),t&&r.addEventListener("blocked",o=>t(o.oldVersion,o.newVersion,o)),c.then(o=>{i&&o.addEventListener("close",()=>i()),a&&o.addEventListener("versionchange",h=>a(h.oldVersion,h.newVersion,h))}).catch(()=>{}),c}function Ne(s,{blocked:e}={}){const t=indexedDB.deleteDatabase(s);return e&&t.addEventListener("blocked",n=>e(n.oldVersion,n)),f(t).then(()=>{})}const Ie=["get","getKey","getAll","getAllKeys","count"],Me=["put","add","delete","clear"],P=new Map;function j(s,e){if(!(s instanceof IDBDatabase&&!(e in s)&&typeof e=="string"))return;if(P.get(e))return P.get(e);const t=e.replace(/FromIndex$/,""),n=e!==t,a=Me.includes(t);if(!(t in(n?IDBIndex:IDBObjectStore).prototype)||!(a||Ie.includes(t)))return;const i=async function(r,...c){const o=this.transaction(r,a?"readwrite":"readonly");let h=o.store;return n&&(h=h.index(c.shift())),(await Promise.all([h[t](...c),a&&o.done]))[0]};return P.set(e,i),i}De(s=>({...s,get:(e,t,n)=>j(e,t)||s.get(e,t,n),has:(e,t)=>!!j(e,t)||s.has(e,t)}));try{self["workbox:expiration:7.3.0"]&&_()}catch{}const Se="workbox-expiration",R="cache-entries",F=s=>{const e=new URL(s,location.href);return e.hash="",e.href};class Ae{constructor(e){this._db=null,this._cacheName=e}_upgradeDb(e){const t=e.createObjectStore(R,{keyPath:"id"});t.createIndex("cacheName","cacheName",{unique:!1}),t.createIndex("timestamp","timestamp",{unique:!1})}_upgradeDbAndDeleteOldDbs(e){this._upgradeDb(e),this._cacheName&&Ne(this._cacheName)}async setTimestamp(e,t){e=F(e);const n={url:e,timestamp:t,cacheName:this._cacheName,id:this._getId(e)},i=(await this.getDb()).transaction(R,"readwrite",{durability:"relaxed"});await i.store.put(n),await i.done}async getTimestamp(e){const n=await(await this.getDb()).get(R,this._getId(e));return n?.timestamp}async expireEntries(e,t){const n=await this.getDb();let a=await n.transaction(R).store.index("timestamp").openCursor(null,"prev");const i=[];let r=0;for(;a;){const o=a.value;o.cacheName===this._cacheName&&(e&&o.timestamp<e||t&&r>=t?i.push(a.value):r++),a=await a.continue()}const c=[];for(const o of i)await n.delete(R,o.id),c.push(o.url);return c}_getId(e){return this._cacheName+"|"+F(e)}async getDb(){return this._db||(this._db=await Pe(Se,1,{upgrade:this._upgradeDbAndDeleteOldDbs.bind(this)})),this._db}}class Ke{constructor(e,t={}){this._isRunning=!1,this._rerunRequested=!1,this._maxEntries=t.maxEntries,this._maxAgeSeconds=t.maxAgeSeconds,this._matchOptions=t.matchOptions,this._cacheName=e,this._timestampModel=new Ae(e)}async expireEntries(){if(this._isRunning){this._rerunRequested=!0;return}this._isRunning=!0;const e=this._maxAgeSeconds?Date.now()-this._maxAgeSeconds*1e3:0,t=await this._timestampModel.expireEntries(e,this._maxEntries),n=await self.caches.open(this._cacheName);for(const a of t)await n.delete(a,this._matchOptions);this._isRunning=!1,this._rerunRequested&&(this._rerunRequested=!1,Q(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),n=Date.now()-this._maxAgeSeconds*1e3;return t!==void 0?t<n:!0}else return!1}async delete(){this._rerunRequested=!1,await this._timestampModel.expireEntries(1/0)}}function ve(s){q.add(s)}class C{constructor(e={}){this.cachedResponseWillBeUsed=async({event:t,request:n,cacheName:a,cachedResponse:i})=>{if(!i)return null;const r=this._isResponseDateFresh(i),c=this._getCacheExpiration(a);Q(c.expireEntries());const o=c.updateTimestamp(n.url);if(t)try{t.waitUntil(o)}catch{}return r?i:null},this.cacheDidUpdate=async({cacheName:t,request:n})=>{const a=this._getCacheExpiration(t);await a.updateTimestamp(n.url),await a.expireEntries()},this._config=e,this._maxAgeSeconds=e.maxAgeSeconds,this._cacheExpirations=new Map,e.purgeOnQuotaError&&ve(()=>this.deleteCacheAndMetadata())}_getCacheExpiration(e){if(e===k.getRuntimeName())throw new l("expire-custom-caches-only");let t=this._cacheExpirations.get(e);return t||(t=new Ke(e,this._config),this._cacheExpirations.set(e,t)),t}_isResponseDateFresh(e){if(!this._maxAgeSeconds)return!0;const t=this._getDateHeaderTimestamp(e);if(t===null)return!0;const n=Date.now();return t>=n-this._maxAgeSeconds*1e3}_getDateHeaderTimestamp(e){if(!e.headers.has("date"))return null;const t=e.headers.get("date"),a=new Date(t).getTime();return isNaN(a)?null:a}async deleteCacheAndMetadata(){for(const[e,t]of this._cacheExpirations)await self.caches.delete(e),await t.delete();this._cacheExpirations=new Map}}Re([{"revision":"af3b94907e1c72ede058ff0a360cb81c","url":"pwa-64x64.png"},{"revision":"3d5ebc32ce06672905530164d954f366","url":"pwa-512x512.png"},{"revision":"a084007dad655a444c1f1d67deda9c08","url":"pwa-192x192.png"},{"revision":"3d5ebc32ce06672905530164d954f366","url":"maskable-icon-512x512.png"},{"revision":"50ea6f66963b8987830a358ff2c0f3b9","url":"mask-icon.svg"},{"revision":"effda63d6438698f339fd942dfe5a69b","url":"index.html"},{"revision":"8352fffd3bff65890929eb23e44fead3","url":"icon.svg"},{"revision":"e7779fbd164d4be26bdae4b68266c391","url":"favicon.ico"},{"revision":"c04f450760de44f5a0f6d573eadd8ec6","url":"apple-touch-icon-180x180.png"},{"revision":null,"url":"assets/yaml-Buea-lGh.js"},{"revision":null,"url":"assets/xml-sdJ4AIDG.js"},{"revision":null,"url":"assets/workbox-window.prod.es5-BIl4cyR9.js"},{"revision":null,"url":"assets/typescript-BPQ3VLAy.js"},{"revision":null,"url":"assets/tsx-COt5Ahok.js"},{"revision":null,"url":"assets/toml-vGWfd6FD.js"},{"revision":null,"url":"assets/swift-D82vCrfD.js"},{"revision":null,"url":"assets/sql-BLtJtn59.js"},{"revision":null,"url":"assets/shellscript-Yzrsuije.js"},{"revision":null,"url":"assets/scss-OYdSNvt2.js"},{"revision":null,"url":"assets/rust-B1yitclQ.js"},{"revision":null,"url":"assets/python-B6aJPvgy.js"},{"revision":null,"url":"assets/powershell-Dpen1YoG.js"},{"revision":null,"url":"assets/php-Dhbhpdrm.js"},{"revision":null,"url":"assets/markdown-Cvjx9yec.js"},{"revision":null,"url":"assets/make-CHLpvVh8.js"},{"revision":null,"url":"assets/kotlin-BdnUsdx6.js"},{"revision":null,"url":"assets/jsx-g9-lgVsj.js"},{"revision":null,"url":"assets/json-Cp-IABpG.js"},{"revision":null,"url":"assets/javascript-wDzz0qaB.js"},{"revision":null,"url":"assets/java-CylS5w8V.js"},{"revision":null,"url":"assets/ini-BEwlwnbL.js"},{"revision":null,"url":"assets/index-D_s90DDs.js"},{"revision":null,"url":"assets/index-C4pzYytY.css"},{"revision":null,"url":"assets/html-GMplVEZG.js"},{"revision":null,"url":"assets/graphql-ChdNCCLP.js"},{"revision":null,"url":"assets/go-CxLEBnE3.js"},{"revision":null,"url":"assets/github-light-DAi9KRSo.js"},{"revision":null,"url":"assets/github-dark-DHJKELXO.js"},{"revision":null,"url":"assets/dockerfile-BcOcwvcX.js"},{"revision":null,"url":"assets/diff-D97Zzqfu.js"},{"revision":null,"url":"assets/css-DPfMkruS.js"},{"revision":null,"url":"assets/csharp-COcwbKMJ.js"},{"revision":null,"url":"assets/c-BIGW1oBm.js"},{"revision":"c04f450760de44f5a0f6d573eadd8ec6","url":"apple-touch-icon-180x180.png"},{"revision":"e7779fbd164d4be26bdae4b68266c391","url":"favicon.ico"},{"revision":"50ea6f66963b8987830a358ff2c0f3b9","url":"mask-icon.svg"},{"revision":"3d5ebc32ce06672905530164d954f366","url":"maskable-icon-512x512.png"},{"revision":"a084007dad655a444c1f1d67deda9c08","url":"pwa-192x192.png"},{"revision":"3d5ebc32ce06672905530164d954f366","url":"pwa-512x512.png"},{"revision":"af3b94907e1c72ede058ff0a360cb81c","url":"pwa-64x64.png"},{"revision":"9ea9cc293b5c631c3270ea177ef48be5","url":"manifest.webmanifest"}]);g(({url:s})=>s.pathname==="/api/sessions",new S({cacheName:"api-sessions",networkTimeoutSeconds:10,plugins:[new C({maxEntries:10,maxAgeSeconds:300})]}));g(({url:s})=>/^\/api\/sessions\/[^/]+$/.test(s.pathname),new S({cacheName:"api-session-detail",networkTimeoutSeconds:10,plugins:[new C({maxEntries:20,maxAgeSeconds:300})]}));g(({url:s})=>s.pathname==="/api/machines",new S({cacheName:"api-machines",networkTimeoutSeconds:10,plugins:[new C({maxEntries:5,maxAgeSeconds:600})]}));g(/^https:\/\/cdn\.socket\.io\/.*/,new $({cacheName:"cdn-socketio",plugins:[new C({maxEntries:5,maxAgeSeconds:3600*24*30})]}));g(/^https:\/\/telegram\.org\/.*/,new $({cacheName:"cdn-telegram",plugins:[new C({maxEntries:5,maxAgeSeconds:3600*24*7})]}));self.addEventListener("push",s=>{const e=s.data?.json();if(!e)return;const t=e.title||"Tako",n=e.body??"",a=e.icon??"/pwa-192x192.png",i=e.badge??"/pwa-64x64.png",r=e.data,c=e.tag;s.waitUntil(self.registration.showNotification(t,{body:n,icon:a,badge:i,data:r,tag:c}))});self.addEventListener("notificationclick",s=>{s.notification.close();const t=s.notification.data?.url??"/";s.waitUntil(self.clients.openWindow(t))});