playwright-core 1.57.0-beta-1765994134000 → 1.57.0-beta-1765994843000

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.
@@ -1,2 +1,2 @@
1
- import{M as m,r as s,T as M,W as C,j as e,D as F,a as I,b as k,c as z,d as O,e as V}from"./assets/defaultSettingsView-BEpdCv1S.js";const $=()=>{const[o,i]=s.useState(!1),[c,l]=s.useState(),[h,u]=s.useState(),[g,L]=s.useState(N),[p,x]=s.useState({done:0,total:0}),[b,v]=s.useState(!1),[j,S]=s.useState(null),[y,P]=s.useState(null),[R,E]=s.useState(!1),w=s.useCallback(t=>{const r=new URL(window.location.href);if(!t.length)return;const n=t.item(0),a=URL.createObjectURL(n);r.searchParams.append("trace",a);const d=r.toString();window.history.pushState({},"",d),l(a),u(n.name),v(!1),S(null)},[]);s.useEffect(()=>{const t=async r=>{var n;if((n=r.clipboardData)!=null&&n.files.length){for(const a of r.clipboardData.files)if(a.type!=="application/zip")return;r.preventDefault(),w(r.clipboardData.files)}};return document.addEventListener("paste",t),()=>document.removeEventListener("paste",t)}),s.useEffect(()=>{const t=r=>{const{method:n,params:a}=r.data;if(n!=="load"||!((a==null?void 0:a.trace)instanceof Blob))return;const d=new File([a.trace],"trace.zip",{type:"application/zip"}),f=new DataTransfer;f.items.add(d),w(f.files)};return window.addEventListener("message",t),()=>window.removeEventListener("message",t)});const U=s.useCallback(t=>{t.preventDefault(),w(t.dataTransfer.files)},[w]),W=s.useCallback(t=>{t.preventDefault(),t.target.files&&w(t.target.files)},[w]);s.useEffect(()=>{const t=new URL(window.location.href).searchParams,r=t.get("trace");if(i(t.has("isServer")),r!=null&&r.startsWith("file:")){P(r||null);return}if(t.has("isServer")){const n=new URLSearchParams(window.location.search).get("ws"),a=new URL(`../${n}`,window.location.toString());a.protocol=window.location.protocol==="https:"?"wss:":"ws:";const d=new M(new C(a));d.onLoadTraceRequested(async f=>{l(f.traceUrl),v(!1),S(null)}),d.initialize({}).catch(()=>{})}else r&&!r.startsWith("blob:")&&l(r)},[]),s.useEffect(()=>{(async()=>{if(!c){L(N);return}const t=r=>{r.data.method==="progress"&&x(r.data.params)};try{navigator.serviceWorker.addEventListener("message",t),x({done:0,total:1});const r=new URLSearchParams;r.set("trace",c);const n=await fetch(`contexts?${r.toString()}`);if(!n.ok){o||l(void 0),S((await n.json()).error);return}const a=await n.json(),d=new m(c,a);x({done:0,total:0}),L(d)}finally{navigator.serviceWorker.removeEventListener("message",t)}})()},[o,c,h]);const D=p.done!==p.total&&p.total!==0&&!j;s.useEffect(()=>{if(D){const t=setTimeout(()=>{E(!0)},200);return()=>clearTimeout(t)}else E(!1)},[D]);const T=!!(!o&&!b&&!y&&(!c||j));return e.jsxs("div",{className:"vbox workbench-loader",onDragOver:t=>{t.preventDefault(),v(!0)},children:[e.jsxs("div",{className:"hbox header",...T?{inert:!0}:{},children:[e.jsx("div",{className:"logo",children:e.jsx("img",{src:"playwright-logo.svg",alt:"Playwright logo"})}),e.jsx("div",{className:"product",children:"Playwright"}),g.title&&e.jsx("div",{className:"title",children:g.title}),e.jsx("div",{className:"spacer"}),e.jsx(F,{icon:"settings-gear",title:"Settings",dialogDataTestId:"settings-toolbar-dialog",children:e.jsx(I,{location:"trace-viewer"})})]}),e.jsx(k,{model:g,inert:T}),y&&e.jsxs("div",{className:"drop-target",children:[e.jsx("div",{children:"Trace Viewer uses Service Workers to show traces. To view trace:"}),e.jsxs("div",{style:{paddingTop:20},children:[e.jsxs("div",{children:["1. Click ",e.jsx("a",{href:y,children:"here"})," to put your trace into the download shelf"]}),e.jsxs("div",{children:["2. Go to ",e.jsx("a",{href:"https://trace.playwright.dev",children:"trace.playwright.dev"})]}),e.jsx("div",{children:"3. Drop the trace from the download shelf into the page"})]})]}),e.jsx(z,{open:R,isModal:!0,className:"progress-dialog",children:e.jsxs("div",{className:"progress-content",children:[e.jsx("div",{className:"title",role:"heading","aria-level":1,children:"Loading Playwright Trace..."}),e.jsx("div",{className:"progress-wrapper",children:e.jsx("div",{className:"inner-progress",style:{width:p.total?100*p.done/p.total+"%":0}})})]})}),T&&e.jsxs("div",{className:"drop-target",children:[e.jsx("div",{className:"processing-error",role:"alert",children:j}),e.jsx("div",{className:"title",role:"heading","aria-level":1,children:"Drop Playwright Trace to load"}),e.jsx("div",{children:"or"}),e.jsx("button",{onClick:()=>{const t=document.createElement("input");t.type="file",t.click(),t.addEventListener("change",r=>W(r))},type:"button",children:"Select file"}),e.jsx("div",{className:"info",children:"Playwright Trace Viewer is a Progressive Web App, it does not send your trace anywhere, it opens it locally."}),e.jsxs("div",{className:"version",children:["Playwright v","1.57.0"]})]}),o&&!c&&e.jsx("div",{className:"drop-target",children:e.jsx("div",{className:"title",children:"Select test to see the trace"})}),b&&e.jsx("div",{className:"drop-target",onDragLeave:()=>{v(!1)},onDrop:t=>U(t),children:e.jsx("div",{className:"title",children:"Release to analyse the Playwright Trace"})})]})},N=new m("",[]),q=({traceJson:o})=>{const[i,c]=s.useState(void 0),[l,h]=s.useState(0),u=s.useRef(null);return s.useEffect(()=>(u.current&&clearTimeout(u.current),u.current=setTimeout(async()=>{try{const g=await A(o);c(g)}catch{const g=new m("",[]);c(g)}finally{h(l+1)}},500),()=>{u.current&&clearTimeout(u.current)}),[o,l]),e.jsx(k,{isLive:!0,model:i})};async function A(o){const i=new URLSearchParams;i.set("trace",o);const l=await(await fetch(`contexts?${i.toString()}`)).json();return new m(o,l)}(async()=>{const o=new URLSearchParams(window.location.search);if(O(),window.location.protocol!=="file:"){if(o.get("isUnderTest")==="true"&&await new Promise(h=>setTimeout(h,1e3)),!navigator.serviceWorker)throw new Error(`Service workers are not supported.
1
+ import{M as m,r as s,T as M,W as C,j as e,D as F,a as I,b as k,c as z,d as O,e as V}from"./assets/defaultSettingsView-Bpx75f3I.js";const $=()=>{const[o,i]=s.useState(!1),[c,l]=s.useState(),[h,u]=s.useState(),[g,L]=s.useState(N),[p,x]=s.useState({done:0,total:0}),[b,v]=s.useState(!1),[j,S]=s.useState(null),[y,P]=s.useState(null),[R,E]=s.useState(!1),w=s.useCallback(t=>{const r=new URL(window.location.href);if(!t.length)return;const n=t.item(0),a=URL.createObjectURL(n);r.searchParams.append("trace",a);const d=r.toString();window.history.pushState({},"",d),l(a),u(n.name),v(!1),S(null)},[]);s.useEffect(()=>{const t=async r=>{var n;if((n=r.clipboardData)!=null&&n.files.length){for(const a of r.clipboardData.files)if(a.type!=="application/zip")return;r.preventDefault(),w(r.clipboardData.files)}};return document.addEventListener("paste",t),()=>document.removeEventListener("paste",t)}),s.useEffect(()=>{const t=r=>{const{method:n,params:a}=r.data;if(n!=="load"||!((a==null?void 0:a.trace)instanceof Blob))return;const d=new File([a.trace],"trace.zip",{type:"application/zip"}),f=new DataTransfer;f.items.add(d),w(f.files)};return window.addEventListener("message",t),()=>window.removeEventListener("message",t)});const U=s.useCallback(t=>{t.preventDefault(),w(t.dataTransfer.files)},[w]),W=s.useCallback(t=>{t.preventDefault(),t.target.files&&w(t.target.files)},[w]);s.useEffect(()=>{const t=new URL(window.location.href).searchParams,r=t.get("trace");if(i(t.has("isServer")),r!=null&&r.startsWith("file:")){P(r||null);return}if(t.has("isServer")){const n=new URLSearchParams(window.location.search).get("ws"),a=new URL(`../${n}`,window.location.toString());a.protocol=window.location.protocol==="https:"?"wss:":"ws:";const d=new M(new C(a));d.onLoadTraceRequested(async f=>{l(f.traceUrl),v(!1),S(null)}),d.initialize({}).catch(()=>{})}else r&&!r.startsWith("blob:")&&l(r)},[]),s.useEffect(()=>{(async()=>{if(!c){L(N);return}const t=r=>{r.data.method==="progress"&&x(r.data.params)};try{navigator.serviceWorker.addEventListener("message",t),x({done:0,total:1});const r=new URLSearchParams;r.set("trace",c);const n=await fetch(`contexts?${r.toString()}`);if(!n.ok){o||l(void 0),S((await n.json()).error);return}const a=await n.json(),d=new m(c,a);x({done:0,total:0}),L(d)}finally{navigator.serviceWorker.removeEventListener("message",t)}})()},[o,c,h]);const D=p.done!==p.total&&p.total!==0&&!j;s.useEffect(()=>{if(D){const t=setTimeout(()=>{E(!0)},200);return()=>clearTimeout(t)}else E(!1)},[D]);const T=!!(!o&&!b&&!y&&(!c||j));return e.jsxs("div",{className:"vbox workbench-loader",onDragOver:t=>{t.preventDefault(),v(!0)},children:[e.jsxs("div",{className:"hbox header",...T?{inert:!0}:{},children:[e.jsx("div",{className:"logo",children:e.jsx("img",{src:"playwright-logo.svg",alt:"Playwright logo"})}),e.jsx("div",{className:"product",children:"Playwright"}),g.title&&e.jsx("div",{className:"title",children:g.title}),e.jsx("div",{className:"spacer"}),e.jsx(F,{icon:"settings-gear",title:"Settings",dialogDataTestId:"settings-toolbar-dialog",children:e.jsx(I,{location:"trace-viewer"})})]}),e.jsx(k,{model:g,inert:T}),y&&e.jsxs("div",{className:"drop-target",children:[e.jsx("div",{children:"Trace Viewer uses Service Workers to show traces. To view trace:"}),e.jsxs("div",{style:{paddingTop:20},children:[e.jsxs("div",{children:["1. Click ",e.jsx("a",{href:y,children:"here"})," to put your trace into the download shelf"]}),e.jsxs("div",{children:["2. Go to ",e.jsx("a",{href:"https://trace.playwright.dev",children:"trace.playwright.dev"})]}),e.jsx("div",{children:"3. Drop the trace from the download shelf into the page"})]})]}),e.jsx(z,{open:R,isModal:!0,className:"progress-dialog",children:e.jsxs("div",{className:"progress-content",children:[e.jsx("div",{className:"title",role:"heading","aria-level":1,children:"Loading Playwright Trace..."}),e.jsx("div",{className:"progress-wrapper",children:e.jsx("div",{className:"inner-progress",style:{width:p.total?100*p.done/p.total+"%":0}})})]})}),T&&e.jsxs("div",{className:"drop-target",children:[e.jsx("div",{className:"processing-error",role:"alert",children:j}),e.jsx("div",{className:"title",role:"heading","aria-level":1,children:"Drop Playwright Trace to load"}),e.jsx("div",{children:"or"}),e.jsx("button",{onClick:()=>{const t=document.createElement("input");t.type="file",t.click(),t.addEventListener("change",r=>W(r))},type:"button",children:"Select file"}),e.jsx("div",{className:"info",children:"Playwright Trace Viewer is a Progressive Web App, it does not send your trace anywhere, it opens it locally."}),e.jsxs("div",{className:"version",children:["Playwright v","1.57.0"]})]}),o&&!c&&e.jsx("div",{className:"drop-target",children:e.jsx("div",{className:"title",children:"Select test to see the trace"})}),b&&e.jsx("div",{className:"drop-target",onDragLeave:()=>{v(!1)},onDrop:t=>U(t),children:e.jsx("div",{className:"title",children:"Release to analyse the Playwright Trace"})})]})},N=new m("",[]),q=({traceJson:o})=>{const[i,c]=s.useState(void 0),[l,h]=s.useState(0),u=s.useRef(null);return s.useEffect(()=>(u.current&&clearTimeout(u.current),u.current=setTimeout(async()=>{try{const g=await A(o);c(g)}catch{const g=new m("",[]);c(g)}finally{h(l+1)}},500),()=>{u.current&&clearTimeout(u.current)}),[o,l]),e.jsx(k,{isLive:!0,model:i})};async function A(o){const i=new URLSearchParams;i.set("trace",o);const l=await(await fetch(`contexts?${i.toString()}`)).json();return new m(o,l)}(async()=>{const o=new URLSearchParams(window.location.search);if(O(),window.location.protocol!=="file:"){if(o.get("isUnderTest")==="true"&&await new Promise(h=>setTimeout(h,1e3)),!navigator.serviceWorker)throw new Error(`Service workers are not supported.
2
2
  Make sure to serve the Trace Viewer (${window.location}) via HTTPS or localhost.`);navigator.serviceWorker.register("sw.bundle.js"),navigator.serviceWorker.controller||await new Promise(h=>{navigator.serviceWorker.oncontrollerchange=()=>h()}),setInterval(function(){fetch("ping")},1e4)}const i=o.get("trace"),l=(i==null?void 0:i.endsWith(".json"))?e.jsx(q,{traceJson:i}):e.jsx($,{});V.createRoot(document.querySelector("#root")).render(l)})();
@@ -7,8 +7,8 @@
7
7
  <link rel="icon" href="./playwright-logo.svg" type="image/svg+xml">
8
8
  <link rel="manifest" href="./manifest.webmanifest">
9
9
  <title>Playwright Trace Viewer</title>
10
- <script type="module" crossorigin src="./index.BxQ34UMZ.js"></script>
11
- <link rel="modulepreload" crossorigin href="./assets/defaultSettingsView-BEpdCv1S.js">
10
+ <script type="module" crossorigin src="./index.CC3Y85le.js"></script>
11
+ <link rel="modulepreload" crossorigin href="./assets/defaultSettingsView-Bpx75f3I.js">
12
12
  <link rel="stylesheet" crossorigin href="./defaultSettingsView.ConWv5KN.css">
13
13
  <link rel="stylesheet" crossorigin href="./index.C4Y3Aw8n.css">
14
14
  </head>
@@ -1,3 +1,3 @@
1
- var Qs=Object.defineProperty;var zs=(s,t,e)=>t in s?Qs(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e;var L=(s,t,e)=>zs(s,typeof t!="symbol"?t+"":t,e);function er(s,t){const e=new Array(t.length).fill(0);return new Array(t.length).fill(0).map((n,r)=>(i,a)=>{e[r]=i/a*t[r]*1e3,s(e.reduce((o,l)=>o+l,0),1e3)})}class tr{constructor(t,e){L(this,"_snapshotStorage");L(this,"_resourceLoader");L(this,"_snapshotIds",new Map);this._snapshotStorage=t,this._resourceLoader=e}serveSnapshot(t,e,n){const r=this._snapshot(t,e);if(!r)return new Response(null,{status:404});const i=r.render();return this._snapshotIds.set(n,r),new Response(i.html,{status:200,headers:{"Content-Type":"text/html; charset=utf-8"}})}async serveClosestScreenshot(t,e){const n=this._snapshot(t,e),r=n==null?void 0:n.closestScreenshot();return r?new Response(await this._resourceLoader(r)):new Response(null,{status:404})}serveSnapshotInfo(t,e){const n=this._snapshot(t,e);return this._respondWithJson(n?{viewport:n.viewport(),url:n.snapshot().frameUrl,timestamp:n.snapshot().timestamp,wallTime:n.snapshot().wallTime}:{error:"No snapshot found"})}_snapshot(t,e){const n=e.get("name");return this._snapshotStorage.snapshotByName(t,n)}_respondWithJson(t){return new Response(JSON.stringify(t),{status:200,headers:{"Cache-Control":"public, max-age=31536000","Content-Type":"application/json"}})}async serveResource(t,e,n){let r;const i=this._snapshotIds.get(n);for(const A of t)if(r=i==null?void 0:i.resourceByUrl(nr(A),e),r)break;if(!r)return new Response(null,{status:404});const a=r.response.content._sha1,o=a?await this._resourceLoader(a)||new Blob([]):new Blob([]);let l=r.response.content.mimeType;/^text\/|^application\/(javascript|json)/.test(l)&&!l.includes("charset")&&(l=`${l}; charset=utf-8`);const d=new Headers;l!=="x-unknown"&&d.set("Content-Type",l);for(const{name:A,value:T}of r.response.headers)d.set(A,T);d.delete("Content-Encoding"),d.delete("Access-Control-Allow-Origin"),d.set("Access-Control-Allow-Origin","*"),d.delete("Content-Length"),d.set("Content-Length",String(o.size)),d.set("Cache-Control","public, max-age=31536000");const{status:g}=r.response,b=g===101||g===204||g===205||g===304;return new Response(b?null:o,{headers:d,status:r.response.status,statusText:r.response.statusText})}}function nr(s){try{const t=new URL(s);return t.hash="",t.toString()}catch{return s}}function sr(s){const t=new Map,{files:e,stacks:n}=s;for(const r of n){const[i,a]=r;t.set(`call@${i}`,a.map(o=>({file:e[o[0]],line:o[1],column:o[2],function:o[3]})))}return t}const Hn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function rr(s){return s.replace(/[&<>"']/ug,t=>Hn[t])}function ir(s){return s.replace(/[&<]/ug,t=>Hn[t])}function Wt(s,t,e){return s.find((n,r)=>{if(r===s.length-1)return!0;const i=s[r+1];return Math.abs(t(n)-e)<Math.abs(t(i)-e)})}function Bn(s){return Array.isArray(s)&&typeof s[0]=="string"}function ar(s){return Array.isArray(s)&&Array.isArray(s[0])}class or{constructor(t,e,n,r,i){L(this,"_htmlCache");L(this,"_snapshots");L(this,"_index");L(this,"snapshotName");L(this,"_resources");L(this,"_snapshot");L(this,"_callId");L(this,"_screencastFrames");this._htmlCache=t,this._resources=e,this._snapshots=n,this._index=i,this._snapshot=n[i],this._callId=n[i].callId,this._screencastFrames=r,this.snapshotName=n[i].snapshotName}snapshot(){return this._snapshots[this._index]}viewport(){return this._snapshots[this._index].viewport}closestScreenshot(){var r;const{wallTime:t,timestamp:e}=this.snapshot(),n=t&&((r=this._screencastFrames[0])!=null&&r.frameSwapWallTime)?Wt(this._screencastFrames,i=>i.frameSwapWallTime,t):Wt(this._screencastFrames,i=>i.timestamp,e);return n==null?void 0:n.sha1}render(){const t=[],e=(i,a,o,l)=>{if(typeof i=="string"){o==="STYLE"||o==="style"?t.push(pr(dr(i))):t.push(ir(i));return}if(ar(i)){const _=a-i[0][0];if(_>=0&&_<=a){const d=lr(this._snapshots[_]),g=i[0][1];if(g>=0&&g<d.length)return e(d[g],_,o,l)}}else if(Bn(i)){const[_,d,...g]=i,b=_==="NOSCRIPT"?"X-NOSCRIPT":_,A=Object.entries(d||{});t.push("<",b);const T="__playwright_current_src__",f=b==="IFRAME"||b==="FRAME",c=b==="A",u=b==="IMG",h=u&&A.some(y=>y[0]===T),p=b==="SOURCE"&&o==="PICTURE"&&(l==null?void 0:l.some(y=>y[0]===T));for(const[y,O]of A){let m=y;f&&y.toLowerCase()==="src"&&(m="__playwright_src__"),u&&y===T&&(m="src"),["src","srcset"].includes(y.toLowerCase())&&(h||p)&&(m="_"+m);let E=O;c&&y.toLowerCase()==="href"?E="link://"+O:(y.toLowerCase()==="href"||y.toLowerCase()==="src"||y===T)&&(E=ft(O)),t.push(" ",m,'="',rr(E),'"')}t.push(">");for(const y of g)e(y,a,b,A);cr.has(b)||t.push("</",b,">");return}else return},n=this._snapshot;return{html:this._htmlCache.getOrCompute(this,()=>{e(n.html,this._index,void 0,void 0);const a=(n.doctype?`<!DOCTYPE ${n.doctype}>`:"")+["<style>*,*::before,*::after { visibility: hidden }</style>",`<script>${fr(this.viewport(),this._callId,this.snapshotName)}<\/script>`].join("")+t.join("");return{value:a,size:a.length}}),pageId:n.pageId,frameId:n.frameId,index:this._index}}resourceByUrl(t,e){const n=this._snapshot;let r,i;for(const o of this._resources){if(typeof o._monotonicTime=="number"&&o._monotonicTime>=n.timestamp)break;o.response.status!==304&&o.request.url===t&&o.request.method===e&&(o._frameref===n.frameId?r=o:i=o)}let a=r??i;if(a&&e.toUpperCase()==="GET"){for(const o of n.resourceOverrides)if(t===o.url&&o.sha1){a={...a,response:{...a.response,content:{...a.response.content,_sha1:o.sha1}}};break}}return a}}const cr=new Set(["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","MENUITEM","META","PARAM","SOURCE","TRACK","WBR"]);function lr(s){if(!s._nodes){const t=[],e=n=>{if(typeof n=="string")t.push(n);else if(Bn(n)){const[,,...r]=n;for(const i of r)e(i);t.push(n)}};e(s.html),s._nodes=t}return s._nodes}function fr(s,...t){function e(n,...r){const i=new URLSearchParams(location.search),a=i.has("shouldPopulateCanvasFromScreenshot"),o=i.has("isUnderTest"),l={viewport:n,frames:new WeakMap};window.__playwright_frame_bounding_rects__=l;const _="Recorded click position in absolute coordinates did not match the center of the clicked element. This is likely due to a difference between the test runner and the trace viewer operating systems.",d=[],g=[],b=[],A=[];let T=window;for(;T!==T.parent&&!T.location.pathname.match(/\/page@[a-z0-9]+$/);)T=T.parent;const f=h=>{for(const p of h.querySelectorAll("[__playwright_scroll_top_]"))d.push(p);for(const p of h.querySelectorAll("[__playwright_scroll_left_]"))g.push(p);for(const p of h.querySelectorAll("[__playwright_value_]")){const y=p;y.type!=="file"&&(y.value=y.getAttribute("__playwright_value_")),p.removeAttribute("__playwright_value_")}for(const p of h.querySelectorAll("[__playwright_checked_]"))p.checked=p.getAttribute("__playwright_checked_")==="true",p.removeAttribute("__playwright_checked_");for(const p of h.querySelectorAll("[__playwright_selected_]"))p.selected=p.getAttribute("__playwright_selected_")==="true",p.removeAttribute("__playwright_selected_");for(const p of h.querySelectorAll("[__playwright_popover_open_]")){try{p.showPopover()}catch{}p.removeAttribute("__playwright_popover_open_")}for(const p of h.querySelectorAll("[__playwright_dialog_open_]")){try{p.getAttribute("__playwright_dialog_open_")==="modal"?p.showModal():p.show()}catch{}p.removeAttribute("__playwright_dialog_open_")}for(const p of r)for(const y of h.querySelectorAll(`[__playwright_target__="${p}"]`)){const O=y.style;O.outline="2px solid #006ab1",O.backgroundColor="#6fa8dc7f",b.push(y)}for(const p of h.querySelectorAll("iframe, frame")){const y=p.getAttribute("__playwright_bounding_rect__");p.removeAttribute("__playwright_bounding_rect__");const O=y?JSON.parse(y):void 0;O&&l.frames.set(p,{boundingRect:O,scrollLeft:0,scrollTop:0});const m=p.getAttribute("__playwright_src__");if(!m)p.setAttribute("src",'data:text/html,<body style="background: #ddd"></body>');else{const E=new URL(window.location.href),R=E.pathname.lastIndexOf("/snapshot/");R!==-1&&(E.pathname=E.pathname.substring(0,R+1)),E.pathname+=m.substring(1),p.setAttribute("src",E.toString())}}{const p=h.querySelector("body[__playwright_custom_elements__]");if(p&&window.customElements){const y=(p.getAttribute("__playwright_custom_elements__")||"").split(",");for(const O of y)window.customElements.define(O,class extends HTMLElement{})}}for(const p of h.querySelectorAll("template[__playwright_shadow_root_]")){const y=p,O=y.parentElement.attachShadow({mode:"open"});O.appendChild(y.content),y.remove(),f(O)}if("adoptedStyleSheets"in h){const p=[...h.adoptedStyleSheets];for(const y of h.querySelectorAll("template[__playwright_style_sheet_]")){const O=y,m=new CSSStyleSheet;m.replaceSync(O.getAttribute("__playwright_style_sheet_")),p.push(m)}h.adoptedStyleSheets=p}A.push(...h.querySelectorAll("canvas"))},c=()=>{window.removeEventListener("load",c);for(const y of d)y.scrollTop=+y.getAttribute("__playwright_scroll_top_"),y.removeAttribute("__playwright_scroll_top_"),l.frames.has(y)&&(l.frames.get(y).scrollTop=y.scrollTop);for(const y of g)y.scrollLeft=+y.getAttribute("__playwright_scroll_left_"),y.removeAttribute("__playwright_scroll_left_"),l.frames.has(y)&&(l.frames.get(y).scrollLeft=y.scrollTop);document.styleSheets[0].disabled=!0;const h=new URL(window.location.href).searchParams,p=window===T;if(h.get("pointX")&&h.get("pointY")){const y=+h.get("pointX"),O=+h.get("pointY"),m=h.has("hasInputTarget"),E=b.length>0,R=document.documentElement?[document.documentElement]:[];for(const x of E?b:R){const w=document.createElement("x-pw-pointer");if(w.style.position="fixed",w.style.backgroundColor="#f44336",w.style.width="20px",w.style.height="20px",w.style.borderRadius="10px",w.style.margin="-10px 0 0 -10px",w.style.zIndex="2147483646",w.style.display="flex",w.style.alignItems="center",w.style.justifyContent="center",E){const S=x.getBoundingClientRect(),N=S.left+S.width/2,I=S.top+S.height/2;if(w.style.left=N+"px",w.style.top=I+"px",p&&(Math.abs(N-y)>=10||Math.abs(I-O)>=10)){const D=document.createElement("x-pw-pointer-warning");D.textContent="⚠",D.style.fontSize="19px",D.style.color="white",D.style.marginTop="-3.5px",D.style.userSelect="none",w.appendChild(D),w.setAttribute("title",_)}document.documentElement.appendChild(w)}else p&&!m&&(w.style.left=y+"px",w.style.top=O+"px",document.documentElement.appendChild(w))}}if(A.length>0){let y=function(m,E){function R(){const x=document.createElement("canvas");x.width=x.width/Math.floor(x.width/24),x.height=x.height/Math.floor(x.height/24);const w=x.getContext("2d");return w.fillStyle="lightgray",w.fillRect(0,0,x.width,x.height),w.fillStyle="white",w.fillRect(0,0,x.width/2,x.height/2),w.fillRect(x.width/2,x.height/2,x.width,x.height),w.createPattern(x,"repeat")}m.fillStyle=R(),m.fillRect(0,0,E.width,E.height)};const O=new Image;O.onload=()=>{var m;for(const E of A){const R=E.getContext("2d"),x=E.getAttribute("__playwright_bounding_rect__");if(E.removeAttribute("__playwright_bounding_rect__"),!x)continue;let w;try{w=JSON.parse(x)}catch{continue}let S=window;for(;S!==T;){const C=S.frameElement;S=S.parent;const v=(m=S.__playwright_frame_bounding_rects__)==null?void 0:m.frames.get(C);if(!(v!=null&&v.boundingRect))break;const F=v.boundingRect.left-v.scrollLeft,Z=v.boundingRect.top-v.scrollTop;w.left+=F,w.top+=Z,w.right+=F,w.bottom+=Z}const{width:N,height:I}=T.__playwright_frame_bounding_rects__.viewport;w.left=w.left/N,w.top=w.top/I,w.right=w.right/N,w.bottom=w.bottom/I;const D=w.right>1||w.bottom>1;if(w.left>1||w.top>1){E.title="Playwright couldn't capture canvas contents because it's located outside the viewport.";continue}y(R,E),a?(R.drawImage(O,w.left*O.width,w.top*O.height,(w.right-w.left)*O.width,(w.bottom-w.top)*O.height,0,0,E.width,E.height),D?E.title="Playwright couldn't capture full canvas contents because it's located partially outside the viewport.":E.title="Canvas contents are displayed on a best-effort basis based on viewport screenshots taken during test execution."):E.title="Canvas content display is disabled.",o&&console.log("canvas drawn:",JSON.stringify([w.left,w.top,w.right-w.left,w.bottom-w.top].map(C=>Math.floor(C*100))))}},O.onerror=()=>{for(const m of A){const E=m.getContext("2d");y(E,m),m.title="Playwright couldn't show canvas contents because the screenshot failed to load."}},O.src=location.href.replace("/snapshot","/closest-screenshot")}},u=()=>f(document);window.addEventListener("load",c),window.addEventListener("DOMContentLoaded",u)}return`
2
- (${e.toString()})(${JSON.stringify(s)}${t.map(n=>`, "${n}"`).join("")})`}const jn=["about:","blob:","data:","file:","ftp:","http:","https:","mailto:","sftp:","ws:","wss:"],Ht="http://playwright.bloburl/#";function ft(s){s.startsWith(Ht)&&(s=s.substring(Ht.length));try{const t=new URL(s);if(t.protocol==="javascript:"||t.protocol==="vbscript:")return"javascript:void(0)";const e=t.protocol==="blob:",n=t.protocol==="file:";if(!e&&!n&&jn.includes(t.protocol))return s;const r="pw-"+t.protocol.slice(0,t.protocol.length-1);return n||(t.protocol="https:"),t.hostname=t.hostname?`${r}--${t.hostname}`:r,n&&(t.protocol="https:"),t.toString()}catch{return s}}const ur=/url\(['"]?([\w-]+:)\/\//ig;function dr(s){return s.replace(ur,(t,e)=>!(e==="blob:")&&!(e==="file:")&&jn.includes(e)?t:t.replace(e+"//",`https://pw-${e.slice(0,-1)}--`))}const _r=/url\(\s*'([^']*)'\s*\)/ig,hr=/url\(\s*"([^"]*)"\s*\)/ig;function pr(s){const t=(e,n)=>n.includes("</")?e.replace(n,encodeURI(n)):e;return s.replace(_r,t).replace(hr,t)}class mr{constructor(t){L(this,"_maxSize");L(this,"_map");L(this,"_size");this._maxSize=t,this._map=new Map,this._size=0}getOrCompute(t,e){if(this._map.has(t)){const r=this._map.get(t);return this._map.delete(t),this._map.set(t,r),r.value}const n=e();for(;this._map.size&&this._size+n.size>this._maxSize;){const[r,i]=this._map.entries().next().value;this._size-=i.size,this._map.delete(r)}return this._map.set(t,n),this._size+=n.size,n.value}}class wr{constructor(){L(this,"_frameSnapshots",new Map);L(this,"_cache",new mr(1e8));L(this,"_contextToResources",new Map)}addResource(t,e){e.request.url=ft(e.request.url),this._ensureResourcesForContext(t).push(e)}addFrameSnapshot(t,e,n){for(const o of e.resourceOverrides)o.url=ft(o.url);let r=this._frameSnapshots.get(e.frameId);r||(r={raw:[],renderers:[]},this._frameSnapshots.set(e.frameId,r),e.isMainFrame&&this._frameSnapshots.set(e.pageId,r)),r.raw.push(e);const i=this._ensureResourcesForContext(t),a=new or(this._cache,i,r.raw,n,r.raw.length-1);return r.renderers.push(a),a}snapshotByName(t,e){const n=this._frameSnapshots.get(t);return n==null?void 0:n.renderers.find(r=>r.snapshotName===e)}snapshotsForTest(){return[...this._frameSnapshots.keys()]}finalize(){for(const t of this._contextToResources.values())t.sort((e,n)=>(e._monotonicTime||0)-(n._monotonicTime||0))}_ensureResourcesForContext(t){let e=this._contextToResources.get(t);return e||(e=[],this._contextToResources.set(t,e)),e}}class Gn extends Error{constructor(t){super(t),this.name="TraceVersionError"}}const Bt=8;class gr{constructor(t,e){L(this,"_contextEntry");L(this,"_snapshotStorage");L(this,"_actionMap",new Map);L(this,"_version");L(this,"_pageEntries",new Map);L(this,"_jsHandles",new Map);L(this,"_consoleObjects",new Map);this._contextEntry=t,this._snapshotStorage=e}appendTrace(t){for(const e of t.split(`
3
- `))this._appendEvent(e)}actions(){return[...this._actionMap.values()]}_pageEntry(t){let e=this._pageEntries.get(t);return e||(e={pageId:t,screencastFrames:[]},this._pageEntries.set(t,e),this._contextEntry.pages.push(e)),e}_appendEvent(t){if(!t)return;const e=this._modernize(JSON.parse(t));for(const n of e)this._innerAppendEvent(n)}_innerAppendEvent(t){const e=this._contextEntry;switch(t.type){case"context-options":{if(t.version>Bt)throw new Gn("The trace was created by a newer version of Playwright and is not supported by this version of the viewer. Please use latest Playwright to open the trace.");this._version=t.version,e.origin=t.origin,e.browserName=t.browserName,e.channel=t.channel,e.title=t.title,e.platform=t.platform,e.playwrightVersion=t.playwrightVersion,e.wallTime=t.wallTime,e.startTime=t.monotonicTime,e.sdkLanguage=t.sdkLanguage,e.options=t.options,e.testIdAttributeName=t.testIdAttributeName,e.contextId=t.contextId??"";break}case"screencast-frame":{this._pageEntry(t.pageId).screencastFrames.push(t);break}case"before":{this._actionMap.set(t.callId,{...t,type:"action",endTime:0,log:[]});break}case"input":{const n=this._actionMap.get(t.callId);n.inputSnapshot=t.inputSnapshot,n.point=t.point;break}case"log":{const n=this._actionMap.get(t.callId);if(!n)return;n.log.push({time:t.time,message:t.message});break}case"after":{const n=this._actionMap.get(t.callId);n.afterSnapshot=t.afterSnapshot,n.endTime=t.endTime,n.result=t.result,n.error=t.error,n.attachments=t.attachments,n.annotations=t.annotations,t.point&&(n.point=t.point);break}case"action":{this._actionMap.set(t.callId,{...t,log:[]});break}case"event":{e.events.push(t);break}case"stdout":{e.stdio.push(t);break}case"stderr":{e.stdio.push(t);break}case"error":{e.errors.push(t);break}case"console":{e.events.push(t);break}case"resource-snapshot":this._snapshotStorage.addResource(this._contextEntry.contextId,t.snapshot),e.resources.push(t.snapshot);break;case"frame-snapshot":this._snapshotStorage.addFrameSnapshot(this._contextEntry.contextId,t.snapshot,this._pageEntry(t.snapshot.pageId).screencastFrames);break}"pageId"in t&&t.pageId&&this._pageEntry(t.pageId),(t.type==="action"||t.type==="before")&&(e.startTime=Math.min(e.startTime,t.startTime)),(t.type==="action"||t.type==="after")&&(e.endTime=Math.max(e.endTime,t.endTime)),t.type==="event"&&(e.startTime=Math.min(e.startTime,t.time),e.endTime=Math.max(e.endTime,t.time)),t.type==="screencast-frame"&&(e.startTime=Math.min(e.startTime,t.timestamp),e.endTime=Math.max(e.endTime,t.timestamp))}_processedContextCreatedEvent(){return this._version!==void 0}_modernize(t){let e=this._version??t.version??6,n=[t];for(;e<Bt;++e)n=this[`_modernize_${e}_to_${e+1}`].call(this,n);return n}_modernize_0_to_1(t){for(const e of t)e.type==="action"&&typeof e.metadata.error=="string"&&(e.metadata.error={error:{name:"Error",message:e.metadata.error}});return t}_modernize_1_to_2(t){var e;for(const n of t)n.type!=="frame-snapshot"||!n.snapshot.isMainFrame||(n.snapshot.viewport=((e=this._contextEntry.options)==null?void 0:e.viewport)||{width:1280,height:720});return t}_modernize_2_to_3(t){for(const e of t){if(e.type!=="resource-snapshot"||e.snapshot.request)continue;const n=e.snapshot;e.snapshot={_frameref:n.frameId,request:{url:n.url,method:n.method,headers:n.requestHeaders,postData:n.requestSha1?{_sha1:n.requestSha1}:void 0},response:{status:n.status,headers:n.responseHeaders,content:{mimeType:n.contentType,_sha1:n.responseSha1}},_monotonicTime:n.timestamp}}return t}_modernize_3_to_4(t){const e=[];for(const n of t){const r=this._modernize_event_3_to_4(n);r&&e.push(r)}return e}_modernize_event_3_to_4(t){var n,r,i,a;if(t.type!=="action"&&t.type!=="event")return t;const e=t.metadata;return e.internal||e.method.startsWith("tracing")?null:t.type==="event"?e.method==="__create__"&&e.type==="ConsoleMessage"?{type:"object",class:e.type,guid:e.params.guid,initializer:e.params.initializer}:{type:"event",time:e.startTime,class:e.type,method:e.method,params:e.params,pageId:e.pageId}:{type:"action",callId:e.id,startTime:e.startTime,endTime:e.endTime,apiName:e.apiName||e.type+"."+e.method,class:e.type,method:e.method,params:e.params,wallTime:e.wallTime||Date.now(),log:e.log,beforeSnapshot:(n=e.snapshots.find(o=>o.title==="before"))==null?void 0:n.snapshotName,inputSnapshot:(r=e.snapshots.find(o=>o.title==="input"))==null?void 0:r.snapshotName,afterSnapshot:(i=e.snapshots.find(o=>o.title==="after"))==null?void 0:i.snapshotName,error:(a=e.error)==null?void 0:a.error,result:e.result,point:e.point,pageId:e.pageId}}_modernize_4_to_5(t){const e=[];for(const n of t){const r=this._modernize_event_4_to_5(n);r&&e.push(r)}return e}_modernize_event_4_to_5(t){var e,n;if(t.type==="event"&&t.method==="__create__"&&t.class==="JSHandle"&&this._jsHandles.set(t.params.guid,t.params.initializer),t.type==="object"){if(t.class!=="ConsoleMessage")return null;const r=(e=t.initializer.args)==null?void 0:e.map(i=>{if(i.guid){const a=this._jsHandles.get(i.guid);return{preview:(a==null?void 0:a.preview)||"",value:""}}return{preview:i.preview||"",value:i.value||""}});return this._consoleObjects.set(t.guid,{type:t.initializer.type,text:t.initializer.text,location:t.initializer.location,args:r}),null}if(t.type==="event"&&t.method==="console"){const r=this._consoleObjects.get(((n=t.params.message)==null?void 0:n.guid)||"");return r?{type:"console",time:t.time,pageId:t.pageId,messageType:r.type,text:r.text,args:r.args,location:r.location}:null}return t}_modernize_5_to_6(t){const e=[];for(const n of t)if(e.push(n),!(n.type!=="after"||!n.log.length))for(const r of n.log)e.push({type:"log",callId:n.callId,message:r,time:-1});return e}_modernize_6_to_7(t){const e=[];if(!this._processedContextCreatedEvent()&&t[0].type!=="context-options"){const n={type:"context-options",origin:"testRunner",version:6,browserName:"",options:{},platform:"unknown",wallTime:0,monotonicTime:0,sdkLanguage:"javascript",contextId:""};e.push(n)}for(const n of t){if(n.type==="context-options"){e.push({...n,monotonicTime:0,origin:"library",contextId:""});continue}if(n.type==="before"||n.type==="action"){this._contextEntry.wallTime||(this._contextEntry.wallTime=n.wallTime);const r=n,i=n;i.stepId=`${r.apiName}@${r.wallTime}`,e.push(i)}else e.push(n)}return e}_modernize_7_to_8(t){const e=[];for(const n of t)if(n.type==="before"||n.type==="action"){const r=n,i=n;r.apiName&&(i.title=r.apiName,delete i.apiName),i.stepId=r.stepId??r.callId,e.push(i)}else e.push(n);return e}}class br{constructor(){L(this,"contextEntries",[]);L(this,"_snapshotStorage");L(this,"_backend");L(this,"_resourceToContentType",new Map)}async load(t,e){var o,l;this._backend=t;const n=[];let r=!1;for(const _ of await this._backend.entryNames()){const d=_.match(/(.+)\.trace$/);d&&n.push(d[1]||""),_.includes("src@")&&(r=!0)}if(!n.length)throw new Error("Cannot find .trace file");this._snapshotStorage=new wr;const i=n.length*3;let a=0;for(const _ of n){const d=yr();d.hasSource=r;const g=new gr(d,this._snapshotStorage),b=await this._backend.readText(_+".trace")||"";g.appendTrace(b),e(++a,i);const A=await this._backend.readText(_+".network")||"";if(g.appendTrace(A),e(++a,i),d.actions=g.actions().sort((f,c)=>f.startTime-c.startTime),!t.isLive()){for(const f of d.actions.slice().reverse())if(!f.endTime&&!f.error)for(const c of d.actions)c.parentId===f.callId&&f.endTime<c.endTime&&(f.endTime=c.endTime)}const T=await this._backend.readText(_+".stacks");if(T){const f=sr(JSON.parse(T));for(const c of d.actions)c.stack=c.stack||f.get(c.callId)}e(++a,i);for(const f of d.resources)(o=f.request.postData)!=null&&o._sha1&&this._resourceToContentType.set(f.request.postData._sha1,jt(f.request.postData.mimeType)),(l=f.response.content)!=null&&l._sha1&&this._resourceToContentType.set(f.response.content._sha1,jt(f.response.content.mimeType));this.contextEntries.push(d)}this._snapshotStorage.finalize()}async hasEntry(t){return this._backend.hasEntry(t)}async resourceForSha1(t){const e=await this._backend.readBlob("resources/"+t),n=this._resourceToContentType.get(t);return!e||n===void 0||n==="x-unknown"?e:new Blob([e],{type:n})}storage(){return this._snapshotStorage}}function jt(s){const t=s.match(/^(.*);\s*charset=.*$/);return t?t[1]:s}function yr(){return{origin:"testRunner",startTime:Number.MAX_SAFE_INTEGER,wallTime:Number.MAX_SAFE_INTEGER,endTime:0,browserName:"",options:{deviceScaleFactor:1,isMobile:!1,viewport:{width:1280,height:800}},pages:[],resources:[],actions:[],events:[],errors:[],stdio:[],hasSource:!1,contextId:""}}const Er=15,M=0,se=1,xr=2,X=-2,B=-3,Gt=-4,re=-5,$=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Yn=1440,Tr=0,Sr=4,Rr=9,Ar=5,Or=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Ir=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],Cr=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],Nr=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Dr=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],Pr=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],ae=15;function ut(){const s=this;let t,e,n,r,i,a;function o(_,d,g,b,A,T,f,c,u,h,p){let y,O,m,E,R,x,w,S,N,I,D,k,C,v,F;I=0,R=g;do n[_[d+I]]++,I++,R--;while(R!==0);if(n[0]==g)return f[0]=-1,c[0]=0,M;for(S=c[0],x=1;x<=ae&&n[x]===0;x++);for(w=x,S<x&&(S=x),R=ae;R!==0&&n[R]===0;R--);for(m=R,S>R&&(S=R),c[0]=S,v=1<<x;x<R;x++,v<<=1)if((v-=n[x])<0)return B;if((v-=n[R])<0)return B;for(n[R]+=v,a[1]=x=0,I=1,C=2;--R!==0;)a[C]=x+=n[I],C++,I++;R=0,I=0;do(x=_[d+I])!==0&&(p[a[x]++]=R),I++;while(++R<g);for(g=a[m],a[0]=R=0,I=0,E=-1,k=-S,i[0]=0,D=0,F=0;w<=m;w++)for(y=n[w];y--!==0;){for(;w>k+S;){if(E++,k+=S,F=m-k,F=F>S?S:F,(O=1<<(x=w-k))>y+1&&(O-=y+1,C=w,x<F))for(;++x<F&&!((O<<=1)<=n[++C]);)O-=n[C];if(F=1<<x,h[0]+F>Yn)return B;i[E]=D=h[0],h[0]+=F,E!==0?(a[E]=R,r[0]=x,r[1]=S,x=R>>>k-S,r[2]=D-i[E-1]-x,u.set(r,(i[E-1]+x)*3)):f[0]=D}for(r[1]=w-k,I>=g?r[0]=192:p[I]<b?(r[0]=p[I]<256?0:96,r[2]=p[I++]):(r[0]=T[p[I]-b]+16+64,r[2]=A[p[I++]-b]),O=1<<w-k,x=R>>>k;x<F;x+=O)u.set(r,(D+x)*3);for(x=1<<w-1;(R&x)!==0;x>>>=1)R^=x;for(R^=x,N=(1<<k)-1;(R&N)!=a[E];)E--,k-=S,N=(1<<k)-1}return v!==0&&m!=1?re:M}function l(_){let d;for(t||(t=[],e=[],n=new Int32Array(ae+1),r=[],i=new Int32Array(ae),a=new Int32Array(ae+1)),e.length<_&&(e=[]),d=0;d<_;d++)e[d]=0;for(d=0;d<ae+1;d++)n[d]=0;for(d=0;d<3;d++)r[d]=0;i.set(n.subarray(0,ae),0),a.set(n.subarray(0,ae+1),0)}s.inflate_trees_bits=function(_,d,g,b,A){let T;return l(19),t[0]=0,T=o(_,0,19,19,null,null,g,d,b,t,e),T==B?A.msg="oversubscribed dynamic bit lengths tree":(T==re||d[0]===0)&&(A.msg="incomplete dynamic bit lengths tree",T=B),T},s.inflate_trees_dynamic=function(_,d,g,b,A,T,f,c,u){let h;return l(288),t[0]=0,h=o(g,0,_,257,Cr,Nr,T,b,c,t,e),h!=M||b[0]===0?(h==B?u.msg="oversubscribed literal/length tree":h!=Gt&&(u.msg="incomplete literal/length tree",h=B),h):(l(288),h=o(g,_,d,0,Dr,Pr,f,A,c,t,e),h!=M||A[0]===0&&_>257?(h==B?u.msg="oversubscribed distance tree":h==re?(u.msg="incomplete distance tree",h=B):h!=Gt&&(u.msg="empty distance tree with lengths",h=B),h):M)}}ut.inflate_trees_fixed=function(s,t,e,n){return s[0]=Rr,t[0]=Ar,e[0]=Or,n[0]=Ir,M};const He=0,Yt=1,qt=2,Vt=3,Zt=4,Kt=5,Xt=6,et=7,$t=8,Be=9;function kr(){const s=this;let t,e=0,n,r=0,i=0,a=0,o=0,l=0,_=0,d=0,g,b=0,A,T=0;function f(c,u,h,p,y,O,m,E){let R,x,w,S,N,I,D,k,C,v,F,Z,P,Q,U,W;D=E.next_in_index,k=E.avail_in,N=m.bitb,I=m.bitk,C=m.write,v=C<m.read?m.read-C-1:m.end-C,F=$[c],Z=$[u];do{for(;I<20;)k--,N|=(E.read_byte(D++)&255)<<I,I+=8;if(R=N&F,x=h,w=p,W=(w+R)*3,(S=x[W])===0){N>>=x[W+1],I-=x[W+1],m.win[C++]=x[W+2],v--;continue}do{if(N>>=x[W+1],I-=x[W+1],(S&16)!==0){for(S&=15,P=x[W+2]+(N&$[S]),N>>=S,I-=S;I<15;)k--,N|=(E.read_byte(D++)&255)<<I,I+=8;R=N&Z,x=y,w=O,W=(w+R)*3,S=x[W];do if(N>>=x[W+1],I-=x[W+1],(S&16)!==0){for(S&=15;I<S;)k--,N|=(E.read_byte(D++)&255)<<I,I+=8;if(Q=x[W+2]+(N&$[S]),N>>=S,I-=S,v-=P,C>=Q)U=C-Q,C-U>0&&2>C-U?(m.win[C++]=m.win[U++],m.win[C++]=m.win[U++],P-=2):(m.win.set(m.win.subarray(U,U+2),C),C+=2,U+=2,P-=2);else{U=C-Q;do U+=m.end;while(U<0);if(S=m.end-U,P>S){if(P-=S,C-U>0&&S>C-U)do m.win[C++]=m.win[U++];while(--S!==0);else m.win.set(m.win.subarray(U,U+S),C),C+=S,U+=S,S=0;U=0}}if(C-U>0&&P>C-U)do m.win[C++]=m.win[U++];while(--P!==0);else m.win.set(m.win.subarray(U,U+P),C),C+=P,U+=P,P=0;break}else if((S&64)===0)R+=x[W+2],R+=N&$[S],W=(w+R)*3,S=x[W];else return E.msg="invalid distance code",P=E.avail_in-k,P=I>>3<P?I>>3:P,k+=P,D-=P,I-=P<<3,m.bitb=N,m.bitk=I,E.avail_in=k,E.total_in+=D-E.next_in_index,E.next_in_index=D,m.write=C,B;while(!0);break}if((S&64)===0){if(R+=x[W+2],R+=N&$[S],W=(w+R)*3,(S=x[W])===0){N>>=x[W+1],I-=x[W+1],m.win[C++]=x[W+2],v--;break}}else return(S&32)!==0?(P=E.avail_in-k,P=I>>3<P?I>>3:P,k+=P,D-=P,I-=P<<3,m.bitb=N,m.bitk=I,E.avail_in=k,E.total_in+=D-E.next_in_index,E.next_in_index=D,m.write=C,se):(E.msg="invalid literal/length code",P=E.avail_in-k,P=I>>3<P?I>>3:P,k+=P,D-=P,I-=P<<3,m.bitb=N,m.bitk=I,E.avail_in=k,E.total_in+=D-E.next_in_index,E.next_in_index=D,m.write=C,B)}while(!0)}while(v>=258&&k>=10);return P=E.avail_in-k,P=I>>3<P?I>>3:P,k+=P,D-=P,I-=P<<3,m.bitb=N,m.bitk=I,E.avail_in=k,E.total_in+=D-E.next_in_index,E.next_in_index=D,m.write=C,M}s.init=function(c,u,h,p,y,O){t=He,_=c,d=u,g=h,b=p,A=y,T=O,n=null},s.proc=function(c,u,h){let p,y,O,m=0,E=0,R=0,x,w,S,N;for(R=u.next_in_index,x=u.avail_in,m=c.bitb,E=c.bitk,w=c.write,S=w<c.read?c.read-w-1:c.end-w;;)switch(t){case He:if(S>=258&&x>=10&&(c.bitb=m,c.bitk=E,u.avail_in=x,u.total_in+=R-u.next_in_index,u.next_in_index=R,c.write=w,h=f(_,d,g,b,A,T,c,u),R=u.next_in_index,x=u.avail_in,m=c.bitb,E=c.bitk,w=c.write,S=w<c.read?c.read-w-1:c.end-w,h!=M)){t=h==se?et:Be;break}i=_,n=g,r=b,t=Yt;case Yt:for(p=i;E<p;){if(x!==0)h=M;else return c.bitb=m,c.bitk=E,u.avail_in=x,u.total_in+=R-u.next_in_index,u.next_in_index=R,c.write=w,c.inflate_flush(u,h);x--,m|=(u.read_byte(R++)&255)<<E,E+=8}if(y=(r+(m&$[p]))*3,m>>>=n[y+1],E-=n[y+1],O=n[y],O===0){a=n[y+2],t=Xt;break}if((O&16)!==0){o=O&15,e=n[y+2],t=qt;break}if((O&64)===0){i=O,r=y/3+n[y+2];break}if((O&32)!==0){t=et;break}return t=Be,u.msg="invalid literal/length code",h=B,c.bitb=m,c.bitk=E,u.avail_in=x,u.total_in+=R-u.next_in_index,u.next_in_index=R,c.write=w,c.inflate_flush(u,h);case qt:for(p=o;E<p;){if(x!==0)h=M;else return c.bitb=m,c.bitk=E,u.avail_in=x,u.total_in+=R-u.next_in_index,u.next_in_index=R,c.write=w,c.inflate_flush(u,h);x--,m|=(u.read_byte(R++)&255)<<E,E+=8}e+=m&$[p],m>>=p,E-=p,i=d,n=A,r=T,t=Vt;case Vt:for(p=i;E<p;){if(x!==0)h=M;else return c.bitb=m,c.bitk=E,u.avail_in=x,u.total_in+=R-u.next_in_index,u.next_in_index=R,c.write=w,c.inflate_flush(u,h);x--,m|=(u.read_byte(R++)&255)<<E,E+=8}if(y=(r+(m&$[p]))*3,m>>=n[y+1],E-=n[y+1],O=n[y],(O&16)!==0){o=O&15,l=n[y+2],t=Zt;break}if((O&64)===0){i=O,r=y/3+n[y+2];break}return t=Be,u.msg="invalid distance code",h=B,c.bitb=m,c.bitk=E,u.avail_in=x,u.total_in+=R-u.next_in_index,u.next_in_index=R,c.write=w,c.inflate_flush(u,h);case Zt:for(p=o;E<p;){if(x!==0)h=M;else return c.bitb=m,c.bitk=E,u.avail_in=x,u.total_in+=R-u.next_in_index,u.next_in_index=R,c.write=w,c.inflate_flush(u,h);x--,m|=(u.read_byte(R++)&255)<<E,E+=8}l+=m&$[p],m>>=p,E-=p,t=Kt;case Kt:for(N=w-l;N<0;)N+=c.end;for(;e!==0;){if(S===0&&(w==c.end&&c.read!==0&&(w=0,S=w<c.read?c.read-w-1:c.end-w),S===0&&(c.write=w,h=c.inflate_flush(u,h),w=c.write,S=w<c.read?c.read-w-1:c.end-w,w==c.end&&c.read!==0&&(w=0,S=w<c.read?c.read-w-1:c.end-w),S===0)))return c.bitb=m,c.bitk=E,u.avail_in=x,u.total_in+=R-u.next_in_index,u.next_in_index=R,c.write=w,c.inflate_flush(u,h);c.win[w++]=c.win[N++],S--,N==c.end&&(N=0),e--}t=He;break;case Xt:if(S===0&&(w==c.end&&c.read!==0&&(w=0,S=w<c.read?c.read-w-1:c.end-w),S===0&&(c.write=w,h=c.inflate_flush(u,h),w=c.write,S=w<c.read?c.read-w-1:c.end-w,w==c.end&&c.read!==0&&(w=0,S=w<c.read?c.read-w-1:c.end-w),S===0)))return c.bitb=m,c.bitk=E,u.avail_in=x,u.total_in+=R-u.next_in_index,u.next_in_index=R,c.write=w,c.inflate_flush(u,h);h=M,c.win[w++]=a,S--,t=He;break;case et:if(E>7&&(E-=8,x++,R--),c.write=w,h=c.inflate_flush(u,h),w=c.write,S=w<c.read?c.read-w-1:c.end-w,c.read!=c.write)return c.bitb=m,c.bitk=E,u.avail_in=x,u.total_in+=R-u.next_in_index,u.next_in_index=R,c.write=w,c.inflate_flush(u,h);t=$t;case $t:return h=se,c.bitb=m,c.bitk=E,u.avail_in=x,u.total_in+=R-u.next_in_index,u.next_in_index=R,c.write=w,c.inflate_flush(u,h);case Be:return h=B,c.bitb=m,c.bitk=E,u.avail_in=x,u.total_in+=R-u.next_in_index,u.next_in_index=R,c.write=w,c.inflate_flush(u,h);default:return h=X,c.bitb=m,c.bitk=E,u.avail_in=x,u.total_in+=R-u.next_in_index,u.next_in_index=R,c.write=w,c.inflate_flush(u,h)}},s.free=function(){}}const Jt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],ge=0,tt=1,Qt=2,zt=3,en=4,tn=5,je=6,Ge=7,nn=8,pe=9;function Lr(s,t){const e=this;let n=ge,r=0,i=0,a=0,o;const l=[0],_=[0],d=new kr;let g=0,b=new Int32Array(Yn*3);const A=0,T=new ut;e.bitk=0,e.bitb=0,e.win=new Uint8Array(t),e.end=t,e.read=0,e.write=0,e.reset=function(f,c){c&&(c[0]=A),n==je&&d.free(f),n=ge,e.bitk=0,e.bitb=0,e.read=e.write=0},e.reset(s,null),e.inflate_flush=function(f,c){let u,h,p;return h=f.next_out_index,p=e.read,u=(p<=e.write?e.write:e.end)-p,u>f.avail_out&&(u=f.avail_out),u!==0&&c==re&&(c=M),f.avail_out-=u,f.total_out+=u,f.next_out.set(e.win.subarray(p,p+u),h),h+=u,p+=u,p==e.end&&(p=0,e.write==e.end&&(e.write=0),u=e.write-p,u>f.avail_out&&(u=f.avail_out),u!==0&&c==re&&(c=M),f.avail_out-=u,f.total_out+=u,f.next_out.set(e.win.subarray(p,p+u),h),h+=u,p+=u),f.next_out_index=h,e.read=p,c},e.proc=function(f,c){let u,h,p,y,O,m,E,R;for(y=f.next_in_index,O=f.avail_in,h=e.bitb,p=e.bitk,m=e.write,E=m<e.read?e.read-m-1:e.end-m;;){let x,w,S,N,I,D,k,C;switch(n){case ge:for(;p<3;){if(O!==0)c=M;else return e.bitb=h,e.bitk=p,f.avail_in=O,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=m,e.inflate_flush(f,c);O--,h|=(f.read_byte(y++)&255)<<p,p+=8}switch(u=h&7,g=u&1,u>>>1){case 0:h>>>=3,p-=3,u=p&7,h>>>=u,p-=u,n=tt;break;case 1:x=[],w=[],S=[[]],N=[[]],ut.inflate_trees_fixed(x,w,S,N),d.init(x[0],w[0],S[0],0,N[0],0),h>>>=3,p-=3,n=je;break;case 2:h>>>=3,p-=3,n=zt;break;case 3:return h>>>=3,p-=3,n=pe,f.msg="invalid block type",c=B,e.bitb=h,e.bitk=p,f.avail_in=O,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=m,e.inflate_flush(f,c)}break;case tt:for(;p<32;){if(O!==0)c=M;else return e.bitb=h,e.bitk=p,f.avail_in=O,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=m,e.inflate_flush(f,c);O--,h|=(f.read_byte(y++)&255)<<p,p+=8}if((~h>>>16&65535)!=(h&65535))return n=pe,f.msg="invalid stored block lengths",c=B,e.bitb=h,e.bitk=p,f.avail_in=O,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=m,e.inflate_flush(f,c);r=h&65535,h=p=0,n=r!==0?Qt:g!==0?Ge:ge;break;case Qt:if(O===0||E===0&&(m==e.end&&e.read!==0&&(m=0,E=m<e.read?e.read-m-1:e.end-m),E===0&&(e.write=m,c=e.inflate_flush(f,c),m=e.write,E=m<e.read?e.read-m-1:e.end-m,m==e.end&&e.read!==0&&(m=0,E=m<e.read?e.read-m-1:e.end-m),E===0)))return e.bitb=h,e.bitk=p,f.avail_in=O,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=m,e.inflate_flush(f,c);if(c=M,u=r,u>O&&(u=O),u>E&&(u=E),e.win.set(f.read_buf(y,u),m),y+=u,O-=u,m+=u,E-=u,(r-=u)!==0)break;n=g!==0?Ge:ge;break;case zt:for(;p<14;){if(O!==0)c=M;else return e.bitb=h,e.bitk=p,f.avail_in=O,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=m,e.inflate_flush(f,c);O--,h|=(f.read_byte(y++)&255)<<p,p+=8}if(i=u=h&16383,(u&31)>29||(u>>5&31)>29)return n=pe,f.msg="too many length or distance symbols",c=B,e.bitb=h,e.bitk=p,f.avail_in=O,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=m,e.inflate_flush(f,c);if(u=258+(u&31)+(u>>5&31),!o||o.length<u)o=[];else for(R=0;R<u;R++)o[R]=0;h>>>=14,p-=14,a=0,n=en;case en:for(;a<4+(i>>>10);){for(;p<3;){if(O!==0)c=M;else return e.bitb=h,e.bitk=p,f.avail_in=O,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=m,e.inflate_flush(f,c);O--,h|=(f.read_byte(y++)&255)<<p,p+=8}o[Jt[a++]]=h&7,h>>>=3,p-=3}for(;a<19;)o[Jt[a++]]=0;if(l[0]=7,u=T.inflate_trees_bits(o,l,_,b,f),u!=M)return c=u,c==B&&(o=null,n=pe),e.bitb=h,e.bitk=p,f.avail_in=O,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=m,e.inflate_flush(f,c);a=0,n=tn;case tn:for(;u=i,!(a>=258+(u&31)+(u>>5&31));){let v,F;for(u=l[0];p<u;){if(O!==0)c=M;else return e.bitb=h,e.bitk=p,f.avail_in=O,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=m,e.inflate_flush(f,c);O--,h|=(f.read_byte(y++)&255)<<p,p+=8}if(u=b[(_[0]+(h&$[u]))*3+1],F=b[(_[0]+(h&$[u]))*3+2],F<16)h>>>=u,p-=u,o[a++]=F;else{for(R=F==18?7:F-14,v=F==18?11:3;p<u+R;){if(O!==0)c=M;else return e.bitb=h,e.bitk=p,f.avail_in=O,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=m,e.inflate_flush(f,c);O--,h|=(f.read_byte(y++)&255)<<p,p+=8}if(h>>>=u,p-=u,v+=h&$[R],h>>>=R,p-=R,R=a,u=i,R+v>258+(u&31)+(u>>5&31)||F==16&&R<1)return o=null,n=pe,f.msg="invalid bit length repeat",c=B,e.bitb=h,e.bitk=p,f.avail_in=O,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=m,e.inflate_flush(f,c);F=F==16?o[R-1]:0;do o[R++]=F;while(--v!==0);a=R}}if(_[0]=-1,I=[],D=[],k=[],C=[],I[0]=9,D[0]=6,u=i,u=T.inflate_trees_dynamic(257+(u&31),1+(u>>5&31),o,I,D,k,C,b,f),u!=M)return u==B&&(o=null,n=pe),c=u,e.bitb=h,e.bitk=p,f.avail_in=O,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=m,e.inflate_flush(f,c);d.init(I[0],D[0],b,k[0],b,C[0]),n=je;case je:if(e.bitb=h,e.bitk=p,f.avail_in=O,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=m,(c=d.proc(e,f,c))!=se)return e.inflate_flush(f,c);if(c=M,d.free(f),y=f.next_in_index,O=f.avail_in,h=e.bitb,p=e.bitk,m=e.write,E=m<e.read?e.read-m-1:e.end-m,g===0){n=ge;break}n=Ge;case Ge:if(e.write=m,c=e.inflate_flush(f,c),m=e.write,E=m<e.read?e.read-m-1:e.end-m,e.read!=e.write)return e.bitb=h,e.bitk=p,f.avail_in=O,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=m,e.inflate_flush(f,c);n=nn;case nn:return c=se,e.bitb=h,e.bitk=p,f.avail_in=O,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=m,e.inflate_flush(f,c);case pe:return c=B,e.bitb=h,e.bitk=p,f.avail_in=O,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=m,e.inflate_flush(f,c);default:return c=X,e.bitb=h,e.bitk=p,f.avail_in=O,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=m,e.inflate_flush(f,c)}}},e.free=function(f){e.reset(f,null),e.win=null,b=null},e.set_dictionary=function(f,c,u){e.win.set(f.subarray(c,c+u),0),e.read=e.write=u},e.sync_point=function(){return n==tt?1:0}}const Fr=32,Mr=8,vr=0,sn=1,rn=2,an=3,on=4,cn=5,nt=6,Se=7,ln=12,oe=13,Ur=[0,0,255,255];function Wr(){const s=this;s.mode=0,s.method=0,s.was=[0],s.need=0,s.marker=0,s.wbits=0;function t(e){return!e||!e.istate?X:(e.total_in=e.total_out=0,e.msg=null,e.istate.mode=Se,e.istate.blocks.reset(e,null),M)}s.inflateEnd=function(e){return s.blocks&&s.blocks.free(e),s.blocks=null,M},s.inflateInit=function(e,n){return e.msg=null,s.blocks=null,n<8||n>15?(s.inflateEnd(e),X):(s.wbits=n,e.istate.blocks=new Lr(e,1<<n),t(e),M)},s.inflate=function(e,n){let r,i;if(!e||!e.istate||!e.next_in)return X;const a=e.istate;for(n=n==Sr?re:M,r=re;;)switch(a.mode){case vr:if(e.avail_in===0)return r;if(r=n,e.avail_in--,e.total_in++,((a.method=e.read_byte(e.next_in_index++))&15)!=Mr){a.mode=oe,e.msg="unknown compression method",a.marker=5;break}if((a.method>>4)+8>a.wbits){a.mode=oe,e.msg="invalid win size",a.marker=5;break}a.mode=sn;case sn:if(e.avail_in===0)return r;if(r=n,e.avail_in--,e.total_in++,i=e.read_byte(e.next_in_index++)&255,((a.method<<8)+i)%31!==0){a.mode=oe,e.msg="incorrect header check",a.marker=5;break}if((i&Fr)===0){a.mode=Se;break}a.mode=rn;case rn:if(e.avail_in===0)return r;r=n,e.avail_in--,e.total_in++,a.need=(e.read_byte(e.next_in_index++)&255)<<24&4278190080,a.mode=an;case an:if(e.avail_in===0)return r;r=n,e.avail_in--,e.total_in++,a.need+=(e.read_byte(e.next_in_index++)&255)<<16&16711680,a.mode=on;case on:if(e.avail_in===0)return r;r=n,e.avail_in--,e.total_in++,a.need+=(e.read_byte(e.next_in_index++)&255)<<8&65280,a.mode=cn;case cn:return e.avail_in===0?r:(r=n,e.avail_in--,e.total_in++,a.need+=e.read_byte(e.next_in_index++)&255,a.mode=nt,xr);case nt:return a.mode=oe,e.msg="need dictionary",a.marker=0,X;case Se:if(r=a.blocks.proc(e,r),r==B){a.mode=oe,a.marker=0;break}if(r==M&&(r=n),r!=se)return r;r=n,a.blocks.reset(e,a.was),a.mode=ln;case ln:return e.avail_in=0,se;case oe:return B;default:return X}},s.inflateSetDictionary=function(e,n,r){let i=0,a=r;if(!e||!e.istate||e.istate.mode!=nt)return X;const o=e.istate;return a>=1<<o.wbits&&(a=(1<<o.wbits)-1,i=r-a),o.blocks.set_dictionary(n,i,a),o.mode=Se,M},s.inflateSync=function(e){let n,r,i,a,o;if(!e||!e.istate)return X;const l=e.istate;if(l.mode!=oe&&(l.mode=oe,l.marker=0),(n=e.avail_in)===0)return re;for(r=e.next_in_index,i=l.marker;n!==0&&i<4;)e.read_byte(r)==Ur[i]?i++:e.read_byte(r)!==0?i=0:i=4-i,r++,n--;return e.total_in+=r-e.next_in_index,e.next_in_index=r,e.avail_in=n,l.marker=i,i!=4?B:(a=e.total_in,o=e.total_out,t(e),e.total_in=a,e.total_out=o,l.mode=Se,M)},s.inflateSyncPoint=function(e){return!e||!e.istate||!e.istate.blocks?X:e.istate.blocks.sync_point()}}function qn(){}qn.prototype={inflateInit(s){const t=this;return t.istate=new Wr,s||(s=Er),t.istate.inflateInit(t,s)},inflate(s){const t=this;return t.istate?t.istate.inflate(t,s):X},inflateEnd(){const s=this;if(!s.istate)return X;const t=s.istate.inflateEnd(s);return s.istate=null,t},inflateSync(){const s=this;return s.istate?s.istate.inflateSync(s):X},inflateSetDictionary(s,t){const e=this;return e.istate?e.istate.inflateSetDictionary(e,s,t):X},read_byte(s){return this.next_in[s]},read_buf(s,t){return this.next_in.subarray(s,s+t)}};function Hr(s){const t=this,e=new qn,n=s&&s.chunkSize?Math.floor(s.chunkSize*2):128*1024,r=Tr,i=new Uint8Array(n);let a=!1;e.inflateInit(),e.next_out=i,t.append=function(o,l){const _=[];let d,g,b=0,A=0,T=0;if(o.length!==0){e.next_in_index=0,e.next_in=o,e.avail_in=o.length;do{if(e.next_out_index=0,e.avail_out=n,e.avail_in===0&&!a&&(e.next_in_index=0,a=!0),d=e.inflate(r),a&&d===re){if(e.avail_in!==0)throw new Error("inflating: bad input")}else if(d!==M&&d!==se)throw new Error("inflating: "+e.msg);if((a||d===se)&&e.avail_in===o.length)throw new Error("inflating: bad input");e.next_out_index&&(e.next_out_index===n?_.push(new Uint8Array(i)):_.push(i.subarray(0,e.next_out_index))),T+=e.next_out_index,l&&e.next_in_index>0&&e.next_in_index!=b&&(l(e.next_in_index),b=e.next_in_index)}while(e.avail_in>0||e.avail_out===0);return _.length>1?(g=new Uint8Array(T),_.forEach(function(f){g.set(f,A),A+=f.length})):g=_[0]?new Uint8Array(_[0]):new Uint8Array,g}},t.flush=function(){e.inflateEnd()}}const me=4294967295,fe=65535,Br=8,jr=0,Gr=99,Yr=67324752,Vn=134695760,qr=Vn,fn=33639248,Vr=101010256,un=101075792,Zr=117853008,ne=22,st=20,rt=56,Kr=12,Xr=20,dn=4,$r=1,Jr=39169,Qr=10,zr=1,ei=21589,ti=28789,ni=25461,si=6534,_n=1,ri=6,hn=8,pn=2048,mn=16,ii=61440,ai=16384,oi=73,wn="/",it=30,ci=10,li=14,fi=18,G=void 0,_e="undefined",ke="function";class gn{constructor(t){return class extends TransformStream{constructor(e,n){const r=new t(n);super({transform(i,a){a.enqueue(r.append(i))},flush(i){const a=r.flush();a&&i.enqueue(a)}})}}}}const ui=64;let Zn=2;try{typeof navigator!=_e&&navigator.hardwareConcurrency&&(Zn=navigator.hardwareConcurrency)}catch{}const di={chunkSize:512*1024,maxWorkers:Zn,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:G,CompressionStreamNative:typeof CompressionStream!=_e&&CompressionStream,DecompressionStreamNative:typeof DecompressionStream!=_e&&DecompressionStream},ue=Object.assign({},di);function Kn(){return ue}function _i(s){return Math.max(s.chunkSize,ui)}function Xn(s){const{baseURL:t,chunkSize:e,maxWorkers:n,terminateWorkerTimeout:r,useCompressionStream:i,useWebWorkers:a,Deflate:o,Inflate:l,CompressionStream:_,DecompressionStream:d,workerScripts:g}=s;if(ce("baseURL",t),ce("chunkSize",e),ce("maxWorkers",n),ce("terminateWorkerTimeout",r),ce("useCompressionStream",i),ce("useWebWorkers",a),o&&(ue.CompressionStream=new gn(o)),l&&(ue.DecompressionStream=new gn(l)),ce("CompressionStream",_),ce("DecompressionStream",d),g!==G){const{deflate:b,inflate:A}=g;if((b||A)&&(ue.workerScripts||(ue.workerScripts={})),b){if(!Array.isArray(b))throw new Error("workerScripts.deflate must be an array");ue.workerScripts.deflate=b}if(A){if(!Array.isArray(A))throw new Error("workerScripts.inflate must be an array");ue.workerScripts.inflate=A}}}function ce(s,t){t!==G&&(ue[s]=t)}function hi(){return"application/octet-stream"}const $n=[];for(let s=0;s<256;s++){let t=s;for(let e=0;e<8;e++)t&1?t=t>>>1^3988292384:t=t>>>1;$n[s]=t}class Ze{constructor(t){this.crc=t||-1}append(t){let e=this.crc|0;for(let n=0,r=t.length|0;n<r;n++)e=e>>>8^$n[(e^t[n])&255];this.crc=e}get(){return~this.crc}}class Jn extends TransformStream{constructor(){let t;const e=new Ze;super({transform(n,r){e.append(n),r.enqueue(n)},flush(){const n=new Uint8Array(4);new DataView(n.buffer).setUint32(0,e.get()),t.value=n}}),t=this}}function pi(s){if(typeof TextEncoder==_e){s=unescape(encodeURIComponent(s));const t=new Uint8Array(s.length);for(let e=0;e<t.length;e++)t[e]=s.charCodeAt(e);return t}else return new TextEncoder().encode(s)}const K={concat(s,t){if(s.length===0||t.length===0)return s.concat(t);const e=s[s.length-1],n=K.getPartial(e);return n===32?s.concat(t):K._shiftRight(t,n,e|0,s.slice(0,s.length-1))},bitLength(s){const t=s.length;if(t===0)return 0;const e=s[t-1];return(t-1)*32+K.getPartial(e)},clamp(s,t){if(s.length*32<t)return s;s=s.slice(0,Math.ceil(t/32));const e=s.length;return t=t&31,e>0&&t&&(s[e-1]=K.partial(t,s[e-1]&2147483648>>t-1,1)),s},partial(s,t,e){return s===32?t:(e?t|0:t<<32-s)+s*1099511627776},getPartial(s){return Math.round(s/1099511627776)||32},_shiftRight(s,t,e,n){for(n===void 0&&(n=[]);t>=32;t-=32)n.push(e),e=0;if(t===0)return n.concat(s);for(let a=0;a<s.length;a++)n.push(e|s[a]>>>t),e=s[a]<<32-t;const r=s.length?s[s.length-1]:0,i=K.getPartial(r);return n.push(K.partial(t+i&31,t+i>32?e:n.pop(),1)),n}},Ke={bytes:{fromBits(s){const e=K.bitLength(s)/8,n=new Uint8Array(e);let r;for(let i=0;i<e;i++)(i&3)===0&&(r=s[i/4]),n[i]=r>>>24,r<<=8;return n},toBits(s){const t=[];let e,n=0;for(e=0;e<s.length;e++)n=n<<8|s[e],(e&3)===3&&(t.push(n),n=0);return e&3&&t.push(K.partial(8*(e&3),n)),t}}},Qn={};Qn.sha1=class{constructor(s){const t=this;t.blockSize=512,t._init=[1732584193,4023233417,2562383102,271733878,3285377520],t._key=[1518500249,1859775393,2400959708,3395469782],s?(t._h=s._h.slice(0),t._buffer=s._buffer.slice(0),t._length=s._length):t.reset()}reset(){const s=this;return s._h=s._init.slice(0),s._buffer=[],s._length=0,s}update(s){const t=this;typeof s=="string"&&(s=Ke.utf8String.toBits(s));const e=t._buffer=K.concat(t._buffer,s),n=t._length,r=t._length=n+K.bitLength(s);if(r>9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const i=new Uint32Array(e);let a=0;for(let o=t.blockSize+n-(t.blockSize+n&t.blockSize-1);o<=r;o+=t.blockSize)t._block(i.subarray(16*a,16*(a+1))),a+=1;return e.splice(0,16*a),t}finalize(){const s=this;let t=s._buffer;const e=s._h;t=K.concat(t,[K.partial(1,1)]);for(let n=t.length+2;n&15;n++)t.push(0);for(t.push(Math.floor(s._length/4294967296)),t.push(s._length|0);t.length;)s._block(t.splice(0,16));return s.reset(),e}_f(s,t,e,n){if(s<=19)return t&e|~t&n;if(s<=39)return t^e^n;if(s<=59)return t&e|t&n|e&n;if(s<=79)return t^e^n}_S(s,t){return t<<s|t>>>32-s}_block(s){const t=this,e=t._h,n=Array(80);for(let _=0;_<16;_++)n[_]=s[_];let r=e[0],i=e[1],a=e[2],o=e[3],l=e[4];for(let _=0;_<=79;_++){_>=16&&(n[_]=t._S(1,n[_-3]^n[_-8]^n[_-14]^n[_-16]));const d=t._S(5,r)+t._f(_,i,a,o)+l+n[_]+t._key[Math.floor(_/20)]|0;l=o,o=a,a=t._S(30,i),i=r,r=d}e[0]=e[0]+r|0,e[1]=e[1]+i|0,e[2]=e[2]+a|0,e[3]=e[3]+o|0,e[4]=e[4]+l|0}};const zn={};zn.aes=class{constructor(s){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const e=t._tables[0][4],n=t._tables[1],r=s.length;let i,a,o,l=1;if(r!==4&&r!==6&&r!==8)throw new Error("invalid aes key size");for(t._key=[a=s.slice(0),o=[]],i=r;i<4*r+28;i++){let _=a[i-1];(i%r===0||r===8&&i%r===4)&&(_=e[_>>>24]<<24^e[_>>16&255]<<16^e[_>>8&255]<<8^e[_&255],i%r===0&&(_=_<<8^_>>>24^l<<24,l=l<<1^(l>>7)*283)),a[i]=a[i-r]^_}for(let _=0;i;_++,i--){const d=a[_&3?i:i-4];i<=4||_<4?o[_]=d:o[_]=n[0][e[d>>>24]]^n[1][e[d>>16&255]]^n[2][e[d>>8&255]]^n[3][e[d&255]]}}encrypt(s){return this._crypt(s,0)}decrypt(s){return this._crypt(s,1)}_precompute(){const s=this._tables[0],t=this._tables[1],e=s[4],n=t[4],r=[],i=[];let a,o,l,_;for(let d=0;d<256;d++)i[(r[d]=d<<1^(d>>7)*283)^d]=d;for(let d=a=0;!e[d];d^=o||1,a=i[a]||1){let g=a^a<<1^a<<2^a<<3^a<<4;g=g>>8^g&255^99,e[d]=g,n[g]=d,_=r[l=r[o=r[d]]];let b=_*16843009^l*65537^o*257^d*16843008,A=r[g]*257^g*16843008;for(let T=0;T<4;T++)s[T][d]=A=A<<24^A>>>8,t[T][g]=b=b<<24^b>>>8}for(let d=0;d<5;d++)s[d]=s[d].slice(0),t[d]=t[d].slice(0)}_crypt(s,t){if(s.length!==4)throw new Error("invalid aes block size");const e=this._key[t],n=e.length/4-2,r=[0,0,0,0],i=this._tables[t],a=i[0],o=i[1],l=i[2],_=i[3],d=i[4];let g=s[0]^e[0],b=s[t?3:1]^e[1],A=s[2]^e[2],T=s[t?1:3]^e[3],f=4,c,u,h;for(let p=0;p<n;p++)c=a[g>>>24]^o[b>>16&255]^l[A>>8&255]^_[T&255]^e[f],u=a[b>>>24]^o[A>>16&255]^l[T>>8&255]^_[g&255]^e[f+1],h=a[A>>>24]^o[T>>16&255]^l[g>>8&255]^_[b&255]^e[f+2],T=a[T>>>24]^o[g>>16&255]^l[b>>8&255]^_[A&255]^e[f+3],f+=4,g=c,b=u,A=h;for(let p=0;p<4;p++)r[t?3&-p:p]=d[g>>>24]<<24^d[b>>16&255]<<16^d[A>>8&255]<<8^d[T&255]^e[f++],c=g,g=b,b=A,A=T,T=c;return r}};const mi={getRandomValues(s){const t=new Uint32Array(s.buffer),e=n=>{let r=987654321;const i=4294967295;return function(){return r=36969*(r&65535)+(r>>16)&i,n=18e3*(n&65535)+(n>>16)&i,(((r<<16)+n&i)/4294967296+.5)*(Math.random()>.5?1:-1)}};for(let n=0,r;n<s.length;n+=4){const i=e((r||Math.random())*4294967296);r=i()*987654071,t[n/4]=i()*4294967296|0}return s}},es={};es.ctrGladman=class{constructor(s,t){this._prf=s,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(s){return this.calculate(this._prf,s,this._iv)}incWord(s){if((s>>24&255)===255){let t=s>>16&255,e=s>>8&255,n=s&255;t===255?(t=0,e===255?(e=0,n===255?n=0:++n):++e):++t,s=0,s+=t<<16,s+=e<<8,s+=n}else s+=1<<24;return s}incCounter(s){(s[0]=this.incWord(s[0]))===0&&(s[1]=this.incWord(s[1]))}calculate(s,t,e){let n;if(!(n=t.length))return[];const r=K.bitLength(t);for(let i=0;i<n;i+=4){this.incCounter(e);const a=s.encrypt(e);t[i]^=a[0],t[i+1]^=a[1],t[i+2]^=a[2],t[i+3]^=a[3]}return K.clamp(t,r)}};const we={importKey(s){return new we.hmacSha1(Ke.bytes.toBits(s))},pbkdf2(s,t,e,n){if(e=e||1e4,n<0||e<0)throw new Error("invalid params to pbkdf2");const r=(n>>5)+1<<2;let i,a,o,l,_;const d=new ArrayBuffer(r),g=new DataView(d);let b=0;const A=K;for(t=Ke.bytes.toBits(t),_=1;b<(r||1);_++){for(i=a=s.encrypt(A.concat(t,[_])),o=1;o<e;o++)for(a=s.encrypt(a),l=0;l<a.length;l++)i[l]^=a[l];for(o=0;b<(r||1)&&o<i.length;o++)g.setInt32(b,i[o]),b+=4}return d.slice(0,n/8)}};we.hmacSha1=class{constructor(s){const t=this,e=t._hash=Qn.sha1,n=[[],[]];t._baseHash=[new e,new e];const r=t._baseHash[0].blockSize/32;s.length>r&&(s=new e().update(s).finalize());for(let i=0;i<r;i++)n[0][i]=s[i]^909522486,n[1][i]=s[i]^1549556828;t._baseHash[0].update(n[0]),t._baseHash[1].update(n[1]),t._resultHash=new e(t._baseHash[0])}reset(){const s=this;s._resultHash=new s._hash(s._baseHash[0]),s._updated=!1}update(s){const t=this;t._updated=!0,t._resultHash.update(s)}digest(){const s=this,t=s._resultHash.finalize(),e=new s._hash(s._baseHash[1]).update(t).finalize();return s.reset(),e}encrypt(s){if(this._updated)throw new Error("encrypt on already updated hmac called!");return this.update(s),this.digest(s)}};const wi=typeof crypto!=_e&&typeof crypto.getRandomValues==ke,Et="Invalid password",xt="Invalid signature",Tt="zipjs-abort-check-password";function ts(s){return wi?crypto.getRandomValues(s):mi.getRandomValues(s)}const be=16,gi="raw",ns={name:"PBKDF2"},bi={name:"HMAC"},yi="SHA-1",Ei=Object.assign({hash:bi},ns),dt=Object.assign({iterations:1e3,hash:{name:yi}},ns),xi=["deriveBits"],Ie=[8,12,16],Re=[16,24,32],le=10,Ti=[0,0,0,0],Je=typeof crypto!=_e,Le=Je&&crypto.subtle,ss=Je&&typeof Le!=_e,ee=Ke.bytes,Si=zn.aes,Ri=es.ctrGladman,Ai=we.hmacSha1;let bn=Je&&ss&&typeof Le.importKey==ke,yn=Je&&ss&&typeof Le.deriveBits==ke;class Oi extends TransformStream{constructor({password:t,rawPassword:e,signed:n,encryptionStrength:r,checkPasswordOnly:i}){super({start(){Object.assign(this,{ready:new Promise(a=>this.resolveReady=a),password:as(t,e),signed:n,strength:r-1,pending:new Uint8Array})},async transform(a,o){const l=this,{password:_,strength:d,resolveReady:g,ready:b}=l;_?(await Ci(l,d,_,J(a,0,Ie[d]+2)),a=J(a,Ie[d]+2),i?o.error(new Error(Tt)):g()):await b;const A=new Uint8Array(a.length-le-(a.length-le)%be);o.enqueue(rs(l,a,A,0,le,!0))},async flush(a){const{signed:o,ctr:l,hmac:_,pending:d,ready:g}=this;if(_&&l){await g;const b=J(d,0,d.length-le),A=J(d,d.length-le);let T=new Uint8Array;if(b.length){const f=Ne(ee,b);_.update(f);const c=l.update(f);T=Ce(ee,c)}if(o){const f=J(Ce(ee,_.digest()),0,le);for(let c=0;c<le;c++)if(f[c]!=A[c])throw new Error(xt)}a.enqueue(T)}}})}}class Ii extends TransformStream{constructor({password:t,rawPassword:e,encryptionStrength:n}){let r;super({start(){Object.assign(this,{ready:new Promise(i=>this.resolveReady=i),password:as(t,e),strength:n-1,pending:new Uint8Array})},async transform(i,a){const o=this,{password:l,strength:_,resolveReady:d,ready:g}=o;let b=new Uint8Array;l?(b=await Ni(o,_,l),d()):await g;const A=new Uint8Array(b.length+i.length-i.length%be);A.set(b,0),a.enqueue(rs(o,i,A,b.length,0))},async flush(i){const{ctr:a,hmac:o,pending:l,ready:_}=this;if(o&&a){await _;let d=new Uint8Array;if(l.length){const g=a.update(Ne(ee,l));o.update(g),d=Ce(ee,g)}r.signature=Ce(ee,o.digest()).slice(0,le),i.enqueue(St(d,r.signature))}}}),r=this}}function rs(s,t,e,n,r,i){const{ctr:a,hmac:o,pending:l}=s,_=t.length-r;l.length&&(t=St(l,t),e=ki(e,_-_%be));let d;for(d=0;d<=_-be;d+=be){const g=Ne(ee,J(t,d,d+be));i&&o.update(g);const b=a.update(g);i||o.update(b),e.set(Ce(ee,b),d+n)}return s.pending=J(t,d),e}async function Ci(s,t,e,n){const r=await is(s,t,e,J(n,0,Ie[t])),i=J(n,Ie[t]);if(r[0]!=i[0]||r[1]!=i[1])throw new Error(Et)}async function Ni(s,t,e){const n=ts(new Uint8Array(Ie[t])),r=await is(s,t,e,n);return St(n,r)}async function is(s,t,e,n){s.password=null;const r=await Di(gi,e,Ei,!1,xi),i=await Pi(Object.assign({salt:n},dt),r,8*(Re[t]*2+2)),a=new Uint8Array(i),o=Ne(ee,J(a,0,Re[t])),l=Ne(ee,J(a,Re[t],Re[t]*2)),_=J(a,Re[t]*2);return Object.assign(s,{keys:{key:o,authentication:l,passwordVerification:_},ctr:new Ri(new Si(o),Array.from(Ti)),hmac:new Ai(l)}),_}async function Di(s,t,e,n,r){if(bn)try{return await Le.importKey(s,t,e,n,r)}catch{return bn=!1,we.importKey(t)}else return we.importKey(t)}async function Pi(s,t,e){if(yn)try{return await Le.deriveBits(s,t,e)}catch{return yn=!1,we.pbkdf2(t,s.salt,dt.iterations,e)}else return we.pbkdf2(t,s.salt,dt.iterations,e)}function as(s,t){return t===G?pi(s):t}function St(s,t){let e=s;return s.length+t.length&&(e=new Uint8Array(s.length+t.length),e.set(s,0),e.set(t,s.length)),e}function ki(s,t){if(t&&t>s.length){const e=s;s=new Uint8Array(t),s.set(e,0)}return s}function J(s,t,e){return s.subarray(t,e)}function Ce(s,t){return s.fromBits(t)}function Ne(s,t){return s.toBits(t)}const Oe=12;class Li extends TransformStream{constructor({password:t,passwordVerification:e,checkPasswordOnly:n}){super({start(){Object.assign(this,{password:t,passwordVerification:e}),os(this,t)},transform(r,i){const a=this;if(a.password){const o=En(a,r.subarray(0,Oe));if(a.password=null,o.at(-1)!=a.passwordVerification)throw new Error(Et);r=r.subarray(Oe)}n?i.error(new Error(Tt)):i.enqueue(En(a,r))}})}}class Fi extends TransformStream{constructor({password:t,passwordVerification:e}){super({start(){Object.assign(this,{password:t,passwordVerification:e}),os(this,t)},transform(n,r){const i=this;let a,o;if(i.password){i.password=null;const l=ts(new Uint8Array(Oe));l[Oe-1]=i.passwordVerification,a=new Uint8Array(n.length+l.length),a.set(xn(i,l),0),o=Oe}else a=new Uint8Array(n.length),o=0;a.set(xn(i,n),o),r.enqueue(a)}})}}function En(s,t){const e=new Uint8Array(t.length);for(let n=0;n<t.length;n++)e[n]=cs(s)^t[n],Rt(s,e[n]);return e}function xn(s,t){const e=new Uint8Array(t.length);for(let n=0;n<t.length;n++)e[n]=cs(s)^t[n],Rt(s,t[n]);return e}function os(s,t){const e=[305419896,591751049,878082192];Object.assign(s,{keys:e,crcKey0:new Ze(e[0]),crcKey2:new Ze(e[2])});for(let n=0;n<t.length;n++)Rt(s,t.charCodeAt(n))}function Rt(s,t){let[e,n,r]=s.keys;s.crcKey0.append([t]),e=~s.crcKey0.get(),n=Tn(Math.imul(Tn(n+ls(e)),134775813)+1),s.crcKey2.append([n>>>24]),r=~s.crcKey2.get(),s.keys=[e,n,r]}function cs(s){const t=s.keys[2]|2;return ls(Math.imul(t,t^1)>>>8)}function ls(s){return s&255}function Tn(s){return s&4294967295}const At="Invalid uncompressed size",Sn="deflate-raw";class Mi extends TransformStream{constructor(t,{chunkSize:e,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:i,encrypted:a,useCompressionStream:o,zipCrypto:l,signed:_,level:d}=t,g=this;let b,A,T=super.readable;(!a||l)&&_&&(b=new Jn,T=ie(T,b)),i&&(T=us(T,o,{level:d,chunkSize:e},r,n)),a&&(l?T=ie(T,new Fi(t)):(A=new Ii(t),T=ie(T,A))),fs(g,T,()=>{let f;a&&!l&&(f=A.signature),(!a||l)&&_&&(f=new DataView(b.value.buffer).getUint32(0)),g.signature=f})}}class vi extends TransformStream{constructor(t,{chunkSize:e,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:a,signed:o,signature:l,compressed:_,useCompressionStream:d}=t;let g,b,A=super.readable;a&&(i?A=ie(A,new Li(t)):(b=new Oi(t),A=ie(A,b))),_&&(A=us(A,d,{chunkSize:e},r,n)),(!a||i)&&o&&(g=new Jn,A=ie(A,g)),fs(this,A,()=>{if((!a||i)&&o){const T=new DataView(g.value.buffer);if(l!=T.getUint32(0,!1))throw new Error(xt)}})}}function fs(s,t,e){t=ie(t,new TransformStream({flush:e})),Object.defineProperty(s,"readable",{get(){return t}})}function us(s,t,e,n,r){try{const i=t&&n?n:r;s=ie(s,new i(Sn,e))}catch(i){if(t)s=ie(s,new r(Sn,e));else throw i}return s}function ie(s,t){return s.pipeThrough(t)}const Ui="message",Wi="start",Hi="pull",Rn="data",Bi="ack",An="close",ji="deflate",ds="inflate";class Gi extends TransformStream{constructor(t,e){super({});const n=this,{codecType:r}=t;let i;r.startsWith(ji)?i=Mi:r.startsWith(ds)&&(i=vi),n.outputSize=0;let a=0;const o=new i(t,e),l=super.readable,_=new TransformStream({transform(g,b){g&&g.length&&(a+=g.length,b.enqueue(g))},flush(){Object.assign(n,{inputSize:a})}}),d=new TransformStream({transform(g,b){if(g&&g.length&&(b.enqueue(g),n.outputSize+=g.length,t.outputSize&&n.outputSize>t.outputSize))throw new Error(At)},flush(){const{signature:g}=o;Object.assign(n,{signature:g,inputSize:a})}});Object.defineProperty(n,"readable",{get(){return l.pipeThrough(_).pipeThrough(o).pipeThrough(d)}})}}class Yi extends TransformStream{constructor(t){let e;super({transform:n,flush(r){e&&e.length&&r.enqueue(e)}});function n(r,i){if(e){const a=new Uint8Array(e.length+r.length);a.set(e),a.set(r,e.length),r=a,e=null}r.length>t?(i.enqueue(r.slice(0,t)),n(r.slice(t),i)):e=r}}}let _s=typeof Worker!=_e;class at{constructor(t,{readable:e,writable:n},{options:r,config:i,streamOptions:a,useWebWorkers:o,transferStreams:l,scripts:_},d){const{signal:g}=a;return Object.assign(t,{busy:!0,readable:e.pipeThrough(new Yi(i.chunkSize)).pipeThrough(new qi(a),{signal:g}),writable:n,options:Object.assign({},r),scripts:_,transferStreams:l,terminate(){return new Promise(b=>{const{worker:A,busy:T}=t;A?(T?t.resolveTerminated=b:(A.terminate(),b()),t.interface=null):b()})},onTaskFinished(){const{resolveTerminated:b}=t;b&&(t.resolveTerminated=null,t.terminated=!0,t.worker.terminate(),b()),t.busy=!1,d(t)}}),(o&&_s?Vi:hs)(t,i)}}class qi extends TransformStream{constructor({onstart:t,onprogress:e,size:n,onend:r}){let i=0;super({async start(){t&&await ot(t,n)},async transform(a,o){i+=a.length,e&&await ot(e,i,n),o.enqueue(a)},async flush(){r&&await ot(r,i)}})}}async function ot(s,...t){try{await s(...t)}catch{}}function hs(s,t){return{run:()=>Zi(s,t)}}function Vi(s,t){const{baseURL:e,chunkSize:n}=t;if(!s.interface){let r;try{r=$i(s.scripts[0],e,s)}catch{return _s=!1,hs(s,t)}Object.assign(s,{worker:r,interface:{run:()=>Ki(s,{chunkSize:n})}})}return s.interface}async function Zi({options:s,readable:t,writable:e,onTaskFinished:n},r){let i;try{i=new Gi(s,r),await t.pipeThrough(i).pipeTo(e,{preventClose:!0,preventAbort:!0});const{signature:a,inputSize:o,outputSize:l}=i;return{signature:a,inputSize:o,outputSize:l}}catch(a){throw i&&(a.outputSize=i.outputSize),a}finally{n()}}async function Ki(s,t){let e,n;const r=new Promise((b,A)=>{e=b,n=A});Object.assign(s,{reader:null,writer:null,resolveResult:e,rejectResult:n,result:r});const{readable:i,options:a,scripts:o}=s,{writable:l,closed:_}=Xi(s.writable),d=Ye({type:Wi,scripts:o.slice(1),options:a,config:t,readable:i,writable:l},s);d||Object.assign(s,{reader:i.getReader(),writer:l.getWriter()});const g=await r;return d||await l.getWriter().close(),await _,g}function Xi(s){let t;const e=new Promise(r=>t=r);return{writable:new WritableStream({async write(r){const i=s.getWriter();await i.ready,await i.write(r),i.releaseLock()},close(){t()},abort(r){return s.getWriter().abort(r)}}),closed:e}}let On=!0,In=!0;function $i(s,t,e){const n={type:"module"};let r,i;typeof s==ke&&(s=s());try{r=new URL(s,t)}catch{r=s}if(On)try{i=new Worker(r)}catch{On=!1,i=new Worker(r,n)}else i=new Worker(r,n);return i.addEventListener(Ui,a=>Ji(a,e)),i}function Ye(s,{worker:t,writer:e,onTaskFinished:n,transferStreams:r}){try{const{value:i,readable:a,writable:o}=s,l=[];if(i&&(i.byteLength<i.buffer.byteLength?s.value=i.buffer.slice(0,i.byteLength):s.value=i.buffer,l.push(s.value)),r&&In?(a&&l.push(a),o&&l.push(o)):s.readable=s.writable=null,l.length)try{return t.postMessage(s,l),!0}catch{In=!1,s.readable=s.writable=null,t.postMessage(s)}else t.postMessage(s)}catch(i){throw e&&e.releaseLock(),n(),i}}async function Ji({data:s},t){const{type:e,value:n,messageId:r,result:i,error:a}=s,{reader:o,writer:l,resolveResult:_,rejectResult:d,onTaskFinished:g}=t;try{if(a){const{message:A,stack:T,code:f,name:c,outputSize:u}=a,h=new Error(A);Object.assign(h,{stack:T,code:f,name:c,outputSize:u}),b(h)}else{if(e==Hi){const{value:A,done:T}=await o.read();Ye({type:Rn,value:A,done:T,messageId:r},t)}e==Rn&&(await l.ready,await l.write(new Uint8Array(n)),Ye({type:Bi,messageId:r},t)),e==An&&b(null,i)}}catch(A){Ye({type:An,messageId:r},t),b(A)}function b(A,T){A?d(A):_(T),l&&l.releaseLock(),g()}}let de=[];const ct=[];let Cn=0;async function Qi(s,t){const{options:e,config:n}=t,{transferStreams:r,useWebWorkers:i,useCompressionStream:a,codecType:o,compressed:l,signed:_,encrypted:d}=e,{workerScripts:g,maxWorkers:b}=n;t.transferStreams=r||r===G;const A=!l&&!_&&!d&&!t.transferStreams;return t.useWebWorkers=!A&&(i||i===G&&n.useWebWorkers),t.scripts=t.useWebWorkers&&g?g[o]:[],e.useCompressionStream=a||a===G&&n.useCompressionStream,(await T()).run();async function T(){const c=de.find(u=>!u.busy);if(c)return _t(c),new at(c,s,t,f);if(de.length<b){const u={indexWorker:Cn};return Cn++,de.push(u),new at(u,s,t,f)}else return new Promise(u=>ct.push({resolve:u,stream:s,workerOptions:t}))}function f(c){if(ct.length){const[{resolve:u,stream:h,workerOptions:p}]=ct.splice(0,1);u(new at(c,h,p,f))}else c.worker?(_t(c),zi(c,t)):de=de.filter(u=>u!=c)}}function zi(s,t){const{config:e}=t,{terminateWorkerTimeout:n}=e;Number.isFinite(n)&&n>=0&&(s.terminated?s.terminated=!1:s.terminateTimeout=setTimeout(async()=>{de=de.filter(r=>r!=s);try{await s.terminate()}catch{}},n))}function _t(s){const{terminateTimeout:t}=s;t&&(clearTimeout(t),s.terminateTimeout=null)}async function ea(){await Promise.allSettled(de.map(s=>(_t(s),s.terminate())))}const ps="HTTP error ",Fe="HTTP Range not supported",ms="Writer iterator completed too soon",ws="Writer not initialized",ta="text/plain",na="Content-Length",sa="Content-Range",ra="Accept-Ranges",ia="Range",aa="Content-Type",oa="HEAD",Ot="GET",gs="bytes",ca=64*1024,It="writable";class Qe{constructor(){this.size=0}init(){this.initialized=!0}}class he extends Qe{get readable(){const t=this,{chunkSize:e=ca}=t,n=new ReadableStream({start(){this.chunkOffset=0},async pull(r){const{offset:i=0,size:a,diskNumberStart:o}=n,{chunkOffset:l}=this,_=a===G?e:Math.min(e,a-l),d=await Y(t,i+l,_,o);r.enqueue(d),l+e>a||a===G&&!d.length&&_?r.close():this.chunkOffset+=e}});return n}}class Ct extends Qe{constructor(){super();const t=this,e=new WritableStream({write(n){if(!t.initialized)throw new Error(ws);return t.writeUint8Array(n)}});Object.defineProperty(t,It,{get(){return e}})}writeUint8Array(){}}class la extends he{constructor(t){super();let e=t.length;for(;t.charAt(e-1)=="=";)e--;const n=t.indexOf(",")+1;Object.assign(this,{dataURI:t,dataStart:n,size:Math.floor((e-n)*.75)})}readUint8Array(t,e){const{dataStart:n,dataURI:r}=this,i=new Uint8Array(e),a=Math.floor(t/3)*4,o=atob(r.substring(a+n,Math.ceil((t+e)/3)*4+n)),l=t-Math.floor(a/4)*3;let _=0;for(let d=l;d<l+e&&d<o.length;d++)i[d-l]=o.charCodeAt(d),_++;return _<i.length?i.subarray(0,_):i}}class fa extends Ct{constructor(t){super(),Object.assign(this,{data:"data:"+(t||"")+";base64,",pending:[]})}writeUint8Array(t){const e=this;let n=0,r=e.pending;const i=e.pending.length;for(e.pending="",n=0;n<Math.floor((i+t.length)/3)*3-i;n++)r+=String.fromCharCode(t[n]);for(;n<t.length;n++)e.pending+=String.fromCharCode(t[n]);r.length&&(r.length>2?e.data+=btoa(r):e.pending+=r)}getData(){return this.data+btoa(this.pending)}}class Nt extends he{constructor(t){super(),Object.assign(this,{blob:t,size:t.size})}async readUint8Array(t,e){const n=this,r=t+e;let a=await(t||r<n.size?n.blob.slice(t,r):n.blob).arrayBuffer();return a.byteLength>e&&(a=a.slice(t,r)),new Uint8Array(a)}}class bs extends Qe{constructor(t){super();const e=this,n=new TransformStream,r=[];t&&r.push([aa,t]),Object.defineProperty(e,It,{get(){return n.writable}}),e.blob=new Response(n.readable,{headers:r}).blob()}getData(){return this.blob}}class ua extends Nt{constructor(t){super(new Blob([t],{type:ta}))}}class da extends bs{constructor(t){super(t),Object.assign(this,{encoding:t,utf8:!t||t.toLowerCase()=="utf-8"})}async getData(){const{encoding:t,utf8:e}=this,n=await super.getData();if(n.text&&e)return n.text();{const r=new FileReader;return new Promise((i,a)=>{Object.assign(r,{onload:({target:o})=>i(o.result),onerror:()=>a(r.error)}),r.readAsText(n,t)})}}}class _a extends he{constructor(t,e){super(),ys(this,t,e)}async init(){await Es(this,ht,Nn),super.init()}readUint8Array(t,e){return xs(this,t,e,ht,Nn)}}class ha extends he{constructor(t,e){super(),ys(this,t,e)}async init(){await Es(this,pt,Dn),super.init()}readUint8Array(t,e){return xs(this,t,e,pt,Dn)}}function ys(s,t,e){const{preventHeadRequest:n,useRangeHeader:r,forceRangeRequests:i,combineSizeEocd:a}=e;e=Object.assign({},e),delete e.preventHeadRequest,delete e.useRangeHeader,delete e.forceRangeRequests,delete e.combineSizeEocd,delete e.useXHR,Object.assign(s,{url:t,options:e,preventHeadRequest:n,useRangeHeader:r,forceRangeRequests:i,combineSizeEocd:a})}async function Es(s,t,e){const{url:n,preventHeadRequest:r,useRangeHeader:i,forceRangeRequests:a,combineSizeEocd:o}=s;if(ga(n)&&(i||a)&&(typeof r>"u"||r)){const l=await t(Ot,s,Ts(s,o?-ne:void 0));if(!a&&l.headers.get(ra)!=gs)throw new Error(Fe);{o&&(s.eocdCache=new Uint8Array(await l.arrayBuffer()));let _;const d=l.headers.get(sa);if(d){const g=d.trim().split(/\s*\/\s*/);if(g.length){const b=g[1];b&&b!="*"&&(_=Number(b))}}_===G?await Pn(s,t,e):s.size=_}}else await Pn(s,t,e)}async function xs(s,t,e,n,r){const{useRangeHeader:i,forceRangeRequests:a,eocdCache:o,size:l,options:_}=s;if(i||a){if(o&&t==l-ne&&e==ne)return o;if(t>=l)return new Uint8Array;{t+e>l&&(e=l-t);const d=await n(Ot,s,Ts(s,t,e));if(d.status!=206)throw new Error(Fe);return new Uint8Array(await d.arrayBuffer())}}else{const{data:d}=s;return d||await r(s,_),new Uint8Array(s.data.subarray(t,t+e))}}function Ts(s,t=0,e=1){return Object.assign({},Dt(s),{[ia]:gs+"="+(t<0?t:t+"-"+(t+e-1))})}function Dt({options:s}){const{headers:t}=s;if(t)return Symbol.iterator in t?Object.fromEntries(t):t}async function Nn(s){await Ss(s,ht)}async function Dn(s){await Ss(s,pt)}async function Ss(s,t){const e=await t(Ot,s,Dt(s));s.data=new Uint8Array(await e.arrayBuffer()),s.size||(s.size=s.data.length)}async function Pn(s,t,e){if(s.preventHeadRequest)await e(s,s.options);else{const r=(await t(oa,s,Dt(s))).headers.get(na);r?s.size=Number(r):await e(s,s.options)}}async function ht(s,{options:t,url:e},n){const r=await fetch(e,Object.assign({},t,{method:s,headers:n}));if(r.status<400)return r;throw r.status==416?new Error(Fe):new Error(ps+(r.statusText||r.status))}function pt(s,{url:t},e){return new Promise((n,r)=>{const i=new XMLHttpRequest;if(i.addEventListener("load",()=>{if(i.status<400){const a=[];i.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach(o=>{const l=o.trim().split(/\s*:\s*/);l[0]=l[0].trim().replace(/^[a-z]|-[a-z]/g,_=>_.toUpperCase()),a.push(l)}),n({status:i.status,arrayBuffer:()=>i.response,headers:new Map(a)})}else r(i.status==416?new Error(Fe):new Error(ps+(i.statusText||i.status)))},!1),i.addEventListener("error",a=>r(a.detail?a.detail.error:new Error("Network error")),!1),i.open(s,t),e)for(const a of Object.entries(e))i.setRequestHeader(a[0],a[1]);i.responseType="arraybuffer",i.send()})}class Rs extends he{constructor(t,e={}){super(),Object.assign(this,{url:t,reader:e.useXHR?new ha(t,e):new _a(t,e)})}set size(t){}get size(){return this.reader.size}async init(){await this.reader.init(),super.init()}readUint8Array(t,e){return this.reader.readUint8Array(t,e)}}class pa extends Rs{constructor(t,e={}){e.useRangeHeader=!0,super(t,e)}}class ma extends he{constructor(t){super(),t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength),Object.assign(this,{array:t,size:t.length})}readUint8Array(t,e){return this.array.slice(t,t+e)}}class wa extends Ct{init(t=0){Object.assign(this,{offset:0,array:new Uint8Array(t)}),super.init()}writeUint8Array(t){const e=this;if(e.offset+t.length>e.array.length){const n=e.array;e.array=new Uint8Array(n.length+t.length),e.array.set(n)}e.array.set(t,e.offset),e.offset+=t.length}getData(){return this.array}}class Pt extends he{constructor(t){super(),this.readers=t}async init(){const t=this,{readers:e}=t;t.lastDiskNumber=0,t.lastDiskOffset=0,await Promise.all(e.map(async(n,r)=>{await n.init(),r!=e.length-1&&(t.lastDiskOffset+=n.size),t.size+=n.size})),super.init()}async readUint8Array(t,e,n=0){const r=this,{readers:i}=this;let a,o=n;o==-1&&(o=i.length-1);let l=t;for(;i[o]&&l>=i[o].size;)l-=i[o].size,o++;const _=i[o];if(_){const d=_.size;if(l+e<=d)a=await Y(_,l,e);else{const g=d-l;a=new Uint8Array(e);const b=await Y(_,l,g);a.set(b,0);const A=await r.readUint8Array(t+g,e-g,n);a.set(A,g),b.length+A.length<e&&(a=a.subarray(0,b.length+A.length))}}else a=new Uint8Array;return r.lastDiskNumber=Math.max(o,r.lastDiskNumber),a}}class Xe extends Qe{constructor(t,e=4294967295){super();const n=this;Object.assign(n,{diskNumber:0,diskOffset:0,size:0,maxSize:e,availableSize:e});let r,i,a;const o=new WritableStream({async write(d){const{availableSize:g}=n;if(a)d.length>=g?(await l(d.subarray(0,g)),await _(),n.diskOffset+=r.size,n.diskNumber++,a=null,await this.write(d.subarray(g))):await l(d);else{const{value:b,done:A}=await t.next();if(A&&!b)throw new Error(ms);r=b,r.size=0,r.maxSize&&(n.maxSize=r.maxSize),n.availableSize=n.maxSize,await De(r),i=b.writable,a=i.getWriter(),await this.write(d)}},async close(){await a.ready,await _()}});Object.defineProperty(n,It,{get(){return o}});async function l(d){const g=d.length;g&&(await a.ready,await a.write(d),r.size+=g,n.size+=g,n.availableSize-=g)}async function _(){await a.close()}}}class As{constructor(t){return Array.isArray(t)&&(t=new Pt(t)),t instanceof ReadableStream&&(t={readable:t}),t}}class Os{constructor(t){return t.writable===G&&typeof t.next==ke&&(t=new Xe(t)),t instanceof WritableStream&&(t={writable:t}),t.size===G&&(t.size=0),t instanceof Xe||Object.assign(t,{diskNumber:0,diskOffset:0,availableSize:1/0,maxSize:1/0}),t}}function ga(s){const{baseURL:t}=Kn(),{protocol:e}=new URL(s,t);return e=="http:"||e=="https:"}async function De(s,t){if(s.init&&!s.initialized)await s.init(t);else return Promise.resolve()}function Y(s,t,e,n){return s.readUint8Array(t,e,n)}const ba=Pt,ya=Xe,Is="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split(""),Ea=Is.length==256;function xa(s){if(Ea){let t="";for(let e=0;e<s.length;e++)t+=Is[s[e]];return t}else return new TextDecoder().decode(s)}function qe(s,t){return t&&t.trim().toLowerCase()=="cp437"?xa(s):new TextDecoder(t).decode(s)}const Cs="filename",Ns="rawFilename",Ds="comment",Ps="rawComment",ks="uncompressedSize",Ls="compressedSize",Fs="offset",mt="diskNumberStart",wt="lastModDate",gt="rawLastModDate",Ms="lastAccessDate",Ta="rawLastAccessDate",vs="creationDate",Sa="rawCreationDate",Ra="internalFileAttribute",Aa="internalFileAttributes",Oa="externalFileAttribute",Ia="externalFileAttributes",Ca="msDosCompatible",Na="zip64",Da="encrypted",Pa="version",ka="versionMadeBy",La="zipCrypto",Fa="directory",Ma="executable",va="compressionMethod",Ua="signature",Wa="extraField",Ha=[Cs,Ns,Ls,ks,wt,gt,Ds,Ps,Ms,vs,Fs,mt,mt,Ra,Aa,Oa,Ia,Ca,Na,Da,Pa,ka,La,Fa,Ma,va,Ua,Wa,"bitFlag","filenameUTF8","commentUTF8","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp"];class kn{constructor(t){Ha.forEach(e=>this[e]=t[e])}}const Ba="filenameEncoding",ja="commentEncoding",Ga="decodeText",Ya="extractPrependedData",qa="extractAppendedData",Va="password",Za="rawPassword",Ka="passThrough",Xa="signal",$a="checkPasswordOnly",Ja="checkOverlappingEntryOnly",Qa="checkOverlappingEntry",za="checkSignature",eo="useWebWorkers",to="useCompressionStream",no="transferStreams",so="preventClose",Ve="File format is not recognized",Us="End of central directory not found",Ws="End of Zip64 central directory locator not found",Hs="Central directory header not found",Bs="Local file header not found",js="Zip64 extra field not found",Gs="File contains encrypted entry",Ys="Encryption method not supported",bt="Compression method not supported",yt="Split zip file",qs="Overlapping entry found",Ln="utf-8",Fn="cp437",ro=[[ks,me],[Ls,me],[Fs,me],[mt,fe]],io={[fe]:{getValue:H,bytes:4},[me]:{getValue:Ee,bytes:8}};class Vs{constructor(t,e={}){Object.assign(this,{reader:new As(t),options:e,config:Kn(),readRanges:[]})}async*getEntriesGenerator(t={}){const e=this;let{reader:n}=e;const{config:r}=e;if(await De(n),(n.size===G||!n.readUint8Array)&&(n=new Nt(await new Response(n.readable).blob()),await De(n)),n.size<ne)throw new Error(Ve);n.chunkSize=_i(r);const i=await ho(n,Vr,n.size,ne,fe*16);if(!i){const w=await Y(n,0,4),S=j(w);throw H(S)==Vn?new Error(yt):new Error(Us)}const a=j(i);let o=H(a,12),l=H(a,16);const _=i.offset,d=q(a,20),g=_+ne+d;let b=q(a,4);const A=n.lastDiskNumber||0;let T=q(a,6),f=q(a,8),c=0,u=0;if(l==me||o==me||f==fe||T==fe){const w=await Y(n,i.offset-st,st),S=j(w);if(H(S,0)==Zr){l=Ee(S,8);let N=await Y(n,l,rt,-1),I=j(N);const D=i.offset-st-rt;if(H(I,0)!=un&&l!=D){const k=l;l=D,l>k&&(c=l-k),N=await Y(n,l,rt,-1),I=j(N)}if(H(I,0)!=un)throw new Error(Ws);b==fe&&(b=H(I,16)),T==fe&&(T=H(I,20)),f==fe&&(f=Ee(I,32)),o==me&&(o=Ee(I,40)),l-=o}}if(l>=n.size&&(c=n.size-l-o-ne,l=n.size-o-ne),A!=b)throw new Error(yt);if(l<0)throw new Error(Ve);let h=0,p=await Y(n,l,o,T),y=j(p);if(o){const w=i.offset-o;if(H(y,h)!=fn&&l!=w){const S=l;l=w,l>S&&(c+=l-S),p=await Y(n,l,o,T),y=j(p)}}const O=i.offset-l-(n.lastDiskOffset||0);if(o!=O&&O>=0&&(o=O,p=await Y(n,l,o,T),y=j(p)),l<0||l>=n.size)throw new Error(Ve);const m=V(e,t,Ba),E=V(e,t,ja);for(let w=0;w<f;w++){const S=new oo(n,r,e.options);if(H(y,h)!=fn)throw new Error(Hs);Zs(S,y,h+6);const N=!!S.bitFlag.languageEncodingFlag,I=h+46,D=I+S.filenameLength,k=D+S.extraFieldLength,C=q(y,h+4),v=C>>8==0,F=C>>8==3,Z=p.subarray(I,D),P=q(y,h+32),Q=k+P,U=p.subarray(k,Q),W=N,Me=N,xe=H(y,h+38),te=v&&(ye(y,h+38)&mn)==mn||F&&(xe>>16&ii)==ai||Z.length&&Z.at(-1)==wn.charCodeAt(0),z=F&&(xe>>16&oi)!=0,Lt=H(y,h+42)+c;Object.assign(S,{versionMadeBy:C,msDosCompatible:v,compressedSize:0,uncompressedSize:0,commentLength:P,directory:te,offset:Lt,diskNumberStart:q(y,h+34),internalFileAttributes:q(y,h+36),externalFileAttributes:xe,rawFilename:Z,filenameUTF8:W,commentUTF8:Me,rawExtraField:p.subarray(D,k),executable:z}),S.internalFileAttribute=S.internalFileAttributes,S.externalFileAttribute=S.externalFileAttributes;const Ft=V(e,t,Ga)||qe,Mt=W?Ln:m||Fn,vt=Me?Ln:E||Fn;let ve=Ft(Z,Mt);ve===G&&(ve=qe(Z,Mt));let ze=Ft(U,vt);ze===G&&(ze=qe(U,vt)),Object.assign(S,{rawComment:U,filename:ve,comment:ze,directory:te||ve.endsWith(wn)}),u=Math.max(Lt,u),Ks(S,S,y,h+6),S.zipCrypto=S.encrypted&&!S.extraFieldAES;const Te=new kn(S);Te.getData=(Ue,We)=>S.getData(Ue,Te,e.readRanges,We),Te.arrayBuffer=async Ue=>{const We=new TransformStream,[Js]=await Promise.all([new Response(We.readable).arrayBuffer(),S.getData(We,Te,e.readRanges,Ue)]);return Js},h=Q;const{onprogress:Ut}=t;if(Ut)try{await Ut(w+1,f,new kn(S))}catch{}yield Te}const R=V(e,t,Ya),x=V(e,t,qa);return R&&(e.prependedData=u>0?await Y(n,0,u):new Uint8Array),e.comment=d?await Y(n,_+ne,d):new Uint8Array,x&&(e.appendedData=g<n.size?await Y(n,g,n.size-g):new Uint8Array),!0}async getEntries(t={}){const e=[];for await(const n of this.getEntriesGenerator(t))e.push(n);return e}async close(){}}class ao{constructor(t={}){const{readable:e,writable:n}=new TransformStream,r=new Vs(e,t).getEntriesGenerator();this.readable=new ReadableStream({async pull(i){const{done:a,value:o}=await r.next();if(a)return i.close();const l={...o,readable:(function(){const{readable:_,writable:d}=new TransformStream;if(o.getData)return o.getData(d),_})()};delete l.getData,i.enqueue(l)}}),this.writable=n}}class oo{constructor(t,e,n){Object.assign(this,{reader:t,config:e,options:n})}async getData(t,e,n,r={}){const i=this,{reader:a,offset:o,diskNumberStart:l,extraFieldAES:_,extraFieldZip64:d,compressionMethod:g,config:b,bitFlag:A,signature:T,rawLastModDate:f,uncompressedSize:c,compressedSize:u}=i,{dataDescriptor:h}=A,p=e.localDirectory={},y=await Y(a,o,it,l),O=j(y);let m=V(i,r,Va),E=V(i,r,Za);const R=V(i,r,Ka);if(m=m&&m.length&&m,E=E&&E.length&&E,_&&_.originalCompressionMethod!=Gr)throw new Error(bt);if(g!=jr&&g!=Br&&!R)throw new Error(bt);if(H(O,0)!=Yr)throw new Error(Bs);Zs(p,O,4);const{extraFieldLength:x,filenameLength:w,lastAccessDate:S,creationDate:N}=p;p.rawExtraField=x?await Y(a,o+it+w,x,l):new Uint8Array,Ks(i,p,O,4,!0),Object.assign(e,{lastAccessDate:S,creationDate:N});const I=i.encrypted&&p.encrypted&&!R,D=I&&!_;if(R||(e.zipCrypto=D),I){if(!D&&_.strength===G)throw new Error(Ys);if(!m&&!E)throw new Error(Gs)}const k=o+it+w+x,C=u,v=a.readable;Object.assign(v,{diskNumberStart:l,offset:k,size:C});const F=V(i,r,Xa),Z=V(i,r,$a);let P=V(i,r,Qa);const Q=V(i,r,Ja);Q&&(P=!0);const{onstart:U,onprogress:W,onend:Me}=r,xe={options:{codecType:ds,password:m,rawPassword:E,zipCrypto:D,encryptionStrength:_&&_.strength,signed:V(i,r,za)&&!R,passwordVerification:D&&(h?f>>>8&255:T>>>24&255),outputSize:c,signature:T,compressed:g!=0&&!R,encrypted:i.encrypted&&!R,useWebWorkers:V(i,r,eo),useCompressionStream:V(i,r,to),transferStreams:V(i,r,no),checkPasswordOnly:Z},config:b,streamOptions:{signal:F,size:C,onstart:U,onprogress:W,onend:Me}};P&&await _o({reader:a,fileEntry:e,offset:o,diskNumberStart:l,signature:T,compressedSize:u,uncompressedSize:c,dataOffset:k,dataDescriptor:h||p.bitFlag.dataDescriptor,extraFieldZip64:d||p.extraFieldZip64,readRanges:n});let te;try{if(!Q){Z&&(t=new WritableStream),t=new Os(t),await De(t,R?u:c),{writable:te}=t;const{outputSize:z}=await Qi({readable:v,writable:te},xe);if(t.size+=z,z!=(R?u:c))throw new Error(At)}}catch(z){if(z.outputSize!==G&&(t.size+=z.outputSize),!Z||z.message!=Tt)throw z}finally{!V(i,r,so)&&te&&!te.locked&&await te.getWriter().close()}return Z||Q?G:t.getData?t.getData():te}}function Zs(s,t,e){const n=s.rawBitFlag=q(t,e+2),r=(n&_n)==_n,i=H(t,e+6);Object.assign(s,{encrypted:r,version:q(t,e),bitFlag:{level:(n&ri)>>1,dataDescriptor:(n&hn)==hn,languageEncodingFlag:(n&pn)==pn},rawLastModDate:i,lastModDate:po(i),filenameLength:q(t,e+22),extraFieldLength:q(t,e+24)})}function Ks(s,t,e,n,r){const{rawExtraField:i}=t,a=t.extraField=new Map,o=j(new Uint8Array(i));let l=0;try{for(;l<i.length;){const u=q(o,l),h=q(o,l+2);a.set(u,{type:u,data:i.slice(l+4,l+4+h)}),l+=4+h}}catch{}const _=q(e,n+4);Object.assign(t,{signature:H(e,n+ci),compressedSize:H(e,n+li),uncompressedSize:H(e,n+fi)});const d=a.get($r);d&&(co(d,t),t.extraFieldZip64=d);const g=a.get(ti);g&&(Mn(g,Cs,Ns,t,s),t.extraFieldUnicodePath=g);const b=a.get(ni);b&&(Mn(b,Ds,Ps,t,s),t.extraFieldUnicodeComment=b);const A=a.get(Jr);A?(lo(A,t,_),t.extraFieldAES=A):t.compressionMethod=_;const T=a.get(Qr);T&&(fo(T,t),t.extraFieldNTFS=T);const f=a.get(ei);f&&(uo(f,t,r),t.extraFieldExtendedTimestamp=f);const c=a.get(si);c&&(t.extraFieldUSDZ=c)}function co(s,t){t.zip64=!0;const e=j(s.data),n=ro.filter(([r,i])=>t[r]==i);for(let r=0,i=0;r<n.length;r++){const[a,o]=n[r];if(t[a]==o){const l=io[o];t[a]=s[a]=l.getValue(e,i),i+=l.bytes}else if(s[a])throw new Error(js)}}function Mn(s,t,e,n,r){const i=j(s.data),a=new Ze;a.append(r[e]);const o=j(new Uint8Array(4));o.setUint32(0,a.get(),!0);const l=H(i,1);Object.assign(s,{version:ye(i,0),[t]:qe(s.data.subarray(5)),valid:!r.bitFlag.languageEncodingFlag&&l==H(o,0)}),s.valid&&(n[t]=s[t],n[t+"UTF8"]=!0)}function lo(s,t,e){const n=j(s.data),r=ye(n,4);Object.assign(s,{vendorVersion:ye(n,0),vendorId:ye(n,2),strength:r,originalCompressionMethod:e,compressionMethod:q(n,5)}),t.compressionMethod=s.compressionMethod}function fo(s,t){const e=j(s.data);let n=4,r;try{for(;n<s.data.length&&!r;){const i=q(e,n),a=q(e,n+2);i==zr&&(r=s.data.slice(n+4,n+4+a)),n+=4+a}}catch{}try{if(r&&r.length==24){const i=j(r),a=i.getBigUint64(0,!0),o=i.getBigUint64(8,!0),l=i.getBigUint64(16,!0);Object.assign(s,{rawLastModDate:a,rawLastAccessDate:o,rawCreationDate:l});const _=lt(a),d=lt(o),g=lt(l),b={lastModDate:_,lastAccessDate:d,creationDate:g};Object.assign(s,b),Object.assign(t,b)}}catch{}}function uo(s,t,e){const n=j(s.data),r=ye(n,0),i=[],a=[];e?((r&1)==1&&(i.push(wt),a.push(gt)),(r&2)==2&&(i.push(Ms),a.push(Ta)),(r&4)==4&&(i.push(vs),a.push(Sa))):s.data.length>=5&&(i.push(wt),a.push(gt));let o=1;i.forEach((l,_)=>{if(s.data.length>=o+4){const d=H(n,o);t[l]=s[l]=new Date(d*1e3);const g=a[_];s[g]=d}o+=4})}async function _o({reader:s,fileEntry:t,offset:e,diskNumberStart:n,signature:r,compressedSize:i,uncompressedSize:a,dataOffset:o,dataDescriptor:l,extraFieldZip64:_,readRanges:d}){let g=0;if(n)for(let T=0;T<n;T++){const f=s.readers[T];g+=f.size}let b=0;if(l&&(_?b=Xr:b=Kr),b){const T=await Y(s,o+i,b+dn,n);if(H(j(T),0)==qr){const c=H(j(T),4);let u,h;_?(u=Ee(j(T),8),h=Ee(j(T),16)):(u=H(j(T),8),h=H(j(T),12)),(t.encrypted&&!t.zipCrypto||c==r)&&u==i&&h==a&&(b+=dn)}}const A={start:g+e,end:g+o+i+b,fileEntry:t};for(const T of d)if(T.fileEntry!=t&&A.start>=T.start&&A.start<T.end){const f=new Error(qs);throw f.overlappingEntry=T.fileEntry,f}d.push(A)}async function ho(s,t,e,n,r){const i=new Uint8Array(4),a=j(i);mo(a,0,t);const o=n+r;return await l(n)||await l(Math.min(o,e));async function l(_){const d=e-_,g=await Y(s,d,_);for(let b=g.length-n;b>=0;b--)if(g[b]==i[0]&&g[b+1]==i[1]&&g[b+2]==i[2]&&g[b+3]==i[3])return{offset:d+b,buffer:g.slice(b,b+n).buffer}}}function V(s,t,e){return t[e]===G?s.options[e]:t[e]}function po(s){const t=(s&4294901760)>>16,e=s&65535;try{return new Date(1980+((t&65024)>>9),((t&480)>>5)-1,t&31,(e&63488)>>11,(e&2016)>>5,(e&31)*2,0)}catch{}}function lt(s){return new Date(Number(s/BigInt(1e4)-BigInt(116444736e5)))}function ye(s,t){return s.getUint8(t)}function q(s,t){return s.getUint16(t,!0)}function H(s,t){return s.getUint32(t,!0)}function Ee(s,t){return Number(s.getBigUint64(t,!0))}function mo(s,t,e){s.setUint32(t,e,!0)}function j(s){return new DataView(s.buffer)}Xn({Inflate:Hr});const wo=Object.freeze(Object.defineProperty({__proto__:null,BlobReader:Nt,BlobWriter:bs,Data64URIReader:la,Data64URIWriter:fa,ERR_BAD_FORMAT:Ve,ERR_CENTRAL_DIRECTORY_NOT_FOUND:Hs,ERR_ENCRYPTED:Gs,ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND:Ws,ERR_EOCDR_NOT_FOUND:Us,ERR_EXTRAFIELD_ZIP64_NOT_FOUND:js,ERR_HTTP_RANGE:Fe,ERR_INVALID_PASSWORD:Et,ERR_INVALID_SIGNATURE:xt,ERR_INVALID_UNCOMPRESSED_SIZE:At,ERR_ITERATOR_COMPLETED_TOO_SOON:ms,ERR_LOCAL_FILE_HEADER_NOT_FOUND:Bs,ERR_OVERLAPPING_ENTRY:qs,ERR_SPLIT_ZIP_FILE:yt,ERR_UNSUPPORTED_COMPRESSION:bt,ERR_UNSUPPORTED_ENCRYPTION:Ys,ERR_WRITER_NOT_INITIALIZED:ws,GenericReader:As,GenericWriter:Os,HttpRangeReader:pa,HttpReader:Rs,Reader:he,SplitDataReader:Pt,SplitDataWriter:Xe,SplitZipReader:ba,SplitZipWriter:ya,TextReader:ua,TextWriter:da,Uint8ArrayReader:ma,Uint8ArrayWriter:wa,Writer:Ct,ZipReader:Vs,ZipReaderStream:ao,configure:Xn,getMimeType:hi,initStream:De,readUint8Array:Y,terminateWorkers:ea},Symbol.toStringTag,{value:"Module"})),Ae=wo;class go{constructor(t,e){L(this,"_zipReader");L(this,"_entriesPromise");L(this,"_traceURL");this._traceURL=t,Ae.configure({baseURL:self.location.href}),this._zipReader=new Ae.ZipReader(new Ae.HttpReader(this._resolveTraceURL(t),{mode:"cors",preventHeadRequest:!0}),{useWebWorkers:!1}),this._entriesPromise=this._zipReader.getEntries({onprogress:e}).then(n=>{const r=new Map;for(const i of n)r.set(i.filename,i);return r})}_resolveTraceURL(t){let e;return t.startsWith("http")||t.startsWith("blob")?(e=t,e.startsWith("https://www.dropbox.com/")&&(e="https://dl.dropboxusercontent.com/"+e.substring(24))):e=kt(t),e}isLive(){return!1}traceURL(){return this._traceURL}async entryNames(){return[...(await this._entriesPromise).keys()]}async hasEntry(t){return(await this._entriesPromise).has(t)}async readText(t){var i;const n=(await this._entriesPromise).get(t);if(!n)return;const r=new Ae.TextWriter;return await((i=n.getData)==null?void 0:i.call(n,r)),r.getData()}async readBlob(t){const n=(await this._entriesPromise).get(t);if(!n)return;const r=new Ae.BlobWriter;return await n.getData(r),r.getData()}}class bo{constructor(t){L(this,"_entriesPromise");L(this,"_path");this._path=t,this._entriesPromise=this._readFile(t).then(async e=>{if(!e)throw new Error("File not found");const n=await e.json(),r=new Map;for(const i of n.entries)r.set(i.name,i.path);return r})}isLive(){return!0}traceURL(){return this._path}async entryNames(){return[...(await this._entriesPromise).keys()]}async hasEntry(t){return(await this._entriesPromise).has(t)}async readText(t){const e=await this._readEntry(t);return e==null?void 0:e.text()}async readBlob(t){const e=await this._readEntry(t);return(e==null?void 0:e.status)===200?await(e==null?void 0:e.blob()):void 0}async _readEntry(t){const n=(await this._entriesPromise).get(t);if(n)return this._readFile(n)}async _readFile(t){const e=await fetch(kt(t));if(e.status!==404)return e}}function kt(s){return`file?path=${encodeURIComponent(s)}`}self.addEventListener("install",function(s){self.skipWaiting()});self.addEventListener("activate",function(s){s.waitUntil(self.clients.claim())});const yo=new URL(self.registration.scope).pathname,Pe=new Map,$e=new Map,vn=self.registration.scope.startsWith("https://");function Eo(){Pe.clear(),$e.clear()}async function Un(s,t,e,n){try{return{loadedTrace:await Xs(s,t,e,n)}}catch(r){return{errorResponse:new Response(JSON.stringify({error:r==null?void 0:r.message}),{status:500,headers:{"Content-Type":"application/json"}})}}}function Xs(s,t,e,n){const r=t.searchParams.get("trace");if(!r)throw new Error("trace parameter is missing");$e.set(s,r);const a=e&&$s(r)?void 0:Pe.get(r);if(a)return a;const o=xo(r,n);return Pe.set(r,o),o}async function xo(s,t){var r;await Ro();const e=new br;try{const[i,a]=er(t,[.5,.4,.1]),o=$s(s)||s.endsWith("traces.dir")?new bo(s):new go(s,i);await e.load(o,a)}catch(i){throw console.error(i),(r=i==null?void 0:i.message)!=null&&r.includes("Cannot find .trace file")&&await e.hasEntry("index.html")?new Error("Could not load trace. Did you upload a Playwright HTML report instead? Make sure to extract the archive first and then double-click the index.html file or put it on a web server."):i instanceof Gn?new Error(`Could not load trace from ${s}. ${i.message}`):new Error(`Could not load trace from ${s}. Make sure a valid Playwright Trace is accessible over this url.`)}const n=new tr(e.storage(),i=>e.resourceForSha1(i));return{traceModel:e,snapshotServer:n}}async function To(s){const t=s.request;if(t.url.startsWith("chrome-extension://"))return fetch(t);if(t.headers.get("x-pw-serviceworker")==="forward"){const a=new Request(s.request);return a.headers.delete("x-pw-serviceworker"),fetch(a)}const e=new URL(t.url);let n;if(t.url.startsWith(self.registration.scope)&&(n=e.pathname.substring(yo.length-1)),n==="/restartServiceWorker")return Eo(),new Response(null,{status:200});if(n==="/ping")return new Response(null,{status:200});const r=!!s.resultingClientId,i=s.clientId?await self.clients.get(s.clientId):void 0;if(r&&!(n!=null&&n.startsWith("/sha1/"))){if(n!=null&&n.startsWith("/snapshot/")){const{errorResponse:a,loadedTrace:o}=await Un(s.resultingClientId,e,!1,Ao);if(a)return a;const l=n.substring(10),_=o.snapshotServer.serveSnapshot(l,e.searchParams,e.href);return vn&&_.headers.set("Content-Security-Policy","upgrade-insecure-requests"),_}return fetch(s.request)}if(!n){if(!i)return new Response("Sub-resource without a client",{status:500});const{snapshotServer:a}=await Xs(i.id,new URL(i.url),!1,Wn(i));if(!a)return new Response(null,{status:404});const o=[t.url];return vn&&t.url.startsWith("https://")&&o.push(t.url.replace(/^https/,"http")),a.serveResource(o,t.method,i.url)}if(n==="/contexts"||n.startsWith("/snapshotInfo/")||n.startsWith("/closest-screenshot/")||n.startsWith("/sha1/")){if(!i)return new Response("Sub-resource without a client",{status:500});const a=n==="/contexts",{errorResponse:o,loadedTrace:l}=await Un(i.id,e,a,Wn(i));if(o)return o;if(n==="/contexts")return new Response(JSON.stringify(l.traceModel.contextEntries),{status:200,headers:{"Content-Type":"application/json"}});if(n.startsWith("/snapshotInfo/")){const _=n.substring(14);return l.snapshotServer.serveSnapshotInfo(_,e.searchParams)}if(n.startsWith("/closest-screenshot/")){const _=n.substring(20);return l.snapshotServer.serveClosestScreenshot(_,e.searchParams)}if(n.startsWith("/sha1/")){const _=await l.traceModel.resourceForSha1(n.slice(6));return _?new Response(_,{status:200,headers:So(e.searchParams)}):new Response(null,{status:404})}}if(n!=null&&n.startsWith("/file/")){const a=e.searchParams.get("path");return await fetch(kt(a))}return fetch(s.request)}function So(s){const t=s.get("dn"),e=s.get("dct");if(!t)return;const n=new Headers;return n.set("Content-Disposition",`attachment; filename="attachment"; filename*=UTF-8''${encodeURIComponent(t)}`),e&&n.set("Content-Type",e),n}async function Ro(){const s=await self.clients.matchAll(),t=new Set;for(const[e,n]of $e){if(!s.find(r=>r.id===e)){$e.delete(e);continue}t.add(n)}for(const e of Pe.keys())t.has(e)||Pe.delete(e)}function Wn(s){return(t,e)=>{s.postMessage({method:"progress",params:{done:t,total:e}})}}function Ao(s,t){}function $s(s){return s.endsWith(".json")}self.addEventListener("fetch",function(s){s.respondWith(To(s))});
1
+ var $s=Object.defineProperty;var Js=(s,t,e)=>t in s?$s(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e;var M=(s,t,e)=>Js(s,typeof t!="symbol"?t+"":t,e);function Qs(s,t){const e=new Array(t.length).fill(0);return new Array(t.length).fill(0).map((n,r)=>(i,a)=>{e[r]=i/a*t[r]*1e3,s(e.reduce((o,l)=>o+l,0),1e3)})}class zs{constructor(t,e){M(this,"_snapshotStorage");M(this,"_resourceLoader");M(this,"_snapshotIds",new Map);this._snapshotStorage=t,this._resourceLoader=e}serveSnapshot(t,e,n){const r=this._snapshot(t,e);if(!r)return new Response(null,{status:404});const i=r.render();return this._snapshotIds.set(n,r),new Response(i.html,{status:200,headers:{"Content-Type":"text/html; charset=utf-8"}})}async serveClosestScreenshot(t,e){const n=this._snapshot(t,e),r=n==null?void 0:n.closestScreenshot();return r?new Response(await this._resourceLoader(r)):new Response(null,{status:404})}serveSnapshotInfo(t,e){const n=this._snapshot(t,e);return this._respondWithJson(n?{viewport:n.viewport(),url:n.snapshot().frameUrl,timestamp:n.snapshot().timestamp,wallTime:n.snapshot().wallTime}:{error:"No snapshot found"})}_snapshot(t,e){const n=e.get("name");return this._snapshotStorage.snapshotByName(t,n)}_respondWithJson(t){return new Response(JSON.stringify(t),{status:200,headers:{"Cache-Control":"public, max-age=31536000","Content-Type":"application/json"}})}async serveResource(t,e,n){let r;const i=this._snapshotIds.get(n);for(const A of t)if(r=i==null?void 0:i.resourceByUrl(er(A),e),r)break;if(!r)return new Response(null,{status:404});const a=r.response.content._sha1,o=a?await this._resourceLoader(a)||new Blob([]):new Blob([]);let l=r.response.content.mimeType;/^text\/|^application\/(javascript|json)/.test(l)&&!l.includes("charset")&&(l=`${l}; charset=utf-8`);const d=new Headers;l!=="x-unknown"&&d.set("Content-Type",l);for(const{name:A,value:T}of r.response.headers)d.set(A,T);d.delete("Content-Encoding"),d.delete("Access-Control-Allow-Origin"),d.set("Access-Control-Allow-Origin","*"),d.delete("Content-Length"),d.set("Content-Length",String(o.size)),d.set("Cache-Control","public, max-age=31536000");const{status:g}=r.response,b=g===101||g===204||g===205||g===304;return new Response(b?null:o,{headers:d,status:r.response.status,statusText:r.response.statusText})}}function er(s){try{const t=new URL(s);return t.hash="",t.toString()}catch{return s}}function tr(s){const t=new Map,{files:e,stacks:n}=s;for(const r of n){const[i,a]=r;t.set(`call@${i}`,a.map(o=>({file:e[o[0]],line:o[1],column:o[2],function:o[3]})))}return t}const Hn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function nr(s){return s.replace(/[&<>"']/ug,t=>Hn[t])}function sr(s){return s.replace(/[&<]/ug,t=>Hn[t])}function Ut(s,t,e){return s.find((n,r)=>{if(r===s.length-1)return!0;const i=s[r+1];return Math.abs(t(n)-e)<Math.abs(t(i)-e)})}function Wn(s){return Array.isArray(s)&&typeof s[0]=="string"}function rr(s){return Array.isArray(s)&&Array.isArray(s[0])}class ir{constructor(t,e,n,r,i){M(this,"_htmlCache");M(this,"_snapshots");M(this,"_index");M(this,"snapshotName");M(this,"_resources");M(this,"_snapshot");M(this,"_callId");M(this,"_screencastFrames");this._htmlCache=t,this._resources=e,this._snapshots=n,this._index=i,this._snapshot=n[i],this._callId=n[i].callId,this._screencastFrames=r,this.snapshotName=n[i].snapshotName}snapshot(){return this._snapshots[this._index]}viewport(){return this._snapshots[this._index].viewport}closestScreenshot(){var r;const{wallTime:t,timestamp:e}=this.snapshot(),n=t&&((r=this._screencastFrames[0])!=null&&r.frameSwapWallTime)?Ut(this._screencastFrames,i=>i.frameSwapWallTime,t):Ut(this._screencastFrames,i=>i.timestamp,e);return n==null?void 0:n.sha1}render(){const t=[],e=(i,a,o,l)=>{if(typeof i=="string"){o==="STYLE"||o==="style"?t.push(_r(fr(i))):t.push(sr(i));return}if(rr(i)){const _=a-i[0][0];if(_>=0&&_<=a){const d=or(this._snapshots[_]),g=i[0][1];if(g>=0&&g<d.length)return e(d[g],_,o,l)}}else if(Wn(i)){const[_,d,...g]=i,b=_==="NOSCRIPT"?"X-NOSCRIPT":_,A=Object.entries(d||{});t.push("<",b);const T="__playwright_current_src__",f=b==="IFRAME"||b==="FRAME",c=b==="A",u=b==="IMG",h=u&&A.some(y=>y[0]===T),p=b==="SOURCE"&&o==="PICTURE"&&(l==null?void 0:l.some(y=>y[0]===T));for(const[y,O]of A){let m=y;f&&y.toLowerCase()==="src"&&(m="__playwright_src__"),u&&y===T&&(m="src"),["src","srcset"].includes(y.toLowerCase())&&(h||p)&&(m="_"+m);let E=O;c&&y.toLowerCase()==="href"?E="link://"+O:(y.toLowerCase()==="href"||y.toLowerCase()==="src"||y===T)&&(E=ft(O)),t.push(" ",m,'="',nr(E),'"')}t.push(">");for(const y of g)e(y,a,b,A);ar.has(b)||t.push("</",b,">");return}else return},n=this._snapshot;return{html:this._htmlCache.getOrCompute(this,()=>{e(n.html,this._index,void 0,void 0);const a=(n.doctype?`<!DOCTYPE ${n.doctype}>`:"")+["<style>*,*::before,*::after { visibility: hidden }</style>",`<script>${cr(this.viewport(),this._callId,this.snapshotName)}<\/script>`].join("")+t.join("");return{value:a,size:a.length}}),pageId:n.pageId,frameId:n.frameId,index:this._index}}resourceByUrl(t,e){const n=this._snapshot;let r,i;for(const o of this._resources){if(typeof o._monotonicTime=="number"&&o._monotonicTime>=n.timestamp)break;o.response.status!==304&&o.request.url===t&&o.request.method===e&&(o._frameref===n.frameId?r=o:i=o)}let a=r??i;if(a&&e.toUpperCase()==="GET"){for(const o of n.resourceOverrides)if(t===o.url&&o.sha1){a={...a,response:{...a.response,content:{...a.response.content,_sha1:o.sha1}}};break}}return a}}const ar=new Set(["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","MENUITEM","META","PARAM","SOURCE","TRACK","WBR"]);function or(s){if(!s._nodes){const t=[],e=n=>{if(typeof n=="string")t.push(n);else if(Wn(n)){const[,,...r]=n;for(const i of r)e(i);t.push(n)}};e(s.html),s._nodes=t}return s._nodes}function cr(s,...t){function e(n,...r){const i=new URLSearchParams(location.search),a=i.has("shouldPopulateCanvasFromScreenshot"),o=i.has("isUnderTest"),l={viewport:n,frames:new WeakMap};window.__playwright_frame_bounding_rects__=l;const _="Recorded click position in absolute coordinates did not match the center of the clicked element. This is likely due to a difference between the test runner and the trace viewer operating systems.",d=[],g=[],b=[],A=[];let T=window;for(;T!==T.parent&&!T.location.pathname.match(/\/page@[a-z0-9]+$/);)T=T.parent;const f=h=>{for(const p of h.querySelectorAll("[__playwright_scroll_top_]"))d.push(p);for(const p of h.querySelectorAll("[__playwright_scroll_left_]"))g.push(p);for(const p of h.querySelectorAll("[__playwright_value_]")){const y=p;y.type!=="file"&&(y.value=y.getAttribute("__playwright_value_")),p.removeAttribute("__playwright_value_")}for(const p of h.querySelectorAll("[__playwright_checked_]"))p.checked=p.getAttribute("__playwright_checked_")==="true",p.removeAttribute("__playwright_checked_");for(const p of h.querySelectorAll("[__playwright_selected_]"))p.selected=p.getAttribute("__playwright_selected_")==="true",p.removeAttribute("__playwright_selected_");for(const p of h.querySelectorAll("[__playwright_popover_open_]")){try{p.showPopover()}catch{}p.removeAttribute("__playwright_popover_open_")}for(const p of h.querySelectorAll("[__playwright_dialog_open_]")){try{p.getAttribute("__playwright_dialog_open_")==="modal"?p.showModal():p.show()}catch{}p.removeAttribute("__playwright_dialog_open_")}for(const p of r)for(const y of h.querySelectorAll(`[__playwright_target__="${p}"]`)){const O=y.style;O.outline="2px solid #006ab1",O.backgroundColor="#6fa8dc7f",b.push(y)}for(const p of h.querySelectorAll("iframe, frame")){const y=p.getAttribute("__playwright_bounding_rect__");p.removeAttribute("__playwright_bounding_rect__");const O=y?JSON.parse(y):void 0;O&&l.frames.set(p,{boundingRect:O,scrollLeft:0,scrollTop:0});const m=p.getAttribute("__playwright_src__");if(!m)p.setAttribute("src",'data:text/html,<body style="background: #ddd"></body>');else{const E=new URL(window.location.href),R=E.pathname.lastIndexOf("/snapshot/");R!==-1&&(E.pathname=E.pathname.substring(0,R+1)),E.pathname+=m.substring(1),p.setAttribute("src",E.toString())}}{const p=h.querySelector("body[__playwright_custom_elements__]");if(p&&window.customElements){const y=(p.getAttribute("__playwright_custom_elements__")||"").split(",");for(const O of y)window.customElements.define(O,class extends HTMLElement{})}}for(const p of h.querySelectorAll("template[__playwright_shadow_root_]")){const y=p,O=y.parentElement.attachShadow({mode:"open"});O.appendChild(y.content),y.remove(),f(O)}if("adoptedStyleSheets"in h){const p=[...h.adoptedStyleSheets];for(const y of h.querySelectorAll("template[__playwright_style_sheet_]")){const O=y,m=new CSSStyleSheet;m.replaceSync(O.getAttribute("__playwright_style_sheet_")),p.push(m)}h.adoptedStyleSheets=p}A.push(...h.querySelectorAll("canvas"))},c=()=>{window.removeEventListener("load",c);for(const y of d)y.scrollTop=+y.getAttribute("__playwright_scroll_top_"),y.removeAttribute("__playwright_scroll_top_"),l.frames.has(y)&&(l.frames.get(y).scrollTop=y.scrollTop);for(const y of g)y.scrollLeft=+y.getAttribute("__playwright_scroll_left_"),y.removeAttribute("__playwright_scroll_left_"),l.frames.has(y)&&(l.frames.get(y).scrollLeft=y.scrollTop);document.styleSheets[0].disabled=!0;const h=new URL(window.location.href).searchParams,p=window===T;if(h.get("pointX")&&h.get("pointY")){const y=+h.get("pointX"),O=+h.get("pointY"),m=h.has("hasInputTarget"),E=b.length>0,R=document.documentElement?[document.documentElement]:[];for(const x of E?b:R){const w=document.createElement("x-pw-pointer");if(w.style.position="fixed",w.style.backgroundColor="#f44336",w.style.width="20px",w.style.height="20px",w.style.borderRadius="10px",w.style.margin="-10px 0 0 -10px",w.style.zIndex="2147483646",w.style.display="flex",w.style.alignItems="center",w.style.justifyContent="center",E){const S=x.getBoundingClientRect(),N=S.left+S.width/2,I=S.top+S.height/2;if(w.style.left=N+"px",w.style.top=I+"px",p&&(Math.abs(N-y)>=10||Math.abs(I-O)>=10)){const P=document.createElement("x-pw-pointer-warning");P.textContent="⚠",P.style.fontSize="19px",P.style.color="white",P.style.marginTop="-3.5px",P.style.userSelect="none",w.appendChild(P),w.setAttribute("title",_)}document.documentElement.appendChild(w)}else p&&!m&&(w.style.left=y+"px",w.style.top=O+"px",document.documentElement.appendChild(w))}}if(A.length>0){let y=function(m,E){function R(){const x=document.createElement("canvas");x.width=x.width/Math.floor(x.width/24),x.height=x.height/Math.floor(x.height/24);const w=x.getContext("2d");return w.fillStyle="lightgray",w.fillRect(0,0,x.width,x.height),w.fillStyle="white",w.fillRect(0,0,x.width/2,x.height/2),w.fillRect(x.width/2,x.height/2,x.width,x.height),w.createPattern(x,"repeat")}m.fillStyle=R(),m.fillRect(0,0,E.width,E.height)};const O=new Image;O.onload=()=>{var m;for(const E of A){const R=E.getContext("2d"),x=E.getAttribute("__playwright_bounding_rect__");if(E.removeAttribute("__playwright_bounding_rect__"),!x)continue;let w;try{w=JSON.parse(x)}catch{continue}let S=window;for(;S!==T;){const C=S.frameElement;S=S.parent;const v=(m=S.__playwright_frame_bounding_rects__)==null?void 0:m.frames.get(C);if(!(v!=null&&v.boundingRect))break;const L=v.boundingRect.left-v.scrollLeft,Z=v.boundingRect.top-v.scrollTop;w.left+=L,w.top+=Z,w.right+=L,w.bottom+=Z}const{width:N,height:I}=T.__playwright_frame_bounding_rects__.viewport;w.left=w.left/N,w.top=w.top/I,w.right=w.right/N,w.bottom=w.bottom/I;const P=w.right>1||w.bottom>1;if(w.left>1||w.top>1){E.title="Playwright couldn't capture canvas contents because it's located outside the viewport.";continue}y(R,E),a?(R.drawImage(O,w.left*O.width,w.top*O.height,(w.right-w.left)*O.width,(w.bottom-w.top)*O.height,0,0,E.width,E.height),P?E.title="Playwright couldn't capture full canvas contents because it's located partially outside the viewport.":E.title="Canvas contents are displayed on a best-effort basis based on viewport screenshots taken during test execution."):E.title="Canvas content display is disabled.",o&&console.log("canvas drawn:",JSON.stringify([w.left,w.top,w.right-w.left,w.bottom-w.top].map(C=>Math.floor(C*100))))}},O.onerror=()=>{for(const m of A){const E=m.getContext("2d");y(E,m),m.title="Playwright couldn't show canvas contents because the screenshot failed to load."}},O.src=location.href.replace("/snapshot","/closest-screenshot")}},u=()=>f(document);window.addEventListener("load",c),window.addEventListener("DOMContentLoaded",u)}return`
2
+ (${e.toString()})(${JSON.stringify(s)}${t.map(n=>`, "${n}"`).join("")})`}const Bn=["about:","blob:","data:","file:","ftp:","http:","https:","mailto:","sftp:","ws:","wss:"],Ht="http://playwright.bloburl/#";function ft(s){s.startsWith(Ht)&&(s=s.substring(Ht.length));try{const t=new URL(s);if(t.protocol==="javascript:"||t.protocol==="vbscript:")return"javascript:void(0)";const e=t.protocol==="blob:",n=t.protocol==="file:";if(!e&&!n&&Bn.includes(t.protocol))return s;const r="pw-"+t.protocol.slice(0,t.protocol.length-1);return n||(t.protocol="https:"),t.hostname=t.hostname?`${r}--${t.hostname}`:r,n&&(t.protocol="https:"),t.toString()}catch{return s}}const lr=/url\(['"]?([\w-]+:)\/\//ig;function fr(s){return s.replace(lr,(t,e)=>!(e==="blob:")&&!(e==="file:")&&Bn.includes(e)?t:t.replace(e+"//",`https://pw-${e.slice(0,-1)}--`))}const ur=/url\(\s*'([^']*)'\s*\)/ig,dr=/url\(\s*"([^"]*)"\s*\)/ig;function _r(s){const t=(e,n)=>n.includes("</")?e.replace(n,encodeURI(n)):e;return s.replace(ur,t).replace(dr,t)}class hr{constructor(t){M(this,"_maxSize");M(this,"_map");M(this,"_size");this._maxSize=t,this._map=new Map,this._size=0}getOrCompute(t,e){if(this._map.has(t)){const r=this._map.get(t);return this._map.delete(t),this._map.set(t,r),r.value}const n=e();for(;this._map.size&&this._size+n.size>this._maxSize;){const[r,i]=this._map.entries().next().value;this._size-=i.size,this._map.delete(r)}return this._map.set(t,n),this._size+=n.size,n.value}}class pr{constructor(){M(this,"_frameSnapshots",new Map);M(this,"_cache",new hr(1e8));M(this,"_contextToResources",new Map)}addResource(t,e){e.request.url=ft(e.request.url),this._ensureResourcesForContext(t).push(e)}addFrameSnapshot(t,e,n){for(const o of e.resourceOverrides)o.url=ft(o.url);let r=this._frameSnapshots.get(e.frameId);r||(r={raw:[],renderers:[]},this._frameSnapshots.set(e.frameId,r),e.isMainFrame&&this._frameSnapshots.set(e.pageId,r)),r.raw.push(e);const i=this._ensureResourcesForContext(t),a=new ir(this._cache,i,r.raw,n,r.raw.length-1);return r.renderers.push(a),a}snapshotByName(t,e){const n=this._frameSnapshots.get(t);return n==null?void 0:n.renderers.find(r=>r.snapshotName===e)}snapshotsForTest(){return[...this._frameSnapshots.keys()]}finalize(){for(const t of this._contextToResources.values())t.sort((e,n)=>(e._monotonicTime||0)-(n._monotonicTime||0))}_ensureResourcesForContext(t){let e=this._contextToResources.get(t);return e||(e=[],this._contextToResources.set(t,e)),e}}class jn extends Error{constructor(t){super(t),this.name="TraceVersionError"}}const Wt=8;class mr{constructor(t,e){M(this,"_contextEntry");M(this,"_snapshotStorage");M(this,"_actionMap",new Map);M(this,"_version");M(this,"_pageEntries",new Map);M(this,"_jsHandles",new Map);M(this,"_consoleObjects",new Map);this._contextEntry=t,this._snapshotStorage=e}appendTrace(t){for(const e of t.split(`
3
+ `))this._appendEvent(e)}actions(){return[...this._actionMap.values()]}_pageEntry(t){let e=this._pageEntries.get(t);return e||(e={pageId:t,screencastFrames:[]},this._pageEntries.set(t,e),this._contextEntry.pages.push(e)),e}_appendEvent(t){if(!t)return;const e=this._modernize(JSON.parse(t));for(const n of e)this._innerAppendEvent(n)}_innerAppendEvent(t){const e=this._contextEntry;switch(t.type){case"context-options":{if(t.version>Wt)throw new jn("The trace was created by a newer version of Playwright and is not supported by this version of the viewer. Please use latest Playwright to open the trace.");this._version=t.version,e.origin=t.origin,e.browserName=t.browserName,e.channel=t.channel,e.title=t.title,e.platform=t.platform,e.playwrightVersion=t.playwrightVersion,e.wallTime=t.wallTime,e.startTime=t.monotonicTime,e.sdkLanguage=t.sdkLanguage,e.options=t.options,e.testIdAttributeName=t.testIdAttributeName,e.contextId=t.contextId??"";break}case"screencast-frame":{this._pageEntry(t.pageId).screencastFrames.push(t);break}case"before":{this._actionMap.set(t.callId,{...t,type:"action",endTime:0,log:[]});break}case"input":{const n=this._actionMap.get(t.callId);n.inputSnapshot=t.inputSnapshot,n.point=t.point;break}case"log":{const n=this._actionMap.get(t.callId);if(!n)return;n.log.push({time:t.time,message:t.message});break}case"after":{const n=this._actionMap.get(t.callId);n.afterSnapshot=t.afterSnapshot,n.endTime=t.endTime,n.result=t.result,n.error=t.error,n.attachments=t.attachments,n.annotations=t.annotations,t.point&&(n.point=t.point);break}case"action":{this._actionMap.set(t.callId,{...t,log:[]});break}case"event":{e.events.push(t);break}case"stdout":{e.stdio.push(t);break}case"stderr":{e.stdio.push(t);break}case"error":{e.errors.push(t);break}case"console":{e.events.push(t);break}case"resource-snapshot":this._snapshotStorage.addResource(this._contextEntry.contextId,t.snapshot),e.resources.push(t.snapshot);break;case"frame-snapshot":this._snapshotStorage.addFrameSnapshot(this._contextEntry.contextId,t.snapshot,this._pageEntry(t.snapshot.pageId).screencastFrames);break}"pageId"in t&&t.pageId&&this._pageEntry(t.pageId),(t.type==="action"||t.type==="before")&&(e.startTime=Math.min(e.startTime,t.startTime)),(t.type==="action"||t.type==="after")&&(e.endTime=Math.max(e.endTime,t.endTime)),t.type==="event"&&(e.startTime=Math.min(e.startTime,t.time),e.endTime=Math.max(e.endTime,t.time)),t.type==="screencast-frame"&&(e.startTime=Math.min(e.startTime,t.timestamp),e.endTime=Math.max(e.endTime,t.timestamp))}_processedContextCreatedEvent(){return this._version!==void 0}_modernize(t){let e=this._version??t.version??6,n=[t];for(;e<Wt;++e)n=this[`_modernize_${e}_to_${e+1}`].call(this,n);return n}_modernize_0_to_1(t){for(const e of t)e.type==="action"&&typeof e.metadata.error=="string"&&(e.metadata.error={error:{name:"Error",message:e.metadata.error}});return t}_modernize_1_to_2(t){var e;for(const n of t)n.type!=="frame-snapshot"||!n.snapshot.isMainFrame||(n.snapshot.viewport=((e=this._contextEntry.options)==null?void 0:e.viewport)||{width:1280,height:720});return t}_modernize_2_to_3(t){for(const e of t){if(e.type!=="resource-snapshot"||e.snapshot.request)continue;const n=e.snapshot;e.snapshot={_frameref:n.frameId,request:{url:n.url,method:n.method,headers:n.requestHeaders,postData:n.requestSha1?{_sha1:n.requestSha1}:void 0},response:{status:n.status,headers:n.responseHeaders,content:{mimeType:n.contentType,_sha1:n.responseSha1}},_monotonicTime:n.timestamp}}return t}_modernize_3_to_4(t){const e=[];for(const n of t){const r=this._modernize_event_3_to_4(n);r&&e.push(r)}return e}_modernize_event_3_to_4(t){var n,r,i,a;if(t.type!=="action"&&t.type!=="event")return t;const e=t.metadata;return e.internal||e.method.startsWith("tracing")?null:t.type==="event"?e.method==="__create__"&&e.type==="ConsoleMessage"?{type:"object",class:e.type,guid:e.params.guid,initializer:e.params.initializer}:{type:"event",time:e.startTime,class:e.type,method:e.method,params:e.params,pageId:e.pageId}:{type:"action",callId:e.id,startTime:e.startTime,endTime:e.endTime,apiName:e.apiName||e.type+"."+e.method,class:e.type,method:e.method,params:e.params,wallTime:e.wallTime||Date.now(),log:e.log,beforeSnapshot:(n=e.snapshots.find(o=>o.title==="before"))==null?void 0:n.snapshotName,inputSnapshot:(r=e.snapshots.find(o=>o.title==="input"))==null?void 0:r.snapshotName,afterSnapshot:(i=e.snapshots.find(o=>o.title==="after"))==null?void 0:i.snapshotName,error:(a=e.error)==null?void 0:a.error,result:e.result,point:e.point,pageId:e.pageId}}_modernize_4_to_5(t){const e=[];for(const n of t){const r=this._modernize_event_4_to_5(n);r&&e.push(r)}return e}_modernize_event_4_to_5(t){var e,n;if(t.type==="event"&&t.method==="__create__"&&t.class==="JSHandle"&&this._jsHandles.set(t.params.guid,t.params.initializer),t.type==="object"){if(t.class!=="ConsoleMessage")return null;const r=(e=t.initializer.args)==null?void 0:e.map(i=>{if(i.guid){const a=this._jsHandles.get(i.guid);return{preview:(a==null?void 0:a.preview)||"",value:""}}return{preview:i.preview||"",value:i.value||""}});return this._consoleObjects.set(t.guid,{type:t.initializer.type,text:t.initializer.text,location:t.initializer.location,args:r}),null}if(t.type==="event"&&t.method==="console"){const r=this._consoleObjects.get(((n=t.params.message)==null?void 0:n.guid)||"");return r?{type:"console",time:t.time,pageId:t.pageId,messageType:r.type,text:r.text,args:r.args,location:r.location}:null}return t}_modernize_5_to_6(t){const e=[];for(const n of t)if(e.push(n),!(n.type!=="after"||!n.log.length))for(const r of n.log)e.push({type:"log",callId:n.callId,message:r,time:-1});return e}_modernize_6_to_7(t){const e=[];if(!this._processedContextCreatedEvent()&&t[0].type!=="context-options"){const n={type:"context-options",origin:"testRunner",version:6,browserName:"",options:{},platform:"unknown",wallTime:0,monotonicTime:0,sdkLanguage:"javascript",contextId:""};e.push(n)}for(const n of t){if(n.type==="context-options"){e.push({...n,monotonicTime:0,origin:"library",contextId:""});continue}if(n.type==="before"||n.type==="action"){this._contextEntry.wallTime||(this._contextEntry.wallTime=n.wallTime);const r=n,i=n;i.stepId=`${r.apiName}@${r.wallTime}`,e.push(i)}else e.push(n)}return e}_modernize_7_to_8(t){const e=[];for(const n of t)if(n.type==="before"||n.type==="action"){const r=n,i=n;r.apiName&&(i.title=r.apiName,delete i.apiName),i.stepId=r.stepId??r.callId,e.push(i)}else e.push(n);return e}}class wr{constructor(){M(this,"contextEntries",[]);M(this,"_snapshotStorage");M(this,"_backend");M(this,"_resourceToContentType",new Map)}async load(t,e){var o,l;this._backend=t;const n=[];let r=!1;for(const _ of await this._backend.entryNames()){const d=_.match(/(.+)\.trace$/);d&&n.push(d[1]||""),_.includes("src@")&&(r=!0)}if(!n.length)throw new Error("Cannot find .trace file");this._snapshotStorage=new pr;const i=n.length*3;let a=0;for(const _ of n){const d=gr();d.hasSource=r;const g=new mr(d,this._snapshotStorage),b=await this._backend.readText(_+".trace")||"";g.appendTrace(b),e(++a,i);const A=await this._backend.readText(_+".network")||"";if(g.appendTrace(A),e(++a,i),d.actions=g.actions().sort((f,c)=>f.startTime-c.startTime),!t.isLive()){for(const f of d.actions.slice().reverse())if(!f.endTime&&!f.error)for(const c of d.actions)c.parentId===f.callId&&f.endTime<c.endTime&&(f.endTime=c.endTime)}const T=await this._backend.readText(_+".stacks");if(T){const f=tr(JSON.parse(T));for(const c of d.actions)c.stack=c.stack||f.get(c.callId)}e(++a,i);for(const f of d.resources)(o=f.request.postData)!=null&&o._sha1&&this._resourceToContentType.set(f.request.postData._sha1,Bt(f.request.postData.mimeType)),(l=f.response.content)!=null&&l._sha1&&this._resourceToContentType.set(f.response.content._sha1,Bt(f.response.content.mimeType));this.contextEntries.push(d)}this._snapshotStorage.finalize()}async hasEntry(t){return this._backend.hasEntry(t)}async resourceForSha1(t){const e=await this._backend.readBlob("resources/"+t),n=this._resourceToContentType.get(t);return!e||n===void 0||n==="x-unknown"?e:new Blob([e],{type:n})}storage(){return this._snapshotStorage}}function Bt(s){const t=s.match(/^(.*);\s*charset=.*$/);return t?t[1]:s}function gr(){return{origin:"testRunner",startTime:Number.MAX_SAFE_INTEGER,wallTime:Number.MAX_SAFE_INTEGER,endTime:0,browserName:"",options:{deviceScaleFactor:1,isMobile:!1,viewport:{width:1280,height:800}},pages:[],resources:[],actions:[],events:[],errors:[],stdio:[],hasSource:!1,contextId:""}}const br=15,F=0,se=1,yr=2,X=-2,B=-3,jt=-4,re=-5,$=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Gn=1440,Er=0,xr=4,Tr=9,Sr=5,Rr=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Ar=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],Or=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],Ir=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Cr=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],Nr=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],ae=15;function ut(){const s=this;let t,e,n,r,i,a;function o(_,d,g,b,A,T,f,c,u,h,p){let y,O,m,E,R,x,w,S,N,I,P,k,C,v,L;I=0,R=g;do n[_[d+I]]++,I++,R--;while(R!==0);if(n[0]==g)return f[0]=-1,c[0]=0,F;for(S=c[0],x=1;x<=ae&&n[x]===0;x++);for(w=x,S<x&&(S=x),R=ae;R!==0&&n[R]===0;R--);for(m=R,S>R&&(S=R),c[0]=S,v=1<<x;x<R;x++,v<<=1)if((v-=n[x])<0)return B;if((v-=n[R])<0)return B;for(n[R]+=v,a[1]=x=0,I=1,C=2;--R!==0;)a[C]=x+=n[I],C++,I++;R=0,I=0;do(x=_[d+I])!==0&&(p[a[x]++]=R),I++;while(++R<g);for(g=a[m],a[0]=R=0,I=0,E=-1,k=-S,i[0]=0,P=0,L=0;w<=m;w++)for(y=n[w];y--!==0;){for(;w>k+S;){if(E++,k+=S,L=m-k,L=L>S?S:L,(O=1<<(x=w-k))>y+1&&(O-=y+1,C=w,x<L))for(;++x<L&&!((O<<=1)<=n[++C]);)O-=n[C];if(L=1<<x,h[0]+L>Gn)return B;i[E]=P=h[0],h[0]+=L,E!==0?(a[E]=R,r[0]=x,r[1]=S,x=R>>>k-S,r[2]=P-i[E-1]-x,u.set(r,(i[E-1]+x)*3)):f[0]=P}for(r[1]=w-k,I>=g?r[0]=192:p[I]<b?(r[0]=p[I]<256?0:96,r[2]=p[I++]):(r[0]=T[p[I]-b]+16+64,r[2]=A[p[I++]-b]),O=1<<w-k,x=R>>>k;x<L;x+=O)u.set(r,(P+x)*3);for(x=1<<w-1;(R&x)!==0;x>>>=1)R^=x;for(R^=x,N=(1<<k)-1;(R&N)!=a[E];)E--,k-=S,N=(1<<k)-1}return v!==0&&m!=1?re:F}function l(_){let d;for(t||(t=[],e=[],n=new Int32Array(ae+1),r=[],i=new Int32Array(ae),a=new Int32Array(ae+1)),e.length<_&&(e=[]),d=0;d<_;d++)e[d]=0;for(d=0;d<ae+1;d++)n[d]=0;for(d=0;d<3;d++)r[d]=0;i.set(n.subarray(0,ae),0),a.set(n.subarray(0,ae+1),0)}s.inflate_trees_bits=function(_,d,g,b,A){let T;return l(19),t[0]=0,T=o(_,0,19,19,null,null,g,d,b,t,e),T==B?A.msg="oversubscribed dynamic bit lengths tree":(T==re||d[0]===0)&&(A.msg="incomplete dynamic bit lengths tree",T=B),T},s.inflate_trees_dynamic=function(_,d,g,b,A,T,f,c,u){let h;return l(288),t[0]=0,h=o(g,0,_,257,Or,Ir,T,b,c,t,e),h!=F||b[0]===0?(h==B?u.msg="oversubscribed literal/length tree":h!=jt&&(u.msg="incomplete literal/length tree",h=B),h):(l(288),h=o(g,_,d,0,Cr,Nr,f,A,c,t,e),h!=F||A[0]===0&&_>257?(h==B?u.msg="oversubscribed distance tree":h==re?(u.msg="incomplete distance tree",h=B):h!=jt&&(u.msg="empty distance tree with lengths",h=B),h):F)}}ut.inflate_trees_fixed=function(s,t,e,n){return s[0]=Tr,t[0]=Sr,e[0]=Rr,n[0]=Ar,F};const We=0,Gt=1,Yt=2,qt=3,Vt=4,Zt=5,Kt=6,et=7,Xt=8,Be=9;function Pr(){const s=this;let t,e=0,n,r=0,i=0,a=0,o=0,l=0,_=0,d=0,g,b=0,A,T=0;function f(c,u,h,p,y,O,m,E){let R,x,w,S,N,I,P,k,C,v,L,Z,D,Q,U,H;P=E.next_in_index,k=E.avail_in,N=m.bitb,I=m.bitk,C=m.write,v=C<m.read?m.read-C-1:m.end-C,L=$[c],Z=$[u];do{for(;I<20;)k--,N|=(E.read_byte(P++)&255)<<I,I+=8;if(R=N&L,x=h,w=p,H=(w+R)*3,(S=x[H])===0){N>>=x[H+1],I-=x[H+1],m.win[C++]=x[H+2],v--;continue}do{if(N>>=x[H+1],I-=x[H+1],(S&16)!==0){for(S&=15,D=x[H+2]+(N&$[S]),N>>=S,I-=S;I<15;)k--,N|=(E.read_byte(P++)&255)<<I,I+=8;R=N&Z,x=y,w=O,H=(w+R)*3,S=x[H];do if(N>>=x[H+1],I-=x[H+1],(S&16)!==0){for(S&=15;I<S;)k--,N|=(E.read_byte(P++)&255)<<I,I+=8;if(Q=x[H+2]+(N&$[S]),N>>=S,I-=S,v-=D,C>=Q)U=C-Q,C-U>0&&2>C-U?(m.win[C++]=m.win[U++],m.win[C++]=m.win[U++],D-=2):(m.win.set(m.win.subarray(U,U+2),C),C+=2,U+=2,D-=2);else{U=C-Q;do U+=m.end;while(U<0);if(S=m.end-U,D>S){if(D-=S,C-U>0&&S>C-U)do m.win[C++]=m.win[U++];while(--S!==0);else m.win.set(m.win.subarray(U,U+S),C),C+=S,U+=S,S=0;U=0}}if(C-U>0&&D>C-U)do m.win[C++]=m.win[U++];while(--D!==0);else m.win.set(m.win.subarray(U,U+D),C),C+=D,U+=D,D=0;break}else if((S&64)===0)R+=x[H+2],R+=N&$[S],H=(w+R)*3,S=x[H];else return E.msg="invalid distance code",D=E.avail_in-k,D=I>>3<D?I>>3:D,k+=D,P-=D,I-=D<<3,m.bitb=N,m.bitk=I,E.avail_in=k,E.total_in+=P-E.next_in_index,E.next_in_index=P,m.write=C,B;while(!0);break}if((S&64)===0){if(R+=x[H+2],R+=N&$[S],H=(w+R)*3,(S=x[H])===0){N>>=x[H+1],I-=x[H+1],m.win[C++]=x[H+2],v--;break}}else return(S&32)!==0?(D=E.avail_in-k,D=I>>3<D?I>>3:D,k+=D,P-=D,I-=D<<3,m.bitb=N,m.bitk=I,E.avail_in=k,E.total_in+=P-E.next_in_index,E.next_in_index=P,m.write=C,se):(E.msg="invalid literal/length code",D=E.avail_in-k,D=I>>3<D?I>>3:D,k+=D,P-=D,I-=D<<3,m.bitb=N,m.bitk=I,E.avail_in=k,E.total_in+=P-E.next_in_index,E.next_in_index=P,m.write=C,B)}while(!0)}while(v>=258&&k>=10);return D=E.avail_in-k,D=I>>3<D?I>>3:D,k+=D,P-=D,I-=D<<3,m.bitb=N,m.bitk=I,E.avail_in=k,E.total_in+=P-E.next_in_index,E.next_in_index=P,m.write=C,F}s.init=function(c,u,h,p,y,O){t=We,_=c,d=u,g=h,b=p,A=y,T=O,n=null},s.proc=function(c,u,h){let p,y,O,m=0,E=0,R=0,x,w,S,N;for(R=u.next_in_index,x=u.avail_in,m=c.bitb,E=c.bitk,w=c.write,S=w<c.read?c.read-w-1:c.end-w;;)switch(t){case We:if(S>=258&&x>=10&&(c.bitb=m,c.bitk=E,u.avail_in=x,u.total_in+=R-u.next_in_index,u.next_in_index=R,c.write=w,h=f(_,d,g,b,A,T,c,u),R=u.next_in_index,x=u.avail_in,m=c.bitb,E=c.bitk,w=c.write,S=w<c.read?c.read-w-1:c.end-w,h!=F)){t=h==se?et:Be;break}i=_,n=g,r=b,t=Gt;case Gt:for(p=i;E<p;){if(x!==0)h=F;else return c.bitb=m,c.bitk=E,u.avail_in=x,u.total_in+=R-u.next_in_index,u.next_in_index=R,c.write=w,c.inflate_flush(u,h);x--,m|=(u.read_byte(R++)&255)<<E,E+=8}if(y=(r+(m&$[p]))*3,m>>>=n[y+1],E-=n[y+1],O=n[y],O===0){a=n[y+2],t=Kt;break}if((O&16)!==0){o=O&15,e=n[y+2],t=Yt;break}if((O&64)===0){i=O,r=y/3+n[y+2];break}if((O&32)!==0){t=et;break}return t=Be,u.msg="invalid literal/length code",h=B,c.bitb=m,c.bitk=E,u.avail_in=x,u.total_in+=R-u.next_in_index,u.next_in_index=R,c.write=w,c.inflate_flush(u,h);case Yt:for(p=o;E<p;){if(x!==0)h=F;else return c.bitb=m,c.bitk=E,u.avail_in=x,u.total_in+=R-u.next_in_index,u.next_in_index=R,c.write=w,c.inflate_flush(u,h);x--,m|=(u.read_byte(R++)&255)<<E,E+=8}e+=m&$[p],m>>=p,E-=p,i=d,n=A,r=T,t=qt;case qt:for(p=i;E<p;){if(x!==0)h=F;else return c.bitb=m,c.bitk=E,u.avail_in=x,u.total_in+=R-u.next_in_index,u.next_in_index=R,c.write=w,c.inflate_flush(u,h);x--,m|=(u.read_byte(R++)&255)<<E,E+=8}if(y=(r+(m&$[p]))*3,m>>=n[y+1],E-=n[y+1],O=n[y],(O&16)!==0){o=O&15,l=n[y+2],t=Vt;break}if((O&64)===0){i=O,r=y/3+n[y+2];break}return t=Be,u.msg="invalid distance code",h=B,c.bitb=m,c.bitk=E,u.avail_in=x,u.total_in+=R-u.next_in_index,u.next_in_index=R,c.write=w,c.inflate_flush(u,h);case Vt:for(p=o;E<p;){if(x!==0)h=F;else return c.bitb=m,c.bitk=E,u.avail_in=x,u.total_in+=R-u.next_in_index,u.next_in_index=R,c.write=w,c.inflate_flush(u,h);x--,m|=(u.read_byte(R++)&255)<<E,E+=8}l+=m&$[p],m>>=p,E-=p,t=Zt;case Zt:for(N=w-l;N<0;)N+=c.end;for(;e!==0;){if(S===0&&(w==c.end&&c.read!==0&&(w=0,S=w<c.read?c.read-w-1:c.end-w),S===0&&(c.write=w,h=c.inflate_flush(u,h),w=c.write,S=w<c.read?c.read-w-1:c.end-w,w==c.end&&c.read!==0&&(w=0,S=w<c.read?c.read-w-1:c.end-w),S===0)))return c.bitb=m,c.bitk=E,u.avail_in=x,u.total_in+=R-u.next_in_index,u.next_in_index=R,c.write=w,c.inflate_flush(u,h);c.win[w++]=c.win[N++],S--,N==c.end&&(N=0),e--}t=We;break;case Kt:if(S===0&&(w==c.end&&c.read!==0&&(w=0,S=w<c.read?c.read-w-1:c.end-w),S===0&&(c.write=w,h=c.inflate_flush(u,h),w=c.write,S=w<c.read?c.read-w-1:c.end-w,w==c.end&&c.read!==0&&(w=0,S=w<c.read?c.read-w-1:c.end-w),S===0)))return c.bitb=m,c.bitk=E,u.avail_in=x,u.total_in+=R-u.next_in_index,u.next_in_index=R,c.write=w,c.inflate_flush(u,h);h=F,c.win[w++]=a,S--,t=We;break;case et:if(E>7&&(E-=8,x++,R--),c.write=w,h=c.inflate_flush(u,h),w=c.write,S=w<c.read?c.read-w-1:c.end-w,c.read!=c.write)return c.bitb=m,c.bitk=E,u.avail_in=x,u.total_in+=R-u.next_in_index,u.next_in_index=R,c.write=w,c.inflate_flush(u,h);t=Xt;case Xt:return h=se,c.bitb=m,c.bitk=E,u.avail_in=x,u.total_in+=R-u.next_in_index,u.next_in_index=R,c.write=w,c.inflate_flush(u,h);case Be:return h=B,c.bitb=m,c.bitk=E,u.avail_in=x,u.total_in+=R-u.next_in_index,u.next_in_index=R,c.write=w,c.inflate_flush(u,h);default:return h=X,c.bitb=m,c.bitk=E,u.avail_in=x,u.total_in+=R-u.next_in_index,u.next_in_index=R,c.write=w,c.inflate_flush(u,h)}},s.free=function(){}}const $t=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],ge=0,tt=1,Jt=2,Qt=3,zt=4,en=5,je=6,Ge=7,tn=8,pe=9;function Dr(s,t){const e=this;let n=ge,r=0,i=0,a=0,o;const l=[0],_=[0],d=new Pr;let g=0,b=new Int32Array(Gn*3);const A=0,T=new ut;e.bitk=0,e.bitb=0,e.win=new Uint8Array(t),e.end=t,e.read=0,e.write=0,e.reset=function(f,c){c&&(c[0]=A),n==je&&d.free(f),n=ge,e.bitk=0,e.bitb=0,e.read=e.write=0},e.reset(s,null),e.inflate_flush=function(f,c){let u,h,p;return h=f.next_out_index,p=e.read,u=(p<=e.write?e.write:e.end)-p,u>f.avail_out&&(u=f.avail_out),u!==0&&c==re&&(c=F),f.avail_out-=u,f.total_out+=u,f.next_out.set(e.win.subarray(p,p+u),h),h+=u,p+=u,p==e.end&&(p=0,e.write==e.end&&(e.write=0),u=e.write-p,u>f.avail_out&&(u=f.avail_out),u!==0&&c==re&&(c=F),f.avail_out-=u,f.total_out+=u,f.next_out.set(e.win.subarray(p,p+u),h),h+=u,p+=u),f.next_out_index=h,e.read=p,c},e.proc=function(f,c){let u,h,p,y,O,m,E,R;for(y=f.next_in_index,O=f.avail_in,h=e.bitb,p=e.bitk,m=e.write,E=m<e.read?e.read-m-1:e.end-m;;){let x,w,S,N,I,P,k,C;switch(n){case ge:for(;p<3;){if(O!==0)c=F;else return e.bitb=h,e.bitk=p,f.avail_in=O,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=m,e.inflate_flush(f,c);O--,h|=(f.read_byte(y++)&255)<<p,p+=8}switch(u=h&7,g=u&1,u>>>1){case 0:h>>>=3,p-=3,u=p&7,h>>>=u,p-=u,n=tt;break;case 1:x=[],w=[],S=[[]],N=[[]],ut.inflate_trees_fixed(x,w,S,N),d.init(x[0],w[0],S[0],0,N[0],0),h>>>=3,p-=3,n=je;break;case 2:h>>>=3,p-=3,n=Qt;break;case 3:return h>>>=3,p-=3,n=pe,f.msg="invalid block type",c=B,e.bitb=h,e.bitk=p,f.avail_in=O,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=m,e.inflate_flush(f,c)}break;case tt:for(;p<32;){if(O!==0)c=F;else return e.bitb=h,e.bitk=p,f.avail_in=O,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=m,e.inflate_flush(f,c);O--,h|=(f.read_byte(y++)&255)<<p,p+=8}if((~h>>>16&65535)!=(h&65535))return n=pe,f.msg="invalid stored block lengths",c=B,e.bitb=h,e.bitk=p,f.avail_in=O,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=m,e.inflate_flush(f,c);r=h&65535,h=p=0,n=r!==0?Jt:g!==0?Ge:ge;break;case Jt:if(O===0||E===0&&(m==e.end&&e.read!==0&&(m=0,E=m<e.read?e.read-m-1:e.end-m),E===0&&(e.write=m,c=e.inflate_flush(f,c),m=e.write,E=m<e.read?e.read-m-1:e.end-m,m==e.end&&e.read!==0&&(m=0,E=m<e.read?e.read-m-1:e.end-m),E===0)))return e.bitb=h,e.bitk=p,f.avail_in=O,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=m,e.inflate_flush(f,c);if(c=F,u=r,u>O&&(u=O),u>E&&(u=E),e.win.set(f.read_buf(y,u),m),y+=u,O-=u,m+=u,E-=u,(r-=u)!==0)break;n=g!==0?Ge:ge;break;case Qt:for(;p<14;){if(O!==0)c=F;else return e.bitb=h,e.bitk=p,f.avail_in=O,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=m,e.inflate_flush(f,c);O--,h|=(f.read_byte(y++)&255)<<p,p+=8}if(i=u=h&16383,(u&31)>29||(u>>5&31)>29)return n=pe,f.msg="too many length or distance symbols",c=B,e.bitb=h,e.bitk=p,f.avail_in=O,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=m,e.inflate_flush(f,c);if(u=258+(u&31)+(u>>5&31),!o||o.length<u)o=[];else for(R=0;R<u;R++)o[R]=0;h>>>=14,p-=14,a=0,n=zt;case zt:for(;a<4+(i>>>10);){for(;p<3;){if(O!==0)c=F;else return e.bitb=h,e.bitk=p,f.avail_in=O,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=m,e.inflate_flush(f,c);O--,h|=(f.read_byte(y++)&255)<<p,p+=8}o[$t[a++]]=h&7,h>>>=3,p-=3}for(;a<19;)o[$t[a++]]=0;if(l[0]=7,u=T.inflate_trees_bits(o,l,_,b,f),u!=F)return c=u,c==B&&(o=null,n=pe),e.bitb=h,e.bitk=p,f.avail_in=O,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=m,e.inflate_flush(f,c);a=0,n=en;case en:for(;u=i,!(a>=258+(u&31)+(u>>5&31));){let v,L;for(u=l[0];p<u;){if(O!==0)c=F;else return e.bitb=h,e.bitk=p,f.avail_in=O,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=m,e.inflate_flush(f,c);O--,h|=(f.read_byte(y++)&255)<<p,p+=8}if(u=b[(_[0]+(h&$[u]))*3+1],L=b[(_[0]+(h&$[u]))*3+2],L<16)h>>>=u,p-=u,o[a++]=L;else{for(R=L==18?7:L-14,v=L==18?11:3;p<u+R;){if(O!==0)c=F;else return e.bitb=h,e.bitk=p,f.avail_in=O,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=m,e.inflate_flush(f,c);O--,h|=(f.read_byte(y++)&255)<<p,p+=8}if(h>>>=u,p-=u,v+=h&$[R],h>>>=R,p-=R,R=a,u=i,R+v>258+(u&31)+(u>>5&31)||L==16&&R<1)return o=null,n=pe,f.msg="invalid bit length repeat",c=B,e.bitb=h,e.bitk=p,f.avail_in=O,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=m,e.inflate_flush(f,c);L=L==16?o[R-1]:0;do o[R++]=L;while(--v!==0);a=R}}if(_[0]=-1,I=[],P=[],k=[],C=[],I[0]=9,P[0]=6,u=i,u=T.inflate_trees_dynamic(257+(u&31),1+(u>>5&31),o,I,P,k,C,b,f),u!=F)return u==B&&(o=null,n=pe),c=u,e.bitb=h,e.bitk=p,f.avail_in=O,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=m,e.inflate_flush(f,c);d.init(I[0],P[0],b,k[0],b,C[0]),n=je;case je:if(e.bitb=h,e.bitk=p,f.avail_in=O,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=m,(c=d.proc(e,f,c))!=se)return e.inflate_flush(f,c);if(c=F,d.free(f),y=f.next_in_index,O=f.avail_in,h=e.bitb,p=e.bitk,m=e.write,E=m<e.read?e.read-m-1:e.end-m,g===0){n=ge;break}n=Ge;case Ge:if(e.write=m,c=e.inflate_flush(f,c),m=e.write,E=m<e.read?e.read-m-1:e.end-m,e.read!=e.write)return e.bitb=h,e.bitk=p,f.avail_in=O,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=m,e.inflate_flush(f,c);n=tn;case tn:return c=se,e.bitb=h,e.bitk=p,f.avail_in=O,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=m,e.inflate_flush(f,c);case pe:return c=B,e.bitb=h,e.bitk=p,f.avail_in=O,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=m,e.inflate_flush(f,c);default:return c=X,e.bitb=h,e.bitk=p,f.avail_in=O,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=m,e.inflate_flush(f,c)}}},e.free=function(f){e.reset(f,null),e.win=null,b=null},e.set_dictionary=function(f,c,u){e.win.set(f.subarray(c,c+u),0),e.read=e.write=u},e.sync_point=function(){return n==tt?1:0}}const kr=32,Lr=8,Fr=0,nn=1,sn=2,rn=3,an=4,on=5,nt=6,Se=7,cn=12,oe=13,Mr=[0,0,255,255];function vr(){const s=this;s.mode=0,s.method=0,s.was=[0],s.need=0,s.marker=0,s.wbits=0;function t(e){return!e||!e.istate?X:(e.total_in=e.total_out=0,e.msg=null,e.istate.mode=Se,e.istate.blocks.reset(e,null),F)}s.inflateEnd=function(e){return s.blocks&&s.blocks.free(e),s.blocks=null,F},s.inflateInit=function(e,n){return e.msg=null,s.blocks=null,n<8||n>15?(s.inflateEnd(e),X):(s.wbits=n,e.istate.blocks=new Dr(e,1<<n),t(e),F)},s.inflate=function(e,n){let r,i;if(!e||!e.istate||!e.next_in)return X;const a=e.istate;for(n=n==xr?re:F,r=re;;)switch(a.mode){case Fr:if(e.avail_in===0)return r;if(r=n,e.avail_in--,e.total_in++,((a.method=e.read_byte(e.next_in_index++))&15)!=Lr){a.mode=oe,e.msg="unknown compression method",a.marker=5;break}if((a.method>>4)+8>a.wbits){a.mode=oe,e.msg="invalid win size",a.marker=5;break}a.mode=nn;case nn:if(e.avail_in===0)return r;if(r=n,e.avail_in--,e.total_in++,i=e.read_byte(e.next_in_index++)&255,((a.method<<8)+i)%31!==0){a.mode=oe,e.msg="incorrect header check",a.marker=5;break}if((i&kr)===0){a.mode=Se;break}a.mode=sn;case sn:if(e.avail_in===0)return r;r=n,e.avail_in--,e.total_in++,a.need=(e.read_byte(e.next_in_index++)&255)<<24&4278190080,a.mode=rn;case rn:if(e.avail_in===0)return r;r=n,e.avail_in--,e.total_in++,a.need+=(e.read_byte(e.next_in_index++)&255)<<16&16711680,a.mode=an;case an:if(e.avail_in===0)return r;r=n,e.avail_in--,e.total_in++,a.need+=(e.read_byte(e.next_in_index++)&255)<<8&65280,a.mode=on;case on:return e.avail_in===0?r:(r=n,e.avail_in--,e.total_in++,a.need+=e.read_byte(e.next_in_index++)&255,a.mode=nt,yr);case nt:return a.mode=oe,e.msg="need dictionary",a.marker=0,X;case Se:if(r=a.blocks.proc(e,r),r==B){a.mode=oe,a.marker=0;break}if(r==F&&(r=n),r!=se)return r;r=n,a.blocks.reset(e,a.was),a.mode=cn;case cn:return e.avail_in=0,se;case oe:return B;default:return X}},s.inflateSetDictionary=function(e,n,r){let i=0,a=r;if(!e||!e.istate||e.istate.mode!=nt)return X;const o=e.istate;return a>=1<<o.wbits&&(a=(1<<o.wbits)-1,i=r-a),o.blocks.set_dictionary(n,i,a),o.mode=Se,F},s.inflateSync=function(e){let n,r,i,a,o;if(!e||!e.istate)return X;const l=e.istate;if(l.mode!=oe&&(l.mode=oe,l.marker=0),(n=e.avail_in)===0)return re;for(r=e.next_in_index,i=l.marker;n!==0&&i<4;)e.read_byte(r)==Mr[i]?i++:e.read_byte(r)!==0?i=0:i=4-i,r++,n--;return e.total_in+=r-e.next_in_index,e.next_in_index=r,e.avail_in=n,l.marker=i,i!=4?B:(a=e.total_in,o=e.total_out,t(e),e.total_in=a,e.total_out=o,l.mode=Se,F)},s.inflateSyncPoint=function(e){return!e||!e.istate||!e.istate.blocks?X:e.istate.blocks.sync_point()}}function Yn(){}Yn.prototype={inflateInit(s){const t=this;return t.istate=new vr,s||(s=br),t.istate.inflateInit(t,s)},inflate(s){const t=this;return t.istate?t.istate.inflate(t,s):X},inflateEnd(){const s=this;if(!s.istate)return X;const t=s.istate.inflateEnd(s);return s.istate=null,t},inflateSync(){const s=this;return s.istate?s.istate.inflateSync(s):X},inflateSetDictionary(s,t){const e=this;return e.istate?e.istate.inflateSetDictionary(e,s,t):X},read_byte(s){return this.next_in[s]},read_buf(s,t){return this.next_in.subarray(s,s+t)}};function Ur(s){const t=this,e=new Yn,n=s&&s.chunkSize?Math.floor(s.chunkSize*2):128*1024,r=Er,i=new Uint8Array(n);let a=!1;e.inflateInit(),e.next_out=i,t.append=function(o,l){const _=[];let d,g,b=0,A=0,T=0;if(o.length!==0){e.next_in_index=0,e.next_in=o,e.avail_in=o.length;do{if(e.next_out_index=0,e.avail_out=n,e.avail_in===0&&!a&&(e.next_in_index=0,a=!0),d=e.inflate(r),a&&d===re){if(e.avail_in!==0)throw new Error("inflating: bad input")}else if(d!==F&&d!==se)throw new Error("inflating: "+e.msg);if((a||d===se)&&e.avail_in===o.length)throw new Error("inflating: bad input");e.next_out_index&&(e.next_out_index===n?_.push(new Uint8Array(i)):_.push(i.subarray(0,e.next_out_index))),T+=e.next_out_index,l&&e.next_in_index>0&&e.next_in_index!=b&&(l(e.next_in_index),b=e.next_in_index)}while(e.avail_in>0||e.avail_out===0);return _.length>1?(g=new Uint8Array(T),_.forEach(function(f){g.set(f,A),A+=f.length})):g=_[0]?new Uint8Array(_[0]):new Uint8Array,g}},t.flush=function(){e.inflateEnd()}}const me=4294967295,fe=65535,Hr=8,Wr=0,Br=99,jr=67324752,qn=134695760,Gr=qn,ln=33639248,Yr=101010256,fn=101075792,qr=117853008,ne=22,st=20,rt=56,Vr=12,Zr=20,un=4,Kr=1,Xr=39169,$r=10,Jr=1,Qr=21589,zr=28789,ei=25461,ti=6534,dn=1,ni=6,_n=8,hn=2048,pn=16,si=61440,ri=16384,ii=73,mn="/",it=30,ai=10,oi=14,ci=18,G=void 0,_e="undefined",ke="function";class wn{constructor(t){return class extends TransformStream{constructor(e,n){const r=new t(n);super({transform(i,a){a.enqueue(r.append(i))},flush(i){const a=r.flush();a&&i.enqueue(a)}})}}}}const li=64;let Vn=2;try{typeof navigator!=_e&&navigator.hardwareConcurrency&&(Vn=navigator.hardwareConcurrency)}catch{}const fi={chunkSize:512*1024,maxWorkers:Vn,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:G,CompressionStreamNative:typeof CompressionStream!=_e&&CompressionStream,DecompressionStreamNative:typeof DecompressionStream!=_e&&DecompressionStream},ue=Object.assign({},fi);function Zn(){return ue}function ui(s){return Math.max(s.chunkSize,li)}function Kn(s){const{baseURL:t,chunkSize:e,maxWorkers:n,terminateWorkerTimeout:r,useCompressionStream:i,useWebWorkers:a,Deflate:o,Inflate:l,CompressionStream:_,DecompressionStream:d,workerScripts:g}=s;if(ce("baseURL",t),ce("chunkSize",e),ce("maxWorkers",n),ce("terminateWorkerTimeout",r),ce("useCompressionStream",i),ce("useWebWorkers",a),o&&(ue.CompressionStream=new wn(o)),l&&(ue.DecompressionStream=new wn(l)),ce("CompressionStream",_),ce("DecompressionStream",d),g!==G){const{deflate:b,inflate:A}=g;if((b||A)&&(ue.workerScripts||(ue.workerScripts={})),b){if(!Array.isArray(b))throw new Error("workerScripts.deflate must be an array");ue.workerScripts.deflate=b}if(A){if(!Array.isArray(A))throw new Error("workerScripts.inflate must be an array");ue.workerScripts.inflate=A}}}function ce(s,t){t!==G&&(ue[s]=t)}function di(){return"application/octet-stream"}const Xn=[];for(let s=0;s<256;s++){let t=s;for(let e=0;e<8;e++)t&1?t=t>>>1^3988292384:t=t>>>1;Xn[s]=t}class Ze{constructor(t){this.crc=t||-1}append(t){let e=this.crc|0;for(let n=0,r=t.length|0;n<r;n++)e=e>>>8^Xn[(e^t[n])&255];this.crc=e}get(){return~this.crc}}class $n extends TransformStream{constructor(){let t;const e=new Ze;super({transform(n,r){e.append(n),r.enqueue(n)},flush(){const n=new Uint8Array(4);new DataView(n.buffer).setUint32(0,e.get()),t.value=n}}),t=this}}function _i(s){if(typeof TextEncoder==_e){s=unescape(encodeURIComponent(s));const t=new Uint8Array(s.length);for(let e=0;e<t.length;e++)t[e]=s.charCodeAt(e);return t}else return new TextEncoder().encode(s)}const K={concat(s,t){if(s.length===0||t.length===0)return s.concat(t);const e=s[s.length-1],n=K.getPartial(e);return n===32?s.concat(t):K._shiftRight(t,n,e|0,s.slice(0,s.length-1))},bitLength(s){const t=s.length;if(t===0)return 0;const e=s[t-1];return(t-1)*32+K.getPartial(e)},clamp(s,t){if(s.length*32<t)return s;s=s.slice(0,Math.ceil(t/32));const e=s.length;return t=t&31,e>0&&t&&(s[e-1]=K.partial(t,s[e-1]&2147483648>>t-1,1)),s},partial(s,t,e){return s===32?t:(e?t|0:t<<32-s)+s*1099511627776},getPartial(s){return Math.round(s/1099511627776)||32},_shiftRight(s,t,e,n){for(n===void 0&&(n=[]);t>=32;t-=32)n.push(e),e=0;if(t===0)return n.concat(s);for(let a=0;a<s.length;a++)n.push(e|s[a]>>>t),e=s[a]<<32-t;const r=s.length?s[s.length-1]:0,i=K.getPartial(r);return n.push(K.partial(t+i&31,t+i>32?e:n.pop(),1)),n}},Ke={bytes:{fromBits(s){const e=K.bitLength(s)/8,n=new Uint8Array(e);let r;for(let i=0;i<e;i++)(i&3)===0&&(r=s[i/4]),n[i]=r>>>24,r<<=8;return n},toBits(s){const t=[];let e,n=0;for(e=0;e<s.length;e++)n=n<<8|s[e],(e&3)===3&&(t.push(n),n=0);return e&3&&t.push(K.partial(8*(e&3),n)),t}}},Jn={};Jn.sha1=class{constructor(s){const t=this;t.blockSize=512,t._init=[1732584193,4023233417,2562383102,271733878,3285377520],t._key=[1518500249,1859775393,2400959708,3395469782],s?(t._h=s._h.slice(0),t._buffer=s._buffer.slice(0),t._length=s._length):t.reset()}reset(){const s=this;return s._h=s._init.slice(0),s._buffer=[],s._length=0,s}update(s){const t=this;typeof s=="string"&&(s=Ke.utf8String.toBits(s));const e=t._buffer=K.concat(t._buffer,s),n=t._length,r=t._length=n+K.bitLength(s);if(r>9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const i=new Uint32Array(e);let a=0;for(let o=t.blockSize+n-(t.blockSize+n&t.blockSize-1);o<=r;o+=t.blockSize)t._block(i.subarray(16*a,16*(a+1))),a+=1;return e.splice(0,16*a),t}finalize(){const s=this;let t=s._buffer;const e=s._h;t=K.concat(t,[K.partial(1,1)]);for(let n=t.length+2;n&15;n++)t.push(0);for(t.push(Math.floor(s._length/4294967296)),t.push(s._length|0);t.length;)s._block(t.splice(0,16));return s.reset(),e}_f(s,t,e,n){if(s<=19)return t&e|~t&n;if(s<=39)return t^e^n;if(s<=59)return t&e|t&n|e&n;if(s<=79)return t^e^n}_S(s,t){return t<<s|t>>>32-s}_block(s){const t=this,e=t._h,n=Array(80);for(let _=0;_<16;_++)n[_]=s[_];let r=e[0],i=e[1],a=e[2],o=e[3],l=e[4];for(let _=0;_<=79;_++){_>=16&&(n[_]=t._S(1,n[_-3]^n[_-8]^n[_-14]^n[_-16]));const d=t._S(5,r)+t._f(_,i,a,o)+l+n[_]+t._key[Math.floor(_/20)]|0;l=o,o=a,a=t._S(30,i),i=r,r=d}e[0]=e[0]+r|0,e[1]=e[1]+i|0,e[2]=e[2]+a|0,e[3]=e[3]+o|0,e[4]=e[4]+l|0}};const Qn={};Qn.aes=class{constructor(s){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const e=t._tables[0][4],n=t._tables[1],r=s.length;let i,a,o,l=1;if(r!==4&&r!==6&&r!==8)throw new Error("invalid aes key size");for(t._key=[a=s.slice(0),o=[]],i=r;i<4*r+28;i++){let _=a[i-1];(i%r===0||r===8&&i%r===4)&&(_=e[_>>>24]<<24^e[_>>16&255]<<16^e[_>>8&255]<<8^e[_&255],i%r===0&&(_=_<<8^_>>>24^l<<24,l=l<<1^(l>>7)*283)),a[i]=a[i-r]^_}for(let _=0;i;_++,i--){const d=a[_&3?i:i-4];i<=4||_<4?o[_]=d:o[_]=n[0][e[d>>>24]]^n[1][e[d>>16&255]]^n[2][e[d>>8&255]]^n[3][e[d&255]]}}encrypt(s){return this._crypt(s,0)}decrypt(s){return this._crypt(s,1)}_precompute(){const s=this._tables[0],t=this._tables[1],e=s[4],n=t[4],r=[],i=[];let a,o,l,_;for(let d=0;d<256;d++)i[(r[d]=d<<1^(d>>7)*283)^d]=d;for(let d=a=0;!e[d];d^=o||1,a=i[a]||1){let g=a^a<<1^a<<2^a<<3^a<<4;g=g>>8^g&255^99,e[d]=g,n[g]=d,_=r[l=r[o=r[d]]];let b=_*16843009^l*65537^o*257^d*16843008,A=r[g]*257^g*16843008;for(let T=0;T<4;T++)s[T][d]=A=A<<24^A>>>8,t[T][g]=b=b<<24^b>>>8}for(let d=0;d<5;d++)s[d]=s[d].slice(0),t[d]=t[d].slice(0)}_crypt(s,t){if(s.length!==4)throw new Error("invalid aes block size");const e=this._key[t],n=e.length/4-2,r=[0,0,0,0],i=this._tables[t],a=i[0],o=i[1],l=i[2],_=i[3],d=i[4];let g=s[0]^e[0],b=s[t?3:1]^e[1],A=s[2]^e[2],T=s[t?1:3]^e[3],f=4,c,u,h;for(let p=0;p<n;p++)c=a[g>>>24]^o[b>>16&255]^l[A>>8&255]^_[T&255]^e[f],u=a[b>>>24]^o[A>>16&255]^l[T>>8&255]^_[g&255]^e[f+1],h=a[A>>>24]^o[T>>16&255]^l[g>>8&255]^_[b&255]^e[f+2],T=a[T>>>24]^o[g>>16&255]^l[b>>8&255]^_[A&255]^e[f+3],f+=4,g=c,b=u,A=h;for(let p=0;p<4;p++)r[t?3&-p:p]=d[g>>>24]<<24^d[b>>16&255]<<16^d[A>>8&255]<<8^d[T&255]^e[f++],c=g,g=b,b=A,A=T,T=c;return r}};const hi={getRandomValues(s){const t=new Uint32Array(s.buffer),e=n=>{let r=987654321;const i=4294967295;return function(){return r=36969*(r&65535)+(r>>16)&i,n=18e3*(n&65535)+(n>>16)&i,(((r<<16)+n&i)/4294967296+.5)*(Math.random()>.5?1:-1)}};for(let n=0,r;n<s.length;n+=4){const i=e((r||Math.random())*4294967296);r=i()*987654071,t[n/4]=i()*4294967296|0}return s}},zn={};zn.ctrGladman=class{constructor(s,t){this._prf=s,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(s){return this.calculate(this._prf,s,this._iv)}incWord(s){if((s>>24&255)===255){let t=s>>16&255,e=s>>8&255,n=s&255;t===255?(t=0,e===255?(e=0,n===255?n=0:++n):++e):++t,s=0,s+=t<<16,s+=e<<8,s+=n}else s+=1<<24;return s}incCounter(s){(s[0]=this.incWord(s[0]))===0&&(s[1]=this.incWord(s[1]))}calculate(s,t,e){let n;if(!(n=t.length))return[];const r=K.bitLength(t);for(let i=0;i<n;i+=4){this.incCounter(e);const a=s.encrypt(e);t[i]^=a[0],t[i+1]^=a[1],t[i+2]^=a[2],t[i+3]^=a[3]}return K.clamp(t,r)}};const we={importKey(s){return new we.hmacSha1(Ke.bytes.toBits(s))},pbkdf2(s,t,e,n){if(e=e||1e4,n<0||e<0)throw new Error("invalid params to pbkdf2");const r=(n>>5)+1<<2;let i,a,o,l,_;const d=new ArrayBuffer(r),g=new DataView(d);let b=0;const A=K;for(t=Ke.bytes.toBits(t),_=1;b<(r||1);_++){for(i=a=s.encrypt(A.concat(t,[_])),o=1;o<e;o++)for(a=s.encrypt(a),l=0;l<a.length;l++)i[l]^=a[l];for(o=0;b<(r||1)&&o<i.length;o++)g.setInt32(b,i[o]),b+=4}return d.slice(0,n/8)}};we.hmacSha1=class{constructor(s){const t=this,e=t._hash=Jn.sha1,n=[[],[]];t._baseHash=[new e,new e];const r=t._baseHash[0].blockSize/32;s.length>r&&(s=new e().update(s).finalize());for(let i=0;i<r;i++)n[0][i]=s[i]^909522486,n[1][i]=s[i]^1549556828;t._baseHash[0].update(n[0]),t._baseHash[1].update(n[1]),t._resultHash=new e(t._baseHash[0])}reset(){const s=this;s._resultHash=new s._hash(s._baseHash[0]),s._updated=!1}update(s){const t=this;t._updated=!0,t._resultHash.update(s)}digest(){const s=this,t=s._resultHash.finalize(),e=new s._hash(s._baseHash[1]).update(t).finalize();return s.reset(),e}encrypt(s){if(this._updated)throw new Error("encrypt on already updated hmac called!");return this.update(s),this.digest(s)}};const pi=typeof crypto!=_e&&typeof crypto.getRandomValues==ke,Et="Invalid password",xt="Invalid signature",Tt="zipjs-abort-check-password";function es(s){return pi?crypto.getRandomValues(s):hi.getRandomValues(s)}const be=16,mi="raw",ts={name:"PBKDF2"},wi={name:"HMAC"},gi="SHA-1",bi=Object.assign({hash:wi},ts),dt=Object.assign({iterations:1e3,hash:{name:gi}},ts),yi=["deriveBits"],Ie=[8,12,16],Re=[16,24,32],le=10,Ei=[0,0,0,0],Je=typeof crypto!=_e,Le=Je&&crypto.subtle,ns=Je&&typeof Le!=_e,ee=Ke.bytes,xi=Qn.aes,Ti=zn.ctrGladman,Si=we.hmacSha1;let gn=Je&&ns&&typeof Le.importKey==ke,bn=Je&&ns&&typeof Le.deriveBits==ke;class Ri extends TransformStream{constructor({password:t,rawPassword:e,signed:n,encryptionStrength:r,checkPasswordOnly:i}){super({start(){Object.assign(this,{ready:new Promise(a=>this.resolveReady=a),password:is(t,e),signed:n,strength:r-1,pending:new Uint8Array})},async transform(a,o){const l=this,{password:_,strength:d,resolveReady:g,ready:b}=l;_?(await Oi(l,d,_,J(a,0,Ie[d]+2)),a=J(a,Ie[d]+2),i?o.error(new Error(Tt)):g()):await b;const A=new Uint8Array(a.length-le-(a.length-le)%be);o.enqueue(ss(l,a,A,0,le,!0))},async flush(a){const{signed:o,ctr:l,hmac:_,pending:d,ready:g}=this;if(_&&l){await g;const b=J(d,0,d.length-le),A=J(d,d.length-le);let T=new Uint8Array;if(b.length){const f=Ne(ee,b);_.update(f);const c=l.update(f);T=Ce(ee,c)}if(o){const f=J(Ce(ee,_.digest()),0,le);for(let c=0;c<le;c++)if(f[c]!=A[c])throw new Error(xt)}a.enqueue(T)}}})}}class Ai extends TransformStream{constructor({password:t,rawPassword:e,encryptionStrength:n}){let r;super({start(){Object.assign(this,{ready:new Promise(i=>this.resolveReady=i),password:is(t,e),strength:n-1,pending:new Uint8Array})},async transform(i,a){const o=this,{password:l,strength:_,resolveReady:d,ready:g}=o;let b=new Uint8Array;l?(b=await Ii(o,_,l),d()):await g;const A=new Uint8Array(b.length+i.length-i.length%be);A.set(b,0),a.enqueue(ss(o,i,A,b.length,0))},async flush(i){const{ctr:a,hmac:o,pending:l,ready:_}=this;if(o&&a){await _;let d=new Uint8Array;if(l.length){const g=a.update(Ne(ee,l));o.update(g),d=Ce(ee,g)}r.signature=Ce(ee,o.digest()).slice(0,le),i.enqueue(St(d,r.signature))}}}),r=this}}function ss(s,t,e,n,r,i){const{ctr:a,hmac:o,pending:l}=s,_=t.length-r;l.length&&(t=St(l,t),e=Pi(e,_-_%be));let d;for(d=0;d<=_-be;d+=be){const g=Ne(ee,J(t,d,d+be));i&&o.update(g);const b=a.update(g);i||o.update(b),e.set(Ce(ee,b),d+n)}return s.pending=J(t,d),e}async function Oi(s,t,e,n){const r=await rs(s,t,e,J(n,0,Ie[t])),i=J(n,Ie[t]);if(r[0]!=i[0]||r[1]!=i[1])throw new Error(Et)}async function Ii(s,t,e){const n=es(new Uint8Array(Ie[t])),r=await rs(s,t,e,n);return St(n,r)}async function rs(s,t,e,n){s.password=null;const r=await Ci(mi,e,bi,!1,yi),i=await Ni(Object.assign({salt:n},dt),r,8*(Re[t]*2+2)),a=new Uint8Array(i),o=Ne(ee,J(a,0,Re[t])),l=Ne(ee,J(a,Re[t],Re[t]*2)),_=J(a,Re[t]*2);return Object.assign(s,{keys:{key:o,authentication:l,passwordVerification:_},ctr:new Ti(new xi(o),Array.from(Ei)),hmac:new Si(l)}),_}async function Ci(s,t,e,n,r){if(gn)try{return await Le.importKey(s,t,e,n,r)}catch{return gn=!1,we.importKey(t)}else return we.importKey(t)}async function Ni(s,t,e){if(bn)try{return await Le.deriveBits(s,t,e)}catch{return bn=!1,we.pbkdf2(t,s.salt,dt.iterations,e)}else return we.pbkdf2(t,s.salt,dt.iterations,e)}function is(s,t){return t===G?_i(s):t}function St(s,t){let e=s;return s.length+t.length&&(e=new Uint8Array(s.length+t.length),e.set(s,0),e.set(t,s.length)),e}function Pi(s,t){if(t&&t>s.length){const e=s;s=new Uint8Array(t),s.set(e,0)}return s}function J(s,t,e){return s.subarray(t,e)}function Ce(s,t){return s.fromBits(t)}function Ne(s,t){return s.toBits(t)}const Oe=12;class Di extends TransformStream{constructor({password:t,passwordVerification:e,checkPasswordOnly:n}){super({start(){Object.assign(this,{password:t,passwordVerification:e}),as(this,t)},transform(r,i){const a=this;if(a.password){const o=yn(a,r.subarray(0,Oe));if(a.password=null,o.at(-1)!=a.passwordVerification)throw new Error(Et);r=r.subarray(Oe)}n?i.error(new Error(Tt)):i.enqueue(yn(a,r))}})}}class ki extends TransformStream{constructor({password:t,passwordVerification:e}){super({start(){Object.assign(this,{password:t,passwordVerification:e}),as(this,t)},transform(n,r){const i=this;let a,o;if(i.password){i.password=null;const l=es(new Uint8Array(Oe));l[Oe-1]=i.passwordVerification,a=new Uint8Array(n.length+l.length),a.set(En(i,l),0),o=Oe}else a=new Uint8Array(n.length),o=0;a.set(En(i,n),o),r.enqueue(a)}})}}function yn(s,t){const e=new Uint8Array(t.length);for(let n=0;n<t.length;n++)e[n]=os(s)^t[n],Rt(s,e[n]);return e}function En(s,t){const e=new Uint8Array(t.length);for(let n=0;n<t.length;n++)e[n]=os(s)^t[n],Rt(s,t[n]);return e}function as(s,t){const e=[305419896,591751049,878082192];Object.assign(s,{keys:e,crcKey0:new Ze(e[0]),crcKey2:new Ze(e[2])});for(let n=0;n<t.length;n++)Rt(s,t.charCodeAt(n))}function Rt(s,t){let[e,n,r]=s.keys;s.crcKey0.append([t]),e=~s.crcKey0.get(),n=xn(Math.imul(xn(n+cs(e)),134775813)+1),s.crcKey2.append([n>>>24]),r=~s.crcKey2.get(),s.keys=[e,n,r]}function os(s){const t=s.keys[2]|2;return cs(Math.imul(t,t^1)>>>8)}function cs(s){return s&255}function xn(s){return s&4294967295}const At="Invalid uncompressed size",Tn="deflate-raw";class Li extends TransformStream{constructor(t,{chunkSize:e,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:i,encrypted:a,useCompressionStream:o,zipCrypto:l,signed:_,level:d}=t,g=this;let b,A,T=super.readable;(!a||l)&&_&&(b=new $n,T=ie(T,b)),i&&(T=fs(T,o,{level:d,chunkSize:e},r,n)),a&&(l?T=ie(T,new ki(t)):(A=new Ai(t),T=ie(T,A))),ls(g,T,()=>{let f;a&&!l&&(f=A.signature),(!a||l)&&_&&(f=new DataView(b.value.buffer).getUint32(0)),g.signature=f})}}class Fi extends TransformStream{constructor(t,{chunkSize:e,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:a,signed:o,signature:l,compressed:_,useCompressionStream:d}=t;let g,b,A=super.readable;a&&(i?A=ie(A,new Di(t)):(b=new Ri(t),A=ie(A,b))),_&&(A=fs(A,d,{chunkSize:e},r,n)),(!a||i)&&o&&(g=new $n,A=ie(A,g)),ls(this,A,()=>{if((!a||i)&&o){const T=new DataView(g.value.buffer);if(l!=T.getUint32(0,!1))throw new Error(xt)}})}}function ls(s,t,e){t=ie(t,new TransformStream({flush:e})),Object.defineProperty(s,"readable",{get(){return t}})}function fs(s,t,e,n,r){try{const i=t&&n?n:r;s=ie(s,new i(Tn,e))}catch(i){if(t)s=ie(s,new r(Tn,e));else throw i}return s}function ie(s,t){return s.pipeThrough(t)}const Mi="message",vi="start",Ui="pull",Sn="data",Hi="ack",Rn="close",Wi="deflate",us="inflate";class Bi extends TransformStream{constructor(t,e){super({});const n=this,{codecType:r}=t;let i;r.startsWith(Wi)?i=Li:r.startsWith(us)&&(i=Fi),n.outputSize=0;let a=0;const o=new i(t,e),l=super.readable,_=new TransformStream({transform(g,b){g&&g.length&&(a+=g.length,b.enqueue(g))},flush(){Object.assign(n,{inputSize:a})}}),d=new TransformStream({transform(g,b){if(g&&g.length&&(b.enqueue(g),n.outputSize+=g.length,t.outputSize&&n.outputSize>t.outputSize))throw new Error(At)},flush(){const{signature:g}=o;Object.assign(n,{signature:g,inputSize:a})}});Object.defineProperty(n,"readable",{get(){return l.pipeThrough(_).pipeThrough(o).pipeThrough(d)}})}}class ji extends TransformStream{constructor(t){let e;super({transform:n,flush(r){e&&e.length&&r.enqueue(e)}});function n(r,i){if(e){const a=new Uint8Array(e.length+r.length);a.set(e),a.set(r,e.length),r=a,e=null}r.length>t?(i.enqueue(r.slice(0,t)),n(r.slice(t),i)):e=r}}}let ds=typeof Worker!=_e;class at{constructor(t,{readable:e,writable:n},{options:r,config:i,streamOptions:a,useWebWorkers:o,transferStreams:l,scripts:_},d){const{signal:g}=a;return Object.assign(t,{busy:!0,readable:e.pipeThrough(new ji(i.chunkSize)).pipeThrough(new Gi(a),{signal:g}),writable:n,options:Object.assign({},r),scripts:_,transferStreams:l,terminate(){return new Promise(b=>{const{worker:A,busy:T}=t;A?(T?t.resolveTerminated=b:(A.terminate(),b()),t.interface=null):b()})},onTaskFinished(){const{resolveTerminated:b}=t;b&&(t.resolveTerminated=null,t.terminated=!0,t.worker.terminate(),b()),t.busy=!1,d(t)}}),(o&&ds?Yi:_s)(t,i)}}class Gi extends TransformStream{constructor({onstart:t,onprogress:e,size:n,onend:r}){let i=0;super({async start(){t&&await ot(t,n)},async transform(a,o){i+=a.length,e&&await ot(e,i,n),o.enqueue(a)},async flush(){r&&await ot(r,i)}})}}async function ot(s,...t){try{await s(...t)}catch{}}function _s(s,t){return{run:()=>qi(s,t)}}function Yi(s,t){const{baseURL:e,chunkSize:n}=t;if(!s.interface){let r;try{r=Ki(s.scripts[0],e,s)}catch{return ds=!1,_s(s,t)}Object.assign(s,{worker:r,interface:{run:()=>Vi(s,{chunkSize:n})}})}return s.interface}async function qi({options:s,readable:t,writable:e,onTaskFinished:n},r){let i;try{i=new Bi(s,r),await t.pipeThrough(i).pipeTo(e,{preventClose:!0,preventAbort:!0});const{signature:a,inputSize:o,outputSize:l}=i;return{signature:a,inputSize:o,outputSize:l}}catch(a){throw i&&(a.outputSize=i.outputSize),a}finally{n()}}async function Vi(s,t){let e,n;const r=new Promise((b,A)=>{e=b,n=A});Object.assign(s,{reader:null,writer:null,resolveResult:e,rejectResult:n,result:r});const{readable:i,options:a,scripts:o}=s,{writable:l,closed:_}=Zi(s.writable),d=Ye({type:vi,scripts:o.slice(1),options:a,config:t,readable:i,writable:l},s);d||Object.assign(s,{reader:i.getReader(),writer:l.getWriter()});const g=await r;return d||await l.getWriter().close(),await _,g}function Zi(s){let t;const e=new Promise(r=>t=r);return{writable:new WritableStream({async write(r){const i=s.getWriter();await i.ready,await i.write(r),i.releaseLock()},close(){t()},abort(r){return s.getWriter().abort(r)}}),closed:e}}let An=!0,On=!0;function Ki(s,t,e){const n={type:"module"};let r,i;typeof s==ke&&(s=s());try{r=new URL(s,t)}catch{r=s}if(An)try{i=new Worker(r)}catch{An=!1,i=new Worker(r,n)}else i=new Worker(r,n);return i.addEventListener(Mi,a=>Xi(a,e)),i}function Ye(s,{worker:t,writer:e,onTaskFinished:n,transferStreams:r}){try{const{value:i,readable:a,writable:o}=s,l=[];if(i&&(i.byteLength<i.buffer.byteLength?s.value=i.buffer.slice(0,i.byteLength):s.value=i.buffer,l.push(s.value)),r&&On?(a&&l.push(a),o&&l.push(o)):s.readable=s.writable=null,l.length)try{return t.postMessage(s,l),!0}catch{On=!1,s.readable=s.writable=null,t.postMessage(s)}else t.postMessage(s)}catch(i){throw e&&e.releaseLock(),n(),i}}async function Xi({data:s},t){const{type:e,value:n,messageId:r,result:i,error:a}=s,{reader:o,writer:l,resolveResult:_,rejectResult:d,onTaskFinished:g}=t;try{if(a){const{message:A,stack:T,code:f,name:c,outputSize:u}=a,h=new Error(A);Object.assign(h,{stack:T,code:f,name:c,outputSize:u}),b(h)}else{if(e==Ui){const{value:A,done:T}=await o.read();Ye({type:Sn,value:A,done:T,messageId:r},t)}e==Sn&&(await l.ready,await l.write(new Uint8Array(n)),Ye({type:Hi,messageId:r},t)),e==Rn&&b(null,i)}}catch(A){Ye({type:Rn,messageId:r},t),b(A)}function b(A,T){A?d(A):_(T),l&&l.releaseLock(),g()}}let de=[];const ct=[];let In=0;async function $i(s,t){const{options:e,config:n}=t,{transferStreams:r,useWebWorkers:i,useCompressionStream:a,codecType:o,compressed:l,signed:_,encrypted:d}=e,{workerScripts:g,maxWorkers:b}=n;t.transferStreams=r||r===G;const A=!l&&!_&&!d&&!t.transferStreams;return t.useWebWorkers=!A&&(i||i===G&&n.useWebWorkers),t.scripts=t.useWebWorkers&&g?g[o]:[],e.useCompressionStream=a||a===G&&n.useCompressionStream,(await T()).run();async function T(){const c=de.find(u=>!u.busy);if(c)return _t(c),new at(c,s,t,f);if(de.length<b){const u={indexWorker:In};return In++,de.push(u),new at(u,s,t,f)}else return new Promise(u=>ct.push({resolve:u,stream:s,workerOptions:t}))}function f(c){if(ct.length){const[{resolve:u,stream:h,workerOptions:p}]=ct.splice(0,1);u(new at(c,h,p,f))}else c.worker?(_t(c),Ji(c,t)):de=de.filter(u=>u!=c)}}function Ji(s,t){const{config:e}=t,{terminateWorkerTimeout:n}=e;Number.isFinite(n)&&n>=0&&(s.terminated?s.terminated=!1:s.terminateTimeout=setTimeout(async()=>{de=de.filter(r=>r!=s);try{await s.terminate()}catch{}},n))}function _t(s){const{terminateTimeout:t}=s;t&&(clearTimeout(t),s.terminateTimeout=null)}async function Qi(){await Promise.allSettled(de.map(s=>(_t(s),s.terminate())))}const hs="HTTP error ",Fe="HTTP Range not supported",ps="Writer iterator completed too soon",ms="Writer not initialized",zi="text/plain",ea="Content-Length",ta="Content-Range",na="Accept-Ranges",sa="Range",ra="Content-Type",ia="HEAD",Ot="GET",ws="bytes",aa=64*1024,It="writable";class Qe{constructor(){this.size=0}init(){this.initialized=!0}}class he extends Qe{get readable(){const t=this,{chunkSize:e=aa}=t,n=new ReadableStream({start(){this.chunkOffset=0},async pull(r){const{offset:i=0,size:a,diskNumberStart:o}=n,{chunkOffset:l}=this,_=a===G?e:Math.min(e,a-l),d=await Y(t,i+l,_,o);r.enqueue(d),l+e>a||a===G&&!d.length&&_?r.close():this.chunkOffset+=e}});return n}}class Ct extends Qe{constructor(){super();const t=this,e=new WritableStream({write(n){if(!t.initialized)throw new Error(ms);return t.writeUint8Array(n)}});Object.defineProperty(t,It,{get(){return e}})}writeUint8Array(){}}class oa extends he{constructor(t){super();let e=t.length;for(;t.charAt(e-1)=="=";)e--;const n=t.indexOf(",")+1;Object.assign(this,{dataURI:t,dataStart:n,size:Math.floor((e-n)*.75)})}readUint8Array(t,e){const{dataStart:n,dataURI:r}=this,i=new Uint8Array(e),a=Math.floor(t/3)*4,o=atob(r.substring(a+n,Math.ceil((t+e)/3)*4+n)),l=t-Math.floor(a/4)*3;let _=0;for(let d=l;d<l+e&&d<o.length;d++)i[d-l]=o.charCodeAt(d),_++;return _<i.length?i.subarray(0,_):i}}class ca extends Ct{constructor(t){super(),Object.assign(this,{data:"data:"+(t||"")+";base64,",pending:[]})}writeUint8Array(t){const e=this;let n=0,r=e.pending;const i=e.pending.length;for(e.pending="",n=0;n<Math.floor((i+t.length)/3)*3-i;n++)r+=String.fromCharCode(t[n]);for(;n<t.length;n++)e.pending+=String.fromCharCode(t[n]);r.length&&(r.length>2?e.data+=btoa(r):e.pending+=r)}getData(){return this.data+btoa(this.pending)}}class Nt extends he{constructor(t){super(),Object.assign(this,{blob:t,size:t.size})}async readUint8Array(t,e){const n=this,r=t+e;let a=await(t||r<n.size?n.blob.slice(t,r):n.blob).arrayBuffer();return a.byteLength>e&&(a=a.slice(t,r)),new Uint8Array(a)}}class gs extends Qe{constructor(t){super();const e=this,n=new TransformStream,r=[];t&&r.push([ra,t]),Object.defineProperty(e,It,{get(){return n.writable}}),e.blob=new Response(n.readable,{headers:r}).blob()}getData(){return this.blob}}class la extends Nt{constructor(t){super(new Blob([t],{type:zi}))}}class fa extends gs{constructor(t){super(t),Object.assign(this,{encoding:t,utf8:!t||t.toLowerCase()=="utf-8"})}async getData(){const{encoding:t,utf8:e}=this,n=await super.getData();if(n.text&&e)return n.text();{const r=new FileReader;return new Promise((i,a)=>{Object.assign(r,{onload:({target:o})=>i(o.result),onerror:()=>a(r.error)}),r.readAsText(n,t)})}}}class ua extends he{constructor(t,e){super(),bs(this,t,e)}async init(){await ys(this,ht,Cn),super.init()}readUint8Array(t,e){return Es(this,t,e,ht,Cn)}}class da extends he{constructor(t,e){super(),bs(this,t,e)}async init(){await ys(this,pt,Nn),super.init()}readUint8Array(t,e){return Es(this,t,e,pt,Nn)}}function bs(s,t,e){const{preventHeadRequest:n,useRangeHeader:r,forceRangeRequests:i,combineSizeEocd:a}=e;e=Object.assign({},e),delete e.preventHeadRequest,delete e.useRangeHeader,delete e.forceRangeRequests,delete e.combineSizeEocd,delete e.useXHR,Object.assign(s,{url:t,options:e,preventHeadRequest:n,useRangeHeader:r,forceRangeRequests:i,combineSizeEocd:a})}async function ys(s,t,e){const{url:n,preventHeadRequest:r,useRangeHeader:i,forceRangeRequests:a,combineSizeEocd:o}=s;if(ma(n)&&(i||a)&&(typeof r>"u"||r)){const l=await t(Ot,s,xs(s,o?-ne:void 0));if(!a&&l.headers.get(na)!=ws)throw new Error(Fe);{o&&(s.eocdCache=new Uint8Array(await l.arrayBuffer()));let _;const d=l.headers.get(ta);if(d){const g=d.trim().split(/\s*\/\s*/);if(g.length){const b=g[1];b&&b!="*"&&(_=Number(b))}}_===G?await Pn(s,t,e):s.size=_}}else await Pn(s,t,e)}async function Es(s,t,e,n,r){const{useRangeHeader:i,forceRangeRequests:a,eocdCache:o,size:l,options:_}=s;if(i||a){if(o&&t==l-ne&&e==ne)return o;if(t>=l)return new Uint8Array;{t+e>l&&(e=l-t);const d=await n(Ot,s,xs(s,t,e));if(d.status!=206)throw new Error(Fe);return new Uint8Array(await d.arrayBuffer())}}else{const{data:d}=s;return d||await r(s,_),new Uint8Array(s.data.subarray(t,t+e))}}function xs(s,t=0,e=1){return Object.assign({},Pt(s),{[sa]:ws+"="+(t<0?t:t+"-"+(t+e-1))})}function Pt({options:s}){const{headers:t}=s;if(t)return Symbol.iterator in t?Object.fromEntries(t):t}async function Cn(s){await Ts(s,ht)}async function Nn(s){await Ts(s,pt)}async function Ts(s,t){const e=await t(Ot,s,Pt(s));s.data=new Uint8Array(await e.arrayBuffer()),s.size||(s.size=s.data.length)}async function Pn(s,t,e){if(s.preventHeadRequest)await e(s,s.options);else{const r=(await t(ia,s,Pt(s))).headers.get(ea);r?s.size=Number(r):await e(s,s.options)}}async function ht(s,{options:t,url:e},n){const r=await fetch(e,Object.assign({},t,{method:s,headers:n}));if(r.status<400)return r;throw r.status==416?new Error(Fe):new Error(hs+(r.statusText||r.status))}function pt(s,{url:t},e){return new Promise((n,r)=>{const i=new XMLHttpRequest;if(i.addEventListener("load",()=>{if(i.status<400){const a=[];i.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach(o=>{const l=o.trim().split(/\s*:\s*/);l[0]=l[0].trim().replace(/^[a-z]|-[a-z]/g,_=>_.toUpperCase()),a.push(l)}),n({status:i.status,arrayBuffer:()=>i.response,headers:new Map(a)})}else r(i.status==416?new Error(Fe):new Error(hs+(i.statusText||i.status)))},!1),i.addEventListener("error",a=>r(a.detail?a.detail.error:new Error("Network error")),!1),i.open(s,t),e)for(const a of Object.entries(e))i.setRequestHeader(a[0],a[1]);i.responseType="arraybuffer",i.send()})}class Ss extends he{constructor(t,e={}){super(),Object.assign(this,{url:t,reader:e.useXHR?new da(t,e):new ua(t,e)})}set size(t){}get size(){return this.reader.size}async init(){await this.reader.init(),super.init()}readUint8Array(t,e){return this.reader.readUint8Array(t,e)}}class _a extends Ss{constructor(t,e={}){e.useRangeHeader=!0,super(t,e)}}class ha extends he{constructor(t){super(),t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength),Object.assign(this,{array:t,size:t.length})}readUint8Array(t,e){return this.array.slice(t,t+e)}}class pa extends Ct{init(t=0){Object.assign(this,{offset:0,array:new Uint8Array(t)}),super.init()}writeUint8Array(t){const e=this;if(e.offset+t.length>e.array.length){const n=e.array;e.array=new Uint8Array(n.length+t.length),e.array.set(n)}e.array.set(t,e.offset),e.offset+=t.length}getData(){return this.array}}class Dt extends he{constructor(t){super(),this.readers=t}async init(){const t=this,{readers:e}=t;t.lastDiskNumber=0,t.lastDiskOffset=0,await Promise.all(e.map(async(n,r)=>{await n.init(),r!=e.length-1&&(t.lastDiskOffset+=n.size),t.size+=n.size})),super.init()}async readUint8Array(t,e,n=0){const r=this,{readers:i}=this;let a,o=n;o==-1&&(o=i.length-1);let l=t;for(;i[o]&&l>=i[o].size;)l-=i[o].size,o++;const _=i[o];if(_){const d=_.size;if(l+e<=d)a=await Y(_,l,e);else{const g=d-l;a=new Uint8Array(e);const b=await Y(_,l,g);a.set(b,0);const A=await r.readUint8Array(t+g,e-g,n);a.set(A,g),b.length+A.length<e&&(a=a.subarray(0,b.length+A.length))}}else a=new Uint8Array;return r.lastDiskNumber=Math.max(o,r.lastDiskNumber),a}}class Xe extends Qe{constructor(t,e=4294967295){super();const n=this;Object.assign(n,{diskNumber:0,diskOffset:0,size:0,maxSize:e,availableSize:e});let r,i,a;const o=new WritableStream({async write(d){const{availableSize:g}=n;if(a)d.length>=g?(await l(d.subarray(0,g)),await _(),n.diskOffset+=r.size,n.diskNumber++,a=null,await this.write(d.subarray(g))):await l(d);else{const{value:b,done:A}=await t.next();if(A&&!b)throw new Error(ps);r=b,r.size=0,r.maxSize&&(n.maxSize=r.maxSize),n.availableSize=n.maxSize,await Pe(r),i=b.writable,a=i.getWriter(),await this.write(d)}},async close(){await a.ready,await _()}});Object.defineProperty(n,It,{get(){return o}});async function l(d){const g=d.length;g&&(await a.ready,await a.write(d),r.size+=g,n.size+=g,n.availableSize-=g)}async function _(){await a.close()}}}class Rs{constructor(t){return Array.isArray(t)&&(t=new Dt(t)),t instanceof ReadableStream&&(t={readable:t}),t}}class As{constructor(t){return t.writable===G&&typeof t.next==ke&&(t=new Xe(t)),t instanceof WritableStream&&(t={writable:t}),t.size===G&&(t.size=0),t instanceof Xe||Object.assign(t,{diskNumber:0,diskOffset:0,availableSize:1/0,maxSize:1/0}),t}}function ma(s){const{baseURL:t}=Zn(),{protocol:e}=new URL(s,t);return e=="http:"||e=="https:"}async function Pe(s,t){if(s.init&&!s.initialized)await s.init(t);else return Promise.resolve()}function Y(s,t,e,n){return s.readUint8Array(t,e,n)}const wa=Dt,ga=Xe,Os="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split(""),ba=Os.length==256;function ya(s){if(ba){let t="";for(let e=0;e<s.length;e++)t+=Os[s[e]];return t}else return new TextDecoder().decode(s)}function qe(s,t){return t&&t.trim().toLowerCase()=="cp437"?ya(s):new TextDecoder(t).decode(s)}const Is="filename",Cs="rawFilename",Ns="comment",Ps="rawComment",Ds="uncompressedSize",ks="compressedSize",Ls="offset",mt="diskNumberStart",wt="lastModDate",gt="rawLastModDate",Fs="lastAccessDate",Ea="rawLastAccessDate",Ms="creationDate",xa="rawCreationDate",Ta="internalFileAttribute",Sa="internalFileAttributes",Ra="externalFileAttribute",Aa="externalFileAttributes",Oa="msDosCompatible",Ia="zip64",Ca="encrypted",Na="version",Pa="versionMadeBy",Da="zipCrypto",ka="directory",La="executable",Fa="compressionMethod",Ma="signature",va="extraField",Ua=[Is,Cs,ks,Ds,wt,gt,Ns,Ps,Fs,Ms,Ls,mt,mt,Ta,Sa,Ra,Aa,Oa,Ia,Ca,Na,Pa,Da,ka,La,Fa,Ma,va,"bitFlag","filenameUTF8","commentUTF8","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp"];class Dn{constructor(t){Ua.forEach(e=>this[e]=t[e])}}const Ha="filenameEncoding",Wa="commentEncoding",Ba="decodeText",ja="extractPrependedData",Ga="extractAppendedData",Ya="password",qa="rawPassword",Va="passThrough",Za="signal",Ka="checkPasswordOnly",Xa="checkOverlappingEntryOnly",$a="checkOverlappingEntry",Ja="checkSignature",Qa="useWebWorkers",za="useCompressionStream",eo="transferStreams",to="preventClose",Ve="File format is not recognized",vs="End of central directory not found",Us="End of Zip64 central directory locator not found",Hs="Central directory header not found",Ws="Local file header not found",Bs="Zip64 extra field not found",js="File contains encrypted entry",Gs="Encryption method not supported",bt="Compression method not supported",yt="Split zip file",Ys="Overlapping entry found",kn="utf-8",Ln="cp437",no=[[Ds,me],[ks,me],[Ls,me],[mt,fe]],so={[fe]:{getValue:W,bytes:4},[me]:{getValue:Ee,bytes:8}};class qs{constructor(t,e={}){Object.assign(this,{reader:new Rs(t),options:e,config:Zn(),readRanges:[]})}async*getEntriesGenerator(t={}){const e=this;let{reader:n}=e;const{config:r}=e;if(await Pe(n),(n.size===G||!n.readUint8Array)&&(n=new Nt(await new Response(n.readable).blob()),await Pe(n)),n.size<ne)throw new Error(Ve);n.chunkSize=ui(r);const i=await uo(n,Yr,n.size,ne,fe*16);if(!i){const w=await Y(n,0,4),S=j(w);throw W(S)==qn?new Error(yt):new Error(vs)}const a=j(i);let o=W(a,12),l=W(a,16);const _=i.offset,d=q(a,20),g=_+ne+d;let b=q(a,4);const A=n.lastDiskNumber||0;let T=q(a,6),f=q(a,8),c=0,u=0;if(l==me||o==me||f==fe||T==fe){const w=await Y(n,i.offset-st,st),S=j(w);if(W(S,0)==qr){l=Ee(S,8);let N=await Y(n,l,rt,-1),I=j(N);const P=i.offset-st-rt;if(W(I,0)!=fn&&l!=P){const k=l;l=P,l>k&&(c=l-k),N=await Y(n,l,rt,-1),I=j(N)}if(W(I,0)!=fn)throw new Error(Us);b==fe&&(b=W(I,16)),T==fe&&(T=W(I,20)),f==fe&&(f=Ee(I,32)),o==me&&(o=Ee(I,40)),l-=o}}if(l>=n.size&&(c=n.size-l-o-ne,l=n.size-o-ne),A!=b)throw new Error(yt);if(l<0)throw new Error(Ve);let h=0,p=await Y(n,l,o,T),y=j(p);if(o){const w=i.offset-o;if(W(y,h)!=ln&&l!=w){const S=l;l=w,l>S&&(c+=l-S),p=await Y(n,l,o,T),y=j(p)}}const O=i.offset-l-(n.lastDiskOffset||0);if(o!=O&&O>=0&&(o=O,p=await Y(n,l,o,T),y=j(p)),l<0||l>=n.size)throw new Error(Ve);const m=V(e,t,Ha),E=V(e,t,Wa);for(let w=0;w<f;w++){const S=new io(n,r,e.options);if(W(y,h)!=ln)throw new Error(Hs);Vs(S,y,h+6);const N=!!S.bitFlag.languageEncodingFlag,I=h+46,P=I+S.filenameLength,k=P+S.extraFieldLength,C=q(y,h+4),v=C>>8==0,L=C>>8==3,Z=p.subarray(I,P),D=q(y,h+32),Q=k+D,U=p.subarray(k,Q),H=N,Me=N,xe=W(y,h+38),te=v&&(ye(y,h+38)&pn)==pn||L&&(xe>>16&si)==ri||Z.length&&Z.at(-1)==mn.charCodeAt(0),z=L&&(xe>>16&ii)!=0,kt=W(y,h+42)+c;Object.assign(S,{versionMadeBy:C,msDosCompatible:v,compressedSize:0,uncompressedSize:0,commentLength:D,directory:te,offset:kt,diskNumberStart:q(y,h+34),internalFileAttributes:q(y,h+36),externalFileAttributes:xe,rawFilename:Z,filenameUTF8:H,commentUTF8:Me,rawExtraField:p.subarray(P,k),executable:z}),S.internalFileAttribute=S.internalFileAttributes,S.externalFileAttribute=S.externalFileAttributes;const Lt=V(e,t,Ba)||qe,Ft=H?kn:m||Ln,Mt=Me?kn:E||Ln;let ve=Lt(Z,Ft);ve===G&&(ve=qe(Z,Ft));let ze=Lt(U,Mt);ze===G&&(ze=qe(U,Mt)),Object.assign(S,{rawComment:U,filename:ve,comment:ze,directory:te||ve.endsWith(mn)}),u=Math.max(kt,u),Zs(S,S,y,h+6),S.zipCrypto=S.encrypted&&!S.extraFieldAES;const Te=new Dn(S);Te.getData=(Ue,He)=>S.getData(Ue,Te,e.readRanges,He),Te.arrayBuffer=async Ue=>{const He=new TransformStream,[Xs]=await Promise.all([new Response(He.readable).arrayBuffer(),S.getData(He,Te,e.readRanges,Ue)]);return Xs},h=Q;const{onprogress:vt}=t;if(vt)try{await vt(w+1,f,new Dn(S))}catch{}yield Te}const R=V(e,t,ja),x=V(e,t,Ga);return R&&(e.prependedData=u>0?await Y(n,0,u):new Uint8Array),e.comment=d?await Y(n,_+ne,d):new Uint8Array,x&&(e.appendedData=g<n.size?await Y(n,g,n.size-g):new Uint8Array),!0}async getEntries(t={}){const e=[];for await(const n of this.getEntriesGenerator(t))e.push(n);return e}async close(){}}class ro{constructor(t={}){const{readable:e,writable:n}=new TransformStream,r=new qs(e,t).getEntriesGenerator();this.readable=new ReadableStream({async pull(i){const{done:a,value:o}=await r.next();if(a)return i.close();const l={...o,readable:(function(){const{readable:_,writable:d}=new TransformStream;if(o.getData)return o.getData(d),_})()};delete l.getData,i.enqueue(l)}}),this.writable=n}}class io{constructor(t,e,n){Object.assign(this,{reader:t,config:e,options:n})}async getData(t,e,n,r={}){const i=this,{reader:a,offset:o,diskNumberStart:l,extraFieldAES:_,extraFieldZip64:d,compressionMethod:g,config:b,bitFlag:A,signature:T,rawLastModDate:f,uncompressedSize:c,compressedSize:u}=i,{dataDescriptor:h}=A,p=e.localDirectory={},y=await Y(a,o,it,l),O=j(y);let m=V(i,r,Ya),E=V(i,r,qa);const R=V(i,r,Va);if(m=m&&m.length&&m,E=E&&E.length&&E,_&&_.originalCompressionMethod!=Br)throw new Error(bt);if(g!=Wr&&g!=Hr&&!R)throw new Error(bt);if(W(O,0)!=jr)throw new Error(Ws);Vs(p,O,4);const{extraFieldLength:x,filenameLength:w,lastAccessDate:S,creationDate:N}=p;p.rawExtraField=x?await Y(a,o+it+w,x,l):new Uint8Array,Zs(i,p,O,4,!0),Object.assign(e,{lastAccessDate:S,creationDate:N});const I=i.encrypted&&p.encrypted&&!R,P=I&&!_;if(R||(e.zipCrypto=P),I){if(!P&&_.strength===G)throw new Error(Gs);if(!m&&!E)throw new Error(js)}const k=o+it+w+x,C=u,v=a.readable;Object.assign(v,{diskNumberStart:l,offset:k,size:C});const L=V(i,r,Za),Z=V(i,r,Ka);let D=V(i,r,$a);const Q=V(i,r,Xa);Q&&(D=!0);const{onstart:U,onprogress:H,onend:Me}=r,xe={options:{codecType:us,password:m,rawPassword:E,zipCrypto:P,encryptionStrength:_&&_.strength,signed:V(i,r,Ja)&&!R,passwordVerification:P&&(h?f>>>8&255:T>>>24&255),outputSize:c,signature:T,compressed:g!=0&&!R,encrypted:i.encrypted&&!R,useWebWorkers:V(i,r,Qa),useCompressionStream:V(i,r,za),transferStreams:V(i,r,eo),checkPasswordOnly:Z},config:b,streamOptions:{signal:L,size:C,onstart:U,onprogress:H,onend:Me}};D&&await fo({reader:a,fileEntry:e,offset:o,diskNumberStart:l,signature:T,compressedSize:u,uncompressedSize:c,dataOffset:k,dataDescriptor:h||p.bitFlag.dataDescriptor,extraFieldZip64:d||p.extraFieldZip64,readRanges:n});let te;try{if(!Q){Z&&(t=new WritableStream),t=new As(t),await Pe(t,R?u:c),{writable:te}=t;const{outputSize:z}=await $i({readable:v,writable:te},xe);if(t.size+=z,z!=(R?u:c))throw new Error(At)}}catch(z){if(z.outputSize!==G&&(t.size+=z.outputSize),!Z||z.message!=Tt)throw z}finally{!V(i,r,to)&&te&&!te.locked&&await te.getWriter().close()}return Z||Q?G:t.getData?t.getData():te}}function Vs(s,t,e){const n=s.rawBitFlag=q(t,e+2),r=(n&dn)==dn,i=W(t,e+6);Object.assign(s,{encrypted:r,version:q(t,e),bitFlag:{level:(n&ni)>>1,dataDescriptor:(n&_n)==_n,languageEncodingFlag:(n&hn)==hn},rawLastModDate:i,lastModDate:_o(i),filenameLength:q(t,e+22),extraFieldLength:q(t,e+24)})}function Zs(s,t,e,n,r){const{rawExtraField:i}=t,a=t.extraField=new Map,o=j(new Uint8Array(i));let l=0;try{for(;l<i.length;){const u=q(o,l),h=q(o,l+2);a.set(u,{type:u,data:i.slice(l+4,l+4+h)}),l+=4+h}}catch{}const _=q(e,n+4);Object.assign(t,{signature:W(e,n+ai),compressedSize:W(e,n+oi),uncompressedSize:W(e,n+ci)});const d=a.get(Kr);d&&(ao(d,t),t.extraFieldZip64=d);const g=a.get(zr);g&&(Fn(g,Is,Cs,t,s),t.extraFieldUnicodePath=g);const b=a.get(ei);b&&(Fn(b,Ns,Ps,t,s),t.extraFieldUnicodeComment=b);const A=a.get(Xr);A?(oo(A,t,_),t.extraFieldAES=A):t.compressionMethod=_;const T=a.get($r);T&&(co(T,t),t.extraFieldNTFS=T);const f=a.get(Qr);f&&(lo(f,t,r),t.extraFieldExtendedTimestamp=f);const c=a.get(ti);c&&(t.extraFieldUSDZ=c)}function ao(s,t){t.zip64=!0;const e=j(s.data),n=no.filter(([r,i])=>t[r]==i);for(let r=0,i=0;r<n.length;r++){const[a,o]=n[r];if(t[a]==o){const l=so[o];t[a]=s[a]=l.getValue(e,i),i+=l.bytes}else if(s[a])throw new Error(Bs)}}function Fn(s,t,e,n,r){const i=j(s.data),a=new Ze;a.append(r[e]);const o=j(new Uint8Array(4));o.setUint32(0,a.get(),!0);const l=W(i,1);Object.assign(s,{version:ye(i,0),[t]:qe(s.data.subarray(5)),valid:!r.bitFlag.languageEncodingFlag&&l==W(o,0)}),s.valid&&(n[t]=s[t],n[t+"UTF8"]=!0)}function oo(s,t,e){const n=j(s.data),r=ye(n,4);Object.assign(s,{vendorVersion:ye(n,0),vendorId:ye(n,2),strength:r,originalCompressionMethod:e,compressionMethod:q(n,5)}),t.compressionMethod=s.compressionMethod}function co(s,t){const e=j(s.data);let n=4,r;try{for(;n<s.data.length&&!r;){const i=q(e,n),a=q(e,n+2);i==Jr&&(r=s.data.slice(n+4,n+4+a)),n+=4+a}}catch{}try{if(r&&r.length==24){const i=j(r),a=i.getBigUint64(0,!0),o=i.getBigUint64(8,!0),l=i.getBigUint64(16,!0);Object.assign(s,{rawLastModDate:a,rawLastAccessDate:o,rawCreationDate:l});const _=lt(a),d=lt(o),g=lt(l),b={lastModDate:_,lastAccessDate:d,creationDate:g};Object.assign(s,b),Object.assign(t,b)}}catch{}}function lo(s,t,e){const n=j(s.data),r=ye(n,0),i=[],a=[];e?((r&1)==1&&(i.push(wt),a.push(gt)),(r&2)==2&&(i.push(Fs),a.push(Ea)),(r&4)==4&&(i.push(Ms),a.push(xa))):s.data.length>=5&&(i.push(wt),a.push(gt));let o=1;i.forEach((l,_)=>{if(s.data.length>=o+4){const d=W(n,o);t[l]=s[l]=new Date(d*1e3);const g=a[_];s[g]=d}o+=4})}async function fo({reader:s,fileEntry:t,offset:e,diskNumberStart:n,signature:r,compressedSize:i,uncompressedSize:a,dataOffset:o,dataDescriptor:l,extraFieldZip64:_,readRanges:d}){let g=0;if(n)for(let T=0;T<n;T++){const f=s.readers[T];g+=f.size}let b=0;if(l&&(_?b=Zr:b=Vr),b){const T=await Y(s,o+i,b+un,n);if(W(j(T),0)==Gr){const c=W(j(T),4);let u,h;_?(u=Ee(j(T),8),h=Ee(j(T),16)):(u=W(j(T),8),h=W(j(T),12)),(t.encrypted&&!t.zipCrypto||c==r)&&u==i&&h==a&&(b+=un)}}const A={start:g+e,end:g+o+i+b,fileEntry:t};for(const T of d)if(T.fileEntry!=t&&A.start>=T.start&&A.start<T.end){const f=new Error(Ys);throw f.overlappingEntry=T.fileEntry,f}d.push(A)}async function uo(s,t,e,n,r){const i=new Uint8Array(4),a=j(i);ho(a,0,t);const o=n+r;return await l(n)||await l(Math.min(o,e));async function l(_){const d=e-_,g=await Y(s,d,_);for(let b=g.length-n;b>=0;b--)if(g[b]==i[0]&&g[b+1]==i[1]&&g[b+2]==i[2]&&g[b+3]==i[3])return{offset:d+b,buffer:g.slice(b,b+n).buffer}}}function V(s,t,e){return t[e]===G?s.options[e]:t[e]}function _o(s){const t=(s&4294901760)>>16,e=s&65535;try{return new Date(1980+((t&65024)>>9),((t&480)>>5)-1,t&31,(e&63488)>>11,(e&2016)>>5,(e&31)*2,0)}catch{}}function lt(s){return new Date(Number(s/BigInt(1e4)-BigInt(116444736e5)))}function ye(s,t){return s.getUint8(t)}function q(s,t){return s.getUint16(t,!0)}function W(s,t){return s.getUint32(t,!0)}function Ee(s,t){return Number(s.getBigUint64(t,!0))}function ho(s,t,e){s.setUint32(t,e,!0)}function j(s){return new DataView(s.buffer)}Kn({Inflate:Ur});const po=Object.freeze(Object.defineProperty({__proto__:null,BlobReader:Nt,BlobWriter:gs,Data64URIReader:oa,Data64URIWriter:ca,ERR_BAD_FORMAT:Ve,ERR_CENTRAL_DIRECTORY_NOT_FOUND:Hs,ERR_ENCRYPTED:js,ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND:Us,ERR_EOCDR_NOT_FOUND:vs,ERR_EXTRAFIELD_ZIP64_NOT_FOUND:Bs,ERR_HTTP_RANGE:Fe,ERR_INVALID_PASSWORD:Et,ERR_INVALID_SIGNATURE:xt,ERR_INVALID_UNCOMPRESSED_SIZE:At,ERR_ITERATOR_COMPLETED_TOO_SOON:ps,ERR_LOCAL_FILE_HEADER_NOT_FOUND:Ws,ERR_OVERLAPPING_ENTRY:Ys,ERR_SPLIT_ZIP_FILE:yt,ERR_UNSUPPORTED_COMPRESSION:bt,ERR_UNSUPPORTED_ENCRYPTION:Gs,ERR_WRITER_NOT_INITIALIZED:ms,GenericReader:Rs,GenericWriter:As,HttpRangeReader:_a,HttpReader:Ss,Reader:he,SplitDataReader:Dt,SplitDataWriter:Xe,SplitZipReader:wa,SplitZipWriter:ga,TextReader:la,TextWriter:fa,Uint8ArrayReader:ha,Uint8ArrayWriter:pa,Writer:Ct,ZipReader:qs,ZipReaderStream:ro,configure:Kn,getMimeType:di,initStream:Pe,readUint8Array:Y,terminateWorkers:Qi},Symbol.toStringTag,{value:"Module"})),Ae=po;class mo{constructor(t,e){M(this,"_zipReader");M(this,"_entriesPromise");Ae.configure({baseURL:self.location.href}),this._zipReader=new Ae.ZipReader(new Ae.HttpReader(this._resolveTraceURI(t),{mode:"cors",preventHeadRequest:!0}),{useWebWorkers:!1}),this._entriesPromise=this._zipReader.getEntries({onprogress:e}).then(n=>{const r=new Map;for(const i of n)r.set(i.filename,i);return r})}_resolveTraceURI(t){return t.startsWith("https://www.dropbox.com/")?"https://dl.dropboxusercontent.com/"+t.substring(24):t}isLive(){return!1}async entryNames(){return[...(await this._entriesPromise).keys()]}async hasEntry(t){return(await this._entriesPromise).has(t)}async readText(t){var i;const n=(await this._entriesPromise).get(t);if(!n)return;const r=new Ae.TextWriter;return await((i=n.getData)==null?void 0:i.call(n,r)),r.getData()}async readBlob(t){const n=(await this._entriesPromise).get(t);if(!n)return;const r=new Ae.BlobWriter;return await n.getData(r),r.getData()}}class wo{constructor(t){M(this,"_entriesPromise");this._entriesPromise=this._readFile(t).then(async e=>{if(!e)throw new Error("File not found");const n=await e.json(),r=new Map;for(const i of n.entries)r.set(i.name,i.path);return r})}isLive(){return!0}async entryNames(){return[...(await this._entriesPromise).keys()]}async hasEntry(t){return(await this._entriesPromise).has(t)}async readText(t){const e=await this._readEntry(t);return e==null?void 0:e.text()}async readBlob(t){const e=await this._readEntry(t);return(e==null?void 0:e.status)===200?await(e==null?void 0:e.blob()):void 0}async _readEntry(t){const n=(await this._entriesPromise).get(t);if(n)return this._readFile(n)}async _readFile(t){const e=await fetch(t);if(e.status!==404)return e}}self.addEventListener("install",function(s){self.skipWaiting()});self.addEventListener("activate",function(s){s.waitUntil(self.clients.claim())});const go=new URL(self.registration.scope).pathname,De=new Map,$e=new Map,Mn=self.registration.scope.startsWith("https://");function bo(){De.clear(),$e.clear()}async function vn(s,t,e){try{return{loadedTrace:await Ks(s,t,e)}}catch(n){return{errorResponse:new Response(JSON.stringify({error:n==null?void 0:n.message}),{status:500,headers:{"Content-Type":"application/json"}})}}}function Ks(s,t,e){const n=t.searchParams.get("trace");if(!n)throw new Error("trace parameter is missing");$e.set(s,n);const r=De.get(n);if(r)return r;const i=yo(n,e);return De.set(n,i),i}async function yo(s,t){var r;await To();const e=new wr;try{const[i,a]=Qs(t,[.5,.4,.1]),o=Ro(s)||s.endsWith("traces.dir")?new wo(s):new mo(s,i);await e.load(o,a)}catch(i){throw console.error(i),(r=i==null?void 0:i.message)!=null&&r.includes("Cannot find .trace file")&&await e.hasEntry("index.html")?new Error("Could not load trace. Did you upload a Playwright HTML report instead? Make sure to extract the archive first and then double-click the index.html file or put it on a web server."):i instanceof jn?new Error(`Could not load trace from ${s}. ${i.message}`):new Error(`Could not load trace from ${s}. Make sure a valid Playwright Trace is accessible over this url.`)}const n=new zs(e.storage(),i=>e.resourceForSha1(i));return{traceModel:e,snapshotServer:n}}async function Eo(s){const t=s.request;if(t.url.startsWith("chrome-extension://"))return fetch(t);if(t.headers.get("x-pw-serviceworker")==="forward"){const a=new Request(s.request);return a.headers.delete("x-pw-serviceworker"),fetch(a)}const e=new URL(t.url);let n;if(t.url.startsWith(self.registration.scope)&&(n=e.pathname.substring(go.length-1)),n==="/restartServiceWorker")return bo(),new Response(null,{status:200});if(n==="/ping")return new Response(null,{status:200});const r=!!s.resultingClientId,i=s.clientId?await self.clients.get(s.clientId):void 0;if(r&&!(n!=null&&n.startsWith("/sha1/"))){if(n!=null&&n.startsWith("/snapshot/")){const{errorResponse:a,loadedTrace:o}=await vn(s.resultingClientId,e,So);if(a)return a;const l=n.substring(10),_=o.snapshotServer.serveSnapshot(l,e.searchParams,e.href);return Mn&&_.headers.set("Content-Security-Policy","upgrade-insecure-requests"),_}return fetch(s.request)}if(!n){if(!i)return new Response("Sub-resource without a client",{status:500});const{snapshotServer:a}=await Ks(i.id,new URL(i.url),Un(i));if(!a)return new Response(null,{status:404});const o=[t.url];return Mn&&t.url.startsWith("https://")&&o.push(t.url.replace(/^https/,"http")),a.serveResource(o,t.method,i.url)}if(n==="/contexts"||n.startsWith("/snapshotInfo/")||n.startsWith("/closest-screenshot/")||n.startsWith("/sha1/")){if(!i)return new Response("Sub-resource without a client",{status:500});const{errorResponse:a,loadedTrace:o}=await vn(i.id,e,Un(i));if(a)return a;if(n==="/contexts")return new Response(JSON.stringify(o.traceModel.contextEntries),{status:200,headers:{"Content-Type":"application/json"}});if(n.startsWith("/snapshotInfo/")){const l=n.substring(14);return o.snapshotServer.serveSnapshotInfo(l,e.searchParams)}if(n.startsWith("/closest-screenshot/")){const l=n.substring(20);return o.snapshotServer.serveClosestScreenshot(l,e.searchParams)}if(n.startsWith("/sha1/")){const l=await o.traceModel.resourceForSha1(n.slice(6));return l?new Response(l,{status:200,headers:xo(e.searchParams)}):new Response(null,{status:404})}}return fetch(s.request)}function xo(s){const t=s.get("dn"),e=s.get("dct");if(!t)return;const n=new Headers;return n.set("Content-Disposition",`attachment; filename="attachment"; filename*=UTF-8''${encodeURIComponent(t)}`),e&&n.set("Content-Type",e),n}async function To(){const s=await self.clients.matchAll(),t=new Set;for(const[e,n]of $e){if(!s.find(r=>r.id===e)){$e.delete(e);continue}t.add(n)}for(const e of De.keys())t.has(e)||De.delete(e)}function Un(s){return(t,e)=>{s.postMessage({method:"progress",params:{done:t,total:e}})}}function So(s,t){}function Ro(s){const e=new URL(s,"http://localhost").searchParams.get("path");return!!(e!=null&&e.endsWith(".json"))}self.addEventListener("fetch",function(s){s.respondWith(Eo(s))});
@@ -6,8 +6,8 @@
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
7
  <link rel="icon" href="./playwright-logo.svg" type="image/svg+xml">
8
8
  <title>Playwright Test</title>
9
- <script type="module" crossorigin src="./uiMode.BWTwXl41.js"></script>
10
- <link rel="modulepreload" crossorigin href="./assets/defaultSettingsView-BEpdCv1S.js">
9
+ <script type="module" crossorigin src="./uiMode.zpT_4iId.js"></script>
10
+ <link rel="modulepreload" crossorigin href="./assets/defaultSettingsView-Bpx75f3I.js">
11
11
  <link rel="stylesheet" crossorigin href="./defaultSettingsView.ConWv5KN.css">
12
12
  <link rel="stylesheet" crossorigin href="./uiMode.Btcz36p_.css">
13
13
  </head>