sliccy 6.165.0 → 6.167.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.
Files changed (228) hide show
  1. package/README.md +1 -0
  2. package/dist/node-server/_shared/base64.d.ts.map +1 -1
  3. package/dist/node-server/_shared/base64.js +7 -3
  4. package/dist/node-server/_shared/base64.js.map +1 -1
  5. package/dist/node-server/_shared/computer-protocol.d.ts +110 -0
  6. package/dist/node-server/_shared/computer-protocol.d.ts.map +1 -0
  7. package/dist/node-server/_shared/computer-protocol.js +10 -0
  8. package/dist/node-server/_shared/computer-protocol.js.map +1 -0
  9. package/dist/node-server/_shared/index.d.ts +1 -0
  10. package/dist/node-server/_shared/index.d.ts.map +1 -1
  11. package/dist/node-server/_shared/index.js +1 -0
  12. package/dist/node-server/_shared/index.js.map +1 -1
  13. package/dist/node-server/_shared/tray-sync-protocol.d.ts +66 -2
  14. package/dist/node-server/_shared/tray-sync-protocol.d.ts.map +1 -1
  15. package/dist/node-server/_shared/tray-sync-protocol.js +75 -2
  16. package/dist/node-server/_shared/tray-sync-protocol.js.map +1 -1
  17. package/dist/ui/.vite/manifest.json +285 -261
  18. package/dist/ui/assets/{SKILL-C8DJkgFD.js → SKILL-BGEZa-y0.js} +1 -1
  19. package/dist/ui/assets/SKILL-CWR-bsvH.js +1 -0
  20. package/dist/ui/assets/SKILL-DEFDsScb.js +1 -0
  21. package/dist/ui/assets/{SKILL-0AeLgxT3.js → SKILL-DZoCcID_.js} +1 -1
  22. package/dist/ui/assets/{account-store-lzZlhljv.js → account-store-B05_LKnj.js} +1 -1
  23. package/dist/ui/assets/{account-store-CJHBoL7P.js → account-store-CNTI4kr_.js} +2 -2
  24. package/dist/ui/assets/{adobe-DbBJWbF9.js → adobe-CRRWEbtf.js} +2 -2
  25. package/dist/ui/assets/{adobe-DUaaJHme.js → adobe-nu3irXcy.js} +1 -1
  26. package/dist/ui/assets/{agent-panels-DQh4wRpa.js → agent-panels-DvH_qfTh.js} +1 -1
  27. package/dist/ui/assets/{almost-bash-shell-headless-DdfO5taA.js → almost-bash-shell-headless-BA5r_r61.js} +506 -508
  28. package/dist/ui/assets/{apply-layout-DeIHdw5o.js → apply-layout-CASSSWEy.js} +1 -1
  29. package/dist/ui/assets/{apps-X6cH7Ngi.js → apps-BGe9_zJ7.js} +1 -1
  30. package/dist/ui/assets/{azure-openai-DoDPxnFq.js → azure-openai-C-Iw82HZ.js} +1 -1
  31. package/dist/ui/assets/{azure-openai-DS5DA5ql.js → azure-openai-DuJciOKd.js} +1 -1
  32. package/dist/ui/assets/{backend-hostfs-9Xwjq8kU.js → backend-hostfs-DdAVlPMP.js} +1 -1
  33. package/dist/ui/assets/{base64-DzRgusa4.js → base64-BPBW1Gzr.js} +1 -1
  34. package/dist/ui/assets/{base64-DJRlyqZu.js → base64-ELzoYfwP.js} +1 -1
  35. package/dist/ui/assets/bridge-protocol-31SWTdS5.js +1 -0
  36. package/dist/ui/assets/{capability-Ci9JmpEG.js → capability-C2eJ1wdx.js} +2 -2
  37. package/dist/ui/assets/{cdp-Bi4OGeyp.js → cdp-DG8TVjf3.js} +1 -1
  38. package/dist/ui/assets/{cerebras-D9Xp_f8D.js → cerebras-BXwtUxTj.js} +1 -1
  39. package/dist/ui/assets/{cerebras-BzQeaK2Z.js → cerebras-Xadzrxfp.js} +1 -1
  40. package/dist/ui/assets/{client-B6iKb_ye.js → client-BDN4zG90.js} +1 -1
  41. package/dist/ui/assets/{composer-speech-BVpldTNH.js → composer-speech-_uq5e0Bo.js} +1 -1
  42. package/dist/ui/assets/{connect-surface-CyUMMhhU.js → connect-surface-odDz37TJ.js} +1 -1
  43. package/dist/ui/assets/{core-BMcS6rur.js → core-BoFWHLIW.js} +1 -1
  44. package/dist/ui/assets/{core-DP-MJcag.js → core-Bvc89tkf.js} +1 -1
  45. package/dist/ui/assets/{directed-approval-CaEocD9T.js → directed-approval-D_AXAvuz.js} +1 -1
  46. package/dist/ui/assets/{discovery-preference-Bw3Fi0jd.js → discovery-preference-TziZ7Yxu.js} +1 -1
  47. package/dist/ui/assets/encode-frame-B8GkHc2t.js +1 -0
  48. package/dist/ui/assets/engine-D531XNHE.js +1 -0
  49. package/dist/ui/assets/{ensure-speech-assets-B9REkBI_.js → ensure-speech-assets-DTj236n-.js} +1 -1
  50. package/dist/ui/assets/{extension-media-capture-BvLVZFQ0.js → extension-media-capture-DMB4r9UQ.js} +1 -1
  51. package/dist/ui/assets/{extension-ops-B0oi7ypc.js → extension-ops-DNPAsYbK.js} +1 -1
  52. package/dist/ui/assets/fake-computer-Jawax3MO.js +352 -0
  53. package/dist/ui/assets/{float-topology-YtctpJaG.js → float-topology-CurCyQFy.js} +1 -1
  54. package/dist/ui/assets/{follower-navigate-watcher-DnnHgZbM.js → follower-navigate-watcher-C98XMw_C.js} +1 -1
  55. package/dist/ui/assets/{frozen-archive-writer-BWuT2QtJ.js → frozen-archive-writer-BIzZxx8R.js} +1 -1
  56. package/dist/ui/assets/{fs-CmCsE1zE.js → fs-Bq8bUwe2.js} +1 -1
  57. package/dist/ui/assets/{fs-C3QG5M_q.js → fs-CJs9n90Q.js} +2 -2
  58. package/dist/ui/assets/{gelatiere-store-ijXRupBc.js → gelatiere-store-BY0hZvSS.js} +1 -1
  59. package/dist/ui/assets/{gelatiere-unit-BlRXo_Ch.js → gelatiere-unit-DrQwRL3O.js} +1 -1
  60. package/dist/ui/assets/{github-2vLuAY6J.js → github-D1gd3q6u.js} +2 -2
  61. package/dist/ui/assets/{github-auth-87ZWWpe-.js → github-auth-CzzE1eDf.js} +1 -1
  62. package/dist/ui/assets/{github-copilot-DaHQ2cTA.js → github-copilot-Bx2lXrwK.js} +1 -1
  63. package/dist/ui/assets/{github-copilot-CdwPARvl.js → github-copilot-DidNEEe_.js} +1 -1
  64. package/dist/ui/assets/{github-install-CCQJ7A9f.js → github-install--_xp8s-S.js} +1 -1
  65. package/dist/ui/assets/{github-Zcx-gHTn.js → github-uDwUwz5H.js} +1 -1
  66. package/dist/ui/assets/{github-zip-D4jSHksq.js → github-zip-Bs35nBig.js} +1 -1
  67. package/dist/ui/assets/{guest-tool-gate-Mu-876Hm.js → guest-tool-gate-B-lZT9hl.js} +1 -1
  68. package/dist/ui/assets/{handoff-link-NCw3cxSG.js → handoff-link-B3It6xQY.js} +1 -1
  69. package/dist/ui/assets/{hear-CovWNOND.js → hear-BNmJphKg.js} +1 -1
  70. package/dist/ui/assets/{help-BmMJZSmm.js → help-C7Nq107k.js} +1 -1
  71. package/dist/ui/assets/host-iTtS0MRF.js +1 -0
  72. package/dist/ui/assets/{image-markers-DuyWsic3.js → image-markers-CwM1dvoI.js} +1 -1
  73. package/dist/ui/assets/{image-markers-BFDmhPy4.js → image-markers-q8JQTtid.js} +1 -1
  74. package/dist/ui/assets/{installer-BOAaojqu.js → installer-C0xiAs69.js} +1 -1
  75. package/dist/ui/assets/js-realm-worker-B9Rz0g1p.js +50 -0
  76. package/dist/ui/assets/jsh-CmIpo35m.js +1 -0
  77. package/dist/ui/assets/jsh-executor-C7QPZ2Qr.js +18 -0
  78. package/dist/ui/assets/jsh-runtime-extensions-ddeGEOUw.js +1 -0
  79. package/dist/ui/assets/{kernel-worker-CrTnmx6N.js → kernel-worker-4aPSVJ1C.js} +38 -38
  80. package/dist/ui/assets/keys-Dexx8cLD.js +1 -0
  81. package/dist/ui/assets/{lick-ws-bridge-56mwSRdV.js → lick-ws-bridge-BcAhlead.js} +1 -1
  82. package/dist/ui/assets/{lick-ws-bridge-D4FyZHWP.js → lick-ws-bridge-DZ0vVYNF.js} +1 -1
  83. package/dist/ui/assets/{live-session-snapshot-ZXxxxzvO.js → live-session-snapshot-COMr2v0o.js} +1 -1
  84. package/dist/ui/assets/{local-llm-B6tgSQ84.js → local-llm-DdGb9WMG.js} +1 -1
  85. package/dist/ui/assets/{local-llm-BDbJaGUp.js → local-llm-DqeU7kV3.js} +1 -1
  86. package/dist/ui/assets/{main-cherry-D1lfDTVL.js → main-cherry-BGZmJFd_.js} +1 -1
  87. package/dist/ui/assets/{main-Dxem3Ydy.js → main-jc6OS8lz.js} +3 -3
  88. package/dist/ui/assets/{memory-curation-seam-ZGh8tSbe.js → memory-curation-seam-B8pprlUo.js} +1 -1
  89. package/dist/ui/assets/{memory-health-CZHaK5wO.js → memory-health-CGkpyA7o.js} +1 -1
  90. package/dist/ui/assets/memory-v2-flag-DVbOtPFF.js +1 -0
  91. package/dist/ui/assets/{memory-write-execute-Csx1-nfE.js → memory-write-execute-B-ahXjaO.js} +1 -1
  92. package/dist/ui/assets/{mount-DCCYSZwW.js → mount-BzdPNQoA.js} +3 -3
  93. package/dist/ui/assets/{mount-ByktCqqU.js → mount-FkNAB0be.js} +1 -1
  94. package/dist/ui/assets/{mount-bridge-client-3a86Q6J0.js → mount-bridge-client-BO0N4wwP.js} +1 -1
  95. package/dist/ui/assets/{mount-bridge-client-CO2HxXrT.js → mount-bridge-client-CRnohfom.js} +1 -1
  96. package/dist/ui/assets/{new-session-CG_ht0Kw.js → new-session-B8iOhaK0.js} +2 -2
  97. package/dist/ui/assets/{oauth-bootstrap-CQmrSZN1.js → oauth-bootstrap-B9PwK4-d.js} +2 -2
  98. package/dist/ui/assets/{oauth-service-BsW9nY_u.js → oauth-service-Bkaz0Dt4.js} +1 -1
  99. package/dist/ui/assets/{oauth-service-IlBYPvwr.js → oauth-service-UTPOqIwj.js} +1 -1
  100. package/dist/ui/assets/{onboarding-orchestrator-DZFSsW4q.js → onboarding-orchestrator-Cc8Glrem.js} +1 -1
  101. package/dist/ui/assets/{openai-codex-ebHt4iSf.js → openai-codex-BrQ1tsgu.js} +1 -1
  102. package/dist/ui/assets/{openai-codex-dKSgjDc_.js → openai-codex-DmHr_2RR.js} +1 -1
  103. package/dist/ui/assets/{openrouter-BQhA4-TP.js → openrouter-BvM36eS5.js} +1 -1
  104. package/dist/ui/assets/{openrouter-CsPQehN8.js → openrouter-C6WDBJvB.js} +1 -1
  105. package/dist/ui/assets/{openrouter-free-BppbTow1.js → openrouter-free-CFBzPY5J.js} +1 -1
  106. package/dist/ui/assets/{openrouter-free-kxAwjRgT.js → openrouter-free-CUKlyrhq.js} +1 -1
  107. package/dist/ui/assets/{openrouter-oauth-B3y32yAJ.js → openrouter-oauth-DOdpRMfw.js} +1 -1
  108. package/dist/ui/assets/{openrouter-oauth-D0vfD1T8.js → openrouter-oauth-RC0CxY4X.js} +1 -1
  109. package/dist/ui/assets/{opfs-mount-ld8qlksz.js → opfs-mount-B78yj9gx.js} +1 -1
  110. package/dist/ui/assets/{page-approval-service-B8t-buCi.js → page-approval-service-Dy-UA1aK.js} +1 -1
  111. package/dist/ui/assets/panel-rpc-handlers-CQ_iaU6N.js +2 -0
  112. package/dist/ui/assets/panelize-shell-CFPiIneK.js +4 -0
  113. package/dist/ui/assets/{pi-edit-execution-CoRFZcs7.js → pi-edit-execution-BDl_Xp_M.js} +1 -1
  114. package/dist/ui/assets/{port-bridge-client-Ds3xwapn.js → port-bridge-client-H03Pohgj.js} +1 -1
  115. package/dist/ui/assets/{port-bridge-client-Dn8JtUyP.js → port-bridge-client-ff8DctEN.js} +1 -1
  116. package/dist/ui/assets/{provider-DE1pR-oR.js → provider-1ByYSphI.js} +2 -2
  117. package/dist/ui/assets/{provider-CNKZIWc1.js → provider-Df8LFEZ7.js} +1 -1
  118. package/dist/ui/assets/{provider-settings-D8qwiWrG.js → provider-settings-Bk-fk9dp.js} +1 -1
  119. package/dist/ui/assets/provider-store-access-BJPbOUku.js +1 -0
  120. package/dist/ui/assets/provider-store-access-BrjCBzpb.js +1 -0
  121. package/dist/ui/assets/{providers-InF4o-U9.js → providers-Q92pCQ8h.js} +2 -2
  122. package/dist/ui/assets/{providers-CUF9nsUE.js → providers-T_FH_8cU.js} +1 -1
  123. package/dist/ui/assets/{proxied-fetch-DyBveeCl.js → proxied-fetch-Bl8AeYdt.js} +1 -1
  124. package/dist/ui/assets/{proxied-fetch-DEK8DT-z.js → proxied-fetch-DARKNygr.js} +1 -1
  125. package/dist/ui/assets/{quick-llm-CQWR6xvc.js → quick-llm-CbGHjrhX.js} +1 -1
  126. package/dist/ui/assets/realm-inprocess-CWMnXeN3.js +30 -0
  127. package/dist/ui/assets/{recovery-screen-DWMb8zIg.js → recovery-screen-DhUqOdby.js} +1 -1
  128. package/dist/ui/assets/{redirect-uri-CgKdq7-K.js → redirect-uri-Dd0j1fSp.js} +1 -1
  129. package/dist/ui/assets/registry-Bq_j-EXx.js +1 -0
  130. package/dist/ui/assets/{request-body-DkfS6k_a.js → request-body-BF4moGct.js} +1 -1
  131. package/dist/ui/assets/{rest-ops-C8YK53pT.js → rest-ops-CQOwDiTR.js} +1 -1
  132. package/dist/ui/assets/{rest-ops-DNanZY2-.js → rest-ops-DkUeDpiM.js} +1 -1
  133. package/dist/ui/assets/{restore-PqiSHlx3.js → restore-CVkulBmU.js} +1 -1
  134. package/dist/ui/assets/{run-BOkp5G58.js → run-1aYSFTwj.js} +2 -2
  135. package/dist/ui/assets/{run-F7Bv3Fcu.js → run-BX9uHbIi.js} +1 -1
  136. package/dist/ui/assets/{run-DJQAmghw.js → run-COfTem8j.js} +1 -1
  137. package/dist/ui/assets/{run-Bqg_NW7f.js → run-CUCg2cJM.js} +2 -2
  138. package/dist/ui/assets/{run-Bld9B0W0.js → run-CreCrLyX.js} +1 -1
  139. package/dist/ui/assets/{run-Do5pAlQf.js → run-DgVV_DFr.js} +3 -3
  140. package/dist/ui/assets/{run-D0C4PgZM.js → run-DuW-7oJj.js} +2 -2
  141. package/dist/ui/assets/run-DvD576xV.js +53 -0
  142. package/dist/ui/assets/{run-w1tdYqAg.js → run-IexPmM2B.js} +2 -2
  143. package/dist/ui/assets/{run-DoD-L3x8.js → run-ZmpHaamT.js} +2 -2
  144. package/dist/ui/assets/{screencapture-media-B1iFS6Qy.js → screencapture-media-DL5YxrlG.js} +1 -1
  145. package/dist/ui/assets/{screencapture-run-XrgS6hEd.js → screencapture-run-yMA5c_HS.js} +1 -1
  146. package/dist/ui/assets/{secret-env-CDLWFhsq.js → secret-env-BhWGz7yx.js} +1 -1
  147. package/dist/ui/assets/secret-topology-CVneCnID.js +1 -0
  148. package/dist/ui/assets/{secrets-bridge-client-ZpBL1Zhl.js → secrets-bridge-client-BS3V1JBF.js} +1 -1
  149. package/dist/ui/assets/{secrets-bridge-client--VZ3E0yk.js → secrets-bridge-client-C0tvQeuX.js} +1 -1
  150. package/dist/ui/assets/{session-command-memory-BKzFoCAZ.js → session-command-memory-DzuRy-nC.js} +2 -2
  151. package/dist/ui/assets/{session-jsonl-DjDV9zx6.js → session-jsonl-D01HYAS2.js} +1 -1
  152. package/dist/ui/assets/{session-jsonl-C7a0swa5.js → session-jsonl-iOOR_32X.js} +1 -1
  153. package/dist/ui/assets/{session-search-index-CMRSS2CP.js → session-search-index-CABvtt-r.js} +1 -1
  154. package/dist/ui/assets/{setup-feature-flags-remote-BmKhybEI.js → setup-feature-flags-remote-CvstKwBW.js} +1 -1
  155. package/dist/ui/assets/{signed-fetch-DDtJ0TE5.js → signed-fetch-7NwdVmf1.js} +1 -1
  156. package/dist/ui/assets/{silent-renew-backoff-CBUhiIba.js → silent-renew-backoff-CXHqSiPb.js} +1 -1
  157. package/dist/ui/assets/{silent-renew-backoff-DIMz5UqB.js → silent-renew-backoff-Dmz3DJHb.js} +1 -1
  158. package/dist/ui/assets/slicc-version-CN6V2aMa.js +1 -0
  159. package/dist/ui/assets/{snapshot-DyCo7e-C.js → snapshot-BcYaw9Ip.js} +1 -1
  160. package/dist/ui/assets/{snapshot-features-BIG7eB0k.js → snapshot-features-3xslkGtL.js} +1 -1
  161. package/dist/ui/assets/{soundscape-bHynTI4A.js → soundscape-TygolFwj.js} +1 -1
  162. package/dist/ui/assets/{speak-DbL0fEQT.js → speak-BCLm04Z2.js} +1 -1
  163. package/dist/ui/assets/{sprinkle-manager-Bhwou11b.js → sprinkle-manager-DDzNanda.js} +1 -1
  164. package/dist/ui/assets/{sprinkle-renderer-CEIEQSMS.js → sprinkle-renderer-B-CADNjq.js} +1 -1
  165. package/dist/ui/assets/{state-BdNtTsoR.js → state-BCTAzK_L.js} +1 -1
  166. package/dist/ui/assets/{store-CJD-1zaX.js → store-C-AW4ogv.js} +1 -1
  167. package/dist/ui/assets/{store-BRXCCWDC.js → store-CzlK9KIc.js} +1 -1
  168. package/dist/ui/assets/{sudo-QHJEgCZR.js → sudo-BtkDnUA_.js} +1 -1
  169. package/dist/ui/assets/{supervisor-DILjXQCB.js → supervisor-B6-QPxI3.js} +1 -1
  170. package/dist/ui/assets/{sync-dialog-8D9LiBVV.js → sync-dialog-B4G7kCwj.js} +1 -1
  171. package/dist/ui/assets/tab-ToMhjbM4.js +1 -0
  172. package/dist/ui/assets/{transformers-env-jBVeNAIF.js → transformers-env-1TbBNkOp.js} +1 -1
  173. package/dist/ui/assets/{tray-leader-BxfP0EC1.js → tray-leader-_KISvFyF.js} +1 -1
  174. package/dist/ui/assets/{tray-leave-runtime-1j0s9Yqq.js → tray-leave-runtime-CRsRkPHc.js} +1 -1
  175. package/dist/ui/assets/tray-runtime-config-BVgVR3H2.js +1 -0
  176. package/dist/ui/assets/{tray-sidecar-BUsex5hw.js → tray-sidecar-BRvCb-i7.js} +1 -1
  177. package/dist/ui/assets/{upgrade-detection-DCwNWWGX.js → upgrade-detection-C5daiUbn.js} +1 -1
  178. package/dist/ui/assets/{upskill-lick-skip-C9u8AmfA.js → upskill-lick-skip-C2ZQ0c2-.js} +1 -1
  179. package/dist/ui/assets/v86-BfdTUFBK.js +1 -0
  180. package/dist/ui/assets/v86-vm-DCm7zA2r.js +2 -0
  181. package/dist/ui/assets/voice-reply-Dk4ztuZL.js +1 -0
  182. package/dist/ui/assets/{wc-attach-CJV3boxa.js → wc-attach-CFj2ZF5_.js} +3 -3
  183. package/dist/ui/assets/wc-browser-BFL2Tl8W.js +1 -0
  184. package/dist/ui/assets/wc-computers-CcJuQUyG.js +3 -0
  185. package/dist/ui/assets/{wc-detached-BZT3Rtc5.js → wc-detached-ncc8KuL1.js} +1 -1
  186. package/dist/ui/assets/{wc-extension-CZ1sQn79.js → wc-extension-DppNe2VK.js} +2 -2
  187. package/dist/ui/assets/{wc-follower-DO4HcEvu.js → wc-follower-CcxFCW-y.js} +3 -3
  188. package/dist/ui/assets/wc-follower-oauth-DQ-JPxl6.js +5 -0
  189. package/dist/ui/assets/{wc-gelatiere-C4XI_usG.js → wc-gelatiere-CANPh9TU.js} +1 -1
  190. package/dist/ui/assets/wc-live-BLozTZsg.js +427 -0
  191. package/dist/ui/assets/{wc-nav-ClJyDfXq.js → wc-nav-BlLpBAJG.js} +2 -2
  192. package/dist/ui/assets/{wc-onboarding-BUUyiqjJ.js → wc-onboarding-OKaUOQ3X.js} +2 -2
  193. package/dist/ui/assets/{wc-placeholder-Sji0t7ST.js → wc-placeholder-BrX9-mPv.js} +3 -3
  194. package/dist/ui/assets/{wc-secret-request-IsuAxr4v.js → wc-secret-request-QPmTs_eW.js} +1 -1
  195. package/dist/ui/assets/{wc-settings-lgNdcEqb.js → wc-settings-BFgFDtTk.js} +3 -3
  196. package/dist/ui/assets/{wc-shell-Cj705NBI.js → wc-shell-CCKjmASt.js} +242 -187
  197. package/dist/ui/assets/{wc-shortcut-config-ByZ7W9gP.js → wc-shortcut-config-CeUoljrV.js} +1 -1
  198. package/dist/ui/assets/{wc-sprinkles-D7Cv7m3r.js → wc-sprinkles-BNp18_jW.js} +2 -2
  199. package/dist/ui/assets/{wc-transcript-export-IV61nDvZ.js → wc-transcript-export-DJnnZ8L-.js} +2 -2
  200. package/dist/ui/assets/wc-tray-f1LxbB98.js +5 -0
  201. package/dist/ui/assets/welcome-detection-Dg9THpkh.js +1 -0
  202. package/dist/ui/assets/{whisper-session-FGrrhHcr.js → whisper-session-CMiImrJg.js} +2 -2
  203. package/dist/ui/assets/{xai-grok-BdK9whs2.js → xai-grok-BMr5udF6.js} +1 -1
  204. package/dist/ui/assets/{xai-grok-Z7FTSyzw.js → xai-grok-Dzeo18XM.js} +1 -1
  205. package/dist/ui/index.html +11 -11
  206. package/dist/ui/packages/webapp/index.html +11 -11
  207. package/package.json +1 -1
  208. package/dist/ui/assets/SKILL-CtxHowg1.js +0 -96
  209. package/dist/ui/assets/bridge-protocol-DdqxTTSu.js +0 -1
  210. package/dist/ui/assets/engine-B-OPe78i.js +0 -1
  211. package/dist/ui/assets/js-realm-worker-Dfep1BlZ.js +0 -50
  212. package/dist/ui/assets/jsh-executor-D4Y05hfn.js +0 -18
  213. package/dist/ui/assets/jsh-runtime-extensions-Bcb8_nba.js +0 -1
  214. package/dist/ui/assets/memory-v2-flag-BkWGkfSv.js +0 -1
  215. package/dist/ui/assets/panel-rpc-handlers-DpxMB-do.js +0 -2
  216. package/dist/ui/assets/panelize-shell-BdV-wKTx.js +0 -4
  217. package/dist/ui/assets/provider-store-access-BCysAaQ-.js +0 -1
  218. package/dist/ui/assets/provider-store-access-D-QWySrs.js +0 -1
  219. package/dist/ui/assets/realm-inprocess-BdTkrnDI.js +0 -30
  220. package/dist/ui/assets/secret-topology-DLJBhHOi.js +0 -1
  221. package/dist/ui/assets/slicc-version-Cu6HjDRg.js +0 -1
  222. package/dist/ui/assets/tray-runtime-config-CRZxBChd.js +0 -1
  223. package/dist/ui/assets/voice-reply-CgvrHu7l.js +0 -1
  224. package/dist/ui/assets/wc-browser-DO1Pnegi.js +0 -1
  225. package/dist/ui/assets/wc-follower-oauth-CEpYsbPr.js +0 -5
  226. package/dist/ui/assets/wc-live-Dz2OSXcJ.js +0 -427
  227. package/dist/ui/assets/wc-tray-XTl0wqt5.js +0 -5
  228. package/dist/ui/assets/welcome-detection-B6Zr7LKu.js +0 -1
