agor-live 0.17.2 → 0.17.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/lib/banner.d.ts +1 -1
- package/dist/cli/lib/banner.js +1 -1
- package/dist/cli/lib/check-migrations.test.js +9627 -9112
- package/dist/cli/lib/daemon-manager.test.js +9632 -9117
- package/dist/cli/lib/help.js +1 -1
- package/dist/core/api/index.d.cts +3 -3
- package/dist/core/api/index.d.ts +3 -3
- package/dist/core/{board-comment-DIdOJrSF.d.cts → board-comment-CCFVVN7K.d.cts} +0 -2
- package/dist/core/{board-comment-3N-jSgsk.d.ts → board-comment-iT3DgZb4.d.ts} +0 -2
- package/dist/core/claude/index.cjs +29 -19
- package/dist/core/claude/index.d.cts +2 -2
- package/dist/core/claude/index.d.ts +2 -2
- package/dist/core/claude/index.js +32 -33
- package/dist/core/client/index.cjs +49 -0
- package/dist/core/client/index.d.cts +7 -7
- package/dist/core/client/index.d.ts +7 -7
- package/dist/core/client/index.js +46 -0
- package/dist/core/{client-B5PyIvNc.d.cts → client-CemqXk0v.d.cts} +116 -100
- package/dist/core/{client-C1CsRi19.d.ts → client-uYEOha6g.d.ts} +116 -100
- package/dist/core/config/browser.d.cts +3 -3
- package/dist/core/config/browser.d.ts +3 -3
- package/dist/core/config/index.cjs +84 -41
- package/dist/core/config/index.d.cts +59 -17
- package/dist/core/config/index.d.ts +59 -17
- package/dist/core/config/index.js +86 -55
- package/dist/core/{config-manager-TxxjFMRd.d.cts → config-manager-B8TP9Kz0.d.cts} +12 -3
- package/dist/core/{config-manager-DTrsj6G3.d.ts → config-manager-CDEB0FY4.d.ts} +12 -3
- package/dist/core/{config-services-YEZ4DwCD.d.cts → config-services-CXyQKEK5.d.cts} +1 -1
- package/dist/core/{config-services-DcO2GRgh.d.ts → config-services-DhM7_yWn.d.ts} +1 -1
- package/dist/core/db/index.cjs +235 -175
- package/dist/core/db/index.d.cts +190 -147
- package/dist/core/db/index.d.ts +190 -147
- package/dist/core/db/index.js +239 -190
- package/dist/core/db/session-guard.d.cts +4 -4
- package/dist/core/db/session-guard.d.ts +4 -4
- package/dist/core/drizzle/postgres/0028_queued_tasks.sql +8 -0
- package/dist/core/drizzle/postgres/0030_migrate_queued_messages.sql +24 -0
- package/dist/core/drizzle/postgres/0031_restructure_agentic_tool_config.sql +201 -0
- package/dist/core/drizzle/postgres/meta/_journal.json +21 -0
- package/dist/core/drizzle/sqlite/0039_queued_tasks.sql +13 -0
- package/dist/core/drizzle/sqlite/0040_migrate_queued_messages.sql +61 -0
- package/dist/core/drizzle/sqlite/0041_restructure_agentic_tool_config.sql +204 -0
- package/dist/core/drizzle/sqlite/meta/_journal.json +21 -0
- package/dist/core/gateway/index.d.cts +2 -2
- package/dist/core/gateway/index.d.ts +2 -2
- package/dist/core/{gateway-BnOlAelY.d.cts → gateway-BWq4j_Ll.d.cts} +1 -1
- package/dist/core/{gateway-B_4X-v07.d.ts → gateway-C3Jm_akw.d.ts} +1 -1
- package/dist/core/git/index.d.cts +4 -4
- package/dist/core/git/index.d.ts +4 -4
- package/dist/core/index.cjs +474 -201
- package/dist/core/index.d.cts +12 -10
- package/dist/core/index.d.ts +12 -10
- package/dist/core/index.js +473 -216
- package/dist/core/lib/feathers-validation.cjs +2 -1
- package/dist/core/lib/feathers-validation.d.cts +1 -1
- package/dist/core/lib/feathers-validation.d.ts +1 -1
- package/dist/core/lib/feathers-validation.js +2 -1
- package/dist/core/mcp/index.cjs +26 -16
- package/dist/core/mcp/index.js +26 -16
- package/dist/core/{message-DinITA7a.d.cts → message-CSWOsdcZ.d.cts} +1 -9
- package/dist/core/{message-CHUUP6OS.d.ts → message-DZa8g0s0.d.ts} +1 -9
- package/dist/core/models/index.d.cts +3 -73
- package/dist/core/models/index.d.ts +3 -73
- package/dist/core/package.json +5 -0
- package/dist/core/permissions/index.d.cts +1 -1
- package/dist/core/permissions/index.d.ts +1 -1
- package/dist/core/resolve-config-BcL-Hv8k.d.ts +74 -0
- package/dist/core/resolve-config-DTCxuSBx.d.cts +74 -0
- package/dist/core/seed/index.cjs +145 -98
- package/dist/core/seed/index.js +148 -112
- package/dist/core/{session-guard-C0LkDEN7.d.ts → session-guard-BFqVtBoS.d.ts} +1 -1
- package/dist/core/{session-guard-kvAx_8Fb.d.cts → session-guard-KHh0cnET.d.cts} +1 -1
- package/dist/core/sessions/index.cjs +184 -0
- package/dist/core/sessions/index.d.cts +79 -0
- package/dist/core/sessions/index.d.ts +79 -0
- package/dist/core/sessions/index.js +157 -0
- package/dist/core/{task-BLPFCORT.d.ts → task-BHV-YHg1.d.ts} +41 -3
- package/dist/core/{task-wht1RJEL.d.cts → task-C2Hy7H6u.d.cts} +41 -3
- package/dist/core/templates/session-context.d.cts +1 -1
- package/dist/core/templates/session-context.d.ts +1 -1
- package/dist/core/tools/mcp/oauth-mcp-transport.cjs +168 -66
- package/dist/core/tools/mcp/oauth-mcp-transport.d.cts +92 -16
- package/dist/core/tools/mcp/oauth-mcp-transport.d.ts +92 -16
- package/dist/core/tools/mcp/oauth-mcp-transport.js +165 -66
- package/dist/core/tools/mcp/oauth-refresh.cjs +43 -53
- package/dist/core/tools/mcp/oauth-refresh.d.cts +3 -3
- package/dist/core/tools/mcp/oauth-refresh.d.ts +3 -3
- package/dist/core/tools/mcp/oauth-refresh.js +58 -78
- package/dist/core/types/index.cjs +49 -0
- package/dist/core/types/index.d.cts +7 -7
- package/dist/core/types/index.d.ts +7 -7
- package/dist/core/types/index.js +46 -0
- package/dist/core/{types-DNqfdt1z.d.cts → types-D4Rl6ZKN.d.cts} +18 -2
- package/dist/core/{types-DqPMmTad.d.ts → types-n61iaXub.d.ts} +18 -2
- package/dist/core/unix/index.cjs +164 -110
- package/dist/core/unix/index.d.cts +7 -8
- package/dist/core/unix/index.d.ts +7 -8
- package/dist/core/unix/index.js +167 -124
- package/dist/core/{user-DkNdeFoz.d.cts → user-CpfkcV2C.d.cts} +139 -13
- package/dist/core/{user-BfVWBmXA.d.ts → user-DP-XZMIM.d.ts} +139 -13
- package/dist/core/utils/permission-mode-mapper.d.cts +0 -2
- package/dist/core/utils/permission-mode-mapper.d.ts +0 -2
- package/dist/daemon/index.js +2976 -2791
- package/dist/daemon/main.js +2976 -2791
- package/dist/daemon/mcp/server.js +177 -134
- package/dist/daemon/mcp/tools/analytics.js +19 -5
- package/dist/daemon/mcp/tools/artifacts.js +19 -5
- package/dist/daemon/mcp/tools/boards.js +19 -5
- package/dist/daemon/mcp/tools/card-types.js +19 -5
- package/dist/daemon/mcp/tools/cards.js +19 -5
- package/dist/daemon/mcp/tools/environment.js +19 -5
- package/dist/daemon/mcp/tools/mcp-servers.d.ts +29 -2
- package/dist/daemon/mcp/tools/mcp-servers.js +64 -54
- package/dist/daemon/mcp/tools/messages.js +19 -5
- package/dist/daemon/mcp/tools/repos.js +19 -5
- package/dist/daemon/mcp/tools/search.js +19 -5
- package/dist/daemon/mcp/tools/sessions.js +175 -53
- package/dist/daemon/mcp/tools/tasks.js +19 -5
- package/dist/daemon/mcp/tools/users.js +19 -5
- package/dist/daemon/mcp/tools/worktrees.js +37 -38
- package/dist/daemon/register-hooks.js +52 -1
- package/dist/daemon/register-routes.js +436 -424
- package/dist/daemon/register-services.js +255 -140
- package/dist/daemon/services/config.d.ts +7 -1
- package/dist/daemon/services/config.js +3 -2
- package/dist/daemon/services/gateway.js +28 -15
- package/dist/daemon/services/mcp-servers.d.ts +7 -2
- package/dist/daemon/services/repos.js +2 -0
- package/dist/daemon/services/sessions.d.ts +1 -1
- package/dist/daemon/services/sessions.js +8 -16
- package/dist/daemon/services/tasks.js +16 -10
- package/dist/daemon/services/terminals.js +2 -0
- package/dist/daemon/services/users.d.ts +27 -11
- package/dist/daemon/services/users.js +89 -43
- package/dist/daemon/services/worktree-owners.js +2 -0
- package/dist/daemon/services/worktrees.js +2 -0
- package/dist/daemon/setup/index.js +5 -2
- package/dist/daemon/setup/socketio.d.ts +10 -1
- package/dist/daemon/setup/socketio.js +7 -3
- package/dist/daemon/startup.js +13 -1
- package/dist/daemon/utils/apply-session-config-defaults.d.ts +54 -0
- package/dist/daemon/utils/apply-session-config-defaults.js +46 -0
- package/dist/daemon/utils/spawn-executor.js +2 -0
- package/dist/daemon/utils/worktree-authorization.d.ts +2 -4
- package/dist/executor/commands/zellij.d.ts.map +1 -1
- package/dist/executor/commands/zellij.js +2 -2
- package/dist/executor/handlers/sdk/base-executor.d.ts +4 -3
- package/dist/executor/handlers/sdk/base-executor.d.ts.map +1 -1
- package/dist/executor/handlers/sdk/base-executor.js +11 -5
- package/dist/executor/payload-types.d.ts +14 -14
- package/dist/executor/sdk-handlers/claude/claude-tool.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/claude/claude-tool.js +9 -4
- package/dist/executor/sdk-handlers/claude/import/task-extractor.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/claude/import/task-extractor.js +0 -5
- package/dist/executor/sdk-handlers/claude/message-builder.d.ts +23 -2
- package/dist/executor/sdk-handlers/claude/message-builder.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/claude/message-builder.js +33 -2
- package/dist/executor/sdk-handlers/claude/permissions/permission-hooks.d.ts +9 -1
- package/dist/executor/sdk-handlers/claude/permissions/permission-hooks.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/claude/permissions/permission-hooks.js +12 -0
- package/dist/executor/sdk-handlers/claude/query-builder.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/claude/query-builder.js +11 -6
- package/dist/executor/sdk-handlers/codex/codex-tool.d.ts +0 -5
- package/dist/executor/sdk-handlers/codex/codex-tool.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/codex/codex-tool.js +9 -24
- package/dist/executor/sdk-handlers/codex/prompt-service.d.ts +15 -2
- package/dist/executor/sdk-handlers/codex/prompt-service.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/codex/prompt-service.js +39 -10
- package/dist/executor/sdk-handlers/copilot/copilot-tool.d.ts +0 -5
- package/dist/executor/sdk-handlers/copilot/copilot-tool.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/copilot/copilot-tool.js +5 -22
- package/dist/executor/sdk-handlers/gemini/gemini-tool.d.ts +0 -5
- package/dist/executor/sdk-handlers/gemini/gemini-tool.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/gemini/gemini-tool.js +9 -24
- package/dist/ui/assets/{CodeEditor.inner-CO-5PAnZ.js → CodeEditor.inner-CVLqZBtM.js} +1 -1
- package/dist/ui/assets/{CodeEditor.inner-CO-5PAnZ.js.gz → CodeEditor.inner-CVLqZBtM.js.gz} +0 -0
- package/dist/ui/assets/{_basePickBy-DfxojsEt.js → _basePickBy-CFq5ES2J.js} +1 -1
- package/dist/ui/assets/_basePickBy-CFq5ES2J.js.gz +0 -0
- package/dist/ui/assets/{_baseUniq-DWFPJOTC.js → _baseUniq-C4uKBvNt.js} +1 -1
- package/dist/ui/assets/_baseUniq-C4uKBvNt.js.gz +0 -0
- package/dist/ui/assets/{arc-vMZ_XGSI.js → arc-BnrcXDJJ.js} +1 -1
- package/dist/ui/assets/arc-BnrcXDJJ.js.gz +0 -0
- package/dist/ui/assets/{architectureDiagram-VXUJARFQ-DGpk_uOD.js → architectureDiagram-VXUJARFQ-DD9HD-WR.js} +1 -1
- package/dist/ui/assets/architectureDiagram-VXUJARFQ-DD9HD-WR.js.gz +0 -0
- package/dist/ui/assets/{base-80a1f760-BsVlOKqO.js → base-80a1f760-BK1VmxWU.js} +1 -1
- package/dist/ui/assets/{blockDiagram-VD42YOAC-BkRnxc94.js → blockDiagram-VD42YOAC-LBAckZZe.js} +1 -1
- package/dist/ui/assets/blockDiagram-VD42YOAC-LBAckZZe.js.gz +0 -0
- package/dist/ui/assets/{c4Diagram-YG6GDRKO-Dcf-anJy.js → c4Diagram-YG6GDRKO-yEdylcYP.js} +1 -1
- package/dist/ui/assets/{c4Diagram-YG6GDRKO-Dcf-anJy.js.gz → c4Diagram-YG6GDRKO-yEdylcYP.js.gz} +0 -0
- package/dist/ui/assets/channel-CMN-iY3Q.js +1 -0
- package/dist/ui/assets/{chunk-4BX2VUAB-C4oVWDo8.js → chunk-4BX2VUAB-IHtzKbmQ.js} +1 -1
- package/dist/ui/assets/{chunk-55IACEB6-CsBbTu57.js → chunk-55IACEB6-C4o5tv_F.js} +1 -1
- package/dist/ui/assets/{chunk-B4BG7PRW-DtkeCZab.js → chunk-B4BG7PRW-EPkzLvlB.js} +1 -1
- package/dist/ui/assets/chunk-B4BG7PRW-EPkzLvlB.js.gz +0 -0
- package/dist/ui/assets/{chunk-DI55MBZ5-BQ_asW-1.js → chunk-DI55MBZ5-CW-Bzkzj.js} +1 -1
- package/dist/ui/assets/chunk-DI55MBZ5-CW-Bzkzj.js.gz +0 -0
- package/dist/ui/assets/{chunk-FMBD7UC4-DAdcLNG-.js → chunk-FMBD7UC4-DvGU02Io.js} +1 -1
- package/dist/ui/assets/{chunk-QN33PNHL-Do2zad3m.js → chunk-QN33PNHL-C-PIlz9n.js} +1 -1
- package/dist/ui/assets/{chunk-QZHKN3VN-CyhMmSdC.js → chunk-QZHKN3VN-BhpJFm6h.js} +1 -1
- package/dist/ui/assets/{chunk-TZMSLE5B-DlPypnIq.js → chunk-TZMSLE5B-Biake8IU.js} +1 -1
- package/dist/ui/assets/chunk-TZMSLE5B-Biake8IU.js.gz +0 -0
- package/dist/ui/assets/classDiagram-2ON5EDUG-Bz1et8oA.js +1 -0
- package/dist/ui/assets/classDiagram-v2-WZHVMYZB-Bz1et8oA.js +1 -0
- package/dist/ui/assets/clone-Dxo5sEAf.js +1 -0
- package/dist/ui/assets/{consoleHook-59e792cb-DHYIclEd.js → consoleHook-59e792cb-BzEkHWE8.js} +1 -1
- package/dist/ui/assets/consoleHook-59e792cb-BzEkHWE8.js.gz +0 -0
- package/dist/ui/assets/{cose-bilkent-S5V4N54A-DotJH9qH.js → cose-bilkent-S5V4N54A-vAiVi74s.js} +1 -1
- package/dist/ui/assets/cose-bilkent-S5V4N54A-vAiVi74s.js.gz +0 -0
- package/dist/ui/assets/{dagre-6UL2VRFP-Btssr8QF.js → dagre-6UL2VRFP-C8w7TshD.js} +1 -1
- package/dist/ui/assets/dagre-6UL2VRFP-C8w7TshD.js.gz +0 -0
- package/dist/ui/assets/{diagram-PSM6KHXK-D5_Jkog3.js → diagram-PSM6KHXK-CvnjEmtQ.js} +1 -1
- package/dist/ui/assets/diagram-PSM6KHXK-CvnjEmtQ.js.gz +0 -0
- package/dist/ui/assets/{diagram-QEK2KX5R-DlPEVSL5.js → diagram-QEK2KX5R-D245unng.js} +1 -1
- package/dist/ui/assets/diagram-QEK2KX5R-D245unng.js.gz +0 -0
- package/dist/ui/assets/{diagram-S2PKOQOG-CjO1k8aG.js → diagram-S2PKOQOG-DgGUHL8Z.js} +1 -1
- package/dist/ui/assets/diagram-S2PKOQOG-DgGUHL8Z.js.gz +0 -0
- package/dist/ui/assets/{erDiagram-Q2GNP2WA-3cO02-K3.js → erDiagram-Q2GNP2WA-Cf5paK9b.js} +1 -1
- package/dist/ui/assets/erDiagram-Q2GNP2WA-Cf5paK9b.js.gz +0 -0
- package/dist/ui/assets/{flowDiagram-NV44I4VS-CajTpSxI.js → flowDiagram-NV44I4VS-BJpHmEXV.js} +1 -1
- package/dist/ui/assets/flowDiagram-NV44I4VS-BJpHmEXV.js.gz +0 -0
- package/dist/ui/assets/{ganttDiagram-LVOFAZNH-CnY_bV3o.js → ganttDiagram-LVOFAZNH-zOyTZcXC.js} +1 -1
- package/dist/ui/assets/{ganttDiagram-LVOFAZNH-CnY_bV3o.js.gz → ganttDiagram-LVOFAZNH-zOyTZcXC.js.gz} +0 -0
- package/dist/ui/assets/{gitGraphDiagram-NY62KEGX-CH16bg-j.js → gitGraphDiagram-NY62KEGX-B0uxwqMv.js} +1 -1
- package/dist/ui/assets/gitGraphDiagram-NY62KEGX-B0uxwqMv.js.gz +0 -0
- package/dist/ui/assets/{graph-IQoZvE3o.js → graph-NWXc73TO.js} +1 -1
- package/dist/ui/assets/graph-NWXc73TO.js.gz +0 -0
- package/dist/ui/assets/{index-599aeaf7-RUCkgwsg.js → index-599aeaf7-BKmNqoNF.js} +1 -1
- package/dist/ui/assets/index-599aeaf7-BKmNqoNF.js.gz +0 -0
- package/dist/ui/assets/{index-B3AvIgqP.js → index-BRYNiHLB.js} +345 -349
- package/dist/ui/assets/index-BRYNiHLB.js.gz +0 -0
- package/dist/ui/assets/{index-QV5-5yA2.js → index-BX6Xmhes.js} +1 -1
- package/dist/ui/assets/index-BX6Xmhes.js.gz +0 -0
- package/dist/ui/assets/{index-ChmRuj_T.js → index-W1hIq1uU.js} +1 -1
- package/dist/ui/assets/index-W1hIq1uU.js.gz +0 -0
- package/dist/ui/assets/{index-C-quzPWC.js → index-ctuok0zf.js} +1 -1
- package/dist/ui/assets/index-ctuok0zf.js.gz +0 -0
- package/dist/ui/assets/{infoDiagram-ER5ION4S-2e4gZVGT.js → infoDiagram-ER5ION4S-CquCuoTH.js} +1 -1
- package/dist/ui/assets/{journeyDiagram-XKPGCS4Q-B5bgV3GH.js → journeyDiagram-XKPGCS4Q-B_XkufZ8.js} +1 -1
- package/dist/ui/assets/journeyDiagram-XKPGCS4Q-B_XkufZ8.js.gz +0 -0
- package/dist/ui/assets/{kanban-definition-3W4ZIXB7-Bp-aWRSc.js → kanban-definition-3W4ZIXB7-C2Bo9HkB.js} +1 -1
- package/dist/ui/assets/kanban-definition-3W4ZIXB7-C2Bo9HkB.js.gz +0 -0
- package/dist/ui/assets/katex-C6wkUDai.css +1 -0
- package/dist/ui/assets/{katex-DGRguze2.css.gz → katex-C6wkUDai.css.gz} +0 -0
- package/dist/ui/assets/{layout-BH-2XJZq.js → layout-D9A7Uaku.js} +1 -1
- package/dist/ui/assets/layout-D9A7Uaku.js.gz +0 -0
- package/dist/ui/assets/{linear-DCYXhl_f.js → linear-BJUwJsxE.js} +1 -1
- package/dist/ui/assets/linear-BJUwJsxE.js.gz +0 -0
- package/dist/ui/assets/{mermaid.core-BAuL6kgQ.js → mermaid.core-DcOEcjcA.js} +5 -5
- package/dist/ui/assets/mermaid.core-DcOEcjcA.js.gz +0 -0
- package/dist/ui/assets/{mindmap-definition-VGOIOE7T-DpH5N-N0.js → mindmap-definition-VGOIOE7T-BFT1m7BG.js} +1 -1
- package/dist/ui/assets/mindmap-definition-VGOIOE7T-BFT1m7BG.js.gz +0 -0
- package/dist/ui/assets/{pieDiagram-ADFJNKIX-BB8fBxj1.js → pieDiagram-ADFJNKIX-BFaX1oBV.js} +1 -1
- package/dist/ui/assets/pieDiagram-ADFJNKIX-BFaX1oBV.js.gz +0 -0
- package/dist/ui/assets/{quadrantDiagram-AYHSOK5B-D6oZLdUD.js → quadrantDiagram-AYHSOK5B-DQps5392.js} +1 -1
- package/dist/ui/assets/quadrantDiagram-AYHSOK5B-DQps5392.js.gz +0 -0
- package/dist/ui/assets/{requirementDiagram-UZGBJVZJ-B4uGPp8w.js → requirementDiagram-UZGBJVZJ-3EZ5KWEi.js} +1 -1
- package/dist/ui/assets/requirementDiagram-UZGBJVZJ-3EZ5KWEi.js.gz +0 -0
- package/dist/ui/assets/{sankeyDiagram-TZEHDZUN-MXhIjhme.js → sankeyDiagram-TZEHDZUN-D0qcydqq.js} +1 -1
- package/dist/ui/assets/sankeyDiagram-TZEHDZUN-D0qcydqq.js.gz +0 -0
- package/dist/ui/assets/{sequenceDiagram-WL72ISMW-Cm53TYug.js → sequenceDiagram-WL72ISMW-BCR5gaaN.js} +1 -1
- package/dist/ui/assets/sequenceDiagram-WL72ISMW-BCR5gaaN.js.gz +0 -0
- package/dist/ui/assets/{stateDiagram-FKZM4ZOC-BVuxUkj5.js → stateDiagram-FKZM4ZOC-BvX4FLQ9.js} +1 -1
- package/dist/ui/assets/stateDiagram-FKZM4ZOC-BvX4FLQ9.js.gz +0 -0
- package/dist/ui/assets/stateDiagram-v2-4FDKWEC3-CxLDvgTF.js +1 -0
- package/dist/ui/assets/{timeline-definition-IT6M3QCI-CMypNiEP.js → timeline-definition-IT6M3QCI-_AWp5LJn.js} +1 -1
- package/dist/ui/assets/timeline-definition-IT6M3QCI-_AWp5LJn.js.gz +0 -0
- package/dist/ui/assets/{treemap-KMMF4GRG-BEtnV3BT.js → treemap-KMMF4GRG-BZ9FBl5-.js} +1 -1
- package/dist/ui/assets/treemap-KMMF4GRG-BZ9FBl5-.js.gz +0 -0
- package/dist/ui/assets/{xychartDiagram-PRI3JC2R-BnioEYUM.js → xychartDiagram-PRI3JC2R-_wB7yuVd.js} +1 -1
- package/dist/ui/assets/xychartDiagram-PRI3JC2R-_wB7yuVd.js.gz +0 -0
- package/dist/ui/index.html +1 -1
- package/package.json +8 -8
- package/dist/ui/assets/_basePickBy-DfxojsEt.js.gz +0 -0
- package/dist/ui/assets/_baseUniq-DWFPJOTC.js.gz +0 -0
- package/dist/ui/assets/arc-vMZ_XGSI.js.gz +0 -0
- package/dist/ui/assets/architectureDiagram-VXUJARFQ-DGpk_uOD.js.gz +0 -0
- package/dist/ui/assets/blockDiagram-VD42YOAC-BkRnxc94.js.gz +0 -0
- package/dist/ui/assets/channel-B9aI4bYN.js +0 -1
- package/dist/ui/assets/chunk-B4BG7PRW-DtkeCZab.js.gz +0 -0
- package/dist/ui/assets/chunk-DI55MBZ5-BQ_asW-1.js.gz +0 -0
- package/dist/ui/assets/chunk-TZMSLE5B-DlPypnIq.js.gz +0 -0
- package/dist/ui/assets/classDiagram-2ON5EDUG-p-68WO4Z.js +0 -1
- package/dist/ui/assets/classDiagram-v2-WZHVMYZB-p-68WO4Z.js +0 -1
- package/dist/ui/assets/clone-DzK5ogfn.js +0 -1
- package/dist/ui/assets/consoleHook-59e792cb-DHYIclEd.js.gz +0 -0
- package/dist/ui/assets/cose-bilkent-S5V4N54A-DotJH9qH.js.gz +0 -0
- package/dist/ui/assets/dagre-6UL2VRFP-Btssr8QF.js.gz +0 -0
- package/dist/ui/assets/diagram-PSM6KHXK-D5_Jkog3.js.gz +0 -0
- package/dist/ui/assets/diagram-QEK2KX5R-DlPEVSL5.js.gz +0 -0
- package/dist/ui/assets/diagram-S2PKOQOG-CjO1k8aG.js.gz +0 -0
- package/dist/ui/assets/erDiagram-Q2GNP2WA-3cO02-K3.js.gz +0 -0
- package/dist/ui/assets/flowDiagram-NV44I4VS-CajTpSxI.js.gz +0 -0
- package/dist/ui/assets/gitGraphDiagram-NY62KEGX-CH16bg-j.js.gz +0 -0
- package/dist/ui/assets/graph-IQoZvE3o.js.gz +0 -0
- package/dist/ui/assets/index-599aeaf7-RUCkgwsg.js.gz +0 -0
- package/dist/ui/assets/index-B3AvIgqP.js.gz +0 -0
- package/dist/ui/assets/index-C-quzPWC.js.gz +0 -0
- package/dist/ui/assets/index-ChmRuj_T.js.gz +0 -0
- package/dist/ui/assets/index-QV5-5yA2.js.gz +0 -0
- package/dist/ui/assets/journeyDiagram-XKPGCS4Q-B5bgV3GH.js.gz +0 -0
- package/dist/ui/assets/kanban-definition-3W4ZIXB7-Bp-aWRSc.js.gz +0 -0
- package/dist/ui/assets/katex-DGRguze2.css +0 -1
- package/dist/ui/assets/layout-BH-2XJZq.js.gz +0 -0
- package/dist/ui/assets/linear-DCYXhl_f.js.gz +0 -0
- package/dist/ui/assets/mermaid.core-BAuL6kgQ.js.gz +0 -0
- package/dist/ui/assets/mindmap-definition-VGOIOE7T-DpH5N-N0.js.gz +0 -0
- package/dist/ui/assets/pieDiagram-ADFJNKIX-BB8fBxj1.js.gz +0 -0
- package/dist/ui/assets/quadrantDiagram-AYHSOK5B-D6oZLdUD.js.gz +0 -0
- package/dist/ui/assets/requirementDiagram-UZGBJVZJ-B4uGPp8w.js.gz +0 -0
- package/dist/ui/assets/sankeyDiagram-TZEHDZUN-MXhIjhme.js.gz +0 -0
- package/dist/ui/assets/sequenceDiagram-WL72ISMW-Cm53TYug.js.gz +0 -0
- package/dist/ui/assets/stateDiagram-FKZM4ZOC-BVuxUkj5.js.gz +0 -0
- package/dist/ui/assets/stateDiagram-v2-4FDKWEC3-8Jeww6Dc.js +0 -1
- package/dist/ui/assets/timeline-definition-IT6M3QCI-CMypNiEP.js.gz +0 -0
- package/dist/ui/assets/treemap-KMMF4GRG-BEtnV3BT.js.gz +0 -0
- package/dist/ui/assets/xychartDiagram-PRI3JC2R-BnioEYUM.js.gz +0 -0
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as X,a as _,b as E,e as k,c as H,n as D}from"./index-
|
|
1
|
+
import{_ as X,a as _,b as E,e as k,c as H,n as D}from"./index-BRYNiHLB.js";import{S as Q}from"./base-80a1f760-BK1VmxWU.js";import{g as W,r as F,f as Z,w as x,a as $,b as ee,E as te,c as re}from"./consoleHook-59e792cb-BzEkHWE8.js";var ne=Object.create,T=Object.defineProperty,ie=Object.getOwnPropertyDescriptor,V=Object.getOwnPropertyNames,se=Object.getPrototypeOf,oe=Object.prototype.hasOwnProperty,ae=(t,n,e)=>n in t?T(t,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[n]=e,P=(t,n)=>function(){return n||(0,t[V(t)[0]])((n={exports:{}}).exports,n),n.exports},ce=(t,n,e,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let s of V(n))!oe.call(t,s)&&s!==e&&T(t,s,{get:()=>n[s],enumerable:!(r=ie(n,s))||r.enumerable});return t},j=(t,n,e)=>(e=t!=null?ne(se(t)):{},ce(!t||!t.__esModule?T(e,"default",{value:t,enumerable:!0}):e,t)),de=(t,n,e)=>(ae(t,n+"",e),e),R=(t,n,e)=>{if(!n.has(t))throw TypeError("Cannot "+e)},g=(t,n,e)=>(R(t,n,"read from private field"),e?e.call(t):n.get(t)),M=(t,n,e)=>{if(n.has(t))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(t):n.set(t,e)},O=(t,n,e,r)=>(R(t,n,"write to private field"),n.set(t,e),e),y=(t,n,e)=>(R(t,n,"access private method"),e),z=P({"../../node_modules/.pnpm/cuid@2.1.8/node_modules/cuid/lib/pad.js"(t,n){n.exports=function(r,s){var i="000000000"+r;return i.substr(i.length-s)}}}),le=P({"../../node_modules/.pnpm/cuid@2.1.8/node_modules/cuid/lib/fingerprint.browser.js"(t,n){var e=z(),r=typeof window=="object"?window:self,s=Object.keys(r).length,i=navigator.mimeTypes?navigator.mimeTypes.length:0,o=e((i+navigator.userAgent.length).toString(36)+s.toString(36),4);n.exports=function(){return o}}}),ue=P({"../../node_modules/.pnpm/cuid@2.1.8/node_modules/cuid/lib/getRandomValue.browser.js"(t,n){var e,r=typeof window<"u"&&(window.crypto||window.msCrypto)||typeof self<"u"&&self.crypto;r?(s=Math.pow(2,32)-1,e=function(){return Math.abs(r.getRandomValues(new Uint32Array(1))[0]/s)}):e=Math.random;var s;n.exports=e}}),G=P({"../../node_modules/.pnpm/cuid@2.1.8/node_modules/cuid/index.js"(t,n){var e=le(),r=z(),s=ue(),i=0,o=4,a=36,d=Math.pow(a,o);function l(){return r((s()*d<<0).toString(a),o)}function h(){return i=i<d?i:0,i++,i-1}function p(){var m="c",v=new Date().getTime().toString(a),b=r(h().toString(a),o),c=e(),u=l()+l();return m+v+b+c+u}p.slug=function(){var v=new Date().getTime().toString(36),b=h().toString(36).slice(-4),c=e().slice(0,1)+e().slice(-1),u=l().slice(-2);return v.slice(-2)+b+c+u},p.isCuid=function(v){return typeof v!="string"?!1:!!v.startsWith("c")},p.isSlug=function(v){if(typeof v!="string")return!1;var b=v.length;return b>=7&&b<=10},p.fingerprint=e,n.exports=p}}),J=P({"../../node_modules/.pnpm/@open-draft+deferred-promise@2.1.0/node_modules/@open-draft/deferred-promise/build/createDeferredExecutor.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.createDeferredExecutor=void 0;function n(){const e=(r,s)=>{e.state="pending",e.resolve=i=>{if(e.state!=="pending")return;e.result=i;const o=a=>(e.state="fulfilled",a);return r(i instanceof Promise?i:Promise.resolve(i).then(o))},e.reject=i=>{if(e.state==="pending")return queueMicrotask(()=>{e.state="rejected"}),s(e.rejectionReason=i)}};return e}t.createDeferredExecutor=n}}),he=P({"../../node_modules/.pnpm/@open-draft+deferred-promise@2.1.0/node_modules/@open-draft/deferred-promise/build/DeferredPromise.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DeferredPromise=void 0;var n=J(),e=class extends Promise{#e;resolve;reject;constructor(r=null){const s=(0,n.createDeferredExecutor)();super((i,o)=>{s(i,o),r?.(s.resolve,s.reject)}),this.#e=s,this.resolve=this.#e.resolve,this.reject=this.#e.reject}get state(){return this.#e.state}get rejectionReason(){return this.#e.rejectionReason}then(r,s){return this.#t(super.then(r,s))}catch(r){return this.#t(super.catch(r))}finally(r){return this.#t(super.finally(r))}#t(r){return Object.defineProperties(r,{resolve:{configurable:!0,value:this.resolve},reject:{configurable:!0,value:this.reject}})}};t.DeferredPromise=e}}),U=P({"../../node_modules/.pnpm/@open-draft+deferred-promise@2.1.0/node_modules/@open-draft/deferred-promise/build/index.js"(t){var n=t&&t.__createBinding||(Object.create?function(r,s,i,o){o===void 0&&(o=i);var a=Object.getOwnPropertyDescriptor(s,i);(!a||("get"in a?!s.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return s[i]}}),Object.defineProperty(r,o,a)}:function(r,s,i,o){o===void 0&&(o=i),r[o]=s[i]}),e=t&&t.__exportStar||function(r,s){for(var i in r)i!=="default"&&!Object.prototype.hasOwnProperty.call(s,i)&&n(s,r,i)};Object.defineProperty(t,"__esModule",{value:!0}),e(J(),t),e(he(),t)}}),Y=P({"../../node_modules/.pnpm/strict-event-emitter@0.4.3/node_modules/strict-event-emitter/lib/MemoryLeakError.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.MemoryLeakError=void 0;var n=class extends Error{emitter;type;count;constructor(e,r,s){super(`Possible EventEmitter memory leak detected. ${s} ${r.toString()} listeners added. Use emitter.setMaxListeners() to increase limit`),this.emitter=e,this.type=r,this.count=s,this.name="MaxListenersExceededWarning"}};t.MemoryLeakError=n}}),fe=P({"../../node_modules/.pnpm/strict-event-emitter@0.4.3/node_modules/strict-event-emitter/lib/Emitter.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Emitter=void 0;var n=Y(),e,r,s,i,o,a,d,l,h,p,m,v=class{constructor(){M(this,i),M(this,a),M(this,l),M(this,p),M(this,e,void 0),M(this,r,void 0),M(this,s,void 0),O(this,e,new Map),O(this,r,v.defaultMaxListeners),O(this,s,!1)}static listenerCount(c,u){return c.listenerCount(u)}setMaxListeners(c){return O(this,r,c),this}getMaxListeners(){return g(this,r)}eventNames(){return Array.from(g(this,e).keys())}emit(c,...u){const f=y(this,i,o).call(this,c);return f.forEach(I=>{I.apply(this,u)}),f.length>0}addListener(c,u){y(this,p,m).call(this,"newListener",c,u);const f=y(this,i,o).call(this,c).concat(u);if(g(this,e).set(c,f),g(this,r)>0&&this.listenerCount(c)>g(this,r)&&!g(this,s)){O(this,s,!0);const I=new n.MemoryLeakError(this,c,this.listenerCount(c));console.warn(I)}return this}on(c,u){return this.addListener(c,u)}once(c,u){return this.addListener(c,y(this,l,h).call(this,c,u))}prependListener(c,u){const f=y(this,i,o).call(this,c);if(f.length>0){const I=[u].concat(f);g(this,e).set(c,I)}else g(this,e).set(c,f.concat(u));return this}prependOnceListener(c,u){return this.prependListener(c,y(this,l,h).call(this,c,u))}removeListener(c,u){const f=y(this,i,o).call(this,c);return f.length>0&&(y(this,a,d).call(this,f,u),g(this,e).set(c,f),y(this,p,m).call(this,"removeListener",c,u)),this}off(c,u){return this.removeListener(c,u)}removeAllListeners(c){return c?g(this,e).delete(c):g(this,e).clear(),this}listeners(c){return Array.from(y(this,i,o).call(this,c))}listenerCount(c){return y(this,i,o).call(this,c).length}rawListeners(c){return this.listeners(c)}},b=v;e=new WeakMap,r=new WeakMap,s=new WeakMap,i=new WeakSet,o=function(c){return g(this,e).get(c)||[]},a=new WeakSet,d=function(c,u){const f=c.indexOf(u);return f>-1&&c.splice(f,1),[]},l=new WeakSet,h=function(c,u){const f=(...I)=>{this.removeListener(c,f),u.apply(this,I)};return f},p=new WeakSet,m=function(c,u,f){this.emit(c,u,f)},de(b,"defaultMaxListeners",10),t.Emitter=b}}),pe=P({"../../node_modules/.pnpm/strict-event-emitter@0.4.3/node_modules/strict-event-emitter/lib/index.js"(t){var n=t&&t.__createBinding||(Object.create?function(r,s,i,o){o===void 0&&(o=i);var a=Object.getOwnPropertyDescriptor(s,i);(!a||("get"in a?!s.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return s[i]}}),Object.defineProperty(r,o,a)}:function(r,s,i,o){o===void 0&&(o=i),r[o]=s[i]}),e=t&&t.__exportStar||function(r,s){for(var i in r)i!=="default"&&!Object.prototype.hasOwnProperty.call(s,i)&&n(s,r,i)};Object.defineProperty(t,"__esModule",{value:!0}),e(fe(),t),e(Y(),t)}}),me=j(G()),ve=/(%?)(%([sdjo]))/g;function we(t,n){switch(n){case"s":return t;case"d":case"i":return Number(t);case"j":return JSON.stringify(t);case"o":{if(typeof t=="string")return t;const e=JSON.stringify(t);return e==="{}"||e==="[]"||/^\[object .+?\]$/.test(e)?t:e}}}function w(t,...n){if(n.length===0)return t;let e=0,r=t.replace(ve,(s,i,o,a)=>{const d=n[e],l=we(d,a);return i?s:(e++,l)});return e<n.length&&(r+=` ${n.slice(e).join(" ")}`),r=r.replace(/%{2,2}/g,"%"),r}var ge=2;function ye(t){if(!t.stack)return;const n=t.stack.split(`
|
|
2
2
|
`);n.splice(1,ge),t.stack=n.join(`
|
|
3
3
|
`)}var _e=class extends Error{constructor(t,...n){super(t),this.message=t,this.name="Invariant Violation",this.message=w(t,...n),ye(this)}},S=(t,n,...e)=>{if(!t)throw new _e(n,...e)};S.as=(t,n,e,...r)=>{if(!n)throw t.prototype.name!=null?new t(w(e,r)):t(w(e,r))};var A=j(U()),Ee=window.localStorage.CSB_EMULATOR_DEBUG,Pe="\x1B[0m",be="\x1B[32;1m",Se="\x1B[31m",Le="\x1B[34m",Ie="\x1B[33;1m",Me="\x1B[35;1m",B="\x1B[36;1m",je={preview:Ie,emulator:Me,runtime:B,bridge:Le,"runtime:worker":B};function K(t){return function(e,...r){if(Ee==="true"){const s=()=>e.includes("sender")?`${be}sender`:e.includes("receiver")?`${Se}receiver`:"",i=e.replace(/\[.+\]:/,"");console.debug(`${je[t]}${t}:${s()}${Pe}:${i}`,...r)}}}var L=K("emulator"),Oe=class{constructor(t){this.target=t,this.emitter=new EventTarget,this.channel=new MessageChannel,this.receiverPort=this.channel.port1;const n=new A.DeferredPromise,e=r=>{r.data.type==="internal/ready"&&(L("[message-sender]: runtime is ready"),n.resolve())};window.addEventListener("message",e),n.then(()=>{window.removeEventListener("message",e)}),this.receiverReadyPromise=n,this.receiverPort.onmessage=r=>{const s=r.data;s.type!=null&&(L('[message-sender]: emitting "%s" event...',s.type,s.payload),this.emitter.dispatchEvent(new MessageEvent(s.type,{data:s.payload})))}}emitter;channel;receiverPort;receiverReadyPromise;async handshake(){const t=new A.DeferredPromise;await this.receiverReadyPromise,L("[message-sender]: sending handshake"),this.target.postMessage({type:"internal/handshake"},"*",[this.channel.port2]),this.on("internal/handshake/done",()=>{t.resolve(),clearTimeout(n)});const n=setTimeout(()=>{t.reject(new Error("MessageSender: Handshake timeout"))},5e3);return t}on(t,n,e){L('[message-sender]: add listener "%s"',t),this.emitter.addEventListener(t,r=>{r instanceof MessageEvent&&n(r)},e)}off(t,n,e){this.emitter.removeEventListener(t,n,e)}async send(t,...n){const e=new A.DeferredPromise,r=(0,me.default)(),s=n[0]||{};L('[message-sender]: send "%s" (%s)',t,r,s),this.receiverPort.postMessage({type:t,payload:{operationId:r,payload:s}}),L('[message-sender]: adding done listener for "%s" (%s)',t,r);const i=a=>{const{data:d}=a;if(d.operationId===r){const l=d.listenerPayload||{};L('[message-sender]: resolving "%s (%s) promise!',t,r),e.resolve({...l,operationId:d.operationId})}},o=a=>{const{data:d}=a;d.operationId===r&&(L('[message-sender]: rejecting "%s (%s) promise!',t,r),e.reject(d.error))};return this.on("internal/operation/done",i),this.on("internal/operation/failed",o),e.finally(()=>{this.emitter.removeEventListener("internal/operation/done",i),this.emitter.removeEventListener("internal/operation/failed",o)})}},N=j(U()),ke=j(G()),Ce=class{constructor(t){this.channel=t}async init(t){await this.channel.send("fs/init",{files:t})}async readFile(t,n){const e=await this.channel.send("fs/readFile",{path:t,encoding:n}).catch(r=>{throw new Error(w('Failed to read file at path "%s"',t),{cause:r})});if(!e)throw new Error("File not found");return e.data}async writeFile(t,n,e){let r,s=!1;typeof e=="object"?(r=e.encoding,s=!!e.recursive):typeof e=="string"&&(r=e),await this.channel.send("fs/writeFile",{path:t,content:n,encoding:r,recursive:s}).catch(i=>{throw new Error(w('Failed to write file at path "%s"',t),{cause:i})})}async readdir(t){const n=await this.channel.send("fs/readdir",{path:t}).catch(e=>{throw new Error(w('Failed to read directory at path "%s"',t),{cause:e})});if(!n)throw new Error("Directory not found");return n.data}async mkdir(t,n){const e=!!n?.recursive;await this.channel.send("fs/mkdir",{path:t,recursive:e}).catch(r=>{throw new Error(w('Failed to make directory at path "%s"',t),{cause:r})})}async stat(t){const n=await this.channel.send("fs/stat",{path:t}).catch(e=>{throw new Error(w('Failed to stat file at path "%s"',t),{cause:e})});if(!n)throw new Error("File not found");return n.data}async rm(t,n){const{force:e,recursive:r}=n||{};await this.channel.send("fs/rm",{path:t,force:e,recursive:r}).catch(s=>{throw new Error(w('Failed to remove file at path "%s"',t),{cause:s})})}async watch(t,n,e){const r=(0,ke.default)();return await this.channel.send("fs/watch",{watcherId:r,includes:t,excludes:n}),this.channel.on("fs/watch-event",({data:s})=>{if(s.watcherId===r&&e){const i={...s};delete i.watcherId,e(i)}}),{dispose:()=>this.channel.send("fs/unwatch",{watcherId:r})}}},q=j(pe()),Fe=class{constructor(t){this.channel=t}create(){return new xe(this.channel)}},xe=class{constructor(t){this.channel=t,this.state="running",this.stdout=new q.Emitter,this.stderr=new q.Emitter,this.stdin={write:n=>{if(!this.id)throw new Error("Failed to write to stdin, no process is currently running");return this.channel.send("shell/stdin",{data:n,workerId:this.id})}},this.forwardStdEvents()}id;state;stdout;stderr;stdin;forwardStdEvents(){this.channel.on("worker/tty",t=>{const{data:n}=t;if(n.workerId===this.id)switch(n.payload.type){case"out":{this.stdout.emit("data",n.payload.data);break}case"err":{this.stderr.emit("data",n.payload.data);break}}})}async runCommand(t,n,e={}){S(!this.id,'Failed to run "runCommand" on a ShellProcess: there is already a process running.');const r=await this.channel.send("shell/runCommand",{command:t,args:n,options:e});return S(r,'Failed to run "runCommand" on a ShellProcess: was not able to retrieve a running process.'),this.id=r.id,this.state="running",r}async on(t,n){switch(t){case"progress":{this.channel.on("worker/progress",({data:e})=>{n(e.status)});return}case"exit":{this.channel.on("worker/exit",({data:e})=>{e.workerId===this.id&&n(e.exitCode,e.error)});return}}}async kill(){S(this.id,'Failed to run "kill" on a ShellProcess: there is no process running. Did you forget to run it?'),this.state="idle",await this.channel.send("shell/exit",{id:this.id}).catch(t=>{throw new Error(w('Failed to kill shell with ID "%s"',this.id),{cause:t})}),this.id=void 0}},Ae=j(U()),De=2e4,Te=class{constructor(t){this.channel=t}async waitFor(t,n,e=De){const r=new Ae.DeferredPromise,s=setTimeout(()=>{r.reject()},e),i=await this.channel.send("preview/get/info",t).catch(a=>{r.reject(new Error(w('Failed to look up preview information for shell ID "%s" (port: %d)',t.sourceShellId,t.port)))}),o=i&&n(i);return o&&r.resolve({url:i.url,port:i.port,sourceShellId:i.sourceShellId}),this.channel.on("preview/port/ready",({data:a})=>{!o&&n(a)&&r.resolve({url:a.url,port:a.port,sourceShellId:a.sourceShellId})}),r.finally(()=>{clearTimeout(s)})}async getByShellId(t,n){return this.waitFor({sourceShellId:t},e=>e.sourceShellId===t,n).catch(e=>{throw new Error(w('Failed to get shell by ID "%s"',t),{cause:e})})}async waitForPort(t,n){return this.waitFor({port:t},e=>e.port===t,n).catch(e=>{throw new Error(w("Failed to await port %d",t),{cause:e})})}},Re="https://nodebox-runtime.codesandbox.io",C=K("emulator"),Ue=class{constructor(t){this.options=t,S(this.options.iframe,'Failed to create a Nodebox: expected "iframe" argument to be a reference to an <iframe> element but got %j',this.options.iframe),this.url=this.options.runtimeUrl||Re,this.isConnected=!1}channel=null;isConnected;url;fileSystemApi=null;shellApi=null;previewApi=null;async connect(){const{iframe:t,cdnUrl:n}=this.options;C("[message-sender]: Connecting to node emulator...");const e=new N.DeferredPromise;this.url||e.reject(new Error("Nodebox URL is missing. Did you forget to provide it when creating this Nodebox instance?")),S(t.contentWindow,"Failed to create a MessageChannel with the Nodebox iframe: no content window found"),this.channel=new Oe(t.contentWindow);const r=new N.DeferredPromise;return t.setAttribute("src",this.url),t.addEventListener("load",()=>{r.resolve()},{once:!0}),t.addEventListener("error",s=>{r.reject(s.error)},{once:!0}),await r,C("[message-sender]: IFrame loaded..."),await this.channel.handshake(),C("[message-sender]: Handshake completed..."),this.channel.send("connect",{cdnUrl:n}),this.channel.on("runtime/ready",()=>{e.resolve()}),e.then(()=>{C("[message-sender]: Connected to runtime..."),this.isConnected=!0})}get fs(){return S(this.isConnected,'Failed to access the File System API: consumer is not connected. Did you forget to run "connect()"?'),this.fileSystemApi?this.fileSystemApi:(this.fileSystemApi=new Ce(this.channel),this.fileSystemApi)}get shell(){return S(this.isConnected,'Failed to access the Shell API: consumer is not connected. Did you forget to run "connect()"?'),this.shellApi?this.shellApi:(this.shellApi=new Fe(this.channel),this.shellApi)}get preview(){return S(this.isConnected,'Failed to access the Preview API: consumer is not connected. Did you forget to run "connect()"?'),this.previewApi?this.previewApi:(this.previewApi=new Te(this.channel),this.previewApi)}},We="INJECT_AND_INVOKE",Be="PREVIEW_LOADED";function Ne(t,n){return _(this,void 0,void 0,function(){var e,r,s,i,o;return E(this,function(a){return e=t.contentWindow,D(e,"Failed to await preview iframe: no content window found"),r=9e4,s=20,i=0,[2,new Promise(function(d,l){var h=function(){var p=function(){clearTimeout(o),i=s,d(),t.removeEventListener("load",p)};if(i>=s){l(H("Could not able to connect to preview."));return}t.setAttribute("src",n),o=setTimeout(function(){h(),t.removeEventListener("load",p)},r),i=i+1,t.addEventListener("load",p)};t.addEventListener("error",function(){return l(new Error("Iframe error"))}),t.addEventListener("abort",function(){return l(new Error("Aborted"))}),h()})]})})}var qe=function(t,n){t.style.border="0",t.style.width=n.width||"100%",t.style.height=n.height||"100%",t.style.overflow="hidden",t.allow="cross-origin-isolated"};function He(t){var n=t.scope,e=window.history.__proto__,r=[],s=0,i=function(d){parent.postMessage({type:"urlchange",url:d,back:s>0,forward:s<r.length-1,channelId:n.channelId},"*")};function o(d,l){r.splice(s+1),r.push({url:d,state:l}),s=r.length-1}Object.assign(window.history,{go:function(d){var l=s+d;if(l>=0&&l<=r.length-1){s=l;var h=r[s],p=h.url,m=h.state;e.replaceState.call(window.history,m,"",p);var v=document.location.href;i(v),window.dispatchEvent(new PopStateEvent("popstate",{state:m}))}},back:function(){window.history.go(-1)},forward:function(){window.history.go(1)},pushState:function(d,l,h){e.replaceState.call(window.history,d,l,h),o(h,d),i(document.location.href)},replaceState:function(d,l,h){e.replaceState.call(window.history,d,l,h),r[s]={state:d,url:h},i(document.location.href)}});function a(d){var l=d.data;l.type==="urlback"?history.back():l.type==="urlforward"?history.forward():l.type==="refresh"&&document.location.reload()}window.addEventListener("message",a)}function Ve(t){var n=t.scope,e=0;function r(){if(typeof window>"u")return 0;var a=document.body,d=document.documentElement;return Math.max(a.scrollHeight,a.offsetHeight,d.offsetHeight)}function s(){var a=r();e!==a&&window.parent.postMessage({type:"resize",height:a,codesandbox:!0,channelId:n.channelId},"*"),e=a}s();var i,o=new MutationObserver(function(){i===void 0&&(s(),i=setTimeout(function(){i=void 0},300))});o.observe(document,{attributes:!0,childList:!0,subtree:!0}),setInterval(s,300)}var ze=[{code:He.toString(),id:"historyListener"},{code:"function consoleHook({ scope }) {"+re+`
|
|
4
4
|
};`,id:"consoleHook"},{code:Ve.toString(),id:"watchResize"}],Ge=function(t,n){ze.forEach(function(e){var r,s=e.code,i=e.id,o={uid:i,type:We,code:"exports.activate = ".concat(s),scope:{channelId:n}};(r=t.contentWindow)===null||r===void 0||r.postMessage(o,"*")})},Xe=(function(t){X(n,t);function n(e,r,s){s===void 0&&(s={});var i=t.call(this,e,r,k(k({},s),{bundlerURL:s.bundlerURL}))||this;return i._modulesCache=new Map,i.messageChannelId=ee(),i._initPromise=null,i.emitter=new te,i.manageIframes(e),i.emulator=new Ue({iframe:i.emulatorIframe,runtimeUrl:i.options.bundlerURL}),i.updateSandbox(r),i}return n.prototype._init=function(e){return _(this,void 0,void 0,function(){return E(this,function(r){switch(r.label){case 0:return[4,this.emulator.connect()];case 1:return r.sent(),[4,this.emulator.fs.init(e)];case 2:return r.sent(),[4,this.globalListeners()];case 3:return r.sent(),[2]}})})},n.prototype.compile=function(e){return _(this,void 0,void 0,function(){var r,s;return E(this,function(i){switch(i.label){case 0:return i.trys.push([0,5,,6]),this.status="initializing",this.dispatch({type:"start",firstLoad:!0}),this._initPromise||(this._initPromise=this._init(e)),[4,this._initPromise];case 1:return i.sent(),this.dispatch({type:"connected"}),[4,this.createShellProcessFromTask(e)];case 2:return r=i.sent().id,[4,this.createPreviewURLFromId(r)];case 3:return i.sent(),[4,this.setLocationURLIntoIFrame()];case 4:return i.sent(),this.dispatchDoneMessage(),[3,6];case 5:return s=i.sent(),this.dispatch({type:"action",action:"notification",notificationType:"error",title:W(s)}),this.dispatch({type:"done",compilatonError:!0}),[3,6];case 6:return[2]}})})},n.prototype.createShellProcessFromTask=function(e){return _(this,void 0,void 0,function(){var r,s,i=this;return E(this,function(o){switch(o.label){case 0:return r=F(e["/package.json"]),this.emulatorCommand=Z(r),this.emulatorShellProcess=this.emulator.shell.create(),[4,this.emulatorShellProcess.on("exit",function(a){i.dispatch({type:"action",action:"notification",notificationType:"error",title:H("Error: process.exit(".concat(a,") called."))})})];case 1:return o.sent(),[4,this.emulatorShellProcess.on("progress",function(a){var d,l;if(a.state==="command_running"||a.state==="starting_command"){i.dispatch({type:"shell/progress",data:k(k({},a),{command:[(d=i.emulatorCommand)===null||d===void 0?void 0:d[0],(l=i.emulatorCommand)===null||l===void 0?void 0:l[1].join(" ")].join(" ")})}),i.status="installing-dependencies";return}i.dispatch({type:"shell/progress",data:a})})];case 2:return o.sent(),this.emulatorShellProcess.stdout.on("data",function(a){i.dispatch({type:"stdout",payload:{data:a,type:"out"}})}),this.emulatorShellProcess.stderr.on("data",function(a){i.dispatch({type:"stdout",payload:{data:a,type:"err"}})}),[4,(s=this.emulatorShellProcess).runCommand.apply(s,this.emulatorCommand)];case 3:return[2,o.sent()]}})})},n.prototype.createPreviewURLFromId=function(e){var r;return _(this,void 0,void 0,function(){var s;return E(this,function(i){switch(i.label){case 0:return this.iframePreviewUrl=void 0,[4,this.emulator.preview.getByShellId(e)];case 1:return s=i.sent().url,this.iframePreviewUrl=s+((r=this.options.startRoute)!==null&&r!==void 0?r:""),[2]}})})},n.prototype.manageIframes=function(e){var r;if(typeof e=="string"){var s=document.querySelector(e);D(s,"The element '".concat(e,"' was not found")),this.iframe=document.createElement("iframe"),s?.appendChild(this.iframe)}else this.iframe=e;qe(this.iframe,this.options),D(this.iframe.parentNode,"The given iframe does not have a parent."),this.emulatorIframe=document.createElement("iframe"),this.emulatorIframe.classList.add("sp-bridge-frame"),(r=this.iframe.parentNode)===null||r===void 0||r.appendChild(this.emulatorIframe)},n.prototype.setLocationURLIntoIFrame=function(){return _(this,void 0,void 0,function(){return E(this,function(e){switch(e.label){case 0:return this.iframePreviewUrl?[4,Ne(this.iframe,this.iframePreviewUrl)]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}})})},n.prototype.dispatchDoneMessage=function(){this.status="done",this.dispatch({type:"done",compilatonError:!1}),this.iframePreviewUrl&&this.dispatch({type:"urlchange",url:this.iframePreviewUrl,back:!1,forward:!1})},n.prototype.globalListeners=function(){return _(this,void 0,void 0,function(){var e=this;return E(this,function(r){switch(r.label){case 0:return window.addEventListener("message",function(s){s.data.type===Be&&Ge(e.iframe,e.messageChannelId),s.data.type==="urlchange"&&s.data.channelId===e.messageChannelId?e.dispatch({type:"urlchange",url:s.data.url,back:s.data.back,forward:s.data.forward}):s.data.channelId===e.messageChannelId&&e.dispatch(s.data)}),[4,this.emulator.fs.watch(["*"],[".next","node_modules","build","dist","vendor",".config",".vuepress"],function(s){return _(e,void 0,void 0,function(){var i,o,a,d,l,h,p;return E(this,function(m){switch(m.label){case 0:return s?(i=s,o="newPath"in i?i.newPath:"path"in i?i.path:"",[4,this.emulator.fs.stat(o)]):[2];case 1:if(a=m.sent().type,a!=="file")return[2,null];m.label=2;case 2:switch(m.trys.push([2,10,,11]),d=i.type,d){case"change":return[3,3];case"create":return[3,3];case"remove":return[3,5];case"rename":return[3,6];case"close":return[3,8]}return[3,9];case 3:return[4,this.emulator.fs.readFile(i.path,"utf8")];case 4:return l=m.sent(),this.dispatch({type:"fs/change",path:i.path,content:l}),this._modulesCache.set(i.path,x(l)),[3,9];case 5:return this.dispatch({type:"fs/remove",path:i.path}),this._modulesCache.delete(i.path),[3,9];case 6:return this.dispatch({type:"fs/remove",path:i.oldPath}),this._modulesCache.delete(i.oldPath),[4,this.emulator.fs.readFile(i.newPath,"utf8")];case 7:return h=m.sent(),this.dispatch({type:"fs/change",path:i.newPath,content:h}),this._modulesCache.set(i.newPath,x(h)),[3,9];case 8:return[3,9];case 9:return[3,11];case 10:return p=m.sent(),this.dispatch({type:"action",action:"notification",notificationType:"error",title:W(p)}),[3,11];case 11:return[2]}})})})];case 1:return r.sent(),[2]}})})},n.prototype.restartShellProcess=function(){var e;return _(this,void 0,void 0,function(){return E(this,function(r){switch(r.label){case 0:return this.emulatorShellProcess&&this.emulatorCommand?(this.dispatch({type:"start",firstLoad:!0}),this.status="initializing",[4,this.emulatorShellProcess.kill()]):[3,3];case 1:return r.sent(),(e=this.iframe)===null||e===void 0||e.removeAttribute("attr"),this.emulator.fs.rm("/node_modules/.vite",{recursive:!0,force:!0}),[4,this.compile(Object.fromEntries(this._modulesCache))];case 2:r.sent(),r.label=3;case 3:return[2]}})})},n.prototype.updateSandbox=function(e){var r=this,s,i=$(e.files);if(((s=this.emulatorShellProcess)===null||s===void 0?void 0:s.state)==="running"){Object.entries(i).forEach(function(o){var a=o[0],d=o[1];(!r._modulesCache.get(a)||F(d)!==F(r._modulesCache.get(a)))&&r.emulator.fs.writeFile(a,d,{recursive:!0})});return}this.dispatch({codesandbox:!0,modules:i,template:e.template,type:"compile"}),Object.entries(i).forEach(function(o){var a=o[0],d=o[1];r._modulesCache.set(a,x(d))})},n.prototype.dispatch=function(e){var r,s;return _(this,void 0,void 0,function(){var i;return E(this,function(o){switch(o.label){case 0:switch(i=e.type,i){case"compile":return[3,1];case"refresh":return[3,2];case"urlback":return[3,4];case"urlforward":return[3,4];case"shell/restart":return[3,5];case"shell/openPreview":return[3,6]}return[3,7];case 1:return this.compile(e.modules),[3,8];case 2:return[4,this.setLocationURLIntoIFrame()];case 3:return o.sent(),[3,8];case 4:return(s=(r=this.iframe)===null||r===void 0?void 0:r.contentWindow)===null||s===void 0||s.postMessage(e,"*"),[3,8];case 5:return this.restartShellProcess(),[3,8];case 6:return window.open(this.iframePreviewUrl,"_blank"),[3,8];case 7:this.emitter.dispatch(e),o.label=8;case 8:return[2]}})})},n.prototype.listen=function(e){return this.emitter.listener(e)},n.prototype.destroy=function(){this.emulatorIframe.remove(),this.emitter.cleanup()},n})(Q);export{Xe as SandpackNode};
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aE as ln,aF as Gt,aG as cn,aH as sn,g as yn}from"./index-
|
|
1
|
+
import{aE as ln,aF as Gt,aG as cn,aH as sn,g as yn}from"./index-BRYNiHLB.js";function pn(i,s){for(var p=0;p<s.length;p++){const l=s[p];if(typeof l!="string"&&!Array.isArray(l)){for(const g in l)if(g!=="default"&&!(g in i)){const m=Object.getOwnPropertyDescriptor(l,g);m&&Object.defineProperty(i,g,m.get?m:{enumerable:!0,get:()=>l[g]})}}}return Object.freeze(Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}))}var Ie={exports:{}},de={},Ge,Kr;function we(){return Kr||(Kr=1,Ge=TypeError),Ge}const dn={},vn=Object.freeze(Object.defineProperty({__proto__:null,default:dn},Symbol.toStringTag,{value:"Module"})),hn=ln(vn);var ke,Qr;function Fe(){if(Qr)return ke;Qr=1;var i=typeof Map=="function"&&Map.prototype,s=Object.getOwnPropertyDescriptor&&i?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,p=i&&s&&typeof s.get=="function"?s.get:null,l=i&&Map.prototype.forEach,g=typeof Set=="function"&&Set.prototype,m=Object.getOwnPropertyDescriptor&&g?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,S=g&&m&&typeof m.get=="function"?m.get:null,t=g&&Set.prototype.forEach,u=typeof WeakMap=="function"&&WeakMap.prototype,c=u?WeakMap.prototype.has:null,v=typeof WeakSet=="function"&&WeakSet.prototype,h=v?WeakSet.prototype.has:null,x=typeof WeakRef=="function"&&WeakRef.prototype,P=x?WeakRef.prototype.deref:null,n=Boolean.prototype.valueOf,f=Object.prototype.toString,o=Function.prototype.toString,E=String.prototype.match,b=String.prototype.slice,A=String.prototype.replace,C=String.prototype.toUpperCase,_=String.prototype.toLowerCase,O=RegExp.prototype.test,a=Array.prototype.concat,y=Array.prototype.join,w=Array.prototype.slice,R=Math.floor,q=typeof BigInt=="function"?BigInt.prototype.valueOf:null,I=Object.getOwnPropertySymbols,U=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,M=typeof Symbol=="function"&&typeof Symbol.iterator=="object",W=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===M||!0)?Symbol.toStringTag:null,$=Object.prototype.propertyIsEnumerable,k=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function d(e,r){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||O.call(/e/,r))return r;var T=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var L=e<0?-R(-e):R(e);if(L!==e){var j=String(L),F=b.call(r,j.length+1);return A.call(j,T,"$&_")+"."+A.call(A.call(F,/([0-9]{3})/g,"$&_"),/_$/,"")}}return A.call(r,T,"$&_")}var N=hn,K=N.custom,Y=Q(K)?K:null,ie={__proto__:null,double:'"',single:"'"},oe={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};ke=function e(r,T,L,j){var F=T||{};if(J(F,"quoteStyle")&&!J(ie,F.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(J(F,"maxStringLength")&&(typeof F.maxStringLength=="number"?F.maxStringLength<0&&F.maxStringLength!==1/0:F.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var se=J(F,"customInspect")?F.customInspect:!0;if(typeof se!="boolean"&&se!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(J(F,"indent")&&F.indent!==null&&F.indent!==" "&&!(parseInt(F.indent,10)===F.indent&&F.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(J(F,"numericSeparator")&&typeof F.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var pe=F.numericSeparator;if(typeof r>"u")return"undefined";if(r===null)return"null";if(typeof r=="boolean")return r?"true":"false";if(typeof r=="string")return Nr(r,F);if(typeof r=="number"){if(r===0)return 1/0/r>0?"0":"-0";var X=String(r);return pe?d(r,X):X}if(typeof r=="bigint"){var ye=String(r)+"n";return pe?d(r,ye):ye}var Te=typeof F.depth>"u"?5:F.depth;if(typeof L>"u"&&(L=0),L>=Te&&Te>0&&typeof r=="object")return fe(r)?"[Array]":"[Object]";var Se=on(F,L);if(typeof j>"u")j=[];else if(ce(j,r)>=0)return"[Circular]";function ne(be,xe,fn){if(xe&&(j=w.call(j),j.push(xe)),fn){var zr={depth:F.depth};return J(F,"quoteStyle")&&(zr.quoteStyle=F.quoteStyle),e(be,zr,L+1,j)}return e(be,F,L+1,j)}if(typeof r=="function"&&!z(r)){var Lr=ve(r),Ur=_e(r,ne);return"[Function"+(Lr?": "+Lr:" (anonymous)")+"]"+(Ur.length>0?" { "+y.call(Ur,", ")+" }":"")}if(Q(r)){var jr=M?A.call(String(r),/^(Symbol\(.*\))_[^)]*$/,"$1"):U.call(r);return typeof r=="object"&&!M?Oe(jr):jr}if(tn(r)){for(var Ae="<"+_.call(String(r.nodeName)),Ne=r.attributes||[],qe=0;qe<Ne.length;qe++)Ae+=" "+Ne[qe].name+"="+ue(ae(Ne[qe].value),"double",F);return Ae+=">",r.childNodes&&r.childNodes.length&&(Ae+="..."),Ae+="</"+_.call(String(r.nodeName))+">",Ae}if(fe(r)){if(r.length===0)return"[]";var Be=_e(r,ne);return Se&&!an(Be)?"["+$e(Be,Se)+"]":"[ "+y.call(Be,", ")+" ]"}if(D(r)){var Le=_e(r,ne);return!("cause"in Error.prototype)&&"cause"in r&&!$.call(r,"cause")?"{ ["+String(r)+"] "+y.call(a.call("[cause]: "+ne(r.cause),Le),", ")+" }":Le.length===0?"["+String(r)+"]":"{ ["+String(r)+"] "+y.call(Le,", ")+" }"}if(typeof r=="object"&&se){if(Y&&typeof r[Y]=="function"&&N)return N(r,{depth:Te-L});if(se!=="symbol"&&typeof r.inspect=="function")return r.inspect()}if(te(r)){var Wr=[];return l&&l.call(r,function(be,xe){Wr.push(ne(xe,r,!0)+" => "+ne(be,r))}),Br("Map",p.call(r),Wr,Se)}if(me(r)){var Gr=[];return t&&t.call(r,function(be){Gr.push(ne(be,r))}),Br("Set",S.call(r),Gr,Se)}if(he(r))return De("WeakMap");if(rn(r))return De("WeakSet");if(ge(r))return De("WeakRef");if(B(r))return Oe(ne(Number(r)));if(ee(r))return Oe(ne(q.call(r)));if(H(r))return Oe(n.call(r));if(G(r))return Oe(ne(String(r)));if(typeof window<"u"&&r===window)return"{ [object Window] }";if(typeof globalThis<"u"&&r===globalThis||typeof globalThis<"u"&&r===globalThis)return"{ [object globalThis] }";if(!le(r)&&!z(r)){var Ue=_e(r,ne),kr=k?k(r)===Object.prototype:r instanceof Object||r.constructor===Object,je=r instanceof Object?"":"null prototype",Hr=!kr&&W&&Object(r)===r&&W in r?b.call(re(r),8,-1):je?"Object":"",un=kr||typeof r.constructor!="function"?"":r.constructor.name?r.constructor.name+" ":"",We=un+(Hr||je?"["+y.call(a.call([],Hr||[],je||[]),": ")+"] ":"");return Ue.length===0?We+"{}":Se?We+"{"+$e(Ue,Se)+"}":We+"{ "+y.call(Ue,", ")+" }"}return String(r)};function ue(e,r,T){var L=T.quoteStyle||r,j=ie[L];return j+e+j}function ae(e){return A.call(String(e),/"/g,""")}function Z(e){return!W||!(typeof e=="object"&&(W in e||typeof e[W]<"u"))}function fe(e){return re(e)==="[object Array]"&&Z(e)}function le(e){return re(e)==="[object Date]"&&Z(e)}function z(e){return re(e)==="[object RegExp]"&&Z(e)}function D(e){return re(e)==="[object Error]"&&Z(e)}function G(e){return re(e)==="[object String]"&&Z(e)}function B(e){return re(e)==="[object Number]"&&Z(e)}function H(e){return re(e)==="[object Boolean]"&&Z(e)}function Q(e){if(M)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!U)return!1;try{return U.call(e),!0}catch{}return!1}function ee(e){if(!e||typeof e!="object"||!q)return!1;try{return q.call(e),!0}catch{}return!1}var V=Object.prototype.hasOwnProperty||function(e){return e in this};function J(e,r){return V.call(e,r)}function re(e){return f.call(e)}function ve(e){if(e.name)return e.name;var r=E.call(o.call(e),/^function\s*([\w$]+)/);return r?r[1]:null}function ce(e,r){if(e.indexOf)return e.indexOf(r);for(var T=0,L=e.length;T<L;T++)if(e[T]===r)return T;return-1}function te(e){if(!p||!e||typeof e!="object")return!1;try{p.call(e);try{S.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function he(e){if(!c||!e||typeof e!="object")return!1;try{c.call(e,c);try{h.call(e,h)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function ge(e){if(!P||!e||typeof e!="object")return!1;try{return P.call(e),!0}catch{}return!1}function me(e){if(!S||!e||typeof e!="object")return!1;try{S.call(e);try{p.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function rn(e){if(!h||!e||typeof e!="object")return!1;try{h.call(e,h);try{c.call(e,c)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function tn(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function Nr(e,r){if(e.length>r.maxStringLength){var T=e.length-r.maxStringLength,L="... "+T+" more character"+(T>1?"s":"");return Nr(b.call(e,0,r.maxStringLength),r)+L}var j=oe[r.quoteStyle||"single"];j.lastIndex=0;var F=A.call(A.call(e,j,"\\$1"),/[\x00-\x1f]/g,nn);return ue(F,"single",r)}function nn(e){var r=e.charCodeAt(0),T={8:"b",9:"t",10:"n",12:"f",13:"r"}[r];return T?"\\"+T:"\\x"+(r<16?"0":"")+C.call(r.toString(16))}function Oe(e){return"Object("+e+")"}function De(e){return e+" { ? }"}function Br(e,r,T,L){var j=L?$e(T,L):y.call(T,", ");return e+" ("+r+") {"+j+"}"}function an(e){for(var r=0;r<e.length;r++)if(ce(e[r],`
|
|
2
2
|
`)>=0)return!1;return!0}function on(e,r){var T;if(e.indent===" ")T=" ";else if(typeof e.indent=="number"&&e.indent>0)T=y.call(Array(e.indent+1)," ");else return null;return{base:T,prev:y.call(Array(r+1),T)}}function $e(e,r){if(e.length===0)return"";var T=`
|
|
3
3
|
`+r.prev+r.base;return T+y.call(e,","+T)+`
|
|
4
4
|
`+r.prev}function _e(e,r){var T=fe(e),L=[];if(T){L.length=e.length;for(var j=0;j<e.length;j++)L[j]=J(e,j)?r(e[j],e):""}var F=typeof I=="function"?I(e):[],se;if(M){se={};for(var pe=0;pe<F.length;pe++)se["$"+F[pe]]=F[pe]}for(var X in e)J(e,X)&&(T&&String(Number(X))===X&&X<e.length||M&&se["$"+X]instanceof Symbol||(O.call(/[^\w$]/,X)?L.push(r(X,e)+": "+r(e[X],e)):L.push(X+": "+r(e[X],e))));if(typeof I=="function")for(var ye=0;ye<F.length;ye++)$.call(e,F[ye])&&L.push("["+r(F[ye])+"]: "+r(e[F[ye]],e));return L}return ke}var He,Vr;function gn(){if(Vr)return He;Vr=1;var i=Fe(),s=we(),p=function(t,u,c){for(var v=t,h;(h=v.next)!=null;v=h)if(h.key===u)return v.next=h.next,c||(h.next=t.next,t.next=h),h},l=function(t,u){if(t){var c=p(t,u);return c&&c.value}},g=function(t,u,c){var v=p(t,u);v?v.value=c:t.next={key:u,next:t.next,value:c}},m=function(t,u){return t?!!p(t,u):!1},S=function(t,u){if(t)return p(t,u,!0)};return He=function(){var u,c={assert:function(v){if(!c.has(v))throw new s("Side channel does not contain "+i(v))},delete:function(v){var h=u&&u.next,x=S(u,v);return x&&h&&h===x&&(u=void 0),!!x},get:function(v){return l(u,v)},has:function(v){return m(u,v)},set:function(v,h){u||(u={next:void 0}),g(u,v,h)}};return c},He}var ze,Jr;function kt(){return Jr||(Jr=1,ze=Object),ze}var Ke,Xr;function mn(){return Xr||(Xr=1,Ke=Error),Ke}var Qe,Yr;function Sn(){return Yr||(Yr=1,Qe=EvalError),Qe}var Ve,Zr;function bn(){return Zr||(Zr=1,Ve=RangeError),Ve}var Je,et;function wn(){return et||(et=1,Je=ReferenceError),Je}var Xe,rt;function On(){return rt||(rt=1,Xe=SyntaxError),Xe}var Ye,tt;function An(){return tt||(tt=1,Ye=URIError),Ye}var Ze,nt;function En(){return nt||(nt=1,Ze=Math.abs),Ze}var er,at;function Pn(){return at||(at=1,er=Math.floor),er}var rr,it;function Rn(){return it||(it=1,rr=Math.max),rr}var tr,ot;function _n(){return ot||(ot=1,tr=Math.min),tr}var nr,ut;function qn(){return ut||(ut=1,nr=Math.pow),nr}var ar,ft;function xn(){return ft||(ft=1,ar=Math.round),ar}var ir,lt;function In(){return lt||(lt=1,ir=Number.isNaN||function(s){return s!==s}),ir}var or,ct;function Fn(){if(ct)return or;ct=1;var i=In();return or=function(p){return i(p)||p===0?p:p<0?-1:1},or}var ur,st;function Cn(){return st||(st=1,ur=Object.getOwnPropertyDescriptor),ur}var fr,yt;function Ht(){if(yt)return fr;yt=1;var i=Cn();if(i)try{i([],"length")}catch{i=null}return fr=i,fr}var lr,pt;function Mn(){if(pt)return lr;pt=1;var i=Object.defineProperty||!1;if(i)try{i({},"a",{value:1})}catch{i=!1}return lr=i,lr}var cr,dt;function Dn(){return dt||(dt=1,cr=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var s={},p=Symbol("test"),l=Object(p);if(typeof p=="string"||Object.prototype.toString.call(p)!=="[object Symbol]"||Object.prototype.toString.call(l)!=="[object Symbol]")return!1;var g=42;s[p]=g;for(var m in s)return!1;if(typeof Object.keys=="function"&&Object.keys(s).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(s).length!==0)return!1;var S=Object.getOwnPropertySymbols(s);if(S.length!==1||S[0]!==p||!Object.prototype.propertyIsEnumerable.call(s,p))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var t=Object.getOwnPropertyDescriptor(s,p);if(t.value!==g||t.enumerable!==!0)return!1}return!0}),cr}var sr,vt;function $n(){if(vt)return sr;vt=1;var i=typeof Symbol<"u"&&Symbol,s=Dn();return sr=function(){return typeof i!="function"||typeof Symbol!="function"||typeof i("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:s()},sr}var yr,ht;function zt(){return ht||(ht=1,yr=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),yr}var pr,gt;function Kt(){if(gt)return pr;gt=1;var i=kt();return pr=i.getPrototypeOf||null,pr}var dr,mt;function Tn(){if(mt)return dr;mt=1;var i="Function.prototype.bind called on incompatible ",s=Object.prototype.toString,p=Math.max,l="[object Function]",g=function(u,c){for(var v=[],h=0;h<u.length;h+=1)v[h]=u[h];for(var x=0;x<c.length;x+=1)v[x+u.length]=c[x];return v},m=function(u,c){for(var v=[],h=c,x=0;h<u.length;h+=1,x+=1)v[x]=u[h];return v},S=function(t,u){for(var c="",v=0;v<t.length;v+=1)c+=t[v],v+1<t.length&&(c+=u);return c};return dr=function(u){var c=this;if(typeof c!="function"||s.apply(c)!==l)throw new TypeError(i+c);for(var v=m(arguments,1),h,x=function(){if(this instanceof h){var E=c.apply(this,g(v,arguments));return Object(E)===E?E:this}return c.apply(u,g(v,arguments))},P=p(0,c.length-v.length),n=[],f=0;f<P;f++)n[f]="$"+f;if(h=Function("binder","return function ("+S(n,",")+"){ return binder.apply(this,arguments); }")(x),c.prototype){var o=function(){};o.prototype=c.prototype,h.prototype=new o,o.prototype=null}return h},dr}var vr,St;function Ce(){if(St)return vr;St=1;var i=Tn();return vr=Function.prototype.bind||i,vr}var hr,bt;function Dr(){return bt||(bt=1,hr=Function.prototype.call),hr}var gr,wt;function Qt(){return wt||(wt=1,gr=Function.prototype.apply),gr}var mr,Ot;function Nn(){return Ot||(Ot=1,mr=typeof Reflect<"u"&&Reflect&&Reflect.apply),mr}var Sr,At;function Bn(){if(At)return Sr;At=1;var i=Ce(),s=Qt(),p=Dr(),l=Nn();return Sr=l||i.call(p,s),Sr}var br,Et;function Vt(){if(Et)return br;Et=1;var i=Ce(),s=we(),p=Dr(),l=Bn();return br=function(m){if(m.length<1||typeof m[0]!="function")throw new s("a function is required");return l(i,p,m)},br}var wr,Pt;function Ln(){if(Pt)return wr;Pt=1;var i=Vt(),s=Ht(),p;try{p=[].__proto__===Array.prototype}catch(S){if(!S||typeof S!="object"||!("code"in S)||S.code!=="ERR_PROTO_ACCESS")throw S}var l=!!p&&s&&s(Object.prototype,"__proto__"),g=Object,m=g.getPrototypeOf;return wr=l&&typeof l.get=="function"?i([l.get]):typeof m=="function"?function(t){return m(t==null?t:g(t))}:!1,wr}var Or,Rt;function Un(){if(Rt)return Or;Rt=1;var i=zt(),s=Kt(),p=Ln();return Or=i?function(g){return i(g)}:s?function(g){if(!g||typeof g!="object"&&typeof g!="function")throw new TypeError("getProto: not an object");return s(g)}:p?function(g){return p(g)}:null,Or}var Ar,_t;function jn(){if(_t)return Ar;_t=1;var i=Function.prototype.call,s=Object.prototype.hasOwnProperty,p=Ce();return Ar=p.call(i,s),Ar}var Er,qt;function $r(){if(qt)return Er;qt=1;var i,s=kt(),p=mn(),l=Sn(),g=bn(),m=wn(),S=On(),t=we(),u=An(),c=En(),v=Pn(),h=Rn(),x=_n(),P=qn(),n=xn(),f=Fn(),o=Function,E=function(z){try{return o('"use strict"; return ('+z+").constructor;")()}catch{}},b=Ht(),A=Mn(),C=function(){throw new t},_=b?(function(){try{return arguments.callee,C}catch{try{return b(arguments,"callee").get}catch{return C}}})():C,O=$n()(),a=Un(),y=Kt(),w=zt(),R=Qt(),q=Dr(),I={},U=typeof Uint8Array>"u"||!a?i:a(Uint8Array),M={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?i:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?i:ArrayBuffer,"%ArrayIteratorPrototype%":O&&a?a([][Symbol.iterator]()):i,"%AsyncFromSyncIteratorPrototype%":i,"%AsyncFunction%":I,"%AsyncGenerator%":I,"%AsyncGeneratorFunction%":I,"%AsyncIteratorPrototype%":I,"%Atomics%":typeof Atomics>"u"?i:Atomics,"%BigInt%":typeof BigInt>"u"?i:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?i:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?i:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?i:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":p,"%eval%":eval,"%EvalError%":l,"%Float16Array%":typeof Float16Array>"u"?i:Float16Array,"%Float32Array%":typeof Float32Array>"u"?i:Float32Array,"%Float64Array%":typeof Float64Array>"u"?i:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?i:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":I,"%Int8Array%":typeof Int8Array>"u"?i:Int8Array,"%Int16Array%":typeof Int16Array>"u"?i:Int16Array,"%Int32Array%":typeof Int32Array>"u"?i:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":O&&a?a(a([][Symbol.iterator]())):i,"%JSON%":typeof JSON=="object"?JSON:i,"%Map%":typeof Map>"u"?i:Map,"%MapIteratorPrototype%":typeof Map>"u"||!O||!a?i:a(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":s,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?i:Promise,"%Proxy%":typeof Proxy>"u"?i:Proxy,"%RangeError%":g,"%ReferenceError%":m,"%Reflect%":typeof Reflect>"u"?i:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?i:Set,"%SetIteratorPrototype%":typeof Set>"u"||!O||!a?i:a(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?i:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":O&&a?a(""[Symbol.iterator]()):i,"%Symbol%":O?Symbol:i,"%SyntaxError%":S,"%ThrowTypeError%":_,"%TypedArray%":U,"%TypeError%":t,"%Uint8Array%":typeof Uint8Array>"u"?i:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?i:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?i:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?i:Uint32Array,"%URIError%":u,"%WeakMap%":typeof WeakMap>"u"?i:WeakMap,"%WeakRef%":typeof WeakRef>"u"?i:WeakRef,"%WeakSet%":typeof WeakSet>"u"?i:WeakSet,"%Function.prototype.call%":q,"%Function.prototype.apply%":R,"%Object.defineProperty%":A,"%Object.getPrototypeOf%":y,"%Math.abs%":c,"%Math.floor%":v,"%Math.max%":h,"%Math.min%":x,"%Math.pow%":P,"%Math.round%":n,"%Math.sign%":f,"%Reflect.getPrototypeOf%":w};if(a)try{null.error}catch(z){var W=a(a(z));M["%Error.prototype%"]=W}var $=function z(D){var G;if(D==="%AsyncFunction%")G=E("async function () {}");else if(D==="%GeneratorFunction%")G=E("function* () {}");else if(D==="%AsyncGeneratorFunction%")G=E("async function* () {}");else if(D==="%AsyncGenerator%"){var B=z("%AsyncGeneratorFunction%");B&&(G=B.prototype)}else if(D==="%AsyncIteratorPrototype%"){var H=z("%AsyncGenerator%");H&&a&&(G=a(H.prototype))}return M[D]=G,G},k={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},d=Ce(),N=jn(),K=d.call(q,Array.prototype.concat),Y=d.call(R,Array.prototype.splice),ie=d.call(q,String.prototype.replace),oe=d.call(q,String.prototype.slice),ue=d.call(q,RegExp.prototype.exec),ae=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Z=/\\(\\)?/g,fe=function(D){var G=oe(D,0,1),B=oe(D,-1);if(G==="%"&&B!=="%")throw new S("invalid intrinsic syntax, expected closing `%`");if(B==="%"&&G!=="%")throw new S("invalid intrinsic syntax, expected opening `%`");var H=[];return ie(D,ae,function(Q,ee,V,J){H[H.length]=V?ie(J,Z,"$1"):ee||Q}),H},le=function(D,G){var B=D,H;if(N(k,B)&&(H=k[B],B="%"+H[0]+"%"),N(M,B)){var Q=M[B];if(Q===I&&(Q=$(B)),typeof Q>"u"&&!G)throw new t("intrinsic "+D+" exists, but is not available. Please file an issue!");return{alias:H,name:B,value:Q}}throw new S("intrinsic "+D+" does not exist!")};return Er=function(D,G){if(typeof D!="string"||D.length===0)throw new t("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof G!="boolean")throw new t('"allowMissing" argument must be a boolean');if(ue(/^%?[^%]*%?$/,D)===null)throw new S("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var B=fe(D),H=B.length>0?B[0]:"",Q=le("%"+H+"%",G),ee=Q.name,V=Q.value,J=!1,re=Q.alias;re&&(H=re[0],Y(B,K([0,1],re)));for(var ve=1,ce=!0;ve<B.length;ve+=1){var te=B[ve],he=oe(te,0,1),ge=oe(te,-1);if((he==='"'||he==="'"||he==="`"||ge==='"'||ge==="'"||ge==="`")&&he!==ge)throw new S("property names with quotes must have matching quotes");if((te==="constructor"||!ce)&&(J=!0),H+="."+te,ee="%"+H+"%",N(M,ee))V=M[ee];else if(V!=null){if(!(te in V)){if(!G)throw new t("base intrinsic for "+D+" exists, but the property is not available.");return}if(b&&ve+1>=B.length){var me=b(V,te);ce=!!me,ce&&"get"in me&&!("originalValue"in me.get)?V=me.get:V=V[te]}else ce=N(V,te),V=V[te];ce&&!J&&(M[ee]=V)}}return V},Er}var Pr,xt;function Jt(){if(xt)return Pr;xt=1;var i=$r(),s=Vt(),p=s([i("%String.prototype.indexOf%")]);return Pr=function(g,m){var S=i(g,!!m);return typeof S=="function"&&p(g,".prototype.")>-1?s([S]):S},Pr}var Rr,It;function Xt(){if(It)return Rr;It=1;var i=$r(),s=Jt(),p=Fe(),l=we(),g=i("%Map%",!0),m=s("Map.prototype.get",!0),S=s("Map.prototype.set",!0),t=s("Map.prototype.has",!0),u=s("Map.prototype.delete",!0),c=s("Map.prototype.size",!0);return Rr=!!g&&function(){var h,x={assert:function(P){if(!x.has(P))throw new l("Side channel does not contain "+p(P))},delete:function(P){if(h){var n=u(h,P);return c(h)===0&&(h=void 0),n}return!1},get:function(P){if(h)return m(h,P)},has:function(P){return h?t(h,P):!1},set:function(P,n){h||(h=new g),S(h,P,n)}};return x},Rr}var _r,Ft;function Wn(){if(Ft)return _r;Ft=1;var i=$r(),s=Jt(),p=Fe(),l=Xt(),g=we(),m=i("%WeakMap%",!0),S=s("WeakMap.prototype.get",!0),t=s("WeakMap.prototype.set",!0),u=s("WeakMap.prototype.has",!0),c=s("WeakMap.prototype.delete",!0);return _r=m?function(){var h,x,P={assert:function(n){if(!P.has(n))throw new g("Side channel does not contain "+p(n))},delete:function(n){if(m&&n&&(typeof n=="object"||typeof n=="function")){if(h)return c(h,n)}else if(l&&x)return x.delete(n);return!1},get:function(n){return m&&n&&(typeof n=="object"||typeof n=="function")&&h?S(h,n):x&&x.get(n)},has:function(n){return m&&n&&(typeof n=="object"||typeof n=="function")&&h?u(h,n):!!x&&x.has(n)},set:function(n,f){m&&n&&(typeof n=="object"||typeof n=="function")?(h||(h=new m),t(h,n,f)):l&&(x||(x=l()),x.set(n,f))}};return P}:l,_r}var qr,Ct;function Yt(){if(Ct)return qr;Ct=1;var i=we(),s=Fe(),p=gn(),l=Xt(),g=Wn(),m=g||l||p;return qr=function(){var t,u={assert:function(c){if(!u.has(c))throw new i("Side channel does not contain "+s(c))},delete:function(c){return!!t&&t.delete(c)},get:function(c){return t&&t.get(c)},has:function(c){return!!t&&t.has(c)},set:function(c,v){t||(t=m()),t.set(c,v)}};return u},qr}var xr,Mt;function Tr(){if(Mt)return xr;Mt=1;var i=String.prototype.replace,s=/%20/g,p={RFC1738:"RFC1738",RFC3986:"RFC3986"};return xr={default:p.RFC3986,formatters:{RFC1738:function(l){return i.call(l,s,"+")},RFC3986:function(l){return String(l)}},RFC1738:p.RFC1738,RFC3986:p.RFC3986},xr}var Ir,Dt;function Zt(){if(Dt)return Ir;Dt=1;var i=Tr(),s=Yt(),p=Object.prototype.hasOwnProperty,l=Array.isArray,g=s(),m=function(a,y){return g.set(a,y),a},S=function(a){return g.has(a)},t=function(a){return g.get(a)},u=function(a,y){g.set(a,y)},c=(function(){for(var O=[],a=0;a<256;++a)O[O.length]="%"+((a<16?"0":"")+a.toString(16)).toUpperCase();return O})(),v=function(a){for(;a.length>1;){var y=a.pop(),w=y.obj[y.prop];if(l(w)){for(var R=[],q=0;q<w.length;++q)typeof w[q]<"u"&&(R[R.length]=w[q]);y.obj[y.prop]=R}}},h=function(a,y){for(var w=y&&y.plainObjects?{__proto__:null}:{},R=0;R<a.length;++R)typeof a[R]<"u"&&(w[R]=a[R]);return w},x=function O(a,y,w){if(!y)return a;if(typeof y!="object"&&typeof y!="function"){if(l(a)){var R=a.length;if(w&&typeof w.arrayLimit=="number"&&R>w.arrayLimit)return m(h(a.concat(y),w),R);a[R]=y}else if(a&&typeof a=="object")if(S(a)){var q=t(a)+1;a[q]=y,u(a,q)}else{if(w&&w.strictMerge)return[a,y];(w&&(w.plainObjects||w.allowPrototypes)||!p.call(Object.prototype,y))&&(a[y]=!0)}else return[a,y];return a}if(!a||typeof a!="object"){if(S(y)){for(var I=Object.keys(y),U=w&&w.plainObjects?{__proto__:null,0:a}:{0:a},M=0;M<I.length;M++){var W=parseInt(I[M],10);U[W+1]=y[I[M]]}return m(U,t(y)+1)}var $=[a].concat(y);return w&&typeof w.arrayLimit=="number"&&$.length>w.arrayLimit?m(h($,w),$.length-1):$}var k=a;return l(a)&&!l(y)&&(k=h(a,w)),l(a)&&l(y)?(y.forEach(function(d,N){if(p.call(a,N)){var K=a[N];K&&typeof K=="object"&&d&&typeof d=="object"?a[N]=O(K,d,w):a[a.length]=d}else a[N]=d}),a):Object.keys(y).reduce(function(d,N){var K=y[N];if(p.call(d,N)?d[N]=O(d[N],K,w):d[N]=K,S(y)&&!S(d)&&m(d,t(y)),S(d)){var Y=parseInt(N,10);String(Y)===N&&Y>=0&&Y>t(d)&&u(d,Y)}return d},k)},P=function(a,y){return Object.keys(y).reduce(function(w,R){return w[R]=y[R],w},a)},n=function(O,a,y){var w=O.replace(/\+/g," ");if(y==="iso-8859-1")return w.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(w)}catch{return w}},f=1024,o=function(a,y,w,R,q){if(a.length===0)return a;var I=a;if(typeof a=="symbol"?I=Symbol.prototype.toString.call(a):typeof a!="string"&&(I=String(a)),w==="iso-8859-1")return escape(I).replace(/%u[0-9a-f]{4}/gi,function(N){return"%26%23"+parseInt(N.slice(2),16)+"%3B"});for(var U="",M=0;M<I.length;M+=f){for(var W=I.length>=f?I.slice(M,M+f):I,$=[],k=0;k<W.length;++k){var d=W.charCodeAt(k);if(d===45||d===46||d===95||d===126||d>=48&&d<=57||d>=65&&d<=90||d>=97&&d<=122||q===i.RFC1738&&(d===40||d===41)){$[$.length]=W.charAt(k);continue}if(d<128){$[$.length]=c[d];continue}if(d<2048){$[$.length]=c[192|d>>6]+c[128|d&63];continue}if(d<55296||d>=57344){$[$.length]=c[224|d>>12]+c[128|d>>6&63]+c[128|d&63];continue}k+=1,d=65536+((d&1023)<<10|W.charCodeAt(k)&1023),$[$.length]=c[240|d>>18]+c[128|d>>12&63]+c[128|d>>6&63]+c[128|d&63]}U+=$.join("")}return U},E=function(a){for(var y=[{obj:{o:a},prop:"o"}],w=[],R=0;R<y.length;++R)for(var q=y[R],I=q.obj[q.prop],U=Object.keys(I),M=0;M<U.length;++M){var W=U[M],$=I[W];typeof $=="object"&&$!==null&&w.indexOf($)===-1&&(y[y.length]={obj:I,prop:W},w[w.length]=$)}return v(y),a},b=function(a){return Object.prototype.toString.call(a)==="[object RegExp]"},A=function(a){return!a||typeof a!="object"?!1:!!(a.constructor&&a.constructor.isBuffer&&a.constructor.isBuffer(a))},C=function(a,y,w,R){if(S(a)){var q=t(a)+1;return a[q]=y,u(a,q),a}var I=[].concat(a,y);return I.length>w?m(h(I,{plainObjects:R}),I.length-1):I},_=function(a,y){if(l(a)){for(var w=[],R=0;R<a.length;R+=1)w[w.length]=y(a[R]);return w}return y(a)};return Ir={arrayToObject:h,assign:P,combine:C,compact:E,decode:n,encode:o,isBuffer:A,isOverflow:S,isRegExp:b,markOverflow:m,maybeMap:_,merge:x},Ir}var Fr,$t;function Gn(){if($t)return Fr;$t=1;var i=Yt(),s=Zt(),p=Tr(),l=Object.prototype.hasOwnProperty,g={brackets:function(o){return o+"[]"},comma:"comma",indices:function(o,E){return o+"["+E+"]"},repeat:function(o){return o}},m=Array.isArray,S=Array.prototype.push,t=function(f,o){S.apply(f,m(o)?o:[o])},u=Date.prototype.toISOString,c=p.default,v={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:s.encode,encodeValuesOnly:!1,filter:void 0,format:c,formatter:p.formatters[c],indices:!1,serializeDate:function(o){return u.call(o)},skipNulls:!1,strictNullHandling:!1},h=function(o){return typeof o=="string"||typeof o=="number"||typeof o=="boolean"||typeof o=="symbol"||typeof o=="bigint"},x={},P=function f(o,E,b,A,C,_,O,a,y,w,R,q,I,U,M,W,$,k){for(var d=o,N=k,K=0,Y=!1;(N=N.get(x))!==void 0&&!Y;){var ie=N.get(o);if(K+=1,typeof ie<"u"){if(ie===K)throw new RangeError("Cyclic object value");Y=!0}typeof N.get(x)>"u"&&(K=0)}if(typeof w=="function"?d=w(E,d):d instanceof Date?d=I(d):b==="comma"&&m(d)&&(d=s.maybeMap(d,function(ee){return ee instanceof Date?I(ee):ee})),d===null){if(_)return y&&!W?y(E,v.encoder,$,"key",U):E;d=""}if(h(d)||s.isBuffer(d)){if(y){var oe=W?E:y(E,v.encoder,$,"key",U);return[M(oe)+"="+M(y(d,v.encoder,$,"value",U))]}return[M(E)+"="+M(String(d))]}var ue=[];if(typeof d>"u")return ue;var ae;if(b==="comma"&&m(d))W&&y&&(d=s.maybeMap(d,y)),ae=[{value:d.length>0?d.join(",")||null:void 0}];else if(m(w))ae=w;else{var Z=Object.keys(d);ae=R?Z.sort(R):Z}var fe=a?String(E).replace(/\./g,"%2E"):String(E),le=A&&m(d)&&d.length===1?fe+"[]":fe;if(C&&m(d)&&d.length===0)return le+"[]";for(var z=0;z<ae.length;++z){var D=ae[z],G=typeof D=="object"&&D&&typeof D.value<"u"?D.value:d[D];if(!(O&&G===null)){var B=q&&a?String(D).replace(/\./g,"%2E"):String(D),H=m(d)?typeof b=="function"?b(le,B):le:le+(q?"."+B:"["+B+"]");k.set(o,K);var Q=i();Q.set(x,k),t(ue,f(G,H,b,A,C,_,O,a,b==="comma"&&W&&m(d)?null:y,w,R,q,I,U,M,W,$,Q))}}return ue},n=function(o){if(!o)return v;if(typeof o.allowEmptyArrays<"u"&&typeof o.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof o.encodeDotInKeys<"u"&&typeof o.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(o.encoder!==null&&typeof o.encoder<"u"&&typeof o.encoder!="function")throw new TypeError("Encoder has to be a function.");var E=o.charset||v.charset;if(typeof o.charset<"u"&&o.charset!=="utf-8"&&o.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var b=p.default;if(typeof o.format<"u"){if(!l.call(p.formatters,o.format))throw new TypeError("Unknown format option provided.");b=o.format}var A=p.formatters[b],C=v.filter;(typeof o.filter=="function"||m(o.filter))&&(C=o.filter);var _;if(o.arrayFormat in g?_=o.arrayFormat:"indices"in o?_=o.indices?"indices":"repeat":_=v.arrayFormat,"commaRoundTrip"in o&&typeof o.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var O=typeof o.allowDots>"u"?o.encodeDotInKeys===!0?!0:v.allowDots:!!o.allowDots;return{addQueryPrefix:typeof o.addQueryPrefix=="boolean"?o.addQueryPrefix:v.addQueryPrefix,allowDots:O,allowEmptyArrays:typeof o.allowEmptyArrays=="boolean"?!!o.allowEmptyArrays:v.allowEmptyArrays,arrayFormat:_,charset:E,charsetSentinel:typeof o.charsetSentinel=="boolean"?o.charsetSentinel:v.charsetSentinel,commaRoundTrip:!!o.commaRoundTrip,delimiter:typeof o.delimiter>"u"?v.delimiter:o.delimiter,encode:typeof o.encode=="boolean"?o.encode:v.encode,encodeDotInKeys:typeof o.encodeDotInKeys=="boolean"?o.encodeDotInKeys:v.encodeDotInKeys,encoder:typeof o.encoder=="function"?o.encoder:v.encoder,encodeValuesOnly:typeof o.encodeValuesOnly=="boolean"?o.encodeValuesOnly:v.encodeValuesOnly,filter:C,format:b,formatter:A,serializeDate:typeof o.serializeDate=="function"?o.serializeDate:v.serializeDate,skipNulls:typeof o.skipNulls=="boolean"?o.skipNulls:v.skipNulls,sort:typeof o.sort=="function"?o.sort:null,strictNullHandling:typeof o.strictNullHandling=="boolean"?o.strictNullHandling:v.strictNullHandling}};return Fr=function(f,o){var E=f,b=n(o),A,C;typeof b.filter=="function"?(C=b.filter,E=C("",E)):m(b.filter)&&(C=b.filter,A=C);var _=[];if(typeof E!="object"||E===null)return"";var O=g[b.arrayFormat],a=O==="comma"&&b.commaRoundTrip;A||(A=Object.keys(E)),b.sort&&A.sort(b.sort);for(var y=i(),w=0;w<A.length;++w){var R=A[w],q=E[R];b.skipNulls&&q===null||t(_,P(q,R,O,a,b.allowEmptyArrays,b.strictNullHandling,b.skipNulls,b.encodeDotInKeys,b.encode?b.encoder:null,b.filter,b.sort,b.allowDots,b.serializeDate,b.format,b.formatter,b.encodeValuesOnly,b.charset,y))}var I=_.join(b.delimiter),U=b.addQueryPrefix===!0?"?":"";return b.charsetSentinel&&(b.charset==="iso-8859-1"?U+="utf8=%26%2310003%3B&":U+="utf8=%E2%9C%93&"),I.length>0?U+I:""},Fr}var Cr,Tt;function kn(){if(Tt)return Cr;Tt=1;var i=Zt(),s=Object.prototype.hasOwnProperty,p=Array.isArray,l={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:i.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},g=function(P){return P.replace(/&#(\d+);/g,function(n,f){return String.fromCharCode(parseInt(f,10))})},m=function(P,n,f){if(P&&typeof P=="string"&&n.comma&&P.indexOf(",")>-1)return P.split(",");if(n.throwOnLimitExceeded&&f>=n.arrayLimit)throw new RangeError("Array limit exceeded. Only "+n.arrayLimit+" element"+(n.arrayLimit===1?"":"s")+" allowed in an array.");return P},S="utf8=%26%2310003%3B",t="utf8=%E2%9C%93",u=function(n,f){var o={__proto__:null},E=f.ignoreQueryPrefix?n.replace(/^\?/,""):n;E=E.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var b=f.parameterLimit===1/0?void 0:f.parameterLimit,A=E.split(f.delimiter,f.throwOnLimitExceeded&&typeof b<"u"?b+1:b);if(f.throwOnLimitExceeded&&typeof b<"u"&&A.length>b)throw new RangeError("Parameter limit exceeded. Only "+b+" parameter"+(b===1?"":"s")+" allowed.");var C=-1,_,O=f.charset;if(f.charsetSentinel)for(_=0;_<A.length;++_)A[_].indexOf("utf8=")===0&&(A[_]===t?O="utf-8":A[_]===S&&(O="iso-8859-1"),C=_,_=A.length);for(_=0;_<A.length;++_)if(_!==C){var a=A[_],y=a.indexOf("]="),w=y===-1?a.indexOf("="):y+1,R,q;if(w===-1?(R=f.decoder(a,l.decoder,O,"key"),q=f.strictNullHandling?null:""):(R=f.decoder(a.slice(0,w),l.decoder,O,"key"),R!==null&&(q=i.maybeMap(m(a.slice(w+1),f,p(o[R])?o[R].length:0),function(U){return f.decoder(U,l.decoder,O,"value")}))),q&&f.interpretNumericEntities&&O==="iso-8859-1"&&(q=g(String(q))),a.indexOf("[]=")>-1&&(q=p(q)?[q]:q),f.comma&&p(q)&&q.length>f.arrayLimit){if(f.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+f.arrayLimit+" element"+(f.arrayLimit===1?"":"s")+" allowed in an array.");q=i.combine([],q,f.arrayLimit,f.plainObjects)}if(R!==null){var I=s.call(o,R);I&&(f.duplicates==="combine"||a.indexOf("[]=")>-1)?o[R]=i.combine(o[R],q,f.arrayLimit,f.plainObjects):(!I||f.duplicates==="last")&&(o[R]=q)}}return o},c=function(P,n,f,o){var E=0;if(P.length>0&&P[P.length-1]==="[]"){var b=P.slice(0,-1).join("");E=Array.isArray(n)&&n[b]?n[b].length:0}for(var A=o?n:m(n,f,E),C=P.length-1;C>=0;--C){var _,O=P[C];if(O==="[]"&&f.parseArrays)i.isOverflow(A)?_=A:_=f.allowEmptyArrays&&(A===""||f.strictNullHandling&&A===null)?[]:i.combine([],A,f.arrayLimit,f.plainObjects);else{_=f.plainObjects?{__proto__:null}:{};var a=O.charAt(0)==="["&&O.charAt(O.length-1)==="]"?O.slice(1,-1):O,y=f.decodeDotInKeys?a.replace(/%2E/g,"."):a,w=parseInt(y,10),R=!isNaN(w)&&O!==y&&String(w)===y&&w>=0&&f.parseArrays;if(!f.parseArrays&&y==="")_={0:A};else if(R&&w<f.arrayLimit)_=[],_[w]=A;else{if(R&&f.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+f.arrayLimit+" element"+(f.arrayLimit===1?"":"s")+" allowed in an array.");R?(_[w]=A,i.markOverflow(_,w)):y!=="__proto__"&&(_[y]=A)}}A=_}return A},v=function(n,f){var o=f.allowDots?n.replace(/\.([^.[]+)/g,"[$1]"):n;if(f.depth<=0)return!f.plainObjects&&s.call(Object.prototype,o)&&!f.allowPrototypes?void 0:[o];var E=/(\[[^[\]]*])/,b=/(\[[^[\]]*])/g,A=E.exec(o),C=A?o.slice(0,A.index):o,_=[];if(C){if(!f.plainObjects&&s.call(Object.prototype,C)&&!f.allowPrototypes)return;_[_.length]=C}for(var O=0;(A=b.exec(o))!==null&&O<f.depth;){O+=1;var a=A[1].slice(1,-1);if(!f.plainObjects&&s.call(Object.prototype,a)&&!f.allowPrototypes)return;_[_.length]=A[1]}if(A){if(f.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+f.depth+" and strictDepth is true");_[_.length]="["+o.slice(A.index)+"]"}return _},h=function(n,f,o,E){if(n){var b=v(n,o);if(b)return c(b,f,o,E)}},x=function(n){if(!n)return l;if(typeof n.allowEmptyArrays<"u"&&typeof n.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof n.decodeDotInKeys<"u"&&typeof n.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(n.decoder!==null&&typeof n.decoder<"u"&&typeof n.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof n.charset<"u"&&n.charset!=="utf-8"&&n.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof n.throwOnLimitExceeded<"u"&&typeof n.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var f=typeof n.charset>"u"?l.charset:n.charset,o=typeof n.duplicates>"u"?l.duplicates:n.duplicates;if(o!=="combine"&&o!=="first"&&o!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var E=typeof n.allowDots>"u"?n.decodeDotInKeys===!0?!0:l.allowDots:!!n.allowDots;return{allowDots:E,allowEmptyArrays:typeof n.allowEmptyArrays=="boolean"?!!n.allowEmptyArrays:l.allowEmptyArrays,allowPrototypes:typeof n.allowPrototypes=="boolean"?n.allowPrototypes:l.allowPrototypes,allowSparse:typeof n.allowSparse=="boolean"?n.allowSparse:l.allowSparse,arrayLimit:typeof n.arrayLimit=="number"?n.arrayLimit:l.arrayLimit,charset:f,charsetSentinel:typeof n.charsetSentinel=="boolean"?n.charsetSentinel:l.charsetSentinel,comma:typeof n.comma=="boolean"?n.comma:l.comma,decodeDotInKeys:typeof n.decodeDotInKeys=="boolean"?n.decodeDotInKeys:l.decodeDotInKeys,decoder:typeof n.decoder=="function"?n.decoder:l.decoder,delimiter:typeof n.delimiter=="string"||i.isRegExp(n.delimiter)?n.delimiter:l.delimiter,depth:typeof n.depth=="number"||n.depth===!1?+n.depth:l.depth,duplicates:o,ignoreQueryPrefix:n.ignoreQueryPrefix===!0,interpretNumericEntities:typeof n.interpretNumericEntities=="boolean"?n.interpretNumericEntities:l.interpretNumericEntities,parameterLimit:typeof n.parameterLimit=="number"?n.parameterLimit:l.parameterLimit,parseArrays:n.parseArrays!==!1,plainObjects:typeof n.plainObjects=="boolean"?n.plainObjects:l.plainObjects,strictDepth:typeof n.strictDepth=="boolean"?!!n.strictDepth:l.strictDepth,strictMerge:typeof n.strictMerge=="boolean"?!!n.strictMerge:l.strictMerge,strictNullHandling:typeof n.strictNullHandling=="boolean"?n.strictNullHandling:l.strictNullHandling,throwOnLimitExceeded:typeof n.throwOnLimitExceeded=="boolean"?n.throwOnLimitExceeded:!1}};return Cr=function(P,n){var f=x(n);if(P===""||P===null||typeof P>"u")return f.plainObjects?{__proto__:null}:{};for(var o=typeof P=="string"?u(P,f):P,E=f.plainObjects?{__proto__:null}:{},b=Object.keys(o),A=0;A<b.length;++A){var C=b[A],_=h(C,o[C],f,typeof P=="string");E=i.merge(E,_,f)}return f.allowSparse===!0?E:i.compact(E)},Cr}var Mr,Nt;function Hn(){if(Nt)return Mr;Nt=1;var i=Gn(),s=kn(),p=Tr();return Mr={formats:p,parse:s,stringify:i},Mr}var Bt;function Me(){if(Bt)return de;Bt=1;var i=de&&de.__importDefault||function(S){return S&&S.__esModule?S:{default:S}};Object.defineProperty(de,"__esModule",{value:!0}),de.Base=void 0;const s=i(Hn()),p=Gt(),l=cn();function g(S){throw S.code==="ECONNREFUSED"?new p.Unavailable(S.message,l._.pick(S,"address","port","config")):(0,p.convert)(S)}class m{constructor(t){this.name=(0,l.stripSlashes)(t.name),this.options=t.options,this.connection=t.connection,this.base=`${t.base}/${this.name}`}makeUrl(t,u,c){let v=this.base;return c&&Object.keys(c).forEach(h=>{v=v.replace(`:${h}`,c[h])}),t=t||{},typeof u<"u"&&u!==null&&(v+=`/${encodeURIComponent(u)}`),v+this.getQuery(t)}getQuery(t){return Object.keys(t).length!==0?`?${s.default.stringify(t)}`:""}methods(...t){return t.forEach(u=>{const c=`_${u}`;this[c]=function(v,h={}){return this.request({body:v,url:this.makeUrl(h.query,null,h.route),method:"POST",headers:Object.assign({"Content-Type":"application/json","X-Service-Method":u},h.headers)},h).catch(g)},this[u]=function(v,h={}){return this[c](v,h)}}),this}_find(t){return this.request({url:this.makeUrl(t.query,null,t.route),method:"GET",headers:Object.assign({},t.headers)},t).catch(g)}find(t){return this._find(t)}_get(t,u){return t===void 0||t===""?Promise.reject(new p.BadRequest("id for .get is required")):this.request({url:this.makeUrl(u.query,t,u.route),method:"GET",headers:Object.assign({},u.headers)},u).catch(g)}get(t,u){return this._get(t,u)}_create(t,u){return this.request({url:this.makeUrl(u.query,null,u.route),body:t,method:"POST",headers:Object.assign({"Content-Type":"application/json"},u.headers)},u).catch(g)}create(t,u){return this._create(t,u)}_update(t,u,c){return t===void 0||t===""?Promise.reject(new p.BadRequest("id for .update is required")):this.request({url:this.makeUrl(c.query,t,c.route),body:u,method:"PUT",headers:Object.assign({"Content-Type":"application/json"},c.headers)},c).catch(g)}update(t,u,c){return this._update(t,u,c)}_patch(t,u,c){return t===void 0||t===""?Promise.reject(new p.BadRequest("id for .patch is required")):this.request({url:this.makeUrl(c.query,t,c.route),body:u,method:"PATCH",headers:Object.assign({"Content-Type":"application/json"},c.headers)},c).catch(g)}patch(t,u,c){return this._patch(t,u,c)}_remove(t,u){return t===void 0||t===""?Promise.reject(new p.BadRequest("id for .remove is required")):this.request({url:this.makeUrl(u.query,t,u.route),method:"DELETE",headers:Object.assign({},u.headers)},u).catch(g)}remove(t,u){return this._remove(t,u)}}return de.Base=m,de}var Ee={},Lt;function zn(){if(Lt)return Ee;Lt=1,Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.AxiosClient=void 0;const i=Me();class s extends i.Base{request(l,g){const m=Object.assign({url:l.url,method:l.method,data:l.body,headers:Object.assign({Accept:"application/json"},this.options.headers,l.headers)},g.connection);return this.connection.request(m).then(S=>S.data).catch(S=>{const t=S.response||S;throw t instanceof Error?t:t.data||t})}}return Ee.AxiosClient=s,Ee}var Pe={},Ut;function Kn(){if(Ut)return Pe;Ut=1,Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.FetchClient=void 0;const i=Gt(),s=Me();class p extends s.Base{request(g,m){const S=Object.assign({},g,m.connection);return S.headers=Object.assign({Accept:"application/json"},this.options.headers,S.headers),g.body&&(S.body=JSON.stringify(g.body)),this.connection(g.url,S).then(this.checkStatus).then(t=>t.status===204?null:t.json())}checkStatus(g){return g.ok?g:g.json().catch(()=>{const m=i.errors[g.status]||Error;return new m("JSON parsing error")}).then(m=>{throw m.response=g,m})}}return Pe.FetchClient=p,Pe}var Re={},jt;function Qn(){if(jt)return Re;jt=1,Object.defineProperty(Re,"__esModule",{value:!0}),Re.SuperagentClient=void 0;const i=Me();class s extends i.Base{request(l,g){const m=this.connection(l.method,l.url).set(this.options.headers||{}).set("Accept","application/json").set(g.connection||{}).set(l.headers||{}).type(l.type||"json");return new Promise((S,t)=>{m.set(l.headers),l.body&&m.send(l.body),m.end(function(u,c){if(u){try{const v=u.response;u=JSON.parse(u.response.text),u.response=v}catch{}return t(u)}S(c&&c.body)})})}}return Re.SuperagentClient=s,Re}var Wt;function Vn(){return Wt||(Wt=1,(function(i,s){Object.defineProperty(s,"__esModule",{value:!0}),s.SuperagentClient=s.FetchClient=s.AxiosClient=void 0,s.default=u;const p=sn(),l=Me(),g=zn();Object.defineProperty(s,"AxiosClient",{enumerable:!0,get:function(){return g.AxiosClient}});const m=Kn();Object.defineProperty(s,"FetchClient",{enumerable:!0,get:function(){return m.FetchClient}});const S=Qn();Object.defineProperty(s,"SuperagentClient",{enumerable:!0,get:function(){return S.SuperagentClient}});const t={superagent:S.SuperagentClient,fetch:m.FetchClient,axios:g.AxiosClient};function u(c=""){const v={Base:l.Base};return Object.keys(t).forEach(h=>{v[h]=function(x,P={},n=t[h]){if(!x)throw new Error(`${h} has to be provided to feathers-rest`);typeof P=="function"&&(n=P,P={});const f=function(E){return new n({base:c,name:E,connection:x,options:P})},o=E=>{if(E.rest!==void 0)throw new Error("Only one default client provider can be configured");E.rest=x,E.defaultService=f,E.mixins.unshift((b,A,C)=>{if(C&&C.methods&&b instanceof l.Base){const _=C.methods.filter(O=>!p.defaultServiceMethods.includes(O));b.methods(..._)}})};return o.Service=n,o.service=f,o}}),v}i.exports=Object.assign(u,i.exports)})(Ie,Ie.exports)),Ie.exports}var en=Vn();const Jn=yn(en),Yn=pn({__proto__:null,default:Jn},[en]);export{Yn as i};
|
|
Binary file
|