@rpamis/comet 0.4.0-beta.12 → 0.4.0-beta.14
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/assets/manifest.json +15 -1
- package/assets/skills/comet/SKILL.md +5 -11
- package/assets/skills/comet/reference/comet-yaml-fields.md +1 -1
- package/assets/skills/comet/reference/context-recovery.md +3 -3
- package/assets/skills/comet/reference/decision-point.md +4 -5
- package/assets/skills/comet/reference/scripts.md +17 -47
- package/assets/skills/comet/reference/subagent-dispatch.md +8 -8
- package/assets/skills/comet/rules/comet-phase-guard.en.md +2 -2
- package/assets/skills/comet/rules/comet-phase-guard.md +2 -2
- package/assets/skills/comet/scripts/comet-archive.mjs +165 -2
- package/assets/skills/comet/scripts/comet-entry-runtime.mjs +146 -8071
- package/assets/skills/comet/scripts/comet-guard.mjs +207 -2
- package/assets/skills/comet/scripts/comet-handoff.mjs +165 -2
- package/assets/skills/comet/scripts/comet-hook-guard.mjs +151 -2
- package/assets/skills/comet/scripts/comet-hook-router.mjs +155 -12101
- package/assets/skills/comet/scripts/comet-intent.mjs +10 -2
- package/assets/skills/comet/scripts/comet-resume-probe.mjs +148 -2
- package/assets/skills/comet/scripts/comet-runtime.mjs +286 -19170
- package/assets/skills/comet/scripts/comet-state.mjs +164 -2
- package/assets/skills/comet/scripts/comet-yaml-validate.mjs +149 -2
- package/assets/skills/comet-archive/SKILL.md +1 -1
- package/assets/skills/comet-build/SKILL.md +13 -14
- package/assets/skills/comet-classic/SKILL.md +9 -9
- package/assets/skills/comet-design/SKILL.md +4 -4
- package/assets/skills/comet-hotfix/SKILL.md +2 -2
- package/assets/skills/comet-native/SKILL.md +17 -2
- package/assets/skills/comet-native/reference/commands.md +12 -0
- package/assets/skills/comet-native/reference/recovery.md +2 -0
- package/assets/skills/comet-native/scripts/comet-native-archive.mjs +178 -0
- package/assets/skills/comet-native/scripts/comet-native-check.mjs +173 -0
- package/assets/skills/comet-native/scripts/comet-native-checkpoint.mjs +179 -0
- package/assets/skills/comet-native/scripts/comet-native-doctor.mjs +207 -0
- package/assets/skills/comet-native/scripts/comet-native-evidence.mjs +151 -0
- package/assets/skills/comet-native/scripts/comet-native-hook-guard.mjs +150 -2
- package/assets/skills/comet-native/scripts/comet-native-init.mjs +171 -0
- package/assets/skills/comet-native/scripts/comet-native-new.mjs +200 -0
- package/assets/skills/comet-native/scripts/comet-native-next.mjs +182 -0
- package/assets/skills/comet-native/scripts/comet-native-receipt.mjs +179 -0
- package/assets/skills/comet-native/scripts/comet-native-root.mjs +185 -0
- package/assets/skills/comet-native/scripts/comet-native-runtime.mjs +227 -31299
- package/assets/skills/comet-native/scripts/comet-native-select.mjs +178 -0
- package/assets/skills/comet-native/scripts/comet-native-show.mjs +151 -0
- package/assets/skills/comet-native/scripts/comet-native-spec.mjs +181 -0
- package/assets/skills/comet-native/scripts/comet-native-status.mjs +175 -0
- package/assets/skills/comet-tweak/SKILL.md +2 -2
- package/assets/skills/comet-verify/SKILL.md +3 -3
- package/assets/skills-zh/comet/SKILL.md +5 -11
- package/assets/skills-zh/comet/reference/comet-yaml-fields.md +1 -1
- package/assets/skills-zh/comet/reference/context-recovery.md +3 -3
- package/assets/skills-zh/comet/reference/decision-point.md +4 -5
- package/assets/skills-zh/comet/reference/scripts.md +9 -39
- package/assets/skills-zh/comet/reference/subagent-dispatch.md +8 -8
- package/assets/skills-zh/comet-archive/SKILL.md +1 -1
- package/assets/skills-zh/comet-build/SKILL.md +13 -14
- package/assets/skills-zh/comet-classic/SKILL.md +7 -7
- package/assets/skills-zh/comet-design/SKILL.md +5 -5
- package/assets/skills-zh/comet-hotfix/SKILL.md +2 -2
- package/assets/skills-zh/comet-native/SKILL.md +17 -2
- package/assets/skills-zh/comet-native/reference/commands.md +12 -0
- package/assets/skills-zh/comet-native/reference/recovery.md +2 -0
- package/assets/skills-zh/comet-tweak/SKILL.md +2 -2
- package/assets/skills-zh/comet-verify/SKILL.md +3 -3
- package/bin/comet.js +5 -1
- package/bin/fast-runtime-router.js +82 -0
- package/dist/app/cli/index.js +57 -18
- package/dist/app/cli/index.js.map +1 -1
- package/dist/app/commands/dashboard.js +2 -2
- package/dist/app/commands/dashboard.js.map +1 -1
- package/dist/app/commands/i18n.d.ts +1 -1
- package/dist/app/commands/i18n.d.ts.map +1 -1
- package/dist/app/commands/i18n.js +100 -0
- package/dist/app/commands/i18n.js.map +1 -1
- package/dist/app/commands/init.d.ts.map +1 -1
- package/dist/app/commands/init.js +11 -5
- package/dist/app/commands/init.js.map +1 -1
- package/dist/app/commands/project-scope-selection.d.ts +2 -1
- package/dist/app/commands/project-scope-selection.d.ts.map +1 -1
- package/dist/app/commands/project-scope-selection.js +5 -7
- package/dist/app/commands/project-scope-selection.js.map +1 -1
- package/dist/app/commands/uninstall.d.ts +6 -0
- package/dist/app/commands/uninstall.d.ts.map +1 -1
- package/dist/app/commands/uninstall.js +298 -69
- package/dist/app/commands/uninstall.js.map +1 -1
- package/dist/app/commands/update.d.ts +1 -0
- package/dist/app/commands/update.d.ts.map +1 -1
- package/dist/app/commands/update.js +205 -25
- package/dist/app/commands/update.js.map +1 -1
- package/dist/config/repository-layout.json +33 -3
- package/dist/domains/comet-classic/classic-archive-entry.js +1 -1
- package/dist/domains/comet-classic/classic-archive-entry.js.map +1 -1
- package/dist/domains/comet-classic/classic-branch-binding.d.ts.map +1 -1
- package/dist/domains/comet-classic/classic-branch-binding.js +8 -2
- package/dist/domains/comet-classic/classic-branch-binding.js.map +1 -1
- package/dist/domains/comet-classic/classic-current-change.d.ts.map +1 -1
- package/dist/domains/comet-classic/classic-current-change.js +6 -1
- package/dist/domains/comet-classic/classic-current-change.js.map +1 -1
- package/dist/domains/comet-classic/classic-guard-entry.js +1 -1
- package/dist/domains/comet-classic/classic-guard-entry.js.map +1 -1
- package/dist/domains/comet-classic/classic-guard.js +1 -1
- package/dist/domains/comet-classic/classic-guard.js.map +1 -1
- package/dist/domains/comet-classic/classic-handoff-entry.js +1 -1
- package/dist/domains/comet-classic/classic-handoff-entry.js.map +1 -1
- package/dist/domains/comet-classic/classic-hook-guard-entry.js +1 -1
- package/dist/domains/comet-classic/classic-hook-guard-entry.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 +7 -4
- package/dist/domains/comet-classic/classic-hook-guard.js.map +1 -1
- package/dist/domains/comet-classic/classic-intent-entry.js +1 -1
- package/dist/domains/comet-classic/classic-intent-entry.js.map +1 -1
- package/dist/domains/comet-classic/classic-layout-initialization.d.ts.map +1 -1
- package/dist/domains/comet-classic/classic-layout-initialization.js +26 -15
- package/dist/domains/comet-classic/classic-layout-initialization.js.map +1 -1
- package/dist/domains/comet-classic/classic-layout.d.ts +7 -4
- package/dist/domains/comet-classic/classic-layout.d.ts.map +1 -1
- package/dist/domains/comet-classic/classic-layout.js +10 -9
- package/dist/domains/comet-classic/classic-layout.js.map +1 -1
- package/dist/domains/comet-classic/classic-resume-probe-entry.js +1 -1
- package/dist/domains/comet-classic/classic-resume-probe-entry.js.map +1 -1
- package/dist/domains/comet-classic/classic-script-entry.d.ts +2 -2
- package/dist/domains/comet-classic/classic-script-entry.d.ts.map +1 -1
- package/dist/domains/comet-classic/classic-script-entry.js +4 -3
- package/dist/domains/comet-classic/classic-script-entry.js.map +1 -1
- package/dist/domains/comet-classic/classic-state-command.js +6 -6
- package/dist/domains/comet-classic/classic-state-command.js.map +1 -1
- package/dist/domains/comet-classic/classic-state-entry.js +1 -1
- package/dist/domains/comet-classic/classic-state-entry.js.map +1 -1
- package/dist/domains/comet-classic/classic-validate-entry.js +1 -1
- package/dist/domains/comet-classic/classic-validate-entry.js.map +1 -1
- package/dist/domains/comet-entry/entry-reads.d.ts +17 -0
- package/dist/domains/comet-entry/entry-reads.d.ts.map +1 -0
- package/dist/domains/comet-entry/entry-reads.js +20 -0
- package/dist/domains/comet-entry/entry-reads.js.map +1 -0
- package/dist/domains/comet-entry/hook-router-entry.d.ts.map +1 -1
- package/dist/domains/comet-entry/hook-router-entry.js +3 -1
- package/dist/domains/comet-entry/hook-router-entry.js.map +1 -1
- package/dist/domains/comet-entry/hook-router.d.ts.map +1 -1
- package/dist/domains/comet-entry/hook-router.js +8 -3
- package/dist/domains/comet-entry/hook-router.js.map +1 -1
- package/dist/domains/comet-entry/init-workflow.d.ts.map +1 -1
- package/dist/domains/comet-entry/init-workflow.js +9 -11
- package/dist/domains/comet-entry/init-workflow.js.map +1 -1
- package/dist/domains/comet-entry/resolve-entry.d.ts.map +1 -1
- package/dist/domains/comet-entry/resolve-entry.js +3 -4
- package/dist/domains/comet-entry/resolve-entry.js.map +1 -1
- package/dist/domains/comet-entry/resume-probe.d.ts.map +1 -1
- package/dist/domains/comet-entry/resume-probe.js +16 -5
- package/dist/domains/comet-entry/resume-probe.js.map +1 -1
- package/dist/domains/comet-native/native-archive-command.d.ts +3 -0
- package/dist/domains/comet-native/native-archive-command.d.ts.map +1 -0
- package/dist/domains/comet-native/native-archive-command.js +49 -0
- package/dist/domains/comet-native/native-archive-command.js.map +1 -0
- package/dist/domains/comet-native/native-archive-entry.d.ts +2 -0
- package/dist/domains/comet-native/native-archive-entry.d.ts.map +1 -0
- package/dist/domains/comet-native/native-archive-entry.js +4 -0
- package/dist/domains/comet-native/native-archive-entry.js.map +1 -0
- package/dist/domains/comet-native/native-check-command.d.ts +3 -0
- package/dist/domains/comet-native/native-check-command.d.ts.map +1 -0
- package/dist/domains/comet-native/native-check-command.js +30 -0
- package/dist/domains/comet-native/native-check-command.js.map +1 -0
- package/dist/domains/comet-native/native-check-entry.d.ts +2 -0
- package/dist/domains/comet-native/native-check-entry.d.ts.map +1 -0
- package/dist/domains/comet-native/native-check-entry.js +4 -0
- package/dist/domains/comet-native/native-check-entry.js.map +1 -0
- package/dist/domains/comet-native/native-checkpoint-command.d.ts +3 -0
- package/dist/domains/comet-native/native-checkpoint-command.d.ts.map +1 -0
- package/dist/domains/comet-native/native-checkpoint-command.js +39 -0
- package/dist/domains/comet-native/native-checkpoint-command.js.map +1 -0
- package/dist/domains/comet-native/native-checkpoint-entry.d.ts +2 -0
- package/dist/domains/comet-native/native-checkpoint-entry.d.ts.map +1 -0
- package/dist/domains/comet-native/native-checkpoint-entry.js +4 -0
- package/dist/domains/comet-native/native-checkpoint-entry.js.map +1 -0
- package/dist/domains/comet-native/native-cli-shared.d.ts +40 -0
- package/dist/domains/comet-native/native-cli-shared.d.ts.map +1 -0
- package/dist/domains/comet-native/native-cli-shared.js +272 -0
- package/dist/domains/comet-native/native-cli-shared.js.map +1 -0
- package/dist/domains/comet-native/native-cli.d.ts +2 -5
- package/dist/domains/comet-native/native-cli.d.ts.map +1 -1
- package/dist/domains/comet-native/native-cli.js +37 -785
- package/dist/domains/comet-native/native-cli.js.map +1 -1
- package/dist/domains/comet-native/native-continuation.d.ts.map +1 -1
- package/dist/domains/comet-native/native-continuation.js +16 -0
- package/dist/domains/comet-native/native-continuation.js.map +1 -1
- package/dist/domains/comet-native/native-doctor-command.d.ts +3 -0
- package/dist/domains/comet-native/native-doctor-command.d.ts.map +1 -0
- package/dist/domains/comet-native/native-doctor-command.js +29 -0
- package/dist/domains/comet-native/native-doctor-command.js.map +1 -0
- package/dist/domains/comet-native/native-doctor-entry.d.ts +2 -0
- package/dist/domains/comet-native/native-doctor-entry.d.ts.map +1 -0
- package/dist/domains/comet-native/native-doctor-entry.js +4 -0
- package/dist/domains/comet-native/native-doctor-entry.js.map +1 -0
- package/dist/domains/comet-native/native-evidence-command.d.ts +3 -0
- package/dist/domains/comet-native/native-evidence-command.d.ts.map +1 -0
- package/dist/domains/comet-native/native-evidence-command.js +35 -0
- package/dist/domains/comet-native/native-evidence-command.js.map +1 -0
- package/dist/domains/comet-native/native-evidence-entry.d.ts +2 -0
- package/dist/domains/comet-native/native-evidence-entry.d.ts.map +1 -0
- package/dist/domains/comet-native/native-evidence-entry.js +4 -0
- package/dist/domains/comet-native/native-evidence-entry.js.map +1 -0
- package/dist/domains/comet-native/native-evidence-storage.d.ts +17 -6
- package/dist/domains/comet-native/native-evidence-storage.d.ts.map +1 -1
- package/dist/domains/comet-native/native-evidence-storage.js +89 -23
- package/dist/domains/comet-native/native-evidence-storage.js.map +1 -1
- package/dist/domains/comet-native/native-findings.d.ts.map +1 -1
- package/dist/domains/comet-native/native-findings.js +18 -0
- package/dist/domains/comet-native/native-findings.js.map +1 -1
- package/dist/domains/comet-native/native-hook-guard-command.d.ts +3 -0
- package/dist/domains/comet-native/native-hook-guard-command.d.ts.map +1 -0
- package/dist/domains/comet-native/native-hook-guard-command.js +32 -0
- package/dist/domains/comet-native/native-hook-guard-command.js.map +1 -0
- package/dist/domains/comet-native/native-hook-guard-entry.d.ts +2 -0
- package/dist/domains/comet-native/native-hook-guard-entry.d.ts.map +1 -0
- package/dist/domains/comet-native/native-hook-guard-entry.js +4 -0
- package/dist/domains/comet-native/native-hook-guard-entry.js.map +1 -0
- package/dist/domains/comet-native/native-hook-guard.d.ts.map +1 -1
- package/dist/domains/comet-native/native-hook-guard.js +7 -1
- package/dist/domains/comet-native/native-hook-guard.js.map +1 -1
- package/dist/domains/comet-native/native-init-command.d.ts +3 -0
- package/dist/domains/comet-native/native-init-command.d.ts.map +1 -0
- package/dist/domains/comet-native/native-init-command.js +29 -0
- package/dist/domains/comet-native/native-init-command.js.map +1 -0
- package/dist/domains/comet-native/native-init-entry.d.ts +2 -0
- package/dist/domains/comet-native/native-init-entry.d.ts.map +1 -0
- package/dist/domains/comet-native/native-init-entry.js +4 -0
- package/dist/domains/comet-native/native-init-entry.js.map +1 -0
- package/dist/domains/comet-native/native-new-command.d.ts +3 -0
- package/dist/domains/comet-native/native-new-command.d.ts.map +1 -0
- package/dist/domains/comet-native/native-new-command.js +35 -0
- package/dist/domains/comet-native/native-new-command.js.map +1 -0
- package/dist/domains/comet-native/native-new-entry.d.ts +2 -0
- package/dist/domains/comet-native/native-new-entry.d.ts.map +1 -0
- package/dist/domains/comet-native/native-new-entry.js +4 -0
- package/dist/domains/comet-native/native-new-entry.js.map +1 -0
- package/dist/domains/comet-native/native-next-command.d.ts +3 -0
- package/dist/domains/comet-native/native-next-command.d.ts.map +1 -0
- package/dist/domains/comet-native/native-next-command.js +82 -0
- package/dist/domains/comet-native/native-next-command.js.map +1 -0
- package/dist/domains/comet-native/native-next-entry.d.ts +2 -0
- package/dist/domains/comet-native/native-next-entry.d.ts.map +1 -0
- package/dist/domains/comet-native/native-next-entry.js +4 -0
- package/dist/domains/comet-native/native-next-entry.js.map +1 -0
- package/dist/domains/comet-native/native-receipt-command.d.ts +3 -0
- package/dist/domains/comet-native/native-receipt-command.d.ts.map +1 -0
- package/dist/domains/comet-native/native-receipt-command.js +107 -0
- package/dist/domains/comet-native/native-receipt-command.js.map +1 -0
- package/dist/domains/comet-native/native-receipt-entry.d.ts +2 -0
- package/dist/domains/comet-native/native-receipt-entry.d.ts.map +1 -0
- package/dist/domains/comet-native/native-receipt-entry.js +4 -0
- package/dist/domains/comet-native/native-receipt-entry.js.map +1 -0
- package/dist/domains/comet-native/native-receipt-refresh.d.ts +86 -0
- package/dist/domains/comet-native/native-receipt-refresh.d.ts.map +1 -0
- package/dist/domains/comet-native/native-receipt-refresh.js +232 -0
- package/dist/domains/comet-native/native-receipt-refresh.js.map +1 -0
- package/dist/domains/comet-native/native-root-command.d.ts +3 -0
- package/dist/domains/comet-native/native-root-command.d.ts.map +1 -0
- package/dist/domains/comet-native/native-root-command.js +29 -0
- package/dist/domains/comet-native/native-root-command.js.map +1 -0
- package/dist/domains/comet-native/native-root-entry.d.ts +2 -0
- package/dist/domains/comet-native/native-root-entry.d.ts.map +1 -0
- package/dist/domains/comet-native/native-root-entry.js +4 -0
- package/dist/domains/comet-native/native-root-entry.js.map +1 -0
- package/dist/domains/comet-native/native-script-entry.d.ts +12 -0
- package/dist/domains/comet-native/native-script-entry.d.ts.map +1 -0
- package/dist/domains/comet-native/native-script-entry.js +44 -0
- package/dist/domains/comet-native/native-script-entry.js.map +1 -0
- package/dist/domains/comet-native/native-select-command.d.ts +3 -0
- package/dist/domains/comet-native/native-select-command.d.ts.map +1 -0
- package/dist/domains/comet-native/native-select-command.js +15 -0
- package/dist/domains/comet-native/native-select-command.js.map +1 -0
- package/dist/domains/comet-native/native-select-entry.d.ts +2 -0
- package/dist/domains/comet-native/native-select-entry.d.ts.map +1 -0
- package/dist/domains/comet-native/native-select-entry.js +4 -0
- package/dist/domains/comet-native/native-select-entry.js.map +1 -0
- package/dist/domains/comet-native/native-show-command.d.ts +3 -0
- package/dist/domains/comet-native/native-show-command.d.ts.map +1 -0
- package/dist/domains/comet-native/native-show-command.js +41 -0
- package/dist/domains/comet-native/native-show-command.js.map +1 -0
- package/dist/domains/comet-native/native-show-entry.d.ts +2 -0
- package/dist/domains/comet-native/native-show-entry.d.ts.map +1 -0
- package/dist/domains/comet-native/native-show-entry.js +4 -0
- package/dist/domains/comet-native/native-show-entry.js.map +1 -0
- package/dist/domains/comet-native/native-snapshot.d.ts +9 -0
- package/dist/domains/comet-native/native-snapshot.d.ts.map +1 -1
- package/dist/domains/comet-native/native-snapshot.js +141 -5
- package/dist/domains/comet-native/native-snapshot.js.map +1 -1
- package/dist/domains/comet-native/native-spec-command.d.ts +3 -0
- package/dist/domains/comet-native/native-spec-command.d.ts.map +1 -0
- package/dist/domains/comet-native/native-spec-command.js +34 -0
- package/dist/domains/comet-native/native-spec-command.js.map +1 -0
- package/dist/domains/comet-native/native-spec-entry.d.ts +2 -0
- package/dist/domains/comet-native/native-spec-entry.d.ts.map +1 -0
- package/dist/domains/comet-native/native-spec-entry.js +4 -0
- package/dist/domains/comet-native/native-spec-entry.js.map +1 -0
- package/dist/domains/comet-native/native-status-command.d.ts +3 -0
- package/dist/domains/comet-native/native-status-command.d.ts.map +1 -0
- package/dist/domains/comet-native/native-status-command.js +36 -0
- package/dist/domains/comet-native/native-status-command.js.map +1 -0
- package/dist/domains/comet-native/native-status-entry.d.ts +2 -0
- package/dist/domains/comet-native/native-status-entry.d.ts.map +1 -0
- package/dist/domains/comet-native/native-status-entry.js +4 -0
- package/dist/domains/comet-native/native-status-entry.js.map +1 -0
- package/dist/domains/comet-native/native-transitions.d.ts +4 -0
- package/dist/domains/comet-native/native-transitions.d.ts.map +1 -1
- package/dist/domains/comet-native/native-transitions.js +28 -4
- package/dist/domains/comet-native/native-transitions.js.map +1 -1
- package/dist/domains/comet-native/native-types.d.ts +8 -0
- package/dist/domains/comet-native/native-types.d.ts.map +1 -1
- package/dist/domains/comet-native/native-verification-receipt-runtime.d.ts +14 -0
- package/dist/domains/comet-native/native-verification-receipt-runtime.d.ts.map +1 -1
- package/dist/domains/comet-native/native-verification-receipt-runtime.js +29 -1
- package/dist/domains/comet-native/native-verification-receipt-runtime.js.map +1 -1
- package/dist/domains/comet-native/native-verification-runtime.d.ts +28 -1
- package/dist/domains/comet-native/native-verification-runtime.d.ts.map +1 -1
- package/dist/domains/comet-native/native-verification-runtime.js +92 -14
- package/dist/domains/comet-native/native-verification-runtime.js.map +1 -1
- package/dist/domains/dashboard/collector.d.ts.map +1 -1
- package/dist/domains/dashboard/collector.js +53 -41
- package/dist/domains/dashboard/collector.js.map +1 -1
- package/dist/domains/dashboard/native-collector.d.ts.map +1 -1
- package/dist/domains/dashboard/native-collector.js +13 -3
- package/dist/domains/dashboard/native-collector.js.map +1 -1
- package/dist/domains/dashboard/project-directory.d.ts +20 -0
- package/dist/domains/dashboard/project-directory.d.ts.map +1 -0
- package/dist/domains/dashboard/project-directory.js +87 -0
- package/dist/domains/dashboard/project-directory.js.map +1 -0
- package/dist/domains/dashboard/project-root.d.ts +8 -0
- package/dist/domains/dashboard/project-root.d.ts.map +1 -0
- package/dist/domains/dashboard/project-root.js +68 -0
- package/dist/domains/dashboard/project-root.js.map +1 -0
- package/dist/domains/dashboard/server.d.ts +1 -0
- package/dist/domains/dashboard/server.d.ts.map +1 -1
- package/dist/domains/dashboard/server.js +50 -10
- package/dist/domains/dashboard/server.js.map +1 -1
- package/dist/domains/dashboard/web/assets/{arc-BXDAG6Qx.js → arc-mNt_SS1l.js} +1 -1
- package/dist/domains/dashboard/web/assets/architectureDiagram-3BPJPVTR-Bc5akVD6.js +36 -0
- package/dist/domains/dashboard/web/assets/{blockDiagram-GPEHLZMM-STNPWdDl.js → blockDiagram-GPEHLZMM-C43zhVBe.js} +2 -2
- package/dist/domains/dashboard/web/assets/{c4Diagram-AAUBKEIU-Bh-rUIcJ.js → c4Diagram-AAUBKEIU-dToETarK.js} +2 -2
- package/dist/domains/dashboard/web/assets/channel-b2wWDG4F.js +1 -0
- package/dist/domains/dashboard/web/assets/{chunk-2J33WTMH-BRhFNAFH.js → chunk-2J33WTMH-C0oO137R.js} +1 -1
- package/dist/domains/dashboard/web/assets/{chunk-4BX2VUAB-CwA3zkFS.js → chunk-4BX2VUAB-CGms1fgI.js} +1 -1
- package/dist/domains/dashboard/web/assets/{chunk-55IACEB6-C1tqAl_E.js → chunk-55IACEB6-Bugl8v6f.js} +1 -1
- package/dist/domains/dashboard/web/assets/{chunk-727SXJPM-DDefBoUS.js → chunk-727SXJPM-8ATNMlBG.js} +1 -1
- package/dist/domains/dashboard/web/assets/{chunk-AQP2D5EJ-Dq-0Yi9D.js → chunk-AQP2D5EJ-BNYjSSqU.js} +1 -1
- package/dist/domains/dashboard/web/assets/{chunk-FMBD7UC4-DC-MVNgk.js → chunk-FMBD7UC4-_nJAqSbe.js} +1 -1
- package/dist/domains/dashboard/web/assets/{chunk-ND2GUHAM-BLWZ8zWd.js → chunk-ND2GUHAM-lyxYm5NX.js} +1 -1
- package/dist/domains/dashboard/web/assets/{chunk-QZHKN3VN-DaK5rvZu.js → chunk-QZHKN3VN-PUMVeWpd.js} +1 -1
- package/dist/domains/dashboard/web/assets/classDiagram-4FO5ZUOK-B9SWZywo.js +1 -0
- package/dist/domains/dashboard/web/assets/classDiagram-v2-Q7XG4LA2-B9SWZywo.js +1 -0
- package/dist/domains/dashboard/web/assets/cose-bilkent-S5V4N54A-DzMqjexn.js +1 -0
- package/dist/domains/dashboard/web/assets/{cynefin-VYW2F7L2-CBaY4KFj.js → cynefin-VYW2F7L2-B67ET0eq.js} +1 -1
- package/dist/domains/dashboard/web/assets/dagre-BM42HDAG-CQPMvRLK.js +4 -0
- package/dist/domains/dashboard/web/assets/diagram-2AECGRRQ-BRpLrFHM.js +43 -0
- package/dist/domains/dashboard/web/assets/diagram-5GNKFQAL-CPGWuGrE.js +10 -0
- package/dist/domains/dashboard/web/assets/{diagram-KO2AKTUF-BZcengGf.js → diagram-KO2AKTUF-D2wpX2iO.js} +2 -2
- package/dist/domains/dashboard/web/assets/diagram-LMA3HP47-D54mAbDu.js +24 -0
- package/dist/domains/dashboard/web/assets/diagram-OG6HWLK6-ZGQDpSs_.js +24 -0
- package/dist/domains/dashboard/web/assets/{erDiagram-TEJ5UH35-BBrwULhs.js → erDiagram-TEJ5UH35-C3qDo7sd.js} +2 -2
- package/dist/domains/dashboard/web/assets/{flowDiagram-I6XJVG4X-DiNn0Yzp.js → flowDiagram-I6XJVG4X-B7hStPd9.js} +2 -2
- package/dist/domains/dashboard/web/assets/ganttDiagram-6RSMTGT7-IqcLFbTK.js +292 -0
- package/dist/domains/dashboard/web/assets/gitGraphDiagram-PVQCEYII-YrMZpzUu.js +106 -0
- package/dist/domains/dashboard/web/assets/index-DhtBssCt.js +257 -0
- package/dist/domains/dashboard/web/assets/{index-QO0z6F4w.js → index-icxk8_BP.js} +1 -1
- package/dist/domains/dashboard/web/assets/index-pr3axVDI.css +1 -0
- package/dist/domains/dashboard/web/assets/infoDiagram-5YYISTIA-CcIgGK_7.js +2 -0
- package/dist/domains/dashboard/web/assets/{ishikawaDiagram-YF4QCWOH-DCPPspol.js → ishikawaDiagram-YF4QCWOH-1x3rNjGP.js} +2 -2
- package/dist/domains/dashboard/web/assets/{journeyDiagram-JHISSGLW-C_v8b1Os.js → journeyDiagram-JHISSGLW-B2XiqMNP.js} +2 -2
- package/dist/domains/dashboard/web/assets/{kanban-definition-UN3LZRKU-CgpE9lG7.js → kanban-definition-UN3LZRKU-x46cGuo3.js} +2 -2
- package/dist/domains/dashboard/web/assets/{linear-jSddcREx.js → linear-DFLqGZWl.js} +1 -1
- package/dist/domains/dashboard/web/assets/{mermaid.core-5Ibr28Ig.js → mermaid.core-g3J6BACc.js} +69 -69
- package/dist/domains/dashboard/web/assets/{mindmap-definition-RKZ34NQL-XPCohX0x.js → mindmap-definition-RKZ34NQL-CTdeKmcX.js} +2 -2
- package/dist/domains/dashboard/web/assets/{pieDiagram-4H26LBE5-DvhxgQWl.js → pieDiagram-4H26LBE5-C_obwjIf.js} +2 -2
- package/dist/domains/dashboard/web/assets/{quadrantDiagram-W4KKPZXB-CCUxdF-S.js → quadrantDiagram-W4KKPZXB-B6Gnfz9M.js} +4 -4
- package/dist/domains/dashboard/web/assets/{requirementDiagram-4Y6WPE33-FS3TCmdX.js → requirementDiagram-4Y6WPE33-nX4PObnB.js} +2 -2
- package/dist/domains/dashboard/web/assets/{sankeyDiagram-5OEKKPKP-r129rscN.js → sankeyDiagram-5OEKKPKP-QjDwwHgl.js} +2 -2
- package/dist/domains/dashboard/web/assets/{sequenceDiagram-3UESZ5HK--DCY0bvU.js → sequenceDiagram-3UESZ5HK-BEEe0j6B.js} +2 -2
- package/dist/domains/dashboard/web/assets/stateDiagram-AJRCARHV-CXfAaBgM.js +1 -0
- package/dist/domains/dashboard/web/assets/stateDiagram-v2-BHNVJYJU-CD3nS4cC.js +1 -0
- package/dist/domains/dashboard/web/assets/{timeline-definition-PNZ67QCA-NlqCuFuo.js → timeline-definition-PNZ67QCA-BOzX2EnD.js} +2 -2
- package/dist/domains/dashboard/web/assets/{vennDiagram-CIIHVFJN-B4W_d1Nq.js → vennDiagram-CIIHVFJN-C40vhXRq.js} +2 -2
- package/dist/domains/dashboard/web/assets/{wardleyDiagram-YWT4CUSO-Bex-_jWd.js → wardleyDiagram-YWT4CUSO-B1rm89JH.js} +2 -2
- package/dist/domains/dashboard/web/assets/{xychartDiagram-2RQKCTM6-CmxeVM2Z.js → xychartDiagram-2RQKCTM6-BlMr59qK.js} +2 -2
- package/dist/domains/dashboard/web/index.html +2 -2
- package/dist/domains/integrations/openspec.d.ts +1 -0
- package/dist/domains/integrations/openspec.d.ts.map +1 -1
- package/dist/domains/integrations/openspec.js +11 -2
- package/dist/domains/integrations/openspec.js.map +1 -1
- package/dist/domains/skill/platform-install.d.ts.map +1 -1
- package/dist/domains/skill/platform-install.js +36 -6
- package/dist/domains/skill/platform-install.js.map +1 -1
- package/dist/domains/skill/uninstall.d.ts +10 -2
- package/dist/domains/skill/uninstall.d.ts.map +1 -1
- package/dist/domains/skill/uninstall.js +256 -23
- package/dist/domains/skill/uninstall.js.map +1 -1
- package/dist/domains/workflow-contract/contained-atomic-write.d.ts +3 -0
- package/dist/domains/workflow-contract/contained-atomic-write.d.ts.map +1 -1
- package/dist/domains/workflow-contract/contained-atomic-write.js +15 -2
- package/dist/domains/workflow-contract/contained-atomic-write.js.map +1 -1
- package/dist/domains/workflow-contract/index.d.ts +1 -1
- package/dist/domains/workflow-contract/index.d.ts.map +1 -1
- package/dist/domains/workflow-contract/index.js +1 -1
- package/dist/domains/workflow-contract/index.js.map +1 -1
- package/dist/domains/workflow-contract/project-config-reader.d.ts +2 -0
- package/dist/domains/workflow-contract/project-config-reader.d.ts.map +1 -1
- package/dist/domains/workflow-contract/project-config-reader.js.map +1 -1
- package/dist/domains/workflow-contract/project-config-writer.d.ts.map +1 -1
- package/dist/domains/workflow-contract/project-config-writer.js +3 -2
- package/dist/domains/workflow-contract/project-config-writer.js.map +1 -1
- package/dist/domains/workflow-contract/project-config.d.ts +2 -0
- package/dist/domains/workflow-contract/project-config.d.ts.map +1 -1
- package/dist/domains/workflow-contract/project-config.js +54 -5
- package/dist/domains/workflow-contract/project-config.js.map +1 -1
- package/dist/platform/install/detect.d.ts +1 -0
- package/dist/platform/install/detect.d.ts.map +1 -1
- package/dist/platform/install/detect.js +2 -0
- package/dist/platform/install/detect.js.map +1 -1
- package/dist/platform/install/platforms.d.ts +2 -0
- package/dist/platform/install/platforms.d.ts.map +1 -1
- package/dist/platform/install/platforms.js +1 -0
- package/dist/platform/install/platforms.js.map +1 -1
- package/dist/platform/process/hook-read-cache.d.ts +45 -0
- package/dist/platform/process/hook-read-cache.d.ts.map +1 -0
- package/dist/platform/process/hook-read-cache.js +102 -0
- package/dist/platform/process/hook-read-cache.js.map +1 -0
- package/dist/platform/version/version.d.ts.map +1 -1
- package/dist/platform/version/version.js +9 -2
- package/dist/platform/version/version.js.map +1 -1
- package/eval/local/tasks/comet-classic-layout-lifecycle/environment/current-comet-package.json +2 -0
- package/eval/local/tasks/comet-native-wave-f-dashboard-readonly/environment/current-comet-package.json +2 -0
- package/eval/local/tasks/comet-native-workflow/instruction.md +3 -3
- package/eval/local/tasks/comet-native-workflow/task.toml +4 -2
- package/eval/local/tasks/comet-native-workflow/validation/test_native_workflow.py +212 -75
- package/eval/local/tests/scaffold/test_native_wave_evaluations.py +114 -39
- package/eval/local/tests/scaffold/test_tasks.py +5 -1
- package/package.json +7 -3
- package/dist/domains/dashboard/web/assets/_commonjsHelpers-CqkleIqs.js +0 -1
- package/dist/domains/dashboard/web/assets/architectureDiagram-3BPJPVTR-R2JyCv0i.js +0 -36
- package/dist/domains/dashboard/web/assets/channel-XR_5gd6D.js +0 -1
- package/dist/domains/dashboard/web/assets/classDiagram-4FO5ZUOK-CG_TnucZ.js +0 -1
- package/dist/domains/dashboard/web/assets/classDiagram-v2-Q7XG4LA2-CG_TnucZ.js +0 -1
- package/dist/domains/dashboard/web/assets/cose-bilkent-S5V4N54A-DCPgAyMU.js +0 -1
- package/dist/domains/dashboard/web/assets/dagre-BM42HDAG-CLKQ6BQM.js +0 -4
- package/dist/domains/dashboard/web/assets/diagram-2AECGRRQ-DCup336F.js +0 -43
- package/dist/domains/dashboard/web/assets/diagram-5GNKFQAL-DgpDOFTE.js +0 -10
- package/dist/domains/dashboard/web/assets/diagram-LMA3HP47-DSECilBo.js +0 -24
- package/dist/domains/dashboard/web/assets/diagram-OG6HWLK6-3FuzANXW.js +0 -24
- package/dist/domains/dashboard/web/assets/ganttDiagram-6RSMTGT7-DcvbTHnu.js +0 -292
- package/dist/domains/dashboard/web/assets/gitGraphDiagram-PVQCEYII-CgCY3MJo.js +0 -106
- package/dist/domains/dashboard/web/assets/index-BR3wUr2k.css +0 -1
- package/dist/domains/dashboard/web/assets/index-CovQUq5W.js +0 -24
- package/dist/domains/dashboard/web/assets/infoDiagram-5YYISTIA-hzBGAEue.js +0 -2
- package/dist/domains/dashboard/web/assets/stateDiagram-AJRCARHV-yHkUByrT.js +0 -1
- package/dist/domains/dashboard/web/assets/stateDiagram-v2-BHNVJYJU-XHzDdqcm.js +0 -1
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire as __cometCreateRequire } from 'module';
|
|
3
|
+
const require = __cometCreateRequire(import.meta.url);
|
|
4
|
+
var _c=Object.create;var ta=Object.defineProperty;var Oc=Object.getOwnPropertyDescriptor;var jc=Object.getOwnPropertyNames;var $c=Object.getPrototypeOf,Hc=Object.prototype.hasOwnProperty;var _t=(i=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(i,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):i)(function(i){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+i+'" is not supported')});var v=(i,e)=>()=>{try{return e||i((e={exports:{}}).exports,e),e.exports}catch(t){throw e=0,t}};var Lc=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of jc(e))!Hc.call(i,r)&&r!==t&&ta(i,r,{get:()=>e[r],enumerable:!(n=Oc(e,r))||n.enumerable});return i};var ia=(i,e,t)=>(t=i!=null?_c($c(i)):{},Lc(e||!i||!i.__esModule?ta(t,"default",{value:i,enumerable:!0}):t,i));var C=v(j=>{"use strict";var Qi=Symbol.for("yaml.alias"),na=Symbol.for("yaml.document"),Ot=Symbol.for("yaml.map"),ra=Symbol.for("yaml.pair"),Zi=Symbol.for("yaml.scalar"),jt=Symbol.for("yaml.seq"),X=Symbol.for("yaml.node.type"),Mc=i=>!!i&&typeof i=="object"&&i[X]===Qi,Dc=i=>!!i&&typeof i=="object"&&i[X]===na,Fc=i=>!!i&&typeof i=="object"&&i[X]===Ot,Bc=i=>!!i&&typeof i=="object"&&i[X]===ra,aa=i=>!!i&&typeof i=="object"&&i[X]===Zi,qc=i=>!!i&&typeof i=="object"&&i[X]===jt;function oa(i){if(i&&typeof i=="object")switch(i[X]){case Ot:case jt:return!0}return!1}function Vc(i){if(i&&typeof i=="object")switch(i[X]){case Qi:case Ot:case Zi:case jt:return!0}return!1}var zc=i=>(aa(i)||oa(i))&&!!i.anchor;j.ALIAS=Qi;j.DOC=na;j.MAP=Ot;j.NODE_TYPE=X;j.PAIR=ra;j.SCALAR=Zi;j.SEQ=jt;j.hasAnchor=zc;j.isAlias=Mc;j.isCollection=oa;j.isDocument=Dc;j.isMap=Fc;j.isNode=Vc;j.isPair=Bc;j.isScalar=aa;j.isSeq=qc});var Be=v(en=>{"use strict";var _=C(),H=Symbol("break visit"),sa=Symbol("skip children"),G=Symbol("remove node");function $t(i,e){let t=ca(e);_.isDocument(i)?Re(null,i.contents,t,Object.freeze([i]))===G&&(i.contents=null):Re(null,i,t,Object.freeze([]))}$t.BREAK=H;$t.SKIP=sa;$t.REMOVE=G;function Re(i,e,t,n){let r=la(i,e,t,n);if(_.isNode(r)||_.isPair(r))return ua(i,n,r),Re(i,r,t,n);if(typeof r!="symbol"){if(_.isCollection(e)){n=Object.freeze(n.concat(e));for(let a=0;a<e.items.length;++a){let o=Re(a,e.items[a],t,n);if(typeof o=="number")a=o-1;else{if(o===H)return H;o===G&&(e.items.splice(a,1),a-=1)}}}else if(_.isPair(e)){n=Object.freeze(n.concat(e));let a=Re("key",e.key,t,n);if(a===H)return H;a===G&&(e.key=null);let o=Re("value",e.value,t,n);if(o===H)return H;o===G&&(e.value=null)}}return r}async function Ht(i,e){let t=ca(e);_.isDocument(i)?await Pe(null,i.contents,t,Object.freeze([i]))===G&&(i.contents=null):await Pe(null,i,t,Object.freeze([]))}Ht.BREAK=H;Ht.SKIP=sa;Ht.REMOVE=G;async function Pe(i,e,t,n){let r=await la(i,e,t,n);if(_.isNode(r)||_.isPair(r))return ua(i,n,r),Pe(i,r,t,n);if(typeof r!="symbol"){if(_.isCollection(e)){n=Object.freeze(n.concat(e));for(let a=0;a<e.items.length;++a){let o=await Pe(a,e.items[a],t,n);if(typeof o=="number")a=o-1;else{if(o===H)return H;o===G&&(e.items.splice(a,1),a-=1)}}}else if(_.isPair(e)){n=Object.freeze(n.concat(e));let a=await Pe("key",e.key,t,n);if(a===H)return H;a===G&&(e.key=null);let o=await Pe("value",e.value,t,n);if(o===H)return H;o===G&&(e.value=null)}}return r}function ca(i){return typeof i=="object"&&(i.Collection||i.Node||i.Value)?Object.assign({Alias:i.Node,Map:i.Node,Scalar:i.Node,Seq:i.Node},i.Value&&{Map:i.Value,Scalar:i.Value,Seq:i.Value},i.Collection&&{Map:i.Collection,Seq:i.Collection},i):i}function la(i,e,t,n){if(typeof t=="function")return t(i,e,n);if(_.isMap(e))return t.Map?.(i,e,n);if(_.isSeq(e))return t.Seq?.(i,e,n);if(_.isPair(e))return t.Pair?.(i,e,n);if(_.isScalar(e))return t.Scalar?.(i,e,n);if(_.isAlias(e))return t.Alias?.(i,e,n)}function ua(i,e,t){let n=e[e.length-1];if(_.isCollection(n))n.items[i]=t;else if(_.isPair(n))i==="key"?n.key=t:n.value=t;else if(_.isDocument(n))n.contents=t;else{let r=_.isAlias(n)?"alias":"scalar";throw new Error(`Cannot replace node with ${r} parent`)}}en.visit=$t;en.visitAsync=Ht});var tn=v(da=>{"use strict";var fa=C(),Wc=Be(),Jc={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},Kc=i=>i.replace(/[!,[\]{}]/g,e=>Jc[e]),qe=class i{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},i.defaultYaml,e),this.tags=Object.assign({},i.defaultTags,t)}clone(){let e=new i(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new i(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:i.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},i.defaultTags);break}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:i.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},i.defaultTags),this.atNextDocument=!1);let n=e.trim().split(/[ \t]+/),r=n.shift();switch(r){case"%TAG":{if(n.length!==2&&(t(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;let[a,o]=n;return this.tags[a]=o,!0}case"%YAML":{if(this.yaml.explicit=!0,n.length!==1)return t(0,"%YAML directive should contain exactly one part"),!1;let[a]=n;if(a==="1.1"||a==="1.2")return this.yaml.version=a,!0;{let o=/^\d+\.\d+$/.test(a);return t(6,`Unsupported YAML version ${a}`,o),!1}}default:return t(0,`Unknown directive ${r}`,!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[,n,r]=e.match(/^(.*!)([^!]*)$/s);r||t(`The ${e} tag has no suffix`);let a=this.tags[n];if(a)try{return a+decodeURIComponent(r)}catch(o){return t(String(o)),null}return n==="!"?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+Kc(e.substring(n.length));return e[0]==="!"?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],n=Object.entries(this.tags),r;if(e&&n.length>0&&fa.isNode(e.contents)){let a={};Wc.visit(e.contents,(o,s)=>{fa.isNode(s)&&s.tag&&(a[s.tag]=!0)}),r=Object.keys(a)}else r=[];for(let[a,o]of n)a==="!!"&&o==="tag:yaml.org,2002:"||(!e||r.some(s=>s.startsWith(o)))&&t.push(`%TAG ${a} ${o}`);return t.join(`
|
|
5
|
+
`)}};qe.defaultYaml={explicit:!1,version:"1.2"};qe.defaultTags={"!!":"tag:yaml.org,2002:"};da.Directives=qe});var Lt=v(Ve=>{"use strict";var ha=C(),Gc=Be();function Uc(i){if(/[\x00-\x19\s,[\]{}]/.test(i)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(i)}`;throw new Error(t)}return!0}function pa(i){let e=new Set;return Gc.visit(i,{Value(t,n){n.anchor&&e.add(n.anchor)}}),e}function ma(i,e){for(let t=1;;++t){let n=`${i}${t}`;if(!e.has(n))return n}}function Yc(i,e){let t=[],n=new Map,r=null;return{onAnchor:a=>{t.push(a),r??(r=pa(i));let o=ma(e,r);return r.add(o),o},setAnchors:()=>{for(let a of t){let o=n.get(a);if(typeof o=="object"&&o.anchor&&(ha.isScalar(o.node)||ha.isCollection(o.node)))o.node.anchor=o.anchor;else{let s=new Error("Failed to resolve repeated object (this should not happen)");throw s.source=a,s}}},sourceObjects:n}}Ve.anchorIsValid=Uc;Ve.anchorNames=pa;Ve.createNodeAnchors=Yc;Ve.findNewAnchor=ma});var nn=v(va=>{"use strict";function ze(i,e,t,n){if(n&&typeof n=="object")if(Array.isArray(n))for(let r=0,a=n.length;r<a;++r){let o=n[r],s=ze(i,n,String(r),o);s===void 0?delete n[r]:s!==o&&(n[r]=s)}else if(n instanceof Map)for(let r of Array.from(n.keys())){let a=n.get(r),o=ze(i,n,r,a);o===void 0?n.delete(r):o!==a&&n.set(r,o)}else if(n instanceof Set)for(let r of Array.from(n)){let a=ze(i,n,r,r);a===void 0?n.delete(r):a!==r&&(n.delete(r),n.add(a))}else for(let[r,a]of Object.entries(n)){let o=ze(i,n,r,a);o===void 0?delete n[r]:o!==a&&(n[r]=o)}return i.call(e,t,n)}va.applyReviver=ze});var ee=v(wa=>{"use strict";var Xc=C();function ga(i,e,t){if(Array.isArray(i))return i.map((n,r)=>ga(n,String(r),t));if(i&&typeof i.toJSON=="function"){if(!t||!Xc.hasAnchor(i))return i.toJSON(e,t);let n={aliasCount:0,count:1,res:void 0};t.anchors.set(i,n),t.onCreate=a=>{n.res=a,delete t.onCreate};let r=i.toJSON(e,t);return t.onCreate&&t.onCreate(r),r}return typeof i=="bigint"&&!t?.keep?Number(i):i}wa.toJS=ga});var Mt=v(Na=>{"use strict";var Qc=nn(),ya=C(),Zc=ee(),rn=class{constructor(e){Object.defineProperty(this,ya.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:n,onAnchor:r,reviver:a}={}){if(!ya.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 n=="number"?n:100},s=Zc.toJS(this,"",o);if(typeof r=="function")for(let{count:c,res:l}of o.anchors.values())r(l,c);return typeof a=="function"?Qc.applyReviver(a,{"":s},"",s):s}};Na.NodeBase=rn});var We=v(ba=>{"use strict";var el=Lt(),tl=Be(),Ae=C(),il=Mt(),nl=ee(),an=class extends il.NodeBase{constructor(e){super(Ae.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 n;t?.aliasResolveCache?n=t.aliasResolveCache:(n=[],tl.visit(e,{Node:(a,o)=>{(Ae.isAlias(o)||Ae.hasAnchor(o))&&n.push(o)}}),t&&(t.aliasResolveCache=n));let r;for(let a of n){if(a===this)break;a.anchor===this.source&&(r=a)}return r}toJSON(e,t){if(!t)return{source:this.source};let{anchors:n,doc:r,maxAliasCount:a}=t,o=this.resolve(r,t);if(!o){let c=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(c)}let s=n.get(o);if(s||(nl.toJS(o,null,t),s=n.get(o)),s?.res===void 0){let c="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(c)}if(a>=0&&(s.count+=1,s.aliasCount===0&&(s.aliasCount=Dt(r,o,n)),s.count*s.aliasCount>a)){let c="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(c)}return s.res}toString(e,t,n){let r=`*${this.source}`;if(e){if(el.anchorIsValid(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let a=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(a)}if(e.implicitKey)return`${r} `}return r}};function Dt(i,e,t){if(Ae.isAlias(e)){let n=e.resolve(i),r=t&&n&&t.get(n);return r?r.count*r.aliasCount:0}else if(Ae.isCollection(e)){let n=0;for(let r of e.items){let a=Dt(i,r,t);a>n&&(n=a)}return n}else if(Ae.isPair(e)){let n=Dt(i,e.key,t),r=Dt(i,e.value,t);return Math.max(n,r)}return 1}ba.Alias=an});var x=v(on=>{"use strict";var rl=C(),al=Mt(),ol=ee(),sl=i=>!i||typeof i!="function"&&typeof i!="object",te=class extends al.NodeBase{constructor(e){super(rl.SCALAR),this.value=e}toJSON(e,t){return t?.keep?this.value:ol.toJS(this.value,e,t)}toString(){return String(this.value)}};te.BLOCK_FOLDED="BLOCK_FOLDED";te.BLOCK_LITERAL="BLOCK_LITERAL";te.PLAIN="PLAIN";te.QUOTE_DOUBLE="QUOTE_DOUBLE";te.QUOTE_SINGLE="QUOTE_SINGLE";on.Scalar=te;on.isScalarValue=sl});var Je=v(ka=>{"use strict";var cl=We(),pe=C(),Sa=x(),ll="tag:yaml.org,2002:";function ul(i,e,t){if(e){let n=t.filter(a=>a.tag===e),r=n.find(a=>!a.format)??n[0];if(!r)throw new Error(`Tag ${e} not found`);return r}return t.find(n=>n.identify?.(i)&&!n.format)}function fl(i,e,t){if(pe.isDocument(i)&&(i=i.contents),pe.isNode(i))return i;if(pe.isPair(i)){let u=t.schema[pe.MAP].createNode?.(t.schema,null,t);return u.items.push(i),u}(i instanceof String||i instanceof Number||i instanceof Boolean||typeof BigInt<"u"&&i instanceof BigInt)&&(i=i.valueOf());let{aliasDuplicateObjects:n,onAnchor:r,onTagObj:a,schema:o,sourceObjects:s}=t,c;if(n&&i&&typeof i=="object"){if(c=s.get(i),c)return c.anchor??(c.anchor=r(i)),new cl.Alias(c.anchor);c={anchor:null,node:null},s.set(i,c)}e?.startsWith("!!")&&(e=ll+e.slice(2));let l=ul(i,e,o.tags);if(!l){if(i&&typeof i.toJSON=="function"&&(i=i.toJSON()),!i||typeof i!="object"){let u=new Sa.Scalar(i);return c&&(c.node=u),u}l=i instanceof Map?o[pe.MAP]:Symbol.iterator in Object(i)?o[pe.SEQ]:o[pe.MAP]}a&&(a(l),delete t.onTagObj);let h=l?.createNode?l.createNode(t.schema,i,t):typeof l?.nodeClass?.from=="function"?l.nodeClass.from(t.schema,i,t):new Sa.Scalar(i);return e?h.tag=e:l.default||(h.tag=l.tag),c&&(c.node=h),h}ka.createNode=fl});var Bt=v(Ft=>{"use strict";var dl=Je(),U=C(),hl=Mt();function sn(i,e,t){let n=t;for(let r=e.length-1;r>=0;--r){let a=e[r];if(typeof a=="number"&&Number.isInteger(a)&&a>=0){let o=[];o[a]=n,n=o}else n=new Map([[a,n]])}return dl.createNode(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:i,sourceObjects:new Map})}var Ea=i=>i==null||typeof i=="object"&&!!i[Symbol.iterator]().next().done,cn=class extends hl.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(n=>U.isNode(n)||U.isPair(n)?n.clone(e):n),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(Ea(e))this.add(t);else{let[n,...r]=e,a=this.get(n,!0);if(U.isCollection(a))a.addIn(r,t);else if(a===void 0&&this.schema)this.set(n,sn(this.schema,r,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}deleteIn(e){let[t,...n]=e;if(n.length===0)return this.delete(t);let r=this.get(t,!0);if(U.isCollection(r))return r.deleteIn(n);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){let[n,...r]=e,a=this.get(n,!0);return r.length===0?!t&&U.isScalar(a)?a.value:a:U.isCollection(a)?a.getIn(r,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!U.isPair(t))return!1;let n=t.value;return n==null||e&&U.isScalar(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[t,...n]=e;if(n.length===0)return this.has(t);let r=this.get(t,!0);return U.isCollection(r)?r.hasIn(n):!1}setIn(e,t){let[n,...r]=e;if(r.length===0)this.set(n,t);else{let a=this.get(n,!0);if(U.isCollection(a))a.setIn(r,t);else if(a===void 0&&this.schema)this.set(n,sn(this.schema,r,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}};Ft.Collection=cn;Ft.collectionFromPath=sn;Ft.isEmptyPath=Ea});var Ke=v(qt=>{"use strict";var pl=i=>i.replace(/^(?!$)(?: $)?/gm,"#");function ln(i,e){return/^\n+$/.test(i)?i.substring(1):e?i.replace(/^(?! *$)/gm,e):i}var ml=(i,e,t)=>i.endsWith(`
|
|
6
|
+
`)?ln(t,e):t.includes(`
|
|
7
|
+
`)?`
|
|
8
|
+
`+ln(t,e):(i.endsWith(" ")?"":" ")+t;qt.indentComment=ln;qt.lineComment=ml;qt.stringifyComment=pl});var Ra=v(Ge=>{"use strict";var vl="flow",un="block",Vt="quoted";function gl(i,e,t="flow",{indentAtStart:n,lineWidth:r=80,minContentWidth:a=20,onFold:o,onOverflow:s}={}){if(!r||r<0)return i;r<a&&(a=0);let c=Math.max(1+a,1+r-e.length);if(i.length<=c)return i;let l=[],h={},u=r-e.length;typeof n=="number"&&(n>r-Math.max(2,a)?l.push(0):u=r-n);let f,m,g=!1,d=-1,p=-1,w=-1;t===un&&(d=Ca(i,d,e.length),d!==-1&&(u=d+c));for(let b;b=i[d+=1];){if(t===Vt&&b==="\\"){switch(p=d,i[d+1]){case"x":d+=3;break;case"u":d+=5;break;case"U":d+=9;break;default:d+=1}w=d}if(b===`
|
|
9
|
+
`)t===un&&(d=Ca(i,d,e.length)),u=d+e.length+c,f=void 0;else{if(b===" "&&m&&m!==" "&&m!==`
|
|
10
|
+
`&&m!==" "){let S=i[d+1];S&&S!==" "&&S!==`
|
|
11
|
+
`&&S!==" "&&(f=d)}if(d>=u)if(f)l.push(f),u=f+c,f=void 0;else if(t===Vt){for(;m===" "||m===" ";)m=b,b=i[d+=1],g=!0;let S=d>w+1?d-2:p-1;if(h[S])return i;l.push(S),h[S]=!0,u=S+c,f=void 0}else g=!0}m=b}if(g&&s&&s(),l.length===0)return i;o&&o();let N=i.slice(0,l[0]);for(let b=0;b<l.length;++b){let S=l[b],k=l[b+1]||i.length;S===0?N=`
|
|
12
|
+
${e}${i.slice(0,k)}`:(t===Vt&&h[S]&&(N+=`${i[S]}\\`),N+=`
|
|
13
|
+
${e}${i.slice(S+1,k)}`)}return N}function Ca(i,e,t){let n=e,r=e+1,a=i[r];for(;a===" "||a===" ";)if(e<r+t)a=i[++e];else{do a=i[++e];while(a&&a!==`
|
|
14
|
+
`);n=e,r=e+1,a=i[r]}return n}Ge.FOLD_BLOCK=un;Ge.FOLD_FLOW=vl;Ge.FOLD_QUOTED=Vt;Ge.foldFlowLines=gl});var Ye=v(Pa=>{"use strict";var B=x(),ie=Ra(),Wt=(i,e)=>({indentAtStart:e?i.indent.length:i.indentAtStart,lineWidth:i.options.lineWidth,minContentWidth:i.options.minContentWidth}),Jt=i=>/^(%|---|\.\.\.)/m.test(i);function wl(i,e,t){if(!e||e<0)return!1;let n=e-t,r=i.length;if(r<=n)return!1;for(let a=0,o=0;a<r;++a)if(i[a]===`
|
|
15
|
+
`){if(a-o>n)return!0;if(o=a+1,r-o<=n)return!1}return!0}function Ue(i,e){let t=JSON.stringify(i);if(e.options.doubleQuotedAsJSON)return t;let{implicitKey:n}=e,r=e.options.doubleQuotedMinMultiLineLength,a=e.indent||(Jt(i)?" ":""),o="",s=0;for(let c=0,l=t[c];l;l=t[++c])if(l===" "&&t[c+1]==="\\"&&t[c+2]==="n"&&(o+=t.slice(s,c)+"\\ ",c+=1,s=c,l="\\"),l==="\\")switch(t[c+1]){case"u":{o+=t.slice(s,c);let h=t.substr(c+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(c,6)}c+=5,s=c+1}break;case"n":if(n||t[c+2]==='"'||t.length<r)c+=1;else{for(o+=t.slice(s,c)+`
|
|
16
|
+
|
|
17
|
+
`;t[c+2]==="\\"&&t[c+3]==="n"&&t[c+4]!=='"';)o+=`
|
|
18
|
+
`,c+=2;o+=a,t[c+2]===" "&&(o+="\\"),c+=1,s=c+1}break;default:c+=1}return o=s?o+t.slice(s):t,n?o:ie.foldFlowLines(o,a,ie.FOLD_QUOTED,Wt(e,!1))}function fn(i,e){if(e.options.singleQuote===!1||e.implicitKey&&i.includes(`
|
|
19
|
+
`)||/[ \t]\n|\n[ \t]/.test(i))return Ue(i,e);let t=e.indent||(Jt(i)?" ":""),n="'"+i.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
20
|
+
${t}`)+"'";return e.implicitKey?n:ie.foldFlowLines(n,t,ie.FOLD_FLOW,Wt(e,!1))}function xe(i,e){let{singleQuote:t}=e.options,n;if(t===!1)n=Ue;else{let r=i.includes('"'),a=i.includes("'");r&&!a?n=fn:a&&!r?n=Ue:n=t?fn:Ue}return n(i,e)}var dn;try{dn=new RegExp(`(^|(?<!
|
|
21
|
+
))
|
|
22
|
+
+(?!
|
|
23
|
+
|$)`,"g")}catch{dn=/\n+(?!\n|$)/g}function zt({comment:i,type:e,value:t},n,r,a){let{blockQuote:o,commentString:s,lineWidth:c}=n.options;if(!o||/\n[\t ]+$/.test(t))return xe(t,n);let l=n.indent||(n.forceBlockIndent||Jt(t)?" ":""),h=o==="literal"?!0:o==="folded"||e===B.Scalar.BLOCK_FOLDED?!1:e===B.Scalar.BLOCK_LITERAL?!0:!wl(t,c,l.length);if(!t)return h?`|
|
|
24
|
+
`:`>
|
|
25
|
+
`;let u,f;for(f=t.length;f>0;--f){let k=t[f-1];if(k!==`
|
|
26
|
+
`&&k!==" "&&k!==" ")break}let m=t.substring(f),g=m.indexOf(`
|
|
27
|
+
`);g===-1?u="-":t===m||g!==m.length-1?(u="+",a&&a()):u="",m&&(t=t.slice(0,-m.length),m[m.length-1]===`
|
|
28
|
+
`&&(m=m.slice(0,-1)),m=m.replace(dn,`$&${l}`));let d=!1,p,w=-1;for(p=0;p<t.length;++p){let k=t[p];if(k===" ")d=!0;else if(k===`
|
|
29
|
+
`)w=p;else break}let N=t.substring(0,w<p?w+1:p);N&&(t=t.substring(N.length),N=N.replace(/\n+/g,`$&${l}`));let S=(d?l?"2":"1":"")+u;if(i&&(S+=" "+s(i.replace(/ ?[\r\n]+/g," ")),r&&r()),!h){let k=t.replace(/\n+/g,`
|
|
30
|
+
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${l}`),E=!1,P=Wt(n,!0);o!=="folded"&&e!==B.Scalar.BLOCK_FOLDED&&(P.onOverflow=()=>{E=!0});let y=ie.foldFlowLines(`${N}${k}${m}`,l,ie.FOLD_BLOCK,P);if(!E)return`>${S}
|
|
31
|
+
${l}${y}`}return t=t.replace(/\n+/g,`$&${l}`),`|${S}
|
|
32
|
+
${l}${N}${t}${m}`}function yl(i,e,t,n){let{type:r,value:a}=i,{actualString:o,implicitKey:s,indent:c,indentStep:l,inFlow:h}=e;if(s&&a.includes(`
|
|
33
|
+
`)||h&&/[[\]{},]/.test(a))return xe(a,e);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a))return s||h||!a.includes(`
|
|
34
|
+
`)?xe(a,e):zt(i,e,t,n);if(!s&&!h&&r!==B.Scalar.PLAIN&&a.includes(`
|
|
35
|
+
`))return zt(i,e,t,n);if(Jt(a)){if(c==="")return e.forceBlockIndent=!0,zt(i,e,t,n);if(s&&c===l)return xe(a,e)}let u=a.replace(/\n+/g,`$&
|
|
36
|
+
${c}`);if(o){let f=d=>d.default&&d.tag!=="tag:yaml.org,2002:str"&&d.test?.test(u),{compat:m,tags:g}=e.doc.schema;if(g.some(f)||m?.some(f))return xe(a,e)}return s?u:ie.foldFlowLines(u,c,ie.FOLD_FLOW,Wt(e,!1))}function Nl(i,e,t,n){let{implicitKey:r,inFlow:a}=e,o=typeof i.value=="string"?i:Object.assign({},i,{value:String(i.value)}),{type:s}=i;s!==B.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(s=B.Scalar.QUOTE_DOUBLE);let c=h=>{switch(h){case B.Scalar.BLOCK_FOLDED:case B.Scalar.BLOCK_LITERAL:return r||a?xe(o.value,e):zt(o,e,t,n);case B.Scalar.QUOTE_DOUBLE:return Ue(o.value,e);case B.Scalar.QUOTE_SINGLE:return fn(o.value,e);case B.Scalar.PLAIN:return yl(o,e,t,n);default:return null}},l=c(s);if(l===null){let{defaultKeyType:h,defaultStringType:u}=e.options,f=r&&h||u;if(l=c(f),l===null)throw new Error(`Unsupported default string type ${f}`)}return l}Pa.stringifyString=Nl});var Xe=v(hn=>{"use strict";var bl=Lt(),ne=C(),Sl=Ke(),kl=Ye();function El(i,e){let t=Object.assign({blockQuote:!0,commentString:Sl.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},i.schema.toStringOptions,e),n;switch(t.collectionStyle){case"block":n=!1;break;case"flow":n=!0;break;default:n=null}return{anchors:new Set,doc:i,flowCollectionPadding:t.flowCollectionPadding?" ":"",indent:"",indentStep:typeof t.indent=="number"?" ".repeat(t.indent):" ",inFlow:n,options:t}}function Cl(i,e){if(e.tag){let r=i.filter(a=>a.tag===e.tag);if(r.length>0)return r.find(a=>a.format===e.format)??r[0]}let t,n;if(ne.isScalar(e)){n=e.value;let r=i.filter(a=>a.identify?.(n));if(r.length>1){let a=r.filter(o=>o.test);a.length>0&&(r=a)}t=r.find(a=>a.format===e.format)??r.find(a=>!a.format)}else n=e,t=i.find(r=>r.nodeClass&&n instanceof r.nodeClass);if(!t){let r=n?.constructor?.name??(n===null?"null":typeof n);throw new Error(`Tag not resolved for ${r} value`)}return t}function Rl(i,e,{anchors:t,doc:n}){if(!n.directives)return"";let r=[],a=(ne.isScalar(i)||ne.isCollection(i))&&i.anchor;a&&bl.anchorIsValid(a)&&(t.add(a),r.push(`&${a}`));let o=i.tag??(e.default?null:e.tag);return o&&r.push(n.directives.tagString(o)),r.join(" ")}function Pl(i,e,t,n){if(ne.isPair(i))return i.toString(e,t,n);if(ne.isAlias(i)){if(e.doc.directives)return i.toString(e);if(e.resolvedAliases?.has(i))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(i):e.resolvedAliases=new Set([i]),i=i.resolve(e.doc)}let r,a=ne.isNode(i)?i:e.doc.createNode(i,{onTagObj:c=>r=c});r??(r=Cl(e.doc.schema.tags,a));let o=Rl(a,r,e);o.length>0&&(e.indentAtStart=(e.indentAtStart??0)+o.length+1);let s=typeof r.stringify=="function"?r.stringify(a,e,t,n):ne.isScalar(a)?kl.stringifyString(a,e,t,n):a.toString(e,t,n);return o?ne.isScalar(a)||s[0]==="{"||s[0]==="["?`${o} ${s}`:`${o}
|
|
37
|
+
${e.indent}${s}`:s}hn.createStringifyContext=El;hn.stringify=Pl});var Ia=v(Ta=>{"use strict";var Q=C(),Aa=x(),xa=Xe(),Qe=Ke();function Al({key:i,value:e},t,n,r){let{allNullValues:a,doc:o,indent:s,indentStep:c,options:{commentString:l,indentSeq:h,simpleKeys:u}}=t,f=Q.isNode(i)&&i.comment||null;if(u){if(f)throw new Error("With simple keys, key nodes cannot have comments");if(Q.isCollection(i)||!Q.isNode(i)&&typeof i=="object"){let P="With simple keys, collection cannot be used as a key value";throw new Error(P)}}let m=!u&&(!i||f&&e==null&&!t.inFlow||Q.isCollection(i)||(Q.isScalar(i)?i.type===Aa.Scalar.BLOCK_FOLDED||i.type===Aa.Scalar.BLOCK_LITERAL:typeof i=="object"));t=Object.assign({},t,{allNullValues:!1,implicitKey:!m&&(u||!a),indent:s+c});let g=!1,d=!1,p=xa.stringify(i,t,()=>g=!0,()=>d=!0);if(!m&&!t.inFlow&&p.length>1024){if(u)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");m=!0}if(t.inFlow){if(a||e==null)return g&&n&&n(),p===""?"?":m?`? ${p}`:p}else if(a&&!u||e==null&&m)return p=`? ${p}`,f&&!g?p+=Qe.lineComment(p,t.indent,l(f)):d&&r&&r(),p;g&&(f=null),m?(f&&(p+=Qe.lineComment(p,t.indent,l(f))),p=`? ${p}
|
|
38
|
+
${s}:`):(p=`${p}:`,f&&(p+=Qe.lineComment(p,t.indent,l(f))));let w,N,b;Q.isNode(e)?(w=!!e.spaceBefore,N=e.commentBefore,b=e.comment):(w=!1,N=null,b=null,e&&typeof e=="object"&&(e=o.createNode(e))),t.implicitKey=!1,!m&&!f&&Q.isScalar(e)&&(t.indentAtStart=p.length+1),d=!1,!h&&c.length>=2&&!t.inFlow&&!m&&Q.isSeq(e)&&!e.flow&&!e.tag&&!e.anchor&&(t.indent=t.indent.substring(2));let S=!1,k=xa.stringify(e,t,()=>S=!0,()=>d=!0),E=" ";if(f||w||N){if(E=w?`
|
|
39
|
+
`:"",N){let P=l(N);E+=`
|
|
40
|
+
${Qe.indentComment(P,t.indent)}`}k===""&&!t.inFlow?E===`
|
|
41
|
+
`&&b&&(E=`
|
|
42
|
+
|
|
43
|
+
`):E+=`
|
|
44
|
+
${t.indent}`}else if(!m&&Q.isCollection(e)){let P=k[0],y=k.indexOf(`
|
|
45
|
+
`),T=y!==-1,Z=t.inFlow??e.flow??e.items.length===0;if(T||!Z){let Ce=!1;if(T&&(P==="&"||P==="!")){let I=k.indexOf(" ");P==="&"&&I!==-1&&I<y&&k[I+1]==="!"&&(I=k.indexOf(" ",I+1)),(I===-1||y<I)&&(Ce=!0)}Ce||(E=`
|
|
46
|
+
${t.indent}`)}}else(k===""||k[0]===`
|
|
47
|
+
`)&&(E="");return p+=E+k,t.inFlow?S&&n&&n():b&&!S?p+=Qe.lineComment(p,t.indent,l(b)):d&&r&&r(),p}Ta.stringifyPair=Al});var mn=v(pn=>{"use strict";var _a=_t("process");function xl(i,...e){i==="debug"&&console.log(...e)}function Tl(i,e){(i==="debug"||i==="warn")&&(typeof _a.emitWarning=="function"?_a.emitWarning(e):console.warn(e))}pn.debug=xl;pn.warn=Tl});var Xt=v(Yt=>{"use strict";var Ut=C(),Oa=x(),Kt="<<",Gt={identify:i=>i===Kt||typeof i=="symbol"&&i.description===Kt,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new Oa.Scalar(Symbol(Kt)),{addToJSMap:ja}),stringify:()=>Kt},Il=(i,e)=>(Gt.identify(e)||Ut.isScalar(e)&&(!e.type||e.type===Oa.Scalar.PLAIN)&&Gt.identify(e.value))&&i?.doc.schema.tags.some(t=>t.tag===Gt.tag&&t.default);function ja(i,e,t){let n=$a(i,t);if(Ut.isSeq(n))for(let r of n.items)vn(i,e,r);else if(Array.isArray(n))for(let r of n)vn(i,e,r);else vn(i,e,n)}function vn(i,e,t){let n=$a(i,t);if(!Ut.isMap(n))throw new Error("Merge sources must be maps or map aliases");let r=n.toJSON(null,i,Map);for(let[a,o]of r)e instanceof Map?e.has(a)||e.set(a,o):e instanceof Set?e.add(a):Object.prototype.hasOwnProperty.call(e,a)||Object.defineProperty(e,a,{value:o,writable:!0,enumerable:!0,configurable:!0});return e}function $a(i,e){return i&&Ut.isAlias(e)?e.resolve(i.doc,i):e}Yt.addMergeToJSMap=ja;Yt.isMergeKey=Il;Yt.merge=Gt});var wn=v(Ma=>{"use strict";var _l=mn(),Ha=Xt(),Ol=Xe(),La=C(),gn=ee();function jl(i,e,{key:t,value:n}){if(La.isNode(t)&&t.addToJSMap)t.addToJSMap(i,e,n);else if(Ha.isMergeKey(i,t))Ha.addMergeToJSMap(i,e,n);else{let r=gn.toJS(t,"",i);if(e instanceof Map)e.set(r,gn.toJS(n,r,i));else if(e instanceof Set)e.add(r);else{let a=$l(t,r,i),o=gn.toJS(n,a,i);a in e?Object.defineProperty(e,a,{value:o,writable:!0,enumerable:!0,configurable:!0}):e[a]=o}}return e}function $l(i,e,t){if(e===null)return"";if(typeof e!="object")return String(e);if(La.isNode(i)&&t?.doc){let n=Ol.createStringifyContext(t.doc,{});n.anchors=new Set;for(let a of t.anchors.keys())n.anchors.add(a.anchor);n.inFlow=!0,n.inStringifyKey=!0;let r=i.toString(n);if(!t.mapKeyWarned){let a=JSON.stringify(r);a.length>40&&(a=a.substring(0,36)+'..."'),_l.warn(t.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${a}. Set mapAsMap: true to use object keys.`),t.mapKeyWarned=!0}return r}return JSON.stringify(e)}Ma.addPairToJSMap=jl});var re=v(yn=>{"use strict";var Da=Je(),Hl=Ia(),Ll=wn(),Qt=C();function Ml(i,e,t){let n=Da.createNode(i,void 0,t),r=Da.createNode(e,void 0,t);return new Zt(n,r)}var Zt=class i{constructor(e,t=null){Object.defineProperty(this,Qt.NODE_TYPE,{value:Qt.PAIR}),this.key=e,this.value=t}clone(e){let{key:t,value:n}=this;return Qt.isNode(t)&&(t=t.clone(e)),Qt.isNode(n)&&(n=n.clone(e)),new i(t,n)}toJSON(e,t){let n=t?.mapAsMap?new Map:{};return Ll.addPairToJSMap(t,n,this)}toString(e,t,n){return e?.doc?Hl.stringifyPair(this,e,t,n):JSON.stringify(this)}};yn.Pair=Zt;yn.createPair=Ml});var Nn=v(Ba=>{"use strict";var me=C(),Fa=Xe(),ei=Ke();function Dl(i,e,t){return(e.inFlow??i.flow?Bl:Fl)(i,e,t)}function Fl({comment:i,items:e},t,{blockItemPrefix:n,flowChars:r,itemIndent:a,onChompKeep:o,onComment:s}){let{indent:c,options:{commentString:l}}=t,h=Object.assign({},t,{indent:a,type:null}),u=!1,f=[];for(let g=0;g<e.length;++g){let d=e[g],p=null;if(me.isNode(d))!u&&d.spaceBefore&&f.push(""),ti(t,f,d.commentBefore,u),d.comment&&(p=d.comment);else if(me.isPair(d)){let N=me.isNode(d.key)?d.key:null;N&&(!u&&N.spaceBefore&&f.push(""),ti(t,f,N.commentBefore,u))}u=!1;let w=Fa.stringify(d,h,()=>p=null,()=>u=!0);p&&(w+=ei.lineComment(w,a,l(p))),u&&p&&(u=!1),f.push(n+w)}let m;if(f.length===0)m=r.start+r.end;else{m=f[0];for(let g=1;g<f.length;++g){let d=f[g];m+=d?`
|
|
48
|
+
${c}${d}`:`
|
|
49
|
+
`}}return i?(m+=`
|
|
50
|
+
`+ei.indentComment(l(i),c),s&&s()):u&&o&&o(),m}function Bl({items:i},e,{flowChars:t,itemIndent:n}){let{indent:r,indentStep:a,flowCollectionPadding:o,options:{commentString:s}}=e;n+=a;let c=Object.assign({},e,{indent:n,inFlow:!0,type:null}),l=!1,h=0,u=[];for(let g=0;g<i.length;++g){let d=i[g],p=null;if(me.isNode(d))d.spaceBefore&&u.push(""),ti(e,u,d.commentBefore,!1),d.comment&&(p=d.comment);else if(me.isPair(d)){let N=me.isNode(d.key)?d.key:null;N&&(N.spaceBefore&&u.push(""),ti(e,u,N.commentBefore,!1),N.comment&&(l=!0));let b=me.isNode(d.value)?d.value:null;b?(b.comment&&(p=b.comment),b.commentBefore&&(l=!0)):d.value==null&&N?.comment&&(p=N.comment)}p&&(l=!0);let w=Fa.stringify(d,c,()=>p=null);l||(l=u.length>h||w.includes(`
|
|
51
|
+
`)),g<i.length-1?w+=",":e.options.trailingComma&&(e.options.lineWidth>0&&(l||(l=u.reduce((N,b)=>N+b.length+2,2)+(w.length+2)>e.options.lineWidth)),l&&(w+=",")),p&&(w+=ei.lineComment(w,n,s(p))),u.push(w),h=u.length}let{start:f,end:m}=t;if(u.length===0)return f+m;if(!l){let g=u.reduce((d,p)=>d+p.length+2,2);l=e.options.lineWidth>0&&g>e.options.lineWidth}if(l){let g=f;for(let d of u)g+=d?`
|
|
52
|
+
${a}${r}${d}`:`
|
|
53
|
+
`;return`${g}
|
|
54
|
+
${r}${m}`}else return`${f}${o}${u.join(" ")}${o}${m}`}function ti({indent:i,options:{commentString:e}},t,n,r){if(n&&r&&(n=n.replace(/^\n+/,"")),n){let a=ei.indentComment(e(n),i);t.push(a.trimStart())}}Ba.stringifyCollection=Dl});var oe=v(Sn=>{"use strict";var ql=Nn(),Vl=wn(),zl=Bt(),ae=C(),ii=re(),Wl=x();function Ze(i,e){let t=ae.isScalar(e)?e.value:e;for(let n of i)if(ae.isPair(n)&&(n.key===e||n.key===t||ae.isScalar(n.key)&&n.key.value===t))return n}var bn=class extends zl.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(ae.MAP,e),this.items=[]}static from(e,t,n){let{keepUndefined:r,replacer:a}=n,o=new this(e),s=(c,l)=>{if(typeof a=="function")l=a.call(t,c,l);else if(Array.isArray(a)&&!a.includes(c))return;(l!==void 0||r)&&o.items.push(ii.createPair(c,l,n))};if(t instanceof Map)for(let[c,l]of t)s(c,l);else if(t&&typeof t=="object")for(let c of Object.keys(t))s(c,t[c]);return typeof e.sortMapEntries=="function"&&o.items.sort(e.sortMapEntries),o}add(e,t){let n;ae.isPair(e)?n=e:!e||typeof e!="object"||!("key"in e)?n=new ii.Pair(e,e?.value):n=new ii.Pair(e.key,e.value);let r=Ze(this.items,n.key),a=this.schema?.sortMapEntries;if(r){if(!t)throw new Error(`Key ${n.key} already set`);ae.isScalar(r.value)&&Wl.isScalarValue(n.value)?r.value.value=n.value:r.value=n.value}else if(a){let o=this.items.findIndex(s=>a(n,s)<0);o===-1?this.items.push(n):this.items.splice(o,0,n)}else this.items.push(n)}delete(e){let t=Ze(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let r=Ze(this.items,e)?.value;return(!t&&ae.isScalar(r)?r.value:r)??void 0}has(e){return!!Ze(this.items,e)}set(e,t){this.add(new ii.Pair(e,t),!0)}toJSON(e,t,n){let r=n?new n:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(r);for(let a of this.items)Vl.addPairToJSMap(t,r,a);return r}toString(e,t,n){if(!e)return JSON.stringify(this);for(let r of this.items)if(!ae.isPair(r))throw new Error(`Map items must all be pairs; found ${JSON.stringify(r)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),ql.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:n,onComment:t})}};Sn.YAMLMap=bn;Sn.findPair=Ze});var Te=v(Va=>{"use strict";var Jl=C(),qa=oe(),Kl={collection:"map",default:!0,nodeClass:qa.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(i,e){return Jl.isMap(i)||e("Expected a mapping for this tag"),i},createNode:(i,e,t)=>qa.YAMLMap.from(i,e,t)};Va.map=Kl});var se=v(za=>{"use strict";var Gl=Je(),Ul=Nn(),Yl=Bt(),ri=C(),Xl=x(),Ql=ee(),kn=class extends Yl.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(ri.SEQ,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=ni(e);return typeof t!="number"?!1:this.items.splice(t,1).length>0}get(e,t){let n=ni(e);if(typeof n!="number")return;let r=this.items[n];return!t&&ri.isScalar(r)?r.value:r}has(e){let t=ni(e);return typeof t=="number"&&t<this.items.length}set(e,t){let n=ni(e);if(typeof n!="number")throw new Error(`Expected a valid index, not ${e}.`);let r=this.items[n];ri.isScalar(r)&&Xl.isScalarValue(t)?r.value=t:this.items[n]=t}toJSON(e,t){let n=[];t?.onCreate&&t.onCreate(n);let r=0;for(let a of this.items)n.push(Ql.toJS(a,String(r++),t));return n}toString(e,t,n){return e?Ul.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:n,onComment:t}):JSON.stringify(this)}static from(e,t,n){let{replacer:r}=n,a=new this(e);if(t&&Symbol.iterator in Object(t)){let o=0;for(let s of t){if(typeof r=="function"){let c=t instanceof Set?s:String(o++);s=r.call(t,c,s)}a.items.push(Gl.createNode(s,void 0,n))}}return a}};function ni(i){let e=ri.isScalar(i)?i.value:i;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}za.YAMLSeq=kn});var Ie=v(Ja=>{"use strict";var Zl=C(),Wa=se(),eu={collection:"seq",default:!0,nodeClass:Wa.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(i,e){return Zl.isSeq(i)||e("Expected a sequence for this tag"),i},createNode:(i,e,t)=>Wa.YAMLSeq.from(i,e,t)};Ja.seq=eu});var et=v(Ka=>{"use strict";var tu=Ye(),iu={identify:i=>typeof i=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:i=>i,stringify(i,e,t,n){return e=Object.assign({actualString:!0},e),tu.stringifyString(i,e,t,n)}};Ka.string=iu});var ai=v(Ya=>{"use strict";var Ga=x(),Ua={identify:i=>i==null,createNode:()=>new Ga.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new Ga.Scalar(null),stringify:({source:i},e)=>typeof i=="string"&&Ua.test.test(i)?i:e.options.nullStr};Ya.nullTag=Ua});var En=v(Qa=>{"use strict";var nu=x(),Xa={identify:i=>typeof i=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:i=>new nu.Scalar(i[0]==="t"||i[0]==="T"),stringify({source:i,value:e},t){if(i&&Xa.test.test(i)){let n=i[0]==="t"||i[0]==="T";if(e===n)return i}return e?t.options.trueStr:t.options.falseStr}};Qa.boolTag=Xa});var _e=v(Za=>{"use strict";function ru({format:i,minFractionDigits:e,tag:t,value:n}){if(typeof n=="bigint")return String(n);let r=typeof n=="number"?n:Number(n);if(!isFinite(r))return isNaN(r)?".nan":r<0?"-.inf":".inf";let a=Object.is(n,-0)?"-0":JSON.stringify(n);if(!i&&e&&(!t||t==="tag:yaml.org,2002:float")&&/^-?\d/.test(a)&&!a.includes("e")){let o=a.indexOf(".");o<0&&(o=a.length,a+=".");let s=e-(a.length-o-1);for(;s-- >0;)a+="0"}return a}Za.stringifyNumber=ru});var Rn=v(oi=>{"use strict";var au=x(),Cn=_e(),ou={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:i=>i.slice(-3).toLowerCase()==="nan"?NaN:i[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Cn.stringifyNumber},su={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:i=>parseFloat(i),stringify(i){let e=Number(i.value);return isFinite(e)?e.toExponential():Cn.stringifyNumber(i)}},cu={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(i){let e=new au.Scalar(parseFloat(i)),t=i.indexOf(".");return t!==-1&&i[i.length-1]==="0"&&(e.minFractionDigits=i.length-t-1),e},stringify:Cn.stringifyNumber};oi.float=cu;oi.floatExp=su;oi.floatNaN=ou});var An=v(ci=>{"use strict";var eo=_e(),si=i=>typeof i=="bigint"||Number.isInteger(i),Pn=(i,e,t,{intAsBigInt:n})=>n?BigInt(i):parseInt(i.substring(e),t);function to(i,e,t){let{value:n}=i;return si(n)&&n>=0?t+n.toString(e):eo.stringifyNumber(i)}var lu={identify:i=>si(i)&&i>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(i,e,t)=>Pn(i,2,8,t),stringify:i=>to(i,8,"0o")},uu={identify:si,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(i,e,t)=>Pn(i,0,10,t),stringify:eo.stringifyNumber},fu={identify:i=>si(i)&&i>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(i,e,t)=>Pn(i,2,16,t),stringify:i=>to(i,16,"0x")};ci.int=uu;ci.intHex=fu;ci.intOct=lu});var no=v(io=>{"use strict";var du=Te(),hu=ai(),pu=Ie(),mu=et(),vu=En(),xn=Rn(),Tn=An(),gu=[du.map,pu.seq,mu.string,hu.nullTag,vu.boolTag,Tn.intOct,Tn.int,Tn.intHex,xn.floatNaN,xn.floatExp,xn.float];io.schema=gu});var oo=v(ao=>{"use strict";var wu=x(),yu=Te(),Nu=Ie();function ro(i){return typeof i=="bigint"||Number.isInteger(i)}var li=({value:i})=>JSON.stringify(i),bu=[{identify:i=>typeof i=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:i=>i,stringify:li},{identify:i=>i==null,createNode:()=>new wu.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:li},{identify:i=>typeof i=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:i=>i==="true",stringify:li},{identify:ro,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(i,e,{intAsBigInt:t})=>t?BigInt(i):parseInt(i,10),stringify:({value:i})=>ro(i)?i.toString():JSON.stringify(i)},{identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:i=>parseFloat(i),stringify:li}],Su={default:!0,tag:"",test:/^/,resolve(i,e){return e(`Unresolved plain scalar ${JSON.stringify(i)}`),i}},ku=[yu.map,Nu.seq].concat(bu,Su);ao.schema=ku});var _n=v(so=>{"use strict";var tt=_t("buffer"),In=x(),Eu=Ye(),Cu={identify:i=>i instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(i,e){if(typeof tt.Buffer=="function")return tt.Buffer.from(i,"base64");if(typeof atob=="function"){let t=atob(i.replace(/[\n\r]/g,"")),n=new Uint8Array(t.length);for(let r=0;r<t.length;++r)n[r]=t.charCodeAt(r);return n}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),i},stringify({comment:i,type:e,value:t},n,r,a){if(!t)return"";let o=t,s;if(typeof tt.Buffer=="function")s=o instanceof tt.Buffer?o.toString("base64"):tt.Buffer.from(o.buffer).toString("base64");else if(typeof btoa=="function"){let c="";for(let l=0;l<o.length;++l)c+=String.fromCharCode(o[l]);s=btoa(c)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e??(e=In.Scalar.BLOCK_LITERAL),e!==In.Scalar.QUOTE_DOUBLE){let c=Math.max(n.options.lineWidth-n.indent.length,n.options.minContentWidth),l=Math.ceil(s.length/c),h=new Array(l);for(let u=0,f=0;u<l;++u,f+=c)h[u]=s.substr(f,c);s=h.join(e===In.Scalar.BLOCK_LITERAL?`
|
|
55
|
+
`:" ")}return Eu.stringifyString({comment:i,type:e,value:s},n,r,a)}};so.binary=Cu});var di=v(fi=>{"use strict";var ui=C(),On=re(),Ru=x(),Pu=se();function co(i,e){if(ui.isSeq(i))for(let t=0;t<i.items.length;++t){let n=i.items[t];if(!ui.isPair(n)){if(ui.isMap(n)){n.items.length>1&&e("Each pair must have its own sequence indicator");let r=n.items[0]||new On.Pair(new Ru.Scalar(null));if(n.commentBefore&&(r.key.commentBefore=r.key.commentBefore?`${n.commentBefore}
|
|
56
|
+
${r.key.commentBefore}`:n.commentBefore),n.comment){let a=r.value??r.key;a.comment=a.comment?`${n.comment}
|
|
57
|
+
${a.comment}`:n.comment}n=r}i.items[t]=ui.isPair(n)?n:new On.Pair(n)}}else e("Expected a sequence for this tag");return i}function lo(i,e,t){let{replacer:n}=t,r=new Pu.YAMLSeq(i);r.tag="tag:yaml.org,2002:pairs";let a=0;if(e&&Symbol.iterator in Object(e))for(let o of e){typeof n=="function"&&(o=n.call(e,String(a++),o));let s,c;if(Array.isArray(o))if(o.length===2)s=o[0],c=o[1];else throw new TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){let l=Object.keys(o);if(l.length===1)s=l[0],c=o[s];else throw new TypeError(`Expected tuple with one key, not ${l.length} keys`)}else s=o;r.items.push(On.createPair(s,c,t))}return r}var Au={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:co,createNode:lo};fi.createPairs=lo;fi.pairs=Au;fi.resolvePairs=co});var Hn=v($n=>{"use strict";var uo=C(),jn=ee(),it=oe(),xu=se(),fo=di(),ve=class i extends xu.YAMLSeq{constructor(){super(),this.add=it.YAMLMap.prototype.add.bind(this),this.delete=it.YAMLMap.prototype.delete.bind(this),this.get=it.YAMLMap.prototype.get.bind(this),this.has=it.YAMLMap.prototype.has.bind(this),this.set=it.YAMLMap.prototype.set.bind(this),this.tag=i.tag}toJSON(e,t){if(!t)return super.toJSON(e);let n=new Map;t?.onCreate&&t.onCreate(n);for(let r of this.items){let a,o;if(uo.isPair(r)?(a=jn.toJS(r.key,"",t),o=jn.toJS(r.value,a,t)):a=jn.toJS(r,"",t),n.has(a))throw new Error("Ordered maps must not include duplicate keys");n.set(a,o)}return n}static from(e,t,n){let r=fo.createPairs(e,t,n),a=new this;return a.items=r.items,a}};ve.tag="tag:yaml.org,2002:omap";var Tu={collection:"seq",identify:i=>i instanceof Map,nodeClass:ve,default:!1,tag:"tag:yaml.org,2002:omap",resolve(i,e){let t=fo.resolvePairs(i,e),n=[];for(let{key:r}of t.items)uo.isScalar(r)&&(n.includes(r.value)?e(`Ordered maps must not include duplicate keys: ${r.value}`):n.push(r.value));return Object.assign(new ve,t)},createNode:(i,e,t)=>ve.from(i,e,t)};$n.YAMLOMap=ve;$n.omap=Tu});var go=v(Ln=>{"use strict";var ho=x();function po({value:i,source:e},t){return e&&(i?mo:vo).test.test(e)?e:i?t.options.trueStr:t.options.falseStr}var mo={identify:i=>i===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new ho.Scalar(!0),stringify:po},vo={identify:i=>i===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new ho.Scalar(!1),stringify:po};Ln.falseTag=vo;Ln.trueTag=mo});var wo=v(hi=>{"use strict";var Iu=x(),Mn=_e(),_u={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:i=>i.slice(-3).toLowerCase()==="nan"?NaN:i[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Mn.stringifyNumber},Ou={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:i=>parseFloat(i.replace(/_/g,"")),stringify(i){let e=Number(i.value);return isFinite(e)?e.toExponential():Mn.stringifyNumber(i)}},ju={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(i){let e=new Iu.Scalar(parseFloat(i.replace(/_/g,""))),t=i.indexOf(".");if(t!==-1){let n=i.substring(t+1).replace(/_/g,"");n[n.length-1]==="0"&&(e.minFractionDigits=n.length)}return e},stringify:Mn.stringifyNumber};hi.float=ju;hi.floatExp=Ou;hi.floatNaN=_u});var No=v(rt=>{"use strict";var yo=_e(),nt=i=>typeof i=="bigint"||Number.isInteger(i);function pi(i,e,t,{intAsBigInt:n}){let r=i[0];if((r==="-"||r==="+")&&(e+=1),i=i.substring(e).replace(/_/g,""),n){switch(t){case 2:i=`0b${i}`;break;case 8:i=`0o${i}`;break;case 16:i=`0x${i}`;break}let o=BigInt(i);return r==="-"?BigInt(-1)*o:o}let a=parseInt(i,t);return r==="-"?-1*a:a}function Dn(i,e,t){let{value:n}=i;if(nt(n)){let r=n.toString(e);return n<0?"-"+t+r.substr(1):t+r}return yo.stringifyNumber(i)}var $u={identify:nt,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(i,e,t)=>pi(i,2,2,t),stringify:i=>Dn(i,2,"0b")},Hu={identify:nt,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(i,e,t)=>pi(i,1,8,t),stringify:i=>Dn(i,8,"0")},Lu={identify:nt,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(i,e,t)=>pi(i,0,10,t),stringify:yo.stringifyNumber},Mu={identify:nt,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(i,e,t)=>pi(i,2,16,t),stringify:i=>Dn(i,16,"0x")};rt.int=Lu;rt.intBin=$u;rt.intHex=Mu;rt.intOct=Hu});var Bn=v(Fn=>{"use strict";var gi=C(),mi=re(),vi=oe(),ge=class i extends vi.YAMLMap{constructor(e){super(e),this.tag=i.tag}add(e){let t;gi.isPair(e)?t=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?t=new mi.Pair(e.key,null):t=new mi.Pair(e,null),vi.findPair(this.items,t.key)||this.items.push(t)}get(e,t){let n=vi.findPair(this.items,e);return!t&&gi.isPair(n)?gi.isScalar(n.key)?n.key.value:n.key:n}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 n=vi.findPair(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new mi.Pair(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw new Error("Set items must all have null values")}static from(e,t,n){let{replacer:r}=n,a=new this(e);if(t&&Symbol.iterator in Object(t))for(let o of t)typeof r=="function"&&(o=r.call(t,o,o)),a.items.push(mi.createPair(o,null,n));return a}};ge.tag="tag:yaml.org,2002:set";var Du={collection:"map",identify:i=>i instanceof Set,nodeClass:ge,default:!1,tag:"tag:yaml.org,2002:set",createNode:(i,e,t)=>ge.from(i,e,t),resolve(i,e){if(gi.isMap(i)){if(i.hasAllNullValues(!0))return Object.assign(new ge,i);e("Set items must all have null values")}else e("Expected a mapping for this tag");return i}};Fn.YAMLSet=ge;Fn.set=Du});var Vn=v(wi=>{"use strict";var Fu=_e();function qn(i,e){let t=i[0],n=t==="-"||t==="+"?i.substring(1):i,r=o=>e?BigInt(o):Number(o),a=n.replace(/_/g,"").split(":").reduce((o,s)=>o*r(60)+r(s),r(0));return t==="-"?r(-1)*a:a}function bo(i){let{value:e}=i,t=o=>o;if(typeof e=="bigint")t=o=>BigInt(o);else if(isNaN(e)||!isFinite(e))return Fu.stringifyNumber(i);let n="";e<0&&(n="-",e*=t(-1));let r=t(60),a=[e%r];return e<60?a.unshift(0):(e=(e-a[0])/r,a.unshift(e%r),e>=60&&(e=(e-a[0])/r,a.unshift(e))),n+a.map(o=>String(o).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var Bu={identify:i=>typeof i=="bigint"||Number.isInteger(i),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(i,e,{intAsBigInt:t})=>qn(i,t),stringify:bo},qu={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:i=>qn(i,!1),stringify:bo},So={identify:i=>i 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(i){let e=i.match(So.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,t,n,r,a,o,s]=e.map(Number),c=e[7]?Number((e[7]+"00").substr(1,3)):0,l=Date.UTC(t,n-1,r,a||0,o||0,s||0,c),h=e[8];if(h&&h!=="Z"){let u=qn(h,!1);Math.abs(u)<30&&(u*=60),l-=6e4*u}return new Date(l)},stringify:({value:i})=>i?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};wi.floatTime=qu;wi.intTime=Bu;wi.timestamp=So});var Co=v(Eo=>{"use strict";var Vu=Te(),zu=ai(),Wu=Ie(),Ju=et(),Ku=_n(),ko=go(),zn=wo(),yi=No(),Gu=Xt(),Uu=Hn(),Yu=di(),Xu=Bn(),Wn=Vn(),Qu=[Vu.map,Wu.seq,Ju.string,zu.nullTag,ko.trueTag,ko.falseTag,yi.intBin,yi.intOct,yi.int,yi.intHex,zn.floatNaN,zn.floatExp,zn.float,Ku.binary,Gu.merge,Uu.omap,Yu.pairs,Xu.set,Wn.intTime,Wn.floatTime,Wn.timestamp];Eo.schema=Qu});var $o=v(Gn=>{"use strict";var xo=Te(),Zu=ai(),To=Ie(),ef=et(),tf=En(),Jn=Rn(),Kn=An(),nf=no(),rf=oo(),Io=_n(),at=Xt(),_o=Hn(),Oo=di(),Ro=Co(),jo=Bn(),Ni=Vn(),Po=new Map([["core",nf.schema],["failsafe",[xo.map,To.seq,ef.string]],["json",rf.schema],["yaml11",Ro.schema],["yaml-1.1",Ro.schema]]),Ao={binary:Io.binary,bool:tf.boolTag,float:Jn.float,floatExp:Jn.floatExp,floatNaN:Jn.floatNaN,floatTime:Ni.floatTime,int:Kn.int,intHex:Kn.intHex,intOct:Kn.intOct,intTime:Ni.intTime,map:xo.map,merge:at.merge,null:Zu.nullTag,omap:_o.omap,pairs:Oo.pairs,seq:To.seq,set:jo.set,timestamp:Ni.timestamp},af={"tag:yaml.org,2002:binary":Io.binary,"tag:yaml.org,2002:merge":at.merge,"tag:yaml.org,2002:omap":_o.omap,"tag:yaml.org,2002:pairs":Oo.pairs,"tag:yaml.org,2002:set":jo.set,"tag:yaml.org,2002:timestamp":Ni.timestamp};function of(i,e,t){let n=Po.get(e);if(n&&!i)return t&&!n.includes(at.merge)?n.concat(at.merge):n.slice();let r=n;if(!r)if(Array.isArray(i))r=[];else{let a=Array.from(Po.keys()).filter(o=>o!=="yaml11").map(o=>JSON.stringify(o)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${a} or define customTags array`)}if(Array.isArray(i))for(let a of i)r=r.concat(a);else typeof i=="function"&&(r=i(r.slice()));return t&&(r=r.concat(at.merge)),r.reduce((a,o)=>{let s=typeof o=="string"?Ao[o]:o;if(!s){let c=JSON.stringify(o),l=Object.keys(Ao).map(h=>JSON.stringify(h)).join(", ");throw new Error(`Unknown custom tag ${c}; use one of ${l}`)}return a.includes(s)||a.push(s),a},[])}Gn.coreKnownTags=af;Gn.getTags=of});var Xn=v(Ho=>{"use strict";var Un=C(),sf=Te(),cf=Ie(),lf=et(),bi=$o(),uf=(i,e)=>i.key<e.key?-1:i.key>e.key?1:0,Yn=class i{constructor({compat:e,customTags:t,merge:n,resolveKnownTags:r,schema:a,sortMapEntries:o,toStringDefaults:s}){this.compat=Array.isArray(e)?bi.getTags(e,"compat"):e?bi.getTags(null,e):null,this.name=typeof a=="string"&&a||"core",this.knownTags=r?bi.coreKnownTags:{},this.tags=bi.getTags(t,this.name,n),this.toStringOptions=s??null,Object.defineProperty(this,Un.MAP,{value:sf.map}),Object.defineProperty(this,Un.SCALAR,{value:lf.string}),Object.defineProperty(this,Un.SEQ,{value:cf.seq}),this.sortMapEntries=typeof o=="function"?o:o===!0?uf:null}clone(){let e=Object.create(i.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}};Ho.Schema=Yn});var Mo=v(Lo=>{"use strict";var ff=C(),Qn=Xe(),ot=Ke();function df(i,e){let t=[],n=e.directives===!0;if(e.directives!==!1&&i.directives){let c=i.directives.toString(i);c?(t.push(c),n=!0):i.directives.docStart&&(n=!0)}n&&t.push("---");let r=Qn.createStringifyContext(i,e),{commentString:a}=r.options;if(i.commentBefore){t.length!==1&&t.unshift("");let c=a(i.commentBefore);t.unshift(ot.indentComment(c,""))}let o=!1,s=null;if(i.contents){if(ff.isNode(i.contents)){if(i.contents.spaceBefore&&n&&t.push(""),i.contents.commentBefore){let h=a(i.contents.commentBefore);t.push(ot.indentComment(h,""))}r.forceBlockIndent=!!i.comment,s=i.contents.comment}let c=s?void 0:()=>o=!0,l=Qn.stringify(i.contents,r,()=>s=null,c);s&&(l+=ot.lineComment(l,"",a(s))),(l[0]==="|"||l[0]===">")&&t[t.length-1]==="---"?t[t.length-1]=`--- ${l}`:t.push(l)}else t.push(Qn.stringify(i.contents,r));if(i.directives?.docEnd)if(i.comment){let c=a(i.comment);c.includes(`
|
|
58
|
+
`)?(t.push("..."),t.push(ot.indentComment(c,""))):t.push(`... ${c}`)}else t.push("...");else{let c=i.comment;c&&o&&(c=c.replace(/^\n+/,"")),c&&((!o||s)&&t[t.length-1]!==""&&t.push(""),t.push(ot.indentComment(a(c),"")))}return t.join(`
|
|
59
|
+
`)+`
|
|
60
|
+
`}Lo.stringifyDocument=df});var st=v(Do=>{"use strict";var hf=We(),Oe=Bt(),F=C(),pf=re(),mf=ee(),vf=Xn(),gf=Mo(),Zn=Lt(),wf=nn(),yf=Je(),er=tn(),tr=class i{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,F.NODE_TYPE,{value:F.DOC});let r=null;typeof t=="function"||Array.isArray(t)?r=t:n===void 0&&t&&(n=t,t=void 0);let a=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},n);this.options=a;let{version:o}=a;n?._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new er.Directives({version:o}),this.setSchema(o,n),this.contents=e===void 0?null:this.createNode(e,r,n)}clone(){let e=Object.create(i.prototype,{[F.NODE_TYPE]:{value:F.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=F.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){je(this.contents)&&this.contents.add(e)}addIn(e,t){je(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let n=Zn.anchorNames(this);e.anchor=!t||n.has(t)?Zn.findNewAnchor(t||"a",n):t}return new hf.Alias(e.anchor)}createNode(e,t,n){let r;if(typeof t=="function")e=t.call({"":e},"",e),r=t;else if(Array.isArray(t)){let p=N=>typeof N=="number"||N instanceof String||N instanceof Number,w=t.filter(p).map(String);w.length>0&&(t=t.concat(w)),r=t}else n===void 0&&t&&(n=t,t=void 0);let{aliasDuplicateObjects:a,anchorPrefix:o,flow:s,keepUndefined:c,onTagObj:l,tag:h}=n??{},{onAnchor:u,setAnchors:f,sourceObjects:m}=Zn.createNodeAnchors(this,o||"a"),g={aliasDuplicateObjects:a??!0,keepUndefined:c??!1,onAnchor:u,onTagObj:l,replacer:r,schema:this.schema,sourceObjects:m},d=yf.createNode(e,h,g);return s&&F.isCollection(d)&&(d.flow=!0),f(),d}createPair(e,t,n={}){let r=this.createNode(e,null,n),a=this.createNode(t,null,n);return new pf.Pair(r,a)}delete(e){return je(this.contents)?this.contents.delete(e):!1}deleteIn(e){return Oe.isEmptyPath(e)?this.contents==null?!1:(this.contents=null,!0):je(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return F.isCollection(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return Oe.isEmptyPath(e)?!t&&F.isScalar(this.contents)?this.contents.value:this.contents:F.isCollection(this.contents)?this.contents.getIn(e,t):void 0}has(e){return F.isCollection(this.contents)?this.contents.has(e):!1}hasIn(e){return Oe.isEmptyPath(e)?this.contents!==void 0:F.isCollection(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=Oe.collectionFromPath(this.schema,[e],t):je(this.contents)&&this.contents.set(e,t)}setIn(e,t){Oe.isEmptyPath(e)?this.contents=t:this.contents==null?this.contents=Oe.collectionFromPath(this.schema,Array.from(e),t):je(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e=="number"&&(e=String(e));let n;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new er.Directives({version:"1.1"}),n={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new er.Directives({version:e}),n={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,n=null;break;default:{let r=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${r}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(n)this.schema=new vf.Schema(Object.assign(n,t));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:r,onAnchor:a,reviver:o}={}){let s={anchors:new Map,doc:this,keep:!e,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},c=mf.toJS(this.contents,t??"",s);if(typeof a=="function")for(let{count:l,res:h}of s.anchors.values())a(h,l);return typeof o=="function"?wf.applyReviver(o,{"":c},"",c):c}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 gf.stringifyDocument(this,e)}};function je(i){if(F.isCollection(i))return!0;throw new Error("Expected a YAML collection as document contents")}Do.Document=tr});var ut=v(lt=>{"use strict";var ct=class extends Error{constructor(e,t,n,r){super(),this.name=e,this.code=n,this.message=r,this.pos=t}},ir=class extends ct{constructor(e,t,n){super("YAMLParseError",e,t,n)}},nr=class extends ct{constructor(e,t,n){super("YAMLWarning",e,t,n)}},Nf=(i,e)=>t=>{if(t.pos[0]===-1)return;t.linePos=t.pos.map(s=>e.linePos(s));let{line:n,col:r}=t.linePos[0];t.message+=` at line ${n}, column ${r}`;let a=r-1,o=i.substring(e.lineStarts[n-1],e.lineStarts[n]).replace(/[\n\r]+$/,"");if(a>=60&&o.length>80){let s=Math.min(a-39,o.length-79);o="…"+o.substring(s),a-=s-1}if(o.length>80&&(o=o.substring(0,79)+"…"),n>1&&/^ *$/.test(o.substring(0,a))){let s=i.substring(e.lineStarts[n-2],e.lineStarts[n-1]);s.length>80&&(s=s.substring(0,79)+`…
|
|
61
|
+
`),o=s+o}if(/[^ ]/.test(o)){let s=1,c=t.linePos[1];c?.line===n&&c.col>r&&(s=Math.max(1,Math.min(c.col-r,80-a)));let l=" ".repeat(a)+"^".repeat(s);t.message+=`:
|
|
62
|
+
|
|
63
|
+
${o}
|
|
64
|
+
${l}
|
|
65
|
+
`}};lt.YAMLError=ct;lt.YAMLParseError=ir;lt.YAMLWarning=nr;lt.prettifyError=Nf});var ft=v(Fo=>{"use strict";function bf(i,{flow:e,indicator:t,next:n,offset:r,onError:a,parentIndent:o,startOnNewline:s}){let c=!1,l=s,h=s,u="",f="",m=!1,g=!1,d=null,p=null,w=null,N=null,b=null,S=null,k=null;for(let y of i)switch(g&&(y.type!=="space"&&y.type!=="newline"&&y.type!=="comma"&&a(y.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),g=!1),d&&(l&&y.type!=="comment"&&y.type!=="newline"&&a(d,"TAB_AS_INDENT","Tabs are not allowed as indentation"),d=null),y.type){case"space":!e&&(t!=="doc-start"||n?.type!=="flow-collection")&&y.source.includes(" ")&&(d=y),h=!0;break;case"comment":{h||a(y,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let T=y.source.substring(1)||" ";u?u+=f+T:u=T,f="",l=!1;break}case"newline":l?u?u+=y.source:(!S||t!=="seq-item-ind")&&(c=!0):f+=y.source,l=!0,m=!0,(p||w)&&(N=y),h=!0;break;case"anchor":p&&a(y,"MULTIPLE_ANCHORS","A node can have at most one anchor"),y.source.endsWith(":")&&a(y.offset+y.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),p=y,k??(k=y.offset),l=!1,h=!1,g=!0;break;case"tag":{w&&a(y,"MULTIPLE_TAGS","A node can have at most one tag"),w=y,k??(k=y.offset),l=!1,h=!1,g=!0;break}case t:(p||w)&&a(y,"BAD_PROP_ORDER",`Anchors and tags must be after the ${y.source} indicator`),S&&a(y,"UNEXPECTED_TOKEN",`Unexpected ${y.source} in ${e??"collection"}`),S=y,l=t==="seq-item-ind"||t==="explicit-key-ind",h=!1;break;case"comma":if(e){b&&a(y,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),b=y,l=!1,h=!1;break}default:a(y,"UNEXPECTED_TOKEN",`Unexpected ${y.type} token`),l=!1,h=!1}let E=i[i.length-1],P=E?E.offset+E.source.length:r;return g&&n&&n.type!=="space"&&n.type!=="newline"&&n.type!=="comma"&&(n.type!=="scalar"||n.source!=="")&&a(n.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),d&&(l&&d.indent<=o||n?.type==="block-map"||n?.type==="block-seq")&&a(d,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:b,found:S,spaceBefore:c,comment:u,hasNewline:m,anchor:p,tag:w,newlineAfterProp:N,end:P,start:k??P}}Fo.resolveProps=bf});var Si=v(Bo=>{"use strict";function rr(i){if(!i)return null;switch(i.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(i.source.includes(`
|
|
66
|
+
`))return!0;if(i.end){for(let e of i.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(let e of i.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(rr(e.key)||rr(e.value))return!0}return!1;default:return!0}}Bo.containsNewline=rr});var ar=v(qo=>{"use strict";var Sf=Si();function kf(i,e,t){if(e?.type==="flow-collection"){let n=e.end[0];n.indent===i&&(n.source==="]"||n.source==="}")&&Sf.containsNewline(e)&&t(n,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}qo.flowIndentCheck=kf});var or=v(zo=>{"use strict";var Vo=C();function Ef(i,e,t){let{uniqueKeys:n}=i.options;if(n===!1)return!1;let r=typeof n=="function"?n:(a,o)=>a===o||Vo.isScalar(a)&&Vo.isScalar(o)&&a.value===o.value;return e.some(a=>r(a.key,t))}zo.mapIncludes=Ef});var Yo=v(Uo=>{"use strict";var Wo=re(),Cf=oe(),Jo=ft(),Rf=Si(),Ko=ar(),Pf=or(),Go="All mapping items must start at the same column";function Af({composeNode:i,composeEmptyNode:e},t,n,r,a){let o=a?.nodeClass??Cf.YAMLMap,s=new o(t.schema);t.atRoot&&(t.atRoot=!1);let c=n.offset,l=null;for(let h of n.items){let{start:u,key:f,sep:m,value:g}=h,d=Jo.resolveProps(u,{indicator:"explicit-key-ind",next:f??m?.[0],offset:c,onError:r,parentIndent:n.indent,startOnNewline:!0}),p=!d.found;if(p){if(f&&(f.type==="block-seq"?r(c,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in f&&f.indent!==n.indent&&r(c,"BAD_INDENT",Go)),!d.anchor&&!d.tag&&!m){l=d.end,d.comment&&(s.comment?s.comment+=`
|
|
67
|
+
`+d.comment:s.comment=d.comment);continue}(d.newlineAfterProp||Rf.containsNewline(f))&&r(f??u[u.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else d.found?.indent!==n.indent&&r(c,"BAD_INDENT",Go);t.atKey=!0;let w=d.end,N=f?i(t,f,d,r):e(t,w,u,null,d,r);t.schema.compat&&Ko.flowIndentCheck(n.indent,f,r),t.atKey=!1,Pf.mapIncludes(t,s.items,N)&&r(w,"DUPLICATE_KEY","Map keys must be unique");let b=Jo.resolveProps(m??[],{indicator:"map-value-ind",next:g,offset:N.range[2],onError:r,parentIndent:n.indent,startOnNewline:!f||f.type==="block-scalar"});if(c=b.end,b.found){p&&(g?.type==="block-map"&&!b.hasNewline&&r(c,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),t.options.strict&&d.start<b.found.offset-1024&&r(N.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let S=g?i(t,g,b,r):e(t,c,m,null,b,r);t.schema.compat&&Ko.flowIndentCheck(n.indent,g,r),c=S.range[2];let k=new Wo.Pair(N,S);t.options.keepSourceTokens&&(k.srcToken=h),s.items.push(k)}else{p&&r(N.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),b.comment&&(N.comment?N.comment+=`
|
|
68
|
+
`+b.comment:N.comment=b.comment);let S=new Wo.Pair(N);t.options.keepSourceTokens&&(S.srcToken=h),s.items.push(S)}}return l&&l<c&&r(l,"IMPOSSIBLE","Map comment with trailing content"),s.range=[n.offset,c,l??c],s}Uo.resolveBlockMap=Af});var Qo=v(Xo=>{"use strict";var xf=se(),Tf=ft(),If=ar();function _f({composeNode:i,composeEmptyNode:e},t,n,r,a){let o=a?.nodeClass??xf.YAMLSeq,s=new o(t.schema);t.atRoot&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let c=n.offset,l=null;for(let{start:h,value:u}of n.items){let f=Tf.resolveProps(h,{indicator:"seq-item-ind",next:u,offset:c,onError:r,parentIndent:n.indent,startOnNewline:!0});if(!f.found)if(f.anchor||f.tag||u)u?.type==="block-seq"?r(f.end,"BAD_INDENT","All sequence items must start at the same column"):r(c,"MISSING_CHAR","Sequence item without - indicator");else{l=f.end,f.comment&&(s.comment=f.comment);continue}let m=u?i(t,u,f,r):e(t,f.end,h,null,f,r);t.schema.compat&&If.flowIndentCheck(n.indent,u,r),c=m.range[2],s.items.push(m)}return s.range=[n.offset,c,l??c],s}Xo.resolveBlockSeq=_f});var $e=v(Zo=>{"use strict";function Of(i,e,t,n){let r="";if(i){let a=!1,o="";for(let s of i){let{source:c,type:l}=s;switch(l){case"space":a=!0;break;case"comment":{t&&!a&&n(s,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let h=c.substring(1)||" ";r?r+=o+h:r=h,o="";break}case"newline":r&&(o+=c),a=!0;break;default:n(s,"UNEXPECTED_TOKEN",`Unexpected ${l} at node end`)}e+=c.length}}return{comment:r,offset:e}}Zo.resolveEnd=Of});var ns=v(is=>{"use strict";var jf=C(),$f=re(),es=oe(),Hf=se(),Lf=$e(),ts=ft(),Mf=Si(),Df=or(),sr="Block collections are not allowed within flow collections",cr=i=>i&&(i.type==="block-map"||i.type==="block-seq");function Ff({composeNode:i,composeEmptyNode:e},t,n,r,a){let o=n.start.source==="{",s=o?"flow map":"flow sequence",c=a?.nodeClass??(o?es.YAMLMap:Hf.YAMLSeq),l=new c(t.schema);l.flow=!0;let h=t.atRoot;h&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let u=n.offset+n.start.source.length;for(let p=0;p<n.items.length;++p){let w=n.items[p],{start:N,key:b,sep:S,value:k}=w,E=ts.resolveProps(N,{flow:s,indicator:"explicit-key-ind",next:b??S?.[0],offset:u,onError:r,parentIndent:n.indent,startOnNewline:!1});if(!E.found){if(!E.anchor&&!E.tag&&!S&&!k){p===0&&E.comma?r(E.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${s}`):p<n.items.length-1&&r(E.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${s}`),E.comment&&(l.comment?l.comment+=`
|
|
69
|
+
`+E.comment:l.comment=E.comment),u=E.end;continue}!o&&t.options.strict&&Mf.containsNewline(b)&&r(b,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(p===0)E.comma&&r(E.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${s}`);else if(E.comma||r(E.start,"MISSING_CHAR",`Missing , between ${s} items`),E.comment){let P="";e:for(let y of N)switch(y.type){case"comma":case"space":break;case"comment":P=y.source.substring(1);break e;default:break e}if(P){let y=l.items[l.items.length-1];jf.isPair(y)&&(y=y.value??y.key),y.comment?y.comment+=`
|
|
70
|
+
`+P:y.comment=P,E.comment=E.comment.substring(P.length+1)}}if(!o&&!S&&!E.found){let P=k?i(t,k,E,r):e(t,E.end,S,null,E,r);l.items.push(P),u=P.range[2],cr(k)&&r(P.range,"BLOCK_IN_FLOW",sr)}else{t.atKey=!0;let P=E.end,y=b?i(t,b,E,r):e(t,P,N,null,E,r);cr(b)&&r(y.range,"BLOCK_IN_FLOW",sr),t.atKey=!1;let T=ts.resolveProps(S??[],{flow:s,indicator:"map-value-ind",next:k,offset:y.range[2],onError:r,parentIndent:n.indent,startOnNewline:!1});if(T.found){if(!o&&!E.found&&t.options.strict){if(S)for(let I of S){if(I===T.found)break;if(I.type==="newline"){r(I,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}E.start<T.found.offset-1024&&r(T.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else k&&("source"in k&&k.source?.[0]===":"?r(k,"MISSING_CHAR",`Missing space after : in ${s}`):r(T.start,"MISSING_CHAR",`Missing , or : between ${s} items`));let Z=k?i(t,k,T,r):T.found?e(t,T.end,S,null,T,r):null;Z?cr(k)&&r(Z.range,"BLOCK_IN_FLOW",sr):T.comment&&(y.comment?y.comment+=`
|
|
71
|
+
`+T.comment:y.comment=T.comment);let Ce=new $f.Pair(y,Z);if(t.options.keepSourceTokens&&(Ce.srcToken=w),o){let I=l;Df.mapIncludes(t,I.items,y)&&r(P,"DUPLICATE_KEY","Map keys must be unique"),I.items.push(Ce)}else{let I=new es.YAMLMap(t.schema);I.flow=!0,I.items.push(Ce);let ea=(Z??y).range;I.range=[y.range[0],ea[1],ea[2]],l.items.push(I)}u=Z?Z.range[2]:T.end}}let f=o?"}":"]",[m,...g]=n.end,d=u;if(m?.source===f)d=m.offset+m.source.length;else{let p=s[0].toUpperCase()+s.substring(1),w=h?`${p} must end with a ${f}`:`${p} in block collection must be sufficiently indented and end with a ${f}`;r(u,h?"MISSING_CHAR":"BAD_INDENT",w),m&&m.source.length!==1&&g.unshift(m)}if(g.length>0){let p=Lf.resolveEnd(g,d,t.options.strict,r);p.comment&&(l.comment?l.comment+=`
|
|
72
|
+
`+p.comment:l.comment=p.comment),l.range=[n.offset,d,p.offset]}else l.range=[n.offset,d,d];return l}is.resolveFlowCollection=Ff});var as=v(rs=>{"use strict";var Bf=C(),qf=x(),Vf=oe(),zf=se(),Wf=Yo(),Jf=Qo(),Kf=ns();function lr(i,e,t,n,r,a){let o=t.type==="block-map"?Wf.resolveBlockMap(i,e,t,n,a):t.type==="block-seq"?Jf.resolveBlockSeq(i,e,t,n,a):Kf.resolveFlowCollection(i,e,t,n,a),s=o.constructor;return r==="!"||r===s.tagName?(o.tag=s.tagName,o):(r&&(o.tag=r),o)}function Gf(i,e,t,n,r){let a=n.tag,o=a?e.directives.tagName(a.source,f=>r(a,"TAG_RESOLVE_FAILED",f)):null;if(t.type==="block-seq"){let{anchor:f,newlineAfterProp:m}=n,g=f&&a?f.offset>a.offset?f:a:f??a;g&&(!m||m.offset<g.offset)&&r(g,"MISSING_CHAR","Missing newline after block sequence props")}let s=t.type==="block-map"?"map":t.type==="block-seq"?"seq":t.start.source==="{"?"map":"seq";if(!a||!o||o==="!"||o===Vf.YAMLMap.tagName&&s==="map"||o===zf.YAMLSeq.tagName&&s==="seq")return lr(i,e,t,r,o);let c=e.schema.tags.find(f=>f.tag===o&&f.collection===s);if(!c){let f=e.schema.knownTags[o];if(f?.collection===s)e.schema.tags.push(Object.assign({},f,{default:!1})),c=f;else return f?r(a,"BAD_COLLECTION_TYPE",`${f.tag} used for ${s} collection, but expects ${f.collection??"scalar"}`,!0):r(a,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0),lr(i,e,t,r,o)}let l=lr(i,e,t,r,o,c),h=c.resolve?.(l,f=>r(a,"TAG_RESOLVE_FAILED",f),e.options)??l,u=Bf.isNode(h)?h:new qf.Scalar(h);return u.range=l.range,u.tag=o,c?.format&&(u.format=c.format),u}rs.composeCollection=Gf});var fr=v(os=>{"use strict";var ur=x();function Uf(i,e,t){let n=e.offset,r=Yf(e,i.options.strict,t);if(!r)return{value:"",type:null,comment:"",range:[n,n,n]};let a=r.mode===">"?ur.Scalar.BLOCK_FOLDED:ur.Scalar.BLOCK_LITERAL,o=e.source?Xf(e.source):[],s=o.length;for(let d=o.length-1;d>=0;--d){let p=o[d][1];if(p===""||p==="\r")s=d;else break}if(s===0){let d=r.chomp==="+"&&o.length>0?`
|
|
73
|
+
`.repeat(Math.max(1,o.length-1)):"",p=n+r.length;return e.source&&(p+=e.source.length),{value:d,type:a,comment:r.comment,range:[n,p,p]}}let c=e.indent+r.indent,l=e.offset+r.length,h=0;for(let d=0;d<s;++d){let[p,w]=o[d];if(w===""||w==="\r")r.indent===0&&p.length>c&&(c=p.length);else{p.length<c&&t(l+p.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),r.indent===0&&(c=p.length),h=d,c===0&&!i.atRoot&&t(l,"BAD_INDENT","Block scalar values in collections must be indented");break}l+=p.length+w.length+1}for(let d=o.length-1;d>=s;--d)o[d][0].length>c&&(s=d+1);let u="",f="",m=!1;for(let d=0;d<h;++d)u+=o[d][0].slice(c)+`
|
|
74
|
+
`;for(let d=h;d<s;++d){let[p,w]=o[d];l+=p.length+w.length+1;let N=w[w.length-1]==="\r";if(N&&(w=w.slice(0,-1)),w&&p.length<c){let S=`Block scalar lines must not be less indented than their ${r.indent?"explicit indentation indicator":"first line"}`;t(l-w.length-(N?2:1),"BAD_INDENT",S),p=""}a===ur.Scalar.BLOCK_LITERAL?(u+=f+p.slice(c)+w,f=`
|
|
75
|
+
`):p.length>c||w[0]===" "?(f===" "?f=`
|
|
76
|
+
`:!m&&f===`
|
|
77
|
+
`&&(f=`
|
|
78
|
+
|
|
79
|
+
`),u+=f+p.slice(c)+w,f=`
|
|
80
|
+
`,m=!0):w===""?f===`
|
|
81
|
+
`?u+=`
|
|
82
|
+
`:f=`
|
|
83
|
+
`:(u+=f+w,f=" ",m=!1)}switch(r.chomp){case"-":break;case"+":for(let d=s;d<o.length;++d)u+=`
|
|
84
|
+
`+o[d][0].slice(c);u[u.length-1]!==`
|
|
85
|
+
`&&(u+=`
|
|
86
|
+
`);break;default:u+=`
|
|
87
|
+
`}let g=n+r.length+e.source.length;return{value:u,type:a,comment:r.comment,range:[n,g,g]}}function Yf({offset:i,props:e},t,n){if(e[0].type!=="block-scalar-header")return n(e[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:r}=e[0],a=r[0],o=0,s="",c=-1;for(let f=1;f<r.length;++f){let m=r[f];if(!s&&(m==="-"||m==="+"))s=m;else{let g=Number(m);!o&&g?o=g:c===-1&&(c=i+f)}}c!==-1&&n(c,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${r}`);let l=!1,h="",u=r.length;for(let f=1;f<e.length;++f){let m=e[f];switch(m.type){case"space":l=!0;case"newline":u+=m.source.length;break;case"comment":t&&!l&&n(m,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),u+=m.source.length,h=m.source.substring(1);break;case"error":n(m,"UNEXPECTED_TOKEN",m.message),u+=m.source.length;break;default:{let g=`Unexpected token in block scalar header: ${m.type}`;n(m,"UNEXPECTED_TOKEN",g);let d=m.source;d&&typeof d=="string"&&(u+=d.length)}}}return{mode:a,indent:o,chomp:s,comment:h,length:u}}function Xf(i){let e=i.split(/\n( *)/),t=e[0],n=t.match(/^( *)/),a=[n?.[1]?[n[1],t.slice(n[1].length)]:["",t]];for(let o=1;o<e.length;o+=2)a.push([e[o],e[o+1]]);return a}os.resolveBlockScalar=Uf});var hr=v(cs=>{"use strict";var dr=x(),Qf=$e();function Zf(i,e,t){let{offset:n,type:r,source:a,end:o}=i,s,c,l=(f,m,g)=>t(n+f,m,g);switch(r){case"scalar":s=dr.Scalar.PLAIN,c=ed(a,l);break;case"single-quoted-scalar":s=dr.Scalar.QUOTE_SINGLE,c=td(a,l);break;case"double-quoted-scalar":s=dr.Scalar.QUOTE_DOUBLE,c=id(a,l);break;default:return t(i,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${r}`),{value:"",type:null,comment:"",range:[n,n+a.length,n+a.length]}}let h=n+a.length,u=Qf.resolveEnd(o,h,e,t);return{value:c,type:s,comment:u.comment,range:[n,h,u.offset]}}function ed(i,e){let t="";switch(i[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 ${i[0]}`;break}case"@":case"`":{t=`reserved character ${i[0]}`;break}}return t&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${t}`),ss(i)}function td(i,e){return(i[i.length-1]!=="'"||i.length===1)&&e(i.length,"MISSING_CHAR","Missing closing 'quote"),ss(i.slice(1,-1)).replace(/''/g,"'")}function ss(i){let e,t;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
|
|
88
|
+
`,"sy"),t=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
|
89
|
+
`,"sy")}catch{e=/(.*?)[ \t]*\r?\n/sy,t=/[ \t]*(.*?)[ \t]*\r?\n/sy}let n=e.exec(i);if(!n)return i;let r=n[1],a=" ",o=e.lastIndex;for(t.lastIndex=o;n=t.exec(i);)n[1]===""?a===`
|
|
90
|
+
`?r+=a:a=`
|
|
91
|
+
`:(r+=a+n[1],a=" "),o=t.lastIndex;let s=/[ \t]*(.*)/sy;return s.lastIndex=o,n=s.exec(i),r+a+(n?.[1]??"")}function id(i,e){let t="";for(let n=1;n<i.length-1;++n){let r=i[n];if(!(r==="\r"&&i[n+1]===`
|
|
92
|
+
`))if(r===`
|
|
93
|
+
`){let{fold:a,offset:o}=nd(i,n);t+=a,n=o}else if(r==="\\"){let a=i[++n],o=rd[a];if(o)t+=o;else if(a===`
|
|
94
|
+
`)for(a=i[n+1];a===" "||a===" ";)a=i[++n+1];else if(a==="\r"&&i[n+1]===`
|
|
95
|
+
`)for(a=i[++n+1];a===" "||a===" ";)a=i[++n+1];else if(a==="x"||a==="u"||a==="U"){let s=a==="x"?2:a==="u"?4:8;t+=ad(i,n+1,s,e),n+=s}else{let s=i.substr(n-1,2);e(n-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${s}`),t+=s}}else if(r===" "||r===" "){let a=n,o=i[n+1];for(;o===" "||o===" ";)o=i[++n+1];o!==`
|
|
96
|
+
`&&!(o==="\r"&&i[n+2]===`
|
|
97
|
+
`)&&(t+=n>a?i.slice(a,n+1):r)}else t+=r}return(i[i.length-1]!=='"'||i.length===1)&&e(i.length,"MISSING_CHAR",'Missing closing "quote'),t}function nd(i,e){let t="",n=i[e+1];for(;(n===" "||n===" "||n===`
|
|
98
|
+
`||n==="\r")&&!(n==="\r"&&i[e+2]!==`
|
|
99
|
+
`);)n===`
|
|
100
|
+
`&&(t+=`
|
|
101
|
+
`),e+=1,n=i[e+1];return t||(t=" "),{fold:t,offset:e}}var rd={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
|
|
102
|
+
`,r:"\r",t:" ",v:"\v",N:"
",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function ad(i,e,t,n){let r=i.substr(e,t),o=r.length===t&&/^[0-9a-fA-F]+$/.test(r)?parseInt(r,16):NaN;try{return String.fromCodePoint(o)}catch{let s=i.substr(e-2,t+2);return n(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${s}`),s}}cs.resolveFlowScalar=Zf});var fs=v(us=>{"use strict";var we=C(),ls=x(),od=fr(),sd=hr();function cd(i,e,t,n){let{value:r,type:a,comment:o,range:s}=e.type==="block-scalar"?od.resolveBlockScalar(i,e,n):sd.resolveFlowScalar(e,i.options.strict,n),c=t?i.directives.tagName(t.source,u=>n(t,"TAG_RESOLVE_FAILED",u)):null,l;i.options.stringKeys&&i.atKey?l=i.schema[we.SCALAR]:c?l=ld(i.schema,r,c,t,n):e.type==="scalar"?l=ud(i,r,e,n):l=i.schema[we.SCALAR];let h;try{let u=l.resolve(r,f=>n(t??e,"TAG_RESOLVE_FAILED",f),i.options);h=we.isScalar(u)?u:new ls.Scalar(u)}catch(u){let f=u instanceof Error?u.message:String(u);n(t??e,"TAG_RESOLVE_FAILED",f),h=new ls.Scalar(r)}return h.range=s,h.source=r,a&&(h.type=a),c&&(h.tag=c),l.format&&(h.format=l.format),o&&(h.comment=o),h}function ld(i,e,t,n,r){if(t==="!")return i[we.SCALAR];let a=[];for(let s of i.tags)if(!s.collection&&s.tag===t)if(s.default&&s.test)a.push(s);else return s;for(let s of a)if(s.test?.test(e))return s;let o=i.knownTags[t];return o&&!o.collection?(i.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(r(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${t}`,t!=="tag:yaml.org,2002:str"),i[we.SCALAR])}function ud({atKey:i,directives:e,schema:t},n,r,a){let o=t.tags.find(s=>(s.default===!0||i&&s.default==="key")&&s.test?.test(n))||t[we.SCALAR];if(t.compat){let s=t.compat.find(c=>c.default&&c.test?.test(n))??t[we.SCALAR];if(o.tag!==s.tag){let c=e.tagString(o.tag),l=e.tagString(s.tag),h=`Value may be parsed as either ${c} or ${l}`;a(r,"TAG_RESOLVE_FAILED",h,!0)}}return o}us.composeScalar=cd});var hs=v(ds=>{"use strict";function fd(i,e,t){if(e){t??(t=e.length);for(let n=t-1;n>=0;--n){let r=e[n];switch(r.type){case"space":case"comment":case"newline":i-=r.source.length;continue}for(r=e[++n];r?.type==="space";)i+=r.source.length,r=e[++n];break}}return i}ds.emptyScalarPosition=fd});var vs=v(mr=>{"use strict";var dd=We(),hd=C(),pd=as(),ps=fs(),md=$e(),vd=hs(),gd={composeNode:ms,composeEmptyNode:pr};function ms(i,e,t,n){let r=i.atKey,{spaceBefore:a,comment:o,anchor:s,tag:c}=t,l,h=!0;switch(e.type){case"alias":l=wd(i,e,n),(s||c)&&n(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":l=ps.composeScalar(i,e,c,n),s&&(l.anchor=s.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{l=pd.composeCollection(gd,i,e,t,n),s&&(l.anchor=s.source.substring(1))}catch(u){let f=u instanceof Error?u.message:String(u);n(e,"RESOURCE_EXHAUSTION",f)}break;default:{let u=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;n(e,"UNEXPECTED_TOKEN",u),h=!1}}return l??(l=pr(i,e.offset,void 0,null,t,n)),s&&l.anchor===""&&n(s,"BAD_ALIAS","Anchor cannot be an empty string"),r&&i.options.stringKeys&&(!hd.isScalar(l)||typeof l.value!="string"||l.tag&&l.tag!=="tag:yaml.org,2002:str")&&n(c??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),a&&(l.spaceBefore=!0),o&&(e.type==="scalar"&&e.source===""?l.comment=o:l.commentBefore=o),i.options.keepSourceTokens&&h&&(l.srcToken=e),l}function pr(i,e,t,n,{spaceBefore:r,comment:a,anchor:o,tag:s,end:c},l){let h={type:"scalar",offset:vd.emptyScalarPosition(e,t,n),indent:-1,source:""},u=ps.composeScalar(i,h,s,l);return o&&(u.anchor=o.source.substring(1),u.anchor===""&&l(o,"BAD_ALIAS","Anchor cannot be an empty string")),r&&(u.spaceBefore=!0),a&&(u.comment=a,u.range[2]=c),u}function wd({options:i},{offset:e,source:t,end:n},r){let a=new dd.Alias(t.substring(1));a.source===""&&r(e,"BAD_ALIAS","Alias cannot be an empty string"),a.source.endsWith(":")&&r(e+t.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let o=e+t.length,s=md.resolveEnd(n,o,i.strict,r);return a.range=[e,o,s.offset],s.comment&&(a.comment=s.comment),a}mr.composeEmptyNode=pr;mr.composeNode=ms});var ys=v(ws=>{"use strict";var yd=st(),gs=vs(),Nd=$e(),bd=ft();function Sd(i,e,{offset:t,start:n,value:r,end:a},o){let s=Object.assign({_directives:e},i),c=new yd.Document(void 0,s),l={atKey:!1,atRoot:!0,directives:c.directives,options:c.options,schema:c.schema},h=bd.resolveProps(n,{indicator:"doc-start",next:r??a?.[0],offset:t,onError:o,parentIndent:0,startOnNewline:!0});h.found&&(c.directives.docStart=!0,r&&(r.type==="block-map"||r.type==="block-seq")&&!h.hasNewline&&o(h.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),c.contents=r?gs.composeNode(l,r,h,o):gs.composeEmptyNode(l,h.end,n,null,h,o);let u=c.contents.range[2],f=Nd.resolveEnd(a,u,!1,o);return f.comment&&(c.comment=f.comment),c.range=[t,u,f.offset],c}ws.composeDoc=Sd});var gr=v(Ss=>{"use strict";var kd=_t("process"),Ed=tn(),Cd=st(),dt=ut(),Ns=C(),Rd=ys(),Pd=$e();function ht(i){if(typeof i=="number")return[i,i+1];if(Array.isArray(i))return i.length===2?i:[i[0],i[1]];let{offset:e,source:t}=i;return[e,e+(typeof t=="string"?t.length:1)]}function bs(i){let e="",t=!1,n=!1;for(let r=0;r<i.length;++r){let a=i[r];switch(a[0]){case"#":e+=(e===""?"":n?`
|
|
103
|
+
|
|
104
|
+
`:`
|
|
105
|
+
`)+(a.substring(1)||" "),t=!0,n=!1;break;case"%":i[r+1]?.[0]!=="#"&&(r+=1),t=!1;break;default:t||(n=!0),t=!1}}return{comment:e,afterEmptyLine:n}}var vr=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(t,n,r,a)=>{let o=ht(t);a?this.warnings.push(new dt.YAMLWarning(o,n,r)):this.errors.push(new dt.YAMLParseError(o,n,r))},this.directives=new Ed.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,t){let{comment:n,afterEmptyLine:r}=bs(this.prelude);if(n){let a=e.contents;if(t)e.comment=e.comment?`${e.comment}
|
|
106
|
+
${n}`:n;else if(r||e.directives.docStart||!a)e.commentBefore=n;else if(Ns.isCollection(a)&&!a.flow&&a.items.length>0){let o=a.items[0];Ns.isPair(o)&&(o=o.key);let s=o.commentBefore;o.commentBefore=s?`${n}
|
|
107
|
+
${s}`:n}else{let o=a.commentBefore;a.commentBefore=o?`${n}
|
|
108
|
+
${o}`:n}}if(t){for(let a=0;a<this.errors.length;++a)e.errors.push(this.errors[a]);for(let a=0;a<this.warnings.length;++a)e.warnings.push(this.warnings[a])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:bs(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,n=-1){for(let r of e)yield*this.next(r);yield*this.end(t,n)}*next(e){switch(kd.env.LOG_STREAM&&console.dir(e,{depth:null}),e.type){case"directive":this.directives.add(e.source,(t,n,r)=>{let a=ht(e);a[0]+=t,this.onError(a,"BAD_DIRECTIVE",n,r)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let t=Rd.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,n=new dt.YAMLParseError(ht(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case"doc-end":{if(!this.doc){let n="Unexpected doc-end without preceding document";this.errors.push(new dt.YAMLParseError(ht(e),"UNEXPECTED_TOKEN",n));break}this.doc.directives.docEnd=!0;let t=Pd.resolveEnd(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let n=this.doc.comment;this.doc.comment=n?`${n}
|
|
109
|
+
${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new dt.YAMLParseError(ht(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 n=Object.assign({_directives:this.directives},this.options),r=new Cd.Document(void 0,n);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),r.range=[0,t,t],this.decorate(r,!1),yield r}}};Ss.Composer=vr});var Cs=v(ki=>{"use strict";var Ad=fr(),xd=hr(),Td=ut(),ks=Ye();function Id(i,e=!0,t){if(i){let n=(r,a,o)=>{let s=typeof r=="number"?r:Array.isArray(r)?r[0]:r.offset;if(t)t(s,a,o);else throw new Td.YAMLParseError([s,s+1],a,o)};switch(i.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return xd.resolveFlowScalar(i,e,n);case"block-scalar":return Ad.resolveBlockScalar({options:{strict:e}},i,n)}}return null}function _d(i,e){let{implicitKey:t=!1,indent:n,inFlow:r=!1,offset:a=-1,type:o="PLAIN"}=e,s=ks.stringifyString({type:o,value:i},{implicitKey:t,indent:n>0?" ".repeat(n):"",inFlow:r,options:{blockQuote:!0,lineWidth:-1}}),c=e.end??[{type:"newline",offset:-1,indent:n,source:`
|
|
110
|
+
`}];switch(s[0]){case"|":case">":{let l=s.indexOf(`
|
|
111
|
+
`),h=s.substring(0,l),u=s.substring(l+1)+`
|
|
112
|
+
`,f=[{type:"block-scalar-header",offset:a,indent:n,source:h}];return Es(f,c)||f.push({type:"newline",offset:-1,indent:n,source:`
|
|
113
|
+
`}),{type:"block-scalar",offset:a,indent:n,props:f,source:u}}case'"':return{type:"double-quoted-scalar",offset:a,indent:n,source:s,end:c};case"'":return{type:"single-quoted-scalar",offset:a,indent:n,source:s,end:c};default:return{type:"scalar",offset:a,indent:n,source:s,end:c}}}function Od(i,e,t={}){let{afterKey:n=!1,implicitKey:r=!1,inFlow:a=!1,type:o}=t,s="indent"in i?i.indent:null;if(n&&typeof s=="number"&&(s+=2),!o)switch(i.type){case"single-quoted-scalar":o="QUOTE_SINGLE";break;case"double-quoted-scalar":o="QUOTE_DOUBLE";break;case"block-scalar":{let l=i.props[0];if(l.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o=l.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:o="PLAIN"}let c=ks.stringifyString({type:o,value:e},{implicitKey:r||s===null,indent:s!==null&&s>0?" ".repeat(s):"",inFlow:a,options:{blockQuote:!0,lineWidth:-1}});switch(c[0]){case"|":case">":jd(i,c);break;case'"':wr(i,c,"double-quoted-scalar");break;case"'":wr(i,c,"single-quoted-scalar");break;default:wr(i,c,"scalar")}}function jd(i,e){let t=e.indexOf(`
|
|
114
|
+
`),n=e.substring(0,t),r=e.substring(t+1)+`
|
|
115
|
+
`;if(i.type==="block-scalar"){let a=i.props[0];if(a.type!=="block-scalar-header")throw new Error("Invalid block scalar header");a.source=n,i.source=r}else{let{offset:a}=i,o="indent"in i?i.indent:-1,s=[{type:"block-scalar-header",offset:a,indent:o,source:n}];Es(s,"end"in i?i.end:void 0)||s.push({type:"newline",offset:-1,indent:o,source:`
|
|
116
|
+
`});for(let c of Object.keys(i))c!=="type"&&c!=="offset"&&delete i[c];Object.assign(i,{type:"block-scalar",indent:o,props:s,source:r})}}function Es(i,e){if(e)for(let t of e)switch(t.type){case"space":case"comment":i.push(t);break;case"newline":return i.push(t),!0}return!1}function wr(i,e,t){switch(i.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":i.type=t,i.source=e;break;case"block-scalar":{let n=i.props.slice(1),r=e.length;i.props[0].type==="block-scalar-header"&&(r-=i.props[0].source.length);for(let a of n)a.offset+=r;delete i.props,Object.assign(i,{type:t,source:e,end:n});break}case"block-map":case"block-seq":{let r={type:"newline",offset:i.offset+e.length,indent:i.indent,source:`
|
|
117
|
+
`};delete i.items,Object.assign(i,{type:t,source:e,end:[r]});break}default:{let n="indent"in i?i.indent:-1,r="end"in i&&Array.isArray(i.end)?i.end.filter(a=>a.type==="space"||a.type==="comment"||a.type==="newline"):[];for(let a of Object.keys(i))a!=="type"&&a!=="offset"&&delete i[a];Object.assign(i,{type:t,indent:n,source:e,end:r})}}}ki.createScalarToken=_d;ki.resolveAsScalar=Id;ki.setScalarValue=Od});var Ps=v(Rs=>{"use strict";var $d=i=>"type"in i?Ci(i):Ei(i);function Ci(i){switch(i.type){case"block-scalar":{let e="";for(let t of i.props)e+=Ci(t);return e+i.source}case"block-map":case"block-seq":{let e="";for(let t of i.items)e+=Ei(t);return e}case"flow-collection":{let e=i.start.source;for(let t of i.items)e+=Ei(t);for(let t of i.end)e+=t.source;return e}case"document":{let e=Ei(i);if(i.end)for(let t of i.end)e+=t.source;return e}default:{let e=i.source;if("end"in i&&i.end)for(let t of i.end)e+=t.source;return e}}}function Ei({start:i,key:e,sep:t,value:n}){let r="";for(let a of i)r+=a.source;if(e&&(r+=Ci(e)),t)for(let a of t)r+=a.source;return n&&(r+=Ci(n)),r}Rs.stringify=$d});var Is=v(Ts=>{"use strict";var yr=Symbol("break visit"),Hd=Symbol("skip children"),As=Symbol("remove item");function ye(i,e){"type"in i&&i.type==="document"&&(i={start:i.start,value:i.value}),xs(Object.freeze([]),i,e)}ye.BREAK=yr;ye.SKIP=Hd;ye.REMOVE=As;ye.itemAtPath=(i,e)=>{let t=i;for(let[n,r]of e){let a=t?.[n];if(a&&"items"in a)t=a.items[r];else return}return t};ye.parentCollection=(i,e)=>{let t=ye.itemAtPath(i,e.slice(0,-1)),n=e[e.length-1][0],r=t?.[n];if(r&&"items"in r)return r;throw new Error("Parent collection not found")};function xs(i,e,t){let n=t(e,i);if(typeof n=="symbol")return n;for(let r of["key","value"]){let a=e[r];if(a&&"items"in a){for(let o=0;o<a.items.length;++o){let s=xs(Object.freeze(i.concat([[r,o]])),a.items[o],t);if(typeof s=="number")o=s-1;else{if(s===yr)return yr;s===As&&(a.items.splice(o,1),o-=1)}}typeof n=="function"&&r==="key"&&(n=n(e,i))}}return typeof n=="function"?n(e,i):n}Ts.visit=ye});var Ri=v(L=>{"use strict";var Nr=Cs(),Ld=Ps(),Md=Is(),br="\uFEFF",Sr="",kr="",Er="",Dd=i=>!!i&&"items"in i,Fd=i=>!!i&&(i.type==="scalar"||i.type==="single-quoted-scalar"||i.type==="double-quoted-scalar"||i.type==="block-scalar");function Bd(i){switch(i){case br:return"<BOM>";case Sr:return"<DOC>";case kr:return"<FLOW_END>";case Er:return"<SCALAR>";default:return JSON.stringify(i)}}function qd(i){switch(i){case br:return"byte-order-mark";case Sr:return"doc-mode";case kr:return"flow-error-end";case Er:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
|
|
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(i[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}L.createScalarToken=Nr.createScalarToken;L.resolveAsScalar=Nr.resolveAsScalar;L.setScalarValue=Nr.setScalarValue;L.stringify=Ld.stringify;L.visit=Md.visit;L.BOM=br;L.DOCUMENT=Sr;L.FLOW_END=kr;L.SCALAR=Er;L.isCollection=Dd;L.isScalar=Fd;L.prettyToken=Bd;L.tokenType=qd});var Pr=v(Os=>{"use strict";var pt=Ri();function q(i){switch(i){case void 0:case" ":case`
|
|
120
|
+
`:case"\r":case" ":return!0;default:return!1}}var _s=new Set("0123456789ABCDEFabcdef"),Vd=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Pi=new Set(",[]{}"),zd=new Set(` ,[]{}
|
|
121
|
+
\r `),Cr=i=>!i||zd.has(i),Rr=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 n=this.next??"stream";for(;n&&(t||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t===" "||t===" ";)t=this.buffer[++e];return!t||t==="#"||t===`
|
|
122
|
+
`?!0:t==="\r"?this.buffer[e+1]===`
|
|
123
|
+
`:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let n=0;for(;t===" ";)t=this.buffer[++n+e];if(t==="\r"){let r=this.buffer[n+e+1];if(r===`
|
|
124
|
+
`||!r&&!this.atEnd)return e+n+1}return t===`
|
|
125
|
+
`||n>=this.indentNext||!t&&!this.atEnd?e+n:-1}if(t==="-"||t==="."){let n=this.buffer.substr(e,3);if((n==="---"||n==="...")&&q(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]===pt.BOM&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let t=e.length,n=e.indexOf("#");for(;n!==-1;){let a=e[n-1];if(a===" "||a===" "){t=n-1;break}else n=e.indexOf("#",n+1)}for(;;){let a=e[t-1];if(a===" "||a===" ")t-=1;else break}let r=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-r),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 pt.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==="...")&&q(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&&!q(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===":")&&q(t)){let n=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=n,"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(Cr),"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,n=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=n=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);let r=this.getLine();if(r===null)return this.setNext("flow");if((n!==-1&&n<this.indentNext&&r[0]!=="#"||n===0&&(r.startsWith("---")||r.startsWith("..."))&&q(r[3]))&&!(n===this.indentNext-1&&this.flowLevel===1&&(r[0]==="]"||r[0]==="}")))return this.flowLevel=0,yield pt.FLOW_END,yield*this.parseLineStart();let a=0;for(;r[a]===",";)a+=yield*this.pushCount(1),a+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(a+=yield*this.pushIndicators(),r[a]){case void 0:return"flow";case"#":return yield*this.pushCount(r.length-a),"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(Cr),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let o=this.charAt(1);if(this.flowKey||q(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 a=0;for(;this.buffer[t-1-a]==="\\";)a+=1;if(a%2===0)break;t=this.buffer.indexOf('"',t+1)}let n=this.buffer.substring(0,t),r=n.indexOf(`
|
|
127
|
+
`,this.pos);if(r!==-1){for(;r!==-1;){let a=this.continueScalar(r+1);if(a===-1)break;r=n.indexOf(`
|
|
128
|
+
`,a)}r!==-1&&(t=r-(n[r-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=>q(t)||t==="#")}*parseBlockScalar(){let e=this.pos-1,t=0,n;e:for(let a=this.pos;n=this.buffer[a];++a)switch(n){case" ":t+=1;break;case`
|
|
129
|
+
`:e=a,t=0;break;case"\r":{let o=this.buffer[a+1];if(!o&&!this.atEnd)return this.setNext("block-scalar");if(o===`
|
|
130
|
+
`)break}default:break e}if(!n&&!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 a=this.continueScalar(e+1);if(a===-1)break;e=this.buffer.indexOf(`
|
|
131
|
+
`,a)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let r=e+1;for(n=this.buffer[r];n===" ";)n=this.buffer[++r];if(n===" "){for(;n===" "||n===" "||n==="\r"||n===`
|
|
132
|
+
`;)n=this.buffer[++r];e=r-1}else if(!this.blockScalarKeep)do{let a=e-1,o=this.buffer[a];o==="\r"&&(o=this.buffer[--a]);let s=a;for(;o===" ";)o=this.buffer[--a];if(o===`
|
|
133
|
+
`&&a>=this.pos&&a+1+t>s)e=a;else break}while(!0);return yield pt.SCALAR,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,n=this.pos-1,r;for(;r=this.buffer[++n];)if(r===":"){let a=this.buffer[n+1];if(q(a)||e&&Pi.has(a))break;t=n}else if(q(r)){let a=this.buffer[n+1];if(r==="\r"&&(a===`
|
|
134
|
+
`?(n+=1,r=`
|
|
135
|
+
`,a=this.buffer[n+1]):t=n),a==="#"||e&&Pi.has(a))break;if(r===`
|
|
136
|
+
`){let o=this.continueScalar(n+1);if(o===-1)break;n=Math.max(n,o-2)}}else{if(e&&Pi.has(r))break;t=n}return!r&&!this.atEnd?this.setNext("plain-scalar"):(yield pt.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 n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.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(Cr),e+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{let t=this.flowLevel>0,n=this.charAt(1);if(q(n)||t&&Pi.has(n)){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(;!q(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(Vd.has(t))t=this.buffer[++e];else if(t==="%"&&_s.has(this.buffer[e+1])&&_s.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
|
+
`?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
|
|
138
|
+
`?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,n;do n=this.buffer[++t];while(n===" "||e&&n===" ");let r=t-this.pos;return r>0&&(yield this.buffer.substr(this.pos,r),this.pos=t),r}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}};Os.Lexer=Rr});var xr=v(js=>{"use strict";var Ar=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t<n;){let a=t+n>>1;this.lineStarts[a]<e?t=a+1:n=a}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};let r=this.lineStarts[t-1];return{line:t,col:e-r+1}}}};js.LineCounter=Ar});var Ir=v(Ds=>{"use strict";var Wd=_t("process"),$s=Ri(),Jd=Pr();function ce(i,e){for(let t=0;t<i.length;++t)if(i[t].type===e)return!0;return!1}function Hs(i){for(let e=0;e<i.length;++e)switch(i[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function Ms(i){switch(i?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function Ai(i){switch(i.type){case"document":return i.start;case"block-map":{let e=i.items[i.items.length-1];return e.sep??e.start}case"block-seq":return i.items[i.items.length-1].start;default:return[]}}function He(i){if(i.length===0)return[];let e=i.length;e:for(;--e>=0;)switch(i[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;i[++e]?.type==="space";);return i.splice(e,i.length)}function xi(i,e){if(e.length<1e5)Array.prototype.push.apply(i,e);else for(let t=0;t<e.length;++t)i.push(e[t])}function Ls(i){if(i.start.type==="flow-seq-start")for(let e of i.items)e.sep&&!e.value&&!ce(e.start,"explicit-key-ind")&&!ce(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,Ms(e.value)?e.value.end?xi(e.value.end,e.sep):e.value.end=e.sep:xi(e.start,e.sep),delete e.sep)}var Tr=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 Jd.Lexer,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let n of this.lexer.lex(e,t))yield*this.next(n);t||(yield*this.end())}*next(e){if(this.source=e,Wd.env.LOG_TOKENS&&console.log("|",$s.prettyToken(e)),this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=$s.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 n=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:n,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 n=this.peek(1);switch(t.type==="block-scalar"?t.indent="indent"in n?n.indent:0:t.type==="flow-collection"&&n.type==="document"&&(t.indent=0),t.type==="flow-collection"&&Ls(t),n.type){case"document":n.value=t;break;case"block-scalar":n.props.push(t);break;case"block-map":{let r=n.items[n.items.length-1];if(r.value){n.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}else if(r.sep)r.value=t;else{Object.assign(r,{key:t,sep:[]}),this.onKeyLine=!r.explicitKey;return}break}case"block-seq":{let r=n.items[n.items.length-1];r.value?n.items.push({start:[],value:t}):r.value=t;break}case"flow-collection":{let r=n.items[n.items.length-1];!r||r.value?n.items.push({start:[],key:t,sep:[]}):r.sep?r.value=t:Object.assign(r,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((n.type==="document"||n.type==="block-map"||n.type==="block-seq")&&(t.type==="block-map"||t.type==="block-seq")){let r=t.items[t.items.length-1];r&&!r.sep&&!r.value&&r.start.length>0&&Hs(r.start)===-1&&(t.indent===0||r.start.every(a=>a.type!=="comment"||a.indent<t.indent))&&(n.type==="document"?n.end=r.start:n.items.push({start:r.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":{Hs(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=Ai(this.peek(2)),n=He(t),r;e.end?(r=e.end,r.push(this.sourceToken),delete e.end):r=[this.sourceToken];let a={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=a}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
|
+
`)+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 n="end"in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type==="comment"?n?.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 r=e.items[e.items.length-2]?.value?.end;if(Array.isArray(r)){xi(r,t.start),r.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let n=!this.onKeyLine&&this.indent===e.indent,r=n&&(t.sep||t.explicitKey)&&this.type!=="seq-item-ind",a=[];if(r&&t.sep&&!t.value){let o=[];for(let s=0;s<t.sep.length;++s){let c=t.sep[s];switch(c.type){case"newline":o.push(s);break;case"space":break;case"comment":c.indent>e.indent&&(o.length=0);break;default:o.length=0}}o.length>=2&&(a=t.sep.splice(o[1]))}switch(this.type){case"anchor":case"tag":r||t.value?(a.push(this.sourceToken),e.items.push({start:a}),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):r||t.value?(a.push(this.sourceToken),e.items.push({start:a,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(ce(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:null,sep:[this.sourceToken]}]});else if(Ms(t.key)&&!ce(t.sep,"newline")){let o=He(t.start),s=t.key,c=t.sep;c.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:s,sep:c}]})}else a.length>0?t.sep=t.sep.concat(a,this.sourceToken):t.sep.push(this.sourceToken);else if(ce(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let o=He(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||r?e.items.push({start:a,key:null,sep:[this.sourceToken]}):ce(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);r||t.value?(e.items.push({start:a,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&&!ce(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 n&&e.items.push({start:a});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 n="end"in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type==="comment"?n?.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 r=e.items[e.items.length-2]?.value?.end;if(Array.isArray(r)){xi(r,t.start),r.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||ce(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){let n=this.startBlockValue(e);if(n){this.stack.push(n);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if(this.type==="flow-error-end"){let n;do yield*this.pop(),n=this.peek(1);while(n?.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 r=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:r,sep:[]}):t.sep?this.stack.push(r):Object.assign(t,{key:r,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}let n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{let n=this.peek(2);if(n.type==="block-map"&&(this.type==="map-value-ind"&&n.indent===e.indent||this.type==="newline"&&!n.items[n.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&n.type!=="flow-collection"){let r=Ai(n),a=He(r);Ls(e);let o=e.end.splice(1,e.end.length);o.push(this.sourceToken);let s={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:a,key:e,sep:o}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=s}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let t=this.source.indexOf(`
|
|
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=Ai(e),n=He(t);return n.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let t=Ai(e),n=He(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!=="comment"||this.indent<=t?!1:e.every(n=>n.type==="newline"||n.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())}}};Ds.Parser=Tr});var zs=v(vt=>{"use strict";var Fs=gr(),Kd=st(),mt=ut(),Gd=mn(),Ud=C(),Yd=xr(),Bs=Ir();function qs(i){let e=i.prettyErrors!==!1;return{lineCounter:i.lineCounter||e&&new Yd.LineCounter||null,prettyErrors:e}}function Xd(i,e={}){let{lineCounter:t,prettyErrors:n}=qs(e),r=new Bs.Parser(t?.addNewLine),a=new Fs.Composer(e),o=Array.from(a.compose(r.parse(i)));if(n&&t)for(let s of o)s.errors.forEach(mt.prettifyError(i,t)),s.warnings.forEach(mt.prettifyError(i,t));return o.length>0?o:Object.assign([],{empty:!0},a.streamInfo())}function Vs(i,e={}){let{lineCounter:t,prettyErrors:n}=qs(e),r=new Bs.Parser(t?.addNewLine),a=new Fs.Composer(e),o=null;for(let s of a.compose(r.parse(i),!0,i.length))if(!o)o=s;else if(o.options.logLevel!=="silent"){o.errors.push(new mt.YAMLParseError(s.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return n&&t&&(o.errors.forEach(mt.prettifyError(i,t)),o.warnings.forEach(mt.prettifyError(i,t))),o}function Qd(i,e,t){let n;typeof e=="function"?n=e:t===void 0&&e&&typeof e=="object"&&(t=e);let r=Vs(i,t);if(!r)return null;if(r.warnings.forEach(a=>Gd.warn(r.options.logLevel,a)),r.errors.length>0){if(r.options.logLevel!=="silent")throw r.errors[0];r.errors=[]}return r.toJS(Object.assign({reviver:n},t))}function Zd(i,e,t){let n=null;if(typeof e=="function"||Array.isArray(e)?n=e:t===void 0&&e&&(t=e),typeof t=="string"&&(t=t.length),typeof t=="number"){let r=Math.round(t);t=r<1?void 0:r>8?{indent:8}:{indent:r}}if(i===void 0){let{keepUndefined:r}=t??e??{};if(!r)return}return Ud.isDocument(i)&&!n?i.toString(t):new Kd.Document(i,n,t).toString(t)}vt.parse=Qd;vt.parseAllDocuments=Xd;vt.parseDocument=Vs;vt.stringify=Zd});var Or=v(R=>{"use strict";var eh=gr(),th=st(),ih=Xn(),_r=ut(),nh=We(),le=C(),rh=re(),ah=x(),oh=oe(),sh=se(),ch=Ri(),lh=Pr(),uh=xr(),fh=Ir(),Ti=zs(),Ws=Be();R.Composer=eh.Composer;R.Document=th.Document;R.Schema=ih.Schema;R.YAMLError=_r.YAMLError;R.YAMLParseError=_r.YAMLParseError;R.YAMLWarning=_r.YAMLWarning;R.Alias=nh.Alias;R.isAlias=le.isAlias;R.isCollection=le.isCollection;R.isDocument=le.isDocument;R.isMap=le.isMap;R.isNode=le.isNode;R.isPair=le.isPair;R.isScalar=le.isScalar;R.isSeq=le.isSeq;R.Pair=rh.Pair;R.Scalar=ah.Scalar;R.YAMLMap=oh.YAMLMap;R.YAMLSeq=sh.YAMLSeq;R.CST=ch;R.Lexer=lh.Lexer;R.LineCounter=uh.LineCounter;R.Parser=fh.Parser;R.parse=Ti.parse;R.parseAllDocuments=Ti.parseAllDocuments;R.parseDocument=Ti.parseDocument;R.stringify=Ti.stringify;R.visit=Ws.visit;R.visitAsync=Ws.visitAsync});import $h from"path";var wt=ia(Or(),1);import _i from"path";var $i=64*1024,Oi=1024,ji=64,$r=5,dh=[".agents/skills/**",".amazonq/skills/**",".augment/skills/**",".bob/skills/**",".claude/skills/**",".cline/skills/**",".codebuddy/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/**"],D={include:["**/*"],exclude:[...dh],max_files:1e4,max_total_bytes:256*1024*1024,max_duration_ms:6e4},Ii={en:{schema:"# Configuration schema used by Comet. Do not edit this value.",default_workflow:"# Default workflow entered by /comet. Must also appear in workflows.",workflows:"# Workflows enabled in this project: native, classic, or both.",ambient_resume:`# Enables automatic recovery through the read-only Ambient Resume probe for both Native and Classic. Set false to disable it.
|
|
143
|
+
# ambient_resume: true | false`,native:"# Native workflow settings. They do not change Classic state or behavior.","native.artifact_root":"# Root directory where Native stores Comet specs, changes, and runtime data.","native.language":`# Artifact language used by Native workflow documents.
|
|
144
|
+
# language: en | zh-CN`,"native.clarification_mode":`# Controls whether Native asks one clarification at a time or every currently answerable question in a round.
|
|
145
|
+
# clarification_mode: sequential | batch`,"native.archive_confirmation":`# Controls whether Native archives automatically after a successful preview or waits for explicit user confirmation.
|
|
146
|
+
# archive_confirmation: automatic | required`,"native.max_verify_failures":"# Maximum failed Verify outcomes allowed for one confirmed contract before Native stops the completion loop.","native.snapshot":"# Controls the auditable project scope and bounded work used by Native content snapshots.","native.snapshot.include":"# Selects the project-relative paths included in Native snapshots. Patterns use / and support *, **, and ?.","native.snapshot.exclude":"# Removes paths from the included scope. Exclusions are bound into each new change baseline.","native.snapshot.max_files":"# Bounds the number of files captured by one snapshot. Increase it for large monorepos.","native.snapshot.max_total_bytes":"# Bounds the total file content hashed by one snapshot. Content is streamed and does not depend on Git hashes.","native.snapshot.max_duration_ms":"# Bounds snapshot capture time in milliseconds. Increase it together with the byte budget on slower or larger repositories.",classic:"# Classic workflow settings. They do not change Native state or behavior.","classic.artifact_layout":`# Selects the Classic artifact layout. The default is docs; update preserves detected root-level legacy artifacts.
|
|
147
|
+
# artifact_layout: legacy | docs`,"classic.language":`# Artifact language used by Classic workflow documents.
|
|
148
|
+
# language: en | zh-CN`,"classic.context_compression":`# Controls beta context compression for new Classic changes.
|
|
149
|
+
# context_compression: off | beta`,"classic.review_mode":`# Sets the default review depth for new Classic changes.
|
|
150
|
+
# review_mode: off | standard | thorough`,"classic.auto_transition":`# Automatically enters the next Classic phase after a phase passes.
|
|
151
|
+
# auto_transition: true | false`},"zh-CN":{schema:"# Comet 使用的配置格式版本,请勿修改此值。",default_workflow:"# `/comet` 默认进入的工作流;该值也必须出现在 workflows 中。",workflows:"# 此项目启用的工作流,可填写 native、classic 或同时启用两者。",ambient_resume:`# 是否启用只读的环境感知恢复探针,同时作用于 Native 和 Classic;设为 false 可关闭自动工作流恢复。
|
|
152
|
+
# ambient_resume: true | false`,native:"# Native 工作流配置,不会改变 Classic 的状态或行为。","native.artifact_root":"# Native 产物的存放根目录,包括规格、change 和运行时数据。","native.language":`# Native 工作流文档使用的产物语言。
|
|
153
|
+
# 可选值:en | zh-CN`,"native.clarification_mode":`# Native 每轮询问一个问题,或一次提出当前所有可回答的问题。
|
|
154
|
+
# 可选值:sequential | batch`,"native.archive_confirmation":`# Native 归档预演成功后自动归档,或等待用户明确确认。
|
|
155
|
+
# 可选值:automatic | required`,"native.max_verify_failures":"# 同一份已确认 contract 最多允许的 Verify 失败次数;达到上限后停止完成循环。","native.snapshot":"# Native 内容快照使用的可审计项目范围与有界工作预算。","native.snapshot.include":"# Native 快照纳入的项目相对路径;模式使用 /,支持 *、** 和 ?。","native.snapshot.exclude":"# 从纳入范围中排除路径;新 change 会把排除策略绑定到 baseline。","native.snapshot.max_files":"# 单次快照最多捕获的文件数;大型 monorepo 可按需提高。","native.snapshot.max_total_bytes":"# 单次快照最多哈希的文件内容总字节数;内容采用流式读取,不依赖 Git hash。","native.snapshot.max_duration_ms":"# 单次快照的最长执行时间(毫秒);较慢或更大的仓库应与字节预算一并提高。",classic:"# Classic 工作流配置,不会改变 Native 的状态或行为。","classic.artifact_layout":`# Classic 产物布局;默认使用 docs,update 检测到根目录 legacy 产物时予以保留。
|
|
156
|
+
# 可选值:legacy | docs`,"classic.language":`# Classic 工作流文档使用的产物语言。
|
|
157
|
+
# 可选值:en | zh-CN`,"classic.context_compression":`# 新建 Classic change 是否启用 beta 上下文压缩。
|
|
158
|
+
# 可选值:off | beta`,"classic.review_mode":`# 新建 Classic change 默认使用的审查深度。
|
|
159
|
+
# 可选值:off | standard | thorough`,"classic.auto_transition":`# Classic 阶段通过后是否自动进入下一阶段。
|
|
160
|
+
# 可选值:true | false`}};function Ks(i,e){return Ii[e][i]}function hh(i,e,t){let n=/^(\s*)([a-z_]+):/u.exec(i);if(!n)return null;let r=n[1].length,a=n[2];if(r===0&&a in Ii.en)return a;if(r===2&&e){let o=`${e}.${a}`;if(o in Ii.en)return o}if(r===4&&e==="native"&&t==="snapshot"){let o=`native.snapshot.${a}`;if(o in Ii.en)return o}return null}function Hi(i,e){let t=[],n=null,r=null;for(let a of(0,wt.stringify)(i).trimEnd().split(`
|
|
161
|
+
`)){let o=hh(a,n,r);if(o){let s=a.match(/^\s*/u)?.[0]??"";for(let c of Ks(o,e).split(`
|
|
162
|
+
`))t.push(`${s}${c}`)}t.push(a),/^[a-z_]+:/u.test(a)?(a.startsWith("native:")?n="native":a.startsWith("classic:")?n="classic":n=null,r=null):/^ {2}[a-z_]+:/u.test(a)&&n==="native"&&(r=a.startsWith(" snapshot:")?"snapshot":null)}return t.push(""),t.join(`
|
|
163
|
+
`)}function ph(i,e){if(typeof i!="string")throw new Error(`${e} must be a string`);let t=i.trim();if(t.length===0||_i.posix.isAbsolute(t)||_i.win32.isAbsolute(t)||/^(?:~|[\\/])/u.test(t))throw new Error(`${e} must be a project-relative path`);if(t===".")return[];let n=t.replaceAll("\\","/").split("/");if(n.some(r=>r===".."))throw new Error(`${e} must stay inside the project root`);if(n.some(r=>r===""||r==="."))throw new Error(`${e} must not contain empty or dot path segments`);return n}function Ne(i){let e=ph(i,"native.artifact_root");return e.length===0?".":e.join("/")}function Gs(i,e="docs"){let t=i??e;if(t!=="legacy"&&t!=="docs")throw new Error("classic.artifact_layout must be legacy or docs");return t}function Hr(i,e,t=!1){if(typeof i!="string")throw new Error(`${e} must be a string`);let n=i.trim().replaceAll("\\","/");if(n.length===0||_i.posix.isAbsolute(n)||_i.win32.isAbsolute(n)||/^(?:~|[\\/])/u.test(n))throw new Error(`${e} must be relative to its declared path base`);let r=n.split("/");if(r.some(a=>a===".."))throw new Error(`${e} must stay inside its declared path base`);if(r.some(a=>a===""||a==="."))throw new Error(`${e} must not contain empty or dot path segments`);if(!t&&/[*?]/u.test(n))throw new Error(`${e} cannot contain wildcards`);return r.join("/")}function gt(i,e){if(!i||typeof i!="object"||Array.isArray(i))throw new Error(`${e} must be a mapping`);return i}function Us(i,e,t){let n=i??e;if(n!=="en"&&n!=="zh-CN")throw new Error(`${t} must be en or zh-CN`);return n}function Lr(i,e){if(typeof i!="string"||i.length===0||i.includes("\\")||i.includes("\0")||i.startsWith("/")||i.split("/").includes(".."))throw new Error(`${e} contains an unsafe pattern`);if(i.length>Oi)throw new Error(`${e} exceeds ${Oi} characters`);let t=0;for(let n=0;n<i.length;n+=1)i[n]==="?"?t+=1:i[n]==="*"&&(t+=1,i[n+1]==="*"&&(n+=1));if(t>ji)throw new Error(`${e} contains more than ${ji} wildcard tokens`);return i}function Js(i,e,t){if(i===void 0)return[...t];if(!Array.isArray(i))throw new Error(`${e} contains an unsafe pattern`);return[...new Set(i.map(n=>Lr(n,e)))].sort((n,r)=>n.localeCompare(r,"en"))}function jr(i,e,t){let n=i??e;if(!Number.isSafeInteger(n)||n<1)throw new Error(`${t} must be a positive integer`);return n}function mh(i){if(i===void 0)return{...D,include:[...D.include],exclude:[...D.exclude]};let e=gt(i,"native.snapshot");return{include:Js(e.include,"native.snapshot.include",D.include),exclude:Js(e.exclude,"native.snapshot.exclude",D.exclude),max_files:jr(e.max_files,D.max_files,"native.snapshot.max_files"),max_total_bytes:jr(e.max_total_bytes,D.max_total_bytes,"native.snapshot.max_total_bytes"),max_duration_ms:jr(e.max_duration_ms,D.max_duration_ms,"native.snapshot.max_duration_ms")}}function vh(i){if(i===void 0)return;let e=gt(i,"native.pending_root_move"),t=e.id,n=e.from_artifact_root,r=e.to_artifact_root,a=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 n!="string"||typeof r!="string")throw new Error("native.pending_root_move roots must be strings");if(a!=="copying"&&a!=="ready"&&a!=="switched")throw new Error("native.pending_root_move.stage is invalid");let o;if(e.cleanup!==void 0){let s=gt(e.cleanup,"native.pending_root_move.cleanup"),c=s.kind,l=s.state,h=s.manifest_hash;if(c!=="forward-source"&&c!=="restart-staging"&&c!=="rollback-destination"&&c!=="rollback-staging")throw new Error("native.pending_root_move.cleanup.kind is invalid");if(l!=="prepared"&&l!=="quarantined"&&l!=="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:c,state:l,manifestHash:h}}return{id:t,fromArtifactRoot:Ne(n),toArtifactRoot:Ne(r),stage:a,...o?{cleanup:o}:{}}}function gh(i,e={}){let t=gt(i,"native"),n=t.artifact_root??(e.allowMissingArtifactRoot?"docs":void 0);if(typeof n!="string")throw new Error("native.artifact_root must be a string");let r=t.clarification_mode??"sequential";if(r!=="sequential"&&r!=="batch")throw new Error("native.clarification_mode must be sequential or batch");let a=t.archive_confirmation??"automatic";if(a!=="automatic"&&a!=="required")throw new Error("native.archive_confirmation must be automatic or required");let o=t.max_verify_failures??$r;if(!Number.isSafeInteger(o)||o<1)throw new Error("native.max_verify_failures must be a positive integer");let s=vh(t.pending_root_move);return{artifact_root:Ne(n),language:Us(t.language,"en","native.language"),clarification_mode:r,archive_confirmation:a,max_verify_failures:o,snapshot:mh(t.snapshot),...s?{pending_root_move:s}:{}}}function wh(i){let e=gt(i,"classic"),t=e.context_compression??"off";if(t!=="off"&&t!=="beta")throw new Error("classic.context_compression must be off or beta");let n=e.review_mode??"standard";if(n!=="off"&&n!=="standard"&&n!=="thorough")throw new Error("classic.review_mode must be off, standard, or thorough");let r=e.auto_transition??!0;if(typeof r!="boolean")throw new Error("classic.auto_transition must be true or false");return{artifact_layout:Gs(e.artifact_layout),language:Us(e.language,"zh-CN","classic.language"),context_compression:t,review_mode:n,auto_transition:r}}function yh(i){let e=i??!0;if(typeof e!="boolean")throw new Error("ambient_resume must be true or false");return e}function Nh(i,e,t,n,r){let a=i.schema!==void 0;if(!(a||i.default_workflow!==void 0||i.workflows!==void 0||!r.allowPartialProject&&i.native!==void 0)||r.allowPartialProject&&!a)return null;if(i.schema!=="comet.project.v1")throw new Error("Unsupported Comet project schema");if(i.default_workflow!=="native"&&i.default_workflow!=="classic")throw new Error("default_workflow must be native or classic");let s=i.workflows??[i.default_workflow];if(!Array.isArray(s)||s.length===0||s.some(l=>l!=="native"&&l!=="classic"))throw new Error("workflows must contain native and/or classic");let c=[...new Set(s)];if(!c.includes(i.default_workflow))throw new Error("workflows must include default_workflow");if(c.includes("native")&&!e)throw new Error("native must be a mapping");return{schema:"comet.project.v1",default_workflow:i.default_workflow,workflows:c,ambient_resume:n,...e?{native:e}:{},...t?{classic:t}:{}}}function yt(i,e={}){let t=(0,wt.parseDocument)(i,{uniqueKeys:!0});if(t.errors.length>0)throw new Error(`Invalid .comet/config.yaml: ${t.errors[0].message}`);let n=t.toJS();if(n==null)return{value:{},config:null,ambient_resume:!0};if(typeof n!="object"||Array.isArray(n))throw new Error("Invalid .comet/config.yaml: root must be a mapping");let r=n,a=yh(r.ambient_resume),o=r.native===void 0?void 0:gh(r.native,{allowMissingArtifactRoot:e.allowMissingNativeFields}),s=r.classic===void 0?void 0:wh(r.classic),c=Nh(r,o,s,a,{allowPartialProject:e.allowPartialProject??!1});return{value:r,config:c,ambient_resume:a,...o?{native:o}:{},...s?{classic:s}:{}}}function Ys(i){return{id:i.id,from_artifact_root:i.fromArtifactRoot,to_artifact_root:i.toArtifactRoot,stage:i.stage,...i.cleanup?{cleanup:{kind:i.cleanup.kind,state:i.cleanup.state,manifest_hash:i.cleanup.manifestHash}}:{}}}function Xs(i){return{schema:i.schema,default_workflow:i.default_workflow,workflows:i.workflows??[i.default_workflow],ambient_resume:i.ambient_resume,...i.native?{native:{artifact_root:i.native.artifact_root,language:i.native.language,clarification_mode:i.native.clarification_mode,archive_confirmation:i.native.archive_confirmation,max_verify_failures:i.native.max_verify_failures,snapshot:i.native.snapshot,...i.native.pending_root_move?{pending_root_move:Ys(i.native.pending_root_move)}:{}}}:{},...i.classic?{classic:{artifact_layout:i.classic.artifact_layout,language:i.classic.language,context_compression:i.classic.context_compression,review_mode:i.classic.review_mode,auto_transition:i.classic.auto_transition}}:{}}}function Le(i){return i&&typeof i=="object"&&!Array.isArray(i)?i:{}}function Li(i,e){let t=Xs(e),n=yt((0,wt.stringify)(t)).config;if(!n)throw new Error("Unsupported Comet project schema");let r={...i,schema:n.schema,default_workflow:n.default_workflow,workflows:n.workflows,ambient_resume:n.ambient_resume};if(n.native){let a=Le(i.native),o=Le(a.snapshot),s={...a,artifact_root:n.native.artifact_root,language:n.native.language,clarification_mode:n.native.clarification_mode,archive_confirmation:n.native.archive_confirmation,max_verify_failures:n.native.max_verify_failures,snapshot:{...o,...n.native.snapshot}};if(n.native.pending_root_move){let c=Le(a.pending_root_move),l=Ys(n.native.pending_root_move),h=Le(c.cleanup),u=Le(l.cleanup);s.pending_root_move={...c,...l,...l.cleanup?{cleanup:{...h,...u}}:{}}}else delete s.pending_root_move;r.native=s}return n.classic&&(r.classic={...Le(i.classic),artifact_layout:n.classic.artifact_layout,language:n.classic.language,context_compression:n.classic.context_compression,review_mode:n.classic.review_mode,auto_transition:n.classic.auto_transition}),r}function Mr(i="docs",e="en"){return{schema:"comet.project.v1",default_workflow:"native",ambient_resume:!0,native:{artifact_root:Ne(i),language:e,clarification_mode:"sequential",archive_confirmation:"automatic",max_verify_failures:$r,snapshot:{...D,include:[...D.include],exclude:[...D.exclude]}}}}import{createHash as Sh}from"crypto";import{promises as Fi}from"fs";import fe from"path";import{constants as Mi,promises as be}from"fs";function ue(i){return i!==0&&i!==0n&&i!=="0"}function V(i,e){return ue(i.dev)&&ue(e.dev)&&ue(i.ino)&&ue(e.ino)}function O(i,e){let t=ue(i.dev)&&ue(e.dev);if(t&&i.dev!==e.dev)return!1;let n=ue(i.ino)&&ue(e.ino);return n&&i.ino!==e.ino?!1:t&&n?!0:i.birthtime===e.birthtime}var Y=class extends Error{reason;constructor(e,t,n){super(t,n),this.name="RaceSafeReadError",this.reason=e}};function Dr(i){return"birthtimeNs"in i&&typeof i.birthtimeNs=="bigint"?i.birthtimeNs:i.birthtimeMs}function Qs(i){return"ctimeNs"in i&&typeof i.ctimeNs=="bigint"?i.ctimeNs:i.ctimeMs}function Nt(i){return{dev:i.dev,ino:i.ino,birthtime:Dr(i)}}function Di(i,e){let t=Nt(i),n=Nt(e);return V(t,n)?O(t,n):O(t,n)&&Dr(i)===Dr(e)&&Qs(i)===Qs(e)&&i.size===e.size}async function bt(i,e,t={}){if(!Number.isSafeInteger(e)||e<1)throw new Error("race-safe read byte limit must be a positive integer");let n=t.label??"file",r=t.bigint===!0,a=await be.lstat(i,{bigint:r});if(!a.isFile()||a.isSymbolicLink())throw new Y("not-regular-file",`${n} must be a regular file`);if(BigInt(a.size)>BigInt(e))throw new Y("too-large",`${n} exceeds ${e} bytes`);let o=await be.realpath(i);await t.verify?.("pre-open",{realPath:o,identity:Nt(a)});let s=process.platform==="win32"?Mi.O_RDONLY:Mi.O_RDONLY|Mi.O_NOFOLLOW|Mi.O_NONBLOCK,c;try{c=await be.open(i,s)}catch(l){throw l.code==="ELOOP"?new Y("not-regular-file",`${n} must be a regular file`,{cause:l}):l}try{let[l,h,u]=await Promise.all([c.stat({bigint:r}),be.lstat(i,{bigint:r}),be.realpath(i)]);if(!l.isFile()||!h.isFile()||h.isSymbolicLink()||u!==o||!Di(a,l)||!Di(a,h))throw new Y("changed",`${n} changed while opening`);await t.verify?.("post-open",{realPath:u,identity:Nt(l)}),await t.hooks?.afterOpen?.();let f=[],m=0,g=Buffer.allocUnsafe(Math.min(64*1024,e+1));for(;;){let N=e+1-m,{bytesRead:b}=await c.read(g,0,Math.min(g.length,N),null);if(b===0)break;if(m+=b,m>e)throw new Y("too-large",`${n} exceeds ${e} bytes`);f.push(Buffer.from(g.subarray(0,b)))}await t.hooks?.beforeFinalCheck?.();let[d,p,w]=await Promise.all([c.stat({bigint:r}),be.lstat(i,{bigint:r}),be.realpath(i)]);if(!p.isFile()||p.isSymbolicLink()||w!==o||!Di(a,d)||!Di(a,p))throw new Y("changed",`${n} changed while reading`);return await t.verify?.("post-read",{realPath:w,identity:Nt(d)}),{bytes:Buffer.concat(f,m),stat:d,realPath:w}}finally{await c.close()}}function bh(i){let e=i?.code;return e==="ENOENT"||e==="ENOTDIR"}function Fr(i,e){let t=fe.relative(i,e);return t===""||!fe.isAbsolute(t)&&t!==".."&&!t.startsWith(`..${fe.sep}`)}async function Zs(i,e){let t=fe.resolve(i),n=await Fi.lstat(t);if(!n.isDirectory()||n.isSymbolicLink())throw new Error(`${e} project root must be a real directory`);return Fi.realpath(t)}async function ec(i,e,t,n){let r=i;for(let a=0;a<t.length;a++){r=fe.join(r,t[a]);let o;try{o=await Fi.lstat(r)}catch(h){if(bh(h))return{exists:!1,kind:"missing"};throw h}let s=fe.relative(i,r).replaceAll("\\","/");if(o.isSymbolicLink())throw new Error(`${n.label} crosses a symbolic link or junction at ${s}`);let c=a===t.length-1;if(!c&&!o.isDirectory())throw new Error(`${n.label} ancestor ${s} must be a real directory`);if(c&&(n.expected==="file"&&!o.isFile()||n.expected==="directory"&&!o.isDirectory()||n.expected==="any"&&!o.isFile()&&!o.isDirectory()))throw new Error(`${n.label} must be a real ${n.expected}`);let l=await Fi.realpath(r);if(!Fr(e,l))throw new Error(`${n.label} resolves outside the project root`);if(c)return{exists:!0,kind:o.isFile()?"file":o.isDirectory()?"directory":"missing"}}return{exists:!0,kind:"directory"}}async function St(i,e,t){let n=Hr(e,t.label),r=fe.resolve(i),a=await Zs(r,t.label),o=n.split("/"),s=fe.resolve(r,...o);if(!Fr(r,s))throw new Error(`${t.label} must stay inside the project root`);let c=await ec(r,a,o,t);return{projectRoot:r,target:s,relative:n,exists:c.exists,kind:c.kind}}async function Me(i,e,t,n){let r=await St(i,e,{label:n.label,expected:"file"});if(!r.exists){let o=new Error(`${n.label} does not exist`);throw o.code="ENOENT",o}let a=await Zs(r.projectRoot,n.label);return bt(r.target,t,{...n,verify:async(o,s)=>{if(!Fr(a,s.realPath))throw new Error(`${n.label} resolves outside the project root`);await ec(r.projectRoot,a,r.relative.split("/"),{label:n.label,expected:"file"})}})}var kt=".comet/config.yaml";function Br(i,e){return i.exists===e.exists&&i.sha256===e.sha256}function kh(i){let e=i?.code;return e==="ENOENT"||e==="ENOTDIR"}async function qr(i,e={}){return(await Et(i,e)).document}async function tc(i){try{return(await Me(i,kt,$i,{label:kt})).bytes}catch(e){if(kh(e))return null;throw e}}function ic(i){return i?{exists:!0,sha256:Sh("sha256").update(i).digest("hex")}:{exists:!1,sha256:null}}async function Bi(i){return ic(await tc(i))}async function Et(i,e={}){let t=await tc(i);return{document:t?yt(t.toString("utf8"),e):null,identity:ic(t)}}var Nv=16*1024;async function zr(i,e){if(!e)return;let t=await Bi(i);if(!Br(t,e))throw new Error("Project config changed before commit; rerun the operation")}import{randomUUID as Ph}from"crypto";import{promises as $}from"fs";import z from"path";function Jr(i,e){let t=z.relative(i,e);return t===""||!z.isAbsolute(t)&&t!==".."&&!t.startsWith(`..${z.sep}`)}function Ah(i,e){return O({...i,birthtime:i.birthtimeMs},{...e,birthtime:e.birthtimeMs})}function Wr(i,e){let t={...i,birthtime:i.birthtimeMs},n={...e,birthtime:e.birthtimeMs};return V(t,n)?O(t,n):O(t,n)&&i.birthtimeMs===e.birthtimeMs&&i.ctimeMs===e.ctimeMs&&i.size===e.size}async function nc(i){let e=await $.lstat(i);if(!e.isDirectory()||e.isSymbolicLink())throw new Error(`Native atomic write parent must be a real directory: ${i}`);return{path:i,realPath:await $.realpath(i),dev:e.dev,ino:e.ino,birthtimeMs:e.birthtimeMs}}async function Ct(i){for(let e of i){let t=await $.lstat(e.path);if(!t.isDirectory()||t.isSymbolicLink()||!Ah(e,t)||await $.realpath(e.path)!==e.realPath)throw new Error(`Native atomic write parent changed before commit: ${e.path}`)}}async function xh(i,e){let t=z.resolve(i),n=z.resolve(e);if(!Jr(t,n))throw new Error(`Native atomic write parent is outside its managed root: ${e}`);let r=[await nc(t)],a=z.relative(t,n).split(z.sep).filter(Boolean),o=t;for(let s of a){await Ct(r),o=z.join(o,s);try{await $.mkdir(o)}catch(l){if(l.code!=="EEXIST")throw l}let c=await nc(o);if(!Jr(r[0].realPath,c.realPath))throw new Error(`Native atomic write parent resolves outside its managed root: ${o}`);r.push(c)}return await Ct(r),r}async function Th(i){let e;try{e=await $.open(i,"r"),await e.sync()}catch(t){let n=t.code;if(!["EACCES","EBADF","EINVAL","EISDIR","ENOTSUP","EPERM"].includes(n??""))throw t}finally{await e?.close()}}async function Ih(i,e,t={}){let n=z.dirname(i),r=t.containedRoot?await xh(t.containedRoot,n):null;r||await $.mkdir(n,{recursive:!0});let a=z.join(n,`.${z.basename(i)}.${Ph()}.tmp`),o,s;try{if(await t.beforeTemporaryOpen?.(),o=await $.open(a,"wx"),s=await o.stat(),r){let[c,l]=await Promise.all([$.lstat(a),$.realpath(a)]);if(await Ct(r),!c.isFile()||c.isSymbolicLink()||!Wr(s,c)||!Jr(r[0].realPath,l))throw new Error("Native atomic write temporary file opened outside its managed parent")}if(typeof e=="string"?await o.writeFile(e,"utf8"):await o.writeFile(e),await o.sync(),!Wr(s,await o.stat()))throw new Error("Native atomic write temporary file changed while writing");if(await o.close(),o=void 0,await t.beforeCommit?.(),r){await Ct(r);let c=await $.lstat(a);if(!c.isFile()||c.isSymbolicLink()||!s||!Wr(c,s))throw new Error("Native atomic write temporary file changed before commit")}t.exclusive?(await $.link(a,i),await $.unlink(a)):await $.rename(a,i),await Th(n)}catch(c){if(await o?.close(),!r)await $.rm(a,{force:!0});else try{await Ct(r),await $.rm(a,{force:!0})}catch{}throw c}}async function Rt(i,e,t={}){await Ih(i,e,t)}import{promises as Se}from"fs";import A from"path";import _h from"os";var Vi=".comet/config.yaml";async function Kr(i){try{return await Se.lstat(i),!0}catch(e){if(e.code==="ENOENT")return!1;throw e}}async function Oh(i){try{let e=await Se.readFile(i,"utf8");return/^schema:\s*comet\.project\.v1\s*$/mu.test(e)}catch(e){if(e.code==="ENOENT")return!1;throw e}}function qi(i,e){let t=A.relative(i,e);return t===""||!A.isAbsolute(t)&&t!==".."&&!t.startsWith(`..${A.sep}`)}async function Pt(i){let e=[],t=i;for(;!await Kr(t);){let r=A.dirname(t);if(r===t)break;e.push(A.basename(t)),t=r}let n=await Se.realpath(t);return A.resolve(n,...e.reverse())}async function rc(i){try{return(await Se.lstat(i)).isSymbolicLink()}catch(e){if(e.code==="ENOENT")return!1;throw e}}async function Gr(i){let e=A.resolve(i);try{(await Se.stat(e)).isDirectory()||(e=A.dirname(e))}catch(r){if(r.code!=="ENOENT")throw r}let t=e,n=A.resolve(_h.homedir());for(;;){if(!(e===n&&t!==n)){let o=A.join(e,...Vi.split("/")),s=e===t||await Oh(o);if(await Kr(o)&&s)return e}if(await Kr(A.join(e,".git")))return e;let a=A.dirname(e);if(a===e)return t;e=a}}function At(i){return Ne(i)}async function jh(i,e){let t=At(e),n=A.resolve(i,...t.split("/")),r=await Se.realpath(i),a=await Pt(n);if(!qi(r,a))throw new Error("native.artifact_root resolves outside the project root");return n}async function zi(i,e){let t=At(e),n=await jh(i,t),r=A.join(n,"comet");if(await rc(r))throw new Error("The configured Native comet root must not be a symbolic link");let[a,o]=await Promise.all([Pt(n),Pt(r)]);if(!qi(a,o))throw new Error("The configured Native comet root resolves outside its artifact root");return{projectRoot:A.resolve(i),configFile:A.join(i,...Vi.split("/")),artifactRoot:n,artifactRootRef:t,nativeRoot:r,specsDir:A.join(r,"specs"),changesDir:A.join(r,"changes"),archiveDir:A.join(r,"archive"),runtimeDir:A.join(r,"runtime"),locksDir:A.join(r,"runtime","locks"),transactionsDir:A.join(r,"runtime","transactions")}}async function ac(i){let e=[i.specsDir,i.changesDir,i.archiveDir,i.locksDir,i.transactionsDir];await Promise.all(e.map(async t=>{await M(i.nativeRoot,t),await Se.mkdir(t,{recursive:!0})}))}async function M(i,e){let t=A.resolve(i),n=A.resolve(e);if(!qi(t,n))throw new Error(`Path is outside the Native root: ${e}`);if(await rc(t))throw new Error(`Native root must not be a symbolic link: ${i}`);let[r,a]=await Promise.all([Pt(t),Pt(n)]);if(!qi(r,a))throw new Error(`Path resolves outside the Native root: ${e}`);return n}function oc(i="docs",e="en"){return Mr(i,e)}async function De(i){let e=(await qr(i))?.config??null;return e?.native?e:null}async function sc(i,e,t={}){let n=await Et(i,{allowPartialProject:!0}),r=Li(n.document?.value??{},e),a=$h.join(i,...Vi.split("/"));await Rt(a,Hi(r,e.native.language==="zh-CN"?"zh-CN":"en"),{containedRoot:i,beforeCommit:async()=>{await t.beforeCommit?.(),await zr(i,n.identity)}})}import Op from"path";var hc=ia(Or(),1);var Yr=1024*1024;import{AsyncLocalStorage as Hh}from"async_hooks";var fg=16*1024;var dg=new Hh;import{TextDecoder as Mh}from"util";var Eg=256*1024,Cg=1024*1024,Rg=16*1024;var Pg=64*1024*1024;var Ag=new Mh("utf-8",{fatal:!0});import{createHash as Fh}from"crypto";function W(i){return Fh("sha256").update(i).digest("hex")}var Kg={maxFiles:1e4,maxFileBytes:5*1024*1024,maxTotalBytes:64*1024*1024,maxManifestBytes:1024*1024};var Gg=8*1024*1024;var Ug=64*1024,Yg=64*1024;var Xg={maxRecords:2e4,maxBytes:8*1024*1024,maxRecordBytes:64*1024},Qg={maxNodes:2e4,maxBytes:8*1024*1024,maxPathBytes:64*1024};var Zg=(1n<<256n)-1n;var Vw=256*1024;var iy={runStateBytes:256*1024,trajectoryBytes:8*1024*1024,trajectoryEvents:4096,trajectoryEventBytes:256*1024,checkpointBytes:256*1024,pendingActionBytes:256*1024,contextBytes:1024*1024,artifactsBytes:1024*1024};var py=16*1024;var pc=["schema","name","language","phase","brief","approval","spec_changes","verification_result","verification_report","archived","created_at","run_id"],Ly=new Set(pc),Yh=new Set([...pc,"minimum_runtime_version","revision"]),My=new Set([...Yh,"approved_contract_hash","implementation_scope","verification_evidence","partial_allowance","verification_protocol"]);var Ji=class extends Error{constructor(t,n,r){super(`Native change ${t} revision conflict: expected ${n}, actual ${r}`);this.change=t;this.expectedRevision=n;this.actualRevision=r;this.name="NativeChangeRevisionConflictError"}change;expectedRevision;actualRevision;code="native-change-revision-conflict"},Ki=class extends Error{constructor(t,n,r,a,o,s=null,c=null){super(`Native change ${t} baseline is incomplete (${n} omitted entr${n===1?"y":"ies"}). Adjust native.snapshot scope or resource budgets in .comet/config.yaml, then retry.`);this.change=t;this.omittedCount=n;this.omittedByReason=r;this.samplePaths=a;this.sampleTruncated=o;this.effectiveLimits=s;this.policyHash=c;this.name="NativeBaselineIncompleteError"}change;omittedCount;omittedByReason;samplePaths;sampleTruncated;effectiveLimits;policyHash;code="native-baseline-incomplete"},Dy=["# Outcome","","# Scope","","# Non-goals","","# Acceptance examples","","# Constraints and invariants","","# Decisions","","# Open questions","","# Verification expectations",""].join(`
|
|
164
|
+
`);var Fy=256*1024;var Qh=["Outcome","Scope","Non-goals","Acceptance examples"],Jy=[...Qh,"Constraints and invariants","Decisions","Open questions","Verification expectations"];import{createHash as Zh}from"crypto";function J(i){throw new TypeError(`Value is not valid canonical JSON: ${i}`)}function ep(i,e){e.has(i)&&J("cyclic structures are not supported"),e.add(i);try{let t=Object.keys(i);for(let n=0;n<i.length;n+=1)Object.prototype.hasOwnProperty.call(i,n)||J("sparse arrays are not supported");return(t.length!==i.length||t.some((n,r)=>n!==String(r)))&&J("arrays must not have named enumerable properties"),Object.getOwnPropertySymbols(i).length>0&&J("symbol properties are not supported"),`[${i.map(n=>Qr(n,e)).join(",")}]`}finally{e.delete(i)}}function tp(i,e){let t=Object.getPrototypeOf(i);t!==Object.prototype&&t!==null&&J("only plain objects are supported"),e.has(i)&&J("cyclic structures are not supported"),Object.getOwnPropertySymbols(i).length>0&&J("symbol properties are not supported"),e.add(i);try{let n=Object.getOwnPropertyDescriptors(i);return`{${Object.keys(i).sort().map(o=>{let s=n[o];return(!s||!("value"in s))&&J("accessor properties are not supported"),`${JSON.stringify(o)}:${Qr(s.value,e)}`}).join(",")}}`}finally{e.delete(i)}}function Qr(i,e){if(i===null)return"null";switch(typeof i){case"boolean":return i?"true":"false";case"string":return JSON.stringify(i);case"number":return Number.isFinite(i)||J("numbers must be finite"),JSON.stringify(Object.is(i,-0)?0:i);case"object":return Array.isArray(i)?ep(i,e):tp(i,e);case"bigint":case"function":case"symbol":case"undefined":return J(`${typeof i} values are not supported`)}return J("unsupported value type")}function Zr(i){return Qr(i,new Set)}function K(i,e){if(i.length===0)throw new TypeError("Canonical hash tag must be non-empty");if(/[\r\n]/u.test(i))throw new TypeError("Canonical hash tag must not contain a line break");return Zh("sha256").update(`${i}
|
|
165
|
+
${Zr(e)}`).digest("hex")}var ip=Object.freeze({maxChanges:32,maxSpecsPerChange:64,maxArtifactsPerChange:128,maxTotalSpecs:512,maxTotalArtifacts:1024,maxSignalsPerRelationship:8,maxRelationships:256,maxSerializedBytes:64*1024,maxNameBytes:128,maxCapabilityBytes:128,maxArtifactPathBytes:512});var mc=1024*1024;var gc="scoped-text-safety",np=1,rp=Object.freeze({maxFiles:256,maxFileBytes:2*1024*1024,maxTotalBytes:8*1024*1024,maxIssues:128});var ap="comet.native.checker-policy.v1";var fN=K(ap,{policy:gc,version:np,limits:rp,checks:["conflict-marker","space-before-tab","trailing-whitespace"],binaryHandling:"skip-and-count"});var op=["contract-before-does-not-match-scope","implementation-before-does-not-match-scope","contract-changed-during-check","implementation-changed-during-check","contract-after-does-not-match-scope","implementation-after-does-not-match-scope"],dN=new Set(op);var cp=mc,TN=3*cp;var wc={root:"/comet/native-runtime",packageKind:"runtime",definition:{apiVersion:"comet/v1alpha1",kind:"Skill",metadata:{name:"comet-native-runtime",version:"3",description:"Comet-owned state runtime for the Native workflow."},goal:{statement:"Advance a Native change only after its current guard passes.",inputs:[],outputs:[],success:["The Native change and Run state agree on the next phase."]},orchestration:{mode:"deterministic",entry:"shape",steps:[{id:"shape",action:{type:"checkpoint"},next:"build"},{id:"build",action:{type:"checkpoint"},next:"verify"},{id:"verify",action:{type:"checkpoint"},next:"archive"},{id:"archive",action:{type:"checkpoint"}}]},skills:[],agents:[],tools:[]},guardrails:{allowedSkills:[],allowedAgents:[],allowedTools:[],maxIterations:Number.MAX_SAFE_INTEGER,maxRetriesPerAction:2,confirmationRequiredFor:[]},evals:[]},lp=W("comet-native-runtime:v3:semantic-repair-budget"),ab=[{skillVersion:"2",skillHash:W("comet-native-runtime:v2:max-iterations-32")},{skillVersion:"1",skillHash:W("comet-native-runtime:v1")}];var Nc=["schema","id","change","evidenceHash","createdAt","previousState","nextState","previousRun","nextRun","eventData"],Bb=new Set(Nc),gp=new Set([...Nc,"minimum_runtime_version","revision"]),qb=new Set([...gp,"operation"]),Vb=512*1024,wp=new Set(["previousPhase","nextPhase","evidenceHash","summary","artifacts","noCodeReason","verificationResult"]),zb=new Set([...wp,"implementationScopeHash","repairScopeHash","repairStagnation"]);var Kb=Object.freeze({maxItems:16,maxTextBytes:512,maxContextItems:4,maxContextItemBytes:256,maxFailedCheckIds:16,maxSerializedBytes:32*1024}),bc=Object.freeze({maxCriteria:1024});var eS={maxAcceptanceCriteria:bc.maxCriteria};var aS={maxSpecs:64,maxFileBytes:Yr,maxTotalBytes:4*1024*1024};import{execFile as Rp,spawn as WS}from"node:child_process";import{promisify as Pp}from"node:util";var vS={maxArtifacts:128,maxFileBytes:16*1024*1024,maxTotalBytes:64*1024*1024,maxDocumentBytes:256*1024};var MS=512*1024;var ak=64*1024;var ok=3600*1e3;var sk=Pp(Rp);var ck=["$ProgressPreference = 'SilentlyContinue'","$encoded = $env:COMET_NATIVE_COMMAND_PAYLOAD","Remove-Item Env:COMET_NATIVE_COMMAND_PAYLOAD -ErrorAction SilentlyContinue","$json = [Text.Encoding]::UTF8.GetString([Convert]::FromBase64String($encoded))","$payload = ConvertFrom-Json $json","$commandArgs = @($payload.arguments)","& $payload.command @commandArgs","if ($null -eq $LASTEXITCODE) { if ($?) { exit 0 } else { exit 1 } }","exit $LASTEXITCODE"].join("; ");var Ui=class extends Error{details;constructor(e){let t=e.length===0?"Native verification receipt binding is invalid":`Native verification receipt binding is invalid (${e.length} receipt(s)): ${e.map(n=>`${n.ref}${n.acceptanceId?`[${n.acceptanceId}]`:""} -> ${n.mismatches.join("; ")}`).join(" | ")}`;super(t),this.name="NativeVerificationReceiptBindingError",this.details=e}};var Gk={maxDepth:128,maxEntries:2e4,maxFileBytes:64*1024*1024,maxTotalBytes:256*1024*1024,maxManifestBytes:16*1024*1024,maxRefBytes:4*1024};var oE=16*1024*1024,sE=256*1024,cE=16*1024;var fE=16*1024;var kE=16*1024;var fC=16*1024*1024,Yi=class extends Error{constructor(t,n,r,a){super(`Canonical spec conflict for ${t}: expected ${n??"(missing)"}, actual ${r??"(missing)"}`);this.capability=t;this.expectedHash=n;this.actualHash=r;this.canonicalPath=a;this.name="NativeSpecConflictError"}capability;expectedHash;actualHash;canonicalPath;code="native-spec-conflict"},Xi=class extends Error{constructor(t,n=t.ready?"Native Archive preflight no longer matches the expected hash":`Native Archive preflight is blocked: ${t.findingCodes.join(", ")}`){super(n);this.preflight=t;this.name="NativeArchivePreflightError"}preflight;code="native-archive-preflight"};var bC=10*1024*1024,he=class extends Error{};function kc(i,e){let t=i.flatMap((n,r)=>n===e?[r]:[]);if(t.length>1)throw new he(`${e} may only be provided once`);return t.length===0?!1:(i.splice(t[0],1),!0)}function It(i,e){let t=i.flatMap((a,o)=>a===e?[o]:[]);if(t.length>1)throw new he(`${e} may only be provided once`);if(t.length===0)return;let n=t[0],r=i[n+1];if(r===void 0||r.startsWith("--"))throw new he(`${e} requires a value`);return i.splice(n,2),r}function Ec(i){if(i.length>0)throw new he(`Unexpected argument: ${i[0]}`)}function Cc(i,e="en"){let t=It(i,"--language")??e;if(t!=="en"&&t!=="zh-CN")throw new he("--language must be en or zh-CN");return t}async function Rc(i){return i?Op.resolve(i):Gr(process.cwd())}function Pc(i,e,t){return{command:i,exitCode:0,data:e,text:t??JSON.stringify(e,null,2)+`
|
|
166
|
+
`}}function Ac(i,e){if(e instanceof he)return{command:i,exitCode:64,error:{code:"usage",message:e.message}};if(e instanceof Yi)return{command:i,exitCode:73,data:{capability:e.capability,expectedHash:e.expectedHash,actualHash:e.actualHash,canonicalPath:e.canonicalPath},error:{code:"conflict",message:e.message}};if(e instanceof Xi)return{command:i,exitCode:73,data:e.preflight,error:{code:"conflict",message:e.message}};if(e instanceof Ji)return{command:i,exitCode:73,data:{change:e.change,expectedRevision:e.expectedRevision,actualRevision:e.actualRevision,outcome:"revision-conflict"},error:{code:"conflict",message:e.message}};if(e instanceof Ki)return{command:i,exitCode:65,data:{change:e.change,complete:!1,omittedCount:e.omittedCount,omittedByReason:e.omittedByReason,samplePaths:e.samplePaths,sampleTruncated:e.sampleTruncated,effectiveLimits:e.effectiveLimits,policyHash:e.policyHash,configPath:".comet/config.yaml",supportedFixes:["increase native.snapshot.max_files, native.snapshot.max_total_bytes, or native.snapshot.max_duration_ms","add an explicit native.snapshot.exclude pattern for data outside implementation scope"],requiredAction:"resolve-native-baseline"},error:{code:"baseline-incomplete",message:e.message}};if(e instanceof Ui)return{command:i,exitCode:65,data:{receiptBindingFailures:e.details},error:{code:"invalid-data",message:e.message}};if(e instanceof Error){let t=e.code;if(t&&new Set(["EACCES","EPERM","EIO","EMFILE","ENFILE","ENOSPC","EROFS"]).has(t))return{command:i,exitCode:70,error:{code:"internal",message:e.message}};let n=/\b(lock|transaction|conflict|occupied|incomplete|recovery)\b/iu.test(e.message);return{command:i,exitCode:n?73:65,error:{code:n?"conflict":"invalid-data",message:e.message}}}return{command:i,exitCode:70,error:{code:"internal",message:String(e)}}}function xc(i,e){return e?{exitCode:i.exitCode,stdout:JSON.stringify({command:i.command,exitCode:i.exitCode,...i.data===void 0?{}:{data:i.data},...i.error===void 0?{}:{error:i.error}})+`
|
|
167
|
+
`}:i.error?{exitCode:i.exitCode,stderr:i.error.message}:{exitCode:i.exitCode,stdout:i.text}}async function Tc(i,e){let t=It(i,"--root"),n=await De(e),r=Cc(i,n?.native.language??"en");if(Ec(i),n?.native.pending_root_move)throw new Error(`Native root move ${n.native.pending_root_move.id} is incomplete`);let a=At(t??n?.native.artifact_root??"docs");if(n&&t&&n.native.artifact_root!==a)throw new Error(`Configured Native artifact root is ${n.native.artifact_root}; refusing conflicting root ${a}`);let o=n?{...n,native:{...n.native,language:r}}:oc(a,r),s=await zi(e,o.native.artifact_root);return await ac(s),await sc(e,o),Pc("init",{projectRoot:e,artifactRoot:o.native.artifact_root,nativeRoot:s.nativeRoot,language:r},`Initialized Comet Native at ${s.nativeRoot}
|
|
168
|
+
`)}function jp(i){return{exitCode:i.exitCode,stdout:JSON.stringify({command:i.command,exitCode:i.exitCode,...i.data===void 0?{}:{data:i.data},...i.error===void 0?{}:{error:i.error}})+`
|
|
169
|
+
`}}async function Ic(i,e,t=process.argv.slice(2)){let n=t.indexOf("--"),r=n<0?[...t]:t.slice(0,n),a=n<0?[]:t.slice(n),o=r.includes("--json"),s,c;try{kc(r,"--json"),s=It(r,"--project-root");let h=[...r,...a],u=await Rc(s);c=await e(h,u)}catch(h){c=Ac(i,h)}let l=o?jp(c):xc(c,!1);return l.stdout&&process.stdout.write(l.stdout),l.stderr&&process.stderr.write(l.stderr+(l.stderr.endsWith(`
|
|
170
|
+
`)?"":`
|
|
171
|
+
`)),l.exitCode}process.exitCode=await Ic("init",Tc);
|