playwright-core 1.56.0-beta-1759412259000 → 1.56.0-beta-1759451736000
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,3 +1,3 @@
|
|
|
1
|
-
var es=Object.defineProperty;var ts=(n,t,e)=>t in n?es(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var L=(n,t,e)=>ts(n,typeof t!="symbol"?t+"":t,e);function Tt(n){return new Promise((t,e)=>{n.oncomplete=n.onsuccess=()=>t(n.result),n.onabort=n.onerror=()=>e(n.error)})}function ns(n,t){let e;const r=()=>{if(e)return e;const s=indexedDB.open(n);return s.onupgradeneeded=()=>s.result.createObjectStore(t),e=Tt(s),e.then(i=>{i.onclose=()=>e=void 0},()=>{}),e};return(s,i)=>r().then(a=>i(a.transaction(t,s).objectStore(t)))}let et;function Wn(){return et||(et=ns("keyval-store","keyval")),et}function Bn(n,t=Wn()){return t("readonly",e=>Tt(e.get(n)))}function rs(n,t,e=Wn()){return e("readwrite",r=>(r.put(t,n),Tt(r.transaction)))}function ss(n,t){const e=new Array(t.length).fill(0);return new Array(t.length).fill(0).map((r,s)=>(i,a)=>{e[s]=i/a*t[s]*1e3,n(e.reduce((o,u)=>o+u,0),1e3)})}const jn={"&":"&","<":"<",">":">",'"':""","'":"'"};function is(n){return n.replace(/[&<>"']/ug,t=>jn[t])}function as(n){return n.replace(/[&<]/ug,t=>jn[t])}function Bt(n,t,e){return n.find((r,s)=>{if(s===n.length-1)return!0;const i=n[s+1];return Math.abs(t(r)-e)<Math.abs(t(i)-e)})}function Gn(n){return Array.isArray(n)&&typeof n[0]=="string"}function os(n){return Array.isArray(n)&&Array.isArray(n[0])}class cs{constructor(t,e,r,s,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=r,this._index=i,this._snapshot=r[i],this._callId=r[i].callId,this._screencastFrames=s,this.snapshotName=r[i].snapshotName}snapshot(){return this._snapshots[this._index]}viewport(){return this._snapshots[this._index].viewport}closestScreenshot(){var s;const{wallTime:t,timestamp:e}=this.snapshot(),r=t&&((s=this._screencastFrames[0])!=null&&s.frameSwapWallTime)?Bt(this._screencastFrames,i=>i.frameSwapWallTime,t):Bt(this._screencastFrames,i=>i.timestamp,e);return r==null?void 0:r.sha1}render(){const t=[],e=(i,a,o,u)=>{if(typeof i=="string"){o==="STYLE"||o==="style"?t.push(ms(_s(i))):t.push(as(i));return}if(os(i)){const _=a-i[0][0];if(_>=0&&_<=a){const f=fs(this._snapshots[_]),p=i[0][1];if(p>=0&&p<f.length)return e(f[p],_,o,u)}}else if(Gn(i)){const[_,f,...p]=i,h=_==="NOSCRIPT"?"X-NOSCRIPT":_,x=Object.entries(f||{});t.push("<",h);const S="__playwright_current_src__",l=h==="IFRAME"||h==="FRAME",c=h==="A",d=h==="IMG",y=d&&x.some(g=>g[0]===S),b=h==="SOURCE"&&o==="PICTURE"&&(u==null?void 0:u.some(g=>g[0]===S));for(const[g,A]of x){let m=g;l&&g.toLowerCase()==="src"&&(m="__playwright_src__"),d&&g===S&&(m="src"),["src","srcset"].includes(g.toLowerCase())&&(y||b)&&(m="_"+m);let R=A;c&&g.toLowerCase()==="href"?R="link://"+A:(g.toLowerCase()==="href"||g.toLowerCase()==="src"||g===S)&&(R=ut(A)),t.push(" ",m,'="',is(R),'"')}t.push(">");for(const g of p)e(g,a,h,x);ls.has(h)||t.push("</",h,">");return}else return},r=this._snapshot;return{html:this._htmlCache.getOrCompute(this,()=>{e(r.html,this._index,void 0,void 0);const a=(r.doctype?`<!DOCTYPE ${r.doctype}>`:"")+["<style>*,*::before,*::after { visibility: hidden }</style>",`<script>${us(this.viewport(),this._callId,this.snapshotName)}<\/script>`].join("")+t.join("");return{value:a,size:a.length}}),pageId:r.pageId,frameId:r.frameId,index:this._index}}resourceByUrl(t,e){const r=this._snapshot;let s,i;for(const o of this._resources){if(typeof o._monotonicTime=="number"&&o._monotonicTime>=r.timestamp)break;o.response.status!==304&&o.request.url===t&&o.request.method===e&&(o._frameref===r.frameId?s=o:i=o)}let a=s??i;if(a&&e.toUpperCase()==="GET"){for(const o of r.resourceOverrides)if(t===o.url&&o.sha1){a={...a,response:{...a.response,content:{...a.response.content,_sha1:o.sha1}}};break}}return a}}const ls=new Set(["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","MENUITEM","META","PARAM","SOURCE","TRACK","WBR"]);function fs(n){if(!n._nodes){const t=[],e=r=>{if(typeof r=="string")t.push(r);else if(Gn(r)){const[,,...s]=r;for(const i of s)e(i);t.push(r)}};e(n.html),n._nodes=t}return n._nodes}function us(n,...t){function e(r,s,...i){const a=new URLSearchParams(location.search),o=a.has("shouldPopulateCanvasFromScreenshot"),u=a.has("isUnderTest"),_={viewport:s,frames:new WeakMap};window.__playwright_frame_bounding_rects__=_;const f="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.",p=[],h=[],x=[],S=[];let l=window;for(;l!==l.parent&&!l.location.pathname.match(/\/page@[a-z0-9]+$/);)l=l.parent;const c=b=>{for(const g of b.querySelectorAll("[__playwright_scroll_top_]"))p.push(g);for(const g of b.querySelectorAll("[__playwright_scroll_left_]"))h.push(g);for(const g of b.querySelectorAll("[__playwright_value_]")){const A=g;A.type!=="file"&&(A.value=A.getAttribute("__playwright_value_")),g.removeAttribute("__playwright_value_")}for(const g of b.querySelectorAll("[__playwright_checked_]"))g.checked=g.getAttribute("__playwright_checked_")==="true",g.removeAttribute("__playwright_checked_");for(const g of b.querySelectorAll("[__playwright_selected_]"))g.selected=g.getAttribute("__playwright_selected_")==="true",g.removeAttribute("__playwright_selected_");for(const g of b.querySelectorAll("[__playwright_popover_open_]")){try{g.showPopover()}catch{}g.removeAttribute("__playwright_popover_open_")}for(const g of b.querySelectorAll("[__playwright_dialog_open_]")){try{g.getAttribute("__playwright_dialog_open_")==="modal"?g.showModal():g.show()}catch{}g.removeAttribute("__playwright_dialog_open_")}for(const g of i)for(const A of b.querySelectorAll(`[__playwright_target__="${g}"]`)){const m=A.style;m.outline="2px solid #006ab1",m.backgroundColor="#6fa8dc7f",x.push(A)}for(const g of b.querySelectorAll("iframe, frame")){const A=g.getAttribute("__playwright_bounding_rect__");g.removeAttribute("__playwright_bounding_rect__");const m=A?JSON.parse(A):void 0;m&&_.frames.set(g,{boundingRect:m,scrollLeft:0,scrollTop:0});const R=g.getAttribute("__playwright_src__");if(!R)g.setAttribute("src",'data:text/html,<body style="background: #ddd"></body>');else{const E=new URL(r(window.location.href)),O=E.pathname.lastIndexOf("/snapshot/");O!==-1&&(E.pathname=E.pathname.substring(0,O+1)),E.pathname+=R.substring(1),g.setAttribute("src",E.toString())}}{const g=b.querySelector("body[__playwright_custom_elements__]");if(g&&window.customElements){const A=(g.getAttribute("__playwright_custom_elements__")||"").split(",");for(const m of A)window.customElements.define(m,class extends HTMLElement{})}}for(const g of b.querySelectorAll("template[__playwright_shadow_root_]")){const A=g,m=A.parentElement.attachShadow({mode:"open"});m.appendChild(A.content),A.remove(),c(m)}if("adoptedStyleSheets"in b){const g=[...b.adoptedStyleSheets];for(const A of b.querySelectorAll("template[__playwright_style_sheet_]")){const m=A,R=new CSSStyleSheet;R.replaceSync(m.getAttribute("__playwright_style_sheet_")),g.push(R)}b.adoptedStyleSheets=g}S.push(...b.querySelectorAll("canvas"))},d=()=>{window.removeEventListener("load",d);for(const A of p)A.scrollTop=+A.getAttribute("__playwright_scroll_top_"),A.removeAttribute("__playwright_scroll_top_"),_.frames.has(A)&&(_.frames.get(A).scrollTop=A.scrollTop);for(const A of h)A.scrollLeft=+A.getAttribute("__playwright_scroll_left_"),A.removeAttribute("__playwright_scroll_left_"),_.frames.has(A)&&(_.frames.get(A).scrollLeft=A.scrollTop);document.styleSheets[0].disabled=!0;const b=new URL(window.location.href).searchParams,g=window===l;if(b.get("pointX")&&b.get("pointY")){const A=+b.get("pointX"),m=+b.get("pointY"),R=b.has("hasInputTarget"),E=x.length>0,O=document.documentElement?[document.documentElement]:[];for(const T of E?x:O){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 C=T.getBoundingClientRect(),I=C.left+C.width/2,k=C.top+C.height/2;if(w.style.left=I+"px",w.style.top=k+"px",g&&(Math.abs(I-A)>=10||Math.abs(k-m)>=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",f)}document.documentElement.appendChild(w)}else g&&!R&&(w.style.left=A+"px",w.style.top=m+"px",document.documentElement.appendChild(w))}}if(S.length>0){let A=function(R,E){function O(){const T=document.createElement("canvas");T.width=T.width/Math.floor(T.width/24),T.height=T.height/Math.floor(T.height/24);const w=T.getContext("2d");return w.fillStyle="lightgray",w.fillRect(0,0,T.width,T.height),w.fillStyle="white",w.fillRect(0,0,T.width/2,T.height/2),w.fillRect(T.width/2,T.height/2,T.width,T.height),w.createPattern(T,"repeat")}R.fillStyle=O(),R.fillRect(0,0,E.width,E.height)};const m=new Image;m.onload=()=>{var R;for(const E of S){const O=E.getContext("2d"),T=E.getAttribute("__playwright_bounding_rect__");if(E.removeAttribute("__playwright_bounding_rect__"),!T)continue;let w;try{w=JSON.parse(T)}catch{continue}let C=window;for(;C!==l;){const M=C.frameElement;C=C.parent;const v=(R=C.__playwright_frame_bounding_rects__)==null?void 0:R.frames.get(M);if(!(v!=null&&v.boundingRect))break;const Z=v.boundingRect.left-v.scrollLeft,D=v.boundingRect.top-v.scrollTop;w.left+=Z,w.top+=D,w.right+=Z,w.bottom+=D}const{width:I,height:k}=l.__playwright_frame_bounding_rects__.viewport;w.left=w.left/I,w.top=w.top/k,w.right=w.right/I,w.bottom=w.bottom/k;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}A(O,E),o?(O.drawImage(m,w.left*m.width,w.top*m.height,(w.right-w.left)*m.width,(w.bottom-w.top)*m.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.",u&&console.log("canvas drawn:",JSON.stringify([w.left,w.top,w.right-w.left,w.bottom-w.top].map(M=>Math.floor(M*100))))}},m.onerror=()=>{for(const R of S){const E=R.getContext("2d");A(E,R),R.title="Playwright couldn't show canvas contents because the screenshot failed to load."}},m.src=location.href.replace("/snapshot","/closest-screenshot")}},y=()=>c(document);window.addEventListener("load",d),window.addEventListener("DOMContentLoaded",y)}return`
|
|
2
|
-
(${e.toString()})(${
|
|
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 r of e)this._innerAppendEvent(r)}_innerAppendEvent(t){const e=this._contextEntry;switch(t.type){case"context-options":{if(t.version>Gt)throw new Vn("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.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 r=this._actionMap.get(t.callId);r.inputSnapshot=t.inputSnapshot,r.point=t.point;break}case"log":{const r=this._actionMap.get(t.callId);if(!r)return;r.log.push({time:t.time,message:t.message});break}case"after":{const r=this._actionMap.get(t.callId);r.afterSnapshot=t.afterSnapshot,r.endTime=t.endTime,r.result=t.result,r.error=t.error,r.attachments=t.attachments,r.annotations=t.annotations,t.point&&(r.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,r=[t];for(;e<Gt;++e)r=this[`_modernize_${e}_to_${e+1}`].call(this,r);return r}_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 r of t)r.type!=="frame-snapshot"||!r.snapshot.isMainFrame||(r.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 r=e.snapshot;e.snapshot={_frameref:r.frameId,request:{url:r.url,method:r.method,headers:r.requestHeaders,postData:r.requestSha1?{_sha1:r.requestSha1}:void 0},response:{status:r.status,headers:r.responseHeaders,content:{mimeType:r.contentType,_sha1:r.responseSha1}},_monotonicTime:r.timestamp}}return t}_modernize_3_to_4(t){const e=[];for(const r of t){const s=this._modernize_event_3_to_4(r);s&&e.push(s)}return e}_modernize_event_3_to_4(t){var r,s,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:(r=e.snapshots.find(o=>o.title==="before"))==null?void 0:r.snapshotName,inputSnapshot:(s=e.snapshots.find(o=>o.title==="input"))==null?void 0:s.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 r of t){const s=this._modernize_event_4_to_5(r);s&&e.push(s)}return e}_modernize_event_4_to_5(t){var e,r;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 s=(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:s}),null}if(t.type==="event"&&t.method==="console"){const s=this._consoleObjects.get(((r=t.params.message)==null?void 0:r.guid)||"");return s?{type:"console",time:t.time,pageId:t.pageId,messageType:s.type,text:s.text,args:s.args,location:s.location}:null}return t}_modernize_5_to_6(t){const e=[];for(const r of t)if(e.push(r),!(r.type!=="after"||!r.log.length))for(const s of r.log)e.push({type:"log",callId:r.callId,message:s,time:-1});return e}_modernize_6_to_7(t){const e=[];if(!this._processedContextCreatedEvent()&&t[0].type!=="context-options"){const r={type:"context-options",origin:"testRunner",version:6,browserName:"",options:{},platform:"unknown",wallTime:0,monotonicTime:0,sdkLanguage:"javascript",contextId:""};e.push(r)}for(const r of t){if(r.type==="context-options"){e.push({...r,monotonicTime:0,origin:"library",contextId:""});continue}if(r.type==="before"||r.type==="action"){this._contextEntry.wallTime||(this._contextEntry.wallTime=r.wallTime);const s=r,i=r;i.stepId=`${s.apiName}@${s.wallTime}`,e.push(i)}else e.push(r)}return e}_modernize_7_to_8(t){const e=[];for(const r of t)if(r.type==="before"||r.type==="action"){const s=r,i=r;s.apiName&&(i.title=s.apiName,delete i.apiName),i.stepId=s.stepId??s.callId,e.push(i)}else e.push(r);return e}}class Ts{constructor(){L(this,"contextEntries",[]);L(this,"_snapshotStorage");L(this,"_backend");L(this,"_resourceToContentType",new Map)}async load(t,e){var o,u;this._backend=t;const r=[];let s=!1;for(const _ of await this._backend.entryNames()){const f=_.match(/(.+)\.trace$/);f&&r.push(f[1]||""),_.includes("src@")&&(s=!0)}if(!r.length)throw new Error("Cannot find .trace file");this._snapshotStorage=new Es;const i=r.length*3;let a=0;for(const _ of r){const f=Ss();f.traceUrl=t.traceURL(),f.hasSource=s;const p=new xs(f,this._snapshotStorage),h=await this._backend.readText(_+".trace")||"";p.appendTrace(h),e(++a,i);const x=await this._backend.readText(_+".network")||"";if(p.appendTrace(x),e(++a,i),f.actions=p.actions().sort((l,c)=>l.startTime-c.startTime),!t.isLive()){for(const l of f.actions.slice().reverse())if(!l.endTime&&!l.error)for(const c of f.actions)c.parentId===l.callId&&l.endTime<c.endTime&&(l.endTime=c.endTime)}const S=await this._backend.readText(_+".stacks");if(S){const l=bs(JSON.parse(S));for(const c of f.actions)c.stack=c.stack||l.get(c.callId)}e(++a,i);for(const l of f.resources)(o=l.request.postData)!=null&&o._sha1&&this._resourceToContentType.set(l.request.postData._sha1,Yt(l.request.postData.mimeType)),(u=l.response.content)!=null&&u._sha1&&this._resourceToContentType.set(l.response.content._sha1,Yt(l.response.content.mimeType));this.contextEntries.push(f)}this._snapshotStorage.finalize()}async hasEntry(t){return this._backend.hasEntry(t)}async resourceForSha1(t){const e=await this._backend.readBlob("resources/"+t),r=this._resourceToContentType.get(t);return!e||r===void 0||r==="x-unknown"?e:new Blob([e],{type:r})}storage(){return this._snapshotStorage}}function Yt(n){const t=n.match(/^(.*);\s*charset=.*$/);return t?t[1]:n}function Ss(){return{origin:"testRunner",traceUrl:"",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 Rs=15,U=0,se=1,As=2,X=-2,B=-3,Vt=-4,ie=-5,$=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],qn=1440,Os=0,Is=4,Cs=9,Ps=5,Ds=[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],Ns=[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],ks=[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],vs=[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],Ls=[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],Us=[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],oe=15;function _t(){const n=this;let t,e,r,s,i,a;function o(_,f,p,h,x,S,l,c,d,y,b){let g,A,m,R,E,O,T,w,C,I,k,P,N,M,v;I=0,E=p;do r[_[f+I]]++,I++,E--;while(E!==0);if(r[0]==p)return l[0]=-1,c[0]=0,U;for(w=c[0],O=1;O<=oe&&r[O]===0;O++);for(T=O,w<O&&(w=O),E=oe;E!==0&&r[E]===0;E--);for(m=E,w>E&&(w=E),c[0]=w,M=1<<O;O<E;O++,M<<=1)if((M-=r[O])<0)return B;if((M-=r[E])<0)return B;for(r[E]+=M,a[1]=O=0,I=1,N=2;--E!==0;)a[N]=O+=r[I],N++,I++;E=0,I=0;do(O=_[f+I])!==0&&(b[a[O]++]=E),I++;while(++E<p);for(p=a[m],a[0]=E=0,I=0,R=-1,P=-w,i[0]=0,k=0,v=0;T<=m;T++)for(g=r[T];g--!==0;){for(;T>P+w;){if(R++,P+=w,v=m-P,v=v>w?w:v,(A=1<<(O=T-P))>g+1&&(A-=g+1,N=T,O<v))for(;++O<v&&!((A<<=1)<=r[++N]);)A-=r[N];if(v=1<<O,y[0]+v>qn)return B;i[R]=k=y[0],y[0]+=v,R!==0?(a[R]=E,s[0]=O,s[1]=w,O=E>>>P-w,s[2]=k-i[R-1]-O,d.set(s,(i[R-1]+O)*3)):l[0]=k}for(s[1]=T-P,I>=p?s[0]=192:b[I]<h?(s[0]=b[I]<256?0:96,s[2]=b[I++]):(s[0]=S[b[I]-h]+16+64,s[2]=x[b[I++]-h]),A=1<<T-P,O=E>>>P;O<v;O+=A)d.set(s,(k+O)*3);for(O=1<<T-1;(E&O)!==0;O>>>=1)E^=O;for(E^=O,C=(1<<P)-1;(E&C)!=a[R];)R--,P-=w,C=(1<<P)-1}return M!==0&&m!=1?ie:U}function u(_){let f;for(t||(t=[],e=[],r=new Int32Array(oe+1),s=[],i=new Int32Array(oe),a=new Int32Array(oe+1)),e.length<_&&(e=[]),f=0;f<_;f++)e[f]=0;for(f=0;f<oe+1;f++)r[f]=0;for(f=0;f<3;f++)s[f]=0;i.set(r.subarray(0,oe),0),a.set(r.subarray(0,oe+1),0)}n.inflate_trees_bits=function(_,f,p,h,x){let S;return u(19),t[0]=0,S=o(_,0,19,19,null,null,p,f,h,t,e),S==B?x.msg="oversubscribed dynamic bit lengths tree":(S==ie||f[0]===0)&&(x.msg="incomplete dynamic bit lengths tree",S=B),S},n.inflate_trees_dynamic=function(_,f,p,h,x,S,l,c,d){let y;return u(288),t[0]=0,y=o(p,0,_,257,ks,vs,S,h,c,t,e),y!=U||h[0]===0?(y==B?d.msg="oversubscribed literal/length tree":y!=Vt&&(d.msg="incomplete literal/length tree",y=B),y):(u(288),y=o(p,_,f,0,Ls,Us,l,x,c,t,e),y!=U||x[0]===0&&_>257?(y==B?d.msg="oversubscribed distance tree":y==ie?(d.msg="incomplete distance tree",y=B):y!=Vt&&(d.msg="empty distance tree with lengths",y=B),y):U)}}_t.inflate_trees_fixed=function(n,t,e,r){return n[0]=Cs,t[0]=Ps,e[0]=Ds,r[0]=Ns,U};const Be=0,qt=1,Zt=2,Kt=3,Xt=4,$t=5,Jt=6,tt=7,Qt=8,je=9;function Fs(){const n=this;let t,e=0,r,s=0,i=0,a=0,o=0,u=0,_=0,f=0,p,h=0,x,S=0;function l(c,d,y,b,g,A,m,R){let E,O,T,w,C,I,k,P,N,M,v,Z,D,Q,F,H;k=R.next_in_index,P=R.avail_in,C=m.bitb,I=m.bitk,N=m.write,M=N<m.read?m.read-N-1:m.end-N,v=$[c],Z=$[d];do{for(;I<20;)P--,C|=(R.read_byte(k++)&255)<<I,I+=8;if(E=C&v,O=y,T=b,H=(T+E)*3,(w=O[H])===0){C>>=O[H+1],I-=O[H+1],m.win[N++]=O[H+2],M--;continue}do{if(C>>=O[H+1],I-=O[H+1],(w&16)!==0){for(w&=15,D=O[H+2]+(C&$[w]),C>>=w,I-=w;I<15;)P--,C|=(R.read_byte(k++)&255)<<I,I+=8;E=C&Z,O=g,T=A,H=(T+E)*3,w=O[H];do if(C>>=O[H+1],I-=O[H+1],(w&16)!==0){for(w&=15;I<w;)P--,C|=(R.read_byte(k++)&255)<<I,I+=8;if(Q=O[H+2]+(C&$[w]),C>>=w,I-=w,M-=D,N>=Q)F=N-Q,N-F>0&&2>N-F?(m.win[N++]=m.win[F++],m.win[N++]=m.win[F++],D-=2):(m.win.set(m.win.subarray(F,F+2),N),N+=2,F+=2,D-=2);else{F=N-Q;do F+=m.end;while(F<0);if(w=m.end-F,D>w){if(D-=w,N-F>0&&w>N-F)do m.win[N++]=m.win[F++];while(--w!==0);else m.win.set(m.win.subarray(F,F+w),N),N+=w,F+=w,w=0;F=0}}if(N-F>0&&D>N-F)do m.win[N++]=m.win[F++];while(--D!==0);else m.win.set(m.win.subarray(F,F+D),N),N+=D,F+=D,D=0;break}else if((w&64)===0)E+=O[H+2],E+=C&$[w],H=(T+E)*3,w=O[H];else return R.msg="invalid distance code",D=R.avail_in-P,D=I>>3<D?I>>3:D,P+=D,k-=D,I-=D<<3,m.bitb=C,m.bitk=I,R.avail_in=P,R.total_in+=k-R.next_in_index,R.next_in_index=k,m.write=N,B;while(!0);break}if((w&64)===0){if(E+=O[H+2],E+=C&$[w],H=(T+E)*3,(w=O[H])===0){C>>=O[H+1],I-=O[H+1],m.win[N++]=O[H+2],M--;break}}else return(w&32)!==0?(D=R.avail_in-P,D=I>>3<D?I>>3:D,P+=D,k-=D,I-=D<<3,m.bitb=C,m.bitk=I,R.avail_in=P,R.total_in+=k-R.next_in_index,R.next_in_index=k,m.write=N,se):(R.msg="invalid literal/length code",D=R.avail_in-P,D=I>>3<D?I>>3:D,P+=D,k-=D,I-=D<<3,m.bitb=C,m.bitk=I,R.avail_in=P,R.total_in+=k-R.next_in_index,R.next_in_index=k,m.write=N,B)}while(!0)}while(M>=258&&P>=10);return D=R.avail_in-P,D=I>>3<D?I>>3:D,P+=D,k-=D,I-=D<<3,m.bitb=C,m.bitk=I,R.avail_in=P,R.total_in+=k-R.next_in_index,R.next_in_index=k,m.write=N,U}n.init=function(c,d,y,b,g,A){t=Be,_=c,f=d,p=y,h=b,x=g,S=A,r=null},n.proc=function(c,d,y){let b,g,A,m=0,R=0,E=0,O,T,w,C;for(E=d.next_in_index,O=d.avail_in,m=c.bitb,R=c.bitk,T=c.write,w=T<c.read?c.read-T-1:c.end-T;;)switch(t){case Be:if(w>=258&&O>=10&&(c.bitb=m,c.bitk=R,d.avail_in=O,d.total_in+=E-d.next_in_index,d.next_in_index=E,c.write=T,y=l(_,f,p,h,x,S,c,d),E=d.next_in_index,O=d.avail_in,m=c.bitb,R=c.bitk,T=c.write,w=T<c.read?c.read-T-1:c.end-T,y!=U)){t=y==se?tt:je;break}i=_,r=p,s=h,t=qt;case qt:for(b=i;R<b;){if(O!==0)y=U;else return c.bitb=m,c.bitk=R,d.avail_in=O,d.total_in+=E-d.next_in_index,d.next_in_index=E,c.write=T,c.inflate_flush(d,y);O--,m|=(d.read_byte(E++)&255)<<R,R+=8}if(g=(s+(m&$[b]))*3,m>>>=r[g+1],R-=r[g+1],A=r[g],A===0){a=r[g+2],t=Jt;break}if((A&16)!==0){o=A&15,e=r[g+2],t=Zt;break}if((A&64)===0){i=A,s=g/3+r[g+2];break}if((A&32)!==0){t=tt;break}return t=je,d.msg="invalid literal/length code",y=B,c.bitb=m,c.bitk=R,d.avail_in=O,d.total_in+=E-d.next_in_index,d.next_in_index=E,c.write=T,c.inflate_flush(d,y);case Zt:for(b=o;R<b;){if(O!==0)y=U;else return c.bitb=m,c.bitk=R,d.avail_in=O,d.total_in+=E-d.next_in_index,d.next_in_index=E,c.write=T,c.inflate_flush(d,y);O--,m|=(d.read_byte(E++)&255)<<R,R+=8}e+=m&$[b],m>>=b,R-=b,i=f,r=x,s=S,t=Kt;case Kt:for(b=i;R<b;){if(O!==0)y=U;else return c.bitb=m,c.bitk=R,d.avail_in=O,d.total_in+=E-d.next_in_index,d.next_in_index=E,c.write=T,c.inflate_flush(d,y);O--,m|=(d.read_byte(E++)&255)<<R,R+=8}if(g=(s+(m&$[b]))*3,m>>=r[g+1],R-=r[g+1],A=r[g],(A&16)!==0){o=A&15,u=r[g+2],t=Xt;break}if((A&64)===0){i=A,s=g/3+r[g+2];break}return t=je,d.msg="invalid distance code",y=B,c.bitb=m,c.bitk=R,d.avail_in=O,d.total_in+=E-d.next_in_index,d.next_in_index=E,c.write=T,c.inflate_flush(d,y);case Xt:for(b=o;R<b;){if(O!==0)y=U;else return c.bitb=m,c.bitk=R,d.avail_in=O,d.total_in+=E-d.next_in_index,d.next_in_index=E,c.write=T,c.inflate_flush(d,y);O--,m|=(d.read_byte(E++)&255)<<R,R+=8}u+=m&$[b],m>>=b,R-=b,t=$t;case $t:for(C=T-u;C<0;)C+=c.end;for(;e!==0;){if(w===0&&(T==c.end&&c.read!==0&&(T=0,w=T<c.read?c.read-T-1:c.end-T),w===0&&(c.write=T,y=c.inflate_flush(d,y),T=c.write,w=T<c.read?c.read-T-1:c.end-T,T==c.end&&c.read!==0&&(T=0,w=T<c.read?c.read-T-1:c.end-T),w===0)))return c.bitb=m,c.bitk=R,d.avail_in=O,d.total_in+=E-d.next_in_index,d.next_in_index=E,c.write=T,c.inflate_flush(d,y);c.win[T++]=c.win[C++],w--,C==c.end&&(C=0),e--}t=Be;break;case Jt:if(w===0&&(T==c.end&&c.read!==0&&(T=0,w=T<c.read?c.read-T-1:c.end-T),w===0&&(c.write=T,y=c.inflate_flush(d,y),T=c.write,w=T<c.read?c.read-T-1:c.end-T,T==c.end&&c.read!==0&&(T=0,w=T<c.read?c.read-T-1:c.end-T),w===0)))return c.bitb=m,c.bitk=R,d.avail_in=O,d.total_in+=E-d.next_in_index,d.next_in_index=E,c.write=T,c.inflate_flush(d,y);y=U,c.win[T++]=a,w--,t=Be;break;case tt:if(R>7&&(R-=8,O++,E--),c.write=T,y=c.inflate_flush(d,y),T=c.write,w=T<c.read?c.read-T-1:c.end-T,c.read!=c.write)return c.bitb=m,c.bitk=R,d.avail_in=O,d.total_in+=E-d.next_in_index,d.next_in_index=E,c.write=T,c.inflate_flush(d,y);t=Qt;case Qt:return y=se,c.bitb=m,c.bitk=R,d.avail_in=O,d.total_in+=E-d.next_in_index,d.next_in_index=E,c.write=T,c.inflate_flush(d,y);case je:return y=B,c.bitb=m,c.bitk=R,d.avail_in=O,d.total_in+=E-d.next_in_index,d.next_in_index=E,c.write=T,c.inflate_flush(d,y);default:return y=X,c.bitb=m,c.bitk=R,d.avail_in=O,d.total_in+=E-d.next_in_index,d.next_in_index=E,c.write=T,c.inflate_flush(d,y)}},n.free=function(){}}const zt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],ye=0,nt=1,en=2,tn=3,nn=4,rn=5,Ge=6,Ye=7,sn=8,we=9;function Ms(n,t){const e=this;let r=ye,s=0,i=0,a=0,o;const u=[0],_=[0],f=new Fs;let p=0,h=new Int32Array(qn*3);const x=0,S=new _t;e.bitk=0,e.bitb=0,e.win=new Uint8Array(t),e.end=t,e.read=0,e.write=0,e.reset=function(l,c){c&&(c[0]=x),r==Ge&&f.free(l),r=ye,e.bitk=0,e.bitb=0,e.read=e.write=0},e.reset(n,null),e.inflate_flush=function(l,c){let d,y,b;return y=l.next_out_index,b=e.read,d=(b<=e.write?e.write:e.end)-b,d>l.avail_out&&(d=l.avail_out),d!==0&&c==ie&&(c=U),l.avail_out-=d,l.total_out+=d,l.next_out.set(e.win.subarray(b,b+d),y),y+=d,b+=d,b==e.end&&(b=0,e.write==e.end&&(e.write=0),d=e.write-b,d>l.avail_out&&(d=l.avail_out),d!==0&&c==ie&&(c=U),l.avail_out-=d,l.total_out+=d,l.next_out.set(e.win.subarray(b,b+d),y),y+=d,b+=d),l.next_out_index=y,e.read=b,c},e.proc=function(l,c){let d,y,b,g,A,m,R,E;for(g=l.next_in_index,A=l.avail_in,y=e.bitb,b=e.bitk,m=e.write,R=m<e.read?e.read-m-1:e.end-m;;){let O,T,w,C,I,k,P,N;switch(r){case ye:for(;b<3;){if(A!==0)c=U;else return e.bitb=y,e.bitk=b,l.avail_in=A,l.total_in+=g-l.next_in_index,l.next_in_index=g,e.write=m,e.inflate_flush(l,c);A--,y|=(l.read_byte(g++)&255)<<b,b+=8}switch(d=y&7,p=d&1,d>>>1){case 0:y>>>=3,b-=3,d=b&7,y>>>=d,b-=d,r=nt;break;case 1:O=[],T=[],w=[[]],C=[[]],_t.inflate_trees_fixed(O,T,w,C),f.init(O[0],T[0],w[0],0,C[0],0),y>>>=3,b-=3,r=Ge;break;case 2:y>>>=3,b-=3,r=tn;break;case 3:return y>>>=3,b-=3,r=we,l.msg="invalid block type",c=B,e.bitb=y,e.bitk=b,l.avail_in=A,l.total_in+=g-l.next_in_index,l.next_in_index=g,e.write=m,e.inflate_flush(l,c)}break;case nt:for(;b<32;){if(A!==0)c=U;else return e.bitb=y,e.bitk=b,l.avail_in=A,l.total_in+=g-l.next_in_index,l.next_in_index=g,e.write=m,e.inflate_flush(l,c);A--,y|=(l.read_byte(g++)&255)<<b,b+=8}if((~y>>>16&65535)!=(y&65535))return r=we,l.msg="invalid stored block lengths",c=B,e.bitb=y,e.bitk=b,l.avail_in=A,l.total_in+=g-l.next_in_index,l.next_in_index=g,e.write=m,e.inflate_flush(l,c);s=y&65535,y=b=0,r=s!==0?en:p!==0?Ye:ye;break;case en:if(A===0||R===0&&(m==e.end&&e.read!==0&&(m=0,R=m<e.read?e.read-m-1:e.end-m),R===0&&(e.write=m,c=e.inflate_flush(l,c),m=e.write,R=m<e.read?e.read-m-1:e.end-m,m==e.end&&e.read!==0&&(m=0,R=m<e.read?e.read-m-1:e.end-m),R===0)))return e.bitb=y,e.bitk=b,l.avail_in=A,l.total_in+=g-l.next_in_index,l.next_in_index=g,e.write=m,e.inflate_flush(l,c);if(c=U,d=s,d>A&&(d=A),d>R&&(d=R),e.win.set(l.read_buf(g,d),m),g+=d,A-=d,m+=d,R-=d,(s-=d)!==0)break;r=p!==0?Ye:ye;break;case tn:for(;b<14;){if(A!==0)c=U;else return e.bitb=y,e.bitk=b,l.avail_in=A,l.total_in+=g-l.next_in_index,l.next_in_index=g,e.write=m,e.inflate_flush(l,c);A--,y|=(l.read_byte(g++)&255)<<b,b+=8}if(i=d=y&16383,(d&31)>29||(d>>5&31)>29)return r=we,l.msg="too many length or distance symbols",c=B,e.bitb=y,e.bitk=b,l.avail_in=A,l.total_in+=g-l.next_in_index,l.next_in_index=g,e.write=m,e.inflate_flush(l,c);if(d=258+(d&31)+(d>>5&31),!o||o.length<d)o=[];else for(E=0;E<d;E++)o[E]=0;y>>>=14,b-=14,a=0,r=nn;case nn:for(;a<4+(i>>>10);){for(;b<3;){if(A!==0)c=U;else return e.bitb=y,e.bitk=b,l.avail_in=A,l.total_in+=g-l.next_in_index,l.next_in_index=g,e.write=m,e.inflate_flush(l,c);A--,y|=(l.read_byte(g++)&255)<<b,b+=8}o[zt[a++]]=y&7,y>>>=3,b-=3}for(;a<19;)o[zt[a++]]=0;if(u[0]=7,d=S.inflate_trees_bits(o,u,_,h,l),d!=U)return c=d,c==B&&(o=null,r=we),e.bitb=y,e.bitk=b,l.avail_in=A,l.total_in+=g-l.next_in_index,l.next_in_index=g,e.write=m,e.inflate_flush(l,c);a=0,r=rn;case rn:for(;d=i,!(a>=258+(d&31)+(d>>5&31));){let M,v;for(d=u[0];b<d;){if(A!==0)c=U;else return e.bitb=y,e.bitk=b,l.avail_in=A,l.total_in+=g-l.next_in_index,l.next_in_index=g,e.write=m,e.inflate_flush(l,c);A--,y|=(l.read_byte(g++)&255)<<b,b+=8}if(d=h[(_[0]+(y&$[d]))*3+1],v=h[(_[0]+(y&$[d]))*3+2],v<16)y>>>=d,b-=d,o[a++]=v;else{for(E=v==18?7:v-14,M=v==18?11:3;b<d+E;){if(A!==0)c=U;else return e.bitb=y,e.bitk=b,l.avail_in=A,l.total_in+=g-l.next_in_index,l.next_in_index=g,e.write=m,e.inflate_flush(l,c);A--,y|=(l.read_byte(g++)&255)<<b,b+=8}if(y>>>=d,b-=d,M+=y&$[E],y>>>=E,b-=E,E=a,d=i,E+M>258+(d&31)+(d>>5&31)||v==16&&E<1)return o=null,r=we,l.msg="invalid bit length repeat",c=B,e.bitb=y,e.bitk=b,l.avail_in=A,l.total_in+=g-l.next_in_index,l.next_in_index=g,e.write=m,e.inflate_flush(l,c);v=v==16?o[E-1]:0;do o[E++]=v;while(--M!==0);a=E}}if(_[0]=-1,I=[],k=[],P=[],N=[],I[0]=9,k[0]=6,d=i,d=S.inflate_trees_dynamic(257+(d&31),1+(d>>5&31),o,I,k,P,N,h,l),d!=U)return d==B&&(o=null,r=we),c=d,e.bitb=y,e.bitk=b,l.avail_in=A,l.total_in+=g-l.next_in_index,l.next_in_index=g,e.write=m,e.inflate_flush(l,c);f.init(I[0],k[0],h,P[0],h,N[0]),r=Ge;case Ge:if(e.bitb=y,e.bitk=b,l.avail_in=A,l.total_in+=g-l.next_in_index,l.next_in_index=g,e.write=m,(c=f.proc(e,l,c))!=se)return e.inflate_flush(l,c);if(c=U,f.free(l),g=l.next_in_index,A=l.avail_in,y=e.bitb,b=e.bitk,m=e.write,R=m<e.read?e.read-m-1:e.end-m,p===0){r=ye;break}r=Ye;case Ye:if(e.write=m,c=e.inflate_flush(l,c),m=e.write,R=m<e.read?e.read-m-1:e.end-m,e.read!=e.write)return e.bitb=y,e.bitk=b,l.avail_in=A,l.total_in+=g-l.next_in_index,l.next_in_index=g,e.write=m,e.inflate_flush(l,c);r=sn;case sn:return c=se,e.bitb=y,e.bitk=b,l.avail_in=A,l.total_in+=g-l.next_in_index,l.next_in_index=g,e.write=m,e.inflate_flush(l,c);case we:return c=B,e.bitb=y,e.bitk=b,l.avail_in=A,l.total_in+=g-l.next_in_index,l.next_in_index=g,e.write=m,e.inflate_flush(l,c);default:return c=X,e.bitb=y,e.bitk=b,l.avail_in=A,l.total_in+=g-l.next_in_index,l.next_in_index=g,e.write=m,e.inflate_flush(l,c)}}},e.free=function(l){e.reset(l,null),e.win=null,h=null},e.set_dictionary=function(l,c,d){e.win.set(l.subarray(c,c+d),0),e.read=e.write=d},e.sync_point=function(){return r==nt?1:0}}const Hs=32,Ws=8,Bs=0,an=1,on=2,cn=3,ln=4,fn=5,rt=6,Ae=7,un=12,ce=13,js=[0,0,255,255];function Gs(){const n=this;n.mode=0,n.method=0,n.was=[0],n.need=0,n.marker=0,n.wbits=0;function t(e){return!e||!e.istate?X:(e.total_in=e.total_out=0,e.msg=null,e.istate.mode=Ae,e.istate.blocks.reset(e,null),U)}n.inflateEnd=function(e){return n.blocks&&n.blocks.free(e),n.blocks=null,U},n.inflateInit=function(e,r){return e.msg=null,n.blocks=null,r<8||r>15?(n.inflateEnd(e),X):(n.wbits=r,e.istate.blocks=new Ms(e,1<<r),t(e),U)},n.inflate=function(e,r){let s,i;if(!e||!e.istate||!e.next_in)return X;const a=e.istate;for(r=r==Is?ie:U,s=ie;;)switch(a.mode){case Bs:if(e.avail_in===0)return s;if(s=r,e.avail_in--,e.total_in++,((a.method=e.read_byte(e.next_in_index++))&15)!=Ws){a.mode=ce,e.msg="unknown compression method",a.marker=5;break}if((a.method>>4)+8>a.wbits){a.mode=ce,e.msg="invalid win size",a.marker=5;break}a.mode=an;case an:if(e.avail_in===0)return s;if(s=r,e.avail_in--,e.total_in++,i=e.read_byte(e.next_in_index++)&255,((a.method<<8)+i)%31!==0){a.mode=ce,e.msg="incorrect header check",a.marker=5;break}if((i&Hs)===0){a.mode=Ae;break}a.mode=on;case on:if(e.avail_in===0)return s;s=r,e.avail_in--,e.total_in++,a.need=(e.read_byte(e.next_in_index++)&255)<<24&4278190080,a.mode=cn;case cn:if(e.avail_in===0)return s;s=r,e.avail_in--,e.total_in++,a.need+=(e.read_byte(e.next_in_index++)&255)<<16&16711680,a.mode=ln;case ln:if(e.avail_in===0)return s;s=r,e.avail_in--,e.total_in++,a.need+=(e.read_byte(e.next_in_index++)&255)<<8&65280,a.mode=fn;case fn:return e.avail_in===0?s:(s=r,e.avail_in--,e.total_in++,a.need+=e.read_byte(e.next_in_index++)&255,a.mode=rt,As);case rt:return a.mode=ce,e.msg="need dictionary",a.marker=0,X;case Ae:if(s=a.blocks.proc(e,s),s==B){a.mode=ce,a.marker=0;break}if(s==U&&(s=r),s!=se)return s;s=r,a.blocks.reset(e,a.was),a.mode=un;case un:return e.avail_in=0,se;case ce:return B;default:return X}},n.inflateSetDictionary=function(e,r,s){let i=0,a=s;if(!e||!e.istate||e.istate.mode!=rt)return X;const o=e.istate;return a>=1<<o.wbits&&(a=(1<<o.wbits)-1,i=s-a),o.blocks.set_dictionary(r,i,a),o.mode=Ae,U},n.inflateSync=function(e){let r,s,i,a,o;if(!e||!e.istate)return X;const u=e.istate;if(u.mode!=ce&&(u.mode=ce,u.marker=0),(r=e.avail_in)===0)return ie;for(s=e.next_in_index,i=u.marker;r!==0&&i<4;)e.read_byte(s)==js[i]?i++:e.read_byte(s)!==0?i=0:i=4-i,s++,r--;return e.total_in+=s-e.next_in_index,e.next_in_index=s,e.avail_in=r,u.marker=i,i!=4?B:(a=e.total_in,o=e.total_out,t(e),e.total_in=a,e.total_out=o,u.mode=Ae,U)},n.inflateSyncPoint=function(e){return!e||!e.istate||!e.istate.blocks?X:e.istate.blocks.sync_point()}}function Zn(){}Zn.prototype={inflateInit(n){const t=this;return t.istate=new Gs,n||(n=Rs),t.istate.inflateInit(t,n)},inflate(n){const t=this;return t.istate?t.istate.inflate(t,n):X},inflateEnd(){const n=this;if(!n.istate)return X;const t=n.istate.inflateEnd(n);return n.istate=null,t},inflateSync(){const n=this;return n.istate?n.istate.inflateSync(n):X},inflateSetDictionary(n,t){const e=this;return e.istate?e.istate.inflateSetDictionary(e,n,t):X},read_byte(n){return this.next_in[n]},read_buf(n,t){return this.next_in.subarray(n,n+t)}};function Ys(n){const t=this,e=new Zn,r=n&&n.chunkSize?Math.floor(n.chunkSize*2):128*1024,s=Os,i=new Uint8Array(r);let a=!1;e.inflateInit(),e.next_out=i,t.append=function(o,u){const _=[];let f,p,h=0,x=0,S=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=r,e.avail_in===0&&!a&&(e.next_in_index=0,a=!0),f=e.inflate(s),a&&f===ie){if(e.avail_in!==0)throw new Error("inflating: bad input")}else if(f!==U&&f!==se)throw new Error("inflating: "+e.msg);if((a||f===se)&&e.avail_in===o.length)throw new Error("inflating: bad input");e.next_out_index&&(e.next_out_index===r?_.push(new Uint8Array(i)):_.push(i.subarray(0,e.next_out_index))),S+=e.next_out_index,u&&e.next_in_index>0&&e.next_in_index!=h&&(u(e.next_in_index),h=e.next_in_index)}while(e.avail_in>0||e.avail_out===0);return _.length>1?(p=new Uint8Array(S),_.forEach(function(l){p.set(l,x),x+=l.length})):p=_[0]?new Uint8Array(_[0]):new Uint8Array,p}},t.flush=function(){e.inflateEnd()}}const ge=4294967295,ue=65535,Vs=8,qs=0,Zs=99,Ks=67324752,Kn=134695760,Xs=Kn,dn=33639248,$s=101010256,_n=101075792,Js=117853008,ne=22,st=20,it=56,Qs=12,zs=20,hn=4,ei=1,ti=39169,ni=10,ri=1,si=21589,ii=28789,ai=25461,oi=6534,pn=1,ci=6,mn=8,wn=2048,gn=16,li=61440,fi=16384,ui=73,bn="/",at=30,di=10,_i=14,hi=18,G=void 0,he="undefined",ve="function";class yn{constructor(t){return class extends TransformStream{constructor(e,r){const s=new t(r);super({transform(i,a){a.enqueue(s.append(i))},flush(i){const a=s.flush();a&&i.enqueue(a)}})}}}}const pi=64;let Xn=2;try{typeof navigator!=he&&navigator.hardwareConcurrency&&(Xn=navigator.hardwareConcurrency)}catch{}const mi={chunkSize:512*1024,maxWorkers:Xn,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:G,CompressionStreamNative:typeof CompressionStream!=he&&CompressionStream,DecompressionStreamNative:typeof DecompressionStream!=he&&DecompressionStream},de=Object.assign({},mi);function $n(){return de}function wi(n){return Math.max(n.chunkSize,pi)}function Jn(n){const{baseURL:t,chunkSize:e,maxWorkers:r,terminateWorkerTimeout:s,useCompressionStream:i,useWebWorkers:a,Deflate:o,Inflate:u,CompressionStream:_,DecompressionStream:f,workerScripts:p}=n;if(le("baseURL",t),le("chunkSize",e),le("maxWorkers",r),le("terminateWorkerTimeout",s),le("useCompressionStream",i),le("useWebWorkers",a),o&&(de.CompressionStream=new yn(o)),u&&(de.DecompressionStream=new yn(u)),le("CompressionStream",_),le("DecompressionStream",f),p!==G){const{deflate:h,inflate:x}=p;if((h||x)&&(de.workerScripts||(de.workerScripts={})),h){if(!Array.isArray(h))throw new Error("workerScripts.deflate must be an array");de.workerScripts.deflate=h}if(x){if(!Array.isArray(x))throw new Error("workerScripts.inflate must be an array");de.workerScripts.inflate=x}}}function le(n,t){t!==G&&(de[n]=t)}function gi(){return"application/octet-stream"}const Qn=[];for(let n=0;n<256;n++){let t=n;for(let e=0;e<8;e++)t&1?t=t>>>1^3988292384:t=t>>>1;Qn[n]=t}class Ke{constructor(t){this.crc=t||-1}append(t){let e=this.crc|0;for(let r=0,s=t.length|0;r<s;r++)e=e>>>8^Qn[(e^t[r])&255];this.crc=e}get(){return~this.crc}}class zn extends TransformStream{constructor(){let t;const e=new Ke;super({transform(r,s){e.append(r),s.enqueue(r)},flush(){const r=new Uint8Array(4);new DataView(r.buffer).setUint32(0,e.get()),t.value=r}}),t=this}}function bi(n){if(typeof TextEncoder==he){n=unescape(encodeURIComponent(n));const t=new Uint8Array(n.length);for(let e=0;e<t.length;e++)t[e]=n.charCodeAt(e);return t}else return new TextEncoder().encode(n)}const K={concat(n,t){if(n.length===0||t.length===0)return n.concat(t);const e=n[n.length-1],r=K.getPartial(e);return r===32?n.concat(t):K._shiftRight(t,r,e|0,n.slice(0,n.length-1))},bitLength(n){const t=n.length;if(t===0)return 0;const e=n[t-1];return(t-1)*32+K.getPartial(e)},clamp(n,t){if(n.length*32<t)return n;n=n.slice(0,Math.ceil(t/32));const e=n.length;return t=t&31,e>0&&t&&(n[e-1]=K.partial(t,n[e-1]&2147483648>>t-1,1)),n},partial(n,t,e){return n===32?t:(e?t|0:t<<32-n)+n*1099511627776},getPartial(n){return Math.round(n/1099511627776)||32},_shiftRight(n,t,e,r){for(r===void 0&&(r=[]);t>=32;t-=32)r.push(e),e=0;if(t===0)return r.concat(n);for(let a=0;a<n.length;a++)r.push(e|n[a]>>>t),e=n[a]<<32-t;const s=n.length?n[n.length-1]:0,i=K.getPartial(s);return r.push(K.partial(t+i&31,t+i>32?e:r.pop(),1)),r}},Xe={bytes:{fromBits(n){const e=K.bitLength(n)/8,r=new Uint8Array(e);let s;for(let i=0;i<e;i++)(i&3)===0&&(s=n[i/4]),r[i]=s>>>24,s<<=8;return r},toBits(n){const t=[];let e,r=0;for(e=0;e<n.length;e++)r=r<<8|n[e],(e&3)===3&&(t.push(r),r=0);return e&3&&t.push(K.partial(8*(e&3),r)),t}}},er={};er.sha1=class{constructor(n){const t=this;t.blockSize=512,t._init=[1732584193,4023233417,2562383102,271733878,3285377520],t._key=[1518500249,1859775393,2400959708,3395469782],n?(t._h=n._h.slice(0),t._buffer=n._buffer.slice(0),t._length=n._length):t.reset()}reset(){const n=this;return n._h=n._init.slice(0),n._buffer=[],n._length=0,n}update(n){const t=this;typeof n=="string"&&(n=Xe.utf8String.toBits(n));const e=t._buffer=K.concat(t._buffer,n),r=t._length,s=t._length=r+K.bitLength(n);if(s>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+r-(t.blockSize+r&t.blockSize-1);o<=s;o+=t.blockSize)t._block(i.subarray(16*a,16*(a+1))),a+=1;return e.splice(0,16*a),t}finalize(){const n=this;let t=n._buffer;const e=n._h;t=K.concat(t,[K.partial(1,1)]);for(let r=t.length+2;r&15;r++)t.push(0);for(t.push(Math.floor(n._length/4294967296)),t.push(n._length|0);t.length;)n._block(t.splice(0,16));return n.reset(),e}_f(n,t,e,r){if(n<=19)return t&e|~t&r;if(n<=39)return t^e^r;if(n<=59)return t&e|t&r|e&r;if(n<=79)return t^e^r}_S(n,t){return t<<n|t>>>32-n}_block(n){const t=this,e=t._h,r=Array(80);for(let _=0;_<16;_++)r[_]=n[_];let s=e[0],i=e[1],a=e[2],o=e[3],u=e[4];for(let _=0;_<=79;_++){_>=16&&(r[_]=t._S(1,r[_-3]^r[_-8]^r[_-14]^r[_-16]));const f=t._S(5,s)+t._f(_,i,a,o)+u+r[_]+t._key[Math.floor(_/20)]|0;u=o,o=a,a=t._S(30,i),i=s,s=f}e[0]=e[0]+s|0,e[1]=e[1]+i|0,e[2]=e[2]+a|0,e[3]=e[3]+o|0,e[4]=e[4]+u|0}};const tr={};tr.aes=class{constructor(n){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const e=t._tables[0][4],r=t._tables[1],s=n.length;let i,a,o,u=1;if(s!==4&&s!==6&&s!==8)throw new Error("invalid aes key size");for(t._key=[a=n.slice(0),o=[]],i=s;i<4*s+28;i++){let _=a[i-1];(i%s===0||s===8&&i%s===4)&&(_=e[_>>>24]<<24^e[_>>16&255]<<16^e[_>>8&255]<<8^e[_&255],i%s===0&&(_=_<<8^_>>>24^u<<24,u=u<<1^(u>>7)*283)),a[i]=a[i-s]^_}for(let _=0;i;_++,i--){const f=a[_&3?i:i-4];i<=4||_<4?o[_]=f:o[_]=r[0][e[f>>>24]]^r[1][e[f>>16&255]]^r[2][e[f>>8&255]]^r[3][e[f&255]]}}encrypt(n){return this._crypt(n,0)}decrypt(n){return this._crypt(n,1)}_precompute(){const n=this._tables[0],t=this._tables[1],e=n[4],r=t[4],s=[],i=[];let a,o,u,_;for(let f=0;f<256;f++)i[(s[f]=f<<1^(f>>7)*283)^f]=f;for(let f=a=0;!e[f];f^=o||1,a=i[a]||1){let p=a^a<<1^a<<2^a<<3^a<<4;p=p>>8^p&255^99,e[f]=p,r[p]=f,_=s[u=s[o=s[f]]];let h=_*16843009^u*65537^o*257^f*16843008,x=s[p]*257^p*16843008;for(let S=0;S<4;S++)n[S][f]=x=x<<24^x>>>8,t[S][p]=h=h<<24^h>>>8}for(let f=0;f<5;f++)n[f]=n[f].slice(0),t[f]=t[f].slice(0)}_crypt(n,t){if(n.length!==4)throw new Error("invalid aes block size");const e=this._key[t],r=e.length/4-2,s=[0,0,0,0],i=this._tables[t],a=i[0],o=i[1],u=i[2],_=i[3],f=i[4];let p=n[0]^e[0],h=n[t?3:1]^e[1],x=n[2]^e[2],S=n[t?1:3]^e[3],l=4,c,d,y;for(let b=0;b<r;b++)c=a[p>>>24]^o[h>>16&255]^u[x>>8&255]^_[S&255]^e[l],d=a[h>>>24]^o[x>>16&255]^u[S>>8&255]^_[p&255]^e[l+1],y=a[x>>>24]^o[S>>16&255]^u[p>>8&255]^_[h&255]^e[l+2],S=a[S>>>24]^o[p>>16&255]^u[h>>8&255]^_[x&255]^e[l+3],l+=4,p=c,h=d,x=y;for(let b=0;b<4;b++)s[t?3&-b:b]=f[p>>>24]<<24^f[h>>16&255]<<16^f[x>>8&255]<<8^f[S&255]^e[l++],c=p,p=h,h=x,x=S,S=c;return s}};const yi={getRandomValues(n){const t=new Uint32Array(n.buffer),e=r=>{let s=987654321;const i=4294967295;return function(){return s=36969*(s&65535)+(s>>16)&i,r=18e3*(r&65535)+(r>>16)&i,(((s<<16)+r&i)/4294967296+.5)*(Math.random()>.5?1:-1)}};for(let r=0,s;r<n.length;r+=4){const i=e((s||Math.random())*4294967296);s=i()*987654071,t[r/4]=i()*4294967296|0}return n}},nr={};nr.ctrGladman=class{constructor(n,t){this._prf=n,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(n){return this.calculate(this._prf,n,this._iv)}incWord(n){if((n>>24&255)===255){let t=n>>16&255,e=n>>8&255,r=n&255;t===255?(t=0,e===255?(e=0,r===255?r=0:++r):++e):++t,n=0,n+=t<<16,n+=e<<8,n+=r}else n+=1<<24;return n}incCounter(n){(n[0]=this.incWord(n[0]))===0&&(n[1]=this.incWord(n[1]))}calculate(n,t,e){let r;if(!(r=t.length))return[];const s=K.bitLength(t);for(let i=0;i<r;i+=4){this.incCounter(e);const a=n.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,s)}};const be={importKey(n){return new be.hmacSha1(Xe.bytes.toBits(n))},pbkdf2(n,t,e,r){if(e=e||1e4,r<0||e<0)throw new Error("invalid params to pbkdf2");const s=(r>>5)+1<<2;let i,a,o,u,_;const f=new ArrayBuffer(s),p=new DataView(f);let h=0;const x=K;for(t=Xe.bytes.toBits(t),_=1;h<(s||1);_++){for(i=a=n.encrypt(x.concat(t,[_])),o=1;o<e;o++)for(a=n.encrypt(a),u=0;u<a.length;u++)i[u]^=a[u];for(o=0;h<(s||1)&&o<i.length;o++)p.setInt32(h,i[o]),h+=4}return f.slice(0,r/8)}};be.hmacSha1=class{constructor(n){const t=this,e=t._hash=er.sha1,r=[[],[]];t._baseHash=[new e,new e];const s=t._baseHash[0].blockSize/32;n.length>s&&(n=new e().update(n).finalize());for(let i=0;i<s;i++)r[0][i]=n[i]^909522486,r[1][i]=n[i]^1549556828;t._baseHash[0].update(r[0]),t._baseHash[1].update(r[1]),t._resultHash=new e(t._baseHash[0])}reset(){const n=this;n._resultHash=new n._hash(n._baseHash[0]),n._updated=!1}update(n){const t=this;t._updated=!0,t._resultHash.update(n)}digest(){const n=this,t=n._resultHash.finalize(),e=new n._hash(n._baseHash[1]).update(t).finalize();return n.reset(),e}encrypt(n){if(this._updated)throw new Error("encrypt on already updated hmac called!");return this.update(n),this.digest(n)}};const Ei=typeof crypto!=he&&typeof crypto.getRandomValues==ve,St="Invalid password",Rt="Invalid signature",At="zipjs-abort-check-password";function rr(n){return Ei?crypto.getRandomValues(n):yi.getRandomValues(n)}const Ee=16,xi="raw",sr={name:"PBKDF2"},Ti={name:"HMAC"},Si="SHA-1",Ri=Object.assign({hash:Ti},sr),ht=Object.assign({iterations:1e3,hash:{name:Si}},sr),Ai=["deriveBits"],Pe=[8,12,16],Oe=[16,24,32],fe=10,Oi=[0,0,0,0],Je=typeof crypto!=he,Le=Je&&crypto.subtle,ir=Je&&typeof Le!=he,ee=Xe.bytes,Ii=tr.aes,Ci=nr.ctrGladman,Pi=be.hmacSha1;let En=Je&&ir&&typeof Le.importKey==ve,xn=Je&&ir&&typeof Le.deriveBits==ve;class Di extends TransformStream{constructor({password:t,rawPassword:e,signed:r,encryptionStrength:s,checkPasswordOnly:i}){super({start(){Object.assign(this,{ready:new Promise(a=>this.resolveReady=a),password:cr(t,e),signed:r,strength:s-1,pending:new Uint8Array})},async transform(a,o){const u=this,{password:_,strength:f,resolveReady:p,ready:h}=u;_?(await ki(u,f,_,J(a,0,Pe[f]+2)),a=J(a,Pe[f]+2),i?o.error(new Error(At)):p()):await h;const x=new Uint8Array(a.length-fe-(a.length-fe)%Ee);o.enqueue(ar(u,a,x,0,fe,!0))},async flush(a){const{signed:o,ctr:u,hmac:_,pending:f,ready:p}=this;if(_&&u){await p;const h=J(f,0,f.length-fe),x=J(f,f.length-fe);let S=new Uint8Array;if(h.length){const l=Ne(ee,h);_.update(l);const c=u.update(l);S=De(ee,c)}if(o){const l=J(De(ee,_.digest()),0,fe);for(let c=0;c<fe;c++)if(l[c]!=x[c])throw new Error(Rt)}a.enqueue(S)}}})}}class Ni extends TransformStream{constructor({password:t,rawPassword:e,encryptionStrength:r}){let s;super({start(){Object.assign(this,{ready:new Promise(i=>this.resolveReady=i),password:cr(t,e),strength:r-1,pending:new Uint8Array})},async transform(i,a){const o=this,{password:u,strength:_,resolveReady:f,ready:p}=o;let h=new Uint8Array;u?(h=await vi(o,_,u),f()):await p;const x=new Uint8Array(h.length+i.length-i.length%Ee);x.set(h,0),a.enqueue(ar(o,i,x,h.length,0))},async flush(i){const{ctr:a,hmac:o,pending:u,ready:_}=this;if(o&&a){await _;let f=new Uint8Array;if(u.length){const p=a.update(Ne(ee,u));o.update(p),f=De(ee,p)}s.signature=De(ee,o.digest()).slice(0,fe),i.enqueue(Ot(f,s.signature))}}}),s=this}}function ar(n,t,e,r,s,i){const{ctr:a,hmac:o,pending:u}=n,_=t.length-s;u.length&&(t=Ot(u,t),e=Fi(e,_-_%Ee));let f;for(f=0;f<=_-Ee;f+=Ee){const p=Ne(ee,J(t,f,f+Ee));i&&o.update(p);const h=a.update(p);i||o.update(h),e.set(De(ee,h),f+r)}return n.pending=J(t,f),e}async function ki(n,t,e,r){const s=await or(n,t,e,J(r,0,Pe[t])),i=J(r,Pe[t]);if(s[0]!=i[0]||s[1]!=i[1])throw new Error(St)}async function vi(n,t,e){const r=rr(new Uint8Array(Pe[t])),s=await or(n,t,e,r);return Ot(r,s)}async function or(n,t,e,r){n.password=null;const s=await Li(xi,e,Ri,!1,Ai),i=await Ui(Object.assign({salt:r},ht),s,8*(Oe[t]*2+2)),a=new Uint8Array(i),o=Ne(ee,J(a,0,Oe[t])),u=Ne(ee,J(a,Oe[t],Oe[t]*2)),_=J(a,Oe[t]*2);return Object.assign(n,{keys:{key:o,authentication:u,passwordVerification:_},ctr:new Ci(new Ii(o),Array.from(Oi)),hmac:new Pi(u)}),_}async function Li(n,t,e,r,s){if(En)try{return await Le.importKey(n,t,e,r,s)}catch{return En=!1,be.importKey(t)}else return be.importKey(t)}async function Ui(n,t,e){if(xn)try{return await Le.deriveBits(n,t,e)}catch{return xn=!1,be.pbkdf2(t,n.salt,ht.iterations,e)}else return be.pbkdf2(t,n.salt,ht.iterations,e)}function cr(n,t){return t===G?bi(n):t}function Ot(n,t){let e=n;return n.length+t.length&&(e=new Uint8Array(n.length+t.length),e.set(n,0),e.set(t,n.length)),e}function Fi(n,t){if(t&&t>n.length){const e=n;n=new Uint8Array(t),n.set(e,0)}return n}function J(n,t,e){return n.subarray(t,e)}function De(n,t){return n.fromBits(t)}function Ne(n,t){return n.toBits(t)}const Ce=12;class Mi extends TransformStream{constructor({password:t,passwordVerification:e,checkPasswordOnly:r}){super({start(){Object.assign(this,{password:t,passwordVerification:e}),lr(this,t)},transform(s,i){const a=this;if(a.password){const o=Tn(a,s.subarray(0,Ce));if(a.password=null,o.at(-1)!=a.passwordVerification)throw new Error(St);s=s.subarray(Ce)}r?i.error(new Error(At)):i.enqueue(Tn(a,s))}})}}class Hi extends TransformStream{constructor({password:t,passwordVerification:e}){super({start(){Object.assign(this,{password:t,passwordVerification:e}),lr(this,t)},transform(r,s){const i=this;let a,o;if(i.password){i.password=null;const u=rr(new Uint8Array(Ce));u[Ce-1]=i.passwordVerification,a=new Uint8Array(r.length+u.length),a.set(Sn(i,u),0),o=Ce}else a=new Uint8Array(r.length),o=0;a.set(Sn(i,r),o),s.enqueue(a)}})}}function Tn(n,t){const e=new Uint8Array(t.length);for(let r=0;r<t.length;r++)e[r]=fr(n)^t[r],It(n,e[r]);return e}function Sn(n,t){const e=new Uint8Array(t.length);for(let r=0;r<t.length;r++)e[r]=fr(n)^t[r],It(n,t[r]);return e}function lr(n,t){const e=[305419896,591751049,878082192];Object.assign(n,{keys:e,crcKey0:new Ke(e[0]),crcKey2:new Ke(e[2])});for(let r=0;r<t.length;r++)It(n,t.charCodeAt(r))}function It(n,t){let[e,r,s]=n.keys;n.crcKey0.append([t]),e=~n.crcKey0.get(),r=Rn(Math.imul(Rn(r+ur(e)),134775813)+1),n.crcKey2.append([r>>>24]),s=~n.crcKey2.get(),n.keys=[e,r,s]}function fr(n){const t=n.keys[2]|2;return ur(Math.imul(t,t^1)>>>8)}function ur(n){return n&255}function Rn(n){return n&4294967295}const Ct="Invalid uncompressed size",An="deflate-raw";class Wi extends TransformStream{constructor(t,{chunkSize:e,CompressionStream:r,CompressionStreamNative:s}){super({});const{compressed:i,encrypted:a,useCompressionStream:o,zipCrypto:u,signed:_,level:f}=t,p=this;let h,x,S=super.readable;(!a||u)&&_&&(h=new zn,S=ae(S,h)),i&&(S=_r(S,o,{level:f,chunkSize:e},s,r)),a&&(u?S=ae(S,new Hi(t)):(x=new Ni(t),S=ae(S,x))),dr(p,S,()=>{let l;a&&!u&&(l=x.signature),(!a||u)&&_&&(l=new DataView(h.value.buffer).getUint32(0)),p.signature=l})}}class Bi extends TransformStream{constructor(t,{chunkSize:e,DecompressionStream:r,DecompressionStreamNative:s}){super({});const{zipCrypto:i,encrypted:a,signed:o,signature:u,compressed:_,useCompressionStream:f}=t;let p,h,x=super.readable;a&&(i?x=ae(x,new Mi(t)):(h=new Di(t),x=ae(x,h))),_&&(x=_r(x,f,{chunkSize:e},s,r)),(!a||i)&&o&&(p=new zn,x=ae(x,p)),dr(this,x,()=>{if((!a||i)&&o){const S=new DataView(p.value.buffer);if(u!=S.getUint32(0,!1))throw new Error(Rt)}})}}function dr(n,t,e){t=ae(t,new TransformStream({flush:e})),Object.defineProperty(n,"readable",{get(){return t}})}function _r(n,t,e,r,s){try{const i=t&&r?r:s;n=ae(n,new i(An,e))}catch(i){if(t)n=ae(n,new s(An,e));else throw i}return n}function ae(n,t){return n.pipeThrough(t)}const ji="message",Gi="start",Yi="pull",On="data",Vi="ack",In="close",qi="deflate",hr="inflate";class Zi extends TransformStream{constructor(t,e){super({});const r=this,{codecType:s}=t;let i;s.startsWith(qi)?i=Wi:s.startsWith(hr)&&(i=Bi),r.outputSize=0;let a=0;const o=new i(t,e),u=super.readable,_=new TransformStream({transform(p,h){p&&p.length&&(a+=p.length,h.enqueue(p))},flush(){Object.assign(r,{inputSize:a})}}),f=new TransformStream({transform(p,h){if(p&&p.length&&(h.enqueue(p),r.outputSize+=p.length,t.outputSize&&r.outputSize>t.outputSize))throw new Error(Ct)},flush(){const{signature:p}=o;Object.assign(r,{signature:p,inputSize:a})}});Object.defineProperty(r,"readable",{get(){return u.pipeThrough(_).pipeThrough(o).pipeThrough(f)}})}}class Ki extends TransformStream{constructor(t){let e;super({transform:r,flush(s){e&&e.length&&s.enqueue(e)}});function r(s,i){if(e){const a=new Uint8Array(e.length+s.length);a.set(e),a.set(s,e.length),s=a,e=null}s.length>t?(i.enqueue(s.slice(0,t)),r(s.slice(t),i)):e=s}}}let pr=typeof Worker!=he;class ot{constructor(t,{readable:e,writable:r},{options:s,config:i,streamOptions:a,useWebWorkers:o,transferStreams:u,scripts:_},f){const{signal:p}=a;return Object.assign(t,{busy:!0,readable:e.pipeThrough(new Ki(i.chunkSize)).pipeThrough(new Xi(a),{signal:p}),writable:r,options:Object.assign({},s),scripts:_,transferStreams:u,terminate(){return new Promise(h=>{const{worker:x,busy:S}=t;x?(S?t.resolveTerminated=h:(x.terminate(),h()),t.interface=null):h()})},onTaskFinished(){const{resolveTerminated:h}=t;h&&(t.resolveTerminated=null,t.terminated=!0,t.worker.terminate(),h()),t.busy=!1,f(t)}}),(o&&pr?$i:mr)(t,i)}}class Xi extends TransformStream{constructor({onstart:t,onprogress:e,size:r,onend:s}){let i=0;super({async start(){t&&await ct(t,r)},async transform(a,o){i+=a.length,e&&await ct(e,i,r),o.enqueue(a)},async flush(){s&&await ct(s,i)}})}}async function ct(n,...t){try{await n(...t)}catch{}}function mr(n,t){return{run:()=>Ji(n,t)}}function $i(n,t){const{baseURL:e,chunkSize:r}=t;if(!n.interface){let s;try{s=ea(n.scripts[0],e,n)}catch{return pr=!1,mr(n,t)}Object.assign(n,{worker:s,interface:{run:()=>Qi(n,{chunkSize:r})}})}return n.interface}async function Ji({options:n,readable:t,writable:e,onTaskFinished:r},s){let i;try{i=new Zi(n,s),await t.pipeThrough(i).pipeTo(e,{preventClose:!0,preventAbort:!0});const{signature:a,inputSize:o,outputSize:u}=i;return{signature:a,inputSize:o,outputSize:u}}catch(a){throw i&&(a.outputSize=i.outputSize),a}finally{r()}}async function Qi(n,t){let e,r;const s=new Promise((h,x)=>{e=h,r=x});Object.assign(n,{reader:null,writer:null,resolveResult:e,rejectResult:r,result:s});const{readable:i,options:a,scripts:o}=n,{writable:u,closed:_}=zi(n.writable),f=Ve({type:Gi,scripts:o.slice(1),options:a,config:t,readable:i,writable:u},n);f||Object.assign(n,{reader:i.getReader(),writer:u.getWriter()});const p=await s;return f||await u.getWriter().close(),await _,p}function zi(n){let t;const e=new Promise(s=>t=s);return{writable:new WritableStream({async write(s){const i=n.getWriter();await i.ready,await i.write(s),i.releaseLock()},close(){t()},abort(s){return n.getWriter().abort(s)}}),closed:e}}let Cn=!0,Pn=!0;function ea(n,t,e){const r={type:"module"};let s,i;typeof n==ve&&(n=n());try{s=new URL(n,t)}catch{s=n}if(Cn)try{i=new Worker(s)}catch{Cn=!1,i=new Worker(s,r)}else i=new Worker(s,r);return i.addEventListener(ji,a=>ta(a,e)),i}function Ve(n,{worker:t,writer:e,onTaskFinished:r,transferStreams:s}){try{const{value:i,readable:a,writable:o}=n,u=[];if(i&&(i.byteLength<i.buffer.byteLength?n.value=i.buffer.slice(0,i.byteLength):n.value=i.buffer,u.push(n.value)),s&&Pn?(a&&u.push(a),o&&u.push(o)):n.readable=n.writable=null,u.length)try{return t.postMessage(n,u),!0}catch{Pn=!1,n.readable=n.writable=null,t.postMessage(n)}else t.postMessage(n)}catch(i){throw e&&e.releaseLock(),r(),i}}async function ta({data:n},t){const{type:e,value:r,messageId:s,result:i,error:a}=n,{reader:o,writer:u,resolveResult:_,rejectResult:f,onTaskFinished:p}=t;try{if(a){const{message:x,stack:S,code:l,name:c,outputSize:d}=a,y=new Error(x);Object.assign(y,{stack:S,code:l,name:c,outputSize:d}),h(y)}else{if(e==Yi){const{value:x,done:S}=await o.read();Ve({type:On,value:x,done:S,messageId:s},t)}e==On&&(await u.ready,await u.write(new Uint8Array(r)),Ve({type:Vi,messageId:s},t)),e==In&&h(null,i)}}catch(x){Ve({type:In,messageId:s},t),h(x)}function h(x,S){x?f(x):_(S),u&&u.releaseLock(),p()}}let _e=[];const lt=[];let Dn=0;async function na(n,t){const{options:e,config:r}=t,{transferStreams:s,useWebWorkers:i,useCompressionStream:a,codecType:o,compressed:u,signed:_,encrypted:f}=e,{workerScripts:p,maxWorkers:h}=r;t.transferStreams=s||s===G;const x=!u&&!_&&!f&&!t.transferStreams;return t.useWebWorkers=!x&&(i||i===G&&r.useWebWorkers),t.scripts=t.useWebWorkers&&p?p[o]:[],e.useCompressionStream=a||a===G&&r.useCompressionStream,(await S()).run();async function S(){const c=_e.find(d=>!d.busy);if(c)return pt(c),new ot(c,n,t,l);if(_e.length<h){const d={indexWorker:Dn};return Dn++,_e.push(d),new ot(d,n,t,l)}else return new Promise(d=>lt.push({resolve:d,stream:n,workerOptions:t}))}function l(c){if(lt.length){const[{resolve:d,stream:y,workerOptions:b}]=lt.splice(0,1);d(new ot(c,y,b,l))}else c.worker?(pt(c),ra(c,t)):_e=_e.filter(d=>d!=c)}}function ra(n,t){const{config:e}=t,{terminateWorkerTimeout:r}=e;Number.isFinite(r)&&r>=0&&(n.terminated?n.terminated=!1:n.terminateTimeout=setTimeout(async()=>{_e=_e.filter(s=>s!=n);try{await n.terminate()}catch{}},r))}function pt(n){const{terminateTimeout:t}=n;t&&(clearTimeout(t),n.terminateTimeout=null)}async function sa(){await Promise.allSettled(_e.map(n=>(pt(n),n.terminate())))}const wr="HTTP error ",Ue="HTTP Range not supported",gr="Writer iterator completed too soon",br="Writer not initialized",ia="text/plain",aa="Content-Length",oa="Content-Range",ca="Accept-Ranges",la="Range",fa="Content-Type",ua="HEAD",Pt="GET",yr="bytes",da=64*1024,Dt="writable";class Qe{constructor(){this.size=0}init(){this.initialized=!0}}class me extends Qe{get readable(){const t=this,{chunkSize:e=da}=t,r=new ReadableStream({start(){this.chunkOffset=0},async pull(s){const{offset:i=0,size:a,diskNumberStart:o}=r,{chunkOffset:u}=this,_=a===G?e:Math.min(e,a-u),f=await Y(t,i+u,_,o);s.enqueue(f),u+e>a||a===G&&!f.length&&_?s.close():this.chunkOffset+=e}});return r}}class Nt extends Qe{constructor(){super();const t=this,e=new WritableStream({write(r){if(!t.initialized)throw new Error(br);return t.writeUint8Array(r)}});Object.defineProperty(t,Dt,{get(){return e}})}writeUint8Array(){}}class _a extends me{constructor(t){super();let e=t.length;for(;t.charAt(e-1)=="=";)e--;const r=t.indexOf(",")+1;Object.assign(this,{dataURI:t,dataStart:r,size:Math.floor((e-r)*.75)})}readUint8Array(t,e){const{dataStart:r,dataURI:s}=this,i=new Uint8Array(e),a=Math.floor(t/3)*4,o=atob(s.substring(a+r,Math.ceil((t+e)/3)*4+r)),u=t-Math.floor(a/4)*3;let _=0;for(let f=u;f<u+e&&f<o.length;f++)i[f-u]=o.charCodeAt(f),_++;return _<i.length?i.subarray(0,_):i}}class ha extends Nt{constructor(t){super(),Object.assign(this,{data:"data:"+(t||"")+";base64,",pending:[]})}writeUint8Array(t){const e=this;let r=0,s=e.pending;const i=e.pending.length;for(e.pending="",r=0;r<Math.floor((i+t.length)/3)*3-i;r++)s+=String.fromCharCode(t[r]);for(;r<t.length;r++)e.pending+=String.fromCharCode(t[r]);s.length&&(s.length>2?e.data+=btoa(s):e.pending+=s)}getData(){return this.data+btoa(this.pending)}}class kt extends me{constructor(t){super(),Object.assign(this,{blob:t,size:t.size})}async readUint8Array(t,e){const r=this,s=t+e;let a=await(t||s<r.size?r.blob.slice(t,s):r.blob).arrayBuffer();return a.byteLength>e&&(a=a.slice(t,s)),new Uint8Array(a)}}class Er extends Qe{constructor(t){super();const e=this,r=new TransformStream,s=[];t&&s.push([fa,t]),Object.defineProperty(e,Dt,{get(){return r.writable}}),e.blob=new Response(r.readable,{headers:s}).blob()}getData(){return this.blob}}class pa extends kt{constructor(t){super(new Blob([t],{type:ia}))}}class ma extends Er{constructor(t){super(t),Object.assign(this,{encoding:t,utf8:!t||t.toLowerCase()=="utf-8"})}async getData(){const{encoding:t,utf8:e}=this,r=await super.getData();if(r.text&&e)return r.text();{const s=new FileReader;return new Promise((i,a)=>{Object.assign(s,{onload:({target:o})=>i(o.result),onerror:()=>a(s.error)}),s.readAsText(r,t)})}}}class wa extends me{constructor(t,e){super(),xr(this,t,e)}async init(){await Tr(this,mt,Nn),super.init()}readUint8Array(t,e){return Sr(this,t,e,mt,Nn)}}class ga extends me{constructor(t,e){super(),xr(this,t,e)}async init(){await Tr(this,wt,kn),super.init()}readUint8Array(t,e){return Sr(this,t,e,wt,kn)}}function xr(n,t,e){const{preventHeadRequest:r,useRangeHeader:s,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(n,{url:t,options:e,preventHeadRequest:r,useRangeHeader:s,forceRangeRequests:i,combineSizeEocd:a})}async function Tr(n,t,e){const{url:r,preventHeadRequest:s,useRangeHeader:i,forceRangeRequests:a,combineSizeEocd:o}=n;if(xa(r)&&(i||a)&&(typeof s>"u"||s)){const u=await t(Pt,n,Rr(n,o?-ne:void 0));if(!a&&u.headers.get(ca)!=yr)throw new Error(Ue);{o&&(n.eocdCache=new Uint8Array(await u.arrayBuffer()));let _;const f=u.headers.get(oa);if(f){const p=f.trim().split(/\s*\/\s*/);if(p.length){const h=p[1];h&&h!="*"&&(_=Number(h))}}_===G?await vn(n,t,e):n.size=_}}else await vn(n,t,e)}async function Sr(n,t,e,r,s){const{useRangeHeader:i,forceRangeRequests:a,eocdCache:o,size:u,options:_}=n;if(i||a){if(o&&t==u-ne&&e==ne)return o;if(t>=u)return new Uint8Array;{t+e>u&&(e=u-t);const f=await r(Pt,n,Rr(n,t,e));if(f.status!=206)throw new Error(Ue);return new Uint8Array(await f.arrayBuffer())}}else{const{data:f}=n;return f||await s(n,_),new Uint8Array(n.data.subarray(t,t+e))}}function Rr(n,t=0,e=1){return Object.assign({},vt(n),{[la]:yr+"="+(t<0?t:t+"-"+(t+e-1))})}function vt({options:n}){const{headers:t}=n;if(t)return Symbol.iterator in t?Object.fromEntries(t):t}async function Nn(n){await Ar(n,mt)}async function kn(n){await Ar(n,wt)}async function Ar(n,t){const e=await t(Pt,n,vt(n));n.data=new Uint8Array(await e.arrayBuffer()),n.size||(n.size=n.data.length)}async function vn(n,t,e){if(n.preventHeadRequest)await e(n,n.options);else{const s=(await t(ua,n,vt(n))).headers.get(aa);s?n.size=Number(s):await e(n,n.options)}}async function mt(n,{options:t,url:e},r){const s=await fetch(e,Object.assign({},t,{method:n,headers:r}));if(s.status<400)return s;throw s.status==416?new Error(Ue):new Error(wr+(s.statusText||s.status))}function wt(n,{url:t},e){return new Promise((r,s)=>{const i=new XMLHttpRequest;if(i.addEventListener("load",()=>{if(i.status<400){const a=[];i.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach(o=>{const u=o.trim().split(/\s*:\s*/);u[0]=u[0].trim().replace(/^[a-z]|-[a-z]/g,_=>_.toUpperCase()),a.push(u)}),r({status:i.status,arrayBuffer:()=>i.response,headers:new Map(a)})}else s(i.status==416?new Error(Ue):new Error(wr+(i.statusText||i.status)))},!1),i.addEventListener("error",a=>s(a.detail?a.detail.error:new Error("Network error")),!1),i.open(n,t),e)for(const a of Object.entries(e))i.setRequestHeader(a[0],a[1]);i.responseType="arraybuffer",i.send()})}class Or extends me{constructor(t,e={}){super(),Object.assign(this,{url:t,reader:e.useXHR?new ga(t,e):new wa(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 ba extends Or{constructor(t,e={}){e.useRangeHeader=!0,super(t,e)}}class ya extends me{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 Ea extends Nt{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 r=e.array;e.array=new Uint8Array(r.length+t.length),e.array.set(r)}e.array.set(t,e.offset),e.offset+=t.length}getData(){return this.array}}class Lt extends me{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(r,s)=>{await r.init(),s!=e.length-1&&(t.lastDiskOffset+=r.size),t.size+=r.size})),super.init()}async readUint8Array(t,e,r=0){const s=this,{readers:i}=this;let a,o=r;o==-1&&(o=i.length-1);let u=t;for(;i[o]&&u>=i[o].size;)u-=i[o].size,o++;const _=i[o];if(_){const f=_.size;if(u+e<=f)a=await Y(_,u,e);else{const p=f-u;a=new Uint8Array(e);const h=await Y(_,u,p);a.set(h,0);const x=await s.readUint8Array(t+p,e-p,r);a.set(x,p),h.length+x.length<e&&(a=a.subarray(0,h.length+x.length))}}else a=new Uint8Array;return s.lastDiskNumber=Math.max(o,s.lastDiskNumber),a}}class $e extends Qe{constructor(t,e=4294967295){super();const r=this;Object.assign(r,{diskNumber:0,diskOffset:0,size:0,maxSize:e,availableSize:e});let s,i,a;const o=new WritableStream({async write(f){const{availableSize:p}=r;if(a)f.length>=p?(await u(f.subarray(0,p)),await _(),r.diskOffset+=s.size,r.diskNumber++,a=null,await this.write(f.subarray(p))):await u(f);else{const{value:h,done:x}=await t.next();if(x&&!h)throw new Error(gr);s=h,s.size=0,s.maxSize&&(r.maxSize=s.maxSize),r.availableSize=r.maxSize,await ke(s),i=h.writable,a=i.getWriter(),await this.write(f)}},async close(){await a.ready,await _()}});Object.defineProperty(r,Dt,{get(){return o}});async function u(f){const p=f.length;p&&(await a.ready,await a.write(f),s.size+=p,r.size+=p,r.availableSize-=p)}async function _(){await a.close()}}}class Ir{constructor(t){return Array.isArray(t)&&(t=new Lt(t)),t instanceof ReadableStream&&(t={readable:t}),t}}class Cr{constructor(t){return t.writable===G&&typeof t.next==ve&&(t=new $e(t)),t instanceof WritableStream&&(t={writable:t}),t.size===G&&(t.size=0),t instanceof $e||Object.assign(t,{diskNumber:0,diskOffset:0,availableSize:1/0,maxSize:1/0}),t}}function xa(n){const{baseURL:t}=$n(),{protocol:e}=new URL(n,t);return e=="http:"||e=="https:"}async function ke(n,t){if(n.init&&!n.initialized)await n.init(t);else return Promise.resolve()}function Y(n,t,e,r){return n.readUint8Array(t,e,r)}const Ta=Lt,Sa=$e,Pr="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split(""),Ra=Pr.length==256;function Aa(n){if(Ra){let t="";for(let e=0;e<n.length;e++)t+=Pr[n[e]];return t}else return new TextDecoder().decode(n)}function qe(n,t){return t&&t.trim().toLowerCase()=="cp437"?Aa(n):new TextDecoder(t).decode(n)}const Dr="filename",Nr="rawFilename",kr="comment",vr="rawComment",Lr="uncompressedSize",Ur="compressedSize",Fr="offset",gt="diskNumberStart",bt="lastModDate",yt="rawLastModDate",Mr="lastAccessDate",Oa="rawLastAccessDate",Hr="creationDate",Ia="rawCreationDate",Ca="internalFileAttribute",Pa="internalFileAttributes",Da="externalFileAttribute",Na="externalFileAttributes",ka="msDosCompatible",va="zip64",La="encrypted",Ua="version",Fa="versionMadeBy",Ma="zipCrypto",Ha="directory",Wa="executable",Ba="compressionMethod",ja="signature",Ga="extraField",Ya=[Dr,Nr,Ur,Lr,bt,yt,kr,vr,Mr,Hr,Fr,gt,gt,Ca,Pa,Da,Na,ka,va,La,Ua,Fa,Ma,Ha,Wa,Ba,ja,Ga,"bitFlag","filenameUTF8","commentUTF8","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp"];class Ln{constructor(t){Ya.forEach(e=>this[e]=t[e])}}const Va="filenameEncoding",qa="commentEncoding",Za="decodeText",Ka="extractPrependedData",Xa="extractAppendedData",$a="password",Ja="rawPassword",Qa="passThrough",za="signal",eo="checkPasswordOnly",to="checkOverlappingEntryOnly",no="checkOverlappingEntry",ro="checkSignature",so="useWebWorkers",io="useCompressionStream",ao="transferStreams",oo="preventClose",Ze="File format is not recognized",Wr="End of central directory not found",Br="End of Zip64 central directory locator not found",jr="Central directory header not found",Gr="Local file header not found",Yr="Zip64 extra field not found",Vr="File contains encrypted entry",qr="Encryption method not supported",Et="Compression method not supported",xt="Split zip file",Zr="Overlapping entry found",Un="utf-8",Fn="cp437",co=[[Lr,ge],[Ur,ge],[Fr,ge],[gt,ue]],lo={[ue]:{getValue:W,bytes:4},[ge]:{getValue:Te,bytes:8}};class Kr{constructor(t,e={}){Object.assign(this,{reader:new Ir(t),options:e,config:$n(),readRanges:[]})}async*getEntriesGenerator(t={}){const e=this;let{reader:r}=e;const{config:s}=e;if(await ke(r),(r.size===G||!r.readUint8Array)&&(r=new kt(await new Response(r.readable).blob()),await ke(r)),r.size<ne)throw new Error(Ze);r.chunkSize=wi(s);const i=await go(r,$s,r.size,ne,ue*16);if(!i){const T=await Y(r,0,4),w=j(T);throw W(w)==Kn?new Error(xt):new Error(Wr)}const a=j(i);let o=W(a,12),u=W(a,16);const _=i.offset,f=V(a,20),p=_+ne+f;let h=V(a,4);const x=r.lastDiskNumber||0;let S=V(a,6),l=V(a,8),c=0,d=0;if(u==ge||o==ge||l==ue||S==ue){const T=await Y(r,i.offset-st,st),w=j(T);if(W(w,0)==Js){u=Te(w,8);let C=await Y(r,u,it,-1),I=j(C);const k=i.offset-st-it;if(W(I,0)!=_n&&u!=k){const P=u;u=k,u>P&&(c=u-P),C=await Y(r,u,it,-1),I=j(C)}if(W(I,0)!=_n)throw new Error(Br);h==ue&&(h=W(I,16)),S==ue&&(S=W(I,20)),l==ue&&(l=Te(I,32)),o==ge&&(o=Te(I,40)),u-=o}}if(u>=r.size&&(c=r.size-u-o-ne,u=r.size-o-ne),x!=h)throw new Error(xt);if(u<0)throw new Error(Ze);let y=0,b=await Y(r,u,o,S),g=j(b);if(o){const T=i.offset-o;if(W(g,y)!=dn&&u!=T){const w=u;u=T,u>w&&(c+=u-w),b=await Y(r,u,o,S),g=j(b)}}const A=i.offset-u-(r.lastDiskOffset||0);if(o!=A&&A>=0&&(o=A,b=await Y(r,u,o,S),g=j(b)),u<0||u>=r.size)throw new Error(Ze);const m=q(e,t,Va),R=q(e,t,qa);for(let T=0;T<l;T++){const w=new uo(r,s,e.options);if(W(g,y)!=dn)throw new Error(jr);Xr(w,g,y+6);const C=!!w.bitFlag.languageEncodingFlag,I=y+46,k=I+w.filenameLength,P=k+w.extraFieldLength,N=V(g,y+4),M=N>>8==0,v=N>>8==3,Z=b.subarray(I,k),D=V(g,y+32),Q=P+D,F=b.subarray(P,Q),H=C,Fe=C,Se=W(g,y+38),te=M&&(xe(g,y+38)&gn)==gn||v&&(Se>>16&li)==fi||Z.length&&Z.at(-1)==bn.charCodeAt(0),z=v&&(Se>>16&ui)!=0,Ut=W(g,y+42)+c;Object.assign(w,{versionMadeBy:N,msDosCompatible:M,compressedSize:0,uncompressedSize:0,commentLength:D,directory:te,offset:Ut,diskNumberStart:V(g,y+34),internalFileAttributes:V(g,y+36),externalFileAttributes:Se,rawFilename:Z,filenameUTF8:H,commentUTF8:Fe,rawExtraField:b.subarray(k,P),executable:z}),w.internalFileAttribute=w.internalFileAttributes,w.externalFileAttribute=w.externalFileAttributes;const Ft=q(e,t,Za)||qe,Mt=H?Un:m||Fn,Ht=Fe?Un:R||Fn;let Me=Ft(Z,Mt);Me===G&&(Me=qe(Z,Mt));let ze=Ft(F,Ht);ze===G&&(ze=qe(F,Ht)),Object.assign(w,{rawComment:F,filename:Me,comment:ze,directory:te||Me.endsWith(bn)}),d=Math.max(Ut,d),$r(w,w,g,y+6),w.zipCrypto=w.encrypted&&!w.extraFieldAES;const Re=new Ln(w);Re.getData=(He,We)=>w.getData(He,Re,e.readRanges,We),Re.arrayBuffer=async He=>{const We=new TransformStream,[zr]=await Promise.all([new Response(We.readable).arrayBuffer(),w.getData(We,Re,e.readRanges,He)]);return zr},y=Q;const{onprogress:Wt}=t;if(Wt)try{await Wt(T+1,l,new Ln(w))}catch{}yield Re}const E=q(e,t,Ka),O=q(e,t,Xa);return E&&(e.prependedData=d>0?await Y(r,0,d):new Uint8Array),e.comment=f?await Y(r,_+ne,f):new Uint8Array,O&&(e.appendedData=p<r.size?await Y(r,p,r.size-p):new Uint8Array),!0}async getEntries(t={}){const e=[];for await(const r of this.getEntriesGenerator(t))e.push(r);return e}async close(){}}class fo{constructor(t={}){const{readable:e,writable:r}=new TransformStream,s=new Kr(e,t).getEntriesGenerator();this.readable=new ReadableStream({async pull(i){const{done:a,value:o}=await s.next();if(a)return i.close();const u={...o,readable:(function(){const{readable:_,writable:f}=new TransformStream;if(o.getData)return o.getData(f),_})()};delete u.getData,i.enqueue(u)}}),this.writable=r}}class uo{constructor(t,e,r){Object.assign(this,{reader:t,config:e,options:r})}async getData(t,e,r,s={}){const i=this,{reader:a,offset:o,diskNumberStart:u,extraFieldAES:_,extraFieldZip64:f,compressionMethod:p,config:h,bitFlag:x,signature:S,rawLastModDate:l,uncompressedSize:c,compressedSize:d}=i,{dataDescriptor:y}=x,b=e.localDirectory={},g=await Y(a,o,at,u),A=j(g);let m=q(i,s,$a),R=q(i,s,Ja);const E=q(i,s,Qa);if(m=m&&m.length&&m,R=R&&R.length&&R,_&&_.originalCompressionMethod!=Zs)throw new Error(Et);if(p!=qs&&p!=Vs&&!E)throw new Error(Et);if(W(A,0)!=Ks)throw new Error(Gr);Xr(b,A,4);const{extraFieldLength:O,filenameLength:T,lastAccessDate:w,creationDate:C}=b;b.rawExtraField=O?await Y(a,o+at+T,O,u):new Uint8Array,$r(i,b,A,4,!0),Object.assign(e,{lastAccessDate:w,creationDate:C});const I=i.encrypted&&b.encrypted&&!E,k=I&&!_;if(E||(e.zipCrypto=k),I){if(!k&&_.strength===G)throw new Error(qr);if(!m&&!R)throw new Error(Vr)}const P=o+at+T+O,N=d,M=a.readable;Object.assign(M,{diskNumberStart:u,offset:P,size:N});const v=q(i,s,za),Z=q(i,s,eo);let D=q(i,s,no);const Q=q(i,s,to);Q&&(D=!0);const{onstart:F,onprogress:H,onend:Fe}=s,Se={options:{codecType:hr,password:m,rawPassword:R,zipCrypto:k,encryptionStrength:_&&_.strength,signed:q(i,s,ro)&&!E,passwordVerification:k&&(y?l>>>8&255:S>>>24&255),outputSize:c,signature:S,compressed:p!=0&&!E,encrypted:i.encrypted&&!E,useWebWorkers:q(i,s,so),useCompressionStream:q(i,s,io),transferStreams:q(i,s,ao),checkPasswordOnly:Z},config:h,streamOptions:{signal:v,size:N,onstart:F,onprogress:H,onend:Fe}};D&&await wo({reader:a,fileEntry:e,offset:o,diskNumberStart:u,signature:S,compressedSize:d,uncompressedSize:c,dataOffset:P,dataDescriptor:y||b.bitFlag.dataDescriptor,extraFieldZip64:f||b.extraFieldZip64,readRanges:r});let te;try{if(!Q){Z&&(t=new WritableStream),t=new Cr(t),await ke(t,E?d:c),{writable:te}=t;const{outputSize:z}=await na({readable:M,writable:te},Se);if(t.size+=z,z!=(E?d:c))throw new Error(Ct)}}catch(z){if(z.outputSize!==G&&(t.size+=z.outputSize),!Z||z.message!=At)throw z}finally{!q(i,s,oo)&&te&&!te.locked&&await te.getWriter().close()}return Z||Q?G:t.getData?t.getData():te}}function Xr(n,t,e){const r=n.rawBitFlag=V(t,e+2),s=(r&pn)==pn,i=W(t,e+6);Object.assign(n,{encrypted:s,version:V(t,e),bitFlag:{level:(r&ci)>>1,dataDescriptor:(r&mn)==mn,languageEncodingFlag:(r&wn)==wn},rawLastModDate:i,lastModDate:bo(i),filenameLength:V(t,e+22),extraFieldLength:V(t,e+24)})}function $r(n,t,e,r,s){const{rawExtraField:i}=t,a=t.extraField=new Map,o=j(new Uint8Array(i));let u=0;try{for(;u<i.length;){const d=V(o,u),y=V(o,u+2);a.set(d,{type:d,data:i.slice(u+4,u+4+y)}),u+=4+y}}catch{}const _=V(e,r+4);Object.assign(t,{signature:W(e,r+di),compressedSize:W(e,r+_i),uncompressedSize:W(e,r+hi)});const f=a.get(ei);f&&(_o(f,t),t.extraFieldZip64=f);const p=a.get(ii);p&&(Mn(p,Dr,Nr,t,n),t.extraFieldUnicodePath=p);const h=a.get(ai);h&&(Mn(h,kr,vr,t,n),t.extraFieldUnicodeComment=h);const x=a.get(ti);x?(ho(x,t,_),t.extraFieldAES=x):t.compressionMethod=_;const S=a.get(ni);S&&(po(S,t),t.extraFieldNTFS=S);const l=a.get(si);l&&(mo(l,t,s),t.extraFieldExtendedTimestamp=l);const c=a.get(oi);c&&(t.extraFieldUSDZ=c)}function _o(n,t){t.zip64=!0;const e=j(n.data),r=co.filter(([s,i])=>t[s]==i);for(let s=0,i=0;s<r.length;s++){const[a,o]=r[s];if(t[a]==o){const u=lo[o];t[a]=n[a]=u.getValue(e,i),i+=u.bytes}else if(n[a])throw new Error(Yr)}}function Mn(n,t,e,r,s){const i=j(n.data),a=new Ke;a.append(s[e]);const o=j(new Uint8Array(4));o.setUint32(0,a.get(),!0);const u=W(i,1);Object.assign(n,{version:xe(i,0),[t]:qe(n.data.subarray(5)),valid:!s.bitFlag.languageEncodingFlag&&u==W(o,0)}),n.valid&&(r[t]=n[t],r[t+"UTF8"]=!0)}function ho(n,t,e){const r=j(n.data),s=xe(r,4);Object.assign(n,{vendorVersion:xe(r,0),vendorId:xe(r,2),strength:s,originalCompressionMethod:e,compressionMethod:V(r,5)}),t.compressionMethod=n.compressionMethod}function po(n,t){const e=j(n.data);let r=4,s;try{for(;r<n.data.length&&!s;){const i=V(e,r),a=V(e,r+2);i==ri&&(s=n.data.slice(r+4,r+4+a)),r+=4+a}}catch{}try{if(s&&s.length==24){const i=j(s),a=i.getBigUint64(0,!0),o=i.getBigUint64(8,!0),u=i.getBigUint64(16,!0);Object.assign(n,{rawLastModDate:a,rawLastAccessDate:o,rawCreationDate:u});const _=ft(a),f=ft(o),p=ft(u),h={lastModDate:_,lastAccessDate:f,creationDate:p};Object.assign(n,h),Object.assign(t,h)}}catch{}}function mo(n,t,e){const r=j(n.data),s=xe(r,0),i=[],a=[];e?((s&1)==1&&(i.push(bt),a.push(yt)),(s&2)==2&&(i.push(Mr),a.push(Oa)),(s&4)==4&&(i.push(Hr),a.push(Ia))):n.data.length>=5&&(i.push(bt),a.push(yt));let o=1;i.forEach((u,_)=>{if(n.data.length>=o+4){const f=W(r,o);t[u]=n[u]=new Date(f*1e3);const p=a[_];n[p]=f}o+=4})}async function wo({reader:n,fileEntry:t,offset:e,diskNumberStart:r,signature:s,compressedSize:i,uncompressedSize:a,dataOffset:o,dataDescriptor:u,extraFieldZip64:_,readRanges:f}){let p=0;if(r)for(let S=0;S<r;S++){const l=n.readers[S];p+=l.size}let h=0;if(u&&(_?h=zs:h=Qs),h){const S=await Y(n,o+i,h+hn,r);if(W(j(S),0)==Xs){const c=W(j(S),4);let d,y;_?(d=Te(j(S),8),y=Te(j(S),16)):(d=W(j(S),8),y=W(j(S),12)),(t.encrypted&&!t.zipCrypto||c==s)&&d==i&&y==a&&(h+=hn)}}const x={start:p+e,end:p+o+i+h,fileEntry:t};for(const S of f)if(S.fileEntry!=t&&x.start>=S.start&&x.start<S.end){const l=new Error(Zr);throw l.overlappingEntry=S.fileEntry,l}f.push(x)}async function go(n,t,e,r,s){const i=new Uint8Array(4),a=j(i);yo(a,0,t);const o=r+s;return await u(r)||await u(Math.min(o,e));async function u(_){const f=e-_,p=await Y(n,f,_);for(let h=p.length-r;h>=0;h--)if(p[h]==i[0]&&p[h+1]==i[1]&&p[h+2]==i[2]&&p[h+3]==i[3])return{offset:f+h,buffer:p.slice(h,h+r).buffer}}}function q(n,t,e){return t[e]===G?n.options[e]:t[e]}function bo(n){const t=(n&4294901760)>>16,e=n&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 ft(n){return new Date(Number(n/BigInt(1e4)-BigInt(116444736e5)))}function xe(n,t){return n.getUint8(t)}function V(n,t){return n.getUint16(t,!0)}function W(n,t){return n.getUint32(t,!0)}function Te(n,t){return Number(n.getBigUint64(t,!0))}function yo(n,t,e){n.setUint32(t,e,!0)}function j(n){return new DataView(n.buffer)}Jn({Inflate:Ys});const Eo=Object.freeze(Object.defineProperty({__proto__:null,BlobReader:kt,BlobWriter:Er,Data64URIReader:_a,Data64URIWriter:ha,ERR_BAD_FORMAT:Ze,ERR_CENTRAL_DIRECTORY_NOT_FOUND:jr,ERR_ENCRYPTED:Vr,ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND:Br,ERR_EOCDR_NOT_FOUND:Wr,ERR_EXTRAFIELD_ZIP64_NOT_FOUND:Yr,ERR_HTTP_RANGE:Ue,ERR_INVALID_PASSWORD:St,ERR_INVALID_SIGNATURE:Rt,ERR_INVALID_UNCOMPRESSED_SIZE:Ct,ERR_ITERATOR_COMPLETED_TOO_SOON:gr,ERR_LOCAL_FILE_HEADER_NOT_FOUND:Gr,ERR_OVERLAPPING_ENTRY:Zr,ERR_SPLIT_ZIP_FILE:xt,ERR_UNSUPPORTED_COMPRESSION:Et,ERR_UNSUPPORTED_ENCRYPTION:qr,ERR_WRITER_NOT_INITIALIZED:br,GenericReader:Ir,GenericWriter:Cr,HttpRangeReader:ba,HttpReader:Or,Reader:me,SplitDataReader:Lt,SplitDataWriter:$e,SplitZipReader:Ta,SplitZipWriter:Sa,TextReader:pa,TextWriter:ma,Uint8ArrayReader:ya,Uint8ArrayWriter:Ea,Writer:Nt,ZipReader:Kr,ZipReaderStream:fo,configure:Jn,getMimeType:gi,initStream:ke,readUint8Array:Y,terminateWorkers:sa},Symbol.toStringTag,{value:"Module"})),Ie=Eo;class xo{constructor(t,e,r){L(this,"_zipReader");L(this,"_entriesPromise");L(this,"_traceURL");this._traceURL=t,Ie.configure({baseURL:self.location.href}),this._zipReader=new Ie.ZipReader(new Ie.HttpReader(So(t,e),{mode:"cors",preventHeadRequest:!0}),{useWebWorkers:!1}),this._entriesPromise=this._zipReader.getEntries({onprogress:r}).then(s=>{const i=new Map;for(const a of s)i.set(a.filename,a);return i})}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 r=(await this._entriesPromise).get(t);if(!r)return;const s=new Ie.TextWriter;return await((i=r.getData)==null?void 0:i.call(r,s)),s.getData()}async readBlob(t){const r=(await this._entriesPromise).get(t);if(!r)return;const s=new Ie.BlobWriter;return await r.getData(s),s.getData()}}class To{constructor(t,e){L(this,"_entriesPromise");L(this,"_path");L(this,"_server");this._path=t,this._server=e,this._entriesPromise=e.readFile(t).then(async r=>{if(!r)throw new Error("File not found");const s=await r.json(),i=new Map;for(const a of s.entries)i.set(a.name,a.path);return i})}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 r=(await this._entriesPromise).get(t);if(r)return this._server.readFile(r)}}function So(n,t){let e=n.startsWith("http")||n.startsWith("blob")?n:t.getFileURL(n).toString();return e.startsWith("https://www.dropbox.com/")&&(e="https://dl.dropboxusercontent.com/"+e.substring(24)),e}class Ro{constructor(t){this.baseUrl=t}getFileURL(t){const e=new URL("trace/file",this.baseUrl);return e.searchParams.set("path",t),e}async readFile(t){const e=await fetch(this.getFileURL(t));if(e.status!==404)return e}}self.addEventListener("install",function(n){self.skipWaiting()});self.addEventListener("activate",function(n){n.waitUntil(self.clients.claim())});const Ao=new URL(self.registration.scope).pathname,re=new Map,pe=new Map;function Oo(){re.clear(),pe.clear()}async function Hn(n,t,e,r,s){var _;await Jr();const i=(e==null?void 0:e.id)??"";let a=pe.get(i);if(!a){const f=new URL((e==null?void 0:e.url)??self.registration.scope),p=new URL(f.searchParams.get("server")??"../",f);a={limit:r,traceUrls:new Set,traceViewerServer:new Ro(p)},pe.set(i,a)}a.traceUrls.add(n),await Qr();const o=new Ts;try{const[f,p]=ss(s,[.5,.4,.1]),h=n.endsWith("json")?new To(n,a.traceViewerServer):new xo(n,a.traceViewerServer,f);await o.load(h,p)}catch(f){throw console.error(f),(_=f==null?void 0:f.message)!=null&&_.includes("Cannot find .trace file")&&await o.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."):f instanceof Vn?new Error(`Could not load trace from ${t||n}. ${f.message}`):t?new Error(`Could not load trace from ${t}. Make sure to upload a valid Playwright trace.`):new Error(`Could not load trace from ${n}. Make sure a valid Playwright Trace is accessible over this url.`)}const u=new ws(o.storage(),f=>o.resourceForSha1(f));return re.set(n,{traceModel:o,snapshotServer:u}),o}async function Io(n){var f;if(n.request.url.startsWith("chrome-extension://"))return fetch(n.request);if(n.request.headers.get("x-pw-serviceworker")==="forward"){const p=new Request(n.request);return p.headers.delete("x-pw-serviceworker"),fetch(p)}const t=n.request,e=await self.clients.get(n.clientId),r=t.url.startsWith(self.registration.scope)?new URL(dt(t.url)):void 0,s=r==null?void 0:r.pathname.substring(Ao.length-1);if(s!=="/contexts"&&!pe.has(n.clientId)){const p=await Po(n.clientId);if(p)for(const h of p.traceUrls)await Hn(h,null,e,p.limit,()=>{})}const i=self.registration.scope.startsWith("https://");if(r&&s){if(s==="/ping")return await Jr(),new Response(null,{status:200});if(s==="/restartServiceWorker")return Oo(),new Response(null,{status:200});const p=r.searchParams.get("trace");if(s==="/contexts")try{const h=r.searchParams.has("limit")?+r.searchParams.get("limit"):void 0,x=await Hn(p,r.searchParams.get("traceFileName"),e,h,(S,l)=>{e.postMessage({method:"progress",params:{done:S,total:l}})});return new Response(JSON.stringify(x.contextEntries),{status:200,headers:{"Content-Type":"application/json"}})}catch(h){return new Response(JSON.stringify({error:h==null?void 0:h.message}),{status:500,headers:{"Content-Type":"application/json"}})}if(s.startsWith("/snapshotInfo/")){const{snapshotServer:h}=re.get(p)||{};if(!h)return new Response(null,{status:404});const x=s.substring(14);return h.serveSnapshotInfo(x,r.searchParams)}if(s.startsWith("/snapshot/")){const{snapshotServer:h}=re.get(p)||{};if(!h)return new Response(null,{status:404});const x=s.substring(10),S=h.serveSnapshot(x,r.searchParams,r.href);return i&&S.headers.set("Content-Security-Policy","upgrade-insecure-requests"),S}if(s.startsWith("/closest-screenshot/")){const{snapshotServer:h}=re.get(p)||{};if(!h)return new Response(null,{status:404});const x=s.substring(20);return h.serveClosestScreenshot(x,r.searchParams)}if(s.startsWith("/sha1/")){const h=s.slice(6);for(const x of re.values()){const S=await x.traceModel.resourceForSha1(h);if(S)return new Response(S,{status:200,headers:Co(r.searchParams)})}return new Response(null,{status:404})}if(s.startsWith("/file/")){const h=r.searchParams.get("path"),x=(f=pe.get(n.clientId??""))==null?void 0:f.traceViewerServer;if(!x)throw new Error("client is not initialized");const S=await x.readFile(h);return S||new Response(null,{status:404})}return fetch(n.request)}const a=dt(e.url),o=new URL(a).searchParams.get("trace"),{snapshotServer:u}=re.get(o)||{};if(!u)return new Response(null,{status:404});const _=[t.url];return i&&t.url.startsWith("https://")&&_.push(t.url.replace(/^https/,"http")),u.serveResource(_,t.method,a)}function Co(n){const t=n.get("dn"),e=n.get("dct");if(!t)return;const r=new Headers;return r.set("Content-Disposition",`attachment; filename="attachment"; filename*=UTF-8''${encodeURIComponent(t)}`),e&&r.set("Content-Type",e),r}async function Jr(){const n=await self.clients.matchAll(),t=new Set;for(const[e,r]of pe){if(!n.find(s=>s.id===e)){pe.delete(e);continue}if(r.limit!==void 0){const s=[...r.traceUrls];r.traceUrls=new Set(s.slice(s.length-r.limit))}r.traceUrls.forEach(s=>t.add(s))}for(const e of re.keys())t.has(e)||re.delete(e);await Qr()}async function Qr(){const n={};for(const[r,s]of pe)n[r]={limit:s.limit,traceUrls:[...s.traceUrls]};const t=JSON.stringify(n),e=await Bn("clientIdToTraceUrls");t!==e&&rs("clientIdToTraceUrls",t)}async function Po(n){const t=await Bn("clientIdToTraceUrls");return t?JSON.parse(t)[n]:void 0}self.addEventListener("fetch",function(n){n.respondWith(Io(n))});
|
|
1
|
+
var Kr=Object.defineProperty;var Xr=(n,t,e)=>t in n?Kr(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var v=(n,t,e)=>Xr(n,typeof t!="symbol"?t+"":t,e);function $r(n,t){const e=new Array(t.length).fill(0);return new Array(t.length).fill(0).map((r,s)=>(i,a)=>{e[s]=i/a*t[s]*1e3,n(e.reduce((o,u)=>o+u,0),1e3)})}const Un={"&":"&","<":"<",">":">",'"':""","'":"'"};function Jr(n){return n.replace(/[&<>"']/ug,t=>Un[t])}function Qr(n){return n.replace(/[&<]/ug,t=>Un[t])}function Ht(n,t,e){return n.find((r,s)=>{if(s===n.length-1)return!0;const i=n[s+1];return Math.abs(t(r)-e)<Math.abs(t(i)-e)})}function Mn(n){return Array.isArray(n)&&typeof n[0]=="string"}function zr(n){return Array.isArray(n)&&Array.isArray(n[0])}class es{constructor(t,e,r,s,i){v(this,"_htmlCache");v(this,"_snapshots");v(this,"_index");v(this,"snapshotName");v(this,"_resources");v(this,"_snapshot");v(this,"_callId");v(this,"_screencastFrames");this._htmlCache=t,this._resources=e,this._snapshots=r,this._index=i,this._snapshot=r[i],this._callId=r[i].callId,this._screencastFrames=s,this.snapshotName=r[i].snapshotName}snapshot(){return this._snapshots[this._index]}viewport(){return this._snapshots[this._index].viewport}closestScreenshot(){var s;const{wallTime:t,timestamp:e}=this.snapshot(),r=t&&((s=this._screencastFrames[0])!=null&&s.frameSwapWallTime)?Ht(this._screencastFrames,i=>i.frameSwapWallTime,t):Ht(this._screencastFrames,i=>i.timestamp,e);return r==null?void 0:r.sha1}render(){const t=[],e=(i,a,o,u)=>{if(typeof i=="string"){o==="STYLE"||o==="style"?t.push(cs(is(i))):t.push(Qr(i));return}if(zr(i)){const _=a-i[0][0];if(_>=0&&_<=a){const l=ns(this._snapshots[_]),m=i[0][1];if(m>=0&&m<l.length)return e(l[m],_,o,u)}}else if(Mn(i)){const[_,l,...m]=i,h=_==="NOSCRIPT"?"X-NOSCRIPT":_,x=Object.entries(l||{});t.push("<",h);const S="__playwright_current_src__",f=h==="IFRAME"||h==="FRAME",c=h==="A",d=h==="IMG",y=d&&x.some(g=>g[0]===S),b=h==="SOURCE"&&o==="PICTURE"&&(u==null?void 0:u.some(g=>g[0]===S));for(const[g,A]of x){let p=g;f&&g.toLowerCase()==="src"&&(p="__playwright_src__"),d&&g===S&&(p="src"),["src","srcset"].includes(g.toLowerCase())&&(y||b)&&(p="_"+p);let R=A;c&&g.toLowerCase()==="href"?R="link://"+A:(g.toLowerCase()==="href"||g.toLowerCase()==="src"||g===S)&&(R=ft(A)),t.push(" ",p,'="',Jr(R),'"')}t.push(">");for(const g of m)e(g,a,h,x);ts.has(h)||t.push("</",h,">");return}else return},r=this._snapshot;return{html:this._htmlCache.getOrCompute(this,()=>{e(r.html,this._index,void 0,void 0);const a=(r.doctype?`<!DOCTYPE ${r.doctype}>`:"")+["<style>*,*::before,*::after { visibility: hidden }</style>",`<script>${rs(this.viewport(),this._callId,this.snapshotName)}<\/script>`].join("")+t.join("");return{value:a,size:a.length}}),pageId:r.pageId,frameId:r.frameId,index:this._index}}resourceByUrl(t,e){const r=this._snapshot;let s,i;for(const o of this._resources){if(typeof o._monotonicTime=="number"&&o._monotonicTime>=r.timestamp)break;o.response.status!==304&&o.request.url===t&&o.request.method===e&&(o._frameref===r.frameId?s=o:i=o)}let a=s??i;if(a&&e.toUpperCase()==="GET"){for(const o of r.resourceOverrides)if(t===o.url&&o.sha1){a={...a,response:{...a.response,content:{...a.response.content,_sha1:o.sha1}}};break}}return a}}const ts=new Set(["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","MENUITEM","META","PARAM","SOURCE","TRACK","WBR"]);function ns(n){if(!n._nodes){const t=[],e=r=>{if(typeof r=="string")t.push(r);else if(Mn(r)){const[,,...s]=r;for(const i of s)e(i);t.push(r)}};e(n.html),n._nodes=t}return n._nodes}function rs(n,...t){function e(r,s,...i){const a=new URLSearchParams(location.search),o=a.has("shouldPopulateCanvasFromScreenshot"),u=a.has("isUnderTest"),_={viewport:s,frames:new WeakMap};window.__playwright_frame_bounding_rects__=_;const l="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.",m=[],h=[],x=[],S=[];let f=window;for(;f!==f.parent&&!f.location.pathname.match(/\/page@[a-z0-9]+$/);)f=f.parent;const c=b=>{for(const g of b.querySelectorAll("[__playwright_scroll_top_]"))m.push(g);for(const g of b.querySelectorAll("[__playwright_scroll_left_]"))h.push(g);for(const g of b.querySelectorAll("[__playwright_value_]")){const A=g;A.type!=="file"&&(A.value=A.getAttribute("__playwright_value_")),g.removeAttribute("__playwright_value_")}for(const g of b.querySelectorAll("[__playwright_checked_]"))g.checked=g.getAttribute("__playwright_checked_")==="true",g.removeAttribute("__playwright_checked_");for(const g of b.querySelectorAll("[__playwright_selected_]"))g.selected=g.getAttribute("__playwright_selected_")==="true",g.removeAttribute("__playwright_selected_");for(const g of b.querySelectorAll("[__playwright_popover_open_]")){try{g.showPopover()}catch{}g.removeAttribute("__playwright_popover_open_")}for(const g of b.querySelectorAll("[__playwright_dialog_open_]")){try{g.getAttribute("__playwright_dialog_open_")==="modal"?g.showModal():g.show()}catch{}g.removeAttribute("__playwright_dialog_open_")}for(const g of i)for(const A of b.querySelectorAll(`[__playwright_target__="${g}"]`)){const p=A.style;p.outline="2px solid #006ab1",p.backgroundColor="#6fa8dc7f",x.push(A)}for(const g of b.querySelectorAll("iframe, frame")){const A=g.getAttribute("__playwright_bounding_rect__");g.removeAttribute("__playwright_bounding_rect__");const p=A?JSON.parse(A):void 0;p&&_.frames.set(g,{boundingRect:p,scrollLeft:0,scrollTop:0});const R=g.getAttribute("__playwright_src__");if(!R)g.setAttribute("src",'data:text/html,<body style="background: #ddd"></body>');else{const E=new URL(r(window.location.href)),O=E.pathname.lastIndexOf("/snapshot/");O!==-1&&(E.pathname=E.pathname.substring(0,O+1)),E.pathname+=R.substring(1),g.setAttribute("src",E.toString())}}{const g=b.querySelector("body[__playwright_custom_elements__]");if(g&&window.customElements){const A=(g.getAttribute("__playwright_custom_elements__")||"").split(",");for(const p of A)window.customElements.define(p,class extends HTMLElement{})}}for(const g of b.querySelectorAll("template[__playwright_shadow_root_]")){const A=g,p=A.parentElement.attachShadow({mode:"open"});p.appendChild(A.content),A.remove(),c(p)}if("adoptedStyleSheets"in b){const g=[...b.adoptedStyleSheets];for(const A of b.querySelectorAll("template[__playwright_style_sheet_]")){const p=A,R=new CSSStyleSheet;R.replaceSync(p.getAttribute("__playwright_style_sheet_")),g.push(R)}b.adoptedStyleSheets=g}S.push(...b.querySelectorAll("canvas"))},d=()=>{window.removeEventListener("load",d);for(const A of m)A.scrollTop=+A.getAttribute("__playwright_scroll_top_"),A.removeAttribute("__playwright_scroll_top_"),_.frames.has(A)&&(_.frames.get(A).scrollTop=A.scrollTop);for(const A of h)A.scrollLeft=+A.getAttribute("__playwright_scroll_left_"),A.removeAttribute("__playwright_scroll_left_"),_.frames.has(A)&&(_.frames.get(A).scrollLeft=A.scrollTop);document.styleSheets[0].disabled=!0;const b=new URL(window.location.href).searchParams,g=window===f;if(b.get("pointX")&&b.get("pointY")){const A=+b.get("pointX"),p=+b.get("pointY"),R=b.has("hasInputTarget"),E=x.length>0,O=document.documentElement?[document.documentElement]:[];for(const T of E?x:O){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 C=T.getBoundingClientRect(),I=C.left+C.width/2,k=C.top+C.height/2;if(w.style.left=I+"px",w.style.top=k+"px",g&&(Math.abs(I-A)>=10||Math.abs(k-p)>=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",l)}document.documentElement.appendChild(w)}else g&&!R&&(w.style.left=A+"px",w.style.top=p+"px",document.documentElement.appendChild(w))}}if(S.length>0){let A=function(R,E){function O(){const T=document.createElement("canvas");T.width=T.width/Math.floor(T.width/24),T.height=T.height/Math.floor(T.height/24);const w=T.getContext("2d");return w.fillStyle="lightgray",w.fillRect(0,0,T.width,T.height),w.fillStyle="white",w.fillRect(0,0,T.width/2,T.height/2),w.fillRect(T.width/2,T.height/2,T.width,T.height),w.createPattern(T,"repeat")}R.fillStyle=O(),R.fillRect(0,0,E.width,E.height)};const p=new Image;p.onload=()=>{var R;for(const E of S){const O=E.getContext("2d"),T=E.getAttribute("__playwright_bounding_rect__");if(E.removeAttribute("__playwright_bounding_rect__"),!T)continue;let w;try{w=JSON.parse(T)}catch{continue}let C=window;for(;C!==f;){const M=C.frameElement;C=C.parent;const L=(R=C.__playwright_frame_bounding_rects__)==null?void 0:R.frames.get(M);if(!(L!=null&&L.boundingRect))break;const Z=L.boundingRect.left-L.scrollLeft,N=L.boundingRect.top-L.scrollTop;w.left+=Z,w.top+=N,w.right+=Z,w.bottom+=N}const{width:I,height:k}=f.__playwright_frame_bounding_rects__.viewport;w.left=w.left/I,w.top=w.top/k,w.right=w.right/I,w.bottom=w.bottom/k;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}A(O,E),o?(O.drawImage(p,w.left*p.width,w.top*p.height,(w.right-w.left)*p.width,(w.bottom-w.top)*p.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.",u&&console.log("canvas drawn:",JSON.stringify([w.left,w.top,w.right-w.left,w.bottom-w.top].map(M=>Math.floor(M*100))))}},p.onerror=()=>{for(const R of S){const E=R.getContext("2d");A(E,R),R.title="Playwright couldn't show canvas contents because the screenshot failed to load."}},p.src=location.href.replace("/snapshot","/closest-screenshot")}},y=()=>c(document);window.addEventListener("load",d),window.addEventListener("DOMContentLoaded",y)}return`
|
|
2
|
+
(${e.toString()})(${ut.toString()}, ${JSON.stringify(n)}${t.map(r=>`, "${r}"`).join("")})`}const Hn=["about:","blob:","data:","file:","ftp:","http:","https:","mailto:","sftp:","ws:","wss:"],Wt="http://playwright.bloburl/#";function ft(n){n.startsWith(Wt)&&(n=n.substring(Wt.length));try{const t=new URL(n);if(t.protocol==="javascript:"||t.protocol==="vbscript:")return"javascript:void(0)";const e=t.protocol==="blob:",r=t.protocol==="file:";if(!e&&!r&&Hn.includes(t.protocol))return n;const s="pw-"+t.protocol.slice(0,t.protocol.length-1);return r||(t.protocol="https:"),t.hostname=t.hostname?`${s}--${t.hostname}`:s,r&&(t.protocol="https:"),t.toString()}catch{return n}}const ss=/url\(['"]?([\w-]+:)\/\//ig;function is(n){return n.replace(ss,(t,e)=>!(e==="blob:")&&!(e==="file:")&&Hn.includes(e)?t:t.replace(e+"//",`https://pw-${e.slice(0,-1)}--`))}const as=/url\(\s*'([^']*)'\s*\)/ig,os=/url\(\s*"([^"]*)"\s*\)/ig;function cs(n){const t=(e,r)=>r.includes("</")?e.replace(r,encodeURI(r)):e;return n.replace(as,t).replace(os,t)}function ut(n){const t=new URL(n);return t.pathname.endsWith("/snapshot.html")?t.searchParams.get("r"):n}class ls{constructor(t,e){v(this,"_snapshotStorage");v(this,"_resourceLoader");v(this,"_snapshotIds",new Map);this._snapshotStorage=t,this._resourceLoader=e}serveSnapshot(t,e,r){const s=this._snapshot(t,e);if(!s)return new Response(null,{status:404});const i=s.render();return this._snapshotIds.set(r,s),new Response(i.html,{status:200,headers:{"Content-Type":"text/html; charset=utf-8"}})}async serveClosestScreenshot(t,e){const r=this._snapshot(t,e),s=r==null?void 0:r.closestScreenshot();return s?new Response(await this._resourceLoader(s)):new Response(null,{status:404})}serveSnapshotInfo(t,e){const r=this._snapshot(t,e);return this._respondWithJson(r?{viewport:r.viewport(),url:r.snapshot().frameUrl,timestamp:r.snapshot().timestamp,wallTime:r.snapshot().wallTime}:{error:"No snapshot found"})}_snapshot(t,e){const r=e.get("name");return this._snapshotStorage.snapshotByName(t,r)}_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,r){let s;const i=this._snapshotIds.get(r);for(const x of t)if(s=i==null?void 0:i.resourceByUrl(fs(x),e),s)break;if(!s)return new Response(null,{status:404});const a=s.response.content._sha1,o=a?await this._resourceLoader(a)||new Blob([]):new Blob([]);let u=s.response.content.mimeType;/^text\/|^application\/(javascript|json)/.test(u)&&!u.includes("charset")&&(u=`${u}; charset=utf-8`);const l=new Headers;u!=="x-unknown"&&l.set("Content-Type",u);for(const{name:x,value:S}of s.response.headers)l.set(x,S);l.delete("Content-Encoding"),l.delete("Access-Control-Allow-Origin"),l.set("Access-Control-Allow-Origin","*"),l.delete("Content-Length"),l.set("Content-Length",String(o.size)),l.set("Cache-Control","public, max-age=31536000");const{status:m}=s.response,h=m===101||m===204||m===205||m===304;return new Response(h?null:o,{headers:l,status:s.response.status,statusText:s.response.statusText})}}function fs(n){try{const t=new URL(n);return t.hash="",t.toString()}catch{return n}}function us(n){const t=new Map,{files:e,stacks:r}=n;for(const s of r){const[i,a]=s;t.set(`call@${i}`,a.map(o=>({file:e[o[0]],line:o[1],column:o[2],function:o[3]})))}return t}class ds{constructor(t){v(this,"_maxSize");v(this,"_map");v(this,"_size");this._maxSize=t,this._map=new Map,this._size=0}getOrCompute(t,e){if(this._map.has(t)){const s=this._map.get(t);return this._map.delete(t),this._map.set(t,s),s.value}const r=e();for(;this._map.size&&this._size+r.size>this._maxSize;){const[s,i]=this._map.entries().next().value;this._size-=i.size,this._map.delete(s)}return this._map.set(t,r),this._size+=r.size,r.value}}class _s{constructor(){v(this,"_frameSnapshots",new Map);v(this,"_cache",new ds(1e8));v(this,"_contextToResources",new Map)}addResource(t,e){e.request.url=ft(e.request.url),this._ensureResourcesForContext(t).push(e)}addFrameSnapshot(t,e,r){for(const o of e.resourceOverrides)o.url=ft(o.url);let s=this._frameSnapshots.get(e.frameId);s||(s={raw:[],renderers:[]},this._frameSnapshots.set(e.frameId,s),e.isMainFrame&&this._frameSnapshots.set(e.pageId,s)),s.raw.push(e);const i=this._ensureResourcesForContext(t),a=new es(this._cache,i,s.raw,r,s.raw.length-1);return s.renderers.push(a),a}snapshotByName(t,e){const r=this._frameSnapshots.get(t);return r==null?void 0:r.renderers.find(s=>s.snapshotName===e)}snapshotsForTest(){return[...this._frameSnapshots.keys()]}finalize(){for(const t of this._contextToResources.values())t.sort((e,r)=>(e._monotonicTime||0)-(r._monotonicTime||0))}_ensureResourcesForContext(t){let e=this._contextToResources.get(t);return e||(e=[],this._contextToResources.set(t,e)),e}}class Wn extends Error{constructor(t){super(t),this.name="TraceVersionError"}}const Bt=8;class hs{constructor(t,e){v(this,"_contextEntry");v(this,"_snapshotStorage");v(this,"_actionMap",new Map);v(this,"_version");v(this,"_pageEntries",new Map);v(this,"_jsHandles",new Map);v(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 r of e)this._innerAppendEvent(r)}_innerAppendEvent(t){const e=this._contextEntry;switch(t.type){case"context-options":{if(t.version>Bt)throw new Wn("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.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 r=this._actionMap.get(t.callId);r.inputSnapshot=t.inputSnapshot,r.point=t.point;break}case"log":{const r=this._actionMap.get(t.callId);if(!r)return;r.log.push({time:t.time,message:t.message});break}case"after":{const r=this._actionMap.get(t.callId);r.afterSnapshot=t.afterSnapshot,r.endTime=t.endTime,r.result=t.result,r.error=t.error,r.attachments=t.attachments,r.annotations=t.annotations,t.point&&(r.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,r=[t];for(;e<Bt;++e)r=this[`_modernize_${e}_to_${e+1}`].call(this,r);return r}_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 r of t)r.type!=="frame-snapshot"||!r.snapshot.isMainFrame||(r.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 r=e.snapshot;e.snapshot={_frameref:r.frameId,request:{url:r.url,method:r.method,headers:r.requestHeaders,postData:r.requestSha1?{_sha1:r.requestSha1}:void 0},response:{status:r.status,headers:r.responseHeaders,content:{mimeType:r.contentType,_sha1:r.responseSha1}},_monotonicTime:r.timestamp}}return t}_modernize_3_to_4(t){const e=[];for(const r of t){const s=this._modernize_event_3_to_4(r);s&&e.push(s)}return e}_modernize_event_3_to_4(t){var r,s,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:(r=e.snapshots.find(o=>o.title==="before"))==null?void 0:r.snapshotName,inputSnapshot:(s=e.snapshots.find(o=>o.title==="input"))==null?void 0:s.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 r of t){const s=this._modernize_event_4_to_5(r);s&&e.push(s)}return e}_modernize_event_4_to_5(t){var e,r;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 s=(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:s}),null}if(t.type==="event"&&t.method==="console"){const s=this._consoleObjects.get(((r=t.params.message)==null?void 0:r.guid)||"");return s?{type:"console",time:t.time,pageId:t.pageId,messageType:s.type,text:s.text,args:s.args,location:s.location}:null}return t}_modernize_5_to_6(t){const e=[];for(const r of t)if(e.push(r),!(r.type!=="after"||!r.log.length))for(const s of r.log)e.push({type:"log",callId:r.callId,message:s,time:-1});return e}_modernize_6_to_7(t){const e=[];if(!this._processedContextCreatedEvent()&&t[0].type!=="context-options"){const r={type:"context-options",origin:"testRunner",version:6,browserName:"",options:{},platform:"unknown",wallTime:0,monotonicTime:0,sdkLanguage:"javascript",contextId:""};e.push(r)}for(const r of t){if(r.type==="context-options"){e.push({...r,monotonicTime:0,origin:"library",contextId:""});continue}if(r.type==="before"||r.type==="action"){this._contextEntry.wallTime||(this._contextEntry.wallTime=r.wallTime);const s=r,i=r;i.stepId=`${s.apiName}@${s.wallTime}`,e.push(i)}else e.push(r)}return e}_modernize_7_to_8(t){const e=[];for(const r of t)if(r.type==="before"||r.type==="action"){const s=r,i=r;s.apiName&&(i.title=s.apiName,delete i.apiName),i.stepId=s.stepId??s.callId,e.push(i)}else e.push(r);return e}}class ps{constructor(){v(this,"contextEntries",[]);v(this,"_snapshotStorage");v(this,"_backend");v(this,"_resourceToContentType",new Map)}async load(t,e){var o,u;this._backend=t;const r=[];let s=!1;for(const _ of await this._backend.entryNames()){const l=_.match(/(.+)\.trace$/);l&&r.push(l[1]||""),_.includes("src@")&&(s=!0)}if(!r.length)throw new Error("Cannot find .trace file");this._snapshotStorage=new _s;const i=r.length*3;let a=0;for(const _ of r){const l=ms();l.traceUrl=t.traceURL(),l.hasSource=s;const m=new hs(l,this._snapshotStorage),h=await this._backend.readText(_+".trace")||"";m.appendTrace(h),e(++a,i);const x=await this._backend.readText(_+".network")||"";if(m.appendTrace(x),e(++a,i),l.actions=m.actions().sort((f,c)=>f.startTime-c.startTime),!t.isLive()){for(const f of l.actions.slice().reverse())if(!f.endTime&&!f.error)for(const c of l.actions)c.parentId===f.callId&&f.endTime<c.endTime&&(f.endTime=c.endTime)}const S=await this._backend.readText(_+".stacks");if(S){const f=us(JSON.parse(S));for(const c of l.actions)c.stack=c.stack||f.get(c.callId)}e(++a,i);for(const f of l.resources)(o=f.request.postData)!=null&&o._sha1&&this._resourceToContentType.set(f.request.postData._sha1,jt(f.request.postData.mimeType)),(u=f.response.content)!=null&&u._sha1&&this._resourceToContentType.set(f.response.content._sha1,jt(f.response.content.mimeType));this.contextEntries.push(l)}this._snapshotStorage.finalize()}async hasEntry(t){return this._backend.hasEntry(t)}async resourceForSha1(t){const e=await this._backend.readBlob("resources/"+t),r=this._resourceToContentType.get(t);return!e||r===void 0||r==="x-unknown"?e:new Blob([e],{type:r})}storage(){return this._snapshotStorage}}function jt(n){const t=n.match(/^(.*);\s*charset=.*$/);return t?t[1]:n}function ms(){return{origin:"testRunner",traceUrl:"",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 ws=15,F=0,re=1,gs=2,X=-2,B=-3,Gt=-4,se=-5,$=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Bn=1440,bs=0,ys=4,Es=9,xs=5,Ts=[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],Ss=[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],Rs=[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],As=[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],Os=[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],Is=[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 dt(){const n=this;let t,e,r,s,i,a;function o(_,l,m,h,x,S,f,c,d,y,b){let g,A,p,R,E,O,T,w,C,I,k,P,D,M,L;I=0,E=m;do r[_[l+I]]++,I++,E--;while(E!==0);if(r[0]==m)return f[0]=-1,c[0]=0,F;for(w=c[0],O=1;O<=ae&&r[O]===0;O++);for(T=O,w<O&&(w=O),E=ae;E!==0&&r[E]===0;E--);for(p=E,w>E&&(w=E),c[0]=w,M=1<<O;O<E;O++,M<<=1)if((M-=r[O])<0)return B;if((M-=r[E])<0)return B;for(r[E]+=M,a[1]=O=0,I=1,D=2;--E!==0;)a[D]=O+=r[I],D++,I++;E=0,I=0;do(O=_[l+I])!==0&&(b[a[O]++]=E),I++;while(++E<m);for(m=a[p],a[0]=E=0,I=0,R=-1,P=-w,i[0]=0,k=0,L=0;T<=p;T++)for(g=r[T];g--!==0;){for(;T>P+w;){if(R++,P+=w,L=p-P,L=L>w?w:L,(A=1<<(O=T-P))>g+1&&(A-=g+1,D=T,O<L))for(;++O<L&&!((A<<=1)<=r[++D]);)A-=r[D];if(L=1<<O,y[0]+L>Bn)return B;i[R]=k=y[0],y[0]+=L,R!==0?(a[R]=E,s[0]=O,s[1]=w,O=E>>>P-w,s[2]=k-i[R-1]-O,d.set(s,(i[R-1]+O)*3)):f[0]=k}for(s[1]=T-P,I>=m?s[0]=192:b[I]<h?(s[0]=b[I]<256?0:96,s[2]=b[I++]):(s[0]=S[b[I]-h]+16+64,s[2]=x[b[I++]-h]),A=1<<T-P,O=E>>>P;O<L;O+=A)d.set(s,(k+O)*3);for(O=1<<T-1;(E&O)!==0;O>>>=1)E^=O;for(E^=O,C=(1<<P)-1;(E&C)!=a[R];)R--,P-=w,C=(1<<P)-1}return M!==0&&p!=1?se:F}function u(_){let l;for(t||(t=[],e=[],r=new Int32Array(ae+1),s=[],i=new Int32Array(ae),a=new Int32Array(ae+1)),e.length<_&&(e=[]),l=0;l<_;l++)e[l]=0;for(l=0;l<ae+1;l++)r[l]=0;for(l=0;l<3;l++)s[l]=0;i.set(r.subarray(0,ae),0),a.set(r.subarray(0,ae+1),0)}n.inflate_trees_bits=function(_,l,m,h,x){let S;return u(19),t[0]=0,S=o(_,0,19,19,null,null,m,l,h,t,e),S==B?x.msg="oversubscribed dynamic bit lengths tree":(S==se||l[0]===0)&&(x.msg="incomplete dynamic bit lengths tree",S=B),S},n.inflate_trees_dynamic=function(_,l,m,h,x,S,f,c,d){let y;return u(288),t[0]=0,y=o(m,0,_,257,Rs,As,S,h,c,t,e),y!=F||h[0]===0?(y==B?d.msg="oversubscribed literal/length tree":y!=Gt&&(d.msg="incomplete literal/length tree",y=B),y):(u(288),y=o(m,_,l,0,Os,Is,f,x,c,t,e),y!=F||x[0]===0&&_>257?(y==B?d.msg="oversubscribed distance tree":y==se?(d.msg="incomplete distance tree",y=B):y!=Gt&&(d.msg="empty distance tree with lengths",y=B),y):F)}}dt.inflate_trees_fixed=function(n,t,e,r){return n[0]=Es,t[0]=xs,e[0]=Ts,r[0]=Ss,F};const Be=0,Yt=1,qt=2,Vt=3,Zt=4,Kt=5,Xt=6,et=7,$t=8,je=9;function Cs(){const n=this;let t,e=0,r,s=0,i=0,a=0,o=0,u=0,_=0,l=0,m,h=0,x,S=0;function f(c,d,y,b,g,A,p,R){let E,O,T,w,C,I,k,P,D,M,L,Z,N,Q,U,H;k=R.next_in_index,P=R.avail_in,C=p.bitb,I=p.bitk,D=p.write,M=D<p.read?p.read-D-1:p.end-D,L=$[c],Z=$[d];do{for(;I<20;)P--,C|=(R.read_byte(k++)&255)<<I,I+=8;if(E=C&L,O=y,T=b,H=(T+E)*3,(w=O[H])===0){C>>=O[H+1],I-=O[H+1],p.win[D++]=O[H+2],M--;continue}do{if(C>>=O[H+1],I-=O[H+1],(w&16)!==0){for(w&=15,N=O[H+2]+(C&$[w]),C>>=w,I-=w;I<15;)P--,C|=(R.read_byte(k++)&255)<<I,I+=8;E=C&Z,O=g,T=A,H=(T+E)*3,w=O[H];do if(C>>=O[H+1],I-=O[H+1],(w&16)!==0){for(w&=15;I<w;)P--,C|=(R.read_byte(k++)&255)<<I,I+=8;if(Q=O[H+2]+(C&$[w]),C>>=w,I-=w,M-=N,D>=Q)U=D-Q,D-U>0&&2>D-U?(p.win[D++]=p.win[U++],p.win[D++]=p.win[U++],N-=2):(p.win.set(p.win.subarray(U,U+2),D),D+=2,U+=2,N-=2);else{U=D-Q;do U+=p.end;while(U<0);if(w=p.end-U,N>w){if(N-=w,D-U>0&&w>D-U)do p.win[D++]=p.win[U++];while(--w!==0);else p.win.set(p.win.subarray(U,U+w),D),D+=w,U+=w,w=0;U=0}}if(D-U>0&&N>D-U)do p.win[D++]=p.win[U++];while(--N!==0);else p.win.set(p.win.subarray(U,U+N),D),D+=N,U+=N,N=0;break}else if((w&64)===0)E+=O[H+2],E+=C&$[w],H=(T+E)*3,w=O[H];else return R.msg="invalid distance code",N=R.avail_in-P,N=I>>3<N?I>>3:N,P+=N,k-=N,I-=N<<3,p.bitb=C,p.bitk=I,R.avail_in=P,R.total_in+=k-R.next_in_index,R.next_in_index=k,p.write=D,B;while(!0);break}if((w&64)===0){if(E+=O[H+2],E+=C&$[w],H=(T+E)*3,(w=O[H])===0){C>>=O[H+1],I-=O[H+1],p.win[D++]=O[H+2],M--;break}}else return(w&32)!==0?(N=R.avail_in-P,N=I>>3<N?I>>3:N,P+=N,k-=N,I-=N<<3,p.bitb=C,p.bitk=I,R.avail_in=P,R.total_in+=k-R.next_in_index,R.next_in_index=k,p.write=D,re):(R.msg="invalid literal/length code",N=R.avail_in-P,N=I>>3<N?I>>3:N,P+=N,k-=N,I-=N<<3,p.bitb=C,p.bitk=I,R.avail_in=P,R.total_in+=k-R.next_in_index,R.next_in_index=k,p.write=D,B)}while(!0)}while(M>=258&&P>=10);return N=R.avail_in-P,N=I>>3<N?I>>3:N,P+=N,k-=N,I-=N<<3,p.bitb=C,p.bitk=I,R.avail_in=P,R.total_in+=k-R.next_in_index,R.next_in_index=k,p.write=D,F}n.init=function(c,d,y,b,g,A){t=Be,_=c,l=d,m=y,h=b,x=g,S=A,r=null},n.proc=function(c,d,y){let b,g,A,p=0,R=0,E=0,O,T,w,C;for(E=d.next_in_index,O=d.avail_in,p=c.bitb,R=c.bitk,T=c.write,w=T<c.read?c.read-T-1:c.end-T;;)switch(t){case Be:if(w>=258&&O>=10&&(c.bitb=p,c.bitk=R,d.avail_in=O,d.total_in+=E-d.next_in_index,d.next_in_index=E,c.write=T,y=f(_,l,m,h,x,S,c,d),E=d.next_in_index,O=d.avail_in,p=c.bitb,R=c.bitk,T=c.write,w=T<c.read?c.read-T-1:c.end-T,y!=F)){t=y==re?et:je;break}i=_,r=m,s=h,t=Yt;case Yt:for(b=i;R<b;){if(O!==0)y=F;else return c.bitb=p,c.bitk=R,d.avail_in=O,d.total_in+=E-d.next_in_index,d.next_in_index=E,c.write=T,c.inflate_flush(d,y);O--,p|=(d.read_byte(E++)&255)<<R,R+=8}if(g=(s+(p&$[b]))*3,p>>>=r[g+1],R-=r[g+1],A=r[g],A===0){a=r[g+2],t=Xt;break}if((A&16)!==0){o=A&15,e=r[g+2],t=qt;break}if((A&64)===0){i=A,s=g/3+r[g+2];break}if((A&32)!==0){t=et;break}return t=je,d.msg="invalid literal/length code",y=B,c.bitb=p,c.bitk=R,d.avail_in=O,d.total_in+=E-d.next_in_index,d.next_in_index=E,c.write=T,c.inflate_flush(d,y);case qt:for(b=o;R<b;){if(O!==0)y=F;else return c.bitb=p,c.bitk=R,d.avail_in=O,d.total_in+=E-d.next_in_index,d.next_in_index=E,c.write=T,c.inflate_flush(d,y);O--,p|=(d.read_byte(E++)&255)<<R,R+=8}e+=p&$[b],p>>=b,R-=b,i=l,r=x,s=S,t=Vt;case Vt:for(b=i;R<b;){if(O!==0)y=F;else return c.bitb=p,c.bitk=R,d.avail_in=O,d.total_in+=E-d.next_in_index,d.next_in_index=E,c.write=T,c.inflate_flush(d,y);O--,p|=(d.read_byte(E++)&255)<<R,R+=8}if(g=(s+(p&$[b]))*3,p>>=r[g+1],R-=r[g+1],A=r[g],(A&16)!==0){o=A&15,u=r[g+2],t=Zt;break}if((A&64)===0){i=A,s=g/3+r[g+2];break}return t=je,d.msg="invalid distance code",y=B,c.bitb=p,c.bitk=R,d.avail_in=O,d.total_in+=E-d.next_in_index,d.next_in_index=E,c.write=T,c.inflate_flush(d,y);case Zt:for(b=o;R<b;){if(O!==0)y=F;else return c.bitb=p,c.bitk=R,d.avail_in=O,d.total_in+=E-d.next_in_index,d.next_in_index=E,c.write=T,c.inflate_flush(d,y);O--,p|=(d.read_byte(E++)&255)<<R,R+=8}u+=p&$[b],p>>=b,R-=b,t=Kt;case Kt:for(C=T-u;C<0;)C+=c.end;for(;e!==0;){if(w===0&&(T==c.end&&c.read!==0&&(T=0,w=T<c.read?c.read-T-1:c.end-T),w===0&&(c.write=T,y=c.inflate_flush(d,y),T=c.write,w=T<c.read?c.read-T-1:c.end-T,T==c.end&&c.read!==0&&(T=0,w=T<c.read?c.read-T-1:c.end-T),w===0)))return c.bitb=p,c.bitk=R,d.avail_in=O,d.total_in+=E-d.next_in_index,d.next_in_index=E,c.write=T,c.inflate_flush(d,y);c.win[T++]=c.win[C++],w--,C==c.end&&(C=0),e--}t=Be;break;case Xt:if(w===0&&(T==c.end&&c.read!==0&&(T=0,w=T<c.read?c.read-T-1:c.end-T),w===0&&(c.write=T,y=c.inflate_flush(d,y),T=c.write,w=T<c.read?c.read-T-1:c.end-T,T==c.end&&c.read!==0&&(T=0,w=T<c.read?c.read-T-1:c.end-T),w===0)))return c.bitb=p,c.bitk=R,d.avail_in=O,d.total_in+=E-d.next_in_index,d.next_in_index=E,c.write=T,c.inflate_flush(d,y);y=F,c.win[T++]=a,w--,t=Be;break;case et:if(R>7&&(R-=8,O++,E--),c.write=T,y=c.inflate_flush(d,y),T=c.write,w=T<c.read?c.read-T-1:c.end-T,c.read!=c.write)return c.bitb=p,c.bitk=R,d.avail_in=O,d.total_in+=E-d.next_in_index,d.next_in_index=E,c.write=T,c.inflate_flush(d,y);t=$t;case $t:return y=re,c.bitb=p,c.bitk=R,d.avail_in=O,d.total_in+=E-d.next_in_index,d.next_in_index=E,c.write=T,c.inflate_flush(d,y);case je:return y=B,c.bitb=p,c.bitk=R,d.avail_in=O,d.total_in+=E-d.next_in_index,d.next_in_index=E,c.write=T,c.inflate_flush(d,y);default:return y=X,c.bitb=p,c.bitk=R,d.avail_in=O,d.total_in+=E-d.next_in_index,d.next_in_index=E,c.write=T,c.inflate_flush(d,y)}},n.free=function(){}}const Jt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],be=0,tt=1,Qt=2,zt=3,en=4,tn=5,Ge=6,Ye=7,nn=8,me=9;function Ps(n,t){const e=this;let r=be,s=0,i=0,a=0,o;const u=[0],_=[0],l=new Cs;let m=0,h=new Int32Array(Bn*3);const x=0,S=new dt;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]=x),r==Ge&&l.free(f),r=be,e.bitk=0,e.bitb=0,e.read=e.write=0},e.reset(n,null),e.inflate_flush=function(f,c){let d,y,b;return y=f.next_out_index,b=e.read,d=(b<=e.write?e.write:e.end)-b,d>f.avail_out&&(d=f.avail_out),d!==0&&c==se&&(c=F),f.avail_out-=d,f.total_out+=d,f.next_out.set(e.win.subarray(b,b+d),y),y+=d,b+=d,b==e.end&&(b=0,e.write==e.end&&(e.write=0),d=e.write-b,d>f.avail_out&&(d=f.avail_out),d!==0&&c==se&&(c=F),f.avail_out-=d,f.total_out+=d,f.next_out.set(e.win.subarray(b,b+d),y),y+=d,b+=d),f.next_out_index=y,e.read=b,c},e.proc=function(f,c){let d,y,b,g,A,p,R,E;for(g=f.next_in_index,A=f.avail_in,y=e.bitb,b=e.bitk,p=e.write,R=p<e.read?e.read-p-1:e.end-p;;){let O,T,w,C,I,k,P,D;switch(r){case be:for(;b<3;){if(A!==0)c=F;else return e.bitb=y,e.bitk=b,f.avail_in=A,f.total_in+=g-f.next_in_index,f.next_in_index=g,e.write=p,e.inflate_flush(f,c);A--,y|=(f.read_byte(g++)&255)<<b,b+=8}switch(d=y&7,m=d&1,d>>>1){case 0:y>>>=3,b-=3,d=b&7,y>>>=d,b-=d,r=tt;break;case 1:O=[],T=[],w=[[]],C=[[]],dt.inflate_trees_fixed(O,T,w,C),l.init(O[0],T[0],w[0],0,C[0],0),y>>>=3,b-=3,r=Ge;break;case 2:y>>>=3,b-=3,r=zt;break;case 3:return y>>>=3,b-=3,r=me,f.msg="invalid block type",c=B,e.bitb=y,e.bitk=b,f.avail_in=A,f.total_in+=g-f.next_in_index,f.next_in_index=g,e.write=p,e.inflate_flush(f,c)}break;case tt:for(;b<32;){if(A!==0)c=F;else return e.bitb=y,e.bitk=b,f.avail_in=A,f.total_in+=g-f.next_in_index,f.next_in_index=g,e.write=p,e.inflate_flush(f,c);A--,y|=(f.read_byte(g++)&255)<<b,b+=8}if((~y>>>16&65535)!=(y&65535))return r=me,f.msg="invalid stored block lengths",c=B,e.bitb=y,e.bitk=b,f.avail_in=A,f.total_in+=g-f.next_in_index,f.next_in_index=g,e.write=p,e.inflate_flush(f,c);s=y&65535,y=b=0,r=s!==0?Qt:m!==0?Ye:be;break;case Qt:if(A===0||R===0&&(p==e.end&&e.read!==0&&(p=0,R=p<e.read?e.read-p-1:e.end-p),R===0&&(e.write=p,c=e.inflate_flush(f,c),p=e.write,R=p<e.read?e.read-p-1:e.end-p,p==e.end&&e.read!==0&&(p=0,R=p<e.read?e.read-p-1:e.end-p),R===0)))return e.bitb=y,e.bitk=b,f.avail_in=A,f.total_in+=g-f.next_in_index,f.next_in_index=g,e.write=p,e.inflate_flush(f,c);if(c=F,d=s,d>A&&(d=A),d>R&&(d=R),e.win.set(f.read_buf(g,d),p),g+=d,A-=d,p+=d,R-=d,(s-=d)!==0)break;r=m!==0?Ye:be;break;case zt:for(;b<14;){if(A!==0)c=F;else return e.bitb=y,e.bitk=b,f.avail_in=A,f.total_in+=g-f.next_in_index,f.next_in_index=g,e.write=p,e.inflate_flush(f,c);A--,y|=(f.read_byte(g++)&255)<<b,b+=8}if(i=d=y&16383,(d&31)>29||(d>>5&31)>29)return r=me,f.msg="too many length or distance symbols",c=B,e.bitb=y,e.bitk=b,f.avail_in=A,f.total_in+=g-f.next_in_index,f.next_in_index=g,e.write=p,e.inflate_flush(f,c);if(d=258+(d&31)+(d>>5&31),!o||o.length<d)o=[];else for(E=0;E<d;E++)o[E]=0;y>>>=14,b-=14,a=0,r=en;case en:for(;a<4+(i>>>10);){for(;b<3;){if(A!==0)c=F;else return e.bitb=y,e.bitk=b,f.avail_in=A,f.total_in+=g-f.next_in_index,f.next_in_index=g,e.write=p,e.inflate_flush(f,c);A--,y|=(f.read_byte(g++)&255)<<b,b+=8}o[Jt[a++]]=y&7,y>>>=3,b-=3}for(;a<19;)o[Jt[a++]]=0;if(u[0]=7,d=S.inflate_trees_bits(o,u,_,h,f),d!=F)return c=d,c==B&&(o=null,r=me),e.bitb=y,e.bitk=b,f.avail_in=A,f.total_in+=g-f.next_in_index,f.next_in_index=g,e.write=p,e.inflate_flush(f,c);a=0,r=tn;case tn:for(;d=i,!(a>=258+(d&31)+(d>>5&31));){let M,L;for(d=u[0];b<d;){if(A!==0)c=F;else return e.bitb=y,e.bitk=b,f.avail_in=A,f.total_in+=g-f.next_in_index,f.next_in_index=g,e.write=p,e.inflate_flush(f,c);A--,y|=(f.read_byte(g++)&255)<<b,b+=8}if(d=h[(_[0]+(y&$[d]))*3+1],L=h[(_[0]+(y&$[d]))*3+2],L<16)y>>>=d,b-=d,o[a++]=L;else{for(E=L==18?7:L-14,M=L==18?11:3;b<d+E;){if(A!==0)c=F;else return e.bitb=y,e.bitk=b,f.avail_in=A,f.total_in+=g-f.next_in_index,f.next_in_index=g,e.write=p,e.inflate_flush(f,c);A--,y|=(f.read_byte(g++)&255)<<b,b+=8}if(y>>>=d,b-=d,M+=y&$[E],y>>>=E,b-=E,E=a,d=i,E+M>258+(d&31)+(d>>5&31)||L==16&&E<1)return o=null,r=me,f.msg="invalid bit length repeat",c=B,e.bitb=y,e.bitk=b,f.avail_in=A,f.total_in+=g-f.next_in_index,f.next_in_index=g,e.write=p,e.inflate_flush(f,c);L=L==16?o[E-1]:0;do o[E++]=L;while(--M!==0);a=E}}if(_[0]=-1,I=[],k=[],P=[],D=[],I[0]=9,k[0]=6,d=i,d=S.inflate_trees_dynamic(257+(d&31),1+(d>>5&31),o,I,k,P,D,h,f),d!=F)return d==B&&(o=null,r=me),c=d,e.bitb=y,e.bitk=b,f.avail_in=A,f.total_in+=g-f.next_in_index,f.next_in_index=g,e.write=p,e.inflate_flush(f,c);l.init(I[0],k[0],h,P[0],h,D[0]),r=Ge;case Ge:if(e.bitb=y,e.bitk=b,f.avail_in=A,f.total_in+=g-f.next_in_index,f.next_in_index=g,e.write=p,(c=l.proc(e,f,c))!=re)return e.inflate_flush(f,c);if(c=F,l.free(f),g=f.next_in_index,A=f.avail_in,y=e.bitb,b=e.bitk,p=e.write,R=p<e.read?e.read-p-1:e.end-p,m===0){r=be;break}r=Ye;case Ye:if(e.write=p,c=e.inflate_flush(f,c),p=e.write,R=p<e.read?e.read-p-1:e.end-p,e.read!=e.write)return e.bitb=y,e.bitk=b,f.avail_in=A,f.total_in+=g-f.next_in_index,f.next_in_index=g,e.write=p,e.inflate_flush(f,c);r=nn;case nn:return c=re,e.bitb=y,e.bitk=b,f.avail_in=A,f.total_in+=g-f.next_in_index,f.next_in_index=g,e.write=p,e.inflate_flush(f,c);case me:return c=B,e.bitb=y,e.bitk=b,f.avail_in=A,f.total_in+=g-f.next_in_index,f.next_in_index=g,e.write=p,e.inflate_flush(f,c);default:return c=X,e.bitb=y,e.bitk=b,f.avail_in=A,f.total_in+=g-f.next_in_index,f.next_in_index=g,e.write=p,e.inflate_flush(f,c)}}},e.free=function(f){e.reset(f,null),e.win=null,h=null},e.set_dictionary=function(f,c,d){e.win.set(f.subarray(c,c+d),0),e.read=e.write=d},e.sync_point=function(){return r==tt?1:0}}const Ns=32,Ds=8,ks=0,rn=1,sn=2,an=3,on=4,cn=5,nt=6,Re=7,ln=12,oe=13,Ls=[0,0,255,255];function vs(){const n=this;n.mode=0,n.method=0,n.was=[0],n.need=0,n.marker=0,n.wbits=0;function t(e){return!e||!e.istate?X:(e.total_in=e.total_out=0,e.msg=null,e.istate.mode=Re,e.istate.blocks.reset(e,null),F)}n.inflateEnd=function(e){return n.blocks&&n.blocks.free(e),n.blocks=null,F},n.inflateInit=function(e,r){return e.msg=null,n.blocks=null,r<8||r>15?(n.inflateEnd(e),X):(n.wbits=r,e.istate.blocks=new Ps(e,1<<r),t(e),F)},n.inflate=function(e,r){let s,i;if(!e||!e.istate||!e.next_in)return X;const a=e.istate;for(r=r==ys?se:F,s=se;;)switch(a.mode){case ks:if(e.avail_in===0)return s;if(s=r,e.avail_in--,e.total_in++,((a.method=e.read_byte(e.next_in_index++))&15)!=Ds){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=rn;case rn:if(e.avail_in===0)return s;if(s=r,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&Ns)===0){a.mode=Re;break}a.mode=sn;case sn:if(e.avail_in===0)return s;s=r,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 s;s=r,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 s;s=r,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?s:(s=r,e.avail_in--,e.total_in++,a.need+=e.read_byte(e.next_in_index++)&255,a.mode=nt,gs);case nt:return a.mode=oe,e.msg="need dictionary",a.marker=0,X;case Re:if(s=a.blocks.proc(e,s),s==B){a.mode=oe,a.marker=0;break}if(s==F&&(s=r),s!=re)return s;s=r,a.blocks.reset(e,a.was),a.mode=ln;case ln:return e.avail_in=0,re;case oe:return B;default:return X}},n.inflateSetDictionary=function(e,r,s){let i=0,a=s;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=s-a),o.blocks.set_dictionary(r,i,a),o.mode=Re,F},n.inflateSync=function(e){let r,s,i,a,o;if(!e||!e.istate)return X;const u=e.istate;if(u.mode!=oe&&(u.mode=oe,u.marker=0),(r=e.avail_in)===0)return se;for(s=e.next_in_index,i=u.marker;r!==0&&i<4;)e.read_byte(s)==Ls[i]?i++:e.read_byte(s)!==0?i=0:i=4-i,s++,r--;return e.total_in+=s-e.next_in_index,e.next_in_index=s,e.avail_in=r,u.marker=i,i!=4?B:(a=e.total_in,o=e.total_out,t(e),e.total_in=a,e.total_out=o,u.mode=Re,F)},n.inflateSyncPoint=function(e){return!e||!e.istate||!e.istate.blocks?X:e.istate.blocks.sync_point()}}function jn(){}jn.prototype={inflateInit(n){const t=this;return t.istate=new vs,n||(n=ws),t.istate.inflateInit(t,n)},inflate(n){const t=this;return t.istate?t.istate.inflate(t,n):X},inflateEnd(){const n=this;if(!n.istate)return X;const t=n.istate.inflateEnd(n);return n.istate=null,t},inflateSync(){const n=this;return n.istate?n.istate.inflateSync(n):X},inflateSetDictionary(n,t){const e=this;return e.istate?e.istate.inflateSetDictionary(e,n,t):X},read_byte(n){return this.next_in[n]},read_buf(n,t){return this.next_in.subarray(n,n+t)}};function Fs(n){const t=this,e=new jn,r=n&&n.chunkSize?Math.floor(n.chunkSize*2):128*1024,s=bs,i=new Uint8Array(r);let a=!1;e.inflateInit(),e.next_out=i,t.append=function(o,u){const _=[];let l,m,h=0,x=0,S=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=r,e.avail_in===0&&!a&&(e.next_in_index=0,a=!0),l=e.inflate(s),a&&l===se){if(e.avail_in!==0)throw new Error("inflating: bad input")}else if(l!==F&&l!==re)throw new Error("inflating: "+e.msg);if((a||l===re)&&e.avail_in===o.length)throw new Error("inflating: bad input");e.next_out_index&&(e.next_out_index===r?_.push(new Uint8Array(i)):_.push(i.subarray(0,e.next_out_index))),S+=e.next_out_index,u&&e.next_in_index>0&&e.next_in_index!=h&&(u(e.next_in_index),h=e.next_in_index)}while(e.avail_in>0||e.avail_out===0);return _.length>1?(m=new Uint8Array(S),_.forEach(function(f){m.set(f,x),x+=f.length})):m=_[0]?new Uint8Array(_[0]):new Uint8Array,m}},t.flush=function(){e.inflateEnd()}}const we=4294967295,fe=65535,Us=8,Ms=0,Hs=99,Ws=67324752,Gn=134695760,Bs=Gn,fn=33639248,js=101010256,un=101075792,Gs=117853008,ne=22,rt=20,st=56,Ys=12,qs=20,dn=4,Vs=1,Zs=39169,Ks=10,Xs=1,$s=21589,Js=28789,Qs=25461,zs=6534,_n=1,ei=6,hn=8,pn=2048,mn=16,ti=61440,ni=16384,ri=73,wn="/",it=30,si=10,ii=14,ai=18,G=void 0,he="undefined",Le="function";class gn{constructor(t){return class extends TransformStream{constructor(e,r){const s=new t(r);super({transform(i,a){a.enqueue(s.append(i))},flush(i){const a=s.flush();a&&i.enqueue(a)}})}}}}const oi=64;let Yn=2;try{typeof navigator!=he&&navigator.hardwareConcurrency&&(Yn=navigator.hardwareConcurrency)}catch{}const ci={chunkSize:512*1024,maxWorkers:Yn,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:G,CompressionStreamNative:typeof CompressionStream!=he&&CompressionStream,DecompressionStreamNative:typeof DecompressionStream!=he&&DecompressionStream},ue=Object.assign({},ci);function qn(){return ue}function li(n){return Math.max(n.chunkSize,oi)}function Vn(n){const{baseURL:t,chunkSize:e,maxWorkers:r,terminateWorkerTimeout:s,useCompressionStream:i,useWebWorkers:a,Deflate:o,Inflate:u,CompressionStream:_,DecompressionStream:l,workerScripts:m}=n;if(ce("baseURL",t),ce("chunkSize",e),ce("maxWorkers",r),ce("terminateWorkerTimeout",s),ce("useCompressionStream",i),ce("useWebWorkers",a),o&&(ue.CompressionStream=new gn(o)),u&&(ue.DecompressionStream=new gn(u)),ce("CompressionStream",_),ce("DecompressionStream",l),m!==G){const{deflate:h,inflate:x}=m;if((h||x)&&(ue.workerScripts||(ue.workerScripts={})),h){if(!Array.isArray(h))throw new Error("workerScripts.deflate must be an array");ue.workerScripts.deflate=h}if(x){if(!Array.isArray(x))throw new Error("workerScripts.inflate must be an array");ue.workerScripts.inflate=x}}}function ce(n,t){t!==G&&(ue[n]=t)}function fi(){return"application/octet-stream"}const Zn=[];for(let n=0;n<256;n++){let t=n;for(let e=0;e<8;e++)t&1?t=t>>>1^3988292384:t=t>>>1;Zn[n]=t}class Ke{constructor(t){this.crc=t||-1}append(t){let e=this.crc|0;for(let r=0,s=t.length|0;r<s;r++)e=e>>>8^Zn[(e^t[r])&255];this.crc=e}get(){return~this.crc}}class Kn extends TransformStream{constructor(){let t;const e=new Ke;super({transform(r,s){e.append(r),s.enqueue(r)},flush(){const r=new Uint8Array(4);new DataView(r.buffer).setUint32(0,e.get()),t.value=r}}),t=this}}function ui(n){if(typeof TextEncoder==he){n=unescape(encodeURIComponent(n));const t=new Uint8Array(n.length);for(let e=0;e<t.length;e++)t[e]=n.charCodeAt(e);return t}else return new TextEncoder().encode(n)}const K={concat(n,t){if(n.length===0||t.length===0)return n.concat(t);const e=n[n.length-1],r=K.getPartial(e);return r===32?n.concat(t):K._shiftRight(t,r,e|0,n.slice(0,n.length-1))},bitLength(n){const t=n.length;if(t===0)return 0;const e=n[t-1];return(t-1)*32+K.getPartial(e)},clamp(n,t){if(n.length*32<t)return n;n=n.slice(0,Math.ceil(t/32));const e=n.length;return t=t&31,e>0&&t&&(n[e-1]=K.partial(t,n[e-1]&2147483648>>t-1,1)),n},partial(n,t,e){return n===32?t:(e?t|0:t<<32-n)+n*1099511627776},getPartial(n){return Math.round(n/1099511627776)||32},_shiftRight(n,t,e,r){for(r===void 0&&(r=[]);t>=32;t-=32)r.push(e),e=0;if(t===0)return r.concat(n);for(let a=0;a<n.length;a++)r.push(e|n[a]>>>t),e=n[a]<<32-t;const s=n.length?n[n.length-1]:0,i=K.getPartial(s);return r.push(K.partial(t+i&31,t+i>32?e:r.pop(),1)),r}},Xe={bytes:{fromBits(n){const e=K.bitLength(n)/8,r=new Uint8Array(e);let s;for(let i=0;i<e;i++)(i&3)===0&&(s=n[i/4]),r[i]=s>>>24,s<<=8;return r},toBits(n){const t=[];let e,r=0;for(e=0;e<n.length;e++)r=r<<8|n[e],(e&3)===3&&(t.push(r),r=0);return e&3&&t.push(K.partial(8*(e&3),r)),t}}},Xn={};Xn.sha1=class{constructor(n){const t=this;t.blockSize=512,t._init=[1732584193,4023233417,2562383102,271733878,3285377520],t._key=[1518500249,1859775393,2400959708,3395469782],n?(t._h=n._h.slice(0),t._buffer=n._buffer.slice(0),t._length=n._length):t.reset()}reset(){const n=this;return n._h=n._init.slice(0),n._buffer=[],n._length=0,n}update(n){const t=this;typeof n=="string"&&(n=Xe.utf8String.toBits(n));const e=t._buffer=K.concat(t._buffer,n),r=t._length,s=t._length=r+K.bitLength(n);if(s>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+r-(t.blockSize+r&t.blockSize-1);o<=s;o+=t.blockSize)t._block(i.subarray(16*a,16*(a+1))),a+=1;return e.splice(0,16*a),t}finalize(){const n=this;let t=n._buffer;const e=n._h;t=K.concat(t,[K.partial(1,1)]);for(let r=t.length+2;r&15;r++)t.push(0);for(t.push(Math.floor(n._length/4294967296)),t.push(n._length|0);t.length;)n._block(t.splice(0,16));return n.reset(),e}_f(n,t,e,r){if(n<=19)return t&e|~t&r;if(n<=39)return t^e^r;if(n<=59)return t&e|t&r|e&r;if(n<=79)return t^e^r}_S(n,t){return t<<n|t>>>32-n}_block(n){const t=this,e=t._h,r=Array(80);for(let _=0;_<16;_++)r[_]=n[_];let s=e[0],i=e[1],a=e[2],o=e[3],u=e[4];for(let _=0;_<=79;_++){_>=16&&(r[_]=t._S(1,r[_-3]^r[_-8]^r[_-14]^r[_-16]));const l=t._S(5,s)+t._f(_,i,a,o)+u+r[_]+t._key[Math.floor(_/20)]|0;u=o,o=a,a=t._S(30,i),i=s,s=l}e[0]=e[0]+s|0,e[1]=e[1]+i|0,e[2]=e[2]+a|0,e[3]=e[3]+o|0,e[4]=e[4]+u|0}};const $n={};$n.aes=class{constructor(n){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const e=t._tables[0][4],r=t._tables[1],s=n.length;let i,a,o,u=1;if(s!==4&&s!==6&&s!==8)throw new Error("invalid aes key size");for(t._key=[a=n.slice(0),o=[]],i=s;i<4*s+28;i++){let _=a[i-1];(i%s===0||s===8&&i%s===4)&&(_=e[_>>>24]<<24^e[_>>16&255]<<16^e[_>>8&255]<<8^e[_&255],i%s===0&&(_=_<<8^_>>>24^u<<24,u=u<<1^(u>>7)*283)),a[i]=a[i-s]^_}for(let _=0;i;_++,i--){const l=a[_&3?i:i-4];i<=4||_<4?o[_]=l:o[_]=r[0][e[l>>>24]]^r[1][e[l>>16&255]]^r[2][e[l>>8&255]]^r[3][e[l&255]]}}encrypt(n){return this._crypt(n,0)}decrypt(n){return this._crypt(n,1)}_precompute(){const n=this._tables[0],t=this._tables[1],e=n[4],r=t[4],s=[],i=[];let a,o,u,_;for(let l=0;l<256;l++)i[(s[l]=l<<1^(l>>7)*283)^l]=l;for(let l=a=0;!e[l];l^=o||1,a=i[a]||1){let m=a^a<<1^a<<2^a<<3^a<<4;m=m>>8^m&255^99,e[l]=m,r[m]=l,_=s[u=s[o=s[l]]];let h=_*16843009^u*65537^o*257^l*16843008,x=s[m]*257^m*16843008;for(let S=0;S<4;S++)n[S][l]=x=x<<24^x>>>8,t[S][m]=h=h<<24^h>>>8}for(let l=0;l<5;l++)n[l]=n[l].slice(0),t[l]=t[l].slice(0)}_crypt(n,t){if(n.length!==4)throw new Error("invalid aes block size");const e=this._key[t],r=e.length/4-2,s=[0,0,0,0],i=this._tables[t],a=i[0],o=i[1],u=i[2],_=i[3],l=i[4];let m=n[0]^e[0],h=n[t?3:1]^e[1],x=n[2]^e[2],S=n[t?1:3]^e[3],f=4,c,d,y;for(let b=0;b<r;b++)c=a[m>>>24]^o[h>>16&255]^u[x>>8&255]^_[S&255]^e[f],d=a[h>>>24]^o[x>>16&255]^u[S>>8&255]^_[m&255]^e[f+1],y=a[x>>>24]^o[S>>16&255]^u[m>>8&255]^_[h&255]^e[f+2],S=a[S>>>24]^o[m>>16&255]^u[h>>8&255]^_[x&255]^e[f+3],f+=4,m=c,h=d,x=y;for(let b=0;b<4;b++)s[t?3&-b:b]=l[m>>>24]<<24^l[h>>16&255]<<16^l[x>>8&255]<<8^l[S&255]^e[f++],c=m,m=h,h=x,x=S,S=c;return s}};const di={getRandomValues(n){const t=new Uint32Array(n.buffer),e=r=>{let s=987654321;const i=4294967295;return function(){return s=36969*(s&65535)+(s>>16)&i,r=18e3*(r&65535)+(r>>16)&i,(((s<<16)+r&i)/4294967296+.5)*(Math.random()>.5?1:-1)}};for(let r=0,s;r<n.length;r+=4){const i=e((s||Math.random())*4294967296);s=i()*987654071,t[r/4]=i()*4294967296|0}return n}},Jn={};Jn.ctrGladman=class{constructor(n,t){this._prf=n,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(n){return this.calculate(this._prf,n,this._iv)}incWord(n){if((n>>24&255)===255){let t=n>>16&255,e=n>>8&255,r=n&255;t===255?(t=0,e===255?(e=0,r===255?r=0:++r):++e):++t,n=0,n+=t<<16,n+=e<<8,n+=r}else n+=1<<24;return n}incCounter(n){(n[0]=this.incWord(n[0]))===0&&(n[1]=this.incWord(n[1]))}calculate(n,t,e){let r;if(!(r=t.length))return[];const s=K.bitLength(t);for(let i=0;i<r;i+=4){this.incCounter(e);const a=n.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,s)}};const ge={importKey(n){return new ge.hmacSha1(Xe.bytes.toBits(n))},pbkdf2(n,t,e,r){if(e=e||1e4,r<0||e<0)throw new Error("invalid params to pbkdf2");const s=(r>>5)+1<<2;let i,a,o,u,_;const l=new ArrayBuffer(s),m=new DataView(l);let h=0;const x=K;for(t=Xe.bytes.toBits(t),_=1;h<(s||1);_++){for(i=a=n.encrypt(x.concat(t,[_])),o=1;o<e;o++)for(a=n.encrypt(a),u=0;u<a.length;u++)i[u]^=a[u];for(o=0;h<(s||1)&&o<i.length;o++)m.setInt32(h,i[o]),h+=4}return l.slice(0,r/8)}};ge.hmacSha1=class{constructor(n){const t=this,e=t._hash=Xn.sha1,r=[[],[]];t._baseHash=[new e,new e];const s=t._baseHash[0].blockSize/32;n.length>s&&(n=new e().update(n).finalize());for(let i=0;i<s;i++)r[0][i]=n[i]^909522486,r[1][i]=n[i]^1549556828;t._baseHash[0].update(r[0]),t._baseHash[1].update(r[1]),t._resultHash=new e(t._baseHash[0])}reset(){const n=this;n._resultHash=new n._hash(n._baseHash[0]),n._updated=!1}update(n){const t=this;t._updated=!0,t._resultHash.update(n)}digest(){const n=this,t=n._resultHash.finalize(),e=new n._hash(n._baseHash[1]).update(t).finalize();return n.reset(),e}encrypt(n){if(this._updated)throw new Error("encrypt on already updated hmac called!");return this.update(n),this.digest(n)}};const _i=typeof crypto!=he&&typeof crypto.getRandomValues==Le,xt="Invalid password",Tt="Invalid signature",St="zipjs-abort-check-password";function Qn(n){return _i?crypto.getRandomValues(n):di.getRandomValues(n)}const ye=16,hi="raw",zn={name:"PBKDF2"},pi={name:"HMAC"},mi="SHA-1",wi=Object.assign({hash:pi},zn),_t=Object.assign({iterations:1e3,hash:{name:mi}},zn),gi=["deriveBits"],Ce=[8,12,16],Ae=[16,24,32],le=10,bi=[0,0,0,0],Je=typeof crypto!=he,ve=Je&&crypto.subtle,er=Je&&typeof ve!=he,ee=Xe.bytes,yi=$n.aes,Ei=Jn.ctrGladman,xi=ge.hmacSha1;let bn=Je&&er&&typeof ve.importKey==Le,yn=Je&&er&&typeof ve.deriveBits==Le;class Ti extends TransformStream{constructor({password:t,rawPassword:e,signed:r,encryptionStrength:s,checkPasswordOnly:i}){super({start(){Object.assign(this,{ready:new Promise(a=>this.resolveReady=a),password:rr(t,e),signed:r,strength:s-1,pending:new Uint8Array})},async transform(a,o){const u=this,{password:_,strength:l,resolveReady:m,ready:h}=u;_?(await Ri(u,l,_,J(a,0,Ce[l]+2)),a=J(a,Ce[l]+2),i?o.error(new Error(St)):m()):await h;const x=new Uint8Array(a.length-le-(a.length-le)%ye);o.enqueue(tr(u,a,x,0,le,!0))},async flush(a){const{signed:o,ctr:u,hmac:_,pending:l,ready:m}=this;if(_&&u){await m;const h=J(l,0,l.length-le),x=J(l,l.length-le);let S=new Uint8Array;if(h.length){const f=Ne(ee,h);_.update(f);const c=u.update(f);S=Pe(ee,c)}if(o){const f=J(Pe(ee,_.digest()),0,le);for(let c=0;c<le;c++)if(f[c]!=x[c])throw new Error(Tt)}a.enqueue(S)}}})}}class Si extends TransformStream{constructor({password:t,rawPassword:e,encryptionStrength:r}){let s;super({start(){Object.assign(this,{ready:new Promise(i=>this.resolveReady=i),password:rr(t,e),strength:r-1,pending:new Uint8Array})},async transform(i,a){const o=this,{password:u,strength:_,resolveReady:l,ready:m}=o;let h=new Uint8Array;u?(h=await Ai(o,_,u),l()):await m;const x=new Uint8Array(h.length+i.length-i.length%ye);x.set(h,0),a.enqueue(tr(o,i,x,h.length,0))},async flush(i){const{ctr:a,hmac:o,pending:u,ready:_}=this;if(o&&a){await _;let l=new Uint8Array;if(u.length){const m=a.update(Ne(ee,u));o.update(m),l=Pe(ee,m)}s.signature=Pe(ee,o.digest()).slice(0,le),i.enqueue(Rt(l,s.signature))}}}),s=this}}function tr(n,t,e,r,s,i){const{ctr:a,hmac:o,pending:u}=n,_=t.length-s;u.length&&(t=Rt(u,t),e=Ci(e,_-_%ye));let l;for(l=0;l<=_-ye;l+=ye){const m=Ne(ee,J(t,l,l+ye));i&&o.update(m);const h=a.update(m);i||o.update(h),e.set(Pe(ee,h),l+r)}return n.pending=J(t,l),e}async function Ri(n,t,e,r){const s=await nr(n,t,e,J(r,0,Ce[t])),i=J(r,Ce[t]);if(s[0]!=i[0]||s[1]!=i[1])throw new Error(xt)}async function Ai(n,t,e){const r=Qn(new Uint8Array(Ce[t])),s=await nr(n,t,e,r);return Rt(r,s)}async function nr(n,t,e,r){n.password=null;const s=await Oi(hi,e,wi,!1,gi),i=await Ii(Object.assign({salt:r},_t),s,8*(Ae[t]*2+2)),a=new Uint8Array(i),o=Ne(ee,J(a,0,Ae[t])),u=Ne(ee,J(a,Ae[t],Ae[t]*2)),_=J(a,Ae[t]*2);return Object.assign(n,{keys:{key:o,authentication:u,passwordVerification:_},ctr:new Ei(new yi(o),Array.from(bi)),hmac:new xi(u)}),_}async function Oi(n,t,e,r,s){if(bn)try{return await ve.importKey(n,t,e,r,s)}catch{return bn=!1,ge.importKey(t)}else return ge.importKey(t)}async function Ii(n,t,e){if(yn)try{return await ve.deriveBits(n,t,e)}catch{return yn=!1,ge.pbkdf2(t,n.salt,_t.iterations,e)}else return ge.pbkdf2(t,n.salt,_t.iterations,e)}function rr(n,t){return t===G?ui(n):t}function Rt(n,t){let e=n;return n.length+t.length&&(e=new Uint8Array(n.length+t.length),e.set(n,0),e.set(t,n.length)),e}function Ci(n,t){if(t&&t>n.length){const e=n;n=new Uint8Array(t),n.set(e,0)}return n}function J(n,t,e){return n.subarray(t,e)}function Pe(n,t){return n.fromBits(t)}function Ne(n,t){return n.toBits(t)}const Ie=12;class Pi extends TransformStream{constructor({password:t,passwordVerification:e,checkPasswordOnly:r}){super({start(){Object.assign(this,{password:t,passwordVerification:e}),sr(this,t)},transform(s,i){const a=this;if(a.password){const o=En(a,s.subarray(0,Ie));if(a.password=null,o.at(-1)!=a.passwordVerification)throw new Error(xt);s=s.subarray(Ie)}r?i.error(new Error(St)):i.enqueue(En(a,s))}})}}class Ni extends TransformStream{constructor({password:t,passwordVerification:e}){super({start(){Object.assign(this,{password:t,passwordVerification:e}),sr(this,t)},transform(r,s){const i=this;let a,o;if(i.password){i.password=null;const u=Qn(new Uint8Array(Ie));u[Ie-1]=i.passwordVerification,a=new Uint8Array(r.length+u.length),a.set(xn(i,u),0),o=Ie}else a=new Uint8Array(r.length),o=0;a.set(xn(i,r),o),s.enqueue(a)}})}}function En(n,t){const e=new Uint8Array(t.length);for(let r=0;r<t.length;r++)e[r]=ir(n)^t[r],At(n,e[r]);return e}function xn(n,t){const e=new Uint8Array(t.length);for(let r=0;r<t.length;r++)e[r]=ir(n)^t[r],At(n,t[r]);return e}function sr(n,t){const e=[305419896,591751049,878082192];Object.assign(n,{keys:e,crcKey0:new Ke(e[0]),crcKey2:new Ke(e[2])});for(let r=0;r<t.length;r++)At(n,t.charCodeAt(r))}function At(n,t){let[e,r,s]=n.keys;n.crcKey0.append([t]),e=~n.crcKey0.get(),r=Tn(Math.imul(Tn(r+ar(e)),134775813)+1),n.crcKey2.append([r>>>24]),s=~n.crcKey2.get(),n.keys=[e,r,s]}function ir(n){const t=n.keys[2]|2;return ar(Math.imul(t,t^1)>>>8)}function ar(n){return n&255}function Tn(n){return n&4294967295}const Ot="Invalid uncompressed size",Sn="deflate-raw";class Di extends TransformStream{constructor(t,{chunkSize:e,CompressionStream:r,CompressionStreamNative:s}){super({});const{compressed:i,encrypted:a,useCompressionStream:o,zipCrypto:u,signed:_,level:l}=t,m=this;let h,x,S=super.readable;(!a||u)&&_&&(h=new Kn,S=ie(S,h)),i&&(S=cr(S,o,{level:l,chunkSize:e},s,r)),a&&(u?S=ie(S,new Ni(t)):(x=new Si(t),S=ie(S,x))),or(m,S,()=>{let f;a&&!u&&(f=x.signature),(!a||u)&&_&&(f=new DataView(h.value.buffer).getUint32(0)),m.signature=f})}}class ki extends TransformStream{constructor(t,{chunkSize:e,DecompressionStream:r,DecompressionStreamNative:s}){super({});const{zipCrypto:i,encrypted:a,signed:o,signature:u,compressed:_,useCompressionStream:l}=t;let m,h,x=super.readable;a&&(i?x=ie(x,new Pi(t)):(h=new Ti(t),x=ie(x,h))),_&&(x=cr(x,l,{chunkSize:e},s,r)),(!a||i)&&o&&(m=new Kn,x=ie(x,m)),or(this,x,()=>{if((!a||i)&&o){const S=new DataView(m.value.buffer);if(u!=S.getUint32(0,!1))throw new Error(Tt)}})}}function or(n,t,e){t=ie(t,new TransformStream({flush:e})),Object.defineProperty(n,"readable",{get(){return t}})}function cr(n,t,e,r,s){try{const i=t&&r?r:s;n=ie(n,new i(Sn,e))}catch(i){if(t)n=ie(n,new s(Sn,e));else throw i}return n}function ie(n,t){return n.pipeThrough(t)}const Li="message",vi="start",Fi="pull",Rn="data",Ui="ack",An="close",Mi="deflate",lr="inflate";class Hi extends TransformStream{constructor(t,e){super({});const r=this,{codecType:s}=t;let i;s.startsWith(Mi)?i=Di:s.startsWith(lr)&&(i=ki),r.outputSize=0;let a=0;const o=new i(t,e),u=super.readable,_=new TransformStream({transform(m,h){m&&m.length&&(a+=m.length,h.enqueue(m))},flush(){Object.assign(r,{inputSize:a})}}),l=new TransformStream({transform(m,h){if(m&&m.length&&(h.enqueue(m),r.outputSize+=m.length,t.outputSize&&r.outputSize>t.outputSize))throw new Error(Ot)},flush(){const{signature:m}=o;Object.assign(r,{signature:m,inputSize:a})}});Object.defineProperty(r,"readable",{get(){return u.pipeThrough(_).pipeThrough(o).pipeThrough(l)}})}}class Wi extends TransformStream{constructor(t){let e;super({transform:r,flush(s){e&&e.length&&s.enqueue(e)}});function r(s,i){if(e){const a=new Uint8Array(e.length+s.length);a.set(e),a.set(s,e.length),s=a,e=null}s.length>t?(i.enqueue(s.slice(0,t)),r(s.slice(t),i)):e=s}}}let fr=typeof Worker!=he;class at{constructor(t,{readable:e,writable:r},{options:s,config:i,streamOptions:a,useWebWorkers:o,transferStreams:u,scripts:_},l){const{signal:m}=a;return Object.assign(t,{busy:!0,readable:e.pipeThrough(new Wi(i.chunkSize)).pipeThrough(new Bi(a),{signal:m}),writable:r,options:Object.assign({},s),scripts:_,transferStreams:u,terminate(){return new Promise(h=>{const{worker:x,busy:S}=t;x?(S?t.resolveTerminated=h:(x.terminate(),h()),t.interface=null):h()})},onTaskFinished(){const{resolveTerminated:h}=t;h&&(t.resolveTerminated=null,t.terminated=!0,t.worker.terminate(),h()),t.busy=!1,l(t)}}),(o&&fr?ji:ur)(t,i)}}class Bi extends TransformStream{constructor({onstart:t,onprogress:e,size:r,onend:s}){let i=0;super({async start(){t&&await ot(t,r)},async transform(a,o){i+=a.length,e&&await ot(e,i,r),o.enqueue(a)},async flush(){s&&await ot(s,i)}})}}async function ot(n,...t){try{await n(...t)}catch{}}function ur(n,t){return{run:()=>Gi(n,t)}}function ji(n,t){const{baseURL:e,chunkSize:r}=t;if(!n.interface){let s;try{s=Vi(n.scripts[0],e,n)}catch{return fr=!1,ur(n,t)}Object.assign(n,{worker:s,interface:{run:()=>Yi(n,{chunkSize:r})}})}return n.interface}async function Gi({options:n,readable:t,writable:e,onTaskFinished:r},s){let i;try{i=new Hi(n,s),await t.pipeThrough(i).pipeTo(e,{preventClose:!0,preventAbort:!0});const{signature:a,inputSize:o,outputSize:u}=i;return{signature:a,inputSize:o,outputSize:u}}catch(a){throw i&&(a.outputSize=i.outputSize),a}finally{r()}}async function Yi(n,t){let e,r;const s=new Promise((h,x)=>{e=h,r=x});Object.assign(n,{reader:null,writer:null,resolveResult:e,rejectResult:r,result:s});const{readable:i,options:a,scripts:o}=n,{writable:u,closed:_}=qi(n.writable),l=qe({type:vi,scripts:o.slice(1),options:a,config:t,readable:i,writable:u},n);l||Object.assign(n,{reader:i.getReader(),writer:u.getWriter()});const m=await s;return l||await u.getWriter().close(),await _,m}function qi(n){let t;const e=new Promise(s=>t=s);return{writable:new WritableStream({async write(s){const i=n.getWriter();await i.ready,await i.write(s),i.releaseLock()},close(){t()},abort(s){return n.getWriter().abort(s)}}),closed:e}}let On=!0,In=!0;function Vi(n,t,e){const r={type:"module"};let s,i;typeof n==Le&&(n=n());try{s=new URL(n,t)}catch{s=n}if(On)try{i=new Worker(s)}catch{On=!1,i=new Worker(s,r)}else i=new Worker(s,r);return i.addEventListener(Li,a=>Zi(a,e)),i}function qe(n,{worker:t,writer:e,onTaskFinished:r,transferStreams:s}){try{const{value:i,readable:a,writable:o}=n,u=[];if(i&&(i.byteLength<i.buffer.byteLength?n.value=i.buffer.slice(0,i.byteLength):n.value=i.buffer,u.push(n.value)),s&&In?(a&&u.push(a),o&&u.push(o)):n.readable=n.writable=null,u.length)try{return t.postMessage(n,u),!0}catch{In=!1,n.readable=n.writable=null,t.postMessage(n)}else t.postMessage(n)}catch(i){throw e&&e.releaseLock(),r(),i}}async function Zi({data:n},t){const{type:e,value:r,messageId:s,result:i,error:a}=n,{reader:o,writer:u,resolveResult:_,rejectResult:l,onTaskFinished:m}=t;try{if(a){const{message:x,stack:S,code:f,name:c,outputSize:d}=a,y=new Error(x);Object.assign(y,{stack:S,code:f,name:c,outputSize:d}),h(y)}else{if(e==Fi){const{value:x,done:S}=await o.read();qe({type:Rn,value:x,done:S,messageId:s},t)}e==Rn&&(await u.ready,await u.write(new Uint8Array(r)),qe({type:Ui,messageId:s},t)),e==An&&h(null,i)}}catch(x){qe({type:An,messageId:s},t),h(x)}function h(x,S){x?l(x):_(S),u&&u.releaseLock(),m()}}let de=[];const ct=[];let Cn=0;async function Ki(n,t){const{options:e,config:r}=t,{transferStreams:s,useWebWorkers:i,useCompressionStream:a,codecType:o,compressed:u,signed:_,encrypted:l}=e,{workerScripts:m,maxWorkers:h}=r;t.transferStreams=s||s===G;const x=!u&&!_&&!l&&!t.transferStreams;return t.useWebWorkers=!x&&(i||i===G&&r.useWebWorkers),t.scripts=t.useWebWorkers&&m?m[o]:[],e.useCompressionStream=a||a===G&&r.useCompressionStream,(await S()).run();async function S(){const c=de.find(d=>!d.busy);if(c)return ht(c),new at(c,n,t,f);if(de.length<h){const d={indexWorker:Cn};return Cn++,de.push(d),new at(d,n,t,f)}else return new Promise(d=>ct.push({resolve:d,stream:n,workerOptions:t}))}function f(c){if(ct.length){const[{resolve:d,stream:y,workerOptions:b}]=ct.splice(0,1);d(new at(c,y,b,f))}else c.worker?(ht(c),Xi(c,t)):de=de.filter(d=>d!=c)}}function Xi(n,t){const{config:e}=t,{terminateWorkerTimeout:r}=e;Number.isFinite(r)&&r>=0&&(n.terminated?n.terminated=!1:n.terminateTimeout=setTimeout(async()=>{de=de.filter(s=>s!=n);try{await n.terminate()}catch{}},r))}function ht(n){const{terminateTimeout:t}=n;t&&(clearTimeout(t),n.terminateTimeout=null)}async function $i(){await Promise.allSettled(de.map(n=>(ht(n),n.terminate())))}const dr="HTTP error ",Fe="HTTP Range not supported",_r="Writer iterator completed too soon",hr="Writer not initialized",Ji="text/plain",Qi="Content-Length",zi="Content-Range",ea="Accept-Ranges",ta="Range",na="Content-Type",ra="HEAD",It="GET",pr="bytes",sa=64*1024,Ct="writable";class Qe{constructor(){this.size=0}init(){this.initialized=!0}}class pe extends Qe{get readable(){const t=this,{chunkSize:e=sa}=t,r=new ReadableStream({start(){this.chunkOffset=0},async pull(s){const{offset:i=0,size:a,diskNumberStart:o}=r,{chunkOffset:u}=this,_=a===G?e:Math.min(e,a-u),l=await Y(t,i+u,_,o);s.enqueue(l),u+e>a||a===G&&!l.length&&_?s.close():this.chunkOffset+=e}});return r}}class Pt extends Qe{constructor(){super();const t=this,e=new WritableStream({write(r){if(!t.initialized)throw new Error(hr);return t.writeUint8Array(r)}});Object.defineProperty(t,Ct,{get(){return e}})}writeUint8Array(){}}class ia extends pe{constructor(t){super();let e=t.length;for(;t.charAt(e-1)=="=";)e--;const r=t.indexOf(",")+1;Object.assign(this,{dataURI:t,dataStart:r,size:Math.floor((e-r)*.75)})}readUint8Array(t,e){const{dataStart:r,dataURI:s}=this,i=new Uint8Array(e),a=Math.floor(t/3)*4,o=atob(s.substring(a+r,Math.ceil((t+e)/3)*4+r)),u=t-Math.floor(a/4)*3;let _=0;for(let l=u;l<u+e&&l<o.length;l++)i[l-u]=o.charCodeAt(l),_++;return _<i.length?i.subarray(0,_):i}}class aa extends Pt{constructor(t){super(),Object.assign(this,{data:"data:"+(t||"")+";base64,",pending:[]})}writeUint8Array(t){const e=this;let r=0,s=e.pending;const i=e.pending.length;for(e.pending="",r=0;r<Math.floor((i+t.length)/3)*3-i;r++)s+=String.fromCharCode(t[r]);for(;r<t.length;r++)e.pending+=String.fromCharCode(t[r]);s.length&&(s.length>2?e.data+=btoa(s):e.pending+=s)}getData(){return this.data+btoa(this.pending)}}class Nt extends pe{constructor(t){super(),Object.assign(this,{blob:t,size:t.size})}async readUint8Array(t,e){const r=this,s=t+e;let a=await(t||s<r.size?r.blob.slice(t,s):r.blob).arrayBuffer();return a.byteLength>e&&(a=a.slice(t,s)),new Uint8Array(a)}}class mr extends Qe{constructor(t){super();const e=this,r=new TransformStream,s=[];t&&s.push([na,t]),Object.defineProperty(e,Ct,{get(){return r.writable}}),e.blob=new Response(r.readable,{headers:s}).blob()}getData(){return this.blob}}class oa extends Nt{constructor(t){super(new Blob([t],{type:Ji}))}}class ca extends mr{constructor(t){super(t),Object.assign(this,{encoding:t,utf8:!t||t.toLowerCase()=="utf-8"})}async getData(){const{encoding:t,utf8:e}=this,r=await super.getData();if(r.text&&e)return r.text();{const s=new FileReader;return new Promise((i,a)=>{Object.assign(s,{onload:({target:o})=>i(o.result),onerror:()=>a(s.error)}),s.readAsText(r,t)})}}}class la extends pe{constructor(t,e){super(),wr(this,t,e)}async init(){await gr(this,pt,Pn),super.init()}readUint8Array(t,e){return br(this,t,e,pt,Pn)}}class fa extends pe{constructor(t,e){super(),wr(this,t,e)}async init(){await gr(this,mt,Nn),super.init()}readUint8Array(t,e){return br(this,t,e,mt,Nn)}}function wr(n,t,e){const{preventHeadRequest:r,useRangeHeader:s,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(n,{url:t,options:e,preventHeadRequest:r,useRangeHeader:s,forceRangeRequests:i,combineSizeEocd:a})}async function gr(n,t,e){const{url:r,preventHeadRequest:s,useRangeHeader:i,forceRangeRequests:a,combineSizeEocd:o}=n;if(ha(r)&&(i||a)&&(typeof s>"u"||s)){const u=await t(It,n,yr(n,o?-ne:void 0));if(!a&&u.headers.get(ea)!=pr)throw new Error(Fe);{o&&(n.eocdCache=new Uint8Array(await u.arrayBuffer()));let _;const l=u.headers.get(zi);if(l){const m=l.trim().split(/\s*\/\s*/);if(m.length){const h=m[1];h&&h!="*"&&(_=Number(h))}}_===G?await Dn(n,t,e):n.size=_}}else await Dn(n,t,e)}async function br(n,t,e,r,s){const{useRangeHeader:i,forceRangeRequests:a,eocdCache:o,size:u,options:_}=n;if(i||a){if(o&&t==u-ne&&e==ne)return o;if(t>=u)return new Uint8Array;{t+e>u&&(e=u-t);const l=await r(It,n,yr(n,t,e));if(l.status!=206)throw new Error(Fe);return new Uint8Array(await l.arrayBuffer())}}else{const{data:l}=n;return l||await s(n,_),new Uint8Array(n.data.subarray(t,t+e))}}function yr(n,t=0,e=1){return Object.assign({},Dt(n),{[ta]:pr+"="+(t<0?t:t+"-"+(t+e-1))})}function Dt({options:n}){const{headers:t}=n;if(t)return Symbol.iterator in t?Object.fromEntries(t):t}async function Pn(n){await Er(n,pt)}async function Nn(n){await Er(n,mt)}async function Er(n,t){const e=await t(It,n,Dt(n));n.data=new Uint8Array(await e.arrayBuffer()),n.size||(n.size=n.data.length)}async function Dn(n,t,e){if(n.preventHeadRequest)await e(n,n.options);else{const s=(await t(ra,n,Dt(n))).headers.get(Qi);s?n.size=Number(s):await e(n,n.options)}}async function pt(n,{options:t,url:e},r){const s=await fetch(e,Object.assign({},t,{method:n,headers:r}));if(s.status<400)return s;throw s.status==416?new Error(Fe):new Error(dr+(s.statusText||s.status))}function mt(n,{url:t},e){return new Promise((r,s)=>{const i=new XMLHttpRequest;if(i.addEventListener("load",()=>{if(i.status<400){const a=[];i.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach(o=>{const u=o.trim().split(/\s*:\s*/);u[0]=u[0].trim().replace(/^[a-z]|-[a-z]/g,_=>_.toUpperCase()),a.push(u)}),r({status:i.status,arrayBuffer:()=>i.response,headers:new Map(a)})}else s(i.status==416?new Error(Fe):new Error(dr+(i.statusText||i.status)))},!1),i.addEventListener("error",a=>s(a.detail?a.detail.error:new Error("Network error")),!1),i.open(n,t),e)for(const a of Object.entries(e))i.setRequestHeader(a[0],a[1]);i.responseType="arraybuffer",i.send()})}class xr extends pe{constructor(t,e={}){super(),Object.assign(this,{url:t,reader:e.useXHR?new fa(t,e):new la(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 ua extends xr{constructor(t,e={}){e.useRangeHeader=!0,super(t,e)}}class da extends pe{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 _a extends Pt{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 r=e.array;e.array=new Uint8Array(r.length+t.length),e.array.set(r)}e.array.set(t,e.offset),e.offset+=t.length}getData(){return this.array}}class kt extends pe{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(r,s)=>{await r.init(),s!=e.length-1&&(t.lastDiskOffset+=r.size),t.size+=r.size})),super.init()}async readUint8Array(t,e,r=0){const s=this,{readers:i}=this;let a,o=r;o==-1&&(o=i.length-1);let u=t;for(;i[o]&&u>=i[o].size;)u-=i[o].size,o++;const _=i[o];if(_){const l=_.size;if(u+e<=l)a=await Y(_,u,e);else{const m=l-u;a=new Uint8Array(e);const h=await Y(_,u,m);a.set(h,0);const x=await s.readUint8Array(t+m,e-m,r);a.set(x,m),h.length+x.length<e&&(a=a.subarray(0,h.length+x.length))}}else a=new Uint8Array;return s.lastDiskNumber=Math.max(o,s.lastDiskNumber),a}}class $e extends Qe{constructor(t,e=4294967295){super();const r=this;Object.assign(r,{diskNumber:0,diskOffset:0,size:0,maxSize:e,availableSize:e});let s,i,a;const o=new WritableStream({async write(l){const{availableSize:m}=r;if(a)l.length>=m?(await u(l.subarray(0,m)),await _(),r.diskOffset+=s.size,r.diskNumber++,a=null,await this.write(l.subarray(m))):await u(l);else{const{value:h,done:x}=await t.next();if(x&&!h)throw new Error(_r);s=h,s.size=0,s.maxSize&&(r.maxSize=s.maxSize),r.availableSize=r.maxSize,await De(s),i=h.writable,a=i.getWriter(),await this.write(l)}},async close(){await a.ready,await _()}});Object.defineProperty(r,Ct,{get(){return o}});async function u(l){const m=l.length;m&&(await a.ready,await a.write(l),s.size+=m,r.size+=m,r.availableSize-=m)}async function _(){await a.close()}}}class Tr{constructor(t){return Array.isArray(t)&&(t=new kt(t)),t instanceof ReadableStream&&(t={readable:t}),t}}class Sr{constructor(t){return t.writable===G&&typeof t.next==Le&&(t=new $e(t)),t instanceof WritableStream&&(t={writable:t}),t.size===G&&(t.size=0),t instanceof $e||Object.assign(t,{diskNumber:0,diskOffset:0,availableSize:1/0,maxSize:1/0}),t}}function ha(n){const{baseURL:t}=qn(),{protocol:e}=new URL(n,t);return e=="http:"||e=="https:"}async function De(n,t){if(n.init&&!n.initialized)await n.init(t);else return Promise.resolve()}function Y(n,t,e,r){return n.readUint8Array(t,e,r)}const pa=kt,ma=$e,Rr="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split(""),wa=Rr.length==256;function ga(n){if(wa){let t="";for(let e=0;e<n.length;e++)t+=Rr[n[e]];return t}else return new TextDecoder().decode(n)}function Ve(n,t){return t&&t.trim().toLowerCase()=="cp437"?ga(n):new TextDecoder(t).decode(n)}const Ar="filename",Or="rawFilename",Ir="comment",Cr="rawComment",Pr="uncompressedSize",Nr="compressedSize",Dr="offset",wt="diskNumberStart",gt="lastModDate",bt="rawLastModDate",kr="lastAccessDate",ba="rawLastAccessDate",Lr="creationDate",ya="rawCreationDate",Ea="internalFileAttribute",xa="internalFileAttributes",Ta="externalFileAttribute",Sa="externalFileAttributes",Ra="msDosCompatible",Aa="zip64",Oa="encrypted",Ia="version",Ca="versionMadeBy",Pa="zipCrypto",Na="directory",Da="executable",ka="compressionMethod",La="signature",va="extraField",Fa=[Ar,Or,Nr,Pr,gt,bt,Ir,Cr,kr,Lr,Dr,wt,wt,Ea,xa,Ta,Sa,Ra,Aa,Oa,Ia,Ca,Pa,Na,Da,ka,La,va,"bitFlag","filenameUTF8","commentUTF8","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp"];class kn{constructor(t){Fa.forEach(e=>this[e]=t[e])}}const Ua="filenameEncoding",Ma="commentEncoding",Ha="decodeText",Wa="extractPrependedData",Ba="extractAppendedData",ja="password",Ga="rawPassword",Ya="passThrough",qa="signal",Va="checkPasswordOnly",Za="checkOverlappingEntryOnly",Ka="checkOverlappingEntry",Xa="checkSignature",$a="useWebWorkers",Ja="useCompressionStream",Qa="transferStreams",za="preventClose",Ze="File format is not recognized",vr="End of central directory not found",Fr="End of Zip64 central directory locator not found",Ur="Central directory header not found",Mr="Local file header not found",Hr="Zip64 extra field not found",Wr="File contains encrypted entry",Br="Encryption method not supported",yt="Compression method not supported",Et="Split zip file",jr="Overlapping entry found",Ln="utf-8",vn="cp437",eo=[[Pr,we],[Nr,we],[Dr,we],[wt,fe]],to={[fe]:{getValue:W,bytes:4},[we]:{getValue:xe,bytes:8}};class Gr{constructor(t,e={}){Object.assign(this,{reader:new Tr(t),options:e,config:qn(),readRanges:[]})}async*getEntriesGenerator(t={}){const e=this;let{reader:r}=e;const{config:s}=e;if(await De(r),(r.size===G||!r.readUint8Array)&&(r=new Nt(await new Response(r.readable).blob()),await De(r)),r.size<ne)throw new Error(Ze);r.chunkSize=li(s);const i=await lo(r,js,r.size,ne,fe*16);if(!i){const T=await Y(r,0,4),w=j(T);throw W(w)==Gn?new Error(Et):new Error(vr)}const a=j(i);let o=W(a,12),u=W(a,16);const _=i.offset,l=q(a,20),m=_+ne+l;let h=q(a,4);const x=r.lastDiskNumber||0;let S=q(a,6),f=q(a,8),c=0,d=0;if(u==we||o==we||f==fe||S==fe){const T=await Y(r,i.offset-rt,rt),w=j(T);if(W(w,0)==Gs){u=xe(w,8);let C=await Y(r,u,st,-1),I=j(C);const k=i.offset-rt-st;if(W(I,0)!=un&&u!=k){const P=u;u=k,u>P&&(c=u-P),C=await Y(r,u,st,-1),I=j(C)}if(W(I,0)!=un)throw new Error(Fr);h==fe&&(h=W(I,16)),S==fe&&(S=W(I,20)),f==fe&&(f=xe(I,32)),o==we&&(o=xe(I,40)),u-=o}}if(u>=r.size&&(c=r.size-u-o-ne,u=r.size-o-ne),x!=h)throw new Error(Et);if(u<0)throw new Error(Ze);let y=0,b=await Y(r,u,o,S),g=j(b);if(o){const T=i.offset-o;if(W(g,y)!=fn&&u!=T){const w=u;u=T,u>w&&(c+=u-w),b=await Y(r,u,o,S),g=j(b)}}const A=i.offset-u-(r.lastDiskOffset||0);if(o!=A&&A>=0&&(o=A,b=await Y(r,u,o,S),g=j(b)),u<0||u>=r.size)throw new Error(Ze);const p=V(e,t,Ua),R=V(e,t,Ma);for(let T=0;T<f;T++){const w=new ro(r,s,e.options);if(W(g,y)!=fn)throw new Error(Ur);Yr(w,g,y+6);const C=!!w.bitFlag.languageEncodingFlag,I=y+46,k=I+w.filenameLength,P=k+w.extraFieldLength,D=q(g,y+4),M=D>>8==0,L=D>>8==3,Z=b.subarray(I,k),N=q(g,y+32),Q=P+N,U=b.subarray(P,Q),H=C,Ue=C,Te=W(g,y+38),te=M&&(Ee(g,y+38)&mn)==mn||L&&(Te>>16&ti)==ni||Z.length&&Z.at(-1)==wn.charCodeAt(0),z=L&&(Te>>16&ri)!=0,Lt=W(g,y+42)+c;Object.assign(w,{versionMadeBy:D,msDosCompatible:M,compressedSize:0,uncompressedSize:0,commentLength:N,directory:te,offset:Lt,diskNumberStart:q(g,y+34),internalFileAttributes:q(g,y+36),externalFileAttributes:Te,rawFilename:Z,filenameUTF8:H,commentUTF8:Ue,rawExtraField:b.subarray(k,P),executable:z}),w.internalFileAttribute=w.internalFileAttributes,w.externalFileAttribute=w.externalFileAttributes;const vt=V(e,t,Ha)||Ve,Ft=H?Ln:p||vn,Ut=Ue?Ln:R||vn;let Me=vt(Z,Ft);Me===G&&(Me=Ve(Z,Ft));let ze=vt(U,Ut);ze===G&&(ze=Ve(U,Ut)),Object.assign(w,{rawComment:U,filename:Me,comment:ze,directory:te||Me.endsWith(wn)}),d=Math.max(Lt,d),qr(w,w,g,y+6),w.zipCrypto=w.encrypted&&!w.extraFieldAES;const Se=new kn(w);Se.getData=(He,We)=>w.getData(He,Se,e.readRanges,We),Se.arrayBuffer=async He=>{const We=new TransformStream,[Zr]=await Promise.all([new Response(We.readable).arrayBuffer(),w.getData(We,Se,e.readRanges,He)]);return Zr},y=Q;const{onprogress:Mt}=t;if(Mt)try{await Mt(T+1,f,new kn(w))}catch{}yield Se}const E=V(e,t,Wa),O=V(e,t,Ba);return E&&(e.prependedData=d>0?await Y(r,0,d):new Uint8Array),e.comment=l?await Y(r,_+ne,l):new Uint8Array,O&&(e.appendedData=m<r.size?await Y(r,m,r.size-m):new Uint8Array),!0}async getEntries(t={}){const e=[];for await(const r of this.getEntriesGenerator(t))e.push(r);return e}async close(){}}class no{constructor(t={}){const{readable:e,writable:r}=new TransformStream,s=new Gr(e,t).getEntriesGenerator();this.readable=new ReadableStream({async pull(i){const{done:a,value:o}=await s.next();if(a)return i.close();const u={...o,readable:(function(){const{readable:_,writable:l}=new TransformStream;if(o.getData)return o.getData(l),_})()};delete u.getData,i.enqueue(u)}}),this.writable=r}}class ro{constructor(t,e,r){Object.assign(this,{reader:t,config:e,options:r})}async getData(t,e,r,s={}){const i=this,{reader:a,offset:o,diskNumberStart:u,extraFieldAES:_,extraFieldZip64:l,compressionMethod:m,config:h,bitFlag:x,signature:S,rawLastModDate:f,uncompressedSize:c,compressedSize:d}=i,{dataDescriptor:y}=x,b=e.localDirectory={},g=await Y(a,o,it,u),A=j(g);let p=V(i,s,ja),R=V(i,s,Ga);const E=V(i,s,Ya);if(p=p&&p.length&&p,R=R&&R.length&&R,_&&_.originalCompressionMethod!=Hs)throw new Error(yt);if(m!=Ms&&m!=Us&&!E)throw new Error(yt);if(W(A,0)!=Ws)throw new Error(Mr);Yr(b,A,4);const{extraFieldLength:O,filenameLength:T,lastAccessDate:w,creationDate:C}=b;b.rawExtraField=O?await Y(a,o+it+T,O,u):new Uint8Array,qr(i,b,A,4,!0),Object.assign(e,{lastAccessDate:w,creationDate:C});const I=i.encrypted&&b.encrypted&&!E,k=I&&!_;if(E||(e.zipCrypto=k),I){if(!k&&_.strength===G)throw new Error(Br);if(!p&&!R)throw new Error(Wr)}const P=o+it+T+O,D=d,M=a.readable;Object.assign(M,{diskNumberStart:u,offset:P,size:D});const L=V(i,s,qa),Z=V(i,s,Va);let N=V(i,s,Ka);const Q=V(i,s,Za);Q&&(N=!0);const{onstart:U,onprogress:H,onend:Ue}=s,Te={options:{codecType:lr,password:p,rawPassword:R,zipCrypto:k,encryptionStrength:_&&_.strength,signed:V(i,s,Xa)&&!E,passwordVerification:k&&(y?f>>>8&255:S>>>24&255),outputSize:c,signature:S,compressed:m!=0&&!E,encrypted:i.encrypted&&!E,useWebWorkers:V(i,s,$a),useCompressionStream:V(i,s,Ja),transferStreams:V(i,s,Qa),checkPasswordOnly:Z},config:h,streamOptions:{signal:L,size:D,onstart:U,onprogress:H,onend:Ue}};N&&await co({reader:a,fileEntry:e,offset:o,diskNumberStart:u,signature:S,compressedSize:d,uncompressedSize:c,dataOffset:P,dataDescriptor:y||b.bitFlag.dataDescriptor,extraFieldZip64:l||b.extraFieldZip64,readRanges:r});let te;try{if(!Q){Z&&(t=new WritableStream),t=new Sr(t),await De(t,E?d:c),{writable:te}=t;const{outputSize:z}=await Ki({readable:M,writable:te},Te);if(t.size+=z,z!=(E?d:c))throw new Error(Ot)}}catch(z){if(z.outputSize!==G&&(t.size+=z.outputSize),!Z||z.message!=St)throw z}finally{!V(i,s,za)&&te&&!te.locked&&await te.getWriter().close()}return Z||Q?G:t.getData?t.getData():te}}function Yr(n,t,e){const r=n.rawBitFlag=q(t,e+2),s=(r&_n)==_n,i=W(t,e+6);Object.assign(n,{encrypted:s,version:q(t,e),bitFlag:{level:(r&ei)>>1,dataDescriptor:(r&hn)==hn,languageEncodingFlag:(r&pn)==pn},rawLastModDate:i,lastModDate:fo(i),filenameLength:q(t,e+22),extraFieldLength:q(t,e+24)})}function qr(n,t,e,r,s){const{rawExtraField:i}=t,a=t.extraField=new Map,o=j(new Uint8Array(i));let u=0;try{for(;u<i.length;){const d=q(o,u),y=q(o,u+2);a.set(d,{type:d,data:i.slice(u+4,u+4+y)}),u+=4+y}}catch{}const _=q(e,r+4);Object.assign(t,{signature:W(e,r+si),compressedSize:W(e,r+ii),uncompressedSize:W(e,r+ai)});const l=a.get(Vs);l&&(so(l,t),t.extraFieldZip64=l);const m=a.get(Js);m&&(Fn(m,Ar,Or,t,n),t.extraFieldUnicodePath=m);const h=a.get(Qs);h&&(Fn(h,Ir,Cr,t,n),t.extraFieldUnicodeComment=h);const x=a.get(Zs);x?(io(x,t,_),t.extraFieldAES=x):t.compressionMethod=_;const S=a.get(Ks);S&&(ao(S,t),t.extraFieldNTFS=S);const f=a.get($s);f&&(oo(f,t,s),t.extraFieldExtendedTimestamp=f);const c=a.get(zs);c&&(t.extraFieldUSDZ=c)}function so(n,t){t.zip64=!0;const e=j(n.data),r=eo.filter(([s,i])=>t[s]==i);for(let s=0,i=0;s<r.length;s++){const[a,o]=r[s];if(t[a]==o){const u=to[o];t[a]=n[a]=u.getValue(e,i),i+=u.bytes}else if(n[a])throw new Error(Hr)}}function Fn(n,t,e,r,s){const i=j(n.data),a=new Ke;a.append(s[e]);const o=j(new Uint8Array(4));o.setUint32(0,a.get(),!0);const u=W(i,1);Object.assign(n,{version:Ee(i,0),[t]:Ve(n.data.subarray(5)),valid:!s.bitFlag.languageEncodingFlag&&u==W(o,0)}),n.valid&&(r[t]=n[t],r[t+"UTF8"]=!0)}function io(n,t,e){const r=j(n.data),s=Ee(r,4);Object.assign(n,{vendorVersion:Ee(r,0),vendorId:Ee(r,2),strength:s,originalCompressionMethod:e,compressionMethod:q(r,5)}),t.compressionMethod=n.compressionMethod}function ao(n,t){const e=j(n.data);let r=4,s;try{for(;r<n.data.length&&!s;){const i=q(e,r),a=q(e,r+2);i==Xs&&(s=n.data.slice(r+4,r+4+a)),r+=4+a}}catch{}try{if(s&&s.length==24){const i=j(s),a=i.getBigUint64(0,!0),o=i.getBigUint64(8,!0),u=i.getBigUint64(16,!0);Object.assign(n,{rawLastModDate:a,rawLastAccessDate:o,rawCreationDate:u});const _=lt(a),l=lt(o),m=lt(u),h={lastModDate:_,lastAccessDate:l,creationDate:m};Object.assign(n,h),Object.assign(t,h)}}catch{}}function oo(n,t,e){const r=j(n.data),s=Ee(r,0),i=[],a=[];e?((s&1)==1&&(i.push(gt),a.push(bt)),(s&2)==2&&(i.push(kr),a.push(ba)),(s&4)==4&&(i.push(Lr),a.push(ya))):n.data.length>=5&&(i.push(gt),a.push(bt));let o=1;i.forEach((u,_)=>{if(n.data.length>=o+4){const l=W(r,o);t[u]=n[u]=new Date(l*1e3);const m=a[_];n[m]=l}o+=4})}async function co({reader:n,fileEntry:t,offset:e,diskNumberStart:r,signature:s,compressedSize:i,uncompressedSize:a,dataOffset:o,dataDescriptor:u,extraFieldZip64:_,readRanges:l}){let m=0;if(r)for(let S=0;S<r;S++){const f=n.readers[S];m+=f.size}let h=0;if(u&&(_?h=qs:h=Ys),h){const S=await Y(n,o+i,h+dn,r);if(W(j(S),0)==Bs){const c=W(j(S),4);let d,y;_?(d=xe(j(S),8),y=xe(j(S),16)):(d=W(j(S),8),y=W(j(S),12)),(t.encrypted&&!t.zipCrypto||c==s)&&d==i&&y==a&&(h+=dn)}}const x={start:m+e,end:m+o+i+h,fileEntry:t};for(const S of l)if(S.fileEntry!=t&&x.start>=S.start&&x.start<S.end){const f=new Error(jr);throw f.overlappingEntry=S.fileEntry,f}l.push(x)}async function lo(n,t,e,r,s){const i=new Uint8Array(4),a=j(i);uo(a,0,t);const o=r+s;return await u(r)||await u(Math.min(o,e));async function u(_){const l=e-_,m=await Y(n,l,_);for(let h=m.length-r;h>=0;h--)if(m[h]==i[0]&&m[h+1]==i[1]&&m[h+2]==i[2]&&m[h+3]==i[3])return{offset:l+h,buffer:m.slice(h,h+r).buffer}}}function V(n,t,e){return t[e]===G?n.options[e]:t[e]}function fo(n){const t=(n&4294901760)>>16,e=n&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(n){return new Date(Number(n/BigInt(1e4)-BigInt(116444736e5)))}function Ee(n,t){return n.getUint8(t)}function q(n,t){return n.getUint16(t,!0)}function W(n,t){return n.getUint32(t,!0)}function xe(n,t){return Number(n.getBigUint64(t,!0))}function uo(n,t,e){n.setUint32(t,e,!0)}function j(n){return new DataView(n.buffer)}Vn({Inflate:Fs});const _o=Object.freeze(Object.defineProperty({__proto__:null,BlobReader:Nt,BlobWriter:mr,Data64URIReader:ia,Data64URIWriter:aa,ERR_BAD_FORMAT:Ze,ERR_CENTRAL_DIRECTORY_NOT_FOUND:Ur,ERR_ENCRYPTED:Wr,ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND:Fr,ERR_EOCDR_NOT_FOUND:vr,ERR_EXTRAFIELD_ZIP64_NOT_FOUND:Hr,ERR_HTTP_RANGE:Fe,ERR_INVALID_PASSWORD:xt,ERR_INVALID_SIGNATURE:Tt,ERR_INVALID_UNCOMPRESSED_SIZE:Ot,ERR_ITERATOR_COMPLETED_TOO_SOON:_r,ERR_LOCAL_FILE_HEADER_NOT_FOUND:Mr,ERR_OVERLAPPING_ENTRY:jr,ERR_SPLIT_ZIP_FILE:Et,ERR_UNSUPPORTED_COMPRESSION:yt,ERR_UNSUPPORTED_ENCRYPTION:Br,ERR_WRITER_NOT_INITIALIZED:hr,GenericReader:Tr,GenericWriter:Sr,HttpRangeReader:ua,HttpReader:xr,Reader:pe,SplitDataReader:kt,SplitDataWriter:$e,SplitZipReader:pa,SplitZipWriter:ma,TextReader:oa,TextWriter:ca,Uint8ArrayReader:da,Uint8ArrayWriter:_a,Writer:Pt,ZipReader:Gr,ZipReaderStream:no,configure:Vn,getMimeType:fi,initStream:De,readUint8Array:Y,terminateWorkers:$i},Symbol.toStringTag,{value:"Module"})),Oe=_o;class ho{constructor(t,e,r){v(this,"_zipReader");v(this,"_entriesPromise");v(this,"_traceURL");this._traceURL=t,Oe.configure({baseURL:self.location.href}),this._zipReader=new Oe.ZipReader(new Oe.HttpReader(mo(t,e),{mode:"cors",preventHeadRequest:!0}),{useWebWorkers:!1}),this._entriesPromise=this._zipReader.getEntries({onprogress:r}).then(s=>{const i=new Map;for(const a of s)i.set(a.filename,a);return i})}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 r=(await this._entriesPromise).get(t);if(!r)return;const s=new Oe.TextWriter;return await((i=r.getData)==null?void 0:i.call(r,s)),s.getData()}async readBlob(t){const r=(await this._entriesPromise).get(t);if(!r)return;const s=new Oe.BlobWriter;return await r.getData(s),s.getData()}}class po{constructor(t,e){v(this,"_entriesPromise");v(this,"_path");v(this,"_server");this._path=t,this._server=e,this._entriesPromise=e.readFile(t).then(async r=>{if(!r)throw new Error("File not found");const s=await r.json(),i=new Map;for(const a of s.entries)i.set(a.name,a.path);return i})}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 r=(await this._entriesPromise).get(t);if(r)return this._server.readFile(r)}}function mo(n,t){let e=n.startsWith("http")||n.startsWith("blob")?n:t.getFileURL(n).toString();return e.startsWith("https://www.dropbox.com/")&&(e="https://dl.dropboxusercontent.com/"+e.substring(24)),e}class wo{constructor(t){this.baseUrl=t}getFileURL(t){const e=new URL("trace/file",this.baseUrl);return e.searchParams.set("path",t),e}async readFile(t){const e=await fetch(this.getFileURL(t));if(e.status!==404)return e}}self.addEventListener("install",function(n){self.skipWaiting()});self.addEventListener("activate",function(n){n.waitUntil(self.clients.claim())});const go=new URL(self.registration.scope).pathname,_e=new Map,ke=new Map;async function bo(n,t,e,r,s){var _;await Vr();const i=(e==null?void 0:e.id)??"";let a=ke.get(i);if(!a){const l=new URL((e==null?void 0:e.url)??self.registration.scope),m=new URL(l.searchParams.get("server")??"../",l);a={limit:r,traceUrls:new Set,traceViewerServer:new wo(m)},ke.set(i,a)}a.traceUrls.add(n);const o=new ps;try{const[l,m]=$r(s,[.5,.4,.1]),h=n.endsWith("json")?new po(n,a.traceViewerServer):new ho(n,a.traceViewerServer,l);await o.load(h,m)}catch(l){throw console.error(l),(_=l==null?void 0:l.message)!=null&&_.includes("Cannot find .trace file")&&await o.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."):l instanceof Wn?new Error(`Could not load trace from ${t||n}. ${l.message}`):t?new Error(`Could not load trace from ${t}. Make sure to upload a valid Playwright trace.`):new Error(`Could not load trace from ${n}. Make sure a valid Playwright Trace is accessible over this url.`)}const u=new ls(o.storage(),l=>o.resourceForSha1(l));return _e.set(n,{traceModel:o,snapshotServer:u}),o}async function yo(n){var u;if(n.request.url.startsWith("chrome-extension://"))return fetch(n.request);if(n.request.headers.get("x-pw-serviceworker")==="forward"){const _=new Request(n.request);return _.headers.delete("x-pw-serviceworker"),fetch(_)}const t=n.request,e=await self.clients.get(n.clientId),r=self.registration.scope.startsWith("https://");if(t.url.startsWith(self.registration.scope)){const _=new URL(ut(t.url)),l=_.pathname.substring(go.length-1);if(l==="/ping")return await Vr(),new Response(null,{status:200});const m=_.searchParams.get("trace");if(l==="/contexts")try{const h=_.searchParams.has("limit")?+_.searchParams.get("limit"):void 0,x=await bo(m,_.searchParams.get("traceFileName"),e,h,(S,f)=>{e.postMessage({method:"progress",params:{done:S,total:f}})});return new Response(JSON.stringify(x.contextEntries),{status:200,headers:{"Content-Type":"application/json"}})}catch(h){return new Response(JSON.stringify({error:h==null?void 0:h.message}),{status:500,headers:{"Content-Type":"application/json"}})}if(l.startsWith("/snapshotInfo/")){const{snapshotServer:h}=_e.get(m)||{};if(!h)return new Response(null,{status:404});const x=l.substring(14);return h.serveSnapshotInfo(x,_.searchParams)}if(l.startsWith("/snapshot/")){const{snapshotServer:h}=_e.get(m)||{};if(!h)return new Response(null,{status:404});const x=l.substring(10),S=h.serveSnapshot(x,_.searchParams,_.href);return r&&S.headers.set("Content-Security-Policy","upgrade-insecure-requests"),S}if(l.startsWith("/closest-screenshot/")){const{snapshotServer:h}=_e.get(m)||{};if(!h)return new Response(null,{status:404});const x=l.substring(20);return h.serveClosestScreenshot(x,_.searchParams)}if(l.startsWith("/sha1/")){const h=l.slice(6);for(const x of _e.values()){const S=await x.traceModel.resourceForSha1(h);if(S)return new Response(S,{status:200,headers:Eo(_.searchParams)})}return new Response(null,{status:404})}if(l.startsWith("/file/")){const h=_.searchParams.get("path"),x=(u=ke.get(n.clientId??""))==null?void 0:u.traceViewerServer;if(!x)throw new Error("client is not initialized");const S=await x.readFile(h);return S||new Response(null,{status:404})}return fetch(n.request)}const s=ut(e.url),i=new URL(s).searchParams.get("trace"),{snapshotServer:a}=_e.get(i)||{};if(!a)return new Response(null,{status:404});const o=[t.url];return r&&t.url.startsWith("https://")&&o.push(t.url.replace(/^https/,"http")),a.serveResource(o,t.method,s)}function Eo(n){const t=n.get("dn"),e=n.get("dct");if(!t)return;const r=new Headers;return r.set("Content-Disposition",`attachment; filename="attachment"; filename*=UTF-8''${encodeURIComponent(t)}`),e&&r.set("Content-Type",e),r}async function Vr(){const n=await self.clients.matchAll(),t=new Set;for(const[e,r]of ke){if(!n.find(s=>s.id===e)){ke.delete(e);continue}if(r.limit!==void 0){const s=[...r.traceUrls];r.traceUrls=new Set(s.slice(s.length-r.limit))}r.traceUrls.forEach(s=>t.add(s))}for(const e of _e.keys())t.has(e)||_e.delete(e)}self.addEventListener("fetch",function(n){n.respondWith(yo(n))});
|