sliccy 6.242.0 → 6.243.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/node-server/_shared/tray-sync-protocol.d.ts +9 -0
- package/dist/node-server/_shared/tray-sync-protocol.d.ts.map +1 -1
- package/dist/node-server/_shared/tray-sync-protocol.js.map +1 -1
- package/dist/ui/.vite/manifest.json +421 -392
- package/dist/ui/assets/account-store-BUXWCO9c.js +2 -0
- package/dist/ui/assets/account-store-BwbUEHb5.js +1 -0
- package/dist/ui/assets/adobe-B1NvyhgA.js +2 -0
- package/dist/ui/assets/adobe-Cj-kss61.js +1 -0
- package/dist/ui/assets/{agent-panels-DZgCn_Eh.js → agent-panels-hMZHYKB4.js} +1 -1
- package/dist/ui/assets/{agent-tools-WbCq5rUh.js → agent-tools-DOAwvp2r.js} +1 -1
- package/dist/ui/assets/{almost-bash-shell-headless-9Czv5t8a.js → almost-bash-shell-headless-CAZee0uN.js} +16 -16
- package/dist/ui/assets/anthropic-messages-B2uIMNYL.js +19 -0
- package/dist/ui/assets/anthropic-messages-C787NPvk.js +18 -0
- package/dist/ui/assets/{apply-layout-DF4jjEp1.js → apply-layout-Pq0XxQj9.js} +1 -1
- package/dist/ui/assets/{approver-agent-CivzfuZ7.js → approver-agent-B9MJsDkQ.js} +1 -1
- package/dist/ui/assets/{azure-openai-3Gr9AGS9.js → azure-openai-BHir9Y8r.js} +1 -1
- package/dist/ui/assets/azure-openai-config--zABV6W_.js +1 -0
- package/dist/ui/assets/azure-openai-config-CvD1Dsr0.js +1 -0
- package/dist/ui/assets/azure-openai-responses-DcjVJRMr.js +1 -0
- package/dist/ui/assets/azure-openai-responses-Zz2PEXb6.js +1 -0
- package/dist/ui/assets/{azure-openai-DF83DQdU.js → azure-openai-yVG_O_XO.js} +1 -1
- package/dist/ui/assets/{bedrock-camp-DLQhETva.js → bedrock-camp-CLQpuikj.js} +1 -1
- package/dist/ui/assets/{bedrock-camp-BYH3KVc9.js → bedrock-camp-Sm0RNsDN.js} +1 -1
- package/dist/ui/assets/{browser-BhTdBqdp.js → browser-Chc3wUwj.js} +35 -30
- package/dist/ui/assets/{browser-CGX7MbCQ.js → browser-L7W6uZ79.js} +1 -1
- package/dist/ui/assets/{cdp-BMRNgxhA.js → cdp-DOkrWHSv.js} +1 -1
- package/dist/ui/assets/{cerebras-dDv6G5NB.js → cerebras-BsMLiSLC.js} +1 -1
- package/dist/ui/assets/{cerebras-BLbXU4bU.js → cerebras-Dr97p_v3.js} +1 -1
- package/dist/ui/assets/classifier-shared-BJysQIY7.js +1 -0
- package/dist/ui/assets/classifier-shared-DgL5N50m.js +1 -0
- package/dist/ui/assets/cloudflare-workers-ai-system-one-3WA5LP90.js +1 -0
- package/dist/ui/assets/cloudflare-workers-ai-system-one-BQQga1NM.js +1 -0
- package/dist/ui/assets/{codemode-tool-FcP24sWd.js → codemode-tool-BFVivVHy.js} +1 -1
- package/dist/ui/assets/compat-0YnuwvMn.js +2 -0
- package/dist/ui/assets/compat-Ba4wPWa_.js +1 -0
- package/dist/ui/assets/{composer-speech-BkKa1N94.js → composer-speech-qaRqAyXj.js} +1 -1
- package/dist/ui/assets/{connect-surface-Bm6PRdh4.js → connect-surface-DIi81fIW.js} +1 -1
- package/dist/ui/assets/{connection-manager-D0LxHiWb.js → connection-manager-BDqqVban.js} +1 -1
- package/dist/ui/assets/{context-compaction-BCsq-2e6.js → context-compaction-Dee1PlIX.js} +1 -1
- package/dist/ui/assets/core-C--iyWKC.js +1 -0
- package/dist/ui/assets/core-DzRw0pz2.js +27 -0
- package/dist/ui/assets/{cost-command-QgykPPks.js → cost-command-VPxRuwNr.js} +1 -1
- package/dist/ui/assets/{descriptor-CuhPBdq8.js → descriptor-1ECGTjSt.js} +1 -1
- package/dist/ui/assets/{descriptor-CKLcFFX3.js → descriptor-xRf4P0gd.js} +1 -1
- package/dist/ui/assets/diagnostics-B-5VkVir.js +1 -0
- package/dist/ui/assets/{directed-approval-BXnjNc8s.js → directed-approval-m8VBcGoU.js} +1 -1
- package/dist/ui/assets/dist-DRjYxtT0.js +9 -0
- package/dist/ui/assets/dist-Ue_WrVH6.js +4 -0
- package/dist/ui/assets/{emscripten-vfs-hook-DjpWiWGw.js → emscripten-vfs-hook-DS6HyOQN.js} +1 -1
- package/dist/ui/assets/env-api-keys-BMbk-OAv.js +1 -0
- package/dist/ui/assets/env-api-keys-DkgZK-ct.js +1 -0
- package/dist/ui/assets/error-BTdmRKoB.js +1 -0
- package/dist/ui/assets/{frozen-archive-writer-CxARY_u0.js → frozen-archive-writer-BXYZXVMO.js} +1 -1
- package/dist/ui/assets/{frozen-archive-writer-BmnL05hC.js → frozen-archive-writer-B_3LDxDv.js} +1 -1
- package/dist/ui/assets/{frozen-session-delete-CMYnzw-I.js → frozen-session-delete-S6fe3MHM.js} +1 -1
- package/dist/ui/assets/{frozen-session-identity-BvbW8Joj.js → frozen-session-identity-BzZR-tcg.js} +1 -1
- package/dist/ui/assets/{frozen-session-identity-Be3WxQiL.js → frozen-session-identity-Cm2y7ECd.js} +1 -1
- package/dist/ui/assets/{gelatiere-unit-xNfF_7ob.js → gelatiere-unit-CbpoXshu.js} +1 -1
- package/dist/ui/assets/github-copilot-Bpxt8DcY.js +2 -0
- package/dist/ui/assets/{github-copilot-DWvHSe9j.js → github-copilot-CIJWouor.js} +1 -1
- package/dist/ui/assets/{github-DNdt8ojA.js → github-u46P7a92.js} +1 -1
- package/dist/ui/assets/{github-CeB2d2Q-.js → github-z8d7X5by.js} +1 -1
- package/dist/ui/assets/google-generative-ai-C1S3RP6G.js +1 -0
- package/dist/ui/assets/{google-generative-ai-CHKS5an4.js → google-generative-ai-D_dvyaRG.js} +1 -1
- package/dist/ui/assets/{google-shared-Q-3oSdLJ.js → google-shared-CjU_LieG.js} +1 -1
- package/dist/ui/assets/{google-shared-C6X3xab7.js → google-shared-DWTs99zb.js} +1 -1
- package/dist/ui/assets/{google-vertex-DBm4s85u.js → google-vertex-Ckh_e-Px.js} +1 -1
- package/dist/ui/assets/google-vertex-DmOYmn7m.js +1 -0
- package/dist/ui/assets/{guest-tool-gate-83ZVVYjM.js → guest-tool-gate-D5-Z-l4h.js} +1 -1
- package/dist/ui/assets/{hear-D9quYsjw.js → hear-CexFR0lD.js} +1 -1
- package/dist/ui/assets/{host-command-CvUauhDf.js → host-command-B9z8gGwK.js} +1 -1
- package/dist/ui/assets/{idle-compaction-DGln8tkz.js → idle-compaction-WANlPP4R.js} +1 -1
- package/dist/ui/assets/{interrupted-work-recovery-CWSaMQsO.js → interrupted-work-recovery-Bc8UHznp.js} +1 -1
- package/dist/ui/assets/{js-realm-worker-DDuU-XgK.js → js-realm-worker-DOBX_BWP.js} +2 -2
- package/dist/ui/assets/{jsh-executor-DOnIPgNs.js → jsh-executor-OyG5H3M0.js} +2 -2
- package/dist/ui/assets/kernel-worker-Co5O2WRg.js +1262 -0
- package/dist/ui/assets/{key-B2Bki3fU.js → key-CMmCg0hr.js} +1 -1
- package/dist/ui/assets/{legacy-api-aliases--xyLjPgC.js → legacy-api-aliases-C3_OAyZB.js} +1 -1
- package/dist/ui/assets/{legacy-api-aliases-BjgG1CsY.js → legacy-api-aliases-D-3Ssy_B.js} +1 -1
- package/dist/ui/assets/{libesm-CTQYxJIv.js → libesm-CSMdpGMF.js} +4 -4
- package/dist/ui/assets/{lick-ws-bridge-BGMhFgVP.js → lick-ws-bridge-B4nMBMxl.js} +1 -1
- package/dist/ui/assets/{lick-ws-bridge-C-Y8nKtx.js → lick-ws-bridge-CZbIps3D.js} +1 -1
- package/dist/ui/assets/{live-session-curation-DClAHiV3.js → live-session-curation-BF1WGcAY.js} +1 -1
- package/dist/ui/assets/{live-session-curation-Cm7e6ohY.js → live-session-curation-CygXbAY3.js} +1 -1
- package/dist/ui/assets/{live-session-snapshot-a18bKxI5.js → live-session-snapshot-CWtnoNYy.js} +1 -1
- package/dist/ui/assets/{local-llm-CyPxIK9W.js → local-llm-B4KZH4Xt.js} +1 -1
- package/dist/ui/assets/{local-llm-BsgdFg8Z.js → local-llm-D0l_JQnX.js} +1 -1
- package/dist/ui/assets/{main-cherry-C_30DmYa.js → main-cherry-C9W_D65Z.js} +1 -1
- package/dist/ui/assets/main-rwkIawzW.js +22 -0
- package/dist/ui/assets/{mcp-command-ChutbHAT.js → mcp-command-Ce7aNwu8.js} +11 -11
- package/dist/ui/assets/{memory-curation-seam-C5ZMA6ti.js → memory-curation-seam-Dm3c2GeP.js} +1 -1
- package/dist/ui/assets/{memory-health-Bc0NK5hs.js → memory-health-Dfnf_Tuq.js} +1 -1
- package/dist/ui/assets/{memory-write-execute-DH0aqBWk.js → memory-write-execute-pZFV468-.js} +1 -1
- package/dist/ui/assets/{merge-folded-cost-into-frozen-DIOtNg18.js → merge-folded-cost-into-frozen-DTl_zOBf.js} +1 -1
- package/dist/ui/assets/{mistral-conversations-oqRyTLwY.js → mistral-conversations-BvlrZkA-.js} +3 -3
- package/dist/ui/assets/{mistral-conversations-SlnX__FI.js → mistral-conversations-gYKoKyXX.js} +4 -4
- package/dist/ui/assets/models-D9KYIFyv.js +8 -0
- package/dist/ui/assets/models-DMUS_WIm.js +8 -0
- package/dist/ui/assets/new-session-DEO7gD2x.js +2 -0
- package/dist/ui/assets/{node.browser-DfltYbWr.js → node.browser-C8yuEzbc.js} +1 -1
- package/dist/ui/assets/node.browser-GIQn8hjM.js +1 -0
- package/dist/ui/assets/node.browser-HQ5SKBOf.js +1 -0
- package/dist/ui/assets/{node.browser-DFNMSkXf.js → node.browser-PnMdIUDP.js} +1 -1
- package/dist/ui/assets/oauth-bootstrap-ZC5NQ4lP.js +2 -0
- package/dist/ui/assets/{onboarding-orchestrator-usjOiqL0.js → onboarding-orchestrator-DK8WHqbf.js} +1 -1
- package/dist/ui/assets/{openai-codex-CQ3zgei0.js → openai-codex-D8hNye9V.js} +1 -1
- package/dist/ui/assets/{openai-codex-responses-BFVkRFGY.js → openai-codex-responses-DL3QfjAj.js} +2 -2
- package/dist/ui/assets/{openai-codex-responses-N8ybD_eh.js → openai-codex-responses-D_RW7WEX.js} +2 -2
- package/dist/ui/assets/{openai-codex-w6oO3AnS.js → openai-codex-x6y1P4FE.js} +1 -1
- package/dist/ui/assets/openai-completions-B8gZJNrA.js +5 -0
- package/dist/ui/assets/openai-completions-Eh0-DkGU.js +5 -0
- package/dist/ui/assets/openai-decisions-DZc3eKSh.js +2 -0
- package/dist/ui/assets/openai-decisions-umTQkmTO.js +2 -0
- package/dist/ui/assets/openai-responses-C7rBSmmd.js +1 -0
- package/dist/ui/assets/openai-responses-ChllZFHw.js +1 -0
- package/dist/ui/assets/{openai-responses-shared-CbNa5Pf-.js → openai-responses-shared-BkcHIDFS.js} +2 -2
- package/dist/ui/assets/{openai-responses-shared-yguGWfYx.js → openai-responses-shared-BvBjbnyp.js} +2 -2
- package/dist/ui/assets/{openrouter-BEKlOYFb.js → openrouter-B2CBG3R_.js} +1 -1
- package/dist/ui/assets/{openrouter-lsfNukd5.js → openrouter-BUd9j3yx.js} +1 -1
- package/dist/ui/assets/{openrouter-free-DwguItbS.js → openrouter-free-CPJCCuxG.js} +1 -1
- package/dist/ui/assets/{openrouter-free-mNgVVlhf.js → openrouter-free-DMf-9uyL.js} +1 -1
- package/dist/ui/assets/{openrouter-images-DInxQ8hj.js → openrouter-images-BLhPKhhs.js} +1 -1
- package/dist/ui/assets/{openrouter-images-B2LpvEOZ.js → openrouter-images-BxgQP1ZC.js} +1 -1
- package/dist/ui/assets/{openrouter-models-DawLtPaY.js → openrouter-models-BmhhmiWg.js} +1 -1
- package/dist/ui/assets/{openrouter-models-RwlwKz0P.js → openrouter-models-W7XmIrEt.js} +1 -1
- package/dist/ui/assets/{openrouter-oauth-5IQSzB1f.js → openrouter-oauth-BPULLBJW.js} +1 -1
- package/dist/ui/assets/{openrouter-oauth-BRdBbrLx.js → openrouter-oauth-Cr_iFRGQ.js} +1 -1
- package/dist/ui/assets/openrouter.models-BSx3ITDA.js +1 -0
- package/dist/ui/assets/openrouter.models-C88RzzVZ.js +1 -0
- package/dist/ui/assets/panel-rpc-handlers-Cx2DCZvj.js +2 -0
- package/dist/ui/assets/{panelize-shell-Cjf6GQSz.js → panelize-shell-BszF1QxA.js} +1 -1
- package/dist/ui/assets/pi-edit-execution-BuYIhqkU.js +12 -0
- package/dist/ui/assets/{pi-messages-BMxZw_ob.js → pi-messages-CiydoVXP.js} +1 -1
- package/dist/ui/assets/{pi-messages-F6N-eNkX.js → pi-messages-DElkezfJ.js} +1 -1
- package/dist/ui/assets/pi-transcript-context-CE8ItnBz.js +1 -0
- package/dist/ui/assets/{pi-transcript-context-miZCMig3.js → pi-transcript-context-DZyPy5yf.js} +1 -1
- package/dist/ui/assets/{provider-IGig8YLE.js → provider-DtMdxE0s.js} +1 -1
- package/dist/ui/assets/{provider-DUDuxXak.js → provider-XOGGlnmA.js} +1 -1
- package/dist/ui/assets/{provider-retry-CSlu6hjs.js → provider-retry-RVfYd5Vz.js} +1 -1
- package/dist/ui/assets/{provider-settings-DphpnNLH.js → provider-settings-DQAajlVX.js} +1 -1
- package/dist/ui/assets/provider-store-access-BUiCzkDB.js +1 -0
- package/dist/ui/assets/provider-store-access-Dum4LRDl.js +1 -0
- package/dist/ui/assets/{providers-C0ZOpyUo.js → providers-D0vvekBQ.js} +1 -1
- package/dist/ui/assets/providers-s1F7GmE9.js +2 -0
- package/dist/ui/assets/{quick-llm-D5BvwAIg.js → quick-llm-j6dAyTk3.js} +1 -1
- package/dist/ui/assets/{realm-inprocess-B6cokKhd.js → realm-inprocess-CLnOkvVF.js} +2 -2
- package/dist/ui/assets/{realm-unhandled-rejections-Be7LHx6d.js → realm-unhandled-rejections-DLfoHmia.js} +1 -1
- package/dist/ui/assets/{realm-unhandled-rejections-C5YXTNtv.js → realm-unhandled-rejections-Pyc_Yywn.js} +1 -1
- package/dist/ui/assets/record-Ban9cWMI.js +1 -0
- package/dist/ui/assets/record-DtD74Jn0.js +1 -0
- package/dist/ui/assets/{recovery-screen-e0y59jaB.js → recovery-screen-BUmrgmsy.js} +1 -1
- package/dist/ui/assets/{remote-terminal-view-DY5NhlfN.js → remote-terminal-view-C-Hj8oAA.js} +3 -3
- package/dist/ui/assets/renamed-providers-BUZBzl5L.js +1 -0
- package/dist/ui/assets/renamed-providers-DDe6My59.js +1 -0
- package/dist/ui/assets/{restore-DDyFEUyi.js → restore-l8tgPxKq.js} +1 -1
- package/dist/ui/assets/{run-1aVr5LLS.js → run-BT657BwR.js} +2 -2
- package/dist/ui/assets/{run-CwX8trIr.js → run-Bj8m57a_.js} +2 -2
- package/dist/ui/assets/{run-CZtMT0UW.js → run-D7FxVJc4.js} +1 -1
- package/dist/ui/assets/{run-CVAZx0m2.js → run-DCE15NzA.js} +1 -1
- package/dist/ui/assets/{run-CRTEPV5c.js → run-DaNuW9og.js} +1 -1
- package/dist/ui/assets/{run-DnxVNWPE.js → run-DcyrwtHx.js} +1 -1
- package/dist/ui/assets/{run-BJGzDxyk.js → run-xC8FUB2Z.js} +2 -2
- package/dist/ui/assets/{serve-command-BkAERAvQ.js → serve-command-B21r3jG_.js} +2 -2
- package/dist/ui/assets/{serve-runtime-CSyDtgVs.js → serve-runtime-BbcsYX3I.js} +1 -1
- package/dist/ui/assets/{session-command-memory-BOhKw7oW.js → session-command-memory-l9ApFSFO.js} +2 -2
- package/dist/ui/assets/{session-jsonl-CVJ9R5Rq.js → session-jsonl-BYCO0I9a.js} +1 -1
- package/dist/ui/assets/{session-jsonl-CEqurmTu.js → session-jsonl-CSOU88vz.js} +1 -1
- package/dist/ui/assets/{session-search-index-XOtFaFT2.js → session-search-index-3mybEW_M.js} +1 -1
- package/dist/ui/assets/{setup-feature-flags-remote-B-VirOkj.js → setup-feature-flags-remote-CLSmsGdK.js} +1 -1
- package/dist/ui/assets/setup-model-catalog-BOpU3mm5.js +1 -0
- package/dist/ui/assets/{silent-renew-backoff-CminHszT.js → silent-renew-backoff-C0Cks-_q.js} +1 -1
- package/dist/ui/assets/slicc-version-UL1MqRLq.js +1 -0
- package/dist/ui/assets/{soundscape-CKh7yLzm.js → soundscape-SNL86WsS.js} +1 -1
- package/dist/ui/assets/{speak-CgQxHra5.js → speak-CxZBHdSG.js} +1 -1
- package/dist/ui/assets/{sprinkle-manager-D1lNcJD2.js → sprinkle-manager-DmTv72o3.js} +1 -1
- package/dist/ui/assets/{sprinkle-renderer-C1AKQbf2.js → sprinkle-renderer-C088Z2du.js} +1 -1
- package/dist/ui/assets/{ssh-CVu8tZ_S.js → ssh-Bqz2CHhO.js} +1 -1
- package/dist/ui/assets/{sudo-8CgZUyow.js → sudo-CgGH1nWr.js} +1 -1
- package/dist/ui/assets/{supervisor-RB5hROJ0.js → supervisor-Clc6jzo1.js} +1 -1
- package/dist/ui/assets/{sync-dialog-mOaP3WSo.js → sync-dialog-Bi9sGuoT.js} +1 -1
- package/dist/ui/assets/system-one-shared-D_uXoohg.js +1 -0
- package/dist/ui/assets/system-one-shared-Do49zet2.js +1 -0
- package/dist/ui/assets/transform-messages-DF4OdhKs.js +1 -0
- package/dist/ui/assets/transform-messages-DuvHh3qm.js +1 -0
- package/dist/ui/assets/{transformers-env-BPNoQ4X7.js → transformers-env-CN_VjXi2.js} +1 -1
- package/dist/ui/assets/{tray-leader-CjMPhQNY.js → tray-leader-Cv5k1C5q.js} +1 -1
- package/dist/ui/assets/{tray-leave-runtime-OnRBQWsq.js → tray-leave-runtime-DNmvjMzs.js} +1 -1
- package/dist/ui/assets/{tray-sidecar-t4dm1U_C.js → tray-sidecar-Ceta0R1c.js} +1 -1
- package/dist/ui/assets/{turn-journal-CVQtwHPx.js → turn-journal-BJ3lAG7q.js} +1 -1
- package/dist/ui/assets/typesafe-system-one-B1zebM2I.js +1 -0
- package/dist/ui/assets/typesafe-system-one-B3Qz9-cZ.js +1 -0
- package/dist/ui/assets/{upgrade-detection-CvWsoSfP.js → upgrade-detection-CQrDUmjN.js} +1 -1
- package/dist/ui/assets/{voice-reply-LyPY66-z.js → voice-reply-COflgUcS.js} +1 -1
- package/dist/ui/assets/wc-attach-CdnSkLjJ.js +13 -0
- package/dist/ui/assets/{wc-browser-k_U7kFtS.js → wc-browser-aoHYpHLG.js} +1 -1
- package/dist/ui/assets/{wc-computers-BKXABDjS.js → wc-computers-B5vnJoiB.js} +1 -1
- package/dist/ui/assets/{wc-detached-DJFxz5jb.js → wc-detached-C6-SQG2h.js} +1 -1
- package/dist/ui/assets/wc-extension-BgJvQcjo.js +2 -0
- package/dist/ui/assets/wc-follower-CEckNoTF.js +17 -0
- package/dist/ui/assets/{wc-follower-oauth-BiHrXTeh.js → wc-follower-oauth-DFirJqdu.js} +1 -1
- package/dist/ui/assets/{wc-gelatiere-ChtRPt5b.js → wc-gelatiere-B22UQpCW.js} +1 -1
- package/dist/ui/assets/wc-live-B88AgkoT.js +248 -0
- package/dist/ui/assets/wc-nav-ByiM69qS.js +2 -0
- package/dist/ui/assets/{wc-onboarding-BbBqVLNY.js → wc-onboarding-BP6ckmvh.js} +2 -2
- package/dist/ui/assets/{wc-permissions-DadG0Lur.js → wc-permissions-CzJm8Vy5.js} +2 -2
- package/dist/ui/assets/wc-placeholder-CScMfgTw.js +4 -0
- package/dist/ui/assets/{wc-secret-request-B18qHj4I.js → wc-secret-request-CLvYlRbO.js} +1 -1
- package/dist/ui/assets/{wc-settings-DzPcEdim.js → wc-settings-Cnn5g7GW.js} +3 -3
- package/dist/ui/assets/{wc-shell-BeGVTjhP.js → wc-shell-DQ63Uu06.js} +4 -4
- package/dist/ui/assets/{wc-shortcut-config-QgREiwAI.js → wc-shortcut-config-DDSaSoFX.js} +1 -1
- package/dist/ui/assets/wc-sprinkles-DVDFpasV.js +2 -0
- package/dist/ui/assets/wc-transcript-export-tZ99xlcb.js +2 -0
- package/dist/ui/assets/wc-tray-wFWMCf2U.js +5 -0
- package/dist/ui/assets/{wc-unit-context-CZro7UrY.js → wc-unit-context-D5liISq3.js} +1 -1
- package/dist/ui/assets/welcome-detection-DOSSqBIu.js +1 -0
- package/dist/ui/assets/whisper-session-DjRUnpJX.js +2 -0
- package/dist/ui/assets/xai-grok-Cf4LDhyH.js +1 -0
- package/dist/ui/assets/xai-grok-DNP_69yB.js +1 -0
- package/dist/ui/index.html +12 -11
- package/dist/ui/packages/webapp/index.html +12 -11
- package/package.json +1 -1
- package/dist/ui/assets/account-store-CDJ2a01U.js +0 -1
- package/dist/ui/assets/account-store-DmRIEeKD.js +0 -2
- package/dist/ui/assets/adobe-C6KwRVMm.js +0 -2
- package/dist/ui/assets/adobe-QGrvyCz5.js +0 -1
- package/dist/ui/assets/anthropic-messages-COqhstcs.js +0 -40
- package/dist/ui/assets/anthropic-messages-CjSN1VV8.js +0 -41
- package/dist/ui/assets/azure-openai-responses-BG1E_58j.js +0 -1
- package/dist/ui/assets/azure-openai-responses-DT2eVjgI.js +0 -1
- package/dist/ui/assets/build-Dnkjpm_v.js +0 -3
- package/dist/ui/assets/cloudflare-workers-ai-system-one-CfgjeR2q.js +0 -1
- package/dist/ui/assets/cloudflare-workers-ai-system-one-DBa2hfSp.js +0 -1
- package/dist/ui/assets/compat-BAGLwgqY.js +0 -2
- package/dist/ui/assets/compat-nGhSz-U1.js +0 -1
- package/dist/ui/assets/context-CrZ58_Xy.js +0 -1
- package/dist/ui/assets/core-BFRZk2b-.js +0 -62
- package/dist/ui/assets/core-EGZ5TU35.js +0 -36
- package/dist/ui/assets/diagnostics-Cag7MsZI.js +0 -1
- package/dist/ui/assets/dist-Cu98pw2t.js +0 -9
- package/dist/ui/assets/dist-xQGtC96q.js +0 -4
- package/dist/ui/assets/edit-dC5128uh.js +0 -16
- package/dist/ui/assets/env-api-keys-BXRkymgV.js +0 -1
- package/dist/ui/assets/env-api-keys-CPPAm2nU.js +0 -1
- package/dist/ui/assets/error-CJ3RHG07.js +0 -1
- package/dist/ui/assets/github-copilot-DIBlC63Z.js +0 -2
- package/dist/ui/assets/google-generative-ai-BiB1UYSx.js +0 -1
- package/dist/ui/assets/google-vertex-B2qHfYD5.js +0 -1
- package/dist/ui/assets/kernel-worker-Yrt1LuLv.js +0 -1260
- package/dist/ui/assets/libesm-BypnjKEL.js +0 -13
- package/dist/ui/assets/main-bbC4wIXo.js +0 -22
- package/dist/ui/assets/models-CET5SEuw.js +0 -8
- package/dist/ui/assets/models-Xc0Gclrk.js +0 -8
- package/dist/ui/assets/new-session-CQJNUpUX.js +0 -2
- package/dist/ui/assets/node.browser-3Nibdso-.js +0 -1
- package/dist/ui/assets/node.browser-DFtqp6Hr.js +0 -1
- package/dist/ui/assets/oauth-bootstrap-CkaHhcfV.js +0 -2
- package/dist/ui/assets/openai-completions-Dx5kqcwu.js +0 -5
- package/dist/ui/assets/openai-completions-nAjVDcoU.js +0 -5
- package/dist/ui/assets/openai-responses-BzrpHAlB.js +0 -1
- package/dist/ui/assets/openai-responses-CnpU2GL3.js +0 -1
- package/dist/ui/assets/openrouter.models-BWF0jSAQ.js +0 -1
- package/dist/ui/assets/openrouter.models-DHpsqCCC.js +0 -1
- package/dist/ui/assets/panel-rpc-handlers-Q7Onn8CV.js +0 -2
- package/dist/ui/assets/pi-edit-execution-CqQRMS94.js +0 -2
- package/dist/ui/assets/pi-transcript-context-4pjVPiVC.js +0 -1
- package/dist/ui/assets/provider-store-access-DaIGmNhr.js +0 -1
- package/dist/ui/assets/provider-store-access-DvRuksc2.js +0 -1
- package/dist/ui/assets/providers-CA0WVcn4.js +0 -2
- package/dist/ui/assets/record-CBv8rWFt.js +0 -1
- package/dist/ui/assets/record-COQlaFL1.js +0 -1
- package/dist/ui/assets/setup-model-catalog-CB1b-8rG.js +0 -1
- package/dist/ui/assets/slicc-version-Ddt_Udk9.js +0 -1
- package/dist/ui/assets/system-one-shared-B0og9uUi.js +0 -1
- package/dist/ui/assets/system-one-shared-iVEDyuts.js +0 -1
- package/dist/ui/assets/transform-messages-BeurHGV0.js +0 -1
- package/dist/ui/assets/transform-messages-k2mfzJwY.js +0 -1
- package/dist/ui/assets/typesafe-system-one-D_iVKLH6.js +0 -1
- package/dist/ui/assets/typesafe-system-one-Ds8-mdzH.js +0 -1
- package/dist/ui/assets/wc-attach-DxjWEg8W.js +0 -13
- package/dist/ui/assets/wc-extension-CCj12o2_.js +0 -2
- package/dist/ui/assets/wc-follower-yHGrKVtf.js +0 -17
- package/dist/ui/assets/wc-live-D8Nh84rj.js +0 -248
- package/dist/ui/assets/wc-nav-CkRCT8hx.js +0 -2
- package/dist/ui/assets/wc-placeholder-CvIvwf-6.js +0 -4
- package/dist/ui/assets/wc-sprinkles-B6D8C3QF.js +0 -2
- package/dist/ui/assets/wc-transcript-export-DVQxHFUf.js +0 -2
- package/dist/ui/assets/wc-tray-gC6RCtTD.js +0 -5
- package/dist/ui/assets/welcome-detection-D6QVWgHU.js +0 -1
- package/dist/ui/assets/whisper-session-BGOkv9WY.js +0 -2
- package/dist/ui/assets/xai-grok-CWY2weXy.js +0 -1
- package/dist/ui/assets/xai-grok-xRvTAXQ3.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e,t}from"./rolldown-runtime-Dd_uD5pT.js";import{n}from"./libesm-CTQYxJIv.js";var r=t((e=>{(function(){var t={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function n(e){return i(o(e),arguments)}function r(e,t){return n.apply(null,[e].concat(t||[]))}function i(e,r){var i=1,a=e.length,o,s=``,c,l,u,d,f,p,m,h;for(c=0;c<a;c++)if(typeof e[c]==`string`)s+=e[c];else if(typeof e[c]==`object`){if(u=e[c],u.keys)for(o=r[i],l=0;l<u.keys.length;l++){if(o==null)throw Error(n(`[sprintf] Cannot access property "%s" of undefined value "%s"`,u.keys[l],u.keys[l-1]));o=o[u.keys[l]]}else o=u.param_no?r[u.param_no]:r[i++];if(t.not_type.test(u.type)&&t.not_primitive.test(u.type)&&o instanceof Function&&(o=o()),t.numeric_arg.test(u.type)&&typeof o!=`number`&&isNaN(o))throw TypeError(n(`[sprintf] expecting number but found %T`,o));switch(t.number.test(u.type)&&(m=o>=0),u.type){case`b`:o=parseInt(o,10).toString(2);break;case`c`:o=String.fromCharCode(parseInt(o,10));break;case`d`:case`i`:o=parseInt(o,10);break;case`j`:o=JSON.stringify(o,null,u.width?parseInt(u.width):0);break;case`e`:o=u.precision?parseFloat(o).toExponential(u.precision):parseFloat(o).toExponential();break;case`f`:o=u.precision?parseFloat(o).toFixed(u.precision):parseFloat(o);break;case`g`:o=u.precision?String(Number(o.toPrecision(u.precision))):parseFloat(o);break;case`o`:o=(parseInt(o,10)>>>0).toString(8);break;case`s`:o=String(o),o=u.precision?o.substring(0,u.precision):o;break;case`t`:o=String(!!o),o=u.precision?o.substring(0,u.precision):o;break;case`T`:o=Object.prototype.toString.call(o).slice(8,-1).toLowerCase(),o=u.precision?o.substring(0,u.precision):o;break;case`u`:o=parseInt(o,10)>>>0;break;case`v`:o=o.valueOf(),o=u.precision?o.substring(0,u.precision):o;break;case`x`:o=(parseInt(o,10)>>>0).toString(16);break;case`X`:o=(parseInt(o,10)>>>0).toString(16).toUpperCase()}t.json.test(u.type)?s+=o:(t.number.test(u.type)&&(!m||u.sign)?(h=m?`+`:`-`,o=o.toString().replace(t.sign,``)):h=``,f=u.pad_char?u.pad_char===`0`?`0`:u.pad_char.charAt(1):` `,p=u.width-(h+o).length,d=u.width&&p>0?f.repeat(p):``,s+=u.align?h+o+d:f===`0`?h+d+o:d+h+o)}return s}var a=Object.create(null);function o(e){if(a[e])return a[e];for(var n=e,r,i=[],o=0;n;){if((r=t.text.exec(n))!==null)i.push(r[0]);else if((r=t.modulo.exec(n))!==null)i.push(`%`);else if((r=t.placeholder.exec(n))!==null){if(r[2]){o|=1;var s=[],c=r[2],l=[];if((l=t.key.exec(c))!==null)for(s.push(l[1]);(c=c.substring(l[0].length))!==``;)if((l=t.key_access.exec(c))!==null)s.push(l[1]);else if((l=t.index_access.exec(c))!==null)s.push(l[1]);else throw SyntaxError(`[sprintf] failed to parse named argument key`);else throw SyntaxError(`[sprintf] failed to parse named argument key`);r[2]=s}else o|=2;if(o===3)throw Error(`[sprintf] mixing positional and named placeholders is not (yet) supported`);i.push({placeholder:r[0],param_no:r[1],keys:r[2],sign:r[3],pad_char:r[4],align:r[5],width:r[6],precision:r[7],type:r[8]})}else throw SyntaxError(`[sprintf] unexpected placeholder`);n=n.substring(r[0].length)}return a[e]=i}e!==void 0&&(e.sprintf=n,e.vsprintf=r),typeof window<`u`&&(window.sprintf=n,window.vsprintf=r,typeof define==`function`&&define.amd&&define(function(){return{sprintf:n,vsprintf:r}}))})()}))();const i=(e,t,n)=>{let r=e instanceof RegExp?a(e,n):e,i=t instanceof RegExp?a(t,n):t,s=r!==null&&i!=null&&o(r,i,n);return s&&{start:s[0],end:s[1],pre:n.slice(0,s[0]),body:n.slice(s[0]+r.length,s[1]),post:n.slice(s[1]+i.length)}},a=(e,t)=>{let n=t.match(e);return n?n[0]:null},o=(e,t,n)=>{let r,i,a,o,s,c=n.indexOf(e),l=n.indexOf(t,c+1),u=c;if(c>=0&&l>0){if(e===t)return[c,l];for(r=[],a=n.length;u>=0&&!s;){if(u===c)r.push(u),c=n.indexOf(e,u+1);else if(r.length===1){let e=r.pop();e!==void 0&&(s=[e,l])}else i=r.pop(),i!==void 0&&i<a&&(a=i,o=l),l=n.indexOf(t,u+1);u=c<l&&c>=0?c:l}r.length&&o!==void 0&&(s=[a,o])}return s},s=`\0SLASH`+Math.random()+`\0`,c=`\0OPEN`+Math.random()+`\0`,l=`\0CLOSE`+Math.random()+`\0`,u=`\0COMMA`+Math.random()+`\0`,d=`\0PERIOD`+Math.random()+`\0`,f=new RegExp(s,`g`),p=new RegExp(c,`g`),m=new RegExp(l,`g`),h=new RegExp(u,`g`),g=new RegExp(d,`g`),_=/\\\\/g,v=/\\{/g,y=/\\}/g,b=/\\,/g,x=/\\\./g;function S(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function ee(e){return e.replace(_,s).replace(v,c).replace(y,l).replace(b,u).replace(x,d)}function C(e){return e.replace(f,`\\`).replace(p,`{`).replace(m,`}`).replace(h,`,`).replace(g,`.`)}function te(e,t){for(let n=0;n<t.length;n++)e.push(t[n])}function ne(e){let t=[],n=``;for(;;){let r=i(`{`,`}`,e);if(!r){let r=e.split(`,`);return r[0]=n+r[0],te(t,r),t}let{pre:a,body:o,post:s}=r,c=a.split(`,`);if(c[0]=n+c[0],c[c.length-1]+=`{`+o+`}`,!s.length)return te(t,c),t;n=c.pop(),te(t,c),e=s}}function w(e,t={}){if(!e)return[];let{max:n=1e5,maxLength:r=4e6,maxDepth:i=1e3,maxRewrites:a=1e3}=t;return e.slice(0,2)===`{}`&&(e=`\\{\\}`+e.slice(2)),le(ee(e),n,r,i,0,a,!0).map(C)}function re(e){return`{`+e+`}`}function ie(e){return/^-?0\d/.test(e)}function ae(e,t){return e<=t}function oe(e,t){return e>=t}function se(e,t,n,r,i,a){let o=[],s=0;for(let c=0;c<e.length;c++)for(let l=0;l<n.length;l++){if(o.length>=r)return o;let u=e[c]+t+n[l];if(!(a&&!u)){if(s+u.length>i)return o;o.push(u),s+=u.length}}return o}function ce(e,t,n,r){let i=e.split(/\.\./),a=[];if(i[0]===void 0||i[1]===void 0)return a;let o=S(i[0]),s=S(i[1]),c=Math.max(i[0].length,i[1].length),l=i.length===3&&i[2]!==void 0?Math.max(Math.abs(S(i[2])),1):1,u=ae;s<o&&(l*=-1,u=oe);let d=i.some(ie),f=0;for(let e=o;u(e,s)&&a.length<n;e+=l){let n;if(t)n=String.fromCharCode(e),n===`\\`&&(n=``);else if(n=String(e),d){let t=c-n.length;if(t>0){let r=Array(t+1).join(`0`);n=e<0?`-`+r+n.slice(1):r+n}}if(f+n.length>r)break;a.push(n),f+=n.length}return a}function le(e,t,n,r,a,o,s){if(a>r)return[e];let c=[``],u=0,d=!1,f=!0;for(;;){let p=i(`{`,`}`,e);if(!p)return se(c,e,[``],t,n,d);let m=p.pre;if(/\$$/.test(m)){if(c=se(c,m+`{`+p.body+`}`,[``],t,n,d&&!p.post.length),f=!1,!p.post.length)break;e=p.post;continue}let h=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(p.body),g=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(p.body),_=h||g,v=p.body.indexOf(`,`)>=0;if(!_&&!v){if(u<o&&p.post.match(/,(?!,).*\}/)){u++,e=p.pre+`{`+p.body+l+p.post,s=!0;continue}return se(c,m+`{`+p.body+`}`+p.post,[``],t,n,d)}f&&=(d=s&&!_,!1);let y;if(_)y=ce(p.body,g,t,n);else{let i=ne(p.body);if(i.length===1&&i[0]!==void 0&&(i=le(i[0],t,n,r,a+1,o,!1).map(re),i.length===1)){if(c=se(c,m+i[0],[``],t,n,d&&!p.post.length),!p.post.length)break;e=p.post;continue}let s=d&&!p.post.length&&!m;for(let e=0;s&&e<c.length;e++)c[e]&&(s=!1);y=[];let l=0;outer:for(let e=0;e<i.length;e++){let c=le(i[e],t,n,r,a+1,o,!1);for(let e=0;e<c.length;e++){let r=c[e];if(!(s&&!r)){if(y.length>=t||l+r.length>n)break outer;y.push(r),l+=r.length}}}}if(c=se(c,m,y,t,n,d&&!p.post.length),!p.post.length)break;e=p.post}return c}const ue=e=>{if(typeof e!=`string`)throw TypeError(`invalid pattern`);if(e.length>65536)throw TypeError(`pattern is too long`)},de={"[:alnum:]":[`\\p{L}\\p{Nl}\\p{Nd}`,!0],"[:alpha:]":[`\\p{L}\\p{Nl}`,!0],"[:ascii:]":[`\\x00-\\x7f`,!1],"[:blank:]":[`\\p{Zs}\\t`,!0],"[:cntrl:]":[`\\p{Cc}`,!0],"[:digit:]":[`\\p{Nd}`,!0],"[:graph:]":[`\\p{Z}\\p{C}`,!0,!0],"[:lower:]":[`\\p{Ll}`,!0],"[:print:]":[`\\p{C}`,!0],"[:punct:]":[`\\p{P}`,!0],"[:space:]":[`\\p{Z}\\t\\r\\n\\v\\f`,!0],"[:upper:]":[`\\p{Lu}`,!0],"[:word:]":[`\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}`,!0],"[:xdigit:]":[`A-Fa-f0-9`,!1]},fe=e=>e.replace(/[[\]\\-]/g,`\\$&`),pe=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`),me=e=>e.join(``),he=(e,t)=>{let n=t;if(e.charAt(n)!==`[`)throw Error(`not in a brace expression`);let r=[],i=[],a=n+1,o=!1,s=!1,c=!1,l=!1,u=n,d=``;WHILE:for(;a<e.length;){let t=e.charAt(a);if((t===`!`||t===`^`)&&a===n+1){l=!0,a++;continue}if(t===`]`&&o&&!c){u=a+1;break}if(o=!0,t===`\\`&&!c){c=!0,a++;continue}if(t===`[`&&!c){for(let[t,[o,c,l]]of Object.entries(de))if(e.startsWith(t,a)){if(d)return[`$.`,!1,e.length-n,!0];a+=t.length,l?i.push(o):r.push(o),s||=c;continue WHILE}}if(c=!1,d){t>d?r.push(fe(d)+`-`+fe(t)):t===d&&r.push(fe(t)),d=``,a++;continue}if(e.startsWith(`-]`,a+1)){r.push(fe(t+`-`)),a+=2;continue}if(e.startsWith(`-`,a+1)){d=t,a+=2;continue}r.push(fe(t)),a++}if(u<a)return[``,!1,0,!1];if(!r.length&&!i.length)return[`$.`,!1,e.length-n,!0];if(i.length===0&&r.length===1&&/^\\?.$/.test(r[0])&&!l){let e=r[0].length===2?r[0].slice(-1):r[0];return[pe(e),!1,u-n,!1]}let f=`[`+(l?`^`:``)+me(r)+`]`,p=`[`+(l?``:`^`)+me(i)+`]`;return[r.length&&i.length?`(`+f+`|`+p+`)`:r.length?f:p,s,u-n,!0]},ge=(e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!0}={})=>n?t?e.replace(/\[([^/\\])\]/g,`$1`):e.replace(/((?!\\).|^)\[([^/\\])\]/g,`$1$2`).replace(/\\([^/])/g,`$1`):t?e.replace(/\[([^/\\{}])\]/g,`$1`):e.replace(/((?!\\).|^)\[([^/\\{}])\]/g,`$1$2`).replace(/\\([^/{}])/g,`$1`);var _e;const ve=new Set([`!`,`?`,`+`,`*`,`@`]),ye=e=>ve.has(e),be=e=>ye(e.type),xe=new Map([[`!`,[`@`]],[`?`,[`?`,`@`]],[`@`,[`@`]],[`*`,[`*`,`+`,`?`,`@`]],[`+`,[`+`,`@`]]]),Se=new Map([[`!`,[`?`]],[`@`,[`?`]],[`+`,[`?`,`*`]]]),Ce=new Map([[`!`,[`?`,`@`]],[`?`,[`?`,`@`]],[`@`,[`?`,`@`]],[`*`,[`*`,`+`,`?`,`@`]],[`+`,[`+`,`@`,`?`,`*`]]]),we=new Map([[`!`,new Map([[`!`,`@`]])],[`?`,new Map([[`*`,`*`],[`+`,`*`]])],[`@`,new Map([[`!`,`!`],[`?`,`?`],[`@`,`@`],[`*`,`*`],[`+`,`+`]])],[`+`,new Map([[`?`,`*`],[`*`,`*`]])]]),Te=`(?!\\.)`,Ee=new Set([`[`,`.`]),De=new Set([`..`,`.`]),Oe=new Set(`().*{}+?[]^$\\!`),ke=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`),Ae=`[^/]+?`;let je=0;var Me=class{type;#e;#t;#n=!1;#r=[];#i;#a;#o;#s=!1;#c;#l;#u=!1;id=++je;get depth(){return(this.#i?.depth??-1)+1}[Symbol.for(`nodejs.util.inspect.custom`)](){return{"@@type":`AST`,id:this.id,type:this.type,root:this.#e.id,parent:this.#i?.id,depth:this.depth,partsLength:this.#r.length,parts:this.#r}}constructor(e,t,n={}){this.type=e,e&&(this.#t=!0),this.#i=t,this.#e=this.#i?this.#i.#e:this,this.#c=this.#e===this?n:this.#e.#c,this.#o=this.#e===this?[]:this.#e.#o,e===`!`&&!this.#e.#s&&this.#o.push(this),this.#a=this.#i?this.#i.#r.length:0}get hasMagic(){if(this.#t!==void 0)return this.#t;for(let e of this.#r)if(typeof e!=`string`&&(e.type||e.hasMagic))return this.#t=!0;return this.#t}toString(){return this.#l===void 0?this.#l=this.type?this.type+`(`+this.#r.map(e=>String(e)).join(`|`)+`)`:this.#r.map(e=>String(e)).join(``):this.#l}#d(){if(this!==this.#e)throw Error(`should only call on root`);if(this.#s)return this;this.toString(),this.#s=!0;let e;for(;e=this.#o.pop();){if(e.type!==`!`)continue;let t=e,n=t.#i;for(;n;){for(let r=t.#a+1;!n.type&&r<n.#r.length;r++)for(let t of e.#r){if(typeof t==`string`)throw Error(`string part in extglob AST??`);t.copyIn(n.#r[r])}t=n,n=t.#i}}return this}push(...e){for(let t of e)if(t!==``){if(typeof t!=`string`&&!(t instanceof _e&&t.#i===this))throw Error(`invalid part: `+t);this.#r.push(t)}}toJSON(){let e=this.type===null?this.#r.slice().map(e=>typeof e==`string`?e:e.toJSON()):[this.type,...this.#r.map(e=>e.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#s&&this.#i?.type===`!`)&&e.push({}),e}isStart(){if(this.#e===this)return!0;if(!this.#i?.isStart())return!1;if(this.#a===0)return!0;let e=this.#i;for(let t=0;t<this.#a;t++){let n=e.#r[t];if(!(n instanceof _e&&n.type===`!`))return!1}return!0}isEnd(){if(this.#e===this||this.#i?.type===`!`)return!0;if(!this.#i?.isEnd())return!1;if(!this.type)return this.#i?.isEnd();let e=this.#i?this.#i.#r.length:0;return this.#a===e-1}copyIn(e){typeof e==`string`?this.push(e):this.push(e.clone(this))}clone(e){let t=new _e(this.type,e);for(let e of this.#r)t.copyIn(e);return t}static#f(e,t,n,r,i){let a=r.maxExtglobRecursion??2,o=!1,s=!1,c=-1,l=!1;if(t.type===null){let u=n,d=``;for(;u<e.length;){let n=e.charAt(u++);if(o||n===`\\`){o=!o,d+=n;continue}if(s){u===c+1?(n===`^`||n===`!`)&&(l=!0):n===`]`&&!(u===c+2&&l)&&(s=!1),d+=n;continue}if(n===`[`){s=!0,c=u,l=!1,d+=n;continue}if(!r.noext&&ye(n)&&e.charAt(u)===`(`&&i<=a){t.push(d),d=``;let a=new _e(n,t);u=_e.#f(e,a,u,r,i+1),t.push(a);continue}d+=n}return t.push(d),u}let u=n+1,d=new _e(null,t),f=[],p=``;for(;u<e.length;){let n=e.charAt(u++);if(o||n===`\\`){o=!o,p+=n;continue}if(s){u===c+1?(n===`^`||n===`!`)&&(l=!0):n===`]`&&!(u===c+2&&l)&&(s=!1),p+=n;continue}if(n===`[`){s=!0,c=u,l=!1,p+=n;continue}if(!r.noext&&ye(n)&&e.charAt(u)===`(`&&(i<=a||t&&t.#h(n))){let a=t&&t.#h(n)?0:1;d.push(p),p=``;let o=new _e(n,d);d.push(o),u=_e.#f(e,o,u,r,i+a);continue}if(n===`|`){d.push(p),p=``,f.push(d),d=new _e(null,t);continue}if(n===`)`)return p===``&&t.#r.length===0&&(t.#u=!0),d.push(p),p=``,t.push(...f,d),u;p+=n}return t.type=null,t.#t=void 0,t.#r=[e.substring(n-1)],u}#p(e){return this.#m(e,Se)}#m(e,t=xe){if(!e||typeof e!=`object`||e.type!==null||e.#r.length!==1||this.type===null)return!1;let n=e.#r[0];return!n||typeof n!=`object`||n.type===null?!1:this.#h(n.type,t)}#h(e,t=Ce){return!!t.get(this.type)?.includes(e)}#g(e,t){let n=e.#r[0],r=new _e(null,n,this.options);r.#r.push(``),n.push(r),this.#_(e,t)}#_(e,t){let n=e.#r[0];this.#r.splice(t,1,...n.#r);for(let e of n.#r)typeof e==`object`&&(e.#i=this);this.#l=void 0}#v(e){return!!we.get(this.type)?.has(e)}#y(e){if(!e||typeof e!=`object`||e.type!==null||e.#r.length!==1||this.type===null||this.#r.length!==1)return!1;let t=e.#r[0];return!t||typeof t!=`object`||t.type===null?!1:this.#v(t.type)}#b(e){let t=we.get(this.type),n=e.#r[0],r=t?.get(n.type);if(!r)return!1;this.#r=n.#r;for(let e of this.#r)typeof e==`object`&&(e.#i=this);this.type=r,this.#l=void 0,this.#u=!1}static fromGlob(e,t={}){let n=new _e(null,void 0,t);return _e.#f(e,n,0,t,0),n}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let e=this.toString(),[t,n,r,i]=this.toRegExpSource();if(!(r||this.#t||this.#c.nocase&&!this.#c.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return n;let a=(this.#c.nocase?`i`:``)+(i?`u`:``);return Object.assign(RegExp(`^${t}$`,a),{_src:t,_glob:e})}get options(){return this.#c}toRegExpSource(e){let t=e??!!this.#c.dot;if(this.#e===this&&(this.#x(),this.#d()),!be(this)){let n=this.isStart()&&this.isEnd()&&!this.#r.some(e=>typeof e!=`string`),r=this.#r.map(t=>{let[r,i,a,o]=typeof t==`string`?_e.#C(t,this.#t,n):t.toRegExpSource(e);return this.#t=this.#t||a,this.#n=this.#n||o,r}).join(``),i=``;if(this.isStart()&&typeof this.#r[0]==`string`&&!(this.#r.length===1&&De.has(this.#r[0]))){let n=Ee,a=t&&n.has(r.charAt(0))||r.startsWith(`\\.`)&&n.has(r.charAt(2))||r.startsWith(`\\.\\.`)&&n.has(r.charAt(4)),o=!t&&!e&&n.has(r.charAt(0));i=a?`(?!(?:^|/)\\.\\.?(?:$|/))`:o?Te:``}let a=``;return this.isEnd()&&this.#e.#s&&this.#i?.type===`!`&&(a=`(?:$|\\/)`),[i+r+a,ge(r),this.#t=!!this.#t,this.#n]}let n=this.type===`*`||this.type===`+`,r=this.type===`!`?`(?:(?!(?:`:`(?:`,i=this.#S(t);if(this.isStart()&&this.isEnd()&&!i&&this.type!==`!`){let e=this.toString(),t=this;return t.#r=[e],t.type=null,t.#t=void 0,[e,ge(this.toString()),!1,!1]}let a=!n||e||t?``:this.#S(!0);a===i&&(a=``),a&&(i=`(?:${i})(?:${a})*?`);let o=``;if(this.type===`!`&&this.#u)o=(this.isStart()&&!t?Te:``)+Ae;else{let n=this.type===`!`?`))`+(this.isStart()&&!t&&!e?Te:``)+`[^/]*?)`:this.type===`@`?`)`:this.type===`?`?`)?`:this.type===`+`&&a?`)`:this.type===`*`&&a?`)?`:`)${this.type}`;o=r+i+n}return[o,ge(i),this.#t=!!this.#t,this.#n]}#x(){if(be(this)){let e=0,t=!1;do{t=!0;for(let e=0;e<this.#r.length;e++){let n=this.#r[e];typeof n==`object`&&(n.#x(),this.#m(n)?(t=!1,this.#_(n,e)):this.#p(n)?(t=!1,this.#g(n,e)):this.#y(n)&&(t=!1,this.#b(n)))}}while(!t&&++e<10)}else for(let e of this.#r)typeof e==`object`&&e.#x();this.#l=void 0}#S(e){return this.#r.map(t=>{if(typeof t==`string`)throw Error(`string type in extglob ast??`);let[n,r,i,a]=t.toRegExpSource(e);return this.#n=this.#n||a,n}).filter(e=>!(this.isStart()&&this.isEnd())||!!e).join(`|`)}static#C(e,t,n=!1){let r=!1,i=``,a=!1,o=!1;for(let s=0;s<e.length;s++){let c=e.charAt(s);if(r){r=!1,i+=(Oe.has(c)?`\\`:``)+c;continue}if(c===`*`){if(o)continue;o=!0,i+=n&&/^[*]+$/.test(e)?Ae:`[^/]*?`,t=!0;continue}if(o=!1,c===`\\`){s===e.length-1?i+=`\\\\`:r=!0;continue}if(c===`[`){let[n,r,o,c]=he(e,s);if(o){i+=n,a||=r,s+=o-1,t||=c;continue}}if(c===`?`){i+=`[^/]`,t=!0;continue}i+=ke(c)}return[i,ge(e),!!t,a]}};_e=Me;const Ne=(e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!1}={})=>n?t?e.replace(/[?*()[\]{}]/g,`[$&]`):e.replace(/[?*()[\]\\{}]/g,`\\$&`):t?e.replace(/[?*()[\]]/g,`[$&]`):e.replace(/[?*()[\]\\]/g,`\\$&`),Pe=(e,t,n={})=>(ue(t),!n.nocomment&&t.charAt(0)===`#`?!1:new ct(t,n).match(e)),Fe=/^\*+([^+@!?*[(]*)$/,Ie=e=>t=>!t.startsWith(`.`)&&t.endsWith(e),Le=e=>t=>t.endsWith(e),Re=e=>(e=e.toLowerCase(),t=>!t.startsWith(`.`)&&t.toLowerCase().endsWith(e)),ze=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),Be=/^\*+\.\*+$/,Ve=e=>!e.startsWith(`.`)&&e.includes(`.`),He=e=>e!==`.`&&e!==`..`&&e.includes(`.`),Ue=/^\.\*+$/,We=e=>e!==`.`&&e!==`..`&&e.startsWith(`.`),Ge=/^\*+$/,Ke=e=>e.length!==0&&!e.startsWith(`.`),qe=e=>e.length!==0&&e!==`.`&&e!==`..`,Je=/^\?+([^+@!?*[(]*)?$/,Ye=([e,t=``])=>{let n=$e([e]);return t?(t=t.toLowerCase(),e=>n(e)&&e.toLowerCase().endsWith(t)):n},Xe=([e,t=``])=>{let n=et([e]);return t?(t=t.toLowerCase(),e=>n(e)&&e.toLowerCase().endsWith(t)):n},Ze=([e,t=``])=>{let n=et([e]);return t?e=>n(e)&&e.endsWith(t):n},Qe=([e,t=``])=>{let n=$e([e]);return t?e=>n(e)&&e.endsWith(t):n},$e=([e])=>{let t=e.length;return e=>e.length===t&&!e.startsWith(`.`)},et=([e])=>{let t=e.length;return e=>e.length===t&&e!==`.`&&e!==`..`},tt=typeof process==`object`&&process?{}.__MINIMATCH_TESTING_PLATFORM__||process.platform:`posix`,nt={win32:{sep:`\\`},posix:{sep:`/`}};Pe.sep=tt===`win32`?nt.win32.sep:nt.posix.sep;const rt=Symbol(`globstar **`);Pe.GLOBSTAR=rt,Pe.filter=(e,t={})=>n=>Pe(n,e,t);const it=(e,t={})=>Object.assign({},e,t);Pe.defaults=e=>{if(!e||typeof e!=`object`||!Object.keys(e).length)return Pe;let t=Pe;return Object.assign((n,r,i={})=>t(n,r,it(e,i)),{Minimatch:class extends t.Minimatch{constructor(t,n={}){super(t,it(e,n))}static defaults(n){return t.defaults(it(e,n)).Minimatch}},AST:class extends t.AST{constructor(t,n,r={}){super(t,n,it(e,r))}static fromGlob(n,r={}){return t.AST.fromGlob(n,it(e,r))}},unescape:(n,r={})=>t.unescape(n,it(e,r)),escape:(n,r={})=>t.escape(n,it(e,r)),filter:(n,r={})=>t.filter(n,it(e,r)),defaults:n=>t.defaults(it(e,n)),makeRe:(n,r={})=>t.makeRe(n,it(e,r)),braceExpand:(n,r={})=>t.braceExpand(n,it(e,r)),match:(n,r,i={})=>t.match(n,r,it(e,i)),sep:t.sep,GLOBSTAR:rt})};const at=(e,t={})=>(ue(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:w(e,{max:t.braceExpandMax}));Pe.braceExpand=at,Pe.makeRe=(e,t={})=>new ct(e,t).makeRe(),Pe.match=(e,t,n={})=>{let r=new ct(t,n);return e=e.filter(e=>r.match(e)),r.options.nonull&&!e.length&&e.push(t),e};const ot=/[?*]|[+@!]\(.*?\)|\[|\]/,st=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`);var ct=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(e,t={}){ue(e),t||={},this.options=t,this.maxGlobstarRecursion=t.maxGlobstarRecursion??200,this.pattern=e,this.platform=t.platform||tt,this.isWindows=this.platform===`win32`,this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,`/`)),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=t.windowsNoMagicRoot===void 0?!!(this.isWindows&&this.nocase):t.windowsNoMagicRoot,this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let t of e)if(typeof t!=`string`)return!0;return!1}debug(...e){}make(){let e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)===`#`){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=(...e)=>console.error(...e)),this.debug(this.pattern,this.globSet);let n=this.globSet.map(e=>this.slashSplit(e));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let r=this.globParts.map((e,t,n)=>{if(this.isWindows&&this.windowsNoMagicRoot){let t=e[0]===``&&e[1]===``&&(e[2]===`?`||!ot.test(e[2]))&&!ot.test(e[3]),n=/^[a-z]:/i.test(e[0]);if(t)return[...e.slice(0,4),...e.slice(4).map(e=>this.parse(e))];if(n)return[e[0],...e.slice(1).map(e=>this.parse(e))]}return e.map(e=>this.parse(e))});if(this.debug(this.pattern,r),this.set=r.filter(e=>e.indexOf(!1)===-1),this.isWindows)for(let e=0;e<this.set.length;e++){let t=this.set[e];t[0]===``&&t[1]===``&&this.globParts[e][2]===`?`&&typeof t[3]==`string`&&/^[a-z]:$/i.test(t[3])&&(t[2]=`?`)}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let t of e)for(let e=0;e<t.length;e++)t[e]===`**`&&(t[e]=`*`);let{optimizationLevel:t=1}=this.options;return t>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):e=t>=1?this.levelOneOptimize(e):this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(e=>{let t=-1;for(;(t=e.indexOf(`**`,t+1))!==-1;){let n=t;for(;e[n+1]===`**`;)n++;n!==t&&e.splice(t,n-t)}return e})}levelOneOptimize(e){return e.map(e=>(e=e.reduce((e,t)=>{let n=e[e.length-1];return t===`**`&&n===`**`?e:t===`..`&&n&&n!==`..`&&n!==`.`&&n!==`**`?(e.pop(),e):(e.push(t),e)},[]),e.length===0?[``]:e))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let n=1;n<e.length-1;n++){let r=e[n];(n!==1||r!==``||e[0]!==``)&&(r===`.`||r===``)&&(t=!0,e.splice(n,1),n--)}e[0]===`.`&&e.length===2&&(e[1]===`.`||e[1]===``)&&(t=!0,e.pop())}let n=0;for(;(n=e.indexOf(`..`,n+1))!==-1;){let r=e[n-1];r&&r!==`.`&&r!==`..`&&r!==`**`&&!(this.isWindows&&/^[a-z]:$/i.test(r))&&(t=!0,e.splice(n-1,2),n-=2)}}while(t);return e.length===0?[``]:e}firstPhasePreProcess(e){let t=!1;do{t=!1;for(let n of e){let r=-1;for(;(r=n.indexOf(`**`,r+1))!==-1;){let i=r;for(;n[i+1]===`**`;)i++;i>r&&n.splice(r+1,i-r);let a=n[r+1],o=n[r+2],s=n[r+3];if(a!==`..`||!o||o===`.`||o===`..`||!s||s===`.`||s===`..`)continue;t=!0,n.splice(r,1);let c=n.slice(0);c[r]=`**`,e.push(c),r--}if(!this.preserveMultipleSlashes){for(let e=1;e<n.length-1;e++){let r=n[e];(e!==1||r!==``||n[0]!==``)&&(r===`.`||r===``)&&(t=!0,n.splice(e,1),e--)}n[0]===`.`&&n.length===2&&(n[1]===`.`||n[1]===``)&&(t=!0,n.pop())}let i=0;for(;(i=n.indexOf(`..`,i+1))!==-1;){let e=n[i-1];if(e&&e!==`.`&&e!==`..`&&e!==`**`){t=!0;let e=i===1&&n[i+1]===`**`?[`.`]:[];n.splice(i-1,2,...e),n.length===0&&n.push(``),i-=2}}}}while(t);return e}secondPhasePreProcess(e){for(let t=0;t<e.length-1;t++)for(let n=t+1;n<e.length;n++){let r=this.partsMatch(e[t],e[n],!this.preserveMultipleSlashes);if(r){e[t]=[],e[n]=r;break}}return e.filter(e=>e.length)}partsMatch(e,t,n=!1){let r=0,i=0,a=[],o=``;for(;r<e.length&&i<t.length;)if(e[r]===t[i])a.push(o===`b`?t[i]:e[r]),r++,i++;else if(n&&e[r]===`**`&&t[i]===e[r+1])a.push(e[r]),r++;else if(n&&t[i]===`**`&&e[r]===t[i+1])a.push(t[i]),i++;else if(e[r]===`*`&&t[i]&&(this.options.dot||!t[i].startsWith(`.`))&&t[i]!==`**`){if(o===`b`)return!1;o=`a`,a.push(e[r]),r++,i++}else if(t[i]===`*`&&e[r]&&(this.options.dot||!e[r].startsWith(`.`))&&e[r]!==`**`){if(o===`a`)return!1;o=`b`,a.push(t[i]),r++,i++}else return!1;return e.length===t.length&&a}parseNegate(){if(this.nonegate)return;let e=this.pattern,t=!1,n=0;for(let r=0;r<e.length&&e.charAt(r)===`!`;r++)t=!t,n++;n&&(this.pattern=e.slice(n)),this.negate=t}matchOne(e,t,n=!1){let r=0,i=0;if(this.isWindows){let n=typeof e[0]==`string`&&/^[a-z]:$/i.test(e[0]),a=!n&&e[0]===``&&e[1]===``&&e[2]===`?`&&/^[a-z]:$/i.test(e[3]),o=typeof t[0]==`string`&&/^[a-z]:$/i.test(t[0]),s=!o&&t[0]===``&&t[1]===``&&t[2]===`?`&&typeof t[3]==`string`&&/^[a-z]:$/i.test(t[3]),c=a?3:n?0:void 0,l=s?3:o?0:void 0;if(typeof c==`number`&&typeof l==`number`){let[n,a]=[e[c],t[l]];n.toLowerCase()===a.toLowerCase()&&(t[l]=n,i=l,r=c)}}let{optimizationLevel:a=1}=this.options;return a>=2&&(e=this.levelTwoFileOptimize(e)),t.includes(rt)?this.#e(e,t,n,r,i):this.#n(e,t,n,r,i)}#e(e,t,n,r,i){let a=t.indexOf(rt,i),o=t.lastIndexOf(rt),[s,c,l]=n?[t.slice(i,a),t.slice(a+1),[]]:[t.slice(i,a),t.slice(a+1,o),t.slice(o+1)];if(s.length){let t=e.slice(r,r+s.length);if(!this.#n(t,s,n,0,0))return!1;r+=s.length,i+=s.length}let u=0;if(l.length){if(l.length+r>e.length)return!1;let t=e.length-l.length;if(this.#n(e,l,n,t,0))u=l.length;else{if(e[e.length-1]!==``||r+l.length===e.length||(t--,!this.#n(e,l,n,t,0)))return!1;u=l.length+1}}if(!c.length){let t=!!u;for(let n=r;n<e.length-u;n++){let r=String(e[n]);if(t=!0,r===`.`||r===`..`||!this.options.dot&&r.startsWith(`.`))return!1}return n||t}let d=[[[],0]],f=d[0],p=0,m=[0];for(let e of c)e===rt?(m.push(p),f=[[],0],d.push(f)):(f[0].push(e),p++);let h=d.length-1,g=e.length-u;for(let e of d)e[1]=g-(m[h--]+e[0].length);return!!this.#t(e,d,r,0,n,0,!!u)}#t(e,t,n,r,i,a,o){let s=t[r];if(!s){for(let t=n;t<e.length;t++){o=!0;let n=e[t];if(n===`.`||n===`..`||!this.options.dot&&n.startsWith(`.`))return!1}return o}let[c,l]=s;for(;n<=l;){if(this.#n(e.slice(0,n+c.length),c,i,n,0)&&a<this.maxGlobstarRecursion){let s=this.#t(e,t,n+c.length,r+1,i,a+1,o);if(s!==!1)return s}let s=e[n];if(s===`.`||s===`..`||!this.options.dot&&s.startsWith(`.`))return!1;n++}return i||null}#n(e,t,n,r,i){let a,o,s,c;for(a=r,o=i,c=e.length,s=t.length;a<c&&o<s;a++,o++){this.debug(`matchOne loop`);let n=t[o],r=e[a];if(this.debug(t,n,r),n===!1||n===rt)return!1;let i;if(typeof n==`string`?(i=r===n,this.debug(`string match`,n,r,i)):(i=n.test(r),this.debug(`pattern match`,n,r,i)),!i)return!1}if(a===c&&o===s)return!0;if(a===c)return n;if(o===s)return a===c-1&&e[a]===``;throw Error(`wtf?`)}braceExpand(){return at(this.pattern,this.options)}parse(e){ue(e);let t=this.options;if(e===`**`)return rt;if(e===``)return``;let n,r=null;(n=e.match(Ge))?r=t.dot?qe:Ke:(n=e.match(Fe))?r=(t.nocase?t.dot?ze:Re:t.dot?Le:Ie)(n[1]):(n=e.match(Je))?r=(t.nocase?t.dot?Xe:Ye:t.dot?Ze:Qe)(n):(n=e.match(Be))?r=t.dot?He:Ve:(n=e.match(Ue))&&(r=We);let i=Me.fromGlob(e,this.options).toMMPattern();return r&&typeof i==`object`&&Reflect.defineProperty(i,"test",{value:r}),i}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let t=this.options,n=t.noglobstar?`[^/]*?`:t.dot?`(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?`:`(?:(?!(?:\\/|^)\\.).)*?`,r=new Set(t.nocase?[`i`]:[]),i=e.map(e=>{let t=e.map(e=>{if(e instanceof RegExp)for(let t of e.flags.split(``))r.add(t);return typeof e==`string`?st(e):e===rt?rt:e._src});t.forEach((e,r)=>{let i=t[r+1],a=t[r-1];e===rt&&a!==rt&&(a===void 0?i!==void 0&&i!==rt?t[r+1]=`(?:\\/|`+n+`\\/)?`+i:t[r]=n:i===void 0?t[r-1]=a+`(?:\\/|\\/`+n+`)?`:i!==rt&&(t[r-1]=a+`(?:\\/|\\/`+n+`\\/)`+i,t[r+1]=rt))});let i=t.filter(e=>e!==rt);if(this.partial&&i.length>=1){let e=[];for(let t=1;t<=i.length;t++)e.push(i.slice(0,t).join(`/`));return`(?:`+e.join(`|`)+`)`}return i.join(`/`)}).join(`|`),[a,o]=e.length>1?[`(?:`,`)`]:[``,``];i=`^`+a+i+o+`$`,this.partial&&(i=`^(?:\\/|`+a+i.slice(1,-1)+o+`)$`),this.negate&&(i=`^(?!`+i+`).+$`);try{this.regexp=new RegExp(i,[...r].join(``))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split(`/`):this.isWindows&&/^\/\/[^/]+/.test(e)?[``,...e.split(/\/+/)]:e.split(/\/+/)}match(e,t=this.partial){if(this.debug(`match`,e,this.pattern),this.comment)return!1;if(this.empty)return e===``;if(e===`/`&&t)return!0;let n=this.options;this.isWindows&&(e=e.split(`\\`).join(`/`));let r=this.slashSplit(e);this.debug(this.pattern,`split`,r);let i=this.set;this.debug(this.pattern,`set`,i);let a=r[r.length-1];if(!a)for(let e=r.length-2;!a&&e>=0;e--)a=r[e];for(let e of i){let i=r;if(n.matchBase&&e.length===1&&(i=[a]),this.matchOne(i,e,t))return n.flipNegate?!0:!this.negate}return!n.flipNegate&&this.negate}static defaults(e){return Pe.defaults(e).Minimatch}};Pe.AST=Me,Pe.Minimatch=ct,Pe.escape=Ne,Pe.unescape=ge;const lt={};function ut(){throw Error(`gunzipSync is not available in the browser`)}function dt(){throw Error(`gzipSync is not available in the browser`)}function ft(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}function pt(e,t){return Array(t+1).join(e)}function mt(e){return e.replace(/^\n*/,``)}function ht(e){for(var t=e.length;t>0&&e[t-1]===`
|
|
1
|
+
import{n as e,t}from"./rolldown-runtime-Dd_uD5pT.js";import{t as n}from"./libesm-CSMdpGMF.js";var r=t((e=>{(function(){var t={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function n(e){return i(o(e),arguments)}function r(e,t){return n.apply(null,[e].concat(t||[]))}function i(e,r){var i=1,a=e.length,o,s=``,c,l,u,d,f,p,m,h;for(c=0;c<a;c++)if(typeof e[c]==`string`)s+=e[c];else if(typeof e[c]==`object`){if(u=e[c],u.keys)for(o=r[i],l=0;l<u.keys.length;l++){if(o==null)throw Error(n(`[sprintf] Cannot access property "%s" of undefined value "%s"`,u.keys[l],u.keys[l-1]));o=o[u.keys[l]]}else o=u.param_no?r[u.param_no]:r[i++];if(t.not_type.test(u.type)&&t.not_primitive.test(u.type)&&o instanceof Function&&(o=o()),t.numeric_arg.test(u.type)&&typeof o!=`number`&&isNaN(o))throw TypeError(n(`[sprintf] expecting number but found %T`,o));switch(t.number.test(u.type)&&(m=o>=0),u.type){case`b`:o=parseInt(o,10).toString(2);break;case`c`:o=String.fromCharCode(parseInt(o,10));break;case`d`:case`i`:o=parseInt(o,10);break;case`j`:o=JSON.stringify(o,null,u.width?parseInt(u.width):0);break;case`e`:o=u.precision?parseFloat(o).toExponential(u.precision):parseFloat(o).toExponential();break;case`f`:o=u.precision?parseFloat(o).toFixed(u.precision):parseFloat(o);break;case`g`:o=u.precision?String(Number(o.toPrecision(u.precision))):parseFloat(o);break;case`o`:o=(parseInt(o,10)>>>0).toString(8);break;case`s`:o=String(o),o=u.precision?o.substring(0,u.precision):o;break;case`t`:o=String(!!o),o=u.precision?o.substring(0,u.precision):o;break;case`T`:o=Object.prototype.toString.call(o).slice(8,-1).toLowerCase(),o=u.precision?o.substring(0,u.precision):o;break;case`u`:o=parseInt(o,10)>>>0;break;case`v`:o=o.valueOf(),o=u.precision?o.substring(0,u.precision):o;break;case`x`:o=(parseInt(o,10)>>>0).toString(16);break;case`X`:o=(parseInt(o,10)>>>0).toString(16).toUpperCase()}t.json.test(u.type)?s+=o:(t.number.test(u.type)&&(!m||u.sign)?(h=m?`+`:`-`,o=o.toString().replace(t.sign,``)):h=``,f=u.pad_char?u.pad_char===`0`?`0`:u.pad_char.charAt(1):` `,p=u.width-(h+o).length,d=u.width&&p>0?f.repeat(p):``,s+=u.align?h+o+d:f===`0`?h+d+o:d+h+o)}return s}var a=Object.create(null);function o(e){if(a[e])return a[e];for(var n=e,r,i=[],o=0;n;){if((r=t.text.exec(n))!==null)i.push(r[0]);else if((r=t.modulo.exec(n))!==null)i.push(`%`);else if((r=t.placeholder.exec(n))!==null){if(r[2]){o|=1;var s=[],c=r[2],l=[];if((l=t.key.exec(c))!==null)for(s.push(l[1]);(c=c.substring(l[0].length))!==``;)if((l=t.key_access.exec(c))!==null)s.push(l[1]);else if((l=t.index_access.exec(c))!==null)s.push(l[1]);else throw SyntaxError(`[sprintf] failed to parse named argument key`);else throw SyntaxError(`[sprintf] failed to parse named argument key`);r[2]=s}else o|=2;if(o===3)throw Error(`[sprintf] mixing positional and named placeholders is not (yet) supported`);i.push({placeholder:r[0],param_no:r[1],keys:r[2],sign:r[3],pad_char:r[4],align:r[5],width:r[6],precision:r[7],type:r[8]})}else throw SyntaxError(`[sprintf] unexpected placeholder`);n=n.substring(r[0].length)}return a[e]=i}e!==void 0&&(e.sprintf=n,e.vsprintf=r),typeof window<`u`&&(window.sprintf=n,window.vsprintf=r,typeof define==`function`&&define.amd&&define(function(){return{sprintf:n,vsprintf:r}}))})()}))();const i=(e,t,n)=>{let r=e instanceof RegExp?a(e,n):e,i=t instanceof RegExp?a(t,n):t,s=r!==null&&i!=null&&o(r,i,n);return s&&{start:s[0],end:s[1],pre:n.slice(0,s[0]),body:n.slice(s[0]+r.length,s[1]),post:n.slice(s[1]+i.length)}},a=(e,t)=>{let n=t.match(e);return n?n[0]:null},o=(e,t,n)=>{let r,i,a,o,s,c=n.indexOf(e),l=n.indexOf(t,c+1),u=c;if(c>=0&&l>0){if(e===t)return[c,l];for(r=[],a=n.length;u>=0&&!s;){if(u===c)r.push(u),c=n.indexOf(e,u+1);else if(r.length===1){let e=r.pop();e!==void 0&&(s=[e,l])}else i=r.pop(),i!==void 0&&i<a&&(a=i,o=l),l=n.indexOf(t,u+1);u=c<l&&c>=0?c:l}r.length&&o!==void 0&&(s=[a,o])}return s},s=`\0SLASH`+Math.random()+`\0`,c=`\0OPEN`+Math.random()+`\0`,l=`\0CLOSE`+Math.random()+`\0`,u=`\0COMMA`+Math.random()+`\0`,d=`\0PERIOD`+Math.random()+`\0`,f=new RegExp(s,`g`),p=new RegExp(c,`g`),m=new RegExp(l,`g`),h=new RegExp(u,`g`),g=new RegExp(d,`g`),_=/\\\\/g,v=/\\{/g,y=/\\}/g,b=/\\,/g,x=/\\\./g;function S(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function ee(e){return e.replace(_,s).replace(v,c).replace(y,l).replace(b,u).replace(x,d)}function C(e){return e.replace(f,`\\`).replace(p,`{`).replace(m,`}`).replace(h,`,`).replace(g,`.`)}function te(e,t){for(let n=0;n<t.length;n++)e.push(t[n])}function ne(e){let t=[],n=``;for(;;){let r=i(`{`,`}`,e);if(!r){let r=e.split(`,`);return r[0]=n+r[0],te(t,r),t}let{pre:a,body:o,post:s}=r,c=a.split(`,`);if(c[0]=n+c[0],c[c.length-1]+=`{`+o+`}`,!s.length)return te(t,c),t;n=c.pop(),te(t,c),e=s}}function w(e,t={}){if(!e)return[];let{max:n=1e5,maxLength:r=4e6,maxDepth:i=1e3,maxRewrites:a=1e3}=t;return e.slice(0,2)===`{}`&&(e=`\\{\\}`+e.slice(2)),le(ee(e),n,r,i,0,a,!0).map(C)}function re(e){return`{`+e+`}`}function ie(e){return/^-?0\d/.test(e)}function ae(e,t){return e<=t}function oe(e,t){return e>=t}function se(e,t,n,r,i,a){let o=[],s=0;for(let c=0;c<e.length;c++)for(let l=0;l<n.length;l++){if(o.length>=r)return o;let u=e[c]+t+n[l];if(!(a&&!u)){if(s+u.length>i)return o;o.push(u),s+=u.length}}return o}function ce(e,t,n,r){let i=e.split(/\.\./),a=[];if(i[0]===void 0||i[1]===void 0)return a;let o=S(i[0]),s=S(i[1]),c=Math.max(i[0].length,i[1].length),l=i.length===3&&i[2]!==void 0?Math.max(Math.abs(S(i[2])),1):1,u=ae;s<o&&(l*=-1,u=oe);let d=i.some(ie),f=0;for(let e=o;u(e,s)&&a.length<n;e+=l){let n;if(t)n=String.fromCharCode(e),n===`\\`&&(n=``);else if(n=String(e),d){let t=c-n.length;if(t>0){let r=Array(t+1).join(`0`);n=e<0?`-`+r+n.slice(1):r+n}}if(f+n.length>r)break;a.push(n),f+=n.length}return a}function le(e,t,n,r,a,o,s){if(a>r)return[e];let c=[``],u=0,d=!1,f=!0;for(;;){let p=i(`{`,`}`,e);if(!p)return se(c,e,[``],t,n,d);let m=p.pre;if(/\$$/.test(m)){if(c=se(c,m+`{`+p.body+`}`,[``],t,n,d&&!p.post.length),f=!1,!p.post.length)break;e=p.post;continue}let h=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(p.body),g=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(p.body),_=h||g,v=p.body.indexOf(`,`)>=0;if(!_&&!v){if(u<o&&p.post.match(/,(?!,).*\}/)){u++,e=p.pre+`{`+p.body+l+p.post,s=!0;continue}return se(c,m+`{`+p.body+`}`+p.post,[``],t,n,d)}f&&=(d=s&&!_,!1);let y;if(_)y=ce(p.body,g,t,n);else{let i=ne(p.body);if(i.length===1&&i[0]!==void 0&&(i=le(i[0],t,n,r,a+1,o,!1).map(re),i.length===1)){if(c=se(c,m+i[0],[``],t,n,d&&!p.post.length),!p.post.length)break;e=p.post;continue}let s=d&&!p.post.length&&!m;for(let e=0;s&&e<c.length;e++)c[e]&&(s=!1);y=[];let l=0;outer:for(let e=0;e<i.length;e++){let c=le(i[e],t,n,r,a+1,o,!1);for(let e=0;e<c.length;e++){let r=c[e];if(!(s&&!r)){if(y.length>=t||l+r.length>n)break outer;y.push(r),l+=r.length}}}}if(c=se(c,m,y,t,n,d&&!p.post.length),!p.post.length)break;e=p.post}return c}const ue=e=>{if(typeof e!=`string`)throw TypeError(`invalid pattern`);if(e.length>65536)throw TypeError(`pattern is too long`)},de={"[:alnum:]":[`\\p{L}\\p{Nl}\\p{Nd}`,!0],"[:alpha:]":[`\\p{L}\\p{Nl}`,!0],"[:ascii:]":[`\\x00-\\x7f`,!1],"[:blank:]":[`\\p{Zs}\\t`,!0],"[:cntrl:]":[`\\p{Cc}`,!0],"[:digit:]":[`\\p{Nd}`,!0],"[:graph:]":[`\\p{Z}\\p{C}`,!0,!0],"[:lower:]":[`\\p{Ll}`,!0],"[:print:]":[`\\p{C}`,!0],"[:punct:]":[`\\p{P}`,!0],"[:space:]":[`\\p{Z}\\t\\r\\n\\v\\f`,!0],"[:upper:]":[`\\p{Lu}`,!0],"[:word:]":[`\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}`,!0],"[:xdigit:]":[`A-Fa-f0-9`,!1]},fe=e=>e.replace(/[[\]\\-]/g,`\\$&`),pe=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`),me=e=>e.join(``),he=(e,t)=>{let n=t;if(e.charAt(n)!==`[`)throw Error(`not in a brace expression`);let r=[],i=[],a=n+1,o=!1,s=!1,c=!1,l=!1,u=n,d=``;WHILE:for(;a<e.length;){let t=e.charAt(a);if((t===`!`||t===`^`)&&a===n+1){l=!0,a++;continue}if(t===`]`&&o&&!c){u=a+1;break}if(o=!0,t===`\\`&&!c){c=!0,a++;continue}if(t===`[`&&!c){for(let[t,[o,c,l]]of Object.entries(de))if(e.startsWith(t,a)){if(d)return[`$.`,!1,e.length-n,!0];a+=t.length,l?i.push(o):r.push(o),s||=c;continue WHILE}}if(c=!1,d){t>d?r.push(fe(d)+`-`+fe(t)):t===d&&r.push(fe(t)),d=``,a++;continue}if(e.startsWith(`-]`,a+1)){r.push(fe(t+`-`)),a+=2;continue}if(e.startsWith(`-`,a+1)){d=t,a+=2;continue}r.push(fe(t)),a++}if(u<a)return[``,!1,0,!1];if(!r.length&&!i.length)return[`$.`,!1,e.length-n,!0];if(i.length===0&&r.length===1&&/^\\?.$/.test(r[0])&&!l){let e=r[0].length===2?r[0].slice(-1):r[0];return[pe(e),!1,u-n,!1]}let f=`[`+(l?`^`:``)+me(r)+`]`,p=`[`+(l?``:`^`)+me(i)+`]`;return[r.length&&i.length?`(`+f+`|`+p+`)`:r.length?f:p,s,u-n,!0]},ge=(e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!0}={})=>n?t?e.replace(/\[([^/\\])\]/g,`$1`):e.replace(/((?!\\).|^)\[([^/\\])\]/g,`$1$2`).replace(/\\([^/])/g,`$1`):t?e.replace(/\[([^/\\{}])\]/g,`$1`):e.replace(/((?!\\).|^)\[([^/\\{}])\]/g,`$1$2`).replace(/\\([^/{}])/g,`$1`);var _e;const ve=new Set([`!`,`?`,`+`,`*`,`@`]),ye=e=>ve.has(e),be=e=>ye(e.type),xe=new Map([[`!`,[`@`]],[`?`,[`?`,`@`]],[`@`,[`@`]],[`*`,[`*`,`+`,`?`,`@`]],[`+`,[`+`,`@`]]]),Se=new Map([[`!`,[`?`]],[`@`,[`?`]],[`+`,[`?`,`*`]]]),Ce=new Map([[`!`,[`?`,`@`]],[`?`,[`?`,`@`]],[`@`,[`?`,`@`]],[`*`,[`*`,`+`,`?`,`@`]],[`+`,[`+`,`@`,`?`,`*`]]]),we=new Map([[`!`,new Map([[`!`,`@`]])],[`?`,new Map([[`*`,`*`],[`+`,`*`]])],[`@`,new Map([[`!`,`!`],[`?`,`?`],[`@`,`@`],[`*`,`*`],[`+`,`+`]])],[`+`,new Map([[`?`,`*`],[`*`,`*`]])]]),Te=`(?!\\.)`,Ee=new Set([`[`,`.`]),De=new Set([`..`,`.`]),Oe=new Set(`().*{}+?[]^$\\!`),ke=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`),Ae=`[^/]+?`;let je=0;var Me=class{type;#e;#t;#n=!1;#r=[];#i;#a;#o;#s=!1;#c;#l;#u=!1;id=++je;get depth(){return(this.#i?.depth??-1)+1}[Symbol.for(`nodejs.util.inspect.custom`)](){return{"@@type":`AST`,id:this.id,type:this.type,root:this.#e.id,parent:this.#i?.id,depth:this.depth,partsLength:this.#r.length,parts:this.#r}}constructor(e,t,n={}){this.type=e,e&&(this.#t=!0),this.#i=t,this.#e=this.#i?this.#i.#e:this,this.#c=this.#e===this?n:this.#e.#c,this.#o=this.#e===this?[]:this.#e.#o,e===`!`&&!this.#e.#s&&this.#o.push(this),this.#a=this.#i?this.#i.#r.length:0}get hasMagic(){if(this.#t!==void 0)return this.#t;for(let e of this.#r)if(typeof e!=`string`&&(e.type||e.hasMagic))return this.#t=!0;return this.#t}toString(){return this.#l===void 0?this.#l=this.type?this.type+`(`+this.#r.map(e=>String(e)).join(`|`)+`)`:this.#r.map(e=>String(e)).join(``):this.#l}#d(){if(this!==this.#e)throw Error(`should only call on root`);if(this.#s)return this;this.toString(),this.#s=!0;let e;for(;e=this.#o.pop();){if(e.type!==`!`)continue;let t=e,n=t.#i;for(;n;){for(let r=t.#a+1;!n.type&&r<n.#r.length;r++)for(let t of e.#r){if(typeof t==`string`)throw Error(`string part in extglob AST??`);t.copyIn(n.#r[r])}t=n,n=t.#i}}return this}push(...e){for(let t of e)if(t!==``){if(typeof t!=`string`&&!(t instanceof _e&&t.#i===this))throw Error(`invalid part: `+t);this.#r.push(t)}}toJSON(){let e=this.type===null?this.#r.slice().map(e=>typeof e==`string`?e:e.toJSON()):[this.type,...this.#r.map(e=>e.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#s&&this.#i?.type===`!`)&&e.push({}),e}isStart(){if(this.#e===this)return!0;if(!this.#i?.isStart())return!1;if(this.#a===0)return!0;let e=this.#i;for(let t=0;t<this.#a;t++){let n=e.#r[t];if(!(n instanceof _e&&n.type===`!`))return!1}return!0}isEnd(){if(this.#e===this||this.#i?.type===`!`)return!0;if(!this.#i?.isEnd())return!1;if(!this.type)return this.#i?.isEnd();let e=this.#i?this.#i.#r.length:0;return this.#a===e-1}copyIn(e){typeof e==`string`?this.push(e):this.push(e.clone(this))}clone(e){let t=new _e(this.type,e);for(let e of this.#r)t.copyIn(e);return t}static#f(e,t,n,r,i){let a=r.maxExtglobRecursion??2,o=!1,s=!1,c=-1,l=!1;if(t.type===null){let u=n,d=``;for(;u<e.length;){let n=e.charAt(u++);if(o||n===`\\`){o=!o,d+=n;continue}if(s){u===c+1?(n===`^`||n===`!`)&&(l=!0):n===`]`&&!(u===c+2&&l)&&(s=!1),d+=n;continue}if(n===`[`){s=!0,c=u,l=!1,d+=n;continue}if(!r.noext&&ye(n)&&e.charAt(u)===`(`&&i<=a){t.push(d),d=``;let a=new _e(n,t);u=_e.#f(e,a,u,r,i+1),t.push(a);continue}d+=n}return t.push(d),u}let u=n+1,d=new _e(null,t),f=[],p=``;for(;u<e.length;){let n=e.charAt(u++);if(o||n===`\\`){o=!o,p+=n;continue}if(s){u===c+1?(n===`^`||n===`!`)&&(l=!0):n===`]`&&!(u===c+2&&l)&&(s=!1),p+=n;continue}if(n===`[`){s=!0,c=u,l=!1,p+=n;continue}if(!r.noext&&ye(n)&&e.charAt(u)===`(`&&(i<=a||t&&t.#h(n))){let a=t&&t.#h(n)?0:1;d.push(p),p=``;let o=new _e(n,d);d.push(o),u=_e.#f(e,o,u,r,i+a);continue}if(n===`|`){d.push(p),p=``,f.push(d),d=new _e(null,t);continue}if(n===`)`)return p===``&&t.#r.length===0&&(t.#u=!0),d.push(p),p=``,t.push(...f,d),u;p+=n}return t.type=null,t.#t=void 0,t.#r=[e.substring(n-1)],u}#p(e){return this.#m(e,Se)}#m(e,t=xe){if(!e||typeof e!=`object`||e.type!==null||e.#r.length!==1||this.type===null)return!1;let n=e.#r[0];return!n||typeof n!=`object`||n.type===null?!1:this.#h(n.type,t)}#h(e,t=Ce){return!!t.get(this.type)?.includes(e)}#g(e,t){let n=e.#r[0],r=new _e(null,n,this.options);r.#r.push(``),n.push(r),this.#_(e,t)}#_(e,t){let n=e.#r[0];this.#r.splice(t,1,...n.#r);for(let e of n.#r)typeof e==`object`&&(e.#i=this);this.#l=void 0}#v(e){return!!we.get(this.type)?.has(e)}#y(e){if(!e||typeof e!=`object`||e.type!==null||e.#r.length!==1||this.type===null||this.#r.length!==1)return!1;let t=e.#r[0];return!t||typeof t!=`object`||t.type===null?!1:this.#v(t.type)}#b(e){let t=we.get(this.type),n=e.#r[0],r=t?.get(n.type);if(!r)return!1;this.#r=n.#r;for(let e of this.#r)typeof e==`object`&&(e.#i=this);this.type=r,this.#l=void 0,this.#u=!1}static fromGlob(e,t={}){let n=new _e(null,void 0,t);return _e.#f(e,n,0,t,0),n}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let e=this.toString(),[t,n,r,i]=this.toRegExpSource();if(!(r||this.#t||this.#c.nocase&&!this.#c.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return n;let a=(this.#c.nocase?`i`:``)+(i?`u`:``);return Object.assign(RegExp(`^${t}$`,a),{_src:t,_glob:e})}get options(){return this.#c}toRegExpSource(e){let t=e??!!this.#c.dot;if(this.#e===this&&(this.#x(),this.#d()),!be(this)){let n=this.isStart()&&this.isEnd()&&!this.#r.some(e=>typeof e!=`string`),r=this.#r.map(t=>{let[r,i,a,o]=typeof t==`string`?_e.#C(t,this.#t,n):t.toRegExpSource(e);return this.#t=this.#t||a,this.#n=this.#n||o,r}).join(``),i=``;if(this.isStart()&&typeof this.#r[0]==`string`&&!(this.#r.length===1&&De.has(this.#r[0]))){let n=Ee,a=t&&n.has(r.charAt(0))||r.startsWith(`\\.`)&&n.has(r.charAt(2))||r.startsWith(`\\.\\.`)&&n.has(r.charAt(4)),o=!t&&!e&&n.has(r.charAt(0));i=a?`(?!(?:^|/)\\.\\.?(?:$|/))`:o?Te:``}let a=``;return this.isEnd()&&this.#e.#s&&this.#i?.type===`!`&&(a=`(?:$|\\/)`),[i+r+a,ge(r),this.#t=!!this.#t,this.#n]}let n=this.type===`*`||this.type===`+`,r=this.type===`!`?`(?:(?!(?:`:`(?:`,i=this.#S(t);if(this.isStart()&&this.isEnd()&&!i&&this.type!==`!`){let e=this.toString(),t=this;return t.#r=[e],t.type=null,t.#t=void 0,[e,ge(this.toString()),!1,!1]}let a=!n||e||t?``:this.#S(!0);a===i&&(a=``),a&&(i=`(?:${i})(?:${a})*?`);let o=``;if(this.type===`!`&&this.#u)o=(this.isStart()&&!t?Te:``)+Ae;else{let n=this.type===`!`?`))`+(this.isStart()&&!t&&!e?Te:``)+`[^/]*?)`:this.type===`@`?`)`:this.type===`?`?`)?`:this.type===`+`&&a?`)`:this.type===`*`&&a?`)?`:`)${this.type}`;o=r+i+n}return[o,ge(i),this.#t=!!this.#t,this.#n]}#x(){if(be(this)){let e=0,t=!1;do{t=!0;for(let e=0;e<this.#r.length;e++){let n=this.#r[e];typeof n==`object`&&(n.#x(),this.#m(n)?(t=!1,this.#_(n,e)):this.#p(n)?(t=!1,this.#g(n,e)):this.#y(n)&&(t=!1,this.#b(n)))}}while(!t&&++e<10)}else for(let e of this.#r)typeof e==`object`&&e.#x();this.#l=void 0}#S(e){return this.#r.map(t=>{if(typeof t==`string`)throw Error(`string type in extglob ast??`);let[n,r,i,a]=t.toRegExpSource(e);return this.#n=this.#n||a,n}).filter(e=>!(this.isStart()&&this.isEnd())||!!e).join(`|`)}static#C(e,t,n=!1){let r=!1,i=``,a=!1,o=!1;for(let s=0;s<e.length;s++){let c=e.charAt(s);if(r){r=!1,i+=(Oe.has(c)?`\\`:``)+c;continue}if(c===`*`){if(o)continue;o=!0,i+=n&&/^[*]+$/.test(e)?Ae:`[^/]*?`,t=!0;continue}if(o=!1,c===`\\`){s===e.length-1?i+=`\\\\`:r=!0;continue}if(c===`[`){let[n,r,o,c]=he(e,s);if(o){i+=n,a||=r,s+=o-1,t||=c;continue}}if(c===`?`){i+=`[^/]`,t=!0;continue}i+=ke(c)}return[i,ge(e),!!t,a]}};_e=Me;const Ne=(e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!1}={})=>n?t?e.replace(/[?*()[\]{}]/g,`[$&]`):e.replace(/[?*()[\]\\{}]/g,`\\$&`):t?e.replace(/[?*()[\]]/g,`[$&]`):e.replace(/[?*()[\]\\]/g,`\\$&`),Pe=(e,t,n={})=>(ue(t),!n.nocomment&&t.charAt(0)===`#`?!1:new ct(t,n).match(e)),Fe=/^\*+([^+@!?*[(]*)$/,Ie=e=>t=>!t.startsWith(`.`)&&t.endsWith(e),Le=e=>t=>t.endsWith(e),Re=e=>(e=e.toLowerCase(),t=>!t.startsWith(`.`)&&t.toLowerCase().endsWith(e)),ze=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),Be=/^\*+\.\*+$/,Ve=e=>!e.startsWith(`.`)&&e.includes(`.`),He=e=>e!==`.`&&e!==`..`&&e.includes(`.`),Ue=/^\.\*+$/,We=e=>e!==`.`&&e!==`..`&&e.startsWith(`.`),Ge=/^\*+$/,Ke=e=>e.length!==0&&!e.startsWith(`.`),qe=e=>e.length!==0&&e!==`.`&&e!==`..`,Je=/^\?+([^+@!?*[(]*)?$/,Ye=([e,t=``])=>{let n=$e([e]);return t?(t=t.toLowerCase(),e=>n(e)&&e.toLowerCase().endsWith(t)):n},Xe=([e,t=``])=>{let n=et([e]);return t?(t=t.toLowerCase(),e=>n(e)&&e.toLowerCase().endsWith(t)):n},Ze=([e,t=``])=>{let n=et([e]);return t?e=>n(e)&&e.endsWith(t):n},Qe=([e,t=``])=>{let n=$e([e]);return t?e=>n(e)&&e.endsWith(t):n},$e=([e])=>{let t=e.length;return e=>e.length===t&&!e.startsWith(`.`)},et=([e])=>{let t=e.length;return e=>e.length===t&&e!==`.`&&e!==`..`},tt=typeof process==`object`&&process?{}.__MINIMATCH_TESTING_PLATFORM__||process.platform:`posix`,nt={win32:{sep:`\\`},posix:{sep:`/`}};Pe.sep=tt===`win32`?nt.win32.sep:nt.posix.sep;const rt=Symbol(`globstar **`);Pe.GLOBSTAR=rt,Pe.filter=(e,t={})=>n=>Pe(n,e,t);const it=(e,t={})=>Object.assign({},e,t);Pe.defaults=e=>{if(!e||typeof e!=`object`||!Object.keys(e).length)return Pe;let t=Pe;return Object.assign((n,r,i={})=>t(n,r,it(e,i)),{Minimatch:class extends t.Minimatch{constructor(t,n={}){super(t,it(e,n))}static defaults(n){return t.defaults(it(e,n)).Minimatch}},AST:class extends t.AST{constructor(t,n,r={}){super(t,n,it(e,r))}static fromGlob(n,r={}){return t.AST.fromGlob(n,it(e,r))}},unescape:(n,r={})=>t.unescape(n,it(e,r)),escape:(n,r={})=>t.escape(n,it(e,r)),filter:(n,r={})=>t.filter(n,it(e,r)),defaults:n=>t.defaults(it(e,n)),makeRe:(n,r={})=>t.makeRe(n,it(e,r)),braceExpand:(n,r={})=>t.braceExpand(n,it(e,r)),match:(n,r,i={})=>t.match(n,r,it(e,i)),sep:t.sep,GLOBSTAR:rt})};const at=(e,t={})=>(ue(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:w(e,{max:t.braceExpandMax}));Pe.braceExpand=at,Pe.makeRe=(e,t={})=>new ct(e,t).makeRe(),Pe.match=(e,t,n={})=>{let r=new ct(t,n);return e=e.filter(e=>r.match(e)),r.options.nonull&&!e.length&&e.push(t),e};const ot=/[?*]|[+@!]\(.*?\)|\[|\]/,st=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`);var ct=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(e,t={}){ue(e),t||={},this.options=t,this.maxGlobstarRecursion=t.maxGlobstarRecursion??200,this.pattern=e,this.platform=t.platform||tt,this.isWindows=this.platform===`win32`,this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,`/`)),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=t.windowsNoMagicRoot===void 0?!!(this.isWindows&&this.nocase):t.windowsNoMagicRoot,this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let t of e)if(typeof t!=`string`)return!0;return!1}debug(...e){}make(){let e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)===`#`){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=(...e)=>console.error(...e)),this.debug(this.pattern,this.globSet);let n=this.globSet.map(e=>this.slashSplit(e));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let r=this.globParts.map((e,t,n)=>{if(this.isWindows&&this.windowsNoMagicRoot){let t=e[0]===``&&e[1]===``&&(e[2]===`?`||!ot.test(e[2]))&&!ot.test(e[3]),n=/^[a-z]:/i.test(e[0]);if(t)return[...e.slice(0,4),...e.slice(4).map(e=>this.parse(e))];if(n)return[e[0],...e.slice(1).map(e=>this.parse(e))]}return e.map(e=>this.parse(e))});if(this.debug(this.pattern,r),this.set=r.filter(e=>e.indexOf(!1)===-1),this.isWindows)for(let e=0;e<this.set.length;e++){let t=this.set[e];t[0]===``&&t[1]===``&&this.globParts[e][2]===`?`&&typeof t[3]==`string`&&/^[a-z]:$/i.test(t[3])&&(t[2]=`?`)}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let t of e)for(let e=0;e<t.length;e++)t[e]===`**`&&(t[e]=`*`);let{optimizationLevel:t=1}=this.options;return t>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):e=t>=1?this.levelOneOptimize(e):this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(e=>{let t=-1;for(;(t=e.indexOf(`**`,t+1))!==-1;){let n=t;for(;e[n+1]===`**`;)n++;n!==t&&e.splice(t,n-t)}return e})}levelOneOptimize(e){return e.map(e=>(e=e.reduce((e,t)=>{let n=e[e.length-1];return t===`**`&&n===`**`?e:t===`..`&&n&&n!==`..`&&n!==`.`&&n!==`**`?(e.pop(),e):(e.push(t),e)},[]),e.length===0?[``]:e))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let n=1;n<e.length-1;n++){let r=e[n];(n!==1||r!==``||e[0]!==``)&&(r===`.`||r===``)&&(t=!0,e.splice(n,1),n--)}e[0]===`.`&&e.length===2&&(e[1]===`.`||e[1]===``)&&(t=!0,e.pop())}let n=0;for(;(n=e.indexOf(`..`,n+1))!==-1;){let r=e[n-1];r&&r!==`.`&&r!==`..`&&r!==`**`&&!(this.isWindows&&/^[a-z]:$/i.test(r))&&(t=!0,e.splice(n-1,2),n-=2)}}while(t);return e.length===0?[``]:e}firstPhasePreProcess(e){let t=!1;do{t=!1;for(let n of e){let r=-1;for(;(r=n.indexOf(`**`,r+1))!==-1;){let i=r;for(;n[i+1]===`**`;)i++;i>r&&n.splice(r+1,i-r);let a=n[r+1],o=n[r+2],s=n[r+3];if(a!==`..`||!o||o===`.`||o===`..`||!s||s===`.`||s===`..`)continue;t=!0,n.splice(r,1);let c=n.slice(0);c[r]=`**`,e.push(c),r--}if(!this.preserveMultipleSlashes){for(let e=1;e<n.length-1;e++){let r=n[e];(e!==1||r!==``||n[0]!==``)&&(r===`.`||r===``)&&(t=!0,n.splice(e,1),e--)}n[0]===`.`&&n.length===2&&(n[1]===`.`||n[1]===``)&&(t=!0,n.pop())}let i=0;for(;(i=n.indexOf(`..`,i+1))!==-1;){let e=n[i-1];if(e&&e!==`.`&&e!==`..`&&e!==`**`){t=!0;let e=i===1&&n[i+1]===`**`?[`.`]:[];n.splice(i-1,2,...e),n.length===0&&n.push(``),i-=2}}}}while(t);return e}secondPhasePreProcess(e){for(let t=0;t<e.length-1;t++)for(let n=t+1;n<e.length;n++){let r=this.partsMatch(e[t],e[n],!this.preserveMultipleSlashes);if(r){e[t]=[],e[n]=r;break}}return e.filter(e=>e.length)}partsMatch(e,t,n=!1){let r=0,i=0,a=[],o=``;for(;r<e.length&&i<t.length;)if(e[r]===t[i])a.push(o===`b`?t[i]:e[r]),r++,i++;else if(n&&e[r]===`**`&&t[i]===e[r+1])a.push(e[r]),r++;else if(n&&t[i]===`**`&&e[r]===t[i+1])a.push(t[i]),i++;else if(e[r]===`*`&&t[i]&&(this.options.dot||!t[i].startsWith(`.`))&&t[i]!==`**`){if(o===`b`)return!1;o=`a`,a.push(e[r]),r++,i++}else if(t[i]===`*`&&e[r]&&(this.options.dot||!e[r].startsWith(`.`))&&e[r]!==`**`){if(o===`a`)return!1;o=`b`,a.push(t[i]),r++,i++}else return!1;return e.length===t.length&&a}parseNegate(){if(this.nonegate)return;let e=this.pattern,t=!1,n=0;for(let r=0;r<e.length&&e.charAt(r)===`!`;r++)t=!t,n++;n&&(this.pattern=e.slice(n)),this.negate=t}matchOne(e,t,n=!1){let r=0,i=0;if(this.isWindows){let n=typeof e[0]==`string`&&/^[a-z]:$/i.test(e[0]),a=!n&&e[0]===``&&e[1]===``&&e[2]===`?`&&/^[a-z]:$/i.test(e[3]),o=typeof t[0]==`string`&&/^[a-z]:$/i.test(t[0]),s=!o&&t[0]===``&&t[1]===``&&t[2]===`?`&&typeof t[3]==`string`&&/^[a-z]:$/i.test(t[3]),c=a?3:n?0:void 0,l=s?3:o?0:void 0;if(typeof c==`number`&&typeof l==`number`){let[n,a]=[e[c],t[l]];n.toLowerCase()===a.toLowerCase()&&(t[l]=n,i=l,r=c)}}let{optimizationLevel:a=1}=this.options;return a>=2&&(e=this.levelTwoFileOptimize(e)),t.includes(rt)?this.#e(e,t,n,r,i):this.#n(e,t,n,r,i)}#e(e,t,n,r,i){let a=t.indexOf(rt,i),o=t.lastIndexOf(rt),[s,c,l]=n?[t.slice(i,a),t.slice(a+1),[]]:[t.slice(i,a),t.slice(a+1,o),t.slice(o+1)];if(s.length){let t=e.slice(r,r+s.length);if(!this.#n(t,s,n,0,0))return!1;r+=s.length,i+=s.length}let u=0;if(l.length){if(l.length+r>e.length)return!1;let t=e.length-l.length;if(this.#n(e,l,n,t,0))u=l.length;else{if(e[e.length-1]!==``||r+l.length===e.length||(t--,!this.#n(e,l,n,t,0)))return!1;u=l.length+1}}if(!c.length){let t=!!u;for(let n=r;n<e.length-u;n++){let r=String(e[n]);if(t=!0,r===`.`||r===`..`||!this.options.dot&&r.startsWith(`.`))return!1}return n||t}let d=[[[],0]],f=d[0],p=0,m=[0];for(let e of c)e===rt?(m.push(p),f=[[],0],d.push(f)):(f[0].push(e),p++);let h=d.length-1,g=e.length-u;for(let e of d)e[1]=g-(m[h--]+e[0].length);return!!this.#t(e,d,r,0,n,0,!!u)}#t(e,t,n,r,i,a,o){let s=t[r];if(!s){for(let t=n;t<e.length;t++){o=!0;let n=e[t];if(n===`.`||n===`..`||!this.options.dot&&n.startsWith(`.`))return!1}return o}let[c,l]=s;for(;n<=l;){if(this.#n(e.slice(0,n+c.length),c,i,n,0)&&a<this.maxGlobstarRecursion){let s=this.#t(e,t,n+c.length,r+1,i,a+1,o);if(s!==!1)return s}let s=e[n];if(s===`.`||s===`..`||!this.options.dot&&s.startsWith(`.`))return!1;n++}return i||null}#n(e,t,n,r,i){let a,o,s,c;for(a=r,o=i,c=e.length,s=t.length;a<c&&o<s;a++,o++){this.debug(`matchOne loop`);let n=t[o],r=e[a];if(this.debug(t,n,r),n===!1||n===rt)return!1;let i;if(typeof n==`string`?(i=r===n,this.debug(`string match`,n,r,i)):(i=n.test(r),this.debug(`pattern match`,n,r,i)),!i)return!1}if(a===c&&o===s)return!0;if(a===c)return n;if(o===s)return a===c-1&&e[a]===``;throw Error(`wtf?`)}braceExpand(){return at(this.pattern,this.options)}parse(e){ue(e);let t=this.options;if(e===`**`)return rt;if(e===``)return``;let n,r=null;(n=e.match(Ge))?r=t.dot?qe:Ke:(n=e.match(Fe))?r=(t.nocase?t.dot?ze:Re:t.dot?Le:Ie)(n[1]):(n=e.match(Je))?r=(t.nocase?t.dot?Xe:Ye:t.dot?Ze:Qe)(n):(n=e.match(Be))?r=t.dot?He:Ve:(n=e.match(Ue))&&(r=We);let i=Me.fromGlob(e,this.options).toMMPattern();return r&&typeof i==`object`&&Reflect.defineProperty(i,"test",{value:r}),i}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let t=this.options,n=t.noglobstar?`[^/]*?`:t.dot?`(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?`:`(?:(?!(?:\\/|^)\\.).)*?`,r=new Set(t.nocase?[`i`]:[]),i=e.map(e=>{let t=e.map(e=>{if(e instanceof RegExp)for(let t of e.flags.split(``))r.add(t);return typeof e==`string`?st(e):e===rt?rt:e._src});t.forEach((e,r)=>{let i=t[r+1],a=t[r-1];e===rt&&a!==rt&&(a===void 0?i!==void 0&&i!==rt?t[r+1]=`(?:\\/|`+n+`\\/)?`+i:t[r]=n:i===void 0?t[r-1]=a+`(?:\\/|\\/`+n+`)?`:i!==rt&&(t[r-1]=a+`(?:\\/|\\/`+n+`\\/)`+i,t[r+1]=rt))});let i=t.filter(e=>e!==rt);if(this.partial&&i.length>=1){let e=[];for(let t=1;t<=i.length;t++)e.push(i.slice(0,t).join(`/`));return`(?:`+e.join(`|`)+`)`}return i.join(`/`)}).join(`|`),[a,o]=e.length>1?[`(?:`,`)`]:[``,``];i=`^`+a+i+o+`$`,this.partial&&(i=`^(?:\\/|`+a+i.slice(1,-1)+o+`)$`),this.negate&&(i=`^(?!`+i+`).+$`);try{this.regexp=new RegExp(i,[...r].join(``))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split(`/`):this.isWindows&&/^\/\/[^/]+/.test(e)?[``,...e.split(/\/+/)]:e.split(/\/+/)}match(e,t=this.partial){if(this.debug(`match`,e,this.pattern),this.comment)return!1;if(this.empty)return e===``;if(e===`/`&&t)return!0;let n=this.options;this.isWindows&&(e=e.split(`\\`).join(`/`));let r=this.slashSplit(e);this.debug(this.pattern,`split`,r);let i=this.set;this.debug(this.pattern,`set`,i);let a=r[r.length-1];if(!a)for(let e=r.length-2;!a&&e>=0;e--)a=r[e];for(let e of i){let i=r;if(n.matchBase&&e.length===1&&(i=[a]),this.matchOne(i,e,t))return n.flipNegate?!0:!this.negate}return!n.flipNegate&&this.negate}static defaults(e){return Pe.defaults(e).Minimatch}};Pe.AST=Me,Pe.Minimatch=ct,Pe.escape=Ne,Pe.unescape=ge;const lt={};function ut(){throw Error(`gunzipSync is not available in the browser`)}function dt(){throw Error(`gzipSync is not available in the browser`)}function ft(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}function pt(e,t){return Array(t+1).join(e)}function mt(e){return e.replace(/^\n*/,``)}function ht(e){for(var t=e.length;t>0&&e[t-1]===`
|
|
2
2
|
`;)t--;return e.substring(0,t)}function gt(e){return ht(mt(e))}var _t=`ADDRESS.ARTICLE.ASIDE.AUDIO.BLOCKQUOTE.BODY.CANVAS.CENTER.DD.DIR.DIV.DL.DT.FIELDSET.FIGCAPTION.FIGURE.FOOTER.FORM.FRAMESET.H1.H2.H3.H4.H5.H6.HEADER.HGROUP.HR.HTML.ISINDEX.LI.MAIN.MENU.NAV.NOFRAMES.NOSCRIPT.OL.OUTPUT.P.PRE.SECTION.TABLE.TBODY.TD.TFOOT.TH.THEAD.TR.UL`.split(`.`);function vt(e){return Tt(e,_t)}var yt=[`AREA`,`BASE`,`BR`,`COL`,`COMMAND`,`EMBED`,`HR`,`IMG`,`INPUT`,`KEYGEN`,`LINK`,`META`,`PARAM`,`SOURCE`,`TRACK`,`WBR`];function bt(e){return Tt(e,yt)}function xt(e){return Et(e,yt)}var St=[`A`,`TABLE`,`THEAD`,`TBODY`,`TFOOT`,`TH`,`TD`,`IFRAME`,`SCRIPT`,`AUDIO`,`VIDEO`];function Ct(e){return Tt(e,St)}function wt(e){return Et(e,St)}function Tt(e,t){return t.indexOf(e.nodeName)>=0}function Et(e,t){return e.getElementsByTagName&&t.some(function(t){return e.getElementsByTagName(t).length})}var Dt=[[/\\/g,`\\\\`],[/\*/g,`\\*`],[/^-/g,`\\-`],[/^\+ /g,`\\+ `],[/^(=+)/g,`\\$1`],[/^(#{1,6}) /g,`\\$1 `],[/`/g,"\\`"],[/^~~~/g,`\\~~~`],[/\[/g,`\\[`],[/\]/g,`\\]`],[/^>/g,`\\>`],[/_/g,`\\_`],[/^(\d+)\. /g,`$1\\. `]];function Ot(e){return Dt.reduce(function(e,t){return e.replace(t[0],t[1])},e)}var kt={};kt.paragraph={filter:`p`,replacement:function(e){return`
|
|
3
3
|
|
|
4
4
|
`+e+`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as e}from"./logger-DDBAeTLF.js";import"./navigation-watcher-CPcnZL9l.js";import"./wc-follower-oauth-BiHrXTeh.js";import{d as t,l as n,u as r}from"./main-bbC4wIXo.js";import{n as i,t as a}from"./pending-request-table-k-D7ZZsL.js";var o=e(`cdp`);function s(e){return e===4001?`CDP connection superseded by another SLICC tab/window on this instance`:e===4002?`CDP connection reset by proxy (upstream Chrome connection was re-established)`:`CDP connection closed`}var c=class{ws=null;nextId=1;_superseded=!1;pending=new a;listeners=new Map;_state=`disconnected`;stateListeners=new Set;lastNotifiedState=`disconnected`;lastNotifiedReason;get state(){return this._state}onStateChange(e){return this.stateListeners.add(e),()=>{this.stateListeners.delete(e)}}get superseded(){return this._superseded}async connect(e){if(this._state!==`disconnected`)throw Error(`Cannot connect: state is ${this._state}`);if(!e?.url)throw Error(`CDPClient.connect() requires a WebSocket URL`);let{url:t,timeout:n=5e3,protocols:r}=e;return this._state=`connecting`,new Promise((e,i)=>{let a=setTimeout(()=>{this.cleanup(),i(Error(`CDP connection timed out after ${n}ms`))},n);try{this.ws=r===void 0?new WebSocket(t):new WebSocket(t,r)}catch(e){clearTimeout(a),this._state=`disconnected`,i(e);return}this.ws.onopen=()=>{clearTimeout(a),this._state=`connected`,this._superseded=!1,o.info(`Connected`,{url:t}),this.notifyState(`connected`),e()},this.ws.onerror=e=>{clearTimeout(a),this._state===`connecting`&&(o.error(`Connection failed`,{url:t}),this.cleanup(),i(Error(`CDP WebSocket connection failed`)))},this.ws.onmessage=e=>{this.handleMessage(e.data)},this.ws.onclose=e=>{this.handleClose(e?.code)}})}disconnect(){this.ws&&(this.ws.onclose=null,this.ws.close()),this._superseded=!1,this.cleanup(),o.info(`Disconnected`)}async send(e,t,n,r=3e4){if(this._state!==`connected`||!this.ws)throw Error(`CDP client is not connected`);let i=this.nextId++,a={id:i,method:e};t&&(a.params=t),n&&(a.sessionId=n),o.debug(`Send`,{method:e,id:i,sessionId:n});let s=this.pending.issue(i,r,`CDP command timed out after ${r}ms: ${e}`);return this.ws.send(JSON.stringify(a)),s}on(e,t){let n=this.listeners.get(e);n||(n=new Set,this.listeners.set(e,n)),n.add(t)}off(e,t){let n=this.listeners.get(e);n&&(n.delete(t),n.size===0&&this.listeners.delete(e))}once(e,t=3e4){return i(t=>(this.on(e,t),()=>this.off(e,t)),t,`Timed out waiting for event: ${e}`)}handleMessage(e){let t;try{t=JSON.parse(e)}catch{return}if(`id`in t&&typeof t.id==`number`){let e=t;o.debug(`Response`,{id:e.id,hasError:!!e.error}),e.error?(o.error(`Command error`,{id:e.id,code:e.error.code,message:e.error.message}),this.pending.reject(e.id,Error(`CDP error: ${e.error.message} (${e.error.code})`))):this.pending.resolve(e.id,e.result??{});return}if(`method`in t){let e=t;o.debug(`Event`,{method:e.method,sessionId:e.sessionId});let n=this.listeners.get(e.method);if(n){let t=e.sessionId?{...e.params,sessionId:e.sessionId}:e.params??{};for(let e of n)try{e(t)}catch{}}}}handleClose(e){e===4001?(this._superseded=!0,o.warn(`CDP slot superseded by another SLICC tab/window on this instance`,{code:e})):e===4002?o.warn(`CDP proxy reset its upstream Chrome connection — sessions dropped`,{code:e,pendingCommands:this.pending.size}):o.error(`Connection closed unexpectedly`,{pendingCommands:this.pending.size}),this.cleanup(s(e))}cleanup(e=`CDP client disconnected`){this.ws=null,this._state=`disconnected`,this.pending.rejectAll(e),this.notifyState(`disconnected`,e)}notifyState(e,t){if(e!==this.lastNotifiedState||t!==this.lastNotifiedReason){this.lastNotifiedState=e,this.lastNotifiedReason=t;for(let n of this.stateListeners)try{n(e,t)}catch{}}}},l=`ws://localhost:5710/cdp`;function u(e=typeof window<`u`?window.location:null){return e?.host?`${e.protocol===`https:`?`wss:`:`ws:`}//${e.host}/cdp`:l}var d=class{lastConnectOptions=null;supersededHandler=null;supersededNotified=!1;reconnectAttempt=0;reconnectNotBefore=0;bridgeRejection=null;bridgeRejectedHandler=null;bridgeRejectedNotified=!1;classifyConnectFailure=async()=>`transient`;primeConnectOptions(e){this.lastConnectOptions=e?{...e}:{}}setSupersededHandler(e){this.supersededHandler=e}setBridgeRejectedHandler(e){this.bridgeRejectedHandler=e}setConnectFailureClassifier(e){this.classifyConnectFailure=e}async connect(e,t){if(this.bridgeRejection)throw this.notifyBridgeRejected(),new n(this.bridgeRejection);this.lastConnectOptions=t?{...t}:{};try{await e.connect({url:t?.url??u(),timeout:t?.timeout,...t?.protocols===void 0?{}:{protocols:t.protocols}})}catch(e){throw await this.noteReconnectFailure(t),this.bridgeRejection?new n(this.bridgeRejection):e}this.noteReconnectSuccess()}async ensureLocalConnected(e){if(e.superseded===!0){this.notifySuperseded();return}if(e.state===`disconnected`){this.throwIfReconnectPaused();let t=this.lastConnectOptions;try{await e.connect({url:t?.url??u(),...t?.timeout===void 0?{}:{timeout:t.timeout},...t?.protocols===void 0?{}:{protocols:t.protocols}})}catch(e){throw await this.noteReconnectFailure(t??void 0),this.bridgeRejection?new n(this.bridgeRejection):e}this.noteReconnectSuccess()}}async ensureConnected(e){if(e.client.superseded===!0){this.notifySuperseded();return}if(e.client.state===`disconnected`){this.throwIfReconnectPaused();let t=e.client;e.restoreLocalAfterRemoteDrop(),e.clearSessionsForTransport(t),e.getClient().state===`disconnected`&&await this.connect(e.getClient(),this.lastConnectOptions??void 0)}}throwIfReconnectPaused(){if(this.bridgeRejection)throw this.notifyBridgeRejected(),new n(this.bridgeRejection);if(Date.now()<this.reconnectNotBefore)throw new r}noteReconnectSuccess(){this.reconnectAttempt=0,this.reconnectNotBefore=0,this.supersededNotified=!1}async noteReconnectFailure(e){if(await this.classifyConnectFailure({url:e?.url??``,...e?.protocols===void 0?{}:{protocols:e.protocols}})===`terminal`){this.bridgeRejection=new n().message,this.notifyBridgeRejected();return}let r=t(this.reconnectAttempt);this.reconnectAttempt+=1,this.reconnectNotBefore=Date.now()+r}notifyBridgeRejected(){if(!this.bridgeRejectedNotified){this.bridgeRejectedNotified=!0;try{this.bridgeRejectedHandler?.()}catch{}}}notifySuperseded(){if(!this.supersededNotified){this.supersededNotified=!0;try{this.supersededHandler?.()}catch{}}}},f=class extends Error{step;name=`CommandAbortedError`;constructor(e){super(`Browser command aborted while ${e}. A CDP round trip already in flight cannot be cancelled, so it may still have been applied to the page; nothing after it was started.`),this.step=e}};function p(e,t){if(e?.aborted)throw new f(t)}function m(e,t){return e?{signal:e,error:()=>new f(t)}:void 0}function h(e,t,n){return new Promise((r,i)=>{if(t?.aborted){i(new f(n));return}let a=()=>{clearTimeout(o),i(new f(n))},o=setTimeout(()=>{t?.removeEventListener(`abort`,a),r()},e);t?.addEventListener(`abort`,a,{once:!0})})}function ee(e,t,n){return t?t.aborted?Promise.reject(new f(n)):new Promise((r,i)=>{let a=()=>i(new f(n));t.addEventListener(`abort`,a,{once:!0}),e.then(()=>{t.removeEventListener(`abort`,a),r()},e=>{t.removeEventListener(`abort`,a),i(e instanceof Error?e:Error(String(e)))})}):e}var g=class{contexts=new Map;for(e,t){let n=`${t}:${e}`,r=this.contexts.get(n);return r||(r=new Map,this.contexts.set(n,r)),r}peek(e,t){return this.contexts.get(`${t}:${e}`)}drop(e){this.contexts.delete(`main:${e}`),this.contexts.delete(`isolated:${e}`)}get size(){return this.contexts.size}},_=e(`har-recorder`),v=class{recordings=new Map;client;fs;eventCleanup=new Map;constructor(e,t){this.client=e,this.fs=t}async startRecording(e,t,n,r){let i=`rec-${Date.now()}-${Math.random().toString(36).slice(2,8)}`;p(r,`about to enable Network on tab ${e}`),await this.client.send(`Network.enable`,{},t),p(r,`about to enable Page on tab ${e}`),await this.client.send(`Page.enable`,{},t),p(r,`about to read the URL of tab ${e}`);let a=(await this.client.send(`Runtime.evaluate`,{expression:`location.href`,returnByValue:!0},t)).result?.value??`about:blank`,o={id:i,targetId:e,sessionId:t,filterCode:n,pendingRequests:new Map,entries:[],startTime:Date.now(),currentUrl:a,snapshotCount:0};return this.recordings.set(i,o),this.setupEventListeners(o),await this.ensureDir(`/recordings/${i}`),_.debug(`Started recording`,{recordingId:i,targetId:e,currentUrl:a}),i}setupEventListeners(e){let{sessionId:t,id:n}=e,r=n=>{let r=n;r.sessionId===t&&this.handleRequestWillBeSent(e,r)},i=n=>{let r=n;r.sessionId===t&&this.handleResponseReceived(e,r)},a=r=>{let i=r;i.sessionId===t&&this.handleLoadingFinished(e,i).catch(e=>{_.error(`Failed to process loadingFinished event`,{recordingId:n,requestId:i.requestId,error:e instanceof Error?e.message:String(e)})})},o=n=>{let r=n;r.sessionId===t&&this.handleLoadingFailed(e,r)},s=r=>{let i=r;if(i.sessionId!==t)return;let a=i.frame;if(!a?.parentId&&a?.url){let t=[...e.entries],r=e.currentUrl;e.currentUrl=a.url,e.entries=[],e.pendingRequests.clear(),this.saveSnapshotWithEntries(e,`navigation`,t,r).catch(e=>{_.error(`Failed to save navigation snapshot`,{recordingId:n,error:e instanceof Error?e.message:String(e)})})}};this.client.on(`Network.requestWillBeSent`,r),this.client.on(`Network.responseReceived`,i),this.client.on(`Network.loadingFinished`,a),this.client.on(`Network.loadingFailed`,o),this.client.on(`Page.frameNavigated`,s),this.eventCleanup.set(n,()=>{this.client.off(`Network.requestWillBeSent`,r),this.client.off(`Network.responseReceived`,i),this.client.off(`Network.loadingFinished`,a),this.client.off(`Network.loadingFailed`,o),this.client.off(`Page.frameNavigated`,s)})}handleRequestWillBeSent(e,t){let{requestId:n,request:r,timestamp:i}=t;!n||!r||i==null||e.pendingRequests.set(n,{requestId:n,startTime:i*1e3,request:{method:r.method,url:r.url,headers:r.headers,postData:r.postData}})}handleResponseReceived(e,t){let{requestId:n,response:r}=t;if(!n||!r)return;let i=e.pendingRequests.get(n);i&&(i.response={status:r.status,statusText:r.statusText,headers:r.headers,mimeType:r.mimeType},i.timing=r.timing)}async handleLoadingFinished(e,t){let{requestId:n,timestamp:r}=t;if(!n||r==null)return;let i=e.pendingRequests.get(n);if(!i)return;i.endTime=r*1e3;try{let t=await this.client.send(`Network.getResponseBody`,{requestId:n},e.sessionId);i.responseBody=t.body,i.responseBodyBase64=t.base64Encoded===!0}catch{}let a=this.buildHarEntry(i);a&&e.entries.push(a),e.pendingRequests.delete(n)}handleLoadingFailed(e,t){let{requestId:n}=t;n&&e.pendingRequests.delete(n)}buildHarEntry(e){if(!e.response)return null;let{request:t,response:n,timing:r,startTime:i,endTime:a,responseBody:o,responseBodyBase64:s}=e,c=a?a-i:0,l=[];try{let e=new URL(t.url);l=Array.from(e.searchParams.entries()).map(([e,t])=>({name:e,value:t}))}catch{}let u=r?(()=>{let e=(e,t)=>{if(e==null||t==null||e<0||t<0)return-1;let n=t-e;return n>=0?n:-1},t=r.dnsStart>=0?r.dnsStart:r.connectStart>=0?r.connectStart:0;return{blocked:t>0?t:-1,dns:e(r.dnsStart,r.dnsEnd),connect:e(r.connectStart,r.connectEnd),ssl:e(r.sslStart,r.sslEnd),send:e(r.sendStart,r.sendEnd),wait:e(r.sendEnd,r.receiveHeadersStart),receive:e(r.receiveHeadersStart,r.receiveHeadersEnd)}})():{blocked:-1,dns:-1,connect:-1,ssl:-1,send:0,wait:c,receive:0},d={size:o?.length??0,mimeType:n.mimeType??`application/octet-stream`};o&&(d.text=o,s&&(d.encoding=`base64`));let f;return t.postData&&(f={mimeType:t.headers[`content-type`]??t.headers[`Content-Type`]??`text/plain`,text:t.postData}),{startedDateTime:new Date(i).toISOString(),time:c,request:{method:t.method,url:t.url,httpVersion:`HTTP/1.1`,cookies:[],headers:Object.entries(t.headers).map(([e,t])=>({name:e,value:t})),queryString:l,postData:f,headersSize:-1,bodySize:t.postData?.length??0},response:{status:n.status,statusText:n.statusText,httpVersion:`HTTP/1.1`,cookies:[],headers:Object.entries(n.headers).map(([e,t])=>({name:e,value:t})),content:d,redirectURL:n.headers.location??n.headers.Location??``,headersSize:-1,bodySize:d.size},cache:{},timings:u}}async saveSnapshot(e,t){return this.saveSnapshotWithEntries(e,t,e.entries,e.currentUrl)}async applyFilter(e,t){return y(e,t)}async saveSnapshotWithEntries(e,t,n,r){if(n.length===0)return _.debug(`No entries to save`,{recordingId:e.id,trigger:t}),null;let i=e.filterCode?await this.applyFilter(n,e.filterCode):n;if(i.length===0)return _.debug(`All entries filtered out`,{recordingId:e.id,trigger:t}),null;e.snapshotCount++;let a=new Date().toISOString().replace(/[:.]/g,`-`),o=this.urlToSlug(r),s=`${e.snapshotCount.toString().padStart(3,`0`)}-${a}-${t}-${o}.har`,c=`/recordings/${e.id}/${s}`,l={log:{version:`1.2`,creator:{name:`SLICC HAR Recorder`,version:`1.0.0`},entries:i}};return await this.fs.writeFile(c,JSON.stringify(l,null,2)),_.debug(`Saved HAR snapshot`,{recordingId:e.id,path:c,entryCount:i.length}),c}urlToSlug(e){try{let t=new URL(e);return`${t.hostname}${t.pathname}`.replace(/[^a-zA-Z0-9]/g,`-`).replace(/-+/g,`-`).replace(/^-|-$/g,``).slice(0,50)||`page`}catch{return`page`}}async stopRecording(e){let t=this.recordings.get(e);if(!t)throw Error(`Recording not found: ${e}`);await this.saveSnapshot(t,`close`);let n=this.eventCleanup.get(e);n&&(n(),this.eventCleanup.delete(e));try{await this.client.send(`Network.disable`,{},t.sessionId)}catch{}this.recordings.delete(e);let r=`/recordings/${e}`;return _.debug(`Stopped recording`,{recordingId:e,snapshotCount:t.snapshotCount}),r}getRecording(e){return this.recordings.get(e)}getRecordingByTarget(e){for(let[t,n]of this.recordings)if(n.targetId===e)return t}async ensureDir(e){await this.fs.mkdir(e,{recursive:!0})}};function y(e,t){try{let n=Function(`entry`,`return (${t})(entry);`),r=[];for(let t of e)try{let e=n(t);if(e===!1)continue;typeof e==`object`&&e?r.push(e):r.push(t)}catch(e){_.error(`Filter function error on entry, keeping it`,{error:e instanceof Error?e.message:String(e)}),r.push(t)}return r}catch(t){return _.error(`Failed to compile filter, returning unfiltered`,{error:t instanceof Error?t.message:String(t)}),e}}var b=class{maxSessions;onEvict;sessions=new Map;pinnedTargets=new Map;appliedSends=new Map;constructor(e=32,t){this.maxSessions=e,this.onEvict=t}get size(){return this.sessions.size}get(e){return this.sessions.get(e)}has(e){return this.sessions.has(e)}values(){return this.sessions.values()}entries(){return this.sessions.entries()}snapshot(){return[...this.sessions]}remember(e,t){this.pruneAppliedSends(),this.sessions.set(e,t),this.enforceCap(e)}touch(e,t){this.sessions.delete(e),this.sessions.set(e,t)}take(e){let t=this.sessions.get(e);return t&&this.sessions.delete(e),t}delete(e){this.sessions.delete(e)}clear(){this.sessions.clear()}pin(e){this.pinnedTargets.set(e,(this.pinnedTargets.get(e)??0)+1);let t=!1;return()=>{if(t)return;t=!0;let n=(this.pinnedTargets.get(e)??1)-1;n>0?this.pinnedTargets.set(e,n):this.pinnedTargets.delete(e),this.enforceCap()}}isPinned(e){return this.pinnedTargets.has(e)}enforceCap(e){for(;this.sessions.size>this.maxSessions;){let t;for(let n of this.sessions.keys())if(!(n===e||this.pinnedTargets.has(n))){t=n;break}if(t===void 0)return;let n=this.sessions.get(t);this.sessions.delete(t),n&&this.onEvict?.(t,n)}}noteApplied(e){this.appliedSends.set(e,(this.appliedSends.get(e)??0)+1)}appliedCount(e){return this.appliedSends.get(e)??0}pruneAppliedSends(){if(this.appliedSends.size<=this.maxSessions*4)return;let e=new Set([...this.sessions.values()].map(e=>e.sessionId));for(let t of[...this.appliedSends.keys()])e.has(t)||this.appliedSends.delete(t)}findBySessionId(e){for(let[t,n]of this.sessions)if(n.sessionId===e)return[t,n]}findByTargetOrLocalId(e){let t=[];for(let[n,r]of this.sessions)(n===e||r.remote?.localTargetId===e)&&t.push([n,r]);return t}anyOnTransport(e){for(let t of this.sessions.values())if(t.transport===e)return!0;return!1}anyMatchingRemote(e,t){for(let n of this.sessions.values())if(n.remote?.runtimeId===e&&n.remote.localTargetId===t)return!0;return!1}},x=`slicc.ariaRefs`,S=[`textbox`,`button`,`link`,`checkbox`,`radio`,`iframe`];function C(e=0){return`(${w})(${Number.isSafeInteger(e)&&e>0?e:0})`}function te(e){return`(function(ref) {
|
|
1
|
+
import{t as e}from"./logger-DDBAeTLF.js";import"./navigation-watcher-CPcnZL9l.js";import"./wc-follower-oauth-DFirJqdu.js";import{d as t,l as n,u as r}from"./main-rwkIawzW.js";import{n as i,t as a}from"./pending-request-table-k-D7ZZsL.js";var o=e(`cdp`);function s(e){return e===4001?`CDP connection superseded by another SLICC tab/window on this instance`:e===4002?`CDP connection reset by proxy (upstream Chrome connection was re-established)`:`CDP connection closed`}var c=class{ws=null;nextId=1;_superseded=!1;pending=new a;listeners=new Map;_state=`disconnected`;stateListeners=new Set;lastNotifiedState=`disconnected`;lastNotifiedReason;get state(){return this._state}onStateChange(e){return this.stateListeners.add(e),()=>{this.stateListeners.delete(e)}}get superseded(){return this._superseded}async connect(e){if(this._state!==`disconnected`)throw Error(`Cannot connect: state is ${this._state}`);if(!e?.url)throw Error(`CDPClient.connect() requires a WebSocket URL`);let{url:t,timeout:n=5e3,protocols:r}=e;return this._state=`connecting`,new Promise((e,i)=>{let a=setTimeout(()=>{this.cleanup(),i(Error(`CDP connection timed out after ${n}ms`))},n);try{this.ws=r===void 0?new WebSocket(t):new WebSocket(t,r)}catch(e){clearTimeout(a),this._state=`disconnected`,i(e);return}this.ws.onopen=()=>{clearTimeout(a),this._state=`connected`,this._superseded=!1,o.info(`Connected`,{url:t}),this.notifyState(`connected`),e()},this.ws.onerror=e=>{clearTimeout(a),this._state===`connecting`&&(o.error(`Connection failed`,{url:t}),this.cleanup(),i(Error(`CDP WebSocket connection failed`)))},this.ws.onmessage=e=>{this.handleMessage(e.data)},this.ws.onclose=e=>{this.handleClose(e?.code)}})}disconnect(){this.ws&&(this.ws.onclose=null,this.ws.close()),this._superseded=!1,this.cleanup(),o.info(`Disconnected`)}async send(e,t,n,r=3e4){if(this._state!==`connected`||!this.ws)throw Error(`CDP client is not connected`);let i=this.nextId++,a={id:i,method:e};t&&(a.params=t),n&&(a.sessionId=n),o.debug(`Send`,{method:e,id:i,sessionId:n});let s=this.pending.issue(i,r,`CDP command timed out after ${r}ms: ${e}`);return this.ws.send(JSON.stringify(a)),s}on(e,t){let n=this.listeners.get(e);n||(n=new Set,this.listeners.set(e,n)),n.add(t)}off(e,t){let n=this.listeners.get(e);n&&(n.delete(t),n.size===0&&this.listeners.delete(e))}once(e,t=3e4){return i(t=>(this.on(e,t),()=>this.off(e,t)),t,`Timed out waiting for event: ${e}`)}handleMessage(e){let t;try{t=JSON.parse(e)}catch{return}if(`id`in t&&typeof t.id==`number`){let e=t;o.debug(`Response`,{id:e.id,hasError:!!e.error}),e.error?(o.error(`Command error`,{id:e.id,code:e.error.code,message:e.error.message}),this.pending.reject(e.id,Error(`CDP error: ${e.error.message} (${e.error.code})`))):this.pending.resolve(e.id,e.result??{});return}if(`method`in t){let e=t;o.debug(`Event`,{method:e.method,sessionId:e.sessionId});let n=this.listeners.get(e.method);if(n){let t=e.sessionId?{...e.params,sessionId:e.sessionId}:e.params??{};for(let e of n)try{e(t)}catch{}}}}handleClose(e){e===4001?(this._superseded=!0,o.warn(`CDP slot superseded by another SLICC tab/window on this instance`,{code:e})):e===4002?o.warn(`CDP proxy reset its upstream Chrome connection — sessions dropped`,{code:e,pendingCommands:this.pending.size}):o.error(`Connection closed unexpectedly`,{pendingCommands:this.pending.size}),this.cleanup(s(e))}cleanup(e=`CDP client disconnected`){this.ws=null,this._state=`disconnected`,this.pending.rejectAll(e),this.notifyState(`disconnected`,e)}notifyState(e,t){if(e!==this.lastNotifiedState||t!==this.lastNotifiedReason){this.lastNotifiedState=e,this.lastNotifiedReason=t;for(let n of this.stateListeners)try{n(e,t)}catch{}}}},l=`ws://localhost:5710/cdp`;function u(e=typeof window<`u`?window.location:null){return e?.host?`${e.protocol===`https:`?`wss:`:`ws:`}//${e.host}/cdp`:l}var d=class{lastConnectOptions=null;supersededHandler=null;supersededNotified=!1;reconnectAttempt=0;reconnectNotBefore=0;bridgeRejection=null;bridgeRejectedHandler=null;bridgeRejectedNotified=!1;classifyConnectFailure=async()=>`transient`;primeConnectOptions(e){this.lastConnectOptions=e?{...e}:{}}setSupersededHandler(e){this.supersededHandler=e}setBridgeRejectedHandler(e){this.bridgeRejectedHandler=e}setConnectFailureClassifier(e){this.classifyConnectFailure=e}async connect(e,t){if(this.bridgeRejection)throw this.notifyBridgeRejected(),new n(this.bridgeRejection);this.lastConnectOptions=t?{...t}:{};try{await e.connect({url:t?.url??u(),timeout:t?.timeout,...t?.protocols===void 0?{}:{protocols:t.protocols}})}catch(e){throw await this.noteReconnectFailure(t),this.bridgeRejection?new n(this.bridgeRejection):e}this.noteReconnectSuccess()}async ensureLocalConnected(e){if(e.superseded===!0){this.notifySuperseded();return}if(e.state===`disconnected`){this.throwIfReconnectPaused();let t=this.lastConnectOptions;try{await e.connect({url:t?.url??u(),...t?.timeout===void 0?{}:{timeout:t.timeout},...t?.protocols===void 0?{}:{protocols:t.protocols}})}catch(e){throw await this.noteReconnectFailure(t??void 0),this.bridgeRejection?new n(this.bridgeRejection):e}this.noteReconnectSuccess()}}async ensureConnected(e){if(e.client.superseded===!0){this.notifySuperseded();return}if(e.client.state===`disconnected`){this.throwIfReconnectPaused();let t=e.client;e.restoreLocalAfterRemoteDrop(),e.clearSessionsForTransport(t),e.getClient().state===`disconnected`&&await this.connect(e.getClient(),this.lastConnectOptions??void 0)}}throwIfReconnectPaused(){if(this.bridgeRejection)throw this.notifyBridgeRejected(),new n(this.bridgeRejection);if(Date.now()<this.reconnectNotBefore)throw new r}noteReconnectSuccess(){this.reconnectAttempt=0,this.reconnectNotBefore=0,this.supersededNotified=!1}async noteReconnectFailure(e){if(await this.classifyConnectFailure({url:e?.url??``,...e?.protocols===void 0?{}:{protocols:e.protocols}})===`terminal`){this.bridgeRejection=new n().message,this.notifyBridgeRejected();return}let r=t(this.reconnectAttempt);this.reconnectAttempt+=1,this.reconnectNotBefore=Date.now()+r}notifyBridgeRejected(){if(!this.bridgeRejectedNotified){this.bridgeRejectedNotified=!0;try{this.bridgeRejectedHandler?.()}catch{}}}notifySuperseded(){if(!this.supersededNotified){this.supersededNotified=!0;try{this.supersededHandler?.()}catch{}}}},f=class extends Error{step;name=`CommandAbortedError`;constructor(e){super(`Browser command aborted while ${e}. A CDP round trip already in flight cannot be cancelled, so it may still have been applied to the page; nothing after it was started.`),this.step=e}};function p(e,t){if(e?.aborted)throw new f(t)}function m(e,t){return e?{signal:e,error:()=>new f(t)}:void 0}function h(e,t,n){return new Promise((r,i)=>{if(t?.aborted){i(new f(n));return}let a=()=>{clearTimeout(o),i(new f(n))},o=setTimeout(()=>{t?.removeEventListener(`abort`,a),r()},e);t?.addEventListener(`abort`,a,{once:!0})})}function ee(e,t,n){return t?t.aborted?Promise.reject(new f(n)):new Promise((r,i)=>{let a=()=>i(new f(n));t.addEventListener(`abort`,a,{once:!0}),e.then(()=>{t.removeEventListener(`abort`,a),r()},e=>{t.removeEventListener(`abort`,a),i(e instanceof Error?e:Error(String(e)))})}):e}var g=class{contexts=new Map;for(e,t){let n=`${t}:${e}`,r=this.contexts.get(n);return r||(r=new Map,this.contexts.set(n,r)),r}peek(e,t){return this.contexts.get(`${t}:${e}`)}drop(e){this.contexts.delete(`main:${e}`),this.contexts.delete(`isolated:${e}`)}get size(){return this.contexts.size}},_=e(`har-recorder`),v=class{recordings=new Map;client;fs;eventCleanup=new Map;constructor(e,t){this.client=e,this.fs=t}async startRecording(e,t,n,r){let i=`rec-${Date.now()}-${Math.random().toString(36).slice(2,8)}`;p(r,`about to enable Network on tab ${e}`),await this.client.send(`Network.enable`,{},t),p(r,`about to enable Page on tab ${e}`),await this.client.send(`Page.enable`,{},t),p(r,`about to read the URL of tab ${e}`);let a=(await this.client.send(`Runtime.evaluate`,{expression:`location.href`,returnByValue:!0},t)).result?.value??`about:blank`,o={id:i,targetId:e,sessionId:t,filterCode:n,pendingRequests:new Map,entries:[],startTime:Date.now(),currentUrl:a,snapshotCount:0};return this.recordings.set(i,o),this.setupEventListeners(o),await this.ensureDir(`/recordings/${i}`),_.debug(`Started recording`,{recordingId:i,targetId:e,currentUrl:a}),i}setupEventListeners(e){let{sessionId:t,id:n}=e,r=n=>{let r=n;r.sessionId===t&&this.handleRequestWillBeSent(e,r)},i=n=>{let r=n;r.sessionId===t&&this.handleResponseReceived(e,r)},a=r=>{let i=r;i.sessionId===t&&this.handleLoadingFinished(e,i).catch(e=>{_.error(`Failed to process loadingFinished event`,{recordingId:n,requestId:i.requestId,error:e instanceof Error?e.message:String(e)})})},o=n=>{let r=n;r.sessionId===t&&this.handleLoadingFailed(e,r)},s=r=>{let i=r;if(i.sessionId!==t)return;let a=i.frame;if(!a?.parentId&&a?.url){let t=[...e.entries],r=e.currentUrl;e.currentUrl=a.url,e.entries=[],e.pendingRequests.clear(),this.saveSnapshotWithEntries(e,`navigation`,t,r).catch(e=>{_.error(`Failed to save navigation snapshot`,{recordingId:n,error:e instanceof Error?e.message:String(e)})})}};this.client.on(`Network.requestWillBeSent`,r),this.client.on(`Network.responseReceived`,i),this.client.on(`Network.loadingFinished`,a),this.client.on(`Network.loadingFailed`,o),this.client.on(`Page.frameNavigated`,s),this.eventCleanup.set(n,()=>{this.client.off(`Network.requestWillBeSent`,r),this.client.off(`Network.responseReceived`,i),this.client.off(`Network.loadingFinished`,a),this.client.off(`Network.loadingFailed`,o),this.client.off(`Page.frameNavigated`,s)})}handleRequestWillBeSent(e,t){let{requestId:n,request:r,timestamp:i}=t;!n||!r||i==null||e.pendingRequests.set(n,{requestId:n,startTime:i*1e3,request:{method:r.method,url:r.url,headers:r.headers,postData:r.postData}})}handleResponseReceived(e,t){let{requestId:n,response:r}=t;if(!n||!r)return;let i=e.pendingRequests.get(n);i&&(i.response={status:r.status,statusText:r.statusText,headers:r.headers,mimeType:r.mimeType},i.timing=r.timing)}async handleLoadingFinished(e,t){let{requestId:n,timestamp:r}=t;if(!n||r==null)return;let i=e.pendingRequests.get(n);if(!i)return;i.endTime=r*1e3;try{let t=await this.client.send(`Network.getResponseBody`,{requestId:n},e.sessionId);i.responseBody=t.body,i.responseBodyBase64=t.base64Encoded===!0}catch{}let a=this.buildHarEntry(i);a&&e.entries.push(a),e.pendingRequests.delete(n)}handleLoadingFailed(e,t){let{requestId:n}=t;n&&e.pendingRequests.delete(n)}buildHarEntry(e){if(!e.response)return null;let{request:t,response:n,timing:r,startTime:i,endTime:a,responseBody:o,responseBodyBase64:s}=e,c=a?a-i:0,l=[];try{let e=new URL(t.url);l=Array.from(e.searchParams.entries()).map(([e,t])=>({name:e,value:t}))}catch{}let u=r?(()=>{let e=(e,t)=>{if(e==null||t==null||e<0||t<0)return-1;let n=t-e;return n>=0?n:-1},t=r.dnsStart>=0?r.dnsStart:r.connectStart>=0?r.connectStart:0;return{blocked:t>0?t:-1,dns:e(r.dnsStart,r.dnsEnd),connect:e(r.connectStart,r.connectEnd),ssl:e(r.sslStart,r.sslEnd),send:e(r.sendStart,r.sendEnd),wait:e(r.sendEnd,r.receiveHeadersStart),receive:e(r.receiveHeadersStart,r.receiveHeadersEnd)}})():{blocked:-1,dns:-1,connect:-1,ssl:-1,send:0,wait:c,receive:0},d={size:o?.length??0,mimeType:n.mimeType??`application/octet-stream`};o&&(d.text=o,s&&(d.encoding=`base64`));let f;return t.postData&&(f={mimeType:t.headers[`content-type`]??t.headers[`Content-Type`]??`text/plain`,text:t.postData}),{startedDateTime:new Date(i).toISOString(),time:c,request:{method:t.method,url:t.url,httpVersion:`HTTP/1.1`,cookies:[],headers:Object.entries(t.headers).map(([e,t])=>({name:e,value:t})),queryString:l,postData:f,headersSize:-1,bodySize:t.postData?.length??0},response:{status:n.status,statusText:n.statusText,httpVersion:`HTTP/1.1`,cookies:[],headers:Object.entries(n.headers).map(([e,t])=>({name:e,value:t})),content:d,redirectURL:n.headers.location??n.headers.Location??``,headersSize:-1,bodySize:d.size},cache:{},timings:u}}async saveSnapshot(e,t){return this.saveSnapshotWithEntries(e,t,e.entries,e.currentUrl)}async applyFilter(e,t){return y(e,t)}async saveSnapshotWithEntries(e,t,n,r){if(n.length===0)return _.debug(`No entries to save`,{recordingId:e.id,trigger:t}),null;let i=e.filterCode?await this.applyFilter(n,e.filterCode):n;if(i.length===0)return _.debug(`All entries filtered out`,{recordingId:e.id,trigger:t}),null;e.snapshotCount++;let a=new Date().toISOString().replace(/[:.]/g,`-`),o=this.urlToSlug(r),s=`${e.snapshotCount.toString().padStart(3,`0`)}-${a}-${t}-${o}.har`,c=`/recordings/${e.id}/${s}`,l={log:{version:`1.2`,creator:{name:`SLICC HAR Recorder`,version:`1.0.0`},entries:i}};return await this.fs.writeFile(c,JSON.stringify(l,null,2)),_.debug(`Saved HAR snapshot`,{recordingId:e.id,path:c,entryCount:i.length}),c}urlToSlug(e){try{let t=new URL(e);return`${t.hostname}${t.pathname}`.replace(/[^a-zA-Z0-9]/g,`-`).replace(/-+/g,`-`).replace(/^-|-$/g,``).slice(0,50)||`page`}catch{return`page`}}async stopRecording(e){let t=this.recordings.get(e);if(!t)throw Error(`Recording not found: ${e}`);await this.saveSnapshot(t,`close`);let n=this.eventCleanup.get(e);n&&(n(),this.eventCleanup.delete(e));try{await this.client.send(`Network.disable`,{},t.sessionId)}catch{}this.recordings.delete(e);let r=`/recordings/${e}`;return _.debug(`Stopped recording`,{recordingId:e,snapshotCount:t.snapshotCount}),r}getRecording(e){return this.recordings.get(e)}getRecordingByTarget(e){for(let[t,n]of this.recordings)if(n.targetId===e)return t}async ensureDir(e){await this.fs.mkdir(e,{recursive:!0})}};function y(e,t){try{let n=Function(`entry`,`return (${t})(entry);`),r=[];for(let t of e)try{let e=n(t);if(e===!1)continue;typeof e==`object`&&e?r.push(e):r.push(t)}catch(e){_.error(`Filter function error on entry, keeping it`,{error:e instanceof Error?e.message:String(e)}),r.push(t)}return r}catch(t){return _.error(`Failed to compile filter, returning unfiltered`,{error:t instanceof Error?t.message:String(t)}),e}}var b=class{maxSessions;onEvict;sessions=new Map;pinnedTargets=new Map;appliedSends=new Map;constructor(e=32,t){this.maxSessions=e,this.onEvict=t}get size(){return this.sessions.size}get(e){return this.sessions.get(e)}has(e){return this.sessions.has(e)}values(){return this.sessions.values()}entries(){return this.sessions.entries()}snapshot(){return[...this.sessions]}remember(e,t){this.pruneAppliedSends(),this.sessions.set(e,t),this.enforceCap(e)}touch(e,t){this.sessions.delete(e),this.sessions.set(e,t)}take(e){let t=this.sessions.get(e);return t&&this.sessions.delete(e),t}delete(e){this.sessions.delete(e)}clear(){this.sessions.clear()}pin(e){this.pinnedTargets.set(e,(this.pinnedTargets.get(e)??0)+1);let t=!1;return()=>{if(t)return;t=!0;let n=(this.pinnedTargets.get(e)??1)-1;n>0?this.pinnedTargets.set(e,n):this.pinnedTargets.delete(e),this.enforceCap()}}isPinned(e){return this.pinnedTargets.has(e)}enforceCap(e){for(;this.sessions.size>this.maxSessions;){let t;for(let n of this.sessions.keys())if(!(n===e||this.pinnedTargets.has(n))){t=n;break}if(t===void 0)return;let n=this.sessions.get(t);this.sessions.delete(t),n&&this.onEvict?.(t,n)}}noteApplied(e){this.appliedSends.set(e,(this.appliedSends.get(e)??0)+1)}appliedCount(e){return this.appliedSends.get(e)??0}pruneAppliedSends(){if(this.appliedSends.size<=this.maxSessions*4)return;let e=new Set([...this.sessions.values()].map(e=>e.sessionId));for(let t of[...this.appliedSends.keys()])e.has(t)||this.appliedSends.delete(t)}findBySessionId(e){for(let[t,n]of this.sessions)if(n.sessionId===e)return[t,n]}findByTargetOrLocalId(e){let t=[];for(let[n,r]of this.sessions)(n===e||r.remote?.localTargetId===e)&&t.push([n,r]);return t}anyOnTransport(e){for(let t of this.sessions.values())if(t.transport===e)return!0;return!1}anyMatchingRemote(e,t){for(let n of this.sessions.values())if(n.remote?.runtimeId===e&&n.remote.localTargetId===t)return!0;return!1}},x=`slicc.ariaRefs`,S=[`textbox`,`button`,`link`,`checkbox`,`radio`,`iframe`];function C(e=0){return`(${w})(${Number.isSafeInteger(e)&&e>0?e:0})`}function te(e){return`(function(ref) {
|
|
2
2
|
var store = window[Symbol.for(${JSON.stringify(x)})];
|
|
3
3
|
var held = store && store.byRef.get(ref);
|
|
4
4
|
var el = held && (typeof held.deref === 'function' ? held.deref() : held);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./account-store-
|
|
1
|
+
import{a as e}from"./account-store-BwbUEHb5.js";import{a as t}from"./diagnostics-B-5VkVir.js";import{a as n}from"./compat-Ba4wPWa_.js";import{r,s as i}from"./legacy-api-aliases-C3_OAyZB.js";import{n as a}from"./pi-transcript-context-CE8ItnBz.js";const o=`cerebras`,s=`https://api.cerebras.ai/v1`,c=`openai-completions`,l=`${o}-openai`,u=`slicc-cerebras-models`;let d=[];const f=[{id:`gpt-oss-120b`,name:`GPT OSS 120B`,api:`openai`,reasoning:!0,input:[`text`],context_window:131072,max_tokens:40960},{id:`gemma-4-31b`,name:`Gemma 4 31B`,api:`openai`,reasoning:!1,input:[`text`,`image`],context_window:131072,max_tokens:40960},{id:`zai-glm-4.7`,name:`Z.AI GLM-4.7`,api:`openai`,reasoning:!1,input:[`text`],context_window:131072,max_tokens:40960}];function p(e){try{localStorage.setItem(u,JSON.stringify(e))}catch{}}function m(){try{let e=localStorage.getItem(u);if(!e)return[];let t=JSON.parse(e);return Array.isArray(t)&&t.length>0?t:[]}catch{return[]}}function h(e){let t=e.id??``,n=f.find(e=>e.id===t);return{id:t,name:e.name??n?.name??t,api:`openai`,reasoning:e.capabilities?.reasoning??n?.reasoning??!1,input:e.capabilities?.vision?[`text`,`image`]:n?.input??[`text`],context_window:e.limits?.max_context_length??n?.context_window??8192,max_tokens:e.limits?.max_completion_tokens??n?.max_tokens??4096}}async function g(e){let t=await fetch(`${s}/models`,{headers:{Authorization:`Bearer ${e}`}});if(!t.ok)throw Error(`GET /v1/models → ${t.status} ${t.statusText}`);let n=((await t.json()).data??[]).map(h).filter(e=>e.id.length>0);n.length>0&&(d=n,p(n))}function _(e,t){return{type:`error`,reason:`error`,error:{role:`assistant`,content:[],api:l,provider:o,model:e.id,usage:{input:0,output:0,cacheRead:0,cacheWrite:0,totalTokens:0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},stopReason:`error`,errorMessage:t instanceof Error?t.message:String(t),timestamp:Date.now()}}}function v(e){console.error(`[cerebras] Stream error:`,e instanceof Error?e.message:String(e))}const y=(e,n,r={})=>{let i=t();return b(i,e,n,r).catch(v),i};async function b(e,t,n,i){try{let o={...t,baseUrl:s,api:c},l=r(o,a(n),i);for await(let t of l)e.push(t);e.end()}catch(n){v(n),e.push(_(t,n)),e.end()}}const x=(e,n,r)=>{let i=t();return S(i,e,n,r).catch(v),i};async function S(e,t,n,r){try{let o={...t,baseUrl:s,api:c},l=i(o,a(n),r);for await(let t of l)e.push(t);e.end()}catch(n){v(n),e.push(_(t,n)),e.end()}}const C={id:o,name:`Cerebras`,description:`Ultra-fast inference on Cerebras hardware. Get an API key at cloud.cerebras.ai.`,requiresApiKey:!0,requiresBaseUrl:!1,getModelIds:()=>{if(d.length>0)return d;let e=m();return e.length>0?e:f},refreshModels:async t=>{let n=t??e(o)??``;if(n)try{await g(n)}catch(e){console.warn(`[cerebras] Failed to refresh model list:`,e instanceof Error?e.message:String(e))}}};function w(){n({api:l,stream:y,streamSimple:x})}export{C as config,w as register};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./diagnostics-
|
|
1
|
+
import{a as e}from"./diagnostics-B-5VkVir.js";import{a as t}from"./compat-0YnuwvMn.js";import{r as n,s as r}from"./legacy-api-aliases-D-3Ssy_B.js";import{h as i}from"./account-store-BUXWCO9c.js";import{n as a}from"./pi-transcript-context-DZyPy5yf.js";var o=`cerebras`,s=`https://api.cerebras.ai/v1`,c=`openai-completions`,l=`${o}-openai`,u=`slicc-cerebras-models`,d=[],f=[{id:`gpt-oss-120b`,name:`GPT OSS 120B`,api:`openai`,reasoning:!0,input:[`text`],context_window:131072,max_tokens:40960},{id:`gemma-4-31b`,name:`Gemma 4 31B`,api:`openai`,reasoning:!1,input:[`text`,`image`],context_window:131072,max_tokens:40960},{id:`zai-glm-4.7`,name:`Z.AI GLM-4.7`,api:`openai`,reasoning:!1,input:[`text`],context_window:131072,max_tokens:40960}];function p(e){try{localStorage.setItem(u,JSON.stringify(e))}catch{}}function m(){try{let e=localStorage.getItem(u);if(!e)return[];let t=JSON.parse(e);return Array.isArray(t)&&t.length>0?t:[]}catch{return[]}}function h(e){let t=e.id??``,n=f.find(e=>e.id===t);return{id:t,name:e.name??n?.name??t,api:`openai`,reasoning:e.capabilities?.reasoning??n?.reasoning??!1,input:e.capabilities?.vision?[`text`,`image`]:n?.input??[`text`],context_window:e.limits?.max_context_length??n?.context_window??8192,max_tokens:e.limits?.max_completion_tokens??n?.max_tokens??4096}}async function g(e){let t=await fetch(`${s}/models`,{headers:{Authorization:`Bearer ${e}`}});if(!t.ok)throw Error(`GET /v1/models → ${t.status} ${t.statusText}`);let n=((await t.json()).data??[]).map(h).filter(e=>e.id.length>0);n.length>0&&(d=n,p(n))}function _(e,t){return{type:`error`,reason:`error`,error:{role:`assistant`,content:[],api:l,provider:o,model:e.id,usage:{input:0,output:0,cacheRead:0,cacheWrite:0,totalTokens:0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},stopReason:`error`,errorMessage:t instanceof Error?t.message:String(t),timestamp:Date.now()}}}function v(e){console.error(`[cerebras] Stream error:`,e instanceof Error?e.message:String(e))}var y=(t,n,r={})=>{let i=e();return b(i,t,n,r).catch(v),i};async function b(e,t,r,i){try{let o={...t,baseUrl:s,api:c},l=n(o,a(r),i);for await(let t of l)e.push(t);e.end()}catch(n){v(n),e.push(_(t,n)),e.end()}}var x=(t,n,r)=>{let i=e();return S(i,t,n,r).catch(v),i};async function S(e,t,n,i){try{let o={...t,baseUrl:s,api:c},l=r(o,a(n),i);for await(let t of l)e.push(t);e.end()}catch(n){v(n),e.push(_(t,n)),e.end()}}var C={id:o,name:`Cerebras`,description:`Ultra-fast inference on Cerebras hardware. Get an API key at cloud.cerebras.ai.`,requiresApiKey:!0,requiresBaseUrl:!1,getModelIds:()=>{if(d.length>0)return d;let e=m();return e.length>0?e:f},refreshModels:async e=>{let t=e??i(o)??``;if(t)try{await g(t)}catch(e){console.warn(`[cerebras] Failed to refresh model list:`,e instanceof Error?e.message:String(e))}}};function w(){t({api:l,stream:y,streamSimple:x})}export{C as config,w as register};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./models-DMUS_WIm.js";import{n as t,t as n}from"./headers-FK4rgixo.js";import{t as r}from"./provider-retry-RVfYd5Vz.js";function i(e,t,n){let r=Error(`${e} returned ${t.status}`);return r.status=t.status,r.headers=t.headers,r.body=n,r}function a(e){let t=Error(`Request timed out after ${e}ms`);return t.name=`TimeoutError`,t.status=void 0,t.headers=void 0,t.body=``,t}function o(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function s(e,t,n){if(typeof t!=`number`||!Number.isFinite(t))throw Error(`${e} returned an invalid ${n}`);return t}function c(e,n,r){return t({authorization:`Bearer ${n}`,"content-type":`application/json`},e.headers,r)??{}}async function l(e,t,o,s,l,u){if(!l?.apiKey)throw Error(`No API key for provider: ${o.provider}`);let d=l.apiKey,f=s,p=await l.onPayload?.(f,o);p!==void 0&&(f=p);let m=l.fetch??globalThis.fetch,{response:h,json:g}=await r(async()=>{let n=l.timeoutMs===void 0?void 0:AbortSignal.timeout(l.timeoutMs),r=l.signal&&n?AbortSignal.any([l.signal,n]):l.signal??n;try{let n=await m(t,{method:`POST`,headers:c(o,d,l.headers),body:JSON.stringify(f),signal:r});if(!n.ok)throw i(e,n,await n.text());return{response:n,json:await n.json()}}catch(e){throw n?.aborted&&!l.signal?.aborted?a(l.timeoutMs):e}},{maxRetries:l.maxRetries??2,maxRetryDelayMs:l.maxRetryDelayMs,signal:l.signal,noRetryStatuses:u});return await l.onResponse?.({status:h.status,headers:n(h.headers)},o),g}function u(e){return typeof e==`number`&&Number.isFinite(e)&&e>0?e:0}function d(t,n){if(!o(t)||t.input_tokens===void 0&&t.output_tokens===void 0)return;let r=u(t.input_tokens),i=u(t.output_tokens),a={input:r,output:i,cacheRead:0,cacheWrite:0,totalTokens:r+i,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}};return e(n,a),a}export{s as i,d as n,l as r,o as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./models-D9KYIFyv.js";import{n as t,t as n}from"./headers-FK4rgixo.js";import{t as r}from"./provider-retry-RVfYd5Vz.js";function i(e,t,n){let r=Error(`${e} returned ${t.status}`);return r.status=t.status,r.headers=t.headers,r.body=n,r}function a(e){let t=Error(`Request timed out after ${e}ms`);return t.name=`TimeoutError`,t.status=void 0,t.headers=void 0,t.body=``,t}function o(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function s(e,t,n){if(typeof t!=`number`||!Number.isFinite(t))throw Error(`${e} returned an invalid ${n}`);return t}function c(e,n,r){return t({authorization:`Bearer ${n}`,"content-type":`application/json`},e.headers,r)??{}}async function l(e,t,o,s,l,u){if(!l?.apiKey)throw Error(`No API key for provider: ${o.provider}`);let d=l.apiKey,f=s,p=await l.onPayload?.(f,o);p!==void 0&&(f=p);let m=l.fetch??globalThis.fetch,{response:h,json:g}=await r(async()=>{let n=l.timeoutMs===void 0?void 0:AbortSignal.timeout(l.timeoutMs),r=l.signal&&n?AbortSignal.any([l.signal,n]):l.signal??n;try{let n=await m(t,{method:`POST`,headers:c(o,d,l.headers),body:JSON.stringify(f),signal:r});if(!n.ok)throw i(e,n,await n.text());return{response:n,json:await n.json()}}catch(e){throw n?.aborted&&!l.signal?.aborted?a(l.timeoutMs):e}},{maxRetries:l.maxRetries??2,maxRetryDelayMs:l.maxRetryDelayMs,signal:l.signal,noRetryStatuses:u});return await l.onResponse?.({status:h.status,headers:n(h.headers)},o),g}function u(e){return typeof e==`number`&&Number.isFinite(e)&&e>0?e:0}function d(t,n){if(!o(t)||t.input_tokens===void 0&&t.output_tokens===void 0)return;let r=u(t.input_tokens),i=u(t.output_tokens),a={input:r,output:i,cacheRead:0,cacheWrite:0,totalTokens:r+i,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}};return e(n,a),a}export{s as i,d as n,l as r,o as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./classifier-shared-DgL5N50m.js";import{t}from"./system-one-shared-Do49zet2.js";var n=`Cloudflare Workers AI`;function r(t){if(Array.isArray(t)){let r=t.map(t=>e(t)&&typeof t.message==`string`?t.message:void 0).filter(e=>e!==void 0);if(r.length>0)return`${n} error: ${r.join(`; `)}`}return`${n} request failed`}var i={api:`cloudflare-workers-ai-system-one`,label:n,url:e=>new URL(`run`,`${e.baseUrl.replace(/\/+$/u,``)}/`),payload:(e,t)=>({model:e.id,input:t}),output:t=>{if(!e(t))throw Error(`${n} returned an unexpected response`);if(t.success===!1)throw Error(r(t.errors));let i=t.result;if(!e(i))throw Error(`${n} returned an unexpected response`);if(`answers`in i)return i;if(i.state!==`Completed`)throw Error(`${n} run did not complete (state: ${String(i.state)})`);if(!e(i.result))throw Error(`${n} returned an unexpected response`);return i.result}},a=(e,n,r)=>t(i,e,n,r);export{a as classify};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./classifier-shared-BJysQIY7.js";import{t}from"./system-one-shared-D_uXoohg.js";const n=`Cloudflare Workers AI`;function r(t){if(Array.isArray(t)){let r=t.map(t=>e(t)&&typeof t.message==`string`?t.message:void 0).filter(e=>e!==void 0);if(r.length>0)return`${n} error: ${r.join(`; `)}`}return`${n} request failed`}const i={api:`cloudflare-workers-ai-system-one`,label:n,url:e=>new URL(`run`,`${e.baseUrl.replace(/\/+$/u,``)}/`),payload:(e,t)=>({model:e.id,input:t}),output:t=>{if(!e(t))throw Error(`${n} returned an unexpected response`);if(t.success===!1)throw Error(r(t.errors));let i=t.result;if(!e(i))throw Error(`${n} returned an unexpected response`);if(`answers`in i)return i;if(i.state!==`Completed`)throw Error(`${n} run did not complete (state: ${String(i.state)})`);if(!e(i.result))throw Error(`${n} returned an unexpected response`);return i.result}},a=(e,n,r)=>t(i,e,n,r);export{a as classify};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as e}from"./logger-LESFN7Hj.js";import{mcpAgentToolName as t,resolveToolExposure as n}from"./connection-manager-
|
|
1
|
+
import{t as e}from"./logger-LESFN7Hj.js";import{mcpAgentToolName as t,resolveToolExposure as n}from"./connection-manager-BDqqVban.js";const r=e(`mcp-codemode`);let i=null;async function a(){if(i)return i;let{CodemodeSandbox:e,loadQuickJSWasm:t}=await import(`./dist-DRjYxtT0.js`);o();let n=new URL(`../kernel/codemode-worker.ts`,``+import.meta.url);return i=new e({timeoutMs:3e5,memoryLimitBytes:268435456,wasm:t(),workerUrl:n}),i}function o(){typeof SharedArrayBuffer!=`function`&&(globalThis.SharedArrayBuffer=ArrayBuffer)}function s(e){let{serverName:i,tools:o,connection:s,exposure:l,toolExposure:u}=e,d=o.filter(e=>{let t=n(e.name,l,u);return t===`codemode`||t===`codemode-deferred`});if(d.length===0)return null;let f=`Run JavaScript to orchestrate MCP tool calls from server "${i}".
|
|
2
2
|
Scripts run in a QuickJS sandbox with access to the following tools via \`tools["name"](args)\`:
|
|
3
3
|
${d.map(e=>`- \`tools[${JSON.stringify(e.name)}](args)\`: ${e.description??`(no description)`}`).join(`
|
|
4
4
|
`)}
|