0\rmrSG0const sw=self,VERSION=4,resourceCacheName=`vscode-resource-cache-${VERSION}`,rootPath=sw.location.pathname.replace(/\/service-worker.js$/,""),searchParams=new URL(location.toString()).searchParams,remoteAuthority=searchParams.get("remoteAuthority"),resourceBaseAuthority=searchParams.get("vscode-resource-base-authority"),resolveTimeout=3e4;class RequestStore{constructor(){this.map=new Map,this.requestPool=0}create(){const e=++this.requestPool;let n;const s=new Promise(a=>n=a),r={resolve:n,promise:s};this.map.set(e,r);const i=setTimeout(()=>{if(clearTimeout(i),this.map.get(e)===r)return this.map.delete(e)},resolveTimeout);return{requestId:e,promise:s}}resolve(e,n){const s=this.map.get(e);return s?(s.resolve(n),this.map.delete(e),!0):!1}}const resourceRequestStore=new RequestStore,localhostRequestStore=new RequestStore,unauthorized=()=>new Response("Unauthorized",{status:401}),notFound=()=>new Response("Not Found",{status:404}),methodNotAllowed=()=>new Response("Method Not Allowed",{status:405});sw.addEventListener("message",async t=>{switch(t.data.channel){case"version":{const e=t.source;sw.clients.get(e.id).then(n=>{n&&n.postMessage({channel:"version",version:VERSION})});return}case"did-load-resource":{const e=t.data.data;resourceRequestStore.resolve(e.id,e)||console.log("Could not resolve unknown resource",e.path);return}case"did-load-localhost":{const e=t.data.data;localhostRequestStore.resolve(e.id,e.location)||console.log("Could not resolve unknown localhost",e.origin);return}default:{console.log("Unknown message");return}}}),sw.addEventListener("fetch",t=>{const e=new URL(t.request.url);if(e.protocol==="https:"&&e.hostname.endsWith("."+resourceBaseAuthority))switch(t.request.method){case"GET":case"HEAD":{const n=e.hostname.slice(0,e.hostname.length-(resourceBaseAuthority.length+1)),s=n.split("+",1)[0],r=n.slice(s.length+1);return t.respondWith(processResourceRequest(t,{scheme:s,authority:r,path:e.pathname,query:e.search.replace(/^\?/,"")}))}default:return t.respondWith(methodNotAllowed())}if(e.origin!==sw.origin&&e.host===remoteAuthority)switch(t.request.method){case"GET":case"HEAD":return t.respondWith(processResourceRequest(t,{path:e.pathname,scheme:e.protocol.slice(0,e.protocol.length-1),authority:e.host,query:e.search.replace(/^\?/,"")}));default:return t.respondWith(methodNotAllowed())}if(e.origin!==sw.origin&&e.host.match(/^(localhost|127.0.0.1|0.0.0.0):(\d+)$/))return t.respondWith(processLocalhostRequest(t,e))}),sw.addEventListener("install",t=>{t.waitUntil(sw.skipWaiting())}),sw.addEventListener("activate",t=>{t.waitUntil(sw.clients.claim())});async function processResourceRequest(t,e){const n=await sw.clients.get(t.clientId);if(!n)return console.error("Could not find inner client for request"),notFound();const s=getWebviewIdForClient(n);if(!s)return console.error("Could not resolve webview id"),notFound();const r=t.request.method==="GET",h=(o,f)=>{if(o.status===304){if(f)return f.clone();throw new Error("No cache found")}if(o.status===401)return unauthorized();if(o.status!==200)return notFound();const p={"Access-Control-Allow-Origin":"*"},d=o.data.byteLength,w=t.request.headers.get("range");if(w){const u=w.match(/^bytes\=(\d+)\-(\d+)?$/g);if(u){const y=Number(u[1]),C=Number(u[2])||d-1;return new Response(o.data.slice(y,C+1),{status:206,headers:{...p,"Content-range":`bytes 0-${C}/${d}`}})}else return new Response(null,{status:416,headers:{...p,"Content-range":`*/${d}`}})}const c={...p,"Content-Type":o.mime,"Content-Length":d.toString()};o.etag&&(c.ETag=o.etag,c["Cache-Control"]="no-cache"),o.mtime&&(c["Last-Modified"]=new Date(o.mtime).toUTCString());const m=new URL(t.request.url).searchParams.get("vscode-coi");m==="3"?(c["Cross-Origin-Opener-Policy"]="same-origin",c["Cross-Origin-Embedder-Policy"]="require-corp"):m==="2"?c["Cross-Origin-Embedder-Policy"]="require-corp":m==="1"&&(c["Cross-Origin-Opener-Policy"]="same-origin");const q=new Response(o.data,{status:200,headers:c});return r&&o.etag&&caches.open(resourceCacheName).then(u=>u.put(t.request,q)),q.clone()},i=await getOuterIframeClient(s);if(!i.length)return console.log("Could not find parent client for request"),notFound();let a;r&&(a=await(await caches.open(resourceCacheName)).match(t.request));const{requestId:g,promise:l}=resourceRequestStore.create();for(const o of i)o.postMessage({channel:"load-resource",id:g,scheme:e.scheme,authority:e.authority,path:e.path,query:e.query,ifNoneMatch:a?.headers.get("ETag")});return l.then(o=>h(o,a))}async function processLocalhostRequest(t,e){const n=await sw.clients.get(t.clientId);if(!n)return fetch(t.request);const s=getWebviewIdForClient(n);if(!s)return console.error("Could not resolve webview id"),fetch(t.request);const r=e.origin,h=async l=>{if(!l)return fetch(t.request);const o=t.request.url.replace(new RegExp(`^${e.origin}(/|$)`),`${l}$1`);return new Response(null,{status:302,headers:{Location:o}})},i=await getOuterIframeClient(s);if(!i.length)return console.log("Could not find parent client for request"),notFound();const{requestId:a,promise:g}=localhostRequestStore.create();for(const l of i)l.postMessage({channel:"load-localhost",origin:r,id:a});return g.then(h)}function getWebviewIdForClient(t){return new URL(t.url).searchParams.get("id")}async function getOuterIframeClient(t){return(await sw.clients.matchAll({includeUncontrolled:!0})).filter(n=>{const s=new URL(n.url);return(s.pathname===`${rootPath}/`||s.pathname===`${rootPath}/index.html`||s.pathname===`${rootPath}/index-no-csp.html`)&&s.searchParams.get("id")===t})} //# sourceMappingURL=https://ticino.blob.core.windows.net/sourcemaps/6261075646f055b99068d3688932416f2346dd3b/core/vs/workbench/contrib/webview/browser/pre/service-worker.js.map A EoRb8XHTTP/1.1 200 OKCross-Origin-Resource-Policy: cross-originAccess-Control-Allow-Origin: *Content-Type: text/javascriptLast-Modified: Wed, 09 Nov 2022 03:27:40 GMT_fo8Rxlmily9Ng):'WA EoGx

Windows NT KPTV 6.2 build 9200 (Windows Server 2012 Datacenter Edition) i586