const{isArray:e}=Array,t=new Map,n=e=>{e.stopImmediatePropagation(),e.preventDefault()};var a=Object.freeze({__proto__:null,activate:e=>e.waitUntil(clients.claim()),fetch:e=>{const{request:a}=e;"POST"===a.method&&a.url===`${location.href}?sabayon`&&(n(e),e.respondWith(new Promise((async e=>{const n=await a.json(),s=n.join(",");t.set(s,e);for(const e of await clients.matchAll())e.postMessage(n)})).then((e=>new Response(`[${e.join(",")}]`,a.headers)))))},install:()=>skipWaiting(),message:a=>{const{data:s}=a;if(e(s)&&4===s.length){const[e,o,i,r]=s,c=[e,o,i].join(","),l=t.get(c);l&&(n(a),l(r),t.delete(c))}}});for(const e in a)addEventListener(e,a[e]);