@rpamis/comet 0.4.0-beta.18 → 0.4.0-beta.19
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/README.md +18 -3
- package/assets/manifest.json +3 -1
- package/assets/skills/comet/scripts/comet-archive.mjs +121 -121
- package/assets/skills/comet/scripts/comet-entry-runtime.mjs +84 -84
- package/assets/skills/comet/scripts/comet-guard.mjs +152 -152
- package/assets/skills/comet/scripts/comet-handoff.mjs +123 -123
- package/assets/skills/comet/scripts/comet-hook-guard.mjs +75 -75
- package/assets/skills/comet/scripts/comet-hook-router.mjs +91 -91
- package/assets/skills/comet/scripts/comet-intent.mjs +6 -6
- package/assets/skills/comet/scripts/comet-resume-probe.mjs +79 -79
- package/assets/skills/comet/scripts/comet-runtime.mjs +169 -169
- package/assets/skills/comet/scripts/comet-state.mjs +88 -88
- package/assets/skills/comet/scripts/comet-yaml-validate.mjs +97 -97
- package/assets/skills/comet-build/SKILL.md +21 -6
- package/assets/skills/comet-design/SKILL.md +2 -2
- package/assets/skills/comet-native/SKILL.md +7 -7
- package/assets/skills/comet-native/reference/artifacts.md +3 -3
- package/assets/skills/comet-native/reference/clarification.md +1 -1
- package/assets/skills/comet-native/reference/commands.md +3 -3
- package/assets/skills/comet-native/scripts/comet-native-archive.mjs +114 -113
- package/assets/skills/comet-native/scripts/comet-native-doctor.mjs +123 -123
- package/assets/skills/comet-native/scripts/comet-native-hook-guard.mjs +88 -88
- package/assets/skills/comet-native/scripts/comet-native-init.mjs +116 -116
- package/assets/skills/comet-native/scripts/comet-native-new.mjs +100 -100
- package/assets/skills/comet-native/scripts/comet-native-next.mjs +118 -118
- package/assets/skills/comet-native/scripts/comet-native-root.mjs +95 -95
- package/assets/skills/comet-native/scripts/comet-native-runtime.mjs +145 -144
- package/assets/skills/comet-native/scripts/comet-native-select.mjs +101 -101
- package/assets/skills/comet-native/scripts/comet-native-show.mjs +83 -83
- package/assets/skills/comet-native/scripts/comet-native-spec.mjs +87 -87
- package/assets/skills/comet-native/scripts/comet-native-status.mjs +98 -98
- package/assets/skills/comet-review/SKILL.md +121 -0
- package/assets/skills/comet-review/agents/openai.yaml +5 -0
- package/assets/skills-zh/comet-build/SKILL.md +21 -6
- package/assets/skills-zh/comet-design/SKILL.md +2 -2
- package/assets/skills-zh/comet-native/SKILL.md +7 -7
- package/assets/skills-zh/comet-native/reference/artifacts.md +3 -3
- package/assets/skills-zh/comet-native/reference/clarification.md +1 -1
- package/assets/skills-zh/comet-native/reference/commands.md +3 -3
- package/assets/skills-zh/comet-review/SKILL.md +121 -0
- package/assets/skills-zh/comet-review/agents/openai.yaml +5 -0
- package/dist/app/commands/init.d.ts.map +1 -1
- package/dist/app/commands/init.js +5 -9
- package/dist/app/commands/init.js.map +1 -1
- package/dist/app/commands/update.d.ts.map +1 -1
- package/dist/app/commands/update.js +5 -9
- package/dist/app/commands/update.js.map +1 -1
- package/dist/domains/comet-classic/classic-command-context.d.ts +9 -0
- package/dist/domains/comet-classic/classic-command-context.d.ts.map +1 -1
- package/dist/domains/comet-classic/classic-command-context.js +10 -0
- package/dist/domains/comet-classic/classic-command-context.js.map +1 -1
- package/dist/domains/comet-classic/classic-guard.d.ts.map +1 -1
- package/dist/domains/comet-classic/classic-guard.js +2 -2
- package/dist/domains/comet-classic/classic-guard.js.map +1 -1
- package/dist/domains/comet-classic/classic-handoff.d.ts.map +1 -1
- package/dist/domains/comet-classic/classic-handoff.js +44 -6
- package/dist/domains/comet-classic/classic-handoff.js.map +1 -1
- package/dist/domains/comet-classic/classic-hook-guard.d.ts.map +1 -1
- package/dist/domains/comet-classic/classic-hook-guard.js +2 -1
- package/dist/domains/comet-classic/classic-hook-guard.js.map +1 -1
- package/dist/domains/comet-classic/classic-intent-command.d.ts.map +1 -1
- package/dist/domains/comet-classic/classic-intent-command.js +2 -1
- package/dist/domains/comet-classic/classic-intent-command.js.map +1 -1
- package/dist/domains/comet-classic/classic-resume-probe-command.d.ts.map +1 -1
- package/dist/domains/comet-classic/classic-resume-probe-command.js +4 -3
- package/dist/domains/comet-classic/classic-resume-probe-command.js.map +1 -1
- package/dist/domains/comet-classic/classic-runtime-run.d.ts +6 -0
- package/dist/domains/comet-classic/classic-runtime-run.d.ts.map +1 -1
- package/dist/domains/comet-classic/classic-runtime-run.js +58 -9
- package/dist/domains/comet-classic/classic-runtime-run.js.map +1 -1
- package/dist/domains/comet-classic/classic-state-command.d.ts.map +1 -1
- package/dist/domains/comet-classic/classic-state-command.js +8 -5
- package/dist/domains/comet-classic/classic-state-command.js.map +1 -1
- package/dist/domains/comet-classic/classic-validate-command.d.ts.map +1 -1
- package/dist/domains/comet-classic/classic-validate-command.js +2 -2
- package/dist/domains/comet-classic/classic-validate-command.js.map +1 -1
- package/dist/domains/comet-classic/classic-workspace-command.d.ts.map +1 -1
- package/dist/domains/comet-classic/classic-workspace-command.js +3 -3
- package/dist/domains/comet-classic/classic-workspace-command.js.map +1 -1
- package/dist/domains/comet-entry/hook-adapter.d.ts.map +1 -1
- package/dist/domains/comet-entry/hook-adapter.js +4 -1
- package/dist/domains/comet-entry/hook-adapter.js.map +1 -1
- package/dist/domains/comet-native/native-archive-command.d.ts.map +1 -1
- package/dist/domains/comet-native/native-archive-command.js +2 -0
- package/dist/domains/comet-native/native-archive-command.js.map +1 -1
- package/dist/domains/comet-native/native-atomic-file.d.ts.map +1 -1
- package/dist/domains/comet-native/native-atomic-file.js +17 -10
- package/dist/domains/comet-native/native-atomic-file.js.map +1 -1
- package/dist/domains/comet-native/native-children.d.ts +18 -2
- package/dist/domains/comet-native/native-children.d.ts.map +1 -1
- package/dist/domains/comet-native/native-children.js +73 -8
- package/dist/domains/comet-native/native-children.js.map +1 -1
- package/dist/domains/comet-native/native-cli-help.d.ts.map +1 -1
- package/dist/domains/comet-native/native-cli-help.js +10 -4
- package/dist/domains/comet-native/native-cli-help.js.map +1 -1
- package/dist/domains/comet-native/native-cli-shared.d.ts.map +1 -1
- package/dist/domains/comet-native/native-cli-shared.js +18 -5
- package/dist/domains/comet-native/native-cli-shared.js.map +1 -1
- package/dist/domains/comet-native/native-hook-guard.d.ts.map +1 -1
- package/dist/domains/comet-native/native-hook-guard.js +15 -2
- package/dist/domains/comet-native/native-hook-guard.js.map +1 -1
- package/dist/domains/comet-native/native-next-command.d.ts.map +1 -1
- package/dist/domains/comet-native/native-next-command.js +94 -15
- package/dist/domains/comet-native/native-next-command.js.map +1 -1
- package/dist/domains/comet-native/native-portable-continuation.d.ts +19 -7
- package/dist/domains/comet-native/native-portable-continuation.d.ts.map +1 -1
- package/dist/domains/comet-native/native-portable-continuation.js +115 -72
- package/dist/domains/comet-native/native-portable-continuation.js.map +1 -1
- package/dist/domains/comet-native/native-portable-migration-runtime.d.ts.map +1 -1
- package/dist/domains/comet-native/native-portable-migration-runtime.js +9 -4
- package/dist/domains/comet-native/native-portable-migration-runtime.js.map +1 -1
- package/dist/domains/comet-native/native-portable-runtime.d.ts +14 -1
- package/dist/domains/comet-native/native-portable-runtime.d.ts.map +1 -1
- package/dist/domains/comet-native/native-portable-runtime.js +59 -1
- package/dist/domains/comet-native/native-portable-runtime.js.map +1 -1
- package/dist/domains/comet-native/native-pull-request-finish.d.ts +35 -0
- package/dist/domains/comet-native/native-pull-request-finish.d.ts.map +1 -0
- package/dist/domains/comet-native/native-pull-request-finish.js +282 -0
- package/dist/domains/comet-native/native-pull-request-finish.js.map +1 -0
- package/dist/domains/comet-native/native-status-discovery.d.ts.map +1 -1
- package/dist/domains/comet-native/native-status-discovery.js +24 -6
- package/dist/domains/comet-native/native-status-discovery.js.map +1 -1
- package/dist/domains/comet-native/native-workspace-finish.d.ts +6 -0
- package/dist/domains/comet-native/native-workspace-finish.d.ts.map +1 -1
- package/dist/domains/comet-native/native-workspace-finish.js +86 -35
- package/dist/domains/comet-native/native-workspace-finish.js.map +1 -1
- package/dist/domains/dashboard/web/assets/{abnfDiagram-N423BO3Z-B5cFR6hS.js → abnfDiagram-N423BO3Z-BYya6ofk.js} +1 -1
- package/dist/domains/dashboard/web/assets/{arc-CVQDtMsu.js → arc-DJbo4TD3.js} +1 -1
- package/dist/domains/dashboard/web/assets/{architectureDiagram-T3A2C74G-C0v0kULK.js → architectureDiagram-T3A2C74G-D8uZ2IB-.js} +1 -1
- package/dist/domains/dashboard/web/assets/{blockDiagram-VBNYF7ZC-DpHLuxu4.js → blockDiagram-VBNYF7ZC-B16BVj-r.js} +1 -1
- package/dist/domains/dashboard/web/assets/{c4Diagram-5PPSVZJV-BHnFxUs1.js → c4Diagram-5PPSVZJV-ayV208_D.js} +1 -1
- package/dist/domains/dashboard/web/assets/channel-CEsrvmig.js +1 -0
- package/dist/domains/dashboard/web/assets/{chunk-2GRJ4B5K-CGC9gh5n.js → chunk-2GRJ4B5K-Bn5o8p3H.js} +1 -1
- package/dist/domains/dashboard/web/assets/{chunk-2Q5K7J3B-l4puLU_O.js → chunk-2Q5K7J3B-BnF1SI6B.js} +1 -1
- package/dist/domains/dashboard/web/assets/{chunk-5RXB4S5H-ls9jQHZc.js → chunk-5RXB4S5H-ETnma053.js} +1 -1
- package/dist/domains/dashboard/web/assets/{chunk-5VM5RSS4-BVavmTEq.js → chunk-5VM5RSS4-Cuvy639H.js} +1 -1
- package/dist/domains/dashboard/web/assets/{chunk-6Q2QTUOP-Dungt2g9.js → chunk-6Q2QTUOP-DOXBzl73.js} +1 -1
- package/dist/domains/dashboard/web/assets/{chunk-GF5L2VYU-BidXO_ZP.js → chunk-GF5L2VYU-CfREXlEl.js} +1 -1
- package/dist/domains/dashboard/web/assets/{chunk-JWPE2WC7-57L5Up5X.js → chunk-JWPE2WC7-DWIdpYTb.js} +1 -1
- package/dist/domains/dashboard/web/assets/{chunk-KBJHAD2P-C5u5vbwr.js → chunk-KBJHAD2P-BnqPcfZB.js} +1 -1
- package/dist/domains/dashboard/web/assets/{chunk-RYQCIY6F-CvLz21I2.js → chunk-RYQCIY6F-DdJ00fZz.js} +1 -1
- package/dist/domains/dashboard/web/assets/{chunk-XXDRQBXY-D5nJpckG.js → chunk-XXDRQBXY-BVDhdJyW.js} +1 -1
- package/dist/domains/dashboard/web/assets/classDiagram-JCYQIIEL-CKFe0hg4.js +1 -0
- package/dist/domains/dashboard/web/assets/classDiagram-v2-OCEON4UE-CKFe0hg4.js +1 -0
- package/dist/domains/dashboard/web/assets/{cose-bilkent-JH36ORCC-Dp0JAGyE.js → cose-bilkent-JH36ORCC-C-nglwHC.js} +1 -1
- package/dist/domains/dashboard/web/assets/{cynefin-VYW2F7L2-EjC54l1g.js → cynefin-VYW2F7L2-C8TMmrbP.js} +1 -1
- package/dist/domains/dashboard/web/assets/{cynefinDiagram-MW4NZA55-CpYrW3w3.js → cynefinDiagram-MW4NZA55-C3pnQnjg.js} +1 -1
- package/dist/domains/dashboard/web/assets/{dagre-VZM6K2ZE-h5K39rCk.js → dagre-VZM6K2ZE-DY7UWiPI.js} +1 -1
- package/dist/domains/dashboard/web/assets/{diagram-7IWD3JNH-CKQj9O4H.js → diagram-7IWD3JNH-voTyDkQ5.js} +1 -1
- package/dist/domains/dashboard/web/assets/{diagram-B4RE2ZJO-DXRIYcnW.js → diagram-B4RE2ZJO-B3VkUMck.js} +1 -1
- package/dist/domains/dashboard/web/assets/{diagram-LBJQPF4R-wWutQYmv.js → diagram-LBJQPF4R-BdJzPkv8.js} +1 -1
- package/dist/domains/dashboard/web/assets/{diagram-Q27KOJAE-EgXLJQYi.js → diagram-Q27KOJAE-Bsq0anZx.js} +1 -1
- package/dist/domains/dashboard/web/assets/{diagram-UB23O5K3-CsQRXDQZ.js → diagram-UB23O5K3-CBaKRbcu.js} +1 -1
- package/dist/domains/dashboard/web/assets/{ebnfDiagram-BXEA7PRR-gm328Eho.js → ebnfDiagram-BXEA7PRR-Bl9Bm5wa.js} +1 -1
- package/dist/domains/dashboard/web/assets/{erDiagram-JOGREHBK-BbbMVUx_.js → erDiagram-JOGREHBK-DjOZzfKI.js} +1 -1
- package/dist/domains/dashboard/web/assets/{flowDiagram-UKHOOZJN-1Y7scCns.js → flowDiagram-UKHOOZJN-C21e4siK.js} +1 -1
- package/dist/domains/dashboard/web/assets/{ganttDiagram-PKOTCBZU-BAoBqczv.js → ganttDiagram-PKOTCBZU-Bs62uy6-.js} +1 -1
- package/dist/domains/dashboard/web/assets/{gitGraphDiagram-DS77QQ5N-CMUAyEzl.js → gitGraphDiagram-DS77QQ5N-DQY_Ba00.js} +1 -1
- package/dist/domains/dashboard/web/assets/{index-CCApJ0Yr.js → index-BLv71GRj.js} +1 -1
- package/dist/domains/dashboard/web/assets/{index-DWdm_XBi.js → index-Be4r99N4.js} +3 -3
- package/dist/domains/dashboard/web/assets/index-ByVYiA6g.css +1 -0
- package/dist/domains/dashboard/web/assets/{infoDiagram-6WML65LV-BaCdtYYC.js → infoDiagram-6WML65LV-CNgNNG9l.js} +1 -1
- package/dist/domains/dashboard/web/assets/{ishikawaDiagram-WSZJBQD7-DQQlNnjU.js → ishikawaDiagram-WSZJBQD7-D9k1fTO1.js} +1 -1
- package/dist/domains/dashboard/web/assets/{journeyDiagram-NVQOT4AX-DW9wUMqn.js → journeyDiagram-NVQOT4AX-CHijUnPl.js} +1 -1
- package/dist/domains/dashboard/web/assets/{kanban-definition-27J2QSJJ-C_ITaZ0q.js → kanban-definition-27J2QSJJ-DfWlntDq.js} +1 -1
- package/dist/domains/dashboard/web/assets/{linear-DXOo6ZRT.js → linear-o6hemX-z.js} +1 -1
- package/dist/domains/dashboard/web/assets/{mermaid.core-ol-0NI97.js → mermaid.core-B1DoOsPD.js} +4 -4
- package/dist/domains/dashboard/web/assets/{mindmap-definition-FAOFIHXS-CHF_HOLV.js → mindmap-definition-FAOFIHXS-COMQF9Yy.js} +1 -1
- package/dist/domains/dashboard/web/assets/{pegDiagram-VL7TDLO6-wQEvkNF8.js → pegDiagram-VL7TDLO6-C_21n7Ps.js} +1 -1
- package/dist/domains/dashboard/web/assets/{pieDiagram-7S7Q4E2Y-C3H3kiIP.js → pieDiagram-7S7Q4E2Y-D3EmoYDY.js} +1 -1
- package/dist/domains/dashboard/web/assets/{quadrantDiagram-CIZ2JOQS-S0FdVzJb.js → quadrantDiagram-CIZ2JOQS-C3fGdiMa.js} +1 -1
- package/dist/domains/dashboard/web/assets/{railroadDiagram-AXF67PYL-DCDXDaVg.js → railroadDiagram-AXF67PYL-mIsjemD-.js} +1 -1
- package/dist/domains/dashboard/web/assets/{requirementDiagram-LRYGKXZP-BW8J4gO_.js → requirementDiagram-LRYGKXZP-D_UMpS5e.js} +1 -1
- package/dist/domains/dashboard/web/assets/{sankeyDiagram-W5VNT64P-DQQBmLoy.js → sankeyDiagram-W5VNT64P-D1MwyMF6.js} +1 -1
- package/dist/domains/dashboard/web/assets/{sequenceDiagram-SI44F4Z6-2tDcli0Y.js → sequenceDiagram-SI44F4Z6-B8jp1RxX.js} +1 -1
- package/dist/domains/dashboard/web/assets/{sizeCapture-X5ZJPWSS-4sEZLBKb.js → sizeCapture-X5ZJPWSS-BKioI1Ql.js} +1 -1
- package/dist/domains/dashboard/web/assets/{stateDiagram-OKZ733FA-OgPb8pyR.js → stateDiagram-OKZ733FA-B7l8_CDo.js} +1 -1
- package/dist/domains/dashboard/web/assets/stateDiagram-v2-UEYNNEHI-BIxuwbeV.js +1 -0
- package/dist/domains/dashboard/web/assets/{swimlanes-SLNWSIFB-DR7lwtxd.js → swimlanes-SLNWSIFB-951PRLYp.js} +2 -2
- package/dist/domains/dashboard/web/assets/swimlanesDiagram-ULZ7WXOC-CEo6cGsy.js +8 -0
- package/dist/domains/dashboard/web/assets/{timeline-definition-Z64GVDOM-DNIJVlQV.js → timeline-definition-Z64GVDOM-CeyA2KbI.js} +1 -1
- package/dist/domains/dashboard/web/assets/{vennDiagram-T6HMQDX7-CClhw4QZ.js → vennDiagram-T6HMQDX7-BHe0TZJV.js} +1 -1
- package/dist/domains/dashboard/web/assets/{wardleyDiagram-T6FBY63Y-DzR3aFPS.js → wardleyDiagram-T6FBY63Y-CWqdSzJ-.js} +1 -1
- package/dist/domains/dashboard/web/assets/{xychartDiagram-ELKLHX3M-DZhq0ZRj.js → xychartDiagram-ELKLHX3M-DCKiZVPV.js} +1 -1
- package/dist/domains/dashboard/web/index.html +2 -2
- package/dist/domains/dashboard/workspace.d.ts +3 -0
- package/dist/domains/dashboard/workspace.d.ts.map +1 -1
- package/dist/domains/dashboard/workspace.js +23 -2
- package/dist/domains/dashboard/workspace.js.map +1 -1
- package/dist/domains/integrations/openspec.d.ts +1 -1
- package/dist/domains/integrations/openspec.d.ts.map +1 -1
- package/dist/domains/integrations/openspec.js +43 -84
- package/dist/domains/integrations/openspec.js.map +1 -1
- package/dist/domains/integrations/superpowers.d.ts +10 -1
- package/dist/domains/integrations/superpowers.d.ts.map +1 -1
- package/dist/domains/integrations/superpowers.js +73 -4
- package/dist/domains/integrations/superpowers.js.map +1 -1
- package/dist/domains/skill/platform-inspect.d.ts.map +1 -1
- package/dist/domains/skill/platform-inspect.js +3 -3
- package/dist/domains/skill/platform-inspect.js.map +1 -1
- package/dist/domains/skill/platform-install.d.ts +3 -1
- package/dist/domains/skill/platform-install.d.ts.map +1 -1
- package/dist/domains/skill/platform-install.js +15 -9
- package/dist/domains/skill/platform-install.js.map +1 -1
- package/dist/domains/skill/project-instructions.d.ts.map +1 -1
- package/dist/domains/skill/project-instructions.js +6 -0
- package/dist/domains/skill/project-instructions.js.map +1 -1
- package/dist/domains/skill/uninstall.d.ts.map +1 -1
- package/dist/domains/skill/uninstall.js +39 -29
- package/dist/domains/skill/uninstall.js.map +1 -1
- package/dist/domains/workflow-contract/contained-atomic-write.d.ts.map +1 -1
- package/dist/domains/workflow-contract/contained-atomic-write.js +18 -10
- package/dist/domains/workflow-contract/contained-atomic-write.js.map +1 -1
- package/dist/domains/workflow-contract/project-config.d.ts +4 -2
- package/dist/domains/workflow-contract/project-config.d.ts.map +1 -1
- package/dist/domains/workflow-contract/project-config.js +132 -0
- package/dist/domains/workflow-contract/project-config.js.map +1 -1
- package/dist/domains/workflow-contract/types.d.ts +9 -0
- package/dist/domains/workflow-contract/types.d.ts.map +1 -1
- package/dist/platform/fs/strip-bom.d.ts +10 -0
- package/dist/platform/fs/strip-bom.d.ts.map +1 -0
- package/dist/platform/fs/strip-bom.js +12 -0
- package/dist/platform/fs/strip-bom.js.map +1 -0
- package/dist/platform/install/platforms.d.ts +11 -0
- package/dist/platform/install/platforms.d.ts.map +1 -1
- package/dist/platform/install/platforms.js +36 -0
- package/dist/platform/install/platforms.js.map +1 -1
- package/dist/platform/process/external-command.d.ts +1 -0
- package/dist/platform/process/external-command.d.ts.map +1 -1
- package/dist/platform/process/external-command.js +2 -1
- package/dist/platform/process/external-command.js.map +1 -1
- package/eval/local/tests/conftest.py +18 -3
- package/eval/local/tests/scaffold/test_conftest_helpers.py +57 -0
- package/package.json +11 -26
- package/dist/domains/dashboard/web/assets/channel-eM0x3m1G.js +0 -1
- package/dist/domains/dashboard/web/assets/classDiagram-JCYQIIEL-CEFhao2K.js +0 -1
- package/dist/domains/dashboard/web/assets/classDiagram-v2-OCEON4UE-CEFhao2K.js +0 -1
- package/dist/domains/dashboard/web/assets/index-DhhbseFJ.css +0 -1
- package/dist/domains/dashboard/web/assets/stateDiagram-v2-UEYNNEHI-CiDNPr4P.js +0 -1
- package/dist/domains/dashboard/web/assets/swimlanesDiagram-ULZ7WXOC-DggHFP9q.js +0 -8
- package/eval/local/tasks/comet-native-interrupted-transition/environment/.comet/config.yaml +0 -6
|
@@ -1,149 +1,149 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire as __cometCreateRequire } from 'module';
|
|
3
3
|
const require = __cometCreateRequire(import.meta.url);
|
|
4
|
-
var
|
|
5
|
-
`)}};
|
|
4
|
+
var ua=Object.create;var zr=Object.defineProperty;var fa=Object.getOwnPropertyDescriptor;var da=Object.getOwnPropertyNames;var ha=Object.getPrototypeOf,ma=Object.prototype.hasOwnProperty;var nt=(n=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(n,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):n)(function(n){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+n+'" is not supported')});var g=(n,e)=>()=>{try{return e||n((e={exports:{}}).exports,e),e.exports}catch(t){throw e=0,t}};var pa=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of da(e))!ma.call(n,i)&&i!==t&&zr(n,i,{get:()=>e[i],enumerable:!(r=fa(e,i))||r.enumerable});return n};var ga=(n,e,t)=>(t=n!=null?ua(ha(n)):{},pa(e||!n||!n.__esModule?zr(t,"default",{value:n,enumerable:!0}):t,n));var N=g(T=>{"use strict";var an=Symbol.for("yaml.alias"),Gr=Symbol.for("yaml.document"),rt=Symbol.for("yaml.map"),Qr=Symbol.for("yaml.pair"),ln=Symbol.for("yaml.scalar"),it=Symbol.for("yaml.seq"),F=Symbol.for("yaml.node.type"),ba=n=>!!n&&typeof n=="object"&&n[F]===an,va=n=>!!n&&typeof n=="object"&&n[F]===Gr,ka=n=>!!n&&typeof n=="object"&&n[F]===rt,Sa=n=>!!n&&typeof n=="object"&&n[F]===Qr,Xr=n=>!!n&&typeof n=="object"&&n[F]===ln,_a=n=>!!n&&typeof n=="object"&&n[F]===it;function Zr(n){if(n&&typeof n=="object")switch(n[F]){case rt:case it:return!0}return!1}function Ea(n){if(n&&typeof n=="object")switch(n[F]){case an:case rt:case ln:case it:return!0}return!1}var Na=n=>(Xr(n)||Zr(n))&&!!n.anchor;T.ALIAS=an;T.DOC=Gr;T.MAP=rt;T.NODE_TYPE=F;T.PAIR=Qr;T.SCALAR=ln;T.SEQ=it;T.hasAnchor=Na;T.isAlias=ba;T.isCollection=Zr;T.isDocument=va;T.isMap=ka;T.isNode=Ea;T.isPair=Sa;T.isScalar=Xr;T.isSeq=_a});var Ne=g(cn=>{"use strict";var L=N(),R=Symbol("break visit"),ei=Symbol("skip children"),$=Symbol("remove node");function st(n,e){let t=ti(e);L.isDocument(n)?de(null,n.contents,t,Object.freeze([n]))===$&&(n.contents=null):de(null,n,t,Object.freeze([]))}st.BREAK=R;st.SKIP=ei;st.REMOVE=$;function de(n,e,t,r){let i=ni(n,e,t,r);if(L.isNode(i)||L.isPair(i))return ri(n,r,i),de(n,i,t,r);if(typeof i!="symbol"){if(L.isCollection(e)){r=Object.freeze(r.concat(e));for(let s=0;s<e.items.length;++s){let o=de(s,e.items[s],t,r);if(typeof o=="number")s=o-1;else{if(o===R)return R;o===$&&(e.items.splice(s,1),s-=1)}}}else if(L.isPair(e)){r=Object.freeze(r.concat(e));let s=de("key",e.key,t,r);if(s===R)return R;s===$&&(e.key=null);let o=de("value",e.value,t,r);if(o===R)return R;o===$&&(e.value=null)}}return i}async function ot(n,e){let t=ti(e);L.isDocument(n)?await he(null,n.contents,t,Object.freeze([n]))===$&&(n.contents=null):await he(null,n,t,Object.freeze([]))}ot.BREAK=R;ot.SKIP=ei;ot.REMOVE=$;async function he(n,e,t,r){let i=await ni(n,e,t,r);if(L.isNode(i)||L.isPair(i))return ri(n,r,i),he(n,i,t,r);if(typeof i!="symbol"){if(L.isCollection(e)){r=Object.freeze(r.concat(e));for(let s=0;s<e.items.length;++s){let o=await he(s,e.items[s],t,r);if(typeof o=="number")s=o-1;else{if(o===R)return R;o===$&&(e.items.splice(s,1),s-=1)}}}else if(L.isPair(e)){r=Object.freeze(r.concat(e));let s=await he("key",e.key,t,r);if(s===R)return R;s===$&&(e.key=null);let o=await he("value",e.value,t,r);if(o===R)return R;o===$&&(e.value=null)}}return i}function ti(n){return typeof n=="object"&&(n.Collection||n.Node||n.Value)?Object.assign({Alias:n.Node,Map:n.Node,Scalar:n.Node,Seq:n.Node},n.Value&&{Map:n.Value,Scalar:n.Value,Seq:n.Value},n.Collection&&{Map:n.Collection,Seq:n.Collection},n):n}function ni(n,e,t,r){if(typeof t=="function")return t(n,e,r);if(L.isMap(e))return t.Map?.(n,e,r);if(L.isSeq(e))return t.Seq?.(n,e,r);if(L.isPair(e))return t.Pair?.(n,e,r);if(L.isScalar(e))return t.Scalar?.(n,e,r);if(L.isAlias(e))return t.Alias?.(n,e,r)}function ri(n,e,t){let r=e[e.length-1];if(L.isCollection(r))r.items[n]=t;else if(L.isPair(r))n==="key"?r.key=t:r.value=t;else if(L.isDocument(r))r.contents=t;else{let i=L.isAlias(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}cn.visit=st;cn.visitAsync=ot});var un=g(si=>{"use strict";var ii=N(),Pa=Ne(),Aa={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},Ca=n=>n.replace(/[!,[\]{}]/g,e=>Aa[e]),Pe=class n{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},n.defaultYaml,e),this.tags=Object.assign({},n.defaultTags,t)}clone(){let e=new n(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new n(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:n.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},n.defaultTags);break}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:n.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},n.defaultTags),this.atNextDocument=!1);let r=e.trim().split(/[ \t]+/),i=r.shift();switch(i){case"%TAG":{if(r.length!==2&&(t(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;let[s,o]=r;return this.tags[s]=o,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return t(0,"%YAML directive should contain exactly one part"),!1;let[s]=r;if(s==="1.1"||s==="1.2")return this.yaml.version=s,!0;{let o=/^\d+\.\d+$/.test(s);return t(6,`Unsupported YAML version ${s}`,o),!1}}default:return t(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e==="!")return"!";if(e[0]!=="!")return t(`Not a valid tag: ${e}`),null;if(e[1]==="<"){let o=e.slice(2,-1);return o==="!"||o==="!!"?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&t("Verbatim tags must end with a >"),o)}let[,r,i]=e.match(/^(.*!)([^!]*)$/s);i||t(`The ${e} tag has no suffix`);let s=this.tags[r];if(s)try{return s+decodeURIComponent(i)}catch(o){return t(String(o)),null}return r==="!"?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,r]of Object.entries(this.tags))if(e.startsWith(r))return t+Ca(e.substring(r.length));return e[0]==="!"?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags),i;if(e&&r.length>0&&ii.isNode(e.contents)){let s={};Pa.visit(e.contents,(o,a)=>{ii.isNode(a)&&a.tag&&(s[a.tag]=!0)}),i=Object.keys(s)}else i=[];for(let[s,o]of r)s==="!!"&&o==="tag:yaml.org,2002:"||(!e||i.some(a=>a.startsWith(o)))&&t.push(`%TAG ${s} ${o}`);return t.join(`
|
|
5
|
+
`)}};Pe.defaultYaml={explicit:!1,version:"1.2"};Pe.defaultTags={"!!":"tag:yaml.org,2002:"};si.Directives=Pe});var at=g(Ae=>{"use strict";var oi=N(),Oa=Ne();function qa(n){if(/[\x00-\x19\s,[\]{}]/.test(n)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(n)}`;throw new Error(t)}return!0}function ai(n){let e=new Set;return Oa.visit(n,{Value(t,r){r.anchor&&e.add(r.anchor)}}),e}function li(n,e){for(let t=1;;++t){let r=`${n}${t}`;if(!e.has(r))return r}}function La(n,e){let t=[],r=new Map,i=null;return{onAnchor:s=>{t.push(s),i??(i=ai(n));let o=li(e,i);return i.add(o),o},setAnchors:()=>{for(let s of t){let o=r.get(s);if(typeof o=="object"&&o.anchor&&(oi.isScalar(o.node)||oi.isCollection(o.node)))o.node.anchor=o.anchor;else{let a=new Error("Failed to resolve repeated object (this should not happen)");throw a.source=s,a}}},sourceObjects:r}}Ae.anchorIsValid=qa;Ae.anchorNames=ai;Ae.createNodeAnchors=La;Ae.findNewAnchor=li});var fn=g(ci=>{"use strict";function Ce(n,e,t,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let i=0,s=r.length;i<s;++i){let o=r[i],a=Ce(n,r,String(i),o);a===void 0?delete r[i]:a!==o&&(r[i]=a)}else if(r instanceof Map)for(let i of Array.from(r.keys())){let s=r.get(i),o=Ce(n,r,i,s);o===void 0?r.delete(i):o!==s&&r.set(i,o)}else if(r instanceof Set)for(let i of Array.from(r)){let s=Ce(n,r,i,i);s===void 0?r.delete(i):s!==i&&(r.delete(i),r.add(s))}else for(let[i,s]of Object.entries(r)){let o=Ce(n,r,i,s);o===void 0?delete r[i]:o!==s&&(r[i]=o)}return n.call(e,t,r)}ci.applyReviver=Ce});var K=g(fi=>{"use strict";var Ta=N();function ui(n,e,t){if(Array.isArray(n))return n.map((r,i)=>ui(r,String(i),t));if(n&&typeof n.toJSON=="function"){if(!t||!Ta.hasAnchor(n))return n.toJSON(e,t);let r={aliasCount:0,count:1,res:void 0};t.anchors.set(n,r),t.onCreate=s=>{r.res=s,delete t.onCreate};let i=n.toJSON(e,t);return t.onCreate&&t.onCreate(i),i}return typeof n=="bigint"&&!t?.keep?Number(n):n}fi.toJS=ui});var lt=g(hi=>{"use strict";var Ra=fn(),di=N(),ja=K(),dn=class{constructor(e){Object.defineProperty(this,di.NODE_TYPE,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:r,onAnchor:i,reviver:s}={}){if(!di.isDocument(e))throw new TypeError("A document argument is required");let o={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},a=ja.toJS(this,"",o);if(typeof i=="function")for(let{count:l,res:c}of o.anchors.values())i(c,l);return typeof s=="function"?Ra.applyReviver(s,{"":a},"",a):a}};hi.NodeBase=dn});var Oe=g(mi=>{"use strict";var xa=at(),Ia=Ne(),me=N(),Ma=lt(),$a=K(),hn=class extends Ma.NodeBase{constructor(e){super(me.ALIAS),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,t){if(t?.maxAliasCount===0)throw new ReferenceError("Alias resolution is disabled");let r;t?.aliasResolveCache?r=t.aliasResolveCache:(r=[],Ia.visit(e,{Node:(s,o)=>{(me.isAlias(o)||me.hasAnchor(o))&&r.push(o)}}),t&&(t.aliasResolveCache=r));let i;for(let s of r){if(s===this)break;s.anchor===this.source&&(i=s)}return i}toJSON(e,t){if(!t)return{source:this.source};let{anchors:r,doc:i,maxAliasCount:s}=t,o=this.resolve(i,t);if(!o){let l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(l)}let a=r.get(o);if(a||($a.toJS(o,null,t),a=r.get(o)),a?.res===void 0){let l="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(l)}if(s>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=ct(i,o,r)),a.count*a.aliasCount>s)){let l="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(l)}return a.res}toString(e,t,r){let i=`*${this.source}`;if(e){if(xa.anchorIsValid(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(s)}if(e.implicitKey)return`${i} `}return i}};function ct(n,e,t){if(me.isAlias(e)){let r=e.resolve(n),i=t&&r&&t.get(r);return i?i.count*i.aliasCount:0}else if(me.isCollection(e)){let r=0;for(let i of e.items){let s=ct(n,i,t);s>r&&(r=s)}return r}else if(me.isPair(e)){let r=ct(n,e.key,t),i=ct(n,e.value,t);return Math.max(r,i)}return 1}mi.Alias=hn});var C=g(mn=>{"use strict";var Da=N(),Fa=lt(),Ba=K(),Wa=n=>!n||typeof n!="function"&&typeof n!="object",Y=class extends Fa.NodeBase{constructor(e){super(Da.SCALAR),this.value=e}toJSON(e,t){return t?.keep?this.value:Ba.toJS(this.value,e,t)}toString(){return String(this.value)}};Y.BLOCK_FOLDED="BLOCK_FOLDED";Y.BLOCK_LITERAL="BLOCK_LITERAL";Y.PLAIN="PLAIN";Y.QUOTE_DOUBLE="QUOTE_DOUBLE";Y.QUOTE_SINGLE="QUOTE_SINGLE";mn.Scalar=Y;mn.isScalarValue=Wa});var qe=g(gi=>{"use strict";var Ka=Oe(),ie=N(),pi=C(),Ya="tag:yaml.org,2002:";function Ua(n,e,t){if(e){let r=t.filter(s=>s.tag===e),i=r.find(s=>!s.format)??r[0];if(!i)throw new Error(`Tag ${e} not found`);return i}return t.find(r=>r.identify?.(n)&&!r.format)}function Va(n,e,t){if(ie.isDocument(n)&&(n=n.contents),ie.isNode(n))return n;if(ie.isPair(n)){let u=t.schema[ie.MAP].createNode?.(t.schema,null,t);return u.items.push(n),u}(n instanceof String||n instanceof Number||n instanceof Boolean||typeof BigInt<"u"&&n instanceof BigInt)&&(n=n.valueOf());let{aliasDuplicateObjects:r,onAnchor:i,onTagObj:s,schema:o,sourceObjects:a}=t,l;if(r&&n&&typeof n=="object"){if(l=a.get(n),l)return l.anchor??(l.anchor=i(n)),new Ka.Alias(l.anchor);l={anchor:null,node:null},a.set(n,l)}e?.startsWith("!!")&&(e=Ya+e.slice(2));let c=Ua(n,e,o.tags);if(!c){if(n&&typeof n.toJSON=="function"&&(n=n.toJSON()),!n||typeof n!="object"){let u=new pi.Scalar(n);return l&&(l.node=u),u}c=n instanceof Map?o[ie.MAP]:Symbol.iterator in Object(n)?o[ie.SEQ]:o[ie.MAP]}s&&(s(c),delete t.onTagObj);let h=c?.createNode?c.createNode(t.schema,n,t):typeof c?.nodeClass?.from=="function"?c.nodeClass.from(t.schema,n,t):new pi.Scalar(n);return e?h.tag=e:c.default||(h.tag=c.tag),l&&(l.node=h),h}gi.createNode=Va});var ft=g(ut=>{"use strict";var Ja=qe(),D=N(),Ha=lt();function pn(n,e,t){let r=t;for(let i=e.length-1;i>=0;--i){let s=e[i];if(typeof s=="number"&&Number.isInteger(s)&&s>=0){let o=[];o[s]=r,r=o}else r=new Map([[s,r]])}return Ja.createNode(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:n,sourceObjects:new Map})}var yi=n=>n==null||typeof n=="object"&&!!n[Symbol.iterator]().next().done,gn=class extends Ha.NodeBase{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(r=>D.isNode(r)||D.isPair(r)?r.clone(e):r),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(yi(e))this.add(t);else{let[r,...i]=e,s=this.get(r,!0);if(D.isCollection(s))s.addIn(i,t);else if(s===void 0&&this.schema)this.set(r,pn(this.schema,i,t));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}}deleteIn(e){let[t,...r]=e;if(r.length===0)return this.delete(t);let i=this.get(t,!0);if(D.isCollection(i))return i.deleteIn(r);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${r}`)}getIn(e,t){let[r,...i]=e,s=this.get(r,!0);return i.length===0?!t&&D.isScalar(s)?s.value:s:D.isCollection(s)?s.getIn(i,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!D.isPair(t))return!1;let r=t.value;return r==null||e&&D.isScalar(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(e){let[t,...r]=e;if(r.length===0)return this.has(t);let i=this.get(t,!0);return D.isCollection(i)?i.hasIn(r):!1}setIn(e,t){let[r,...i]=e;if(i.length===0)this.set(r,t);else{let s=this.get(r,!0);if(D.isCollection(s))s.setIn(i,t);else if(s===void 0&&this.schema)this.set(r,pn(this.schema,i,t));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}}};ut.Collection=gn;ut.collectionFromPath=pn;ut.isEmptyPath=yi});var Le=g(dt=>{"use strict";var za=n=>n.replace(/^(?!$)(?: $)?/gm,"#");function yn(n,e){return/^\n+$/.test(n)?n.substring(1):e?n.replace(/^(?! *$)/gm,e):n}var Ga=(n,e,t)=>n.endsWith(`
|
|
6
6
|
`)?yn(t,e):t.includes(`
|
|
7
7
|
`)?`
|
|
8
|
-
`+yn(t,e):(n.endsWith(" ")?"":" ")+t;
|
|
9
|
-
`)t===wn&&(d=wi(n,d,e.length)),u=d+e.length+l,f=void 0;else{if(k===" "&&
|
|
10
|
-
`&&
|
|
11
|
-
`&&S!==" "&&(f=d)}if(d>=u)if(f)c.push(f),u=f+l,f=void 0;else if(t===
|
|
12
|
-
${e}${n.slice(0,
|
|
13
|
-
${e}${n.slice(S+1,
|
|
14
|
-
`);r=e,i=e+1,s=n[i]}return r}
|
|
15
|
-
`){if(s-o>r)return!0;if(o=s+1,i-o<=r)return!1}return!0}function
|
|
8
|
+
`+yn(t,e):(n.endsWith(" ")?"":" ")+t;dt.indentComment=yn;dt.lineComment=Ga;dt.stringifyComment=za});var bi=g(Te=>{"use strict";var Qa="flow",wn="block",ht="quoted";function Xa(n,e,t="flow",{indentAtStart:r,lineWidth:i=80,minContentWidth:s=20,onFold:o,onOverflow:a}={}){if(!i||i<0)return n;i<s&&(s=0);let l=Math.max(1+s,1+i-e.length);if(n.length<=l)return n;let c=[],h={},u=i-e.length;typeof r=="number"&&(r>i-Math.max(2,s)?c.push(0):u=i-r);let f,p,y=!1,d=-1,m=-1,w=-1;t===wn&&(d=wi(n,d,e.length),d!==-1&&(u=d+l));for(let k;k=n[d+=1];){if(t===ht&&k==="\\"){switch(m=d,n[d+1]){case"x":d+=3;break;case"u":d+=5;break;case"U":d+=9;break;default:d+=1}w=d}if(k===`
|
|
9
|
+
`)t===wn&&(d=wi(n,d,e.length)),u=d+e.length+l,f=void 0;else{if(k===" "&&p&&p!==" "&&p!==`
|
|
10
|
+
`&&p!==" "){let S=n[d+1];S&&S!==" "&&S!==`
|
|
11
|
+
`&&S!==" "&&(f=d)}if(d>=u)if(f)c.push(f),u=f+l,f=void 0;else if(t===ht){for(;p===" "||p===" ";)p=k,k=n[d+=1],y=!0;let S=d>w+1?d-2:m-1;if(h[S])return n;c.push(S),h[S]=!0,u=S+l,f=void 0}else y=!0}p=k}if(y&&a&&a(),c.length===0)return n;o&&o();let v=n.slice(0,c[0]);for(let k=0;k<c.length;++k){let S=c[k],_=c[k+1]||n.length;S===0?v=`
|
|
12
|
+
${e}${n.slice(0,_)}`:(t===ht&&h[S]&&(v+=`${n[S]}\\`),v+=`
|
|
13
|
+
${e}${n.slice(S+1,_)}`)}return v}function wi(n,e,t){let r=e,i=e+1,s=n[i];for(;s===" "||s===" ";)if(e<i+t)s=n[++e];else{do s=n[++e];while(s&&s!==`
|
|
14
|
+
`);r=e,i=e+1,s=n[i]}return r}Te.FOLD_BLOCK=wn;Te.FOLD_FLOW=Qa;Te.FOLD_QUOTED=ht;Te.foldFlowLines=Xa});var je=g(vi=>{"use strict";var I=C(),U=bi(),pt=(n,e)=>({indentAtStart:e?n.indent.length:n.indentAtStart,lineWidth:n.options.lineWidth,minContentWidth:n.options.minContentWidth}),gt=n=>/^(%|---|\.\.\.)/m.test(n);function Za(n,e,t){if(!e||e<0)return!1;let r=e-t,i=n.length;if(i<=r)return!1;for(let s=0,o=0;s<i;++s)if(n[s]===`
|
|
15
|
+
`){if(s-o>r)return!0;if(o=s+1,i-o<=r)return!1}return!0}function Re(n,e){let t=JSON.stringify(n);if(e.options.doubleQuotedAsJSON)return t;let{implicitKey:r}=e,i=e.options.doubleQuotedMinMultiLineLength,s=e.indent||(gt(n)?" ":""),o="",a=0;for(let l=0,c=t[l];c;c=t[++l])if(c===" "&&t[l+1]==="\\"&&t[l+2]==="n"&&(o+=t.slice(a,l)+"\\ ",l+=1,a=l,c="\\"),c==="\\")switch(t[l+1]){case"u":{o+=t.slice(a,l);let h=t.substr(l+2,4);switch(h){case"0000":o+="\\0";break;case"0007":o+="\\a";break;case"000b":o+="\\v";break;case"001b":o+="\\e";break;case"0085":o+="\\N";break;case"00a0":o+="\\_";break;case"2028":o+="\\L";break;case"2029":o+="\\P";break;default:h.substr(0,2)==="00"?o+="\\x"+h.substr(2):o+=t.substr(l,6)}l+=5,a=l+1}break;case"n":if(r||t[l+2]==='"'||t.length<i)l+=1;else{for(o+=t.slice(a,l)+`
|
|
16
16
|
|
|
17
17
|
`;t[l+2]==="\\"&&t[l+3]==="n"&&t[l+4]!=='"';)o+=`
|
|
18
18
|
`,l+=2;o+=s,t[l+2]===" "&&(o+="\\"),l+=1,a=l+1}break;default:l+=1}return o=a?o+t.slice(a):t,r?o:U.foldFlowLines(o,s,U.FOLD_QUOTED,pt(e,!1))}function bn(n,e){if(e.options.singleQuote===!1||e.implicitKey&&n.includes(`
|
|
19
|
-
`)||/[ \t]\n|\n[ \t]/.test(n))return
|
|
20
|
-
${t}`)+"'";return e.implicitKey?r:U.foldFlowLines(r,t,U.FOLD_FLOW,pt(e,!1))}function pe(n,e){let{singleQuote:t}=e.options,r;if(t===!1)r=
|
|
19
|
+
`)||/[ \t]\n|\n[ \t]/.test(n))return Re(n,e);let t=e.indent||(gt(n)?" ":""),r="'"+n.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
20
|
+
${t}`)+"'";return e.implicitKey?r:U.foldFlowLines(r,t,U.FOLD_FLOW,pt(e,!1))}function pe(n,e){let{singleQuote:t}=e.options,r;if(t===!1)r=Re;else{let i=n.includes('"'),s=n.includes("'");i&&!s?r=bn:s&&!i?r=Re:r=t?bn:Re}return r(n,e)}var vn;try{vn=new RegExp(`(^|(?<!
|
|
21
21
|
))
|
|
22
22
|
+(?!
|
|
23
|
-
|$)`,"g")}catch{vn=/\n+(?!\n|$)/g}function
|
|
23
|
+
|$)`,"g")}catch{vn=/\n+(?!\n|$)/g}function mt({comment:n,type:e,value:t},r,i,s){let{blockQuote:o,commentString:a,lineWidth:l}=r.options;if(!o||/\n[\t ]+$/.test(t))return pe(t,r);let c=r.indent||(r.forceBlockIndent||gt(t)?" ":""),h=o==="literal"?!0:o==="folded"||e===I.Scalar.BLOCK_FOLDED?!1:e===I.Scalar.BLOCK_LITERAL?!0:!Za(t,l,c.length);if(!t)return h?`|
|
|
24
24
|
`:`>
|
|
25
|
-
`;let u,f;for(f=t.length;f>0;--f){let
|
|
26
|
-
`&&
|
|
27
|
-
`);y===-1?u="-":t===
|
|
28
|
-
`&&(
|
|
29
|
-
`)w=
|
|
30
|
-
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`),
|
|
25
|
+
`;let u,f;for(f=t.length;f>0;--f){let _=t[f-1];if(_!==`
|
|
26
|
+
`&&_!==" "&&_!==" ")break}let p=t.substring(f),y=p.indexOf(`
|
|
27
|
+
`);y===-1?u="-":t===p||y!==p.length-1?(u="+",s&&s()):u="",p&&(t=t.slice(0,-p.length),p[p.length-1]===`
|
|
28
|
+
`&&(p=p.slice(0,-1)),p=p.replace(vn,`$&${c}`));let d=!1,m,w=-1;for(m=0;m<t.length;++m){let _=t[m];if(_===" ")d=!0;else if(_===`
|
|
29
|
+
`)w=m;else break}let v=t.substring(0,w<m?w+1:m);v&&(t=t.substring(v.length),v=v.replace(/\n+/g,`$&${c}`));let S=(d?c?"2":"1":"")+u;if(n&&(S+=" "+a(n.replace(/ ?[\r\n]+/g," ")),i&&i()),!h){let _=t.replace(/\n+/g,`
|
|
30
|
+
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`),E=!1,A=pt(r,!0);o!=="folded"&&e!==I.Scalar.BLOCK_FOLDED&&(A.onOverflow=()=>{E=!0});let b=U.foldFlowLines(`${v}${_}${p}`,c,U.FOLD_BLOCK,A);if(!E)return`>${S}
|
|
31
31
|
${c}${b}`}return t=t.replace(/\n+/g,`$&${c}`),`|${S}
|
|
32
|
-
${c}${v}${t}${
|
|
32
|
+
${c}${v}${t}${p}`}function el(n,e,t,r){let{type:i,value:s}=n,{actualString:o,implicitKey:a,indent:l,indentStep:c,inFlow:h}=e;if(a&&s.includes(`
|
|
33
33
|
`)||h&&/[[\]{},]/.test(s))return pe(s,e);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(s))return a||h||!s.includes(`
|
|
34
|
-
`)?pe(s,e):
|
|
35
|
-
`))return
|
|
36
|
-
${l}`);if(o){let f=d=>d.default&&d.tag!=="tag:yaml.org,2002:str"&&d.test?.test(u),{compat:
|
|
37
|
-
${e.indent}${a}`:a}kn.createStringifyContext=
|
|
38
|
-
${a}:`):(
|
|
39
|
-
`:"",v){let
|
|
40
|
-
${
|
|
41
|
-
`&&k&&(
|
|
34
|
+
`)?pe(s,e):mt(n,e,t,r);if(!a&&!h&&i!==I.Scalar.PLAIN&&s.includes(`
|
|
35
|
+
`))return mt(n,e,t,r);if(gt(s)){if(l==="")return e.forceBlockIndent=!0,mt(n,e,t,r);if(a&&l===c)return pe(s,e)}let u=s.replace(/\n+/g,`$&
|
|
36
|
+
${l}`);if(o){let f=d=>d.default&&d.tag!=="tag:yaml.org,2002:str"&&d.test?.test(u),{compat:p,tags:y}=e.doc.schema;if(y.some(f)||p?.some(f))return pe(s,e)}return a?u:U.foldFlowLines(u,l,U.FOLD_FLOW,pt(e,!1))}function tl(n,e,t,r){let{implicitKey:i,inFlow:s}=e,o=typeof n.value=="string"?n:Object.assign({},n,{value:String(n.value)}),{type:a}=n;a!==I.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(a=I.Scalar.QUOTE_DOUBLE);let l=h=>{switch(h){case I.Scalar.BLOCK_FOLDED:case I.Scalar.BLOCK_LITERAL:return i||s?pe(o.value,e):mt(o,e,t,r);case I.Scalar.QUOTE_DOUBLE:return Re(o.value,e);case I.Scalar.QUOTE_SINGLE:return bn(o.value,e);case I.Scalar.PLAIN:return el(o,e,t,r);default:return null}},c=l(a);if(c===null){let{defaultKeyType:h,defaultStringType:u}=e.options,f=i&&h||u;if(c=l(f),c===null)throw new Error(`Unsupported default string type ${f}`)}return c}vi.stringifyString=tl});var xe=g(kn=>{"use strict";var nl=at(),V=N(),rl=Le(),il=je();function sl(n,e){let t=Object.assign({blockQuote:!0,commentString:rl.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},n.schema.toStringOptions,e),r;switch(t.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:n,flowCollectionPadding:t.flowCollectionPadding?" ":"",indent:"",indentStep:typeof t.indent=="number"?" ".repeat(t.indent):" ",inFlow:r,options:t}}function ol(n,e){if(e.tag){let i=n.filter(s=>s.tag===e.tag);if(i.length>0)return i.find(s=>s.format===e.format)??i[0]}let t,r;if(V.isScalar(e)){r=e.value;let i=n.filter(s=>s.identify?.(r));if(i.length>1){let s=i.filter(o=>o.test);s.length>0&&(i=s)}t=i.find(s=>s.format===e.format)??i.find(s=>!s.format)}else r=e,t=n.find(i=>i.nodeClass&&r instanceof i.nodeClass);if(!t){let i=r?.constructor?.name??(r===null?"null":typeof r);throw new Error(`Tag not resolved for ${i} value`)}return t}function al(n,e,{anchors:t,doc:r}){if(!r.directives)return"";let i=[],s=(V.isScalar(n)||V.isCollection(n))&&n.anchor;s&&nl.anchorIsValid(s)&&(t.add(s),i.push(`&${s}`));let o=n.tag??(e.default?null:e.tag);return o&&i.push(r.directives.tagString(o)),i.join(" ")}function ll(n,e,t,r){if(V.isPair(n))return n.toString(e,t,r);if(V.isAlias(n)){if(e.doc.directives)return n.toString(e);if(e.resolvedAliases?.has(n))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(n):e.resolvedAliases=new Set([n]),n=n.resolve(e.doc)}let i,s=V.isNode(n)?n:e.doc.createNode(n,{onTagObj:l=>i=l});i??(i=ol(e.doc.schema.tags,s));let o=al(s,i,e);o.length>0&&(e.indentAtStart=(e.indentAtStart??0)+o.length+1);let a=typeof i.stringify=="function"?i.stringify(s,e,t,r):V.isScalar(s)?il.stringifyString(s,e,t,r):s.toString(e,t,r);return o?V.isScalar(s)||a[0]==="{"||a[0]==="["?`${o} ${a}`:`${o}
|
|
37
|
+
${e.indent}${a}`:a}kn.createStringifyContext=sl;kn.stringify=ll});var Ei=g(_i=>{"use strict";var B=N(),ki=C(),Si=xe(),Ie=Le();function cl({key:n,value:e},t,r,i){let{allNullValues:s,doc:o,indent:a,indentStep:l,options:{commentString:c,indentSeq:h,simpleKeys:u}}=t,f=B.isNode(n)&&n.comment||null;if(u){if(f)throw new Error("With simple keys, key nodes cannot have comments");if(B.isCollection(n)||!B.isNode(n)&&typeof n=="object"){let A="With simple keys, collection cannot be used as a key value";throw new Error(A)}}let p=!u&&(!n||f&&e==null&&!t.inFlow||B.isCollection(n)||(B.isScalar(n)?n.type===ki.Scalar.BLOCK_FOLDED||n.type===ki.Scalar.BLOCK_LITERAL:typeof n=="object"));t=Object.assign({},t,{allNullValues:!1,implicitKey:!p&&(u||!s),indent:a+l});let y=!1,d=!1,m=Si.stringify(n,t,()=>y=!0,()=>d=!0);if(!p&&!t.inFlow&&m.length>1024){if(u)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");p=!0}if(t.inFlow){if(s||e==null)return y&&r&&r(),m===""?"?":p?`? ${m}`:m}else if(s&&!u||e==null&&p)return m=`? ${m}`,f&&!y?m+=Ie.lineComment(m,t.indent,c(f)):d&&i&&i(),m;y&&(f=null),p?(f&&(m+=Ie.lineComment(m,t.indent,c(f))),m=`? ${m}
|
|
38
|
+
${a}:`):(m=`${m}:`,f&&(m+=Ie.lineComment(m,t.indent,c(f))));let w,v,k;B.isNode(e)?(w=!!e.spaceBefore,v=e.commentBefore,k=e.comment):(w=!1,v=null,k=null,e&&typeof e=="object"&&(e=o.createNode(e))),t.implicitKey=!1,!p&&!f&&B.isScalar(e)&&(t.indentAtStart=m.length+1),d=!1,!h&&l.length>=2&&!t.inFlow&&!p&&B.isSeq(e)&&!e.flow&&!e.tag&&!e.anchor&&(t.indent=t.indent.substring(2));let S=!1,_=Si.stringify(e,t,()=>S=!0,()=>d=!0),E=" ";if(f||w||v){if(E=w?`
|
|
39
|
+
`:"",v){let A=c(v);E+=`
|
|
40
|
+
${Ie.indentComment(A,t.indent)}`}_===""&&!t.inFlow?E===`
|
|
41
|
+
`&&k&&(E=`
|
|
42
42
|
|
|
43
|
-
`):
|
|
44
|
-
${t.indent}`}else if(!
|
|
45
|
-
`),O=b!==-1,W=t.inFlow??e.flow??e.items.length===0;if(O||!W){let
|
|
46
|
-
${t.indent}`)}}else(
|
|
47
|
-
`)&&(
|
|
43
|
+
`):E+=`
|
|
44
|
+
${t.indent}`}else if(!p&&B.isCollection(e)){let A=_[0],b=_.indexOf(`
|
|
45
|
+
`),O=b!==-1,W=t.inFlow??e.flow??e.items.length===0;if(O||!W){let fe=!1;if(O&&(A==="&"||A==="!")){let q=_.indexOf(" ");A==="&"&&q!==-1&&q<b&&_[q+1]==="!"&&(q=_.indexOf(" ",q+1)),(q===-1||b<q)&&(fe=!0)}fe||(E=`
|
|
46
|
+
${t.indent}`)}}else(_===""||_[0]===`
|
|
47
|
+
`)&&(E="");return m+=E+_,t.inFlow?S&&r&&r():k&&!S?m+=Ie.lineComment(m,t.indent,c(k)):d&&i&&i(),m}_i.stringifyPair=cl});var _n=g(Sn=>{"use strict";var Ni=nt("process");function ul(n,...e){n==="debug"&&console.log(...e)}function fl(n,e){(n==="debug"||n==="warn")&&(typeof Ni.emitWarning=="function"?Ni.emitWarning(e):console.warn(e))}Sn.debug=ul;Sn.warn=fl});var kt=g(vt=>{"use strict";var bt=N(),Pi=C(),yt="<<",wt={identify:n=>n===yt||typeof n=="symbol"&&n.description===yt,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new Pi.Scalar(Symbol(yt)),{addToJSMap:Ai}),stringify:()=>yt},dl=(n,e)=>(wt.identify(e)||bt.isScalar(e)&&(!e.type||e.type===Pi.Scalar.PLAIN)&&wt.identify(e.value))&&n?.doc.schema.tags.some(t=>t.tag===wt.tag&&t.default);function Ai(n,e,t){let r=Ci(n,t);if(bt.isSeq(r))for(let i of r.items)En(n,e,i);else if(Array.isArray(r))for(let i of r)En(n,e,i);else En(n,e,r)}function En(n,e,t){let r=Ci(n,t);if(!bt.isMap(r))throw new Error("Merge sources must be maps or map aliases");let i=r.toJSON(null,n,Map);for(let[s,o]of i)e instanceof Map?e.has(s)||e.set(s,o):e instanceof Set?e.add(s):Object.prototype.hasOwnProperty.call(e,s)||Object.defineProperty(e,s,{value:o,writable:!0,enumerable:!0,configurable:!0});return e}function Ci(n,e){return n&&bt.isAlias(e)?e.resolve(n.doc,n):e}vt.addMergeToJSMap=Ai;vt.isMergeKey=dl;vt.merge=wt});var Pn=g(Li=>{"use strict";var hl=_n(),Oi=kt(),ml=xe(),qi=N(),Nn=K();function pl(n,e,{key:t,value:r}){if(qi.isNode(t)&&t.addToJSMap)t.addToJSMap(n,e,r);else if(Oi.isMergeKey(n,t))Oi.addMergeToJSMap(n,e,r);else{let i=Nn.toJS(t,"",n);if(e instanceof Map)e.set(i,Nn.toJS(r,i,n));else if(e instanceof Set)e.add(i);else{let s=gl(t,i,n),o=Nn.toJS(r,s,n);s in e?Object.defineProperty(e,s,{value:o,writable:!0,enumerable:!0,configurable:!0}):e[s]=o}}return e}function gl(n,e,t){if(e===null)return"";if(typeof e!="object")return String(e);if(qi.isNode(n)&&t?.doc){let r=ml.createStringifyContext(t.doc,{});r.anchors=new Set;for(let s of t.anchors.keys())r.anchors.add(s.anchor);r.inFlow=!0,r.inStringifyKey=!0;let i=n.toString(r);if(!t.mapKeyWarned){let s=JSON.stringify(i);s.length>40&&(s=s.substring(0,36)+'..."'),hl.warn(t.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${s}. Set mapAsMap: true to use object keys.`),t.mapKeyWarned=!0}return i}return JSON.stringify(e)}Li.addPairToJSMap=pl});var J=g(An=>{"use strict";var Ti=qe(),yl=Ei(),wl=Pn(),St=N();function bl(n,e,t){let r=Ti.createNode(n,void 0,t),i=Ti.createNode(e,void 0,t);return new _t(r,i)}var _t=class n{constructor(e,t=null){Object.defineProperty(this,St.NODE_TYPE,{value:St.PAIR}),this.key=e,this.value=t}clone(e){let{key:t,value:r}=this;return St.isNode(t)&&(t=t.clone(e)),St.isNode(r)&&(r=r.clone(e)),new n(t,r)}toJSON(e,t){let r=t?.mapAsMap?new Map:{};return wl.addPairToJSMap(t,r,this)}toString(e,t,r){return e?.doc?yl.stringifyPair(this,e,t,r):JSON.stringify(this)}};An.Pair=_t;An.createPair=bl});var Cn=g(ji=>{"use strict";var se=N(),Ri=xe(),Et=Le();function vl(n,e,t){return(e.inFlow??n.flow?Sl:kl)(n,e,t)}function kl({comment:n,items:e},t,{blockItemPrefix:r,flowChars:i,itemIndent:s,onChompKeep:o,onComment:a}){let{indent:l,options:{commentString:c}}=t,h=Object.assign({},t,{indent:s,type:null}),u=!1,f=[];for(let y=0;y<e.length;++y){let d=e[y],m=null;if(se.isNode(d))!u&&d.spaceBefore&&f.push(""),Nt(t,f,d.commentBefore,u),d.comment&&(m=d.comment);else if(se.isPair(d)){let v=se.isNode(d.key)?d.key:null;v&&(!u&&v.spaceBefore&&f.push(""),Nt(t,f,v.commentBefore,u))}u=!1;let w=Ri.stringify(d,h,()=>m=null,()=>u=!0);m&&(w+=Et.lineComment(w,s,c(m))),u&&m&&(u=!1),f.push(r+w)}let p;if(f.length===0)p=i.start+i.end;else{p=f[0];for(let y=1;y<f.length;++y){let d=f[y];p+=d?`
|
|
48
48
|
${l}${d}`:`
|
|
49
|
-
`}}return n?(
|
|
50
|
-
`+Et.indentComment(c(n),l),a&&a()):u&&o&&o(),
|
|
51
|
-
`)),y<n.length-1?w+=",":e.options.trailingComma&&(e.options.lineWidth>0&&(c||(c=u.reduce((v,k)=>v+k.length+2,2)+(w.length+2)>e.options.lineWidth)),c&&(w+=",")),
|
|
49
|
+
`}}return n?(p+=`
|
|
50
|
+
`+Et.indentComment(c(n),l),a&&a()):u&&o&&o(),p}function Sl({items:n},e,{flowChars:t,itemIndent:r}){let{indent:i,indentStep:s,flowCollectionPadding:o,options:{commentString:a}}=e;r+=s;let l=Object.assign({},e,{indent:r,inFlow:!0,type:null}),c=!1,h=0,u=[];for(let y=0;y<n.length;++y){let d=n[y],m=null;if(se.isNode(d))d.spaceBefore&&u.push(""),Nt(e,u,d.commentBefore,!1),d.comment&&(m=d.comment);else if(se.isPair(d)){let v=se.isNode(d.key)?d.key:null;v&&(v.spaceBefore&&u.push(""),Nt(e,u,v.commentBefore,!1),v.comment&&(c=!0));let k=se.isNode(d.value)?d.value:null;k?(k.comment&&(m=k.comment),k.commentBefore&&(c=!0)):d.value==null&&v?.comment&&(m=v.comment)}m&&(c=!0);let w=Ri.stringify(d,l,()=>m=null);c||(c=u.length>h||w.includes(`
|
|
51
|
+
`)),y<n.length-1?w+=",":e.options.trailingComma&&(e.options.lineWidth>0&&(c||(c=u.reduce((v,k)=>v+k.length+2,2)+(w.length+2)>e.options.lineWidth)),c&&(w+=",")),m&&(w+=Et.lineComment(w,r,a(m))),u.push(w),h=u.length}let{start:f,end:p}=t;if(u.length===0)return f+p;if(!c){let y=u.reduce((d,m)=>d+m.length+2,2);c=e.options.lineWidth>0&&y>e.options.lineWidth}if(c){let y=f;for(let d of u)y+=d?`
|
|
52
52
|
${s}${i}${d}`:`
|
|
53
53
|
`;return`${y}
|
|
54
|
-
${i}${
|
|
55
|
-
`:" ")}return
|
|
54
|
+
${i}${p}`}else return`${f}${o}${u.join(" ")}${o}${p}`}function Nt({indent:n,options:{commentString:e}},t,r,i){if(r&&i&&(r=r.replace(/^\n+/,"")),r){let s=Et.indentComment(e(r),n);t.push(s.trimStart())}}ji.stringifyCollection=vl});var z=g(qn=>{"use strict";var _l=Cn(),El=Pn(),Nl=ft(),H=N(),Pt=J(),Pl=C();function Me(n,e){let t=H.isScalar(e)?e.value:e;for(let r of n)if(H.isPair(r)&&(r.key===e||r.key===t||H.isScalar(r.key)&&r.key.value===t))return r}var On=class extends Nl.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(H.MAP,e),this.items=[]}static from(e,t,r){let{keepUndefined:i,replacer:s}=r,o=new this(e),a=(l,c)=>{if(typeof s=="function")c=s.call(t,l,c);else if(Array.isArray(s)&&!s.includes(l))return;(c!==void 0||i)&&o.items.push(Pt.createPair(l,c,r))};if(t instanceof Map)for(let[l,c]of t)a(l,c);else if(t&&typeof t=="object")for(let l of Object.keys(t))a(l,t[l]);return typeof e.sortMapEntries=="function"&&o.items.sort(e.sortMapEntries),o}add(e,t){let r;H.isPair(e)?r=e:!e||typeof e!="object"||!("key"in e)?r=new Pt.Pair(e,e?.value):r=new Pt.Pair(e.key,e.value);let i=Me(this.items,r.key),s=this.schema?.sortMapEntries;if(i){if(!t)throw new Error(`Key ${r.key} already set`);H.isScalar(i.value)&&Pl.isScalarValue(r.value)?i.value.value=r.value:i.value=r.value}else if(s){let o=this.items.findIndex(a=>s(r,a)<0);o===-1?this.items.push(r):this.items.splice(o,0,r)}else this.items.push(r)}delete(e){let t=Me(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let i=Me(this.items,e)?.value;return(!t&&H.isScalar(i)?i.value:i)??void 0}has(e){return!!Me(this.items,e)}set(e,t){this.add(new Pt.Pair(e,t),!0)}toJSON(e,t,r){let i=r?new r:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(i);for(let s of this.items)El.addPairToJSMap(t,i,s);return i}toString(e,t,r){if(!e)return JSON.stringify(this);for(let i of this.items)if(!H.isPair(i))throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),_l.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:r,onComment:t})}};qn.YAMLMap=On;qn.findPair=Me});var ge=g(Ii=>{"use strict";var Al=N(),xi=z(),Cl={collection:"map",default:!0,nodeClass:xi.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(n,e){return Al.isMap(n)||e("Expected a mapping for this tag"),n},createNode:(n,e,t)=>xi.YAMLMap.from(n,e,t)};Ii.map=Cl});var G=g(Mi=>{"use strict";var Ol=qe(),ql=Cn(),Ll=ft(),Ct=N(),Tl=C(),Rl=K(),Ln=class extends Ll.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(Ct.SEQ,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=At(e);return typeof t!="number"?!1:this.items.splice(t,1).length>0}get(e,t){let r=At(e);if(typeof r!="number")return;let i=this.items[r];return!t&&Ct.isScalar(i)?i.value:i}has(e){let t=At(e);return typeof t=="number"&&t<this.items.length}set(e,t){let r=At(e);if(typeof r!="number")throw new Error(`Expected a valid index, not ${e}.`);let i=this.items[r];Ct.isScalar(i)&&Tl.isScalarValue(t)?i.value=t:this.items[r]=t}toJSON(e,t){let r=[];t?.onCreate&&t.onCreate(r);let i=0;for(let s of this.items)r.push(Rl.toJS(s,String(i++),t));return r}toString(e,t,r){return e?ql.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:r,onComment:t}):JSON.stringify(this)}static from(e,t,r){let{replacer:i}=r,s=new this(e);if(t&&Symbol.iterator in Object(t)){let o=0;for(let a of t){if(typeof i=="function"){let l=t instanceof Set?a:String(o++);a=i.call(t,l,a)}s.items.push(Ol.createNode(a,void 0,r))}}return s}};function At(n){let e=Ct.isScalar(n)?n.value:n;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}Mi.YAMLSeq=Ln});var ye=g(Di=>{"use strict";var jl=N(),$i=G(),xl={collection:"seq",default:!0,nodeClass:$i.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(n,e){return jl.isSeq(n)||e("Expected a sequence for this tag"),n},createNode:(n,e,t)=>$i.YAMLSeq.from(n,e,t)};Di.seq=xl});var $e=g(Fi=>{"use strict";var Il=je(),Ml={identify:n=>typeof n=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:n=>n,stringify(n,e,t,r){return e=Object.assign({actualString:!0},e),Il.stringifyString(n,e,t,r)}};Fi.string=Ml});var Ot=g(Ki=>{"use strict";var Bi=C(),Wi={identify:n=>n==null,createNode:()=>new Bi.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new Bi.Scalar(null),stringify:({source:n},e)=>typeof n=="string"&&Wi.test.test(n)?n:e.options.nullStr};Ki.nullTag=Wi});var Tn=g(Ui=>{"use strict";var $l=C(),Yi={identify:n=>typeof n=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:n=>new $l.Scalar(n[0]==="t"||n[0]==="T"),stringify({source:n,value:e},t){if(n&&Yi.test.test(n)){let r=n[0]==="t"||n[0]==="T";if(e===r)return n}return e?t.options.trueStr:t.options.falseStr}};Ui.boolTag=Yi});var we=g(Vi=>{"use strict";function Dl({format:n,minFractionDigits:e,tag:t,value:r}){if(typeof r=="bigint")return String(r);let i=typeof r=="number"?r:Number(r);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let s=Object.is(r,-0)?"-0":JSON.stringify(r);if(!n&&e&&(!t||t==="tag:yaml.org,2002:float")&&/^-?\d/.test(s)&&!s.includes("e")){let o=s.indexOf(".");o<0&&(o=s.length,s+=".");let a=e-(s.length-o-1);for(;a-- >0;)s+="0"}return s}Vi.stringifyNumber=Dl});var jn=g(qt=>{"use strict";var Fl=C(),Rn=we(),Bl={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:n=>n.slice(-3).toLowerCase()==="nan"?NaN:n[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Rn.stringifyNumber},Wl={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:n=>parseFloat(n),stringify(n){let e=Number(n.value);return isFinite(e)?e.toExponential():Rn.stringifyNumber(n)}},Kl={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(n){let e=new Fl.Scalar(parseFloat(n)),t=n.indexOf(".");return t!==-1&&n[n.length-1]==="0"&&(e.minFractionDigits=n.length-t-1),e},stringify:Rn.stringifyNumber};qt.float=Kl;qt.floatExp=Wl;qt.floatNaN=Bl});var In=g(Tt=>{"use strict";var Ji=we(),Lt=n=>typeof n=="bigint"||Number.isInteger(n),xn=(n,e,t,{intAsBigInt:r})=>r?BigInt(n):parseInt(n.substring(e),t);function Hi(n,e,t){let{value:r}=n;return Lt(r)&&r>=0?t+r.toString(e):Ji.stringifyNumber(n)}var Yl={identify:n=>Lt(n)&&n>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(n,e,t)=>xn(n,2,8,t),stringify:n=>Hi(n,8,"0o")},Ul={identify:Lt,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(n,e,t)=>xn(n,0,10,t),stringify:Ji.stringifyNumber},Vl={identify:n=>Lt(n)&&n>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(n,e,t)=>xn(n,2,16,t),stringify:n=>Hi(n,16,"0x")};Tt.int=Ul;Tt.intHex=Vl;Tt.intOct=Yl});var Gi=g(zi=>{"use strict";var Jl=ge(),Hl=Ot(),zl=ye(),Gl=$e(),Ql=Tn(),Mn=jn(),$n=In(),Xl=[Jl.map,zl.seq,Gl.string,Hl.nullTag,Ql.boolTag,$n.intOct,$n.int,$n.intHex,Mn.floatNaN,Mn.floatExp,Mn.float];zi.schema=Xl});var Zi=g(Xi=>{"use strict";var Zl=C(),ec=ge(),tc=ye();function Qi(n){return typeof n=="bigint"||Number.isInteger(n)}var Rt=({value:n})=>JSON.stringify(n),nc=[{identify:n=>typeof n=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:n=>n,stringify:Rt},{identify:n=>n==null,createNode:()=>new Zl.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Rt},{identify:n=>typeof n=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:n=>n==="true",stringify:Rt},{identify:Qi,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(n,e,{intAsBigInt:t})=>t?BigInt(n):parseInt(n,10),stringify:({value:n})=>Qi(n)?n.toString():JSON.stringify(n)},{identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:n=>parseFloat(n),stringify:Rt}],rc={default:!0,tag:"",test:/^/,resolve(n,e){return e(`Unresolved plain scalar ${JSON.stringify(n)}`),n}},ic=[ec.map,tc.seq].concat(nc,rc);Xi.schema=ic});var Fn=g(es=>{"use strict";var De=nt("buffer"),Dn=C(),sc=je(),oc={identify:n=>n instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(n,e){if(typeof De.Buffer=="function")return De.Buffer.from(n,"base64");if(typeof atob=="function"){let t=atob(n.replace(/[\n\r]/g,"")),r=new Uint8Array(t.length);for(let i=0;i<t.length;++i)r[i]=t.charCodeAt(i);return r}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),n},stringify({comment:n,type:e,value:t},r,i,s){if(!t)return"";let o=t,a;if(typeof De.Buffer=="function")a=o instanceof De.Buffer?o.toString("base64"):De.Buffer.from(o.buffer).toString("base64");else if(typeof btoa=="function"){let l="";for(let c=0;c<o.length;++c)l+=String.fromCharCode(o[c]);a=btoa(l)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e??(e=Dn.Scalar.BLOCK_LITERAL),e!==Dn.Scalar.QUOTE_DOUBLE){let l=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),c=Math.ceil(a.length/l),h=new Array(c);for(let u=0,f=0;u<c;++u,f+=l)h[u]=a.substr(f,l);a=h.join(e===Dn.Scalar.BLOCK_LITERAL?`
|
|
55
|
+
`:" ")}return sc.stringifyString({comment:n,type:e,value:a},r,i,s)}};es.binary=oc});var It=g(xt=>{"use strict";var jt=N(),Bn=J(),ac=C(),lc=G();function ts(n,e){if(jt.isSeq(n))for(let t=0;t<n.items.length;++t){let r=n.items[t];if(!jt.isPair(r)){if(jt.isMap(r)){r.items.length>1&&e("Each pair must have its own sequence indicator");let i=r.items[0]||new Bn.Pair(new ac.Scalar(null));if(r.commentBefore&&(i.key.commentBefore=i.key.commentBefore?`${r.commentBefore}
|
|
56
56
|
${i.key.commentBefore}`:r.commentBefore),r.comment){let s=i.value??i.key;s.comment=s.comment?`${r.comment}
|
|
57
|
-
${s.comment}`:r.comment}r=i}n.items[t]=Rt.isPair(r)?r:new Bn.Pair(r)}}else e("Expected a sequence for this tag");return n}function ns(n,e,t){let{replacer:r}=t,i=new ac.YAMLSeq(n);i.tag="tag:yaml.org,2002:pairs";let s=0;if(e&&Symbol.iterator in Object(e))for(let o of e){typeof r=="function"&&(o=r.call(e,String(s++),o));let a,l;if(Array.isArray(o))if(o.length===2)a=o[0],l=o[1];else throw new TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){let c=Object.keys(o);if(c.length===1)a=c[0],l=o[a];else throw new TypeError(`Expected tuple with one key, not ${c.length} keys`)}else a=o;i.items.push(Bn.createPair(a,l,t))}return i}var lc={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:ts,createNode:ns};jt.createPairs=ns;jt.pairs=lc;jt.resolvePairs=ts});var Yn=g(Kn=>{"use strict";var rs=N(),Wn=K(),De=z(),cc=G(),is=xt(),se=class n extends cc.YAMLSeq{constructor(){super(),this.add=De.YAMLMap.prototype.add.bind(this),this.delete=De.YAMLMap.prototype.delete.bind(this),this.get=De.YAMLMap.prototype.get.bind(this),this.has=De.YAMLMap.prototype.has.bind(this),this.set=De.YAMLMap.prototype.set.bind(this),this.tag=n.tag}toJSON(e,t){if(!t)return super.toJSON(e);let r=new Map;t?.onCreate&&t.onCreate(r);for(let i of this.items){let s,o;if(rs.isPair(i)?(s=Wn.toJS(i.key,"",t),o=Wn.toJS(i.value,s,t)):s=Wn.toJS(i,"",t),r.has(s))throw new Error("Ordered maps must not include duplicate keys");r.set(s,o)}return r}static from(e,t,r){let i=is.createPairs(e,t,r),s=new this;return s.items=i.items,s}};se.tag="tag:yaml.org,2002:omap";var uc={collection:"seq",identify:n=>n instanceof Map,nodeClass:se,default:!1,tag:"tag:yaml.org,2002:omap",resolve(n,e){let t=is.resolvePairs(n,e),r=[];for(let{key:i}of t.items)rs.isScalar(i)&&(r.includes(i.value)?e(`Ordered maps must not include duplicate keys: ${i.value}`):r.push(i.value));return Object.assign(new se,t)},createNode:(n,e,t)=>se.from(n,e,t)};Kn.YAMLOMap=se;Kn.omap=uc});var cs=g(Un=>{"use strict";var ss=A();function os({value:n,source:e},t){return e&&(n?as:ls).test.test(e)?e:n?t.options.trueStr:t.options.falseStr}var as={identify:n=>n===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new ss.Scalar(!0),stringify:os},ls={identify:n=>n===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new ss.Scalar(!1),stringify:os};Un.falseTag=ls;Un.trueTag=as});var us=g(It=>{"use strict";var fc=A(),Vn=ye(),dc={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:n=>n.slice(-3).toLowerCase()==="nan"?NaN:n[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Vn.stringifyNumber},hc={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:n=>parseFloat(n.replace(/_/g,"")),stringify(n){let e=Number(n.value);return isFinite(e)?e.toExponential():Vn.stringifyNumber(n)}},pc={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(n){let e=new fc.Scalar(parseFloat(n.replace(/_/g,""))),t=n.indexOf(".");if(t!==-1){let r=n.substring(t+1).replace(/_/g,"");r[r.length-1]==="0"&&(e.minFractionDigits=r.length)}return e},stringify:Vn.stringifyNumber};It.float=pc;It.floatExp=hc;It.floatNaN=dc});var ds=g(Be=>{"use strict";var fs=ye(),Fe=n=>typeof n=="bigint"||Number.isInteger(n);function Mt(n,e,t,{intAsBigInt:r}){let i=n[0];if((i==="-"||i==="+")&&(e+=1),n=n.substring(e).replace(/_/g,""),r){switch(t){case 2:n=`0b${n}`;break;case 8:n=`0o${n}`;break;case 16:n=`0x${n}`;break}let o=BigInt(n);return i==="-"?BigInt(-1)*o:o}let s=parseInt(n,t);return i==="-"?-1*s:s}function Jn(n,e,t){let{value:r}=n;if(Fe(r)){let i=r.toString(e);return r<0?"-"+t+i.substr(1):t+i}return fs.stringifyNumber(n)}var mc={identify:Fe,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(n,e,t)=>Mt(n,2,2,t),stringify:n=>Jn(n,2,"0b")},gc={identify:Fe,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(n,e,t)=>Mt(n,1,8,t),stringify:n=>Jn(n,8,"0")},yc={identify:Fe,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(n,e,t)=>Mt(n,0,10,t),stringify:fs.stringifyNumber},wc={identify:Fe,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(n,e,t)=>Mt(n,2,16,t),stringify:n=>Jn(n,16,"0x")};Be.int=yc;Be.intBin=mc;Be.intHex=wc;Be.intOct=gc});var zn=g(Hn=>{"use strict";var Ft=N(),$t=J(),Dt=z(),oe=class n extends Dt.YAMLMap{constructor(e){super(e),this.tag=n.tag}add(e){let t;Ft.isPair(e)?t=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?t=new $t.Pair(e.key,null):t=new $t.Pair(e,null),Dt.findPair(this.items,t.key)||this.items.push(t)}get(e,t){let r=Dt.findPair(this.items,e);return!t&&Ft.isPair(r)?Ft.isScalar(r.key)?r.key.value:r.key:r}set(e,t){if(typeof t!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let r=Dt.findPair(this.items,e);r&&!t?this.items.splice(this.items.indexOf(r),1):!r&&t&&this.items.push(new $t.Pair(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,r);throw new Error("Set items must all have null values")}static from(e,t,r){let{replacer:i}=r,s=new this(e);if(t&&Symbol.iterator in Object(t))for(let o of t)typeof i=="function"&&(o=i.call(t,o,o)),s.items.push($t.createPair(o,null,r));return s}};oe.tag="tag:yaml.org,2002:set";var bc={collection:"map",identify:n=>n instanceof Set,nodeClass:oe,default:!1,tag:"tag:yaml.org,2002:set",createNode:(n,e,t)=>oe.from(n,e,t),resolve(n,e){if(Ft.isMap(n)){if(n.hasAllNullValues(!0))return Object.assign(new oe,n);e("Set items must all have null values")}else e("Expected a mapping for this tag");return n}};Hn.YAMLSet=oe;Hn.set=bc});var Qn=g(Bt=>{"use strict";var vc=ye();function Gn(n,e){let t=n[0],r=t==="-"||t==="+"?n.substring(1):n,i=o=>e?BigInt(o):Number(o),s=r.replace(/_/g,"").split(":").reduce((o,a)=>o*i(60)+i(a),i(0));return t==="-"?i(-1)*s:s}function hs(n){let{value:e}=n,t=o=>o;if(typeof e=="bigint")t=o=>BigInt(o);else if(isNaN(e)||!isFinite(e))return vc.stringifyNumber(n);let r="";e<0&&(r="-",e*=t(-1));let i=t(60),s=[e%i];return e<60?s.unshift(0):(e=(e-s[0])/i,s.unshift(e%i),e>=60&&(e=(e-s[0])/i,s.unshift(e))),r+s.map(o=>String(o).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var kc={identify:n=>typeof n=="bigint"||Number.isInteger(n),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(n,e,{intAsBigInt:t})=>Gn(n,t),stringify:hs},Sc={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:n=>Gn(n,!1),stringify:hs},ps={identify:n=>n instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(n){let e=n.match(ps.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,t,r,i,s,o,a]=e.map(Number),l=e[7]?Number((e[7]+"00").substr(1,3)):0,c=Date.UTC(t,r-1,i,s||0,o||0,a||0,l),h=e[8];if(h&&h!=="Z"){let u=Gn(h,!1);Math.abs(u)<30&&(u*=60),c-=6e4*u}return new Date(c)},stringify:({value:n})=>n?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};Bt.floatTime=Sc;Bt.intTime=kc;Bt.timestamp=ps});var ys=g(gs=>{"use strict";var Ec=me(),_c=At(),Nc=ge(),Pc=Me(),Cc=Fn(),ms=cs(),Xn=us(),Wt=ds(),Ac=vt(),Oc=Yn(),qc=xt(),Lc=zn(),Zn=Qn(),Tc=[Ec.map,Nc.seq,Pc.string,_c.nullTag,ms.trueTag,ms.falseTag,Wt.intBin,Wt.intOct,Wt.int,Wt.intHex,Xn.floatNaN,Xn.floatExp,Xn.float,Cc.binary,Ac.merge,Oc.omap,qc.pairs,Lc.set,Zn.intTime,Zn.floatTime,Zn.timestamp];gs.schema=Tc});var Cs=g(nr=>{"use strict";var ks=me(),Rc=At(),Ss=ge(),jc=Me(),xc=Tn(),er=jn(),tr=In(),Ic=Gi(),Mc=Zi(),Es=Fn(),We=vt(),_s=Yn(),Ns=xt(),ws=ys(),Ps=zn(),Kt=Qn(),bs=new Map([["core",Ic.schema],["failsafe",[ks.map,Ss.seq,jc.string]],["json",Mc.schema],["yaml11",ws.schema],["yaml-1.1",ws.schema]]),vs={binary:Es.binary,bool:xc.boolTag,float:er.float,floatExp:er.floatExp,floatNaN:er.floatNaN,floatTime:Kt.floatTime,int:tr.int,intHex:tr.intHex,intOct:tr.intOct,intTime:Kt.intTime,map:ks.map,merge:We.merge,null:Rc.nullTag,omap:_s.omap,pairs:Ns.pairs,seq:Ss.seq,set:Ps.set,timestamp:Kt.timestamp},$c={"tag:yaml.org,2002:binary":Es.binary,"tag:yaml.org,2002:merge":We.merge,"tag:yaml.org,2002:omap":_s.omap,"tag:yaml.org,2002:pairs":Ns.pairs,"tag:yaml.org,2002:set":Ps.set,"tag:yaml.org,2002:timestamp":Kt.timestamp};function Dc(n,e,t){let r=bs.get(e);if(r&&!n)return t&&!r.includes(We.merge)?r.concat(We.merge):r.slice();let i=r;if(!i)if(Array.isArray(n))i=[];else{let s=Array.from(bs.keys()).filter(o=>o!=="yaml11").map(o=>JSON.stringify(o)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${s} or define customTags array`)}if(Array.isArray(n))for(let s of n)i=i.concat(s);else typeof n=="function"&&(i=n(i.slice()));return t&&(i=i.concat(We.merge)),i.reduce((s,o)=>{let a=typeof o=="string"?vs[o]:o;if(!a){let l=JSON.stringify(o),c=Object.keys(vs).map(h=>JSON.stringify(h)).join(", ");throw new Error(`Unknown custom tag ${l}; use one of ${c}`)}return s.includes(a)||s.push(a),s},[])}nr.coreKnownTags=$c;nr.getTags=Dc});var sr=g(As=>{"use strict";var rr=N(),Fc=me(),Bc=ge(),Wc=Me(),Yt=Cs(),Kc=(n,e)=>n.key<e.key?-1:n.key>e.key?1:0,ir=class n{constructor({compat:e,customTags:t,merge:r,resolveKnownTags:i,schema:s,sortMapEntries:o,toStringDefaults:a}){this.compat=Array.isArray(e)?Yt.getTags(e,"compat"):e?Yt.getTags(null,e):null,this.name=typeof s=="string"&&s||"core",this.knownTags=i?Yt.coreKnownTags:{},this.tags=Yt.getTags(t,this.name,r),this.toStringOptions=a??null,Object.defineProperty(this,rr.MAP,{value:Fc.map}),Object.defineProperty(this,rr.SCALAR,{value:Wc.string}),Object.defineProperty(this,rr.SEQ,{value:Bc.seq}),this.sortMapEntries=typeof o=="function"?o:o===!0?Kc:null}clone(){let e=Object.create(n.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}};As.Schema=ir});var qs=g(Os=>{"use strict";var Yc=N(),or=je(),Ke=qe();function Uc(n,e){let t=[],r=e.directives===!0;if(e.directives!==!1&&n.directives){let l=n.directives.toString(n);l?(t.push(l),r=!0):n.directives.docStart&&(r=!0)}r&&t.push("---");let i=or.createStringifyContext(n,e),{commentString:s}=i.options;if(n.commentBefore){t.length!==1&&t.unshift("");let l=s(n.commentBefore);t.unshift(Ke.indentComment(l,""))}let o=!1,a=null;if(n.contents){if(Yc.isNode(n.contents)){if(n.contents.spaceBefore&&r&&t.push(""),n.contents.commentBefore){let h=s(n.contents.commentBefore);t.push(Ke.indentComment(h,""))}i.forceBlockIndent=!!n.comment,a=n.contents.comment}let l=a?void 0:()=>o=!0,c=or.stringify(n.contents,i,()=>a=null,l);a&&(c+=Ke.lineComment(c,"",s(a))),(c[0]==="|"||c[0]===">")&&t[t.length-1]==="---"?t[t.length-1]=`--- ${c}`:t.push(c)}else t.push(or.stringify(n.contents,i));if(n.directives?.docEnd)if(n.comment){let l=s(n.comment);l.includes(`
|
|
58
|
-
`)?(t.push("..."),t.push(
|
|
57
|
+
${s.comment}`:r.comment}r=i}n.items[t]=jt.isPair(r)?r:new Bn.Pair(r)}}else e("Expected a sequence for this tag");return n}function ns(n,e,t){let{replacer:r}=t,i=new lc.YAMLSeq(n);i.tag="tag:yaml.org,2002:pairs";let s=0;if(e&&Symbol.iterator in Object(e))for(let o of e){typeof r=="function"&&(o=r.call(e,String(s++),o));let a,l;if(Array.isArray(o))if(o.length===2)a=o[0],l=o[1];else throw new TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){let c=Object.keys(o);if(c.length===1)a=c[0],l=o[a];else throw new TypeError(`Expected tuple with one key, not ${c.length} keys`)}else a=o;i.items.push(Bn.createPair(a,l,t))}return i}var cc={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:ts,createNode:ns};xt.createPairs=ns;xt.pairs=cc;xt.resolvePairs=ts});var Yn=g(Kn=>{"use strict";var rs=N(),Wn=K(),Fe=z(),uc=G(),is=It(),oe=class n extends uc.YAMLSeq{constructor(){super(),this.add=Fe.YAMLMap.prototype.add.bind(this),this.delete=Fe.YAMLMap.prototype.delete.bind(this),this.get=Fe.YAMLMap.prototype.get.bind(this),this.has=Fe.YAMLMap.prototype.has.bind(this),this.set=Fe.YAMLMap.prototype.set.bind(this),this.tag=n.tag}toJSON(e,t){if(!t)return super.toJSON(e);let r=new Map;t?.onCreate&&t.onCreate(r);for(let i of this.items){let s,o;if(rs.isPair(i)?(s=Wn.toJS(i.key,"",t),o=Wn.toJS(i.value,s,t)):s=Wn.toJS(i,"",t),r.has(s))throw new Error("Ordered maps must not include duplicate keys");r.set(s,o)}return r}static from(e,t,r){let i=is.createPairs(e,t,r),s=new this;return s.items=i.items,s}};oe.tag="tag:yaml.org,2002:omap";var fc={collection:"seq",identify:n=>n instanceof Map,nodeClass:oe,default:!1,tag:"tag:yaml.org,2002:omap",resolve(n,e){let t=is.resolvePairs(n,e),r=[];for(let{key:i}of t.items)rs.isScalar(i)&&(r.includes(i.value)?e(`Ordered maps must not include duplicate keys: ${i.value}`):r.push(i.value));return Object.assign(new oe,t)},createNode:(n,e,t)=>oe.from(n,e,t)};Kn.YAMLOMap=oe;Kn.omap=fc});var cs=g(Un=>{"use strict";var ss=C();function os({value:n,source:e},t){return e&&(n?as:ls).test.test(e)?e:n?t.options.trueStr:t.options.falseStr}var as={identify:n=>n===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new ss.Scalar(!0),stringify:os},ls={identify:n=>n===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new ss.Scalar(!1),stringify:os};Un.falseTag=ls;Un.trueTag=as});var us=g(Mt=>{"use strict";var dc=C(),Vn=we(),hc={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:n=>n.slice(-3).toLowerCase()==="nan"?NaN:n[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Vn.stringifyNumber},mc={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:n=>parseFloat(n.replace(/_/g,"")),stringify(n){let e=Number(n.value);return isFinite(e)?e.toExponential():Vn.stringifyNumber(n)}},pc={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(n){let e=new dc.Scalar(parseFloat(n.replace(/_/g,""))),t=n.indexOf(".");if(t!==-1){let r=n.substring(t+1).replace(/_/g,"");r[r.length-1]==="0"&&(e.minFractionDigits=r.length)}return e},stringify:Vn.stringifyNumber};Mt.float=pc;Mt.floatExp=mc;Mt.floatNaN=hc});var ds=g(We=>{"use strict";var fs=we(),Be=n=>typeof n=="bigint"||Number.isInteger(n);function $t(n,e,t,{intAsBigInt:r}){let i=n[0];if((i==="-"||i==="+")&&(e+=1),n=n.substring(e).replace(/_/g,""),r){switch(t){case 2:n=`0b${n}`;break;case 8:n=`0o${n}`;break;case 16:n=`0x${n}`;break}let o=BigInt(n);return i==="-"?BigInt(-1)*o:o}let s=parseInt(n,t);return i==="-"?-1*s:s}function Jn(n,e,t){let{value:r}=n;if(Be(r)){let i=r.toString(e);return r<0?"-"+t+i.substr(1):t+i}return fs.stringifyNumber(n)}var gc={identify:Be,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(n,e,t)=>$t(n,2,2,t),stringify:n=>Jn(n,2,"0b")},yc={identify:Be,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(n,e,t)=>$t(n,1,8,t),stringify:n=>Jn(n,8,"0")},wc={identify:Be,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(n,e,t)=>$t(n,0,10,t),stringify:fs.stringifyNumber},bc={identify:Be,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(n,e,t)=>$t(n,2,16,t),stringify:n=>Jn(n,16,"0x")};We.int=wc;We.intBin=gc;We.intHex=bc;We.intOct=yc});var zn=g(Hn=>{"use strict";var Bt=N(),Dt=J(),Ft=z(),ae=class n extends Ft.YAMLMap{constructor(e){super(e),this.tag=n.tag}add(e){let t;Bt.isPair(e)?t=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?t=new Dt.Pair(e.key,null):t=new Dt.Pair(e,null),Ft.findPair(this.items,t.key)||this.items.push(t)}get(e,t){let r=Ft.findPair(this.items,e);return!t&&Bt.isPair(r)?Bt.isScalar(r.key)?r.key.value:r.key:r}set(e,t){if(typeof t!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let r=Ft.findPair(this.items,e);r&&!t?this.items.splice(this.items.indexOf(r),1):!r&&t&&this.items.push(new Dt.Pair(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,r);throw new Error("Set items must all have null values")}static from(e,t,r){let{replacer:i}=r,s=new this(e);if(t&&Symbol.iterator in Object(t))for(let o of t)typeof i=="function"&&(o=i.call(t,o,o)),s.items.push(Dt.createPair(o,null,r));return s}};ae.tag="tag:yaml.org,2002:set";var vc={collection:"map",identify:n=>n instanceof Set,nodeClass:ae,default:!1,tag:"tag:yaml.org,2002:set",createNode:(n,e,t)=>ae.from(n,e,t),resolve(n,e){if(Bt.isMap(n)){if(n.hasAllNullValues(!0))return Object.assign(new ae,n);e("Set items must all have null values")}else e("Expected a mapping for this tag");return n}};Hn.YAMLSet=ae;Hn.set=vc});var Qn=g(Wt=>{"use strict";var kc=we();function Gn(n,e){let t=n[0],r=t==="-"||t==="+"?n.substring(1):n,i=o=>e?BigInt(o):Number(o),s=r.replace(/_/g,"").split(":").reduce((o,a)=>o*i(60)+i(a),i(0));return t==="-"?i(-1)*s:s}function hs(n){let{value:e}=n,t=o=>o;if(typeof e=="bigint")t=o=>BigInt(o);else if(isNaN(e)||!isFinite(e))return kc.stringifyNumber(n);let r="";e<0&&(r="-",e*=t(-1));let i=t(60),s=[e%i];return e<60?s.unshift(0):(e=(e-s[0])/i,s.unshift(e%i),e>=60&&(e=(e-s[0])/i,s.unshift(e))),r+s.map(o=>String(o).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var Sc={identify:n=>typeof n=="bigint"||Number.isInteger(n),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(n,e,{intAsBigInt:t})=>Gn(n,t),stringify:hs},_c={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:n=>Gn(n,!1),stringify:hs},ms={identify:n=>n instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(n){let e=n.match(ms.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,t,r,i,s,o,a]=e.map(Number),l=e[7]?Number((e[7]+"00").substr(1,3)):0,c=Date.UTC(t,r-1,i,s||0,o||0,a||0,l),h=e[8];if(h&&h!=="Z"){let u=Gn(h,!1);Math.abs(u)<30&&(u*=60),c-=6e4*u}return new Date(c)},stringify:({value:n})=>n?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};Wt.floatTime=_c;Wt.intTime=Sc;Wt.timestamp=ms});var ys=g(gs=>{"use strict";var Ec=ge(),Nc=Ot(),Pc=ye(),Ac=$e(),Cc=Fn(),ps=cs(),Xn=us(),Kt=ds(),Oc=kt(),qc=Yn(),Lc=It(),Tc=zn(),Zn=Qn(),Rc=[Ec.map,Pc.seq,Ac.string,Nc.nullTag,ps.trueTag,ps.falseTag,Kt.intBin,Kt.intOct,Kt.int,Kt.intHex,Xn.floatNaN,Xn.floatExp,Xn.float,Cc.binary,Oc.merge,qc.omap,Lc.pairs,Tc.set,Zn.intTime,Zn.floatTime,Zn.timestamp];gs.schema=Rc});var As=g(nr=>{"use strict";var ks=ge(),jc=Ot(),Ss=ye(),xc=$e(),Ic=Tn(),er=jn(),tr=In(),Mc=Gi(),$c=Zi(),_s=Fn(),Ke=kt(),Es=Yn(),Ns=It(),ws=ys(),Ps=zn(),Yt=Qn(),bs=new Map([["core",Mc.schema],["failsafe",[ks.map,Ss.seq,xc.string]],["json",$c.schema],["yaml11",ws.schema],["yaml-1.1",ws.schema]]),vs={binary:_s.binary,bool:Ic.boolTag,float:er.float,floatExp:er.floatExp,floatNaN:er.floatNaN,floatTime:Yt.floatTime,int:tr.int,intHex:tr.intHex,intOct:tr.intOct,intTime:Yt.intTime,map:ks.map,merge:Ke.merge,null:jc.nullTag,omap:Es.omap,pairs:Ns.pairs,seq:Ss.seq,set:Ps.set,timestamp:Yt.timestamp},Dc={"tag:yaml.org,2002:binary":_s.binary,"tag:yaml.org,2002:merge":Ke.merge,"tag:yaml.org,2002:omap":Es.omap,"tag:yaml.org,2002:pairs":Ns.pairs,"tag:yaml.org,2002:set":Ps.set,"tag:yaml.org,2002:timestamp":Yt.timestamp};function Fc(n,e,t){let r=bs.get(e);if(r&&!n)return t&&!r.includes(Ke.merge)?r.concat(Ke.merge):r.slice();let i=r;if(!i)if(Array.isArray(n))i=[];else{let s=Array.from(bs.keys()).filter(o=>o!=="yaml11").map(o=>JSON.stringify(o)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${s} or define customTags array`)}if(Array.isArray(n))for(let s of n)i=i.concat(s);else typeof n=="function"&&(i=n(i.slice()));return t&&(i=i.concat(Ke.merge)),i.reduce((s,o)=>{let a=typeof o=="string"?vs[o]:o;if(!a){let l=JSON.stringify(o),c=Object.keys(vs).map(h=>JSON.stringify(h)).join(", ");throw new Error(`Unknown custom tag ${l}; use one of ${c}`)}return s.includes(a)||s.push(a),s},[])}nr.coreKnownTags=Dc;nr.getTags=Fc});var sr=g(Cs=>{"use strict";var rr=N(),Bc=ge(),Wc=ye(),Kc=$e(),Ut=As(),Yc=(n,e)=>n.key<e.key?-1:n.key>e.key?1:0,ir=class n{constructor({compat:e,customTags:t,merge:r,resolveKnownTags:i,schema:s,sortMapEntries:o,toStringDefaults:a}){this.compat=Array.isArray(e)?Ut.getTags(e,"compat"):e?Ut.getTags(null,e):null,this.name=typeof s=="string"&&s||"core",this.knownTags=i?Ut.coreKnownTags:{},this.tags=Ut.getTags(t,this.name,r),this.toStringOptions=a??null,Object.defineProperty(this,rr.MAP,{value:Bc.map}),Object.defineProperty(this,rr.SCALAR,{value:Kc.string}),Object.defineProperty(this,rr.SEQ,{value:Wc.seq}),this.sortMapEntries=typeof o=="function"?o:o===!0?Yc:null}clone(){let e=Object.create(n.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}};Cs.Schema=ir});var qs=g(Os=>{"use strict";var Uc=N(),or=xe(),Ye=Le();function Vc(n,e){let t=[],r=e.directives===!0;if(e.directives!==!1&&n.directives){let l=n.directives.toString(n);l?(t.push(l),r=!0):n.directives.docStart&&(r=!0)}r&&t.push("---");let i=or.createStringifyContext(n,e),{commentString:s}=i.options;if(n.commentBefore){t.length!==1&&t.unshift("");let l=s(n.commentBefore);t.unshift(Ye.indentComment(l,""))}let o=!1,a=null;if(n.contents){if(Uc.isNode(n.contents)){if(n.contents.spaceBefore&&r&&t.push(""),n.contents.commentBefore){let h=s(n.contents.commentBefore);t.push(Ye.indentComment(h,""))}i.forceBlockIndent=!!n.comment,a=n.contents.comment}let l=a?void 0:()=>o=!0,c=or.stringify(n.contents,i,()=>a=null,l);a&&(c+=Ye.lineComment(c,"",s(a))),(c[0]==="|"||c[0]===">")&&t[t.length-1]==="---"?t[t.length-1]=`--- ${c}`:t.push(c)}else t.push(or.stringify(n.contents,i));if(n.directives?.docEnd)if(n.comment){let l=s(n.comment);l.includes(`
|
|
58
|
+
`)?(t.push("..."),t.push(Ye.indentComment(l,""))):t.push(`... ${l}`)}else t.push("...");else{let l=n.comment;l&&o&&(l=l.replace(/^\n+/,"")),l&&((!o||a)&&t[t.length-1]!==""&&t.push(""),t.push(Ye.indentComment(s(l),"")))}return t.join(`
|
|
59
59
|
`)+`
|
|
60
|
-
`}Os.stringifyDocument=
|
|
60
|
+
`}Os.stringifyDocument=Vc});var Ue=g(Ls=>{"use strict";var Jc=Oe(),be=ft(),x=N(),Hc=J(),zc=K(),Gc=sr(),Qc=qs(),ar=at(),Xc=fn(),Zc=qe(),lr=un(),cr=class n{constructor(e,t,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,x.NODE_TYPE,{value:x.DOC});let i=null;typeof t=="function"||Array.isArray(t)?i=t:r===void 0&&t&&(r=t,t=void 0);let s=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=s;let{version:o}=s;r?._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new lr.Directives({version:o}),this.setSchema(o,r),this.contents=e===void 0?null:this.createNode(e,i,r)}clone(){let e=Object.create(n.prototype,{[x.NODE_TYPE]:{value:x.DOC}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=x.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){ve(this.contents)&&this.contents.add(e)}addIn(e,t){ve(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let r=ar.anchorNames(this);e.anchor=!t||r.has(t)?ar.findNewAnchor(t||"a",r):t}return new Jc.Alias(e.anchor)}createNode(e,t,r){let i;if(typeof t=="function")e=t.call({"":e},"",e),i=t;else if(Array.isArray(t)){let m=v=>typeof v=="number"||v instanceof String||v instanceof Number,w=t.filter(m).map(String);w.length>0&&(t=t.concat(w)),i=t}else r===void 0&&t&&(r=t,t=void 0);let{aliasDuplicateObjects:s,anchorPrefix:o,flow:a,keepUndefined:l,onTagObj:c,tag:h}=r??{},{onAnchor:u,setAnchors:f,sourceObjects:p}=ar.createNodeAnchors(this,o||"a"),y={aliasDuplicateObjects:s??!0,keepUndefined:l??!1,onAnchor:u,onTagObj:c,replacer:i,schema:this.schema,sourceObjects:p},d=Zc.createNode(e,h,y);return a&&x.isCollection(d)&&(d.flow=!0),f(),d}createPair(e,t,r={}){let i=this.createNode(e,null,r),s=this.createNode(t,null,r);return new Hc.Pair(i,s)}delete(e){return ve(this.contents)?this.contents.delete(e):!1}deleteIn(e){return be.isEmptyPath(e)?this.contents==null?!1:(this.contents=null,!0):ve(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return x.isCollection(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return be.isEmptyPath(e)?!t&&x.isScalar(this.contents)?this.contents.value:this.contents:x.isCollection(this.contents)?this.contents.getIn(e,t):void 0}has(e){return x.isCollection(this.contents)?this.contents.has(e):!1}hasIn(e){return be.isEmptyPath(e)?this.contents!==void 0:x.isCollection(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=be.collectionFromPath(this.schema,[e],t):ve(this.contents)&&this.contents.set(e,t)}setIn(e,t){be.isEmptyPath(e)?this.contents=t:this.contents==null?this.contents=be.collectionFromPath(this.schema,Array.from(e),t):ve(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e=="number"&&(e=String(e));let r;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new lr.Directives({version:"1.1"}),r={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new lr.Directives({version:e}),r={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{let i=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${i}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(r)this.schema=new Gc.Schema(Object.assign(r,t));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:t,mapAsMap:r,maxAliasCount:i,onAnchor:s,reviver:o}={}){let a={anchors:new Map,doc:this,keep:!e,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100},l=zc.toJS(this.contents,t??"",a);if(typeof s=="function")for(let{count:c,res:h}of a.anchors.values())s(h,c);return typeof o=="function"?Xc.applyReviver(o,{"":l},"",l):l}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return Qc.stringifyDocument(this,e)}};function ve(n){if(x.isCollection(n))return!0;throw new Error("Expected a YAML collection as document contents")}Ls.Document=cr});var He=g(Je=>{"use strict";var Ve=class extends Error{constructor(e,t,r,i){super(),this.name=e,this.code=r,this.message=i,this.pos=t}},ur=class extends Ve{constructor(e,t,r){super("YAMLParseError",e,t,r)}},fr=class extends Ve{constructor(e,t,r){super("YAMLWarning",e,t,r)}},eu=(n,e)=>t=>{if(t.pos[0]===-1)return;t.linePos=t.pos.map(a=>e.linePos(a));let{line:r,col:i}=t.linePos[0];t.message+=` at line ${r}, column ${i}`;let s=i-1,o=n.substring(e.lineStarts[r-1],e.lineStarts[r]).replace(/[\n\r]+$/,"");if(s>=60&&o.length>80){let a=Math.min(s-39,o.length-79);o="…"+o.substring(a),s-=a-1}if(o.length>80&&(o=o.substring(0,79)+"…"),r>1&&/^ *$/.test(o.substring(0,s))){let a=n.substring(e.lineStarts[r-2],e.lineStarts[r-1]);a.length>80&&(a=a.substring(0,79)+`…
|
|
61
61
|
`),o=a+o}if(/[^ ]/.test(o)){let a=1,l=t.linePos[1];l?.line===r&&l.col>i&&(a=Math.max(1,Math.min(l.col-i,80-s)));let c=" ".repeat(s)+"^".repeat(a);t.message+=`:
|
|
62
62
|
|
|
63
63
|
${o}
|
|
64
64
|
${c}
|
|
65
|
-
`}};
|
|
66
|
-
`))return!0;if(n.end){for(let e of n.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(let e of n.items){for(let t of e.start)if(t.type==="newline")return!0;if(e.sep){for(let t of e.sep)if(t.type==="newline")return!0}if(dr(e.key)||dr(e.value))return!0}return!1;default:return!0}}Rs.containsNewline=dr});var hr=g(js=>{"use strict";var
|
|
67
|
-
`+d.comment:a.comment=d.comment);continue}(d.newlineAfterProp||
|
|
68
|
-
`+k.comment:v.comment=k.comment);let S=new Ms.Pair(v);t.options.keepSourceTokens&&(S.srcToken=h),a.items.push(S)}}return c&&c<l&&i(c,"IMPOSSIBLE","Map comment with trailing content"),a.range=[r.offset,l,c??l],a}Bs.resolveBlockMap=
|
|
69
|
-
`+
|
|
70
|
-
`+
|
|
71
|
-
`+O.comment:b.comment=O.comment);let
|
|
72
|
-
`+
|
|
73
|
-
`.repeat(Math.max(1,o.length-1)):"",
|
|
74
|
-
`;for(let d=h;d<a;++d){let[
|
|
75
|
-
`):
|
|
76
|
-
`:!
|
|
65
|
+
`}};Je.YAMLError=Ve;Je.YAMLParseError=ur;Je.YAMLWarning=fr;Je.prettifyError=eu});var ze=g(Ts=>{"use strict";function tu(n,{flow:e,indicator:t,next:r,offset:i,onError:s,parentIndent:o,startOnNewline:a}){let l=!1,c=a,h=a,u="",f="",p=!1,y=!1,d=null,m=null,w=null,v=null,k=null,S=null,_=null;for(let b of n)switch(y&&(b.type!=="space"&&b.type!=="newline"&&b.type!=="comma"&&s(b.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),y=!1),d&&(c&&b.type!=="comment"&&b.type!=="newline"&&s(d,"TAB_AS_INDENT","Tabs are not allowed as indentation"),d=null),b.type){case"space":!e&&(t!=="doc-start"||r?.type!=="flow-collection")&&b.source.includes(" ")&&(d=b),h=!0;break;case"comment":{h||s(b,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let O=b.source.substring(1)||" ";u?u+=f+O:u=O,f="",c=!1;break}case"newline":c?u?u+=b.source:(!S||t!=="seq-item-ind")&&(l=!0):f+=b.source,c=!0,p=!0,(m||w)&&(v=b),h=!0;break;case"anchor":m&&s(b,"MULTIPLE_ANCHORS","A node can have at most one anchor"),b.source.endsWith(":")&&s(b.offset+b.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),m=b,_??(_=b.offset),c=!1,h=!1,y=!0;break;case"tag":{w&&s(b,"MULTIPLE_TAGS","A node can have at most one tag"),w=b,_??(_=b.offset),c=!1,h=!1,y=!0;break}case t:(m||w)&&s(b,"BAD_PROP_ORDER",`Anchors and tags must be after the ${b.source} indicator`),S&&s(b,"UNEXPECTED_TOKEN",`Unexpected ${b.source} in ${e??"collection"}`),S=b,c=t==="seq-item-ind"||t==="explicit-key-ind",h=!1;break;case"comma":if(e){k&&s(b,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),k=b,c=!1,h=!1;break}default:s(b,"UNEXPECTED_TOKEN",`Unexpected ${b.type} token`),c=!1,h=!1}let E=n[n.length-1],A=E?E.offset+E.source.length:i;return y&&r&&r.type!=="space"&&r.type!=="newline"&&r.type!=="comma"&&(r.type!=="scalar"||r.source!=="")&&s(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),d&&(c&&d.indent<=o||r?.type==="block-map"||r?.type==="block-seq")&&s(d,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:k,found:S,spaceBefore:l,comment:u,hasNewline:p,anchor:m,tag:w,newlineAfterProp:v,end:A,start:_??A}}Ts.resolveProps=tu});var Vt=g(Rs=>{"use strict";function dr(n){if(!n)return null;switch(n.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(n.source.includes(`
|
|
66
|
+
`))return!0;if(n.end){for(let e of n.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(let e of n.items){for(let t of e.start)if(t.type==="newline")return!0;if(e.sep){for(let t of e.sep)if(t.type==="newline")return!0}if(dr(e.key)||dr(e.value))return!0}return!1;default:return!0}}Rs.containsNewline=dr});var hr=g(js=>{"use strict";var nu=Vt();function ru(n,e,t){if(e?.type==="flow-collection"){let r=e.end[0];r.indent===n&&(r.source==="]"||r.source==="}")&&nu.containsNewline(e)&&t(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}js.flowIndentCheck=ru});var mr=g(Is=>{"use strict";var xs=N();function iu(n,e,t){let{uniqueKeys:r}=n.options;if(r===!1)return!1;let i=typeof r=="function"?r:(s,o)=>s===o||xs.isScalar(s)&&xs.isScalar(o)&&s.value===o.value;return e.some(s=>i(s.key,t))}Is.mapIncludes=iu});var Ws=g(Bs=>{"use strict";var Ms=J(),su=z(),$s=ze(),ou=Vt(),Ds=hr(),au=mr(),Fs="All mapping items must start at the same column";function lu({composeNode:n,composeEmptyNode:e},t,r,i,s){let o=s?.nodeClass??su.YAMLMap,a=new o(t.schema);t.atRoot&&(t.atRoot=!1);let l=r.offset,c=null;for(let h of r.items){let{start:u,key:f,sep:p,value:y}=h,d=$s.resolveProps(u,{indicator:"explicit-key-ind",next:f??p?.[0],offset:l,onError:i,parentIndent:r.indent,startOnNewline:!0}),m=!d.found;if(m){if(f&&(f.type==="block-seq"?i(l,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in f&&f.indent!==r.indent&&i(l,"BAD_INDENT",Fs)),!d.anchor&&!d.tag&&!p){c=d.end,d.comment&&(a.comment?a.comment+=`
|
|
67
|
+
`+d.comment:a.comment=d.comment);continue}(d.newlineAfterProp||ou.containsNewline(f))&&i(f??u[u.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else d.found?.indent!==r.indent&&i(l,"BAD_INDENT",Fs);t.atKey=!0;let w=d.end,v=f?n(t,f,d,i):e(t,w,u,null,d,i);t.schema.compat&&Ds.flowIndentCheck(r.indent,f,i),t.atKey=!1,au.mapIncludes(t,a.items,v)&&i(w,"DUPLICATE_KEY","Map keys must be unique");let k=$s.resolveProps(p??[],{indicator:"map-value-ind",next:y,offset:v.range[2],onError:i,parentIndent:r.indent,startOnNewline:!f||f.type==="block-scalar"});if(l=k.end,k.found){m&&(y?.type==="block-map"&&!k.hasNewline&&i(l,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),t.options.strict&&d.start<k.found.offset-1024&&i(v.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let S=y?n(t,y,k,i):e(t,l,p,null,k,i);t.schema.compat&&Ds.flowIndentCheck(r.indent,y,i),l=S.range[2];let _=new Ms.Pair(v,S);t.options.keepSourceTokens&&(_.srcToken=h),a.items.push(_)}else{m&&i(v.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),k.comment&&(v.comment?v.comment+=`
|
|
68
|
+
`+k.comment:v.comment=k.comment);let S=new Ms.Pair(v);t.options.keepSourceTokens&&(S.srcToken=h),a.items.push(S)}}return c&&c<l&&i(c,"IMPOSSIBLE","Map comment with trailing content"),a.range=[r.offset,l,c??l],a}Bs.resolveBlockMap=lu});var Ys=g(Ks=>{"use strict";var cu=G(),uu=ze(),fu=hr();function du({composeNode:n,composeEmptyNode:e},t,r,i,s){let o=s?.nodeClass??cu.YAMLSeq,a=new o(t.schema);t.atRoot&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let l=r.offset,c=null;for(let{start:h,value:u}of r.items){let f=uu.resolveProps(h,{indicator:"seq-item-ind",next:u,offset:l,onError:i,parentIndent:r.indent,startOnNewline:!0});if(!f.found)if(f.anchor||f.tag||u)u?.type==="block-seq"?i(f.end,"BAD_INDENT","All sequence items must start at the same column"):i(l,"MISSING_CHAR","Sequence item without - indicator");else{c=f.end,f.comment&&(a.comment=f.comment);continue}let p=u?n(t,u,f,i):e(t,f.end,h,null,f,i);t.schema.compat&&fu.flowIndentCheck(r.indent,u,i),l=p.range[2],a.items.push(p)}return a.range=[r.offset,l,c??l],a}Ks.resolveBlockSeq=du});var ke=g(Us=>{"use strict";function hu(n,e,t,r){let i="";if(n){let s=!1,o="";for(let a of n){let{source:l,type:c}=a;switch(c){case"space":s=!0;break;case"comment":{t&&!s&&r(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let h=l.substring(1)||" ";i?i+=o+h:i=h,o="";break}case"newline":i&&(o+=l),s=!0;break;default:r(a,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}e+=l.length}}return{comment:i,offset:e}}Us.resolveEnd=hu});var zs=g(Hs=>{"use strict";var mu=N(),pu=J(),Vs=z(),gu=G(),yu=ke(),Js=ze(),wu=Vt(),bu=mr(),pr="Block collections are not allowed within flow collections",gr=n=>n&&(n.type==="block-map"||n.type==="block-seq");function vu({composeNode:n,composeEmptyNode:e},t,r,i,s){let o=r.start.source==="{",a=o?"flow map":"flow sequence",l=s?.nodeClass??(o?Vs.YAMLMap:gu.YAMLSeq),c=new l(t.schema);c.flow=!0;let h=t.atRoot;h&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let u=r.offset+r.start.source.length;for(let m=0;m<r.items.length;++m){let w=r.items[m],{start:v,key:k,sep:S,value:_}=w,E=Js.resolveProps(v,{flow:a,indicator:"explicit-key-ind",next:k??S?.[0],offset:u,onError:i,parentIndent:r.indent,startOnNewline:!1});if(!E.found){if(!E.anchor&&!E.tag&&!S&&!_){m===0&&E.comma?i(E.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`):m<r.items.length-1&&i(E.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${a}`),E.comment&&(c.comment?c.comment+=`
|
|
69
|
+
`+E.comment:c.comment=E.comment),u=E.end;continue}!o&&t.options.strict&&wu.containsNewline(k)&&i(k,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(m===0)E.comma&&i(E.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`);else if(E.comma||i(E.start,"MISSING_CHAR",`Missing , between ${a} items`),E.comment){let A="";e:for(let b of v)switch(b.type){case"comma":case"space":break;case"comment":A=b.source.substring(1);break e;default:break e}if(A){let b=c.items[c.items.length-1];mu.isPair(b)&&(b=b.value??b.key),b.comment?b.comment+=`
|
|
70
|
+
`+A:b.comment=A,E.comment=E.comment.substring(A.length+1)}}if(!o&&!S&&!E.found){let A=_?n(t,_,E,i):e(t,E.end,S,null,E,i);c.items.push(A),u=A.range[2],gr(_)&&i(A.range,"BLOCK_IN_FLOW",pr)}else{t.atKey=!0;let A=E.end,b=k?n(t,k,E,i):e(t,A,v,null,E,i);gr(k)&&i(b.range,"BLOCK_IN_FLOW",pr),t.atKey=!1;let O=Js.resolveProps(S??[],{flow:a,indicator:"map-value-ind",next:_,offset:b.range[2],onError:i,parentIndent:r.indent,startOnNewline:!1});if(O.found){if(!o&&!E.found&&t.options.strict){if(S)for(let q of S){if(q===O.found)break;if(q.type==="newline"){i(q,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}E.start<O.found.offset-1024&&i(O.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else _&&("source"in _&&_.source?.[0]===":"?i(_,"MISSING_CHAR",`Missing space after : in ${a}`):i(O.start,"MISSING_CHAR",`Missing , or : between ${a} items`));let W=_?n(t,_,O,i):O.found?e(t,O.end,S,null,O,i):null;W?gr(_)&&i(W.range,"BLOCK_IN_FLOW",pr):O.comment&&(b.comment?b.comment+=`
|
|
71
|
+
`+O.comment:b.comment=O.comment);let fe=new pu.Pair(b,W);if(t.options.keepSourceTokens&&(fe.srcToken=w),o){let q=c;bu.mapIncludes(t,q.items,b)&&i(A,"DUPLICATE_KEY","Map keys must be unique"),q.items.push(fe)}else{let q=new Vs.YAMLMap(t.schema);q.flow=!0,q.items.push(fe);let Hr=(W??b).range;q.range=[b.range[0],Hr[1],Hr[2]],c.items.push(q)}u=W?W.range[2]:O.end}}let f=o?"}":"]",[p,...y]=r.end,d=u;if(p?.source===f)d=p.offset+p.source.length;else{let m=a[0].toUpperCase()+a.substring(1),w=h?`${m} must end with a ${f}`:`${m} in block collection must be sufficiently indented and end with a ${f}`;i(u,h?"MISSING_CHAR":"BAD_INDENT",w),p&&p.source.length!==1&&y.unshift(p)}if(y.length>0){let m=yu.resolveEnd(y,d,t.options.strict,i);m.comment&&(c.comment?c.comment+=`
|
|
72
|
+
`+m.comment:c.comment=m.comment),c.range=[r.offset,d,m.offset]}else c.range=[r.offset,d,d];return c}Hs.resolveFlowCollection=vu});var Qs=g(Gs=>{"use strict";var ku=N(),Su=C(),_u=z(),Eu=G(),Nu=Ws(),Pu=Ys(),Au=zs();function yr(n,e,t,r,i,s){let o=t.type==="block-map"?Nu.resolveBlockMap(n,e,t,r,s):t.type==="block-seq"?Pu.resolveBlockSeq(n,e,t,r,s):Au.resolveFlowCollection(n,e,t,r,s),a=o.constructor;return i==="!"||i===a.tagName?(o.tag=a.tagName,o):(i&&(o.tag=i),o)}function Cu(n,e,t,r,i){let s=r.tag,o=s?e.directives.tagName(s.source,f=>i(s,"TAG_RESOLVE_FAILED",f)):null;if(t.type==="block-seq"){let{anchor:f,newlineAfterProp:p}=r,y=f&&s?f.offset>s.offset?f:s:f??s;y&&(!p||p.offset<y.offset)&&i(y,"MISSING_CHAR","Missing newline after block sequence props")}let a=t.type==="block-map"?"map":t.type==="block-seq"?"seq":t.start.source==="{"?"map":"seq";if(!s||!o||o==="!"||o===_u.YAMLMap.tagName&&a==="map"||o===Eu.YAMLSeq.tagName&&a==="seq")return yr(n,e,t,i,o);let l=e.schema.tags.find(f=>f.tag===o&&f.collection===a);if(!l){let f=e.schema.knownTags[o];if(f?.collection===a)e.schema.tags.push(Object.assign({},f,{default:!1})),l=f;else return f?i(s,"BAD_COLLECTION_TYPE",`${f.tag} used for ${a} collection, but expects ${f.collection??"scalar"}`,!0):i(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0),yr(n,e,t,i,o)}let c=yr(n,e,t,i,o,l),h=l.resolve?.(c,f=>i(s,"TAG_RESOLVE_FAILED",f),e.options)??c,u=ku.isNode(h)?h:new Su.Scalar(h);return u.range=c.range,u.tag=o,l?.format&&(u.format=l.format),u}Gs.composeCollection=Cu});var br=g(Xs=>{"use strict";var wr=C();function Ou(n,e,t){let r=e.offset,i=qu(e,n.options.strict,t);if(!i)return{value:"",type:null,comment:"",range:[r,r,r]};let s=i.mode===">"?wr.Scalar.BLOCK_FOLDED:wr.Scalar.BLOCK_LITERAL,o=e.source?Lu(e.source):[],a=o.length;for(let d=o.length-1;d>=0;--d){let m=o[d][1];if(m===""||m==="\r")a=d;else break}if(a===0){let d=i.chomp==="+"&&o.length>0?`
|
|
73
|
+
`.repeat(Math.max(1,o.length-1)):"",m=r+i.length;return e.source&&(m+=e.source.length),{value:d,type:s,comment:i.comment,range:[r,m,m]}}let l=e.indent+i.indent,c=e.offset+i.length,h=0;for(let d=0;d<a;++d){let[m,w]=o[d];if(w===""||w==="\r")i.indent===0&&m.length>l&&(l=m.length);else{m.length<l&&t(c+m.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),i.indent===0&&(l=m.length),h=d,l===0&&!n.atRoot&&t(c,"BAD_INDENT","Block scalar values in collections must be indented");break}c+=m.length+w.length+1}for(let d=o.length-1;d>=a;--d)o[d][0].length>l&&(a=d+1);let u="",f="",p=!1;for(let d=0;d<h;++d)u+=o[d][0].slice(l)+`
|
|
74
|
+
`;for(let d=h;d<a;++d){let[m,w]=o[d];c+=m.length+w.length+1;let v=w[w.length-1]==="\r";if(v&&(w=w.slice(0,-1)),w&&m.length<l){let S=`Block scalar lines must not be less indented than their ${i.indent?"explicit indentation indicator":"first line"}`;t(c-w.length-(v?2:1),"BAD_INDENT",S),m=""}s===wr.Scalar.BLOCK_LITERAL?(u+=f+m.slice(l)+w,f=`
|
|
75
|
+
`):m.length>l||w[0]===" "?(f===" "?f=`
|
|
76
|
+
`:!p&&f===`
|
|
77
77
|
`&&(f=`
|
|
78
78
|
|
|
79
|
-
`),u+=f+
|
|
80
|
-
`,
|
|
79
|
+
`),u+=f+m.slice(l)+w,f=`
|
|
80
|
+
`,p=!0):w===""?f===`
|
|
81
81
|
`?u+=`
|
|
82
82
|
`:f=`
|
|
83
|
-
`:(u+=f+w,f=" ",
|
|
83
|
+
`:(u+=f+w,f=" ",p=!1)}switch(i.chomp){case"-":break;case"+":for(let d=a;d<o.length;++d)u+=`
|
|
84
84
|
`+o[d][0].slice(l);u[u.length-1]!==`
|
|
85
85
|
`&&(u+=`
|
|
86
86
|
`);break;default:u+=`
|
|
87
|
-
`}let y=r+i.length+e.source.length;return{value:u,type:s,comment:i.comment,range:[r,y,y]}}function
|
|
87
|
+
`}let y=r+i.length+e.source.length;return{value:u,type:s,comment:i.comment,range:[r,y,y]}}function qu({offset:n,props:e},t,r){if(e[0].type!=="block-scalar-header")return r(e[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:i}=e[0],s=i[0],o=0,a="",l=-1;for(let f=1;f<i.length;++f){let p=i[f];if(!a&&(p==="-"||p==="+"))a=p;else{let y=Number(p);!o&&y?o=y:l===-1&&(l=n+f)}}l!==-1&&r(l,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${i}`);let c=!1,h="",u=i.length;for(let f=1;f<e.length;++f){let p=e[f];switch(p.type){case"space":c=!0;case"newline":u+=p.source.length;break;case"comment":t&&!c&&r(p,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),u+=p.source.length,h=p.source.substring(1);break;case"error":r(p,"UNEXPECTED_TOKEN",p.message),u+=p.source.length;break;default:{let y=`Unexpected token in block scalar header: ${p.type}`;r(p,"UNEXPECTED_TOKEN",y);let d=p.source;d&&typeof d=="string"&&(u+=d.length)}}}return{mode:s,indent:o,chomp:a,comment:h,length:u}}function Lu(n){let e=n.split(/\n( *)/),t=e[0],r=t.match(/^( *)/),s=[r?.[1]?[r[1],t.slice(r[1].length)]:["",t]];for(let o=1;o<e.length;o+=2)s.push([e[o],e[o+1]]);return s}Xs.resolveBlockScalar=Ou});var kr=g(eo=>{"use strict";var vr=C(),Tu=ke();function Ru(n,e,t){let{offset:r,type:i,source:s,end:o}=n,a,l,c=(f,p,y)=>t(r+f,p,y);switch(i){case"scalar":a=vr.Scalar.PLAIN,l=ju(s,c);break;case"single-quoted-scalar":a=vr.Scalar.QUOTE_SINGLE,l=xu(s,c);break;case"double-quoted-scalar":a=vr.Scalar.QUOTE_DOUBLE,l=Iu(s,c);break;default:return t(n,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${i}`),{value:"",type:null,comment:"",range:[r,r+s.length,r+s.length]}}let h=r+s.length,u=Tu.resolveEnd(o,h,e,t);return{value:l,type:a,comment:u.comment,range:[r,h,u.offset]}}function ju(n,e){let t="";switch(n[0]){case" ":t="a tab character";break;case",":t="flow indicator character ,";break;case"%":t="directive indicator character %";break;case"|":case">":{t=`block scalar indicator ${n[0]}`;break}case"@":case"`":{t=`reserved character ${n[0]}`;break}}return t&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${t}`),Zs(n)}function xu(n,e){return(n[n.length-1]!=="'"||n.length===1)&&e(n.length,"MISSING_CHAR","Missing closing 'quote"),Zs(n.slice(1,-1)).replace(/''/g,"'")}function Zs(n){let e,t;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
|
|
88
88
|
`,"sy"),t=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
|
89
89
|
`,"sy")}catch{e=/(.*?)[ \t]*\r?\n/sy,t=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=e.exec(n);if(!r)return n;let i=r[1],s=" ",o=e.lastIndex;for(t.lastIndex=o;r=t.exec(n);)r[1]===""?s===`
|
|
90
90
|
`?i+=s:s=`
|
|
91
|
-
`:(i+=s+r[1],s=" "),o=t.lastIndex;let a=/[ \t]*(.*)/sy;return a.lastIndex=o,r=a.exec(n),i+s+(r?.[1]??"")}function
|
|
91
|
+
`:(i+=s+r[1],s=" "),o=t.lastIndex;let a=/[ \t]*(.*)/sy;return a.lastIndex=o,r=a.exec(n),i+s+(r?.[1]??"")}function Iu(n,e){let t="";for(let r=1;r<n.length-1;++r){let i=n[r];if(!(i==="\r"&&n[r+1]===`
|
|
92
92
|
`))if(i===`
|
|
93
|
-
`){let{fold:s,offset:o}=
|
|
93
|
+
`){let{fold:s,offset:o}=Mu(n,r);t+=s,r=o}else if(i==="\\"){let s=n[++r],o=$u[s];if(o)t+=o;else if(s===`
|
|
94
94
|
`)for(s=n[r+1];s===" "||s===" ";)s=n[++r+1];else if(s==="\r"&&n[r+1]===`
|
|
95
|
-
`)for(s=n[++r+1];s===" "||s===" ";)s=n[++r+1];else if(s==="x"||s==="u"||s==="U"){let a=s==="x"?2:s==="u"?4:8;t
|
|
95
|
+
`)for(s=n[++r+1];s===" "||s===" ";)s=n[++r+1];else if(s==="x"||s==="u"||s==="U"){let a=s==="x"?2:s==="u"?4:8;t+=Du(n,r+1,a,e),r+=a}else{let a=n.substr(r-1,2);e(r-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),t+=a}}else if(i===" "||i===" "){let s=r,o=n[r+1];for(;o===" "||o===" ";)o=n[++r+1];o!==`
|
|
96
96
|
`&&!(o==="\r"&&n[r+2]===`
|
|
97
|
-
`)&&(t+=r>s?n.slice(s,r+1):i)}else t+=i}return(n[n.length-1]!=='"'||n.length===1)&&e(n.length,"MISSING_CHAR",'Missing closing "quote'),t}function
|
|
97
|
+
`)&&(t+=r>s?n.slice(s,r+1):i)}else t+=i}return(n[n.length-1]!=='"'||n.length===1)&&e(n.length,"MISSING_CHAR",'Missing closing "quote'),t}function Mu(n,e){let t="",r=n[e+1];for(;(r===" "||r===" "||r===`
|
|
98
98
|
`||r==="\r")&&!(r==="\r"&&n[e+2]!==`
|
|
99
99
|
`);)r===`
|
|
100
100
|
`&&(t+=`
|
|
101
|
-
`),e+=1,r=n[e+1];return t||(t=" "),{fold:t,offset:e}}var
|
|
102
|
-
`,r:"\r",t:" ",v:"\v",N:"
",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function
|
|
101
|
+
`),e+=1,r=n[e+1];return t||(t=" "),{fold:t,offset:e}}var $u={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
|
|
102
|
+
`,r:"\r",t:" ",v:"\v",N:"
",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function Du(n,e,t,r){let i=n.substr(e,t),o=i.length===t&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;try{return String.fromCodePoint(o)}catch{let a=n.substr(e-2,t+2);return r(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}}eo.resolveFlowScalar=Ru});var ro=g(no=>{"use strict";var le=N(),to=C(),Fu=br(),Bu=kr();function Wu(n,e,t,r){let{value:i,type:s,comment:o,range:a}=e.type==="block-scalar"?Fu.resolveBlockScalar(n,e,r):Bu.resolveFlowScalar(e,n.options.strict,r),l=t?n.directives.tagName(t.source,u=>r(t,"TAG_RESOLVE_FAILED",u)):null,c;n.options.stringKeys&&n.atKey?c=n.schema[le.SCALAR]:l?c=Ku(n.schema,i,l,t,r):e.type==="scalar"?c=Yu(n,i,e,r):c=n.schema[le.SCALAR];let h;try{let u=c.resolve(i,f=>r(t??e,"TAG_RESOLVE_FAILED",f),n.options);h=le.isScalar(u)?u:new to.Scalar(u)}catch(u){let f=u instanceof Error?u.message:String(u);r(t??e,"TAG_RESOLVE_FAILED",f),h=new to.Scalar(i)}return h.range=a,h.source=i,s&&(h.type=s),l&&(h.tag=l),c.format&&(h.format=c.format),o&&(h.comment=o),h}function Ku(n,e,t,r,i){if(t==="!")return n[le.SCALAR];let s=[];for(let a of n.tags)if(!a.collection&&a.tag===t)if(a.default&&a.test)s.push(a);else return a;for(let a of s)if(a.test?.test(e))return a;let o=n.knownTags[t];return o&&!o.collection?(n.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(i(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${t}`,t!=="tag:yaml.org,2002:str"),n[le.SCALAR])}function Yu({atKey:n,directives:e,schema:t},r,i,s){let o=t.tags.find(a=>(a.default===!0||n&&a.default==="key")&&a.test?.test(r))||t[le.SCALAR];if(t.compat){let a=t.compat.find(l=>l.default&&l.test?.test(r))??t[le.SCALAR];if(o.tag!==a.tag){let l=e.tagString(o.tag),c=e.tagString(a.tag),h=`Value may be parsed as either ${l} or ${c}`;s(i,"TAG_RESOLVE_FAILED",h,!0)}}return o}no.composeScalar=Wu});var so=g(io=>{"use strict";function Uu(n,e,t){if(e){t??(t=e.length);for(let r=t-1;r>=0;--r){let i=e[r];switch(i.type){case"space":case"comment":case"newline":n-=i.source.length;continue}for(i=e[++r];i?.type==="space";)n+=i.source.length,i=e[++r];break}}return n}io.emptyScalarPosition=Uu});var lo=g(_r=>{"use strict";var Vu=Oe(),Ju=N(),Hu=Qs(),oo=ro(),zu=ke(),Gu=so(),Qu={composeNode:ao,composeEmptyNode:Sr};function ao(n,e,t,r){let i=n.atKey,{spaceBefore:s,comment:o,anchor:a,tag:l}=t,c,h=!0;switch(e.type){case"alias":c=Xu(n,e,r),(a||l)&&r(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":c=oo.composeScalar(n,e,l,r),a&&(c.anchor=a.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{c=Hu.composeCollection(Qu,n,e,t,r),a&&(c.anchor=a.source.substring(1))}catch(u){let f=u instanceof Error?u.message:String(u);r(e,"RESOURCE_EXHAUSTION",f)}break;default:{let u=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;r(e,"UNEXPECTED_TOKEN",u),h=!1}}return c??(c=Sr(n,e.offset,void 0,null,t,r)),a&&c.anchor===""&&r(a,"BAD_ALIAS","Anchor cannot be an empty string"),i&&n.options.stringKeys&&(!Ju.isScalar(c)||typeof c.value!="string"||c.tag&&c.tag!=="tag:yaml.org,2002:str")&&r(l??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),s&&(c.spaceBefore=!0),o&&(e.type==="scalar"&&e.source===""?c.comment=o:c.commentBefore=o),n.options.keepSourceTokens&&h&&(c.srcToken=e),c}function Sr(n,e,t,r,{spaceBefore:i,comment:s,anchor:o,tag:a,end:l},c){let h={type:"scalar",offset:Gu.emptyScalarPosition(e,t,r),indent:-1,source:""},u=oo.composeScalar(n,h,a,c);return o&&(u.anchor=o.source.substring(1),u.anchor===""&&c(o,"BAD_ALIAS","Anchor cannot be an empty string")),i&&(u.spaceBefore=!0),s&&(u.comment=s,u.range[2]=l),u}function Xu({options:n},{offset:e,source:t,end:r},i){let s=new Vu.Alias(t.substring(1));s.source===""&&i(e,"BAD_ALIAS","Alias cannot be an empty string"),s.source.endsWith(":")&&i(e+t.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let o=e+t.length,a=zu.resolveEnd(r,o,n.strict,i);return s.range=[e,o,a.offset],a.comment&&(s.comment=a.comment),s}_r.composeEmptyNode=Sr;_r.composeNode=ao});var fo=g(uo=>{"use strict";var Zu=Ue(),co=lo(),ef=ke(),tf=ze();function nf(n,e,{offset:t,start:r,value:i,end:s},o){let a=Object.assign({_directives:e},n),l=new Zu.Document(void 0,a),c={atKey:!1,atRoot:!0,directives:l.directives,options:l.options,schema:l.schema},h=tf.resolveProps(r,{indicator:"doc-start",next:i??s?.[0],offset:t,onError:o,parentIndent:0,startOnNewline:!0});h.found&&(l.directives.docStart=!0,i&&(i.type==="block-map"||i.type==="block-seq")&&!h.hasNewline&&o(h.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),l.contents=i?co.composeNode(c,i,h,o):co.composeEmptyNode(c,h.end,r,null,h,o);let u=l.contents.range[2],f=ef.resolveEnd(s,u,!1,o);return f.comment&&(l.comment=f.comment),l.range=[t,u,f.offset],l}uo.composeDoc=nf});var Nr=g(po=>{"use strict";var rf=nt("process"),sf=un(),of=Ue(),Ge=He(),ho=N(),af=fo(),lf=ke();function Qe(n){if(typeof n=="number")return[n,n+1];if(Array.isArray(n))return n.length===2?n:[n[0],n[1]];let{offset:e,source:t}=n;return[e,e+(typeof t=="string"?t.length:1)]}function mo(n){let e="",t=!1,r=!1;for(let i=0;i<n.length;++i){let s=n[i];switch(s[0]){case"#":e+=(e===""?"":r?`
|
|
103
103
|
|
|
104
104
|
`:`
|
|
105
|
-
`)+(s.substring(1)||" "),t=!0,r=!1;break;case"%":n[i+1]?.[0]!=="#"&&(i+=1),t=!1;break;default:t||(r=!0),t=!1}}return{comment:e,afterEmptyLine:r}}var
|
|
105
|
+
`)+(s.substring(1)||" "),t=!0,r=!1;break;case"%":n[i+1]?.[0]!=="#"&&(i+=1),t=!1;break;default:t||(r=!0),t=!1}}return{comment:e,afterEmptyLine:r}}var Er=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(t,r,i,s)=>{let o=Qe(t);s?this.warnings.push(new Ge.YAMLWarning(o,r,i)):this.errors.push(new Ge.YAMLParseError(o,r,i))},this.directives=new sf.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,t){let{comment:r,afterEmptyLine:i}=mo(this.prelude);if(r){let s=e.contents;if(t)e.comment=e.comment?`${e.comment}
|
|
106
106
|
${r}`:r;else if(i||e.directives.docStart||!s)e.commentBefore=r;else if(ho.isCollection(s)&&!s.flow&&s.items.length>0){let o=s.items[0];ho.isPair(o)&&(o=o.key);let a=o.commentBefore;o.commentBefore=a?`${r}
|
|
107
107
|
${a}`:r}else{let o=s.commentBefore;s.commentBefore=o?`${r}
|
|
108
|
-
${o}`:r}}if(t){for(let s=0;s<this.errors.length;++s)e.errors.push(this.errors[s]);for(let s=0;s<this.warnings.length;++s)e.warnings.push(this.warnings[s])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:
|
|
109
|
-
${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new
|
|
108
|
+
${o}`:r}}if(t){for(let s=0;s<this.errors.length;++s)e.errors.push(this.errors[s]);for(let s=0;s<this.warnings.length;++s)e.warnings.push(this.warnings[s])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:mo(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,r=-1){for(let i of e)yield*this.next(i);yield*this.end(t,r)}*next(e){switch(rf.env.LOG_STREAM&&console.dir(e,{depth:null}),e.type){case"directive":this.directives.add(e.source,(t,r,i)=>{let s=Qe(e);s[0]+=t,this.onError(s,"BAD_DIRECTIVE",r,i)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let t=af.composeDoc(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{let t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,r=new Ge.YAMLParseError(Qe(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(r):this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){let r="Unexpected doc-end without preceding document";this.errors.push(new Ge.YAMLParseError(Qe(e),"UNEXPECTED_TOKEN",r));break}this.doc.directives.docEnd=!0;let t=lf.resolveEnd(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let r=this.doc.comment;this.doc.comment=r?`${r}
|
|
109
|
+
${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new Ge.YAMLParseError(Qe(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let r=Object.assign({_directives:this.directives},this.options),i=new of.Document(void 0,r);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),i.range=[0,t,t],this.decorate(i,!1),yield i}}};po.Composer=Er});var wo=g(Jt=>{"use strict";var cf=br(),uf=kr(),ff=He(),go=je();function df(n,e=!0,t){if(n){let r=(i,s,o)=>{let a=typeof i=="number"?i:Array.isArray(i)?i[0]:i.offset;if(t)t(a,s,o);else throw new ff.YAMLParseError([a,a+1],s,o)};switch(n.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return uf.resolveFlowScalar(n,e,r);case"block-scalar":return cf.resolveBlockScalar({options:{strict:e}},n,r)}}return null}function hf(n,e){let{implicitKey:t=!1,indent:r,inFlow:i=!1,offset:s=-1,type:o="PLAIN"}=e,a=go.stringifyString({type:o,value:n},{implicitKey:t,indent:r>0?" ".repeat(r):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}}),l=e.end??[{type:"newline",offset:-1,indent:r,source:`
|
|
110
110
|
`}];switch(a[0]){case"|":case">":{let c=a.indexOf(`
|
|
111
111
|
`),h=a.substring(0,c),u=a.substring(c+1)+`
|
|
112
112
|
`,f=[{type:"block-scalar-header",offset:s,indent:r,source:h}];return yo(f,l)||f.push({type:"newline",offset:-1,indent:r,source:`
|
|
113
|
-
`}),{type:"block-scalar",offset:s,indent:r,props:f,source:u}}case'"':return{type:"double-quoted-scalar",offset:s,indent:r,source:a,end:l};case"'":return{type:"single-quoted-scalar",offset:s,indent:r,source:a,end:l};default:return{type:"scalar",offset:s,indent:r,source:a,end:l}}}function
|
|
113
|
+
`}),{type:"block-scalar",offset:s,indent:r,props:f,source:u}}case'"':return{type:"double-quoted-scalar",offset:s,indent:r,source:a,end:l};case"'":return{type:"single-quoted-scalar",offset:s,indent:r,source:a,end:l};default:return{type:"scalar",offset:s,indent:r,source:a,end:l}}}function mf(n,e,t={}){let{afterKey:r=!1,implicitKey:i=!1,inFlow:s=!1,type:o}=t,a="indent"in n?n.indent:null;if(r&&typeof a=="number"&&(a+=2),!o)switch(n.type){case"single-quoted-scalar":o="QUOTE_SINGLE";break;case"double-quoted-scalar":o="QUOTE_DOUBLE";break;case"block-scalar":{let c=n.props[0];if(c.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o=c.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:o="PLAIN"}let l=go.stringifyString({type:o,value:e},{implicitKey:i||a===null,indent:a!==null&&a>0?" ".repeat(a):"",inFlow:s,options:{blockQuote:!0,lineWidth:-1}});switch(l[0]){case"|":case">":pf(n,l);break;case'"':Pr(n,l,"double-quoted-scalar");break;case"'":Pr(n,l,"single-quoted-scalar");break;default:Pr(n,l,"scalar")}}function pf(n,e){let t=e.indexOf(`
|
|
114
114
|
`),r=e.substring(0,t),i=e.substring(t+1)+`
|
|
115
115
|
`;if(n.type==="block-scalar"){let s=n.props[0];if(s.type!=="block-scalar-header")throw new Error("Invalid block scalar header");s.source=r,n.source=i}else{let{offset:s}=n,o="indent"in n?n.indent:-1,a=[{type:"block-scalar-header",offset:s,indent:o,source:r}];yo(a,"end"in n?n.end:void 0)||a.push({type:"newline",offset:-1,indent:o,source:`
|
|
116
116
|
`});for(let l of Object.keys(n))l!=="type"&&l!=="offset"&&delete n[l];Object.assign(n,{type:"block-scalar",indent:o,props:a,source:i})}}function yo(n,e){if(e)for(let t of e)switch(t.type){case"space":case"comment":n.push(t);break;case"newline":return n.push(t),!0}return!1}function Pr(n,e,t){switch(n.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":n.type=t,n.source=e;break;case"block-scalar":{let r=n.props.slice(1),i=e.length;n.props[0].type==="block-scalar-header"&&(i-=n.props[0].source.length);for(let s of r)s.offset+=i;delete n.props,Object.assign(n,{type:t,source:e,end:r});break}case"block-map":case"block-seq":{let i={type:"newline",offset:n.offset+e.length,indent:n.indent,source:`
|
|
117
|
-
`};delete n.items,Object.assign(n,{type:t,source:e,end:[i]});break}default:{let r="indent"in n?n.indent:-1,i="end"in n&&Array.isArray(n.end)?n.end.filter(s=>s.type==="space"||s.type==="comment"||s.type==="newline"):[];for(let s of Object.keys(n))s!=="type"&&s!=="offset"&&delete n[s];Object.assign(n,{type:t,indent:r,source:e,end:i})}}}
|
|
117
|
+
`};delete n.items,Object.assign(n,{type:t,source:e,end:[i]});break}default:{let r="indent"in n?n.indent:-1,i="end"in n&&Array.isArray(n.end)?n.end.filter(s=>s.type==="space"||s.type==="comment"||s.type==="newline"):[];for(let s of Object.keys(n))s!=="type"&&s!=="offset"&&delete n[s];Object.assign(n,{type:t,indent:r,source:e,end:i})}}}Jt.createScalarToken=hf;Jt.resolveAsScalar=df;Jt.setScalarValue=mf});var vo=g(bo=>{"use strict";var gf=n=>"type"in n?zt(n):Ht(n);function zt(n){switch(n.type){case"block-scalar":{let e="";for(let t of n.props)e+=zt(t);return e+n.source}case"block-map":case"block-seq":{let e="";for(let t of n.items)e+=Ht(t);return e}case"flow-collection":{let e=n.start.source;for(let t of n.items)e+=Ht(t);for(let t of n.end)e+=t.source;return e}case"document":{let e=Ht(n);if(n.end)for(let t of n.end)e+=t.source;return e}default:{let e=n.source;if("end"in n&&n.end)for(let t of n.end)e+=t.source;return e}}}function Ht({start:n,key:e,sep:t,value:r}){let i="";for(let s of n)i+=s.source;if(e&&(i+=zt(e)),t)for(let s of t)i+=s.source;return r&&(i+=zt(r)),i}bo.stringify=gf});var Eo=g(_o=>{"use strict";var Ar=Symbol("break visit"),yf=Symbol("skip children"),ko=Symbol("remove item");function ce(n,e){"type"in n&&n.type==="document"&&(n={start:n.start,value:n.value}),So(Object.freeze([]),n,e)}ce.BREAK=Ar;ce.SKIP=yf;ce.REMOVE=ko;ce.itemAtPath=(n,e)=>{let t=n;for(let[r,i]of e){let s=t?.[r];if(s&&"items"in s)t=s.items[i];else return}return t};ce.parentCollection=(n,e)=>{let t=ce.itemAtPath(n,e.slice(0,-1)),r=e[e.length-1][0],i=t?.[r];if(i&&"items"in i)return i;throw new Error("Parent collection not found")};function So(n,e,t){let r=t(e,n);if(typeof r=="symbol")return r;for(let i of["key","value"]){let s=e[i];if(s&&"items"in s){for(let o=0;o<s.items.length;++o){let a=So(Object.freeze(n.concat([[i,o]])),s.items[o],t);if(typeof a=="number")o=a-1;else{if(a===Ar)return Ar;a===ko&&(s.items.splice(o,1),o-=1)}}typeof r=="function"&&i==="key"&&(r=r(e,n))}}return typeof r=="function"?r(e,n):r}_o.visit=ce});var Gt=g(j=>{"use strict";var Cr=wo(),wf=vo(),bf=Eo(),Or="\uFEFF",qr="",Lr="",Tr="",vf=n=>!!n&&"items"in n,kf=n=>!!n&&(n.type==="scalar"||n.type==="single-quoted-scalar"||n.type==="double-quoted-scalar"||n.type==="block-scalar");function Sf(n){switch(n){case Or:return"<BOM>";case qr:return"<DOC>";case Lr:return"<FLOW_END>";case Tr:return"<SCALAR>";default:return JSON.stringify(n)}}function _f(n){switch(n){case Or:return"byte-order-mark";case qr:return"doc-mode";case Lr:return"flow-error-end";case Tr:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
|
|
118
118
|
`:case`\r
|
|
119
|
-
`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(n[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}j.createScalarToken=
|
|
120
|
-
`:case"\r":case" ":return!0;default:return!1}}var No=new Set("0123456789ABCDEFabcdef"),Ef=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),
|
|
121
|
-
\r `),Rr=n=>!n||
|
|
119
|
+
`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(n[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}j.createScalarToken=Cr.createScalarToken;j.resolveAsScalar=Cr.resolveAsScalar;j.setScalarValue=Cr.setScalarValue;j.stringify=wf.stringify;j.visit=bf.visit;j.BOM=Or;j.DOCUMENT=qr;j.FLOW_END=Lr;j.SCALAR=Tr;j.isCollection=vf;j.isScalar=kf;j.prettyToken=Sf;j.tokenType=_f});var xr=g(Po=>{"use strict";var Xe=Gt();function M(n){switch(n){case void 0:case" ":case`
|
|
120
|
+
`:case"\r":case" ":return!0;default:return!1}}var No=new Set("0123456789ABCDEFabcdef"),Ef=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Qt=new Set(",[]{}"),Nf=new Set(` ,[]{}
|
|
121
|
+
\r `),Rr=n=>!n||Nf.has(n),jr=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let r=this.next??"stream";for(;r&&(t||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t===" "||t===" ";)t=this.buffer[++e];return!t||t==="#"||t===`
|
|
122
122
|
`?!0:t==="\r"?this.buffer[e+1]===`
|
|
123
123
|
`:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let r=0;for(;t===" ";)t=this.buffer[++r+e];if(t==="\r"){let i=this.buffer[r+e+1];if(i===`
|
|
124
124
|
`||!i&&!this.atEnd)return e+r+1}return t===`
|
|
125
125
|
`||r>=this.indentNext||!t&&!this.atEnd?e+r:-1}if(t==="-"||t==="."){let r=this.buffer.substr(e,3);if((r==="---"||r==="...")&&M(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
|
|
126
|
-
`,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===
|
|
126
|
+
`,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===Xe.BOM&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let t=e.length,r=e.indexOf("#");for(;r!==-1;){let s=e[r-1];if(s===" "||s===" "){t=r-1;break}else r=e.indexOf("#",r+1)}for(;;){let s=e[t-1];if(s===" "||s===" ")t-=1;else break}let i=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-i),this.pushNewline(),"stream"}if(this.atLineEnd()){let t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),"stream"}return yield Xe.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let t=this.peek(3);if((t==="---"||t==="...")&&M(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,t==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!M(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&M(t)){let r=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=r,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(Rr),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,r=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=r=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);let i=this.getLine();if(i===null)return this.setNext("flow");if((r!==-1&&r<this.indentNext&&i[0]!=="#"||r===0&&(i.startsWith("---")||i.startsWith("..."))&&M(i[3]))&&!(r===this.indentNext-1&&this.flowLevel===1&&(i[0]==="]"||i[0]==="}")))return this.flowLevel=0,yield Xe.FLOW_END,yield*this.parseLineStart();let s=0;for(;i[s]===",";)s+=yield*this.pushCount(1),s+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(s+=yield*this.pushIndicators(),i[s]){case void 0:return"flow";case"#":return yield*this.pushCount(i.length-s),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(Rr),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let o=this.charAt(1);if(this.flowKey||M(o)||o===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),t=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;t!==-1&&this.buffer[t+1]==="'";)t=this.buffer.indexOf("'",t+2);else for(;t!==-1;){let s=0;for(;this.buffer[t-1-s]==="\\";)s+=1;if(s%2===0)break;t=this.buffer.indexOf('"',t+1)}let r=this.buffer.substring(0,t),i=r.indexOf(`
|
|
127
127
|
`,this.pos);if(i!==-1){for(;i!==-1;){let s=this.continueScalar(i+1);if(s===-1)break;i=r.indexOf(`
|
|
128
128
|
`,s)}i!==-1&&(t=i-(r[i-1]==="\r"?2:1))}if(t===-1){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let t=this.buffer[++e];if(t==="+")this.blockScalarKeep=!0;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if(t!=="-")break}return yield*this.pushUntil(t=>M(t)||t==="#")}*parseBlockScalar(){let e=this.pos-1,t=0,r;e:for(let s=this.pos;r=this.buffer[s];++s)switch(r){case" ":t+=1;break;case`
|
|
129
129
|
`:e=s,t=0;break;case"\r":{let o=this.buffer[s+1];if(!o&&!this.atEnd)return this.setNext("block-scalar");if(o===`
|
|
130
130
|
`)break}default:break e}if(!r&&!this.atEnd)return this.setNext("block-scalar");if(t>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=t:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let s=this.continueScalar(e+1);if(s===-1)break;e=this.buffer.indexOf(`
|
|
131
131
|
`,s)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let i=e+1;for(r=this.buffer[i];r===" ";)r=this.buffer[++i];if(r===" "){for(;r===" "||r===" "||r==="\r"||r===`
|
|
132
132
|
`;)r=this.buffer[++i];e=i-1}else if(!this.blockScalarKeep)do{let s=e-1,o=this.buffer[s];o==="\r"&&(o=this.buffer[--s]);let a=s;for(;o===" ";)o=this.buffer[--s];if(o===`
|
|
133
|
-
`&&s>=this.pos&&s+1+t>a)e=s;else break}while(!0);return yield
|
|
133
|
+
`&&s>=this.pos&&s+1+t>a)e=s;else break}while(!0);return yield Xe.SCALAR,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,r=this.pos-1,i;for(;i=this.buffer[++r];)if(i===":"){let s=this.buffer[r+1];if(M(s)||e&&Qt.has(s))break;t=r}else if(M(i)){let s=this.buffer[r+1];if(i==="\r"&&(s===`
|
|
134
134
|
`?(r+=1,i=`
|
|
135
|
-
`,s=this.buffer[r+1]):t=r),s==="#"||e&&
|
|
136
|
-
`){let o=this.continueScalar(r+1);if(o===-1)break;r=Math.max(r,o-2)}}else{if(e&&
|
|
135
|
+
`,s=this.buffer[r+1]):t=r),s==="#"||e&&Qt.has(s))break;if(i===`
|
|
136
|
+
`){let o=this.continueScalar(r+1);if(o===-1)break;r=Math.max(r,o-2)}}else{if(e&&Qt.has(i))break;t=r}return!i&&!this.atEnd?this.setNext("plain-scalar"):(yield Xe.SCALAR,yield*this.pushToIndex(t+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){let r=this.buffer.slice(this.pos,e);return r?(yield r,this.pos+=r.length,r.length):(t&&(yield""),0)}*pushIndicators(){let e=0;e:for(;;){switch(this.charAt(0)){case"!":e+=yield*this.pushTag(),e+=yield*this.pushSpaces(!0);continue e;case"&":e+=yield*this.pushUntil(Rr),e+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{let t=this.flowLevel>0,r=this.charAt(1);if(M(r)||t&&Qt.has(r)){t?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,e+=yield*this.pushCount(1),e+=yield*this.pushSpaces(!0);continue e}}}break e}return e}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,t=this.buffer[e];for(;!M(t)&&t!==">";)t=this.buffer[++e];return yield*this.pushToIndex(t===">"?e+1:e,!1)}else{let e=this.pos+1,t=this.buffer[e];for(;t;)if(Ef.has(t))t=this.buffer[++e];else if(t==="%"&&No.has(this.buffer[e+1])&&No.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===`
|
|
137
137
|
`?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
|
|
138
|
-
`?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,r;do r=this.buffer[++t];while(r===" "||e&&r===" ");let i=t-this.pos;return i>0&&(yield this.buffer.substr(this.pos,i),this.pos=t),i}*pushUntil(e){let t=this.pos,r=this.buffer[t];for(;!e(r);)r=this.buffer[++t];return yield*this.pushToIndex(t,!1)}};Po.Lexer=jr});var Mr=g(
|
|
138
|
+
`?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,r;do r=this.buffer[++t];while(r===" "||e&&r===" ");let i=t-this.pos;return i>0&&(yield this.buffer.substr(this.pos,i),this.pos=t),i}*pushUntil(e){let t=this.pos,r=this.buffer[t];for(;!e(r);)r=this.buffer[++t];return yield*this.pushToIndex(t,!1)}};Po.Lexer=jr});var Mr=g(Ao=>{"use strict";var Ir=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,r=this.lineStarts.length;for(;t<r;){let s=t+r>>1;this.lineStarts[s]<e?t=s+1:r=s}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};let i=this.lineStarts[t-1];return{line:t,col:e-i+1}}}};Ao.LineCounter=Ir});var Dr=g(To=>{"use strict";var Pf=nt("process"),Co=Gt(),Af=xr();function Q(n,e){for(let t=0;t<n.length;++t)if(n[t].type===e)return!0;return!1}function Oo(n){for(let e=0;e<n.length;++e)switch(n[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function Lo(n){switch(n?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function Xt(n){switch(n.type){case"document":return n.start;case"block-map":{let e=n.items[n.items.length-1];return e.sep??e.start}case"block-seq":return n.items[n.items.length-1].start;default:return[]}}function Se(n){if(n.length===0)return[];let e=n.length;e:for(;--e>=0;)switch(n[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;n[++e]?.type==="space";);return n.splice(e,n.length)}function Zt(n,e){if(e.length<1e5)Array.prototype.push.apply(n,e);else for(let t=0;t<e.length;++t)n.push(e[t])}function qo(n){if(n.start.type==="flow-seq-start")for(let e of n.items)e.sep&&!e.value&&!Q(e.start,"explicit-key-ind")&&!Q(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,Lo(e.value)?e.value.end?Zt(e.value.end,e.sep):e.value.end=e.sep:Zt(e.start,e.sep),delete e.sep)}var $r=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new Af.Lexer,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let r of this.lexer.lex(e,t))yield*this.next(r);t||(yield*this.end())}*next(e){if(this.source=e,Pf.env.LOG_TOKENS&&console.log("|",Co.prettyToken(e)),this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=Co.tokenType(e);if(t)if(t==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{let r=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:r,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type==="doc-end"&&e?.type!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let t=e??this.stack.pop();if(!t)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield t;else{let r=this.peek(1);switch(t.type==="block-scalar"?t.indent="indent"in r?r.indent:0:t.type==="flow-collection"&&r.type==="document"&&(t.indent=0),t.type==="flow-collection"&&qo(t),r.type){case"document":r.value=t;break;case"block-scalar":r.props.push(t);break;case"block-map":{let i=r.items[r.items.length-1];if(i.value){r.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}else if(i.sep)i.value=t;else{Object.assign(i,{key:t,sep:[]}),this.onKeyLine=!i.explicitKey;return}break}case"block-seq":{let i=r.items[r.items.length-1];i.value?r.items.push({start:[],value:t}):i.value=t;break}case"flow-collection":{let i=r.items[r.items.length-1];!i||i.value?r.items.push({start:[],key:t,sep:[]}):i.sep?i.value=t:Object.assign(i,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((r.type==="document"||r.type==="block-map"||r.type==="block-seq")&&(t.type==="block-map"||t.type==="block-seq")){let i=t.items[t.items.length-1];i&&!i.sep&&!i.value&&i.start.length>0&&Oo(i.start)===-1&&(t.indent===0||i.start.every(s=>s.type!=="comment"||s.indent<t.indent))&&(r.type==="document"?r.end=i.start:r.items.push({start:i.start}),t.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{let e={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":{Oo(e.start)!==-1?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}let t=this.startBlockValue(e);t?this.stack.push(t):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type==="map-value-ind"){let t=Xt(this.peek(2)),r=Se(t),i;e.end?(i=e.end,i.push(this.sourceToken),delete e.end):i=[this.sourceToken];let s={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:r,key:e,sep:i}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=s}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let t=this.source.indexOf(`
|
|
139
139
|
`)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
|
|
140
|
-
`,t)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){let r="end"in t.value?t.value.end:void 0;(Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment"?r?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){let i=e.items[e.items.length-2]?.value?.end;if(Array.isArray(i)){
|
|
140
|
+
`,t)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){let r="end"in t.value?t.value.end:void 0;(Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment"?r?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){let i=e.items[e.items.length-2]?.value?.end;if(Array.isArray(i)){Zt(i,t.start),i.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let r=!this.onKeyLine&&this.indent===e.indent,i=r&&(t.sep||t.explicitKey)&&this.type!=="seq-item-ind",s=[];if(i&&t.sep&&!t.value){let o=[];for(let a=0;a<t.sep.length;++a){let l=t.sep[a];switch(l.type){case"newline":o.push(a);break;case"space":break;case"comment":l.indent>e.indent&&(o.length=0);break;default:o.length=0}}o.length>=2&&(s=t.sep.splice(o[1]))}switch(this.type){case"anchor":case"tag":i||t.value?(s.push(this.sourceToken),e.items.push({start:s}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"explicit-key-ind":!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):i||t.value?(s.push(this.sourceToken),e.items.push({start:s,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(t.explicitKey)if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Q(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]});else if(Lo(t.key)&&!Q(t.sep,"newline")){let o=Se(t.start),a=t.key,l=t.sep;l.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:a,sep:l}]})}else s.length>0?t.sep=t.sep.concat(s,this.sourceToken):t.sep.push(this.sourceToken);else if(Q(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let o=Se(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||i?e.items.push({start:s,key:null,sep:[this.sourceToken]}):Q(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let o=this.flowScalar(this.type);i||t.value?(e.items.push({start:s,key:o,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(o):(Object.assign(t,{key:o,sep:[]}),this.onKeyLine=!0);return}default:{let o=this.startBlockValue(e);if(o){if(o.type==="block-seq"){if(!t.explicitKey&&t.sep&&!Q(t.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else r&&e.items.push({start:s});this.stack.push(o);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){let r="end"in t.value?t.value.end:void 0;(Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment"?r?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){let i=e.items[e.items.length-2]?.value?.end;if(Array.isArray(i)){Zt(i,t.start),i.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;t.value||Q(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){let r=this.startBlockValue(e);if(r){this.stack.push(r);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if(this.type==="flow-error-end"){let r;do yield*this.pop(),r=this.peek(1);while(r?.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case"map-value-ind":!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let i=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:i,sep:[]}):t.sep?this.stack.push(i):Object.assign(t,{key:i,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}let r=this.startBlockValue(e);r?this.stack.push(r):(yield*this.pop(),yield*this.step())}else{let r=this.peek(2);if(r.type==="block-map"&&(this.type==="map-value-ind"&&r.indent===e.indent||this.type==="newline"&&!r.items[r.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&r.type!=="flow-collection"){let i=Xt(r),s=Se(i);qo(e);let o=e.end.splice(1,e.end.length);o.push(this.sourceToken);let a={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:s,key:e,sep:o}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=a}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let t=this.source.indexOf(`
|
|
141
141
|
`)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
|
|
142
|
-
`,t)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let t=Qt(e),r=ke(t);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let t=Qt(e),r=ke(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!=="comment"||this.indent<=t?!1:e.every(r=>r.type==="newline"||r.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};To.Parser=$r});var Mo=g(Ze=>{"use strict";var Ro=Nr(),Cf=Ye(),Xe=Je(),Af=En(),Of=N(),qf=Mr(),jo=Dr();function xo(n){let e=n.prettyErrors!==!1;return{lineCounter:n.lineCounter||e&&new qf.LineCounter||null,prettyErrors:e}}function Lf(n,e={}){let{lineCounter:t,prettyErrors:r}=xo(e),i=new jo.Parser(t?.addNewLine),s=new Ro.Composer(e),o=Array.from(s.compose(i.parse(n)));if(r&&t)for(let a of o)a.errors.forEach(Xe.prettifyError(n,t)),a.warnings.forEach(Xe.prettifyError(n,t));return o.length>0?o:Object.assign([],{empty:!0},s.streamInfo())}function Io(n,e={}){let{lineCounter:t,prettyErrors:r}=xo(e),i=new jo.Parser(t?.addNewLine),s=new Ro.Composer(e),o=null;for(let a of s.compose(i.parse(n),!0,n.length))if(!o)o=a;else if(o.options.logLevel!=="silent"){o.errors.push(new Xe.YAMLParseError(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&t&&(o.errors.forEach(Xe.prettifyError(n,t)),o.warnings.forEach(Xe.prettifyError(n,t))),o}function Tf(n,e,t){let r;typeof e=="function"?r=e:t===void 0&&e&&typeof e=="object"&&(t=e);let i=Io(n,t);if(!i)return null;if(i.warnings.forEach(s=>Af.warn(i.options.logLevel,s)),i.errors.length>0){if(i.options.logLevel!=="silent")throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:r},t))}function Rf(n,e,t){let r=null;if(typeof e=="function"||Array.isArray(e)?r=e:t===void 0&&e&&(t=e),typeof t=="string"&&(t=t.length),typeof t=="number"){let i=Math.round(t);t=i<1?void 0:i>8?{indent:8}:{indent:i}}if(n===void 0){let{keepUndefined:i}=t??e??{};if(!i)return}return Of.isDocument(n)&&!r?n.toString(t):new Cf.Document(n,r,t).toString(t)}Ze.parse=Tf;Ze.parseAllDocuments=Lf;Ze.parseDocument=Io;Ze.stringify=Rf});var Do=g(P=>{"use strict";var jf=Nr(),xf=Ye(),If=sr(),Fr=Je(),Mf=Ae(),X=N(),$f=J(),Df=A(),Ff=z(),Bf=G(),Wf=zt(),Kf=xr(),Yf=Mr(),Uf=Dr(),Zt=Mo(),$o=_e();P.Composer=jf.Composer;P.Document=xf.Document;P.Schema=If.Schema;P.YAMLError=Fr.YAMLError;P.YAMLParseError=Fr.YAMLParseError;P.YAMLWarning=Fr.YAMLWarning;P.Alias=Mf.Alias;P.isAlias=X.isAlias;P.isCollection=X.isCollection;P.isDocument=X.isDocument;P.isMap=X.isMap;P.isNode=X.isNode;P.isPair=X.isPair;P.isScalar=X.isScalar;P.isSeq=X.isSeq;P.Pair=$f.Pair;P.Scalar=Df.Scalar;P.YAMLMap=Ff.YAMLMap;P.YAMLSeq=Bf.YAMLSeq;P.CST=Wf;P.Lexer=Kf.Lexer;P.LineCounter=Yf.LineCounter;P.Parser=Uf.Parser;P.parse=Zt.parse;P.parseAllDocuments=Zt.parseAllDocuments;P.parseDocument=Zt.parseDocument;P.stringify=Zt.stringify;P.visit=$o.visit;P.visitAsync=$o.visitAsync});import bd from"path";var ga=null;function ya(n,e){let t=n;for(let r of e)t+="\0"+(typeof r=="string"?r:JSON.stringify(r));return t}function on(n,e){return(...t)=>{let r=ga;if(r===null)return e(...t);let i=ya(`async:${n}`,t),s=r.entries.get(i);if(s)return s.value;let o=e(...t).catch(a=>{throw r.entries.delete(i),a});return r.entries.set(i,{value:o}),o}}import{existsSync as Yh,promises as Yr}from"fs";import Ee from"path";import od from"os";var Wr=ma(Do(),1);import en from"path";var Ko=64*1024,Fo=1024,Bo=64,Vf=5,Jf=[".agents/skills/**",".amazonq/skills/**",".augment/skills/**",".bob/skills/**",".claude/skills/**",".cline/skills/**",".codebuddy/skills/**",".workbuddy/skills/**",".continue/skills/**",".cospec/skills/**",".crush/skills/**",".cursor/skills/**",".factory/skills/**",".forge/skills/**",".gemini/skills/**",".github/skills/**",".iflow/skills/**",".junie/skills/**",".kilocode/skills/**",".kimi-code/skills/**",".kiro/skills/**",".lingma/skills/**",".mimocode/skills/**",".opencode/skills/**",".pi/skills/**",".qoder/skills/**",".qwen/skills/**",".roo/skills/**",".trae-cn/skills/**",".trae/skills/**",".windsurf/skills/**",".zcode/skills/**"],Hf=["**/.idea/**","**/.vscode/**",".codex/skills/**","**/node_modules/**","**/.next/**","**/.nuxt/**","**/.output/**","**/.svelte-kit/**","**/.vite/**","**/.parcel-cache/**","**/.turbo/**","**/.nx/cache/**","**/dist/**","**/build/**","**/out/**","**/coverage/**","**/.nyc_output/**","**/target/**","**/.gradle/**","**/.cxx/**","**/.externalNativeBuild/**","**/captures/**","**/__pycache__/**","**/.pytest_cache/**","**/.mypy_cache/**","**/.ruff_cache/**","**/.tox/**","**/.nox/**","**/.venv/**","**/venv/**","**/obj/**","**/CMakeFiles/**","**/cmake-build-*/**","**/.cache/**","**/tmp/**","**/temp/**","**/logs/**","**/*.tsbuildinfo","**/*.log","**/.DS_Store","**/Thumbs.db"],zf=[...Jf,...Hf].sort((n,e)=>n.localeCompare(e,"en"));var Z={include:["**/*"],exclude:[...zf],max_files:1e4,max_total_bytes:256*1024*1024,max_duration_ms:6e4};function Gf(n,e){if(typeof n!="string")throw new Error(`${e} must be a string`);let t=n.trim();if(t.length===0||en.posix.isAbsolute(t)||en.win32.isAbsolute(t)||/^(?:~|[\\/])/u.test(t))throw new Error(`${e} must be a project-relative path`);if(t===".")return[];let r=t.replaceAll("\\","/").split("/");if(r.some(i=>i===".."))throw new Error(`${e} must stay inside the project root`);if(r.some(i=>i===""||i==="."))throw new Error(`${e} must not contain empty or dot path segments`);return r}function tn(n){let e=Gf(n,"native.artifact_root");return e.length===0?".":e.join("/")}function Qf(n,e="docs"){let t=n??e;if(t!=="legacy"&&t!=="docs")throw new Error("classic.artifact_layout must be legacy or docs");return t}function Kr(n,e,t=!1){if(typeof n!="string")throw new Error(`${e} must be a string`);let r=n.trim().replaceAll("\\","/");if(r.length===0||en.posix.isAbsolute(r)||en.win32.isAbsolute(r)||/^(?:~|[\\/])/u.test(r))throw new Error(`${e} must be relative to its declared path base`);let i=r.split("/");if(i.some(s=>s===".."))throw new Error(`${e} must stay inside its declared path base`);if(i.some(s=>s===""||s==="."))throw new Error(`${e} must not contain empty or dot path segments`);if(!t&&/[*?]/u.test(r))throw new Error(`${e} cannot contain wildcards`);return i.join("/")}function Se(n,e){if(!n||typeof n!="object"||Array.isArray(n))throw new Error(`${e} must be a mapping`);return n}function Yo(n,e,t){let r=n??e;if(r!=="en"&&r!=="zh-CN")throw new Error(`${t} must be en or zh-CN`);return r}function Xf(n,e){if(typeof n!="string"||n.length===0||n.includes("\\")||n.includes("\0")||n.startsWith("/")||n.split("/").includes(".."))throw new Error(`${e} contains an unsafe pattern`);if(n.length>Fo)throw new Error(`${e} exceeds ${Fo} characters`);let t=0;for(let r=0;r<n.length;r+=1)n[r]==="?"?t+=1:n[r]==="*"&&(t+=1,n[r+1]==="*"&&(r+=1));if(t>Bo)throw new Error(`${e} contains more than ${Bo} wildcard tokens`);return n}function Wo(n,e,t){if(n===void 0)return[...t];if(!Array.isArray(n))throw new Error(`${e} contains an unsafe pattern`);return[...new Set(n.map(r=>Xf(r,e)))].sort((r,i)=>r.localeCompare(i,"en"))}function Br(n,e,t){let r=n??e;if(!Number.isSafeInteger(r)||r<1)throw new Error(`${t} must be a positive integer`);return r}function Zf(n){if(n===void 0)return{...Z,include:[...Z.include],exclude:[...Z.exclude]};let e=Se(n,"native.snapshot");return{include:Wo(e.include,"native.snapshot.include",Z.include),exclude:Wo(e.exclude,"native.snapshot.exclude",Z.exclude),max_files:Br(e.max_files,Z.max_files,"native.snapshot.max_files"),max_total_bytes:Br(e.max_total_bytes,Z.max_total_bytes,"native.snapshot.max_total_bytes"),max_duration_ms:Br(e.max_duration_ms,Z.max_duration_ms,"native.snapshot.max_duration_ms")}}function ed(n){if(n===void 0)return;let e=Se(n,"native.pending_root_move"),t=e.id,r=e.from_artifact_root,i=e.to_artifact_root,s=e.stage;if(typeof t!="string"||!/^[a-f0-9-]{8,}$/u.test(t))throw new Error("native.pending_root_move.id is invalid");if(typeof r!="string"||typeof i!="string")throw new Error("native.pending_root_move roots must be strings");if(s!=="copying"&&s!=="ready"&&s!=="switched")throw new Error("native.pending_root_move.stage is invalid");let o;if(e.cleanup!==void 0){let a=Se(e.cleanup,"native.pending_root_move.cleanup"),l=a.kind,c=a.state,h=a.manifest_hash;if(l!=="forward-source"&&l!=="restart-staging"&&l!=="rollback-destination"&&l!=="rollback-staging")throw new Error("native.pending_root_move.cleanup.kind is invalid");if(c!=="prepared"&&c!=="quarantined"&&c!=="deleting")throw new Error("native.pending_root_move.cleanup.state is invalid");if(typeof h!="string"||!/^[a-f0-9]{64}$/u.test(h))throw new Error("native.pending_root_move.cleanup.manifest_hash is invalid");o={kind:l,state:c,manifestHash:h}}return{id:t,fromArtifactRoot:tn(r),toArtifactRoot:tn(i),stage:s,...o?{cleanup:o}:{}}}function td(n,e={}){let t=Se(n,"native"),r=t.artifact_root??(e.allowMissingArtifactRoot?"docs":void 0);if(typeof r!="string")throw new Error("native.artifact_root must be a string");let i=t.clarification_mode??"batch";if(i!=="sequential"&&i!=="batch")throw new Error("native.clarification_mode must be sequential or batch");let s=t.archive_confirmation??"automatic";if(s!=="automatic"&&s!=="required")throw new Error("native.archive_confirmation must be automatic or required");let o=t.max_verify_failures??Vf;if(!Number.isSafeInteger(o)||o<1)throw new Error("native.max_verify_failures must be a positive integer");let a=ed(t.pending_root_move);return{artifact_root:tn(r),language:Yo(t.language,"en","native.language"),clarification_mode:i,archive_confirmation:s,max_verify_failures:o,snapshot:Zf(t.snapshot),...a?{pending_root_move:a}:{}}}function nd(n){let e=Se(n,"classic"),t=e.context_compression??"off";if(t!=="off"&&t!=="beta")throw new Error("classic.context_compression must be off or beta");let r=e.review_mode??"standard";if(r!=="off"&&r!=="standard"&&r!=="thorough")throw new Error("classic.review_mode must be off, standard, or thorough");let i=e.auto_transition??!0;if(typeof i!="boolean")throw new Error("classic.auto_transition must be true or false");return{artifact_layout:Qf(e.artifact_layout),language:Yo(e.language,"zh-CN","classic.language"),context_compression:t,review_mode:r,auto_transition:i}}function rd(n){let t=Se(n,"hook").allow_paths??[];if(!Array.isArray(t))throw new Error("hook.allow_paths must be an array");return{allow_paths:[...new Set(t.map((r,i)=>Kr(r,`hook.allow_paths[${i}]`)))]}}function id(n){let e=n??!0;if(typeof e!="boolean")throw new Error("ambient_resume must be true or false");return e}function sd(n,e,t,r,i,s){let o=n.schema!==void 0;if(!(o||n.default_workflow!==void 0||n.workflows!==void 0||!s.allowPartialProject&&n.native!==void 0)||s.allowPartialProject&&!o)return null;if(n.schema!=="comet.project.v1")throw new Error("Unsupported Comet project schema");if(n.default_workflow!=="native"&&n.default_workflow!=="classic")throw new Error("default_workflow must be native or classic");let l=n.workflows??[n.default_workflow];if(!Array.isArray(l)||l.length===0||l.some(h=>h!=="native"&&h!=="classic"))throw new Error("workflows must contain native and/or classic");let c=[...new Set(l)];if(!c.includes(n.default_workflow))throw new Error("workflows must include default_workflow");if(c.includes("native")&&!t)throw new Error("native must be a mapping");return{schema:"comet.project.v1",default_workflow:n.default_workflow,workflows:c,ambient_resume:i,...e?{hook:e}:{},...t?{native:t}:{},...r?{classic:r}:{}}}function Uo(n,e={}){let t=(0,Wr.parseDocument)(n,{uniqueKeys:!0});if(t.errors.length>0)throw new Error(`Invalid .comet/config.yaml: ${t.errors[0].message}`);let r=t.toJS();if(r==null)return{value:{},config:null,ambient_resume:!0};if(typeof r!="object"||Array.isArray(r))throw new Error("Invalid .comet/config.yaml: root must be a mapping");let i=r,s=id(i.ambient_resume),o=i.hook===void 0?void 0:rd(i.hook),a=i.native===void 0?void 0:td(i.native,{allowMissingArtifactRoot:e.allowMissingNativeFields}),l=i.classic===void 0?void 0:nd(i.classic),c=sd(i,o,a,l,s,{allowPartialProject:e.allowPartialProject??!1});return{value:i,config:c,ambient_resume:s,...o?{hook:o}:{},...a?{native:a}:{},...l?{classic:l}:{}}}var ad=".comet/config.yaml";async function Vo(n){try{return await Yr.lstat(n),!0}catch(e){if(e.code==="ENOENT")return!1;throw e}}async function ld(n){try{let e=await Yr.readFile(n,"utf8");return/^schema:\s*comet\.project\.v1\s*$/mu.test(e)}catch(e){if(e.code==="ENOENT")return!1;throw e}}async function Jo(n){let e=Ee.resolve(n);try{(await Yr.stat(e)).isDirectory()||(e=Ee.dirname(e))}catch(i){if(i.code!=="ENOENT")throw i}let t=e,r=Ee.resolve(od.homedir());for(;;){if(!(e===r&&t!==r)){let o=Ee.join(e,...ad.split("/")),a=e===t||await ld(o);if(await Vo(o)&&a)return e}if(await Vo(Ee.join(e,".git")))return e;let s=Ee.dirname(e);if(s===e)return t;e=s}}import{createHash as fd}from"crypto";import{promises as sn}from"fs";import ne from"path";import{constants as nn,promises as ce}from"fs";function ee(n){return n!==0&&n!==0n&&n!=="0"}function Ho(n,e){return ee(n.dev)&&ee(e.dev)&&ee(n.ino)&&ee(e.ino)}function Ur(n,e){let t=ee(n.dev)&&ee(e.dev);if(t&&n.dev!==e.dev)return!1;let r=ee(n.ino)&&ee(e.ino);return r&&n.ino!==e.ino?!1:t&&r?!0:n.birthtime===e.birthtime}var te=class extends Error{reason;constructor(e,t,r){super(t,r),this.name="RaceSafeReadError",this.reason=e}};function Vr(n){return"birthtimeNs"in n&&typeof n.birthtimeNs=="bigint"?n.birthtimeNs:n.birthtimeMs}function zo(n){return"ctimeNs"in n&&typeof n.ctimeNs=="bigint"?n.ctimeNs:n.ctimeMs}function et(n){return{dev:n.dev,ino:n.ino,birthtime:Vr(n)}}function rn(n,e){let t=et(n),r=et(e);return Ho(t,r)?Ur(t,r):Ur(t,r)&&Vr(n)===Vr(e)&&zo(n)===zo(e)&&n.size===e.size}async function Go(n,e,t={}){if(!Number.isSafeInteger(e)||e<1)throw new Error("race-safe read byte limit must be a positive integer");let r=t.label??"file",i=t.bigint===!0,s=await ce.lstat(n,{bigint:i});if(!s.isFile()||s.isSymbolicLink())throw new te("not-regular-file",`${r} must be a regular file`);if(BigInt(s.size)>BigInt(e))throw new te("too-large",`${r} exceeds ${e} bytes`);let o=await ce.realpath(n);await t.verify?.("pre-open",{realPath:o,identity:et(s)});let a=process.platform==="win32"?nn.O_RDONLY:nn.O_RDONLY|nn.O_NOFOLLOW|nn.O_NONBLOCK,l;try{l=await ce.open(n,a)}catch(c){throw c.code==="ELOOP"?new te("not-regular-file",`${r} must be a regular file`,{cause:c}):c}try{let[c,h,u]=await Promise.all([l.stat({bigint:i}),ce.lstat(n,{bigint:i}),ce.realpath(n)]);if(!c.isFile()||!h.isFile()||h.isSymbolicLink()||u!==o||!rn(s,c)||!rn(s,h))throw new te("changed",`${r} changed while opening`);await t.verify?.("post-open",{realPath:u,identity:et(c)}),await t.hooks?.afterOpen?.();let f=[],m=0,y=Buffer.allocUnsafe(Math.min(64*1024,e+1));for(;;){let v=e+1-m,{bytesRead:k}=await l.read(y,0,Math.min(y.length,v),null);if(k===0)break;if(m+=k,m>e)throw new te("too-large",`${r} exceeds ${e} bytes`);f.push(Buffer.from(y.subarray(0,k)))}await t.hooks?.beforeFinalCheck?.();let[d,p,w]=await Promise.all([l.stat({bigint:i}),ce.lstat(n,{bigint:i}),ce.realpath(n)]);if(!p.isFile()||p.isSymbolicLink()||w!==o||!rn(s,d)||!rn(s,p))throw new te("changed",`${r} changed while reading`);return await t.verify?.("post-read",{realPath:w,identity:et(d)}),{bytes:Buffer.concat(f,m),stat:d,realPath:w}}finally{await l.close()}}function cd(n){let e=n?.code;return e==="ENOENT"||e==="ENOTDIR"}function Jr(n,e){let t=ne.relative(n,e);return t===""||!ne.isAbsolute(t)&&t!==".."&&!t.startsWith(`..${ne.sep}`)}async function Qo(n,e){let t=ne.resolve(n),r=await sn.lstat(t);if(!r.isDirectory()||r.isSymbolicLink())throw new Error(`${e} project root must be a real directory`);return sn.realpath(t)}async function Xo(n,e,t,r){let i=n;for(let s=0;s<t.length;s++){i=ne.join(i,t[s]);let o;try{o=await sn.lstat(i)}catch(h){if(cd(h))return{exists:!1,kind:"missing"};throw h}let a=ne.relative(n,i).replaceAll("\\","/");if(o.isSymbolicLink())throw new Error(`${r.label} crosses a symbolic link or junction at ${a}`);let l=s===t.length-1;if(!l&&!o.isDirectory())throw new Error(`${r.label} ancestor ${a} must be a real directory`);if(l&&(r.expected==="file"&&!o.isFile()||r.expected==="directory"&&!o.isDirectory()||r.expected==="any"&&!o.isFile()&&!o.isDirectory()))throw new Error(`${r.label} must be a real ${r.expected}`);let c=await sn.realpath(i);if(!Jr(e,c))throw new Error(`${r.label} resolves outside the project root`);if(l)return{exists:!0,kind:o.isFile()?"file":o.isDirectory()?"directory":"missing"}}return{exists:!0,kind:"directory"}}async function ud(n,e,t){let r=Kr(e,t.label),i=ne.resolve(n),s=await Qo(i,t.label),o=r.split("/"),a=ne.resolve(i,...o);if(!Jr(i,a))throw new Error(`${t.label} must stay inside the project root`);let l=await Xo(i,s,o,t);return{projectRoot:i,target:a,relative:r,exists:l.exists,kind:l.kind}}async function Zo(n,e,t,r){let i=await ud(n,e,{label:r.label,expected:"file"});if(!i.exists){let o=new Error(`${r.label} does not exist`);throw o.code="ENOENT",o}let s=await Qo(i.projectRoot,r.label);return Go(i.target,t,{...r,verify:async(o,a)=>{if(!Jr(s,a.realPath))throw new Error(`${r.label} resolves outside the project root`);await Xo(i.projectRoot,s,i.relative.split("/"),{label:r.label,expected:"file"})}})}var ea=".comet/config.yaml";function dd(n){let e=n?.code;return e==="ENOENT"||e==="ENOTDIR"}async function hd(n,e={}){return(await gd(n,e)).document}async function pd(n){try{return(await Zo(n,ea,Ko,{label:ea})).bytes}catch(e){if(dd(e))return null;throw e}}function md(n){return n?{exists:!0,sha256:fd("sha256").update(n).digest("hex")}:{exists:!1,sha256:null}}async function gd(n,e={}){let t=await pd(n);return{document:t?Uo(t.toString("utf8"),e):null,identity:md(t)}}async function ta(n){return(await hd(n))?.config??null}var na=on("readWorkflowProjectConfig",n=>ta(n)),ra=on("discoverNativeProject",n=>Jo(n));function yd(n){return{workflow:n,skill:n==="native"?"comet-native":"comet-classic",source:"project-config"}}async function ia(n){let e=await ra(n),t=await na(e);if(!t)throw new Error("Comet workflow entry is unavailable because .comet/config.yaml is missing");return yd(t.default_workflow)}var wd="comet.workflow-resolution.v1";async function sa(n){return{schema:wd,...await ia(n)}}function oa(n){return[`workflow: ${n.workflow}`,`skill: ${n.skill}`,`source: ${n.source}`].join(`
|
|
143
|
-
`)}var
|
|
144
|
-
${
|
|
145
|
-
`),64}if(t.help)return e.stdout(`${
|
|
146
|
-
`),0;try{let r=await
|
|
147
|
-
`:`${
|
|
142
|
+
`,t)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let t=Xt(e),r=Se(t);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let t=Xt(e),r=Se(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!=="comment"||this.indent<=t?!1:e.every(r=>r.type==="newline"||r.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};To.Parser=$r});var Mo=g(et=>{"use strict";var Ro=Nr(),Cf=Ue(),Ze=He(),Of=_n(),qf=N(),Lf=Mr(),jo=Dr();function xo(n){let e=n.prettyErrors!==!1;return{lineCounter:n.lineCounter||e&&new Lf.LineCounter||null,prettyErrors:e}}function Tf(n,e={}){let{lineCounter:t,prettyErrors:r}=xo(e),i=new jo.Parser(t?.addNewLine),s=new Ro.Composer(e),o=Array.from(s.compose(i.parse(n)));if(r&&t)for(let a of o)a.errors.forEach(Ze.prettifyError(n,t)),a.warnings.forEach(Ze.prettifyError(n,t));return o.length>0?o:Object.assign([],{empty:!0},s.streamInfo())}function Io(n,e={}){let{lineCounter:t,prettyErrors:r}=xo(e),i=new jo.Parser(t?.addNewLine),s=new Ro.Composer(e),o=null;for(let a of s.compose(i.parse(n),!0,n.length))if(!o)o=a;else if(o.options.logLevel!=="silent"){o.errors.push(new Ze.YAMLParseError(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&t&&(o.errors.forEach(Ze.prettifyError(n,t)),o.warnings.forEach(Ze.prettifyError(n,t))),o}function Rf(n,e,t){let r;typeof e=="function"?r=e:t===void 0&&e&&typeof e=="object"&&(t=e);let i=Io(n,t);if(!i)return null;if(i.warnings.forEach(s=>Of.warn(i.options.logLevel,s)),i.errors.length>0){if(i.options.logLevel!=="silent")throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:r},t))}function jf(n,e,t){let r=null;if(typeof e=="function"||Array.isArray(e)?r=e:t===void 0&&e&&(t=e),typeof t=="string"&&(t=t.length),typeof t=="number"){let i=Math.round(t);t=i<1?void 0:i>8?{indent:8}:{indent:i}}if(n===void 0){let{keepUndefined:i}=t??e??{};if(!i)return}return qf.isDocument(n)&&!r?n.toString(t):new Cf.Document(n,r,t).toString(t)}et.parse=Rf;et.parseAllDocuments=Tf;et.parseDocument=Io;et.stringify=jf});var Do=g(P=>{"use strict";var xf=Nr(),If=Ue(),Mf=sr(),Fr=He(),$f=Oe(),X=N(),Df=J(),Ff=C(),Bf=z(),Wf=G(),Kf=Gt(),Yf=xr(),Uf=Mr(),Vf=Dr(),en=Mo(),$o=Ne();P.Composer=xf.Composer;P.Document=If.Document;P.Schema=Mf.Schema;P.YAMLError=Fr.YAMLError;P.YAMLParseError=Fr.YAMLParseError;P.YAMLWarning=Fr.YAMLWarning;P.Alias=$f.Alias;P.isAlias=X.isAlias;P.isCollection=X.isCollection;P.isDocument=X.isDocument;P.isMap=X.isMap;P.isNode=X.isNode;P.isPair=X.isPair;P.isScalar=X.isScalar;P.isSeq=X.isSeq;P.Pair=Df.Pair;P.Scalar=Ff.Scalar;P.YAMLMap=Bf.YAMLMap;P.YAMLSeq=Wf.YAMLSeq;P.CST=Kf;P.Lexer=Yf.Lexer;P.LineCounter=Uf.LineCounter;P.Parser=Vf.Parser;P.parse=en.parse;P.parseAllDocuments=en.parseAllDocuments;P.parseDocument=en.parseDocument;P.stringify=en.stringify;P.visit=$o.visit;P.visitAsync=$o.visitAsync});import Sd from"path";var ya=null;function wa(n,e){let t=n;for(let r of e)t+="\0"+(typeof r=="string"?r:JSON.stringify(r));return t}function on(n,e){return(...t)=>{let r=ya;if(r===null)return e(...t);let i=wa(`async:${n}`,t),s=r.entries.get(i);if(s)return s.value;let o=e(...t).catch(a=>{throw r.entries.delete(i),a});return r.entries.set(i,{value:o}),o}}import{existsSync as Jh,promises as Yr}from"fs";import Ee from"path";import cd from"os";var Wr=ga(Do(),1);import _e from"path";var Yo=64*1024,Fo=1024,Bo=64,Jf=5,Hf=12e4,Wo=6e5,zf=[".agents/skills/**",".amazonq/skills/**",".augment/skills/**",".bob/skills/**",".claude/skills/**",".cline/skills/**",".codebuddy/skills/**",".workbuddy/skills/**",".continue/skills/**",".cospec/skills/**",".crush/skills/**",".cursor/skills/**",".factory/skills/**",".forge/skills/**",".gemini/skills/**",".github/skills/**",".grok/skills/**",".iflow/skills/**",".junie/skills/**",".kilocode/skills/**",".kimi-code/skills/**",".kiro/skills/**",".lingma/skills/**",".mimocode/skills/**",".opencode/skills/**",".pi/skills/**",".qoder/skills/**",".qwen/skills/**",".roo/skills/**",".trae-cn/skills/**",".trae/skills/**",".windsurf/skills/**",".zcode/skills/**"],Gf=["**/.idea/**","**/.vscode/**",".codex/skills/**","**/node_modules/**","**/.next/**","**/.nuxt/**","**/.output/**","**/.svelte-kit/**","**/.vite/**","**/.parcel-cache/**","**/.turbo/**","**/.nx/cache/**","**/dist/**","**/build/**","**/out/**","**/coverage/**","**/.nyc_output/**","**/target/**","**/.gradle/**","**/.cxx/**","**/.externalNativeBuild/**","**/captures/**","**/__pycache__/**","**/.pytest_cache/**","**/.mypy_cache/**","**/.ruff_cache/**","**/.tox/**","**/.nox/**","**/.venv/**","**/venv/**","**/obj/**","**/CMakeFiles/**","**/cmake-build-*/**","**/.cache/**","**/tmp/**","**/temp/**","**/logs/**","**/*.tsbuildinfo","**/*.log","**/.DS_Store","**/Thumbs.db"],Qf=[...zf,...Gf].sort((n,e)=>n.localeCompare(e,"en"));var Z={include:["**/*"],exclude:[...Qf],max_files:1e4,max_total_bytes:256*1024*1024,max_duration_ms:6e4};function Xf(n,e){if(typeof n!="string")throw new Error(`${e} must be a string`);let t=n.trim();if(t.length===0||_e.posix.isAbsolute(t)||_e.win32.isAbsolute(t)||/^(?:~|[\\/])/u.test(t))throw new Error(`${e} must be a project-relative path`);if(t===".")return[];let r=t.replaceAll("\\","/").split("/");if(r.some(i=>i===".."))throw new Error(`${e} must stay inside the project root`);if(r.some(i=>i===""||i==="."))throw new Error(`${e} must not contain empty or dot path segments`);return r}function tn(n){let e=Xf(n,"native.artifact_root");return e.length===0?".":e.join("/")}function Zf(n,e="docs"){let t=n??e;if(t!=="legacy"&&t!=="docs")throw new Error("classic.artifact_layout must be legacy or docs");return t}function Kr(n,e,t=!1){if(typeof n!="string")throw new Error(`${e} must be a string`);let r=n.trim().replaceAll("\\","/");if(r.length===0||_e.posix.isAbsolute(r)||_e.win32.isAbsolute(r)||/^(?:~|[\\/])/u.test(r))throw new Error(`${e} must be relative to its declared path base`);let i=r.split("/");if(i.some(s=>s===".."))throw new Error(`${e} must stay inside its declared path base`);if(i.some(s=>s===""||s==="."))throw new Error(`${e} must not contain empty or dot path segments`);if(!t&&/[*?]/u.test(r))throw new Error(`${e} cannot contain wildcards`);return i.join("/")}function ee(n,e){if(!n||typeof n!="object"||Array.isArray(n))throw new Error(`${e} must be a mapping`);return n}function Uo(n,e,t){let r=n??e;if(r!=="en"&&r!=="zh-CN")throw new Error(`${t} must be en or zh-CN`);return r}function ed(n,e){if(typeof n!="string"||n.length===0||n.includes("\\")||n.includes("\0")||n.startsWith("/")||n.split("/").includes(".."))throw new Error(`${e} contains an unsafe pattern`);if(n.length>Fo)throw new Error(`${e} exceeds ${Fo} characters`);let t=0;for(let r=0;r<n.length;r+=1)n[r]==="?"?t+=1:n[r]==="*"&&(t+=1,n[r+1]==="*"&&(r+=1));if(t>Bo)throw new Error(`${e} contains more than ${Bo} wildcard tokens`);return n}function Ko(n,e,t){if(n===void 0)return[...t];if(!Array.isArray(n))throw new Error(`${e} contains an unsafe pattern`);return[...new Set(n.map(r=>ed(r,e)))].sort((r,i)=>r.localeCompare(i,"en"))}function Br(n,e,t){let r=n??e;if(!Number.isSafeInteger(r)||r<1)throw new Error(`${t} must be a positive integer`);return r}function td(n){if(n===void 0)return{...Z,include:[...Z.include],exclude:[...Z.exclude]};let e=ee(n,"native.snapshot");return{include:Ko(e.include,"native.snapshot.include",Z.include),exclude:Ko(e.exclude,"native.snapshot.exclude",Z.exclude),max_files:Br(e.max_files,Z.max_files,"native.snapshot.max_files"),max_total_bytes:Br(e.max_total_bytes,Z.max_total_bytes,"native.snapshot.max_total_bytes"),max_duration_ms:Br(e.max_duration_ms,Z.max_duration_ms,"native.snapshot.max_duration_ms")}}function nd(n){if(n===void 0)return;let e=ee(n,"native.pending_root_move"),t=e.id,r=e.from_artifact_root,i=e.to_artifact_root,s=e.stage;if(typeof t!="string"||!/^[a-f0-9-]{8,}$/u.test(t))throw new Error("native.pending_root_move.id is invalid");if(typeof r!="string"||typeof i!="string")throw new Error("native.pending_root_move roots must be strings");if(s!=="copying"&&s!=="ready"&&s!=="switched")throw new Error("native.pending_root_move.stage is invalid");let o;if(e.cleanup!==void 0){let a=ee(e.cleanup,"native.pending_root_move.cleanup"),l=a.kind,c=a.state,h=a.manifest_hash;if(l!=="forward-source"&&l!=="restart-staging"&&l!=="rollback-destination"&&l!=="rollback-staging")throw new Error("native.pending_root_move.cleanup.kind is invalid");if(c!=="prepared"&&c!=="quarantined"&&c!=="deleting")throw new Error("native.pending_root_move.cleanup.state is invalid");if(typeof h!="string"||!/^[a-f0-9]{64}$/u.test(h))throw new Error("native.pending_root_move.cleanup.manifest_hash is invalid");o={kind:l,state:c,manifestHash:h}}return{id:t,fromArtifactRoot:tn(r),toArtifactRoot:tn(i),stage:s,...o?{cleanup:o}:{}}}function rd(n){if(n===void 0)return;let e=ee(n,"native.finish");if(e.pull_request===void 0)return{};let t=ee(e.pull_request,"native.finish.pull_request");if(t.provider!=="repository-command")throw new Error("native.finish.pull_request.provider must be repository-command");if(!Array.isArray(t.command)||t.command.length===0)throw new Error("native.finish.pull_request.command must be a non-empty array");if(t.command.length>64)throw new Error("native.finish.pull_request.command must contain at most 64 arguments");let r=t.command.map((s,o)=>{if(typeof s!="string"||s.trim().length===0||s.length>4096||/[\0\r\n]/u.test(s))throw new Error(`native.finish.pull_request.command[${o}] must be a non-empty single-line string of at most 4096 characters`);return s});if(_e.posix.isAbsolute(r[0])||_e.win32.isAbsolute(r[0]))throw new Error("native.finish.pull_request.command[0] must be a bare executable name or a project-relative path");let i=t.timeout_ms??Hf;if(!Number.isSafeInteger(i)||i<1||i>Wo)throw new Error(`native.finish.pull_request.timeout_ms must be an integer between 1 and ${Wo}`);return{pull_request:{provider:"repository-command",command:r,timeout_ms:i}}}function id(n,e={}){let t=ee(n,"native"),r=t.artifact_root??(e.allowMissingArtifactRoot?"docs":void 0);if(typeof r!="string")throw new Error("native.artifact_root must be a string");let i=t.clarification_mode??"batch";if(i!=="sequential"&&i!=="batch")throw new Error("native.clarification_mode must be sequential or batch");let s=t.archive_confirmation??"automatic";if(s!=="automatic"&&s!=="required")throw new Error("native.archive_confirmation must be automatic or required");let o=t.max_verify_failures??Jf;if(!Number.isSafeInteger(o)||o<1)throw new Error("native.max_verify_failures must be a positive integer");let a=nd(t.pending_root_move),l=rd(t.finish);return{artifact_root:tn(r),language:Uo(t.language,"en","native.language"),clarification_mode:i,archive_confirmation:s,max_verify_failures:o,snapshot:td(t.snapshot),...l?{finish:l}:{},...a?{pending_root_move:a}:{}}}function sd(n){let e=ee(n,"classic"),t=e.context_compression??"off";if(t!=="off"&&t!=="beta")throw new Error("classic.context_compression must be off or beta");let r=e.review_mode??"standard";if(r!=="off"&&r!=="standard"&&r!=="thorough")throw new Error("classic.review_mode must be off, standard, or thorough");let i=e.auto_transition??!0;if(typeof i!="boolean")throw new Error("classic.auto_transition must be true or false");return{artifact_layout:Zf(e.artifact_layout),language:Uo(e.language,"zh-CN","classic.language"),context_compression:t,review_mode:r,auto_transition:i}}function od(n){let t=ee(n,"hook").allow_paths??[];if(!Array.isArray(t))throw new Error("hook.allow_paths must be an array");return{allow_paths:[...new Set(t.map((r,i)=>Kr(r,`hook.allow_paths[${i}]`)))]}}function ad(n){let e=n??!0;if(typeof e!="boolean")throw new Error("ambient_resume must be true or false");return e}function ld(n,e,t,r,i,s){let o=n.schema!==void 0;if(!(o||n.default_workflow!==void 0||n.workflows!==void 0||!s.allowPartialProject&&n.native!==void 0)||s.allowPartialProject&&!o)return null;if(n.schema!=="comet.project.v1")throw new Error("Unsupported Comet project schema");if(n.default_workflow!=="native"&&n.default_workflow!=="classic")throw new Error("default_workflow must be native or classic");let l=n.workflows??[n.default_workflow];if(!Array.isArray(l)||l.length===0||l.some(h=>h!=="native"&&h!=="classic"))throw new Error("workflows must contain native and/or classic");let c=[...new Set(l)];if(!c.includes(n.default_workflow))throw new Error("workflows must include default_workflow");if(c.includes("native")&&!t)throw new Error("native must be a mapping");return{schema:"comet.project.v1",default_workflow:n.default_workflow,workflows:c,ambient_resume:i,...e?{hook:e}:{},...t?{native:t}:{},...r?{classic:r}:{}}}function Vo(n,e={}){let t=(0,Wr.parseDocument)(n,{uniqueKeys:!0});if(t.errors.length>0)throw new Error(`Invalid .comet/config.yaml: ${t.errors[0].message}`);let r=t.toJS();if(r==null)return{value:{},config:null,ambient_resume:!0};if(typeof r!="object"||Array.isArray(r))throw new Error("Invalid .comet/config.yaml: root must be a mapping");let i=r,s=ad(i.ambient_resume),o=i.hook===void 0?void 0:od(i.hook),a=i.native===void 0?void 0:id(i.native,{allowMissingArtifactRoot:e.allowMissingNativeFields}),l=i.classic===void 0?void 0:sd(i.classic),c=ld(i,o,a,l,s,{allowPartialProject:e.allowPartialProject??!1});return{value:i,config:c,ambient_resume:s,...o?{hook:o}:{},...a?{native:a}:{},...l?{classic:l}:{}}}var ud=".comet/config.yaml";async function Jo(n){try{return await Yr.lstat(n),!0}catch(e){if(e.code==="ENOENT")return!1;throw e}}async function fd(n){try{let e=await Yr.readFile(n,"utf8");return/^schema:\s*comet\.project\.v1\s*$/mu.test(e)}catch(e){if(e.code==="ENOENT")return!1;throw e}}async function Ho(n){let e=Ee.resolve(n);try{(await Yr.stat(e)).isDirectory()||(e=Ee.dirname(e))}catch(i){if(i.code!=="ENOENT")throw i}let t=e,r=Ee.resolve(cd.homedir());for(;;){if(!(e===r&&t!==r)){let o=Ee.join(e,...ud.split("/")),a=e===t||await fd(o);if(await Jo(o)&&a)return e}if(await Jo(Ee.join(e,".git")))return e;let s=Ee.dirname(e);if(s===e)return t;e=s}}import{createHash as md}from"crypto";import{promises as sn}from"fs";import re from"path";import{constants as nn,promises as ue}from"fs";function te(n){return n!==0&&n!==0n&&n!=="0"}function zo(n,e){return te(n.dev)&&te(e.dev)&&te(n.ino)&&te(e.ino)}function Ur(n,e){let t=te(n.dev)&&te(e.dev);if(t&&n.dev!==e.dev)return!1;let r=te(n.ino)&&te(e.ino);return r&&n.ino!==e.ino?!1:t&&r?!0:n.birthtime===e.birthtime}var ne=class extends Error{reason;constructor(e,t,r){super(t,r),this.name="RaceSafeReadError",this.reason=e}};function Vr(n){return"birthtimeNs"in n&&typeof n.birthtimeNs=="bigint"?n.birthtimeNs:n.birthtimeMs}function Go(n){return"ctimeNs"in n&&typeof n.ctimeNs=="bigint"?n.ctimeNs:n.ctimeMs}function tt(n){return{dev:n.dev,ino:n.ino,birthtime:Vr(n)}}function rn(n,e){let t=tt(n),r=tt(e);return zo(t,r)?Ur(t,r):Ur(t,r)&&Vr(n)===Vr(e)&&Go(n)===Go(e)&&n.size===e.size}async function Qo(n,e,t={}){if(!Number.isSafeInteger(e)||e<1)throw new Error("race-safe read byte limit must be a positive integer");let r=t.label??"file",i=t.bigint===!0,s=await ue.lstat(n,{bigint:i});if(!s.isFile()||s.isSymbolicLink())throw new ne("not-regular-file",`${r} must be a regular file`);if(BigInt(s.size)>BigInt(e))throw new ne("too-large",`${r} exceeds ${e} bytes`);let o=await ue.realpath(n);await t.verify?.("pre-open",{realPath:o,identity:tt(s)});let a=process.platform==="win32"?nn.O_RDONLY:nn.O_RDONLY|nn.O_NOFOLLOW|nn.O_NONBLOCK,l;try{l=await ue.open(n,a)}catch(c){throw c.code==="ELOOP"?new ne("not-regular-file",`${r} must be a regular file`,{cause:c}):c}try{let[c,h,u]=await Promise.all([l.stat({bigint:i}),ue.lstat(n,{bigint:i}),ue.realpath(n)]);if(!c.isFile()||!h.isFile()||h.isSymbolicLink()||u!==o||!rn(s,c)||!rn(s,h))throw new ne("changed",`${r} changed while opening`);await t.verify?.("post-open",{realPath:u,identity:tt(c)}),await t.hooks?.afterOpen?.();let f=[],p=0,y=Buffer.allocUnsafe(Math.min(64*1024,e+1));for(;;){let v=e+1-p,{bytesRead:k}=await l.read(y,0,Math.min(y.length,v),null);if(k===0)break;if(p+=k,p>e)throw new ne("too-large",`${r} exceeds ${e} bytes`);f.push(Buffer.from(y.subarray(0,k)))}await t.hooks?.beforeFinalCheck?.();let[d,m,w]=await Promise.all([l.stat({bigint:i}),ue.lstat(n,{bigint:i}),ue.realpath(n)]);if(!m.isFile()||m.isSymbolicLink()||w!==o||!rn(s,d)||!rn(s,m))throw new ne("changed",`${r} changed while reading`);return await t.verify?.("post-read",{realPath:w,identity:tt(d)}),{bytes:Buffer.concat(f,p),stat:d,realPath:w}}finally{await l.close()}}function dd(n){let e=n?.code;return e==="ENOENT"||e==="ENOTDIR"}function Jr(n,e){let t=re.relative(n,e);return t===""||!re.isAbsolute(t)&&t!==".."&&!t.startsWith(`..${re.sep}`)}async function Xo(n,e){let t=re.resolve(n),r=await sn.lstat(t);if(!r.isDirectory()||r.isSymbolicLink())throw new Error(`${e} project root must be a real directory`);return sn.realpath(t)}async function Zo(n,e,t,r){let i=n;for(let s=0;s<t.length;s++){i=re.join(i,t[s]);let o;try{o=await sn.lstat(i)}catch(h){if(dd(h))return{exists:!1,kind:"missing"};throw h}let a=re.relative(n,i).replaceAll("\\","/");if(o.isSymbolicLink())throw new Error(`${r.label} crosses a symbolic link or junction at ${a}`);let l=s===t.length-1;if(!l&&!o.isDirectory())throw new Error(`${r.label} ancestor ${a} must be a real directory`);if(l&&(r.expected==="file"&&!o.isFile()||r.expected==="directory"&&!o.isDirectory()||r.expected==="any"&&!o.isFile()&&!o.isDirectory()))throw new Error(`${r.label} must be a real ${r.expected}`);let c=await sn.realpath(i);if(!Jr(e,c))throw new Error(`${r.label} resolves outside the project root`);if(l)return{exists:!0,kind:o.isFile()?"file":o.isDirectory()?"directory":"missing"}}return{exists:!0,kind:"directory"}}async function hd(n,e,t){let r=Kr(e,t.label),i=re.resolve(n),s=await Xo(i,t.label),o=r.split("/"),a=re.resolve(i,...o);if(!Jr(i,a))throw new Error(`${t.label} must stay inside the project root`);let l=await Zo(i,s,o,t);return{projectRoot:i,target:a,relative:r,exists:l.exists,kind:l.kind}}async function ea(n,e,t,r){let i=await hd(n,e,{label:r.label,expected:"file"});if(!i.exists){let o=new Error(`${r.label} does not exist`);throw o.code="ENOENT",o}let s=await Xo(i.projectRoot,r.label);return Qo(i.target,t,{...r,verify:async(o,a)=>{if(!Jr(s,a.realPath))throw new Error(`${r.label} resolves outside the project root`);await Zo(i.projectRoot,s,i.relative.split("/"),{label:r.label,expected:"file"})}})}var ta=".comet/config.yaml";function pd(n){let e=n?.code;return e==="ENOENT"||e==="ENOTDIR"}async function gd(n,e={}){return(await bd(n,e)).document}async function yd(n){try{return(await ea(n,ta,Yo,{label:ta})).bytes}catch(e){if(pd(e))return null;throw e}}function wd(n){return n?{exists:!0,sha256:md("sha256").update(n).digest("hex")}:{exists:!1,sha256:null}}async function bd(n,e={}){let t=await yd(n);return{document:t?Vo(t.toString("utf8"),e):null,identity:wd(t)}}async function na(n){return(await gd(n))?.config??null}var ra=on("readWorkflowProjectConfig",n=>na(n)),ia=on("discoverNativeProject",n=>Ho(n));function vd(n){return{workflow:n,skill:n==="native"?"comet-native":"comet-classic",source:"project-config"}}async function sa(n){let e=await ia(n),t=await ra(e);if(!t)throw new Error("Comet workflow entry is unavailable because .comet/config.yaml is missing");return vd(t.default_workflow)}var kd="comet.workflow-resolution.v1";async function oa(n){return{schema:kd,...await sa(n)}}function aa(n){return[`workflow: ${n.workflow}`,`skill: ${n.skill}`,`source: ${n.source}`].join(`
|
|
143
|
+
`)}var la="Usage: comet-entry-runtime [path] [--json]";function _d(n){let e=!1,t=!1,r=null;for(let i of n){if(i==="--help"||i==="-h"){e=!0;continue}if(i==="--json"){t=!0;continue}if(i.startsWith("-"))throw new Error(`Unknown option: ${i}`);if(r!==null)throw new Error(`Unexpected argument: ${i}`);r=i}return{help:e,json:t,targetPath:Sd.resolve(r??".")}}async function ca(n,e={stdout:t=>process.stdout.write(t),stderr:t=>process.stderr.write(t)}){let t;try{t=_d(n)}catch(r){return e.stderr(`${r instanceof Error?r.message:String(r)}
|
|
144
|
+
${la}
|
|
145
|
+
`),64}if(t.help)return e.stdout(`${la}
|
|
146
|
+
`),0;try{let r=await oa(t.targetPath);return e.stdout(t.json?`${JSON.stringify(r,null,2)}
|
|
147
|
+
`:`${aa(r)}
|
|
148
148
|
`),0}catch(r){return e.stderr(`${r instanceof Error?r.message:String(r)}
|
|
149
|
-
`),65}}process.exitCode=await
|
|
149
|
+
`),65}}process.exitCode=await ca(process.argv.slice(2));
|