shadow-claw 1.54.0 → 1.55.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/.well-known/mcp/server-card.json +1 -1
- package/.well-known/mcp.json +1 -1
- package/README.md +1 -1
- package/dist/cli/build/build.js +1 -1
- package/dist/cli/{chunk-DO2t9bUI.js → chunk--IuVyWfT.js} +24 -23
- package/dist/cli/{chunk-2ZYd9gYC.js → chunk--JpdI-Ht.js} +1 -1
- package/dist/cli/{chunk-m4Ineemy.js → chunk-4O8yrQuN.js} +1 -1
- package/dist/cli/{chunk-BiH9IXnQ.js → chunk-7S9Ywlfy.js} +1 -1
- package/dist/cli/{chunk-BmMOdYvk.js → chunk-B0SqqDSK.js} +1 -1
- package/dist/cli/chunk-BNaWaEm-.js +1 -0
- package/dist/cli/chunk-BXCsxO9e.js +1 -0
- package/dist/cli/chunk-Bq37qDoZ.js +18 -0
- package/dist/cli/{chunk-C1htf-nO.js → chunk-BrEeCKIo.js} +2 -2
- package/dist/cli/{chunk-BI1SOTM1.js → chunk-Bu3ylrhT.js} +8 -8
- package/dist/cli/{chunk-3smiGQoQ.js → chunk-C1v_s0Kb.js} +1 -1
- package/dist/cli/{chunk-DGeysxz3.js → chunk-C44G533y.js} +1 -1
- package/dist/cli/{chunk-9KiBalKu.js → chunk-C7hJLmsL.js} +1 -1
- package/dist/cli/{chunk-BFv9XSNd.js → chunk-CAaQWd6t.js} +1 -1
- package/dist/cli/chunk-CIkgn5Fh.js +1 -0
- package/dist/cli/chunk-CWEIN2kc.js +1 -0
- package/dist/cli/{chunk-BDeDZ-0L.js → chunk-CYg1lO1a.js} +1 -1
- package/dist/cli/{chunk-DXLmEQ3i.js → chunk-Ce09lwXT.js} +1 -1
- package/dist/cli/{chunk-XsfHeN4m.js → chunk-CpdqRSO-.js} +1 -1
- package/dist/cli/chunk-DB4x5L-B.js +1 -0
- package/dist/cli/{chunk-DaNyMqrk.js → chunk-DBvObsBQ.js} +1 -1
- package/dist/cli/chunk-DGPpt7Ka.js +1 -0
- package/dist/cli/chunk-DGagHluH.js +1 -0
- package/dist/cli/chunk-DUIs23D9.js +1 -0
- package/dist/cli/{chunk-CyvfQV16.js → chunk-DaurYOqg.js} +1 -1
- package/dist/cli/{chunk-DSFrcSyA.js → chunk-DfwRL0Ue.js} +1 -1
- package/dist/cli/{chunk-M2tZrzY5.js → chunk-DudYQk0p.js} +1 -1
- package/dist/cli/chunk-DvKo50Tp.js +2 -0
- package/dist/cli/{chunk-H_Mw5ypp.js → chunk-Dvrqte5Q.js} +2 -2
- package/dist/cli/{chunk-BtNO-m9T.js → chunk-DzhSExU0.js} +1 -1
- package/dist/cli/{chunk-IOMO88kZ.js → chunk-ENKlt3i9.js} +1 -1
- package/dist/cli/{chunk-Bspgzwsm.js → chunk-FWRwAX75.js} +8 -8
- package/dist/cli/chunk-Lf-Z-h48.js +32 -0
- package/dist/cli/{chunk-BucXnZ4Z.js → chunk-VRfkSLrD.js} +1 -1
- package/dist/cli/chunk-uaTxD024.js +1 -0
- package/dist/cli/cli.js +1 -1
- package/dist/cli/prerender/dsd-shell/prerender-dsd-shell.js +1 -1
- package/dist/headless-agent.js +2 -2
- package/dist/lib/components/index.js +25 -25
- package/dist/lib/components/settings/shadow-claw-accounts.js +1 -1
- package/dist/lib/components/settings/shadow-claw-channel-config.js +1 -1
- package/dist/lib/components/settings/shadow-claw-control-plane.js +1 -1
- package/dist/lib/components/settings/shadow-claw-git.js +1 -1
- package/dist/lib/components/settings/shadow-claw-integrations.js +1 -1
- package/dist/lib/components/settings/shadow-claw-llm.js +1 -1
- package/dist/lib/components/settings/shadow-claw-mcp-remote.js +1 -1
- package/dist/lib/components/settings/shadow-claw-networking.js +1 -1
- package/dist/lib/components/settings/shadow-claw-notifications.js +1 -1
- package/dist/lib/components/settings/shadow-claw-peerjs.js +1 -1
- package/dist/lib/components/settings/shadow-claw-storage.js +1 -1
- package/dist/lib/components/settings/shadow-claw-task-server.js +1 -1
- package/dist/lib/components/settings/shadow-claw-webvm.js +1 -1
- package/dist/lib/components/shadow-claw/utils/get-route.d.ts +3 -0
- package/dist/lib/components/shadow-claw/utils/sync-slotted-sidebar-active-links.d.ts +1 -1
- package/dist/lib/components/shadow-claw-accounts.js +1 -1
- package/dist/lib/components/shadow-claw-channel-config.js +1 -1
- package/dist/lib/components/shadow-claw-channels.js +1 -1
- package/dist/lib/components/shadow-claw-chat.js +1 -1
- package/dist/lib/components/shadow-claw-control-plane.js +1 -1
- package/dist/lib/components/shadow-claw-conversations.js +1 -1
- package/dist/lib/components/shadow-claw-file-viewer.js +1 -1
- package/dist/lib/components/shadow-claw-files.js +1 -1
- package/dist/lib/components/shadow-claw-git.js +1 -1
- package/dist/lib/components/shadow-claw-integrations.js +1 -1
- package/dist/lib/components/shadow-claw-llm.js +1 -1
- package/dist/lib/components/shadow-claw-mcp-remote.js +1 -1
- package/dist/lib/components/shadow-claw-networking.js +1 -1
- package/dist/lib/components/shadow-claw-notifications.js +1 -1
- package/dist/lib/components/shadow-claw-page-header.js +1 -1
- package/dist/lib/components/shadow-claw-pages.js +1 -1
- package/dist/lib/components/shadow-claw-peerjs.js +1 -1
- package/dist/lib/components/shadow-claw-settings.js +1 -1
- package/dist/lib/components/shadow-claw-storage.js +1 -1
- package/dist/lib/components/shadow-claw-task-server.js +1 -1
- package/dist/lib/components/shadow-claw-tasks.js +1 -1
- package/dist/lib/components/shadow-claw-terminal.js +1 -1
- package/dist/lib/components/shadow-claw-tools.js +1 -1
- package/dist/lib/components/shadow-claw-webvm.js +1 -1
- package/dist/lib/components/shadow-claw.js +1 -1
- package/dist/lib/{configure-peer-js-D5jDCtLx.js → configure-peer-js-C9554Slv.js} +2 -2
- package/dist/lib/{configure-peer-js-D5jDCtLx.js.map → configure-peer-js-C9554Slv.js.map} +1 -1
- package/dist/lib/{file-viewer-B4CL4e0i.js → file-viewer-DBc5dxNy.js} +2 -2
- package/dist/lib/{file-viewer-B4CL4e0i.js.map → file-viewer-DBc5dxNy.js.map} +1 -1
- package/dist/lib/index.js +28 -27
- package/dist/lib/{init-control-plane-l2uFnhGV.js → init-control-plane-D-41Fm5q.js} +12 -12
- package/dist/lib/{init-control-plane-l2uFnhGV.js.map → init-control-plane-D-41Fm5q.js.map} +1 -1
- package/dist/lib/{markdown-0_p_zfxL.js → markdown-KnDWzWJJ.js} +2 -2
- package/dist/lib/{markdown-0_p_zfxL.js.map → markdown-KnDWzWJJ.js.map} +1 -1
- package/dist/lib/{orchestrator-D6wm8Sec.js → orchestrator-BEZcqgR5.js} +9 -9
- package/dist/lib/{orchestrator-D6wm8Sec.js.map → orchestrator-BEZcqgR5.js.map} +1 -1
- package/dist/lib/{orchestrator-Dh-hnIpK.js → orchestrator-Cda13e5U.js} +4 -4
- package/dist/lib/{orchestrator-Dh-hnIpK.js.map → orchestrator-Cda13e5U.js.map} +1 -1
- package/dist/lib/{peerjs-BWZnsD0B.js → peerjs-DYkUTcee.js} +5 -5
- package/dist/lib/{peerjs-BWZnsD0B.js.map → peerjs-DYkUTcee.js.map} +1 -1
- package/dist/lib/{push-client-MybDfOdi.js → push-client-CQtCFDaD.js} +3 -3
- package/dist/lib/{push-client-MybDfOdi.js.map → push-client-CQtCFDaD.js.map} +1 -1
- package/dist/lib/security/custom-element-security.d.ts +8 -4
- package/dist/lib/{shadow-claw-PdOpgTxH.js → shadow-claw-DYe9u6Tp.js} +142 -33
- package/dist/lib/shadow-claw-DYe9u6Tp.js.map +1 -0
- package/dist/lib/{shadow-claw-accounts-3bR76EOb.js → shadow-claw-accounts-D2URoHys.js} +2 -2
- package/dist/lib/{shadow-claw-accounts-3bR76EOb.js.map → shadow-claw-accounts-D2URoHys.js.map} +1 -1
- package/dist/lib/{shadow-claw-channel-config-ChdZ1iB8.js → shadow-claw-channel-config-buXoz2xv.js} +3 -3
- package/dist/lib/{shadow-claw-channel-config-ChdZ1iB8.js.map → shadow-claw-channel-config-buXoz2xv.js.map} +1 -1
- package/dist/lib/{shadow-claw-channels-CK9sc7h_.js → shadow-claw-channels-5yVJ1gLk.js} +3 -3
- package/dist/lib/{shadow-claw-channels-CK9sc7h_.js.map → shadow-claw-channels-5yVJ1gLk.js.map} +1 -1
- package/dist/lib/{shadow-claw-chat-B6uuZnJ7.js → shadow-claw-chat-CVc-7ycM.js} +7 -7
- package/dist/lib/{shadow-claw-chat-B6uuZnJ7.js.map → shadow-claw-chat-CVc-7ycM.js.map} +1 -1
- package/dist/lib/{shadow-claw-control-plane-BpRcl312.js → shadow-claw-control-plane-B5vsF91B.js} +6 -6
- package/dist/lib/{shadow-claw-control-plane-BpRcl312.js.map → shadow-claw-control-plane-B5vsF91B.js.map} +1 -1
- package/dist/lib/{shadow-claw-conversations-Dc_Xk2mB.js → shadow-claw-conversations-PGK5zqn3.js} +54 -12
- package/dist/lib/{shadow-claw-conversations-Dc_Xk2mB.js.map → shadow-claw-conversations-PGK5zqn3.js.map} +1 -1
- package/dist/lib/{shadow-claw-file-viewer-C4x1PtB2.js → shadow-claw-file-viewer-DSqn0hgx.js} +6 -6
- package/dist/lib/{shadow-claw-file-viewer-C4x1PtB2.js.map → shadow-claw-file-viewer-DSqn0hgx.js.map} +1 -1
- package/dist/lib/{shadow-claw-files-DhnHbXKf.js → shadow-claw-files-vOa9ZWbr.js} +6 -6
- package/dist/lib/{shadow-claw-files-DhnHbXKf.js.map → shadow-claw-files-vOa9ZWbr.js.map} +1 -1
- package/dist/lib/{shadow-claw-git-BeQ1ElUd.js → shadow-claw-git-D54Z85Bj.js} +4 -4
- package/dist/lib/{shadow-claw-git-BeQ1ElUd.js.map → shadow-claw-git-D54Z85Bj.js.map} +1 -1
- package/dist/lib/{shadow-claw-integrations-Bbdolk3w.js → shadow-claw-integrations-BTubMH9d.js} +2 -2
- package/dist/lib/{shadow-claw-integrations-Bbdolk3w.js.map → shadow-claw-integrations-BTubMH9d.js.map} +1 -1
- package/dist/lib/{shadow-claw-llm-DPda4L3C.js → shadow-claw-llm-8koGTNYs.js} +3 -3
- package/dist/lib/{shadow-claw-llm-DPda4L3C.js.map → shadow-claw-llm-8koGTNYs.js.map} +1 -1
- package/dist/lib/{shadow-claw-mcp-remote-Dn9c30WI.js → shadow-claw-mcp-remote-C2jwBsQt.js} +2 -2
- package/dist/lib/{shadow-claw-mcp-remote-Dn9c30WI.js.map → shadow-claw-mcp-remote-C2jwBsQt.js.map} +1 -1
- package/dist/lib/{shadow-claw-networking-zqNuyn3-.js → shadow-claw-networking-BV-rna16.js} +2 -2
- package/dist/lib/{shadow-claw-networking-zqNuyn3-.js.map → shadow-claw-networking-BV-rna16.js.map} +1 -1
- package/dist/lib/{shadow-claw-notifications-DFgdo33v.js → shadow-claw-notifications-Dku7VBLk.js} +2 -2
- package/dist/lib/{shadow-claw-notifications-DFgdo33v.js.map → shadow-claw-notifications-Dku7VBLk.js.map} +1 -1
- package/dist/lib/{shadow-claw-page-header-B7LFGQRf.js → shadow-claw-page-header-VPjYWfsT.js} +2 -2
- package/dist/lib/{shadow-claw-page-header-B7LFGQRf.js.map → shadow-claw-page-header-VPjYWfsT.js.map} +1 -1
- package/dist/lib/{shadow-claw-pages-DLspFqdK.js → shadow-claw-pages-DXrM6hgZ.js} +29 -19
- package/dist/lib/shadow-claw-pages-DXrM6hgZ.js.map +1 -0
- package/dist/lib/{shadow-claw-peerjs-D8xWwuWR.js → shadow-claw-peerjs-D3xonez5.js} +3 -3
- package/dist/lib/{shadow-claw-peerjs-D8xWwuWR.js.map → shadow-claw-peerjs-D3xonez5.js.map} +1 -1
- package/dist/lib/{shadow-claw-settings-NbvzXASD.js → shadow-claw-settings-DMTx6OS9.js} +5 -5
- package/dist/lib/{shadow-claw-settings-NbvzXASD.js.map → shadow-claw-settings-DMTx6OS9.js.map} +1 -1
- package/dist/lib/{shadow-claw-storage-B_NAoZmd.js → shadow-claw-storage-BJLnukxa.js} +3 -3
- package/dist/lib/{shadow-claw-storage-B_NAoZmd.js.map → shadow-claw-storage-BJLnukxa.js.map} +1 -1
- package/dist/lib/{shadow-claw-task-server-BaQJXhYJ.js → shadow-claw-task-server-DcMj20hD.js} +2 -2
- package/dist/lib/{shadow-claw-task-server-BaQJXhYJ.js.map → shadow-claw-task-server-DcMj20hD.js.map} +1 -1
- package/dist/lib/{shadow-claw-tasks-CAZua0-j.js → shadow-claw-tasks-BQBe4lVi.js} +7 -7
- package/dist/lib/{shadow-claw-tasks-CAZua0-j.js.map → shadow-claw-tasks-BQBe4lVi.js.map} +1 -1
- package/dist/lib/{shadow-claw-terminal-B2YJhkJL.js → shadow-claw-terminal-DPEzTxXv.js} +2 -2
- package/dist/lib/{shadow-claw-terminal-B2YJhkJL.js.map → shadow-claw-terminal-DPEzTxXv.js.map} +1 -1
- package/dist/lib/{shadow-claw-tools-CkZWxxTm.js → shadow-claw-tools-BCnU8FaK.js} +6 -6
- package/dist/lib/{shadow-claw-tools-CkZWxxTm.js.map → shadow-claw-tools-BCnU8FaK.js.map} +1 -1
- package/dist/lib/{shadow-claw-webvm-BL9cgrP9.js → shadow-claw-webvm-CnW-hoJ8.js} +2 -2
- package/dist/lib/{shadow-claw-webvm-BL9cgrP9.js.map → shadow-claw-webvm-CnW-hoJ8.js.map} +1 -1
- package/dist/lib/subsystems/mcp/webmcp.d.ts +15 -2
- package/dist/lib/{sync-web-mcp-registration-dW2MVCj4.js → sync-web-mcp-registration-DwpGjVdo.js} +10 -4
- package/dist/lib/sync-web-mcp-registration-DwpGjVdo.js.map +1 -0
- package/dist/lib/{tools-D7whby3H.js → tools-CP6G0HF7.js} +5 -6
- package/dist/lib/tools-CP6G0HF7.js.map +1 -0
- package/dist/lib/{trusted-types-d0cdkut_.js → trusted-types-0cu5Dm6M.js} +29 -4
- package/dist/lib/{trusted-types-d0cdkut_.js.map → trusted-types-0cu5Dm6M.js.map} +1 -1
- package/dist/lib/utils/index.d.ts +1 -0
- package/dist/lib/utils/index.js +4 -2
- package/dist/lib/utils/index.js.map +1 -1
- package/dist/lib/utils/resolve-page-script-dependencies.d.ts +19 -0
- package/dist/lib/utils/resolve-page-script-dependencies.js +98 -0
- package/dist/lib/utils/resolve-page-script-dependencies.js.map +1 -0
- package/dist/lib/utils/utils.js +1 -1
- package/dist/lib/webmcp-Bf9rT7uu.js +2001 -0
- package/dist/lib/webmcp-Bf9rT7uu.js.map +1 -0
- package/dist/public/.well-known/mcp/server-card.json +1 -1
- package/dist/public/.well-known/mcp.json +1 -1
- package/dist/public/AGENTS.md +3 -3
- package/dist/public/README.md +1 -1
- package/dist/public/agent.worker.js +2 -2
- package/dist/public/components/shadow-claw/shadow-claw.css +1 -1
- package/dist/public/components/shadow-claw/shadow-claw.html +1 -1
- package/dist/public/components/shadow-claw-conversations/shadow-claw-conversations.css +1 -1
- package/dist/public/components/shadow-claw-conversations/shadow-claw-conversations.html +1 -1
- package/dist/public/{configure-peer-js-WLRM7Qa7.js → configure-peer-js-OYl3V8sW.js} +1 -1
- package/dist/public/{custom-element-security-Cl991z-x.js → custom-element-security-BR4V40j4.js} +1 -1
- package/dist/public/docs/example/article/index.html +3 -3
- package/dist/public/docs/example/article.html +3 -3
- package/dist/public/docs/publishing/index.html +3 -3
- package/dist/public/docs/publishing.html +3 -3
- package/dist/public/docs/skill-creator/index.html +3 -3
- package/dist/public/docs/skill-creator.html +3 -3
- package/dist/public/docs/subsystems/custom-element-security.md +19 -5
- package/dist/public/docs/subsystems/pages.md +10 -2
- package/dist/public/docs/subsystems/tools.md +1 -2
- package/dist/public/docs/subsystems/webmcp.md +41 -6
- package/dist/public/{download-group-file-fFjoIIp4.js → download-group-file-BNmK8wac.js} +1 -1
- package/dist/public/e2e/README.md +2 -2
- package/dist/public/{e2e-bridge-CiSfBRT4.js → e2e-bridge-4phD1JUQ.js} +1 -1
- package/dist/public/{file-viewer-DFC3kfeO.js → file-viewer-Dbh3K9nL.js} +1 -1
- package/dist/public/index.html +3 -3
- package/dist/public/index.js +1 -1
- package/dist/public/{init-control-plane-BEbcwmmv.js → init-control-plane-DGOY_RNS.js} +1 -1
- package/dist/public/llms.txt +1 -1
- package/dist/public/main/index.html +3 -3
- package/dist/public/main/memory/index.html +3 -3
- package/dist/public/main/memory.html +3 -3
- package/dist/public/main.html +3 -3
- package/dist/public/{markdown-BeglYzw9.js → markdown-BPZYpfGm.js} +1 -1
- package/dist/public/{orchestrator-BlvEG3PO.js → orchestrator-OoUK7CF9.js} +1 -1
- package/dist/public/{orchestrator-DTNrntd4.js → orchestrator-a9047bGu.js} +1 -1
- package/dist/public/{peerjs-CnBdK94R.js → peerjs-Cbn310Tz.js} +1 -1
- package/dist/public/{push-client-DOHbdCyj.js → push-client-Dy4LGJy9.js} +1 -1
- package/dist/public/service-worker.js +1 -1
- package/dist/public/shadow-claw-B-HWC1uN.js +1180 -0
- package/dist/public/{shadow-claw-accounts-C6FXVw2K.js → shadow-claw-accounts-Di-anCZ1.js} +1 -1
- package/dist/public/{shadow-claw-channels-tr_r60Kq.js → shadow-claw-channels-RVwCE8pE.js} +1 -1
- package/dist/public/{shadow-claw-chat-BAAPhAOs.js → shadow-claw-chat-DI1q8UnX.js} +1 -1
- package/dist/public/{shadow-claw-control-plane-C_5VIx8E.js → shadow-claw-control-plane-KXEdLOGl.js} +2 -2
- package/dist/public/{shadow-claw-conversations-DGYZdDa3.js → shadow-claw-conversations-BCBGtS30.js} +40 -6
- package/dist/public/{shadow-claw-file-viewer-5j2-Z3fN.js → shadow-claw-file-viewer-CW3t6j-w.js} +1 -1
- package/dist/public/{shadow-claw-files-DKF4Yy0m.js → shadow-claw-files-JQ-o0ImX.js} +1 -1
- package/dist/public/{shadow-claw-git-CtUTJXKT.js → shadow-claw-git-D2M8VixW.js} +2 -2
- package/dist/public/{shadow-claw-integrations-CuBy9D3z.js → shadow-claw-integrations-Cgw6v9_1.js} +1 -1
- package/dist/public/{shadow-claw-llm-BIfNNjGL.js → shadow-claw-llm-74ieXp7i.js} +1 -1
- package/dist/public/{shadow-claw-mcp-remote-C17FXvrb.js → shadow-claw-mcp-remote-BX0BkSmy.js} +1 -1
- package/dist/public/{shadow-claw-networking-CjxQ1CLI.js → shadow-claw-networking-DNX8vaIQ.js} +1 -1
- package/dist/public/{shadow-claw-notifications-Brn2O3Ps.js → shadow-claw-notifications-BLTaGAny.js} +1 -1
- package/dist/public/{shadow-claw-page-header-Bn1P7Cxb.js → shadow-claw-page-header-CjFOdo9v.js} +1 -1
- package/dist/public/shadow-claw-pages-DOQqMm0_.js +645 -0
- package/dist/public/{shadow-claw-settings-CfDm0hVA.js → shadow-claw-settings-DFtl0Fy8.js} +2 -2
- package/dist/public/{shadow-claw-storage-DOOesRzw.js → shadow-claw-storage-gQGExZRq.js} +1 -1
- package/dist/public/{shadow-claw-task-server-H36iDDp2.js → shadow-claw-task-server-Ca45uY7S.js} +1 -1
- package/dist/public/{shadow-claw-tasks-4JsjSGkN.js → shadow-claw-tasks-CCTaaSdi.js} +1 -1
- package/dist/public/{shadow-claw-terminal-CTRTcYz-.js → shadow-claw-terminal-BfgulLkl.js} +1 -1
- package/dist/public/{shadow-claw-tools-Dm1LxNf4.js → shadow-claw-tools-V8NA4n18.js} +1 -1
- package/dist/public/{shadow-claw-webvm-JzuPe9Nr.js → shadow-claw-webvm-CxxI2bnC.js} +1 -1
- package/dist/public/sync-web-mcp-registration-CkCA8UFm.js +1 -0
- package/dist/public/{tools-FiTtOlIt.js → tools-CwQq5tJH.js} +2 -2
- package/dist/public/webmcp-CmtWOAFm.js +6 -0
- package/dist/server.js +2 -2
- package/package.json +3 -3
- package/src/cli/prerender/dsd-shell/prerender-dsd-shell.test.ts +16 -0
- package/src/cli/prerender/dsd-shell/prerender-dsd-shell.ts +62 -1
- package/src/cli/prerender/pretty-paths/prerender-pretty-paths.test.ts +277 -0
- package/src/cli/prerender/pretty-paths/prerender-pretty-paths.ts +28 -1
- package/src/cli/site-config/custom-elements/build-custom-element-script-tags.ts +13 -1
- package/src/components/shadow-claw/shadow-claw.css +12 -0
- package/src/components/shadow-claw/shadow-claw.html +12 -2
- package/src/components/shadow-claw/utils/bind-event-listeners.test.ts +18 -0
- package/src/components/shadow-claw/utils/bind-event-listeners.ts +14 -0
- package/src/components/shadow-claw/utils/get-route.test.ts +35 -0
- package/src/components/shadow-claw/utils/get-route.ts +18 -0
- package/src/components/shadow-claw/utils/sync-slotted-sidebar-active-links.test.ts +152 -1
- package/src/components/shadow-claw/utils/sync-slotted-sidebar-active-links.ts +139 -8
- package/src/components/shadow-claw-conversations/shadow-claw-conversations.css +11 -0
- package/src/components/shadow-claw-conversations/shadow-claw-conversations.html +27 -4
- package/src/components/shadow-claw-conversations/shadow-claw-conversations.ts +32 -4
- package/src/components/shadow-claw-pages/shadow-claw-pages-scripts.test.ts +266 -0
- package/src/components/shadow-claw-pages/shadow-claw-pages.ts +41 -17
- package/src/core/orchestrator/utils/sync-web-mcp-registration.test.ts +18 -1
- package/src/core/orchestrator/utils/sync-web-mcp-registration.ts +8 -0
- package/src/core/utils/init-control-plane.test.ts +9 -4
- package/src/security/custom-element-security.test.ts +65 -0
- package/src/security/custom-element-security.ts +67 -4
- package/src/stores/tools.test.ts +5 -3
- package/src/stores/tools.ts +5 -10
- package/src/subsystems/mcp/webmcp.test.ts +84 -13
- package/src/subsystems/mcp/webmcp.ts +73 -10
- package/src/utils/index.ts +1 -0
- package/src/utils/resolve-page-script-dependencies.test.ts +245 -0
- package/src/utils/resolve-page-script-dependencies.ts +198 -0
- package/dist/cli/chunk-B1hufJeO.js +0 -1
- package/dist/cli/chunk-BZpn8npn.js +0 -1
- package/dist/cli/chunk-Bw5aOTFr.js +0 -1
- package/dist/cli/chunk-C8nH01Gw.js +0 -32
- package/dist/cli/chunk-CK1ZoyoE.js +0 -17
- package/dist/cli/chunk-CVkhDr-7.js +0 -1
- package/dist/cli/chunk-Cum07Vlh.js +0 -1
- package/dist/cli/chunk-D3UhDDmV.js +0 -2
- package/dist/cli/chunk-D8GI6qj6.js +0 -1
- package/dist/cli/chunk-DEH-FvmP.js +0 -1
- package/dist/cli/chunk-DksvJ_kf.js +0 -1
- package/dist/cli/chunk-RGb9wM4R.js +0 -1
- package/dist/lib/shadow-claw-PdOpgTxH.js.map +0 -1
- package/dist/lib/shadow-claw-pages-DLspFqdK.js.map +0 -1
- package/dist/lib/sync-web-mcp-registration-dW2MVCj4.js.map +0 -1
- package/dist/lib/tools-D7whby3H.js.map +0 -1
- package/dist/lib/webmcp-CYTNZfkn.js +0 -1687
- package/dist/lib/webmcp-CYTNZfkn.js.map +0 -1
- package/dist/public/shadow-claw-CnNX-WCh.js +0 -1158
- package/dist/public/shadow-claw-pages-BwOOqRWW.js +0 -645
- package/dist/public/sync-web-mcp-registration-BnHVUjat.js +0 -1
- package/dist/public/webmcp-_TBqXlVW.js +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import{o as e,t}from"./chunk-B--rR4-3.js";import{t as n}from"./chunk-uAI_Zi6n.js";import{t as r}from"./chunk-CasDHXCj.js";import{a as i,c as a,d as o,l as s,o as c,s as l,t as u,u as d}from"./chunk-C9dO1ce2.js";import*as f from"node:fs";import p,{join as m,posix as h,resolve as g,win32 as _}from"node:path";import{fileURLToPath as v}from"node:url";import y,{chdir as b,env as x,exit as S}from"node:process";import{execSync as C}from"node:child_process";import{copyFile as w,cp as T,lstat as E,mkdir as D,readFile as O,readdir as ee,readlink as te,realpath as k,rm as A,stat as j,writeFile as M}from"node:fs/promises";import N from"process";import{Buffer as P}from"buffer";import{chmodSync as ne,lstatSync as F,lstatSync as I,readdir as L,readdirSync as R,readlinkSync as z,realpathSync as B,renameSync as re,rmSync as V,rmdirSync as ie,statSync as ae,unlinkSync as H}from"fs";import{EventEmitter as oe}from"node:events";import se from"node:stream";import{StringDecoder as ce}from"node:string_decoder";import{basename as le,parse as U,resolve as ue}from"path";import{inspect as de}from"util";import W from"fs/promises";import{setTimeout as fe}from"timers/promises";import{tmpdir as pe}from"os";var me=(e,t,n)=>{let r=e instanceof RegExp?he(e,n):e,i=t instanceof RegExp?he(t,n):t,a=r!==null&&i!=null&&ge(r,i,n);return a&&{start:a[0],end:a[1],pre:n.slice(0,a[0]),body:n.slice(a[0]+r.length,a[1]),post:n.slice(a[1]+i.length)}},he=(e,t)=>{let n=t.match(e);return n?n[0]:null},ge=(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},_e=`\0SLASH`+Math.random()+`\0`,ve=`\0OPEN`+Math.random()+`\0`,ye=`\0CLOSE`+Math.random()+`\0`,be=`\0COMMA`+Math.random()+`\0`,xe=`\0PERIOD`+Math.random()+`\0`,Se=new RegExp(_e,`g`),Ce=new RegExp(ve,`g`),we=new RegExp(ye,`g`),Te=new RegExp(be,`g`),Ee=new RegExp(xe,`g`),De=/\\\\/g,Oe=/\\{/g,ke=/\\}/g,Ae=/\\,/g,je=/\\./g,Me=1e5;function Ne(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function Pe(e){return e.replace(De,_e).replace(Oe,ve).replace(ke,ye).replace(Ae,be).replace(je,xe)}function Fe(e){return e.replace(Se,`\\`).replace(Ce,`{`).replace(we,`}`).replace(Te,`,`).replace(Ee,`.`)}function Ie(e){if(!e)return[``];let t=[],n=me(`{`,`}`,e);if(!n)return e.split(`,`);let{pre:r,body:i,post:a}=n,o=r.split(`,`);o[o.length-1]+=`{`+i+`}`;let s=Ie(a);return a.length&&(o[o.length-1]+=s.shift(),o.push.apply(o,s)),t.push.apply(t,o),t}function Le(e,t={}){if(!e)return[];let{max:n=Me}=t;return e.slice(0,2)===`{}`&&(e=`\\{\\}`+e.slice(2)),He(Pe(e),n,!0).map(Fe)}function Re(e){return`{`+e+`}`}function ze(e){return/^-?0\d/.test(e)}function Be(e,t){return e<=t}function Ve(e,t){return e>=t}function He(e,t,n){let r=[],i=me(`{`,`}`,e);if(!i)return[e];let a=i.pre,o=i.post.length?He(i.post,t,!1):[``];if(/\$$/.test(i.pre))for(let e=0;e<o.length&&e<t;e++){let t=a+`{`+i.body+`}`+o[e];r.push(t)}else{let s=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),c=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),l=s||c,u=i.body.indexOf(`,`)>=0;if(!l&&!u)return i.post.match(/,(?!,).*\}/)?(e=i.pre+`{`+i.body+ye+i.post,He(e,t,!0)):[e];let d;if(l)d=i.body.split(/\.\./);else if(d=Ie(i.body),d.length===1&&d[0]!==void 0&&(d=He(d[0],t,!1).map(Re),d.length===1))return o.map(e=>i.pre+d[0]+e);let f;if(l&&d[0]!==void 0&&d[1]!==void 0){let e=Ne(d[0]),t=Ne(d[1]),n=Math.max(d[0].length,d[1].length),r=d.length===3&&d[2]!==void 0?Math.abs(Ne(d[2])):1,i=Be;t<e&&(r*=-1,i=Ve);let a=d.some(ze);f=[];for(let o=e;i(o,t);o+=r){let e;if(c)e=String.fromCharCode(o),e===`\\`&&(e=``);else if(e=String(o),a){let t=n-e.length;if(t>0){let n=Array(t+1).join(`0`);e=o<0?`-`+n+e.slice(1):n+e}}f.push(e)}}else{f=[];for(let e=0;e<d.length;e++)f.push.apply(f,He(d[e],t,!1))}for(let e=0;e<f.length;e++)for(let i=0;i<o.length&&r.length<t;i++){let t=a+f[e]+o[i];(!n||l||t)&&r.push(t)}}return r}var Ue=e=>{if(typeof e!=`string`)throw TypeError(`invalid pattern`);if(e.length>65536)throw TypeError(`pattern is too long`)},We={"[: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]},Ge=e=>e.replace(/[[\]\\-]/g,`\\$&`),Ke=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`),qe=e=>e.join(``),Je=(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=``;t:for(;a<e.length;){let t=e.charAt(a);if((t===`!`||t===`^`)&&a===n+1)l=!0,a++;else{if(t===`]`&&o&&!c){u=a+1;break}if(o=!0,t===`\\`&&!c)c=!0,a++;else{if(t===`[`&&!c){for(let[t,[o,c,l]]of Object.entries(We))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 t}}c=!1,d?(t>d?r.push(Ge(d)+`-`+Ge(t)):t===d&&r.push(Ge(t)),d=``,a++):e.startsWith(`-]`,a+1)?(r.push(Ge(t+`-`)),a+=2):e.startsWith(`-`,a+1)?(d=t,a+=2):(r.push(Ge(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)return[Ke(r[0].length===2?r[0].slice(-1):r[0]),!1,u-n,!1];let f=`[`+(l?`^`:``)+qe(r)+`]`,p=`[`+(l?``:`^`)+qe(i)+`]`;return[r.length&&i.length?`(`+f+`|`+p+`)`:r.length?f:p,s,u-n,!0]},Ye=(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`),Xe=/* @__PURE__ */ new Set([`!`,`?`,`+`,`*`,`@`]),Ze=e=>Xe.has(e),Qe=`(?!(?:^|/)\\.\\.?(?:$|/))`,$e=`(?!\\.)`,et=/* @__PURE__ */ new Set([`[`,`.`]),tt=/* @__PURE__ */ new Set([`..`,`.`]),nt=/* @__PURE__ */ new Set(`().*{}+?[]^$\\!`),rt=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`),it=`[^/]`,at=it+`*?`,ot=it+`+?`,st=class e{type;#e;#t;#n=!1;#r=[];#i;#a;#o;#s=!1;#c;#l;#u=!1;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(...t){for(let n of t)if(n!==``){if(typeof n!=`string`&&!(n instanceof e&&n.#i===this))throw Error(`invalid part: `+n);this.#r.push(n)}}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 t=this.#i;for(let n=0;n<this.#a;n++){let r=t.#r[n];if(!(r instanceof e&&r.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(t){let n=new e(this.type,t);for(let e of this.#r)n.copyIn(e);return n}static#f(t,n,r,i){let a=!1,o=!1,s=-1,c=!1;if(n.type===null){let l=r,u=``;for(;l<t.length;){let r=t.charAt(l++);if(a||r===`\\`)a=!a,u+=r;else if(o)l===s+1?(r===`^`||r===`!`)&&(c=!0):r===`]`&&!(l===s+2&&c)&&(o=!1),u+=r;else if(r===`[`)o=!0,s=l,c=!1,u+=r;else if(!i.noext&&Ze(r)&&t.charAt(l)===`(`){n.push(u),u=``;let a=new e(r,n);l=e.#f(t,a,l,i),n.push(a)}else u+=r}return n.push(u),l}let l=r+1,u=new e(null,n),d=[],f=``;for(;l<t.length;){let r=t.charAt(l++);if(a||r===`\\`)a=!a,f+=r;else if(o)l===s+1?(r===`^`||r===`!`)&&(c=!0):r===`]`&&!(l===s+2&&c)&&(o=!1),f+=r;else if(r===`[`)o=!0,s=l,c=!1,f+=r;else if(Ze(r)&&t.charAt(l)===`(`){u.push(f),f=``;let n=new e(r,u);u.push(n),l=e.#f(t,n,l,i)}else if(r===`|`)u.push(f),f=``,d.push(u),u=new e(null,n);else{if(r===`)`)return f===``&&n.#r.length===0&&(n.#u=!0),u.push(f),f=``,n.push(...d,u),l;f+=r}}return n.type=null,n.#t=void 0,n.#r=[t.substring(r-1)],l}static fromGlob(t,n={}){let r=new e(null,void 0,n);return e.#f(t,r,0,n),r}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(t){let n=t??!!this.#c.dot;if(this.#e===this&&this.#d(),!this.type){let r=this.isStart()&&this.isEnd()&&!this.#r.some(e=>typeof e!=`string`),i=this.#r.map(n=>{let[i,a,o,s]=typeof n==`string`?e.#m(n,this.#t,r):n.toRegExpSource(t);return this.#t=this.#t||o,this.#n=this.#n||s,i}).join(``),a=``;if(this.isStart()&&typeof this.#r[0]==`string`&&!(this.#r.length===1&&tt.has(this.#r[0]))){let e=et,r=n&&e.has(i.charAt(0))||i.startsWith(`\\.`)&&e.has(i.charAt(2))||i.startsWith(`\\.\\.`)&&e.has(i.charAt(4)),o=!n&&!t&&e.has(i.charAt(0));a=r?Qe:o?$e:``}let o=``;return this.isEnd()&&this.#e.#s&&this.#i?.type===`!`&&(o=`(?:$|\\/)`),[a+i+o,Ye(i),this.#t=!!this.#t,this.#n]}let r=this.type===`*`||this.type===`+`,i=this.type===`!`?`(?:(?!(?:`:`(?:`,a=this.#p(n);if(this.isStart()&&this.isEnd()&&!a&&this.type!==`!`){let e=this.toString();return this.#r=[e],this.type=null,this.#t=void 0,[e,Ye(this.toString()),!1,!1]}let o=!r||t||n||!$e?``:this.#p(!0);o===a&&(o=``),o&&(a=`(?:${a})(?:${o})*?`);let s=``;if(this.type===`!`&&this.#u)s=(this.isStart()&&!n?$e:``)+ot;else{let e=this.type===`!`?`))`+(this.isStart()&&!n&&!t?$e:``)+at+`)`:this.type===`@`?`)`:this.type===`?`?`)?`:this.type===`+`&&o?`)`:this.type===`*`&&o?`)?`:`)${this.type}`;s=i+a+e}return[s,Ye(a),this.#t=!!this.#t,this.#n]}#p(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#m(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+=(nt.has(c)?`\\`:``)+c;else if(c===`*`){if(o)continue;o=!0,i+=n&&/^[*]+$/.test(e)?ot:at,t=!0}else if(o=!1,c===`\\`)s===e.length-1?i+=`\\\\`:r=!0;else{if(c===`[`){let[n,r,o,c]=Je(e,s);if(o){i+=n,a||=r,s+=o-1,t||=c;continue}}c===`?`?(i+=it,t=!0):i+=rt(c)}}return[i,Ye(e),!!t,a]}},ct=(e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!1}={})=>n?t?e.replace(/[?*()[\]{}]/g,`[$&]`):e.replace(/[?*()[\]\\{}]/g,`\\$&`):t?e.replace(/[?*()[\]]/g,`[$&]`):e.replace(/[?*()[\]\\]/g,`\\$&`),lt=(e,t,n={})=>(Ue(t),!n.nocomment&&t.charAt(0)===`#`?!1:new Bt(t,n).match(e)),ut=/^\*+([^+@!?\*\[\(]*)$/,dt=e=>t=>!t.startsWith(`.`)&&t.endsWith(e),ft=e=>t=>t.endsWith(e),pt=e=>(e=e.toLowerCase(),t=>!t.startsWith(`.`)&&t.toLowerCase().endsWith(e)),mt=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),ht=/^\*+\.\*+$/,gt=e=>!e.startsWith(`.`)&&e.includes(`.`),_t=e=>e!==`.`&&e!==`..`&&e.includes(`.`),vt=/^\.\*+$/,yt=e=>e!==`.`&&e!==`..`&&e.startsWith(`.`),bt=/^\*+$/,xt=e=>e.length!==0&&!e.startsWith(`.`),St=e=>e.length!==0&&e!==`.`&&e!==`..`,Ct=/^\?+([^+@!?\*\[\(]*)?$/,wt=([e,t=``])=>{let n=Ot([e]);return t?(t=t.toLowerCase(),e=>n(e)&&e.toLowerCase().endsWith(t)):n},Tt=([e,t=``])=>{let n=kt([e]);return t?(t=t.toLowerCase(),e=>n(e)&&e.toLowerCase().endsWith(t)):n},Et=([e,t=``])=>{let n=kt([e]);return t?e=>n(e)&&e.endsWith(t):n},Dt=([e,t=``])=>{let n=Ot([e]);return t?e=>n(e)&&e.endsWith(t):n},Ot=([e])=>{let t=e.length;return e=>e.length===t&&!e.startsWith(`.`)},kt=([e])=>{let t=e.length;return e=>e.length===t&&e!==`.`&&e!==`..`},At=typeof N==`object`&&N?typeof N.env==`object`&&N.env&&N.env.__MINIMATCH_TESTING_PLATFORM__||N.platform:`posix`,jt={win32:{sep:`\\`},posix:{sep:`/`}};lt.sep=At===`win32`?jt.win32.sep:jt.posix.sep;var Mt=Symbol(`globstar **`);lt.GLOBSTAR=Mt;var Nt=`[^/]*?`,Pt=`(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?`,Ft=`(?:(?!(?:\\/|^)\\.).)*?`;lt.filter=(e,t={})=>n=>lt(n,e,t);var It=(e,t={})=>Object.assign({},e,t);lt.defaults=e=>{if(!e||typeof e!=`object`||!Object.keys(e).length)return lt;let t=lt;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:Mt})};var Lt=(e,t={})=>(Ue(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:Le(e,{max:t.braceExpandMax}));lt.braceExpand=Lt,lt.makeRe=(e,t={})=>new Bt(e,t).makeRe(),lt.match=(e,t,n={})=>{let r=new Bt(t,n);return e=e.filter(e=>r.match(e)),r.options.nonull&&!e.length&&e.push(t),e};var Rt=/[?*]|[+@!]\(.*?\)|\[|\]/,zt=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`),Bt=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,t={}){Ue(e),t||={},this.options=t,this.pattern=e,this.platform=t.platform||At,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]===`?`||!Rt.test(e[2]))&&!Rt.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=0;t<e.length;t++)for(let n=0;n<e[t].length;n++)e[t][n]===`**`&&(e[t][n]=`*`);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!==`**`&&(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=this.options;if(this.isWindows){let n=typeof e[0]==`string`&&/^[a-z]:$/i.test(e[0]),r=!n&&e[0]===``&&e[1]===``&&e[2]===`?`&&/^[a-z]:$/i.test(e[3]),i=typeof t[0]==`string`&&/^[a-z]:$/i.test(t[0]),a=!i&&t[0]===``&&t[1]===``&&t[2]===`?`&&typeof t[3]==`string`&&/^[a-z]:$/i.test(t[3]),o=r?3:n?0:void 0,s=a?3:i?0:void 0;if(typeof o==`number`&&typeof s==`number`){let[n,r]=[e[o],t[s]];n.toLowerCase()===r.toLowerCase()&&(t[s]=n,s>o?t=t.slice(s):o>s&&(e=e.slice(o)))}}let{optimizationLevel:i=1}=this.options;i>=2&&(e=this.levelTwoFileOptimize(e)),this.debug(`matchOne`,this,{file:e,pattern:t}),this.debug(`matchOne`,e.length,t.length);for(var a=0,o=0,s=e.length,c=t.length;a<s&&o<c;a++,o++){this.debug(`matchOne loop`);var l=t[o],u=e[a];if(this.debug(t,l,u),l===!1)return!1;if(l===Mt){this.debug(`GLOBSTAR`,[t,l,u]);var d=a,f=o+1;if(f===c){for(this.debug(`** at the end`);a<s;a++)if(e[a]===`.`||e[a]===`..`||!r.dot&&e[a].charAt(0)===`.`)return!1;return!0}for(;d<s;){var p=e[d];if(this.debug(`
|
|
1
|
+
import{o as e,t}from"./chunk-B--rR4-3.js";import{t as n}from"./chunk-uAI_Zi6n.js";import{t as r}from"./chunk-CasDHXCj.js";import{a as i,c as a,d as o,l as s,o as c,s as l,t as u,u as d}from"./chunk-C9dO1ce2.js";import*as f from"node:fs";import p,{join as m,posix as h,resolve as g,win32 as _}from"node:path";import{fileURLToPath as v}from"node:url";import y,{chdir as b,env as x,exit as S}from"node:process";import{execSync as C}from"node:child_process";import{copyFile as w,cp as T,lstat as E,mkdir as D,readFile as O,readdir as ee,readlink as te,realpath as ne,rm as k,stat as A,writeFile as j}from"node:fs/promises";import M from"process";import{Buffer as N}from"buffer";import{chmodSync as P,lstatSync as F,lstatSync as I,readdir as L,readdirSync as R,readlinkSync as z,realpathSync as B,renameSync as re,rmSync as V,rmdirSync as ie,statSync as ae,unlinkSync as H}from"fs";import{EventEmitter as oe}from"node:events";import se from"node:stream";import{StringDecoder as ce}from"node:string_decoder";import{basename as le,parse as U,resolve as ue}from"path";import{inspect as de}from"util";import W from"fs/promises";import{setTimeout as fe}from"timers/promises";import{tmpdir as pe}from"os";var me=(e,t,n)=>{let r=e instanceof RegExp?he(e,n):e,i=t instanceof RegExp?he(t,n):t,a=r!==null&&i!=null&&ge(r,i,n);return a&&{start:a[0],end:a[1],pre:n.slice(0,a[0]),body:n.slice(a[0]+r.length,a[1]),post:n.slice(a[1]+i.length)}},he=(e,t)=>{let n=t.match(e);return n?n[0]:null},ge=(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},_e=`\0SLASH`+Math.random()+`\0`,ve=`\0OPEN`+Math.random()+`\0`,ye=`\0CLOSE`+Math.random()+`\0`,be=`\0COMMA`+Math.random()+`\0`,xe=`\0PERIOD`+Math.random()+`\0`,Se=new RegExp(_e,`g`),Ce=new RegExp(ve,`g`),we=new RegExp(ye,`g`),Te=new RegExp(be,`g`),Ee=new RegExp(xe,`g`),De=/\\\\/g,Oe=/\\{/g,ke=/\\}/g,Ae=/\\,/g,je=/\\./g,Me=1e5;function Ne(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function Pe(e){return e.replace(De,_e).replace(Oe,ve).replace(ke,ye).replace(Ae,be).replace(je,xe)}function Fe(e){return e.replace(Se,`\\`).replace(Ce,`{`).replace(we,`}`).replace(Te,`,`).replace(Ee,`.`)}function Ie(e){if(!e)return[``];let t=[],n=me(`{`,`}`,e);if(!n)return e.split(`,`);let{pre:r,body:i,post:a}=n,o=r.split(`,`);o[o.length-1]+=`{`+i+`}`;let s=Ie(a);return a.length&&(o[o.length-1]+=s.shift(),o.push.apply(o,s)),t.push.apply(t,o),t}function Le(e,t={}){if(!e)return[];let{max:n=Me}=t;return e.slice(0,2)===`{}`&&(e=`\\{\\}`+e.slice(2)),He(Pe(e),n,!0).map(Fe)}function Re(e){return`{`+e+`}`}function ze(e){return/^-?0\d/.test(e)}function Be(e,t){return e<=t}function Ve(e,t){return e>=t}function He(e,t,n){let r=[],i=me(`{`,`}`,e);if(!i)return[e];let a=i.pre,o=i.post.length?He(i.post,t,!1):[``];if(/\$$/.test(i.pre))for(let e=0;e<o.length&&e<t;e++){let t=a+`{`+i.body+`}`+o[e];r.push(t)}else{let s=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),c=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),l=s||c,u=i.body.indexOf(`,`)>=0;if(!l&&!u)return i.post.match(/,(?!,).*\}/)?(e=i.pre+`{`+i.body+ye+i.post,He(e,t,!0)):[e];let d;if(l)d=i.body.split(/\.\./);else if(d=Ie(i.body),d.length===1&&d[0]!==void 0&&(d=He(d[0],t,!1).map(Re),d.length===1))return o.map(e=>i.pre+d[0]+e);let f;if(l&&d[0]!==void 0&&d[1]!==void 0){let e=Ne(d[0]),t=Ne(d[1]),n=Math.max(d[0].length,d[1].length),r=d.length===3&&d[2]!==void 0?Math.abs(Ne(d[2])):1,i=Be;t<e&&(r*=-1,i=Ve);let a=d.some(ze);f=[];for(let o=e;i(o,t);o+=r){let e;if(c)e=String.fromCharCode(o),e===`\\`&&(e=``);else if(e=String(o),a){let t=n-e.length;if(t>0){let n=Array(t+1).join(`0`);e=o<0?`-`+n+e.slice(1):n+e}}f.push(e)}}else{f=[];for(let e=0;e<d.length;e++)f.push.apply(f,He(d[e],t,!1))}for(let e=0;e<f.length;e++)for(let i=0;i<o.length&&r.length<t;i++){let t=a+f[e]+o[i];(!n||l||t)&&r.push(t)}}return r}var Ue=e=>{if(typeof e!=`string`)throw TypeError(`invalid pattern`);if(e.length>65536)throw TypeError(`pattern is too long`)},We={"[: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]},Ge=e=>e.replace(/[[\]\\-]/g,`\\$&`),Ke=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`),qe=e=>e.join(``),Je=(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=``;t:for(;a<e.length;){let t=e.charAt(a);if((t===`!`||t===`^`)&&a===n+1)l=!0,a++;else{if(t===`]`&&o&&!c){u=a+1;break}if(o=!0,t===`\\`&&!c)c=!0,a++;else{if(t===`[`&&!c){for(let[t,[o,c,l]]of Object.entries(We))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 t}}c=!1,d?(t>d?r.push(Ge(d)+`-`+Ge(t)):t===d&&r.push(Ge(t)),d=``,a++):e.startsWith(`-]`,a+1)?(r.push(Ge(t+`-`)),a+=2):e.startsWith(`-`,a+1)?(d=t,a+=2):(r.push(Ge(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)return[Ke(r[0].length===2?r[0].slice(-1):r[0]),!1,u-n,!1];let f=`[`+(l?`^`:``)+qe(r)+`]`,p=`[`+(l?``:`^`)+qe(i)+`]`;return[r.length&&i.length?`(`+f+`|`+p+`)`:r.length?f:p,s,u-n,!0]},Ye=(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`),Xe=/* @__PURE__ */ new Set([`!`,`?`,`+`,`*`,`@`]),Ze=e=>Xe.has(e),Qe=`(?!(?:^|/)\\.\\.?(?:$|/))`,$e=`(?!\\.)`,et=/* @__PURE__ */ new Set([`[`,`.`]),tt=/* @__PURE__ */ new Set([`..`,`.`]),nt=/* @__PURE__ */ new Set(`().*{}+?[]^$\\!`),rt=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`),it=`[^/]`,at=it+`*?`,ot=it+`+?`,st=class e{type;#e;#t;#n=!1;#r=[];#i;#a;#o;#s=!1;#c;#l;#u=!1;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(...t){for(let n of t)if(n!==``){if(typeof n!=`string`&&!(n instanceof e&&n.#i===this))throw Error(`invalid part: `+n);this.#r.push(n)}}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 t=this.#i;for(let n=0;n<this.#a;n++){let r=t.#r[n];if(!(r instanceof e&&r.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(t){let n=new e(this.type,t);for(let e of this.#r)n.copyIn(e);return n}static#f(t,n,r,i){let a=!1,o=!1,s=-1,c=!1;if(n.type===null){let l=r,u=``;for(;l<t.length;){let r=t.charAt(l++);if(a||r===`\\`)a=!a,u+=r;else if(o)l===s+1?(r===`^`||r===`!`)&&(c=!0):r===`]`&&!(l===s+2&&c)&&(o=!1),u+=r;else if(r===`[`)o=!0,s=l,c=!1,u+=r;else if(!i.noext&&Ze(r)&&t.charAt(l)===`(`){n.push(u),u=``;let a=new e(r,n);l=e.#f(t,a,l,i),n.push(a)}else u+=r}return n.push(u),l}let l=r+1,u=new e(null,n),d=[],f=``;for(;l<t.length;){let r=t.charAt(l++);if(a||r===`\\`)a=!a,f+=r;else if(o)l===s+1?(r===`^`||r===`!`)&&(c=!0):r===`]`&&!(l===s+2&&c)&&(o=!1),f+=r;else if(r===`[`)o=!0,s=l,c=!1,f+=r;else if(Ze(r)&&t.charAt(l)===`(`){u.push(f),f=``;let n=new e(r,u);u.push(n),l=e.#f(t,n,l,i)}else if(r===`|`)u.push(f),f=``,d.push(u),u=new e(null,n);else{if(r===`)`)return f===``&&n.#r.length===0&&(n.#u=!0),u.push(f),f=``,n.push(...d,u),l;f+=r}}return n.type=null,n.#t=void 0,n.#r=[t.substring(r-1)],l}static fromGlob(t,n={}){let r=new e(null,void 0,n);return e.#f(t,r,0,n),r}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(t){let n=t??!!this.#c.dot;if(this.#e===this&&this.#d(),!this.type){let r=this.isStart()&&this.isEnd()&&!this.#r.some(e=>typeof e!=`string`),i=this.#r.map(n=>{let[i,a,o,s]=typeof n==`string`?e.#m(n,this.#t,r):n.toRegExpSource(t);return this.#t=this.#t||o,this.#n=this.#n||s,i}).join(``),a=``;if(this.isStart()&&typeof this.#r[0]==`string`&&!(this.#r.length===1&&tt.has(this.#r[0]))){let e=et,r=n&&e.has(i.charAt(0))||i.startsWith(`\\.`)&&e.has(i.charAt(2))||i.startsWith(`\\.\\.`)&&e.has(i.charAt(4)),o=!n&&!t&&e.has(i.charAt(0));a=r?Qe:o?$e:``}let o=``;return this.isEnd()&&this.#e.#s&&this.#i?.type===`!`&&(o=`(?:$|\\/)`),[a+i+o,Ye(i),this.#t=!!this.#t,this.#n]}let r=this.type===`*`||this.type===`+`,i=this.type===`!`?`(?:(?!(?:`:`(?:`,a=this.#p(n);if(this.isStart()&&this.isEnd()&&!a&&this.type!==`!`){let e=this.toString();return this.#r=[e],this.type=null,this.#t=void 0,[e,Ye(this.toString()),!1,!1]}let o=!r||t||n||!$e?``:this.#p(!0);o===a&&(o=``),o&&(a=`(?:${a})(?:${o})*?`);let s=``;if(this.type===`!`&&this.#u)s=(this.isStart()&&!n?$e:``)+ot;else{let e=this.type===`!`?`))`+(this.isStart()&&!n&&!t?$e:``)+at+`)`:this.type===`@`?`)`:this.type===`?`?`)?`:this.type===`+`&&o?`)`:this.type===`*`&&o?`)?`:`)${this.type}`;s=i+a+e}return[s,Ye(a),this.#t=!!this.#t,this.#n]}#p(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#m(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+=(nt.has(c)?`\\`:``)+c;else if(c===`*`){if(o)continue;o=!0,i+=n&&/^[*]+$/.test(e)?ot:at,t=!0}else if(o=!1,c===`\\`)s===e.length-1?i+=`\\\\`:r=!0;else{if(c===`[`){let[n,r,o,c]=Je(e,s);if(o){i+=n,a||=r,s+=o-1,t||=c;continue}}c===`?`?(i+=it,t=!0):i+=rt(c)}}return[i,Ye(e),!!t,a]}},ct=(e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!1}={})=>n?t?e.replace(/[?*()[\]{}]/g,`[$&]`):e.replace(/[?*()[\]\\{}]/g,`\\$&`):t?e.replace(/[?*()[\]]/g,`[$&]`):e.replace(/[?*()[\]\\]/g,`\\$&`),lt=(e,t,n={})=>(Ue(t),!n.nocomment&&t.charAt(0)===`#`?!1:new Bt(t,n).match(e)),ut=/^\*+([^+@!?\*\[\(]*)$/,dt=e=>t=>!t.startsWith(`.`)&&t.endsWith(e),ft=e=>t=>t.endsWith(e),pt=e=>(e=e.toLowerCase(),t=>!t.startsWith(`.`)&&t.toLowerCase().endsWith(e)),mt=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),ht=/^\*+\.\*+$/,gt=e=>!e.startsWith(`.`)&&e.includes(`.`),_t=e=>e!==`.`&&e!==`..`&&e.includes(`.`),vt=/^\.\*+$/,yt=e=>e!==`.`&&e!==`..`&&e.startsWith(`.`),bt=/^\*+$/,xt=e=>e.length!==0&&!e.startsWith(`.`),St=e=>e.length!==0&&e!==`.`&&e!==`..`,Ct=/^\?+([^+@!?\*\[\(]*)?$/,wt=([e,t=``])=>{let n=Ot([e]);return t?(t=t.toLowerCase(),e=>n(e)&&e.toLowerCase().endsWith(t)):n},Tt=([e,t=``])=>{let n=kt([e]);return t?(t=t.toLowerCase(),e=>n(e)&&e.toLowerCase().endsWith(t)):n},Et=([e,t=``])=>{let n=kt([e]);return t?e=>n(e)&&e.endsWith(t):n},Dt=([e,t=``])=>{let n=Ot([e]);return t?e=>n(e)&&e.endsWith(t):n},Ot=([e])=>{let t=e.length;return e=>e.length===t&&!e.startsWith(`.`)},kt=([e])=>{let t=e.length;return e=>e.length===t&&e!==`.`&&e!==`..`},At=typeof M==`object`&&M?typeof M.env==`object`&&M.env&&M.env.__MINIMATCH_TESTING_PLATFORM__||M.platform:`posix`,jt={win32:{sep:`\\`},posix:{sep:`/`}};lt.sep=At===`win32`?jt.win32.sep:jt.posix.sep;var Mt=Symbol(`globstar **`);lt.GLOBSTAR=Mt;var Nt=`[^/]*?`,Pt=`(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?`,Ft=`(?:(?!(?:\\/|^)\\.).)*?`;lt.filter=(e,t={})=>n=>lt(n,e,t);var It=(e,t={})=>Object.assign({},e,t);lt.defaults=e=>{if(!e||typeof e!=`object`||!Object.keys(e).length)return lt;let t=lt;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:Mt})};var Lt=(e,t={})=>(Ue(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:Le(e,{max:t.braceExpandMax}));lt.braceExpand=Lt,lt.makeRe=(e,t={})=>new Bt(e,t).makeRe(),lt.match=(e,t,n={})=>{let r=new Bt(t,n);return e=e.filter(e=>r.match(e)),r.options.nonull&&!e.length&&e.push(t),e};var Rt=/[?*]|[+@!]\(.*?\)|\[|\]/,zt=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`),Bt=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,t={}){Ue(e),t||={},this.options=t,this.pattern=e,this.platform=t.platform||At,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]===`?`||!Rt.test(e[2]))&&!Rt.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=0;t<e.length;t++)for(let n=0;n<e[t].length;n++)e[t][n]===`**`&&(e[t][n]=`*`);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!==`**`&&(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=this.options;if(this.isWindows){let n=typeof e[0]==`string`&&/^[a-z]:$/i.test(e[0]),r=!n&&e[0]===``&&e[1]===``&&e[2]===`?`&&/^[a-z]:$/i.test(e[3]),i=typeof t[0]==`string`&&/^[a-z]:$/i.test(t[0]),a=!i&&t[0]===``&&t[1]===``&&t[2]===`?`&&typeof t[3]==`string`&&/^[a-z]:$/i.test(t[3]),o=r?3:n?0:void 0,s=a?3:i?0:void 0;if(typeof o==`number`&&typeof s==`number`){let[n,r]=[e[o],t[s]];n.toLowerCase()===r.toLowerCase()&&(t[s]=n,s>o?t=t.slice(s):o>s&&(e=e.slice(o)))}}let{optimizationLevel:i=1}=this.options;i>=2&&(e=this.levelTwoFileOptimize(e)),this.debug(`matchOne`,this,{file:e,pattern:t}),this.debug(`matchOne`,e.length,t.length);for(var a=0,o=0,s=e.length,c=t.length;a<s&&o<c;a++,o++){this.debug(`matchOne loop`);var l=t[o],u=e[a];if(this.debug(t,l,u),l===!1)return!1;if(l===Mt){this.debug(`GLOBSTAR`,[t,l,u]);var d=a,f=o+1;if(f===c){for(this.debug(`** at the end`);a<s;a++)if(e[a]===`.`||e[a]===`..`||!r.dot&&e[a].charAt(0)===`.`)return!1;return!0}for(;d<s;){var p=e[d];if(this.debug(`
|
|
2
2
|
globstar while`,e,d,t,f,p),this.matchOne(e.slice(d),t.slice(f),n))return this.debug(`globstar found match!`,d,s,p),!0;if(p===`.`||p===`..`||!r.dot&&p.charAt(0)===`.`){this.debug(`dot detected!`,e,d,t,f);break}this.debug(`globstar swallow a segment, and continue`),d++}return!!(n&&(this.debug(`
|
|
3
|
-
>>> no match, partial?`,e,d,t,f),d===s))}let i;if(typeof l==`string`?(i=u===l,this.debug(`string match`,l,u,i)):(i=l.test(u),this.debug(`pattern match`,l,u,i)),!i)return!1}if(a===s&&o===c)return!0;if(a===s)return n;if(o===c)return a===s-1&&e[a]===``;throw Error(`wtf?`)}braceExpand(){return Lt(this.pattern,this.options)}parse(e){Ue(e);let t=this.options;if(e===`**`)return Mt;if(e===``)return``;let n,r=null;(n=e.match(bt))?r=t.dot?St:xt:(n=e.match(ut))?r=(t.nocase?t.dot?mt:pt:t.dot?ft:dt)(n[1]):(n=e.match(Ct))?r=(t.nocase?t.dot?Tt:wt:t.dot?Et:Dt)(n):(n=e.match(ht))?r=t.dot?_t:gt:(n=e.match(vt))&&(r=yt);let i=st.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?Nt:t.dot?Pt:Ft,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`?zt(e):e===Mt?Mt:e._src});t.forEach((e,r)=>{let i=t[r+1],a=t[r-1];e!==Mt||a===Mt||(a===void 0?i!==void 0&&i!==Mt?t[r+1]=`(?:\\/|`+n+`\\/)?`+i:t[r]=n:i===void 0?t[r-1]=a+`(?:\\/|\\/`+n+`)?`:i!==Mt&&(t[r-1]=a+`(?:\\/|\\/`+n+`\\/)`+i,t[r+1]=Mt))});let i=t.filter(e=>e!==Mt);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=0;e<i.length;e++){let o=i[e],s=r;if(n.matchBase&&o.length===1&&(s=[a]),this.matchOne(s,o,t))return n.flipNegate?!0:!this.negate}return!n.flipNegate&&this.negate}static defaults(e){return lt.defaults(e).Minimatch}};lt.AST=st,lt.Minimatch=Bt,lt.escape=ct,lt.unescape=Ye;var Vt=typeof performance==`object`&&performance&&typeof performance.now==`function`?performance:Date,Ht=/* @__PURE__ */ new Set,Ut=typeof N==`object`&&N?N:{},Wt=(e,t,n,r)=>{typeof Ut.emitWarning==`function`?Ut.emitWarning(e,t,n,r):console.error(`[${n}] ${t}: ${e}`)},Gt=globalThis.AbortController,Kt=globalThis.AbortSignal;if(typeof Gt>`u`){Kt=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(e,t){this._onabort.push(t)}},Gt=class{constructor(){t()}signal=new Kt;abort(e){if(!this.signal.aborted){this.signal.reason=e,this.signal.aborted=!0;for(let t of this.signal._onabort)t(e);this.signal.onabort?.(e)}}};let e=Ut.env?.LRU_CACHE_IGNORE_AC_WARNING!==`1`,t=()=>{e&&(e=!1,Wt("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.",`NO_ABORT_CONTROLLER`,`ENOTSUP`,t))}}var qt=e=>!Ht.has(e),Jt=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),Yt=e=>Jt(e)?e<=256?Uint8Array:e<=2**16?Uint16Array:e<=2**32?Uint32Array:e<=2**53-1?Xt:null:null,Xt=class extends Array{constructor(e){super(e),this.fill(0)}},Zt=class e{heap;length;static#e=!1;static create(t){let n=Yt(t);if(!n)return[];e.#e=!0;let r=new e(t,n);return e.#e=!1,r}constructor(t,n){if(!e.#e)throw TypeError(`instantiate Stack using Stack.create(n)`);this.heap=new n(t),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},Qt=class e{#e;#t;#n;#r;#i;#a;#o;#s;get perf(){return this.#s}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#c;#l;#u;#d;#f;#p;#m;#h;#g;#_;#v;#y;#b;#x;#S;#C;#w;#T;#E;static unsafeExposeInternals(e){return{starts:e.#b,ttls:e.#x,autopurgeTimers:e.#S,sizes:e.#y,keyMap:e.#u,keyList:e.#d,valList:e.#f,next:e.#p,prev:e.#m,get head(){return e.#h},get tail(){return e.#g},free:e.#_,isBackgroundFetch:t=>e.#V(t),backgroundFetch:(t,n,r,i)=>e.#B(t,n,r,i),moveToTail:t=>e.#U(t),indexes:t=>e.#I(t),rindexes:t=>e.#L(t),isStale:t=>e.#j(t)}}get max(){return this.#e}get maxSize(){return this.#t}get calculatedSize(){return this.#l}get size(){return this.#c}get fetchMethod(){return this.#a}get memoMethod(){return this.#o}get dispose(){return this.#n}get onInsert(){return this.#r}get disposeAfter(){return this.#i}constructor(t){let{max:n=0,ttl:r,ttlResolution:i=1,ttlAutopurge:a,updateAgeOnGet:o,updateAgeOnHas:s,allowStale:c,dispose:l,onInsert:u,disposeAfter:d,noDisposeOnSet:f,noUpdateTTL:p,maxSize:m=0,maxEntrySize:h=0,sizeCalculation:g,fetchMethod:_,memoMethod:v,noDeleteOnFetchRejection:y,noDeleteOnStaleGet:b,allowStaleOnFetchRejection:x,allowStaleOnFetchAbort:S,ignoreFetchAbort:C,perf:w}=t;if(w!==void 0&&typeof w?.now!=`function`)throw TypeError(`perf option must have a now() method if specified`);if(this.#s=w??Vt,n!==0&&!Jt(n))throw TypeError(`max option must be a nonnegative integer`);let T=n?Yt(n):Array;if(!T)throw Error(`invalid max value: `+n);if(this.#e=n,this.#t=m,this.maxEntrySize=h||this.#t,this.sizeCalculation=g,this.sizeCalculation){if(!this.#t&&!this.maxEntrySize)throw TypeError(`cannot set sizeCalculation without setting maxSize or maxEntrySize`);if(typeof this.sizeCalculation!=`function`)throw TypeError(`sizeCalculation set to non-function`)}if(v!==void 0&&typeof v!=`function`)throw TypeError(`memoMethod must be a function if defined`);if(this.#o=v,_!==void 0&&typeof _!=`function`)throw TypeError(`fetchMethod must be a function if specified`);if(this.#a=_,this.#w=!!_,this.#u=/* @__PURE__ */ new Map,this.#d=Array(n).fill(void 0),this.#f=Array(n).fill(void 0),this.#p=new T(n),this.#m=new T(n),this.#h=0,this.#g=0,this.#_=Zt.create(n),this.#c=0,this.#l=0,typeof l==`function`&&(this.#n=l),typeof u==`function`&&(this.#r=u),typeof d==`function`?(this.#i=d,this.#v=[]):(this.#i=void 0,this.#v=void 0),this.#C=!!this.#n,this.#E=!!this.#r,this.#T=!!this.#i,this.noDisposeOnSet=!!f,this.noUpdateTTL=!!p,this.noDeleteOnFetchRejection=!!y,this.allowStaleOnFetchRejection=!!x,this.allowStaleOnFetchAbort=!!S,this.ignoreFetchAbort=!!C,this.maxEntrySize!==0){if(this.#t!==0&&!Jt(this.#t))throw TypeError(`maxSize must be a positive integer if specified`);if(!Jt(this.maxEntrySize))throw TypeError(`maxEntrySize must be a positive integer if specified`);this.#M()}if(this.allowStale=!!c,this.noDeleteOnStaleGet=!!b,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!s,this.ttlResolution=Jt(i)||i===0?i:1,this.ttlAutopurge=!!a,this.ttl=r||0,this.ttl){if(!Jt(this.ttl))throw TypeError(`ttl must be a positive integer if specified`);this.#D()}if(this.#e===0&&this.ttl===0&&this.#t===0)throw TypeError(`At least one of max, maxSize, or ttl is required`);if(!this.ttlAutopurge&&!this.#e&&!this.#t){let t=`LRU_CACHE_UNBOUNDED`;qt(t)&&(Ht.add(t),Wt(`TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.`,`UnboundedCacheWarning`,t,e))}}getRemainingTTL(e){return this.#u.has(e)?1/0:0}#D(){let e=new Xt(this.#e),t=new Xt(this.#e);this.#x=e,this.#b=t;let n=this.ttlAutopurge?Array(this.#e):void 0;this.#S=n,this.#A=(r,i,a=this.#s.now())=>{if(t[r]=i===0?0:a,e[r]=i,n?.[r]&&(clearTimeout(n[r]),n[r]=void 0),i!==0&&n){let e=setTimeout(()=>{this.#j(r)&&this.#W(this.#d[r],`expire`)},i+1);e.unref&&e.unref(),n[r]=e}},this.#O=n=>{t[n]=e[n]===0?0:this.#s.now()},this.#k=(n,a)=>{if(e[a]){let o=e[a],s=t[a];if(!o||!s)return;n.ttl=o,n.start=s,n.now=r||i(),n.remainingTTL=o-(n.now-s)}};let r=0,i=()=>{let e=this.#s.now();if(this.ttlResolution>0){r=e;let t=setTimeout(()=>r=0,this.ttlResolution);t.unref&&t.unref()}return e};this.getRemainingTTL=n=>{let a=this.#u.get(n);if(a===void 0)return 0;let o=e[a],s=t[a];return!o||!s?1/0:o-((r||i())-s)},this.#j=n=>{let a=t[n],o=e[n];return!!o&&!!a&&(r||i())-a>o}}#O=()=>{};#k=()=>{};#A=()=>{};#j=()=>!1;#M(){let e=new Xt(this.#e);this.#l=0,this.#y=e,this.#N=t=>{this.#l-=e[t],e[t]=0},this.#F=(e,t,n,r)=>{if(this.#V(t))return 0;if(!Jt(n)){if(r){if(typeof r!=`function`)throw TypeError(`sizeCalculation must be a function`);if(n=r(t,e),!Jt(n))throw TypeError(`sizeCalculation return invalid (expect positive integer)`)}else throw TypeError(`invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.`)}return n},this.#P=(t,n,r)=>{if(e[t]=n,this.#t){let n=this.#t-e[t];for(;this.#l>n;)this.#z(!0)}this.#l+=e[t],r&&(r.entrySize=n,r.totalCalculatedSize=this.#l)}}#N=e=>{};#P=(e,t,n)=>{};#F=(e,t,n,r)=>{if(n||r)throw TypeError(`cannot set size without setting maxSize or maxEntrySize on cache`);return 0};*#I({allowStale:e=this.allowStale}={}){if(this.#c)for(let t=this.#g;!(!this.#R(t)||((e||!this.#j(t))&&(yield t),t===this.#h));)t=this.#m[t]}*#L({allowStale:e=this.allowStale}={}){if(this.#c)for(let t=this.#h;!(!this.#R(t)||((e||!this.#j(t))&&(yield t),t===this.#g));)t=this.#p[t]}#R(e){return e!==void 0&&this.#u.get(this.#d[e])===e}*entries(){for(let e of this.#I())this.#f[e]!==void 0&&this.#d[e]!==void 0&&!this.#V(this.#f[e])&&(yield[this.#d[e],this.#f[e]])}*rentries(){for(let e of this.#L())this.#f[e]!==void 0&&this.#d[e]!==void 0&&!this.#V(this.#f[e])&&(yield[this.#d[e],this.#f[e]])}*keys(){for(let e of this.#I()){let t=this.#d[e];t!==void 0&&!this.#V(this.#f[e])&&(yield t)}}*rkeys(){for(let e of this.#L()){let t=this.#d[e];t!==void 0&&!this.#V(this.#f[e])&&(yield t)}}*values(){for(let e of this.#I())this.#f[e]!==void 0&&!this.#V(this.#f[e])&&(yield this.#f[e])}*rvalues(){for(let e of this.#L())this.#f[e]!==void 0&&!this.#V(this.#f[e])&&(yield this.#f[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]=`LRUCache`;find(e,t={}){for(let n of this.#I()){let r=this.#f[n],i=this.#V(r)?r.__staleWhileFetching:r;if(i!==void 0&&e(i,this.#d[n],this))return this.get(this.#d[n],t)}}forEach(e,t=this){for(let n of this.#I()){let r=this.#f[n],i=this.#V(r)?r.__staleWhileFetching:r;i!==void 0&&e.call(t,i,this.#d[n],this)}}rforEach(e,t=this){for(let n of this.#L()){let r=this.#f[n],i=this.#V(r)?r.__staleWhileFetching:r;i!==void 0&&e.call(t,i,this.#d[n],this)}}purgeStale(){let e=!1;for(let t of this.#L({allowStale:!0}))this.#j(t)&&(this.#W(this.#d[t],`expire`),e=!0);return e}info(e){let t=this.#u.get(e);if(t===void 0)return;let n=this.#f[t],r=this.#V(n)?n.__staleWhileFetching:n;if(r===void 0)return;let i={value:r};if(this.#x&&this.#b){let e=this.#x[t],n=this.#b[t];e&&n&&(i.ttl=e-(this.#s.now()-n),i.start=Date.now())}return this.#y&&(i.size=this.#y[t]),i}dump(){let e=[];for(let t of this.#I({allowStale:!0})){let n=this.#d[t],r=this.#f[t],i=this.#V(r)?r.__staleWhileFetching:r;if(i===void 0||n===void 0)continue;let a={value:i};if(this.#x&&this.#b){a.ttl=this.#x[t];let e=this.#s.now()-this.#b[t];a.start=Math.floor(Date.now()-e)}this.#y&&(a.size=this.#y[t]),e.unshift([n,a])}return e}load(e){this.clear();for(let[t,n]of e){if(n.start){let e=Date.now()-n.start;n.start=this.#s.now()-e}this.set(t,n.value,n)}}set(e,t,n={}){if(t===void 0)return this.delete(e),this;let{ttl:r=this.ttl,start:i,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:s}=n,{noUpdateTTL:c=this.noUpdateTTL}=n,l=this.#F(e,t,n.size||0,o);if(this.maxEntrySize&&l>this.maxEntrySize)return s&&(s.set=`miss`,s.maxEntrySizeExceeded=!0),this.#W(e,`set`),this;let u=this.#c===0?void 0:this.#u.get(e);if(u===void 0)u=this.#c===0?this.#g:this.#_.length===0?this.#c===this.#e?this.#z(!1):this.#c:this.#_.pop(),this.#d[u]=e,this.#f[u]=t,this.#u.set(e,u),this.#p[this.#g]=u,this.#m[u]=this.#g,this.#g=u,this.#c++,this.#P(u,l,s),s&&(s.set=`add`),c=!1,this.#E&&this.#r?.(t,e,`add`);else{this.#U(u);let n=this.#f[u];if(t!==n){if(this.#w&&this.#V(n)){n.__abortController.abort(/* @__PURE__ */ Error(`replaced`));let{__staleWhileFetching:t}=n;t!==void 0&&!a&&(this.#C&&this.#n?.(t,e,`set`),this.#T&&this.#v?.push([t,e,`set`]))}else a||(this.#C&&this.#n?.(n,e,`set`),this.#T&&this.#v?.push([n,e,`set`]));if(this.#N(u),this.#P(u,l,s),this.#f[u]=t,s){s.set=`replace`;let e=n&&this.#V(n)?n.__staleWhileFetching:n;e!==void 0&&(s.oldValue=e)}}else s&&(s.set=`update`);this.#E&&this.onInsert?.(t,e,t===n?`update`:`replace`)}if(r!==0&&!this.#x&&this.#D(),this.#x&&(c||this.#A(u,r,i),s&&this.#k(s,u)),!a&&this.#T&&this.#v){let e=this.#v,t;for(;t=e?.shift();)this.#i?.(...t)}return this}pop(){try{for(;this.#c;){let e=this.#f[this.#h];if(this.#z(!0),this.#V(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#T&&this.#v){let e=this.#v,t;for(;t=e?.shift();)this.#i?.(...t)}}}#z(e){let t=this.#h,n=this.#d[t],r=this.#f[t];return this.#w&&this.#V(r)?r.__abortController.abort(/* @__PURE__ */ Error(`evicted`)):(this.#C||this.#T)&&(this.#C&&this.#n?.(r,n,`evict`),this.#T&&this.#v?.push([r,n,`evict`])),this.#N(t),this.#S?.[t]&&(clearTimeout(this.#S[t]),this.#S[t]=void 0),e&&(this.#d[t]=void 0,this.#f[t]=void 0,this.#_.push(t)),this.#c===1?(this.#h=this.#g=0,this.#_.length=0):this.#h=this.#p[t],this.#u.delete(n),this.#c--,t}has(e,t={}){let{updateAgeOnHas:n=this.updateAgeOnHas,status:r}=t,i=this.#u.get(e);if(i!==void 0){let e=this.#f[i];if(this.#V(e)&&e.__staleWhileFetching===void 0)return!1;if(this.#j(i))r&&(r.has=`stale`,this.#k(r,i));else return n&&this.#O(i),r&&(r.has=`hit`,this.#k(r,i)),!0}else r&&(r.has=`miss`);return!1}peek(e,t={}){let{allowStale:n=this.allowStale}=t,r=this.#u.get(e);if(r===void 0||!n&&this.#j(r))return;let i=this.#f[r];return this.#V(i)?i.__staleWhileFetching:i}#B(e,t,n,r){let i=t===void 0?void 0:this.#f[t];if(this.#V(i))return i;let a=new Gt,{signal:o}=n;o?.addEventListener(`abort`,()=>a.abort(o.reason),{signal:a.signal});let s={signal:a.signal,options:n,context:r},c=(r,i=!1)=>{let{aborted:o}=a.signal,c=n.ignoreFetchAbort&&r!==void 0,l=n.ignoreFetchAbort||!!(n.allowStaleOnFetchAbort&&r!==void 0);if(n.status&&(o&&!i?(n.status.fetchAborted=!0,n.status.fetchError=a.signal.reason,c&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),o&&!c&&!i)return u(a.signal.reason,l);let d=f,p=this.#f[t];return(p===f||c&&i&&p===void 0)&&(r===void 0?d.__staleWhileFetching===void 0?this.#W(e,`fetch`):this.#f[t]=d.__staleWhileFetching:(n.status&&(n.status.fetchUpdated=!0),this.set(e,r,s.options))),r},l=e=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=e),u(e,!1)),u=(r,i)=>{let{aborted:o}=a.signal,s=o&&n.allowStaleOnFetchAbort,c=s||n.allowStaleOnFetchRejection,l=c||n.noDeleteOnFetchRejection,u=f;if(this.#f[t]===f&&(!l||!i&&u.__staleWhileFetching===void 0?this.#W(e,`fetch`):s||(this.#f[t]=u.__staleWhileFetching)),c)return n.status&&u.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),u.__staleWhileFetching;if(u.__returned===u)throw r},d=(t,r)=>{let o=this.#a?.(e,i,s);o&&o instanceof Promise&&o.then(e=>t(e===void 0?void 0:e),r),a.signal.addEventListener(`abort`,()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(t(void 0),n.allowStaleOnFetchAbort&&(t=e=>c(e,!0)))})};n.status&&(n.status.fetchDispatched=!0);let f=new Promise(d).then(c,l),p=Object.assign(f,{__abortController:a,__staleWhileFetching:i,__returned:void 0});return t===void 0?(this.set(e,p,{...s.options,status:void 0}),t=this.#u.get(e)):this.#f[t]=p,p}#V(e){if(!this.#w)return!1;let t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty(`__staleWhileFetching`)&&t.__abortController instanceof Gt}async fetch(e,t={}){let{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:s=0,sizeCalculation:c=this.sizeCalculation,noUpdateTTL:l=this.noUpdateTTL,noDeleteOnFetchRejection:u=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:f=this.ignoreFetchAbort,allowStaleOnFetchAbort:p=this.allowStaleOnFetchAbort,context:m,forceRefresh:h=!1,status:g,signal:_}=t;if(!this.#w)return g&&(g.fetch=`get`),this.get(e,{allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:i,status:g});let v={allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:i,ttl:a,noDisposeOnSet:o,size:s,sizeCalculation:c,noUpdateTTL:l,noDeleteOnFetchRejection:u,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:p,ignoreFetchAbort:f,status:g,signal:_},y=this.#u.get(e);if(y===void 0){g&&(g.fetch=`miss`);let t=this.#B(e,y,v,m);return t.__returned=t}{let t=this.#f[y];if(this.#V(t)){let e=n&&t.__staleWhileFetching!==void 0;return g&&(g.fetch=`inflight`,e&&(g.returnedStale=!0)),e?t.__staleWhileFetching:t.__returned=t}let i=this.#j(y);if(!h&&!i)return g&&(g.fetch=`hit`),this.#U(y),r&&this.#O(y),g&&this.#k(g,y),t;let a=this.#B(e,y,v,m),o=a.__staleWhileFetching!==void 0&&n;return g&&(g.fetch=i?`stale`:`refresh`,o&&i&&(g.returnedStale=!0)),o?a.__staleWhileFetching:a.__returned=a}}async forceFetch(e,t={}){let n=await this.fetch(e,t);if(n===void 0)throw Error(`fetch() returned undefined`);return n}memo(e,t={}){let n=this.#o;if(!n)throw Error(`no memoMethod provided to constructor`);let{context:r,forceRefresh:i,...a}=t,o=this.get(e,a);if(!i&&o!==void 0)return o;let s=n(e,o,{options:a,context:r});return this.set(e,s,a),s}get(e,t={}){let{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,status:a}=t,o=this.#u.get(e);if(o!==void 0){let t=this.#f[o],s=this.#V(t);return a&&this.#k(a,o),this.#j(o)?(a&&(a.get=`stale`),s?(a&&n&&t.__staleWhileFetching!==void 0&&(a.returnedStale=!0),n?t.__staleWhileFetching:void 0):(i||this.#W(e,`expire`),a&&n&&(a.returnedStale=!0),n?t:void 0)):(a&&(a.get=`hit`),s?t.__staleWhileFetching:(this.#U(o),r&&this.#O(o),t))}a&&(a.get=`miss`)}#H(e,t){this.#m[t]=e,this.#p[e]=t}#U(e){e!==this.#g&&(e===this.#h?this.#h=this.#p[e]:this.#H(this.#m[e],this.#p[e]),this.#H(this.#g,e),this.#g=e)}delete(e){return this.#W(e,`delete`)}#W(e,t){let n=!1;if(this.#c!==0){let r=this.#u.get(e);if(r!==void 0){if(this.#S?.[r]&&(clearTimeout(this.#S?.[r]),this.#S[r]=void 0),n=!0,this.#c===1)this.#G(t);else{this.#N(r);let n=this.#f[r];if(this.#V(n)?n.__abortController.abort(/* @__PURE__ */ Error(`deleted`)):(this.#C||this.#T)&&(this.#C&&this.#n?.(n,e,t),this.#T&&this.#v?.push([n,e,t])),this.#u.delete(e),this.#d[r]=void 0,this.#f[r]=void 0,r===this.#g)this.#g=this.#m[r];else if(r===this.#h)this.#h=this.#p[r];else{let e=this.#m[r];this.#p[e]=this.#p[r];let t=this.#p[r];this.#m[t]=this.#m[r]}this.#c--,this.#_.push(r)}}}if(this.#T&&this.#v?.length){let e=this.#v,t;for(;t=e?.shift();)this.#i?.(...t)}return n}clear(){return this.#G(`delete`)}#G(e){for(let t of this.#L({allowStale:!0})){let n=this.#f[t];if(this.#V(n))n.__abortController.abort(/* @__PURE__ */ Error(`deleted`));else{let r=this.#d[t];this.#C&&this.#n?.(n,r,e),this.#T&&this.#v?.push([n,r,e])}}if(this.#u.clear(),this.#f.fill(void 0),this.#d.fill(void 0),this.#x&&this.#b){this.#x.fill(0),this.#b.fill(0);for(let e of this.#S??[])e!==void 0&&clearTimeout(e);this.#S?.fill(void 0)}if(this.#y&&this.#y.fill(0),this.#h=0,this.#g=0,this.#_.length=0,this.#l=0,this.#c=0,this.#T&&this.#v){let e=this.#v,t;for(;t=e?.shift();)this.#i?.(...t)}}},$t=typeof N==`object`&&N?N:{stdout:null,stderr:null},en=e=>!!e&&typeof e==`object`&&(e instanceof Bn||e instanceof se||tn(e)||nn(e)),tn=e=>!!e&&typeof e==`object`&&e instanceof oe&&typeof e.pipe==`function`&&e.pipe!==se.Writable.prototype.pipe,nn=e=>!!e&&typeof e==`object`&&e instanceof oe&&typeof e.write==`function`&&typeof e.end==`function`,rn=Symbol(`EOF`),an=Symbol(`maybeEmitEnd`),on=Symbol(`emittedEnd`),sn=Symbol(`emittingEnd`),cn=Symbol(`emittedError`),ln=Symbol(`closed`),un=Symbol(`read`),dn=Symbol(`flush`),fn=Symbol(`flushChunk`),pn=Symbol(`encoding`),mn=Symbol(`decoder`),G=Symbol(`flowing`),hn=Symbol(`paused`),gn=Symbol(`resume`),K=Symbol(`buffer`),_n=Symbol(`pipes`),q=Symbol(`bufferLength`),vn=Symbol(`bufferPush`),yn=Symbol(`bufferShift`),bn=Symbol(`objectMode`),J=Symbol(`destroyed`),xn=Symbol(`error`),Sn=Symbol(`emitData`),Cn=Symbol(`emitEnd`),wn=Symbol(`emitEnd2`),Tn=Symbol(`async`),En=Symbol(`abort`),Dn=Symbol(`aborted`),On=Symbol(`signal`),kn=Symbol(`dataListeners`),An=Symbol(`discarded`),jn=e=>Promise.resolve().then(e),Mn=e=>e(),Nn=e=>e===`end`||e===`finish`||e===`prefinish`,Pn=e=>e instanceof ArrayBuffer||!!e&&typeof e==`object`&&e.constructor&&e.constructor.name===`ArrayBuffer`&&e.byteLength>=0,Fn=e=>!P.isBuffer(e)&&ArrayBuffer.isView(e),In=class{src;dest;opts;ondrain;constructor(e,t,n){this.src=e,this.dest=t,this.opts=n,this.ondrain=()=>e[gn](),this.dest.on(`drain`,this.ondrain)}unpipe(){this.dest.removeListener(`drain`,this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},Ln=class extends In{unpipe(){this.src.removeListener(`error`,this.proxyErrors),super.unpipe()}constructor(e,t,n){super(e,t,n),this.proxyErrors=e=>this.dest.emit(`error`,e),e.on(`error`,this.proxyErrors)}},Rn=e=>!!e.objectMode,zn=e=>!e.objectMode&&!!e.encoding&&e.encoding!==`buffer`,Bn=class extends oe{[G]=!1;[hn]=!1;[_n]=[];[K]=[];[bn];[pn];[Tn];[mn];[rn]=!1;[on]=!1;[sn]=!1;[ln]=!1;[cn]=null;[q]=0;[J]=!1;[On];[Dn]=!1;[kn]=0;[An]=!1;writable=!0;readable=!0;constructor(...e){let t=e[0]||{};if(super(),t.objectMode&&typeof t.encoding==`string`)throw TypeError(`Encoding and objectMode may not be used together`);Rn(t)?(this[bn]=!0,this[pn]=null):zn(t)?(this[pn]=t.encoding,this[bn]=!1):(this[bn]=!1,this[pn]=null),this[Tn]=!!t.async,this[mn]=this[pn]?new ce(this[pn]):null,t&&t.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[K]}),t&&t.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[_n]});let{signal:n}=t;n&&(this[On]=n,n.aborted?this[En]():n.addEventListener(`abort`,()=>this[En]()))}get bufferLength(){return this[q]}get encoding(){return this[pn]}set encoding(e){throw Error(`Encoding must be set at instantiation time`)}setEncoding(e){throw Error(`Encoding must be set at instantiation time`)}get objectMode(){return this[bn]}set objectMode(e){throw Error(`objectMode must be set at instantiation time`)}get async(){return this[Tn]}set async(e){this[Tn]=this[Tn]||!!e}[En](){this[Dn]=!0,this.emit(`abort`,this[On]?.reason),this.destroy(this[On]?.reason)}get aborted(){return this[Dn]}set aborted(e){}write(e,t,n){if(this[Dn])return!1;if(this[rn])throw Error(`write after end`);if(this[J])return this.emit(`error`,Object.assign(/* @__PURE__ */ Error(`Cannot call write after a stream was destroyed`),{code:`ERR_STREAM_DESTROYED`})),!0;typeof t==`function`&&(n=t,t=`utf8`),t||=`utf8`;let r=this[Tn]?jn:Mn;if(!this[bn]&&!P.isBuffer(e)){if(Fn(e))e=P.from(e.buffer,e.byteOffset,e.byteLength);else if(Pn(e))e=P.from(e);else if(typeof e!=`string`)throw Error(`Non-contiguous data written to non-objectMode stream`)}return this[bn]?(this[G]&&this[q]!==0&&this[dn](!0),this[G]?this.emit(`data`,e):this[vn](e),this[q]!==0&&this.emit(`readable`),n&&r(n),this[G]):e.length?(typeof e==`string`&&(t!==this[pn]||this[mn]?.lastNeed)&&(e=P.from(e,t)),P.isBuffer(e)&&this[pn]&&(e=this[mn].write(e)),this[G]&&this[q]!==0&&this[dn](!0),this[G]?this.emit(`data`,e):this[vn](e),this[q]!==0&&this.emit(`readable`),n&&r(n),this[G]):(this[q]!==0&&this.emit(`readable`),n&&r(n),this[G])}read(e){if(this[J])return null;if(this[An]=!1,this[q]===0||e===0||e&&e>this[q])return this[an](),null;this[bn]&&(e=null),this[K].length>1&&!this[bn]&&(this[K]=[this[pn]?this[K].join(``):P.concat(this[K],this[q])]);let t=this[un](e||null,this[K][0]);return this[an](),t}[un](e,t){if(this[bn])this[yn]();else{let n=t;e===n.length||e===null?this[yn]():typeof n==`string`?(this[K][0]=n.slice(e),t=n.slice(0,e),this[q]-=e):(this[K][0]=n.subarray(e),t=n.subarray(0,e),this[q]-=e)}return this.emit(`data`,t),!this[K].length&&!this[rn]&&this.emit(`drain`),t}end(e,t,n){return typeof e==`function`&&(n=e,e=void 0),typeof t==`function`&&(n=t,t=`utf8`),e!==void 0&&this.write(e,t),n&&this.once(`end`,n),this[rn]=!0,this.writable=!1,(this[G]||!this[hn])&&this[an](),this}[gn](){this[J]||(!this[kn]&&!this[_n].length&&(this[An]=!0),this[hn]=!1,this[G]=!0,this.emit(`resume`),this[K].length?this[dn]():this[rn]?this[an]():this.emit(`drain`))}resume(){return this[gn]()}pause(){this[G]=!1,this[hn]=!0,this[An]=!1}get destroyed(){return this[J]}get flowing(){return this[G]}get paused(){return this[hn]}[vn](e){this[bn]?this[q]+=1:this[q]+=e.length,this[K].push(e)}[yn](){return this[bn]?--this[q]:this[q]-=this[K][0].length,this[K].shift()}[dn](e=!1){do;while(this[fn](this[yn]())&&this[K].length);!e&&!this[K].length&&!this[rn]&&this.emit(`drain`)}[fn](e){return this.emit(`data`,e),this[G]}pipe(e,t){if(this[J])return e;this[An]=!1;let n=this[on];return t||={},e===$t.stdout||e===$t.stderr?t.end=!1:t.end=t.end!==!1,t.proxyErrors=!!t.proxyErrors,n?t.end&&e.end():(this[_n].push(t.proxyErrors?new Ln(this,e,t):new In(this,e,t)),this[Tn]?jn(()=>this[gn]()):this[gn]()),e}unpipe(e){let t=this[_n].find(t=>t.dest===e);t&&(this[_n].length===1?(this[G]&&this[kn]===0&&(this[G]=!1),this[_n]=[]):this[_n].splice(this[_n].indexOf(t),1),t.unpipe())}addListener(e,t){return this.on(e,t)}on(e,t){let n=super.on(e,t);if(e===`data`)this[An]=!1,this[kn]++,!this[_n].length&&!this[G]&&this[gn]();else if(e===`readable`&&this[q]!==0)super.emit(`readable`);else if(Nn(e)&&this[on])super.emit(e),this.removeAllListeners(e);else if(e===`error`&&this[cn]){let e=t;this[Tn]?jn(()=>e.call(this,this[cn])):e.call(this,this[cn])}return n}removeListener(e,t){return this.off(e,t)}off(e,t){let n=super.off(e,t);return e===`data`&&(this[kn]=this.listeners(`data`).length,this[kn]===0&&!this[An]&&!this[_n].length&&(this[G]=!1)),n}removeAllListeners(e){let t=super.removeAllListeners(e);return(e===`data`||e===void 0)&&(this[kn]=0,!this[An]&&!this[_n].length&&(this[G]=!1)),t}get emittedEnd(){return this[on]}[an](){!this[sn]&&!this[on]&&!this[J]&&this[K].length===0&&this[rn]&&(this[sn]=!0,this.emit(`end`),this.emit(`prefinish`),this.emit(`finish`),this[ln]&&this.emit(`close`),this[sn]=!1)}emit(e,...t){let n=t[0];if(e!==`error`&&e!==`close`&&e!==J&&this[J])return!1;if(e===`data`)return!this[bn]&&!n?!1:this[Tn]?(jn(()=>this[Sn](n)),!0):this[Sn](n);if(e===`end`)return this[Cn]();if(e===`close`){if(this[ln]=!0,!this[on]&&!this[J])return!1;let e=super.emit(`close`);return this.removeAllListeners(`close`),e}if(e===`error`){this[cn]=n,super.emit(xn,n);let e=!this[On]||this.listeners(`error`).length?super.emit(`error`,n):!1;return this[an](),e}if(e===`resume`){let e=super.emit(`resume`);return this[an](),e}if(e===`finish`||e===`prefinish`){let t=super.emit(e);return this.removeAllListeners(e),t}let r=super.emit(e,...t);return this[an](),r}[Sn](e){for(let t of this[_n])t.dest.write(e)===!1&&this.pause();let t=!this[An]&&super.emit(`data`,e);return this[an](),t}[Cn](){return!this[on]&&(this[on]=!0,this.readable=!1,this[Tn]?(jn(()=>this[wn]()),!0):this[wn]())}[wn](){if(this[mn]){let e=this[mn].end();if(e){for(let t of this[_n])t.dest.write(e);this[An]||super.emit(`data`,e)}}for(let e of this[_n])e.end();let e=super.emit(`end`);return this.removeAllListeners(`end`),e}async collect(){let e=Object.assign([],{dataLength:0});this[bn]||(e.dataLength=0);let t=this.promise();return this.on(`data`,t=>{e.push(t),this[bn]||(e.dataLength+=t.length)}),await t,e}async concat(){if(this[bn])throw Error(`cannot concat in objectMode`);let e=await this.collect();return this[pn]?e.join(``):P.concat(e,e.dataLength)}async promise(){return new Promise((e,t)=>{this.on(J,()=>t(/* @__PURE__ */ Error(`stream destroyed`))),this.on(`error`,e=>t(e)),this.on(`end`,()=>e())})}[Symbol.asyncIterator](){this[An]=!1;let e=!1,t=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return t();let n=this.read();if(n!==null)return Promise.resolve({done:!1,value:n});if(this[rn])return t();let r,i,a=e=>{this.off(`data`,o),this.off(`end`,s),this.off(J,c),t(),i(e)},o=e=>{this.off(`error`,a),this.off(`end`,s),this.off(J,c),this.pause(),r({value:e,done:!!this[rn]})},s=()=>{this.off(`error`,a),this.off(`data`,o),this.off(J,c),t(),r({done:!0,value:void 0})},c=()=>a(/* @__PURE__ */ Error(`stream destroyed`));return new Promise((e,t)=>{i=t,r=e,this.once(J,c),this.once(`error`,a),this.once(`end`,s),this.once(`data`,o)})},throw:t,return:t,[Symbol.asyncIterator](){return this},[Symbol.asyncDispose]:async()=>{}}}[Symbol.iterator](){this[An]=!1;let e=!1,t=()=>(this.pause(),this.off(xn,t),this.off(J,t),this.off(`end`,t),e=!0,{done:!0,value:void 0});return this.once(`end`,t),this.once(xn,t),this.once(J,t),{next:()=>{if(e)return t();let n=this.read();return n===null?t():{done:!1,value:n}},throw:t,return:t,[Symbol.iterator](){return this},[Symbol.dispose]:()=>{}}}destroy(e){if(this[J])return e?this.emit(`error`,e):this.emit(J),this;this[J]=!0,this[An]=!0,this[K].length=0,this[q]=0;let t=this;return typeof t.close==`function`&&!this[ln]&&t.close(),e?this.emit(`error`,e):this.emit(J),this}static get isStream(){return en}},Vn=B.native,Hn={lstatSync:F,readdir:L,readdirSync:R,readlinkSync:z,realpathSync:Vn,promises:{lstat:E,readdir:ee,readlink:te,realpath:k}},Un=e=>!e||e===Hn||e===f?Hn:{...Hn,...e,promises:{...Hn.promises,...e.promises||{}}},Wn=/^\\\\\?\\([a-z]:)\\?$/i,Gn=e=>e.replace(/\//g,`\\`).replace(Wn,`$1\\`),Kn=/[\\\/]/,qn=0,Jn=1,Yn=2,Xn=4,Zn=6,Qn=8,$n=10,er=12,tr=15,nr=~tr,rr=16,ir=32,ar=64,or=128,sr=256,cr=512,lr=ar|or|cr,ur=1023,dr=e=>e.isFile()?Qn:e.isDirectory()?Xn:e.isSymbolicLink()?$n:e.isCharacterDevice()?Yn:e.isBlockDevice()?Zn:e.isSocket()?er:e.isFIFO()?Jn:qn,fr=new Qt({max:4096}),pr=e=>{let t=fr.get(e);if(t)return t;let n=e.normalize(`NFKD`);return fr.set(e,n),n},mr=new Qt({max:4096}),hr=e=>{let t=mr.get(e);if(t)return t;let n=pr(e.toLowerCase());return mr.set(e,n),n},gr=class extends Qt{constructor(){super({max:256})}},_r=class extends Qt{constructor(e=16384){super({maxSize:e,sizeCalculation:e=>e.length+1})}},vr=Symbol(`PathScurry setAsCwd`),yr=class{name;root;roots;parent;nocase;isCWD=!1;#e;#t;get dev(){return this.#t}#n;get mode(){return this.#n}#r;get nlink(){return this.#r}#i;get uid(){return this.#i}#a;get gid(){return this.#a}#o;get rdev(){return this.#o}#s;get blksize(){return this.#s}#c;get ino(){return this.#c}#l;get size(){return this.#l}#u;get blocks(){return this.#u}#d;get atimeMs(){return this.#d}#f;get mtimeMs(){return this.#f}#p;get ctimeMs(){return this.#p}#m;get birthtimeMs(){return this.#m}#h;get atime(){return this.#h}#g;get mtime(){return this.#g}#_;get ctime(){return this.#_}#v;get birthtime(){return this.#v}#y;#b;#x;#S;#C;#w;#T;#E;#D;#O;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(e,t=qn,n,r,i,a,o){this.name=e,this.#y=i?hr(e):pr(e),this.#T=t&ur,this.nocase=i,this.roots=r,this.root=n||this,this.#E=a,this.#x=o.fullpath,this.#C=o.relative,this.#w=o.relativePosix,this.parent=o.parent,this.#e=this.parent?this.parent.#e:Un(o.fs)}depth(){return this.#b===void 0?this.#b=this.parent?this.parent.depth()+1:0:this.#b}childrenCache(){return this.#E}resolve(e){if(!e)return this;let t=this.getRootString(e),n=e.substring(t.length).split(this.splitSep);return t?this.getRoot(t).#k(n):this.#k(n)}#k(e){let t=this;for(let n of e)t=t.child(n);return t}children(){let e=this.#E.get(this);if(e)return e;let t=Object.assign([],{provisional:0});return this.#E.set(this,t),this.#T&=~rr,t}child(e,t){if(e===``||e===`.`)return this;if(e===`..`)return this.parent||this;let n=this.children(),r=this.nocase?hr(e):pr(e);for(let e of n)if(e.#y===r)return e;let i=this.parent?this.sep:``,a=this.#x?this.#x+i+e:void 0,o=this.newChild(e,qn,{...t,parent:this,fullpath:a});return this.canReaddir()||(o.#T|=or),n.push(o),o}relative(){if(this.isCWD)return``;if(this.#C!==void 0)return this.#C;let e=this.name,t=this.parent;if(!t)return this.#C=this.name;let n=t.relative();return n+(!n||!t.parent?``:this.sep)+e}relativePosix(){if(this.sep===`/`)return this.relative();if(this.isCWD)return``;if(this.#w!==void 0)return this.#w;let e=this.name,t=this.parent;if(!t)return this.#w=this.fullpathPosix();let n=t.relativePosix();return n+(!n||!t.parent?``:`/`)+e}fullpath(){if(this.#x!==void 0)return this.#x;let e=this.name,t=this.parent;if(!t)return this.#x=this.name;let n=t.fullpath()+(t.parent?this.sep:``)+e;return this.#x=n}fullpathPosix(){if(this.#S!==void 0)return this.#S;if(this.sep===`/`)return this.#S=this.fullpath();if(!this.parent){let e=this.fullpath().replace(/\\/g,`/`);return this.#S=/^[a-z]:\//i.test(e)?`//?/${e}`:e}let e=this.parent,t=e.fullpathPosix(),n=t+(!t||!e.parent?``:`/`)+this.name;return this.#S=n}isUnknown(){return(this.#T&tr)===qn}isType(e){return this[`is${e}`]()}getType(){return this.isUnknown()?`Unknown`:this.isDirectory()?`Directory`:this.isFile()?`File`:this.isSymbolicLink()?`SymbolicLink`:this.isFIFO()?`FIFO`:this.isCharacterDevice()?`CharacterDevice`:this.isBlockDevice()?`BlockDevice`:this.isSocket()?`Socket`:`Unknown`}isFile(){return(this.#T&tr)===Qn}isDirectory(){return(this.#T&tr)===Xn}isCharacterDevice(){return(this.#T&tr)===Yn}isBlockDevice(){return(this.#T&tr)===Zn}isFIFO(){return(this.#T&tr)===Jn}isSocket(){return(this.#T&tr)===er}isSymbolicLink(){return(this.#T&$n)===$n}lstatCached(){return this.#T&ir?this:void 0}readlinkCached(){return this.#D}realpathCached(){return this.#O}readdirCached(){let e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#D)return!0;if(!this.parent)return!1;let e=this.#T&tr;return!(e!==qn&&e!==$n||this.#T&sr||this.#T&or)}calledReaddir(){return!!(this.#T&rr)}isENOENT(){return!!(this.#T&or)}isNamed(e){return this.nocase?this.#y===hr(e):this.#y===pr(e)}async readlink(){let e=this.#D;if(e)return e;if(this.canReadlink()&&this.parent)try{let e=await this.#e.promises.readlink(this.fullpath()),t=(await this.parent.realpath())?.resolve(e);if(t)return this.#D=t}catch(e){this.#L(e.code);return}}readlinkSync(){let e=this.#D;if(e)return e;if(this.canReadlink()&&this.parent)try{let e=this.#e.readlinkSync(this.fullpath()),t=this.parent.realpathSync()?.resolve(e);if(t)return this.#D=t}catch(e){this.#L(e.code);return}}#A(e){this.#T|=rr;for(let t=e.provisional;t<e.length;t++){let n=e[t];n&&n.#j()}}#j(){this.#T&or||(this.#T=(this.#T|or)&nr,this.#M())}#M(){let e=this.children();e.provisional=0;for(let t of e)t.#j()}#N(){this.#T|=cr,this.#P()}#P(){if(this.#T&ar)return;let e=this.#T;(e&tr)===Xn&&(e&=nr),this.#T=e|ar,this.#M()}#F(e=``){e===`ENOTDIR`||e===`EPERM`?this.#P():e===`ENOENT`?this.#j():this.children().provisional=0}#I(e=``){e===`ENOTDIR`?this.parent.#P():e===`ENOENT`&&this.#j()}#L(e=``){let t=this.#T;t|=sr,e===`ENOENT`&&(t|=or),(e===`EINVAL`||e===`UNKNOWN`)&&(t&=nr),this.#T=t,e===`ENOTDIR`&&this.parent&&this.parent.#P()}#R(e,t){return this.#B(e,t)||this.#z(e,t)}#z(e,t){let n=dr(e),r=this.newChild(e.name,n,{parent:this}),i=r.#T&tr;return i!==Xn&&i!==$n&&i!==qn&&(r.#T|=ar),t.unshift(r),t.provisional++,r}#B(e,t){for(let n=t.provisional;n<t.length;n++){let r=t[n];if((this.nocase?hr(e.name):pr(e.name))===r.#y)return this.#V(e,r,n,t)}}#V(e,t,n,r){let i=t.name;return t.#T=t.#T&nr|dr(e),i!==e.name&&(t.name=e.name),n!==r.provisional&&(n===r.length-1?r.pop():r.splice(n,1),r.unshift(t)),r.provisional++,t}async lstat(){if((this.#T&or)===0)try{return this.#H(await this.#e.promises.lstat(this.fullpath())),this}catch(e){this.#I(e.code)}}lstatSync(){if((this.#T&or)===0)try{return this.#H(this.#e.lstatSync(this.fullpath())),this}catch(e){this.#I(e.code)}}#H(e){let{atime:t,atimeMs:n,birthtime:r,birthtimeMs:i,blksize:a,blocks:o,ctime:s,ctimeMs:c,dev:l,gid:u,ino:d,mode:f,mtime:p,mtimeMs:m,nlink:h,rdev:g,size:_,uid:v}=e;this.#h=t,this.#d=n,this.#v=r,this.#m=i,this.#s=a,this.#u=o,this.#_=s,this.#p=c,this.#t=l,this.#a=u,this.#c=d,this.#n=f,this.#g=p,this.#f=m,this.#r=h,this.#o=g,this.#l=_,this.#i=v;let y=dr(e);this.#T=this.#T&nr|y|ir,y!==qn&&y!==Xn&&y!==$n&&(this.#T|=ar)}#U=[];#W=!1;#G(e){this.#W=!1;let t=this.#U.slice();this.#U.length=0,t.forEach(t=>t(null,e))}readdirCB(e,t=!1){if(!this.canReaddir()){t?e(null,[]):queueMicrotask(()=>e(null,[]));return}let n=this.children();if(this.calledReaddir()){let r=n.slice(0,n.provisional);t?e(null,r):queueMicrotask(()=>e(null,r));return}if(this.#U.push(e),this.#W)return;this.#W=!0;let r=this.fullpath();this.#e.readdir(r,{withFileTypes:!0},(e,t)=>{if(e)this.#F(e.code),n.provisional=0;else{for(let e of t)this.#R(e,n);this.#A(n)}this.#G(n.slice(0,n.provisional))})}#K;async readdir(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();if(this.#K)await this.#K;else{let n=()=>{};this.#K=new Promise(e=>n=e);try{for(let n of await this.#e.promises.readdir(t,{withFileTypes:!0}))this.#R(n,e);this.#A(e)}catch(t){this.#F(t.code),e.provisional=0}this.#K=void 0,n()}return e.slice(0,e.provisional)}readdirSync(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();try{for(let n of this.#e.readdirSync(t,{withFileTypes:!0}))this.#R(n,e);this.#A(e)}catch(t){this.#F(t.code),e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#T&lr)return!1;let e=tr&this.#T;return e===qn||e===Xn||e===$n}shouldWalk(e,t){return(this.#T&Xn)===Xn&&!(this.#T&lr)&&!e.has(this)&&(!t||t(this))}async realpath(){if(this.#O)return this.#O;if(!((cr|sr|or)&this.#T))try{let e=await this.#e.promises.realpath(this.fullpath());return this.#O=this.resolve(e)}catch{this.#N()}}realpathSync(){if(this.#O)return this.#O;if(!((cr|sr|or)&this.#T))try{let e=this.#e.realpathSync(this.fullpath());return this.#O=this.resolve(e)}catch{this.#N()}}[vr](e){if(e===this)return;e.isCWD=!1,this.isCWD=!0;let t=/* @__PURE__ */ new Set([]),n=[],r=this;for(;r&&r.parent;)t.add(r),r.#C=n.join(this.sep),r.#w=n.join(`/`),r=r.parent,n.push(`..`);for(r=e;r&&r.parent&&!t.has(r);)r.#C=void 0,r.#w=void 0,r=r.parent}},br=class e extends yr{sep=`\\`;splitSep=Kn;constructor(e,t=qn,n,r,i,a,o){super(e,t,n,r,i,a,o)}newChild(t,n=qn,r={}){return new e(t,n,this.root,this.roots,this.nocase,this.childrenCache(),r)}getRootString(e){return _.parse(e).root}getRoot(e){if(e=Gn(e.toUpperCase()),e===this.root.name)return this.root;for(let[t,n]of Object.entries(this.roots))if(this.sameRoot(e,t))return this.roots[e]=n;return this.roots[e]=new Cr(e,this).root}sameRoot(e,t=this.root.name){return e=e.toUpperCase().replace(/\//g,`\\`).replace(Wn,`$1\\`),e===t}},xr=class e extends yr{splitSep=`/`;sep=`/`;constructor(e,t=qn,n,r,i,a,o){super(e,t,n,r,i,a,o)}getRootString(e){return e.startsWith(`/`)?`/`:``}getRoot(e){return this.root}newChild(t,n=qn,r={}){return new e(t,n,this.root,this.roots,this.nocase,this.childrenCache(),r)}},Sr=class{root;rootPath;roots;cwd;#e;#t;#n;nocase;#r;constructor(e=N.cwd(),t,n,{nocase:r,childrenCacheSize:i=16384,fs:a=Hn}={}){this.#r=Un(a),(e instanceof URL||e.startsWith(`file://`))&&(e=v(e));let o=t.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(o),this.#e=new gr,this.#t=new gr,this.#n=new _r(i);let s=o.substring(this.rootPath.length).split(n);if(s.length===1&&!s[0]&&s.pop(),r===void 0)throw TypeError(`must provide nocase setting to PathScurryBase ctor`);this.nocase=r,this.root=this.newRoot(this.#r),this.roots[this.rootPath]=this.root;let c=this.root,l=s.length-1,u=t.sep,d=this.rootPath,f=!1;for(let e of s){let t=l--;c=c.child(e,{relative:Array(t).fill(`..`).join(u),relativePosix:Array(t).fill(`..`).join(`/`),fullpath:d+=(f?``:u)+e}),f=!0}this.cwd=c}depth(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),e.depth()}childrenCache(){return this.#n}resolve(...e){let t=``;for(let n=e.length-1;n>=0;n--){let r=e[n];if(r&&r!==`.`&&(t=t?`${r}/${t}`:r,this.isAbsolute(r)))break}let n=this.#e.get(t);if(n!==void 0)return n;let r=this.cwd.resolve(t).fullpath();return this.#e.set(t,r),r}resolvePosix(...e){let t=``;for(let n=e.length-1;n>=0;n--){let r=e[n];if(r&&r!==`.`&&(t=t?`${r}/${t}`:r,this.isAbsolute(r)))break}let n=this.#t.get(t);if(n!==void 0)return n;let r=this.cwd.resolve(t).fullpathPosix();return this.#t.set(t,r),r}relative(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),e.relative()}relativePosix(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),e.relativePosix()}basename(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),e.name}dirname(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),(e.parent||e).fullpath()}async readdir(e=this.cwd,t={withFileTypes:!0}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof yr||(t=e,e=this.cwd);let{withFileTypes:n}=t;if(e.canReaddir()){let t=await e.readdir();return n?t:t.map(e=>e.name)}return[]}readdirSync(e=this.cwd,t={withFileTypes:!0}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof yr||(t=e,e=this.cwd);let{withFileTypes:n=!0}=t;return e.canReaddir()?n?e.readdirSync():e.readdirSync().map(e=>e.name):[]}async lstat(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),e.lstat()}lstatSync(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),e.lstatSync()}async readlink(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof yr||(t=e.withFileTypes,e=this.cwd);let n=await e.readlink();return t?n:n?.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof yr||(t=e.withFileTypes,e=this.cwd);let n=e.readlinkSync();return t?n:n?.fullpath()}async realpath(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof yr||(t=e.withFileTypes,e=this.cwd);let n=await e.realpath();return t?n:n?.fullpath()}realpathSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof yr||(t=e.withFileTypes,e=this.cwd);let n=e.realpathSync();return t?n:n?.fullpath()}async walk(e=this.cwd,t={}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof yr||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:i,walkFilter:a}=t,o=[];(!i||i(e))&&o.push(n?e:e.fullpath());let s=/* @__PURE__ */ new Set,c=(e,t)=>{s.add(e),e.readdirCB((e,l)=>{if(e)return t(e);let u=l.length;if(!u)return t();let d=()=>{--u===0&&t()};for(let e of l)(!i||i(e))&&o.push(n?e:e.fullpath()),r&&e.isSymbolicLink()?e.realpath().then(e=>e?.isUnknown()?e.lstat():e).then(e=>e?.shouldWalk(s,a)?c(e,d):d()):e.shouldWalk(s,a)?c(e,d):d()},!0)},l=e;return new Promise((e,t)=>{c(l,n=>{if(n)return t(n);e(o)})})}walkSync(e=this.cwd,t={}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof yr||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:i,walkFilter:a}=t,o=[];(!i||i(e))&&o.push(n?e:e.fullpath());let s=/* @__PURE__ */ new Set([e]);for(let e of s){let t=e.readdirSync();for(let e of t){(!i||i(e))&&o.push(n?e:e.fullpath());let t=e;if(e.isSymbolicLink()){if(!(r&&(t=e.realpathSync())))continue;t.isUnknown()&&t.lstatSync()}t.shouldWalk(s,a)&&s.add(t)}}return o}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,t={}){return typeof e==`string`?e=this.cwd.resolve(e):e instanceof yr||(t=e,e=this.cwd),this.stream(e,t)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(e=this.cwd,t={}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof yr||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:i,walkFilter:a}=t;(!i||i(e))&&(yield n?e:e.fullpath());let o=/* @__PURE__ */ new Set([e]);for(let e of o){let t=e.readdirSync();for(let e of t){(!i||i(e))&&(yield n?e:e.fullpath());let t=e;if(e.isSymbolicLink()){if(!(r&&(t=e.realpathSync())))continue;t.isUnknown()&&t.lstatSync()}t.shouldWalk(o,a)&&o.add(t)}}}stream(e=this.cwd,t={}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof yr||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:i,walkFilter:a}=t,o=new Bn({objectMode:!0});(!i||i(e))&&o.write(n?e:e.fullpath());let s=/* @__PURE__ */ new Set,c=[e],l=0,u=()=>{let e=!1;for(;!e;){let t=c.shift();if(!t){l===0&&o.end();return}l++,s.add(t);let d=(t,p,m=!1)=>{if(t)return o.emit(`error`,t);if(r&&!m){let e=[];for(let t of p)t.isSymbolicLink()&&e.push(t.realpath().then(e=>e?.isUnknown()?e.lstat():e));if(e.length){Promise.all(e).then(()=>d(null,p,!0));return}}for(let t of p)t&&(!i||i(t))&&(o.write(n?t:t.fullpath())||(e=!0));l--;for(let e of p){let t=e.realpathCached()||e;t.shouldWalk(s,a)&&c.push(t)}e&&!o.flowing?o.once(`drain`,u):f||u()},f=!0;t.readdirCB(d,!0),f=!1}};return u(),o}streamSync(e=this.cwd,t={}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof yr||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:i,walkFilter:a}=t,o=new Bn({objectMode:!0}),s=/* @__PURE__ */ new Set;(!i||i(e))&&o.write(n?e:e.fullpath());let c=[e],l=0,u=()=>{let e=!1;for(;!e;){let t=c.shift();if(!t){l===0&&o.end();return}l++,s.add(t);let u=t.readdirSync();for(let t of u)(!i||i(t))&&(o.write(n?t:t.fullpath())||(e=!0));l--;for(let e of u){let t=e;if(e.isSymbolicLink()){if(!(r&&(t=e.realpathSync())))continue;t.isUnknown()&&t.lstatSync()}t.shouldWalk(s,a)&&c.push(t)}}e&&!o.flowing&&o.once(`drain`,u)};return u(),o}chdir(e=this.cwd){let t=this.cwd;this.cwd=typeof e==`string`?this.cwd.resolve(e):e,this.cwd[vr](t)}},Cr=class extends Sr{sep=`\\`;constructor(e=N.cwd(),t={}){let{nocase:n=!0}=t;super(e,_,`\\`,{...t,nocase:n}),this.nocase=n;for(let e=this.cwd;e;e=e.parent)e.nocase=this.nocase}parseRootPath(e){return _.parse(e).root.toUpperCase()}newRoot(e){return new br(this.rootPath,Xn,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith(`/`)||e.startsWith(`\\`)||/^[a-z]:(\/|\\)/i.test(e)}},wr=class extends Sr{sep=`/`;constructor(e=N.cwd(),t={}){let{nocase:n=!1}=t;super(e,h,`/`,{...t,nocase:n}),this.nocase=n}parseRootPath(e){return`/`}newRoot(e){return new xr(this.rootPath,Xn,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith(`/`)}},Tr=class extends wr{constructor(e=N.cwd(),t={}){let{nocase:n=!0}=t;super(e,{...t,nocase:n})}};N.platform;var Er=N.platform===`win32`?Cr:N.platform===`darwin`?Tr:wr,Dr=e=>e.length>=1,Or=e=>e.length>=1,kr=Symbol.for(`nodejs.util.inspect.custom`),Ar=class e{#e;#t;#n;length;#r;#i;#a;#o;#s;#c;#l=!0;constructor(e,t,n,r){if(!Dr(e))throw TypeError(`empty pattern list`);if(!Or(t))throw TypeError(`empty glob list`);if(t.length!==e.length)throw TypeError(`mismatched pattern list and glob list lengths`);if(this.length=e.length,n<0||n>=this.length)throw TypeError(`index out of range`);if(this.#e=e,this.#t=t,this.#n=n,this.#r=r,this.#n===0){if(this.isUNC()){let[e,t,n,r,...i]=this.#e,[a,o,s,c,...l]=this.#t;i[0]===``&&(i.shift(),l.shift());let u=[e,t,n,r,``].join(`/`),d=[a,o,s,c,``].join(`/`);this.#e=[u,...i],this.#t=[d,...l],this.length=this.#e.length}else if(this.isDrive()||this.isAbsolute()){let[e,...t]=this.#e,[n,...r]=this.#t;t[0]===``&&(t.shift(),r.shift());let i=e+`/`,a=n+`/`;this.#e=[i,...t],this.#t=[a,...r],this.length=this.#e.length}}}[kr](){return`Pattern <`+this.#t.slice(this.#n).join(`/`)+`>`}pattern(){return this.#e[this.#n]}isString(){return typeof this.#e[this.#n]==`string`}isGlobstar(){return this.#e[this.#n]===Mt}isRegExp(){return this.#e[this.#n]instanceof RegExp}globString(){return this.#a=this.#a||(this.#n===0?this.isAbsolute()?this.#t[0]+this.#t.slice(1).join(`/`):this.#t.join(`/`):this.#t.slice(this.#n).join(`/`))}hasMore(){return this.length>this.#n+1}rest(){return this.#i===void 0?this.hasMore()?(this.#i=new e(this.#e,this.#t,this.#n+1,this.#r),this.#i.#c=this.#c,this.#i.#s=this.#s,this.#i.#o=this.#o,this.#i):this.#i=null:this.#i}isUNC(){let e=this.#e;return this.#s===void 0?this.#s=this.#r===`win32`&&this.#n===0&&e[0]===``&&e[1]===``&&typeof e[2]==`string`&&!!e[2]&&typeof e[3]==`string`&&!!e[3]:this.#s}isDrive(){let e=this.#e;return this.#o===void 0?this.#o=this.#r===`win32`&&this.#n===0&&this.length>1&&typeof e[0]==`string`&&/^[a-z]:$/i.test(e[0]):this.#o}isAbsolute(){let e=this.#e;return this.#c===void 0?this.#c=e[0]===``&&e.length>1||this.isDrive()||this.isUNC():this.#c}root(){let e=this.#e[0];return typeof e==`string`&&this.isAbsolute()&&this.#n===0?e:``}checkFollowGlobstar(){return!(this.#n===0||!this.isGlobstar()||!this.#l)}markFollowGlobstar(){return this.#n===0||!this.isGlobstar()||!this.#l?!1:(this.#l=!1,!0)}},jr=typeof N==`object`&&N&&typeof N.platform==`string`?N.platform:`linux`,Mr=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(e,{nobrace:t,nocase:n,noext:r,noglobstar:i,platform:a=jr}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=a,this.mmopts={dot:!0,nobrace:t,nocase:n,noext:r,noglobstar:i,optimizationLevel:2,platform:a,nocomment:!0,nonegate:!0};for(let t of e)this.add(t)}add(e){let t=new Bt(e,this.mmopts);for(let e=0;e<t.set.length;e++){let n=t.set[e],r=t.globParts[e];if(!n||!r)throw Error(`invalid pattern object`);for(;n[0]===`.`&&r[0]===`.`;)n.shift(),r.shift();let i=new Ar(n,r,0,this.platform),a=new Bt(i.globString(),this.mmopts),o=r[r.length-1]===`**`,s=i.isAbsolute();s?this.absolute.push(a):this.relative.push(a),o&&(s?this.absoluteChildren.push(a):this.relativeChildren.push(a))}}ignored(e){let t=e.fullpath(),n=`${t}/`,r=e.relative()||`.`,i=`${r}/`;for(let e of this.relative)if(e.match(r)||e.match(i))return!0;for(let e of this.absolute)if(e.match(t)||e.match(n))return!0;return!1}childrenIgnored(e){let t=e.fullpath()+`/`,n=(e.relative()||`.`)+`/`;for(let e of this.relativeChildren)if(e.match(n))return!0;for(let e of this.absoluteChildren)if(e.match(t))return!0;return!1}},Nr=class e{store;constructor(e=/* @__PURE__ */ new Map){this.store=e}copy(){return new e(new Map(this.store))}hasWalked(e,t){return this.store.get(e.fullpath())?.has(t.globString())}storeWalked(e,t){let n=e.fullpath(),r=this.store.get(n);r?r.add(t.globString()):this.store.set(n,/* @__PURE__ */ new Set([t.globString()]))}},Pr=class{store=/* @__PURE__ */ new Map;add(e,t,n){let r=(t?2:0)|!!n,i=this.store.get(e);this.store.set(e,i===void 0?r:r&i)}entries(){return[...this.store.entries()].map(([e,t])=>[e,!!(t&2),!!(t&1)])}},Fr=class{store=/* @__PURE__ */ new Map;add(e,t){if(!e.canReaddir())return;let n=this.store.get(e);n?n.find(e=>e.globString()===t.globString())||n.push(t):this.store.set(e,[t])}get(e){let t=this.store.get(e);if(!t)throw Error(`attempting to walk unknown path`);return t}entries(){return this.keys().map(e=>[e,this.store.get(e)])}keys(){return[...this.store.keys()].filter(e=>e.canReaddir())}},Ir=class e{hasWalkedCache;matches=new Pr;subwalks=new Fr;patterns;follow;dot;opts;constructor(e,t){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=t?t.copy():new Nr}processPatterns(e,t){this.patterns=t;let n=t.map(t=>[e,t]);for(let[e,t]of n){this.hasWalkedCache.storeWalked(e,t);let n=t.root(),r=t.isAbsolute()&&this.opts.absolute!==!1;if(n){e=e.resolve(n===`/`&&this.opts.root!==void 0?this.opts.root:n);let r=t.rest();if(r)t=r;else{this.matches.add(e,!0,!1);continue}}if(e.isENOENT())continue;let i,a,o=!1;for(;typeof(i=t.pattern())==`string`&&(a=t.rest());)e=e.resolve(i),t=a,o=!0;if(i=t.pattern(),a=t.rest(),o){if(this.hasWalkedCache.hasWalked(e,t))continue;this.hasWalkedCache.storeWalked(e,t)}if(typeof i==`string`){let t=i===`..`||i===``||i===`.`;this.matches.add(e.resolve(i),r,t)}else if(i===Mt){(!e.isSymbolicLink()||this.follow||t.checkFollowGlobstar())&&this.subwalks.add(e,t);let n=a?.pattern(),i=a?.rest();if(!a||(n===``||n===`.`)&&!i)this.matches.add(e,r,n===``||n===`.`);else if(n===`..`){let t=e.parent||e;i?this.hasWalkedCache.hasWalked(t,i)||this.subwalks.add(t,i):this.matches.add(t,r,!0)}}else i instanceof RegExp&&this.subwalks.add(e,t)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new e(this.opts,this.hasWalkedCache)}filterEntries(e,t){let n=this.subwalks.get(e),r=this.child();for(let e of t)for(let t of n){let n=t.isAbsolute(),i=t.pattern(),a=t.rest();i===Mt?r.testGlobstar(e,t,a,n):i instanceof RegExp?r.testRegExp(e,i,a,n):r.testString(e,i,a,n)}return r}testGlobstar(e,t,n,r){if((this.dot||!e.name.startsWith(`.`))&&(t.hasMore()||this.matches.add(e,r,!1),e.canReaddir()&&(this.follow||!e.isSymbolicLink()?this.subwalks.add(e,t):e.isSymbolicLink()&&(n&&t.checkFollowGlobstar()?this.subwalks.add(e,n):t.markFollowGlobstar()&&this.subwalks.add(e,t)))),n){let t=n.pattern();if(typeof t==`string`&&t!==`..`&&t!==``&&t!==`.`)this.testString(e,t,n.rest(),r);else if(t===`..`){let t=e.parent||e;this.subwalks.add(t,n)}else t instanceof RegExp&&this.testRegExp(e,t,n.rest(),r)}}testRegExp(e,t,n,r){t.test(e.name)&&(n?this.subwalks.add(e,n):this.matches.add(e,r,!1))}testString(e,t,n,r){e.isNamed(t)&&(n?this.subwalks.add(e,n):this.matches.add(e,r,!1))}},Lr=(e,t)=>typeof e==`string`?new Mr([e],t):Array.isArray(e)?new Mr(e,t):e,Rr=class{path;patterns;opts;seen=/* @__PURE__ */ new Set;paused=!1;aborted=!1;#e=[];#t;#n;signal;maxDepth;includeChildMatches;constructor(e,t,n){if(this.patterns=e,this.path=t,this.opts=n,this.#n=!n.posix&&n.platform===`win32`?`\\`:`/`,this.includeChildMatches=n.includeChildMatches!==!1,(n.ignore||!this.includeChildMatches)&&(this.#t=Lr(n.ignore??[],n),!this.includeChildMatches&&typeof this.#t.add!=`function`))throw Error(`cannot ignore child matches, ignore lacks add() method.`);this.maxDepth=n.maxDepth||1/0,n.signal&&(this.signal=n.signal,this.signal.addEventListener(`abort`,()=>{this.#e.length=0}))}#r(e){return this.seen.has(e)||!!this.#t?.ignored?.(e)}#i(e){return!!this.#t?.childrenIgnored?.(e)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let e;for(;!this.paused&&(e=this.#e.shift());)e()}onResume(e){this.signal?.aborted||(this.paused?this.#e.push(e):e())}async matchCheck(e,t){if(t&&this.opts.nodir)return;let n;if(this.opts.realpath){if(n=e.realpathCached()||await e.realpath(),!n)return;e=n}let r=e.isUnknown()||this.opts.stat?await e.lstat():e;if(this.opts.follow&&this.opts.nodir&&r?.isSymbolicLink()){let e=await r.realpath();e&&(e.isUnknown()||this.opts.stat)&&await e.lstat()}return this.matchCheckTest(r,t)}matchCheckTest(e,t){return e&&(this.maxDepth===1/0||e.depth()<=this.maxDepth)&&(!t||e.canReaddir())&&(!this.opts.nodir||!e.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!e.isSymbolicLink()||!e.realpathCached()?.isDirectory())&&!this.#r(e)?e:void 0}matchCheckSync(e,t){if(t&&this.opts.nodir)return;let n;if(this.opts.realpath){if(n=e.realpathCached()||e.realpathSync(),!n)return;e=n}let r=e.isUnknown()||this.opts.stat?e.lstatSync():e;if(this.opts.follow&&this.opts.nodir&&r?.isSymbolicLink()){let e=r.realpathSync();e&&(e?.isUnknown()||this.opts.stat)&&e.lstatSync()}return this.matchCheckTest(r,t)}matchFinish(e,t){if(this.#r(e))return;if(!this.includeChildMatches&&this.#t?.add){let t=`${e.relativePosix()}/**`;this.#t.add(t)}let n=this.opts.absolute===void 0?t:this.opts.absolute;this.seen.add(e);let r=this.opts.mark&&e.isDirectory()?this.#n:``;if(this.opts.withFileTypes)this.matchEmit(e);else if(n){let t=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(t+r)}else{let t=this.opts.posix?e.relativePosix():e.relative(),n=this.opts.dotRelative&&!t.startsWith(`..`+this.#n)?`.`+this.#n:``;this.matchEmit(t?n+t+r:`.`+r)}}async match(e,t,n){let r=await this.matchCheck(e,n);r&&this.matchFinish(r,t)}matchSync(e,t,n){let r=this.matchCheckSync(e,n);r&&this.matchFinish(r,t)}walkCB(e,t,n){this.signal?.aborted&&n(),this.walkCB2(e,t,new Ir(this.opts),n)}walkCB2(e,t,n,r){if(this.#i(e))return r();if(this.signal?.aborted&&r(),this.paused){this.onResume(()=>this.walkCB2(e,t,n,r));return}n.processPatterns(e,t);let i=1,a=()=>{--i===0&&r()};for(let[e,t,r]of n.matches.entries())this.#r(e)||(i++,this.match(e,t,r).then(()=>a()));for(let e of n.subwalkTargets()){if(this.maxDepth!==1/0&&e.depth()>=this.maxDepth)continue;i++;let t=e.readdirCached();e.calledReaddir()?this.walkCB3(e,t,n,a):e.readdirCB((t,r)=>this.walkCB3(e,r,n,a),!0)}a()}walkCB3(e,t,n,r){n=n.filterEntries(e,t);let i=1,a=()=>{--i===0&&r()};for(let[e,t,r]of n.matches.entries())this.#r(e)||(i++,this.match(e,t,r).then(()=>a()));for(let[e,t]of n.subwalks.entries())i++,this.walkCB2(e,t,n.child(),a);a()}walkCBSync(e,t,n){this.signal?.aborted&&n(),this.walkCB2Sync(e,t,new Ir(this.opts),n)}walkCB2Sync(e,t,n,r){if(this.#i(e))return r();if(this.signal?.aborted&&r(),this.paused){this.onResume(()=>this.walkCB2Sync(e,t,n,r));return}n.processPatterns(e,t);let i=1,a=()=>{--i===0&&r()};for(let[e,t,r]of n.matches.entries())this.#r(e)||this.matchSync(e,t,r);for(let e of n.subwalkTargets()){if(this.maxDepth!==1/0&&e.depth()>=this.maxDepth)continue;i++;let t=e.readdirSync();this.walkCB3Sync(e,t,n,a)}a()}walkCB3Sync(e,t,n,r){n=n.filterEntries(e,t);let i=1,a=()=>{--i===0&&r()};for(let[e,t,r]of n.matches.entries())this.#r(e)||this.matchSync(e,t,r);for(let[e,t]of n.subwalks.entries())i++,this.walkCB2Sync(e,t,n.child(),a);a()}},zr=class extends Rr{matches=/* @__PURE__ */ new Set;constructor(e,t,n){super(e,t,n)}matchEmit(e){this.matches.add(e)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((e,t)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?t(this.signal.reason):e(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}},Br=class extends Rr{results;constructor(e,t,n){super(e,t,n),this.results=new Bn({signal:this.signal,objectMode:!0}),this.results.on(`drain`,()=>this.resume()),this.results.on(`resume`,()=>this.resume())}matchEmit(e){this.results.write(e),this.results.flowing||this.pause()}stream(){let e=this.path;return e.isUnknown()?e.lstat().then(()=>{this.walkCB(e,this.patterns,()=>this.results.end())}):this.walkCB(e,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}},Vr=typeof N==`object`&&N&&typeof N.platform==`string`?N.platform:`linux`,Hr=class{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(e,t){if(!t)throw TypeError(`glob options required`);if(this.withFileTypes=!!t.withFileTypes,this.signal=t.signal,this.follow=!!t.follow,this.dot=!!t.dot,this.dotRelative=!!t.dotRelative,this.nodir=!!t.nodir,this.mark=!!t.mark,t.cwd?(t.cwd instanceof URL||t.cwd.startsWith(`file://`))&&(t.cwd=v(t.cwd)):this.cwd=``,this.cwd=t.cwd||``,this.root=t.root,this.magicalBraces=!!t.magicalBraces,this.nobrace=!!t.nobrace,this.noext=!!t.noext,this.realpath=!!t.realpath,this.absolute=t.absolute,this.includeChildMatches=t.includeChildMatches!==!1,this.noglobstar=!!t.noglobstar,this.matchBase=!!t.matchBase,this.maxDepth=typeof t.maxDepth==`number`?t.maxDepth:1/0,this.stat=!!t.stat,this.ignore=t.ignore,this.withFileTypes&&this.absolute!==void 0)throw Error(`cannot set absolute and withFileTypes:true`);if(typeof e==`string`&&(e=[e]),this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(e=e.map(e=>e.replace(/\\/g,`/`))),this.matchBase){if(t.noglobstar)throw TypeError(`base matching requires globstar`);e=e.map(e=>e.includes(`/`)?e:`./**/${e}`)}if(this.pattern=e,this.platform=t.platform||Vr,this.opts={...t,platform:this.platform},t.scurry){if(this.scurry=t.scurry,t.nocase!==void 0&&t.nocase!==t.scurry.nocase)throw Error(`nocase option contradicts provided scurry option`)}else{let e=t.platform===`win32`?Cr:t.platform===`darwin`?Tr:t.platform?wr:Er;this.scurry=new e(this.cwd,{nocase:t.nocase,fs:t.fs})}this.nocase=this.scurry.nocase;let n=this.platform===`darwin`||this.platform===`win32`,r={braceExpandMax:1e4,...t,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:n,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},[i,a]=this.pattern.map(e=>new Bt(e,r)).reduce((e,t)=>(e[0].push(...t.set),e[1].push(...t.globParts),e),[[],[]]);this.patterns=i.map((e,t)=>{let n=a[t];if(!n)throw Error(`invalid pattern object`);return new Ar(e,n,0,this.platform)})}async walk(){return[...await new zr(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth===1/0?1/0:this.maxDepth+this.scurry.cwd.depth(),platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new zr(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth===1/0?1/0:this.maxDepth+this.scurry.cwd.depth(),platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new Br(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth===1/0?1/0:this.maxDepth+this.scurry.cwd.depth(),platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new Br(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth===1/0?1/0:this.maxDepth+this.scurry.cwd.depth(),platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}},Ur=(e,t={})=>{Array.isArray(e)||(e=[e]);for(let n of e)if(new Bt(n,t).hasMagic())return!0;return!1};function Wr(e,t={}){return new Hr(e,t).streamSync()}function Gr(e,t={}){return new Hr(e,t).stream()}function Kr(e,t={}){return new Hr(e,t).walkSync()}async function qr(e,t={}){return new Hr(e,t).walk()}function Jr(e,t={}){return new Hr(e,t).iterateSync()}function Yr(e,t={}){return new Hr(e,t).iterate()}var Xr=Wr,Zr=Object.assign(Gr,{sync:Wr}),Qr=Jr,$r=Object.assign(Yr,{sync:Jr}),ei=Object.assign(Kr,{stream:Wr,iterate:Jr}),ti=Object.assign(qr,{glob:qr,globSync:Kr,sync:ei,globStream:Gr,stream:Zr,globStreamSync:Wr,streamSync:Xr,globIterate:Yr,iterate:$r,globIterateSync:Jr,iterateSync:Qr,Glob:Hr,hasMagic:Ur,escape:ct,unescape:Ye});ti.glob=ti;const ni=(e,t)=>e===void 0||typeof e===t,ri=e=>!!e&&typeof e==`object`&&ni(e.preserveRoot,`boolean`)&&ni(e.tmp,`string`)&&ni(e.maxRetries,`number`)&&ni(e.retryDelay,`number`)&&ni(e.backoff,`number`)&&ni(e.maxBackoff,`number`)&&(ni(e.glob,`boolean`)||e.glob&&typeof e.glob==`object`)&&ni(e.filter,`function`),ii=e=>{if(!ri(e))throw Error(`invalid rimraf options`)},ai=e=>{ii(e);let{glob:t,...n}=e;if(!t)return n;let r=t===!0?e.signal?{signal:e.signal}:{}:e.signal?{signal:e.signal,...t}:t;return{...n,glob:{...r,absolute:!0,withFileTypes:!1}}},oi=(e={})=>ai(e),si=(e={})=>ai(e),ci=(e,t={})=>{let n=typeof e;if(n!==`string`){let t=e&&n===`object`&&e.constructor,r=`The "path" argument must be of type string. Received ${t&&t.name?`an instance of ${t.name}`:n===`object`?de(e):`type ${n} ${e}`}`;throw Object.assign(TypeError(r),{path:e,code:`ERR_INVALID_ARG_TYPE`})}if(/\0/.test(e))throw Object.assign(/* @__PURE__ */ TypeError(`path must be a string without null bytes`),{path:e,code:`ERR_INVALID_ARG_VALUE`});e=ue(e);let{root:r}=U(e);if(e===r&&t.preserveRoot!==!1)throw Object.assign(/* @__PURE__ */ Error(`refusing to remove root directory without preserveRoot:false`),{path:e,code:`ERR_PRESERVE_ROOT`});if(N.platform===`win32`){let t=/[*|"<>?:]/,{root:n}=U(e);if(t.test(e.substring(n.length)))throw Object.assign(/* @__PURE__ */ Error(`Illegal characters in path.`),{path:e,code:`EINVAL`})}return e},li=e=>R(e,{withFileTypes:!0}),ui={chmod:W.chmod,mkdir:W.mkdir,readdir:e=>W.readdir(e,{withFileTypes:!0}),rename:W.rename,rm:W.rm,rmdir:W.rmdir,stat:W.stat,lstat:W.lstat,unlink:W.unlink},{readdir:di}=ui,fi=e=>di(e).catch(e=>e),pi=e=>{try{return li(e)}catch(e){return e}},mi=e=>!!e&&typeof e==`object`,hi=(e,t)=>t in e&&typeof e[t]==`string`,gi=e=>mi(e)&&hi(e,`code`)&&hi(e,`path`),Y=e=>mi(e)&&hi(e,`code`)?e.code:null,_i=async(e,t)=>e.catch(e=>{if(Y(e)!==`ENOENT`)throw t??e}),vi=(e,t)=>{try{return e()}catch(e){if(Y(e)===`ENOENT`)return;throw t??e}},{lstat:yi,rmdir:bi,unlink:xi}=ui,Si=async(e,t)=>(t?.signal?.throwIfAborted(),await _i(yi(e).then(n=>wi(e,t,n)))??!0),Ci=(e,t)=>(t?.signal?.throwIfAborted(),vi(()=>Ti(e,t,I(e)))??!0),wi=async(e,t,n)=>{t?.signal?.throwIfAborted();let r=n.isDirectory()?await fi(e):null;if(!Array.isArray(r)){
|
|
3
|
+
>>> no match, partial?`,e,d,t,f),d===s))}let i;if(typeof l==`string`?(i=u===l,this.debug(`string match`,l,u,i)):(i=l.test(u),this.debug(`pattern match`,l,u,i)),!i)return!1}if(a===s&&o===c)return!0;if(a===s)return n;if(o===c)return a===s-1&&e[a]===``;throw Error(`wtf?`)}braceExpand(){return Lt(this.pattern,this.options)}parse(e){Ue(e);let t=this.options;if(e===`**`)return Mt;if(e===``)return``;let n,r=null;(n=e.match(bt))?r=t.dot?St:xt:(n=e.match(ut))?r=(t.nocase?t.dot?mt:pt:t.dot?ft:dt)(n[1]):(n=e.match(Ct))?r=(t.nocase?t.dot?Tt:wt:t.dot?Et:Dt)(n):(n=e.match(ht))?r=t.dot?_t:gt:(n=e.match(vt))&&(r=yt);let i=st.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?Nt:t.dot?Pt:Ft,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`?zt(e):e===Mt?Mt:e._src});t.forEach((e,r)=>{let i=t[r+1],a=t[r-1];e!==Mt||a===Mt||(a===void 0?i!==void 0&&i!==Mt?t[r+1]=`(?:\\/|`+n+`\\/)?`+i:t[r]=n:i===void 0?t[r-1]=a+`(?:\\/|\\/`+n+`)?`:i!==Mt&&(t[r-1]=a+`(?:\\/|\\/`+n+`\\/)`+i,t[r+1]=Mt))});let i=t.filter(e=>e!==Mt);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=0;e<i.length;e++){let o=i[e],s=r;if(n.matchBase&&o.length===1&&(s=[a]),this.matchOne(s,o,t))return n.flipNegate?!0:!this.negate}return!n.flipNegate&&this.negate}static defaults(e){return lt.defaults(e).Minimatch}};lt.AST=st,lt.Minimatch=Bt,lt.escape=ct,lt.unescape=Ye;var Vt=typeof performance==`object`&&performance&&typeof performance.now==`function`?performance:Date,Ht=/* @__PURE__ */ new Set,Ut=typeof M==`object`&&M?M:{},Wt=(e,t,n,r)=>{typeof Ut.emitWarning==`function`?Ut.emitWarning(e,t,n,r):console.error(`[${n}] ${t}: ${e}`)},Gt=globalThis.AbortController,Kt=globalThis.AbortSignal;if(typeof Gt>`u`){Kt=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(e,t){this._onabort.push(t)}},Gt=class{constructor(){t()}signal=new Kt;abort(e){if(!this.signal.aborted){this.signal.reason=e,this.signal.aborted=!0;for(let t of this.signal._onabort)t(e);this.signal.onabort?.(e)}}};let e=Ut.env?.LRU_CACHE_IGNORE_AC_WARNING!==`1`,t=()=>{e&&(e=!1,Wt("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.",`NO_ABORT_CONTROLLER`,`ENOTSUP`,t))}}var qt=e=>!Ht.has(e),Jt=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),Yt=e=>Jt(e)?e<=256?Uint8Array:e<=2**16?Uint16Array:e<=2**32?Uint32Array:e<=2**53-1?Xt:null:null,Xt=class extends Array{constructor(e){super(e),this.fill(0)}},Zt=class e{heap;length;static#e=!1;static create(t){let n=Yt(t);if(!n)return[];e.#e=!0;let r=new e(t,n);return e.#e=!1,r}constructor(t,n){if(!e.#e)throw TypeError(`instantiate Stack using Stack.create(n)`);this.heap=new n(t),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},Qt=class e{#e;#t;#n;#r;#i;#a;#o;#s;get perf(){return this.#s}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#c;#l;#u;#d;#f;#p;#m;#h;#g;#_;#v;#y;#b;#x;#S;#C;#w;#T;#E;static unsafeExposeInternals(e){return{starts:e.#b,ttls:e.#x,autopurgeTimers:e.#S,sizes:e.#y,keyMap:e.#u,keyList:e.#d,valList:e.#f,next:e.#p,prev:e.#m,get head(){return e.#h},get tail(){return e.#g},free:e.#_,isBackgroundFetch:t=>e.#V(t),backgroundFetch:(t,n,r,i)=>e.#B(t,n,r,i),moveToTail:t=>e.#U(t),indexes:t=>e.#I(t),rindexes:t=>e.#L(t),isStale:t=>e.#j(t)}}get max(){return this.#e}get maxSize(){return this.#t}get calculatedSize(){return this.#l}get size(){return this.#c}get fetchMethod(){return this.#a}get memoMethod(){return this.#o}get dispose(){return this.#n}get onInsert(){return this.#r}get disposeAfter(){return this.#i}constructor(t){let{max:n=0,ttl:r,ttlResolution:i=1,ttlAutopurge:a,updateAgeOnGet:o,updateAgeOnHas:s,allowStale:c,dispose:l,onInsert:u,disposeAfter:d,noDisposeOnSet:f,noUpdateTTL:p,maxSize:m=0,maxEntrySize:h=0,sizeCalculation:g,fetchMethod:_,memoMethod:v,noDeleteOnFetchRejection:y,noDeleteOnStaleGet:b,allowStaleOnFetchRejection:x,allowStaleOnFetchAbort:S,ignoreFetchAbort:C,perf:w}=t;if(w!==void 0&&typeof w?.now!=`function`)throw TypeError(`perf option must have a now() method if specified`);if(this.#s=w??Vt,n!==0&&!Jt(n))throw TypeError(`max option must be a nonnegative integer`);let T=n?Yt(n):Array;if(!T)throw Error(`invalid max value: `+n);if(this.#e=n,this.#t=m,this.maxEntrySize=h||this.#t,this.sizeCalculation=g,this.sizeCalculation){if(!this.#t&&!this.maxEntrySize)throw TypeError(`cannot set sizeCalculation without setting maxSize or maxEntrySize`);if(typeof this.sizeCalculation!=`function`)throw TypeError(`sizeCalculation set to non-function`)}if(v!==void 0&&typeof v!=`function`)throw TypeError(`memoMethod must be a function if defined`);if(this.#o=v,_!==void 0&&typeof _!=`function`)throw TypeError(`fetchMethod must be a function if specified`);if(this.#a=_,this.#w=!!_,this.#u=/* @__PURE__ */ new Map,this.#d=Array(n).fill(void 0),this.#f=Array(n).fill(void 0),this.#p=new T(n),this.#m=new T(n),this.#h=0,this.#g=0,this.#_=Zt.create(n),this.#c=0,this.#l=0,typeof l==`function`&&(this.#n=l),typeof u==`function`&&(this.#r=u),typeof d==`function`?(this.#i=d,this.#v=[]):(this.#i=void 0,this.#v=void 0),this.#C=!!this.#n,this.#E=!!this.#r,this.#T=!!this.#i,this.noDisposeOnSet=!!f,this.noUpdateTTL=!!p,this.noDeleteOnFetchRejection=!!y,this.allowStaleOnFetchRejection=!!x,this.allowStaleOnFetchAbort=!!S,this.ignoreFetchAbort=!!C,this.maxEntrySize!==0){if(this.#t!==0&&!Jt(this.#t))throw TypeError(`maxSize must be a positive integer if specified`);if(!Jt(this.maxEntrySize))throw TypeError(`maxEntrySize must be a positive integer if specified`);this.#M()}if(this.allowStale=!!c,this.noDeleteOnStaleGet=!!b,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!s,this.ttlResolution=Jt(i)||i===0?i:1,this.ttlAutopurge=!!a,this.ttl=r||0,this.ttl){if(!Jt(this.ttl))throw TypeError(`ttl must be a positive integer if specified`);this.#D()}if(this.#e===0&&this.ttl===0&&this.#t===0)throw TypeError(`At least one of max, maxSize, or ttl is required`);if(!this.ttlAutopurge&&!this.#e&&!this.#t){let t=`LRU_CACHE_UNBOUNDED`;qt(t)&&(Ht.add(t),Wt(`TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.`,`UnboundedCacheWarning`,t,e))}}getRemainingTTL(e){return this.#u.has(e)?1/0:0}#D(){let e=new Xt(this.#e),t=new Xt(this.#e);this.#x=e,this.#b=t;let n=this.ttlAutopurge?Array(this.#e):void 0;this.#S=n,this.#A=(r,i,a=this.#s.now())=>{if(t[r]=i===0?0:a,e[r]=i,n?.[r]&&(clearTimeout(n[r]),n[r]=void 0),i!==0&&n){let e=setTimeout(()=>{this.#j(r)&&this.#W(this.#d[r],`expire`)},i+1);e.unref&&e.unref(),n[r]=e}},this.#O=n=>{t[n]=e[n]===0?0:this.#s.now()},this.#k=(n,a)=>{if(e[a]){let o=e[a],s=t[a];if(!o||!s)return;n.ttl=o,n.start=s,n.now=r||i(),n.remainingTTL=o-(n.now-s)}};let r=0,i=()=>{let e=this.#s.now();if(this.ttlResolution>0){r=e;let t=setTimeout(()=>r=0,this.ttlResolution);t.unref&&t.unref()}return e};this.getRemainingTTL=n=>{let a=this.#u.get(n);if(a===void 0)return 0;let o=e[a],s=t[a];return!o||!s?1/0:o-((r||i())-s)},this.#j=n=>{let a=t[n],o=e[n];return!!o&&!!a&&(r||i())-a>o}}#O=()=>{};#k=()=>{};#A=()=>{};#j=()=>!1;#M(){let e=new Xt(this.#e);this.#l=0,this.#y=e,this.#N=t=>{this.#l-=e[t],e[t]=0},this.#F=(e,t,n,r)=>{if(this.#V(t))return 0;if(!Jt(n)){if(r){if(typeof r!=`function`)throw TypeError(`sizeCalculation must be a function`);if(n=r(t,e),!Jt(n))throw TypeError(`sizeCalculation return invalid (expect positive integer)`)}else throw TypeError(`invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.`)}return n},this.#P=(t,n,r)=>{if(e[t]=n,this.#t){let n=this.#t-e[t];for(;this.#l>n;)this.#z(!0)}this.#l+=e[t],r&&(r.entrySize=n,r.totalCalculatedSize=this.#l)}}#N=e=>{};#P=(e,t,n)=>{};#F=(e,t,n,r)=>{if(n||r)throw TypeError(`cannot set size without setting maxSize or maxEntrySize on cache`);return 0};*#I({allowStale:e=this.allowStale}={}){if(this.#c)for(let t=this.#g;!(!this.#R(t)||((e||!this.#j(t))&&(yield t),t===this.#h));)t=this.#m[t]}*#L({allowStale:e=this.allowStale}={}){if(this.#c)for(let t=this.#h;!(!this.#R(t)||((e||!this.#j(t))&&(yield t),t===this.#g));)t=this.#p[t]}#R(e){return e!==void 0&&this.#u.get(this.#d[e])===e}*entries(){for(let e of this.#I())this.#f[e]!==void 0&&this.#d[e]!==void 0&&!this.#V(this.#f[e])&&(yield[this.#d[e],this.#f[e]])}*rentries(){for(let e of this.#L())this.#f[e]!==void 0&&this.#d[e]!==void 0&&!this.#V(this.#f[e])&&(yield[this.#d[e],this.#f[e]])}*keys(){for(let e of this.#I()){let t=this.#d[e];t!==void 0&&!this.#V(this.#f[e])&&(yield t)}}*rkeys(){for(let e of this.#L()){let t=this.#d[e];t!==void 0&&!this.#V(this.#f[e])&&(yield t)}}*values(){for(let e of this.#I())this.#f[e]!==void 0&&!this.#V(this.#f[e])&&(yield this.#f[e])}*rvalues(){for(let e of this.#L())this.#f[e]!==void 0&&!this.#V(this.#f[e])&&(yield this.#f[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]=`LRUCache`;find(e,t={}){for(let n of this.#I()){let r=this.#f[n],i=this.#V(r)?r.__staleWhileFetching:r;if(i!==void 0&&e(i,this.#d[n],this))return this.get(this.#d[n],t)}}forEach(e,t=this){for(let n of this.#I()){let r=this.#f[n],i=this.#V(r)?r.__staleWhileFetching:r;i!==void 0&&e.call(t,i,this.#d[n],this)}}rforEach(e,t=this){for(let n of this.#L()){let r=this.#f[n],i=this.#V(r)?r.__staleWhileFetching:r;i!==void 0&&e.call(t,i,this.#d[n],this)}}purgeStale(){let e=!1;for(let t of this.#L({allowStale:!0}))this.#j(t)&&(this.#W(this.#d[t],`expire`),e=!0);return e}info(e){let t=this.#u.get(e);if(t===void 0)return;let n=this.#f[t],r=this.#V(n)?n.__staleWhileFetching:n;if(r===void 0)return;let i={value:r};if(this.#x&&this.#b){let e=this.#x[t],n=this.#b[t];e&&n&&(i.ttl=e-(this.#s.now()-n),i.start=Date.now())}return this.#y&&(i.size=this.#y[t]),i}dump(){let e=[];for(let t of this.#I({allowStale:!0})){let n=this.#d[t],r=this.#f[t],i=this.#V(r)?r.__staleWhileFetching:r;if(i===void 0||n===void 0)continue;let a={value:i};if(this.#x&&this.#b){a.ttl=this.#x[t];let e=this.#s.now()-this.#b[t];a.start=Math.floor(Date.now()-e)}this.#y&&(a.size=this.#y[t]),e.unshift([n,a])}return e}load(e){this.clear();for(let[t,n]of e){if(n.start){let e=Date.now()-n.start;n.start=this.#s.now()-e}this.set(t,n.value,n)}}set(e,t,n={}){if(t===void 0)return this.delete(e),this;let{ttl:r=this.ttl,start:i,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:s}=n,{noUpdateTTL:c=this.noUpdateTTL}=n,l=this.#F(e,t,n.size||0,o);if(this.maxEntrySize&&l>this.maxEntrySize)return s&&(s.set=`miss`,s.maxEntrySizeExceeded=!0),this.#W(e,`set`),this;let u=this.#c===0?void 0:this.#u.get(e);if(u===void 0)u=this.#c===0?this.#g:this.#_.length===0?this.#c===this.#e?this.#z(!1):this.#c:this.#_.pop(),this.#d[u]=e,this.#f[u]=t,this.#u.set(e,u),this.#p[this.#g]=u,this.#m[u]=this.#g,this.#g=u,this.#c++,this.#P(u,l,s),s&&(s.set=`add`),c=!1,this.#E&&this.#r?.(t,e,`add`);else{this.#U(u);let n=this.#f[u];if(t!==n){if(this.#w&&this.#V(n)){n.__abortController.abort(/* @__PURE__ */ Error(`replaced`));let{__staleWhileFetching:t}=n;t!==void 0&&!a&&(this.#C&&this.#n?.(t,e,`set`),this.#T&&this.#v?.push([t,e,`set`]))}else a||(this.#C&&this.#n?.(n,e,`set`),this.#T&&this.#v?.push([n,e,`set`]));if(this.#N(u),this.#P(u,l,s),this.#f[u]=t,s){s.set=`replace`;let e=n&&this.#V(n)?n.__staleWhileFetching:n;e!==void 0&&(s.oldValue=e)}}else s&&(s.set=`update`);this.#E&&this.onInsert?.(t,e,t===n?`update`:`replace`)}if(r!==0&&!this.#x&&this.#D(),this.#x&&(c||this.#A(u,r,i),s&&this.#k(s,u)),!a&&this.#T&&this.#v){let e=this.#v,t;for(;t=e?.shift();)this.#i?.(...t)}return this}pop(){try{for(;this.#c;){let e=this.#f[this.#h];if(this.#z(!0),this.#V(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#T&&this.#v){let e=this.#v,t;for(;t=e?.shift();)this.#i?.(...t)}}}#z(e){let t=this.#h,n=this.#d[t],r=this.#f[t];return this.#w&&this.#V(r)?r.__abortController.abort(/* @__PURE__ */ Error(`evicted`)):(this.#C||this.#T)&&(this.#C&&this.#n?.(r,n,`evict`),this.#T&&this.#v?.push([r,n,`evict`])),this.#N(t),this.#S?.[t]&&(clearTimeout(this.#S[t]),this.#S[t]=void 0),e&&(this.#d[t]=void 0,this.#f[t]=void 0,this.#_.push(t)),this.#c===1?(this.#h=this.#g=0,this.#_.length=0):this.#h=this.#p[t],this.#u.delete(n),this.#c--,t}has(e,t={}){let{updateAgeOnHas:n=this.updateAgeOnHas,status:r}=t,i=this.#u.get(e);if(i!==void 0){let e=this.#f[i];if(this.#V(e)&&e.__staleWhileFetching===void 0)return!1;if(this.#j(i))r&&(r.has=`stale`,this.#k(r,i));else return n&&this.#O(i),r&&(r.has=`hit`,this.#k(r,i)),!0}else r&&(r.has=`miss`);return!1}peek(e,t={}){let{allowStale:n=this.allowStale}=t,r=this.#u.get(e);if(r===void 0||!n&&this.#j(r))return;let i=this.#f[r];return this.#V(i)?i.__staleWhileFetching:i}#B(e,t,n,r){let i=t===void 0?void 0:this.#f[t];if(this.#V(i))return i;let a=new Gt,{signal:o}=n;o?.addEventListener(`abort`,()=>a.abort(o.reason),{signal:a.signal});let s={signal:a.signal,options:n,context:r},c=(r,i=!1)=>{let{aborted:o}=a.signal,c=n.ignoreFetchAbort&&r!==void 0,l=n.ignoreFetchAbort||!!(n.allowStaleOnFetchAbort&&r!==void 0);if(n.status&&(o&&!i?(n.status.fetchAborted=!0,n.status.fetchError=a.signal.reason,c&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),o&&!c&&!i)return u(a.signal.reason,l);let d=f,p=this.#f[t];return(p===f||c&&i&&p===void 0)&&(r===void 0?d.__staleWhileFetching===void 0?this.#W(e,`fetch`):this.#f[t]=d.__staleWhileFetching:(n.status&&(n.status.fetchUpdated=!0),this.set(e,r,s.options))),r},l=e=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=e),u(e,!1)),u=(r,i)=>{let{aborted:o}=a.signal,s=o&&n.allowStaleOnFetchAbort,c=s||n.allowStaleOnFetchRejection,l=c||n.noDeleteOnFetchRejection,u=f;if(this.#f[t]===f&&(!l||!i&&u.__staleWhileFetching===void 0?this.#W(e,`fetch`):s||(this.#f[t]=u.__staleWhileFetching)),c)return n.status&&u.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),u.__staleWhileFetching;if(u.__returned===u)throw r},d=(t,r)=>{let o=this.#a?.(e,i,s);o&&o instanceof Promise&&o.then(e=>t(e===void 0?void 0:e),r),a.signal.addEventListener(`abort`,()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(t(void 0),n.allowStaleOnFetchAbort&&(t=e=>c(e,!0)))})};n.status&&(n.status.fetchDispatched=!0);let f=new Promise(d).then(c,l),p=Object.assign(f,{__abortController:a,__staleWhileFetching:i,__returned:void 0});return t===void 0?(this.set(e,p,{...s.options,status:void 0}),t=this.#u.get(e)):this.#f[t]=p,p}#V(e){if(!this.#w)return!1;let t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty(`__staleWhileFetching`)&&t.__abortController instanceof Gt}async fetch(e,t={}){let{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:s=0,sizeCalculation:c=this.sizeCalculation,noUpdateTTL:l=this.noUpdateTTL,noDeleteOnFetchRejection:u=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:f=this.ignoreFetchAbort,allowStaleOnFetchAbort:p=this.allowStaleOnFetchAbort,context:m,forceRefresh:h=!1,status:g,signal:_}=t;if(!this.#w)return g&&(g.fetch=`get`),this.get(e,{allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:i,status:g});let v={allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:i,ttl:a,noDisposeOnSet:o,size:s,sizeCalculation:c,noUpdateTTL:l,noDeleteOnFetchRejection:u,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:p,ignoreFetchAbort:f,status:g,signal:_},y=this.#u.get(e);if(y===void 0){g&&(g.fetch=`miss`);let t=this.#B(e,y,v,m);return t.__returned=t}{let t=this.#f[y];if(this.#V(t)){let e=n&&t.__staleWhileFetching!==void 0;return g&&(g.fetch=`inflight`,e&&(g.returnedStale=!0)),e?t.__staleWhileFetching:t.__returned=t}let i=this.#j(y);if(!h&&!i)return g&&(g.fetch=`hit`),this.#U(y),r&&this.#O(y),g&&this.#k(g,y),t;let a=this.#B(e,y,v,m),o=a.__staleWhileFetching!==void 0&&n;return g&&(g.fetch=i?`stale`:`refresh`,o&&i&&(g.returnedStale=!0)),o?a.__staleWhileFetching:a.__returned=a}}async forceFetch(e,t={}){let n=await this.fetch(e,t);if(n===void 0)throw Error(`fetch() returned undefined`);return n}memo(e,t={}){let n=this.#o;if(!n)throw Error(`no memoMethod provided to constructor`);let{context:r,forceRefresh:i,...a}=t,o=this.get(e,a);if(!i&&o!==void 0)return o;let s=n(e,o,{options:a,context:r});return this.set(e,s,a),s}get(e,t={}){let{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,status:a}=t,o=this.#u.get(e);if(o!==void 0){let t=this.#f[o],s=this.#V(t);return a&&this.#k(a,o),this.#j(o)?(a&&(a.get=`stale`),s?(a&&n&&t.__staleWhileFetching!==void 0&&(a.returnedStale=!0),n?t.__staleWhileFetching:void 0):(i||this.#W(e,`expire`),a&&n&&(a.returnedStale=!0),n?t:void 0)):(a&&(a.get=`hit`),s?t.__staleWhileFetching:(this.#U(o),r&&this.#O(o),t))}a&&(a.get=`miss`)}#H(e,t){this.#m[t]=e,this.#p[e]=t}#U(e){e!==this.#g&&(e===this.#h?this.#h=this.#p[e]:this.#H(this.#m[e],this.#p[e]),this.#H(this.#g,e),this.#g=e)}delete(e){return this.#W(e,`delete`)}#W(e,t){let n=!1;if(this.#c!==0){let r=this.#u.get(e);if(r!==void 0){if(this.#S?.[r]&&(clearTimeout(this.#S?.[r]),this.#S[r]=void 0),n=!0,this.#c===1)this.#G(t);else{this.#N(r);let n=this.#f[r];if(this.#V(n)?n.__abortController.abort(/* @__PURE__ */ Error(`deleted`)):(this.#C||this.#T)&&(this.#C&&this.#n?.(n,e,t),this.#T&&this.#v?.push([n,e,t])),this.#u.delete(e),this.#d[r]=void 0,this.#f[r]=void 0,r===this.#g)this.#g=this.#m[r];else if(r===this.#h)this.#h=this.#p[r];else{let e=this.#m[r];this.#p[e]=this.#p[r];let t=this.#p[r];this.#m[t]=this.#m[r]}this.#c--,this.#_.push(r)}}}if(this.#T&&this.#v?.length){let e=this.#v,t;for(;t=e?.shift();)this.#i?.(...t)}return n}clear(){return this.#G(`delete`)}#G(e){for(let t of this.#L({allowStale:!0})){let n=this.#f[t];if(this.#V(n))n.__abortController.abort(/* @__PURE__ */ Error(`deleted`));else{let r=this.#d[t];this.#C&&this.#n?.(n,r,e),this.#T&&this.#v?.push([n,r,e])}}if(this.#u.clear(),this.#f.fill(void 0),this.#d.fill(void 0),this.#x&&this.#b){this.#x.fill(0),this.#b.fill(0);for(let e of this.#S??[])e!==void 0&&clearTimeout(e);this.#S?.fill(void 0)}if(this.#y&&this.#y.fill(0),this.#h=0,this.#g=0,this.#_.length=0,this.#l=0,this.#c=0,this.#T&&this.#v){let e=this.#v,t;for(;t=e?.shift();)this.#i?.(...t)}}},$t=typeof M==`object`&&M?M:{stdout:null,stderr:null},en=e=>!!e&&typeof e==`object`&&(e instanceof Bn||e instanceof se||tn(e)||nn(e)),tn=e=>!!e&&typeof e==`object`&&e instanceof oe&&typeof e.pipe==`function`&&e.pipe!==se.Writable.prototype.pipe,nn=e=>!!e&&typeof e==`object`&&e instanceof oe&&typeof e.write==`function`&&typeof e.end==`function`,rn=Symbol(`EOF`),an=Symbol(`maybeEmitEnd`),on=Symbol(`emittedEnd`),sn=Symbol(`emittingEnd`),cn=Symbol(`emittedError`),ln=Symbol(`closed`),un=Symbol(`read`),dn=Symbol(`flush`),fn=Symbol(`flushChunk`),pn=Symbol(`encoding`),mn=Symbol(`decoder`),G=Symbol(`flowing`),hn=Symbol(`paused`),gn=Symbol(`resume`),K=Symbol(`buffer`),_n=Symbol(`pipes`),q=Symbol(`bufferLength`),vn=Symbol(`bufferPush`),yn=Symbol(`bufferShift`),bn=Symbol(`objectMode`),J=Symbol(`destroyed`),xn=Symbol(`error`),Sn=Symbol(`emitData`),Cn=Symbol(`emitEnd`),wn=Symbol(`emitEnd2`),Tn=Symbol(`async`),En=Symbol(`abort`),Dn=Symbol(`aborted`),On=Symbol(`signal`),kn=Symbol(`dataListeners`),An=Symbol(`discarded`),jn=e=>Promise.resolve().then(e),Mn=e=>e(),Nn=e=>e===`end`||e===`finish`||e===`prefinish`,Pn=e=>e instanceof ArrayBuffer||!!e&&typeof e==`object`&&e.constructor&&e.constructor.name===`ArrayBuffer`&&e.byteLength>=0,Fn=e=>!N.isBuffer(e)&&ArrayBuffer.isView(e),In=class{src;dest;opts;ondrain;constructor(e,t,n){this.src=e,this.dest=t,this.opts=n,this.ondrain=()=>e[gn](),this.dest.on(`drain`,this.ondrain)}unpipe(){this.dest.removeListener(`drain`,this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},Ln=class extends In{unpipe(){this.src.removeListener(`error`,this.proxyErrors),super.unpipe()}constructor(e,t,n){super(e,t,n),this.proxyErrors=e=>this.dest.emit(`error`,e),e.on(`error`,this.proxyErrors)}},Rn=e=>!!e.objectMode,zn=e=>!e.objectMode&&!!e.encoding&&e.encoding!==`buffer`,Bn=class extends oe{[G]=!1;[hn]=!1;[_n]=[];[K]=[];[bn];[pn];[Tn];[mn];[rn]=!1;[on]=!1;[sn]=!1;[ln]=!1;[cn]=null;[q]=0;[J]=!1;[On];[Dn]=!1;[kn]=0;[An]=!1;writable=!0;readable=!0;constructor(...e){let t=e[0]||{};if(super(),t.objectMode&&typeof t.encoding==`string`)throw TypeError(`Encoding and objectMode may not be used together`);Rn(t)?(this[bn]=!0,this[pn]=null):zn(t)?(this[pn]=t.encoding,this[bn]=!1):(this[bn]=!1,this[pn]=null),this[Tn]=!!t.async,this[mn]=this[pn]?new ce(this[pn]):null,t&&t.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[K]}),t&&t.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[_n]});let{signal:n}=t;n&&(this[On]=n,n.aborted?this[En]():n.addEventListener(`abort`,()=>this[En]()))}get bufferLength(){return this[q]}get encoding(){return this[pn]}set encoding(e){throw Error(`Encoding must be set at instantiation time`)}setEncoding(e){throw Error(`Encoding must be set at instantiation time`)}get objectMode(){return this[bn]}set objectMode(e){throw Error(`objectMode must be set at instantiation time`)}get async(){return this[Tn]}set async(e){this[Tn]=this[Tn]||!!e}[En](){this[Dn]=!0,this.emit(`abort`,this[On]?.reason),this.destroy(this[On]?.reason)}get aborted(){return this[Dn]}set aborted(e){}write(e,t,n){if(this[Dn])return!1;if(this[rn])throw Error(`write after end`);if(this[J])return this.emit(`error`,Object.assign(/* @__PURE__ */ Error(`Cannot call write after a stream was destroyed`),{code:`ERR_STREAM_DESTROYED`})),!0;typeof t==`function`&&(n=t,t=`utf8`),t||=`utf8`;let r=this[Tn]?jn:Mn;if(!this[bn]&&!N.isBuffer(e)){if(Fn(e))e=N.from(e.buffer,e.byteOffset,e.byteLength);else if(Pn(e))e=N.from(e);else if(typeof e!=`string`)throw Error(`Non-contiguous data written to non-objectMode stream`)}return this[bn]?(this[G]&&this[q]!==0&&this[dn](!0),this[G]?this.emit(`data`,e):this[vn](e),this[q]!==0&&this.emit(`readable`),n&&r(n),this[G]):e.length?(typeof e==`string`&&(t!==this[pn]||this[mn]?.lastNeed)&&(e=N.from(e,t)),N.isBuffer(e)&&this[pn]&&(e=this[mn].write(e)),this[G]&&this[q]!==0&&this[dn](!0),this[G]?this.emit(`data`,e):this[vn](e),this[q]!==0&&this.emit(`readable`),n&&r(n),this[G]):(this[q]!==0&&this.emit(`readable`),n&&r(n),this[G])}read(e){if(this[J])return null;if(this[An]=!1,this[q]===0||e===0||e&&e>this[q])return this[an](),null;this[bn]&&(e=null),this[K].length>1&&!this[bn]&&(this[K]=[this[pn]?this[K].join(``):N.concat(this[K],this[q])]);let t=this[un](e||null,this[K][0]);return this[an](),t}[un](e,t){if(this[bn])this[yn]();else{let n=t;e===n.length||e===null?this[yn]():typeof n==`string`?(this[K][0]=n.slice(e),t=n.slice(0,e),this[q]-=e):(this[K][0]=n.subarray(e),t=n.subarray(0,e),this[q]-=e)}return this.emit(`data`,t),!this[K].length&&!this[rn]&&this.emit(`drain`),t}end(e,t,n){return typeof e==`function`&&(n=e,e=void 0),typeof t==`function`&&(n=t,t=`utf8`),e!==void 0&&this.write(e,t),n&&this.once(`end`,n),this[rn]=!0,this.writable=!1,(this[G]||!this[hn])&&this[an](),this}[gn](){this[J]||(!this[kn]&&!this[_n].length&&(this[An]=!0),this[hn]=!1,this[G]=!0,this.emit(`resume`),this[K].length?this[dn]():this[rn]?this[an]():this.emit(`drain`))}resume(){return this[gn]()}pause(){this[G]=!1,this[hn]=!0,this[An]=!1}get destroyed(){return this[J]}get flowing(){return this[G]}get paused(){return this[hn]}[vn](e){this[bn]?this[q]+=1:this[q]+=e.length,this[K].push(e)}[yn](){return this[bn]?--this[q]:this[q]-=this[K][0].length,this[K].shift()}[dn](e=!1){do;while(this[fn](this[yn]())&&this[K].length);!e&&!this[K].length&&!this[rn]&&this.emit(`drain`)}[fn](e){return this.emit(`data`,e),this[G]}pipe(e,t){if(this[J])return e;this[An]=!1;let n=this[on];return t||={},e===$t.stdout||e===$t.stderr?t.end=!1:t.end=t.end!==!1,t.proxyErrors=!!t.proxyErrors,n?t.end&&e.end():(this[_n].push(t.proxyErrors?new Ln(this,e,t):new In(this,e,t)),this[Tn]?jn(()=>this[gn]()):this[gn]()),e}unpipe(e){let t=this[_n].find(t=>t.dest===e);t&&(this[_n].length===1?(this[G]&&this[kn]===0&&(this[G]=!1),this[_n]=[]):this[_n].splice(this[_n].indexOf(t),1),t.unpipe())}addListener(e,t){return this.on(e,t)}on(e,t){let n=super.on(e,t);if(e===`data`)this[An]=!1,this[kn]++,!this[_n].length&&!this[G]&&this[gn]();else if(e===`readable`&&this[q]!==0)super.emit(`readable`);else if(Nn(e)&&this[on])super.emit(e),this.removeAllListeners(e);else if(e===`error`&&this[cn]){let e=t;this[Tn]?jn(()=>e.call(this,this[cn])):e.call(this,this[cn])}return n}removeListener(e,t){return this.off(e,t)}off(e,t){let n=super.off(e,t);return e===`data`&&(this[kn]=this.listeners(`data`).length,this[kn]===0&&!this[An]&&!this[_n].length&&(this[G]=!1)),n}removeAllListeners(e){let t=super.removeAllListeners(e);return(e===`data`||e===void 0)&&(this[kn]=0,!this[An]&&!this[_n].length&&(this[G]=!1)),t}get emittedEnd(){return this[on]}[an](){!this[sn]&&!this[on]&&!this[J]&&this[K].length===0&&this[rn]&&(this[sn]=!0,this.emit(`end`),this.emit(`prefinish`),this.emit(`finish`),this[ln]&&this.emit(`close`),this[sn]=!1)}emit(e,...t){let n=t[0];if(e!==`error`&&e!==`close`&&e!==J&&this[J])return!1;if(e===`data`)return!this[bn]&&!n?!1:this[Tn]?(jn(()=>this[Sn](n)),!0):this[Sn](n);if(e===`end`)return this[Cn]();if(e===`close`){if(this[ln]=!0,!this[on]&&!this[J])return!1;let e=super.emit(`close`);return this.removeAllListeners(`close`),e}if(e===`error`){this[cn]=n,super.emit(xn,n);let e=!this[On]||this.listeners(`error`).length?super.emit(`error`,n):!1;return this[an](),e}if(e===`resume`){let e=super.emit(`resume`);return this[an](),e}if(e===`finish`||e===`prefinish`){let t=super.emit(e);return this.removeAllListeners(e),t}let r=super.emit(e,...t);return this[an](),r}[Sn](e){for(let t of this[_n])t.dest.write(e)===!1&&this.pause();let t=!this[An]&&super.emit(`data`,e);return this[an](),t}[Cn](){return!this[on]&&(this[on]=!0,this.readable=!1,this[Tn]?(jn(()=>this[wn]()),!0):this[wn]())}[wn](){if(this[mn]){let e=this[mn].end();if(e){for(let t of this[_n])t.dest.write(e);this[An]||super.emit(`data`,e)}}for(let e of this[_n])e.end();let e=super.emit(`end`);return this.removeAllListeners(`end`),e}async collect(){let e=Object.assign([],{dataLength:0});this[bn]||(e.dataLength=0);let t=this.promise();return this.on(`data`,t=>{e.push(t),this[bn]||(e.dataLength+=t.length)}),await t,e}async concat(){if(this[bn])throw Error(`cannot concat in objectMode`);let e=await this.collect();return this[pn]?e.join(``):N.concat(e,e.dataLength)}async promise(){return new Promise((e,t)=>{this.on(J,()=>t(/* @__PURE__ */ Error(`stream destroyed`))),this.on(`error`,e=>t(e)),this.on(`end`,()=>e())})}[Symbol.asyncIterator](){this[An]=!1;let e=!1,t=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return t();let n=this.read();if(n!==null)return Promise.resolve({done:!1,value:n});if(this[rn])return t();let r,i,a=e=>{this.off(`data`,o),this.off(`end`,s),this.off(J,c),t(),i(e)},o=e=>{this.off(`error`,a),this.off(`end`,s),this.off(J,c),this.pause(),r({value:e,done:!!this[rn]})},s=()=>{this.off(`error`,a),this.off(`data`,o),this.off(J,c),t(),r({done:!0,value:void 0})},c=()=>a(/* @__PURE__ */ Error(`stream destroyed`));return new Promise((e,t)=>{i=t,r=e,this.once(J,c),this.once(`error`,a),this.once(`end`,s),this.once(`data`,o)})},throw:t,return:t,[Symbol.asyncIterator](){return this},[Symbol.asyncDispose]:async()=>{}}}[Symbol.iterator](){this[An]=!1;let e=!1,t=()=>(this.pause(),this.off(xn,t),this.off(J,t),this.off(`end`,t),e=!0,{done:!0,value:void 0});return this.once(`end`,t),this.once(xn,t),this.once(J,t),{next:()=>{if(e)return t();let n=this.read();return n===null?t():{done:!1,value:n}},throw:t,return:t,[Symbol.iterator](){return this},[Symbol.dispose]:()=>{}}}destroy(e){if(this[J])return e?this.emit(`error`,e):this.emit(J),this;this[J]=!0,this[An]=!0,this[K].length=0,this[q]=0;let t=this;return typeof t.close==`function`&&!this[ln]&&t.close(),e?this.emit(`error`,e):this.emit(J),this}static get isStream(){return en}},Vn=B.native,Hn={lstatSync:F,readdir:L,readdirSync:R,readlinkSync:z,realpathSync:Vn,promises:{lstat:E,readdir:ee,readlink:te,realpath:ne}},Un=e=>!e||e===Hn||e===f?Hn:{...Hn,...e,promises:{...Hn.promises,...e.promises||{}}},Wn=/^\\\\\?\\([a-z]:)\\?$/i,Gn=e=>e.replace(/\//g,`\\`).replace(Wn,`$1\\`),Kn=/[\\\/]/,qn=0,Jn=1,Yn=2,Xn=4,Zn=6,Qn=8,$n=10,er=12,tr=15,nr=~tr,rr=16,ir=32,ar=64,or=128,sr=256,cr=512,lr=ar|or|cr,ur=1023,dr=e=>e.isFile()?Qn:e.isDirectory()?Xn:e.isSymbolicLink()?$n:e.isCharacterDevice()?Yn:e.isBlockDevice()?Zn:e.isSocket()?er:e.isFIFO()?Jn:qn,fr=new Qt({max:4096}),pr=e=>{let t=fr.get(e);if(t)return t;let n=e.normalize(`NFKD`);return fr.set(e,n),n},mr=new Qt({max:4096}),hr=e=>{let t=mr.get(e);if(t)return t;let n=pr(e.toLowerCase());return mr.set(e,n),n},gr=class extends Qt{constructor(){super({max:256})}},_r=class extends Qt{constructor(e=16384){super({maxSize:e,sizeCalculation:e=>e.length+1})}},vr=Symbol(`PathScurry setAsCwd`),yr=class{name;root;roots;parent;nocase;isCWD=!1;#e;#t;get dev(){return this.#t}#n;get mode(){return this.#n}#r;get nlink(){return this.#r}#i;get uid(){return this.#i}#a;get gid(){return this.#a}#o;get rdev(){return this.#o}#s;get blksize(){return this.#s}#c;get ino(){return this.#c}#l;get size(){return this.#l}#u;get blocks(){return this.#u}#d;get atimeMs(){return this.#d}#f;get mtimeMs(){return this.#f}#p;get ctimeMs(){return this.#p}#m;get birthtimeMs(){return this.#m}#h;get atime(){return this.#h}#g;get mtime(){return this.#g}#_;get ctime(){return this.#_}#v;get birthtime(){return this.#v}#y;#b;#x;#S;#C;#w;#T;#E;#D;#O;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(e,t=qn,n,r,i,a,o){this.name=e,this.#y=i?hr(e):pr(e),this.#T=t&ur,this.nocase=i,this.roots=r,this.root=n||this,this.#E=a,this.#x=o.fullpath,this.#C=o.relative,this.#w=o.relativePosix,this.parent=o.parent,this.#e=this.parent?this.parent.#e:Un(o.fs)}depth(){return this.#b===void 0?this.#b=this.parent?this.parent.depth()+1:0:this.#b}childrenCache(){return this.#E}resolve(e){if(!e)return this;let t=this.getRootString(e),n=e.substring(t.length).split(this.splitSep);return t?this.getRoot(t).#k(n):this.#k(n)}#k(e){let t=this;for(let n of e)t=t.child(n);return t}children(){let e=this.#E.get(this);if(e)return e;let t=Object.assign([],{provisional:0});return this.#E.set(this,t),this.#T&=~rr,t}child(e,t){if(e===``||e===`.`)return this;if(e===`..`)return this.parent||this;let n=this.children(),r=this.nocase?hr(e):pr(e);for(let e of n)if(e.#y===r)return e;let i=this.parent?this.sep:``,a=this.#x?this.#x+i+e:void 0,o=this.newChild(e,qn,{...t,parent:this,fullpath:a});return this.canReaddir()||(o.#T|=or),n.push(o),o}relative(){if(this.isCWD)return``;if(this.#C!==void 0)return this.#C;let e=this.name,t=this.parent;if(!t)return this.#C=this.name;let n=t.relative();return n+(!n||!t.parent?``:this.sep)+e}relativePosix(){if(this.sep===`/`)return this.relative();if(this.isCWD)return``;if(this.#w!==void 0)return this.#w;let e=this.name,t=this.parent;if(!t)return this.#w=this.fullpathPosix();let n=t.relativePosix();return n+(!n||!t.parent?``:`/`)+e}fullpath(){if(this.#x!==void 0)return this.#x;let e=this.name,t=this.parent;if(!t)return this.#x=this.name;let n=t.fullpath()+(t.parent?this.sep:``)+e;return this.#x=n}fullpathPosix(){if(this.#S!==void 0)return this.#S;if(this.sep===`/`)return this.#S=this.fullpath();if(!this.parent){let e=this.fullpath().replace(/\\/g,`/`);return this.#S=/^[a-z]:\//i.test(e)?`//?/${e}`:e}let e=this.parent,t=e.fullpathPosix(),n=t+(!t||!e.parent?``:`/`)+this.name;return this.#S=n}isUnknown(){return(this.#T&tr)===qn}isType(e){return this[`is${e}`]()}getType(){return this.isUnknown()?`Unknown`:this.isDirectory()?`Directory`:this.isFile()?`File`:this.isSymbolicLink()?`SymbolicLink`:this.isFIFO()?`FIFO`:this.isCharacterDevice()?`CharacterDevice`:this.isBlockDevice()?`BlockDevice`:this.isSocket()?`Socket`:`Unknown`}isFile(){return(this.#T&tr)===Qn}isDirectory(){return(this.#T&tr)===Xn}isCharacterDevice(){return(this.#T&tr)===Yn}isBlockDevice(){return(this.#T&tr)===Zn}isFIFO(){return(this.#T&tr)===Jn}isSocket(){return(this.#T&tr)===er}isSymbolicLink(){return(this.#T&$n)===$n}lstatCached(){return this.#T&ir?this:void 0}readlinkCached(){return this.#D}realpathCached(){return this.#O}readdirCached(){let e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#D)return!0;if(!this.parent)return!1;let e=this.#T&tr;return!(e!==qn&&e!==$n||this.#T&sr||this.#T&or)}calledReaddir(){return!!(this.#T&rr)}isENOENT(){return!!(this.#T&or)}isNamed(e){return this.nocase?this.#y===hr(e):this.#y===pr(e)}async readlink(){let e=this.#D;if(e)return e;if(this.canReadlink()&&this.parent)try{let e=await this.#e.promises.readlink(this.fullpath()),t=(await this.parent.realpath())?.resolve(e);if(t)return this.#D=t}catch(e){this.#L(e.code);return}}readlinkSync(){let e=this.#D;if(e)return e;if(this.canReadlink()&&this.parent)try{let e=this.#e.readlinkSync(this.fullpath()),t=this.parent.realpathSync()?.resolve(e);if(t)return this.#D=t}catch(e){this.#L(e.code);return}}#A(e){this.#T|=rr;for(let t=e.provisional;t<e.length;t++){let n=e[t];n&&n.#j()}}#j(){this.#T&or||(this.#T=(this.#T|or)&nr,this.#M())}#M(){let e=this.children();e.provisional=0;for(let t of e)t.#j()}#N(){this.#T|=cr,this.#P()}#P(){if(this.#T&ar)return;let e=this.#T;(e&tr)===Xn&&(e&=nr),this.#T=e|ar,this.#M()}#F(e=``){e===`ENOTDIR`||e===`EPERM`?this.#P():e===`ENOENT`?this.#j():this.children().provisional=0}#I(e=``){e===`ENOTDIR`?this.parent.#P():e===`ENOENT`&&this.#j()}#L(e=``){let t=this.#T;t|=sr,e===`ENOENT`&&(t|=or),(e===`EINVAL`||e===`UNKNOWN`)&&(t&=nr),this.#T=t,e===`ENOTDIR`&&this.parent&&this.parent.#P()}#R(e,t){return this.#B(e,t)||this.#z(e,t)}#z(e,t){let n=dr(e),r=this.newChild(e.name,n,{parent:this}),i=r.#T&tr;return i!==Xn&&i!==$n&&i!==qn&&(r.#T|=ar),t.unshift(r),t.provisional++,r}#B(e,t){for(let n=t.provisional;n<t.length;n++){let r=t[n];if((this.nocase?hr(e.name):pr(e.name))===r.#y)return this.#V(e,r,n,t)}}#V(e,t,n,r){let i=t.name;return t.#T=t.#T&nr|dr(e),i!==e.name&&(t.name=e.name),n!==r.provisional&&(n===r.length-1?r.pop():r.splice(n,1),r.unshift(t)),r.provisional++,t}async lstat(){if((this.#T&or)===0)try{return this.#H(await this.#e.promises.lstat(this.fullpath())),this}catch(e){this.#I(e.code)}}lstatSync(){if((this.#T&or)===0)try{return this.#H(this.#e.lstatSync(this.fullpath())),this}catch(e){this.#I(e.code)}}#H(e){let{atime:t,atimeMs:n,birthtime:r,birthtimeMs:i,blksize:a,blocks:o,ctime:s,ctimeMs:c,dev:l,gid:u,ino:d,mode:f,mtime:p,mtimeMs:m,nlink:h,rdev:g,size:_,uid:v}=e;this.#h=t,this.#d=n,this.#v=r,this.#m=i,this.#s=a,this.#u=o,this.#_=s,this.#p=c,this.#t=l,this.#a=u,this.#c=d,this.#n=f,this.#g=p,this.#f=m,this.#r=h,this.#o=g,this.#l=_,this.#i=v;let y=dr(e);this.#T=this.#T&nr|y|ir,y!==qn&&y!==Xn&&y!==$n&&(this.#T|=ar)}#U=[];#W=!1;#G(e){this.#W=!1;let t=this.#U.slice();this.#U.length=0,t.forEach(t=>t(null,e))}readdirCB(e,t=!1){if(!this.canReaddir()){t?e(null,[]):queueMicrotask(()=>e(null,[]));return}let n=this.children();if(this.calledReaddir()){let r=n.slice(0,n.provisional);t?e(null,r):queueMicrotask(()=>e(null,r));return}if(this.#U.push(e),this.#W)return;this.#W=!0;let r=this.fullpath();this.#e.readdir(r,{withFileTypes:!0},(e,t)=>{if(e)this.#F(e.code),n.provisional=0;else{for(let e of t)this.#R(e,n);this.#A(n)}this.#G(n.slice(0,n.provisional))})}#K;async readdir(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();if(this.#K)await this.#K;else{let n=()=>{};this.#K=new Promise(e=>n=e);try{for(let n of await this.#e.promises.readdir(t,{withFileTypes:!0}))this.#R(n,e);this.#A(e)}catch(t){this.#F(t.code),e.provisional=0}this.#K=void 0,n()}return e.slice(0,e.provisional)}readdirSync(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();try{for(let n of this.#e.readdirSync(t,{withFileTypes:!0}))this.#R(n,e);this.#A(e)}catch(t){this.#F(t.code),e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#T&lr)return!1;let e=tr&this.#T;return e===qn||e===Xn||e===$n}shouldWalk(e,t){return(this.#T&Xn)===Xn&&!(this.#T&lr)&&!e.has(this)&&(!t||t(this))}async realpath(){if(this.#O)return this.#O;if(!((cr|sr|or)&this.#T))try{let e=await this.#e.promises.realpath(this.fullpath());return this.#O=this.resolve(e)}catch{this.#N()}}realpathSync(){if(this.#O)return this.#O;if(!((cr|sr|or)&this.#T))try{let e=this.#e.realpathSync(this.fullpath());return this.#O=this.resolve(e)}catch{this.#N()}}[vr](e){if(e===this)return;e.isCWD=!1,this.isCWD=!0;let t=/* @__PURE__ */ new Set([]),n=[],r=this;for(;r&&r.parent;)t.add(r),r.#C=n.join(this.sep),r.#w=n.join(`/`),r=r.parent,n.push(`..`);for(r=e;r&&r.parent&&!t.has(r);)r.#C=void 0,r.#w=void 0,r=r.parent}},br=class e extends yr{sep=`\\`;splitSep=Kn;constructor(e,t=qn,n,r,i,a,o){super(e,t,n,r,i,a,o)}newChild(t,n=qn,r={}){return new e(t,n,this.root,this.roots,this.nocase,this.childrenCache(),r)}getRootString(e){return _.parse(e).root}getRoot(e){if(e=Gn(e.toUpperCase()),e===this.root.name)return this.root;for(let[t,n]of Object.entries(this.roots))if(this.sameRoot(e,t))return this.roots[e]=n;return this.roots[e]=new Cr(e,this).root}sameRoot(e,t=this.root.name){return e=e.toUpperCase().replace(/\//g,`\\`).replace(Wn,`$1\\`),e===t}},xr=class e extends yr{splitSep=`/`;sep=`/`;constructor(e,t=qn,n,r,i,a,o){super(e,t,n,r,i,a,o)}getRootString(e){return e.startsWith(`/`)?`/`:``}getRoot(e){return this.root}newChild(t,n=qn,r={}){return new e(t,n,this.root,this.roots,this.nocase,this.childrenCache(),r)}},Sr=class{root;rootPath;roots;cwd;#e;#t;#n;nocase;#r;constructor(e=M.cwd(),t,n,{nocase:r,childrenCacheSize:i=16384,fs:a=Hn}={}){this.#r=Un(a),(e instanceof URL||e.startsWith(`file://`))&&(e=v(e));let o=t.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(o),this.#e=new gr,this.#t=new gr,this.#n=new _r(i);let s=o.substring(this.rootPath.length).split(n);if(s.length===1&&!s[0]&&s.pop(),r===void 0)throw TypeError(`must provide nocase setting to PathScurryBase ctor`);this.nocase=r,this.root=this.newRoot(this.#r),this.roots[this.rootPath]=this.root;let c=this.root,l=s.length-1,u=t.sep,d=this.rootPath,f=!1;for(let e of s){let t=l--;c=c.child(e,{relative:Array(t).fill(`..`).join(u),relativePosix:Array(t).fill(`..`).join(`/`),fullpath:d+=(f?``:u)+e}),f=!0}this.cwd=c}depth(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),e.depth()}childrenCache(){return this.#n}resolve(...e){let t=``;for(let n=e.length-1;n>=0;n--){let r=e[n];if(r&&r!==`.`&&(t=t?`${r}/${t}`:r,this.isAbsolute(r)))break}let n=this.#e.get(t);if(n!==void 0)return n;let r=this.cwd.resolve(t).fullpath();return this.#e.set(t,r),r}resolvePosix(...e){let t=``;for(let n=e.length-1;n>=0;n--){let r=e[n];if(r&&r!==`.`&&(t=t?`${r}/${t}`:r,this.isAbsolute(r)))break}let n=this.#t.get(t);if(n!==void 0)return n;let r=this.cwd.resolve(t).fullpathPosix();return this.#t.set(t,r),r}relative(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),e.relative()}relativePosix(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),e.relativePosix()}basename(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),e.name}dirname(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),(e.parent||e).fullpath()}async readdir(e=this.cwd,t={withFileTypes:!0}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof yr||(t=e,e=this.cwd);let{withFileTypes:n}=t;if(e.canReaddir()){let t=await e.readdir();return n?t:t.map(e=>e.name)}return[]}readdirSync(e=this.cwd,t={withFileTypes:!0}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof yr||(t=e,e=this.cwd);let{withFileTypes:n=!0}=t;return e.canReaddir()?n?e.readdirSync():e.readdirSync().map(e=>e.name):[]}async lstat(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),e.lstat()}lstatSync(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),e.lstatSync()}async readlink(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof yr||(t=e.withFileTypes,e=this.cwd);let n=await e.readlink();return t?n:n?.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof yr||(t=e.withFileTypes,e=this.cwd);let n=e.readlinkSync();return t?n:n?.fullpath()}async realpath(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof yr||(t=e.withFileTypes,e=this.cwd);let n=await e.realpath();return t?n:n?.fullpath()}realpathSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof yr||(t=e.withFileTypes,e=this.cwd);let n=e.realpathSync();return t?n:n?.fullpath()}async walk(e=this.cwd,t={}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof yr||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:i,walkFilter:a}=t,o=[];(!i||i(e))&&o.push(n?e:e.fullpath());let s=/* @__PURE__ */ new Set,c=(e,t)=>{s.add(e),e.readdirCB((e,l)=>{if(e)return t(e);let u=l.length;if(!u)return t();let d=()=>{--u===0&&t()};for(let e of l)(!i||i(e))&&o.push(n?e:e.fullpath()),r&&e.isSymbolicLink()?e.realpath().then(e=>e?.isUnknown()?e.lstat():e).then(e=>e?.shouldWalk(s,a)?c(e,d):d()):e.shouldWalk(s,a)?c(e,d):d()},!0)},l=e;return new Promise((e,t)=>{c(l,n=>{if(n)return t(n);e(o)})})}walkSync(e=this.cwd,t={}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof yr||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:i,walkFilter:a}=t,o=[];(!i||i(e))&&o.push(n?e:e.fullpath());let s=/* @__PURE__ */ new Set([e]);for(let e of s){let t=e.readdirSync();for(let e of t){(!i||i(e))&&o.push(n?e:e.fullpath());let t=e;if(e.isSymbolicLink()){if(!(r&&(t=e.realpathSync())))continue;t.isUnknown()&&t.lstatSync()}t.shouldWalk(s,a)&&s.add(t)}}return o}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,t={}){return typeof e==`string`?e=this.cwd.resolve(e):e instanceof yr||(t=e,e=this.cwd),this.stream(e,t)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(e=this.cwd,t={}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof yr||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:i,walkFilter:a}=t;(!i||i(e))&&(yield n?e:e.fullpath());let o=/* @__PURE__ */ new Set([e]);for(let e of o){let t=e.readdirSync();for(let e of t){(!i||i(e))&&(yield n?e:e.fullpath());let t=e;if(e.isSymbolicLink()){if(!(r&&(t=e.realpathSync())))continue;t.isUnknown()&&t.lstatSync()}t.shouldWalk(o,a)&&o.add(t)}}}stream(e=this.cwd,t={}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof yr||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:i,walkFilter:a}=t,o=new Bn({objectMode:!0});(!i||i(e))&&o.write(n?e:e.fullpath());let s=/* @__PURE__ */ new Set,c=[e],l=0,u=()=>{let e=!1;for(;!e;){let t=c.shift();if(!t){l===0&&o.end();return}l++,s.add(t);let d=(t,p,m=!1)=>{if(t)return o.emit(`error`,t);if(r&&!m){let e=[];for(let t of p)t.isSymbolicLink()&&e.push(t.realpath().then(e=>e?.isUnknown()?e.lstat():e));if(e.length){Promise.all(e).then(()=>d(null,p,!0));return}}for(let t of p)t&&(!i||i(t))&&(o.write(n?t:t.fullpath())||(e=!0));l--;for(let e of p){let t=e.realpathCached()||e;t.shouldWalk(s,a)&&c.push(t)}e&&!o.flowing?o.once(`drain`,u):f||u()},f=!0;t.readdirCB(d,!0),f=!1}};return u(),o}streamSync(e=this.cwd,t={}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof yr||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:i,walkFilter:a}=t,o=new Bn({objectMode:!0}),s=/* @__PURE__ */ new Set;(!i||i(e))&&o.write(n?e:e.fullpath());let c=[e],l=0,u=()=>{let e=!1;for(;!e;){let t=c.shift();if(!t){l===0&&o.end();return}l++,s.add(t);let u=t.readdirSync();for(let t of u)(!i||i(t))&&(o.write(n?t:t.fullpath())||(e=!0));l--;for(let e of u){let t=e;if(e.isSymbolicLink()){if(!(r&&(t=e.realpathSync())))continue;t.isUnknown()&&t.lstatSync()}t.shouldWalk(s,a)&&c.push(t)}}e&&!o.flowing&&o.once(`drain`,u)};return u(),o}chdir(e=this.cwd){let t=this.cwd;this.cwd=typeof e==`string`?this.cwd.resolve(e):e,this.cwd[vr](t)}},Cr=class extends Sr{sep=`\\`;constructor(e=M.cwd(),t={}){let{nocase:n=!0}=t;super(e,_,`\\`,{...t,nocase:n}),this.nocase=n;for(let e=this.cwd;e;e=e.parent)e.nocase=this.nocase}parseRootPath(e){return _.parse(e).root.toUpperCase()}newRoot(e){return new br(this.rootPath,Xn,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith(`/`)||e.startsWith(`\\`)||/^[a-z]:(\/|\\)/i.test(e)}},wr=class extends Sr{sep=`/`;constructor(e=M.cwd(),t={}){let{nocase:n=!1}=t;super(e,h,`/`,{...t,nocase:n}),this.nocase=n}parseRootPath(e){return`/`}newRoot(e){return new xr(this.rootPath,Xn,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith(`/`)}},Tr=class extends wr{constructor(e=M.cwd(),t={}){let{nocase:n=!0}=t;super(e,{...t,nocase:n})}};M.platform;var Er=M.platform===`win32`?Cr:M.platform===`darwin`?Tr:wr,Dr=e=>e.length>=1,Or=e=>e.length>=1,kr=Symbol.for(`nodejs.util.inspect.custom`),Ar=class e{#e;#t;#n;length;#r;#i;#a;#o;#s;#c;#l=!0;constructor(e,t,n,r){if(!Dr(e))throw TypeError(`empty pattern list`);if(!Or(t))throw TypeError(`empty glob list`);if(t.length!==e.length)throw TypeError(`mismatched pattern list and glob list lengths`);if(this.length=e.length,n<0||n>=this.length)throw TypeError(`index out of range`);if(this.#e=e,this.#t=t,this.#n=n,this.#r=r,this.#n===0){if(this.isUNC()){let[e,t,n,r,...i]=this.#e,[a,o,s,c,...l]=this.#t;i[0]===``&&(i.shift(),l.shift());let u=[e,t,n,r,``].join(`/`),d=[a,o,s,c,``].join(`/`);this.#e=[u,...i],this.#t=[d,...l],this.length=this.#e.length}else if(this.isDrive()||this.isAbsolute()){let[e,...t]=this.#e,[n,...r]=this.#t;t[0]===``&&(t.shift(),r.shift());let i=e+`/`,a=n+`/`;this.#e=[i,...t],this.#t=[a,...r],this.length=this.#e.length}}}[kr](){return`Pattern <`+this.#t.slice(this.#n).join(`/`)+`>`}pattern(){return this.#e[this.#n]}isString(){return typeof this.#e[this.#n]==`string`}isGlobstar(){return this.#e[this.#n]===Mt}isRegExp(){return this.#e[this.#n]instanceof RegExp}globString(){return this.#a=this.#a||(this.#n===0?this.isAbsolute()?this.#t[0]+this.#t.slice(1).join(`/`):this.#t.join(`/`):this.#t.slice(this.#n).join(`/`))}hasMore(){return this.length>this.#n+1}rest(){return this.#i===void 0?this.hasMore()?(this.#i=new e(this.#e,this.#t,this.#n+1,this.#r),this.#i.#c=this.#c,this.#i.#s=this.#s,this.#i.#o=this.#o,this.#i):this.#i=null:this.#i}isUNC(){let e=this.#e;return this.#s===void 0?this.#s=this.#r===`win32`&&this.#n===0&&e[0]===``&&e[1]===``&&typeof e[2]==`string`&&!!e[2]&&typeof e[3]==`string`&&!!e[3]:this.#s}isDrive(){let e=this.#e;return this.#o===void 0?this.#o=this.#r===`win32`&&this.#n===0&&this.length>1&&typeof e[0]==`string`&&/^[a-z]:$/i.test(e[0]):this.#o}isAbsolute(){let e=this.#e;return this.#c===void 0?this.#c=e[0]===``&&e.length>1||this.isDrive()||this.isUNC():this.#c}root(){let e=this.#e[0];return typeof e==`string`&&this.isAbsolute()&&this.#n===0?e:``}checkFollowGlobstar(){return!(this.#n===0||!this.isGlobstar()||!this.#l)}markFollowGlobstar(){return this.#n===0||!this.isGlobstar()||!this.#l?!1:(this.#l=!1,!0)}},jr=typeof M==`object`&&M&&typeof M.platform==`string`?M.platform:`linux`,Mr=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(e,{nobrace:t,nocase:n,noext:r,noglobstar:i,platform:a=jr}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=a,this.mmopts={dot:!0,nobrace:t,nocase:n,noext:r,noglobstar:i,optimizationLevel:2,platform:a,nocomment:!0,nonegate:!0};for(let t of e)this.add(t)}add(e){let t=new Bt(e,this.mmopts);for(let e=0;e<t.set.length;e++){let n=t.set[e],r=t.globParts[e];if(!n||!r)throw Error(`invalid pattern object`);for(;n[0]===`.`&&r[0]===`.`;)n.shift(),r.shift();let i=new Ar(n,r,0,this.platform),a=new Bt(i.globString(),this.mmopts),o=r[r.length-1]===`**`,s=i.isAbsolute();s?this.absolute.push(a):this.relative.push(a),o&&(s?this.absoluteChildren.push(a):this.relativeChildren.push(a))}}ignored(e){let t=e.fullpath(),n=`${t}/`,r=e.relative()||`.`,i=`${r}/`;for(let e of this.relative)if(e.match(r)||e.match(i))return!0;for(let e of this.absolute)if(e.match(t)||e.match(n))return!0;return!1}childrenIgnored(e){let t=e.fullpath()+`/`,n=(e.relative()||`.`)+`/`;for(let e of this.relativeChildren)if(e.match(n))return!0;for(let e of this.absoluteChildren)if(e.match(t))return!0;return!1}},Nr=class e{store;constructor(e=/* @__PURE__ */ new Map){this.store=e}copy(){return new e(new Map(this.store))}hasWalked(e,t){return this.store.get(e.fullpath())?.has(t.globString())}storeWalked(e,t){let n=e.fullpath(),r=this.store.get(n);r?r.add(t.globString()):this.store.set(n,/* @__PURE__ */ new Set([t.globString()]))}},Pr=class{store=/* @__PURE__ */ new Map;add(e,t,n){let r=(t?2:0)|!!n,i=this.store.get(e);this.store.set(e,i===void 0?r:r&i)}entries(){return[...this.store.entries()].map(([e,t])=>[e,!!(t&2),!!(t&1)])}},Fr=class{store=/* @__PURE__ */ new Map;add(e,t){if(!e.canReaddir())return;let n=this.store.get(e);n?n.find(e=>e.globString()===t.globString())||n.push(t):this.store.set(e,[t])}get(e){let t=this.store.get(e);if(!t)throw Error(`attempting to walk unknown path`);return t}entries(){return this.keys().map(e=>[e,this.store.get(e)])}keys(){return[...this.store.keys()].filter(e=>e.canReaddir())}},Ir=class e{hasWalkedCache;matches=new Pr;subwalks=new Fr;patterns;follow;dot;opts;constructor(e,t){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=t?t.copy():new Nr}processPatterns(e,t){this.patterns=t;let n=t.map(t=>[e,t]);for(let[e,t]of n){this.hasWalkedCache.storeWalked(e,t);let n=t.root(),r=t.isAbsolute()&&this.opts.absolute!==!1;if(n){e=e.resolve(n===`/`&&this.opts.root!==void 0?this.opts.root:n);let r=t.rest();if(r)t=r;else{this.matches.add(e,!0,!1);continue}}if(e.isENOENT())continue;let i,a,o=!1;for(;typeof(i=t.pattern())==`string`&&(a=t.rest());)e=e.resolve(i),t=a,o=!0;if(i=t.pattern(),a=t.rest(),o){if(this.hasWalkedCache.hasWalked(e,t))continue;this.hasWalkedCache.storeWalked(e,t)}if(typeof i==`string`){let t=i===`..`||i===``||i===`.`;this.matches.add(e.resolve(i),r,t)}else if(i===Mt){(!e.isSymbolicLink()||this.follow||t.checkFollowGlobstar())&&this.subwalks.add(e,t);let n=a?.pattern(),i=a?.rest();if(!a||(n===``||n===`.`)&&!i)this.matches.add(e,r,n===``||n===`.`);else if(n===`..`){let t=e.parent||e;i?this.hasWalkedCache.hasWalked(t,i)||this.subwalks.add(t,i):this.matches.add(t,r,!0)}}else i instanceof RegExp&&this.subwalks.add(e,t)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new e(this.opts,this.hasWalkedCache)}filterEntries(e,t){let n=this.subwalks.get(e),r=this.child();for(let e of t)for(let t of n){let n=t.isAbsolute(),i=t.pattern(),a=t.rest();i===Mt?r.testGlobstar(e,t,a,n):i instanceof RegExp?r.testRegExp(e,i,a,n):r.testString(e,i,a,n)}return r}testGlobstar(e,t,n,r){if((this.dot||!e.name.startsWith(`.`))&&(t.hasMore()||this.matches.add(e,r,!1),e.canReaddir()&&(this.follow||!e.isSymbolicLink()?this.subwalks.add(e,t):e.isSymbolicLink()&&(n&&t.checkFollowGlobstar()?this.subwalks.add(e,n):t.markFollowGlobstar()&&this.subwalks.add(e,t)))),n){let t=n.pattern();if(typeof t==`string`&&t!==`..`&&t!==``&&t!==`.`)this.testString(e,t,n.rest(),r);else if(t===`..`){let t=e.parent||e;this.subwalks.add(t,n)}else t instanceof RegExp&&this.testRegExp(e,t,n.rest(),r)}}testRegExp(e,t,n,r){t.test(e.name)&&(n?this.subwalks.add(e,n):this.matches.add(e,r,!1))}testString(e,t,n,r){e.isNamed(t)&&(n?this.subwalks.add(e,n):this.matches.add(e,r,!1))}},Lr=(e,t)=>typeof e==`string`?new Mr([e],t):Array.isArray(e)?new Mr(e,t):e,Rr=class{path;patterns;opts;seen=/* @__PURE__ */ new Set;paused=!1;aborted=!1;#e=[];#t;#n;signal;maxDepth;includeChildMatches;constructor(e,t,n){if(this.patterns=e,this.path=t,this.opts=n,this.#n=!n.posix&&n.platform===`win32`?`\\`:`/`,this.includeChildMatches=n.includeChildMatches!==!1,(n.ignore||!this.includeChildMatches)&&(this.#t=Lr(n.ignore??[],n),!this.includeChildMatches&&typeof this.#t.add!=`function`))throw Error(`cannot ignore child matches, ignore lacks add() method.`);this.maxDepth=n.maxDepth||1/0,n.signal&&(this.signal=n.signal,this.signal.addEventListener(`abort`,()=>{this.#e.length=0}))}#r(e){return this.seen.has(e)||!!this.#t?.ignored?.(e)}#i(e){return!!this.#t?.childrenIgnored?.(e)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let e;for(;!this.paused&&(e=this.#e.shift());)e()}onResume(e){this.signal?.aborted||(this.paused?this.#e.push(e):e())}async matchCheck(e,t){if(t&&this.opts.nodir)return;let n;if(this.opts.realpath){if(n=e.realpathCached()||await e.realpath(),!n)return;e=n}let r=e.isUnknown()||this.opts.stat?await e.lstat():e;if(this.opts.follow&&this.opts.nodir&&r?.isSymbolicLink()){let e=await r.realpath();e&&(e.isUnknown()||this.opts.stat)&&await e.lstat()}return this.matchCheckTest(r,t)}matchCheckTest(e,t){return e&&(this.maxDepth===1/0||e.depth()<=this.maxDepth)&&(!t||e.canReaddir())&&(!this.opts.nodir||!e.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!e.isSymbolicLink()||!e.realpathCached()?.isDirectory())&&!this.#r(e)?e:void 0}matchCheckSync(e,t){if(t&&this.opts.nodir)return;let n;if(this.opts.realpath){if(n=e.realpathCached()||e.realpathSync(),!n)return;e=n}let r=e.isUnknown()||this.opts.stat?e.lstatSync():e;if(this.opts.follow&&this.opts.nodir&&r?.isSymbolicLink()){let e=r.realpathSync();e&&(e?.isUnknown()||this.opts.stat)&&e.lstatSync()}return this.matchCheckTest(r,t)}matchFinish(e,t){if(this.#r(e))return;if(!this.includeChildMatches&&this.#t?.add){let t=`${e.relativePosix()}/**`;this.#t.add(t)}let n=this.opts.absolute===void 0?t:this.opts.absolute;this.seen.add(e);let r=this.opts.mark&&e.isDirectory()?this.#n:``;if(this.opts.withFileTypes)this.matchEmit(e);else if(n){let t=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(t+r)}else{let t=this.opts.posix?e.relativePosix():e.relative(),n=this.opts.dotRelative&&!t.startsWith(`..`+this.#n)?`.`+this.#n:``;this.matchEmit(t?n+t+r:`.`+r)}}async match(e,t,n){let r=await this.matchCheck(e,n);r&&this.matchFinish(r,t)}matchSync(e,t,n){let r=this.matchCheckSync(e,n);r&&this.matchFinish(r,t)}walkCB(e,t,n){this.signal?.aborted&&n(),this.walkCB2(e,t,new Ir(this.opts),n)}walkCB2(e,t,n,r){if(this.#i(e))return r();if(this.signal?.aborted&&r(),this.paused){this.onResume(()=>this.walkCB2(e,t,n,r));return}n.processPatterns(e,t);let i=1,a=()=>{--i===0&&r()};for(let[e,t,r]of n.matches.entries())this.#r(e)||(i++,this.match(e,t,r).then(()=>a()));for(let e of n.subwalkTargets()){if(this.maxDepth!==1/0&&e.depth()>=this.maxDepth)continue;i++;let t=e.readdirCached();e.calledReaddir()?this.walkCB3(e,t,n,a):e.readdirCB((t,r)=>this.walkCB3(e,r,n,a),!0)}a()}walkCB3(e,t,n,r){n=n.filterEntries(e,t);let i=1,a=()=>{--i===0&&r()};for(let[e,t,r]of n.matches.entries())this.#r(e)||(i++,this.match(e,t,r).then(()=>a()));for(let[e,t]of n.subwalks.entries())i++,this.walkCB2(e,t,n.child(),a);a()}walkCBSync(e,t,n){this.signal?.aborted&&n(),this.walkCB2Sync(e,t,new Ir(this.opts),n)}walkCB2Sync(e,t,n,r){if(this.#i(e))return r();if(this.signal?.aborted&&r(),this.paused){this.onResume(()=>this.walkCB2Sync(e,t,n,r));return}n.processPatterns(e,t);let i=1,a=()=>{--i===0&&r()};for(let[e,t,r]of n.matches.entries())this.#r(e)||this.matchSync(e,t,r);for(let e of n.subwalkTargets()){if(this.maxDepth!==1/0&&e.depth()>=this.maxDepth)continue;i++;let t=e.readdirSync();this.walkCB3Sync(e,t,n,a)}a()}walkCB3Sync(e,t,n,r){n=n.filterEntries(e,t);let i=1,a=()=>{--i===0&&r()};for(let[e,t,r]of n.matches.entries())this.#r(e)||this.matchSync(e,t,r);for(let[e,t]of n.subwalks.entries())i++,this.walkCB2Sync(e,t,n.child(),a);a()}},zr=class extends Rr{matches=/* @__PURE__ */ new Set;constructor(e,t,n){super(e,t,n)}matchEmit(e){this.matches.add(e)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((e,t)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?t(this.signal.reason):e(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}},Br=class extends Rr{results;constructor(e,t,n){super(e,t,n),this.results=new Bn({signal:this.signal,objectMode:!0}),this.results.on(`drain`,()=>this.resume()),this.results.on(`resume`,()=>this.resume())}matchEmit(e){this.results.write(e),this.results.flowing||this.pause()}stream(){let e=this.path;return e.isUnknown()?e.lstat().then(()=>{this.walkCB(e,this.patterns,()=>this.results.end())}):this.walkCB(e,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}},Vr=typeof M==`object`&&M&&typeof M.platform==`string`?M.platform:`linux`,Hr=class{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(e,t){if(!t)throw TypeError(`glob options required`);if(this.withFileTypes=!!t.withFileTypes,this.signal=t.signal,this.follow=!!t.follow,this.dot=!!t.dot,this.dotRelative=!!t.dotRelative,this.nodir=!!t.nodir,this.mark=!!t.mark,t.cwd?(t.cwd instanceof URL||t.cwd.startsWith(`file://`))&&(t.cwd=v(t.cwd)):this.cwd=``,this.cwd=t.cwd||``,this.root=t.root,this.magicalBraces=!!t.magicalBraces,this.nobrace=!!t.nobrace,this.noext=!!t.noext,this.realpath=!!t.realpath,this.absolute=t.absolute,this.includeChildMatches=t.includeChildMatches!==!1,this.noglobstar=!!t.noglobstar,this.matchBase=!!t.matchBase,this.maxDepth=typeof t.maxDepth==`number`?t.maxDepth:1/0,this.stat=!!t.stat,this.ignore=t.ignore,this.withFileTypes&&this.absolute!==void 0)throw Error(`cannot set absolute and withFileTypes:true`);if(typeof e==`string`&&(e=[e]),this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(e=e.map(e=>e.replace(/\\/g,`/`))),this.matchBase){if(t.noglobstar)throw TypeError(`base matching requires globstar`);e=e.map(e=>e.includes(`/`)?e:`./**/${e}`)}if(this.pattern=e,this.platform=t.platform||Vr,this.opts={...t,platform:this.platform},t.scurry){if(this.scurry=t.scurry,t.nocase!==void 0&&t.nocase!==t.scurry.nocase)throw Error(`nocase option contradicts provided scurry option`)}else{let e=t.platform===`win32`?Cr:t.platform===`darwin`?Tr:t.platform?wr:Er;this.scurry=new e(this.cwd,{nocase:t.nocase,fs:t.fs})}this.nocase=this.scurry.nocase;let n=this.platform===`darwin`||this.platform===`win32`,r={braceExpandMax:1e4,...t,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:n,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},[i,a]=this.pattern.map(e=>new Bt(e,r)).reduce((e,t)=>(e[0].push(...t.set),e[1].push(...t.globParts),e),[[],[]]);this.patterns=i.map((e,t)=>{let n=a[t];if(!n)throw Error(`invalid pattern object`);return new Ar(e,n,0,this.platform)})}async walk(){return[...await new zr(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth===1/0?1/0:this.maxDepth+this.scurry.cwd.depth(),platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new zr(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth===1/0?1/0:this.maxDepth+this.scurry.cwd.depth(),platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new Br(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth===1/0?1/0:this.maxDepth+this.scurry.cwd.depth(),platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new Br(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth===1/0?1/0:this.maxDepth+this.scurry.cwd.depth(),platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}},Ur=(e,t={})=>{Array.isArray(e)||(e=[e]);for(let n of e)if(new Bt(n,t).hasMagic())return!0;return!1};function Wr(e,t={}){return new Hr(e,t).streamSync()}function Gr(e,t={}){return new Hr(e,t).stream()}function Kr(e,t={}){return new Hr(e,t).walkSync()}async function qr(e,t={}){return new Hr(e,t).walk()}function Jr(e,t={}){return new Hr(e,t).iterateSync()}function Yr(e,t={}){return new Hr(e,t).iterate()}var Xr=Wr,Zr=Object.assign(Gr,{sync:Wr}),Qr=Jr,$r=Object.assign(Yr,{sync:Jr}),ei=Object.assign(Kr,{stream:Wr,iterate:Jr}),ti=Object.assign(qr,{glob:qr,globSync:Kr,sync:ei,globStream:Gr,stream:Zr,globStreamSync:Wr,streamSync:Xr,globIterate:Yr,iterate:$r,globIterateSync:Jr,iterateSync:Qr,Glob:Hr,hasMagic:Ur,escape:ct,unescape:Ye});ti.glob=ti;const ni=(e,t)=>e===void 0||typeof e===t,ri=e=>!!e&&typeof e==`object`&&ni(e.preserveRoot,`boolean`)&&ni(e.tmp,`string`)&&ni(e.maxRetries,`number`)&&ni(e.retryDelay,`number`)&&ni(e.backoff,`number`)&&ni(e.maxBackoff,`number`)&&(ni(e.glob,`boolean`)||e.glob&&typeof e.glob==`object`)&&ni(e.filter,`function`),ii=e=>{if(!ri(e))throw Error(`invalid rimraf options`)},ai=e=>{ii(e);let{glob:t,...n}=e;if(!t)return n;let r=t===!0?e.signal?{signal:e.signal}:{}:e.signal?{signal:e.signal,...t}:t;return{...n,glob:{...r,absolute:!0,withFileTypes:!1}}},oi=(e={})=>ai(e),si=(e={})=>ai(e),ci=(e,t={})=>{let n=typeof e;if(n!==`string`){let t=e&&n===`object`&&e.constructor,r=`The "path" argument must be of type string. Received ${t&&t.name?`an instance of ${t.name}`:n===`object`?de(e):`type ${n} ${e}`}`;throw Object.assign(TypeError(r),{path:e,code:`ERR_INVALID_ARG_TYPE`})}if(/\0/.test(e))throw Object.assign(/* @__PURE__ */ TypeError(`path must be a string without null bytes`),{path:e,code:`ERR_INVALID_ARG_VALUE`});e=ue(e);let{root:r}=U(e);if(e===r&&t.preserveRoot!==!1)throw Object.assign(/* @__PURE__ */ Error(`refusing to remove root directory without preserveRoot:false`),{path:e,code:`ERR_PRESERVE_ROOT`});if(M.platform===`win32`){let t=/[*|"<>?:]/,{root:n}=U(e);if(t.test(e.substring(n.length)))throw Object.assign(/* @__PURE__ */ Error(`Illegal characters in path.`),{path:e,code:`EINVAL`})}return e},li=e=>R(e,{withFileTypes:!0}),ui={chmod:W.chmod,mkdir:W.mkdir,readdir:e=>W.readdir(e,{withFileTypes:!0}),rename:W.rename,rm:W.rm,rmdir:W.rmdir,stat:W.stat,lstat:W.lstat,unlink:W.unlink},{readdir:di}=ui,fi=e=>di(e).catch(e=>e),pi=e=>{try{return li(e)}catch(e){return e}},mi=e=>!!e&&typeof e==`object`,hi=(e,t)=>t in e&&typeof e[t]==`string`,gi=e=>mi(e)&&hi(e,`code`)&&hi(e,`path`),Y=e=>mi(e)&&hi(e,`code`)?e.code:null,_i=async(e,t)=>e.catch(e=>{if(Y(e)!==`ENOENT`)throw t??e}),vi=(e,t)=>{try{return e()}catch(e){if(Y(e)===`ENOENT`)return;throw t??e}},{lstat:yi,rmdir:bi,unlink:xi}=ui,Si=async(e,t)=>(t?.signal?.throwIfAborted(),await _i(yi(e).then(n=>wi(e,t,n)))??!0),Ci=(e,t)=>(t?.signal?.throwIfAborted(),vi(()=>Ti(e,t,I(e)))??!0),wi=async(e,t,n)=>{t?.signal?.throwIfAborted();let r=n.isDirectory()?await fi(e):null;if(!Array.isArray(r)){
|
|
4
4
|
/* c8 ignore start */
|
|
5
5
|
if(r){if(Y(r)===`ENOENT`)return!0;if(Y(r)!==`ENOTDIR`)throw r}return t.filter&&!await t.filter(e,n)?!1:(await _i(xi(e)),!0)}return!(await Promise.all(r.map(n=>wi(ue(e,n.name),t,n)))).every(e=>e===!0)||t.preserveRoot===!1&&e===U(e).root||t.filter&&!await t.filter(e,n)?!1:(await _i(bi(e)),!0)},Ti=(e,t,n)=>{t?.signal?.throwIfAborted();let r=n.isDirectory()?pi(e):null;if(!Array.isArray(r)){
|
|
6
6
|
/* c8 ignore start */
|
|
7
|
-
if(r){if(Y(r)===`ENOENT`)return!0;if(Y(r)!==`ENOTDIR`)throw r}return t.filter&&!t.filter(e,n)?!1:(vi(()=>H(e)),!0)}let i=!0;for(let n of r){let r=ue(e,n.name);i=Ti(r,t,n)&&i}return t.preserveRoot===!1&&e===U(e).root||!i||t.filter&&!t.filter(e,n)?!1:(vi(()=>ie(e)),!0)},{chmod:Ei}=ui,Di=e=>async t=>{try{await _i(e(t));return}catch(n){if(Y(n)===`EPERM`){if(!await _i(Ei(t,438).then(()=>!0),n))return;await e(t);return}throw n}},Oi=e=>t=>{try{vi(()=>e(t));return}catch(n){if(Y(n)===`EPERM`){if(!vi(()=>(
|
|
7
|
+
if(r){if(Y(r)===`ENOENT`)return!0;if(Y(r)!==`ENOTDIR`)throw r}return t.filter&&!t.filter(e,n)?!1:(vi(()=>H(e)),!0)}let i=!0;for(let n of r){let r=ue(e,n.name);i=Ti(r,t,n)&&i}return t.preserveRoot===!1&&e===U(e).root||!i||t.filter&&!t.filter(e,n)?!1:(vi(()=>ie(e)),!0)},{chmod:Ei}=ui,Di=e=>async t=>{try{await _i(e(t));return}catch(n){if(Y(n)===`EPERM`){if(!await _i(Ei(t,438).then(()=>!0),n))return;await e(t);return}throw n}},Oi=e=>t=>{try{vi(()=>e(t));return}catch(n){if(Y(n)===`EPERM`){if(!vi(()=>(P(t,438),!0),n))return;e(t);return}throw n}},ki=/* @__PURE__ */ new Set([`EMFILE`,`ENFILE`,`EBUSY`]),Ai=e=>{let t=async(n,r,i=1,a=0)=>{let o=r.maxBackoff||200,s=r.backoff||1.2,c=r.maxRetries||10,l=0;for(;;)try{return await e(n)}catch(e){if(gi(e)&&e.path===n&&ki.has(e.code)){if(i=Math.ceil(i*s),a=i+a,a<o)return await fe(i),t(n,r,i,a);if(l<c){l++;continue}}throw e}};return t},ji=e=>(t,n)=>{let r=n.maxRetries||10,i=0;for(;;)try{return e(t)}catch(e){if(gi(e)&&e.path===t&&ki.has(e.code)&&i<r){i++;continue}throw e}},{stat:Mi}=ui,Ni=e=>{try{return ae(e).isDirectory()}catch{return!1}},Pi=e=>Mi(e).then(e=>e.isDirectory(),()=>!1),Fi=async e=>{let{root:t}=U(e),n=pe(),{root:r}=U(n);if(t.toLowerCase()===r.toLowerCase())return n;let i=ue(t,`/temp`);return await Pi(i)?i:t},Ii=e=>{let{root:t}=U(e),n=pe(),{root:r}=U(n);if(t.toLowerCase()===r.toLowerCase())return n;let i=ue(t,`/temp`);return Ni(i)?i:t},Li=async()=>pe(),Ri=()=>pe(),zi=M.platform===`win32`?Fi:Li,Bi=M.platform===`win32`?Ii:Ri,{lstat:Vi,rename:Hi,unlink:Ui,rmdir:Wi}=ui,Gi=e=>`.${le(e)}.${Math.random()}`,Ki=Di(Ui),qi=Oi(H),Ji=async(e,t)=>(t?.signal?.throwIfAborted(),await _i(Vi(e).then(n=>Yi(e,t,n)))??!0),Yi=async(e,t,n)=>{if(t?.signal?.throwIfAborted(),!t.tmp)return Yi(e,{...t,tmp:await zi(e)},n);if(e===t.tmp&&U(e).root!==e)throw Error(`cannot delete temp directory used for deletion`);let r=n.isDirectory()?await fi(e):null;if(!Array.isArray(r)){
|
|
8
8
|
/* c8 ignore start */
|
|
9
9
|
if(r){if(Y(r)===`ENOENT`)return!0;if(Y(r)!==`ENOTDIR`)throw r}return t.filter&&!await t.filter(e,n)?!1:(await _i(Xi(e,t.tmp,Ki)),!0)}return!(await Promise.all(r.map(n=>Yi(ue(e,n.name),t,n)))).every(e=>e===!0)||t.preserveRoot===!1&&e===U(e).root||t.filter&&!await t.filter(e,n)?!1:(await _i(Xi(e,t.tmp,Wi)),!0)},Xi=async(e,t,n)=>{let r=ue(t,Gi(e));return await Hi(e,r),await n(r)},Zi=(e,t)=>(t?.signal?.throwIfAborted(),vi(()=>Qi(e,t,I(e)))??!0),Qi=(e,t,n)=>{if(t?.signal?.throwIfAborted(),!t.tmp)return Qi(e,{...t,tmp:Bi(e)},n);let r=t.tmp;if(e===t.tmp&&U(e).root!==e)throw Error(`cannot delete temp directory used for deletion`);let i=n.isDirectory()?pi(e):null;if(!Array.isArray(i)){
|
|
10
10
|
/* c8 ignore start */
|
|
@@ -14,9 +14,9 @@ n?.signal?.throwIfAborted();try{return await aa(e,n),!0}catch(t){if(Y(t)===`ENOT
|
|
|
14
14
|
/* c8 ignore start */
|
|
15
15
|
if(i){if(Y(i)===`ENOENT`)return!0;if(Y(i)!==`ENOTDIR`)throw i}return t.filter&&!await t.filter(e,n)?!1:(await _i(ra(e,t)),!0)}let a=r===la?ua:r,o=(await Promise.all(i.map(n=>ma(ue(e,n.name),t,n,a)))).every(e=>e===!0);if(r===la)return ma(e,t,n,da);if(r===da){if(t.preserveRoot===!1&&e===U(e).root||!o||t.filter&&!await t.filter(e,n))return!1;await _i(sa(e,t))}return!0},ha=(e,t,n,r=la)=>{let i=n.isDirectory()?pi(e):null;if(!Array.isArray(i)){
|
|
16
16
|
/* c8 ignore start */
|
|
17
|
-
if(i){if(Y(i)===`ENOENT`)return!0;if(Y(i)!==`ENOTDIR`)throw i}return t.filter&&!t.filter(e,n)?!1:(vi(()=>ia(e,t)),!0)}let a=!0;for(let n of i){let i=r===la?ua:r,o=ue(e,n.name);a=ha(o,t,n,i)&&a}if(r===la)return ha(e,t,n,da);if(r===da){if(t.preserveRoot===!1&&e===U(e).root||!a||t.filter&&!t.filter(e,n))return!1;vi(()=>ca(e,t))}return!0},ga=N.platform===`win32`?fa:Si,_a=N.platform===`win32`?pa:Ci,{rm:va}=ui,ya=async(e,t)=>(await va(e,{...t,force:!0,recursive:!0}),!0),ba=(e,t)=>(V(e,{...t,force:!0,recursive:!0}),!0),[xa=0,Sa=0]=N.version.replace(/^v/,``).split(`.`).map(e=>parseInt(e,10)),Ca=xa>14||xa===14&&Sa>=14,wa=!Ca||N.platform===`win32`?()=>!1:e=>!e?.signal&&!e?.filter,Ta=!Ca||N.platform===`win32`?()=>!1:e=>!e?.signal&&!e?.filter,Ea=e=>async(t,n)=>{let r=oi(n);return r.glob&&(t=await ti(t,r.glob)),Array.isArray(t)?!!(await Promise.all(t.map(t=>e(ci(t,r),r)))).reduce((e,t)=>e&&t,!0):!!await e(ci(t,r),r)},Da=e=>(t,n)=>{let r=si(n);return r.glob&&(t=Kr(t,r.glob)),Array.isArray(t)?!!t.map(t=>e(ci(t,r),r)).reduce((e,t)=>e&&t,!0):!!e(ci(t,r),r)},Oa=Da(ba),ka=Object.assign(Ea(ya),{sync:Oa}),Aa=Da(_a),ja=Object.assign(Ea(ga),{sync:Aa}),Ma=Da(pa),Na=Object.assign(Ea(fa),{sync:Ma}),Pa=Da(Ci),Fa=Object.assign(Ea(Si),{sync:Pa}),Ia=Da(Zi),La=Object.assign(Ea(Ji),{sync:Ia}),Ra=Da((e,t)=>Ta(t)?ba(e,t):_a(e,t)),za=Ea((e,t)=>wa(t)?ya(e,t):ga(e,t)),Ba=Object.assign(za,{rimraf:za,sync:Ra,rimrafSync:Ra,manual:ja,manualSync:Aa,native:ka,nativeSync:Oa,posix:Fa,posixSync:Pa,windows:Na,windowsSync:Ma,moveRemove:La,moveRemoveSync:Ia});Ba.rimraf=Ba;async function Va(e,t,{baseDir:n=``,readdirImpl:r=ee,cpImpl:i=T,joinImpl:a=m}={}){for(let o of e){let e=n?a(n,o):o;try{let n=await r(e,{withFileTypes:!0});for(let r of n){let n=a(e,r.name),o=a(t,r.name);r.isDirectory()?await i(n,o,{recursive:!0,force:!0}):r.isFile()&&await i(n,o,{force:!0})}}catch{}}}async function Ha(e,t,n={},{statImpl:r=j,cpImpl:i=T}={}){let a=Array.isArray(e)?e:[e];for(let e of a)try{return await r(e),await i(e,t,n),!0}catch{}return!1}async function Ua(e,{statImpl:t=j}={}){for(let n of e)try{return await t(n),n}catch{}return null}function Wa({contentRoot:e=``,toolchainRoot:t=``,distPublicDir:n=`dist/public`}={}){let r=[{sources:[`pages/resources/README.md`,`pages/deps/README.md`,`resources/README.md`,`deps/README.md`,`pages/README.md`,`README.md`],dest:`dist/public/README.md`},{sources:[`pages/resources/docs`,`pages/deps/docs`,`resources/docs`,`deps/docs`,`pages/docs`,`docs`],dest:`dist/public/docs`,opts:{recursive:!0}},{sources:[`pages/resources/AGENTS.md`,`pages/deps/AGENTS.md`,`resources/AGENTS.md`,`deps/AGENTS.md`,`pages/AGENTS.md`,`AGENTS.md`],dest:`dist/public/AGENTS.md`},{sources:[`pages/resources/llms.txt`,`pages/deps/llms.txt`,`resources/llms.txt`,`deps/llms.txt`,`pages/llms.txt`,`llms.txt`],dest:`dist/public/llms.txt`},{sources:[`pages/resources/robots.txt`,`pages/deps/robots.txt`,`resources/robots.txt`,`deps/robots.txt`,`pages/robots.txt`,`robots.txt`],dest:`dist/public/robots.txt`},{sources:[`pages/resources/sitemap.xml`,`pages/deps/sitemap.xml`,`resources/sitemap.xml`,`deps/sitemap.xml`,`pages/sitemap.xml`,`pages/main/sitemap.xml`,`sitemap.xml`],dest:`dist/public/sitemap.xml`},{sources:[`pages/resources/sitemap.txt`,`pages/deps/sitemap.txt`,`resources/sitemap.txt`,`deps/sitemap.txt`,`pages/sitemap.txt`,`pages/main/sitemap.txt`,`sitemap.txt`],dest:`dist/public/sitemap.txt`},{sources:[`pages/resources/404.html`,`pages/deps/404.html`,`resources/404.html`,`deps/404.html`,`pages/404.html`,`pages/main/404.html`,`404.html`],dest:`dist/public/404.html`},{sources:[`pages/resources/manifest.json`,`pages/deps/manifest.json`,`resources/manifest.json`,`deps/manifest.json`,`pages/manifest.json`,`pages/main/manifest.json`,`manifest.json`],dest:`dist/public/manifest.json`},{sources:[`pages/resources/assets/icons/favicon.svg`,`pages/deps/assets/icons/favicon.svg`,`resources/assets/icons/favicon.svg`,`deps/assets/icons/favicon.svg`,`pages/resources/assets/favicon.svg`,`pages/resources/favicon.svg`,`pages/deps/favicon.svg`,`resources/favicon.svg`,`deps/favicon.svg`,`pages/favicon.svg`,`pages/main/favicon.svg`,`assets/icons/favicon.svg`],dest:`dist/public/favicon.svg`},{sources:[`pages/resources/assets/icons/favicon.ico`,`pages/deps/assets/icons/favicon.ico`,`resources/assets/icons/favicon.ico`,`deps/assets/icons/favicon.ico`,`pages/resources/assets/favicon.ico`,`pages/resources/favicon.ico`,`pages/deps/favicon.ico`,`resources/favicon.ico`,`deps/favicon.ico`,`pages/favicon.ico`,`pages/main/favicon.ico`,`assets/icons/favicon.ico`],dest:`dist/public/favicon.ico`}];return!e&&!t&&n===`dist/public`?r:r.map(r=>{let i=n?r.dest.replace(/^dist\/public/,n):r.dest,a=[];if(e)for(let t of r.sources)a.push(p.join(e,t));if(t&&t!==e)for(let e of r.sources)a.push(p.join(t,e));return!e&&!t&&a.push(...r.sources),{sources:a,dest:i,...r.opts?{opts:r.opts}:{}}})}function Ga(e){let t=[`pages/resources/routes.json`,`pages/deps/routes.json`,`resources/routes.json`,`deps/routes.json`,`pages/routes.json`,`routes.json`];return e?t.map(t=>p.join(e,t)):t}function Ka(e){return e?[p.join(e,`shadow-claw-config.json`),p.join(e,`shadow-claw.config.json`),p.join(e,`shadowclaw.config.json`),p.join(e,`pages/shadow-claw-config.json`),p.join(e,`pages/shadow-claw.config.json`),p.join(e,`site-config.json`),p.join(e,`pages/site-config.json`)]:[`shadow-claw-config.json`,`shadow-claw.config.json`,`shadowclaw.config.json`,`site-config.json`]}function qa(e={}){let t=e.PRERENDER_PAGES||`all`;return{isProduction:e.NODE_ENV===`production`,copyAllAssets:e.COPY_ALL_ASSETS===`true`,prerenderPages:t,prerenderMainMemory:e.PRERENDER_MAIN_MEMORY!==`false`&&t!==`none`&&t!==`0`}}var Ja=/* @__PURE__ */ t((e=>{function t(e,t,n){if(n===void 0&&(n=Array.prototype),e&&typeof n.find==`function`)return n.find.call(e,t);for(var i=0;i<e.length;i++)if(r(e,i)){var a=e[i];if(t.call(void 0,a,i,e))return a}}function n(e,t){return t===void 0&&(t=Object),t&&typeof t.getOwnPropertyDescriptors==`function`&&(e=t.create(null,t.getOwnPropertyDescriptors(e))),t&&typeof t.freeze==`function`?t.freeze(e):e}function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function i(e,t){if(typeof e!=`object`||!e)throw TypeError(`target is not an object`);for(var n in t)r(t,n)&&(e[n]=t[n]);return e}var a=n({allowfullscreen:!0,async:!0,autofocus:!0,autoplay:!0,checked:!0,controls:!0,default:!0,defer:!0,disabled:!0,formnovalidate:!0,hidden:!0,ismap:!0,itemscope:!0,loop:!0,multiple:!0,muted:!0,nomodule:!0,novalidate:!0,open:!0,playsinline:!0,readonly:!0,required:!0,reversed:!0,selected:!0});function o(e){return r(a,e.toLowerCase())}var s=n({area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function c(e){return r(s,e.toLowerCase())}var l=n({script:!1,style:!1,textarea:!0,title:!0});function u(e){var t=e.toLowerCase();return r(l,t)&&!l[t]}function d(e){var t=e.toLowerCase();return r(l,t)&&l[t]}function f(e){return e===m.HTML}function p(e){return f(e)||e===m.XML_XHTML_APPLICATION}var m=n({HTML:`text/html`,XML_APPLICATION:`application/xml`,XML_TEXT:`text/xml`,XML_XHTML_APPLICATION:`application/xhtml+xml`,XML_SVG_IMAGE:`image/svg+xml`}),h=Object.keys(m).map(function(e){return m[e]});function g(e){return h.indexOf(e)>-1}var _=n({HTML:`http://www.w3.org/1999/xhtml`,SVG:`http://www.w3.org/2000/svg`,XML:`http://www.w3.org/XML/1998/namespace`,XMLNS:`http://www.w3.org/2000/xmlns/`});e.assign=i,e.find=t,e.freeze=n,e.HTML_BOOLEAN_ATTRIBUTES=a,e.HTML_RAW_TEXT_ELEMENTS=l,e.HTML_VOID_ELEMENTS=s,e.hasDefaultHTMLNamespace=p,e.hasOwn=r,e.isHTMLBooleanAttribute=o,e.isHTMLRawTextElement=u,e.isHTMLEscapableRawTextElement=d,e.isHTMLMimeType=f,e.isHTMLVoidElement=c,e.isValidMimeType=g,e.MIME_TYPE=m,e.NAMESPACE=_})),Ya=/* @__PURE__ */ t((e=>{var t=Ja();function n(e,t){e.prototype=Object.create(Error.prototype,{constructor:{value:e},name:{value:e.name,enumerable:!0,writable:t}})}var r=t.freeze({Error:`Error`,IndexSizeError:`IndexSizeError`,DomstringSizeError:`DomstringSizeError`,HierarchyRequestError:`HierarchyRequestError`,WrongDocumentError:`WrongDocumentError`,InvalidCharacterError:`InvalidCharacterError`,NoDataAllowedError:`NoDataAllowedError`,NoModificationAllowedError:`NoModificationAllowedError`,NotFoundError:`NotFoundError`,NotSupportedError:`NotSupportedError`,InUseAttributeError:`InUseAttributeError`,InvalidStateError:`InvalidStateError`,SyntaxError:`SyntaxError`,InvalidModificationError:`InvalidModificationError`,NamespaceError:`NamespaceError`,InvalidAccessError:`InvalidAccessError`,ValidationError:`ValidationError`,TypeMismatchError:`TypeMismatchError`,SecurityError:`SecurityError`,NetworkError:`NetworkError`,AbortError:`AbortError`,URLMismatchError:`URLMismatchError`,QuotaExceededError:`QuotaExceededError`,TimeoutError:`TimeoutError`,InvalidNodeTypeError:`InvalidNodeTypeError`,DataCloneError:`DataCloneError`,EncodingError:`EncodingError`,NotReadableError:`NotReadableError`,UnknownError:`UnknownError`,ConstraintError:`ConstraintError`,DataError:`DataError`,TransactionInactiveError:`TransactionInactiveError`,ReadOnlyError:`ReadOnlyError`,VersionError:`VersionError`,OperationError:`OperationError`,NotAllowedError:`NotAllowedError`,OptOutError:`OptOutError`}),i=Object.keys(r);function a(e){return typeof e==`number`&&e>=1&&e<=25}function o(e){return typeof e==`string`&&e.substring(e.length-r.Error.length)===r.Error}function s(e,t){a(e)?(this.name=i[e],this.message=t||``):(this.message=e,this.name=o(t)?t:r.Error),Error.captureStackTrace&&Error.captureStackTrace(this,s)}n(s,!0),Object.defineProperties(s.prototype,{code:{enumerable:!0,get:function(){var e=i.indexOf(this.name);return a(e)?e:0}}});for(var c={INDEX_SIZE_ERR:1,DOMSTRING_SIZE_ERR:2,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,INVALID_CHARACTER_ERR:5,NO_DATA_ALLOWED_ERR:6,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INUSE_ATTRIBUTE_ERR:10,INVALID_STATE_ERR:11,SYNTAX_ERR:12,INVALID_MODIFICATION_ERR:13,NAMESPACE_ERR:14,INVALID_ACCESS_ERR:15,VALIDATION_ERR:16,TYPE_MISMATCH_ERR:17,SECURITY_ERR:18,NETWORK_ERR:19,ABORT_ERR:20,URL_MISMATCH_ERR:21,QUOTA_EXCEEDED_ERR:22,TIMEOUT_ERR:23,INVALID_NODE_TYPE_ERR:24,DATA_CLONE_ERR:25},l=Object.entries(c),u=0;u<l.length;u++){var d=l[u][0];s[d]=l[u][1]}function f(e,t,n){this.message=e,this.locator=t,this.cause=n,Error.captureStackTrace&&Error.captureStackTrace(this,f)}n(f),e.DOMException=s,e.DOMExceptionName=r,e.ExceptionCode=c,e.ParseError=f})),Xa=/* @__PURE__ */ t((e=>{function t(e){try{typeof e!=`function`&&(e=RegExp);var t=new e(`𝌆`,`u`).exec(`𝌆`);return!!t&&t[0].length===2}catch{}return!1}var n=t();function r(e){if(e.source[0]!==`[`)throw Error(e+` can not be used with chars`);return e.source.slice(1,e.source.lastIndexOf(`]`))}function i(e,t){if(e.source[0]!==`[`)throw Error(`/`+e.source+`/ can not be used with chars_without`);if(!t||typeof t!=`string`)throw Error(JSON.stringify(t)+` is not a valid search`);if(e.source.indexOf(t)===-1)throw Error(`"`+t+`" is not is /`+e.source+`/`);if(t===`-`&&e.source.indexOf(t)!==1)throw Error(`"`+t+`" is not at the first postion of /`+e.source+`/`);return new RegExp(e.source.replace(t,``),n?`u`:``)}function a(e){var t=this;return new RegExp(Array.prototype.slice.call(arguments).map(function(e){var n=typeof e==`string`;if(n&&t===void 0&&e===`|`)throw Error("use regg instead of reg to wrap expressions with `|`!");return n?e:e.source}).join(``),n?`u`:``)}function o(e){if(arguments.length===0)throw Error(`no parameters provided`);return a.apply(o,[`(?:`].concat(Array.prototype.slice.call(arguments),[`)`]))}var s=`�`,c=/[-\x09\x0A\x0D\x20-\x2C\x2E-\uD7FF\uE000-\uFFFD]/;n&&(c=a(`[`,r(c),`\\u{10000}-\\u{10FFFF}`,`]`));var l=RegExp(`[^`+r(c)+`]`,n?`u`:``),u=/[\x20\x09\x0D\x0A]/,d=r(u),f=a(u,`+`),p=a(u,`*`),m=/[:_a-zA-Z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;n&&(m=a(`[`,r(m),`\\u{10000}-\\u{10FFFF}`,`]`));var h=a(`[`,r(m),r(/[-.0-9\xB7]/),r(/[\u0300-\u036F\u203F-\u2040]/),`]`),g=a(m,h,`*`),_=a(`^`,g,`$`),v=a(h,`+`),y=o(a(`&`,g,`;`),`|`,o(/&#[0-9]+;|&#x[0-9a-fA-F]+;/)),b=a(`%`,g,`;`),x=o(a(`"`,o(/[^%&"]/,`|`,b,`|`,y),`*`,`"`),`|`,a(`'`,o(/[^%&']/,`|`,b,`|`,y),`*`,`'`)),S=o(`"`,o(/[^<&"]/,`|`,y),`*`,`"`,`|`,`'`,o(/[^<&']/,`|`,y),`*`,`'`),C=a(i(m,`:`),i(h,`:`),`*`),w=a(`^`,C,`$`),T=a(C,o(`:`,C),`?`),E=a(`^`,T,`$`),D=a(`(`,T,`)`),O=o(/"[^"]*"|'[^']*'/),ee=a(/^<\?/,`(`,g,`)`,o(f,`(?!`,u,`)(`,c,`*?)`),`?`,/\?>/),te=/[\x20\x0D\x0Aa-zA-Z0-9-'()+,./:=?;!*#@$_%]/,k=o(`"`,te,`*"`,`|`,`'`,i(te,`'`),`*'`),A=`<!--`,j=`-->`,M=a(A,o(i(c,`-`),`|`,a(`-`,i(c,`-`))),`*`,j),N=`#PCDATA`,P=o(`EMPTY`,`|`,`ANY`,`|`,o(a(/\(/,p,N,o(p,/\|/,p,T),`*`,p,/\)\*/),`|`,a(/\(/,p,N,p,/\)/)),`|`,a(/\([^>]+\)/,/[?*+]?/)),ne=a(`<!ELEMENT`,f,o(T,`|`,b),f,o(P,`|`,b),p,`>`),F=a(`<!ATTLIST`,f,g,o(f,g,f,o(/CDATA|ID|IDREF|IDREFS|ENTITY|ENTITIES|NMTOKEN|NMTOKENS/,`|`,o(a(`NOTATION`,f,/\(/,p,g,o(p,/\|/,p,g),`*`,p,/\)/),`|`,a(/\(/,p,v,o(p,/\|/,p,v),`*`,p,/\)/))),f,o(/#REQUIRED|#IMPLIED/,`|`,o(o(`#FIXED`,f),`?`,S))),`*`,p,`>`),I=`about:legacy-compat`,L=o(`"`+I+`"`,`|`,`'`+I+`'`),R=`SYSTEM`,z=`PUBLIC`,B=o(o(R,f,O),`|`,o(z,f,k,f,O)),re=a(`^`,o(o(R,f,`(?<SystemLiteralOnly>`,O,`)`),`|`,o(z,f,`(?<PubidLiteral>`,k,`)`,f,`(?<SystemLiteral>`,O,`)`))),V=a(`^`,k,`$`),ie=a(`^`,O,`$`),ae=o(x,`|`,o(B,o(f,`NDATA`,f,g),`?`)),H=`<!ENTITY`,oe=o(a(H,f,g,f,ae,p,`>`),`|`,a(H,f,`%`,f,g,f,o(x,`|`,B),p,`>`)),se=a(`<!NOTATION`,f,g,f,o(B,`|`,a(z,f,k)),p,`>`),ce=a(p,`=`,p),le=/1[.]\d+/,U=a(f,`version`,ce,o(`'`,le,`'`,`|`,`"`,le,`"`)),ue=/[A-Za-z][-A-Za-z0-9._]*/,de=a(/^<\?xml/,U,o(f,`encoding`,ce,o(`"`,ue,`"`,`|`,`'`,ue,`'`)),`?`,o(f,`standalone`,ce,o(`'`,o(`yes`,`|`,`no`),`'`,`|`,`"`,o(`yes`,`|`,`no`),`"`)),`?`,p,/\?>/),W=`<!DOCTYPE`,fe=`<![CDATA[`,pe=`]]>`,me=a(/<!\[CDATA\[/,a(c,`*?`,/\]\]>/));e.chars=r,e.chars_without=i,e.detectUnicodeSupport=t,e.reg=a,e.regg=o,e.ABOUT_LEGACY_COMPAT=I,e.ABOUT_LEGACY_COMPAT_SystemLiteral=L,e.AttlistDecl=F,e.CDATA_START=fe,e.CDATA_END=pe,e.CDSect=me,e.Char=c,e.Comment=M,e.COMMENT_START=A,e.COMMENT_END=j,e.DOCTYPE_DECL_START=W,e.elementdecl=ne,e.EntityDecl=oe,e.EntityValue=x,e.ExternalID=B,e.ExternalID_match=re,e.Name=g,e.Name_exact=_,e.NCName_exact=w,e.NotationDecl=se,e.Reference=y,e.PEReference=b,e.PI=ee,e.PUBLIC=z,e.PubidLiteral=k,e.PubidLiteral_match=V,e.QName=T,e.QName_exact=E,e.QName_group=D,e.S=f,e.SChar_s=d,e.S_OPT=p,e.SYSTEM=R,e.SystemLiteral=O,e.SystemLiteral_match=ie,e.InvalidChar=l,e.UNICODE_REPLACEMENT_CHARACTER=s,e.UNICODE_SUPPORT=n,e.XMLDecl=de})),Za=/* @__PURE__ */ t((e=>{var t=Ja(),n=t.find,r=t.hasDefaultHTMLNamespace,i=t.hasOwn,a=t.isHTMLMimeType,o=t.isHTMLRawTextElement,s=t.isHTMLVoidElement,c=t.MIME_TYPE,l=t.NAMESPACE,u=Symbol(),d=Ya(),f=d.DOMException,p=d.DOMExceptionName,m=Xa();function h(e){if(e!==u)throw TypeError(`Illegal constructor`)}function g(e){return e!==``}function _(e){return e?e.split(/[\t\n\f\r ]+/).filter(g):[]}function v(e,t){return i(e,t)||(e[t]=!0),e}function y(e){if(!e)return[];var t=_(e);return Object.keys(t.reduce(v,{}))}function b(e){return function(t){return e&&e.indexOf(t)!==-1}}function x(e){if(!m.QName_exact.test(e))throw new f(f.INVALID_CHARACTER_ERR,`invalid character in qualified name "`+e+`"`)}function S(e,n){x(n),e||=null;var r=null,i=n;if(n.indexOf(`:`)>=0){var a=n.split(`:`);r=a[0],i=a[1]}if(r!==null&&e===null)throw new f(f.NAMESPACE_ERR,`prefix is non-null and namespace is null`);if(r===`xml`&&e!==t.NAMESPACE.XML)throw new f(f.NAMESPACE_ERR,`prefix is "xml" and namespace is not the XML namespace`);if((r===`xmlns`||n===`xmlns`)&&e!==t.NAMESPACE.XMLNS)throw new f(f.NAMESPACE_ERR,`either qualifiedName or prefix is "xmlns" and namespace is not the XMLNS namespace`);if(e===t.NAMESPACE.XMLNS&&r!==`xmlns`&&n!==`xmlns`)throw new f(f.NAMESPACE_ERR,`namespace is the XMLNS namespace and neither qualifiedName nor prefix is "xmlns"`);return[e,r,i]}function C(e,t){for(var n in e)i(e,n)&&(t[n]=e[n])}function w(e,t){var n=e.prototype;if(!(n instanceof t)){function r(){}r.prototype=t.prototype,r=new r,C(n,r),e.prototype=n=r}n.constructor!=e&&(typeof e!=`function`&&console.error(`unknown Class:`+e),n.constructor=e)}var T={},E=T.ELEMENT_NODE=1,D=T.ATTRIBUTE_NODE=2,O=T.TEXT_NODE=3,ee=T.CDATA_SECTION_NODE=4,te=T.ENTITY_REFERENCE_NODE=5,k=T.ENTITY_NODE=6,A=T.PROCESSING_INSTRUCTION_NODE=7,j=T.COMMENT_NODE=8,M=T.DOCUMENT_NODE=9,N=T.DOCUMENT_TYPE_NODE=10,P=T.DOCUMENT_FRAGMENT_NODE=11,ne=T.NOTATION_NODE=12,F=t.freeze({DOCUMENT_POSITION_DISCONNECTED:1,DOCUMENT_POSITION_PRECEDING:2,DOCUMENT_POSITION_FOLLOWING:4,DOCUMENT_POSITION_CONTAINS:8,DOCUMENT_POSITION_CONTAINED_BY:16,DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:32});function I(e,t){if(t.length<e.length)return I(t,e);var n=null;for(var r in e){if(e[r]!==t[r])return n;n=e[r]}return n}function L(e){return e.guid||=Math.random(),e.guid}function R(){}R.prototype={length:0,item:function(e){return e>=0&&e<this.length?this[e]:null},toString:function(e){for(var t=typeof e==`function`?{requireWellFormed:!1,splitCDATASections:!0,nodeFilter:e}:e?{requireWellFormed:!!e.requireWellFormed,splitCDATASections:e.splitCDATASections!==!1,nodeFilter:e.nodeFilter||null}:{requireWellFormed:!1,splitCDATASections:!0,nodeFilter:null},n=[],r=0;r<this.length;r++)We(this[r],n,null,t);return n.join(``)},filter:function(e){return Array.prototype.filter.call(this,e)},indexOf:function(e){return Array.prototype.indexOf.call(this,e)}},R.prototype[Symbol.iterator]=function(){var e=this,t=0;return{next:function(){return t<e.length?{value:e[t++],done:!1}:{done:!0}},return:function(){return{done:!0}}}};function z(e,t){this._node=e,this._refresh=t,B(this)}function B(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!==t){var n=e._refresh(e._node);if(qe(e,`length`,n.length),!e.$$length||n.length<e.$$length)for(var r=n.length;r in e;r++)i(e,r)&&delete e[r];C(n,e),e._inc=t}}z.prototype.item=function(e){return B(this),this[e]||null},w(z,R);function re(){this._nsIndex=Object.create(null),this._noNsIndex=Object.create(null)}function V(e,t){for(var n=0;n<e.length;){if(e[n]===t)return n;n++}}function ie(e,t,n){if(!t)return e._noNsIndex;var r=e._nsIndex[t];return!r&&n&&(r=e._nsIndex[t]=Object.create(null)),r}function ae(e,t,n){var r=ie(e,t,!1);return r&&r[n]||null}function H(e,t){ie(e,t.namespaceURI,!0)[t.localName]=t}function oe(e,t){var n=ie(e,t.namespaceURI,!1);n&&delete n[t.localName]}function se(e,t,n,r){if(r?t[V(t,r)]=n:(t[t.length]=n,t.length++),H(t,n),e){n.ownerElement=e;var i=e.ownerDocument;i&&(r&&me(i,e,r),pe(i,e,n))}}function ce(e,t,n){var r=V(t,n);if(r>=0){for(var i=t.length-1;r<=i;)t[r]=t[++r];if(t.length=i,oe(t,n),e){var a=e.ownerDocument;a&&me(a,e,n),n.ownerElement=null}}}re.prototype={length:0,item:R.prototype.item,getNamedItem:function(e){this._ownerElement&&this._ownerElement._isInHTMLDocumentAndNamespace()&&(e=e.toLowerCase());for(var t=0;t<this.length;){var n=this[t];if(n.nodeName===e)return n;t++}return null},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!==this._ownerElement)throw new f(f.INUSE_ATTRIBUTE_ERR);var n=ae(this,e.namespaceURI,e.localName);return n===e?e:(se(this._ownerElement,this,e,n),n)},setNamedItemNS:function(e){return this.setNamedItem(e)},removeNamedItem:function(e){var t=this.getNamedItem(e);if(!t)throw new f(f.NOT_FOUND_ERR,e);return ce(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var n=this.getNamedItemNS(e,t);if(!n)throw new f(f.NOT_FOUND_ERR,e?e+` : `+t:t);return ce(this._ownerElement,this,n),n},getNamedItemNS:function(e,t){e||=null;for(var n=0;n<this.length;){var r=this[n];if(r.localName===t&&r.namespaceURI===e)return r;n++}return null}},re.prototype[Symbol.iterator]=function(){var e=this,t=0;return{next:function(){return t<e.length?{value:e[t++],done:!1}:{done:!0}},return:function(){return{done:!0}}}};function le(){}le.prototype={hasFeature:function(e,t){return!0},createDocument:function(e,t,n){var r=c.XML_APPLICATION;e===l.HTML?r=c.XML_XHTML_APPLICATION:e===l.SVG&&(r=c.XML_SVG_IMAGE);var i=new fe(u,{contentType:r});if(i.implementation=this,i.childNodes=new R,i.doctype=n||null,n&&i.appendChild(n),t){var a=i.createElementNS(e,t);i.appendChild(a)}return i},createDocumentType:function(e,t,n,r){x(e);var i=new Pe(u);return i.name=e,i.nodeName=e,i.publicId=t||``,i.systemId=n||``,i.internalSubset=r||``,i.childNodes=new R,i},createHTMLDocument:function(e){var t=new fe(u,{contentType:c.HTML});if(t.implementation=this,t.childNodes=new R,e!==!1){t.doctype=this.createDocumentType(`html`),t.doctype.ownerDocument=t,t.appendChild(t.doctype);var n=t.createElement(`html`);t.appendChild(n);var r=t.createElement(`head`);if(n.appendChild(r),typeof e==`string`){var i=t.createElement(`title`);i.appendChild(t.createTextNode(e)),r.appendChild(i)}n.appendChild(t.createElement(`body`))}return t}};function U(e){h(e)}U.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,parentNode:null,get parentElement(){return this.parentNode&&this.parentNode.nodeType===this.ELEMENT_NODE?this.parentNode:null},childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,baseURI:`about:blank`,get isConnected(){var e=this.getRootNode();return e&&e.nodeType===e.DOCUMENT_NODE},contains:function(e){if(!e)return!1;var t=e;do{if(this===t)return!0;t=t.parentNode}while(t);return!1},getRootNode:function(e){var t=this;do{if(!t.parentNode)return t;t=t.parentNode}while(t)},isEqualNode:function(e){if(!e)return!1;for(var t=[{node:this,other:e}];t.length>0;){var n=t.pop(),r=n.node,i=n.other;if(r.nodeType!==i.nodeType)return!1;switch(r.nodeType){case r.DOCUMENT_TYPE_NODE:if(r.name!==i.name||r.publicId!==i.publicId||r.systemId!==i.systemId)return!1;break;case r.ELEMENT_NODE:if(r.namespaceURI!==i.namespaceURI||r.prefix!==i.prefix||r.localName!==i.localName||r.attributes.length!==i.attributes.length)return!1;for(var a=0;a<r.attributes.length;a++){var o=r.attributes.item(a),s=i.getAttributeNodeNS(o.namespaceURI,o.localName);if(!s)return!1;t.push({node:o,other:s})}break;case r.ATTRIBUTE_NODE:if(r.namespaceURI!==i.namespaceURI||r.localName!==i.localName||r.value!==i.value)return!1;break;case r.PROCESSING_INSTRUCTION_NODE:if(r.target!==i.target||r.data!==i.data)return!1;break;case r.TEXT_NODE:case r.CDATA_SECTION_NODE:case r.COMMENT_NODE:if(r.data!==i.data)return!1}if(r.childNodes.length!==i.childNodes.length)return!1;for(var a=r.childNodes.length-1;a>=0;a--)t.push({node:r.childNodes[a],other:i.childNodes[a]})}return!0},isSameNode:function(e){return this===e},insertBefore:function(e,t){return De(this,e,t)},replaceChild:function(e,t){De(this,e,t,Ee),t&&this.removeChild(t)},removeChild:function(e){return ge(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(e){return Ke(this.ownerDocument||this,this,e)},normalize:function(){W(this,null,{enter:function(e){for(var t=e.firstChild;t;){var n=t.nextSibling;if(n!==null&&n.nodeType===O&&t.nodeType===O){for(var r=[],i=n;i!==null&&i.nodeType===O;)r.push(i.data),i=i.nextSibling;for(var a=t.nextSibling;a!==i;){var o=a.nextSibling;a.parentNode=null,a.previousSibling=null,a.nextSibling=null,a=o}t.nextSibling=i,i===null?e.lastChild=t:i.previousSibling=t,t.appendData(r.join(``)),he(e.ownerDocument,e),t=i}else t=n}return!0}})},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},lookupPrefix:function(e){for(var t=this;t;){var n=t._nsMap;if(n){for(var r in n)if(i(n,r)&&n[r]===e)return r}t=t.nodeType==D?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var n=t._nsMap;if(n&&i(n,e))return n[e];t=t.nodeType==D?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return this.lookupPrefix(e)==null},compareDocumentPosition:function(e){if(this===e)return 0;var t=e,n=this,r=null,i=null;if(t instanceof ke&&(r=t,t=r.ownerElement),n instanceof ke&&(i=n,n=i.ownerElement,r&&t&&n===t))for(var a=0,o;o=n.attributes[a];a++){if(o===r)return F.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+F.DOCUMENT_POSITION_PRECEDING;if(o===i)return F.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+F.DOCUMENT_POSITION_FOLLOWING}if(!t||!n||n.ownerDocument!==t.ownerDocument)return F.DOCUMENT_POSITION_DISCONNECTED+F.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+(L(n.ownerDocument)>L(t.ownerDocument)?F.DOCUMENT_POSITION_FOLLOWING:F.DOCUMENT_POSITION_PRECEDING);if(i&&t===n)return F.DOCUMENT_POSITION_CONTAINS+F.DOCUMENT_POSITION_PRECEDING;if(r&&t===n)return F.DOCUMENT_POSITION_CONTAINED_BY+F.DOCUMENT_POSITION_FOLLOWING;for(var s=[],c=t.parentNode;c;){if(!i&&c===n)return F.DOCUMENT_POSITION_CONTAINED_BY+F.DOCUMENT_POSITION_FOLLOWING;s.push(c),c=c.parentNode}s.reverse();for(var l=[],u=n.parentNode;u;){if(!r&&u===t)return F.DOCUMENT_POSITION_CONTAINS+F.DOCUMENT_POSITION_PRECEDING;l.push(u),u=u.parentNode}l.reverse();var d=I(s,l);for(var f in d.childNodes){var p=d.childNodes[f];if(p===n)return F.DOCUMENT_POSITION_FOLLOWING;if(p===t)return F.DOCUMENT_POSITION_PRECEDING;if(l.indexOf(p)>=0)return F.DOCUMENT_POSITION_FOLLOWING;if(s.indexOf(p)>=0)return F.DOCUMENT_POSITION_PRECEDING}return 0}};function ue(e){return e==`<`&&`<`||e==`>`&&`>`||e==`&`&&`&`||e==`"`&&`"`||`&#`+e.charCodeAt()+`;`}C(T,U),C(T,U.prototype),C(F,U),C(F,U.prototype);function de(e,t){W(e,null,{enter:function(e){return!t(e)||W.STOP}})}function W(e,t,n){for(var r=[{node:e,context:t,phase:W.ENTER}];r.length>0;){var i=r.pop();if(i.phase===W.ENTER){var a=n.enter(i.node,i.context);if(a===W.STOP)return W.STOP;if(r.push({node:i.node,context:a,phase:W.EXIT}),a==null)continue;for(var o=i.node.lastChild;o;)r.push({node:o,context:a,phase:W.ENTER}),o=o.previousSibling}else n.exit&&n.exit(i.node,i.context)}}W.STOP=Symbol(`walkDOM.STOP`),W.ENTER=0,W.EXIT=1;function fe(e,t){h(e);var n=t||{};this.ownerDocument=this,this.contentType=n.contentType||c.XML_APPLICATION,this.type=a(this.contentType)?`html`:`xml`}function pe(e,t,n){e&&e._inc++,n.namespaceURI===l.XMLNS&&(t._nsMap[n.prefix?n.localName:``]=n.value)}function me(e,t,n,r){e&&e._inc++,n.namespaceURI===l.XMLNS&&delete t._nsMap[n.prefix?n.localName:``]}function he(e,t,n){if(e&&e._inc){e._inc++;var r=t.childNodes;if(n&&!n.nextSibling)r[r.length++]=n;else{for(var i=t.firstChild,a=0;i;)r[a++]=i,i=i.nextSibling;r.length=a,delete r[r.length]}}}function ge(e,t){if(e!==t.parentNode)throw new f(f.NOT_FOUND_ERR,`child's parent is not parent`);var n=t.previousSibling,r=t.nextSibling;return n?n.nextSibling=r:e.firstChild=r,r?r.previousSibling=n:e.lastChild=n,he(e.ownerDocument,e),t.parentNode=null,t.previousSibling=null,t.nextSibling=null,t}function _e(e){return e&&(e.nodeType===U.DOCUMENT_NODE||e.nodeType===U.DOCUMENT_FRAGMENT_NODE||e.nodeType===U.ELEMENT_NODE)}function ve(e){return e&&(e.nodeType===U.CDATA_SECTION_NODE||e.nodeType===U.COMMENT_NODE||e.nodeType===U.DOCUMENT_FRAGMENT_NODE||e.nodeType===U.DOCUMENT_TYPE_NODE||e.nodeType===U.ELEMENT_NODE||e.nodeType===U.PROCESSING_INSTRUCTION_NODE||e.nodeType===U.TEXT_NODE)}function ye(e){return e&&e.nodeType===U.DOCUMENT_TYPE_NODE}function be(e){return e&&e.nodeType===U.ELEMENT_NODE}function xe(e){return e&&e.nodeType===U.TEXT_NODE}function Se(e,t){var r=e.childNodes||[];if(n(r,be)||ye(t))return!1;var i=n(r,ye);return!(t&&i&&r.indexOf(i)>r.indexOf(t))}function Ce(e,t){var r=e.childNodes||[];function i(e){return be(e)&&e!==t}if(n(r,i))return!1;var a=n(r,ye);return!(t&&a&&r.indexOf(a)>r.indexOf(t))}function we(e,t,n){if(!_e(e))throw new f(f.HIERARCHY_REQUEST_ERR,`Unexpected parent node type `+e.nodeType);if(n&&n.parentNode!==e)throw new f(f.NOT_FOUND_ERR,`child not in parent`);if(!ve(t)||ye(t)&&e.nodeType!==U.DOCUMENT_NODE)throw new f(f.HIERARCHY_REQUEST_ERR,`Unexpected node type `+t.nodeType+` for parent node type `+e.nodeType)}function Te(e,t,r){var i=e.childNodes||[],a=t.childNodes||[];if(t.nodeType===U.DOCUMENT_FRAGMENT_NODE){var o=a.filter(be);if(o.length>1||n(a,xe))throw new f(f.HIERARCHY_REQUEST_ERR,`More than one element or text in fragment`);if(o.length===1&&!Se(e,r))throw new f(f.HIERARCHY_REQUEST_ERR,`Element in fragment can not be inserted before doctype`)}if(be(t)&&!Se(e,r))throw new f(f.HIERARCHY_REQUEST_ERR,`Only one element can be added and only after doctype`);if(ye(t)){if(n(i,ye))throw new f(f.HIERARCHY_REQUEST_ERR,`Only one doctype is allowed`);var s=n(i,be);if(r&&i.indexOf(s)<i.indexOf(r))throw new f(f.HIERARCHY_REQUEST_ERR,`Doctype can only be inserted before an element`);if(!r&&s)throw new f(f.HIERARCHY_REQUEST_ERR,`Doctype can not be appended since element is present`)}}function Ee(e,t,r){var i=e.childNodes||[],a=t.childNodes||[];if(t.nodeType===U.DOCUMENT_FRAGMENT_NODE){var o=a.filter(be);if(o.length>1||n(a,xe))throw new f(f.HIERARCHY_REQUEST_ERR,`More than one element or text in fragment`);if(o.length===1&&!Ce(e,r))throw new f(f.HIERARCHY_REQUEST_ERR,`Element in fragment can not be inserted before doctype`)}if(be(t)&&!Ce(e,r))throw new f(f.HIERARCHY_REQUEST_ERR,`Only one element can be added and only after doctype`);if(ye(t)){function e(e){return ye(e)&&e!==r}if(n(i,e))throw new f(f.HIERARCHY_REQUEST_ERR,`Only one doctype is allowed`);var s=n(i,be);if(r&&i.indexOf(s)<i.indexOf(r))throw new f(f.HIERARCHY_REQUEST_ERR,`Doctype can only be inserted before an element`)}}function De(e,t,n,r){we(e,t,n),e.nodeType===U.DOCUMENT_NODE&&(r||Te)(e,t,n);var i=t.parentNode;if(i&&i.removeChild(t),t.nodeType===P){var a=t.firstChild;if(a==null)return t;var o=t.lastChild}else a=o=t;var s=n?n.previousSibling:e.lastChild;a.previousSibling=s,o.nextSibling=n,s?s.nextSibling=a:e.firstChild=a,n==null?e.lastChild=o:n.previousSibling=o;do a.parentNode=e;while(a!==o&&(a=a.nextSibling));return he(e.ownerDocument||e,e,t),t.nodeType==P&&(t.firstChild=t.lastChild=null),t}fe.prototype={implementation:null,nodeName:`#document`,nodeType:M,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType===P){for(var n=e.firstChild;n;){var r=n.nextSibling;this.insertBefore(n,t),n=r}return e}return De(this,e,t),e.ownerDocument=this,this.documentElement===null&&e.nodeType===E&&(this.documentElement=e),e},removeChild:function(e){var t=ge(this,e);return t===this.documentElement&&(this.documentElement=null),t},replaceChild:function(e,t){De(this,e,t,Ee),e.ownerDocument=this,t&&this.removeChild(t),be(e)&&(this.documentElement=e)},importNode:function(e,t){return Ge(this,e,t)},getElementById:function(e){var t=null;return de(this.documentElement,function(n){if(n.nodeType==E&&n.getAttribute(`id`)==e)return t=n,!0}),t},createElement:function(e){var t=new Oe(u);t.ownerDocument=this,this.type===`html`&&(e=e.toLowerCase()),r(this.contentType)&&(t.namespaceURI=l.HTML),t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new R;var n=t.attributes=new re;return n._ownerElement=t,t},createDocumentFragment:function(){var e=new Re(u);return e.ownerDocument=this,e.childNodes=new R,e},createTextNode:function(e){var t=new je(u);return t.ownerDocument=this,t.childNodes=new R,t.appendData(e),t},createComment:function(e){var t=new Me(u);return t.ownerDocument=this,t.childNodes=new R,t.appendData(e),t},createCDATASection:function(e){if(e.indexOf(`]]>`)!==-1)throw new f(f.INVALID_CHARACTER_ERR,`data contains "]]>"`);var t=new Ne(u);return t.ownerDocument=this,t.childNodes=new R,t.appendData(e),t},createProcessingInstruction:function(e,t){var n=new ze(u);return n.ownerDocument=this,n.childNodes=new R,n.nodeName=n.target=e,n.nodeValue=n.data=t,n},createAttribute:function(e){if(!m.QName_exact.test(e))throw new f(f.INVALID_CHARACTER_ERR,`invalid character in name "`+e+`"`);return this.type===`html`&&(e=e.toLowerCase()),this._createAttribute(e)},_createAttribute:function(e){var t=new ke(u);return t.ownerDocument=this,t.childNodes=new R,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){if(!m.Name_exact.test(e))throw new f(f.INVALID_CHARACTER_ERR,`not a valid xml name "`+e+`"`);if(this.type===`html`)throw new f(`document is an html document`,p.NotSupportedError);var t=new Le(u);return t.ownerDocument=this,t.childNodes=new R,t.nodeName=e,t},createElementNS:function(e,t){var n=S(e,t),r=new Oe(u),i=r.attributes=new re;return r.childNodes=new R,r.ownerDocument=this,r.nodeName=t,r.tagName=t,r.namespaceURI=n[0],r.prefix=n[1],r.localName=n[2],i._ownerElement=r,r},createAttributeNS:function(e,t){var n=S(e,t),r=new ke(u);return r.ownerDocument=this,r.childNodes=new R,r.nodeName=t,r.name=t,r.specified=!0,r.namespaceURI=n[0],r.prefix=n[1],r.localName=n[2],r}},w(fe,U);function Oe(e){h(e),this._nsMap=Object.create(null)}Oe.prototype={nodeType:E,attributes:null,getQualifiedName:function(){return this.prefix?this.prefix+`:`+this.localName:this.localName},_isInHTMLDocumentAndNamespace:function(){return this.ownerDocument.type===`html`&&this.namespaceURI===l.HTML},hasAttributes:function(){return!!(this.attributes&&this.attributes.length)},hasAttribute:function(e){return!!this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t?t.value:null},getAttributeNode:function(e){return this._isInHTMLDocumentAndNamespace()&&(e=e.toLowerCase()),this.attributes.getNamedItem(e)},setAttribute:function(e,t){this._isInHTMLDocumentAndNamespace()&&(e=e.toLowerCase());var n=this.getAttributeNode(e);n?n.value=n.nodeValue=``+t:(n=this.ownerDocument._createAttribute(e),n.value=n.nodeValue=``+t,this.setAttributeNode(n))},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);n&&this.removeAttributeNode(n)},hasAttributeNS:function(e,t){return this.getAttributeNodeNS(e,t)!=null},getAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);return n?n.value:null},setAttributeNS:function(e,t,n){var r=S(e,t)[2],i=this.getAttributeNodeNS(e,r);i?i.value=i.nodeValue=``+n:(i=this.ownerDocument.createAttributeNS(e,t),i.value=i.nodeValue=``+n,this.setAttributeNode(i))},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByClassName:function(e){var t=y(e);return new z(this,function(n){var r=[];return t.length>0&&de(n,function(i){if(i!==n&&i.nodeType===E){var a=i.getAttribute(`class`);if(a){var o=e===a;if(!o){var s=y(a);o=t.every(b(s))}o&&r.push(i)}}}),r})},getElementsByTagName:function(e){var t=(this.nodeType===M?this:this.ownerDocument).type===`html`,n=e.toLowerCase();return new z(this,function(r){var i=[];return de(r,function(a){a!==r&&a.nodeType===E&&(e===`*`||a.getQualifiedName()===(t&&a.namespaceURI===l.HTML?n:e))&&i.push(a)}),i})},getElementsByTagNameNS:function(e,t){return new z(this,function(n){var r=[];return de(n,function(i){i!==n&&i.nodeType===E&&(e===`*`||i.namespaceURI===e)&&(t===`*`||i.localName==t)&&r.push(i)}),r})}},fe.prototype.getElementsByClassName=Oe.prototype.getElementsByClassName,fe.prototype.getElementsByTagName=Oe.prototype.getElementsByTagName,fe.prototype.getElementsByTagNameNS=Oe.prototype.getElementsByTagNameNS,w(Oe,U);function ke(e){h(e),this.namespaceURI=null,this.prefix=null,this.ownerElement=null}ke.prototype.nodeType=D,w(ke,U);function Ae(e){h(e)}Ae.prototype={data:``,substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},deleteData:function(e,t){this.replaceData(e,t,``)},replaceData:function(e,t,n){var r=this.data.substring(0,e),i=this.data.substring(e+t);n=r+n+i,this.nodeValue=this.data=n,this.length=n.length}},w(Ae,U);function je(e){h(e)}je.prototype={nodeName:`#text`,nodeType:O,splitText:function(e){var t=this.data,n=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var r=this.ownerDocument.createTextNode(n);return this.parentNode&&this.parentNode.insertBefore(r,this.nextSibling),r}},w(je,Ae);function Me(e){h(e)}Me.prototype={nodeName:`#comment`,nodeType:j},w(Me,Ae);function Ne(e){h(e)}Ne.prototype={nodeName:`#cdata-section`,nodeType:ee},w(Ne,je);function Pe(e){h(e)}Pe.prototype.nodeType=N,w(Pe,U);function Fe(e){h(e)}Fe.prototype.nodeType=ne,w(Fe,U);function Ie(e){h(e)}Ie.prototype.nodeType=k,w(Ie,U);function Le(e){h(e)}Le.prototype.nodeType=te,w(Le,U);function Re(e){h(e)}Re.prototype.nodeName=`#document-fragment`,Re.prototype.nodeType=P,w(Re,U);function ze(e){h(e)}ze.prototype.nodeType=A,w(ze,Ae);function Be(){}Be.prototype.serializeToString=function(e,t){return Ve.call(e,t)},U.prototype.toString=Ve;function Ve(e){var t=typeof e==`function`?{requireWellFormed:!1,splitCDATASections:!0,nodeFilter:e}:e==null?{requireWellFormed:!1,splitCDATASections:!0,nodeFilter:null}:{requireWellFormed:!!e.requireWellFormed,splitCDATASections:e.splitCDATASections!==!1,nodeFilter:e.nodeFilter||null},n=[],r=this.nodeType===M&&this.documentElement||this,i=r.prefix,a=r.namespaceURI;if(a&&i==null){var i=r.lookupPrefix(a);if(i==null)var o=[{namespace:a,prefix:null}]}return We(this,n,o,t),n.join(``)}function He(e,t,n){var r=e.prefix||``,i=e.namespaceURI;if(!i||r===`xml`&&i===l.XML||i===l.XMLNS)return!1;for(var a=n.length;a--;){var o=n[a];if(o.prefix===r)return o.namespace!==i}return!0}function Ue(e,t,n,r){if(r&&!m.QName_exact.test(t))throw new f(`The attribute name "`+t+`" is not a valid XML QName`,p.InvalidStateError);e.push(` `,t,`="`,n.replace(/[<>&"\t\n\r]/g,ue),`"`)}function We(e,t,n,r){n||=[];var i=r.nodeFilter,a=r.requireWellFormed,c=r.splitCDATASections,u=(e.nodeType===M?e:e.ownerDocument).type===`html`;W(e,{ns:n},{enter:function(e,n){var d=n.ns;if(i){if(e=i(e),e){if(typeof e==`string`)return t.push(e),null}else return null}switch(e.nodeType){case E:var h=e.attributes,g=h.length,_=e.tagName,v=_;if(!u&&!e.prefix&&e.namespaceURI){for(var y,b=0;b<h.length;b++)if(h.item(b).name===`xmlns`){y=h.item(b).value;break}if(!y)for(var x=d.length-1;x>=0;x--){var S=d[x];if(S.prefix===``&&S.namespace===e.namespaceURI){y=S.namespace;break}}if(y!==e.namespaceURI)for(var x=d.length-1;x>=0;x--){var S=d[x];if(S.namespace===e.namespaceURI){S.prefix&&(v=S.prefix+`:`+_);break}}}if(a&&!m.QName_exact.test(v))throw new f(`The element name "`+v+`" is not a valid XML QName`,p.InvalidStateError);t.push(`<`,v);for(var C=d.slice(),w=0;w<g;w++){var T=h.item(w);T.prefix==`xmlns`?C.push({prefix:T.localName,namespace:T.value}):T.nodeName==`xmlns`&&C.push({prefix:``,namespace:T.value})}for(var w=0;w<g;w++){var T=h.item(w);if(He(T,u,C)){var k=T.prefix||``,ne=T.namespaceURI;Ue(t,k?`xmlns:`+k:`xmlns`,ne,a),C.push({prefix:k,namespace:ne})}var F=i?i(T):T;F&&(typeof F==`string`?t.push(F):Ue(t,F.name,F.value,a))}if(_===v&&He(e,u,C)){var I=e.prefix||``,ne=e.namespaceURI;Ue(t,I?`xmlns:`+I:`xmlns`,ne,a),C.push({prefix:I,namespace:ne})}var L=!e.firstChild;if(L&&(u||e.namespaceURI===l.HTML)&&(L=s(_)),L)return t.push(`/>`),null;if(t.push(`>`),u&&o(_)){for(var R=e.firstChild;R;)R.data?t.push(R.data):We(R,t,C.slice(),r),R=R.nextSibling;return t.push(`</`,v,`>`),null}return{ns:C,tag:v};case M:case P:if(a&&e.nodeType===M&&e.documentElement==null)throw new f(`The Document has no documentElement`,p.InvalidStateError);return{ns:d};case D:return Ue(t,e.name,e.value,a),null;case O:if(a&&m.InvalidChar.test(e.data))throw new f(`The Text node data contains characters outside the XML Char production`,p.InvalidStateError);return t.push(e.data.replace(/[<&>]/g,ue)),null;case ee:if(a&&e.data.indexOf(`]]>`)!==-1)throw new f(`The CDATASection data contains "]]>"`,p.InvalidStateError);return c?t.push(m.CDATA_START,e.data.replace(/]]>/g,`]]]]><![CDATA[>`),m.CDATA_END):t.push(m.CDATA_START,e.data,m.CDATA_END),null;case j:if(a){if(m.InvalidChar.test(e.data))throw new f(`The comment node data contains characters outside the XML Char production`,p.InvalidStateError);if(e.data.indexOf(`--`)!==-1||e.data[e.data.length-1]===`-`)throw new f(`The comment node data contains "--" or ends with "-"`,p.InvalidStateError)}return t.push(m.COMMENT_START,e.data,m.COMMENT_END),null;case N:var z=e.publicId,B=e.systemId;if(a){if(!m.Name_exact.test(e.name))throw new f(`The doctype name "`+e.name+`" is not a valid XML Name`,p.InvalidStateError);if(z&&!m.PubidLiteral_match.test(z))throw new f(`DocumentType publicId is not a valid PubidLiteral`,p.InvalidStateError);if(B&&B!==`.`&&!m.SystemLiteral_match.test(B))throw new f(`DocumentType systemId is not a valid SystemLiteral`,p.InvalidStateError);if(e.internalSubset&&e.internalSubset.indexOf(`]>`)!==-1)throw new f(`DocumentType internalSubset contains "]>"`,p.InvalidStateError)}return t.push(m.DOCTYPE_DECL_START,` `,e.name),z?(t.push(` `,m.PUBLIC,` `,z),B&&B!==`.`&&t.push(` `,B)):B&&B!==`.`&&t.push(` `,m.SYSTEM,` `,B),e.internalSubset&&t.push(` [`,e.internalSubset,`]`),t.push(`>`),null;case A:if(a){if(!m.NCName_exact.test(e.target)||e.target.toLowerCase()===`xml`)throw new f(`The processing instruction target "`+e.target+`" is not a valid XML NCName or is reserved`,p.InvalidStateError);if(m.InvalidChar.test(e.data))throw new f(`The ProcessingInstruction data contains characters outside the XML Char production`,p.InvalidStateError);if(e.data.indexOf(`?>`)!==-1)throw new f(`The ProcessingInstruction data contains "?>"`,p.InvalidStateError)}return t.push(`<?`,e.target,` `,e.data,`?>`),null;case te:if(a&&!m.Name_exact.test(e.nodeName))throw new f(`The entity reference name "`+e.nodeName+`" is not a valid XML Name`,p.InvalidStateError);return t.push(`&`,e.nodeName,`;`),null;default:return t.push(`??`,e.nodeName),null}},exit:function(e,n){n&&n.tag&&t.push(`</`,n.tag,`>`)}})}function Ge(e,t,n){var r;return W(t,null,{enter:function(t,i){var a=t.cloneNode(!1);return a.ownerDocument=e,a.parentNode=null,i===null?r=a:i.appendChild(a),t.nodeType===D||n?a:null}}),r}function Ke(e,t,n){var r;return W(t,null,{enter:function(t,a){var o=new t.constructor(u);for(var s in t)if(i(t,s)){var c=t[s];typeof c!=`object`&&c!=o[s]&&(o[s]=c)}t.childNodes&&(o.childNodes=new R),o.ownerDocument=e;var l=n;switch(o.nodeType){case E:var d=t.attributes,f=o.attributes=new re,p=d.length;f._ownerElement=o;for(var m=0;m<p;m++)o.setAttributeNode(Ke(e,d.item(m),!0));break;case D:l=!0}return a===null?r=o:a.appendChild(o),l?o:null}}),r}function qe(e,t,n){e[t]=n}function Je(e){for(var t=[],n=e.firstChild;n;)n.nodeType===E&&t.push(n),n=n.nextSibling;return t}try{Object.defineProperty&&(Object.defineProperty(z.prototype,"length",{get:function(){return B(this),this.$$length}}),Object.defineProperty(U.prototype,"textContent",{get:function(){if(this.nodeType===E||this.nodeType===P){var e=[];return W(this,null,{enter:function(t){if(t.nodeType===E||t.nodeType===P)return!0;if(t.nodeType===A||t.nodeType===j)return null;e.push(t.nodeValue)}}),e.join(``)}return this.nodeValue},set:function(e){switch(this.nodeType){case E:case P:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),Object.defineProperty(Ae.prototype,"data",{get:function(){return this._data==null?``:this._data},set:function(e){this._data=e,this.length=typeof e==`string`?e.length:0}}),Object.defineProperty(Ae.prototype,"nodeValue",{get:function(){return this.data},set:function(e){this.data=e},enumerable:!0,configurable:!0}),Object.defineProperty(Oe.prototype,"children",{get:function(){return new z(this,Je)}}),Object.defineProperty(fe.prototype,"children",{get:function(){return new z(this,Je)}}),Object.defineProperty(Re.prototype,"children",{get:function(){return new z(this,Je)}}),qe=function(e,t,n){e[`$$`+t]=n})}catch{}e._updateLiveList=B,e.Attr=ke,e.CDATASection=Ne,e.CharacterData=Ae,e.Comment=Me,e.Document=fe,e.DocumentFragment=Re,e.DocumentType=Pe,e.DOMImplementation=le,e.Element=Oe,e.Entity=Ie,e.EntityReference=Le,e.LiveNodeList=z,e.NamedNodeMap=re,e.Node=U,e.NodeList=R,e.Notation=Fe,e.Text=je,e.ProcessingInstruction=ze,e.walkDOM=W,e.XMLSerializer=Be})),Qa=/* @__PURE__ */ t((e=>{var t=Ja().freeze;e.XML_ENTITIES=t({amp:`&`,apos:`'`,gt:`>`,lt:`<`,quot:`"`}),e.HTML_ENTITIES=t({Aacute:`Á`,aacute:`á`,Abreve:`Ă`,abreve:`ă`,ac:`∾`,acd:`∿`,acE:`∾̳`,Acirc:`Â`,acirc:`â`,acute:`´`,Acy:`А`,acy:`а`,AElig:`Æ`,aelig:`æ`,af:``,Afr:`𝔄`,afr:`𝔞`,Agrave:`À`,agrave:`à`,alefsym:`ℵ`,aleph:`ℵ`,Alpha:`Α`,alpha:`α`,Amacr:`Ā`,amacr:`ā`,amalg:`⨿`,AMP:`&`,amp:`&`,And:`⩓`,and:`∧`,andand:`⩕`,andd:`⩜`,andslope:`⩘`,andv:`⩚`,ang:`∠`,ange:`⦤`,angle:`∠`,angmsd:`∡`,angmsdaa:`⦨`,angmsdab:`⦩`,angmsdac:`⦪`,angmsdad:`⦫`,angmsdae:`⦬`,angmsdaf:`⦭`,angmsdag:`⦮`,angmsdah:`⦯`,angrt:`∟`,angrtvb:`⊾`,angrtvbd:`⦝`,angsph:`∢`,angst:`Å`,angzarr:`⍼`,Aogon:`Ą`,aogon:`ą`,Aopf:`𝔸`,aopf:`𝕒`,ap:`≈`,apacir:`⩯`,apE:`⩰`,ape:`≊`,apid:`≋`,apos:`'`,ApplyFunction:``,approx:`≈`,approxeq:`≊`,Aring:`Å`,aring:`å`,Ascr:`𝒜`,ascr:`𝒶`,Assign:`≔`,ast:`*`,asymp:`≈`,asympeq:`≍`,Atilde:`Ã`,atilde:`ã`,Auml:`Ä`,auml:`ä`,awconint:`∳`,awint:`⨑`,backcong:`≌`,backepsilon:`϶`,backprime:`‵`,backsim:`∽`,backsimeq:`⋍`,Backslash:`∖`,Barv:`⫧`,barvee:`⊽`,Barwed:`⌆`,barwed:`⌅`,barwedge:`⌅`,bbrk:`⎵`,bbrktbrk:`⎶`,bcong:`≌`,Bcy:`Б`,bcy:`б`,bdquo:`„`,becaus:`∵`,Because:`∵`,because:`∵`,bemptyv:`⦰`,bepsi:`϶`,bernou:`ℬ`,Bernoullis:`ℬ`,Beta:`Β`,beta:`β`,beth:`ℶ`,between:`≬`,Bfr:`𝔅`,bfr:`𝔟`,bigcap:`⋂`,bigcirc:`◯`,bigcup:`⋃`,bigodot:`⨀`,bigoplus:`⨁`,bigotimes:`⨂`,bigsqcup:`⨆`,bigstar:`★`,bigtriangledown:`▽`,bigtriangleup:`△`,biguplus:`⨄`,bigvee:`⋁`,bigwedge:`⋀`,bkarow:`⤍`,blacklozenge:`⧫`,blacksquare:`▪`,blacktriangle:`▴`,blacktriangledown:`▾`,blacktriangleleft:`◂`,blacktriangleright:`▸`,blank:`␣`,blk12:`▒`,blk14:`░`,blk34:`▓`,block:`█`,bne:`=⃥`,bnequiv:`≡⃥`,bNot:`⫭`,bnot:`⌐`,Bopf:`𝔹`,bopf:`𝕓`,bot:`⊥`,bottom:`⊥`,bowtie:`⋈`,boxbox:`⧉`,boxDL:`╗`,boxDl:`╖`,boxdL:`╕`,boxdl:`┐`,boxDR:`╔`,boxDr:`╓`,boxdR:`╒`,boxdr:`┌`,boxH:`═`,boxh:`─`,boxHD:`╦`,boxHd:`╤`,boxhD:`╥`,boxhd:`┬`,boxHU:`╩`,boxHu:`╧`,boxhU:`╨`,boxhu:`┴`,boxminus:`⊟`,boxplus:`⊞`,boxtimes:`⊠`,boxUL:`╝`,boxUl:`╜`,boxuL:`╛`,boxul:`┘`,boxUR:`╚`,boxUr:`╙`,boxuR:`╘`,boxur:`└`,boxV:`║`,boxv:`│`,boxVH:`╬`,boxVh:`╫`,boxvH:`╪`,boxvh:`┼`,boxVL:`╣`,boxVl:`╢`,boxvL:`╡`,boxvl:`┤`,boxVR:`╠`,boxVr:`╟`,boxvR:`╞`,boxvr:`├`,bprime:`‵`,Breve:`˘`,breve:`˘`,brvbar:`¦`,Bscr:`ℬ`,bscr:`𝒷`,bsemi:`⁏`,bsim:`∽`,bsime:`⋍`,bsol:`\\`,bsolb:`⧅`,bsolhsub:`⟈`,bull:`•`,bullet:`•`,bump:`≎`,bumpE:`⪮`,bumpe:`≏`,Bumpeq:`≎`,bumpeq:`≏`,Cacute:`Ć`,cacute:`ć`,Cap:`⋒`,cap:`∩`,capand:`⩄`,capbrcup:`⩉`,capcap:`⩋`,capcup:`⩇`,capdot:`⩀`,CapitalDifferentialD:`ⅅ`,caps:`∩︀`,caret:`⁁`,caron:`ˇ`,Cayleys:`ℭ`,ccaps:`⩍`,Ccaron:`Č`,ccaron:`č`,Ccedil:`Ç`,ccedil:`ç`,Ccirc:`Ĉ`,ccirc:`ĉ`,Cconint:`∰`,ccups:`⩌`,ccupssm:`⩐`,Cdot:`Ċ`,cdot:`ċ`,cedil:`¸`,Cedilla:`¸`,cemptyv:`⦲`,cent:`¢`,CenterDot:`·`,centerdot:`·`,Cfr:`ℭ`,cfr:`𝔠`,CHcy:`Ч`,chcy:`ч`,check:`✓`,checkmark:`✓`,Chi:`Χ`,chi:`χ`,cir:`○`,circ:`ˆ`,circeq:`≗`,circlearrowleft:`↺`,circlearrowright:`↻`,circledast:`⊛`,circledcirc:`⊚`,circleddash:`⊝`,CircleDot:`⊙`,circledR:`®`,circledS:`Ⓢ`,CircleMinus:`⊖`,CirclePlus:`⊕`,CircleTimes:`⊗`,cirE:`⧃`,cire:`≗`,cirfnint:`⨐`,cirmid:`⫯`,cirscir:`⧂`,ClockwiseContourIntegral:`∲`,CloseCurlyDoubleQuote:`”`,CloseCurlyQuote:`’`,clubs:`♣`,clubsuit:`♣`,Colon:`∷`,colon:`:`,Colone:`⩴`,colone:`≔`,coloneq:`≔`,comma:`,`,commat:`@`,comp:`∁`,compfn:`∘`,complement:`∁`,complexes:`ℂ`,cong:`≅`,congdot:`⩭`,Congruent:`≡`,Conint:`∯`,conint:`∮`,ContourIntegral:`∮`,Copf:`ℂ`,copf:`𝕔`,coprod:`∐`,Coproduct:`∐`,COPY:`©`,copy:`©`,copysr:`℗`,CounterClockwiseContourIntegral:`∳`,crarr:`↵`,Cross:`⨯`,cross:`✗`,Cscr:`𝒞`,cscr:`𝒸`,csub:`⫏`,csube:`⫑`,csup:`⫐`,csupe:`⫒`,ctdot:`⋯`,cudarrl:`⤸`,cudarrr:`⤵`,cuepr:`⋞`,cuesc:`⋟`,cularr:`↶`,cularrp:`⤽`,Cup:`⋓`,cup:`∪`,cupbrcap:`⩈`,CupCap:`≍`,cupcap:`⩆`,cupcup:`⩊`,cupdot:`⊍`,cupor:`⩅`,cups:`∪︀`,curarr:`↷`,curarrm:`⤼`,curlyeqprec:`⋞`,curlyeqsucc:`⋟`,curlyvee:`⋎`,curlywedge:`⋏`,curren:`¤`,curvearrowleft:`↶`,curvearrowright:`↷`,cuvee:`⋎`,cuwed:`⋏`,cwconint:`∲`,cwint:`∱`,cylcty:`⌭`,Dagger:`‡`,dagger:`†`,daleth:`ℸ`,Darr:`↡`,dArr:`⇓`,darr:`↓`,dash:`‐`,Dashv:`⫤`,dashv:`⊣`,dbkarow:`⤏`,dblac:`˝`,Dcaron:`Ď`,dcaron:`ď`,Dcy:`Д`,dcy:`д`,DD:`ⅅ`,dd:`ⅆ`,ddagger:`‡`,ddarr:`⇊`,DDotrahd:`⤑`,ddotseq:`⩷`,deg:`°`,Del:`∇`,Delta:`Δ`,delta:`δ`,demptyv:`⦱`,dfisht:`⥿`,Dfr:`𝔇`,dfr:`𝔡`,dHar:`⥥`,dharl:`⇃`,dharr:`⇂`,DiacriticalAcute:`´`,DiacriticalDot:`˙`,DiacriticalDoubleAcute:`˝`,DiacriticalGrave:"`",DiacriticalTilde:`˜`,diam:`⋄`,Diamond:`⋄`,diamond:`⋄`,diamondsuit:`♦`,diams:`♦`,die:`¨`,DifferentialD:`ⅆ`,digamma:`ϝ`,disin:`⋲`,div:`÷`,divide:`÷`,divideontimes:`⋇`,divonx:`⋇`,DJcy:`Ђ`,djcy:`ђ`,dlcorn:`⌞`,dlcrop:`⌍`,dollar:`$`,Dopf:`𝔻`,dopf:`𝕕`,Dot:`¨`,dot:`˙`,DotDot:`⃜`,doteq:`≐`,doteqdot:`≑`,DotEqual:`≐`,dotminus:`∸`,dotplus:`∔`,dotsquare:`⊡`,doublebarwedge:`⌆`,DoubleContourIntegral:`∯`,DoubleDot:`¨`,DoubleDownArrow:`⇓`,DoubleLeftArrow:`⇐`,DoubleLeftRightArrow:`⇔`,DoubleLeftTee:`⫤`,DoubleLongLeftArrow:`⟸`,DoubleLongLeftRightArrow:`⟺`,DoubleLongRightArrow:`⟹`,DoubleRightArrow:`⇒`,DoubleRightTee:`⊨`,DoubleUpArrow:`⇑`,DoubleUpDownArrow:`⇕`,DoubleVerticalBar:`∥`,DownArrow:`↓`,Downarrow:`⇓`,downarrow:`↓`,DownArrowBar:`⤓`,DownArrowUpArrow:`⇵`,DownBreve:`̑`,downdownarrows:`⇊`,downharpoonleft:`⇃`,downharpoonright:`⇂`,DownLeftRightVector:`⥐`,DownLeftTeeVector:`⥞`,DownLeftVector:`↽`,DownLeftVectorBar:`⥖`,DownRightTeeVector:`⥟`,DownRightVector:`⇁`,DownRightVectorBar:`⥗`,DownTee:`⊤`,DownTeeArrow:`↧`,drbkarow:`⤐`,drcorn:`⌟`,drcrop:`⌌`,Dscr:`𝒟`,dscr:`𝒹`,DScy:`Ѕ`,dscy:`ѕ`,dsol:`⧶`,Dstrok:`Đ`,dstrok:`đ`,dtdot:`⋱`,dtri:`▿`,dtrif:`▾`,duarr:`⇵`,duhar:`⥯`,dwangle:`⦦`,DZcy:`Џ`,dzcy:`џ`,dzigrarr:`⟿`,Eacute:`É`,eacute:`é`,easter:`⩮`,Ecaron:`Ě`,ecaron:`ě`,ecir:`≖`,Ecirc:`Ê`,ecirc:`ê`,ecolon:`≕`,Ecy:`Э`,ecy:`э`,eDDot:`⩷`,Edot:`Ė`,eDot:`≑`,edot:`ė`,ee:`ⅇ`,efDot:`≒`,Efr:`𝔈`,efr:`𝔢`,eg:`⪚`,Egrave:`È`,egrave:`è`,egs:`⪖`,egsdot:`⪘`,el:`⪙`,Element:`∈`,elinters:`⏧`,ell:`ℓ`,els:`⪕`,elsdot:`⪗`,Emacr:`Ē`,emacr:`ē`,empty:`∅`,emptyset:`∅`,EmptySmallSquare:`◻`,emptyv:`∅`,EmptyVerySmallSquare:`▫`,emsp:` `,emsp13:` `,emsp14:` `,ENG:`Ŋ`,eng:`ŋ`,ensp:` `,Eogon:`Ę`,eogon:`ę`,Eopf:`𝔼`,eopf:`𝕖`,epar:`⋕`,eparsl:`⧣`,eplus:`⩱`,epsi:`ε`,Epsilon:`Ε`,epsilon:`ε`,epsiv:`ϵ`,eqcirc:`≖`,eqcolon:`≕`,eqsim:`≂`,eqslantgtr:`⪖`,eqslantless:`⪕`,Equal:`⩵`,equals:`=`,EqualTilde:`≂`,equest:`≟`,Equilibrium:`⇌`,equiv:`≡`,equivDD:`⩸`,eqvparsl:`⧥`,erarr:`⥱`,erDot:`≓`,Escr:`ℰ`,escr:`ℯ`,esdot:`≐`,Esim:`⩳`,esim:`≂`,Eta:`Η`,eta:`η`,ETH:`Ð`,eth:`ð`,Euml:`Ë`,euml:`ë`,euro:`€`,excl:`!`,exist:`∃`,Exists:`∃`,expectation:`ℰ`,ExponentialE:`ⅇ`,exponentiale:`ⅇ`,fallingdotseq:`≒`,Fcy:`Ф`,fcy:`ф`,female:`♀`,ffilig:`ffi`,fflig:`ff`,ffllig:`ffl`,Ffr:`𝔉`,ffr:`𝔣`,filig:`fi`,FilledSmallSquare:`◼`,FilledVerySmallSquare:`▪`,fjlig:`fj`,flat:`♭`,fllig:`fl`,fltns:`▱`,fnof:`ƒ`,Fopf:`𝔽`,fopf:`𝕗`,ForAll:`∀`,forall:`∀`,fork:`⋔`,forkv:`⫙`,Fouriertrf:`ℱ`,fpartint:`⨍`,frac12:`½`,frac13:`⅓`,frac14:`¼`,frac15:`⅕`,frac16:`⅙`,frac18:`⅛`,frac23:`⅔`,frac25:`⅖`,frac34:`¾`,frac35:`⅗`,frac38:`⅜`,frac45:`⅘`,frac56:`⅚`,frac58:`⅝`,frac78:`⅞`,frasl:`⁄`,frown:`⌢`,Fscr:`ℱ`,fscr:`𝒻`,gacute:`ǵ`,Gamma:`Γ`,gamma:`γ`,Gammad:`Ϝ`,gammad:`ϝ`,gap:`⪆`,Gbreve:`Ğ`,gbreve:`ğ`,Gcedil:`Ģ`,Gcirc:`Ĝ`,gcirc:`ĝ`,Gcy:`Г`,gcy:`г`,Gdot:`Ġ`,gdot:`ġ`,gE:`≧`,ge:`≥`,gEl:`⪌`,gel:`⋛`,geq:`≥`,geqq:`≧`,geqslant:`⩾`,ges:`⩾`,gescc:`⪩`,gesdot:`⪀`,gesdoto:`⪂`,gesdotol:`⪄`,gesl:`⋛︀`,gesles:`⪔`,Gfr:`𝔊`,gfr:`𝔤`,Gg:`⋙`,gg:`≫`,ggg:`⋙`,gimel:`ℷ`,GJcy:`Ѓ`,gjcy:`ѓ`,gl:`≷`,gla:`⪥`,glE:`⪒`,glj:`⪤`,gnap:`⪊`,gnapprox:`⪊`,gnE:`≩`,gne:`⪈`,gneq:`⪈`,gneqq:`≩`,gnsim:`⋧`,Gopf:`𝔾`,gopf:`𝕘`,grave:"`",GreaterEqual:`≥`,GreaterEqualLess:`⋛`,GreaterFullEqual:`≧`,GreaterGreater:`⪢`,GreaterLess:`≷`,GreaterSlantEqual:`⩾`,GreaterTilde:`≳`,Gscr:`𝒢`,gscr:`ℊ`,gsim:`≳`,gsime:`⪎`,gsiml:`⪐`,Gt:`≫`,GT:`>`,gt:`>`,gtcc:`⪧`,gtcir:`⩺`,gtdot:`⋗`,gtlPar:`⦕`,gtquest:`⩼`,gtrapprox:`⪆`,gtrarr:`⥸`,gtrdot:`⋗`,gtreqless:`⋛`,gtreqqless:`⪌`,gtrless:`≷`,gtrsim:`≳`,gvertneqq:`≩︀`,gvnE:`≩︀`,Hacek:`ˇ`,hairsp:` `,half:`½`,hamilt:`ℋ`,HARDcy:`Ъ`,hardcy:`ъ`,hArr:`⇔`,harr:`↔`,harrcir:`⥈`,harrw:`↭`,Hat:`^`,hbar:`ℏ`,Hcirc:`Ĥ`,hcirc:`ĥ`,hearts:`♥`,heartsuit:`♥`,hellip:`…`,hercon:`⊹`,Hfr:`ℌ`,hfr:`𝔥`,HilbertSpace:`ℋ`,hksearow:`⤥`,hkswarow:`⤦`,hoarr:`⇿`,homtht:`∻`,hookleftarrow:`↩`,hookrightarrow:`↪`,Hopf:`ℍ`,hopf:`𝕙`,horbar:`―`,HorizontalLine:`─`,Hscr:`ℋ`,hscr:`𝒽`,hslash:`ℏ`,Hstrok:`Ħ`,hstrok:`ħ`,HumpDownHump:`≎`,HumpEqual:`≏`,hybull:`⁃`,hyphen:`‐`,Iacute:`Í`,iacute:`í`,ic:``,Icirc:`Î`,icirc:`î`,Icy:`И`,icy:`и`,Idot:`İ`,IEcy:`Е`,iecy:`е`,iexcl:`¡`,iff:`⇔`,Ifr:`ℑ`,ifr:`𝔦`,Igrave:`Ì`,igrave:`ì`,ii:`ⅈ`,iiiint:`⨌`,iiint:`∭`,iinfin:`⧜`,iiota:`℩`,IJlig:`IJ`,ijlig:`ij`,Im:`ℑ`,Imacr:`Ī`,imacr:`ī`,image:`ℑ`,ImaginaryI:`ⅈ`,imagline:`ℐ`,imagpart:`ℑ`,imath:`ı`,imof:`⊷`,imped:`Ƶ`,Implies:`⇒`,in:`∈`,incare:`℅`,infin:`∞`,infintie:`⧝`,inodot:`ı`,Int:`∬`,int:`∫`,intcal:`⊺`,integers:`ℤ`,Integral:`∫`,intercal:`⊺`,Intersection:`⋂`,intlarhk:`⨗`,intprod:`⨼`,InvisibleComma:``,InvisibleTimes:``,IOcy:`Ё`,iocy:`ё`,Iogon:`Į`,iogon:`į`,Iopf:`𝕀`,iopf:`𝕚`,Iota:`Ι`,iota:`ι`,iprod:`⨼`,iquest:`¿`,Iscr:`ℐ`,iscr:`𝒾`,isin:`∈`,isindot:`⋵`,isinE:`⋹`,isins:`⋴`,isinsv:`⋳`,isinv:`∈`,it:``,Itilde:`Ĩ`,itilde:`ĩ`,Iukcy:`І`,iukcy:`і`,Iuml:`Ï`,iuml:`ï`,Jcirc:`Ĵ`,jcirc:`ĵ`,Jcy:`Й`,jcy:`й`,Jfr:`𝔍`,jfr:`𝔧`,jmath:`ȷ`,Jopf:`𝕁`,jopf:`𝕛`,Jscr:`𝒥`,jscr:`𝒿`,Jsercy:`Ј`,jsercy:`ј`,Jukcy:`Є`,jukcy:`є`,Kappa:`Κ`,kappa:`κ`,kappav:`ϰ`,Kcedil:`Ķ`,kcedil:`ķ`,Kcy:`К`,kcy:`к`,Kfr:`𝔎`,kfr:`𝔨`,kgreen:`ĸ`,KHcy:`Х`,khcy:`х`,KJcy:`Ќ`,kjcy:`ќ`,Kopf:`𝕂`,kopf:`𝕜`,Kscr:`𝒦`,kscr:`𝓀`,lAarr:`⇚`,Lacute:`Ĺ`,lacute:`ĺ`,laemptyv:`⦴`,lagran:`ℒ`,Lambda:`Λ`,lambda:`λ`,Lang:`⟪`,lang:`⟨`,langd:`⦑`,langle:`⟨`,lap:`⪅`,Laplacetrf:`ℒ`,laquo:`«`,Larr:`↞`,lArr:`⇐`,larr:`←`,larrb:`⇤`,larrbfs:`⤟`,larrfs:`⤝`,larrhk:`↩`,larrlp:`↫`,larrpl:`⤹`,larrsim:`⥳`,larrtl:`↢`,lat:`⪫`,lAtail:`⤛`,latail:`⤙`,late:`⪭`,lates:`⪭︀`,lBarr:`⤎`,lbarr:`⤌`,lbbrk:`❲`,lbrace:`{`,lbrack:`[`,lbrke:`⦋`,lbrksld:`⦏`,lbrkslu:`⦍`,Lcaron:`Ľ`,lcaron:`ľ`,Lcedil:`Ļ`,lcedil:`ļ`,lceil:`⌈`,lcub:`{`,Lcy:`Л`,lcy:`л`,ldca:`⤶`,ldquo:`“`,ldquor:`„`,ldrdhar:`⥧`,ldrushar:`⥋`,ldsh:`↲`,lE:`≦`,le:`≤`,LeftAngleBracket:`⟨`,LeftArrow:`←`,Leftarrow:`⇐`,leftarrow:`←`,LeftArrowBar:`⇤`,LeftArrowRightArrow:`⇆`,leftarrowtail:`↢`,LeftCeiling:`⌈`,LeftDoubleBracket:`⟦`,LeftDownTeeVector:`⥡`,LeftDownVector:`⇃`,LeftDownVectorBar:`⥙`,LeftFloor:`⌊`,leftharpoondown:`↽`,leftharpoonup:`↼`,leftleftarrows:`⇇`,LeftRightArrow:`↔`,Leftrightarrow:`⇔`,leftrightarrow:`↔`,leftrightarrows:`⇆`,leftrightharpoons:`⇋`,leftrightsquigarrow:`↭`,LeftRightVector:`⥎`,LeftTee:`⊣`,LeftTeeArrow:`↤`,LeftTeeVector:`⥚`,leftthreetimes:`⋋`,LeftTriangle:`⊲`,LeftTriangleBar:`⧏`,LeftTriangleEqual:`⊴`,LeftUpDownVector:`⥑`,LeftUpTeeVector:`⥠`,LeftUpVector:`↿`,LeftUpVectorBar:`⥘`,LeftVector:`↼`,LeftVectorBar:`⥒`,lEg:`⪋`,leg:`⋚`,leq:`≤`,leqq:`≦`,leqslant:`⩽`,les:`⩽`,lescc:`⪨`,lesdot:`⩿`,lesdoto:`⪁`,lesdotor:`⪃`,lesg:`⋚︀`,lesges:`⪓`,lessapprox:`⪅`,lessdot:`⋖`,lesseqgtr:`⋚`,lesseqqgtr:`⪋`,LessEqualGreater:`⋚`,LessFullEqual:`≦`,LessGreater:`≶`,lessgtr:`≶`,LessLess:`⪡`,lesssim:`≲`,LessSlantEqual:`⩽`,LessTilde:`≲`,lfisht:`⥼`,lfloor:`⌊`,Lfr:`𝔏`,lfr:`𝔩`,lg:`≶`,lgE:`⪑`,lHar:`⥢`,lhard:`↽`,lharu:`↼`,lharul:`⥪`,lhblk:`▄`,LJcy:`Љ`,ljcy:`љ`,Ll:`⋘`,ll:`≪`,llarr:`⇇`,llcorner:`⌞`,Lleftarrow:`⇚`,llhard:`⥫`,lltri:`◺`,Lmidot:`Ŀ`,lmidot:`ŀ`,lmoust:`⎰`,lmoustache:`⎰`,lnap:`⪉`,lnapprox:`⪉`,lnE:`≨`,lne:`⪇`,lneq:`⪇`,lneqq:`≨`,lnsim:`⋦`,loang:`⟬`,loarr:`⇽`,lobrk:`⟦`,LongLeftArrow:`⟵`,Longleftarrow:`⟸`,longleftarrow:`⟵`,LongLeftRightArrow:`⟷`,Longleftrightarrow:`⟺`,longleftrightarrow:`⟷`,longmapsto:`⟼`,LongRightArrow:`⟶`,Longrightarrow:`⟹`,longrightarrow:`⟶`,looparrowleft:`↫`,looparrowright:`↬`,lopar:`⦅`,Lopf:`𝕃`,lopf:`𝕝`,loplus:`⨭`,lotimes:`⨴`,lowast:`∗`,lowbar:`_`,LowerLeftArrow:`↙`,LowerRightArrow:`↘`,loz:`◊`,lozenge:`◊`,lozf:`⧫`,lpar:`(`,lparlt:`⦓`,lrarr:`⇆`,lrcorner:`⌟`,lrhar:`⇋`,lrhard:`⥭`,lrm:``,lrtri:`⊿`,lsaquo:`‹`,Lscr:`ℒ`,lscr:`𝓁`,Lsh:`↰`,lsh:`↰`,lsim:`≲`,lsime:`⪍`,lsimg:`⪏`,lsqb:`[`,lsquo:`‘`,lsquor:`‚`,Lstrok:`Ł`,lstrok:`ł`,Lt:`≪`,LT:`<`,lt:`<`,ltcc:`⪦`,ltcir:`⩹`,ltdot:`⋖`,lthree:`⋋`,ltimes:`⋉`,ltlarr:`⥶`,ltquest:`⩻`,ltri:`◃`,ltrie:`⊴`,ltrif:`◂`,ltrPar:`⦖`,lurdshar:`⥊`,luruhar:`⥦`,lvertneqq:`≨︀`,lvnE:`≨︀`,macr:`¯`,male:`♂`,malt:`✠`,maltese:`✠`,Map:`⤅`,map:`↦`,mapsto:`↦`,mapstodown:`↧`,mapstoleft:`↤`,mapstoup:`↥`,marker:`▮`,mcomma:`⨩`,Mcy:`М`,mcy:`м`,mdash:`—`,mDDot:`∺`,measuredangle:`∡`,MediumSpace:` `,Mellintrf:`ℳ`,Mfr:`𝔐`,mfr:`𝔪`,mho:`℧`,micro:`µ`,mid:`∣`,midast:`*`,midcir:`⫰`,middot:`·`,minus:`−`,minusb:`⊟`,minusd:`∸`,minusdu:`⨪`,MinusPlus:`∓`,mlcp:`⫛`,mldr:`…`,mnplus:`∓`,models:`⊧`,Mopf:`𝕄`,mopf:`𝕞`,mp:`∓`,Mscr:`ℳ`,mscr:`𝓂`,mstpos:`∾`,Mu:`Μ`,mu:`μ`,multimap:`⊸`,mumap:`⊸`,nabla:`∇`,Nacute:`Ń`,nacute:`ń`,nang:`∠⃒`,nap:`≉`,napE:`⩰̸`,napid:`≋̸`,napos:`ʼn`,napprox:`≉`,natur:`♮`,natural:`♮`,naturals:`ℕ`,nbsp:`\xA0`,nbump:`≎̸`,nbumpe:`≏̸`,ncap:`⩃`,Ncaron:`Ň`,ncaron:`ň`,Ncedil:`Ņ`,ncedil:`ņ`,ncong:`≇`,ncongdot:`⩭̸`,ncup:`⩂`,Ncy:`Н`,ncy:`н`,ndash:`–`,ne:`≠`,nearhk:`⤤`,neArr:`⇗`,nearr:`↗`,nearrow:`↗`,nedot:`≐̸`,NegativeMediumSpace:``,NegativeThickSpace:``,NegativeThinSpace:``,NegativeVeryThinSpace:``,nequiv:`≢`,nesear:`⤨`,nesim:`≂̸`,NestedGreaterGreater:`≫`,NestedLessLess:`≪`,NewLine:`
|
|
18
|
-
`,nexist:`∄`,nexists:`∄`,Nfr:`𝔑`,nfr:`𝔫`,ngE:`≧̸`,nge:`≱`,ngeq:`≱`,ngeqq:`≧̸`,ngeqslant:`⩾̸`,nges:`⩾̸`,nGg:`⋙̸`,ngsim:`≵`,nGt:`≫⃒`,ngt:`≯`,ngtr:`≯`,nGtv:`≫̸`,nhArr:`⇎`,nharr:`↮`,nhpar:`⫲`,ni:`∋`,nis:`⋼`,nisd:`⋺`,niv:`∋`,NJcy:`Њ`,njcy:`њ`,nlArr:`⇍`,nlarr:`↚`,nldr:`‥`,nlE:`≦̸`,nle:`≰`,nLeftarrow:`⇍`,nleftarrow:`↚`,nLeftrightarrow:`⇎`,nleftrightarrow:`↮`,nleq:`≰`,nleqq:`≦̸`,nleqslant:`⩽̸`,nles:`⩽̸`,nless:`≮`,nLl:`⋘̸`,nlsim:`≴`,nLt:`≪⃒`,nlt:`≮`,nltri:`⋪`,nltrie:`⋬`,nLtv:`≪̸`,nmid:`∤`,NoBreak:``,NonBreakingSpace:`\xA0`,Nopf:`ℕ`,nopf:`𝕟`,Not:`⫬`,not:`¬`,NotCongruent:`≢`,NotCupCap:`≭`,NotDoubleVerticalBar:`∦`,NotElement:`∉`,NotEqual:`≠`,NotEqualTilde:`≂̸`,NotExists:`∄`,NotGreater:`≯`,NotGreaterEqual:`≱`,NotGreaterFullEqual:`≧̸`,NotGreaterGreater:`≫̸`,NotGreaterLess:`≹`,NotGreaterSlantEqual:`⩾̸`,NotGreaterTilde:`≵`,NotHumpDownHump:`≎̸`,NotHumpEqual:`≏̸`,notin:`∉`,notindot:`⋵̸`,notinE:`⋹̸`,notinva:`∉`,notinvb:`⋷`,notinvc:`⋶`,NotLeftTriangle:`⋪`,NotLeftTriangleBar:`⧏̸`,NotLeftTriangleEqual:`⋬`,NotLess:`≮`,NotLessEqual:`≰`,NotLessGreater:`≸`,NotLessLess:`≪̸`,NotLessSlantEqual:`⩽̸`,NotLessTilde:`≴`,NotNestedGreaterGreater:`⪢̸`,NotNestedLessLess:`⪡̸`,notni:`∌`,notniva:`∌`,notnivb:`⋾`,notnivc:`⋽`,NotPrecedes:`⊀`,NotPrecedesEqual:`⪯̸`,NotPrecedesSlantEqual:`⋠`,NotReverseElement:`∌`,NotRightTriangle:`⋫`,NotRightTriangleBar:`⧐̸`,NotRightTriangleEqual:`⋭`,NotSquareSubset:`⊏̸`,NotSquareSubsetEqual:`⋢`,NotSquareSuperset:`⊐̸`,NotSquareSupersetEqual:`⋣`,NotSubset:`⊂⃒`,NotSubsetEqual:`⊈`,NotSucceeds:`⊁`,NotSucceedsEqual:`⪰̸`,NotSucceedsSlantEqual:`⋡`,NotSucceedsTilde:`≿̸`,NotSuperset:`⊃⃒`,NotSupersetEqual:`⊉`,NotTilde:`≁`,NotTildeEqual:`≄`,NotTildeFullEqual:`≇`,NotTildeTilde:`≉`,NotVerticalBar:`∤`,npar:`∦`,nparallel:`∦`,nparsl:`⫽⃥`,npart:`∂̸`,npolint:`⨔`,npr:`⊀`,nprcue:`⋠`,npre:`⪯̸`,nprec:`⊀`,npreceq:`⪯̸`,nrArr:`⇏`,nrarr:`↛`,nrarrc:`⤳̸`,nrarrw:`↝̸`,nRightarrow:`⇏`,nrightarrow:`↛`,nrtri:`⋫`,nrtrie:`⋭`,nsc:`⊁`,nsccue:`⋡`,nsce:`⪰̸`,Nscr:`𝒩`,nscr:`𝓃`,nshortmid:`∤`,nshortparallel:`∦`,nsim:`≁`,nsime:`≄`,nsimeq:`≄`,nsmid:`∤`,nspar:`∦`,nsqsube:`⋢`,nsqsupe:`⋣`,nsub:`⊄`,nsubE:`⫅̸`,nsube:`⊈`,nsubset:`⊂⃒`,nsubseteq:`⊈`,nsubseteqq:`⫅̸`,nsucc:`⊁`,nsucceq:`⪰̸`,nsup:`⊅`,nsupE:`⫆̸`,nsupe:`⊉`,nsupset:`⊃⃒`,nsupseteq:`⊉`,nsupseteqq:`⫆̸`,ntgl:`≹`,Ntilde:`Ñ`,ntilde:`ñ`,ntlg:`≸`,ntriangleleft:`⋪`,ntrianglelefteq:`⋬`,ntriangleright:`⋫`,ntrianglerighteq:`⋭`,Nu:`Ν`,nu:`ν`,num:`#`,numero:`№`,numsp:` `,nvap:`≍⃒`,nVDash:`⊯`,nVdash:`⊮`,nvDash:`⊭`,nvdash:`⊬`,nvge:`≥⃒`,nvgt:`>⃒`,nvHarr:`⤄`,nvinfin:`⧞`,nvlArr:`⤂`,nvle:`≤⃒`,nvlt:`<⃒`,nvltrie:`⊴⃒`,nvrArr:`⤃`,nvrtrie:`⊵⃒`,nvsim:`∼⃒`,nwarhk:`⤣`,nwArr:`⇖`,nwarr:`↖`,nwarrow:`↖`,nwnear:`⤧`,Oacute:`Ó`,oacute:`ó`,oast:`⊛`,ocir:`⊚`,Ocirc:`Ô`,ocirc:`ô`,Ocy:`О`,ocy:`о`,odash:`⊝`,Odblac:`Ő`,odblac:`ő`,odiv:`⨸`,odot:`⊙`,odsold:`⦼`,OElig:`Œ`,oelig:`œ`,ofcir:`⦿`,Ofr:`𝔒`,ofr:`𝔬`,ogon:`˛`,Ograve:`Ò`,ograve:`ò`,ogt:`⧁`,ohbar:`⦵`,ohm:`Ω`,oint:`∮`,olarr:`↺`,olcir:`⦾`,olcross:`⦻`,oline:`‾`,olt:`⧀`,Omacr:`Ō`,omacr:`ō`,Omega:`Ω`,omega:`ω`,Omicron:`Ο`,omicron:`ο`,omid:`⦶`,ominus:`⊖`,Oopf:`𝕆`,oopf:`𝕠`,opar:`⦷`,OpenCurlyDoubleQuote:`“`,OpenCurlyQuote:`‘`,operp:`⦹`,oplus:`⊕`,Or:`⩔`,or:`∨`,orarr:`↻`,ord:`⩝`,order:`ℴ`,orderof:`ℴ`,ordf:`ª`,ordm:`º`,origof:`⊶`,oror:`⩖`,orslope:`⩗`,orv:`⩛`,oS:`Ⓢ`,Oscr:`𝒪`,oscr:`ℴ`,Oslash:`Ø`,oslash:`ø`,osol:`⊘`,Otilde:`Õ`,otilde:`õ`,Otimes:`⨷`,otimes:`⊗`,otimesas:`⨶`,Ouml:`Ö`,ouml:`ö`,ovbar:`⌽`,OverBar:`‾`,OverBrace:`⏞`,OverBracket:`⎴`,OverParenthesis:`⏜`,par:`∥`,para:`¶`,parallel:`∥`,parsim:`⫳`,parsl:`⫽`,part:`∂`,PartialD:`∂`,Pcy:`П`,pcy:`п`,percnt:`%`,period:`.`,permil:`‰`,perp:`⊥`,pertenk:`‱`,Pfr:`𝔓`,pfr:`𝔭`,Phi:`Φ`,phi:`φ`,phiv:`ϕ`,phmmat:`ℳ`,phone:`☎`,Pi:`Π`,pi:`π`,pitchfork:`⋔`,piv:`ϖ`,planck:`ℏ`,planckh:`ℎ`,plankv:`ℏ`,plus:`+`,plusacir:`⨣`,plusb:`⊞`,pluscir:`⨢`,plusdo:`∔`,plusdu:`⨥`,pluse:`⩲`,PlusMinus:`±`,plusmn:`±`,plussim:`⨦`,plustwo:`⨧`,pm:`±`,Poincareplane:`ℌ`,pointint:`⨕`,Popf:`ℙ`,popf:`𝕡`,pound:`£`,Pr:`⪻`,pr:`≺`,prap:`⪷`,prcue:`≼`,prE:`⪳`,pre:`⪯`,prec:`≺`,precapprox:`⪷`,preccurlyeq:`≼`,Precedes:`≺`,PrecedesEqual:`⪯`,PrecedesSlantEqual:`≼`,PrecedesTilde:`≾`,preceq:`⪯`,precnapprox:`⪹`,precneqq:`⪵`,precnsim:`⋨`,precsim:`≾`,Prime:`″`,prime:`′`,primes:`ℙ`,prnap:`⪹`,prnE:`⪵`,prnsim:`⋨`,prod:`∏`,Product:`∏`,profalar:`⌮`,profline:`⌒`,profsurf:`⌓`,prop:`∝`,Proportion:`∷`,Proportional:`∝`,propto:`∝`,prsim:`≾`,prurel:`⊰`,Pscr:`𝒫`,pscr:`𝓅`,Psi:`Ψ`,psi:`ψ`,puncsp:` `,Qfr:`𝔔`,qfr:`𝔮`,qint:`⨌`,Qopf:`ℚ`,qopf:`𝕢`,qprime:`⁗`,Qscr:`𝒬`,qscr:`𝓆`,quaternions:`ℍ`,quatint:`⨖`,quest:`?`,questeq:`≟`,QUOT:`"`,quot:`"`,rAarr:`⇛`,race:`∽̱`,Racute:`Ŕ`,racute:`ŕ`,radic:`√`,raemptyv:`⦳`,Rang:`⟫`,rang:`⟩`,rangd:`⦒`,range:`⦥`,rangle:`⟩`,raquo:`»`,Rarr:`↠`,rArr:`⇒`,rarr:`→`,rarrap:`⥵`,rarrb:`⇥`,rarrbfs:`⤠`,rarrc:`⤳`,rarrfs:`⤞`,rarrhk:`↪`,rarrlp:`↬`,rarrpl:`⥅`,rarrsim:`⥴`,Rarrtl:`⤖`,rarrtl:`↣`,rarrw:`↝`,rAtail:`⤜`,ratail:`⤚`,ratio:`∶`,rationals:`ℚ`,RBarr:`⤐`,rBarr:`⤏`,rbarr:`⤍`,rbbrk:`❳`,rbrace:`}`,rbrack:`]`,rbrke:`⦌`,rbrksld:`⦎`,rbrkslu:`⦐`,Rcaron:`Ř`,rcaron:`ř`,Rcedil:`Ŗ`,rcedil:`ŗ`,rceil:`⌉`,rcub:`}`,Rcy:`Р`,rcy:`р`,rdca:`⤷`,rdldhar:`⥩`,rdquo:`”`,rdquor:`”`,rdsh:`↳`,Re:`ℜ`,real:`ℜ`,realine:`ℛ`,realpart:`ℜ`,reals:`ℝ`,rect:`▭`,REG:`®`,reg:`®`,ReverseElement:`∋`,ReverseEquilibrium:`⇋`,ReverseUpEquilibrium:`⥯`,rfisht:`⥽`,rfloor:`⌋`,Rfr:`ℜ`,rfr:`𝔯`,rHar:`⥤`,rhard:`⇁`,rharu:`⇀`,rharul:`⥬`,Rho:`Ρ`,rho:`ρ`,rhov:`ϱ`,RightAngleBracket:`⟩`,RightArrow:`→`,Rightarrow:`⇒`,rightarrow:`→`,RightArrowBar:`⇥`,RightArrowLeftArrow:`⇄`,rightarrowtail:`↣`,RightCeiling:`⌉`,RightDoubleBracket:`⟧`,RightDownTeeVector:`⥝`,RightDownVector:`⇂`,RightDownVectorBar:`⥕`,RightFloor:`⌋`,rightharpoondown:`⇁`,rightharpoonup:`⇀`,rightleftarrows:`⇄`,rightleftharpoons:`⇌`,rightrightarrows:`⇉`,rightsquigarrow:`↝`,RightTee:`⊢`,RightTeeArrow:`↦`,RightTeeVector:`⥛`,rightthreetimes:`⋌`,RightTriangle:`⊳`,RightTriangleBar:`⧐`,RightTriangleEqual:`⊵`,RightUpDownVector:`⥏`,RightUpTeeVector:`⥜`,RightUpVector:`↾`,RightUpVectorBar:`⥔`,RightVector:`⇀`,RightVectorBar:`⥓`,ring:`˚`,risingdotseq:`≓`,rlarr:`⇄`,rlhar:`⇌`,rlm:``,rmoust:`⎱`,rmoustache:`⎱`,rnmid:`⫮`,roang:`⟭`,roarr:`⇾`,robrk:`⟧`,ropar:`⦆`,Ropf:`ℝ`,ropf:`𝕣`,roplus:`⨮`,rotimes:`⨵`,RoundImplies:`⥰`,rpar:`)`,rpargt:`⦔`,rppolint:`⨒`,rrarr:`⇉`,Rrightarrow:`⇛`,rsaquo:`›`,Rscr:`ℛ`,rscr:`𝓇`,Rsh:`↱`,rsh:`↱`,rsqb:`]`,rsquo:`’`,rsquor:`’`,rthree:`⋌`,rtimes:`⋊`,rtri:`▹`,rtrie:`⊵`,rtrif:`▸`,rtriltri:`⧎`,RuleDelayed:`⧴`,ruluhar:`⥨`,rx:`℞`,Sacute:`Ś`,sacute:`ś`,sbquo:`‚`,Sc:`⪼`,sc:`≻`,scap:`⪸`,Scaron:`Š`,scaron:`š`,sccue:`≽`,scE:`⪴`,sce:`⪰`,Scedil:`Ş`,scedil:`ş`,Scirc:`Ŝ`,scirc:`ŝ`,scnap:`⪺`,scnE:`⪶`,scnsim:`⋩`,scpolint:`⨓`,scsim:`≿`,Scy:`С`,scy:`с`,sdot:`⋅`,sdotb:`⊡`,sdote:`⩦`,searhk:`⤥`,seArr:`⇘`,searr:`↘`,searrow:`↘`,sect:`§`,semi:`;`,seswar:`⤩`,setminus:`∖`,setmn:`∖`,sext:`✶`,Sfr:`𝔖`,sfr:`𝔰`,sfrown:`⌢`,sharp:`♯`,SHCHcy:`Щ`,shchcy:`щ`,SHcy:`Ш`,shcy:`ш`,ShortDownArrow:`↓`,ShortLeftArrow:`←`,shortmid:`∣`,shortparallel:`∥`,ShortRightArrow:`→`,ShortUpArrow:`↑`,shy:``,Sigma:`Σ`,sigma:`σ`,sigmaf:`ς`,sigmav:`ς`,sim:`∼`,simdot:`⩪`,sime:`≃`,simeq:`≃`,simg:`⪞`,simgE:`⪠`,siml:`⪝`,simlE:`⪟`,simne:`≆`,simplus:`⨤`,simrarr:`⥲`,slarr:`←`,SmallCircle:`∘`,smallsetminus:`∖`,smashp:`⨳`,smeparsl:`⧤`,smid:`∣`,smile:`⌣`,smt:`⪪`,smte:`⪬`,smtes:`⪬︀`,SOFTcy:`Ь`,softcy:`ь`,sol:`/`,solb:`⧄`,solbar:`⌿`,Sopf:`𝕊`,sopf:`𝕤`,spades:`♠`,spadesuit:`♠`,spar:`∥`,sqcap:`⊓`,sqcaps:`⊓︀`,sqcup:`⊔`,sqcups:`⊔︀`,Sqrt:`√`,sqsub:`⊏`,sqsube:`⊑`,sqsubset:`⊏`,sqsubseteq:`⊑`,sqsup:`⊐`,sqsupe:`⊒`,sqsupset:`⊐`,sqsupseteq:`⊒`,squ:`□`,Square:`□`,square:`□`,SquareIntersection:`⊓`,SquareSubset:`⊏`,SquareSubsetEqual:`⊑`,SquareSuperset:`⊐`,SquareSupersetEqual:`⊒`,SquareUnion:`⊔`,squarf:`▪`,squf:`▪`,srarr:`→`,Sscr:`𝒮`,sscr:`𝓈`,ssetmn:`∖`,ssmile:`⌣`,sstarf:`⋆`,Star:`⋆`,star:`☆`,starf:`★`,straightepsilon:`ϵ`,straightphi:`ϕ`,strns:`¯`,Sub:`⋐`,sub:`⊂`,subdot:`⪽`,subE:`⫅`,sube:`⊆`,subedot:`⫃`,submult:`⫁`,subnE:`⫋`,subne:`⊊`,subplus:`⪿`,subrarr:`⥹`,Subset:`⋐`,subset:`⊂`,subseteq:`⊆`,subseteqq:`⫅`,SubsetEqual:`⊆`,subsetneq:`⊊`,subsetneqq:`⫋`,subsim:`⫇`,subsub:`⫕`,subsup:`⫓`,succ:`≻`,succapprox:`⪸`,succcurlyeq:`≽`,Succeeds:`≻`,SucceedsEqual:`⪰`,SucceedsSlantEqual:`≽`,SucceedsTilde:`≿`,succeq:`⪰`,succnapprox:`⪺`,succneqq:`⪶`,succnsim:`⋩`,succsim:`≿`,SuchThat:`∋`,Sum:`∑`,sum:`∑`,sung:`♪`,Sup:`⋑`,sup:`⊃`,sup1:`¹`,sup2:`²`,sup3:`³`,supdot:`⪾`,supdsub:`⫘`,supE:`⫆`,supe:`⊇`,supedot:`⫄`,Superset:`⊃`,SupersetEqual:`⊇`,suphsol:`⟉`,suphsub:`⫗`,suplarr:`⥻`,supmult:`⫂`,supnE:`⫌`,supne:`⊋`,supplus:`⫀`,Supset:`⋑`,supset:`⊃`,supseteq:`⊇`,supseteqq:`⫆`,supsetneq:`⊋`,supsetneqq:`⫌`,supsim:`⫈`,supsub:`⫔`,supsup:`⫖`,swarhk:`⤦`,swArr:`⇙`,swarr:`↙`,swarrow:`↙`,swnwar:`⤪`,szlig:`ß`,Tab:` `,target:`⌖`,Tau:`Τ`,tau:`τ`,tbrk:`⎴`,Tcaron:`Ť`,tcaron:`ť`,Tcedil:`Ţ`,tcedil:`ţ`,Tcy:`Т`,tcy:`т`,tdot:`⃛`,telrec:`⌕`,Tfr:`𝔗`,tfr:`𝔱`,there4:`∴`,Therefore:`∴`,therefore:`∴`,Theta:`Θ`,theta:`θ`,thetasym:`ϑ`,thetav:`ϑ`,thickapprox:`≈`,thicksim:`∼`,ThickSpace:` `,thinsp:` `,ThinSpace:` `,thkap:`≈`,thksim:`∼`,THORN:`Þ`,thorn:`þ`,Tilde:`∼`,tilde:`˜`,TildeEqual:`≃`,TildeFullEqual:`≅`,TildeTilde:`≈`,times:`×`,timesb:`⊠`,timesbar:`⨱`,timesd:`⨰`,tint:`∭`,toea:`⤨`,top:`⊤`,topbot:`⌶`,topcir:`⫱`,Topf:`𝕋`,topf:`𝕥`,topfork:`⫚`,tosa:`⤩`,tprime:`‴`,TRADE:`™`,trade:`™`,triangle:`▵`,triangledown:`▿`,triangleleft:`◃`,trianglelefteq:`⊴`,triangleq:`≜`,triangleright:`▹`,trianglerighteq:`⊵`,tridot:`◬`,trie:`≜`,triminus:`⨺`,TripleDot:`⃛`,triplus:`⨹`,trisb:`⧍`,tritime:`⨻`,trpezium:`⏢`,Tscr:`𝒯`,tscr:`𝓉`,TScy:`Ц`,tscy:`ц`,TSHcy:`Ћ`,tshcy:`ћ`,Tstrok:`Ŧ`,tstrok:`ŧ`,twixt:`≬`,twoheadleftarrow:`↞`,twoheadrightarrow:`↠`,Uacute:`Ú`,uacute:`ú`,Uarr:`↟`,uArr:`⇑`,uarr:`↑`,Uarrocir:`⥉`,Ubrcy:`Ў`,ubrcy:`ў`,Ubreve:`Ŭ`,ubreve:`ŭ`,Ucirc:`Û`,ucirc:`û`,Ucy:`У`,ucy:`у`,udarr:`⇅`,Udblac:`Ű`,udblac:`ű`,udhar:`⥮`,ufisht:`⥾`,Ufr:`𝔘`,ufr:`𝔲`,Ugrave:`Ù`,ugrave:`ù`,uHar:`⥣`,uharl:`↿`,uharr:`↾`,uhblk:`▀`,ulcorn:`⌜`,ulcorner:`⌜`,ulcrop:`⌏`,ultri:`◸`,Umacr:`Ū`,umacr:`ū`,uml:`¨`,UnderBar:`_`,UnderBrace:`⏟`,UnderBracket:`⎵`,UnderParenthesis:`⏝`,Union:`⋃`,UnionPlus:`⊎`,Uogon:`Ų`,uogon:`ų`,Uopf:`𝕌`,uopf:`𝕦`,UpArrow:`↑`,Uparrow:`⇑`,uparrow:`↑`,UpArrowBar:`⤒`,UpArrowDownArrow:`⇅`,UpDownArrow:`↕`,Updownarrow:`⇕`,updownarrow:`↕`,UpEquilibrium:`⥮`,upharpoonleft:`↿`,upharpoonright:`↾`,uplus:`⊎`,UpperLeftArrow:`↖`,UpperRightArrow:`↗`,Upsi:`ϒ`,upsi:`υ`,upsih:`ϒ`,Upsilon:`Υ`,upsilon:`υ`,UpTee:`⊥`,UpTeeArrow:`↥`,upuparrows:`⇈`,urcorn:`⌝`,urcorner:`⌝`,urcrop:`⌎`,Uring:`Ů`,uring:`ů`,urtri:`◹`,Uscr:`𝒰`,uscr:`𝓊`,utdot:`⋰`,Utilde:`Ũ`,utilde:`ũ`,utri:`▵`,utrif:`▴`,uuarr:`⇈`,Uuml:`Ü`,uuml:`ü`,uwangle:`⦧`,vangrt:`⦜`,varepsilon:`ϵ`,varkappa:`ϰ`,varnothing:`∅`,varphi:`ϕ`,varpi:`ϖ`,varpropto:`∝`,vArr:`⇕`,varr:`↕`,varrho:`ϱ`,varsigma:`ς`,varsubsetneq:`⊊︀`,varsubsetneqq:`⫋︀`,varsupsetneq:`⊋︀`,varsupsetneqq:`⫌︀`,vartheta:`ϑ`,vartriangleleft:`⊲`,vartriangleright:`⊳`,Vbar:`⫫`,vBar:`⫨`,vBarv:`⫩`,Vcy:`В`,vcy:`в`,VDash:`⊫`,Vdash:`⊩`,vDash:`⊨`,vdash:`⊢`,Vdashl:`⫦`,Vee:`⋁`,vee:`∨`,veebar:`⊻`,veeeq:`≚`,vellip:`⋮`,Verbar:`‖`,verbar:`|`,Vert:`‖`,vert:`|`,VerticalBar:`∣`,VerticalLine:`|`,VerticalSeparator:`❘`,VerticalTilde:`≀`,VeryThinSpace:` `,Vfr:`𝔙`,vfr:`𝔳`,vltri:`⊲`,vnsub:`⊂⃒`,vnsup:`⊃⃒`,Vopf:`𝕍`,vopf:`𝕧`,vprop:`∝`,vrtri:`⊳`,Vscr:`𝒱`,vscr:`𝓋`,vsubnE:`⫋︀`,vsubne:`⊊︀`,vsupnE:`⫌︀`,vsupne:`⊋︀`,Vvdash:`⊪`,vzigzag:`⦚`,Wcirc:`Ŵ`,wcirc:`ŵ`,wedbar:`⩟`,Wedge:`⋀`,wedge:`∧`,wedgeq:`≙`,weierp:`℘`,Wfr:`𝔚`,wfr:`𝔴`,Wopf:`𝕎`,wopf:`𝕨`,wp:`℘`,wr:`≀`,wreath:`≀`,Wscr:`𝒲`,wscr:`𝓌`,xcap:`⋂`,xcirc:`◯`,xcup:`⋃`,xdtri:`▽`,Xfr:`𝔛`,xfr:`𝔵`,xhArr:`⟺`,xharr:`⟷`,Xi:`Ξ`,xi:`ξ`,xlArr:`⟸`,xlarr:`⟵`,xmap:`⟼`,xnis:`⋻`,xodot:`⨀`,Xopf:`𝕏`,xopf:`𝕩`,xoplus:`⨁`,xotime:`⨂`,xrArr:`⟹`,xrarr:`⟶`,Xscr:`𝒳`,xscr:`𝓍`,xsqcup:`⨆`,xuplus:`⨄`,xutri:`△`,xvee:`⋁`,xwedge:`⋀`,Yacute:`Ý`,yacute:`ý`,YAcy:`Я`,yacy:`я`,Ycirc:`Ŷ`,ycirc:`ŷ`,Ycy:`Ы`,ycy:`ы`,yen:`¥`,Yfr:`𝔜`,yfr:`𝔶`,YIcy:`Ї`,yicy:`ї`,Yopf:`𝕐`,yopf:`𝕪`,Yscr:`𝒴`,yscr:`𝓎`,YUcy:`Ю`,yucy:`ю`,Yuml:`Ÿ`,yuml:`ÿ`,Zacute:`Ź`,zacute:`ź`,Zcaron:`Ž`,zcaron:`ž`,Zcy:`З`,zcy:`з`,Zdot:`Ż`,zdot:`ż`,zeetrf:`ℨ`,ZeroWidthSpace:``,Zeta:`Ζ`,zeta:`ζ`,Zfr:`ℨ`,zfr:`𝔷`,ZHcy:`Ж`,zhcy:`ж`,zigrarr:`⇝`,Zopf:`ℤ`,zopf:`𝕫`,Zscr:`𝒵`,zscr:`𝓏`,zwj:``,zwnj:``}),e.entityMap=e.HTML_ENTITIES})),$a=/* @__PURE__ */ t((e=>{var t=Ja(),n=Xa(),r=Ya(),i=t.isHTMLEscapableRawTextElement,a=t.isHTMLMimeType,o=t.isHTMLRawTextElement,s=t.hasOwn,c=t.NAMESPACE,l=r.ParseError,u=r.DOMException,d=0,f=1,p=2,m=3,h=4,g=5,_=6,v=7;function y(){}y.prototype={parse:function(e,t,n){var r=this.domBuilder;r.startDocument(),E(t,t=Object.create(null)),x(e,t,n,r,this.errorHandler),r.endDocument()}};var b=/&#?\w+;?/g;function x(e,r,i,o,c){var d=a(o.mimeType);e.indexOf(n.UNICODE_REPLACEMENT_CHARACTER)>=0&&c.warning(`Unicode replacement character detected, source encoding issues?`);function f(e){if(e>65535){e-=65536;var t=55296+(e>>10),n=56320+(e&1023);return String.fromCharCode(t,n)}return String.fromCharCode(e)}function p(e){var t=e[e.length-1]===`;`?e:e+`;`;if(!d&&t!==e)return c.error(`EntityRef: expecting ;`),e;var r=n.Reference.exec(t);if(!r||r[0].length!==t.length)return c.error(`entity not matching Reference production: `+e),e;var a=t.slice(1,-1);return s(i,a)?i[a]:a.charAt(0)===`#`?f(parseInt(a.substring(1).replace(`x`,`0x`))):(c.error(`entity not found:`+e),e)}function m(t){if(t>D){var n=e.substring(D,t).replace(b,p);v&&y(D),o.characters(n,0,t-D),D=t}}var h=0,g=0,_=/\r\n?|\n|$/g,v=o.locator;function y(t,n){for(;t>=g&&(n=_.exec(e));)h=g,g=n.index+n[0].length,v.lineNumber++;v.columnNumber=t-h+1}for(var x=[{currentNSMap:r}],E=[],D=0;;){try{var O=e.indexOf(`<`,D);if(O<0){if(!d&&E.length>0)return c.fatalError(`unclosed xml tag(s): `+E.join(`, `));if(!e.substring(D).match(/^\s*$/)){var A=o.doc,j=A.createTextNode(e.substring(D));if(A.documentElement)return c.error(`Extra content at the end of the document`);A.appendChild(j),o.currentElement=j}return}if(O>D){var M=e.substring(D,O);!d&&E.length===0&&(M=M.replace(new RegExp(n.S_OPT.source,`g`),``),M&&c.error(`Unexpected content outside root element: '`+M+`'`)),m(O)}switch(e.charAt(O+1)){case`/`:var N=e.indexOf(`>`,O+2),P=e.substring(O+2,N>0?N:void 0);if(!P)return c.fatalError(`end tag name missing`);var ne=n.reg(`^`,n.QName_group,n.S_OPT,`$`),F=N>0&&ne.exec(P);if(!F){var I=N>0&&n.reg(`^`,n.QName_group).exec(P);if(d&&I)c.warning(`end tag name contains invalid trailing characters: "`+P+`"`),F=I;else if(I&&new RegExp(ne.source,ne.flags+`m`).test(P))c.error(`end tag name is followed by a line break and trailing content: "`+P+`"`),F=I;else return c.fatalError(`end tag name contains invalid characters: "`+P+`"`)}if(!o.currentElement&&!o.doc.documentElement)return;var L=E[E.length-1]||o.currentElement.tagName||o.doc.documentElement.tagName||``;if(L!==F[1]){var R=F[1].toLowerCase();if(!d||L.toLowerCase()!==R)return c.fatalError(`Opening and ending tag mismatch: "`+L+`" != "`+P+`"`)}var z=x.pop();E.pop();var B=z.localNSMap;if(o.endElement(z.uri,z.localName,L),B)for(var re in B)s(B,re)&&o.endPrefixMapping(re);N++;break;case`?`:v&&y(O),N=te(e,O,o,c);break;case`!`:v&&y(O),N=ee(e,O,o,c,d);break;default:v&&y(O);var V=new k,ie=x[x.length-1].currentNSMap,N=C(e,O,V,ie,p,c,d),ae=V.length;if(V.closed||(d&&t.isHTMLVoidElement(V.tagName)?V.closed=!0:E.push(V.tagName)),v&&ae){for(var H=S(v,{}),oe=0;oe<ae;oe++){var se=V[oe];y(se.offset),se.locator=S(v,{})}o.locator=H,w(V,o,ie)&&x.push(V),o.locator=v}else w(V,o,ie)&&x.push(V);d&&!V.closed?N=T(e,N,V.tagName,p,o):N++}}catch(e){if(e instanceof l)throw e;if(e instanceof u)return c.fatalError(`Error constructing the DOM: `+e.name+`: `+e.message,e);c.error(`element parse error: `+e),N=-1}N>D?D=N:m(Math.max(O,D)+1)}}function S(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function C(e,t,n,r,i,a,o){function c(e,t,r){if(s(n.attributeNames,e))return a.fatalError(`Attribute `+e+` redefined`);if(!o&&t.indexOf(`<`)>=0)return a.fatalError(`Unescaped '<' not allowed in attributes values`);n.addValue(e,t.replace(/[\t\n\r]/g,` `).replace(b,i),r)}for(var l,u,y=++t,x=d;;){var S=e.charAt(y);if(x===d&&S===`<`)throw Error(`unexpected < in tag name: `+e.slice(t,y));switch(S){case`=`:if(x===f)l=e.slice(t,y),x=m;else if(x===p)x=m;else throw Error(`attribute equal must after attrName`);break;case`'`:case`"`:if(x===m||x===f){if(x===f&&(a.warning(`attribute value must after "="`),l=e.slice(t,y)),t=y+1,y=e.indexOf(S,t),y>0)u=e.slice(t,y),c(l,u,t-1),x=g;else throw Error(`attribute value no end '`+S+`' match`)}else if(x==h)u=e.slice(t,y),c(l,u,t),a.warning(`attribute "`+l+`" missed start quot(`+S+`)!!`),t=y+1,x=g;else throw Error(`attribute value must after "="`);break;case`/`:switch(x){case d:n.setTagName(e.slice(t,y));case g:case _:case v:x=v,n.closed=!0;case h:case f:break;case p:n.closed=!0;break;default:throw Error(`attribute invalid close char('/')`)}break;case``:return a.error(`unexpected end of input`),x==d&&n.setTagName(e.slice(t,y)),y;case`>`:switch(x){case d:n.setTagName(e.slice(t,y));case g:case _:case v:break;case h:case f:u=e.slice(t,y),u.slice(-1)===`/`&&(n.closed=!0,u=u.slice(0,-1));case p:x===p&&(u=l),x==h?(a.warning(`attribute "`+u+`" missed quot(")!`),c(l,u,t)):(o||a.warning(`attribute "`+u+`" missed value!! "`+u+`" instead!!`),c(u,u,t));break;case m:if(!o)return a.fatalError(`AttValue: ' or " expected`)}return y;case``:S=` `;default:if(S<=` `)switch(x){case d:n.setTagName(e.slice(t,y)),x=_;break;case f:l=e.slice(t,y),x=p;break;case h:var u=e.slice(t,y);a.warning(`attribute "`+u+`" missed quot(")!!`),c(l,u,t);case g:x=_}else switch(x){case p:o||a.warning(`attribute "`+l+`" missed value!! "`+l+`" instead2!!`),c(l,l,t),t=y,x=f;break;case g:a.warning(`attribute space is required"`+l+`"!!`);case _:x=f,t=y;break;case m:x=h,t=y;break;case v:throw Error(`elements closed character '/' and '>' must be connected to`)}}y++}}function w(e,t,n){for(var r=e.tagName,i=null,a=e.length;a--;){var o=e[a],l=o.qName,u=o.value,d=l.indexOf(`:`);if(d>0)var f=o.prefix=l.slice(0,d),p=l.slice(d+1),m=f===`xmlns`&&p;else p=l,f=null,m=l===`xmlns`&&``;o.localName=p,m!==!1&&(i??(i=Object.create(null),n=Object.create(n)),n[m]=i[m]=u,o.uri=c.XMLNS,t.startPrefixMapping(m,u))}for(var a=e.length;a--;)o=e[a],o.prefix&&(o.prefix===`xml`&&(o.uri=c.XML),o.prefix!==`xmlns`&&(o.uri=n[o.prefix]));var d=r.indexOf(`:`);d>0?(f=e.prefix=r.slice(0,d),p=e.localName=r.slice(d+1)):(f=null,p=e.localName=r);var h=e.uri=n[f||``];if(t.startElement(h,p,r,e),e.closed){if(t.endElement(h,p,r),i)for(f in i)s(i,f)&&t.endPrefixMapping(f)}else return e.currentNSMap=n,e.localNSMap=i,!0}function T(e,t,n,r,a){var s=i(n);if(s||o(n)){var c=RegExp(`</`+n.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)+`>`,`ig`);c.lastIndex=t;var l=c.exec(e),u=l?l.index:-1;if(u<0)return t+1;var d=e.substring(t+1,u);return s&&(d=d.replace(b,r)),a.characters(d,0,d.length),u}return t+1}function E(e,t){for(var n in e)s(e,n)&&(t[n]=e[n])}function D(e,t){var r=t;function i(t){return t||=0,e.charAt(r+t)}function a(e){e||=1,r+=e}function o(){for(var t=0;r<e.length;){var n=i();if(n!==` `&&n!==`
|
|
19
|
-
`&&n!==` `&&n!==`\r`)return t;t++,a()}return-1}function s(){return e.substring(r)}function c(t){return e.substring(r,r+t.length)===t}function l(t){return e.substring(r,r+t.length).toUpperCase()===t.toUpperCase()}function u(e){var t=n.reg(`^`,e).exec(s());return t?(a(t[0].length),t[0]):null}return{char:i,getIndex:function(){return r},getMatch:u,getSource:function(){return e},skip:a,skipBlanks:o,substringFromIndex:s,substringStartsWith:c,substringStartsWithCaseInsensitive:l}}function O(e,t){function r(e,t){var r=n.PI.exec(e.substringFromIndex());return r?r[1].toLowerCase()===`xml`?t.fatalError(`xml declaration is only allowed at the start of the document, but found at position `+e.getIndex()):(e.skip(r[0].length),r[0]):t.fatalError(`processing instruction is not well-formed at position `+e.getIndex())}var i=e.getSource();if(e.char()===`[`){e.skip(1);for(var a=e.getIndex();e.getIndex()<i.length;){if(e.skipBlanks(),e.char()===`]`){var o=i.substring(a,e.getIndex());return e.skip(1),o}var s=null;if(e.char()===`<`&&e.char(1)===`!`)switch(e.char(2)){case`E`:e.char(3)===`L`?s=e.getMatch(n.elementdecl):e.char(3)===`N`&&(s=e.getMatch(n.EntityDecl));break;case`A`:s=e.getMatch(n.AttlistDecl);break;case`N`:s=e.getMatch(n.NotationDecl);break;case`-`:s=e.getMatch(n.Comment)}else if(e.char()===`<`&&e.char(1)===`?`)s=r(e,t);else if(e.char()===`%`)s=e.getMatch(n.PEReference);else return t.fatalError(`Error detected in Markup declaration`);if(!s)return t.fatalError(`Error in internal subset at position `+e.getIndex())}return t.fatalError(`doctype internal subset is not well-formed, missing ]`)}}function ee(e,t,r,i,a){var o=D(e,t);switch(a?o.char(2).toUpperCase():o.char(2)){case`-`:var s=o.getMatch(n.Comment);return s?(r.comment(s,n.COMMENT_START.length,s.length-n.COMMENT_START.length-n.COMMENT_END.length),o.getIndex()):i.fatalError(`comment is not well-formed at position `+o.getIndex());case`[`:var c=o.getMatch(n.CDSect);return c?!a&&!r.currentElement?i.fatalError(`CDATA outside of element`):(r.startCDATA(),r.characters(c,n.CDATA_START.length,c.length-n.CDATA_START.length-n.CDATA_END.length),r.endCDATA(),o.getIndex()):i.fatalError(`Invalid CDATA starting at position `+t);case`D`:if(r.doc&&r.doc.documentElement)return i.fatalError(`Doctype not allowed inside or after documentElement at position `+o.getIndex());if(a?!o.substringStartsWithCaseInsensitive(n.DOCTYPE_DECL_START):!o.substringStartsWith(n.DOCTYPE_DECL_START))return i.fatalError(`Expected `+n.DOCTYPE_DECL_START+` at position `+o.getIndex());if(o.skip(n.DOCTYPE_DECL_START.length),o.skipBlanks()<1)return i.fatalError(`Expected whitespace after `+n.DOCTYPE_DECL_START+` at position `+o.getIndex());var l={name:void 0,publicId:void 0,systemId:void 0,internalSubset:void 0};if(l.name=o.getMatch(n.Name),!l.name)return i.fatalError(`doctype name missing or contains unexpected characters at position `+o.getIndex());if(a&&l.name.toLowerCase()!==`html`&&i.warning(`Unexpected DOCTYPE in HTML document at position `+o.getIndex()),o.skipBlanks(),o.substringStartsWith(n.PUBLIC)||o.substringStartsWith(n.SYSTEM)){var u=n.ExternalID_match.exec(o.substringFromIndex());if(!u)return i.fatalError(`doctype external id is not well-formed at position `+o.getIndex());u.groups.SystemLiteralOnly===void 0?(l.systemId=u.groups.SystemLiteral,l.publicId=u.groups.PubidLiteral):l.systemId=u.groups.SystemLiteralOnly,o.skip(u[0].length)}else if(a&&o.substringStartsWithCaseInsensitive(n.SYSTEM)){if(o.skip(n.SYSTEM.length),o.skipBlanks()<1)return i.fatalError(`Expected whitespace after `+n.SYSTEM+` at position `+o.getIndex());if(l.systemId=o.getMatch(n.ABOUT_LEGACY_COMPAT_SystemLiteral),!l.systemId)return i.fatalError(`Expected `+n.ABOUT_LEGACY_COMPAT+` in single or double quotes after `+n.SYSTEM+` at position `+o.getIndex())}return a&&l.systemId&&!n.ABOUT_LEGACY_COMPAT_SystemLiteral.test(l.systemId)&&i.warning(`Unexpected doctype.systemId in HTML document at position `+o.getIndex()),a||(o.skipBlanks(),l.internalSubset=O(o,i)),o.skipBlanks(),o.char()===`>`?(o.skip(1),r.startDTD(l.name,l.publicId,l.systemId,l.internalSubset),r.endDTD(),o.getIndex()):i.fatalError(`doctype not terminated with > at position `+o.getIndex());default:return i.fatalError(`Not well-formed XML starting with "<!" at position `+t)}}function te(e,t,r,i){var a=e.substring(t).match(n.PI);if(!a)return i.fatalError(`Invalid processing instruction starting at position `+t);if(a[1].toLowerCase()===`xml`){if(t>0)return i.fatalError(`processing instruction at position `+t+` is an xml declaration which is only at the start of the document`);if(!n.XMLDecl.test(e.substring(t)))return i.fatalError(`xml declaration is not well-formed`)}return r.processingInstruction(a[1],a[2]),t+a[0].length}function
|
|
17
|
+
if(i){if(Y(i)===`ENOENT`)return!0;if(Y(i)!==`ENOTDIR`)throw i}return t.filter&&!t.filter(e,n)?!1:(vi(()=>ia(e,t)),!0)}let a=!0;for(let n of i){let i=r===la?ua:r,o=ue(e,n.name);a=ha(o,t,n,i)&&a}if(r===la)return ha(e,t,n,da);if(r===da){if(t.preserveRoot===!1&&e===U(e).root||!a||t.filter&&!t.filter(e,n))return!1;vi(()=>ca(e,t))}return!0},ga=M.platform===`win32`?fa:Si,_a=M.platform===`win32`?pa:Ci,{rm:va}=ui,ya=async(e,t)=>(await va(e,{...t,force:!0,recursive:!0}),!0),ba=(e,t)=>(V(e,{...t,force:!0,recursive:!0}),!0),[xa=0,Sa=0]=M.version.replace(/^v/,``).split(`.`).map(e=>parseInt(e,10)),Ca=xa>14||xa===14&&Sa>=14,wa=!Ca||M.platform===`win32`?()=>!1:e=>!e?.signal&&!e?.filter,Ta=!Ca||M.platform===`win32`?()=>!1:e=>!e?.signal&&!e?.filter,Ea=e=>async(t,n)=>{let r=oi(n);return r.glob&&(t=await ti(t,r.glob)),Array.isArray(t)?!!(await Promise.all(t.map(t=>e(ci(t,r),r)))).reduce((e,t)=>e&&t,!0):!!await e(ci(t,r),r)},Da=e=>(t,n)=>{let r=si(n);return r.glob&&(t=Kr(t,r.glob)),Array.isArray(t)?!!t.map(t=>e(ci(t,r),r)).reduce((e,t)=>e&&t,!0):!!e(ci(t,r),r)},Oa=Da(ba),ka=Object.assign(Ea(ya),{sync:Oa}),Aa=Da(_a),ja=Object.assign(Ea(ga),{sync:Aa}),Ma=Da(pa),Na=Object.assign(Ea(fa),{sync:Ma}),Pa=Da(Ci),Fa=Object.assign(Ea(Si),{sync:Pa}),Ia=Da(Zi),La=Object.assign(Ea(Ji),{sync:Ia}),Ra=Da((e,t)=>Ta(t)?ba(e,t):_a(e,t)),za=Ea((e,t)=>wa(t)?ya(e,t):ga(e,t)),Ba=Object.assign(za,{rimraf:za,sync:Ra,rimrafSync:Ra,manual:ja,manualSync:Aa,native:ka,nativeSync:Oa,posix:Fa,posixSync:Pa,windows:Na,windowsSync:Ma,moveRemove:La,moveRemoveSync:Ia});Ba.rimraf=Ba;async function Va(e,t,{baseDir:n=``,readdirImpl:r=ee,cpImpl:i=T,joinImpl:a=m}={}){for(let o of e){let e=n?a(n,o):o;try{let n=await r(e,{withFileTypes:!0});for(let r of n){let n=a(e,r.name),o=a(t,r.name);r.isDirectory()?await i(n,o,{recursive:!0,force:!0}):r.isFile()&&await i(n,o,{force:!0})}}catch{}}}async function Ha(e,t,n={},{statImpl:r=A,cpImpl:i=T}={}){let a=Array.isArray(e)?e:[e];for(let e of a)try{return await r(e),await i(e,t,n),!0}catch{}return!1}async function Ua(e,{statImpl:t=A}={}){for(let n of e)try{return await t(n),n}catch{}return null}function Wa({contentRoot:e=``,toolchainRoot:t=``,distPublicDir:n=`dist/public`}={}){let r=[{sources:[`pages/resources/README.md`,`pages/deps/README.md`,`resources/README.md`,`deps/README.md`,`pages/README.md`,`README.md`],dest:`dist/public/README.md`},{sources:[`pages/resources/docs`,`pages/deps/docs`,`resources/docs`,`deps/docs`,`pages/docs`,`docs`],dest:`dist/public/docs`,opts:{recursive:!0}},{sources:[`pages/resources/AGENTS.md`,`pages/deps/AGENTS.md`,`resources/AGENTS.md`,`deps/AGENTS.md`,`pages/AGENTS.md`,`AGENTS.md`],dest:`dist/public/AGENTS.md`},{sources:[`pages/resources/llms.txt`,`pages/deps/llms.txt`,`resources/llms.txt`,`deps/llms.txt`,`pages/llms.txt`,`llms.txt`],dest:`dist/public/llms.txt`},{sources:[`pages/resources/robots.txt`,`pages/deps/robots.txt`,`resources/robots.txt`,`deps/robots.txt`,`pages/robots.txt`,`robots.txt`],dest:`dist/public/robots.txt`},{sources:[`pages/resources/sitemap.xml`,`pages/deps/sitemap.xml`,`resources/sitemap.xml`,`deps/sitemap.xml`,`pages/sitemap.xml`,`pages/main/sitemap.xml`,`sitemap.xml`],dest:`dist/public/sitemap.xml`},{sources:[`pages/resources/sitemap.txt`,`pages/deps/sitemap.txt`,`resources/sitemap.txt`,`deps/sitemap.txt`,`pages/sitemap.txt`,`pages/main/sitemap.txt`,`sitemap.txt`],dest:`dist/public/sitemap.txt`},{sources:[`pages/resources/404.html`,`pages/deps/404.html`,`resources/404.html`,`deps/404.html`,`pages/404.html`,`pages/main/404.html`,`404.html`],dest:`dist/public/404.html`},{sources:[`pages/resources/manifest.json`,`pages/deps/manifest.json`,`resources/manifest.json`,`deps/manifest.json`,`pages/manifest.json`,`pages/main/manifest.json`,`manifest.json`],dest:`dist/public/manifest.json`},{sources:[`pages/resources/assets/icons/favicon.svg`,`pages/deps/assets/icons/favicon.svg`,`resources/assets/icons/favicon.svg`,`deps/assets/icons/favicon.svg`,`pages/resources/assets/favicon.svg`,`pages/resources/favicon.svg`,`pages/deps/favicon.svg`,`resources/favicon.svg`,`deps/favicon.svg`,`pages/favicon.svg`,`pages/main/favicon.svg`,`assets/icons/favicon.svg`],dest:`dist/public/favicon.svg`},{sources:[`pages/resources/assets/icons/favicon.ico`,`pages/deps/assets/icons/favicon.ico`,`resources/assets/icons/favicon.ico`,`deps/assets/icons/favicon.ico`,`pages/resources/assets/favicon.ico`,`pages/resources/favicon.ico`,`pages/deps/favicon.ico`,`resources/favicon.ico`,`deps/favicon.ico`,`pages/favicon.ico`,`pages/main/favicon.ico`,`assets/icons/favicon.ico`],dest:`dist/public/favicon.ico`}];return!e&&!t&&n===`dist/public`?r:r.map(r=>{let i=n?r.dest.replace(/^dist\/public/,n):r.dest,a=[];if(e)for(let t of r.sources)a.push(p.join(e,t));if(t&&t!==e)for(let e of r.sources)a.push(p.join(t,e));return!e&&!t&&a.push(...r.sources),{sources:a,dest:i,...r.opts?{opts:r.opts}:{}}})}function Ga(e){let t=[`pages/resources/routes.json`,`pages/deps/routes.json`,`resources/routes.json`,`deps/routes.json`,`pages/routes.json`,`routes.json`];return e?t.map(t=>p.join(e,t)):t}function Ka(e){return e?[p.join(e,`shadow-claw-config.json`),p.join(e,`shadow-claw.config.json`),p.join(e,`shadowclaw.config.json`),p.join(e,`pages/shadow-claw-config.json`),p.join(e,`pages/shadow-claw.config.json`),p.join(e,`site-config.json`),p.join(e,`pages/site-config.json`)]:[`shadow-claw-config.json`,`shadow-claw.config.json`,`shadowclaw.config.json`,`site-config.json`]}function qa(e={}){let t=e.PRERENDER_PAGES||`all`;return{isProduction:e.NODE_ENV===`production`,copyAllAssets:e.COPY_ALL_ASSETS===`true`,prerenderPages:t,prerenderMainMemory:e.PRERENDER_MAIN_MEMORY!==`false`&&t!==`none`&&t!==`0`}}var Ja=/* @__PURE__ */ t((e=>{function t(e,t,n){if(n===void 0&&(n=Array.prototype),e&&typeof n.find==`function`)return n.find.call(e,t);for(var i=0;i<e.length;i++)if(r(e,i)){var a=e[i];if(t.call(void 0,a,i,e))return a}}function n(e,t){return t===void 0&&(t=Object),t&&typeof t.getOwnPropertyDescriptors==`function`&&(e=t.create(null,t.getOwnPropertyDescriptors(e))),t&&typeof t.freeze==`function`?t.freeze(e):e}function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function i(e,t){if(typeof e!=`object`||!e)throw TypeError(`target is not an object`);for(var n in t)r(t,n)&&(e[n]=t[n]);return e}var a=n({allowfullscreen:!0,async:!0,autofocus:!0,autoplay:!0,checked:!0,controls:!0,default:!0,defer:!0,disabled:!0,formnovalidate:!0,hidden:!0,ismap:!0,itemscope:!0,loop:!0,multiple:!0,muted:!0,nomodule:!0,novalidate:!0,open:!0,playsinline:!0,readonly:!0,required:!0,reversed:!0,selected:!0});function o(e){return r(a,e.toLowerCase())}var s=n({area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function c(e){return r(s,e.toLowerCase())}var l=n({script:!1,style:!1,textarea:!0,title:!0});function u(e){var t=e.toLowerCase();return r(l,t)&&!l[t]}function d(e){var t=e.toLowerCase();return r(l,t)&&l[t]}function f(e){return e===m.HTML}function p(e){return f(e)||e===m.XML_XHTML_APPLICATION}var m=n({HTML:`text/html`,XML_APPLICATION:`application/xml`,XML_TEXT:`text/xml`,XML_XHTML_APPLICATION:`application/xhtml+xml`,XML_SVG_IMAGE:`image/svg+xml`}),h=Object.keys(m).map(function(e){return m[e]});function g(e){return h.indexOf(e)>-1}var _=n({HTML:`http://www.w3.org/1999/xhtml`,SVG:`http://www.w3.org/2000/svg`,XML:`http://www.w3.org/XML/1998/namespace`,XMLNS:`http://www.w3.org/2000/xmlns/`});e.assign=i,e.find=t,e.freeze=n,e.HTML_BOOLEAN_ATTRIBUTES=a,e.HTML_RAW_TEXT_ELEMENTS=l,e.HTML_VOID_ELEMENTS=s,e.hasDefaultHTMLNamespace=p,e.hasOwn=r,e.isHTMLBooleanAttribute=o,e.isHTMLRawTextElement=u,e.isHTMLEscapableRawTextElement=d,e.isHTMLMimeType=f,e.isHTMLVoidElement=c,e.isValidMimeType=g,e.MIME_TYPE=m,e.NAMESPACE=_})),Ya=/* @__PURE__ */ t((e=>{var t=Ja();function n(e,t){e.prototype=Object.create(Error.prototype,{constructor:{value:e},name:{value:e.name,enumerable:!0,writable:t}})}var r=t.freeze({Error:`Error`,IndexSizeError:`IndexSizeError`,DomstringSizeError:`DomstringSizeError`,HierarchyRequestError:`HierarchyRequestError`,WrongDocumentError:`WrongDocumentError`,InvalidCharacterError:`InvalidCharacterError`,NoDataAllowedError:`NoDataAllowedError`,NoModificationAllowedError:`NoModificationAllowedError`,NotFoundError:`NotFoundError`,NotSupportedError:`NotSupportedError`,InUseAttributeError:`InUseAttributeError`,InvalidStateError:`InvalidStateError`,SyntaxError:`SyntaxError`,InvalidModificationError:`InvalidModificationError`,NamespaceError:`NamespaceError`,InvalidAccessError:`InvalidAccessError`,ValidationError:`ValidationError`,TypeMismatchError:`TypeMismatchError`,SecurityError:`SecurityError`,NetworkError:`NetworkError`,AbortError:`AbortError`,URLMismatchError:`URLMismatchError`,QuotaExceededError:`QuotaExceededError`,TimeoutError:`TimeoutError`,InvalidNodeTypeError:`InvalidNodeTypeError`,DataCloneError:`DataCloneError`,EncodingError:`EncodingError`,NotReadableError:`NotReadableError`,UnknownError:`UnknownError`,ConstraintError:`ConstraintError`,DataError:`DataError`,TransactionInactiveError:`TransactionInactiveError`,ReadOnlyError:`ReadOnlyError`,VersionError:`VersionError`,OperationError:`OperationError`,NotAllowedError:`NotAllowedError`,OptOutError:`OptOutError`}),i=Object.keys(r);function a(e){return typeof e==`number`&&e>=1&&e<=25}function o(e){return typeof e==`string`&&e.substring(e.length-r.Error.length)===r.Error}function s(e,t){a(e)?(this.name=i[e],this.message=t||``):(this.message=e,this.name=o(t)?t:r.Error),Error.captureStackTrace&&Error.captureStackTrace(this,s)}n(s,!0),Object.defineProperties(s.prototype,{code:{enumerable:!0,get:function(){var e=i.indexOf(this.name);return a(e)?e:0}}});for(var c={INDEX_SIZE_ERR:1,DOMSTRING_SIZE_ERR:2,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,INVALID_CHARACTER_ERR:5,NO_DATA_ALLOWED_ERR:6,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INUSE_ATTRIBUTE_ERR:10,INVALID_STATE_ERR:11,SYNTAX_ERR:12,INVALID_MODIFICATION_ERR:13,NAMESPACE_ERR:14,INVALID_ACCESS_ERR:15,VALIDATION_ERR:16,TYPE_MISMATCH_ERR:17,SECURITY_ERR:18,NETWORK_ERR:19,ABORT_ERR:20,URL_MISMATCH_ERR:21,QUOTA_EXCEEDED_ERR:22,TIMEOUT_ERR:23,INVALID_NODE_TYPE_ERR:24,DATA_CLONE_ERR:25},l=Object.entries(c),u=0;u<l.length;u++){var d=l[u][0];s[d]=l[u][1]}function f(e,t,n){this.message=e,this.locator=t,this.cause=n,Error.captureStackTrace&&Error.captureStackTrace(this,f)}n(f),e.DOMException=s,e.DOMExceptionName=r,e.ExceptionCode=c,e.ParseError=f})),Xa=/* @__PURE__ */ t((e=>{function t(e){try{typeof e!=`function`&&(e=RegExp);var t=new e(`𝌆`,`u`).exec(`𝌆`);return!!t&&t[0].length===2}catch{}return!1}var n=t();function r(e){if(e.source[0]!==`[`)throw Error(e+` can not be used with chars`);return e.source.slice(1,e.source.lastIndexOf(`]`))}function i(e,t){if(e.source[0]!==`[`)throw Error(`/`+e.source+`/ can not be used with chars_without`);if(!t||typeof t!=`string`)throw Error(JSON.stringify(t)+` is not a valid search`);if(e.source.indexOf(t)===-1)throw Error(`"`+t+`" is not is /`+e.source+`/`);if(t===`-`&&e.source.indexOf(t)!==1)throw Error(`"`+t+`" is not at the first postion of /`+e.source+`/`);return new RegExp(e.source.replace(t,``),n?`u`:``)}function a(e){var t=this;return new RegExp(Array.prototype.slice.call(arguments).map(function(e){var n=typeof e==`string`;if(n&&t===void 0&&e===`|`)throw Error("use regg instead of reg to wrap expressions with `|`!");return n?e:e.source}).join(``),n?`u`:``)}function o(e){if(arguments.length===0)throw Error(`no parameters provided`);return a.apply(o,[`(?:`].concat(Array.prototype.slice.call(arguments),[`)`]))}var s=`�`,c=/[-\x09\x0A\x0D\x20-\x2C\x2E-\uD7FF\uE000-\uFFFD]/;n&&(c=a(`[`,r(c),`\\u{10000}-\\u{10FFFF}`,`]`));var l=RegExp(`[^`+r(c)+`]`,n?`u`:``),u=/[\x20\x09\x0D\x0A]/,d=r(u),f=a(u,`+`),p=a(u,`*`),m=/[:_a-zA-Z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;n&&(m=a(`[`,r(m),`\\u{10000}-\\u{10FFFF}`,`]`));var h=a(`[`,r(m),r(/[-.0-9\xB7]/),r(/[\u0300-\u036F\u203F-\u2040]/),`]`),g=a(m,h,`*`),_=a(`^`,g,`$`),v=a(h,`+`),y=o(a(`&`,g,`;`),`|`,o(/&#[0-9]+;|&#x[0-9a-fA-F]+;/)),b=a(`%`,g,`;`),x=o(a(`"`,o(/[^%&"]/,`|`,b,`|`,y),`*`,`"`),`|`,a(`'`,o(/[^%&']/,`|`,b,`|`,y),`*`,`'`)),S=o(`"`,o(/[^<&"]/,`|`,y),`*`,`"`,`|`,`'`,o(/[^<&']/,`|`,y),`*`,`'`),C=a(i(m,`:`),i(h,`:`),`*`),w=a(`^`,C,`$`),T=a(C,o(`:`,C),`?`),E=a(`^`,T,`$`),D=a(`(`,T,`)`),O=o(/"[^"]*"|'[^']*'/),ee=a(/^<\?/,`(`,g,`)`,o(f,`(?!`,u,`)(`,c,`*?)`),`?`,/\?>/),te=/[\x20\x0D\x0Aa-zA-Z0-9-'()+,./:=?;!*#@$_%]/,ne=o(`"`,te,`*"`,`|`,`'`,i(te,`'`),`*'`),k=`<!--`,A=`-->`,j=a(k,o(i(c,`-`),`|`,a(`-`,i(c,`-`))),`*`,A),M=`#PCDATA`,N=o(`EMPTY`,`|`,`ANY`,`|`,o(a(/\(/,p,M,o(p,/\|/,p,T),`*`,p,/\)\*/),`|`,a(/\(/,p,M,p,/\)/)),`|`,a(/\([^>]+\)/,/[?*+]?/)),P=a(`<!ELEMENT`,f,o(T,`|`,b),f,o(N,`|`,b),p,`>`),F=a(`<!ATTLIST`,f,g,o(f,g,f,o(/CDATA|ID|IDREF|IDREFS|ENTITY|ENTITIES|NMTOKEN|NMTOKENS/,`|`,o(a(`NOTATION`,f,/\(/,p,g,o(p,/\|/,p,g),`*`,p,/\)/),`|`,a(/\(/,p,v,o(p,/\|/,p,v),`*`,p,/\)/))),f,o(/#REQUIRED|#IMPLIED/,`|`,o(o(`#FIXED`,f),`?`,S))),`*`,p,`>`),I=`about:legacy-compat`,L=o(`"`+I+`"`,`|`,`'`+I+`'`),R=`SYSTEM`,z=`PUBLIC`,B=o(o(R,f,O),`|`,o(z,f,ne,f,O)),re=a(`^`,o(o(R,f,`(?<SystemLiteralOnly>`,O,`)`),`|`,o(z,f,`(?<PubidLiteral>`,ne,`)`,f,`(?<SystemLiteral>`,O,`)`))),V=a(`^`,ne,`$`),ie=a(`^`,O,`$`),ae=o(x,`|`,o(B,o(f,`NDATA`,f,g),`?`)),H=`<!ENTITY`,oe=o(a(H,f,g,f,ae,p,`>`),`|`,a(H,f,`%`,f,g,f,o(x,`|`,B),p,`>`)),se=a(`<!NOTATION`,f,g,f,o(B,`|`,a(z,f,ne)),p,`>`),ce=a(p,`=`,p),le=/1[.]\d+/,U=a(f,`version`,ce,o(`'`,le,`'`,`|`,`"`,le,`"`)),ue=/[A-Za-z][-A-Za-z0-9._]*/,de=a(/^<\?xml/,U,o(f,`encoding`,ce,o(`"`,ue,`"`,`|`,`'`,ue,`'`)),`?`,o(f,`standalone`,ce,o(`'`,o(`yes`,`|`,`no`),`'`,`|`,`"`,o(`yes`,`|`,`no`),`"`)),`?`,p,/\?>/),W=`<!DOCTYPE`,fe=`<![CDATA[`,pe=`]]>`,me=a(/<!\[CDATA\[/,a(c,`*?`,/\]\]>/));e.chars=r,e.chars_without=i,e.detectUnicodeSupport=t,e.reg=a,e.regg=o,e.ABOUT_LEGACY_COMPAT=I,e.ABOUT_LEGACY_COMPAT_SystemLiteral=L,e.AttlistDecl=F,e.CDATA_START=fe,e.CDATA_END=pe,e.CDSect=me,e.Char=c,e.Comment=j,e.COMMENT_START=k,e.COMMENT_END=A,e.DOCTYPE_DECL_START=W,e.elementdecl=P,e.EntityDecl=oe,e.EntityValue=x,e.ExternalID=B,e.ExternalID_match=re,e.Name=g,e.Name_exact=_,e.NCName_exact=w,e.NotationDecl=se,e.Reference=y,e.PEReference=b,e.PI=ee,e.PUBLIC=z,e.PubidLiteral=ne,e.PubidLiteral_match=V,e.QName=T,e.QName_exact=E,e.QName_group=D,e.S=f,e.SChar_s=d,e.S_OPT=p,e.SYSTEM=R,e.SystemLiteral=O,e.SystemLiteral_match=ie,e.InvalidChar=l,e.UNICODE_REPLACEMENT_CHARACTER=s,e.UNICODE_SUPPORT=n,e.XMLDecl=de})),Za=/* @__PURE__ */ t((e=>{var t=Ja(),n=t.find,r=t.hasDefaultHTMLNamespace,i=t.hasOwn,a=t.isHTMLMimeType,o=t.isHTMLRawTextElement,s=t.isHTMLVoidElement,c=t.MIME_TYPE,l=t.NAMESPACE,u=Symbol(),d=Ya(),f=d.DOMException,p=d.DOMExceptionName,m=Xa();function h(e){if(e!==u)throw TypeError(`Illegal constructor`)}function g(e){return e!==``}function _(e){return e?e.split(/[\t\n\f\r ]+/).filter(g):[]}function v(e,t){return i(e,t)||(e[t]=!0),e}function y(e){if(!e)return[];var t=_(e);return Object.keys(t.reduce(v,{}))}function b(e){return function(t){return e&&e.indexOf(t)!==-1}}function x(e){if(!m.QName_exact.test(e))throw new f(f.INVALID_CHARACTER_ERR,`invalid character in qualified name "`+e+`"`)}function S(e,n){x(n),e||=null;var r=null,i=n;if(n.indexOf(`:`)>=0){var a=n.split(`:`);r=a[0],i=a[1]}if(r!==null&&e===null)throw new f(f.NAMESPACE_ERR,`prefix is non-null and namespace is null`);if(r===`xml`&&e!==t.NAMESPACE.XML)throw new f(f.NAMESPACE_ERR,`prefix is "xml" and namespace is not the XML namespace`);if((r===`xmlns`||n===`xmlns`)&&e!==t.NAMESPACE.XMLNS)throw new f(f.NAMESPACE_ERR,`either qualifiedName or prefix is "xmlns" and namespace is not the XMLNS namespace`);if(e===t.NAMESPACE.XMLNS&&r!==`xmlns`&&n!==`xmlns`)throw new f(f.NAMESPACE_ERR,`namespace is the XMLNS namespace and neither qualifiedName nor prefix is "xmlns"`);return[e,r,i]}function C(e,t){for(var n in e)i(e,n)&&(t[n]=e[n])}function w(e,t){var n=e.prototype;if(!(n instanceof t)){function r(){}r.prototype=t.prototype,r=new r,C(n,r),e.prototype=n=r}n.constructor!=e&&(typeof e!=`function`&&console.error(`unknown Class:`+e),n.constructor=e)}var T={},E=T.ELEMENT_NODE=1,D=T.ATTRIBUTE_NODE=2,O=T.TEXT_NODE=3,ee=T.CDATA_SECTION_NODE=4,te=T.ENTITY_REFERENCE_NODE=5,ne=T.ENTITY_NODE=6,k=T.PROCESSING_INSTRUCTION_NODE=7,A=T.COMMENT_NODE=8,j=T.DOCUMENT_NODE=9,M=T.DOCUMENT_TYPE_NODE=10,N=T.DOCUMENT_FRAGMENT_NODE=11,P=T.NOTATION_NODE=12,F=t.freeze({DOCUMENT_POSITION_DISCONNECTED:1,DOCUMENT_POSITION_PRECEDING:2,DOCUMENT_POSITION_FOLLOWING:4,DOCUMENT_POSITION_CONTAINS:8,DOCUMENT_POSITION_CONTAINED_BY:16,DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:32});function I(e,t){if(t.length<e.length)return I(t,e);var n=null;for(var r in e){if(e[r]!==t[r])return n;n=e[r]}return n}function L(e){return e.guid||=Math.random(),e.guid}function R(){}R.prototype={length:0,item:function(e){return e>=0&&e<this.length?this[e]:null},toString:function(e){for(var t=typeof e==`function`?{requireWellFormed:!1,splitCDATASections:!0,nodeFilter:e}:e?{requireWellFormed:!!e.requireWellFormed,splitCDATASections:e.splitCDATASections!==!1,nodeFilter:e.nodeFilter||null}:{requireWellFormed:!1,splitCDATASections:!0,nodeFilter:null},n=[],r=0;r<this.length;r++)We(this[r],n,null,t);return n.join(``)},filter:function(e){return Array.prototype.filter.call(this,e)},indexOf:function(e){return Array.prototype.indexOf.call(this,e)}},R.prototype[Symbol.iterator]=function(){var e=this,t=0;return{next:function(){return t<e.length?{value:e[t++],done:!1}:{done:!0}},return:function(){return{done:!0}}}};function z(e,t){this._node=e,this._refresh=t,B(this)}function B(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!==t){var n=e._refresh(e._node);if(qe(e,`length`,n.length),!e.$$length||n.length<e.$$length)for(var r=n.length;r in e;r++)i(e,r)&&delete e[r];C(n,e),e._inc=t}}z.prototype.item=function(e){return B(this),this[e]||null},w(z,R);function re(){this._nsIndex=Object.create(null),this._noNsIndex=Object.create(null)}function V(e,t){for(var n=0;n<e.length;){if(e[n]===t)return n;n++}}function ie(e,t,n){if(!t)return e._noNsIndex;var r=e._nsIndex[t];return!r&&n&&(r=e._nsIndex[t]=Object.create(null)),r}function ae(e,t,n){var r=ie(e,t,!1);return r&&r[n]||null}function H(e,t){ie(e,t.namespaceURI,!0)[t.localName]=t}function oe(e,t){var n=ie(e,t.namespaceURI,!1);n&&delete n[t.localName]}function se(e,t,n,r){if(r?t[V(t,r)]=n:(t[t.length]=n,t.length++),H(t,n),e){n.ownerElement=e;var i=e.ownerDocument;i&&(r&&me(i,e,r),pe(i,e,n))}}function ce(e,t,n){var r=V(t,n);if(r>=0){for(var i=t.length-1;r<=i;)t[r]=t[++r];if(t.length=i,oe(t,n),e){var a=e.ownerDocument;a&&me(a,e,n),n.ownerElement=null}}}re.prototype={length:0,item:R.prototype.item,getNamedItem:function(e){this._ownerElement&&this._ownerElement._isInHTMLDocumentAndNamespace()&&(e=e.toLowerCase());for(var t=0;t<this.length;){var n=this[t];if(n.nodeName===e)return n;t++}return null},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!==this._ownerElement)throw new f(f.INUSE_ATTRIBUTE_ERR);var n=ae(this,e.namespaceURI,e.localName);return n===e?e:(se(this._ownerElement,this,e,n),n)},setNamedItemNS:function(e){return this.setNamedItem(e)},removeNamedItem:function(e){var t=this.getNamedItem(e);if(!t)throw new f(f.NOT_FOUND_ERR,e);return ce(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var n=this.getNamedItemNS(e,t);if(!n)throw new f(f.NOT_FOUND_ERR,e?e+` : `+t:t);return ce(this._ownerElement,this,n),n},getNamedItemNS:function(e,t){e||=null;for(var n=0;n<this.length;){var r=this[n];if(r.localName===t&&r.namespaceURI===e)return r;n++}return null}},re.prototype[Symbol.iterator]=function(){var e=this,t=0;return{next:function(){return t<e.length?{value:e[t++],done:!1}:{done:!0}},return:function(){return{done:!0}}}};function le(){}le.prototype={hasFeature:function(e,t){return!0},createDocument:function(e,t,n){var r=c.XML_APPLICATION;e===l.HTML?r=c.XML_XHTML_APPLICATION:e===l.SVG&&(r=c.XML_SVG_IMAGE);var i=new fe(u,{contentType:r});if(i.implementation=this,i.childNodes=new R,i.doctype=n||null,n&&i.appendChild(n),t){var a=i.createElementNS(e,t);i.appendChild(a)}return i},createDocumentType:function(e,t,n,r){x(e);var i=new Pe(u);return i.name=e,i.nodeName=e,i.publicId=t||``,i.systemId=n||``,i.internalSubset=r||``,i.childNodes=new R,i},createHTMLDocument:function(e){var t=new fe(u,{contentType:c.HTML});if(t.implementation=this,t.childNodes=new R,e!==!1){t.doctype=this.createDocumentType(`html`),t.doctype.ownerDocument=t,t.appendChild(t.doctype);var n=t.createElement(`html`);t.appendChild(n);var r=t.createElement(`head`);if(n.appendChild(r),typeof e==`string`){var i=t.createElement(`title`);i.appendChild(t.createTextNode(e)),r.appendChild(i)}n.appendChild(t.createElement(`body`))}return t}};function U(e){h(e)}U.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,parentNode:null,get parentElement(){return this.parentNode&&this.parentNode.nodeType===this.ELEMENT_NODE?this.parentNode:null},childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,baseURI:`about:blank`,get isConnected(){var e=this.getRootNode();return e&&e.nodeType===e.DOCUMENT_NODE},contains:function(e){if(!e)return!1;var t=e;do{if(this===t)return!0;t=t.parentNode}while(t);return!1},getRootNode:function(e){var t=this;do{if(!t.parentNode)return t;t=t.parentNode}while(t)},isEqualNode:function(e){if(!e)return!1;for(var t=[{node:this,other:e}];t.length>0;){var n=t.pop(),r=n.node,i=n.other;if(r.nodeType!==i.nodeType)return!1;switch(r.nodeType){case r.DOCUMENT_TYPE_NODE:if(r.name!==i.name||r.publicId!==i.publicId||r.systemId!==i.systemId)return!1;break;case r.ELEMENT_NODE:if(r.namespaceURI!==i.namespaceURI||r.prefix!==i.prefix||r.localName!==i.localName||r.attributes.length!==i.attributes.length)return!1;for(var a=0;a<r.attributes.length;a++){var o=r.attributes.item(a),s=i.getAttributeNodeNS(o.namespaceURI,o.localName);if(!s)return!1;t.push({node:o,other:s})}break;case r.ATTRIBUTE_NODE:if(r.namespaceURI!==i.namespaceURI||r.localName!==i.localName||r.value!==i.value)return!1;break;case r.PROCESSING_INSTRUCTION_NODE:if(r.target!==i.target||r.data!==i.data)return!1;break;case r.TEXT_NODE:case r.CDATA_SECTION_NODE:case r.COMMENT_NODE:if(r.data!==i.data)return!1}if(r.childNodes.length!==i.childNodes.length)return!1;for(var a=r.childNodes.length-1;a>=0;a--)t.push({node:r.childNodes[a],other:i.childNodes[a]})}return!0},isSameNode:function(e){return this===e},insertBefore:function(e,t){return De(this,e,t)},replaceChild:function(e,t){De(this,e,t,Ee),t&&this.removeChild(t)},removeChild:function(e){return ge(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(e){return Ke(this.ownerDocument||this,this,e)},normalize:function(){W(this,null,{enter:function(e){for(var t=e.firstChild;t;){var n=t.nextSibling;if(n!==null&&n.nodeType===O&&t.nodeType===O){for(var r=[],i=n;i!==null&&i.nodeType===O;)r.push(i.data),i=i.nextSibling;for(var a=t.nextSibling;a!==i;){var o=a.nextSibling;a.parentNode=null,a.previousSibling=null,a.nextSibling=null,a=o}t.nextSibling=i,i===null?e.lastChild=t:i.previousSibling=t,t.appendData(r.join(``)),he(e.ownerDocument,e),t=i}else t=n}return!0}})},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},lookupPrefix:function(e){for(var t=this;t;){var n=t._nsMap;if(n){for(var r in n)if(i(n,r)&&n[r]===e)return r}t=t.nodeType==D?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var n=t._nsMap;if(n&&i(n,e))return n[e];t=t.nodeType==D?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return this.lookupPrefix(e)==null},compareDocumentPosition:function(e){if(this===e)return 0;var t=e,n=this,r=null,i=null;if(t instanceof ke&&(r=t,t=r.ownerElement),n instanceof ke&&(i=n,n=i.ownerElement,r&&t&&n===t))for(var a=0,o;o=n.attributes[a];a++){if(o===r)return F.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+F.DOCUMENT_POSITION_PRECEDING;if(o===i)return F.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+F.DOCUMENT_POSITION_FOLLOWING}if(!t||!n||n.ownerDocument!==t.ownerDocument)return F.DOCUMENT_POSITION_DISCONNECTED+F.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+(L(n.ownerDocument)>L(t.ownerDocument)?F.DOCUMENT_POSITION_FOLLOWING:F.DOCUMENT_POSITION_PRECEDING);if(i&&t===n)return F.DOCUMENT_POSITION_CONTAINS+F.DOCUMENT_POSITION_PRECEDING;if(r&&t===n)return F.DOCUMENT_POSITION_CONTAINED_BY+F.DOCUMENT_POSITION_FOLLOWING;for(var s=[],c=t.parentNode;c;){if(!i&&c===n)return F.DOCUMENT_POSITION_CONTAINED_BY+F.DOCUMENT_POSITION_FOLLOWING;s.push(c),c=c.parentNode}s.reverse();for(var l=[],u=n.parentNode;u;){if(!r&&u===t)return F.DOCUMENT_POSITION_CONTAINS+F.DOCUMENT_POSITION_PRECEDING;l.push(u),u=u.parentNode}l.reverse();var d=I(s,l);for(var f in d.childNodes){var p=d.childNodes[f];if(p===n)return F.DOCUMENT_POSITION_FOLLOWING;if(p===t)return F.DOCUMENT_POSITION_PRECEDING;if(l.indexOf(p)>=0)return F.DOCUMENT_POSITION_FOLLOWING;if(s.indexOf(p)>=0)return F.DOCUMENT_POSITION_PRECEDING}return 0}};function ue(e){return e==`<`&&`<`||e==`>`&&`>`||e==`&`&&`&`||e==`"`&&`"`||`&#`+e.charCodeAt()+`;`}C(T,U),C(T,U.prototype),C(F,U),C(F,U.prototype);function de(e,t){W(e,null,{enter:function(e){return!t(e)||W.STOP}})}function W(e,t,n){for(var r=[{node:e,context:t,phase:W.ENTER}];r.length>0;){var i=r.pop();if(i.phase===W.ENTER){var a=n.enter(i.node,i.context);if(a===W.STOP)return W.STOP;if(r.push({node:i.node,context:a,phase:W.EXIT}),a==null)continue;for(var o=i.node.lastChild;o;)r.push({node:o,context:a,phase:W.ENTER}),o=o.previousSibling}else n.exit&&n.exit(i.node,i.context)}}W.STOP=Symbol(`walkDOM.STOP`),W.ENTER=0,W.EXIT=1;function fe(e,t){h(e);var n=t||{};this.ownerDocument=this,this.contentType=n.contentType||c.XML_APPLICATION,this.type=a(this.contentType)?`html`:`xml`}function pe(e,t,n){e&&e._inc++,n.namespaceURI===l.XMLNS&&(t._nsMap[n.prefix?n.localName:``]=n.value)}function me(e,t,n,r){e&&e._inc++,n.namespaceURI===l.XMLNS&&delete t._nsMap[n.prefix?n.localName:``]}function he(e,t,n){if(e&&e._inc){e._inc++;var r=t.childNodes;if(n&&!n.nextSibling)r[r.length++]=n;else{for(var i=t.firstChild,a=0;i;)r[a++]=i,i=i.nextSibling;r.length=a,delete r[r.length]}}}function ge(e,t){if(e!==t.parentNode)throw new f(f.NOT_FOUND_ERR,`child's parent is not parent`);var n=t.previousSibling,r=t.nextSibling;return n?n.nextSibling=r:e.firstChild=r,r?r.previousSibling=n:e.lastChild=n,he(e.ownerDocument,e),t.parentNode=null,t.previousSibling=null,t.nextSibling=null,t}function _e(e){return e&&(e.nodeType===U.DOCUMENT_NODE||e.nodeType===U.DOCUMENT_FRAGMENT_NODE||e.nodeType===U.ELEMENT_NODE)}function ve(e){return e&&(e.nodeType===U.CDATA_SECTION_NODE||e.nodeType===U.COMMENT_NODE||e.nodeType===U.DOCUMENT_FRAGMENT_NODE||e.nodeType===U.DOCUMENT_TYPE_NODE||e.nodeType===U.ELEMENT_NODE||e.nodeType===U.PROCESSING_INSTRUCTION_NODE||e.nodeType===U.TEXT_NODE)}function ye(e){return e&&e.nodeType===U.DOCUMENT_TYPE_NODE}function be(e){return e&&e.nodeType===U.ELEMENT_NODE}function xe(e){return e&&e.nodeType===U.TEXT_NODE}function Se(e,t){var r=e.childNodes||[];if(n(r,be)||ye(t))return!1;var i=n(r,ye);return!(t&&i&&r.indexOf(i)>r.indexOf(t))}function Ce(e,t){var r=e.childNodes||[];function i(e){return be(e)&&e!==t}if(n(r,i))return!1;var a=n(r,ye);return!(t&&a&&r.indexOf(a)>r.indexOf(t))}function we(e,t,n){if(!_e(e))throw new f(f.HIERARCHY_REQUEST_ERR,`Unexpected parent node type `+e.nodeType);if(n&&n.parentNode!==e)throw new f(f.NOT_FOUND_ERR,`child not in parent`);if(!ve(t)||ye(t)&&e.nodeType!==U.DOCUMENT_NODE)throw new f(f.HIERARCHY_REQUEST_ERR,`Unexpected node type `+t.nodeType+` for parent node type `+e.nodeType)}function Te(e,t,r){var i=e.childNodes||[],a=t.childNodes||[];if(t.nodeType===U.DOCUMENT_FRAGMENT_NODE){var o=a.filter(be);if(o.length>1||n(a,xe))throw new f(f.HIERARCHY_REQUEST_ERR,`More than one element or text in fragment`);if(o.length===1&&!Se(e,r))throw new f(f.HIERARCHY_REQUEST_ERR,`Element in fragment can not be inserted before doctype`)}if(be(t)&&!Se(e,r))throw new f(f.HIERARCHY_REQUEST_ERR,`Only one element can be added and only after doctype`);if(ye(t)){if(n(i,ye))throw new f(f.HIERARCHY_REQUEST_ERR,`Only one doctype is allowed`);var s=n(i,be);if(r&&i.indexOf(s)<i.indexOf(r))throw new f(f.HIERARCHY_REQUEST_ERR,`Doctype can only be inserted before an element`);if(!r&&s)throw new f(f.HIERARCHY_REQUEST_ERR,`Doctype can not be appended since element is present`)}}function Ee(e,t,r){var i=e.childNodes||[],a=t.childNodes||[];if(t.nodeType===U.DOCUMENT_FRAGMENT_NODE){var o=a.filter(be);if(o.length>1||n(a,xe))throw new f(f.HIERARCHY_REQUEST_ERR,`More than one element or text in fragment`);if(o.length===1&&!Ce(e,r))throw new f(f.HIERARCHY_REQUEST_ERR,`Element in fragment can not be inserted before doctype`)}if(be(t)&&!Ce(e,r))throw new f(f.HIERARCHY_REQUEST_ERR,`Only one element can be added and only after doctype`);if(ye(t)){function e(e){return ye(e)&&e!==r}if(n(i,e))throw new f(f.HIERARCHY_REQUEST_ERR,`Only one doctype is allowed`);var s=n(i,be);if(r&&i.indexOf(s)<i.indexOf(r))throw new f(f.HIERARCHY_REQUEST_ERR,`Doctype can only be inserted before an element`)}}function De(e,t,n,r){we(e,t,n),e.nodeType===U.DOCUMENT_NODE&&(r||Te)(e,t,n);var i=t.parentNode;if(i&&i.removeChild(t),t.nodeType===N){var a=t.firstChild;if(a==null)return t;var o=t.lastChild}else a=o=t;var s=n?n.previousSibling:e.lastChild;a.previousSibling=s,o.nextSibling=n,s?s.nextSibling=a:e.firstChild=a,n==null?e.lastChild=o:n.previousSibling=o;do a.parentNode=e;while(a!==o&&(a=a.nextSibling));return he(e.ownerDocument||e,e,t),t.nodeType==N&&(t.firstChild=t.lastChild=null),t}fe.prototype={implementation:null,nodeName:`#document`,nodeType:j,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType===N){for(var n=e.firstChild;n;){var r=n.nextSibling;this.insertBefore(n,t),n=r}return e}return De(this,e,t),e.ownerDocument=this,this.documentElement===null&&e.nodeType===E&&(this.documentElement=e),e},removeChild:function(e){var t=ge(this,e);return t===this.documentElement&&(this.documentElement=null),t},replaceChild:function(e,t){De(this,e,t,Ee),e.ownerDocument=this,t&&this.removeChild(t),be(e)&&(this.documentElement=e)},importNode:function(e,t){return Ge(this,e,t)},getElementById:function(e){var t=null;return de(this.documentElement,function(n){if(n.nodeType==E&&n.getAttribute(`id`)==e)return t=n,!0}),t},createElement:function(e){var t=new Oe(u);t.ownerDocument=this,this.type===`html`&&(e=e.toLowerCase()),r(this.contentType)&&(t.namespaceURI=l.HTML),t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new R;var n=t.attributes=new re;return n._ownerElement=t,t},createDocumentFragment:function(){var e=new Re(u);return e.ownerDocument=this,e.childNodes=new R,e},createTextNode:function(e){var t=new je(u);return t.ownerDocument=this,t.childNodes=new R,t.appendData(e),t},createComment:function(e){var t=new Me(u);return t.ownerDocument=this,t.childNodes=new R,t.appendData(e),t},createCDATASection:function(e){if(e.indexOf(`]]>`)!==-1)throw new f(f.INVALID_CHARACTER_ERR,`data contains "]]>"`);var t=new Ne(u);return t.ownerDocument=this,t.childNodes=new R,t.appendData(e),t},createProcessingInstruction:function(e,t){var n=new ze(u);return n.ownerDocument=this,n.childNodes=new R,n.nodeName=n.target=e,n.nodeValue=n.data=t,n},createAttribute:function(e){if(!m.QName_exact.test(e))throw new f(f.INVALID_CHARACTER_ERR,`invalid character in name "`+e+`"`);return this.type===`html`&&(e=e.toLowerCase()),this._createAttribute(e)},_createAttribute:function(e){var t=new ke(u);return t.ownerDocument=this,t.childNodes=new R,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){if(!m.Name_exact.test(e))throw new f(f.INVALID_CHARACTER_ERR,`not a valid xml name "`+e+`"`);if(this.type===`html`)throw new f(`document is an html document`,p.NotSupportedError);var t=new Le(u);return t.ownerDocument=this,t.childNodes=new R,t.nodeName=e,t},createElementNS:function(e,t){var n=S(e,t),r=new Oe(u),i=r.attributes=new re;return r.childNodes=new R,r.ownerDocument=this,r.nodeName=t,r.tagName=t,r.namespaceURI=n[0],r.prefix=n[1],r.localName=n[2],i._ownerElement=r,r},createAttributeNS:function(e,t){var n=S(e,t),r=new ke(u);return r.ownerDocument=this,r.childNodes=new R,r.nodeName=t,r.name=t,r.specified=!0,r.namespaceURI=n[0],r.prefix=n[1],r.localName=n[2],r}},w(fe,U);function Oe(e){h(e),this._nsMap=Object.create(null)}Oe.prototype={nodeType:E,attributes:null,getQualifiedName:function(){return this.prefix?this.prefix+`:`+this.localName:this.localName},_isInHTMLDocumentAndNamespace:function(){return this.ownerDocument.type===`html`&&this.namespaceURI===l.HTML},hasAttributes:function(){return!!(this.attributes&&this.attributes.length)},hasAttribute:function(e){return!!this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t?t.value:null},getAttributeNode:function(e){return this._isInHTMLDocumentAndNamespace()&&(e=e.toLowerCase()),this.attributes.getNamedItem(e)},setAttribute:function(e,t){this._isInHTMLDocumentAndNamespace()&&(e=e.toLowerCase());var n=this.getAttributeNode(e);n?n.value=n.nodeValue=``+t:(n=this.ownerDocument._createAttribute(e),n.value=n.nodeValue=``+t,this.setAttributeNode(n))},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);n&&this.removeAttributeNode(n)},hasAttributeNS:function(e,t){return this.getAttributeNodeNS(e,t)!=null},getAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);return n?n.value:null},setAttributeNS:function(e,t,n){var r=S(e,t)[2],i=this.getAttributeNodeNS(e,r);i?i.value=i.nodeValue=``+n:(i=this.ownerDocument.createAttributeNS(e,t),i.value=i.nodeValue=``+n,this.setAttributeNode(i))},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByClassName:function(e){var t=y(e);return new z(this,function(n){var r=[];return t.length>0&&de(n,function(i){if(i!==n&&i.nodeType===E){var a=i.getAttribute(`class`);if(a){var o=e===a;if(!o){var s=y(a);o=t.every(b(s))}o&&r.push(i)}}}),r})},getElementsByTagName:function(e){var t=(this.nodeType===j?this:this.ownerDocument).type===`html`,n=e.toLowerCase();return new z(this,function(r){var i=[];return de(r,function(a){a!==r&&a.nodeType===E&&(e===`*`||a.getQualifiedName()===(t&&a.namespaceURI===l.HTML?n:e))&&i.push(a)}),i})},getElementsByTagNameNS:function(e,t){return new z(this,function(n){var r=[];return de(n,function(i){i!==n&&i.nodeType===E&&(e===`*`||i.namespaceURI===e)&&(t===`*`||i.localName==t)&&r.push(i)}),r})}},fe.prototype.getElementsByClassName=Oe.prototype.getElementsByClassName,fe.prototype.getElementsByTagName=Oe.prototype.getElementsByTagName,fe.prototype.getElementsByTagNameNS=Oe.prototype.getElementsByTagNameNS,w(Oe,U);function ke(e){h(e),this.namespaceURI=null,this.prefix=null,this.ownerElement=null}ke.prototype.nodeType=D,w(ke,U);function Ae(e){h(e)}Ae.prototype={data:``,substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},deleteData:function(e,t){this.replaceData(e,t,``)},replaceData:function(e,t,n){var r=this.data.substring(0,e),i=this.data.substring(e+t);n=r+n+i,this.nodeValue=this.data=n,this.length=n.length}},w(Ae,U);function je(e){h(e)}je.prototype={nodeName:`#text`,nodeType:O,splitText:function(e){var t=this.data,n=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var r=this.ownerDocument.createTextNode(n);return this.parentNode&&this.parentNode.insertBefore(r,this.nextSibling),r}},w(je,Ae);function Me(e){h(e)}Me.prototype={nodeName:`#comment`,nodeType:A},w(Me,Ae);function Ne(e){h(e)}Ne.prototype={nodeName:`#cdata-section`,nodeType:ee},w(Ne,je);function Pe(e){h(e)}Pe.prototype.nodeType=M,w(Pe,U);function Fe(e){h(e)}Fe.prototype.nodeType=P,w(Fe,U);function Ie(e){h(e)}Ie.prototype.nodeType=ne,w(Ie,U);function Le(e){h(e)}Le.prototype.nodeType=te,w(Le,U);function Re(e){h(e)}Re.prototype.nodeName=`#document-fragment`,Re.prototype.nodeType=N,w(Re,U);function ze(e){h(e)}ze.prototype.nodeType=k,w(ze,Ae);function Be(){}Be.prototype.serializeToString=function(e,t){return Ve.call(e,t)},U.prototype.toString=Ve;function Ve(e){var t=typeof e==`function`?{requireWellFormed:!1,splitCDATASections:!0,nodeFilter:e}:e==null?{requireWellFormed:!1,splitCDATASections:!0,nodeFilter:null}:{requireWellFormed:!!e.requireWellFormed,splitCDATASections:e.splitCDATASections!==!1,nodeFilter:e.nodeFilter||null},n=[],r=this.nodeType===j&&this.documentElement||this,i=r.prefix,a=r.namespaceURI;if(a&&i==null){var i=r.lookupPrefix(a);if(i==null)var o=[{namespace:a,prefix:null}]}return We(this,n,o,t),n.join(``)}function He(e,t,n){var r=e.prefix||``,i=e.namespaceURI;if(!i||r===`xml`&&i===l.XML||i===l.XMLNS)return!1;for(var a=n.length;a--;){var o=n[a];if(o.prefix===r)return o.namespace!==i}return!0}function Ue(e,t,n,r){if(r&&!m.QName_exact.test(t))throw new f(`The attribute name "`+t+`" is not a valid XML QName`,p.InvalidStateError);e.push(` `,t,`="`,n.replace(/[<>&"\t\n\r]/g,ue),`"`)}function We(e,t,n,r){n||=[];var i=r.nodeFilter,a=r.requireWellFormed,c=r.splitCDATASections,u=(e.nodeType===j?e:e.ownerDocument).type===`html`;W(e,{ns:n},{enter:function(e,n){var d=n.ns;if(i){if(e=i(e),e){if(typeof e==`string`)return t.push(e),null}else return null}switch(e.nodeType){case E:var h=e.attributes,g=h.length,_=e.tagName,v=_;if(!u&&!e.prefix&&e.namespaceURI){for(var y,b=0;b<h.length;b++)if(h.item(b).name===`xmlns`){y=h.item(b).value;break}if(!y)for(var x=d.length-1;x>=0;x--){var S=d[x];if(S.prefix===``&&S.namespace===e.namespaceURI){y=S.namespace;break}}if(y!==e.namespaceURI)for(var x=d.length-1;x>=0;x--){var S=d[x];if(S.namespace===e.namespaceURI){S.prefix&&(v=S.prefix+`:`+_);break}}}if(a&&!m.QName_exact.test(v))throw new f(`The element name "`+v+`" is not a valid XML QName`,p.InvalidStateError);t.push(`<`,v);for(var C=d.slice(),w=0;w<g;w++){var T=h.item(w);T.prefix==`xmlns`?C.push({prefix:T.localName,namespace:T.value}):T.nodeName==`xmlns`&&C.push({prefix:``,namespace:T.value})}for(var w=0;w<g;w++){var T=h.item(w);if(He(T,u,C)){var ne=T.prefix||``,P=T.namespaceURI;Ue(t,ne?`xmlns:`+ne:`xmlns`,P,a),C.push({prefix:ne,namespace:P})}var F=i?i(T):T;F&&(typeof F==`string`?t.push(F):Ue(t,F.name,F.value,a))}if(_===v&&He(e,u,C)){var I=e.prefix||``,P=e.namespaceURI;Ue(t,I?`xmlns:`+I:`xmlns`,P,a),C.push({prefix:I,namespace:P})}var L=!e.firstChild;if(L&&(u||e.namespaceURI===l.HTML)&&(L=s(_)),L)return t.push(`/>`),null;if(t.push(`>`),u&&o(_)){for(var R=e.firstChild;R;)R.data?t.push(R.data):We(R,t,C.slice(),r),R=R.nextSibling;return t.push(`</`,v,`>`),null}return{ns:C,tag:v};case j:case N:if(a&&e.nodeType===j&&e.documentElement==null)throw new f(`The Document has no documentElement`,p.InvalidStateError);return{ns:d};case D:return Ue(t,e.name,e.value,a),null;case O:if(a&&m.InvalidChar.test(e.data))throw new f(`The Text node data contains characters outside the XML Char production`,p.InvalidStateError);return t.push(e.data.replace(/[<&>]/g,ue)),null;case ee:if(a&&e.data.indexOf(`]]>`)!==-1)throw new f(`The CDATASection data contains "]]>"`,p.InvalidStateError);return c?t.push(m.CDATA_START,e.data.replace(/]]>/g,`]]]]><![CDATA[>`),m.CDATA_END):t.push(m.CDATA_START,e.data,m.CDATA_END),null;case A:if(a){if(m.InvalidChar.test(e.data))throw new f(`The comment node data contains characters outside the XML Char production`,p.InvalidStateError);if(e.data.indexOf(`--`)!==-1||e.data[e.data.length-1]===`-`)throw new f(`The comment node data contains "--" or ends with "-"`,p.InvalidStateError)}return t.push(m.COMMENT_START,e.data,m.COMMENT_END),null;case M:var z=e.publicId,B=e.systemId;if(a){if(!m.Name_exact.test(e.name))throw new f(`The doctype name "`+e.name+`" is not a valid XML Name`,p.InvalidStateError);if(z&&!m.PubidLiteral_match.test(z))throw new f(`DocumentType publicId is not a valid PubidLiteral`,p.InvalidStateError);if(B&&B!==`.`&&!m.SystemLiteral_match.test(B))throw new f(`DocumentType systemId is not a valid SystemLiteral`,p.InvalidStateError);if(e.internalSubset&&e.internalSubset.indexOf(`]>`)!==-1)throw new f(`DocumentType internalSubset contains "]>"`,p.InvalidStateError)}return t.push(m.DOCTYPE_DECL_START,` `,e.name),z?(t.push(` `,m.PUBLIC,` `,z),B&&B!==`.`&&t.push(` `,B)):B&&B!==`.`&&t.push(` `,m.SYSTEM,` `,B),e.internalSubset&&t.push(` [`,e.internalSubset,`]`),t.push(`>`),null;case k:if(a){if(!m.NCName_exact.test(e.target)||e.target.toLowerCase()===`xml`)throw new f(`The processing instruction target "`+e.target+`" is not a valid XML NCName or is reserved`,p.InvalidStateError);if(m.InvalidChar.test(e.data))throw new f(`The ProcessingInstruction data contains characters outside the XML Char production`,p.InvalidStateError);if(e.data.indexOf(`?>`)!==-1)throw new f(`The ProcessingInstruction data contains "?>"`,p.InvalidStateError)}return t.push(`<?`,e.target,` `,e.data,`?>`),null;case te:if(a&&!m.Name_exact.test(e.nodeName))throw new f(`The entity reference name "`+e.nodeName+`" is not a valid XML Name`,p.InvalidStateError);return t.push(`&`,e.nodeName,`;`),null;default:return t.push(`??`,e.nodeName),null}},exit:function(e,n){n&&n.tag&&t.push(`</`,n.tag,`>`)}})}function Ge(e,t,n){var r;return W(t,null,{enter:function(t,i){var a=t.cloneNode(!1);return a.ownerDocument=e,a.parentNode=null,i===null?r=a:i.appendChild(a),t.nodeType===D||n?a:null}}),r}function Ke(e,t,n){var r;return W(t,null,{enter:function(t,a){var o=new t.constructor(u);for(var s in t)if(i(t,s)){var c=t[s];typeof c!=`object`&&c!=o[s]&&(o[s]=c)}t.childNodes&&(o.childNodes=new R),o.ownerDocument=e;var l=n;switch(o.nodeType){case E:var d=t.attributes,f=o.attributes=new re,p=d.length;f._ownerElement=o;for(var m=0;m<p;m++)o.setAttributeNode(Ke(e,d.item(m),!0));break;case D:l=!0}return a===null?r=o:a.appendChild(o),l?o:null}}),r}function qe(e,t,n){e[t]=n}function Je(e){for(var t=[],n=e.firstChild;n;)n.nodeType===E&&t.push(n),n=n.nextSibling;return t}try{Object.defineProperty&&(Object.defineProperty(z.prototype,"length",{get:function(){return B(this),this.$$length}}),Object.defineProperty(U.prototype,"textContent",{get:function(){if(this.nodeType===E||this.nodeType===N){var e=[];return W(this,null,{enter:function(t){if(t.nodeType===E||t.nodeType===N)return!0;if(t.nodeType===k||t.nodeType===A)return null;e.push(t.nodeValue)}}),e.join(``)}return this.nodeValue},set:function(e){switch(this.nodeType){case E:case N:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),Object.defineProperty(Ae.prototype,"data",{get:function(){return this._data==null?``:this._data},set:function(e){this._data=e,this.length=typeof e==`string`?e.length:0}}),Object.defineProperty(Ae.prototype,"nodeValue",{get:function(){return this.data},set:function(e){this.data=e},enumerable:!0,configurable:!0}),Object.defineProperty(Oe.prototype,"children",{get:function(){return new z(this,Je)}}),Object.defineProperty(fe.prototype,"children",{get:function(){return new z(this,Je)}}),Object.defineProperty(Re.prototype,"children",{get:function(){return new z(this,Je)}}),qe=function(e,t,n){e[`$$`+t]=n})}catch{}e._updateLiveList=B,e.Attr=ke,e.CDATASection=Ne,e.CharacterData=Ae,e.Comment=Me,e.Document=fe,e.DocumentFragment=Re,e.DocumentType=Pe,e.DOMImplementation=le,e.Element=Oe,e.Entity=Ie,e.EntityReference=Le,e.LiveNodeList=z,e.NamedNodeMap=re,e.Node=U,e.NodeList=R,e.Notation=Fe,e.Text=je,e.ProcessingInstruction=ze,e.walkDOM=W,e.XMLSerializer=Be})),Qa=/* @__PURE__ */ t((e=>{var t=Ja().freeze;e.XML_ENTITIES=t({amp:`&`,apos:`'`,gt:`>`,lt:`<`,quot:`"`}),e.HTML_ENTITIES=t({Aacute:`Á`,aacute:`á`,Abreve:`Ă`,abreve:`ă`,ac:`∾`,acd:`∿`,acE:`∾̳`,Acirc:`Â`,acirc:`â`,acute:`´`,Acy:`А`,acy:`а`,AElig:`Æ`,aelig:`æ`,af:``,Afr:`𝔄`,afr:`𝔞`,Agrave:`À`,agrave:`à`,alefsym:`ℵ`,aleph:`ℵ`,Alpha:`Α`,alpha:`α`,Amacr:`Ā`,amacr:`ā`,amalg:`⨿`,AMP:`&`,amp:`&`,And:`⩓`,and:`∧`,andand:`⩕`,andd:`⩜`,andslope:`⩘`,andv:`⩚`,ang:`∠`,ange:`⦤`,angle:`∠`,angmsd:`∡`,angmsdaa:`⦨`,angmsdab:`⦩`,angmsdac:`⦪`,angmsdad:`⦫`,angmsdae:`⦬`,angmsdaf:`⦭`,angmsdag:`⦮`,angmsdah:`⦯`,angrt:`∟`,angrtvb:`⊾`,angrtvbd:`⦝`,angsph:`∢`,angst:`Å`,angzarr:`⍼`,Aogon:`Ą`,aogon:`ą`,Aopf:`𝔸`,aopf:`𝕒`,ap:`≈`,apacir:`⩯`,apE:`⩰`,ape:`≊`,apid:`≋`,apos:`'`,ApplyFunction:``,approx:`≈`,approxeq:`≊`,Aring:`Å`,aring:`å`,Ascr:`𝒜`,ascr:`𝒶`,Assign:`≔`,ast:`*`,asymp:`≈`,asympeq:`≍`,Atilde:`Ã`,atilde:`ã`,Auml:`Ä`,auml:`ä`,awconint:`∳`,awint:`⨑`,backcong:`≌`,backepsilon:`϶`,backprime:`‵`,backsim:`∽`,backsimeq:`⋍`,Backslash:`∖`,Barv:`⫧`,barvee:`⊽`,Barwed:`⌆`,barwed:`⌅`,barwedge:`⌅`,bbrk:`⎵`,bbrktbrk:`⎶`,bcong:`≌`,Bcy:`Б`,bcy:`б`,bdquo:`„`,becaus:`∵`,Because:`∵`,because:`∵`,bemptyv:`⦰`,bepsi:`϶`,bernou:`ℬ`,Bernoullis:`ℬ`,Beta:`Β`,beta:`β`,beth:`ℶ`,between:`≬`,Bfr:`𝔅`,bfr:`𝔟`,bigcap:`⋂`,bigcirc:`◯`,bigcup:`⋃`,bigodot:`⨀`,bigoplus:`⨁`,bigotimes:`⨂`,bigsqcup:`⨆`,bigstar:`★`,bigtriangledown:`▽`,bigtriangleup:`△`,biguplus:`⨄`,bigvee:`⋁`,bigwedge:`⋀`,bkarow:`⤍`,blacklozenge:`⧫`,blacksquare:`▪`,blacktriangle:`▴`,blacktriangledown:`▾`,blacktriangleleft:`◂`,blacktriangleright:`▸`,blank:`␣`,blk12:`▒`,blk14:`░`,blk34:`▓`,block:`█`,bne:`=⃥`,bnequiv:`≡⃥`,bNot:`⫭`,bnot:`⌐`,Bopf:`𝔹`,bopf:`𝕓`,bot:`⊥`,bottom:`⊥`,bowtie:`⋈`,boxbox:`⧉`,boxDL:`╗`,boxDl:`╖`,boxdL:`╕`,boxdl:`┐`,boxDR:`╔`,boxDr:`╓`,boxdR:`╒`,boxdr:`┌`,boxH:`═`,boxh:`─`,boxHD:`╦`,boxHd:`╤`,boxhD:`╥`,boxhd:`┬`,boxHU:`╩`,boxHu:`╧`,boxhU:`╨`,boxhu:`┴`,boxminus:`⊟`,boxplus:`⊞`,boxtimes:`⊠`,boxUL:`╝`,boxUl:`╜`,boxuL:`╛`,boxul:`┘`,boxUR:`╚`,boxUr:`╙`,boxuR:`╘`,boxur:`└`,boxV:`║`,boxv:`│`,boxVH:`╬`,boxVh:`╫`,boxvH:`╪`,boxvh:`┼`,boxVL:`╣`,boxVl:`╢`,boxvL:`╡`,boxvl:`┤`,boxVR:`╠`,boxVr:`╟`,boxvR:`╞`,boxvr:`├`,bprime:`‵`,Breve:`˘`,breve:`˘`,brvbar:`¦`,Bscr:`ℬ`,bscr:`𝒷`,bsemi:`⁏`,bsim:`∽`,bsime:`⋍`,bsol:`\\`,bsolb:`⧅`,bsolhsub:`⟈`,bull:`•`,bullet:`•`,bump:`≎`,bumpE:`⪮`,bumpe:`≏`,Bumpeq:`≎`,bumpeq:`≏`,Cacute:`Ć`,cacute:`ć`,Cap:`⋒`,cap:`∩`,capand:`⩄`,capbrcup:`⩉`,capcap:`⩋`,capcup:`⩇`,capdot:`⩀`,CapitalDifferentialD:`ⅅ`,caps:`∩︀`,caret:`⁁`,caron:`ˇ`,Cayleys:`ℭ`,ccaps:`⩍`,Ccaron:`Č`,ccaron:`č`,Ccedil:`Ç`,ccedil:`ç`,Ccirc:`Ĉ`,ccirc:`ĉ`,Cconint:`∰`,ccups:`⩌`,ccupssm:`⩐`,Cdot:`Ċ`,cdot:`ċ`,cedil:`¸`,Cedilla:`¸`,cemptyv:`⦲`,cent:`¢`,CenterDot:`·`,centerdot:`·`,Cfr:`ℭ`,cfr:`𝔠`,CHcy:`Ч`,chcy:`ч`,check:`✓`,checkmark:`✓`,Chi:`Χ`,chi:`χ`,cir:`○`,circ:`ˆ`,circeq:`≗`,circlearrowleft:`↺`,circlearrowright:`↻`,circledast:`⊛`,circledcirc:`⊚`,circleddash:`⊝`,CircleDot:`⊙`,circledR:`®`,circledS:`Ⓢ`,CircleMinus:`⊖`,CirclePlus:`⊕`,CircleTimes:`⊗`,cirE:`⧃`,cire:`≗`,cirfnint:`⨐`,cirmid:`⫯`,cirscir:`⧂`,ClockwiseContourIntegral:`∲`,CloseCurlyDoubleQuote:`”`,CloseCurlyQuote:`’`,clubs:`♣`,clubsuit:`♣`,Colon:`∷`,colon:`:`,Colone:`⩴`,colone:`≔`,coloneq:`≔`,comma:`,`,commat:`@`,comp:`∁`,compfn:`∘`,complement:`∁`,complexes:`ℂ`,cong:`≅`,congdot:`⩭`,Congruent:`≡`,Conint:`∯`,conint:`∮`,ContourIntegral:`∮`,Copf:`ℂ`,copf:`𝕔`,coprod:`∐`,Coproduct:`∐`,COPY:`©`,copy:`©`,copysr:`℗`,CounterClockwiseContourIntegral:`∳`,crarr:`↵`,Cross:`⨯`,cross:`✗`,Cscr:`𝒞`,cscr:`𝒸`,csub:`⫏`,csube:`⫑`,csup:`⫐`,csupe:`⫒`,ctdot:`⋯`,cudarrl:`⤸`,cudarrr:`⤵`,cuepr:`⋞`,cuesc:`⋟`,cularr:`↶`,cularrp:`⤽`,Cup:`⋓`,cup:`∪`,cupbrcap:`⩈`,CupCap:`≍`,cupcap:`⩆`,cupcup:`⩊`,cupdot:`⊍`,cupor:`⩅`,cups:`∪︀`,curarr:`↷`,curarrm:`⤼`,curlyeqprec:`⋞`,curlyeqsucc:`⋟`,curlyvee:`⋎`,curlywedge:`⋏`,curren:`¤`,curvearrowleft:`↶`,curvearrowright:`↷`,cuvee:`⋎`,cuwed:`⋏`,cwconint:`∲`,cwint:`∱`,cylcty:`⌭`,Dagger:`‡`,dagger:`†`,daleth:`ℸ`,Darr:`↡`,dArr:`⇓`,darr:`↓`,dash:`‐`,Dashv:`⫤`,dashv:`⊣`,dbkarow:`⤏`,dblac:`˝`,Dcaron:`Ď`,dcaron:`ď`,Dcy:`Д`,dcy:`д`,DD:`ⅅ`,dd:`ⅆ`,ddagger:`‡`,ddarr:`⇊`,DDotrahd:`⤑`,ddotseq:`⩷`,deg:`°`,Del:`∇`,Delta:`Δ`,delta:`δ`,demptyv:`⦱`,dfisht:`⥿`,Dfr:`𝔇`,dfr:`𝔡`,dHar:`⥥`,dharl:`⇃`,dharr:`⇂`,DiacriticalAcute:`´`,DiacriticalDot:`˙`,DiacriticalDoubleAcute:`˝`,DiacriticalGrave:"`",DiacriticalTilde:`˜`,diam:`⋄`,Diamond:`⋄`,diamond:`⋄`,diamondsuit:`♦`,diams:`♦`,die:`¨`,DifferentialD:`ⅆ`,digamma:`ϝ`,disin:`⋲`,div:`÷`,divide:`÷`,divideontimes:`⋇`,divonx:`⋇`,DJcy:`Ђ`,djcy:`ђ`,dlcorn:`⌞`,dlcrop:`⌍`,dollar:`$`,Dopf:`𝔻`,dopf:`𝕕`,Dot:`¨`,dot:`˙`,DotDot:`⃜`,doteq:`≐`,doteqdot:`≑`,DotEqual:`≐`,dotminus:`∸`,dotplus:`∔`,dotsquare:`⊡`,doublebarwedge:`⌆`,DoubleContourIntegral:`∯`,DoubleDot:`¨`,DoubleDownArrow:`⇓`,DoubleLeftArrow:`⇐`,DoubleLeftRightArrow:`⇔`,DoubleLeftTee:`⫤`,DoubleLongLeftArrow:`⟸`,DoubleLongLeftRightArrow:`⟺`,DoubleLongRightArrow:`⟹`,DoubleRightArrow:`⇒`,DoubleRightTee:`⊨`,DoubleUpArrow:`⇑`,DoubleUpDownArrow:`⇕`,DoubleVerticalBar:`∥`,DownArrow:`↓`,Downarrow:`⇓`,downarrow:`↓`,DownArrowBar:`⤓`,DownArrowUpArrow:`⇵`,DownBreve:`̑`,downdownarrows:`⇊`,downharpoonleft:`⇃`,downharpoonright:`⇂`,DownLeftRightVector:`⥐`,DownLeftTeeVector:`⥞`,DownLeftVector:`↽`,DownLeftVectorBar:`⥖`,DownRightTeeVector:`⥟`,DownRightVector:`⇁`,DownRightVectorBar:`⥗`,DownTee:`⊤`,DownTeeArrow:`↧`,drbkarow:`⤐`,drcorn:`⌟`,drcrop:`⌌`,Dscr:`𝒟`,dscr:`𝒹`,DScy:`Ѕ`,dscy:`ѕ`,dsol:`⧶`,Dstrok:`Đ`,dstrok:`đ`,dtdot:`⋱`,dtri:`▿`,dtrif:`▾`,duarr:`⇵`,duhar:`⥯`,dwangle:`⦦`,DZcy:`Џ`,dzcy:`џ`,dzigrarr:`⟿`,Eacute:`É`,eacute:`é`,easter:`⩮`,Ecaron:`Ě`,ecaron:`ě`,ecir:`≖`,Ecirc:`Ê`,ecirc:`ê`,ecolon:`≕`,Ecy:`Э`,ecy:`э`,eDDot:`⩷`,Edot:`Ė`,eDot:`≑`,edot:`ė`,ee:`ⅇ`,efDot:`≒`,Efr:`𝔈`,efr:`𝔢`,eg:`⪚`,Egrave:`È`,egrave:`è`,egs:`⪖`,egsdot:`⪘`,el:`⪙`,Element:`∈`,elinters:`⏧`,ell:`ℓ`,els:`⪕`,elsdot:`⪗`,Emacr:`Ē`,emacr:`ē`,empty:`∅`,emptyset:`∅`,EmptySmallSquare:`◻`,emptyv:`∅`,EmptyVerySmallSquare:`▫`,emsp:` `,emsp13:` `,emsp14:` `,ENG:`Ŋ`,eng:`ŋ`,ensp:` `,Eogon:`Ę`,eogon:`ę`,Eopf:`𝔼`,eopf:`𝕖`,epar:`⋕`,eparsl:`⧣`,eplus:`⩱`,epsi:`ε`,Epsilon:`Ε`,epsilon:`ε`,epsiv:`ϵ`,eqcirc:`≖`,eqcolon:`≕`,eqsim:`≂`,eqslantgtr:`⪖`,eqslantless:`⪕`,Equal:`⩵`,equals:`=`,EqualTilde:`≂`,equest:`≟`,Equilibrium:`⇌`,equiv:`≡`,equivDD:`⩸`,eqvparsl:`⧥`,erarr:`⥱`,erDot:`≓`,Escr:`ℰ`,escr:`ℯ`,esdot:`≐`,Esim:`⩳`,esim:`≂`,Eta:`Η`,eta:`η`,ETH:`Ð`,eth:`ð`,Euml:`Ë`,euml:`ë`,euro:`€`,excl:`!`,exist:`∃`,Exists:`∃`,expectation:`ℰ`,ExponentialE:`ⅇ`,exponentiale:`ⅇ`,fallingdotseq:`≒`,Fcy:`Ф`,fcy:`ф`,female:`♀`,ffilig:`ffi`,fflig:`ff`,ffllig:`ffl`,Ffr:`𝔉`,ffr:`𝔣`,filig:`fi`,FilledSmallSquare:`◼`,FilledVerySmallSquare:`▪`,fjlig:`fj`,flat:`♭`,fllig:`fl`,fltns:`▱`,fnof:`ƒ`,Fopf:`𝔽`,fopf:`𝕗`,ForAll:`∀`,forall:`∀`,fork:`⋔`,forkv:`⫙`,Fouriertrf:`ℱ`,fpartint:`⨍`,frac12:`½`,frac13:`⅓`,frac14:`¼`,frac15:`⅕`,frac16:`⅙`,frac18:`⅛`,frac23:`⅔`,frac25:`⅖`,frac34:`¾`,frac35:`⅗`,frac38:`⅜`,frac45:`⅘`,frac56:`⅚`,frac58:`⅝`,frac78:`⅞`,frasl:`⁄`,frown:`⌢`,Fscr:`ℱ`,fscr:`𝒻`,gacute:`ǵ`,Gamma:`Γ`,gamma:`γ`,Gammad:`Ϝ`,gammad:`ϝ`,gap:`⪆`,Gbreve:`Ğ`,gbreve:`ğ`,Gcedil:`Ģ`,Gcirc:`Ĝ`,gcirc:`ĝ`,Gcy:`Г`,gcy:`г`,Gdot:`Ġ`,gdot:`ġ`,gE:`≧`,ge:`≥`,gEl:`⪌`,gel:`⋛`,geq:`≥`,geqq:`≧`,geqslant:`⩾`,ges:`⩾`,gescc:`⪩`,gesdot:`⪀`,gesdoto:`⪂`,gesdotol:`⪄`,gesl:`⋛︀`,gesles:`⪔`,Gfr:`𝔊`,gfr:`𝔤`,Gg:`⋙`,gg:`≫`,ggg:`⋙`,gimel:`ℷ`,GJcy:`Ѓ`,gjcy:`ѓ`,gl:`≷`,gla:`⪥`,glE:`⪒`,glj:`⪤`,gnap:`⪊`,gnapprox:`⪊`,gnE:`≩`,gne:`⪈`,gneq:`⪈`,gneqq:`≩`,gnsim:`⋧`,Gopf:`𝔾`,gopf:`𝕘`,grave:"`",GreaterEqual:`≥`,GreaterEqualLess:`⋛`,GreaterFullEqual:`≧`,GreaterGreater:`⪢`,GreaterLess:`≷`,GreaterSlantEqual:`⩾`,GreaterTilde:`≳`,Gscr:`𝒢`,gscr:`ℊ`,gsim:`≳`,gsime:`⪎`,gsiml:`⪐`,Gt:`≫`,GT:`>`,gt:`>`,gtcc:`⪧`,gtcir:`⩺`,gtdot:`⋗`,gtlPar:`⦕`,gtquest:`⩼`,gtrapprox:`⪆`,gtrarr:`⥸`,gtrdot:`⋗`,gtreqless:`⋛`,gtreqqless:`⪌`,gtrless:`≷`,gtrsim:`≳`,gvertneqq:`≩︀`,gvnE:`≩︀`,Hacek:`ˇ`,hairsp:` `,half:`½`,hamilt:`ℋ`,HARDcy:`Ъ`,hardcy:`ъ`,hArr:`⇔`,harr:`↔`,harrcir:`⥈`,harrw:`↭`,Hat:`^`,hbar:`ℏ`,Hcirc:`Ĥ`,hcirc:`ĥ`,hearts:`♥`,heartsuit:`♥`,hellip:`…`,hercon:`⊹`,Hfr:`ℌ`,hfr:`𝔥`,HilbertSpace:`ℋ`,hksearow:`⤥`,hkswarow:`⤦`,hoarr:`⇿`,homtht:`∻`,hookleftarrow:`↩`,hookrightarrow:`↪`,Hopf:`ℍ`,hopf:`𝕙`,horbar:`―`,HorizontalLine:`─`,Hscr:`ℋ`,hscr:`𝒽`,hslash:`ℏ`,Hstrok:`Ħ`,hstrok:`ħ`,HumpDownHump:`≎`,HumpEqual:`≏`,hybull:`⁃`,hyphen:`‐`,Iacute:`Í`,iacute:`í`,ic:``,Icirc:`Î`,icirc:`î`,Icy:`И`,icy:`и`,Idot:`İ`,IEcy:`Е`,iecy:`е`,iexcl:`¡`,iff:`⇔`,Ifr:`ℑ`,ifr:`𝔦`,Igrave:`Ì`,igrave:`ì`,ii:`ⅈ`,iiiint:`⨌`,iiint:`∭`,iinfin:`⧜`,iiota:`℩`,IJlig:`IJ`,ijlig:`ij`,Im:`ℑ`,Imacr:`Ī`,imacr:`ī`,image:`ℑ`,ImaginaryI:`ⅈ`,imagline:`ℐ`,imagpart:`ℑ`,imath:`ı`,imof:`⊷`,imped:`Ƶ`,Implies:`⇒`,in:`∈`,incare:`℅`,infin:`∞`,infintie:`⧝`,inodot:`ı`,Int:`∬`,int:`∫`,intcal:`⊺`,integers:`ℤ`,Integral:`∫`,intercal:`⊺`,Intersection:`⋂`,intlarhk:`⨗`,intprod:`⨼`,InvisibleComma:``,InvisibleTimes:``,IOcy:`Ё`,iocy:`ё`,Iogon:`Į`,iogon:`į`,Iopf:`𝕀`,iopf:`𝕚`,Iota:`Ι`,iota:`ι`,iprod:`⨼`,iquest:`¿`,Iscr:`ℐ`,iscr:`𝒾`,isin:`∈`,isindot:`⋵`,isinE:`⋹`,isins:`⋴`,isinsv:`⋳`,isinv:`∈`,it:``,Itilde:`Ĩ`,itilde:`ĩ`,Iukcy:`І`,iukcy:`і`,Iuml:`Ï`,iuml:`ï`,Jcirc:`Ĵ`,jcirc:`ĵ`,Jcy:`Й`,jcy:`й`,Jfr:`𝔍`,jfr:`𝔧`,jmath:`ȷ`,Jopf:`𝕁`,jopf:`𝕛`,Jscr:`𝒥`,jscr:`𝒿`,Jsercy:`Ј`,jsercy:`ј`,Jukcy:`Є`,jukcy:`є`,Kappa:`Κ`,kappa:`κ`,kappav:`ϰ`,Kcedil:`Ķ`,kcedil:`ķ`,Kcy:`К`,kcy:`к`,Kfr:`𝔎`,kfr:`𝔨`,kgreen:`ĸ`,KHcy:`Х`,khcy:`х`,KJcy:`Ќ`,kjcy:`ќ`,Kopf:`𝕂`,kopf:`𝕜`,Kscr:`𝒦`,kscr:`𝓀`,lAarr:`⇚`,Lacute:`Ĺ`,lacute:`ĺ`,laemptyv:`⦴`,lagran:`ℒ`,Lambda:`Λ`,lambda:`λ`,Lang:`⟪`,lang:`⟨`,langd:`⦑`,langle:`⟨`,lap:`⪅`,Laplacetrf:`ℒ`,laquo:`«`,Larr:`↞`,lArr:`⇐`,larr:`←`,larrb:`⇤`,larrbfs:`⤟`,larrfs:`⤝`,larrhk:`↩`,larrlp:`↫`,larrpl:`⤹`,larrsim:`⥳`,larrtl:`↢`,lat:`⪫`,lAtail:`⤛`,latail:`⤙`,late:`⪭`,lates:`⪭︀`,lBarr:`⤎`,lbarr:`⤌`,lbbrk:`❲`,lbrace:`{`,lbrack:`[`,lbrke:`⦋`,lbrksld:`⦏`,lbrkslu:`⦍`,Lcaron:`Ľ`,lcaron:`ľ`,Lcedil:`Ļ`,lcedil:`ļ`,lceil:`⌈`,lcub:`{`,Lcy:`Л`,lcy:`л`,ldca:`⤶`,ldquo:`“`,ldquor:`„`,ldrdhar:`⥧`,ldrushar:`⥋`,ldsh:`↲`,lE:`≦`,le:`≤`,LeftAngleBracket:`⟨`,LeftArrow:`←`,Leftarrow:`⇐`,leftarrow:`←`,LeftArrowBar:`⇤`,LeftArrowRightArrow:`⇆`,leftarrowtail:`↢`,LeftCeiling:`⌈`,LeftDoubleBracket:`⟦`,LeftDownTeeVector:`⥡`,LeftDownVector:`⇃`,LeftDownVectorBar:`⥙`,LeftFloor:`⌊`,leftharpoondown:`↽`,leftharpoonup:`↼`,leftleftarrows:`⇇`,LeftRightArrow:`↔`,Leftrightarrow:`⇔`,leftrightarrow:`↔`,leftrightarrows:`⇆`,leftrightharpoons:`⇋`,leftrightsquigarrow:`↭`,LeftRightVector:`⥎`,LeftTee:`⊣`,LeftTeeArrow:`↤`,LeftTeeVector:`⥚`,leftthreetimes:`⋋`,LeftTriangle:`⊲`,LeftTriangleBar:`⧏`,LeftTriangleEqual:`⊴`,LeftUpDownVector:`⥑`,LeftUpTeeVector:`⥠`,LeftUpVector:`↿`,LeftUpVectorBar:`⥘`,LeftVector:`↼`,LeftVectorBar:`⥒`,lEg:`⪋`,leg:`⋚`,leq:`≤`,leqq:`≦`,leqslant:`⩽`,les:`⩽`,lescc:`⪨`,lesdot:`⩿`,lesdoto:`⪁`,lesdotor:`⪃`,lesg:`⋚︀`,lesges:`⪓`,lessapprox:`⪅`,lessdot:`⋖`,lesseqgtr:`⋚`,lesseqqgtr:`⪋`,LessEqualGreater:`⋚`,LessFullEqual:`≦`,LessGreater:`≶`,lessgtr:`≶`,LessLess:`⪡`,lesssim:`≲`,LessSlantEqual:`⩽`,LessTilde:`≲`,lfisht:`⥼`,lfloor:`⌊`,Lfr:`𝔏`,lfr:`𝔩`,lg:`≶`,lgE:`⪑`,lHar:`⥢`,lhard:`↽`,lharu:`↼`,lharul:`⥪`,lhblk:`▄`,LJcy:`Љ`,ljcy:`љ`,Ll:`⋘`,ll:`≪`,llarr:`⇇`,llcorner:`⌞`,Lleftarrow:`⇚`,llhard:`⥫`,lltri:`◺`,Lmidot:`Ŀ`,lmidot:`ŀ`,lmoust:`⎰`,lmoustache:`⎰`,lnap:`⪉`,lnapprox:`⪉`,lnE:`≨`,lne:`⪇`,lneq:`⪇`,lneqq:`≨`,lnsim:`⋦`,loang:`⟬`,loarr:`⇽`,lobrk:`⟦`,LongLeftArrow:`⟵`,Longleftarrow:`⟸`,longleftarrow:`⟵`,LongLeftRightArrow:`⟷`,Longleftrightarrow:`⟺`,longleftrightarrow:`⟷`,longmapsto:`⟼`,LongRightArrow:`⟶`,Longrightarrow:`⟹`,longrightarrow:`⟶`,looparrowleft:`↫`,looparrowright:`↬`,lopar:`⦅`,Lopf:`𝕃`,lopf:`𝕝`,loplus:`⨭`,lotimes:`⨴`,lowast:`∗`,lowbar:`_`,LowerLeftArrow:`↙`,LowerRightArrow:`↘`,loz:`◊`,lozenge:`◊`,lozf:`⧫`,lpar:`(`,lparlt:`⦓`,lrarr:`⇆`,lrcorner:`⌟`,lrhar:`⇋`,lrhard:`⥭`,lrm:``,lrtri:`⊿`,lsaquo:`‹`,Lscr:`ℒ`,lscr:`𝓁`,Lsh:`↰`,lsh:`↰`,lsim:`≲`,lsime:`⪍`,lsimg:`⪏`,lsqb:`[`,lsquo:`‘`,lsquor:`‚`,Lstrok:`Ł`,lstrok:`ł`,Lt:`≪`,LT:`<`,lt:`<`,ltcc:`⪦`,ltcir:`⩹`,ltdot:`⋖`,lthree:`⋋`,ltimes:`⋉`,ltlarr:`⥶`,ltquest:`⩻`,ltri:`◃`,ltrie:`⊴`,ltrif:`◂`,ltrPar:`⦖`,lurdshar:`⥊`,luruhar:`⥦`,lvertneqq:`≨︀`,lvnE:`≨︀`,macr:`¯`,male:`♂`,malt:`✠`,maltese:`✠`,Map:`⤅`,map:`↦`,mapsto:`↦`,mapstodown:`↧`,mapstoleft:`↤`,mapstoup:`↥`,marker:`▮`,mcomma:`⨩`,Mcy:`М`,mcy:`м`,mdash:`—`,mDDot:`∺`,measuredangle:`∡`,MediumSpace:` `,Mellintrf:`ℳ`,Mfr:`𝔐`,mfr:`𝔪`,mho:`℧`,micro:`µ`,mid:`∣`,midast:`*`,midcir:`⫰`,middot:`·`,minus:`−`,minusb:`⊟`,minusd:`∸`,minusdu:`⨪`,MinusPlus:`∓`,mlcp:`⫛`,mldr:`…`,mnplus:`∓`,models:`⊧`,Mopf:`𝕄`,mopf:`𝕞`,mp:`∓`,Mscr:`ℳ`,mscr:`𝓂`,mstpos:`∾`,Mu:`Μ`,mu:`μ`,multimap:`⊸`,mumap:`⊸`,nabla:`∇`,Nacute:`Ń`,nacute:`ń`,nang:`∠⃒`,nap:`≉`,napE:`⩰̸`,napid:`≋̸`,napos:`ʼn`,napprox:`≉`,natur:`♮`,natural:`♮`,naturals:`ℕ`,nbsp:`\xA0`,nbump:`≎̸`,nbumpe:`≏̸`,ncap:`⩃`,Ncaron:`Ň`,ncaron:`ň`,Ncedil:`Ņ`,ncedil:`ņ`,ncong:`≇`,ncongdot:`⩭̸`,ncup:`⩂`,Ncy:`Н`,ncy:`н`,ndash:`–`,ne:`≠`,nearhk:`⤤`,neArr:`⇗`,nearr:`↗`,nearrow:`↗`,nedot:`≐̸`,NegativeMediumSpace:``,NegativeThickSpace:``,NegativeThinSpace:``,NegativeVeryThinSpace:``,nequiv:`≢`,nesear:`⤨`,nesim:`≂̸`,NestedGreaterGreater:`≫`,NestedLessLess:`≪`,NewLine:`
|
|
18
|
+
`,nexist:`∄`,nexists:`∄`,Nfr:`𝔑`,nfr:`𝔫`,ngE:`≧̸`,nge:`≱`,ngeq:`≱`,ngeqq:`≧̸`,ngeqslant:`⩾̸`,nges:`⩾̸`,nGg:`⋙̸`,ngsim:`≵`,nGt:`≫⃒`,ngt:`≯`,ngtr:`≯`,nGtv:`≫̸`,nhArr:`⇎`,nharr:`↮`,nhpar:`⫲`,ni:`∋`,nis:`⋼`,nisd:`⋺`,niv:`∋`,NJcy:`Њ`,njcy:`њ`,nlArr:`⇍`,nlarr:`↚`,nldr:`‥`,nlE:`≦̸`,nle:`≰`,nLeftarrow:`⇍`,nleftarrow:`↚`,nLeftrightarrow:`⇎`,nleftrightarrow:`↮`,nleq:`≰`,nleqq:`≦̸`,nleqslant:`⩽̸`,nles:`⩽̸`,nless:`≮`,nLl:`⋘̸`,nlsim:`≴`,nLt:`≪⃒`,nlt:`≮`,nltri:`⋪`,nltrie:`⋬`,nLtv:`≪̸`,nmid:`∤`,NoBreak:``,NonBreakingSpace:`\xA0`,Nopf:`ℕ`,nopf:`𝕟`,Not:`⫬`,not:`¬`,NotCongruent:`≢`,NotCupCap:`≭`,NotDoubleVerticalBar:`∦`,NotElement:`∉`,NotEqual:`≠`,NotEqualTilde:`≂̸`,NotExists:`∄`,NotGreater:`≯`,NotGreaterEqual:`≱`,NotGreaterFullEqual:`≧̸`,NotGreaterGreater:`≫̸`,NotGreaterLess:`≹`,NotGreaterSlantEqual:`⩾̸`,NotGreaterTilde:`≵`,NotHumpDownHump:`≎̸`,NotHumpEqual:`≏̸`,notin:`∉`,notindot:`⋵̸`,notinE:`⋹̸`,notinva:`∉`,notinvb:`⋷`,notinvc:`⋶`,NotLeftTriangle:`⋪`,NotLeftTriangleBar:`⧏̸`,NotLeftTriangleEqual:`⋬`,NotLess:`≮`,NotLessEqual:`≰`,NotLessGreater:`≸`,NotLessLess:`≪̸`,NotLessSlantEqual:`⩽̸`,NotLessTilde:`≴`,NotNestedGreaterGreater:`⪢̸`,NotNestedLessLess:`⪡̸`,notni:`∌`,notniva:`∌`,notnivb:`⋾`,notnivc:`⋽`,NotPrecedes:`⊀`,NotPrecedesEqual:`⪯̸`,NotPrecedesSlantEqual:`⋠`,NotReverseElement:`∌`,NotRightTriangle:`⋫`,NotRightTriangleBar:`⧐̸`,NotRightTriangleEqual:`⋭`,NotSquareSubset:`⊏̸`,NotSquareSubsetEqual:`⋢`,NotSquareSuperset:`⊐̸`,NotSquareSupersetEqual:`⋣`,NotSubset:`⊂⃒`,NotSubsetEqual:`⊈`,NotSucceeds:`⊁`,NotSucceedsEqual:`⪰̸`,NotSucceedsSlantEqual:`⋡`,NotSucceedsTilde:`≿̸`,NotSuperset:`⊃⃒`,NotSupersetEqual:`⊉`,NotTilde:`≁`,NotTildeEqual:`≄`,NotTildeFullEqual:`≇`,NotTildeTilde:`≉`,NotVerticalBar:`∤`,npar:`∦`,nparallel:`∦`,nparsl:`⫽⃥`,npart:`∂̸`,npolint:`⨔`,npr:`⊀`,nprcue:`⋠`,npre:`⪯̸`,nprec:`⊀`,npreceq:`⪯̸`,nrArr:`⇏`,nrarr:`↛`,nrarrc:`⤳̸`,nrarrw:`↝̸`,nRightarrow:`⇏`,nrightarrow:`↛`,nrtri:`⋫`,nrtrie:`⋭`,nsc:`⊁`,nsccue:`⋡`,nsce:`⪰̸`,Nscr:`𝒩`,nscr:`𝓃`,nshortmid:`∤`,nshortparallel:`∦`,nsim:`≁`,nsime:`≄`,nsimeq:`≄`,nsmid:`∤`,nspar:`∦`,nsqsube:`⋢`,nsqsupe:`⋣`,nsub:`⊄`,nsubE:`⫅̸`,nsube:`⊈`,nsubset:`⊂⃒`,nsubseteq:`⊈`,nsubseteqq:`⫅̸`,nsucc:`⊁`,nsucceq:`⪰̸`,nsup:`⊅`,nsupE:`⫆̸`,nsupe:`⊉`,nsupset:`⊃⃒`,nsupseteq:`⊉`,nsupseteqq:`⫆̸`,ntgl:`≹`,Ntilde:`Ñ`,ntilde:`ñ`,ntlg:`≸`,ntriangleleft:`⋪`,ntrianglelefteq:`⋬`,ntriangleright:`⋫`,ntrianglerighteq:`⋭`,Nu:`Ν`,nu:`ν`,num:`#`,numero:`№`,numsp:` `,nvap:`≍⃒`,nVDash:`⊯`,nVdash:`⊮`,nvDash:`⊭`,nvdash:`⊬`,nvge:`≥⃒`,nvgt:`>⃒`,nvHarr:`⤄`,nvinfin:`⧞`,nvlArr:`⤂`,nvle:`≤⃒`,nvlt:`<⃒`,nvltrie:`⊴⃒`,nvrArr:`⤃`,nvrtrie:`⊵⃒`,nvsim:`∼⃒`,nwarhk:`⤣`,nwArr:`⇖`,nwarr:`↖`,nwarrow:`↖`,nwnear:`⤧`,Oacute:`Ó`,oacute:`ó`,oast:`⊛`,ocir:`⊚`,Ocirc:`Ô`,ocirc:`ô`,Ocy:`О`,ocy:`о`,odash:`⊝`,Odblac:`Ő`,odblac:`ő`,odiv:`⨸`,odot:`⊙`,odsold:`⦼`,OElig:`Œ`,oelig:`œ`,ofcir:`⦿`,Ofr:`𝔒`,ofr:`𝔬`,ogon:`˛`,Ograve:`Ò`,ograve:`ò`,ogt:`⧁`,ohbar:`⦵`,ohm:`Ω`,oint:`∮`,olarr:`↺`,olcir:`⦾`,olcross:`⦻`,oline:`‾`,olt:`⧀`,Omacr:`Ō`,omacr:`ō`,Omega:`Ω`,omega:`ω`,Omicron:`Ο`,omicron:`ο`,omid:`⦶`,ominus:`⊖`,Oopf:`𝕆`,oopf:`𝕠`,opar:`⦷`,OpenCurlyDoubleQuote:`“`,OpenCurlyQuote:`‘`,operp:`⦹`,oplus:`⊕`,Or:`⩔`,or:`∨`,orarr:`↻`,ord:`⩝`,order:`ℴ`,orderof:`ℴ`,ordf:`ª`,ordm:`º`,origof:`⊶`,oror:`⩖`,orslope:`⩗`,orv:`⩛`,oS:`Ⓢ`,Oscr:`𝒪`,oscr:`ℴ`,Oslash:`Ø`,oslash:`ø`,osol:`⊘`,Otilde:`Õ`,otilde:`õ`,Otimes:`⨷`,otimes:`⊗`,otimesas:`⨶`,Ouml:`Ö`,ouml:`ö`,ovbar:`⌽`,OverBar:`‾`,OverBrace:`⏞`,OverBracket:`⎴`,OverParenthesis:`⏜`,par:`∥`,para:`¶`,parallel:`∥`,parsim:`⫳`,parsl:`⫽`,part:`∂`,PartialD:`∂`,Pcy:`П`,pcy:`п`,percnt:`%`,period:`.`,permil:`‰`,perp:`⊥`,pertenk:`‱`,Pfr:`𝔓`,pfr:`𝔭`,Phi:`Φ`,phi:`φ`,phiv:`ϕ`,phmmat:`ℳ`,phone:`☎`,Pi:`Π`,pi:`π`,pitchfork:`⋔`,piv:`ϖ`,planck:`ℏ`,planckh:`ℎ`,plankv:`ℏ`,plus:`+`,plusacir:`⨣`,plusb:`⊞`,pluscir:`⨢`,plusdo:`∔`,plusdu:`⨥`,pluse:`⩲`,PlusMinus:`±`,plusmn:`±`,plussim:`⨦`,plustwo:`⨧`,pm:`±`,Poincareplane:`ℌ`,pointint:`⨕`,Popf:`ℙ`,popf:`𝕡`,pound:`£`,Pr:`⪻`,pr:`≺`,prap:`⪷`,prcue:`≼`,prE:`⪳`,pre:`⪯`,prec:`≺`,precapprox:`⪷`,preccurlyeq:`≼`,Precedes:`≺`,PrecedesEqual:`⪯`,PrecedesSlantEqual:`≼`,PrecedesTilde:`≾`,preceq:`⪯`,precnapprox:`⪹`,precneqq:`⪵`,precnsim:`⋨`,precsim:`≾`,Prime:`″`,prime:`′`,primes:`ℙ`,prnap:`⪹`,prnE:`⪵`,prnsim:`⋨`,prod:`∏`,Product:`∏`,profalar:`⌮`,profline:`⌒`,profsurf:`⌓`,prop:`∝`,Proportion:`∷`,Proportional:`∝`,propto:`∝`,prsim:`≾`,prurel:`⊰`,Pscr:`𝒫`,pscr:`𝓅`,Psi:`Ψ`,psi:`ψ`,puncsp:` `,Qfr:`𝔔`,qfr:`𝔮`,qint:`⨌`,Qopf:`ℚ`,qopf:`𝕢`,qprime:`⁗`,Qscr:`𝒬`,qscr:`𝓆`,quaternions:`ℍ`,quatint:`⨖`,quest:`?`,questeq:`≟`,QUOT:`"`,quot:`"`,rAarr:`⇛`,race:`∽̱`,Racute:`Ŕ`,racute:`ŕ`,radic:`√`,raemptyv:`⦳`,Rang:`⟫`,rang:`⟩`,rangd:`⦒`,range:`⦥`,rangle:`⟩`,raquo:`»`,Rarr:`↠`,rArr:`⇒`,rarr:`→`,rarrap:`⥵`,rarrb:`⇥`,rarrbfs:`⤠`,rarrc:`⤳`,rarrfs:`⤞`,rarrhk:`↪`,rarrlp:`↬`,rarrpl:`⥅`,rarrsim:`⥴`,Rarrtl:`⤖`,rarrtl:`↣`,rarrw:`↝`,rAtail:`⤜`,ratail:`⤚`,ratio:`∶`,rationals:`ℚ`,RBarr:`⤐`,rBarr:`⤏`,rbarr:`⤍`,rbbrk:`❳`,rbrace:`}`,rbrack:`]`,rbrke:`⦌`,rbrksld:`⦎`,rbrkslu:`⦐`,Rcaron:`Ř`,rcaron:`ř`,Rcedil:`Ŗ`,rcedil:`ŗ`,rceil:`⌉`,rcub:`}`,Rcy:`Р`,rcy:`р`,rdca:`⤷`,rdldhar:`⥩`,rdquo:`”`,rdquor:`”`,rdsh:`↳`,Re:`ℜ`,real:`ℜ`,realine:`ℛ`,realpart:`ℜ`,reals:`ℝ`,rect:`▭`,REG:`®`,reg:`®`,ReverseElement:`∋`,ReverseEquilibrium:`⇋`,ReverseUpEquilibrium:`⥯`,rfisht:`⥽`,rfloor:`⌋`,Rfr:`ℜ`,rfr:`𝔯`,rHar:`⥤`,rhard:`⇁`,rharu:`⇀`,rharul:`⥬`,Rho:`Ρ`,rho:`ρ`,rhov:`ϱ`,RightAngleBracket:`⟩`,RightArrow:`→`,Rightarrow:`⇒`,rightarrow:`→`,RightArrowBar:`⇥`,RightArrowLeftArrow:`⇄`,rightarrowtail:`↣`,RightCeiling:`⌉`,RightDoubleBracket:`⟧`,RightDownTeeVector:`⥝`,RightDownVector:`⇂`,RightDownVectorBar:`⥕`,RightFloor:`⌋`,rightharpoondown:`⇁`,rightharpoonup:`⇀`,rightleftarrows:`⇄`,rightleftharpoons:`⇌`,rightrightarrows:`⇉`,rightsquigarrow:`↝`,RightTee:`⊢`,RightTeeArrow:`↦`,RightTeeVector:`⥛`,rightthreetimes:`⋌`,RightTriangle:`⊳`,RightTriangleBar:`⧐`,RightTriangleEqual:`⊵`,RightUpDownVector:`⥏`,RightUpTeeVector:`⥜`,RightUpVector:`↾`,RightUpVectorBar:`⥔`,RightVector:`⇀`,RightVectorBar:`⥓`,ring:`˚`,risingdotseq:`≓`,rlarr:`⇄`,rlhar:`⇌`,rlm:``,rmoust:`⎱`,rmoustache:`⎱`,rnmid:`⫮`,roang:`⟭`,roarr:`⇾`,robrk:`⟧`,ropar:`⦆`,Ropf:`ℝ`,ropf:`𝕣`,roplus:`⨮`,rotimes:`⨵`,RoundImplies:`⥰`,rpar:`)`,rpargt:`⦔`,rppolint:`⨒`,rrarr:`⇉`,Rrightarrow:`⇛`,rsaquo:`›`,Rscr:`ℛ`,rscr:`𝓇`,Rsh:`↱`,rsh:`↱`,rsqb:`]`,rsquo:`’`,rsquor:`’`,rthree:`⋌`,rtimes:`⋊`,rtri:`▹`,rtrie:`⊵`,rtrif:`▸`,rtriltri:`⧎`,RuleDelayed:`⧴`,ruluhar:`⥨`,rx:`℞`,Sacute:`Ś`,sacute:`ś`,sbquo:`‚`,Sc:`⪼`,sc:`≻`,scap:`⪸`,Scaron:`Š`,scaron:`š`,sccue:`≽`,scE:`⪴`,sce:`⪰`,Scedil:`Ş`,scedil:`ş`,Scirc:`Ŝ`,scirc:`ŝ`,scnap:`⪺`,scnE:`⪶`,scnsim:`⋩`,scpolint:`⨓`,scsim:`≿`,Scy:`С`,scy:`с`,sdot:`⋅`,sdotb:`⊡`,sdote:`⩦`,searhk:`⤥`,seArr:`⇘`,searr:`↘`,searrow:`↘`,sect:`§`,semi:`;`,seswar:`⤩`,setminus:`∖`,setmn:`∖`,sext:`✶`,Sfr:`𝔖`,sfr:`𝔰`,sfrown:`⌢`,sharp:`♯`,SHCHcy:`Щ`,shchcy:`щ`,SHcy:`Ш`,shcy:`ш`,ShortDownArrow:`↓`,ShortLeftArrow:`←`,shortmid:`∣`,shortparallel:`∥`,ShortRightArrow:`→`,ShortUpArrow:`↑`,shy:``,Sigma:`Σ`,sigma:`σ`,sigmaf:`ς`,sigmav:`ς`,sim:`∼`,simdot:`⩪`,sime:`≃`,simeq:`≃`,simg:`⪞`,simgE:`⪠`,siml:`⪝`,simlE:`⪟`,simne:`≆`,simplus:`⨤`,simrarr:`⥲`,slarr:`←`,SmallCircle:`∘`,smallsetminus:`∖`,smashp:`⨳`,smeparsl:`⧤`,smid:`∣`,smile:`⌣`,smt:`⪪`,smte:`⪬`,smtes:`⪬︀`,SOFTcy:`Ь`,softcy:`ь`,sol:`/`,solb:`⧄`,solbar:`⌿`,Sopf:`𝕊`,sopf:`𝕤`,spades:`♠`,spadesuit:`♠`,spar:`∥`,sqcap:`⊓`,sqcaps:`⊓︀`,sqcup:`⊔`,sqcups:`⊔︀`,Sqrt:`√`,sqsub:`⊏`,sqsube:`⊑`,sqsubset:`⊏`,sqsubseteq:`⊑`,sqsup:`⊐`,sqsupe:`⊒`,sqsupset:`⊐`,sqsupseteq:`⊒`,squ:`□`,Square:`□`,square:`□`,SquareIntersection:`⊓`,SquareSubset:`⊏`,SquareSubsetEqual:`⊑`,SquareSuperset:`⊐`,SquareSupersetEqual:`⊒`,SquareUnion:`⊔`,squarf:`▪`,squf:`▪`,srarr:`→`,Sscr:`𝒮`,sscr:`𝓈`,ssetmn:`∖`,ssmile:`⌣`,sstarf:`⋆`,Star:`⋆`,star:`☆`,starf:`★`,straightepsilon:`ϵ`,straightphi:`ϕ`,strns:`¯`,Sub:`⋐`,sub:`⊂`,subdot:`⪽`,subE:`⫅`,sube:`⊆`,subedot:`⫃`,submult:`⫁`,subnE:`⫋`,subne:`⊊`,subplus:`⪿`,subrarr:`⥹`,Subset:`⋐`,subset:`⊂`,subseteq:`⊆`,subseteqq:`⫅`,SubsetEqual:`⊆`,subsetneq:`⊊`,subsetneqq:`⫋`,subsim:`⫇`,subsub:`⫕`,subsup:`⫓`,succ:`≻`,succapprox:`⪸`,succcurlyeq:`≽`,Succeeds:`≻`,SucceedsEqual:`⪰`,SucceedsSlantEqual:`≽`,SucceedsTilde:`≿`,succeq:`⪰`,succnapprox:`⪺`,succneqq:`⪶`,succnsim:`⋩`,succsim:`≿`,SuchThat:`∋`,Sum:`∑`,sum:`∑`,sung:`♪`,Sup:`⋑`,sup:`⊃`,sup1:`¹`,sup2:`²`,sup3:`³`,supdot:`⪾`,supdsub:`⫘`,supE:`⫆`,supe:`⊇`,supedot:`⫄`,Superset:`⊃`,SupersetEqual:`⊇`,suphsol:`⟉`,suphsub:`⫗`,suplarr:`⥻`,supmult:`⫂`,supnE:`⫌`,supne:`⊋`,supplus:`⫀`,Supset:`⋑`,supset:`⊃`,supseteq:`⊇`,supseteqq:`⫆`,supsetneq:`⊋`,supsetneqq:`⫌`,supsim:`⫈`,supsub:`⫔`,supsup:`⫖`,swarhk:`⤦`,swArr:`⇙`,swarr:`↙`,swarrow:`↙`,swnwar:`⤪`,szlig:`ß`,Tab:` `,target:`⌖`,Tau:`Τ`,tau:`τ`,tbrk:`⎴`,Tcaron:`Ť`,tcaron:`ť`,Tcedil:`Ţ`,tcedil:`ţ`,Tcy:`Т`,tcy:`т`,tdot:`⃛`,telrec:`⌕`,Tfr:`𝔗`,tfr:`𝔱`,there4:`∴`,Therefore:`∴`,therefore:`∴`,Theta:`Θ`,theta:`θ`,thetasym:`ϑ`,thetav:`ϑ`,thickapprox:`≈`,thicksim:`∼`,ThickSpace:` `,thinsp:` `,ThinSpace:` `,thkap:`≈`,thksim:`∼`,THORN:`Þ`,thorn:`þ`,Tilde:`∼`,tilde:`˜`,TildeEqual:`≃`,TildeFullEqual:`≅`,TildeTilde:`≈`,times:`×`,timesb:`⊠`,timesbar:`⨱`,timesd:`⨰`,tint:`∭`,toea:`⤨`,top:`⊤`,topbot:`⌶`,topcir:`⫱`,Topf:`𝕋`,topf:`𝕥`,topfork:`⫚`,tosa:`⤩`,tprime:`‴`,TRADE:`™`,trade:`™`,triangle:`▵`,triangledown:`▿`,triangleleft:`◃`,trianglelefteq:`⊴`,triangleq:`≜`,triangleright:`▹`,trianglerighteq:`⊵`,tridot:`◬`,trie:`≜`,triminus:`⨺`,TripleDot:`⃛`,triplus:`⨹`,trisb:`⧍`,tritime:`⨻`,trpezium:`⏢`,Tscr:`𝒯`,tscr:`𝓉`,TScy:`Ц`,tscy:`ц`,TSHcy:`Ћ`,tshcy:`ћ`,Tstrok:`Ŧ`,tstrok:`ŧ`,twixt:`≬`,twoheadleftarrow:`↞`,twoheadrightarrow:`↠`,Uacute:`Ú`,uacute:`ú`,Uarr:`↟`,uArr:`⇑`,uarr:`↑`,Uarrocir:`⥉`,Ubrcy:`Ў`,ubrcy:`ў`,Ubreve:`Ŭ`,ubreve:`ŭ`,Ucirc:`Û`,ucirc:`û`,Ucy:`У`,ucy:`у`,udarr:`⇅`,Udblac:`Ű`,udblac:`ű`,udhar:`⥮`,ufisht:`⥾`,Ufr:`𝔘`,ufr:`𝔲`,Ugrave:`Ù`,ugrave:`ù`,uHar:`⥣`,uharl:`↿`,uharr:`↾`,uhblk:`▀`,ulcorn:`⌜`,ulcorner:`⌜`,ulcrop:`⌏`,ultri:`◸`,Umacr:`Ū`,umacr:`ū`,uml:`¨`,UnderBar:`_`,UnderBrace:`⏟`,UnderBracket:`⎵`,UnderParenthesis:`⏝`,Union:`⋃`,UnionPlus:`⊎`,Uogon:`Ų`,uogon:`ų`,Uopf:`𝕌`,uopf:`𝕦`,UpArrow:`↑`,Uparrow:`⇑`,uparrow:`↑`,UpArrowBar:`⤒`,UpArrowDownArrow:`⇅`,UpDownArrow:`↕`,Updownarrow:`⇕`,updownarrow:`↕`,UpEquilibrium:`⥮`,upharpoonleft:`↿`,upharpoonright:`↾`,uplus:`⊎`,UpperLeftArrow:`↖`,UpperRightArrow:`↗`,Upsi:`ϒ`,upsi:`υ`,upsih:`ϒ`,Upsilon:`Υ`,upsilon:`υ`,UpTee:`⊥`,UpTeeArrow:`↥`,upuparrows:`⇈`,urcorn:`⌝`,urcorner:`⌝`,urcrop:`⌎`,Uring:`Ů`,uring:`ů`,urtri:`◹`,Uscr:`𝒰`,uscr:`𝓊`,utdot:`⋰`,Utilde:`Ũ`,utilde:`ũ`,utri:`▵`,utrif:`▴`,uuarr:`⇈`,Uuml:`Ü`,uuml:`ü`,uwangle:`⦧`,vangrt:`⦜`,varepsilon:`ϵ`,varkappa:`ϰ`,varnothing:`∅`,varphi:`ϕ`,varpi:`ϖ`,varpropto:`∝`,vArr:`⇕`,varr:`↕`,varrho:`ϱ`,varsigma:`ς`,varsubsetneq:`⊊︀`,varsubsetneqq:`⫋︀`,varsupsetneq:`⊋︀`,varsupsetneqq:`⫌︀`,vartheta:`ϑ`,vartriangleleft:`⊲`,vartriangleright:`⊳`,Vbar:`⫫`,vBar:`⫨`,vBarv:`⫩`,Vcy:`В`,vcy:`в`,VDash:`⊫`,Vdash:`⊩`,vDash:`⊨`,vdash:`⊢`,Vdashl:`⫦`,Vee:`⋁`,vee:`∨`,veebar:`⊻`,veeeq:`≚`,vellip:`⋮`,Verbar:`‖`,verbar:`|`,Vert:`‖`,vert:`|`,VerticalBar:`∣`,VerticalLine:`|`,VerticalSeparator:`❘`,VerticalTilde:`≀`,VeryThinSpace:` `,Vfr:`𝔙`,vfr:`𝔳`,vltri:`⊲`,vnsub:`⊂⃒`,vnsup:`⊃⃒`,Vopf:`𝕍`,vopf:`𝕧`,vprop:`∝`,vrtri:`⊳`,Vscr:`𝒱`,vscr:`𝓋`,vsubnE:`⫋︀`,vsubne:`⊊︀`,vsupnE:`⫌︀`,vsupne:`⊋︀`,Vvdash:`⊪`,vzigzag:`⦚`,Wcirc:`Ŵ`,wcirc:`ŵ`,wedbar:`⩟`,Wedge:`⋀`,wedge:`∧`,wedgeq:`≙`,weierp:`℘`,Wfr:`𝔚`,wfr:`𝔴`,Wopf:`𝕎`,wopf:`𝕨`,wp:`℘`,wr:`≀`,wreath:`≀`,Wscr:`𝒲`,wscr:`𝓌`,xcap:`⋂`,xcirc:`◯`,xcup:`⋃`,xdtri:`▽`,Xfr:`𝔛`,xfr:`𝔵`,xhArr:`⟺`,xharr:`⟷`,Xi:`Ξ`,xi:`ξ`,xlArr:`⟸`,xlarr:`⟵`,xmap:`⟼`,xnis:`⋻`,xodot:`⨀`,Xopf:`𝕏`,xopf:`𝕩`,xoplus:`⨁`,xotime:`⨂`,xrArr:`⟹`,xrarr:`⟶`,Xscr:`𝒳`,xscr:`𝓍`,xsqcup:`⨆`,xuplus:`⨄`,xutri:`△`,xvee:`⋁`,xwedge:`⋀`,Yacute:`Ý`,yacute:`ý`,YAcy:`Я`,yacy:`я`,Ycirc:`Ŷ`,ycirc:`ŷ`,Ycy:`Ы`,ycy:`ы`,yen:`¥`,Yfr:`𝔜`,yfr:`𝔶`,YIcy:`Ї`,yicy:`ї`,Yopf:`𝕐`,yopf:`𝕪`,Yscr:`𝒴`,yscr:`𝓎`,YUcy:`Ю`,yucy:`ю`,Yuml:`Ÿ`,yuml:`ÿ`,Zacute:`Ź`,zacute:`ź`,Zcaron:`Ž`,zcaron:`ž`,Zcy:`З`,zcy:`з`,Zdot:`Ż`,zdot:`ż`,zeetrf:`ℨ`,ZeroWidthSpace:``,Zeta:`Ζ`,zeta:`ζ`,Zfr:`ℨ`,zfr:`𝔷`,ZHcy:`Ж`,zhcy:`ж`,zigrarr:`⇝`,Zopf:`ℤ`,zopf:`𝕫`,Zscr:`𝒵`,zscr:`𝓏`,zwj:``,zwnj:``}),e.entityMap=e.HTML_ENTITIES})),$a=/* @__PURE__ */ t((e=>{var t=Ja(),n=Xa(),r=Ya(),i=t.isHTMLEscapableRawTextElement,a=t.isHTMLMimeType,o=t.isHTMLRawTextElement,s=t.hasOwn,c=t.NAMESPACE,l=r.ParseError,u=r.DOMException,d=0,f=1,p=2,m=3,h=4,g=5,_=6,v=7;function y(){}y.prototype={parse:function(e,t,n){var r=this.domBuilder;r.startDocument(),E(t,t=Object.create(null)),x(e,t,n,r,this.errorHandler),r.endDocument()}};var b=/&#?\w+;?/g;function x(e,r,i,o,c){var d=a(o.mimeType);e.indexOf(n.UNICODE_REPLACEMENT_CHARACTER)>=0&&c.warning(`Unicode replacement character detected, source encoding issues?`);function f(e){if(e>65535){e-=65536;var t=55296+(e>>10),n=56320+(e&1023);return String.fromCharCode(t,n)}return String.fromCharCode(e)}function p(e){var t=e[e.length-1]===`;`?e:e+`;`;if(!d&&t!==e)return c.error(`EntityRef: expecting ;`),e;var r=n.Reference.exec(t);if(!r||r[0].length!==t.length)return c.error(`entity not matching Reference production: `+e),e;var a=t.slice(1,-1);return s(i,a)?i[a]:a.charAt(0)===`#`?f(parseInt(a.substring(1).replace(`x`,`0x`))):(c.error(`entity not found:`+e),e)}function m(t){if(t>D){var n=e.substring(D,t).replace(b,p);v&&y(D),o.characters(n,0,t-D),D=t}}var h=0,g=0,_=/\r\n?|\n|$/g,v=o.locator;function y(t,n){for(;t>=g&&(n=_.exec(e));)h=g,g=n.index+n[0].length,v.lineNumber++;v.columnNumber=t-h+1}for(var x=[{currentNSMap:r}],E=[],D=0;;){try{var O=e.indexOf(`<`,D);if(O<0){if(!d&&E.length>0)return c.fatalError(`unclosed xml tag(s): `+E.join(`, `));if(!e.substring(D).match(/^\s*$/)){var k=o.doc,A=k.createTextNode(e.substring(D));if(k.documentElement)return c.error(`Extra content at the end of the document`);k.appendChild(A),o.currentElement=A}return}if(O>D){var j=e.substring(D,O);!d&&E.length===0&&(j=j.replace(new RegExp(n.S_OPT.source,`g`),``),j&&c.error(`Unexpected content outside root element: '`+j+`'`)),m(O)}switch(e.charAt(O+1)){case`/`:var M=e.indexOf(`>`,O+2),N=e.substring(O+2,M>0?M:void 0);if(!N)return c.fatalError(`end tag name missing`);var P=n.reg(`^`,n.QName_group,n.S_OPT,`$`),F=M>0&&P.exec(N);if(!F){var I=M>0&&n.reg(`^`,n.QName_group).exec(N);if(d&&I)c.warning(`end tag name contains invalid trailing characters: "`+N+`"`),F=I;else if(I&&new RegExp(P.source,P.flags+`m`).test(N))c.error(`end tag name is followed by a line break and trailing content: "`+N+`"`),F=I;else return c.fatalError(`end tag name contains invalid characters: "`+N+`"`)}if(!o.currentElement&&!o.doc.documentElement)return;var L=E[E.length-1]||o.currentElement.tagName||o.doc.documentElement.tagName||``;if(L!==F[1]){var R=F[1].toLowerCase();if(!d||L.toLowerCase()!==R)return c.fatalError(`Opening and ending tag mismatch: "`+L+`" != "`+N+`"`)}var z=x.pop();E.pop();var B=z.localNSMap;if(o.endElement(z.uri,z.localName,L),B)for(var re in B)s(B,re)&&o.endPrefixMapping(re);M++;break;case`?`:v&&y(O),M=te(e,O,o,c);break;case`!`:v&&y(O),M=ee(e,O,o,c,d);break;default:v&&y(O);var V=new ne,ie=x[x.length-1].currentNSMap,M=C(e,O,V,ie,p,c,d),ae=V.length;if(V.closed||(d&&t.isHTMLVoidElement(V.tagName)?V.closed=!0:E.push(V.tagName)),v&&ae){for(var H=S(v,{}),oe=0;oe<ae;oe++){var se=V[oe];y(se.offset),se.locator=S(v,{})}o.locator=H,w(V,o,ie)&&x.push(V),o.locator=v}else w(V,o,ie)&&x.push(V);d&&!V.closed?M=T(e,M,V.tagName,p,o):M++}}catch(e){if(e instanceof l)throw e;if(e instanceof u)return c.fatalError(`Error constructing the DOM: `+e.name+`: `+e.message,e);c.error(`element parse error: `+e),M=-1}M>D?D=M:m(Math.max(O,D)+1)}}function S(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function C(e,t,n,r,i,a,o){function c(e,t,r){if(s(n.attributeNames,e))return a.fatalError(`Attribute `+e+` redefined`);if(!o&&t.indexOf(`<`)>=0)return a.fatalError(`Unescaped '<' not allowed in attributes values`);n.addValue(e,t.replace(/[\t\n\r]/g,` `).replace(b,i),r)}for(var l,u,y=++t,x=d;;){var S=e.charAt(y);if(x===d&&S===`<`)throw Error(`unexpected < in tag name: `+e.slice(t,y));switch(S){case`=`:if(x===f)l=e.slice(t,y),x=m;else if(x===p)x=m;else throw Error(`attribute equal must after attrName`);break;case`'`:case`"`:if(x===m||x===f){if(x===f&&(a.warning(`attribute value must after "="`),l=e.slice(t,y)),t=y+1,y=e.indexOf(S,t),y>0)u=e.slice(t,y),c(l,u,t-1),x=g;else throw Error(`attribute value no end '`+S+`' match`)}else if(x==h)u=e.slice(t,y),c(l,u,t),a.warning(`attribute "`+l+`" missed start quot(`+S+`)!!`),t=y+1,x=g;else throw Error(`attribute value must after "="`);break;case`/`:switch(x){case d:n.setTagName(e.slice(t,y));case g:case _:case v:x=v,n.closed=!0;case h:case f:break;case p:n.closed=!0;break;default:throw Error(`attribute invalid close char('/')`)}break;case``:return a.error(`unexpected end of input`),x==d&&n.setTagName(e.slice(t,y)),y;case`>`:switch(x){case d:n.setTagName(e.slice(t,y));case g:case _:case v:break;case h:case f:u=e.slice(t,y),u.slice(-1)===`/`&&(n.closed=!0,u=u.slice(0,-1));case p:x===p&&(u=l),x==h?(a.warning(`attribute "`+u+`" missed quot(")!`),c(l,u,t)):(o||a.warning(`attribute "`+u+`" missed value!! "`+u+`" instead!!`),c(u,u,t));break;case m:if(!o)return a.fatalError(`AttValue: ' or " expected`)}return y;case``:S=` `;default:if(S<=` `)switch(x){case d:n.setTagName(e.slice(t,y)),x=_;break;case f:l=e.slice(t,y),x=p;break;case h:var u=e.slice(t,y);a.warning(`attribute "`+u+`" missed quot(")!!`),c(l,u,t);case g:x=_}else switch(x){case p:o||a.warning(`attribute "`+l+`" missed value!! "`+l+`" instead2!!`),c(l,l,t),t=y,x=f;break;case g:a.warning(`attribute space is required"`+l+`"!!`);case _:x=f,t=y;break;case m:x=h,t=y;break;case v:throw Error(`elements closed character '/' and '>' must be connected to`)}}y++}}function w(e,t,n){for(var r=e.tagName,i=null,a=e.length;a--;){var o=e[a],l=o.qName,u=o.value,d=l.indexOf(`:`);if(d>0)var f=o.prefix=l.slice(0,d),p=l.slice(d+1),m=f===`xmlns`&&p;else p=l,f=null,m=l===`xmlns`&&``;o.localName=p,m!==!1&&(i??(i=Object.create(null),n=Object.create(n)),n[m]=i[m]=u,o.uri=c.XMLNS,t.startPrefixMapping(m,u))}for(var a=e.length;a--;)o=e[a],o.prefix&&(o.prefix===`xml`&&(o.uri=c.XML),o.prefix!==`xmlns`&&(o.uri=n[o.prefix]));var d=r.indexOf(`:`);d>0?(f=e.prefix=r.slice(0,d),p=e.localName=r.slice(d+1)):(f=null,p=e.localName=r);var h=e.uri=n[f||``];if(t.startElement(h,p,r,e),e.closed){if(t.endElement(h,p,r),i)for(f in i)s(i,f)&&t.endPrefixMapping(f)}else return e.currentNSMap=n,e.localNSMap=i,!0}function T(e,t,n,r,a){var s=i(n);if(s||o(n)){var c=RegExp(`</`+n.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)+`>`,`ig`);c.lastIndex=t;var l=c.exec(e),u=l?l.index:-1;if(u<0)return t+1;var d=e.substring(t+1,u);return s&&(d=d.replace(b,r)),a.characters(d,0,d.length),u}return t+1}function E(e,t){for(var n in e)s(e,n)&&(t[n]=e[n])}function D(e,t){var r=t;function i(t){return t||=0,e.charAt(r+t)}function a(e){e||=1,r+=e}function o(){for(var t=0;r<e.length;){var n=i();if(n!==` `&&n!==`
|
|
19
|
+
`&&n!==` `&&n!==`\r`)return t;t++,a()}return-1}function s(){return e.substring(r)}function c(t){return e.substring(r,r+t.length)===t}function l(t){return e.substring(r,r+t.length).toUpperCase()===t.toUpperCase()}function u(e){var t=n.reg(`^`,e).exec(s());return t?(a(t[0].length),t[0]):null}return{char:i,getIndex:function(){return r},getMatch:u,getSource:function(){return e},skip:a,skipBlanks:o,substringFromIndex:s,substringStartsWith:c,substringStartsWithCaseInsensitive:l}}function O(e,t){function r(e,t){var r=n.PI.exec(e.substringFromIndex());return r?r[1].toLowerCase()===`xml`?t.fatalError(`xml declaration is only allowed at the start of the document, but found at position `+e.getIndex()):(e.skip(r[0].length),r[0]):t.fatalError(`processing instruction is not well-formed at position `+e.getIndex())}var i=e.getSource();if(e.char()===`[`){e.skip(1);for(var a=e.getIndex();e.getIndex()<i.length;){if(e.skipBlanks(),e.char()===`]`){var o=i.substring(a,e.getIndex());return e.skip(1),o}var s=null;if(e.char()===`<`&&e.char(1)===`!`)switch(e.char(2)){case`E`:e.char(3)===`L`?s=e.getMatch(n.elementdecl):e.char(3)===`N`&&(s=e.getMatch(n.EntityDecl));break;case`A`:s=e.getMatch(n.AttlistDecl);break;case`N`:s=e.getMatch(n.NotationDecl);break;case`-`:s=e.getMatch(n.Comment)}else if(e.char()===`<`&&e.char(1)===`?`)s=r(e,t);else if(e.char()===`%`)s=e.getMatch(n.PEReference);else return t.fatalError(`Error detected in Markup declaration`);if(!s)return t.fatalError(`Error in internal subset at position `+e.getIndex())}return t.fatalError(`doctype internal subset is not well-formed, missing ]`)}}function ee(e,t,r,i,a){var o=D(e,t);switch(a?o.char(2).toUpperCase():o.char(2)){case`-`:var s=o.getMatch(n.Comment);return s?(r.comment(s,n.COMMENT_START.length,s.length-n.COMMENT_START.length-n.COMMENT_END.length),o.getIndex()):i.fatalError(`comment is not well-formed at position `+o.getIndex());case`[`:var c=o.getMatch(n.CDSect);return c?!a&&!r.currentElement?i.fatalError(`CDATA outside of element`):(r.startCDATA(),r.characters(c,n.CDATA_START.length,c.length-n.CDATA_START.length-n.CDATA_END.length),r.endCDATA(),o.getIndex()):i.fatalError(`Invalid CDATA starting at position `+t);case`D`:if(r.doc&&r.doc.documentElement)return i.fatalError(`Doctype not allowed inside or after documentElement at position `+o.getIndex());if(a?!o.substringStartsWithCaseInsensitive(n.DOCTYPE_DECL_START):!o.substringStartsWith(n.DOCTYPE_DECL_START))return i.fatalError(`Expected `+n.DOCTYPE_DECL_START+` at position `+o.getIndex());if(o.skip(n.DOCTYPE_DECL_START.length),o.skipBlanks()<1)return i.fatalError(`Expected whitespace after `+n.DOCTYPE_DECL_START+` at position `+o.getIndex());var l={name:void 0,publicId:void 0,systemId:void 0,internalSubset:void 0};if(l.name=o.getMatch(n.Name),!l.name)return i.fatalError(`doctype name missing or contains unexpected characters at position `+o.getIndex());if(a&&l.name.toLowerCase()!==`html`&&i.warning(`Unexpected DOCTYPE in HTML document at position `+o.getIndex()),o.skipBlanks(),o.substringStartsWith(n.PUBLIC)||o.substringStartsWith(n.SYSTEM)){var u=n.ExternalID_match.exec(o.substringFromIndex());if(!u)return i.fatalError(`doctype external id is not well-formed at position `+o.getIndex());u.groups.SystemLiteralOnly===void 0?(l.systemId=u.groups.SystemLiteral,l.publicId=u.groups.PubidLiteral):l.systemId=u.groups.SystemLiteralOnly,o.skip(u[0].length)}else if(a&&o.substringStartsWithCaseInsensitive(n.SYSTEM)){if(o.skip(n.SYSTEM.length),o.skipBlanks()<1)return i.fatalError(`Expected whitespace after `+n.SYSTEM+` at position `+o.getIndex());if(l.systemId=o.getMatch(n.ABOUT_LEGACY_COMPAT_SystemLiteral),!l.systemId)return i.fatalError(`Expected `+n.ABOUT_LEGACY_COMPAT+` in single or double quotes after `+n.SYSTEM+` at position `+o.getIndex())}return a&&l.systemId&&!n.ABOUT_LEGACY_COMPAT_SystemLiteral.test(l.systemId)&&i.warning(`Unexpected doctype.systemId in HTML document at position `+o.getIndex()),a||(o.skipBlanks(),l.internalSubset=O(o,i)),o.skipBlanks(),o.char()===`>`?(o.skip(1),r.startDTD(l.name,l.publicId,l.systemId,l.internalSubset),r.endDTD(),o.getIndex()):i.fatalError(`doctype not terminated with > at position `+o.getIndex());default:return i.fatalError(`Not well-formed XML starting with "<!" at position `+t)}}function te(e,t,r,i){var a=e.substring(t).match(n.PI);if(!a)return i.fatalError(`Invalid processing instruction starting at position `+t);if(a[1].toLowerCase()===`xml`){if(t>0)return i.fatalError(`processing instruction at position `+t+` is an xml declaration which is only at the start of the document`);if(!n.XMLDecl.test(e.substring(t)))return i.fatalError(`xml declaration is not well-formed`)}return r.processingInstruction(a[1],a[2]),t+a[0].length}function ne(){this.attributeNames=Object.create(null)}ne.prototype={setTagName:function(e){if(!n.QName_exact.test(e))throw Error(`invalid tagName:`+e);this.tagName=e},addValue:function(e,t,r){if(!n.QName_exact.test(e))throw Error(`invalid attribute:`+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:r}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},e.XMLReader=y,e.parseUtils=D,e.parseDoctypeCommentOrCData=ee})),eo=/* @__PURE__ */ t((e=>{var t=Ja(),n=Za(),r=Ya(),i=Qa(),a=$a(),o=n.DOMImplementation,s=t.hasDefaultHTMLNamespace,c=t.isHTMLMimeType,l=t.isValidMimeType,u=t.MIME_TYPE,d=t.NAMESPACE,f=r.ParseError,p=a.XMLReader;function m(e){return e.replace(/\r[\n\u0085]/g,`
|
|
20
20
|
`).replace(/[\r\u0085\u2028\u2029]/g,`
|
|
21
21
|
`)}function h(e){if(e||={},e.locator===void 0&&(e.locator=!0),this.assign=e.assign||t.assign,this.domHandler=e.domHandler||g,this.onError=e.onError||e.errorHandler,e.errorHandler&&typeof e.errorHandler!=`function`)throw TypeError(`errorHandler object is no longer supported, switch to onError!`);e.errorHandler&&e.errorHandler(`warning`,"The `errorHandler` option has been deprecated, use `onError` instead!",this),this.normalizeLineEndings=e.normalizeLineEndings||m,this.locator=!!e.locator,this.xmlns=this.assign(Object.create(null),e.xmlns)}h.prototype.parseFromString=function(e,n){if(!l(n))throw TypeError(`DOMParser.parseFromString: the provided mimeType "`+n+`" is not valid.`);var r=this.assign(Object.create(null),this.xmlns),a=i.XML_ENTITIES,o=r[``]||null;s(n)?(a=i.HTML_ENTITIES,o=d.HTML):n===u.XML_SVG_IMAGE&&(o=d.SVG),r[``]=o,r.xml=r.xml||d.XML;var c=new this.domHandler({mimeType:n,defaultNamespace:o,onError:this.onError}),f=this.locator?{}:void 0;this.locator&&c.setDocumentLocator(f);var m=new p;return m.errorHandler=c,m.domBuilder=c,!t.isHTMLMimeType(n)&&typeof e!=`string`&&m.errorHandler.fatalError(`source is not a string`),m.parse(this.normalizeLineEndings(String(e)),r,a),c.doc.documentElement||m.errorHandler.fatalError(`missing root element`),c.doc};function g(e){var t=e||{};this.mimeType=t.mimeType||u.XML_APPLICATION,this.defaultNamespace=t.defaultNamespace||null,this.cdata=!1,this.currentElement=void 0,this.doc=void 0,this.locator=void 0,this.onError=t.onError}function _(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}g.prototype={startDocument:function(){var e=new o;this.doc=c(this.mimeType)?e.createHTMLDocument(!1):e.createDocument(this.defaultNamespace,``)},startElement:function(e,t,n,r){var i=this.doc,a=i.createElementNS(e,n||t),o=r.length;b(this,a),this.currentElement=a,this.locator&&_(this.locator,a);for(var s=0;s<o;s++){var e=r.getURI(s),c=r.getValue(s),n=r.getQName(s),l=i.createAttributeNS(e,n);this.locator&&_(r.getLocator(s),l),l.value=l.nodeValue=c,a.setAttributeNode(l)}},endElement:function(e,t,n){this.currentElement=this.currentElement.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var n=this.doc.createProcessingInstruction(e,t);this.locator&&_(this.locator,n),b(this,n)},ignorableWhitespace:function(e,t,n){},characters:function(e,t,n){if(e=y.apply(this,arguments),e){if(this.cdata)var r=this.doc.createCDATASection(e);else var r=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(r):/^\s*$/.test(e)&&this.doc.appendChild(r),this.locator&&_(this.locator,r)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){e&&(e.lineNumber=0),this.locator=e},comment:function(e,t,n){e=y.apply(this,arguments);var r=this.doc.createComment(e);this.locator&&_(this.locator,r),b(this,r)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,n,r){var i=this.doc.implementation;if(i&&i.createDocumentType){var a=i.createDocumentType(e,t,n,r);this.locator&&_(this.locator,a),b(this,a),this.doc.doctype=a}},reportError:function(e,t){if(typeof this.onError==`function`)try{this.onError(e,t,this)}catch(n){throw new f(`Reporting `+e+` "`+t+`" caused `+n,this.locator)}else console.error(`[xmldom `+e+`] `+t,v(this.locator))},warning:function(e){this.reportError(`warning`,e)},error:function(e){this.reportError(`error`,e)},fatalError:function(e,t){throw this.reportError(`fatalError`,e),new f(e,this.locator,t)}};function v(e){if(e)return`
|
|
22
22
|
@#[line:`+e.lineNumber+`,col:`+e.columnNumber+`]`}function y(e,t,n){return typeof e==`string`?e.substr(t,n):e.length>=t+n||t?new java.lang.String(e,t,n)+``:e}`endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl`.replace(/\w+/g,function(e){g.prototype[e]=function(){return null}});function b(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}function x(e){if(e===`error`)throw`onErrorStopParsing`}function S(){throw`onWarningStopParsing`}e.__DOMHandler=g,e.DOMParser=h,e.normalizeLineEndings=m,e.onErrorStopParsing=x,e.onWarningStopParsing=S})),to=(/* @__PURE__ */ t((e=>{var t=Ja();e.assign=t.assign,e.hasDefaultHTMLNamespace=t.hasDefaultHTMLNamespace,e.isHTMLMimeType=t.isHTMLMimeType,e.isValidMimeType=t.isValidMimeType,e.MIME_TYPE=t.MIME_TYPE,e.NAMESPACE=t.NAMESPACE;var n=Ya();e.DOMException=n.DOMException,e.DOMExceptionName=n.DOMExceptionName,e.ExceptionCode=n.ExceptionCode,e.ParseError=n.ParseError;var r=Za();e.Attr=r.Attr,e.CDATASection=r.CDATASection,e.CharacterData=r.CharacterData,e.Comment=r.Comment,e.Document=r.Document,e.DocumentFragment=r.DocumentFragment,e.DocumentType=r.DocumentType,e.DOMImplementation=r.DOMImplementation,e.Element=r.Element,e.Entity=r.Entity,e.EntityReference=r.EntityReference,e.LiveNodeList=r.LiveNodeList,e.NamedNodeMap=r.NamedNodeMap,e.Node=r.Node,e.NodeList=r.NodeList,e.Notation=r.Notation,e.ProcessingInstruction=r.ProcessingInstruction,e.Text=r.Text,e.XMLSerializer=r.XMLSerializer;var i=eo();e.DOMParser=i.DOMParser,e.normalizeLineEndings=i.normalizeLineEndings,e.onErrorStopParsing=i.onErrorStopParsing,e.onWarningStopParsing=i.onWarningStopParsing})))(),no=/* @__PURE__ */ e(r(),1);function ro(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var io=ro();function ao(e){io=e}var oo={exec:()=>null};function so(e){let t=[];return n=>{let r=Math.max(0,Math.min(3,n-1)),i=t[r];return i||(i=e(r),t[r]=i),i}}function X(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(lo.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var co=((e=``)=>{try{return!!RegExp(`(?<=1)(?<!1)`+e)}catch{return!1}})(),lo={codeRemoveIndent:/^(?: {0,3}\t| {1,4})/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,leadingSpaceTab:/^[ \t]+/,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,numericCharacterReference:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/g,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:so(e=>RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:so(e=>RegExp(`^ {0,${e}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:so(e=>RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:so(e=>RegExp(`^ {0,${e}}#`)),htmlBeginRegex:so(e=>RegExp(`^ {0,${e}}(?:</?(?:${To})(?: +|$|/?>)|<(?:script|pre|style|textarea|!--))`,`i`)),blockquoteBeginRegex:so(e=>RegExp(`^ {0,${e}}>`))},uo=/^(?:[ \t]*(?:\n|$))+/,fo=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,po=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,mo=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,ho=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,go=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,_o=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,vo=X(_o).replace(/bull/g,go).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),yo=X(_o).replace(/bull/g,go).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),bo=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,xo=/^[^\n]+/,So=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Co=X(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,So).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),wo=X(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,go).getRegex(),To=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,Eo=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Do=X(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,Eo).replace(`tag`,To).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Oo=e=>X(bo).replace(`hr`,mo).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,e).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,To).getRegex(),ko=Oo(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),Ao=Oo(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),jo={blockquote:X(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,Ao).getRegex(),code:fo,def:Co,fences:po,heading:ho,hr:mo,html:Do,lheading:vo,list:wo,newline:uo,paragraph:ko,table:oo,text:xo},Mo=X(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,mo).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,To).getRegex(),No={...jo,lheading:yo,table:Mo,paragraph:X(bo).replace(`hr`,mo).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,Mo).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,To).getRegex()},Po={...jo,html:X(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,Eo).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:oo,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:X(bo).replace(`hr`,mo).replace(`heading`,` *#{1,6} *[^
|
|
@@ -86,30 +86,31 @@ ${e}</tr>
|
|
|
86
86
|
`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
|
|
87
87
|
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Os(e,!0)}</code>`}br(e){return`<br>`}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,text:n,tokens:r,autolink:i}){let a=i?Os(n,!0):this.parser.parseInline(r),o=As(e);if(o===null)return a;e=Os(o,i);let s=`<a href="`+e+`"`;return t&&(s+=` title="`+Os(t)+`"`),s+=`>`+a+`</a>`,s}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=As(e);if(i===null)return Os(n);e=i;let a=`<img src="${Os(e)}" alt="${Os(n)}"`;return t&&(a+=` title="${Os(t)}"`),a+=`>`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:Os(e.text)}},Us=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return``+e}image({text:e}){return``+e}br(){return``}checkbox({raw:e}){return e}},Ws=class e{options;renderer;textRenderer;constructor(e){this.options=e||io,this.options.renderer=this.options.renderer||new Hs,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Us}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e){this.renderer.parser=this;let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(this.options.extensions?.renderers?.[r.type]){let e=r,n=this.options.extensions.renderers[e.type].call({parser:this},e);if(n!==!1||![`space`,`hr`,`heading`,`code`,`table`,`blockquote`,`list`,`checkbox`,`html`,`def`,`paragraph`,`text`].includes(e.type)){t+=n||``;continue}}let i=r;switch(i.type){case`space`:t+=this.renderer.space(i);break;case`hr`:t+=this.renderer.hr(i);break;case`heading`:t+=this.renderer.heading(i);break;case`code`:t+=this.renderer.code(i);break;case`table`:t+=this.renderer.table(i);break;case`blockquote`:t+=this.renderer.blockquote(i);break;case`list`:t+=this.renderer.list(i);break;case`checkbox`:t+=this.renderer.checkbox(i);break;case`html`:t+=this.renderer.html(i);break;case`def`:t+=this.renderer.def(i);break;case`paragraph`:t+=this.renderer.paragraph(i);break;case`text`:t+=this.renderer.text(i);break;default:{let e=`Token with "`+i.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=this.options.extensions.renderers[i.type].call({parser:this},i);if(e!==!1||![`escape`,`html`,`link`,`image`,`checkbox`,`strong`,`em`,`codespan`,`br`,`del`,`text`].includes(i.type)){n+=e||``;continue}}let a=i;switch(a.type){case`escape`:n+=t.text(a);break;case`html`:n+=t.html(a);break;case`link`:n+=t.link(a);break;case`image`:n+=t.image(a);break;case`checkbox`:n+=t.checkbox(a);break;case`strong`:n+=t.strong(a);break;case`em`:n+=t.em(a);break;case`codespan`:n+=t.codespan(a);break;case`br`:n+=t.br(a);break;case`del`:n+=t.del(a);break;case`text`:n+=t.text(a);break;default:{let e=`Token with "`+a.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return n}},Gs=class{options;block;constructor(e){this.options=e||io}static passThroughHooks=/* @__PURE__ */ new Set([`preprocess`,`postprocess`,`processAllTokens`,`emStrongMask`]);static passThroughHooksRespectAsync=/* @__PURE__ */ new Set([`preprocess`,`postprocess`,`processAllTokens`]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?Vs.lex:Vs.lexInline}provideParser(e=this.block){return e?Ws.parse:Ws.parseInline}},Ks=new class{defaults=ro();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Ws;Renderer=Hs;TextRenderer=Us;Lexer=Vs;Tokenizer=Bs;Hooks=Gs;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(n=n.concat(t.call(this,r)),r.type){case`table`:{let e=r;for(let r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(let r of e.rows)for(let e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case`list`:{let e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{let e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(r=>{let i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(`renderer`in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(`tokenizer`in e){if(!e.level||e.level!==`block`&&e.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&(e.level===`block`?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:e.level===`inline`&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}`childTokens`in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new Hs(this.defaults);for(let n in e.renderer){if(!(n in t))throw Error(`renderer '${n}' does not exist`);if([`options`,`parser`].includes(n))continue;let r=n,i=e.renderer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n||``}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new Bs(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw Error(`tokenizer '${n}' does not exist`);if([`options`,`rules`,`lexer`].includes(n))continue;let r=n,i=e.tokenizer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new Gs;for(let n in e.hooks){if(!(n in t))throw Error(`hook '${n}' does not exist`);if([`options`,`block`].includes(n))continue;let r=n,i=e.hooks[r],a=t[r];t[r]=Gs.passThroughHooks.has(n)?e=>{if(this.defaults.async&&Gs.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await i.call(t,e);return a.call(t,n)})();let r=i.call(t,e);return a.call(t,r)}:(...e)=>{if(this.defaults.async)return(async()=>{let n=await i.apply(t,e);return n===!1&&(n=await a.apply(t,e)),n})();let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return Vs.lex(e,t??this.defaults)}parser(e,t){return Ws.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(/* @__PURE__ */ Error(`marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.`));if(typeof t>`u`||t===null)return a(/* @__PURE__ */ Error(`marked(): input parameter is undefined or null`));if(typeof t!=`string`)return a(/* @__PURE__ */ Error(`marked(): input parameter is of type `+Object.prototype.toString.call(t)+`, string expected`));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let n=i.hooks?await i.hooks.preprocess(t):t,r=await(i.hooks?await i.hooks.provideLexer(e):e?Vs.lex:Vs.lexInline)(n,i),a=i.hooks?await i.hooks.processAllTokens(r):r;i.walkTokens&&await Promise.all(this.walkTokens(a,i.walkTokens));let o=await(i.hooks?await i.hooks.provideParser(e):e?Ws.parse:Ws.parseInline)(a,i);return i.hooks?await i.hooks.postprocess(o):o})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let n=(i.hooks?i.hooks.provideLexer(e):e?Vs.lex:Vs.lexInline)(t,i);i.hooks&&(n=i.hooks.processAllTokens(n)),i.walkTokens&&this.walkTokens(n,i.walkTokens);let r=(i.hooks?i.hooks.provideParser(e):e?Ws.parse:Ws.parseInline)(n,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(e){return a(e)}}}onError(e,t){return n=>{if(n.message+=`
|
|
88
88
|
Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+Os(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function Z(e,t){return Ks.parse(e,t)}Z.options=Z.setOptions=function(e){return Ks.setOptions(e),Z.defaults=Ks.defaults,ao(Z.defaults),Z},Z.getDefaults=ro,Z.defaults=io;function qs(...e){return Ks.use(...e),Z.defaults=Ks.defaults,ao(Z.defaults),Z}Z.use=qs,Z.walkTokens=function(e,t){return Ks.walkTokens(e,t)},Z.parseInline=Ks.parseInline,Z.Parser=Ws,Z.parser=Ws.parse,Z.Renderer=Hs,Z.TextRenderer=Us,Z.Lexer=Vs,Z.lexer=Vs.lex,Z.Tokenizer=Bs,Z.Hooks=Gs,Z.parse=Z,Z.options,Z.setOptions,Z.walkTokens,Z.parseInline,Ws.parse,Vs.lex;function Js(e,t){if(!t||typeof t.createElement!=`function`)throw Error(`A valid documentInstance is required to build frontmatter DOM.`);let n=JSON.stringify(e,null,2)||`{}`,r=t.createElement(`section`);r.setAttribute(`class`,`markdown-frontmatter`),r.setAttribute(`data-markdown-frontmatter`,``),r.setAttribute(`data-frontmatter`,n);let i=t.createElement(`details`);i.setAttribute(`class`,`markdown-frontmatter__details`),i.setAttribute(`hidden`,`hidden`);let a=t.createElement(`summary`);a.setAttribute(`class`,`markdown-frontmatter__summary`),a.appendChild(t.createTextNode(`Frontmatter`));let o=t.createElement(`pre`);o.setAttribute(`class`,`markdown-frontmatter__pre`);let s=t.createElement(`code`);return s.setAttribute(`class`,`language-json`),s.appendChild(t.createTextNode(n)),o.appendChild(s),i.appendChild(a),i.appendChild(o),r.appendChild(i),r}function Ys(e,t){if(typeof t==`function`)return t;let n=e?.defaultView?.XMLSerializer||globalThis.XMLSerializer;return typeof n==`function`?e=>new n().serializeToString(e):null}function Xs(e,t,n={}){let r=n.documentInstance||(typeof document<`u`?document:null);if(!r)throw Error(`No document instance available for frontmatter rendering.`);let i=t(e,r);if(typeof i.outerHTML==`string`)return i.outerHTML;let a=Ys(r,n.serializeNode);if(a)return a(i);throw Error(`No serializer available for frontmatter DOM element.`)}function Zs(e,t){let n=t instanceof Set?t:Array.isArray(t)?new Set(t):null;return e.replace(/<script\b([^>]*)>([\s\S]*?)<\/script>/giu,(e,t,r)=>{if(r.trim())return``;let i=t.match(/\bsrc\s*=\s*(?:"([^"]+)"|'([^']+)'|([^\s>]+))/iu),a=i?i[1]||i[2]||i[3]:``;if(!a)return``;if(n&&n.size>0){let t=a.split(`?`)[0].split(`#`)[0].trim(),r=e=>e.replace(/^\.?\//,``).replace(/^pages\/main\//,``).toLowerCase(),i=r(t);if(Array.from(n).some(e=>e===t||r(e)===i))return e}return``}).replace(/\son[a-z]+\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]+)/giu,``)}function Qs(e){if(e==null||e===``||e===!0)return 1;let t=String(e).trim().toLowerCase();if(t===`all`)return`all`;if(t===`none`||t===`0`||t===`false`)return 0;if(t===`1`||t===`current`||t===`single`)return 1;let n=parseInt(t,10);return!isNaN(n)&&n>=0?n:1}function $s(e){let t=/<!--[\s\S]*?-->|<script\b[\s\S]*?<\/script>|<style\b[\s\S]*?<\/style>|<template\b[\s\S]*?<\/template>|<\/head>/gi,n;for(;(n=t.exec(e))!==null;)if(n[0].toLowerCase().startsWith(`</head`))return n.index;return-1}function ec(e,t){let n=$s(e);return n===-1?`${t}\n${e}`:e.slice(0,n)+t+`
|
|
89
|
-
`+e.slice(n)}function tc(e,t){let n=`<script id="shadow-claw-static-manifest" type="application/json">${a(t)}<\/script>`,r=e;return r=/id="shadow-claw-static-manifest"/iu.test(r)?r.replace(/<script\s+id="shadow-claw-static-manifest"[\s\S]*?<\/script>/iu,()=>n):ec(r,` ${n}`),/id="shadow-claw-static-routing"/iu.test(r)||(r=ec(r,` <script id="shadow-claw-static-routing" type="application/json">{"routes":{}}<\/script>`)),r}
|
|
90
|
-
`)}function
|
|
89
|
+
`+e.slice(n)}function tc(e,t){let n=`<script id="shadow-claw-static-manifest" type="application/json">${a(t)}<\/script>`,r=e;return r=/id="shadow-claw-static-manifest"/iu.test(r)?r.replace(/<script\s+id="shadow-claw-static-manifest"[\s\S]*?<\/script>/iu,()=>n):ec(r,` ${n}`),/id="shadow-claw-static-routing"/iu.test(r)||(r=ec(r,` <script id="shadow-claw-static-routing" type="application/json">{"routes":{}}<\/script>`)),r}function nc(e){return e.replace(/^\.?\//,``).replace(/^pages\/main\//,``).toLowerCase().trim()}function rc(e){return(e.split(`/`).pop()||``).toLowerCase().trim()}function ic(e){return rc(e).replace(/\.(js|mjs|cjs|ts)$/i,``).toLowerCase().trim()}function ac(e=[],t,n){if(!Array.isArray(e)||e.length===0)return[];let r=e.map(e=>typeof e==`string`?{src:e}:e&&typeof e==`object`&&typeof e.src==`string`?e:null).filter(e=>e!==null),i=[],a=/* @__PURE__ */ new Set;for(let e of r)(e.global===!0||e.autoload===!0)&&(a.has(e.src)||(a.add(e.src),i.push(e)));if(!t&&!n)return i;let o=[];if(Array.isArray(t))o.push(...t);else if(typeof t==`string`)o.push(...t.split(/[,;\s]+/));else if(typeof t==`object`&&t){let e=t;Array.isArray(e.dependencies)?o.push(...e.dependencies):typeof e.dependencies==`string`&&o.push(...e.dependencies.split(/[,;\s]+/)),Array.isArray(e.scripts)?o.push(...e.scripts):typeof e.scripts==`string`&&o.push(...e.scripts.split(/[,;\s]+/))}if(typeof n==`string`&&n){let e=n.matchAll(/<script\b[^>]*src=["']([^"']+)["'][^>]*>/gi);for(let t of e)t[1]&&o.push(t[1]);for(let e of r){let t=[e.id,e.name,ic(e.src),rc(e.src)].filter(Boolean);for(let e of t)if(e.includes(`-`)&&RegExp(`<${e}[\\s>/]`,`i`).test(n)){o.push(e);break}}}let s=[];for(let e of o)if(typeof e==`string`){let t=e.trim();t&&s.push(t)}else if(e&&typeof e==`object`){let t=e.id||e.name||e.src;typeof t==`string`&&t.trim()&&s.push(t.trim())}for(let e of s){let t=e.toLowerCase(),n=nc(e),o=rc(e),s=ic(e),c=r.find(r=>{if(r.id&&r.id.toLowerCase()===t||r.name&&r.name.toLowerCase()===t||r.src===e||r.src.toLowerCase()===t||nc(r.src)===n)return!0;let i=rc(r.src);if(i&&(i===o||i===t))return!0;let a=ic(r.src);return!(!a||a!==s&&a!==t)});c?a.has(c.src)||(a.add(c.src),i.push(c)):console.warn(`[ShadowClaw] Script dependency "${e}" declared in page frontmatter was not found in approved customElements.scripts config.`)}return i}function oc(e){return!e.startsWith(`http://`)&&!e.startsWith(`https://`)&&!e.startsWith(`//`)?e.replace(/^(pages\/)?(resources\/|deps\/|main\/)?/,``):e}function sc(e){return e.replace(/&/g,`&`).replace(/"/g,`"`).replace(/</g,`<`).replace(/>/g,`>`)}function cc(e,t=sc){return!Array.isArray(e)||e.length===0?``:e.map(e=>{if(typeof e==`string`)return` <script type="module" src="${t(oc(e))}"><\/script>`;if(e&&typeof e==`object`&&e.src){let n=oc(e.src);return` <script${e.type?` type="${t(e.type)}"`:` type="module"`}${e.async?` async`:``}${e.defer?` defer`:``} src="${t(n)}"><\/script>`}return``}).filter(Boolean).join(`
|
|
90
|
+
`)}Z.use({tokenizer:{html(e){let t=e.match(/^ {0,3}<([a-zA-Z][a-zA-Z0-9]*-[a-zA-Z0-9_-]*)(?:\s+[^>]*)?>[\s\S]*?<\/\1>(?:[ \t]*(?:\n+|$))?/i)||e.match(/^ {0,3}<([a-zA-Z][a-zA-Z0-9]*-[a-zA-Z0-9_-]*)(?:\s+[^>]*)?\s*\/>(?:[ \t]*(?:\n+|$))?/i);return t?{type:`html`,block:!0,raw:t[0],text:t[0],pre:!1}:!1}}});const lc=/* @__PURE__ */ new Set([`.md`,`.markdown`,`.html`,`.htm`,`.xhtml`]),uc=new to.DOMImplementation().createDocument(null,`html`,null),dc=new to.XMLSerializer;function fc(){return[{absolutePath:null,displayPath:`index.html`,inlineContent:o},{absolutePath:null,displayPath:`MEMORY.md`,inlineContent:d}]}function pc(e){let t=(0,no.default)(e);return{data:t.data&&typeof t.data==`object`?t.data:{},content:t.content||``}}function mc(e){let t=e.match(/<template[^>]*>([\s\S]*?)<\/template>/iu);if(!t)throw Error(`Template wrapper not found while generating DSD.`);return t[1].trim()}function hc(e,t,n){let r=`br-${p.basename(t)}`;e[r]||(e[r]={});let i=n.split(`/`),a=e[r];for(let e=0;e<i.length-1;e++){let t=i[e];a[t]||(a[t]={}),a=a[t]}a.purgePreRenderedStaticPages=!0}function gc(e){let t=p.extname(e).toLowerCase();return lc.has(t)}function _c(e,t=`desc`){return[...e].sort((e,n)=>{let r=p.basename(e),i=p.basename(n),a=/^index\.(html?|xhtml)$/iu.test(r),o=/^index\.(html?|xhtml)$/iu.test(i);if(a&&!o)return-1;if(!a&&o)return 1;let s=/^memory\.(md|markdown)$/iu.test(r),c=/^memory\.(md|markdown)$/iu.test(i);return s&&!c?1:!s&&c?-1:t===`desc`?n.localeCompare(e,void 0,{numeric:!0,sensitivity:`base`}):e.localeCompare(n,void 0,{numeric:!0,sensitivity:`base`})})}async function vc(e,t=`desc`,n){let r;try{r=await A(e)}catch(e){if(e?.code===`ENOENT`)return fc();throw e}if(r.isFile()){let t=i(p.basename(e));return u(t,{allowList:n?.allowList??n?.allowlist,denyList:n?.denyList??n?.denylist,basePathPrefix:e})?[{absolutePath:e,displayPath:t}]:fc()}let a=[];async function o(t){let r=await ee(t,{withFileTypes:!0});for(let s of r){let r=p.join(t,s.name);if(s.isDirectory()){await o(r);continue}if(!s.isFile()||!gc(s.name))continue;let c=i(p.relative(e,r));if(u(c,{allowList:n?.allowList??n?.allowlist,denyList:n?.denyList??n?.denylist,basePathPrefix:e}))a.push({absolutePath:r,displayPath:c});else if(c.endsWith(`.md`))try{(await O(r,`utf8`)).includes(`slug: "shadow-claw--purge-pages"`)&&a.push({absolutePath:r,displayPath:c})}catch{}}}if(await o(e),a.length===0)return fc();let s=new Map(a.map(e=>[e.displayPath,e]));return _c(a.map(e=>e.displayPath),t).map(e=>s.get(e))}async function yc(e){try{if(!(await A(e)).isDirectory())return[]}catch(e){if(e?.code===`ENOENT`)return[];throw e}let t=[];async function n(r){let a=await ee(r,{withFileTypes:!0});for(let o of a){let a=p.join(r,o.name);if(o.isDirectory())await n(a);else if(o.isFile()){let n={absolutePath:a,displayPath:i(p.relative(e,a))};if(p.extname(o.name).toLowerCase()===`.md`)try{let e=pc(await O(a,`utf8`));e.data.slug===`shadow-claw--purge-skills`&&(n.isPurgeMarker=!0,e.data[`purge-id`]!==void 0&&(n.purgeId=String(e.data[`purge-id`])))}catch{}t.push(n)}}}return await n(e),t.sort((e,t)=>e.displayPath.localeCompare(t.displayPath))}async function bc(e){try{if(!(await A(e)).isDirectory())return[]}catch(e){if(e?.code===`ENOENT`)return[];throw e}let t=[];async function n(r){let a=await ee(r,{withFileTypes:!0});for(let o of a){let a=p.join(r,o.name);o.isDirectory()?await n(a):o.isFile()&&o.name.endsWith(`.json`)&&t.push({absolutePath:a,displayPath:i(p.relative(e,a))})}}return await n(e),t.sort((e,t)=>e.displayPath.localeCompare(t.displayPath))}async function xc(e,t,n){let r=p.extname(t).toLowerCase(),a=r===`.html`||r===`.htm`||r===`.xhtml`,o=Array.isArray(n)||n instanceof Set?n:n?.approvedScripts,s,c;if(a)s=pc(e),c=Zs(s.content,o);else try{s=pc(e),c=Zs(await Z.parse(s.content),o)}catch{s={data:{},content:e},c=`<p>${l(e)}</p>`}if(t){let e=p.posix.dirname(i(t)),n=`/files/main/${e===`.`?``:e+`/`}`;c=c.replace(/<img\s+([^>]*?)src="([^"]+)"([^>]*)>/giu,(e,t,r,i)=>/^(?:[a-z]+:|#|\/)/iu.test(r)?e:`<img ${t}src="${n}${r}"${i}>`)}return s.data&&Object.keys(s.data).length>0&&(c=`${Xs(s.data,Js,{documentInstance:uc,serializeNode:e=>dc.serializeToString(e)})}\n${c}`),c}function Sc(e,t){let n=/<\/?template\b[^>]*>/giu;n.lastIndex=t;let r=0,i=!1,a=n.exec(e);for(;a;){if(a[0].toLowerCase().startsWith(`</template`)?--r:(r+=1,i=!0),i&&r===0)return n.lastIndex;a=n.exec(e)}return-1}function Cc(e){let t=e.indexOf(`<template shadowrootmode="open" data-shadow-claw-dsd="true">`);if(t===-1)return e;let n=Sc(e,t);return n===-1?e:`${e.slice(0,t)}${e.slice(n)}`}function wc(e){return e.replace(/\s*<div\s+aria-hidden="true"\s+class="boot-shell">[\s\S]*?<\/div>\s*/iu,`
|
|
91
|
+
`)}function Tc(e){return[`<details class="pages__group-details" open>`,` <summary class="pages__group-label">`,` <span>Main</span><span class="pages__group-icon">▼</span>`,` </summary>`,` <div class="pages__group-pages">`,e.map((e,t)=>{let n=t===0,r=n?` active`:``,i=n?` is-default`:``,a=l(e.displayPath);return[` <div class="pages__list-item${r}">`,` <span class="pages__drag-handle" draggable="true" title="Drag to reorder">⠿</span>`,` <span class="pages__default-btn${i}" title="Default page">⭐</span>`,` <button type="button" class="pages__select" title="Open ${a}">`,` <span class="pages__list-path">${a}</span>`,` </button>`,` <button class="pages__edit" type="button" title="Edit in file editor" aria-label="Edit ${a} in file editor">✏️</button>`,` <button class="pages__remove" type="button" title="Remove from Pages" aria-label="Remove ${a} from Pages in Main">✕</button>`,` </div>`].join(`
|
|
91
92
|
`)}).join(`
|
|
92
93
|
`),` </div>`,`</details>`].join(`
|
|
93
|
-
`)}function
|
|
94
|
-
`)})}function
|
|
95
|
-
`)}function
|
|
96
|
-
`)}function
|
|
97
|
-
`):`${t}<template></template>${r}`})}function
|
|
98
|
-
`)}function
|
|
99
|
-
`)}function Oc(e,t){let n=e.match(/<shadow-claw\b[^>]*>/iu),r=n?n[0]:null,i=n?.index??-1;if(i===-1||!r)throw Error(`Unable to find <shadow-claw> host in index.html.`);let a=e.indexOf(`</shadow-claw>`,i);if(a===-1)throw Error(`Unable to find </shadow-claw> host in index.html.`);let o=i+r.length,s=_c(gc(e.slice(o,a))).trim(),c=s?`\n ${t}\n${s}\n `:`\n ${t}\n `;return`${e.slice(0,o)}${c}${e.slice(a)}`}function kc(e){return e.replace(/<shadow-claw(\s[^>]*)?>/iu,(e,t=``)=>/\sdata-prerender-no-seed\s*=\s*/iu.test(t)?`<shadow-claw${t}>`:`<shadow-claw${t} data-prerender-no-seed="true">`)}async function Ac(e,t){if(y.env.NODE_ENV!==`production`)return e;let n=e;try{let e=p.join(t,`index.css`),r=await O(e,`utf8`);n=n.replace(/<link\b[^>]*?href="(?:\/)?index\.css"[^>]*?>/iu,()=>`<style>${r}</style>`)}catch(e){console.warn(`Failed to inline index.css`,e.message)}try{let e=p.join(t,`theme-init.js`),r=await O(e,`utf8`);n=n.replace(/<script\b[^>]*?src="(?:\/)?theme-init\.js"[^>]*?><\/script>/iu,()=>`<script>${r}<\/script>`)}catch(e){console.warn(`Failed to inline theme-init.js`,e.message)}try{let e=p.join(t,`service-worker/init.js`),r=await O(e,`utf8`);n=n.replace(/<script\b[^>]*?src="(?:\/)?service-worker\/init\.js"[^>]*?><\/script>/iu,()=>`<script type="module">${r}<\/script>`)}catch(e){console.warn(`Failed to inline service-worker/init.js`,e.message)}return n}function jc(e){if(!e||typeof e!=`string`)return e;let t=[],n=e.replace(/<pre\b[^>]*>[\s\S]*?<\/pre>|<textarea\b[^>]*>[\s\S]*?<\/textarea>/gi,e=>{let n=t.length;return t.push(e),`___PRESERVED_BLOCK_${n}___`}),r=e=>e.replace(/\s+/g,` `).replace(/>\s+</g,`><`).trim();function i(e){let t=/<template\b[^>]*>/gi,n,a=0,o=``;for(;(n=t.exec(e))!==null;){let s=n[0],c=n.index,l=/<\/?template\b[^>]*>/gi;l.lastIndex=c;let u=0,d=!1,f=l.exec(e),p=-1,m=0;for(;f;){if(f[0].toLowerCase().startsWith(`</template`)?--u:(u+=1,d=!0),d&&u===0){p=f.index,m=f[0].length;break}f=l.exec(e)}if(p!==-1){o+=e.slice(a,c);let n=e.slice(c+s.length,p),l=r(i(n));o+=`${s}${l}</template>`,a=p+m,t.lastIndex=a}}return o+=e.slice(a),o}let a=i(n);a=a.replace(/(<template\s+shadowrootmode="?[a-z]+"?[^>]*>)([\s\S]*?)(<\/template>)/gi,(e,t,n,i)=>`${t}${r(n)}${i}`);for(let e=0;e<t.length;e++)a=a.replace(`___PRESERVED_BLOCK_${e}___`,()=>t[e]);return a}async function Mc(e={}){let t=p.resolve(e.indexPath||`dist/public/index.html`),n=p.resolve(e.sourcePath||`pages/main`),r=p.resolve(e.skillsSourcePath||p.join(p.dirname(n),`..`,`.agents`,`skills`,`main`)),i=p.resolve(e.toolsSourcePath||p.join(p.dirname(n),`..`,`.agents`,`tools`,`main`)),a=p.resolve(e.publicDir||p.dirname(t)),o=Qs(e.prerenderPages===void 0?e.noSeed?0:y.env.PRERENDER_PAGES??1:e.prerenderPages),s={},c=[e.siteConfigPath,p.resolve(`shadow-claw-config.json`),p.resolve(`shadow-claw.config.json`),p.resolve(`shadowclaw.config.json`),p.resolve(`pages/shadow-claw-config.json`),p.resolve(`pages/shadow-claw.config.json`),p.resolve(`site-config.json`),p.resolve(`pages/site-config.json`)].filter(Boolean);for(let e of c)try{let t=await O(p.resolve(e),`utf8`);s=JSON.parse(t);break}catch{}let l=e.sortOrder||s?.pages?.sortOrder||`desc`,u=p.join(a,`components/shadow-claw/shadow-claw.html`),d=p.join(a,`components/shadow-claw-pages/shadow-claw-pages.html`),f=p.join(a,`components/shadow-claw-page-header/shadow-claw-page-header.html`),m=p.join(a,`components/shadow-claw/shadow-claw.css`),h=p.join(a,`components/shadow-claw-pages/shadow-claw-pages.css`),g=p.join(a,`components/shadow-claw-page-header/shadow-claw-page-header.css`),[_,v,b,x,S,C,w,E,ee,te]=await Promise.all([O(t,`utf8`),O(u,`utf8`),O(d,`utf8`).catch(()=>``),O(f,`utf8`).catch(()=>``),dc(n,l,{allowList:s?.pages?.allowList??s?.pages?.allowlist??s?.allowList??s?.allowlist,denyList:s?.pages?.denyList??s?.pages?.denylist??s?.denyList??s?.denylist}),fc(r),pc(i),O(m,`utf8`).catch(()=>``),O(h,`utf8`).catch(()=>``),O(g,`utf8`).catch(()=>``)]),k=await Promise.all(S.map(async e=>{let t=typeof e.inlineContent==`string`?e.inlineContent:await O(e.absolutePath,`utf8`);return{...e,content:t}})),A,N={},P=k.filter(e=>{if(e.displayPath.endsWith(`.md`)&&/^---\r?\n[\s\S]*?slug:\s*"shadow-claw--purge-pages"[\s\S]*?---/mu.test(e.content)){if(cc(N,n,e.displayPath),!A){let t=oc(e.content).data[`purge-id`];t!=null&&(A=String(t))}return!1}return!0}),ne=P.map(e=>({displayPath:e.displayPath,content:e.content})),F={pages:ne},I=await Promise.all(C.filter(e=>!e.isPurgeMarker).map(async e=>({displayPath:e.displayPath,content:await O(e.absolutePath,`utf8`)})));I.length>0&&(F.skills=I);let L=await Promise.all(w.map(async e=>({displayPath:e.displayPath,content:await O(e.absolutePath,`utf8`)})));L.length>0&&(F.tools=L);let R=C.find(e=>e.isPurgeMarker);R?.purgeId&&(F.skillsPurgeId=R.purgeId),Object.keys(N).length>0&&(F.preRenderedStaticPages=N),A&&(F.purgeId=A);let z=p.join(a,`static-main-manifest.json`);await D(a,{recursive:!0}),await M(z,JSON.stringify(F,null,2),`utf8`);try{if((await j(n)).isDirectory()){let e=p.join(a,`static-main`);await D(e,{recursive:!0}),await T(n,e,{recursive:!0});let t=p.join(a,`files/main`);await D(t,{recursive:!0}),await T(n,t,{recursive:!0})}}catch{}try{(await j(i)).isDirectory()&&(await D(p.join(a,`tools/main`),{recursive:!0}),await T(i,p.join(a,`tools/main`),{recursive:!0}))}catch{}try{(await j(r)).isDirectory()&&(await D(p.join(a,`skills/main`),{recursive:!0}),await T(r,p.join(a,`skills/main`),{recursive:!0}))}catch{}let B=sc(v);if(o===0){let n=Dc(B,E,s.sidebar),r=await Ac(jc(tc(Oc(kc(_),n),JSON.stringify({pages:[],skills:[]}))),a);await M(t,r,`utf8`),(e.silent??y.env.NODE_ENV===`test`)||console.log(`Injected DSD shell into ${t} (pages DSD disabled).`);return}let re=[],V=[];o===`all`?(re=P,V=ne):typeof o==`number`&&(re=P.slice(0,o),V=ne.slice(0,o));let ie=sc(b),ae=sc(x),H;if(P.length===0)H=Ec(B,Cc(ie,ee),E,s.sidebar);else{let e=P[0],t=oc(e.content),n=t.data&&t.data.title?t.data.title:``,r=(s?.customElements?.scripts||[]).map(e=>typeof e==`string`?e:e?.src).filter(Boolean),i=await mc(e.content,e.absolutePath||e.displayPath,{approvedScripts:r});H=Ec(B,xc(ie,re,i,ae,n,ee,te),E,s.sidebar)}let oe=kc(Oc(_,H)),se={pages:V};I.length>0&&(se.skills=I),L.length>0&&(se.tools=L),R?.purgeId&&(se.skillsPurgeId=R.purgeId),Object.keys(N).length>0&&(se.preRenderedStaticPages=N),A&&(se.purgeId=A);let ce=await Ac(jc(tc(oe,JSON.stringify(se))),a);await M(t,ce,`utf8`),(e.silent??y.env.NODE_ENV===`test`)||console.log(`Injected DSD shell into ${t} from ${n} (${re.length} of ${S.length} page${S.length===1?``:`s`} prerendered).`)}async function Nc(){let e=y.argv.slice(2).filter(e=>!e.startsWith(`--`)),t=y.argv.slice(2).filter(e=>e.startsWith(`--`)),n=t.includes(`--no-seed`),r;for(let e of t)e.startsWith(`--prerender-pages=`)?r=e.slice(18):e.startsWith(`--pages=`)&&(r=e.slice(8));let[i=`dist/public/index.html`,a=`pages/main`]=e;await Mc({indexPath:i,sourcePath:a,noSeed:n,prerenderPages:r})}y.argv[1]&&p.resolve(y.argv[1])===p.resolve(v(import.meta.url))&&Nc().catch(e=>{console.error(e),y.exit(1)});function Pc(e){let t=c(e);if(t.startsWith(`pages/main/`))return t.slice(11);if(t.startsWith(`pages/br:main/`)||t.startsWith(`pages/br-main/`))return t.slice(14);if(t.startsWith(`main/`))return t.slice(5);if(t.startsWith(`pages/`)){let e=t.split(`/`);if(e.length>=3)return e.slice(2).join(`/`)}return t}function Fc(e,t){let n=`<script id="shadow-claw-static-routing" type="application/json">${a(t)}<\/script>`;return/id="shadow-claw-static-routing"/iu.test(e)?e.replace(/<script\s+id="shadow-claw-static-routing"[\s\S]*?<\/script>/iu,()=>n):ec(e,` ${n}`)}function Ic(e){let t=(e.siteTitle||``).trim(),n=e.pageTitle?s(e.pageTitle).trim():``;if(e.isHome||!n)return t;if(!t)return n;if(n.toLowerCase()===t.toLowerCase())return t;let r=e.separator==null?` - `:e.separator;r&&!r.startsWith(` `)&&!r.endsWith(` `)&&(r=` ${r} `);let i=r.trim();return RegExp(`(?:\\s*[-|—•·]\\s*|\\s+${zc(i)}\\s+)${zc(t)}$`,`i`).test(n)?n:e.titleTemplate?e.titleTemplate.replace(/%%title%%|%title%/g,n).replace(/%%sitename%%|%%site%%|%sitename%|%site%/g,t).replace(/%%sep%%|%sep%/g,i).replace(/%%sitedesc%%|%%description%%|%sitedesc%|%description%/g,(e.siteDescription||``).trim()).replace(/\s+/g,` `).trim():`${n}${r}${t}`}function Lc(e,t){if(!e)return t?.fallback||``;let n=t?.maxLength??160,r=e.replace(/^---\r?\n[\s\S]*?\r?\n---\r?\n?/mu,``);r=r.replace(/```[\s\S]*?```/gu,``),r=r.replace(/~~~[\s\S]*?~~~/gu,``),r=r.replace(/^#{1,6}\s+.*$/gmu,``),r=r.replace(/!\[.*?\]\(.*?\)/gu,``),r=r.replace(/\[([^\]]+)\]\([^)]+\)/gu,`$1`),r=r.replace(/^>\s*/gmu,``),r=r.replace(/\*\*([^*]+)\*\*/gu,`$1`),r=r.replace(/\*([^*]+)\*/gu,`$1`),r=r.replace(/__([^_]+)__/gu,`$1`),r=r.replace(/_([^_]+)_/gu,`$1`),r=r.replace(/`([^`]+)`/gu,`$1`);let i=r.split(/\r?\n\s*\r?\n/).map(e=>s(e).replace(/\s+/g,` `).trim()).filter(e=>e.length>0);if(i.length===0)return t?.fallback||``;let a=i[0];if(a.length<=n)return a;let o=a.slice(0,n),c=o.lastIndexOf(` `);return c>n*.7&&(o=o.slice(0,c)),o=o.replace(/[,;.:\-—]+$/u,``).trim(),`${o}...`}function Rc(e){let t=(e.origin||``).trim().replace(/\/+$/,``),n=(e.basePath||``).trim(),r=e.prettyPath.trim();if(r.startsWith(`/`)||(r=`/${r}`),n&&n!==`/`){let e=`/${n.replace(/^\/+|\/+$/g,``)}`;r.startsWith(e)||t.endsWith(e)||(r=`${e}${r}`)}return t?`${t}${r}`:r}function zc(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function Bc(e){let t=/<!--[\s\S]*?-->|<script\b[\s\S]*?<\/script>|<style\b[\s\S]*?<\/style>|<template\b[\s\S]*?<\/template>|<\/head>/gi,n;for(;(n=t.exec(e))!==null;)if(n[0].toLowerCase().startsWith(`</head`))return n.index;return-1}function Vc(e,t){let n=Bc(e);return n===-1?`${t}\n${e}`:`${e.slice(0,n)} ${t}\n${e.slice(n)}`}function Hc(e,t){let n=e;if(t.title){let e=l(t.title);n=/<title>[^<]*<\/title>/iu.test(n)?n.replace(/<title>[^<]*<\/title>/iu,`<title>${e}</title>`):Vc(n,`<title>${e}</title>`)}if(t.description){let e=`<meta name="description" content="${l(t.description)}" />`;n=/<meta\s+name="description"\s+content="[^"]*"\s*\/?>/iu.test(n)?n.replace(/<meta\s+name="description"\s+content="[^"]*"\s*\/?>/iu,e):Vc(n,e)}if(t.canonicalUrl){let e=`<link rel="canonical" href="${l(t.canonicalUrl)}" />`;n=/<link\s+rel="canonical"\s+href="[^"]*"\s*\/?>/iu.test(n)?n.replace(/<link\s+rel="canonical"\s+href="[^"]*"\s*\/?>/iu,e):Vc(n,e)}if(t.title){let e=`<meta property="og:title" content="${l(t.title)}" />`;n=/<meta\s+property="og:title"\s+content="[^"]*"\s*\/?>/iu.test(n)?n.replace(/<meta\s+property="og:title"\s+content="[^"]*"\s*\/?>/iu,e):Vc(n,e)}if(t.description){let e=`<meta property="og:description" content="${l(t.description)}" />`;n=/<meta\s+property="og:description"\s+content="[^"]*"\s*\/?>/iu.test(n)?n.replace(/<meta\s+property="og:description"\s+content="[^"]*"\s*\/?>/iu,e):Vc(n,e)}if(t.canonicalUrl){let e=`<meta property="og:url" content="${l(t.canonicalUrl)}" />`;n=/<meta\s+property="og:url"\s+content="[^"]*"\s*\/?>/iu.test(n)?n.replace(/<meta\s+property="og:url"\s+content="[^"]*"\s*\/?>/iu,e):Vc(n,e)}if(t.siteTitle){let e=`<meta property="og:site_name" content="${l(t.siteTitle)}" />`;n=/<meta\s+property="og:site_name"\s+content="[^"]*"\s*\/?>/iu.test(n)?n.replace(/<meta\s+property="og:site_name"\s+content="[^"]*"\s*\/?>/iu,e):Vc(n,e)}if(t.type){let e=`<meta property="og:type" content="${l(t.type)}" />`;n=/<meta\s+property="og:type"\s+content="[^"]*"\s*\/?>/iu.test(n)?n.replace(/<meta\s+property="og:type"\s+content="[^"]*"\s*\/?>/iu,e):Vc(n,e)}if(t.title){let e=`<meta name="twitter:title" content="${l(t.title)}" />`;n=/<meta\s+name="twitter:title"\s+content="[^"]*"\s*\/?>/iu.test(n)?n.replace(/<meta\s+name="twitter:title"\s+content="[^"]*"\s*\/?>/iu,e):Vc(n,e)}if(t.description){let e=`<meta name="twitter:description" content="${l(t.description)}" />`;n=/<meta\s+name="twitter:description"\s+content="[^"]*"\s*\/?>/iu.test(n)?n.replace(/<meta\s+name="twitter:description"\s+content="[^"]*"\s*\/?>/iu,e):Vc(n,e)}if(t.image){let e=l(t.image),r=`<meta property="og:image" content="${e}" />`;n=/<meta\s+property="og:image"\s+content="[^"]*"\s*\/?>/iu.test(n)?n.replace(/<meta\s+property="og:image"\s+content="[^"]*"\s*\/?>/iu,r):Vc(n,r);let i=`<meta name="twitter:image" content="${e}" />`;n=/<meta\s+name="twitter:image"\s+content="[^"]*"\s*\/?>/iu.test(n)?n.replace(/<meta\s+name="twitter:image"\s+content="[^"]*"\s*\/?>/iu,i):Vc(n,i)}return n}function Uc(e){let t=e.replace(/^---\r?\n[\s\S]*?\r?\n---\r?\n?/mu,``).match(/^#+\s+(.+)$/m);return t?t[1].trim():``}async function Wc(e={}){let t=p.resolve(e.publicDir||`dist/public`),n=p.resolve(e.routesPath||`pages/routes.json`),r=p.resolve(e.sourcePath||`pages/main`),i=p.resolve(e.indexPath||p.join(t,`index.html`)),a=e.siteConfig||{};if(!e.siteConfig){let n=[e.siteConfigPath,p.resolve(p.dirname(r),`shadow-claw.config.json`),p.resolve(p.dirname(r),`site-config.json`),p.resolve(`shadow-claw.config.json`),p.resolve(`site-config.json`),p.join(t,`shadow-claw.config.json`),p.join(t,`site-config.json`)].filter(Boolean);for(let e of n)try{let t=await O(e,`utf8`);a=JSON.parse(t);break}catch{}}let o=Qs(e.prerenderPages===void 0?y.env.PRERENDER_PAGES??1:e.prerenderPages),s;try{s=await O(n,`utf8`)}catch(e){if(e?.code===`ENOENT`)return{count:0,skipped:!0,reason:`No routes.json found`};throw e}let l;try{l=JSON.parse(s)}catch(e){return console.warn(`Failed to parse ${n}:`,e),{count:0,skipped:!0,reason:`Invalid JSON in routes.json`}}if(!l||typeof l!=`object`)return{count:0,skipped:!0,reason:`Invalid routes.json`};l.routes||(l.routes={});let d={...l.routes||{}},f=/* @__PURE__ */ new Set;async function m(e,t){if(!e.subRoutes)return;let n=Array.isArray(e.subRoutes)?e.subRoutes:Object.values(e.subRoutes);for(let e of n){let n=p.resolve(p.dirname(t),e);if(typeof e==`string`&&e.startsWith(`pages/`)&&(n=p.resolve(e)),!f.has(n)){f.add(n);try{let e=await O(n,`utf8`),t=JSON.parse(e);t.routes&&Object.assign(d,t.routes),await m(t,n)}catch(e){console.warn(`Failed to read subRoute: ${n}`,e?.message)}}}}await m(l,n),Object.assign(l.routes,d),Array.isArray(l.subRoutes)&&delete l.subRoutes;let h={allowList:a?.pages?.allowList??a?.pages?.allowlist??a?.allowList??a?.allowlist,denyList:a?.pages?.denyList??a?.pages?.denylist??a?.denyList??a?.denylist};for(let[e,t]of Object.entries(d)){let n=Pc(e);(!u(n,{...h,basePathPrefix:r})||!u(e,h)||t?.prettyPath&&!u(t.prettyPath,h))&&(delete d[e],delete l.routes[e])}let g=Object.entries(d);if(g.length===0)return{count:0,skipped:!0,reason:`Empty routes table`};let _=JSON.stringify(l,null,2),v=p.join(t,`static-routing.json`);await D(t,{recursive:!0}),await M(v,_,`utf8`);let b=JSON.stringify(l),x=p.join(t,`components/shadow-claw/shadow-claw.html`),S=p.join(t,`components/shadow-claw-pages/shadow-claw-pages.html`),C=p.join(t,`components/shadow-claw-page-header/shadow-claw-page-header.html`),w=p.join(t,`components/shadow-claw/shadow-claw.css`),E=p.join(t,`components/shadow-claw-pages/shadow-claw-pages.css`),te=p.join(t,`components/shadow-claw-page-header/shadow-claw-page-header.css`),[k,A,N,P,ne,F,I,L]=await Promise.all([O(i,`utf8`),O(x,`utf8`),O(S,`utf8`).catch(()=>``),O(C,`utf8`).catch(()=>``),dc(r,`desc`,{allowList:a?.pages?.allowList??a?.pages?.allowlist??a?.allowList??a?.allowlist,denyList:a?.pages?.denyList??a?.pages?.denylist??a?.denyList??a?.denylist}),O(w,`utf8`).catch(()=>``),O(E,`utf8`).catch(()=>``),O(te,`utf8`).catch(()=>``)]),R=(await Promise.all(ne.map(async e=>{let t=typeof e.inlineContent==`string`?e.inlineContent:await O(e.absolutePath,`utf8`);return{...e,content:t}}))).filter(e=>!(e.displayPath.endsWith(`.md`)&&/^---\r?\n[\s\S]*?slug:\s*"shadow-claw--purge-pages"[\s\S]*?---/mu.test(e.content||``))),z=await Ac(jc(Fc(k,b)),t);await M(i,z,`utf8`);let B=sc(A),re=sc(N),V=sc(P),ie=R.map(e=>({displayPath:e.displayPath,content:e.content})),ae=p.join(t,`static-main-manifest.json`),H={};try{H=JSON.parse(await O(ae,`utf8`))}catch{}let oe={pages:ie,...Array.isArray(H.skills)?{skills:H.skills}:{},...Array.isArray(H.tools)?{tools:H.tools}:{},...H.skillsPurgeId?{skillsPurgeId:H.skillsPurgeId}:{},...H.preRenderedStaticPages?{preRenderedStaticPages:H.preRenderedStaticPages}:{},...H.purgeId?{purgeId:H.purgeId}:{}};await M(ae,JSON.stringify(oe,null,2),`utf8`);try{if((await j(r)).isDirectory()){let e=p.join(t,`static-main`);await D(e,{recursive:!0}),await T(r,e,{recursive:!0});let n=p.join(t,`files/main`);await D(n,{recursive:!0}),await T(r,n,{recursive:!0})}}catch{}let se=[],ce=0;for(let[e,n]of g){if(!n||!n.prettyPath)continue;let i=Pc(e),s=R.find(e=>e.displayPath===i);if(!s)try{let e=p.join(r,i);s={absolutePath:e,displayPath:i,content:await O(e,`utf8`)}}catch{console.warn(`Could not find page file for route: ${e} (${i})`);continue}let l=R.filter(e=>e.displayPath!==s.displayPath),u=[],d=[];o===`all`?(u=[s,...l],d=u.map(e=>({displayPath:e.displayPath,content:e.content}))):typeof o==`number`&&(o===0?(u=[],d=[]):(u=[s,...l.slice(0,o-1)],d=u.map(e=>({displayPath:e.displayPath,content:e.content}))));let f=oc(s.content||``),m=f.data&&f.data.title?f.data.title:``,h=(a?.customElements?.scripts||[]).map(e=>typeof e==`string`?e:e?.src).filter(Boolean),g=await mc(s.content||``,s.displayPath,{approvedScripts:h}),_;_=o===0?Dc(B,F,a.sidebar):Ec(B,xc(re,u,g,V,m,I,L),F,a.sidebar);let v=tc(kc(Oc(k,_)),JSON.stringify({pages:d,...Array.isArray(H.skills)?{skills:H.skills}:{},...Array.isArray(H.tools)?{tools:H.tools}:{},...H.skillsPurgeId?{skillsPurgeId:H.skillsPurgeId}:{},...H.preRenderedStaticPages?{preRenderedStaticPages:H.preRenderedStaticPages}:{},...H.purgeId?{purgeId:H.purgeId}:{}})),y=c(n.prettyPath),x=y===``||y===`index.html`||n.prettyPath===`/`,S=k.match(/<base\s+href="([^"]*)"/i),C=S?S[1]:void 0,w=a?.branding?.siteUrl||void 0,E=await Ac(jc(Fc(Hc(v,{title:Ic({pageTitle:n.title||f.data?.seo_title||f.data?.seoTitle||f.data?.title||Uc(s.content||``),siteTitle:a?.site?.title||`ShadowClaw`,siteDescription:a?.site?.description,separator:a?.site?.titleSeparator??a?.site?.sep,titleTemplate:a?.site?.titleTemplate,isHome:x}),description:n.description||f.data?.seo_description||f.data?.seoDescription||f.data?.description||f.data?.excerpt||f.data?.summary||Lc(s.content||``,{fallback:a?.site?.description})||a?.site?.description,canonicalUrl:Rc({origin:w,basePath:C,prettyPath:n.prettyPath}),siteTitle:a?.site?.title||`ShadowClaw`,type:x?`website`:`article`}),b)),t),te;te=y.endsWith(`.html`)?y:p.join(y,`index.html`);let A=p.join(t,te),j=p.dirname(A);if(await D(j,{recursive:!0}),await M(A,E,`utf8`),s&&s.absolutePath)try{let e=p.dirname(s.absolutePath),t=await ee(e,{withFileTypes:!0});for(let n of t)n.isFile()&&!lc(n.name)&&n.name!==`routes.json`&&await T(p.join(e,n.name),p.join(j,n.name))}catch(t){console.warn(`Failed to copy co-located assets for ${e}:`,t)}if(se.push(te.replace(/\\/g,`/`)),!y.endsWith(`.html`)&&y.length>0){let e=`${y}.html`,n=p.join(t,e);await D(p.dirname(n),{recursive:!0}),await M(n,E,`utf8`),se.push(e.replace(/\\/g,`/`))}ce++}return(e.silent??y.env.NODE_ENV===`test`)||console.log(`Prerendered ${ce} pretty path page${ce===1?``:`s`} from ${n} (prerender-pages: ${o}).`),{count:ce,generatedPaths:se,skipped:!1}}async function Gc(){let e=y.argv.slice(2).filter(e=>!e.startsWith(`--`)),t=y.argv.slice(2).filter(e=>e.startsWith(`--`)),n;for(let e of t)e.startsWith(`--prerender-pages=`)?n=e.slice(18):e.startsWith(`--pages=`)&&(n=e.slice(8));let r=e[0]||`dist/public`;await Wc({publicDir:r,routesPath:e[1]||`pages/routes.json`,sourcePath:e[2]||`pages/main`,indexPath:e[3]||p.join(r,`index.html`),prerenderPages:n})}y.argv[1]&&p.resolve(y.argv[1])===p.resolve(v(import.meta.url))&&Gc().catch(e=>{console.error(e),y.exit(1)});const Kc=e=>e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`);function qc(e){let t=e?.routes;if(!t||typeof t!=`object`)return[];let n=/* @__PURE__ */ new Set;for(let e of Object.values(t)){let t=e?.prettyPath;typeof t==`string`&&t&&n.add(t)}return[...n]}function Jc(e,t){let n=t.endsWith(`/`)?t:`${t}/`,r=/* @__PURE__ */ new Set([n]);for(let t of qc(e))r.add(n+t.replace(/^\/+/,``));return`<?xml version="1.0" encoding="UTF-8"?>
|
|
94
|
+
`)}function Ec(e,t,n=``,r=``){return e.replace(/(<shadow-claw-page-header\b[^>]*>)([\s\S]*?)(<\/shadow-claw-page-header>)/iu,(e,i,a,o)=>{if(/^\s*<template\s+shadowrootmode=/iu.test(a))return e;let s=i.match(/\sicon="([^"]*)"/iu),c=i.match(/\stitle="([^"]*)"/iu),u=s?s[1]:``,d=c?c[1]:``;n&&(d=`${d} — ${n}`);let f=[u,d].filter(Boolean).join(` `),p=t;return p=p.replace(/<h2\s+class="header__title"><\/h2>/iu,()=>`<h2 class="header__title">${l(f)}</h2>`),p=p.replace(/<details\s+class="header__actions-disclosure">/iu,`<details class="header__actions-disclosure" hidden>`),p=p.replace(/<div\s+class="header__actions"\s+id="header-actions-panel">/iu,`<div class="header__actions" id="header-actions-panel" hidden>`),[i,`<template shadowrootmode="open" data-shadow-claw-page-header-dsd="true">`,`<style data-dsd-style>${r}</style>`,p,`</template>`,a.trim(),o].join(`
|
|
95
|
+
`)})}function Dc(e,t,n,r,i=``,a=``){let o=t.length===1?`1 saved page`:`${t.length} saved pages`,s=Tc(t),c=t[0]?.displayPath||`Select a page...`,u=e;return u=u.replace(/<div\b[^>]*\bdata-pages-status\b[^>]*><\/div>/iu,()=>`<div class="pages__status" data-pages-status>${l(o)}</div>`),u=u.replace(/<span\b[^>]*?\bdata-pages-dropdown-selected\b[^>]*>[\s\S]*?<\/span\s*>/iu,()=>`<span class="pages__dropdown-selected" data-pages-dropdown-selected>${l(c)}</span>`),u=u.replace(/<div\s+class="pages__list"\s+data-pages-list\s+role="list"><\/div>/giu,()=>`<div class="pages__list" data-pages-list role="list">\n${s}\n</div>`),u=u.replace(/<div\s+class="pages__empty"\s+data-pages-empty>/iu,()=>`<div class="pages__empty" data-pages-empty hidden>`),u=u.replace(/<div\s+class="pages__rendered"\s+data-pages-rendered\s+hidden><\/div>/iu,()=>`<div class="pages__rendered" data-pages-rendered data-initial-path="${l(c)}">${n}</div>`),Ec(u,r,i,a)}function Oc(e,t,n,r,i=``,a=``,o=``){let s=Dc(e,t,n,r,i,o);return[`<shadow-claw-pages>`,`<template shadowrootmode="open" data-shadow-claw-pages-dsd="true">`,`<style data-dsd-style>${a}</style>`,s,`</template>`,`</shadow-claw-pages>`].join(`
|
|
96
|
+
`)}function kc(e){let t=e;return t=t.replace(/<div\s+class="pages__empty"\s+data-pages-empty>[\s\S]*?<\/div>/iu,`<div class="pages__empty" data-pages-empty hidden></div>`),t}function Ac(e,t=``){let n=kc(e);return[`<shadow-claw-pages>`,`<template shadowrootmode="open" data-shadow-claw-pages-dsd="true">`,`<style data-dsd-style>${t}</style>`,n,`</template>`,`</shadow-claw-pages>`].join(`
|
|
97
|
+
`)}function jc(e){return e.replace(/(<shadow-claw-dialog\b[^>]*>)([\s\S]*?)(<\/shadow-claw-dialog>)/giu,(e,t,n,r)=>{if(/^\s*<template\b/iu.test(n))return e;let i=n.trim();return i?[t,`<template>`,i,`</template>`,r].join(`
|
|
98
|
+
`):`${t}<template></template>${r}`})}function Mc(e,t={}){let n=e;if(!t||typeof t!=`object`)return n;let r=e=>{let t=RegExp(`(<li\\s+class="[^"]*nav-item[^"]*"\\s+data-page="${e}")(?![^>]*\\bhidden\\b)([^>]*>)`,`iu`);n=n.replace(t,`$1 hidden aria-hidden="true"$2`)};return t.pagesHidden&&r(`pages`),t.chatHidden&&(r(`chat`),n=n.replace(/(<shadow-claw-conversations)(?![^>]*\bhidden\b)([^>]*>)/iu,`$1 hidden aria-hidden="true"$2`)),t.tasksHidden&&r(`tasks`),t.filesHidden&&r(`files`),n}function Nc(e,t,n=``,r={}){let i=e.replace(/<shadow-claw-pages><\/shadow-claw-pages>/iu,()=>t);i=Mc(i,r);let a=jc(i);return[`<template shadowrootmode="open" data-shadow-claw-dsd="true">`,`<style data-dsd-style>${n}</style>`,a,`</template>`].join(`
|
|
99
|
+
`)}function Pc(e,t=``,n={}){let r=e;r=r.replace(/(<li\s+class="nav-item)\s+active(\s*"\s+data-page="pages">)/iu,`$1$2`),r=r.replace(/(<div\s+class="page)\s+active("\s+data-page-id="pages">)/iu,`$1$2`),r=r.replace(/(<li\s+class="nav-item[^"]*"\s+data-page="pages")>/iu,`$1 hidden aria-hidden="true">`);let i=n?.chatHidden?n?.tasksHidden?n?.filesHidden?`chat`:`files`:`tasks`:`chat`;r=r.replace(RegExp(`(<li\\s+class="nav-item)(\\s*"\\s+data-page="${i}">)`,`iu`),`$1 active$2`),r=r.replace(RegExp(`(<div\\s+class="page\\s+${i}-page)("\\s+data-page-id="${i}">)`,`iu`),`$1 active$2`),r=Mc(r,n);let a=jc(r);return[`<template shadowrootmode="open" data-shadow-claw-dsd="true">`,`<style data-dsd-style>${t}</style>`,a,`</template>`].join(`
|
|
100
|
+
`)}function Fc(e,t){let n=e.match(/<shadow-claw\b[^>]*>/iu),r=n?n[0]:null,i=n?.index??-1;if(i===-1||!r)throw Error(`Unable to find <shadow-claw> host in index.html.`);let a=e.indexOf(`</shadow-claw>`,i);if(a===-1)throw Error(`Unable to find </shadow-claw> host in index.html.`);let o=i+r.length,s=wc(Cc(e.slice(o,a))).trim(),c=s?`\n ${t}\n${s}\n `:`\n ${t}\n `;return`${e.slice(0,o)}${c}${e.slice(a)}`}function Ic(e){return e.replace(/<shadow-claw(\s[^>]*)?>/iu,(e,t=``)=>/\sdata-prerender-no-seed\s*=\s*/iu.test(t)?`<shadow-claw${t}>`:`<shadow-claw${t} data-prerender-no-seed="true">`)}async function Lc(e,t){if(y.env.NODE_ENV!==`production`)return e;let n=e;try{let e=p.join(t,`index.css`),r=await O(e,`utf8`);n=n.replace(/<link\b[^>]*?href="(?:\/)?index\.css"[^>]*?>/iu,()=>`<style>${r}</style>`)}catch(e){console.warn(`Failed to inline index.css`,e.message)}try{let e=p.join(t,`theme-init.js`),r=await O(e,`utf8`);n=n.replace(/<script\b[^>]*?src="(?:\/)?theme-init\.js"[^>]*?><\/script>/iu,()=>`<script>${r}<\/script>`)}catch(e){console.warn(`Failed to inline theme-init.js`,e.message)}try{let e=p.join(t,`service-worker/init.js`),r=await O(e,`utf8`);n=n.replace(/<script\b[^>]*?src="(?:\/)?service-worker\/init\.js"[^>]*?><\/script>/iu,()=>`<script type="module">${r}<\/script>`)}catch(e){console.warn(`Failed to inline service-worker/init.js`,e.message)}return n}function Rc(e){if(!e||typeof e!=`string`)return e;let t=[],n=e.replace(/<pre\b[^>]*>[\s\S]*?<\/pre>|<textarea\b[^>]*>[\s\S]*?<\/textarea>/gi,e=>{let n=t.length;return t.push(e),`___PRESERVED_BLOCK_${n}___`}),r=e=>e.replace(/\s+/g,` `).replace(/>\s+</g,`><`).trim();function i(e){let t=/<template\b[^>]*>/gi,n,a=0,o=``;for(;(n=t.exec(e))!==null;){let s=n[0],c=n.index,l=/<\/?template\b[^>]*>/gi;l.lastIndex=c;let u=0,d=!1,f=l.exec(e),p=-1,m=0;for(;f;){if(f[0].toLowerCase().startsWith(`</template`)?--u:(u+=1,d=!0),d&&u===0){p=f.index,m=f[0].length;break}f=l.exec(e)}if(p!==-1){o+=e.slice(a,c);let n=e.slice(c+s.length,p),l=r(i(n));o+=`${s}${l}</template>`,a=p+m,t.lastIndex=a}}return o+=e.slice(a),o}let a=i(n);a=a.replace(/(<template\s+shadowrootmode="?[a-z]+"?[^>]*>)([\s\S]*?)(<\/template>)/gi,(e,t,n,i)=>`${t}${r(n)}${i}`);for(let e=0;e<t.length;e++)a=a.replace(`___PRESERVED_BLOCK_${e}___`,()=>t[e]);return a}async function zc(e={}){let t=p.resolve(e.indexPath||`dist/public/index.html`),n=p.resolve(e.sourcePath||`pages/main`),r=p.resolve(e.skillsSourcePath||p.join(p.dirname(n),`..`,`.agents`,`skills`,`main`)),i=p.resolve(e.toolsSourcePath||p.join(p.dirname(n),`..`,`.agents`,`tools`,`main`)),a=p.resolve(e.publicDir||p.dirname(t)),o=Qs(e.prerenderPages===void 0?e.noSeed?0:y.env.PRERENDER_PAGES??1:e.prerenderPages),s={},c=[e.siteConfigPath,p.resolve(`shadow-claw-config.json`),p.resolve(`shadow-claw.config.json`),p.resolve(`shadowclaw.config.json`),p.resolve(`pages/shadow-claw-config.json`),p.resolve(`pages/shadow-claw.config.json`),p.resolve(`site-config.json`),p.resolve(`pages/site-config.json`)].filter(Boolean);for(let e of c)try{let t=await O(p.resolve(e),`utf8`);s=JSON.parse(t);break}catch{}let l=e.sortOrder||s?.pages?.sortOrder||`desc`,u=p.join(a,`components/shadow-claw/shadow-claw.html`),d=p.join(a,`components/shadow-claw-pages/shadow-claw-pages.html`),f=p.join(a,`components/shadow-claw-page-header/shadow-claw-page-header.html`),m=p.join(a,`components/shadow-claw/shadow-claw.css`),h=p.join(a,`components/shadow-claw-pages/shadow-claw-pages.css`),g=p.join(a,`components/shadow-claw-page-header/shadow-claw-page-header.css`),[_,v,b,x,S,C,w,E,ee,te]=await Promise.all([O(t,`utf8`),O(u,`utf8`),O(d,`utf8`).catch(()=>``),O(f,`utf8`).catch(()=>``),vc(n,l,{allowList:s?.pages?.allowList??s?.pages?.allowlist??s?.allowList??s?.allowlist,denyList:s?.pages?.denyList??s?.pages?.denylist??s?.denyList??s?.denylist}),yc(r),bc(i),O(m,`utf8`).catch(()=>``),O(h,`utf8`).catch(()=>``),O(g,`utf8`).catch(()=>``)]),ne=await Promise.all(S.map(async e=>{let t=typeof e.inlineContent==`string`?e.inlineContent:await O(e.absolutePath,`utf8`);return{...e,content:t}})),k,M={},N=ne.filter(e=>{if(e.displayPath.endsWith(`.md`)&&/^---\r?\n[\s\S]*?slug:\s*"shadow-claw--purge-pages"[\s\S]*?---/mu.test(e.content)){if(hc(M,n,e.displayPath),!k){let t=pc(e.content).data[`purge-id`];t!=null&&(k=String(t))}return!1}return!0}),P=N.map(e=>({displayPath:e.displayPath,content:e.content})),F={pages:P},I=await Promise.all(C.filter(e=>!e.isPurgeMarker).map(async e=>({displayPath:e.displayPath,content:await O(e.absolutePath,`utf8`)})));I.length>0&&(F.skills=I);let L=await Promise.all(w.map(async e=>({displayPath:e.displayPath,content:await O(e.absolutePath,`utf8`)})));L.length>0&&(F.tools=L);let R=C.find(e=>e.isPurgeMarker);R?.purgeId&&(F.skillsPurgeId=R.purgeId),Object.keys(M).length>0&&(F.preRenderedStaticPages=M),k&&(F.purgeId=k);let z=p.join(a,`static-main-manifest.json`);await D(a,{recursive:!0}),await j(z,JSON.stringify(F,null,2),`utf8`);try{if((await A(n)).isDirectory()){let e=p.join(a,`static-main`);await D(e,{recursive:!0}),await T(n,e,{recursive:!0});let t=p.join(a,`files/main`);await D(t,{recursive:!0}),await T(n,t,{recursive:!0})}}catch{}try{(await A(i)).isDirectory()&&(await D(p.join(a,`tools/main`),{recursive:!0}),await T(i,p.join(a,`tools/main`),{recursive:!0}))}catch{}try{(await A(r)).isDirectory()&&(await D(p.join(a,`skills/main`),{recursive:!0}),await T(r,p.join(a,`skills/main`),{recursive:!0}))}catch{}let B=mc(v);if(o===0){let n=Pc(B,E,s.sidebar),r=await Lc(Rc(tc(Fc(Ic(_),n),JSON.stringify({pages:[],skills:[]}))),a);await j(t,r,`utf8`),(e.silent??y.env.NODE_ENV===`test`)||console.log(`Injected DSD shell into ${t} (pages DSD disabled).`);return}let re=[],V=[];o===`all`?(re=N,V=P):typeof o==`number`&&(re=N.slice(0,o),V=P.slice(0,o));let ie=mc(b),ae=mc(x),H;if(N.length===0)H=Nc(B,Ac(ie,ee),E,s.sidebar);else{let e=N[0],t=pc(e.content),n=t.data&&t.data.title?t.data.title:``,r=(s?.customElements?.scripts||[]).map(e=>typeof e==`string`?e:e?.src).filter(Boolean),i=await xc(e.content,e.absolutePath||e.displayPath,{approvedScripts:r});H=Nc(B,Oc(ie,re,i,ae,n,ee,te),E,s.sidebar)}let oe=Ic(Fc(_,H)),se={pages:V};I.length>0&&(se.skills=I),L.length>0&&(se.tools=L),R?.purgeId&&(se.skillsPurgeId=R.purgeId),Object.keys(M).length>0&&(se.preRenderedStaticPages=M),k&&(se.purgeId=k);let ce=tc(oe,JSON.stringify(se)),le=ac(s?.customElements?.scripts||[],(N[0]?.content?pc(N[0].content):{data:{}}).data,N[0]?.content),U=ce;if(le.length>0){let e=U.match(/<head[^>]*>([\s\S]*?)<\/head>/i),t=e?e[1]:``,n=le.filter(e=>!t.includes(`src="${e.src}"`)&&!t.includes(`src='${e.src}'`));if(n.length>0){let e=cc(n);U=ec(U,` ${e.trim()}`)}}let ue=await Lc(Rc(U),a);await j(t,ue,`utf8`),(e.silent??y.env.NODE_ENV===`test`)||console.log(`Injected DSD shell into ${t} from ${n} (${re.length} of ${S.length} page${S.length===1?``:`s`} prerendered).`)}async function Bc(){let e=y.argv.slice(2).filter(e=>!e.startsWith(`--`)),t=y.argv.slice(2).filter(e=>e.startsWith(`--`)),n=t.includes(`--no-seed`),r;for(let e of t)e.startsWith(`--prerender-pages=`)?r=e.slice(18):e.startsWith(`--pages=`)&&(r=e.slice(8));let[i=`dist/public/index.html`,a=`pages/main`]=e;await zc({indexPath:i,sourcePath:a,noSeed:n,prerenderPages:r})}y.argv[1]&&p.resolve(y.argv[1])===p.resolve(v(import.meta.url))&&Bc().catch(e=>{console.error(e),y.exit(1)});function Vc(e){let t=c(e);if(t.startsWith(`pages/main/`))return t.slice(11);if(t.startsWith(`pages/br:main/`)||t.startsWith(`pages/br-main/`))return t.slice(14);if(t.startsWith(`main/`))return t.slice(5);if(t.startsWith(`pages/`)){let e=t.split(`/`);if(e.length>=3)return e.slice(2).join(`/`)}return t}function Hc(e,t){let n=`<script id="shadow-claw-static-routing" type="application/json">${a(t)}<\/script>`;return/id="shadow-claw-static-routing"/iu.test(e)?e.replace(/<script\s+id="shadow-claw-static-routing"[\s\S]*?<\/script>/iu,()=>n):ec(e,` ${n}`)}function Uc(e){let t=(e.siteTitle||``).trim(),n=e.pageTitle?s(e.pageTitle).trim():``;if(e.isHome||!n)return t;if(!t)return n;if(n.toLowerCase()===t.toLowerCase())return t;let r=e.separator==null?` - `:e.separator;r&&!r.startsWith(` `)&&!r.endsWith(` `)&&(r=` ${r} `);let i=r.trim();return RegExp(`(?:\\s*[-|—•·]\\s*|\\s+${Kc(i)}\\s+)${Kc(t)}$`,`i`).test(n)?n:e.titleTemplate?e.titleTemplate.replace(/%%title%%|%title%/g,n).replace(/%%sitename%%|%%site%%|%sitename%|%site%/g,t).replace(/%%sep%%|%sep%/g,i).replace(/%%sitedesc%%|%%description%%|%sitedesc%|%description%/g,(e.siteDescription||``).trim()).replace(/\s+/g,` `).trim():`${n}${r}${t}`}function Wc(e,t){if(!e)return t?.fallback||``;let n=t?.maxLength??160,r=e.replace(/^---\r?\n[\s\S]*?\r?\n---\r?\n?/mu,``);r=r.replace(/```[\s\S]*?```/gu,``),r=r.replace(/~~~[\s\S]*?~~~/gu,``),r=r.replace(/^#{1,6}\s+.*$/gmu,``),r=r.replace(/!\[.*?\]\(.*?\)/gu,``),r=r.replace(/\[([^\]]+)\]\([^)]+\)/gu,`$1`),r=r.replace(/^>\s*/gmu,``),r=r.replace(/\*\*([^*]+)\*\*/gu,`$1`),r=r.replace(/\*([^*]+)\*/gu,`$1`),r=r.replace(/__([^_]+)__/gu,`$1`),r=r.replace(/_([^_]+)_/gu,`$1`),r=r.replace(/`([^`]+)`/gu,`$1`);let i=r.split(/\r?\n\s*\r?\n/).map(e=>s(e).replace(/\s+/g,` `).trim()).filter(e=>e.length>0);if(i.length===0)return t?.fallback||``;let a=i[0];if(a.length<=n)return a;let o=a.slice(0,n),c=o.lastIndexOf(` `);return c>n*.7&&(o=o.slice(0,c)),o=o.replace(/[,;.:\-—]+$/u,``).trim(),`${o}...`}function Gc(e){let t=(e.origin||``).trim().replace(/\/+$/,``),n=(e.basePath||``).trim(),r=e.prettyPath.trim();if(r.startsWith(`/`)||(r=`/${r}`),n&&n!==`/`){let e=`/${n.replace(/^\/+|\/+$/g,``)}`;r.startsWith(e)||t.endsWith(e)||(r=`${e}${r}`)}return t?`${t}${r}`:r}function Kc(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function qc(e){let t=/<!--[\s\S]*?-->|<script\b[\s\S]*?<\/script>|<style\b[\s\S]*?<\/style>|<template\b[\s\S]*?<\/template>|<\/head>/gi,n;for(;(n=t.exec(e))!==null;)if(n[0].toLowerCase().startsWith(`</head`))return n.index;return-1}function Jc(e,t){let n=qc(e);return n===-1?`${t}\n${e}`:`${e.slice(0,n)} ${t}\n${e.slice(n)}`}function Yc(e,t){let n=e;if(t.title){let e=l(t.title);n=/<title>[^<]*<\/title>/iu.test(n)?n.replace(/<title>[^<]*<\/title>/iu,`<title>${e}</title>`):Jc(n,`<title>${e}</title>`)}if(t.description){let e=`<meta name="description" content="${l(t.description)}" />`;n=/<meta\s+name="description"\s+content="[^"]*"\s*\/?>/iu.test(n)?n.replace(/<meta\s+name="description"\s+content="[^"]*"\s*\/?>/iu,e):Jc(n,e)}if(t.canonicalUrl){let e=`<link rel="canonical" href="${l(t.canonicalUrl)}" />`;n=/<link\s+rel="canonical"\s+href="[^"]*"\s*\/?>/iu.test(n)?n.replace(/<link\s+rel="canonical"\s+href="[^"]*"\s*\/?>/iu,e):Jc(n,e)}if(t.title){let e=`<meta property="og:title" content="${l(t.title)}" />`;n=/<meta\s+property="og:title"\s+content="[^"]*"\s*\/?>/iu.test(n)?n.replace(/<meta\s+property="og:title"\s+content="[^"]*"\s*\/?>/iu,e):Jc(n,e)}if(t.description){let e=`<meta property="og:description" content="${l(t.description)}" />`;n=/<meta\s+property="og:description"\s+content="[^"]*"\s*\/?>/iu.test(n)?n.replace(/<meta\s+property="og:description"\s+content="[^"]*"\s*\/?>/iu,e):Jc(n,e)}if(t.canonicalUrl){let e=`<meta property="og:url" content="${l(t.canonicalUrl)}" />`;n=/<meta\s+property="og:url"\s+content="[^"]*"\s*\/?>/iu.test(n)?n.replace(/<meta\s+property="og:url"\s+content="[^"]*"\s*\/?>/iu,e):Jc(n,e)}if(t.siteTitle){let e=`<meta property="og:site_name" content="${l(t.siteTitle)}" />`;n=/<meta\s+property="og:site_name"\s+content="[^"]*"\s*\/?>/iu.test(n)?n.replace(/<meta\s+property="og:site_name"\s+content="[^"]*"\s*\/?>/iu,e):Jc(n,e)}if(t.type){let e=`<meta property="og:type" content="${l(t.type)}" />`;n=/<meta\s+property="og:type"\s+content="[^"]*"\s*\/?>/iu.test(n)?n.replace(/<meta\s+property="og:type"\s+content="[^"]*"\s*\/?>/iu,e):Jc(n,e)}if(t.title){let e=`<meta name="twitter:title" content="${l(t.title)}" />`;n=/<meta\s+name="twitter:title"\s+content="[^"]*"\s*\/?>/iu.test(n)?n.replace(/<meta\s+name="twitter:title"\s+content="[^"]*"\s*\/?>/iu,e):Jc(n,e)}if(t.description){let e=`<meta name="twitter:description" content="${l(t.description)}" />`;n=/<meta\s+name="twitter:description"\s+content="[^"]*"\s*\/?>/iu.test(n)?n.replace(/<meta\s+name="twitter:description"\s+content="[^"]*"\s*\/?>/iu,e):Jc(n,e)}if(t.image){let e=l(t.image),r=`<meta property="og:image" content="${e}" />`;n=/<meta\s+property="og:image"\s+content="[^"]*"\s*\/?>/iu.test(n)?n.replace(/<meta\s+property="og:image"\s+content="[^"]*"\s*\/?>/iu,r):Jc(n,r);let i=`<meta name="twitter:image" content="${e}" />`;n=/<meta\s+name="twitter:image"\s+content="[^"]*"\s*\/?>/iu.test(n)?n.replace(/<meta\s+name="twitter:image"\s+content="[^"]*"\s*\/?>/iu,i):Jc(n,i)}return n}function Xc(e){let t=e.replace(/^---\r?\n[\s\S]*?\r?\n---\r?\n?/mu,``).match(/^#+\s+(.+)$/m);return t?t[1].trim():``}async function Zc(e={}){let t=p.resolve(e.publicDir||`dist/public`),n=p.resolve(e.routesPath||`pages/routes.json`),r=p.resolve(e.sourcePath||`pages/main`),i=p.resolve(e.indexPath||p.join(t,`index.html`)),a=e.siteConfig||{};if(!e.siteConfig){let n=[e.siteConfigPath,p.resolve(p.dirname(r),`shadow-claw.config.json`),p.resolve(p.dirname(r),`site-config.json`),p.resolve(`shadow-claw.config.json`),p.resolve(`site-config.json`),p.join(t,`shadow-claw.config.json`),p.join(t,`site-config.json`)].filter(Boolean);for(let e of n)try{let t=await O(e,`utf8`);a=JSON.parse(t);break}catch{}}let o=Qs(e.prerenderPages===void 0?y.env.PRERENDER_PAGES??1:e.prerenderPages),s;try{s=await O(n,`utf8`)}catch(e){if(e?.code===`ENOENT`)return{count:0,skipped:!0,reason:`No routes.json found`};throw e}let l;try{l=JSON.parse(s)}catch(e){return console.warn(`Failed to parse ${n}:`,e),{count:0,skipped:!0,reason:`Invalid JSON in routes.json`}}if(!l||typeof l!=`object`)return{count:0,skipped:!0,reason:`Invalid routes.json`};l.routes||(l.routes={});let d={...l.routes||{}},f=/* @__PURE__ */ new Set;async function m(e,t){if(!e.subRoutes)return;let n=Array.isArray(e.subRoutes)?e.subRoutes:Object.values(e.subRoutes);for(let e of n){let n=p.resolve(p.dirname(t),e);if(typeof e==`string`&&e.startsWith(`pages/`)&&(n=p.resolve(e)),!f.has(n)){f.add(n);try{let e=await O(n,`utf8`),t=JSON.parse(e);t.routes&&Object.assign(d,t.routes),await m(t,n)}catch(e){console.warn(`Failed to read subRoute: ${n}`,e?.message)}}}}await m(l,n),Object.assign(l.routes,d),Array.isArray(l.subRoutes)&&delete l.subRoutes;let h={allowList:a?.pages?.allowList??a?.pages?.allowlist??a?.allowList??a?.allowlist,denyList:a?.pages?.denyList??a?.pages?.denylist??a?.denyList??a?.denylist};for(let[e,t]of Object.entries(d)){let n=Vc(e);(!u(n,{...h,basePathPrefix:r})||!u(e,h)||t?.prettyPath&&!u(t.prettyPath,h))&&(delete d[e],delete l.routes[e])}let g=Object.entries(d);if(g.length===0)return{count:0,skipped:!0,reason:`Empty routes table`};let _=JSON.stringify(l,null,2),v=p.join(t,`static-routing.json`);await D(t,{recursive:!0}),await j(v,_,`utf8`);let b=JSON.stringify(l),x=p.join(t,`components/shadow-claw/shadow-claw.html`),S=p.join(t,`components/shadow-claw-pages/shadow-claw-pages.html`),C=p.join(t,`components/shadow-claw-page-header/shadow-claw-page-header.html`),w=p.join(t,`components/shadow-claw/shadow-claw.css`),E=p.join(t,`components/shadow-claw-pages/shadow-claw-pages.css`),te=p.join(t,`components/shadow-claw-page-header/shadow-claw-page-header.css`),[ne,k,M,N,P,F,I,L]=await Promise.all([O(i,`utf8`),O(x,`utf8`),O(S,`utf8`).catch(()=>``),O(C,`utf8`).catch(()=>``),vc(r,`desc`,{allowList:a?.pages?.allowList??a?.pages?.allowlist??a?.allowList??a?.allowlist,denyList:a?.pages?.denyList??a?.pages?.denylist??a?.denyList??a?.denylist}),O(w,`utf8`).catch(()=>``),O(E,`utf8`).catch(()=>``),O(te,`utf8`).catch(()=>``)]),R=(await Promise.all(P.map(async e=>{let t=typeof e.inlineContent==`string`?e.inlineContent:await O(e.absolutePath,`utf8`);return{...e,content:t}}))).filter(e=>!(e.displayPath.endsWith(`.md`)&&/^---\r?\n[\s\S]*?slug:\s*"shadow-claw--purge-pages"[\s\S]*?---/mu.test(e.content||``))),z=await Lc(Rc(Hc(ne,b)),t);await j(i,z,`utf8`);let B=mc(k),re=mc(M),V=mc(N),ie=R.map(e=>({displayPath:e.displayPath,content:e.content})),ae=p.join(t,`static-main-manifest.json`),H={};try{H=JSON.parse(await O(ae,`utf8`))}catch{}let oe={pages:ie,...Array.isArray(H.skills)?{skills:H.skills}:{},...Array.isArray(H.tools)?{tools:H.tools}:{},...H.skillsPurgeId?{skillsPurgeId:H.skillsPurgeId}:{},...H.preRenderedStaticPages?{preRenderedStaticPages:H.preRenderedStaticPages}:{},...H.purgeId?{purgeId:H.purgeId}:{}};await j(ae,JSON.stringify(oe,null,2),`utf8`);try{if((await A(r)).isDirectory()){let e=p.join(t,`static-main`);await D(e,{recursive:!0}),await T(r,e,{recursive:!0});let n=p.join(t,`files/main`);await D(n,{recursive:!0}),await T(r,n,{recursive:!0})}}catch{}let se=[],ce=0;for(let[e,n]of g){if(!n||!n.prettyPath)continue;let i=Vc(e),s=R.find(e=>e.displayPath===i);if(!s)try{let e=p.join(r,i);s={absolutePath:e,displayPath:i,content:await O(e,`utf8`)}}catch{console.warn(`Could not find page file for route: ${e} (${i})`);continue}let l=R.filter(e=>e.displayPath!==s.displayPath),u=[],d=[];o===`all`?(u=[s,...l],d=u.map(e=>({displayPath:e.displayPath,content:e.content}))):typeof o==`number`&&(o===0?(u=[],d=[]):(u=[s,...l.slice(0,o-1)],d=u.map(e=>({displayPath:e.displayPath,content:e.content}))));let f=pc(s.content||``),m=f.data&&f.data.title?f.data.title:``,h=(a?.customElements?.scripts||[]).map(e=>typeof e==`string`?e:e?.src).filter(Boolean),g=await xc(s.content||``,s.displayPath,{approvedScripts:h}),_;_=o===0?Pc(B,F,a.sidebar):Nc(B,Oc(re,u,g,V,m,I,L),F,a.sidebar);let v=tc(Ic(Fc(ne,_)),JSON.stringify({pages:d,...Array.isArray(H.skills)?{skills:H.skills}:{},...Array.isArray(H.tools)?{tools:H.tools}:{},...H.skillsPurgeId?{skillsPurgeId:H.skillsPurgeId}:{},...H.preRenderedStaticPages?{preRenderedStaticPages:H.preRenderedStaticPages}:{},...H.purgeId?{purgeId:H.purgeId}:{}})),y=c(n.prettyPath),x=y===``||y===`index.html`||n.prettyPath===`/`,S=ne.match(/<base\s+href="([^"]*)"/i),C=S?S[1]:void 0,w=a?.branding?.siteUrl||void 0,E=Yc(v,{title:Uc({pageTitle:n.title||f.data?.seo_title||f.data?.seoTitle||f.data?.title||Xc(s.content||``),siteTitle:a?.site?.title||`ShadowClaw`,siteDescription:a?.site?.description,separator:a?.site?.titleSeparator??a?.site?.sep,titleTemplate:a?.site?.titleTemplate,isHome:x}),description:n.description||f.data?.seo_description||f.data?.seoDescription||f.data?.description||f.data?.excerpt||f.data?.summary||Wc(s.content||``,{fallback:a?.site?.description})||a?.site?.description,canonicalUrl:Gc({origin:w,basePath:C,prettyPath:n.prettyPath}),siteTitle:a?.site?.title||`ShadowClaw`,type:x?`website`:`article`}),te=ac(a?.customElements?.scripts||[],f.data,s.content),k=E;if(te.length>0){let e=k.match(/<head[^>]*>([\s\S]*?)<\/head>/i),t=e?e[1]:``,n=te.filter(e=>!t.includes(`src="${e.src}"`)&&!t.includes(`src='${e.src}'`));if(n.length>0){let e=cc(n);k=ec(k,` ${e.trim()}`)}}let A=await Lc(Rc(Hc(k,b)),t),M;M=y.endsWith(`.html`)?y:p.join(y,`index.html`);let N=p.join(t,M),P=p.dirname(N);if(await D(P,{recursive:!0}),await j(N,A,`utf8`),s&&s.absolutePath)try{let e=p.dirname(s.absolutePath),t=await ee(e,{withFileTypes:!0});for(let n of t)n.isFile()&&!gc(n.name)&&n.name!==`routes.json`&&await T(p.join(e,n.name),p.join(P,n.name))}catch(t){console.warn(`Failed to copy co-located assets for ${e}:`,t)}if(se.push(M.replace(/\\/g,`/`)),!y.endsWith(`.html`)&&y.length>0){let e=`${y}.html`,n=p.join(t,e);await D(p.dirname(n),{recursive:!0}),await j(n,A,`utf8`),se.push(e.replace(/\\/g,`/`))}ce++}return(e.silent??y.env.NODE_ENV===`test`)||console.log(`Prerendered ${ce} pretty path page${ce===1?``:`s`} from ${n} (prerender-pages: ${o}).`),{count:ce,generatedPaths:se,skipped:!1}}async function Qc(){let e=y.argv.slice(2).filter(e=>!e.startsWith(`--`)),t=y.argv.slice(2).filter(e=>e.startsWith(`--`)),n;for(let e of t)e.startsWith(`--prerender-pages=`)?n=e.slice(18):e.startsWith(`--pages=`)&&(n=e.slice(8));let r=e[0]||`dist/public`;await Zc({publicDir:r,routesPath:e[1]||`pages/routes.json`,sourcePath:e[2]||`pages/main`,indexPath:e[3]||p.join(r,`index.html`),prerenderPages:n})}y.argv[1]&&p.resolve(y.argv[1])===p.resolve(v(import.meta.url))&&Qc().catch(e=>{console.error(e),y.exit(1)});const $c=e=>e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`);function el(e){let t=e?.routes;if(!t||typeof t!=`object`)return[];let n=/* @__PURE__ */ new Set;for(let e of Object.values(t)){let t=e?.prettyPath;typeof t==`string`&&t&&n.add(t)}return[...n]}function tl(e,t){let n=t.endsWith(`/`)?t:`${t}/`,r=/* @__PURE__ */ new Set([n]);for(let t of el(e))r.add(n+t.replace(/^\/+/,``));return`<?xml version="1.0" encoding="UTF-8"?>
|
|
100
101
|
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
|
101
|
-
${[...r].map(e=>` <url>\n <loc>${
|
|
102
|
+
${[...r].map(e=>` <url>\n <loc>${$c(e)}</loc>\n </url>`).join(`
|
|
102
103
|
`)}
|
|
103
104
|
</urlset>
|
|
104
|
-
`}function
|
|
105
|
+
`}function nl(e={},t={}){let n=e.customElements;return{rawScripts:(typeof n==`object`&&!Array.isArray(n)?n.scripts:n)||e.scripts||t.scripts||[],allowedDomains:(typeof n==`object`&&!Array.isArray(n)?n.allowedDomains:void 0)||e.allowedCustomElementDomains||[]}}function rl(e,t){if(!e.startsWith(`http://`)&&!e.startsWith(`https://`)&&!e.startsWith(`//`)||!t||Array.isArray(t)&&t.length===0)return!0;try{let n=new URL(e,`https://localhost`).hostname.toLowerCase();return(Array.isArray(t)?t:String(t).split(/[\n,]+/)).some(e=>{let t=e.trim().toLowerCase();return n===t||n.endsWith(`.`+t)||t===`*`})}catch{return!1}}function il(e,t){let n=JSON.parse(JSON.stringify(e));return n.customElements&&typeof n.customElements==`object`&&Array.isArray(n.customElements.scripts)&&(n.customElements.scripts=n.customElements.scripts.filter(e=>{let n=typeof e==`string`?e:e?.src;return n?rl(n,t):!1})),n}function Q(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`)}const al=[`pages/resources/`,`pages/deps/`,`resources/`,`deps/`,`pages/assets/`,`pages/main/assets/`];function ol(e){for(let t of al)if(e.startsWith(t))return e.slice(t.length);return e}async function sl(e){try{return JSON.parse(await O(e,`utf8`))}catch{return null}}async function cl(e){try{return await O(e,`utf8`)}catch{return null}}async function ll(e,t){await j(e,t,`utf8`)}function ul(e){return!Array.isArray(e)||e.length===0?``:`<nav slot="sidebar" class="sidebar-custom-sections" aria-label="Site Navigation">\n${e.map((e,t)=>{if(e.html)return e.html;let n=e.title?`sidebar-${e.title.toLowerCase().replace(/[^a-z0-9]+/g,`-`)}`:`sidebar-section-${t+1}`,r=e.headerHref?`<a href="${Q(e.headerHref)}" class="sidebar-link">${Q(e.title||``)}</a>`:`<span>${Q(e.title||``)}</span>`,i=e.title?` <div class="sidebar-section-header">${r}</div>`:``,a=(e.items||[]).map(e=>{let t=e.title||e.label||``,n=e.href||`#`,r=e.target?` target="${Q(e.target)}"`:``,i=e.rel?` rel="${Q(e.rel)}"`:e.target===`_blank`?` rel="noopener noreferrer"`:``,a=e.active?` active`:``,o=e.active?` aria-current="page"`:``;return` <div class="sidebar-item"><a href="${Q(n)}"${r}${i} class="sidebar-link${a}"${o}>${Q(t)}</a></div>`}).join(`
|
|
105
106
|
`);return[` <section class="sidebar-section" id="${n}">`,i,a,` </section>`].filter(Boolean).join(`
|
|
106
107
|
`)}).join(`
|
|
107
|
-
`)}\n</nav>`}function
|
|
108
|
+
`)}\n</nav>`}function dl(e,t,n){let r=e,i=t.site||{};i.title&&(r=r.replace(/<title>[^<]*<\/title>/iu,`<title>${Q(i.title)}</title>`)),i.description&&(r=r.replace(/<meta\s+name="description"\s+content="[^"]*"\s*\/?>/iu,`<meta name="description" content="${Q(i.description)}" />`)),i.themeColor&&(r=r.replace(/<meta\s+name="theme-color"\s+content="[^"]*"\s*\/?>/iu,`<meta name="theme-color" content="${Q(i.themeColor)}" />`)),i.lang&&(r=r.replace(/<html\s+lang="[^"]*"/iu,`<html lang="${i.lang}"`));let a=t.branding||{};if(a.faviconPath){let e=a.faviconPath.replace(/^pages\/main\//,``),t=e.endsWith(`.svg`)?`image/svg+xml`:e.endsWith(`.png`)?`image/png`:`image/x-icon`,n=`<link href="${Q(e)}" rel="icon" type="${t}" />`,i=!1;r=r.replace(/<link\b[^>]*\brel=["']?(?:shortcut\s+)?icon["']?[^>]*\/?>/giu,()=>i?``:(i=!0,n)),i||(r=ec(r,` ${n}`))}if(a.appleTouchIconPath){let e=`<link href="${Q(a.appleTouchIconPath.replace(/^pages\/main\//,``))}" rel="apple-touch-icon" />`,t=!1;r=r.replace(/<link\b[^>]*\brel=["']?apple-touch-icon["']?[^>]*\/?>/giu,()=>t?``:(t=!0,e)),t||(r=ec(r,` ${e}`))}if(a.titleText||a.siteUrl||a.logoSlotHtml!==void 0){let e=a.siteUrl||``;r=r.replace(/<a\b([^>]*\bslot="header-title-link"[^>]*)>([\s\S]*?)<\/a>/iu,(n,r,i)=>{let o=``;if(a.logoSlotHtml!==void 0){let e=typeof a.logoSlotHtml==`string`?a.logoSlotHtml.trim():``;e!==``&&e.toLowerCase()!==`none`&&(o=a.logoSlotHtml)}else{let e=i.match(/<svg\b[\s\S]*?<\/svg>/iu)||i.match(/<img\b[^>]*\bclass="[^"]*header-title-logo[^"]*"[^>]*\/?>/iu);e&&(o=e[0])}let s=i.match(/<(h1|span)\b[^>]*\bclass="[^"]*header-title[^"]*"[^>]*>([\s\S]*?)<\/\1>/iu),c=s?s[1]:/<h1\b/i.test(i)?`h1`:`span`,l=s?s[2].trim():`ShadowClaw`,u=a.titleText||t.site?.title||l;return[`<a`,` aria-label="${Q(u)}"`,` class="header-title-link"`,e?` href="${Q(e)}"`:``,` slot="header-title-link"`,` >`,o?` ${o.trim()}`:``,` <${c} class="header-title">${Q(u)}</${c}>`,` </a>`].filter(Boolean).join(`
|
|
108
109
|
`)})}if(a.repoUrl){let e=a.repoLabel||`Project on GitHub`;r=r.replace(/<a\b[^>]*\bslot="header-actions-logo"[^>]*>[\s\S]*?<\/a>/iu,[`<a`,` aria-label="${Q(e)}"`,` class="header-actions-logo-link"`,` href="${Q(a.repoUrl)}"`,` slot="header-actions-logo"`,` >`,` <svg aria-hidden="true" focusable="false" viewBox="0 0 496 512" xmlns="http://www.w3.org/2000/svg">`,` <path d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8z" fill="var(--shadow-claw-bg-primary-reverse, currentColor)"></path>`,` </svg>`,` </a>`].join(`
|
|
109
110
|
`))}a.siteUrl&&!a.siteUrl.includes(`xt-ml.github.io`)&&(r=r.replace(/\s*<meta\s+http-equiv="origin-trial"\s+content="[^"]*"\s*\/?>\s*/iu,`
|
|
110
|
-
`));let o=t.theme||{};if(o.stylesheet){let e
|
|
111
|
+
`));let o=t.theme||{};if(o.stylesheet){let e=ol(o.stylesheet),t=`<link rel="stylesheet" href="${Q(e)}" />`,n=Q(e).replace(/[.*+?^${}()|[\]\\]/g,`\\$&`),i=e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`),a=RegExp(`<link\\s+[^>]*href=["'](?:${i}|${n})["'][^>]*>`,`iu`),s=$s(r),c=(s===-1?r:r.slice(0,s)).replace(/<script\b[\s\S]*?<\/script>/gi,``);a.test(c)||(r=/<link\s+rel="stylesheet"\s+href="index\.css"\s*\/?>/iu.test(r)?r.replace(/(<link\s+rel="stylesheet"\s+href="index\.css"\s*\/?>)/iu,`$1\n ${t}`):ec(r,` ${t}`))}let{allowedDomains:s}=nl(t,o),c=il(t,s),l=`<script id="shadow-claw-site-config" type="application/json">${JSON.stringify(c).replace(/</g,`\\u003c`).replace(/>/g,`\\u003e`).replace(/\//g,`\\u002f`)}<\/script>`;r=r.includes(`<script id="shadow-claw-site-config"`)?r.replace(/<script\s+id="shadow-claw-site-config"[\s\S]*?<\/script>/iu,()=>l):r.includes(`<script src="theme-init.js">`)?r.replace(`<script src="theme-init.js">`,`${l}\n <script src="theme-init.js">`):/<script\b[^>]*>\s*var\s+ShadowClawThemeInit\b/iu.test(r)?r.replace(/(<script\b[^>]*>\s*var\s+ShadowClawThemeInit\b)/iu,`${l}\n $1`):ec(r,` ${l}`),r=r.replace(/\s*<meta\s+name="shadow-claw-override-prerender-skeleton"[^>]*>/giu,``),typeof t.settings?.overridePrerenderSkeleton==`boolean`&&(r=r.replace(`<script id="shadow-claw-site-config"`,`<meta name="shadow-claw-override-prerender-skeleton" content="${t.settings.overridePrerenderSkeleton}" />\n <script id="shadow-claw-site-config"`));let u=n||t.sidebar?.slotHtml||(t.sidebar?.sections?ul(t.sidebar.sections):``);if(u){let e=u.trim();/\bslot="sidebar(?:-nav|-content|-footer)?"/iu.test(e)||(e=`<div slot="sidebar" class="sidebar-custom-sections">\n${e}\n</div>`);let t=r.match(/<[^>]+?\bslot="sidebar(?:-nav|-content|-footer)?"[^>]*>[\s\S]*?<\/[^>]+>/iu);t&&(r=r.replace(t[0],``)),r.includes(`</shadow-claw>`)?r=r.replace(`</shadow-claw>`,` ${e}\n</shadow-claw>`):r.includes(`<shadow-claw></shadow-claw>`)&&(r=r.replace(`<shadow-claw></shadow-claw>`,`<shadow-claw>\n ${e}\n</shadow-claw>`))}return t.sidebar&&(r=Mc(r,t.sidebar)),r}function fl(e){let t=(e.src||``).replace(/^(pages\/)?(resources\/|deps\/|main\/)?/,``),n=e.type||(t.endsWith(`.svg`)?`image/svg+xml`:t.endsWith(`.png`)?`image/png`:`image/x-icon`),r=(e.purpose||`any`).trim();return n===`image/svg+xml`||t.endsWith(`.svg`)?[{...e,src:t,type:n,purpose:`any`}]:r.includes(`any`)&&r.includes(`maskable`)?[{...e,src:t,type:n,purpose:`any`},{...e,src:t,type:n,purpose:`maskable`}]:[{...e,src:t,type:n,purpose:r}]}function pl(e,t){let n=typeof e==`string`?JSON.parse(e):e,r=t.pwa||{},i=t.site||{},a=y.env.PAGES_ORIGIN;if((r.name||i.title)&&(n.name=r.name||i.title),(r.shortName||i.title)&&(n.short_name=r.shortName||i.title),i.description&&(n.description=i.description),r.backgroundColor&&(n.background_color=r.backgroundColor),(r.themeColor||i.themeColor)&&(n.theme_color=r.themeColor||i.themeColor),r.startUrl?n.start_url=r.startUrl:a?n.start_url=a:n.start_url||=`./`,r.icons&&Array.isArray(r.icons)){let e=r.icons.flatMap(fl),t=Array.isArray(n.icons)?n.icons.flatMap(fl):[],i=new Set(e.map(e=>e.src));n.icons=[...e,...t.filter(e=>!i.has(e.src))]}else Array.isArray(n.icons)&&(n.icons=n.icons.flatMap(fl));return r.screenshots&&Array.isArray(r.screenshots)&&(n.screenshots=r.screenshots.map(e=>{let t=(e.src||``).replace(/^(pages\/)?(resources\/|deps\/|main\/)?/,``);return{...e,src:t}})),JSON.stringify(n,null,2)}function ml(e,t){if(!t)return e;let n=t.endsWith(`/`)?t:t+`/`;return/<loc>/i.test(e)?e.replace(/<loc>([^<]*)<\/loc>/giu,(e,t)=>{try{let e=new URL(t.trim()),r=new URL(n),i=r.pathname.replace(/\/$/,``);return`<loc>${Q(r.origin+i+e.pathname+e.search)}</loc>`}catch{return`<loc>${Q(n)}</loc>`}}):e.split(`
|
|
111
112
|
`).map(e=>{let t=e.trim();if(!t)return e;if(t.startsWith(`http://`)||t.startsWith(`https://`))try{let e=new URL(t),r=new URL(n);return e.protocol=r.protocol,e.host=r.host,e.pathname=(r.pathname.endsWith(`/`)?r.pathname.slice(0,-1):r.pathname)+e.pathname,e.toString()}catch{return n}if(t.startsWith(`/`))try{return new URL(t,n).toString()}catch{return e}return e}).join(`
|
|
112
|
-
`)}function cl(e,t,n){let r=e,i=t.site||{};if(i.title&&(r=r.replace(/<title>[^<]*<\/title>/iu,`<title>${Q(i.title)} - Not Found</title>`)),n){let e=n.endsWith(`/`)?n:n+`/`;r=r.replace(/l\.replace\(["']\/shadow-claw\/["']\)/gu,`l.replace("${Q(e)}")`)}return r}function ll(e){let t=p.resolve(e),n=t.split(p.sep),r=n[n.length-1],i=n[n.length-2];return(r===`resources`||r===`deps`)&&i===`pages`?p.resolve(t,`../..`):r===`resources`||r===`deps`||r===`pages`?p.resolve(t,`..`):t}function ul(e){let t=p.resolve(e),n=p.basename(t);return n===`resources`||n===`deps`||n===`pages`?p.resolve(t,`..`):t}function dl(e,t,n){if(!e||typeof e!=`string`)return[];if(p.isAbsolute(e))return[e];let r=e.replace(/^(pages\/)?(resources\/|deps\/|main\/)?/,``),i=ll(t);return[p.resolve(t,`resources`,r),p.resolve(t,`deps`,r),p.resolve(t,`main`,r),p.resolve(i,`pages`,`resources`,r),p.resolve(i,`pages`,`resources`,e),p.resolve(i,`pages`,`deps`,r),p.resolve(i,`pages`,`deps`,e),p.resolve(i,`resources`,r),p.resolve(i,`resources`,e),p.resolve(i,`deps`,r),p.resolve(i,`deps`,e),p.resolve(n,`pages`,`resources`,r),p.resolve(n,`pages`,`deps`,r),p.resolve(n,`resources`,r),p.resolve(n,`deps`,r),p.resolve(n,`pages`,e),p.resolve(n,`pages`,r),p.resolve(n,`pages`,`main`,r),p.resolve(i,`pages`,e),p.resolve(i,`pages`,r),p.resolve(i,`pages`,`main`,r),p.resolve(i,`pages`,`main`,e),p.resolve(t,e),p.resolve(t,r),p.resolve(n,e),p.resolve(n,r),p.resolve(i,e),p.resolve(i,r)]}async function fl(e,t,n){if(!n)return null;let r=await pl([...Ga(e),...Ga(t),...Ga(ll(e))]);if(!r)return null;let i=await el(r);return i?Jc(i,n):null}async function pl(e){for(let t of e)if(t)try{return await j(t),t}catch{}return null}async function ml(e,t,n){let r=n?p.dirname(p.resolve(n)):y.cwd(),i=ul(r),a=ll(r),o=[p.resolve(r,`resources`),p.resolve(r,`deps`),p.resolve(i,`resources`),p.resolve(i,`deps`),p.resolve(i,`pages`,`resources`),p.resolve(i,`pages`,`deps`),p.resolve(a,`resources`),p.resolve(a,`deps`),p.resolve(a,`pages`,`resources`),p.resolve(a,`pages`,`deps`)];for(let e of o)try{let n=await ee(e,{withFileTypes:!0});for(let r of n){let n=p.join(e,r.name),i=p.join(t,r.name);r.isDirectory()?await T(n,i,{recursive:!0,force:!0}):r.isFile()&&(await D(p.dirname(i),{recursive:!0}),await w(n,i))}}catch{}let s=await pl([...e.pages?.notFoundPath?dl(e.pages.notFoundPath,r,i):[],...e.branding?.notFoundPath?dl(e.branding.notFoundPath,r,i):[],...e.notFoundPath?dl(e.notFoundPath,r,i):[],...dl(`404.html`,r,i)]);if(s)try{await w(s,p.join(t,`404.html`)),console.log(` Copied custom 404.html: ${s}`)}catch(e){console.warn(` Warning: Could not copy custom 404.html: ${e.message}`)}let c=await pl([...e.pwa?.manifestPath?dl(e.pwa.manifestPath,r,i):[],...e.manifestPath?dl(e.manifestPath,r,i):[],...dl(`manifest.json`,r,i)]);if(c)try{await w(c,p.join(t,`manifest.json`)),console.log(` Copied custom manifest.json: ${c}`)}catch(e){console.warn(` Warning: Could not copy custom manifest.json: ${e.message}`)}let l=!1;if(e.sitemapPath){let n=await pl(dl(e.sitemapPath,r,i));if(n)try{let e=p.basename(n);await w(n,p.join(t,e)),console.log(` Copied custom sitemap: ${n} → ${e}`),l=!0}catch(e){console.warn(` Warning: Could not copy custom sitemap: ${e.message}`)}}if(!l){let e=await pl(dl(`sitemap.xml`,r,i));if(e)try{await w(e,p.join(t,`sitemap.xml`)),console.log(` Copied custom sitemap.xml: ${e}`)}catch(e){console.warn(` Warning: Could not copy custom sitemap.xml: ${e.message}`)}let n=await pl(dl(`sitemap.txt`,r,i));if(n)try{await w(n,p.join(t,`sitemap.txt`)),console.log(` Copied custom sitemap.txt: ${n}`)}catch(e){console.warn(` Warning: Could not copy custom sitemap.txt: ${e.message}`)}}let u=e.overwriteAssets===!0||e.branding?.overwriteAssets===!0,d=Array.isArray(e.assets)?e.assets:[e.assetsDir,e.assets].filter(Boolean),f=Array.from(new Set([...d.flatMap(e=>dl(e,r,i)),...dl(`assets`,r,i)].filter(e=>e&&typeof e==`string`))),m=p.join(t,`assets`);if(u)try{await A(m,{recursive:!0,force:!0}),await D(m,{recursive:!0}),console.log(` Cleared dist public assets for complete template asset overwrite.`)}catch{}let h=/* @__PURE__ */ new Set,g=[...f].reverse();for(let e of g)if(!h.has(e))try{let t=await j(e);if(h.add(e),t.isDirectory())await T(e,m,{recursive:!0,force:!0}),console.log(` Copied custom assets: ${e} → ${m}`);else if(t.isFile()){let t=p.basename(e);await D(m,{recursive:!0}),await w(e,p.join(m,t)),console.log(` Copied custom asset file: ${e} → ${m}`)}}catch{}}async function hl(e,t,n){let r=e.theme||{};if(!r.stylesheet)return;let i=n?p.dirname(p.resolve(n)):y.cwd(),a=ul(i),o=await pl(dl(r.stylesheet,i,a));if(!o)return;let s=r.stylesheet.replace(/^(pages\/)?(resources\/|deps\/|main\/)?/,``),c=p.join(t,s);try{await D(p.dirname(c),{recursive:!0}),await w(o,c),console.log(` Copied theme stylesheet: ${o} → ${c}`)}catch(e){console.warn(` Warning: Could not copy theme stylesheet ${o}: ${e.message}`)}}async function gl(e,t,n){let r=(e.customElements&&typeof e.customElements==`object`&&!Array.isArray(e.customElements)?e.customElements?.scripts:void 0)||e.scripts||[];if(!Array.isArray(r)||r.length===0)return;let i=n?p.dirname(p.resolve(n)):y.cwd(),a=ul(i);for(let e of r){let n=typeof e==`string`?e:e?.src;if(!n||n.startsWith(`http://`)||n.startsWith(`https://`)||n.startsWith(`//`))continue;let r=await pl(dl(n,i,a));if(r){let e=n.replace(/^(pages\/)?(resources\/|deps\/|main\/)?/,``),i=p.join(t,e);try{await D(p.dirname(i),{recursive:!0}),await w(r,i),console.log(` Copied custom script: ${r} → ${i}`)}catch(e){console.warn(` Warning: Could not copy custom script ${r}: ${e.message}`)}}}}async function _l(e,t,n){let r=e.branding||{},i=e.pwa||{},a=n?p.dirname(p.resolve(n)):y.cwd(),o=ul(a),s=[],c=await pl(dl(i.manifestPath||e.manifestPath||`manifest.json`,a,o));if(c){let e=await el(c);e&&Array.isArray(e.icons)&&(s=e.icons.map(e=>e?.src).filter(Boolean))}let l=[r.faviconPath,r.appleTouchIconPath,`assets/icons/favicon.svg`,`assets/icons/favicon.ico`,`favicon.svg`,`favicon.ico`,`pages/resources/assets/icons/favicon.svg`,`pages/resources/assets/icons/favicon.ico`,`pages/resources/favicon.svg`,`pages/deps/favicon.svg`,`pages/main/favicon.svg`,...Array.isArray(i.icons)?i.icons.map(e=>e.src):[],...s].filter(e=>!!e&&typeof e==`string`&&!e.startsWith(`http://`)&&!e.startsWith(`https://`)&&!e.startsWith(`//`));if(l.length===0)return;let u=/* @__PURE__ */ new Set,d=/* @__PURE__ */ new Set;for(let e of l){if(u.has(e))continue;u.add(e);let n=await pl(dl(e,a,o));if(n){let r=e.replace(/^(pages\/)?(resources\/|deps\/|main\/)?/,``),i=p.join(t,r);if(d.has(i))continue;d.add(i);try{await D(p.dirname(i),{recursive:!0}),await w(n,i),console.log(` Copied branding asset: ${n} → ${i}`)}catch(e){console.warn(` Warning: Could not copy branding asset ${n}: ${e.message}`)}}}}async function vl(e,t){let n=await el(t);if(!n)return console.log(`No site-config.json found — skipping site configuration.`),{applied:!1};console.log(`Applying site-config.json...`);let r=y.env.PAGES_ORIGIN||``,i=y.env.PAGES_BASE_PATH||``;await ml(n,e,t);let a=t?p.dirname(p.resolve(t)):y.cwd(),o=ul(a),s;if(n.sidebar?.slotHtml)s=n.sidebar.slotHtml;else if(n.sidebar?.sections)s=rl(n.sidebar.sections);else{let e=await pl([n.sidebar?.slotPath,`pages/main/sidebar.html`,`pages/sidebar.html`,`sidebar.html`,`resources/sidebar.html`].filter(Boolean).flatMap(e=>dl(e,a,o)));e&&(s=await tl(e)??void 0,console.log(` Found slotted sidebar: ${e}`))}let c=p.join(e,`index.html`),l=await tl(c);l&&(await nl(c,il(l,n,s)),console.log(` Patched index.html`));let u=p.join(e,`manifest.json`),d=await tl(u);d&&(await nl(u,ol(d,n)),console.log(` Patched manifest.json`));let f=p.join(e,`sitemap.xml`),m=!!await tl(p.join(e,`sitemap.txt`)),h=!1;if(!await tl(f)&&!m){let e=await fl(a,o,r||n.branding?.siteUrl||``);e&&(await nl(f,e),h=!0,console.log(` Generated sitemap.xml from routes.json`))}let g=h?``:await tl(f);g&&(await nl(f,sl(g,r)),console.log(` Patched sitemap.xml`));let _=p.join(e,`sitemap.txt`),v=await tl(_);v&&(await nl(_,sl(v,r)),console.log(` Patched sitemap.txt`));let b=p.join(e,`404.html`),x=await tl(b);return x&&(await nl(b,cl(x,n,i)),console.log(` Patched 404.html`)),await hl(n,e,t),await gl(n,e,t),await _l(n,e,t),console.log(`Site configuration applied successfully.`),{applied:!0}}async function yl(){let[e,t]=y.argv.slice(2);(!e||!t)&&(console.error(`Usage: node bin/site-config/apply.mjs <distPublicDir> <siteConfigPath>`),y.exit(1)),await vl(e,t)}y.argv[1]&&p.resolve(y.argv[1])===p.resolve(v(import.meta.url))&&yl().catch(e=>{console.error(`site-config/apply.ts failed:`,e),y.exit(1)});function bl(){return[`const shadowClawServiceWorkerTrustedTypesFactory = Reflect.get(self, "trustedTypes");`,`let shadowClawServiceWorkerTrustedTypesPolicy = null;`,`if (shadowClawServiceWorkerTrustedTypesFactory && typeof shadowClawServiceWorkerTrustedTypesFactory.createPolicy === "function") {`,` try {`,` if (typeof shadowClawServiceWorkerTrustedTypesFactory.getPolicy === "function") {`,` shadowClawServiceWorkerTrustedTypesPolicy =`,` shadowClawServiceWorkerTrustedTypesFactory.getPolicy("default") ||`,` shadowClawServiceWorkerTrustedTypesFactory.getPolicy("shadowclaw-sandbox") ||`,` null;`,` }`,``,` if (!shadowClawServiceWorkerTrustedTypesPolicy) {`,` shadowClawServiceWorkerTrustedTypesPolicy =`,` shadowClawServiceWorkerTrustedTypesFactory.createPolicy("default", {`,` createHTML: (input) => input,`,` createScriptURL: (input) => input,`,` });`,` }`,` } catch {`,` // Ignore policy creation failures and fall back to raw importScripts.`,` }`,`}`,``,`const shadowClawNativeImportScripts = typeof importScripts === "function" ? importScripts.bind(self) : null;`,``,`const shadowClawImportScripts = (...urls) => {`,` if (!shadowClawNativeImportScripts) {`,` return;`,` }`,``,` if (!shadowClawServiceWorkerTrustedTypesPolicy || typeof shadowClawServiceWorkerTrustedTypesPolicy.createScriptURL !== "function") {`,` shadowClawNativeImportScripts(...urls);`,``,` return;`,` }`,``,` shadowClawNativeImportScripts(...urls.map((url) => shadowClawServiceWorkerTrustedTypesPolicy.createScriptURL(url)));`,`};`].join(`
|
|
113
|
-
`)}function
|
|
114
|
-
`,`utf8`))}catch{}}}}catch{}if(s){r(`Running production post-build steps...`);let t=e.pagesOrigin||x.PAGES_ORIGIN,n=e.basePath||(x.PAGES_BASE_PATH??`/shadow-claw/`);if(r(` PAGES_ORIGIN : ${t||`(relative ./)`}`),r(` PAGES_BASE_PATH: ${n}`),t)try{let e=`dist/public/manifest.json`,n=await O(e,`utf8`),r=JSON.parse(n);r.start_url&&(r.start_url=t,await
|
|
115
|
-
`,`utf8`))}catch{}}}await
|
|
113
|
+
`)}function hl(e,t,n){let r=e,i=t.site||{};if(i.title&&(r=r.replace(/<title>[^<]*<\/title>/iu,`<title>${Q(i.title)} - Not Found</title>`)),n){let e=n.endsWith(`/`)?n:n+`/`;r=r.replace(/l\.replace\(["']\/shadow-claw\/["']\)/gu,`l.replace("${Q(e)}")`)}return r}function gl(e){let t=p.resolve(e),n=t.split(p.sep),r=n[n.length-1],i=n[n.length-2];return(r===`resources`||r===`deps`)&&i===`pages`?p.resolve(t,`../..`):r===`resources`||r===`deps`||r===`pages`?p.resolve(t,`..`):t}function _l(e){let t=p.resolve(e),n=p.basename(t);return n===`resources`||n===`deps`||n===`pages`?p.resolve(t,`..`):t}function vl(e,t,n){if(!e||typeof e!=`string`)return[];if(p.isAbsolute(e))return[e];let r=e.replace(/^(pages\/)?(resources\/|deps\/|main\/)?/,``),i=gl(t);return[p.resolve(t,`resources`,r),p.resolve(t,`deps`,r),p.resolve(t,`main`,r),p.resolve(i,`pages`,`resources`,r),p.resolve(i,`pages`,`resources`,e),p.resolve(i,`pages`,`deps`,r),p.resolve(i,`pages`,`deps`,e),p.resolve(i,`resources`,r),p.resolve(i,`resources`,e),p.resolve(i,`deps`,r),p.resolve(i,`deps`,e),p.resolve(n,`pages`,`resources`,r),p.resolve(n,`pages`,`deps`,r),p.resolve(n,`resources`,r),p.resolve(n,`deps`,r),p.resolve(n,`pages`,e),p.resolve(n,`pages`,r),p.resolve(n,`pages`,`main`,r),p.resolve(i,`pages`,e),p.resolve(i,`pages`,r),p.resolve(i,`pages`,`main`,r),p.resolve(i,`pages`,`main`,e),p.resolve(t,e),p.resolve(t,r),p.resolve(n,e),p.resolve(n,r),p.resolve(i,e),p.resolve(i,r)]}async function yl(e,t,n){if(!n)return null;let r=await bl([...Ga(e),...Ga(t),...Ga(gl(e))]);if(!r)return null;let i=await sl(r);return i?tl(i,n):null}async function bl(e){for(let t of e)if(t)try{return await A(t),t}catch{}return null}async function xl(e,t,n){let r=n?p.dirname(p.resolve(n)):y.cwd(),i=_l(r),a=gl(r),o=[p.resolve(r,`resources`),p.resolve(r,`deps`),p.resolve(i,`resources`),p.resolve(i,`deps`),p.resolve(i,`pages`,`resources`),p.resolve(i,`pages`,`deps`),p.resolve(a,`resources`),p.resolve(a,`deps`),p.resolve(a,`pages`,`resources`),p.resolve(a,`pages`,`deps`)];for(let e of o)try{let n=await ee(e,{withFileTypes:!0});for(let r of n){let n=p.join(e,r.name),i=p.join(t,r.name);r.isDirectory()?await T(n,i,{recursive:!0,force:!0}):r.isFile()&&(await D(p.dirname(i),{recursive:!0}),await w(n,i))}}catch{}let s=await bl([...e.pages?.notFoundPath?vl(e.pages.notFoundPath,r,i):[],...e.branding?.notFoundPath?vl(e.branding.notFoundPath,r,i):[],...e.notFoundPath?vl(e.notFoundPath,r,i):[],...vl(`404.html`,r,i)]);if(s)try{await w(s,p.join(t,`404.html`)),console.log(` Copied custom 404.html: ${s}`)}catch(e){console.warn(` Warning: Could not copy custom 404.html: ${e.message}`)}let c=await bl([...e.pwa?.manifestPath?vl(e.pwa.manifestPath,r,i):[],...e.manifestPath?vl(e.manifestPath,r,i):[],...vl(`manifest.json`,r,i)]);if(c)try{await w(c,p.join(t,`manifest.json`)),console.log(` Copied custom manifest.json: ${c}`)}catch(e){console.warn(` Warning: Could not copy custom manifest.json: ${e.message}`)}let l=!1;if(e.sitemapPath){let n=await bl(vl(e.sitemapPath,r,i));if(n)try{let e=p.basename(n);await w(n,p.join(t,e)),console.log(` Copied custom sitemap: ${n} → ${e}`),l=!0}catch(e){console.warn(` Warning: Could not copy custom sitemap: ${e.message}`)}}if(!l){let e=await bl(vl(`sitemap.xml`,r,i));if(e)try{await w(e,p.join(t,`sitemap.xml`)),console.log(` Copied custom sitemap.xml: ${e}`)}catch(e){console.warn(` Warning: Could not copy custom sitemap.xml: ${e.message}`)}let n=await bl(vl(`sitemap.txt`,r,i));if(n)try{await w(n,p.join(t,`sitemap.txt`)),console.log(` Copied custom sitemap.txt: ${n}`)}catch(e){console.warn(` Warning: Could not copy custom sitemap.txt: ${e.message}`)}}let u=e.overwriteAssets===!0||e.branding?.overwriteAssets===!0,d=Array.isArray(e.assets)?e.assets:[e.assetsDir,e.assets].filter(Boolean),f=Array.from(new Set([...d.flatMap(e=>vl(e,r,i)),...vl(`assets`,r,i)].filter(e=>e&&typeof e==`string`))),m=p.join(t,`assets`);if(u)try{await k(m,{recursive:!0,force:!0}),await D(m,{recursive:!0}),console.log(` Cleared dist public assets for complete template asset overwrite.`)}catch{}let h=/* @__PURE__ */ new Set,g=[...f].reverse();for(let e of g)if(!h.has(e))try{let t=await A(e);if(h.add(e),t.isDirectory())await T(e,m,{recursive:!0,force:!0}),console.log(` Copied custom assets: ${e} → ${m}`);else if(t.isFile()){let t=p.basename(e);await D(m,{recursive:!0}),await w(e,p.join(m,t)),console.log(` Copied custom asset file: ${e} → ${m}`)}}catch{}}async function Sl(e,t,n){let r=e.theme||{};if(!r.stylesheet)return;let i=n?p.dirname(p.resolve(n)):y.cwd(),a=_l(i),o=await bl(vl(r.stylesheet,i,a));if(!o)return;let s=r.stylesheet.replace(/^(pages\/)?(resources\/|deps\/|main\/)?/,``),c=p.join(t,s);try{await D(p.dirname(c),{recursive:!0}),await w(o,c),console.log(` Copied theme stylesheet: ${o} → ${c}`)}catch(e){console.warn(` Warning: Could not copy theme stylesheet ${o}: ${e.message}`)}}async function Cl(e,t,n){let r=(e.customElements&&typeof e.customElements==`object`&&!Array.isArray(e.customElements)?e.customElements?.scripts:void 0)||e.scripts||[];if(!Array.isArray(r)||r.length===0)return;let i=n?p.dirname(p.resolve(n)):y.cwd(),a=_l(i);for(let e of r){let n=typeof e==`string`?e:e?.src;if(!n||n.startsWith(`http://`)||n.startsWith(`https://`)||n.startsWith(`//`))continue;let r=await bl(vl(n,i,a));if(r){let e=n.replace(/^(pages\/)?(resources\/|deps\/|main\/)?/,``),i=p.join(t,e);try{await D(p.dirname(i),{recursive:!0}),await w(r,i),console.log(` Copied custom script: ${r} → ${i}`)}catch(e){console.warn(` Warning: Could not copy custom script ${r}: ${e.message}`)}}}}async function wl(e,t,n){let r=e.branding||{},i=e.pwa||{},a=n?p.dirname(p.resolve(n)):y.cwd(),o=_l(a),s=[],c=await bl(vl(i.manifestPath||e.manifestPath||`manifest.json`,a,o));if(c){let e=await sl(c);e&&Array.isArray(e.icons)&&(s=e.icons.map(e=>e?.src).filter(Boolean))}let l=[r.faviconPath,r.appleTouchIconPath,`assets/icons/favicon.svg`,`assets/icons/favicon.ico`,`favicon.svg`,`favicon.ico`,`pages/resources/assets/icons/favicon.svg`,`pages/resources/assets/icons/favicon.ico`,`pages/resources/favicon.svg`,`pages/deps/favicon.svg`,`pages/main/favicon.svg`,...Array.isArray(i.icons)?i.icons.map(e=>e.src):[],...s].filter(e=>!!e&&typeof e==`string`&&!e.startsWith(`http://`)&&!e.startsWith(`https://`)&&!e.startsWith(`//`));if(l.length===0)return;let u=/* @__PURE__ */ new Set,d=/* @__PURE__ */ new Set;for(let e of l){if(u.has(e))continue;u.add(e);let n=await bl(vl(e,a,o));if(n){let r=e.replace(/^(pages\/)?(resources\/|deps\/|main\/)?/,``),i=p.join(t,r);if(d.has(i))continue;d.add(i);try{await D(p.dirname(i),{recursive:!0}),await w(n,i),console.log(` Copied branding asset: ${n} → ${i}`)}catch(e){console.warn(` Warning: Could not copy branding asset ${n}: ${e.message}`)}}}}async function Tl(e,t){let n=await sl(t);if(!n)return console.log(`No site-config.json found — skipping site configuration.`),{applied:!1};console.log(`Applying site-config.json...`);let r=y.env.PAGES_ORIGIN||``,i=y.env.PAGES_BASE_PATH||``;await xl(n,e,t);let a=t?p.dirname(p.resolve(t)):y.cwd(),o=_l(a),s;if(n.sidebar?.slotHtml)s=n.sidebar.slotHtml;else if(n.sidebar?.sections)s=ul(n.sidebar.sections);else{let e=await bl([n.sidebar?.slotPath,`pages/main/sidebar.html`,`pages/sidebar.html`,`sidebar.html`,`resources/sidebar.html`].filter(Boolean).flatMap(e=>vl(e,a,o)));e&&(s=await cl(e)??void 0,console.log(` Found slotted sidebar: ${e}`))}let c=p.join(e,`index.html`),l=await cl(c);l&&(await ll(c,dl(l,n,s)),console.log(` Patched index.html`));let u=p.join(e,`manifest.json`),d=await cl(u);d&&(await ll(u,pl(d,n)),console.log(` Patched manifest.json`));let f=p.join(e,`sitemap.xml`),m=!!await cl(p.join(e,`sitemap.txt`)),h=!1;if(!await cl(f)&&!m){let e=await yl(a,o,r||n.branding?.siteUrl||``);e&&(await ll(f,e),h=!0,console.log(` Generated sitemap.xml from routes.json`))}let g=h?``:await cl(f);g&&(await ll(f,ml(g,r)),console.log(` Patched sitemap.xml`));let _=p.join(e,`sitemap.txt`),v=await cl(_);v&&(await ll(_,ml(v,r)),console.log(` Patched sitemap.txt`));let b=p.join(e,`404.html`),x=await cl(b);return x&&(await ll(b,hl(x,n,i)),console.log(` Patched 404.html`)),await Sl(n,e,t),await Cl(n,e,t),await wl(n,e,t),console.log(`Site configuration applied successfully.`),{applied:!0}}async function El(){let[e,t]=y.argv.slice(2);(!e||!t)&&(console.error(`Usage: node bin/site-config/apply.mjs <distPublicDir> <siteConfigPath>`),y.exit(1)),await Tl(e,t)}y.argv[1]&&p.resolve(y.argv[1])===p.resolve(v(import.meta.url))&&El().catch(e=>{console.error(`site-config/apply.ts failed:`,e),y.exit(1)});function Dl(){return[`const shadowClawServiceWorkerTrustedTypesFactory = Reflect.get(self, "trustedTypes");`,`let shadowClawServiceWorkerTrustedTypesPolicy = null;`,`if (shadowClawServiceWorkerTrustedTypesFactory && typeof shadowClawServiceWorkerTrustedTypesFactory.createPolicy === "function") {`,` try {`,` if (typeof shadowClawServiceWorkerTrustedTypesFactory.getPolicy === "function") {`,` shadowClawServiceWorkerTrustedTypesPolicy =`,` shadowClawServiceWorkerTrustedTypesFactory.getPolicy("default") ||`,` shadowClawServiceWorkerTrustedTypesFactory.getPolicy("shadowclaw-sandbox") ||`,` null;`,` }`,``,` if (!shadowClawServiceWorkerTrustedTypesPolicy) {`,` shadowClawServiceWorkerTrustedTypesPolicy =`,` shadowClawServiceWorkerTrustedTypesFactory.createPolicy("default", {`,` createHTML: (input) => input,`,` createScriptURL: (input) => input,`,` });`,` }`,` } catch {`,` // Ignore policy creation failures and fall back to raw importScripts.`,` }`,`}`,``,`const shadowClawNativeImportScripts = typeof importScripts === "function" ? importScripts.bind(self) : null;`,``,`const shadowClawImportScripts = (...urls) => {`,` if (!shadowClawNativeImportScripts) {`,` return;`,` }`,``,` if (!shadowClawServiceWorkerTrustedTypesPolicy || typeof shadowClawServiceWorkerTrustedTypesPolicy.createScriptURL !== "function") {`,` shadowClawNativeImportScripts(...urls);`,``,` return;`,` }`,``,` shadowClawNativeImportScripts(...urls.map((url) => shadowClawServiceWorkerTrustedTypesPolicy.createScriptURL(url)));`,`};`].join(`
|
|
114
|
+
`)}function Ol(e){return e.includes(`shadowClawImportScripts`)||!e.includes(`if(!self.define){`)||!e.includes(`importScripts(`)?e:`${Dl()}\n${e.replace(/importScripts\(/g,`shadowClawImportScripts(`)}`}const kl=g(y.cwd(),`dist/public/service-worker.js`);async function Al(e=kl,{readFileImpl:t=O,writeFileImpl:n=j,patchImpl:r=Ol,logImpl:i=console.log}={}){let a=await t(e,`utf8`),o=r(a);o!==a&&(await n(e,o,`utf8`),i(`Patched Trusted Types imports in ${e}`))}async function jl(){await Al(y.argv[2]||kl)}y.argv[1]&&p.resolve(y.argv[1])===p.resolve(v(import.meta.url))&&jl().catch(e=>{console.error(e),y.exit(1)});async function Ml(e,{writeFileImpl:t=j}={}){let r=e||m(n(import.meta.url),`dist`,`public`);await t(m(r,`.nojekyll`),``,`utf-8`)}y.argv[1]&&p.resolve(y.argv[1])===p.resolve(v(import.meta.url))&&await Ml();const Nl=n(import.meta.url);async function $(e){try{return await A(e),!0}catch{return!1}}async function Pl(e={}){let t=e.quiet??(M.env.NODE_ENV===`test`&&!M.env.VERBOSE),n=e.stdio??(M.env.NODE_ENV===`test`&&!M.env.VERBOSE?`pipe`:`inherit`),r=(...e)=>{t||console.log(...e)},i=g(e.contentRoot||x.SHADOWCLAW_CONTENT_ROOT||M.cwd()),a=g(e.toolchainRoot||Nl),o=i===a,{isProduction:s,copyAllAssets:c,prerenderPages:l,prerenderMainMemory:u}=qa({...x,...e.isProduction===void 0?{}:{NODE_ENV:e.isProduction?`production`:`development`},...e.copyAllAssets===void 0?{}:{COPY_ALL_ASSETS:String(e.copyAllAssets)},...e.prerenderPages===void 0?{}:{PRERENDER_PAGES:String(e.prerenderPages)},...e.prerenderMainMemory===void 0?{}:{PRERENDER_MAIN_MEMORY:String(e.prerenderMainMemory)}});s&&(M.env.NODE_ENV=`production`);async function d(e,r={}){!t&&!r.quiet&&console.log(`> ${e}`);let i=r.stdio??n,a={...M.env,...s?{NODE_ENV:`production`}:{},...r.env||{}};C(e,{stdio:i,...r,env:a})}if(o){if(b(Nl),await Ba(`dist/public`),await D(`dist/public/assets`,{recursive:!0}),c)await T(`assets`,`dist/public`,{recursive:!0});else{await T(`assets/icons`,`dist/public/assets/icons`,{recursive:!0}),await T(`assets/screenshots`,`dist/public/assets/screenshots`,{recursive:!0});try{await T(`assets/fonts`,`dist/public/assets/fonts`,{recursive:!0})}catch{}}await Va([`pages/resources`,`pages/deps`,`resources`,`deps`,`pages/assets`,`pages/main/assets`],`dist/public`);for(let e of Wa())await Ha(e.sources,e.dest,e.opts||{});try{await T(`e2e/README.md`,`dist/public/e2e/README.md`)}catch{}try{await T(`pages`,`dist/public/pages`,{recursive:!0})}catch{}try{await T(`pages/main`,`dist/public/files/main`,{recursive:!0})}catch{}try{await T(`pages/main`,`dist/public/static-main`,{recursive:!0})}catch{}try{await T(`.agents/skills`,`dist/public/.agents/skills`,{recursive:!0})}catch{}try{await T(`.agents/tools`,`dist/public/.agents/tools`,{recursive:!0})}catch{}try{await T(`.agents/scripts`,`dist/public/.agents/scripts`,{recursive:!0})}catch{}if(await $(`.agents/skills`))try{let{generateSkillsIndex:e}=await import(`./chunk-B10_-GxS.js`);await e(Nl)}catch(e){console.warn(`Notice: Failed to auto-generate agent-skills index:`,e)}if(await $(`.well-known`))try{await T(`.well-known`,`dist/public/.well-known`,{recursive:!0,force:!0})}catch{}await d(`npm run -s rolldown`);let t=await Ua(Ka())||`pages/site-config.json`;u?await zc({indexPath:`dist/public/index.html`,sourcePath:`pages/main`,prerenderPages:l,siteConfigPath:t}):await zc({indexPath:`dist/public/index.html`,noSeed:!0,siteConfigPath:t});try{await Tl(`dist/public`,t)}catch{}try{let e=JSON.parse(await O(`package.json`,`utf8`));if(e.version){let t=`dist/public/index.html`,n=await O(t,`utf8`);await j(t,n.replace(/<meta\s+name="version"[^>]*>/,`<meta name="version" content="${e.version}" />`),`utf8`);for(let t of[`.well-known/mcp.json`,`.well-known/mcp/server-card.json`]){let n=m(`dist/public`,t);if(await $(n))try{let t=JSON.parse(await O(n,`utf8`));t.version!==e.version&&(t.version=e.version,await j(n,JSON.stringify(t,null,2)+`
|
|
115
|
+
`,`utf8`))}catch{}}}}catch{}if(s){r(`Running production post-build steps...`);let t=e.pagesOrigin||x.PAGES_ORIGIN,n=e.basePath||(x.PAGES_BASE_PATH??`/shadow-claw/`);if(r(` PAGES_ORIGIN : ${t||`(relative ./)`}`),r(` PAGES_BASE_PATH: ${n}`),t)try{let e=`dist/public/manifest.json`,n=await O(e,`utf8`),r=JSON.parse(n);r.start_url&&(r.start_url=t,await j(e,JSON.stringify(r,null,2),`utf8`))}catch{}try{let e=`dist/public/index.html`,t=await O(e,`utf8`);t=t.replace(/<base\s+href="[^"]*"\s*\/?>/i,`<base href="${n}" />`),await j(e,t,`utf8`)}catch{}await Ml(`dist/public`);let i=``;try{i=C(`npm run -s build:pkg:get:meta`,{encoding:`utf8`,stdio:[`ignore`,`pipe`,`ignore`]}).trim()}catch{}i&&await d(`npm run -s build:pkg:meta "${i}"`)}await Zc({publicDir:`dist/public`,routesPath:await Ua(Ga())||`pages/routes.json`,sourcePath:`pages/main`,prerenderPages:l,siteConfigPath:t}),await d(`npm run -s build:service-worker`);let n=`dist/public/service-worker.js`;await $(n)&&await Al(n,{logImpl:()=>{}}),r(`Build completed successfully.`);return}let f=e.outDir||`dist/public`,p=g(i,f);await Ba(p),await D(p,{recursive:!0}),await D(m(p,`assets`),{recursive:!0});let h=m(a,`dist/public`);await $(m(h,`index.js`))||(r(`Building ShadowClaw core toolchain...`),await Ba(m(a,`dist/public`)),await Ba(m(a,`dist-electron`)),await d(`npm run -s rolldown`,{cwd:a})),await T(h,p,{recursive:!0,filter:e=>!(e.includes(`/assets/cache/`)||e.includes(`\\assets\\cache\\`)||e.includes(`/.cache/`)||e.includes(`\\.cache\\`)||e.includes(`/cache/`)||e.includes(`\\cache\\`)||e.endsWith(`/cache`)||e.endsWith(`\\cache`))}),i!==a&&(await Ba(m(p,`sitemap.xml`)),await Ba(m(p,`sitemap.txt`)));let _=m(i,`assets`);await $(_)&&(c?await T(_,p,{recursive:!0,force:!0}):(await $(m(_,`icons`))&&await T(m(_,`icons`),m(p,`assets/icons`),{recursive:!0,force:!0}),await $(m(_,`screenshots`))&&await T(m(_,`screenshots`),m(p,`assets/screenshots`),{recursive:!0,force:!0}),await $(m(_,`fonts`))&&await T(m(_,`fonts`),m(p,`assets/fonts`),{recursive:!0,force:!0}))),await Va([`pages/resources`,`pages/deps`,`resources`,`deps`,`pages/assets`,`pages/main/assets`],p,{baseDir:i});let v=Wa({contentRoot:i,toolchainRoot:a,distPublicDir:p});for(let e of v)await Ha(e.sources,e.dest,e.opts||{});let y=m(i,`pages`);await $(y)&&await T(y,m(p,`pages`),{recursive:!0,force:!0});let S=m(i,`pages/main`);await $(S)&&(await T(S,m(p,`files/main`),{recursive:!0,force:!0}),await T(S,m(p,`static-main`),{recursive:!0,force:!0}));let w=m(i,`.agents/skills`);await $(w)&&await T(w,m(p,`.agents/skills`),{recursive:!0,force:!0});let E=m(a,`.agents/skills`);i!==a&&await $(E)&&await T(E,m(p,`.agents/skills`),{recursive:!0,force:!1,errorOnExist:!1});let ee=m(i,`.agents/tools`);if(await $(ee))await T(ee,m(p,`.agents/tools`),{recursive:!0,force:!0});else{let e=m(a,`.agents/tools`);await $(e)&&await T(e,m(p,`.agents/tools`),{recursive:!0,force:!0})}let te=m(i,`.agents/scripts`);if(await $(te))await T(te,m(p,`.agents/scripts`),{recursive:!0,force:!0});else{let e=m(a,`.agents/scripts`);await $(e)&&await T(e,m(p,`.agents/scripts`),{recursive:!0,force:!0})}let ne=m(a,`.well-known`);await $(ne)&&await T(ne,m(p,`.well-known`),{recursive:!0,force:!0});let k=m(i,`.well-known`);if(i!==a&&await $(k)&&await T(k,m(p,`.well-known`),{recursive:!0,force:!0}),await $(m(p,`.agents/skills`)))try{let{generateSkillsIndex:e}=await import(`./chunk-B10_-GxS.js`);if(await e(p,{metadataRoot:i,outDir:`.well-known/agent-skills`,toolchainRoot:a,includeBundled:!0}),await $(w))try{await e(i,{toolchainRoot:a,includeBundled:!0})}catch{}}catch(e){console.warn(`Notice: Failed to auto-generate agent-skills index:`,e)}let A=await Ua(Ka(i)),N=A||m(i,`pages/site-config.json`),P=u;if(e.prerenderMainMemory===void 0&&A)try{let e=JSON.parse(await O(A,`utf8`));e?.settings?.prerenderMainMemory===!1?(P=!1,r(` site-config: prerenderMainMemory=false — pages DSD pre-rendering disabled.`)):e?.settings?.overridePrerenderSkeleton===!1&&r(` site-config: overridePrerenderSkeleton=false — skeleton overlay disabled.`)}catch{}let F=m(p,`index.html`);P&&await $(S)?await zc({indexPath:F,sourcePath:S,prerenderPages:l,siteConfigPath:N}):await zc({indexPath:F,noSeed:!0,siteConfigPath:N});try{await Tl(p,N)}catch{}let I=s?e.basePath||x.PAGES_BASE_PATH||`/`:e.basePath||`/`;try{let e=await O(F,`utf8`);e=e.replace(/<base\s+href="[^"]*"\s*\/?>/i,`<base href="${I}" />`);let t=``;try{let e=await Ua([m(i,`package.json`),m(a,`package.json`)]);e&&(t=JSON.parse(await O(e,`utf8`)).version||``)}catch{}if(t){e=e.replace(/<meta\s+name="version"[^>]*>/,`<meta name="version" content="${t}" />`);for(let e of[`.well-known/mcp.json`,`.well-known/mcp/server-card.json`]){let n=m(p,e);if(await $(n))try{let e=JSON.parse(await O(n,`utf8`));e.version!==t&&(e.version=t,await j(n,JSON.stringify(e,null,2)+`
|
|
116
|
+
`,`utf8`))}catch{}}}await j(F,e,`utf8`)}catch{}if(s){r(`Running production post-build steps...`);let t=e.pagesOrigin||x.PAGES_ORIGIN;if(r(` PAGES_ORIGIN : ${t||`(relative ./)`}`),r(` PAGES_BASE_PATH: ${I}`),t)try{let e=m(p,`manifest.json`),n=await O(e,`utf8`),r=JSON.parse(n);r.start_url&&(r.start_url=t,await j(e,JSON.stringify(r,null,2),`utf8`))}catch{}await j(m(p,`.nojekyll`),``,`utf8`);let n=``;try{n=C(`git rev-parse HEAD`,{cwd:i,encoding:`utf8`,stdio:[`ignore`,`pipe`,`ignore`]}).trim()}catch{try{n=C(`git rev-parse HEAD`,{cwd:a,encoding:`utf8`,stdio:[`ignore`,`pipe`,`ignore`]}).trim()}catch{}}if(n){let e=await O(F,`utf8`);await j(F,e.replace(/<meta\s+name="revision"[^>]*>/,`<meta name="revision" content="${n}" />`),`utf8`)}}await Zc({publicDir:p,routesPath:await Ua(Ga(i))||m(i,`pages/routes.json`),sourcePath:await $(S)?S:m(a,`pages/main`),prerenderPages:l,siteConfigPath:N});let L=m(p,`service-worker.js`);await $(L)&&await Al(L,{logImpl:()=>{}}),r(`Build completed successfully.`)}M.argv[1]&&g(M.argv[1])===g(v(import.meta.url))&&Pl().catch(e=>{console.error(e),S(1)});export{Pl as t};
|