@rpamis/comet 0.4.0-rc.1 → 0.4.0-rc.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (423) hide show
  1. package/README.md +4 -651
  2. package/assets/manifest.json +1 -1
  3. package/assets/skills/comet/scripts/comet-archive.mjs +80 -80
  4. package/assets/skills/comet/scripts/comet-entry-runtime.mjs +1 -1
  5. package/assets/skills/comet/scripts/comet-guard.mjs +102 -102
  6. package/assets/skills/comet/scripts/comet-handoff.mjs +82 -82
  7. package/assets/skills/comet/scripts/comet-hook-guard.mjs +69 -70
  8. package/assets/skills/comet/scripts/comet-hook-router.mjs +120 -121
  9. package/assets/skills/comet/scripts/comet-intent.mjs +6 -6
  10. package/assets/skills/comet/scripts/comet-resume-probe.mjs +48 -48
  11. package/assets/skills/comet/scripts/comet-runtime.mjs +174 -175
  12. package/assets/skills/comet/scripts/comet-state.mjs +105 -105
  13. package/assets/skills/comet/scripts/comet-yaml-validate.mjs +17 -17
  14. package/assets/skills/comet-native/SKILL.md +6 -5
  15. package/assets/skills/comet-native/reference/commands.md +7 -6
  16. package/assets/skills/comet-native/scripts/comet-native-archive.mjs +124 -118
  17. package/assets/skills/comet-native/scripts/comet-native-doctor.mjs +131 -125
  18. package/assets/skills/comet-native/scripts/comet-native-hook-guard.mjs +97 -90
  19. package/assets/skills/comet-native/scripts/comet-native-init.mjs +121 -115
  20. package/assets/skills/comet-native/scripts/comet-native-new.mjs +113 -107
  21. package/assets/skills/comet-native/scripts/comet-native-next.mjs +134 -128
  22. package/assets/skills/comet-native/scripts/comet-native-root.mjs +101 -95
  23. package/assets/skills/comet-native/scripts/comet-native-runtime.mjs +166 -159
  24. package/assets/skills/comet-native/scripts/comet-native-select.mjs +114 -108
  25. package/assets/skills/comet-native/scripts/comet-native-show.mjs +98 -92
  26. package/assets/skills/comet-native/scripts/comet-native-spec.mjs +107 -101
  27. package/assets/skills/comet-native/scripts/comet-native-status.mjs +111 -105
  28. package/assets/skills-zh/comet-native/SKILL.md +6 -5
  29. package/assets/skills-zh/comet-native/reference/commands.md +7 -6
  30. package/dist/app/commands/bundle.d.ts.map +1 -1
  31. package/dist/app/commands/bundle.js.map +1 -1
  32. package/dist/app/commands/dashboard.d.ts +1 -1
  33. package/dist/app/commands/dashboard.js +1 -1
  34. package/dist/app/commands/doctor.d.ts.map +1 -1
  35. package/dist/app/commands/doctor.js +1 -1
  36. package/dist/app/commands/doctor.js.map +1 -1
  37. package/dist/app/commands/init.js +2 -2
  38. package/dist/app/commands/init.js.map +1 -1
  39. package/dist/app/commands/platform-select-prompt.d.ts.map +1 -1
  40. package/dist/app/commands/platform-select-prompt.js +1 -0
  41. package/dist/app/commands/platform-select-prompt.js.map +1 -1
  42. package/dist/app/commands/status.d.ts.map +1 -1
  43. package/dist/app/commands/status.js +49 -9
  44. package/dist/app/commands/status.js.map +1 -1
  45. package/dist/app/commands/update.d.ts.map +1 -1
  46. package/dist/app/commands/update.js +13 -49
  47. package/dist/app/commands/update.js.map +1 -1
  48. package/dist/domains/agent-learning/policy-compiler.d.ts.map +1 -1
  49. package/dist/domains/agent-learning/policy-compiler.js.map +1 -1
  50. package/dist/domains/agent-learning/types.d.ts.map +1 -1
  51. package/dist/domains/agent-learning/types.js.map +1 -1
  52. package/dist/domains/bundle/authoring.d.ts.map +1 -1
  53. package/dist/domains/bundle/authoring.js.map +1 -1
  54. package/dist/domains/bundle/next-action.d.ts.map +1 -1
  55. package/dist/domains/bundle/next-action.js.map +1 -1
  56. package/dist/domains/bundle/readiness-user-summary.d.ts.map +1 -1
  57. package/dist/domains/bundle/readiness-user-summary.js.map +1 -1
  58. package/dist/domains/bundle/types.d.ts.map +1 -1
  59. package/dist/domains/comet-classic/classic-archive.d.ts.map +1 -1
  60. package/dist/domains/comet-classic/classic-archive.js +15 -0
  61. package/dist/domains/comet-classic/classic-archive.js.map +1 -1
  62. package/dist/domains/comet-classic/classic-cli.d.ts +8 -0
  63. package/dist/domains/comet-classic/classic-cli.d.ts.map +1 -1
  64. package/dist/domains/comet-classic/classic-cli.js +10 -0
  65. package/dist/domains/comet-classic/classic-cli.js.map +1 -1
  66. package/dist/domains/comet-classic/classic-guard.d.ts.map +1 -1
  67. package/dist/domains/comet-classic/classic-guard.js +20 -0
  68. package/dist/domains/comet-classic/classic-guard.js.map +1 -1
  69. package/dist/domains/comet-classic/classic-handoff.d.ts.map +1 -1
  70. package/dist/domains/comet-classic/classic-handoff.js +13 -0
  71. package/dist/domains/comet-classic/classic-handoff.js.map +1 -1
  72. package/dist/domains/comet-classic/classic-hook-guard.d.ts.map +1 -1
  73. package/dist/domains/comet-classic/classic-hook-guard.js +14 -15
  74. package/dist/domains/comet-classic/classic-hook-guard.js.map +1 -1
  75. package/dist/domains/comet-classic/classic-layout-initialization.d.ts.map +1 -1
  76. package/dist/domains/comet-classic/classic-layout-initialization.js.map +1 -1
  77. package/dist/domains/comet-classic/classic-output-language.d.ts +73 -0
  78. package/dist/domains/comet-classic/classic-output-language.d.ts.map +1 -0
  79. package/dist/domains/comet-classic/classic-output-language.js +175 -0
  80. package/dist/domains/comet-classic/classic-output-language.js.map +1 -0
  81. package/dist/domains/comet-classic/classic-script-entry.d.ts.map +1 -1
  82. package/dist/domains/comet-classic/classic-script-entry.js +10 -0
  83. package/dist/domains/comet-classic/classic-script-entry.js.map +1 -1
  84. package/dist/domains/comet-classic/classic-state-command.d.ts.map +1 -1
  85. package/dist/domains/comet-classic/classic-state-command.js +43 -4
  86. package/dist/domains/comet-classic/classic-state-command.js.map +1 -1
  87. package/dist/domains/comet-entry/current-selection.d.ts.map +1 -1
  88. package/dist/domains/comet-entry/current-selection.js.map +1 -1
  89. package/dist/domains/comet-entry/init-workflow.d.ts.map +1 -1
  90. package/dist/domains/comet-entry/init-workflow.js.map +1 -1
  91. package/dist/domains/comet-entry/project-status.d.ts.map +1 -1
  92. package/dist/domains/comet-entry/project-status.js +15 -3
  93. package/dist/domains/comet-entry/project-status.js.map +1 -1
  94. package/dist/domains/comet-entry/types.d.ts +5 -1
  95. package/dist/domains/comet-entry/types.d.ts.map +1 -1
  96. package/dist/domains/comet-memory/personal-memory.d.ts.map +1 -1
  97. package/dist/domains/comet-memory/personal-memory.js.map +1 -1
  98. package/dist/domains/comet-memory/types.d.ts.map +1 -1
  99. package/dist/domains/comet-memory/types.js.map +1 -1
  100. package/dist/domains/comet-native/native-atomic-file.d.ts +1 -0
  101. package/dist/domains/comet-native/native-atomic-file.d.ts.map +1 -1
  102. package/dist/domains/comet-native/native-atomic-file.js +19 -0
  103. package/dist/domains/comet-native/native-atomic-file.js.map +1 -1
  104. package/dist/domains/comet-native/native-children.d.ts +17 -0
  105. package/dist/domains/comet-native/native-children.d.ts.map +1 -1
  106. package/dist/domains/comet-native/native-children.js +86 -9
  107. package/dist/domains/comet-native/native-children.js.map +1 -1
  108. package/dist/domains/comet-native/native-cli-help.d.ts.map +1 -1
  109. package/dist/domains/comet-native/native-cli-help.js +3 -2
  110. package/dist/domains/comet-native/native-cli-help.js.map +1 -1
  111. package/dist/domains/comet-native/native-cli-shared.d.ts +7 -1
  112. package/dist/domains/comet-native/native-cli-shared.d.ts.map +1 -1
  113. package/dist/domains/comet-native/native-cli-shared.js +51 -4
  114. package/dist/domains/comet-native/native-cli-shared.js.map +1 -1
  115. package/dist/domains/comet-native/native-cli.d.ts.map +1 -1
  116. package/dist/domains/comet-native/native-cli.js +4 -2
  117. package/dist/domains/comet-native/native-cli.js.map +1 -1
  118. package/dist/domains/comet-native/native-evidence-storage.d.ts.map +1 -1
  119. package/dist/domains/comet-native/native-evidence-storage.js.map +1 -1
  120. package/dist/domains/comet-native/native-lock.d.ts.map +1 -1
  121. package/dist/domains/comet-native/native-lock.js +10 -1
  122. package/dist/domains/comet-native/native-lock.js.map +1 -1
  123. package/dist/domains/comet-native/native-loop-runtime.d.ts +4 -1
  124. package/dist/domains/comet-native/native-loop-runtime.d.ts.map +1 -1
  125. package/dist/domains/comet-native/native-loop-runtime.js +39 -6
  126. package/dist/domains/comet-native/native-loop-runtime.js.map +1 -1
  127. package/dist/domains/comet-native/native-next-command.d.ts.map +1 -1
  128. package/dist/domains/comet-native/native-next-command.js +36 -2
  129. package/dist/domains/comet-native/native-next-command.js.map +1 -1
  130. package/dist/domains/comet-native/native-output-language.d.ts +69 -0
  131. package/dist/domains/comet-native/native-output-language.d.ts.map +1 -0
  132. package/dist/domains/comet-native/native-output-language.js +369 -0
  133. package/dist/domains/comet-native/native-output-language.js.map +1 -0
  134. package/dist/domains/comet-native/native-portable-archive.d.ts.map +1 -1
  135. package/dist/domains/comet-native/native-portable-archive.js +17 -1
  136. package/dist/domains/comet-native/native-portable-archive.js.map +1 -1
  137. package/dist/domains/comet-native/native-portable-continuation.d.ts.map +1 -1
  138. package/dist/domains/comet-native/native-portable-continuation.js +70 -27
  139. package/dist/domains/comet-native/native-portable-continuation.js.map +1 -1
  140. package/dist/domains/comet-native/native-portable-migration.d.ts.map +1 -1
  141. package/dist/domains/comet-native/native-portable-migration.js.map +1 -1
  142. package/dist/domains/comet-native/native-portable-recovery.d.ts +1 -0
  143. package/dist/domains/comet-native/native-portable-recovery.d.ts.map +1 -1
  144. package/dist/domains/comet-native/native-portable-recovery.js +2 -2
  145. package/dist/domains/comet-native/native-portable-recovery.js.map +1 -1
  146. package/dist/domains/comet-native/native-portable-runtime.d.ts +22 -0
  147. package/dist/domains/comet-native/native-portable-runtime.d.ts.map +1 -1
  148. package/dist/domains/comet-native/native-portable-runtime.js +114 -4
  149. package/dist/domains/comet-native/native-portable-runtime.js.map +1 -1
  150. package/dist/domains/comet-native/native-portable-state.d.ts.map +1 -1
  151. package/dist/domains/comet-native/native-portable-state.js +5 -0
  152. package/dist/domains/comet-native/native-portable-state.js.map +1 -1
  153. package/dist/domains/comet-native/native-portable-types.d.ts +3 -0
  154. package/dist/domains/comet-native/native-portable-types.d.ts.map +1 -1
  155. package/dist/domains/comet-native/native-portable-types.js.map +1 -1
  156. package/dist/domains/comet-native/native-runner-input.d.ts +30 -28
  157. package/dist/domains/comet-native/native-runner-input.d.ts.map +1 -1
  158. package/dist/domains/comet-native/native-runner-input.js +19 -27
  159. package/dist/domains/comet-native/native-runner-input.js.map +1 -1
  160. package/dist/domains/comet-native/native-schema-migration.d.ts.map +1 -1
  161. package/dist/domains/comet-native/native-schema-migration.js.map +1 -1
  162. package/dist/domains/comet-native/native-script-entry.d.ts +5 -4
  163. package/dist/domains/comet-native/native-script-entry.d.ts.map +1 -1
  164. package/dist/domains/comet-native/native-script-entry.js +8 -16
  165. package/dist/domains/comet-native/native-script-entry.js.map +1 -1
  166. package/dist/domains/comet-native/native-status-discovery.d.ts +31 -1
  167. package/dist/domains/comet-native/native-status-discovery.d.ts.map +1 -1
  168. package/dist/domains/comet-native/native-status-discovery.js +46 -8
  169. package/dist/domains/comet-native/native-status-discovery.js.map +1 -1
  170. package/dist/domains/comet-native/native-supervisor.d.ts +11 -1
  171. package/dist/domains/comet-native/native-supervisor.d.ts.map +1 -1
  172. package/dist/domains/comet-native/native-supervisor.js +61 -0
  173. package/dist/domains/comet-native/native-supervisor.js.map +1 -1
  174. package/dist/domains/comet-native/native-types.d.ts.map +1 -1
  175. package/dist/domains/comet-native/native-verification-receipt.d.ts.map +1 -1
  176. package/dist/domains/comet-native/native-verification-receipt.js.map +1 -1
  177. package/dist/domains/comet-native/native-workspace.d.ts.map +1 -1
  178. package/dist/domains/comet-native/native-workspace.js.map +1 -1
  179. package/dist/domains/comet-plugin/integration.d.ts +2 -0
  180. package/dist/domains/comet-plugin/integration.d.ts.map +1 -1
  181. package/dist/domains/comet-plugin/integration.js +10 -6
  182. package/dist/domains/comet-plugin/integration.js.map +1 -1
  183. package/dist/domains/dashboard/collector.js +1 -1
  184. package/dist/domains/dashboard/default-plugin-host.d.ts +3 -0
  185. package/dist/domains/dashboard/default-plugin-host.d.ts.map +1 -1
  186. package/dist/domains/dashboard/default-plugin-host.js +38 -4
  187. package/dist/domains/dashboard/default-plugin-host.js.map +1 -1
  188. package/dist/domains/dashboard/native-adapter.d.ts.map +1 -1
  189. package/dist/domains/dashboard/native-adapter.js.map +1 -1
  190. package/dist/domains/dashboard/native-collector.d.ts.map +1 -1
  191. package/dist/domains/dashboard/native-collector.js +2 -0
  192. package/dist/domains/dashboard/native-collector.js.map +1 -1
  193. package/dist/domains/dashboard/web/assets/abnfDiagram-VCTEODGH-UcCx24DV.js +1 -0
  194. package/dist/domains/dashboard/web/assets/arc-n8qsRq7W.js +1 -0
  195. package/dist/domains/dashboard/web/assets/architecture-7GRP2DOG-B5p4GzJf.js +1 -0
  196. package/dist/domains/dashboard/web/assets/architectureDiagram-5GKGNRK7-D4pJ8CU0.js +36 -0
  197. package/dist/domains/dashboard/web/assets/array-BifhSqXX.js +1 -0
  198. package/dist/domains/dashboard/web/assets/blockDiagram-I7D4REHJ-C7n-qrSQ.js +129 -0
  199. package/dist/domains/dashboard/web/assets/browser-CgwPGwaV.js +107 -0
  200. package/dist/domains/dashboard/web/assets/c4Diagram-7LVT6UL2-cMVrWYOm.js +38 -0
  201. package/dist/domains/dashboard/web/assets/channel-BZeSeXVb.js +1 -0
  202. package/dist/domains/dashboard/web/assets/chunk-2Q5K7J3B-C1jixKkw.js +1 -0
  203. package/dist/domains/dashboard/web/assets/chunk-4HAMMTFA-CE5QrCQd.js +62 -0
  204. package/dist/domains/dashboard/web/assets/{chunk-5VM5RSS4-CopXcnFA.js → chunk-5VM5RSS4-ZNzvKenW.js} +2 -2
  205. package/dist/domains/dashboard/web/assets/chunk-75Z2AOVW-BtZqN-pM.js +2 -0
  206. package/dist/domains/dashboard/web/assets/chunk-DU6HZSFF-CChv0huc.js +125 -0
  207. package/dist/domains/dashboard/web/assets/chunk-F27PBJKO-CDT1ttJ8.js +1 -0
  208. package/dist/domains/dashboard/web/assets/chunk-FOHPRMQF-DHwB1DNv.js +161 -0
  209. package/dist/domains/dashboard/web/assets/chunk-GMAD6QVW-y5m6LMR7.js +72 -0
  210. package/dist/domains/dashboard/web/assets/chunk-GVQU2GXP-DkhKkaHd.js +1 -0
  211. package/dist/domains/dashboard/web/assets/chunk-IMKFNOWR-BaDSh7Jp.js +231 -0
  212. package/dist/domains/dashboard/web/assets/chunk-JWPE2WC7-DVXcaiue.js +1 -0
  213. package/dist/domains/dashboard/web/assets/chunk-L3NEJ4N5-B4ztH2fV.js +1 -0
  214. package/dist/domains/dashboard/web/assets/chunk-OSK3NFVY-BhX6NVzA.js +10 -0
  215. package/dist/domains/dashboard/web/assets/chunk-P2QGCYS3-BCNdGJkX.js +1 -0
  216. package/dist/domains/dashboard/web/assets/chunk-POPQ4Y6H-DwYVuiXw.js +1 -0
  217. package/dist/domains/dashboard/web/assets/chunk-PWAF6VOD-Cyg0IO0R.js +1 -0
  218. package/dist/domains/dashboard/web/assets/chunk-SHT3W25Y-BZ6skx8I.js +168 -0
  219. package/dist/domains/dashboard/web/assets/chunk-SVP7TREG-CLIGmSO0.js +88 -0
  220. package/dist/domains/dashboard/web/assets/chunk-TICWLB2K-BAQBbsn9.js +206 -0
  221. package/dist/domains/dashboard/web/assets/chunk-XXDRQBXY-D07UbEpV.js +1 -0
  222. package/dist/domains/dashboard/web/assets/chunk-Y2CYZVJY-DsF7k-Jl.js +1 -0
  223. package/dist/domains/dashboard/web/assets/classDiagram-ZZMXUADV-2fcinal6.js +1 -0
  224. package/dist/domains/dashboard/web/assets/classDiagram-v2-VYDZK3BY-2fcinal6.js +1 -0
  225. package/dist/domains/dashboard/web/assets/cose-bilkent-JH36ORCC-wIi0mUih.js +1 -0
  226. package/dist/domains/dashboard/web/assets/cynefin-OW5HDTMX-DBdxyuTN.js +1 -0
  227. package/dist/domains/dashboard/web/assets/cynefinDiagram-5FMLGOSQ-DzO3jXxV.js +62 -0
  228. package/dist/domains/dashboard/web/assets/cytoscape.esm-CGd-uY3x.js +321 -0
  229. package/dist/domains/dashboard/web/assets/dagre-GXQ25YYZ-CE7H_hZS.js +4 -0
  230. package/dist/domains/dashboard/web/assets/dagre-PrKaheQc.js +1 -0
  231. package/dist/domains/dashboard/web/assets/defaultLocale-BFoDCU3G.js +1 -0
  232. package/dist/domains/dashboard/web/assets/demo-DrJ2uuUL.js +456 -0
  233. package/dist/domains/dashboard/web/assets/diagram-S7CK7UJ4-jUGQk5n-.js +30 -0
  234. package/dist/domains/dashboard/web/assets/diagram-UQ7AKVKN-DaH_zW8T.js +41 -0
  235. package/dist/domains/dashboard/web/assets/diagram-VSXAHHWV-DmG80db0.js +3 -0
  236. package/dist/domains/dashboard/web/assets/diagram-VX7I27RA-ltQ6niKn.js +24 -0
  237. package/dist/domains/dashboard/web/assets/diagram-Z3DM3KII-x92ex4lK.js +24 -0
  238. package/dist/domains/dashboard/web/assets/dist-Cf0h0n6i.js +1 -0
  239. package/dist/domains/dashboard/web/assets/ebnfDiagram-PWID7BFC-CI2u976k.js +1 -0
  240. package/dist/domains/dashboard/web/assets/erDiagram-RLTQ6QDP-DKs90SRd.js +99 -0
  241. package/dist/domains/dashboard/web/assets/es-D7xGlyQk.js +10 -0
  242. package/dist/domains/dashboard/web/assets/eventmodeling-NTZA5JFV-uARcGZPD.js +1 -0
  243. package/dist/domains/dashboard/web/assets/flowDiagram-HODETNUW-DXL1E4Bl.js +1 -0
  244. package/dist/domains/dashboard/web/assets/ganttDiagram-EL5Y4UJY-D3z6G60S.js +292 -0
  245. package/dist/domains/dashboard/web/assets/gitGraph-4MIJSDKK-vT1UnORT.js +1 -0
  246. package/dist/domains/dashboard/web/assets/gitGraphDiagram-WWUBYQGX-BJmJ96jv.js +106 -0
  247. package/dist/domains/dashboard/web/assets/graphlib-DS17s2tU.js +1 -0
  248. package/dist/domains/dashboard/web/assets/index-BG3MF8re.js +261 -0
  249. package/dist/domains/dashboard/web/assets/index-C2Hlo7VZ.css +1 -0
  250. package/dist/domains/dashboard/web/assets/info-A6RAGUB7-DFeLqqen.js +1 -0
  251. package/dist/domains/dashboard/web/assets/infoDiagram-27XIBGKW-DxuY43XD.js +2 -0
  252. package/dist/domains/dashboard/web/assets/init-C-OQMol4.js +1 -0
  253. package/dist/domains/dashboard/web/assets/ishikawaDiagram-5VMMS53U-DxillfWQ.js +70 -0
  254. package/dist/domains/dashboard/web/assets/journeyDiagram-3NMN7TZE-BPngQ3ag.js +139 -0
  255. package/dist/domains/dashboard/web/assets/kanban-definition-UXKFOSKX-DHMLEGD4.js +89 -0
  256. package/dist/domains/dashboard/web/assets/katex-CXMH3UgJ.js +257 -0
  257. package/dist/domains/dashboard/web/assets/line-D31peBjo.js +1 -0
  258. package/dist/domains/dashboard/web/assets/linear-B7X50T2m.js +1 -0
  259. package/dist/domains/dashboard/web/assets/marked.esm-BtJme7Pf.js +65 -0
  260. package/dist/domains/dashboard/web/assets/mermaid-parser.core-CX3Pzygh.js +7 -0
  261. package/dist/domains/dashboard/web/assets/mermaid.core-DlMjBFb6.js +44 -0
  262. package/dist/domains/dashboard/web/assets/mindmap-definition-YA3MSWOX-BKuSGF75.js +96 -0
  263. package/dist/domains/dashboard/web/assets/ordinal-BDEzSJ7C.js +1 -0
  264. package/dist/domains/dashboard/web/assets/packet-AYTQ26CC-B1T8Bds9.js +1 -0
  265. package/dist/domains/dashboard/web/assets/path-fybaL0A-.js +1 -0
  266. package/dist/domains/dashboard/web/assets/pegDiagram-XKGWAZYB-BYgTNxLw.js +1 -0
  267. package/dist/domains/dashboard/web/assets/pie-WAS4IAKB-fqAjmoQw.js +1 -0
  268. package/dist/domains/dashboard/web/assets/pieDiagram-E7YTZNPT-BAO0Ufky.js +39 -0
  269. package/dist/domains/dashboard/web/assets/purify.es-ChwZkWde.js +3 -0
  270. package/dist/domains/dashboard/web/assets/quadrantDiagram-AXDQQJYC-SA_1-7DT.js +7 -0
  271. package/dist/domains/dashboard/web/assets/radar-RG4KPBEZ-Bl_UfUle.js +1 -0
  272. package/dist/domains/dashboard/web/assets/railroad-74A4TZTK-yj6dkiSy.js +1 -0
  273. package/dist/domains/dashboard/web/assets/railroad-abnf-HS5TGJTU-CvouMciM.js +1 -0
  274. package/dist/domains/dashboard/web/assets/railroad-ebnf-LZEXJU2U-CkYQEX72.js +1 -0
  275. package/dist/domains/dashboard/web/assets/railroad-peg-WCYAUIDC-B0uYr48F.js +1 -0
  276. package/dist/domains/dashboard/web/assets/railroadDiagram-O6MQD6OU-DqV18Y46.js +1 -0
  277. package/dist/domains/dashboard/web/assets/requirementDiagram-BXWQKSXE-Ca2K5LuT.js +84 -0
  278. package/dist/domains/dashboard/web/assets/rough.esm-Dy-Kn_BL.js +1 -0
  279. package/dist/domains/dashboard/web/assets/sankeyDiagram-P5KCCOFB-D9MKl-Nr.js +40 -0
  280. package/dist/domains/dashboard/web/assets/sequenceDiagram-WJ2MYXX4-CXfvIzRx.js +162 -0
  281. package/dist/domains/dashboard/web/assets/sizeCapture-INFHLROL-B0uUizjq.js +1 -0
  282. package/dist/domains/dashboard/web/assets/src-CquUPIQx.js +1 -0
  283. package/dist/domains/dashboard/web/assets/stateDiagram-D77RDMKH-B7iaZHW7.js +1 -0
  284. package/dist/domains/dashboard/web/assets/stateDiagram-v2-MP3YSRHH-B6KoHQVe.js +1 -0
  285. package/dist/domains/dashboard/web/assets/swimlanes-42K2YHIH-OK-62yZl.js +1 -0
  286. package/dist/domains/dashboard/web/assets/swimlanesDiagram-VR7AAH4N-CjdOls9K.js +8 -0
  287. package/dist/domains/dashboard/web/assets/timeline-definition-24CTP7MA-D0l01B1h.js +120 -0
  288. package/dist/domains/dashboard/web/assets/treeView-Q6P3EWNA-Bg5u_o3A.js +1 -0
  289. package/dist/domains/dashboard/web/assets/treemap-WGGIJYW6-x89ccozk.js +1 -0
  290. package/dist/domains/dashboard/web/assets/vennDiagram-4TSXK5OY-DV19Cqhv.js +34 -0
  291. package/dist/domains/dashboard/web/assets/wardley-WFR3VGLG-BWoeoVk5.js +1 -0
  292. package/dist/domains/dashboard/web/assets/wardleyDiagram-VM6X3IG4-D4fCpoIP.js +78 -0
  293. package/dist/domains/dashboard/web/assets/xychartDiagram-S5SC5T6Z-DALnOMLb.js +7 -0
  294. package/dist/domains/dashboard/web/index.html +2 -2
  295. package/dist/domains/factory/artifacts.d.ts.map +1 -1
  296. package/dist/domains/factory/artifacts.js.map +1 -1
  297. package/dist/domains/factory/types.d.ts.map +1 -1
  298. package/dist/domains/integrations/codegraph.d.ts.map +1 -1
  299. package/dist/domains/integrations/codegraph.js.map +1 -1
  300. package/dist/domains/project-knowledge/local-store.d.ts +21 -0
  301. package/dist/domains/project-knowledge/local-store.d.ts.map +1 -1
  302. package/dist/domains/project-knowledge/local-store.js +97 -0
  303. package/dist/domains/project-knowledge/local-store.js.map +1 -1
  304. package/dist/domains/project-knowledge/types.d.ts.map +1 -1
  305. package/dist/domains/skill/platform-inspect.d.ts +1 -1
  306. package/dist/domains/skill/platform-inspect.d.ts.map +1 -1
  307. package/dist/domains/skill/platform-inspect.js +50 -10
  308. package/dist/domains/skill/platform-inspect.js.map +1 -1
  309. package/dist/domains/skill/platform-install.d.ts +10 -5
  310. package/dist/domains/skill/platform-install.d.ts.map +1 -1
  311. package/dist/domains/skill/platform-install.js +107 -17
  312. package/dist/domains/skill/platform-install.js.map +1 -1
  313. package/dist/domains/skill/uninstall.d.ts.map +1 -1
  314. package/dist/domains/skill/uninstall.js +38 -61
  315. package/dist/domains/skill/uninstall.js.map +1 -1
  316. package/dist/domains/workflow-contract/contained-atomic-write.d.ts +1 -0
  317. package/dist/domains/workflow-contract/contained-atomic-write.d.ts.map +1 -1
  318. package/dist/domains/workflow-contract/contained-atomic-write.js +19 -0
  319. package/dist/domains/workflow-contract/contained-atomic-write.js.map +1 -1
  320. package/dist/domains/workflow-contract/global-config.d.ts +8 -0
  321. package/dist/domains/workflow-contract/global-config.d.ts.map +1 -1
  322. package/dist/domains/workflow-contract/global-config.js +25 -0
  323. package/dist/domains/workflow-contract/global-config.js.map +1 -1
  324. package/dist/domains/workflow-contract/index.d.ts +1 -1
  325. package/dist/domains/workflow-contract/index.d.ts.map +1 -1
  326. package/dist/domains/workflow-contract/index.js +1 -1
  327. package/dist/domains/workflow-contract/index.js.map +1 -1
  328. package/dist/domains/workflow-contract/output-envelope.d.ts +59 -0
  329. package/dist/domains/workflow-contract/output-envelope.d.ts.map +1 -0
  330. package/dist/domains/workflow-contract/output-envelope.js +108 -0
  331. package/dist/domains/workflow-contract/output-envelope.js.map +1 -0
  332. package/dist/domains/workflow-contract/project-config.d.ts +1 -1
  333. package/dist/domains/workflow-contract/project-config.d.ts.map +1 -1
  334. package/dist/domains/workflow-contract/project-config.js +1 -0
  335. package/dist/domains/workflow-contract/project-config.js.map +1 -1
  336. package/dist/domains/workflow-contract/types.d.ts.map +1 -1
  337. package/dist/platform/install/platforms.d.ts +4 -0
  338. package/dist/platform/install/platforms.d.ts.map +1 -1
  339. package/dist/platform/install/platforms.js +15 -3
  340. package/dist/platform/install/platforms.js.map +1 -1
  341. package/dist/platform/paths/project-knowledge-storage.d.ts +1 -1
  342. package/dist/platform/paths/project-knowledge-storage.d.ts.map +1 -1
  343. package/dist/platform/paths/project-knowledge-storage.js +9 -4
  344. package/dist/platform/paths/project-knowledge-storage.js.map +1 -1
  345. package/dist/platform/version/version.d.ts +8 -0
  346. package/dist/platform/version/version.d.ts.map +1 -1
  347. package/dist/platform/version/version.js +58 -8
  348. package/dist/platform/version/version.js.map +1 -1
  349. package/eval/local/tasks/comet-classic-layout-lifecycle/environment/current-comet-package.json +13 -13
  350. package/eval/local/tasks/comet-native-wave-d-stagnation-stop/instruction.md +2 -0
  351. package/eval/local/tasks/comet-native-wave-d-stagnation-stop/task.toml +1 -0
  352. package/eval/local/tasks/comet-native-wave-d-stagnation-stop/validation/test_native_wave_d_stagnation_stop.py +37 -0
  353. package/eval/local/tasks/comet-native-wave-f-dashboard-readonly/environment/current-comet-package.json +13 -13
  354. package/package.json +24 -24
  355. package/dist/domains/dashboard/web/assets/abnfDiagram-N423BO3Z-BkUJc7LK.js +0 -1
  356. package/dist/domains/dashboard/web/assets/arc-DY4Y9tSO.js +0 -1
  357. package/dist/domains/dashboard/web/assets/architectureDiagram-T3A2C74G-7wC9YZS-.js +0 -36
  358. package/dist/domains/dashboard/web/assets/blockDiagram-VBNYF7ZC-Biqe-SaL.js +0 -132
  359. package/dist/domains/dashboard/web/assets/c4Diagram-5PPSVZJV-CccUFD1S.js +0 -10
  360. package/dist/domains/dashboard/web/assets/channel-DnRvSkOm.js +0 -1
  361. package/dist/domains/dashboard/web/assets/chunk-2GRJ4B5K-BUL4dDxo.js +0 -1
  362. package/dist/domains/dashboard/web/assets/chunk-2Q5K7J3B-BnKtDH9O.js +0 -1
  363. package/dist/domains/dashboard/web/assets/chunk-5RXB4S5H-C9pHQ1n3.js +0 -231
  364. package/dist/domains/dashboard/web/assets/chunk-6Q2QTUOP-CxrbngCi.js +0 -88
  365. package/dist/domains/dashboard/web/assets/chunk-GF5L2VYU-01mzgCUh.js +0 -206
  366. package/dist/domains/dashboard/web/assets/chunk-JWPE2WC7-wTiZVDvw.js +0 -1
  367. package/dist/domains/dashboard/web/assets/chunk-KBJHAD2P-Bxdv5bl-.js +0 -1
  368. package/dist/domains/dashboard/web/assets/chunk-RYQCIY6F-B5vF9l9A.js +0 -1
  369. package/dist/domains/dashboard/web/assets/chunk-XXDRQBXY-Dra3NnDp.js +0 -1
  370. package/dist/domains/dashboard/web/assets/classDiagram-JCYQIIEL-D3E-rgaQ.js +0 -1
  371. package/dist/domains/dashboard/web/assets/classDiagram-v2-OCEON4UE-D3E-rgaQ.js +0 -1
  372. package/dist/domains/dashboard/web/assets/cose-bilkent-JH36ORCC-DC96ge-n.js +0 -1
  373. package/dist/domains/dashboard/web/assets/cynefin-VYW2F7L2-Tt_NiopT.js +0 -166
  374. package/dist/domains/dashboard/web/assets/cynefinDiagram-MW4NZA55-BQ5__1hv.js +0 -62
  375. package/dist/domains/dashboard/web/assets/cytoscape.esm-D3_iZ_3b.js +0 -321
  376. package/dist/domains/dashboard/web/assets/dagre-VZM6K2ZE-Cr2zq3ro.js +0 -4
  377. package/dist/domains/dashboard/web/assets/defaultLocale-DX6XiGOO.js +0 -1
  378. package/dist/domains/dashboard/web/assets/demo-lxXhgJ9-.js +0 -456
  379. package/dist/domains/dashboard/web/assets/diagram-7IWD3JNH-BRpYDwPl.js +0 -30
  380. package/dist/domains/dashboard/web/assets/diagram-B4RE2ZJO-D7u-VBxW.js +0 -3
  381. package/dist/domains/dashboard/web/assets/diagram-LBJQPF4R-CHYuv2JD.js +0 -24
  382. package/dist/domains/dashboard/web/assets/diagram-Q27KOJAE-CV3ZE8Q3.js +0 -24
  383. package/dist/domains/dashboard/web/assets/diagram-UB23O5K3-co_OsTiQ.js +0 -41
  384. package/dist/domains/dashboard/web/assets/ebnfDiagram-BXEA7PRR-CETcWswS.js +0 -1
  385. package/dist/domains/dashboard/web/assets/erDiagram-JOGREHBK-edkItb7Z.js +0 -85
  386. package/dist/domains/dashboard/web/assets/flowDiagram-UKHOOZJN-D_oFJtSf.js +0 -156
  387. package/dist/domains/dashboard/web/assets/ganttDiagram-PKOTCBZU-CFjLVoA1.js +0 -292
  388. package/dist/domains/dashboard/web/assets/gitGraphDiagram-DS77QQ5N-BfD0tiKH.js +0 -106
  389. package/dist/domains/dashboard/web/assets/graph-DOmOIIwC.js +0 -1
  390. package/dist/domains/dashboard/web/assets/index-BzyqCfMb.css +0 -1
  391. package/dist/domains/dashboard/web/assets/index-CCKHH_A9.js +0 -10
  392. package/dist/domains/dashboard/web/assets/index-D8dxsTJY.js +0 -271
  393. package/dist/domains/dashboard/web/assets/index-DlSYK56b.js +0 -139
  394. package/dist/domains/dashboard/web/assets/infoDiagram-6WML65LV-Cx6xa9DS.js +0 -2
  395. package/dist/domains/dashboard/web/assets/init-Gi6I4Gst.js +0 -1
  396. package/dist/domains/dashboard/web/assets/ishikawaDiagram-WSZJBQD7-BjNLyyv_.js +0 -70
  397. package/dist/domains/dashboard/web/assets/journeyDiagram-NVQOT4AX-D2n9vrhx.js +0 -139
  398. package/dist/domains/dashboard/web/assets/kanban-definition-27J2QSJJ-kJL7v018.js +0 -89
  399. package/dist/domains/dashboard/web/assets/katex-HP8lGamR.js +0 -257
  400. package/dist/domains/dashboard/web/assets/layout-D-LzfAck.js +0 -1
  401. package/dist/domains/dashboard/web/assets/linear-CeHtd5-l.js +0 -1
  402. package/dist/domains/dashboard/web/assets/map-DxJ2ADlA.js +0 -1
  403. package/dist/domains/dashboard/web/assets/marked.esm-DECB3bxB.js +0 -64
  404. package/dist/domains/dashboard/web/assets/mermaid.core-B0EPSHs2.js +0 -306
  405. package/dist/domains/dashboard/web/assets/mindmap-definition-FAOFIHXS-bQQWINF4.js +0 -96
  406. package/dist/domains/dashboard/web/assets/ordinal-Cboi1Yqb.js +0 -1
  407. package/dist/domains/dashboard/web/assets/pegDiagram-VL7TDLO6-LxLY1W7W.js +0 -1
  408. package/dist/domains/dashboard/web/assets/pieDiagram-7S7Q4E2Y-BMDQqvuT.js +0 -39
  409. package/dist/domains/dashboard/web/assets/purify.es-Cz4mVeUR.js +0 -3
  410. package/dist/domains/dashboard/web/assets/quadrantDiagram-CIZ2JOQS-XWYjcuZN.js +0 -7
  411. package/dist/domains/dashboard/web/assets/railroadDiagram-AXF67PYL-p-OlQTa7.js +0 -1
  412. package/dist/domains/dashboard/web/assets/requirementDiagram-LRYGKXZP-BL4N8Vsl.js +0 -84
  413. package/dist/domains/dashboard/web/assets/sankeyDiagram-W5VNT64P-Btu-o6LN.js +0 -40
  414. package/dist/domains/dashboard/web/assets/sequenceDiagram-SI44F4Z6-9HpdQQ47.js +0 -162
  415. package/dist/domains/dashboard/web/assets/sizeCapture-X5ZJPWSS-5AnBiBHD.js +0 -1
  416. package/dist/domains/dashboard/web/assets/stateDiagram-OKZ733FA-Dv8IDsai.js +0 -1
  417. package/dist/domains/dashboard/web/assets/stateDiagram-v2-UEYNNEHI-DxOMyFOm.js +0 -1
  418. package/dist/domains/dashboard/web/assets/swimlanes-SLNWSIFB-BfJcN7dK.js +0 -2
  419. package/dist/domains/dashboard/web/assets/swimlanesDiagram-ULZ7WXOC-BnHRSbDk.js +0 -8
  420. package/dist/domains/dashboard/web/assets/timeline-definition-Z64GVDOM-DEOuEHi5.js +0 -120
  421. package/dist/domains/dashboard/web/assets/vennDiagram-T6HMQDX7-BqsGpwgo.js +0 -34
  422. package/dist/domains/dashboard/web/assets/wardleyDiagram-T6FBY63Y-CXlOp9so.js +0 -78
  423. package/dist/domains/dashboard/web/assets/xychartDiagram-ELKLHX3M-DyqqtC9X.js +0 -7
@@ -1,77 +1,77 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire as __cometCreateRequire } from 'module';
3
3
  const require = __cometCreateRequire(import.meta.url);
4
- var Il=Object.create;var ja=Object.defineProperty;var jl=Object.getOwnPropertyDescriptor;var $l=Object.getOwnPropertyNames;var Ol=Object.getPrototypeOf,Hl=Object.prototype.hasOwnProperty;var tr=(r=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(r,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):r)(function(r){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+r+'" is not supported')});var v=(r,e)=>()=>{try{return e||r((e={exports:{}}).exports,e),e.exports}catch(t){throw e=0,t}};var Dl=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of $l(e))!Hl.call(r,n)&&n!==t&&ja(r,n,{get:()=>e[n],enumerable:!(i=jl(e,n))||i.enumerable});return r};var it=(r,e,t)=>(t=r!=null?Il(Ol(r)):{},Dl(e||!r||!r.__esModule?ja(t,"default",{value:r,enumerable:!0}):t,r));var C=v($=>{"use strict";var Ni=Symbol.for("yaml.alias"),$a=Symbol.for("yaml.document"),rr=Symbol.for("yaml.map"),Oa=Symbol.for("yaml.pair"),bi=Symbol.for("yaml.scalar"),ir=Symbol.for("yaml.seq"),te=Symbol.for("yaml.node.type"),Bl=r=>!!r&&typeof r=="object"&&r[te]===Ni,Ll=r=>!!r&&typeof r=="object"&&r[te]===$a,Ml=r=>!!r&&typeof r=="object"&&r[te]===rr,Vl=r=>!!r&&typeof r=="object"&&r[te]===Oa,Ha=r=>!!r&&typeof r=="object"&&r[te]===bi,Fl=r=>!!r&&typeof r=="object"&&r[te]===ir;function Da(r){if(r&&typeof r=="object")switch(r[te]){case rr:case ir:return!0}return!1}function ql(r){if(r&&typeof r=="object")switch(r[te]){case Ni:case rr:case bi:case ir:return!0}return!1}var Wl=r=>(Ha(r)||Da(r))&&!!r.anchor;$.ALIAS=Ni;$.DOC=$a;$.MAP=rr;$.NODE_TYPE=te;$.PAIR=Oa;$.SCALAR=bi;$.SEQ=ir;$.hasAnchor=Wl;$.isAlias=Bl;$.isCollection=Da;$.isDocument=Ll;$.isMap=Ml;$.isNode=ql;$.isPair=Vl;$.isScalar=Ha;$.isSeq=Fl});var nt=v(ki=>{"use strict";var I=C(),B=Symbol("break visit"),Ba=Symbol("skip children"),Y=Symbol("remove node");function nr(r,e){let t=La(e);I.isDocument(r)?Ve(null,r.contents,t,Object.freeze([r]))===Y&&(r.contents=null):Ve(null,r,t,Object.freeze([]))}nr.BREAK=B;nr.SKIP=Ba;nr.REMOVE=Y;function Ve(r,e,t,i){let n=Ma(r,e,t,i);if(I.isNode(n)||I.isPair(n))return Va(r,i,n),Ve(r,n,t,i);if(typeof n!="symbol"){if(I.isCollection(e)){i=Object.freeze(i.concat(e));for(let a=0;a<e.items.length;++a){let o=Ve(a,e.items[a],t,i);if(typeof o=="number")a=o-1;else{if(o===B)return B;o===Y&&(e.items.splice(a,1),a-=1)}}}else if(I.isPair(e)){i=Object.freeze(i.concat(e));let a=Ve("key",e.key,t,i);if(a===B)return B;a===Y&&(e.key=null);let o=Ve("value",e.value,t,i);if(o===B)return B;o===Y&&(e.value=null)}}return n}async function ar(r,e){let t=La(e);I.isDocument(r)?await Fe(null,r.contents,t,Object.freeze([r]))===Y&&(r.contents=null):await Fe(null,r,t,Object.freeze([]))}ar.BREAK=B;ar.SKIP=Ba;ar.REMOVE=Y;async function Fe(r,e,t,i){let n=await Ma(r,e,t,i);if(I.isNode(n)||I.isPair(n))return Va(r,i,n),Fe(r,n,t,i);if(typeof n!="symbol"){if(I.isCollection(e)){i=Object.freeze(i.concat(e));for(let a=0;a<e.items.length;++a){let o=await Fe(a,e.items[a],t,i);if(typeof o=="number")a=o-1;else{if(o===B)return B;o===Y&&(e.items.splice(a,1),a-=1)}}}else if(I.isPair(e)){i=Object.freeze(i.concat(e));let a=await Fe("key",e.key,t,i);if(a===B)return B;a===Y&&(e.key=null);let o=await Fe("value",e.value,t,i);if(o===B)return B;o===Y&&(e.value=null)}}return n}function La(r){return typeof r=="object"&&(r.Collection||r.Node||r.Value)?Object.assign({Alias:r.Node,Map:r.Node,Scalar:r.Node,Seq:r.Node},r.Value&&{Map:r.Value,Scalar:r.Value,Seq:r.Value},r.Collection&&{Map:r.Collection,Seq:r.Collection},r):r}function Ma(r,e,t,i){if(typeof t=="function")return t(r,e,i);if(I.isMap(e))return t.Map?.(r,e,i);if(I.isSeq(e))return t.Seq?.(r,e,i);if(I.isPair(e))return t.Pair?.(r,e,i);if(I.isScalar(e))return t.Scalar?.(r,e,i);if(I.isAlias(e))return t.Alias?.(r,e,i)}function Va(r,e,t){let i=e[e.length-1];if(I.isCollection(i))i.items[r]=t;else if(I.isPair(i))r==="key"?i.key=t:i.value=t;else if(I.isDocument(i))i.contents=t;else{let n=I.isAlias(i)?"alias":"scalar";throw new Error(`Cannot replace node with ${n} parent`)}}ki.visit=nr;ki.visitAsync=ar});var Si=v(qa=>{"use strict";var Fa=C(),zl=nt(),Jl={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},Gl=r=>r.replace(/[!,[\]{}]/g,e=>Jl[e]),at=class r{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},r.defaultYaml,e),this.tags=Object.assign({},r.defaultTags,t)}clone(){let e=new r(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new r(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:r.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},r.defaultTags);break}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:r.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},r.defaultTags),this.atNextDocument=!1);let i=e.trim().split(/[ \t]+/),n=i.shift();switch(n){case"%TAG":{if(i.length!==2&&(t(0,"%TAG directive should contain exactly two parts"),i.length<2))return!1;let[a,o]=i;return this.tags[a]=o,!0}case"%YAML":{if(this.yaml.explicit=!0,i.length!==1)return t(0,"%YAML directive should contain exactly one part"),!1;let[a]=i;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 ${n}`,!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[,i,n]=e.match(/^(.*!)([^!]*)$/s);n||t(`The ${e} tag has no suffix`);let a=this.tags[i];if(a)try{return a+decodeURIComponent(n)}catch(o){return t(String(o)),null}return i==="!"?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,i]of Object.entries(this.tags))if(e.startsWith(i))return t+Gl(e.substring(i.length));return e[0]==="!"?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],i=Object.entries(this.tags),n;if(e&&i.length>0&&Fa.isNode(e.contents)){let a={};zl.visit(e.contents,(o,s)=>{Fa.isNode(s)&&s.tag&&(a[s.tag]=!0)}),n=Object.keys(a)}else n=[];for(let[a,o]of i)a==="!!"&&o==="tag:yaml.org,2002:"||(!e||n.some(s=>s.startsWith(o)))&&t.push(`%TAG ${a} ${o}`);return t.join(`
5
- `)}};at.defaultYaml={explicit:!1,version:"1.2"};at.defaultTags={"!!":"tag:yaml.org,2002:"};qa.Directives=at});var or=v(ot=>{"use strict";var Wa=C(),Ul=nt();function Kl(r){if(/[\x00-\x19\s,[\]{}]/.test(r)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(r)}`;throw new Error(t)}return!0}function za(r){let e=new Set;return Ul.visit(r,{Value(t,i){i.anchor&&e.add(i.anchor)}}),e}function Ja(r,e){for(let t=1;;++t){let i=`${r}${t}`;if(!e.has(i))return i}}function Yl(r,e){let t=[],i=new Map,n=null;return{onAnchor:a=>{t.push(a),n??(n=za(r));let o=Ja(e,n);return n.add(o),o},setAnchors:()=>{for(let a of t){let o=i.get(a);if(typeof o=="object"&&o.anchor&&(Wa.isScalar(o.node)||Wa.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:i}}ot.anchorIsValid=Kl;ot.anchorNames=za;ot.createNodeAnchors=Yl;ot.findNewAnchor=Ja});var Ei=v(Ga=>{"use strict";function st(r,e,t,i){if(i&&typeof i=="object")if(Array.isArray(i))for(let n=0,a=i.length;n<a;++n){let o=i[n],s=st(r,i,String(n),o);s===void 0?delete i[n]:s!==o&&(i[n]=s)}else if(i instanceof Map)for(let n of Array.from(i.keys())){let a=i.get(n),o=st(r,i,n,a);o===void 0?i.delete(n):o!==a&&i.set(n,o)}else if(i instanceof Set)for(let n of Array.from(i)){let a=st(r,i,n,n);a===void 0?i.delete(n):a!==n&&(i.delete(n),i.add(a))}else for(let[n,a]of Object.entries(i)){let o=st(r,i,n,a);o===void 0?delete i[n]:o!==a&&(i[n]=o)}return r.call(e,t,i)}Ga.applyReviver=st});var ue=v(Ka=>{"use strict";var Xl=C();function Ua(r,e,t){if(Array.isArray(r))return r.map((i,n)=>Ua(i,String(n),t));if(r&&typeof r.toJSON=="function"){if(!t||!Xl.hasAnchor(r))return r.toJSON(e,t);let i={aliasCount:0,count:1,res:void 0};t.anchors.set(r,i),t.onCreate=a=>{i.res=a,delete t.onCreate};let n=r.toJSON(e,t);return t.onCreate&&t.onCreate(n),n}return typeof r=="bigint"&&!t?.keep?Number(r):r}Ka.toJS=Ua});var sr=v(Xa=>{"use strict";var Ql=Ei(),Ya=C(),Zl=ue(),Ci=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:i,onAnchor:n,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 i=="number"?i:100},s=Zl.toJS(this,"",o);if(typeof n=="function")for(let{count:c,res:l}of o.anchors.values())n(l,c);return typeof a=="function"?Ql.applyReviver(a,{"":s},"",s):s}};Xa.NodeBase=Ci});var ct=v(Qa=>{"use strict";var eu=or(),tu=nt(),qe=C(),ru=sr(),iu=ue(),xi=class extends ru.NodeBase{constructor(e){super(qe.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 i;t?.aliasResolveCache?i=t.aliasResolveCache:(i=[],tu.visit(e,{Node:(a,o)=>{(qe.isAlias(o)||qe.hasAnchor(o))&&i.push(o)}}),t&&(t.aliasResolveCache=i));let n;for(let a of i){if(a===this)break;a.anchor===this.source&&(n=a)}return n}toJSON(e,t){if(!t)return{source:this.source};let{anchors:i,doc:n,maxAliasCount:a}=t,o=this.resolve(n,t);if(!o){let c=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(c)}let s=i.get(o);if(s||(iu.toJS(o,null,t),s=i.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=cr(n,o,i)),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,i){let n=`*${this.source}`;if(e){if(eu.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`${n} `}return n}};function cr(r,e,t){if(qe.isAlias(e)){let i=e.resolve(r),n=t&&i&&t.get(i);return n?n.count*n.aliasCount:0}else if(qe.isCollection(e)){let i=0;for(let n of e.items){let a=cr(r,n,t);a>i&&(i=a)}return i}else if(qe.isPair(e)){let i=cr(r,e.key,t),n=cr(r,e.value,t);return Math.max(i,n)}return 1}Qa.Alias=xi});var A=v(Pi=>{"use strict";var nu=C(),au=sr(),ou=ue(),su=r=>!r||typeof r!="function"&&typeof r!="object",de=class extends au.NodeBase{constructor(e){super(nu.SCALAR),this.value=e}toJSON(e,t){return t?.keep?this.value:ou.toJS(this.value,e,t)}toString(){return String(this.value)}};de.BLOCK_FOLDED="BLOCK_FOLDED";de.BLOCK_LITERAL="BLOCK_LITERAL";de.PLAIN="PLAIN";de.QUOTE_DOUBLE="QUOTE_DOUBLE";de.QUOTE_SINGLE="QUOTE_SINGLE";Pi.Scalar=de;Pi.isScalarValue=su});var lt=v(eo=>{"use strict";var cu=ct(),_e=C(),Za=A(),lu="tag:yaml.org,2002:";function uu(r,e,t){if(e){let i=t.filter(a=>a.tag===e),n=i.find(a=>!a.format)??i[0];if(!n)throw new Error(`Tag ${e} not found`);return n}return t.find(i=>i.identify?.(r)&&!i.format)}function du(r,e,t){if(_e.isDocument(r)&&(r=r.contents),_e.isNode(r))return r;if(_e.isPair(r)){let u=t.schema[_e.MAP].createNode?.(t.schema,null,t);return u.items.push(r),u}(r instanceof String||r instanceof Number||r instanceof Boolean||typeof BigInt<"u"&&r instanceof BigInt)&&(r=r.valueOf());let{aliasDuplicateObjects:i,onAnchor:n,onTagObj:a,schema:o,sourceObjects:s}=t,c;if(i&&r&&typeof r=="object"){if(c=s.get(r),c)return c.anchor??(c.anchor=n(r)),new cu.Alias(c.anchor);c={anchor:null,node:null},s.set(r,c)}e?.startsWith("!!")&&(e=lu+e.slice(2));let l=uu(r,e,o.tags);if(!l){if(r&&typeof r.toJSON=="function"&&(r=r.toJSON()),!r||typeof r!="object"){let u=new Za.Scalar(r);return c&&(c.node=u),u}l=r instanceof Map?o[_e.MAP]:Symbol.iterator in Object(r)?o[_e.SEQ]:o[_e.MAP]}a&&(a(l),delete t.onTagObj);let f=l?.createNode?l.createNode(t.schema,r,t):typeof l?.nodeClass?.from=="function"?l.nodeClass.from(t.schema,r,t):new Za.Scalar(r);return e?f.tag=e:l.default||(f.tag=l.tag),c&&(c.node=f),f}eo.createNode=du});var ur=v(lr=>{"use strict";var fu=lt(),X=C(),hu=sr();function Ri(r,e,t){let i=t;for(let n=e.length-1;n>=0;--n){let a=e[n];if(typeof a=="number"&&Number.isInteger(a)&&a>=0){let o=[];o[a]=i,i=o}else i=new Map([[a,i]])}return fu.createNode(i,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:r,sourceObjects:new Map})}var to=r=>r==null||typeof r=="object"&&!!r[Symbol.iterator]().next().done,Ai=class extends hu.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(i=>X.isNode(i)||X.isPair(i)?i.clone(e):i),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(to(e))this.add(t);else{let[i,...n]=e,a=this.get(i,!0);if(X.isCollection(a))a.addIn(n,t);else if(a===void 0&&this.schema)this.set(i,Ri(this.schema,n,t));else throw new Error(`Expected YAML collection at ${i}. Remaining path: ${n}`)}}deleteIn(e){let[t,...i]=e;if(i.length===0)return this.delete(t);let n=this.get(t,!0);if(X.isCollection(n))return n.deleteIn(i);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${i}`)}getIn(e,t){let[i,...n]=e,a=this.get(i,!0);return n.length===0?!t&&X.isScalar(a)?a.value:a:X.isCollection(a)?a.getIn(n,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!X.isPair(t))return!1;let i=t.value;return i==null||e&&X.isScalar(i)&&i.value==null&&!i.commentBefore&&!i.comment&&!i.tag})}hasIn(e){let[t,...i]=e;if(i.length===0)return this.has(t);let n=this.get(t,!0);return X.isCollection(n)?n.hasIn(i):!1}setIn(e,t){let[i,...n]=e;if(n.length===0)this.set(i,t);else{let a=this.get(i,!0);if(X.isCollection(a))a.setIn(n,t);else if(a===void 0&&this.schema)this.set(i,Ri(this.schema,n,t));else throw new Error(`Expected YAML collection at ${i}. Remaining path: ${n}`)}}};lr.Collection=Ai;lr.collectionFromPath=Ri;lr.isEmptyPath=to});var ut=v(dr=>{"use strict";var pu=r=>r.replace(/^(?!$)(?: $)?/gm,"#");function _i(r,e){return/^\n+$/.test(r)?r.substring(1):e?r.replace(/^(?! *$)/gm,e):r}var mu=(r,e,t)=>r.endsWith(`
6
- `)?_i(t,e):t.includes(`
4
+ var Gl=Object.create;var Ba=Object.defineProperty;var Ul=Object.getOwnPropertyDescriptor;var Kl=Object.getOwnPropertyNames;var Yl=Object.getPrototypeOf,Xl=Object.prototype.hasOwnProperty;var ir=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var v=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}};var Ql=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Kl(e))!Xl.call(t,n)&&n!==r&&Ba(t,n,{get:()=>e[n],enumerable:!(i=Ul(e,n))||i.enumerable});return t};var st=(t,e,r)=>(r=t!=null?Gl(Yl(t)):{},Ql(e||!t||!t.__esModule?Ba(r,"default",{value:t,enumerable:!0}):r,t));var x=v(H=>{"use strict";var xi=Symbol.for("yaml.alias"),Ma=Symbol.for("yaml.document"),nr=Symbol.for("yaml.map"),Va=Symbol.for("yaml.pair"),Pi=Symbol.for("yaml.scalar"),ar=Symbol.for("yaml.seq"),re=Symbol.for("yaml.node.type"),Zl=t=>!!t&&typeof t=="object"&&t[re]===xi,eu=t=>!!t&&typeof t=="object"&&t[re]===Ma,tu=t=>!!t&&typeof t=="object"&&t[re]===nr,ru=t=>!!t&&typeof t=="object"&&t[re]===Va,Fa=t=>!!t&&typeof t=="object"&&t[re]===Pi,iu=t=>!!t&&typeof t=="object"&&t[re]===ar;function qa(t){if(t&&typeof t=="object")switch(t[re]){case nr:case ar:return!0}return!1}function nu(t){if(t&&typeof t=="object")switch(t[re]){case xi:case nr:case Pi:case ar:return!0}return!1}var au=t=>(Fa(t)||qa(t))&&!!t.anchor;H.ALIAS=xi;H.DOC=Ma;H.MAP=nr;H.NODE_TYPE=re;H.PAIR=Va;H.SCALAR=Pi;H.SEQ=ar;H.hasAnchor=au;H.isAlias=Zl;H.isCollection=qa;H.isDocument=eu;H.isMap=tu;H.isNode=nu;H.isPair=ru;H.isScalar=Fa;H.isSeq=iu});var ct=v(Ri=>{"use strict";var j=x(),B=Symbol("break visit"),Wa=Symbol("skip children"),X=Symbol("remove node");function or(t,e){let r=za(e);j.isDocument(t)?qe(null,t.contents,r,Object.freeze([t]))===X&&(t.contents=null):qe(null,t,r,Object.freeze([]))}or.BREAK=B;or.SKIP=Wa;or.REMOVE=X;function qe(t,e,r,i){let n=Ja(t,e,r,i);if(j.isNode(n)||j.isPair(n))return Ga(t,i,n),qe(t,n,r,i);if(typeof n!="symbol"){if(j.isCollection(e)){i=Object.freeze(i.concat(e));for(let a=0;a<e.items.length;++a){let o=qe(a,e.items[a],r,i);if(typeof o=="number")a=o-1;else{if(o===B)return B;o===X&&(e.items.splice(a,1),a-=1)}}}else if(j.isPair(e)){i=Object.freeze(i.concat(e));let a=qe("key",e.key,r,i);if(a===B)return B;a===X&&(e.key=null);let o=qe("value",e.value,r,i);if(o===B)return B;o===X&&(e.value=null)}}return n}async function sr(t,e){let r=za(e);j.isDocument(t)?await We(null,t.contents,r,Object.freeze([t]))===X&&(t.contents=null):await We(null,t,r,Object.freeze([]))}sr.BREAK=B;sr.SKIP=Wa;sr.REMOVE=X;async function We(t,e,r,i){let n=await Ja(t,e,r,i);if(j.isNode(n)||j.isPair(n))return Ga(t,i,n),We(t,n,r,i);if(typeof n!="symbol"){if(j.isCollection(e)){i=Object.freeze(i.concat(e));for(let a=0;a<e.items.length;++a){let o=await We(a,e.items[a],r,i);if(typeof o=="number")a=o-1;else{if(o===B)return B;o===X&&(e.items.splice(a,1),a-=1)}}}else if(j.isPair(e)){i=Object.freeze(i.concat(e));let a=await We("key",e.key,r,i);if(a===B)return B;a===X&&(e.key=null);let o=await We("value",e.value,r,i);if(o===B)return B;o===X&&(e.value=null)}}return n}function za(t){return typeof t=="object"&&(t.Collection||t.Node||t.Value)?Object.assign({Alias:t.Node,Map:t.Node,Scalar:t.Node,Seq:t.Node},t.Value&&{Map:t.Value,Scalar:t.Value,Seq:t.Value},t.Collection&&{Map:t.Collection,Seq:t.Collection},t):t}function Ja(t,e,r,i){if(typeof r=="function")return r(t,e,i);if(j.isMap(e))return r.Map?.(t,e,i);if(j.isSeq(e))return r.Seq?.(t,e,i);if(j.isPair(e))return r.Pair?.(t,e,i);if(j.isScalar(e))return r.Scalar?.(t,e,i);if(j.isAlias(e))return r.Alias?.(t,e,i)}function Ga(t,e,r){let i=e[e.length-1];if(j.isCollection(i))i.items[t]=r;else if(j.isPair(i))t==="key"?i.key=r:i.value=r;else if(j.isDocument(i))i.contents=r;else{let n=j.isAlias(i)?"alias":"scalar";throw new Error(`Cannot replace node with ${n} parent`)}}Ri.visit=or;Ri.visitAsync=sr});var Ai=v(Ka=>{"use strict";var Ua=x(),ou=ct(),su={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},cu=t=>t.replace(/[!,[\]{}]/g,e=>su[e]),lt=class t{constructor(e,r){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},t.defaultYaml,e),this.tags=Object.assign({},t.defaultTags,r)}clone(){let e=new t(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new t(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:t.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},t.defaultTags);break}return e}add(e,r){this.atNextDocument&&(this.yaml={explicit:t.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},t.defaultTags),this.atNextDocument=!1);let i=e.trim().split(/[ \t]+/),n=i.shift();switch(n){case"%TAG":{if(i.length!==2&&(r(0,"%TAG directive should contain exactly two parts"),i.length<2))return!1;let[a,o]=i;return this.tags[a]=o,!0}case"%YAML":{if(this.yaml.explicit=!0,i.length!==1)return r(0,"%YAML directive should contain exactly one part"),!1;let[a]=i;if(a==="1.1"||a==="1.2")return this.yaml.version=a,!0;{let o=/^\d+\.\d+$/.test(a);return r(6,`Unsupported YAML version ${a}`,o),!1}}default:return r(0,`Unknown directive ${n}`,!0),!1}}tagName(e,r){if(e==="!")return"!";if(e[0]!=="!")return r(`Not a valid tag: ${e}`),null;if(e[1]==="<"){let o=e.slice(2,-1);return o==="!"||o==="!!"?(r(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&r("Verbatim tags must end with a >"),o)}let[,i,n]=e.match(/^(.*!)([^!]*)$/s);n||r(`The ${e} tag has no suffix`);let a=this.tags[i];if(a)try{return a+decodeURIComponent(n)}catch(o){return r(String(o)),null}return i==="!"?e:(r(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[r,i]of Object.entries(this.tags))if(e.startsWith(i))return r+cu(e.substring(i.length));return e[0]==="!"?e:`!<${e}>`}toString(e){let r=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],i=Object.entries(this.tags),n;if(e&&i.length>0&&Ua.isNode(e.contents)){let a={};ou.visit(e.contents,(o,s)=>{Ua.isNode(s)&&s.tag&&(a[s.tag]=!0)}),n=Object.keys(a)}else n=[];for(let[a,o]of i)a==="!!"&&o==="tag:yaml.org,2002:"||(!e||n.some(s=>s.startsWith(o)))&&r.push(`%TAG ${a} ${o}`);return r.join(`
5
+ `)}};lt.defaultYaml={explicit:!1,version:"1.2"};lt.defaultTags={"!!":"tag:yaml.org,2002:"};Ka.Directives=lt});var cr=v(ut=>{"use strict";var Ya=x(),lu=ct();function uu(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){let r=`Anchor must not contain whitespace or control characters: ${JSON.stringify(t)}`;throw new Error(r)}return!0}function Xa(t){let e=new Set;return lu.visit(t,{Value(r,i){i.anchor&&e.add(i.anchor)}}),e}function Qa(t,e){for(let r=1;;++r){let i=`${t}${r}`;if(!e.has(i))return i}}function du(t,e){let r=[],i=new Map,n=null;return{onAnchor:a=>{r.push(a),n??(n=Xa(t));let o=Qa(e,n);return n.add(o),o},setAnchors:()=>{for(let a of r){let o=i.get(a);if(typeof o=="object"&&o.anchor&&(Ya.isScalar(o.node)||Ya.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:i}}ut.anchorIsValid=uu;ut.anchorNames=Xa;ut.createNodeAnchors=du;ut.findNewAnchor=Qa});var _i=v(Za=>{"use strict";function dt(t,e,r,i){if(i&&typeof i=="object")if(Array.isArray(i))for(let n=0,a=i.length;n<a;++n){let o=i[n],s=dt(t,i,String(n),o);s===void 0?delete i[n]:s!==o&&(i[n]=s)}else if(i instanceof Map)for(let n of Array.from(i.keys())){let a=i.get(n),o=dt(t,i,n,a);o===void 0?i.delete(n):o!==a&&i.set(n,o)}else if(i instanceof Set)for(let n of Array.from(i)){let a=dt(t,i,n,n);a===void 0?i.delete(n):a!==n&&(i.delete(n),i.add(a))}else for(let[n,a]of Object.entries(i)){let o=dt(t,i,n,a);o===void 0?delete i[n]:o!==a&&(i[n]=o)}return t.call(e,r,i)}Za.applyReviver=dt});var fe=v(to=>{"use strict";var fu=x();function eo(t,e,r){if(Array.isArray(t))return t.map((i,n)=>eo(i,String(n),r));if(t&&typeof t.toJSON=="function"){if(!r||!fu.hasAnchor(t))return t.toJSON(e,r);let i={aliasCount:0,count:1,res:void 0};r.anchors.set(t,i),r.onCreate=a=>{i.res=a,delete r.onCreate};let n=t.toJSON(e,r);return r.onCreate&&r.onCreate(n),n}return typeof t=="bigint"&&!r?.keep?Number(t):t}to.toJS=eo});var lr=v(io=>{"use strict";var hu=_i(),ro=x(),pu=fe(),Ii=class{constructor(e){Object.defineProperty(this,ro.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:r,maxAliasCount:i,onAnchor:n,reviver:a}={}){if(!ro.isDocument(e))throw new TypeError("A document argument is required");let o={anchors:new Map,doc:e,keep:!0,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100},s=pu.toJS(this,"",o);if(typeof n=="function")for(let{count:c,res:l}of o.anchors.values())n(l,c);return typeof a=="function"?hu.applyReviver(a,{"":s},"",s):s}};io.NodeBase=Ii});var ft=v(no=>{"use strict";var mu=cr(),vu=ct(),ze=x(),gu=lr(),wu=fe(),Ti=class extends gu.NodeBase{constructor(e){super(ze.ALIAS),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,r){if(r?.maxAliasCount===0)throw new ReferenceError("Alias resolution is disabled");let i;r?.aliasResolveCache?i=r.aliasResolveCache:(i=[],vu.visit(e,{Node:(a,o)=>{(ze.isAlias(o)||ze.hasAnchor(o))&&i.push(o)}}),r&&(r.aliasResolveCache=i));let n;for(let a of i){if(a===this)break;a.anchor===this.source&&(n=a)}return n}toJSON(e,r){if(!r)return{source:this.source};let{anchors:i,doc:n,maxAliasCount:a}=r,o=this.resolve(n,r);if(!o){let c=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(c)}let s=i.get(o);if(s||(wu.toJS(o,null,r),s=i.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=ur(n,o,i)),s.count*s.aliasCount>a)){let c="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(c)}return s.res}toString(e,r,i){let n=`*${this.source}`;if(e){if(mu.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`${n} `}return n}};function ur(t,e,r){if(ze.isAlias(e)){let i=e.resolve(t),n=r&&i&&r.get(i);return n?n.count*n.aliasCount:0}else if(ze.isCollection(e)){let i=0;for(let n of e.items){let a=ur(t,n,r);a>i&&(i=a)}return i}else if(ze.isPair(e)){let i=ur(t,e.key,r),n=ur(t,e.value,r);return Math.max(i,n)}return 1}no.Alias=Ti});var _=v(ji=>{"use strict";var yu=x(),Nu=lr(),bu=fe(),ku=t=>!t||typeof t!="function"&&typeof t!="object",he=class extends Nu.NodeBase{constructor(e){super(yu.SCALAR),this.value=e}toJSON(e,r){return r?.keep?this.value:bu.toJS(this.value,e,r)}toString(){return String(this.value)}};he.BLOCK_FOLDED="BLOCK_FOLDED";he.BLOCK_LITERAL="BLOCK_LITERAL";he.PLAIN="PLAIN";he.QUOTE_DOUBLE="QUOTE_DOUBLE";he.QUOTE_SINGLE="QUOTE_SINGLE";ji.Scalar=he;ji.isScalarValue=ku});var ht=v(oo=>{"use strict";var Su=ft(),Te=x(),ao=_(),Eu="tag:yaml.org,2002:";function Cu(t,e,r){if(e){let i=r.filter(a=>a.tag===e),n=i.find(a=>!a.format)??i[0];if(!n)throw new Error(`Tag ${e} not found`);return n}return r.find(i=>i.identify?.(t)&&!i.format)}function xu(t,e,r){if(Te.isDocument(t)&&(t=t.contents),Te.isNode(t))return t;if(Te.isPair(t)){let u=r.schema[Te.MAP].createNode?.(r.schema,null,r);return u.items.push(t),u}(t instanceof String||t instanceof Number||t instanceof Boolean||typeof BigInt<"u"&&t instanceof BigInt)&&(t=t.valueOf());let{aliasDuplicateObjects:i,onAnchor:n,onTagObj:a,schema:o,sourceObjects:s}=r,c;if(i&&t&&typeof t=="object"){if(c=s.get(t),c)return c.anchor??(c.anchor=n(t)),new Su.Alias(c.anchor);c={anchor:null,node:null},s.set(t,c)}e?.startsWith("!!")&&(e=Eu+e.slice(2));let l=Cu(t,e,o.tags);if(!l){if(t&&typeof t.toJSON=="function"&&(t=t.toJSON()),!t||typeof t!="object"){let u=new ao.Scalar(t);return c&&(c.node=u),u}l=t instanceof Map?o[Te.MAP]:Symbol.iterator in Object(t)?o[Te.SEQ]:o[Te.MAP]}a&&(a(l),delete r.onTagObj);let f=l?.createNode?l.createNode(r.schema,t,r):typeof l?.nodeClass?.from=="function"?l.nodeClass.from(r.schema,t,r):new ao.Scalar(t);return e?f.tag=e:l.default||(f.tag=l.tag),c&&(c.node=f),f}oo.createNode=xu});var fr=v(dr=>{"use strict";var Pu=ht(),Q=x(),Ru=lr();function $i(t,e,r){let i=r;for(let n=e.length-1;n>=0;--n){let a=e[n];if(typeof a=="number"&&Number.isInteger(a)&&a>=0){let o=[];o[a]=i,i=o}else i=new Map([[a,i]])}return Pu.createNode(i,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:t,sourceObjects:new Map})}var so=t=>t==null||typeof t=="object"&&!!t[Symbol.iterator]().next().done,Oi=class extends Ru.NodeBase{constructor(e,r){super(e),Object.defineProperty(this,"schema",{value:r,configurable:!0,enumerable:!1,writable:!0})}clone(e){let r=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(r.schema=e),r.items=r.items.map(i=>Q.isNode(i)||Q.isPair(i)?i.clone(e):i),this.range&&(r.range=this.range.slice()),r}addIn(e,r){if(so(e))this.add(r);else{let[i,...n]=e,a=this.get(i,!0);if(Q.isCollection(a))a.addIn(n,r);else if(a===void 0&&this.schema)this.set(i,$i(this.schema,n,r));else throw new Error(`Expected YAML collection at ${i}. Remaining path: ${n}`)}}deleteIn(e){let[r,...i]=e;if(i.length===0)return this.delete(r);let n=this.get(r,!0);if(Q.isCollection(n))return n.deleteIn(i);throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}getIn(e,r){let[i,...n]=e,a=this.get(i,!0);return n.length===0?!r&&Q.isScalar(a)?a.value:a:Q.isCollection(a)?a.getIn(n,r):void 0}hasAllNullValues(e){return this.items.every(r=>{if(!Q.isPair(r))return!1;let i=r.value;return i==null||e&&Q.isScalar(i)&&i.value==null&&!i.commentBefore&&!i.comment&&!i.tag})}hasIn(e){let[r,...i]=e;if(i.length===0)return this.has(r);let n=this.get(r,!0);return Q.isCollection(n)?n.hasIn(i):!1}setIn(e,r){let[i,...n]=e;if(n.length===0)this.set(i,r);else{let a=this.get(i,!0);if(Q.isCollection(a))a.setIn(n,r);else if(a===void 0&&this.schema)this.set(i,$i(this.schema,n,r));else throw new Error(`Expected YAML collection at ${i}. Remaining path: ${n}`)}}};dr.Collection=Oi;dr.collectionFromPath=$i;dr.isEmptyPath=so});var pt=v(hr=>{"use strict";var Au=t=>t.replace(/^(?!$)(?: $)?/gm,"#");function Hi(t,e){return/^\n+$/.test(t)?t.substring(1):e?t.replace(/^(?! *$)/gm,e):t}var _u=(t,e,r)=>t.endsWith(`
6
+ `)?Hi(r,e):r.includes(`
7
7
  `)?`
8
- `+_i(t,e):(r.endsWith(" ")?"":" ")+t;dr.indentComment=_i;dr.lineComment=mu;dr.stringifyComment=pu});var io=v(dt=>{"use strict";var vu="flow",Ti="block",fr="quoted";function gu(r,e,t="flow",{indentAtStart:i,lineWidth:n=80,minContentWidth:a=20,onFold:o,onOverflow:s}={}){if(!n||n<0)return r;n<a&&(a=0);let c=Math.max(1+a,1+n-e.length);if(r.length<=c)return r;let l=[],f={},u=n-e.length;typeof i=="number"&&(i>n-Math.max(2,a)?l.push(0):u=n-i);let d,m,g=!1,h=-1,p=-1,w=-1;t===Ti&&(h=ro(r,h,e.length),h!==-1&&(u=h+c));for(let b;b=r[h+=1];){if(t===fr&&b==="\\"){switch(p=h,r[h+1]){case"x":h+=3;break;case"u":h+=5;break;case"U":h+=9;break;default:h+=1}w=h}if(b===`
9
- `)t===Ti&&(h=ro(r,h,e.length)),u=h+e.length+c,d=void 0;else{if(b===" "&&m&&m!==" "&&m!==`
10
- `&&m!==" "){let k=r[h+1];k&&k!==" "&&k!==`
11
- `&&k!==" "&&(d=h)}if(h>=u)if(d)l.push(d),u=d+c,d=void 0;else if(t===fr){for(;m===" "||m===" ";)m=b,b=r[h+=1],g=!0;let k=h>w+1?h-2:p-1;if(f[k])return r;l.push(k),f[k]=!0,u=k+c,d=void 0}else g=!0}m=b}if(g&&s&&s(),l.length===0)return r;o&&o();let N=r.slice(0,l[0]);for(let b=0;b<l.length;++b){let k=l[b],S=l[b+1]||r.length;k===0?N=`
12
- ${e}${r.slice(0,S)}`:(t===fr&&f[k]&&(N+=`${r[k]}\\`),N+=`
13
- ${e}${r.slice(k+1,S)}`)}return N}function ro(r,e,t){let i=e,n=e+1,a=r[n];for(;a===" "||a===" ";)if(e<n+t)a=r[++e];else{do a=r[++e];while(a&&a!==`
14
- `);i=e,n=e+1,a=r[n]}return i}dt.FOLD_BLOCK=Ti;dt.FOLD_FLOW=vu;dt.FOLD_QUOTED=fr;dt.foldFlowLines=gu});var ht=v(no=>{"use strict";var z=A(),fe=io(),pr=(r,e)=>({indentAtStart:e?r.indent.length:r.indentAtStart,lineWidth:r.options.lineWidth,minContentWidth:r.options.minContentWidth}),mr=r=>/^(%|---|\.\.\.)/m.test(r);function wu(r,e,t){if(!e||e<0)return!1;let i=e-t,n=r.length;if(n<=i)return!1;for(let a=0,o=0;a<n;++a)if(r[a]===`
15
- `){if(a-o>i)return!0;if(o=a+1,n-o<=i)return!1}return!0}function ft(r,e){let t=JSON.stringify(r);if(e.options.doubleQuotedAsJSON)return t;let{implicitKey:i}=e,n=e.options.doubleQuotedMinMultiLineLength,a=e.indent||(mr(r)?" ":""),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 f=t.substr(c+2,4);switch(f){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:f.substr(0,2)==="00"?o+="\\x"+f.substr(2):o+=t.substr(c,6)}c+=5,s=c+1}break;case"n":if(i||t[c+2]==='"'||t.length<n)c+=1;else{for(o+=t.slice(s,c)+`
8
+ `+Hi(r,e):(t.endsWith(" ")?"":" ")+r;hr.indentComment=Hi;hr.lineComment=_u;hr.stringifyComment=Au});var lo=v(mt=>{"use strict";var Iu="flow",Di="block",pr="quoted";function Tu(t,e,r="flow",{indentAtStart:i,lineWidth:n=80,minContentWidth:a=20,onFold:o,onOverflow:s}={}){if(!n||n<0)return t;n<a&&(a=0);let c=Math.max(1+a,1+n-e.length);if(t.length<=c)return t;let l=[],f={},u=n-e.length;typeof i=="number"&&(i>n-Math.max(2,a)?l.push(0):u=n-i);let d,m,g=!1,h=-1,p=-1,w=-1;r===Di&&(h=co(t,h,e.length),h!==-1&&(u=h+c));for(let b;b=t[h+=1];){if(r===pr&&b==="\\"){switch(p=h,t[h+1]){case"x":h+=3;break;case"u":h+=5;break;case"U":h+=9;break;default:h+=1}w=h}if(b===`
9
+ `)r===Di&&(h=co(t,h,e.length)),u=h+e.length+c,d=void 0;else{if(b===" "&&m&&m!==" "&&m!==`
10
+ `&&m!==" "){let k=t[h+1];k&&k!==" "&&k!==`
11
+ `&&k!==" "&&(d=h)}if(h>=u)if(d)l.push(d),u=d+c,d=void 0;else if(r===pr){for(;m===" "||m===" ";)m=b,b=t[h+=1],g=!0;let k=h>w+1?h-2:p-1;if(f[k])return t;l.push(k),f[k]=!0,u=k+c,d=void 0}else g=!0}m=b}if(g&&s&&s(),l.length===0)return t;o&&o();let N=t.slice(0,l[0]);for(let b=0;b<l.length;++b){let k=l[b],S=l[b+1]||t.length;k===0?N=`
12
+ ${e}${t.slice(0,S)}`:(r===pr&&f[k]&&(N+=`${t[k]}\\`),N+=`
13
+ ${e}${t.slice(k+1,S)}`)}return N}function co(t,e,r){let i=e,n=e+1,a=t[n];for(;a===" "||a===" ";)if(e<n+r)a=t[++e];else{do a=t[++e];while(a&&a!==`
14
+ `);i=e,n=e+1,a=t[n]}return i}mt.FOLD_BLOCK=Di;mt.FOLD_FLOW=Iu;mt.FOLD_QUOTED=pr;mt.foldFlowLines=Tu});var gt=v(uo=>{"use strict";var J=_(),pe=lo(),vr=(t,e)=>({indentAtStart:e?t.indent.length:t.indentAtStart,lineWidth:t.options.lineWidth,minContentWidth:t.options.minContentWidth}),gr=t=>/^(%|---|\.\.\.)/m.test(t);function ju(t,e,r){if(!e||e<0)return!1;let i=e-r,n=t.length;if(n<=i)return!1;for(let a=0,o=0;a<n;++a)if(t[a]===`
15
+ `){if(a-o>i)return!0;if(o=a+1,n-o<=i)return!1}return!0}function vt(t,e){let r=JSON.stringify(t);if(e.options.doubleQuotedAsJSON)return r;let{implicitKey:i}=e,n=e.options.doubleQuotedMinMultiLineLength,a=e.indent||(gr(t)?" ":""),o="",s=0;for(let c=0,l=r[c];l;l=r[++c])if(l===" "&&r[c+1]==="\\"&&r[c+2]==="n"&&(o+=r.slice(s,c)+"\\ ",c+=1,s=c,l="\\"),l==="\\")switch(r[c+1]){case"u":{o+=r.slice(s,c);let f=r.substr(c+2,4);switch(f){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:f.substr(0,2)==="00"?o+="\\x"+f.substr(2):o+=r.substr(c,6)}c+=5,s=c+1}break;case"n":if(i||r[c+2]==='"'||r.length<n)c+=1;else{for(o+=r.slice(s,c)+`
16
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,i?o:fe.foldFlowLines(o,a,fe.FOLD_QUOTED,pr(e,!1))}function Ii(r,e){if(e.options.singleQuote===!1||e.implicitKey&&r.includes(`
19
- `)||/[ \t]\n|\n[ \t]/.test(r))return ft(r,e);let t=e.indent||(mr(r)?" ":""),i="'"+r.replace(/'/g,"''").replace(/\n+/g,`$&
20
- ${t}`)+"'";return e.implicitKey?i:fe.foldFlowLines(i,t,fe.FOLD_FLOW,pr(e,!1))}function We(r,e){let{singleQuote:t}=e.options,i;if(t===!1)i=ft;else{let n=r.includes('"'),a=r.includes("'");n&&!a?i=Ii:a&&!n?i=ft:i=t?Ii:ft}return i(r,e)}var ji;try{ji=new RegExp(`(^|(?<!
17
+ `;r[c+2]==="\\"&&r[c+3]==="n"&&r[c+4]!=='"';)o+=`
18
+ `,c+=2;o+=a,r[c+2]===" "&&(o+="\\"),c+=1,s=c+1}break;default:c+=1}return o=s?o+r.slice(s):r,i?o:pe.foldFlowLines(o,a,pe.FOLD_QUOTED,vr(e,!1))}function Li(t,e){if(e.options.singleQuote===!1||e.implicitKey&&t.includes(`
19
+ `)||/[ \t]\n|\n[ \t]/.test(t))return vt(t,e);let r=e.indent||(gr(t)?" ":""),i="'"+t.replace(/'/g,"''").replace(/\n+/g,`$&
20
+ ${r}`)+"'";return e.implicitKey?i:pe.foldFlowLines(i,r,pe.FOLD_FLOW,vr(e,!1))}function Je(t,e){let{singleQuote:r}=e.options,i;if(r===!1)i=vt;else{let n=t.includes('"'),a=t.includes("'");n&&!a?i=Li:a&&!n?i=vt:i=r?Li:vt}return i(t,e)}var Bi;try{Bi=new RegExp(`(^|(?<!
21
21
  ))
22
22
  +(?!
23
- |$)`,"g")}catch{ji=/\n+(?!\n|$)/g}function hr({comment:r,type:e,value:t},i,n,a){let{blockQuote:o,commentString:s,lineWidth:c}=i.options;if(!o||/\n[\t ]+$/.test(t))return We(t,i);let l=i.indent||(i.forceBlockIndent||mr(t)?" ":""),f=o==="literal"?!0:o==="folded"||e===z.Scalar.BLOCK_FOLDED?!1:e===z.Scalar.BLOCK_LITERAL?!0:!wu(t,c,l.length);if(!t)return f?`|
23
+ |$)`,"g")}catch{Bi=/\n+(?!\n|$)/g}function mr({comment:t,type:e,value:r},i,n,a){let{blockQuote:o,commentString:s,lineWidth:c}=i.options;if(!o||/\n[\t ]+$/.test(r))return Je(r,i);let l=i.indent||(i.forceBlockIndent||gr(r)?" ":""),f=o==="literal"?!0:o==="folded"||e===J.Scalar.BLOCK_FOLDED?!1:e===J.Scalar.BLOCK_LITERAL?!0:!ju(r,c,l.length);if(!r)return f?`|
24
24
  `:`>
25
- `;let u,d;for(d=t.length;d>0;--d){let S=t[d-1];if(S!==`
26
- `&&S!==" "&&S!==" ")break}let m=t.substring(d),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(ji,`$&${l}`));let h=!1,p,w=-1;for(p=0;p<t.length;++p){let S=t[p];if(S===" ")h=!0;else if(S===`
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 k=(h?l?"2":"1":"")+u;if(r&&(k+=" "+s(r.replace(/ ?[\r\n]+/g," ")),n&&n()),!f){let S=t.replace(/\n+/g,`
30
- $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${l}`),E=!1,P=pr(i,!0);o!=="folded"&&e!==z.Scalar.BLOCK_FOLDED&&(P.onOverflow=()=>{E=!0});let y=fe.foldFlowLines(`${N}${S}${m}`,l,fe.FOLD_BLOCK,P);if(!E)return`>${k}
31
- ${l}${y}`}return t=t.replace(/\n+/g,`$&${l}`),`|${k}
32
- ${l}${N}${t}${m}`}function yu(r,e,t,i){let{type:n,value:a}=r,{actualString:o,implicitKey:s,indent:c,indentStep:l,inFlow:f}=e;if(s&&a.includes(`
33
- `)||f&&/[[\]{},]/.test(a))return We(a,e);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a))return s||f||!a.includes(`
34
- `)?We(a,e):hr(r,e,t,i);if(!s&&!f&&n!==z.Scalar.PLAIN&&a.includes(`
35
- `))return hr(r,e,t,i);if(mr(a)){if(c==="")return e.forceBlockIndent=!0,hr(r,e,t,i);if(s&&c===l)return We(a,e)}let u=a.replace(/\n+/g,`$&
36
- ${c}`);if(o){let d=h=>h.default&&h.tag!=="tag:yaml.org,2002:str"&&h.test?.test(u),{compat:m,tags:g}=e.doc.schema;if(g.some(d)||m?.some(d))return We(a,e)}return s?u:fe.foldFlowLines(u,c,fe.FOLD_FLOW,pr(e,!1))}function Nu(r,e,t,i){let{implicitKey:n,inFlow:a}=e,o=typeof r.value=="string"?r:Object.assign({},r,{value:String(r.value)}),{type:s}=r;s!==z.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(s=z.Scalar.QUOTE_DOUBLE);let c=f=>{switch(f){case z.Scalar.BLOCK_FOLDED:case z.Scalar.BLOCK_LITERAL:return n||a?We(o.value,e):hr(o,e,t,i);case z.Scalar.QUOTE_DOUBLE:return ft(o.value,e);case z.Scalar.QUOTE_SINGLE:return Ii(o.value,e);case z.Scalar.PLAIN:return yu(o,e,t,i);default:return null}},l=c(s);if(l===null){let{defaultKeyType:f,defaultStringType:u}=e.options,d=n&&f||u;if(l=c(d),l===null)throw new Error(`Unsupported default string type ${d}`)}return l}no.stringifyString=Nu});var pt=v($i=>{"use strict";var bu=or(),he=C(),ku=ut(),Su=ht();function Eu(r,e){let t=Object.assign({blockQuote:!0,commentString:ku.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},r.schema.toStringOptions,e),i;switch(t.collectionStyle){case"block":i=!1;break;case"flow":i=!0;break;default:i=null}return{anchors:new Set,doc:r,flowCollectionPadding:t.flowCollectionPadding?" ":"",indent:"",indentStep:typeof t.indent=="number"?" ".repeat(t.indent):" ",inFlow:i,options:t}}function Cu(r,e){if(e.tag){let n=r.filter(a=>a.tag===e.tag);if(n.length>0)return n.find(a=>a.format===e.format)??n[0]}let t,i;if(he.isScalar(e)){i=e.value;let n=r.filter(a=>a.identify?.(i));if(n.length>1){let a=n.filter(o=>o.test);a.length>0&&(n=a)}t=n.find(a=>a.format===e.format)??n.find(a=>!a.format)}else i=e,t=r.find(n=>n.nodeClass&&i instanceof n.nodeClass);if(!t){let n=i?.constructor?.name??(i===null?"null":typeof i);throw new Error(`Tag not resolved for ${n} value`)}return t}function xu(r,e,{anchors:t,doc:i}){if(!i.directives)return"";let n=[],a=(he.isScalar(r)||he.isCollection(r))&&r.anchor;a&&bu.anchorIsValid(a)&&(t.add(a),n.push(`&${a}`));let o=r.tag??(e.default?null:e.tag);return o&&n.push(i.directives.tagString(o)),n.join(" ")}function Pu(r,e,t,i){if(he.isPair(r))return r.toString(e,t,i);if(he.isAlias(r)){if(e.doc.directives)return r.toString(e);if(e.resolvedAliases?.has(r))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(r):e.resolvedAliases=new Set([r]),r=r.resolve(e.doc)}let n,a=he.isNode(r)?r:e.doc.createNode(r,{onTagObj:c=>n=c});n??(n=Cu(e.doc.schema.tags,a));let o=xu(a,n,e);o.length>0&&(e.indentAtStart=(e.indentAtStart??0)+o.length+1);let s=typeof n.stringify=="function"?n.stringify(a,e,t,i):he.isScalar(a)?Su.stringifyString(a,e,t,i):a.toString(e,t,i);return o?he.isScalar(a)||s[0]==="{"||s[0]==="["?`${o} ${s}`:`${o}
37
- ${e.indent}${s}`:s}$i.createStringifyContext=Eu;$i.stringify=Pu});var co=v(so=>{"use strict";var re=C(),ao=A(),oo=pt(),mt=ut();function Ru({key:r,value:e},t,i,n){let{allNullValues:a,doc:o,indent:s,indentStep:c,options:{commentString:l,indentSeq:f,simpleKeys:u}}=t,d=re.isNode(r)&&r.comment||null;if(u){if(d)throw new Error("With simple keys, key nodes cannot have comments");if(re.isCollection(r)||!re.isNode(r)&&typeof r=="object"){let P="With simple keys, collection cannot be used as a key value";throw new Error(P)}}let m=!u&&(!r||d&&e==null&&!t.inFlow||re.isCollection(r)||(re.isScalar(r)?r.type===ao.Scalar.BLOCK_FOLDED||r.type===ao.Scalar.BLOCK_LITERAL:typeof r=="object"));t=Object.assign({},t,{allNullValues:!1,implicitKey:!m&&(u||!a),indent:s+c});let g=!1,h=!1,p=oo.stringify(r,t,()=>g=!0,()=>h=!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&&i&&i(),p===""?"?":m?`? ${p}`:p}else if(a&&!u||e==null&&m)return p=`? ${p}`,d&&!g?p+=mt.lineComment(p,t.indent,l(d)):h&&n&&n(),p;g&&(d=null),m?(d&&(p+=mt.lineComment(p,t.indent,l(d))),p=`? ${p}
38
- ${s}:`):(p=`${p}:`,d&&(p+=mt.lineComment(p,t.indent,l(d))));let w,N,b;re.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&&!d&&re.isScalar(e)&&(t.indentAtStart=p.length+1),h=!1,!f&&c.length>=2&&!t.inFlow&&!m&&re.isSeq(e)&&!e.flow&&!e.tag&&!e.anchor&&(t.indent=t.indent.substring(2));let k=!1,S=oo.stringify(e,t,()=>k=!0,()=>h=!0),E=" ";if(d||w||N){if(E=w?`
39
- `:"",N){let P=l(N);E+=`
40
- ${mt.indentComment(P,t.indent)}`}S===""&&!t.inFlow?E===`
25
+ `;let u,d;for(d=r.length;d>0;--d){let S=r[d-1];if(S!==`
26
+ `&&S!==" "&&S!==" ")break}let m=r.substring(d),g=m.indexOf(`
27
+ `);g===-1?u="-":r===m||g!==m.length-1?(u="+",a&&a()):u="",m&&(r=r.slice(0,-m.length),m[m.length-1]===`
28
+ `&&(m=m.slice(0,-1)),m=m.replace(Bi,`$&${l}`));let h=!1,p,w=-1;for(p=0;p<r.length;++p){let S=r[p];if(S===" ")h=!0;else if(S===`
29
+ `)w=p;else break}let N=r.substring(0,w<p?w+1:p);N&&(r=r.substring(N.length),N=N.replace(/\n+/g,`$&${l}`));let k=(h?l?"2":"1":"")+u;if(t&&(k+=" "+s(t.replace(/ ?[\r\n]+/g," ")),n&&n()),!f){let S=r.replace(/\n+/g,`
30
+ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${l}`),E=!1,R=vr(i,!0);o!=="folded"&&e!==J.Scalar.BLOCK_FOLDED&&(R.onOverflow=()=>{E=!0});let y=pe.foldFlowLines(`${N}${S}${m}`,l,pe.FOLD_BLOCK,R);if(!E)return`>${k}
31
+ ${l}${y}`}return r=r.replace(/\n+/g,`$&${l}`),`|${k}
32
+ ${l}${N}${r}${m}`}function $u(t,e,r,i){let{type:n,value:a}=t,{actualString:o,implicitKey:s,indent:c,indentStep:l,inFlow:f}=e;if(s&&a.includes(`
33
+ `)||f&&/[[\]{},]/.test(a))return Je(a,e);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a))return s||f||!a.includes(`
34
+ `)?Je(a,e):mr(t,e,r,i);if(!s&&!f&&n!==J.Scalar.PLAIN&&a.includes(`
35
+ `))return mr(t,e,r,i);if(gr(a)){if(c==="")return e.forceBlockIndent=!0,mr(t,e,r,i);if(s&&c===l)return Je(a,e)}let u=a.replace(/\n+/g,`$&
36
+ ${c}`);if(o){let d=h=>h.default&&h.tag!=="tag:yaml.org,2002:str"&&h.test?.test(u),{compat:m,tags:g}=e.doc.schema;if(g.some(d)||m?.some(d))return Je(a,e)}return s?u:pe.foldFlowLines(u,c,pe.FOLD_FLOW,vr(e,!1))}function Ou(t,e,r,i){let{implicitKey:n,inFlow:a}=e,o=typeof t.value=="string"?t:Object.assign({},t,{value:String(t.value)}),{type:s}=t;s!==J.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(s=J.Scalar.QUOTE_DOUBLE);let c=f=>{switch(f){case J.Scalar.BLOCK_FOLDED:case J.Scalar.BLOCK_LITERAL:return n||a?Je(o.value,e):mr(o,e,r,i);case J.Scalar.QUOTE_DOUBLE:return vt(o.value,e);case J.Scalar.QUOTE_SINGLE:return Li(o.value,e);case J.Scalar.PLAIN:return $u(o,e,r,i);default:return null}},l=c(s);if(l===null){let{defaultKeyType:f,defaultStringType:u}=e.options,d=n&&f||u;if(l=c(d),l===null)throw new Error(`Unsupported default string type ${d}`)}return l}uo.stringifyString=Ou});var wt=v(Mi=>{"use strict";var Hu=cr(),me=x(),Du=pt(),Lu=gt();function Bu(t,e){let r=Object.assign({blockQuote:!0,commentString:Du.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},t.schema.toStringOptions,e),i;switch(r.collectionStyle){case"block":i=!1;break;case"flow":i=!0;break;default:i=null}return{anchors:new Set,doc:t,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:typeof r.indent=="number"?" ".repeat(r.indent):" ",inFlow:i,options:r}}function Mu(t,e){if(e.tag){let n=t.filter(a=>a.tag===e.tag);if(n.length>0)return n.find(a=>a.format===e.format)??n[0]}let r,i;if(me.isScalar(e)){i=e.value;let n=t.filter(a=>a.identify?.(i));if(n.length>1){let a=n.filter(o=>o.test);a.length>0&&(n=a)}r=n.find(a=>a.format===e.format)??n.find(a=>!a.format)}else i=e,r=t.find(n=>n.nodeClass&&i instanceof n.nodeClass);if(!r){let n=i?.constructor?.name??(i===null?"null":typeof i);throw new Error(`Tag not resolved for ${n} value`)}return r}function Vu(t,e,{anchors:r,doc:i}){if(!i.directives)return"";let n=[],a=(me.isScalar(t)||me.isCollection(t))&&t.anchor;a&&Hu.anchorIsValid(a)&&(r.add(a),n.push(`&${a}`));let o=t.tag??(e.default?null:e.tag);return o&&n.push(i.directives.tagString(o)),n.join(" ")}function Fu(t,e,r,i){if(me.isPair(t))return t.toString(e,r,i);if(me.isAlias(t)){if(e.doc.directives)return t.toString(e);if(e.resolvedAliases?.has(t))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(t):e.resolvedAliases=new Set([t]),t=t.resolve(e.doc)}let n,a=me.isNode(t)?t:e.doc.createNode(t,{onTagObj:c=>n=c});n??(n=Mu(e.doc.schema.tags,a));let o=Vu(a,n,e);o.length>0&&(e.indentAtStart=(e.indentAtStart??0)+o.length+1);let s=typeof n.stringify=="function"?n.stringify(a,e,r,i):me.isScalar(a)?Lu.stringifyString(a,e,r,i):a.toString(e,r,i);return o?me.isScalar(a)||s[0]==="{"||s[0]==="["?`${o} ${s}`:`${o}
37
+ ${e.indent}${s}`:s}Mi.createStringifyContext=Bu;Mi.stringify=Fu});var mo=v(po=>{"use strict";var ie=x(),fo=_(),ho=wt(),yt=pt();function qu({key:t,value:e},r,i,n){let{allNullValues:a,doc:o,indent:s,indentStep:c,options:{commentString:l,indentSeq:f,simpleKeys:u}}=r,d=ie.isNode(t)&&t.comment||null;if(u){if(d)throw new Error("With simple keys, key nodes cannot have comments");if(ie.isCollection(t)||!ie.isNode(t)&&typeof t=="object"){let R="With simple keys, collection cannot be used as a key value";throw new Error(R)}}let m=!u&&(!t||d&&e==null&&!r.inFlow||ie.isCollection(t)||(ie.isScalar(t)?t.type===fo.Scalar.BLOCK_FOLDED||t.type===fo.Scalar.BLOCK_LITERAL:typeof t=="object"));r=Object.assign({},r,{allNullValues:!1,implicitKey:!m&&(u||!a),indent:s+c});let g=!1,h=!1,p=ho.stringify(t,r,()=>g=!0,()=>h=!0);if(!m&&!r.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(r.inFlow){if(a||e==null)return g&&i&&i(),p===""?"?":m?`? ${p}`:p}else if(a&&!u||e==null&&m)return p=`? ${p}`,d&&!g?p+=yt.lineComment(p,r.indent,l(d)):h&&n&&n(),p;g&&(d=null),m?(d&&(p+=yt.lineComment(p,r.indent,l(d))),p=`? ${p}
38
+ ${s}:`):(p=`${p}:`,d&&(p+=yt.lineComment(p,r.indent,l(d))));let w,N,b;ie.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))),r.implicitKey=!1,!m&&!d&&ie.isScalar(e)&&(r.indentAtStart=p.length+1),h=!1,!f&&c.length>=2&&!r.inFlow&&!m&&ie.isSeq(e)&&!e.flow&&!e.tag&&!e.anchor&&(r.indent=r.indent.substring(2));let k=!1,S=ho.stringify(e,r,()=>k=!0,()=>h=!0),E=" ";if(d||w||N){if(E=w?`
39
+ `:"",N){let R=l(N);E+=`
40
+ ${yt.indentComment(R,r.indent)}`}S===""&&!r.inFlow?E===`
41
41
  `&&b&&(E=`
42
42
 
43
43
  `):E+=`
44
- ${t.indent}`}else if(!m&&re.isCollection(e)){let P=S[0],y=S.indexOf(`
45
- `),_=y!==-1,le=t.inFlow??e.flow??e.items.length===0;if(_||!le){let Me=!1;if(_&&(P==="&"||P==="!")){let T=S.indexOf(" ");P==="&"&&T!==-1&&T<y&&S[T+1]==="!"&&(T=S.indexOf(" ",T+1)),(T===-1||y<T)&&(Me=!0)}Me||(E=`
46
- ${t.indent}`)}}else(S===""||S[0]===`
47
- `)&&(E="");return p+=E+S,t.inFlow?k&&i&&i():b&&!k?p+=mt.lineComment(p,t.indent,l(b)):h&&n&&n(),p}so.stringifyPair=Ru});var Hi=v(Oi=>{"use strict";var lo=tr("process");function Au(r,...e){r==="debug"&&console.log(...e)}function _u(r,e){(r==="debug"||r==="warn")&&(typeof lo.emitWarning=="function"?lo.emitWarning(e):console.warn(e))}Oi.debug=Au;Oi.warn=_u});var Nr=v(yr=>{"use strict";var wr=C(),uo=A(),vr="<<",gr={identify:r=>r===vr||typeof r=="symbol"&&r.description===vr,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new uo.Scalar(Symbol(vr)),{addToJSMap:fo}),stringify:()=>vr},Tu=(r,e)=>(gr.identify(e)||wr.isScalar(e)&&(!e.type||e.type===uo.Scalar.PLAIN)&&gr.identify(e.value))&&r?.doc.schema.tags.some(t=>t.tag===gr.tag&&t.default);function fo(r,e,t){let i=ho(r,t);if(wr.isSeq(i))for(let n of i.items)Di(r,e,n);else if(Array.isArray(i))for(let n of i)Di(r,e,n);else Di(r,e,i)}function Di(r,e,t){let i=ho(r,t);if(!wr.isMap(i))throw new Error("Merge sources must be maps or map aliases");let n=i.toJSON(null,r,Map);for(let[a,o]of n)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 ho(r,e){return r&&wr.isAlias(e)?e.resolve(r.doc,r):e}yr.addMergeToJSMap=fo;yr.isMergeKey=Tu;yr.merge=gr});var Li=v(vo=>{"use strict";var Iu=Hi(),po=Nr(),ju=pt(),mo=C(),Bi=ue();function $u(r,e,{key:t,value:i}){if(mo.isNode(t)&&t.addToJSMap)t.addToJSMap(r,e,i);else if(po.isMergeKey(r,t))po.addMergeToJSMap(r,e,i);else{let n=Bi.toJS(t,"",r);if(e instanceof Map)e.set(n,Bi.toJS(i,n,r));else if(e instanceof Set)e.add(n);else{let a=Ou(t,n,r),o=Bi.toJS(i,a,r);a in e?Object.defineProperty(e,a,{value:o,writable:!0,enumerable:!0,configurable:!0}):e[a]=o}}return e}function Ou(r,e,t){if(e===null)return"";if(typeof e!="object")return String(e);if(mo.isNode(r)&&t?.doc){let i=ju.createStringifyContext(t.doc,{});i.anchors=new Set;for(let a of t.anchors.keys())i.anchors.add(a.anchor);i.inFlow=!0,i.inStringifyKey=!0;let n=r.toString(i);if(!t.mapKeyWarned){let a=JSON.stringify(n);a.length>40&&(a=a.substring(0,36)+'..."'),Iu.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 n}return JSON.stringify(e)}vo.addPairToJSMap=$u});var pe=v(Mi=>{"use strict";var go=lt(),Hu=co(),Du=Li(),br=C();function Bu(r,e,t){let i=go.createNode(r,void 0,t),n=go.createNode(e,void 0,t);return new kr(i,n)}var kr=class r{constructor(e,t=null){Object.defineProperty(this,br.NODE_TYPE,{value:br.PAIR}),this.key=e,this.value=t}clone(e){let{key:t,value:i}=this;return br.isNode(t)&&(t=t.clone(e)),br.isNode(i)&&(i=i.clone(e)),new r(t,i)}toJSON(e,t){let i=t?.mapAsMap?new Map:{};return Du.addPairToJSMap(t,i,this)}toString(e,t,i){return e?.doc?Hu.stringifyPair(this,e,t,i):JSON.stringify(this)}};Mi.Pair=kr;Mi.createPair=Bu});var Vi=v(yo=>{"use strict";var Te=C(),wo=pt(),Sr=ut();function Lu(r,e,t){return(e.inFlow??r.flow?Vu:Mu)(r,e,t)}function Mu({comment:r,items:e},t,{blockItemPrefix:i,flowChars:n,itemIndent:a,onChompKeep:o,onComment:s}){let{indent:c,options:{commentString:l}}=t,f=Object.assign({},t,{indent:a,type:null}),u=!1,d=[];for(let g=0;g<e.length;++g){let h=e[g],p=null;if(Te.isNode(h))!u&&h.spaceBefore&&d.push(""),Er(t,d,h.commentBefore,u),h.comment&&(p=h.comment);else if(Te.isPair(h)){let N=Te.isNode(h.key)?h.key:null;N&&(!u&&N.spaceBefore&&d.push(""),Er(t,d,N.commentBefore,u))}u=!1;let w=wo.stringify(h,f,()=>p=null,()=>u=!0);p&&(w+=Sr.lineComment(w,a,l(p))),u&&p&&(u=!1),d.push(i+w)}let m;if(d.length===0)m=n.start+n.end;else{m=d[0];for(let g=1;g<d.length;++g){let h=d[g];m+=h?`
44
+ ${r.indent}`}else if(!m&&ie.isCollection(e)){let R=S[0],y=S.indexOf(`
45
+ `),I=y!==-1,de=r.inFlow??e.flow??e.items.length===0;if(I||!de){let Fe=!1;if(I&&(R==="&"||R==="!")){let T=S.indexOf(" ");R==="&"&&T!==-1&&T<y&&S[T+1]==="!"&&(T=S.indexOf(" ",T+1)),(T===-1||y<T)&&(Fe=!0)}Fe||(E=`
46
+ ${r.indent}`)}}else(S===""||S[0]===`
47
+ `)&&(E="");return p+=E+S,r.inFlow?k&&i&&i():b&&!k?p+=yt.lineComment(p,r.indent,l(b)):h&&n&&n(),p}po.stringifyPair=qu});var Fi=v(Vi=>{"use strict";var vo=ir("process");function Wu(t,...e){t==="debug"&&console.log(...e)}function zu(t,e){(t==="debug"||t==="warn")&&(typeof vo.emitWarning=="function"?vo.emitWarning(e):console.warn(e))}Vi.debug=Wu;Vi.warn=zu});var kr=v(br=>{"use strict";var Nr=x(),go=_(),wr="<<",yr={identify:t=>t===wr||typeof t=="symbol"&&t.description===wr,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new go.Scalar(Symbol(wr)),{addToJSMap:wo}),stringify:()=>wr},Ju=(t,e)=>(yr.identify(e)||Nr.isScalar(e)&&(!e.type||e.type===go.Scalar.PLAIN)&&yr.identify(e.value))&&t?.doc.schema.tags.some(r=>r.tag===yr.tag&&r.default);function wo(t,e,r){let i=yo(t,r);if(Nr.isSeq(i))for(let n of i.items)qi(t,e,n);else if(Array.isArray(i))for(let n of i)qi(t,e,n);else qi(t,e,i)}function qi(t,e,r){let i=yo(t,r);if(!Nr.isMap(i))throw new Error("Merge sources must be maps or map aliases");let n=i.toJSON(null,t,Map);for(let[a,o]of n)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 yo(t,e){return t&&Nr.isAlias(e)?e.resolve(t.doc,t):e}br.addMergeToJSMap=wo;br.isMergeKey=Ju;br.merge=yr});var zi=v(ko=>{"use strict";var Gu=Fi(),No=kr(),Uu=wt(),bo=x(),Wi=fe();function Ku(t,e,{key:r,value:i}){if(bo.isNode(r)&&r.addToJSMap)r.addToJSMap(t,e,i);else if(No.isMergeKey(t,r))No.addMergeToJSMap(t,e,i);else{let n=Wi.toJS(r,"",t);if(e instanceof Map)e.set(n,Wi.toJS(i,n,t));else if(e instanceof Set)e.add(n);else{let a=Yu(r,n,t),o=Wi.toJS(i,a,t);a in e?Object.defineProperty(e,a,{value:o,writable:!0,enumerable:!0,configurable:!0}):e[a]=o}}return e}function Yu(t,e,r){if(e===null)return"";if(typeof e!="object")return String(e);if(bo.isNode(t)&&r?.doc){let i=Uu.createStringifyContext(r.doc,{});i.anchors=new Set;for(let a of r.anchors.keys())i.anchors.add(a.anchor);i.inFlow=!0,i.inStringifyKey=!0;let n=t.toString(i);if(!r.mapKeyWarned){let a=JSON.stringify(n);a.length>40&&(a=a.substring(0,36)+'..."'),Gu.warn(r.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${a}. Set mapAsMap: true to use object keys.`),r.mapKeyWarned=!0}return n}return JSON.stringify(e)}ko.addPairToJSMap=Ku});var ve=v(Ji=>{"use strict";var So=ht(),Xu=mo(),Qu=zi(),Sr=x();function Zu(t,e,r){let i=So.createNode(t,void 0,r),n=So.createNode(e,void 0,r);return new Er(i,n)}var Er=class t{constructor(e,r=null){Object.defineProperty(this,Sr.NODE_TYPE,{value:Sr.PAIR}),this.key=e,this.value=r}clone(e){let{key:r,value:i}=this;return Sr.isNode(r)&&(r=r.clone(e)),Sr.isNode(i)&&(i=i.clone(e)),new t(r,i)}toJSON(e,r){let i=r?.mapAsMap?new Map:{};return Qu.addPairToJSMap(r,i,this)}toString(e,r,i){return e?.doc?Xu.stringifyPair(this,e,r,i):JSON.stringify(this)}};Ji.Pair=Er;Ji.createPair=Zu});var Gi=v(Co=>{"use strict";var je=x(),Eo=wt(),Cr=pt();function ed(t,e,r){return(e.inFlow??t.flow?rd:td)(t,e,r)}function td({comment:t,items:e},r,{blockItemPrefix:i,flowChars:n,itemIndent:a,onChompKeep:o,onComment:s}){let{indent:c,options:{commentString:l}}=r,f=Object.assign({},r,{indent:a,type:null}),u=!1,d=[];for(let g=0;g<e.length;++g){let h=e[g],p=null;if(je.isNode(h))!u&&h.spaceBefore&&d.push(""),xr(r,d,h.commentBefore,u),h.comment&&(p=h.comment);else if(je.isPair(h)){let N=je.isNode(h.key)?h.key:null;N&&(!u&&N.spaceBefore&&d.push(""),xr(r,d,N.commentBefore,u))}u=!1;let w=Eo.stringify(h,f,()=>p=null,()=>u=!0);p&&(w+=Cr.lineComment(w,a,l(p))),u&&p&&(u=!1),d.push(i+w)}let m;if(d.length===0)m=n.start+n.end;else{m=d[0];for(let g=1;g<d.length;++g){let h=d[g];m+=h?`
48
48
  ${c}${h}`:`
49
- `}}return r?(m+=`
50
- `+Sr.indentComment(l(r),c),s&&s()):u&&o&&o(),m}function Vu({items:r},e,{flowChars:t,itemIndent:i}){let{indent:n,indentStep:a,flowCollectionPadding:o,options:{commentString:s}}=e;i+=a;let c=Object.assign({},e,{indent:i,inFlow:!0,type:null}),l=!1,f=0,u=[];for(let g=0;g<r.length;++g){let h=r[g],p=null;if(Te.isNode(h))h.spaceBefore&&u.push(""),Er(e,u,h.commentBefore,!1),h.comment&&(p=h.comment);else if(Te.isPair(h)){let N=Te.isNode(h.key)?h.key:null;N&&(N.spaceBefore&&u.push(""),Er(e,u,N.commentBefore,!1),N.comment&&(l=!0));let b=Te.isNode(h.value)?h.value:null;b?(b.comment&&(p=b.comment),b.commentBefore&&(l=!0)):h.value==null&&N?.comment&&(p=N.comment)}p&&(l=!0);let w=wo.stringify(h,c,()=>p=null);l||(l=u.length>f||w.includes(`
51
- `)),g<r.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+=Sr.lineComment(w,i,s(p))),u.push(w),f=u.length}let{start:d,end:m}=t;if(u.length===0)return d+m;if(!l){let g=u.reduce((h,p)=>h+p.length+2,2);l=e.options.lineWidth>0&&g>e.options.lineWidth}if(l){let g=d;for(let h of u)g+=h?`
49
+ `}}return t?(m+=`
50
+ `+Cr.indentComment(l(t),c),s&&s()):u&&o&&o(),m}function rd({items:t},e,{flowChars:r,itemIndent:i}){let{indent:n,indentStep:a,flowCollectionPadding:o,options:{commentString:s}}=e;i+=a;let c=Object.assign({},e,{indent:i,inFlow:!0,type:null}),l=!1,f=0,u=[];for(let g=0;g<t.length;++g){let h=t[g],p=null;if(je.isNode(h))h.spaceBefore&&u.push(""),xr(e,u,h.commentBefore,!1),h.comment&&(p=h.comment);else if(je.isPair(h)){let N=je.isNode(h.key)?h.key:null;N&&(N.spaceBefore&&u.push(""),xr(e,u,N.commentBefore,!1),N.comment&&(l=!0));let b=je.isNode(h.value)?h.value:null;b?(b.comment&&(p=b.comment),b.commentBefore&&(l=!0)):h.value==null&&N?.comment&&(p=N.comment)}p&&(l=!0);let w=Eo.stringify(h,c,()=>p=null);l||(l=u.length>f||w.includes(`
51
+ `)),g<t.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+=Cr.lineComment(w,i,s(p))),u.push(w),f=u.length}let{start:d,end:m}=r;if(u.length===0)return d+m;if(!l){let g=u.reduce((h,p)=>h+p.length+2,2);l=e.options.lineWidth>0&&g>e.options.lineWidth}if(l){let g=d;for(let h of u)g+=h?`
52
52
  ${a}${n}${h}`:`
53
53
  `;return`${g}
54
- ${n}${m}`}else return`${d}${o}${u.join(" ")}${o}${m}`}function Er({indent:r,options:{commentString:e}},t,i,n){if(i&&n&&(i=i.replace(/^\n+/,"")),i){let a=Sr.indentComment(e(i),r);t.push(a.trimStart())}}yo.stringifyCollection=Lu});var ve=v(qi=>{"use strict";var Fu=Vi(),qu=Li(),Wu=ur(),me=C(),Cr=pe(),zu=A();function vt(r,e){let t=me.isScalar(e)?e.value:e;for(let i of r)if(me.isPair(i)&&(i.key===e||i.key===t||me.isScalar(i.key)&&i.key.value===t))return i}var Fi=class extends Wu.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(me.MAP,e),this.items=[]}static from(e,t,i){let{keepUndefined:n,replacer:a}=i,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||n)&&o.items.push(Cr.createPair(c,l,i))};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 i;me.isPair(e)?i=e:!e||typeof e!="object"||!("key"in e)?i=new Cr.Pair(e,e?.value):i=new Cr.Pair(e.key,e.value);let n=vt(this.items,i.key),a=this.schema?.sortMapEntries;if(n){if(!t)throw new Error(`Key ${i.key} already set`);me.isScalar(n.value)&&zu.isScalarValue(i.value)?n.value.value=i.value:n.value=i.value}else if(a){let o=this.items.findIndex(s=>a(i,s)<0);o===-1?this.items.push(i):this.items.splice(o,0,i)}else this.items.push(i)}delete(e){let t=vt(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let n=vt(this.items,e)?.value;return(!t&&me.isScalar(n)?n.value:n)??void 0}has(e){return!!vt(this.items,e)}set(e,t){this.add(new Cr.Pair(e,t),!0)}toJSON(e,t,i){let n=i?new i:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(n);for(let a of this.items)qu.addPairToJSMap(t,n,a);return n}toString(e,t,i){if(!e)return JSON.stringify(this);for(let n of this.items)if(!me.isPair(n))throw new Error(`Map items must all be pairs; found ${JSON.stringify(n)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),Fu.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:i,onComment:t})}};qi.YAMLMap=Fi;qi.findPair=vt});var ze=v(bo=>{"use strict";var Ju=C(),No=ve(),Gu={collection:"map",default:!0,nodeClass:No.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(r,e){return Ju.isMap(r)||e("Expected a mapping for this tag"),r},createNode:(r,e,t)=>No.YAMLMap.from(r,e,t)};bo.map=Gu});var ge=v(ko=>{"use strict";var Uu=lt(),Ku=Vi(),Yu=ur(),Pr=C(),Xu=A(),Qu=ue(),Wi=class extends Yu.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(Pr.SEQ,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=xr(e);return typeof t!="number"?!1:this.items.splice(t,1).length>0}get(e,t){let i=xr(e);if(typeof i!="number")return;let n=this.items[i];return!t&&Pr.isScalar(n)?n.value:n}has(e){let t=xr(e);return typeof t=="number"&&t<this.items.length}set(e,t){let i=xr(e);if(typeof i!="number")throw new Error(`Expected a valid index, not ${e}.`);let n=this.items[i];Pr.isScalar(n)&&Xu.isScalarValue(t)?n.value=t:this.items[i]=t}toJSON(e,t){let i=[];t?.onCreate&&t.onCreate(i);let n=0;for(let a of this.items)i.push(Qu.toJS(a,String(n++),t));return i}toString(e,t,i){return e?Ku.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:i,onComment:t}):JSON.stringify(this)}static from(e,t,i){let{replacer:n}=i,a=new this(e);if(t&&Symbol.iterator in Object(t)){let o=0;for(let s of t){if(typeof n=="function"){let c=t instanceof Set?s:String(o++);s=n.call(t,c,s)}a.items.push(Uu.createNode(s,void 0,i))}}return a}};function xr(r){let e=Pr.isScalar(r)?r.value:r;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}ko.YAMLSeq=Wi});var Je=v(Eo=>{"use strict";var Zu=C(),So=ge(),ed={collection:"seq",default:!0,nodeClass:So.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(r,e){return Zu.isSeq(r)||e("Expected a sequence for this tag"),r},createNode:(r,e,t)=>So.YAMLSeq.from(r,e,t)};Eo.seq=ed});var gt=v(Co=>{"use strict";var td=ht(),rd={identify:r=>typeof r=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:r=>r,stringify(r,e,t,i){return e=Object.assign({actualString:!0},e),td.stringifyString(r,e,t,i)}};Co.string=rd});var Rr=v(Ro=>{"use strict";var xo=A(),Po={identify:r=>r==null,createNode:()=>new xo.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new xo.Scalar(null),stringify:({source:r},e)=>typeof r=="string"&&Po.test.test(r)?r:e.options.nullStr};Ro.nullTag=Po});var zi=v(_o=>{"use strict";var id=A(),Ao={identify:r=>typeof r=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:r=>new id.Scalar(r[0]==="t"||r[0]==="T"),stringify({source:r,value:e},t){if(r&&Ao.test.test(r)){let i=r[0]==="t"||r[0]==="T";if(e===i)return r}return e?t.options.trueStr:t.options.falseStr}};_o.boolTag=Ao});var Ge=v(To=>{"use strict";function nd({format:r,minFractionDigits:e,tag:t,value:i}){if(typeof i=="bigint")return String(i);let n=typeof i=="number"?i:Number(i);if(!isFinite(n))return isNaN(n)?".nan":n<0?"-.inf":".inf";let a=Object.is(i,-0)?"-0":JSON.stringify(i);if(!r&&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}To.stringifyNumber=nd});var Gi=v(Ar=>{"use strict";var ad=A(),Ji=Ge(),od={identify:r=>typeof r=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:r=>r.slice(-3).toLowerCase()==="nan"?NaN:r[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Ji.stringifyNumber},sd={identify:r=>typeof r=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:r=>parseFloat(r),stringify(r){let e=Number(r.value);return isFinite(e)?e.toExponential():Ji.stringifyNumber(r)}},cd={identify:r=>typeof r=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(r){let e=new ad.Scalar(parseFloat(r)),t=r.indexOf(".");return t!==-1&&r[r.length-1]==="0"&&(e.minFractionDigits=r.length-t-1),e},stringify:Ji.stringifyNumber};Ar.float=cd;Ar.floatExp=sd;Ar.floatNaN=od});var Ki=v(Tr=>{"use strict";var Io=Ge(),_r=r=>typeof r=="bigint"||Number.isInteger(r),Ui=(r,e,t,{intAsBigInt:i})=>i?BigInt(r):parseInt(r.substring(e),t);function jo(r,e,t){let{value:i}=r;return _r(i)&&i>=0?t+i.toString(e):Io.stringifyNumber(r)}var ld={identify:r=>_r(r)&&r>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(r,e,t)=>Ui(r,2,8,t),stringify:r=>jo(r,8,"0o")},ud={identify:_r,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(r,e,t)=>Ui(r,0,10,t),stringify:Io.stringifyNumber},dd={identify:r=>_r(r)&&r>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(r,e,t)=>Ui(r,2,16,t),stringify:r=>jo(r,16,"0x")};Tr.int=ud;Tr.intHex=dd;Tr.intOct=ld});var Oo=v($o=>{"use strict";var fd=ze(),hd=Rr(),pd=Je(),md=gt(),vd=zi(),Yi=Gi(),Xi=Ki(),gd=[fd.map,pd.seq,md.string,hd.nullTag,vd.boolTag,Xi.intOct,Xi.int,Xi.intHex,Yi.floatNaN,Yi.floatExp,Yi.float];$o.schema=gd});var Bo=v(Do=>{"use strict";var wd=A(),yd=ze(),Nd=Je();function Ho(r){return typeof r=="bigint"||Number.isInteger(r)}var Ir=({value:r})=>JSON.stringify(r),bd=[{identify:r=>typeof r=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:r=>r,stringify:Ir},{identify:r=>r==null,createNode:()=>new wd.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Ir},{identify:r=>typeof r=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:r=>r==="true",stringify:Ir},{identify:Ho,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(r,e,{intAsBigInt:t})=>t?BigInt(r):parseInt(r,10),stringify:({value:r})=>Ho(r)?r.toString():JSON.stringify(r)},{identify:r=>typeof r=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:r=>parseFloat(r),stringify:Ir}],kd={default:!0,tag:"",test:/^/,resolve(r,e){return e(`Unresolved plain scalar ${JSON.stringify(r)}`),r}},Sd=[yd.map,Nd.seq].concat(bd,kd);Do.schema=Sd});var Zi=v(Lo=>{"use strict";var wt=tr("buffer"),Qi=A(),Ed=ht(),Cd={identify:r=>r instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(r,e){if(typeof wt.Buffer=="function")return wt.Buffer.from(r,"base64");if(typeof atob=="function"){let t=atob(r.replace(/[\n\r]/g,"")),i=new Uint8Array(t.length);for(let n=0;n<t.length;++n)i[n]=t.charCodeAt(n);return i}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),r},stringify({comment:r,type:e,value:t},i,n,a){if(!t)return"";let o=t,s;if(typeof wt.Buffer=="function")s=o instanceof wt.Buffer?o.toString("base64"):wt.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=Qi.Scalar.BLOCK_LITERAL),e!==Qi.Scalar.QUOTE_DOUBLE){let c=Math.max(i.options.lineWidth-i.indent.length,i.options.minContentWidth),l=Math.ceil(s.length/c),f=new Array(l);for(let u=0,d=0;u<l;++u,d+=c)f[u]=s.substr(d,c);s=f.join(e===Qi.Scalar.BLOCK_LITERAL?`
55
- `:" ")}return Ed.stringifyString({comment:r,type:e,value:s},i,n,a)}};Lo.binary=Cd});var Or=v($r=>{"use strict";var jr=C(),en=pe(),xd=A(),Pd=ge();function Mo(r,e){if(jr.isSeq(r))for(let t=0;t<r.items.length;++t){let i=r.items[t];if(!jr.isPair(i)){if(jr.isMap(i)){i.items.length>1&&e("Each pair must have its own sequence indicator");let n=i.items[0]||new en.Pair(new xd.Scalar(null));if(i.commentBefore&&(n.key.commentBefore=n.key.commentBefore?`${i.commentBefore}
54
+ ${n}${m}`}else return`${d}${o}${u.join(" ")}${o}${m}`}function xr({indent:t,options:{commentString:e}},r,i,n){if(i&&n&&(i=i.replace(/^\n+/,"")),i){let a=Cr.indentComment(e(i),t);r.push(a.trimStart())}}Co.stringifyCollection=ed});var we=v(Ki=>{"use strict";var id=Gi(),nd=zi(),ad=fr(),ge=x(),Pr=ve(),od=_();function Nt(t,e){let r=ge.isScalar(e)?e.value:e;for(let i of t)if(ge.isPair(i)&&(i.key===e||i.key===r||ge.isScalar(i.key)&&i.key.value===r))return i}var Ui=class extends ad.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(ge.MAP,e),this.items=[]}static from(e,r,i){let{keepUndefined:n,replacer:a}=i,o=new this(e),s=(c,l)=>{if(typeof a=="function")l=a.call(r,c,l);else if(Array.isArray(a)&&!a.includes(c))return;(l!==void 0||n)&&o.items.push(Pr.createPair(c,l,i))};if(r instanceof Map)for(let[c,l]of r)s(c,l);else if(r&&typeof r=="object")for(let c of Object.keys(r))s(c,r[c]);return typeof e.sortMapEntries=="function"&&o.items.sort(e.sortMapEntries),o}add(e,r){let i;ge.isPair(e)?i=e:!e||typeof e!="object"||!("key"in e)?i=new Pr.Pair(e,e?.value):i=new Pr.Pair(e.key,e.value);let n=Nt(this.items,i.key),a=this.schema?.sortMapEntries;if(n){if(!r)throw new Error(`Key ${i.key} already set`);ge.isScalar(n.value)&&od.isScalarValue(i.value)?n.value.value=i.value:n.value=i.value}else if(a){let o=this.items.findIndex(s=>a(i,s)<0);o===-1?this.items.push(i):this.items.splice(o,0,i)}else this.items.push(i)}delete(e){let r=Nt(this.items,e);return r?this.items.splice(this.items.indexOf(r),1).length>0:!1}get(e,r){let n=Nt(this.items,e)?.value;return(!r&&ge.isScalar(n)?n.value:n)??void 0}has(e){return!!Nt(this.items,e)}set(e,r){this.add(new Pr.Pair(e,r),!0)}toJSON(e,r,i){let n=i?new i:r?.mapAsMap?new Map:{};r?.onCreate&&r.onCreate(n);for(let a of this.items)nd.addPairToJSMap(r,n,a);return n}toString(e,r,i){if(!e)return JSON.stringify(this);for(let n of this.items)if(!ge.isPair(n))throw new Error(`Map items must all be pairs; found ${JSON.stringify(n)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),id.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:i,onComment:r})}};Ki.YAMLMap=Ui;Ki.findPair=Nt});var Ge=v(Po=>{"use strict";var sd=x(),xo=we(),cd={collection:"map",default:!0,nodeClass:xo.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(t,e){return sd.isMap(t)||e("Expected a mapping for this tag"),t},createNode:(t,e,r)=>xo.YAMLMap.from(t,e,r)};Po.map=cd});var ye=v(Ro=>{"use strict";var ld=ht(),ud=Gi(),dd=fr(),Ar=x(),fd=_(),hd=fe(),Yi=class extends dd.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(Ar.SEQ,e),this.items=[]}add(e){this.items.push(e)}delete(e){let r=Rr(e);return typeof r!="number"?!1:this.items.splice(r,1).length>0}get(e,r){let i=Rr(e);if(typeof i!="number")return;let n=this.items[i];return!r&&Ar.isScalar(n)?n.value:n}has(e){let r=Rr(e);return typeof r=="number"&&r<this.items.length}set(e,r){let i=Rr(e);if(typeof i!="number")throw new Error(`Expected a valid index, not ${e}.`);let n=this.items[i];Ar.isScalar(n)&&fd.isScalarValue(r)?n.value=r:this.items[i]=r}toJSON(e,r){let i=[];r?.onCreate&&r.onCreate(i);let n=0;for(let a of this.items)i.push(hd.toJS(a,String(n++),r));return i}toString(e,r,i){return e?ud.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:i,onComment:r}):JSON.stringify(this)}static from(e,r,i){let{replacer:n}=i,a=new this(e);if(r&&Symbol.iterator in Object(r)){let o=0;for(let s of r){if(typeof n=="function"){let c=r instanceof Set?s:String(o++);s=n.call(r,c,s)}a.items.push(ld.createNode(s,void 0,i))}}return a}};function Rr(t){let e=Ar.isScalar(t)?t.value:t;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}Ro.YAMLSeq=Yi});var Ue=v(_o=>{"use strict";var pd=x(),Ao=ye(),md={collection:"seq",default:!0,nodeClass:Ao.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(t,e){return pd.isSeq(t)||e("Expected a sequence for this tag"),t},createNode:(t,e,r)=>Ao.YAMLSeq.from(t,e,r)};_o.seq=md});var bt=v(Io=>{"use strict";var vd=gt(),gd={identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify(t,e,r,i){return e=Object.assign({actualString:!0},e),vd.stringifyString(t,e,r,i)}};Io.string=gd});var _r=v($o=>{"use strict";var To=_(),jo={identify:t=>t==null,createNode:()=>new To.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new To.Scalar(null),stringify:({source:t},e)=>typeof t=="string"&&jo.test.test(t)?t:e.options.nullStr};$o.nullTag=jo});var Xi=v(Ho=>{"use strict";var wd=_(),Oo={identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new wd.Scalar(t[0]==="t"||t[0]==="T"),stringify({source:t,value:e},r){if(t&&Oo.test.test(t)){let i=t[0]==="t"||t[0]==="T";if(e===i)return t}return e?r.options.trueStr:r.options.falseStr}};Ho.boolTag=Oo});var Ke=v(Do=>{"use strict";function yd({format:t,minFractionDigits:e,tag:r,value:i}){if(typeof i=="bigint")return String(i);let n=typeof i=="number"?i:Number(i);if(!isFinite(n))return isNaN(n)?".nan":n<0?"-.inf":".inf";let a=Object.is(i,-0)?"-0":JSON.stringify(i);if(!t&&e&&(!r||r==="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}Do.stringifyNumber=yd});var Zi=v(Ir=>{"use strict";var Nd=_(),Qi=Ke(),bd={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Qi.stringifyNumber},kd={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t),stringify(t){let e=Number(t.value);return isFinite(e)?e.toExponential():Qi.stringifyNumber(t)}},Sd={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(t){let e=new Nd.Scalar(parseFloat(t)),r=t.indexOf(".");return r!==-1&&t[t.length-1]==="0"&&(e.minFractionDigits=t.length-r-1),e},stringify:Qi.stringifyNumber};Ir.float=Sd;Ir.floatExp=kd;Ir.floatNaN=bd});var tn=v(jr=>{"use strict";var Lo=Ke(),Tr=t=>typeof t=="bigint"||Number.isInteger(t),en=(t,e,r,{intAsBigInt:i})=>i?BigInt(t):parseInt(t.substring(e),r);function Bo(t,e,r){let{value:i}=t;return Tr(i)&&i>=0?r+i.toString(e):Lo.stringifyNumber(t)}var Ed={identify:t=>Tr(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(t,e,r)=>en(t,2,8,r),stringify:t=>Bo(t,8,"0o")},Cd={identify:Tr,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(t,e,r)=>en(t,0,10,r),stringify:Lo.stringifyNumber},xd={identify:t=>Tr(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(t,e,r)=>en(t,2,16,r),stringify:t=>Bo(t,16,"0x")};jr.int=Cd;jr.intHex=xd;jr.intOct=Ed});var Vo=v(Mo=>{"use strict";var Pd=Ge(),Rd=_r(),Ad=Ue(),_d=bt(),Id=Xi(),rn=Zi(),nn=tn(),Td=[Pd.map,Ad.seq,_d.string,Rd.nullTag,Id.boolTag,nn.intOct,nn.int,nn.intHex,rn.floatNaN,rn.floatExp,rn.float];Mo.schema=Td});var Wo=v(qo=>{"use strict";var jd=_(),$d=Ge(),Od=Ue();function Fo(t){return typeof t=="bigint"||Number.isInteger(t)}var $r=({value:t})=>JSON.stringify(t),Hd=[{identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify:$r},{identify:t=>t==null,createNode:()=>new jd.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:$r},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:t=>t==="true",stringify:$r},{identify:Fo,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(t,e,{intAsBigInt:r})=>r?BigInt(t):parseInt(t,10),stringify:({value:t})=>Fo(t)?t.toString():JSON.stringify(t)},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:t=>parseFloat(t),stringify:$r}],Dd={default:!0,tag:"",test:/^/,resolve(t,e){return e(`Unresolved plain scalar ${JSON.stringify(t)}`),t}},Ld=[$d.map,Od.seq].concat(Hd,Dd);qo.schema=Ld});var on=v(zo=>{"use strict";var kt=ir("buffer"),an=_(),Bd=gt(),Md={identify:t=>t instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(t,e){if(typeof kt.Buffer=="function")return kt.Buffer.from(t,"base64");if(typeof atob=="function"){let r=atob(t.replace(/[\n\r]/g,"")),i=new Uint8Array(r.length);for(let n=0;n<r.length;++n)i[n]=r.charCodeAt(n);return i}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),t},stringify({comment:t,type:e,value:r},i,n,a){if(!r)return"";let o=r,s;if(typeof kt.Buffer=="function")s=o instanceof kt.Buffer?o.toString("base64"):kt.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=an.Scalar.BLOCK_LITERAL),e!==an.Scalar.QUOTE_DOUBLE){let c=Math.max(i.options.lineWidth-i.indent.length,i.options.minContentWidth),l=Math.ceil(s.length/c),f=new Array(l);for(let u=0,d=0;u<l;++u,d+=c)f[u]=s.substr(d,c);s=f.join(e===an.Scalar.BLOCK_LITERAL?`
55
+ `:" ")}return Bd.stringifyString({comment:t,type:e,value:s},i,n,a)}};zo.binary=Md});var Dr=v(Hr=>{"use strict";var Or=x(),sn=ve(),Vd=_(),Fd=ye();function Jo(t,e){if(Or.isSeq(t))for(let r=0;r<t.items.length;++r){let i=t.items[r];if(!Or.isPair(i)){if(Or.isMap(i)){i.items.length>1&&e("Each pair must have its own sequence indicator");let n=i.items[0]||new sn.Pair(new Vd.Scalar(null));if(i.commentBefore&&(n.key.commentBefore=n.key.commentBefore?`${i.commentBefore}
56
56
  ${n.key.commentBefore}`:i.commentBefore),i.comment){let a=n.value??n.key;a.comment=a.comment?`${i.comment}
57
- ${a.comment}`:i.comment}i=n}r.items[t]=jr.isPair(i)?i:new en.Pair(i)}}else e("Expected a sequence for this tag");return r}function Vo(r,e,t){let{replacer:i}=t,n=new Pd.YAMLSeq(r);n.tag="tag:yaml.org,2002:pairs";let a=0;if(e&&Symbol.iterator in Object(e))for(let o of e){typeof i=="function"&&(o=i.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;n.items.push(en.createPair(s,c,t))}return n}var Rd={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Mo,createNode:Vo};$r.createPairs=Vo;$r.pairs=Rd;$r.resolvePairs=Mo});var nn=v(rn=>{"use strict";var Fo=C(),tn=ue(),yt=ve(),Ad=ge(),qo=Or(),Ie=class r extends Ad.YAMLSeq{constructor(){super(),this.add=yt.YAMLMap.prototype.add.bind(this),this.delete=yt.YAMLMap.prototype.delete.bind(this),this.get=yt.YAMLMap.prototype.get.bind(this),this.has=yt.YAMLMap.prototype.has.bind(this),this.set=yt.YAMLMap.prototype.set.bind(this),this.tag=r.tag}toJSON(e,t){if(!t)return super.toJSON(e);let i=new Map;t?.onCreate&&t.onCreate(i);for(let n of this.items){let a,o;if(Fo.isPair(n)?(a=tn.toJS(n.key,"",t),o=tn.toJS(n.value,a,t)):a=tn.toJS(n,"",t),i.has(a))throw new Error("Ordered maps must not include duplicate keys");i.set(a,o)}return i}static from(e,t,i){let n=qo.createPairs(e,t,i),a=new this;return a.items=n.items,a}};Ie.tag="tag:yaml.org,2002:omap";var _d={collection:"seq",identify:r=>r instanceof Map,nodeClass:Ie,default:!1,tag:"tag:yaml.org,2002:omap",resolve(r,e){let t=qo.resolvePairs(r,e),i=[];for(let{key:n}of t.items)Fo.isScalar(n)&&(i.includes(n.value)?e(`Ordered maps must not include duplicate keys: ${n.value}`):i.push(n.value));return Object.assign(new Ie,t)},createNode:(r,e,t)=>Ie.from(r,e,t)};rn.YAMLOMap=Ie;rn.omap=_d});var Uo=v(an=>{"use strict";var Wo=A();function zo({value:r,source:e},t){return e&&(r?Jo:Go).test.test(e)?e:r?t.options.trueStr:t.options.falseStr}var Jo={identify:r=>r===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new Wo.Scalar(!0),stringify:zo},Go={identify:r=>r===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new Wo.Scalar(!1),stringify:zo};an.falseTag=Go;an.trueTag=Jo});var Ko=v(Hr=>{"use strict";var Td=A(),on=Ge(),Id={identify:r=>typeof r=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:r=>r.slice(-3).toLowerCase()==="nan"?NaN:r[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:on.stringifyNumber},jd={identify:r=>typeof r=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:r=>parseFloat(r.replace(/_/g,"")),stringify(r){let e=Number(r.value);return isFinite(e)?e.toExponential():on.stringifyNumber(r)}},$d={identify:r=>typeof r=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(r){let e=new Td.Scalar(parseFloat(r.replace(/_/g,""))),t=r.indexOf(".");if(t!==-1){let i=r.substring(t+1).replace(/_/g,"");i[i.length-1]==="0"&&(e.minFractionDigits=i.length)}return e},stringify:on.stringifyNumber};Hr.float=$d;Hr.floatExp=jd;Hr.floatNaN=Id});var Xo=v(bt=>{"use strict";var Yo=Ge(),Nt=r=>typeof r=="bigint"||Number.isInteger(r);function Dr(r,e,t,{intAsBigInt:i}){let n=r[0];if((n==="-"||n==="+")&&(e+=1),r=r.substring(e).replace(/_/g,""),i){switch(t){case 2:r=`0b${r}`;break;case 8:r=`0o${r}`;break;case 16:r=`0x${r}`;break}let o=BigInt(r);return n==="-"?BigInt(-1)*o:o}let a=parseInt(r,t);return n==="-"?-1*a:a}function sn(r,e,t){let{value:i}=r;if(Nt(i)){let n=i.toString(e);return i<0?"-"+t+n.substr(1):t+n}return Yo.stringifyNumber(r)}var Od={identify:Nt,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(r,e,t)=>Dr(r,2,2,t),stringify:r=>sn(r,2,"0b")},Hd={identify:Nt,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(r,e,t)=>Dr(r,1,8,t),stringify:r=>sn(r,8,"0")},Dd={identify:Nt,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(r,e,t)=>Dr(r,0,10,t),stringify:Yo.stringifyNumber},Bd={identify:Nt,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(r,e,t)=>Dr(r,2,16,t),stringify:r=>sn(r,16,"0x")};bt.int=Dd;bt.intBin=Od;bt.intHex=Bd;bt.intOct=Hd});var ln=v(cn=>{"use strict";var Mr=C(),Br=pe(),Lr=ve(),je=class r extends Lr.YAMLMap{constructor(e){super(e),this.tag=r.tag}add(e){let t;Mr.isPair(e)?t=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?t=new Br.Pair(e.key,null):t=new Br.Pair(e,null),Lr.findPair(this.items,t.key)||this.items.push(t)}get(e,t){let i=Lr.findPair(this.items,e);return!t&&Mr.isPair(i)?Mr.isScalar(i.key)?i.key.value:i.key:i}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 i=Lr.findPair(this.items,e);i&&!t?this.items.splice(this.items.indexOf(i),1):!i&&t&&this.items.push(new Br.Pair(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,i){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,i);throw new Error("Set items must all have null values")}static from(e,t,i){let{replacer:n}=i,a=new this(e);if(t&&Symbol.iterator in Object(t))for(let o of t)typeof n=="function"&&(o=n.call(t,o,o)),a.items.push(Br.createPair(o,null,i));return a}};je.tag="tag:yaml.org,2002:set";var Ld={collection:"map",identify:r=>r instanceof Set,nodeClass:je,default:!1,tag:"tag:yaml.org,2002:set",createNode:(r,e,t)=>je.from(r,e,t),resolve(r,e){if(Mr.isMap(r)){if(r.hasAllNullValues(!0))return Object.assign(new je,r);e("Set items must all have null values")}else e("Expected a mapping for this tag");return r}};cn.YAMLSet=je;cn.set=Ld});var dn=v(Vr=>{"use strict";var Md=Ge();function un(r,e){let t=r[0],i=t==="-"||t==="+"?r.substring(1):r,n=o=>e?BigInt(o):Number(o),a=i.replace(/_/g,"").split(":").reduce((o,s)=>o*n(60)+n(s),n(0));return t==="-"?n(-1)*a:a}function Qo(r){let{value:e}=r,t=o=>o;if(typeof e=="bigint")t=o=>BigInt(o);else if(isNaN(e)||!isFinite(e))return Md.stringifyNumber(r);let i="";e<0&&(i="-",e*=t(-1));let n=t(60),a=[e%n];return e<60?a.unshift(0):(e=(e-a[0])/n,a.unshift(e%n),e>=60&&(e=(e-a[0])/n,a.unshift(e))),i+a.map(o=>String(o).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var Vd={identify:r=>typeof r=="bigint"||Number.isInteger(r),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(r,e,{intAsBigInt:t})=>un(r,t),stringify:Qo},Fd={identify:r=>typeof r=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:r=>un(r,!1),stringify:Qo},Zo={identify:r=>r 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(r){let e=r.match(Zo.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,t,i,n,a,o,s]=e.map(Number),c=e[7]?Number((e[7]+"00").substr(1,3)):0,l=Date.UTC(t,i-1,n,a||0,o||0,s||0,c),f=e[8];if(f&&f!=="Z"){let u=un(f,!1);Math.abs(u)<30&&(u*=60),l-=6e4*u}return new Date(l)},stringify:({value:r})=>r?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};Vr.floatTime=Fd;Vr.intTime=Vd;Vr.timestamp=Zo});var rs=v(ts=>{"use strict";var qd=ze(),Wd=Rr(),zd=Je(),Jd=gt(),Gd=Zi(),es=Uo(),fn=Ko(),Fr=Xo(),Ud=Nr(),Kd=nn(),Yd=Or(),Xd=ln(),hn=dn(),Qd=[qd.map,zd.seq,Jd.string,Wd.nullTag,es.trueTag,es.falseTag,Fr.intBin,Fr.intOct,Fr.int,Fr.intHex,fn.floatNaN,fn.floatExp,fn.float,Gd.binary,Ud.merge,Kd.omap,Yd.pairs,Xd.set,hn.intTime,hn.floatTime,hn.timestamp];ts.schema=Qd});var fs=v(vn=>{"use strict";var os=ze(),Zd=Rr(),ss=Je(),ef=gt(),tf=zi(),pn=Gi(),mn=Ki(),rf=Oo(),nf=Bo(),cs=Zi(),kt=Nr(),ls=nn(),us=Or(),is=rs(),ds=ln(),qr=dn(),ns=new Map([["core",rf.schema],["failsafe",[os.map,ss.seq,ef.string]],["json",nf.schema],["yaml11",is.schema],["yaml-1.1",is.schema]]),as={binary:cs.binary,bool:tf.boolTag,float:pn.float,floatExp:pn.floatExp,floatNaN:pn.floatNaN,floatTime:qr.floatTime,int:mn.int,intHex:mn.intHex,intOct:mn.intOct,intTime:qr.intTime,map:os.map,merge:kt.merge,null:Zd.nullTag,omap:ls.omap,pairs:us.pairs,seq:ss.seq,set:ds.set,timestamp:qr.timestamp},af={"tag:yaml.org,2002:binary":cs.binary,"tag:yaml.org,2002:merge":kt.merge,"tag:yaml.org,2002:omap":ls.omap,"tag:yaml.org,2002:pairs":us.pairs,"tag:yaml.org,2002:set":ds.set,"tag:yaml.org,2002:timestamp":qr.timestamp};function of(r,e,t){let i=ns.get(e);if(i&&!r)return t&&!i.includes(kt.merge)?i.concat(kt.merge):i.slice();let n=i;if(!n)if(Array.isArray(r))n=[];else{let a=Array.from(ns.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(r))for(let a of r)n=n.concat(a);else typeof r=="function"&&(n=r(n.slice()));return t&&(n=n.concat(kt.merge)),n.reduce((a,o)=>{let s=typeof o=="string"?as[o]:o;if(!s){let c=JSON.stringify(o),l=Object.keys(as).map(f=>JSON.stringify(f)).join(", ");throw new Error(`Unknown custom tag ${c}; use one of ${l}`)}return a.includes(s)||a.push(s),a},[])}vn.coreKnownTags=af;vn.getTags=of});var yn=v(hs=>{"use strict";var gn=C(),sf=ze(),cf=Je(),lf=gt(),Wr=fs(),uf=(r,e)=>r.key<e.key?-1:r.key>e.key?1:0,wn=class r{constructor({compat:e,customTags:t,merge:i,resolveKnownTags:n,schema:a,sortMapEntries:o,toStringDefaults:s}){this.compat=Array.isArray(e)?Wr.getTags(e,"compat"):e?Wr.getTags(null,e):null,this.name=typeof a=="string"&&a||"core",this.knownTags=n?Wr.coreKnownTags:{},this.tags=Wr.getTags(t,this.name,i),this.toStringOptions=s??null,Object.defineProperty(this,gn.MAP,{value:sf.map}),Object.defineProperty(this,gn.SCALAR,{value:lf.string}),Object.defineProperty(this,gn.SEQ,{value:cf.seq}),this.sortMapEntries=typeof o=="function"?o:o===!0?uf:null}clone(){let e=Object.create(r.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}};hs.Schema=wn});var ms=v(ps=>{"use strict";var df=C(),Nn=pt(),St=ut();function ff(r,e){let t=[],i=e.directives===!0;if(e.directives!==!1&&r.directives){let c=r.directives.toString(r);c?(t.push(c),i=!0):r.directives.docStart&&(i=!0)}i&&t.push("---");let n=Nn.createStringifyContext(r,e),{commentString:a}=n.options;if(r.commentBefore){t.length!==1&&t.unshift("");let c=a(r.commentBefore);t.unshift(St.indentComment(c,""))}let o=!1,s=null;if(r.contents){if(df.isNode(r.contents)){if(r.contents.spaceBefore&&i&&t.push(""),r.contents.commentBefore){let f=a(r.contents.commentBefore);t.push(St.indentComment(f,""))}n.forceBlockIndent=!!r.comment,s=r.contents.comment}let c=s?void 0:()=>o=!0,l=Nn.stringify(r.contents,n,()=>s=null,c);s&&(l+=St.lineComment(l,"",a(s))),(l[0]==="|"||l[0]===">")&&t[t.length-1]==="---"?t[t.length-1]=`--- ${l}`:t.push(l)}else t.push(Nn.stringify(r.contents,n));if(r.directives?.docEnd)if(r.comment){let c=a(r.comment);c.includes(`
58
- `)?(t.push("..."),t.push(St.indentComment(c,""))):t.push(`... ${c}`)}else t.push("...");else{let c=r.comment;c&&o&&(c=c.replace(/^\n+/,"")),c&&((!o||s)&&t[t.length-1]!==""&&t.push(""),t.push(St.indentComment(a(c),"")))}return t.join(`
57
+ ${a.comment}`:i.comment}i=n}t.items[r]=Or.isPair(i)?i:new sn.Pair(i)}}else e("Expected a sequence for this tag");return t}function Go(t,e,r){let{replacer:i}=r,n=new Fd.YAMLSeq(t);n.tag="tag:yaml.org,2002:pairs";let a=0;if(e&&Symbol.iterator in Object(e))for(let o of e){typeof i=="function"&&(o=i.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;n.items.push(sn.createPair(s,c,r))}return n}var qd={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Jo,createNode:Go};Hr.createPairs=Go;Hr.pairs=qd;Hr.resolvePairs=Jo});var un=v(ln=>{"use strict";var Uo=x(),cn=fe(),St=we(),Wd=ye(),Ko=Dr(),$e=class t extends Wd.YAMLSeq{constructor(){super(),this.add=St.YAMLMap.prototype.add.bind(this),this.delete=St.YAMLMap.prototype.delete.bind(this),this.get=St.YAMLMap.prototype.get.bind(this),this.has=St.YAMLMap.prototype.has.bind(this),this.set=St.YAMLMap.prototype.set.bind(this),this.tag=t.tag}toJSON(e,r){if(!r)return super.toJSON(e);let i=new Map;r?.onCreate&&r.onCreate(i);for(let n of this.items){let a,o;if(Uo.isPair(n)?(a=cn.toJS(n.key,"",r),o=cn.toJS(n.value,a,r)):a=cn.toJS(n,"",r),i.has(a))throw new Error("Ordered maps must not include duplicate keys");i.set(a,o)}return i}static from(e,r,i){let n=Ko.createPairs(e,r,i),a=new this;return a.items=n.items,a}};$e.tag="tag:yaml.org,2002:omap";var zd={collection:"seq",identify:t=>t instanceof Map,nodeClass:$e,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,e){let r=Ko.resolvePairs(t,e),i=[];for(let{key:n}of r.items)Uo.isScalar(n)&&(i.includes(n.value)?e(`Ordered maps must not include duplicate keys: ${n.value}`):i.push(n.value));return Object.assign(new $e,r)},createNode:(t,e,r)=>$e.from(t,e,r)};ln.YAMLOMap=$e;ln.omap=zd});var es=v(dn=>{"use strict";var Yo=_();function Xo({value:t,source:e},r){return e&&(t?Qo:Zo).test.test(e)?e:t?r.options.trueStr:r.options.falseStr}var Qo={identify:t=>t===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new Yo.Scalar(!0),stringify:Xo},Zo={identify:t=>t===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new Yo.Scalar(!1),stringify:Xo};dn.falseTag=Zo;dn.trueTag=Qo});var ts=v(Lr=>{"use strict";var Jd=_(),fn=Ke(),Gd={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:fn.stringifyNumber},Ud={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t.replace(/_/g,"")),stringify(t){let e=Number(t.value);return isFinite(e)?e.toExponential():fn.stringifyNumber(t)}},Kd={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){let e=new Jd.Scalar(parseFloat(t.replace(/_/g,""))),r=t.indexOf(".");if(r!==-1){let i=t.substring(r+1).replace(/_/g,"");i[i.length-1]==="0"&&(e.minFractionDigits=i.length)}return e},stringify:fn.stringifyNumber};Lr.float=Kd;Lr.floatExp=Ud;Lr.floatNaN=Gd});var is=v(Ct=>{"use strict";var rs=Ke(),Et=t=>typeof t=="bigint"||Number.isInteger(t);function Br(t,e,r,{intAsBigInt:i}){let n=t[0];if((n==="-"||n==="+")&&(e+=1),t=t.substring(e).replace(/_/g,""),i){switch(r){case 2:t=`0b${t}`;break;case 8:t=`0o${t}`;break;case 16:t=`0x${t}`;break}let o=BigInt(t);return n==="-"?BigInt(-1)*o:o}let a=parseInt(t,r);return n==="-"?-1*a:a}function hn(t,e,r){let{value:i}=t;if(Et(i)){let n=i.toString(e);return i<0?"-"+r+n.substr(1):r+n}return rs.stringifyNumber(t)}var Yd={identify:Et,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(t,e,r)=>Br(t,2,2,r),stringify:t=>hn(t,2,"0b")},Xd={identify:Et,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(t,e,r)=>Br(t,1,8,r),stringify:t=>hn(t,8,"0")},Qd={identify:Et,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(t,e,r)=>Br(t,0,10,r),stringify:rs.stringifyNumber},Zd={identify:Et,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(t,e,r)=>Br(t,2,16,r),stringify:t=>hn(t,16,"0x")};Ct.int=Qd;Ct.intBin=Yd;Ct.intHex=Zd;Ct.intOct=Xd});var mn=v(pn=>{"use strict";var Fr=x(),Mr=ve(),Vr=we(),Oe=class t extends Vr.YAMLMap{constructor(e){super(e),this.tag=t.tag}add(e){let r;Fr.isPair(e)?r=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?r=new Mr.Pair(e.key,null):r=new Mr.Pair(e,null),Vr.findPair(this.items,r.key)||this.items.push(r)}get(e,r){let i=Vr.findPair(this.items,e);return!r&&Fr.isPair(i)?Fr.isScalar(i.key)?i.key.value:i.key:i}set(e,r){if(typeof r!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof r}`);let i=Vr.findPair(this.items,e);i&&!r?this.items.splice(this.items.indexOf(i),1):!i&&r&&this.items.push(new Mr.Pair(e))}toJSON(e,r){return super.toJSON(e,r,Set)}toString(e,r,i){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),r,i);throw new Error("Set items must all have null values")}static from(e,r,i){let{replacer:n}=i,a=new this(e);if(r&&Symbol.iterator in Object(r))for(let o of r)typeof n=="function"&&(o=n.call(r,o,o)),a.items.push(Mr.createPair(o,null,i));return a}};Oe.tag="tag:yaml.org,2002:set";var ef={collection:"map",identify:t=>t instanceof Set,nodeClass:Oe,default:!1,tag:"tag:yaml.org,2002:set",createNode:(t,e,r)=>Oe.from(t,e,r),resolve(t,e){if(Fr.isMap(t)){if(t.hasAllNullValues(!0))return Object.assign(new Oe,t);e("Set items must all have null values")}else e("Expected a mapping for this tag");return t}};pn.YAMLSet=Oe;pn.set=ef});var gn=v(qr=>{"use strict";var tf=Ke();function vn(t,e){let r=t[0],i=r==="-"||r==="+"?t.substring(1):t,n=o=>e?BigInt(o):Number(o),a=i.replace(/_/g,"").split(":").reduce((o,s)=>o*n(60)+n(s),n(0));return r==="-"?n(-1)*a:a}function ns(t){let{value:e}=t,r=o=>o;if(typeof e=="bigint")r=o=>BigInt(o);else if(isNaN(e)||!isFinite(e))return tf.stringifyNumber(t);let i="";e<0&&(i="-",e*=r(-1));let n=r(60),a=[e%n];return e<60?a.unshift(0):(e=(e-a[0])/n,a.unshift(e%n),e>=60&&(e=(e-a[0])/n,a.unshift(e))),i+a.map(o=>String(o).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var rf={identify:t=>typeof t=="bigint"||Number.isInteger(t),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(t,e,{intAsBigInt:r})=>vn(t,r),stringify:ns},nf={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:t=>vn(t,!1),stringify:ns},as={identify:t=>t 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(t){let e=t.match(as.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,r,i,n,a,o,s]=e.map(Number),c=e[7]?Number((e[7]+"00").substr(1,3)):0,l=Date.UTC(r,i-1,n,a||0,o||0,s||0,c),f=e[8];if(f&&f!=="Z"){let u=vn(f,!1);Math.abs(u)<30&&(u*=60),l-=6e4*u}return new Date(l)},stringify:({value:t})=>t?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};qr.floatTime=nf;qr.intTime=rf;qr.timestamp=as});var cs=v(ss=>{"use strict";var af=Ge(),of=_r(),sf=Ue(),cf=bt(),lf=on(),os=es(),wn=ts(),Wr=is(),uf=kr(),df=un(),ff=Dr(),hf=mn(),yn=gn(),pf=[af.map,sf.seq,cf.string,of.nullTag,os.trueTag,os.falseTag,Wr.intBin,Wr.intOct,Wr.int,Wr.intHex,wn.floatNaN,wn.floatExp,wn.float,lf.binary,uf.merge,df.omap,ff.pairs,hf.set,yn.intTime,yn.floatTime,yn.timestamp];ss.schema=pf});var ws=v(kn=>{"use strict";var fs=Ge(),mf=_r(),hs=Ue(),vf=bt(),gf=Xi(),Nn=Zi(),bn=tn(),wf=Vo(),yf=Wo(),ps=on(),xt=kr(),ms=un(),vs=Dr(),ls=cs(),gs=mn(),zr=gn(),us=new Map([["core",wf.schema],["failsafe",[fs.map,hs.seq,vf.string]],["json",yf.schema],["yaml11",ls.schema],["yaml-1.1",ls.schema]]),ds={binary:ps.binary,bool:gf.boolTag,float:Nn.float,floatExp:Nn.floatExp,floatNaN:Nn.floatNaN,floatTime:zr.floatTime,int:bn.int,intHex:bn.intHex,intOct:bn.intOct,intTime:zr.intTime,map:fs.map,merge:xt.merge,null:mf.nullTag,omap:ms.omap,pairs:vs.pairs,seq:hs.seq,set:gs.set,timestamp:zr.timestamp},Nf={"tag:yaml.org,2002:binary":ps.binary,"tag:yaml.org,2002:merge":xt.merge,"tag:yaml.org,2002:omap":ms.omap,"tag:yaml.org,2002:pairs":vs.pairs,"tag:yaml.org,2002:set":gs.set,"tag:yaml.org,2002:timestamp":zr.timestamp};function bf(t,e,r){let i=us.get(e);if(i&&!t)return r&&!i.includes(xt.merge)?i.concat(xt.merge):i.slice();let n=i;if(!n)if(Array.isArray(t))n=[];else{let a=Array.from(us.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(t))for(let a of t)n=n.concat(a);else typeof t=="function"&&(n=t(n.slice()));return r&&(n=n.concat(xt.merge)),n.reduce((a,o)=>{let s=typeof o=="string"?ds[o]:o;if(!s){let c=JSON.stringify(o),l=Object.keys(ds).map(f=>JSON.stringify(f)).join(", ");throw new Error(`Unknown custom tag ${c}; use one of ${l}`)}return a.includes(s)||a.push(s),a},[])}kn.coreKnownTags=Nf;kn.getTags=bf});var Cn=v(ys=>{"use strict";var Sn=x(),kf=Ge(),Sf=Ue(),Ef=bt(),Jr=ws(),Cf=(t,e)=>t.key<e.key?-1:t.key>e.key?1:0,En=class t{constructor({compat:e,customTags:r,merge:i,resolveKnownTags:n,schema:a,sortMapEntries:o,toStringDefaults:s}){this.compat=Array.isArray(e)?Jr.getTags(e,"compat"):e?Jr.getTags(null,e):null,this.name=typeof a=="string"&&a||"core",this.knownTags=n?Jr.coreKnownTags:{},this.tags=Jr.getTags(r,this.name,i),this.toStringOptions=s??null,Object.defineProperty(this,Sn.MAP,{value:kf.map}),Object.defineProperty(this,Sn.SCALAR,{value:Ef.string}),Object.defineProperty(this,Sn.SEQ,{value:Sf.seq}),this.sortMapEntries=typeof o=="function"?o:o===!0?Cf:null}clone(){let e=Object.create(t.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}};ys.Schema=En});var bs=v(Ns=>{"use strict";var xf=x(),xn=wt(),Pt=pt();function Pf(t,e){let r=[],i=e.directives===!0;if(e.directives!==!1&&t.directives){let c=t.directives.toString(t);c?(r.push(c),i=!0):t.directives.docStart&&(i=!0)}i&&r.push("---");let n=xn.createStringifyContext(t,e),{commentString:a}=n.options;if(t.commentBefore){r.length!==1&&r.unshift("");let c=a(t.commentBefore);r.unshift(Pt.indentComment(c,""))}let o=!1,s=null;if(t.contents){if(xf.isNode(t.contents)){if(t.contents.spaceBefore&&i&&r.push(""),t.contents.commentBefore){let f=a(t.contents.commentBefore);r.push(Pt.indentComment(f,""))}n.forceBlockIndent=!!t.comment,s=t.contents.comment}let c=s?void 0:()=>o=!0,l=xn.stringify(t.contents,n,()=>s=null,c);s&&(l+=Pt.lineComment(l,"",a(s))),(l[0]==="|"||l[0]===">")&&r[r.length-1]==="---"?r[r.length-1]=`--- ${l}`:r.push(l)}else r.push(xn.stringify(t.contents,n));if(t.directives?.docEnd)if(t.comment){let c=a(t.comment);c.includes(`
58
+ `)?(r.push("..."),r.push(Pt.indentComment(c,""))):r.push(`... ${c}`)}else r.push("...");else{let c=t.comment;c&&o&&(c=c.replace(/^\n+/,"")),c&&((!o||s)&&r[r.length-1]!==""&&r.push(""),r.push(Pt.indentComment(a(c),"")))}return r.join(`
59
59
  `)+`
60
- `}ps.stringifyDocument=ff});var Et=v(vs=>{"use strict";var hf=ct(),Ue=ur(),F=C(),pf=pe(),mf=ue(),vf=yn(),gf=ms(),bn=or(),wf=Ei(),yf=lt(),kn=Si(),Sn=class r{constructor(e,t,i){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,F.NODE_TYPE,{value:F.DOC});let n=null;typeof t=="function"||Array.isArray(t)?n=t:i===void 0&&t&&(i=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"},i);this.options=a;let{version:o}=a;i?._directives?(this.directives=i._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new kn.Directives({version:o}),this.setSchema(o,i),this.contents=e===void 0?null:this.createNode(e,n,i)}clone(){let e=Object.create(r.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){Ke(this.contents)&&this.contents.add(e)}addIn(e,t){Ke(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let i=bn.anchorNames(this);e.anchor=!t||i.has(t)?bn.findNewAnchor(t||"a",i):t}return new hf.Alias(e.anchor)}createNode(e,t,i){let n;if(typeof t=="function")e=t.call({"":e},"",e),n=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)),n=t}else i===void 0&&t&&(i=t,t=void 0);let{aliasDuplicateObjects:a,anchorPrefix:o,flow:s,keepUndefined:c,onTagObj:l,tag:f}=i??{},{onAnchor:u,setAnchors:d,sourceObjects:m}=bn.createNodeAnchors(this,o||"a"),g={aliasDuplicateObjects:a??!0,keepUndefined:c??!1,onAnchor:u,onTagObj:l,replacer:n,schema:this.schema,sourceObjects:m},h=yf.createNode(e,f,g);return s&&F.isCollection(h)&&(h.flow=!0),d(),h}createPair(e,t,i={}){let n=this.createNode(e,null,i),a=this.createNode(t,null,i);return new pf.Pair(n,a)}delete(e){return Ke(this.contents)?this.contents.delete(e):!1}deleteIn(e){return Ue.isEmptyPath(e)?this.contents==null?!1:(this.contents=null,!0):Ke(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 Ue.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 Ue.isEmptyPath(e)?this.contents!==void 0:F.isCollection(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=Ue.collectionFromPath(this.schema,[e],t):Ke(this.contents)&&this.contents.set(e,t)}setIn(e,t){Ue.isEmptyPath(e)?this.contents=t:this.contents==null?this.contents=Ue.collectionFromPath(this.schema,Array.from(e),t):Ke(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e=="number"&&(e=String(e));let i;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new kn.Directives({version:"1.1"}),i={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new kn.Directives({version:e}),i={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,i=null;break;default:{let n=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${n}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(i)this.schema=new vf.Schema(Object.assign(i,t));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:t,mapAsMap:i,maxAliasCount:n,onAnchor:a,reviver:o}={}){let s={anchors:new Map,doc:this,keep:!e,mapAsMap:i===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},c=mf.toJS(this.contents,t??"",s);if(typeof a=="function")for(let{count:l,res:f}of s.anchors.values())a(f,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 Ke(r){if(F.isCollection(r))return!0;throw new Error("Expected a YAML collection as document contents")}vs.Document=Sn});var Pt=v(xt=>{"use strict";var Ct=class extends Error{constructor(e,t,i,n){super(),this.name=e,this.code=i,this.message=n,this.pos=t}},En=class extends Ct{constructor(e,t,i){super("YAMLParseError",e,t,i)}},Cn=class extends Ct{constructor(e,t,i){super("YAMLWarning",e,t,i)}},Nf=(r,e)=>t=>{if(t.pos[0]===-1)return;t.linePos=t.pos.map(s=>e.linePos(s));let{line:i,col:n}=t.linePos[0];t.message+=` at line ${i}, column ${n}`;let a=n-1,o=r.substring(e.lineStarts[i-1],e.lineStarts[i]).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)+"…"),i>1&&/^ *$/.test(o.substring(0,a))){let s=r.substring(e.lineStarts[i-2],e.lineStarts[i-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===i&&c.col>n&&(s=Math.max(1,Math.min(c.col-n,80-a)));let l=" ".repeat(a)+"^".repeat(s);t.message+=`:
60
+ `}Ns.stringifyDocument=Pf});var Rt=v(ks=>{"use strict";var Rf=ft(),Ye=fr(),q=x(),Af=ve(),_f=fe(),If=Cn(),Tf=bs(),Pn=cr(),jf=_i(),$f=ht(),Rn=Ai(),An=class t{constructor(e,r,i){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,q.NODE_TYPE,{value:q.DOC});let n=null;typeof r=="function"||Array.isArray(r)?n=r:i===void 0&&r&&(i=r,r=void 0);let a=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},i);this.options=a;let{version:o}=a;i?._directives?(this.directives=i._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new Rn.Directives({version:o}),this.setSchema(o,i),this.contents=e===void 0?null:this.createNode(e,n,i)}clone(){let e=Object.create(t.prototype,{[q.NODE_TYPE]:{value:q.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=q.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){Xe(this.contents)&&this.contents.add(e)}addIn(e,r){Xe(this.contents)&&this.contents.addIn(e,r)}createAlias(e,r){if(!e.anchor){let i=Pn.anchorNames(this);e.anchor=!r||i.has(r)?Pn.findNewAnchor(r||"a",i):r}return new Rf.Alias(e.anchor)}createNode(e,r,i){let n;if(typeof r=="function")e=r.call({"":e},"",e),n=r;else if(Array.isArray(r)){let p=N=>typeof N=="number"||N instanceof String||N instanceof Number,w=r.filter(p).map(String);w.length>0&&(r=r.concat(w)),n=r}else i===void 0&&r&&(i=r,r=void 0);let{aliasDuplicateObjects:a,anchorPrefix:o,flow:s,keepUndefined:c,onTagObj:l,tag:f}=i??{},{onAnchor:u,setAnchors:d,sourceObjects:m}=Pn.createNodeAnchors(this,o||"a"),g={aliasDuplicateObjects:a??!0,keepUndefined:c??!1,onAnchor:u,onTagObj:l,replacer:n,schema:this.schema,sourceObjects:m},h=$f.createNode(e,f,g);return s&&q.isCollection(h)&&(h.flow=!0),d(),h}createPair(e,r,i={}){let n=this.createNode(e,null,i),a=this.createNode(r,null,i);return new Af.Pair(n,a)}delete(e){return Xe(this.contents)?this.contents.delete(e):!1}deleteIn(e){return Ye.isEmptyPath(e)?this.contents==null?!1:(this.contents=null,!0):Xe(this.contents)?this.contents.deleteIn(e):!1}get(e,r){return q.isCollection(this.contents)?this.contents.get(e,r):void 0}getIn(e,r){return Ye.isEmptyPath(e)?!r&&q.isScalar(this.contents)?this.contents.value:this.contents:q.isCollection(this.contents)?this.contents.getIn(e,r):void 0}has(e){return q.isCollection(this.contents)?this.contents.has(e):!1}hasIn(e){return Ye.isEmptyPath(e)?this.contents!==void 0:q.isCollection(this.contents)?this.contents.hasIn(e):!1}set(e,r){this.contents==null?this.contents=Ye.collectionFromPath(this.schema,[e],r):Xe(this.contents)&&this.contents.set(e,r)}setIn(e,r){Ye.isEmptyPath(e)?this.contents=r:this.contents==null?this.contents=Ye.collectionFromPath(this.schema,Array.from(e),r):Xe(this.contents)&&this.contents.setIn(e,r)}setSchema(e,r={}){typeof e=="number"&&(e=String(e));let i;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new Rn.Directives({version:"1.1"}),i={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new Rn.Directives({version:e}),i={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,i=null;break;default:{let n=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${n}`)}}if(r.schema instanceof Object)this.schema=r.schema;else if(i)this.schema=new If.Schema(Object.assign(i,r));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:r,mapAsMap:i,maxAliasCount:n,onAnchor:a,reviver:o}={}){let s={anchors:new Map,doc:this,keep:!e,mapAsMap:i===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},c=_f.toJS(this.contents,r??"",s);if(typeof a=="function")for(let{count:l,res:f}of s.anchors.values())a(f,l);return typeof o=="function"?jf.applyReviver(o,{"":c},"",c):c}toJSON(e,r){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:r})}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 r=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${r}`)}return Tf.stringifyDocument(this,e)}};function Xe(t){if(q.isCollection(t))return!0;throw new Error("Expected a YAML collection as document contents")}ks.Document=An});var It=v(_t=>{"use strict";var At=class extends Error{constructor(e,r,i,n){super(),this.name=e,this.code=i,this.message=n,this.pos=r}},_n=class extends At{constructor(e,r,i){super("YAMLParseError",e,r,i)}},In=class extends At{constructor(e,r,i){super("YAMLWarning",e,r,i)}},Of=(t,e)=>r=>{if(r.pos[0]===-1)return;r.linePos=r.pos.map(s=>e.linePos(s));let{line:i,col:n}=r.linePos[0];r.message+=` at line ${i}, column ${n}`;let a=n-1,o=t.substring(e.lineStarts[i-1],e.lineStarts[i]).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)+"…"),i>1&&/^ *$/.test(o.substring(0,a))){let s=t.substring(e.lineStarts[i-2],e.lineStarts[i-1]);s.length>80&&(s=s.substring(0,79)+`…
61
+ `),o=s+o}if(/[^ ]/.test(o)){let s=1,c=r.linePos[1];c?.line===i&&c.col>n&&(s=Math.max(1,Math.min(c.col-n,80-a)));let l=" ".repeat(a)+"^".repeat(s);r.message+=`:
62
62
 
63
63
  ${o}
64
64
  ${l}
65
- `}};xt.YAMLError=Ct;xt.YAMLParseError=En;xt.YAMLWarning=Cn;xt.prettifyError=Nf});var Rt=v(gs=>{"use strict";function bf(r,{flow:e,indicator:t,next:i,offset:n,onError:a,parentIndent:o,startOnNewline:s}){let c=!1,l=s,f=s,u="",d="",m=!1,g=!1,h=null,p=null,w=null,N=null,b=null,k=null,S=null;for(let y of r)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),h&&(l&&y.type!=="comment"&&y.type!=="newline"&&a(h,"TAB_AS_INDENT","Tabs are not allowed as indentation"),h=null),y.type){case"space":!e&&(t!=="doc-start"||i?.type!=="flow-collection")&&y.source.includes(" ")&&(h=y),f=!0;break;case"comment":{f||a(y,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let _=y.source.substring(1)||" ";u?u+=d+_:u=_,d="",l=!1;break}case"newline":l?u?u+=y.source:(!k||t!=="seq-item-ind")&&(c=!0):d+=y.source,l=!0,m=!0,(p||w)&&(N=y),f=!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,S??(S=y.offset),l=!1,f=!1,g=!0;break;case"tag":{w&&a(y,"MULTIPLE_TAGS","A node can have at most one tag"),w=y,S??(S=y.offset),l=!1,f=!1,g=!0;break}case t:(p||w)&&a(y,"BAD_PROP_ORDER",`Anchors and tags must be after the ${y.source} indicator`),k&&a(y,"UNEXPECTED_TOKEN",`Unexpected ${y.source} in ${e??"collection"}`),k=y,l=t==="seq-item-ind"||t==="explicit-key-ind",f=!1;break;case"comma":if(e){b&&a(y,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),b=y,l=!1,f=!1;break}default:a(y,"UNEXPECTED_TOKEN",`Unexpected ${y.type} token`),l=!1,f=!1}let E=r[r.length-1],P=E?E.offset+E.source.length:n;return g&&i&&i.type!=="space"&&i.type!=="newline"&&i.type!=="comma"&&(i.type!=="scalar"||i.source!=="")&&a(i.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),h&&(l&&h.indent<=o||i?.type==="block-map"||i?.type==="block-seq")&&a(h,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:b,found:k,spaceBefore:c,comment:u,hasNewline:m,anchor:p,tag:w,newlineAfterProp:N,end:P,start:S??P}}gs.resolveProps=bf});var zr=v(ws=>{"use strict";function xn(r){if(!r)return null;switch(r.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(r.source.includes(`
66
- `))return!0;if(r.end){for(let e of r.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(let e of r.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(xn(e.key)||xn(e.value))return!0}return!1;default:return!0}}ws.containsNewline=xn});var Pn=v(ys=>{"use strict";var kf=zr();function Sf(r,e,t){if(e?.type==="flow-collection"){let i=e.end[0];i.indent===r&&(i.source==="]"||i.source==="}")&&kf.containsNewline(e)&&t(i,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}ys.flowIndentCheck=Sf});var Rn=v(bs=>{"use strict";var Ns=C();function Ef(r,e,t){let{uniqueKeys:i}=r.options;if(i===!1)return!1;let n=typeof i=="function"?i:(a,o)=>a===o||Ns.isScalar(a)&&Ns.isScalar(o)&&a.value===o.value;return e.some(a=>n(a.key,t))}bs.mapIncludes=Ef});var Ps=v(xs=>{"use strict";var ks=pe(),Cf=ve(),Ss=Rt(),xf=zr(),Es=Pn(),Pf=Rn(),Cs="All mapping items must start at the same column";function Rf({composeNode:r,composeEmptyNode:e},t,i,n,a){let o=a?.nodeClass??Cf.YAMLMap,s=new o(t.schema);t.atRoot&&(t.atRoot=!1);let c=i.offset,l=null;for(let f of i.items){let{start:u,key:d,sep:m,value:g}=f,h=Ss.resolveProps(u,{indicator:"explicit-key-ind",next:d??m?.[0],offset:c,onError:n,parentIndent:i.indent,startOnNewline:!0}),p=!h.found;if(p){if(d&&(d.type==="block-seq"?n(c,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in d&&d.indent!==i.indent&&n(c,"BAD_INDENT",Cs)),!h.anchor&&!h.tag&&!m){l=h.end,h.comment&&(s.comment?s.comment+=`
67
- `+h.comment:s.comment=h.comment);continue}(h.newlineAfterProp||xf.containsNewline(d))&&n(d??u[u.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else h.found?.indent!==i.indent&&n(c,"BAD_INDENT",Cs);t.atKey=!0;let w=h.end,N=d?r(t,d,h,n):e(t,w,u,null,h,n);t.schema.compat&&Es.flowIndentCheck(i.indent,d,n),t.atKey=!1,Pf.mapIncludes(t,s.items,N)&&n(w,"DUPLICATE_KEY","Map keys must be unique");let b=Ss.resolveProps(m??[],{indicator:"map-value-ind",next:g,offset:N.range[2],onError:n,parentIndent:i.indent,startOnNewline:!d||d.type==="block-scalar"});if(c=b.end,b.found){p&&(g?.type==="block-map"&&!b.hasNewline&&n(c,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),t.options.strict&&h.start<b.found.offset-1024&&n(N.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let k=g?r(t,g,b,n):e(t,c,m,null,b,n);t.schema.compat&&Es.flowIndentCheck(i.indent,g,n),c=k.range[2];let S=new ks.Pair(N,k);t.options.keepSourceTokens&&(S.srcToken=f),s.items.push(S)}else{p&&n(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 k=new ks.Pair(N);t.options.keepSourceTokens&&(k.srcToken=f),s.items.push(k)}}return l&&l<c&&n(l,"IMPOSSIBLE","Map comment with trailing content"),s.range=[i.offset,c,l??c],s}xs.resolveBlockMap=Rf});var As=v(Rs=>{"use strict";var Af=ge(),_f=Rt(),Tf=Pn();function If({composeNode:r,composeEmptyNode:e},t,i,n,a){let o=a?.nodeClass??Af.YAMLSeq,s=new o(t.schema);t.atRoot&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let c=i.offset,l=null;for(let{start:f,value:u}of i.items){let d=_f.resolveProps(f,{indicator:"seq-item-ind",next:u,offset:c,onError:n,parentIndent:i.indent,startOnNewline:!0});if(!d.found)if(d.anchor||d.tag||u)u?.type==="block-seq"?n(d.end,"BAD_INDENT","All sequence items must start at the same column"):n(c,"MISSING_CHAR","Sequence item without - indicator");else{l=d.end,d.comment&&(s.comment=d.comment);continue}let m=u?r(t,u,d,n):e(t,d.end,f,null,d,n);t.schema.compat&&Tf.flowIndentCheck(i.indent,u,n),c=m.range[2],s.items.push(m)}return s.range=[i.offset,c,l??c],s}Rs.resolveBlockSeq=If});var Ye=v(_s=>{"use strict";function jf(r,e,t,i){let n="";if(r){let a=!1,o="";for(let s of r){let{source:c,type:l}=s;switch(l){case"space":a=!0;break;case"comment":{t&&!a&&i(s,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let f=c.substring(1)||" ";n?n+=o+f:n=f,o="";break}case"newline":n&&(o+=c),a=!0;break;default:i(s,"UNEXPECTED_TOKEN",`Unexpected ${l} at node end`)}e+=c.length}}return{comment:n,offset:e}}_s.resolveEnd=jf});var $s=v(js=>{"use strict";var $f=C(),Of=pe(),Ts=ve(),Hf=ge(),Df=Ye(),Is=Rt(),Bf=zr(),Lf=Rn(),An="Block collections are not allowed within flow collections",_n=r=>r&&(r.type==="block-map"||r.type==="block-seq");function Mf({composeNode:r,composeEmptyNode:e},t,i,n,a){let o=i.start.source==="{",s=o?"flow map":"flow sequence",c=a?.nodeClass??(o?Ts.YAMLMap:Hf.YAMLSeq),l=new c(t.schema);l.flow=!0;let f=t.atRoot;f&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let u=i.offset+i.start.source.length;for(let p=0;p<i.items.length;++p){let w=i.items[p],{start:N,key:b,sep:k,value:S}=w,E=Is.resolveProps(N,{flow:s,indicator:"explicit-key-ind",next:b??k?.[0],offset:u,onError:n,parentIndent:i.indent,startOnNewline:!1});if(!E.found){if(!E.anchor&&!E.tag&&!k&&!S){p===0&&E.comma?n(E.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${s}`):p<i.items.length-1&&n(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&&Bf.containsNewline(b)&&n(b,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(p===0)E.comma&&n(E.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${s}`);else if(E.comma||n(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];$f.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&&!k&&!E.found){let P=S?r(t,S,E,n):e(t,E.end,k,null,E,n);l.items.push(P),u=P.range[2],_n(S)&&n(P.range,"BLOCK_IN_FLOW",An)}else{t.atKey=!0;let P=E.end,y=b?r(t,b,E,n):e(t,P,N,null,E,n);_n(b)&&n(y.range,"BLOCK_IN_FLOW",An),t.atKey=!1;let _=Is.resolveProps(k??[],{flow:s,indicator:"map-value-ind",next:S,offset:y.range[2],onError:n,parentIndent:i.indent,startOnNewline:!1});if(_.found){if(!o&&!E.found&&t.options.strict){if(k)for(let T of k){if(T===_.found)break;if(T.type==="newline"){n(T,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}E.start<_.found.offset-1024&&n(_.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else S&&("source"in S&&S.source?.[0]===":"?n(S,"MISSING_CHAR",`Missing space after : in ${s}`):n(_.start,"MISSING_CHAR",`Missing , or : between ${s} items`));let le=S?r(t,S,_,n):_.found?e(t,_.end,k,null,_,n):null;le?_n(S)&&n(le.range,"BLOCK_IN_FLOW",An):_.comment&&(y.comment?y.comment+=`
71
- `+_.comment:y.comment=_.comment);let Me=new Of.Pair(y,le);if(t.options.keepSourceTokens&&(Me.srcToken=w),o){let T=l;Lf.mapIncludes(t,T.items,y)&&n(P,"DUPLICATE_KEY","Map keys must be unique"),T.items.push(Me)}else{let T=new Ts.YAMLMap(t.schema);T.flow=!0,T.items.push(Me);let Ia=(le??y).range;T.range=[y.range[0],Ia[1],Ia[2]],l.items.push(T)}u=le?le.range[2]:_.end}}let d=o?"}":"]",[m,...g]=i.end,h=u;if(m?.source===d)h=m.offset+m.source.length;else{let p=s[0].toUpperCase()+s.substring(1),w=f?`${p} must end with a ${d}`:`${p} in block collection must be sufficiently indented and end with a ${d}`;n(u,f?"MISSING_CHAR":"BAD_INDENT",w),m&&m.source.length!==1&&g.unshift(m)}if(g.length>0){let p=Df.resolveEnd(g,h,t.options.strict,n);p.comment&&(l.comment?l.comment+=`
72
- `+p.comment:l.comment=p.comment),l.range=[i.offset,h,p.offset]}else l.range=[i.offset,h,h];return l}js.resolveFlowCollection=Mf});var Hs=v(Os=>{"use strict";var Vf=C(),Ff=A(),qf=ve(),Wf=ge(),zf=Ps(),Jf=As(),Gf=$s();function Tn(r,e,t,i,n,a){let o=t.type==="block-map"?zf.resolveBlockMap(r,e,t,i,a):t.type==="block-seq"?Jf.resolveBlockSeq(r,e,t,i,a):Gf.resolveFlowCollection(r,e,t,i,a),s=o.constructor;return n==="!"||n===s.tagName?(o.tag=s.tagName,o):(n&&(o.tag=n),o)}function Uf(r,e,t,i,n){let a=i.tag,o=a?e.directives.tagName(a.source,d=>n(a,"TAG_RESOLVE_FAILED",d)):null;if(t.type==="block-seq"){let{anchor:d,newlineAfterProp:m}=i,g=d&&a?d.offset>a.offset?d:a:d??a;g&&(!m||m.offset<g.offset)&&n(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===qf.YAMLMap.tagName&&s==="map"||o===Wf.YAMLSeq.tagName&&s==="seq")return Tn(r,e,t,n,o);let c=e.schema.tags.find(d=>d.tag===o&&d.collection===s);if(!c){let d=e.schema.knownTags[o];if(d?.collection===s)e.schema.tags.push(Object.assign({},d,{default:!1})),c=d;else return d?n(a,"BAD_COLLECTION_TYPE",`${d.tag} used for ${s} collection, but expects ${d.collection??"scalar"}`,!0):n(a,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0),Tn(r,e,t,n,o)}let l=Tn(r,e,t,n,o,c),f=c.resolve?.(l,d=>n(a,"TAG_RESOLVE_FAILED",d),e.options)??l,u=Vf.isNode(f)?f:new Ff.Scalar(f);return u.range=l.range,u.tag=o,c?.format&&(u.format=c.format),u}Os.composeCollection=Uf});var jn=v(Ds=>{"use strict";var In=A();function Kf(r,e,t){let i=e.offset,n=Yf(e,r.options.strict,t);if(!n)return{value:"",type:null,comment:"",range:[i,i,i]};let a=n.mode===">"?In.Scalar.BLOCK_FOLDED:In.Scalar.BLOCK_LITERAL,o=e.source?Xf(e.source):[],s=o.length;for(let h=o.length-1;h>=0;--h){let p=o[h][1];if(p===""||p==="\r")s=h;else break}if(s===0){let h=n.chomp==="+"&&o.length>0?`
73
- `.repeat(Math.max(1,o.length-1)):"",p=i+n.length;return e.source&&(p+=e.source.length),{value:h,type:a,comment:n.comment,range:[i,p,p]}}let c=e.indent+n.indent,l=e.offset+n.length,f=0;for(let h=0;h<s;++h){let[p,w]=o[h];if(w===""||w==="\r")n.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"),n.indent===0&&(c=p.length),f=h,c===0&&!r.atRoot&&t(l,"BAD_INDENT","Block scalar values in collections must be indented");break}l+=p.length+w.length+1}for(let h=o.length-1;h>=s;--h)o[h][0].length>c&&(s=h+1);let u="",d="",m=!1;for(let h=0;h<f;++h)u+=o[h][0].slice(c)+`
74
- `;for(let h=f;h<s;++h){let[p,w]=o[h];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 k=`Block scalar lines must not be less indented than their ${n.indent?"explicit indentation indicator":"first line"}`;t(l-w.length-(N?2:1),"BAD_INDENT",k),p=""}a===In.Scalar.BLOCK_LITERAL?(u+=d+p.slice(c)+w,d=`
65
+ `}};_t.YAMLError=At;_t.YAMLParseError=_n;_t.YAMLWarning=In;_t.prettifyError=Of});var Tt=v(Ss=>{"use strict";function Hf(t,{flow:e,indicator:r,next:i,offset:n,onError:a,parentIndent:o,startOnNewline:s}){let c=!1,l=s,f=s,u="",d="",m=!1,g=!1,h=null,p=null,w=null,N=null,b=null,k=null,S=null;for(let y of t)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),h&&(l&&y.type!=="comment"&&y.type!=="newline"&&a(h,"TAB_AS_INDENT","Tabs are not allowed as indentation"),h=null),y.type){case"space":!e&&(r!=="doc-start"||i?.type!=="flow-collection")&&y.source.includes(" ")&&(h=y),f=!0;break;case"comment":{f||a(y,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let I=y.source.substring(1)||" ";u?u+=d+I:u=I,d="",l=!1;break}case"newline":l?u?u+=y.source:(!k||r!=="seq-item-ind")&&(c=!0):d+=y.source,l=!0,m=!0,(p||w)&&(N=y),f=!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,S??(S=y.offset),l=!1,f=!1,g=!0;break;case"tag":{w&&a(y,"MULTIPLE_TAGS","A node can have at most one tag"),w=y,S??(S=y.offset),l=!1,f=!1,g=!0;break}case r:(p||w)&&a(y,"BAD_PROP_ORDER",`Anchors and tags must be after the ${y.source} indicator`),k&&a(y,"UNEXPECTED_TOKEN",`Unexpected ${y.source} in ${e??"collection"}`),k=y,l=r==="seq-item-ind"||r==="explicit-key-ind",f=!1;break;case"comma":if(e){b&&a(y,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),b=y,l=!1,f=!1;break}default:a(y,"UNEXPECTED_TOKEN",`Unexpected ${y.type} token`),l=!1,f=!1}let E=t[t.length-1],R=E?E.offset+E.source.length:n;return g&&i&&i.type!=="space"&&i.type!=="newline"&&i.type!=="comma"&&(i.type!=="scalar"||i.source!=="")&&a(i.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),h&&(l&&h.indent<=o||i?.type==="block-map"||i?.type==="block-seq")&&a(h,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:b,found:k,spaceBefore:c,comment:u,hasNewline:m,anchor:p,tag:w,newlineAfterProp:N,end:R,start:S??R}}Ss.resolveProps=Hf});var Gr=v(Es=>{"use strict";function Tn(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes(`
66
+ `))return!0;if(t.end){for(let e of t.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(let e of t.items){for(let r of e.start)if(r.type==="newline")return!0;if(e.sep){for(let r of e.sep)if(r.type==="newline")return!0}if(Tn(e.key)||Tn(e.value))return!0}return!1;default:return!0}}Es.containsNewline=Tn});var jn=v(Cs=>{"use strict";var Df=Gr();function Lf(t,e,r){if(e?.type==="flow-collection"){let i=e.end[0];i.indent===t&&(i.source==="]"||i.source==="}")&&Df.containsNewline(e)&&r(i,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}Cs.flowIndentCheck=Lf});var $n=v(Ps=>{"use strict";var xs=x();function Bf(t,e,r){let{uniqueKeys:i}=t.options;if(i===!1)return!1;let n=typeof i=="function"?i:(a,o)=>a===o||xs.isScalar(a)&&xs.isScalar(o)&&a.value===o.value;return e.some(a=>n(a.key,r))}Ps.mapIncludes=Bf});var js=v(Ts=>{"use strict";var Rs=ve(),Mf=we(),As=Tt(),Vf=Gr(),_s=jn(),Ff=$n(),Is="All mapping items must start at the same column";function qf({composeNode:t,composeEmptyNode:e},r,i,n,a){let o=a?.nodeClass??Mf.YAMLMap,s=new o(r.schema);r.atRoot&&(r.atRoot=!1);let c=i.offset,l=null;for(let f of i.items){let{start:u,key:d,sep:m,value:g}=f,h=As.resolveProps(u,{indicator:"explicit-key-ind",next:d??m?.[0],offset:c,onError:n,parentIndent:i.indent,startOnNewline:!0}),p=!h.found;if(p){if(d&&(d.type==="block-seq"?n(c,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in d&&d.indent!==i.indent&&n(c,"BAD_INDENT",Is)),!h.anchor&&!h.tag&&!m){l=h.end,h.comment&&(s.comment?s.comment+=`
67
+ `+h.comment:s.comment=h.comment);continue}(h.newlineAfterProp||Vf.containsNewline(d))&&n(d??u[u.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else h.found?.indent!==i.indent&&n(c,"BAD_INDENT",Is);r.atKey=!0;let w=h.end,N=d?t(r,d,h,n):e(r,w,u,null,h,n);r.schema.compat&&_s.flowIndentCheck(i.indent,d,n),r.atKey=!1,Ff.mapIncludes(r,s.items,N)&&n(w,"DUPLICATE_KEY","Map keys must be unique");let b=As.resolveProps(m??[],{indicator:"map-value-ind",next:g,offset:N.range[2],onError:n,parentIndent:i.indent,startOnNewline:!d||d.type==="block-scalar"});if(c=b.end,b.found){p&&(g?.type==="block-map"&&!b.hasNewline&&n(c,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),r.options.strict&&h.start<b.found.offset-1024&&n(N.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let k=g?t(r,g,b,n):e(r,c,m,null,b,n);r.schema.compat&&_s.flowIndentCheck(i.indent,g,n),c=k.range[2];let S=new Rs.Pair(N,k);r.options.keepSourceTokens&&(S.srcToken=f),s.items.push(S)}else{p&&n(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 k=new Rs.Pair(N);r.options.keepSourceTokens&&(k.srcToken=f),s.items.push(k)}}return l&&l<c&&n(l,"IMPOSSIBLE","Map comment with trailing content"),s.range=[i.offset,c,l??c],s}Ts.resolveBlockMap=qf});var Os=v($s=>{"use strict";var Wf=ye(),zf=Tt(),Jf=jn();function Gf({composeNode:t,composeEmptyNode:e},r,i,n,a){let o=a?.nodeClass??Wf.YAMLSeq,s=new o(r.schema);r.atRoot&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let c=i.offset,l=null;for(let{start:f,value:u}of i.items){let d=zf.resolveProps(f,{indicator:"seq-item-ind",next:u,offset:c,onError:n,parentIndent:i.indent,startOnNewline:!0});if(!d.found)if(d.anchor||d.tag||u)u?.type==="block-seq"?n(d.end,"BAD_INDENT","All sequence items must start at the same column"):n(c,"MISSING_CHAR","Sequence item without - indicator");else{l=d.end,d.comment&&(s.comment=d.comment);continue}let m=u?t(r,u,d,n):e(r,d.end,f,null,d,n);r.schema.compat&&Jf.flowIndentCheck(i.indent,u,n),c=m.range[2],s.items.push(m)}return s.range=[i.offset,c,l??c],s}$s.resolveBlockSeq=Gf});var Qe=v(Hs=>{"use strict";function Uf(t,e,r,i){let n="";if(t){let a=!1,o="";for(let s of t){let{source:c,type:l}=s;switch(l){case"space":a=!0;break;case"comment":{r&&!a&&i(s,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let f=c.substring(1)||" ";n?n+=o+f:n=f,o="";break}case"newline":n&&(o+=c),a=!0;break;default:i(s,"UNEXPECTED_TOKEN",`Unexpected ${l} at node end`)}e+=c.length}}return{comment:n,offset:e}}Hs.resolveEnd=Uf});var Ms=v(Bs=>{"use strict";var Kf=x(),Yf=ve(),Ds=we(),Xf=ye(),Qf=Qe(),Ls=Tt(),Zf=Gr(),eh=$n(),On="Block collections are not allowed within flow collections",Hn=t=>t&&(t.type==="block-map"||t.type==="block-seq");function th({composeNode:t,composeEmptyNode:e},r,i,n,a){let o=i.start.source==="{",s=o?"flow map":"flow sequence",c=a?.nodeClass??(o?Ds.YAMLMap:Xf.YAMLSeq),l=new c(r.schema);l.flow=!0;let f=r.atRoot;f&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let u=i.offset+i.start.source.length;for(let p=0;p<i.items.length;++p){let w=i.items[p],{start:N,key:b,sep:k,value:S}=w,E=Ls.resolveProps(N,{flow:s,indicator:"explicit-key-ind",next:b??k?.[0],offset:u,onError:n,parentIndent:i.indent,startOnNewline:!1});if(!E.found){if(!E.anchor&&!E.tag&&!k&&!S){p===0&&E.comma?n(E.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${s}`):p<i.items.length-1&&n(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&&r.options.strict&&Zf.containsNewline(b)&&n(b,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(p===0)E.comma&&n(E.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${s}`);else if(E.comma||n(E.start,"MISSING_CHAR",`Missing , between ${s} items`),E.comment){let R="";e:for(let y of N)switch(y.type){case"comma":case"space":break;case"comment":R=y.source.substring(1);break e;default:break e}if(R){let y=l.items[l.items.length-1];Kf.isPair(y)&&(y=y.value??y.key),y.comment?y.comment+=`
70
+ `+R:y.comment=R,E.comment=E.comment.substring(R.length+1)}}if(!o&&!k&&!E.found){let R=S?t(r,S,E,n):e(r,E.end,k,null,E,n);l.items.push(R),u=R.range[2],Hn(S)&&n(R.range,"BLOCK_IN_FLOW",On)}else{r.atKey=!0;let R=E.end,y=b?t(r,b,E,n):e(r,R,N,null,E,n);Hn(b)&&n(y.range,"BLOCK_IN_FLOW",On),r.atKey=!1;let I=Ls.resolveProps(k??[],{flow:s,indicator:"map-value-ind",next:S,offset:y.range[2],onError:n,parentIndent:i.indent,startOnNewline:!1});if(I.found){if(!o&&!E.found&&r.options.strict){if(k)for(let T of k){if(T===I.found)break;if(T.type==="newline"){n(T,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}E.start<I.found.offset-1024&&n(I.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else S&&("source"in S&&S.source?.[0]===":"?n(S,"MISSING_CHAR",`Missing space after : in ${s}`):n(I.start,"MISSING_CHAR",`Missing , or : between ${s} items`));let de=S?t(r,S,I,n):I.found?e(r,I.end,k,null,I,n):null;de?Hn(S)&&n(de.range,"BLOCK_IN_FLOW",On):I.comment&&(y.comment?y.comment+=`
71
+ `+I.comment:y.comment=I.comment);let Fe=new Yf.Pair(y,de);if(r.options.keepSourceTokens&&(Fe.srcToken=w),o){let T=l;eh.mapIncludes(r,T.items,y)&&n(R,"DUPLICATE_KEY","Map keys must be unique"),T.items.push(Fe)}else{let T=new Ds.YAMLMap(r.schema);T.flow=!0,T.items.push(Fe);let La=(de??y).range;T.range=[y.range[0],La[1],La[2]],l.items.push(T)}u=de?de.range[2]:I.end}}let d=o?"}":"]",[m,...g]=i.end,h=u;if(m?.source===d)h=m.offset+m.source.length;else{let p=s[0].toUpperCase()+s.substring(1),w=f?`${p} must end with a ${d}`:`${p} in block collection must be sufficiently indented and end with a ${d}`;n(u,f?"MISSING_CHAR":"BAD_INDENT",w),m&&m.source.length!==1&&g.unshift(m)}if(g.length>0){let p=Qf.resolveEnd(g,h,r.options.strict,n);p.comment&&(l.comment?l.comment+=`
72
+ `+p.comment:l.comment=p.comment),l.range=[i.offset,h,p.offset]}else l.range=[i.offset,h,h];return l}Bs.resolveFlowCollection=th});var Fs=v(Vs=>{"use strict";var rh=x(),ih=_(),nh=we(),ah=ye(),oh=js(),sh=Os(),ch=Ms();function Dn(t,e,r,i,n,a){let o=r.type==="block-map"?oh.resolveBlockMap(t,e,r,i,a):r.type==="block-seq"?sh.resolveBlockSeq(t,e,r,i,a):ch.resolveFlowCollection(t,e,r,i,a),s=o.constructor;return n==="!"||n===s.tagName?(o.tag=s.tagName,o):(n&&(o.tag=n),o)}function lh(t,e,r,i,n){let a=i.tag,o=a?e.directives.tagName(a.source,d=>n(a,"TAG_RESOLVE_FAILED",d)):null;if(r.type==="block-seq"){let{anchor:d,newlineAfterProp:m}=i,g=d&&a?d.offset>a.offset?d:a:d??a;g&&(!m||m.offset<g.offset)&&n(g,"MISSING_CHAR","Missing newline after block sequence props")}let s=r.type==="block-map"?"map":r.type==="block-seq"?"seq":r.start.source==="{"?"map":"seq";if(!a||!o||o==="!"||o===nh.YAMLMap.tagName&&s==="map"||o===ah.YAMLSeq.tagName&&s==="seq")return Dn(t,e,r,n,o);let c=e.schema.tags.find(d=>d.tag===o&&d.collection===s);if(!c){let d=e.schema.knownTags[o];if(d?.collection===s)e.schema.tags.push(Object.assign({},d,{default:!1})),c=d;else return d?n(a,"BAD_COLLECTION_TYPE",`${d.tag} used for ${s} collection, but expects ${d.collection??"scalar"}`,!0):n(a,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0),Dn(t,e,r,n,o)}let l=Dn(t,e,r,n,o,c),f=c.resolve?.(l,d=>n(a,"TAG_RESOLVE_FAILED",d),e.options)??l,u=rh.isNode(f)?f:new ih.Scalar(f);return u.range=l.range,u.tag=o,c?.format&&(u.format=c.format),u}Vs.composeCollection=lh});var Bn=v(qs=>{"use strict";var Ln=_();function uh(t,e,r){let i=e.offset,n=dh(e,t.options.strict,r);if(!n)return{value:"",type:null,comment:"",range:[i,i,i]};let a=n.mode===">"?Ln.Scalar.BLOCK_FOLDED:Ln.Scalar.BLOCK_LITERAL,o=e.source?fh(e.source):[],s=o.length;for(let h=o.length-1;h>=0;--h){let p=o[h][1];if(p===""||p==="\r")s=h;else break}if(s===0){let h=n.chomp==="+"&&o.length>0?`
73
+ `.repeat(Math.max(1,o.length-1)):"",p=i+n.length;return e.source&&(p+=e.source.length),{value:h,type:a,comment:n.comment,range:[i,p,p]}}let c=e.indent+n.indent,l=e.offset+n.length,f=0;for(let h=0;h<s;++h){let[p,w]=o[h];if(w===""||w==="\r")n.indent===0&&p.length>c&&(c=p.length);else{p.length<c&&r(l+p.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),n.indent===0&&(c=p.length),f=h,c===0&&!t.atRoot&&r(l,"BAD_INDENT","Block scalar values in collections must be indented");break}l+=p.length+w.length+1}for(let h=o.length-1;h>=s;--h)o[h][0].length>c&&(s=h+1);let u="",d="",m=!1;for(let h=0;h<f;++h)u+=o[h][0].slice(c)+`
74
+ `;for(let h=f;h<s;++h){let[p,w]=o[h];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 k=`Block scalar lines must not be less indented than their ${n.indent?"explicit indentation indicator":"first line"}`;r(l-w.length-(N?2:1),"BAD_INDENT",k),p=""}a===Ln.Scalar.BLOCK_LITERAL?(u+=d+p.slice(c)+w,d=`
75
75
  `):p.length>c||w[0]===" "?(d===" "?d=`
76
76
  `:!m&&d===`
77
77
  `&&(d=`
@@ -84,62 +84,62 @@ ${l}
84
84
  `+o[h][0].slice(c);u[u.length-1]!==`
85
85
  `&&(u+=`
86
86
  `);break;default:u+=`
87
- `}let g=i+n.length+e.source.length;return{value:u,type:a,comment:n.comment,range:[i,g,g]}}function Yf({offset:r,props:e},t,i){if(e[0].type!=="block-scalar-header")return i(e[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:n}=e[0],a=n[0],o=0,s="",c=-1;for(let d=1;d<n.length;++d){let m=n[d];if(!s&&(m==="-"||m==="+"))s=m;else{let g=Number(m);!o&&g?o=g:c===-1&&(c=r+d)}}c!==-1&&i(c,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${n}`);let l=!1,f="",u=n.length;for(let d=1;d<e.length;++d){let m=e[d];switch(m.type){case"space":l=!0;case"newline":u+=m.source.length;break;case"comment":t&&!l&&i(m,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),u+=m.source.length,f=m.source.substring(1);break;case"error":i(m,"UNEXPECTED_TOKEN",m.message),u+=m.source.length;break;default:{let g=`Unexpected token in block scalar header: ${m.type}`;i(m,"UNEXPECTED_TOKEN",g);let h=m.source;h&&typeof h=="string"&&(u+=h.length)}}}return{mode:a,indent:o,chomp:s,comment:f,length:u}}function Xf(r){let e=r.split(/\n( *)/),t=e[0],i=t.match(/^( *)/),a=[i?.[1]?[i[1],t.slice(i[1].length)]:["",t]];for(let o=1;o<e.length;o+=2)a.push([e[o],e[o+1]]);return a}Ds.resolveBlockScalar=Kf});var On=v(Ls=>{"use strict";var $n=A(),Qf=Ye();function Zf(r,e,t){let{offset:i,type:n,source:a,end:o}=r,s,c,l=(d,m,g)=>t(i+d,m,g);switch(n){case"scalar":s=$n.Scalar.PLAIN,c=eh(a,l);break;case"single-quoted-scalar":s=$n.Scalar.QUOTE_SINGLE,c=th(a,l);break;case"double-quoted-scalar":s=$n.Scalar.QUOTE_DOUBLE,c=rh(a,l);break;default:return t(r,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${n}`),{value:"",type:null,comment:"",range:[i,i+a.length,i+a.length]}}let f=i+a.length,u=Qf.resolveEnd(o,f,e,t);return{value:c,type:s,comment:u.comment,range:[i,f,u.offset]}}function eh(r,e){let t="";switch(r[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 ${r[0]}`;break}case"@":case"`":{t=`reserved character ${r[0]}`;break}}return t&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${t}`),Bs(r)}function th(r,e){return(r[r.length-1]!=="'"||r.length===1)&&e(r.length,"MISSING_CHAR","Missing closing 'quote"),Bs(r.slice(1,-1)).replace(/''/g,"'")}function Bs(r){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 i=e.exec(r);if(!i)return r;let n=i[1],a=" ",o=e.lastIndex;for(t.lastIndex=o;i=t.exec(r);)i[1]===""?a===`
87
+ `}let g=i+n.length+e.source.length;return{value:u,type:a,comment:n.comment,range:[i,g,g]}}function dh({offset:t,props:e},r,i){if(e[0].type!=="block-scalar-header")return i(e[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:n}=e[0],a=n[0],o=0,s="",c=-1;for(let d=1;d<n.length;++d){let m=n[d];if(!s&&(m==="-"||m==="+"))s=m;else{let g=Number(m);!o&&g?o=g:c===-1&&(c=t+d)}}c!==-1&&i(c,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${n}`);let l=!1,f="",u=n.length;for(let d=1;d<e.length;++d){let m=e[d];switch(m.type){case"space":l=!0;case"newline":u+=m.source.length;break;case"comment":r&&!l&&i(m,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),u+=m.source.length,f=m.source.substring(1);break;case"error":i(m,"UNEXPECTED_TOKEN",m.message),u+=m.source.length;break;default:{let g=`Unexpected token in block scalar header: ${m.type}`;i(m,"UNEXPECTED_TOKEN",g);let h=m.source;h&&typeof h=="string"&&(u+=h.length)}}}return{mode:a,indent:o,chomp:s,comment:f,length:u}}function fh(t){let e=t.split(/\n( *)/),r=e[0],i=r.match(/^( *)/),a=[i?.[1]?[i[1],r.slice(i[1].length)]:["",r]];for(let o=1;o<e.length;o+=2)a.push([e[o],e[o+1]]);return a}qs.resolveBlockScalar=uh});var Vn=v(zs=>{"use strict";var Mn=_(),hh=Qe();function ph(t,e,r){let{offset:i,type:n,source:a,end:o}=t,s,c,l=(d,m,g)=>r(i+d,m,g);switch(n){case"scalar":s=Mn.Scalar.PLAIN,c=mh(a,l);break;case"single-quoted-scalar":s=Mn.Scalar.QUOTE_SINGLE,c=vh(a,l);break;case"double-quoted-scalar":s=Mn.Scalar.QUOTE_DOUBLE,c=gh(a,l);break;default:return r(t,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${n}`),{value:"",type:null,comment:"",range:[i,i+a.length,i+a.length]}}let f=i+a.length,u=hh.resolveEnd(o,f,e,r);return{value:c,type:s,comment:u.comment,range:[i,f,u.offset]}}function mh(t,e){let r="";switch(t[0]){case" ":r="a tab character";break;case",":r="flow indicator character ,";break;case"%":r="directive indicator character %";break;case"|":case">":{r=`block scalar indicator ${t[0]}`;break}case"@":case"`":{r=`reserved character ${t[0]}`;break}}return r&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${r}`),Ws(t)}function vh(t,e){return(t[t.length-1]!=="'"||t.length===1)&&e(t.length,"MISSING_CHAR","Missing closing 'quote"),Ws(t.slice(1,-1)).replace(/''/g,"'")}function Ws(t){let e,r;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
88
+ `,"sy"),r=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
89
+ `,"sy")}catch{e=/(.*?)[ \t]*\r?\n/sy,r=/[ \t]*(.*?)[ \t]*\r?\n/sy}let i=e.exec(t);if(!i)return t;let n=i[1],a=" ",o=e.lastIndex;for(r.lastIndex=o;i=r.exec(t);)i[1]===""?a===`
90
90
  `?n+=a:a=`
91
- `:(n+=a+i[1],a=" "),o=t.lastIndex;let s=/[ \t]*(.*)/sy;return s.lastIndex=o,i=s.exec(r),n+a+(i?.[1]??"")}function rh(r,e){let t="";for(let i=1;i<r.length-1;++i){let n=r[i];if(!(n==="\r"&&r[i+1]===`
91
+ `:(n+=a+i[1],a=" "),o=r.lastIndex;let s=/[ \t]*(.*)/sy;return s.lastIndex=o,i=s.exec(t),n+a+(i?.[1]??"")}function gh(t,e){let r="";for(let i=1;i<t.length-1;++i){let n=t[i];if(!(n==="\r"&&t[i+1]===`
92
92
  `))if(n===`
93
- `){let{fold:a,offset:o}=ih(r,i);t+=a,i=o}else if(n==="\\"){let a=r[++i],o=nh[a];if(o)t+=o;else if(a===`
94
- `)for(a=r[i+1];a===" "||a===" ";)a=r[++i+1];else if(a==="\r"&&r[i+1]===`
95
- `)for(a=r[++i+1];a===" "||a===" ";)a=r[++i+1];else if(a==="x"||a==="u"||a==="U"){let s=a==="x"?2:a==="u"?4:8;t+=ah(r,i+1,s,e),i+=s}else{let s=r.substr(i-1,2);e(i-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${s}`),t+=s}}else if(n===" "||n===" "){let a=i,o=r[i+1];for(;o===" "||o===" ";)o=r[++i+1];o!==`
96
- `&&!(o==="\r"&&r[i+2]===`
97
- `)&&(t+=i>a?r.slice(a,i+1):n)}else t+=n}return(r[r.length-1]!=='"'||r.length===1)&&e(r.length,"MISSING_CHAR",'Missing closing "quote'),t}function ih(r,e){let t="",i=r[e+1];for(;(i===" "||i===" "||i===`
98
- `||i==="\r")&&!(i==="\r"&&r[e+2]!==`
93
+ `){let{fold:a,offset:o}=wh(t,i);r+=a,i=o}else if(n==="\\"){let a=t[++i],o=yh[a];if(o)r+=o;else if(a===`
94
+ `)for(a=t[i+1];a===" "||a===" ";)a=t[++i+1];else if(a==="\r"&&t[i+1]===`
95
+ `)for(a=t[++i+1];a===" "||a===" ";)a=t[++i+1];else if(a==="x"||a==="u"||a==="U"){let s=a==="x"?2:a==="u"?4:8;r+=Nh(t,i+1,s,e),i+=s}else{let s=t.substr(i-1,2);e(i-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${s}`),r+=s}}else if(n===" "||n===" "){let a=i,o=t[i+1];for(;o===" "||o===" ";)o=t[++i+1];o!==`
96
+ `&&!(o==="\r"&&t[i+2]===`
97
+ `)&&(r+=i>a?t.slice(a,i+1):n)}else r+=n}return(t[t.length-1]!=='"'||t.length===1)&&e(t.length,"MISSING_CHAR",'Missing closing "quote'),r}function wh(t,e){let r="",i=t[e+1];for(;(i===" "||i===" "||i===`
98
+ `||i==="\r")&&!(i==="\r"&&t[e+2]!==`
99
99
  `);)i===`
100
- `&&(t+=`
101
- `),e+=1,i=r[e+1];return t||(t=" "),{fold:t,offset:e}}var nh={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
102
- `,r:"\r",t:" ",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function ah(r,e,t,i){let n=r.substr(e,t),o=n.length===t&&/^[0-9a-fA-F]+$/.test(n)?parseInt(n,16):NaN;try{return String.fromCodePoint(o)}catch{let s=r.substr(e-2,t+2);return i(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${s}`),s}}Ls.resolveFlowScalar=Zf});var Fs=v(Vs=>{"use strict";var $e=C(),Ms=A(),oh=jn(),sh=On();function ch(r,e,t,i){let{value:n,type:a,comment:o,range:s}=e.type==="block-scalar"?oh.resolveBlockScalar(r,e,i):sh.resolveFlowScalar(e,r.options.strict,i),c=t?r.directives.tagName(t.source,u=>i(t,"TAG_RESOLVE_FAILED",u)):null,l;r.options.stringKeys&&r.atKey?l=r.schema[$e.SCALAR]:c?l=lh(r.schema,n,c,t,i):e.type==="scalar"?l=uh(r,n,e,i):l=r.schema[$e.SCALAR];let f;try{let u=l.resolve(n,d=>i(t??e,"TAG_RESOLVE_FAILED",d),r.options);f=$e.isScalar(u)?u:new Ms.Scalar(u)}catch(u){let d=u instanceof Error?u.message:String(u);i(t??e,"TAG_RESOLVE_FAILED",d),f=new Ms.Scalar(n)}return f.range=s,f.source=n,a&&(f.type=a),c&&(f.tag=c),l.format&&(f.format=l.format),o&&(f.comment=o),f}function lh(r,e,t,i,n){if(t==="!")return r[$e.SCALAR];let a=[];for(let s of r.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=r.knownTags[t];return o&&!o.collection?(r.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(n(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${t}`,t!=="tag:yaml.org,2002:str"),r[$e.SCALAR])}function uh({atKey:r,directives:e,schema:t},i,n,a){let o=t.tags.find(s=>(s.default===!0||r&&s.default==="key")&&s.test?.test(i))||t[$e.SCALAR];if(t.compat){let s=t.compat.find(c=>c.default&&c.test?.test(i))??t[$e.SCALAR];if(o.tag!==s.tag){let c=e.tagString(o.tag),l=e.tagString(s.tag),f=`Value may be parsed as either ${c} or ${l}`;a(n,"TAG_RESOLVE_FAILED",f,!0)}}return o}Vs.composeScalar=ch});var Ws=v(qs=>{"use strict";function dh(r,e,t){if(e){t??(t=e.length);for(let i=t-1;i>=0;--i){let n=e[i];switch(n.type){case"space":case"comment":case"newline":r-=n.source.length;continue}for(n=e[++i];n?.type==="space";)r+=n.source.length,n=e[++i];break}}return r}qs.emptyScalarPosition=dh});var Gs=v(Dn=>{"use strict";var fh=ct(),hh=C(),ph=Hs(),zs=Fs(),mh=Ye(),vh=Ws(),gh={composeNode:Js,composeEmptyNode:Hn};function Js(r,e,t,i){let n=r.atKey,{spaceBefore:a,comment:o,anchor:s,tag:c}=t,l,f=!0;switch(e.type){case"alias":l=wh(r,e,i),(s||c)&&i(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=zs.composeScalar(r,e,c,i),s&&(l.anchor=s.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{l=ph.composeCollection(gh,r,e,t,i),s&&(l.anchor=s.source.substring(1))}catch(u){let d=u instanceof Error?u.message:String(u);i(e,"RESOURCE_EXHAUSTION",d)}break;default:{let u=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;i(e,"UNEXPECTED_TOKEN",u),f=!1}}return l??(l=Hn(r,e.offset,void 0,null,t,i)),s&&l.anchor===""&&i(s,"BAD_ALIAS","Anchor cannot be an empty string"),n&&r.options.stringKeys&&(!hh.isScalar(l)||typeof l.value!="string"||l.tag&&l.tag!=="tag:yaml.org,2002:str")&&i(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),r.options.keepSourceTokens&&f&&(l.srcToken=e),l}function Hn(r,e,t,i,{spaceBefore:n,comment:a,anchor:o,tag:s,end:c},l){let f={type:"scalar",offset:vh.emptyScalarPosition(e,t,i),indent:-1,source:""},u=zs.composeScalar(r,f,s,l);return o&&(u.anchor=o.source.substring(1),u.anchor===""&&l(o,"BAD_ALIAS","Anchor cannot be an empty string")),n&&(u.spaceBefore=!0),a&&(u.comment=a,u.range[2]=c),u}function wh({options:r},{offset:e,source:t,end:i},n){let a=new fh.Alias(t.substring(1));a.source===""&&n(e,"BAD_ALIAS","Alias cannot be an empty string"),a.source.endsWith(":")&&n(e+t.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let o=e+t.length,s=mh.resolveEnd(i,o,r.strict,n);return a.range=[e,o,s.offset],s.comment&&(a.comment=s.comment),a}Dn.composeEmptyNode=Hn;Dn.composeNode=Js});var Ys=v(Ks=>{"use strict";var yh=Et(),Us=Gs(),Nh=Ye(),bh=Rt();function kh(r,e,{offset:t,start:i,value:n,end:a},o){let s=Object.assign({_directives:e},r),c=new yh.Document(void 0,s),l={atKey:!1,atRoot:!0,directives:c.directives,options:c.options,schema:c.schema},f=bh.resolveProps(i,{indicator:"doc-start",next:n??a?.[0],offset:t,onError:o,parentIndent:0,startOnNewline:!0});f.found&&(c.directives.docStart=!0,n&&(n.type==="block-map"||n.type==="block-seq")&&!f.hasNewline&&o(f.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),c.contents=n?Us.composeNode(l,n,f,o):Us.composeEmptyNode(l,f.end,i,null,f,o);let u=c.contents.range[2],d=Nh.resolveEnd(a,u,!1,o);return d.comment&&(c.comment=d.comment),c.range=[t,u,d.offset],c}Ks.composeDoc=kh});var Ln=v(Zs=>{"use strict";var Sh=tr("process"),Eh=Si(),Ch=Et(),At=Pt(),Xs=C(),xh=Ys(),Ph=Ye();function _t(r){if(typeof r=="number")return[r,r+1];if(Array.isArray(r))return r.length===2?r:[r[0],r[1]];let{offset:e,source:t}=r;return[e,e+(typeof t=="string"?t.length:1)]}function Qs(r){let e="",t=!1,i=!1;for(let n=0;n<r.length;++n){let a=r[n];switch(a[0]){case"#":e+=(e===""?"":i?`
100
+ `&&(r+=`
101
+ `),e+=1,i=t[e+1];return r||(r=" "),{fold:r,offset:e}}var yh={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
102
+ `,r:"\r",t:" ",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function Nh(t,e,r,i){let n=t.substr(e,r),o=n.length===r&&/^[0-9a-fA-F]+$/.test(n)?parseInt(n,16):NaN;try{return String.fromCodePoint(o)}catch{let s=t.substr(e-2,r+2);return i(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${s}`),s}}zs.resolveFlowScalar=ph});var Us=v(Gs=>{"use strict";var He=x(),Js=_(),bh=Bn(),kh=Vn();function Sh(t,e,r,i){let{value:n,type:a,comment:o,range:s}=e.type==="block-scalar"?bh.resolveBlockScalar(t,e,i):kh.resolveFlowScalar(e,t.options.strict,i),c=r?t.directives.tagName(r.source,u=>i(r,"TAG_RESOLVE_FAILED",u)):null,l;t.options.stringKeys&&t.atKey?l=t.schema[He.SCALAR]:c?l=Eh(t.schema,n,c,r,i):e.type==="scalar"?l=Ch(t,n,e,i):l=t.schema[He.SCALAR];let f;try{let u=l.resolve(n,d=>i(r??e,"TAG_RESOLVE_FAILED",d),t.options);f=He.isScalar(u)?u:new Js.Scalar(u)}catch(u){let d=u instanceof Error?u.message:String(u);i(r??e,"TAG_RESOLVE_FAILED",d),f=new Js.Scalar(n)}return f.range=s,f.source=n,a&&(f.type=a),c&&(f.tag=c),l.format&&(f.format=l.format),o&&(f.comment=o),f}function Eh(t,e,r,i,n){if(r==="!")return t[He.SCALAR];let a=[];for(let s of t.tags)if(!s.collection&&s.tag===r)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=t.knownTags[r];return o&&!o.collection?(t.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(n(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,r!=="tag:yaml.org,2002:str"),t[He.SCALAR])}function Ch({atKey:t,directives:e,schema:r},i,n,a){let o=r.tags.find(s=>(s.default===!0||t&&s.default==="key")&&s.test?.test(i))||r[He.SCALAR];if(r.compat){let s=r.compat.find(c=>c.default&&c.test?.test(i))??r[He.SCALAR];if(o.tag!==s.tag){let c=e.tagString(o.tag),l=e.tagString(s.tag),f=`Value may be parsed as either ${c} or ${l}`;a(n,"TAG_RESOLVE_FAILED",f,!0)}}return o}Gs.composeScalar=Sh});var Ys=v(Ks=>{"use strict";function xh(t,e,r){if(e){r??(r=e.length);for(let i=r-1;i>=0;--i){let n=e[i];switch(n.type){case"space":case"comment":case"newline":t-=n.source.length;continue}for(n=e[++i];n?.type==="space";)t+=n.source.length,n=e[++i];break}}return t}Ks.emptyScalarPosition=xh});var Zs=v(qn=>{"use strict";var Ph=ft(),Rh=x(),Ah=Fs(),Xs=Us(),_h=Qe(),Ih=Ys(),Th={composeNode:Qs,composeEmptyNode:Fn};function Qs(t,e,r,i){let n=t.atKey,{spaceBefore:a,comment:o,anchor:s,tag:c}=r,l,f=!0;switch(e.type){case"alias":l=jh(t,e,i),(s||c)&&i(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=Xs.composeScalar(t,e,c,i),s&&(l.anchor=s.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{l=Ah.composeCollection(Th,t,e,r,i),s&&(l.anchor=s.source.substring(1))}catch(u){let d=u instanceof Error?u.message:String(u);i(e,"RESOURCE_EXHAUSTION",d)}break;default:{let u=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;i(e,"UNEXPECTED_TOKEN",u),f=!1}}return l??(l=Fn(t,e.offset,void 0,null,r,i)),s&&l.anchor===""&&i(s,"BAD_ALIAS","Anchor cannot be an empty string"),n&&t.options.stringKeys&&(!Rh.isScalar(l)||typeof l.value!="string"||l.tag&&l.tag!=="tag:yaml.org,2002:str")&&i(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),t.options.keepSourceTokens&&f&&(l.srcToken=e),l}function Fn(t,e,r,i,{spaceBefore:n,comment:a,anchor:o,tag:s,end:c},l){let f={type:"scalar",offset:Ih.emptyScalarPosition(e,r,i),indent:-1,source:""},u=Xs.composeScalar(t,f,s,l);return o&&(u.anchor=o.source.substring(1),u.anchor===""&&l(o,"BAD_ALIAS","Anchor cannot be an empty string")),n&&(u.spaceBefore=!0),a&&(u.comment=a,u.range[2]=c),u}function jh({options:t},{offset:e,source:r,end:i},n){let a=new Ph.Alias(r.substring(1));a.source===""&&n(e,"BAD_ALIAS","Alias cannot be an empty string"),a.source.endsWith(":")&&n(e+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let o=e+r.length,s=_h.resolveEnd(i,o,t.strict,n);return a.range=[e,o,s.offset],s.comment&&(a.comment=s.comment),a}qn.composeEmptyNode=Fn;qn.composeNode=Qs});var rc=v(tc=>{"use strict";var $h=Rt(),ec=Zs(),Oh=Qe(),Hh=Tt();function Dh(t,e,{offset:r,start:i,value:n,end:a},o){let s=Object.assign({_directives:e},t),c=new $h.Document(void 0,s),l={atKey:!1,atRoot:!0,directives:c.directives,options:c.options,schema:c.schema},f=Hh.resolveProps(i,{indicator:"doc-start",next:n??a?.[0],offset:r,onError:o,parentIndent:0,startOnNewline:!0});f.found&&(c.directives.docStart=!0,n&&(n.type==="block-map"||n.type==="block-seq")&&!f.hasNewline&&o(f.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),c.contents=n?ec.composeNode(l,n,f,o):ec.composeEmptyNode(l,f.end,i,null,f,o);let u=c.contents.range[2],d=Oh.resolveEnd(a,u,!1,o);return d.comment&&(c.comment=d.comment),c.range=[r,u,d.offset],c}tc.composeDoc=Dh});var zn=v(ac=>{"use strict";var Lh=ir("process"),Bh=Ai(),Mh=Rt(),jt=It(),ic=x(),Vh=rc(),Fh=Qe();function $t(t){if(typeof t=="number")return[t,t+1];if(Array.isArray(t))return t.length===2?t:[t[0],t[1]];let{offset:e,source:r}=t;return[e,e+(typeof r=="string"?r.length:1)]}function nc(t){let e="",r=!1,i=!1;for(let n=0;n<t.length;++n){let a=t[n];switch(a[0]){case"#":e+=(e===""?"":i?`
103
103
 
104
104
  `:`
105
- `)+(a.substring(1)||" "),t=!0,i=!1;break;case"%":r[n+1]?.[0]!=="#"&&(n+=1),t=!1;break;default:t||(i=!0),t=!1}}return{comment:e,afterEmptyLine:i}}var Bn=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(t,i,n,a)=>{let o=_t(t);a?this.warnings.push(new At.YAMLWarning(o,i,n)):this.errors.push(new At.YAMLParseError(o,i,n))},this.directives=new Eh.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,t){let{comment:i,afterEmptyLine:n}=Qs(this.prelude);if(i){let a=e.contents;if(t)e.comment=e.comment?`${e.comment}
106
- ${i}`:i;else if(n||e.directives.docStart||!a)e.commentBefore=i;else if(Xs.isCollection(a)&&!a.flow&&a.items.length>0){let o=a.items[0];Xs.isPair(o)&&(o=o.key);let s=o.commentBefore;o.commentBefore=s?`${i}
105
+ `)+(a.substring(1)||" "),r=!0,i=!1;break;case"%":t[n+1]?.[0]!=="#"&&(n+=1),r=!1;break;default:r||(i=!0),r=!1}}return{comment:e,afterEmptyLine:i}}var Wn=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(r,i,n,a)=>{let o=$t(r);a?this.warnings.push(new jt.YAMLWarning(o,i,n)):this.errors.push(new jt.YAMLParseError(o,i,n))},this.directives=new Bh.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,r){let{comment:i,afterEmptyLine:n}=nc(this.prelude);if(i){let a=e.contents;if(r)e.comment=e.comment?`${e.comment}
106
+ ${i}`:i;else if(n||e.directives.docStart||!a)e.commentBefore=i;else if(ic.isCollection(a)&&!a.flow&&a.items.length>0){let o=a.items[0];ic.isPair(o)&&(o=o.key);let s=o.commentBefore;o.commentBefore=s?`${i}
107
107
  ${s}`:i}else{let o=a.commentBefore;a.commentBefore=o?`${i}
108
- ${o}`:i}}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:Qs(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,i=-1){for(let n of e)yield*this.next(n);yield*this.end(t,i)}*next(e){switch(Sh.env.LOG_STREAM&&console.dir(e,{depth:null}),e.type){case"directive":this.directives.add(e.source,(t,i,n)=>{let a=_t(e);a[0]+=t,this.onError(a,"BAD_DIRECTIVE",i,n)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let t=xh.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,i=new At.YAMLParseError(_t(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(i):this.doc.errors.push(i);break}case"doc-end":{if(!this.doc){let i="Unexpected doc-end without preceding document";this.errors.push(new At.YAMLParseError(_t(e),"UNEXPECTED_TOKEN",i));break}this.doc.directives.docEnd=!0;let t=Ph.resolveEnd(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let i=this.doc.comment;this.doc.comment=i?`${i}
109
- ${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new At.YAMLParseError(_t(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 i=Object.assign({_directives:this.directives},this.options),n=new Ch.Document(void 0,i);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),n.range=[0,t,t],this.decorate(n,!1),yield n}}};Zs.Composer=Bn});var rc=v(Jr=>{"use strict";var Rh=jn(),Ah=On(),_h=Pt(),ec=ht();function Th(r,e=!0,t){if(r){let i=(n,a,o)=>{let s=typeof n=="number"?n:Array.isArray(n)?n[0]:n.offset;if(t)t(s,a,o);else throw new _h.YAMLParseError([s,s+1],a,o)};switch(r.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return Ah.resolveFlowScalar(r,e,i);case"block-scalar":return Rh.resolveBlockScalar({options:{strict:e}},r,i)}}return null}function Ih(r,e){let{implicitKey:t=!1,indent:i,inFlow:n=!1,offset:a=-1,type:o="PLAIN"}=e,s=ec.stringifyString({type:o,value:r},{implicitKey:t,indent:i>0?" ".repeat(i):"",inFlow:n,options:{blockQuote:!0,lineWidth:-1}}),c=e.end??[{type:"newline",offset:-1,indent:i,source:`
108
+ ${o}`:i}}if(r){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:nc(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,r=!1,i=-1){for(let n of e)yield*this.next(n);yield*this.end(r,i)}*next(e){switch(Lh.env.LOG_STREAM&&console.dir(e,{depth:null}),e.type){case"directive":this.directives.add(e.source,(r,i,n)=>{let a=$t(e);a[0]+=r,this.onError(a,"BAD_DIRECTIVE",i,n)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let r=Vh.composeDoc(this.options,this.directives,e,this.onError);this.atDirectives&&!r.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(r,!1),this.doc&&(yield this.doc),this.doc=r,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{let r=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,i=new jt.YAMLParseError($t(e),"UNEXPECTED_TOKEN",r);this.atDirectives||!this.doc?this.errors.push(i):this.doc.errors.push(i);break}case"doc-end":{if(!this.doc){let i="Unexpected doc-end without preceding document";this.errors.push(new jt.YAMLParseError($t(e),"UNEXPECTED_TOKEN",i));break}this.doc.directives.docEnd=!0;let r=Fh.resolveEnd(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),r.comment){let i=this.doc.comment;this.doc.comment=i?`${i}
109
+ ${r.comment}`:r.comment}this.doc.range[2]=r.offset;break}default:this.errors.push(new jt.YAMLParseError($t(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,r=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let i=Object.assign({_directives:this.directives},this.options),n=new Mh.Document(void 0,i);this.atDirectives&&this.onError(r,"MISSING_CHAR","Missing directives-end indicator line"),n.range=[0,r,r],this.decorate(n,!1),yield n}}};ac.Composer=Wn});var cc=v(Ur=>{"use strict";var qh=Bn(),Wh=Vn(),zh=It(),oc=gt();function Jh(t,e=!0,r){if(t){let i=(n,a,o)=>{let s=typeof n=="number"?n:Array.isArray(n)?n[0]:n.offset;if(r)r(s,a,o);else throw new zh.YAMLParseError([s,s+1],a,o)};switch(t.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return Wh.resolveFlowScalar(t,e,i);case"block-scalar":return qh.resolveBlockScalar({options:{strict:e}},t,i)}}return null}function Gh(t,e){let{implicitKey:r=!1,indent:i,inFlow:n=!1,offset:a=-1,type:o="PLAIN"}=e,s=oc.stringifyString({type:o,value:t},{implicitKey:r,indent:i>0?" ".repeat(i):"",inFlow:n,options:{blockQuote:!0,lineWidth:-1}}),c=e.end??[{type:"newline",offset:-1,indent:i,source:`
110
110
  `}];switch(s[0]){case"|":case">":{let l=s.indexOf(`
111
111
  `),f=s.substring(0,l),u=s.substring(l+1)+`
112
- `,d=[{type:"block-scalar-header",offset:a,indent:i,source:f}];return tc(d,c)||d.push({type:"newline",offset:-1,indent:i,source:`
113
- `}),{type:"block-scalar",offset:a,indent:i,props:d,source:u}}case'"':return{type:"double-quoted-scalar",offset:a,indent:i,source:s,end:c};case"'":return{type:"single-quoted-scalar",offset:a,indent:i,source:s,end:c};default:return{type:"scalar",offset:a,indent:i,source:s,end:c}}}function jh(r,e,t={}){let{afterKey:i=!1,implicitKey:n=!1,inFlow:a=!1,type:o}=t,s="indent"in r?r.indent:null;if(i&&typeof s=="number"&&(s+=2),!o)switch(r.type){case"single-quoted-scalar":o="QUOTE_SINGLE";break;case"double-quoted-scalar":o="QUOTE_DOUBLE";break;case"block-scalar":{let l=r.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=ec.stringifyString({type:o,value:e},{implicitKey:n||s===null,indent:s!==null&&s>0?" ".repeat(s):"",inFlow:a,options:{blockQuote:!0,lineWidth:-1}});switch(c[0]){case"|":case">":$h(r,c);break;case'"':Mn(r,c,"double-quoted-scalar");break;case"'":Mn(r,c,"single-quoted-scalar");break;default:Mn(r,c,"scalar")}}function $h(r,e){let t=e.indexOf(`
114
- `),i=e.substring(0,t),n=e.substring(t+1)+`
115
- `;if(r.type==="block-scalar"){let a=r.props[0];if(a.type!=="block-scalar-header")throw new Error("Invalid block scalar header");a.source=i,r.source=n}else{let{offset:a}=r,o="indent"in r?r.indent:-1,s=[{type:"block-scalar-header",offset:a,indent:o,source:i}];tc(s,"end"in r?r.end:void 0)||s.push({type:"newline",offset:-1,indent:o,source:`
116
- `});for(let c of Object.keys(r))c!=="type"&&c!=="offset"&&delete r[c];Object.assign(r,{type:"block-scalar",indent:o,props:s,source:n})}}function tc(r,e){if(e)for(let t of e)switch(t.type){case"space":case"comment":r.push(t);break;case"newline":return r.push(t),!0}return!1}function Mn(r,e,t){switch(r.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":r.type=t,r.source=e;break;case"block-scalar":{let i=r.props.slice(1),n=e.length;r.props[0].type==="block-scalar-header"&&(n-=r.props[0].source.length);for(let a of i)a.offset+=n;delete r.props,Object.assign(r,{type:t,source:e,end:i});break}case"block-map":case"block-seq":{let n={type:"newline",offset:r.offset+e.length,indent:r.indent,source:`
117
- `};delete r.items,Object.assign(r,{type:t,source:e,end:[n]});break}default:{let i="indent"in r?r.indent:-1,n="end"in r&&Array.isArray(r.end)?r.end.filter(a=>a.type==="space"||a.type==="comment"||a.type==="newline"):[];for(let a of Object.keys(r))a!=="type"&&a!=="offset"&&delete r[a];Object.assign(r,{type:t,indent:i,source:e,end:n})}}}Jr.createScalarToken=Ih;Jr.resolveAsScalar=Th;Jr.setScalarValue=jh});var nc=v(ic=>{"use strict";var Oh=r=>"type"in r?Ur(r):Gr(r);function Ur(r){switch(r.type){case"block-scalar":{let e="";for(let t of r.props)e+=Ur(t);return e+r.source}case"block-map":case"block-seq":{let e="";for(let t of r.items)e+=Gr(t);return e}case"flow-collection":{let e=r.start.source;for(let t of r.items)e+=Gr(t);for(let t of r.end)e+=t.source;return e}case"document":{let e=Gr(r);if(r.end)for(let t of r.end)e+=t.source;return e}default:{let e=r.source;if("end"in r&&r.end)for(let t of r.end)e+=t.source;return e}}}function Gr({start:r,key:e,sep:t,value:i}){let n="";for(let a of r)n+=a.source;if(e&&(n+=Ur(e)),t)for(let a of t)n+=a.source;return i&&(n+=Ur(i)),n}ic.stringify=Oh});var cc=v(sc=>{"use strict";var Vn=Symbol("break visit"),Hh=Symbol("skip children"),ac=Symbol("remove item");function Oe(r,e){"type"in r&&r.type==="document"&&(r={start:r.start,value:r.value}),oc(Object.freeze([]),r,e)}Oe.BREAK=Vn;Oe.SKIP=Hh;Oe.REMOVE=ac;Oe.itemAtPath=(r,e)=>{let t=r;for(let[i,n]of e){let a=t?.[i];if(a&&"items"in a)t=a.items[n];else return}return t};Oe.parentCollection=(r,e)=>{let t=Oe.itemAtPath(r,e.slice(0,-1)),i=e[e.length-1][0],n=t?.[i];if(n&&"items"in n)return n;throw new Error("Parent collection not found")};function oc(r,e,t){let i=t(e,r);if(typeof i=="symbol")return i;for(let n of["key","value"]){let a=e[n];if(a&&"items"in a){for(let o=0;o<a.items.length;++o){let s=oc(Object.freeze(r.concat([[n,o]])),a.items[o],t);if(typeof s=="number")o=s-1;else{if(s===Vn)return Vn;s===ac&&(a.items.splice(o,1),o-=1)}}typeof i=="function"&&n==="key"&&(i=i(e,r))}}return typeof i=="function"?i(e,r):i}sc.visit=Oe});var Kr=v(L=>{"use strict";var Fn=rc(),Dh=nc(),Bh=cc(),qn="\uFEFF",Wn="",zn="",Jn="",Lh=r=>!!r&&"items"in r,Mh=r=>!!r&&(r.type==="scalar"||r.type==="single-quoted-scalar"||r.type==="double-quoted-scalar"||r.type==="block-scalar");function Vh(r){switch(r){case qn:return"<BOM>";case Wn:return"<DOC>";case zn:return"<FLOW_END>";case Jn:return"<SCALAR>";default:return JSON.stringify(r)}}function Fh(r){switch(r){case qn:return"byte-order-mark";case Wn:return"doc-mode";case zn:return"flow-error-end";case Jn:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
112
+ `,d=[{type:"block-scalar-header",offset:a,indent:i,source:f}];return sc(d,c)||d.push({type:"newline",offset:-1,indent:i,source:`
113
+ `}),{type:"block-scalar",offset:a,indent:i,props:d,source:u}}case'"':return{type:"double-quoted-scalar",offset:a,indent:i,source:s,end:c};case"'":return{type:"single-quoted-scalar",offset:a,indent:i,source:s,end:c};default:return{type:"scalar",offset:a,indent:i,source:s,end:c}}}function Uh(t,e,r={}){let{afterKey:i=!1,implicitKey:n=!1,inFlow:a=!1,type:o}=r,s="indent"in t?t.indent:null;if(i&&typeof s=="number"&&(s+=2),!o)switch(t.type){case"single-quoted-scalar":o="QUOTE_SINGLE";break;case"double-quoted-scalar":o="QUOTE_DOUBLE";break;case"block-scalar":{let l=t.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=oc.stringifyString({type:o,value:e},{implicitKey:n||s===null,indent:s!==null&&s>0?" ".repeat(s):"",inFlow:a,options:{blockQuote:!0,lineWidth:-1}});switch(c[0]){case"|":case">":Kh(t,c);break;case'"':Jn(t,c,"double-quoted-scalar");break;case"'":Jn(t,c,"single-quoted-scalar");break;default:Jn(t,c,"scalar")}}function Kh(t,e){let r=e.indexOf(`
114
+ `),i=e.substring(0,r),n=e.substring(r+1)+`
115
+ `;if(t.type==="block-scalar"){let a=t.props[0];if(a.type!=="block-scalar-header")throw new Error("Invalid block scalar header");a.source=i,t.source=n}else{let{offset:a}=t,o="indent"in t?t.indent:-1,s=[{type:"block-scalar-header",offset:a,indent:o,source:i}];sc(s,"end"in t?t.end:void 0)||s.push({type:"newline",offset:-1,indent:o,source:`
116
+ `});for(let c of Object.keys(t))c!=="type"&&c!=="offset"&&delete t[c];Object.assign(t,{type:"block-scalar",indent:o,props:s,source:n})}}function sc(t,e){if(e)for(let r of e)switch(r.type){case"space":case"comment":t.push(r);break;case"newline":return t.push(r),!0}return!1}function Jn(t,e,r){switch(t.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":t.type=r,t.source=e;break;case"block-scalar":{let i=t.props.slice(1),n=e.length;t.props[0].type==="block-scalar-header"&&(n-=t.props[0].source.length);for(let a of i)a.offset+=n;delete t.props,Object.assign(t,{type:r,source:e,end:i});break}case"block-map":case"block-seq":{let n={type:"newline",offset:t.offset+e.length,indent:t.indent,source:`
117
+ `};delete t.items,Object.assign(t,{type:r,source:e,end:[n]});break}default:{let i="indent"in t?t.indent:-1,n="end"in t&&Array.isArray(t.end)?t.end.filter(a=>a.type==="space"||a.type==="comment"||a.type==="newline"):[];for(let a of Object.keys(t))a!=="type"&&a!=="offset"&&delete t[a];Object.assign(t,{type:r,indent:i,source:e,end:n})}}}Ur.createScalarToken=Gh;Ur.resolveAsScalar=Jh;Ur.setScalarValue=Uh});var uc=v(lc=>{"use strict";var Yh=t=>"type"in t?Yr(t):Kr(t);function Yr(t){switch(t.type){case"block-scalar":{let e="";for(let r of t.props)e+=Yr(r);return e+t.source}case"block-map":case"block-seq":{let e="";for(let r of t.items)e+=Kr(r);return e}case"flow-collection":{let e=t.start.source;for(let r of t.items)e+=Kr(r);for(let r of t.end)e+=r.source;return e}case"document":{let e=Kr(t);if(t.end)for(let r of t.end)e+=r.source;return e}default:{let e=t.source;if("end"in t&&t.end)for(let r of t.end)e+=r.source;return e}}}function Kr({start:t,key:e,sep:r,value:i}){let n="";for(let a of t)n+=a.source;if(e&&(n+=Yr(e)),r)for(let a of r)n+=a.source;return i&&(n+=Yr(i)),n}lc.stringify=Yh});var pc=v(hc=>{"use strict";var Gn=Symbol("break visit"),Xh=Symbol("skip children"),dc=Symbol("remove item");function De(t,e){"type"in t&&t.type==="document"&&(t={start:t.start,value:t.value}),fc(Object.freeze([]),t,e)}De.BREAK=Gn;De.SKIP=Xh;De.REMOVE=dc;De.itemAtPath=(t,e)=>{let r=t;for(let[i,n]of e){let a=r?.[i];if(a&&"items"in a)r=a.items[n];else return}return r};De.parentCollection=(t,e)=>{let r=De.itemAtPath(t,e.slice(0,-1)),i=e[e.length-1][0],n=r?.[i];if(n&&"items"in n)return n;throw new Error("Parent collection not found")};function fc(t,e,r){let i=r(e,t);if(typeof i=="symbol")return i;for(let n of["key","value"]){let a=e[n];if(a&&"items"in a){for(let o=0;o<a.items.length;++o){let s=fc(Object.freeze(t.concat([[n,o]])),a.items[o],r);if(typeof s=="number")o=s-1;else{if(s===Gn)return Gn;s===dc&&(a.items.splice(o,1),o-=1)}}typeof i=="function"&&n==="key"&&(i=i(e,t))}}return typeof i=="function"?i(e,t):i}hc.visit=De});var Xr=v(M=>{"use strict";var Un=cc(),Qh=uc(),Zh=pc(),Kn="\uFEFF",Yn="",Xn="",Qn="",ep=t=>!!t&&"items"in t,tp=t=>!!t&&(t.type==="scalar"||t.type==="single-quoted-scalar"||t.type==="double-quoted-scalar"||t.type==="block-scalar");function rp(t){switch(t){case Kn:return"<BOM>";case Yn:return"<DOC>";case Xn:return"<FLOW_END>";case Qn:return"<SCALAR>";default:return JSON.stringify(t)}}function ip(t){switch(t){case Kn:return"byte-order-mark";case Yn:return"doc-mode";case Xn:return"flow-error-end";case Qn:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
118
118
  `:case`\r
119
- `:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(r[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=Fn.createScalarToken;L.resolveAsScalar=Fn.resolveAsScalar;L.setScalarValue=Fn.setScalarValue;L.stringify=Dh.stringify;L.visit=Bh.visit;L.BOM=qn;L.DOCUMENT=Wn;L.FLOW_END=zn;L.SCALAR=Jn;L.isCollection=Lh;L.isScalar=Mh;L.prettyToken=Vh;L.tokenType=Fh});var Kn=v(uc=>{"use strict";var Tt=Kr();function J(r){switch(r){case void 0:case" ":case`
120
- `:case"\r":case" ":return!0;default:return!1}}var lc=new Set("0123456789ABCDEFabcdef"),qh=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Yr=new Set(",[]{}"),Wh=new Set(` ,[]{}
121
- \r `),Gn=r=>!r||Wh.has(r),Un=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 i=this.next??"stream";for(;i&&(t||this.hasChars(1));)i=yield*this.parseNext(i)}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 i=0;for(;t===" ";)t=this.buffer[++i+e];if(t==="\r"){let n=this.buffer[i+e+1];if(n===`
124
- `||!n&&!this.atEnd)return e+i+1}return t===`
125
- `||i>=this.indentNext||!t&&!this.atEnd?e+i:-1}if(t==="-"||t==="."){let i=this.buffer.substr(e,3);if((i==="---"||i==="...")&&J(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]===Tt.BOM&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let t=e.length,i=e.indexOf("#");for(;i!==-1;){let a=e[i-1];if(a===" "||a===" "){t=i-1;break}else i=e.indexOf("#",i+1)}for(;;){let a=e[t-1];if(a===" "||a===" ")t-=1;else break}let n=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-n),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 Tt.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==="...")&&J(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&&!J(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===":")&&J(t)){let i=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=i,"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(Gn),"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,i=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=i=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);let n=this.getLine();if(n===null)return this.setNext("flow");if((i!==-1&&i<this.indentNext&&n[0]!=="#"||i===0&&(n.startsWith("---")||n.startsWith("..."))&&J(n[3]))&&!(i===this.indentNext-1&&this.flowLevel===1&&(n[0]==="]"||n[0]==="}")))return this.flowLevel=0,yield Tt.FLOW_END,yield*this.parseLineStart();let a=0;for(;n[a]===",";)a+=yield*this.pushCount(1),a+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(a+=yield*this.pushIndicators(),n[a]){case void 0:return"flow";case"#":return yield*this.pushCount(n.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(Gn),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let o=this.charAt(1);if(this.flowKey||J(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 i=this.buffer.substring(0,t),n=i.indexOf(`
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(t[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}M.createScalarToken=Un.createScalarToken;M.resolveAsScalar=Un.resolveAsScalar;M.setScalarValue=Un.setScalarValue;M.stringify=Qh.stringify;M.visit=Zh.visit;M.BOM=Kn;M.DOCUMENT=Yn;M.FLOW_END=Xn;M.SCALAR=Qn;M.isCollection=ep;M.isScalar=tp;M.prettyToken=rp;M.tokenType=ip});var ta=v(vc=>{"use strict";var Ot=Xr();function G(t){switch(t){case void 0:case" ":case`
120
+ `:case"\r":case" ":return!0;default:return!1}}var mc=new Set("0123456789ABCDEFabcdef"),np=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Qr=new Set(",[]{}"),ap=new Set(` ,[]{}
121
+ \r `),Zn=t=>!t||ap.has(t),ea=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,r=!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=!r;let i=this.next??"stream";for(;i&&(r||this.hasChars(1));)i=yield*this.parseNext(i)}atLineEnd(){let e=this.pos,r=this.buffer[e];for(;r===" "||r===" ";)r=this.buffer[++e];return!r||r==="#"||r===`
122
+ `?!0:r==="\r"?this.buffer[e+1]===`
123
+ `:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let r=this.buffer[e];if(this.indentNext>0){let i=0;for(;r===" ";)r=this.buffer[++i+e];if(r==="\r"){let n=this.buffer[i+e+1];if(n===`
124
+ `||!n&&!this.atEnd)return e+i+1}return r===`
125
+ `||i>=this.indentNext||!r&&!this.atEnd?e+i:-1}if(r==="-"||r==="."){let i=this.buffer.substr(e,3);if((i==="---"||i==="...")&&G(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]===Ot.BOM&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let r=e.length,i=e.indexOf("#");for(;i!==-1;){let a=e[i-1];if(a===" "||a===" "){r=i-1;break}else i=e.indexOf("#",i+1)}for(;;){let a=e[r-1];if(a===" "||a===" ")r-=1;else break}let n=(yield*this.pushCount(r))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-n),this.pushNewline(),"stream"}if(this.atLineEnd()){let r=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-r),yield*this.pushNewline(),"stream"}return yield Ot.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 r=this.peek(3);if((r==="---"||r==="...")&&G(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,r==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!G(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,r]=this.peek(2);if(!r&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&G(r)){let i=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=i,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext("doc");let r=yield*this.pushIndicators();switch(e[r]){case"#":yield*this.pushCount(e.length-r);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(Zn),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return r+=yield*this.parseBlockScalarHeader(),r+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-r),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,r,i=-1;do e=yield*this.pushNewline(),e>0?(r=yield*this.pushSpaces(!1),this.indentValue=i=r):r=0,r+=yield*this.pushSpaces(!0);while(e+r>0);let n=this.getLine();if(n===null)return this.setNext("flow");if((i!==-1&&i<this.indentNext&&n[0]!=="#"||i===0&&(n.startsWith("---")||n.startsWith("..."))&&G(n[3]))&&!(i===this.indentNext-1&&this.flowLevel===1&&(n[0]==="]"||n[0]==="}")))return this.flowLevel=0,yield Ot.FLOW_END,yield*this.parseLineStart();let a=0;for(;n[a]===",";)a+=yield*this.pushCount(1),a+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(a+=yield*this.pushIndicators(),n[a]){case void 0:return"flow";case"#":return yield*this.pushCount(n.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(Zn),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let o=this.charAt(1);if(this.flowKey||G(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),r=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;r!==-1&&this.buffer[r+1]==="'";)r=this.buffer.indexOf("'",r+2);else for(;r!==-1;){let a=0;for(;this.buffer[r-1-a]==="\\";)a+=1;if(a%2===0)break;r=this.buffer.indexOf('"',r+1)}let i=this.buffer.substring(0,r),n=i.indexOf(`
127
127
  `,this.pos);if(n!==-1){for(;n!==-1;){let a=this.continueScalar(n+1);if(a===-1)break;n=i.indexOf(`
128
- `,a)}n!==-1&&(t=n-(i[n-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=>J(t)||t==="#")}*parseBlockScalar(){let e=this.pos-1,t=0,i;e:for(let a=this.pos;i=this.buffer[a];++a)switch(i){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(!i&&!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(`
128
+ `,a)}n!==-1&&(r=n-(i[n-1]==="\r"?2:1))}if(r===-1){if(!this.atEnd)return this.setNext("quoted-scalar");r=this.buffer.length}return yield*this.pushToIndex(r+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let r=this.buffer[++e];if(r==="+")this.blockScalarKeep=!0;else if(r>"0"&&r<="9")this.blockScalarIndent=Number(r)-1;else if(r!=="-")break}return yield*this.pushUntil(r=>G(r)||r==="#")}*parseBlockScalar(){let e=this.pos-1,r=0,i;e:for(let a=this.pos;i=this.buffer[a];++a)switch(i){case" ":r+=1;break;case`
129
+ `:e=a,r=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(!i&&!this.atEnd)return this.setNext("block-scalar");if(r>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=r: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
131
  `,a)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let n=e+1;for(i=this.buffer[n];i===" ";)i=this.buffer[++n];if(i===" "){for(;i===" "||i===" "||i==="\r"||i===`
132
132
  `;)i=this.buffer[++n];e=n-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 Tt.SCALAR,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,i=this.pos-1,n;for(;n=this.buffer[++i];)if(n===":"){let a=this.buffer[i+1];if(J(a)||e&&Yr.has(a))break;t=i}else if(J(n)){let a=this.buffer[i+1];if(n==="\r"&&(a===`
133
+ `&&a>=this.pos&&a+1+r>s)e=a;else break}while(!0);return yield Ot.SCALAR,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,r=this.pos-1,i=this.pos-1,n;for(;n=this.buffer[++i];)if(n===":"){let a=this.buffer[i+1];if(G(a)||e&&Qr.has(a))break;r=i}else if(G(n)){let a=this.buffer[i+1];if(n==="\r"&&(a===`
134
134
  `?(i+=1,n=`
135
- `,a=this.buffer[i+1]):t=i),a==="#"||e&&Yr.has(a))break;if(n===`
136
- `){let o=this.continueScalar(i+1);if(o===-1)break;i=Math.max(i,o-2)}}else{if(e&&Yr.has(n))break;t=i}return!n&&!this.atEnd?this.setNext("plain-scalar"):(yield Tt.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 i=this.buffer.slice(this.pos,e);return i?(yield i,this.pos+=i.length,i.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(Gn),e+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{let t=this.flowLevel>0,i=this.charAt(1);if(J(i)||t&&Yr.has(i)){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(;!J(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(qh.has(t))t=this.buffer[++e];else if(t==="%"&&lc.has(this.buffer[e+1])&&lc.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===`
135
+ `,a=this.buffer[i+1]):r=i),a==="#"||e&&Qr.has(a))break;if(n===`
136
+ `){let o=this.continueScalar(i+1);if(o===-1)break;i=Math.max(i,o-2)}}else{if(e&&Qr.has(n))break;r=i}return!n&&!this.atEnd?this.setNext("plain-scalar"):(yield Ot.SCALAR,yield*this.pushToIndex(r+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,r){let i=this.buffer.slice(this.pos,e);return i?(yield i,this.pos+=i.length,i.length):(r&&(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(Zn),e+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{let r=this.flowLevel>0,i=this.charAt(1);if(G(i)||r&&Qr.has(i)){r?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,r=this.buffer[e];for(;!G(r)&&r!==">";)r=this.buffer[++e];return yield*this.pushToIndex(r===">"?e+1:e,!1)}else{let e=this.pos+1,r=this.buffer[e];for(;r;)if(np.has(r))r=this.buffer[++e];else if(r==="%"&&mc.has(this.buffer[e+1])&&mc.has(this.buffer[e+2]))r=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===`
137
137
  `?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
138
- `?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,i;do i=this.buffer[++t];while(i===" "||e&&i===" ");let n=t-this.pos;return n>0&&(yield this.buffer.substr(this.pos,n),this.pos=t),n}*pushUntil(e){let t=this.pos,i=this.buffer[t];for(;!e(i);)i=this.buffer[++t];return yield*this.pushToIndex(t,!1)}};uc.Lexer=Un});var Xn=v(dc=>{"use strict";var Yn=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,i=this.lineStarts.length;for(;t<i;){let a=t+i>>1;this.lineStarts[a]<e?t=a+1:i=a}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};let n=this.lineStarts[t-1];return{line:t,col:e-n+1}}}};dc.LineCounter=Yn});var Zn=v(vc=>{"use strict";var zh=tr("process"),fc=Kr(),Jh=Kn();function we(r,e){for(let t=0;t<r.length;++t)if(r[t].type===e)return!0;return!1}function hc(r){for(let e=0;e<r.length;++e)switch(r[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function mc(r){switch(r?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function Xr(r){switch(r.type){case"document":return r.start;case"block-map":{let e=r.items[r.items.length-1];return e.sep??e.start}case"block-seq":return r.items[r.items.length-1].start;default:return[]}}function Xe(r){if(r.length===0)return[];let e=r.length;e:for(;--e>=0;)switch(r[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;r[++e]?.type==="space";);return r.splice(e,r.length)}function Qr(r,e){if(e.length<1e5)Array.prototype.push.apply(r,e);else for(let t=0;t<e.length;++t)r.push(e[t])}function pc(r){if(r.start.type==="flow-seq-start")for(let e of r.items)e.sep&&!e.value&&!we(e.start,"explicit-key-ind")&&!we(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,mc(e.value)?e.value.end?Qr(e.value.end,e.sep):e.value.end=e.sep:Qr(e.start,e.sep),delete e.sep)}var Qn=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 Jh.Lexer,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let i of this.lexer.lex(e,t))yield*this.next(i);t||(yield*this.end())}*next(e){if(this.source=e,zh.env.LOG_TOKENS&&console.log("|",fc.prettyToken(e)),this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=fc.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 i=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:i,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 i=this.peek(1);switch(t.type==="block-scalar"?t.indent="indent"in i?i.indent:0:t.type==="flow-collection"&&i.type==="document"&&(t.indent=0),t.type==="flow-collection"&&pc(t),i.type){case"document":i.value=t;break;case"block-scalar":i.props.push(t);break;case"block-map":{let n=i.items[i.items.length-1];if(n.value){i.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}else if(n.sep)n.value=t;else{Object.assign(n,{key:t,sep:[]}),this.onKeyLine=!n.explicitKey;return}break}case"block-seq":{let n=i.items[i.items.length-1];n.value?i.items.push({start:[],value:t}):n.value=t;break}case"flow-collection":{let n=i.items[i.items.length-1];!n||n.value?i.items.push({start:[],key:t,sep:[]}):n.sep?n.value=t:Object.assign(n,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((i.type==="document"||i.type==="block-map"||i.type==="block-seq")&&(t.type==="block-map"||t.type==="block-seq")){let n=t.items[t.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&hc(n.start)===-1&&(t.indent===0||n.start.every(a=>a.type!=="comment"||a.indent<t.indent))&&(i.type==="document"?i.end=n.start:i.items.push({start:n.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":{hc(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=Xr(this.peek(2)),i=Xe(t),n;e.end?(n=e.end,n.push(this.sourceToken),delete e.end):n=[this.sourceToken];let a={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:i,key:e,sep:n}]};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 i="end"in t.value?t.value.end:void 0;(Array.isArray(i)?i[i.length-1]:void 0)?.type==="comment"?i?.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 n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){Qr(n,t.start),n.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let i=!this.onKeyLine&&this.indent===e.indent,n=i&&(t.sep||t.explicitKey)&&this.type!=="seq-item-ind",a=[];if(n&&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":n||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):n||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(we(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(mc(t.key)&&!we(t.sep,"newline")){let o=Xe(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(we(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let o=Xe(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||n?e.items.push({start:a,key:null,sep:[this.sourceToken]}):we(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);n||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&&!we(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 i&&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 i="end"in t.value?t.value.end:void 0;(Array.isArray(i)?i[i.length-1]:void 0)?.type==="comment"?i?.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 n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){Qr(n,t.start),n.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||we(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){let i=this.startBlockValue(e);if(i){this.stack.push(i);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if(this.type==="flow-error-end"){let i;do yield*this.pop(),i=this.peek(1);while(i?.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 n=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:n,sep:[]}):t.sep?this.stack.push(n):Object.assign(t,{key:n,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}let i=this.startBlockValue(e);i?this.stack.push(i):(yield*this.pop(),yield*this.step())}else{let i=this.peek(2);if(i.type==="block-map"&&(this.type==="map-value-ind"&&i.indent===e.indent||this.type==="newline"&&!i.items[i.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&i.type!=="flow-collection"){let n=Xr(i),a=Xe(n);pc(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=Xr(e),i=Xe(t);return i.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let t=Xr(e),i=Xe(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!=="comment"||this.indent<=t?!1:e.every(i=>i.type==="newline"||i.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())}}};vc.Parser=Qn});var bc=v(jt=>{"use strict";var gc=Ln(),Gh=Et(),It=Pt(),Uh=Hi(),Kh=C(),Yh=Xn(),wc=Zn();function yc(r){let e=r.prettyErrors!==!1;return{lineCounter:r.lineCounter||e&&new Yh.LineCounter||null,prettyErrors:e}}function Xh(r,e={}){let{lineCounter:t,prettyErrors:i}=yc(e),n=new wc.Parser(t?.addNewLine),a=new gc.Composer(e),o=Array.from(a.compose(n.parse(r)));if(i&&t)for(let s of o)s.errors.forEach(It.prettifyError(r,t)),s.warnings.forEach(It.prettifyError(r,t));return o.length>0?o:Object.assign([],{empty:!0},a.streamInfo())}function Nc(r,e={}){let{lineCounter:t,prettyErrors:i}=yc(e),n=new wc.Parser(t?.addNewLine),a=new gc.Composer(e),o=null;for(let s of a.compose(n.parse(r),!0,r.length))if(!o)o=s;else if(o.options.logLevel!=="silent"){o.errors.push(new It.YAMLParseError(s.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return i&&t&&(o.errors.forEach(It.prettifyError(r,t)),o.warnings.forEach(It.prettifyError(r,t))),o}function Qh(r,e,t){let i;typeof e=="function"?i=e:t===void 0&&e&&typeof e=="object"&&(t=e);let n=Nc(r,t);if(!n)return null;if(n.warnings.forEach(a=>Uh.warn(n.options.logLevel,a)),n.errors.length>0){if(n.options.logLevel!=="silent")throw n.errors[0];n.errors=[]}return n.toJS(Object.assign({reviver:i},t))}function Zh(r,e,t){let i=null;if(typeof e=="function"||Array.isArray(e)?i=e:t===void 0&&e&&(t=e),typeof t=="string"&&(t=t.length),typeof t=="number"){let n=Math.round(t);t=n<1?void 0:n>8?{indent:8}:{indent:n}}if(r===void 0){let{keepUndefined:n}=t??e??{};if(!n)return}return Kh.isDocument(r)&&!i?r.toString(t):new Gh.Document(r,i,t).toString(t)}jt.parse=Qh;jt.parseAllDocuments=Xh;jt.parseDocument=Nc;jt.stringify=Zh});var Qe=v(x=>{"use strict";var ep=Ln(),tp=Et(),rp=yn(),ea=Pt(),ip=ct(),ye=C(),np=pe(),ap=A(),op=ve(),sp=ge(),cp=Kr(),lp=Kn(),up=Xn(),dp=Zn(),Zr=bc(),kc=nt();x.Composer=ep.Composer;x.Document=tp.Document;x.Schema=rp.Schema;x.YAMLError=ea.YAMLError;x.YAMLParseError=ea.YAMLParseError;x.YAMLWarning=ea.YAMLWarning;x.Alias=ip.Alias;x.isAlias=ye.isAlias;x.isCollection=ye.isCollection;x.isDocument=ye.isDocument;x.isMap=ye.isMap;x.isNode=ye.isNode;x.isPair=ye.isPair;x.isScalar=ye.isScalar;x.isSeq=ye.isSeq;x.Pair=np.Pair;x.Scalar=ap.Scalar;x.YAMLMap=op.YAMLMap;x.YAMLSeq=sp.YAMLSeq;x.CST=cp;x.Lexer=lp.Lexer;x.LineCounter=up.LineCounter;x.Parser=dp.Parser;x.parse=Zr.parse;x.parseAllDocuments=Zr.parseAllDocuments;x.parseDocument=Zr.parseDocument;x.stringify=Zr.stringify;x.visit=kc.visit;x.visitAsync=kc.visitAsync});import Qp from"path";var Ot=it(Qe(),1);import Ne from"path";var Ht=64*1024,ei=1024,ti=64,Sc=1024,Ec=64,ra=5,$t={learning:!0,retrieval:!0},ia={provider:"local"},fp=12e4,Cc=6e5,hp=[".agents/skills/**",".amazonq/skills/**",".augment/skills/**",".bob/skills/**",".claude/skills/**",".cline/skills/**",".codebuddy/skills/**",".workbuddy/skills/**",".continue/skills/**",".cospec/skills/**",".crush/skills/**",".cursor/skills/**",".dsh/skills/**",".factory/skills/**",".forge/skills/**",".gemini/skills/**",".github/skills/**",".grok/skills/**",".iflow/skills/**",".junie/skills/**",".kilocode/skills/**",".kimi-code/skills/**",".kiro/skills/**",".lingma/skills/**",".mimocode/skills/**",".opencode/skills/**",".omp/skills/**",".pi/skills/**",".qoder/skills/**",".qwen/skills/**",".roo/skills/**",".trae-cn/skills/**",".trae/skills/**",".windsurf/skills/**",".zcode/skills/**"],pp=["**/.idea/**","**/.vscode/**",".codex/skills/**","**/node_modules/**","**/.next/**","**/.nuxt/**","**/.output/**","**/.svelte-kit/**","**/.vite/**","**/.parcel-cache/**","**/.turbo/**","**/.nx/cache/**","**/dist/**","**/build/**","**/out/**","**/coverage/**","**/.nyc_output/**","**/target/**","**/.gradle/**","**/.cxx/**","**/.externalNativeBuild/**","**/captures/**","**/__pycache__/**","**/.pytest_cache/**","**/.mypy_cache/**","**/.ruff_cache/**","**/.tox/**","**/.nox/**","**/.venv/**","**/venv/**","**/obj/**","**/CMakeFiles/**","**/cmake-build-*/**","**/.cache/**","**/tmp/**","**/temp/**","**/logs/**","**/*.tsbuildinfo","**/*.log","**/.DS_Store","**/Thumbs.db"],Pc=[...hp,...pp].sort((r,e)=>r.localeCompare(e,"en"));function Rc(r){let e=[...r],t=new Set(r);for(let i of Pc)t.has(i)||(t.add(i),e.push(i));return e}var V={include:["**/*"],exclude:[...Pc],max_files:1e4,max_total_bytes:256*1024*1024,max_duration_ms:6e4},Ze={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.
138
+ `?yield*this.pushCount(2):0}*pushSpaces(e){let r=this.pos-1,i;do i=this.buffer[++r];while(i===" "||e&&i===" ");let n=r-this.pos;return n>0&&(yield this.buffer.substr(this.pos,n),this.pos=r),n}*pushUntil(e){let r=this.pos,i=this.buffer[r];for(;!e(i);)i=this.buffer[++r];return yield*this.pushToIndex(r,!1)}};vc.Lexer=ea});var ia=v(gc=>{"use strict";var ra=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let r=0,i=this.lineStarts.length;for(;r<i;){let a=r+i>>1;this.lineStarts[a]<e?r=a+1:i=a}if(this.lineStarts[r]===e)return{line:r+1,col:1};if(r===0)return{line:0,col:e};let n=this.lineStarts[r-1];return{line:r,col:e-n+1}}}};gc.LineCounter=ra});var aa=v(kc=>{"use strict";var op=ir("process"),wc=Xr(),sp=ta();function Ne(t,e){for(let r=0;r<t.length;++r)if(t[r].type===e)return!0;return!1}function yc(t){for(let e=0;e<t.length;++e)switch(t[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function bc(t){switch(t?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function Zr(t){switch(t.type){case"document":return t.start;case"block-map":{let e=t.items[t.items.length-1];return e.sep??e.start}case"block-seq":return t.items[t.items.length-1].start;default:return[]}}function Ze(t){if(t.length===0)return[];let e=t.length;e:for(;--e>=0;)switch(t[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;t[++e]?.type==="space";);return t.splice(e,t.length)}function ei(t,e){if(e.length<1e5)Array.prototype.push.apply(t,e);else for(let r=0;r<e.length;++r)t.push(e[r])}function Nc(t){if(t.start.type==="flow-seq-start")for(let e of t.items)e.sep&&!e.value&&!Ne(e.start,"explicit-key-ind")&&!Ne(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,bc(e.value)?e.value.end?ei(e.value.end,e.sep):e.value.end=e.sep:ei(e.start,e.sep),delete e.sep)}var na=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 sp.Lexer,this.onNewLine=e}*parse(e,r=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let i of this.lexer.lex(e,r))yield*this.next(i);r||(yield*this.end())}*next(e){if(this.source=e,op.env.LOG_TOKENS&&console.log("|",wc.prettyToken(e)),this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let r=wc.tokenType(e);if(r)if(r==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=r,yield*this.step(),r){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 i=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:i,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 r=e??this.stack.pop();if(!r)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield r;else{let i=this.peek(1);switch(r.type==="block-scalar"?r.indent="indent"in i?i.indent:0:r.type==="flow-collection"&&i.type==="document"&&(r.indent=0),r.type==="flow-collection"&&Nc(r),i.type){case"document":i.value=r;break;case"block-scalar":i.props.push(r);break;case"block-map":{let n=i.items[i.items.length-1];if(n.value){i.items.push({start:[],key:r,sep:[]}),this.onKeyLine=!0;return}else if(n.sep)n.value=r;else{Object.assign(n,{key:r,sep:[]}),this.onKeyLine=!n.explicitKey;return}break}case"block-seq":{let n=i.items[i.items.length-1];n.value?i.items.push({start:[],value:r}):n.value=r;break}case"flow-collection":{let n=i.items[i.items.length-1];!n||n.value?i.items.push({start:[],key:r,sep:[]}):n.sep?n.value=r:Object.assign(n,{key:r,sep:[]});return}default:yield*this.pop(),yield*this.pop(r)}if((i.type==="document"||i.type==="block-map"||i.type==="block-seq")&&(r.type==="block-map"||r.type==="block-seq")){let n=r.items[r.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&yc(n.start)===-1&&(r.indent===0||n.start.every(a=>a.type!=="comment"||a.indent<r.indent))&&(i.type==="document"?i.end=n.start:i.items.push({start:n.start}),r.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":{yc(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 r=this.startBlockValue(e);r?this.stack.push(r):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 r=Zr(this.peek(2)),i=Ze(r),n;e.end?(n=e.end,n.push(this.sourceToken),delete e.end):n=[this.sourceToken];let a={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:i,key:e,sep:n}]};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 r=this.source.indexOf(`
139
+ `)+1;for(;r!==0;)this.onNewLine(this.offset+r),r=this.source.indexOf(`
140
+ `,r)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let r=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,r.value){let i="end"in r.value?r.value.end:void 0;(Array.isArray(i)?i[i.length-1]:void 0)?.type==="comment"?i?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"space":case"comment":if(r.value)e.items.push({start:[this.sourceToken]});else if(r.sep)r.sep.push(this.sourceToken);else{if(this.atIndentedComment(r.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){ei(n,r.start),n.push(this.sourceToken),e.items.pop();return}}r.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let i=!this.onKeyLine&&this.indent===e.indent,n=i&&(r.sep||r.explicitKey)&&this.type!=="seq-item-ind",a=[];if(n&&r.sep&&!r.value){let o=[];for(let s=0;s<r.sep.length;++s){let c=r.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=r.sep.splice(o[1]))}switch(this.type){case"anchor":case"tag":n||r.value?(a.push(this.sourceToken),e.items.push({start:a}),this.onKeyLine=!0):r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"explicit-key-ind":!r.sep&&!r.explicitKey?(r.start.push(this.sourceToken),r.explicitKey=!0):n||r.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(r.explicitKey)if(r.sep)if(r.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Ne(r.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(bc(r.key)&&!Ne(r.sep,"newline")){let o=Ze(r.start),s=r.key,c=r.sep;c.push(this.sourceToken),delete r.key,delete r.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:s,sep:c}]})}else a.length>0?r.sep=r.sep.concat(a,this.sourceToken):r.sep.push(this.sourceToken);else if(Ne(r.start,"newline"))Object.assign(r,{key:null,sep:[this.sourceToken]});else{let o=Ze(r.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]})}else r.sep?r.value||n?e.items.push({start:a,key:null,sep:[this.sourceToken]}):Ne(r.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):r.sep.push(this.sourceToken):Object.assign(r,{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);n||r.value?(e.items.push({start:a,key:o,sep:[]}),this.onKeyLine=!0):r.sep?this.stack.push(o):(Object.assign(r,{key:o,sep:[]}),this.onKeyLine=!0);return}default:{let o=this.startBlockValue(e);if(o){if(o.type==="block-seq"){if(!r.explicitKey&&r.sep&&!Ne(r.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 i&&e.items.push({start:a});this.stack.push(o);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let r=e.items[e.items.length-1];switch(this.type){case"newline":if(r.value){let i="end"in r.value?r.value.end:void 0;(Array.isArray(i)?i[i.length-1]:void 0)?.type==="comment"?i?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else r.start.push(this.sourceToken);return;case"space":case"comment":if(r.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(r.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){ei(n,r.start),n.push(this.sourceToken),e.items.pop();return}}r.start.push(this.sourceToken)}return;case"anchor":case"tag":if(r.value||this.indent<=e.indent)break;r.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;r.value||Ne(r.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return}if(this.indent>e.indent){let i=this.startBlockValue(e);if(i){this.stack.push(i);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let r=e.items[e.items.length-1];if(this.type==="flow-error-end"){let i;do yield*this.pop(),i=this.peek(1);while(i?.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!r||r.sep?e.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return;case"map-value-ind":!r||r.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):r.sep?r.sep.push(this.sourceToken):Object.assign(r,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!r||r.value?e.items.push({start:[this.sourceToken]}):r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let n=this.flowScalar(this.type);!r||r.value?e.items.push({start:[],key:n,sep:[]}):r.sep?this.stack.push(n):Object.assign(r,{key:n,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}let i=this.startBlockValue(e);i?this.stack.push(i):(yield*this.pop(),yield*this.step())}else{let i=this.peek(2);if(i.type==="block-map"&&(this.type==="map-value-ind"&&i.indent===e.indent||this.type==="newline"&&!i.items[i.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&i.type!=="flow-collection"){let n=Zr(i),a=Ze(n);Nc(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 r=this.source.indexOf(`
141
+ `)+1;for(;r!==0;)this.onNewLine(this.offset+r),r=this.source.indexOf(`
142
+ `,r)+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 r=Zr(e),i=Ze(r);return i.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let r=Zr(e),i=Ze(r);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,r){return this.type!=="comment"||this.indent<=r?!1:e.every(i=>i.type==="newline"||i.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())}}};kc.Parser=na});var Pc=v(Dt=>{"use strict";var Sc=zn(),cp=Rt(),Ht=It(),lp=Fi(),up=x(),dp=ia(),Ec=aa();function Cc(t){let e=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||e&&new dp.LineCounter||null,prettyErrors:e}}function fp(t,e={}){let{lineCounter:r,prettyErrors:i}=Cc(e),n=new Ec.Parser(r?.addNewLine),a=new Sc.Composer(e),o=Array.from(a.compose(n.parse(t)));if(i&&r)for(let s of o)s.errors.forEach(Ht.prettifyError(t,r)),s.warnings.forEach(Ht.prettifyError(t,r));return o.length>0?o:Object.assign([],{empty:!0},a.streamInfo())}function xc(t,e={}){let{lineCounter:r,prettyErrors:i}=Cc(e),n=new Ec.Parser(r?.addNewLine),a=new Sc.Composer(e),o=null;for(let s of a.compose(n.parse(t),!0,t.length))if(!o)o=s;else if(o.options.logLevel!=="silent"){o.errors.push(new Ht.YAMLParseError(s.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return i&&r&&(o.errors.forEach(Ht.prettifyError(t,r)),o.warnings.forEach(Ht.prettifyError(t,r))),o}function hp(t,e,r){let i;typeof e=="function"?i=e:r===void 0&&e&&typeof e=="object"&&(r=e);let n=xc(t,r);if(!n)return null;if(n.warnings.forEach(a=>lp.warn(n.options.logLevel,a)),n.errors.length>0){if(n.options.logLevel!=="silent")throw n.errors[0];n.errors=[]}return n.toJS(Object.assign({reviver:i},r))}function pp(t,e,r){let i=null;if(typeof e=="function"||Array.isArray(e)?i=e:r===void 0&&e&&(r=e),typeof r=="string"&&(r=r.length),typeof r=="number"){let n=Math.round(r);r=n<1?void 0:n>8?{indent:8}:{indent:n}}if(t===void 0){let{keepUndefined:n}=r??e??{};if(!n)return}return up.isDocument(t)&&!i?t.toString(r):new cp.Document(t,i,r).toString(r)}Dt.parse=hp;Dt.parseAllDocuments=fp;Dt.parseDocument=xc;Dt.stringify=pp});var et=v(P=>{"use strict";var mp=zn(),vp=Rt(),gp=Cn(),oa=It(),wp=ft(),be=x(),yp=ve(),Np=_(),bp=we(),kp=ye(),Sp=Xr(),Ep=ta(),Cp=ia(),xp=aa(),ti=Pc(),Rc=ct();P.Composer=mp.Composer;P.Document=vp.Document;P.Schema=gp.Schema;P.YAMLError=oa.YAMLError;P.YAMLParseError=oa.YAMLParseError;P.YAMLWarning=oa.YAMLWarning;P.Alias=wp.Alias;P.isAlias=be.isAlias;P.isCollection=be.isCollection;P.isDocument=be.isDocument;P.isMap=be.isMap;P.isNode=be.isNode;P.isPair=be.isPair;P.isScalar=be.isScalar;P.isSeq=be.isSeq;P.Pair=yp.Pair;P.Scalar=Np.Scalar;P.YAMLMap=bp.YAMLMap;P.YAMLSeq=kp.YAMLSeq;P.CST=Sp;P.Lexer=Ep.Lexer;P.LineCounter=Cp.LineCounter;P.Parser=xp.Parser;P.parse=ti.parse;P.parseAllDocuments=ti.parseAllDocuments;P.parseDocument=ti.parseDocument;P.stringify=ti.stringify;P.visit=Rc.visit;P.visitAsync=Rc.visitAsync});import mm from"path";var Bt=st(et(),1);import ke from"path";var Mt=64*1024,ri=1024,ii=64,Ac=1024,_c=64,ca=5,Lt={learning:!0,retrieval:!0},la={provider:"local"},Pp=12e4,Ic=6e5,Rp=[".agents/skills/**",".amazonq/skills/**",".augment/skills/**",".bob/skills/**",".claude/skills/**",".cline/skills/**",".codebuddy/skills/**",".workbuddy/skills/**",".continue/skills/**",".cospec/skills/**",".crush/skills/**",".cursor/skills/**",".devin/skills/**",".dsh/skills/**",".factory/skills/**",".forge/skills/**",".gemini/skills/**",".github/skills/**",".grok/skills/**",".iflow/skills/**",".junie/skills/**",".kilocode/skills/**",".kimi-code/skills/**",".kiro/skills/**",".lingma/skills/**",".mimocode/skills/**",".opencode/skills/**",".omp/skills/**",".pi/skills/**",".qoder/skills/**",".qwen/skills/**",".roo/skills/**",".trae-cn/skills/**",".trae/skills/**",".windsurf/skills/**",".zcode/skills/**"],Ap=["**/.idea/**","**/.vscode/**",".codex/skills/**","**/node_modules/**","**/.next/**","**/.nuxt/**","**/.output/**","**/.svelte-kit/**","**/.vite/**","**/.parcel-cache/**","**/.turbo/**","**/.nx/cache/**","**/dist/**","**/build/**","**/out/**","**/coverage/**","**/.nyc_output/**","**/target/**","**/.gradle/**","**/.cxx/**","**/.externalNativeBuild/**","**/captures/**","**/__pycache__/**","**/.pytest_cache/**","**/.mypy_cache/**","**/.ruff_cache/**","**/.tox/**","**/.nox/**","**/.venv/**","**/venv/**","**/obj/**","**/CMakeFiles/**","**/cmake-build-*/**","**/.cache/**","**/tmp/**","**/temp/**","**/logs/**","**/*.tsbuildinfo","**/*.log","**/.DS_Store","**/Thumbs.db"],jc=[...Rp,...Ap].sort((t,e)=>t.localeCompare(e,"en"));function $c(t){let e=[...t],r=new Set(t);for(let i of jc)r.has(i)||(r.add(i),e.push(i));return e}var F={include:["**/*"],exclude:[...jc],max_files:1e4,max_total_bytes:256*1024*1024,max_duration_ms:6e4},tt={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
143
  # ambient_resume: true | false`,memory:"# Project policy for automatic personal-memory learning and retrieval.","memory.learning":`# Allows workflow events in this project to form new personal memories automatically.
144
144
  # learning: true | false`,"memory.retrieval":`# Allows personal memories to be injected into Agent context for this project.
145
145
  # retrieval: true | false`,knowledge:"# Project knowledge retrieval provider used by ordinary Comet tasks.","knowledge.provider":`# Provider for project knowledge.
@@ -163,26 +163,32 @@ ${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.pus
163
163
  # 可选值:en | zh-CN`,"classic.context_compression":`# 新建 Classic change 是否启用 beta 上下文压缩。
164
164
  # 可选值:off | beta`,"classic.review_mode":`# 新建 Classic change 默认使用的审查深度。
165
165
  # 可选值:off | standard | thorough`,"classic.auto_transition":`# Classic 阶段通过后是否自动进入下一阶段。
166
- # 可选值:true | false`}};function Ac(r,e){return Ze[e][r]}function mp(r,e,t,i){let n=/^(\s*)([a-z_]+):/u.exec(r);if(!n)return null;let a=n[1].length,o=n[2];if(a===0&&o in Ze.en)return o;if(a===2&&e){let s=`${e}.${o}`;if(s in Ze.en)return s}if(a===4&&e==="knowledge"&&i==="remote"){let s=`knowledge.remote.${o}`;if(s in Ze.en)return s}if(a===4&&e==="knowledge"&&i==="local"){let s=`knowledge.local.${o}`;if(s in Ze.en)return s}if(a===2&&e===null&&o==="hook")return"hook";if(a===2&&e==="hook"&&o==="allow_paths")return"hook.allow_paths";if(a===4&&e==="native"&&t==="snapshot"){let s=`native.snapshot.${o}`;if(s in Ze.en)return s}return null}function Dt(r,e){let t=[],i=null,n=null,a=null;for(let o of(0,Ot.stringify)(r).trimEnd().split(`
167
- `)){let s=mp(o,i,n,a);if(s){let c=o.match(/^\s*/u)?.[0]??"";for(let l of Ac(s,e).split(`
168
- `))t.push(`${c}${l}`)}t.push(o),/^[a-z_]+:/u.test(o)?(o.startsWith("native:")?i="native":o.startsWith("classic:")?i="classic":o.startsWith("hook:")?i="hook":o.startsWith("memory:")?i="memory":o.startsWith("knowledge:")?i="knowledge":i=null,n=null,a=null):/^ {2}[a-z_]+:/u.test(o)&&(i==="native"&&(n=o.startsWith(" snapshot:")?"snapshot":null),i==="knowledge"&&(a=o.startsWith(" local:")?"local":o.startsWith(" remote:")?"remote":null))}return t.push(""),t.join(`
169
- `)}function vp(r,e){if(typeof r!="string")throw new Error(`${e} must be a string`);let t=r.trim();if(t.length===0||Ne.posix.isAbsolute(t)||Ne.win32.isAbsolute(t)||/^(?:~|[\\/])/u.test(t))throw new Error(`${e} must be a project-relative path`);if(t===".")return[];let i=t.replaceAll("\\","/").split("/");if(i.some(n=>n===".."))throw new Error(`${e} must stay inside the project root`);if(i.some(n=>n===""||n==="."))throw new Error(`${e} must not contain empty or dot path segments`);return i}function He(r){let e=vp(r,"native.artifact_root");return e.length===0?".":e.join("/")}function _c(r,e="docs"){let t=r??e;if(t!=="legacy"&&t!=="docs")throw new Error("classic.artifact_layout must be legacy or docs");return t}function ri(r,e,t=!1){if(typeof r!="string")throw new Error(`${e} must be a string`);let i=r.trim().replaceAll("\\","/");if(i.length===0||Ne.posix.isAbsolute(i)||Ne.win32.isAbsolute(i)||/^(?:~|[\\/])/u.test(i))throw new Error(`${e} must be relative to its declared path base`);let n=i.split("/");if(n.some(a=>a===".."))throw new Error(`${e} must stay inside its declared path base`);if(n.some(a=>a===""||a==="."))throw new Error(`${e} must not contain empty or dot path segments`);if(!t&&/[*?]/u.test(i))throw new Error(`${e} cannot contain wildcards`);return n.join("/")}function ie(r,e){if(!r||typeof r!="object"||Array.isArray(r))throw new Error(`${e} must be a mapping`);return r}function Tc(r,e,t){let i=r??e;if(i!=="en"&&i!=="zh-CN")throw new Error(`${t} must be en or zh-CN`);return i}function na(r,e){if(typeof r!="string"||r.length===0||r.includes("\\")||r.includes("\0")||r.startsWith("/")||r.split("/").includes(".."))throw new Error(`${e} contains an unsafe pattern`);if(r.length>ei)throw new Error(`${e} exceeds ${ei} characters`);let t=0;for(let i=0;i<r.length;i+=1)r[i]==="?"?t+=1:r[i]==="*"&&(t+=1,r[i+1]==="*"&&(i+=1));if(t>ti)throw new Error(`${e} contains more than ${ti} wildcard tokens`);return r}function xc(r,e,t){if(r===void 0)return[...t];if(!Array.isArray(r))throw new Error(`${e} contains an unsafe pattern`);return[...new Set(r.map(i=>na(i,e)))].sort((i,n)=>i.localeCompare(n,"en"))}function ta(r,e,t){let i=r??e;if(!Number.isSafeInteger(i)||i<1)throw new Error(`${t} must be a positive integer`);return i}function gp(r){if(r===void 0)return{...V,include:[...V.include],exclude:[...V.exclude]};let e=ie(r,"native.snapshot");return{include:xc(e.include,"native.snapshot.include",V.include),exclude:xc(e.exclude,"native.snapshot.exclude",V.exclude),max_files:ta(e.max_files,V.max_files,"native.snapshot.max_files"),max_total_bytes:ta(e.max_total_bytes,V.max_total_bytes,"native.snapshot.max_total_bytes"),max_duration_ms:ta(e.max_duration_ms,V.max_duration_ms,"native.snapshot.max_duration_ms")}}function wp(r){if(r===void 0)return;let e=ie(r,"native.pending_root_move"),t=e.id,i=e.from_artifact_root,n=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 i!="string"||typeof n!="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=ie(e.cleanup,"native.pending_root_move.cleanup"),c=s.kind,l=s.state,f=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 f!="string"||!/^[a-f0-9]{64}$/u.test(f))throw new Error("native.pending_root_move.cleanup.manifest_hash is invalid");o={kind:c,state:l,manifestHash:f}}return{id:t,fromArtifactRoot:He(i),toArtifactRoot:He(n),stage:a,...o?{cleanup:o}:{}}}function yp(r){if(r===void 0)return;let e=ie(r,"native.finish");if(e.pull_request===void 0)return{};let t=ie(e.pull_request,"native.finish.pull_request");if(t.provider!=="repository-command")throw new Error("native.finish.pull_request.provider must be repository-command");if(!Array.isArray(t.command)||t.command.length===0)throw new Error("native.finish.pull_request.command must be a non-empty array");if(t.command.length>64)throw new Error("native.finish.pull_request.command must contain at most 64 arguments");let i=t.command.map((a,o)=>{if(typeof a!="string"||a.trim().length===0||a.length>4096||/[\0\r\n]/u.test(a))throw new Error(`native.finish.pull_request.command[${o}] must be a non-empty single-line string of at most 4096 characters`);return a});if(Ne.posix.isAbsolute(i[0])||Ne.win32.isAbsolute(i[0]))throw new Error("native.finish.pull_request.command[0] must be a bare executable name or a project-relative path");let n=t.timeout_ms??fp;if(!Number.isSafeInteger(n)||n<1||n>Cc)throw new Error(`native.finish.pull_request.timeout_ms must be an integer between 1 and ${Cc}`);return{pull_request:{provider:"repository-command",command:i,timeout_ms:n}}}function Np(r,e={}){let t=ie(r,"native"),i=t.artifact_root??(e.allowMissingArtifactRoot?"docs":void 0);if(typeof i!="string")throw new Error("native.artifact_root must be a string");let n=t.clarification_mode??"batch";if(n!=="sequential"&&n!=="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??ra;if(!Number.isSafeInteger(o)||o<1)throw new Error("native.max_verify_failures must be a positive integer");let s=wp(t.pending_root_move),c=yp(t.finish);return{artifact_root:He(i),language:Tc(t.language,"en","native.language"),clarification_mode:n,archive_confirmation:a,max_verify_failures:o,snapshot:gp(t.snapshot),...c?{finish:c}:{},...s?{pending_root_move:s}:{}}}function bp(r){let e=ie(r,"classic"),t=e.context_compression??"off";if(t!=="off"&&t!=="beta")throw new Error("classic.context_compression must be off or beta");let i=e.review_mode??"standard";if(i!=="off"&&i!=="standard"&&i!=="thorough")throw new Error("classic.review_mode must be off, standard, or thorough");let n=e.auto_transition??!0;if(typeof n!="boolean")throw new Error("classic.auto_transition must be true or false");return{artifact_layout:_c(e.artifact_layout),language:Tc(e.language,"zh-CN","classic.language"),context_compression:t,review_mode:i,auto_transition:n}}function kp(r){let t=ie(r,"hook").allow_paths??[];if(!Array.isArray(t))throw new Error("hook.allow_paths must be an array");return{allow_paths:[...new Set(t.map((i,n)=>ri(i,`hook.allow_paths[${n}]`)))]}}function Sp(r){if(r===void 0)return{...$t};let e=ie(r,"memory"),t=e.learning??$t.learning,i=e.retrieval??$t.retrieval;if(typeof t!="boolean")throw new Error("memory.learning must be true or false");if(typeof i!="boolean")throw new Error("memory.retrieval must be true or false");return{learning:t,retrieval:i}}function aa(r,e){if(r===null||typeof r!="object"||Array.isArray(r))throw new Error(`${e} must be a mapping`);return r}function Ep(r,e){if(typeof r!="string")throw new Error(`${e} must be a string`);let t=r.trim();if(t.length===0||t.includes("\\")||t.includes("\0")||Ne.posix.isAbsolute(t)||Ne.win32.isAbsolute(t)||t.startsWith("~")||t.split("/").some(n=>n===""||n==="."||n===".."))throw new Error(`${e} must be a safe project-relative glob`);if(!t.toLowerCase().endsWith(".md"))throw new Error(`${e} must target a Markdown file ending in .md`);if(t.length>Sc)throw new Error(`${e} exceeds ${Sc} characters`);let i=0;for(let n=0;n<t.length;n+=1)t[n]==="?"?i+=1:t[n]==="*"&&(i+=1,t[n+1]==="*"&&(n+=1));if(i>Ec)throw new Error(`${e} contains more than ${Ec} wildcard tokens`);return t}function Cp(r){let t=aa(r,"knowledge.local").include??[];if(!Array.isArray(t))throw new Error("knowledge.local.include must be an array");return{include:[...new Set(t.map((i,n)=>Ep(i,`knowledge.local.include[${n}]`)))]}}function xp(r){if(typeof r!="string"||r.trim().length===0)throw new Error("knowledge.remote.endpoint must be a non-empty URL");let e;try{e=new URL(r)}catch{throw new Error("knowledge.remote.endpoint must be a valid URL")}let t=e.hostname.toLowerCase().replace(/^\[|\]$/gu,""),i=t==="localhost"||t==="127.0.0.1"||t==="::1";if(e.protocol!=="https:"&&!(e.protocol==="http:"&&i))throw new Error("knowledge.remote.endpoint must use HTTPS (HTTP is allowed for loopback)");return e.toString()}function Pp(r){let e=aa(r,"knowledge.remote"),t=xp(e.endpoint),i=e.token_env;if(i!==void 0&&(typeof i!="string"||!/^[A-Za-z_][A-Za-z0-9_]*$/u.test(i)))throw new Error("knowledge.remote.token_env must be an environment variable name");let n=e.scope;if(n!==void 0&&(typeof n!="string"||n.length>512))throw new Error("knowledge.remote.scope must be a string of at most 512 characters");let a=e.timeout_ms??5e3;if(typeof a!="number"||!Number.isSafeInteger(a)||a<100||a>3e4)throw new Error("knowledge.remote.timeout_ms must be an integer between 100 and 30000");return{endpoint:t,...i===void 0?{}:{token_env:i},...n===void 0?{}:{scope:n},timeout_ms:a}}function Rp(r){if(r===void 0)return{...ia};let e=aa(r,"knowledge"),t=e.provider??"local";if(t!=="local"&&t!=="remote")throw new Error("knowledge.provider must be local or remote");let i=e.local===void 0?void 0:Cp(e.local);if(t==="local")return{provider:t,...i?{local:i}:{}};let n=e.remote===void 0?void 0:Pp(e.remote);if(n===void 0)throw new Error("knowledge.remote must be configured when knowledge.provider is remote");return{provider:t,...i?{local:i}:{},remote:n}}function Ap(r){let e=r??!0;if(typeof e!="boolean")throw new Error("ambient_resume must be true or false");return e}function _p(r,e,t,i,n,a,o,s){let c=r.schema!==void 0;if(!(c||r.default_workflow!==void 0||r.workflows!==void 0||!s.allowPartialProject&&r.native!==void 0)||s.allowPartialProject&&!c)return null;if(r.schema!=="comet.project.v1")throw new Error("Unsupported Comet project schema");if(r.default_workflow!=="native"&&r.default_workflow!=="classic")throw new Error("default_workflow must be native or classic");let f=r.workflows??[r.default_workflow];if(!Array.isArray(f)||f.length===0||f.some(d=>d!=="native"&&d!=="classic"))throw new Error("workflows must contain native and/or classic");let u=[...new Set(f)];if(!u.includes(r.default_workflow))throw new Error("workflows must include default_workflow");if(u.includes("native")&&!n)throw new Error("native must be a mapping");return{schema:"comet.project.v1",default_workflow:r.default_workflow,workflows:u,ambient_resume:o,...e?{hook:e}:{},memory:t,knowledge:i,...n?{native:n}:{},...a?{classic:a}:{}}}function et(r,e={}){let t=(0,Ot.parseDocument)(r,{uniqueKeys:!0});if(t.errors.length>0)throw new Error(`Invalid .comet/config.yaml: ${t.errors[0].message}`);let i=t.toJS();if(i==null)return{value:{},config:null,ambient_resume:!0};if(typeof i!="object"||Array.isArray(i))throw new Error("Invalid .comet/config.yaml: root must be a mapping");let n=i,a=Ap(n.ambient_resume),o=n.hook===void 0?void 0:kp(n.hook),s=Sp(n.memory),c=Rp(n.knowledge),l=n.native===void 0?void 0:Np(n.native,{allowMissingArtifactRoot:e.allowMissingNativeFields}),f=n.classic===void 0?void 0:bp(n.classic),u=_p(n,o,s,c,l,f,a,{allowPartialProject:e.allowPartialProject??!1});return{value:n,config:u,ambient_resume:a,memory:s,knowledge:c,...o?{hook:o}:{},...l?{native:l}:{},...f?{classic:f}:{}}}function Ic(r){return{id:r.id,from_artifact_root:r.fromArtifactRoot,to_artifact_root:r.toArtifactRoot,stage:r.stage,...r.cleanup?{cleanup:{kind:r.cleanup.kind,state:r.cleanup.state,manifest_hash:r.cleanup.manifestHash}}:{}}}function jc(r){let e=r.knowledge??{...ia};return{schema:r.schema,default_workflow:r.default_workflow,workflows:r.workflows??[r.default_workflow],ambient_resume:r.ambient_resume,memory:r.memory??{...$t},knowledge:{provider:e.provider,...e.local&&e.local.include.length>0?{local:{include:[...e.local.include]}}:{},...e.remote?{remote:{endpoint:e.remote.endpoint,timeout_ms:e.remote.timeout_ms,...e.remote.token_env===void 0?{}:{token_env:e.remote.token_env},...e.remote.scope===void 0?{}:{scope:e.remote.scope}}}:{}},...r.hook?{hook:{allow_paths:[...r.hook.allow_paths]}}:{},...r.native?{native:{artifact_root:r.native.artifact_root,language:r.native.language,clarification_mode:r.native.clarification_mode,archive_confirmation:r.native.archive_confirmation,max_verify_failures:r.native.max_verify_failures,...r.native.finish?.pull_request?{finish:{pull_request:{provider:r.native.finish.pull_request.provider,command:[...r.native.finish.pull_request.command],timeout_ms:r.native.finish.pull_request.timeout_ms}}}:{},...r.native.pending_root_move?{pending_root_move:Ic(r.native.pending_root_move)}:{}}}:{},...r.classic?{classic:{artifact_layout:r.classic.artifact_layout,language:r.classic.language,context_compression:r.classic.context_compression,review_mode:r.classic.review_mode,auto_transition:r.classic.auto_transition}}:{}}}function M(r){return r&&typeof r=="object"&&!Array.isArray(r)?r:{}}function Bt(r,e){let t=jc(e),i=et((0,Ot.stringify)(t)).config;if(!i)throw new Error("Unsupported Comet project schema");let n={...r,schema:i.schema,default_workflow:i.default_workflow,workflows:i.workflows,ambient_resume:i.ambient_resume};if(i.hook&&(n.hook={...M(r.hook),allow_paths:[...i.hook.allow_paths]}),i.memory){let a=M(r.memory);n.memory={...a,learning:i.memory.learning,retrieval:i.memory.retrieval}}if(i.knowledge){let a=M(r.knowledge),o={...a,provider:i.knowledge.provider};if(i.knowledge.local&&i.knowledge.local.include.length>0?o.local={...M(a.local),include:[...i.knowledge.local.include]}:delete o.local,i.knowledge.remote){let c={...M(a.remote),endpoint:i.knowledge.remote.endpoint,timeout_ms:i.knowledge.remote.timeout_ms,...i.knowledge.remote.token_env===void 0?{}:{token_env:i.knowledge.remote.token_env},...i.knowledge.remote.scope===void 0?{}:{scope:i.knowledge.remote.scope}};i.knowledge.remote.token_env===void 0&&delete c.token_env,i.knowledge.remote.scope===void 0&&delete c.scope,o.remote=c}else delete o.remote;n.knowledge=o}if(i.native){let a=M(r.native),o={...a,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};if(i.native.finish?.pull_request){let s=M(a.finish);o.finish={...s,pull_request:{...M(s.pull_request),provider:i.native.finish.pull_request.provider,command:[...i.native.finish.pull_request.command],timeout_ms:i.native.finish.pull_request.timeout_ms}}}else{let s={...M(a.finish)};delete s.pull_request,Object.keys(s).length>0?o.finish=s:delete o.finish}if(delete o.snapshot,i.native.pending_root_move){let s=M(a.pending_root_move),c=Ic(i.native.pending_root_move),l=M(s.cleanup),f=M(c.cleanup);o.pending_root_move={...s,...c,...c.cleanup?{cleanup:{...l,...f}}:{}}}else delete o.pending_root_move;n.native=o}return i.classic&&(n.classic={...M(r.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}),n}function ii(r="docs",e="en"){return{schema:"comet.project.v1",default_workflow:"native",ambient_resume:!0,memory:{...$t},knowledge:{...ia},native:{artifact_root:He(r),language:e,clarification_mode:"batch",archive_confirmation:"automatic",max_verify_failures:ra,snapshot:{...V,include:[...V.include],exclude:[...V.exclude]}}}}import{createHash as Ip}from"crypto";import{promises as oi}from"fs";import Se from"path";import{constants as ni,promises as De}from"fs";function be(r){return r!==0&&r!==0n&&r!=="0"}function ke(r,e){return be(r.dev)&&be(e.dev)&&be(r.ino)&&be(e.ino)}function j(r,e){let t=be(r.dev)&&be(e.dev);if(t&&r.dev!==e.dev)return!1;let i=be(r.ino)&&be(e.ino);return i&&r.ino!==e.ino?!1:t&&i?!0:r.birthtime===e.birthtime}var Q=class extends Error{reason;constructor(e,t,i){super(t,i),this.name="RaceSafeReadError",this.reason=e}};function oa(r){return"birthtimeNs"in r&&typeof r.birthtimeNs=="bigint"?r.birthtimeNs:r.birthtimeMs}function $c(r){return"ctimeNs"in r&&typeof r.ctimeNs=="bigint"?r.ctimeNs:r.ctimeMs}function Lt(r){return{dev:r.dev,ino:r.ino,birthtime:oa(r)}}function ai(r,e){let t=Lt(r),i=Lt(e);return ke(t,i)?j(t,i):j(t,i)&&oa(r)===oa(e)&&$c(r)===$c(e)&&r.size===e.size}async function Mt(r,e,t={}){if(!Number.isSafeInteger(e)||e<1)throw new Error("race-safe read byte limit must be a positive integer");let i=t.label??"file",n=t.bigint===!0,a=await De.lstat(r,{bigint:n});if(!a.isFile()||a.isSymbolicLink())throw new Q("not-regular-file",`${i} must be a regular file`);if(BigInt(a.size)>BigInt(e))throw new Q("too-large",`${i} exceeds ${e} bytes`);let o=await De.realpath(r);await t.verify?.("pre-open",{realPath:o,identity:Lt(a)});let s=process.platform==="win32"?ni.O_RDONLY:ni.O_RDONLY|ni.O_NOFOLLOW|ni.O_NONBLOCK,c;try{c=await De.open(r,s)}catch(l){throw l.code==="ELOOP"?new Q("not-regular-file",`${i} must be a regular file`,{cause:l}):l}try{let[l,f,u]=await Promise.all([c.stat({bigint:n}),De.lstat(r,{bigint:n}),De.realpath(r)]);if(!l.isFile()||!f.isFile()||f.isSymbolicLink()||u!==o||!ai(a,l)||!ai(a,f))throw new Q("changed",`${i} changed while opening`);await t.verify?.("post-open",{realPath:u,identity:Lt(l)}),await t.hooks?.afterOpen?.();let d=[],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 Q("too-large",`${i} exceeds ${e} bytes`);d.push(Buffer.from(g.subarray(0,b)))}await t.hooks?.beforeFinalCheck?.();let[h,p,w]=await Promise.all([c.stat({bigint:n}),De.lstat(r,{bigint:n}),De.realpath(r)]);if(!p.isFile()||p.isSymbolicLink()||w!==o||!ai(a,h)||!ai(a,p))throw new Q("changed",`${i} changed while reading`);return await t.verify?.("post-read",{realPath:w,identity:Lt(h)}),{bytes:Buffer.concat(d,m),stat:h,realPath:w}}finally{await c.close()}}function Tp(r){let e=r?.code;return e==="ENOENT"||e==="ENOTDIR"}function sa(r,e){let t=Se.relative(r,e);return t===""||!Se.isAbsolute(t)&&t!==".."&&!t.startsWith(`..${Se.sep}`)}async function Oc(r,e){let t=Se.resolve(r),i=await oi.lstat(t);if(!i.isDirectory()||i.isSymbolicLink())throw new Error(`${e} project root must be a real directory`);return oi.realpath(t)}async function Hc(r,e,t,i){let n=r;for(let a=0;a<t.length;a++){n=Se.join(n,t[a]);let o;try{o=await oi.lstat(n)}catch(f){if(Tp(f))return{exists:!1,kind:"missing"};throw f}let s=Se.relative(r,n).replaceAll("\\","/");if(o.isSymbolicLink())throw new Error(`${i.label} crosses a symbolic link or junction at ${s}`);let c=a===t.length-1;if(!c&&!o.isDirectory())throw new Error(`${i.label} ancestor ${s} must be a real directory`);if(c&&(i.expected==="file"&&!o.isFile()||i.expected==="directory"&&!o.isDirectory()||i.expected==="any"&&!o.isFile()&&!o.isDirectory()))throw new Error(`${i.label} must be a real ${i.expected}`);let l=await oi.realpath(n);if(!sa(e,l))throw new Error(`${i.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 ne(r,e,t){let i=ri(e,t.label),n=Se.resolve(r),a=await Oc(n,t.label),o=i.split("/"),s=Se.resolve(n,...o);if(!sa(n,s))throw new Error(`${t.label} must stay inside the project root`);let c=await Hc(n,a,o,t);return{projectRoot:n,target:s,relative:i,exists:c.exists,kind:c.kind}}async function Z(r,e,t,i){let n=await ne(r,e,{label:i.label,expected:"file"});if(!n.exists){let o=new Error(`${i.label} does not exist`);throw o.code="ENOENT",o}let a=await Oc(n.projectRoot,i.label);return Mt(n.target,t,{...i,verify:async(o,s)=>{if(!sa(a,s.realPath))throw new Error(`${i.label} resolves outside the project root`);await Hc(n.projectRoot,a,n.relative.split("/"),{label:i.label,expected:"file"})}})}var Vt=".comet/config.yaml";function ca(r,e){return r.exists===e.exists&&r.sha256===e.sha256}function jp(r){let e=r?.code;return e==="ENOENT"||e==="ENOTDIR"}async function si(r,e={}){return(await Ft(r,e)).document}async function Dc(r){try{return(await Z(r,Vt,Ht,{label:Vt})).bytes}catch(e){if(jp(e))return null;throw e}}function Bc(r){return r?{exists:!0,sha256:Ip("sha256").update(r).digest("hex")}:{exists:!1,sha256:null}}async function ci(r){return Bc(await Dc(r))}async function Ft(r,e={}){let t=await Dc(r);return{document:t?et(t.toString("utf8"),e):null,identity:Bc(t)}}async function la(r){return(await si(r))?.config??null}import{randomUUID as $p}from"crypto";import{constants as Op,promises as D}from"fs";import G from"path";async function fa(r,e){try{return await D.link(r,e),{linked:!0}}catch(t){let i=t.code;if(i!=="ENOTSUP"&&i!=="EOPNOTSUPP")throw t}return await D.copyFile(r,e,Op.COPYFILE_EXCL),{linked:!1}}function ua(r,e){let t=G.relative(r,e);return t===""||!G.isAbsolute(t)&&t!==".."&&!t.startsWith(`..${G.sep}`)}function li(r){return{dev:r.dev,ino:r.ino,birthtime:r.birthtimeMs}}function Hp(r,e){return j(r,li(e))}function da(r,e){return j(li(r),li(e))}function Dp(r,e){return da(r,e)&&r.birthtimeMs===e.birthtimeMs&&r.ctimeMs===e.ctimeMs&&r.mtimeMs===e.mtimeMs&&r.size===e.size}async function Lc(r){let e=await D.lstat(r);if(!e.isDirectory()||e.isSymbolicLink())throw new Error(`Contained atomic write parent must be a real directory: ${r}`);return{path:r,realPath:await D.realpath(r),...li(e)}}async function qt(r){for(let e of r){let t=await D.lstat(e.path);if(!t.isDirectory()||t.isSymbolicLink()||!Hp(e,t)||await D.realpath(e.path)!==e.realPath)throw new Error(`Contained atomic write parent changed before commit: ${e.path}`)}}async function Bp(r,e){let t=G.resolve(r),i=G.resolve(e);if(!ua(t,i))throw new Error(`Contained atomic write parent is outside its managed root: ${e}`);let n=[await Lc(t)],a=G.relative(t,i).split(G.sep).filter(Boolean),o=t;for(let s of a){await qt(n),o=G.join(o,s);try{await D.mkdir(o)}catch(l){if(l.code!=="EEXIST")throw l}let c=await Lc(o);if(!ua(n[0].realPath,c.realPath))throw new Error(`Contained atomic write parent resolves outside its managed root: ${o}`);n.push(c)}return await qt(n),n}async function Lp(r){let e;try{e=await D.open(r,"r"),await e.sync()}catch(t){let i=t.code;if(!["EACCES","EBADF","EINVAL","EISDIR","ENOTSUP","EPERM"].includes(i??""))throw t}finally{await e?.close()}}async function Mp(r,e,t){let i=G.dirname(r),n=await Bp(t.containedRoot,i),a=G.join(i,`.${G.basename(r)}.${$p()}.tmp`),o,s,c;try{await t.beforeTemporaryOpen?.(),o=await D.open(a,"wx"),s=await o.stat();let[l,f]=await Promise.all([D.lstat(a),D.realpath(a)]);if(await qt(n),!l.isFile()||l.isSymbolicLink()||!da(s,l)||!ua(n[0].realPath,f))throw new Error("Contained 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(),c=await o.stat(),!da(s,c))throw new Error("Contained atomic write temporary file changed while writing");await o.close(),o=void 0,await t.beforeCommit?.(),await qt(n);let u=await D.lstat(a);if(!u.isFile()||u.isSymbolicLink()||!c||!Dp(u,c))throw new Error("Contained atomic write temporary file changed before commit");t.exclusive?(await fa(a,r),await D.unlink(a)):await D.rename(a,r),await Lp(i)}catch(l){await o?.close();try{await qt(n),await D.rm(a,{force:!0})}catch{}throw l}}async function Be(r,e,t){await Mp(r,e,t)}var Tw=16*1024;async function ha(r,e){if(!e)return;let t=await ci(r);if(!ca(t,e))throw new Error("Project config changed before commit; rerun the operation")}import{randomUUID as qp}from"crypto";import{promises as O}from"fs";import U from"path";function pa(r,e){let t=U.relative(r,e);return t===""||!U.isAbsolute(t)&&t!==".."&&!t.startsWith(`..${U.sep}`)}function Wp(r,e){return j({...r,birthtime:r.birthtimeMs},{...e,birthtime:e.birthtimeMs})}function ma(r,e){return j({dev:r.dev,ino:r.ino,birthtime:r.birthtimeMs},{dev:e.dev,ino:e.ino,birthtime:e.birthtimeMs})}function zp(r,e){return ma(r,e)&&r.birthtimeMs===e.birthtimeMs&&r.ctimeMs===e.ctimeMs&&r.mtimeMs===e.mtimeMs&&r.size===e.size}async function Mc(r){let e=await O.lstat(r);if(!e.isDirectory()||e.isSymbolicLink())throw new Error(`Native atomic write parent must be a real directory: ${r}`);return{path:r,realPath:await O.realpath(r),dev:e.dev,ino:e.ino,birthtimeMs:e.birthtimeMs}}async function Wt(r){for(let e of r){let t=await O.lstat(e.path);if(!t.isDirectory()||t.isSymbolicLink()||!Wp(e,t)||await O.realpath(e.path)!==e.realPath)throw new Error(`Native atomic write parent changed before commit: ${e.path}`)}}async function Jp(r,e){let t=U.resolve(r),i=U.resolve(e);if(!pa(t,i))throw new Error(`Native atomic write parent is outside its managed root: ${e}`);let n=[await Mc(t)],a=U.relative(t,i).split(U.sep).filter(Boolean),o=t;for(let s of a){await Wt(n),o=U.join(o,s);try{await O.mkdir(o)}catch(l){if(l.code!=="EEXIST")throw l}let c=await Mc(o);if(!pa(n[0].realPath,c.realPath))throw new Error(`Native atomic write parent resolves outside its managed root: ${o}`);n.push(c)}return await Wt(n),n}async function Gp(r){let e;try{e=await O.open(r,"r"),await e.sync()}catch(t){let i=t.code;if(!["EACCES","EBADF","EINVAL","EISDIR","ENOTSUP","EPERM"].includes(i??""))throw t}finally{await e?.close()}}async function Up(r,e,t={}){let i=U.dirname(r),n=t.containedRoot?await Jp(t.containedRoot,i):null;n||await O.mkdir(i,{recursive:!0});let a=U.join(i,`.${U.basename(r)}.${qp()}.tmp`),o,s,c;try{if(await t.beforeTemporaryOpen?.(),o=await O.open(a,"wx"),s=await o.stat(),n){let[l,f]=await Promise.all([O.lstat(a),O.realpath(a)]);if(await Wt(n),!l.isFile()||l.isSymbolicLink()||!ma(s,l)||!pa(n[0].realPath,f))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(),c=await o.stat(),!ma(s,c))throw new Error("Native atomic write temporary file changed while writing");if(await o.close(),o=void 0,await t.beforeCommit?.(),n){await Wt(n);let l=await O.lstat(a);if(!l.isFile()||l.isSymbolicLink()||!c||!zp(l,c))throw new Error("Native atomic write temporary file changed before commit")}t.exclusive?(await O.link(a,r),await O.unlink(a)):await O.rename(a,r),await Gp(i)}catch(l){if(await o?.close(),!n)await O.rm(a,{force:!0});else try{await Wt(n),await O.rm(a,{force:!0})}catch{}throw l}}async function ae(r,e,t={}){await Up(r,e,t)}import{existsSync as Uw,promises as oe}from"fs";import R from"path";import Kp from"os";var ui=".comet/config.yaml";async function va(r){try{return await oe.lstat(r),!0}catch(e){if(e.code==="ENOENT")return!1;throw e}}async function Yp(r){try{let e=await oe.readFile(r,"utf8");return/^schema:\s*comet\.project\.v1\s*$/mu.test(e)}catch(e){if(e.code==="ENOENT")return!1;throw e}}function zt(r,e){let t=R.relative(r,e);return t===""||!R.isAbsolute(t)&&t!==".."&&!t.startsWith(`..${R.sep}`)}async function tt(r){let e=[],t=r;for(;!await va(t);){let n=R.dirname(t);if(n===t)break;e.push(R.basename(t)),t=n}let i=await oe.realpath(t);return R.resolve(i,...e.reverse())}async function ga(r){try{return(await oe.lstat(r)).isSymbolicLink()}catch(e){if(e.code==="ENOENT")return!1;throw e}}async function wa(r){let e=R.resolve(r);try{(await oe.stat(e)).isDirectory()||(e=R.dirname(e))}catch(n){if(n.code!=="ENOENT")throw n}let t=e,i=R.resolve(Kp.homedir());for(;;){if(!(e===i&&t!==i)){let o=R.join(e,...ui.split("/")),s=e===t||await Yp(o);if(await va(o)&&s)return e}if(await va(R.join(e,".git")))return e;let a=R.dirname(e);if(a===e)return t;e=a}}function Jt(r){return He(r)}async function Xp(r,e){let t=Jt(e),i=R.resolve(r,...t.split("/")),n=await oe.realpath(r),a=await tt(i);if(!zt(n,a))throw new Error("native.artifact_root resolves outside the project root");return i}async function Le(r,e){let t=Jt(e),i=await Xp(r,t),n=R.join(i,"comet");if(await ga(n))throw new Error("The configured Native comet root must not be a symbolic link");let[a,o]=await Promise.all([tt(i),tt(n)]);if(!zt(a,o))throw new Error("The configured Native comet root resolves outside its artifact root");let s=R.resolve(r),c=R.join(s,".comet","runtime","native");if(await ga(c))throw new Error("The Native Runtime root must not be a symbolic link");let[l,f]=await Promise.all([oe.realpath(s),tt(c)]);if(!zt(l,f))throw new Error("The Native Runtime root resolves outside the project root");return{projectRoot:s,configFile:R.join(r,...ui.split("/")),artifactRoot:i,artifactRootRef:t,nativeRoot:n,specsDir:R.join(n,"specs"),changesDir:R.join(n,"changes"),archiveDir:R.join(n,"archive"),runtimeDir:c,changesRuntimeDir:R.join(c,"changes"),locksDir:R.join(c,"locks"),transactionsDir:R.join(c,"transactions")}}async function Vc(r){await Promise.all([r.specsDir,r.changesDir,r.archiveDir].map(async e=>{await H(r.nativeRoot,e),await oe.mkdir(e,{recursive:!0})})),await Promise.all([r.changesRuntimeDir,r.locksDir,r.transactionsDir].map(async e=>{await H(r.projectRoot,e),await oe.mkdir(e,{recursive:!0})}))}async function H(r,e){let t=R.resolve(r),i=R.resolve(e);if(!zt(t,i))throw new Error(`Path is outside the Native root: ${e}`);if(await ga(t))throw new Error(`Native root must not be a symbolic link: ${r}`);let[n,a]=await Promise.all([tt(t),tt(i)]);if(!zt(n,a))throw new Error(`Path resolves outside the Native root: ${e}`);return i}var Fc=Rc;function qc(r="docs",e="en"){return ii(r,e)}async function ee(r){let e=(await si(r))?.config??null;return e?.native?e:null}async function Gt(r,e,t={}){let i=await Ft(r,{allowPartialProject:!0}),n=Bt(i.document?.value??{},e),a=Qp.join(r,...ui.split("/"));await ae(a,Dt(n,e.native.language==="zh-CN"?"zh-CN":"en"),{containedRoot:r,beforeCommit:async()=>{await t.beforeCommit?.(),await ha(r,i.identity)}})}import{promises as Zp}from"node:fs";import em from"node:path";var Ut=".gitignore",Wc=4*1024*1024,zc="# >>> Comet managed project state >>>",Jc="# <<< Comet managed project state <<<";function tm(r){return r.includes(`\r
166
+ # 可选值:true | false`}};function Oc(t,e){return tt[e][t]}function _p(t,e,r,i){let n=/^(\s*)([a-z_]+):/u.exec(t);if(!n)return null;let a=n[1].length,o=n[2];if(a===0&&o in tt.en)return o;if(a===2&&e){let s=`${e}.${o}`;if(s in tt.en)return s}if(a===4&&e==="knowledge"&&i==="remote"){let s=`knowledge.remote.${o}`;if(s in tt.en)return s}if(a===4&&e==="knowledge"&&i==="local"){let s=`knowledge.local.${o}`;if(s in tt.en)return s}if(a===2&&e===null&&o==="hook")return"hook";if(a===2&&e==="hook"&&o==="allow_paths")return"hook.allow_paths";if(a===4&&e==="native"&&r==="snapshot"){let s=`native.snapshot.${o}`;if(s in tt.en)return s}return null}function Vt(t,e){let r=[],i=null,n=null,a=null;for(let o of(0,Bt.stringify)(t).trimEnd().split(`
167
+ `)){let s=_p(o,i,n,a);if(s){let c=o.match(/^\s*/u)?.[0]??"";for(let l of Oc(s,e).split(`
168
+ `))r.push(`${c}${l}`)}r.push(o),/^[a-z_]+:/u.test(o)?(o.startsWith("native:")?i="native":o.startsWith("classic:")?i="classic":o.startsWith("hook:")?i="hook":o.startsWith("memory:")?i="memory":o.startsWith("knowledge:")?i="knowledge":i=null,n=null,a=null):/^ {2}[a-z_]+:/u.test(o)&&(i==="native"&&(n=o.startsWith(" snapshot:")?"snapshot":null),i==="knowledge"&&(a=o.startsWith(" local:")?"local":o.startsWith(" remote:")?"remote":null))}return r.push(""),r.join(`
169
+ `)}function Ip(t,e){if(typeof t!="string")throw new Error(`${e} must be a string`);let r=t.trim();if(r.length===0||ke.posix.isAbsolute(r)||ke.win32.isAbsolute(r)||/^(?:~|[\\/])/u.test(r))throw new Error(`${e} must be a project-relative path`);if(r===".")return[];let i=r.replaceAll("\\","/").split("/");if(i.some(n=>n===".."))throw new Error(`${e} must stay inside the project root`);if(i.some(n=>n===""||n==="."))throw new Error(`${e} must not contain empty or dot path segments`);return i}function Le(t){let e=Ip(t,"native.artifact_root");return e.length===0?".":e.join("/")}function Hc(t,e="docs"){let r=t??e;if(r!=="legacy"&&r!=="docs")throw new Error("classic.artifact_layout must be legacy or docs");return r}function ni(t,e,r=!1){if(typeof t!="string")throw new Error(`${e} must be a string`);let i=t.trim().replaceAll("\\","/");if(i.length===0||ke.posix.isAbsolute(i)||ke.win32.isAbsolute(i)||/^(?:~|[\\/])/u.test(i))throw new Error(`${e} must be relative to its declared path base`);let n=i.split("/");if(n.some(a=>a===".."))throw new Error(`${e} must stay inside its declared path base`);if(n.some(a=>a===""||a==="."))throw new Error(`${e} must not contain empty or dot path segments`);if(!r&&/[*?]/u.test(i))throw new Error(`${e} cannot contain wildcards`);return n.join("/")}function ne(t,e){if(!t||typeof t!="object"||Array.isArray(t))throw new Error(`${e} must be a mapping`);return t}function Dc(t,e,r){let i=t??e;if(i!=="en"&&i!=="zh-CN")throw new Error(`${r} must be en or zh-CN`);return i}function ua(t,e){if(typeof t!="string"||t.length===0||t.includes("\\")||t.includes("\0")||t.startsWith("/")||t.split("/").includes(".."))throw new Error(`${e} contains an unsafe pattern`);if(t.length>ri)throw new Error(`${e} exceeds ${ri} characters`);let r=0;for(let i=0;i<t.length;i+=1)t[i]==="?"?r+=1:t[i]==="*"&&(r+=1,t[i+1]==="*"&&(i+=1));if(r>ii)throw new Error(`${e} contains more than ${ii} wildcard tokens`);return t}function Tc(t,e,r){if(t===void 0)return[...r];if(!Array.isArray(t))throw new Error(`${e} contains an unsafe pattern`);return[...new Set(t.map(i=>ua(i,e)))].sort((i,n)=>i.localeCompare(n,"en"))}function sa(t,e,r){let i=t??e;if(!Number.isSafeInteger(i)||i<1)throw new Error(`${r} must be a positive integer`);return i}function Tp(t){if(t===void 0)return{...F,include:[...F.include],exclude:[...F.exclude]};let e=ne(t,"native.snapshot");return{include:Tc(e.include,"native.snapshot.include",F.include),exclude:Tc(e.exclude,"native.snapshot.exclude",F.exclude),max_files:sa(e.max_files,F.max_files,"native.snapshot.max_files"),max_total_bytes:sa(e.max_total_bytes,F.max_total_bytes,"native.snapshot.max_total_bytes"),max_duration_ms:sa(e.max_duration_ms,F.max_duration_ms,"native.snapshot.max_duration_ms")}}function jp(t){if(t===void 0)return;let e=ne(t,"native.pending_root_move"),r=e.id,i=e.from_artifact_root,n=e.to_artifact_root,a=e.stage;if(typeof r!="string"||!/^[a-f0-9-]{8,}$/u.test(r))throw new Error("native.pending_root_move.id is invalid");if(typeof i!="string"||typeof n!="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=ne(e.cleanup,"native.pending_root_move.cleanup"),c=s.kind,l=s.state,f=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 f!="string"||!/^[a-f0-9]{64}$/u.test(f))throw new Error("native.pending_root_move.cleanup.manifest_hash is invalid");o={kind:c,state:l,manifestHash:f}}return{id:r,fromArtifactRoot:Le(i),toArtifactRoot:Le(n),stage:a,...o?{cleanup:o}:{}}}function $p(t){if(t===void 0)return;let e=ne(t,"native.finish");if(e.pull_request===void 0)return{};let r=ne(e.pull_request,"native.finish.pull_request");if(r.provider!=="repository-command")throw new Error("native.finish.pull_request.provider must be repository-command");if(!Array.isArray(r.command)||r.command.length===0)throw new Error("native.finish.pull_request.command must be a non-empty array");if(r.command.length>64)throw new Error("native.finish.pull_request.command must contain at most 64 arguments");let i=r.command.map((a,o)=>{if(typeof a!="string"||a.trim().length===0||a.length>4096||/[\0\r\n]/u.test(a))throw new Error(`native.finish.pull_request.command[${o}] must be a non-empty single-line string of at most 4096 characters`);return a});if(ke.posix.isAbsolute(i[0])||ke.win32.isAbsolute(i[0]))throw new Error("native.finish.pull_request.command[0] must be a bare executable name or a project-relative path");let n=r.timeout_ms??Pp;if(!Number.isSafeInteger(n)||n<1||n>Ic)throw new Error(`native.finish.pull_request.timeout_ms must be an integer between 1 and ${Ic}`);return{pull_request:{provider:"repository-command",command:i,timeout_ms:n}}}function Op(t,e={}){let r=ne(t,"native"),i=r.artifact_root??(e.allowMissingArtifactRoot?"docs":void 0);if(typeof i!="string")throw new Error("native.artifact_root must be a string");let n=r.clarification_mode??"batch";if(n!=="sequential"&&n!=="batch")throw new Error("native.clarification_mode must be sequential or batch");let a=r.archive_confirmation??"automatic";if(a!=="automatic"&&a!=="required")throw new Error("native.archive_confirmation must be automatic or required");let o=r.max_verify_failures??ca;if(!Number.isSafeInteger(o)||o<1)throw new Error("native.max_verify_failures must be a positive integer");let s=jp(r.pending_root_move),c=$p(r.finish);return{artifact_root:Le(i),language:Dc(r.language,"en","native.language"),clarification_mode:n,archive_confirmation:a,max_verify_failures:o,snapshot:Tp(r.snapshot),...c?{finish:c}:{},...s?{pending_root_move:s}:{}}}function Hp(t){let e=ne(t,"classic"),r=e.context_compression??"off";if(r!=="off"&&r!=="beta")throw new Error("classic.context_compression must be off or beta");let i=e.review_mode??"standard";if(i!=="off"&&i!=="standard"&&i!=="thorough")throw new Error("classic.review_mode must be off, standard, or thorough");let n=e.auto_transition??!0;if(typeof n!="boolean")throw new Error("classic.auto_transition must be true or false");return{artifact_layout:Hc(e.artifact_layout),language:Dc(e.language,"zh-CN","classic.language"),context_compression:r,review_mode:i,auto_transition:n}}function Dp(t){let r=ne(t,"hook").allow_paths??[];if(!Array.isArray(r))throw new Error("hook.allow_paths must be an array");return{allow_paths:[...new Set(r.map((i,n)=>ni(i,`hook.allow_paths[${n}]`)))]}}function Lp(t){if(t===void 0)return{...Lt};let e=ne(t,"memory"),r=e.learning??Lt.learning,i=e.retrieval??Lt.retrieval;if(typeof r!="boolean")throw new Error("memory.learning must be true or false");if(typeof i!="boolean")throw new Error("memory.retrieval must be true or false");return{learning:r,retrieval:i}}function da(t,e){if(t===null||typeof t!="object"||Array.isArray(t))throw new Error(`${e} must be a mapping`);return t}function Bp(t,e){if(typeof t!="string")throw new Error(`${e} must be a string`);let r=t.trim();if(r.length===0||r.includes("\\")||r.includes("\0")||ke.posix.isAbsolute(r)||ke.win32.isAbsolute(r)||r.startsWith("~")||r.split("/").some(n=>n===""||n==="."||n===".."))throw new Error(`${e} must be a safe project-relative glob`);if(!r.toLowerCase().endsWith(".md"))throw new Error(`${e} must target a Markdown file ending in .md`);if(r.length>Ac)throw new Error(`${e} exceeds ${Ac} characters`);let i=0;for(let n=0;n<r.length;n+=1)r[n]==="?"?i+=1:r[n]==="*"&&(i+=1,r[n+1]==="*"&&(n+=1));if(i>_c)throw new Error(`${e} contains more than ${_c} wildcard tokens`);return r}function Mp(t){let r=da(t,"knowledge.local").include??[];if(!Array.isArray(r))throw new Error("knowledge.local.include must be an array");return{include:[...new Set(r.map((i,n)=>Bp(i,`knowledge.local.include[${n}]`)))]}}function Vp(t){if(typeof t!="string"||t.trim().length===0)throw new Error("knowledge.remote.endpoint must be a non-empty URL");let e;try{e=new URL(t)}catch{throw new Error("knowledge.remote.endpoint must be a valid URL")}let r=e.hostname.toLowerCase().replace(/^\[|\]$/gu,""),i=r==="localhost"||r==="127.0.0.1"||r==="::1";if(e.protocol!=="https:"&&!(e.protocol==="http:"&&i))throw new Error("knowledge.remote.endpoint must use HTTPS (HTTP is allowed for loopback)");return e.toString()}function Fp(t){let e=da(t,"knowledge.remote"),r=Vp(e.endpoint),i=e.token_env;if(i!==void 0&&(typeof i!="string"||!/^[A-Za-z_][A-Za-z0-9_]*$/u.test(i)))throw new Error("knowledge.remote.token_env must be an environment variable name");let n=e.scope;if(n!==void 0&&(typeof n!="string"||n.length>512))throw new Error("knowledge.remote.scope must be a string of at most 512 characters");let a=e.timeout_ms??5e3;if(typeof a!="number"||!Number.isSafeInteger(a)||a<100||a>3e4)throw new Error("knowledge.remote.timeout_ms must be an integer between 100 and 30000");return{endpoint:r,...i===void 0?{}:{token_env:i},...n===void 0?{}:{scope:n},timeout_ms:a}}function qp(t){if(t===void 0)return{...la};let e=da(t,"knowledge"),r=e.provider??"local";if(r!=="local"&&r!=="remote")throw new Error("knowledge.provider must be local or remote");let i=e.local===void 0?void 0:Mp(e.local);if(r==="local")return{provider:r,...i?{local:i}:{}};let n=e.remote===void 0?void 0:Fp(e.remote);if(n===void 0)throw new Error("knowledge.remote must be configured when knowledge.provider is remote");return{provider:r,...i?{local:i}:{},remote:n}}function Wp(t){let e=t??!0;if(typeof e!="boolean")throw new Error("ambient_resume must be true or false");return e}function zp(t,e,r,i,n,a,o,s){let c=t.schema!==void 0;if(!(c||t.default_workflow!==void 0||t.workflows!==void 0||!s.allowPartialProject&&t.native!==void 0)||s.allowPartialProject&&!c)return null;if(t.schema!=="comet.project.v1")throw new Error("Unsupported Comet project schema");if(t.default_workflow!=="native"&&t.default_workflow!=="classic")throw new Error("default_workflow must be native or classic");let f=t.workflows??[t.default_workflow];if(!Array.isArray(f)||f.length===0||f.some(d=>d!=="native"&&d!=="classic"))throw new Error("workflows must contain native and/or classic");let u=[...new Set(f)];if(!u.includes(t.default_workflow))throw new Error("workflows must include default_workflow");if(u.includes("native")&&!n)throw new Error("native must be a mapping");return{schema:"comet.project.v1",default_workflow:t.default_workflow,workflows:u,ambient_resume:o,...e?{hook:e}:{},memory:r,knowledge:i,...n?{native:n}:{},...a?{classic:a}:{}}}function rt(t,e={}){let r=(0,Bt.parseDocument)(t,{uniqueKeys:!0});if(r.errors.length>0)throw new Error(`Invalid .comet/config.yaml: ${r.errors[0].message}`);let i=r.toJS();if(i==null)return{value:{},config:null,ambient_resume:!0};if(typeof i!="object"||Array.isArray(i))throw new Error("Invalid .comet/config.yaml: root must be a mapping");let n=i,a=Wp(n.ambient_resume),o=n.hook===void 0?void 0:Dp(n.hook),s=Lp(n.memory),c=qp(n.knowledge),l=n.native===void 0?void 0:Op(n.native,{allowMissingArtifactRoot:e.allowMissingNativeFields}),f=n.classic===void 0?void 0:Hp(n.classic),u=zp(n,o,s,c,l,f,a,{allowPartialProject:e.allowPartialProject??!1});return{value:n,config:u,ambient_resume:a,memory:s,knowledge:c,...o?{hook:o}:{},...l?{native:l}:{},...f?{classic:f}:{}}}function Lc(t){return{id:t.id,from_artifact_root:t.fromArtifactRoot,to_artifact_root:t.toArtifactRoot,stage:t.stage,...t.cleanup?{cleanup:{kind:t.cleanup.kind,state:t.cleanup.state,manifest_hash:t.cleanup.manifestHash}}:{}}}function Bc(t){let e=t.knowledge??{...la};return{schema:t.schema,default_workflow:t.default_workflow,workflows:t.workflows??[t.default_workflow],ambient_resume:t.ambient_resume,memory:t.memory??{...Lt},knowledge:{provider:e.provider,...e.local&&e.local.include.length>0?{local:{include:[...e.local.include]}}:{},...e.remote?{remote:{endpoint:e.remote.endpoint,timeout_ms:e.remote.timeout_ms,...e.remote.token_env===void 0?{}:{token_env:e.remote.token_env},...e.remote.scope===void 0?{}:{scope:e.remote.scope}}}:{}},...t.hook?{hook:{allow_paths:[...t.hook.allow_paths]}}:{},...t.native?{native:{artifact_root:t.native.artifact_root,language:t.native.language,clarification_mode:t.native.clarification_mode,archive_confirmation:t.native.archive_confirmation,max_verify_failures:t.native.max_verify_failures,...t.native.finish?.pull_request?{finish:{pull_request:{provider:t.native.finish.pull_request.provider,command:[...t.native.finish.pull_request.command],timeout_ms:t.native.finish.pull_request.timeout_ms}}}:{},...t.native.pending_root_move?{pending_root_move:Lc(t.native.pending_root_move)}:{}}}:{},...t.classic?{classic:{artifact_layout:t.classic.artifact_layout,language:t.classic.language,context_compression:t.classic.context_compression,review_mode:t.classic.review_mode,auto_transition:t.classic.auto_transition}}:{}}}function V(t){return t&&typeof t=="object"&&!Array.isArray(t)?t:{}}function Ft(t,e){let r=Bc(e),i=rt((0,Bt.stringify)(r)).config;if(!i)throw new Error("Unsupported Comet project schema");let n={...t,schema:i.schema,default_workflow:i.default_workflow,workflows:i.workflows,ambient_resume:i.ambient_resume};if(i.hook&&(n.hook={...V(t.hook),allow_paths:[...i.hook.allow_paths]}),i.memory){let a=V(t.memory);n.memory={...a,learning:i.memory.learning,retrieval:i.memory.retrieval}}if(i.knowledge){let a=V(t.knowledge),o={...a,provider:i.knowledge.provider};if(i.knowledge.local&&i.knowledge.local.include.length>0?o.local={...V(a.local),include:[...i.knowledge.local.include]}:delete o.local,i.knowledge.remote){let c={...V(a.remote),endpoint:i.knowledge.remote.endpoint,timeout_ms:i.knowledge.remote.timeout_ms,...i.knowledge.remote.token_env===void 0?{}:{token_env:i.knowledge.remote.token_env},...i.knowledge.remote.scope===void 0?{}:{scope:i.knowledge.remote.scope}};i.knowledge.remote.token_env===void 0&&delete c.token_env,i.knowledge.remote.scope===void 0&&delete c.scope,o.remote=c}else delete o.remote;n.knowledge=o}if(i.native){let a=V(t.native),o={...a,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};if(i.native.finish?.pull_request){let s=V(a.finish);o.finish={...s,pull_request:{...V(s.pull_request),provider:i.native.finish.pull_request.provider,command:[...i.native.finish.pull_request.command],timeout_ms:i.native.finish.pull_request.timeout_ms}}}else{let s={...V(a.finish)};delete s.pull_request,Object.keys(s).length>0?o.finish=s:delete o.finish}if(delete o.snapshot,i.native.pending_root_move){let s=V(a.pending_root_move),c=Lc(i.native.pending_root_move),l=V(s.cleanup),f=V(c.cleanup);o.pending_root_move={...s,...c,...c.cleanup?{cleanup:{...l,...f}}:{}}}else delete o.pending_root_move;n.native=o}return i.classic&&(n.classic={...V(t.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}),n}function ai(t="docs",e="en"){return{schema:"comet.project.v1",default_workflow:"native",ambient_resume:!0,memory:{...Lt},knowledge:{...la},native:{artifact_root:Le(t),language:e,clarification_mode:"batch",archive_confirmation:"automatic",max_verify_failures:ca,snapshot:{...F,include:[...F.include],exclude:[...F.exclude]}}}}import{createHash as Gp}from"crypto";import{promises as ci}from"fs";import Ce from"path";import{constants as oi,promises as Be}from"fs";function Se(t){return t!==0&&t!==0n&&t!=="0"}function Ee(t,e){return Se(t.dev)&&Se(e.dev)&&Se(t.ino)&&Se(e.ino)}function $(t,e){let r=Se(t.dev)&&Se(e.dev);if(r&&t.dev!==e.dev)return!1;let i=Se(t.ino)&&Se(e.ino);return i&&t.ino!==e.ino?!1:r&&i?!0:t.birthtime===e.birthtime}var Z=class extends Error{reason;constructor(e,r,i){super(r,i),this.name="RaceSafeReadError",this.reason=e}};function fa(t){return"birthtimeNs"in t&&typeof t.birthtimeNs=="bigint"?t.birthtimeNs:t.birthtimeMs}function Mc(t){return"ctimeNs"in t&&typeof t.ctimeNs=="bigint"?t.ctimeNs:t.ctimeMs}function qt(t){return{dev:t.dev,ino:t.ino,birthtime:fa(t)}}function si(t,e){let r=qt(t),i=qt(e);return Ee(r,i)?$(r,i):$(r,i)&&fa(t)===fa(e)&&Mc(t)===Mc(e)&&t.size===e.size}async function Wt(t,e,r={}){if(!Number.isSafeInteger(e)||e<1)throw new Error("race-safe read byte limit must be a positive integer");let i=r.label??"file",n=r.bigint===!0,a=await Be.lstat(t,{bigint:n});if(!a.isFile()||a.isSymbolicLink())throw new Z("not-regular-file",`${i} must be a regular file`);if(BigInt(a.size)>BigInt(e))throw new Z("too-large",`${i} exceeds ${e} bytes`);let o=await Be.realpath(t);await r.verify?.("pre-open",{realPath:o,identity:qt(a)});let s=process.platform==="win32"?oi.O_RDONLY:oi.O_RDONLY|oi.O_NOFOLLOW|oi.O_NONBLOCK,c;try{c=await Be.open(t,s)}catch(l){throw l.code==="ELOOP"?new Z("not-regular-file",`${i} must be a regular file`,{cause:l}):l}try{let[l,f,u]=await Promise.all([c.stat({bigint:n}),Be.lstat(t,{bigint:n}),Be.realpath(t)]);if(!l.isFile()||!f.isFile()||f.isSymbolicLink()||u!==o||!si(a,l)||!si(a,f))throw new Z("changed",`${i} changed while opening`);await r.verify?.("post-open",{realPath:u,identity:qt(l)}),await r.hooks?.afterOpen?.();let d=[],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 Z("too-large",`${i} exceeds ${e} bytes`);d.push(Buffer.from(g.subarray(0,b)))}await r.hooks?.beforeFinalCheck?.();let[h,p,w]=await Promise.all([c.stat({bigint:n}),Be.lstat(t,{bigint:n}),Be.realpath(t)]);if(!p.isFile()||p.isSymbolicLink()||w!==o||!si(a,h)||!si(a,p))throw new Z("changed",`${i} changed while reading`);return await r.verify?.("post-read",{realPath:w,identity:qt(h)}),{bytes:Buffer.concat(d,m),stat:h,realPath:w}}finally{await c.close()}}function Jp(t){let e=t?.code;return e==="ENOENT"||e==="ENOTDIR"}function ha(t,e){let r=Ce.relative(t,e);return r===""||!Ce.isAbsolute(r)&&r!==".."&&!r.startsWith(`..${Ce.sep}`)}async function Vc(t,e){let r=Ce.resolve(t),i=await ci.lstat(r);if(!i.isDirectory()||i.isSymbolicLink())throw new Error(`${e} project root must be a real directory`);return ci.realpath(r)}async function Fc(t,e,r,i){let n=t;for(let a=0;a<r.length;a++){n=Ce.join(n,r[a]);let o;try{o=await ci.lstat(n)}catch(f){if(Jp(f))return{exists:!1,kind:"missing"};throw f}let s=Ce.relative(t,n).replaceAll("\\","/");if(o.isSymbolicLink())throw new Error(`${i.label} crosses a symbolic link or junction at ${s}`);let c=a===r.length-1;if(!c&&!o.isDirectory())throw new Error(`${i.label} ancestor ${s} must be a real directory`);if(c&&(i.expected==="file"&&!o.isFile()||i.expected==="directory"&&!o.isDirectory()||i.expected==="any"&&!o.isFile()&&!o.isDirectory()))throw new Error(`${i.label} must be a real ${i.expected}`);let l=await ci.realpath(n);if(!ha(e,l))throw new Error(`${i.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 ae(t,e,r){let i=ni(e,r.label),n=Ce.resolve(t),a=await Vc(n,r.label),o=i.split("/"),s=Ce.resolve(n,...o);if(!ha(n,s))throw new Error(`${r.label} must stay inside the project root`);let c=await Fc(n,a,o,r);return{projectRoot:n,target:s,relative:i,exists:c.exists,kind:c.kind}}async function ee(t,e,r,i){let n=await ae(t,e,{label:i.label,expected:"file"});if(!n.exists){let o=new Error(`${i.label} does not exist`);throw o.code="ENOENT",o}let a=await Vc(n.projectRoot,i.label);return Wt(n.target,r,{...i,verify:async(o,s)=>{if(!ha(a,s.realPath))throw new Error(`${i.label} resolves outside the project root`);await Fc(n.projectRoot,a,n.relative.split("/"),{label:i.label,expected:"file"})}})}var zt=".comet/config.yaml";function pa(t,e){return t.exists===e.exists&&t.sha256===e.sha256}function Up(t){let e=t?.code;return e==="ENOENT"||e==="ENOTDIR"}async function li(t,e={}){return(await Jt(t,e)).document}async function qc(t){try{return(await ee(t,zt,Mt,{label:zt})).bytes}catch(e){if(Up(e))return null;throw e}}function Wc(t){return t?{exists:!0,sha256:Gp("sha256").update(t).digest("hex")}:{exists:!1,sha256:null}}async function ui(t){return Wc(await qc(t))}async function Jt(t,e={}){let r=await qc(t);return{document:r?rt(r.toString("utf8"),e):null,identity:Wc(r)}}async function ma(t){return(await li(t))?.config??null}import{randomUUID as Kp}from"crypto";import{constants as Yp,promises as D}from"fs";import U from"path";async function va(t,e){try{return await D.link(t,e),{linked:!0}}catch(r){let i=r.code;if(i!=="ENOTSUP"&&i!=="EOPNOTSUPP")throw r}return await D.copyFile(t,e,Yp.COPYFILE_EXCL),{linked:!1}}function di(t,e){let r=U.relative(t,e);return r===""||!U.isAbsolute(r)&&r!==".."&&!r.startsWith(`..${U.sep}`)}function fi(t){return{dev:t.dev,ino:t.ino,birthtime:t.birthtimeMs}}function Xp(t,e){return $(t,fi(e))}function hi(t,e){return $(fi(t),fi(e))}function Qp(t,e){return hi(t,e)&&t.birthtimeMs===e.birthtimeMs&&t.ctimeMs===e.ctimeMs&&t.mtimeMs===e.mtimeMs&&t.size===e.size}async function zc(t){let e=await D.lstat(t);if(!e.isDirectory()||e.isSymbolicLink())throw new Error(`Contained atomic write parent must be a real directory: ${t}`);return{path:t,realPath:await D.realpath(t),...fi(e)}}async function it(t){for(let e of t){let r=await D.lstat(e.path);if(!r.isDirectory()||r.isSymbolicLink()||!Xp(e,r)||await D.realpath(e.path)!==e.realPath)throw new Error(`Contained atomic write parent changed before commit: ${e.path}`)}}async function Zp(t,e,r){let[i,n]=await Promise.all([D.lstat(t),D.realpath(t),it(r)]);if(!i.isFile()||i.isSymbolicLink()||!hi(i,e)||!di(r[0].realPath,n))throw new Error("Contained atomic write temporary file changed after close");return i}async function em(t,e){let r=U.resolve(t),i=U.resolve(e);if(!di(r,i))throw new Error(`Contained atomic write parent is outside its managed root: ${e}`);let n=[await zc(r)],a=U.relative(r,i).split(U.sep).filter(Boolean),o=r;for(let s of a){await it(n),o=U.join(o,s);try{await D.mkdir(o)}catch(l){if(l.code!=="EEXIST")throw l}let c=await zc(o);if(!di(n[0].realPath,c.realPath))throw new Error(`Contained atomic write parent resolves outside its managed root: ${o}`);n.push(c)}return await it(n),n}async function tm(t){let e;try{e=await D.open(t,"r"),await e.sync()}catch(r){let i=r.code;if(!["EACCES","EBADF","EINVAL","EISDIR","ENOTSUP","EPERM"].includes(i??""))throw r}finally{await e?.close()}}async function rm(t,e,r){let i=U.dirname(t),n=await em(r.containedRoot,i),a=U.join(i,`.${U.basename(t)}.${Kp()}.tmp`),o,s,c;try{await r.beforeTemporaryOpen?.(),o=await D.open(a,"wx"),s=await o.stat();let[l,f]=await Promise.all([D.lstat(a),D.realpath(a)]);if(await it(n),!l.isFile()||l.isSymbolicLink()||!hi(s,l)||!di(n[0].realPath,f))throw new Error("Contained 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(),c=await o.stat(),!hi(s,c))throw new Error("Contained atomic write temporary file changed while writing");if(await o.close(),o=void 0,await r.afterTemporaryClose?.(),!c)throw new Error("Contained atomic write temporary file was not written");c=await Zp(a,c,n),await r.beforeCommit?.(),await it(n);let u=await D.lstat(a);if(!u.isFile()||u.isSymbolicLink()||!c||!Qp(u,c))throw new Error("Contained atomic write temporary file changed before commit");r.exclusive?(await va(a,t),await D.unlink(a)):await D.rename(a,t),await tm(i)}catch(l){await o?.close();try{await it(n),await D.rm(a,{force:!0})}catch{}throw l}}async function Me(t,e,r){await rm(t,e,r)}var ay=16*1024;async function ga(t,e){if(!e)return;let r=await ui(t);if(!pa(r,e))throw new Error("Project config changed before commit; rerun the operation")}import{randomUUID as am}from"crypto";import{promises as O}from"fs";import K from"path";function pi(t,e){let r=K.relative(t,e);return r===""||!K.isAbsolute(r)&&r!==".."&&!r.startsWith(`..${K.sep}`)}function om(t,e){return $({...t,birthtime:t.birthtimeMs},{...e,birthtime:e.birthtimeMs})}function mi(t,e){return $({dev:t.dev,ino:t.ino,birthtime:t.birthtimeMs},{dev:e.dev,ino:e.ino,birthtime:e.birthtimeMs})}function sm(t,e){return mi(t,e)&&t.birthtimeMs===e.birthtimeMs&&t.ctimeMs===e.ctimeMs&&t.mtimeMs===e.mtimeMs&&t.size===e.size}async function Jc(t){let e=await O.lstat(t);if(!e.isDirectory()||e.isSymbolicLink())throw new Error(`Native atomic write parent must be a real directory: ${t}`);return{path:t,realPath:await O.realpath(t),dev:e.dev,ino:e.ino,birthtimeMs:e.birthtimeMs}}async function nt(t){for(let e of t){let r=await O.lstat(e.path);if(!r.isDirectory()||r.isSymbolicLink()||!om(e,r)||await O.realpath(e.path)!==e.realPath)throw new Error(`Native atomic write parent changed before commit: ${e.path}`)}}async function cm(t,e,r){let[i,n]=await Promise.all([O.lstat(t),O.realpath(t),r?nt(r):Promise.resolve()]);if(!i.isFile()||i.isSymbolicLink()||!mi(i,e)||r&&!pi(r[0].realPath,n))throw new Error("Native atomic write temporary file changed after close");return i}async function lm(t,e){let r=K.resolve(t),i=K.resolve(e);if(!pi(r,i))throw new Error(`Native atomic write parent is outside its managed root: ${e}`);let n=[await Jc(r)],a=K.relative(r,i).split(K.sep).filter(Boolean),o=r;for(let s of a){await nt(n),o=K.join(o,s);try{await O.mkdir(o)}catch(l){if(l.code!=="EEXIST")throw l}let c=await Jc(o);if(!pi(n[0].realPath,c.realPath))throw new Error(`Native atomic write parent resolves outside its managed root: ${o}`);n.push(c)}return await nt(n),n}async function um(t){let e;try{e=await O.open(t,"r"),await e.sync()}catch(r){let i=r.code;if(!["EACCES","EBADF","EINVAL","EISDIR","ENOTSUP","EPERM"].includes(i??""))throw r}finally{await e?.close()}}async function dm(t,e,r={}){let i=K.dirname(t),n=r.containedRoot?await lm(r.containedRoot,i):null;n||await O.mkdir(i,{recursive:!0});let a=K.join(i,`.${K.basename(t)}.${am()}.tmp`),o,s,c;try{if(await r.beforeTemporaryOpen?.(),o=await O.open(a,"wx"),s=await o.stat(),n){let[l,f]=await Promise.all([O.lstat(a),O.realpath(a)]);if(await nt(n),!l.isFile()||l.isSymbolicLink()||!mi(s,l)||!pi(n[0].realPath,f))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(),c=await o.stat(),!mi(s,c))throw new Error("Native atomic write temporary file changed while writing");if(await o.close(),o=void 0,await r.afterTemporaryClose?.(),!c)throw new Error("Native atomic write temporary file was not written");if(c=await cm(a,c,n),await r.beforeCommit?.(),n){await nt(n);let l=await O.lstat(a);if(!l.isFile()||l.isSymbolicLink()||!c||!sm(l,c))throw new Error("Native atomic write temporary file changed before commit")}r.exclusive?(await O.link(a,t),await O.unlink(a)):await O.rename(a,t),await um(i)}catch(l){if(await o?.close(),!n)await O.rm(a,{force:!0});else try{await nt(n),await O.rm(a,{force:!0})}catch{}throw l}}async function oe(t,e,r={}){await dm(t,e,r)}import{existsSync as ky,promises as se}from"fs";import A from"path";import fm from"os";var vi=".comet/config.yaml";async function wa(t){try{return await se.lstat(t),!0}catch(e){if(e.code==="ENOENT")return!1;throw e}}async function hm(t){try{let e=await se.readFile(t,"utf8");return/^schema:\s*comet\.project\.v1\s*$/mu.test(e)}catch(e){if(e.code==="ENOENT")return!1;throw e}}function Gt(t,e){let r=A.relative(t,e);return r===""||!A.isAbsolute(r)&&r!==".."&&!r.startsWith(`..${A.sep}`)}async function at(t){let e=[],r=t;for(;!await wa(r);){let n=A.dirname(r);if(n===r)break;e.push(A.basename(r)),r=n}let i=await se.realpath(r);return A.resolve(i,...e.reverse())}async function ya(t){try{return(await se.lstat(t)).isSymbolicLink()}catch(e){if(e.code==="ENOENT")return!1;throw e}}async function Na(t){let e=A.resolve(t);try{(await se.stat(e)).isDirectory()||(e=A.dirname(e))}catch(n){if(n.code!=="ENOENT")throw n}let r=e,i=A.resolve(fm.homedir());for(;;){if(!(e===i&&r!==i)){let o=A.join(e,...vi.split("/")),s=e===r||await hm(o);if(await wa(o)&&s)return e}if(await wa(A.join(e,".git")))return e;let a=A.dirname(e);if(a===e)return r;e=a}}function Ut(t){return Le(t)}async function pm(t,e){let r=Ut(e),i=A.resolve(t,...r.split("/")),n=await se.realpath(t),a=await at(i);if(!Gt(n,a))throw new Error("native.artifact_root resolves outside the project root");return i}async function Ve(t,e){let r=Ut(e),i=await pm(t,r),n=A.join(i,"comet");if(await ya(n))throw new Error("The configured Native comet root must not be a symbolic link");let[a,o]=await Promise.all([at(i),at(n)]);if(!Gt(a,o))throw new Error("The configured Native comet root resolves outside its artifact root");let s=A.resolve(t),c=A.join(s,".comet","runtime","native");if(await ya(c))throw new Error("The Native Runtime root must not be a symbolic link");let[l,f]=await Promise.all([se.realpath(s),at(c)]);if(!Gt(l,f))throw new Error("The Native Runtime root resolves outside the project root");return{projectRoot:s,configFile:A.join(t,...vi.split("/")),artifactRoot:i,artifactRootRef:r,nativeRoot:n,specsDir:A.join(n,"specs"),changesDir:A.join(n,"changes"),archiveDir:A.join(n,"archive"),runtimeDir:c,changesRuntimeDir:A.join(c,"changes"),locksDir:A.join(c,"locks"),transactionsDir:A.join(c,"transactions")}}async function Gc(t){await Promise.all([t.specsDir,t.changesDir,t.archiveDir].map(async e=>{await L(t.nativeRoot,e),await se.mkdir(e,{recursive:!0})})),await Promise.all([t.changesRuntimeDir,t.locksDir,t.transactionsDir].map(async e=>{await L(t.projectRoot,e),await se.mkdir(e,{recursive:!0})}))}async function L(t,e){let r=A.resolve(t),i=A.resolve(e);if(!Gt(r,i))throw new Error(`Path is outside the Native root: ${e}`);if(await ya(r))throw new Error(`Native root must not be a symbolic link: ${t}`);let[n,a]=await Promise.all([at(r),at(i)]);if(!Gt(n,a))throw new Error(`Path resolves outside the Native root: ${e}`);return i}var Uc=$c;function Kc(t="docs",e="en"){return ai(t,e)}async function te(t){let e=(await li(t))?.config??null;return e?.native?e:null}async function Kt(t,e,r={}){let i=await Jt(t,{allowPartialProject:!0}),n=Ft(i.document?.value??{},e),a=mm.join(t,...vi.split("/"));await oe(a,Vt(n,e.native.language==="zh-CN"?"zh-CN":"en"),{containedRoot:t,beforeCommit:async()=>{await r.beforeCommit?.(),await ga(t,i.identity)}})}import{promises as vm}from"node:fs";import gm from"node:path";var Yt=".gitignore",Yc=4*1024*1024,Xc="# >>> Comet managed project state >>>",Qc="# <<< Comet managed project state <<<";function wm(t){return t.includes(`\r
170
170
  `)?`\r
171
171
  `:`
172
- `}function rm(r){return r.match(/[^\r\n]*(?:\r\n|\n|\r|$)/gu)?.filter(Boolean)??[]}function im(r){return r.replace(/(?:\r\n|\n|\r)$/u,"")}function nm(r){let e=[],t=!1;for(let i of rm(r)){let n=im(i);if(n===zc){if(t)throw new Error("Comet .gitignore managed block is malformed");t=!0;continue}if(n===Jc){if(!t)throw new Error("Comet .gitignore managed block is malformed");t=!1;continue}t||e.push(i)}if(t)throw new Error("Comet .gitignore managed block is incomplete");return e.join("")}function Gc(r){let e=tm(r),t=nm(r);return t.length>0&&!/(?:\r\n|\n|\r)$/u.test(t)&&(t+=e),t+[zc,"!/.comet/","/.comet/*","!/.comet/config.yaml",Jc,""].join(e)}async function ya(r){let e=em.resolve(r),t=await ne(e,Ut,{label:"project .gitignore",expected:"file"}),i="",n=new Uint8Array;t.exists&&(n=(await Z(e,Ut,Wc,{label:"project .gitignore"})).bytes,i=Buffer.from(n).toString("utf8"));let a=Gc(i);a!==i&&(await Be(t.target,a,{containedRoot:e,exclusive:!t.exists,beforeCommit:t.exists?async()=>{if(!(await Z(e,Ut,Wc,{label:"project .gitignore"})).bytes.equals(n))throw new Error("Project .gitignore changed before commit; rerun initialization")}:async()=>{if((await ne(e,Ut,{label:"project .gitignore",expected:"file"})).exists)throw new Error("Project .gitignore was created before commit; rerun initialization")}}),await ne(e,Ut,{label:"project .gitignore",expected:"file"}),await Zp.access(t.target))}import Zt from"path";import{realpathSync as Mv}from"fs";import{execFileSync as am}from"child_process";import di from"path";function Na(r,e){return am("git",["-C",r,...e],{encoding:"utf8",stdio:["ignore","pipe","ignore"],timeout:1e4,windowsHide:!0}).trim()}function om(r,e){let t=di.normalize(r),i=di.normalize(e);return process.platform==="win32"?t.toLowerCase()===i.toLowerCase():t===i}function Ee(r){try{let e=di.resolve(Na(r,["rev-parse","--show-toplevel"])),i=Na(r,["worktree","list","--porcelain","-z"]).split("\0").find(o=>o.startsWith("worktree ")),n=i?di.resolve(i.slice(9)):e,a=null;try{a=Na(r,["symbolic-ref","--quiet","--short","HEAD"])||null}catch{}return{isGitWorktree:!0,isSecondaryWorktree:!om(e,n),currentWorktreeRoot:e,primaryWorktreeRoot:n,currentBranch:a}}catch{return{isGitWorktree:!1,isSecondaryWorktree:!1,currentWorktreeRoot:null,primaryWorktreeRoot:null,currentBranch:null}}}var ba={en:{outcome:"Outcome",scope:"Scope",nonGoals:"Non-goals",acceptanceExamples:"Acceptance examples",constraints:"Constraints and invariants",decisions:"Decisions",openQuestions:"Open questions",verificationExpectations:"Verification expectations"},"zh-CN":{outcome:"目标",scope:"范围",nonGoals:"非目标",acceptanceExamples:"验收示例",constraints:"约束与不变量",decisions:"决策",openQuestions:"待解决问题",verificationExpectations:"验证预期"}},sm={en:{verification:"Verification",currentResult:"Current result",acceptance:"Acceptance",checks:"Checks",blockers:"Blockers",risks:"Risks and skipped work",previousIterations:"Previous iterations",conclusion:"Conclusion"},"zh-CN":{verification:"验证",currentResult:"当前结果",acceptance:"验收",checks:"检查",blockers:"阻塞项",risks:"风险与跳过的工作",previousIterations:"之前的迭代",conclusion:"结论"}},cm={en:{acceptanceEvidence:"Acceptance evidence",commandsAndResults:"Commands and results",skippedChecks:"Skipped checks",specConsistency:"Spec consistency",knownLimitationsAndRisks:"Known limitations and risks",conclusion:"Conclusion"},"zh-CN":{acceptanceEvidence:"验收证据",commandsAndResults:"命令与结果",skippedChecks:"跳过的检查",specConsistency:"规格一致性",knownLimitationsAndRisks:"已知限制与风险",conclusion:"结论"}},lm=new Map,Uc=new Map;for(let r of Object.keys(ba)){for(let[e,t]of Object.entries(ba[r]))lm.set(t.toLocaleLowerCase("en-US"),e);for(let[e,t]of Object.entries(sm[r]))Uc.set(t.toLocaleLowerCase("en-US"),e);for(let[e,t]of Object.entries(cm[r]))Uc.set(t.toLocaleLowerCase("en-US"),e)}function um(r,e){return ba[r][e]}function fi(r){return["outcome","scope","nonGoals","acceptanceExamples","constraints","decisions","openQuestions","verificationExpectations"].map(t=>`# ${um(r,t)}
172
+ `}function ym(t){return t.match(/[^\r\n]*(?:\r\n|\n|\r|$)/gu)?.filter(Boolean)??[]}function Nm(t){return t.replace(/(?:\r\n|\n|\r)$/u,"")}function bm(t){let e=[],r=!1;for(let i of ym(t)){let n=Nm(i);if(n===Xc){if(r)throw new Error("Comet .gitignore managed block is malformed");r=!0;continue}if(n===Qc){if(!r)throw new Error("Comet .gitignore managed block is malformed");r=!1;continue}r||e.push(i)}if(r)throw new Error("Comet .gitignore managed block is incomplete");return e.join("")}function Zc(t){let e=wm(t),r=bm(t);return r.length>0&&!/(?:\r\n|\n|\r)$/u.test(r)&&(r+=e),r+[Xc,"!/.comet/","/.comet/*","!/.comet/config.yaml",Qc,""].join(e)}async function ba(t){let e=gm.resolve(t),r=await ae(e,Yt,{label:"project .gitignore",expected:"file"}),i="",n=new Uint8Array;r.exists&&(n=(await ee(e,Yt,Yc,{label:"project .gitignore"})).bytes,i=Buffer.from(n).toString("utf8"));let a=Zc(i);a!==i&&(await Me(r.target,a,{containedRoot:e,exclusive:!r.exists,beforeCommit:r.exists?async()=>{if(!(await ee(e,Yt,Yc,{label:"project .gitignore"})).bytes.equals(n))throw new Error("Project .gitignore changed before commit; rerun initialization")}:async()=>{if((await ae(e,Yt,{label:"project .gitignore",expected:"file"})).exists)throw new Error("Project .gitignore was created before commit; rerun initialization")}}),await ae(e,Yt,{label:"project .gitignore",expected:"file"}),await vm.access(r.target))}import tr from"path";import{realpathSync as pg}from"fs";import{execFileSync as km}from"child_process";import gi from"path";function ka(t,e){return km("git",["-C",t,...e],{encoding:"utf8",stdio:["ignore","pipe","ignore"],timeout:1e4,windowsHide:!0}).trim()}function Sm(t,e){let r=gi.normalize(t),i=gi.normalize(e);return process.platform==="win32"?r.toLowerCase()===i.toLowerCase():r===i}function xe(t){try{let e=gi.resolve(ka(t,["rev-parse","--show-toplevel"])),i=ka(t,["worktree","list","--porcelain","-z"]).split("\0").find(o=>o.startsWith("worktree ")),n=i?gi.resolve(i.slice(9)):e,a=null;try{a=ka(t,["symbolic-ref","--quiet","--short","HEAD"])||null}catch{}return{isGitWorktree:!0,isSecondaryWorktree:!Sm(e,n),currentWorktreeRoot:e,primaryWorktreeRoot:n,currentBranch:a}}catch{return{isGitWorktree:!1,isSecondaryWorktree:!1,currentWorktreeRoot:null,primaryWorktreeRoot:null,currentBranch:null}}}var ce={next:"NEXT:",relay:"RELAY TO USER:",detail:"DETAIL:",details:"--- machine projection (run with --json to consume it) ---"};function el(t){return t?t.command?`${ce.next} ${t.command}`:t.ask_user?`${ce.next} ${t.ask_user}`:null:null}function tl(t,e){let r=[t.summary],i=el(t.next);return i&&r.push(i),t.user_message&&r.push("",ce.relay,t.user_message),e!==void 0&&r.push("",ce.details,JSON.stringify(e,null,2)),`${r.join(`
173
+ `)}
174
+ `}function rl(t,e,r){let i=[t.summary],n=el(t.next);return n&&i.push(n),t.user_message&&i.push("",ce.relay,t.user_message),i.push("",`${ce.detail} ${e}`),r!==void 0&&i.push("",ce.details,JSON.stringify(r,null,2)),i.join(`
175
+ `)}var Sa={en:{outcome:"Outcome",scope:"Scope",nonGoals:"Non-goals",acceptanceExamples:"Acceptance examples",constraints:"Constraints and invariants",decisions:"Decisions",openQuestions:"Open questions",verificationExpectations:"Verification expectations"},"zh-CN":{outcome:"目标",scope:"范围",nonGoals:"非目标",acceptanceExamples:"验收示例",constraints:"约束与不变量",decisions:"决策",openQuestions:"待解决问题",verificationExpectations:"验证预期"}},Em={en:{verification:"Verification",currentResult:"Current result",acceptance:"Acceptance",checks:"Checks",blockers:"Blockers",risks:"Risks and skipped work",previousIterations:"Previous iterations",conclusion:"Conclusion"},"zh-CN":{verification:"验证",currentResult:"当前结果",acceptance:"验收",checks:"检查",blockers:"阻塞项",risks:"风险与跳过的工作",previousIterations:"之前的迭代",conclusion:"结论"}},Cm={en:{acceptanceEvidence:"Acceptance evidence",commandsAndResults:"Commands and results",skippedChecks:"Skipped checks",specConsistency:"Spec consistency",knownLimitationsAndRisks:"Known limitations and risks",conclusion:"Conclusion"},"zh-CN":{acceptanceEvidence:"验收证据",commandsAndResults:"命令与结果",skippedChecks:"跳过的检查",specConsistency:"规格一致性",knownLimitationsAndRisks:"已知限制与风险",conclusion:"结论"}},xm=new Map,il=new Map;for(let t of Object.keys(Sa)){for(let[e,r]of Object.entries(Sa[t]))xm.set(r.toLocaleLowerCase("en-US"),e);for(let[e,r]of Object.entries(Em[t]))il.set(r.toLocaleLowerCase("en-US"),e);for(let[e,r]of Object.entries(Cm[t]))il.set(r.toLocaleLowerCase("en-US"),e)}function Pm(t,e){return Sa[t][e]}function wi(t){return["outcome","scope","nonGoals","acceptanceExamples","constraints","decisions","openQuestions","verificationExpectations"].map(r=>`# ${Pm(t,r)}
173
176
  `).join(`
174
- `)}var ul=it(Qe(),1);var Sa=1024*1024;import{AsyncLocalStorage as dm}from"async_hooks";var jy=16*1024;var $y=new dm;import{createHash as fm}from"crypto";function K(r){throw new TypeError(`Value is not valid canonical JSON: ${r}`)}function hm(r,e){e.has(r)&&K("cyclic structures are not supported"),e.add(r);try{let t=Object.keys(r);for(let i=0;i<r.length;i+=1)Object.prototype.hasOwnProperty.call(r,i)||K("sparse arrays are not supported");return(t.length!==r.length||t.some((i,n)=>i!==String(n)))&&K("arrays must not have named enumerable properties"),Object.getOwnPropertySymbols(r).length>0&&K("symbol properties are not supported"),`[${r.map(i=>Ea(i,e)).join(",")}]`}finally{e.delete(r)}}function pm(r,e){let t=Object.getPrototypeOf(r);t!==Object.prototype&&t!==null&&K("only plain objects are supported"),e.has(r)&&K("cyclic structures are not supported"),Object.getOwnPropertySymbols(r).length>0&&K("symbol properties are not supported"),e.add(r);try{let i=Object.getOwnPropertyDescriptors(r);return`{${Object.keys(r).sort().map(o=>{let s=i[o];return(!s||!("value"in s))&&K("accessor properties are not supported"),`${JSON.stringify(o)}:${Ea(s.value,e)}`}).join(",")}}`}finally{e.delete(r)}}function Ea(r,e){if(r===null)return"null";switch(typeof r){case"boolean":return r?"true":"false";case"string":return JSON.stringify(r);case"number":return Number.isFinite(r)||K("numbers must be finite"),JSON.stringify(Object.is(r,-0)?0:r);case"object":return Array.isArray(r)?hm(r,e):pm(r,e);case"bigint":case"function":case"symbol":case"undefined":return K(`${typeof r} values are not supported`)}return K("unsupported value type")}function Ca(r){return Ea(r,new Set)}function q(r,e){if(r.length===0)throw new TypeError("Canonical hash tag must be non-empty");if(/[\r\n]/u.test(r))throw new TypeError("Canonical hash tag must not contain a line break");return fm("sha256").update(`${r}
175
- ${Ca(e)}`).digest("hex")}var My=Object.freeze({maxItems:16,maxTextBytes:512,maxContextItems:4,maxContextItemBytes:256,maxFailedCheckIds:16,maxSerializedBytes:32*1024}),Kc=Object.freeze({maxCriteria:1024});var Yc=it(Qe(),1);var el="[a-z][a-z0-9]*(?:-[a-z0-9]+)*",lN=new RegExp(`^portable-archive-(${el})\\.json$`,"u"),uN=new RegExp(`^portable-migration-(${el})\\.json$`,"u");import{TextDecoder as xm}from"util";var kN=256*1024,SN=1024*1024,EN=16*1024;var CN=64*1024*1024;var xN=new xm("utf-8",{fatal:!0});import{createHash as Rm}from"crypto";function W(r){return Rm("sha256").update(r).digest("hex")}var KN={maxFiles:1e4,maxFileBytes:5*1024*1024,maxTotalBytes:64*1024*1024,maxManifestBytes:1024*1024};var YN=8*1024*1024;var XN=64*1024,QN=64*1024;var ZN={maxRecords:2e4,maxBytes:8*1024*1024,maxRecordBytes:64*1024},eb={maxNodes:2e4,maxBytes:8*1024*1024,maxPathBytes:64*1024};var tb=(1n<<256n)-1n;var Om=it(Qe(),1);var Hm=null;function Dm(r,e){let t=r;for(let i of e)t+="\0"+(typeof i=="string"?i:JSON.stringify(i));return t}function al(r,e){return(...t)=>{let i=Hm;if(i===null)return e(...t);let n=Dm(`async:${r}`,t),a=i.entries.get(n);if(a)return a.value;let o=e(...t).catch(s=>{throw i.entries.delete(n),s});return i.entries.set(n,{value:o}),o}}var wb=al("hookWritePolicy",async r=>(await la(r))?.hook??{allow_paths:[]});var lk=256*1024;var kk={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 Hk=16*1024,Dk=process.platform;var dl=["schema","name","language","phase","brief","approval","spec_changes","verification_result","verification_report","archived","created_at","run_id"],cS=new Set(dl),Vm=new Set([...dl,"minimum_runtime_version","revision"]),lS=new Set([...Vm,"approved_contract_hash","implementation_scope","verification_evidence","partial_allowance","verification_protocol"]);var pi=class extends Error{constructor(t,i,n){super(`Native change ${t} revision conflict: expected ${i}, actual ${n}`);this.change=t;this.expectedRevision=i;this.actualRevision=n;this.name="NativeChangeRevisionConflictError"}change;expectedRevision;actualRevision;code="native-change-revision-conflict"},Kt=class extends Error{constructor(t,i){super(`Native working directory already contains active change${i.length===1?"":"s"} ${i.join(", ")}; create the new change in a separate worktree`);this.requestedIsolation=t;this.activeChanges=i;this.name="NativeWorkspaceIsolationRequiredError"}requestedIsolation;activeChanges;code="native-workspace-isolation-required"},mi=class extends Error{constructor(t,i,n,a,o,s=null,c=null){super(`Native change ${t} baseline is incomplete (${i} omitted entr${i===1?"y":"ies"}). Adjust native.snapshot scope or resource budgets in .comet/config.yaml, then retry.`);this.change=t;this.omittedCount=i;this.omittedByReason=n;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"},uS=fi("en");var qm=["outcome","scope","nonGoals","acceptanceExamples"],wS=[...qm,"constraints","decisions","openQuestions","verificationExpectations"];var Wm=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 fl=1024*1024;var pl="scoped-text-safety",zm=1,Jm=Object.freeze({maxFiles:256,maxFileBytes:2*1024*1024,maxTotalBytes:8*1024*1024,maxIssues:128});var Gm="comet.native.checker-policy.v1";var OS=q(Gm,{policy:pl,version:zm,limits:Jm,checks:["conflict-marker","space-before-tab","trailing-whitespace"],binaryHandling:"skip-and-count"});var Um=["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"],HS=new Set(Um);var Xm=fl,ZS=3*Xm;var ml={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:[]},Zm=W("comet-native-runtime:v3:scope-reopen"),xE=[{skillVersion:"3",skillHash:W("comet-native-runtime:v3:semantic-repair-budget")},{skillVersion:"2",skillHash:W("comet-native-runtime:v2:max-iterations-32")},{skillVersion:"1",skillHash:W("comet-native-runtime:v1")}];var gl=["schema","id","change","evidenceHash","createdAt","previousState","nextState","previousRun","nextRun","eventData"],oC=new Set(gl),ov=new Set([...gl,"minimum_runtime_version","revision"]),sC=new Set([...ov,"operation"]),cC=512*1024,sv=new Set(["previousPhase","nextPhase","evidenceHash","summary","artifacts","noCodeReason","verificationResult"]),lC=new Set([...sv,"implementationScopeHash","repairScopeHash","repairStagnation","returnToBuild"]);var pC={maxAcceptanceCriteria:Kc.maxCriteria};var yC={maxSpecs:64,maxFileBytes:Sa,maxTotalBytes:4*1024*1024};import{execFile as wv}from"node:child_process";import{promisify as yv}from"node:util";var bC=["$ProgressPreference = 'SilentlyContinue'","$encoded = $env:COMET_COMMAND_PAYLOAD","Remove-Item Env:COMET_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 IC={maxArtifacts:128,maxFileBytes:16*1024*1024,maxTotalBytes:64*1024*1024,maxDocumentBytes:256*1024};var ZC=512*1024;var Qt=class extends Error{recovery;constructor(e,t){super(e),this.name="NativeReceiptScopeStaleError",this.recovery=t}};var kx=64*1024;var Sx=3600*1e3;var Ex=yv(wv);var vi=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(i=>`${i.ref}${i.acceptanceId?`[${i.acceptanceId}]`:""} -> ${i.mismatches.join("; ")}`).join(" | ")}`;super(t),this.name="NativeVerificationReceiptBindingError",this.details=e}};var lP={maxDepth:128,maxEntries:2e4,maxFileBytes:64*1024*1024,maxTotalBytes:256*1024*1024,maxManifestBytes:16*1024*1024,maxRefBytes:4*1024};var bP=16*1024*1024,kP=256*1024,SP=16*1024;var AP=Object.freeze({maxScopeChanges:128,maxAcceptanceEntries:64,maxUnresolvedReasons:32,maxReceipts:32});var IP=16*1024;var jv=it(Qe(),1);var $P=8*1024*1024;var gi=class extends Error{constructor(t,i,n){super(t,n);this.preparation=i;this.name="NativeWorkspacePreparationError"}preparation};var MA=fi("en");var t_=16*1024;var J_=16*1024*1024,wi=class extends Error{constructor(t,i,n,a){super(`Canonical spec conflict for ${t}: expected ${i??"(missing)"}, actual ${n??"(missing)"}`);this.capability=t;this.expectedHash=i;this.actualHash=n;this.canonicalPath=a;this.name="NativeSpecConflictError"}capability;expectedHash;actualHash;canonicalPath;code="native-spec-conflict"},yi=class extends Error{constructor(t,i=t.ready?"Native Archive preflight no longer matches the expected hash":`Native Archive preflight is blocked: ${t.findingCodes.join(", ")}`){super(i);this.preflight=t;this.name="NativeArchivePreflightError"}preflight;code="native-archive-preflight"};var bl=["--project-root <path> Resolve the Native project from this working directory.","--json Emit the stable JSON command envelope.","--help Show help without requiring an initialized project."],_a=Object.freeze({"":{usage:"comet native <command> [options]",purpose:"Create, inspect, recover, and archive portable Native changes through Runtime-enforced, skill-coordinated steps.",subcommands:["init Initialize Native project configuration.","root show Inspect the configured artifact root.","root move <artifact-root> Move the configured artifact root.","new <change-name> Create a change and prepare its workspace.","spec remove Record a complete capability removal intent.","show <change-name> Read formal artifacts and portable state.","status [<change-name>] Discover stable boundaries and Runner actions.","select <change-name> Select a change in its bound workspace.","next <change-name> Confirm or recover a stable workflow boundary.","archive <change-name> Preview and execute Archive plus workspace finish.","check <change-name> Run the read-only Native verification check.","doctor [<change-name>] Diagnose, migrate, or rebuild local execution state."],options:bl,output:"Human-readable text by default; use --json for a structured command envelope.",examples:["comet native status --json","comet native status my-change --details --json","comet native next --help"]},init:{usage:"comet native init [--root <artifact-root>] [--language en|zh-CN]",purpose:"Create or normalize .comet/config.yaml and the configured Native directories.",options:["--root <artifact-root> Project-relative artifact root; defaults to docs.","--language en|zh-CN Language for newly generated Native artifacts."],output:"The resolved project configuration and Native paths.",examples:["comet native init --root docs --language zh-CN"]},root:{usage:"comet native root <show|move> [arguments]",purpose:"Inspect or transactionally move the configured Native artifact root.",subcommands:["show Print the configured artifact root and resolved paths.","move <artifact-root> Move Native artifacts and update project configuration."],output:"The current root projection or the completed move result.",examples:["comet native root show","comet native root move artifacts/native"]},"root show":{usage:"comet native root show",purpose:"Print the configured Native artifact root and resolved paths.",output:"The configured artifact root and resolved Native paths."},"root move":{usage:"comet native root move <artifact-root>",purpose:"Transactionally move Native artifacts and update project configuration.",output:"The source, destination, and committed root-move transaction result.",examples:["comet native root move artifacts/native"]},new:{usage:"comet native new <change-name> [--language en|zh-CN] [--isolation current|branch|worktree] [--change-branch <branch>] [--target-branch <branch>] [--worktree-path <path>]",purpose:"Create a portable Native change and prepare the requested branch or linked worktree.",options:["--language en|zh-CN Artifact language; defaults to project configuration.","--isolation <kind> current, branch, or worktree; defaults to current.","--change-branch <branch> Change branch; defaults to comet/<change-name>.","--target-branch <branch> Local base branch; defaults to the current branch.","--worktree-path <path> Worktree directory; defaults to .worktrees/<change-name>."],output:"The portable state, workspace preparation result, and continuation with the next Runner action.",examples:["comet native new session-timeout --language zh-CN","comet native new session-timeout --isolation branch --target-branch main","comet native new session-timeout --isolation worktree --target-branch main"]},spec:{usage:"comet native spec remove <change-name> <capability>",purpose:"Record a capability removal; create and modify intents use complete proposed Spec files.",subcommands:["remove <change-name> <capability> Record a capability removal."],output:"The updated portable state and continuation."},"spec remove":{usage:"comet native spec remove <change-name> <capability>",purpose:"Record removal of a capability in the complete target specification.",output:"The updated portable state and continuation with the next Runner action."},show:{usage:"comet native show <change-name>",purpose:"Read formal artifacts and portable state for one Native change.",output:"The portable state, brief, complete proposed Specs, and continuation; legacy state is reported as migration-required."},status:{usage:"comet native status [<change-name>] [--cursor <token>] [--details]",purpose:"Discover portable stable boundaries, parent child readiness, or the exact next Runner action.",options:["--cursor <token> Continue a status-list page, or a named details/history page.","--details Include one fixed-size page of acceptance, Spec, handoff, verification, history, workspace, and report details."],output:"A compact v2 status page or one compact Loop projection with local execution availability. Use --details and --cursor to read fixed-size detail pages; parent changes expose childSummary and readyChildren.",examples:["comet native status --json","comet native status session-timeout --details --json"]},select:{usage:"comet native select <change-name>",purpose:"Select one Native change after validating its workspace binding.",output:"The selected change record."},next:{usage:`comet native next <change-name> --summary <text> [--confirmed] [--coordination-mode multi-session|single-session] [--accept-result|--revise-implementation|--revise-requirements|--retry-verifier|--resolve-verifier-blocker] [--max-parallel <n>] [--expected-state-version <n>] [--expected-action <action>]
176
- comet native next <change-name> --runner-input <json-file>`,purpose:"Confirm or recover an Agent boundary, advance parent child changes, handle Supervisor task operations, or use one skill-coordinated JSON bridge for Builder handoff, check-plan dispatch, and Verifier response/error.",options:["--summary <text> Required transition or recovery summary.","--confirmed Confirm Shape or an explicitly degraded verifier-unavailable fallback before Archive.","--coordination-mode multi-session|single-session Required when confirming a multi-child Supervisor Shape.","--accept-result Accept the current skill-coordinated Verify result and make it archive-ready.","--revise-implementation Keep confirmed requirements unchanged and return Verify to Build for implementation revision.","--revise-requirements Return Verify or Archive to Shape when user-visible goals or acceptance criteria must change.","--retry-verifier Retry a blocked Verifier execution when the continuation allows it.","--resolve-verifier-blocker Resolve a semantic Verifier blocker without changing the candidate, then dispatch a new attempt.","--max-parallel <n> Supervisor task concurrency cap; defaults to 2, use 1 for serial fallback.","--expected-state-version <n> Continuation-issued guard that rejects stale public transition decisions.","--expected-action <action> Continuation-issued guard that binds the public transition decision to its intended action.","--runner-input <file> Skill-coordinated JSON: builder-handoff, dispatch-verifier, verifier-response, verifier-execution-error, or verifier-unavailable. Identity/provider/execution/candidate fields are rejected."," builder-handoff fields: kind, summary, addressed_acceptance_ids, checks, known_limits, review. review fields: status=passed, summary, reviewer_execution_ref from a separate read-only review."," dispatch-verifier fields: kind, checks (an explicitly resolved plan; [] is allowed)."," verifier-response fields: kind, response (request-checks or final-result)."," verifier-execution-error fields: kind, summary, stateVersion, iteration, attempt, verifierExecutionRef copied from verifierDispatch."," verifier-unavailable fields: kind, summary, stateVersion, iteration, attempt, verifierExecutionRef copied from verifierDispatch; accepted only after the explicit Runtime check plan completed and passed."," Supervisor task fields: supervisor-builder-result (child, runId, candidateCommit), supervisor-builder-failure (child, runId, reason), supervisor-verifier-result (child, runId, verdict, verification data), supervisor-reconnect (child, runId), supervisor-cancel (child, runId, reason), or supervisor-integrate (child, checks)."],output:'A compact portable state summary, explicit skill-coordinated label, Runtime-owned check results, scoped verifierDispatch, bounded request-check response, continuation.runnerAction, machine-readable continuation.inputOptions, and continuation.userCommunication with a user-ready message and Agent relay guidance. Read acceptance text and other long fields from paged status --details output. Human-readable verification statuses include "Host independently verified", "Checks completed, but your confirmation is required", "Full verification was unavailable; only automatic checks completed", and "You accepted the incomplete verification result". This generic bridge is not trusted identity attestation: a passing result waits for explicit user confirmation before Archive.',examples:['comet native next session-timeout --summary "Shape confirmed" --confirmed','comet native next session-timeout --summary "Current result accepted" --accept-result','comet native next session-timeout --summary "Implementation needs revision" --revise-implementation','comet native next session-timeout --summary "Acceptance criteria changed" --revise-requirements','comet native next session-timeout --summary "Retry verifier infrastructure" --retry-verifier','comet native next session-timeout --summary "Retry semantic verification" --resolve-verifier-blocker',"comet native next session-timeout --runner-input <temporary-json-file>"]},archive:{usage:`comet native archive <change-name> --dry-run [--finish merge|push|pull-request|keep]
177
- comet native archive <change-name> [--confirmed] [--serial-first <current-change>]`,purpose:"Preview or execute deterministic Archive after the portable state reaches archive-ready.",options:["--dry-run Inspect readiness without rerunning verification.","--finish <action> Persist merge, push, pull-request, or keep for an isolated workspace.","--serial-first <current-change> During execution only, confirm that this change archives before detected capability peers; the value must equal <change-name>.","--confirmed Confirm Archive when project policy requires it."],output:"Readiness plus continuation, or the completed Archive transaction and workspace finish result; Archive does not repeat verification."},doctor:{usage:"comet native doctor [<change-name>] [--repair]",purpose:"Inspect portable state, migrate a legacy active change, or rebuild its local execution overlay.",options:["--repair Apply deterministic migration or rebuild from the portable stable boundary."],output:"Health, migration or recovery details, and the continuation with the next Runner action."}});function Aa(r,e){return`${r}:
178
- ${e.map(t=>` ${t}`).join(`
179
- `)}`}function Dv(r){let e=r.filter(i=>i!=="--help");if(e.length===0)return"";let t=e.slice(0,2).join(" ");return _a[t]||e.length>1&&_a[e[0]]?.subcommands?t:e[0]}function Bv(r=[]){let e=Dv(r),t=_a[e];if(!t)throw new Error(`Unknown Native help topic: ${e}`);let i=[`Usage: ${t.usage}`,"",t.purpose];t.subcommands&&i.push("",Aa("Commands",t.subcommands));let n=e===""?t.options:[...t.options??[],...bl];return n&&n.length>0&&i.push("",Aa("Options",n)),i.push("",`Output:
180
- ${t.output}`),t.examples&&i.push("",Aa("Examples",t.examples)),e===""&&i.push("","Run `comet native <command> --help` for command-specific details."),{topic:e,usage:`${i.join(`
177
+ `)}var yl=st(et(),1);var Ca=1024*1024;import{AsyncLocalStorage as Rm}from"async_hooks";var cN=16*1024;var lN=new Rm;import{createHash as Am}from"crypto";function Y(t){throw new TypeError(`Value is not valid canonical JSON: ${t}`)}function _m(t,e){e.has(t)&&Y("cyclic structures are not supported"),e.add(t);try{let r=Object.keys(t);for(let i=0;i<t.length;i+=1)Object.prototype.hasOwnProperty.call(t,i)||Y("sparse arrays are not supported");return(r.length!==t.length||r.some((i,n)=>i!==String(n)))&&Y("arrays must not have named enumerable properties"),Object.getOwnPropertySymbols(t).length>0&&Y("symbol properties are not supported"),`[${t.map(i=>xa(i,e)).join(",")}]`}finally{e.delete(t)}}function Im(t,e){let r=Object.getPrototypeOf(t);r!==Object.prototype&&r!==null&&Y("only plain objects are supported"),e.has(t)&&Y("cyclic structures are not supported"),Object.getOwnPropertySymbols(t).length>0&&Y("symbol properties are not supported"),e.add(t);try{let i=Object.getOwnPropertyDescriptors(t);return`{${Object.keys(t).sort().map(o=>{let s=i[o];return(!s||!("value"in s))&&Y("accessor properties are not supported"),`${JSON.stringify(o)}:${xa(s.value,e)}`}).join(",")}}`}finally{e.delete(t)}}function xa(t,e){if(t===null)return"null";switch(typeof t){case"boolean":return t?"true":"false";case"string":return JSON.stringify(t);case"number":return Number.isFinite(t)||Y("numbers must be finite"),JSON.stringify(Object.is(t,-0)?0:t);case"object":return Array.isArray(t)?_m(t,e):Im(t,e);case"bigint":case"function":case"symbol":case"undefined":return Y(`${typeof t} values are not supported`)}return Y("unsupported value type")}function Pa(t){return xa(t,new Set)}function W(t,e){if(t.length===0)throw new TypeError("Canonical hash tag must be non-empty");if(/[\r\n]/u.test(t))throw new TypeError("Canonical hash tag must not contain a line break");return Am("sha256").update(`${t}
178
+ ${Pa(e)}`).digest("hex")}var mN=Object.freeze({maxItems:16,maxTextBytes:512,maxContextItems:4,maxContextItemBytes:256,maxFailedCheckIds:16,maxSerializedBytes:32*1024}),nl=Object.freeze({maxCriteria:1024});var al=st(et(),1);var ll="[a-z][a-z0-9]*(?:-[a-z0-9]+)*",LN=new RegExp(`^portable-archive-(${ll})\\.json$`,"u"),BN=new RegExp(`^portable-migration-(${ll})\\.json$`,"u");import{TextDecoder as qm}from"util";var XN=256*1024,QN=1024*1024,ZN=16*1024;var eb=64*1024*1024;var tb=new qm("utf-8",{fatal:!0});import{createHash as zm}from"crypto";function z(t){return zm("sha256").update(t).digest("hex")}var Eb={maxFiles:1e4,maxFileBytes:5*1024*1024,maxTotalBytes:64*1024*1024,maxManifestBytes:1024*1024};var Cb=8*1024*1024;var xb=64*1024,Pb=64*1024;var Rb={maxRecords:2e4,maxBytes:8*1024*1024,maxRecordBytes:64*1024},Ab={maxNodes:2e4,maxBytes:8*1024*1024,maxPathBytes:64*1024};var _b=(1n<<256n)-1n;var Qm=st(et(),1);var Zm=null;function ev(t,e){let r=t;for(let i of e)r+="\0"+(typeof i=="string"?i:JSON.stringify(i));return r}function pl(t,e){return(...r)=>{let i=Zm;if(i===null)return e(...r);let n=ev(`async:${t}`,r),a=i.entries.get(n);if(a)return a.value;let o=e(...r).catch(s=>{throw i.entries.delete(n),s});return i.entries.set(n,{value:o}),o}}var Gb=pl("hookWritePolicy",async t=>(await ma(t))?.hook??{allow_paths:[]});var Mk=256*1024;var Zk={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 hS=16*1024,pS=process.platform;var Nl=["schema","name","language","phase","brief","approval","spec_changes","verification_result","verification_report","archived","created_at","run_id"],BS=new Set(Nl),nv=new Set([...Nl,"minimum_runtime_version","revision"]),MS=new Set([...nv,"approved_contract_hash","implementation_scope","verification_evidence","partial_allowance","verification_protocol"]);var Ni=class extends Error{constructor(r,i,n){super(`Native change ${r} revision conflict: expected ${i}, actual ${n}`);this.change=r;this.expectedRevision=i;this.actualRevision=n;this.name="NativeChangeRevisionConflictError"}change;expectedRevision;actualRevision;code="native-change-revision-conflict"},Xt=class extends Error{constructor(r,i){super(`Native working directory already contains active change${i.length===1?"":"s"} ${i.join(", ")}; create the new change in a separate worktree`);this.requestedIsolation=r;this.activeChanges=i;this.name="NativeWorkspaceIsolationRequiredError"}requestedIsolation;activeChanges;code="native-workspace-isolation-required"},bi=class extends Error{constructor(r,i,n,a,o,s=null,c=null){super(`Native change ${r} baseline is incomplete (${i} omitted entr${i===1?"y":"ies"}). Adjust native.snapshot scope or resource budgets in .comet/config.yaml, then retry.`);this.change=r;this.omittedCount=i;this.omittedByReason=n;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"},VS=wi("en");var ov=["outcome","scope","nonGoals","acceptanceExamples"],KS=[...ov,"constraints","decisions","openQuestions","verificationExpectations"];var sv=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 bl=1024*1024;var Sl="scoped-text-safety",cv=1,lv=Object.freeze({maxFiles:256,maxFileBytes:2*1024*1024,maxTotalBytes:8*1024*1024,maxIssues:128});var uv="comet.native.checker-policy.v1";var fE=W(uv,{policy:Sl,version:cv,limits:lv,checks:["conflict-marker","space-before-tab","trailing-whitespace"],binaryHandling:"skip-and-count"});var dv=["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"],hE=new Set(dv);var pv=bl,_E=3*pv;var El={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:[]},vv=z("comet-native-runtime:v3:scope-reopen"),iC=[{skillVersion:"3",skillHash:z("comet-native-runtime:v3:semantic-repair-budget")},{skillVersion:"2",skillHash:z("comet-native-runtime:v2:max-iterations-32")},{skillVersion:"1",skillHash:z("comet-native-runtime:v1")}];var xl=["schema","id","change","evidenceHash","createdAt","previousState","nextState","previousRun","nextRun","eventData"],DC=new Set(xl),Sv=new Set([...xl,"minimum_runtime_version","revision"]),LC=new Set([...Sv,"operation"]),BC=512*1024,Ev=new Set(["previousPhase","nextPhase","evidenceHash","summary","artifacts","noCodeReason","verificationResult"]),MC=new Set([...Ev,"implementationScopeHash","repairScopeHash","repairStagnation","returnToBuild"]);var zC={maxAcceptanceCriteria:nl.maxCriteria};var YC={maxSpecs:64,maxFileBytes:Ca,maxTotalBytes:4*1024*1024};import{execFile as Ov}from"node:child_process";import{promisify as Hv}from"node:util";var QC=["$ProgressPreference = 'SilentlyContinue'","$encoded = $env:COMET_COMMAND_PAYLOAD","Remove-Item Env:COMET_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 lx={maxArtifacts:128,maxFileBytes:16*1024*1024,maxTotalBytes:64*1024*1024,maxDocumentBytes:256*1024};var _x=512*1024;var er=class extends Error{recovery;constructor(e,r){super(e),this.name="NativeReceiptScopeStaleError",this.recovery=r}};var Zx=64*1024;var eP=3600*1e3;var tP=Hv(Ov);var ki=class extends Error{details;constructor(e){let r=e.length===0?"Native verification receipt binding is invalid":`Native verification receipt binding is invalid (${e.length} receipt(s)): ${e.map(i=>`${i.ref}${i.acceptanceId?`[${i.acceptanceId}]`:""} -> ${i.mismatches.join("; ")}`).join(" | ")}`;super(r),this.name="NativeVerificationReceiptBindingError",this.details=e}};var MP={maxDepth:128,maxEntries:2e4,maxFileBytes:64*1024*1024,maxTotalBytes:256*1024*1024,maxManifestBytes:16*1024*1024,maxRefBytes:4*1024};var QP=16*1024*1024,ZP=256*1024,eR=16*1024;var oR=Object.freeze({maxScopeChanges:128,maxAcceptanceEntries:64,maxUnresolvedReasons:32,maxReceipts:32});var lR=16*1024;var Yv=st(et(),1);var dR=8*1024*1024;var Si=class extends Error{constructor(r,i,n){super(r,n);this.preparation=i;this.name="NativeWorkspacePreparationError"}preparation};var b_=wi("en");var H_=16*1024;var PI=16*1024*1024,Ei=class extends Error{constructor(r,i,n,a){super(`Canonical spec conflict for ${r}: expected ${i??"(missing)"}, actual ${n??"(missing)"}`);this.capability=r;this.expectedHash=i;this.actualHash=n;this.canonicalPath=a;this.name="NativeSpecConflictError"}capability;expectedHash;actualHash;canonicalPath;code="native-spec-conflict"},Ci=class extends Error{constructor(r,i=r.ready?"Native Archive preflight no longer matches the expected hash":`Native Archive preflight is blocked: ${r.findingCodes.join(", ")}`){super(i);this.preflight=r;this.name="NativeArchivePreflightError"}preflight;code="native-archive-preflight"};function C(t,e,r){return t==="zh-CN"?r:e}var Ia={shape:{en:"Shape (agreeing on requirements)",zh:"Shape(需求共识)"},build:{en:"Build",zh:"Build(实现)"},verify:{en:"Verify",zh:"Verify(验证)"},archive:{en:"Archive",zh:"Archive(归档)"}};function _l(t,e){return typeof t=="string"&&Ia[t]?C(e,Ia[t].en,Ia[t].zh):typeof t=="string"?t:""}function Ta(t){if(!t||typeof t!="object"||Array.isArray(t))return!1;let e=t;return typeof e.total=="number"&&typeof e.passed=="number"&&typeof e.failed=="number"&&typeof e.blocked=="number"&&typeof e.pending=="number"}function eg(t){let e={total:t.length,passed:0,failed:0,blocked:0,pending:0};for(let r of t){if(!r||typeof r!="object")return null;let i=r.result;if(i!=="passed"&&i!=="failed"&&i!=="blocked"&&i!=="pending")return null;e[i]+=1}return e}function Il(t,e){let r=[];t.failed>0&&r.push(C(e,`${t.failed} failed`,`${t.failed} 项失败`)),t.blocked>0&&r.push(C(e,`${t.blocked} blocked`,`${t.blocked} 项受阻`)),t.pending>0&&r.push(C(e,`${t.pending} pending`,`${t.pending} 项待验`));let i=C(e,`acceptance ${t.passed}/${t.total} passed`,`验收 ${t.passed}/${t.total} 通过`);return r.length>0?`${i} (${r.join(", ")})`:i}function Tl(t){if(!t||typeof t!="object"||Array.isArray(t))return!1;let e=t;if(typeof e.change!="string"||e.disposition!=="continue"&&e.disposition!=="await-user"&&e.disposition!=="blocked"&&e.disposition!=="done"||e.commandArgs!==null&&e.commandArgs!==void 0&&!Array.isArray(e.commandArgs))return!1;let r=e.userCommunication;return!!(r&&typeof r=="object"&&typeof r.required=="boolean"&&(r.message===null||typeof r.message=="string")&&typeof r.agentInstruction=="string")}function ja(t){return/[\u4e00-\u9fff]/u.test(t.userCommunication.agentInstruction)?"zh-CN":"en"}function tg(t,e,r){return t==="done"?C(r,"complete","已完成"):t==="await-user"?C(r,"waiting for a user decision","等待用户决定"):t==="blocked"?C(r,"paused: needs attention","已暂停,需要处理"):e?C(r,"waiting for a user decision","等待用户决定"):C(r,"ready to continue","可继续推进")}function rg(t,e,r){let i=ja(t),n=[];r&&n.push(r);let a=C(i,`Change ${t.change}`,`需求 ${t.change}`),o=_l(t.phase,i),s=tg(t.disposition,t.userCommunication.required,i);n.push([a,o||null,s].filter(Boolean).join(" · ")),e&&e.total>0&&n.push(Il(e,i));let c=t.userCommunication,l=jl(t,i);return{summary:n.join("; "),...l?{next:l}:{},...c.required&&c.message?{user_message:c.message}:{}}}function jl(t,e){let r=t.userCommunication;if(t.disposition==="await-user"&&r.required)return{ask_user:C(e,"Relay the message below, wait for the user decision, then run the matching option (run with --json to see the exact alternative commands).","先转述下方信息并等待用户选择,再执行对应命令(完整候选命令以 --json 输出为准)。")};if(t.commandArgs&&t.commandArgs.length>0)return{command:t.commandArgs.join(" ")};if(t.disposition==="done")return{ask_user:C(e,"No further workflow action; report the completed change to the user.","工作流已无后续动作;向用户报告该需求已完成即可。")};if(t.disposition==="blocked")return{ask_user:C(e,"Resolve the paused condition before continuing; run with --json for the structured diagnosis.","先解除暂停原因再继续;结构化诊断信息以 --json 输出为准。")}}function ig(t){if(!t||typeof t!="object"||Array.isArray(t))return!1;let e=t;return typeof e.total=="number"&&Array.isArray(e.items)}function ng(t,e){let r=typeof t.name=="string"?t.name:"(unnamed)",i=_l(t.phase,e),n=t.status==="await-user"?C(e,"waiting for a user decision","等待用户决定"):t.status==="blocked"?C(e,"paused","已暂停"):t.status==="done"?C(e,"complete","已完成"):C(e,"in progress","进行中"),a=Ta(t.acceptance)?`${C(e,", ",",")}${Il(t.acceptance,e)}`:"";return` ${r} · ${i||String(t.phase??"?")} · ${n}${a}`}function ag(t){for(let e of t){let r=e.continuation;if(r?.userCommunication&&typeof r.userCommunication.agentInstruction=="string"&&/[\u4e00-\u9fff]/u.test(r.userCommunication.agentInstruction))return"zh-CN"}return"en"}function og(t){if(!t||typeof t!="object"||Array.isArray(t))return!1;let e=t;return typeof e.healthy!="boolean"?!1:e.findings===void 0||Array.isArray(e.findings)}function sg(t){if(t.healthy){let i=t.repaired?C("en","Diagnostics passed and the reported problem was repaired automatically.","诊断通过,报告的问题已自动修复。"):C("en","Diagnostics passed: no problems found.","诊断通过:未发现问题。"),n=cg(t.continuation);return n?{summary:i,next:n}:{summary:i}}let r=Array.isArray(t.findings)?t.findings.length:0;return{summary:C("en",r>0?`Diagnostics found ${r} problem${r===1?"":"s"} that need attention before this change can continue.`:"Diagnostics found problems that need attention before this change can continue.",r>0?`诊断发现 ${r} 个需要处理的问题,处理后该需求才能继续。`:"诊断发现需要处理的问题,处理后该需求才能继续。"),next:{ask_user:C("en","Run with --json to read the structured findings; re-run with --repair once the cause is understood.","结构化诊断以 --json 输出为准;确认原因后再用 --repair 修复。")}}}function cg(t){return Tl(t)?jl(t,ja(t)):void 0}function $l(t){if(!t||typeof t!="object"||Array.isArray(t))return;let e=t;if(og(e))return sg(e);if(ig(e)){let i=ag(e.items);return{summary:[e.total===e.items.length?C(i,`Native changes (${e.total})`,`Native 需求列表(共 ${e.total} 条)`):C(i,`Native changes (showing ${e.items.length} of ${e.total})`,`Native 需求列表(显示 ${e.items.length}/${e.total} 条)`),...e.items.map(a=>ng(a,i))].join(`
179
+ `)}}let r=e.continuation;if(Tl(r))return rg(r,lg(e),ug(e,ja(r)));if(typeof e.artifactRoot=="string"&&typeof e.nativeRoot=="string"){let i=e.language==="zh-CN"?"zh-CN":"en",n="pendingRootMove"in e;return{summary:C(i,n?`Comet Native artifacts live under ${e.artifactRoot} (state root: ${e.nativeRoot}).`:`Initialized Comet Native at ${e.nativeRoot} (artifacts: ${e.artifactRoot}).`,n?`Comet Native 产物位于 ${e.artifactRoot}(状态根目录:${e.nativeRoot})。`:`Comet Native 已初始化于 ${e.nativeRoot}(产物目录:${e.artifactRoot})。`)}}}function lg(t){if(Ta(t.acceptance))return t.acceptance;let e=t.state;if(e&&typeof e=="object"&&!Array.isArray(e)){let r=e;if(Ta(r.acceptance))return r.acceptance;if(Array.isArray(r.acceptance))return eg(r.acceptance)}return null}function ug(t,e){if(t.selected!==void 0&&typeof t.selected=="string")return C(e,`Selected ${t.selected}.`,`已选择需求 ${t.selected}。`);let r=t.migration;return r&&typeof r=="object"&&r.completed===!0?C(e,"Upgraded this change to the current Native format.","已将该需求升级到当前 Native 格式。"):null}function Ol(t){let r=t.data&&typeof t.data=="object"&&!Array.isArray(t.data)?t.data:{};switch(t.code){case"conflict":return{summary:C("en","This change was updated elsewhere while the command ran, so the command stopped without changing anything. Nothing was lost — reload the latest state and continue from there.","这条需求刚被另一个会话更新,本次命令未做任何改动。没有工作丢失——重新读取最新状态后继续即可。"),...typeof r.change=="string"?{next:{command:`comet native status ${r.change} --json`}}:{}};case"baseline-incomplete":return{summary:C("en","The safety snapshot for this change exceeded its configured size budget, so the command stopped before changing anything. Raise the snapshot limits in .comet/config.yaml or exclude out-of-scope data, then retry.","该需求的安全快照超出配置的容量预算,命令在改动任何内容前已停止。请在 .comet/config.yaml 中调高快照上限,或将范围外的数据加入排除列表后重试。"),next:{ask_user:C("en","Run with --json to see the exact limits, omitted paths, and supported fixes.","具体上限、被省略的路径和支持的修复方式以 --json 输出为准。")}};case"workspace-isolation-required":return{summary:C("en","This change runs in its own Git worktree to keep work isolated. Create the linked worktree first, then continue inside it.","这条需求需要在独立的 Git worktree 中执行以保证隔离。请先创建关联的 worktree,然后在其中继续。"),next:{ask_user:C("en","Run with --json to see the exact worktree creation command.","完整的 worktree 创建命令以 --json 输出为准。")}};case"workspace-preparation-incomplete":return{summary:C("en","The change workspace is not fully prepared (for example a branch or worktree is missing). Finish the preparation steps, then retry.","需求的工作区尚未准备完成(例如分支或 worktree 缺失)。请先完成准备步骤,再重试。"),next:{ask_user:C("en","Run with --json to see the remaining preparation steps.","剩余的准备步骤以 --json 输出为准。")}};case"implementation-scope-stale":return{summary:C("en","The recorded implementation scope no longer matches the current files. Refresh the scope, then retry.","记录的实现范围与当前文件不再一致。请刷新范围后重试。"),next:{ask_user:C("en","Run with --json to see the exact recovery steps.","具体恢复步骤以 --json 输出为准。")}};default:return}}var Hl=["--project-root <path> Resolve the Native project from this working directory.","--json Emit the stable JSON command envelope.","--verbose Append the raw machine projection after the human/agent text.","--help Show help without requiring an initialized project."],Oa=Object.freeze({"":{usage:"comet native <command> [options]",purpose:"Create, inspect, recover, and archive portable Native changes through Runtime-enforced, skill-coordinated steps.",subcommands:["init Initialize Native project configuration.","root show Inspect the configured artifact root.","root move <artifact-root> Move the configured artifact root.","new <change-name> Create a change and prepare its workspace.","spec remove Record a complete capability removal intent.","show <change-name> Read formal artifacts and portable state.","status [<change-name>] Discover stable boundaries and Runner actions.","select <change-name> Select a change in its bound workspace.","next <change-name> Confirm or recover a stable workflow boundary.","archive <change-name> Preview and execute Archive plus workspace finish.","check <change-name> Run the read-only Native verification check.","doctor [<change-name>] Diagnose, migrate, or rebuild local execution state."],options:Hl,output:"A human summary plus a NEXT step by default (RELAY TO USER blocks carry user decisions); use --json for the structured envelope, --verbose to append the raw machine projection.",examples:["comet native status --json","comet native status my-change --details --json","comet native next --help"]},init:{usage:"comet native init [--root <artifact-root>] [--language en|zh-CN]",purpose:"Create or normalize .comet/config.yaml and the configured Native directories.",options:["--root <artifact-root> Project-relative artifact root; defaults to docs.","--language en|zh-CN Language for newly generated Native artifacts."],output:"The resolved project configuration and Native paths.",examples:["comet native init --root docs --language zh-CN"]},root:{usage:"comet native root <show|move> [arguments]",purpose:"Inspect or transactionally move the configured Native artifact root.",subcommands:["show Print the configured artifact root and resolved paths.","move <artifact-root> Move Native artifacts and update project configuration."],output:"The current root projection or the completed move result.",examples:["comet native root show","comet native root move artifacts/native"]},"root show":{usage:"comet native root show",purpose:"Print the configured Native artifact root and resolved paths.",output:"The configured artifact root and resolved Native paths."},"root move":{usage:"comet native root move <artifact-root>",purpose:"Transactionally move Native artifacts and update project configuration.",output:"The source, destination, and committed root-move transaction result.",examples:["comet native root move artifacts/native"]},new:{usage:"comet native new <change-name> [--language en|zh-CN] [--isolation current|branch|worktree] [--change-branch <branch>] [--target-branch <branch>] [--worktree-path <path>]",purpose:"Create a portable Native change and prepare the requested branch or linked worktree.",options:["--language en|zh-CN Artifact language; defaults to project configuration.","--isolation <kind> current, branch, or worktree; defaults to current.","--change-branch <branch> Change branch; defaults to comet/<change-name>.","--target-branch <branch> Local base branch; defaults to the current branch.","--worktree-path <path> Worktree directory; defaults to .worktrees/<change-name>."],output:"The portable state, workspace preparation result, and continuation with the next Runner action.",examples:["comet native new session-timeout --language zh-CN","comet native new session-timeout --isolation branch --target-branch main","comet native new session-timeout --isolation worktree --target-branch main"]},spec:{usage:"comet native spec remove <change-name> <capability>",purpose:"Record a capability removal; create and modify intents use complete proposed Spec files.",subcommands:["remove <change-name> <capability> Record a capability removal."],output:"The updated portable state and continuation."},"spec remove":{usage:"comet native spec remove <change-name> <capability>",purpose:"Record removal of a capability in the complete target specification.",output:"The updated portable state and continuation with the next Runner action."},show:{usage:"comet native show <change-name>",purpose:"Read formal artifacts and portable state for one Native change.",output:"The portable state, brief, complete proposed Specs, and continuation; legacy state is reported as migration-required."},status:{usage:"comet native status [<change-name>] [--cursor <token>] [--details]",purpose:"Discover portable stable boundaries, parent child readiness, or the exact next Runner action.",options:["--cursor <token> Continue a status-list page, or a named details/history page.","--details Include one fixed-size page of acceptance, Spec, handoff, verification, history, workspace, and report details."],output:"A compact v2 status page or one compact Loop projection with local execution availability. Use --details and --cursor to read fixed-size detail pages; parent changes expose childSummary and readyChildren.",examples:["comet native status --json","comet native status session-timeout --details --json"]},select:{usage:"comet native select <change-name>",purpose:"Select one Native change after validating its workspace binding.",output:"The selected change record."},next:{usage:`comet native next <change-name> --summary <text> [--confirmed] [--coordination-mode multi-session|single-session] [--accept-result|--revise-implementation|--revise-requirements|--retry-verifier|--resolve-verifier-blocker] [--max-parallel <n>] [--expected-state-version <n>] [--expected-action <action>]
180
+ comet native next <change-name> --runner-input <json-file>`,purpose:"Confirm or recover an Agent boundary, advance parent child changes, handle Supervisor task operations, or use one skill-coordinated JSON bridge for Builder handoff, check-plan dispatch, and Verifier response/error.",options:["--summary <text> Required transition or recovery summary.","--confirmed Confirm Shape or an explicitly degraded verifier-unavailable fallback before Archive.","--coordination-mode multi-session|single-session Required when confirming a multi-child Supervisor Shape.","--accept-result Accept the current skill-coordinated Verify result and make it archive-ready.","--revise-implementation Keep confirmed requirements unchanged and return Verify to Build for implementation revision.","--revise-requirements Return Verify or Archive to Shape when user-visible goals or acceptance criteria must change.","--retry-verifier Retry a failed or unavailable Verifier when the continuation allows it.","--resolve-verifier-blocker Resolve a semantic Verifier blocker without changing the candidate, then dispatch a new attempt.","--max-parallel <n> Supervisor task concurrency cap; defaults to 2, use 1 for serial fallback.","--expected-state-version <n> Continuation-issued guard that rejects stale public transition decisions.","--expected-action <action> Continuation-issued guard that binds the public transition decision to its intended action.","--runner-input <file> Skill-coordinated JSON: builder-handoff, dispatch-verifier, verifier-response, verifier-execution-error, or verifier-unavailable. Identity/provider/execution/candidate fields are rejected."," builder-handoff fields: kind, summary, addressed_acceptance_ids, checks, known_limits, review. review fields: status=passed, summary, reviewer_execution_ref from a separate read-only review."," dispatch-verifier fields: kind, checks (an explicitly resolved plan; [] is allowed)."," verifier-response fields: kind, response (request-checks or final-result)."," verifier-execution-error fields: kind, summary, stateVersion, iteration, attempt, verifierExecutionRef copied from verifierDispatch."," verifier-unavailable fields: kind, summary, stateVersion, iteration, attempt, verifierExecutionRef copied from verifierDispatch; accepted only after the explicit Runtime check plan completed and passed."," Supervisor task fields: supervisor-builder-result (child, runId, candidateCommit), supervisor-builder-failure (child, runId, reason), supervisor-verifier-result (child, runId, verdict, verification data), supervisor-reconnect (child, runId), supervisor-cancel (child, runId, reason), or supervisor-integrate (child, checks)."],output:'A compact portable state summary, explicit skill-coordinated label, Runtime-owned check results, scoped verifierDispatch, bounded request-check response, continuation.runnerAction, machine-readable continuation.inputOptions, and continuation.userCommunication with a user-ready message and Agent relay guidance. Read acceptance text and other long fields from paged status --details output. Human-readable verification statuses include "Host independently verified", "Checks completed, but your confirmation is required", "Full verification was unavailable; only automatic checks completed", and "You accepted the incomplete verification result". This generic bridge is not trusted identity attestation: a passing result waits for explicit user confirmation before Archive.',examples:['comet native next session-timeout --summary "Shape confirmed" --confirmed','comet native next session-timeout --summary "Current result accepted" --accept-result','comet native next session-timeout --summary "Implementation needs revision" --revise-implementation','comet native next session-timeout --summary "Acceptance criteria changed" --revise-requirements','comet native next session-timeout --summary "Retry verifier infrastructure" --retry-verifier','comet native next session-timeout --summary "Retry semantic verification" --resolve-verifier-blocker',"comet native next session-timeout --runner-input <temporary-json-file>"]},archive:{usage:`comet native archive <change-name> --dry-run [--finish merge|push|pull-request|keep]
181
+ comet native archive <change-name> [--confirmed] [--serial-first <current-change>]`,purpose:"Preview or execute deterministic Archive after the portable state reaches archive-ready.",options:["--dry-run Inspect readiness without rerunning verification.","--finish <action> Persist merge, push, pull-request, or keep for an isolated workspace.","--serial-first <current-change> During execution only, confirm that this change archives before detected capability peers; the value must equal <change-name>.","--confirmed Confirm Archive when project policy requires it."],output:"Readiness plus continuation, or the completed Archive transaction and workspace finish result; Archive does not repeat verification."},doctor:{usage:"comet native doctor [<change-name>] [--repair]",purpose:"Inspect portable state, migrate a legacy active change, or rebuild its local execution overlay.",options:["--repair Apply deterministic migration or rebuild from the portable stable boundary."],output:"Health, migration or recovery details, and the continuation with the next Runner action."}});function $a(t,e){return`${t}:
182
+ ${e.map(r=>` ${r}`).join(`
183
+ `)}`}function dg(t){let e=t.filter(i=>i!=="--help");if(e.length===0)return"";let r=e.slice(0,2).join(" ");return Oa[r]||e.length>1&&Oa[e[0]]?.subcommands?r:e[0]}function fg(t=[]){let e=dg(t),r=Oa[e];if(!r)throw new Error(`Unknown Native help topic: ${e}`);let i=[`Usage: ${r.usage}`,"",r.purpose];r.subcommands&&i.push("",$a("Commands",r.subcommands));let n=e===""?r.options:[...r.options??[],...Hl];return n&&n.length>0&&i.push("",$a("Options",n)),i.push("",`Output:
184
+ ${r.output}`),r.examples&&i.push("",$a("Examples",r.examples)),e===""&&i.push("","Run `comet native <command> --help` for command-specific details."),{topic:e,usage:`${i.join(`
181
185
  `)}
182
- `}}var Lv=Bv().usage;var lT=10*1024*1024,Ae=class extends Error{};function Sl(r,e){let t=r.flatMap((i,n)=>i===e?[n]:[]);if(t.length>1)throw new Ae(`${e} may only be provided once`);return t.length===0?!1:(r.splice(t[0],1),!0)}function er(r,e){let t=r.flatMap((a,o)=>a===e?[o]:[]);if(t.length>1)throw new Ae(`${e} may only be provided once`);if(t.length===0)return;let i=t[0],n=r[i+1];if(n===void 0||n.startsWith("--"))throw new Ae(`${e} requires a value`);return r.splice(i,2),n}function El(r){if(r.length>0)throw new Ae(`Unexpected argument: ${r[0]}`)}function Cl(r,e="en"){let t=er(r,"--language")??e;if(t!=="en"&&t!=="zh-CN")throw new Ae("--language must be en or zh-CN");return t}function Ta(r,e){let t=Zt.normalize(kl(r)),i=Zt.normalize(kl(e));return process.platform==="win32"?t.toLowerCase()===i.toLowerCase():t===i}function kl(r){let e=Zt.resolve(r);try{return Mv.native(e)}catch{return e}}function Vv(r){let e=Zt.resolve(r),t=Ee(process.cwd());if(!t.isSecondaryWorktree||t.currentWorktreeRoot===null||t.primaryWorktreeRoot===null)return e;let i=Ee(e);return!i.isGitWorktree||i.currentWorktreeRoot===null||i.primaryWorktreeRoot===null||!Ta(t.primaryWorktreeRoot,i.primaryWorktreeRoot)||Ta(t.currentWorktreeRoot,i.currentWorktreeRoot)?e:Ta(process.cwd(),t.currentWorktreeRoot)?Zt.resolve(process.cwd()):t.currentWorktreeRoot}async function xl(r){return r?Vv(r):wa(process.cwd())}function Pl(r,e,t){return{command:r,exitCode:0,data:e,text:t??JSON.stringify(e,null,2)+`
183
- `}}function Rl(r,e){if(e instanceof Ae)return{command:r,exitCode:64,error:{code:"usage",message:e.message}};if(e instanceof wi)return{command:r,exitCode:73,data:{capability:e.capability,expectedHash:e.expectedHash,actualHash:e.actualHash,canonicalPath:e.canonicalPath},error:{code:"conflict",message:e.message}};if(e instanceof yi)return{command:r,exitCode:73,data:e.preflight,error:{code:"conflict",message:e.message}};if(e instanceof pi)return{command:r,exitCode:73,data:{change:e.change,expectedRevision:e.expectedRevision,actualRevision:e.actualRevision,outcome:"revision-conflict"},error:{code:"conflict",message:e.message}};if(e instanceof Kt)return{command:r,exitCode:73,data:{requestedIsolation:e.requestedIsolation,activeChanges:e.activeChanges,requiredAction:"create-native-worktree"},error:{code:"workspace-isolation-required",message:e.message}};if(e instanceof gi)return{command:r,exitCode:73,data:{preparation:e.preparation},error:{code:"workspace-preparation-incomplete",message:e.message}};if(e instanceof mi)return{command:r,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 vi)return{command:r,exitCode:65,data:{receiptBindingFailures:e.details},error:{code:"invalid-data",message:e.message}};if(e instanceof Qt)return{command:r,exitCode:65,data:e.recovery,error:{code:"implementation-scope-stale",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:r,exitCode:70,error:{code:"internal",message:e.message}};let i=/\b(lock|transaction|conflict|occupied|incomplete|recovery)\b/iu.test(e.message);return{command:r,exitCode:i?73:65,error:{code:i?"conflict":"invalid-data",message:e.message}}}return{command:r,exitCode:70,error:{code:"internal",message:String(e)}}}function Al(r,e){return e?{exitCode:r.exitCode,stdout:JSON.stringify({command:r.command,exitCode:r.exitCode,...r.data===void 0?{}:{data:r.data},...r.error===void 0?{}:{error:r.error}})+`
184
- `}:r.error?{exitCode:r.exitCode,stderr:r.error.message}:{exitCode:r.exitCode,stdout:r.text}}async function _l(r,e){let t=er(r,"--root"),i=await ee(e),n=Cl(r,i?.native.language??"en");if(El(r),i?.native.pending_root_move)throw new Error(`Native root move ${i.native.pending_root_move.id} is incomplete`);let a=Jt(t??i?.native.artifact_root??"docs");if(i&&t&&i.native.artifact_root!==a)throw new Error(`Configured Native artifact root is ${i.native.artifact_root}; refusing conflicting root ${a}`);let o=i?{...i,native:{...i.native,language:n,snapshot:{...i.native.snapshot,exclude:Fc(i.native.snapshot.exclude)}}}:qc(a,n),s=await Le(e,o.native.artifact_root);return await Vc(s),await ya(e),await Gt(e,o),Pl("init",{projectRoot:e,artifactRoot:o.native.artifact_root,nativeRoot:s.nativeRoot,language:n},`Initialized Comet Native at ${s.nativeRoot}
185
- `)}function Fv(r){return{exitCode:r.exitCode,stdout:JSON.stringify({command:r.command,exitCode:r.exitCode,...r.data===void 0?{}:{data:r.data},...r.error===void 0?{}:{error:r.error}})+`
186
- `}}async function Tl(r,e,t=process.argv.slice(2)){let i=t.indexOf("--"),n=i<0?[...t]:t.slice(0,i),a=i<0?[]:t.slice(i),o=n.includes("--json"),s,c;try{Sl(n,"--json"),s=er(n,"--project-root");let f=[...n,...a],u=await xl(s);c=await e(f,u)}catch(f){c=Rl(r,f)}let l=o?Fv(c):Al(c,!1);return l.stdout&&process.stdout.write(l.stdout),l.stderr&&process.stderr.write(l.stderr+(l.stderr.endsWith(`
186
+ `}}var hg=fg().usage;var GI=10*1024*1024,Ie=class extends Error{};function Da(t,e){let r=t.flatMap((i,n)=>i===e?[n]:[]);if(r.length>1)throw new Ie(`${e} may only be provided once`);return r.length===0?!1:(t.splice(r[0],1),!0)}function rr(t,e){let r=t.flatMap((a,o)=>a===e?[o]:[]);if(r.length>1)throw new Ie(`${e} may only be provided once`);if(r.length===0)return;let i=r[0],n=t[i+1];if(n===void 0||n.startsWith("--"))throw new Ie(`${e} requires a value`);return t.splice(i,2),n}function Ll(t){if(t.length>0)throw new Ie(`Unexpected argument: ${t[0]}`)}function Bl(t,e="en"){let r=rr(t,"--language")??e;if(r!=="en"&&r!=="zh-CN")throw new Ie("--language must be en or zh-CN");return r}function Ha(t,e){let r=tr.normalize(Dl(t)),i=tr.normalize(Dl(e));return process.platform==="win32"?r.toLowerCase()===i.toLowerCase():r===i}function Dl(t){let e=tr.resolve(t);try{return pg.native(e)}catch{return e}}function mg(t){let e=tr.resolve(t),r=xe(process.cwd());if(!r.isSecondaryWorktree||r.currentWorktreeRoot===null||r.primaryWorktreeRoot===null)return e;let i=xe(e);return!i.isGitWorktree||i.currentWorktreeRoot===null||i.primaryWorktreeRoot===null||!Ha(r.primaryWorktreeRoot,i.primaryWorktreeRoot)||Ha(r.currentWorktreeRoot,i.currentWorktreeRoot)?e:Ha(process.cwd(),r.currentWorktreeRoot)?tr.resolve(process.cwd()):r.currentWorktreeRoot}async function Ml(t){return t?mg(t):Na(process.cwd())}function Vl(t){return JSON.stringify(t,null,2)+`
187
+ `}function Fl(t,e,r){return{command:t,exitCode:0,data:e,text:r??Vl(e)}}function vg(t,e){if(e instanceof Ie)return{command:t,exitCode:64,error:{code:"usage",message:e.message}};if(e instanceof Ei)return{command:t,exitCode:73,data:{capability:e.capability,expectedHash:e.expectedHash,actualHash:e.actualHash,canonicalPath:e.canonicalPath},error:{code:"conflict",message:e.message}};if(e instanceof Ci)return{command:t,exitCode:73,data:e.preflight,error:{code:"conflict",message:e.message}};if(e instanceof Ni)return{command:t,exitCode:73,data:{change:e.change,expectedRevision:e.expectedRevision,actualRevision:e.actualRevision,outcome:"revision-conflict"},error:{code:"conflict",message:e.message}};if(e instanceof Xt)return{command:t,exitCode:73,data:{requestedIsolation:e.requestedIsolation,activeChanges:e.activeChanges,requiredAction:"create-native-worktree"},error:{code:"workspace-isolation-required",message:e.message}};if(e instanceof Si)return{command:t,exitCode:73,data:{preparation:e.preparation},error:{code:"workspace-preparation-incomplete",message:e.message}};if(e instanceof bi)return{command:t,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 ki)return{command:t,exitCode:65,data:{receiptBindingFailures:e.details},error:{code:"invalid-data",message:e.message}};if(e instanceof er)return{command:t,exitCode:65,data:e.recovery,error:{code:"implementation-scope-stale",message:e.message}};if(e instanceof Error){let r=e.code;if(r&&new Set(["EACCES","EPERM","EIO","EMFILE","ENFILE","ENOSPC","EROFS"]).has(r))return{command:t,exitCode:70,error:{code:"internal",message:e.message}};let i=/\b(lock|transaction|conflict|occupied|incomplete|recovery)\b/iu.test(e.message);return{command:t,exitCode:i?73:65,error:{code:i?"conflict":"invalid-data",message:e.message}}}return{command:t,exitCode:70,error:{code:"internal",message:String(e)}}}function ql(t,e){let r=vg(t,e),i=r.error;if(!i)return r;let n=Ol({code:i.code,message:i.message,data:r.data});return n?{...r,envelope:n}:r}function Wl(t,e,r=!1){let i=t.envelope??$l(t.data);return e?{exitCode:t.exitCode,stdout:JSON.stringify({command:t.command,exitCode:t.exitCode,...i===void 0?{}:{summary:i.summary,...i.next===void 0?{}:{next:i.next},...i.user_message===void 0?{}:{user_message:i.user_message}},...t.data===void 0?{}:{data:t.data},...t.error===void 0?{}:{error:t.error}})+`
188
+ `}:t.error?{exitCode:t.exitCode,stderr:i?rl(i,t.error.message,r?t.data:void 0):t.error.message}:i?{exitCode:t.exitCode,stdout:tl(i,r?t.data:void 0)}:r&&t.text!==void 0&&t.data!==void 0&&t.text!==Vl(t.data)?{exitCode:t.exitCode,stdout:`${t.text}
189
+ ${ce.details}
190
+ ${JSON.stringify(t.data,null,2)}
191
+ `}:{exitCode:t.exitCode,stdout:t.text}}async function zl(t,e){let r=rr(t,"--root"),i=await te(e),n=Bl(t,i?.native.language??"en");if(Ll(t),i?.native.pending_root_move)throw new Error(`Native root move ${i.native.pending_root_move.id} is incomplete`);let a=Ut(r??i?.native.artifact_root??"docs");if(i&&r&&i.native.artifact_root!==a)throw new Error(`Configured Native artifact root is ${i.native.artifact_root}; refusing conflicting root ${a}`);let o=i?{...i,native:{...i.native,language:n,snapshot:{...i.native.snapshot,exclude:Uc(i.native.snapshot.exclude)}}}:Kc(a,n),s=await Ve(e,o.native.artifact_root);return await Gc(s),await ba(e),await Kt(e,o),Fl("init",{projectRoot:e,artifactRoot:o.native.artifact_root,nativeRoot:s.nativeRoot,language:n},`Initialized Comet Native at ${s.nativeRoot}
192
+ `)}async function Jl(t,e,r=process.argv.slice(2)){let i=r.indexOf("--"),n=i<0?[...r]:r.slice(0,i),a=i<0?[]:r.slice(i),o=n.includes("--json"),s=n.includes("--verbose"),c,l;try{Da(n,"--json"),Da(n,"--verbose"),c=rr(n,"--project-root");let u=[...n,...a],d=await Ml(c);l=await e(u,d)}catch(u){l=ql(t,u)}let f=Wl(l,o,s);return f.stdout&&process.stdout.write(f.stdout),f.stderr&&process.stderr.write(f.stderr+(f.stderr.endsWith(`
187
193
  `)?"":`
188
- `)),l.exitCode}process.exitCode=await Tl("init",_l);
194
+ `)),f.exitCode}process.exitCode=await Jl("init",zl);