@@ -1,30 +0,0 @@
1
- import{t as e}from"./rolldown-runtime-Dd_uD5pT.js";import{t}from"./__vite-browser-external-5eBdwsFd.js";import{r as n,t as r}from"./multipart-form-data-DopbgwRR.js";import{n as i}from"./slicc-version-Cu6HjDRg.js";import{t as a}from"./buffer-polyfill-BccMjOKj.js";import{t as o}from"./buffer-B5d1xHaH.js";import{F as s,I as c,N as l,P as u}from"./shared-C_68vn79.js";import{I as d,M as f,R as p,T as m,_ as h,c as g,g as _,i as v,j as y,l as b,n as x,r as S,s as C,w}from"./sync-sab-wire-CC30v4TL.js";import{t as T}from"./tmpdir-env-ate4iNcK.js";import{t as E}from"./realm-browser-fetch-V3uggGbM.js";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 A(e){return e===`/dev/stdin`||e===`/dev/stdout`||e===`/dev/stderr`}function se(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 ce(e,t){let n=se(e);if(n===0)return!0;if(n!==void 0||typeof e==`number`)throw oe(t,e);return!1}function le(e,t,n){let r=se(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 ue(e){return typeof e==`string`?e:ae(xe(e))}function de(e,t){if(t===`utf8`||t===`utf-8`)return new TextDecoder().decode(e);let n=re();return n?n.from(e):e}function fe(e){return typeof e==`string`?e:e?.encoding}function pe(){return{isFile:()=>!0,isDirectory:()=>!1,isSymbolicLink:()=>!1,isCharacterDevice:()=>!0,size:0}}function me(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(!ce(e,`read`))return n.readFile(e,r);let i=fe(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=>ce(e,`read`)?t.readStdinBytes():n.readFileBinary(e),e.writeFile=async(e,r)=>{let i=le(t,e,`write`);return i?(i(ue(r)),!0):n.writeFile(e,r)},e.writeFileBinary=async(e,r)=>{let i=le(t,e,`write`);return i?(i(ae(r)),!0):n.writeFileBinary(e,r)},e.appendFile=async(e,r)=>{let i=le(t,e,`append`);if(!i)return n.appendFile(e,r);i(ue(r))},e.access=async e=>{if(!A(e))return n.access(e)},e.exists=async e=>A(e)||n.exists(e),e.stat=async e=>A(e)?{isFile:!0,isDirectory:!1,size:0}:n.stat(e)}function he(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=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 p={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 me(p,n),p.promises=p,p}function j(e,t,n=``){return Object.assign(Error(`${e}: sync-fs, ${n?`${n} `:``}'${t}'`),{code:e})}function ge(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 _e(e){let{syncFs:t,bridge:n,resolve:r,existsResolved:i,lstatResolved:a,statResolved:o,readBytes:s,writeThrough:c,persistDelete:l}=e,u=(e,r)=>ge(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 j(`ENOENT`,n,`rm`)},rmdirSync(e,t){let n=r(e);if(i(n)&&!a(n).isDirectory)throw j(`ENOTDIR`,n,`rmdir`);if(!u(n,{recursive:t?.recursive===!0}))throw j(`ENOENT`,n,`rmdir`)},unlinkSync(e){let t=r(e);if(!u(t,{requireFile:!0}))throw j(`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 j(`ENOENT`,a,`rename`);if(o(a).isDirectory)throw j(`EISDIR`,a,`rename`);if(c(l,s(a)),!u(a,{requireFile:!0}))throw j(`ENOENT`,a,`rename`)}}}function ve(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)=>ce(e,`read`)?de(t.readStdinBytes(),fe(r)):n.readFileSync(e,r),e.writeFileSync=(e,r)=>{let i=le(t,e,`write`);i?i(ue(r)):n.writeFileSync(e,r)},e.appendFileSync=(e,r)=>{let i=le(t,e,`append`);i?i(ue(r)):n.appendFileSync(e,r)},e.existsSync=e=>A(e)||n.existsSync(e),e.accessSync=e=>{A(e)||n.accessSync(e)},e.statSync=e=>A(e)?pe():n.statSync(e),e.lstatSync=e=>A(e)?pe():n.lstatSync(e)}function ye(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 be(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 ye(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 ye(n,[],t.readdir(n),r)}}function xe(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 Se(e,t,n,r,i){t?(t.writeFile(r,i),e.commitWrite(r,i)):(e.writeFile(r,i),n?.write?.(r,i))}function Ce(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)=>Se(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 p(t,r){if(!l(t).isDirectory){s(r,o(t));return}e.mkdir(r,!0);for(let i of be(e,n,t))p(f(t,i),f(r,i))}let m={..._e({syncFs:e,bridge:n,persistDelete:i?.delete,resolve:a,existsResolved:c,statResolved:l,lstatResolved:u,readBytes:o,writeThrough:s}),readFileSync(e,t){return de(o(a(e)),fe(t))},writeFileSync(e,t){s(a(e),xe(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=xe(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 j(`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 j(`ENOENT`,t,`realpath`);return t},readdirSync(t){return be(e,n,a(t))},copyFileSync(e,t){s(a(t),o(a(e)))},cpSync(e,t){p(a(e),a(t))},chmodSync(e){let t=a(e);if(!c(t))throw j(`ENOENT`,t,`chmod`)},mkdtempSync(t){return e.mkdtemp(a(t))}};return ve(m,r),m}function we(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(`
2
- `)?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(`
3
- `)?t:`${t}\n`),e.exit(0),Error(`unreachable`)}}}const M={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 Te(e){let t=e.isTTY&&!e.noColor,n=e=>n=>t?`${e}${n}${M.reset}`:String(n);return{enabled:t,green:n(M.green),red:n(M.red),yellow:n(M.yellow),gray:n(M.gray),bold:n(M.bold),cyan:n(M.cyan),dim:n(M.dim)}}const Ee=/\u001b\[[0-9;]*m/g;function De(e){return e.replace(Ee,``)}function Oe(e){return De(e).length}function ke(e,t){let n=String(e??``);return t<=0?``:Oe(n)<=t?n:t<=1?n.slice(0,t):`${De(n).slice(0,t-1)}…`}function Ae(e,t){let n=String(e??``),r=Oe(n);return r===t?n:r>t?ke(n,t):n+` `.repeat(t-r)}function je(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,Oe(e))}r[i]=t}return e.map(e=>r.map((t,n)=>Ae(n<e.length?String(e[n]??``):``,t)).join(` `).replace(/\s+$/,``)).join(`
4
- `)}function Me(e){return e instanceof Date?e:new Date(e)}function Ne(e){return e<10?`0${e}`:String(e)}function Pe(e,t=`short`){let n=Me(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()}-${Ne(n.getMonth()+1)}-${Ne(n.getDate())}`}const Fe={trunc:ke,col:Ae,table:je,date:Pe};var N=class extends Error{actual;expected;operator;generatedMessage;code;constructor(e={}){let t=!e.message;super(e.message||`${Ie(e.actual)} ${e.operator||`!=`} ${Ie(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 Ie(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 P(e,t){return e instanceof Error?e:typeof e==`string`?new N({message:e}):t()}function Le(e,t,n,r){if(e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(!ze(e[i],t[i],n,r))return!1;return!0}function Re(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)||!ze(Reflect.get(e,a),Reflect.get(t,a),n,r))return!1;return!0}function ze(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)?Le(e,t,n,r):Re(i,a,n,r):!1)}function Be(e,t){try{if(e instanceof t)return!0}catch{}try{return!!t(e)}catch{return!1}}function Ve(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 He(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`?Be(e,t):t&&typeof t==`object`?!e||typeof e!=`object`?!1:Ve(e,t):!1}function Ue(e){let t=(e,t)=>{if(!e)throw P(t,()=>new N({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 P(n,()=>new N({actual:e,expected:t,operator:`strictEqual`}))},i=(t,n,i)=>{if(e){r(t,n,i);return}if(t!=n)throw P(i,()=>new N({actual:t,expected:n,operator:`==`}))},a=(e,t,n)=>{if(Object.is(e,t))throw P(n,()=>new N({actual:e,expected:t,operator:`notStrictEqual`}))},o=(t,n,r)=>{if(e){a(t,n,r);return}if(t==n)throw P(r,()=>new N({actual:t,expected:n,operator:`!=`}))},s=(e,t,n)=>{if(!ze(e,t,!0,new WeakMap))throw P(n,()=>new N({actual:e,expected:t,operator:`deepStrictEqual`}))},c=(t,n,r)=>{if(e){s(t,n,r);return}if(!ze(t,n,!1,new WeakMap))throw P(r,()=>new N({actual:t,expected:n,operator:`deepEqual`}))},l=(e,t,n)=>{if(ze(e,t,!0,new WeakMap))throw P(n,()=>new N({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(ze(t,n,!1,new WeakMap))throw P(r,()=>new N({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 P(typeof t==`string`?t:n,()=>new N({message:`Missing expected exception`,operator:`throws`}));if(!(typeof t==`string`||t instanceof Error)&&!He(r,t))throw P(n,()=>new N({message:`Got unwanted exception`,actual:r,operator:`throws`}))},n.doesNotThrow=(e,t)=>{try{e()}catch(e){throw P(t,()=>new N({message:`Got unwanted exception`,actual:e,operator:`doesNotThrow`}))}},n.fail=e=>{throw P(e,()=>new N({message:`Failed`,operator:`fail`}))},n.AssertionError=N,n}const We=Ue(!0);We.strict=We;const Ge=Ue(!1);Ge.strict=We;function Ke(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 qe=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 Je=Object.assign(qe,{EventEmitter:qe,default:qe});var Ye=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}},Xe=class extends Ye{read(){return null}destroy(){return this.closeOnDestroy()}},Ze=class extends Ye{write(e,t,n){return n&&queueMicrotask(n),!0}end(e){return e&&queueMicrotask(e),this}destroy(){return this.closeOnDestroy()}},Qe=class extends Ye{write(e,t,n){return n&&queueMicrotask(n),!0}end(e){return e&&queueMicrotask(e),this}read(){return null}destroy(){return this.closeOnDestroy()}};const $e={Readable:Xe,Writable:Ze,Transform:Qe,PassThrough:class extends Qe{},Stream:Ye},et=Symbol.for(`nodejs.util.inspect.custom`),tt=Symbol.for(`nodejs.util.promisify.custom`);function nt(e){return`'${e.replace(/\\/g,`\\\\`).replace(/'/g,`\\'`).replace(/\n/g,`\\n`)}'`}function rt(e){if(e===null)return`null`;let t=typeof e;if(t===`string`)return nt(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 it(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 at(e,t,n){if(Array.isArray(e))return e.length===0?`[]`:`[ ${e.map(e=>ot(e,t+1,n)).join(`, `)} ]`;if(e instanceof Map){let r=[...e].map(([e,r])=>`${ot(e,t+1,n)} => ${ot(r,t+1,n)}`);return`Map(${e.size}) {${r.length?` ${r.join(`, `)} `:``}}`}if(e instanceof Set){let r=[...e].map(e=>ot(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:nt(r)}: ${ot(e[r],t+1,n)}`).join(`, `)} }`}function ot(e,t,n){let r=rt(e);if(r!==null)return r;let i=e,a=it(i);if(a!==null)return a;let o=i[et];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 at(i,t,n)}finally{n.seen.delete(e)}}function st(e,t={}){let n=t.depth===void 0?2:t.depth;return ot(e,0,{seen:new Set,maxDepth:n,opts:t})}function ct(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):st(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++,st(i,{depth:4});case`%O`:return n.i++,st(i,{depth:null});case`%c`:return n.i++,``;default:return e}}function lt(e,...t){let n=t[0];if(typeof n!=`string`)return t.map(e=>typeof e==`string`?e:st(e)).join(` `);let r={i:1},i=n.replace(/%[sdifjoOc%]/g,n=>ct(n,t,r,e));for(;r.i<t.length;r.i++){let e=t[r.i];i+=` ${typeof e==`string`?e:st(e)}`}return i}function ut(...e){return lt({},...e)}function dt(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 ft(e){if(typeof e!=`function`)throw TypeError(`The "original" argument must be of type function`);let t=e[tt];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 pt(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 mt=st;mt.custom=et;const ht=ft;ht.custom=tt;function gt(e){return{format:ut,formatWithOptions:lt,inspect:mt,inherits:dt,promisify:ht,deprecate:pt(e)}}const _t=gt(()=>{});let vt=1;function yt(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 bt(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 xt(e){if(e===void 0)return;if(typeof e!=`object`||!e||Array.isArray(e))throw bt(`options.env`,`object`,e);let t={};for(let[n,r]of Object.entries(e))if(r!==void 0){if(typeof r!=`string`)throw bt(`options.env[${n}]`,`string`,r);t[n]=r}return t}function St(e){if(e!==void 0){if(typeof e!=`string`)throw bt(`options.cwd`,`string`,e);return e}}function Ct(e,t){return t===void 0||t===`utf8`||t===`utf-8`?e:t===`buffer`||t===null?Ke(e):Ke(e).toString(t)}function wt(e,t){if(e.length===0)return Ct(``,t);if(typeof e[0]==`string`)return e.join(``);let n=globalThis.Buffer;return n?n.concat(e):e[0]}function Tt(e,t,n){t.length>0&&e.emit(`data`,Ct(t,n)),e.readable=!1,e.emit(`end`)}function Et(e){let t=e=>{typeof e==`function`&&queueMicrotask(e)};return{writable:!0,write(n,r,i){return e.stdin.write(yt(n)),t(typeof r==`function`?r:i),!0},end(n,r,i){n!==void 0&&typeof n!=`function`&&e.stdin.write(yt(n)),e.stdin.end(),this.writable=!1,t(typeof n==`function`?n:typeof r==`function`?r:i)}}}var Dt=class extends qe{stdout;stderr;stdin;pid;exitCode=null;signalCode=null;killed=!1;spawnfile;spawnargs;handle;constructor(e,t,n,r){super(),this.handle=e,this.pid=vt++,this.spawnfile=n,this.spawnargs=r,this.stdout=new Xe,this.stderr=new Xe,this.stdin=Et(e),e.done.then(e=>this.finish(e,t),e=>this.emit(`error`,e instanceof Error?e:Error(String(e))))}finish(e,t){Tt(this.stdout,e.stdout,t),Tt(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 Ot(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=St(e.cwd),n=xt(e.env);return{...e.input===void 0?{}:{input:yt(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=Ct(s.stdout,o),l=Ct(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:vt++})},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=vt++,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=Ct(``,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=Ct(d.stdout,c),p=Ct(d.stderr,c);return{pid:l,status:d.exitCode,signal:null,stdout:f,stderr:p,output:[null,f,p]}}}}function kt(e,t){let n=(t,n,r,i,a)=>{let o=St(n.cwd),s=xt(n.env),c={...o===void 0?{}:{cwd:o},...s===void 0?{}:{env:s}},l=e.start(t,c),u=new Dt(l,r,i,a);return n.input!==void 0&&u.stdin.write(yt(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,wt(i,t),wt(a,t))),e.once(`close`,(o,s)=>{let c=wt(i,t),l=wt(a,t);if(o===0){r(null,c,l);return}r(Object.assign(Error(`Command failed: ${n}\n${yt(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=Ot(t),d=(e,t)=>{Object.defineProperty(e,tt,{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:Dt}}function At(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var jt={exports:{}};
5
- /**
6
- * [js-md5]{@link https://github.com/emn178/js-md5}
7
- *
8
- * @namespace md5
9
- * @version 0.9.2
10
- * @author Chen, Yi-Cyuan [emn178@gmail.com]
11
- * @copyright Chen, Yi-Cyuan 2014-2026
12
- * @license MIT
13
- */
14
- (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})()})(jt);var Mt=jt.exports,Nt=At(Mt),Pt=e(((e,n)=>{
15
- /*
16
- * [js-sha1]{@link https://github.com/emn178/js-sha1}
17
- *
18
- * @version 0.7.0
19
- * @author Chen, Yi-Cyuan [emn178@gmail.com]
20
- * @copyright Chen, Yi-Cyuan 2014-2024
21
- * @license MIT
22
- */
23
- (function(){var e=`input is invalid type`,r=typeof window==`object`,i=r?window:{};i.JS_SHA1_NO_WINDOW&&(r=!1);var a=!r&&typeof self==`object`,s=!i.JS_SHA1_NO_NODE_JS&&typeof process==`object`&&process.versions&&process.versions.node;s?i=globalThis:a&&(i=self);var c=!i.JS_SHA1_NO_COMMON_JS&&typeof n==`object`&&n.exports,l=typeof define==`function`&&define.amd,u=!i.JS_SHA1_NO_ARRAY_BUFFER&&typeof ArrayBuffer<`u`,d=`0123456789abcdef`.split(``),f=[-2147483648,8388608,32768,128],p=[24,16,8,0],m=[`hex`,`array`,`digest`,`arrayBuffer`],h=[],g=Array.isArray;(i.JS_SHA1_NO_NODE_JS||!g)&&(g=function(e){return Object.prototype.toString.call(e)===`[object Array]`});var _=ArrayBuffer.isView;u&&(i.JS_SHA1_NO_ARRAY_BUFFER_IS_VIEW||!_)&&(_=function(e){return typeof e==`object`&&e.buffer&&e.buffer.constructor===ArrayBuffer});var v=function(t){var n=typeof t;if(n===`string`)return[t,!0];if(n!==`object`||t===null)throw Error(e);if(u&&t.constructor===ArrayBuffer)return[new Uint8Array(t),!1];if(!g(t)&&!_(t))throw Error(e);return[t,!1]},y=function(e){return function(t){return new w(!0).update(t)[e]()}},b=function(){var e=y(`hex`);s&&(e=x(e)),e.create=function(){return new w},e.update=function(t){return e.create().update(t)};for(var t=0;t<m.length;++t){var n=m[t];e[n]=y(n)}return e},x=function(n){var r=t(),a=o().Buffer,s=a.from&&!i.JS_SHA1_NO_BUFFER_FROM?a.from:function(e){return new a(e)};return function(t){if(typeof t==`string`)return r.createHash(`sha1`).update(t,`utf8`).digest(`hex`);if(t==null)throw Error(e);return t.constructor===ArrayBuffer&&(t=new Uint8Array(t)),g(t)||_(t)||t.constructor===a?r.createHash(`sha1`).update(s(t)).digest(`hex`):n(t)}},S=function(e){return function(t,n){return new T(t,!0).update(n)[e]()}},C=function(){var e=S(`hex`);e.create=function(e){return new T(e)},e.update=function(t,n){return e.create(t).update(n)};for(var t=0;t<m.length;++t){var n=m[t];e[n]=S(n)}return e};function w(e){e?(h[0]=h[16]=h[1]=h[2]=h[3]=h[4]=h[5]=h[6]=h[7]=h[8]=h[9]=h[10]=h[11]=h[12]=h[13]=h[14]=h[15]=0,this.blocks=h):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}w.prototype.update=function(e){if(this.finalized)throw Error(`finalize already called`);var t=v(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<<p[a++&3]:r<2048?(s[a>>>2]|=(192|r>>>6)<<p[a++&3],s[a>>>2]|=(128|r&63)<<p[a++&3]):r<55296||r>=57344?(s[a>>>2]|=(224|r>>>12)<<p[a++&3],s[a>>>2]|=(128|r>>>6&63)<<p[a++&3],s[a>>>2]|=(128|r&63)<<p[a++&3]):(r=65536+((r&1023)<<10|e.charCodeAt(++i)&1023),s[a>>>2]|=(240|r>>>18)<<p[a++&3],s[a>>>2]|=(128|r>>>12&63)<<p[a++&3],s[a>>>2]|=(128|r>>>6&63)<<p[a++&3],s[a>>>2]|=(128|r&63)<<p[a++&3]);else for(a=this.start;i<o&&a<64;++i)s[a>>>2]|=e[i]<<p[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},w.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[16]=this.block,e[t>>>2]|=f[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()}},w.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},w.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,i=this.h4;return d[e>>>28&15]+d[e>>>24&15]+d[e>>>20&15]+d[e>>>16&15]+d[e>>>12&15]+d[e>>>8&15]+d[e>>>4&15]+d[e&15]+d[t>>>28&15]+d[t>>>24&15]+d[t>>>20&15]+d[t>>>16&15]+d[t>>>12&15]+d[t>>>8&15]+d[t>>>4&15]+d[t&15]+d[n>>>28&15]+d[n>>>24&15]+d[n>>>20&15]+d[n>>>16&15]+d[n>>>12&15]+d[n>>>8&15]+d[n>>>4&15]+d[n&15]+d[r>>>28&15]+d[r>>>24&15]+d[r>>>20&15]+d[r>>>16&15]+d[r>>>12&15]+d[r>>>8&15]+d[r>>>4&15]+d[r&15]+d[i>>>28&15]+d[i>>>24&15]+d[i>>>20&15]+d[i>>>16&15]+d[i>>>12&15]+d[i>>>8&15]+d[i>>>4&15]+d[i&15]},w.prototype.toString=w.prototype.hex,w.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]},w.prototype.array=w.prototype.digest,w.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 T(e,t){var n,r=v(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 w(!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}w.call(this,t),this.update(l),this.oKeyPad=c,this.inner=!0,this.sharedMemory=t}T.prototype=new w,T.prototype.finalize=function(){if(w.prototype.finalize.call(this),this.inner){this.inner=!1;var e=this.array();w.call(this,this.sharedMemory),this.update(this.oKeyPad),this.update(e),w.prototype.finalize.call(this)}};var E=b();E.sha1=E,E.sha1.hmac=C(),c?n.exports=E:(i.sha1=E,l&&define(function(){return E}))})()}))();const Ft=65536,It={md5:Nt,sha1:Pt.sha1,sha256:a};function Lt(e,t){return typeof e==`string`?t===`hex`||t===`base64`||t===`base64url`||t===`latin1`||t===`binary`?new Uint8Array(Ke(e,t===`binary`?`latin1`:t)):e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}function Rt(e){let t=String(e).toLowerCase().replace(`-`,``),n=It[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(Lt(e,t)),a},digest(e){i=!0;let t=Ke(r.array());return e?t.toString(e):t}};return a}function zt(){let e=globalThis.crypto;if(!e||typeof e.getRandomValues!=`function`)throw Error(`crypto: globalThis.crypto is unavailable in this environment`);return e}function Bt(e){return zt().getRandomValues(e)}function Vt(e){for(let t=0;t<e.length;t+=Ft){let n=Math.min(t+Ft,e.length);Bt(e.subarray(t,n))}}function Ht(e){return e instanceof Uint8Array?e:new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}const F=Array.from({length:256},(e,t)=>(t+256).toString(16).slice(1));function Ut(){let e=zt();if(typeof e.randomUUID==`function`)return e.randomUUID();let t=Bt(new Uint8Array(16));return t[6]=t[6]&15|64,t[8]=t[8]&63|128,`${F[t[0]]}${F[t[1]]}${F[t[2]]}${F[t[3]]}-${F[t[4]]}${F[t[5]]}-${F[t[6]]}${F[t[7]]}-${F[t[8]]}${F[t[9]]}-${F[t[10]]}${F[t[11]]}${F[t[12]]}${F[t[13]]}${F[t[14]]}${F[t[15]]}`}const Wt={randomFillSync(e,t=0,n){let r=Ht(e),i=t,a=n===void 0?r.length:i+n;return Vt(r.subarray(i,a)),e},randomBytes(e){let t=globalThis.Buffer,n=t&&typeof t.allocUnsafe==`function`?t.allocUnsafe(e):new Uint8Array(e);return Vt(Ht(n)),n},randomUUID:Ut,getRandomValues(e){return Bt(e)},createHash:Rt,get webcrypto(){return zt()},get subtle(){return zt().subtle}};function Gt(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 Kt(e){if(e.length===0)return`.`;let t=e.charCodeAt(0)===47,n=e.charCodeAt(e.length-1)===47,r=Gt(e.split(`/`),!t).join(`/`);return r.length===0&&!t&&(r=`.`),r.length>0&&n&&(r+=`/`),(t?`/`:``)+r}function qt(...e){let t=e.filter(e=>typeof e==`string`&&e.length>0).join(`/`);return t.length===0?`.`:Kt(t)}function Jt(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 Yt(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 Xt(e){let t=Yt(e),n=t.lastIndexOf(`.`);return n<=0?``:t.slice(n)}function Zt(){let e=globalThis.process?.cwd?.();return typeof e==`string`&&e.length>0?e:`/`}function Qt(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=Gt(n.split(`/`),!r).join(`/`);return r?i.length>0?`/${i}`:`/`:i.length>0?i:`.`}function $t(e,t,n){let r=Qt(e,[t]),i=Qt(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 en(e){let t=e.charCodeAt(0)===47?`/`:``,n=Yt(e),r=Xt(e),i=r?n.slice(0,n.length-r.length):n,a=Jt(e);return a===`.`&&t===``&&(a=``),{root:t,dir:a,base:n,ext:r,name:i}}function tn(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 nn(e=Zt){return{sep:`/`,delimiter:`:`,basename:Yt,dirname:Jt,extname:Xt,isAbsolute:e=>e.length>0&&e.charCodeAt(0)===47,join:qt,normalize:Kt,resolve:(...t)=>Qt(e,t),relative:(t,n)=>$t(e,t,n),parse:en,format:tn}}const rn=nn();function an(e){let t=typeof e==`string`?e:e.href;if(!t.startsWith(`file://`))throw TypeError(`fileURLToPath: not a file URL`);let n=t.slice(7);return decodeURIComponent(n)}function on(e){let t=e.split(`/`).map(e=>encodeURIComponent(e)).join(`/`);return new URL(`file://${t}`)}const sn={URL:globalThis.URL,URLSearchParams:globalThis.URLSearchParams,fileURLToPath:an,pathToFileURL:on},cn=Object.freeze([...l]);function ln(e){return typeof e==`string`&&c(e)}function un(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 dn(e){if(e instanceof URL)return sn.fileURLToPath(e);if(typeof e==`string`){if(e.startsWith(`file:`))return sn.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 fn(e,t){let n=t.startsWith(`/`)?rn.normalize(t):rn.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 pn(e,t,n){for(let r of fn(e,t))if(n(r))return r}function mn(e,t,n){for(let r of un(e)){let e=pn(r,t,n);if(e)return e}}function hn(e){return e.startsWith(`.`)||e.startsWith(`/`)}function gn(e){function t(e){return{exports:{},id:e??``,filename:e??``,loaded:!1}}let n=t;return n.createRequire=t=>_n(e,t),n.builtinModules=cn,n.isBuiltin=ln,n._nodeModulePaths=un,n.Module=n,n}function _n(e,t){let n=dn(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(vn(i),t)}catch(e){n=e}throw n instanceof Error?n:Error(`Cannot find module '${t}'`)}return e.resolveFrom(n,t)},r}function vn(e){return`${e.endsWith(`/`)&&e!==`/`?e.slice(0,-1):e}/noop.js`}const yn={platform:()=>`linux`,arch:()=>`x64`,EOL:`
24
- `,cpus:()=>[{model:`virtual`,speed:0}],hostname:()=>`slicc`,type:()=>`Linux`,release:()=>`0.0.0`};function bn(e){return{...yn,tmpdir:()=>T(e),homedir:()=>e?.HOME?.trim()?e.HOME:`/home/user`}}const xn=bn(),Sn={isatty:e=>!1,ReadStream:class{},WriteStream:class{}};var Cn=4,wn=0,Tn=1,En=2;function Dn(e){let t=e.length;for(;--t>=0;)e[t]=0}var On=29,kn=256,An=286,jn=30,Mn=19,Nn=573,Pn=15,Fn=16,In=7,Ln=256,Rn=16,zn=17,Bn=18,Vn=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]),Hn=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]),Un=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),Wn=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Gn=512,I=Array(576);Dn(I);var Kn=Array(jn*2);Dn(Kn);var qn=Array(Gn);Dn(qn);var Jn=Array(256);Dn(Jn);var Yn=Array(On);Dn(Yn);var Xn=Array(jn);Dn(Xn);var Zn=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}},Qn,$n,er,tr=class{constructor(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}},nr=e=>e<256?qn[e]:qn[256+(e>>>7)],rr=(e,t)=>{e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255},L=(e,t,n)=>{e.bi_valid>Fn-n?(e.bi_buf|=t<<e.bi_valid&65535,rr(e,e.bi_buf),e.bi_buf=t>>Fn-e.bi_valid,e.bi_valid+=n-Fn):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)},R=(e,t,n)=>{L(e,n[t*2],n[t*2+1])},ir=(e,t)=>{let n=0;do n|=e&1,e>>>=1,n<<=1;while(--t>0);return n>>>1},ar=e=>{e.bi_valid===16?(rr(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)},or=(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<=Pn;f++)e.bl_count[f]=0;for(n[e.heap[e.heap_max]*2+1]=0,l=e.heap_max+1;l<Nn;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--)}},sr=(e,t,n)=>{let r=Array(16),i=0,a,o;for(a=1;a<=Pn;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]=ir(r[t]++,t))}},cr=()=>{let e,t,n,r,i,a=Array(16);for(n=0,r=0;r<On-1;r++)for(Yn[r]=n,e=0;e<1<<Vn[r];e++)Jn[n++]=r;for(Jn[n-1]=r,i=0,r=0;r<16;r++)for(Xn[r]=i,e=0;e<1<<Hn[r];e++)qn[i++]=r;for(i>>=7;r<jn;r++)for(Xn[r]=i<<7,e=0;e<1<<Hn[r]-7;e++)qn[256+i++]=r;for(t=0;t<=Pn;t++)a[t]=0;for(e=0;e<=143;)I[e*2+1]=8,e++,a[8]++;for(;e<=255;)I[e*2+1]=9,e++,a[9]++;for(;e<=279;)I[e*2+1]=7,e++,a[7]++;for(;e<=287;)I[e*2+1]=8,e++,a[8]++;for(sr(I,287,a),e=0;e<jn;e++)Kn[e*2+1]=5,Kn[e*2]=ir(e,5);Qn=new Zn(I,Vn,257,An,Pn),$n=new Zn(Kn,Hn,0,jn,Pn),er=new Zn([],Un,0,Mn,In)},lr=e=>{let t;for(t=0;t<An;t++)e.dyn_ltree[t*2]=0;for(t=0;t<jn;t++)e.dyn_dtree[t*2]=0;for(t=0;t<Mn;t++)e.bl_tree[t*2]=0;e.dyn_ltree[Ln*2]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},ur=e=>{e.bi_valid>8?rr(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},dr=(e,t,n,r)=>{let i=t*2,a=n*2;return e[i]<e[a]||e[i]===e[a]&&r[t]<=r[n]},fr=(e,t,n)=>{let r=e.heap[n],i=n<<1;for(;i<=e.heap_len&&(i<e.heap_len&&dr(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!dr(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r},pr=(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?R(e,i,t):(o=Jn[i],R(e,o+kn+1,t),s=Vn[o],s!==0&&(i-=Yn[o],L(e,i,s)),r--,o=nr(r),R(e,o,n),s=Hn[o],s!==0&&(r-=Xn[o],L(e,r,s)));while(a<e.sym_next);R(e,Ln,t)},mr=(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=Nn,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--)fr(e,n,o);l=a;do o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],fr(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++,fr(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],or(e,t),sr(n,c,e.bl_count)},hr=(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))},gr=(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 R(e,a,e.bl_tree);while(--s!==0);else a===0?s<=10?(R(e,zn,e.bl_tree),L(e,s-3,3)):(R(e,Bn,e.bl_tree),L(e,s-11,7)):(a!==i&&(R(e,a,e.bl_tree),s--),R(e,Rn,e.bl_tree),L(e,s-3,2));s=0,i=a,o===0?(c=138,l=3):a===o?(c=6,l=3):(c=7,l=4)}},_r=e=>{let t;for(hr(e,e.dyn_ltree,e.l_desc.max_code),hr(e,e.dyn_dtree,e.d_desc.max_code),mr(e,e.bl_desc),t=18;t>=3&&e.bl_tree[Wn[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t},vr=(e,t,n,r)=>{let i;for(L(e,t-257,5),L(e,n-1,5),L(e,r-4,4),i=0;i<r;i++)L(e,e.bl_tree[Wn[i]*2+1],3);gr(e,e.dyn_ltree,t-1),gr(e,e.dyn_dtree,n-1)},yr=e=>{let t=4093624447,n;for(n=0;n<=31;n++,t>>>=1)if(t&1&&e.dyn_ltree[n*2]!==0)return wn;if(e.dyn_ltree[18]!==0||e.dyn_ltree[20]!==0||e.dyn_ltree[26]!==0)return Tn;for(n=32;n<kn;n++)if(e.dyn_ltree[n*2]!==0)return Tn;return wn},br=!1,xr=e=>{br||=(cr(),!0),e.l_desc=new tr(e.dyn_ltree,Qn),e.d_desc=new tr(e.dyn_dtree,$n),e.bl_desc=new tr(e.bl_tree,er),e.bi_buf=0,e.bi_valid=0,lr(e)},Sr=(e,t,n,r)=>{L(e,0+ +!!r,3),ur(e),rr(e,n),rr(e,~n),n&&e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n},Cr=e=>{L(e,2,3),R(e,Ln,I),ar(e)},wr=(e,t,n,r)=>{let i,a,o=0;e.level>0?(e.strm.data_type===En&&(e.strm.data_type=yr(e)),mr(e,e.l_desc),mr(e,e.d_desc),o=_r(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?Sr(e,t,n,r):e.strategy===Cn||a===i?(L(e,2+ +!!r,3),pr(e,I,Kn)):(L(e,4+ +!!r,3),vr(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),pr(e,e.dyn_ltree,e.dyn_dtree)),lr(e),r&&ur(e)},z=(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[(Jn[n]+kn+1)*2]++,e.dyn_dtree[nr(t)*2]++),e.sym_next===e.sym_end),Tr=(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},Er=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})()),B=(e,t,n,r)=>{let i=Er,a=r+n;e^=-1;for(let n=r;n<a;n++)e=e>>>8^i[(e^t[n])&255];return e^-1},V={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`},Dr=9,Or=573,H=3,U=258,W=262,kr=32,Ar=42,jr=57,Mr=69,Nr=73,Pr=91,Fr=103,Ir=113,Lr=666,G=1,Rr=2,zr=3,Br=4,Vr=3,Hr=(e,t)=>(e.msg=V[t],t),Ur=e=>e*2-(e>4?9:0),K=e=>{let t=e.length;for(;--t>=0;)e[t]=0},Wr=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)},Gr=(e,t,n)=>(t<<e.hash_shift^n)&e.hash_mask,Kr=(e,t)=>{let n;if(e.legacy_hash)n=e.ins_h=Gr(e,e.ins_h,e.window[t+H-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)=>{wr(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},qr=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255},Jr=(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=Tr(e.adler,t,i,n):e.state.wrap===2&&(e.adler=B(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)},Yr=(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-W?e.strstart-(e.w_size-W):0,l=e.window,u=e.w_mask,d=e.prev,f=e.strstart+U,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=U-(f-r),r=f-U,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},Xr=e=>{let t=e.w_size,n,r,i;do{if(r=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-W)&&(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),Wr(e),r+=t),e.strm.avail_in===0)break;if(n=Jr(e.strm,e.window,e.strstart+e.lookahead,r),e.lookahead+=n,!e.legacy_hash){if(e.lookahead+e.insert>H)for(i=e.strstart-e.insert;e.insert&&(Kr(e,i),i++,e.insert--,!(e.lookahead+e.insert<=H)););}else if(e.lookahead+e.insert>=H)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=Gr(e,e.ins_h,e.window[i+1]);e.insert&&(Kr(e,i),i++,e.insert--,!(e.lookahead+e.insert<H)););}while(e.lookahead<W&&e.strm.avail_in!==0)},Zr=(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),Sr(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&&(Jr(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?Br:t!==0&&t!==4&&e.strm.avail_in===0&&e.strstart===e.block_start?Rr:(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&&(Jr(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),Sr(e,e.block_start,r,o),e.block_start+=r,q(e.strm)),o?zr:G)},Qr=(e,t)=>{let n,r;for(;;){if(e.lookahead<W){if(Xr(e),e.lookahead<W&&t===0)return G;if(e.lookahead===0)break}if(n=0,e.lookahead>=H&&(n=Kr(e,e.strstart)),n!==0&&e.strstart-n<=e.w_size-W&&(e.match_length=Yr(e,n)),e.match_length>=H){if(r=z(e,e.strstart-e.match_start,e.match_length-H),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=H){e.match_length--;do e.strstart++,n=Kr(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=Gr(e,e.ins_h,e.window[e.strstart+1]))}else r=z(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(J(e,!1),e.strm.avail_out===0))return G}return e.insert=e.strstart<H-1?e.strstart:H-1,t===4?(J(e,!0),e.strm.avail_out===0?zr:Br):e.sym_next&&(J(e,!1),e.strm.avail_out===0)?G:Rr},$r=(e,t)=>{let n,r,i;for(;;){if(e.lookahead<W){if(Xr(e),e.lookahead<W&&t===0)return G;if(e.lookahead===0)break}if(n=0,e.lookahead>=H&&(n=Kr(e,e.strstart)),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=H-1,n!==0&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-W&&(e.match_length=Yr(e,n),e.match_length<=5&&(e.strategy===1||e.match_length===H&&e.strstart-e.match_start>4096)&&(e.match_length=H-1)),e.prev_length>=H&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-H,r=z(e,e.strstart-1-e.prev_match,e.prev_length-H),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(n=Kr(e,e.strstart));while(--e.prev_length!==0);if(e.match_available=0,e.match_length=H-1,e.strstart++,r&&(J(e,!1),e.strm.avail_out===0))return G}else if(e.match_available){if(r=z(e,0,e.window[e.strstart-1]),r&&J(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return G}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&=(r=z(e,0,e.window[e.strstart-1]),0),e.insert=e.strstart<H-1?e.strstart:H-1,t===4?(J(e,!0),e.strm.avail_out===0?zr:Br):e.sym_next&&(J(e,!1),e.strm.avail_out===0)?G:Rr},ei=(e,t)=>{let n,r,i,a,o=e.window;for(;;){if(e.lookahead<=U){if(Xr(e),e.lookahead<=U&&t===0)return G;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=H&&e.strstart>0&&(i=e.strstart-1,r=o[i],r===o[++i]&&r===o[++i]&&r===o[++i])){a=e.strstart+U;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=U-(a-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=H?(n=z(e,1,e.match_length-H),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=z(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(J(e,!1),e.strm.avail_out===0))return G}return e.insert=0,t===4?(J(e,!0),e.strm.avail_out===0?zr:Br):e.sym_next&&(J(e,!1),e.strm.avail_out===0)?G:Rr},ti=(e,t)=>{let n;for(;;){if(e.lookahead===0&&(Xr(e),e.lookahead===0)){if(t===0)return G;break}if(e.match_length=0,n=z(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(J(e,!1),e.strm.avail_out===0))return G}return e.insert=0,t===4?(J(e,!0),e.strm.avail_out===0?zr:Br):e.sym_next&&(J(e,!1),e.strm.avail_out===0)?G:Rr},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}},ni=[new X(0,0,0,0,Zr),new X(4,4,8,4,Qr),new X(4,5,16,8,Qr),new X(4,6,32,32,Qr),new X(4,4,16,16,$r),new X(8,16,32,32,$r),new X(8,16,128,128,$r),new X(8,32,128,256,$r),new X(32,128,258,1024,$r),new X(32,258,258,4096,$r)],ri=e=>{e.window_size=2*e.w_size,K(e.head),e.max_lazy_match=ni[e.level].max_lazy,e.good_match=ni[e.level].good_length,e.nice_match=ni[e.level].nice_length,e.max_chain_length=ni[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=H-1,e.match_available=0,e.ins_h=0},ii=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(Or*2),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),K(this.dyn_ltree),K(this.dyn_dtree),K(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),K(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),K(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}},ai=e=>{if(!e)return 1;let t=e.state;return+(!t||t.strm!==e||t.status!==Ar&&t.status!==jr&&t.status!==Mr&&t.status!==Nr&&t.status!==Pr&&t.status!==Fr&&t.status!==Ir&&t.status!==Lr)},oi=e=>{if(ai(e))return Hr(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?jr:t.wrap?Ar:Ir,e.adler=t.wrap===2?0:1,t.last_flush=-2,xr(t),0},si=e=>{let t=oi(e);return t===0&&ri(e.state),t},ci=(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>Dr||n!==8||r<8||r>15||t<0||t>9||a<0||a>4||r===8&&s!==1)return Hr(e,-2);r===8&&(r=9);let c=new ii;return e.state=c,c.strm=e,c.status=Ar,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+H-1)/H),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,si(e)},li=(e,t)=>{if(ai(e)||t>5||t<0)return e?Hr(e,-2):-2;let n=e.state;if(!e.output||e.avail_in!==0&&!e.input||n.status===Lr&&t!==4)return Hr(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&&Ur(t)<=Ur(r)&&t!==4)return Hr(e,-5);if(n.status===Lr&&e.avail_in!==0)return Hr(e,-5);if(n.status===Ar&&n.wrap===0&&(n.status=Ir),n.status===Ar){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|=kr),t+=31-t%31,qr(n,t),n.strstart!==0&&(qr(n,e.adler>>>16),qr(n,e.adler&65535)),e.adler=1,n.status=Ir,q(e),n.pending!==0)return n.last_flush=-1,0}if(n.status===jr){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=B(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=Mr;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,Vr),n.status=Ir,q(e),n.pending!==0)return n.last_flush=-1,0}if(n.status===Mr){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=B(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=B(e.adler,n.pending_buf,n.pending-t,t)),n.gzindex=0}n.status=Nr}if(n.status===Nr){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=B(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=B(e.adler,n.pending_buf,n.pending-t,t)),n.gzindex=0}n.status=Pr}if(n.status===Pr){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=B(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=B(e.adler,n.pending_buf,n.pending-t,t))}n.status=Fr}if(n.status===Fr){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=Ir,q(e),n.pending!==0)return n.last_flush=-1,0}if(e.avail_in!==0||n.lookahead!==0||t!==0&&n.status!==Lr){let r=n.level===0?Zr(n,t):n.strategy===2?ti(n,t):n.strategy===3?ei(n,t):ni[n.level].func(n,t);if((r===zr||r===Br)&&(n.status=Lr),r===G||r===zr)return e.avail_out===0&&(n.last_flush=-1),0;if(r===Rr&&(t===1?Cr(n):t!==5&&(Sr(n,0,0,!1),t===3&&(K(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)):(qr(n,e.adler>>>16),qr(n,e.adler&65535)),q(e),n.wrap>0&&(n.wrap=-n.wrap),+(n.pending===0)):0},ui=e=>{if(ai(e))return-2;let t=e.state.status;return e.state=null,t===Ir?Hr(e,-3):0},di=(e,t)=>{let n=t.length;if(ai(e))return-2;let r=e.state,i=r.wrap;if(i===2||i===1&&r.status!==Ar||r.lookahead)return-2;if(i===1&&(e.adler=Tr(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){i===0&&(K(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,Xr(r);r.lookahead>=H;){let e=r.strstart,t=r.lookahead-(H-1);do Kr(r,e),e++;while(--t);r.strstart=e,r.lookahead=H-1,Xr(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=H-1,r.match_available=0,e.next_in=o,e.input=s,e.avail_in=a,r.wrap=i,0},fi=16209,pi=16191;function mi(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=fi;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=fi;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=fi;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=pi;break top}else{e.msg=`invalid literal/length code`,E.mode=fi;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 hi=15,gi=852,_i=592,vi=0,yi=1,bi=2,xi=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]),Si=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]),Ci=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]),wi=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]),Ti=(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<=hi;l++)E[l]=0;for(u=0;u<r;u++)E[t[n+u]]++;for(p=c,f=hi;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<=hi;l++)if(g<<=1,g-=E[l],g<0)return-1;if(g>0&&(e===vi||f!==1))return-1;for(D[1]=0,l=1;l<hi;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===vi?(w=O=o,T=20):e===yi?(w=xi,O=Si,T=257):(w=Ci,O=wi,T=0),v=0,u=0,l=d,C=a,m=p,h=0,x=-1,_=1<<p,S=_-1,e===yi&&_>gi||e===bi&&_>_i)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===yi&&_>gi||e===bi&&_>_i)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},Ei=0,Di=1,Oi=2,ki=16180,Ai=16181,ji=16182,Mi=16183,Ni=16184,Pi=16185,Fi=16186,Ii=16187,Li=16188,Ri=16189,zi=16190,Z=16191,Bi=16192,Vi=16193,Hi=16194,Ui=16195,Wi=16196,Gi=16197,Ki=16198,qi=16199,Ji=16200,Yi=16201,Xi=16202,Zi=16203,Qi=16204,$i=16205,ea=16206,ta=16207,na=16208,Q=16209,ra=16210,ia=16211,aa=852,oa=592,sa=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24),ca=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}},la=e=>{if(!e)return 1;let t=e.state;return+(!t||t.strm!==e||t.mode<ki||t.mode>ia)},ua=e=>{if(la(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=ki,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(aa),t.distcode=t.distdyn=new Int32Array(oa),t.sane=1,t.back=-1,0},da=e=>{if(la(e))return-2;let t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,ua(e)},fa=(e,t)=>{let n;if(la(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,da(e))},pa=(e,t)=>{if(!e)return-2;let n=new ca;e.state=n,n.strm=e,n.window=null,n.mode=ki;let r=fa(e,t);return r!==0&&(e.state=null),r},ma=!0,ha,ga,_a=e=>{if(ma){ha=new Int32Array(512),ga=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(Ti(Di,e.lens,0,288,ha,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Ti(Oi,e.lens,0,32,ga,0,e.work,{bits:5}),ma=!1}e.lencode=ha,e.lenbits=9,e.distcode=ga,e.distbits=5},va=(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},ya=(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(la(e)||!e.output||!e.input&&e.avail_in!==0)return-2;n=e.state,n.mode===Z&&(n.mode=Bi),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 ki:if(n.wrap===0){n.mode=Bi;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=B(n.check,T,2,0),l=0,u=0,n.mode=Ai;break}if(n.head&&(n.head.done=!1),!(n.wrap&1)||(((l&255)<<8)+(l>>8))%31){e.msg=`incorrect header check`,n.mode=Q;break}if((l&15)!=8){e.msg=`unknown compression method`,n.mode=Q;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=Q;break}n.dmax=1<<n.wbits,n.flags=0,e.adler=n.check=1,n.mode=l&512?Ri:Z,l=0,u=0;break;case Ai: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=Q;break}if(n.flags&57344){e.msg=`unknown header flags set`,n.mode=Q;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=B(n.check,T,2,0)),l=0,u=0,n.mode=ji;case ji: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=B(n.check,T,4,0)),l=0,u=0,n.mode=Mi;case Mi: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=B(n.check,T,2,0)),l=0,u=0,n.mode=Ni;case Ni: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=B(n.check,T,2,0)),l=0,u=0}else n.head&&(n.head.extra=null);n.mode=Pi;case Pi: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=B(n.check,r,p,a)),s-=p,a+=p,n.length-=p),n.length))break inf_leave;n.length=0,n.mode=Fi;case Fi: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=B(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=Ii;case Ii: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=B(n.check,r,p,a)),s-=p,a+=p,C)break inf_leave}else n.head&&(n.head.comment=null);n.mode=Li;case Li: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=Q;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=Z;break;case Ri:for(;u<32;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}e.adler=n.check=sa(l),l=0,u=0,n.mode=zi;case zi: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=Z;case Z:if(t===5||t===6)break inf_leave;case Bi:if(n.last){l>>>=u&7,u-=u&7,n.mode=ea;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=Vi;break;case 1:if(_a(n),n.mode=qi,t===6){l>>>=2,u-=2;break inf_leave}break;case 2:n.mode=Wi;break;case 3:e.msg=`invalid block type`,n.mode=Q}l>>>=2,u-=2;break;case Vi: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=Q;break}if(n.length=l&65535,l=0,u=0,n.mode=Hi,t===6)break inf_leave;case Hi:n.mode=Ui;case Ui: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=Z;break;case Wi: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=Q;break}n.have=0,n.mode=Gi;case Gi: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=Ti(Ei,n.lens,0,19,n.lencode,0,n.work,E),n.lenbits=E.bits,w){e.msg=`invalid code lengths set`,n.mode=Q;break}n.have=0,n.mode=Ki;case Ki: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=Q;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=Q;break}for(;p--;)n.lens[n.have++]=C}}if(n.mode===Q)break;if(n.lens[256]===0){e.msg=`invalid code -- missing end-of-block`,n.mode=Q;break}if(n.lenbits=9,E={bits:n.lenbits},w=Ti(Di,n.lens,0,n.nlen,n.lencode,0,n.work,E),n.lenbits=E.bits,w){e.msg=`invalid literal/lengths set`,n.mode=Q;break}if(n.distbits=6,n.distcode=n.distdyn,E={bits:n.distbits},w=Ti(Oi,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,E),n.distbits=E.bits,w){e.msg=`invalid distances set`,n.mode=Q;break}if(n.mode=qi,t===6)break inf_leave;case qi:n.mode=Ji;case Ji: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,mi(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===Z&&(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=$i;break}if(v&32){n.back=-1,n.mode=Z;break}if(v&64){e.msg=`invalid literal/length code`,n.mode=Q;break}n.extra=v&15,n.mode=Yi;case Yi: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=Xi;case Xi: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=Q;break}n.offset=y,n.extra=v&15,n.mode=Zi;case Zi: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=Q;break}n.mode=Qi;case Qi: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=Q;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=Ji);break;case $i:if(c===0)break inf_leave;i[o++]=n.length,c--,n.mode=Ji;break;case ea: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?B(n.check,i,f,o-f):Tr(n.check,i,f,o-f)),f=c,n.wrap&4&&(n.flags?l:sa(l))!==n.check){e.msg=`incorrect data check`,n.mode=Q;break}l=0,u=0}n.mode=ta;case ta: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=Q;break}l=0,u=0}n.mode=na;case na:w=1;break inf_leave;case Q:w=-3;break inf_leave;case ra:return-4;case ia: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<Q&&(n.mode<ea||t!==4))&&va(e,e.output,e.next_out,f-e.avail_out)?(n.mode=ra,-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?B(n.check,i,f,e.next_out-f):Tr(n.check,i,f,e.next_out-f)),e.data_type=n.bits+(n.last?64:0)+(n.mode===Z?128:0)+(n.mode===qi||n.mode===Hi?256:0),(d===0&&f===0||t===4)&&w===0&&(w=-5),w)},ba=e=>{if(la(e))return-2;let t=e.state;return t.window&&=null,e.state=null,0},xa=(e,t)=>{let n=t.length,r,i,a;return la(e)||(r=e.state,r.wrap!==0&&r.mode!==zi)?-2:r.mode===zi&&(i=1,i=Tr(i,t,n,0),i!==r.check)?-3:(a=va(e,t,n,n),a?(r.mode=ra,-4):(r.havedict=1,0))},Sa=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}},Ca=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},wa=Object.prototype.toString,Ta={level:-1,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,raw:!1,gzip:!1,legacyHash:!1,dictionary:new Uint8Array},Ea=class{options;err;msg;ended;started;chunks;strm;result;constructor(e={}){this.options=Object.assign({},Ta,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 Sa,this.strm.avail_out=0;let n=ci(this.strm,t.level,8,t.windowBits,t.memLevel,t.strategy,t.legacyHash);if(n!==0)throw Error(V[n]);wa.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=di(this.strm,r),n!==0)throw Error(V[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):wa.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=li(n,a),i===-2)break;if(i===1){n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),i=ui(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||V[i],this.ended=!0,this.onEnd(i),i===0}onStart(e){}onData(e){this.chunks.push(e)}onEnd(e){e===0&&(this.result=Ca(this.chunks)),this.chunks=[]}};function Da(e,t={}){let n=new Ea(t);if(n.push(e,!0),n.err)throw Error(n.msg);return n.result}function Oa(e,t={}){return Da(e,Object.assign({},t,{raw:!0}))}function ka(e,t={}){return Da(e,Object.assign({},t,{gzip:!0}))}var Aa=Object.prototype.toString,ja={chunkSize:65536,windowBits:15,raw:!1,dictionary:new Uint8Array},Ma=class{options;err;msg;ended;started;chunks;strm;result;constructor(e={}){this.options=Object.assign({},ja,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 Sa,this.strm.avail_out=0;let n=pa(this.strm,t.windowBits);if(n!==0)throw Error(V[n]);Aa.call(t.dictionary)===`[object ArrayBuffer]`&&(t.dictionary=new Uint8Array(t.dictionary));let r=t.dictionary;if(t.raw&&r.length&&(n=xa(this.strm,r),n!==0))throw Error(V[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=Aa.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=ya(n,a),i===2){let e=this.options.dictionary;e.length&&(i=xa(n,e),i===0?i=ya(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;)da(n),i=ya(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=ba(this.strm);break}if(n.avail_in===0){if(a===4){i=ba(this.strm),i===0&&(i=-5);break}return!0}}}return this.err=i,this.msg=n.msg||V[i],this.ended=!0,this.onEnd(i),i===0}onStart(e){}onData(e){this.chunks.push(e)}onEnd(e){e===0&&(this.result=Ca(this.chunks)),this.chunks=[]}};function Na(e,t={}){let n=new Ma(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 Pa(e,t={}){return Na(e,{...t,raw:!0})}function Fa(e){return typeof e==`string`?new Uint8Array(Ke(e,`utf8`)):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}function Ia(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 La(e,t,n){return Ke(e(Fa(t),Ia(n)))}function Ra(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=La(e,t,a)}catch(e){queueMicrotask(()=>i(e instanceof Error?e:Error(String(e))));return}queueMicrotask(()=>i(null,o))}const za={gzipSync:(e,t)=>La(ka,e,t),gunzipSync:(e,t)=>La(Na,e,t),deflateSync:(e,t)=>La(Da,e,t),inflateSync:(e,t)=>La(Na,e,t),deflateRawSync:(e,t)=>La(Oa,e,t),inflateRawSync:(e,t)=>La(Pa,e,t),gzip:(e,t,n)=>Ra(ka,e,t,n),gunzip:(e,t,n)=>Ra(Na,e,t,n),deflate:(e,t,n)=>Ra(Da,e,t,n),inflate:(e,t,n)=>Ra(Na,e,t,n),deflateRaw:(e,t,n)=>Ra(Oa,e,t,n),inflateRaw:(e,t,n)=>Ra(Pa,e,t,n),constants:{Z_NO_FLUSH:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1}};function Ba(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 Va(e){let t=[...e];return Object.defineProperty(t,"parseFlags",{value:()=>Ba(t),enumerable:!1,writable:!1,configurable:!1}),t}const Ha=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},Ua={ms:1,s:1e3,m:6e4,h:36e5,d:864e5,w:6048e5,M:26298e5,y:315576e5};function Wa(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*Ua[i])}function Ga(e){return e<10?`0${e}`:String(e)}const Ka={parseDuration:Wa,ago(e,t=new Date){return new Date(t.getTime()-Wa(e))},range(e,t=new Date){let n=new Date(t.getTime());return{start:new Date(n.getTime()-Wa(e)),end:n}},future(e,t=new Date){let n=new Date(t.getTime());return{start:n,end:new Date(n.getTime()+Wa(e))}},gmailDate(e,t=new Date){let n=new Date(t.getTime()-Wa(e));return`${n.getFullYear()}/${Ga(n.getMonth()+1)}/${Ga(n.getDate())}`}};function qa(e){if(!e)return``;let t=e.lastIndexOf(`/`);return t<0?``:t===0?`/`:e.substring(0,t)}var Ja=class extends Error{code;constructor(e){super(`Process exited with code ${e}`),this.code=e,this.name=`NodeExitError`}};function Ya(e){let t=Number(e);return Number.isFinite(t)?t:0}function Xa(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 Za(e){let t=TypeError(`The "code" argument must be of type number. Received ${Xa(e)}`);return t.code=`ERR_INVALID_ARG_TYPE`,t}function Qa(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 $a(e){if(e!=null){if(typeof e==`string`){let t=Number(e);if(e!==``&&Number.isInteger(t))return t===0?0:t;throw Za(e)}if(typeof e==`number`){if(Number.isInteger(e))return e===0?0:e;throw Qa(e)}throw Za(e)}}function eo(e){if(typeof e==`string`)return e;if(e==null)return String(e);try{return JSON.stringify(e)}catch{return String(e)}}function to(e){return`${e.map(eo).join(` `)}\n`}function no(e){return e===void 0?`default`:String(e)}function ro(){return typeof performance<`u`?performance.now():Date.now()}function io(e){return`${e.toFixed(3)}ms`}function ao(e,t,n){let r=to(n);e(t>0?`${` `.repeat(t)}${r}`:r)}function oo(e,t,n){if(t)return;if(n.length===0){e(`Assertion failed`);return}let[r,...i]=n;e(`Assertion failed: ${eo(r)}`,...i)}function so(e,t,n,r){e(r.length>0?`Trace: ${r.map(eo).join(` `)}`:`Trace:`);let i=Error().stack;if(!i)return;let a=i.split(`
25
- `).slice(3).join(`
26
- `);if(!a)return;let o=a.endsWith(`
27
- `)?a:`${a}\n`;t(n>0?`${` `.repeat(n)}${o}`:o)}function co(e,t,n){let r=no(n);if(e.has(r)){t(`Label '${r}' already exists for console.time()`);return}e.set(r,ro())}function lo(e,t,n,r){let i=no(r),a=e.get(i);if(a===void 0){t(`No such label '${i}' for console.timeEnd()`);return}e.delete(i),n(`${i}: ${io(ro()-a)}`)}function uo(e,t,n,r,i){let a=no(r),o=e.get(a);if(o===void 0){t(`No such label '${a}' for console.timeLog()`);return}let s=`${a}: ${io(ro()-o)}`;i.length===0?n(s):n(s,...i)}function fo(e,t,n){let r=no(n),i=(e.get(r)??0)+1;e.set(r,i),t(`${r}: ${i}`)}function po(e,t,n){let r=no(n);if(!e.has(r)){t(`Count for '${r}' does not exist`);return}e.set(r,0)}function mo(e,t,n){n.length>0&&t(...n),e.depth+=1}function ho(e){e.depth>0&&--e.depth}function go(e,t){let n=new Map,r=new Map,i={depth:0},a=(...t)=>ao(e,i.depth,t),o=(...e)=>ao(t,i.depth,e),s=(...e)=>mo(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:()=>ho(i),assert:(e,...t)=>oo(o,e,t),trace:(...e)=>so(o,t,i.depth,e),time:e=>co(r,o,e),timeEnd:e=>lo(r,o,a,e),timeLog:(e,...t)=>uo(r,o,a,e,t),count:e=>fo(n,a,e),countReset:e=>po(n,o,e)}}function _o(e,t,n){let r=!!e.env?.NO_COLOR,i=!1,a,o,c=e=>{i=!0,o=e,a=e},l=yo(e.stdin??``,c),u=Va(e.argv),d={write:t,end:()=>void 0,isTTY:!r},f={write:n,end:()=>void 0,isTTY:!r};return{processShim:{argv:u,env:e.env,versions:{node:s},version:`v${s}`,platform:`linux`,arch:`x64`,cwd:()=>e.cwd,get exitCode(){return a},set exitCode(e){a=$a(e)},exit:(...e)=>{if(e.length===0){let e=Ya(a);throw c(e),new Ja(e)}a=$a(e[0]);let t=Ya(a);throw c(t),new Ja(t)},stdin:l,stdout:d,stderr:f},getDidCallProcessExit:()=>i,getExitCode:()=>Ya(i?o:a),recordExit:c}}var vo=class extends $e.Stream{isTTY=!1;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 Ja){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 yo(e,t){return new vo(e,t)}function bo(e){if(e===``)return[];let t=e.split(`
28
- `);return t[t.length-1]===``&&t.pop(),t.map(e=>e.endsWith(`\r`)?e.slice(0,-1):e)}function xo(e){if(typeof e==`string`)return e;if(e&&typeof e.read==`function`){let t=e.read();return typeof t==`string`?t:``}return``}function So(e){return new TextDecoder(`utf-8`).decode(ie(e))}function Co(e){if(e&&typeof e.write==`function`)return e}var wo=class extends qe{terminal=!1;lines;cursor=0;closed=!1;flushScheduled=!1;output;onExit;constructor(e,t,n){super(),this.lines=bo(So(xo(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 Ja&&this.onExit){this.closed=!0,this.onExit(e.code);return}throw e}}};function To(e){let t=(t,n)=>{let r,i;if(t&&typeof t==`object`&&`input`in t){let e=t;r=e.input,i=Co(e.output)}else r=t,i=Co(n);if(r==null)throw TypeError(`readline.createInterface: an 'input' stream is required`);return new wo(r,i,e)},n=(...e)=>{let t=e[e.length-1];return typeof t==`function`&&queueMicrotask(()=>t()),!0},r={createInterface:t,Interface:wo,emitKeypressEvents:()=>void 0,cursorTo:n,moveCursor:n,clearLine:n,clearScreenDown:n};return{...r,promises:r}}var Eo=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`?`: ${Do(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 Do(e){try{return JSON.stringify(e)}catch{return String(e)}}function Oo(e){return new Promise(t=>setTimeout(t,e))}function ko(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 Ao(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?ko(r,n):r}function jo(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 Mo(e){if(!e)return!1;let t=e.toLowerCase();return t.startsWith(`application/json`)||/[+/]json(;|$|\s)/.test(t)}function No(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 Po(e){if(Mo(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 Fo(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 Io(e,t){return Object.keys(e).some(e=>e.toLowerCase()===t.toLowerCase())}async function Lo(e,t,n){let r=await t(n);r&&!Io(e,`authorization`)&&(e.Authorization=`Bearer ${r}`)}function Ro(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 zo(e,t){return{body:t,headers:Object.fromEntries(e.headers.entries()),status:e.status}}async function Bo(e,t){let n=await Po(e);return t?zo(e,n):n}async function Vo(e,t){let n=await Po(e).catch(()=>null);throw new Eo(e.status,e.statusText,t,n)}function Ho(e,t){let n=No(e.headers.get(`retry-after`));return n===null?500*2**t:n}async function Uo(e,t,n,r){let i=null;for(let a=0;a<e.maxAttempts;a++){let{signal:o,clearTimeout:s}=Ro(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 Bo(l,r.raw);if(!(a+1<e.maxAttempts&&e.retryOn.has(l.status)))return Vo(l,t);await e.sleep(Ho(l,a))}if(i)return Vo(i,t);throw Error(`http: no attempts made for ${n.method??`GET`} ${t}`)}function Wo(e){let t=e.sleep??Oo;function n(n){let r=new Set(n.retry?.on??[]),i=Math.max(1,Math.trunc(n.retry?.maxAttempts??1));async function a(a,o,s={}){let c=Ao(n.baseUrl,o,s.params),l=jo(n.headers,s.headers);n.token&&await Lo(l,n.token,{method:a,path:o,url:c});let u=Fo(s.body,l),d={method:a,headers:l};return u!==void 0&&(d.body=u),Uo({fetch:e.fetch,sleep:t,maxAttempts:i,retryOn:r,timeoutMs:n.timeoutMs},c,d,s)}return Object.freeze({get:((e,t)=>a(`GET`,e,t)),post:((e,t)=>a(`POST`,e,t)),put:((e,t)=>a(`PUT`,e,t)),patch:((e,t)=>a(`PATCH`,e,t)),delete:((e,t)=>a(`DELETE`,e,t))})}return Object.freeze({client:n})}function Go(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 Ko(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`,Go(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 qo(e,t){let n=t.cwd,r=async(t,r)=>{let i=r??{},a=await e.spawn(Ko(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 Jo(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 Yo(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=Jo(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 Xo(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 Zo(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 Zo(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(n(e)){let t=await r(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 Qo(e){return{findTab:t=>e.call(`browser`,`findTab`,[es(t)]),ensureTab:(t,n={})=>e.call(`browser`,`ensureTab`,[t,ts(n)]),eval:(t,n)=>e.call(`browser`,`eval`,[Jo(t),$o(n,!1)]),evalAsync:(t,n)=>e.call(`browser`,`evalAsync`,[Jo(t),$o(n,!0)]),cookie:(t,n)=>e.call(`browser`,`cookie`,[Jo(t),n]),localStorage:(t,n)=>e.call(`browser`,`localStorage`,[Jo(t),n]),fetch:(t,n,r={})=>E(n,r).then(n=>e.call(`browser`,`evalAsync`,[Jo(t),n])),websocket:Yo(e)}}function $o(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 es(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 ts(e){return e.matchUrl===void 0?{}:{matchUrl:e.matchUrl instanceof RegExp?e.matchUrl.source:e.matchUrl}}function ns(e){return e===`SIGKILL`?137:e===`SIGINT`?130:143}function rs(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:ns(t)}),Promise.resolve(!0)),stdin:{write:e=>{!s&&!u&&o.push(e)},end:()=>m()},done:p}}});return l.exec=l,l}const is=new Set([204,205,304]),as=new Set([`content-encoding`,`transfer-encoding`,`content-length`]);function os(e,t){let n=ss(e.body),r=cs(e.headers),i=is.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 us(a,n),a}function ss(e){return e.byteLength===0?new Uint8Array:e.slice()}function cs(e){let t=new Headers;for(let[n,r]of Object.entries(e))if(!as.has(n.toLowerCase()))try{t.set(n,r)}catch{}return t}const ls=Symbol(`slicc.realmBufferedBody`);function us(e,t){if(ls in e)return;Object.defineProperty(e,ls,{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,ds(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 ds(e){try{let t=e.body;t&&!t.locked&&t.getReader()}catch{}}function fs(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 ps(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function ms(e){return e==null?[]:Array.isArray(e)?e:[e]}function hs(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:ps(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,fs(r)]),sendFeatureReport:(t,r)=>e.call(`hid`,`sendFeatureReport`,[n,t,fs(r)]),receiveFeatureReport:async t=>ps((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 gs(e){return{list:async()=>(await e.call(`hid`,`list`,[])).map(t=>hs(e,t)),request:async t=>{let n=(await e.call(`hid`,`request`,[ms(t)]))[0];if(!n)throw Error(`No device selected.`);return hs(e,n)}}}function _s(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 vs=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 };`)}},ys=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=_s(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 vs(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 vs(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?.())}},bs=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 ys(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()}},xs=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 ys(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 bs(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 Ss(e){let t=async t=>new xs(e),n=async(t,n)=>new xs(e);return{chromium:{launch:t,connect:n,connectOverCDP:n},firefox:{launch:t,connect:n},webkit:{launch:t,connect:n}}}function Cs(e){return{...e,time:Ka,fmt:Fe,pool:Ha}}function ws(e,t){return e?.startsWith(`/`)?qa(e):t}function Ts(e){return e.includes(`require`)||e.includes(`import`)||/(?:^|[;\n}])\s*export\b/.test(e)}async function Es(e,t,n,r){return Ts(t)?e.call(`module`,`buildGraph`,[t,ws(r,n),r]):{files:[],entryMap:{},edges:{},edgeErrors:{},errors:{}}}function Ds(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 Os(e){return{playwright:Ss(e)}}function ks(e){let{graph:t,fsBridge:n,processShim:r,childProcess:i,nodeConsole:a,sliccyModules:o,shimmedPackages:s={},nodeReadline:l,nodeOsModule:d=xn,nodeUtilModule:p=_t}=e,m=new Map(t.files.map(e=>[e.path,e.cjsSource])),h=new Map(t.files.map(e=>[e.path,e.kind])),g=new Map,_=gn({requireFrom:(e,t)=>T(e,t),resolveFrom:(e,t)=>w(e,t)}),v=nn(()=>{let e=r?.cwd?.();return typeof e==`string`&&e.length>0?e:`/`}),b=e=>{if(typeof e==`string`&&e.startsWith(`sliccy:`))return{hit:!0,value:Ms(e,o)};let t=e.startsWith(`node:`)?e.slice(5):e,a=As(t,{fsBridge:n,processShim:r,childProcess:i,nodeOsModule:d,nodeUtilModule:p,nodePathModule:v,nodeReadline:l,nodeModule:_});if(a.hit)return a;if(y.has(t))throw f(e,t);if(u.has(t))throw Ps(e,t);return t in s?{hit:!0,value:s[t]}:{hit:!1}},x=(e,n,r)=>{let i=b(n);if(i.hit)return i.value;let a=e?.[n];if(a)return S(a);let o=r===null?t.errors[n]:t.edgeErrors?.[r]?.[n];throw o?Error(o):js(n)};function S(e){let n=g.get(e);if(n)return n.exports;let i=m.get(e);if(i===void 0)throw Error(`Cannot find module '${e}'`);let o={exports:{}};g.set(e,o);let s=n=>x(t.edges[e],n,e),c=qa(e);return Function(`module`,`exports`,`require`,`__dirname`,`__filename`,`process`,`console`,`Buffer`,`global`,i)(o,o.exports,s,c,e,r,a,globalThis.Buffer,globalThis),h.get(e)===`cjs`&&Ds(o.exports),o.exports}function C(e){return m.has(e)}function w(e,n){if(c(n))return n;let r=t.edges[e]?.[n];if(r)return r;let i=qa(e);if(hn(n)){let e=pn(i,n,C);if(e)return e}else{let e=mn(i,n,C);if(e)return e}let a=t.edgeErrors?.[e]?.[n];throw a?Error(a):js(n)}function T(e,t){let n=b(t);return n.hit?n.value:S(w(e,t))}return{require:e=>x(t.entryMap,e,null)}}function As(e,t){let{fsBridge:n,processShim:r,childProcess:i,nodeOsModule:a,nodeUtilModule:o,nodePathModule:s,nodeReadline:c,nodeModule:l}=t;return e===`fs`||e===`fs/promises`?{hit:!0,value:n}:e===`path`?{hit:!0,value:s}:e===`crypto`?{hit:!0,value:Wt}: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:Ge}:e===`assert/strict`?{hit:!0,value:We}:e===`util`?{hit:!0,value:o}:e===`events`?{hit:!0,value:Je}:e===`os`?{hit:!0,value:a}:e===`tty`?{hit:!0,value:Sn}:e===`stream`?{hit:!0,value:$e}:e===`url`?{hit:!0,value:sn}:e===`zlib`?{hit:!0,value:za}:e===`readline`&&c?{hit:!0,value:c}:e===`readline/promises`&&c?{hit:!0,value:c.promises}:e===`module`&&l?{hit:!0,value:l}:{hit:!1}}function js(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 Ms(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 Ns={http:` Use fetch() instead.`,https:` Use fetch() instead.`,crypto:` Use globalThis.crypto (Web Crypto API) instead.`};function Ps(e,t){return Error(`require('${e}'): Node built-in '${t}' is not available in the browser environment.${Ns[t]||``}`)}async function Fs(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";
29
- `:``}${e}`);try{return await s(...a),0}catch(e){return e instanceof Ja?e.code:(n(`${e instanceof Error?e.stack??e.message:String(e)}\n`),1)}}function Is(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?fs(t.until):void 0,timeoutMs:t.timeoutMs}]),write:t=>e.call(`serial`,`write`,[n,fs(t)]),getSignals:()=>e.call(`serial`,`getSignals`,[n]),setSignals:t=>e.call(`serial`,`setSignals`,[n,t])}}function Ls(e){return{list:async()=>(await e.call(`serial`,`list`,[])).map(t=>Is(e,t)),request:async t=>Is(e,await e.call(`serial`,`request`,[ms(t)]))}}function Rs(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 zs(e,t){let n=t.handle,r=e=>({status:e.status,data:ps(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,fs(r)]),transferIn:async(t,i)=>r(await e.call(`usb`,`transferIn`,[n,t,i])),transferOut:(t,r)=>e.call(`usb`,`transferOut`,[n,t,fs(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 Bs(e){return{list:async()=>(await e.call(`usb`,`list`,[])).map(t=>zs(e,t)),request:async t=>zs(e,await e.call(`usb`,`request`,[ms(t)]))}}function Vs(e){if(!e)return``;let t=e.lastIndexOf(`/`);return t<0?``:t===0?`/`:e.substring(0,t)}function Hs(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 Us(e){return/^[A-Za-z0-9_\-./:@]+$/.test(e)?e:`'`+e.replace(/'/g,`'\\''`)+`'`}function Ws(e,t){return e===``?t:e===`/`?`/${t}`:`${e}/${t}`}function Gs(e){let t=Vs(e.argv[1]??``),n=Hs(t),r=Ws(n,`references`),i=Ws(n,`assets`),a=Ws(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)+`
30
- `),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 ${Us(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 $(e,t){return Object.assign(Error(`${e}: ${t}`),{code:e})}function Ks(e){let t=Js(e);if(Ys(t))return new Uint8Array(t.response);if(t.status>=200&&t.status<300)throw $(`EIO`,e.label);Xs(t,e.label)}function qs(e){let t=Ks(e);try{return JSON.parse(new TextDecoder().decode(t))}catch{throw $(`EIO`,e.label)}}function Js(e){let t=new XMLHttpRequest;try{t.open(e.method,e.url,!1),t.responseType=`arraybuffer`,t.timeout=e.timeoutMs,t.setRequestHeader(m,e.token),e.body?t.send(new Uint8Array(e.body)):t.send()}catch{throw $(`EIO`,e.label)}return t}function Ys(e){return e.status>=200&&e.status<300&&e.getResponseHeader(`x-slicc-fs`)===`1`}function Xs(e,t){throw $(e.getResponseHeader(`x-slicc-fs`)===`1`&&e.getResponseHeader(`x-slicc-fs-errno`)||`EIO`,t)}function Zs(e){return(t,n,r)=>{let i=qs({method:`POST`,url:_,token:e,body:new TextEncoder().encode(JSON.stringify({...t,channel:g})),timeoutMs:n+h,label:r});if(!i||typeof i.stdout!=`string`||typeof i.stderr!=`string`||typeof i.exitCode!=`number`)throw $(`EIO`,r);return{stdout:i.stdout,stderr:i.stderr,exitCode:i.exitCode}}}function Qs(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 $s(e,t={}){let n=t.timeoutMs??12e4,{syncFs:r,fsBridge:i}=t,a=t.transport??Zs(e);return{run(e,t={}){let o=r?.wasUsed()===!0&&i!==void 0;o&&Qs(r,i);let s=`sync-exec bridge, '${Array.isArray(e)?e.join(` `):e}'`,c=b(t.timeout,n),l={command:e,...t.args===void 0?{}:{args:t.args},...t.input===void 0?{}:{stdin:t.input},...t.cwd===void 0?{}:{cwd:t.cwd},...t.env===void 0?{}:{env:t.env},timeoutMs:c};try{return a(l,c,s)}finally{o&&r.invalidate()}}}}function ec(e,t){return $(e,`sync-fs bridge, '${t}'`)}function tc(e,t){let n=e.startsWith(`/`)?e:`/${e}`,r=w+n.split(`/`).map(encodeURIComponent).join(`/`);return t?`${r}?op=${t}`:r}function nc(e,t={}){let n=t.timeoutMs??3e4;function r(t,r,i,a){return{method:t,url:tc(r,a),token:e,...i?{body:i}:{},timeoutMs:n,label:`sync-fs bridge, '${r}'`}}return{readFile(e){return Ks(r(`GET`,e))},writeFile(e,t){Ks(r(`POST`,e,t))},stat(e){let t=qs(r(`GET`,e,void 0,`stat`));if(!t||typeof t.isFile!=`boolean`||typeof t.isDirectory!=`boolean`||typeof t.size!=`number`)throw ec(`EIO`,e);return{isFile:t.isFile,isDirectory:t.isDirectory,isSymbolicLink:t.isSymbolicLink,size:t.size}},lstat(e){let t=qs(r(`GET`,e,void 0,`lstat`));if(!t||typeof t.isFile!=`boolean`||typeof t.isDirectory!=`boolean`||typeof t.size!=`number`)throw ec(`EIO`,e);return{isFile:t.isFile,isDirectory:t.isDirectory,isSymbolicLink:t.isSymbolicLink,size:t.size}},readdir(e){let t=qs(r(`GET`,e,void 0,`readdir`));if(!Array.isArray(t)||!t.every(e=>typeof e==`string`))throw ec(`EIO`,e);return t},exists(e){let t=qs(r(`GET`,e,void 0,`exists`));if(typeof t!=`boolean`)throw ec(`EIO`,e);return t},mkdir(e){Ks(r(`POST`,e,void 0,`mkdir`))},rm(e){Ks(r(`POST`,e,void 0,`rm`))}}}function rc(e,t,n={}){let{header:r,window:i}=C(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 $(`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:S,id:l,req:e}:{type:x,id:l,offset:p};try{t.postMessage(n)}catch{throw $(`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 $(`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 $(`EIO`,a)}}finally{Atomics.store(r,0,0)}return v(f,d)}}}function ic(e,t){return $(e,`sync-sab bridge, '${t}'`)}function ac(e){let t=e;return!!t&&typeof t.isFile==`boolean`&&typeof t.isDirectory==`boolean`&&typeof t.size==`number`}function oc(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 ic(i.errno,r);return i}function i(e,t){let n=r(e,t);if(n.ok&&n.kind===`bytes`)return n.bytes;throw ic(`EIO`,t)}function a(e,t){let n=r(e,t);if(n.ok&&n.kind===`json`)return n.json;throw ic(`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=a({op:`stat`,path:e},e);if(!ac(t))throw ic(`EIO`,e);return t},lstat:e=>{let t=a({op:`lstat`,path:e},e);if(!ac(t))throw ic(`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 ic(`EIO`,e);return t},exists:e=>{let t=a({op:`exists`,path:e},e);if(typeof t!=`boolean`)throw ic(`EIO`,e);return t},mkdir:e=>{r({op:`mkdir`,path:e},e)},rm:e=>{r({op:`rm`,path:e},e)}}}function sc(e){return(t,n,r)=>{let i=e.call({...t,channel:g},n+h,r);if(!i.ok)throw $(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 $(`EIO`,r);return{stdout:a.stdout,stderr:a.stderr,exitCode:a.exitCode}}}const cc=65536;function lc(e,t){if(!t)return e;let n=e+t;return n.length<=cc?n:n.slice(n.length-cc)}async function uc(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 dc(e,t){if(e.syncFsToken)return e=>t(`[sync-fs] snapshot failed, sync metadata will be incomplete: ${e}\n`)}function fc(e,t){return t?oc(t):e.syncFsToken?nc(e.syncFsToken):void 0}function pc(e,t){if(!(!e.syncSab||typeof Atomics>`u`||typeof Atomics.wait!=`function`))return rc(e.syncSab,t)}function mc(e,t,n,r,i){let a=pc(e,t),o=fc(e,a);if(Object.assign(r,Ce(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})}})),e.syncFsToken)return $s(e.syncFsToken,{syncFs:n,...o?{fsBridge:o}:{},...a?{transport:sc(a)}:{}})}function hc(e=globalThis){Object.prototype.hasOwnProperty.call(e,`SLICC_VERSION`)||Object.defineProperty(e,"SLICC_VERSION",{value:i().version,writable:!1,enumerable:!1,configurable:!1})}function gc(e,t,n){let r=Te({isTTY:!e,noColor:e});return{colorApi:r,cliApi:we({writeStdout:t,writeStderr:n,exit:e=>{throw new Ja(e)},color:r})}}function _c(e,t,n){return{readStdinBytes:()=>ie(e.stdin??``),writeStdout:t,writeStderr:n}}function vc(e){return{usbBridge:Bs(e),serialBridge:Ls(e),hidBridge:gs(e)}}async function yc(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:lc(r.stdout,a):r.stderr=n?r.stderr+a:lc(r.stderr,a),t.postMessage({type:`realm-output`,stream:e,chunk:a})},a=e=>{i(`stdout`,e)},o=e=>{i(`stderr`,e)},s=go(a,o),c=_o(e,a,o),{colorApi:l,cliApi:u}=gc(!!e.env?.NO_COLOR,a,o),d=new p(t),f=_c(e,a,o),m=he(d,T,f),h=await uc(d,e.cwd,dc(e,o)),g=mc(e,t,h,m,f),_=rs(d,h,e.cwd,o),v=qo(_,{cwd:e.cwd}),y=Gs({argv:e.argv,fs:m,exec:_}),b=Qo(d),{usbBridge:x,serialBridge:S,hidBridge:C}=vc(d),w=Wo({fetch:T});async function T(e,t){let n=e instanceof Request?e.url:e instanceof URL?e.toString():String(e);return os(await d.call(`fetch`,`request`,[n,await Xo(t,e)]),n)}let E=Cs({exec:_,agent:v,skill:y,http:w,browser:b,usb:x,serial:S,hid:C,cli:u,color:l}),D=e.filename,O=qa(D),k=await Es(d,e.code,e.cwd,D),ee=ks({graph:k,fsBridge:m,processShim:c.processShim,childProcess:kt(_,g),nodeConsole:s,sliccyModules:E,shimmedPackages:Os(d),nodeReadline:To({output:{write:a},onExit:c.recordExit}),nodeOsModule:bn(e.env),nodeUtilModule:gt(e=>o(`${e}\n`))}).require,te={exports:{},filename:e.filename},ne=k.entrySource!==void 0;await bc({entryCode:k.entrySource??e.code,isEsmEntry:ne,filename:D,dirname:O,proc:c,nodeConsole:s,requireShim:ee,moduleShim:te,realmFetch:T,writeStderr:o,rpc:d,syncFs:h,output:r,port:t})}async function bc(e){let t=globalThis;hc(),t.__slicc_compileWasm=t=>e.rpc.call(`wasm`,`compile`,[t]);let n=Rs(globalThis,{onCallbackError(e){if(!(e instanceof Ja))throw e}}),{createBodyReadHandleTracker:r}=await import(`./realm-body-handles-DtLxL_rB.js`),i=r(globalThis);n.install(),i.install();try{let r=await xc({entryCode:e.entryCode,bridges:{process:e.proc.processShim,console:e.nodeConsole,require:e.requireShim,module:e.moduleShim,exports:e.moduleShim.exports,fetch:e.realmFetch,__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});delete t.__slicc_compileWasm,e.rpc.dispose(),e.port.postMessage({type:`realm-done`,stdout:e.output.stdout,stderr:e.output.stderr,exitCode:r})}finally{n.clearPending(),n.restore(),i.restore()}}async function xc(e){let t=await Fs(e.entryCode,e.bridges,e.writeStderr,e.isEsmEntry);return await Sc(e.rpc,e.syncFs,e.writeStderr),e.proc.getDidCallProcessExit()?(e.timers.clearPending(),e.proc.getExitCode()):(await Cc(e.rpc,e.timers,e.bodyReads,e.proc),e.proc.getDidCallProcessExit()&&e.timers.clearPending(),await Sc(e.rpc,e.syncFs,e.writeStderr),e.proc.getDidCallProcessExit()||t===0?e.proc.getExitCode():t)}async function Sc(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 Cc(e,t,n,r){for(await t.tick();!r.getDidCallProcessExit()&&(e.pendingCount>0||t.pendingCount>0||n.pendingCount>0);){let i=[];if(e.pendingCount>0&&i.push(e.waitForProgress()),t.pendingCount>0&&i.push(t.waitForProgress()),n.pendingCount>0&&i.push(n.waitForProgress()),i.length===0)break;await Promise.race(i),r.getDidCallProcessExit()||await t.tick()}}function wc(){let e=new Set,t=new Set;return{realmSide:{postMessage:e=>{queueMicrotask(()=>{for(let n of[...t])n({data:e})})},addEventListener:(t,n)=>{e.add(n)},removeEventListener:(t,n)=>{e.delete(n)}},hostSide:{postMessage:t=>{queueMicrotask(()=>{for(let n of[...e])n({data:t})})},addEventListener:(e,n)=>{t.add(n)},removeEventListener:(e,n)=>{t.delete(n)}}}}function Tc(){return async({kind:e})=>{if(e!==`js`)throw Error(`createInProcessJsRealmFactory: only kind:js is supported`);let{realmSide:t,hostSide:n}=wc(),r=e=>{if(e.data?.type!==`realm-init`)return;t.removeEventListener(`message`,r);let n=e.data;n.kind===`js`&&yc(n,t).catch(e=>{let n={type:`realm-error`,message:e instanceof Error?e.message:String(e)};t.postMessage(n)})};return t.addEventListener(`message`,r),{controlPort:n,terminate(){t.removeEventListener(`message`,r)}}}}function Ec(){return async({kind:e})=>{if(e!==`py`)throw Error(`createInProcessPyRealmFactory: only kind:py is supported`);let{realmSide:t,hostSide:n}=wc(),r=e=>{if(e.data?.type!==`realm-init`)return;t.removeEventListener(`message`,r);let n=e.data;n.kind===`py`&&d(n,t).catch(e=>{let n={type:`realm-error`,message:e instanceof Error?e.message:String(e)};t.postMessage(n)})};return t.addEventListener(`message`,r),{controlPort:n,terminate(){t.removeEventListener(`message`,r)}}}}export{Tc as createInProcessJsRealmFactory,Ec as createInProcessPyRealmFactory};
@@ -1 +0,0 @@
1
- import"./float-topology-YtctpJaG.js";
@@ -1 +0,0 @@
1
- function e(){return{version:`6.165.0`,releasedAt:`2026-09-17T21:23:29Z`,buildId:`6.165.0-mu61e2g3`}}let t=null;function n(e){t=e}function r(){return t}export{e as n,n as r,r as t};
@@ -1 +0,0 @@
1
- import{n as e}from"./bridge-protocol-DdqxTTSu.js";import"./proxied-fetch-DEK8DT-z.js";const t=e;export{t};
@@ -1 +0,0 @@
1
- import{t as e}from"./logger-DDBAeTLF.js";import{$ as t,tt as n}from"./wc-shell-Cj705NBI.js";import{hasVoiceForLang as r,speak as i,speechTextFromMarkdown as a}from"./speak-DbL0fEQT.js";var o=e(`speech:voice-reply`),s=0;function c(){s++}function l(){return s<=0?!1:(s--,!0)}async function u(e,s=i,c=r){let l=t(e);if(l&&!await c(l))return;let u=a(n(e));if(u)try{await s(l?{text:u,lang:l}:{text:u})}catch(e){o.warn(`spoken reply failed`,e)}}export{l as consumeVoiceSubmission,c as markVoiceSubmission,u as speakReplyMarkdown};
@@ -1 +0,0 @@
1
- import{t as e}from"./slicc-app-url-B9OxaBDe.js";import{teleportTabOneWay as t}from"./tab-teleport-BimzPYfT.js";var n=5e3;function r(t){let{browser:r,log:i}=t,a=async()=>{try{let t=await r.listAllTargets(),n=t.find(e=>e.url===location.href);if(n)return n.targetId;let i=location?.origin?[location.origin]:void 0;return t.find(t=>e(t.url??``,{selfOrigins:i}))?.targetId??null}catch(e){return i.warn(`WC browser overlay: could not resolve the SLICC tab`,e),null}},o=null;return async e=>{let s=t.agentTarget(),c=await a();if(await t.activate(e)){if(!c){i.warn(`WC browser overlay: peek cannot find the SLICC tab; staying put`,{target:e});return}o&&clearTimeout(o),o=setTimeout(()=>{o=null,(async()=>{try{await r.bringTabToFront(c),s&&s!==c&&await r.selectTab(s)}catch(e){i.error(`WC browser overlay: peek return failed`,e)}})()},n)}}}function i(n){let{refs:i,browser:a,log:o}=n,s=document.createElement(`slicc-tab-overlay`);s.setAttribute(`heading`,`Browser · open tabs`),document.body.append(s);let c=0,l=null,u=async()=>{s.hasAttribute(`open`)||(l=a.getAttachedTargetId());let t=++c;s.show();let r;try{r=await a.listAllTargets()}catch(e){o.error(`WC browser overlay: listing tabs failed`,e),s.tabs=[];return}if(t!==c)return;let i=location?.origin?[location.origin]:void 0;r=r.filter(t=>!e(t.url??``,{selfOrigins:i})),s.tabs=r.map(e=>({id:e.targetId,title:e.title||e.url||e.targetId,url:e.url}));for(let e of r){if(t!==c||!s.hasAttribute(`open`))return;try{let r=await a.withTab(e.targetId,e=>e.screenshot({format:`jpeg`,quality:72,maxWidth:n.thumbWidth??Math.round(560*Math.min(devicePixelRatio||1,2)),foregroundFallback:!1}));if(t!==c)return;s.tabs=s.tabs.map(t=>t.id===e.targetId?{...t,screenshot:`data:image/jpeg;base64,${r}`}:t)}catch(t){o.warn(`WC browser overlay: thumbnail failed`,{target:e.targetId,err:t})}}};i.overlaySurfaces.add(`browser`),i.dock.addEventListener(`slicc-dock-select`,e=>{e.detail?.id===`browser`&&(u(),i.dock.collapse?.())});let d=async e=>{try{if(e.includes(`:`)){let n=await t(a,{sourceTargetId:e,destination:{kind:`leader`}});return o.info(`WC browser overlay: pulled remote tab to leader`,{source:e,target:n.targetId,degraded:n.degraded}),s.hide(),!0}return await a.bringTabToFront(e),s.hide(),!0}catch(e){return o.error(`WC browser overlay: tab activate failed`,e),!1}};s.addEventListener(`tab-activate`,e=>{d(e.detail.id)});let f=r({browser:a,log:o,activate:d,agentTarget:()=>l});return s.addEventListener(`tab-peek`,e=>{let t=e.detail.id;if(t.includes(`:`)){d(t);return}f(t).catch(e=>o.error(`WC browser overlay: peek failed`,e))}),s.addEventListener(`tab-close`,e=>{let t=e.detail.id;a.closePage(t).then(()=>u()).catch(e=>o.error(`WC browser overlay: tab close failed`,e))}),{overlay:s,refresh:u}}export{i as wireWcBrowser};