venetian 0.2.0-aarch64-linux → 0.2.3-aarch64-linux
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.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/exe/aarch64-linux/LICENSE +204 -204
- data/exe/aarch64-linux/node +2 -2
- data/exe/aarch64-linux/package/browsers.json +10 -39
- data/exe/aarch64-linux/package/lib/bootstrap.js +1 -1
- data/exe/aarch64-linux/package/lib/coreBundle.js +14708 -12281
- data/exe/aarch64-linux/package/lib/server/electron/loader.js +5 -4
- data/exe/aarch64-linux/package/lib/serverRegistry.js +1674 -7078
- data/exe/aarch64-linux/package/lib/serverRegistry.js.LICENSE +8 -297
- data/exe/aarch64-linux/package/lib/tools/cli-client/help.json +39 -11
- data/exe/aarch64-linux/package/lib/tools/cli-client/minimist.js +1 -1
- data/exe/aarch64-linux/package/lib/tools/cli-client/output.js +9 -1
- data/exe/aarch64-linux/package/lib/tools/cli-client/program.js +18 -4
- data/exe/aarch64-linux/package/lib/tools/cli-client/registry.js +9 -5
- data/exe/aarch64-linux/package/lib/tools/cli-client/session.js +6 -1
- data/exe/aarch64-linux/package/lib/tools/{cli-client/skill → skills/playwright-cli}/SKILL.md +26 -5
- data/exe/aarch64-linux/package/lib/tools/{cli-client/skill/references/spec-driven-testing.md → skills/playwright-cli/references/test-generation.md} +135 -7
- data/exe/aarch64-linux/package/lib/tools/{cli-client/skill → skills/playwright-cli}/references/tracing.md +1 -1
- data/exe/aarch64-linux/package/lib/tools/skills/playwright-component-testing/SKILL.md +136 -0
- data/exe/aarch64-linux/package/lib/tools/skills/playwright-component-testing/references/gallery-spec.md +144 -0
- data/exe/aarch64-linux/package/lib/tools/skills/playwright-component-testing/references/migration.md +89 -0
- data/exe/aarch64-linux/package/lib/tools/skills/playwright-component-testing/references/react.md +69 -0
- data/exe/aarch64-linux/package/lib/tools/skills/playwright-component-testing/references/typing.md +173 -0
- data/exe/aarch64-linux/package/lib/tools/skills/playwright-component-testing/references/vue.md +77 -0
- data/exe/aarch64-linux/package/lib/tools/{trace → skills/playwright-trace}/SKILL.md +6 -3
- data/exe/aarch64-linux/package/lib/tools/utils/extension.js +44 -10
- data/exe/aarch64-linux/package/lib/utilsBundle.js +48939 -50318
- data/exe/aarch64-linux/package/lib/utilsBundle.js.LICENSE +359 -525
- data/exe/aarch64-linux/package/lib/vite/dashboard/assets/codeMirrorModule--QdMvsKi.css +1 -0
- data/exe/aarch64-linux/package/lib/vite/dashboard/assets/codeMirrorModule-CQ8RZGBm.js +32 -0
- data/exe/aarch64-linux/package/lib/vite/dashboard/assets/index-AwgwcYie.css +1 -0
- data/exe/aarch64-linux/package/lib/vite/dashboard/assets/index-hRvO4yU2.js +12 -0
- data/exe/aarch64-linux/package/lib/vite/dashboard/index.html +2 -2
- data/exe/aarch64-linux/package/lib/vite/htmlReport/report.css +2 -1
- data/exe/aarch64-linux/package/lib/vite/htmlReport/report.js +15 -55
- data/exe/aarch64-linux/package/lib/vite/recorder/assets/codeMirrorModule--QdMvsKi.css +1 -0
- data/exe/aarch64-linux/package/lib/vite/recorder/assets/codeMirrorModule-CVQWJZAA.js +32 -0
- data/exe/aarch64-linux/package/lib/vite/recorder/assets/index-BZpYJZ-P.css +1 -0
- data/exe/aarch64-linux/package/lib/vite/recorder/assets/index-hrlLqLtq.js +129 -0
- data/exe/aarch64-linux/package/lib/vite/recorder/index.html +2 -2
- data/exe/aarch64-linux/package/lib/vite/traceViewer/assets/codeMirrorModule-BbkfBe3n.js +32 -0
- data/exe/aarch64-linux/package/lib/vite/traceViewer/assets/defaultSettingsView-Ds6CBOo0.js +182 -0
- data/exe/aarch64-linux/package/lib/vite/traceViewer/assets/urlMatch-L3liM589.js +1 -0
- data/exe/aarch64-linux/package/lib/vite/traceViewer/assets/xtermModule-DywYcAf8.js +7 -0
- data/exe/aarch64-linux/package/lib/vite/traceViewer/codeMirrorModule.-QdMvsKi.css +1 -0
- data/exe/aarch64-linux/package/lib/vite/traceViewer/defaultSettingsView.Bqk9acqE.css +1 -0
- data/exe/aarch64-linux/package/lib/vite/traceViewer/index.B4cLoZK3.js +1 -0
- data/exe/aarch64-linux/package/lib/vite/traceViewer/index.B_TqY17P.css +1 -0
- data/exe/aarch64-linux/package/lib/vite/traceViewer/index.html +5 -5
- data/exe/aarch64-linux/package/lib/vite/traceViewer/snapshot.B_Jk1wbt.js +1 -0
- data/exe/aarch64-linux/package/lib/vite/traceViewer/snapshot.html +2 -2
- data/exe/aarch64-linux/package/lib/vite/traceViewer/sw.bundle.js +3 -4
- data/exe/aarch64-linux/package/lib/vite/traceViewer/uiMode.CU5KtEkS.js +5 -0
- data/exe/aarch64-linux/package/lib/vite/traceViewer/uiMode.CyMfwkXJ.css +1 -0
- data/exe/aarch64-linux/package/lib/vite/traceViewer/uiMode.html +5 -5
- data/exe/aarch64-linux/package/lib/vite/traceViewer/xtermModule.kHJ-D0s7.css +1 -0
- data/exe/aarch64-linux/package/lib/webp_codec.LICENSE +173 -0
- data/exe/aarch64-linux/package/lib/webp_codec.wasm +0 -0
- data/exe/aarch64-linux/package/lib/xdg-open +338 -137
- data/exe/aarch64-linux/package/package.json +2 -2
- data/exe/aarch64-linux/package/types/protocol.d.ts +446 -430
- data/exe/aarch64-linux/package/types/structs.d.ts +8 -1
- data/exe/aarch64-linux/package/types/types.d.ts +2627 -440
- data/lib/venetian/executable.rb +6 -2
- data/lib/venetian/upstream.rb +35 -18
- data/lib/venetian/version.rb +2 -2
- metadata +45 -39
- data/exe/aarch64-linux/package/api.json +0 -1
- data/exe/aarch64-linux/package/lib/server/deviceDescriptorsSource.json +0 -2739
- data/exe/aarch64-linux/package/lib/tools/cli-client/skill/references/test-generation.md +0 -134
- data/exe/aarch64-linux/package/lib/vite/dashboard/assets/index-BY2S1tHT.css +0 -1
- data/exe/aarch64-linux/package/lib/vite/dashboard/assets/index-C_5TMfeg.js +0 -52
- data/exe/aarch64-linux/package/lib/vite/recorder/assets/codeMirrorModule-DYBRYzYX.css +0 -1
- data/exe/aarch64-linux/package/lib/vite/recorder/assets/codeMirrorModule-DeBYQozu.js +0 -32
- data/exe/aarch64-linux/package/lib/vite/recorder/assets/index-4ZiSSCmn.css +0 -1
- data/exe/aarch64-linux/package/lib/vite/recorder/assets/index-Bq-mQf8S.js +0 -193
- data/exe/aarch64-linux/package/lib/vite/traceViewer/assets/codeMirrorModule-LEHpjmcn.js +0 -32
- data/exe/aarch64-linux/package/lib/vite/traceViewer/assets/defaultSettingsView-BNmKHKpQ.js +0 -264
- data/exe/aarch64-linux/package/lib/vite/traceViewer/assets/urlMatch-BYQrIQwR.js +0 -1
- data/exe/aarch64-linux/package/lib/vite/traceViewer/assets/xtermModule-CsJ4vdCR.js +0 -9
- data/exe/aarch64-linux/package/lib/vite/traceViewer/codeMirrorModule.DYBRYzYX.css +0 -1
- data/exe/aarch64-linux/package/lib/vite/traceViewer/defaultSettingsView.CjdS-WJx.css +0 -1
- data/exe/aarch64-linux/package/lib/vite/traceViewer/index.CzXZzn5A.css +0 -1
- data/exe/aarch64-linux/package/lib/vite/traceViewer/index.DMMX1gXU.js +0 -2
- data/exe/aarch64-linux/package/lib/vite/traceViewer/snapshot.v8KI4P3m.js +0 -2
- data/exe/aarch64-linux/package/lib/vite/traceViewer/uiMode.BZQ54Kgt.css +0 -1
- data/exe/aarch64-linux/package/lib/vite/traceViewer/uiMode.Ut8wwJNp.js +0 -6
- data/exe/aarch64-linux/package/lib/vite/traceViewer/xtermModule.DYP7pi_n.css +0 -32
- data/exe/aarch64-linux/package/protocol.yml +0 -4991
- /data/exe/aarch64-linux/package/lib/tools/{cli-client/skill → skills/playwright-cli}/references/element-attributes.md +0 -0
- /data/exe/aarch64-linux/package/lib/tools/{cli-client/skill → skills/playwright-cli}/references/playwright-tests.md +0 -0
- /data/exe/aarch64-linux/package/lib/tools/{cli-client/skill → skills/playwright-cli}/references/request-mocking.md +0 -0
- /data/exe/aarch64-linux/package/lib/tools/{cli-client/skill → skills/playwright-cli}/references/running-code.md +0 -0
- /data/exe/aarch64-linux/package/lib/tools/{cli-client/skill → skills/playwright-cli}/references/session-management.md +0 -0
- /data/exe/aarch64-linux/package/lib/tools/{cli-client/skill → skills/playwright-cli}/references/storage-state.md +0 -0
- /data/exe/aarch64-linux/package/lib/tools/{cli-client/skill → skills/playwright-cli}/references/video-recording.md +0 -0
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
class Xs{constructor(t,e){this._snapshotIds=new Map,this._snapshotStorage=t,this._resourceLoader=e}serveSnapshot(t,e,n){const r=this._snapshot(t,e);if(!r)return new Response(null,{status:404});const i=r.render();return this._snapshotIds.set(n,r),new Response(i.html,{status:200,headers:{"Content-Type":"text/html; charset=utf-8"}})}async serveClosestScreenshot(t,e){const n=this._snapshot(t,e),r=n==null?void 0:n.closestScreenshot();return r?new Response(await this._resourceLoader(r)):new Response(null,{status:404})}serveSnapshotInfo(t,e){const n=this._snapshot(t,e);return this._respondWithJson(n?{viewport:n.viewport(),url:n.snapshot().frameUrl,timestamp:n.snapshot().timestamp,wallTime:n.snapshot().wallTime}:{error:"No snapshot found"})}_snapshot(t,e){const n=e.get("name");return this._snapshotStorage.snapshotByName(t,n)}_respondWithJson(t){return new Response(JSON.stringify(t),{status:200,headers:{"Cache-Control":"public, max-age=31536000","Content-Type":"application/json"}})}async serveResource(t,e,n){let r;const i=this._snapshotIds.get(n);for(const T of t)if(r=i==null?void 0:i.resourceByUrl($s(T),e),r)break;if(!r)return new Response(null,{status:404});const a=r.response.content._sha1,o=a?await this._resourceLoader(a)||new Blob([]):new Blob([]);let c=r.response.content.mimeType;/^text\/|^application\/(javascript|json)/.test(c)&&!c.includes("charset")&&(c=`${c}; charset=utf-8`);const d=new Headers;c!=="x-unknown"&&d.set("Content-Type",c);for(const{name:T,value:A}of r.response.headers)d.set(T,A);d.delete("Content-Encoding"),d.delete("Access-Control-Allow-Origin"),d.set("Access-Control-Allow-Origin","*"),d.delete("Content-Length"),d.set("Content-Length",String(o.size)),this._snapshotStorage.hasResourceOverride(r.request.url)?d.set("Cache-Control","no-store, no-cache, max-age=0"):d.set("Cache-Control","public, max-age=31536000");const{status:m}=r.response,w=m===101||m===204||m===205||m===304;return new Response(w?null:o,{headers:d,status:r.response.status,statusText:r.response.statusText})}}function $s(s){try{const t=new URL(s);return t.hash="",t.toString()}catch{return s}}function Js(s){const t=new Map,{files:e,stacks:n}=s;for(const r of n){const[i,a]=r;t.set(`call@${i}`,a.map(o=>({file:e[o[0]],line:o[1],column:o[2],function:o[3]})))}return t}const Un={"&":"&","<":"<",">":">",'"':""","'":"'"};function Qs(s){return s.replace(/[&<>"']/ug,t=>Un[t])}function zs(s){return s.replace(/[&<]/ug,t=>Un[t])}function Mt(s,t,e){return s.find((n,r)=>{if(r===s.length-1)return!0;const i=s[r+1];return Math.abs(t(n)-e)<Math.abs(t(i)-e)})}function Hn(s){return Array.isArray(s)&&typeof s[0]=="string"}function er(s){return Array.isArray(s)&&Array.isArray(s[0])}class tr{constructor(t,e,n,r,i){this._htmlCache=t,this._resources=e,this._snapshots=n,this._index=i,this._snapshot=n[i],this._callId=n[i].callId,this._screencastFrames=r,this.snapshotName=n[i].snapshotName}snapshot(){return this._snapshots[this._index]}viewport(){return this._snapshots[this._index].viewport}closestScreenshot(){var r;const{wallTime:t,timestamp:e}=this.snapshot(),n=t&&((r=this._screencastFrames[0])!=null&&r.frameSwapWallTime)?Mt(this._screencastFrames,i=>i.frameSwapWallTime,t):Mt(this._screencastFrames,i=>i.timestamp,e);return n==null?void 0:n.sha1}render(){const t=[],e=(i,a,o,c)=>{if(typeof i=="string"){o==="STYLE"||o==="style"?t.push(fr(or(i))):t.push(zs(i));return}if(er(i)){const h=a-i[0][0];if(h>=0&&h<=a){const d=rr(this._snapshots[h]),m=i[0][1];if(m>=0&&m<d.length)return e(d[m],h,o,c)}}else if(Hn(i)){const[h,d,...m]=i;if(h.toUpperCase()==="SCRIPT")return;const w=h.toUpperCase(),T=w==="NOSCRIPT"?"X-NOSCRIPT":h,A=Object.entries(d||{});t.push("<",T);const u="__playwright_current_src__",l=w==="IFRAME"||w==="FRAME",f=w==="A",p=w==="IMG",g=w==="META",C=p&&A.some(_=>_[0]===u),O=w==="SOURCE"&&o==="PICTURE"&&(c==null?void 0:c.some(_=>_[0]===u)),b=g&&A.some(_=>_[0].toLowerCase()==="http-equiv"&&!sr.has(_[1].trim().toLowerCase()));for(const[_,E]of A){let y=_;if(_.toLowerCase().startsWith("on"))continue;l&&_.toLowerCase()==="src"&&(y="__playwright_src__"),l&&(_.toLowerCase()==="srcdoc"||_.toLowerCase()==="sandbox")&&(y="__playwright_"+_.toLowerCase()+"__"),w==="OBJECT"&&_.toLowerCase()==="data"&&(y="__playwright_data__"),w==="EMBED"&&_.toLowerCase()==="src"&&(y="__playwright_src__"),p&&_===u&&(y="src"),["src","srcset"].includes(_.toLowerCase())&&(C||O)&&(y="_"+y),b&&(_.toLowerCase()==="http-equiv"||_.toLowerCase()==="content")&&(y="_"+_);let x=E;!f&&(_.toLowerCase()==="href"||_.toLowerCase()==="src"||_===u)&&(x=lt(E)),t.push(" ",y,'="',Qs(x),'"')}t.push(">");for(const _ of m)e(_,a,T,A);nr.has(T)||t.push("</",T,">");return}else return},n=this._snapshot;return{html:this._htmlCache.getOrCompute(this,()=>{var c;e(n.html,this._index,void 0,void 0);const i=(c=n.doctype)==null?void 0:c.replace(/[^a-zA-Z0-9]/g,""),o=(i?`<!DOCTYPE ${i}>`:"")+["<style>*,*::before,*::after { visibility: hidden }</style>",`<script>${ir(this.viewport(),this._callId,this.snapshotName)}<\/script>`].join("")+t.join("");return{value:o,size:o.length}}),pageId:n.pageId,frameId:n.frameId,index:this._index}}resourceByUrl(t,e){const n=this._snapshot;let r,i;for(const o of this._resources){if(typeof o._monotonicTime=="number"&&o._monotonicTime>=n.timestamp)break;o.response.status!==304&&o.request.url===t&&o.request.method===e&&(o._frameref===n.frameId?r=o:i=o)}let a=r??i;if(a&&e.toUpperCase()==="GET"){let o=n.resourceOverrides.find(c=>c.url===t);if(o!=null&&o.ref){const c=this._index-o.ref;c>=0&&c<this._snapshots.length&&(o=this._snapshots[c].resourceOverrides.find(h=>h.url===t))}o!=null&&o.sha1&&(a={...a,response:{...a.response,content:{...a.response.content,_sha1:o.sha1}}})}return a}}const nr=new Set(["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","MENUITEM","META","PARAM","SOURCE","TRACK","WBR"]),sr=new Set(["content-type","content-language","default-style","x-ua-compatible"]);function rr(s){if(!s._nodes){const t=[],e=n=>{if(typeof n=="string")t.push(n);else if(Hn(n)){const[,,...r]=n;for(const i of r)e(i);t.push(n)}};e(s.html),s._nodes=t}return s._nodes}function ir(s,...t){function e(r,i,...a){const o=window,c=new URLSearchParams(o.location.search),h=c.has("shouldPopulateCanvasFromScreenshot"),d=c.has("isUnderTest"),m={viewport:i,frames:new WeakMap};o.__playwright_frame_bounding_rects__=m;const w="Recorded click position in absolute coordinates did not match the center of the clicked element. This is either due to the use of provided offset, or due to a difference between the test runner and the trace viewer operating systems.",T=[],A=[],u=[],l=[];let f=o;for(;f!==f.parent&&!f.location.pathname.match(/\/page@[a-z0-9]+$/);)f=f.parent;const p=O=>{for(const _ of O.querySelectorAll("[__playwright_scroll_top_]"))T.push(_);for(const _ of O.querySelectorAll("[__playwright_scroll_left_]"))A.push(_);for(const _ of O.querySelectorAll("[__playwright_value_]")){const E=_;E.type!=="file"&&(E.value=E.getAttribute("__playwright_value_")),_.removeAttribute("__playwright_value_")}for(const _ of O.querySelectorAll("[__playwright_checked_]"))_.checked=_.getAttribute("__playwright_checked_")==="true",_.removeAttribute("__playwright_checked_");for(const _ of O.querySelectorAll("[__playwright_selected_]"))_.selected=_.getAttribute("__playwright_selected_")==="true",_.removeAttribute("__playwright_selected_");for(const _ of O.querySelectorAll("[__playwright_popover_open_]")){try{_.showPopover()}catch{}_.removeAttribute("__playwright_popover_open_")}for(const _ of O.querySelectorAll("[__playwright_dialog_open_]")){try{_.getAttribute("__playwright_dialog_open_")==="modal"?_.showModal():_.show()}catch{}_.removeAttribute("__playwright_dialog_open_")}const b=_=>{const E=_.style;E.outline="2px solid #006ab1",E.backgroundColor="#6fa8dc7f",u.push(_)};for(const _ of O.querySelectorAll('[__playwright_target__=""]'))b(_);for(const _ of a)if(_)for(const E of O.querySelectorAll(`[__playwright_target__="${_}"]`))b(E);for(const _ of O.querySelectorAll("iframe, frame")){const E=_.getAttribute("__playwright_bounding_rect__");_.removeAttribute("__playwright_bounding_rect__");const y=E?JSON.parse(E):void 0;y&&m.frames.set(_,{boundingRect:y,scrollLeft:0,scrollTop:0});const x=_.getAttribute("__playwright_src__");if(!x)_.setAttribute("src",r);else{const S=new URL(o.location.href),I=S.pathname.lastIndexOf("/snapshot/");I!==-1&&(S.pathname=S.pathname.substring(0,I+1)),S.pathname+=x.substring(1),_.setAttribute("src",S.toString())}}{const _=O.querySelector("body[__playwright_custom_elements__]");if(_&&o.customElements){const E=(_.getAttribute("__playwright_custom_elements__")||"").split(",");for(const y of E)o.customElements.define(y,class extends HTMLElement{})}}for(const _ of O.querySelectorAll("template[__playwright_shadow_root_]")){const E=_,y=E.parentElement.attachShadow({mode:"open"});y.appendChild(E.content),E.remove(),p(y)}for(const _ of O.querySelectorAll("a"))_.addEventListener("click",E=>{E.preventDefault()});if("adoptedStyleSheets"in O){const _=[...O.adoptedStyleSheets];for(const E of O.querySelectorAll("template[__playwright_style_sheet_]")){const y=E,x=new CSSStyleSheet;x.replaceSync(y.getAttribute("__playwright_style_sheet_")),_.push(x)}O.adoptedStyleSheets=_}l.push(...O.querySelectorAll("canvas"))},g=()=>{o.removeEventListener("load",g);for(const _ of T)_.scrollTop=+_.getAttribute("__playwright_scroll_top_"),_.removeAttribute("__playwright_scroll_top_"),m.frames.has(_)&&(m.frames.get(_).scrollTop=_.scrollTop);for(const _ of A)_.scrollLeft=+_.getAttribute("__playwright_scroll_left_"),_.removeAttribute("__playwright_scroll_left_"),m.frames.has(_)&&(m.frames.get(_).scrollLeft=_.scrollLeft);o.document.styleSheets[0].disabled=!0;const O=new URL(o.location.href).searchParams;if(o===f&&O.get("pointX")&&O.get("pointY")){const _=+O.get("pointX"),E=+O.get("pointY"),y=o.document.createElement("x-pw-pointer");y.style.position="fixed",y.style.backgroundColor="#f44336",y.style.width="20px",y.style.height="20px",y.style.borderRadius="10px",y.style.margin="-10px 0 0 -10px",y.style.zIndex="2147483646",y.style.display="flex",y.style.alignItems="center",y.style.justifyContent="center";const x=u[0],S=x==null?void 0:x.getBoundingClientRect(),I=x?{x:S.left+S.width/2,y:S.top+S.height/2}:null;if(y.style.left=((I==null?void 0:I.x)??_)+"px",y.style.top=((I==null?void 0:I.y)??E)+"px",!(!I||Math.abs(I.x-_)<=10&&Math.abs(I.y-E)<=10)){const D=o.document.createElement("x-pw-pointer-warning");D.textContent="⚠",D.style.fontSize="19px",D.style.color="white",D.style.marginTop="-3.5px",D.style.userSelect="none",y.appendChild(D),y.setAttribute("title",w)}o.document.documentElement.appendChild(y)}if(l.length>0){let _=function(y,x){function S(){const I=o.document.createElement("canvas");I.width=I.width/Math.floor(I.width/24),I.height=I.height/Math.floor(I.height/24);const R=I.getContext("2d");return R.fillStyle="lightgray",R.fillRect(0,0,I.width,I.height),R.fillStyle="white",R.fillRect(0,0,I.width/2,I.height/2),R.fillRect(I.width/2,I.height/2,I.width,I.height),R.createPattern(I,"repeat")}y.fillStyle=S(),y.fillRect(0,0,x.width,x.height)};const E=new Image;E.onload=()=>{var y;for(const x of l){const S=x.getContext("2d"),I=x.getAttribute("__playwright_bounding_rect__");if(x.removeAttribute("__playwright_bounding_rect__"),!I)continue;let R;try{R=JSON.parse(I)}catch{continue}let D=o;for(;D!==f;){const q=D.frameElement;D=D.parent;const N=(y=D.__playwright_frame_bounding_rects__)==null?void 0:y.frames.get(q);if(!(N!=null&&N.boundingRect))break;const K=N.boundingRect.left-N.scrollLeft,L=N.boundingRect.top-N.scrollTop;R.left+=K,R.top+=L,R.right+=K,R.bottom+=L}const{width:k,height:P}=f.__playwright_frame_bounding_rects__.viewport;R.left=R.left/k,R.top=R.top/P,R.right=R.right/k,R.bottom=R.bottom/P;const U=R.right>1||R.bottom>1;if(R.left>1||R.top>1){x.title="Playwright couldn't capture canvas contents because it's located outside the viewport.";continue}_(S,x),h?(S.drawImage(E,R.left*E.width,R.top*E.height,(R.right-R.left)*E.width,(R.bottom-R.top)*E.height,0,0,x.width,x.height),U?x.title="Playwright couldn't capture full canvas contents because it's located partially outside the viewport.":x.title="Canvas contents are displayed on a best-effort basis based on viewport screenshots taken during test execution."):x.title="Canvas content display is disabled.",d&&console.log("canvas drawn:",JSON.stringify([R.left,R.top,R.right-R.left,R.bottom-R.top].map(q=>Math.floor(q*100))))}},E.onerror=()=>{for(const y of l){const x=y.getContext("2d");_(x,y),y.title="Playwright couldn't show canvas contents because the screenshot failed to load."}},E.src=location.href.replace("/snapshot","/closest-screenshot")}},C=()=>p(o.document);o.addEventListener("load",g),o.addEventListener("DOMContentLoaded",C)}const n=r=>JSON.stringify(r).replace(/</g,"\\u003c");return`
|
|
2
|
-
(${e.toString()})(${n(ur)},${n(s)}${t.map(r=>`, ${n(String(r))}`).join("")})`}const Wn=["about:","blob:","data:","file:","ftp:","http:","https:","mailto:","sftp:","ws:","wss:"],Ut="http://playwright.bloburl/#";function lt(s){s.startsWith(Ut)&&(s=s.substring(Ut.length));try{const t=new URL(s);if(t.protocol==="javascript:"||t.protocol==="vbscript:")return"javascript:void(0)";const e=t.protocol==="blob:",n=t.protocol==="file:";if(!e&&!n&&Wn.includes(t.protocol))return s;const r="pw-"+t.protocol.slice(0,t.protocol.length-1);return n||(t.protocol="https:"),t.hostname=t.hostname?`${r}--${t.hostname}`:r,n&&(t.protocol="https:"),t.toString()}catch{return s}}const ar=/url\(['"]?([\w-]+:)\/\//ig;function or(s){return s.replace(ar,(t,e)=>!(e==="blob:")&&!(e==="file:")&&Wn.includes(e)?t:t.replace(e+"//",`https://pw-${e.slice(0,-1)}--`))}const cr=/url\(\s*'([^']*)'\s*\)/ig,lr=/url\(\s*"([^"]*)"\s*\)/ig;function fr(s){const t=(e,n)=>n.includes("</")?e.replace(n,encodeURI(n)):e;return s.replace(cr,t).replace(lr,t)}const ur="data:text/html;base64,"+btoa("<body></body><style>body { color-scheme: light dark; background: light-dark(white, #333) }</style>");class dr{constructor(t){this._maxSize=t,this._map=new Map,this._size=0}getOrCompute(t,e){if(this._map.has(t)){const r=this._map.get(t);return this._map.delete(t),this._map.set(t,r),r.value}const n=e();for(;this._map.size&&this._size+n.size>this._maxSize;){const[r,i]=this._map.entries().next().value;this._size-=i.size,this._map.delete(r)}return this._map.set(t,n),this._size+=n.size,n.value}}class _r{constructor(){this._frameSnapshots=new Map,this._cache=new dr(1e8),this._contextToResources=new Map,this._resourceUrlsWithOverrides=new Set}addResource(t,e){e.request.url=lt(e.request.url),this._ensureResourcesForContext(t).push(e)}addFrameSnapshot(t,e,n){for(const o of e.resourceOverrides)o.url=lt(o.url);let r=this._frameSnapshots.get(e.frameId);r||(r={raw:[],renderers:[]},this._frameSnapshots.set(e.frameId,r),e.isMainFrame&&this._frameSnapshots.set(e.pageId,r)),r.raw.push(e);const i=this._ensureResourcesForContext(t),a=new tr(this._cache,i,r.raw,n,r.raw.length-1);return r.renderers.push(a),a}snapshotByName(t,e){const n=this._frameSnapshots.get(t);return n==null?void 0:n.renderers.find(r=>r.snapshotName===e)}snapshotsForTest(){return[...this._frameSnapshots.keys()]}finalize(){for(const t of this._contextToResources.values())t.sort((e,n)=>(e._monotonicTime||0)-(n._monotonicTime||0));for(const t of this._frameSnapshots.values())for(const e of t.raw)for(const n of e.resourceOverrides)this._resourceUrlsWithOverrides.add(n.url)}hasResourceOverride(t){return this._resourceUrlsWithOverrides.has(t)}_ensureResourcesForContext(t){let e=this._contextToResources.get(t);return e||(e=[],this._contextToResources.set(t,e)),e}}class Bn extends Error{constructor(t){super(t),this.name="TraceVersionError"}}const Ht=8;class hr{constructor(t,e){this._actionMap=new Map,this._pageEntries=new Map,this._jsHandles=new Map,this._consoleObjects=new Map,this._contextEntry=t,this._snapshotStorage=e}appendTrace(t){for(const e of t.split(`
|
|
3
|
-
`))this._appendEvent(e)}actions(){return[...this._actionMap.values()]}_pageEntry(t){let e=this._pageEntries.get(t);return e||(e={pageId:t,screencastFrames:[]},this._pageEntries.set(t,e),this._contextEntry.pages.push(e)),e}_appendEvent(t){if(!t)return;const e=this._modernize(JSON.parse(t));for(const n of e)this._innerAppendEvent(n)}_innerAppendEvent(t){const e=this._contextEntry;switch(t.type){case"context-options":{if(t.version>Ht)throw new Bn("The trace was created by a newer version of Playwright and is not supported by this version of the viewer. Please use latest Playwright to open the trace.");this._version=t.version,e.origin=t.origin,e.browserName=t.browserName,e.channel=t.channel,e.title=t.title,e.platform=t.platform,e.playwrightVersion=t.playwrightVersion,e.wallTime=t.wallTime,e.startTime=t.monotonicTime,e.sdkLanguage=t.sdkLanguage,e.options=t.options,e.testIdAttributeName=t.testIdAttributeName,e.contextId=t.contextId??"",e.testTimeout=t.testTimeout;break}case"screencast-frame":{this._pageEntry(t.pageId).screencastFrames.push(t);break}case"before":{this._actionMap.set(t.callId,{...t,type:"action",endTime:0,log:[]});break}case"input":{const n=this._actionMap.get(t.callId);n.inputSnapshot=t.inputSnapshot,n.point=t.point;break}case"log":{const n=this._actionMap.get(t.callId);if(!n)return;n.log.push({time:t.time,message:t.message});break}case"after":{const n=this._actionMap.get(t.callId);n.afterSnapshot=t.afterSnapshot,n.endTime=t.endTime,n.result=t.result,n.error=t.error,n.attachments=t.attachments,n.annotations=t.annotations,t.point&&(n.point=t.point);break}case"action":{this._actionMap.set(t.callId,{...t,log:[]});break}case"event":{e.events.push(t);break}case"stdout":{e.stdio.push(t);break}case"stderr":{e.stdio.push(t);break}case"error":{e.errors.push(t);break}case"console":{e.events.push(t);break}case"resource-snapshot":this._snapshotStorage.addResource(this._contextEntry.contextId,t.snapshot),e.resources.push(t.snapshot);break;case"frame-snapshot":this._snapshotStorage.addFrameSnapshot(this._contextEntry.contextId,t.snapshot,this._pageEntry(t.snapshot.pageId).screencastFrames);break}"pageId"in t&&t.pageId&&this._pageEntry(t.pageId),(t.type==="action"||t.type==="before")&&(e.startTime=Math.min(e.startTime,t.startTime)),(t.type==="action"||t.type==="after")&&(e.endTime=Math.max(e.endTime,t.endTime)),t.type==="event"&&(e.startTime=Math.min(e.startTime,t.time),e.endTime=Math.max(e.endTime,t.time)),t.type==="screencast-frame"&&(e.startTime=Math.min(e.startTime,t.timestamp),e.endTime=Math.max(e.endTime,t.timestamp))}_processedContextCreatedEvent(){return this._version!==void 0}_modernize(t){let e=this._version??t.version??6,n=[t];for(;e<Ht;++e)n=this[`_modernize_${e}_to_${e+1}`].call(this,n);return n}_modernize_0_to_1(t){for(const e of t)e.type==="action"&&typeof e.metadata.error=="string"&&(e.metadata.error={error:{name:"Error",message:e.metadata.error}});return t}_modernize_1_to_2(t){var e;for(const n of t)n.type!=="frame-snapshot"||!n.snapshot.isMainFrame||(n.snapshot.viewport=((e=this._contextEntry.options)==null?void 0:e.viewport)||{width:1280,height:720});return t}_modernize_2_to_3(t){for(const e of t){if(e.type!=="resource-snapshot"||e.snapshot.request)continue;const n=e.snapshot;e.snapshot={_frameref:n.frameId,request:{url:n.url,method:n.method,headers:n.requestHeaders,postData:n.requestSha1?{_sha1:n.requestSha1}:void 0},response:{status:n.status,headers:n.responseHeaders,content:{mimeType:n.contentType,_sha1:n.responseSha1}},_monotonicTime:n.timestamp}}return t}_modernize_3_to_4(t){const e=[];for(const n of t){const r=this._modernize_event_3_to_4(n);r&&e.push(r)}return e}_modernize_event_3_to_4(t){var n,r,i,a;if(t.type!=="action"&&t.type!=="event")return t;const e=t.metadata;return e.internal||e.method.startsWith("tracing")?null:t.type==="event"?e.method==="__create__"&&e.type==="ConsoleMessage"?{type:"object",class:e.type,guid:e.params.guid,initializer:e.params.initializer}:{type:"event",time:e.startTime,class:e.type,method:e.method,params:e.params,pageId:e.pageId}:{type:"action",callId:e.id,startTime:e.startTime,endTime:e.endTime,apiName:e.apiName||e.type+"."+e.method,class:e.type,method:e.method,params:e.params,wallTime:e.wallTime||Date.now(),log:e.log,beforeSnapshot:(n=e.snapshots.find(o=>o.title==="before"))==null?void 0:n.snapshotName,inputSnapshot:(r=e.snapshots.find(o=>o.title==="input"))==null?void 0:r.snapshotName,afterSnapshot:(i=e.snapshots.find(o=>o.title==="after"))==null?void 0:i.snapshotName,error:(a=e.error)==null?void 0:a.error,result:e.result,point:e.point,pageId:e.pageId}}_modernize_4_to_5(t){const e=[];for(const n of t){const r=this._modernize_event_4_to_5(n);r&&e.push(r)}return e}_modernize_event_4_to_5(t){var e,n;if(t.type==="event"&&t.method==="__create__"&&t.class==="JSHandle"&&this._jsHandles.set(t.params.guid,t.params.initializer),t.type==="object"){if(t.class!=="ConsoleMessage")return null;const r=(e=t.initializer.args)==null?void 0:e.map(i=>{if(i.guid){const a=this._jsHandles.get(i.guid);return{preview:(a==null?void 0:a.preview)||"",value:""}}return{preview:i.preview||"",value:i.value||""}});return this._consoleObjects.set(t.guid,{type:t.initializer.type,text:t.initializer.text,location:t.initializer.location,args:r}),null}if(t.type==="event"&&t.method==="console"){const r=this._consoleObjects.get(((n=t.params.message)==null?void 0:n.guid)||"");return r?{type:"console",time:t.time,pageId:t.pageId,messageType:r.type,text:r.text,args:r.args,location:r.location}:null}return t}_modernize_5_to_6(t){const e=[];for(const n of t)if(e.push(n),!(n.type!=="after"||!n.log.length))for(const r of n.log)e.push({type:"log",callId:n.callId,message:r,time:-1});return e}_modernize_6_to_7(t){const e=[];if(!this._processedContextCreatedEvent()&&t[0].type!=="context-options"){const n={type:"context-options",origin:"testRunner",version:6,browserName:"",options:{},platform:"unknown",wallTime:0,monotonicTime:0,sdkLanguage:"javascript",contextId:""};e.push(n)}for(const n of t){if(n.type==="context-options"){e.push({...n,monotonicTime:0,origin:"library",contextId:""});continue}if(n.type==="before"||n.type==="action"){this._contextEntry.wallTime||(this._contextEntry.wallTime=n.wallTime);const r=n,i=n;i.stepId=`${r.apiName}@${r.wallTime}`,e.push(i)}else e.push(n)}return e}_modernize_7_to_8(t){const e=[];for(const n of t)if(n.type==="before"||n.type==="action"){const r=n,i=n;r.apiName&&(i.title=r.apiName,delete i.apiName),i.stepId=r.stepId??r.callId,e.push(i)}else e.push(n);return e}}class pr{constructor(){this.contextEntries=[],this._resourceToContentType=new Map}async load(t,e,n){var h,d,m;this._backend=t;const r=(h=e==null?void 0:e.match(/(.+)\.trace$/))==null?void 0:h[1],i=[];let a=!1;for(const w of await this._backend.entryNames()){const T=w.match(/(.+)\.trace$/);T&&(!r||r===T[1])&&i.push(T[1]||""),w.includes("src@")&&(a=!0)}if(!i.length)throw new Error("Cannot find .trace file");this._snapshotStorage=new _r;const o=i.length*3;let c=0;for(const w of i){const T=mr();T.hasSource=a;const A=new hr(T,this._snapshotStorage),u=await this._backend.readText(w+".trace")||"";A.appendTrace(u),n==null||n(++c,o);const l=await this._backend.readText(w+".network")||"";if(A.appendTrace(l),n==null||n(++c,o),T.actions=A.actions().sort((p,g)=>p.startTime-g.startTime),!t.isLive()){for(const p of T.actions.slice().reverse())if(!p.endTime&&!p.error)for(const g of T.actions)g.parentId===p.callId&&p.endTime<g.endTime&&(p.endTime=g.endTime)}const f=await this._backend.readText(w+".stacks");if(f){const p=Js(JSON.parse(f));for(const g of T.actions)g.stack=g.stack||p.get(g.callId)}n==null||n(++c,o);for(const p of T.resources)(d=p.request.postData)!=null&&d._sha1&&this._resourceToContentType.set(p.request.postData._sha1,Wt(p.request.postData.mimeType)),(m=p.response.content)!=null&&m._sha1&&this._resourceToContentType.set(p.response.content._sha1,Wt(p.response.content.mimeType));this.contextEntries.push(T)}this._snapshotStorage.finalize()}async hasEntry(t){return this._backend.hasEntry(t)}async resourceForSha1(t){const e=await this._backend.readBlob("resources/"+t),n=this._resourceToContentType.get(t);return!e||n===void 0||n==="x-unknown"?e:new Blob([e],{type:n})}storage(){return this._snapshotStorage}}function Wt(s){const t=s.match(/^(.*);\s*charset=.*$/);return t?t[1]:s}function mr(){return{origin:"testRunner",startTime:Number.MAX_SAFE_INTEGER,wallTime:Number.MAX_SAFE_INTEGER,endTime:0,browserName:"",options:{deviceScaleFactor:1,isMobile:!1,viewport:{width:1280,height:800}},pages:[],resources:[],actions:[],events:[],errors:[],stdio:[],hasSource:!1,contextId:""}}function wr(s,t){const e=new Array(t.length).fill(0);return new Array(t.length).fill(0).map((n,r)=>(i,a)=>{e[r]=i/a*t[r]*1e3,s(e.reduce((o,c)=>o+c,0),1e3)})}const gr=15,v=0,ne=1,br=2,X=-2,W=-3,Bt=-4,se=-5,$=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],jn=1440,yr=0,Er=4,xr=9,Tr=5,Sr=[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],Rr=[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],Ar=[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],Or=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Cr=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],Ir=[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],ie=15;function ft(){const s=this;let t,e,n,r,i,a;function o(h,d,m,w,T,A,u,l,f,p,g){let C,O,b,_,E,y,x,S,I,R,D,k,P,U,F;R=0,E=m;do n[h[d+R]]++,R++,E--;while(E!==0);if(n[0]==m)return u[0]=-1,l[0]=0,v;for(S=l[0],y=1;y<=ie&&n[y]===0;y++);for(x=y,S<y&&(S=y),E=ie;E!==0&&n[E]===0;E--);for(b=E,S>E&&(S=E),l[0]=S,U=1<<y;y<E;y++,U<<=1)if((U-=n[y])<0)return W;if((U-=n[E])<0)return W;for(n[E]+=U,a[1]=y=0,R=1,P=2;--E!==0;)a[P]=y+=n[R],P++,R++;E=0,R=0;do(y=h[d+R])!==0&&(g[a[y]++]=E),R++;while(++E<m);for(m=a[b],a[0]=E=0,R=0,_=-1,k=-S,i[0]=0,D=0,F=0;x<=b;x++)for(C=n[x];C--!==0;){for(;x>k+S;){if(_++,k+=S,F=b-k,F=F>S?S:F,(O=1<<(y=x-k))>C+1&&(O-=C+1,P=x,y<F))for(;++y<F&&!((O<<=1)<=n[++P]);)O-=n[P];if(F=1<<y,p[0]+F>jn)return W;i[_]=D=p[0],p[0]+=F,_!==0?(a[_]=E,r[0]=y,r[1]=S,y=E>>>k-S,r[2]=D-i[_-1]-y,f.set(r,(i[_-1]+y)*3)):u[0]=D}for(r[1]=x-k,R>=m?r[0]=192:g[R]<w?(r[0]=g[R]<256?0:96,r[2]=g[R++]):(r[0]=A[g[R]-w]+16+64,r[2]=T[g[R++]-w]),O=1<<x-k,y=E>>>k;y<F;y+=O)f.set(r,(D+y)*3);for(y=1<<x-1;(E&y)!==0;y>>>=1)E^=y;for(E^=y,I=(1<<k)-1;(E&I)!=a[_];)_--,k-=S,I=(1<<k)-1}return U!==0&&b!=1?se:v}function c(h){let d;for(t||(t=[],e=[],n=new Int32Array(ie+1),r=[],i=new Int32Array(ie),a=new Int32Array(ie+1)),e.length<h&&(e=[]),d=0;d<h;d++)e[d]=0;for(d=0;d<ie+1;d++)n[d]=0;for(d=0;d<3;d++)r[d]=0;i.set(n.subarray(0,ie),0),a.set(n.subarray(0,ie+1),0)}s.inflate_trees_bits=function(h,d,m,w,T){let A;return c(19),t[0]=0,A=o(h,0,19,19,null,null,m,d,w,t,e),A==W?T.msg="oversubscribed dynamic bit lengths tree":(A==se||d[0]===0)&&(T.msg="incomplete dynamic bit lengths tree",A=W),A},s.inflate_trees_dynamic=function(h,d,m,w,T,A,u,l,f){let p;return c(288),t[0]=0,p=o(m,0,h,257,Ar,Or,A,w,l,t,e),p!=v||w[0]===0?(p==W?f.msg="oversubscribed literal/length tree":p!=Bt&&(f.msg="incomplete literal/length tree",p=W),p):(c(288),p=o(m,h,d,0,Cr,Ir,u,T,l,t,e),p!=v||T[0]===0&&h>257?(p==W?f.msg="oversubscribed distance tree":p==se?(f.msg="incomplete distance tree",p=W):p!=Bt&&(f.msg="empty distance tree with lengths",p=W),p):v)}}ft.inflate_trees_fixed=function(s,t,e,n){return s[0]=xr,t[0]=Tr,e[0]=Sr,n[0]=Rr,v};const He=0,jt=1,qt=2,Gt=3,Yt=4,Vt=5,Zt=6,ze=7,Kt=8,We=9;function Nr(){const s=this;let t,e=0,n,r=0,i=0,a=0,o=0,c=0,h=0,d=0,m,w=0,T,A=0;function u(l,f,p,g,C,O,b,_){let E,y,x,S,I,R,D,k,P,U,F,q,N,K,L,M;D=_.next_in_index,k=_.avail_in,I=b.bitb,R=b.bitk,P=b.write,U=P<b.read?b.read-P-1:b.end-P,F=$[l],q=$[f];do{for(;R<20;)k--,I|=(_.read_byte(D++)&255)<<R,R+=8;if(E=I&F,y=p,x=g,M=(x+E)*3,(S=y[M])===0){I>>=y[M+1],R-=y[M+1],b.win[P++]=y[M+2],U--;continue}do{if(I>>=y[M+1],R-=y[M+1],(S&16)!==0){for(S&=15,N=y[M+2]+(I&$[S]),I>>=S,R-=S;R<15;)k--,I|=(_.read_byte(D++)&255)<<R,R+=8;E=I&q,y=C,x=O,M=(x+E)*3,S=y[M];do if(I>>=y[M+1],R-=y[M+1],(S&16)!==0){for(S&=15;R<S;)k--,I|=(_.read_byte(D++)&255)<<R,R+=8;if(K=y[M+2]+(I&$[S]),I>>=S,R-=S,U-=N,P>=K)L=P-K,P-L>0&&2>P-L?(b.win[P++]=b.win[L++],b.win[P++]=b.win[L++],N-=2):(b.win.set(b.win.subarray(L,L+2),P),P+=2,L+=2,N-=2);else{L=P-K;do L+=b.end;while(L<0);if(S=b.end-L,N>S){if(N-=S,P-L>0&&S>P-L)do b.win[P++]=b.win[L++];while(--S!==0);else b.win.set(b.win.subarray(L,L+S),P),P+=S,L+=S,S=0;L=0}}if(P-L>0&&N>P-L)do b.win[P++]=b.win[L++];while(--N!==0);else b.win.set(b.win.subarray(L,L+N),P),P+=N,L+=N,N=0;break}else if((S&64)===0)E+=y[M+2],E+=I&$[S],M=(x+E)*3,S=y[M];else return _.msg="invalid distance code",N=_.avail_in-k,N=R>>3<N?R>>3:N,k+=N,D-=N,R-=N<<3,b.bitb=I,b.bitk=R,_.avail_in=k,_.total_in+=D-_.next_in_index,_.next_in_index=D,b.write=P,W;while(!0);break}if((S&64)===0){if(E+=y[M+2],E+=I&$[S],M=(x+E)*3,(S=y[M])===0){I>>=y[M+1],R-=y[M+1],b.win[P++]=y[M+2],U--;break}}else return(S&32)!==0?(N=_.avail_in-k,N=R>>3<N?R>>3:N,k+=N,D-=N,R-=N<<3,b.bitb=I,b.bitk=R,_.avail_in=k,_.total_in+=D-_.next_in_index,_.next_in_index=D,b.write=P,ne):(_.msg="invalid literal/length code",N=_.avail_in-k,N=R>>3<N?R>>3:N,k+=N,D-=N,R-=N<<3,b.bitb=I,b.bitk=R,_.avail_in=k,_.total_in+=D-_.next_in_index,_.next_in_index=D,b.write=P,W)}while(!0)}while(U>=258&&k>=10);return N=_.avail_in-k,N=R>>3<N?R>>3:N,k+=N,D-=N,R-=N<<3,b.bitb=I,b.bitk=R,_.avail_in=k,_.total_in+=D-_.next_in_index,_.next_in_index=D,b.write=P,v}s.init=function(l,f,p,g,C,O){t=He,h=l,d=f,m=p,w=g,T=C,A=O,n=null},s.proc=function(l,f,p){let g,C,O,b=0,_=0,E=0,y,x,S,I;for(E=f.next_in_index,y=f.avail_in,b=l.bitb,_=l.bitk,x=l.write,S=x<l.read?l.read-x-1:l.end-x;;)switch(t){case He:if(S>=258&&y>=10&&(l.bitb=b,l.bitk=_,f.avail_in=y,f.total_in+=E-f.next_in_index,f.next_in_index=E,l.write=x,p=u(h,d,m,w,T,A,l,f),E=f.next_in_index,y=f.avail_in,b=l.bitb,_=l.bitk,x=l.write,S=x<l.read?l.read-x-1:l.end-x,p!=v)){t=p==ne?ze:We;break}i=h,n=m,r=w,t=jt;case jt:for(g=i;_<g;){if(y!==0)p=v;else return l.bitb=b,l.bitk=_,f.avail_in=y,f.total_in+=E-f.next_in_index,f.next_in_index=E,l.write=x,l.inflate_flush(f,p);y--,b|=(f.read_byte(E++)&255)<<_,_+=8}if(C=(r+(b&$[g]))*3,b>>>=n[C+1],_-=n[C+1],O=n[C],O===0){a=n[C+2],t=Zt;break}if((O&16)!==0){o=O&15,e=n[C+2],t=qt;break}if((O&64)===0){i=O,r=C/3+n[C+2];break}if((O&32)!==0){t=ze;break}return t=We,f.msg="invalid literal/length code",p=W,l.bitb=b,l.bitk=_,f.avail_in=y,f.total_in+=E-f.next_in_index,f.next_in_index=E,l.write=x,l.inflate_flush(f,p);case qt:for(g=o;_<g;){if(y!==0)p=v;else return l.bitb=b,l.bitk=_,f.avail_in=y,f.total_in+=E-f.next_in_index,f.next_in_index=E,l.write=x,l.inflate_flush(f,p);y--,b|=(f.read_byte(E++)&255)<<_,_+=8}e+=b&$[g],b>>=g,_-=g,i=d,n=T,r=A,t=Gt;case Gt:for(g=i;_<g;){if(y!==0)p=v;else return l.bitb=b,l.bitk=_,f.avail_in=y,f.total_in+=E-f.next_in_index,f.next_in_index=E,l.write=x,l.inflate_flush(f,p);y--,b|=(f.read_byte(E++)&255)<<_,_+=8}if(C=(r+(b&$[g]))*3,b>>=n[C+1],_-=n[C+1],O=n[C],(O&16)!==0){o=O&15,c=n[C+2],t=Yt;break}if((O&64)===0){i=O,r=C/3+n[C+2];break}return t=We,f.msg="invalid distance code",p=W,l.bitb=b,l.bitk=_,f.avail_in=y,f.total_in+=E-f.next_in_index,f.next_in_index=E,l.write=x,l.inflate_flush(f,p);case Yt:for(g=o;_<g;){if(y!==0)p=v;else return l.bitb=b,l.bitk=_,f.avail_in=y,f.total_in+=E-f.next_in_index,f.next_in_index=E,l.write=x,l.inflate_flush(f,p);y--,b|=(f.read_byte(E++)&255)<<_,_+=8}c+=b&$[g],b>>=g,_-=g,t=Vt;case Vt:for(I=x-c;I<0;)I+=l.end;for(;e!==0;){if(S===0&&(x==l.end&&l.read!==0&&(x=0,S=x<l.read?l.read-x-1:l.end-x),S===0&&(l.write=x,p=l.inflate_flush(f,p),x=l.write,S=x<l.read?l.read-x-1:l.end-x,x==l.end&&l.read!==0&&(x=0,S=x<l.read?l.read-x-1:l.end-x),S===0)))return l.bitb=b,l.bitk=_,f.avail_in=y,f.total_in+=E-f.next_in_index,f.next_in_index=E,l.write=x,l.inflate_flush(f,p);l.win[x++]=l.win[I++],S--,I==l.end&&(I=0),e--}t=He;break;case Zt:if(S===0&&(x==l.end&&l.read!==0&&(x=0,S=x<l.read?l.read-x-1:l.end-x),S===0&&(l.write=x,p=l.inflate_flush(f,p),x=l.write,S=x<l.read?l.read-x-1:l.end-x,x==l.end&&l.read!==0&&(x=0,S=x<l.read?l.read-x-1:l.end-x),S===0)))return l.bitb=b,l.bitk=_,f.avail_in=y,f.total_in+=E-f.next_in_index,f.next_in_index=E,l.write=x,l.inflate_flush(f,p);p=v,l.win[x++]=a,S--,t=He;break;case ze:if(_>7&&(_-=8,y++,E--),l.write=x,p=l.inflate_flush(f,p),x=l.write,S=x<l.read?l.read-x-1:l.end-x,l.read!=l.write)return l.bitb=b,l.bitk=_,f.avail_in=y,f.total_in+=E-f.next_in_index,f.next_in_index=E,l.write=x,l.inflate_flush(f,p);t=Kt;case Kt:return p=ne,l.bitb=b,l.bitk=_,f.avail_in=y,f.total_in+=E-f.next_in_index,f.next_in_index=E,l.write=x,l.inflate_flush(f,p);case We:return p=W,l.bitb=b,l.bitk=_,f.avail_in=y,f.total_in+=E-f.next_in_index,f.next_in_index=E,l.write=x,l.inflate_flush(f,p);default:return p=X,l.bitb=b,l.bitk=_,f.avail_in=y,f.total_in+=E-f.next_in_index,f.next_in_index=E,l.write=x,l.inflate_flush(f,p)}},s.free=function(){}}const Xt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],we=0,et=1,$t=2,Jt=3,Qt=4,zt=5,Be=6,je=7,en=8,he=9;function Dr(s,t){const e=this;let n=we,r=0,i=0,a=0,o;const c=[0],h=[0],d=new Nr;let m=0,w=new Int32Array(jn*3);const T=0,A=new ft;e.bitk=0,e.bitb=0,e.win=new Uint8Array(t),e.end=t,e.read=0,e.write=0,e.reset=function(u,l){l&&(l[0]=T),n==Be&&d.free(u),n=we,e.bitk=0,e.bitb=0,e.read=e.write=0},e.reset(s,null),e.inflate_flush=function(u,l){let f,p,g;return p=u.next_out_index,g=e.read,f=(g<=e.write?e.write:e.end)-g,f>u.avail_out&&(f=u.avail_out),f!==0&&l==se&&(l=v),u.avail_out-=f,u.total_out+=f,u.next_out.set(e.win.subarray(g,g+f),p),p+=f,g+=f,g==e.end&&(g=0,e.write==e.end&&(e.write=0),f=e.write-g,f>u.avail_out&&(f=u.avail_out),f!==0&&l==se&&(l=v),u.avail_out-=f,u.total_out+=f,u.next_out.set(e.win.subarray(g,g+f),p),p+=f,g+=f),u.next_out_index=p,e.read=g,l},e.proc=function(u,l){let f,p,g,C,O,b,_,E;for(C=u.next_in_index,O=u.avail_in,p=e.bitb,g=e.bitk,b=e.write,_=b<e.read?e.read-b-1:e.end-b;;){let y,x,S,I,R,D,k,P;switch(n){case we:for(;g<3;){if(O!==0)l=v;else return e.bitb=p,e.bitk=g,u.avail_in=O,u.total_in+=C-u.next_in_index,u.next_in_index=C,e.write=b,e.inflate_flush(u,l);O--,p|=(u.read_byte(C++)&255)<<g,g+=8}switch(f=p&7,m=f&1,f>>>1){case 0:p>>>=3,g-=3,f=g&7,p>>>=f,g-=f,n=et;break;case 1:y=[],x=[],S=[[]],I=[[]],ft.inflate_trees_fixed(y,x,S,I),d.init(y[0],x[0],S[0],0,I[0],0),p>>>=3,g-=3,n=Be;break;case 2:p>>>=3,g-=3,n=Jt;break;case 3:return p>>>=3,g-=3,n=he,u.msg="invalid block type",l=W,e.bitb=p,e.bitk=g,u.avail_in=O,u.total_in+=C-u.next_in_index,u.next_in_index=C,e.write=b,e.inflate_flush(u,l)}break;case et:for(;g<32;){if(O!==0)l=v;else return e.bitb=p,e.bitk=g,u.avail_in=O,u.total_in+=C-u.next_in_index,u.next_in_index=C,e.write=b,e.inflate_flush(u,l);O--,p|=(u.read_byte(C++)&255)<<g,g+=8}if((~p>>>16&65535)!=(p&65535))return n=he,u.msg="invalid stored block lengths",l=W,e.bitb=p,e.bitk=g,u.avail_in=O,u.total_in+=C-u.next_in_index,u.next_in_index=C,e.write=b,e.inflate_flush(u,l);r=p&65535,p=g=0,n=r!==0?$t:m!==0?je:we;break;case $t:if(O===0||_===0&&(b==e.end&&e.read!==0&&(b=0,_=b<e.read?e.read-b-1:e.end-b),_===0&&(e.write=b,l=e.inflate_flush(u,l),b=e.write,_=b<e.read?e.read-b-1:e.end-b,b==e.end&&e.read!==0&&(b=0,_=b<e.read?e.read-b-1:e.end-b),_===0)))return e.bitb=p,e.bitk=g,u.avail_in=O,u.total_in+=C-u.next_in_index,u.next_in_index=C,e.write=b,e.inflate_flush(u,l);if(l=v,f=r,f>O&&(f=O),f>_&&(f=_),e.win.set(u.read_buf(C,f),b),C+=f,O-=f,b+=f,_-=f,(r-=f)!==0)break;n=m!==0?je:we;break;case Jt:for(;g<14;){if(O!==0)l=v;else return e.bitb=p,e.bitk=g,u.avail_in=O,u.total_in+=C-u.next_in_index,u.next_in_index=C,e.write=b,e.inflate_flush(u,l);O--,p|=(u.read_byte(C++)&255)<<g,g+=8}if(i=f=p&16383,(f&31)>29||(f>>5&31)>29)return n=he,u.msg="too many length or distance symbols",l=W,e.bitb=p,e.bitk=g,u.avail_in=O,u.total_in+=C-u.next_in_index,u.next_in_index=C,e.write=b,e.inflate_flush(u,l);if(f=258+(f&31)+(f>>5&31),!o||o.length<f)o=[];else for(E=0;E<f;E++)o[E]=0;p>>>=14,g-=14,a=0,n=Qt;case Qt:for(;a<4+(i>>>10);){for(;g<3;){if(O!==0)l=v;else return e.bitb=p,e.bitk=g,u.avail_in=O,u.total_in+=C-u.next_in_index,u.next_in_index=C,e.write=b,e.inflate_flush(u,l);O--,p|=(u.read_byte(C++)&255)<<g,g+=8}o[Xt[a++]]=p&7,p>>>=3,g-=3}for(;a<19;)o[Xt[a++]]=0;if(c[0]=7,f=A.inflate_trees_bits(o,c,h,w,u),f!=v)return l=f,l==W&&(o=null,n=he),e.bitb=p,e.bitk=g,u.avail_in=O,u.total_in+=C-u.next_in_index,u.next_in_index=C,e.write=b,e.inflate_flush(u,l);a=0,n=zt;case zt:for(;f=i,!(a>=258+(f&31)+(f>>5&31));){let U,F;for(f=c[0];g<f;){if(O!==0)l=v;else return e.bitb=p,e.bitk=g,u.avail_in=O,u.total_in+=C-u.next_in_index,u.next_in_index=C,e.write=b,e.inflate_flush(u,l);O--,p|=(u.read_byte(C++)&255)<<g,g+=8}if(f=w[(h[0]+(p&$[f]))*3+1],F=w[(h[0]+(p&$[f]))*3+2],F<16)p>>>=f,g-=f,o[a++]=F;else{for(E=F==18?7:F-14,U=F==18?11:3;g<f+E;){if(O!==0)l=v;else return e.bitb=p,e.bitk=g,u.avail_in=O,u.total_in+=C-u.next_in_index,u.next_in_index=C,e.write=b,e.inflate_flush(u,l);O--,p|=(u.read_byte(C++)&255)<<g,g+=8}if(p>>>=f,g-=f,U+=p&$[E],p>>>=E,g-=E,E=a,f=i,E+U>258+(f&31)+(f>>5&31)||F==16&&E<1)return o=null,n=he,u.msg="invalid bit length repeat",l=W,e.bitb=p,e.bitk=g,u.avail_in=O,u.total_in+=C-u.next_in_index,u.next_in_index=C,e.write=b,e.inflate_flush(u,l);F=F==16?o[E-1]:0;do o[E++]=F;while(--U!==0);a=E}}if(h[0]=-1,R=[],D=[],k=[],P=[],R[0]=9,D[0]=6,f=i,f=A.inflate_trees_dynamic(257+(f&31),1+(f>>5&31),o,R,D,k,P,w,u),f!=v)return f==W&&(o=null,n=he),l=f,e.bitb=p,e.bitk=g,u.avail_in=O,u.total_in+=C-u.next_in_index,u.next_in_index=C,e.write=b,e.inflate_flush(u,l);d.init(R[0],D[0],w,k[0],w,P[0]),n=Be;case Be:if(e.bitb=p,e.bitk=g,u.avail_in=O,u.total_in+=C-u.next_in_index,u.next_in_index=C,e.write=b,(l=d.proc(e,u,l))!=ne)return e.inflate_flush(u,l);if(l=v,d.free(u),C=u.next_in_index,O=u.avail_in,p=e.bitb,g=e.bitk,b=e.write,_=b<e.read?e.read-b-1:e.end-b,m===0){n=we;break}n=je;case je:if(e.write=b,l=e.inflate_flush(u,l),b=e.write,_=b<e.read?e.read-b-1:e.end-b,e.read!=e.write)return e.bitb=p,e.bitk=g,u.avail_in=O,u.total_in+=C-u.next_in_index,u.next_in_index=C,e.write=b,e.inflate_flush(u,l);n=en;case en:return l=ne,e.bitb=p,e.bitk=g,u.avail_in=O,u.total_in+=C-u.next_in_index,u.next_in_index=C,e.write=b,e.inflate_flush(u,l);case he:return l=W,e.bitb=p,e.bitk=g,u.avail_in=O,u.total_in+=C-u.next_in_index,u.next_in_index=C,e.write=b,e.inflate_flush(u,l);default:return l=X,e.bitb=p,e.bitk=g,u.avail_in=O,u.total_in+=C-u.next_in_index,u.next_in_index=C,e.write=b,e.inflate_flush(u,l)}}},e.free=function(u){e.reset(u,null),e.win=null,w=null},e.set_dictionary=function(u,l,f){e.win.set(u.subarray(l,l+f),0),e.read=e.write=f},e.sync_point=function(){return n==et?1:0}}const Pr=32,kr=8,Lr=0,tn=1,nn=2,sn=3,rn=4,an=5,tt=6,Se=7,on=12,ae=13,vr=[0,0,255,255];function Fr(){const s=this;s.mode=0,s.method=0,s.was=[0],s.need=0,s.marker=0,s.wbits=0;function t(e){return!e||!e.istate?X:(e.total_in=e.total_out=0,e.msg=null,e.istate.mode=Se,e.istate.blocks.reset(e,null),v)}s.inflateEnd=function(e){return s.blocks&&s.blocks.free(e),s.blocks=null,v},s.inflateInit=function(e,n){return e.msg=null,s.blocks=null,n<8||n>15?(s.inflateEnd(e),X):(s.wbits=n,e.istate.blocks=new Dr(e,1<<n),t(e),v)},s.inflate=function(e,n){let r,i;if(!e||!e.istate||!e.next_in)return X;const a=e.istate;for(n=n==Er?se:v,r=se;;)switch(a.mode){case Lr:if(e.avail_in===0)return r;if(r=n,e.avail_in--,e.total_in++,((a.method=e.read_byte(e.next_in_index++))&15)!=kr){a.mode=ae,e.msg="unknown compression method",a.marker=5;break}if((a.method>>4)+8>a.wbits){a.mode=ae,e.msg="invalid win size",a.marker=5;break}a.mode=tn;case tn:if(e.avail_in===0)return r;if(r=n,e.avail_in--,e.total_in++,i=e.read_byte(e.next_in_index++)&255,((a.method<<8)+i)%31!==0){a.mode=ae,e.msg="incorrect header check",a.marker=5;break}if((i&Pr)===0){a.mode=Se;break}a.mode=nn;case nn:if(e.avail_in===0)return r;r=n,e.avail_in--,e.total_in++,a.need=(e.read_byte(e.next_in_index++)&255)<<24&4278190080,a.mode=sn;case sn:if(e.avail_in===0)return r;r=n,e.avail_in--,e.total_in++,a.need+=(e.read_byte(e.next_in_index++)&255)<<16&16711680,a.mode=rn;case rn:if(e.avail_in===0)return r;r=n,e.avail_in--,e.total_in++,a.need+=(e.read_byte(e.next_in_index++)&255)<<8&65280,a.mode=an;case an:return e.avail_in===0?r:(r=n,e.avail_in--,e.total_in++,a.need+=e.read_byte(e.next_in_index++)&255,a.mode=tt,br);case tt:return a.mode=ae,e.msg="need dictionary",a.marker=0,X;case Se:if(r=a.blocks.proc(e,r),r==W){a.mode=ae,a.marker=0;break}if(r==v&&(r=n),r!=ne)return r;r=n,a.blocks.reset(e,a.was),a.mode=on;case on:return e.avail_in=0,ne;case ae:return W;default:return X}},s.inflateSetDictionary=function(e,n,r){let i=0,a=r;if(!e||!e.istate||e.istate.mode!=tt)return X;const o=e.istate;return a>=1<<o.wbits&&(a=(1<<o.wbits)-1,i=r-a),o.blocks.set_dictionary(n,i,a),o.mode=Se,v},s.inflateSync=function(e){let n,r,i,a,o;if(!e||!e.istate)return X;const c=e.istate;if(c.mode!=ae&&(c.mode=ae,c.marker=0),(n=e.avail_in)===0)return se;for(r=e.next_in_index,i=c.marker;n!==0&&i<4;)e.read_byte(r)==vr[i]?i++:e.read_byte(r)!==0?i=0:i=4-i,r++,n--;return e.total_in+=r-e.next_in_index,e.next_in_index=r,e.avail_in=n,c.marker=i,i!=4?W:(a=e.total_in,o=e.total_out,t(e),e.total_in=a,e.total_out=o,c.mode=Se,v)},s.inflateSyncPoint=function(e){return!e||!e.istate||!e.istate.blocks?X:e.istate.blocks.sync_point()}}function qn(){}qn.prototype={inflateInit(s){const t=this;return t.istate=new Fr,s||(s=gr),t.istate.inflateInit(t,s)},inflate(s){const t=this;return t.istate?t.istate.inflate(t,s):X},inflateEnd(){const s=this;if(!s.istate)return X;const t=s.istate.inflateEnd(s);return s.istate=null,t},inflateSync(){const s=this;return s.istate?s.istate.inflateSync(s):X},inflateSetDictionary(s,t){const e=this;return e.istate?e.istate.inflateSetDictionary(e,s,t):X},read_byte(s){return this.next_in[s]},read_buf(s,t){return this.next_in.subarray(s,s+t)}};function Mr(s){const t=this,e=new qn,n=s&&s.chunkSize?Math.floor(s.chunkSize*2):128*1024,r=yr,i=new Uint8Array(n);let a=!1;e.inflateInit(),e.next_out=i,t.append=function(o,c){const h=[];let d,m,w=0,T=0,A=0;if(o.length!==0){e.next_in_index=0,e.next_in=o,e.avail_in=o.length;do{if(e.next_out_index=0,e.avail_out=n,e.avail_in===0&&!a&&(e.next_in_index=0,a=!0),d=e.inflate(r),a&&d===se){if(e.avail_in!==0)throw new Error("inflating: bad input")}else if(d!==v&&d!==ne)throw new Error("inflating: "+e.msg);if((a||d===ne)&&e.avail_in===o.length)throw new Error("inflating: bad input");e.next_out_index&&(e.next_out_index===n?h.push(new Uint8Array(i)):h.push(i.subarray(0,e.next_out_index))),A+=e.next_out_index,c&&e.next_in_index>0&&e.next_in_index!=w&&(c(e.next_in_index),w=e.next_in_index)}while(e.avail_in>0||e.avail_out===0);return h.length>1?(m=new Uint8Array(A),h.forEach(function(u){m.set(u,T),T+=u.length})):m=h[0]?new Uint8Array(h[0]):new Uint8Array,m}},t.flush=function(){e.inflateEnd()}}const pe=4294967295,le=65535,Ur=8,Hr=0,Wr=99,Br=67324752,Gn=134695760,jr=Gn,cn=33639248,qr=101010256,ln=101075792,Gr=117853008,te=22,nt=20,st=56,Yr=12,Vr=20,fn=4,Zr=1,Kr=39169,Xr=10,$r=1,Jr=21589,Qr=28789,zr=25461,ei=6534,un=1,ti=6,dn=8,_n=2048,hn=16,ni=61440,si=16384,ri=73,pn="/",rt=30,ii=10,ai=14,oi=18,j=void 0,de="undefined",Pe="function";class mn{constructor(t){return class extends TransformStream{constructor(e,n){const r=new t(n);super({transform(i,a){a.enqueue(r.append(i))},flush(i){const a=r.flush();a&&i.enqueue(a)}})}}}}const ci=64;let Yn=2;try{typeof navigator!=de&&navigator.hardwareConcurrency&&(Yn=navigator.hardwareConcurrency)}catch{}const li={chunkSize:512*1024,maxWorkers:Yn,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:j,CompressionStreamNative:typeof CompressionStream!=de&&CompressionStream,DecompressionStreamNative:typeof DecompressionStream!=de&&DecompressionStream},fe=Object.assign({},li);function Vn(){return fe}function fi(s){return Math.max(s.chunkSize,ci)}function Zn(s){const{baseURL:t,chunkSize:e,maxWorkers:n,terminateWorkerTimeout:r,useCompressionStream:i,useWebWorkers:a,Deflate:o,Inflate:c,CompressionStream:h,DecompressionStream:d,workerScripts:m}=s;if(oe("baseURL",t),oe("chunkSize",e),oe("maxWorkers",n),oe("terminateWorkerTimeout",r),oe("useCompressionStream",i),oe("useWebWorkers",a),o&&(fe.CompressionStream=new mn(o)),c&&(fe.DecompressionStream=new mn(c)),oe("CompressionStream",h),oe("DecompressionStream",d),m!==j){const{deflate:w,inflate:T}=m;if((w||T)&&(fe.workerScripts||(fe.workerScripts={})),w){if(!Array.isArray(w))throw new Error("workerScripts.deflate must be an array");fe.workerScripts.deflate=w}if(T){if(!Array.isArray(T))throw new Error("workerScripts.inflate must be an array");fe.workerScripts.inflate=T}}}function oe(s,t){t!==j&&(fe[s]=t)}function ui(){return"application/octet-stream"}const Kn=[];for(let s=0;s<256;s++){let t=s;for(let e=0;e<8;e++)t&1?t=t>>>1^3988292384:t=t>>>1;Kn[s]=t}class Ve{constructor(t){this.crc=t||-1}append(t){let e=this.crc|0;for(let n=0,r=t.length|0;n<r;n++)e=e>>>8^Kn[(e^t[n])&255];this.crc=e}get(){return~this.crc}}class Xn extends TransformStream{constructor(){let t;const e=new Ve;super({transform(n,r){e.append(n),r.enqueue(n)},flush(){const n=new Uint8Array(4);new DataView(n.buffer).setUint32(0,e.get()),t.value=n}}),t=this}}function di(s){if(typeof TextEncoder==de){s=unescape(encodeURIComponent(s));const t=new Uint8Array(s.length);for(let e=0;e<t.length;e++)t[e]=s.charCodeAt(e);return t}else return new TextEncoder().encode(s)}const Z={concat(s,t){if(s.length===0||t.length===0)return s.concat(t);const e=s[s.length-1],n=Z.getPartial(e);return n===32?s.concat(t):Z._shiftRight(t,n,e|0,s.slice(0,s.length-1))},bitLength(s){const t=s.length;if(t===0)return 0;const e=s[t-1];return(t-1)*32+Z.getPartial(e)},clamp(s,t){if(s.length*32<t)return s;s=s.slice(0,Math.ceil(t/32));const e=s.length;return t=t&31,e>0&&t&&(s[e-1]=Z.partial(t,s[e-1]&2147483648>>t-1,1)),s},partial(s,t,e){return s===32?t:(e?t|0:t<<32-s)+s*1099511627776},getPartial(s){return Math.round(s/1099511627776)||32},_shiftRight(s,t,e,n){for(n===void 0&&(n=[]);t>=32;t-=32)n.push(e),e=0;if(t===0)return n.concat(s);for(let a=0;a<s.length;a++)n.push(e|s[a]>>>t),e=s[a]<<32-t;const r=s.length?s[s.length-1]:0,i=Z.getPartial(r);return n.push(Z.partial(t+i&31,t+i>32?e:n.pop(),1)),n}},Ze={bytes:{fromBits(s){const e=Z.bitLength(s)/8,n=new Uint8Array(e);let r;for(let i=0;i<e;i++)(i&3)===0&&(r=s[i/4]),n[i]=r>>>24,r<<=8;return n},toBits(s){const t=[];let e,n=0;for(e=0;e<s.length;e++)n=n<<8|s[e],(e&3)===3&&(t.push(n),n=0);return e&3&&t.push(Z.partial(8*(e&3),n)),t}}},$n={};$n.sha1=class{constructor(s){const t=this;t.blockSize=512,t._init=[1732584193,4023233417,2562383102,271733878,3285377520],t._key=[1518500249,1859775393,2400959708,3395469782],s?(t._h=s._h.slice(0),t._buffer=s._buffer.slice(0),t._length=s._length):t.reset()}reset(){const s=this;return s._h=s._init.slice(0),s._buffer=[],s._length=0,s}update(s){const t=this;typeof s=="string"&&(s=Ze.utf8String.toBits(s));const e=t._buffer=Z.concat(t._buffer,s),n=t._length,r=t._length=n+Z.bitLength(s);if(r>9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const i=new Uint32Array(e);let a=0;for(let o=t.blockSize+n-(t.blockSize+n&t.blockSize-1);o<=r;o+=t.blockSize)t._block(i.subarray(16*a,16*(a+1))),a+=1;return e.splice(0,16*a),t}finalize(){const s=this;let t=s._buffer;const e=s._h;t=Z.concat(t,[Z.partial(1,1)]);for(let n=t.length+2;n&15;n++)t.push(0);for(t.push(Math.floor(s._length/4294967296)),t.push(s._length|0);t.length;)s._block(t.splice(0,16));return s.reset(),e}_f(s,t,e,n){if(s<=19)return t&e|~t&n;if(s<=39)return t^e^n;if(s<=59)return t&e|t&n|e&n;if(s<=79)return t^e^n}_S(s,t){return t<<s|t>>>32-s}_block(s){const t=this,e=t._h,n=Array(80);for(let h=0;h<16;h++)n[h]=s[h];let r=e[0],i=e[1],a=e[2],o=e[3],c=e[4];for(let h=0;h<=79;h++){h>=16&&(n[h]=t._S(1,n[h-3]^n[h-8]^n[h-14]^n[h-16]));const d=t._S(5,r)+t._f(h,i,a,o)+c+n[h]+t._key[Math.floor(h/20)]|0;c=o,o=a,a=t._S(30,i),i=r,r=d}e[0]=e[0]+r|0,e[1]=e[1]+i|0,e[2]=e[2]+a|0,e[3]=e[3]+o|0,e[4]=e[4]+c|0}};const Jn={};Jn.aes=class{constructor(s){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const e=t._tables[0][4],n=t._tables[1],r=s.length;let i,a,o,c=1;if(r!==4&&r!==6&&r!==8)throw new Error("invalid aes key size");for(t._key=[a=s.slice(0),o=[]],i=r;i<4*r+28;i++){let h=a[i-1];(i%r===0||r===8&&i%r===4)&&(h=e[h>>>24]<<24^e[h>>16&255]<<16^e[h>>8&255]<<8^e[h&255],i%r===0&&(h=h<<8^h>>>24^c<<24,c=c<<1^(c>>7)*283)),a[i]=a[i-r]^h}for(let h=0;i;h++,i--){const d=a[h&3?i:i-4];i<=4||h<4?o[h]=d:o[h]=n[0][e[d>>>24]]^n[1][e[d>>16&255]]^n[2][e[d>>8&255]]^n[3][e[d&255]]}}encrypt(s){return this._crypt(s,0)}decrypt(s){return this._crypt(s,1)}_precompute(){const s=this._tables[0],t=this._tables[1],e=s[4],n=t[4],r=[],i=[];let a,o,c,h;for(let d=0;d<256;d++)i[(r[d]=d<<1^(d>>7)*283)^d]=d;for(let d=a=0;!e[d];d^=o||1,a=i[a]||1){let m=a^a<<1^a<<2^a<<3^a<<4;m=m>>8^m&255^99,e[d]=m,n[m]=d,h=r[c=r[o=r[d]]];let w=h*16843009^c*65537^o*257^d*16843008,T=r[m]*257^m*16843008;for(let A=0;A<4;A++)s[A][d]=T=T<<24^T>>>8,t[A][m]=w=w<<24^w>>>8}for(let d=0;d<5;d++)s[d]=s[d].slice(0),t[d]=t[d].slice(0)}_crypt(s,t){if(s.length!==4)throw new Error("invalid aes block size");const e=this._key[t],n=e.length/4-2,r=[0,0,0,0],i=this._tables[t],a=i[0],o=i[1],c=i[2],h=i[3],d=i[4];let m=s[0]^e[0],w=s[t?3:1]^e[1],T=s[2]^e[2],A=s[t?1:3]^e[3],u=4,l,f,p;for(let g=0;g<n;g++)l=a[m>>>24]^o[w>>16&255]^c[T>>8&255]^h[A&255]^e[u],f=a[w>>>24]^o[T>>16&255]^c[A>>8&255]^h[m&255]^e[u+1],p=a[T>>>24]^o[A>>16&255]^c[m>>8&255]^h[w&255]^e[u+2],A=a[A>>>24]^o[m>>16&255]^c[w>>8&255]^h[T&255]^e[u+3],u+=4,m=l,w=f,T=p;for(let g=0;g<4;g++)r[t?3&-g:g]=d[m>>>24]<<24^d[w>>16&255]<<16^d[T>>8&255]<<8^d[A&255]^e[u++],l=m,m=w,w=T,T=A,A=l;return r}};const _i={getRandomValues(s){const t=new Uint32Array(s.buffer),e=n=>{let r=987654321;const i=4294967295;return function(){return r=36969*(r&65535)+(r>>16)&i,n=18e3*(n&65535)+(n>>16)&i,(((r<<16)+n&i)/4294967296+.5)*(Math.random()>.5?1:-1)}};for(let n=0,r;n<s.length;n+=4){const i=e((r||Math.random())*4294967296);r=i()*987654071,t[n/4]=i()*4294967296|0}return s}},Qn={};Qn.ctrGladman=class{constructor(s,t){this._prf=s,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(s){return this.calculate(this._prf,s,this._iv)}incWord(s){if((s>>24&255)===255){let t=s>>16&255,e=s>>8&255,n=s&255;t===255?(t=0,e===255?(e=0,n===255?n=0:++n):++e):++t,s=0,s+=t<<16,s+=e<<8,s+=n}else s+=1<<24;return s}incCounter(s){(s[0]=this.incWord(s[0]))===0&&(s[1]=this.incWord(s[1]))}calculate(s,t,e){let n;if(!(n=t.length))return[];const r=Z.bitLength(t);for(let i=0;i<n;i+=4){this.incCounter(e);const a=s.encrypt(e);t[i]^=a[0],t[i+1]^=a[1],t[i+2]^=a[2],t[i+3]^=a[3]}return Z.clamp(t,r)}};const me={importKey(s){return new me.hmacSha1(Ze.bytes.toBits(s))},pbkdf2(s,t,e,n){if(e=e||1e4,n<0||e<0)throw new Error("invalid params to pbkdf2");const r=(n>>5)+1<<2;let i,a,o,c,h;const d=new ArrayBuffer(r),m=new DataView(d);let w=0;const T=Z;for(t=Ze.bytes.toBits(t),h=1;w<(r||1);h++){for(i=a=s.encrypt(T.concat(t,[h])),o=1;o<e;o++)for(a=s.encrypt(a),c=0;c<a.length;c++)i[c]^=a[c];for(o=0;w<(r||1)&&o<i.length;o++)m.setInt32(w,i[o]),w+=4}return d.slice(0,n/8)}};me.hmacSha1=class{constructor(s){const t=this,e=t._hash=$n.sha1,n=[[],[]];t._baseHash=[new e,new e];const r=t._baseHash[0].blockSize/32;s.length>r&&(s=new e().update(s).finalize());for(let i=0;i<r;i++)n[0][i]=s[i]^909522486,n[1][i]=s[i]^1549556828;t._baseHash[0].update(n[0]),t._baseHash[1].update(n[1]),t._resultHash=new e(t._baseHash[0])}reset(){const s=this;s._resultHash=new s._hash(s._baseHash[0]),s._updated=!1}update(s){const t=this;t._updated=!0,t._resultHash.update(s)}digest(){const s=this,t=s._resultHash.finalize(),e=new s._hash(s._baseHash[1]).update(t).finalize();return s.reset(),e}encrypt(s){if(this._updated)throw new Error("encrypt on already updated hmac called!");return this.update(s),this.digest(s)}};const hi=typeof crypto!=de&&typeof crypto.getRandomValues==Pe,yt="Invalid password",Et="Invalid signature",xt="zipjs-abort-check-password";function zn(s){return hi?crypto.getRandomValues(s):_i.getRandomValues(s)}const ge=16,pi="raw",es={name:"PBKDF2"},mi={name:"HMAC"},wi="SHA-1",gi=Object.assign({hash:mi},es),ut=Object.assign({iterations:1e3,hash:{name:wi}},es),bi=["deriveBits"],Ce=[8,12,16],Re=[16,24,32],ce=10,yi=[0,0,0,0],$e=typeof crypto!=de,ke=$e&&crypto.subtle,ts=$e&&typeof ke!=de,z=Ze.bytes,Ei=Jn.aes,xi=Qn.ctrGladman,Ti=me.hmacSha1;let wn=$e&&ts&&typeof ke.importKey==Pe,gn=$e&&ts&&typeof ke.deriveBits==Pe;class Si extends TransformStream{constructor({password:t,rawPassword:e,signed:n,encryptionStrength:r,checkPasswordOnly:i}){super({start(){Object.assign(this,{ready:new Promise(a=>this.resolveReady=a),password:rs(t,e),signed:n,strength:r-1,pending:new Uint8Array})},async transform(a,o){const c=this,{password:h,strength:d,resolveReady:m,ready:w}=c;h?(await Ai(c,d,h,J(a,0,Ce[d]+2)),a=J(a,Ce[d]+2),i?o.error(new Error(xt)):m()):await w;const T=new Uint8Array(a.length-ce-(a.length-ce)%ge);o.enqueue(ns(c,a,T,0,ce,!0))},async flush(a){const{signed:o,ctr:c,hmac:h,pending:d,ready:m}=this;if(h&&c){await m;const w=J(d,0,d.length-ce),T=J(d,d.length-ce);let A=new Uint8Array;if(w.length){const u=Ne(z,w);h.update(u);const l=c.update(u);A=Ie(z,l)}if(o){const u=J(Ie(z,h.digest()),0,ce);for(let l=0;l<ce;l++)if(u[l]!=T[l])throw new Error(Et)}a.enqueue(A)}}})}}class Ri extends TransformStream{constructor({password:t,rawPassword:e,encryptionStrength:n}){let r;super({start(){Object.assign(this,{ready:new Promise(i=>this.resolveReady=i),password:rs(t,e),strength:n-1,pending:new Uint8Array})},async transform(i,a){const o=this,{password:c,strength:h,resolveReady:d,ready:m}=o;let w=new Uint8Array;c?(w=await Oi(o,h,c),d()):await m;const T=new Uint8Array(w.length+i.length-i.length%ge);T.set(w,0),a.enqueue(ns(o,i,T,w.length,0))},async flush(i){const{ctr:a,hmac:o,pending:c,ready:h}=this;if(o&&a){await h;let d=new Uint8Array;if(c.length){const m=a.update(Ne(z,c));o.update(m),d=Ie(z,m)}r.signature=Ie(z,o.digest()).slice(0,ce),i.enqueue(Tt(d,r.signature))}}}),r=this}}function ns(s,t,e,n,r,i){const{ctr:a,hmac:o,pending:c}=s,h=t.length-r;c.length&&(t=Tt(c,t),e=Ni(e,h-h%ge));let d;for(d=0;d<=h-ge;d+=ge){const m=Ne(z,J(t,d,d+ge));i&&o.update(m);const w=a.update(m);i||o.update(w),e.set(Ie(z,w),d+n)}return s.pending=J(t,d),e}async function Ai(s,t,e,n){const r=await ss(s,t,e,J(n,0,Ce[t])),i=J(n,Ce[t]);if(r[0]!=i[0]||r[1]!=i[1])throw new Error(yt)}async function Oi(s,t,e){const n=zn(new Uint8Array(Ce[t])),r=await ss(s,t,e,n);return Tt(n,r)}async function ss(s,t,e,n){s.password=null;const r=await Ci(pi,e,gi,!1,bi),i=await Ii(Object.assign({salt:n},ut),r,8*(Re[t]*2+2)),a=new Uint8Array(i),o=Ne(z,J(a,0,Re[t])),c=Ne(z,J(a,Re[t],Re[t]*2)),h=J(a,Re[t]*2);return Object.assign(s,{keys:{key:o,authentication:c,passwordVerification:h},ctr:new xi(new Ei(o),Array.from(yi)),hmac:new Ti(c)}),h}async function Ci(s,t,e,n,r){if(wn)try{return await ke.importKey(s,t,e,n,r)}catch{return wn=!1,me.importKey(t)}else return me.importKey(t)}async function Ii(s,t,e){if(gn)try{return await ke.deriveBits(s,t,e)}catch{return gn=!1,me.pbkdf2(t,s.salt,ut.iterations,e)}else return me.pbkdf2(t,s.salt,ut.iterations,e)}function rs(s,t){return t===j?di(s):t}function Tt(s,t){let e=s;return s.length+t.length&&(e=new Uint8Array(s.length+t.length),e.set(s,0),e.set(t,s.length)),e}function Ni(s,t){if(t&&t>s.length){const e=s;s=new Uint8Array(t),s.set(e,0)}return s}function J(s,t,e){return s.subarray(t,e)}function Ie(s,t){return s.fromBits(t)}function Ne(s,t){return s.toBits(t)}const Oe=12;class Di extends TransformStream{constructor({password:t,passwordVerification:e,checkPasswordOnly:n}){super({start(){Object.assign(this,{password:t,passwordVerification:e}),is(this,t)},transform(r,i){const a=this;if(a.password){const o=bn(a,r.subarray(0,Oe));if(a.password=null,o.at(-1)!=a.passwordVerification)throw new Error(yt);r=r.subarray(Oe)}n?i.error(new Error(xt)):i.enqueue(bn(a,r))}})}}class Pi extends TransformStream{constructor({password:t,passwordVerification:e}){super({start(){Object.assign(this,{password:t,passwordVerification:e}),is(this,t)},transform(n,r){const i=this;let a,o;if(i.password){i.password=null;const c=zn(new Uint8Array(Oe));c[Oe-1]=i.passwordVerification,a=new Uint8Array(n.length+c.length),a.set(yn(i,c),0),o=Oe}else a=new Uint8Array(n.length),o=0;a.set(yn(i,n),o),r.enqueue(a)}})}}function bn(s,t){const e=new Uint8Array(t.length);for(let n=0;n<t.length;n++)e[n]=as(s)^t[n],St(s,e[n]);return e}function yn(s,t){const e=new Uint8Array(t.length);for(let n=0;n<t.length;n++)e[n]=as(s)^t[n],St(s,t[n]);return e}function is(s,t){const e=[305419896,591751049,878082192];Object.assign(s,{keys:e,crcKey0:new Ve(e[0]),crcKey2:new Ve(e[2])});for(let n=0;n<t.length;n++)St(s,t.charCodeAt(n))}function St(s,t){let[e,n,r]=s.keys;s.crcKey0.append([t]),e=~s.crcKey0.get(),n=En(Math.imul(En(n+os(e)),134775813)+1),s.crcKey2.append([n>>>24]),r=~s.crcKey2.get(),s.keys=[e,n,r]}function as(s){const t=s.keys[2]|2;return os(Math.imul(t,t^1)>>>8)}function os(s){return s&255}function En(s){return s&4294967295}const Rt="Invalid uncompressed size",xn="deflate-raw";class ki extends TransformStream{constructor(t,{chunkSize:e,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:i,encrypted:a,useCompressionStream:o,zipCrypto:c,signed:h,level:d}=t,m=this;let w,T,A=super.readable;(!a||c)&&h&&(w=new Xn,A=re(A,w)),i&&(A=ls(A,o,{level:d,chunkSize:e},r,n)),a&&(c?A=re(A,new Pi(t)):(T=new Ri(t),A=re(A,T))),cs(m,A,()=>{let u;a&&!c&&(u=T.signature),(!a||c)&&h&&(u=new DataView(w.value.buffer).getUint32(0)),m.signature=u})}}class Li extends TransformStream{constructor(t,{chunkSize:e,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:a,signed:o,signature:c,compressed:h,useCompressionStream:d}=t;let m,w,T=super.readable;a&&(i?T=re(T,new Di(t)):(w=new Si(t),T=re(T,w))),h&&(T=ls(T,d,{chunkSize:e},r,n)),(!a||i)&&o&&(m=new Xn,T=re(T,m)),cs(this,T,()=>{if((!a||i)&&o){const A=new DataView(m.value.buffer);if(c!=A.getUint32(0,!1))throw new Error(Et)}})}}function cs(s,t,e){t=re(t,new TransformStream({flush:e})),Object.defineProperty(s,"readable",{get(){return t}})}function ls(s,t,e,n,r){try{const i=t&&n?n:r;s=re(s,new i(xn,e))}catch(i){if(t)s=re(s,new r(xn,e));else throw i}return s}function re(s,t){return s.pipeThrough(t)}const vi="message",Fi="start",Mi="pull",Tn="data",Ui="ack",Sn="close",Hi="deflate",fs="inflate";class Wi extends TransformStream{constructor(t,e){super({});const n=this,{codecType:r}=t;let i;r.startsWith(Hi)?i=ki:r.startsWith(fs)&&(i=Li),n.outputSize=0;let a=0;const o=new i(t,e),c=super.readable,h=new TransformStream({transform(m,w){m&&m.length&&(a+=m.length,w.enqueue(m))},flush(){Object.assign(n,{inputSize:a})}}),d=new TransformStream({transform(m,w){if(m&&m.length&&(w.enqueue(m),n.outputSize+=m.length,t.outputSize&&n.outputSize>t.outputSize))throw new Error(Rt)},flush(){const{signature:m}=o;Object.assign(n,{signature:m,inputSize:a})}});Object.defineProperty(n,"readable",{get(){return c.pipeThrough(h).pipeThrough(o).pipeThrough(d)}})}}class Bi extends TransformStream{constructor(t){let e;super({transform:n,flush(r){e&&e.length&&r.enqueue(e)}});function n(r,i){if(e){const a=new Uint8Array(e.length+r.length);a.set(e),a.set(r,e.length),r=a,e=null}r.length>t?(i.enqueue(r.slice(0,t)),n(r.slice(t),i)):e=r}}}let us=typeof Worker!=de;class it{constructor(t,{readable:e,writable:n},{options:r,config:i,streamOptions:a,useWebWorkers:o,transferStreams:c,scripts:h},d){const{signal:m}=a;return Object.assign(t,{busy:!0,readable:e.pipeThrough(new Bi(i.chunkSize)).pipeThrough(new ji(a),{signal:m}),writable:n,options:Object.assign({},r),scripts:h,transferStreams:c,terminate(){return new Promise(w=>{const{worker:T,busy:A}=t;T?(A?t.resolveTerminated=w:(T.terminate(),w()),t.interface=null):w()})},onTaskFinished(){const{resolveTerminated:w}=t;w&&(t.resolveTerminated=null,t.terminated=!0,t.worker.terminate(),w()),t.busy=!1,d(t)}}),(o&&us?qi:ds)(t,i)}}class ji extends TransformStream{constructor({onstart:t,onprogress:e,size:n,onend:r}){let i=0;super({async start(){t&&await at(t,n)},async transform(a,o){i+=a.length,e&&await at(e,i,n),o.enqueue(a)},async flush(){r&&await at(r,i)}})}}async function at(s,...t){try{await s(...t)}catch{}}function ds(s,t){return{run:()=>Gi(s,t)}}function qi(s,t){const{baseURL:e,chunkSize:n}=t;if(!s.interface){let r;try{r=Zi(s.scripts[0],e,s)}catch{return us=!1,ds(s,t)}Object.assign(s,{worker:r,interface:{run:()=>Yi(s,{chunkSize:n})}})}return s.interface}async function Gi({options:s,readable:t,writable:e,onTaskFinished:n},r){let i;try{i=new Wi(s,r),await t.pipeThrough(i).pipeTo(e,{preventClose:!0,preventAbort:!0});const{signature:a,inputSize:o,outputSize:c}=i;return{signature:a,inputSize:o,outputSize:c}}catch(a){throw i&&(a.outputSize=i.outputSize),a}finally{n()}}async function Yi(s,t){let e,n;const r=new Promise((w,T)=>{e=w,n=T});Object.assign(s,{reader:null,writer:null,resolveResult:e,rejectResult:n,result:r});const{readable:i,options:a,scripts:o}=s,{writable:c,closed:h}=Vi(s.writable),d=qe({type:Fi,scripts:o.slice(1),options:a,config:t,readable:i,writable:c},s);d||Object.assign(s,{reader:i.getReader(),writer:c.getWriter()});const m=await r;return d||await c.getWriter().close(),await h,m}function Vi(s){let t;const e=new Promise(r=>t=r);return{writable:new WritableStream({async write(r){const i=s.getWriter();await i.ready,await i.write(r),i.releaseLock()},close(){t()},abort(r){return s.getWriter().abort(r)}}),closed:e}}let Rn=!0,An=!0;function Zi(s,t,e){const n={type:"module"};let r,i;typeof s==Pe&&(s=s());try{r=new URL(s,t)}catch{r=s}if(Rn)try{i=new Worker(r)}catch{Rn=!1,i=new Worker(r,n)}else i=new Worker(r,n);return i.addEventListener(vi,a=>Ki(a,e)),i}function qe(s,{worker:t,writer:e,onTaskFinished:n,transferStreams:r}){try{const{value:i,readable:a,writable:o}=s,c=[];if(i&&(i.byteLength<i.buffer.byteLength?s.value=i.buffer.slice(0,i.byteLength):s.value=i.buffer,c.push(s.value)),r&&An?(a&&c.push(a),o&&c.push(o)):s.readable=s.writable=null,c.length)try{return t.postMessage(s,c),!0}catch{An=!1,s.readable=s.writable=null,t.postMessage(s)}else t.postMessage(s)}catch(i){throw e&&e.releaseLock(),n(),i}}async function Ki({data:s},t){const{type:e,value:n,messageId:r,result:i,error:a}=s,{reader:o,writer:c,resolveResult:h,rejectResult:d,onTaskFinished:m}=t;try{if(a){const{message:T,stack:A,code:u,name:l,outputSize:f}=a,p=new Error(T);Object.assign(p,{stack:A,code:u,name:l,outputSize:f}),w(p)}else{if(e==Mi){const{value:T,done:A}=await o.read();qe({type:Tn,value:T,done:A,messageId:r},t)}e==Tn&&(await c.ready,await c.write(new Uint8Array(n)),qe({type:Ui,messageId:r},t)),e==Sn&&w(null,i)}}catch(T){qe({type:Sn,messageId:r},t),w(T)}function w(T,A){T?d(T):h(A),c&&c.releaseLock(),m()}}let ue=[];const ot=[];let On=0;async function Xi(s,t){const{options:e,config:n}=t,{transferStreams:r,useWebWorkers:i,useCompressionStream:a,codecType:o,compressed:c,signed:h,encrypted:d}=e,{workerScripts:m,maxWorkers:w}=n;t.transferStreams=r||r===j;const T=!c&&!h&&!d&&!t.transferStreams;return t.useWebWorkers=!T&&(i||i===j&&n.useWebWorkers),t.scripts=t.useWebWorkers&&m?m[o]:[],e.useCompressionStream=a||a===j&&n.useCompressionStream,(await A()).run();async function A(){const l=ue.find(f=>!f.busy);if(l)return dt(l),new it(l,s,t,u);if(ue.length<w){const f={indexWorker:On};return On++,ue.push(f),new it(f,s,t,u)}else return new Promise(f=>ot.push({resolve:f,stream:s,workerOptions:t}))}function u(l){if(ot.length){const[{resolve:f,stream:p,workerOptions:g}]=ot.splice(0,1);f(new it(l,p,g,u))}else l.worker?(dt(l),$i(l,t)):ue=ue.filter(f=>f!=l)}}function $i(s,t){const{config:e}=t,{terminateWorkerTimeout:n}=e;Number.isFinite(n)&&n>=0&&(s.terminated?s.terminated=!1:s.terminateTimeout=setTimeout(async()=>{ue=ue.filter(r=>r!=s);try{await s.terminate()}catch{}},n))}function dt(s){const{terminateTimeout:t}=s;t&&(clearTimeout(t),s.terminateTimeout=null)}async function Ji(){await Promise.allSettled(ue.map(s=>(dt(s),s.terminate())))}const _s="HTTP error ",Le="HTTP Range not supported",hs="Writer iterator completed too soon",ps="Writer not initialized",Qi="text/plain",zi="Content-Length",ea="Content-Range",ta="Accept-Ranges",na="Range",sa="Content-Type",ra="HEAD",At="GET",ms="bytes",ia=64*1024,Ot="writable";class Je{constructor(){this.size=0}init(){this.initialized=!0}}class _e extends Je{get readable(){const t=this,{chunkSize:e=ia}=t,n=new ReadableStream({start(){this.chunkOffset=0},async pull(r){const{offset:i=0,size:a,diskNumberStart:o}=n,{chunkOffset:c}=this,h=a===j?e:Math.min(e,a-c),d=await G(t,i+c,h,o);r.enqueue(d),c+e>a||a===j&&!d.length&&h?r.close():this.chunkOffset+=e}});return n}}class Ct extends Je{constructor(){super();const t=this,e=new WritableStream({write(n){if(!t.initialized)throw new Error(ps);return t.writeUint8Array(n)}});Object.defineProperty(t,Ot,{get(){return e}})}writeUint8Array(){}}class aa extends _e{constructor(t){super();let e=t.length;for(;t.charAt(e-1)=="=";)e--;const n=t.indexOf(",")+1;Object.assign(this,{dataURI:t,dataStart:n,size:Math.floor((e-n)*.75)})}readUint8Array(t,e){const{dataStart:n,dataURI:r}=this,i=new Uint8Array(e),a=Math.floor(t/3)*4,o=atob(r.substring(a+n,Math.ceil((t+e)/3)*4+n)),c=t-Math.floor(a/4)*3;let h=0;for(let d=c;d<c+e&&d<o.length;d++)i[d-c]=o.charCodeAt(d),h++;return h<i.length?i.subarray(0,h):i}}class oa extends Ct{constructor(t){super(),Object.assign(this,{data:"data:"+(t||"")+";base64,",pending:[]})}writeUint8Array(t){const e=this;let n=0,r=e.pending;const i=e.pending.length;for(e.pending="",n=0;n<Math.floor((i+t.length)/3)*3-i;n++)r+=String.fromCharCode(t[n]);for(;n<t.length;n++)e.pending+=String.fromCharCode(t[n]);r.length&&(r.length>2?e.data+=btoa(r):e.pending+=r)}getData(){return this.data+btoa(this.pending)}}class It extends _e{constructor(t){super(),Object.assign(this,{blob:t,size:t.size})}async readUint8Array(t,e){const n=this,r=t+e;let a=await(t||r<n.size?n.blob.slice(t,r):n.blob).arrayBuffer();return a.byteLength>e&&(a=a.slice(t,r)),new Uint8Array(a)}}class ws extends Je{constructor(t){super();const e=this,n=new TransformStream,r=[];t&&r.push([sa,t]),Object.defineProperty(e,Ot,{get(){return n.writable}}),e.blob=new Response(n.readable,{headers:r}).blob()}getData(){return this.blob}}class ca extends It{constructor(t){super(new Blob([t],{type:Qi}))}}class la extends ws{constructor(t){super(t),Object.assign(this,{encoding:t,utf8:!t||t.toLowerCase()=="utf-8"})}async getData(){const{encoding:t,utf8:e}=this,n=await super.getData();if(n.text&&e)return n.text();{const r=new FileReader;return new Promise((i,a)=>{Object.assign(r,{onload:({target:o})=>i(o.result),onerror:()=>a(r.error)}),r.readAsText(n,t)})}}}class fa extends _e{constructor(t,e){super(),gs(this,t,e)}async init(){await bs(this,_t,Cn),super.init()}readUint8Array(t,e){return ys(this,t,e,_t,Cn)}}class ua extends _e{constructor(t,e){super(),gs(this,t,e)}async init(){await bs(this,ht,In),super.init()}readUint8Array(t,e){return ys(this,t,e,ht,In)}}function gs(s,t,e){const{preventHeadRequest:n,useRangeHeader:r,forceRangeRequests:i,combineSizeEocd:a}=e;e=Object.assign({},e),delete e.preventHeadRequest,delete e.useRangeHeader,delete e.forceRangeRequests,delete e.combineSizeEocd,delete e.useXHR,Object.assign(s,{url:t,options:e,preventHeadRequest:n,useRangeHeader:r,forceRangeRequests:i,combineSizeEocd:a})}async function bs(s,t,e){const{url:n,preventHeadRequest:r,useRangeHeader:i,forceRangeRequests:a,combineSizeEocd:o}=s;if(pa(n)&&(i||a)&&(typeof r>"u"||r)){const c=await t(At,s,Es(s,o?-te:void 0));if(!a&&c.headers.get(ta)!=ms)throw new Error(Le);{o&&(s.eocdCache=new Uint8Array(await c.arrayBuffer()));let h;const d=c.headers.get(ea);if(d){const m=d.trim().split(/\s*\/\s*/);if(m.length){const w=m[1];w&&w!="*"&&(h=Number(w))}}h===j?await Nn(s,t,e):s.size=h}}else await Nn(s,t,e)}async function ys(s,t,e,n,r){const{useRangeHeader:i,forceRangeRequests:a,eocdCache:o,size:c,options:h}=s;if(i||a){if(o&&t==c-te&&e==te)return o;if(t>=c)return new Uint8Array;{t+e>c&&(e=c-t);const d=await n(At,s,Es(s,t,e));if(d.status!=206)throw new Error(Le);return new Uint8Array(await d.arrayBuffer())}}else{const{data:d}=s;return d||await r(s,h),new Uint8Array(s.data.subarray(t,t+e))}}function Es(s,t=0,e=1){return Object.assign({},Nt(s),{[na]:ms+"="+(t<0?t:t+"-"+(t+e-1))})}function Nt({options:s}){const{headers:t}=s;if(t)return Symbol.iterator in t?Object.fromEntries(t):t}async function Cn(s){await xs(s,_t)}async function In(s){await xs(s,ht)}async function xs(s,t){const e=await t(At,s,Nt(s));s.data=new Uint8Array(await e.arrayBuffer()),s.size||(s.size=s.data.length)}async function Nn(s,t,e){if(s.preventHeadRequest)await e(s,s.options);else{const r=(await t(ra,s,Nt(s))).headers.get(zi);r?s.size=Number(r):await e(s,s.options)}}async function _t(s,{options:t,url:e},n){const r=await fetch(e,Object.assign({},t,{method:s,headers:n}));if(r.status<400)return r;throw r.status==416?new Error(Le):new Error(_s+(r.statusText||r.status))}function ht(s,{url:t},e){return new Promise((n,r)=>{const i=new XMLHttpRequest;if(i.addEventListener("load",()=>{if(i.status<400){const a=[];i.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach(o=>{const c=o.trim().split(/\s*:\s*/);c[0]=c[0].trim().replace(/^[a-z]|-[a-z]/g,h=>h.toUpperCase()),a.push(c)}),n({status:i.status,arrayBuffer:()=>i.response,headers:new Map(a)})}else r(i.status==416?new Error(Le):new Error(_s+(i.statusText||i.status)))},!1),i.addEventListener("error",a=>r(a.detail?a.detail.error:new Error("Network error")),!1),i.open(s,t),e)for(const a of Object.entries(e))i.setRequestHeader(a[0],a[1]);i.responseType="arraybuffer",i.send()})}class Ts extends _e{constructor(t,e={}){super(),Object.assign(this,{url:t,reader:e.useXHR?new ua(t,e):new fa(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 da extends Ts{constructor(t,e={}){e.useRangeHeader=!0,super(t,e)}}class _a extends _e{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 ha extends Ct{init(t=0){Object.assign(this,{offset:0,array:new Uint8Array(t)}),super.init()}writeUint8Array(t){const e=this;if(e.offset+t.length>e.array.length){const n=e.array;e.array=new Uint8Array(n.length+t.length),e.array.set(n)}e.array.set(t,e.offset),e.offset+=t.length}getData(){return this.array}}class Dt extends _e{constructor(t){super(),this.readers=t}async init(){const t=this,{readers:e}=t;t.lastDiskNumber=0,t.lastDiskOffset=0,await Promise.all(e.map(async(n,r)=>{await n.init(),r!=e.length-1&&(t.lastDiskOffset+=n.size),t.size+=n.size})),super.init()}async readUint8Array(t,e,n=0){const r=this,{readers:i}=this;let a,o=n;o==-1&&(o=i.length-1);let c=t;for(;i[o]&&c>=i[o].size;)c-=i[o].size,o++;const h=i[o];if(h){const d=h.size;if(c+e<=d)a=await G(h,c,e);else{const m=d-c;a=new Uint8Array(e);const w=await G(h,c,m);a.set(w,0);const T=await r.readUint8Array(t+m,e-m,n);a.set(T,m),w.length+T.length<e&&(a=a.subarray(0,w.length+T.length))}}else a=new Uint8Array;return r.lastDiskNumber=Math.max(o,r.lastDiskNumber),a}}class Ke extends Je{constructor(t,e=4294967295){super();const n=this;Object.assign(n,{diskNumber:0,diskOffset:0,size:0,maxSize:e,availableSize:e});let r,i,a;const o=new WritableStream({async write(d){const{availableSize:m}=n;if(a)d.length>=m?(await c(d.subarray(0,m)),await h(),n.diskOffset+=r.size,n.diskNumber++,a=null,await this.write(d.subarray(m))):await c(d);else{const{value:w,done:T}=await t.next();if(T&&!w)throw new Error(hs);r=w,r.size=0,r.maxSize&&(n.maxSize=r.maxSize),n.availableSize=n.maxSize,await De(r),i=w.writable,a=i.getWriter(),await this.write(d)}},async close(){await a.ready,await h()}});Object.defineProperty(n,Ot,{get(){return o}});async function c(d){const m=d.length;m&&(await a.ready,await a.write(d),r.size+=m,n.size+=m,n.availableSize-=m)}async function h(){await a.close()}}}class Ss{constructor(t){return Array.isArray(t)&&(t=new Dt(t)),t instanceof ReadableStream&&(t={readable:t}),t}}class Rs{constructor(t){return t.writable===j&&typeof t.next==Pe&&(t=new Ke(t)),t instanceof WritableStream&&(t={writable:t}),t.size===j&&(t.size=0),t instanceof Ke||Object.assign(t,{diskNumber:0,diskOffset:0,availableSize:1/0,maxSize:1/0}),t}}function pa(s){const{baseURL:t}=Vn(),{protocol:e}=new URL(s,t);return e=="http:"||e=="https:"}async function De(s,t){if(s.init&&!s.initialized)await s.init(t);else return Promise.resolve()}function G(s,t,e,n){return s.readUint8Array(t,e,n)}const ma=Dt,wa=Ke,As="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split(""),ga=As.length==256;function ba(s){if(ga){let t="";for(let e=0;e<s.length;e++)t+=As[s[e]];return t}else return new TextDecoder().decode(s)}function Ge(s,t){return t&&t.trim().toLowerCase()=="cp437"?ba(s):new TextDecoder(t).decode(s)}const Os="filename",Cs="rawFilename",Is="comment",Ns="rawComment",Ds="uncompressedSize",Ps="compressedSize",ks="offset",pt="diskNumberStart",mt="lastModDate",wt="rawLastModDate",Ls="lastAccessDate",ya="rawLastAccessDate",vs="creationDate",Ea="rawCreationDate",xa="internalFileAttribute",Ta="internalFileAttributes",Sa="externalFileAttribute",Ra="externalFileAttributes",Aa="msDosCompatible",Oa="zip64",Ca="encrypted",Ia="version",Na="versionMadeBy",Da="zipCrypto",Pa="directory",ka="executable",La="compressionMethod",va="signature",Fa="extraField",Ma=[Os,Cs,Ps,Ds,mt,wt,Is,Ns,Ls,vs,ks,pt,pt,xa,Ta,Sa,Ra,Aa,Oa,Ca,Ia,Na,Da,Pa,ka,La,va,Fa,"bitFlag","filenameUTF8","commentUTF8","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp"];class Dn{constructor(t){Ma.forEach(e=>this[e]=t[e])}}const Ua="filenameEncoding",Ha="commentEncoding",Wa="decodeText",Ba="extractPrependedData",ja="extractAppendedData",qa="password",Ga="rawPassword",Ya="passThrough",Va="signal",Za="checkPasswordOnly",Ka="checkOverlappingEntryOnly",Xa="checkOverlappingEntry",$a="checkSignature",Ja="useWebWorkers",Qa="useCompressionStream",za="transferStreams",eo="preventClose",Ye="File format is not recognized",Fs="End of central directory not found",Ms="End of Zip64 central directory locator not found",Us="Central directory header not found",Hs="Local file header not found",Ws="Zip64 extra field not found",Bs="File contains encrypted entry",js="Encryption method not supported",gt="Compression method not supported",bt="Split zip file",qs="Overlapping entry found",Pn="utf-8",kn="cp437",to=[[Ds,pe],[Ps,pe],[ks,pe],[pt,le]],no={[le]:{getValue:H,bytes:4},[pe]:{getValue:ye,bytes:8}};class Gs{constructor(t,e={}){Object.assign(this,{reader:new Ss(t),options:e,config:Vn(),readRanges:[]})}async*getEntriesGenerator(t={}){const e=this;let{reader:n}=e;const{config:r}=e;if(await De(n),(n.size===j||!n.readUint8Array)&&(n=new It(await new Response(n.readable).blob()),await De(n)),n.size<te)throw new Error(Ye);n.chunkSize=fi(r);const i=await fo(n,qr,n.size,te,le*16);if(!i){const x=await G(n,0,4),S=B(x);throw H(S)==Gn?new Error(bt):new Error(Fs)}const a=B(i);let o=H(a,12),c=H(a,16);const h=i.offset,d=Y(a,20),m=h+te+d;let w=Y(a,4);const T=n.lastDiskNumber||0;let A=Y(a,6),u=Y(a,8),l=0,f=0;if(c==pe||o==pe||u==le||A==le){const x=await G(n,i.offset-nt,nt),S=B(x);if(H(S,0)==Gr){c=ye(S,8);let I=await G(n,c,st,-1),R=B(I);const D=i.offset-nt-st;if(H(R,0)!=ln&&c!=D){const k=c;c=D,c>k&&(l=c-k),I=await G(n,c,st,-1),R=B(I)}if(H(R,0)!=ln)throw new Error(Ms);w==le&&(w=H(R,16)),A==le&&(A=H(R,20)),u==le&&(u=ye(R,32)),o==pe&&(o=ye(R,40)),c-=o}}if(c>=n.size&&(l=n.size-c-o-te,c=n.size-o-te),T!=w)throw new Error(bt);if(c<0)throw new Error(Ye);let p=0,g=await G(n,c,o,A),C=B(g);if(o){const x=i.offset-o;if(H(C,p)!=cn&&c!=x){const S=c;c=x,c>S&&(l+=c-S),g=await G(n,c,o,A),C=B(g)}}const O=i.offset-c-(n.lastDiskOffset||0);if(o!=O&&O>=0&&(o=O,g=await G(n,c,o,A),C=B(g)),c<0||c>=n.size)throw new Error(Ye);const b=V(e,t,Ua),_=V(e,t,Ha);for(let x=0;x<u;x++){const S=new ro(n,r,e.options);if(H(C,p)!=cn)throw new Error(Us);Ys(S,C,p+6);const I=!!S.bitFlag.languageEncodingFlag,R=p+46,D=R+S.filenameLength,k=D+S.extraFieldLength,P=Y(C,p+4),U=P>>8==0,F=P>>8==3,q=g.subarray(R,D),N=Y(C,p+32),K=k+N,L=g.subarray(k,K),M=I,ve=I,xe=H(C,p+38),ee=U&&(be(C,p+38)&hn)==hn||F&&(xe>>16&ni)==si||q.length&&q.at(-1)==pn.charCodeAt(0),Q=F&&(xe>>16&ri)!=0,Pt=H(C,p+42)+l;Object.assign(S,{versionMadeBy:P,msDosCompatible:U,compressedSize:0,uncompressedSize:0,commentLength:N,directory:ee,offset:Pt,diskNumberStart:Y(C,p+34),internalFileAttributes:Y(C,p+36),externalFileAttributes:xe,rawFilename:q,filenameUTF8:M,commentUTF8:ve,rawExtraField:g.subarray(D,k),executable:Q}),S.internalFileAttribute=S.internalFileAttributes,S.externalFileAttribute=S.externalFileAttributes;const kt=V(e,t,Wa)||Ge,Lt=M?Pn:b||kn,vt=ve?Pn:_||kn;let Fe=kt(q,Lt);Fe===j&&(Fe=Ge(q,Lt));let Qe=kt(L,vt);Qe===j&&(Qe=Ge(L,vt)),Object.assign(S,{rawComment:L,filename:Fe,comment:Qe,directory:ee||Fe.endsWith(pn)}),f=Math.max(Pt,f),Vs(S,S,C,p+6),S.zipCrypto=S.encrypted&&!S.extraFieldAES;const Te=new Dn(S);Te.getData=(Me,Ue)=>S.getData(Me,Te,e.readRanges,Ue),Te.arrayBuffer=async Me=>{const Ue=new TransformStream,[Ks]=await Promise.all([new Response(Ue.readable).arrayBuffer(),S.getData(Ue,Te,e.readRanges,Me)]);return Ks},p=K;const{onprogress:Ft}=t;if(Ft)try{await Ft(x+1,u,new Dn(S))}catch{}yield Te}const E=V(e,t,Ba),y=V(e,t,ja);return E&&(e.prependedData=f>0?await G(n,0,f):new Uint8Array),e.comment=d?await G(n,h+te,d):new Uint8Array,y&&(e.appendedData=m<n.size?await G(n,m,n.size-m):new Uint8Array),!0}async getEntries(t={}){const e=[];for await(const n of this.getEntriesGenerator(t))e.push(n);return e}async close(){}}class so{constructor(t={}){const{readable:e,writable:n}=new TransformStream,r=new Gs(e,t).getEntriesGenerator();this.readable=new ReadableStream({async pull(i){const{done:a,value:o}=await r.next();if(a)return i.close();const c={...o,readable:(function(){const{readable:h,writable:d}=new TransformStream;if(o.getData)return o.getData(d),h})()};delete c.getData,i.enqueue(c)}}),this.writable=n}}class ro{constructor(t,e,n){Object.assign(this,{reader:t,config:e,options:n})}async getData(t,e,n,r={}){const i=this,{reader:a,offset:o,diskNumberStart:c,extraFieldAES:h,extraFieldZip64:d,compressionMethod:m,config:w,bitFlag:T,signature:A,rawLastModDate:u,uncompressedSize:l,compressedSize:f}=i,{dataDescriptor:p}=T,g=e.localDirectory={},C=await G(a,o,rt,c),O=B(C);let b=V(i,r,qa),_=V(i,r,Ga);const E=V(i,r,Ya);if(b=b&&b.length&&b,_=_&&_.length&&_,h&&h.originalCompressionMethod!=Wr)throw new Error(gt);if(m!=Hr&&m!=Ur&&!E)throw new Error(gt);if(H(O,0)!=Br)throw new Error(Hs);Ys(g,O,4);const{extraFieldLength:y,filenameLength:x,lastAccessDate:S,creationDate:I}=g;g.rawExtraField=y?await G(a,o+rt+x,y,c):new Uint8Array,Vs(i,g,O,4,!0),Object.assign(e,{lastAccessDate:S,creationDate:I});const R=i.encrypted&&g.encrypted&&!E,D=R&&!h;if(E||(e.zipCrypto=D),R){if(!D&&h.strength===j)throw new Error(js);if(!b&&!_)throw new Error(Bs)}const k=o+rt+x+y,P=f,U=a.readable;Object.assign(U,{diskNumberStart:c,offset:k,size:P});const F=V(i,r,Va),q=V(i,r,Za);let N=V(i,r,Xa);const K=V(i,r,Ka);K&&(N=!0);const{onstart:L,onprogress:M,onend:ve}=r,xe={options:{codecType:fs,password:b,rawPassword:_,zipCrypto:D,encryptionStrength:h&&h.strength,signed:V(i,r,$a)&&!E,passwordVerification:D&&(p?u>>>8&255:A>>>24&255),outputSize:l,signature:A,compressed:m!=0&&!E,encrypted:i.encrypted&&!E,useWebWorkers:V(i,r,Ja),useCompressionStream:V(i,r,Qa),transferStreams:V(i,r,za),checkPasswordOnly:q},config:w,streamOptions:{signal:F,size:P,onstart:L,onprogress:M,onend:ve}};N&&await lo({reader:a,fileEntry:e,offset:o,diskNumberStart:c,signature:A,compressedSize:f,uncompressedSize:l,dataOffset:k,dataDescriptor:p||g.bitFlag.dataDescriptor,extraFieldZip64:d||g.extraFieldZip64,readRanges:n});let ee;try{if(!K){q&&(t=new WritableStream),t=new Rs(t),await De(t,E?f:l),{writable:ee}=t;const{outputSize:Q}=await Xi({readable:U,writable:ee},xe);if(t.size+=Q,Q!=(E?f:l))throw new Error(Rt)}}catch(Q){if(Q.outputSize!==j&&(t.size+=Q.outputSize),!q||Q.message!=xt)throw Q}finally{!V(i,r,eo)&&ee&&!ee.locked&&await ee.getWriter().close()}return q||K?j:t.getData?t.getData():ee}}function Ys(s,t,e){const n=s.rawBitFlag=Y(t,e+2),r=(n&un)==un,i=H(t,e+6);Object.assign(s,{encrypted:r,version:Y(t,e),bitFlag:{level:(n&ti)>>1,dataDescriptor:(n&dn)==dn,languageEncodingFlag:(n&_n)==_n},rawLastModDate:i,lastModDate:uo(i),filenameLength:Y(t,e+22),extraFieldLength:Y(t,e+24)})}function Vs(s,t,e,n,r){const{rawExtraField:i}=t,a=t.extraField=new Map,o=B(new Uint8Array(i));let c=0;try{for(;c<i.length;){const f=Y(o,c),p=Y(o,c+2);a.set(f,{type:f,data:i.slice(c+4,c+4+p)}),c+=4+p}}catch{}const h=Y(e,n+4);Object.assign(t,{signature:H(e,n+ii),compressedSize:H(e,n+ai),uncompressedSize:H(e,n+oi)});const d=a.get(Zr);d&&(io(d,t),t.extraFieldZip64=d);const m=a.get(Qr);m&&(Ln(m,Os,Cs,t,s),t.extraFieldUnicodePath=m);const w=a.get(zr);w&&(Ln(w,Is,Ns,t,s),t.extraFieldUnicodeComment=w);const T=a.get(Kr);T?(ao(T,t,h),t.extraFieldAES=T):t.compressionMethod=h;const A=a.get(Xr);A&&(oo(A,t),t.extraFieldNTFS=A);const u=a.get(Jr);u&&(co(u,t,r),t.extraFieldExtendedTimestamp=u);const l=a.get(ei);l&&(t.extraFieldUSDZ=l)}function io(s,t){t.zip64=!0;const e=B(s.data),n=to.filter(([r,i])=>t[r]==i);for(let r=0,i=0;r<n.length;r++){const[a,o]=n[r];if(t[a]==o){const c=no[o];t[a]=s[a]=c.getValue(e,i),i+=c.bytes}else if(s[a])throw new Error(Ws)}}function Ln(s,t,e,n,r){const i=B(s.data),a=new Ve;a.append(r[e]);const o=B(new Uint8Array(4));o.setUint32(0,a.get(),!0);const c=H(i,1);Object.assign(s,{version:be(i,0),[t]:Ge(s.data.subarray(5)),valid:!r.bitFlag.languageEncodingFlag&&c==H(o,0)}),s.valid&&(n[t]=s[t],n[t+"UTF8"]=!0)}function ao(s,t,e){const n=B(s.data),r=be(n,4);Object.assign(s,{vendorVersion:be(n,0),vendorId:be(n,2),strength:r,originalCompressionMethod:e,compressionMethod:Y(n,5)}),t.compressionMethod=s.compressionMethod}function oo(s,t){const e=B(s.data);let n=4,r;try{for(;n<s.data.length&&!r;){const i=Y(e,n),a=Y(e,n+2);i==$r&&(r=s.data.slice(n+4,n+4+a)),n+=4+a}}catch{}try{if(r&&r.length==24){const i=B(r),a=i.getBigUint64(0,!0),o=i.getBigUint64(8,!0),c=i.getBigUint64(16,!0);Object.assign(s,{rawLastModDate:a,rawLastAccessDate:o,rawCreationDate:c});const h=ct(a),d=ct(o),m=ct(c),w={lastModDate:h,lastAccessDate:d,creationDate:m};Object.assign(s,w),Object.assign(t,w)}}catch{}}function co(s,t,e){const n=B(s.data),r=be(n,0),i=[],a=[];e?((r&1)==1&&(i.push(mt),a.push(wt)),(r&2)==2&&(i.push(Ls),a.push(ya)),(r&4)==4&&(i.push(vs),a.push(Ea))):s.data.length>=5&&(i.push(mt),a.push(wt));let o=1;i.forEach((c,h)=>{if(s.data.length>=o+4){const d=H(n,o);t[c]=s[c]=new Date(d*1e3);const m=a[h];s[m]=d}o+=4})}async function lo({reader:s,fileEntry:t,offset:e,diskNumberStart:n,signature:r,compressedSize:i,uncompressedSize:a,dataOffset:o,dataDescriptor:c,extraFieldZip64:h,readRanges:d}){let m=0;if(n)for(let A=0;A<n;A++){const u=s.readers[A];m+=u.size}let w=0;if(c&&(h?w=Vr:w=Yr),w){const A=await G(s,o+i,w+fn,n);if(H(B(A),0)==jr){const l=H(B(A),4);let f,p;h?(f=ye(B(A),8),p=ye(B(A),16)):(f=H(B(A),8),p=H(B(A),12)),(t.encrypted&&!t.zipCrypto||l==r)&&f==i&&p==a&&(w+=fn)}}const T={start:m+e,end:m+o+i+w,fileEntry:t};for(const A of d)if(A.fileEntry!=t&&T.start>=A.start&&T.start<A.end){const u=new Error(qs);throw u.overlappingEntry=A.fileEntry,u}d.push(T)}async function fo(s,t,e,n,r){const i=new Uint8Array(4),a=B(i);_o(a,0,t);const o=n+r;return await c(n)||await c(Math.min(o,e));async function c(h){const d=e-h,m=await G(s,d,h);for(let w=m.length-n;w>=0;w--)if(m[w]==i[0]&&m[w+1]==i[1]&&m[w+2]==i[2]&&m[w+3]==i[3])return{offset:d+w,buffer:m.slice(w,w+n).buffer}}}function V(s,t,e){return t[e]===j?s.options[e]:t[e]}function uo(s){const t=(s&4294901760)>>16,e=s&65535;try{return new Date(1980+((t&65024)>>9),((t&480)>>5)-1,t&31,(e&63488)>>11,(e&2016)>>5,(e&31)*2,0)}catch{}}function ct(s){return new Date(Number(s/BigInt(1e4)-BigInt(116444736e5)))}function be(s,t){return s.getUint8(t)}function Y(s,t){return s.getUint16(t,!0)}function H(s,t){return s.getUint32(t,!0)}function ye(s,t){return Number(s.getBigUint64(t,!0))}function _o(s,t,e){s.setUint32(t,e,!0)}function B(s){return new DataView(s.buffer)}Zn({Inflate:Mr});const ho=Object.freeze(Object.defineProperty({__proto__:null,BlobReader:It,BlobWriter:ws,Data64URIReader:aa,Data64URIWriter:oa,ERR_BAD_FORMAT:Ye,ERR_CENTRAL_DIRECTORY_NOT_FOUND:Us,ERR_ENCRYPTED:Bs,ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND:Ms,ERR_EOCDR_NOT_FOUND:Fs,ERR_EXTRAFIELD_ZIP64_NOT_FOUND:Ws,ERR_HTTP_RANGE:Le,ERR_INVALID_PASSWORD:yt,ERR_INVALID_SIGNATURE:Et,ERR_INVALID_UNCOMPRESSED_SIZE:Rt,ERR_ITERATOR_COMPLETED_TOO_SOON:hs,ERR_LOCAL_FILE_HEADER_NOT_FOUND:Hs,ERR_OVERLAPPING_ENTRY:qs,ERR_SPLIT_ZIP_FILE:bt,ERR_UNSUPPORTED_COMPRESSION:gt,ERR_UNSUPPORTED_ENCRYPTION:js,ERR_WRITER_NOT_INITIALIZED:ps,GenericReader:Ss,GenericWriter:Rs,HttpRangeReader:da,HttpReader:Ts,Reader:_e,SplitDataReader:Dt,SplitDataWriter:Ke,SplitZipReader:ma,SplitZipWriter:wa,TextReader:ca,TextWriter:la,Uint8ArrayReader:_a,Uint8ArrayWriter:ha,Writer:Ct,ZipReader:Gs,ZipReaderStream:so,configure:Zn,getMimeType:ui,initStream:De,readUint8Array:G,terminateWorkers:Ji},Symbol.toStringTag,{value:"Module"})),Ae=ho;class po{constructor(t,e){Ae.configure({baseURL:self.location.href}),this._zipReader=new Ae.ZipReader(new Ae.HttpReader(this._resolveTraceURI(t),{mode:"cors",preventHeadRequest:!0}),{useWebWorkers:!1}),this._entriesPromise=this._zipReader.getEntries({onprogress:e}).then(n=>{const r=new Map;for(const i of n)r.set(i.filename,i);return r})}_resolveTraceURI(t){return t.startsWith("https://www.dropbox.com/")?"https://dl.dropboxusercontent.com/"+t.substring(24):t}isLive(){return!1}async entryNames(){return[...(await this._entriesPromise).keys()]}async hasEntry(t){return(await this._entriesPromise).has(t)}async readText(t){var i;const n=(await this._entriesPromise).get(t);if(!n)return;const r=new Ae.TextWriter;return await((i=n.getData)==null?void 0:i.call(n,r)),r.getData()}async readBlob(t){const n=(await this._entriesPromise).get(t);if(!n)return;const r=new Ae.BlobWriter;return await n.getData(r),r.getData()}}class mo{constructor(t){this._entriesPromise=this._readFile(t).then(async e=>{if(!e)throw new Error("File not found");const n=await e.json(),r=new Map;for(const i of n.entries)r.set(i.name,i.path);return r})}isLive(){return!0}async entryNames(){return[...(await this._entriesPromise).keys()]}async hasEntry(t){return(await this._entriesPromise).has(t)}async readText(t){const e=await this._readEntry(t);return e==null?void 0:e.text()}async readBlob(t){const e=await this._readEntry(t);return(e==null?void 0:e.status)===200?await(e==null?void 0:e.blob()):void 0}async _readEntry(t){const n=(await this._entriesPromise).get(t);if(n)return this._readFile(n)}async _readFile(t){const e=await fetch(t);if(e.status!==404)return e}}self.addEventListener("install",function(s){self.skipWaiting()});self.addEventListener("activate",function(s){s.waitUntil(self.clients.claim())});const wo=new URL(self.registration.scope).pathname,Ee=new Map,Xe=new Map,vn=self.registration.scope.startsWith("https://");function go(){Ee.clear(),Xe.clear()}async function Fn(s,t,e){try{return{loadedTrace:await Zs(s,t,e)}}catch(n){return{errorResponse:new Response(JSON.stringify({error:n==null?void 0:n.message}),{status:500,headers:{"Content-Type":"application/json"}})}}}function Zs(s,t,e){const n=t.searchParams.get("trace");if(!n)throw new Error("trace parameter is missing");Xe.set(s,n);const r=Ee.get(n);if(r)return r;const i=bo(n,e);return Ee.set(n,i),i.catch(()=>Ee.delete(n)),i}async function bo(s,t){var r;await xo();const e=new pr;try{const[i,a]=wr(t,[.5,.4,.1]),o=So(s)||s.endsWith("traces.dir")?new mo(s):new po(s,i);await e.load(o,void 0,a)}catch(i){if(console.error(i),(r=i==null?void 0:i.message)!=null&&r.includes("Cannot find .trace file")&&await e.hasEntry("index.html"))throw 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.");if(i instanceof Bn)throw new Error(`Could not load trace from ${s}. ${i.message}`);let a=`Could not load trace from ${s}. Make sure a valid Playwright Trace is accessible over this url.`;const o=await navigator.permissions.query({name:"local-network-access"}).catch(()=>{});throw o&&o.state!=="granted"&&(a+=`
|
|
1
|
+
var e=Object.defineProperty,t=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r},n=class{constructor(e,t){this._snapshotIds=new Map,this._snapshotStorage=e,this._resourceLoader=t}serveSnapshot(e,t,n){let r=this._snapshot(e,t);if(!r)return new Response(null,{status:404});let i=r.render();return this._snapshotIds.set(n,r),new Response(i.html,{status:200,headers:{"Content-Type":`text/html; charset=utf-8`,"Content-Security-Policy":`script-src 'nonce-${i.scriptNonce}'; object-src 'none'`}})}async serveClosestScreenshot(e,t){let n=this._snapshot(e,t)?.closestScreenshot();return n?new Response(await this._resourceLoader(n)):new Response(null,{status:404})}serveSnapshotInfo(e,t){let n=this._snapshot(e,t);return this._respondWithJson(n?{viewport:n.viewport(),url:n.snapshot().frameUrl,timestamp:n.snapshot().timestamp,wallTime:n.snapshot().wallTime}:{error:`No snapshot found`})}_snapshot(e,t){return this._snapshotStorage.snapshotForCall(e,t.get(`phase`),t.get(`frameId`)||void 0)}_respondWithJson(e){return new Response(JSON.stringify(e),{status:200,headers:{"Cache-Control":`public, max-age=31536000`,"Content-Type":`application/json`}})}async serveResource(e,t,n){let i,a=this._snapshotIds.get(n);for(let n of e)if(i=a?.resourceByUrl(r(n),t),i)break;if(!i)return new Response(null,{status:404});let o=i.response.content._file,s=o&&await this._resourceLoader(o)||new Blob([]),c=i.response.content.mimeType;/^text\/|^application\/(javascript|json)/.test(c)&&!c.includes(`charset`)&&(c=`${c}; charset=utf-8`);let l=new Headers;c!==`x-unknown`&&l.set(`Content-Type`,c);for(let{name:e,value:t}of i.response.headers)l.set(e,t);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(s.size)),this._snapshotStorage.hasResourceOverride(i.request.url)?l.set(`Cache-Control`,`no-store, no-cache, max-age=0`):l.set(`Cache-Control`,`public, max-age=31536000`);let{status:u}=i.response;return new Response(u===101||u===204||u===205||u===304?null:s,{headers:l,status:i.response.status,statusText:i.response.statusText})}};function r(e){try{let t=new URL(e);return t.hash=``,t.toString()}catch{return e}}function i(e){let t=new Map,{files:n,stacks:r}=e;for(let e of r){let[r,i]=e;t.set(`call@${r}`,i.map(e=>({file:n[e[0]],line:e[1],column:e[2],function:e[3]})))}return t}var a={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`};function o(e){return e.replace(/[&<>"']/gu,e=>a[e])}function s(e){return e.replace(/[&<]/gu,e=>a[e])}function c(e,t,n){return e.find((r,i)=>{if(i===e.length-1)return!0;let a=e[i+1];return Math.abs(t(r)-n)<Math.abs(t(a)-n)})}function l(e){return Array.isArray(e)&&typeof e[0]==`string`}function u(e){return Array.isArray(e)&&Array.isArray(e[0])}var d=class{constructor(e,t,n,r,i){this._htmlCache=e,this._resources=t,this._snapshots=n,this._index=i,this._snapshot=n[i],this._callId=n[i].callId,this._screencastFrames=r,this.snapshotName=n[i].snapshotName}snapshot(){return this._snapshots[this._index]}viewport(){return this._snapshots[this._index].viewport}closestScreenshot(){let{wallTime:e,timestamp:t}=this.snapshot();return(e&&this._screencastFrames[0]?.frameSwapWallTime?c(this._screencastFrames,e=>e.frameSwapWallTime,e):c(this._screencastFrames,e=>e.timestamp,t))?.file}render(){let e=[],t=(n,r,i,a)=>{if(typeof n==`string`){e.push(s(n));return}if(u(n)){let e=r-n[0][0];if(e>=0&&e<=r){let r=m(this._snapshots[e]),o=n[0][1];if(o>=0&&o<r.length)return t(r[o],e,i,a)}}else if(l(n)){let[s,c,...l]=n;if(s.toUpperCase()===`SCRIPT`)return;let u=s.toUpperCase(),d=u===`NOSCRIPT`?`X-NOSCRIPT`:s,m=Object.entries(c||{});e.push(`<`,d);let h=`__playwright_current_src__`,g=u===`IFRAME`||u===`FRAME`,_=u===`A`,v=u===`IMG`,b=u===`META`,S=v&&m.some(e=>e[0]===h),C=u===`SOURCE`&&i===`PICTURE`&&a?.some(e=>e[0]===h),w=b&&m.some(e=>e[0].toLowerCase()===`http-equiv`&&!p.has(e[1].trim().toLowerCase()));for(let[t,n]of m){let r=t;if(t.toLowerCase().startsWith(`on`))continue;g&&t.toLowerCase()===`src`&&(r=`__playwright_src__`),g&&(t.toLowerCase()===`srcdoc`||t.toLowerCase()===`sandbox`)&&(r=`__playwright_`+t.toLowerCase()+`__`),u===`OBJECT`&&t.toLowerCase()===`data`&&(r=`__playwright_data__`),u===`EMBED`&&t.toLowerCase()===`src`&&(r=`__playwright_src__`),v&&t===h&&(r=`src`),[`src`,`srcset`].includes(t.toLowerCase())&&(S||C)&&(r=`_`+r),w&&(t.toLowerCase()===`http-equiv`||t.toLowerCase()===`content`)&&(r=`_`+t);let i=n;!_&&(t.toLowerCase()===`href`||t.toLowerCase()===`src`||t===h)&&(i=y(n)),e.push(` `,r,`="`,o(i),`"`)}if(u===`STYLE`){let t=typeof l[0]==`string`?l[0]:``;e.push(` `,`__playwright_style_content__`,`="`,o(x(t)),`"`),e.push(`></`,d,`>`);return}e.push(`>`);for(let e of l)t(e,r,d,m);f.has(d)||e.push(`</`,d,`>`);return}else return},n=this._snapshot,{html:r,scriptNonce:i}=this._htmlCache.getOrCompute(this,()=>{t(n.html,this._index,void 0,void 0);let r=n.doctype?.replace(/[^a-zA-Z0-9]/g,``),i=r?`<!DOCTYPE ${r}>`:``,a=h(),o=i+[`<style>*,*::before,*::after { visibility: hidden }</style>`,`<script nonce="${a}">${g(this.viewport(),this._callId,this.snapshotName)}<\/script>`].join(``)+e.join(``);return{value:{html:o,scriptNonce:a},size:o.length}});return{html:r,scriptNonce:i,pageId:n.pageId,frameId:n.frameId,index:this._index}}resourceByUrl(e,t){let n=this._snapshot,r,i;for(let a of this._resources){if(typeof a._monotonicTime==`number`&&a._monotonicTime>=n.timestamp)break;a.response.status!==304&&a.request.url===e&&a.request.method===t&&(a._frameref===n.frameId?r=a:i=a)}let a=r??i;if(a&&t.toUpperCase()===`GET`){let t=n.resourceOverrides.find(t=>t.url===e);if(t?.ref){let n=this._index-t.ref;n>=0&&n<this._snapshots.length&&(t=this._snapshots[n].resourceOverrides.find(t=>t.url===e))}t?.file&&(a={...a,response:{...a.response,content:{...a.response.content,_file:t.file}}})}return a}},f=new Set([`AREA`,`BASE`,`BR`,`COL`,`COMMAND`,`EMBED`,`HR`,`IMG`,`INPUT`,`KEYGEN`,`LINK`,`MENUITEM`,`META`,`PARAM`,`SOURCE`,`TRACK`,`WBR`]),p=new Set([`content-type`,`content-language`,`default-style`,`x-ua-compatible`]);function m(e){if(!e._nodes){let t=[],n=e=>{if(typeof e==`string`)t.push(e);else if(l(e)){let[,,...r]=e;for(let e of r)n(e);t.push(e)}};n(e.html),e._nodes=t}return e._nodes}function h(){let e=new Uint8Array(16);return crypto.getRandomValues(e),Array.from(e,e=>e.toString(16).padStart(2,`0`)).join(``)}function g(e,...t){function n(e,t,...n){let r=window,i=new URLSearchParams(r.location.search),a=i.has(`shouldPopulateCanvasFromScreenshot`),o=i.has(`isUnderTest`),s={viewport:t,frames:new WeakMap};r.__playwright_frame_bounding_rects__=s;let c=[],l=[],u=[],d=[],f=r;for(;f!==f.parent&&new URLSearchParams(f.location.search).has(`frameId`);)f=f.parent;let p=t=>{for(let e of t.querySelectorAll(`[__playwright_scroll_top_]`))c.push(e);for(let e of t.querySelectorAll(`[__playwright_scroll_left_]`))l.push(e);for(let e of t.querySelectorAll(`style[__playwright_style_content__]`))e.textContent=e.getAttribute(`__playwright_style_content__`),e.removeAttribute(`__playwright_style_content__`);for(let e of t.querySelectorAll(`[__playwright_value_]`)){let t=e;t.type!==`file`&&(t.value=t.getAttribute(`__playwright_value_`)),e.removeAttribute(`__playwright_value_`)}for(let e of t.querySelectorAll(`[__playwright_checked_]`))e.checked=e.getAttribute(`__playwright_checked_`)===`true`,e.removeAttribute(`__playwright_checked_`);for(let e of t.querySelectorAll(`[__playwright_selected_]`))e.selected=e.getAttribute(`__playwright_selected_`)===`true`,e.removeAttribute(`__playwright_selected_`);for(let e of t.querySelectorAll(`[__playwright_popover_open_]`)){try{e.showPopover()}catch{}e.removeAttribute(`__playwright_popover_open_`)}for(let e of t.querySelectorAll(`[__playwright_dialog_open_]`)){try{e.getAttribute(`__playwright_dialog_open_`)===`modal`?e.showModal():e.show()}catch{}e.removeAttribute(`__playwright_dialog_open_`)}let i=e=>{let t=e.style;t.outline=`2px solid #006ab1`,t.backgroundColor=`#6fa8dc7f`,u.push(e)};for(let e of t.querySelectorAll(`[__playwright_target__=""]`))i(e);for(let e of n)if(e)for(let n of t.querySelectorAll(`[__playwright_target__="${e}"]`))i(n);for(let n of t.querySelectorAll(`iframe, frame`)){let t=n.getAttribute(`__playwright_bounding_rect__`);n.removeAttribute(`__playwright_bounding_rect__`);let i=t?JSON.parse(t):void 0;i&&s.frames.set(n,{boundingRect:i,scrollLeft:0,scrollTop:0});let a=n.getAttribute(`__playwright_src__`);if(!a)n.setAttribute(`src`,e);else{let e=a.substring(a.lastIndexOf(`/`)+1),t=new URL(r.location.href);t.searchParams.set(`frameId`,e),n.setAttribute(`src`,t.toString())}}{let e=t.querySelector(`body[__playwright_custom_elements__]`);if(e&&r.customElements){let t=(e.getAttribute(`__playwright_custom_elements__`)||``).split(`,`);for(let e of t)r.customElements.define(e,class extends HTMLElement{})}}for(let e of t.querySelectorAll(`template[__playwright_shadow_root_]`)){let t=e,n=t.parentElement.attachShadow({mode:`open`});n.appendChild(t.content),t.remove(),p(n)}for(let e of t.querySelectorAll(`a`))e.addEventListener(`click`,e=>{e.preventDefault()});if(`adoptedStyleSheets`in t){let e=[...t.adoptedStyleSheets];for(let n of t.querySelectorAll(`template[__playwright_style_sheet_]`)){let t=n,r=new CSSStyleSheet;r.replaceSync(t.getAttribute(`__playwright_style_sheet_`)),e.push(r)}t.adoptedStyleSheets=e}d.push(...t.querySelectorAll(`canvas`))},m=()=>{r.removeEventListener(`load`,m);for(let e of c)e.scrollTop=+e.getAttribute(`__playwright_scroll_top_`),e.removeAttribute(`__playwright_scroll_top_`),s.frames.has(e)&&(s.frames.get(e).scrollTop=e.scrollTop);for(let e of l)e.scrollLeft=+e.getAttribute(`__playwright_scroll_left_`),e.removeAttribute(`__playwright_scroll_left_`),s.frames.has(e)&&(s.frames.get(e).scrollLeft=e.scrollLeft);r.document.styleSheets[0].disabled=!0;let e=new URL(r.location.href).searchParams;if(r===f&&e.get(`pointX`)&&e.get(`pointY`)){let t=+e.get(`pointX`),n=+e.get(`pointY`),i=r.document.createElement(`x-pw-pointer`);i.style.position=`fixed`,i.style.backgroundColor=`#f44336`,i.style.width=`20px`,i.style.height=`20px`,i.style.borderRadius=`10px`,i.style.margin=`-10px 0 0 -10px`,i.style.zIndex=`2147483646`,i.style.display=`flex`,i.style.alignItems=`center`,i.style.justifyContent=`center`;let a=u[0],o=a?.getBoundingClientRect(),s=a?{x:o.left+o.width/2,y:o.top+o.height/2}:null;if(i.style.left=(s?.x??t)+`px`,i.style.top=(s?.y??n)+`px`,!(!s||Math.abs(s.x-t)<=10&&Math.abs(s.y-n)<=10)){let e=r.document.createElement(`x-pw-pointer-warning`);e.textContent=`⚠`,e.style.fontSize=`19px`,e.style.color=`white`,e.style.marginTop=`-3.5px`,e.style.userSelect=`none`,i.appendChild(e),i.setAttribute(`title`,`Recorded click position in absolute coordinates did not match the center of the clicked element. This is either due to the use of provided offset, or due to a difference between the test runner and the trace viewer operating systems.`)}r.document.documentElement.appendChild(i)}if(d.length>0){function e(e,t){function n(){let e=r.document.createElement(`canvas`);e.width/=Math.floor(e.width/24),e.height/=Math.floor(e.height/24);let t=e.getContext(`2d`);return t.fillStyle=`lightgray`,t.fillRect(0,0,e.width,e.height),t.fillStyle=`white`,t.fillRect(0,0,e.width/2,e.height/2),t.fillRect(e.width/2,e.height/2,e.width,e.height),t.createPattern(e,`repeat`)}e.fillStyle=n(),e.fillRect(0,0,t.width,t.height)}let t=new Image;t.onload=()=>{for(let n of d){let i=n.getContext(`2d`),s=n.getAttribute(`__playwright_bounding_rect__`);if(n.removeAttribute(`__playwright_bounding_rect__`),!s)continue;let c;try{c=JSON.parse(s)}catch{continue}let l=r;for(;l!==f;){let e=l.frameElement;l=l.parent;let t=l.__playwright_frame_bounding_rects__?.frames.get(e);if(!t?.boundingRect)break;let n=t.boundingRect.left-t.scrollLeft,r=t.boundingRect.top-t.scrollTop;c.left+=n,c.top+=r,c.right+=n,c.bottom+=r}let{width:u,height:d}=f.__playwright_frame_bounding_rects__.viewport;c.left/=u,c.top/=d,c.right/=u,c.bottom/=d;let p=c.right>1||c.bottom>1;if(c.left>1||c.top>1){n.title=`Playwright couldn't capture canvas contents because it's located outside the viewport.`;continue}e(i,n),a?(i.drawImage(t,c.left*t.width,c.top*t.height,(c.right-c.left)*t.width,(c.bottom-c.top)*t.height,0,0,n.width,n.height),p?n.title=`Playwright couldn't capture full canvas contents because it's located partially outside the viewport.`:n.title=`Canvas contents are displayed on a best-effort basis based on viewport screenshots taken during test execution.`):n.title=`Canvas content display is disabled.`,o&&console.log(`canvas drawn:`,JSON.stringify([c.left,c.top,c.right-c.left,c.bottom-c.top].map(e=>Math.floor(e*100))))}},t.onerror=()=>{for(let t of d)e(t.getContext(`2d`),t),t.title=`Playwright couldn't show canvas contents because the screenshot failed to load.`},t.src=location.href.replace(`/snapshot`,`/closest-screenshot`)}};r.addEventListener(`load`,m),r.addEventListener(`DOMContentLoaded`,()=>p(r.document))}let r=e=>JSON.stringify(e).replace(/</g,`\\u003c`);return`\n(${n.toString()})(${r(S)},${r(e)}${t.map(e=>`, ${r(String(e))}`).join(``)})`}var _=[`about:`,`blob:`,`data:`,`file:`,`ftp:`,`http:`,`https:`,`mailto:`,`sftp:`,`ws:`,`wss:`],v=`http://playwright.bloburl/#`;function y(e){e.startsWith(v)&&(e=e.substring(27));try{let t=new URL(e);if(t.protocol===`javascript:`||t.protocol===`vbscript:`)return`javascript:void(0)`;let n=t.protocol===`blob:`,r=t.protocol===`file:`;if(!n&&!r&&_.includes(t.protocol))return e;let i=`pw-`+t.protocol.slice(0,t.protocol.length-1);return r||(t.protocol=`https:`),t.hostname=t.hostname?`${i}--${t.hostname}`:i,r&&(t.protocol=`https:`),t.toString()}catch{return e}}var b=/url\(['"]?([\w-]+:)\/\//gi;function x(e){return e.replace(b,(e,t)=>t!==`blob:`&&t!==`file:`&&_.includes(t)?e:e.replace(t+`//`,`https://pw-${t.slice(0,-1)}--`))}var S=`data:text/html;base64,`+btoa(`<body></body><style>body { color-scheme: light dark; background: light-dark(white, #333) }</style>`),C=class{constructor(e){this._maxSize=e,this._map=new Map,this._size=0}getOrCompute(e,t){if(this._map.has(e)){let t=this._map.get(e);return this._map.delete(e),this._map.set(e,t),t.value}let n=t();for(;this._map.size&&this._size+n.size>this._maxSize;){let[e,t]=this._map.entries().next().value;this._size-=t.size,this._map.delete(e)}return this._map.set(e,n),this._size+=n.size,n.value}},w=class{constructor(){this._snapshotsByFrameId=new Map,this._renderersByCallIdAndPhase=new Map,this._cache=new C(1e8),this._resources=[],this._resourceUrlsWithOverrides=new Set}addResource(e){e.request.url=y(e.request.url),this._resources.push(e)}addFrameSnapshot(e,t){for(let t of e.resourceOverrides)t.url=y(t.url);let n=this._snapshotsByFrameId.get(e.frameId);n||(n=[],this._snapshotsByFrameId.set(e.frameId,n)),n.push(e);let r=new d(this._cache,this._resources,n,t,n.length-1);if(e.phase){let t=T(e.callId,e.phase),n=this._renderersByCallIdAndPhase.get(t);n||(n=[],this._renderersByCallIdAndPhase.set(t,n)),n.push(r)}return r}snapshotForCall(e,t,n){return(this._renderersByCallIdAndPhase.get(T(e,t))||[]).find(e=>n?e.snapshot().frameId===n:e.snapshot().isMainFrame)}snapshotsForTest(){return[...this._renderersByCallIdAndPhase.keys()]}finalize(){this._resources.sort((e,t)=>(e._monotonicTime||0)-(t._monotonicTime||0));for(let e of this._snapshotsByFrameId.values())for(let t of e)for(let e of t.resourceOverrides)this._resourceUrlsWithOverrides.add(e.url)}hasResourceOverride(e){return this._resourceUrlsWithOverrides.has(e)}};function T(e,t){return`${e}/${t}`}var E=class extends Error{constructor(e){super(e),this.name=`TraceVersionError`}},D=9,O=0,k=class{constructor(e,t){this._actionMap=new Map,this._pageEntries=new Map,this._jsHandles=new Map,this._consoleObjects=new Map,this._snapshotPhases=new Map,this._contextEntry=e,this._snapshotStorage=t}appendTrace(e){for(let t of e.split(`
|
|
2
|
+
`))this._appendEvent(t)}actions(){return[...this._actionMap.values()]}_collectSnapshotPhase(e,t){e&&this._snapshotPhases.set(e,t)}_pageEntry(e){let t=this._pageEntries.get(e);return t||(t={pageId:e,screencastFrames:[]},this._pageEntries.set(e,t),this._contextEntry.pages.push(t)),t}_appendEvent(e){if(!e)return;let t=this._modernize(JSON.parse(e));for(let e of t)this._innerAppendEvent(e)}_innerAppendEvent(e){let t=this._contextEntry;switch(e.type){case`context-options`:if(e.version>D)throw new E(`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=e.version,t.origin=e.origin,t.browserName=e.browserName,t.channel=e.channel,t.title=e.title,t.platform=e.platform,t.playwrightVersion=e.playwrightVersion,t.wallTime=e.wallTime,t.monotonicTime=e.monotonicTime,t.startTime=e.monotonicTime,t.sdkLanguage=e.sdkLanguage,t.options=e.options,t.testIdAttributeName=e.testIdAttributeName,t.testTimeout=e.testTimeout,t.annotations=e.annotations;break;case`screencast-frame`:this._pageEntry(e.pageId).screencastFrames.push(e);break;case`screenshot`:t.screenshots.push(e);break;case`video`:t.videos.push(e);break;case`aria-snapshot`:t.ariaSnapshots.push(e);break;case`before`:this._actionMap.set(e.callId,{...e,type:`action`,endTime:0,log:[]});break;case`input`:{let t=this._actionMap.get(e.callId);t.point=e.point,t.box=e.box;break}case`log`:{let t=this._actionMap.get(e.callId);if(!t)return;t.log.push({time:e.time,message:e.message});break}case`after`:{let t=this._actionMap.get(e.callId);t.endTime=e.endTime,t.result=e.result,t.error=e.error,t.attachments=e.attachments,t.annotations=e.annotations,e.point&&(t.point=e.point);break}case`action`:this._actionMap.set(e.callId,{...e,log:[]});break;case`event`:(e.method===`page`||e.method===`pageClosed`)&&e.params?.pageId&&this._pageEntry(e.params.pageId),t.events.push(e);break;case`stdout`:t.stdio.push(e);break;case`stderr`:t.stdio.push(e);break;case`error`:t.errors.push(e);break;case`console`:t.events.push(e);break;case`resource-snapshot`:this._snapshotStorage.addResource(e.snapshot),t.resources.push(e.snapshot);break;case`frame-snapshot`:{let n=e.snapshot;this._snapshotStorage.addFrameSnapshot(n,this._pageEntry(n.pageId).screencastFrames),n.isMainFrame&&n.phase&&t.domSnapshots.push({callId:n.callId,phase:n.phase});break}}`pageId`in e&&e.pageId&&this._pageEntry(e.pageId),(e.type===`action`||e.type===`before`)&&(t.startTime=Math.min(t.startTime,e.startTime)),(e.type===`action`||e.type===`after`)&&(t.endTime=Math.max(t.endTime,e.endTime)),e.type===`event`&&(t.startTime=Math.min(t.startTime,e.time),t.endTime=Math.max(t.endTime,e.time)),e.type===`screencast-frame`&&(t.startTime=Math.min(t.startTime,e.timestamp),t.endTime=Math.max(t.endTime,e.timestamp))}_processedContextCreatedEvent(){return this._version!==void 0}_modernize(e){let t=this._version??e.version??6,n=[e];for(;t<D;++t)n=this[`_modernize_${t}_to_${t+1}`].call(this,n);return n}_modernize_0_to_1(e){for(let t of e)t.type===`action`&&typeof t.metadata.error==`string`&&(t.metadata.error={error:{name:`Error`,message:t.metadata.error}});return e}_modernize_1_to_2(e){for(let t of e)t.type!==`frame-snapshot`||!t.snapshot.isMainFrame||(t.snapshot.viewport=this._contextEntry.options?.viewport||{width:1280,height:720});return e}_modernize_2_to_3(e){for(let t of e){if(t.type!==`resource-snapshot`||t.snapshot.request)continue;let e=t.snapshot;t.snapshot={_frameref:e.frameId,request:{url:e.url,method:e.method,headers:e.requestHeaders,postData:e.requestSha1?{_sha1:e.requestSha1}:void 0},response:{status:e.status,headers:e.responseHeaders,content:{mimeType:e.contentType,_sha1:e.responseSha1}},_monotonicTime:e.timestamp}}return e}_modernize_3_to_4(e){let t=[];for(let n of e){let e=this._modernize_event_3_to_4(n);e&&t.push(e)}return t}_modernize_event_3_to_4(e){if(e.type!==`action`&&e.type!==`event`)return e;let t=e.metadata;return t.internal||t.method.startsWith(`tracing`)?null:e.type===`event`?t.method===`__create__`&&t.type===`ConsoleMessage`?{type:`object`,class:t.type,guid:t.params.guid,initializer:t.params.initializer}:{type:`event`,time:t.startTime,class:t.type,method:t.method,params:t.params,pageId:t.pageId}:{type:`action`,callId:t.id,startTime:t.startTime,endTime:t.endTime,apiName:t.apiName||t.type+`.`+t.method,class:t.type,method:t.method,params:t.params,wallTime:t.wallTime||Date.now(),log:t.log,beforeSnapshot:t.snapshots.find(e=>e.title===`before`)?.snapshotName,inputSnapshot:t.snapshots.find(e=>e.title===`input`)?.snapshotName,afterSnapshot:t.snapshots.find(e=>e.title===`after`)?.snapshotName,error:t.error?.error,result:t.result,point:t.point,pageId:t.pageId}}_modernize_4_to_5(e){let t=[];for(let n of e){let e=this._modernize_event_4_to_5(n);e&&t.push(e)}return t}_modernize_event_4_to_5(e){if(e.type===`event`&&e.method===`__create__`&&e.class===`JSHandle`&&this._jsHandles.set(e.params.guid,e.params.initializer),e.type===`object`){if(e.class!==`ConsoleMessage`)return null;let t=e.initializer.args?.map(e=>e.guid?{preview:this._jsHandles.get(e.guid)?.preview||``,value:``}:{preview:e.preview||``,value:e.value||``});return this._consoleObjects.set(e.guid,{type:e.initializer.type,text:e.initializer.text,location:e.initializer.location,args:t}),null}if(e.type===`event`&&e.method===`console`){let t=this._consoleObjects.get(e.params.message?.guid||``);return t?{type:`console`,time:e.time,pageId:e.pageId,messageType:t.type,text:t.text,args:t.args,location:t.location}:null}return e}_modernize_5_to_6(e){let t=[];for(let n of e)if(t.push(n),!(n.type!==`after`||!n.log.length))for(let e of n.log)t.push({type:`log`,callId:n.callId,message:e,time:-1});return t}_modernize_6_to_7(e){let t=[];!this._processedContextCreatedEvent()&&e[0].type!==`context-options`&&t.push({type:`context-options`,origin:`testRunner`,version:6,browserName:``,options:{},platform:`unknown`,wallTime:0,monotonicTime:0,sdkLanguage:`javascript`,contextId:``});for(let n of e){if(n.type===`context-options`){t.push({...n,monotonicTime:0,origin:`library`,contextId:``});continue}if(n.type===`before`||n.type===`action`){this._contextEntry.monotonicTime||(this._contextEntry.monotonicTime=n.startTime,this._contextEntry.wallTime=n.wallTime);let e=n,r=n;r.stepId=`${e.apiName}@${e.wallTime}`,t.push(r)}else t.push(n)}return t}_modernize_7_to_8(e){let t=[];for(let n of e)if(n.type===`before`||n.type===`action`){let e=n,r=n;e.apiName&&(r.title=e.apiName,delete r.apiName),r.stepId=e.stepId??e.callId,t.push(r)}else t.push(n);return t}_modernize_8_to_9(e){for(let t of e){if(t.type===`before`||t.type===`input`||t.type===`after`||t.type===`action`){let e=t;this._collectSnapshotPhase(e.beforeSnapshot,`before`),this._collectSnapshotPhase(e.inputSnapshot,`action`),this._collectSnapshotPhase(e.afterSnapshot,`after`),delete e.beforeSnapshot,delete e.inputSnapshot,delete e.afterSnapshot}if(t.type===`after`||t.type===`action`)for(let e of t.attachments||[])e.sha1&&(e.file=`resources/`+e.sha1,delete e.sha1);if(t.type===`screencast-frame`&&t.sha1&&(t.file=`resources/`+t.sha1,delete t.sha1),t.type===`frame-snapshot`){t.snapshot.snapshotName&&(t.snapshot.phase=this._snapshotPhases.get(t.snapshot.snapshotName));for(let e of t.snapshot.resourceOverrides||[])e.sha1&&(e.file=`resources/`+e.sha1,delete e.sha1)}if(t.type===`resource-snapshot`){let e=t.snapshot.request?.postData;e?._sha1&&(e._file=`resources/`+e._sha1,delete e._sha1);let n=t.snapshot.response?.content;n?._sha1&&(n._file=`resources/`+n._sha1,delete n._sha1),t.snapshot._apiRequest&&(this._apiRequestRef||=`api-request-context@`+ ++O,t.snapshot._apiRequestRef=this._apiRequestRef,delete t.snapshot._apiRequest)}}return e}},ee=class{constructor(){this.contextEntries=[],this._resourceToContentType=new Map}async load(e,t,n){this._backend=e;let r=t?.match(/(.+)\.trace$/)?.[1],a=[],o=!1;for(let e of await this._backend.entryNames()){let t=e.match(/(.+)\.trace$/);t&&(!r||r===t[1])&&a.push(t[1]||``),(e.startsWith(`src/`)||e.includes(`src@`))&&(o=!0)}if(!a.length)throw Error(`Cannot find .trace file`);this._snapshotStorage=new w;let s=a.length*3,c=0;for(let t of a){let r=ne();r.hasSource=o;let a=new k(r,this._snapshotStorage),l=await this._backend.readText(t+`.trace`)||``;a.appendTrace(l),n?.(++c,s);let u=await this._backend.readText(t+`.network`)||``;if(a.appendTrace(u),n?.(++c,s),r.actions=a.actions().sort((e,t)=>e.startTime-t.startTime),!e.isLive()){for(let e of r.actions.slice().reverse())if(!e.endTime&&!e.error)for(let t of r.actions)t.parentId===e.callId&&e.endTime<t.endTime&&(e.endTime=t.endTime)}let d=await this._backend.readText(t+`.stacks`);if(d){let e=i(JSON.parse(d));for(let t of r.actions)t.stack=t.stack||e.get(t.callId)}n?.(++c,s);for(let e of r.resources)e.request.postData?._file&&this._resourceToContentType.set(e.request.postData._file,te(e.request.postData.mimeType)),e.response.content?._file&&this._resourceToContentType.set(e.response.content._file,te(e.response.content.mimeType));this.contextEntries.push(r)}this._snapshotStorage.finalize()}async hasEntry(e){return this._backend.hasEntry(e)}async resourceEntry(e){let t=await this._backend.readBlob(e),n=this._resourceToContentType.get(e);return!t||n===void 0||n===`x-unknown`?t:new Blob([t],{type:n})}storage(){return this._snapshotStorage}};function te(e){let t=e.match(/^(.*);\s*charset=.*$/);return t?t[1]:e}function ne(){return{origin:`testRunner`,startTime:2**53-1,wallTime:2**53-1,monotonicTime:0,endTime:0,browserName:``,options:{deviceScaleFactor:1,isMobile:!1,viewport:{width:1280,height:800}},pages:[],resources:[],actions:[],screenshots:[],ariaSnapshots:[],domSnapshots:[],videos:[],events:[],errors:[],stdio:[],hasSource:!1}}function re(e,t){let n=Array(t.length).fill(0);return Array(t.length).fill(0).map((r,i)=>(r,a)=>{n[i]=r/a*t[i]*1e3,e(n.reduce((e,t)=>e+t,0),1e3)})}var ie=15,A=0,j=1,ae=2,M=-2,N=-3,P=-4,F=-5,I=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],oe=1440,se=0,ce=4,le=9,ue=5,de=[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],fe=[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],pe=[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],me=[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],he=[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],ge=[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],_e=15;function ve(){let e=this,t,n,r,i,a,o;function s(e,t,n,s,c,l,u,d,f,p,m){let h,g,_,v,y,b,x,S,C,w,T,E,D,O,k;w=0,y=n;do r[e[t+w]]++,w++,y--;while(y!==0);if(r[0]==n)return u[0]=-1,d[0]=0,A;for(S=d[0],b=1;b<=_e&&r[b]===0;b++);for(x=b,S<b&&(S=b),y=_e;y!==0&&r[y]===0;y--);for(_=y,S>y&&(S=y),d[0]=S,O=1<<b;b<y;b++,O<<=1)if((O-=r[b])<0)return N;if((O-=r[y])<0)return N;for(r[y]+=O,o[1]=b=0,w=1,D=2;--y!==0;)o[D]=b+=r[w],D++,w++;y=0,w=0;do(b=e[t+w])!==0&&(m[o[b]++]=y),w++;while(++y<n);for(n=o[_],o[0]=y=0,w=0,v=-1,E=-S,a[0]=0,T=0,k=0;x<=_;x++)for(h=r[x];h--!==0;){for(;x>E+S;){if(v++,E+=S,k=_-E,k=k>S?S:k,(g=1<<(b=x-E))>h+1&&(g-=h+1,D=x,b<k))for(;++b<k&&!((g<<=1)<=r[++D]);)g-=r[D];if(k=1<<b,p[0]+k>oe)return N;a[v]=T=p[0],p[0]+=k,v===0?u[0]=T:(o[v]=y,i[0]=b,i[1]=S,b=y>>>E-S,i[2]=T-a[v-1]-b,f.set(i,(a[v-1]+b)*3))}for(i[1]=x-E,w>=n?i[0]=192:m[w]<s?(i[0]=m[w]<256?0:96,i[2]=m[w++]):(i[0]=l[m[w]-s]+16+64,i[2]=c[m[w++]-s]),g=1<<x-E,b=y>>>E;b<k;b+=g)f.set(i,(T+b)*3);for(b=1<<x-1;(y&b)!==0;b>>>=1)y^=b;for(y^=b,C=(1<<E)-1;(y&C)!=o[v];)v--,E-=S,C=(1<<E)-1}return O!==0&&_!=1?F:A}function c(e){let s;for(t||(t=[],n=[],r=new Int32Array(16),i=[],a=new Int32Array(_e),o=new Int32Array(16)),n.length<e&&(n=[]),s=0;s<e;s++)n[s]=0;for(s=0;s<16;s++)r[s]=0;for(s=0;s<3;s++)i[s]=0;a.set(r.subarray(0,_e),0),o.set(r.subarray(0,16),0)}e.inflate_trees_bits=function(e,r,i,a,o){let l;return c(19),t[0]=0,l=s(e,0,19,19,null,null,i,r,a,t,n),l==N?o.msg=`oversubscribed dynamic bit lengths tree`:(l==F||r[0]===0)&&(o.msg=`incomplete dynamic bit lengths tree`,l=N),l},e.inflate_trees_dynamic=function(e,r,i,a,o,l,u,d,f){let p;return c(288),t[0]=0,p=s(i,0,e,257,pe,me,l,a,d,t,n),p!=A||a[0]===0?(p==N?f.msg=`oversubscribed literal/length tree`:p!=P&&(f.msg=`incomplete literal/length tree`,p=N),p):(c(288),p=s(i,e,r,0,he,ge,u,o,d,t,n),p!=A||o[0]===0&&e>257?(p==N?f.msg=`oversubscribed distance tree`:p==F?(f.msg=`incomplete distance tree`,p=N):p!=P&&(f.msg=`empty distance tree with lengths`,p=N),p):A)}}ve.inflate_trees_fixed=function(e,t,n,r){return e[0]=le,t[0]=ue,n[0]=de,r[0]=fe,A};var ye=0,be=1,xe=2,Se=3,Ce=4,we=5,Te=6,Ee=7,De=8,Oe=9;function ke(){let e=this,t,n=0,r,i=0,a=0,o=0,s=0,c=0,l=0,u=0,d,f=0,p,m=0;function h(e,t,n,r,i,a,o,s){let c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C;m=s.next_in_index,h=s.avail_in,f=o.bitb,p=o.bitk,g=o.write,_=g<o.read?o.read-g-1:o.end-g,v=I[e],y=I[t];do{for(;p<20;)h--,f|=(s.read_byte(m++)&255)<<p,p+=8;if(c=f&v,l=n,u=r,C=(u+c)*3,(d=l[C])===0){f>>=l[C+1],p-=l[C+1],o.win[g++]=l[C+2],_--;continue}do{if(f>>=l[C+1],p-=l[C+1],d&16){for(d&=15,b=l[C+2]+(f&I[d]),f>>=d,p-=d;p<15;)h--,f|=(s.read_byte(m++)&255)<<p,p+=8;c=f&y,l=i,u=a,C=(u+c)*3,d=l[C];do if(f>>=l[C+1],p-=l[C+1],d&16){for(d&=15;p<d;)h--,f|=(s.read_byte(m++)&255)<<p,p+=8;if(x=l[C+2]+(f&I[d]),f>>=d,p-=d,_-=b,g>=x)S=g-x,g-S>0&&2>g-S?(o.win[g++]=o.win[S++],o.win[g++]=o.win[S++],b-=2):(o.win.set(o.win.subarray(S,S+2),g),g+=2,S+=2,b-=2);else{S=g-x;do S+=o.end;while(S<0);if(d=o.end-S,b>d){if(b-=d,g-S>0&&d>g-S)do o.win[g++]=o.win[S++];while(--d!==0);else o.win.set(o.win.subarray(S,S+d),g),g+=d,S+=d,d=0;S=0}}if(g-S>0&&b>g-S)do o.win[g++]=o.win[S++];while(--b!==0);else o.win.set(o.win.subarray(S,S+b),g),g+=b,S+=b,b=0;break}else if(!(d&64))c+=l[C+2],c+=f&I[d],C=(u+c)*3,d=l[C];else return s.msg=`invalid distance code`,b=s.avail_in-h,b=p>>3<b?p>>3:b,h+=b,m-=b,p-=b<<3,o.bitb=f,o.bitk=p,s.avail_in=h,s.total_in+=m-s.next_in_index,s.next_in_index=m,o.write=g,N;while(!0);break}if(!(d&64)){if(c+=l[C+2],c+=f&I[d],C=(u+c)*3,(d=l[C])===0){f>>=l[C+1],p-=l[C+1],o.win[g++]=l[C+2],_--;break}}else if(d&32)return b=s.avail_in-h,b=p>>3<b?p>>3:b,h+=b,m-=b,p-=b<<3,o.bitb=f,o.bitk=p,s.avail_in=h,s.total_in+=m-s.next_in_index,s.next_in_index=m,o.write=g,j;else return s.msg=`invalid literal/length code`,b=s.avail_in-h,b=p>>3<b?p>>3:b,h+=b,m-=b,p-=b<<3,o.bitb=f,o.bitk=p,s.avail_in=h,s.total_in+=m-s.next_in_index,s.next_in_index=m,o.write=g,N}while(!0)}while(_>=258&&h>=10);return b=s.avail_in-h,b=p>>3<b?p>>3:b,h+=b,m-=b,p-=b<<3,o.bitb=f,o.bitk=p,s.avail_in=h,s.total_in+=m-s.next_in_index,s.next_in_index=m,o.write=g,A}e.init=function(e,n,i,a,o,s){t=ye,l=e,u=n,d=i,f=a,p=o,m=s,r=null},e.proc=function(e,g,_){let v,y,b,x=0,S=0,C=0,w,T,E,D;for(C=g.next_in_index,w=g.avail_in,x=e.bitb,S=e.bitk,T=e.write,E=T<e.read?e.read-T-1:e.end-T;;)switch(t){case ye:if(E>=258&&w>=10&&(e.bitb=x,e.bitk=S,g.avail_in=w,g.total_in+=C-g.next_in_index,g.next_in_index=C,e.write=T,_=h(l,u,d,f,p,m,e,g),C=g.next_in_index,w=g.avail_in,x=e.bitb,S=e.bitk,T=e.write,E=T<e.read?e.read-T-1:e.end-T,_!=A)){t=_==j?Ee:Oe;break}a=l,r=d,i=f,t=be;case be:for(v=a;S<v;){if(w!==0)_=A;else return e.bitb=x,e.bitk=S,g.avail_in=w,g.total_in+=C-g.next_in_index,g.next_in_index=C,e.write=T,e.inflate_flush(g,_);w--,x|=(g.read_byte(C++)&255)<<S,S+=8}if(y=(i+(x&I[v]))*3,x>>>=r[y+1],S-=r[y+1],b=r[y],b===0){o=r[y+2],t=Te;break}if(b&16){s=b&15,n=r[y+2],t=xe;break}if(!(b&64)){a=b,i=y/3+r[y+2];break}if(b&32){t=Ee;break}return t=Oe,g.msg=`invalid literal/length code`,_=N,e.bitb=x,e.bitk=S,g.avail_in=w,g.total_in+=C-g.next_in_index,g.next_in_index=C,e.write=T,e.inflate_flush(g,_);case xe:for(v=s;S<v;){if(w!==0)_=A;else return e.bitb=x,e.bitk=S,g.avail_in=w,g.total_in+=C-g.next_in_index,g.next_in_index=C,e.write=T,e.inflate_flush(g,_);w--,x|=(g.read_byte(C++)&255)<<S,S+=8}n+=x&I[v],x>>=v,S-=v,a=u,r=p,i=m,t=Se;case Se:for(v=a;S<v;){if(w!==0)_=A;else return e.bitb=x,e.bitk=S,g.avail_in=w,g.total_in+=C-g.next_in_index,g.next_in_index=C,e.write=T,e.inflate_flush(g,_);w--,x|=(g.read_byte(C++)&255)<<S,S+=8}if(y=(i+(x&I[v]))*3,x>>=r[y+1],S-=r[y+1],b=r[y],b&16){s=b&15,c=r[y+2],t=Ce;break}if(!(b&64)){a=b,i=y/3+r[y+2];break}return t=Oe,g.msg=`invalid distance code`,_=N,e.bitb=x,e.bitk=S,g.avail_in=w,g.total_in+=C-g.next_in_index,g.next_in_index=C,e.write=T,e.inflate_flush(g,_);case Ce:for(v=s;S<v;){if(w!==0)_=A;else return e.bitb=x,e.bitk=S,g.avail_in=w,g.total_in+=C-g.next_in_index,g.next_in_index=C,e.write=T,e.inflate_flush(g,_);w--,x|=(g.read_byte(C++)&255)<<S,S+=8}c+=x&I[v],x>>=v,S-=v,t=we;case we:for(D=T-c;D<0;)D+=e.end;for(;n!==0;){if(E===0&&(T==e.end&&e.read!==0&&(T=0,E=T<e.read?e.read-T-1:e.end-T),E===0&&(e.write=T,_=e.inflate_flush(g,_),T=e.write,E=T<e.read?e.read-T-1:e.end-T,T==e.end&&e.read!==0&&(T=0,E=T<e.read?e.read-T-1:e.end-T),E===0)))return e.bitb=x,e.bitk=S,g.avail_in=w,g.total_in+=C-g.next_in_index,g.next_in_index=C,e.write=T,e.inflate_flush(g,_);e.win[T++]=e.win[D++],E--,D==e.end&&(D=0),n--}t=ye;break;case Te:if(E===0&&(T==e.end&&e.read!==0&&(T=0,E=T<e.read?e.read-T-1:e.end-T),E===0&&(e.write=T,_=e.inflate_flush(g,_),T=e.write,E=T<e.read?e.read-T-1:e.end-T,T==e.end&&e.read!==0&&(T=0,E=T<e.read?e.read-T-1:e.end-T),E===0)))return e.bitb=x,e.bitk=S,g.avail_in=w,g.total_in+=C-g.next_in_index,g.next_in_index=C,e.write=T,e.inflate_flush(g,_);_=A,e.win[T++]=o,E--,t=ye;break;case Ee:if(S>7&&(S-=8,w++,C--),e.write=T,_=e.inflate_flush(g,_),T=e.write,E=T<e.read?e.read-T-1:e.end-T,e.read!=e.write)return e.bitb=x,e.bitk=S,g.avail_in=w,g.total_in+=C-g.next_in_index,g.next_in_index=C,e.write=T,e.inflate_flush(g,_);t=De;case De:return _=j,e.bitb=x,e.bitk=S,g.avail_in=w,g.total_in+=C-g.next_in_index,g.next_in_index=C,e.write=T,e.inflate_flush(g,_);case Oe:return _=N,e.bitb=x,e.bitk=S,g.avail_in=w,g.total_in+=C-g.next_in_index,g.next_in_index=C,e.write=T,e.inflate_flush(g,_);default:return _=M,e.bitb=x,e.bitk=S,g.avail_in=w,g.total_in+=C-g.next_in_index,g.next_in_index=C,e.write=T,e.inflate_flush(g,_)}},e.free=function(){}}var Ae=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],je=0,Me=1,Ne=2,Pe=3,Fe=4,Ie=5,Le=6,Re=7,ze=8,L=9;function Be(e,t){let n=this,r=je,i=0,a=0,o=0,s,c=[0],l=[0],u=new ke,d=0,f=new Int32Array(oe*3),p=new ve;n.bitk=0,n.bitb=0,n.win=new Uint8Array(t),n.end=t,n.read=0,n.write=0,n.reset=function(e,t){t&&(t[0]=0),r==Le&&u.free(e),r=je,n.bitk=0,n.bitb=0,n.read=n.write=0},n.reset(e,null),n.inflate_flush=function(e,t){let r,i,a;return i=e.next_out_index,a=n.read,r=(a<=n.write?n.write:n.end)-a,r>e.avail_out&&(r=e.avail_out),r!==0&&t==F&&(t=A),e.avail_out-=r,e.total_out+=r,e.next_out.set(n.win.subarray(a,a+r),i),i+=r,a+=r,a==n.end&&(a=0,n.write==n.end&&(n.write=0),r=n.write-a,r>e.avail_out&&(r=e.avail_out),r!==0&&t==F&&(t=A),e.avail_out-=r,e.total_out+=r,e.next_out.set(n.win.subarray(a,a+r),i),i+=r,a+=r),e.next_out_index=i,n.read=a,t},n.proc=function(e,t){let m,h,g,_,v,y,b,x;for(_=e.next_in_index,v=e.avail_in,h=n.bitb,g=n.bitk,y=n.write,b=y<n.read?n.read-y-1:n.end-y;;){let S,C,w,T,E,D,O,k;switch(r){case je:for(;g<3;){if(v!==0)t=A;else return n.bitb=h,n.bitk=g,e.avail_in=v,e.total_in+=_-e.next_in_index,e.next_in_index=_,n.write=y,n.inflate_flush(e,t);v--,h|=(e.read_byte(_++)&255)<<g,g+=8}switch(m=h&7,d=m&1,m>>>1){case 0:h>>>=3,g-=3,m=g&7,h>>>=m,g-=m,r=Me;break;case 1:S=[],C=[],w=[[]],T=[[]],ve.inflate_trees_fixed(S,C,w,T),u.init(S[0],C[0],w[0],0,T[0],0),h>>>=3,g-=3,r=Le;break;case 2:h>>>=3,g-=3,r=Pe;break;case 3:return h>>>=3,g-=3,r=L,e.msg=`invalid block type`,t=N,n.bitb=h,n.bitk=g,e.avail_in=v,e.total_in+=_-e.next_in_index,e.next_in_index=_,n.write=y,n.inflate_flush(e,t)}break;case Me:for(;g<32;){if(v!==0)t=A;else return n.bitb=h,n.bitk=g,e.avail_in=v,e.total_in+=_-e.next_in_index,e.next_in_index=_,n.write=y,n.inflate_flush(e,t);v--,h|=(e.read_byte(_++)&255)<<g,g+=8}if((~h>>>16&65535)!=(h&65535))return r=L,e.msg=`invalid stored block lengths`,t=N,n.bitb=h,n.bitk=g,e.avail_in=v,e.total_in+=_-e.next_in_index,e.next_in_index=_,n.write=y,n.inflate_flush(e,t);i=h&65535,h=g=0,r=i===0?d===0?je:Re:Ne;break;case Ne:if(v===0||b===0&&(y==n.end&&n.read!==0&&(y=0,b=y<n.read?n.read-y-1:n.end-y),b===0&&(n.write=y,t=n.inflate_flush(e,t),y=n.write,b=y<n.read?n.read-y-1:n.end-y,y==n.end&&n.read!==0&&(y=0,b=y<n.read?n.read-y-1:n.end-y),b===0)))return n.bitb=h,n.bitk=g,e.avail_in=v,e.total_in+=_-e.next_in_index,e.next_in_index=_,n.write=y,n.inflate_flush(e,t);if(t=A,m=i,m>v&&(m=v),m>b&&(m=b),n.win.set(e.read_buf(_,m),y),_+=m,v-=m,y+=m,b-=m,(i-=m)!==0)break;r=d===0?je:Re;break;case Pe:for(;g<14;){if(v!==0)t=A;else return n.bitb=h,n.bitk=g,e.avail_in=v,e.total_in+=_-e.next_in_index,e.next_in_index=_,n.write=y,n.inflate_flush(e,t);v--,h|=(e.read_byte(_++)&255)<<g,g+=8}if(a=m=h&16383,(m&31)>29||(m>>5&31)>29)return r=L,e.msg=`too many length or distance symbols`,t=N,n.bitb=h,n.bitk=g,e.avail_in=v,e.total_in+=_-e.next_in_index,e.next_in_index=_,n.write=y,n.inflate_flush(e,t);if(m=258+(m&31)+(m>>5&31),!s||s.length<m)s=[];else for(x=0;x<m;x++)s[x]=0;h>>>=14,g-=14,o=0,r=Fe;case Fe:for(;o<4+(a>>>10);){for(;g<3;){if(v!==0)t=A;else return n.bitb=h,n.bitk=g,e.avail_in=v,e.total_in+=_-e.next_in_index,e.next_in_index=_,n.write=y,n.inflate_flush(e,t);v--,h|=(e.read_byte(_++)&255)<<g,g+=8}s[Ae[o++]]=h&7,h>>>=3,g-=3}for(;o<19;)s[Ae[o++]]=0;if(c[0]=7,m=p.inflate_trees_bits(s,c,l,f,e),m!=A)return t=m,t==N&&(s=null,r=L),n.bitb=h,n.bitk=g,e.avail_in=v,e.total_in+=_-e.next_in_index,e.next_in_index=_,n.write=y,n.inflate_flush(e,t);o=0,r=Ie;case Ie:for(;m=a,!(o>=258+(m&31)+(m>>5&31));){let i,u;for(m=c[0];g<m;){if(v!==0)t=A;else return n.bitb=h,n.bitk=g,e.avail_in=v,e.total_in+=_-e.next_in_index,e.next_in_index=_,n.write=y,n.inflate_flush(e,t);v--,h|=(e.read_byte(_++)&255)<<g,g+=8}if(m=f[(l[0]+(h&I[m]))*3+1],u=f[(l[0]+(h&I[m]))*3+2],u<16)h>>>=m,g-=m,s[o++]=u;else{for(x=u==18?7:u-14,i=u==18?11:3;g<m+x;){if(v!==0)t=A;else return n.bitb=h,n.bitk=g,e.avail_in=v,e.total_in+=_-e.next_in_index,e.next_in_index=_,n.write=y,n.inflate_flush(e,t);v--,h|=(e.read_byte(_++)&255)<<g,g+=8}if(h>>>=m,g-=m,i+=h&I[x],h>>>=x,g-=x,x=o,m=a,x+i>258+(m&31)+(m>>5&31)||u==16&&x<1)return s=null,r=L,e.msg=`invalid bit length repeat`,t=N,n.bitb=h,n.bitk=g,e.avail_in=v,e.total_in+=_-e.next_in_index,e.next_in_index=_,n.write=y,n.inflate_flush(e,t);u=u==16?s[x-1]:0;do s[x++]=u;while(--i!==0);o=x}}if(l[0]=-1,E=[],D=[],O=[],k=[],E[0]=9,D[0]=6,m=a,m=p.inflate_trees_dynamic(257+(m&31),1+(m>>5&31),s,E,D,O,k,f,e),m!=A)return m==N&&(s=null,r=L),t=m,n.bitb=h,n.bitk=g,e.avail_in=v,e.total_in+=_-e.next_in_index,e.next_in_index=_,n.write=y,n.inflate_flush(e,t);u.init(E[0],D[0],f,O[0],f,k[0]),r=Le;case Le:if(n.bitb=h,n.bitk=g,e.avail_in=v,e.total_in+=_-e.next_in_index,e.next_in_index=_,n.write=y,(t=u.proc(n,e,t))!=j)return n.inflate_flush(e,t);if(t=A,u.free(e),_=e.next_in_index,v=e.avail_in,h=n.bitb,g=n.bitk,y=n.write,b=y<n.read?n.read-y-1:n.end-y,d===0){r=je;break}r=Re;case Re:if(n.write=y,t=n.inflate_flush(e,t),y=n.write,b=y<n.read?n.read-y-1:n.end-y,n.read!=n.write)return n.bitb=h,n.bitk=g,e.avail_in=v,e.total_in+=_-e.next_in_index,e.next_in_index=_,n.write=y,n.inflate_flush(e,t);r=ze;case ze:return t=j,n.bitb=h,n.bitk=g,e.avail_in=v,e.total_in+=_-e.next_in_index,e.next_in_index=_,n.write=y,n.inflate_flush(e,t);case L:return t=N,n.bitb=h,n.bitk=g,e.avail_in=v,e.total_in+=_-e.next_in_index,e.next_in_index=_,n.write=y,n.inflate_flush(e,t);default:return t=M,n.bitb=h,n.bitk=g,e.avail_in=v,e.total_in+=_-e.next_in_index,e.next_in_index=_,n.write=y,n.inflate_flush(e,t)}}},n.free=function(e){n.reset(e,null),n.win=null,f=null},n.set_dictionary=function(e,t,r){n.win.set(e.subarray(t,t+r),0),n.read=n.write=r},n.sync_point=function(){return+(r==Me)}}var Ve=32,He=8,Ue=0,We=1,Ge=2,Ke=3,qe=4,Je=5,Ye=6,Xe=7,Ze=12,R=13,Qe=[0,0,255,255];function $e(){let e=this;e.mode=0,e.method=0,e.was=[0],e.need=0,e.marker=0,e.wbits=0;function t(e){return!e||!e.istate?M:(e.total_in=e.total_out=0,e.msg=null,e.istate.mode=Xe,e.istate.blocks.reset(e,null),A)}e.inflateEnd=function(t){return e.blocks&&e.blocks.free(t),e.blocks=null,A},e.inflateInit=function(n,r){return n.msg=null,e.blocks=null,r<8||r>15?(e.inflateEnd(n),M):(e.wbits=r,n.istate.blocks=new Be(n,1<<r),t(n),A)},e.inflate=function(e,t){let n,r;if(!e||!e.istate||!e.next_in)return M;let i=e.istate;for(t=t==ce?F:A,n=F;;)switch(i.mode){case Ue:if(e.avail_in===0)return n;if(n=t,e.avail_in--,e.total_in++,((i.method=e.read_byte(e.next_in_index++))&15)!=He){i.mode=R,e.msg=`unknown compression method`,i.marker=5;break}if((i.method>>4)+8>i.wbits){i.mode=R,e.msg=`invalid win size`,i.marker=5;break}i.mode=We;case We:if(e.avail_in===0)return n;if(n=t,e.avail_in--,e.total_in++,r=e.read_byte(e.next_in_index++)&255,((i.method<<8)+r)%31!=0){i.mode=R,e.msg=`incorrect header check`,i.marker=5;break}if((r&Ve)===0){i.mode=Xe;break}i.mode=Ge;case Ge:if(e.avail_in===0)return n;n=t,e.avail_in--,e.total_in++,i.need=(e.read_byte(e.next_in_index++)&255)<<24&4278190080,i.mode=Ke;case Ke:if(e.avail_in===0)return n;n=t,e.avail_in--,e.total_in++,i.need+=(e.read_byte(e.next_in_index++)&255)<<16&16711680,i.mode=qe;case qe:if(e.avail_in===0)return n;n=t,e.avail_in--,e.total_in++,i.need+=(e.read_byte(e.next_in_index++)&255)<<8&65280,i.mode=Je;case Je:return e.avail_in===0?n:(n=t,e.avail_in--,e.total_in++,i.need+=e.read_byte(e.next_in_index++)&255,i.mode=Ye,ae);case Ye:return i.mode=R,e.msg=`need dictionary`,i.marker=0,M;case Xe:if(n=i.blocks.proc(e,n),n==N){i.mode=R,i.marker=0;break}if(n==A&&(n=t),n!=j)return n;n=t,i.blocks.reset(e,i.was),i.mode=Ze;case Ze:return e.avail_in=0,j;case R:return N;default:return M}},e.inflateSetDictionary=function(e,t,n){let r=0,i=n;if(!e||!e.istate||e.istate.mode!=Ye)return M;let a=e.istate;return i>=1<<a.wbits&&(i=(1<<a.wbits)-1,r=n-i),a.blocks.set_dictionary(t,r,i),a.mode=Xe,A},e.inflateSync=function(e){let n,r,i,a,o;if(!e||!e.istate)return M;let s=e.istate;if(s.mode!=R&&(s.mode=R,s.marker=0),(n=e.avail_in)===0)return F;for(r=e.next_in_index,i=s.marker;n!==0&&i<4;)e.read_byte(r)==Qe[i]?i++:i=e.read_byte(r)===0?4-i:0,r++,n--;return e.total_in+=r-e.next_in_index,e.next_in_index=r,e.avail_in=n,s.marker=i,i==4?(a=e.total_in,o=e.total_out,t(e),e.total_in=a,e.total_out=o,s.mode=Xe,A):N},e.inflateSyncPoint=function(e){return!e||!e.istate||!e.istate.blocks?M:e.istate.blocks.sync_point()}}function et(){}et.prototype={inflateInit(e){let t=this;return t.istate=new $e,e||=ie,t.istate.inflateInit(t,e)},inflate(e){let t=this;return t.istate?t.istate.inflate(t,e):M},inflateEnd(){let e=this;if(!e.istate)return M;let t=e.istate.inflateEnd(e);return e.istate=null,t},inflateSync(){let e=this;return e.istate?e.istate.inflateSync(e):M},inflateSetDictionary(e,t){let n=this;return n.istate?n.istate.inflateSetDictionary(n,e,t):M},read_byte(e){return this.next_in[e]},read_buf(e,t){return this.next_in.subarray(e,e+t)}};function tt(e){let t=this,n=new et,r=e&&e.chunkSize?Math.floor(e.chunkSize*2):128*1024,i=se,a=new Uint8Array(r),o=!1;n.inflateInit(),n.next_out=a,t.append=function(e,t){let s=[],c,l,u=0,d=0,f=0;if(e.length!==0){n.next_in_index=0,n.next_in=e,n.avail_in=e.length;do{if(n.next_out_index=0,n.avail_out=r,n.avail_in===0&&!o&&(n.next_in_index=0,o=!0),c=n.inflate(i),o&&c===F){if(n.avail_in!==0)throw Error(`inflating: bad input`)}else if(c!==A&&c!==j)throw Error(`inflating: `+n.msg);if((o||c===j)&&n.avail_in===e.length)throw Error(`inflating: bad input`);n.next_out_index&&(n.next_out_index===r?s.push(new Uint8Array(a)):s.push(a.subarray(0,n.next_out_index))),f+=n.next_out_index,t&&n.next_in_index>0&&n.next_in_index!=u&&(t(n.next_in_index),u=n.next_in_index)}while(n.avail_in>0||n.avail_out===0);return s.length>1?(l=new Uint8Array(f),s.forEach(function(e){l.set(e,d),d+=e.length})):l=s[0]?new Uint8Array(s[0]):new Uint8Array,l}},t.flush=function(){n.inflateEnd()}}var nt=4294967295,rt=65535,it=101010256,at=39169,ot=21589,st=28789,ct=25461,lt=6534,ut=2048,dt=`undefined`,ft=class{constructor(e){return class extends TransformStream{constructor(t,n){let r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){let t=r.flush();t&&e.enqueue(t)}})}}}},pt=64,mt=2;try{typeof navigator<`u`&&navigator.hardwareConcurrency&&(mt=navigator.hardwareConcurrency)}catch{}var z=Object.assign({},{chunkSize:512*1024,maxWorkers:mt,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:void 0,CompressionStreamNative:typeof CompressionStream<`u`&&CompressionStream,DecompressionStreamNative:typeof DecompressionStream<`u`&&DecompressionStream});function ht(){return z}function gt(e){return Math.max(e.chunkSize,pt)}function _t(e){let{baseURL:t,chunkSize:n,maxWorkers:r,terminateWorkerTimeout:i,useCompressionStream:a,useWebWorkers:o,Deflate:s,Inflate:c,CompressionStream:l,DecompressionStream:u,workerScripts:d}=e;if(B(`baseURL`,t),B(`chunkSize`,n),B(`maxWorkers`,r),B(`terminateWorkerTimeout`,i),B(`useCompressionStream`,a),B(`useWebWorkers`,o),s&&(z.CompressionStream=new ft(s)),c&&(z.DecompressionStream=new ft(c)),B(`CompressionStream`,l),B(`DecompressionStream`,u),d!==void 0){let{deflate:e,inflate:t}=d;if((e||t)&&(z.workerScripts||={}),e){if(!Array.isArray(e))throw Error(`workerScripts.deflate must be an array`);z.workerScripts.deflate=e}if(t){if(!Array.isArray(t))throw Error(`workerScripts.inflate must be an array`);z.workerScripts.inflate=t}}}function B(e,t){t!==void 0&&(z[e]=t)}function vt(){return`application/octet-stream`}var yt=[];for(let e=0;e<256;e++){let t=e;for(let e=0;e<8;e++)t&1?t=t>>>1^3988292384:t>>>=1;yt[e]=t}var bt=class{constructor(e){this.crc=e||-1}append(e){let t=this.crc|0;for(let n=0,r=e.length|0;n<r;n++)t=t>>>8^yt[(t^e[n])&255];this.crc=t}get(){return~this.crc}},xt=class extends TransformStream{constructor(){let e,t=new bt;super({transform(e,n){t.append(e),n.enqueue(e)},flush(){let n=new Uint8Array(4);new DataView(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}};function St(e){if(typeof TextEncoder>`u`){e=unescape(encodeURIComponent(e));let t=new Uint8Array(e.length);for(let n=0;n<t.length;n++)t[n]=e.charCodeAt(n);return t}else return new TextEncoder().encode(e)}var V={concat(e,t){if(e.length===0||t.length===0)return e.concat(t);let n=e[e.length-1],r=V.getPartial(n);return r===32?e.concat(t):V._shiftRight(t,r,n|0,e.slice(0,e.length-1))},bitLength(e){let t=e.length;if(t===0)return 0;let n=e[t-1];return(t-1)*32+V.getPartial(n)},clamp(e,t){if(e.length*32<t)return e;e=e.slice(0,Math.ceil(t/32));let n=e.length;return t&=31,n>0&&t&&(e[n-1]=V.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial(e,t,n){return e===32?t:(n?t|0:t<<32-e)+e*1099511627776},getPartial(e){return Math.round(e/1099511627776)||32},_shiftRight(e,t,n,r){for(r===void 0&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(t===0)return r.concat(e);for(let i=0;i<e.length;i++)r.push(n|e[i]>>>t),n=e[i]<<32-t;let i=e.length?e[e.length-1]:0,a=V.getPartial(i);return r.push(V.partial(t+a&31,t+a>32?n:r.pop(),1)),r}},Ct={bytes:{fromBits(e){let t=V.bitLength(e)/8,n=new Uint8Array(t),r;for(let i=0;i<t;i++)i&3||(r=e[i/4]),n[i]=r>>>24,r<<=8;return n},toBits(e){let t=[],n,r=0;for(n=0;n<e.length;n++)r=r<<8|e[n],(n&3)==3&&(t.push(r),r=0);return n&3&&t.push(V.partial(8*(n&3),r)),t}}},wt={};wt.sha1=class{constructor(e){let t=this;t.blockSize=512,t._init=[1732584193,4023233417,2562383102,271733878,3285377520],t._key=[1518500249,1859775393,2400959708,3395469782],e?(t._h=e._h.slice(0),t._buffer=e._buffer.slice(0),t._length=e._length):t.reset()}reset(){let e=this;return e._h=e._init.slice(0),e._buffer=[],e._length=0,e}update(e){let t=this;typeof e==`string`&&(e=Ct.utf8String.toBits(e));let n=t._buffer=V.concat(t._buffer,e),r=t._length,i=t._length=r+V.bitLength(e);if(i>9007199254740991)throw Error(`Cannot hash more than 2^53 - 1 bits`);let a=new Uint32Array(n),o=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);e<=i;e+=t.blockSize)t._block(a.subarray(16*o,16*(o+1))),o+=1;return n.splice(0,16*o),t}finalize(){let e=this,t=e._buffer,n=e._h;t=V.concat(t,[V.partial(1,1)]);for(let e=t.length+2;e&15;e++)t.push(0);for(t.push(Math.floor(e._length/4294967296)),t.push(e._length|0);t.length;)e._block(t.splice(0,16));return e.reset(),n}_f(e,t,n,r){if(e<=19)return t&n|~t&r;if(e<=39)return t^n^r;if(e<=59)return t&n|t&r|n&r;if(e<=79)return t^n^r}_S(e,t){return t<<e|t>>>32-e}_block(e){let t=this,n=t._h,r=Array(80);for(let t=0;t<16;t++)r[t]=e[t];let i=n[0],a=n[1],o=n[2],s=n[3],c=n[4];for(let e=0;e<=79;e++){e>=16&&(r[e]=t._S(1,r[e-3]^r[e-8]^r[e-14]^r[e-16]));let n=t._S(5,i)+t._f(e,a,o,s)+c+r[e]+t._key[Math.floor(e/20)]|0;c=s,s=o,o=t._S(30,a),a=i,i=n}n[0]=n[0]+i|0,n[1]=n[1]+a|0,n[2]=n[2]+o|0,n[3]=n[3]+s|0,n[4]=n[4]+c|0}};var Tt={};Tt.aes=class{constructor(e){let t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();let n=t._tables[0][4],r=t._tables[1],i=e.length,a,o,s,c=1;if(i!==4&&i!==6&&i!==8)throw Error(`invalid aes key size`);for(t._key=[o=e.slice(0),s=[]],a=i;a<4*i+28;a++){let e=o[a-1];(a%i===0||i===8&&a%i===4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[e&255],a%i===0&&(e=e<<8^e>>>24^c<<24,c=c<<1^(c>>7)*283)),o[a]=o[a-i]^e}for(let e=0;a;e++,a--){let t=o[e&3?a:a-4];a<=4||e<4?s[e]=t:s[e]=r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[t&255]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){let e=this._tables[0],t=this._tables[1],n=e[4],r=t[4],i=[],a=[],o,s,c,l;for(let e=0;e<256;e++)a[(i[e]=e<<1^(e>>7)*283)^e]=e;for(let u=o=0;!n[u];u^=s||1,o=a[o]||1){let a=o^o<<1^o<<2^o<<3^o<<4;a=a>>8^a&255^99,n[u]=a,r[a]=u,l=i[c=i[s=i[u]]];let d=l*16843009^c*65537^s*257^u*16843008,f=i[a]*257^a*16843008;for(let n=0;n<4;n++)e[n][u]=f=f<<24^f>>>8,t[n][a]=d=d<<24^d>>>8}for(let n=0;n<5;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}_crypt(e,t){if(e.length!==4)throw Error(`invalid aes block size`);let n=this._key[t],r=n.length/4-2,i=[0,0,0,0],a=this._tables[t],o=a[0],s=a[1],c=a[2],l=a[3],u=a[4],d=e[0]^n[0],f=e[t?3:1]^n[1],p=e[2]^n[2],m=e[t?1:3]^n[3],h=4,g,_,v;for(let e=0;e<r;e++)g=o[d>>>24]^s[f>>16&255]^c[p>>8&255]^l[m&255]^n[h],_=o[f>>>24]^s[p>>16&255]^c[m>>8&255]^l[d&255]^n[h+1],v=o[p>>>24]^s[m>>16&255]^c[d>>8&255]^l[f&255]^n[h+2],m=o[m>>>24]^s[d>>16&255]^c[f>>8&255]^l[p&255]^n[h+3],h+=4,d=g,f=_,p=v;for(let e=0;e<4;e++)i[t?3&-e:e]=u[d>>>24]<<24^u[f>>16&255]<<16^u[p>>8&255]<<8^u[m&255]^n[h++],g=d,d=f,f=p,p=m,m=g;return i}};var Et={getRandomValues(e){let t=new Uint32Array(e.buffer),n=e=>{let t=987654321,n=4294967295;return function(){return t=36969*(t&65535)+(t>>16)&n,e=18e3*(e&65535)+(e>>16)&n,(((t<<16)+e&n)/4294967296+.5)*(Math.random()>.5?1:-1)}};for(let r=0,i;r<e.length;r+=4){let e=n((i||Math.random())*4294967296);i=e()*987654071,t[r/4]=e()*4294967296|0}return e}},Dt={};Dt.ctrGladman=class{constructor(e,t){this._prf=e,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(e){return this.calculate(this._prf,e,this._iv)}incWord(e){if((e>>24&255)==255){let t=e>>16&255,n=e>>8&255,r=e&255;t===255?(t=0,n===255?(n=0,r===255?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}incCounter(e){(e[0]=this.incWord(e[0]))===0&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let r;if(!(r=t.length))return[];let i=V.bitLength(t);for(let i=0;i<r;i+=4){this.incCounter(n);let r=e.encrypt(n);t[i]^=r[0],t[i+1]^=r[1],t[i+2]^=r[2],t[i+3]^=r[3]}return V.clamp(t,i)}};var H={importKey(e){return new H.hmacSha1(Ct.bytes.toBits(e))},pbkdf2(e,t,n,r){if(n||=1e4,r<0||n<0)throw Error(`invalid params to pbkdf2`);let i=(r>>5)+1<<2,a,o,s,c,l,u=new ArrayBuffer(i),d=new DataView(u),f=0,p=V;for(t=Ct.bytes.toBits(t),l=1;f<(i||1);l++){for(a=o=e.encrypt(p.concat(t,[l])),s=1;s<n;s++)for(o=e.encrypt(o),c=0;c<o.length;c++)a[c]^=o[c];for(s=0;f<(i||1)&&s<a.length;s++)d.setInt32(f,a[s]),f+=4}return u.slice(0,r/8)}};H.hmacSha1=class{constructor(e){let t=this,n=t._hash=wt.sha1,r=[[],[]];t._baseHash=[new n,new n];let i=t._baseHash[0].blockSize/32;e.length>i&&(e=new n().update(e).finalize());for(let t=0;t<i;t++)r[0][t]=e[t]^909522486,r[1][t]=e[t]^1549556828;t._baseHash[0].update(r[0]),t._baseHash[1].update(r[1]),t._resultHash=new n(t._baseHash[0])}reset(){let e=this;e._resultHash=new e._hash(e._baseHash[0]),e._updated=!1}update(e){let t=this;t._updated=!0,t._resultHash.update(e)}digest(){let e=this,t=e._resultHash.finalize(),n=new e._hash(e._baseHash[1]).update(t).finalize();return e.reset(),n}encrypt(e){if(this._updated)throw Error(`encrypt on already updated hmac called!`);return this.update(e),this.digest(e)}};var Ot=typeof crypto<`u`&&typeof crypto.getRandomValues==`function`,kt=`Invalid password`,At=`Invalid signature`,jt=`zipjs-abort-check-password`;function Mt(e){return Ot?crypto.getRandomValues(e):Et.getRandomValues(e)}var Nt=16,Pt=`raw`,Ft={name:`PBKDF2`},It={name:`HMAC`},Lt=`SHA-1`,Rt=Object.assign({hash:It},Ft),zt=Object.assign({iterations:1e3,hash:{name:Lt}},Ft),Bt=[`deriveBits`],Vt=[8,12,16],Ht=[16,24,32],U=10,Ut=[0,0,0,0],Wt=typeof crypto!=dt,Gt=Wt&&crypto.subtle,Kt=Wt&&Gt!==void 0,W=Ct.bytes,qt=Tt.aes,Jt=Dt.ctrGladman,Yt=H.hmacSha1,Xt=Wt&&Kt&&typeof Gt.importKey==`function`,Zt=Wt&&Kt&&typeof Gt.deriveBits==`function`,Qt=class extends TransformStream{constructor({password:e,rawPassword:t,signed:n,encryptionStrength:r,checkPasswordOnly:i}){super({start(){Object.assign(this,{ready:new Promise(e=>this.resolveReady=e),password:sn(e,t),signed:n,strength:r-1,pending:new Uint8Array})},async transform(e,t){let n=this,{password:r,strength:a,resolveReady:o,ready:s}=n;r?(await tn(n,a,r,G(e,0,Vt[a]+2)),e=G(e,Vt[a]+2),i?t.error(Error(jt)):o()):await s;let c=new Uint8Array(e.length-U-(e.length-U)%Nt);t.enqueue(en(n,e,c,0,U,!0))},async flush(e){let{signed:t,ctr:n,hmac:r,pending:i,ready:a}=this;if(r&&n){await a;let o=G(i,0,i.length-U),s=G(i,i.length-U),c=new Uint8Array;if(o.length){let e=dn(W,o);r.update(e),c=un(W,n.update(e))}if(t){let e=G(un(W,r.digest()),0,U);for(let t=0;t<U;t++)if(e[t]!=s[t])throw Error(At)}e.enqueue(c)}}})}},$t=class extends TransformStream{constructor({password:e,rawPassword:t,encryptionStrength:n}){let r;super({start(){Object.assign(this,{ready:new Promise(e=>this.resolveReady=e),password:sn(e,t),strength:n-1,pending:new Uint8Array})},async transform(e,t){let n=this,{password:r,strength:i,resolveReady:a,ready:o}=n,s=new Uint8Array;r?(s=await nn(n,i,r),a()):await o;let c=new Uint8Array(s.length+e.length-e.length%Nt);c.set(s,0),t.enqueue(en(n,e,c,s.length,0))},async flush(e){let{ctr:t,hmac:n,pending:i,ready:a}=this;if(n&&t){await a;let o=new Uint8Array;if(i.length){let e=t.update(dn(W,i));n.update(e),o=un(W,e)}r.signature=un(W,n.digest()).slice(0,U),e.enqueue(cn(o,r.signature))}}}),r=this}};function en(e,t,n,r,i,a){let{ctr:o,hmac:s,pending:c}=e,l=t.length-i;c.length&&(t=cn(c,t),n=ln(n,l-l%Nt));let u;for(u=0;u<=l-Nt;u+=Nt){let e=dn(W,G(t,u,u+Nt));a&&s.update(e);let i=o.update(e);a||s.update(i),n.set(un(W,i),u+r)}return e.pending=G(t,u),n}async function tn(e,t,n,r){let i=await rn(e,t,n,G(r,0,Vt[t])),a=G(r,Vt[t]);if(i[0]!=a[0]||i[1]!=a[1])throw Error(kt)}async function nn(e,t,n){let r=Mt(new Uint8Array(Vt[t]));return cn(r,await rn(e,t,n,r))}async function rn(e,t,n,r){e.password=null;let i=await an(Pt,n,Rt,!1,Bt),a=await on(Object.assign({salt:r},zt),i,8*(Ht[t]*2+2)),o=new Uint8Array(a),s=dn(W,G(o,0,Ht[t])),c=dn(W,G(o,Ht[t],Ht[t]*2)),l=G(o,Ht[t]*2);return Object.assign(e,{keys:{key:s,authentication:c,passwordVerification:l},ctr:new Jt(new qt(s),Array.from(Ut)),hmac:new Yt(c)}),l}async function an(e,t,n,r,i){if(Xt)try{return await Gt.importKey(e,t,n,r,i)}catch{return Xt=!1,H.importKey(t)}else return H.importKey(t)}async function on(e,t,n){if(Zt)try{return await Gt.deriveBits(e,t,n)}catch{return Zt=!1,H.pbkdf2(t,e.salt,zt.iterations,n)}else return H.pbkdf2(t,e.salt,zt.iterations,n)}function sn(e,t){return t===void 0?St(e):t}function cn(e,t){let n=e;return e.length+t.length&&(n=new Uint8Array(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function ln(e,t){if(t&&t>e.length){let n=e;e=new Uint8Array(t),e.set(n,0)}return e}function G(e,t,n){return e.subarray(t,n)}function un(e,t){return e.fromBits(t)}function dn(e,t){return e.toBits(t)}var fn=12,pn=class extends TransformStream{constructor({password:e,passwordVerification:t,checkPasswordOnly:n}){super({start(){Object.assign(this,{password:e,passwordVerification:t}),_n(this,e)},transform(e,t){let r=this;if(r.password){let t=hn(r,e.subarray(0,fn));if(r.password=null,t.at(-1)!=r.passwordVerification)throw Error(kt);e=e.subarray(fn)}n?t.error(Error(jt)):t.enqueue(hn(r,e))}})}},mn=class extends TransformStream{constructor({password:e,passwordVerification:t}){super({start(){Object.assign(this,{password:e,passwordVerification:t}),_n(this,e)},transform(e,t){let n=this,r,i;if(n.password){n.password=null;let t=Mt(new Uint8Array(fn));t[fn-1]=n.passwordVerification,r=new Uint8Array(e.length+t.length),r.set(gn(n,t),0),i=fn}else r=new Uint8Array(e.length),i=0;r.set(gn(n,e),i),t.enqueue(r)}})}};function hn(e,t){let n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=yn(e)^t[r],vn(e,n[r]);return n}function gn(e,t){let n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=yn(e)^t[r],vn(e,t[r]);return n}function _n(e,t){let n=[305419896,591751049,878082192];Object.assign(e,{keys:n,crcKey0:new bt(n[0]),crcKey2:new bt(n[2])});for(let n=0;n<t.length;n++)vn(e,t.charCodeAt(n))}function vn(e,t){let[n,r,i]=e.keys;e.crcKey0.append([t]),n=~e.crcKey0.get(),r=xn(Math.imul(xn(r+bn(n)),134775813)+1),e.crcKey2.append([r>>>24]),i=~e.crcKey2.get(),e.keys=[n,r,i]}function yn(e){let t=e.keys[2]|2;return bn(Math.imul(t,t^1)>>>8)}function bn(e){return e&255}function xn(e){return e&4294967295}var Sn=`Invalid uncompressed size`,Cn=`deflate-raw`,wn=class extends TransformStream{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});let{compressed:i,encrypted:a,useCompressionStream:o,zipCrypto:s,signed:c,level:l}=e,u=this,d,f,p=super.readable;(!a||s)&&c&&(d=new xt,p=K(p,d)),i&&(p=Dn(p,o,{level:l,chunkSize:t},r,n)),a&&(s?p=K(p,new mn(e)):(f=new $t(e),p=K(p,f))),En(u,p,()=>{let e;a&&!s&&(e=f.signature),(!a||s)&&c&&(e=new DataView(d.value.buffer).getUint32(0)),u.signature=e})}},Tn=class extends TransformStream{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});let{zipCrypto:i,encrypted:a,signed:o,signature:s,compressed:c,useCompressionStream:l}=e,u,d,f=super.readable;a&&(i?f=K(f,new pn(e)):(d=new Qt(e),f=K(f,d))),c&&(f=Dn(f,l,{chunkSize:t},r,n)),(!a||i)&&o&&(u=new xt,f=K(f,u)),En(this,f,()=>{if((!a||i)&&o&&s!=new DataView(u.value.buffer).getUint32(0,!1))throw Error(At)})}};function En(e,t,n){t=K(t,new TransformStream({flush:n})),Object.defineProperty(e,"readable",{get(){return t}})}function Dn(e,t,n,r,i){try{e=K(e,new(t&&r?r:i)(Cn,n))}catch(r){if(t)e=K(e,new i(Cn,n));else throw r}return e}function K(e,t){return e.pipeThrough(t)}var On=`message`,kn=`start`,An=`data`,jn=`close`,Mn=`inflate`,Nn=class extends TransformStream{constructor(e,t){super({});let n=this,{codecType:r}=e,i;r.startsWith(`deflate`)?i=wn:r.startsWith(`inflate`)&&(i=Tn),n.outputSize=0;let a=0,o=new i(e,t),s=super.readable,c=new TransformStream({transform(e,t){e&&e.length&&(a+=e.length,t.enqueue(e))},flush(){Object.assign(n,{inputSize:a})}}),l=new TransformStream({transform(t,r){if(t&&t.length&&(r.enqueue(t),n.outputSize+=t.length,e.outputSize&&n.outputSize>e.outputSize))throw Error(Sn)},flush(){let{signature:e}=o;Object.assign(n,{signature:e,inputSize:a})}});Object.defineProperty(n,"readable",{get(){return s.pipeThrough(c).pipeThrough(o).pipeThrough(l)}})}},Pn=class extends TransformStream{constructor(e){let t;super({transform:n,flush(e){t&&t.length&&e.enqueue(t)}});function n(r,i){if(t){let e=new Uint8Array(t.length+r.length);e.set(t),e.set(r,t.length),r=e,t=null}r.length>e?(i.enqueue(r.slice(0,e)),n(r.slice(e),i)):t=r}}},Fn=typeof Worker!=dt,In=class{constructor(e,{readable:t,writable:n},{options:r,config:i,streamOptions:a,useWebWorkers:o,transferStreams:s,scripts:c},l){let{signal:u}=a;return Object.assign(e,{busy:!0,readable:t.pipeThrough(new Pn(i.chunkSize)).pipeThrough(new Ln(a),{signal:u}),writable:n,options:Object.assign({},r),scripts:c,transferStreams:s,terminate(){return new Promise(t=>{let{worker:n,busy:r}=e;n?(r?e.resolveTerminated=t:(n.terminate(),t()),e.interface=null):t()})},onTaskFinished(){let{resolveTerminated:t}=e;t&&(e.resolveTerminated=null,e.terminated=!0,e.worker.terminate(),t()),e.busy=!1,l(e)}}),(o&&Fn?Bn:zn)(e,i)}},Ln=class extends TransformStream{constructor({onstart:e,onprogress:t,size:n,onend:r}){let i=0;super({async start(){e&&await Rn(e,n)},async transform(e,r){i+=e.length,t&&await Rn(t,i,n),r.enqueue(e)},async flush(){r&&await Rn(r,i)}})}};async function Rn(e,...t){try{await e(...t)}catch{}}function zn(e,t){return{run:()=>Vn(e,t)}}function Bn(e,t){let{baseURL:n,chunkSize:r}=t;if(!e.interface){let i;try{i=Kn(e.scripts[0],n,e)}catch{return Fn=!1,zn(e,t)}Object.assign(e,{worker:i,interface:{run:()=>Hn(e,{chunkSize:r})}})}return e.interface}async function Vn({options:e,readable:t,writable:n,onTaskFinished:r},i){let a;try{a=new Nn(e,i),await t.pipeThrough(a).pipeTo(n,{preventClose:!0,preventAbort:!0});let{signature:r,inputSize:o,outputSize:s}=a;return{signature:r,inputSize:o,outputSize:s}}catch(e){throw a&&(e.outputSize=a.outputSize),e}finally{r()}}async function Hn(e,t){let n,r,i=new Promise((e,t)=>{n=e,r=t});Object.assign(e,{reader:null,writer:null,resolveResult:n,rejectResult:r,result:i});let{readable:a,options:o,scripts:s}=e,{writable:c,closed:l}=Un(e.writable),u=qn({type:kn,scripts:s.slice(1),options:o,config:t,readable:a,writable:c},e);u||Object.assign(e,{reader:a.getReader(),writer:c.getWriter()});let d=await i;return u||await c.getWriter().close(),await l,d}function Un(e){let t,n=new Promise(e=>t=e);return{writable:new WritableStream({async write(t){let n=e.getWriter();await n.ready,await n.write(t),n.releaseLock()},close(){t()},abort(t){return e.getWriter().abort(t)}}),closed:n}}var Wn=!0,Gn=!0;function Kn(e,t,n){let r={type:`module`},i,a;typeof e==`function`&&(e=e());try{i=new URL(e,t)}catch{i=e}if(Wn)try{a=new Worker(i)}catch{Wn=!1,a=new Worker(i,r)}else a=new Worker(i,r);return a.addEventListener(On,e=>Jn(e,n)),a}function qn(e,{worker:t,writer:n,onTaskFinished:r,transferStreams:i}){try{let{value:n,readable:r,writable:a}=e,o=[];if(n&&(n.byteLength<n.buffer.byteLength?e.value=n.buffer.slice(0,n.byteLength):e.value=n.buffer,o.push(e.value)),i&&Gn?(r&&o.push(r),a&&o.push(a)):e.readable=e.writable=null,o.length)try{return t.postMessage(e,o),!0}catch{Gn=!1,e.readable=e.writable=null,t.postMessage(e)}else t.postMessage(e)}catch(e){throw n&&n.releaseLock(),r(),e}}async function Jn({data:e},t){let{type:n,value:r,messageId:i,result:a,error:o}=e,{reader:s,writer:c,resolveResult:l,rejectResult:u,onTaskFinished:d}=t;try{if(o){let{message:e,stack:t,code:n,name:r,outputSize:i}=o,a=Error(e);Object.assign(a,{stack:t,code:n,name:r,outputSize:i}),f(a)}else{if(n==`pull`){let{value:e,done:n}=await s.read();qn({type:An,value:e,done:n,messageId:i},t)}n==`data`&&(await c.ready,await c.write(new Uint8Array(r)),qn({type:`ack`,messageId:i},t)),n==`close`&&f(null,a)}}catch(e){qn({type:jn,messageId:i},t),f(e)}function f(e,t){e?u(e):l(t),c&&c.releaseLock(),d()}}var q=[],Yn=[],Xn=0;async function Zn(e,t){let{options:n,config:r}=t,{transferStreams:i,useWebWorkers:a,useCompressionStream:o,codecType:s,compressed:c,signed:l,encrypted:u}=n,{workerScripts:d,maxWorkers:f}=r;return t.transferStreams=i||i===void 0,t.useWebWorkers=!(!c&&!l&&!u&&!t.transferStreams)&&(a||a===void 0&&r.useWebWorkers),t.scripts=t.useWebWorkers&&d?d[s]:[],n.useCompressionStream=o||o===void 0&&r.useCompressionStream,(await p()).run();async function p(){let n=q.find(e=>!e.busy);if(n)return $n(n),new In(n,e,t,m);if(q.length<f){let n={indexWorker:Xn};return Xn++,q.push(n),new In(n,e,t,m)}else return new Promise(n=>Yn.push({resolve:n,stream:e,workerOptions:t}))}function m(e){if(Yn.length){let[{resolve:t,stream:n,workerOptions:r}]=Yn.splice(0,1);t(new In(e,n,r,m))}else e.worker?($n(e),Qn(e,t)):q=q.filter(t=>t!=e)}}function Qn(e,t){let{config:n}=t,{terminateWorkerTimeout:r}=n;Number.isFinite(r)&&r>=0&&(e.terminated?e.terminated=!1:e.terminateTimeout=setTimeout(async()=>{q=q.filter(t=>t!=e);try{await e.terminate()}catch{}},r))}function $n(e){let{terminateTimeout:t}=e;t&&(clearTimeout(t),e.terminateTimeout=null)}async function er(){await Promise.allSettled(q.map(e=>($n(e),e.terminate())))}var tr=`HTTP error `,nr=`HTTP Range not supported`,rr=`Writer iterator completed too soon`,ir=`Writer not initialized`,ar=`text/plain`,or=`Content-Length`,sr=`Content-Range`,cr=`Accept-Ranges`,lr=`Range`,ur=`Content-Type`,dr=`HEAD`,fr=`GET`,pr=`bytes`,mr=64*1024,hr=`writable`,gr=class{constructor(){this.size=0}init(){this.initialized=!0}},J=class extends gr{get readable(){let e=this,{chunkSize:t=mr}=e,n=new ReadableStream({start(){this.chunkOffset=0},async pull(r){let{offset:i=0,size:a,diskNumberStart:o}=n,{chunkOffset:s}=this,c=a===void 0?t:Math.min(t,a-s),l=await Y(e,i+s,c,o);r.enqueue(l),s+t>a||a===void 0&&!l.length&&c?r.close():this.chunkOffset+=t}});return n}},_r=class extends gr{constructor(){super();let e=this,t=new WritableStream({write(t){if(!e.initialized)throw Error(ir);return e.writeUint8Array(t)}});Object.defineProperty(e,hr,{get(){return t}})}writeUint8Array(){}},vr=class extends J{constructor(e){super();let t=e.length;for(;e.charAt(t-1)==`=`;)t--;let n=e.indexOf(`,`)+1;Object.assign(this,{dataURI:e,dataStart:n,size:Math.floor((t-n)*.75)})}readUint8Array(e,t){let{dataStart:n,dataURI:r}=this,i=new Uint8Array(t),a=Math.floor(e/3)*4,o=atob(r.substring(a+n,Math.ceil((e+t)/3)*4+n)),s=e-Math.floor(a/4)*3,c=0;for(let e=s;e<s+t&&e<o.length;e++)i[e-s]=o.charCodeAt(e),c++;return c<i.length?i.subarray(0,c):i}},yr=class extends _r{constructor(e){super(),Object.assign(this,{data:`data:`+(e||``)+`;base64,`,pending:[]})}writeUint8Array(e){let t=this,n=0,r=t.pending,i=t.pending.length;for(t.pending=``,n=0;n<Math.floor((i+e.length)/3)*3-i;n++)r+=String.fromCharCode(e[n]);for(;n<e.length;n++)t.pending+=String.fromCharCode(e[n]);r.length&&(r.length>2?t.data+=btoa(r):t.pending+=r)}getData(){return this.data+btoa(this.pending)}},br=class extends J{constructor(e){super(),Object.assign(this,{blob:e,size:e.size})}async readUint8Array(e,t){let n=this,r=e+t,i=await(e||r<n.size?n.blob.slice(e,r):n.blob).arrayBuffer();return i.byteLength>t&&(i=i.slice(e,r)),new Uint8Array(i)}},xr=class extends gr{constructor(e){super();let t=this,n=new TransformStream,r=[];e&&r.push([ur,e]),Object.defineProperty(t,hr,{get(){return n.writable}}),t.blob=new Response(n.readable,{headers:r}).blob()}getData(){return this.blob}},Sr=class extends br{constructor(e){super(new Blob([e],{type:ar}))}},Cr=class extends xr{constructor(e){super(e),Object.assign(this,{encoding:e,utf8:!e||e.toLowerCase()==`utf-8`})}async getData(){let{encoding:e,utf8:t}=this,n=await super.getData();if(n.text&&t)return n.text();{let t=new FileReader;return new Promise((r,i)=>{Object.assign(t,{onload:({target:e})=>r(e.result),onerror:()=>i(t.error)}),t.readAsText(n,e)})}}},wr=class extends J{constructor(e,t){super(),Er(this,e,t)}async init(){await Dr(this,Fr,jr),super.init()}readUint8Array(e,t){return Or(this,e,t,Fr,jr)}},Tr=class extends J{constructor(e,t){super(),Er(this,e,t)}async init(){await Dr(this,Ir,Mr),super.init()}readUint8Array(e,t){return Or(this,e,t,Ir,Mr)}};function Er(e,t,n){let{preventHeadRequest:r,useRangeHeader:i,forceRangeRequests:a,combineSizeEocd:o}=n;n=Object.assign({},n),delete n.preventHeadRequest,delete n.useRangeHeader,delete n.forceRangeRequests,delete n.combineSizeEocd,delete n.useXHR,Object.assign(e,{url:t,options:n,preventHeadRequest:r,useRangeHeader:i,forceRangeRequests:a,combineSizeEocd:o})}async function Dr(e,t,n){let{url:r,preventHeadRequest:i,useRangeHeader:a,forceRangeRequests:o,combineSizeEocd:s}=e;if(Gr(r)&&(a||o)&&(i===void 0||i)){let r=await t(fr,e,kr(e,s?-22:void 0));if(!o&&r.headers.get(cr)!=pr)throw Error(nr);{s&&(e.eocdCache=new Uint8Array(await r.arrayBuffer()));let i,a=r.headers.get(sr);if(a){let e=a.trim().split(/\s*\/\s*/);if(e.length){let t=e[1];t&&t!=`*`&&(i=Number(t))}}i===void 0?await Pr(e,t,n):e.size=i}}else await Pr(e,t,n)}async function Or(e,t,n,r,i){let{useRangeHeader:a,forceRangeRequests:o,eocdCache:s,size:c,options:l}=e;if(a||o){if(s&&t==c-22&&n==22)return s;if(t>=c)return new Uint8Array;{t+n>c&&(n=c-t);let i=await r(fr,e,kr(e,t,n));if(i.status!=206)throw Error(nr);return new Uint8Array(await i.arrayBuffer())}}else{let{data:r}=e;return r||await i(e,l),new Uint8Array(e.data.subarray(t,t+n))}}function kr(e,t=0,n=1){return Object.assign({},Ar(e),{[lr]:`bytes=`+(t<0?t:t+`-`+(t+n-1))})}function Ar({options:e}){let{headers:t}=e;if(t)return Symbol.iterator in t?Object.fromEntries(t):t}async function jr(e){await Nr(e,Fr)}async function Mr(e){await Nr(e,Ir)}async function Nr(e,t){let n=await t(fr,e,Ar(e));e.data=new Uint8Array(await n.arrayBuffer()),e.size||=e.data.length}async function Pr(e,t,n){if(e.preventHeadRequest)await n(e,e.options);else{let r=(await t(dr,e,Ar(e))).headers.get(or);r?e.size=Number(r):await n(e,e.options)}}async function Fr(e,{options:t,url:n},r){let i=await fetch(n,Object.assign({},t,{method:e,headers:r}));if(i.status<400)return i;throw i.status==416?Error(nr):Error(tr+(i.statusText||i.status))}function Ir(e,{url:t},n){return new Promise((r,i)=>{let a=new XMLHttpRequest;if(a.addEventListener(`load`,()=>{if(a.status<400){let e=[];a.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach(t=>{let n=t.trim().split(/\s*:\s*/);n[0]=n[0].trim().replace(/^[a-z]|-[a-z]/g,e=>e.toUpperCase()),e.push(n)}),r({status:a.status,arrayBuffer:()=>a.response,headers:new Map(e)})}else i(a.status==416?Error(nr):Error(tr+(a.statusText||a.status)))},!1),a.addEventListener(`error`,e=>i(e.detail?e.detail.error:Error(`Network error`)),!1),a.open(e,t),n)for(let e of Object.entries(n))a.setRequestHeader(e[0],e[1]);a.responseType=`arraybuffer`,a.send()})}var Lr=class extends J{constructor(e,t={}){super(),Object.assign(this,{url:e,reader:t.useXHR?new Tr(e,t):new wr(e,t)})}set size(e){}get size(){return this.reader.size}async init(){await this.reader.init(),super.init()}readUint8Array(e,t){return this.reader.readUint8Array(e,t)}},Rr=class extends Lr{constructor(e,t={}){t.useRangeHeader=!0,super(e,t)}},zr=class extends J{constructor(e){super(),e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength),Object.assign(this,{array:e,size:e.length})}readUint8Array(e,t){return this.array.slice(e,e+t)}},Br=class extends _r{init(e=0){Object.assign(this,{offset:0,array:new Uint8Array(e)}),super.init()}writeUint8Array(e){let t=this;if(t.offset+e.length>t.array.length){let n=t.array;t.array=new Uint8Array(n.length+e.length),t.array.set(n)}t.array.set(e,t.offset),t.offset+=e.length}getData(){return this.array}},Vr=class extends J{constructor(e){super(),this.readers=e}async init(){let e=this,{readers:t}=e;e.lastDiskNumber=0,e.lastDiskOffset=0,await Promise.all(t.map(async(n,r)=>{await n.init(),r!=t.length-1&&(e.lastDiskOffset+=n.size),e.size+=n.size})),super.init()}async readUint8Array(e,t,n=0){let r=this,{readers:i}=this,a,o=n;o==-1&&(o=i.length-1);let s=e;for(;i[o]&&s>=i[o].size;)s-=i[o].size,o++;let c=i[o];if(c){let i=c.size;if(s+t<=i)a=await Y(c,s,t);else{let o=i-s;a=new Uint8Array(t);let l=await Y(c,s,o);a.set(l,0);let u=await r.readUint8Array(e+o,t-o,n);a.set(u,o),l.length+u.length<t&&(a=a.subarray(0,l.length+u.length))}}else a=new Uint8Array;return r.lastDiskNumber=Math.max(o,r.lastDiskNumber),a}},Hr=class extends gr{constructor(e,t=4294967295){super();let n=this;Object.assign(n,{diskNumber:0,diskOffset:0,size:0,maxSize:t,availableSize:t});let r,i,a,o=new WritableStream({async write(t){let{availableSize:o}=n;if(a)t.length>=o?(await s(t.subarray(0,o)),await c(),n.diskOffset+=r.size,n.diskNumber++,a=null,await this.write(t.subarray(o))):await s(t);else{let{value:o,done:s}=await e.next();if(s&&!o)throw Error(rr);r=o,r.size=0,r.maxSize&&(n.maxSize=r.maxSize),n.availableSize=n.maxSize,await Kr(r),i=o.writable,a=i.getWriter(),await this.write(t)}},async close(){await a.ready,await c()}});Object.defineProperty(n,hr,{get(){return o}});async function s(e){let t=e.length;t&&(await a.ready,await a.write(e),r.size+=t,n.size+=t,n.availableSize-=t)}async function c(){await a.close()}}},Ur=class{constructor(e){return Array.isArray(e)&&(e=new Vr(e)),e instanceof ReadableStream&&(e={readable:e}),e}},Wr=class{constructor(e){return e.writable===void 0&&typeof e.next==`function`&&(e=new Hr(e)),e instanceof WritableStream&&(e={writable:e}),e.size===void 0&&(e.size=0),e instanceof Hr||Object.assign(e,{diskNumber:0,diskOffset:0,availableSize:1/0,maxSize:1/0}),e}};function Gr(e){let{baseURL:t}=ht(),{protocol:n}=new URL(e,t);return n==`http:`||n==`https:`}async function Kr(e,t){if(e.init&&!e.initialized)await e.init(t);else return Promise.resolve()}function Y(e,t,n,r){return e.readUint8Array(t,n,r)}var qr=Vr,Jr=Hr,Yr=`\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ `.split(``),Xr=Yr.length==256;function Zr(e){if(Xr){let t=``;for(let n=0;n<e.length;n++)t+=Yr[e[n]];return t}else return new TextDecoder().decode(e)}function Qr(e,t){return t&&t.trim().toLowerCase()==`cp437`?Zr(e):new TextDecoder(t).decode(e)}var $r=`filename`,ei=`rawFilename`,ti=`comment`,ni=`rawComment`,ri=`uncompressedSize`,ii=`compressedSize`,ai=`offset`,oi=`diskNumberStart`,si=`lastModDate`,ci=`rawLastModDate`,li=`lastAccessDate`,ui=`rawLastAccessDate`,di=`creationDate`,fi=`rawCreationDate`,pi=[$r,ei,ii,ri,si,ci,ti,ni,li,di,ai,oi,oi,`internalFileAttribute`,`internalFileAttributes`,`externalFileAttribute`,`externalFileAttributes`,`msDosCompatible`,`zip64`,`encrypted`,`version`,`versionMadeBy`,`zipCrypto`,`directory`,`executable`,`compressionMethod`,`signature`,`extraField`,`bitFlag`,`filenameUTF8`,`commentUTF8`,`rawExtraField`,`extraFieldZip64`,`extraFieldUnicodePath`,`extraFieldUnicodeComment`,`extraFieldAES`,`extraFieldNTFS`,`extraFieldExtendedTimestamp`],mi=class{constructor(e){pi.forEach(t=>this[t]=e[t])}},hi=`filenameEncoding`,gi=`commentEncoding`,_i=`extractPrependedData`,vi=`extractAppendedData`,yi=`password`,bi=`rawPassword`,xi=`passThrough`,Si=`signal`,Ci=`checkPasswordOnly`,wi=`checkOverlappingEntryOnly`,Ti=`checkOverlappingEntry`,Ei=`useWebWorkers`,Di=`useCompressionStream`,Oi=`transferStreams`,ki=`File format is not recognized`,Ai=`End of central directory not found`,ji=`End of Zip64 central directory locator not found`,Mi=`Central directory header not found`,Ni=`Local file header not found`,Pi=`Zip64 extra field not found`,Fi=`File contains encrypted entry`,Ii=`Encryption method not supported`,Li=`Compression method not supported`,Ri=`Split zip file`,zi=`Overlapping entry found`,Bi=`utf-8`,Vi=`cp437`,Hi=[[ri,nt],[ii,nt],[ai,nt],[oi,rt]],Ui={[rt]:{getValue:Q,bytes:4},[nt]:{getValue:aa,bytes:8}},Wi=class{constructor(e,t={}){Object.assign(this,{reader:new Ur(e),options:t,config:ht(),readRanges:[]})}async*getEntriesGenerator(e={}){let t=this,{reader:n}=t,{config:r}=t;if(await Kr(n),(n.size===void 0||!n.readUint8Array)&&(n=new br(await new Response(n.readable).blob()),await Kr(n)),n.size<22)throw Error(ki);n.chunkSize=gt(r);let i=await ta(n,it,n.size,22,rt*16);if(!i)throw Q($(await Y(n,0,4)))==134695760?Error(Ri):Error(Ai);let a=$(i),o=Q(a,12),s=Q(a,16),c=i.offset,l=Z(a,20),u=c+22+l,d=Z(a,4),f=n.lastDiskNumber||0,p=Z(a,6),m=Z(a,8),h=0,g=0;if(s==4294967295||o==4294967295||m==65535||p==65535){let e=$(await Y(n,i.offset-20,20));if(Q(e,0)==117853008){s=aa(e,8);let t=await Y(n,s,56,-1),r=$(t),a=i.offset-20-56;if(Q(r,0)!=101075792&&s!=a){let e=s;s=a,s>e&&(h=s-e),t=await Y(n,s,56,-1),r=$(t)}if(Q(r,0)!=101075792)throw Error(ji);d==65535&&(d=Q(r,16)),p==65535&&(p=Q(r,20)),m==65535&&(m=aa(r,32)),o==4294967295&&(o=aa(r,40)),s-=o}}if(s>=n.size&&(h=n.size-s-o-22,s=n.size-o-22),f!=d)throw Error(Ri);if(s<0)throw Error(ki);let _=0,v=await Y(n,s,o,p),y=$(v);if(o){let e=i.offset-o;if(Q(y,_)!=33639248&&s!=e){let t=s;s=e,s>t&&(h+=s-t),v=await Y(n,s,o,p),y=$(v)}}let b=i.offset-s-(n.lastDiskOffset||0);if(o!=b&&b>=0&&(o=b,v=await Y(n,s,o,p),y=$(v)),s<0||s>=n.size)throw Error(ki);let x=X(t,e,hi),S=X(t,e,gi);for(let i=0;i<m;i++){let a=new Ki(n,r,t.options);if(Q(y,_)!=33639248)throw Error(Mi);qi(a,y,_+6);let o=!!a.bitFlag.languageEncodingFlag,s=_+46,c=s+a.filenameLength,l=c+a.extraFieldLength,u=Z(y,_+4),d=u>>8==0,f=u>>8==3,p=v.subarray(s,c),b=Z(y,_+32),C=l+b,w=v.subarray(l,C),T=o,E=o,D=Q(y,_+38),O=d&&(ia(y,_+38)&16)==16||f&&(D>>16&61440)==16384||p.length&&p.at(-1)==47,k=f&&(D>>16&73)!=0,ee=Q(y,_+42)+h;Object.assign(a,{versionMadeBy:u,msDosCompatible:d,compressedSize:0,uncompressedSize:0,commentLength:b,directory:O,offset:ee,diskNumberStart:Z(y,_+34),internalFileAttributes:Z(y,_+36),externalFileAttributes:D,rawFilename:p,filenameUTF8:T,commentUTF8:E,rawExtraField:v.subarray(c,l),executable:k}),a.internalFileAttribute=a.internalFileAttributes,a.externalFileAttribute=a.externalFileAttributes;let te=X(t,e,`decodeText`)||Qr,ne=T?Bi:x||Vi,re=E?Bi:S||Vi,ie=te(p,ne);ie===void 0&&(ie=Qr(p,ne));let A=te(w,re);A===void 0&&(A=Qr(w,re)),Object.assign(a,{rawComment:w,filename:ie,comment:A,directory:O||ie.endsWith(`/`)}),g=Math.max(ee,g),Ji(a,a,y,_+6),a.zipCrypto=a.encrypted&&!a.extraFieldAES;let j=new mi(a);j.getData=(e,n)=>a.getData(e,j,t.readRanges,n),j.arrayBuffer=async e=>{let n=new TransformStream,[r]=await Promise.all([new Response(n.readable).arrayBuffer(),a.getData(n,j,t.readRanges,e)]);return r},_=C;let{onprogress:ae}=e;if(ae)try{await ae(i+1,m,new mi(a))}catch{}yield j}let C=X(t,e,_i),w=X(t,e,vi);return C&&(t.prependedData=g>0?await Y(n,0,g):new Uint8Array),t.comment=l?await Y(n,c+22,l):new Uint8Array,w&&(t.appendedData=u<n.size?await Y(n,u,n.size-u):new Uint8Array),!0}async getEntries(e={}){let t=[];for await(let n of this.getEntriesGenerator(e))t.push(n);return t}async close(){}},Gi=class{constructor(e={}){let{readable:t,writable:n}=new TransformStream,r=new Wi(t,e).getEntriesGenerator();this.readable=new ReadableStream({async pull(e){let{done:t,value:n}=await r.next();if(t)return e.close();let i={...n,readable:(function(){let{readable:e,writable:t}=new TransformStream;if(n.getData)return n.getData(t),e})()};delete i.getData,e.enqueue(i)}}),this.writable=n}},Ki=class{constructor(e,t,n){Object.assign(this,{reader:e,config:t,options:n})}async getData(e,t,n,r={}){let i=this,{reader:a,offset:o,diskNumberStart:s,extraFieldAES:c,extraFieldZip64:l,compressionMethod:u,config:d,bitFlag:f,signature:p,rawLastModDate:m,uncompressedSize:h,compressedSize:g}=i,{dataDescriptor:_}=f,v=t.localDirectory={},y=$(await Y(a,o,30,s)),b=X(i,r,yi),x=X(i,r,bi),S=X(i,r,xi);if(b=b&&b.length&&b,x=x&&x.length&&x,c&&c.originalCompressionMethod!=99||u!=0&&u!=8&&!S)throw Error(Li);if(Q(y,0)!=67324752)throw Error(Ni);qi(v,y,4);let{extraFieldLength:C,filenameLength:w,lastAccessDate:T,creationDate:E}=v;v.rawExtraField=C?await Y(a,o+30+w,C,s):new Uint8Array,Ji(i,v,y,4,!0),Object.assign(t,{lastAccessDate:T,creationDate:E});let D=i.encrypted&&v.encrypted&&!S,O=D&&!c;if(S||(t.zipCrypto=O),D){if(!O&&c.strength===void 0)throw Error(Ii);if(!b&&!x)throw Error(Fi)}let k=o+30+w+C,ee=g,te=a.readable;Object.assign(te,{diskNumberStart:s,offset:k,size:ee});let ne=X(i,r,Si),re=X(i,r,Ci),ie=X(i,r,Ti),A=X(i,r,wi);A&&(ie=!0);let{onstart:j,onprogress:ae,onend:M}=r,N={options:{codecType:Mn,password:b,rawPassword:x,zipCrypto:O,encryptionStrength:c&&c.strength,signed:X(i,r,`checkSignature`)&&!S,passwordVerification:O&&(_?m>>>8&255:p>>>24&255),outputSize:h,signature:p,compressed:u!=0&&!S,encrypted:i.encrypted&&!S,useWebWorkers:X(i,r,Ei),useCompressionStream:X(i,r,Di),transferStreams:X(i,r,Oi),checkPasswordOnly:re},config:d,streamOptions:{signal:ne,size:ee,onstart:j,onprogress:ae,onend:M}};ie&&await ea({reader:a,fileEntry:t,offset:o,diskNumberStart:s,signature:p,compressedSize:g,uncompressedSize:h,dataOffset:k,dataDescriptor:_||v.bitFlag.dataDescriptor,extraFieldZip64:l||v.extraFieldZip64,readRanges:n});let P;try{if(!A){re&&(e=new WritableStream),e=new Wr(e),await Kr(e,S?g:h),{writable:P}=e;let{outputSize:t}=await Zn({readable:te,writable:P},N);if(e.size+=t,t!=(S?g:h))throw Error(Sn)}}catch(t){if(t.outputSize!==void 0&&(e.size+=t.outputSize),!re||t.message!=`zipjs-abort-check-password`)throw t}finally{!X(i,r,`preventClose`)&&P&&!P.locked&&await P.getWriter().close()}return re||A?void 0:e.getData?e.getData():P}};function qi(e,t,n){let r=e.rawBitFlag=Z(t,n+2),i=(r&1)==1,a=Q(t,n+6);Object.assign(e,{encrypted:i,version:Z(t,n),bitFlag:{level:(r&6)>>1,dataDescriptor:(r&8)==8,languageEncodingFlag:(r&ut)==ut},rawLastModDate:a,lastModDate:na(a),filenameLength:Z(t,n+22),extraFieldLength:Z(t,n+24)})}function Ji(e,t,n,r,i){let{rawExtraField:a}=t,o=t.extraField=new Map,s=$(new Uint8Array(a)),c=0;try{for(;c<a.length;){let e=Z(s,c),t=Z(s,c+2);o.set(e,{type:e,data:a.slice(c+4,c+4+t)}),c+=4+t}}catch{}let l=Z(n,r+4);Object.assign(t,{signature:Q(n,r+10),compressedSize:Q(n,r+14),uncompressedSize:Q(n,r+18)});let u=o.get(1);u&&(Yi(u,t),t.extraFieldZip64=u);let d=o.get(st);d&&(Xi(d,$r,ei,t,e),t.extraFieldUnicodePath=d);let f=o.get(ct);f&&(Xi(f,ti,ni,t,e),t.extraFieldUnicodeComment=f);let p=o.get(at);p?(Zi(p,t,l),t.extraFieldAES=p):t.compressionMethod=l;let m=o.get(10);m&&(Qi(m,t),t.extraFieldNTFS=m);let h=o.get(ot);h&&($i(h,t,i),t.extraFieldExtendedTimestamp=h);let g=o.get(lt);g&&(t.extraFieldUSDZ=g)}function Yi(e,t){t.zip64=!0;let n=$(e.data),r=Hi.filter(([e,n])=>t[e]==n);for(let i=0,a=0;i<r.length;i++){let[o,s]=r[i];if(t[o]==s){let r=Ui[s];t[o]=e[o]=r.getValue(n,a),a+=r.bytes}else if(e[o])throw Error(Pi)}}function Xi(e,t,n,r,i){let a=$(e.data),o=new bt;o.append(i[n]);let s=$(new Uint8Array(4));s.setUint32(0,o.get(),!0);let c=Q(a,1);Object.assign(e,{version:ia(a,0),[t]:Qr(e.data.subarray(5)),valid:!i.bitFlag.languageEncodingFlag&&c==Q(s,0)}),e.valid&&(r[t]=e[t],r[t+`UTF8`]=!0)}function Zi(e,t,n){let r=$(e.data),i=ia(r,4);Object.assign(e,{vendorVersion:ia(r,0),vendorId:ia(r,2),strength:i,originalCompressionMethod:n,compressionMethod:Z(r,5)}),t.compressionMethod=e.compressionMethod}function Qi(e,t){let n=$(e.data),r=4,i;try{for(;r<e.data.length&&!i;){let t=Z(n,r),a=Z(n,r+2);t==1&&(i=e.data.slice(r+4,r+4+a)),r+=4+a}}catch{}try{if(i&&i.length==24){let n=$(i),r=n.getBigUint64(0,!0),a=n.getBigUint64(8,!0),o=n.getBigUint64(16,!0);Object.assign(e,{rawLastModDate:r,rawLastAccessDate:a,rawCreationDate:o});let s={lastModDate:ra(r),lastAccessDate:ra(a),creationDate:ra(o)};Object.assign(e,s),Object.assign(t,s)}}catch{}}function $i(e,t,n){let r=$(e.data),i=ia(r,0),a=[],o=[];n?((i&1)==1&&(a.push(si),o.push(ci)),(i&2)==2&&(a.push(li),o.push(ui)),(i&4)==4&&(a.push(di),o.push(fi))):e.data.length>=5&&(a.push(si),o.push(ci));let s=1;a.forEach((n,i)=>{if(e.data.length>=s+4){let a=Q(r,s);t[n]=e[n]=new Date(a*1e3);let c=o[i];e[c]=a}s+=4})}async function ea({reader:e,fileEntry:t,offset:n,diskNumberStart:r,signature:i,compressedSize:a,uncompressedSize:o,dataOffset:s,dataDescriptor:c,extraFieldZip64:l,readRanges:u}){let d=0;if(r)for(let t=0;t<r;t++){let n=e.readers[t];d+=n.size}let f=0;if(c&&(f=l?20:12),f){let n=await Y(e,s+a,f+4,r);if(Q($(n),0)==134695760){let e=Q($(n),4),r,s;l?(r=aa($(n),8),s=aa($(n),16)):(r=Q($(n),8),s=Q($(n),12)),(t.encrypted&&!t.zipCrypto||e==i)&&r==a&&s==o&&(f+=4)}}let p={start:d+n,end:d+s+a+f,fileEntry:t};for(let e of u)if(e.fileEntry!=t&&p.start>=e.start&&p.start<e.end){let t=Error(zi);throw t.overlappingEntry=e.fileEntry,t}u.push(p)}async function ta(e,t,n,r,i){let a=new Uint8Array(4);oa($(a),0,t);let o=r+i;return await s(r)||await s(Math.min(o,n));async function s(t){let i=n-t,o=await Y(e,i,t);for(let e=o.length-r;e>=0;e--)if(o[e]==a[0]&&o[e+1]==a[1]&&o[e+2]==a[2]&&o[e+3]==a[3])return{offset:i+e,buffer:o.slice(e,e+r).buffer}}}function X(e,t,n){return t[n]===void 0?e.options[n]:t[n]}function na(e){let t=(e&4294901760)>>16,n=e&65535;try{return new Date(1980+((t&65024)>>9),((t&480)>>5)-1,t&31,(n&63488)>>11,(n&2016)>>5,(n&31)*2,0)}catch{}}function ra(e){return new Date(Number(e/BigInt(1e4)-BigInt(0xa9730b66800)))}function ia(e,t){return e.getUint8(t)}function Z(e,t){return e.getUint16(t,!0)}function Q(e,t){return e.getUint32(t,!0)}function aa(e,t){return Number(e.getBigUint64(t,!0))}function oa(e,t,n){e.setUint32(t,n,!0)}function $(e){return new DataView(e.buffer)}var sa=t({BlobReader:()=>br,BlobWriter:()=>xr,Data64URIReader:()=>vr,Data64URIWriter:()=>yr,ERR_BAD_FORMAT:()=>ki,ERR_CENTRAL_DIRECTORY_NOT_FOUND:()=>Mi,ERR_ENCRYPTED:()=>Fi,ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND:()=>ji,ERR_EOCDR_NOT_FOUND:()=>Ai,ERR_EXTRAFIELD_ZIP64_NOT_FOUND:()=>Pi,ERR_HTTP_RANGE:()=>nr,ERR_INVALID_PASSWORD:()=>kt,ERR_INVALID_SIGNATURE:()=>At,ERR_INVALID_UNCOMPRESSED_SIZE:()=>Sn,ERR_ITERATOR_COMPLETED_TOO_SOON:()=>rr,ERR_LOCAL_FILE_HEADER_NOT_FOUND:()=>Ni,ERR_OVERLAPPING_ENTRY:()=>zi,ERR_SPLIT_ZIP_FILE:()=>Ri,ERR_UNSUPPORTED_COMPRESSION:()=>Li,ERR_UNSUPPORTED_ENCRYPTION:()=>Ii,ERR_WRITER_NOT_INITIALIZED:()=>ir,GenericReader:()=>Ur,GenericWriter:()=>Wr,HttpRangeReader:()=>Rr,HttpReader:()=>Lr,Reader:()=>J,SplitDataReader:()=>Vr,SplitDataWriter:()=>Hr,SplitZipReader:()=>qr,SplitZipWriter:()=>Jr,TextReader:()=>Sr,TextWriter:()=>Cr,Uint8ArrayReader:()=>zr,Uint8ArrayWriter:()=>Br,Writer:()=>_r,ZipReader:()=>Wi,ZipReaderStream:()=>Gi,configure:()=>_t,getMimeType:()=>vt,initStream:()=>Kr,readUint8Array:()=>Y,terminateWorkers:()=>er});_t({Inflate:tt});var ca=sa,la=class{constructor(e,t){ca.configure({baseURL:self.location.href}),this._zipReader=new ca.ZipReader(new ca.HttpReader(this._resolveTraceURI(e),{mode:`cors`,preventHeadRequest:!0}),{useWebWorkers:!1}),this._entriesPromise=this._zipReader.getEntries({onprogress:t}).then(e=>{let t=new Map;for(let n of e)t.set(n.filename,n);return t})}_resolveTraceURI(e){return e.startsWith(`https://www.dropbox.com/`)?`https://dl.dropboxusercontent.com/`+e.substring(24):e}isLive(){return!1}async entryNames(){return[...(await this._entriesPromise).keys()]}async hasEntry(e){return(await this._entriesPromise).has(e)}async readText(e){let t=(await this._entriesPromise).get(e);if(!t)return;let n=new ca.TextWriter;return await t.getData?.(n),n.getData()}async readBlob(e){let t=(await this._entriesPromise).get(e);if(!t)return;let n=new ca.BlobWriter;return await t.getData(n),n.getData()}},ua=class{constructor(e){this._entriesPromise=this._readFile(e).then(async e=>{if(!e)throw Error(`File not found`);let t=await e.json(),n=new Map;for(let e of t.entries)n.set(e.name,e.path);return n})}isLive(){return!0}async entryNames(){return[...(await this._entriesPromise).keys()]}async hasEntry(e){return(await this._entriesPromise).has(e)}async readText(e){return(await this._readEntry(e))?.text()}async readBlob(e){let t=await this._readEntry(e);return t?.status===200?await t?.blob():void 0}async _readEntry(e){let t=(await this._entriesPromise).get(e);if(t)return this._readFile(t)}async _readFile(e){let t=await fetch(e);if(t.status!==404)return t}};self.addEventListener(`install`,function(e){self.skipWaiting()}),self.addEventListener(`activate`,function(e){e.waitUntil(self.clients.claim())});var da=new URL(self.registration.scope).pathname,fa=new Map,pa=new Map,ma=self.registration.scope.startsWith(`https://`);function ha(){fa.clear(),pa.clear()}async function ga(e,t,n){try{return{loadedTrace:await _a(e,t,n)}}catch(e){return{errorResponse:new Response(JSON.stringify({error:e?.message}),{status:500,headers:{"Content-Type":`application/json`}})}}}function _a(e,t,n){let r=t.searchParams.get(`trace`);if(!r)throw Error(`trace parameter is missing`);pa.set(e,r);let i=fa.get(r);if(i)return i;let a=va(r,n);return fa.set(r,a),a.catch(()=>fa.delete(r)),a}async function va(e,t){await xa();let r=new ee;try{let[n,i]=re(t,[.5,.4,.1]),a=wa(e)||e.endsWith(`traces.dir`)?new ua(e):new la(e,n);await r.load(a,void 0,i)}catch(t){if(console.error(t),t?.message?.includes(`Cannot find .trace file`)&&await r.hasEntry(`index.html`))throw 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.`);if(t instanceof E)throw Error(`Could not load trace from ${e}. ${t.message}`);let n=`Could not load trace from ${e}. Make sure a valid Playwright Trace is accessible over this url.`,i=await navigator.permissions.query({name:`local-network-access`}).catch(()=>{});throw i&&i.state!==`granted`&&(n+=`
|
|
4
3
|
|
|
5
|
-
If your trace is in a local or private network, please grant permission for Local Network Access.`),
|
|
4
|
+
If your trace is in a local or private network, please grant permission for Local Network Access.`),Error(n)}return{traceLoader:r,snapshotServer:new n(r.storage(),e=>r.resourceEntry(e))}}async function ya(e){let t=e.request;if(t.url.startsWith(`chrome-extension://`))return fetch(t);let n=new URL(t.url),r;if(t.url.startsWith(self.registration.scope)&&(r=n.pathname.substring(da.length-1)),r===`/restartServiceWorker`)return ha(),new Response(null,{status:200});if(r===`/ping`)return new Response(null,{status:200});let i=!!e.resultingClientId,a=e.clientId?await self.clients.get(e.clientId):void 0;if(i&&!r?.startsWith(`/file/`)){if(r?.startsWith(`/snapshot/`)){let{errorResponse:t,loadedTrace:i}=await ga(e.resultingClientId,n,Ca);if(t)return t;let a=decodeURIComponent(r.substring(10)),o=i.snapshotServer.serveSnapshot(a,n.searchParams,n.href);return ma&&o.headers.append(`Content-Security-Policy`,`upgrade-insecure-requests`),o}return fetch(e.request)}if(!r){if(!a)return new Response(`Sub-resource without a client`,{status:500});let{snapshotServer:e}=await _a(a.id,new URL(a.url),Sa(a));if(!e)return new Response(null,{status:404});let n=[t.url];return ma&&t.url.startsWith(`https://`)&&n.push(t.url.replace(/^https/,`http`)),e.serveResource(n,t.method,a.url)}if(r===`/contexts`||r.startsWith(`/snapshotInfo/`)||r.startsWith(`/closest-screenshot/`)||r.startsWith(`/file/`)){if(!a)return new Response(`Sub-resource without a client`,{status:500});let{errorResponse:e,loadedTrace:t}=await ga(a.id,n,Sa(a));if(e)return e;if(r===`/contexts`)return new Response(JSON.stringify(t.traceLoader.contextEntries),{status:200,headers:{"Content-Type":`application/json`}});if(r.startsWith(`/snapshotInfo/`)){let e=decodeURIComponent(r.substring(14));return t.snapshotServer.serveSnapshotInfo(e,n.searchParams)}if(r.startsWith(`/closest-screenshot/`)){let e=decodeURIComponent(r.substring(20));return t.snapshotServer.serveClosestScreenshot(e,n.searchParams)}if(r.startsWith(`/file/`)){let e=await t.traceLoader.resourceEntry(r.slice(6));return e?new Response(e,{status:200,headers:ba(n.searchParams)}):new Response(null,{status:404})}}return fetch(e.request)}function ba(e){let t=e.get(`dn`),n=e.get(`dct`);if(!t)return;let r=new Headers;return r.set(`Content-Disposition`,`attachment; filename="attachment"; filename*=UTF-8''${encodeURIComponent(t)}`),n&&r.set(`Content-Type`,n),r}async function xa(){let e=await self.clients.matchAll(),t=new Set;for(let[n,r]of pa){if(!e.find(e=>e.id===n)){pa.delete(n);continue}t.add(r)}for(let e of fa.keys())t.has(e)||fa.delete(e)}function Sa(e){return(t,n)=>{e.postMessage({method:`progress`,params:{done:t,total:n}})}}function Ca(e,t){}function wa(e){return!!new URL(e,`http://localhost`).searchParams.get(`path`)?.endsWith(`.json`)}self.addEventListener(`fetch`,function(e){if(e.request.headers.get(`x-pw-serviceworker`)===`skip`)return!1;e.respondWith(ya(e))});
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./assets/xtermModule-DywYcAf8.js","./assets/defaultSettingsView-Ds6CBOo0.js","./assets/urlMatch-L3liM589.js","./defaultSettingsView.Bqk9acqE.css","./xtermModule.kHJ-D0s7.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{C as e,D as t,E as n,S as r,T as i,_ as a,a as o,b as s,c,d as l,f as u,g as d,h as f,i as p,k as m,l as h,m as g,n as _,p as v,r as y,t as b,u as x,v as S,w as C,x as w,y as T}from"./assets/defaultSettingsView-Ds6CBOo0.js";import"./assets/urlMatch-L3liM589.js";var E=m(t()),D=m(S(),1),O=class{constructor(e,t={}){this.isListing=!1,this._tests=new Map,this._rootSuite=new k(``,`root`),this._options=t,this._reporter=e}reset(){this._rootSuite._entries=[],this._tests.clear()}dispatch(e){let{method:t,params:n}=e;if(t===`onConfigure`){this._onConfigure(n.config);return}if(t===`onProject`){this._onProject(n.project);return}if(t===`onBegin`){this._onBegin();return}if(t===`onTestBegin`){this._onTestBegin(n.testId,n.result);return}if(t===`onTestPaused`){this._onTestPaused(n.testId,n.resultId,n.errors);return}if(t===`onTestEnd`){this._onTestEnd(n.test,n.result);return}if(t===`onStepBegin`){this._onStepBegin(n.testId,n.resultId,n.step);return}if(t===`onAttach`){this._onAttach(n.testId,n.resultId,n.attachments);return}if(t===`onStepEnd`){this._onStepEnd(n.testId,n.resultId,n.step);return}if(t===`onError`){this._onError(n.error,n.workerInfo);return}if(t===`onStdIO`){this._onStdIO(n.type,n.testId,n.resultId,n.data,n.isBase64);return}if(t===`onEnd`)return this._onEnd(n.result);if(t===`onExit`)return this._onExit()}_onConfigure(e){this._rootDir=e.rootDir,this._config=this._parseConfig(e),this._reporter.onConfigure?.(this._config)}_onProject(e){let t=this._options.mergeProjects?this._rootSuite.suites.find(t=>t.project().name===e.name):void 0;t||(t=new k(e.name,`project`),this._rootSuite._addSuite(t));let n=this._parseProject(e);t._project=n;let r=-1;this._options.mergeProjects&&(r=this._config.projects.findIndex(t=>t.name===e.name)),r===-1?this._config.projects.push(n):this._config.projects[r]=n;for(let n of e.suites)this._mergeSuiteInto(n,t)}_onBegin(){this._reporter.onBegin?.(this._rootSuite)}_onTestBegin(e,t){let n=this._tests.get(e);this._options.clearPreviousResultsWhenTestBegins&&(n.results=[]);let r=n._createTestResult(t.id);r.retry=t.retry,r.workerIndex=t.workerIndex,r.parallelIndex=t.parallelIndex,r.setStartTimeNumber(t.startTime),this._reporter.onTestBegin?.(n,r)}_onTestPaused(e,t,n){let r=this._tests.get(e),i=r.results.find(e=>e._id===t);i.errors.push(...n),i.error=i.errors[0],this._reporter.onTestPaused?.(r,i)}_onTestEnd(e,t){let n=this._tests.get(e.testId);n.timeout=e.timeout,n.expectedStatus=e.expectedStatus;let r=n.results.find(e=>e._id===t.id);r.duration=t.duration,r.status=t.status,r.errors.push(...t.errors??[]),r.error=r.errors[0],t.attachments&&(r.attachments=this._parseAttachments(t.attachments)),t.annotations&&(this._absoluteAnnotationLocationsInplace(t.annotations),r.annotations=t.annotations,n.annotations=t.annotations),this._reporter.onTestEnd?.(n,r),r._stepMap=new Map}_onStepBegin(e,t,n){let r=this._tests.get(e),i=r.results.find(e=>e._id===t),a=n.parentStepId?i._stepMap.get(n.parentStepId):void 0,o=new ee(n,a,this._absoluteLocation(n.location),i);a?a.steps.push(o):i.steps.push(o),i._stepMap.set(n.id,o),this._reporter.onStepBegin?.(r,i,o)}_onStepEnd(e,t,n){let r=this._tests.get(e),i=r.results.find(e=>e._id===t),a=i._stepMap.get(n.id);a._endPayload=n,a.duration=n.duration,a.error=n.error,this._reporter.onStepEnd?.(r,i,a)}_onAttach(e,t,n){this._tests.get(e).results.find(e=>e._id===t).attachments.push(...n.map(e=>({name:e.name,contentType:e.contentType,path:e.path,body:e.base64&&globalThis.Buffer?Buffer.from(e.base64,`base64`):void 0})))}_onError(e,t){let n;if(t){let e=this._config.projects.find(e=>e.name===t.projectName);e&&(n={workerIndex:t.workerIndex,parallelIndex:t.parallelIndex,config:this._config,project:e})}this._reporter.onError?.(e,n)}_onStdIO(e,t,n,r,i){let a=i?globalThis.Buffer?Buffer.from(r,`base64`):atob(r):r,o=t?this._tests.get(t):void 0,s=o&&n?o.results.find(e=>e._id===n):void 0;e===`stdout`?(s?.stdout.push(a),this._reporter.onStdOut?.(a,o,s)):(s?.stderr.push(a),this._reporter.onStdErr?.(a,o,s))}async _onEnd(e){await this._reporter.onEnd?.(F(e))}_onExit(){return this._reporter.onExit?.()}_parseConfig(e){let t=I(e);return this._options.configOverrides&&(t.configFile=this._options.configOverrides.configFile,t.reportSlowTests=this._options.configOverrides.reportSlowTests,t.quiet=this._options.configOverrides.quiet,t.reporter=[...this._options.configOverrides.reporter]),t}_parseProject(e){return{metadata:e.metadata,name:e.name,outputDir:this._absolutePath(e.outputDir),repeatEach:e.repeatEach,retries:e.retries,testDir:this._absolutePath(e.testDir),testIgnore:N(e.testIgnore),testMatch:N(e.testMatch),timeout:e.timeout,grep:N(e.grep),grepInvert:N(e.grepInvert),dependencies:e.dependencies,teardown:e.teardown,snapshotDir:this._absolutePath(e.snapshotDir),ignoreSnapshots:e.ignoreSnapshots??!1,use:e.use}}_parseAttachments(e){return e.map(e=>({...e,body:e.base64&&globalThis.Buffer?Buffer.from(e.base64,`base64`):void 0}))}_mergeSuiteInto(e,t){let n=t.suites.find(t=>t.title===e.title);n||(n=new k(e.title,t.type===`project`?`file`:`describe`),t._addSuite(n)),n.location=this._absoluteLocation(e.location),e.entries.forEach(e=>{`testId`in e?this._mergeTestInto(e,n):this._mergeSuiteInto(e,n)})}_mergeTestInto(e,t){let n=this._options.mergeTestCases?t.tests.find(t=>t.title===e.title&&t.repeatEachIndex===e.repeatEachIndex):void 0;n||(n=new A(e.testId,e.title,this._absoluteLocation(e.location),e.repeatEachIndex),t._addTest(n),this._tests.set(n.id,n)),this._updateTest(e,n)}_updateTest(e,t){return t.id=e.testId,t.location=this._absoluteLocation(e.location),t.retries=e.retries,t.tags=e.tags??[],t.annotations=e.annotations??[],this._absoluteAnnotationLocationsInplace(t.annotations),t}_absoluteAnnotationLocationsInplace(e){for(let t of e)t.location&&=this._absoluteLocation(t.location)}_absoluteLocation(e){return e&&{...e,file:this._absolutePath(e.file)}}_absolutePath(e){if(e!==void 0)return this._options.resolvePath?this._options.resolvePath(this._rootDir,e):this._rootDir+`/`+e}},k=class{constructor(e,t){this._entries=[],this._requireFile=``,this._parallelMode=`none`,this.title=e,this._type=t}get type(){return this._type}get suites(){return this._entries.filter(e=>e.type!==`test`)}get tests(){return this._entries.filter(e=>e.type===`test`)}entries(){return this._entries}allTests(){let e=[],t=n=>{for(let r of n.entries())r.type===`test`?e.push(r):t(r)};return t(this),e}titlePath(){let e=this.parent?this.parent.titlePath():[];return(this.title||this._type!==`describe`)&&e.push(this.title),e}project(){return this._project??this.parent?.project()}_addTest(e){e.parent=this,this._entries.push(e)}_addSuite(e){e.parent=this,this._entries.push(e)}skip(e){throw Error(`Disposition methods are not supported on a TeleSuite (read-only).`)}fixme(e){throw Error(`Disposition methods are not supported on a TeleSuite (read-only).`)}fail(e){throw Error(`Disposition methods are not supported on a TeleSuite (read-only).`)}exclude(){throw Error(`Disposition methods are not supported on a TeleSuite (read-only).`)}},A=class{constructor(e,t,n,r){this.fn=()=>{},this.results=[],this.type=`test`,this.expectedStatus=`passed`,this.timeout=0,this.annotations=[],this.retries=0,this.tags=[],this.repeatEachIndex=0,this.id=e,this.title=t,this.location=n,this.repeatEachIndex=r}titlePath(){let e=this.parent?this.parent.titlePath():[];return e.push(this.title),e}outcome(){return P(this)}ok(){let e=this.outcome();return e===`expected`||e===`flaky`||e===`skipped`}_createTestResult(e){let t=new j(this.results.length,e);return this.results.push(t),t}skip(e){throw Error(`Disposition methods are not supported on a TeleTestCase (read-only).`)}fixme(e){throw Error(`Disposition methods are not supported on a TeleTestCase (read-only).`)}fail(e){throw Error(`Disposition methods are not supported on a TeleTestCase (read-only).`)}exclude(){throw Error(`Disposition methods are not supported on a TeleTestCase (read-only).`)}},ee=class{constructor(e,t,n,r){this.duration=-1,this.steps=[],this._startTime=0,this.title=e.title,this.subtitle=e.subtitle,this.category=e.category,this.params=e.params,this.location=n,this.parent=t,this._startTime=e.startTime,this._result=r}titlePath(){return[...this.parent?.titlePath()||[],this.title]}get startTime(){return new Date(this._startTime)}set startTime(e){this._startTime=+e}get attachments(){return this._endPayload?.attachments?.map(e=>this._result.attachments[e])??[]}get annotations(){return this._endPayload?.annotations??[]}},j=class{constructor(e,t){this.parallelIndex=-1,this.workerIndex=-1,this.duration=-1,this.stdout=[],this.stderr=[],this.attachments=[],this.annotations=[],this.status=`skipped`,this.steps=[],this.errors=[],this._stepMap=new Map,this._startTime=0,this.retry=e,this._id=t}setStartTimeNumber(e){this._startTime=e}get startTime(){return new Date(this._startTime)}set startTime(e){this._startTime=+e}},M={argv:[],failOnFlakyTests:!1,forbidOnly:!1,fullyParallel:!1,globalSetup:null,globalTeardown:null,globalTimeout:0,grep:/.*/,grepInvert:null,maxFailures:0,metadata:{},preserveOutput:`always`,projects:[],reporter:[[{}.CI?`dot`:`list`]],reportSlowTests:{max:5,threshold:3e5},configFile:``,rootDir:``,quiet:!1,shard:null,tags:[],updateSnapshots:`missing`,updateSourceMethod:`patch`,version:``,workers:0,webServer:null};function N(e){return e.map(e=>e.s===void 0?new RegExp(e.r.source,e.r.flags):e.s)}function P(e){let t=0,n=0,r=0,i=0,a=0;for(let o of e.results)o.status===`interrupted`?++i:o.status===`skipped`&&e.expectedStatus===`skipped`?++t:o.status===`skipped`?++n:o.status===e.expectedStatus?++r:++a;return r===0&&a===0?`skipped`:a===0?`expected`:r===0&&t===0?`unexpected`:`flaky`}function F(e){return{status:e.status,startTime:new Date(e.startTime),duration:e.duration}}function I(e){return{...M,...e}}var te=class{constructor(e,t,n,r,i,a){this._treeItemById=new Map,this._treeItemByTestId=new Map;let o=r&&[...r.values()].some(Boolean);this.pathSeparator=i,this.rootItem={kind:`group`,subKind:`folder`,id:e,title:``,location:{file:``,line:0,column:0},duration:0,parent:void 0,children:[],status:`none`,hasLoadErrors:!1},this._treeItemById.set(e,this.rootItem);let s=(e,t,n,r)=>{for(let i of r===`tests`?[]:t.suites){if(!i.title){s(e,i,n,`all`);continue}let r=n.children.find(e=>e.kind===`group`&&e.title===i.title);r||(r={kind:`group`,subKind:`describe`,id:`suite:`+t.titlePath().join(``)+``+i.title,title:i.title,location:i.location,duration:0,parent:n,children:[],status:`none`,hasLoadErrors:!1},this._addChild(n,r)),s(e,i,r,`all`)}for(let i of r===`suites`?[]:t.tests){let t=i.title,r=n.children.find(e=>e.kind!==`group`&&e.title===t);r||(r={kind:`case`,id:`test:`+i.titlePath().join(``),title:t,parent:n,children:[],tests:[],location:i.location,duration:0,status:`none`,project:void 0,test:void 0,tags:i.tags},this._addChild(n,r));let a=i.results[0],o=`none`;a?.[R]===`scheduled`?o=`scheduled`:a?.[R]===`running`?o=`running`:a?.status===`skipped`?o=`skipped`:a?.status===`interrupted`?o=`none`:a&&i.outcome()!==`expected`?o=`failed`:a&&i.outcome()===`expected`&&(o=`passed`),r.tests.push(i);let s={kind:`test`,id:i.id,title:e.name,location:i.location,test:i,parent:r,children:[],status:o,duration:i.results.length?Math.max(0,i.results[0].duration):0,project:e};this._addChild(r,s),this._treeItemByTestId.set(i.id,s),r.duration=r.children.reduce((e,t)=>e+t.duration,0)}};for(let e of t?.suites||[])if(!(o&&!r.get(e.title)))for(let t of e.suites)if(a){if(s(e.project(),t,this.rootItem,`suites`),t.tests.length){let n=this._defaultDescribeItem();s(e.project(),t,n,`tests`)}}else{let n=this._fileItem(t.location.file.split(i),!0);s(e.project(),t,n,`all`)}for(let e of n){if(!e.location)continue;let t=this._fileItem(e.location.file.split(i),!0);t.hasLoadErrors=!0}}_addChild(e,t){e.children.push(t),t.parent=e,this._treeItemById.set(t.id,t)}filterTree(e,t,n){let r=e.trim().toLowerCase().split(` `),i=[...t.values()].some(Boolean),a=e=>{let a=[...e.tests[0].titlePath(),...e.tests[0].tags].join(` `).toLowerCase();return!r.every(e=>a.includes(e))&&!e.tests.some(e=>n?.has(e.id))?!1:(e.children=e.children.filter(e=>!i||n?.has(e.test.id)||t.get(e.status)),e.tests=e.children.map(e=>e.test),!!e.children.length)},o=e=>{let t=[];for(let n of e.children)n.kind===`case`?a(n)&&t.push(n):(o(n),(n.children.length||n.hasLoadErrors)&&t.push(n));e.children=t};o(this.rootItem)}_fileItem(e,t){if(e.length===0)return this.rootItem;let n=e.join(this.pathSeparator),r=this._treeItemById.get(n);if(r)return r;let i=this._fileItem(e.slice(0,e.length-1),!1),a={kind:`group`,subKind:t?`file`:`folder`,id:n,title:e[e.length-1],location:{file:n,line:0,column:0},duration:0,parent:i,children:[],status:`none`,hasLoadErrors:!1};return this._addChild(i,a),a}_defaultDescribeItem(){let e=this._treeItemById.get(`<anonymous>`);return e||(e={kind:`group`,subKind:`describe`,id:`<anonymous>`,title:`<anonymous>`,location:{file:``,line:0,column:0},duration:0,parent:this.rootItem,children:[],status:`none`,hasLoadErrors:!1},this._addChild(this.rootItem,e)),e}sortAndPropagateStatus(){L(this.rootItem)}flattenForSingleProject(){let e=t=>{t.kind===`case`&&t.children.length===1?(t.project=t.children[0].project,t.test=t.children[0].test,t.children=[],this._treeItemByTestId.set(t.test.id,t)):t.children.forEach(e)};e(this.rootItem)}shortenRoot(){let e=this.rootItem;for(;e.children.length===1&&e.children[0].kind===`group`&&e.children[0].subKind===`folder`;)e=e.children[0];e.location=this.rootItem.location,this.rootItem=e}fileNames(){let e=new Set,t=n=>{n.kind===`group`&&n.subKind===`file`?e.add(n.id):n.children.forEach(t)};return t(this.rootItem),[...e]}flatTreeItems(){let e=[],t=n=>{e.push(n),n.children.forEach(t)};return t(this.rootItem),e}treeItemById(e){return this._treeItemById.get(e)}collectTestIds(e){return ne(e)}};function L(e){for(let t of e.children)L(t);e.kind===`group`&&e.children.sort((e,t)=>e.location.file.localeCompare(t.location.file)||e.location.line-t.location.line);let t=e.children.length>0,n=e.children.length>0,r=!1,i=!1,a=!1;for(let o of e.children)n&&=o.status===`skipped`,t&&=o.status===`passed`||o.status===`skipped`,r||=o.status===`failed`,i||=o.status===`running`,a||=o.status===`scheduled`;i?e.status=`running`:a?e.status=`scheduled`:r?e.status=`failed`:n?e.status=`skipped`:t&&(e.status=`passed`)}function ne(e){let t=new Set,n=new Set,r=e=>{if(e.kind!==`test`&&e.kind!==`case`){e.children.forEach(r);return}let i=e;for(;i&&i.parent&&!(i.kind===`group`&&i.subKind===`file`);)i=i.parent;n.add(i.location.file),e.kind===`case`?e.tests.forEach(e=>t.add(e.id)):t.add(e.id)};return r(e),{testIds:t,locations:n}}var R=Symbol(`statusEx`),re=class{constructor(e){this.loadErrors=[],this.progress={total:0,passed:0,failed:0,skipped:0},this._lastRunTestCount=0,this._receiver=new O(this._createReporter(),{mergeProjects:!0,mergeTestCases:!0,resolvePath:ie(e.pathSeparator),clearPreviousResultsWhenTestBegins:!0}),this._options=e}_createReporter(){return{version:()=>`v2`,onConfigure:e=>{this.config=e,this._lastRunReceiver=new O({version:()=>`v2`,onBegin:e=>{this._lastRunTestCount=e.allTests().length,this._lastRunReceiver=void 0}},{mergeProjects:!0,mergeTestCases:!1,resolvePath:ie(this._options.pathSeparator)}),this._lastRunReceiver.dispatch({method:`onConfigure`,params:{config:e}})},onBegin:e=>{if(this.rootSuite||=e,this._testResultsSnapshot){for(let e of this.rootSuite.allTests())e.results=this._testResultsSnapshot?.get(e.id)||e.results;this._testResultsSnapshot=void 0}this.progress.total=this._lastRunTestCount,this.progress.passed=0,this.progress.failed=0,this.progress.skipped=0,this._options.onUpdate(!0)},onEnd:()=>{this._options.onUpdate(!0)},onTestBegin:(e,t)=>{t[R]=`running`,this._options.onUpdate()},onTestEnd:(e,t)=>{e.outcome()===`skipped`?++this.progress.skipped:e.outcome()===`unexpected`?++this.progress.failed:++this.progress.passed,t[R]=t.status,this._options.onUpdate()},onError:e=>this._handleOnError(e),printsToStdio:()=>!1}}processGlobalReport(e){let t=new O({version:()=>`v2`,onConfigure:e=>{this.config=e},onError:e=>this._handleOnError(e)});for(let n of e)t.dispatch(n)}processListReport(e){let t=this.rootSuite?.allTests()||[];this._testResultsSnapshot=new Map(t.map(e=>[e.id,e.results])),this._receiver.reset();for(let t of e)this._receiver.dispatch(t)}processTestReportEvent(e){this._lastRunReceiver?.dispatch(e)?.catch(()=>{}),this._receiver.dispatch(e)?.catch(()=>{})}_handleOnError(e){this.loadErrors.push(e),this._options.onError?.(e),this._options.onUpdate()}asModel(){return{rootSuite:this.rootSuite||new k(``,`root`),config:this.config,loadErrors:this.loadErrors,progress:this.progress}}};function ie(e){return(t,n)=>{let r=[];for(let i of[...t.split(e),...n.split(e)]){let t=e===`\\`&&r.length===1&&r[0].endsWith(`:`),n=!r.length;if(!(!i&&!n&&!t)&&i!==`.`){if(i===`..`){r.pop();continue}r.push(i)}}return r.join(e)}}var z=d(),ae=({source:e})=>{let[t,n]=i(),[a,o]=E.useState(w()),[s]=E.useState(x(()=>import(`./assets/xtermModule-DywYcAf8.js`).then(e=>e.default),__vite__mapDeps([0,1,2,3,4]),import.meta.url)),c=E.useRef(null);return E.useEffect(()=>(T(o),()=>r(o)),[]),E.useEffect(()=>{let t=e.write,r=e.clear;return(async()=>{let{Terminal:t,FitAddon:r}=await s,i=n.current;if(!i)return;let o=a===`dark-mode`?se:oe;if(c.current&&c.current.terminal.options.theme===o)return;c.current&&(i.textContent=``);let l=new t({convertEol:!0,fontSize:13,scrollback:1e4,fontFamily:`monospace`,theme:o}),u=new r;l.loadAddon(u);for(let t of e.pending)l.write(t);e.write=(t=>{e.pending.push(t),l.write(t)}),e.clear=()=>{e.pending=[],l.clear()},l.open(i),u.fit(),c.current={terminal:l,fitAddon:u}})(),()=>{e.clear=r,e.write=t}},[s,c,n,e,a]),E.useEffect(()=>{setTimeout(()=>{c.current&&(c.current.fitAddon.fit(),e.resize(c.current.terminal.cols,c.current.terminal.rows))},250)},[t,e]),(0,z.jsx)(`div`,{"data-testid":`output`,className:`xterm-wrapper`,style:{flex:`auto`},ref:n})},oe={foreground:`#383a42`,background:`#fafafa`,cursor:`#383a42`,black:`#000000`,red:`#e45649`,green:`#50a14f`,yellow:`#c18401`,blue:`#4078f2`,magenta:`#a626a4`,cyan:`#0184bc`,white:`#a0a0a0`,brightBlack:`#000000`,brightRed:`#e06c75`,brightGreen:`#98c379`,brightYellow:`#d19a66`,brightBlue:`#4078f2`,brightMagenta:`#a626a4`,brightCyan:`#0184bc`,brightWhite:`#383a42`,selectionBackground:`#d7d7d7`,selectionForeground:`#383a42`},se={foreground:`#f8f8f2`,background:`#1e1e1e`,cursor:`#f8f8f0`,black:`#000000`,red:`#ff5555`,green:`#50fa7b`,yellow:`#f1fa8c`,blue:`#bd93f9`,magenta:`#ff79c6`,cyan:`#8be9fd`,white:`#bfbfbf`,brightBlack:`#4d4d4d`,brightRed:`#ff6e6e`,brightGreen:`#69ff94`,brightYellow:`#ffffa5`,brightBlue:`#d6acff`,brightMagenta:`#ff92df`,brightCyan:`#a4ffff`,brightWhite:`#e6e6e6`,selectionBackground:`#44475a`,selectionForeground:`#f8f8f2`},ce=({filterText:e,setFilterText:t,statusFilters:n,setStatusFilters:r,projectFilters:i,setProjectFilters:a,onlyChanged:o,setOnlyChanged:s,testModel:c,runTests:l})=>{let[u,d]=E.useState(!1),f=E.useRef(null);E.useEffect(()=>{f.current?.focus()},[]);let p=[...n.entries()].filter(([e,t])=>t).map(([e])=>e).join(` `)||`all`,m=[...i.entries()].filter(([e,t])=>t).map(([e])=>e).join(` `)||`all`;return(0,z.jsxs)(`div`,{className:`filters`,children:[(0,z.jsx)(h,{expanded:u,setExpanded:d,title:(0,z.jsx)(`input`,{ref:f,type:`search`,placeholder:`Filter (e.g. text, @tag)`,"aria-label":`Filter (e.g. text, @tag)`,spellCheck:!1,value:e,onChange:e=>{t(e.target.value)},onKeyDown:e=>{e.key===`Enter`&&l()}})}),(0,z.jsxs)(`button`,{className:`filter-summary`,"aria-expanded":u,title:`Status: `+p+`
|
|
3
|
+
Projects: `+m+(o?`
|
|
4
|
+
Only changed`:``),onClick:()=>d(!u),children:[(0,z.jsx)(`span`,{className:`filter-label`,children:`Status:`}),` `,p,(0,z.jsx)(`span`,{className:`filter-label`,children:`Projects:`}),` `,m,o&&(0,z.jsx)(z.Fragment,{children:(0,z.jsx)(`span`,{className:`filter-label`,children:`Only changed`})})]}),u&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`div`,{className:`hbox`,style:{marginLeft:14,maxHeight:200,overflowY:`auto`},children:[(0,z.jsx)(`div`,{className:`filter-list`,role:`list`,"data-testid":`status-filters`,children:[...n.entries()].map(([e,t])=>(0,z.jsx)(`div`,{className:`filter-entry`,role:`listitem`,children:(0,z.jsxs)(`label`,{children:[(0,z.jsx)(`input`,{type:`checkbox`,checked:t,onChange:()=>{let t=new Map(n);t.set(e,!t.get(e)),r(t)}}),(0,z.jsx)(`div`,{children:e})]})},e))}),(0,z.jsx)(`div`,{className:`filter-list`,role:`list`,"data-testid":`project-filters`,children:[...i.entries()].map(([e,t])=>(0,z.jsx)(`div`,{className:`filter-entry`,role:`listitem`,children:(0,z.jsxs)(`label`,{children:[(0,z.jsx)(`input`,{type:`checkbox`,checked:t,onChange:()=>{let t=new Map(i);t.set(e,!t.get(e)),a(t);let n=c?.config?.configFile;n&&C.setObject(n+`:projects`,[...t.entries()].filter(([e,t])=>t).map(([e])=>e))}}),(0,z.jsx)(`div`,{children:e||`untitled`})]})},e))})]}),(0,z.jsx)(`div`,{className:`filter-entry`,style:{marginLeft:24},children:(0,z.jsxs)(`label`,{children:[(0,z.jsx)(`input`,{type:`checkbox`,checked:o,onChange:()=>s(!o)}),(0,z.jsx)(`div`,{children:`Show only changed files`})]})})]})]})},le=({tag:t,style:n,onClick:r})=>(0,z.jsx)(`span`,{className:e(`tag`,`tag-color-${ue(t)}`),onClick:r,style:{margin:`6px 0 0 6px`,...n},title:`Click to filter by tag: ${t}`,children:t});function ue(e){let t=0;for(let n=0;n<e.length;n++)t=e.charCodeAt(n)+((t<<8)-t);return Math.abs(t%6)}var de=v,fe=({filterText:e,testModel:t,testServerConnection:n,testTree:r,runTests:i,runningState:a,watchAll:o,watchedTreeIds:s,setWatchedTreeIds:d,isLoading:f,onItemSelected:p,requestedCollapseAllCount:m,requestedExpandAllCount:h,setFilterText:_,onRevealSource:v})=>{let[y,b]=E.useState({expandedItems:new Map}),[x,S]=E.useState(),[C,w]=E.useState(m),[T,D]=E.useState(h);E.useEffect(()=>{if(C!==m){y.expandedItems.clear();for(let e of r.flatTreeItems())y.expandedItems.set(e.id,!1);w(m),S(void 0),b({...y});return}if(T!==h){y.expandedItems.clear();for(let e of r.flatTreeItems())y.expandedItems.set(e.id,!0);D(h),S(void 0),b({...y});return}if(!a||a.itemSelectedByUser)return;let e,t=n=>{n.children.forEach(t),!e&&n.status===`failed`&&(n.kind===`test`&&a.testIds.has(n.test.id)||n.kind===`case`&&a.testIds.has(n.tests[0]?.id))&&(e=n)};t(r.rootItem),e&&S(e.id)},[a,S,r,C,w,m,T,D,h,y,b]);let O=E.useMemo(()=>{if(x)return r.treeItemById(x)},[x,r]);E.useEffect(()=>{if(!t)return;let e=pe(O,t),n;O?.kind===`test`?n=O.test:O?.kind===`case`&&O.tests.length===1&&(n=O.tests[0]),p({treeItem:O,testCase:n,testFile:e})},[t,O,p]),E.useEffect(()=>{if(!f)if(o)n?.watchNoReply({fileNames:r.fileNames()});else{let e=new Set;for(let t of s.value){let n=r.treeItemById(t)?.location.file;n&&e.add(n)}n?.watchNoReply({fileNames:[...e]})}},[f,r,o,s,n]);let k=e=>{S(e.id),i(`bounce-if-busy`,r.collectTestIds(e))},A=(t,n)=>{if(t.preventDefault(),t.stopPropagation(),t.metaKey||t.ctrlKey){let t=e.split(` `);t.includes(n)?_(t.filter(e=>e!==n).join(` `).trim()):_((e+` `+n).trim())}else _((e.split(` `).filter(e=>!e.startsWith(`@`)).join(` `)+` `+n).trim())};return(0,z.jsx)(de,{name:`tests`,treeState:y,setTreeState:b,rootItem:r.rootItem,dataTestId:`test-tree`,render:e=>{let t=e.id.replace(/[^\w\d-_]/g,`-`),n=t+`-label`,r=t+`-time`;return(0,z.jsxs)(`div`,{className:`hbox ui-mode-tree-item`,"aria-labelledby":`${n} ${r}`,children:[(0,z.jsxs)(`div`,{id:n,className:`ui-mode-tree-item-title`,children:[(0,z.jsx)(`span`,{children:e.title}),e.kind===`case`?e.tags.map(e=>(0,z.jsx)(le,{tag:e.slice(1),onClick:t=>A(t,e)},e)):null]}),!!e.duration&&e.status!==`skipped`&&(0,z.jsx)(`div`,{id:r,className:`ui-mode-tree-item-time`,children:g(e.duration)}),(0,z.jsxs)(c,{noMinHeight:!0,noShadow:!0,children:[(0,z.jsx)(u,{icon:`play`,title:`Run`,onClick:()=>k(e),disabled:!!a&&!a.completed}),(0,z.jsx)(u,{icon:`go-to-file`,title:`Show source`,onClick:v,style:e.kind===`group`&&e.subKind===`folder`?{visibility:`hidden`}:{}}),!o&&(0,z.jsx)(u,{icon:`eye`,title:`Watch`,onClick:()=>{s.value.has(e.id)?s.value.delete(e.id):s.value.add(e.id),d({...s})},toggled:s.value.has(e.id)})]})]})},icon:e=>l(e.status),title:e=>e.title,selectedItem:O,onAccepted:k,onSelected:e=>{a&&(a.itemSelectedByUser=!0),S(e.id)},isError:e=>e.kind===`group`?e.hasLoadErrors:!1,autoExpandDepth:e?5:1,noItemsMessage:f?`Loading…`:`No tests`})};function pe(e,t){if(!(!e||!t))return{file:e.location.file,line:e.location.line,column:e.location.column,source:{errors:t.loadErrors.filter(t=>t.location?.file===e.location.file).map(e=>({line:e.location.line,message:e.message})),content:void 0}}}function B(e){return`.playwright-artifacts-${e}`}var me=({item:e,rootDir:t,onOpenExternally:n,revealSource:r,pathSeparator:i,onModelChange:o})=>{let[s,c]=E.useState(void 0),[l,u]=E.useState(0),d=E.useRef(null),{outputDir:f}=E.useMemo(()=>({outputDir:e.testCase?he(e.testCase):void 0}),[e]);return E.useEffect(()=>{d.current&&clearTimeout(d.current);let t=e.testCase?.results[0];if(!t||e.treeItem?.status===`scheduled`){c(void 0);return}let n=t&&t.duration>=0&&t.attachments.find(e=>e.name===`trace`);if(n&&n.path){V(n.path,t.startTime.getTime()).then(e=>c({model:e,isLive:!1}));return}if(!f){c(void 0);return}let r=[f,B(t.workerIndex),`traces`,`${e.testCase?.id}.json`].join(i);return d.current=setTimeout(async()=>{try{c({model:await V(r,Date.now()),isLive:!0})}catch{let e=new a(``,[]);e.errorDescriptors.push(...t.errors.flatMap(e=>e.message?[{message:e.message}]:[])),c({model:e,isLive:!1})}finally{u(l+1)}},500),()=>{d.current&&clearTimeout(d.current)}},[f,e,c,l,u,i]),E.useEffect(()=>{o?.(s?.model)},[s,o]),(0,z.jsx)(p,{model:s?.model,showSourcesFirst:!0,rootDir:t,fallbackLocation:e.testFile,isLive:s?.isLive,status:e.treeItem?.status,defaultAnnotations:e.testCase?.annotations??[],onOpenExternally:n,revealSource:r},`workbench`)},he=e=>{for(let t=e.parent;t;t=t.parent)if(t.project())return t.project()?.outputDir};async function V(e,t){let n=`file?path=${encodeURIComponent(e)}×tamp=${t}`,r=new URLSearchParams;return r.set(`trace`,n),new a(n,await(await fetch(`contexts?${r.toString()}`)).json())}var ge={cols:80,rows:24},H={pending:[],clear:()=>{},write:e=>H.pending.push(e),resize:()=>{}},U=new URLSearchParams(window.location.search),W=new URL(U.get(`server`)??`../`,window.location.href),_e=new URL(U.get(`ws`),W);_e.protocol=_e.protocol===`https:`?`wss:`:`ws:`;var G={args:U.getAll(`arg`),grep:U.get(`grep`)||void 0,grepInvert:U.get(`grepInvert`)||void 0,projects:U.getAll(`project`),workers:U.get(`workers`)||void 0,headed:U.has(`headed`),updateSnapshots:U.get(`updateSnapshots`)||void 0,reporters:U.has(`reporter`)?U.getAll(`reporter`):void 0,pathSeparator:U.get(`pathSeparator`)||`/`};G.updateSnapshots&&![`all`,`changed`,`none`,`missing`].includes(G.updateSnapshots)&&(G.updateSnapshots=void 0);var ve=navigator.platform===`MacIntel`;function ye(e){return e.startsWith(`/`)&&(e=e.substring(1)),e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function be(e,t,n){let r=e.passed+e.failed+e.skipped,i=t?r/t*100|0:0,a=[];return e.passed>0&&a.push(`${e.passed} passed`),e.failed>0&&a.push((0,z.jsxs)(`span`,{className:`status-line-failed`,children:[e.failed,` failed`]},`failed`)),e.skipped>0&&a.push(`${e.skipped} skipped`),(0,z.jsx)(`div`,{"data-testid":`status-line`,className:`status-line`,children:(0,z.jsxs)(`div`,{children:[n&&`Running `,r,`/`,t,` (`,i,`%)`,a.length>0&&` — `,a.map((e,t)=>(0,z.jsxs)(E.Fragment,{children:[t>0?`, `:``,e]},t))]})})}var xe=({})=>{let[t,r]=E.useState(``),[i,a]=E.useState(!1),[s,l]=E.useState(!1),[d,p]=E.useState(new Map([[`passed`,!1],[`failed`,!1],[`skipped`,!1]])),[m,h]=E.useState(new Map),[g,v]=E.useState(),[x,S]=E.useState(),[w,T]=E.useState({}),[D,O]=E.useState(!1),[A,ee]=E.useState(),j=A&&!A.completed,[M,N]=n(`watch-all`,!1),[P,F]=E.useState({value:new Set}),I=E.useRef(Promise.resolve()),L=E.useRef({testIds:new Set,locations:new Set}),[ne,ie]=E.useState(0),[oe,se]=E.useState(0),[le,ue]=E.useState(!1),[de,pe]=E.useState(!0),[B,he]=E.useState(),[V,U]=E.useState(),[W,xe]=E.useState(!1),[K,Se]=E.useState(!1),[Ce,we]=E.useState(!1),[Te,Ee]=E.useState(),De=E.useCallback(()=>we(!0),[we]),[Oe,ke]=n(`single-worker`,!1),[q,Ae]=n(`updateSnapshots`,`missing`),[J,je]=n(`only-changed`,!1),[Me,Ne]=n(`stop-on-failure`,!1),[Y]=n(`mergeFiles`,!1),Pe=E.useRef(null),X=E.useCallback(()=>{he(e=>(e?.close(),new _(new y(_e))))},[]);E.useEffect(()=>{Pe.current?.focus(),O(!0),X()},[X]),E.useEffect(()=>{if(!B)return;let e=[B.onStdio(e=>{if(e.buffer){let t=atob(e.buffer);H.write(t)}else H.write(e.text);e.type===`stderr`&&l(!0)}),B.onClose(()=>ue(!0))];return H.resize=(e,t)=>{ge={cols:e,rows:t},B.resizeTerminalNoReply({cols:e,rows:t})},()=>{for(let t of e)t.dispose()}},[B]),E.useEffect(()=>{if(!B)return;let e,t=new re({onUpdate:n=>{clearTimeout(e),e=void 0,n?v(t.asModel()):e||=setTimeout(()=>{v(t.asModel())},250)},onError:e=>{H.write((e.stack||e.value||``)+`
|
|
5
|
+
`),l(!0)},pathSeparator:G.pathSeparator});return U(t),v(void 0),O(!0),F({value:new Set}),(async()=>{try{await B.initialize({interceptStdio:!0,watchTestDirs:!0});let{status:e,report:n}=await B.runGlobalSetup({});if(t.processGlobalReport(n),e!==`passed`)return;let r=await B.listTests({projects:G.projects,locations:G.args,grep:G.grep,grepInvert:G.grepInvert,onlyChanged:J});t.processListReport(r.report),B.onReport(e=>{t.processTestReportEvent(e)});let{hasBrowsers:i}=await B.checkBrowsers({});pe(i)}finally{O(!1)}})(),()=>{clearTimeout(e)}},[J,B]),E.useEffect(()=>{if(!g)return;let{config:e,rootSuite:t}=g,n=e.configFile?C.getObject(e.configFile+`:projects`,void 0):void 0,r=new Map(m);for(let e of r.keys())t.suites.find(t=>t.title===e)||r.delete(e);for(let e of t.suites)r.has(e.title)||r.set(e.title,!!n?.includes(e.title));!n&&r.size&&![...r.values()].includes(!0)&&r.set(r.entries().next().value[0],!0),(m.size!==r.size||[...m].some(([e,t])=>r.get(e)!==t))&&h(r)},[m,g]),E.useEffect(()=>{j&&g?.progress?S(g.progress):g||S(void 0)},[g,j]);let{testTree:Z}=E.useMemo(()=>{if(!g)return{testTree:new te(``,new k(``,`root`),[],m,G.pathSeparator,Y)};let e=new te(``,g.rootSuite,g.loadErrors,m,G.pathSeparator,Y);return e.filterTree(t,d,j?A?.testIds:void 0),e.sortAndPropagateStatus(),e.shortenRoot(),e.flattenForSingleProject(),{testTree:e}},[t,g,d,m,A,j,Y]),Q=E.useCallback((e,t)=>{if(!(!B||!g)&&!(e===`bounce-if-busy`&&j)){for(let e of t.testIds)L.current.testIds.add(e);for(let e of t.locations)L.current.locations.add(e);I.current=I.current.then(async()=>{let{testIds:e,locations:t}=L.current;if(L.current={testIds:new Set,locations:new Set},!e.size)return;for(let t of g.rootSuite?.allTests()||[])if(e.has(t.id)){t.results=[];let e=t._createTestResult(`pending`);e[R]=`scheduled`}v({...g});let n=` [`+new Date().toLocaleTimeString()+`]`;H.write(`\x1B[2m—`.repeat(Math.max(0,ge.cols-n.length))+n+`\x1B[22m`),S({total:0,passed:0,failed:0,skipped:0}),ee({testIds:e}),await B.runTests({locations:[...t].map(ye),grep:G.grep,grepInvert:G.grepInvert,testIds:[...e],projects:[...m].filter(([e,t])=>t).map(([e])=>e),updateSnapshots:q,reporters:G.reporters,workers:Oe?1:void 0,maxFailures:Me?1:void 0,trace:`on`});for(let e of g.rootSuite?.allTests()||[])e.results[0]?.duration===-1&&(e.results=[]);v({...g}),ee(e=>e?{...e,completed:!0}:void 0)})}},[m,j,g,B,q,Oe,Me]),$=E.useCallback(()=>Q(`bounce-if-busy`,Z.collectTestIds(Z.rootItem)),[Q,Z]);E.useEffect(()=>{if(!B||!V)return;let e=B.onTestFilesChanged(async e=>{if(I.current=I.current.then(async()=>{O(!0);try{let e=await B.listTests({projects:G.projects,locations:G.args,grep:G.grep,grepInvert:G.grepInvert,onlyChanged:J});V.processListReport(e.report)}catch(e){console.log(e)}finally{O(!1)}}),await I.current,e.testFiles.length===0)return;let t=V.asModel(),n=new te(``,t.rootSuite,t.loadErrors,m,G.pathSeparator,Y),r=[],i=[],a=new Set(e.testFiles);if(M){let e=t=>{let o=t.location.file;if(o&&a.has(o)){let e=n.collectTestIds(t);r.push(...e.locations),i.push(...e.testIds)}t.kind===`group`&&t.subKind===`folder`&&t.children.forEach(e)};e(n.rootItem)}else for(let e of P.value){let t=n.treeItemById(e);if(!t)continue;let o=t;for(;!(o.kind===`group`&&(o.subKind===`file`||o.subKind===`folder`))&&o.parent;)o=o.parent;let s=o?.location.file;if(s&&a.has(s)){let e=n.collectTestIds(t);r.push(...e.locations),i.push(...e.testIds)}}Q(`queue-if-busy`,{locations:r,testIds:i})});return()=>e.dispose()},[Q,B,M,P,V,m,Y,J]),E.useEffect(()=>{if(!B)return;let e=e=>{e.code===`Backquote`&&e.ctrlKey?(e.preventDefault(),a(!i)):e.code===`F5`&&e.shiftKey?(e.preventDefault(),B?.stopTestsNoReply({})):e.code===`F5`&&(e.preventDefault(),$())};return addEventListener(`keydown`,e),()=>{removeEventListener(`keydown`,e)}},[$,X,B,i]);let Fe=E.useRef(null),Ie=E.useCallback(e=>{e.preventDefault(),e.stopPropagation(),Fe.current?.showModal()},[]),Le=E.useCallback(e=>{e.preventDefault(),e.stopPropagation(),Fe.current?.close()},[]),Re=E.useCallback(e=>{Le(e),a(!0),B?.installBrowsers({}).then(async()=>{a(!1);let{hasBrowsers:e}=await B?.checkBrowsers({});pe(e)})},[Le,B]);return(0,z.jsxs)(`div`,{className:`vbox ui-mode`,children:[!de&&(0,z.jsxs)(`dialog`,{ref:Fe,children:[(0,z.jsxs)(`div`,{className:`title`,children:[(0,z.jsx)(`span`,{className:`codicon codicon-lightbulb`}),`Install browsers`]}),(0,z.jsxs)(`div`,{className:`body`,children:[`Playwright did not find installed browsers.`,(0,z.jsx)(`br`,{}),"Would you like to run `playwright install`?",(0,z.jsx)(`br`,{}),(0,z.jsx)(`button`,{className:`button`,onClick:Re,children:`Install`}),(0,z.jsx)(`button`,{className:`button secondary`,onClick:Le,children:`Dismiss`})]})]}),le&&(0,z.jsxs)(`div`,{className:`disconnected`,children:[(0,z.jsx)(`div`,{className:`title`,children:`UI Mode disconnected`}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`a`,{href:`#`,onClick:()=>window.location.href=`/`,children:`Reload the page`}),` to reconnect`]})]}),(0,z.jsx)(f,{sidebarSize:250,minSidebarSize:150,orientation:`horizontal`,sidebarIsFirst:!0,settingName:`testListSidebar`,main:(0,z.jsxs)(`div`,{className:`vbox`,children:[(0,z.jsxs)(`div`,{className:e(`vbox`,!i&&`hidden`),children:[(0,z.jsxs)(c,{children:[(0,z.jsx)(`div`,{className:`section-title`,style:{flex:`none`},children:`Output`}),(0,z.jsx)(u,{icon:`circle-slash`,title:`Clear output`,onClick:()=>{H.clear(),l(!1)}}),(0,z.jsx)(`div`,{className:`spacer`}),(0,z.jsx)(u,{icon:`close`,title:`Close`,onClick:()=>a(!1)})]}),(0,z.jsx)(ae,{source:H})]}),(0,z.jsx)(`div`,{className:e(`vbox`,i&&`hidden`),children:(0,z.jsx)(me,{pathSeparator:G.pathSeparator,item:w,onModelChange:Ee,rootDir:g?.config?.rootDir,revealSource:Ce,onOpenExternally:e=>B?.openNoReply({location:{file:e.file,line:e.line,column:e.column}})})})]}),sidebar:(0,z.jsxs)(`div`,{className:`vbox ui-mode-sidebar`,children:[(0,z.jsxs)(c,{noShadow:!0,noMinHeight:!0,children:[(0,z.jsx)(`img`,{src:`playwright-logo.svg`,alt:`Playwright logo`}),(0,z.jsx)(`div`,{className:`section-title`,children:`Playwright`}),(0,z.jsx)(u,{icon:`refresh`,title:`Reload`,onClick:()=>X(),disabled:j||D}),(0,z.jsx)(`div`,{style:{position:`relative`},children:(0,z.jsx)(u,{icon:`terminal`,title:`Toggle output — `+(ve?"⌃`":"Ctrl + `"),toggled:i,errorBadge:s?`Output contains error`:void 0,onClick:()=>{a(!i)}})}),!de&&(0,z.jsx)(u,{icon:`lightbulb-autofix`,style:{color:`var(--vscode-list-warningForeground)`},title:`Playwright browsers are missing`,onClick:Ie})]}),(0,z.jsx)(ce,{filterText:t,setFilterText:r,statusFilters:d,setStatusFilters:p,projectFilters:m,setProjectFilters:h,onlyChanged:J,setOnlyChanged:je,testModel:g,runTests:$}),(0,z.jsxs)(c,{className:`section-toolbar`,noMinHeight:!0,children:[!j&&!x&&(0,z.jsx)(`div`,{className:`section-title`,children:`Tests`}),x&&be(x,j?A.testIds.size:x.total,!!j),(0,z.jsx)(u,{icon:`play`,title:`Run all — F5`,onClick:$,disabled:j||D}),(0,z.jsx)(u,{icon:`debug-stop`,title:`Stop — `+(ve?`⇧F5`:`Shift + F5`),onClick:()=>B?.stopTests({}),disabled:!j||D,testId:`stop-button`}),(0,z.jsx)(u,{icon:`eye`,title:`Watch all`,toggled:M,onClick:()=>{F({value:new Set}),N(!M)}}),(0,z.jsx)(u,{icon:`collapse-all`,title:`Collapse all`,onClick:()=>{ie(ne+1)}}),(0,z.jsx)(u,{icon:`expand-all`,title:`Expand all`,onClick:()=>{se(oe+1)}})]}),(0,z.jsx)(fe,{filterText:t,testModel:g,testTree:Z,testServerConnection:B,runningState:A,runTests:Q,onItemSelected:T,watchAll:M,watchedTreeIds:P,setWatchedTreeIds:F,isLoading:D,requestedCollapseAllCount:ne,requestedExpandAllCount:oe,setFilterText:r,onRevealSource:De}),(0,z.jsxs)(c,{noShadow:!0,noMinHeight:!0,className:`settings-toolbar`,onClick:()=>Se(!K),children:[(0,z.jsx)(`span`,{className:`codicon codicon-${K?`chevron-down`:`chevron-right`}`,style:{marginLeft:5},title:K?`Hide Testing Options`:`Show Testing Options`}),(0,z.jsx)(`div`,{className:`section-title`,children:`Testing Options`})]}),K&&(0,z.jsx)(o,{settings:[{type:`check`,value:Oe,set:ke,name:`Single worker`},{type:`check`,value:Me,set:Ne,name:`Stop on first failure`},{type:`select`,options:[{label:`All`,value:`all`},{label:`Changed`,value:`changed`},{label:`Missing`,value:`missing`},{label:`None`,value:`none`}],value:q,set:Ae,name:`Update snapshots`}]}),(0,z.jsxs)(c,{noShadow:!0,noMinHeight:!0,className:`settings-toolbar`,onClick:()=>xe(!W),children:[(0,z.jsx)(`span`,{className:`codicon codicon-${W?`chevron-down`:`chevron-right`}`,style:{marginLeft:5},title:W?`Hide Settings`:`Show Settings`}),(0,z.jsx)(`div`,{className:`section-title`,children:`Settings`})]}),W&&(0,z.jsx)(b,{location:`ui-mode`,model:Te})]})})]})};(async()=>{if(s(),window.location.protocol!==`file:`){if(!navigator.serviceWorker)throw Error(`Service workers are not supported.\nMake sure to serve the website (${window.location}) via HTTPS or localhost.`);navigator.serviceWorker.register(`sw.bundle.js`),navigator.serviceWorker.controller||await new Promise(e=>{navigator.serviceWorker.oncontrollerchange=()=>e()}),setInterval(function(){fetch(`ping`)},1e4)}D.createRoot(document.querySelector(`#root`)).render((0,z.jsx)(xe,{}))})();
|