sliccy 6.192.0 → 6.193.0
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.
- package/dist/ui/.vite/manifest.json +182 -182
- package/dist/ui/assets/{MEMORY-CbB3xjAS.js → MEMORY-B9cGngY_.js} +6 -1
- package/dist/ui/assets/{SKILL-Be-LbAuP.js → SKILL-CVh4bFFa.js} +1 -1
- package/dist/ui/assets/{account-store-Bevys7WL.js → account-store-SimIXg8S.js} +1 -1
- package/dist/ui/assets/{account-store-irTFXEHq.js → account-store-b2cIu79O.js} +1 -1
- package/dist/ui/assets/adobe-BXH1mZBP.js +1 -0
- package/dist/ui/assets/{adobe-CxPY_Nvf.js → adobe-Baxaw9tF.js} +1 -1
- package/dist/ui/assets/{agent-panels-CDAHwcGe.js → agent-panels-SuTziiZF.js} +1 -1
- package/dist/ui/assets/{almost-bash-shell-headless-B6lKPYip.js → almost-bash-shell-headless-KRKIc_BC.js} +458 -458
- package/dist/ui/assets/{apply-layout-BaPTlEmq.js → apply-layout-BMXr012X.js} +1 -1
- package/dist/ui/assets/{apps-CWLDElDt.js → apps-ClHDPvz3.js} +1 -1
- package/dist/ui/assets/{azure-openai-CAmcCxYK.js → azure-openai-DBM2Ldvh.js} +1 -1
- package/dist/ui/assets/{azure-openai-BrEMU1w0.js → azure-openai-DLiuqAAg.js} +1 -1
- package/dist/ui/assets/{backend-hostfs-DVOOQmWO.js → backend-hostfs-CMvkeWSE.js} +1 -1
- package/dist/ui/assets/{browser-DL3zbJrM.js → browser-Don7GC1D.js} +16 -16
- package/dist/ui/assets/{cdp-l5Vq6Mtp.js → cdp-DDirvj-c.js} +1 -1
- package/dist/ui/assets/{cerebras-DyJkWRm7.js → cerebras-DuPDmIOB.js} +1 -1
- package/dist/ui/assets/{cerebras-COJ_qkGu.js → cerebras-lgyiolIY.js} +1 -1
- package/dist/ui/assets/{composer-speech-CYdWOXqF.js → composer-speech-DmZY4JVi.js} +1 -1
- package/dist/ui/assets/{connect-surface-DnaS1qCD.js → connect-surface-BOTHMD51.js} +1 -1
- package/dist/ui/assets/{cost-command-DC0JwdLM.js → cost-command-MXw_GKzX.js} +1 -1
- package/dist/ui/assets/{directed-approval-Bo1zb-ki.js → directed-approval-CerbvC2D.js} +1 -1
- package/dist/ui/assets/{emscripten-vfs-hook-DORb16y9.js → emscripten-vfs-hook-BuS59209.js} +1 -1
- package/dist/ui/assets/{ensure-speech-assets-DXQUrOok.js → ensure-speech-assets-p_8CXJAD.js} +1 -1
- package/dist/ui/assets/{frozen-archive-writer-C_qn0GDJ.js → frozen-archive-writer-CFfTnqU4.js} +2 -2
- package/dist/ui/assets/fs-BxDhct-3.js +1 -0
- package/dist/ui/assets/fs-C5DLxUuw.js +2 -0
- package/dist/ui/assets/{gelatiere-store-D0SzDyoX.js → gelatiere-store-BvgAd5Zk.js} +1 -1
- package/dist/ui/assets/{gelatiere-unit-D0eC3q8k.js → gelatiere-unit-s-jBG-uE.js} +1 -1
- package/dist/ui/assets/{github-DrXxnqrr.js → github-BXOGqSiK.js} +2 -2
- package/dist/ui/assets/{github-CMMdXD7-.js → github-DG9QiZYP.js} +1 -1
- package/dist/ui/assets/{github-auth-CVs8hOEW.js → github-auth-CwHehFvz.js} +1 -1
- package/dist/ui/assets/{github-copilot-BDW-hvGU.js → github-copilot-DGPlFE5e.js} +1 -1
- package/dist/ui/assets/{github-copilot-F_OWE6ig.js → github-copilot-Dt82sOhC.js} +1 -1
- package/dist/ui/assets/{github-install-B-rr32FO.js → github-install-jl4FPsHI.js} +1 -1
- package/dist/ui/assets/{github-zip-DA_-VtNu.js → github-zip-BAWKMgjN.js} +1 -1
- package/dist/ui/assets/{hear-B1QjKHJS.js → hear-TuDMtKj3.js} +1 -1
- package/dist/ui/assets/{help-C3q6Ha5a.js → help-BbUskVkl.js} +1 -1
- package/dist/ui/assets/{host-command-DTM6_CU_.js → host-command-D8TK1jxM.js} +1 -1
- package/dist/ui/assets/installer-08nILdgJ.js +4 -0
- package/dist/ui/assets/{js-realm-worker-CIzPgKVU.js → js-realm-worker-UfwUgA6T.js} +14 -14
- package/dist/ui/assets/{jsh-executor-8n8-NVRR.js → jsh-executor-DdHf6Js2.js} +2 -2
- package/dist/ui/assets/{kernel-worker-YhNfUQ_y.js → kernel-worker-DiHbIWEg.js} +62 -58
- package/dist/ui/assets/{lick-ws-bridge-CDPuY-EA.js → lick-ws-bridge-CtPW0aNT.js} +1 -1
- package/dist/ui/assets/{lick-ws-bridge-BWmnM4i8.js → lick-ws-bridge-Dglm_RzS.js} +1 -1
- package/dist/ui/assets/live-session-curation-BO60iZm7.js +1 -0
- package/dist/ui/assets/{live-session-snapshot-CAY9GlTD.js → live-session-snapshot-DSYdvZ1k.js} +1 -1
- package/dist/ui/assets/{local-llm-dPetWUMs.js → local-llm-CA-oC8S7.js} +1 -1
- package/dist/ui/assets/{local-llm-CsIWLXJ2.js → local-llm-hkLYzSvm.js} +1 -1
- package/dist/ui/assets/{main-DUD5pTDH.js → main-BcLR9n_M.js} +3 -3
- package/dist/ui/assets/{main-cherry-BoO4BB-J.js → main-cherry-D8lHtydB.js} +1 -1
- package/dist/ui/assets/memory-budget-CFfevxz_.js +1 -0
- package/dist/ui/assets/{memory-curation-seam-DFftwyHh.js → memory-curation-seam-BJN7RaZ_.js} +1 -1
- package/dist/ui/assets/{memory-health-DF6IEFmt.js → memory-health-CmDIs1jS.js} +1 -1
- package/dist/ui/assets/memory-write-execute-C6Ys0m3p.js +1 -0
- package/dist/ui/assets/{mount-BfPgf0TT.js → mount-3ssq_M3f.js} +1 -1
- package/dist/ui/assets/{mount-BsWbgqHU.js → mount-oJcDzYHJ.js} +3 -3
- package/dist/ui/assets/{new-session-n4ieWj9Q.js → new-session-DCVrxowi.js} +2 -2
- package/dist/ui/assets/{oauth-bootstrap-DEjPbx0S.js → oauth-bootstrap-D1FahnIy.js} +2 -2
- package/dist/ui/assets/{onboarding-orchestrator-DTq_WzOT.js → onboarding-orchestrator-UOkZjppy.js} +1 -1
- package/dist/ui/assets/{openai-codex-CZFJxrdp.js → openai-codex-B2yw-3yu.js} +1 -1
- package/dist/ui/assets/{openai-codex-CRBPHYXu.js → openai-codex-B5_xqxDd.js} +1 -1
- package/dist/ui/assets/{openrouter-Bp2hCSj0.js → openrouter-BfigMcxO.js} +1 -1
- package/dist/ui/assets/{openrouter-xrK_Q7tb.js → openrouter-BwQeVkB-.js} +1 -1
- package/dist/ui/assets/{openrouter-free-B1aHr6YX.js → openrouter-free-B_pyNu1H.js} +1 -1
- package/dist/ui/assets/{openrouter-free-Ciud-jQF.js → openrouter-free-Cmp0KK1x.js} +1 -1
- package/dist/ui/assets/{openrouter-oauth-BShl7mda.js → openrouter-oauth-CjE2dXpj.js} +1 -1
- package/dist/ui/assets/{openrouter-oauth-CBNfp9B7.js → openrouter-oauth-DxX2hvVP.js} +1 -1
- package/dist/ui/assets/{opfs-mount-DF1_TQm7.js → opfs-mount-5UoVuxDu.js} +1 -1
- package/dist/ui/assets/{panel-rpc-handlers-DYotibPR.js → panel-rpc-handlers-bRzKgfVJ.js} +2 -2
- package/dist/ui/assets/{panelize-shell-5hKkbwSl.js → panelize-shell-DAt5CNbQ.js} +1 -1
- package/dist/ui/assets/{pi-edit-execution-CcLt8vSI.js → pi-edit-execution-CUuZWLzj.js} +1 -1
- package/dist/ui/assets/{provider-BLshPMsZ.js → provider-BCi9Lt4r.js} +2 -2
- package/dist/ui/assets/{provider-DqEfigmv.js → provider-aSGF7d4k.js} +1 -1
- package/dist/ui/assets/{provider-settings-BuaTQYid.js → provider-settings-DBgiE3eI.js} +1 -1
- package/dist/ui/assets/provider-store-access-B-R3ftEl.js +1 -0
- package/dist/ui/assets/provider-store-access-DWKXxpFB.js +1 -0
- package/dist/ui/assets/{providers-CE4VqQs6.js → providers-CGp8gI0u.js} +2 -2
- package/dist/ui/assets/{providers-B3cOXz1H.js → providers-CuHIzVOH.js} +1 -1
- package/dist/ui/assets/{quick-llm-D1wGZooG.js → quick-llm-DoBxND6k.js} +1 -1
- package/dist/ui/assets/{realm-inprocess-Dcn5yLm3.js → realm-inprocess-CtMTK-aN.js} +11 -11
- package/dist/ui/assets/{realm-unhandled-rejections-BU76F0PI.js → realm-unhandled-rejections-Dqt1Gk_j.js} +1 -1
- package/dist/ui/assets/{realm-unhandled-rejections-BXxVemlU.js → realm-unhandled-rejections-mGOVnR3q.js} +1 -1
- package/dist/ui/assets/{recovery-screen-D6HBp0xj.js → recovery-screen-B5zo1B0l.js} +1 -1
- package/dist/ui/assets/{remote-terminal-view-BDO5t9M_.js → remote-terminal-view-DDLUNW_y.js} +2 -2
- package/dist/ui/assets/{restore-CdH_ze1C.js → restore-Dd8d_Hgn.js} +1 -1
- package/dist/ui/assets/{run-D2pF2y1_.js → run-6f72KPaA.js} +1 -1
- package/dist/ui/assets/{run-DNvbqTbo.js → run-Bksq7Mcn.js} +1 -1
- package/dist/ui/assets/{run-fHfrubKD.js → run-BtSi8XBr.js} +1 -1
- package/dist/ui/assets/{run-B4snw1GL.js → run-DFA1g9kE.js} +2 -2
- package/dist/ui/assets/{run-xrVX3llR.js → run-DSsM13ob.js} +1 -1
- package/dist/ui/assets/{run-C_6GKpBV.js → run-DaUWBY-8.js} +6 -5
- package/dist/ui/assets/{run-CK7bQLZ0.js → run-DthMAupa.js} +2 -2
- package/dist/ui/assets/{run-CkKb9UWF.js → run-TkhZNuOx.js} +2 -2
- package/dist/ui/assets/{run-DsYsM6Yl.js → run-pvy0ymSy.js} +1 -1
- package/dist/ui/assets/{session-command-memory-CGqbKVAE.js → session-command-memory-Bl7bZtJm.js} +2 -2
- package/dist/ui/assets/{session-jsonl-CgKvYDUr.js → session-jsonl-Bv4dRBT4.js} +1 -1
- package/dist/ui/assets/{session-jsonl-CbNA3lGB.js → session-jsonl-DrVVeoTe.js} +1 -1
- package/dist/ui/assets/{session-search-index-CKHuYyZd.js → session-search-index-DGDHOAzl.js} +2 -2
- package/dist/ui/assets/{setup-feature-flags-remote-DU_3gSCe.js → setup-feature-flags-remote-CIhV4D0j.js} +1 -1
- package/dist/ui/assets/{setup-model-catalog-CQmIQSJ6.js → setup-model-catalog-BVDWM2AV.js} +1 -1
- package/dist/ui/assets/{signed-fetch-DEi8arT4.js → signed-fetch-CI9UIEV3.js} +1 -1
- package/dist/ui/assets/{silent-renew-backoff-UU1St8tN.js → silent-renew-backoff-BcsYBz66.js} +1 -1
- package/dist/ui/assets/slicc-version-BUehjIK3.js +1 -0
- package/dist/ui/assets/{snapshot-BPuldVwP.js → snapshot-CuamLfhh.js} +1 -1
- package/dist/ui/assets/{snapshot-features-Ddz9jsBd.js → snapshot-features-C5OANvrP.js} +1 -1
- package/dist/ui/assets/{soundscape-Uopjnq2I.js → soundscape-BwoAG-sm.js} +1 -1
- package/dist/ui/assets/{speak-D_PLnidz.js → speak-DwgV2tTT.js} +1 -1
- package/dist/ui/assets/{sprinkle-manager-BpNh9Lri.js → sprinkle-manager-DNJheHds.js} +1 -1
- package/dist/ui/assets/{sprinkle-renderer-BljwWT0g.js → sprinkle-renderer-CumxYPMj.js} +1 -1
- package/dist/ui/assets/{ssh-DBPFvqmL.js → ssh-B58quV88.js} +1 -1
- package/dist/ui/assets/{state-CHrSe9Ro.js → state-D_VYopGz.js} +1 -1
- package/dist/ui/assets/{store-BvFCmAq8.js → store-DJqDctgs.js} +1 -1
- package/dist/ui/assets/{store-BikzV66S.js → store-Dr9vzNP5.js} +1 -1
- package/dist/ui/assets/{sudo-rquT1VWH.js → sudo-BlL3sTXW.js} +1 -1
- package/dist/ui/assets/{sudo-fs-C6r_MIIY.js → sudo-fs-CQphjEUf.js} +1 -1
- package/dist/ui/assets/{supervisor-MXcG8SU6.js → supervisor-smOiGe-0.js} +1 -1
- package/dist/ui/assets/{sync-dialog-zmsfROKR.js → sync-dialog-Dyg2UAEo.js} +1 -1
- package/dist/ui/assets/{transformers-env-DVU2J7Xd.js → transformers-env-UAM9w3LM.js} +1 -1
- package/dist/ui/assets/{tray-leader-5xt9j15D.js → tray-leader-DK60MjaP.js} +1 -1
- package/dist/ui/assets/{tray-leave-runtime-B5LmQl4b.js → tray-leave-runtime-xgABwff8.js} +1 -1
- package/dist/ui/assets/{tray-sidecar-pljn-63X.js → tray-sidecar-BASB7cHq.js} +1 -1
- package/dist/ui/assets/{upgrade-detection-Ta4nIJJR.js → upgrade-detection-CcWsY0kz.js} +1 -1
- package/dist/ui/assets/{upskill-lick-skip-IyN1i0IF.js → upskill-lick-skip-BXEN7tuy.js} +1 -1
- package/dist/ui/assets/{voice-reply-aiuvZ8F3.js → voice-reply-DiXcXbUh.js} +1 -1
- package/dist/ui/assets/{wc-attach-C1CTfWQ-.js → wc-attach-CY3wKM4q.js} +2 -2
- package/dist/ui/assets/{wc-browser-RbezSPht.js → wc-browser-DE6aJENW.js} +1 -1
- package/dist/ui/assets/{wc-computers-D4IEEM5M.js → wc-computers-C9GCAa4H.js} +1 -1
- package/dist/ui/assets/{wc-detached-CrVlYV_z.js → wc-detached-5v5K5mcQ.js} +1 -1
- package/dist/ui/assets/{wc-extension-BW5y8hdg.js → wc-extension-D52mizb7.js} +2 -2
- package/dist/ui/assets/{wc-follower-xchSJ13T.js → wc-follower-CJOYr6g8.js} +3 -3
- package/dist/ui/assets/{wc-follower-oauth-BArMqE7c.js → wc-follower-oauth-B-6WQQBu.js} +1 -1
- package/dist/ui/assets/{wc-gelatiere-CxGkXDNo.js → wc-gelatiere-B2Bep1GD.js} +1 -1
- package/dist/ui/assets/{wc-live-DdOUCb1z.js → wc-live-CvDfoeZP.js} +11 -6
- package/dist/ui/assets/{wc-nav-C-cqoNl9.js → wc-nav-TcvaUUjk.js} +2 -2
- package/dist/ui/assets/{wc-onboarding-CId-wqvG.js → wc-onboarding-CFQJPD-H.js} +2 -2
- package/dist/ui/assets/{wc-permissions-lj9xrdU-.js → wc-permissions-BN0L49tc.js} +2 -2
- package/dist/ui/assets/{wc-placeholder-bs83QBxc.js → wc-placeholder-C_2WDAIS.js} +3 -3
- package/dist/ui/assets/{wc-secret-request-BmVSG3Qe.js → wc-secret-request-Dg-LzTLD.js} +1 -1
- package/dist/ui/assets/{wc-settings-CE5aZbkW.js → wc-settings-qv3-GQuG.js} +3 -3
- package/dist/ui/assets/{wc-shell-DdSbkIp-.js → wc-shell-B2rVnxeB.js} +5 -5
- package/dist/ui/assets/{wc-shortcut-config-C2d66GP8.js → wc-shortcut-config-DxXBHdKj.js} +1 -1
- package/dist/ui/assets/{wc-sprinkles-ak7XBDCk.js → wc-sprinkles-RfofsinU.js} +2 -2
- package/dist/ui/assets/{wc-transcript-export-DYVbwupj.js → wc-transcript-export-DE4ckv6H.js} +2 -2
- package/dist/ui/assets/{wc-tray-CjkC7SwM.js → wc-tray-CBNoNpOV.js} +4 -4
- package/dist/ui/assets/welcome-detection-SGZmx8Ya.js +1 -0
- package/dist/ui/assets/{whisper-session-DBea3Pzc.js → whisper-session-Cl4_UhwI.js} +2 -2
- package/dist/ui/assets/{xai-grok-B-WV19uN.js → xai-grok-CQ-_7nZn.js} +1 -1
- package/dist/ui/assets/{xai-grok-CAPZiieq.js → xai-grok-DV6fnUIH.js} +1 -1
- package/dist/ui/index.html +3 -3
- package/dist/ui/packages/webapp/index.html +3 -3
- package/package.json +1 -1
- package/dist/ui/assets/adobe-C2Yk0FjU.js +0 -1
- package/dist/ui/assets/fs-D5UZBrBX.js +0 -1
- package/dist/ui/assets/fs-DouF0VP9.js +0 -2
- package/dist/ui/assets/installer-BamTBGiN.js +0 -4
- package/dist/ui/assets/live-session-curation-eGH4uyM1.js +0 -1
- package/dist/ui/assets/memory-budget-Bcf7Eolo.js +0 -1
- package/dist/ui/assets/memory-write-execute-C7SUGCPF.js +0 -1
- package/dist/ui/assets/provider-store-access-BABW1Cfu.js +0 -1
- package/dist/ui/assets/provider-store-access-C2xFS3NU.js +0 -1
- package/dist/ui/assets/slicc-version-D8Zbv4vp.js +0 -1
- package/dist/ui/assets/welcome-detection-BAQGL8Ld.js +0 -1
|
@@ -7,10 +7,10 @@ e.read=function(e,t,n,r,i){var a,o,s=i*8-r-1,c=(1<<s)-1,l=c>>1,u=-7,d=n?i-1:0,f=
|
|
|
7
7
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
8
8
|
* @license MIT
|
|
9
9
|
*/
|
|
10
|
-
let r=t(),i=n(),a=typeof Symbol==`function`&&typeof Symbol.for==`function`?Symbol.for(`nodejs.util.inspect.custom`):null;e.Buffer=l,e.SlowBuffer=b,e.INSPECT_MAX_BYTES=50;let o=2147483647;e.kMaxLength=o,l.TYPED_ARRAY_SUPPORT=s(),!l.TYPED_ARRAY_SUPPORT&&typeof console<`u`&&typeof console.error==`function`&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function s(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return!1}}Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}});function c(e){if(e>o)throw RangeError(`The value "`+e+`" is invalid for option "size"`);let t=new Uint8Array(e);return Object.setPrototypeOf(t,l.prototype),t}function l(e,t,n){if(typeof e==`number`){if(typeof t==`string`)throw TypeError(`The "string" argument must be of type string. Received type number`);return p(e)}return u(e,t,n)}l.poolSize=8192;function u(e,t,n){if(typeof e==`string`)return m(e,t);if(ArrayBuffer.isView(e))return g(e);if(e==null)throw TypeError(`The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type `+typeof e);if(N(e,ArrayBuffer)||e&&N(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<`u`&&(N(e,SharedArrayBuffer)||e&&N(e.buffer,SharedArrayBuffer)))return _(e,t,n);if(typeof e==`number`)throw TypeError(`The "value" argument must not be of type number. Received type number`);let r=e.valueOf&&e.valueOf();if(r!=null&&r!==e)return l.from(r,t,n);let i=v(e);if(i)return i;if(typeof Symbol<`u`&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]==`function`)return l.from(e[Symbol.toPrimitive](`string`),t,n);throw TypeError(`The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type `+typeof e)}l.from=function(e,t,n){return u(e,t,n)},Object.setPrototypeOf(l.prototype,Uint8Array.prototype),Object.setPrototypeOf(l,Uint8Array);function d(e){if(typeof e!=`number`)throw TypeError(`"size" argument must be of type number`);if(e<0)throw RangeError(`The value "`+e+`" is invalid for option "size"`)}function f(e,t,n){return d(e),e<=0||t===void 0?c(e):typeof n==`string`?c(e).fill(t,n):c(e).fill(t)}l.alloc=function(e,t,n){return f(e,t,n)};function p(e){return d(e),c(e<0?0:y(e)|0)}l.allocUnsafe=function(e){return p(e)},l.allocUnsafeSlow=function(e){return p(e)};function m(e,t){if((typeof t!=`string`||t===``)&&(t=`utf8`),!l.isEncoding(t))throw TypeError(`Unknown encoding: `+t);let n=x(e,t)|0,r=c(n),i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}function h(e){let t=e.length<0?0:y(e.length)|0,n=c(t);for(let r=0;r<t;r+=1)n[r]=e[r]&255;return n}function g(e){if(N(e,Uint8Array)){let t=new Uint8Array(e);return _(t.buffer,t.byteOffset,t.byteLength)}return h(e)}function _(e,t,n){if(t<0||e.byteLength<t)throw RangeError(`"offset" is outside of buffer bounds`);if(e.byteLength<t+(n||0))throw RangeError(`"length" is outside of buffer bounds`);let r;return r=t===void 0&&n===void 0?new Uint8Array(e):n===void 0?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(r,l.prototype),r}function v(e){if(l.isBuffer(e)){let t=y(e.length)|0,n=c(t);return n.length===0||e.copy(n,0,0,t),n}if(e.length!==void 0)return typeof e.length!=`number`||De(e.length)?c(0):h(e);if(e.type===`Buffer`&&Array.isArray(e.data))return h(e.data)}function y(e){if(e>=o)throw RangeError(`Attempt to allocate Buffer larger than maximum size: 0x`+o.toString(16)+` bytes`);return e|0}function b(e){return+e!=e&&(e=0),l.alloc(+e)}l.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==l.prototype},l.compare=function(e,t){if(N(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),N(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),!l.isBuffer(e)||!l.isBuffer(t))throw TypeError(`The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array`);if(e===t)return 0;let n=e.length,r=t.length;for(let i=0,a=Math.min(n,r);i<a;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:+(r<n)},l.isEncoding=function(e){switch(String(e).toLowerCase()){case`hex`:case`utf8`:case`utf-8`:case`ascii`:case`latin1`:case`binary`:case`base64`:case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return!0;default:return!1}},l.concat=function(e,t){if(!Array.isArray(e))throw TypeError(`"list" argument must be an Array of Buffers`);if(e.length===0)return l.alloc(0);let n;if(t===void 0)for(t=0,n=0;n<e.length;++n)t+=e[n].length;let r=l.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){let t=e[n];if(N(t,Uint8Array))i+t.length>r.length?(l.isBuffer(t)||(t=l.from(t)),t.copy(r,i)):Uint8Array.prototype.set.call(r,t,i);else if(l.isBuffer(t))t.copy(r,i);else throw TypeError(`"list" argument must be an Array of Buffers`);i+=t.length}return r};function x(e,t){if(l.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||N(e,ArrayBuffer))return e.byteLength;if(typeof e!=`string`)throw TypeError(`The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type `+typeof e);let n=e.length,r=arguments.length>2&&arguments[2]===!0;if(!r&&n===0)return 0;let i=!1;for(;;)switch(t){case`ascii`:case`latin1`:case`binary`:return n;case`utf8`:case`utf-8`:return Se(e).length;case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return n*2;case`hex`:return n>>>1;case`base64`:return Te(e).length;default:if(i)return r?-1:Se(e).length;t=(``+t).toLowerCase(),i=!0}}l.byteLength=x;function S(e,t,n){let r=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((n===void 0||n>this.length)&&(n=this.length),n<=0)||(n>>>=0,t>>>=0,n<=t))return``;for(e||=`utf8`;;)switch(e){case`hex`:return se(this,t,n);case`utf8`:case`utf-8`:return ne(this,t,n);case`ascii`:return ae(this,t,n);case`latin1`:case`binary`:return oe(this,t,n);case`base64`:return te(this,t,n);case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return ce(this,t,n);default:if(r)throw TypeError(`Unknown encoding: `+e);e=(e+``).toLowerCase(),r=!0}}l.prototype._isBuffer=!0;function C(e,t,n){let r=e[t];e[t]=e[n],e[n]=r}l.prototype.swap16=function(){let e=this.length;if(e%2!=0)throw RangeError(`Buffer size must be a multiple of 16-bits`);for(let t=0;t<e;t+=2)C(this,t,t+1);return this},l.prototype.swap32=function(){let e=this.length;if(e%4!=0)throw RangeError(`Buffer size must be a multiple of 32-bits`);for(let t=0;t<e;t+=4)C(this,t,t+3),C(this,t+1,t+2);return this},l.prototype.swap64=function(){let e=this.length;if(e%8!=0)throw RangeError(`Buffer size must be a multiple of 64-bits`);for(let t=0;t<e;t+=8)C(this,t,t+7),C(this,t+1,t+6),C(this,t+2,t+5),C(this,t+3,t+4);return this},l.prototype.toString=function(){let e=this.length;return e===0?``:arguments.length===0?ne(this,0,e):S.apply(this,arguments)},l.prototype.toLocaleString=l.prototype.toString,l.prototype.equals=function(e){if(!l.isBuffer(e))throw TypeError(`Argument must be a Buffer`);return this===e||l.compare(this,e)===0},l.prototype.inspect=function(){let t=``,n=e.INSPECT_MAX_BYTES;return t=this.toString(`hex`,0,n).replace(/(.{2})/g,`$1 `).trim(),this.length>n&&(t+=` ... `),`<Buffer `+t+`>`},a&&(l.prototype[a]=l.prototype.inspect),l.prototype.compare=function(e,t,n,r,i){if(N(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(e))throw TypeError(`The "target" argument must be one of type Buffer or Uint8Array. Received type `+typeof e);if(t===void 0&&(t=0),n===void 0&&(n=e?e.length:0),r===void 0&&(r=0),i===void 0&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw RangeError(`out of range index`);if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;let a=i-r,o=n-t,s=Math.min(a,o),c=this.slice(r,i),u=e.slice(t,n);for(let e=0;e<s;++e)if(c[e]!==u[e]){a=c[e],o=u[e];break}return a<o?-1:+(o<a)};function w(e,t,n,r,i){if(e.length===0)return-1;if(typeof n==`string`?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,De(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(i)n=0;else return-1}if(typeof t==`string`&&(t=l.from(t,r)),l.isBuffer(t))return t.length===0?-1:T(e,t,n,r,i);if(typeof t==`number`)return t&=255,typeof Uint8Array.prototype.indexOf==`function`?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):T(e,[t],n,r,i);throw TypeError(`val must be string, number or Buffer`)}function T(e,t,n,r,i){let a=1,o=e.length,s=t.length;if(r!==void 0&&(r=String(r).toLowerCase(),r===`ucs2`||r===`ucs-2`||r===`utf16le`||r===`utf-16le`)){if(e.length<2||t.length<2)return-1;a=2,o/=2,s/=2,n/=2}function c(e,t){return a===1?e[t]:e.readUInt16BE(t*a)}let l;if(i){let r=-1;for(l=n;l<o;l++)if(c(e,l)===c(t,r===-1?0:l-r)){if(r===-1&&(r=l),l-r+1===s)return r*a}else r!==-1&&(l-=l-r),r=-1}else for(n+s>o&&(n=o-s),l=n;l>=0;l--){let n=!0;for(let r=0;r<s;r++)if(c(e,l+r)!==c(t,r)){n=!1;break}if(n)return l}return-1}l.prototype.includes=function(e,t,n){return this.indexOf(e,t,n)!==-1},l.prototype.indexOf=function(e,t,n){return w(this,e,t,n,!0)},l.prototype.lastIndexOf=function(e,t,n){return w(this,e,t,n,!1)};function E(e,t,n,r){n=Number(n)||0;let i=e.length-n;r?(r=Number(r),r>i&&(r=i)):r=i;let a=t.length;r>a/2&&(r=a/2);let o;for(o=0;o<r;++o){let r=parseInt(t.substr(o*2,2),16);if(De(r))return o;e[n+o]=r}return o}function D(e,t,n,r){return Ee(Se(t,e.length-n),e,n,r)}function O(e,t,n,r){return Ee(Ce(t),e,n,r)}function k(e,t,n,r){return Ee(Te(t),e,n,r)}function ee(e,t,n,r){return Ee(we(t,e.length-n),e,n,r)}l.prototype.write=function(e,t,n,r){if(t===void 0)r=`utf8`,n=this.length,t=0;else if(n===void 0&&typeof t==`string`)r=t,n=this.length,t=0;else if(isFinite(t))t>>>=0,isFinite(n)?(n>>>=0,r===void 0&&(r=`utf8`)):(r=n,n=void 0);else throw Error(`Buffer.write(string, encoding, offset[, length]) is no longer supported`);let i=this.length-t;if((n===void 0||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw RangeError(`Attempt to write outside buffer bounds`);r||=`utf8`;let a=!1;for(;;)switch(r){case`hex`:return E(this,e,t,n);case`utf8`:case`utf-8`:return D(this,e,t,n);case`ascii`:case`latin1`:case`binary`:return O(this,e,t,n);case`base64`:return k(this,e,t,n);case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return ee(this,e,t,n);default:if(a)throw TypeError(`Unknown encoding: `+r);r=(``+r).toLowerCase(),a=!0}},l.prototype.toJSON=function(){return{type:`Buffer`,data:Array.prototype.slice.call(this._arr||this,0)}};function te(e,t,n){return t===0&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function ne(e,t,n){n=Math.min(e.length,n);let r=[],i=t;for(;i<n;){let t=e[i],a=null,o=t>239?4:t>223?3:t>191?2:1;if(i+o<=n){let n,r,s,c;switch(o){case 1:t<128&&(a=t);break;case 2:n=e[i+1],(n&192)==128&&(c=(t&31)<<6|n&63,c>127&&(a=c));break;case 3:n=e[i+1],r=e[i+2],(n&192)==128&&(r&192)==128&&(c=(t&15)<<12|(n&63)<<6|r&63,c>2047&&(c<55296||c>57343)&&(a=c));break;case 4:n=e[i+1],r=e[i+2],s=e[i+3],(n&192)==128&&(r&192)==128&&(s&192)==128&&(c=(t&15)<<18|(n&63)<<12|(r&63)<<6|s&63,c>65535&&c<1114112&&(a=c))}}a===null?(a=65533,o=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|a&1023),r.push(a),i+=o}return ie(r)}let re=4096;function ie(e){let t=e.length;if(t<=re)return String.fromCharCode.apply(String,e);let n=``,r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=re));return n}function ae(e,t,n){let r=``;n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(e[i]&127);return r}function oe(e,t,n){let r=``;n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function se(e,t,n){let r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let i=``;for(let r=t;r<n;++r)i+=Oe[e[r]];return i}function ce(e,t,n){let r=e.slice(t,n),i=``;for(let e=0;e<r.length-1;e+=2)i+=String.fromCharCode(r[e]+r[e+1]*256);return i}l.prototype.slice=function(e,t){let n=this.length;e=~~e,t=t===void 0?n:~~t,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t<e&&(t=e);let r=this.subarray(e,t);return Object.setPrototypeOf(r,l.prototype),r};function A(e,t,n){if(e%1!=0||e<0)throw RangeError(`offset is not uint`);if(e+t>n)throw RangeError(`Trying to access beyond buffer length`)}l.prototype.readUintLE=l.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||A(e,t,this.length);let r=this[e],i=1,a=0;for(;++a<t&&(i*=256);)r+=this[e+a]*i;return r},l.prototype.readUintBE=l.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||A(e,t,this.length);let r=this[e+--t],i=1;for(;t>0&&(i*=256);)r+=this[e+--t]*i;return r},l.prototype.readUint8=l.prototype.readUInt8=function(e,t){return e>>>=0,t||A(e,1,this.length),this[e]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(e,t){return e>>>=0,t||A(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(e,t){return e>>>=0,t||A(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(e,t){return e>>>=0,t||A(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(e,t){return e>>>=0,t||A(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readBigUInt64LE=ke(function(e){e>>>=0,ve(e,`offset`);let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&ye(e,this.length-8);let r=t+this[++e]*256+this[++e]*2**16+this[++e]*2**24,i=this[++e]+this[++e]*256+this[++e]*2**16+n*2**24;return BigInt(r)+(BigInt(i)<<BigInt(32))}),l.prototype.readBigUInt64BE=ke(function(e){e>>>=0,ve(e,`offset`);let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&ye(e,this.length-8);let r=t*2**24+this[++e]*2**16+this[++e]*256+this[++e],i=this[++e]*2**24+this[++e]*2**16+this[++e]*256+n;return(BigInt(r)<<BigInt(32))+BigInt(i)}),l.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||A(e,t,this.length);let r=this[e],i=1,a=0;for(;++a<t&&(i*=256);)r+=this[e+a]*i;return i*=128,r>=i&&(r-=2**(8*t)),r},l.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||A(e,t,this.length);let r=t,i=1,a=this[e+--r];for(;r>0&&(i*=256);)a+=this[e+--r]*i;return i*=128,a>=i&&(a-=2**(8*t)),a},l.prototype.readInt8=function(e,t){return e>>>=0,t||A(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]},l.prototype.readInt16LE=function(e,t){e>>>=0,t||A(e,2,this.length);let n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n},l.prototype.readInt16BE=function(e,t){e>>>=0,t||A(e,2,this.length);let n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n},l.prototype.readInt32LE=function(e,t){return e>>>=0,t||A(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return e>>>=0,t||A(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readBigInt64LE=ke(function(e){e>>>=0,ve(e,`offset`);let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&ye(e,this.length-8);let r=this[e+4]+this[e+5]*256+this[e+6]*2**16+(n<<24);return(BigInt(r)<<BigInt(32))+BigInt(t+this[++e]*256+this[++e]*2**16+this[++e]*2**24)}),l.prototype.readBigInt64BE=ke(function(e){e>>>=0,ve(e,`offset`);let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&ye(e,this.length-8);let r=(t<<24)+this[++e]*2**16+this[++e]*256+this[++e];return(BigInt(r)<<BigInt(32))+BigInt(this[++e]*2**24+this[++e]*2**16+this[++e]*256+n)}),l.prototype.readFloatLE=function(e,t){return e>>>=0,t||A(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return e>>>=0,t||A(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return e>>>=0,t||A(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return e>>>=0,t||A(e,8,this.length),i.read(this,e,!1,52,8)};function j(e,t,n,r,i,a){if(!l.isBuffer(e))throw TypeError(`"buffer" argument must be a Buffer instance`);if(t>i||t<a)throw RangeError(`"value" argument is out of bounds`);if(n+r>e.length)throw RangeError(`Index out of range`)}l.prototype.writeUintLE=l.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){let r=2**(8*n)-1;j(this,e,t,n,r,0)}let i=1,a=0;for(this[t]=e&255;++a<n&&(i*=256);)this[t+a]=e/i&255;return t+n},l.prototype.writeUintBE=l.prototype.writeUIntBE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){let r=2**(8*n)-1;j(this,e,t,n,r,0)}let i=n-1,a=1;for(this[t+i]=e&255;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+n},l.prototype.writeUint8=l.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,1,255,0),this[t]=e&255,t+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function M(e,t,n,r,i){_e(t,r,i,e,n,7);let a=Number(t&BigInt(4294967295));e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,n}function le(e,t,n,r,i){_e(t,r,i,e,n,7);let a=Number(t&BigInt(4294967295));e[n+7]=a,a>>=8,e[n+6]=a,a>>=8,e[n+5]=a,a>>=8,e[n+4]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=o,o>>=8,e[n+2]=o,o>>=8,e[n+1]=o,o>>=8,e[n]=o,n+8}l.prototype.writeBigUInt64LE=ke(function(e,t=0){return M(this,e,t,BigInt(0),BigInt(`0xffffffffffffffff`))}),l.prototype.writeBigUInt64BE=ke(function(e,t=0){return le(this,e,t,BigInt(0),BigInt(`0xffffffffffffffff`))}),l.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){let r=2**(8*n-1);j(this,e,t,n,r-1,-r)}let i=0,a=1,o=0;for(this[t]=e&255;++i<n&&(a*=256);)e<0&&o===0&&this[t+i-1]!==0&&(o=1),this[t+i]=(e/a>>0)-o&255;return t+n},l.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){let r=2**(8*n-1);j(this,e,t,n,r-1,-r)}let i=n-1,a=1,o=0;for(this[t+i]=e&255;--i>=0&&(a*=256);)e<0&&o===0&&this[t+i+1]!==0&&(o=1),this[t+i]=(e/a>>0)-o&255;return t+n},l.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1},l.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2},l.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2},l.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4},l.prototype.writeBigInt64LE=ke(function(e,t=0){return M(this,e,t,-BigInt(`0x8000000000000000`),BigInt(`0x7fffffffffffffff`))}),l.prototype.writeBigInt64BE=ke(function(e,t=0){return le(this,e,t,-BigInt(`0x8000000000000000`),BigInt(`0x7fffffffffffffff`))});function ue(e,t,n,r,i,a){if(n+r>e.length||n<0)throw RangeError(`Index out of range`)}function de(e,t,n,r,a){return t=+t,n>>>=0,a||ue(e,t,n,4,34028234663852886e22,-34028234663852886e22),i.write(e,t,n,r,23,4),n+4}l.prototype.writeFloatLE=function(e,t,n){return de(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return de(this,e,t,!1,n)};function fe(e,t,n,r,a){return t=+t,n>>>=0,a||ue(e,t,n,8,17976931348623157e292,-17976931348623157e292),i.write(e,t,n,r,52,8),n+8}l.prototype.writeDoubleLE=function(e,t,n){return fe(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return fe(this,e,t,!1,n)},l.prototype.copy=function(e,t,n,r){if(!l.isBuffer(e))throw TypeError(`argument should be a Buffer`);if(n||=0,!r&&r!==0&&(r=this.length),t>=e.length&&(t=e.length),t||=0,r>0&&r<n&&(r=n),r===n||e.length===0||this.length===0)return 0;if(t<0)throw RangeError(`targetStart out of bounds`);if(n<0||n>=this.length)throw RangeError(`Index out of range`);if(r<0)throw RangeError(`sourceEnd out of bounds`);r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);let i=r-n;return this===e&&typeof Uint8Array.prototype.copyWithin==`function`?this.copyWithin(t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),i},l.prototype.fill=function(e,t,n,r){if(typeof e==`string`){if(typeof t==`string`?(r=t,t=0,n=this.length):typeof n==`string`&&(r=n,n=this.length),r!==void 0&&typeof r!=`string`)throw TypeError(`encoding must be a string`);if(typeof r==`string`&&!l.isEncoding(r))throw TypeError(`Unknown encoding: `+r);if(e.length===1){let t=e.charCodeAt(0);(r===`utf8`&&t<128||r===`latin1`)&&(e=t)}}else typeof e==`number`?e&=255:typeof e==`boolean`&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw RangeError(`Out of range index`);if(n<=t)return this;t>>>=0,n=n===void 0?this.length:n>>>0,e||=0;let i;if(typeof e==`number`)for(i=t;i<n;++i)this[i]=e;else{let a=l.isBuffer(e)?e:l.from(e,r),o=a.length;if(o===0)throw TypeError(`The value "`+e+`" is invalid for argument "value"`);for(i=0;i<n-t;++i)this[i+t]=a[i%o]}return this};let pe={};function me(e,t,n){pe[e]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}me(`ERR_BUFFER_OUT_OF_BOUNDS`,function(e){return e?`${e} is outside of buffer bounds`:`Attempt to access memory outside buffer bounds`},RangeError),me(`ERR_INVALID_ARG_TYPE`,function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),me(`ERR_OUT_OF_RANGE`,function(e,t,n){let r=`The value of "${e}" is out of range.`,i=n;return Number.isInteger(n)&&Math.abs(n)>2**32?i=he(String(n)):typeof n==`bigint`&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=he(i)),i+=`n`),r+=` It must be ${t}. Received ${i}`,r},RangeError);function he(e){let t=``,n=e.length,r=+(e[0]===`-`);for(;n>=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function ge(e,t,n){ve(t,`offset`),(e[t]===void 0||e[t+n]===void 0)&&ye(t,e.length-(n+1))}function _e(e,t,n,r,i,a){if(e>n||e<t){let r=typeof t==`bigint`?`n`:``,i;throw i=a>3?t===0||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${(a+1)*8}${r}`:`>= -(2${r} ** ${(a+1)*8-1}${r}) and < 2 ** ${(a+1)*8-1}${r}`:`>= ${t}${r} and <= ${n}${r}`,new pe.ERR_OUT_OF_RANGE(`value`,i,e)}ge(r,i,a)}function ve(e,t){if(typeof e!=`number`)throw new pe.ERR_INVALID_ARG_TYPE(t,`number`,e)}function ye(e,t,n){throw Math.floor(e)===e?t<0?new pe.ERR_BUFFER_OUT_OF_BOUNDS:new pe.ERR_OUT_OF_RANGE(n||`offset`,`>= ${+!!n} and <= ${t}`,e):(ve(e,n),new pe.ERR_OUT_OF_RANGE(n||`offset`,`an integer`,e))}let be=/[^+/0-9A-Za-z-_]/g;function xe(e){if(e=e.split(`=`)[0],e=e.trim().replace(be,``),e.length<2)return``;for(;e.length%4!=0;)e+=`=`;return e}function Se(e,t){t||=1/0;let n,r=e.length,i=null,a=[];for(let o=0;o<r;++o){if(n=e.charCodeAt(o),n>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if(--t<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,n&63|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,n&63|128)}else if(n<1114112){if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,n&63|128)}else throw Error(`Invalid code point`)}return a}function Ce(e){let t=[];for(let n=0;n<e.length;++n)t.push(e.charCodeAt(n)&255);return t}function we(e,t){let n,r,i,a=[];for(let o=0;o<e.length&&!((t-=2)<0);++o)n=e.charCodeAt(o),r=n>>8,i=n%256,a.push(i),a.push(r);return a}function Te(e){return r.toByteArray(xe(e))}function Ee(e,t,n,r){let i;for(i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function N(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function De(e){return e!==e}let Oe=(function(){let e=`0123456789abcdef`,t=Array(256);for(let n=0;n<16;++n){let r=n*16;for(let i=0;i<16;++i)t[r+i]=e[n]+e[i]}return t})();function ke(e){return typeof BigInt>`u`?Ae:e}function Ae(){throw Error(`BigInt not supported`)}})),i=r();globalThis.Buffer===void 0&&(globalThis.Buffer=i.Buffer);function a(){return{version:`6.192.0`,releasedAt:`2026-09-25T18:55:55Z`,buildId:`6.192.0-muhbn2v8`}}function o(e){let t=typeof e==`string`?e:e.href;if(!t.startsWith(`file:`))throw TypeError(`fileURLToPath: not a file URL`);let n=new URL(t);if(n.hostname!==``&&n.hostname!==`localhost`)throw Object.assign(TypeError(`File URL host must be "localhost" or empty on posix`),{code:`ERR_INVALID_FILE_URL_HOST`});if(/%2f/i.test(n.pathname))throw Object.assign(TypeError(`File URL path must not include encoded / characters`),{code:`ERR_INVALID_FILE_URL_PATH`});return decodeURIComponent(n.pathname)}function s(e){let t=e.split(`/`).map(e=>encodeURIComponent(e)).join(`/`);return new URL(`file://${t}`)}const c={URL:globalThis.URL,URLSearchParams:globalThis.URLSearchParams,fileURLToPath:o,pathToFileURL:s};function l(e,t){return Object.assign(TypeError(`The "${e}" argument must be of type string or an instance of Buffer or URL. Received ${t===null?`null`:typeof t}`),{code:`ERR_INVALID_ARG_TYPE`})}function u(e){return typeof e==`object`&&!!e&&typeof e.href==`string`&&typeof e.protocol==`string`}function d(e,t=`path`){if(typeof e==`string`)return e;if(u(e)){if(e.protocol!==`file:`)throw Object.assign(TypeError(`The URL must be of scheme file`),{code:`ERR_INVALID_URL_SCHEME`});return c.fileURLToPath(e.href)}if(e instanceof Uint8Array)return new TextDecoder().decode(e);throw l(t,e)}function f(e,t){let n=[...t];switch(e){case`path`:n[0]=d(n[0]);break;case`fd`:typeof n[0]!=`number`&&(n[0]=d(n[0]));break;case`pair`:n[0]=d(n[0],`src`),n[1]=d(n[1],`dest`);break;case`second`:n[1]=d(n[1])}return n}function p(e,t,n={}){let r=e;for(let i of Object.keys(t)){let a=t[i],o=r[i];!a||typeof o!=`function`||(r[i]=((...t)=>{let r;try{r=f(a,t)}catch(e){if(n.promises)return Promise.reject(e);throw e}return o.apply(e,r)}))}}function m(e,t){return Object.assign(Error(`EBADF: bad file descriptor, ${e} ${String(t)}`),{code:`EBADF`})}function h(e){return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}function g(e){let t=``;for(let n=0;n<e.length;n+=32768)t+=String.fromCharCode(...e.subarray(n,n+32768));return t}function _(){return{readSync:e=>{throw m(`read`,e)},writeSync:e=>{throw m(`write`,e)}}}function v(e){let t=0;return{readSync(n,r,i,a){if(n!==0)throw m(`read`,n);let o=h(r),s=typeof i==`object`&&i?i:{offset:i,length:a},c=s.offset??0,l=s.length??o.length-c,u=e.readStdinBytes(),d=Math.max(0,Math.min(l,u.length-t));return o.set(u.subarray(t,t+d),c),t+=d,d},writeSync(t,n,r,i){let a=t===1?e.writeStdout:t===2?e.writeStderr:void 0;if(!a)throw m(`write`,t);if(typeof n==`string`)return a(n),new TextEncoder().encode(n).length;if(!ArrayBuffer.isView(n))throw TypeError(`writeSync: data must be a string or buffer`);let o=h(n),s=typeof r==`number`?r:0,c=o.subarray(s,i===void 0?void 0:s+i);return a(g(c)),c.length}}}function y(e){if(!e||e===`/`)return`/`;e.startsWith(`/`)||(e=`/`+e);let t=e.split(`/`),n=[];for(let e of t)e!==``&&e!==`.`&&(e===`..`?n.pop():n.push(e));return`/`+n.join(`/`)}function b(e){let t=y(e);if(t===`/`)return`/`;let n=t.lastIndexOf(`/`);return n===0?`/`:t.slice(0,n)}function x(e){return Object.assign(Error(`ENOENT: no such file or directory, '${e}'`),{code:`ENOENT`})}function S(e){return Object.assign(Error(`ENOSYNC: file too large for sync access, '${e}' — use async readFile() instead`),{code:`ENOSYNC`})}function C(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}var w=class{tree=new Map;initialPaths=new Set;initialContent=new Map;initialKind=new Map;mkdtempCounter=0;tombstones=new Set;removedDirs=new Set;touched=!1;constructor(e){this.loadSnapshot(e)}loadSnapshot(e){this.tree=new Map,this.tombstones=new Set,this.removedDirs=new Set,this.initialPaths=new Set,this.initialContent=new Map,this.initialKind=new Map,this.tree.set(`/`,{content:new Uint8Array,isDirectory:!0}),this.initialPaths.add(`/`),this.initialKind.set(`/`,`directory`);for(let t of e.entries){let e=y(t.path);this.tree.set(e,{content:t.content,isDirectory:t.isDirectory,isSymbolicLink:t.isSymbolicLink,symlinkTarget:t.symlinkTarget,truncated:t.truncated,size:t.size}),this.initialPaths.add(e),this.initialKind.set(e,this.entryKind(t)),!t.isDirectory&&!t.isSymbolicLink&&this.initialContent.set(e,t.content)}for(let t of e.entries){let e=b(y(t.path));for(;e!==`/`&&!this.tree.has(e);)this.tree.set(e,{content:new Uint8Array,isDirectory:!0}),this.initialPaths.add(e),this.initialKind.set(e,`directory`),e=b(e)}}wasUsed(){return this.touched}applySnapshot(e){this.loadSnapshot(e)}applySnapshotPreservingMutations(e){let t=this.getMutations();this.loadSnapshot(e);for(let e of t.deleted){if(this.tree.get(e)?.isDirectory){let t=e===`/`?`/`:e+`/`;for(let n of Array.from(this.tree.keys()))n!==e&&n.startsWith(t)&&this.tree.delete(n)}this.tree.delete(e)}for(let e of t.created)this.ensureParentDirs(e.path),this.tree.set(e.path,{content:e.content,isDirectory:e.isDirectory,isSymbolicLink:e.isSymbolicLink,symlinkTarget:e.symlinkTarget});for(let e of t.modified)this.ensureParentDirs(e.path),this.tree.set(e.path,{content:e.content,isDirectory:!1})}invalidate(){this.loadSnapshot({entries:[]})}resetBaseline(){this.initialPaths=new Set,this.initialContent=new Map,this.initialKind=new Map;for(let[e,t]of this.tree.entries())this.initialPaths.add(e),this.initialKind.set(e,this.entryKind(t)),!t.isDirectory&&!t.isSymbolicLink&&this.initialContent.set(e,t.content)}entryKind(e){return e.isSymbolicLink?`symlink`:e.isDirectory?`directory`:`file`}resolveEntry(e,t=!1){let n=y(e),r=n.split(`/`).filter(Boolean),i=[],a=new Set,o=0;if(r.length===0){let e=this.tree.get(`/`);return e?{path:`/`,entry:e}:void 0}for(;r.length>0;){let e=r.shift(),s=`/${[...i,e].join(`/`)}`,c=this.tree.get(s);if(!c)return;let l=r.length===0;if(c.isSymbolicLink&&!(t&&l)){if(a.has(s)||o++===40)throw Object.assign(Error(`ELOOP: too many symbolic links, '${n}'`),{code:`ELOOP`});a.add(s);let e=c.symlinkTarget??``;r=[...y(e.startsWith(`/`)?e:`${b(s)}/${e}`).split(`/`).filter(Boolean),...r],i=[];continue}if(!l&&!c.isDirectory)return;if(i.push(e),l)return{path:s,entry:c}}}ensureParentDirs(e){let t=b(e);t!==`/`&&(this.tree.has(t)||this.mkdir(t,!0,!0))}isPartial(e){return this.tree.get(y(e))?.partial===!0}commitWrite(e,t){this.writeFile(e,t);let n=y(e);for(this.initialContent.set(n,t);n!==`/`;){let e=this.tree.get(n);e&&(this.initialPaths.add(n),this.initialKind.set(n,this.entryKind(e))),n=b(n)}}readFile(e){this.touched=!0;let t=y(e),n=this.resolveEntry(t)?.entry;if(!n||n.isDirectory)throw x(t);if(n.truncated)throw S(t);return n.content}writeFile(e,t){this.touched=!0;let n=y(e);this.ensureParentDirs(n),this.tree.set(n,{content:t,isDirectory:!1}),this.tombstones.delete(n),this.removedDirs.delete(n)}exists(e){this.touched=!0;let t=y(e);return this.tree.has(t)}stat(e){this.touched=!0;let t=y(e),n=this.resolveEntry(t);if(!n)throw x(t);return this.toStat(n.entry)}lstat(e){this.touched=!0;let t=y(e),n=this.resolveEntry(t,!0);if(!n)throw x(t);return this.toStat(n.entry)}toStat(e){return{isFile:!e.isDirectory&&!e.isSymbolicLink,isDirectory:e.isDirectory,isSymbolicLink:e.isSymbolicLink===!0,size:e.isDirectory?0:e.size??e.content.byteLength}}readdir(e){this.touched=!0;let t=y(e),n=this.resolveEntry(t);if(!n?.entry.isDirectory)throw x(t);let r=n.path===`/`?`/`:n.path+`/`,i=new Set;for(let e of this.tree.keys()){if(e===t||e===`/`||!e.startsWith(r))continue;let n=e.slice(r.length).split(`/`)[0];n&&i.add(n)}return Array.from(i)}mkdir(e,t,n=!1){this.touched=!0;let r=y(e);if(this.tree.has(r)){if(this.tree.get(r).isDirectory)return;throw Object.assign(Error(`EEXIST: file already exists, '${r}'`),{code:`EEXIST`})}let i=b(r);if(i!==`/`&&!this.tree.has(i)){if(!t)throw x(r);this.mkdir(i,!0,n)}this.tree.set(r,{content:new Uint8Array,isDirectory:!0,...n?{partial:!0}:{}}),this.tombstones.delete(r),this.removedDirs.delete(r)}rm(e,t){this.touched=!0;let n=y(e),r=this.tree.get(n);if(!r)throw x(n);if(r.isDirectory&&!r.isSymbolicLink){let e=n===`/`?`/`:n+`/`,r=Array.from(this.tree.keys()).filter(t=>t!==n&&t.startsWith(e));if(r.length>0&&!t)throw Object.assign(Error(`ENOTEMPTY: directory not empty, '${n}'`),{code:`ENOTEMPTY`});for(let e of r)this.tree.delete(e),this.tombstones.add(e);t&&this.removedDirs.add(n)}this.tree.delete(n),this.tombstones.add(n)}copyFile(e,t){this.touched=!0;let n=y(e),r=this.tree.get(n);if(!r||r.isDirectory)throw x(n);if(r.truncated)throw S(n);let i=y(t);this.ensureParentDirs(i),this.tree.set(i,{content:r.content.slice(),isDirectory:!1}),this.tombstones.delete(i),this.removedDirs.delete(i)}rename(e,t){this.touched=!0;let n=y(e),r=this.tree.get(n);if(!r)throw x(n);let i=y(t);if(r.isDirectory){let e=n===`/`?`/`:n+`/`,t=Array.from(this.tree.keys()).filter(t=>t!==n&&t.startsWith(e));this.ensureParentDirs(i),this.tree.set(i,r),this.tree.delete(n);for(let e of t){let t=this.tree.get(e),r=i+e.slice(n.length);this.tree.set(r,t),this.tree.delete(e)}this.tombstones.add(n),this.removedDirs.add(n),this.tombstones.delete(i),this.removedDirs.delete(i);return}this.ensureParentDirs(i),this.tree.set(i,r),this.tree.delete(n),this.tombstones.add(n),this.tombstones.delete(i),this.removedDirs.delete(i)}unlink(e){this.touched=!0;let t=y(e),n=this.tree.get(t);if(!n)throw x(t);if(n.isDirectory&&!n.isSymbolicLink)throw Object.assign(Error(`EISDIR: illegal operation on a directory, unlink '${t}'`),{code:`EISDIR`});this.tree.delete(t),this.tombstones.add(t)}markRemoved(e,t=!1){this.touched=!0;let n=y(e);this.tombstones.add(n),t&&this.removedDirs.add(n)}isTombstoned(e){let t=y(e);if(this.tombstones.has(t))return!0;for(let e of this.removedDirs)if(t===e||t.startsWith(`${e}/`))return!0;return!1}mkdtemp(e){this.touched=!0;for(let t=0;t<100;t++){let t=`_${String(this.mkdtempCounter).padStart(6,`0`)}`;this.mkdtempCounter++;let n=y(e+t);if(!this.tree.has(n))return this.mkdir(n,!0),n}throw Error(`mkdtemp: failed to create unique directory after 100 attempts`)}getMutations(){let e=[],t=[],n=[];for(let[r,i]of this.tree.entries()){if(r===`/`)continue;if(!this.initialPaths.has(r)){e.push({path:r,content:i.content,isDirectory:i.isDirectory,isSymbolicLink:i.isSymbolicLink,symlinkTarget:i.symlinkTarget});continue}let a=this.initialKind.get(r);if(a!==void 0&&a!==this.entryKind(i)){n.push(r),e.push({path:r,content:i.content,isDirectory:i.isDirectory,isSymbolicLink:i.isSymbolicLink,symlinkTarget:i.symlinkTarget});continue}if(!i.isDirectory&&!i.isSymbolicLink){let e=this.initialContent.get(r);e&&!C(e,i.content)&&t.push({path:r,content:i.content})}}for(let e of this.initialPaths)e!==`/`&&(this.tree.has(e)||n.push(e));return{created:e,modified:t,deleted:n}}};function T(){return globalThis.Buffer}function E(e){let t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n)&255;return t}function D(e){let t=``;for(let n=0;n<e.length;n+=32768)t+=String.fromCharCode(...e.subarray(n,n+32768));return t}function O(e,t){return Object.assign(Error(`EBADF: bad file descriptor, ${e} ${String(t)}`),{code:`EBADF`})}function k(e){return e===`/dev/stdin`||e===`/dev/stdout`||e===`/dev/stderr`}function ee(e){if(e===0||e===`/dev/stdin`)return 0;if(e===1||e===`/dev/stdout`)return 1;if(e===2||e===`/dev/stderr`)return 2}function te(e,t){let n=ee(e);if(n===0)return!0;if(n!==void 0||typeof e==`number`)throw O(t,e);return!1}function ne(e,t,n){let r=ee(t);if(r===1)return e.writeStdout;if(r===2)return e.writeStderr;if(r!==void 0||typeof t==`number`)throw O(n,t)}function re(e){return typeof e==`string`?e:D(_e(e))}function ie(e,t){if(t===`utf8`||t===`utf-8`)return new TextDecoder().decode(e);let n=T();return n?n.from(e):e}function ae(e){return typeof e==`string`?e:e?.encoding}function oe(){return{isFile:()=>!0,isDirectory:()=>!1,isSymbolicLink:()=>!1,isCharacterDevice:()=>!0,size:0}}function se(e,t){if(!t)return;let n={readFile:e.readFile,readFileBinary:e.readFileBinary,writeFile:e.writeFile,writeFileBinary:e.writeFileBinary,appendFile:e.appendFile,access:e.access,exists:e.exists,stat:e.stat};e.readFile=async(e,r)=>{if(!te(e,`read`))return n.readFile(e,r);let i=ae(r);if(i===null||i===`buffer`){let e=T(),n=t.readStdinBytes();return e?e.from(n):n}return new TextDecoder().decode(t.readStdinBytes())},e.readFileBinary=async e=>te(e,`read`)?t.readStdinBytes():n.readFileBinary(e),e.writeFile=async(e,r)=>{let i=ne(t,e,`write`);return i?(i(re(r)),!0):n.writeFile(e,r)},e.writeFileBinary=async(e,r)=>{let i=ne(t,e,`write`);return i?(i(D(r)),!0):n.writeFileBinary(e,r)},e.appendFile=async(e,r)=>{let i=ne(t,e,`append`);if(!i)return n.appendFile(e,r);i(re(r))},e.access=async e=>{if(!k(e))return n.access(e)},e.exists=async e=>k(e)||n.exists(e),e.stat=async e=>k(e)?{isFile:!0,isDirectory:!1,size:0}:n.stat(e)}function ce(e,t,n){function r(e){if(e instanceof Uint8Array)return e;if(ArrayBuffer.isView(e)){let t=e;return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}return e instanceof ArrayBuffer?new Uint8Array(e):new TextEncoder().encode(typeof e==`string`?e:String(e))}async function i(t,n){let r=typeof n==`string`?n:n?.encoding;if(r===null||r===`buffer`){let n=await e.call(`vfs`,`readFileBinary`,[t]),r=T();return r?r.from(n instanceof Uint8Array?n:new Uint8Array(n)):n}return e.call(`vfs`,`readFile`,[t])}async function a(t,n){return typeof n==`string`?e.call(`vfs`,`writeFile`,[t,n]):e.call(`vfs`,`writeFileBinary`,[t,r(n)])}async function o(t,n){if(typeof n==`string`){await e.call(`vfs`,`appendFile`,[t,n]);return}await e.call(`vfs`,`appendFile`,[t,r(n)])}async function s(t,n,r){let i=await e.call(`vfs`,`stat`,[t]);if(i.isFile){let r=await e.call(`vfs`,`readFileBinary`,[t]);await e.call(`vfs`,`writeFileBinary`,[n,r]);return}if(!i.isDirectory||!r?.recursive)throw Error(`cp: '${t}' is a directory (use {recursive: true})`);await l(n);let a=await e.call(`vfs`,`readDir`,[t]);for(let e of a)await s(`${t}/${e}`,`${n}/${e}`,r)}async function c(t,n){if(n?.force&&!await e.call(`vfs`,`exists`,[t]))return!0;if((await e.call(`vfs`,`stat`,[t])).isFile)return e.call(`vfs`,`rm`,[t]);if(!n?.recursive)throw Error(`rm: '${t}' is a directory (use {recursive: true})`);let r=await e.call(`vfs`,`readDir`,[t]);for(let e of r)await c(`${t}/${e}`,n);return e.call(`vfs`,`rm`,[t])}async function l(t){await e.call(`vfs`,`mkdir`,[t])}async function u(t){for(let n=0;n<5;n++){let n=`${t}${Math.random().toString(36).slice(2,10)+Math.random().toString(36).slice(2,6)}`;if(!await e.call(`vfs`,`exists`,[n]))return await e.call(`vfs`,`mkdir`,[n]),n}throw Error(`mkdtemp: failed to create unique directory after 5 attempts`)}async function d(t,n){try{await e.call(`vfs`,`rename`,[t,n])}catch{let r=await e.call(`vfs`,`readFileBinary`,[t]);await e.call(`vfs`,`writeFileBinary`,[n,r]),await e.call(`vfs`,`rm`,[t])}}async function f(t){if(!await e.call(`vfs`,`exists`,[t]))throw Object.assign(Error(`ENOENT: no such file or directory, access '${t}'`),{code:`ENOENT`})}let m={readFile:i,readFileBinary:t=>e.call(`vfs`,`readFileBinary`,[t]),writeFile:a,writeFileBinary:(t,n)=>e.call(`vfs`,`writeFileBinary`,[t,n]),appendFile:o,cp:s,rm:c,readDir:t=>e.call(`vfs`,`readDir`,[t]),readdir:t=>e.call(`vfs`,`readDir`,[t]),exists:t=>e.call(`vfs`,`exists`,[t]),stat:t=>e.call(`vfs`,`stat`,[t]),mkdir:(t,n)=>e.call(`vfs`,`mkdir`,[t]),mkdtemp:u,rename:d,access:f,unlink:t=>e.call(`vfs`,`rm`,[t]),rmdir:t=>e.call(`vfs`,`rm`,[t]),copyFile:async(t,n)=>{let r=await e.call(`vfs`,`readFileBinary`,[t]);await e.call(`vfs`,`writeFileBinary`,[n,r])},fetchToFile:async(n,r)=>{let i=await t(n);if(!i.ok)throw Error(`fetch ${i.status} ${i.statusText}`);let a=new Uint8Array(await i.arrayBuffer());return await e.call(`vfs`,`writeFileBinary`,[r,a]),a.byteLength},promises:null};return se(m,n),p(m,A,{promises:!0}),m.promises=m,m}const A={readFile:`fd`,readFileBinary:`fd`,writeFile:`fd`,writeFileBinary:`fd`,appendFile:`fd`,cp:`pair`,rm:`path`,readDir:`path`,readdir:`path`,exists:`path`,stat:`path`,mkdir:`path`,mkdtemp:`path`,rename:`pair`,access:`path`,unlink:`path`,rmdir:`path`,copyFile:`pair`,fetchToFile:`second`},j={readFileSync:`fd`,writeFileSync:`fd`,appendFileSync:`fd`,truncateSync:`path`,existsSync:`path`,accessSync:`path`,mkdirSync:`path`,statSync:`path`,lstatSync:`path`,realpathSync:`path`,readdirSync:`path`,copyFileSync:`pair`,cpSync:`pair`,chmodSync:`path`,utimesSync:`path`,mkdtempSync:`path`,rmSync:`path`,rmdirSync:`path`,unlinkSync:`path`,renameSync:`pair`};function M(e,t,n=``){return Object.assign(Error(`${e}: sync-fs, ${n?`${n} `:``}'${t}'`),{code:e})}function le(e,t,n,r={},i){let a=r.recursive===!0;try{return r.requireFile?e.unlink(n):e.rm(n,a),i?.(n),!0}catch(e){if(e?.code!==`ENOENT`)throw e}let o=t;if(!o?.rm||e.isTombstoned(n))return!1;try{if(!o.exists(n))return!1}catch{return!1}return o.rm(n),e.markRemoved(n,a),!0}function ue(e){let{syncFs:t,bridge:n,resolve:r,existsResolved:i,lstatResolved:a,statResolved:o,readBytes:s,writeThrough:c,persistDelete:l}=e,u=(e,r)=>le(t,n,e,r,l);return{rmSync(e,t){let n=r(e);if(!(t?.force&&!i(n))&&!u(n,{recursive:t?.recursive===!0})&&!t?.force)throw M(`ENOENT`,n,`rm`)},rmdirSync(e,t){let n=r(e);if(i(n)&&!a(n).isDirectory)throw M(`ENOTDIR`,n,`rmdir`);if(!u(n,{recursive:t?.recursive===!0}))throw M(`ENOENT`,n,`rmdir`)},unlinkSync(e){let t=r(e);if(!u(t,{requireFile:!0}))throw M(`ENOENT`,t,`unlink`)},renameSync(e,i){let a=r(e),l=r(i);try{t.rename(a,l);return}catch(e){if(e?.code!==`ENOENT`)throw e}if(!n||t.isTombstoned(a))throw M(`ENOENT`,a,`rename`);if(o(a).isDirectory)throw M(`EISDIR`,a,`rename`);if(c(l,s(a)),!u(a,{requireFile:!0}))throw M(`ENOENT`,a,`rename`)}}}function de(e,t){if(!t)return;let n={readFileSync:e.readFileSync,writeFileSync:e.writeFileSync,appendFileSync:e.appendFileSync,existsSync:e.existsSync,accessSync:e.accessSync,statSync:e.statSync,lstatSync:e.lstatSync};e.readFileSync=(e,r)=>te(e,`read`)?ie(t.readStdinBytes(),ae(r)):n.readFileSync(e,r),e.writeFileSync=(e,r)=>{let i=ne(t,e,`write`);i?i(re(r)):n.writeFileSync(e,r)},e.appendFileSync=(e,r)=>{let i=ne(t,e,`append`);i?i(re(r)):n.appendFileSync(e,r)},e.existsSync=e=>k(e)||n.existsSync(e),e.accessSync=e=>{k(e)||n.accessSync(e)},e.statSync=e=>k(e)?oe():n.statSync(e),e.lstatSync=e=>k(e)?oe():n.lstatSync(e),Object.assign(e,v(t))}function fe(e,t,n,r){let i=t=>e===`/`?`/${t}`:`${e}/${t}`,a=new Set(n);for(let e of t)a.add(e);for(let e of a)r(i(e))&&a.delete(e);return[...a]}function pe(e,t){if(e instanceof Date)return e.getTime();if(typeof e==`string`&&e.trim()!==``&&Number.isFinite(Number(e)))return Number(e)*1e3;if(typeof e==`number`){if(!Number.isFinite(e))throw Object.assign(TypeError(`The "${t}" argument must be of type number, string or Date`),{code:`ERR_INVALID_ARG_TYPE`});return e<0?Date.now():e*1e3}throw Object.assign(TypeError(`The "${t}" argument must be of type number, string or Date`),{code:`ERR_INVALID_ARG_TYPE`})}function me(e,t,n,r,i){let a=e?.utimes;if(!(!e||typeof a!=`function`||t.isTombstoned(n)))try{a.call(e,n,r,i)}catch(e){let r=e?.code;if(r===`ENOSYS`||r===`ENOENT`&&t.exists(n))return;throw e}}function he(e,t,n,r){return{chmodSync(n){let r=e(n);if(!t(r))throw M(`ENOENT`,r,`chmod`)},utimesSync(i,a,o){let s=pe(a,`atime`),c=pe(o,`mtime`),l=e(i);if(!t(l))throw M(`ENOENT`,l,`utime`);me(n,r,l,s,c)}}}function ge(e,t,n){let r=t=>e.isTombstoned(t);try{let i=e.readdir(n);if(!t||!e.isPartial(n)||r(n))return i;try{return fe(n,i,t.readdir(n),r)}catch(e){if(e?.code===`ENOENT`)return i;throw e}}catch(e){let i=e?.code;if(!t||r(n)||i!==`ENOENT`)throw e;return fe(n,[],t.readdir(n),r)}}function _e(e){if(typeof e==`string`)return new TextEncoder().encode(e);if(e instanceof Uint8Array)return e;if(ArrayBuffer.isView(e)){let t=e;return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}return new TextEncoder().encode(String(e))}function ve(e,t,n,r,i){t?(t.writeFile(r,i),e.commitWrite(r,i)):(e.writeFile(r,i),n?.write?.(r,i))}function ye(e,t,n,r,i){function a(e){return y(e.startsWith(`/`)?e:t+(t.endsWith(`/`)?``:`/`)+e)}function o(t){try{return e.readFile(t)}catch(r){let i=r?.code;if(n&&!e.isTombstoned(t)&&(i===`ENOENT`||i===`ENOSYNC`))return n.readFile(t);throw r}}let s=(t,r)=>ve(e,n,i,t,r);function c(t){if(e.exists(t))return!0;if(!n||e.isTombstoned(t))return!1;try{return n.exists(t)}catch{return!1}}function l(t){try{return e.stat(t)}catch(r){let i=r?.code;if(!n||e.isTombstoned(t)||i!==`ENOENT`)throw r;return n.stat(t)}}function u(t){try{return e.lstat(t)}catch(r){let i=r?.code;if(!n||e.isTombstoned(t)||i!==`ENOENT`)throw r;return n.lstat(t)}}let d=e=>({isFile:()=>e.isFile,isDirectory:()=>e.isDirectory,isSymbolicLink:()=>e.isSymbolicLink===!0,isCharacterDevice:()=>!1,size:e.size}),f=(e,t)=>e===`/`?`/${t}`:`${e}/${t}`;function m(t,r){if(!l(t).isDirectory){s(r,o(t));return}e.mkdir(r,!0);for(let i of ge(e,n,t))m(f(t,i),f(r,i))}let h={...ue({syncFs:e,bridge:n,persistDelete:i?.delete,resolve:a,existsResolved:c,statResolved:l,lstatResolved:u,readBytes:o,writeThrough:s}),readFileSync(e,t){return ie(o(a(e)),ae(t))},writeFileSync(e,t){s(a(e),_e(t))},appendFileSync(e,t){let n=a(e),r=new Uint8Array;try{r=o(n)}catch(e){if(e?.code!==`ENOENT`)throw e}let i=_e(t),c=new Uint8Array(r.byteLength+i.byteLength);c.set(r),c.set(i,r.byteLength),s(n,c)},truncateSync(e,t=0){let n=a(e),r=o(n),i=new Uint8Array(t);i.set(r.subarray(0,Math.min(t,r.byteLength))),s(n,i)},existsSync(e){return c(a(e))},accessSync(e){let t=a(e);if(!c(t))throw M(`ENOENT`,t,`access`)},mkdirSync(t,n){e.mkdir(a(t),n?.recursive)},statSync:e=>d(l(a(e))),lstatSync:e=>d(u(a(e))),realpathSync(e){let t=a(e);if(!c(t))throw M(`ENOENT`,t,`realpath`);return t},readdirSync(t){return ge(e,n,a(t))},copyFileSync(e,t){s(a(t),o(a(e)))},cpSync(e,t){m(a(e),a(t))},...he(a,c,n,e),mkdtempSync(t){return e.mkdtemp(a(t))}},g=Object.assign(h,_());de(g,r),p(g,j);let v=g.existsSync;return g.existsSync=e=>{try{return v(e)}catch{return!1}},g}var be=class{_events=new Map;on(e,t){let n=this._events.get(e);return n?n.push(t):this._events.set(e,[t]),this}addListener(e,t){return this.on(e,t)}off(e,t){let n=this._events.get(e);if(n){let r=n.indexOf(t);r!==-1&&n.splice(r,1),n.length===0&&this._events.delete(e)}return this}removeListener(e,t){return this.off(e,t)}once(e,t){let n=(...r)=>{this.off(e,n),t(...r)};return this.on(e,n)}emit(e,...t){let n=this._events.get(e);if(!n||n.length===0)return!1;for(let e of[...n])e(...t);return!0}removeAllListeners(e){return e===void 0?this._events.clear():this._events.delete(e),this}listenerCount(e){return this._events.get(e)?.length??0}listeners(e){return[...this._events.get(e)??[]]}};const xe=Object.assign(be,{EventEmitter:be,default:be});function Se(e){let t=e=>{if(typeof e==`string`)return e;if(e instanceof Error)return e.message;if(e==null)return String(e);try{return JSON.stringify(e)}catch{return String(e)}},n=(e,t,n)=>t===void 0?`${e(`Error:`)} ${n}\n`:t===``?`${e(n)}\n`:`${e(`${t}:`)} ${n}\n`,r=(t,n)=>t===void 0?`${e.color.yellow(`Warning:`)} ${n}\n`:t===``?`${e.color.yellow(n)}\n`:`${e.color.yellow(`${t}:`)} ${n}\n`;return{die(r,i){let a=typeof i==`number`?i:i?.exitCode??1,o=typeof i==`object`&&i&&`prefix`in i?i.prefix:void 0,s=t(r);throw e.writeStderr(n(e.color.red,o,s)),e.exit(a),Error(`unreachable`)},out(t){if(typeof t==`string`){e.writeStdout(t.endsWith(`
|
|
10
|
+
let r=t(),i=n(),a=typeof Symbol==`function`&&typeof Symbol.for==`function`?Symbol.for(`nodejs.util.inspect.custom`):null;e.Buffer=l,e.SlowBuffer=b,e.INSPECT_MAX_BYTES=50;let o=2147483647;e.kMaxLength=o,l.TYPED_ARRAY_SUPPORT=s(),!l.TYPED_ARRAY_SUPPORT&&typeof console<`u`&&typeof console.error==`function`&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function s(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return!1}}Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}});function c(e){if(e>o)throw RangeError(`The value "`+e+`" is invalid for option "size"`);let t=new Uint8Array(e);return Object.setPrototypeOf(t,l.prototype),t}function l(e,t,n){if(typeof e==`number`){if(typeof t==`string`)throw TypeError(`The "string" argument must be of type string. Received type number`);return p(e)}return u(e,t,n)}l.poolSize=8192;function u(e,t,n){if(typeof e==`string`)return m(e,t);if(ArrayBuffer.isView(e))return g(e);if(e==null)throw TypeError(`The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type `+typeof e);if(N(e,ArrayBuffer)||e&&N(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<`u`&&(N(e,SharedArrayBuffer)||e&&N(e.buffer,SharedArrayBuffer)))return _(e,t,n);if(typeof e==`number`)throw TypeError(`The "value" argument must not be of type number. Received type number`);let r=e.valueOf&&e.valueOf();if(r!=null&&r!==e)return l.from(r,t,n);let i=v(e);if(i)return i;if(typeof Symbol<`u`&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]==`function`)return l.from(e[Symbol.toPrimitive](`string`),t,n);throw TypeError(`The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type `+typeof e)}l.from=function(e,t,n){return u(e,t,n)},Object.setPrototypeOf(l.prototype,Uint8Array.prototype),Object.setPrototypeOf(l,Uint8Array);function d(e){if(typeof e!=`number`)throw TypeError(`"size" argument must be of type number`);if(e<0)throw RangeError(`The value "`+e+`" is invalid for option "size"`)}function f(e,t,n){return d(e),e<=0||t===void 0?c(e):typeof n==`string`?c(e).fill(t,n):c(e).fill(t)}l.alloc=function(e,t,n){return f(e,t,n)};function p(e){return d(e),c(e<0?0:y(e)|0)}l.allocUnsafe=function(e){return p(e)},l.allocUnsafeSlow=function(e){return p(e)};function m(e,t){if((typeof t!=`string`||t===``)&&(t=`utf8`),!l.isEncoding(t))throw TypeError(`Unknown encoding: `+t);let n=x(e,t)|0,r=c(n),i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}function h(e){let t=e.length<0?0:y(e.length)|0,n=c(t);for(let r=0;r<t;r+=1)n[r]=e[r]&255;return n}function g(e){if(N(e,Uint8Array)){let t=new Uint8Array(e);return _(t.buffer,t.byteOffset,t.byteLength)}return h(e)}function _(e,t,n){if(t<0||e.byteLength<t)throw RangeError(`"offset" is outside of buffer bounds`);if(e.byteLength<t+(n||0))throw RangeError(`"length" is outside of buffer bounds`);let r;return r=t===void 0&&n===void 0?new Uint8Array(e):n===void 0?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(r,l.prototype),r}function v(e){if(l.isBuffer(e)){let t=y(e.length)|0,n=c(t);return n.length===0||e.copy(n,0,0,t),n}if(e.length!==void 0)return typeof e.length!=`number`||De(e.length)?c(0):h(e);if(e.type===`Buffer`&&Array.isArray(e.data))return h(e.data)}function y(e){if(e>=o)throw RangeError(`Attempt to allocate Buffer larger than maximum size: 0x`+o.toString(16)+` bytes`);return e|0}function b(e){return+e!=e&&(e=0),l.alloc(+e)}l.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==l.prototype},l.compare=function(e,t){if(N(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),N(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),!l.isBuffer(e)||!l.isBuffer(t))throw TypeError(`The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array`);if(e===t)return 0;let n=e.length,r=t.length;for(let i=0,a=Math.min(n,r);i<a;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:+(r<n)},l.isEncoding=function(e){switch(String(e).toLowerCase()){case`hex`:case`utf8`:case`utf-8`:case`ascii`:case`latin1`:case`binary`:case`base64`:case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return!0;default:return!1}},l.concat=function(e,t){if(!Array.isArray(e))throw TypeError(`"list" argument must be an Array of Buffers`);if(e.length===0)return l.alloc(0);let n;if(t===void 0)for(t=0,n=0;n<e.length;++n)t+=e[n].length;let r=l.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){let t=e[n];if(N(t,Uint8Array))i+t.length>r.length?(l.isBuffer(t)||(t=l.from(t)),t.copy(r,i)):Uint8Array.prototype.set.call(r,t,i);else if(l.isBuffer(t))t.copy(r,i);else throw TypeError(`"list" argument must be an Array of Buffers`);i+=t.length}return r};function x(e,t){if(l.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||N(e,ArrayBuffer))return e.byteLength;if(typeof e!=`string`)throw TypeError(`The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type `+typeof e);let n=e.length,r=arguments.length>2&&arguments[2]===!0;if(!r&&n===0)return 0;let i=!1;for(;;)switch(t){case`ascii`:case`latin1`:case`binary`:return n;case`utf8`:case`utf-8`:return Se(e).length;case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return n*2;case`hex`:return n>>>1;case`base64`:return Te(e).length;default:if(i)return r?-1:Se(e).length;t=(``+t).toLowerCase(),i=!0}}l.byteLength=x;function S(e,t,n){let r=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((n===void 0||n>this.length)&&(n=this.length),n<=0)||(n>>>=0,t>>>=0,n<=t))return``;for(e||=`utf8`;;)switch(e){case`hex`:return se(this,t,n);case`utf8`:case`utf-8`:return ne(this,t,n);case`ascii`:return ae(this,t,n);case`latin1`:case`binary`:return oe(this,t,n);case`base64`:return te(this,t,n);case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return ce(this,t,n);default:if(r)throw TypeError(`Unknown encoding: `+e);e=(e+``).toLowerCase(),r=!0}}l.prototype._isBuffer=!0;function C(e,t,n){let r=e[t];e[t]=e[n],e[n]=r}l.prototype.swap16=function(){let e=this.length;if(e%2!=0)throw RangeError(`Buffer size must be a multiple of 16-bits`);for(let t=0;t<e;t+=2)C(this,t,t+1);return this},l.prototype.swap32=function(){let e=this.length;if(e%4!=0)throw RangeError(`Buffer size must be a multiple of 32-bits`);for(let t=0;t<e;t+=4)C(this,t,t+3),C(this,t+1,t+2);return this},l.prototype.swap64=function(){let e=this.length;if(e%8!=0)throw RangeError(`Buffer size must be a multiple of 64-bits`);for(let t=0;t<e;t+=8)C(this,t,t+7),C(this,t+1,t+6),C(this,t+2,t+5),C(this,t+3,t+4);return this},l.prototype.toString=function(){let e=this.length;return e===0?``:arguments.length===0?ne(this,0,e):S.apply(this,arguments)},l.prototype.toLocaleString=l.prototype.toString,l.prototype.equals=function(e){if(!l.isBuffer(e))throw TypeError(`Argument must be a Buffer`);return this===e||l.compare(this,e)===0},l.prototype.inspect=function(){let t=``,n=e.INSPECT_MAX_BYTES;return t=this.toString(`hex`,0,n).replace(/(.{2})/g,`$1 `).trim(),this.length>n&&(t+=` ... `),`<Buffer `+t+`>`},a&&(l.prototype[a]=l.prototype.inspect),l.prototype.compare=function(e,t,n,r,i){if(N(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(e))throw TypeError(`The "target" argument must be one of type Buffer or Uint8Array. Received type `+typeof e);if(t===void 0&&(t=0),n===void 0&&(n=e?e.length:0),r===void 0&&(r=0),i===void 0&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw RangeError(`out of range index`);if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;let a=i-r,o=n-t,s=Math.min(a,o),c=this.slice(r,i),u=e.slice(t,n);for(let e=0;e<s;++e)if(c[e]!==u[e]){a=c[e],o=u[e];break}return a<o?-1:+(o<a)};function w(e,t,n,r,i){if(e.length===0)return-1;if(typeof n==`string`?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,De(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(i)n=0;else return-1}if(typeof t==`string`&&(t=l.from(t,r)),l.isBuffer(t))return t.length===0?-1:T(e,t,n,r,i);if(typeof t==`number`)return t&=255,typeof Uint8Array.prototype.indexOf==`function`?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):T(e,[t],n,r,i);throw TypeError(`val must be string, number or Buffer`)}function T(e,t,n,r,i){let a=1,o=e.length,s=t.length;if(r!==void 0&&(r=String(r).toLowerCase(),r===`ucs2`||r===`ucs-2`||r===`utf16le`||r===`utf-16le`)){if(e.length<2||t.length<2)return-1;a=2,o/=2,s/=2,n/=2}function c(e,t){return a===1?e[t]:e.readUInt16BE(t*a)}let l;if(i){let r=-1;for(l=n;l<o;l++)if(c(e,l)===c(t,r===-1?0:l-r)){if(r===-1&&(r=l),l-r+1===s)return r*a}else r!==-1&&(l-=l-r),r=-1}else for(n+s>o&&(n=o-s),l=n;l>=0;l--){let n=!0;for(let r=0;r<s;r++)if(c(e,l+r)!==c(t,r)){n=!1;break}if(n)return l}return-1}l.prototype.includes=function(e,t,n){return this.indexOf(e,t,n)!==-1},l.prototype.indexOf=function(e,t,n){return w(this,e,t,n,!0)},l.prototype.lastIndexOf=function(e,t,n){return w(this,e,t,n,!1)};function E(e,t,n,r){n=Number(n)||0;let i=e.length-n;r?(r=Number(r),r>i&&(r=i)):r=i;let a=t.length;r>a/2&&(r=a/2);let o;for(o=0;o<r;++o){let r=parseInt(t.substr(o*2,2),16);if(De(r))return o;e[n+o]=r}return o}function D(e,t,n,r){return Ee(Se(t,e.length-n),e,n,r)}function O(e,t,n,r){return Ee(Ce(t),e,n,r)}function k(e,t,n,r){return Ee(Te(t),e,n,r)}function ee(e,t,n,r){return Ee(we(t,e.length-n),e,n,r)}l.prototype.write=function(e,t,n,r){if(t===void 0)r=`utf8`,n=this.length,t=0;else if(n===void 0&&typeof t==`string`)r=t,n=this.length,t=0;else if(isFinite(t))t>>>=0,isFinite(n)?(n>>>=0,r===void 0&&(r=`utf8`)):(r=n,n=void 0);else throw Error(`Buffer.write(string, encoding, offset[, length]) is no longer supported`);let i=this.length-t;if((n===void 0||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw RangeError(`Attempt to write outside buffer bounds`);r||=`utf8`;let a=!1;for(;;)switch(r){case`hex`:return E(this,e,t,n);case`utf8`:case`utf-8`:return D(this,e,t,n);case`ascii`:case`latin1`:case`binary`:return O(this,e,t,n);case`base64`:return k(this,e,t,n);case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return ee(this,e,t,n);default:if(a)throw TypeError(`Unknown encoding: `+r);r=(``+r).toLowerCase(),a=!0}},l.prototype.toJSON=function(){return{type:`Buffer`,data:Array.prototype.slice.call(this._arr||this,0)}};function te(e,t,n){return t===0&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function ne(e,t,n){n=Math.min(e.length,n);let r=[],i=t;for(;i<n;){let t=e[i],a=null,o=t>239?4:t>223?3:t>191?2:1;if(i+o<=n){let n,r,s,c;switch(o){case 1:t<128&&(a=t);break;case 2:n=e[i+1],(n&192)==128&&(c=(t&31)<<6|n&63,c>127&&(a=c));break;case 3:n=e[i+1],r=e[i+2],(n&192)==128&&(r&192)==128&&(c=(t&15)<<12|(n&63)<<6|r&63,c>2047&&(c<55296||c>57343)&&(a=c));break;case 4:n=e[i+1],r=e[i+2],s=e[i+3],(n&192)==128&&(r&192)==128&&(s&192)==128&&(c=(t&15)<<18|(n&63)<<12|(r&63)<<6|s&63,c>65535&&c<1114112&&(a=c))}}a===null?(a=65533,o=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|a&1023),r.push(a),i+=o}return ie(r)}let re=4096;function ie(e){let t=e.length;if(t<=re)return String.fromCharCode.apply(String,e);let n=``,r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=re));return n}function ae(e,t,n){let r=``;n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(e[i]&127);return r}function oe(e,t,n){let r=``;n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function se(e,t,n){let r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let i=``;for(let r=t;r<n;++r)i+=Oe[e[r]];return i}function ce(e,t,n){let r=e.slice(t,n),i=``;for(let e=0;e<r.length-1;e+=2)i+=String.fromCharCode(r[e]+r[e+1]*256);return i}l.prototype.slice=function(e,t){let n=this.length;e=~~e,t=t===void 0?n:~~t,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t<e&&(t=e);let r=this.subarray(e,t);return Object.setPrototypeOf(r,l.prototype),r};function A(e,t,n){if(e%1!=0||e<0)throw RangeError(`offset is not uint`);if(e+t>n)throw RangeError(`Trying to access beyond buffer length`)}l.prototype.readUintLE=l.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||A(e,t,this.length);let r=this[e],i=1,a=0;for(;++a<t&&(i*=256);)r+=this[e+a]*i;return r},l.prototype.readUintBE=l.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||A(e,t,this.length);let r=this[e+--t],i=1;for(;t>0&&(i*=256);)r+=this[e+--t]*i;return r},l.prototype.readUint8=l.prototype.readUInt8=function(e,t){return e>>>=0,t||A(e,1,this.length),this[e]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(e,t){return e>>>=0,t||A(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(e,t){return e>>>=0,t||A(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(e,t){return e>>>=0,t||A(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(e,t){return e>>>=0,t||A(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readBigUInt64LE=ke(function(e){e>>>=0,ve(e,`offset`);let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&ye(e,this.length-8);let r=t+this[++e]*256+this[++e]*2**16+this[++e]*2**24,i=this[++e]+this[++e]*256+this[++e]*2**16+n*2**24;return BigInt(r)+(BigInt(i)<<BigInt(32))}),l.prototype.readBigUInt64BE=ke(function(e){e>>>=0,ve(e,`offset`);let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&ye(e,this.length-8);let r=t*2**24+this[++e]*2**16+this[++e]*256+this[++e],i=this[++e]*2**24+this[++e]*2**16+this[++e]*256+n;return(BigInt(r)<<BigInt(32))+BigInt(i)}),l.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||A(e,t,this.length);let r=this[e],i=1,a=0;for(;++a<t&&(i*=256);)r+=this[e+a]*i;return i*=128,r>=i&&(r-=2**(8*t)),r},l.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||A(e,t,this.length);let r=t,i=1,a=this[e+--r];for(;r>0&&(i*=256);)a+=this[e+--r]*i;return i*=128,a>=i&&(a-=2**(8*t)),a},l.prototype.readInt8=function(e,t){return e>>>=0,t||A(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]},l.prototype.readInt16LE=function(e,t){e>>>=0,t||A(e,2,this.length);let n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n},l.prototype.readInt16BE=function(e,t){e>>>=0,t||A(e,2,this.length);let n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n},l.prototype.readInt32LE=function(e,t){return e>>>=0,t||A(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return e>>>=0,t||A(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readBigInt64LE=ke(function(e){e>>>=0,ve(e,`offset`);let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&ye(e,this.length-8);let r=this[e+4]+this[e+5]*256+this[e+6]*2**16+(n<<24);return(BigInt(r)<<BigInt(32))+BigInt(t+this[++e]*256+this[++e]*2**16+this[++e]*2**24)}),l.prototype.readBigInt64BE=ke(function(e){e>>>=0,ve(e,`offset`);let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&ye(e,this.length-8);let r=(t<<24)+this[++e]*2**16+this[++e]*256+this[++e];return(BigInt(r)<<BigInt(32))+BigInt(this[++e]*2**24+this[++e]*2**16+this[++e]*256+n)}),l.prototype.readFloatLE=function(e,t){return e>>>=0,t||A(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return e>>>=0,t||A(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return e>>>=0,t||A(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return e>>>=0,t||A(e,8,this.length),i.read(this,e,!1,52,8)};function j(e,t,n,r,i,a){if(!l.isBuffer(e))throw TypeError(`"buffer" argument must be a Buffer instance`);if(t>i||t<a)throw RangeError(`"value" argument is out of bounds`);if(n+r>e.length)throw RangeError(`Index out of range`)}l.prototype.writeUintLE=l.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){let r=2**(8*n)-1;j(this,e,t,n,r,0)}let i=1,a=0;for(this[t]=e&255;++a<n&&(i*=256);)this[t+a]=e/i&255;return t+n},l.prototype.writeUintBE=l.prototype.writeUIntBE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){let r=2**(8*n)-1;j(this,e,t,n,r,0)}let i=n-1,a=1;for(this[t+i]=e&255;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+n},l.prototype.writeUint8=l.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,1,255,0),this[t]=e&255,t+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function le(e,t,n,r,i){_e(t,r,i,e,n,7);let a=Number(t&BigInt(4294967295));e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,n}function ue(e,t,n,r,i){_e(t,r,i,e,n,7);let a=Number(t&BigInt(4294967295));e[n+7]=a,a>>=8,e[n+6]=a,a>>=8,e[n+5]=a,a>>=8,e[n+4]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=o,o>>=8,e[n+2]=o,o>>=8,e[n+1]=o,o>>=8,e[n]=o,n+8}l.prototype.writeBigUInt64LE=ke(function(e,t=0){return le(this,e,t,BigInt(0),BigInt(`0xffffffffffffffff`))}),l.prototype.writeBigUInt64BE=ke(function(e,t=0){return ue(this,e,t,BigInt(0),BigInt(`0xffffffffffffffff`))}),l.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){let r=2**(8*n-1);j(this,e,t,n,r-1,-r)}let i=0,a=1,o=0;for(this[t]=e&255;++i<n&&(a*=256);)e<0&&o===0&&this[t+i-1]!==0&&(o=1),this[t+i]=(e/a>>0)-o&255;return t+n},l.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){let r=2**(8*n-1);j(this,e,t,n,r-1,-r)}let i=n-1,a=1,o=0;for(this[t+i]=e&255;--i>=0&&(a*=256);)e<0&&o===0&&this[t+i+1]!==0&&(o=1),this[t+i]=(e/a>>0)-o&255;return t+n},l.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1},l.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2},l.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2},l.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4},l.prototype.writeBigInt64LE=ke(function(e,t=0){return le(this,e,t,-BigInt(`0x8000000000000000`),BigInt(`0x7fffffffffffffff`))}),l.prototype.writeBigInt64BE=ke(function(e,t=0){return ue(this,e,t,-BigInt(`0x8000000000000000`),BigInt(`0x7fffffffffffffff`))});function de(e,t,n,r,i,a){if(n+r>e.length||n<0)throw RangeError(`Index out of range`)}function fe(e,t,n,r,a){return t=+t,n>>>=0,a||de(e,t,n,4,34028234663852886e22,-34028234663852886e22),i.write(e,t,n,r,23,4),n+4}l.prototype.writeFloatLE=function(e,t,n){return fe(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return fe(this,e,t,!1,n)};function pe(e,t,n,r,a){return t=+t,n>>>=0,a||de(e,t,n,8,17976931348623157e292,-17976931348623157e292),i.write(e,t,n,r,52,8),n+8}l.prototype.writeDoubleLE=function(e,t,n){return pe(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return pe(this,e,t,!1,n)},l.prototype.copy=function(e,t,n,r){if(!l.isBuffer(e))throw TypeError(`argument should be a Buffer`);if(n||=0,!r&&r!==0&&(r=this.length),t>=e.length&&(t=e.length),t||=0,r>0&&r<n&&(r=n),r===n||e.length===0||this.length===0)return 0;if(t<0)throw RangeError(`targetStart out of bounds`);if(n<0||n>=this.length)throw RangeError(`Index out of range`);if(r<0)throw RangeError(`sourceEnd out of bounds`);r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);let i=r-n;return this===e&&typeof Uint8Array.prototype.copyWithin==`function`?this.copyWithin(t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),i},l.prototype.fill=function(e,t,n,r){if(typeof e==`string`){if(typeof t==`string`?(r=t,t=0,n=this.length):typeof n==`string`&&(r=n,n=this.length),r!==void 0&&typeof r!=`string`)throw TypeError(`encoding must be a string`);if(typeof r==`string`&&!l.isEncoding(r))throw TypeError(`Unknown encoding: `+r);if(e.length===1){let t=e.charCodeAt(0);(r===`utf8`&&t<128||r===`latin1`)&&(e=t)}}else typeof e==`number`?e&=255:typeof e==`boolean`&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw RangeError(`Out of range index`);if(n<=t)return this;t>>>=0,n=n===void 0?this.length:n>>>0,e||=0;let i;if(typeof e==`number`)for(i=t;i<n;++i)this[i]=e;else{let a=l.isBuffer(e)?e:l.from(e,r),o=a.length;if(o===0)throw TypeError(`The value "`+e+`" is invalid for argument "value"`);for(i=0;i<n-t;++i)this[i+t]=a[i%o]}return this};let me={};function he(e,t,n){me[e]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}he(`ERR_BUFFER_OUT_OF_BOUNDS`,function(e){return e?`${e} is outside of buffer bounds`:`Attempt to access memory outside buffer bounds`},RangeError),he(`ERR_INVALID_ARG_TYPE`,function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),he(`ERR_OUT_OF_RANGE`,function(e,t,n){let r=`The value of "${e}" is out of range.`,i=n;return Number.isInteger(n)&&Math.abs(n)>2**32?i=ge(String(n)):typeof n==`bigint`&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=ge(i)),i+=`n`),r+=` It must be ${t}. Received ${i}`,r},RangeError);function ge(e){let t=``,n=e.length,r=+(e[0]===`-`);for(;n>=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function M(e,t,n){ve(t,`offset`),(e[t]===void 0||e[t+n]===void 0)&&ye(t,e.length-(n+1))}function _e(e,t,n,r,i,a){if(e>n||e<t){let r=typeof t==`bigint`?`n`:``,i;throw i=a>3?t===0||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${(a+1)*8}${r}`:`>= -(2${r} ** ${(a+1)*8-1}${r}) and < 2 ** ${(a+1)*8-1}${r}`:`>= ${t}${r} and <= ${n}${r}`,new me.ERR_OUT_OF_RANGE(`value`,i,e)}M(r,i,a)}function ve(e,t){if(typeof e!=`number`)throw new me.ERR_INVALID_ARG_TYPE(t,`number`,e)}function ye(e,t,n){throw Math.floor(e)===e?t<0?new me.ERR_BUFFER_OUT_OF_BOUNDS:new me.ERR_OUT_OF_RANGE(n||`offset`,`>= ${+!!n} and <= ${t}`,e):(ve(e,n),new me.ERR_OUT_OF_RANGE(n||`offset`,`an integer`,e))}let be=/[^+/0-9A-Za-z-_]/g;function xe(e){if(e=e.split(`=`)[0],e=e.trim().replace(be,``),e.length<2)return``;for(;e.length%4!=0;)e+=`=`;return e}function Se(e,t){t||=1/0;let n,r=e.length,i=null,a=[];for(let o=0;o<r;++o){if(n=e.charCodeAt(o),n>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if(--t<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,n&63|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,n&63|128)}else if(n<1114112){if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,n&63|128)}else throw Error(`Invalid code point`)}return a}function Ce(e){let t=[];for(let n=0;n<e.length;++n)t.push(e.charCodeAt(n)&255);return t}function we(e,t){let n,r,i,a=[];for(let o=0;o<e.length&&!((t-=2)<0);++o)n=e.charCodeAt(o),r=n>>8,i=n%256,a.push(i),a.push(r);return a}function Te(e){return r.toByteArray(xe(e))}function Ee(e,t,n,r){let i;for(i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function N(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function De(e){return e!==e}let Oe=(function(){let e=`0123456789abcdef`,t=Array(256);for(let n=0;n<16;++n){let r=n*16;for(let i=0;i<16;++i)t[r+i]=e[n]+e[i]}return t})();function ke(e){return typeof BigInt>`u`?Ae:e}function Ae(){throw Error(`BigInt not supported`)}})),i=r();globalThis.Buffer===void 0&&(globalThis.Buffer=i.Buffer);function a(){return{version:`6.193.0`,releasedAt:`2026-09-25T23:04:52Z`,buildId:`6.193.0-muhkj9be`}}function o(e){let t=typeof e==`string`?e:e.href;if(!t.startsWith(`file:`))throw TypeError(`fileURLToPath: not a file URL`);let n=new URL(t);if(n.hostname!==``&&n.hostname!==`localhost`)throw Object.assign(TypeError(`File URL host must be "localhost" or empty on posix`),{code:`ERR_INVALID_FILE_URL_HOST`});if(/%2f/i.test(n.pathname))throw Object.assign(TypeError(`File URL path must not include encoded / characters`),{code:`ERR_INVALID_FILE_URL_PATH`});return decodeURIComponent(n.pathname)}function s(e){let t=e.split(`/`).map(e=>encodeURIComponent(e)).join(`/`);return new URL(`file://${t}`)}const c={URL:globalThis.URL,URLSearchParams:globalThis.URLSearchParams,fileURLToPath:o,pathToFileURL:s};function l(e,t){return Object.assign(TypeError(`The "${e}" argument must be of type string or an instance of Buffer or URL. Received ${t===null?`null`:typeof t}`),{code:`ERR_INVALID_ARG_TYPE`})}function u(e){return typeof e==`object`&&!!e&&typeof e.href==`string`&&typeof e.protocol==`string`}function d(e,t=`path`){if(typeof e==`string`)return e;if(u(e)){if(e.protocol!==`file:`)throw Object.assign(TypeError(`The URL must be of scheme file`),{code:`ERR_INVALID_URL_SCHEME`});return c.fileURLToPath(e.href)}if(e instanceof Uint8Array)return new TextDecoder().decode(e);throw l(t,e)}function f(e,t){let n=[...t];switch(e){case`path`:n[0]=d(n[0]);break;case`fd`:typeof n[0]!=`number`&&(n[0]=d(n[0]));break;case`pair`:n[0]=d(n[0],`src`),n[1]=d(n[1],`dest`);break;case`second`:n[1]=d(n[1])}return n}function p(e,t,n={}){let r=e;for(let i of Object.keys(t)){let a=t[i],o=r[i];!a||typeof o!=`function`||(r[i]=((...t)=>{let r;try{r=f(a,t)}catch(e){if(n.promises)return Promise.reject(e);throw e}return o.apply(e,r)}))}}function m(e){let t=!!e.isDirectory,n=e.mtimeMs??0;return{isFile:()=>!!e.isFile,isDirectory:()=>t,isSymbolicLink:()=>!!e.isSymbolicLink,isBlockDevice:()=>!1,isCharacterDevice:()=>!1,isFIFO:()=>!1,isSocket:()=>!1,size:e.size??0,mode:e.mode??(t?16877:33188),mtimeMs:n,mtime:new Date(n)}}const h=new Set([`stat`,`lstat`]);function g(e){if(e.length===0)return e;if(e.length===1||e[1]===void 0)return[e[0],null];let t=e[1];return typeof t==`object`&&t&&!ArrayBuffer.isView(t)&&t.encoding===void 0?[e[0],{...t,encoding:null}]:e}function _(e){if(e instanceof Error&&e.code===void 0){let t=/^(E[A-Z]+)\b/.exec(e.message)?.[1];t&&Object.assign(e,{code:t})}return e}function v(e,t){return h.has(e)?m(t):t}function y(e,t,n,r){let i=e===`readFile`?g(r):r;return t.apply(n,i)}function b(e){let t={};for(let[n,r]of Object.entries(e))n!==`promises`&&(t[n]=typeof r==`function`?async(...t)=>{try{return v(n,await y(n,r,e,t))}catch(e){throw _(e)}}:r);return t}function x(e){let t=e;for(let[e,n]of Object.entries(t))e!==`promises`&&typeof n==`function`&&(t[e]=function(...t){let r=t[t.length-1];if(typeof r!=`function`)return n.apply(this,t);t.pop();let i;try{i=Promise.resolve(y(e,n,this,t))}catch(e){i=Promise.reject(e)}i.then(t=>e===`exists`?r(t):r(null,v(e,t)),t=>r(e!==`exists`&&_(t)))})}function S(e,t){return Object.assign(Error(`EBADF: bad file descriptor, ${e} ${String(t)}`),{code:`EBADF`})}function C(e){return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}function w(e){let t=``;for(let n=0;n<e.length;n+=32768)t+=String.fromCharCode(...e.subarray(n,n+32768));return t}function T(){return{readSync:e=>{throw S(`read`,e)},writeSync:e=>{throw S(`write`,e)}}}function E(e){let t=0;return{readSync(n,r,i,a){if(n!==0)throw S(`read`,n);let o=C(r),s=typeof i==`object`&&i?i:{offset:i,length:a},c=s.offset??0,l=s.length??o.length-c,u=e.readStdinBytes(),d=Math.max(0,Math.min(l,u.length-t));return o.set(u.subarray(t,t+d),c),t+=d,d},writeSync(t,n,r,i){let a=t===1?e.writeStdout:t===2?e.writeStderr:void 0;if(!a)throw S(`write`,t);if(typeof n==`string`)return a(n),new TextEncoder().encode(n).length;if(!ArrayBuffer.isView(n))throw TypeError(`writeSync: data must be a string or buffer`);let o=C(n),s=typeof r==`number`?r:0,c=o.subarray(s,i===void 0?void 0:s+i);return a(w(c)),c.length}}}function D(e){if(!e||e===`/`)return`/`;e.startsWith(`/`)||(e=`/`+e);let t=e.split(`/`),n=[];for(let e of t)e!==``&&e!==`.`&&(e===`..`?n.pop():n.push(e));return`/`+n.join(`/`)}function O(e){let t=D(e);if(t===`/`)return`/`;let n=t.lastIndexOf(`/`);return n===0?`/`:t.slice(0,n)}function k(e){return Object.assign(Error(`ENOENT: no such file or directory, '${e}'`),{code:`ENOENT`})}function ee(e){return Object.assign(Error(`ENOSYNC: file too large for sync access, '${e}' — use async readFile() instead`),{code:`ENOSYNC`})}function te(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}var ne=class{tree=new Map;initialPaths=new Set;initialContent=new Map;initialKind=new Map;mkdtempCounter=0;tombstones=new Set;removedDirs=new Set;touched=!1;constructor(e){this.loadSnapshot(e)}loadSnapshot(e){this.tree=new Map,this.tombstones=new Set,this.removedDirs=new Set,this.initialPaths=new Set,this.initialContent=new Map,this.initialKind=new Map,this.tree.set(`/`,{content:new Uint8Array,isDirectory:!0}),this.initialPaths.add(`/`),this.initialKind.set(`/`,`directory`);for(let t of e.entries){let e=D(t.path);this.tree.set(e,{content:t.content,isDirectory:t.isDirectory,isSymbolicLink:t.isSymbolicLink,symlinkTarget:t.symlinkTarget,truncated:t.truncated,size:t.size}),this.initialPaths.add(e),this.initialKind.set(e,this.entryKind(t)),!t.isDirectory&&!t.isSymbolicLink&&this.initialContent.set(e,t.content)}for(let t of e.entries){let e=O(D(t.path));for(;e!==`/`&&!this.tree.has(e);)this.tree.set(e,{content:new Uint8Array,isDirectory:!0}),this.initialPaths.add(e),this.initialKind.set(e,`directory`),e=O(e)}}wasUsed(){return this.touched}applySnapshot(e){this.loadSnapshot(e)}applySnapshotPreservingMutations(e){let t=this.getMutations();this.loadSnapshot(e);for(let e of t.deleted){if(this.tree.get(e)?.isDirectory){let t=e===`/`?`/`:e+`/`;for(let n of Array.from(this.tree.keys()))n!==e&&n.startsWith(t)&&this.tree.delete(n)}this.tree.delete(e)}for(let e of t.created)this.ensureParentDirs(e.path),this.tree.set(e.path,{content:e.content,isDirectory:e.isDirectory,isSymbolicLink:e.isSymbolicLink,symlinkTarget:e.symlinkTarget});for(let e of t.modified)this.ensureParentDirs(e.path),this.tree.set(e.path,{content:e.content,isDirectory:!1})}invalidate(){this.loadSnapshot({entries:[]})}resetBaseline(){this.initialPaths=new Set,this.initialContent=new Map,this.initialKind=new Map;for(let[e,t]of this.tree.entries())this.initialPaths.add(e),this.initialKind.set(e,this.entryKind(t)),!t.isDirectory&&!t.isSymbolicLink&&this.initialContent.set(e,t.content)}entryKind(e){return e.isSymbolicLink?`symlink`:e.isDirectory?`directory`:`file`}resolveEntry(e,t=!1){let n=D(e),r=n.split(`/`).filter(Boolean),i=[],a=new Set,o=0;if(r.length===0){let e=this.tree.get(`/`);return e?{path:`/`,entry:e}:void 0}for(;r.length>0;){let e=r.shift(),s=`/${[...i,e].join(`/`)}`,c=this.tree.get(s);if(!c)return;let l=r.length===0;if(c.isSymbolicLink&&!(t&&l)){if(a.has(s)||o++===40)throw Object.assign(Error(`ELOOP: too many symbolic links, '${n}'`),{code:`ELOOP`});a.add(s);let e=c.symlinkTarget??``;r=[...D(e.startsWith(`/`)?e:`${O(s)}/${e}`).split(`/`).filter(Boolean),...r],i=[];continue}if(!l&&!c.isDirectory)return;if(i.push(e),l)return{path:s,entry:c}}}ensureParentDirs(e){let t=O(e);t!==`/`&&(this.tree.has(t)||this.mkdir(t,!0,!0))}isPartial(e){return this.tree.get(D(e))?.partial===!0}commitWrite(e,t){this.writeFile(e,t);let n=D(e);for(this.initialContent.set(n,t);n!==`/`;){let e=this.tree.get(n);e&&(this.initialPaths.add(n),this.initialKind.set(n,this.entryKind(e))),n=O(n)}}readFile(e){this.touched=!0;let t=D(e),n=this.resolveEntry(t)?.entry;if(!n||n.isDirectory)throw k(t);if(n.truncated)throw ee(t);return n.content}writeFile(e,t){this.touched=!0;let n=D(e);this.ensureParentDirs(n),this.tree.set(n,{content:t,isDirectory:!1}),this.tombstones.delete(n),this.removedDirs.delete(n)}exists(e){this.touched=!0;let t=D(e);return this.tree.has(t)}stat(e){this.touched=!0;let t=D(e),n=this.resolveEntry(t);if(!n)throw k(t);return this.toStat(n.entry)}lstat(e){this.touched=!0;let t=D(e),n=this.resolveEntry(t,!0);if(!n)throw k(t);return this.toStat(n.entry)}toStat(e){return{isFile:!e.isDirectory&&!e.isSymbolicLink,isDirectory:e.isDirectory,isSymbolicLink:e.isSymbolicLink===!0,size:e.isDirectory?0:e.size??e.content.byteLength}}readdir(e){this.touched=!0;let t=D(e),n=this.resolveEntry(t);if(!n?.entry.isDirectory)throw k(t);let r=n.path===`/`?`/`:n.path+`/`,i=new Set;for(let e of this.tree.keys()){if(e===t||e===`/`||!e.startsWith(r))continue;let n=e.slice(r.length).split(`/`)[0];n&&i.add(n)}return Array.from(i)}mkdir(e,t,n=!1){this.touched=!0;let r=D(e);if(this.tree.has(r)){if(this.tree.get(r).isDirectory)return;throw Object.assign(Error(`EEXIST: file already exists, '${r}'`),{code:`EEXIST`})}let i=O(r);if(i!==`/`&&!this.tree.has(i)){if(!t)throw k(r);this.mkdir(i,!0,n)}this.tree.set(r,{content:new Uint8Array,isDirectory:!0,...n?{partial:!0}:{}}),this.tombstones.delete(r),this.removedDirs.delete(r)}rm(e,t){this.touched=!0;let n=D(e),r=this.tree.get(n);if(!r)throw k(n);if(r.isDirectory&&!r.isSymbolicLink){let e=n===`/`?`/`:n+`/`,r=Array.from(this.tree.keys()).filter(t=>t!==n&&t.startsWith(e));if(r.length>0&&!t)throw Object.assign(Error(`ENOTEMPTY: directory not empty, '${n}'`),{code:`ENOTEMPTY`});for(let e of r)this.tree.delete(e),this.tombstones.add(e);t&&this.removedDirs.add(n)}this.tree.delete(n),this.tombstones.add(n)}copyFile(e,t){this.touched=!0;let n=D(e),r=this.tree.get(n);if(!r||r.isDirectory)throw k(n);if(r.truncated)throw ee(n);let i=D(t);this.ensureParentDirs(i),this.tree.set(i,{content:r.content.slice(),isDirectory:!1}),this.tombstones.delete(i),this.removedDirs.delete(i)}rename(e,t){this.touched=!0;let n=D(e),r=this.tree.get(n);if(!r)throw k(n);let i=D(t);if(r.isDirectory){let e=n===`/`?`/`:n+`/`,t=Array.from(this.tree.keys()).filter(t=>t!==n&&t.startsWith(e));this.ensureParentDirs(i),this.tree.set(i,r),this.tree.delete(n);for(let e of t){let t=this.tree.get(e),r=i+e.slice(n.length);this.tree.set(r,t),this.tree.delete(e)}this.tombstones.add(n),this.removedDirs.add(n),this.tombstones.delete(i),this.removedDirs.delete(i);return}this.ensureParentDirs(i),this.tree.set(i,r),this.tree.delete(n),this.tombstones.add(n),this.tombstones.delete(i),this.removedDirs.delete(i)}unlink(e){this.touched=!0;let t=D(e),n=this.tree.get(t);if(!n)throw k(t);if(n.isDirectory&&!n.isSymbolicLink)throw Object.assign(Error(`EISDIR: illegal operation on a directory, unlink '${t}'`),{code:`EISDIR`});this.tree.delete(t),this.tombstones.add(t)}markRemoved(e,t=!1){this.touched=!0;let n=D(e);this.tombstones.add(n),t&&this.removedDirs.add(n)}isTombstoned(e){let t=D(e);if(this.tombstones.has(t))return!0;for(let e of this.removedDirs)if(t===e||t.startsWith(`${e}/`))return!0;return!1}mkdtemp(e){this.touched=!0;for(let t=0;t<100;t++){let t=`_${String(this.mkdtempCounter).padStart(6,`0`)}`;this.mkdtempCounter++;let n=D(e+t);if(!this.tree.has(n))return this.mkdir(n,!0),n}throw Error(`mkdtemp: failed to create unique directory after 100 attempts`)}getMutations(){let e=[],t=[],n=[];for(let[r,i]of this.tree.entries()){if(r===`/`)continue;if(!this.initialPaths.has(r)){e.push({path:r,content:i.content,isDirectory:i.isDirectory,isSymbolicLink:i.isSymbolicLink,symlinkTarget:i.symlinkTarget});continue}let a=this.initialKind.get(r);if(a!==void 0&&a!==this.entryKind(i)){n.push(r),e.push({path:r,content:i.content,isDirectory:i.isDirectory,isSymbolicLink:i.isSymbolicLink,symlinkTarget:i.symlinkTarget});continue}if(!i.isDirectory&&!i.isSymbolicLink){let e=this.initialContent.get(r);e&&!te(e,i.content)&&t.push({path:r,content:i.content})}}for(let e of this.initialPaths)e!==`/`&&(this.tree.has(e)||n.push(e));return{created:e,modified:t,deleted:n}}};function re(){return globalThis.Buffer}function ie(e){let t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n)&255;return t}function ae(e){let t=``;for(let n=0;n<e.length;n+=32768)t+=String.fromCharCode(...e.subarray(n,n+32768));return t}function oe(e,t){return Object.assign(Error(`EBADF: bad file descriptor, ${e} ${String(t)}`),{code:`EBADF`})}function se(e){return e===`/dev/stdin`||e===`/dev/stdout`||e===`/dev/stderr`}function ce(e){if(e===0||e===`/dev/stdin`)return 0;if(e===1||e===`/dev/stdout`)return 1;if(e===2||e===`/dev/stderr`)return 2}function A(e,t){let n=ce(e);if(n===0)return!0;if(n!==void 0||typeof e==`number`)throw oe(t,e);return!1}function j(e,t,n){let r=ce(t);if(r===1)return e.writeStdout;if(r===2)return e.writeStderr;if(r!==void 0||typeof t==`number`)throw oe(n,t)}function le(e){return typeof e==`string`?e:ae(Te(e))}function ue(e,t){if(t===`utf8`||t===`utf-8`)return new TextDecoder().decode(e);let n=re();return n?n.from(e):e}function de(e){return e===null?null:typeof e==`string`?e:e?.encoding}function fe(){return{isFile:()=>!0,isDirectory:()=>!1,isSymbolicLink:()=>!1,isCharacterDevice:()=>!0,size:0}}function pe(e,t){if(!t)return;let n={readFile:e.readFile,readFileBinary:e.readFileBinary,writeFile:e.writeFile,writeFileBinary:e.writeFileBinary,appendFile:e.appendFile,access:e.access,exists:e.exists,stat:e.stat};e.readFile=async(e,r)=>{if(!A(e,`read`))return n.readFile(e,r);let i=de(r);if(i===null||i===`buffer`){let e=re(),n=t.readStdinBytes();return e?e.from(n):n}return new TextDecoder().decode(t.readStdinBytes())},e.readFileBinary=async e=>A(e,`read`)?t.readStdinBytes():n.readFileBinary(e),e.writeFile=async(e,r)=>{let i=j(t,e,`write`);return i?(i(le(r)),!0):n.writeFile(e,r)},e.writeFileBinary=async(e,r)=>{let i=j(t,e,`write`);return i?(i(ae(r)),!0):n.writeFileBinary(e,r)},e.appendFile=async(e,r)=>{let i=j(t,e,`append`);if(!i)return n.appendFile(e,r);i(le(r))},e.access=async e=>{if(!se(e))return n.access(e)},e.exists=async e=>se(e)||n.exists(e),e.stat=async e=>se(e)?{isFile:!0,isDirectory:!1,size:0}:n.stat(e)}function me(e,t,n){function r(e){if(e instanceof Uint8Array)return e;if(ArrayBuffer.isView(e)){let t=e;return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}return e instanceof ArrayBuffer?new Uint8Array(e):new TextEncoder().encode(typeof e==`string`?e:String(e))}async function i(t,n){let r=de(n);if(r===null||r===`buffer`){let n=await e.call(`vfs`,`readFileBinary`,[t]),r=re();return r?r.from(n instanceof Uint8Array?n:new Uint8Array(n)):n}return e.call(`vfs`,`readFile`,[t])}async function a(t,n){return typeof n==`string`?e.call(`vfs`,`writeFile`,[t,n]):e.call(`vfs`,`writeFileBinary`,[t,r(n)])}async function o(t,n){if(typeof n==`string`){await e.call(`vfs`,`appendFile`,[t,n]);return}await e.call(`vfs`,`appendFile`,[t,r(n)])}async function s(t,n,r){let i=await e.call(`vfs`,`stat`,[t]);if(i.isFile){let r=await e.call(`vfs`,`readFileBinary`,[t]);await e.call(`vfs`,`writeFileBinary`,[n,r]);return}if(!i.isDirectory||!r?.recursive)throw Error(`cp: '${t}' is a directory (use {recursive: true})`);await l(n);let a=await e.call(`vfs`,`readDir`,[t]);for(let e of a)await s(`${t}/${e}`,`${n}/${e}`,r)}async function c(t,n){if(n?.force&&!await e.call(`vfs`,`exists`,[t]))return!0;if((await e.call(`vfs`,`stat`,[t])).isFile)return e.call(`vfs`,`rm`,[t]);if(!n?.recursive)throw Error(`rm: '${t}' is a directory (use {recursive: true})`);let r=await e.call(`vfs`,`readDir`,[t]);for(let e of r)await c(`${t}/${e}`,n);return e.call(`vfs`,`rm`,[t])}async function l(t){await e.call(`vfs`,`mkdir`,[t])}async function u(t){for(let n=0;n<5;n++){let n=`${t}${Math.random().toString(36).slice(2,10)+Math.random().toString(36).slice(2,6)}`;if(!await e.call(`vfs`,`exists`,[n]))return await e.call(`vfs`,`mkdir`,[n]),n}throw Error(`mkdtemp: failed to create unique directory after 5 attempts`)}async function d(t,n){try{await e.call(`vfs`,`rename`,[t,n])}catch{let r=await e.call(`vfs`,`readFileBinary`,[t]);await e.call(`vfs`,`writeFileBinary`,[n,r]),await e.call(`vfs`,`rm`,[t])}}async function f(t){if(!await e.call(`vfs`,`exists`,[t]))throw Object.assign(Error(`ENOENT: no such file or directory, access '${t}'`),{code:`ENOENT`})}let m={readFile:i,readFileBinary:t=>e.call(`vfs`,`readFileBinary`,[t]),writeFile:a,writeFileBinary:(t,n)=>e.call(`vfs`,`writeFileBinary`,[t,n]),appendFile:o,cp:s,rm:c,readDir:t=>e.call(`vfs`,`readDir`,[t]),readdir:t=>e.call(`vfs`,`readDir`,[t]),exists:t=>e.call(`vfs`,`exists`,[t]),stat:t=>e.call(`vfs`,`stat`,[t]),mkdir:(t,n)=>e.call(`vfs`,`mkdir`,[t]),mkdtemp:u,rename:d,access:f,unlink:t=>e.call(`vfs`,`rm`,[t]),rmdir:t=>e.call(`vfs`,`rm`,[t]),copyFile:async(t,n)=>{let r=await e.call(`vfs`,`readFileBinary`,[t]);await e.call(`vfs`,`writeFileBinary`,[n,r])},fetchToFile:async(n,r)=>{let i=await t(n);if(!i.ok)throw Error(`fetch ${i.status} ${i.statusText}`);let a=new Uint8Array(await i.arrayBuffer());return await e.call(`vfs`,`writeFileBinary`,[r,a]),a.byteLength},promises:null};return pe(m,n),p(m,he,{promises:!0}),m.promises=b(m),x(m),m}const he={readFile:`fd`,readFileBinary:`fd`,writeFile:`fd`,writeFileBinary:`fd`,appendFile:`fd`,cp:`pair`,rm:`path`,readDir:`path`,readdir:`path`,exists:`path`,stat:`path`,mkdir:`path`,mkdtemp:`path`,rename:`pair`,access:`path`,unlink:`path`,rmdir:`path`,copyFile:`pair`,fetchToFile:`second`},ge={readFileSync:`fd`,writeFileSync:`fd`,appendFileSync:`fd`,truncateSync:`path`,existsSync:`path`,accessSync:`path`,mkdirSync:`path`,statSync:`path`,lstatSync:`path`,realpathSync:`path`,readdirSync:`path`,copyFileSync:`pair`,cpSync:`pair`,chmodSync:`path`,utimesSync:`path`,mkdtempSync:`path`,rmSync:`path`,rmdirSync:`path`,unlinkSync:`path`,renameSync:`pair`};function M(e,t,n=``){return Object.assign(Error(`${e}: sync-fs, ${n?`${n} `:``}'${t}'`),{code:e})}function _e(e,t,n,r={},i){let a=r.recursive===!0;try{return r.requireFile?e.unlink(n):e.rm(n,a),i?.(n),!0}catch(e){if(e?.code!==`ENOENT`)throw e}let o=t;if(!o?.rm||e.isTombstoned(n))return!1;try{if(!o.exists(n))return!1}catch{return!1}return o.rm(n),e.markRemoved(n,a),!0}function ve(e){let{syncFs:t,bridge:n,resolve:r,existsResolved:i,lstatResolved:a,statResolved:o,readBytes:s,writeThrough:c,persistDelete:l}=e,u=(e,r)=>_e(t,n,e,r,l);return{rmSync(e,t){let n=r(e);if(!(t?.force&&!i(n))&&!u(n,{recursive:t?.recursive===!0})&&!t?.force)throw M(`ENOENT`,n,`rm`)},rmdirSync(e,t){let n=r(e);if(i(n)&&!a(n).isDirectory)throw M(`ENOTDIR`,n,`rmdir`);if(!u(n,{recursive:t?.recursive===!0}))throw M(`ENOENT`,n,`rmdir`)},unlinkSync(e){let t=r(e);if(!u(t,{requireFile:!0}))throw M(`ENOENT`,t,`unlink`)},renameSync(e,i){let a=r(e),l=r(i);try{t.rename(a,l);return}catch(e){if(e?.code!==`ENOENT`)throw e}if(!n||t.isTombstoned(a))throw M(`ENOENT`,a,`rename`);if(o(a).isDirectory)throw M(`EISDIR`,a,`rename`);if(c(l,s(a)),!u(a,{requireFile:!0}))throw M(`ENOENT`,a,`rename`)}}}function ye(e,t){if(!t)return;let n={readFileSync:e.readFileSync,writeFileSync:e.writeFileSync,appendFileSync:e.appendFileSync,existsSync:e.existsSync,accessSync:e.accessSync,statSync:e.statSync,lstatSync:e.lstatSync};e.readFileSync=(e,r)=>A(e,`read`)?ue(t.readStdinBytes(),de(r)):n.readFileSync(e,r),e.writeFileSync=(e,r)=>{let i=j(t,e,`write`);i?i(le(r)):n.writeFileSync(e,r)},e.appendFileSync=(e,r)=>{let i=j(t,e,`append`);i?i(le(r)):n.appendFileSync(e,r)},e.existsSync=e=>se(e)||n.existsSync(e),e.accessSync=e=>{se(e)||n.accessSync(e)},e.statSync=e=>se(e)?fe():n.statSync(e),e.lstatSync=e=>se(e)?fe():n.lstatSync(e),Object.assign(e,E(t))}function be(e,t,n,r){let i=t=>e===`/`?`/${t}`:`${e}/${t}`,a=new Set(n);for(let e of t)a.add(e);for(let e of a)r(i(e))&&a.delete(e);return[...a]}function xe(e,t){if(e instanceof Date)return e.getTime();if(typeof e==`string`&&e.trim()!==``&&Number.isFinite(Number(e)))return Number(e)*1e3;if(typeof e==`number`){if(!Number.isFinite(e))throw Object.assign(TypeError(`The "${t}" argument must be of type number, string or Date`),{code:`ERR_INVALID_ARG_TYPE`});return e<0?Date.now():e*1e3}throw Object.assign(TypeError(`The "${t}" argument must be of type number, string or Date`),{code:`ERR_INVALID_ARG_TYPE`})}function Se(e,t,n,r,i){let a=e?.utimes;if(!(!e||typeof a!=`function`||t.isTombstoned(n)))try{a.call(e,n,r,i)}catch(e){let r=e?.code;if(r===`ENOSYS`||r===`ENOENT`&&t.exists(n))return;throw e}}function Ce(e,t,n,r){return{chmodSync(n){let r=e(n);if(!t(r))throw M(`ENOENT`,r,`chmod`)},utimesSync(i,a,o){let s=xe(a,`atime`),c=xe(o,`mtime`),l=e(i);if(!t(l))throw M(`ENOENT`,l,`utime`);Se(n,r,l,s,c)}}}function we(e,t,n){let r=t=>e.isTombstoned(t);try{let i=e.readdir(n);if(!t||!e.isPartial(n)||r(n))return i;try{return be(n,i,t.readdir(n),r)}catch(e){if(e?.code===`ENOENT`)return i;throw e}}catch(e){let i=e?.code;if(!t||r(n)||i!==`ENOENT`)throw e;return be(n,[],t.readdir(n),r)}}function Te(e){if(typeof e==`string`)return new TextEncoder().encode(e);if(e instanceof Uint8Array)return e;if(ArrayBuffer.isView(e)){let t=e;return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}return new TextEncoder().encode(String(e))}function Ee(e,t,n,r,i){t?(t.writeFile(r,i),e.commitWrite(r,i)):(e.writeFile(r,i),n?.write?.(r,i))}function N(e,t,n,r,i){function a(e){return D(e.startsWith(`/`)?e:t+(t.endsWith(`/`)?``:`/`)+e)}function o(t){try{return e.readFile(t)}catch(r){let i=r?.code;if(n&&!e.isTombstoned(t)&&(i===`ENOENT`||i===`ENOSYNC`))return n.readFile(t);throw r}}let s=(t,r)=>Ee(e,n,i,t,r);function c(t){if(e.exists(t))return!0;if(!n||e.isTombstoned(t))return!1;try{return n.exists(t)}catch{return!1}}function l(t){try{return e.stat(t)}catch(r){let i=r?.code;if(!n||e.isTombstoned(t)||i!==`ENOENT`)throw r;return n.stat(t)}}function u(t){try{return e.lstat(t)}catch(r){let i=r?.code;if(!n||e.isTombstoned(t)||i!==`ENOENT`)throw r;return n.lstat(t)}}let d=e=>({isFile:()=>e.isFile,isDirectory:()=>e.isDirectory,isSymbolicLink:()=>e.isSymbolicLink===!0,isCharacterDevice:()=>!1,size:e.size}),f=(e,t)=>e===`/`?`/${t}`:`${e}/${t}`;function m(t,r){if(!l(t).isDirectory){s(r,o(t));return}e.mkdir(r,!0);for(let i of we(e,n,t))m(f(t,i),f(r,i))}let h={...ve({syncFs:e,bridge:n,persistDelete:i?.delete,resolve:a,existsResolved:c,statResolved:l,lstatResolved:u,readBytes:o,writeThrough:s}),readFileSync(e,t){return ue(o(a(e)),de(t))},writeFileSync(e,t){s(a(e),Te(t))},appendFileSync(e,t){let n=a(e),r=new Uint8Array;try{r=o(n)}catch(e){if(e?.code!==`ENOENT`)throw e}let i=Te(t),c=new Uint8Array(r.byteLength+i.byteLength);c.set(r),c.set(i,r.byteLength),s(n,c)},truncateSync(e,t=0){let n=a(e),r=o(n),i=new Uint8Array(t);i.set(r.subarray(0,Math.min(t,r.byteLength))),s(n,i)},existsSync(e){return c(a(e))},accessSync(e){let t=a(e);if(!c(t))throw M(`ENOENT`,t,`access`)},mkdirSync(t,n){e.mkdir(a(t),n?.recursive)},statSync:e=>d(l(a(e))),lstatSync:e=>d(u(a(e))),realpathSync(e){let t=a(e);if(!c(t))throw M(`ENOENT`,t,`realpath`);return t},readdirSync(t){return we(e,n,a(t))},copyFileSync(e,t){s(a(t),o(a(e)))},cpSync(e,t){m(a(e),a(t))},...Ce(a,c,n,e),mkdtempSync(t){return e.mkdtemp(a(t))}},g=Object.assign(h,T());ye(g,r),p(g,ge);let _=g.existsSync;return g.existsSync=e=>{try{return _(e)}catch{return!1}},g}var De=class{_events=new Map;on(e,t){let n=this._events.get(e);return n?n.push(t):this._events.set(e,[t]),this}addListener(e,t){return this.on(e,t)}off(e,t){let n=this._events.get(e);if(n){let r=n.indexOf(t);r!==-1&&n.splice(r,1),n.length===0&&this._events.delete(e)}return this}removeListener(e,t){return this.off(e,t)}once(e,t){let n=(...r)=>{this.off(e,n),t(...r)};return this.on(e,n)}emit(e,...t){let n=this._events.get(e);if(!n||n.length===0)return!1;for(let e of[...n])e(...t);return!0}removeAllListeners(e){return e===void 0?this._events.clear():this._events.delete(e),this}listenerCount(e){return this._events.get(e)?.length??0}listeners(e){return[...this._events.get(e)??[]]}};const Oe=Object.assign(De,{EventEmitter:De,default:De});function ke(e){let t=e=>{if(typeof e==`string`)return e;if(e instanceof Error)return e.message;if(e==null)return String(e);try{return JSON.stringify(e)}catch{return String(e)}},n=(e,t,n)=>t===void 0?`${e(`Error:`)} ${n}\n`:t===``?`${e(n)}\n`:`${e(`${t}:`)} ${n}\n`,r=(t,n)=>t===void 0?`${e.color.yellow(`Warning:`)} ${n}\n`:t===``?`${e.color.yellow(n)}\n`:`${e.color.yellow(`${t}:`)} ${n}\n`;return{die(r,i){let a=typeof i==`number`?i:i?.exitCode??1,o=typeof i==`object`&&i&&`prefix`in i?i.prefix:void 0,s=t(r);throw e.writeStderr(n(e.color.red,o,s)),e.exit(a),Error(`unreachable`)},out(t){if(typeof t==`string`){e.writeStdout(t.endsWith(`
|
|
11
11
|
`)?t:`${t}\n`);return}try{e.writeStdout(`${JSON.stringify(t,null,2)}\n`)}catch{e.writeStdout(`${String(t)}\n`)}},warn(n,i){let a=typeof i==`object`&&i&&`prefix`in i?i.prefix:void 0;e.writeStderr(r(a,t(n)))},help(t){throw e.writeStdout(t.endsWith(`
|
|
12
|
-
`)?t:`${t}\n`),e.exit(0),Error(`unreachable`)}}}const
|
|
13
|
-
`)}function Ae(e){return e instanceof Date?e:new Date(e)}function je(e){return e<10?`0${e}`:String(e)}function Me(e,t=`short`){let n=Ae(e);if(Number.isNaN(n.getTime()))return String(e);if(t===`iso`)return n.toISOString();if(t===`locale`)return new Intl.DateTimeFormat(void 0,{dateStyle:`medium`}).format(n);if(t===`human`){let e=Date.now()-n.getTime(),t=Math.abs(e);if(t<6e4)return e>=0?`just now`:`in a moment`;let r=(t,n)=>e>=0?`${t} ${n}${t===1?``:`s`} ago`:`in ${t} ${n}${t===1?``:`s`}`;return t<36e5?r(Math.round(t/6e4),`minute`):t<864e5?r(Math.round(t/36e5),`hour`):t<26298e5?r(Math.round(t/864e5),`day`):t<315576e5?r(Math.round(t/26298e5),`month`):r(Math.round(t/315576e5),`year`)}return`${n.getFullYear()}-${je(n.getMonth()+1)}-${je(n.getDate())}`}const Ne={trunc:De,col:Oe,table:ke,date:Me};var P=class extends Error{actual;expected;operator;generatedMessage;code;constructor(e={}){let t=!e.message;super(e.message||`${Pe(e.actual)} ${e.operator||`!=`} ${Pe(e.expected)}`),this.name=`AssertionError`,this.actual=e.actual,this.expected=e.expected,this.operator=e.operator||``,this.generatedMessage=t,this.code=`ERR_ASSERTION`}};function Pe(e){if(typeof e==`string`)return JSON.stringify(e);if(e==null)return String(e);if(typeof e==`object`)try{return JSON.stringify(e)}catch{return String(e)}return String(e)}function F(e,t){return e instanceof Error?e:typeof e==`string`?new P({message:e}):t()}function Fe(e,t,n,r){if(e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(!Le(e[i],t[i],n,r))return!1;return!0}function Ie(e,t,n,r){let i=Object.keys(e);if(i.length!==Object.keys(t).length)return!1;for(let a of i)if(!Object.prototype.hasOwnProperty.call(t,a)||!Le(Reflect.get(e,a),Reflect.get(t,a),n,r))return!1;return!0}function Le(e,t,n,r){if((n?Object.is(e,t):e===t)||!n&&e==t)return!0;if(typeof e!=`object`||typeof t!=`object`||e===null||t===null)return!1;let i=e,a=t;return n&&Object.getPrototypeOf(i)!==Object.getPrototypeOf(a)?!1:r.get(i)===a||(r.set(i,a),Array.isArray(e)===Array.isArray(t)?Array.isArray(e)&&Array.isArray(t)?Fe(e,t,n,r):Ie(i,a,n,r):!1)}function Re(e,t){try{if(e instanceof t)return!0}catch{}try{return!!t(e)}catch{return!1}}function ze(e,t){for(let[n,r]of Object.entries(t)){let t=Reflect.get(e,n);if(r instanceof RegExp){if(typeof t!=`string`||!r.test(t))return!1}else if(t!==r)return!1}return!0}function Be(e,t){if(t===void 0)return!0;if(t instanceof RegExp){let n=e instanceof Error?e.message:String(e);return t.test(n)}return typeof t==`function`?Re(e,t):t&&typeof t==`object`?!e||typeof e!=`object`?!1:ze(e,t):!1}function Ve(e){let t=(e,t)=>{if(!e)throw F(t,()=>new P({message:`The expression evaluated to a falsy value`,actual:e,expected:!0,operator:`==`}))},n=((e,n)=>t(e,n)),r=(e,t,n)=>{if(!Object.is(e,t))throw F(n,()=>new P({actual:e,expected:t,operator:`strictEqual`}))},i=(t,n,i)=>{if(e){r(t,n,i);return}if(t!=n)throw F(i,()=>new P({actual:t,expected:n,operator:`==`}))},a=(e,t,n)=>{if(Object.is(e,t))throw F(n,()=>new P({actual:e,expected:t,operator:`notStrictEqual`}))},o=(t,n,r)=>{if(e){a(t,n,r);return}if(t==n)throw F(r,()=>new P({actual:t,expected:n,operator:`!=`}))},s=(e,t,n)=>{if(!Le(e,t,!0,new WeakMap))throw F(n,()=>new P({actual:e,expected:t,operator:`deepStrictEqual`}))},c=(t,n,r)=>{if(e){s(t,n,r);return}if(!Le(t,n,!1,new WeakMap))throw F(r,()=>new P({actual:t,expected:n,operator:`deepEqual`}))},l=(e,t,n)=>{if(Le(e,t,!0,new WeakMap))throw F(n,()=>new P({actual:e,expected:t,operator:`notDeepStrictEqual`}))};return n.ok=t,n.equal=i,n.notEqual=o,n.strictEqual=r,n.notStrictEqual=a,n.deepEqual=c,n.deepStrictEqual=s,n.notDeepEqual=(t,n,r)=>{if(e){l(t,n,r);return}if(Le(t,n,!1,new WeakMap))throw F(r,()=>new P({actual:t,expected:n,operator:`notDeepEqual`}))},n.notDeepStrictEqual=l,n.throws=(e,t,n)=>{let r,i=!1;try{e()}catch(e){r=e,i=!0}if(!i)throw F(typeof t==`string`?t:n,()=>new P({message:`Missing expected exception`,operator:`throws`}));if(!(typeof t==`string`||t instanceof Error)&&!Be(r,t))throw F(n,()=>new P({message:`Got unwanted exception`,actual:r,operator:`throws`}))},n.doesNotThrow=(e,t)=>{try{e()}catch(e){throw F(t,()=>new P({message:`Got unwanted exception`,actual:e,operator:`doesNotThrow`}))}},n.fail=e=>{throw F(e,()=>new P({message:`Failed`,operator:`fail`}))},n.AssertionError=P,n}const He=Ve(!0);He.strict=He;const Ue=Ve(!1);Ue.strict=He;function We(e,t){let n=globalThis.Buffer;if(!n)throw Error(`crypto.createHash: Buffer is unavailable in this environment`);return t?n.from(e,t):n.from(e)}var Ge=class{_events=new Map;closeScheduled=!1;writable=!0;readable=!0;on(e,t){let n=this._events.get(e);return n?n.push(t):this._events.set(e,[t]),this}once(e,t){let n=(...r)=>{this.off(e,n),t(...r)};return this.on(e,n)}off(e,t){let n=this._events.get(e);if(n){let e=n.indexOf(t);e!==-1&&n.splice(e,1)}return this}emit(e,...t){let n=this._events.get(e);if(!n||n.length===0)return!1;for(let e of[...n])e(...t);return!0}pipe(e){return this.on(`data`,t=>e.write(t)),this.once(`end`,()=>e.end()),e}closeOnDestroy(){return this.closeScheduled?this:(this.closeScheduled=!0,queueMicrotask(()=>this.emit(`close`)),this)}removeListener(e,t){return this.off(e,t)}removeAllListeners(){return this._events.clear(),this}},Ke=class extends Ge{read(){return null}destroy(){return this.closeOnDestroy()}},qe=class extends Ge{write(e,t,n){return n&&queueMicrotask(n),!0}end(e){return e&&queueMicrotask(e),this}destroy(){return this.closeOnDestroy()}},Je=class extends Ge{write(e,t,n){return n&&queueMicrotask(n),!0}end(e){return e&&queueMicrotask(e),this}read(){return null}destroy(){return this.closeOnDestroy()}};const Ye={Readable:Ke,Writable:qe,Transform:Je,PassThrough:class extends Je{},Stream:Ge};function Xe(e,t){return Object.assign(TypeError(t),{code:e})}const Ze=e=>e.startsWith(`--`)&&e.length>2,Qe=e=>/^-[^-]/.test(e);function $e(e,t,n){let r=[];for(let i=1;i<e.length;i++)if(t[n(e[i])]?.type!==`string`||i===e.length-1)r.push(`-${e[i]}`);else{r.push(`-${e.slice(i)}`);break}return r}function et(e,t,n){let r=[],i=[...e],a=-1,o=0,s=(e,t,n,r)=>({kind:`option`,name:e,rawName:t,index:a,value:n,inlineValue:r}),c=e=>t[e]?.type===`string`;for(;i.length>0;){let e=i.shift(),l=i[0];if(o>0?o--:a++,e===`--`){r.push({kind:`option-terminator`,index:a});for(let e of i)r.push({kind:`positional`,index:++a,value:e});break}if(Qe(e)&&e.length===2){let t=n(e[1]);c(t)&&l!==void 0?(i.shift(),r.push(s(t,e,l,!1)),a++):r.push(s(t,e,void 0,void 0));continue}if(Qe(e)){let a=n(e[1]);if(c(a))r.push(s(a,`-${e[1]}`,e.slice(2),!0));else{let r=$e(e,t,n);i.unshift(...r),o=r.length}continue}if(Ze(e)){let t=e.indexOf(`=`);if(t!==-1){r.push(s(e.slice(2,t),e.slice(0,t),e.slice(t+1),!0));continue}let n=e.slice(2);c(n)&&l!==void 0?(i.shift(),r.push(s(n,e,l,!1)),a++):r.push(s(n,e,void 0,void 0));continue}r.push({kind:`positional`,index:a,value:e})}return r}function tt(e,t){let n=t?.short?`'-${t.short}, --${e.name}'`:`'--${e.name}'`;if(!t)throw Xe(`ERR_PARSE_ARGS_UNKNOWN_OPTION`,`Unknown option '${e.rawName}'${e.rawName.startsWith(`--`)?``:`. To specify a positional argument starting with a '-', place it at the end of the command after '--', as in '-- "-"'`}`);if(t.type===`string`&&typeof e.value!=`string`)throw Xe(`ERR_PARSE_ARGS_INVALID_OPTION_VALUE`,`Option ${n.replace(/'$/,` <value>'`)} argument missing`);if(t.type===`boolean`&&e.value!==void 0)throw Xe(`ERR_PARSE_ARGS_INVALID_OPTION_VALUE`,`Option ${n} does not take an argument`);let r=e.value!==void 0&&e.value.length>1&&e.value[0]===`-`;if(t.type===`string`&&e.inlineValue===!1&&r)throw Xe(`ERR_PARSE_ARGS_INVALID_OPTION_VALUE`,`Option '${e.rawName}' argument is ambiguous.\nDid you forget to specify the option argument for '${e.rawName}'?\nTo specify an option argument starting with a dash use '${e.rawName.startsWith(`--`)?`${e.rawName}=-XYZ`:`--${e.name}=-XYZ' or '${e.rawName}-XYZ`}'.`)}function nt(e,t,n,r){if(!r){e[t]=n;return}let i=e[t];e[t]=Array.isArray(i)?[...i,n]:[n]}function rt(e,t,n){let r=e.slice(3);return n&&e.startsWith(`no-`)?{name:r,negated:!0}:{name:e,negated:!1}}function it(e,t,n,r,i){let{name:a,negated:o}=rt(t.name,n,i);t.name=a;let s=n[a];r&&tt(t,o&&s?.type!==`boolean`?void 0:s),nt(e,a,o?!1:t.value??!0,s?.multiple===!0)}function at(e={},t=()=>[]){let n=e.args??t(),r=e.options??{},i=e.strict??!0,a=e.allowPositionals??!i,o=e.allowNegative??!1,s=e=>Object.keys(r).find(t=>r[t].short===e)??e,c=Object.create(null),l=[],u=et(n,r,s);for(let e of u){if(e.kind===`positional`){if(i&&!a)throw Xe(`ERR_PARSE_ARGS_UNEXPECTED_POSITIONAL`,`Unexpected argument '${e.value}'. This command does not take positional arguments`);l.push(e.value);continue}e.kind===`option`&&it(c,e,r,i,o)}for(let[e,t]of Object.entries(r))t.default!==void 0&&c[e]===void 0&&(c[e]=t.default);return e.tokens?{values:c,positionals:l,tokens:u}:{values:c,positionals:l}}const ot=Symbol.for(`nodejs.util.inspect.custom`),st=Symbol.for(`nodejs.util.promisify.custom`);function ct(e){return`'${e.replace(/\\/g,`\\\\`).replace(/'/g,`\\'`).replace(/\n/g,`\\n`)}'`}function lt(e){if(e===null)return`null`;let t=typeof e;if(t===`string`)return ct(e);if(t===`number`)return Object.is(e,-0)?`-0`:String(e);if(t===`bigint`)return`${String(e)}n`;if(t===`boolean`||t===`undefined`)return String(e);if(t===`symbol`)return e.toString();if(t===`function`){let t=e.name;return t?`[Function: ${t}]`:`[Function (anonymous)]`}return null}function ut(e){return e instanceof RegExp?e.toString():e instanceof Date?Number.isNaN(e.getTime())?`Invalid Date`:e.toISOString():e instanceof Error?e.stack||`${e.name}: ${e.message}`:null}function dt(e,t,n){if(Array.isArray(e))return e.length===0?`[]`:`[ ${e.map(e=>ft(e,t+1,n)).join(`, `)} ]`;if(e instanceof Map){let r=[...e].map(([e,r])=>`${ft(e,t+1,n)} => ${ft(r,t+1,n)}`);return`Map(${e.size}) {${r.length?` ${r.join(`, `)} `:``}}`}if(e instanceof Set){let r=[...e].map(e=>ft(e,t+1,n));return`Set(${e.size}) {${r.length?` ${r.join(`, `)} `:``}}`}let r=Object.keys(e),i=e.constructor?e.constructor.name:``,a=i&&i!==`Object`?`${i} `:``;return r.length===0?`${a}{}`:`${a}{ ${r.map(r=>`${/^[A-Za-z_$][A-Za-z0-9_$]*$/.test(r)?r:ct(r)}: ${ft(e[r],t+1,n)}`).join(`, `)} }`}function ft(e,t,n){let r=lt(e);if(r!==null)return r;let i=e,a=ut(i);if(a!==null)return a;let o=i[ot];if(typeof o==`function`)try{return String(o.call(i,n.maxDepth,n.opts))}catch{}if(n.seen.has(e))return`[Circular *1]`;if(n.maxDepth!==null&&t>n.maxDepth)return Array.isArray(e)?`[Array]`:`[Object]`;n.seen.add(e);try{return dt(i,t,n)}finally{n.seen.delete(e)}}function pt(e,t={}){let n=t.depth===void 0?2:t.depth;return ft(e,0,{seen:new Set,maxDepth:n,opts:t})}function mt(e,t,n,r){if(e===`%%`)return`%`;if(n.i>=t.length)return e;let i=t[n.i];switch(e){case`%s`:return n.i++,typeof i==`string`?i:typeof i==`bigint`?`${String(i)}n`:i==null||typeof i==`number`||typeof i==`boolean`?String(i):pt(i,{depth:r.depth===void 0?2:r.depth});case`%d`:return n.i++,typeof i==`bigint`?`${String(i)}n`:Number.isNaN(Number(i))?`NaN`:String(Number(i));case`%i`:return n.i++,typeof i==`bigint`?`${String(i)}n`:String(Number.parseInt(i,10));case`%f`:return n.i++,String(typeof i==`bigint`?i:Number.parseFloat(i));case`%j`:n.i++;try{return JSON.stringify(i)??`undefined`}catch{return`[Circular]`}case`%o`:return n.i++,pt(i,{depth:4});case`%O`:return n.i++,pt(i,{depth:null});case`%c`:return n.i++,``;default:return e}}function ht(e,...t){let n=t[0];if(typeof n!=`string`)return t.map(e=>typeof e==`string`?e:pt(e)).join(` `);let r={i:1},i=n.replace(/%[sdifjoOc%]/g,n=>mt(n,t,r,e));for(;r.i<t.length;r.i++){let e=t[r.i];i+=` ${typeof e==`string`?e:pt(e)}`}return i}function gt(...e){return ht({},...e)}function _t(e,t){if(e==null)throw TypeError(`The constructor to "inherits" must not be null or undefined`);if(t==null)throw TypeError(`The super constructor to "inherits" must not be null or undefined`);if(t.prototype===void 0)throw TypeError(`The super constructor to "inherits" must have a prototype`);e.super_=t,Object.setPrototypeOf(e.prototype,t.prototype)}function vt(e){if(typeof e!=`function`)throw TypeError(`The "original" argument must be of type function`);let t=e[st];if(t){if(typeof t!=`function`)throw TypeError(`The [util.promisify.custom] property must be of type function`);return t}function n(...t){return new Promise((n,r)=>{e.call(this,...t,(e,...t)=>{if(e){r(e);return}n(t.length>1?t:t[0])})})}return Object.setPrototypeOf(n,Object.getPrototypeOf(e)),Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)),n}function yt(e){return function(t,n,r){if(typeof t!=`function`)throw TypeError(`The "fn" argument must be of type function`);let i=!1;function a(...a){return i||(i=!0,e(r?`[${r}] DeprecationWarning: ${n}`:`DeprecationWarning: ${n}`)),new.target?Reflect.construct(t,a,new.target):t.apply(this,a)}return Object.setPrototypeOf(a,Object.getPrototypeOf(t)),t.prototype&&(a.prototype=t.prototype),a}}const bt=pt;bt.custom=ot;const xt=vt;xt.custom=st;function St(e,t=()=>[]){return{parseArgs:e=>at(e,t),format:gt,formatWithOptions:ht,inspect:bt,inherits:_t,promisify:xt,deprecate:yt(e)}}const Ct=St(()=>{});let wt=1;function Tt(e){if(typeof e==`string`)return e;if(ArrayBuffer.isView(e)){let t=e;return new TextDecoder().decode(new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}return e==null?``:String(e)}function Et(e,t,n){return Object.assign(TypeError(`The "${e}" argument must be of type ${t}. Received ${n===null?`null`:Array.isArray(n)?`array`:typeof n}`),{code:`ERR_INVALID_ARG_TYPE`})}function Dt(e){if(e===void 0)return;if(typeof e!=`object`||!e||Array.isArray(e))throw Et(`options.env`,`object`,e);let t={};for(let[n,r]of Object.entries(e))if(r!==void 0){if(typeof r!=`string`)throw Et(`options.env[${n}]`,`string`,r);t[n]=r}return t}function Ot(e){if(e!==void 0){if(typeof e==`string`)return e;if(typeof e==`object`&&e&&typeof e.href==`string`)try{return c.fileURLToPath(e.href)}catch{throw Et(`options.cwd`,`string or an instance of URL (file:)`,e)}throw Et(`options.cwd`,`string or an instance of URL`,e)}}function kt(e,t){return t===void 0||t===`utf8`||t===`utf-8`?e:t===`buffer`||t===null?We(e):We(e).toString(t)}function At(e,t){if(e.length===0)return kt(``,t);if(typeof e[0]==`string`)return e.join(``);let n=globalThis.Buffer;return n?n.concat(e):e[0]}function jt(e,t,n){t.length>0&&e.emit(`data`,kt(t,n)),e.readable=!1,e.emit(`end`)}function Mt(e){let t=e=>{typeof e==`function`&&queueMicrotask(e)};return{writable:!0,write(n,r,i){return e.stdin.write(Tt(n)),t(typeof r==`function`?r:i),!0},end(n,r,i){n!==void 0&&typeof n!=`function`&&e.stdin.write(Tt(n)),e.stdin.end(),this.writable=!1,t(typeof n==`function`?n:typeof r==`function`?r:i)}}}var Nt=class extends be{stdout;stderr;stdin;pid;exitCode=null;signalCode=null;killed=!1;spawnfile;spawnargs;handle;constructor(e,t,n,r){super(),this.handle=e,this.pid=wt++,this.spawnfile=n,this.spawnargs=r,this.stdout=new Ke,this.stderr=new Ke,this.stdin=Mt(e),e.done.then(e=>this.finish(e,t),e=>this.emit(`error`,e instanceof Error?e:Error(String(e))))}finish(e,t){jt(this.stdout,e.stdout,t),jt(this.stderr,e.stderr,t),this.exitCode=e.exitCode;let n=this.killed?null:e.exitCode,r=this.killed?this.signalCode:null;this.emit(`exit`,n,r),this.emit(`close`,n,r)}kill(e=`SIGTERM`){return this.killed=!0,this.signalCode=e,this.handle.kill(e).catch(()=>{}),!0}};function Pt(e){let t=(t,n,r)=>{if(!e)throw Error(`child_process.${t} is not available in this browser realm (no synchronous bridge — the page has no controlling Service Worker). Use the async form instead: await promisify(${t.replace(/Sync$/,``)})(…).`);return e.run(n,r)},n=e=>{let t=Ot(e.cwd),n=Dt(e.env);return{...e.input===void 0?{}:{input:Tt(e.input)},...e.timeout===void 0?{}:{timeout:e.timeout},...t===void 0?{}:{cwd:t},...n===void 0?{}:{env:n}}},r=(e,r,i,a)=>{let o=a.encoding===void 0?`buffer`:a.encoding,s=t(e,r,n(a)),c=kt(s.stdout,o),l=kt(s.stderr,o);if(s.exitCode===0)return c;throw Object.assign(Error(`Command failed: ${i}\n${s.stderr}`),{status:s.exitCode,signal:null,stdout:c,stderr:l,output:[null,c,l],pid:wt++})},i=(e,t)=>({args:Array.isArray(e)?e:[],options:(Array.isArray(e)?t:e)??{}});return{execSync:(e,t={})=>r(`execSync`,e,e,t),execFileSync:(e,t,n)=>{let{args:a,options:o}=i(t,n),s=[e,...a];return r(`execFileSync`,s,s.join(` `),o)},spawnSync:(e,r,a)=>{let{args:o,options:s}=i(r,a),c=s.encoding===void 0?`buffer`:s.encoding,l=wt++,u=s.shell?`${e}${o.length?` ${o.join(` `)}`:``}`:[e,...o],d;try{d=t(`spawnSync`,u,n(s))}catch(e){if(e instanceof TypeError)throw e;let t=kt(``,c);return{pid:l,status:null,signal:null,stdout:t,stderr:t,output:[null,t,t],error:e instanceof Error?e:Error(String(e))}}let f=kt(d.stdout,c),p=kt(d.stderr,c);return{pid:l,status:d.exitCode,signal:null,stdout:f,stderr:p,output:[null,f,p]}}}}function Ft(e,t){let n=(t,n,r,i,a)=>{let o=Ot(n.cwd),s=Dt(n.env),c={...o===void 0?{}:{cwd:o},...s===void 0?{}:{env:s}},l=e.start(t,c),u=new Nt(l,r,i,a);return n.input!==void 0&&u.stdin.write(Tt(n.input)),queueMicrotask(()=>l.stdin.end()),u},r=(e,t,n,r)=>{if(typeof r!=`function`)return;let i=[],a=[];e.stdout.on(`data`,e=>i.push(e)),e.stderr.on(`data`,e=>a.push(e)),e.once(`error`,e=>r(e,At(i,t),At(a,t))),e.once(`close`,(o,s)=>{let c=At(i,t),l=At(a,t);if(o===0){r(null,c,l);return}r(Object.assign(Error(`Command failed: ${n}\n${Tt(l)}`),{code:o===null?void 0:o,killed:e.killed,signal:s??null,cmd:n}),c,l)})},i=(e,t,i)=>{let a=typeof t==`function`?t:i,o=t&&typeof t==`object`?t:{},s=o.encoding===void 0?`utf8`:o.encoding,c=n(e,o,s,e,[]);return r(c,s,e,a),c},a=(e,t,i,a)=>{let o=[],s={},c;Array.isArray(t)?(o=t,typeof i==`function`?c=i:(s=i??{},c=typeof a==`function`?a:void 0)):typeof t==`function`?c=t:t&&typeof t==`object`&&(s=t,c=typeof i==`function`?i:void 0);let l=s.encoding===void 0?`utf8`:s.encoding,u=[e,...o],d=n(u,s,l,e,o);return r(d,l,u.join(` `),c),d},o=(e,t,r)=>{let i=[],a={};Array.isArray(t)?(i=t,a=r??{}):t&&typeof t==`object`&&(a=t);let o=a.encoding===void 0?`buffer`:a.encoding,s=a.shell?`${e}${i.length?` ${i.join(` `)}`:``}`:[e,...i];return n(s,a,o,e,i)},s=(e,t)=>new Promise((n,r)=>{i(e,t,(e,t,i)=>{if(e){r(Object.assign(e,{stdout:t,stderr:i}));return}n({stdout:t,stderr:i})})}),c=(e,t,n)=>new Promise((r,i)=>{a(e,Array.isArray(t)?t:[],Array.isArray(t)?n:t,(e,t,n)=>{if(e){i(Object.assign(e,{stdout:t,stderr:n}));return}r({stdout:t,stderr:n})})}),l=e=>()=>{throw Error(`child_process.${e} is not available in the browser realm`)},u=Pt(t),d=(e,t)=>{Object.defineProperty(e,st,{value:t,enumerable:!1,configurable:!0})};return d(i,s),d(a,c),{exec:i,execFile:a,spawn:o,execSync:u.execSync,spawnSync:u.spawnSync,execFileSync:u.execFileSync,fork:l(`fork`),ChildProcess:Nt}}function It(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var Lt={exports:{}};
|
|
12
|
+
`)?t:`${t}\n`),e.exit(0),Error(`unreachable`)}}}const Ae={reset:`\x1B[0m`,green:`\x1B[32m`,red:`\x1B[31m`,yellow:`\x1B[33m`,gray:`\x1B[90m`,bold:`\x1B[1m`,cyan:`\x1B[36m`,dim:`\x1B[2m`};function je(e){let t=e.isTTY&&!e.noColor,n=e=>n=>t?`${e}${n}${Ae.reset}`:String(n);return{enabled:t,green:n(Ae.green),red:n(Ae.red),yellow:n(Ae.yellow),gray:n(Ae.gray),bold:n(Ae.bold),cyan:n(Ae.cyan),dim:n(Ae.dim)}}const Me=/\u001b\[[0-9;]*m/g;function Ne(e){return e.replace(Me,``)}function Pe(e){return Ne(e).length}function Fe(e,t){let n=String(e??``);return t<=0?``:Pe(n)<=t?n:t<=1?n.slice(0,t):`${Ne(n).slice(0,t-1)}…`}function Ie(e,t){let n=String(e??``),r=Pe(n);return r===t?n:r>t?Fe(n,t):n+` `.repeat(t-r)}function Le(e,t){if(!e.length)return``;let n=Math.max(...e.map(e=>e.length)),r=[];for(let i=0;i<n;i++)if(t&&t[i]!==void 0)r[i]=t[i];else{let t=0;for(let n of e){let e=i<n.length?String(n[i]??``):``;t=Math.max(t,Pe(e))}r[i]=t}return e.map(e=>r.map((t,n)=>Ie(n<e.length?String(e[n]??``):``,t)).join(` `).replace(/\s+$/,``)).join(`
|
|
13
|
+
`)}function Re(e){return e instanceof Date?e:new Date(e)}function ze(e){return e<10?`0${e}`:String(e)}function Be(e,t=`short`){let n=Re(e);if(Number.isNaN(n.getTime()))return String(e);if(t===`iso`)return n.toISOString();if(t===`locale`)return new Intl.DateTimeFormat(void 0,{dateStyle:`medium`}).format(n);if(t===`human`){let e=Date.now()-n.getTime(),t=Math.abs(e);if(t<6e4)return e>=0?`just now`:`in a moment`;let r=(t,n)=>e>=0?`${t} ${n}${t===1?``:`s`} ago`:`in ${t} ${n}${t===1?``:`s`}`;return t<36e5?r(Math.round(t/6e4),`minute`):t<864e5?r(Math.round(t/36e5),`hour`):t<26298e5?r(Math.round(t/864e5),`day`):t<315576e5?r(Math.round(t/26298e5),`month`):r(Math.round(t/315576e5),`year`)}return`${n.getFullYear()}-${ze(n.getMonth()+1)}-${ze(n.getDate())}`}const Ve={trunc:Fe,col:Ie,table:Le,date:Be};var P=class extends Error{actual;expected;operator;generatedMessage;code;constructor(e={}){let t=!e.message;super(e.message||`${He(e.actual)} ${e.operator||`!=`} ${He(e.expected)}`),this.name=`AssertionError`,this.actual=e.actual,this.expected=e.expected,this.operator=e.operator||``,this.generatedMessage=t,this.code=`ERR_ASSERTION`}};function He(e){if(typeof e==`string`)return JSON.stringify(e);if(e==null)return String(e);if(typeof e==`object`)try{return JSON.stringify(e)}catch{return String(e)}return String(e)}function F(e,t){return e instanceof Error?e:typeof e==`string`?new P({message:e}):t()}function Ue(e,t,n,r){if(e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(!Ge(e[i],t[i],n,r))return!1;return!0}function We(e,t,n,r){let i=Object.keys(e);if(i.length!==Object.keys(t).length)return!1;for(let a of i)if(!Object.prototype.hasOwnProperty.call(t,a)||!Ge(Reflect.get(e,a),Reflect.get(t,a),n,r))return!1;return!0}function Ge(e,t,n,r){if((n?Object.is(e,t):e===t)||!n&&e==t)return!0;if(typeof e!=`object`||typeof t!=`object`||e===null||t===null)return!1;let i=e,a=t;return n&&Object.getPrototypeOf(i)!==Object.getPrototypeOf(a)?!1:r.get(i)===a||(r.set(i,a),Array.isArray(e)===Array.isArray(t)?Array.isArray(e)&&Array.isArray(t)?Ue(e,t,n,r):We(i,a,n,r):!1)}function Ke(e,t){try{if(e instanceof t)return!0}catch{}try{return!!t(e)}catch{return!1}}function qe(e,t){for(let[n,r]of Object.entries(t)){let t=Reflect.get(e,n);if(r instanceof RegExp){if(typeof t!=`string`||!r.test(t))return!1}else if(t!==r)return!1}return!0}function Je(e,t){if(t===void 0)return!0;if(t instanceof RegExp){let n=e instanceof Error?e.message:String(e);return t.test(n)}return typeof t==`function`?Ke(e,t):t&&typeof t==`object`?!e||typeof e!=`object`?!1:qe(e,t):!1}function Ye(e){let t=(e,t)=>{if(!e)throw F(t,()=>new P({message:`The expression evaluated to a falsy value`,actual:e,expected:!0,operator:`==`}))},n=((e,n)=>t(e,n)),r=(e,t,n)=>{if(!Object.is(e,t))throw F(n,()=>new P({actual:e,expected:t,operator:`strictEqual`}))},i=(t,n,i)=>{if(e){r(t,n,i);return}if(t!=n)throw F(i,()=>new P({actual:t,expected:n,operator:`==`}))},a=(e,t,n)=>{if(Object.is(e,t))throw F(n,()=>new P({actual:e,expected:t,operator:`notStrictEqual`}))},o=(t,n,r)=>{if(e){a(t,n,r);return}if(t==n)throw F(r,()=>new P({actual:t,expected:n,operator:`!=`}))},s=(e,t,n)=>{if(!Ge(e,t,!0,new WeakMap))throw F(n,()=>new P({actual:e,expected:t,operator:`deepStrictEqual`}))},c=(t,n,r)=>{if(e){s(t,n,r);return}if(!Ge(t,n,!1,new WeakMap))throw F(r,()=>new P({actual:t,expected:n,operator:`deepEqual`}))},l=(e,t,n)=>{if(Ge(e,t,!0,new WeakMap))throw F(n,()=>new P({actual:e,expected:t,operator:`notDeepStrictEqual`}))};return n.ok=t,n.equal=i,n.notEqual=o,n.strictEqual=r,n.notStrictEqual=a,n.deepEqual=c,n.deepStrictEqual=s,n.notDeepEqual=(t,n,r)=>{if(e){l(t,n,r);return}if(Ge(t,n,!1,new WeakMap))throw F(r,()=>new P({actual:t,expected:n,operator:`notDeepEqual`}))},n.notDeepStrictEqual=l,n.throws=(e,t,n)=>{let r,i=!1;try{e()}catch(e){r=e,i=!0}if(!i)throw F(typeof t==`string`?t:n,()=>new P({message:`Missing expected exception`,operator:`throws`}));if(!(typeof t==`string`||t instanceof Error)&&!Je(r,t))throw F(n,()=>new P({message:`Got unwanted exception`,actual:r,operator:`throws`}))},n.doesNotThrow=(e,t)=>{try{e()}catch(e){throw F(t,()=>new P({message:`Got unwanted exception`,actual:e,operator:`doesNotThrow`}))}},n.fail=e=>{throw F(e,()=>new P({message:`Failed`,operator:`fail`}))},n.AssertionError=P,n}const Xe=Ye(!0);Xe.strict=Xe;const Ze=Ye(!1);Ze.strict=Xe;function Qe(e,t){let n=globalThis.Buffer;if(!n)throw Error(`crypto.createHash: Buffer is unavailable in this environment`);return t?n.from(e,t):n.from(e)}var $e=class{_events=new Map;closeScheduled=!1;writable=!0;readable=!0;on(e,t){let n=this._events.get(e);return n?n.push(t):this._events.set(e,[t]),this}once(e,t){let n=(...r)=>{this.off(e,n),t(...r)};return this.on(e,n)}off(e,t){let n=this._events.get(e);if(n){let e=n.indexOf(t);e!==-1&&n.splice(e,1)}return this}emit(e,...t){let n=this._events.get(e);if(!n||n.length===0)return!1;for(let e of[...n])e(...t);return!0}pipe(e){return this.on(`data`,t=>e.write(t)),this.once(`end`,()=>e.end()),e}closeOnDestroy(){return this.closeScheduled?this:(this.closeScheduled=!0,queueMicrotask(()=>this.emit(`close`)),this)}removeListener(e,t){return this.off(e,t)}removeAllListeners(){return this._events.clear(),this}},et=class extends $e{read(){return null}destroy(){return this.closeOnDestroy()}},tt=class extends $e{write(e,t,n){return n&&queueMicrotask(n),!0}end(e){return e&&queueMicrotask(e),this}destroy(){return this.closeOnDestroy()}},nt=class extends $e{write(e,t,n){return n&&queueMicrotask(n),!0}end(e){return e&&queueMicrotask(e),this}read(){return null}destroy(){return this.closeOnDestroy()}};const rt={Readable:et,Writable:tt,Transform:nt,PassThrough:class extends nt{},Stream:$e};function it(e,t){return Object.assign(TypeError(t),{code:e})}const at=e=>e.startsWith(`--`)&&e.length>2,ot=e=>/^-[^-]/.test(e);function st(e,t,n){let r=[];for(let i=1;i<e.length;i++)if(t[n(e[i])]?.type!==`string`||i===e.length-1)r.push(`-${e[i]}`);else{r.push(`-${e.slice(i)}`);break}return r}function ct(e,t,n){let r=[],i=[...e],a=-1,o=0,s=(e,t,n,r)=>({kind:`option`,name:e,rawName:t,index:a,value:n,inlineValue:r}),c=e=>t[e]?.type===`string`;for(;i.length>0;){let e=i.shift(),l=i[0];if(o>0?o--:a++,e===`--`){r.push({kind:`option-terminator`,index:a});for(let e of i)r.push({kind:`positional`,index:++a,value:e});break}if(ot(e)&&e.length===2){let t=n(e[1]);c(t)&&l!==void 0?(i.shift(),r.push(s(t,e,l,!1)),a++):r.push(s(t,e,void 0,void 0));continue}if(ot(e)){let a=n(e[1]);if(c(a))r.push(s(a,`-${e[1]}`,e.slice(2),!0));else{let r=st(e,t,n);i.unshift(...r),o=r.length}continue}if(at(e)){let t=e.indexOf(`=`);if(t!==-1){r.push(s(e.slice(2,t),e.slice(0,t),e.slice(t+1),!0));continue}let n=e.slice(2);c(n)&&l!==void 0?(i.shift(),r.push(s(n,e,l,!1)),a++):r.push(s(n,e,void 0,void 0));continue}r.push({kind:`positional`,index:a,value:e})}return r}function lt(e,t){let n=t?.short?`'-${t.short}, --${e.name}'`:`'--${e.name}'`;if(!t)throw it(`ERR_PARSE_ARGS_UNKNOWN_OPTION`,`Unknown option '${e.rawName}'${e.rawName.startsWith(`--`)?``:`. To specify a positional argument starting with a '-', place it at the end of the command after '--', as in '-- "-"'`}`);if(t.type===`string`&&typeof e.value!=`string`)throw it(`ERR_PARSE_ARGS_INVALID_OPTION_VALUE`,`Option ${n.replace(/'$/,` <value>'`)} argument missing`);if(t.type===`boolean`&&e.value!==void 0)throw it(`ERR_PARSE_ARGS_INVALID_OPTION_VALUE`,`Option ${n} does not take an argument`);let r=e.value!==void 0&&e.value.length>1&&e.value[0]===`-`;if(t.type===`string`&&e.inlineValue===!1&&r)throw it(`ERR_PARSE_ARGS_INVALID_OPTION_VALUE`,`Option '${e.rawName}' argument is ambiguous.\nDid you forget to specify the option argument for '${e.rawName}'?\nTo specify an option argument starting with a dash use '${e.rawName.startsWith(`--`)?`${e.rawName}=-XYZ`:`--${e.name}=-XYZ' or '${e.rawName}-XYZ`}'.`)}function ut(e,t,n,r){if(!r){e[t]=n;return}let i=e[t];e[t]=Array.isArray(i)?[...i,n]:[n]}function dt(e,t,n){let r=e.slice(3);return n&&e.startsWith(`no-`)?{name:r,negated:!0}:{name:e,negated:!1}}function ft(e,t,n,r,i){let{name:a,negated:o}=dt(t.name,n,i);t.name=a;let s=n[a];r&<(t,o&&s?.type!==`boolean`?void 0:s),ut(e,a,o?!1:t.value??!0,s?.multiple===!0)}function pt(e={},t=()=>[]){let n=e.args??t(),r=e.options??{},i=e.strict??!0,a=e.allowPositionals??!i,o=e.allowNegative??!1,s=e=>Object.keys(r).find(t=>r[t].short===e)??e,c=Object.create(null),l=[],u=ct(n,r,s);for(let e of u){if(e.kind===`positional`){if(i&&!a)throw it(`ERR_PARSE_ARGS_UNEXPECTED_POSITIONAL`,`Unexpected argument '${e.value}'. This command does not take positional arguments`);l.push(e.value);continue}e.kind===`option`&&ft(c,e,r,i,o)}for(let[e,t]of Object.entries(r))t.default!==void 0&&c[e]===void 0&&(c[e]=t.default);return e.tokens?{values:c,positionals:l,tokens:u}:{values:c,positionals:l}}const mt=Symbol.for(`nodejs.util.inspect.custom`),ht=Symbol.for(`nodejs.util.promisify.custom`);function gt(e){return`'${e.replace(/\\/g,`\\\\`).replace(/'/g,`\\'`).replace(/\n/g,`\\n`)}'`}function _t(e){if(e===null)return`null`;let t=typeof e;if(t===`string`)return gt(e);if(t===`number`)return Object.is(e,-0)?`-0`:String(e);if(t===`bigint`)return`${String(e)}n`;if(t===`boolean`||t===`undefined`)return String(e);if(t===`symbol`)return e.toString();if(t===`function`){let t=e.name;return t?`[Function: ${t}]`:`[Function (anonymous)]`}return null}function vt(e){return e instanceof RegExp?e.toString():e instanceof Date?Number.isNaN(e.getTime())?`Invalid Date`:e.toISOString():e instanceof Error?e.stack||`${e.name}: ${e.message}`:null}function yt(e,t,n){if(Array.isArray(e))return e.length===0?`[]`:`[ ${e.map(e=>bt(e,t+1,n)).join(`, `)} ]`;if(e instanceof Map){let r=[...e].map(([e,r])=>`${bt(e,t+1,n)} => ${bt(r,t+1,n)}`);return`Map(${e.size}) {${r.length?` ${r.join(`, `)} `:``}}`}if(e instanceof Set){let r=[...e].map(e=>bt(e,t+1,n));return`Set(${e.size}) {${r.length?` ${r.join(`, `)} `:``}}`}let r=Object.keys(e),i=e.constructor?e.constructor.name:``,a=i&&i!==`Object`?`${i} `:``;return r.length===0?`${a}{}`:`${a}{ ${r.map(r=>`${/^[A-Za-z_$][A-Za-z0-9_$]*$/.test(r)?r:gt(r)}: ${bt(e[r],t+1,n)}`).join(`, `)} }`}function bt(e,t,n){let r=_t(e);if(r!==null)return r;let i=e,a=vt(i);if(a!==null)return a;let o=i[mt];if(typeof o==`function`)try{return String(o.call(i,n.maxDepth,n.opts))}catch{}if(n.seen.has(e))return`[Circular *1]`;if(n.maxDepth!==null&&t>n.maxDepth)return Array.isArray(e)?`[Array]`:`[Object]`;n.seen.add(e);try{return yt(i,t,n)}finally{n.seen.delete(e)}}function xt(e,t={}){let n=t.depth===void 0?2:t.depth;return bt(e,0,{seen:new Set,maxDepth:n,opts:t})}function St(e,t,n,r){if(e===`%%`)return`%`;if(n.i>=t.length)return e;let i=t[n.i];switch(e){case`%s`:return n.i++,typeof i==`string`?i:typeof i==`bigint`?`${String(i)}n`:i==null||typeof i==`number`||typeof i==`boolean`?String(i):xt(i,{depth:r.depth===void 0?2:r.depth});case`%d`:return n.i++,typeof i==`bigint`?`${String(i)}n`:Number.isNaN(Number(i))?`NaN`:String(Number(i));case`%i`:return n.i++,typeof i==`bigint`?`${String(i)}n`:String(Number.parseInt(i,10));case`%f`:return n.i++,String(typeof i==`bigint`?i:Number.parseFloat(i));case`%j`:n.i++;try{return JSON.stringify(i)??`undefined`}catch{return`[Circular]`}case`%o`:return n.i++,xt(i,{depth:4});case`%O`:return n.i++,xt(i,{depth:null});case`%c`:return n.i++,``;default:return e}}function Ct(e,...t){let n=t[0];if(typeof n!=`string`)return t.map(e=>typeof e==`string`?e:xt(e)).join(` `);let r={i:1},i=n.replace(/%[sdifjoOc%]/g,n=>St(n,t,r,e));for(;r.i<t.length;r.i++){let e=t[r.i];i+=` ${typeof e==`string`?e:xt(e)}`}return i}function wt(...e){return Ct({},...e)}function Tt(e,t){if(e==null)throw TypeError(`The constructor to "inherits" must not be null or undefined`);if(t==null)throw TypeError(`The super constructor to "inherits" must not be null or undefined`);if(t.prototype===void 0)throw TypeError(`The super constructor to "inherits" must have a prototype`);e.super_=t,Object.setPrototypeOf(e.prototype,t.prototype)}function Et(e){if(typeof e!=`function`)throw TypeError(`The "original" argument must be of type function`);let t=e[ht];if(t){if(typeof t!=`function`)throw TypeError(`The [util.promisify.custom] property must be of type function`);return t}function n(...t){return new Promise((n,r)=>{e.call(this,...t,(e,...t)=>{if(e){r(e);return}n(t.length>1?t:t[0])})})}return Object.setPrototypeOf(n,Object.getPrototypeOf(e)),Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)),n}function Dt(e){return function(t,n,r){if(typeof t!=`function`)throw TypeError(`The "fn" argument must be of type function`);let i=!1;function a(...a){return i||(i=!0,e(r?`[${r}] DeprecationWarning: ${n}`:`DeprecationWarning: ${n}`)),new.target?Reflect.construct(t,a,new.target):t.apply(this,a)}return Object.setPrototypeOf(a,Object.getPrototypeOf(t)),t.prototype&&(a.prototype=t.prototype),a}}const Ot=xt;Ot.custom=mt;const kt=Et;kt.custom=ht;function At(e,t=()=>[]){return{parseArgs:e=>pt(e,t),format:wt,formatWithOptions:Ct,inspect:Ot,inherits:Tt,promisify:kt,deprecate:Dt(e)}}const jt=At(()=>{});let Mt=1;function Nt(e){if(typeof e==`string`)return e;if(ArrayBuffer.isView(e)){let t=e;return new TextDecoder().decode(new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}return e==null?``:String(e)}function Pt(e,t,n){return Object.assign(TypeError(`The "${e}" argument must be of type ${t}. Received ${n===null?`null`:Array.isArray(n)?`array`:typeof n}`),{code:`ERR_INVALID_ARG_TYPE`})}function Ft(e){if(e===void 0)return;if(typeof e!=`object`||!e||Array.isArray(e))throw Pt(`options.env`,`object`,e);let t={};for(let[n,r]of Object.entries(e))if(r!==void 0){if(typeof r!=`string`)throw Pt(`options.env[${n}]`,`string`,r);t[n]=r}return t}function It(e){if(e!==void 0){if(typeof e==`string`)return e;if(typeof e==`object`&&e&&typeof e.href==`string`)try{return c.fileURLToPath(e.href)}catch{throw Pt(`options.cwd`,`string or an instance of URL (file:)`,e)}throw Pt(`options.cwd`,`string or an instance of URL`,e)}}function Lt(e,t){return t===void 0||t===`utf8`||t===`utf-8`?e:t===`buffer`||t===null?Qe(e):Qe(e).toString(t)}function Rt(e,t){if(e.length===0)return Lt(``,t);if(typeof e[0]==`string`)return e.join(``);let n=globalThis.Buffer;return n?n.concat(e):e[0]}function zt(e,t,n){t.length>0&&e.emit(`data`,Lt(t,n)),e.readable=!1,e.emit(`end`)}function Bt(e){let t=e=>{typeof e==`function`&&queueMicrotask(e)};return{writable:!0,write(n,r,i){return e.stdin.write(Nt(n)),t(typeof r==`function`?r:i),!0},end(n,r,i){n!==void 0&&typeof n!=`function`&&e.stdin.write(Nt(n)),e.stdin.end(),this.writable=!1,t(typeof n==`function`?n:typeof r==`function`?r:i)}}}var Vt=class extends De{stdout;stderr;stdin;pid;exitCode=null;signalCode=null;killed=!1;spawnfile;spawnargs;handle;constructor(e,t,n,r){super(),this.handle=e,this.pid=Mt++,this.spawnfile=n,this.spawnargs=r,this.stdout=new et,this.stderr=new et,this.stdin=Bt(e),e.done.then(e=>this.finish(e,t),e=>this.emit(`error`,e instanceof Error?e:Error(String(e))))}finish(e,t){zt(this.stdout,e.stdout,t),zt(this.stderr,e.stderr,t),this.exitCode=e.exitCode;let n=this.killed?null:e.exitCode,r=this.killed?this.signalCode:null;this.emit(`exit`,n,r),this.emit(`close`,n,r)}kill(e=`SIGTERM`){return this.killed=!0,this.signalCode=e,this.handle.kill(e).catch(()=>{}),!0}};function Ht(e){let t=(t,n,r)=>{if(!e)throw Error(`child_process.${t} is not available in this browser realm (no synchronous bridge — the page has no controlling Service Worker). Use the async form instead: await promisify(${t.replace(/Sync$/,``)})(…).`);return e.run(n,r)},n=e=>{let t=It(e.cwd),n=Ft(e.env);return{...e.input===void 0?{}:{input:Nt(e.input)},...e.timeout===void 0?{}:{timeout:e.timeout},...t===void 0?{}:{cwd:t},...n===void 0?{}:{env:n}}},r=(e,r,i,a)=>{let o=a.encoding===void 0?`buffer`:a.encoding,s=t(e,r,n(a)),c=Lt(s.stdout,o),l=Lt(s.stderr,o);if(s.exitCode===0)return c;throw Object.assign(Error(`Command failed: ${i}\n${s.stderr}`),{status:s.exitCode,signal:null,stdout:c,stderr:l,output:[null,c,l],pid:Mt++})},i=(e,t)=>({args:Array.isArray(e)?e:[],options:(Array.isArray(e)?t:e)??{}});return{execSync:(e,t={})=>r(`execSync`,e,e,t),execFileSync:(e,t,n)=>{let{args:a,options:o}=i(t,n),s=[e,...a];return r(`execFileSync`,s,s.join(` `),o)},spawnSync:(e,r,a)=>{let{args:o,options:s}=i(r,a),c=s.encoding===void 0?`buffer`:s.encoding,l=Mt++,u=s.shell?`${e}${o.length?` ${o.join(` `)}`:``}`:[e,...o],d;try{d=t(`spawnSync`,u,n(s))}catch(e){if(e instanceof TypeError)throw e;let t=Lt(``,c);return{pid:l,status:null,signal:null,stdout:t,stderr:t,output:[null,t,t],error:e instanceof Error?e:Error(String(e))}}let f=Lt(d.stdout,c),p=Lt(d.stderr,c);return{pid:l,status:d.exitCode,signal:null,stdout:f,stderr:p,output:[null,f,p]}}}}function Ut(e,t){let n=(t,n,r,i,a)=>{let o=It(n.cwd),s=Ft(n.env),c={...o===void 0?{}:{cwd:o},...s===void 0?{}:{env:s}},l=e.start(t,c),u=new Vt(l,r,i,a);return n.input!==void 0&&u.stdin.write(Nt(n.input)),queueMicrotask(()=>l.stdin.end()),u},r=(e,t,n,r)=>{if(typeof r!=`function`)return;let i=[],a=[];e.stdout.on(`data`,e=>i.push(e)),e.stderr.on(`data`,e=>a.push(e)),e.once(`error`,e=>r(e,Rt(i,t),Rt(a,t))),e.once(`close`,(o,s)=>{let c=Rt(i,t),l=Rt(a,t);if(o===0){r(null,c,l);return}r(Object.assign(Error(`Command failed: ${n}\n${Nt(l)}`),{code:o===null?void 0:o,killed:e.killed,signal:s??null,cmd:n}),c,l)})},i=(e,t,i)=>{let a=typeof t==`function`?t:i,o=t&&typeof t==`object`?t:{},s=o.encoding===void 0?`utf8`:o.encoding,c=n(e,o,s,e,[]);return r(c,s,e,a),c},a=(e,t,i,a)=>{let o=[],s={},c;Array.isArray(t)?(o=t,typeof i==`function`?c=i:(s=i??{},c=typeof a==`function`?a:void 0)):typeof t==`function`?c=t:t&&typeof t==`object`&&(s=t,c=typeof i==`function`?i:void 0);let l=s.encoding===void 0?`utf8`:s.encoding,u=[e,...o],d=n(u,s,l,e,o);return r(d,l,u.join(` `),c),d},o=(e,t,r)=>{let i=[],a={};Array.isArray(t)?(i=t,a=r??{}):t&&typeof t==`object`&&(a=t);let o=a.encoding===void 0?`buffer`:a.encoding,s=a.shell?`${e}${i.length?` ${i.join(` `)}`:``}`:[e,...i];return n(s,a,o,e,i)},s=(e,t)=>new Promise((n,r)=>{i(e,t,(e,t,i)=>{if(e){r(Object.assign(e,{stdout:t,stderr:i}));return}n({stdout:t,stderr:i})})}),c=(e,t,n)=>new Promise((r,i)=>{a(e,Array.isArray(t)?t:[],Array.isArray(t)?n:t,(e,t,n)=>{if(e){i(Object.assign(e,{stdout:t,stderr:n}));return}r({stdout:t,stderr:n})})}),l=e=>()=>{throw Error(`child_process.${e} is not available in the browser realm`)},u=Ht(t),d=(e,t)=>{Object.defineProperty(e,ht,{value:t,enumerable:!1,configurable:!0})};return d(i,s),d(a,c),{exec:i,execFile:a,spawn:o,execSync:u.execSync,spawnSync:u.spawnSync,execFileSync:u.execFileSync,fork:l(`fork`),ChildProcess:Vt}}function Wt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var Gt={exports:{}};
|
|
14
14
|
/**
|
|
15
15
|
* [js-md5]{@link https://github.com/emn178/js-md5}
|
|
16
16
|
*
|
|
@@ -20,7 +20,7 @@ let r=t(),i=n(),a=typeof Symbol==`function`&&typeof Symbol.for==`function`?Symbo
|
|
|
20
20
|
* @copyright Chen, Yi-Cyuan 2014-2026
|
|
21
21
|
* @license MIT
|
|
22
22
|
*/
|
|
23
|
-
(function(e){(function(){var t=`input is invalid type`,n=typeof window==`object`,r=n?window:{};r.JS_MD5_NO_WINDOW&&(n=!1),typeof WorkerGlobalScope<`u`&&typeof self<`u`&&self instanceof WorkerGlobalScope&&(r=self);var i=!r.JS_MD5_NO_COMMON_JS&&e.exports,a=!r.JS_MD5_NO_ARRAY_BUFFER&&typeof ArrayBuffer<`u`,o=`0123456789abcdef`.split(``),s=[128,32768,8388608,-2147483648],c=[0,8,16,24],l=[`hex`,`array`,`digest`,`arrayBuffer`];l.push(`buffer`),l.push(`base64`);var u=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`.split(``),d=[],f;if(a){var p=new ArrayBuffer(68);f=new Uint8Array(p),d=new Uint32Array(p)}var m=Array.isArray;(r.JS_MD5_NO_NODE_JS||!m)&&(m=function(e){return Object.prototype.toString.call(e)===`[object Array]`});var h=ArrayBuffer.isView;a&&(r.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW||!h)&&(h=function(e){return typeof e==`object`&&e.buffer&&e.buffer.constructor===ArrayBuffer});var g=function(e){var n=typeof e;if(n===`string`)return[e,!0];if(n!==`object`||e===null)throw Error(t);if(a&&e.constructor===ArrayBuffer)return[new Uint8Array(e),!1];if(!m(e)&&!h(e))throw Error(t);return[e,!1]},_=function(e){return function(t){return new x(!0).update(t)[e]()}},v=function(){var e=_(`hex`);e.create=function(){return new x},e.update=function(t){return e.create().update(t)};for(var t=0;t<l.length;++t){var n=l[t];e[n]=_(n)}return e},y=function(e){return function(t,n){return new S(t,!0).update(n)[e]()}},b=function(){var e=y(`hex`);e.create=function(e){return new S(e)},e.update=function(t,n){return e.create(t).update(n)};for(var t=0;t<l.length;++t){var n=l[t];e[n]=y(n)}return e};function x(e){if(e)d[0]=d[16]=d[1]=d[2]=d[3]=d[4]=d[5]=d[6]=d[7]=d[8]=d[9]=d[10]=d[11]=d[12]=d[13]=d[14]=d[15]=0,this.blocks=d,this.buffer8=f;else if(a){var t=new ArrayBuffer(68);this.buffer8=new Uint8Array(t),this.blocks=new Uint32Array(t)}else this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.h0=this.h1=this.h2=this.h3=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0}x.prototype.update=function(e){if(this.finalized)throw Error(`finalize already called`);var t=g(e);e=t[0];for(var n=t[1],r,i=0,o,s=e.length,l=this.blocks,u=this.buffer8;i<s;){if(this.hashed&&(this.hashed=!1,l[0]=l[16],l[16]=l[1]=l[2]=l[3]=l[4]=l[5]=l[6]=l[7]=l[8]=l[9]=l[10]=l[11]=l[12]=l[13]=l[14]=l[15]=0),n){if(a)for(o=this.start;i<s&&o<64;++i)r=e.charCodeAt(i),r<128?u[o++]=r:r<2048?(u[o++]=192|r>>>6,u[o++]=128|r&63):r<55296||r>=57344?(u[o++]=224|r>>>12,u[o++]=128|r>>>6&63,u[o++]=128|r&63):(r=65536+((r&1023)<<10|e.charCodeAt(++i)&1023),u[o++]=240|r>>>18,u[o++]=128|r>>>12&63,u[o++]=128|r>>>6&63,u[o++]=128|r&63);else for(o=this.start;i<s&&o<64;++i)r=e.charCodeAt(i),r<128?l[o>>>2]|=r<<c[o++&3]:r<2048?(l[o>>>2]|=(192|r>>>6)<<c[o++&3],l[o>>>2]|=(128|r&63)<<c[o++&3]):r<55296||r>=57344?(l[o>>>2]|=(224|r>>>12)<<c[o++&3],l[o>>>2]|=(128|r>>>6&63)<<c[o++&3],l[o>>>2]|=(128|r&63)<<c[o++&3]):(r=65536+((r&1023)<<10|e.charCodeAt(++i)&1023),l[o>>>2]|=(240|r>>>18)<<c[o++&3],l[o>>>2]|=(128|r>>>12&63)<<c[o++&3],l[o>>>2]|=(128|r>>>6&63)<<c[o++&3],l[o>>>2]|=(128|r&63)<<c[o++&3])}else if(a)for(o=this.start;i<s&&o<64;++i)u[o++]=e[i];else for(o=this.start;i<s&&o<64;++i)l[o>>>2]|=e[i]<<c[o++&3];this.lastByteIndex=o,this.bytes+=o-this.start,o>=64?(this.start=o-64,this.hash(),this.hashed=!0):this.start=o}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes%=4294967296),this},x.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[t>>>2]|=s[t&3],t>=56&&(this.hashed||this.hash(),e[0]=e[16],e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.bytes<<3,e[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},x.prototype.hash=function(){var e,t,n,r,i,a,o=this.blocks;this.first?(e=o[0]-680876937,e=(e<<7|e>>>25)-271733879<<0,r=(-1732584194^e&2004318071)+o[1]-117830708,r=(r<<12|r>>>20)+e<<0,n=(-271733879^r&(e^-271733879))+o[2]-1126478375,n=(n<<17|n>>>15)+r<<0,t=(e^n&(r^e))+o[3]-1316259209,t=(t<<22|t>>>10)+n<<0):(e=this.h0,t=this.h1,n=this.h2,r=this.h3,e+=(r^t&(n^r))+o[0]-680876936,e=(e<<7|e>>>25)+t<<0,r+=(n^e&(t^n))+o[1]-389564586,r=(r<<12|r>>>20)+e<<0,n+=(t^r&(e^t))+o[2]+606105819,n=(n<<17|n>>>15)+r<<0,t+=(e^n&(r^e))+o[3]-1044525330,t=(t<<22|t>>>10)+n<<0),e+=(r^t&(n^r))+o[4]-176418897,e=(e<<7|e>>>25)+t<<0,r+=(n^e&(t^n))+o[5]+1200080426,r=(r<<12|r>>>20)+e<<0,n+=(t^r&(e^t))+o[6]-1473231341,n=(n<<17|n>>>15)+r<<0,t+=(e^n&(r^e))+o[7]-45705983,t=(t<<22|t>>>10)+n<<0,e+=(r^t&(n^r))+o[8]+1770035416,e=(e<<7|e>>>25)+t<<0,r+=(n^e&(t^n))+o[9]-1958414417,r=(r<<12|r>>>20)+e<<0,n+=(t^r&(e^t))+o[10]-42063,n=(n<<17|n>>>15)+r<<0,t+=(e^n&(r^e))+o[11]-1990404162,t=(t<<22|t>>>10)+n<<0,e+=(r^t&(n^r))+o[12]+1804603682,e=(e<<7|e>>>25)+t<<0,r+=(n^e&(t^n))+o[13]-40341101,r=(r<<12|r>>>20)+e<<0,n+=(t^r&(e^t))+o[14]-1502002290,n=(n<<17|n>>>15)+r<<0,t+=(e^n&(r^e))+o[15]+1236535329,t=(t<<22|t>>>10)+n<<0,e+=(n^r&(t^n))+o[1]-165796510,e=(e<<5|e>>>27)+t<<0,r+=(t^n&(e^t))+o[6]-1069501632,r=(r<<9|r>>>23)+e<<0,n+=(e^t&(r^e))+o[11]+643717713,n=(n<<14|n>>>18)+r<<0,t+=(r^e&(n^r))+o[0]-373897302,t=(t<<20|t>>>12)+n<<0,e+=(n^r&(t^n))+o[5]-701558691,e=(e<<5|e>>>27)+t<<0,r+=(t^n&(e^t))+o[10]+38016083,r=(r<<9|r>>>23)+e<<0,n+=(e^t&(r^e))+o[15]-660478335,n=(n<<14|n>>>18)+r<<0,t+=(r^e&(n^r))+o[4]-405537848,t=(t<<20|t>>>12)+n<<0,e+=(n^r&(t^n))+o[9]+568446438,e=(e<<5|e>>>27)+t<<0,r+=(t^n&(e^t))+o[14]-1019803690,r=(r<<9|r>>>23)+e<<0,n+=(e^t&(r^e))+o[3]-187363961,n=(n<<14|n>>>18)+r<<0,t+=(r^e&(n^r))+o[8]+1163531501,t=(t<<20|t>>>12)+n<<0,e+=(n^r&(t^n))+o[13]-1444681467,e=(e<<5|e>>>27)+t<<0,r+=(t^n&(e^t))+o[2]-51403784,r=(r<<9|r>>>23)+e<<0,n+=(e^t&(r^e))+o[7]+1735328473,n=(n<<14|n>>>18)+r<<0,t+=(r^e&(n^r))+o[12]-1926607734,t=(t<<20|t>>>12)+n<<0,i=t^n,e+=(i^r)+o[5]-378558,e=(e<<4|e>>>28)+t<<0,r+=(i^e)+o[8]-2022574463,r=(r<<11|r>>>21)+e<<0,a=r^e,n+=(a^t)+o[11]+1839030562,n=(n<<16|n>>>16)+r<<0,t+=(a^n)+o[14]-35309556,t=(t<<23|t>>>9)+n<<0,i=t^n,e+=(i^r)+o[1]-1530992060,e=(e<<4|e>>>28)+t<<0,r+=(i^e)+o[4]+1272893353,r=(r<<11|r>>>21)+e<<0,a=r^e,n+=(a^t)+o[7]-155497632,n=(n<<16|n>>>16)+r<<0,t+=(a^n)+o[10]-1094730640,t=(t<<23|t>>>9)+n<<0,i=t^n,e+=(i^r)+o[13]+681279174,e=(e<<4|e>>>28)+t<<0,r+=(i^e)+o[0]-358537222,r=(r<<11|r>>>21)+e<<0,a=r^e,n+=(a^t)+o[3]-722521979,n=(n<<16|n>>>16)+r<<0,t+=(a^n)+o[6]+76029189,t=(t<<23|t>>>9)+n<<0,i=t^n,e+=(i^r)+o[9]-640364487,e=(e<<4|e>>>28)+t<<0,r+=(i^e)+o[12]-421815835,r=(r<<11|r>>>21)+e<<0,a=r^e,n+=(a^t)+o[15]+530742520,n=(n<<16|n>>>16)+r<<0,t+=(a^n)+o[2]-995338651,t=(t<<23|t>>>9)+n<<0,e+=(n^(t|~r))+o[0]-198630844,e=(e<<6|e>>>26)+t<<0,r+=(t^(e|~n))+o[7]+1126891415,r=(r<<10|r>>>22)+e<<0,n+=(e^(r|~t))+o[14]-1416354905,n=(n<<15|n>>>17)+r<<0,t+=(r^(n|~e))+o[5]-57434055,t=(t<<21|t>>>11)+n<<0,e+=(n^(t|~r))+o[12]+1700485571,e=(e<<6|e>>>26)+t<<0,r+=(t^(e|~n))+o[3]-1894986606,r=(r<<10|r>>>22)+e<<0,n+=(e^(r|~t))+o[10]-1051523,n=(n<<15|n>>>17)+r<<0,t+=(r^(n|~e))+o[1]-2054922799,t=(t<<21|t>>>11)+n<<0,e+=(n^(t|~r))+o[8]+1873313359,e=(e<<6|e>>>26)+t<<0,r+=(t^(e|~n))+o[15]-30611744,r=(r<<10|r>>>22)+e<<0,n+=(e^(r|~t))+o[6]-1560198380,n=(n<<15|n>>>17)+r<<0,t+=(r^(n|~e))+o[13]+1309151649,t=(t<<21|t>>>11)+n<<0,e+=(n^(t|~r))+o[4]-145523070,e=(e<<6|e>>>26)+t<<0,r+=(t^(e|~n))+o[11]-1120210379,r=(r<<10|r>>>22)+e<<0,n+=(e^(r|~t))+o[2]+718787259,n=(n<<15|n>>>17)+r<<0,t+=(r^(n|~e))+o[9]-343485551,t=(t<<21|t>>>11)+n<<0,this.first?(this.h0=e+1732584193<<0,this.h1=t-271733879<<0,this.h2=n-1732584194<<0,this.h3=r+271733878<<0,this.first=!1):(this.h0=this.h0+e<<0,this.h1=this.h1+t<<0,this.h2=this.h2+n<<0,this.h3=this.h3+r<<0)},x.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3;return o[e>>>4&15]+o[e&15]+o[e>>>12&15]+o[e>>>8&15]+o[e>>>20&15]+o[e>>>16&15]+o[e>>>28&15]+o[e>>>24&15]+o[t>>>4&15]+o[t&15]+o[t>>>12&15]+o[t>>>8&15]+o[t>>>20&15]+o[t>>>16&15]+o[t>>>28&15]+o[t>>>24&15]+o[n>>>4&15]+o[n&15]+o[n>>>12&15]+o[n>>>8&15]+o[n>>>20&15]+o[n>>>16&15]+o[n>>>28&15]+o[n>>>24&15]+o[r>>>4&15]+o[r&15]+o[r>>>12&15]+o[r>>>8&15]+o[r>>>20&15]+o[r>>>16&15]+o[r>>>28&15]+o[r>>>24&15]},x.prototype.toString=x.prototype.hex,x.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3;return[e&255,e>>>8&255,e>>>16&255,e>>>24&255,t&255,t>>>8&255,t>>>16&255,t>>>24&255,n&255,n>>>8&255,n>>>16&255,n>>>24&255,r&255,r>>>8&255,r>>>16&255,r>>>24&255]},x.prototype.array=x.prototype.digest,x.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(16),t=new Uint32Array(e);return t[0]=this.h0,t[1]=this.h1,t[2]=this.h2,t[3]=this.h3,e},x.prototype.buffer=x.prototype.arrayBuffer,x.prototype.base64=function(){for(var e,t,n,r=``,i=this.array(),a=0;a<15;)e=i[a++],t=i[a++],n=i[a++],r+=u[e>>>2]+u[(e<<4|t>>>4)&63]+u[(t<<2|n>>>6)&63]+u[n&63];return e=i[a],r+=u[e>>>2]+u[e<<4&63]+`==`,r};function S(e,t){var n,r=g(e);if(e=r[0],r[1]){var i=[],a=e.length,o=0,s;for(n=0;n<a;++n)s=e.charCodeAt(n),s<128?i[o++]=s:s<2048?(i[o++]=192|s>>>6,i[o++]=128|s&63):s<55296||s>=57344?(i[o++]=224|s>>>12,i[o++]=128|s>>>6&63,i[o++]=128|s&63):(s=65536+((s&1023)<<10|e.charCodeAt(++n)&1023),i[o++]=240|s>>>18,i[o++]=128|s>>>12&63,i[o++]=128|s>>>6&63,i[o++]=128|s&63);e=i}e.length>64&&(e=new x(!0).update(e).array());var c=[],l=[];for(n=0;n<64;++n){var u=e[n]||0;c[n]=92^u,l[n]=54^u}x.call(this,t),this.update(l),this.oKeyPad=c,this.inner=!0,this.sharedMemory=t}S.prototype=new x,S.prototype.finalize=function(){if(x.prototype.finalize.call(this),this.inner){this.inner=!1;var e=this.array();x.call(this,this.sharedMemory),this.update(this.oKeyPad),this.update(e),x.prototype.finalize.call(this)}};var C=v();C.md5=C,C.md5.hmac=b(),i?e.exports=C:r.md5=C})()})(
|
|
23
|
+
(function(e){(function(){var t=`input is invalid type`,n=typeof window==`object`,r=n?window:{};r.JS_MD5_NO_WINDOW&&(n=!1),typeof WorkerGlobalScope<`u`&&typeof self<`u`&&self instanceof WorkerGlobalScope&&(r=self);var i=!r.JS_MD5_NO_COMMON_JS&&e.exports,a=!r.JS_MD5_NO_ARRAY_BUFFER&&typeof ArrayBuffer<`u`,o=`0123456789abcdef`.split(``),s=[128,32768,8388608,-2147483648],c=[0,8,16,24],l=[`hex`,`array`,`digest`,`arrayBuffer`];l.push(`buffer`),l.push(`base64`);var u=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`.split(``),d=[],f;if(a){var p=new ArrayBuffer(68);f=new Uint8Array(p),d=new Uint32Array(p)}var m=Array.isArray;(r.JS_MD5_NO_NODE_JS||!m)&&(m=function(e){return Object.prototype.toString.call(e)===`[object Array]`});var h=ArrayBuffer.isView;a&&(r.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW||!h)&&(h=function(e){return typeof e==`object`&&e.buffer&&e.buffer.constructor===ArrayBuffer});var g=function(e){var n=typeof e;if(n===`string`)return[e,!0];if(n!==`object`||e===null)throw Error(t);if(a&&e.constructor===ArrayBuffer)return[new Uint8Array(e),!1];if(!m(e)&&!h(e))throw Error(t);return[e,!1]},_=function(e){return function(t){return new x(!0).update(t)[e]()}},v=function(){var e=_(`hex`);e.create=function(){return new x},e.update=function(t){return e.create().update(t)};for(var t=0;t<l.length;++t){var n=l[t];e[n]=_(n)}return e},y=function(e){return function(t,n){return new S(t,!0).update(n)[e]()}},b=function(){var e=y(`hex`);e.create=function(e){return new S(e)},e.update=function(t,n){return e.create(t).update(n)};for(var t=0;t<l.length;++t){var n=l[t];e[n]=y(n)}return e};function x(e){if(e)d[0]=d[16]=d[1]=d[2]=d[3]=d[4]=d[5]=d[6]=d[7]=d[8]=d[9]=d[10]=d[11]=d[12]=d[13]=d[14]=d[15]=0,this.blocks=d,this.buffer8=f;else if(a){var t=new ArrayBuffer(68);this.buffer8=new Uint8Array(t),this.blocks=new Uint32Array(t)}else this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.h0=this.h1=this.h2=this.h3=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0}x.prototype.update=function(e){if(this.finalized)throw Error(`finalize already called`);var t=g(e);e=t[0];for(var n=t[1],r,i=0,o,s=e.length,l=this.blocks,u=this.buffer8;i<s;){if(this.hashed&&(this.hashed=!1,l[0]=l[16],l[16]=l[1]=l[2]=l[3]=l[4]=l[5]=l[6]=l[7]=l[8]=l[9]=l[10]=l[11]=l[12]=l[13]=l[14]=l[15]=0),n){if(a)for(o=this.start;i<s&&o<64;++i)r=e.charCodeAt(i),r<128?u[o++]=r:r<2048?(u[o++]=192|r>>>6,u[o++]=128|r&63):r<55296||r>=57344?(u[o++]=224|r>>>12,u[o++]=128|r>>>6&63,u[o++]=128|r&63):(r=65536+((r&1023)<<10|e.charCodeAt(++i)&1023),u[o++]=240|r>>>18,u[o++]=128|r>>>12&63,u[o++]=128|r>>>6&63,u[o++]=128|r&63);else for(o=this.start;i<s&&o<64;++i)r=e.charCodeAt(i),r<128?l[o>>>2]|=r<<c[o++&3]:r<2048?(l[o>>>2]|=(192|r>>>6)<<c[o++&3],l[o>>>2]|=(128|r&63)<<c[o++&3]):r<55296||r>=57344?(l[o>>>2]|=(224|r>>>12)<<c[o++&3],l[o>>>2]|=(128|r>>>6&63)<<c[o++&3],l[o>>>2]|=(128|r&63)<<c[o++&3]):(r=65536+((r&1023)<<10|e.charCodeAt(++i)&1023),l[o>>>2]|=(240|r>>>18)<<c[o++&3],l[o>>>2]|=(128|r>>>12&63)<<c[o++&3],l[o>>>2]|=(128|r>>>6&63)<<c[o++&3],l[o>>>2]|=(128|r&63)<<c[o++&3])}else if(a)for(o=this.start;i<s&&o<64;++i)u[o++]=e[i];else for(o=this.start;i<s&&o<64;++i)l[o>>>2]|=e[i]<<c[o++&3];this.lastByteIndex=o,this.bytes+=o-this.start,o>=64?(this.start=o-64,this.hash(),this.hashed=!0):this.start=o}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes%=4294967296),this},x.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[t>>>2]|=s[t&3],t>=56&&(this.hashed||this.hash(),e[0]=e[16],e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.bytes<<3,e[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},x.prototype.hash=function(){var e,t,n,r,i,a,o=this.blocks;this.first?(e=o[0]-680876937,e=(e<<7|e>>>25)-271733879<<0,r=(-1732584194^e&2004318071)+o[1]-117830708,r=(r<<12|r>>>20)+e<<0,n=(-271733879^r&(e^-271733879))+o[2]-1126478375,n=(n<<17|n>>>15)+r<<0,t=(e^n&(r^e))+o[3]-1316259209,t=(t<<22|t>>>10)+n<<0):(e=this.h0,t=this.h1,n=this.h2,r=this.h3,e+=(r^t&(n^r))+o[0]-680876936,e=(e<<7|e>>>25)+t<<0,r+=(n^e&(t^n))+o[1]-389564586,r=(r<<12|r>>>20)+e<<0,n+=(t^r&(e^t))+o[2]+606105819,n=(n<<17|n>>>15)+r<<0,t+=(e^n&(r^e))+o[3]-1044525330,t=(t<<22|t>>>10)+n<<0),e+=(r^t&(n^r))+o[4]-176418897,e=(e<<7|e>>>25)+t<<0,r+=(n^e&(t^n))+o[5]+1200080426,r=(r<<12|r>>>20)+e<<0,n+=(t^r&(e^t))+o[6]-1473231341,n=(n<<17|n>>>15)+r<<0,t+=(e^n&(r^e))+o[7]-45705983,t=(t<<22|t>>>10)+n<<0,e+=(r^t&(n^r))+o[8]+1770035416,e=(e<<7|e>>>25)+t<<0,r+=(n^e&(t^n))+o[9]-1958414417,r=(r<<12|r>>>20)+e<<0,n+=(t^r&(e^t))+o[10]-42063,n=(n<<17|n>>>15)+r<<0,t+=(e^n&(r^e))+o[11]-1990404162,t=(t<<22|t>>>10)+n<<0,e+=(r^t&(n^r))+o[12]+1804603682,e=(e<<7|e>>>25)+t<<0,r+=(n^e&(t^n))+o[13]-40341101,r=(r<<12|r>>>20)+e<<0,n+=(t^r&(e^t))+o[14]-1502002290,n=(n<<17|n>>>15)+r<<0,t+=(e^n&(r^e))+o[15]+1236535329,t=(t<<22|t>>>10)+n<<0,e+=(n^r&(t^n))+o[1]-165796510,e=(e<<5|e>>>27)+t<<0,r+=(t^n&(e^t))+o[6]-1069501632,r=(r<<9|r>>>23)+e<<0,n+=(e^t&(r^e))+o[11]+643717713,n=(n<<14|n>>>18)+r<<0,t+=(r^e&(n^r))+o[0]-373897302,t=(t<<20|t>>>12)+n<<0,e+=(n^r&(t^n))+o[5]-701558691,e=(e<<5|e>>>27)+t<<0,r+=(t^n&(e^t))+o[10]+38016083,r=(r<<9|r>>>23)+e<<0,n+=(e^t&(r^e))+o[15]-660478335,n=(n<<14|n>>>18)+r<<0,t+=(r^e&(n^r))+o[4]-405537848,t=(t<<20|t>>>12)+n<<0,e+=(n^r&(t^n))+o[9]+568446438,e=(e<<5|e>>>27)+t<<0,r+=(t^n&(e^t))+o[14]-1019803690,r=(r<<9|r>>>23)+e<<0,n+=(e^t&(r^e))+o[3]-187363961,n=(n<<14|n>>>18)+r<<0,t+=(r^e&(n^r))+o[8]+1163531501,t=(t<<20|t>>>12)+n<<0,e+=(n^r&(t^n))+o[13]-1444681467,e=(e<<5|e>>>27)+t<<0,r+=(t^n&(e^t))+o[2]-51403784,r=(r<<9|r>>>23)+e<<0,n+=(e^t&(r^e))+o[7]+1735328473,n=(n<<14|n>>>18)+r<<0,t+=(r^e&(n^r))+o[12]-1926607734,t=(t<<20|t>>>12)+n<<0,i=t^n,e+=(i^r)+o[5]-378558,e=(e<<4|e>>>28)+t<<0,r+=(i^e)+o[8]-2022574463,r=(r<<11|r>>>21)+e<<0,a=r^e,n+=(a^t)+o[11]+1839030562,n=(n<<16|n>>>16)+r<<0,t+=(a^n)+o[14]-35309556,t=(t<<23|t>>>9)+n<<0,i=t^n,e+=(i^r)+o[1]-1530992060,e=(e<<4|e>>>28)+t<<0,r+=(i^e)+o[4]+1272893353,r=(r<<11|r>>>21)+e<<0,a=r^e,n+=(a^t)+o[7]-155497632,n=(n<<16|n>>>16)+r<<0,t+=(a^n)+o[10]-1094730640,t=(t<<23|t>>>9)+n<<0,i=t^n,e+=(i^r)+o[13]+681279174,e=(e<<4|e>>>28)+t<<0,r+=(i^e)+o[0]-358537222,r=(r<<11|r>>>21)+e<<0,a=r^e,n+=(a^t)+o[3]-722521979,n=(n<<16|n>>>16)+r<<0,t+=(a^n)+o[6]+76029189,t=(t<<23|t>>>9)+n<<0,i=t^n,e+=(i^r)+o[9]-640364487,e=(e<<4|e>>>28)+t<<0,r+=(i^e)+o[12]-421815835,r=(r<<11|r>>>21)+e<<0,a=r^e,n+=(a^t)+o[15]+530742520,n=(n<<16|n>>>16)+r<<0,t+=(a^n)+o[2]-995338651,t=(t<<23|t>>>9)+n<<0,e+=(n^(t|~r))+o[0]-198630844,e=(e<<6|e>>>26)+t<<0,r+=(t^(e|~n))+o[7]+1126891415,r=(r<<10|r>>>22)+e<<0,n+=(e^(r|~t))+o[14]-1416354905,n=(n<<15|n>>>17)+r<<0,t+=(r^(n|~e))+o[5]-57434055,t=(t<<21|t>>>11)+n<<0,e+=(n^(t|~r))+o[12]+1700485571,e=(e<<6|e>>>26)+t<<0,r+=(t^(e|~n))+o[3]-1894986606,r=(r<<10|r>>>22)+e<<0,n+=(e^(r|~t))+o[10]-1051523,n=(n<<15|n>>>17)+r<<0,t+=(r^(n|~e))+o[1]-2054922799,t=(t<<21|t>>>11)+n<<0,e+=(n^(t|~r))+o[8]+1873313359,e=(e<<6|e>>>26)+t<<0,r+=(t^(e|~n))+o[15]-30611744,r=(r<<10|r>>>22)+e<<0,n+=(e^(r|~t))+o[6]-1560198380,n=(n<<15|n>>>17)+r<<0,t+=(r^(n|~e))+o[13]+1309151649,t=(t<<21|t>>>11)+n<<0,e+=(n^(t|~r))+o[4]-145523070,e=(e<<6|e>>>26)+t<<0,r+=(t^(e|~n))+o[11]-1120210379,r=(r<<10|r>>>22)+e<<0,n+=(e^(r|~t))+o[2]+718787259,n=(n<<15|n>>>17)+r<<0,t+=(r^(n|~e))+o[9]-343485551,t=(t<<21|t>>>11)+n<<0,this.first?(this.h0=e+1732584193<<0,this.h1=t-271733879<<0,this.h2=n-1732584194<<0,this.h3=r+271733878<<0,this.first=!1):(this.h0=this.h0+e<<0,this.h1=this.h1+t<<0,this.h2=this.h2+n<<0,this.h3=this.h3+r<<0)},x.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3;return o[e>>>4&15]+o[e&15]+o[e>>>12&15]+o[e>>>8&15]+o[e>>>20&15]+o[e>>>16&15]+o[e>>>28&15]+o[e>>>24&15]+o[t>>>4&15]+o[t&15]+o[t>>>12&15]+o[t>>>8&15]+o[t>>>20&15]+o[t>>>16&15]+o[t>>>28&15]+o[t>>>24&15]+o[n>>>4&15]+o[n&15]+o[n>>>12&15]+o[n>>>8&15]+o[n>>>20&15]+o[n>>>16&15]+o[n>>>28&15]+o[n>>>24&15]+o[r>>>4&15]+o[r&15]+o[r>>>12&15]+o[r>>>8&15]+o[r>>>20&15]+o[r>>>16&15]+o[r>>>28&15]+o[r>>>24&15]},x.prototype.toString=x.prototype.hex,x.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3;return[e&255,e>>>8&255,e>>>16&255,e>>>24&255,t&255,t>>>8&255,t>>>16&255,t>>>24&255,n&255,n>>>8&255,n>>>16&255,n>>>24&255,r&255,r>>>8&255,r>>>16&255,r>>>24&255]},x.prototype.array=x.prototype.digest,x.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(16),t=new Uint32Array(e);return t[0]=this.h0,t[1]=this.h1,t[2]=this.h2,t[3]=this.h3,e},x.prototype.buffer=x.prototype.arrayBuffer,x.prototype.base64=function(){for(var e,t,n,r=``,i=this.array(),a=0;a<15;)e=i[a++],t=i[a++],n=i[a++],r+=u[e>>>2]+u[(e<<4|t>>>4)&63]+u[(t<<2|n>>>6)&63]+u[n&63];return e=i[a],r+=u[e>>>2]+u[e<<4&63]+`==`,r};function S(e,t){var n,r=g(e);if(e=r[0],r[1]){var i=[],a=e.length,o=0,s;for(n=0;n<a;++n)s=e.charCodeAt(n),s<128?i[o++]=s:s<2048?(i[o++]=192|s>>>6,i[o++]=128|s&63):s<55296||s>=57344?(i[o++]=224|s>>>12,i[o++]=128|s>>>6&63,i[o++]=128|s&63):(s=65536+((s&1023)<<10|e.charCodeAt(++n)&1023),i[o++]=240|s>>>18,i[o++]=128|s>>>12&63,i[o++]=128|s>>>6&63,i[o++]=128|s&63);e=i}e.length>64&&(e=new x(!0).update(e).array());var c=[],l=[];for(n=0;n<64;++n){var u=e[n]||0;c[n]=92^u,l[n]=54^u}x.call(this,t),this.update(l),this.oKeyPad=c,this.inner=!0,this.sharedMemory=t}S.prototype=new x,S.prototype.finalize=function(){if(x.prototype.finalize.call(this),this.inner){this.inner=!1;var e=this.array();x.call(this,this.sharedMemory),this.update(this.oKeyPad),this.update(e),x.prototype.finalize.call(this)}};var C=v();C.md5=C,C.md5.hmac=b(),i?e.exports=C:r.md5=C})()})(Gt);var Kt=Gt.exports,qt=Wt(Kt),Jt=e(((e,t)=>{t.exports={}})),Yt=e(((e,t)=>{
|
|
24
24
|
/*
|
|
25
25
|
* [js-sha1]{@link https://github.com/emn178/js-sha1}
|
|
26
26
|
*
|
|
@@ -29,15 +29,15 @@ let r=t(),i=n(),a=typeof Symbol==`function`&&typeof Symbol.for==`function`?Symbo
|
|
|
29
29
|
* @copyright Chen, Yi-Cyuan 2014-2024
|
|
30
30
|
* @license MIT
|
|
31
31
|
*/
|
|
32
|
-
(function(){var e=`input is invalid type`,n=typeof window==`object`,i=n?window:{};i.JS_SHA1_NO_WINDOW&&(n=!1);var a=!n&&typeof self==`object`,o=!i.JS_SHA1_NO_NODE_JS&&typeof process==`object`&&process.versions&&process.versions.node;o?i=globalThis:a&&(i=self);var s=!i.JS_SHA1_NO_COMMON_JS&&typeof t==`object`&&t.exports,c=typeof define==`function`&&define.amd,l=!i.JS_SHA1_NO_ARRAY_BUFFER&&typeof ArrayBuffer<`u`,u=`0123456789abcdef`.split(``),d=[-2147483648,8388608,32768,128],f=[24,16,8,0],p=[`hex`,`array`,`digest`,`arrayBuffer`],m=[],h=Array.isArray;(i.JS_SHA1_NO_NODE_JS||!h)&&(h=function(e){return Object.prototype.toString.call(e)===`[object Array]`});var g=ArrayBuffer.isView;l&&(i.JS_SHA1_NO_ARRAY_BUFFER_IS_VIEW||!g)&&(g=function(e){return typeof e==`object`&&e.buffer&&e.buffer.constructor===ArrayBuffer});var _=function(t){var n=typeof t;if(n===`string`)return[t,!0];if(n!==`object`||t===null)throw Error(e);if(l&&t.constructor===ArrayBuffer)return[new Uint8Array(t),!1];if(!h(t)&&!g(t))throw Error(e);return[t,!1]},v=function(e){return function(t){return new C(!0).update(t)[e]()}},y=function(){var e=v(`hex`);o&&(e=b(e)),e.create=function(){return new C},e.update=function(t){return e.create().update(t)};for(var t=0;t<p.length;++t){var n=p[t];e[n]=v(n)}return e},b=function(t){var n=Bt(),a=r().Buffer,o=a.from&&!i.JS_SHA1_NO_BUFFER_FROM?a.from:function(e){return new a(e)};return function(r){if(typeof r==`string`)return n.createHash(`sha1`).update(r,`utf8`).digest(`hex`);if(r==null)throw Error(e);return r.constructor===ArrayBuffer&&(r=new Uint8Array(r)),h(r)||g(r)||r.constructor===a?n.createHash(`sha1`).update(o(r)).digest(`hex`):t(r)}},x=function(e){return function(t,n){return new w(t,!0).update(n)[e]()}},S=function(){var e=x(`hex`);e.create=function(e){return new w(e)},e.update=function(t,n){return e.create(t).update(n)};for(var t=0;t<p.length;++t){var n=p[t];e[n]=x(n)}return e};function C(e){e?(m[0]=m[16]=m[1]=m[2]=m[3]=m[4]=m[5]=m[6]=m[7]=m[8]=m[9]=m[10]=m[11]=m[12]=m[13]=m[14]=m[15]=0,this.blocks=m):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.h0=1732584193,this.h1=4023233417,this.h2=2562383102,this.h3=271733878,this.h4=3285377520,this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0}C.prototype.update=function(e){if(this.finalized)throw Error(`finalize already called`);var t=_(e);e=t[0];for(var n=t[1],r,i=0,a,o=e.length||0,s=this.blocks;i<o;){if(this.hashed&&(this.hashed=!1,s[0]=this.block,this.block=s[16]=s[1]=s[2]=s[3]=s[4]=s[5]=s[6]=s[7]=s[8]=s[9]=s[10]=s[11]=s[12]=s[13]=s[14]=s[15]=0),n)for(a=this.start;i<o&&a<64;++i)r=e.charCodeAt(i),r<128?s[a>>>2]|=r<<f[a++&3]:r<2048?(s[a>>>2]|=(192|r>>>6)<<f[a++&3],s[a>>>2]|=(128|r&63)<<f[a++&3]):r<55296||r>=57344?(s[a>>>2]|=(224|r>>>12)<<f[a++&3],s[a>>>2]|=(128|r>>>6&63)<<f[a++&3],s[a>>>2]|=(128|r&63)<<f[a++&3]):(r=65536+((r&1023)<<10|e.charCodeAt(++i)&1023),s[a>>>2]|=(240|r>>>18)<<f[a++&3],s[a>>>2]|=(128|r>>>12&63)<<f[a++&3],s[a>>>2]|=(128|r>>>6&63)<<f[a++&3],s[a>>>2]|=(128|r&63)<<f[a++&3]);else for(a=this.start;i<o&&a<64;++i)s[a>>>2]|=e[i]<<f[a++&3];this.lastByteIndex=a,this.bytes+=a-this.start,a>=64?(this.block=s[16],this.start=a-64,this.hash(),this.hashed=!0):this.start=a}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes%=4294967296),this},C.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[16]=this.block,e[t>>>2]|=d[t&3],this.block=e[16],t>=56&&(this.hashed||this.hash(),e[0]=this.block,e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.hBytes<<3|this.bytes>>>29,e[15]=this.bytes<<3,this.hash()}},C.prototype.hash=function(){var e=this.h0,t=this.h1,n=this.h2,r=this.h3,i=this.h4,a,o,s,c=this.blocks;for(o=16;o<80;++o)s=c[o-3]^c[o-8]^c[o-14]^c[o-16],c[o]=s<<1|s>>>31;for(o=0;o<20;o+=5)a=t&n|~t&r,s=e<<5|e>>>27,i=s+a+i+1518500249+c[o]<<0,t=t<<30|t>>>2,a=e&t|~e&n,s=i<<5|i>>>27,r=s+a+r+1518500249+c[o+1]<<0,e=e<<30|e>>>2,a=i&e|~i&t,s=r<<5|r>>>27,n=s+a+n+1518500249+c[o+2]<<0,i=i<<30|i>>>2,a=r&i|~r&e,s=n<<5|n>>>27,t=s+a+t+1518500249+c[o+3]<<0,r=r<<30|r>>>2,a=n&r|~n&i,s=t<<5|t>>>27,e=s+a+e+1518500249+c[o+4]<<0,n=n<<30|n>>>2;for(;o<40;o+=5)a=t^n^r,s=e<<5|e>>>27,i=s+a+i+1859775393+c[o]<<0,t=t<<30|t>>>2,a=e^t^n,s=i<<5|i>>>27,r=s+a+r+1859775393+c[o+1]<<0,e=e<<30|e>>>2,a=i^e^t,s=r<<5|r>>>27,n=s+a+n+1859775393+c[o+2]<<0,i=i<<30|i>>>2,a=r^i^e,s=n<<5|n>>>27,t=s+a+t+1859775393+c[o+3]<<0,r=r<<30|r>>>2,a=n^r^i,s=t<<5|t>>>27,e=s+a+e+1859775393+c[o+4]<<0,n=n<<30|n>>>2;for(;o<60;o+=5)a=t&n|t&r|n&r,s=e<<5|e>>>27,i=s+a+i-1894007588+c[o]<<0,t=t<<30|t>>>2,a=e&t|e&n|t&n,s=i<<5|i>>>27,r=s+a+r-1894007588+c[o+1]<<0,e=e<<30|e>>>2,a=i&e|i&t|e&t,s=r<<5|r>>>27,n=s+a+n-1894007588+c[o+2]<<0,i=i<<30|i>>>2,a=r&i|r&e|i&e,s=n<<5|n>>>27,t=s+a+t-1894007588+c[o+3]<<0,r=r<<30|r>>>2,a=n&r|n&i|r&i,s=t<<5|t>>>27,e=s+a+e-1894007588+c[o+4]<<0,n=n<<30|n>>>2;for(;o<80;o+=5)a=t^n^r,s=e<<5|e>>>27,i=s+a+i-899497514+c[o]<<0,t=t<<30|t>>>2,a=e^t^n,s=i<<5|i>>>27,r=s+a+r-899497514+c[o+1]<<0,e=e<<30|e>>>2,a=i^e^t,s=r<<5|r>>>27,n=s+a+n-899497514+c[o+2]<<0,i=i<<30|i>>>2,a=r^i^e,s=n<<5|n>>>27,t=s+a+t-899497514+c[o+3]<<0,r=r<<30|r>>>2,a=n^r^i,s=t<<5|t>>>27,e=s+a+e-899497514+c[o+4]<<0,n=n<<30|n>>>2;this.h0=this.h0+e<<0,this.h1=this.h1+t<<0,this.h2=this.h2+n<<0,this.h3=this.h3+r<<0,this.h4=this.h4+i<<0},C.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,i=this.h4;return u[e>>>28&15]+u[e>>>24&15]+u[e>>>20&15]+u[e>>>16&15]+u[e>>>12&15]+u[e>>>8&15]+u[e>>>4&15]+u[e&15]+u[t>>>28&15]+u[t>>>24&15]+u[t>>>20&15]+u[t>>>16&15]+u[t>>>12&15]+u[t>>>8&15]+u[t>>>4&15]+u[t&15]+u[n>>>28&15]+u[n>>>24&15]+u[n>>>20&15]+u[n>>>16&15]+u[n>>>12&15]+u[n>>>8&15]+u[n>>>4&15]+u[n&15]+u[r>>>28&15]+u[r>>>24&15]+u[r>>>20&15]+u[r>>>16&15]+u[r>>>12&15]+u[r>>>8&15]+u[r>>>4&15]+u[r&15]+u[i>>>28&15]+u[i>>>24&15]+u[i>>>20&15]+u[i>>>16&15]+u[i>>>12&15]+u[i>>>8&15]+u[i>>>4&15]+u[i&15]},C.prototype.toString=C.prototype.hex,C.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,i=this.h4;return[e>>>24&255,e>>>16&255,e>>>8&255,e&255,t>>>24&255,t>>>16&255,t>>>8&255,t&255,n>>>24&255,n>>>16&255,n>>>8&255,n&255,r>>>24&255,r>>>16&255,r>>>8&255,r&255,i>>>24&255,i>>>16&255,i>>>8&255,i&255]},C.prototype.array=C.prototype.digest,C.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(20),t=new DataView(e);return t.setUint32(0,this.h0),t.setUint32(4,this.h1),t.setUint32(8,this.h2),t.setUint32(12,this.h3),t.setUint32(16,this.h4),e};function w(e,t){var n,r=_(e);if(e=r[0],r[1]){var i=[],a=e.length,o=0,s;for(n=0;n<a;++n)s=e.charCodeAt(n),s<128?i[o++]=s:s<2048?(i[o++]=192|s>>>6,i[o++]=128|s&63):s<55296||s>=57344?(i[o++]=224|s>>>12,i[o++]=128|s>>>6&63,i[o++]=128|s&63):(s=65536+((s&1023)<<10|e.charCodeAt(++n)&1023),i[o++]=240|s>>>18,i[o++]=128|s>>>12&63,i[o++]=128|s>>>6&63,i[o++]=128|s&63);e=i}e.length>64&&(e=new C(!0).update(e).array());var c=[],l=[];for(n=0;n<64;++n){var u=e[n]||0;c[n]=92^u,l[n]=54^u}C.call(this,t),this.update(l),this.oKeyPad=c,this.inner=!0,this.sharedMemory=t}w.prototype=new C,w.prototype.finalize=function(){if(C.prototype.finalize.call(this),this.inner){this.inner=!1;var e=this.array();C.call(this,this.sharedMemory),this.update(this.oKeyPad),this.update(e),C.prototype.finalize.call(this)}};var T=y();T.sha1=T,T.sha1.hmac=S(),s?t.exports=T:(i.sha1=T,c&&define(function(){return T}))})()}))(),Ht=`input is invalid type`,Ut=`finalize already called`,Wt=typeof ArrayBuffer<`u`,Gt=function(e){if(typeof e==`string`)return[e,!0];if(Array.isArray(e))return[e,!1];if(Wt&&e){if(e.constructor===ArrayBuffer)return[new Uint8Array(e),!1];if(ArrayBuffer.isView(e))return[e,!1]}throw Error(Ht)},I=`0123456789abcdef`.split(``),Kt=[-2147483648,8388608,32768,128],L=[24,16,8,0],qt=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],Jt=[`hex`,`array`,`digest`,`arrayBuffer`],R=[],Yt=function(e,t){return function(n){return new z(t,!0).update(n)[e]()}},Xt=function(e){var t=Yt(`hex`,e);t.create=function(){return new z(e)},t.update=function(e){return t.create().update(e)};for(var n=0;n<Jt.length;++n){var r=Jt[n];t[r]=Yt(r,e)}return t},Zt=function(e,t){return function(n,r){return new $t(n,t,!0).update(r)[e]()}},Qt=function(e){var t=Zt(`hex`,e);t.create=function(t){return new $t(t,e)},t.update=function(e,n){return t.create(e).update(n)};for(var n=0;n<Jt.length;++n){var r=Jt[n];t[r]=Zt(r,e)}return t};function z(e,t){t?(R[0]=R[16]=R[1]=R[2]=R[3]=R[4]=R[5]=R[6]=R[7]=R[8]=R[9]=R[10]=R[11]=R[12]=R[13]=R[14]=R[15]=0,this.blocks=R):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=e}z.prototype.update=function(e){if(this.finalized)throw Error(Ut);var t=Gt(e);e=t[0];for(var n=t[1],r,i=0,a,o=e.length,s=this.blocks;i<o;){if(this.hashed&&(this.hashed=!1,s[0]=this.block,this.block=s[16]=s[1]=s[2]=s[3]=s[4]=s[5]=s[6]=s[7]=s[8]=s[9]=s[10]=s[11]=s[12]=s[13]=s[14]=s[15]=0),n)for(a=this.start;i<o&&a<64;++i)r=e.charCodeAt(i),r<128?s[a>>>2]|=r<<L[a++&3]:r<2048?(s[a>>>2]|=(192|r>>>6)<<L[a++&3],s[a>>>2]|=(128|r&63)<<L[a++&3]):r<55296||r>=57344?(s[a>>>2]|=(224|r>>>12)<<L[a++&3],s[a>>>2]|=(128|r>>>6&63)<<L[a++&3],s[a>>>2]|=(128|r&63)<<L[a++&3]):(r=65536+((r&1023)<<10|e.charCodeAt(++i)&1023),s[a>>>2]|=(240|r>>>18)<<L[a++&3],s[a>>>2]|=(128|r>>>12&63)<<L[a++&3],s[a>>>2]|=(128|r>>>6&63)<<L[a++&3],s[a>>>2]|=(128|r&63)<<L[a++&3]);else for(a=this.start;i<o&&a<64;++i)s[a>>>2]|=e[i]<<L[a++&3];this.lastByteIndex=a,this.bytes+=a-this.start,a>=64?(this.block=s[16],this.start=a-64,this.hash(),this.hashed=!0):this.start=a}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes%=4294967296),this},z.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[16]=this.block,e[t>>>2]|=Kt[t&3],this.block=e[16],t>=56&&(this.hashed||this.hash(),e[0]=this.block,e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.hBytes<<3|this.bytes>>>29,e[15]=this.bytes<<3,this.hash()}},z.prototype.hash=function(){var e=this.h0,t=this.h1,n=this.h2,r=this.h3,i=this.h4,a=this.h5,o=this.h6,s=this.h7,c=this.blocks,l,u,d,f,p,m,h,g,_,v,y;for(l=16;l<64;++l)p=c[l-15],u=(p>>>7|p<<25)^(p>>>18|p<<14)^p>>>3,p=c[l-2],d=(p>>>17|p<<15)^(p>>>19|p<<13)^p>>>10,c[l]=c[l-16]+u+c[l-7]+d<<0;for(y=t&n,l=0;l<64;l+=4)this.first?(this.is224?(g=300032,p=c[0]-1413257819,s=p-150054599<<0,r=p+24177077<<0):(g=704751109,p=c[0]-210244248,s=p-1521486534<<0,r=p+143694565<<0),this.first=!1):(u=(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10),d=(i>>>6|i<<26)^(i>>>11|i<<21)^(i>>>25|i<<7),g=e&t,f=g^e&n^y,h=i&a^~i&o,p=s+d+h+qt[l]+c[l],m=u+f,s=r+p<<0,r=p+m<<0),u=(r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10),d=(s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7),_=r&e,f=_^r&t^g,h=s&i^~s&a,p=o+d+h+qt[l+1]+c[l+1],m=u+f,o=n+p<<0,n=p+m<<0,u=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10),d=(o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7),v=n&r,f=v^n&e^_,h=o&s^~o&i,p=a+d+h+qt[l+2]+c[l+2],m=u+f,a=t+p<<0,t=p+m<<0,u=(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10),d=(a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7),y=t&n,f=y^t&r^v,h=a&o^~a&s,p=i+d+h+qt[l+3]+c[l+3],m=u+f,i=e+p<<0,e=p+m<<0,this.chromeBugWorkAround=!0;this.h0=this.h0+e<<0,this.h1=this.h1+t<<0,this.h2=this.h2+n<<0,this.h3=this.h3+r<<0,this.h4=this.h4+i<<0,this.h5=this.h5+a<<0,this.h6=this.h6+o<<0,this.h7=this.h7+s<<0},z.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,i=this.h4,a=this.h5,o=this.h6,s=this.h7,c=I[e>>>28&15]+I[e>>>24&15]+I[e>>>20&15]+I[e>>>16&15]+I[e>>>12&15]+I[e>>>8&15]+I[e>>>4&15]+I[e&15]+I[t>>>28&15]+I[t>>>24&15]+I[t>>>20&15]+I[t>>>16&15]+I[t>>>12&15]+I[t>>>8&15]+I[t>>>4&15]+I[t&15]+I[n>>>28&15]+I[n>>>24&15]+I[n>>>20&15]+I[n>>>16&15]+I[n>>>12&15]+I[n>>>8&15]+I[n>>>4&15]+I[n&15]+I[r>>>28&15]+I[r>>>24&15]+I[r>>>20&15]+I[r>>>16&15]+I[r>>>12&15]+I[r>>>8&15]+I[r>>>4&15]+I[r&15]+I[i>>>28&15]+I[i>>>24&15]+I[i>>>20&15]+I[i>>>16&15]+I[i>>>12&15]+I[i>>>8&15]+I[i>>>4&15]+I[i&15]+I[a>>>28&15]+I[a>>>24&15]+I[a>>>20&15]+I[a>>>16&15]+I[a>>>12&15]+I[a>>>8&15]+I[a>>>4&15]+I[a&15]+I[o>>>28&15]+I[o>>>24&15]+I[o>>>20&15]+I[o>>>16&15]+I[o>>>12&15]+I[o>>>8&15]+I[o>>>4&15]+I[o&15];return this.is224||(c+=I[s>>>28&15]+I[s>>>24&15]+I[s>>>20&15]+I[s>>>16&15]+I[s>>>12&15]+I[s>>>8&15]+I[s>>>4&15]+I[s&15]),c},z.prototype.toString=z.prototype.hex,z.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,i=this.h4,a=this.h5,o=this.h6,s=this.h7,c=[e>>>24&255,e>>>16&255,e>>>8&255,e&255,t>>>24&255,t>>>16&255,t>>>8&255,t&255,n>>>24&255,n>>>16&255,n>>>8&255,n&255,r>>>24&255,r>>>16&255,r>>>8&255,r&255,i>>>24&255,i>>>16&255,i>>>8&255,i&255,a>>>24&255,a>>>16&255,a>>>8&255,a&255,o>>>24&255,o>>>16&255,o>>>8&255,o&255];return this.is224||c.push(s>>>24&255,s>>>16&255,s>>>8&255,s&255),c},z.prototype.array=z.prototype.digest,z.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(this.is224?28:32),t=new DataView(e);return t.setUint32(0,this.h0),t.setUint32(4,this.h1),t.setUint32(8,this.h2),t.setUint32(12,this.h3),t.setUint32(16,this.h4),t.setUint32(20,this.h5),t.setUint32(24,this.h6),this.is224||t.setUint32(28,this.h7),e};function $t(e,t,n){var r,i=Gt(e);if(e=i[0],i[1]){var a=[],o=e.length,s=0,c;for(r=0;r<o;++r)c=e.charCodeAt(r),c<128?a[s++]=c:c<2048?(a[s++]=192|c>>>6,a[s++]=128|c&63):c<55296||c>=57344?(a[s++]=224|c>>>12,a[s++]=128|c>>>6&63,a[s++]=128|c&63):(c=65536+((c&1023)<<10|e.charCodeAt(++r)&1023),a[s++]=240|c>>>18,a[s++]=128|c>>>12&63,a[s++]=128|c>>>6&63,a[s++]=128|c&63);e=a}e.length>64&&(e=new z(t,!0).update(e).array());var l=[],u=[];for(r=0;r<64;++r){var d=e[r]||0;l[r]=92^d,u[r]=54^d}z.call(this,t,n),this.update(u),this.oKeyPad=l,this.inner=!0,this.sharedMemory=n}$t.prototype=new z,$t.prototype.finalize=function(){if(z.prototype.finalize.call(this),this.inner){this.inner=!1;var e=this.array();z.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(e),z.prototype.finalize.call(this)}};var en=Xt(),tn=Xt(!0);en.sha256=en,en.sha224=tn,en.hmac=Qt(),tn.hmac=Qt(!0);const nn=65536,rn={md5:zt,sha1:Vt.sha1,sha256:en};function an(e,t){return typeof e==`string`?t===`hex`||t===`base64`||t===`base64url`||t===`latin1`||t===`binary`?new Uint8Array(We(e,t===`binary`?`latin1`:t)):e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}function on(e){let t=String(e).toLowerCase().replace(`-`,``),n=rn[t];if(!n)throw Error(`Digest method not supported: ${e}`);let r=n.create(),i=!1,a={update(e,t){if(i)throw Error(`Digest already called`);return r.update(an(e,t)),a},digest(e){i=!0;let t=We(r.array());return e?t.toString(e):t}};return a}function sn(){let e=globalThis.crypto;if(!e||typeof e.getRandomValues!=`function`)throw Error(`crypto: globalThis.crypto is unavailable in this environment`);return e}function cn(e){return sn().getRandomValues(e)}function ln(e){for(let t=0;t<e.length;t+=nn){let n=Math.min(t+nn,e.length);cn(e.subarray(t,n))}}function un(e){return e instanceof Uint8Array?e:new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}const B=Array.from({length:256},(e,t)=>(t+256).toString(16).slice(1));function dn(){let e=sn();if(typeof e.randomUUID==`function`)return e.randomUUID();let t=cn(new Uint8Array(16));return t[6]=t[6]&15|64,t[8]=t[8]&63|128,`${B[t[0]]}${B[t[1]]}${B[t[2]]}${B[t[3]]}-${B[t[4]]}${B[t[5]]}-${B[t[6]]}${B[t[7]]}-${B[t[8]]}${B[t[9]]}-${B[t[10]]}${B[t[11]]}${B[t[12]]}${B[t[13]]}${B[t[14]]}${B[t[15]]}`}const fn={randomFillSync(e,t=0,n){let r=un(e),i=t,a=n===void 0?r.length:i+n;return ln(r.subarray(i,a)),e},randomBytes(e){let t=globalThis.Buffer,n=t&&typeof t.allocUnsafe==`function`?t.allocUnsafe(e):new Uint8Array(e);return ln(un(n)),n},randomUUID:dn,getRandomValues(e){return cn(e)},createHash:on,get webcrypto(){return sn()},get subtle(){return sn().subtle}},pn=`20.0.0`,mn=new Set([`child_process`,`events`,`fs`,`fs/promises`,`os`,`path`,`stream`,`tty`,`url`,`crypto`,`process`,`buffer`,`assert`,`assert/strict`,`util`,`readline`,`readline/promises`,`module`,`vm`]),hn=new Set(`assert.assert/strict.async_hooks.buffer.child_process.cluster.console.constants.crypto.dgram.diagnostics_channel.dns.dns/promises.domain.events.fs.fs/promises.http.http2.https.inspector.inspector/promises.module.net.os.path.path/posix.path/win32.perf_hooks.process.punycode.querystring.readline.readline/promises.repl.stream.stream/consumers.stream/promises.stream/web.string_decoder.sys.timers.timers/promises.tls.trace_events.tty.url.util.util/types.v8.vm.wasi.worker_threads.zlib`.split(`.`)),gn=new Set([...hn].filter(e=>!mn.has(e)));function _n(e){return e.startsWith(`node:`)?e.slice(5):e}function vn(e){return hn.has(_n(e))}function yn(e,t){let n=[];for(let r of e)r!==``&&r!==`.`&&(r===`..`?n.length>0&&n[n.length-1]!==`..`?n.pop():t&&n.push(`..`):n.push(r));return n}function bn(e){if(e.length===0)return`.`;let t=e.charCodeAt(0)===47,n=e.charCodeAt(e.length-1)===47,r=yn(e.split(`/`),!t).join(`/`);return r.length===0&&!t&&(r=`.`),r.length>0&&n&&(r+=`/`),(t?`/`:``)+r}function xn(...e){let t=e.filter(e=>typeof e==`string`&&e.length>0).join(`/`);return t.length===0?`.`:bn(t)}function Sn(e){if(e.length===0)return`.`;let t=e.charCodeAt(0)===47,n=-1,r=!0;for(let t=e.length-1;t>=1;t--)if(e.charCodeAt(t)===47){if(!r){n=t;break}}else r=!1;return n===-1?t?`/`:`.`:t&&n===1?`//`:e.slice(0,n)}function Cn(e,t){let n=0,r=-1,i=!0;for(let t=e.length-1;t>=0;t--)if(e.charCodeAt(t)===47){if(!i){n=t+1;break}}else r===-1&&(i=!1,r=t+1);let a=r===-1?``:e.slice(n,r);return t&&a.endsWith(t)&&a!==t?a.slice(0,a.length-t.length):a}function wn(e){let t=Cn(e),n=t.lastIndexOf(`.`);return n<=0?``:t.slice(n)}function Tn(){let e=globalThis.process?.cwd?.();return typeof e==`string`&&e.length>0?e:`/`}function En(e,t){let n=``,r=!1;for(let i=t.length-1;i>=-1&&!r;i--){let a=i>=0?t[i]:e();typeof a==`string`&&a.length!==0&&(n=n.length>0?`${a}/${n}`:a,r=a.charCodeAt(0)===47)}let i=yn(n.split(`/`),!r).join(`/`);return r?i.length>0?`/${i}`:`/`:i.length>0?i:`.`}function Dn(e,t,n){let r=En(e,[t]),i=En(e,[n]);if(r===i)return``;let a=r.split(`/`).filter(Boolean),o=i.split(`/`).filter(Boolean),s=0;for(;s<a.length&&s<o.length&&a[s]===o[s];)s++;return[...a.slice(s).map(()=>`..`),...o.slice(s)].join(`/`)}function On(e){let t=e.charCodeAt(0)===47?`/`:``,n=Cn(e),r=wn(e),i=r?n.slice(0,n.length-r.length):n,a=Sn(e);return a===`.`&&t===``&&(a=``),{root:t,dir:a,base:n,ext:r,name:i}}function kn(e){let t=e.dir||e.root||``,n=e.base||`${e.name||``}${e.ext||``}`;return t?t===e.root?`${t}${n}`:`${t}/${n}`:n}function An(e=Tn){return{sep:`/`,delimiter:`:`,basename:Cn,dirname:Sn,extname:wn,isAbsolute:e=>e.length>0&&e.charCodeAt(0)===47,join:xn,normalize:bn,resolve:(...t)=>En(e,t),relative:(t,n)=>Dn(e,t,n),parse:On,format:kn}}const jn=An(),Mn=Object.freeze([...hn]);function Nn(e){return typeof e==`string`&&vn(e)}function Pn(e){let t=[],n=e;for(;(n===`/`?``:n.slice(n.lastIndexOf(`/`)+1))!==`node_modules`&&t.push(n===`/`||n===``?`/node_modules`:`${n}/node_modules`),n!==`/`&&n!==``;){let e=n.lastIndexOf(`/`);n=e<=0?e===0?`/`:``:n.slice(0,e)}return t}function Fn(e){if(e instanceof URL)return c.fileURLToPath(e);if(typeof e==`string`){if(e.startsWith(`file:`))return c.fileURLToPath(e);if(e.startsWith(`/`))return e}throw TypeError(`The argument 'filename' must be a file URL object, file URL string, or absolute path string. Received ${String(e)}`)}function In(e,t){let n=t.startsWith(`/`)?jn.normalize(t):jn.resolve(e,t);return/\.(?:js|json|cjs|mjs)$/.test(n)?[n]:[n,`${n}.js`,`${n}.json`,`${n}.cjs`,`${n}/index.js`,`${n}/index.json`]}function Ln(e,t,n){for(let r of In(e,t))if(n(r))return r}function Rn(e,t,n){for(let r of Pn(e)){let e=Ln(r,t,n);if(e)return e}}function zn(e){return e.startsWith(`.`)||e.startsWith(`/`)}function Bn(e){function t(e){return{exports:{},id:e??``,filename:e??``,loaded:!1}}let n=t;return n.createRequire=t=>Vn(e,t),n.builtinModules=Mn,n.isBuiltin=Nn,n._nodeModulePaths=Pn,n.Module=n,n}function Vn(e,t){let n=Fn(t),r=(t=>e.requireFrom(n,t));return r.resolve=(t,r)=>{if(r?.paths&&r.paths.length>0){let n;for(let i of r.paths)try{return e.resolveFrom(Hn(i),t)}catch(e){n=e}throw n instanceof Error?n:Error(`Cannot find module '${t}'`)}return e.resolveFrom(n,t)},r}function Hn(e){return`${e.endsWith(`/`)&&e!==`/`?e.slice(0,-1):e}/noop.js`}const Un=`TMPDIR`;function Wn(e){let t=e&&typeof e.get==`function`?e.get(Un):e?.[Un];return t?.trim()?t:`/tmp`}const Gn={platform:()=>`linux`,arch:()=>`x64`,EOL:`
|
|
33
|
-
`,cpus:()=>[{model:`virtual`,speed:0}],hostname:()=>`slicc`,type:()=>`Linux`,release:()=>`0.0.0`};function
|
|
32
|
+
(function(){var e=`input is invalid type`,n=typeof window==`object`,i=n?window:{};i.JS_SHA1_NO_WINDOW&&(n=!1);var a=!n&&typeof self==`object`,o=!i.JS_SHA1_NO_NODE_JS&&typeof process==`object`&&process.versions&&process.versions.node;o?i=globalThis:a&&(i=self);var s=!i.JS_SHA1_NO_COMMON_JS&&typeof t==`object`&&t.exports,c=typeof define==`function`&&define.amd,l=!i.JS_SHA1_NO_ARRAY_BUFFER&&typeof ArrayBuffer<`u`,u=`0123456789abcdef`.split(``),d=[-2147483648,8388608,32768,128],f=[24,16,8,0],p=[`hex`,`array`,`digest`,`arrayBuffer`],m=[],h=Array.isArray;(i.JS_SHA1_NO_NODE_JS||!h)&&(h=function(e){return Object.prototype.toString.call(e)===`[object Array]`});var g=ArrayBuffer.isView;l&&(i.JS_SHA1_NO_ARRAY_BUFFER_IS_VIEW||!g)&&(g=function(e){return typeof e==`object`&&e.buffer&&e.buffer.constructor===ArrayBuffer});var _=function(t){var n=typeof t;if(n===`string`)return[t,!0];if(n!==`object`||t===null)throw Error(e);if(l&&t.constructor===ArrayBuffer)return[new Uint8Array(t),!1];if(!h(t)&&!g(t))throw Error(e);return[t,!1]},v=function(e){return function(t){return new C(!0).update(t)[e]()}},y=function(){var e=v(`hex`);o&&(e=b(e)),e.create=function(){return new C},e.update=function(t){return e.create().update(t)};for(var t=0;t<p.length;++t){var n=p[t];e[n]=v(n)}return e},b=function(t){var n=Jt(),a=r().Buffer,o=a.from&&!i.JS_SHA1_NO_BUFFER_FROM?a.from:function(e){return new a(e)};return function(r){if(typeof r==`string`)return n.createHash(`sha1`).update(r,`utf8`).digest(`hex`);if(r==null)throw Error(e);return r.constructor===ArrayBuffer&&(r=new Uint8Array(r)),h(r)||g(r)||r.constructor===a?n.createHash(`sha1`).update(o(r)).digest(`hex`):t(r)}},x=function(e){return function(t,n){return new w(t,!0).update(n)[e]()}},S=function(){var e=x(`hex`);e.create=function(e){return new w(e)},e.update=function(t,n){return e.create(t).update(n)};for(var t=0;t<p.length;++t){var n=p[t];e[n]=x(n)}return e};function C(e){e?(m[0]=m[16]=m[1]=m[2]=m[3]=m[4]=m[5]=m[6]=m[7]=m[8]=m[9]=m[10]=m[11]=m[12]=m[13]=m[14]=m[15]=0,this.blocks=m):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.h0=1732584193,this.h1=4023233417,this.h2=2562383102,this.h3=271733878,this.h4=3285377520,this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0}C.prototype.update=function(e){if(this.finalized)throw Error(`finalize already called`);var t=_(e);e=t[0];for(var n=t[1],r,i=0,a,o=e.length||0,s=this.blocks;i<o;){if(this.hashed&&(this.hashed=!1,s[0]=this.block,this.block=s[16]=s[1]=s[2]=s[3]=s[4]=s[5]=s[6]=s[7]=s[8]=s[9]=s[10]=s[11]=s[12]=s[13]=s[14]=s[15]=0),n)for(a=this.start;i<o&&a<64;++i)r=e.charCodeAt(i),r<128?s[a>>>2]|=r<<f[a++&3]:r<2048?(s[a>>>2]|=(192|r>>>6)<<f[a++&3],s[a>>>2]|=(128|r&63)<<f[a++&3]):r<55296||r>=57344?(s[a>>>2]|=(224|r>>>12)<<f[a++&3],s[a>>>2]|=(128|r>>>6&63)<<f[a++&3],s[a>>>2]|=(128|r&63)<<f[a++&3]):(r=65536+((r&1023)<<10|e.charCodeAt(++i)&1023),s[a>>>2]|=(240|r>>>18)<<f[a++&3],s[a>>>2]|=(128|r>>>12&63)<<f[a++&3],s[a>>>2]|=(128|r>>>6&63)<<f[a++&3],s[a>>>2]|=(128|r&63)<<f[a++&3]);else for(a=this.start;i<o&&a<64;++i)s[a>>>2]|=e[i]<<f[a++&3];this.lastByteIndex=a,this.bytes+=a-this.start,a>=64?(this.block=s[16],this.start=a-64,this.hash(),this.hashed=!0):this.start=a}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes%=4294967296),this},C.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[16]=this.block,e[t>>>2]|=d[t&3],this.block=e[16],t>=56&&(this.hashed||this.hash(),e[0]=this.block,e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.hBytes<<3|this.bytes>>>29,e[15]=this.bytes<<3,this.hash()}},C.prototype.hash=function(){var e=this.h0,t=this.h1,n=this.h2,r=this.h3,i=this.h4,a,o,s,c=this.blocks;for(o=16;o<80;++o)s=c[o-3]^c[o-8]^c[o-14]^c[o-16],c[o]=s<<1|s>>>31;for(o=0;o<20;o+=5)a=t&n|~t&r,s=e<<5|e>>>27,i=s+a+i+1518500249+c[o]<<0,t=t<<30|t>>>2,a=e&t|~e&n,s=i<<5|i>>>27,r=s+a+r+1518500249+c[o+1]<<0,e=e<<30|e>>>2,a=i&e|~i&t,s=r<<5|r>>>27,n=s+a+n+1518500249+c[o+2]<<0,i=i<<30|i>>>2,a=r&i|~r&e,s=n<<5|n>>>27,t=s+a+t+1518500249+c[o+3]<<0,r=r<<30|r>>>2,a=n&r|~n&i,s=t<<5|t>>>27,e=s+a+e+1518500249+c[o+4]<<0,n=n<<30|n>>>2;for(;o<40;o+=5)a=t^n^r,s=e<<5|e>>>27,i=s+a+i+1859775393+c[o]<<0,t=t<<30|t>>>2,a=e^t^n,s=i<<5|i>>>27,r=s+a+r+1859775393+c[o+1]<<0,e=e<<30|e>>>2,a=i^e^t,s=r<<5|r>>>27,n=s+a+n+1859775393+c[o+2]<<0,i=i<<30|i>>>2,a=r^i^e,s=n<<5|n>>>27,t=s+a+t+1859775393+c[o+3]<<0,r=r<<30|r>>>2,a=n^r^i,s=t<<5|t>>>27,e=s+a+e+1859775393+c[o+4]<<0,n=n<<30|n>>>2;for(;o<60;o+=5)a=t&n|t&r|n&r,s=e<<5|e>>>27,i=s+a+i-1894007588+c[o]<<0,t=t<<30|t>>>2,a=e&t|e&n|t&n,s=i<<5|i>>>27,r=s+a+r-1894007588+c[o+1]<<0,e=e<<30|e>>>2,a=i&e|i&t|e&t,s=r<<5|r>>>27,n=s+a+n-1894007588+c[o+2]<<0,i=i<<30|i>>>2,a=r&i|r&e|i&e,s=n<<5|n>>>27,t=s+a+t-1894007588+c[o+3]<<0,r=r<<30|r>>>2,a=n&r|n&i|r&i,s=t<<5|t>>>27,e=s+a+e-1894007588+c[o+4]<<0,n=n<<30|n>>>2;for(;o<80;o+=5)a=t^n^r,s=e<<5|e>>>27,i=s+a+i-899497514+c[o]<<0,t=t<<30|t>>>2,a=e^t^n,s=i<<5|i>>>27,r=s+a+r-899497514+c[o+1]<<0,e=e<<30|e>>>2,a=i^e^t,s=r<<5|r>>>27,n=s+a+n-899497514+c[o+2]<<0,i=i<<30|i>>>2,a=r^i^e,s=n<<5|n>>>27,t=s+a+t-899497514+c[o+3]<<0,r=r<<30|r>>>2,a=n^r^i,s=t<<5|t>>>27,e=s+a+e-899497514+c[o+4]<<0,n=n<<30|n>>>2;this.h0=this.h0+e<<0,this.h1=this.h1+t<<0,this.h2=this.h2+n<<0,this.h3=this.h3+r<<0,this.h4=this.h4+i<<0},C.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,i=this.h4;return u[e>>>28&15]+u[e>>>24&15]+u[e>>>20&15]+u[e>>>16&15]+u[e>>>12&15]+u[e>>>8&15]+u[e>>>4&15]+u[e&15]+u[t>>>28&15]+u[t>>>24&15]+u[t>>>20&15]+u[t>>>16&15]+u[t>>>12&15]+u[t>>>8&15]+u[t>>>4&15]+u[t&15]+u[n>>>28&15]+u[n>>>24&15]+u[n>>>20&15]+u[n>>>16&15]+u[n>>>12&15]+u[n>>>8&15]+u[n>>>4&15]+u[n&15]+u[r>>>28&15]+u[r>>>24&15]+u[r>>>20&15]+u[r>>>16&15]+u[r>>>12&15]+u[r>>>8&15]+u[r>>>4&15]+u[r&15]+u[i>>>28&15]+u[i>>>24&15]+u[i>>>20&15]+u[i>>>16&15]+u[i>>>12&15]+u[i>>>8&15]+u[i>>>4&15]+u[i&15]},C.prototype.toString=C.prototype.hex,C.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,i=this.h4;return[e>>>24&255,e>>>16&255,e>>>8&255,e&255,t>>>24&255,t>>>16&255,t>>>8&255,t&255,n>>>24&255,n>>>16&255,n>>>8&255,n&255,r>>>24&255,r>>>16&255,r>>>8&255,r&255,i>>>24&255,i>>>16&255,i>>>8&255,i&255]},C.prototype.array=C.prototype.digest,C.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(20),t=new DataView(e);return t.setUint32(0,this.h0),t.setUint32(4,this.h1),t.setUint32(8,this.h2),t.setUint32(12,this.h3),t.setUint32(16,this.h4),e};function w(e,t){var n,r=_(e);if(e=r[0],r[1]){var i=[],a=e.length,o=0,s;for(n=0;n<a;++n)s=e.charCodeAt(n),s<128?i[o++]=s:s<2048?(i[o++]=192|s>>>6,i[o++]=128|s&63):s<55296||s>=57344?(i[o++]=224|s>>>12,i[o++]=128|s>>>6&63,i[o++]=128|s&63):(s=65536+((s&1023)<<10|e.charCodeAt(++n)&1023),i[o++]=240|s>>>18,i[o++]=128|s>>>12&63,i[o++]=128|s>>>6&63,i[o++]=128|s&63);e=i}e.length>64&&(e=new C(!0).update(e).array());var c=[],l=[];for(n=0;n<64;++n){var u=e[n]||0;c[n]=92^u,l[n]=54^u}C.call(this,t),this.update(l),this.oKeyPad=c,this.inner=!0,this.sharedMemory=t}w.prototype=new C,w.prototype.finalize=function(){if(C.prototype.finalize.call(this),this.inner){this.inner=!1;var e=this.array();C.call(this,this.sharedMemory),this.update(this.oKeyPad),this.update(e),C.prototype.finalize.call(this)}};var T=y();T.sha1=T,T.sha1.hmac=S(),s?t.exports=T:(i.sha1=T,c&&define(function(){return T}))})()}))(),Xt=`input is invalid type`,Zt=`finalize already called`,Qt=typeof ArrayBuffer<`u`,$t=function(e){if(typeof e==`string`)return[e,!0];if(Array.isArray(e))return[e,!1];if(Qt&&e){if(e.constructor===ArrayBuffer)return[new Uint8Array(e),!1];if(ArrayBuffer.isView(e))return[e,!1]}throw Error(Xt)},I=`0123456789abcdef`.split(``),en=[-2147483648,8388608,32768,128],L=[24,16,8,0],tn=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],nn=[`hex`,`array`,`digest`,`arrayBuffer`],R=[],rn=function(e,t){return function(n){return new z(t,!0).update(n)[e]()}},an=function(e){var t=rn(`hex`,e);t.create=function(){return new z(e)},t.update=function(e){return t.create().update(e)};for(var n=0;n<nn.length;++n){var r=nn[n];t[r]=rn(r,e)}return t},on=function(e,t){return function(n,r){return new cn(n,t,!0).update(r)[e]()}},sn=function(e){var t=on(`hex`,e);t.create=function(t){return new cn(t,e)},t.update=function(e,n){return t.create(e).update(n)};for(var n=0;n<nn.length;++n){var r=nn[n];t[r]=on(r,e)}return t};function z(e,t){t?(R[0]=R[16]=R[1]=R[2]=R[3]=R[4]=R[5]=R[6]=R[7]=R[8]=R[9]=R[10]=R[11]=R[12]=R[13]=R[14]=R[15]=0,this.blocks=R):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=e}z.prototype.update=function(e){if(this.finalized)throw Error(Zt);var t=$t(e);e=t[0];for(var n=t[1],r,i=0,a,o=e.length,s=this.blocks;i<o;){if(this.hashed&&(this.hashed=!1,s[0]=this.block,this.block=s[16]=s[1]=s[2]=s[3]=s[4]=s[5]=s[6]=s[7]=s[8]=s[9]=s[10]=s[11]=s[12]=s[13]=s[14]=s[15]=0),n)for(a=this.start;i<o&&a<64;++i)r=e.charCodeAt(i),r<128?s[a>>>2]|=r<<L[a++&3]:r<2048?(s[a>>>2]|=(192|r>>>6)<<L[a++&3],s[a>>>2]|=(128|r&63)<<L[a++&3]):r<55296||r>=57344?(s[a>>>2]|=(224|r>>>12)<<L[a++&3],s[a>>>2]|=(128|r>>>6&63)<<L[a++&3],s[a>>>2]|=(128|r&63)<<L[a++&3]):(r=65536+((r&1023)<<10|e.charCodeAt(++i)&1023),s[a>>>2]|=(240|r>>>18)<<L[a++&3],s[a>>>2]|=(128|r>>>12&63)<<L[a++&3],s[a>>>2]|=(128|r>>>6&63)<<L[a++&3],s[a>>>2]|=(128|r&63)<<L[a++&3]);else for(a=this.start;i<o&&a<64;++i)s[a>>>2]|=e[i]<<L[a++&3];this.lastByteIndex=a,this.bytes+=a-this.start,a>=64?(this.block=s[16],this.start=a-64,this.hash(),this.hashed=!0):this.start=a}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes%=4294967296),this},z.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[16]=this.block,e[t>>>2]|=en[t&3],this.block=e[16],t>=56&&(this.hashed||this.hash(),e[0]=this.block,e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.hBytes<<3|this.bytes>>>29,e[15]=this.bytes<<3,this.hash()}},z.prototype.hash=function(){var e=this.h0,t=this.h1,n=this.h2,r=this.h3,i=this.h4,a=this.h5,o=this.h6,s=this.h7,c=this.blocks,l,u,d,f,p,m,h,g,_,v,y;for(l=16;l<64;++l)p=c[l-15],u=(p>>>7|p<<25)^(p>>>18|p<<14)^p>>>3,p=c[l-2],d=(p>>>17|p<<15)^(p>>>19|p<<13)^p>>>10,c[l]=c[l-16]+u+c[l-7]+d<<0;for(y=t&n,l=0;l<64;l+=4)this.first?(this.is224?(g=300032,p=c[0]-1413257819,s=p-150054599<<0,r=p+24177077<<0):(g=704751109,p=c[0]-210244248,s=p-1521486534<<0,r=p+143694565<<0),this.first=!1):(u=(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10),d=(i>>>6|i<<26)^(i>>>11|i<<21)^(i>>>25|i<<7),g=e&t,f=g^e&n^y,h=i&a^~i&o,p=s+d+h+tn[l]+c[l],m=u+f,s=r+p<<0,r=p+m<<0),u=(r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10),d=(s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7),_=r&e,f=_^r&t^g,h=s&i^~s&a,p=o+d+h+tn[l+1]+c[l+1],m=u+f,o=n+p<<0,n=p+m<<0,u=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10),d=(o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7),v=n&r,f=v^n&e^_,h=o&s^~o&i,p=a+d+h+tn[l+2]+c[l+2],m=u+f,a=t+p<<0,t=p+m<<0,u=(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10),d=(a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7),y=t&n,f=y^t&r^v,h=a&o^~a&s,p=i+d+h+tn[l+3]+c[l+3],m=u+f,i=e+p<<0,e=p+m<<0,this.chromeBugWorkAround=!0;this.h0=this.h0+e<<0,this.h1=this.h1+t<<0,this.h2=this.h2+n<<0,this.h3=this.h3+r<<0,this.h4=this.h4+i<<0,this.h5=this.h5+a<<0,this.h6=this.h6+o<<0,this.h7=this.h7+s<<0},z.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,i=this.h4,a=this.h5,o=this.h6,s=this.h7,c=I[e>>>28&15]+I[e>>>24&15]+I[e>>>20&15]+I[e>>>16&15]+I[e>>>12&15]+I[e>>>8&15]+I[e>>>4&15]+I[e&15]+I[t>>>28&15]+I[t>>>24&15]+I[t>>>20&15]+I[t>>>16&15]+I[t>>>12&15]+I[t>>>8&15]+I[t>>>4&15]+I[t&15]+I[n>>>28&15]+I[n>>>24&15]+I[n>>>20&15]+I[n>>>16&15]+I[n>>>12&15]+I[n>>>8&15]+I[n>>>4&15]+I[n&15]+I[r>>>28&15]+I[r>>>24&15]+I[r>>>20&15]+I[r>>>16&15]+I[r>>>12&15]+I[r>>>8&15]+I[r>>>4&15]+I[r&15]+I[i>>>28&15]+I[i>>>24&15]+I[i>>>20&15]+I[i>>>16&15]+I[i>>>12&15]+I[i>>>8&15]+I[i>>>4&15]+I[i&15]+I[a>>>28&15]+I[a>>>24&15]+I[a>>>20&15]+I[a>>>16&15]+I[a>>>12&15]+I[a>>>8&15]+I[a>>>4&15]+I[a&15]+I[o>>>28&15]+I[o>>>24&15]+I[o>>>20&15]+I[o>>>16&15]+I[o>>>12&15]+I[o>>>8&15]+I[o>>>4&15]+I[o&15];return this.is224||(c+=I[s>>>28&15]+I[s>>>24&15]+I[s>>>20&15]+I[s>>>16&15]+I[s>>>12&15]+I[s>>>8&15]+I[s>>>4&15]+I[s&15]),c},z.prototype.toString=z.prototype.hex,z.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,i=this.h4,a=this.h5,o=this.h6,s=this.h7,c=[e>>>24&255,e>>>16&255,e>>>8&255,e&255,t>>>24&255,t>>>16&255,t>>>8&255,t&255,n>>>24&255,n>>>16&255,n>>>8&255,n&255,r>>>24&255,r>>>16&255,r>>>8&255,r&255,i>>>24&255,i>>>16&255,i>>>8&255,i&255,a>>>24&255,a>>>16&255,a>>>8&255,a&255,o>>>24&255,o>>>16&255,o>>>8&255,o&255];return this.is224||c.push(s>>>24&255,s>>>16&255,s>>>8&255,s&255),c},z.prototype.array=z.prototype.digest,z.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(this.is224?28:32),t=new DataView(e);return t.setUint32(0,this.h0),t.setUint32(4,this.h1),t.setUint32(8,this.h2),t.setUint32(12,this.h3),t.setUint32(16,this.h4),t.setUint32(20,this.h5),t.setUint32(24,this.h6),this.is224||t.setUint32(28,this.h7),e};function cn(e,t,n){var r,i=$t(e);if(e=i[0],i[1]){var a=[],o=e.length,s=0,c;for(r=0;r<o;++r)c=e.charCodeAt(r),c<128?a[s++]=c:c<2048?(a[s++]=192|c>>>6,a[s++]=128|c&63):c<55296||c>=57344?(a[s++]=224|c>>>12,a[s++]=128|c>>>6&63,a[s++]=128|c&63):(c=65536+((c&1023)<<10|e.charCodeAt(++r)&1023),a[s++]=240|c>>>18,a[s++]=128|c>>>12&63,a[s++]=128|c>>>6&63,a[s++]=128|c&63);e=a}e.length>64&&(e=new z(t,!0).update(e).array());var l=[],u=[];for(r=0;r<64;++r){var d=e[r]||0;l[r]=92^d,u[r]=54^d}z.call(this,t,n),this.update(u),this.oKeyPad=l,this.inner=!0,this.sharedMemory=n}cn.prototype=new z,cn.prototype.finalize=function(){if(z.prototype.finalize.call(this),this.inner){this.inner=!1;var e=this.array();z.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(e),z.prototype.finalize.call(this)}};var ln=an(),un=an(!0);ln.sha256=ln,ln.sha224=un,ln.hmac=sn(),un.hmac=sn(!0);const dn=65536,fn={md5:qt,sha1:Yt.sha1,sha256:ln};function pn(e,t){return typeof e==`string`?t===`hex`||t===`base64`||t===`base64url`||t===`latin1`||t===`binary`?new Uint8Array(Qe(e,t===`binary`?`latin1`:t)):e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}function mn(e){let t=String(e).toLowerCase().replace(`-`,``),n=fn[t];if(!n)throw Error(`Digest method not supported: ${e}`);let r=n.create(),i=!1,a={update(e,t){if(i)throw Error(`Digest already called`);return r.update(pn(e,t)),a},digest(e){i=!0;let t=Qe(r.array());return e?t.toString(e):t}};return a}function hn(){let e=globalThis.crypto;if(!e||typeof e.getRandomValues!=`function`)throw Error(`crypto: globalThis.crypto is unavailable in this environment`);return e}function gn(e){return hn().getRandomValues(e)}function _n(e){for(let t=0;t<e.length;t+=dn){let n=Math.min(t+dn,e.length);gn(e.subarray(t,n))}}function vn(e){return e instanceof Uint8Array?e:new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}const B=Array.from({length:256},(e,t)=>(t+256).toString(16).slice(1));function yn(){let e=hn();if(typeof e.randomUUID==`function`)return e.randomUUID();let t=gn(new Uint8Array(16));return t[6]=t[6]&15|64,t[8]=t[8]&63|128,`${B[t[0]]}${B[t[1]]}${B[t[2]]}${B[t[3]]}-${B[t[4]]}${B[t[5]]}-${B[t[6]]}${B[t[7]]}-${B[t[8]]}${B[t[9]]}-${B[t[10]]}${B[t[11]]}${B[t[12]]}${B[t[13]]}${B[t[14]]}${B[t[15]]}`}const bn={randomFillSync(e,t=0,n){let r=vn(e),i=t,a=n===void 0?r.length:i+n;return _n(r.subarray(i,a)),e},randomBytes(e){let t=globalThis.Buffer,n=t&&typeof t.allocUnsafe==`function`?t.allocUnsafe(e):new Uint8Array(e);return _n(vn(n)),n},randomUUID:yn,getRandomValues(e){return gn(e)},createHash:mn,get webcrypto(){return hn()},get subtle(){return hn().subtle}},xn=`20.0.0`,Sn=new Set([`child_process`,`events`,`fs`,`fs/promises`,`os`,`path`,`stream`,`tty`,`url`,`crypto`,`process`,`buffer`,`assert`,`assert/strict`,`util`,`readline`,`readline/promises`,`module`,`vm`]),Cn=new Set(`assert.assert/strict.async_hooks.buffer.child_process.cluster.console.constants.crypto.dgram.diagnostics_channel.dns.dns/promises.domain.events.fs.fs/promises.http.http2.https.inspector.inspector/promises.module.net.os.path.path/posix.path/win32.perf_hooks.process.punycode.querystring.readline.readline/promises.repl.stream.stream/consumers.stream/promises.stream/web.string_decoder.sys.timers.timers/promises.tls.trace_events.tty.url.util.util/types.v8.vm.wasi.worker_threads.zlib`.split(`.`)),wn=new Set([...Cn].filter(e=>!Sn.has(e)));function Tn(e){return e.startsWith(`node:`)?e.slice(5):e}function En(e){return Cn.has(Tn(e))}function Dn(e,t){let n=[];for(let r of e)r!==``&&r!==`.`&&(r===`..`?n.length>0&&n[n.length-1]!==`..`?n.pop():t&&n.push(`..`):n.push(r));return n}function On(e){if(e.length===0)return`.`;let t=e.charCodeAt(0)===47,n=e.charCodeAt(e.length-1)===47,r=Dn(e.split(`/`),!t).join(`/`);return r.length===0&&!t&&(r=`.`),r.length>0&&n&&(r+=`/`),(t?`/`:``)+r}function kn(...e){let t=e.filter(e=>typeof e==`string`&&e.length>0).join(`/`);return t.length===0?`.`:On(t)}function An(e){if(e.length===0)return`.`;let t=e.charCodeAt(0)===47,n=-1,r=!0;for(let t=e.length-1;t>=1;t--)if(e.charCodeAt(t)===47){if(!r){n=t;break}}else r=!1;return n===-1?t?`/`:`.`:t&&n===1?`//`:e.slice(0,n)}function jn(e,t){let n=0,r=-1,i=!0;for(let t=e.length-1;t>=0;t--)if(e.charCodeAt(t)===47){if(!i){n=t+1;break}}else r===-1&&(i=!1,r=t+1);let a=r===-1?``:e.slice(n,r);return t&&a.endsWith(t)&&a!==t?a.slice(0,a.length-t.length):a}function Mn(e){let t=jn(e),n=t.lastIndexOf(`.`);return n<=0?``:t.slice(n)}function Nn(){let e=globalThis.process?.cwd?.();return typeof e==`string`&&e.length>0?e:`/`}function Pn(e,t){let n=``,r=!1;for(let i=t.length-1;i>=-1&&!r;i--){let a=i>=0?t[i]:e();typeof a==`string`&&a.length!==0&&(n=n.length>0?`${a}/${n}`:a,r=a.charCodeAt(0)===47)}let i=Dn(n.split(`/`),!r).join(`/`);return r?i.length>0?`/${i}`:`/`:i.length>0?i:`.`}function Fn(e,t,n){let r=Pn(e,[t]),i=Pn(e,[n]);if(r===i)return``;let a=r.split(`/`).filter(Boolean),o=i.split(`/`).filter(Boolean),s=0;for(;s<a.length&&s<o.length&&a[s]===o[s];)s++;return[...a.slice(s).map(()=>`..`),...o.slice(s)].join(`/`)}function In(e){let t=e.charCodeAt(0)===47?`/`:``,n=jn(e),r=Mn(e),i=r?n.slice(0,n.length-r.length):n,a=An(e);return a===`.`&&t===``&&(a=``),{root:t,dir:a,base:n,ext:r,name:i}}function Ln(e){let t=e.dir||e.root||``,n=e.base||`${e.name||``}${e.ext||``}`;return t?t===e.root?`${t}${n}`:`${t}/${n}`:n}function Rn(e=Nn){return{sep:`/`,delimiter:`:`,basename:jn,dirname:An,extname:Mn,isAbsolute:e=>e.length>0&&e.charCodeAt(0)===47,join:kn,normalize:On,resolve:(...t)=>Pn(e,t),relative:(t,n)=>Fn(e,t,n),parse:In,format:Ln}}const zn=Rn(),Bn=Object.freeze([...Cn]);function Vn(e){return typeof e==`string`&&En(e)}function Hn(e){let t=[],n=e;for(;(n===`/`?``:n.slice(n.lastIndexOf(`/`)+1))!==`node_modules`&&t.push(n===`/`||n===``?`/node_modules`:`${n}/node_modules`),n!==`/`&&n!==``;){let e=n.lastIndexOf(`/`);n=e<=0?e===0?`/`:``:n.slice(0,e)}return t}function Un(e){if(e instanceof URL)return c.fileURLToPath(e);if(typeof e==`string`){if(e.startsWith(`file:`))return c.fileURLToPath(e);if(e.startsWith(`/`))return e}throw TypeError(`The argument 'filename' must be a file URL object, file URL string, or absolute path string. Received ${String(e)}`)}function Wn(e,t){let n=t.startsWith(`/`)?zn.normalize(t):zn.resolve(e,t);return/\.(?:js|json|cjs|mjs)$/.test(n)?[n]:[n,`${n}.js`,`${n}.json`,`${n}.cjs`,`${n}/index.js`,`${n}/index.json`]}function Gn(e,t,n){for(let r of Wn(e,t))if(n(r))return r}function Kn(e,t,n){for(let r of Hn(e)){let e=Gn(r,t,n);if(e)return e}}function qn(e){return e.startsWith(`.`)||e.startsWith(`/`)}function Jn(e){function t(e){return{exports:{},id:e??``,filename:e??``,loaded:!1}}let n=t;return n.createRequire=t=>Yn(e,t),n.builtinModules=Bn,n.isBuiltin=Vn,n._nodeModulePaths=Hn,n.Module=n,n}function Yn(e,t){let n=Un(t),r=(t=>e.requireFrom(n,t));return r.resolve=(t,r)=>{if(r?.paths&&r.paths.length>0){let n;for(let i of r.paths)try{return e.resolveFrom(Xn(i),t)}catch(e){n=e}throw n instanceof Error?n:Error(`Cannot find module '${t}'`)}return e.resolveFrom(n,t)},r}function Xn(e){return`${e.endsWith(`/`)&&e!==`/`?e.slice(0,-1):e}/noop.js`}const Zn=`TMPDIR`;function Qn(e){let t=e&&typeof e.get==`function`?e.get(Zn):e?.[Zn];return t?.trim()?t:`/tmp`}const $n={platform:()=>`linux`,arch:()=>`x64`,EOL:`
|
|
33
|
+
`,cpus:()=>[{model:`virtual`,speed:0}],hostname:()=>`slicc`,type:()=>`Linux`,release:()=>`0.0.0`};function er(e){return{...$n,tmpdir:()=>Qn(e),homedir:()=>e?.HOME?.trim()?e.HOME:`/home/user`}}const tr=er(),nr={isatty:e=>!1,ReadStream:class{},WriteStream:class{}},rr=new WeakMap;let ir=new Set,ar=null;const or=/\bfunction\s*\*?\s*([A-Za-z_$][\w$]*)\s*\(/g,sr=/\b(?:const|let|class)\s+([A-Za-z_$][\w$]*)/g,cr=new Set(`arguments await break case catch class const continue debugger default delete do else enum eval export extends false finally for function if implements import in instanceof interface let new null package private protected public return static super switch this throw true try typeof var void while with yield`.split(` `));function lr(e,t){return[...new Set([...e.matchAll(t)].map(e=>e[1]))].filter(e=>!cr.has(e))}function ur(e){return e.length===0?``:`\n;let __vm_lexcap = (__vm_out.lex = () => ({ ${e.join(`, `)} }));`}function dr(){return ar??=Function(`__vm_scope`,`__vm_code`,`__vm_fns`,`__vm_out`,`with (__vm_scope) { __vm_out.value = eval(__vm_code); }
|
|
34
34
|
for (var __vm_i = 0; __vm_i < __vm_fns.length; __vm_i++) {
|
|
35
35
|
try { __vm_out.fns.set(__vm_fns[__vm_i], eval(__vm_fns[__vm_i])); } catch (e) {}
|
|
36
|
-
}`),Zn}function ir(e){let t=new Map,n=new Proxy(e,{has(e,t){return typeof t==`symbol`||t===`eval`||t.startsWith(`__vm_`)?!1:!Xn.has(t)},get(e,r,i){if(r===Symbol.unscopables)return;if(r in e)return Reflect.get(e,r,i);if(r===`globalThis`)return n;let a=Reflect.get(globalThis,r);return typeof a!=`function`||`prototype`in a?a:(t.has(r)||t.set(r,a.bind(globalThis)),t.get(r))},set(e,t,n){return Reflect.set(e,t,n)}});return n}function ar(e){return typeof e==`string`?e:e?.filename}function or(e,t){let n=ar(t);return n?`${e}\n//# sourceURL=${n}`:e}function sr(e){let t=e??{};return Yn.has(t)||Yn.set(t,ir(t)),t}function cr(e){return typeof e==`object`&&!!e&&Yn.has(e)}function lr(e,t,n){let r=Yn.get(t);if(!r)throw TypeError(`The "contextifiedObject" argument must be an vm.Context`);let i=String(e),a=tr(i,Qn),o=tr(i,$n),s={value:void 0,fns:new Map},c=Xn;Xn=new Set(a);try{let e=or(i+nr(o),n);rr().call(r,r,e,a,s)}finally{Xn=c}let l=(e,t)=>t!==void 0&&t!==Reflect.get(globalThis,e);for(let[e,n]of s.fns)typeof n==`function`&&l(e,n)&&Reflect.set(t,e,n);for(let[e,n]of Object.entries(s.lex?.()??{}))l(e,n)&&Reflect.set(t,e,n);return s.value}function ur(e,t,n){return lr(e,sr(t),n)}function dr(e,t){let n=globalThis.eval;return n(or(String(e),t))}var fr=class{#e;#t;constructor(e,t){this.#e=String(e),this.#t=t}runInContext(e){return lr(this.#e,e,this.#t)}runInNewContext(e){return ur(this.#e,e,this.#t)}runInThisContext(){return dr(this.#e,this.#t)}};function pr(e,t=[]){return Function(...t,String(e))}const mr={Script:fr,createContext:sr,isContext:cr,runInContext:lr,runInNewContext:ur,runInThisContext:dr,compileFunction:pr};var hr=4,gr=0,_r=1,vr=2;function yr(e){let t=e.length;for(;--t>=0;)e[t]=0}var br=29,xr=256,Sr=286,Cr=30,wr=19,Tr=573,Er=15,Dr=16,Or=7,kr=256,Ar=16,jr=17,Mr=18,Nr=new Uint8Array([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]),Pr=new Uint8Array([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]),Fr=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),Ir=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Lr=512,Rr=Array(576);yr(Rr);var zr=Array(Cr*2);yr(zr);var Br=Array(Lr);yr(Br);var Vr=Array(256);yr(Vr);var Hr=Array(br);yr(Hr);var Ur=Array(Cr);yr(Ur);var Wr=class{constructor(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}},Gr,Kr,qr,Jr=class{constructor(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}},Yr=e=>e<256?Br[e]:Br[256+(e>>>7)],Xr=(e,t)=>{e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255},V=(e,t,n)=>{e.bi_valid>Dr-n?(e.bi_buf|=t<<e.bi_valid&65535,Xr(e,e.bi_buf),e.bi_buf=t>>Dr-e.bi_valid,e.bi_valid+=n-Dr):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)},H=(e,t,n)=>{V(e,n[t*2],n[t*2+1])},Zr=(e,t)=>{let n=0;do n|=e&1,e>>>=1,n<<=1;while(--t>0);return n>>>1},Qr=e=>{e.bi_valid===16?(Xr(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)},$r=(e,t)=>{let n=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,a=t.stat_desc.has_stree,o=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,c=t.stat_desc.max_length,l,u,d,f,p,m,h=0;for(f=0;f<=Er;f++)e.bl_count[f]=0;for(n[e.heap[e.heap_max]*2+1]=0,l=e.heap_max+1;l<Tr;l++)u=e.heap[l],f=n[n[u*2+1]*2+1]+1,f>c&&(f=c,h++),n[u*2+1]=f,!(u>r)&&(e.bl_count[f]++,p=0,u>=s&&(p=o[u-s]),m=n[u*2],e.opt_len+=m*(f+p),a&&(e.static_len+=m*(i[u*2+1]+p)));if(h!==0){do{for(f=c-1;e.bl_count[f]===0;)f--;e.bl_count[f]--,e.bl_count[f+1]+=2,e.bl_count[c]--,h-=2}while(h>0);for(f=c;f!==0;f--)for(u=e.bl_count[f];u!==0;)d=e.heap[--l],!(d>r)&&(n[d*2+1]!==f&&(e.opt_len+=(f-n[d*2+1])*n[d*2],n[d*2+1]=f),u--)}},ei=(e,t,n)=>{let r=Array(16),i=0,a,o;for(a=1;a<=Er;a++)i=i+n[a-1]<<1,r[a]=i;for(o=0;o<=t;o++){let t=e[o*2+1];t!==0&&(e[o*2]=Zr(r[t]++,t))}},ti=()=>{let e,t,n,r,i,a=Array(16);for(n=0,r=0;r<br-1;r++)for(Hr[r]=n,e=0;e<1<<Nr[r];e++)Vr[n++]=r;for(Vr[n-1]=r,i=0,r=0;r<16;r++)for(Ur[r]=i,e=0;e<1<<Pr[r];e++)Br[i++]=r;for(i>>=7;r<Cr;r++)for(Ur[r]=i<<7,e=0;e<1<<Pr[r]-7;e++)Br[256+i++]=r;for(t=0;t<=Er;t++)a[t]=0;for(e=0;e<=143;)Rr[e*2+1]=8,e++,a[8]++;for(;e<=255;)Rr[e*2+1]=9,e++,a[9]++;for(;e<=279;)Rr[e*2+1]=7,e++,a[7]++;for(;e<=287;)Rr[e*2+1]=8,e++,a[8]++;for(ei(Rr,287,a),e=0;e<Cr;e++)zr[e*2+1]=5,zr[e*2]=Zr(e,5);Gr=new Wr(Rr,Nr,257,Sr,Er),Kr=new Wr(zr,Pr,0,Cr,Er),qr=new Wr([],Fr,0,wr,Or)},ni=e=>{let t;for(t=0;t<Sr;t++)e.dyn_ltree[t*2]=0;for(t=0;t<Cr;t++)e.dyn_dtree[t*2]=0;for(t=0;t<wr;t++)e.bl_tree[t*2]=0;e.dyn_ltree[kr*2]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},ri=e=>{e.bi_valid>8?Xr(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},ii=(e,t,n,r)=>{let i=t*2,a=n*2;return e[i]<e[a]||e[i]===e[a]&&r[t]<=r[n]},ai=(e,t,n)=>{let r=e.heap[n],i=n<<1;for(;i<=e.heap_len&&(i<e.heap_len&&ii(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!ii(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r},oi=(e,t,n)=>{let r,i,a=0,o,s;if(e.sym_next!==0)do r=e.pending_buf[e.sym_buf+a++]&255,r+=(e.pending_buf[e.sym_buf+a++]&255)<<8,i=e.pending_buf[e.sym_buf+a++],r===0?H(e,i,t):(o=Vr[i],H(e,o+xr+1,t),s=Nr[o],s!==0&&(i-=Hr[o],V(e,i,s)),r--,o=Yr(r),H(e,o,n),s=Pr[o],s!==0&&(r-=Ur[o],V(e,r,s)));while(a<e.sym_next);H(e,kr,t)},si=(e,t)=>{let n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,a=t.stat_desc.elems,o,s,c=-1,l;for(e.heap_len=0,e.heap_max=Tr,o=0;o<a;o++)n[o*2]===0?n[o*2+1]=0:(e.heap[++e.heap_len]=c=o,e.depth[o]=0);for(;e.heap_len<2;)l=e.heap[++e.heap_len]=c<2?++c:0,n[l*2]=1,e.depth[l]=0,e.opt_len--,i&&(e.static_len-=r[l*2+1]);for(t.max_code=c,o=e.heap_len>>1;o>=1;o--)ai(e,n,o);l=a;do o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],ai(e,n,1),s=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=s,n[l*2]=n[o*2]+n[s*2],e.depth[l]=(e.depth[o]>=e.depth[s]?e.depth[o]:e.depth[s])+1,n[o*2+1]=n[s*2+1]=l,e.heap[1]=l++,ai(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],$r(e,t),ei(n,c,e.bl_count)},ci=(e,t,n)=>{let r,i=-1,a,o=t[1],s=0,c=7,l=4;for(o===0&&(c=138,l=3),t[(n+1)*2+1]=65535,r=0;r<=n;r++)a=o,o=t[(r+1)*2+1],!(++s<c&&a===o)&&(s<l?e.bl_tree[a*2]+=s:a===0?s<=10?e.bl_tree[34]++:e.bl_tree[36]++:(a!==i&&e.bl_tree[a*2]++,e.bl_tree[32]++),s=0,i=a,o===0?(c=138,l=3):a===o?(c=6,l=3):(c=7,l=4))},li=(e,t,n)=>{let r,i=-1,a,o=t[1],s=0,c=7,l=4;for(o===0&&(c=138,l=3),r=0;r<=n;r++)if(a=o,o=t[(r+1)*2+1],!(++s<c&&a===o)){if(s<l)do H(e,a,e.bl_tree);while(--s!==0);else a===0?s<=10?(H(e,jr,e.bl_tree),V(e,s-3,3)):(H(e,Mr,e.bl_tree),V(e,s-11,7)):(a!==i&&(H(e,a,e.bl_tree),s--),H(e,Ar,e.bl_tree),V(e,s-3,2));s=0,i=a,o===0?(c=138,l=3):a===o?(c=6,l=3):(c=7,l=4)}},ui=e=>{let t;for(ci(e,e.dyn_ltree,e.l_desc.max_code),ci(e,e.dyn_dtree,e.d_desc.max_code),si(e,e.bl_desc),t=18;t>=3&&e.bl_tree[Ir[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t},di=(e,t,n,r)=>{let i;for(V(e,t-257,5),V(e,n-1,5),V(e,r-4,4),i=0;i<r;i++)V(e,e.bl_tree[Ir[i]*2+1],3);li(e,e.dyn_ltree,t-1),li(e,e.dyn_dtree,n-1)},fi=e=>{let t=4093624447,n;for(n=0;n<=31;n++,t>>>=1)if(t&1&&e.dyn_ltree[n*2]!==0)return gr;if(e.dyn_ltree[18]!==0||e.dyn_ltree[20]!==0||e.dyn_ltree[26]!==0)return _r;for(n=32;n<xr;n++)if(e.dyn_ltree[n*2]!==0)return _r;return gr},pi=!1,mi=e=>{pi||=(ti(),!0),e.l_desc=new Jr(e.dyn_ltree,Gr),e.d_desc=new Jr(e.dyn_dtree,Kr),e.bl_desc=new Jr(e.bl_tree,qr),e.bi_buf=0,e.bi_valid=0,ni(e)},hi=(e,t,n,r)=>{V(e,0+ +!!r,3),ri(e),Xr(e,n),Xr(e,~n),n&&e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n},gi=e=>{V(e,2,3),H(e,kr,Rr),Qr(e)},_i=(e,t,n,r)=>{let i,a,o=0;e.level>0?(e.strm.data_type===vr&&(e.strm.data_type=fi(e)),si(e,e.l_desc),si(e,e.d_desc),o=ui(e),i=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=i&&(i=a)):i=a=n+5,n+4<=i&&t!==-1?hi(e,t,n,r):e.strategy===hr||a===i?(V(e,2+ +!!r,3),oi(e,Rr,zr)):(V(e,4+ +!!r,3),di(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),oi(e,e.dyn_ltree,e.dyn_dtree)),ni(e),r&&ri(e)},vi=(e,t,n)=>(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=n,t===0?e.dyn_ltree[n*2]++:(e.matches++,t--,e.dyn_ltree[(Vr[n]+xr+1)*2]++,e.dyn_dtree[Yr(t)*2]++),e.sym_next===e.sym_end),yi=(e,t,n,r)=>{let i=e&65535|0,a=e>>>16&65535|0,o=0;for(;n!==0;){o=n>2e3?2e3:n,n-=o;do i=i+t[r++]|0,a=a+i|0;while(--o);i%=65521,a%=65521}return i|a<<16|0},bi=new Uint32Array((()=>{let e,t=[];for(var n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=e&1?3988292384^e>>>1:e>>>1;t[n]=e}return t})()),U=(e,t,n,r)=>{let i=bi,a=r+n;e^=-1;for(let n=r;n<a;n++)e=e>>>8^i[(e^t[n])&255];return e^-1},xi={2:`need dictionary`,1:`stream end`,0:``,"-1":`file error`,"-2":`stream error`,"-3":`data error`,"-4":`insufficient memory`,"-5":`buffer error`,"-6":`incompatible version`},Si=9,Ci=573,W=3,wi=258,G=262,Ti=32,Ei=42,Di=57,Oi=69,ki=73,Ai=91,ji=103,Mi=113,Ni=666,K=1,Pi=2,Fi=3,Ii=4,Li=3,Ri=(e,t)=>(e.msg=xi[t],t),zi=e=>e*2-(e>4?9:0),Bi=e=>{let t=e.length;for(;--t>=0;)e[t]=0},Vi=e=>{let t,n,r,i=e.w_size;t=e.hash_size,r=t;do n=e.head[--r],e.head[r]=n>=i?n-i:0;while(--t);t=i,r=t;do n=e.prev[--r],e.prev[r]=n>=i?n-i:0;while(--t)},Hi=(e,t,n)=>(t<<e.hash_shift^n)&e.hash_mask,Ui=(e,t)=>{let n;if(e.legacy_hash)n=e.ins_h=Hi(e,e.ins_h,e.window[t+W-1]);else{let r=e.window,i=r[t]|r[t+1]<<8|r[t+2]<<16|r[t+3]<<24;n=e.ins_h=Math.imul(i,66521)+66521>>>16&e.hash_mask}let r=e.prev[t&e.w_mask]=e.head[n];return e.head[n]=t,r},q=e=>{let t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),n!==0&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+n),e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,t.pending===0&&(t.pending_out=0))},J=(e,t)=>{_i(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,q(e.strm)},Y=(e,t)=>{e.pending_buf[e.pending++]=t},Wi=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255},Gi=(e,t,n,r)=>{let i=e.avail_in;return i>r&&(i=r),i===0?0:(e.avail_in-=i,t.set(e.input.subarray(e.next_in,e.next_in+i),n),e.state.wrap===1?e.adler=yi(e.adler,t,i,n):e.state.wrap===2&&(e.adler=U(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)},Ki=(e,t)=>{let n=e.max_chain_length,r=e.strstart,i,a,o=e.prev_length,s=e.nice_match,c=e.strstart>e.w_size-G?e.strstart-(e.w_size-G):0,l=e.window,u=e.w_mask,d=e.prev,f=e.strstart+wi,p=l[r+o-1],m=l[r+o];e.prev_length>=e.good_match&&(n>>=2),s>e.lookahead&&(s=e.lookahead);do if(i=t,l[i+o]===m&&l[i+o-1]===p&&l[i]===l[r]&&l[++i]===l[r+1]){r+=2,i++;do;while(l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&r<f);if(a=wi-(f-r),r=f-wi,a>o){if(e.match_start=t,o=a,a>=s)break;p=l[r+o-1],m=l[r+o]}}while((t=d[t&u])>c&&--n!==0);return o<=e.lookahead?o:e.lookahead},qi=e=>{let t=e.w_size,n,r,i;do{if(r=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-G)&&(e.window.set(e.window.subarray(t,t+t-r),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),Vi(e),r+=t),e.strm.avail_in===0)break;if(n=Gi(e.strm,e.window,e.strstart+e.lookahead,r),e.lookahead+=n,!e.legacy_hash){if(e.lookahead+e.insert>W)for(i=e.strstart-e.insert;e.insert&&(Ui(e,i),i++,e.insert--,!(e.lookahead+e.insert<=W)););}else if(e.lookahead+e.insert>=W)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=Hi(e,e.ins_h,e.window[i+1]);e.insert&&(Ui(e,i),i++,e.insert--,!(e.lookahead+e.insert<W)););}while(e.lookahead<G&&e.strm.avail_in!==0)},Ji=(e,t)=>{let n=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,r,i,a,o=0,s=e.strm.avail_in;do{if(r=65535,a=e.bi_valid+42>>3,e.strm.avail_out<a||(a=e.strm.avail_out-a,i=e.strstart-e.block_start,r>i+e.strm.avail_in&&(r=i+e.strm.avail_in),r>a&&(r=a),r<n&&(r===0&&t!==4||t===0||r!==i+e.strm.avail_in)))break;o=+(t===4&&r===i+e.strm.avail_in),hi(e,0,0,o),e.pending_buf[e.pending-4]=r,e.pending_buf[e.pending-3]=r>>8,e.pending_buf[e.pending-2]=~r,e.pending_buf[e.pending-1]=~r>>8,q(e.strm),i&&(i>r&&(i=r),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+i),e.strm.next_out),e.strm.next_out+=i,e.strm.avail_out-=i,e.strm.total_out+=i,e.block_start+=i,r-=i),r&&(Gi(e.strm,e.strm.output,e.strm.next_out,r),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r)}while(o===0);return s-=e.strm.avail_in,s&&(s>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=s&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-s,e.strm.next_in),e.strstart),e.strstart+=s,e.insert+=s>e.w_size-e.insert?e.w_size-e.insert:s),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),o?Ii:t!==0&&t!==4&&e.strm.avail_in===0&&e.strstart===e.block_start?Pi:(a=e.window_size-e.strstart,e.strm.avail_in>a&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,a+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),a>e.strm.avail_in&&(a=e.strm.avail_in),a&&(Gi(e.strm,e.window,e.strstart,a),e.strstart+=a,e.insert+=a>e.w_size-e.insert?e.w_size-e.insert:a),e.high_water<e.strstart&&(e.high_water=e.strstart),a=e.bi_valid+42>>3,a=e.pending_buf_size-a>65535?65535:e.pending_buf_size-a,n=a>e.w_size?e.w_size:a,i=e.strstart-e.block_start,(i>=n||(i||t===4)&&t!==0&&e.strm.avail_in===0&&i<=a)&&(r=i>a?a:i,o=+(t===4&&e.strm.avail_in===0&&r===i),hi(e,e.block_start,r,o),e.block_start+=r,q(e.strm)),o?Fi:K)},Yi=(e,t)=>{let n,r;for(;;){if(e.lookahead<G){if(qi(e),e.lookahead<G&&t===0)return K;if(e.lookahead===0)break}if(n=0,e.lookahead>=W&&(n=Ui(e,e.strstart)),n!==0&&e.strstart-n<=e.w_size-G&&(e.match_length=Ki(e,n)),e.match_length>=W){if(r=vi(e,e.strstart-e.match_start,e.match_length-W),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=W){e.match_length--;do e.strstart++,n=Ui(e,e.strstart);while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.legacy_hash&&(e.ins_h=e.window[e.strstart],e.ins_h=Hi(e,e.ins_h,e.window[e.strstart+1]))}else r=vi(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(J(e,!1),e.strm.avail_out===0))return K}return e.insert=e.strstart<W-1?e.strstart:W-1,t===4?(J(e,!0),e.strm.avail_out===0?Fi:Ii):e.sym_next&&(J(e,!1),e.strm.avail_out===0)?K:Pi},Xi=(e,t)=>{let n,r,i;for(;;){if(e.lookahead<G){if(qi(e),e.lookahead<G&&t===0)return K;if(e.lookahead===0)break}if(n=0,e.lookahead>=W&&(n=Ui(e,e.strstart)),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=W-1,n!==0&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-G&&(e.match_length=Ki(e,n),e.match_length<=5&&(e.strategy===1||e.match_length===W&&e.strstart-e.match_start>4096)&&(e.match_length=W-1)),e.prev_length>=W&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-W,r=vi(e,e.strstart-1-e.prev_match,e.prev_length-W),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(n=Ui(e,e.strstart));while(--e.prev_length!==0);if(e.match_available=0,e.match_length=W-1,e.strstart++,r&&(J(e,!1),e.strm.avail_out===0))return K}else if(e.match_available){if(r=vi(e,0,e.window[e.strstart-1]),r&&J(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return K}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&=(r=vi(e,0,e.window[e.strstart-1]),0),e.insert=e.strstart<W-1?e.strstart:W-1,t===4?(J(e,!0),e.strm.avail_out===0?Fi:Ii):e.sym_next&&(J(e,!1),e.strm.avail_out===0)?K:Pi},Zi=(e,t)=>{let n,r,i,a,o=e.window;for(;;){if(e.lookahead<=wi){if(qi(e),e.lookahead<=wi&&t===0)return K;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=W&&e.strstart>0&&(i=e.strstart-1,r=o[i],r===o[++i]&&r===o[++i]&&r===o[++i])){a=e.strstart+wi;do;while(r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&i<a);e.match_length=wi-(a-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=W?(n=vi(e,1,e.match_length-W),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=vi(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(J(e,!1),e.strm.avail_out===0))return K}return e.insert=0,t===4?(J(e,!0),e.strm.avail_out===0?Fi:Ii):e.sym_next&&(J(e,!1),e.strm.avail_out===0)?K:Pi},Qi=(e,t)=>{let n;for(;;){if(e.lookahead===0&&(qi(e),e.lookahead===0)){if(t===0)return K;break}if(e.match_length=0,n=vi(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(J(e,!1),e.strm.avail_out===0))return K}return e.insert=0,t===4?(J(e,!0),e.strm.avail_out===0?Fi:Ii):e.sym_next&&(J(e,!1),e.strm.avail_out===0)?K:Pi},X=class{constructor(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}},$i=[new X(0,0,0,0,Ji),new X(4,4,8,4,Yi),new X(4,5,16,8,Yi),new X(4,6,32,32,Yi),new X(4,4,16,16,Xi),new X(8,16,32,32,Xi),new X(8,16,128,128,Xi),new X(8,32,128,256,Xi),new X(32,128,258,1024,Xi),new X(32,258,258,4096,Xi)],ea=e=>{e.window_size=2*e.w_size,Bi(e.head),e.max_lazy_match=$i[e.level].max_lazy,e.good_match=$i[e.level].good_length,e.nice_match=$i[e.level].nice_length,e.max_chain_length=$i[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=W-1,e.match_available=0,e.ins_h=0},ta=class{constructor(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.legacy_hash=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(Ci*2),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),Bi(this.dyn_ltree),Bi(this.dyn_dtree),Bi(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),Bi(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),Bi(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}},na=e=>{if(!e)return 1;let t=e.state;return+(!t||t.strm!==e||t.status!==Ei&&t.status!==Di&&t.status!==Oi&&t.status!==ki&&t.status!==Ai&&t.status!==ji&&t.status!==Mi&&t.status!==Ni)},ra=e=>{if(na(e))return Ri(e,-2);e.total_in=e.total_out=0,e.data_type=2;let t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap===2?Di:t.wrap?Ei:Mi,e.adler=t.wrap===2?0:1,t.last_flush=-2,mi(t),0},ia=e=>{let t=ra(e);return t===0&&ea(e.state),t},aa=(e,t,n,r,i,a,o)=>{if(!e)return-2;let s=1;if(t===-1&&(t=6),r<0?(s=0,r=-r):r>15&&(s=2,r-=16),i<1||i>Si||n!==8||r<8||r>15||t<0||t>9||a<0||a>4||r===8&&s!==1)return Ri(e,-2);r===8&&(r=9);let c=new ta;return e.state=c,c.strm=e,c.status=Ei,c.wrap=s,c.gzhead=null,c.w_bits=r,c.w_size=1<<c.w_bits,c.w_mask=c.w_size-1,c.legacy_hash=+!!o,c.hash_bits=i+7,!c.legacy_hash&&c.hash_bits<15&&(c.hash_bits=15),c.hash_size=1<<c.hash_bits,c.hash_mask=c.hash_size-1,c.hash_shift=~~((c.hash_bits+W-1)/W),c.window=new Uint8Array(c.w_size*2),c.head=new Uint16Array(c.hash_size),c.prev=new Uint16Array(c.w_size),c.lit_bufsize=1<<i+6,c.pending_buf_size=c.lit_bufsize*4,c.pending_buf=new Uint8Array(c.pending_buf_size),c.sym_buf=c.lit_bufsize,c.sym_end=(c.lit_bufsize-1)*3,c.level=t,c.strategy=a,c.method=n,ia(e)},oa=(e,t)=>{if(na(e)||t>5||t<0)return e?Ri(e,-2):-2;let n=e.state;if(!e.output||e.avail_in!==0&&!e.input||n.status===Ni&&t!==4)return Ri(e,e.avail_out===0?-5:-2);let r=n.last_flush;if(n.last_flush=t,n.pending!==0){if(q(e),e.avail_out===0)return n.last_flush=-1,0}else if(e.avail_in===0&&zi(t)<=zi(r)&&t!==4)return Ri(e,-5);if(n.status===Ni&&e.avail_in!==0)return Ri(e,-5);if(n.status===Ei&&n.wrap===0&&(n.status=Mi),n.status===Ei){let t=8+(n.w_bits-8<<4)<<8,r=-1;if(r=n.strategy>=2||n.level<2?0:n.level<6?1:n.level===6?2:3,t|=r<<6,n.strstart!==0&&(t|=Ti),t+=31-t%31,Wi(n,t),n.strstart!==0&&(Wi(n,e.adler>>>16),Wi(n,e.adler&65535)),e.adler=1,n.status=Mi,q(e),n.pending!==0)return n.last_flush=-1,0}if(n.status===Di){if(e.adler=0,Y(n,31),Y(n,139),Y(n,8),n.gzhead)Y(n,+!!n.gzhead.text+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),Y(n,n.gzhead.time&255),Y(n,n.gzhead.time>>8&255),Y(n,n.gzhead.time>>16&255),Y(n,n.gzhead.time>>24&255),Y(n,n.level===9?2:n.strategy>=2||n.level<2?4:0),Y(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(Y(n,n.gzhead.extra.length&255),Y(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=U(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=Oi;else if(Y(n,0),Y(n,0),Y(n,0),Y(n,0),Y(n,0),Y(n,n.level===9?2:n.strategy>=2||n.level<2?4:0),Y(n,Li),n.status=Mi,q(e),n.pending!==0)return n.last_flush=-1,0}if(n.status===Oi){if(n.gzhead.extra){let t=n.pending,r=(n.gzhead.extra.length&65535)-n.gzindex;for(;n.pending+r>n.pending_buf_size;){let i=n.pending_buf_size-n.pending;if(n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex,n.gzindex+i),n.pending),n.pending=n.pending_buf_size,n.gzhead.hcrc&&n.pending>t&&(e.adler=U(e.adler,n.pending_buf,n.pending-t,t)),n.gzindex+=i,q(e),n.pending!==0)return n.last_flush=-1,0;t=0,r-=i}let i=new Uint8Array(n.gzhead.extra);n.pending_buf.set(i.subarray(n.gzindex,n.gzindex+r),n.pending),n.pending+=r,n.gzhead.hcrc&&n.pending>t&&(e.adler=U(e.adler,n.pending_buf,n.pending-t,t)),n.gzindex=0}n.status=ki}if(n.status===ki){if(n.gzhead.name){let t=n.pending,r;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>t&&(e.adler=U(e.adler,n.pending_buf,n.pending-t,t)),q(e),n.pending!==0)return n.last_flush=-1,0;t=0}r=n.gzindex<n.gzhead.name.length?n.gzhead.name.charCodeAt(n.gzindex++)&255:0,Y(n,r)}while(r!==0);n.gzhead.hcrc&&n.pending>t&&(e.adler=U(e.adler,n.pending_buf,n.pending-t,t)),n.gzindex=0}n.status=Ai}if(n.status===Ai){if(n.gzhead.comment){let t=n.pending,r;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>t&&(e.adler=U(e.adler,n.pending_buf,n.pending-t,t)),q(e),n.pending!==0)return n.last_flush=-1,0;t=0}r=n.gzindex<n.gzhead.comment.length?n.gzhead.comment.charCodeAt(n.gzindex++)&255:0,Y(n,r)}while(r!==0);n.gzhead.hcrc&&n.pending>t&&(e.adler=U(e.adler,n.pending_buf,n.pending-t,t))}n.status=ji}if(n.status===ji){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(q(e),n.pending!==0))return n.last_flush=-1,0;Y(n,e.adler&255),Y(n,e.adler>>8&255),e.adler=0}if(n.status=Mi,q(e),n.pending!==0)return n.last_flush=-1,0}if(e.avail_in!==0||n.lookahead!==0||t!==0&&n.status!==Ni){let r=n.level===0?Ji(n,t):n.strategy===2?Qi(n,t):n.strategy===3?Zi(n,t):$i[n.level].func(n,t);if((r===Fi||r===Ii)&&(n.status=Ni),r===K||r===Fi)return e.avail_out===0&&(n.last_flush=-1),0;if(r===Pi&&(t===1?gi(n):t!==5&&(hi(n,0,0,!1),t===3&&(Bi(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),q(e),e.avail_out===0))return n.last_flush=-1,0}return t===4?n.wrap<=0?1:(n.wrap===2?(Y(n,e.adler&255),Y(n,e.adler>>8&255),Y(n,e.adler>>16&255),Y(n,e.adler>>24&255),Y(n,e.total_in&255),Y(n,e.total_in>>8&255),Y(n,e.total_in>>16&255),Y(n,e.total_in>>24&255)):(Wi(n,e.adler>>>16),Wi(n,e.adler&65535)),q(e),n.wrap>0&&(n.wrap=-n.wrap),+(n.pending===0)):0},sa=e=>{if(na(e))return-2;let t=e.state.status;return e.state=null,t===Mi?Ri(e,-3):0},ca=(e,t)=>{let n=t.length;if(na(e))return-2;let r=e.state,i=r.wrap;if(i===2||i===1&&r.status!==Ei||r.lookahead)return-2;if(i===1&&(e.adler=yi(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){i===0&&(Bi(r.head),r.strstart=0,r.block_start=0,r.insert=0);let e=new Uint8Array(r.w_size);e.set(t.subarray(n-r.w_size,n),0),t=e,n=r.w_size}let a=e.avail_in,o=e.next_in,s=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,qi(r);r.lookahead>=W;){let e=r.strstart,t=r.lookahead-(W-1);do Ui(r,e),e++;while(--t);r.strstart=e,r.lookahead=W-1,qi(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=W-1,r.match_available=0,e.next_in=o,e.input=s,e.avail_in=a,r.wrap=i,0},la=16209,ua=16191;function da(e,t){let n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E=e.state;n=e.next_in,w=e.input,r=n+(e.avail_in-5),i=e.next_out,T=e.output,a=i-(t-e.avail_out),o=i+(e.avail_out-257),s=E.dmax,c=E.wsize,l=E.whave,u=E.wnext,d=E.window,f=E.hold,p=E.bits,m=E.lencode,h=E.distcode,g=(1<<E.lenbits)-1,_=(1<<E.distbits)-1;top:do{p<15&&(f+=w[n++]<<p,p+=8,f+=w[n++]<<p,p+=8),v=m[f&g];dolen:for(;;){if(y=v>>>24,f>>>=y,p-=y,y=v>>>16&255,y===0)T[i++]=v&65535;else if(y&16){b=v&65535,y&=15,y&&(p<y&&(f+=w[n++]<<p,p+=8),b+=f&(1<<y)-1,f>>>=y,p-=y),p<15&&(f+=w[n++]<<p,p+=8,f+=w[n++]<<p,p+=8),v=h[f&_];dodist:for(;;){if(y=v>>>24,f>>>=y,p-=y,y=v>>>16&255,y&16){if(x=v&65535,y&=15,p<y&&(f+=w[n++]<<p,p+=8,p<y&&(f+=w[n++]<<p,p+=8)),x+=f&(1<<y)-1,x>s){e.msg=`invalid distance too far back`,E.mode=la;break top}if(f>>>=y,p-=y,y=i-a,x>y){if(y=x-y,y>l&&E.sane){e.msg=`invalid distance too far back`,E.mode=la;break top}if(S=0,C=d,u===0){if(S+=c-y,y<b){b-=y;do T[i++]=d[S++];while(--y);S=i-x,C=T}}else if(u<y){if(S+=c+u-y,y-=u,y<b){b-=y;do T[i++]=d[S++];while(--y);if(S=0,u<b){y=u,b-=y;do T[i++]=d[S++];while(--y);S=i-x,C=T}}}else if(S+=u-y,y<b){b-=y;do T[i++]=d[S++];while(--y);S=i-x,C=T}for(;b>2;)T[i++]=C[S++],T[i++]=C[S++],T[i++]=C[S++],b-=3;b&&(T[i++]=C[S++],b>1&&(T[i++]=C[S++]))}else{S=i-x;do T[i++]=T[S++],T[i++]=T[S++],T[i++]=T[S++],b-=3;while(b>2);b&&(T[i++]=T[S++],b>1&&(T[i++]=T[S++]))}}else if(y&64){e.msg=`invalid distance code`,E.mode=la;break top}else{v=h[(v&65535)+(f&(1<<y)-1)];continue dodist}break}}else if(!(y&64)){v=m[(v&65535)+(f&(1<<y)-1)];continue dolen}else if(y&32){E.mode=ua;break top}else{e.msg=`invalid literal/length code`,E.mode=la;break top}break}}while(n<r&&i<o);b=p>>3,n-=b,p-=b<<3,f&=(1<<p)-1,e.next_in=n,e.next_out=i,e.avail_in=n<r?5+(r-n):5-(n-r),e.avail_out=i<o?257+(o-i):257-(i-o),E.hold=f,E.bits=p}var fa=15,pa=852,ma=592,ha=0,ga=1,_a=2,va=new Uint16Array([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]),ya=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,199,75]),ba=new Uint16Array([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,0,0]),xa=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),Sa=(e,t,n,r,i,a,o,s)=>{let c=s.bits,l=0,u=0,d=0,f=0,p=0,m=0,h=0,g=0,_=0,v=0,y,b,x,S,C,w=null,T,E=new Uint16Array(16),D=new Uint16Array(16),O=null,k,ee,te;for(l=0;l<=fa;l++)E[l]=0;for(u=0;u<r;u++)E[t[n+u]]++;for(p=c,f=fa;f>=1&&E[f]===0;f--);if(p>f&&(p=f),f===0)return i[a++]=20971520,i[a++]=20971520,s.bits=1,0;for(d=1;d<f&&E[d]===0;d++);for(p<d&&(p=d),g=1,l=1;l<=fa;l++)if(g<<=1,g-=E[l],g<0)return-1;if(g>0&&(e===ha||f!==1))return-1;for(D[1]=0,l=1;l<fa;l++)D[l+1]=D[l]+E[l];for(u=0;u<r;u++)t[n+u]!==0&&(o[D[t[n+u]]++]=u);if(e===ha?(w=O=o,T=20):e===ga?(w=va,O=ya,T=257):(w=ba,O=xa,T=0),v=0,u=0,l=d,C=a,m=p,h=0,x=-1,_=1<<p,S=_-1,e===ga&&_>pa||e===_a&&_>ma)return 1;for(;;){k=l-h,o[u]+1<T?(ee=0,te=o[u]):o[u]>=T?(ee=O[o[u]-T],te=w[o[u]-T]):(ee=96,te=0),y=1<<l-h,b=1<<m,d=b;do b-=y,i[C+(v>>h)+b]=k<<24|ee<<16|te|0;while(b!==0);for(y=1<<l-1;v&y;)y>>=1;if(y===0?v=0:(v&=y-1,v+=y),u++,--E[l]===0){if(l===f)break;l=t[n+o[u]]}if(l>p&&(v&S)!==x){for(h===0&&(h=p),C+=d,m=l-h,g=1<<m;m+h<f&&(g-=E[m+h],!(g<=0));)m++,g<<=1;if(_+=1<<m,e===ga&&_>pa||e===_a&&_>ma)return 1;x=v&S,i[x]=p<<24|m<<16|C-a|0}}return v!==0&&(i[C+v]=l-h<<24|4194304),s.bits=p,0},Ca=0,wa=1,Ta=2,Ea=16180,Da=16181,Oa=16182,ka=16183,Aa=16184,ja=16185,Ma=16186,Na=16187,Pa=16188,Fa=16189,Ia=16190,La=16191,Ra=16192,za=16193,Ba=16194,Va=16195,Ha=16196,Ua=16197,Wa=16198,Ga=16199,Ka=16200,qa=16201,Ja=16202,Ya=16203,Xa=16204,Za=16205,Qa=16206,$a=16207,eo=16208,Z=16209,to=16210,no=16211,ro=852,io=592,ao=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24),oo=class{constructor(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}},so=e=>{if(!e)return 1;let t=e.state;return+(!t||t.strm!==e||t.mode<Ea||t.mode>no)},co=e=>{if(so(e))return-2;let t=e.state;return e.total_in=e.total_out=t.total=0,e.msg=``,t.wrap&&(e.adler=t.wrap&1),t.mode=Ea,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(ro),t.distcode=t.distdyn=new Int32Array(io),t.sane=1,t.back=-1,0},lo=e=>{if(so(e))return-2;let t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,co(e)},uo=(e,t)=>{let n;if(so(e))return-2;let r=e.state;return t<0?(n=0,t=-t):(n=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15)?-2:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,lo(e))},fo=(e,t)=>{if(!e)return-2;let n=new oo;e.state=n,n.strm=e,n.window=null,n.mode=Ea;let r=uo(e,t);return r!==0&&(e.state=null),r},po=!0,mo,ho,go=e=>{if(po){mo=new Int32Array(512),ho=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(Sa(wa,e.lens,0,288,mo,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Sa(Ta,e.lens,0,32,ho,0,e.work,{bits:5}),po=!1}e.lencode=mo,e.lenbits=9,e.distcode=ho,e.distbits=5},_o=(e,t,n,r)=>{let i,a=e.state;return a.window===null&&(a.window=new Uint8Array(1<<a.wbits)),a.wsize===0&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0),r>=a.wsize?(a.window.set(t.subarray(n-a.wsize,n),0),a.wnext=0,a.whave=a.wsize):(i=a.wsize-a.wnext,i>r&&(i=r),a.window.set(t.subarray(n-r,n-r+i),a.wnext),r-=i,r?(a.window.set(t.subarray(n-r,n),0),a.wnext=r,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=i))),0},vo=(e,t)=>{let n,r,i,a,o,s,c,l,u,d,f,p,m,h,g=0,_,v,y,b,x,S,C,w,T=new Uint8Array(4),E,D,O=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(so(e)||!e.output||!e.input&&e.avail_in!==0)return-2;n=e.state,n.mode===La&&(n.mode=Ra),o=e.next_out,i=e.output,c=e.avail_out,a=e.next_in,r=e.input,s=e.avail_in,l=n.hold,u=n.bits,d=s,f=c,w=0;inf_leave:for(;;)switch(n.mode){case Ea:if(n.wrap===0){n.mode=Ra;break}for(;u<16;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(n.wrap&2&&l===35615){n.wbits===0&&(n.wbits=15),n.check=0,T[0]=l&255,T[1]=l>>>8&255,n.check=U(n.check,T,2,0),l=0,u=0,n.mode=Da;break}if(n.head&&(n.head.done=!1),!(n.wrap&1)||(((l&255)<<8)+(l>>8))%31){e.msg=`incorrect header check`,n.mode=Z;break}if((l&15)!=8){e.msg=`unknown compression method`,n.mode=Z;break}if(l>>>=4,u-=4,C=(l&15)+8,n.wbits===0&&(n.wbits=C),C>15||C>n.wbits){e.msg=`invalid window size`,n.mode=Z;break}n.dmax=1<<n.wbits,n.flags=0,e.adler=n.check=1,n.mode=l&512?Fa:La,l=0,u=0;break;case Da:for(;u<16;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(n.flags=l,(n.flags&255)!=8){e.msg=`unknown compression method`,n.mode=Z;break}if(n.flags&57344){e.msg=`unknown header flags set`,n.mode=Z;break}n.head&&(n.head.text=l>>8&1),n.flags&512&&n.wrap&4&&(T[0]=l&255,T[1]=l>>>8&255,n.check=U(n.check,T,2,0)),l=0,u=0,n.mode=Oa;case Oa:for(;u<32;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}n.head&&(n.head.time=l),n.flags&512&&n.wrap&4&&(T[0]=l&255,T[1]=l>>>8&255,T[2]=l>>>16&255,T[3]=l>>>24&255,n.check=U(n.check,T,4,0)),l=0,u=0,n.mode=ka;case ka:for(;u<16;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}n.head&&(n.head.xflags=l&255,n.head.os=l>>8),n.flags&512&&n.wrap&4&&(T[0]=l&255,T[1]=l>>>8&255,n.check=U(n.check,T,2,0)),l=0,u=0,n.mode=Aa;case Aa:if(n.flags&1024){for(;u<16;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}n.length=l,n.head&&(n.head.extra_len=l),n.flags&512&&n.wrap&4&&(T[0]=l&255,T[1]=l>>>8&255,n.check=U(n.check,T,2,0)),l=0,u=0}else n.head&&(n.head.extra=null);n.mode=ja;case ja:if(n.flags&1024&&(p=n.length,p>s&&(p=s),p&&(n.head&&(C=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(a,a+p),C)),n.flags&512&&n.wrap&4&&(n.check=U(n.check,r,p,a)),s-=p,a+=p,n.length-=p),n.length))break inf_leave;n.length=0,n.mode=Ma;case Ma:if(n.flags&2048){if(s===0)break inf_leave;p=0;do C=r[a+p++],n.head&&C&&n.length<65536&&(n.head.name+=String.fromCharCode(C));while(C&&p<s);if(n.flags&512&&n.wrap&4&&(n.check=U(n.check,r,p,a)),s-=p,a+=p,C)break inf_leave}else n.head&&(n.head.name=null);n.length=0,n.mode=Na;case Na:if(n.flags&4096){if(s===0)break inf_leave;p=0;do C=r[a+p++],n.head&&C&&n.length<65536&&(n.head.comment+=String.fromCharCode(C));while(C&&p<s);if(n.flags&512&&n.wrap&4&&(n.check=U(n.check,r,p,a)),s-=p,a+=p,C)break inf_leave}else n.head&&(n.head.comment=null);n.mode=Pa;case Pa:if(n.flags&512){for(;u<16;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(n.wrap&4&&l!==(n.check&65535)){e.msg=`header crc mismatch`,n.mode=Z;break}l=0,u=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=La;break;case Fa:for(;u<32;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}e.adler=n.check=ao(l),l=0,u=0,n.mode=Ia;case Ia:if(n.havedict===0)return e.next_out=o,e.avail_out=c,e.next_in=a,e.avail_in=s,n.hold=l,n.bits=u,2;e.adler=n.check=1,n.mode=La;case La:if(t===5||t===6)break inf_leave;case Ra:if(n.last){l>>>=u&7,u-=u&7,n.mode=Qa;break}for(;u<3;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}switch(n.last=l&1,l>>>=1,--u,l&3){case 0:n.mode=za;break;case 1:if(go(n),n.mode=Ga,t===6){l>>>=2,u-=2;break inf_leave}break;case 2:n.mode=Ha;break;case 3:e.msg=`invalid block type`,n.mode=Z}l>>>=2,u-=2;break;case za:for(l>>>=u&7,u-=u&7;u<32;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if((l&65535)!=(l>>>16^65535)){e.msg=`invalid stored block lengths`,n.mode=Z;break}if(n.length=l&65535,l=0,u=0,n.mode=Ba,t===6)break inf_leave;case Ba:n.mode=Va;case Va:if(p=n.length,p){if(p>s&&(p=s),p>c&&(p=c),p===0)break inf_leave;i.set(r.subarray(a,a+p),o),s-=p,a+=p,c-=p,o+=p,n.length-=p;break}n.mode=La;break;case Ha:for(;u<14;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(n.nlen=(l&31)+257,l>>>=5,u-=5,n.ndist=(l&31)+1,l>>>=5,u-=5,n.ncode=(l&15)+4,l>>>=4,u-=4,n.nlen>286||n.ndist>30){e.msg=`too many length or distance symbols`,n.mode=Z;break}n.have=0,n.mode=Ua;case Ua:for(;n.have<n.ncode;){for(;u<3;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}n.lens[O[n.have++]]=l&7,l>>>=3,u-=3}for(;n.have<19;)n.lens[O[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,E={bits:n.lenbits},w=Sa(Ca,n.lens,0,19,n.lencode,0,n.work,E),n.lenbits=E.bits,w){e.msg=`invalid code lengths set`,n.mode=Z;break}n.have=0,n.mode=Wa;case Wa:for(;n.have<n.nlen+n.ndist;){for(;g=n.lencode[l&(1<<n.lenbits)-1],_=g>>>24,v=g>>>16&255,y=g&65535,!(_<=u);){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(y<16)l>>>=_,u-=_,n.lens[n.have++]=y;else{if(y===16){for(D=_+2;u<D;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(l>>>=_,u-=_,n.have===0){e.msg=`invalid bit length repeat`,n.mode=Z;break}C=n.lens[n.have-1],p=3+(l&3),l>>>=2,u-=2}else if(y===17){for(D=_+3;u<D;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}l>>>=_,u-=_,C=0,p=3+(l&7),l>>>=3,u-=3}else{for(D=_+7;u<D;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}l>>>=_,u-=_,C=0,p=11+(l&127),l>>>=7,u-=7}if(n.have+p>n.nlen+n.ndist){e.msg=`invalid bit length repeat`,n.mode=Z;break}for(;p--;)n.lens[n.have++]=C}}if(n.mode===Z)break;if(n.lens[256]===0){e.msg=`invalid code -- missing end-of-block`,n.mode=Z;break}if(n.lenbits=9,E={bits:n.lenbits},w=Sa(wa,n.lens,0,n.nlen,n.lencode,0,n.work,E),n.lenbits=E.bits,w){e.msg=`invalid literal/lengths set`,n.mode=Z;break}if(n.distbits=6,n.distcode=n.distdyn,E={bits:n.distbits},w=Sa(Ta,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,E),n.distbits=E.bits,w){e.msg=`invalid distances set`,n.mode=Z;break}if(n.mode=Ga,t===6)break inf_leave;case Ga:n.mode=Ka;case Ka:if(s>=6&&c>=258){e.next_out=o,e.avail_out=c,e.next_in=a,e.avail_in=s,n.hold=l,n.bits=u,da(e,f),o=e.next_out,i=e.output,c=e.avail_out,a=e.next_in,r=e.input,s=e.avail_in,l=n.hold,u=n.bits,n.mode===La&&(n.back=-1);break}for(n.back=0;g=n.lencode[l&(1<<n.lenbits)-1],_=g>>>24,v=g>>>16&255,y=g&65535,!(_<=u);){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(v&&!(v&240)){for(b=_,x=v,S=y;g=n.lencode[S+((l&(1<<b+x)-1)>>b)],_=g>>>24,v=g>>>16&255,y=g&65535,!(b+_<=u);){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}l>>>=b,u-=b,n.back+=b}if(l>>>=_,u-=_,n.back+=_,n.length=y,v===0){n.mode=Za;break}if(v&32){n.back=-1,n.mode=La;break}if(v&64){e.msg=`invalid literal/length code`,n.mode=Z;break}n.extra=v&15,n.mode=qa;case qa:if(n.extra){for(D=n.extra;u<D;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}n.length+=l&(1<<n.extra)-1,l>>>=n.extra,u-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=Ja;case Ja:for(;g=n.distcode[l&(1<<n.distbits)-1],_=g>>>24,v=g>>>16&255,y=g&65535,!(_<=u);){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(!(v&240)){for(b=_,x=v,S=y;g=n.distcode[S+((l&(1<<b+x)-1)>>b)],_=g>>>24,v=g>>>16&255,y=g&65535,!(b+_<=u);){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}l>>>=b,u-=b,n.back+=b}if(l>>>=_,u-=_,n.back+=_,v&64){e.msg=`invalid distance code`,n.mode=Z;break}n.offset=y,n.extra=v&15,n.mode=Ya;case Ya:if(n.extra){for(D=n.extra;u<D;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}n.offset+=l&(1<<n.extra)-1,l>>>=n.extra,u-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg=`invalid distance too far back`,n.mode=Z;break}n.mode=Xa;case Xa:if(c===0)break inf_leave;if(p=f-c,n.offset>p){if(p=n.offset-p,p>n.whave&&n.sane){e.msg=`invalid distance too far back`,n.mode=Z;break}p>n.wnext?(p-=n.wnext,m=n.wsize-p):m=n.wnext-p,p>n.length&&(p=n.length),h=n.window}else h=i,m=o-n.offset,p=n.length;p>c&&(p=c),c-=p,n.length-=p;do i[o++]=h[m++];while(--p);n.length===0&&(n.mode=Ka);break;case Za:if(c===0)break inf_leave;i[o++]=n.length,c--,n.mode=Ka;break;case Qa:if(n.wrap){for(;u<32;){if(s===0)break inf_leave;s--,l|=r[a++]<<u,u+=8}if(f-=c,e.total_out+=f,n.total+=f,n.wrap&4&&f&&(e.adler=n.check=n.flags?U(n.check,i,f,o-f):yi(n.check,i,f,o-f)),f=c,n.wrap&4&&(n.flags?l:ao(l))!==n.check){e.msg=`incorrect data check`,n.mode=Z;break}l=0,u=0}n.mode=$a;case $a:if(n.wrap&&n.flags){for(;u<32;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(n.wrap&4&&l!==(n.total&4294967295)){e.msg=`incorrect length check`,n.mode=Z;break}l=0,u=0}n.mode=eo;case eo:w=1;break inf_leave;case Z:w=-3;break inf_leave;case to:return-4;case no:default:return-2}return e.next_out=o,e.avail_out=c,e.next_in=a,e.avail_in=s,n.hold=l,n.bits=u,(n.wsize||f!==e.avail_out&&n.mode<Z&&(n.mode<Qa||t!==4))&&_o(e,e.output,e.next_out,f-e.avail_out)?(n.mode=to,-4):(d-=e.avail_in,f-=e.avail_out,e.total_in+=d,e.total_out+=f,n.total+=f,n.wrap&4&&f&&(e.adler=n.check=n.flags?U(n.check,i,f,e.next_out-f):yi(n.check,i,f,e.next_out-f)),e.data_type=n.bits+(n.last?64:0)+(n.mode===La?128:0)+(n.mode===Ga||n.mode===Ba?256:0),(d===0&&f===0||t===4)&&w===0&&(w=-5),w)},yo=e=>{if(so(e))return-2;let t=e.state;return t.window&&=null,e.state=null,0},bo=(e,t)=>{let n=t.length,r,i,a;return so(e)||(r=e.state,r.wrap!==0&&r.mode!==Ia)?-2:r.mode===Ia&&(i=1,i=yi(i,t,n,0),i!==r.check)?-3:(a=_o(e,t,n,n),a?(r.mode=to,-4):(r.havedict=1,0))},xo=class{constructor(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg=``,this.state=null,this.data_type=2,this.adler=0}},So=e=>{let t=new Uint8Array(e.reduce((e,t)=>e+t.length,0)),n=0;for(let r of e)t.set(r,n),n+=r.length;return t},Co=Object.prototype.toString,wo={level:-1,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,raw:!1,gzip:!1,legacyHash:!1,dictionary:new Uint8Array},To=class{options;err;msg;ended;started;chunks;strm;result;constructor(e={}){this.options=Object.assign({},wo,e);let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg=``,this.ended=!1,this.started=!1,this.chunks=[],this.result=new Uint8Array,this.strm=new xo,this.strm.avail_out=0;let n=aa(this.strm,t.level,8,t.windowBits,t.memLevel,t.strategy,t.legacyHash);if(n!==0)throw Error(xi[n]);Co.call(t.dictionary)===`[object ArrayBuffer]`&&(t.dictionary=new Uint8Array(t.dictionary));let r=t.dictionary;if(r.length){if(t.gzip)throw Error(`dictionary is not supported with gzip`);if(n=ca(this.strm,r),n!==0)throw Error(xi[n])}}push(e,t=!1){let n=this.strm,r=this.options.chunkSize,i,a;if(this.ended)return!1;for(a=typeof t==`number`?t:t===!0?4:0,n.input=typeof e==`string`?new TextEncoder().encode(e):Co.call(e)===`[object ArrayBuffer]`?new Uint8Array(e):e,n.next_in=0,n.avail_in=n.input.length,this.started||(this.started=!0,this.onStart(n));;){if(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),(a===2||a===3)&&n.avail_out<=6){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(i=oa(n,a),i===-2)break;if(i===1){n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),i=sa(this.strm);break}if(n.avail_out===0){this.onData(n.output);continue}if(a>0&&n.next_out>0){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(n.avail_in===0)return!0}return this.err=i,this.msg=n.msg||xi[i],this.ended=!0,this.onEnd(i),i===0}onStart(e){}onData(e){this.chunks.push(e)}onEnd(e){e===0&&(this.result=So(this.chunks)),this.chunks=[]}};function Eo(e,t={}){let n=new To(t);if(n.push(e,!0),n.err)throw Error(n.msg);return n.result}function Do(e,t={}){return Eo(e,Object.assign({},t,{raw:!0}))}function Oo(e,t={}){return Eo(e,Object.assign({},t,{gzip:!0}))}var ko=Object.prototype.toString,Ao={chunkSize:65536,windowBits:15,raw:!1,dictionary:new Uint8Array},jo=class{options;err;msg;ended;started;chunks;strm;result;constructor(e={}){this.options=Object.assign({},Ao,e);let t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!e.windowBits&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15||(t.windowBits|=15)),this.err=0,this.msg=``,this.ended=!1,this.started=!1,this.chunks=[],this.result=new Uint8Array,this.strm=new xo,this.strm.avail_out=0;let n=fo(this.strm,t.windowBits);if(n!==0)throw Error(xi[n]);ko.call(t.dictionary)===`[object ArrayBuffer]`&&(t.dictionary=new Uint8Array(t.dictionary));let r=t.dictionary;if(t.raw&&r.length&&(n=bo(this.strm,r),n!==0))throw Error(xi[n])}push(e,t=!1){let n=this.strm,r=this.options.chunkSize,i,a,o;if(this.ended)return this.err===0;for(a=typeof t==`number`?t:t===!0?4:0,n.input=ko.call(e)===`[object ArrayBuffer]`?new Uint8Array(e):e,n.next_in=0,n.avail_in=n.input.length,this.started||(this.started=!0,this.onStart(n));;){if(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),i=vo(n,a),i===2){let e=this.options.dictionary;e.length&&(i=bo(n,e),i===0?i=vo(n,a):i===-3&&(i=2))}for(;n.avail_in>0&&i===1&&n.state.wrap&2&&n.state.flags!==0&&n.input[n.next_in]!==0;)lo(n),i=vo(n,a);if(i===-2||i===-3||i===2||i===-4)break;if(o=n.avail_out,n.next_out&&(n.avail_out===0||i===1||a>0)&&(this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out)),n.avail_out=0,n.next_out=0),i!==0&&i!==-5||o!==0){if(i===1){i=yo(this.strm);break}if(n.avail_in===0){if(a===4){i=yo(this.strm),i===0&&(i=-5);break}return!0}}}return this.err=i,this.msg=n.msg||xi[i],this.ended=!0,this.onEnd(i),i===0}onStart(e){}onData(e){this.chunks.push(e)}onEnd(e){e===0&&(this.result=So(this.chunks)),this.chunks=[]}};function Mo(e,t={}){let n=new jo(t);if(n.push(e,!0),n.err)throw Error(n.msg);let r=n.result;return t.toText?new TextDecoder().decode(r):r}function No(e,t={}){return Mo(e,{...t,raw:!0})}function Po(e){return typeof e==`string`?new Uint8Array(We(e,`utf8`)):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}function Fo(e){let t={};return e&&(typeof e.level==`number`&&(t.level=e.level),typeof e.windowBits==`number`&&(t.windowBits=e.windowBits),typeof e.memLevel==`number`&&(t.memLevel=e.memLevel),typeof e.strategy==`number`&&(t.strategy=e.strategy)),t}function Io(e,t,n){return We(e(Po(t),Fo(n)))}function Lo(e,t,n,r){let i=typeof n==`function`?n:r,a=typeof n==`function`?void 0:n;if(typeof i!=`function`)throw TypeError(`zlib: callback is required`);let o;try{o=Io(e,t,a)}catch(e){queueMicrotask(()=>i(e instanceof Error?e:Error(String(e))));return}queueMicrotask(()=>i(null,o))}const Ro={gzipSync:(e,t)=>Io(Oo,e,t),gunzipSync:(e,t)=>Io(Mo,e,t),deflateSync:(e,t)=>Io(Eo,e,t),inflateSync:(e,t)=>Io(Mo,e,t),deflateRawSync:(e,t)=>Io(Do,e,t),inflateRawSync:(e,t)=>Io(No,e,t),gzip:(e,t,n)=>Lo(Oo,e,t,n),gunzip:(e,t,n)=>Lo(Mo,e,t,n),deflate:(e,t,n)=>Lo(Eo,e,t,n),inflate:(e,t,n)=>Lo(Mo,e,t,n),deflateRaw:(e,t,n)=>Lo(Do,e,t,n),inflateRaw:(e,t,n)=>Lo(No,e,t,n),constants:{Z_NO_FLUSH:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1}};function zo(e){let t=[],n={},r=[],i=(e,t)=>{if(e in n){let r=n[e];Array.isArray(r)?r.push(String(t)):n[e]=[String(r),String(t)]}else n[e]=t},a=2;for(;a<e.length;){let n=e[a];if(n===`--`){r.push(...e.slice(a+1));break}if(n.startsWith(`--`)){let t=n.slice(2),r=t.indexOf(`=`);if(r!==-1){i(t.slice(0,r),t.slice(r+1)),a++;continue}let o=e[a+1];if(o!==void 0&&!o.startsWith(`-`)){i(t,o),a+=2;continue}i(t,!0),a++;continue}if(n.startsWith(`-`)&&n.length>1){for(let e of n.slice(1))i(e,!0);a++;continue}t.push(n),a++}return{positional:t,flags:n,subcommand:t.length>0&&/^[a-z][\w-]*$/i.test(t[0])?t[0]:null,passthrough:r}}function Bo(e){let t=[...e];return Object.defineProperty(t,"parseFlags",{value:()=>zo(t),enumerable:!1,writable:!1,configurable:!1}),t}const Vo=async(e,t,n)=>{let r=Math.max(1,Math.trunc(e)||1),i=Array(t.length),a=0,o=[],s=async()=>{for(;;){let e=a++;if(e>=t.length)return;i[e]=await n(t[e],e)}};for(let e=0;e<Math.min(r,t.length);e++)o.push(s());return await Promise.all(o),i},Ho={ms:1,s:1e3,m:6e4,h:36e5,d:864e5,w:6048e5,M:26298e5,y:315576e5};function Uo(e){if(typeof e==`number`&&Number.isFinite(e))return Math.trunc(e);if(typeof e!=`string`)throw TypeError(`time.parseDuration: spec must be string or number`);let t=e.trim(),n=/^([0-9]+(?:\.[0-9]+)?)\s*(ms|s|m|h|d|w|M|y)?$/.exec(t);if(!n)throw RangeError(`time.parseDuration: unrecognized spec "${e}"`);let r=Number(n[1]),i=n[2]??`ms`;return Math.trunc(r*Ho[i])}function Wo(e){return e<10?`0${e}`:String(e)}const Go={parseDuration:Uo,ago(e,t=new Date){return new Date(t.getTime()-Uo(e))},range(e,t=new Date){let n=new Date(t.getTime());return{start:new Date(n.getTime()-Uo(e)),end:n}},future(e,t=new Date){let n=new Date(t.getTime());return{start:n,end:new Date(n.getTime()+Uo(e))}},gmailDate(e,t=new Date){let n=new Date(t.getTime()-Uo(e));return`${n.getFullYear()}/${Wo(n.getMonth()+1)}/${Wo(n.getDate())}`}};function Ko(e){if(!e)return``;let t=e.lastIndexOf(`/`);return t<0?``:t===0?`/`:e.substring(0,t)}var qo=class extends Error{code;constructor(e){super(`Process exited with code ${e}`),this.code=e,this.name=`NodeExitError`}};function Jo(e){let t=Number(e);return Number.isFinite(t)?t:0}function Yo(e){return typeof e==`string`?`type string ('${e}')`:typeof e==`boolean`?`type boolean (${e})`:typeof e==`bigint`?`type bigint (${e}n)`:Array.isArray(e)?`an instance of Array`:typeof e==`object`&&e?`an instance of Object`:`type ${typeof e}`}function Xo(e){let t=TypeError(`The "code" argument must be of type number. Received ${Yo(e)}`);return t.code=`ERR_INVALID_ARG_TYPE`,t}function Zo(e){let t=RangeError(`The value of "code" is out of range. It must be an integer. Received ${String(e)}`);return t.code=`ERR_OUT_OF_RANGE`,t}function Qo(e){if(e!=null){if(typeof e==`string`){let t=Number(e);if(e!==``&&Number.isInteger(t))return t===0?0:t;throw Xo(e)}if(typeof e==`number`){if(Number.isInteger(e))return e===0?0:e;throw Zo(e)}throw Xo(e)}}function $o(e){if(typeof e==`string`)return e;if(e==null)return String(e);try{return JSON.stringify(e)}catch{return String(e)}}function es(e){return`${e.map($o).join(` `)}\n`}function ts(e){return e===void 0?`default`:String(e)}function ns(){return typeof performance<`u`?performance.now():Date.now()}function rs(e){return`${e.toFixed(3)}ms`}function is(e,t,n){let r=es(n);e(t>0?`${` `.repeat(t)}${r}`:r)}function as(e,t,n){if(t)return;if(n.length===0){e(`Assertion failed`);return}let[r,...i]=n;e(`Assertion failed: ${$o(r)}`,...i)}function os(e,t,n,r){e(r.length>0?`Trace: ${r.map($o).join(` `)}`:`Trace:`);let i=Error().stack;if(!i)return;let a=i.split(`
|
|
36
|
+
}`),ar}function fr(e){let t=new Map,n=new Proxy(e,{has(e,t){return typeof t==`symbol`||t===`eval`||t.startsWith(`__vm_`)?!1:!ir.has(t)},get(e,r,i){if(r===Symbol.unscopables)return;if(r in e)return Reflect.get(e,r,i);if(r===`globalThis`)return n;let a=Reflect.get(globalThis,r);return typeof a!=`function`||`prototype`in a?a:(t.has(r)||t.set(r,a.bind(globalThis)),t.get(r))},set(e,t,n){return Reflect.set(e,t,n)}});return n}function pr(e){return typeof e==`string`?e:e?.filename}function mr(e,t){let n=pr(t);return n?`${e}\n//# sourceURL=${n}`:e}function hr(e){let t=e??{};return rr.has(t)||rr.set(t,fr(t)),t}function gr(e){return typeof e==`object`&&!!e&&rr.has(e)}function _r(e,t,n){let r=rr.get(t);if(!r)throw TypeError(`The "contextifiedObject" argument must be an vm.Context`);let i=String(e),a=lr(i,or),o=lr(i,sr),s={value:void 0,fns:new Map},c=ir;ir=new Set(a);try{let e=mr(i+ur(o),n);dr().call(r,r,e,a,s)}finally{ir=c}let l=(e,t)=>t!==void 0&&t!==Reflect.get(globalThis,e);for(let[e,n]of s.fns)typeof n==`function`&&l(e,n)&&Reflect.set(t,e,n);for(let[e,n]of Object.entries(s.lex?.()??{}))l(e,n)&&Reflect.set(t,e,n);return s.value}function vr(e,t,n){return _r(e,hr(t),n)}function yr(e,t){let n=globalThis.eval;return n(mr(String(e),t))}var br=class{#e;#t;constructor(e,t){this.#e=String(e),this.#t=t}runInContext(e){return _r(this.#e,e,this.#t)}runInNewContext(e){return vr(this.#e,e,this.#t)}runInThisContext(){return yr(this.#e,this.#t)}};function xr(e,t=[]){return Function(...t,String(e))}const Sr={Script:br,createContext:hr,isContext:gr,runInContext:_r,runInNewContext:vr,runInThisContext:yr,compileFunction:xr};var Cr=4,wr=0,Tr=1,Er=2;function Dr(e){let t=e.length;for(;--t>=0;)e[t]=0}var Or=29,kr=256,Ar=286,jr=30,Mr=19,Nr=573,Pr=15,Fr=16,Ir=7,Lr=256,Rr=16,zr=17,Br=18,Vr=new Uint8Array([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]),Hr=new Uint8Array([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]),Ur=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),Wr=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Gr=512,Kr=Array(576);Dr(Kr);var qr=Array(jr*2);Dr(qr);var Jr=Array(Gr);Dr(Jr);var Yr=Array(256);Dr(Yr);var Xr=Array(Or);Dr(Xr);var Zr=Array(jr);Dr(Zr);var Qr=class{constructor(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}},$r,ei,ti,ni=class{constructor(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}},ri=e=>e<256?Jr[e]:Jr[256+(e>>>7)],ii=(e,t)=>{e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255},V=(e,t,n)=>{e.bi_valid>Fr-n?(e.bi_buf|=t<<e.bi_valid&65535,ii(e,e.bi_buf),e.bi_buf=t>>Fr-e.bi_valid,e.bi_valid+=n-Fr):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)},H=(e,t,n)=>{V(e,n[t*2],n[t*2+1])},ai=(e,t)=>{let n=0;do n|=e&1,e>>>=1,n<<=1;while(--t>0);return n>>>1},oi=e=>{e.bi_valid===16?(ii(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)},si=(e,t)=>{let n=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,a=t.stat_desc.has_stree,o=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,c=t.stat_desc.max_length,l,u,d,f,p,m,h=0;for(f=0;f<=Pr;f++)e.bl_count[f]=0;for(n[e.heap[e.heap_max]*2+1]=0,l=e.heap_max+1;l<Nr;l++)u=e.heap[l],f=n[n[u*2+1]*2+1]+1,f>c&&(f=c,h++),n[u*2+1]=f,!(u>r)&&(e.bl_count[f]++,p=0,u>=s&&(p=o[u-s]),m=n[u*2],e.opt_len+=m*(f+p),a&&(e.static_len+=m*(i[u*2+1]+p)));if(h!==0){do{for(f=c-1;e.bl_count[f]===0;)f--;e.bl_count[f]--,e.bl_count[f+1]+=2,e.bl_count[c]--,h-=2}while(h>0);for(f=c;f!==0;f--)for(u=e.bl_count[f];u!==0;)d=e.heap[--l],!(d>r)&&(n[d*2+1]!==f&&(e.opt_len+=(f-n[d*2+1])*n[d*2],n[d*2+1]=f),u--)}},ci=(e,t,n)=>{let r=Array(16),i=0,a,o;for(a=1;a<=Pr;a++)i=i+n[a-1]<<1,r[a]=i;for(o=0;o<=t;o++){let t=e[o*2+1];t!==0&&(e[o*2]=ai(r[t]++,t))}},li=()=>{let e,t,n,r,i,a=Array(16);for(n=0,r=0;r<Or-1;r++)for(Xr[r]=n,e=0;e<1<<Vr[r];e++)Yr[n++]=r;for(Yr[n-1]=r,i=0,r=0;r<16;r++)for(Zr[r]=i,e=0;e<1<<Hr[r];e++)Jr[i++]=r;for(i>>=7;r<jr;r++)for(Zr[r]=i<<7,e=0;e<1<<Hr[r]-7;e++)Jr[256+i++]=r;for(t=0;t<=Pr;t++)a[t]=0;for(e=0;e<=143;)Kr[e*2+1]=8,e++,a[8]++;for(;e<=255;)Kr[e*2+1]=9,e++,a[9]++;for(;e<=279;)Kr[e*2+1]=7,e++,a[7]++;for(;e<=287;)Kr[e*2+1]=8,e++,a[8]++;for(ci(Kr,287,a),e=0;e<jr;e++)qr[e*2+1]=5,qr[e*2]=ai(e,5);$r=new Qr(Kr,Vr,257,Ar,Pr),ei=new Qr(qr,Hr,0,jr,Pr),ti=new Qr([],Ur,0,Mr,Ir)},ui=e=>{let t;for(t=0;t<Ar;t++)e.dyn_ltree[t*2]=0;for(t=0;t<jr;t++)e.dyn_dtree[t*2]=0;for(t=0;t<Mr;t++)e.bl_tree[t*2]=0;e.dyn_ltree[Lr*2]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},di=e=>{e.bi_valid>8?ii(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},fi=(e,t,n,r)=>{let i=t*2,a=n*2;return e[i]<e[a]||e[i]===e[a]&&r[t]<=r[n]},pi=(e,t,n)=>{let r=e.heap[n],i=n<<1;for(;i<=e.heap_len&&(i<e.heap_len&&fi(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!fi(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r},mi=(e,t,n)=>{let r,i,a=0,o,s;if(e.sym_next!==0)do r=e.pending_buf[e.sym_buf+a++]&255,r+=(e.pending_buf[e.sym_buf+a++]&255)<<8,i=e.pending_buf[e.sym_buf+a++],r===0?H(e,i,t):(o=Yr[i],H(e,o+kr+1,t),s=Vr[o],s!==0&&(i-=Xr[o],V(e,i,s)),r--,o=ri(r),H(e,o,n),s=Hr[o],s!==0&&(r-=Zr[o],V(e,r,s)));while(a<e.sym_next);H(e,Lr,t)},hi=(e,t)=>{let n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,a=t.stat_desc.elems,o,s,c=-1,l;for(e.heap_len=0,e.heap_max=Nr,o=0;o<a;o++)n[o*2]===0?n[o*2+1]=0:(e.heap[++e.heap_len]=c=o,e.depth[o]=0);for(;e.heap_len<2;)l=e.heap[++e.heap_len]=c<2?++c:0,n[l*2]=1,e.depth[l]=0,e.opt_len--,i&&(e.static_len-=r[l*2+1]);for(t.max_code=c,o=e.heap_len>>1;o>=1;o--)pi(e,n,o);l=a;do o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],pi(e,n,1),s=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=s,n[l*2]=n[o*2]+n[s*2],e.depth[l]=(e.depth[o]>=e.depth[s]?e.depth[o]:e.depth[s])+1,n[o*2+1]=n[s*2+1]=l,e.heap[1]=l++,pi(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],si(e,t),ci(n,c,e.bl_count)},gi=(e,t,n)=>{let r,i=-1,a,o=t[1],s=0,c=7,l=4;for(o===0&&(c=138,l=3),t[(n+1)*2+1]=65535,r=0;r<=n;r++)a=o,o=t[(r+1)*2+1],!(++s<c&&a===o)&&(s<l?e.bl_tree[a*2]+=s:a===0?s<=10?e.bl_tree[34]++:e.bl_tree[36]++:(a!==i&&e.bl_tree[a*2]++,e.bl_tree[32]++),s=0,i=a,o===0?(c=138,l=3):a===o?(c=6,l=3):(c=7,l=4))},_i=(e,t,n)=>{let r,i=-1,a,o=t[1],s=0,c=7,l=4;for(o===0&&(c=138,l=3),r=0;r<=n;r++)if(a=o,o=t[(r+1)*2+1],!(++s<c&&a===o)){if(s<l)do H(e,a,e.bl_tree);while(--s!==0);else a===0?s<=10?(H(e,zr,e.bl_tree),V(e,s-3,3)):(H(e,Br,e.bl_tree),V(e,s-11,7)):(a!==i&&(H(e,a,e.bl_tree),s--),H(e,Rr,e.bl_tree),V(e,s-3,2));s=0,i=a,o===0?(c=138,l=3):a===o?(c=6,l=3):(c=7,l=4)}},vi=e=>{let t;for(gi(e,e.dyn_ltree,e.l_desc.max_code),gi(e,e.dyn_dtree,e.d_desc.max_code),hi(e,e.bl_desc),t=18;t>=3&&e.bl_tree[Wr[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t},yi=(e,t,n,r)=>{let i;for(V(e,t-257,5),V(e,n-1,5),V(e,r-4,4),i=0;i<r;i++)V(e,e.bl_tree[Wr[i]*2+1],3);_i(e,e.dyn_ltree,t-1),_i(e,e.dyn_dtree,n-1)},bi=e=>{let t=4093624447,n;for(n=0;n<=31;n++,t>>>=1)if(t&1&&e.dyn_ltree[n*2]!==0)return wr;if(e.dyn_ltree[18]!==0||e.dyn_ltree[20]!==0||e.dyn_ltree[26]!==0)return Tr;for(n=32;n<kr;n++)if(e.dyn_ltree[n*2]!==0)return Tr;return wr},xi=!1,Si=e=>{xi||=(li(),!0),e.l_desc=new ni(e.dyn_ltree,$r),e.d_desc=new ni(e.dyn_dtree,ei),e.bl_desc=new ni(e.bl_tree,ti),e.bi_buf=0,e.bi_valid=0,ui(e)},Ci=(e,t,n,r)=>{V(e,0+ +!!r,3),di(e),ii(e,n),ii(e,~n),n&&e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n},wi=e=>{V(e,2,3),H(e,Lr,Kr),oi(e)},Ti=(e,t,n,r)=>{let i,a,o=0;e.level>0?(e.strm.data_type===Er&&(e.strm.data_type=bi(e)),hi(e,e.l_desc),hi(e,e.d_desc),o=vi(e),i=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=i&&(i=a)):i=a=n+5,n+4<=i&&t!==-1?Ci(e,t,n,r):e.strategy===Cr||a===i?(V(e,2+ +!!r,3),mi(e,Kr,qr)):(V(e,4+ +!!r,3),yi(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),mi(e,e.dyn_ltree,e.dyn_dtree)),ui(e),r&&di(e)},Ei=(e,t,n)=>(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=n,t===0?e.dyn_ltree[n*2]++:(e.matches++,t--,e.dyn_ltree[(Yr[n]+kr+1)*2]++,e.dyn_dtree[ri(t)*2]++),e.sym_next===e.sym_end),Di=(e,t,n,r)=>{let i=e&65535|0,a=e>>>16&65535|0,o=0;for(;n!==0;){o=n>2e3?2e3:n,n-=o;do i=i+t[r++]|0,a=a+i|0;while(--o);i%=65521,a%=65521}return i|a<<16|0},Oi=new Uint32Array((()=>{let e,t=[];for(var n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=e&1?3988292384^e>>>1:e>>>1;t[n]=e}return t})()),U=(e,t,n,r)=>{let i=Oi,a=r+n;e^=-1;for(let n=r;n<a;n++)e=e>>>8^i[(e^t[n])&255];return e^-1},ki={2:`need dictionary`,1:`stream end`,0:``,"-1":`file error`,"-2":`stream error`,"-3":`data error`,"-4":`insufficient memory`,"-5":`buffer error`,"-6":`incompatible version`},Ai=9,ji=573,W=3,Mi=258,G=262,Ni=32,Pi=42,Fi=57,Ii=69,Li=73,Ri=91,zi=103,Bi=113,Vi=666,K=1,Hi=2,Ui=3,Wi=4,Gi=3,Ki=(e,t)=>(e.msg=ki[t],t),qi=e=>e*2-(e>4?9:0),Ji=e=>{let t=e.length;for(;--t>=0;)e[t]=0},Yi=e=>{let t,n,r,i=e.w_size;t=e.hash_size,r=t;do n=e.head[--r],e.head[r]=n>=i?n-i:0;while(--t);t=i,r=t;do n=e.prev[--r],e.prev[r]=n>=i?n-i:0;while(--t)},Xi=(e,t,n)=>(t<<e.hash_shift^n)&e.hash_mask,Zi=(e,t)=>{let n;if(e.legacy_hash)n=e.ins_h=Xi(e,e.ins_h,e.window[t+W-1]);else{let r=e.window,i=r[t]|r[t+1]<<8|r[t+2]<<16|r[t+3]<<24;n=e.ins_h=Math.imul(i,66521)+66521>>>16&e.hash_mask}let r=e.prev[t&e.w_mask]=e.head[n];return e.head[n]=t,r},q=e=>{let t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),n!==0&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+n),e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,t.pending===0&&(t.pending_out=0))},J=(e,t)=>{Ti(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,q(e.strm)},Y=(e,t)=>{e.pending_buf[e.pending++]=t},Qi=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255},$i=(e,t,n,r)=>{let i=e.avail_in;return i>r&&(i=r),i===0?0:(e.avail_in-=i,t.set(e.input.subarray(e.next_in,e.next_in+i),n),e.state.wrap===1?e.adler=Di(e.adler,t,i,n):e.state.wrap===2&&(e.adler=U(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)},ea=(e,t)=>{let n=e.max_chain_length,r=e.strstart,i,a,o=e.prev_length,s=e.nice_match,c=e.strstart>e.w_size-G?e.strstart-(e.w_size-G):0,l=e.window,u=e.w_mask,d=e.prev,f=e.strstart+Mi,p=l[r+o-1],m=l[r+o];e.prev_length>=e.good_match&&(n>>=2),s>e.lookahead&&(s=e.lookahead);do if(i=t,l[i+o]===m&&l[i+o-1]===p&&l[i]===l[r]&&l[++i]===l[r+1]){r+=2,i++;do;while(l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&r<f);if(a=Mi-(f-r),r=f-Mi,a>o){if(e.match_start=t,o=a,a>=s)break;p=l[r+o-1],m=l[r+o]}}while((t=d[t&u])>c&&--n!==0);return o<=e.lookahead?o:e.lookahead},ta=e=>{let t=e.w_size,n,r,i;do{if(r=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-G)&&(e.window.set(e.window.subarray(t,t+t-r),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),Yi(e),r+=t),e.strm.avail_in===0)break;if(n=$i(e.strm,e.window,e.strstart+e.lookahead,r),e.lookahead+=n,!e.legacy_hash){if(e.lookahead+e.insert>W)for(i=e.strstart-e.insert;e.insert&&(Zi(e,i),i++,e.insert--,!(e.lookahead+e.insert<=W)););}else if(e.lookahead+e.insert>=W)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=Xi(e,e.ins_h,e.window[i+1]);e.insert&&(Zi(e,i),i++,e.insert--,!(e.lookahead+e.insert<W)););}while(e.lookahead<G&&e.strm.avail_in!==0)},na=(e,t)=>{let n=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,r,i,a,o=0,s=e.strm.avail_in;do{if(r=65535,a=e.bi_valid+42>>3,e.strm.avail_out<a||(a=e.strm.avail_out-a,i=e.strstart-e.block_start,r>i+e.strm.avail_in&&(r=i+e.strm.avail_in),r>a&&(r=a),r<n&&(r===0&&t!==4||t===0||r!==i+e.strm.avail_in)))break;o=+(t===4&&r===i+e.strm.avail_in),Ci(e,0,0,o),e.pending_buf[e.pending-4]=r,e.pending_buf[e.pending-3]=r>>8,e.pending_buf[e.pending-2]=~r,e.pending_buf[e.pending-1]=~r>>8,q(e.strm),i&&(i>r&&(i=r),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+i),e.strm.next_out),e.strm.next_out+=i,e.strm.avail_out-=i,e.strm.total_out+=i,e.block_start+=i,r-=i),r&&($i(e.strm,e.strm.output,e.strm.next_out,r),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r)}while(o===0);return s-=e.strm.avail_in,s&&(s>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=s&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-s,e.strm.next_in),e.strstart),e.strstart+=s,e.insert+=s>e.w_size-e.insert?e.w_size-e.insert:s),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),o?Wi:t!==0&&t!==4&&e.strm.avail_in===0&&e.strstart===e.block_start?Hi:(a=e.window_size-e.strstart,e.strm.avail_in>a&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,a+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),a>e.strm.avail_in&&(a=e.strm.avail_in),a&&($i(e.strm,e.window,e.strstart,a),e.strstart+=a,e.insert+=a>e.w_size-e.insert?e.w_size-e.insert:a),e.high_water<e.strstart&&(e.high_water=e.strstart),a=e.bi_valid+42>>3,a=e.pending_buf_size-a>65535?65535:e.pending_buf_size-a,n=a>e.w_size?e.w_size:a,i=e.strstart-e.block_start,(i>=n||(i||t===4)&&t!==0&&e.strm.avail_in===0&&i<=a)&&(r=i>a?a:i,o=+(t===4&&e.strm.avail_in===0&&r===i),Ci(e,e.block_start,r,o),e.block_start+=r,q(e.strm)),o?Ui:K)},ra=(e,t)=>{let n,r;for(;;){if(e.lookahead<G){if(ta(e),e.lookahead<G&&t===0)return K;if(e.lookahead===0)break}if(n=0,e.lookahead>=W&&(n=Zi(e,e.strstart)),n!==0&&e.strstart-n<=e.w_size-G&&(e.match_length=ea(e,n)),e.match_length>=W){if(r=Ei(e,e.strstart-e.match_start,e.match_length-W),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=W){e.match_length--;do e.strstart++,n=Zi(e,e.strstart);while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.legacy_hash&&(e.ins_h=e.window[e.strstart],e.ins_h=Xi(e,e.ins_h,e.window[e.strstart+1]))}else r=Ei(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(J(e,!1),e.strm.avail_out===0))return K}return e.insert=e.strstart<W-1?e.strstart:W-1,t===4?(J(e,!0),e.strm.avail_out===0?Ui:Wi):e.sym_next&&(J(e,!1),e.strm.avail_out===0)?K:Hi},ia=(e,t)=>{let n,r,i;for(;;){if(e.lookahead<G){if(ta(e),e.lookahead<G&&t===0)return K;if(e.lookahead===0)break}if(n=0,e.lookahead>=W&&(n=Zi(e,e.strstart)),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=W-1,n!==0&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-G&&(e.match_length=ea(e,n),e.match_length<=5&&(e.strategy===1||e.match_length===W&&e.strstart-e.match_start>4096)&&(e.match_length=W-1)),e.prev_length>=W&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-W,r=Ei(e,e.strstart-1-e.prev_match,e.prev_length-W),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(n=Zi(e,e.strstart));while(--e.prev_length!==0);if(e.match_available=0,e.match_length=W-1,e.strstart++,r&&(J(e,!1),e.strm.avail_out===0))return K}else if(e.match_available){if(r=Ei(e,0,e.window[e.strstart-1]),r&&J(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return K}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&=(r=Ei(e,0,e.window[e.strstart-1]),0),e.insert=e.strstart<W-1?e.strstart:W-1,t===4?(J(e,!0),e.strm.avail_out===0?Ui:Wi):e.sym_next&&(J(e,!1),e.strm.avail_out===0)?K:Hi},aa=(e,t)=>{let n,r,i,a,o=e.window;for(;;){if(e.lookahead<=Mi){if(ta(e),e.lookahead<=Mi&&t===0)return K;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=W&&e.strstart>0&&(i=e.strstart-1,r=o[i],r===o[++i]&&r===o[++i]&&r===o[++i])){a=e.strstart+Mi;do;while(r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&i<a);e.match_length=Mi-(a-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=W?(n=Ei(e,1,e.match_length-W),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=Ei(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(J(e,!1),e.strm.avail_out===0))return K}return e.insert=0,t===4?(J(e,!0),e.strm.avail_out===0?Ui:Wi):e.sym_next&&(J(e,!1),e.strm.avail_out===0)?K:Hi},oa=(e,t)=>{let n;for(;;){if(e.lookahead===0&&(ta(e),e.lookahead===0)){if(t===0)return K;break}if(e.match_length=0,n=Ei(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(J(e,!1),e.strm.avail_out===0))return K}return e.insert=0,t===4?(J(e,!0),e.strm.avail_out===0?Ui:Wi):e.sym_next&&(J(e,!1),e.strm.avail_out===0)?K:Hi},X=class{constructor(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}},sa=[new X(0,0,0,0,na),new X(4,4,8,4,ra),new X(4,5,16,8,ra),new X(4,6,32,32,ra),new X(4,4,16,16,ia),new X(8,16,32,32,ia),new X(8,16,128,128,ia),new X(8,32,128,256,ia),new X(32,128,258,1024,ia),new X(32,258,258,4096,ia)],ca=e=>{e.window_size=2*e.w_size,Ji(e.head),e.max_lazy_match=sa[e.level].max_lazy,e.good_match=sa[e.level].good_length,e.nice_match=sa[e.level].nice_length,e.max_chain_length=sa[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=W-1,e.match_available=0,e.ins_h=0},la=class{constructor(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.legacy_hash=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(ji*2),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),Ji(this.dyn_ltree),Ji(this.dyn_dtree),Ji(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),Ji(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),Ji(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}},ua=e=>{if(!e)return 1;let t=e.state;return+(!t||t.strm!==e||t.status!==Pi&&t.status!==Fi&&t.status!==Ii&&t.status!==Li&&t.status!==Ri&&t.status!==zi&&t.status!==Bi&&t.status!==Vi)},da=e=>{if(ua(e))return Ki(e,-2);e.total_in=e.total_out=0,e.data_type=2;let t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap===2?Fi:t.wrap?Pi:Bi,e.adler=t.wrap===2?0:1,t.last_flush=-2,Si(t),0},fa=e=>{let t=da(e);return t===0&&ca(e.state),t},pa=(e,t,n,r,i,a,o)=>{if(!e)return-2;let s=1;if(t===-1&&(t=6),r<0?(s=0,r=-r):r>15&&(s=2,r-=16),i<1||i>Ai||n!==8||r<8||r>15||t<0||t>9||a<0||a>4||r===8&&s!==1)return Ki(e,-2);r===8&&(r=9);let c=new la;return e.state=c,c.strm=e,c.status=Pi,c.wrap=s,c.gzhead=null,c.w_bits=r,c.w_size=1<<c.w_bits,c.w_mask=c.w_size-1,c.legacy_hash=+!!o,c.hash_bits=i+7,!c.legacy_hash&&c.hash_bits<15&&(c.hash_bits=15),c.hash_size=1<<c.hash_bits,c.hash_mask=c.hash_size-1,c.hash_shift=~~((c.hash_bits+W-1)/W),c.window=new Uint8Array(c.w_size*2),c.head=new Uint16Array(c.hash_size),c.prev=new Uint16Array(c.w_size),c.lit_bufsize=1<<i+6,c.pending_buf_size=c.lit_bufsize*4,c.pending_buf=new Uint8Array(c.pending_buf_size),c.sym_buf=c.lit_bufsize,c.sym_end=(c.lit_bufsize-1)*3,c.level=t,c.strategy=a,c.method=n,fa(e)},ma=(e,t)=>{if(ua(e)||t>5||t<0)return e?Ki(e,-2):-2;let n=e.state;if(!e.output||e.avail_in!==0&&!e.input||n.status===Vi&&t!==4)return Ki(e,e.avail_out===0?-5:-2);let r=n.last_flush;if(n.last_flush=t,n.pending!==0){if(q(e),e.avail_out===0)return n.last_flush=-1,0}else if(e.avail_in===0&&qi(t)<=qi(r)&&t!==4)return Ki(e,-5);if(n.status===Vi&&e.avail_in!==0)return Ki(e,-5);if(n.status===Pi&&n.wrap===0&&(n.status=Bi),n.status===Pi){let t=8+(n.w_bits-8<<4)<<8,r=-1;if(r=n.strategy>=2||n.level<2?0:n.level<6?1:n.level===6?2:3,t|=r<<6,n.strstart!==0&&(t|=Ni),t+=31-t%31,Qi(n,t),n.strstart!==0&&(Qi(n,e.adler>>>16),Qi(n,e.adler&65535)),e.adler=1,n.status=Bi,q(e),n.pending!==0)return n.last_flush=-1,0}if(n.status===Fi){if(e.adler=0,Y(n,31),Y(n,139),Y(n,8),n.gzhead)Y(n,+!!n.gzhead.text+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),Y(n,n.gzhead.time&255),Y(n,n.gzhead.time>>8&255),Y(n,n.gzhead.time>>16&255),Y(n,n.gzhead.time>>24&255),Y(n,n.level===9?2:n.strategy>=2||n.level<2?4:0),Y(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(Y(n,n.gzhead.extra.length&255),Y(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=U(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=Ii;else if(Y(n,0),Y(n,0),Y(n,0),Y(n,0),Y(n,0),Y(n,n.level===9?2:n.strategy>=2||n.level<2?4:0),Y(n,Gi),n.status=Bi,q(e),n.pending!==0)return n.last_flush=-1,0}if(n.status===Ii){if(n.gzhead.extra){let t=n.pending,r=(n.gzhead.extra.length&65535)-n.gzindex;for(;n.pending+r>n.pending_buf_size;){let i=n.pending_buf_size-n.pending;if(n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex,n.gzindex+i),n.pending),n.pending=n.pending_buf_size,n.gzhead.hcrc&&n.pending>t&&(e.adler=U(e.adler,n.pending_buf,n.pending-t,t)),n.gzindex+=i,q(e),n.pending!==0)return n.last_flush=-1,0;t=0,r-=i}let i=new Uint8Array(n.gzhead.extra);n.pending_buf.set(i.subarray(n.gzindex,n.gzindex+r),n.pending),n.pending+=r,n.gzhead.hcrc&&n.pending>t&&(e.adler=U(e.adler,n.pending_buf,n.pending-t,t)),n.gzindex=0}n.status=Li}if(n.status===Li){if(n.gzhead.name){let t=n.pending,r;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>t&&(e.adler=U(e.adler,n.pending_buf,n.pending-t,t)),q(e),n.pending!==0)return n.last_flush=-1,0;t=0}r=n.gzindex<n.gzhead.name.length?n.gzhead.name.charCodeAt(n.gzindex++)&255:0,Y(n,r)}while(r!==0);n.gzhead.hcrc&&n.pending>t&&(e.adler=U(e.adler,n.pending_buf,n.pending-t,t)),n.gzindex=0}n.status=Ri}if(n.status===Ri){if(n.gzhead.comment){let t=n.pending,r;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>t&&(e.adler=U(e.adler,n.pending_buf,n.pending-t,t)),q(e),n.pending!==0)return n.last_flush=-1,0;t=0}r=n.gzindex<n.gzhead.comment.length?n.gzhead.comment.charCodeAt(n.gzindex++)&255:0,Y(n,r)}while(r!==0);n.gzhead.hcrc&&n.pending>t&&(e.adler=U(e.adler,n.pending_buf,n.pending-t,t))}n.status=zi}if(n.status===zi){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(q(e),n.pending!==0))return n.last_flush=-1,0;Y(n,e.adler&255),Y(n,e.adler>>8&255),e.adler=0}if(n.status=Bi,q(e),n.pending!==0)return n.last_flush=-1,0}if(e.avail_in!==0||n.lookahead!==0||t!==0&&n.status!==Vi){let r=n.level===0?na(n,t):n.strategy===2?oa(n,t):n.strategy===3?aa(n,t):sa[n.level].func(n,t);if((r===Ui||r===Wi)&&(n.status=Vi),r===K||r===Ui)return e.avail_out===0&&(n.last_flush=-1),0;if(r===Hi&&(t===1?wi(n):t!==5&&(Ci(n,0,0,!1),t===3&&(Ji(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),q(e),e.avail_out===0))return n.last_flush=-1,0}return t===4?n.wrap<=0?1:(n.wrap===2?(Y(n,e.adler&255),Y(n,e.adler>>8&255),Y(n,e.adler>>16&255),Y(n,e.adler>>24&255),Y(n,e.total_in&255),Y(n,e.total_in>>8&255),Y(n,e.total_in>>16&255),Y(n,e.total_in>>24&255)):(Qi(n,e.adler>>>16),Qi(n,e.adler&65535)),q(e),n.wrap>0&&(n.wrap=-n.wrap),+(n.pending===0)):0},ha=e=>{if(ua(e))return-2;let t=e.state.status;return e.state=null,t===Bi?Ki(e,-3):0},ga=(e,t)=>{let n=t.length;if(ua(e))return-2;let r=e.state,i=r.wrap;if(i===2||i===1&&r.status!==Pi||r.lookahead)return-2;if(i===1&&(e.adler=Di(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){i===0&&(Ji(r.head),r.strstart=0,r.block_start=0,r.insert=0);let e=new Uint8Array(r.w_size);e.set(t.subarray(n-r.w_size,n),0),t=e,n=r.w_size}let a=e.avail_in,o=e.next_in,s=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,ta(r);r.lookahead>=W;){let e=r.strstart,t=r.lookahead-(W-1);do Zi(r,e),e++;while(--t);r.strstart=e,r.lookahead=W-1,ta(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=W-1,r.match_available=0,e.next_in=o,e.input=s,e.avail_in=a,r.wrap=i,0},_a=16209,va=16191;function ya(e,t){let n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E=e.state;n=e.next_in,w=e.input,r=n+(e.avail_in-5),i=e.next_out,T=e.output,a=i-(t-e.avail_out),o=i+(e.avail_out-257),s=E.dmax,c=E.wsize,l=E.whave,u=E.wnext,d=E.window,f=E.hold,p=E.bits,m=E.lencode,h=E.distcode,g=(1<<E.lenbits)-1,_=(1<<E.distbits)-1;top:do{p<15&&(f+=w[n++]<<p,p+=8,f+=w[n++]<<p,p+=8),v=m[f&g];dolen:for(;;){if(y=v>>>24,f>>>=y,p-=y,y=v>>>16&255,y===0)T[i++]=v&65535;else if(y&16){b=v&65535,y&=15,y&&(p<y&&(f+=w[n++]<<p,p+=8),b+=f&(1<<y)-1,f>>>=y,p-=y),p<15&&(f+=w[n++]<<p,p+=8,f+=w[n++]<<p,p+=8),v=h[f&_];dodist:for(;;){if(y=v>>>24,f>>>=y,p-=y,y=v>>>16&255,y&16){if(x=v&65535,y&=15,p<y&&(f+=w[n++]<<p,p+=8,p<y&&(f+=w[n++]<<p,p+=8)),x+=f&(1<<y)-1,x>s){e.msg=`invalid distance too far back`,E.mode=_a;break top}if(f>>>=y,p-=y,y=i-a,x>y){if(y=x-y,y>l&&E.sane){e.msg=`invalid distance too far back`,E.mode=_a;break top}if(S=0,C=d,u===0){if(S+=c-y,y<b){b-=y;do T[i++]=d[S++];while(--y);S=i-x,C=T}}else if(u<y){if(S+=c+u-y,y-=u,y<b){b-=y;do T[i++]=d[S++];while(--y);if(S=0,u<b){y=u,b-=y;do T[i++]=d[S++];while(--y);S=i-x,C=T}}}else if(S+=u-y,y<b){b-=y;do T[i++]=d[S++];while(--y);S=i-x,C=T}for(;b>2;)T[i++]=C[S++],T[i++]=C[S++],T[i++]=C[S++],b-=3;b&&(T[i++]=C[S++],b>1&&(T[i++]=C[S++]))}else{S=i-x;do T[i++]=T[S++],T[i++]=T[S++],T[i++]=T[S++],b-=3;while(b>2);b&&(T[i++]=T[S++],b>1&&(T[i++]=T[S++]))}}else if(y&64){e.msg=`invalid distance code`,E.mode=_a;break top}else{v=h[(v&65535)+(f&(1<<y)-1)];continue dodist}break}}else if(!(y&64)){v=m[(v&65535)+(f&(1<<y)-1)];continue dolen}else if(y&32){E.mode=va;break top}else{e.msg=`invalid literal/length code`,E.mode=_a;break top}break}}while(n<r&&i<o);b=p>>3,n-=b,p-=b<<3,f&=(1<<p)-1,e.next_in=n,e.next_out=i,e.avail_in=n<r?5+(r-n):5-(n-r),e.avail_out=i<o?257+(o-i):257-(i-o),E.hold=f,E.bits=p}var ba=15,xa=852,Sa=592,Ca=0,wa=1,Ta=2,Ea=new Uint16Array([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]),Da=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,199,75]),Oa=new Uint16Array([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,0,0]),ka=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),Aa=(e,t,n,r,i,a,o,s)=>{let c=s.bits,l=0,u=0,d=0,f=0,p=0,m=0,h=0,g=0,_=0,v=0,y,b,x,S,C,w=null,T,E=new Uint16Array(16),D=new Uint16Array(16),O=null,k,ee,te;for(l=0;l<=ba;l++)E[l]=0;for(u=0;u<r;u++)E[t[n+u]]++;for(p=c,f=ba;f>=1&&E[f]===0;f--);if(p>f&&(p=f),f===0)return i[a++]=20971520,i[a++]=20971520,s.bits=1,0;for(d=1;d<f&&E[d]===0;d++);for(p<d&&(p=d),g=1,l=1;l<=ba;l++)if(g<<=1,g-=E[l],g<0)return-1;if(g>0&&(e===Ca||f!==1))return-1;for(D[1]=0,l=1;l<ba;l++)D[l+1]=D[l]+E[l];for(u=0;u<r;u++)t[n+u]!==0&&(o[D[t[n+u]]++]=u);if(e===Ca?(w=O=o,T=20):e===wa?(w=Ea,O=Da,T=257):(w=Oa,O=ka,T=0),v=0,u=0,l=d,C=a,m=p,h=0,x=-1,_=1<<p,S=_-1,e===wa&&_>xa||e===Ta&&_>Sa)return 1;for(;;){k=l-h,o[u]+1<T?(ee=0,te=o[u]):o[u]>=T?(ee=O[o[u]-T],te=w[o[u]-T]):(ee=96,te=0),y=1<<l-h,b=1<<m,d=b;do b-=y,i[C+(v>>h)+b]=k<<24|ee<<16|te|0;while(b!==0);for(y=1<<l-1;v&y;)y>>=1;if(y===0?v=0:(v&=y-1,v+=y),u++,--E[l]===0){if(l===f)break;l=t[n+o[u]]}if(l>p&&(v&S)!==x){for(h===0&&(h=p),C+=d,m=l-h,g=1<<m;m+h<f&&(g-=E[m+h],!(g<=0));)m++,g<<=1;if(_+=1<<m,e===wa&&_>xa||e===Ta&&_>Sa)return 1;x=v&S,i[x]=p<<24|m<<16|C-a|0}}return v!==0&&(i[C+v]=l-h<<24|4194304),s.bits=p,0},ja=0,Ma=1,Na=2,Pa=16180,Fa=16181,Ia=16182,La=16183,Ra=16184,za=16185,Ba=16186,Va=16187,Ha=16188,Ua=16189,Wa=16190,Ga=16191,Ka=16192,qa=16193,Ja=16194,Ya=16195,Xa=16196,Za=16197,Qa=16198,$a=16199,eo=16200,to=16201,no=16202,ro=16203,io=16204,ao=16205,oo=16206,so=16207,co=16208,Z=16209,lo=16210,uo=16211,fo=852,po=592,mo=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24),ho=class{constructor(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}},go=e=>{if(!e)return 1;let t=e.state;return+(!t||t.strm!==e||t.mode<Pa||t.mode>uo)},_o=e=>{if(go(e))return-2;let t=e.state;return e.total_in=e.total_out=t.total=0,e.msg=``,t.wrap&&(e.adler=t.wrap&1),t.mode=Pa,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(fo),t.distcode=t.distdyn=new Int32Array(po),t.sane=1,t.back=-1,0},vo=e=>{if(go(e))return-2;let t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,_o(e)},yo=(e,t)=>{let n;if(go(e))return-2;let r=e.state;return t<0?(n=0,t=-t):(n=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15)?-2:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,vo(e))},bo=(e,t)=>{if(!e)return-2;let n=new ho;e.state=n,n.strm=e,n.window=null,n.mode=Pa;let r=yo(e,t);return r!==0&&(e.state=null),r},xo=!0,So,Co,wo=e=>{if(xo){So=new Int32Array(512),Co=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(Aa(Ma,e.lens,0,288,So,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Aa(Na,e.lens,0,32,Co,0,e.work,{bits:5}),xo=!1}e.lencode=So,e.lenbits=9,e.distcode=Co,e.distbits=5},To=(e,t,n,r)=>{let i,a=e.state;return a.window===null&&(a.window=new Uint8Array(1<<a.wbits)),a.wsize===0&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0),r>=a.wsize?(a.window.set(t.subarray(n-a.wsize,n),0),a.wnext=0,a.whave=a.wsize):(i=a.wsize-a.wnext,i>r&&(i=r),a.window.set(t.subarray(n-r,n-r+i),a.wnext),r-=i,r?(a.window.set(t.subarray(n-r,n),0),a.wnext=r,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=i))),0},Eo=(e,t)=>{let n,r,i,a,o,s,c,l,u,d,f,p,m,h,g=0,_,v,y,b,x,S,C,w,T=new Uint8Array(4),E,D,O=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(go(e)||!e.output||!e.input&&e.avail_in!==0)return-2;n=e.state,n.mode===Ga&&(n.mode=Ka),o=e.next_out,i=e.output,c=e.avail_out,a=e.next_in,r=e.input,s=e.avail_in,l=n.hold,u=n.bits,d=s,f=c,w=0;inf_leave:for(;;)switch(n.mode){case Pa:if(n.wrap===0){n.mode=Ka;break}for(;u<16;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(n.wrap&2&&l===35615){n.wbits===0&&(n.wbits=15),n.check=0,T[0]=l&255,T[1]=l>>>8&255,n.check=U(n.check,T,2,0),l=0,u=0,n.mode=Fa;break}if(n.head&&(n.head.done=!1),!(n.wrap&1)||(((l&255)<<8)+(l>>8))%31){e.msg=`incorrect header check`,n.mode=Z;break}if((l&15)!=8){e.msg=`unknown compression method`,n.mode=Z;break}if(l>>>=4,u-=4,C=(l&15)+8,n.wbits===0&&(n.wbits=C),C>15||C>n.wbits){e.msg=`invalid window size`,n.mode=Z;break}n.dmax=1<<n.wbits,n.flags=0,e.adler=n.check=1,n.mode=l&512?Ua:Ga,l=0,u=0;break;case Fa:for(;u<16;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(n.flags=l,(n.flags&255)!=8){e.msg=`unknown compression method`,n.mode=Z;break}if(n.flags&57344){e.msg=`unknown header flags set`,n.mode=Z;break}n.head&&(n.head.text=l>>8&1),n.flags&512&&n.wrap&4&&(T[0]=l&255,T[1]=l>>>8&255,n.check=U(n.check,T,2,0)),l=0,u=0,n.mode=Ia;case Ia:for(;u<32;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}n.head&&(n.head.time=l),n.flags&512&&n.wrap&4&&(T[0]=l&255,T[1]=l>>>8&255,T[2]=l>>>16&255,T[3]=l>>>24&255,n.check=U(n.check,T,4,0)),l=0,u=0,n.mode=La;case La:for(;u<16;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}n.head&&(n.head.xflags=l&255,n.head.os=l>>8),n.flags&512&&n.wrap&4&&(T[0]=l&255,T[1]=l>>>8&255,n.check=U(n.check,T,2,0)),l=0,u=0,n.mode=Ra;case Ra:if(n.flags&1024){for(;u<16;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}n.length=l,n.head&&(n.head.extra_len=l),n.flags&512&&n.wrap&4&&(T[0]=l&255,T[1]=l>>>8&255,n.check=U(n.check,T,2,0)),l=0,u=0}else n.head&&(n.head.extra=null);n.mode=za;case za:if(n.flags&1024&&(p=n.length,p>s&&(p=s),p&&(n.head&&(C=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(a,a+p),C)),n.flags&512&&n.wrap&4&&(n.check=U(n.check,r,p,a)),s-=p,a+=p,n.length-=p),n.length))break inf_leave;n.length=0,n.mode=Ba;case Ba:if(n.flags&2048){if(s===0)break inf_leave;p=0;do C=r[a+p++],n.head&&C&&n.length<65536&&(n.head.name+=String.fromCharCode(C));while(C&&p<s);if(n.flags&512&&n.wrap&4&&(n.check=U(n.check,r,p,a)),s-=p,a+=p,C)break inf_leave}else n.head&&(n.head.name=null);n.length=0,n.mode=Va;case Va:if(n.flags&4096){if(s===0)break inf_leave;p=0;do C=r[a+p++],n.head&&C&&n.length<65536&&(n.head.comment+=String.fromCharCode(C));while(C&&p<s);if(n.flags&512&&n.wrap&4&&(n.check=U(n.check,r,p,a)),s-=p,a+=p,C)break inf_leave}else n.head&&(n.head.comment=null);n.mode=Ha;case Ha:if(n.flags&512){for(;u<16;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(n.wrap&4&&l!==(n.check&65535)){e.msg=`header crc mismatch`,n.mode=Z;break}l=0,u=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=Ga;break;case Ua:for(;u<32;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}e.adler=n.check=mo(l),l=0,u=0,n.mode=Wa;case Wa:if(n.havedict===0)return e.next_out=o,e.avail_out=c,e.next_in=a,e.avail_in=s,n.hold=l,n.bits=u,2;e.adler=n.check=1,n.mode=Ga;case Ga:if(t===5||t===6)break inf_leave;case Ka:if(n.last){l>>>=u&7,u-=u&7,n.mode=oo;break}for(;u<3;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}switch(n.last=l&1,l>>>=1,--u,l&3){case 0:n.mode=qa;break;case 1:if(wo(n),n.mode=$a,t===6){l>>>=2,u-=2;break inf_leave}break;case 2:n.mode=Xa;break;case 3:e.msg=`invalid block type`,n.mode=Z}l>>>=2,u-=2;break;case qa:for(l>>>=u&7,u-=u&7;u<32;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if((l&65535)!=(l>>>16^65535)){e.msg=`invalid stored block lengths`,n.mode=Z;break}if(n.length=l&65535,l=0,u=0,n.mode=Ja,t===6)break inf_leave;case Ja:n.mode=Ya;case Ya:if(p=n.length,p){if(p>s&&(p=s),p>c&&(p=c),p===0)break inf_leave;i.set(r.subarray(a,a+p),o),s-=p,a+=p,c-=p,o+=p,n.length-=p;break}n.mode=Ga;break;case Xa:for(;u<14;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(n.nlen=(l&31)+257,l>>>=5,u-=5,n.ndist=(l&31)+1,l>>>=5,u-=5,n.ncode=(l&15)+4,l>>>=4,u-=4,n.nlen>286||n.ndist>30){e.msg=`too many length or distance symbols`,n.mode=Z;break}n.have=0,n.mode=Za;case Za:for(;n.have<n.ncode;){for(;u<3;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}n.lens[O[n.have++]]=l&7,l>>>=3,u-=3}for(;n.have<19;)n.lens[O[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,E={bits:n.lenbits},w=Aa(ja,n.lens,0,19,n.lencode,0,n.work,E),n.lenbits=E.bits,w){e.msg=`invalid code lengths set`,n.mode=Z;break}n.have=0,n.mode=Qa;case Qa:for(;n.have<n.nlen+n.ndist;){for(;g=n.lencode[l&(1<<n.lenbits)-1],_=g>>>24,v=g>>>16&255,y=g&65535,!(_<=u);){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(y<16)l>>>=_,u-=_,n.lens[n.have++]=y;else{if(y===16){for(D=_+2;u<D;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(l>>>=_,u-=_,n.have===0){e.msg=`invalid bit length repeat`,n.mode=Z;break}C=n.lens[n.have-1],p=3+(l&3),l>>>=2,u-=2}else if(y===17){for(D=_+3;u<D;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}l>>>=_,u-=_,C=0,p=3+(l&7),l>>>=3,u-=3}else{for(D=_+7;u<D;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}l>>>=_,u-=_,C=0,p=11+(l&127),l>>>=7,u-=7}if(n.have+p>n.nlen+n.ndist){e.msg=`invalid bit length repeat`,n.mode=Z;break}for(;p--;)n.lens[n.have++]=C}}if(n.mode===Z)break;if(n.lens[256]===0){e.msg=`invalid code -- missing end-of-block`,n.mode=Z;break}if(n.lenbits=9,E={bits:n.lenbits},w=Aa(Ma,n.lens,0,n.nlen,n.lencode,0,n.work,E),n.lenbits=E.bits,w){e.msg=`invalid literal/lengths set`,n.mode=Z;break}if(n.distbits=6,n.distcode=n.distdyn,E={bits:n.distbits},w=Aa(Na,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,E),n.distbits=E.bits,w){e.msg=`invalid distances set`,n.mode=Z;break}if(n.mode=$a,t===6)break inf_leave;case $a:n.mode=eo;case eo:if(s>=6&&c>=258){e.next_out=o,e.avail_out=c,e.next_in=a,e.avail_in=s,n.hold=l,n.bits=u,ya(e,f),o=e.next_out,i=e.output,c=e.avail_out,a=e.next_in,r=e.input,s=e.avail_in,l=n.hold,u=n.bits,n.mode===Ga&&(n.back=-1);break}for(n.back=0;g=n.lencode[l&(1<<n.lenbits)-1],_=g>>>24,v=g>>>16&255,y=g&65535,!(_<=u);){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(v&&!(v&240)){for(b=_,x=v,S=y;g=n.lencode[S+((l&(1<<b+x)-1)>>b)],_=g>>>24,v=g>>>16&255,y=g&65535,!(b+_<=u);){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}l>>>=b,u-=b,n.back+=b}if(l>>>=_,u-=_,n.back+=_,n.length=y,v===0){n.mode=ao;break}if(v&32){n.back=-1,n.mode=Ga;break}if(v&64){e.msg=`invalid literal/length code`,n.mode=Z;break}n.extra=v&15,n.mode=to;case to:if(n.extra){for(D=n.extra;u<D;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}n.length+=l&(1<<n.extra)-1,l>>>=n.extra,u-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=no;case no:for(;g=n.distcode[l&(1<<n.distbits)-1],_=g>>>24,v=g>>>16&255,y=g&65535,!(_<=u);){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(!(v&240)){for(b=_,x=v,S=y;g=n.distcode[S+((l&(1<<b+x)-1)>>b)],_=g>>>24,v=g>>>16&255,y=g&65535,!(b+_<=u);){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}l>>>=b,u-=b,n.back+=b}if(l>>>=_,u-=_,n.back+=_,v&64){e.msg=`invalid distance code`,n.mode=Z;break}n.offset=y,n.extra=v&15,n.mode=ro;case ro:if(n.extra){for(D=n.extra;u<D;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}n.offset+=l&(1<<n.extra)-1,l>>>=n.extra,u-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg=`invalid distance too far back`,n.mode=Z;break}n.mode=io;case io:if(c===0)break inf_leave;if(p=f-c,n.offset>p){if(p=n.offset-p,p>n.whave&&n.sane){e.msg=`invalid distance too far back`,n.mode=Z;break}p>n.wnext?(p-=n.wnext,m=n.wsize-p):m=n.wnext-p,p>n.length&&(p=n.length),h=n.window}else h=i,m=o-n.offset,p=n.length;p>c&&(p=c),c-=p,n.length-=p;do i[o++]=h[m++];while(--p);n.length===0&&(n.mode=eo);break;case ao:if(c===0)break inf_leave;i[o++]=n.length,c--,n.mode=eo;break;case oo:if(n.wrap){for(;u<32;){if(s===0)break inf_leave;s--,l|=r[a++]<<u,u+=8}if(f-=c,e.total_out+=f,n.total+=f,n.wrap&4&&f&&(e.adler=n.check=n.flags?U(n.check,i,f,o-f):Di(n.check,i,f,o-f)),f=c,n.wrap&4&&(n.flags?l:mo(l))!==n.check){e.msg=`incorrect data check`,n.mode=Z;break}l=0,u=0}n.mode=so;case so:if(n.wrap&&n.flags){for(;u<32;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(n.wrap&4&&l!==(n.total&4294967295)){e.msg=`incorrect length check`,n.mode=Z;break}l=0,u=0}n.mode=co;case co:w=1;break inf_leave;case Z:w=-3;break inf_leave;case lo:return-4;case uo:default:return-2}return e.next_out=o,e.avail_out=c,e.next_in=a,e.avail_in=s,n.hold=l,n.bits=u,(n.wsize||f!==e.avail_out&&n.mode<Z&&(n.mode<oo||t!==4))&&To(e,e.output,e.next_out,f-e.avail_out)?(n.mode=lo,-4):(d-=e.avail_in,f-=e.avail_out,e.total_in+=d,e.total_out+=f,n.total+=f,n.wrap&4&&f&&(e.adler=n.check=n.flags?U(n.check,i,f,e.next_out-f):Di(n.check,i,f,e.next_out-f)),e.data_type=n.bits+(n.last?64:0)+(n.mode===Ga?128:0)+(n.mode===$a||n.mode===Ja?256:0),(d===0&&f===0||t===4)&&w===0&&(w=-5),w)},Do=e=>{if(go(e))return-2;let t=e.state;return t.window&&=null,e.state=null,0},Oo=(e,t)=>{let n=t.length,r,i,a;return go(e)||(r=e.state,r.wrap!==0&&r.mode!==Wa)?-2:r.mode===Wa&&(i=1,i=Di(i,t,n,0),i!==r.check)?-3:(a=To(e,t,n,n),a?(r.mode=lo,-4):(r.havedict=1,0))},ko=class{constructor(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg=``,this.state=null,this.data_type=2,this.adler=0}},Ao=e=>{let t=new Uint8Array(e.reduce((e,t)=>e+t.length,0)),n=0;for(let r of e)t.set(r,n),n+=r.length;return t},jo=Object.prototype.toString,Mo={level:-1,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,raw:!1,gzip:!1,legacyHash:!1,dictionary:new Uint8Array},No=class{options;err;msg;ended;started;chunks;strm;result;constructor(e={}){this.options=Object.assign({},Mo,e);let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg=``,this.ended=!1,this.started=!1,this.chunks=[],this.result=new Uint8Array,this.strm=new ko,this.strm.avail_out=0;let n=pa(this.strm,t.level,8,t.windowBits,t.memLevel,t.strategy,t.legacyHash);if(n!==0)throw Error(ki[n]);jo.call(t.dictionary)===`[object ArrayBuffer]`&&(t.dictionary=new Uint8Array(t.dictionary));let r=t.dictionary;if(r.length){if(t.gzip)throw Error(`dictionary is not supported with gzip`);if(n=ga(this.strm,r),n!==0)throw Error(ki[n])}}push(e,t=!1){let n=this.strm,r=this.options.chunkSize,i,a;if(this.ended)return!1;for(a=typeof t==`number`?t:t===!0?4:0,n.input=typeof e==`string`?new TextEncoder().encode(e):jo.call(e)===`[object ArrayBuffer]`?new Uint8Array(e):e,n.next_in=0,n.avail_in=n.input.length,this.started||(this.started=!0,this.onStart(n));;){if(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),(a===2||a===3)&&n.avail_out<=6){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(i=ma(n,a),i===-2)break;if(i===1){n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),i=ha(this.strm);break}if(n.avail_out===0){this.onData(n.output);continue}if(a>0&&n.next_out>0){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(n.avail_in===0)return!0}return this.err=i,this.msg=n.msg||ki[i],this.ended=!0,this.onEnd(i),i===0}onStart(e){}onData(e){this.chunks.push(e)}onEnd(e){e===0&&(this.result=Ao(this.chunks)),this.chunks=[]}};function Po(e,t={}){let n=new No(t);if(n.push(e,!0),n.err)throw Error(n.msg);return n.result}function Fo(e,t={}){return Po(e,Object.assign({},t,{raw:!0}))}function Io(e,t={}){return Po(e,Object.assign({},t,{gzip:!0}))}var Lo=Object.prototype.toString,Ro={chunkSize:65536,windowBits:15,raw:!1,dictionary:new Uint8Array},zo=class{options;err;msg;ended;started;chunks;strm;result;constructor(e={}){this.options=Object.assign({},Ro,e);let t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!e.windowBits&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15||(t.windowBits|=15)),this.err=0,this.msg=``,this.ended=!1,this.started=!1,this.chunks=[],this.result=new Uint8Array,this.strm=new ko,this.strm.avail_out=0;let n=bo(this.strm,t.windowBits);if(n!==0)throw Error(ki[n]);Lo.call(t.dictionary)===`[object ArrayBuffer]`&&(t.dictionary=new Uint8Array(t.dictionary));let r=t.dictionary;if(t.raw&&r.length&&(n=Oo(this.strm,r),n!==0))throw Error(ki[n])}push(e,t=!1){let n=this.strm,r=this.options.chunkSize,i,a,o;if(this.ended)return this.err===0;for(a=typeof t==`number`?t:t===!0?4:0,n.input=Lo.call(e)===`[object ArrayBuffer]`?new Uint8Array(e):e,n.next_in=0,n.avail_in=n.input.length,this.started||(this.started=!0,this.onStart(n));;){if(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),i=Eo(n,a),i===2){let e=this.options.dictionary;e.length&&(i=Oo(n,e),i===0?i=Eo(n,a):i===-3&&(i=2))}for(;n.avail_in>0&&i===1&&n.state.wrap&2&&n.state.flags!==0&&n.input[n.next_in]!==0;)vo(n),i=Eo(n,a);if(i===-2||i===-3||i===2||i===-4)break;if(o=n.avail_out,n.next_out&&(n.avail_out===0||i===1||a>0)&&(this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out)),n.avail_out=0,n.next_out=0),i!==0&&i!==-5||o!==0){if(i===1){i=Do(this.strm);break}if(n.avail_in===0){if(a===4){i=Do(this.strm),i===0&&(i=-5);break}return!0}}}return this.err=i,this.msg=n.msg||ki[i],this.ended=!0,this.onEnd(i),i===0}onStart(e){}onData(e){this.chunks.push(e)}onEnd(e){e===0&&(this.result=Ao(this.chunks)),this.chunks=[]}};function Bo(e,t={}){let n=new zo(t);if(n.push(e,!0),n.err)throw Error(n.msg);let r=n.result;return t.toText?new TextDecoder().decode(r):r}function Vo(e,t={}){return Bo(e,{...t,raw:!0})}function Ho(e){return typeof e==`string`?new Uint8Array(Qe(e,`utf8`)):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}function Uo(e){let t={};return e&&(typeof e.level==`number`&&(t.level=e.level),typeof e.windowBits==`number`&&(t.windowBits=e.windowBits),typeof e.memLevel==`number`&&(t.memLevel=e.memLevel),typeof e.strategy==`number`&&(t.strategy=e.strategy)),t}function Wo(e,t,n){return Qe(e(Ho(t),Uo(n)))}function Go(e,t,n,r){let i=typeof n==`function`?n:r,a=typeof n==`function`?void 0:n;if(typeof i!=`function`)throw TypeError(`zlib: callback is required`);let o;try{o=Wo(e,t,a)}catch(e){queueMicrotask(()=>i(e instanceof Error?e:Error(String(e))));return}queueMicrotask(()=>i(null,o))}const Ko={gzipSync:(e,t)=>Wo(Io,e,t),gunzipSync:(e,t)=>Wo(Bo,e,t),deflateSync:(e,t)=>Wo(Po,e,t),inflateSync:(e,t)=>Wo(Bo,e,t),deflateRawSync:(e,t)=>Wo(Fo,e,t),inflateRawSync:(e,t)=>Wo(Vo,e,t),gzip:(e,t,n)=>Go(Io,e,t,n),gunzip:(e,t,n)=>Go(Bo,e,t,n),deflate:(e,t,n)=>Go(Po,e,t,n),inflate:(e,t,n)=>Go(Bo,e,t,n),deflateRaw:(e,t,n)=>Go(Fo,e,t,n),inflateRaw:(e,t,n)=>Go(Vo,e,t,n),constants:{Z_NO_FLUSH:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1}};function qo(e){let t=[],n={},r=[],i=(e,t)=>{if(e in n){let r=n[e];Array.isArray(r)?r.push(String(t)):n[e]=[String(r),String(t)]}else n[e]=t},a=2;for(;a<e.length;){let n=e[a];if(n===`--`){r.push(...e.slice(a+1));break}if(n.startsWith(`--`)){let t=n.slice(2),r=t.indexOf(`=`);if(r!==-1){i(t.slice(0,r),t.slice(r+1)),a++;continue}let o=e[a+1];if(o!==void 0&&!o.startsWith(`-`)){i(t,o),a+=2;continue}i(t,!0),a++;continue}if(n.startsWith(`-`)&&n.length>1){for(let e of n.slice(1))i(e,!0);a++;continue}t.push(n),a++}return{positional:t,flags:n,subcommand:t.length>0&&/^[a-z][\w-]*$/i.test(t[0])?t[0]:null,passthrough:r}}function Jo(e){let t=[...e];return Object.defineProperty(t,"parseFlags",{value:()=>qo(t),enumerable:!1,writable:!1,configurable:!1}),t}const Yo=async(e,t,n)=>{let r=Math.max(1,Math.trunc(e)||1),i=Array(t.length),a=0,o=[],s=async()=>{for(;;){let e=a++;if(e>=t.length)return;i[e]=await n(t[e],e)}};for(let e=0;e<Math.min(r,t.length);e++)o.push(s());return await Promise.all(o),i},Xo={ms:1,s:1e3,m:6e4,h:36e5,d:864e5,w:6048e5,M:26298e5,y:315576e5};function Zo(e){if(typeof e==`number`&&Number.isFinite(e))return Math.trunc(e);if(typeof e!=`string`)throw TypeError(`time.parseDuration: spec must be string or number`);let t=e.trim(),n=/^([0-9]+(?:\.[0-9]+)?)\s*(ms|s|m|h|d|w|M|y)?$/.exec(t);if(!n)throw RangeError(`time.parseDuration: unrecognized spec "${e}"`);let r=Number(n[1]),i=n[2]??`ms`;return Math.trunc(r*Xo[i])}function Qo(e){return e<10?`0${e}`:String(e)}const $o={parseDuration:Zo,ago(e,t=new Date){return new Date(t.getTime()-Zo(e))},range(e,t=new Date){let n=new Date(t.getTime());return{start:new Date(n.getTime()-Zo(e)),end:n}},future(e,t=new Date){let n=new Date(t.getTime());return{start:n,end:new Date(n.getTime()+Zo(e))}},gmailDate(e,t=new Date){let n=new Date(t.getTime()-Zo(e));return`${n.getFullYear()}/${Qo(n.getMonth()+1)}/${Qo(n.getDate())}`}};function es(e){if(!e)return``;let t=e.lastIndexOf(`/`);return t<0?``:t===0?`/`:e.substring(0,t)}var ts=class extends Error{code;constructor(e){super(`Process exited with code ${e}`),this.code=e,this.name=`NodeExitError`}};function ns(e){let t=Number(e);return Number.isFinite(t)?t:0}function rs(e){return typeof e==`string`?`type string ('${e}')`:typeof e==`boolean`?`type boolean (${e})`:typeof e==`bigint`?`type bigint (${e}n)`:Array.isArray(e)?`an instance of Array`:typeof e==`object`&&e?`an instance of Object`:`type ${typeof e}`}function is(e){let t=TypeError(`The "code" argument must be of type number. Received ${rs(e)}`);return t.code=`ERR_INVALID_ARG_TYPE`,t}function as(e){let t=RangeError(`The value of "code" is out of range. It must be an integer. Received ${String(e)}`);return t.code=`ERR_OUT_OF_RANGE`,t}function os(e){if(e!=null){if(typeof e==`string`){let t=Number(e);if(e!==``&&Number.isInteger(t))return t===0?0:t;throw is(e)}if(typeof e==`number`){if(Number.isInteger(e))return e===0?0:e;throw as(e)}throw is(e)}}function ss(e){if(typeof e==`string`)return e;if(e==null)return String(e);try{return JSON.stringify(e)}catch{return String(e)}}function cs(e){return`${e.map(ss).join(` `)}\n`}function ls(e){return e===void 0?`default`:String(e)}function us(){return typeof performance<`u`?performance.now():Date.now()}function ds(e){return`${e.toFixed(3)}ms`}function fs(e,t,n){let r=cs(n);e(t>0?`${` `.repeat(t)}${r}`:r)}function ps(e,t,n){if(t)return;if(n.length===0){e(`Assertion failed`);return}let[r,...i]=n;e(`Assertion failed: ${ss(r)}`,...i)}function ms(e,t,n,r){e(r.length>0?`Trace: ${r.map(ss).join(` `)}`:`Trace:`);let i=Error().stack;if(!i)return;let a=i.split(`
|
|
37
37
|
`).slice(3).join(`
|
|
38
38
|
`);if(!a)return;let o=a.endsWith(`
|
|
39
|
-
`)?a:`${a}\n`;t(n>0?`${` `.repeat(n)}${o}`:o)}function
|
|
40
|
-
`);return t[t.length-1]===``&&t.pop(),t.map(e=>e.endsWith(`\r`)?e.slice(0,-1):e)}function
|
|
39
|
+
`)?a:`${a}\n`;t(n>0?`${` `.repeat(n)}${o}`:o)}function hs(e,t,n){let r=ls(n);if(e.has(r)){t(`Label '${r}' already exists for console.time()`);return}e.set(r,us())}function gs(e,t,n,r){let i=ls(r),a=e.get(i);if(a===void 0){t(`No such label '${i}' for console.timeEnd()`);return}e.delete(i),n(`${i}: ${ds(us()-a)}`)}function _s(e,t,n,r,i){let a=ls(r),o=e.get(a);if(o===void 0){t(`No such label '${a}' for console.timeLog()`);return}let s=`${a}: ${ds(us()-o)}`;i.length===0?n(s):n(s,...i)}function vs(e,t,n){let r=ls(n),i=(e.get(r)??0)+1;e.set(r,i),t(`${r}: ${i}`)}function ys(e,t,n){let r=ls(n);if(!e.has(r)){t(`Count for '${r}' does not exist`);return}e.set(r,0)}function bs(e,t,n){n.length>0&&t(...n),e.depth+=1}function xs(e){e.depth>0&&--e.depth}function Ss(e,t){let n=new Map,r=new Map,i={depth:0},a=(...t)=>fs(e,i.depth,t),o=(...e)=>fs(t,i.depth,e),s=(...e)=>bs(i,a,e);return{log:a,info:a,debug:a,dirxml:a,table:a,warn:o,error:o,dir:(e,t)=>a(e),clear:()=>void 0,group:s,groupCollapsed:s,groupEnd:()=>xs(i),assert:(e,...t)=>ps(o,e,t),trace:(...e)=>ms(o,t,i.depth,e),time:e=>hs(r,o,e),timeEnd:e=>gs(r,o,a,e),timeLog:(e,...t)=>_s(r,o,a,e,t),count:e=>vs(n,a,e),countReset:e=>ys(n,o,e)}}function Cs(e,t){return e.process===void 0?(e.process=t,()=>{e.process===t&&delete e.process}):()=>void 0}function ws(e,t,n){return Object.assign(new De,{fd:e,write:e=>(t(e),!0),end:()=>void 0,isTTY:n})}function Ts(e,t,n){let r=!!e.env?.NO_COLOR,i=!1,a,o,s=e=>{i=!0,o=e,a=e},c=Ds(e.stdin??``,s),l=Jo(e.argv),u=ws(1,t,!r),d=ws(2,n,!r);return{processShim:{argv:l,env:e.env,versions:{node:xn},version:`v${xn}`,platform:`linux`,arch:`x64`,cwd:()=>e.cwd,get exitCode(){return a},set exitCode(e){a=os(e)},exit:(...e)=>{if(e.length===0){let e=ns(a);throw s(e),new ts(e)}a=os(e[0]);let t=ns(a);throw s(t),new ts(t)},stdin:c,stdout:u,stderr:d},getDidCallProcessExit:()=>i,getExitCode:()=>ns(i?o:a),recordExit:s}}var Es=class extends rt.Stream{isTTY=!1;fd=0;consumed=!1;flowScheduled=!1;paused=!1;buffer;onExit;constructor(e,t){super(),this.buffer=e,this.onExit=t}read(){return this.consumed?null:(this.consumed=!0,this.buffer.length>0?this.buffer:null)}toString(){return this.buffer}setEncoding(e){return this}pause(){return this.paused=!0,this}resume(){return this.paused=!1,this.scheduleFlow(),this}on(e,t){return super.on(e,t),e===`data`&&this.scheduleFlow(),this}addListener(e,t){return this.on(e,t)}once(e,t){return super.once(e,t),e===`data`&&this.scheduleFlow(),this}scheduleFlow(){this.flowScheduled||(this.flowScheduled=!0,queueMicrotask(()=>this.flush()))}flush(){if(this.paused){this.flowScheduled=!1;return}try{this.consumed||(this.consumed=!0,this.buffer.length>0&&this.emit(`data`,this.buffer)),this.readable=!1,this.emit(`end`),this.emit(`close`)}catch(e){if(e instanceof ts){this.onExit(e.code);return}throw e}}[Symbol.asyncIterator](){return{next:async()=>this.consumed?{value:void 0,done:!0}:(this.consumed=!0,{value:this.buffer,done:!1})}}};function Ds(e,t){return new Es(e,t)}function Os(e){if(e===``)return[];let t=e.split(`
|
|
40
|
+
`);return t[t.length-1]===``&&t.pop(),t.map(e=>e.endsWith(`\r`)?e.slice(0,-1):e)}function ks(e){if(typeof e==`string`)return e;if(e&&typeof e.read==`function`){let t=e.read();return typeof t==`string`?t:``}return``}function As(e){return new TextDecoder(`utf-8`).decode(ie(e))}function js(e){if(e&&typeof e.write==`function`)return e}var Ms=class extends De{terminal=!1;lines;cursor=0;closed=!1;flushScheduled=!1;output;onExit;constructor(e,t,n){super(),this.lines=Os(As(ks(e))),this.output=t??n.output,this.onExit=n.onExit}on(e,t){return super.on(e,t),e===`line`&&this.scheduleFlush(),this}once(e,t){return super.once(e,t),e===`line`&&this.scheduleFlush(),this}pause(){return this}resume(){return this}close(){this.closed||(this.closed=!0,this.emit(`close`))}question(e,t,n){let r=typeof t==`function`?t:typeof n==`function`?n:void 0;this.output?.write(String(e));let i=this.cursor<this.lines.length?this.lines[this.cursor++]:``;if(r){queueMicrotask(()=>this.runHandler(()=>r(i)));return}return Promise.resolve(i)}[Symbol.asyncIterator](){return{next:async()=>!this.closed&&this.cursor<this.lines.length?{value:this.lines[this.cursor++],done:!1}:(this.close(),{value:void 0,done:!0})}}scheduleFlush(){this.flushScheduled||this.closed||(this.flushScheduled=!0,queueMicrotask(()=>this.flush()))}flush(){this.flushScheduled=!1,this.runHandler(()=>{for(;!this.closed&&this.cursor<this.lines.length;)this.emit(`line`,this.lines[this.cursor++]);this.close()})}runHandler(e){try{e()}catch(e){if(e instanceof ts&&this.onExit){this.closed=!0,this.onExit(e.code);return}throw e}}};function Ns(e){let t=(t,n)=>{let r,i;if(t&&typeof t==`object`&&`input`in t){let e=t;r=e.input,i=js(e.output)}else r=t,i=js(n);if(r==null)throw TypeError(`readline.createInterface: an 'input' stream is required`);return new Ms(r,i,e)},n=(...e)=>{let t=e[e.length-1];return typeof t==`function`&&queueMicrotask(()=>t()),!0},r={createInterface:t,Interface:Ms,emitKeypressEvents:()=>void 0,cursorTo:n,moveCursor:n,clearLine:n,clearScreenDown:n};return{...r,promises:r}}var Ps=class extends Error{status;statusText;url;body;constructor(e,t,n,r){let i=typeof r==`string`&&r?`: ${r.slice(0,200)}`:r&&typeof r==`object`?`: ${Fs(r).slice(0,200)}`:``;super(`HTTP ${e} ${t} ${n}${i}`),this.status=e,this.statusText=t,this.url=n,this.body=r,this.name=`HttpError`}};function Fs(e){try{return JSON.stringify(e)}catch{return String(e)}}function Is(e){return new Promise(t=>setTimeout(t,e))}function Ls(e,t){let n=[];for(let[e,r]of Object.entries(t))if(r!=null){if(Array.isArray(r))for(let t of r)t!=null&&n.push(`${encodeURIComponent(e)}=${encodeURIComponent(String(t))}`);else n.push(`${encodeURIComponent(e)}=${encodeURIComponent(String(r))}`)}return n.length===0?e:e+(e.includes(`?`)?`&`:`?`)+n.join(`&`)}function Rs(e,t,n){let r;return r=/^[a-z][a-z0-9+.-]*:\/\//i.test(t)?t:e?`${e.endsWith(`/`)?e.slice(0,-1):e}${t.startsWith(`/`)?t:`/${t}`}`:t,n?Ls(r,n):r}function zs(e,t){let n={};if(e)for(let[t,r]of Object.entries(e))n[t]=r;if(t)for(let[e,r]of Object.entries(t))n[e]=r;return n}function Bs(e){if(!e)return!1;let t=e.toLowerCase();return t.startsWith(`application/json`)||/[+/]json(;|$|\s)/.test(t)}function Vs(e){if(!e)return null;let t=e.trim();if(!t)return null;if(/^\d+(\.\d+)?$/.test(t)){let e=Number(t);if(Number.isFinite(e)&&e>=0)return Math.round(e*1e3)}let n=Date.parse(t);if(Number.isFinite(n)){let e=n-Date.now();return e>0?e:0}return null}async function Hs(e){if(Bs(e.headers.get(`content-type`))){let t=await e.text();if(!t)return null;try{return JSON.parse(t)}catch{return t}}return e.text()}function Us(e,t){if(e!=null)return typeof e==`string`||e instanceof ArrayBuffer||ArrayBuffer.isView(e)||typeof Blob<`u`&&e instanceof Blob||typeof FormData<`u`&&e instanceof FormData||typeof URLSearchParams<`u`&&e instanceof URLSearchParams||typeof ReadableStream<`u`&&e instanceof ReadableStream?e:typeof e==`object`?(Object.keys(t).some(e=>e.toLowerCase()===`content-type`)||(t[`Content-Type`]=`application/json`),JSON.stringify(e)):String(e)}function Ws(e,t){return Object.keys(e).some(e=>e.toLowerCase()===t.toLowerCase())}async function Gs(e,t,n){let r=await t(n);r&&!Ws(e,`authorization`)&&(e.Authorization=`Bearer ${r}`)}function Ks(e,t){if(!t)return{signal:e,clearTimeout:null};let n=new AbortController,r=setTimeout(()=>n.abort(Error(`timeout`)),t),i=()=>clearTimeout(r);return e?{signal:AbortSignal.any([e,n.signal]),clearTimeout:i}:{signal:n.signal,clearTimeout:i}}function qs(e,t){return{body:t,headers:Object.fromEntries(e.headers.entries()),status:e.status}}async function Js(e,t){let n=await Hs(e);return t?qs(e,n):n}async function Ys(e,t){let n=await Hs(e).catch(()=>null);throw new Ps(e.status,e.statusText,t,n)}function Xs(e,t){let n=Vs(e.headers.get(`retry-after`));return n===null?500*2**t:n}const Zs=new Set([`GET`,`HEAD`,`OPTIONS`,`TRACE`,`PUT`,`DELETE`]),Qs=new Set([429]);function $s(e,t,n){return Qs.has(e)?!0:n.has(t.toUpperCase())}async function ec(e,t,n,r){let i=null;for(let a=0;a<e.maxAttempts;a++){let{signal:o,clearTimeout:s}=Ks(r.signal,e.timeoutMs),c=o?{...n,signal:o}:n,l;try{l=await e.fetch(t,c)}finally{s?.()}if(i=l,l.ok)return Js(l,r.raw);let u=n.method??`GET`;if(!(a+1<e.maxAttempts&&e.retryOn.has(l.status)&&$s(l.status,u,e.retryMethods)))return Ys(l,t);await e.sleep(Xs(l,a))}if(i)return Ys(i,t);throw Error(`http: no attempts made for ${n.method??`GET`} ${t}`)}function tc(e){let t=e.sleep??Is;function n(n){let r=new Set(n.retry?.on??[]),i=Math.max(1,Math.trunc(n.retry?.maxAttempts??1)),a=n.retry?.methods?new Set(n.retry.methods.map(e=>e.toUpperCase())):new Set(Zs);async function o(o,s,c={}){let l=Rs(n.baseUrl,s,c.params),u=zs(n.headers,c.headers);n.token&&await Gs(u,n.token,{method:o,path:s,url:l});let d=Us(c.body,u),f={method:o,headers:u};return d!==void 0&&(f.body=d),ec({fetch:e.fetch,sleep:t,maxAttempts:i,retryOn:r,retryMethods:a,timeoutMs:n.timeoutMs},l,f,c)}return Object.freeze({get:((e,t)=>o(`GET`,e,t)),post:((e,t)=>o(`POST`,e,t)),put:((e,t)=>o(`PUT`,e,t)),patch:((e,t)=>o(`PATCH`,e,t)),delete:((e,t)=>o(`DELETE`,e,t))})}return Object.freeze({client:n})}function nc(e){let t=new TextEncoder().encode(e),n=``;for(let e=0;e<t.length;e++)n+=String.fromCharCode(t[e]);return btoa(n)}function rc(e,t,n){let r=[];t.model&&r.push(`--model`,String(t.model)),t.thinking&&r.push(`--thinking`,String(t.thinking)),t.schema&&r.push(`--schema-b64`,nc(JSON.stringify(t.schema))),t.readOnly!==void 0&&r.push(`--read-only`,Array.isArray(t.readOnly)?t.readOnly.join(`,`):String(t.readOnly));let i=t.cwd===void 0?n||`.`:String(t.cwd),a=t.allowedCommands===void 0?`*`:String(t.allowedCommands);return[`agent`,...r,i,a,String(e)]}function ic(e,t){let n=t.cwd,r=async(t,r)=>{let i=r??{},a=await e.spawn(rc(t,i,n)),o=typeof a.exitCode==`number`?a.exitCode:0;return{finalText:String(a.stdout??``).replace(/\n+$/,``),exitCode:o,stderr:String(a.stderr??``).replace(/\n+$/,``)}},i=(async(e,t)=>{let n=t??{},i=await r(e,n);if(i.exitCode!==0)throw Error(`agent: exited with code ${i.exitCode}${i.stderr?`: ${i.stderr}`:``}`);if(n.schema)try{return JSON.parse(i.finalText)}catch{throw Error(`agent: schema response was not valid JSON (exit ${i.exitCode}): ${i.finalText.slice(0,200)}`)}return i.finalText});return i.spawn=r,i}function ac(){let e=new Uint8Array(16);if(typeof crypto<`u`&&typeof crypto.getRandomValues==`function`)crypto.getRandomValues(e);else for(let t=0;t<e.length;t+=1)e[t]=Math.floor(Math.random()*256);let t=``;for(let n of e)t+=n.toString(16).padStart(2,`0`);return`----SliccFormBoundary${t}`}function oc(e){return typeof FormData<`u`&&e instanceof FormData}function sc(e,t=ac()){let n=new TextEncoder,r=[];for(let i of e){let e=uc(lc(i.name));if(`file`in i){let a=uc(i.file.filename),o=dc(i.file.contentType)||`application/octet-stream`;r.push(n.encode(`--${t}\r
|
|
41
41
|
Content-Disposition: form-data; name="${e}"; filename="${a}"\r
|
|
42
42
|
Content-Type: ${o}\r
|
|
43
43
|
\r
|
|
@@ -45,9 +45,9 @@ Content-Type: ${o}\r
|
|
|
45
45
|
`))}else r.push(n.encode(`--${t}\r
|
|
46
46
|
Content-Disposition: form-data; name="${e}"\r
|
|
47
47
|
\r
|
|
48
|
-
${
|
|
48
|
+
${lc(i.value)}\r
|
|
49
49
|
`))}return r.push(n.encode(`--${t}--\r
|
|
50
|
-
`)),{bytes:
|
|
51
|
-
`)}function nc(e){return e.replace(/\r/g,`%0D`).replace(/\n/g,`%0A`).replace(/"/g,`%22`)}function rc(e){return(e??``).replace(/[\r\n]/g,``).trim()}function ic(e){let t=0;for(let n of e)t+=n.byteLength;let n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.byteLength;return n}function ac(e){let t=``,n=32768;for(let r=0;r<e.length;r+=n)t+=String.fromCharCode(...Array.from(e.subarray(r,r+n)));return btoa(t)}async function oc(e){let t=[];for(let[n,r]of e.entries()){if(typeof r==`string`){t.push({name:n,value:r});continue}let e=new Uint8Array(await r.arrayBuffer());t.push({name:n,file:{data:ac(e),filename:typeof r.name==`string`?r.name:`blob`,type:r.type||``}})}return{kind:`formdata`,entries:t}}async function sc(e,t){let n=()=>Object.keys(t).some(e=>e.toLowerCase()===`content-type`);return typeof e==`string`?{body:e}:e instanceof URLSearchParams?(n()||(t[`Content-Type`]=`application/x-www-form-urlencoded;charset=UTF-8`),{body:e.toString()}):e instanceof Blob?{descriptor:{kind:`blob`,data:ac(new Uint8Array(await e.arrayBuffer())),type:e.type||``}}:e instanceof ArrayBuffer?{descriptor:{kind:`bytes`,data:ac(new Uint8Array(e))}}:ArrayBuffer.isView(e)?{descriptor:{kind:`bytes`,data:ac(new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}}:e instanceof FormData?{descriptor:await oc(e)}:(n()||(t[`Content-Type`]=`application/json`),{body:JSON.stringify(e)})}function cc(e){return e?`const __b64 = (s) => { const bin = atob(s); const n = bin.length; const u = new Uint8Array(n); for (let i = 0; i < n; i++) u[i] = bin.charCodeAt(i); return u; };const __body = `+JSON.stringify(e)+`;if (__body.kind === 'bytes') { __init.body = __b64(__body.data); }else if (__body.kind === 'blob') { __init.body = new Blob([__b64(__body.data)], { type: __body.type }); }else if (__body.kind === 'formdata') { const __fd = new FormData(); for (const e of __body.entries) { if (e.file) { __fd.append(e.name, new Blob([__b64(e.file.data)], { type: e.file.type }), e.file.filename); } else { __fd.append(e.name, e.value); } } __init.body = __fd; }`:``}function lc(e){return`const h = {};r.headers.forEach((v, k) => { h[k] = v; });const ct = r.headers.get('content-type') || '';const __rt = `+JSON.stringify(e??null)+`;const __ctl = ct.toLowerCase();const __binPrefixes = ['image/','audio/','video/','application/octet-stream','application/pdf','application/protobuf','application/x-protobuf','application/wasm','application/zip'];const __isXml = __ctl.indexOf('+xml') !== -1 || __ctl.indexOf('application/xml') === 0 || __ctl.indexOf('text/xml') === 0;const __isBinary = __rt === 'binary' || (__rt !== 'text' && __rt !== 'json' && !__isXml && __binPrefixes.some((p) => __ctl.indexOf(p) === 0));const __meta = { ok: r.ok, status: r.status, statusText: r.statusText, url: r.url, redirected: !!r.redirected, headers: h };if (__isBinary) {const __u = new Uint8Array(await r.arrayBuffer());let __s = ''; const __cs = 0x8000;for (let __i = 0; __i < __u.length; __i += __cs) { __s += String.fromCharCode.apply(null, __u.subarray(__i, __i + __cs)); }return Object.assign(__meta, { body: btoa(__s), bodyEncoding: 'base64' });}const t = await r.text();let b;const __jsonWanted = __rt === 'json' || (__rt !== 'text' && ct.indexOf('application/json') !== -1);if (__jsonWanted) { if (!t) { b = null; } else { try { b = JSON.parse(t); } catch (e) { b = t; } } }else { b = t; }return Object.assign(__meta, { body: b });`}async function uc(e,t={}){let n={},r=t.headers??{};for(let[e,t]of Object.entries(r))typeof t==`string`&&(n[e]=t);let i=typeof t.method==`string`?t.method:`GET`,a=t.credentials===`same-origin`||t.credentials===`omit`?t.credentials:`include`,o=t.body,{body:s,descriptor:c}=o==null?{}:await sc(o,n),l={method:i,credentials:a,headers:n};s!==void 0&&(l.body=s),t.mode!==void 0&&(l.mode=t.mode),t.cache!==void 0&&(l.cache=t.cache),t.redirect!==void 0&&(l.redirect=t.redirect),t.referrer!==void 0&&(l.referrer=t.referrer),t.referrerPolicy!==void 0&&(l.referrerPolicy=t.referrerPolicy),t.integrity!==void 0&&(l.integrity=t.integrity),t.keepalive!==void 0&&(l.keepalive=t.keepalive);let u=cc(c),d=lc(t.responseType),f=typeof t.timeoutMs==`number`&&Number.isFinite(t.timeoutMs)&&t.timeoutMs>0?Math.round(t.timeoutMs):0,p=f>0?`__init.signal = AbortSignal.timeout(${f});`:``;return`(async () => {const __init = `+JSON.stringify(l)+`;`+p+u+`const r = await fetch(`+JSON.stringify(e)+`, __init);`+d+`})()`}function dc(e){if(typeof e==`string`)return e;if(e&&typeof e==`object`&&typeof e.targetId==`string`)return e.targetId;throw TypeError(`browser: expected a tab handle or targetId string`)}function fc(e){function t(t){return{...t,async update(n){let r={};return n.urlMatch!==void 0&&(r.urlMatch=n.urlMatch===null?null:n.urlMatch instanceof RegExp?n.urlMatch.source:n.urlMatch),n.filter!==void 0&&(r.filter=n.filter),e.call(`browser`,`wsUpdate`,[t.id,r])},async close(){return e.call(`browser`,`wsClose`,[t.id])}}}return{on(n,r={}){let i=dc(n),a=r.urlMatch===void 0?void 0:r.urlMatch instanceof RegExp?r.urlMatch.source:r.urlMatch,o,s={filter(e){if(typeof e==`function`||typeof e==`string`)throw TypeError(`browser.websocket: filter must be a declarative JSON object, not a function or string`);return o=e,s},async forward(n){return t(await e.call(`browser`,`wsObserve`,[{targetId:i,urlMatch:a,filter:o,forward:n}]))}};return s},async list(){return e.call(`browser`,`wsList`,[])}}}async function pc(e,t){if(!e&&!(t instanceof Request))return;let n=t instanceof Request?t:null,r=(e?.method??n?.method??`GET`).toUpperCase(),i={};if(e?.headers){if(e.headers instanceof Headers)e.headers.forEach((e,t)=>{i[t]=e});else if(Array.isArray(e.headers))for(let[t,n]of e.headers)i[t]=n;else Object.assign(i,e.headers)}else n&&n.headers.forEach((e,t)=>{i[t]=e});let a,o;if(r!==`GET`&&r!==`HEAD`&&e?.body!==void 0&&e?.body!==null&&e?.body!==``){let t=await mc(e.body);a=t.body,o=t.defaultContentType}return o&&!Object.keys(i).some(e=>e.toLowerCase()===`content-type`)&&(i[`Content-Type`]=o),{method:r,headers:i,body:a}}async function mc(e){if(typeof e==`string`)return{body:e};if(e instanceof URLSearchParams)return{body:e.toString(),defaultContentType:`application/x-www-form-urlencoded;charset=UTF-8`};if(e instanceof Blob)return{body:new Uint8Array(await e.arrayBuffer()),defaultContentType:e.type||`application/octet-stream`};if(e instanceof ArrayBuffer)return{body:new Uint8Array(e).slice(),defaultContentType:`application/octet-stream`};if(ArrayBuffer.isView(e))return{body:new Uint8Array(e.buffer,e.byteOffset,e.byteLength).slice(),defaultContentType:`application/octet-stream`};if(Qs(e)){let t=await ec(e);return{body:t.bytes,defaultContentType:t.contentType}}throw typeof ReadableStream<`u`&&e instanceof ReadableStream?Error(`node fetch shim: ReadableStream request bodies are not supported (collect into a Uint8Array or string before calling fetch)`):Error(`node fetch shim: unsupported request body type (${Object.prototype.toString.call(e)}); use a string, Uint8Array, ArrayBuffer, Blob, FormData, or URLSearchParams`)}function hc(e){return{findTab:t=>e.call(`browser`,`findTab`,[_c(t)]),ensureTab:(t,n={})=>e.call(`browser`,`ensureTab`,[t,vc(n)]),openWindow:(t,n={})=>e.call(`browser`,`openWindow`,[t,n]),windowBounds:t=>e.call(`browser`,`windowBounds`,[dc(t)]),setWindowBounds:(t,n)=>e.call(`browser`,`setWindowBounds`,[dc(t),n]),eval:(t,n)=>e.call(`browser`,`eval`,[dc(t),gc(n,!1)]),evalAsync:(t,n)=>e.call(`browser`,`evalAsync`,[dc(t),gc(n,!0)]),cookie:(t,n)=>e.call(`browser`,`cookie`,[dc(t),n]),localStorage:(t,n)=>e.call(`browser`,`localStorage`,[dc(t),n]),fetch:(t,n,r={})=>uc(n,r).then(n=>e.call(`browser`,`evalAsync`,[dc(t),n])),websocket:fc(e)}}function gc(e,t){if(typeof e==`function`)return`(${e.toString()})()`;if(typeof e==`string`)return e;throw TypeError(`browser.eval/evalAsync: source must be a function or string`)}function _c(e){let t={};return e.domain!==void 0&&(t.domain=e.domain),e.urlMatch!==void 0&&(t.urlMatch=e.urlMatch instanceof RegExp?e.urlMatch.source:e.urlMatch),t}function vc(e){return e.matchUrl===void 0?{}:{matchUrl:e.matchUrl instanceof RegExp?e.matchUrl.source:e.matchUrl}}function yc(e){return{register(t){let n=null,r=e.onEvent(`computer-call`,r=>{let i=r;i.id===t.id&&xc(e,t,i,{getStop:()=>n,setStop:e=>{n=e}})}),i=bc(t);return e.call(`computer`,`register`,[i]).catch(()=>{}),()=>{n?.(),n=null,r(),e.call(`computer`,`unregister`,[t.id]).catch(()=>{})}}}}function bc(e){return{id:e.id,kind:`jsh`,title:e.title??e.id,size:e.size??null,state:`live`,capabilities:e.capabilities,pid:null,...e.softKeys?{softKeys:e.softKeys}:{}}}async function xc(e,t,n,r){let i;try{i=await Sc(e,t,n,r)}catch(e){i={error:e instanceof Error?e.message:String(e)}}try{await e.call(`computer`,`reply`,[n.requestId,i])}catch{}}async function Sc(e,t,n,r){switch(n.op){case`screenshot`:return t.screenshot(n.args[0]??{format:`jpeg`});case`text`:return t.text?t.text():null;case`input`:return await t.input(n.args[0]??[]),{ok:!0};case`exec`:if(!t.exec)throw Error(`exec is not supported`);return t.exec(String(n.args[0]??``));case`subscribe`:return Cc(e,t,Number(n.args[0])||2,Number(n.args[1])||void 0,r);case`unsubscribe`:return r.getStop()?.(),r.setStop(null),{ok:!0};default:{let e=n.op;throw Error(`unknown computer op '${String(e)}'`)}}}function Cc(e,t,n,r,i){if(i.getStop()?.(),!t.subscribe)throw Error(`subscribe is not supported`);let a=t.subscribe(n,n=>{e.call(`computer`,`frame`,[t.id,n]).catch(()=>{})},r);return i.setStop(()=>{try{a()}catch{}}),{ok:!0}}function wc(e){return e===`SIGKILL`?137:e===`SIGINT`?130:143}function Tc(e,t,n,r){let i=async()=>{if(!t?.wasUsed())return;let n=t.getMutations();if(n.created.length||n.modified.length||n.deleted.length)try{await e.call(`vfs`,`flushWrites`,[n])}catch(e){let t=e instanceof Error?e.message:String(e);console.error(`[realm-exec] pre-exec sync-fs flush failed (will retry at exit): ${t}`);return}t.resetBaseline()},a=async(i=!1)=>{if(t?.wasUsed())try{let r=await e.call(`vfs`,`snapshot`,[n]);i?t.applySnapshotPreservingMutations(r):t.applySnapshot(r)}catch(e){let t=e instanceof Error?e.message:String(e);r?.(`[sync-fs] re-snapshot after exec failed: ${t}\n`)}},o=async t=>{await i();try{return await e.call(`exec`,`run`,[t])}finally{await a()}},s=async t=>{await i();try{return await e.call(`exec`,`spawn`,[t])}finally{await a()}},c=1,l=Object.assign(o,{spawn:s,start:(t,n)=>{let r=c++,o=[],s=!1,l=!1,u=!1,d,f,p=new Promise((e,t)=>{d=e,f=t}),m=()=>{if(s||u||l)return;l=!0;let c=o.length>0?o.join(``):n?.stdin,p={};c!==void 0&&(p.stdin=c),n?.stdinKind!==void 0&&(p.stdinKind=n.stdinKind),n?.args!==void 0&&(p.args=n.args),n?.cwd!==void 0&&(p.cwd=n.cwd),n?.env!==void 0&&(p.env=n.env),(async()=>{try{if(await i(),u){await a(!0);return}s=!0;let n=await e.call(`exec`,`start`,[r,t,p]);await a(!0),d(n)}catch(e){await a(!0),f(e)}})()};return{kill:t=>s?e.call(`exec`,`kill`,[r,t]):(u=!0,d({stdout:``,stderr:``,exitCode:wc(t)}),Promise.resolve(!0)),stdin:{write:e=>{!s&&!u&&o.push(e)},end:()=>m()},done:p}}});return l.exec=l,l}const Ec=new Set([204,205,304]),Dc=new Set([`content-encoding`,`transfer-encoding`,`content-length`]);function Oc(e,t){let n=kc(e.body),r=Ac(e.headers),i=Ec.has(e.status)||n.byteLength===0,a=new Response(i?null:n,{status:e.status,statusText:e.statusText,headers:r});try{Object.defineProperty(a,"url",{value:e.url||t,writable:!1,configurable:!0,enumerable:!1})}catch{}return Mc(a,n),a}function kc(e){return e.byteLength===0?new Uint8Array:e.slice()}function Ac(e){let t=new Headers;for(let[n,r]of Object.entries(e))if(!Dc.has(n.toLowerCase()))try{t.set(n,r)}catch{}return t}const jc=Symbol(`slicc.realmBufferedBody`);function Mc(e,t){if(jc in e)return;Object.defineProperty(e,jc,{value:!0,configurable:!0});let n=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),`bodyUsed`),r=!1,i=()=>{if(r)throw TypeError(`Failed to read response body: body already used`);return r=!0,Nc(e),t},a=async()=>new TextDecoder().decode(i()),o=e=>e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);Object.defineProperties(e,{bodyUsed:{configurable:!0,enumerable:!1,get(){return r?!0:n?.get?!!n.get.call(e):!1}},text:{value:a,configurable:!0},json:{value:async()=>JSON.parse(await a()),configurable:!0},arrayBuffer:{value:async()=>o(i()),configurable:!0},blob:{value:async()=>new Blob([o(i())]),configurable:!0},bytes:{value:async()=>i(),configurable:!0}})}function Nc(e){try{let t=e.body;t&&!t.locked&&t.getReader()}catch{}}function Pc(e){if(e instanceof Uint8Array)return e;if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);if(e instanceof ArrayBuffer)return new Uint8Array(e);throw TypeError(`expected an ArrayBuffer or typed array`)}function Fc(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Ic(e){return e==null?[]:Array.isArray(e)?e:[e]}function Lc(e,t){let n=t.handle,r=new Set,i=new Set,a=!1,o=null,s=e=>{let t=e;if(!t||t.handle!==n)return;let i={reportId:t.reportId,data:Fc(t.bytes)};for(let e of[...r])try{e(i)}catch{}},c=()=>{a||(a=!0,o=e.onEvent?e.onEvent(`hid-input-report`,s):null,e.call(`hid`,`subscribeInputReports`,[n]).catch(()=>{a=!1,o?.(),o=null}))},l=()=>{!a||r.size>0||(a=!1,o?.(),o=null,e.call(`hid`,`unsubscribeInputReports`,[n]).catch(()=>{}))};return{...t,open:()=>e.call(`hid`,`open`,[n]),close:()=>e.call(`hid`,`close`,[n]),sendReport:(t,r)=>e.call(`hid`,`sendReport`,[n,t,Pc(r)]),sendFeatureReport:(t,r)=>e.call(`hid`,`sendFeatureReport`,[n,t,Pc(r)]),receiveFeatureReport:async t=>Fc((await e.call(`hid`,`receiveFeatureReport`,[n,t])).bytes),addEventListener(e,t){if(e===`inputreport`)r.add(t),c();else if(e===`disconnect`)i.add(t);else throw TypeError(`hid device: unknown event type '${String(e)}'`)},removeEventListener(e,t){e===`inputreport`?(r.delete(t),l()):e===`disconnect`&&i.delete(t)},onInputReport(e){r.add(e),c()}}}function Rc(e){return{list:async()=>(await e.call(`hid`,`list`,[])).map(t=>Lc(e,t)),request:async t=>{let n=(await e.call(`hid`,`request`,[Ic(t)]))[0];if(!n)throw Error(`No device selected.`);return Lc(e,n)}}}function zc(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}var Bc=class{rpc;targetId;selector;index;constructor(e,t,n,r){this.rpc=e,this.targetId=t,this.selector=n,this.index=r}evalOnElement(e){let t=`(() => { const els = document.querySelectorAll(${JSON.stringify(this.selector)}); const el = els[${this.index}]; ${e} })()`;return this.rpc.call(`browser`,`evalAsync`,[this.targetId,t])}async textContent(){return this.evalOnElement(`return el ? el.textContent : null;`)}async getAttribute(e){return this.evalOnElement(`return el ? el.getAttribute(${JSON.stringify(e)}) : null;`)}async isVisible(){return this.evalOnElement(`if (!el) return false; const s = getComputedStyle(el); if (s.display === 'none' || s.visibility === 'hidden' || s.opacity === '0') return false; const r = el.getBoundingClientRect(); return r.width > 0 && r.height > 0;`)}async boundingBox(){return this.evalOnElement(`if (!el) return null; const r = el.getBoundingClientRect(); return { x: r.x, y: r.y, width: r.width, height: r.height };`)}},Vc=class{rpc;targetId;onClose;closed=!1;constructor(e,t,n){this.rpc=e,this.targetId=t,this.onClose=n}async goto(e,t){await this.rpc.call(`browser`,`navigateTab`,[this.targetId,e])}async waitForLoadState(e){await this.rpc.call(`browser`,`waitForLoadState`,[this.targetId,e??`load`])}async waitForTimeout(e){await new Promise(t=>setTimeout(t,e))}async evaluate(e,...t){let n=typeof e==`string`?e:`(${e.toString()}).apply(null, JSON.parse(${JSON.stringify(JSON.stringify(t))}))`;return this.rpc.call(`browser`,`evalAsync`,[this.targetId,n])}async screenshot(e){let t={};e?.fullPage!==void 0&&(t.fullPage=e.fullPage);let n=zc(await this.rpc.call(`browser`,`screenshotTab`,[this.targetId,t]));return e?.path&&await this.rpc.call(`vfs`,`writeFileBinary`,[e.path,n]),n}async $(e){return await this.rpc.call(`browser`,`evalAsync`,[this.targetId,`!!document.querySelector(${JSON.stringify(e)})`])?new Bc(this.rpc,this.targetId,e,0):null}async $$(e){let t=await this.rpc.call(`browser`,`evalAsync`,[this.targetId,`document.querySelectorAll(${JSON.stringify(e)}).length`]),n=[];for(let r=0;r<t;r++)n.push(new Bc(this.rpc,this.targetId,e,r));return n}async $$eval(e,t,...n){if(typeof t==`string`)return this.rpc.call(`browser`,`evalAsync`,[this.targetId,t]);let r=`(${t.toString()}).apply(null, [Array.from(document.querySelectorAll(${JSON.stringify(e)}))].concat(JSON.parse(${JSON.stringify(JSON.stringify(n))})))`;return this.rpc.call(`browser`,`evalAsync`,[this.targetId,r])}async content(){return this.rpc.call(`browser`,`evalAsync`,[this.targetId,`document.documentElement.outerHTML`])}async setViewportSize(e){await this.rpc.call(`browser`,`setViewport`,[this.targetId,e.width,e.height])}async close(){this.closed||(this.closed=!0,await this.rpc.call(`browser`,`closeTab`,[this.targetId]),this.onClose?.())}},Hc=class{rpc;openPages=[];constructor(e){this.rpc=e}async newPage(e){let t=await this.rpc.call(`browser`,`createTab`,[`about:blank`]);e?.viewport&&await this.rpc.call(`browser`,`setViewport`,[t,e.viewport.width,e.viewport.height]);let n=new Vc(this.rpc,t,()=>{let e=this.openPages.indexOf(n);e!==-1&&this.openPages.splice(e,1)});return this.openPages.push(n),n}pages(){return[...this.openPages]}async close(){let e=this.openPages.splice(0,this.openPages.length);for(let t of e)await t.close()}},Uc=class{rpc;openPages=[];openContexts=[];constructor(e){this.rpc=e}async newPage(e){let t=await this.rpc.call(`browser`,`createTab`,[`about:blank`]);e?.viewport&&await this.rpc.call(`browser`,`setViewport`,[t,e.viewport.width,e.viewport.height]);let n=new Vc(this.rpc,t,()=>{let e=this.openPages.indexOf(n);e!==-1&&this.openPages.splice(e,1)});return this.openPages.push(n),n}async newContext(e){let t=new Hc(this.rpc);return this.openContexts.push(t),t}contexts(){return[...this.openContexts]}async close(){let e=this.openPages.splice(0,this.openPages.length);for(let t of e)await t.close();let t=this.openContexts.splice(0,this.openContexts.length);for(let e of t)await e.close()}};function Wc(e){let t=async t=>new Uc(e),n=async(t,n)=>new Uc(e);return{chromium:{launch:t,connect:n,connectOverCDP:n},firefox:{launch:t,connect:n},webkit:{launch:t,connect:n}}}const Gc=new Set([`bcrypt`,`better-sqlite3`,`canvas`,`cpu-features`,`fsevents`,`leveldown`,`libxmljs`,`libxmljs2`,`node-gyp-build`,`node-sass`,`puppeteer`,`robotjs`,`sass-embedded`,`sharp`,`snappy`,`sqlite3`,`tree-sitter`,`usb`]),Kc={sharp:` Use the built-in 'convert' shell command for image work.`,canvas:` Use the built-in 'convert' / OffscreenCanvas for image work.`,"better-sqlite3":` Use the built-in 'sqlite3' shell command (sql.js WASM).`,sqlite3:` Use the built-in 'sqlite3' shell command (sql.js WASM).`,bcrypt:` Use crypto.subtle.digest() with PBKDF2 / Argon2 in pure JS.`,puppeteer:` Use the built-in browser-automation shell commands.`};function qc(e,t){let n=Kc[t]??``;return Error(`require('${e}'): '${t}' is a Node native module (C++ bindings) — it cannot run in the browser sandbox.${n}`)}function Jc(e){return{...e,time:Go,fmt:Ne,pool:Vo}}function Yc(e,t){return e?.startsWith(`/`)?Ko(e):t}function Xc(e){return e.includes(`require`)||e.includes(`import`)||/(?:^|[;\n}])\s*export\b/.test(e)}async function Zc(e,t,n,r){return Xc(t)?e.call(`module`,`buildGraph`,[t,Yc(r,n),r]):{files:[],entryMap:{},edges:{},edgeErrors:{},errors:{}}}function Qc(e){if(typeof e!=`object`||!e)return;let t=e;if(t.__esModule&&!Object.prototype.hasOwnProperty.call(t,`default`)&&Object.isExtensible(t))try{Object.defineProperty(t,"default",{value:t,enumerable:!1,configurable:!0})}catch{}}function $c(e){return{playwright:Wc(e)}}function el(e){let{graph:t,fsBridge:n,processShim:r,childProcess:i,nodeConsole:a,sliccyModules:o,shimmedPackages:s={},nodeReadline:c,nodeOsModule:l=qn,nodeUtilModule:u=Ct}=e,d=new Map(t.files.map(e=>[e.path,e.cjsSource])),f=new Map(t.files.map(e=>[e.path,e.kind])),p=new Map,m=Bn({requireFrom:(e,t)=>x(e,t),resolveFrom:(e,t)=>b(e,t)}),h=An(()=>{let e=r?.cwd?.();return typeof e==`string`&&e.length>0?e:`/`}),g=e=>{if(typeof e==`string`&&e.startsWith(`sliccy:`))return{hit:!0,value:rl(e,o)};let t=e.startsWith(`node:`)?e.slice(5):e,a=tl(t,{fsBridge:n,processShim:r,childProcess:i,nodeOsModule:l,nodeUtilModule:u,nodePathModule:h,nodeReadline:c,nodeModule:m});if(a.hit)return a;if(Gc.has(t))throw qc(e,t);if(gn.has(t))throw al(e,t);return t in s?{hit:!0,value:s[t]}:{hit:!1}},_=(e,n,r)=>{let i=g(n);if(i.hit)return i.value;let a=e?.[n];if(a)return v(a);let o=r===null?t.errors[n]:t.edgeErrors?.[r]?.[n];throw o?Error(o):nl(n)};function v(e){let n=p.get(e);if(n)return n.exports;let i=d.get(e);if(i===void 0)throw Error(`Cannot find module '${e}'`);let o={exports:{}};p.set(e,o);let s=n=>_(t.edges[e],n,e),c=[`module`,`exports`,`require`,`process`,`console`,`Buffer`,`global`],l=[o,o.exports,s,r,a,globalThis.Buffer,globalThis];return f.get(e)!==`esm`&&(c.push(`__dirname`,`__filename`),l.push(Ko(e),e)),Function(...c,i)(...l),f.get(e)===`cjs`&&Qc(o.exports),o.exports}function y(e){return d.has(e)}function b(e,n){if(vn(n))return n;let r=t.edges[e]?.[n];if(r)return r;let i=Ko(e);if(zn(n)){let e=Ln(i,n,y);if(e)return e}else{let e=Rn(i,n,y);if(e)return e}let a=t.edgeErrors?.[e]?.[n];throw a?Error(a):nl(n)}function x(e,t){let n=g(t);return n.hit?n.value:v(b(e,t))}return{require:e=>_(t.entryMap,e,null)}}function tl(e,t){let{fsBridge:n,processShim:r,childProcess:i,nodeOsModule:a,nodeUtilModule:o,nodePathModule:s,nodeReadline:l,nodeModule:u}=t;return e===`fs`||e===`fs/promises`?{hit:!0,value:n}:e===`path`?{hit:!0,value:s}:e===`crypto`?{hit:!0,value:fn}:e===`child_process`?{hit:!0,value:i}:e===`process`?{hit:!0,value:r}:e===`buffer`?{hit:!0,value:{Buffer:globalThis.Buffer}}:e===`assert`?{hit:!0,value:Ue}:e===`assert/strict`?{hit:!0,value:He}:e===`util`?{hit:!0,value:o}:e===`events`?{hit:!0,value:xe}:e===`os`?{hit:!0,value:a}:e===`tty`?{hit:!0,value:Jn}:e===`stream`?{hit:!0,value:Ye}:e===`url`?{hit:!0,value:c}:e===`zlib`?{hit:!0,value:Ro}:e===`vm`?{hit:!0,value:mr}:e===`readline`&&l?{hit:!0,value:l}:e===`readline/promises`&&l?{hit:!0,value:l.promises}:e===`module`&&u?{hit:!0,value:u}:{hit:!1}}function nl(e){if(e.startsWith(`.`)||e.startsWith(`/`)||e.startsWith(`node:`))return Error(`Cannot find module '${e}'`);let t=e.startsWith(`@`)?e.split(`/`).slice(0,2).join(`/`):e.split(`/`)[0];return Error(`Cannot find module '${e}' (run: ipk install ${t})`)}function rl(e,t){let n=e.slice(7);if(n===``)throw Error(`require('sliccy:'): empty sliccy: module name`);if(!Object.prototype.hasOwnProperty.call(t,n))throw Error(`require('${e}'): unknown sliccy: module '${n}'. Known names: ${Object.keys(t).sort().join(`, `)}`);return t[n]}const il={http:` Use fetch() instead.`,https:` Use fetch() instead.`,crypto:` Use globalThis.crypto (Web Crypto API) instead.`};function al(e,t){return Error(`require('${e}'): Node built-in '${t}' is not available in the browser environment.${il[t]||``}`)}async function ol(e,t,n,r){let i=Object.keys(t),a=i.map(e=>t[e]),o=Object.getPrototypeOf(async function(){}).constructor,s=new o(...i,`${r?`"use strict";
|
|
52
|
-
`:``}${e}`);try{return await s(...a),0}catch(e){return e instanceof qo?e.code:(n(`${e instanceof Error?e.stack??e.message:String(e)}\n`),1)}}var sl=class{port;nextId=1;pending=new Map;eventSubscribers=new Map;progressWaiters=new Set;handler;disposed=!1;constructor(e){this.port=e,this.handler=e=>{let t=e.data;if(t?.type===`realm-rpc-res`){let t=e.data,n=this.pending.get(t.id);if(!n)return;this.pending.delete(t.id),typeof t.error==`string`?n.reject(Error(t.error)):n.resolve(t.result),this.notifyProgress();return}if(t?.type===`realm-event`){let t=e.data,n=this.eventSubscribers.get(t.channel);if(!n)return;for(let e of[...n])try{e(t.payload)}catch{}}},e.addEventListener(`message`,this.handler),e.start?.()}get pendingCount(){return this.pending.size+this.eventSubscriptionCount}get eventSubscriptionCount(){let e=0;for(let t of this.eventSubscribers.values())e+=t.size;return e}waitForProgress(){return this.pendingCount===0?Promise.resolve():new Promise(e=>{this.progressWaiters.add(e)})}notifyProgress(){if(this.progressWaiters.size===0)return;let e=[...this.progressWaiters];this.progressWaiters.clear();for(let t of e)t()}call(e,t,n=[]){if(this.disposed)return Promise.reject(Error(`realm-rpc: client disposed`));let r=this.nextId++,i={type:`realm-rpc-req`,id:r,channel:e,op:t,args:n};return new Promise((e,t)=>{this.pending.set(r,{resolve:e,reject:t}),this.port.postMessage(i)})}onEvent(e,t){if(this.disposed)return()=>{};let n=this.eventSubscribers.get(e);return n||(n=new Set,this.eventSubscribers.set(e,n)),n.add(t),this.notifyProgress(),()=>{let n=this.eventSubscribers.get(e);n&&(n.delete(t),n.size===0&&this.eventSubscribers.delete(e),this.notifyProgress())}}dispose(){if(this.disposed)return;this.disposed=!0,this.port.removeEventListener(`message`,this.handler);let e=Error(`realm-rpc: client disposed`);for(let t of this.pending.values())t.reject(e);this.pending.clear(),this.eventSubscribers.clear(),this.notifyProgress()}};function cl(e,t){let n=t.handle;return{...t,open:t=>e.call(`serial`,`open`,[n,t]),close:()=>e.call(`serial`,`close`,[n]),read:(t={})=>e.call(`serial`,`read`,[n,{maxBytes:t.maxBytes??t.bytes,until:t.until?Pc(t.until):void 0,timeoutMs:t.timeoutMs}]),write:t=>e.call(`serial`,`write`,[n,Pc(t)]),getSignals:()=>e.call(`serial`,`getSignals`,[n]),setSignals:t=>e.call(`serial`,`setSignals`,[n,t])}}function ll(e){return{list:async()=>(await e.call(`serial`,`list`,[])).map(t=>cl(e,t)),request:async t=>cl(e,await e.call(`serial`,`request`,[Ic(t)]))}}const ul=`exec`,dl=6e5,fl=5e3;function Q(e,t){return Object.assign(Error(`${e}: ${t}`),{code:e})}function $(e){let t=ml(e);if(hl(t))return new Uint8Array(t.response);if(t.status>=200&&t.status<300)throw Q(`EIO`,e.label);gl(t,e.label)}function pl(e){let t=$(e);try{return JSON.parse(new TextDecoder().decode(t))}catch{throw Q(`EIO`,e.label)}}function ml(e){let t=new XMLHttpRequest;try{t.open(e.method,e.url,!1),t.responseType=`arraybuffer`,t.timeout=e.timeoutMs,t.setRequestHeader(`x-slicc-fs-token`,e.token),e.body?t.send(new Uint8Array(e.body)):t.send()}catch{throw Q(`EIO`,e.label)}return t}function hl(e){return e.status>=200&&e.status<300&&e.getResponseHeader(`x-slicc-fs`)===`1`}function gl(e,t){throw Q(e.getResponseHeader(`x-slicc-fs`)===`1`&&e.getResponseHeader(`x-slicc-fs-errno`)||`EIO`,t)}function _l(e){let t=e;return!t||typeof t.isFile!=`boolean`||typeof t.isDirectory!=`boolean`||typeof t.size!=`number`?null:{isFile:t.isFile,isDirectory:t.isDirectory,isSymbolicLink:t.isSymbolicLink,size:t.size,...typeof t.mode==`number`?{mode:t.mode}:{},...typeof t.mtimeMs==`number`?{mtimeMs:t.mtimeMs}:{}}}function vl(e,t){return Q(e,`sync-fs bridge, '${t}'`)}function yl(e,t){let n=`/__slicc/fs-sync`+(e.startsWith(`/`)?e:`/${e}`).split(`/`).map(encodeURIComponent).join(`/`);return t?`${n}?op=${t}`:n}function bl(e,t={}){let n=t.timeoutMs??3e4;function r(t,r,i,a){return{method:t,url:yl(r,a),token:e,...i?{body:i}:{},timeoutMs:n,label:`sync-fs bridge, '${r}'`}}return{readFile(e){return $(r(`GET`,e))},writeFile(e,t){$(r(`POST`,e,t))},stat(e){let t=_l(pl(r(`GET`,e,void 0,`stat`)));if(!t)throw vl(`EIO`,e);return t},lstat(e){let t=_l(pl(r(`GET`,e,void 0,`lstat`)));if(!t)throw vl(`EIO`,e);return t},readdir(e){let t=pl(r(`GET`,e,void 0,`readdir`));if(!Array.isArray(t)||!t.every(e=>typeof e==`string`))throw vl(`EIO`,e);return t},exists(e){let t=pl(r(`GET`,e,void 0,`exists`));if(typeof t!=`boolean`)throw vl(`EIO`,e);return t},mkdir(e){$(r(`POST`,e,void 0,`mkdir`))},rm(e){$(r(`POST`,e,void 0,`rm`))},rename(e,t){$(r(`POST`,e,xl({arg2:t}),`rename`))},unlink(e){$(r(`POST`,e,xl({}),`unlink`))},rmdir(e){$(r(`POST`,e,xl({}),`rmdir`))},symlink(e,t){$(r(`POST`,t,xl({arg2:e}),`symlink`))},readlink(e){let t=pl(r(`GET`,e,void 0,`readlink`));if(typeof t!=`string`)throw vl(`EIO`,e);return t},chmod(e,t){$(r(`POST`,e,xl({mode:t}),`chmod`))},utimes(e,t,n){$(r(`POST`,e,xl({atimeMs:t,mtimeMs:n}),`utimes`))}}}function xl(e){return new TextEncoder().encode(JSON.stringify(e))}function Sl(e){return typeof e==`number`&&Number.isFinite(e)&&e>0}function Cl(e){return e===void 0||e===0}function wl(e,t){return Sl(e)?Math.min(e,dl):Math.min(t,dl)}new TextEncoder;const Tl=new TextDecoder;function El(e,t){switch(e){case 1:return{ok:!0,kind:`bytes`,bytes:t};case 3:return{ok:!0,kind:`void`};case 2:try{return{ok:!0,kind:`json`,json:JSON.parse(Tl.decode(t))}}catch{return{ok:!1,errno:`EIO`,message:`sync-sab: malformed json payload`}}case 4:try{let e=JSON.parse(Tl.decode(t)),n=typeof e.errno==`string`&&/^E[A-Z]+$/.test(e.errno)?e.errno:`EIO`;return{ok:!1,errno:n,message:String(e.message??n)}}catch{return{ok:!1,errno:`EIO`,message:`sync-sab: malformed errno payload`}}default:return{ok:!1,errno:`EIO`,message:`sync-sab: unknown status ${e}`}}}function Dl(e){if(e.byteLength<4160)throw Error(`sync-sab: buffer too small (${e.byteLength} < 4160)`);return{header:new Int32Array(e,0,16),window:new Uint8Array(e,64)}}function Ol(e,t,n={}){let{header:r,window:i}=Dl(e),a=n.wait??((e,t,n,r)=>Atomics.wait(e,t,n,r)),o=n.now??(()=>performance.now()),s=0;function c(e,t,n){for(;;){let i=t-o();if(i<=0)throw Q(`ETIMEDOUT`,n);if(a(r,0,1,i),Atomics.load(r,0)===2&&Atomics.load(r,1)===e)return;Atomics.load(r,0)===2&&Atomics.store(r,0,1)}}return{call(e,n,a){let l=++s,u=o()+n,d=null,f=0,p=0;try{for(;;){Atomics.store(r,0,1);let n=p===0?{type:`sync-sab-req`,id:l,req:e}:{type:`sync-sab-next`,id:l,offset:p};try{t.postMessage(n)}catch{throw Q(`EIO`,a)}c(l,u,a);let o=Atomics.load(r,3),s=Atomics.load(r,4);if(Atomics.load(r,5)!==p||s<0||o<0||p+s>o)throw Q(`EIO`,a);if(d===null&&(f=Atomics.load(r,2),d=new Uint8Array(o)),d.set(i.subarray(0,s),p),p+=s,p>=o)break;if(s===0)throw Q(`EIO`,a)}}finally{Atomics.store(r,0,0)}return El(f,d)}}}function kl(e,t){return Q(e,`sync-sab bridge, '${t}'`)}function Al(e,t={}){let n=t.timeoutMs??25e3;function r(t,r){let i=e.call(t,n,`sync-sab bridge, '${r}'`);if(!i.ok)throw kl(i.errno,r);return i}function i(e,t){let n=r(e,t);if(n.ok&&n.kind===`bytes`)return n.bytes;throw kl(`EIO`,t)}function a(e,t){let n=r(e,t);if(n.ok&&n.kind===`json`)return n.json;throw kl(`EIO`,t)}return{readFile:e=>i({op:`read`,path:e},e),writeFile:(e,t)=>{r({op:`write`,path:e,body:t},e)},stat:e=>{let t=_l(a({op:`stat`,path:e},e));if(!t)throw kl(`EIO`,e);return t},lstat:e=>{let t=_l(a({op:`lstat`,path:e},e));if(!t)throw kl(`EIO`,e);return t},readdir:e=>{let t=a({op:`readdir`,path:e},e);if(!Array.isArray(t)||!t.every(e=>typeof e==`string`))throw kl(`EIO`,e);return t},exists:e=>{let t=a({op:`exists`,path:e},e);if(typeof t!=`boolean`)throw kl(`EIO`,e);return t},mkdir:e=>{r({op:`mkdir`,path:e},e)},rm:e=>{r({op:`rm`,path:e},e)},rename:(e,t)=>{r({op:`rename`,path:e,arg2:t},e)},unlink:e=>{r({op:`unlink`,path:e},e)},rmdir:e=>{r({op:`rmdir`,path:e},e)},symlink:(e,t)=>{r({op:`symlink`,path:t,arg2:e},t)},readlink:e=>{let t=a({op:`readlink`,path:e},e);if(typeof t!=`string`)throw kl(`EIO`,e);return t},chmod:(e,t)=>{r({op:`chmod`,path:e,mode:t},e)},utimes:(e,t,n)=>{r({op:`utimes`,path:e,atimeMs:t,mtimeMs:n},e)}}}function jl(e){return(t,n,r)=>{let i=e.call({...t,channel:ul},n+fl,r);if(!i.ok)throw Q(i.errno,r);let a=i.kind===`json`?i.json:null;if(!a||typeof a.stdout!=`string`||typeof a.stderr!=`string`||typeof a.exitCode!=`number`)throw Q(`EIO`,r);return{stdout:a.stdout,stderr:a.stderr,exitCode:a.exitCode}}}function Ml(e,t){if(!(!e.syncSab||typeof Atomics>`u`||typeof Atomics.wait!=`function`))return Ol(e.syncSab,t)}function Nl(e,t){return t?Al(t):e.syncFsToken?bl(e.syncFsToken):void 0}function Pl(e=globalThis,t){let n=e.setTimeout,r=e.clearTimeout,i=e.setInterval,a=e.clearInterval,o=n.bind(e),s=r.bind(e),c=i.bind(e),l=a.bind(e),u=new Set,d=new Set,f=new Set,p=!1,m=()=>{if(f.size===0)return;let e=[...f];f.clear();for(let t of e)t()},h=e=>{if(e==null)return!1;let t=u.delete(e),n=d.delete(e);return t||n},g=(e,n)=>{try{e(...n)}catch(e){if(t?.onCallbackError?.(e),!t?.onCallbackError)throw e}finally{m()}};return{get pendingCount(){return u.size+d.size},install(){p||(p=!0,e.setTimeout=((e,t,...n)=>{if(typeof e!=`function`)return o(e,t,...n);let r=o(()=>{u.delete(r),g(e,n)},t);return u.add(r),r}),e.clearTimeout=(e=>{let t=h(e);s(e),t&&m()}),e.setInterval=((e,t,...n)=>{if(typeof e!=`function`)return c(e,t,...n);let r=c(()=>{g(e,n)},t);return d.add(r),r}),e.clearInterval=(e=>{let t=h(e);l(e),t&&m()}))},restore(){p&&(p=!1,e.setTimeout=n,e.clearTimeout=r,e.setInterval=i,e.clearInterval=a)},clearPending(){for(let e of u)s(e);u.clear();for(let e of d)l(e);d.clear(),m()},tick(){return new Promise(e=>{o(e,0)})},waitForProgress(){return u.size+d.size===0?Promise.resolve():new Promise(e=>{f.add(e)})}}}function Fl(e,t){let n=t.handle,r=e=>({status:e.status,data:Fc(e.bytes)}),i=new Set,a=new Set,o=!1,s=null,c=e=>{let t=e;if(!t||t.handle!==n)return;let r=t.type===`disconnect`?i:a;for(let e of[...r])try{e(t)}catch{}},l=()=>{o||(o=!0,s=e.onEvent?e.onEvent(`usb-claim-event`,c):null,e.call(`usb`,`subscribeClaimEvents`,[n]).catch(()=>{o=!1,s?.(),s=null}))},u=()=>{!o||i.size>0||a.size>0||(o=!1,s?.(),s=null,e.call(`usb`,`unsubscribeClaimEvents`,[n]).catch(()=>{}))};return{...t,open:()=>e.call(`usb`,`open`,[n]),close:t=>e.call(`usb`,`close`,t?.force?[n,{force:!0}]:[n]),reset:t=>e.call(`usb`,`reset`,t?.force?[n,{force:!0}]:[n]),clearHalt:(t,r)=>e.call(`usb`,`clearHalt`,[n,t,r]),selectConfiguration:t=>e.call(`usb`,`selectConfig`,[n,t]),claimInterface:(t,r)=>e.call(`usb`,`claim`,r?.wait?[n,t,{wait:!0}]:[n,t]),releaseInterface:t=>e.call(`usb`,`release`,[n,t]),controlTransferIn:async(t,i)=>r(await e.call(`usb`,`controlIn`,[n,t,i])),controlTransferOut:(t,r)=>e.call(`usb`,`controlOut`,[n,t,Pc(r)]),transferIn:async(t,i)=>r(await e.call(`usb`,`transferIn`,[n,t,i])),transferOut:(t,r)=>e.call(`usb`,`transferOut`,[n,t,Pc(r)]),addEventListener(e,t){if(e===`disconnect`)i.add(t);else if(e===`claim-lost`)a.add(t);else throw TypeError(`usb device: unknown event type '${String(e)}'`);l()},removeEventListener(e,t){e===`disconnect`?i.delete(t):e===`claim-lost`&&a.delete(t),u()}}}function Il(e){return{list:async()=>(await e.call(`usb`,`list`,[])).map(t=>Fl(e,t)),request:async t=>Fl(e,await e.call(`usb`,`request`,[Ic(t)]))}}function Ll(e){if(!e)return``;let t=e.lastIndexOf(`/`);return t<0?``:t===0?`/`:e.substring(0,t)}function Rl(e){if(!e)return e;let t=e.startsWith(`/`),n=e.split(`/`).filter(e=>e.length>0),r=n.indexOf(`scripts`);if(r<0)return e;let i=n.slice(0,r);return i.length===0?t?`/`:``:(t?`/`:``)+i.join(`/`)}function zl(e){return/^[A-Za-z0-9_\-./:@]+$/.test(e)?e:`'`+e.replace(/'/g,`'\\''`)+`'`}function Bl(e,t){return e===``?t:e===`/`?`/${t}`:`${e}/${t}`}function Vl(e){let t=Ll(e.argv[1]??``),n=Rl(t),r=Bl(n,`references`),i=Bl(n,`assets`),a=Bl(t,`.config`);async function o(){let t;try{t=await e.fs.exists(a)}catch{return null}if(!t)return null;let n;try{n=await e.fs.readFile(a)}catch{return null}let r=typeof n==`string`?n:String(n);if(!r.trim())return null;let i;try{i=JSON.parse(r)}catch(e){let t=e instanceof Error?e.message:String(e);throw Error(`skill.config(): failed to parse ${a}: ${t}`)}if(i&&typeof i==`object`&&!Array.isArray(i))return i;throw Error(`skill.config(): ${a} must contain a JSON object`)}async function s(t){let n=await o();if(t===void 0)return n;if(typeof t!=`object`||!t||Array.isArray(t))throw TypeError(`skill.config(updates): updates must be a plain object`);let r={...n??{},...t};return await e.fs.writeFile(a,JSON.stringify(r,null,2)+`
|
|
53
|
-
`),r}async function c(t){if(typeof t!=`string`||!t.trim())throw TypeError(`skill.token(providerId): providerId must be a non-empty string`);let n=`oauth-token ${
|
|
50
|
+
`)),{bytes:fc(r),contentType:`multipart/form-data; boundary=${t}`,boundary:t}}async function cc(e,t=ac()){let n=[];for(let[t,r]of e.entries()){if(typeof r==`string`){n.push({name:t,value:r});continue}let e=typeof r.name==`string`?r.name:`blob`;n.push({name:t,file:{bytes:new Uint8Array(await r.arrayBuffer()),filename:e,contentType:r.type||void 0}})}return sc(n,t)}function lc(e){return e.replace(/\r\n|\r|\n/g,`\r
|
|
51
|
+
`)}function uc(e){return e.replace(/\r/g,`%0D`).replace(/\n/g,`%0A`).replace(/"/g,`%22`)}function dc(e){return(e??``).replace(/[\r\n]/g,``).trim()}function fc(e){let t=0;for(let n of e)t+=n.byteLength;let n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.byteLength;return n}function pc(e){let t=``,n=32768;for(let r=0;r<e.length;r+=n)t+=String.fromCharCode(...Array.from(e.subarray(r,r+n)));return btoa(t)}async function mc(e){let t=[];for(let[n,r]of e.entries()){if(typeof r==`string`){t.push({name:n,value:r});continue}let e=new Uint8Array(await r.arrayBuffer());t.push({name:n,file:{data:pc(e),filename:typeof r.name==`string`?r.name:`blob`,type:r.type||``}})}return{kind:`formdata`,entries:t}}async function hc(e,t){let n=()=>Object.keys(t).some(e=>e.toLowerCase()===`content-type`);return typeof e==`string`?{body:e}:e instanceof URLSearchParams?(n()||(t[`Content-Type`]=`application/x-www-form-urlencoded;charset=UTF-8`),{body:e.toString()}):e instanceof Blob?{descriptor:{kind:`blob`,data:pc(new Uint8Array(await e.arrayBuffer())),type:e.type||``}}:e instanceof ArrayBuffer?{descriptor:{kind:`bytes`,data:pc(new Uint8Array(e))}}:ArrayBuffer.isView(e)?{descriptor:{kind:`bytes`,data:pc(new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}}:e instanceof FormData?{descriptor:await mc(e)}:(n()||(t[`Content-Type`]=`application/json`),{body:JSON.stringify(e)})}function gc(e){return e?`const __b64 = (s) => { const bin = atob(s); const n = bin.length; const u = new Uint8Array(n); for (let i = 0; i < n; i++) u[i] = bin.charCodeAt(i); return u; };const __body = `+JSON.stringify(e)+`;if (__body.kind === 'bytes') { __init.body = __b64(__body.data); }else if (__body.kind === 'blob') { __init.body = new Blob([__b64(__body.data)], { type: __body.type }); }else if (__body.kind === 'formdata') { const __fd = new FormData(); for (const e of __body.entries) { if (e.file) { __fd.append(e.name, new Blob([__b64(e.file.data)], { type: e.file.type }), e.file.filename); } else { __fd.append(e.name, e.value); } } __init.body = __fd; }`:``}function _c(e){return`const h = {};r.headers.forEach((v, k) => { h[k] = v; });const ct = r.headers.get('content-type') || '';const __rt = `+JSON.stringify(e??null)+`;const __ctl = ct.toLowerCase();const __binPrefixes = ['image/','audio/','video/','application/octet-stream','application/pdf','application/protobuf','application/x-protobuf','application/wasm','application/zip'];const __isXml = __ctl.indexOf('+xml') !== -1 || __ctl.indexOf('application/xml') === 0 || __ctl.indexOf('text/xml') === 0;const __isBinary = __rt === 'binary' || (__rt !== 'text' && __rt !== 'json' && !__isXml && __binPrefixes.some((p) => __ctl.indexOf(p) === 0));const __meta = { ok: r.ok, status: r.status, statusText: r.statusText, url: r.url, redirected: !!r.redirected, headers: h };if (__isBinary) {const __u = new Uint8Array(await r.arrayBuffer());let __s = ''; const __cs = 0x8000;for (let __i = 0; __i < __u.length; __i += __cs) { __s += String.fromCharCode.apply(null, __u.subarray(__i, __i + __cs)); }return Object.assign(__meta, { body: btoa(__s), bodyEncoding: 'base64' });}const t = await r.text();let b;const __jsonWanted = __rt === 'json' || (__rt !== 'text' && ct.indexOf('application/json') !== -1);if (__jsonWanted) { if (!t) { b = null; } else { try { b = JSON.parse(t); } catch (e) { b = t; } } }else { b = t; }return Object.assign(__meta, { body: b });`}async function vc(e,t={}){let n={},r=t.headers??{};for(let[e,t]of Object.entries(r))typeof t==`string`&&(n[e]=t);let i=typeof t.method==`string`?t.method:`GET`,a=t.credentials===`same-origin`||t.credentials===`omit`?t.credentials:`include`,o=t.body,{body:s,descriptor:c}=o==null?{}:await hc(o,n),l={method:i,credentials:a,headers:n};s!==void 0&&(l.body=s),t.mode!==void 0&&(l.mode=t.mode),t.cache!==void 0&&(l.cache=t.cache),t.redirect!==void 0&&(l.redirect=t.redirect),t.referrer!==void 0&&(l.referrer=t.referrer),t.referrerPolicy!==void 0&&(l.referrerPolicy=t.referrerPolicy),t.integrity!==void 0&&(l.integrity=t.integrity),t.keepalive!==void 0&&(l.keepalive=t.keepalive);let u=gc(c),d=_c(t.responseType),f=typeof t.timeoutMs==`number`&&Number.isFinite(t.timeoutMs)&&t.timeoutMs>0?Math.round(t.timeoutMs):0,p=f>0?`__init.signal = AbortSignal.timeout(${f});`:``;return`(async () => {const __init = `+JSON.stringify(l)+`;`+p+u+`const r = await fetch(`+JSON.stringify(e)+`, __init);`+d+`})()`}function yc(e){if(typeof e==`string`)return e;if(e&&typeof e==`object`&&typeof e.targetId==`string`)return e.targetId;throw TypeError(`browser: expected a tab handle or targetId string`)}function bc(e){function t(t){return{...t,async update(n){let r={};return n.urlMatch!==void 0&&(r.urlMatch=n.urlMatch===null?null:n.urlMatch instanceof RegExp?n.urlMatch.source:n.urlMatch),n.filter!==void 0&&(r.filter=n.filter),e.call(`browser`,`wsUpdate`,[t.id,r])},async close(){return e.call(`browser`,`wsClose`,[t.id])}}}return{on(n,r={}){let i=yc(n),a=r.urlMatch===void 0?void 0:r.urlMatch instanceof RegExp?r.urlMatch.source:r.urlMatch,o,s={filter(e){if(typeof e==`function`||typeof e==`string`)throw TypeError(`browser.websocket: filter must be a declarative JSON object, not a function or string`);return o=e,s},async forward(n){return t(await e.call(`browser`,`wsObserve`,[{targetId:i,urlMatch:a,filter:o,forward:n}]))}};return s},async list(){return e.call(`browser`,`wsList`,[])}}}async function xc(e,t){if(!e&&!(t instanceof Request))return;let n=t instanceof Request?t:null,r=(e?.method??n?.method??`GET`).toUpperCase(),i={};if(e?.headers){if(e.headers instanceof Headers)e.headers.forEach((e,t)=>{i[t]=e});else if(Array.isArray(e.headers))for(let[t,n]of e.headers)i[t]=n;else Object.assign(i,e.headers)}else n&&n.headers.forEach((e,t)=>{i[t]=e});let a,o;if(r!==`GET`&&r!==`HEAD`&&e?.body!==void 0&&e?.body!==null&&e?.body!==``){let t=await Sc(e.body);a=t.body,o=t.defaultContentType}return o&&!Object.keys(i).some(e=>e.toLowerCase()===`content-type`)&&(i[`Content-Type`]=o),{method:r,headers:i,body:a}}async function Sc(e){if(typeof e==`string`)return{body:e};if(e instanceof URLSearchParams)return{body:e.toString(),defaultContentType:`application/x-www-form-urlencoded;charset=UTF-8`};if(e instanceof Blob)return{body:new Uint8Array(await e.arrayBuffer()),defaultContentType:e.type||`application/octet-stream`};if(e instanceof ArrayBuffer)return{body:new Uint8Array(e).slice(),defaultContentType:`application/octet-stream`};if(ArrayBuffer.isView(e))return{body:new Uint8Array(e.buffer,e.byteOffset,e.byteLength).slice(),defaultContentType:`application/octet-stream`};if(oc(e)){let t=await cc(e);return{body:t.bytes,defaultContentType:t.contentType}}throw typeof ReadableStream<`u`&&e instanceof ReadableStream?Error(`node fetch shim: ReadableStream request bodies are not supported (collect into a Uint8Array or string before calling fetch)`):Error(`node fetch shim: unsupported request body type (${Object.prototype.toString.call(e)}); use a string, Uint8Array, ArrayBuffer, Blob, FormData, or URLSearchParams`)}function Cc(e){return{findTab:t=>e.call(`browser`,`findTab`,[Tc(t)]),ensureTab:(t,n={})=>e.call(`browser`,`ensureTab`,[t,Ec(n)]),openWindow:(t,n={})=>e.call(`browser`,`openWindow`,[t,n]),windowBounds:t=>e.call(`browser`,`windowBounds`,[yc(t)]),setWindowBounds:(t,n)=>e.call(`browser`,`setWindowBounds`,[yc(t),n]),eval:(t,n)=>e.call(`browser`,`eval`,[yc(t),wc(n,!1)]),evalAsync:(t,n)=>e.call(`browser`,`evalAsync`,[yc(t),wc(n,!0)]),cookie:(t,n)=>e.call(`browser`,`cookie`,[yc(t),n]),localStorage:(t,n)=>e.call(`browser`,`localStorage`,[yc(t),n]),fetch:(t,n,r={})=>vc(n,r).then(n=>e.call(`browser`,`evalAsync`,[yc(t),n])),websocket:bc(e)}}function wc(e,t){if(typeof e==`function`)return`(${e.toString()})()`;if(typeof e==`string`)return e;throw TypeError(`browser.eval/evalAsync: source must be a function or string`)}function Tc(e){let t={};return e.domain!==void 0&&(t.domain=e.domain),e.urlMatch!==void 0&&(t.urlMatch=e.urlMatch instanceof RegExp?e.urlMatch.source:e.urlMatch),t}function Ec(e){return e.matchUrl===void 0?{}:{matchUrl:e.matchUrl instanceof RegExp?e.matchUrl.source:e.matchUrl}}function Dc(e){return{register(t){let n=null,r=e.onEvent(`computer-call`,r=>{let i=r;i.id===t.id&&kc(e,t,i,{getStop:()=>n,setStop:e=>{n=e}})}),i=Oc(t);return e.call(`computer`,`register`,[i]).catch(()=>{}),()=>{n?.(),n=null,r(),e.call(`computer`,`unregister`,[t.id]).catch(()=>{})}}}}function Oc(e){return{id:e.id,kind:`jsh`,title:e.title??e.id,size:e.size??null,state:`live`,capabilities:e.capabilities,pid:null,...e.softKeys?{softKeys:e.softKeys}:{}}}async function kc(e,t,n,r){let i;try{i=await Ac(e,t,n,r)}catch(e){i={error:e instanceof Error?e.message:String(e)}}try{await e.call(`computer`,`reply`,[n.requestId,i])}catch{}}async function Ac(e,t,n,r){switch(n.op){case`screenshot`:return t.screenshot(n.args[0]??{format:`jpeg`});case`text`:return t.text?t.text():null;case`input`:return await t.input(n.args[0]??[]),{ok:!0};case`exec`:if(!t.exec)throw Error(`exec is not supported`);return t.exec(String(n.args[0]??``));case`subscribe`:return jc(e,t,Number(n.args[0])||2,Number(n.args[1])||void 0,r);case`unsubscribe`:return r.getStop()?.(),r.setStop(null),{ok:!0};default:{let e=n.op;throw Error(`unknown computer op '${String(e)}'`)}}}function jc(e,t,n,r,i){if(i.getStop()?.(),!t.subscribe)throw Error(`subscribe is not supported`);let a=t.subscribe(n,n=>{e.call(`computer`,`frame`,[t.id,n]).catch(()=>{})},r);return i.setStop(()=>{try{a()}catch{}}),{ok:!0}}function Mc(e){return e===`SIGKILL`?137:e===`SIGINT`?130:143}function Nc(e,t,n,r){let i=async()=>{if(!t?.wasUsed())return;let n=t.getMutations();if(n.created.length||n.modified.length||n.deleted.length)try{await e.call(`vfs`,`flushWrites`,[n])}catch(e){let t=e instanceof Error?e.message:String(e);console.error(`[realm-exec] pre-exec sync-fs flush failed (will retry at exit): ${t}`);return}t.resetBaseline()},a=async(i=!1)=>{if(t?.wasUsed())try{let r=await e.call(`vfs`,`snapshot`,[n]);i?t.applySnapshotPreservingMutations(r):t.applySnapshot(r)}catch(e){let t=e instanceof Error?e.message:String(e);r?.(`[sync-fs] re-snapshot after exec failed: ${t}\n`)}},o=async t=>{await i();try{return await e.call(`exec`,`run`,[t])}finally{await a()}},s=async t=>{await i();try{return await e.call(`exec`,`spawn`,[t])}finally{await a()}},c=1,l=Object.assign(o,{spawn:s,start:(t,n)=>{let r=c++,o=[],s=!1,l=!1,u=!1,d,f,p=new Promise((e,t)=>{d=e,f=t}),m=()=>{if(s||u||l)return;l=!0;let c=o.length>0?o.join(``):n?.stdin,p={};c!==void 0&&(p.stdin=c),n?.stdinKind!==void 0&&(p.stdinKind=n.stdinKind),n?.args!==void 0&&(p.args=n.args),n?.cwd!==void 0&&(p.cwd=n.cwd),n?.env!==void 0&&(p.env=n.env),(async()=>{try{if(await i(),u){await a(!0);return}s=!0;let n=await e.call(`exec`,`start`,[r,t,p]);await a(!0),d(n)}catch(e){await a(!0),f(e)}})()};return{kill:t=>s?e.call(`exec`,`kill`,[r,t]):(u=!0,d({stdout:``,stderr:``,exitCode:Mc(t)}),Promise.resolve(!0)),stdin:{write:e=>{!s&&!u&&o.push(e)},end:()=>m()},done:p}}});return l.exec=l,l}const Pc=new Set([204,205,304]),Fc=new Set([`content-encoding`,`transfer-encoding`,`content-length`]);function Ic(e,t){let n=Lc(e.body),r=Rc(e.headers),i=Pc.has(e.status)||n.byteLength===0,a=new Response(i?null:n,{status:e.status,statusText:e.statusText,headers:r});try{Object.defineProperty(a,"url",{value:e.url||t,writable:!1,configurable:!0,enumerable:!1})}catch{}return Bc(a,n),a}function Lc(e){return e.byteLength===0?new Uint8Array:e.slice()}function Rc(e){let t=new Headers;for(let[n,r]of Object.entries(e))if(!Fc.has(n.toLowerCase()))try{t.set(n,r)}catch{}return t}const zc=Symbol(`slicc.realmBufferedBody`);function Bc(e,t){if(zc in e)return;Object.defineProperty(e,zc,{value:!0,configurable:!0});let n=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),`bodyUsed`),r=!1,i=()=>{if(r)throw TypeError(`Failed to read response body: body already used`);return r=!0,Vc(e),t},a=async()=>new TextDecoder().decode(i()),o=e=>e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);Object.defineProperties(e,{bodyUsed:{configurable:!0,enumerable:!1,get(){return r?!0:n?.get?!!n.get.call(e):!1}},text:{value:a,configurable:!0},json:{value:async()=>JSON.parse(await a()),configurable:!0},arrayBuffer:{value:async()=>o(i()),configurable:!0},blob:{value:async()=>new Blob([o(i())]),configurable:!0},bytes:{value:async()=>i(),configurable:!0}})}function Vc(e){try{let t=e.body;t&&!t.locked&&t.getReader()}catch{}}function Hc(e){if(e instanceof Uint8Array)return e;if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);if(e instanceof ArrayBuffer)return new Uint8Array(e);throw TypeError(`expected an ArrayBuffer or typed array`)}function Uc(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Wc(e){return e==null?[]:Array.isArray(e)?e:[e]}function Gc(e,t){let n=t.handle,r=new Set,i=new Set,a=!1,o=null,s=e=>{let t=e;if(!t||t.handle!==n)return;let i={reportId:t.reportId,data:Uc(t.bytes)};for(let e of[...r])try{e(i)}catch{}},c=()=>{a||(a=!0,o=e.onEvent?e.onEvent(`hid-input-report`,s):null,e.call(`hid`,`subscribeInputReports`,[n]).catch(()=>{a=!1,o?.(),o=null}))},l=()=>{!a||r.size>0||(a=!1,o?.(),o=null,e.call(`hid`,`unsubscribeInputReports`,[n]).catch(()=>{}))};return{...t,open:()=>e.call(`hid`,`open`,[n]),close:()=>e.call(`hid`,`close`,[n]),sendReport:(t,r)=>e.call(`hid`,`sendReport`,[n,t,Hc(r)]),sendFeatureReport:(t,r)=>e.call(`hid`,`sendFeatureReport`,[n,t,Hc(r)]),receiveFeatureReport:async t=>Uc((await e.call(`hid`,`receiveFeatureReport`,[n,t])).bytes),addEventListener(e,t){if(e===`inputreport`)r.add(t),c();else if(e===`disconnect`)i.add(t);else throw TypeError(`hid device: unknown event type '${String(e)}'`)},removeEventListener(e,t){e===`inputreport`?(r.delete(t),l()):e===`disconnect`&&i.delete(t)},onInputReport(e){r.add(e),c()}}}function Kc(e){return{list:async()=>(await e.call(`hid`,`list`,[])).map(t=>Gc(e,t)),request:async t=>{let n=(await e.call(`hid`,`request`,[Wc(t)]))[0];if(!n)throw Error(`No device selected.`);return Gc(e,n)}}}function qc(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}var Jc=class{rpc;targetId;selector;index;constructor(e,t,n,r){this.rpc=e,this.targetId=t,this.selector=n,this.index=r}evalOnElement(e){let t=`(() => { const els = document.querySelectorAll(${JSON.stringify(this.selector)}); const el = els[${this.index}]; ${e} })()`;return this.rpc.call(`browser`,`evalAsync`,[this.targetId,t])}async textContent(){return this.evalOnElement(`return el ? el.textContent : null;`)}async getAttribute(e){return this.evalOnElement(`return el ? el.getAttribute(${JSON.stringify(e)}) : null;`)}async isVisible(){return this.evalOnElement(`if (!el) return false; const s = getComputedStyle(el); if (s.display === 'none' || s.visibility === 'hidden' || s.opacity === '0') return false; const r = el.getBoundingClientRect(); return r.width > 0 && r.height > 0;`)}async boundingBox(){return this.evalOnElement(`if (!el) return null; const r = el.getBoundingClientRect(); return { x: r.x, y: r.y, width: r.width, height: r.height };`)}},Yc=class{rpc;targetId;onClose;closed=!1;constructor(e,t,n){this.rpc=e,this.targetId=t,this.onClose=n}async goto(e,t){await this.rpc.call(`browser`,`navigateTab`,[this.targetId,e])}async waitForLoadState(e){await this.rpc.call(`browser`,`waitForLoadState`,[this.targetId,e??`load`])}async waitForTimeout(e){await new Promise(t=>setTimeout(t,e))}async evaluate(e,...t){let n=typeof e==`string`?e:`(${e.toString()}).apply(null, JSON.parse(${JSON.stringify(JSON.stringify(t))}))`;return this.rpc.call(`browser`,`evalAsync`,[this.targetId,n])}async screenshot(e){let t={};e?.fullPage!==void 0&&(t.fullPage=e.fullPage);let n=qc(await this.rpc.call(`browser`,`screenshotTab`,[this.targetId,t]));return e?.path&&await this.rpc.call(`vfs`,`writeFileBinary`,[e.path,n]),n}async $(e){return await this.rpc.call(`browser`,`evalAsync`,[this.targetId,`!!document.querySelector(${JSON.stringify(e)})`])?new Jc(this.rpc,this.targetId,e,0):null}async $$(e){let t=await this.rpc.call(`browser`,`evalAsync`,[this.targetId,`document.querySelectorAll(${JSON.stringify(e)}).length`]),n=[];for(let r=0;r<t;r++)n.push(new Jc(this.rpc,this.targetId,e,r));return n}async $$eval(e,t,...n){if(typeof t==`string`)return this.rpc.call(`browser`,`evalAsync`,[this.targetId,t]);let r=`(${t.toString()}).apply(null, [Array.from(document.querySelectorAll(${JSON.stringify(e)}))].concat(JSON.parse(${JSON.stringify(JSON.stringify(n))})))`;return this.rpc.call(`browser`,`evalAsync`,[this.targetId,r])}async content(){return this.rpc.call(`browser`,`evalAsync`,[this.targetId,`document.documentElement.outerHTML`])}async setViewportSize(e){await this.rpc.call(`browser`,`setViewport`,[this.targetId,e.width,e.height])}async close(){this.closed||(this.closed=!0,await this.rpc.call(`browser`,`closeTab`,[this.targetId]),this.onClose?.())}},Xc=class{rpc;openPages=[];constructor(e){this.rpc=e}async newPage(e){let t=await this.rpc.call(`browser`,`createTab`,[`about:blank`]);e?.viewport&&await this.rpc.call(`browser`,`setViewport`,[t,e.viewport.width,e.viewport.height]);let n=new Yc(this.rpc,t,()=>{let e=this.openPages.indexOf(n);e!==-1&&this.openPages.splice(e,1)});return this.openPages.push(n),n}pages(){return[...this.openPages]}async close(){let e=this.openPages.splice(0,this.openPages.length);for(let t of e)await t.close()}},Zc=class{rpc;openPages=[];openContexts=[];constructor(e){this.rpc=e}async newPage(e){let t=await this.rpc.call(`browser`,`createTab`,[`about:blank`]);e?.viewport&&await this.rpc.call(`browser`,`setViewport`,[t,e.viewport.width,e.viewport.height]);let n=new Yc(this.rpc,t,()=>{let e=this.openPages.indexOf(n);e!==-1&&this.openPages.splice(e,1)});return this.openPages.push(n),n}async newContext(e){let t=new Xc(this.rpc);return this.openContexts.push(t),t}contexts(){return[...this.openContexts]}async close(){let e=this.openPages.splice(0,this.openPages.length);for(let t of e)await t.close();let t=this.openContexts.splice(0,this.openContexts.length);for(let e of t)await e.close()}};function Qc(e){let t=async t=>new Zc(e),n=async(t,n)=>new Zc(e);return{chromium:{launch:t,connect:n,connectOverCDP:n},firefox:{launch:t,connect:n},webkit:{launch:t,connect:n}}}const $c=new Set([`bcrypt`,`better-sqlite3`,`canvas`,`cpu-features`,`fsevents`,`leveldown`,`libxmljs`,`libxmljs2`,`node-gyp-build`,`node-sass`,`puppeteer`,`robotjs`,`sass-embedded`,`sharp`,`snappy`,`sqlite3`,`tree-sitter`,`usb`]),el={sharp:` Use the built-in 'convert' shell command for image work.`,canvas:` Use the built-in 'convert' / OffscreenCanvas for image work.`,"better-sqlite3":` Use the built-in 'sqlite3' shell command (sql.js WASM).`,sqlite3:` Use the built-in 'sqlite3' shell command (sql.js WASM).`,bcrypt:` Use crypto.subtle.digest() with PBKDF2 / Argon2 in pure JS.`,puppeteer:` Use the built-in browser-automation shell commands.`};function tl(e,t){let n=el[t]??``;return Error(`require('${e}'): '${t}' is a Node native module (C++ bindings) — it cannot run in the browser sandbox.${n}`)}function nl(e){return{...e,time:$o,fmt:Ve,pool:Yo}}function rl(e,t){return e?.startsWith(`/`)?es(e):t}function il(e){return e.includes(`require`)||e.includes(`import`)||/(?:^|[;\n}])\s*export\b/.test(e)}async function al(e,t,n,r){return il(t)?e.call(`module`,`buildGraph`,[t,rl(r,n),r]):{files:[],entryMap:{},edges:{},edgeErrors:{},errors:{}}}function ol(e){if(typeof e!=`object`||!e)return;let t=e;if(t.__esModule&&!Object.prototype.hasOwnProperty.call(t,`default`)&&Object.isExtensible(t))try{Object.defineProperty(t,"default",{value:t,enumerable:!1,configurable:!0})}catch{}}function sl(e){return{playwright:Qc(e)}}function cl(e){let{graph:t,fsBridge:n,processShim:r,childProcess:i,nodeConsole:a,sliccyModules:o,shimmedPackages:s={},nodeReadline:c,nodeOsModule:l=tr,nodeUtilModule:u=jt}=e,d=new Map(t.files.map(e=>[e.path,e.cjsSource])),f=new Map(t.files.map(e=>[e.path,e.kind])),p=new Map,m=Jn({requireFrom:(e,t)=>x(e,t),resolveFrom:(e,t)=>b(e,t)}),h=Rn(()=>{let e=r?.cwd?.();return typeof e==`string`&&e.length>0?e:`/`}),g=e=>{if(typeof e==`string`&&e.startsWith(`sliccy:`))return{hit:!0,value:dl(e,o)};let t=e.startsWith(`node:`)?e.slice(5):e,a=ll(t,{fsBridge:n,processShim:r,childProcess:i,nodeOsModule:l,nodeUtilModule:u,nodePathModule:h,nodeReadline:c,nodeModule:m});if(a.hit)return a;if($c.has(t))throw tl(e,t);if(wn.has(t))throw pl(e,t);return t in s?{hit:!0,value:s[t]}:{hit:!1}},_=(e,n,r)=>{let i=g(n);if(i.hit)return i.value;let a=e?.[n];if(a)return v(a);let o=r===null?t.errors[n]:t.edgeErrors?.[r]?.[n];throw o?Error(o):ul(n)};function v(e){let n=p.get(e);if(n)return n.exports;let i=d.get(e);if(i===void 0)throw Error(`Cannot find module '${e}'`);let o={exports:{}};p.set(e,o);let s=n=>_(t.edges[e],n,e),c=[`module`,`exports`,`require`,`process`,`console`,`Buffer`,`global`],l=[o,o.exports,s,r,a,globalThis.Buffer,globalThis];return f.get(e)!==`esm`&&(c.push(`__dirname`,`__filename`),l.push(es(e),e)),Function(...c,i)(...l),f.get(e)===`cjs`&&ol(o.exports),o.exports}function y(e){return d.has(e)}function b(e,n){if(En(n))return n;let r=t.edges[e]?.[n];if(r)return r;let i=es(e);if(qn(n)){let e=Gn(i,n,y);if(e)return e}else{let e=Kn(i,n,y);if(e)return e}let a=t.edgeErrors?.[e]?.[n];throw a?Error(a):ul(n)}function x(e,t){let n=g(t);return n.hit?n.value:v(b(e,t))}return{require:e=>_(t.entryMap,e,null)}}function ll(e,t){let{fsBridge:n,processShim:r,childProcess:i,nodeOsModule:a,nodeUtilModule:o,nodePathModule:s,nodeReadline:l,nodeModule:u}=t;return e===`fs`||e===`fs/promises`?{hit:!0,value:n}:e===`path`?{hit:!0,value:s}:e===`crypto`?{hit:!0,value:bn}:e===`child_process`?{hit:!0,value:i}:e===`process`?{hit:!0,value:r}:e===`buffer`?{hit:!0,value:{Buffer:globalThis.Buffer}}:e===`assert`?{hit:!0,value:Ze}:e===`assert/strict`?{hit:!0,value:Xe}:e===`util`?{hit:!0,value:o}:e===`events`?{hit:!0,value:Oe}:e===`os`?{hit:!0,value:a}:e===`tty`?{hit:!0,value:nr}:e===`stream`?{hit:!0,value:rt}:e===`url`?{hit:!0,value:c}:e===`zlib`?{hit:!0,value:Ko}:e===`vm`?{hit:!0,value:Sr}:e===`readline`&&l?{hit:!0,value:l}:e===`readline/promises`&&l?{hit:!0,value:l.promises}:e===`module`&&u?{hit:!0,value:u}:{hit:!1}}function ul(e){if(e.startsWith(`.`)||e.startsWith(`/`)||e.startsWith(`node:`))return Error(`Cannot find module '${e}'`);let t=e.startsWith(`@`)?e.split(`/`).slice(0,2).join(`/`):e.split(`/`)[0];return Error(`Cannot find module '${e}' (run: ipk install ${t})`)}function dl(e,t){let n=e.slice(7);if(n===``)throw Error(`require('sliccy:'): empty sliccy: module name`);if(!Object.prototype.hasOwnProperty.call(t,n))throw Error(`require('${e}'): unknown sliccy: module '${n}'. Known names: ${Object.keys(t).sort().join(`, `)}`);return t[n]}const fl={http:` Use fetch() instead.`,https:` Use fetch() instead.`,crypto:` Use globalThis.crypto (Web Crypto API) instead.`};function pl(e,t){return Error(`require('${e}'): Node built-in '${t}' is not available in the browser environment.${fl[t]||``}`)}async function ml(e,t,n,r){let i=Object.keys(t),a=i.map(e=>t[e]),o=Object.getPrototypeOf(async function(){}).constructor,s=new o(...i,`${r?`"use strict";
|
|
52
|
+
`:``}${e}`);try{return await s(...a),0}catch(e){return e instanceof ts?e.code:(n(`${e instanceof Error?e.stack??e.message:String(e)}\n`),1)}}var hl=class{port;nextId=1;pending=new Map;eventSubscribers=new Map;progressWaiters=new Set;handler;disposed=!1;constructor(e){this.port=e,this.handler=e=>{let t=e.data;if(t?.type===`realm-rpc-res`){let t=e.data,n=this.pending.get(t.id);if(!n)return;this.pending.delete(t.id),typeof t.error==`string`?n.reject(Error(t.error)):n.resolve(t.result),this.notifyProgress();return}if(t?.type===`realm-event`){let t=e.data,n=this.eventSubscribers.get(t.channel);if(!n)return;for(let e of[...n])try{e(t.payload)}catch{}}},e.addEventListener(`message`,this.handler),e.start?.()}get pendingCount(){return this.pending.size+this.eventSubscriptionCount}get eventSubscriptionCount(){let e=0;for(let t of this.eventSubscribers.values())e+=t.size;return e}waitForProgress(){return this.pendingCount===0?Promise.resolve():new Promise(e=>{this.progressWaiters.add(e)})}notifyProgress(){if(this.progressWaiters.size===0)return;let e=[...this.progressWaiters];this.progressWaiters.clear();for(let t of e)t()}call(e,t,n=[]){if(this.disposed)return Promise.reject(Error(`realm-rpc: client disposed`));let r=this.nextId++,i={type:`realm-rpc-req`,id:r,channel:e,op:t,args:n};return new Promise((e,t)=>{this.pending.set(r,{resolve:e,reject:t}),this.port.postMessage(i)})}onEvent(e,t){if(this.disposed)return()=>{};let n=this.eventSubscribers.get(e);return n||(n=new Set,this.eventSubscribers.set(e,n)),n.add(t),this.notifyProgress(),()=>{let n=this.eventSubscribers.get(e);n&&(n.delete(t),n.size===0&&this.eventSubscribers.delete(e),this.notifyProgress())}}dispose(){if(this.disposed)return;this.disposed=!0,this.port.removeEventListener(`message`,this.handler);let e=Error(`realm-rpc: client disposed`);for(let t of this.pending.values())t.reject(e);this.pending.clear(),this.eventSubscribers.clear(),this.notifyProgress()}};function gl(e,t){let n=t.handle;return{...t,open:t=>e.call(`serial`,`open`,[n,t]),close:()=>e.call(`serial`,`close`,[n]),read:(t={})=>e.call(`serial`,`read`,[n,{maxBytes:t.maxBytes??t.bytes,until:t.until?Hc(t.until):void 0,timeoutMs:t.timeoutMs}]),write:t=>e.call(`serial`,`write`,[n,Hc(t)]),getSignals:()=>e.call(`serial`,`getSignals`,[n]),setSignals:t=>e.call(`serial`,`setSignals`,[n,t])}}function _l(e){return{list:async()=>(await e.call(`serial`,`list`,[])).map(t=>gl(e,t)),request:async t=>gl(e,await e.call(`serial`,`request`,[Wc(t)]))}}const vl=`exec`,yl=6e5,bl=5e3;function Q(e,t){return Object.assign(Error(`${e}: ${t}`),{code:e})}function $(e){let t=Sl(e);if(Cl(t))return new Uint8Array(t.response);if(t.status>=200&&t.status<300)throw Q(`EIO`,e.label);wl(t,e.label)}function xl(e){let t=$(e);try{return JSON.parse(new TextDecoder().decode(t))}catch{throw Q(`EIO`,e.label)}}function Sl(e){let t=new XMLHttpRequest;try{t.open(e.method,e.url,!1),t.responseType=`arraybuffer`,t.timeout=e.timeoutMs,t.setRequestHeader(`x-slicc-fs-token`,e.token),e.body?t.send(new Uint8Array(e.body)):t.send()}catch{throw Q(`EIO`,e.label)}return t}function Cl(e){return e.status>=200&&e.status<300&&e.getResponseHeader(`x-slicc-fs`)===`1`}function wl(e,t){throw Q(e.getResponseHeader(`x-slicc-fs`)===`1`&&e.getResponseHeader(`x-slicc-fs-errno`)||`EIO`,t)}function Tl(e){let t=e;return!t||typeof t.isFile!=`boolean`||typeof t.isDirectory!=`boolean`||typeof t.size!=`number`?null:{isFile:t.isFile,isDirectory:t.isDirectory,isSymbolicLink:t.isSymbolicLink,size:t.size,...typeof t.mode==`number`?{mode:t.mode}:{},...typeof t.mtimeMs==`number`?{mtimeMs:t.mtimeMs}:{}}}function El(e,t){return Q(e,`sync-fs bridge, '${t}'`)}function Dl(e,t){let n=`/__slicc/fs-sync`+(e.startsWith(`/`)?e:`/${e}`).split(`/`).map(encodeURIComponent).join(`/`);return t?`${n}?op=${t}`:n}function Ol(e,t={}){let n=t.timeoutMs??3e4;function r(t,r,i,a){return{method:t,url:Dl(r,a),token:e,...i?{body:i}:{},timeoutMs:n,label:`sync-fs bridge, '${r}'`}}return{readFile(e){return $(r(`GET`,e))},writeFile(e,t){$(r(`POST`,e,t))},stat(e){let t=Tl(xl(r(`GET`,e,void 0,`stat`)));if(!t)throw El(`EIO`,e);return t},lstat(e){let t=Tl(xl(r(`GET`,e,void 0,`lstat`)));if(!t)throw El(`EIO`,e);return t},readdir(e){let t=xl(r(`GET`,e,void 0,`readdir`));if(!Array.isArray(t)||!t.every(e=>typeof e==`string`))throw El(`EIO`,e);return t},exists(e){let t=xl(r(`GET`,e,void 0,`exists`));if(typeof t!=`boolean`)throw El(`EIO`,e);return t},mkdir(e){$(r(`POST`,e,void 0,`mkdir`))},rm(e){$(r(`POST`,e,void 0,`rm`))},rename(e,t){$(r(`POST`,e,kl({arg2:t}),`rename`))},unlink(e){$(r(`POST`,e,kl({}),`unlink`))},rmdir(e){$(r(`POST`,e,kl({}),`rmdir`))},symlink(e,t){$(r(`POST`,t,kl({arg2:e}),`symlink`))},readlink(e){let t=xl(r(`GET`,e,void 0,`readlink`));if(typeof t!=`string`)throw El(`EIO`,e);return t},chmod(e,t){$(r(`POST`,e,kl({mode:t}),`chmod`))},utimes(e,t,n){$(r(`POST`,e,kl({atimeMs:t,mtimeMs:n}),`utimes`))}}}function kl(e){return new TextEncoder().encode(JSON.stringify(e))}function Al(e){return typeof e==`number`&&Number.isFinite(e)&&e>0}function jl(e){return e===void 0||e===0}function Ml(e,t){return Al(e)?Math.min(e,yl):Math.min(t,yl)}new TextEncoder;const Nl=new TextDecoder;function Pl(e,t){switch(e){case 1:return{ok:!0,kind:`bytes`,bytes:t};case 3:return{ok:!0,kind:`void`};case 2:try{return{ok:!0,kind:`json`,json:JSON.parse(Nl.decode(t))}}catch{return{ok:!1,errno:`EIO`,message:`sync-sab: malformed json payload`}}case 4:try{let e=JSON.parse(Nl.decode(t)),n=typeof e.errno==`string`&&/^E[A-Z]+$/.test(e.errno)?e.errno:`EIO`;return{ok:!1,errno:n,message:String(e.message??n)}}catch{return{ok:!1,errno:`EIO`,message:`sync-sab: malformed errno payload`}}default:return{ok:!1,errno:`EIO`,message:`sync-sab: unknown status ${e}`}}}function Fl(e){if(e.byteLength<4160)throw Error(`sync-sab: buffer too small (${e.byteLength} < 4160)`);return{header:new Int32Array(e,0,16),window:new Uint8Array(e,64)}}function Il(e,t,n={}){let{header:r,window:i}=Fl(e),a=n.wait??((e,t,n,r)=>Atomics.wait(e,t,n,r)),o=n.now??(()=>performance.now()),s=0;function c(e,t,n){for(;;){let i=t-o();if(i<=0)throw Q(`ETIMEDOUT`,n);if(a(r,0,1,i),Atomics.load(r,0)===2&&Atomics.load(r,1)===e)return;Atomics.load(r,0)===2&&Atomics.store(r,0,1)}}return{call(e,n,a){let l=++s,u=o()+n,d=null,f=0,p=0;try{for(;;){Atomics.store(r,0,1);let n=p===0?{type:`sync-sab-req`,id:l,req:e}:{type:`sync-sab-next`,id:l,offset:p};try{t.postMessage(n)}catch{throw Q(`EIO`,a)}c(l,u,a);let o=Atomics.load(r,3),s=Atomics.load(r,4);if(Atomics.load(r,5)!==p||s<0||o<0||p+s>o)throw Q(`EIO`,a);if(d===null&&(f=Atomics.load(r,2),d=new Uint8Array(o)),d.set(i.subarray(0,s),p),p+=s,p>=o)break;if(s===0)throw Q(`EIO`,a)}}finally{Atomics.store(r,0,0)}return Pl(f,d)}}}function Ll(e,t){return Q(e,`sync-sab bridge, '${t}'`)}function Rl(e,t={}){let n=t.timeoutMs??25e3;function r(t,r){let i=e.call(t,n,`sync-sab bridge, '${r}'`);if(!i.ok)throw Ll(i.errno,r);return i}function i(e,t){let n=r(e,t);if(n.ok&&n.kind===`bytes`)return n.bytes;throw Ll(`EIO`,t)}function a(e,t){let n=r(e,t);if(n.ok&&n.kind===`json`)return n.json;throw Ll(`EIO`,t)}return{readFile:e=>i({op:`read`,path:e},e),writeFile:(e,t)=>{r({op:`write`,path:e,body:t},e)},stat:e=>{let t=Tl(a({op:`stat`,path:e},e));if(!t)throw Ll(`EIO`,e);return t},lstat:e=>{let t=Tl(a({op:`lstat`,path:e},e));if(!t)throw Ll(`EIO`,e);return t},readdir:e=>{let t=a({op:`readdir`,path:e},e);if(!Array.isArray(t)||!t.every(e=>typeof e==`string`))throw Ll(`EIO`,e);return t},exists:e=>{let t=a({op:`exists`,path:e},e);if(typeof t!=`boolean`)throw Ll(`EIO`,e);return t},mkdir:e=>{r({op:`mkdir`,path:e},e)},rm:e=>{r({op:`rm`,path:e},e)},rename:(e,t)=>{r({op:`rename`,path:e,arg2:t},e)},unlink:e=>{r({op:`unlink`,path:e},e)},rmdir:e=>{r({op:`rmdir`,path:e},e)},symlink:(e,t)=>{r({op:`symlink`,path:t,arg2:e},t)},readlink:e=>{let t=a({op:`readlink`,path:e},e);if(typeof t!=`string`)throw Ll(`EIO`,e);return t},chmod:(e,t)=>{r({op:`chmod`,path:e,mode:t},e)},utimes:(e,t,n)=>{r({op:`utimes`,path:e,atimeMs:t,mtimeMs:n},e)}}}function zl(e){return(t,n,r)=>{let i=e.call({...t,channel:vl},n+bl,r);if(!i.ok)throw Q(i.errno,r);let a=i.kind===`json`?i.json:null;if(!a||typeof a.stdout!=`string`||typeof a.stderr!=`string`||typeof a.exitCode!=`number`)throw Q(`EIO`,r);return{stdout:a.stdout,stderr:a.stderr,exitCode:a.exitCode}}}function Bl(e,t){if(!(!e.syncSab||typeof Atomics>`u`||typeof Atomics.wait!=`function`))return Il(e.syncSab,t)}function Vl(e,t){return t?Rl(t):e.syncFsToken?Ol(e.syncFsToken):void 0}function Hl(e=globalThis,t){let n=e.setTimeout,r=e.clearTimeout,i=e.setInterval,a=e.clearInterval,o=n.bind(e),s=r.bind(e),c=i.bind(e),l=a.bind(e),u=new Set,d=new Set,f=new Set,p=!1,m=()=>{if(f.size===0)return;let e=[...f];f.clear();for(let t of e)t()},h=e=>{if(e==null)return!1;let t=u.delete(e),n=d.delete(e);return t||n},g=(e,n)=>{try{e(...n)}catch(e){if(t?.onCallbackError?.(e),!t?.onCallbackError)throw e}finally{m()}};return{get pendingCount(){return u.size+d.size},install(){p||(p=!0,e.setTimeout=((e,t,...n)=>{if(typeof e!=`function`)return o(e,t,...n);let r=o(()=>{u.delete(r),g(e,n)},t);return u.add(r),r}),e.clearTimeout=(e=>{let t=h(e);s(e),t&&m()}),e.setInterval=((e,t,...n)=>{if(typeof e!=`function`)return c(e,t,...n);let r=c(()=>{g(e,n)},t);return d.add(r),r}),e.clearInterval=(e=>{let t=h(e);l(e),t&&m()}))},restore(){p&&(p=!1,e.setTimeout=n,e.clearTimeout=r,e.setInterval=i,e.clearInterval=a)},clearPending(){for(let e of u)s(e);u.clear();for(let e of d)l(e);d.clear(),m()},tick(){return new Promise(e=>{o(e,0)})},waitForProgress(){return u.size+d.size===0?Promise.resolve():new Promise(e=>{f.add(e)})}}}function Ul(e,t){let n=t.handle,r=e=>({status:e.status,data:Uc(e.bytes)}),i=new Set,a=new Set,o=!1,s=null,c=e=>{let t=e;if(!t||t.handle!==n)return;let r=t.type===`disconnect`?i:a;for(let e of[...r])try{e(t)}catch{}},l=()=>{o||(o=!0,s=e.onEvent?e.onEvent(`usb-claim-event`,c):null,e.call(`usb`,`subscribeClaimEvents`,[n]).catch(()=>{o=!1,s?.(),s=null}))},u=()=>{!o||i.size>0||a.size>0||(o=!1,s?.(),s=null,e.call(`usb`,`unsubscribeClaimEvents`,[n]).catch(()=>{}))};return{...t,open:()=>e.call(`usb`,`open`,[n]),close:t=>e.call(`usb`,`close`,t?.force?[n,{force:!0}]:[n]),reset:t=>e.call(`usb`,`reset`,t?.force?[n,{force:!0}]:[n]),clearHalt:(t,r)=>e.call(`usb`,`clearHalt`,[n,t,r]),selectConfiguration:t=>e.call(`usb`,`selectConfig`,[n,t]),claimInterface:(t,r)=>e.call(`usb`,`claim`,r?.wait?[n,t,{wait:!0}]:[n,t]),releaseInterface:t=>e.call(`usb`,`release`,[n,t]),controlTransferIn:async(t,i)=>r(await e.call(`usb`,`controlIn`,[n,t,i])),controlTransferOut:(t,r)=>e.call(`usb`,`controlOut`,[n,t,Hc(r)]),transferIn:async(t,i)=>r(await e.call(`usb`,`transferIn`,[n,t,i])),transferOut:(t,r)=>e.call(`usb`,`transferOut`,[n,t,Hc(r)]),addEventListener(e,t){if(e===`disconnect`)i.add(t);else if(e===`claim-lost`)a.add(t);else throw TypeError(`usb device: unknown event type '${String(e)}'`);l()},removeEventListener(e,t){e===`disconnect`?i.delete(t):e===`claim-lost`&&a.delete(t),u()}}}function Wl(e){return{list:async()=>(await e.call(`usb`,`list`,[])).map(t=>Ul(e,t)),request:async t=>Ul(e,await e.call(`usb`,`request`,[Wc(t)]))}}function Gl(e){if(!e)return``;let t=e.lastIndexOf(`/`);return t<0?``:t===0?`/`:e.substring(0,t)}function Kl(e){if(!e)return e;let t=e.startsWith(`/`),n=e.split(`/`).filter(e=>e.length>0),r=n.indexOf(`scripts`);if(r<0)return e;let i=n.slice(0,r);return i.length===0?t?`/`:``:(t?`/`:``)+i.join(`/`)}function ql(e){return/^[A-Za-z0-9_\-./:@]+$/.test(e)?e:`'`+e.replace(/'/g,`'\\''`)+`'`}function Jl(e,t){return e===``?t:e===`/`?`/${t}`:`${e}/${t}`}function Yl(e){let t=Gl(e.argv[1]??``),n=Kl(t),r=Jl(n,`references`),i=Jl(n,`assets`),a=Jl(t,`.config`);async function o(){let t;try{t=await e.fs.exists(a)}catch{return null}if(!t)return null;let n;try{n=await e.fs.readFile(a)}catch{return null}let r=typeof n==`string`?n:String(n);if(!r.trim())return null;let i;try{i=JSON.parse(r)}catch(e){let t=e instanceof Error?e.message:String(e);throw Error(`skill.config(): failed to parse ${a}: ${t}`)}if(i&&typeof i==`object`&&!Array.isArray(i))return i;throw Error(`skill.config(): ${a} must contain a JSON object`)}async function s(t){let n=await o();if(t===void 0)return n;if(typeof t!=`object`||!t||Array.isArray(t))throw TypeError(`skill.config(updates): updates must be a plain object`);let r={...n??{},...t};return await e.fs.writeFile(a,JSON.stringify(r,null,2)+`
|
|
53
|
+
`),r}async function c(t){if(typeof t!=`string`||!t.trim())throw TypeError(`skill.token(providerId): providerId must be a non-empty string`);let n=`oauth-token ${ql(t)}`,{stdout:r,stderr:i,exitCode:a}=await e.exec(n);if(a!==0){let e=i.trim()||`oauth-token exited with code ${a}`;throw Error(`skill.token('${t}'): ${e}`)}return r.replace(/\r?\n+$/,``)}return Object.freeze({dir:t,root:n,refs:r,assets:i,config:s,token:c})}function Xl(e){return(t,n,r)=>{let i=xl({method:`POST`,url:`/__slicc/exec-sync`,token:e,body:new TextEncoder().encode(JSON.stringify({...t,channel:vl})),timeoutMs:n+bl,label:r});if(!i||typeof i.stdout!=`string`||typeof i.stderr!=`string`||typeof i.exitCode!=`number`)throw Q(`EIO`,r);return{stdout:i.stdout,stderr:i.stderr,exitCode:i.exitCode}}}function Zl(e,t){let n=e.getMutations();for(let e of n.deleted)t.rm(e);for(let e of n.created)e.isDirectory?t.mkdir(e.path):t.writeFile(e.path,e.content);for(let e of n.modified)t.writeFile(e.path,e.content);e.resetBaseline()}function Ql(e,t={}){let n=t.timeoutMs??12e4,{syncFs:r,fsBridge:i}=t,a=t.transport??Xl(e);return{run(e,o={}){let s=r?.wasUsed()===!0&&i!==void 0;s&&Zl(r,i);let c=`sync-exec bridge, '${Array.isArray(e)?e.join(` `):e}'`,l=t.noDefaultDeadline===!0&&jl(o.timeout),u=l?1/0:Ml(o.timeout,n),d={command:e,...o.args===void 0?{}:{args:o.args},...o.input===void 0?{}:{stdin:o.input},...o.cwd===void 0?{}:{cwd:o.cwd},...o.env===void 0?{}:{env:o.env},...l?{}:{timeoutMs:u}};try{return a(d,u,c)}finally{s&&r.invalidate()}}}}const $l=65536;function eu(e,t){if(!t)return e;let n=e+t;return n.length<=$l?n:n.slice(n.length-$l)}async function tu(e,t,n){let r;try{r=await e.call(`vfs`,`snapshot`,[t])}catch(e){n?.(e instanceof Error?e.message:String(e)),r={entries:[]}}return new ne(r)}function nu(e,t){if(e.syncFsToken)return e=>t(`[sync-fs] snapshot failed, sync metadata will be incomplete: ${e}\n`)}function ru(e,t,n,r){globalThis.__slicc_mountVfs=async(i,a)=>{let{mountVfsIntoEmscripten:o}=await import(`./emscripten-vfs-hook-BuS59209.js`);return o(i,{bridge:e,syncFs:t,cwd:n,warn:e=>r.writeStderr(`slicc: ${e}\n`)},a)}}function iu(e,t,n,r,i){let a=Bl(e,t),o=Vl(e,a);if(Object.assign(r,N(n,e.cwd,o,i,{write:(e,n)=>{t.postMessage({type:`realm-fs-write`,path:e,bytes:n})},delete:e=>{t.postMessage({type:`realm-fs-delete`,path:e})}})),o&&ru(o,n,e.cwd,i),e.syncFsToken)return Ql(e.syncFsToken,{syncFs:n,...o?{fsBridge:o}:{},...a?{transport:zl(a),noDefaultDeadline:!0}:{}})}function au(e=globalThis){Object.prototype.hasOwnProperty.call(e,`SLICC_VERSION`)||Object.defineProperty(e,"SLICC_VERSION",{value:a().version,writable:!1,enumerable:!1,configurable:!1})}function ou(e,t,n){let r=je({isTTY:!e,noColor:e});return{colorApi:r,cliApi:ke({writeStdout:t,writeStderr:n,exit:e=>{throw new ts(e)},color:r})}}function su(e,t,n){return{readStdinBytes:()=>ie(e.stdin??``),writeStdout:t,writeStderr:n}}function cu(e){return{usbBridge:Wl(e),serialBridge:_l(e),hidBridge:Kc(e),computerBridge:Dc(e)}}async function lu(e,t){let n=e.captureOutput!==!1,r={stdout:``,stderr:``},i=(e,i)=>{let a=typeof i==`string`?i:String(i);e===`stdout`?r.stdout=n?r.stdout+a:eu(r.stdout,a):r.stderr=n?r.stderr+a:eu(r.stderr,a),t.postMessage({type:`realm-output`,stream:e,chunk:a})},a=e=>{i(`stdout`,e)},o=e=>{i(`stderr`,e)},s=Ss(a,o),c=Ts(e,a,o),{colorApi:l,cliApi:u}=ou(!!e.env?.NO_COLOR,a,o),d=new hl(t),f=su(e,a,o),p=me(d,T,f),m=await tu(d,e.cwd,nu(e,o)),h=iu(e,t,m,p,f),g=Nc(d,m,e.cwd,o),_=ic(g,{cwd:e.cwd}),v=Yl({argv:e.argv,fs:p,exec:g}),y=Cc(d),{usbBridge:b,serialBridge:x,hidBridge:S,computerBridge:C}=cu(d),w=tc({fetch:T});async function T(e,t){let n=e instanceof Request?e.url:e instanceof URL?e.toString():String(e);return Ic(await d.call(`fetch`,`request`,[n,await xc(t,e)]),n)}let E=nl({exec:g,agent:_,skill:v,http:w,browser:y,usb:b,serial:x,hid:S,computer:C,cli:u,color:l}),D=e.filename,O=es(D),k=await al(d,e.code,e.cwd,D),ee=cl({graph:k,fsBridge:p,processShim:c.processShim,childProcess:Ut(g,h),nodeConsole:s,sliccyModules:E,shimmedPackages:sl(d),nodeReadline:Ns({output:{write:a},onExit:c.recordExit}),nodeOsModule:er(e.env),nodeUtilModule:At(e=>o(`${e}\n`),()=>c.processShim.argv.slice(2))}).require,te={exports:{},filename:e.filename},ne=k.entrySource!==void 0;await uu({entryCode:k.entrySource??e.code,isEsmEntry:ne,entryIsModule:k.entryIsModule===!0,filename:D,dirname:O,proc:c,nodeConsole:s,requireShim:ee,moduleShim:te,realmFetch:T,writeStderr:o,rpc:d,syncFs:m,output:r,port:t})}async function uu(e){let t=globalThis;au(),t.__slicc_compileWasm=t=>e.rpc.call(`wasm`,`compile`,[t]);let n=Hl(globalThis,{onCallbackError(e){if(!(e instanceof ts))throw e}}),{createBodyReadHandleTracker:r}=await import(`./realm-body-handles-BeoKKjy1.js`),i=r(globalThis);n.install(),i.install();let a=Cs(globalThis,e.proc.processShim),{watchUnhandledRejections:o}=await import(`./realm-unhandled-rejections-mGOVnR3q.js`),s=o(globalThis,{writeStderr:e.writeStderr,didExit:e.proc.getDidCallProcessExit,recordExit:e.proc.recordExit});try{let r=await du({entryCode:e.entryCode,bridges:{process:e.proc.processShim,console:e.nodeConsole,require:e.requireShim,module:e.moduleShim,exports:e.moduleShim.exports,fetch:e.realmFetch,...e.entryIsModule?{}:{__dirname:e.dirname,__filename:e.filename}},writeStderr:e.writeStderr,isEsmEntry:e.isEsmEntry,rpc:e.rpc,syncFs:e.syncFs,proc:e.proc,timers:n,bodyReads:i,fatal:s.fatal});delete t.__slicc_compileWasm,delete t.__slicc_mountVfs,e.rpc.dispose(),e.port.postMessage({type:`realm-done`,stdout:e.output.stdout,stderr:e.output.stderr,exitCode:r})}finally{s.dispose(),n.clearPending(),n.restore(),i.restore(),a()}}async function du(e){let t=await ml(e.entryCode,e.bridges,e.writeStderr,e.isEsmEntry);return await fu(e.rpc,e.syncFs,e.writeStderr),e.proc.getDidCallProcessExit()?(e.timers.clearPending(),e.proc.getExitCode()):(await pu(e.rpc,e.timers,e.bodyReads,e.proc,e.fatal),e.proc.getDidCallProcessExit()&&e.timers.clearPending(),await fu(e.rpc,e.syncFs,e.writeStderr),e.proc.getDidCallProcessExit()||t===0?e.proc.getExitCode():t)}async function fu(e,t,n){let r=t.getMutations();if(r.created.length||r.modified.length||r.deleted.length)try{await e.call(`vfs`,`flushWrites`,[r]),t.resetBaseline()}catch(e){let t=e instanceof Error?e.message:String(e);n(`[sync-fs] ERROR: flush failed — ${r.created.length+r.modified.length} write(s) + ${r.deleted.length} delete(s) were NOT persisted: ${t}\n`)}}async function pu(e,t,n,r,i){await t.tick();let a=0;for(;!r.getDidCallProcessExit()&&a<2;){let o=[];if(e.pendingCount>0&&o.push(e.waitForProgress()),t.pendingCount>0&&o.push(t.waitForProgress()),n.pendingCount>0&&o.push(n.waitForProgress()),o.length===0){a+=1,await t.tick();continue}a=0,o.push(i),await Promise.race(o),r.getDidCallProcessExit()||await t.tick()}}const mu={postMessage:(e,t)=>t?self.postMessage(e,t):self.postMessage(e),addEventListener:(e,t)=>self.addEventListener(e,t),removeEventListener:(e,t)=>self.removeEventListener(e,t)};self.addEventListener(`message`,e=>{if(e.data?.type!==`realm-init`)return;let t=e.data;t.kind===`js`&&lu(t,mu).catch(e=>{let t={type:`realm-error`,message:e instanceof Error?e.message:String(e)};self.postMessage(t)})});export{ts as n,Zl as t};
|