(()=>{var t={4299(t){"use strict";const n=(t,...e)=>{if(function(t){if("function"!=typeof t)throw Error("fn should be function!")}(t),e.length>=t.length)return t(...e);const r=(...r)=>n(t,...e,...r),i=t.length-e.length-1,o=(t=>[function(n){return t(...arguments)},function(n,e){return t(...arguments)},function(n,e,r){return t(...arguments)},function(n,e,r,i){return t(...arguments)},function(n,e,r,i,o){return t(...arguments)}])(r)[i];return o||r};t.exports=n},5606(t){var n,e,r=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function c(t){if(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(t){n=i}try{e="function"==typeof clearTimeout?clearTimeout:o}catch(t){e=o}}();var s,a=[],u=!1,l=-1;function f(){u&&s&&(u=!1,s.length?a=s.concat(a):l=-1,a.length&&h())}function h(){if(!u){var t=c(f);u=!0;for(var n=a.length;n;){for(s=a,a=[];++l<n;)s&&s[l].run();l=-1,n=a.length}s=null,u=!1,function(t){if(e===clearTimeout)return clearTimeout(t);if((e===o||!e)&&clearTimeout)return e=clearTimeout,clearTimeout(t);try{return e(t)}catch(n){try{return e.call(null,t)}catch(n){return e.call(this,t)}}}(t)}}function d(t,n){this.fun=t,this.array=n}function p(){}r.nextTick=function(t){var n=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)n[e-1]=arguments[e];a.push(new d(t,n)),1!==a.length||u||c(h)},d.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=p,r.addListener=p,r.once=p,r.off=p,r.removeListener=p,r.removeAllListeners=p,r.emit=p,r.prependListener=p,r.prependOnceListener=p,r.listeners=function(t){return[]},r.binding=function(t){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(t){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}}},n={};function e(r){var i=n[r];if(void 0!==i)return i.exports;var o=n[r]={exports:{}};return t[r](o,o.exports,e),o.exports}(()=>{"use strict";e(5606);var t=e(4299);const n=t((t,n)=>n.waitUntil(t())),r=t((t,n)=>{const{request:e}=n,{url:r}=e,o=i(r);r.endsWith("/")||/\^\/fs/.test(o)||"GET"===e.method&&"basic"===e.type&&(o.startsWith("/api")||/^socket.io/.test(o)||n.respondWith(t(n)))}),i=t=>new URL(t).pathname,o="cloudcmd: Fri Feb 13 2026 16:25:39 GMT+0200 (Eastern European Standard Time)";globalThis.addEventListener("install",n(async function(){console.info(`cloudcmd: sw: install: ${o}`),await globalThis.skipWaiting()})),globalThis.addEventListener("fetch",r(async function(t){const{request:n}=t,{url:e}=n,r=((t,n)=>"/"!==t?n:new Request("/",{credentials:"same-origin"}))(i(e),t.request),c=await caches.open(o),s=await c.match(n);if(s)return s;const[a,u]=await(async(t,...n)=>{!function(t){if("function"!=typeof t)throw Error("fn should be a function!")}(t);try{return[null,await t(...n)]}catch(t){return[t]}})(fetch,r,{credentials:"same-origin"});return a?new Response(a.message):(await async function(t,n){return(await caches.open(o)).put(t,n)}(n,u.clone()),u)})),globalThis.addEventListener("activate",n(async function(){console.info(`cloudcmd: sw: activate: ${o}`),await globalThis.clients.claim();const t=await caches.keys(),n=caches.delete.bind(caches);await Promise.all(t.map(n))}))})()})();
//# sourceMappingURL=sw.js.map