codeassembly-guidance 0.0.0 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (204) hide show
  1. package/.meta/changelog.json +563 -0
  2. package/CHANGELOG.md +134 -0
  3. package/LICENSE +7 -0
  4. package/README.md +165 -1
  5. package/content/_partials/README.md +192 -0
  6. package/content/_partials/code-descriptions.md +4 -0
  7. package/content/_partials/code-style.md +7 -0
  8. package/content/_partials/comment-discipline.md +89 -0
  9. package/content/_partials/concision.md +3 -0
  10. package/content/_partials/diff-audit-checklist.md +9 -0
  11. package/content/_partials/file-access.md +4 -0
  12. package/content/_partials/live-repo-writes.md +13 -0
  13. package/content/_partials/plain-speech-calibration.md +66 -0
  14. package/content/_partials/plain-speech.md +13 -0
  15. package/content/_partials/prose-line-breaks.md +3 -0
  16. package/content/_partials/record-marker.md +1 -0
  17. package/content/_partials/reduced-object-relative.md +28 -0
  18. package/content/_partials/shell-commands.md +3 -0
  19. package/content/_partials/target-file-set-resolution.md +22 -0
  20. package/content/_partials/technical-recommendations.md +5 -0
  21. package/content/_partials/test-structure-audit-checklist.md +7 -0
  22. package/content/_partials/ticket-assessment-baseline.md +12 -0
  23. package/content/_partials/ticket-assessment.md +202 -0
  24. package/content/_partials/work-type-choice.md +13 -0
  25. package/content/codeassembly-content.yaml +49 -0
  26. package/content/collections/all.md +11 -0
  27. package/content/collections/atlassian.md +16 -0
  28. package/content/collections/recommended.md +34 -0
  29. package/content/collections/triage.md +77 -0
  30. package/content/collections/williamthorsen.md +25 -0
  31. package/content/guidance/README.md +22 -0
  32. package/content/guidance/_harnesses/claude/CLAUDE.md +6 -0
  33. package/content/guidance/_harnesses/rovo/AGENTS.md +5 -0
  34. package/content/guidance/_harnesses/rovo/codeassembly-guidance.md +4 -0
  35. package/content/guidance/rulebooks/accessibility-conventions.md +20 -0
  36. package/content/guidance/rulebooks/codeassembly-content-specification.md +161 -0
  37. package/content/guidance/rulebooks/command-output-conventions.md +14 -0
  38. package/content/guidance/rulebooks/commit-conventions.md +72 -0
  39. package/content/guidance/rulebooks/generated-content-policy.md +10 -0
  40. package/content/guidance/rulebooks/live-worktree-policy.md +18 -0
  41. package/content/guidance/rulebooks/readme-conventions.md +74 -0
  42. package/content/guidance/rulebooks/shared-data-conventions.md +14 -0
  43. package/content/guidance/rulebooks/shell-conventions.md +279 -0
  44. package/content/guidance/rulebooks/williamthorsen-code-layout-preferences.md +102 -0
  45. package/content/guidance/rulebooks/williamthorsen-collaboration-preferences.md +58 -0
  46. package/content/guidance/rulebooks/williamthorsen-comment-preferences.md +30 -0
  47. package/content/guidance/rulebooks/williamthorsen-subagent-model-preferences.md +15 -0
  48. package/content/guidance/rulebooks/williamthorsen-ticketing-preferences.md +22 -0
  49. package/content/guidance/rulebooks/williamthorsen-tooling-preferences.md +36 -0
  50. package/content/guidance/rulebooks/williamthorsen-typescript-preferences.md +90 -0
  51. package/content/guidance/rulebooks/williamthorsen-workflow-preferences.md +58 -0
  52. package/content/guidance/rulebooks/williamthorsen-writing-preferences.md +80 -0
  53. package/content/guidance/shared/AGENTS.md +43 -0
  54. package/content/scripts/README.md +41 -0
  55. package/content/scripts/describe-change.mjs +165 -0
  56. package/content/scripts/get-ticket-id.sh +131 -0
  57. package/content/scripts/manage-jira-ticket.mjs +209 -0
  58. package/content/scripts/resolve-frontmatter.sh +540 -0
  59. package/content/scripts/resolve-review-run.mjs +12 -0
  60. package/content/scripts/select-lede-exemplars.mjs +208 -0
  61. package/content/skills/_data/action-items.md +83 -0
  62. package/content/skills/_data/artifact-conventions.md +969 -0
  63. package/content/skills/_data/bitbucket-pr-access.md +89 -0
  64. package/content/skills/_data/branch-format.md +34 -0
  65. package/content/skills/_data/change-record.md +163 -0
  66. package/content/skills/_data/complexity-classification.md +58 -0
  67. package/content/skills/_data/concision.md +23 -0
  68. package/content/skills/_data/deployed-file-provenance.md +46 -0
  69. package/content/skills/_data/design-priorities.md +76 -0
  70. package/content/skills/_data/gh-body-file.md +30 -0
  71. package/content/skills/_data/git-commands.md +39 -0
  72. package/content/skills/_data/naming-conventions.md +50 -0
  73. package/content/skills/_data/pr-resolution.md +25 -0
  74. package/content/skills/_data/pr-source-resolution.md +36 -0
  75. package/content/skills/_data/recommendation-gradient.md +90 -0
  76. package/content/skills/_data/scope-and-deferral.md +83 -0
  77. package/content/skills/_data/spike-conventions.md +89 -0
  78. package/content/skills/_data/ticket-evaluation.md +13 -0
  79. package/content/skills/_data/ticket-id-extraction.md +43 -0
  80. package/content/skills/_data/ticket-source-resolution.md +147 -0
  81. package/content/skills/_data/title-templates.md +624 -0
  82. package/content/skills/_data/title-voice.md +17 -0
  83. package/content/skills/_data/work-types.json +168 -0
  84. package/content/skills/_partials/acceptance-criteria-scaffold.md +15 -0
  85. package/content/skills/_partials/action-items.md +22 -0
  86. package/content/skills/_partials/bitbucket-delete-both-refusal.md +3 -0
  87. package/content/skills/_partials/commit-title-rendering.md +14 -0
  88. package/content/skills/_partials/gh-body-file.md +22 -0
  89. package/content/skills/_partials/nested-list-indent.md +9 -0
  90. package/content/skills/_partials/next-steps-after-plan.md +99 -0
  91. package/content/skills/_partials/next-steps-after-review.md +350 -0
  92. package/content/skills/_partials/option-format.md +84 -0
  93. package/content/skills/_partials/plan-template.md +97 -0
  94. package/content/skills/_partials/split-launch-prompts.md +5 -0
  95. package/content/skills/_partials/split-ticket-compose.md +5 -0
  96. package/content/skills/_partials/split-ticket-create.md +3 -0
  97. package/content/skills/_partials/ticket-and-plan-completeness.md +33 -0
  98. package/content/skills/_partials/ticket-concision.md +18 -0
  99. package/content/skills/_partials/ticket-criteria-conventions.md +7 -0
  100. package/content/skills/_partials/ticket-placement.md +14 -0
  101. package/content/skills/_partials/ticket-skeleton-tiers.md +6 -0
  102. package/content/skills/_partials/ticket-skeleton.md +13 -0
  103. package/content/skills/add-change-record/SKILL.md +136 -0
  104. package/content/skills/add-test-ids/SKILL.md +51 -0
  105. package/content/skills/align-ticket-with-implementation/SKILL.md +115 -0
  106. package/content/skills/anti-patterns/SKILL.md +57 -0
  107. package/content/skills/assess-ticket/SKILL.md +46 -0
  108. package/content/skills/assess-ticket/next-steps-after-assessment.md +98 -0
  109. package/content/skills/brainstorming/SKILL.md +107 -0
  110. package/content/skills/capture-event/SKILL.md +108 -0
  111. package/content/skills/capture-event/capture-event.mjs +216 -0
  112. package/content/skills/capture-feedback/SKILL.md +71 -0
  113. package/content/skills/capture-lede-decision/SKILL.md +163 -0
  114. package/content/skills/capture-lede-decision/capture-lede-decision.mjs +231 -0
  115. package/content/skills/classify-complexity/SKILL.md +92 -0
  116. package/content/skills/collaborate/SKILL.md +86 -0
  117. package/content/skills/condense-branch/SKILL.md +83 -0
  118. package/content/skills/create-bitbucket-pr/SKILL.md +87 -0
  119. package/content/skills/create-commit/SKILL.md +65 -0
  120. package/content/skills/create-devlog/SKILL.md +108 -0
  121. package/content/skills/create-gh-pr/SKILL.md +106 -0
  122. package/content/skills/create-pr/SKILL.md +150 -0
  123. package/content/skills/create-ticket/SKILL.md +350 -0
  124. package/content/skills/derive-session-context/derive-session-context.mjs +148 -0
  125. package/content/skills/design-and-plan/SKILL.md +194 -0
  126. package/content/skills/development-workflows/SKILL.md +41 -0
  127. package/content/skills/get-ticket-id/SKILL.md +67 -0
  128. package/content/skills/groom-backlog/SKILL.md +245 -0
  129. package/content/skills/groom-backlog/groom-backlog.mjs +106 -0
  130. package/content/skills/implement-plan/SKILL.md +164 -0
  131. package/content/skills/index-prototypes/SKILL.md +145 -0
  132. package/content/skills/index-prototypes/index-prototypes.mjs +328 -0
  133. package/content/skills/kb-add/SKILL.md +156 -0
  134. package/content/skills/kb-add/kb-add.mjs +216 -0
  135. package/content/skills/kb-curate/SKILL.md +117 -0
  136. package/content/skills/kb-curate/kb-curate.mjs +213 -0
  137. package/content/skills/kb-edit/SKILL.md +128 -0
  138. package/content/skills/kb-edit/kb-edit.mjs +219 -0
  139. package/content/skills/kb-retrieve/SKILL.md +100 -0
  140. package/content/skills/kb-retrieve/kb-retrieve.mjs +206 -0
  141. package/content/skills/kb-retrieve-events/SKILL.md +98 -0
  142. package/content/skills/kb-retrieve-events/kb-retrieve-events.mjs +206 -0
  143. package/content/skills/kb-update-events/SKILL.md +77 -0
  144. package/content/skills/kb-update-events/kb-update-events.mjs +215 -0
  145. package/content/skills/merge-bb-pr/SKILL.md +136 -0
  146. package/content/skills/merge-gh-pr/SKILL.md +167 -0
  147. package/content/skills/merge-gh-pr/merge-gh-pr.mjs +10 -0
  148. package/content/skills/merge-pr/SKILL.md +368 -0
  149. package/content/skills/migrate-feedback-memories/SKILL.md +136 -0
  150. package/content/skills/migrate-feedback-memories/feedback-memories.mjs +161 -0
  151. package/content/skills/people-report/SKILL.md +208 -0
  152. package/content/skills/plan/SKILL.md +87 -0
  153. package/content/skills/prepare-prototype-brief/SKILL.md +126 -0
  154. package/content/skills/pull-from-backlog/SKILL.md +83 -0
  155. package/content/skills/pull-from-backlog/pull-from-backlog.mjs +208 -0
  156. package/content/skills/refine-plan/SKILL.md +259 -0
  157. package/content/skills/respond-to-review/SKILL.md +292 -0
  158. package/content/skills/review-bb-pr/SKILL.md +161 -0
  159. package/content/skills/review-branch/SKILL.md +301 -0
  160. package/content/skills/review-criteria/SKILL.md +108 -0
  161. package/content/skills/review-gh-pr/SKILL.md +155 -0
  162. package/content/skills/review-gh-pr/select-pr-ticket.mjs +8 -0
  163. package/content/skills/review-permissions/SKILL.md +39 -0
  164. package/content/skills/review-pr/SKILL.md +123 -0
  165. package/content/skills/revise-comments/SKILL.md +115 -0
  166. package/content/skills/revise-prose/SKILL.md +197 -0
  167. package/content/skills/revise-prose/revise-prose.mjs +229 -0
  168. package/content/skills/save-artifact/SKILL.md +69 -0
  169. package/content/skills/save-plan/SKILL.md +55 -0
  170. package/content/skills/software-engineering/SKILL.md +74 -0
  171. package/content/skills/streamline-guidance/SKILL.md +174 -0
  172. package/content/skills/streamline-guidance/streamline-guidance.mjs +211 -0
  173. package/content/skills/summarize-change/SKILL.md +308 -0
  174. package/content/skills/summarize-chat/SKILL.md +100 -0
  175. package/content/skills/systematic-debugging/SKILL.md +308 -0
  176. package/content/skills/systematic-debugging/condition-based-waiting-example.ts +160 -0
  177. package/content/skills/systematic-debugging/condition-based-waiting.md +122 -0
  178. package/content/skills/systematic-debugging/defense-in-depth.md +130 -0
  179. package/content/skills/systematic-debugging/find-polluter.sh +68 -0
  180. package/content/skills/systematic-debugging/root-cause-tracing.md +185 -0
  181. package/content/skills/systematic-debugging/test-academic.md +16 -0
  182. package/content/skills/systematic-debugging/test-pressure-1.md +67 -0
  183. package/content/skills/systematic-debugging/test-pressure-2.md +77 -0
  184. package/content/skills/systematic-debugging/test-pressure-3.md +77 -0
  185. package/content/skills/testing-conventions/SKILL.md +168 -0
  186. package/content/skills/testing-conventions/mistakes.md +1 -0
  187. package/content/skills/typescript-testing-conventions/SKILL.md +129 -0
  188. package/content/skills/update-jira-ticket/SKILL.md +245 -0
  189. package/content/skills/update-jira-ticket/update-jira-ticket.mjs +9 -0
  190. package/content/skills/update-project-guidance/SKILL.md +300 -0
  191. package/content/skills/upgrade-dependencies/SKILL.md +139 -0
  192. package/content/skills/wrap-up/SKILL.md +431 -0
  193. package/content/subagents/_data/claude.yaml +19 -0
  194. package/content/subagents/_data/rovo.yaml +31 -0
  195. package/content/subagents/canary.md +11 -0
  196. package/content/subagents/entry-drafter.md +187 -0
  197. package/content/subagents/handoff-reviewer.md +75 -0
  198. package/content/subagents/plan-reviewer.md +184 -0
  199. package/content/subagents/plan-reviser.md +88 -0
  200. package/content/subagents/prose-reviser.md +130 -0
  201. package/content/subagents/ticket-assessor.md +139 -0
  202. package/package.json +70 -2
  203. package/schemas/preferences.v1.json +294 -0
  204. package/schemas/work-types.v1.json +142 -0
@@ -0,0 +1,148 @@
1
+ import { createRequire as __cjsCreateRequire } from 'node:module';
2
+ const require = __cjsCreateRequire(import.meta.url);
3
+ var ta=Object.create;var ns=Object.defineProperty;var sa=Object.getOwnPropertyDescriptor;var na=Object.getOwnPropertyNames;var ia=Object.getPrototypeOf,ra=Object.prototype.hasOwnProperty;var a=(s,e)=>ns(s,"name",{value:e,configurable:!0}),st=(s=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(s,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):s)(function(s){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+s+'" is not supported')});var y=(s,e)=>()=>{try{return e||s((e={exports:{}}).exports,e),e.exports}catch(t){throw e=0,t}};var oa=(s,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of na(e))!ra.call(s,i)&&i!==t&&ns(s,i,{get:()=>e[i],enumerable:!(n=sa(e,i))||n.enumerable});return s};var aa=(s,e,t)=>(t=s!=null?ta(ia(s)):{},oa(e||!s||!s.__esModule?ns(t,"default",{value:s,enumerable:!0}):t,s));var O=y(I=>{"use strict";var rs=Symbol.for("yaml.alias"),ii=Symbol.for("yaml.document"),rt=Symbol.for("yaml.map"),ri=Symbol.for("yaml.pair"),os=Symbol.for("yaml.scalar"),ot=Symbol.for("yaml.seq"),U=Symbol.for("yaml.node.type"),Ta=a(s=>!!s&&typeof s=="object"&&s[U]===rs,"isAlias"),La=a(s=>!!s&&typeof s=="object"&&s[U]===ii,"isDocument"),_a=a(s=>!!s&&typeof s=="object"&&s[U]===rt,"isMap"),Ca=a(s=>!!s&&typeof s=="object"&&s[U]===ri,"isPair"),oi=a(s=>!!s&&typeof s=="object"&&s[U]===os,"isScalar"),Pa=a(s=>!!s&&typeof s=="object"&&s[U]===ot,"isSeq");function ai(s){if(s&&typeof s=="object")switch(s[U]){case rt:case ot:return!0}return!1}a(ai,"isCollection");function Ia(s){if(s&&typeof s=="object")switch(s[U]){case rs:case rt:case os:case ot:return!0}return!1}a(Ia,"isNode");var Ma=a(s=>(oi(s)||ai(s))&&!!s.anchor,"hasAnchor");I.ALIAS=rs;I.DOC=ii;I.MAP=rt;I.NODE_TYPE=U;I.PAIR=ri;I.SCALAR=os;I.SEQ=ot;I.hasAnchor=Ma;I.isAlias=Ta;I.isCollection=ai;I.isDocument=La;I.isMap=_a;I.isNode=Ia;I.isPair=Ca;I.isScalar=oi;I.isSeq=Pa});var Ae=y(as=>{"use strict";var P=O(),M=Symbol("break visit"),li=Symbol("skip children"),j=Symbol("remove node");function at(s,e){let t=ci(e);P.isDocument(s)?he(null,s.contents,t,Object.freeze([s]))===j&&(s.contents=null):he(null,s,t,Object.freeze([]))}a(at,"visit");at.BREAK=M;at.SKIP=li;at.REMOVE=j;function he(s,e,t,n){let i=fi(s,e,t,n);if(P.isNode(i)||P.isPair(i))return ui(s,n,i),he(s,i,t,n);if(typeof i!="symbol"){if(P.isCollection(e)){n=Object.freeze(n.concat(e));for(let r=0;r<e.items.length;++r){let o=he(r,e.items[r],t,n);if(typeof o=="number")r=o-1;else{if(o===M)return M;o===j&&(e.items.splice(r,1),r-=1)}}}else if(P.isPair(e)){n=Object.freeze(n.concat(e));let r=he("key",e.key,t,n);if(r===M)return M;r===j&&(e.key=null);let o=he("value",e.value,t,n);if(o===M)return M;o===j&&(e.value=null)}}return i}a(he,"visit_");async function lt(s,e){let t=ci(e);P.isDocument(s)?await de(null,s.contents,t,Object.freeze([s]))===j&&(s.contents=null):await de(null,s,t,Object.freeze([]))}a(lt,"visitAsync");lt.BREAK=M;lt.SKIP=li;lt.REMOVE=j;async function de(s,e,t,n){let i=await fi(s,e,t,n);if(P.isNode(i)||P.isPair(i))return ui(s,n,i),de(s,i,t,n);if(typeof i!="symbol"){if(P.isCollection(e)){n=Object.freeze(n.concat(e));for(let r=0;r<e.items.length;++r){let o=await de(r,e.items[r],t,n);if(typeof o=="number")r=o-1;else{if(o===M)return M;o===j&&(e.items.splice(r,1),r-=1)}}}else if(P.isPair(e)){n=Object.freeze(n.concat(e));let r=await de("key",e.key,t,n);if(r===M)return M;r===j&&(e.key=null);let o=await de("value",e.value,t,n);if(o===M)return M;o===j&&(e.value=null)}}return i}a(de,"visitAsync_");function ci(s){return typeof s=="object"&&(s.Collection||s.Node||s.Value)?Object.assign({Alias:s.Node,Map:s.Node,Scalar:s.Node,Seq:s.Node},s.Value&&{Map:s.Value,Scalar:s.Value,Seq:s.Value},s.Collection&&{Map:s.Collection,Seq:s.Collection},s):s}a(ci,"initVisitor");function fi(s,e,t,n){if(typeof t=="function")return t(s,e,n);if(P.isMap(e))return t.Map?.(s,e,n);if(P.isSeq(e))return t.Seq?.(s,e,n);if(P.isPair(e))return t.Pair?.(s,e,n);if(P.isScalar(e))return t.Scalar?.(s,e,n);if(P.isAlias(e))return t.Alias?.(s,e,n)}a(fi,"callVisitor");function ui(s,e,t){let n=e[e.length-1];if(P.isCollection(n))n.items[s]=t;else if(P.isPair(n))s==="key"?n.key=t:n.value=t;else if(P.isDocument(n))n.contents=t;else{let i=P.isAlias(n)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}a(ui,"replaceNode");as.visit=at;as.visitAsync=lt});var ls=y(di=>{"use strict";var hi=O(),$a=Ae(),Da={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},Ra=a(s=>s.replace(/[!,[\]{}]/g,e=>Da[e]),"escapeTagName"),Ee=class s{static{a(this,"Directives")}constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},s.defaultYaml,e),this.tags=Object.assign({},s.defaultTags,t)}clone(){let e=new s(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new s(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:s.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},s.defaultTags);break}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:s.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},s.defaultTags),this.atNextDocument=!1);let n=e.trim().split(/[ \t]+/),i=n.shift();switch(i){case"%TAG":{if(n.length!==2&&(t(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;let[r,o]=n;return this.tags[r]=o,!0}case"%YAML":{if(this.yaml.explicit=!0,n.length!==1)return t(0,"%YAML directive should contain exactly one part"),!1;let[r]=n;if(r==="1.1"||r==="1.2")return this.yaml.version=r,!0;{let o=/^\d+\.\d+$/.test(r);return t(6,`Unsupported YAML version ${r}`,o),!1}}default:return t(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e==="!")return"!";if(e[0]!=="!")return t(`Not a valid tag: ${e}`),null;if(e[1]==="<"){let o=e.slice(2,-1);return o==="!"||o==="!!"?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&t("Verbatim tags must end with a >"),o)}let[,n,i]=e.match(/^(.*!)([^!]*)$/s);i||t(`The ${e} tag has no suffix`);let r=this.tags[n];if(r)try{return r+decodeURIComponent(i)}catch(o){return t(String(o)),null}return n==="!"?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+Ra(e.substring(n.length));return e[0]==="!"?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],n=Object.entries(this.tags),i;if(e&&n.length>0&&hi.isNode(e.contents)){let r={};$a.visit(e.contents,(o,l)=>{hi.isNode(l)&&l.tag&&(r[l.tag]=!0)}),i=Object.keys(r)}else i=[];for(let[r,o]of n)r==="!!"&&o==="tag:yaml.org,2002:"||(!e||i.some(l=>l.startsWith(o)))&&t.push(`%TAG ${r} ${o}`);return t.join(`
4
+ `)}};Ee.defaultYaml={explicit:!1,version:"1.2"};Ee.defaultTags={"!!":"tag:yaml.org,2002:"};di.Directives=Ee});var ct=y(Oe=>{"use strict";var pi=O(),Ba=Ae();function ja(s){if(/[\x00-\x19\s,[\]{}]/.test(s)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(s)}`;throw new Error(t)}return!0}a(ja,"anchorIsValid");function mi(s){let e=new Set;return Ba.visit(s,{Value(t,n){n.anchor&&e.add(n.anchor)}}),e}a(mi,"anchorNames");function gi(s,e){for(let t=1;;++t){let n=`${s}${t}`;if(!e.has(n))return n}}a(gi,"findNewAnchor");function Ka(s,e){let t=[],n=new Map,i=null;return{onAnchor:a(r=>{t.push(r),i??(i=mi(s));let o=gi(e,i);return i.add(o),o},"onAnchor"),setAnchors:a(()=>{for(let r of t){let o=n.get(r);if(typeof o=="object"&&o.anchor&&(pi.isScalar(o.node)||pi.isCollection(o.node)))o.node.anchor=o.anchor;else{let l=new Error("Failed to resolve repeated object (this should not happen)");throw l.source=r,l}}},"setAnchors"),sourceObjects:n}}a(Ka,"createNodeAnchors");Oe.anchorIsValid=ja;Oe.anchorNames=mi;Oe.createNodeAnchors=Ka;Oe.findNewAnchor=gi});var cs=y(yi=>{"use strict";function qe(s,e,t,n){if(n&&typeof n=="object")if(Array.isArray(n))for(let i=0,r=n.length;i<r;++i){let o=n[i],l=qe(s,n,String(i),o);l===void 0?delete n[i]:l!==o&&(n[i]=l)}else if(n instanceof Map)for(let i of Array.from(n.keys())){let r=n.get(i),o=qe(s,n,i,r);o===void 0?n.delete(i):o!==r&&n.set(i,o)}else if(n instanceof Set)for(let i of Array.from(n)){let r=qe(s,n,i,i);r===void 0?n.delete(i):r!==i&&(n.delete(i),n.add(r))}else for(let[i,r]of Object.entries(n)){let o=qe(s,n,i,r);o===void 0?delete n[i]:o!==r&&(n[i]=o)}return s.call(e,t,n)}a(qe,"applyReviver");yi.applyReviver=qe});var V=y(wi=>{"use strict";var Fa=O();function bi(s,e,t){if(Array.isArray(s))return s.map((n,i)=>bi(n,String(i),t));if(s&&typeof s.toJSON=="function"){if(!t||!Fa.hasAnchor(s))return s.toJSON(e,t);let n={aliasCount:0,count:1,res:void 0};t.anchors.set(s,n),t.onCreate=r=>{n.res=r,delete t.onCreate};let i=s.toJSON(e,t);return t.onCreate&&t.onCreate(i),i}return typeof s=="bigint"&&!t?.keep?Number(s):s}a(bi,"toJS");wi.toJS=bi});var ft=y(vi=>{"use strict";var Ua=cs(),Si=O(),Ya=V(),fs=class{static{a(this,"NodeBase")}constructor(e){Object.defineProperty(this,Si.NODE_TYPE,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:i,reviver:r}={}){if(!Si.isDocument(e))throw new TypeError("A document argument is required");let o={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},l=Ya.toJS(this,"",o);if(typeof i=="function")for(let{count:c,res:f}of o.anchors.values())i(f,c);return typeof r=="function"?Ua.applyReviver(r,{"":l},"",l):l}};vi.NodeBase=fs});var Te=y(ki=>{"use strict";var xa=ct(),Ja=Ae(),pe=O(),Va=ft(),Wa=V(),us=class extends Va.NodeBase{static{a(this,"Alias")}constructor(e){super(pe.ALIAS),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,t){if(t?.maxAliasCount===0)throw new ReferenceError("Alias resolution is disabled");let n;t?.aliasResolveCache?n=t.aliasResolveCache:(n=[],Ja.visit(e,{Node:a((r,o)=>{(pe.isAlias(o)||pe.hasAnchor(o))&&n.push(o)},"Node")}),t&&(t.aliasResolveCache=n));let i;for(let r of n){if(r===this)break;r.anchor===this.source&&(i=r)}if(i&&t){let{anchors:r,doc:o,maxAliasCount:l}=t,c=r.get(i);if(c||(Wa.toJS(i,null,t),c=r.get(i)),c?.res===void 0){let f="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(f)}if(l>=0&&(c.count+=1,c.aliasCount===0&&(c.aliasCount=ut(o,i,r)),c.count*c.aliasCount>l)){let f="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(f)}}return i}toJSON(e,t){if(!t)return{source:this.source};let n=this.resolve(t.doc,t);if(!n){let i=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(i)}return t.anchors.get(n).res}toString(e,t,n){let i=`*${this.source}`;if(e){if(xa.anchorIsValid(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let r=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(r)}if(e.implicitKey)return`${i} `}return i}};function ut(s,e,t){if(pe.isAlias(e)){let n=e.resolve(s),i=t&&n&&t.get(n);return i?i.count*i.aliasCount:0}else if(pe.isCollection(e)){let n=0;for(let i of e.items){let r=ut(s,i,t);r>n&&(n=r)}return n}else if(pe.isPair(e)){let n=ut(s,e.key,t),i=ut(s,e.value,t);return Math.max(n,i)}return 1}a(ut,"getAliasCount");ki.Alias=us});var L=y(hs=>{"use strict";var Ga=O(),Qa=ft(),Ha=V(),za=a(s=>!s||typeof s!="function"&&typeof s!="object","isScalarValue"),W=class extends Qa.NodeBase{static{a(this,"Scalar")}constructor(e){super(Ga.SCALAR),this.value=e}toJSON(e,t){return t?.keep?this.value:Ha.toJS(this.value,e,t)}toString(){return String(this.value)}};W.BLOCK_FOLDED="BLOCK_FOLDED";W.BLOCK_LITERAL="BLOCK_LITERAL";W.PLAIN="PLAIN";W.QUOTE_DOUBLE="QUOTE_DOUBLE";W.QUOTE_SINGLE="QUOTE_SINGLE";hs.Scalar=W;hs.isScalarValue=za});var Le=y(Ai=>{"use strict";var Xa=Te(),ne=O(),Ni=L(),Za="tag:yaml.org,2002:";function el(s,e,t){if(e){let n=t.filter(r=>r.tag===e),i=n.find(r=>!r.format)??n[0];if(!i)throw new Error(`Tag ${e} not found`);return i}return t.find(n=>n.identify?.(s)&&!n.format)}a(el,"findTagObject");function tl(s,e,t){if(ne.isDocument(s)&&(s=s.contents),ne.isNode(s))return s;if(ne.isPair(s)){let u=t.schema[ne.MAP].createNode?.(t.schema,null,t);return u.items.push(s),u}(s instanceof String||s instanceof Number||s instanceof Boolean||typeof BigInt<"u"&&s instanceof BigInt)&&(s=s.valueOf());let{aliasDuplicateObjects:n,onAnchor:i,onTagObj:r,schema:o,sourceObjects:l}=t,c;if(n&&s&&typeof s=="object"){if(c=l.get(s),c)return c.anchor??(c.anchor=i(s)),new Xa.Alias(c.anchor);c={anchor:null,node:null},l.set(s,c)}e?.startsWith("!!")&&(e=Za+e.slice(2));let f=el(s,e,o.tags);if(!f){if(s&&typeof s.toJSON=="function"&&(s=s.toJSON()),!s||typeof s!="object"){let u=new Ni.Scalar(s);return c&&(c.node=u),u}f=s instanceof Map?o[ne.MAP]:Symbol.iterator in Object(s)?o[ne.SEQ]:o[ne.MAP]}r&&(r(f),delete t.onTagObj);let p=f?.createNode?f.createNode(t.schema,s,t):typeof f?.nodeClass?.from=="function"?f.nodeClass.from(t.schema,s,t):new Ni.Scalar(s);return e?p.tag=e:f.default||(p.tag=f.tag),c&&(c.node=p),p}a(tl,"createNode");Ai.createNode=tl});var dt=y(ht=>{"use strict";var sl=Le(),K=O(),nl=ft();function ds(s,e,t){let n=t;for(let i=e.length-1;i>=0;--i){let r=e[i];if(typeof r=="number"&&Number.isInteger(r)&&r>=0){let o=[];o[r]=n,n=o}else n=new Map([[r,n]])}return sl.createNode(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:a(()=>{throw new Error("This should not happen, please report a bug.")},"onAnchor"),schema:s,sourceObjects:new Map})}a(ds,"collectionFromPath");var Ei=a(s=>s==null||typeof s=="object"&&!!s[Symbol.iterator]().next().done,"isEmptyPath"),ps=class extends nl.NodeBase{static{a(this,"Collection")}constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(n=>K.isNode(n)||K.isPair(n)?n.clone(e):n),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(Ei(e))this.add(t);else{let[n,...i]=e,r=this.get(n,!0);if(K.isCollection(r))r.addIn(i,t);else if(r===void 0&&this.schema)this.set(n,ds(this.schema,i,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}deleteIn(e){let[t,...n]=e;if(n.length===0)return this.delete(t);let i=this.get(t,!0);if(K.isCollection(i))return i.deleteIn(n);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){let[n,...i]=e,r=this.get(n,!0);return i.length===0?!t&&K.isScalar(r)?r.value:r:K.isCollection(r)?r.getIn(i,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!K.isPair(t))return!1;let n=t.value;return n==null||e&&K.isScalar(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[t,...n]=e;if(n.length===0)return this.has(t);let i=this.get(t,!0);return K.isCollection(i)?i.hasIn(n):!1}setIn(e,t){let[n,...i]=e;if(i.length===0)this.set(n,t);else{let r=this.get(n,!0);if(K.isCollection(r))r.setIn(i,t);else if(r===void 0&&this.schema)this.set(n,ds(this.schema,i,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}};ht.Collection=ps;ht.collectionFromPath=ds;ht.isEmptyPath=Ei});var _e=y(pt=>{"use strict";var il=a(s=>s.replace(/^(?!$)(?: $)?/gm,"#"),"stringifyComment");function ms(s,e){return/^\n+$/.test(s)?s.substring(1):e?s.replace(/^(?! *$)/gm,e):s}a(ms,"indentComment");var rl=a((s,e,t)=>s.endsWith(`
5
+ `)?ms(t,e):t.includes(`
6
+ `)?`
7
+ `+ms(t,e):(s.endsWith(" ")?"":" ")+t,"lineComment");pt.indentComment=ms;pt.lineComment=rl;pt.stringifyComment=il});var qi=y(Ce=>{"use strict";var ol="flow",gs="block",mt="quoted";function al(s,e,t="flow",{indentAtStart:n,lineWidth:i=80,minContentWidth:r=20,onFold:o,onOverflow:l}={}){if(!i||i<0)return s;i<r&&(r=0);let c=Math.max(1+r,1+i-e.length);if(s.length<=c)return s;let f=[],p={},u=i-e.length;typeof n=="number"&&(n>i-Math.max(2,r)?f.push(0):u=i-n);let h,g,b=!1,d=-1,m=-1,w=-1;t===gs&&(d=Oi(s,d,e.length),d!==-1&&(u=d+c));for(let k;k=s[d+=1];){if(t===mt&&k==="\\"){switch(m=d,s[d+1]){case"x":d+=3;break;case"u":d+=5;break;case"U":d+=9;break;default:d+=1}w=d}if(k===`
8
+ `)t===gs&&(d=Oi(s,d,e.length)),u=d+e.length+c,h=void 0;else{if(k===" "&&g&&g!==" "&&g!==`
9
+ `&&g!==" "){let N=s[d+1];N&&N!==" "&&N!==`
10
+ `&&N!==" "&&(h=d)}if(d>=u)if(h)f.push(h),u=h+c,h=void 0;else if(t===mt){for(;g===" "||g===" ";)g=k,k=s[d+=1],b=!0;let N=d>w+1?d-2:m-1;if(p[N])return s;f.push(N),p[N]=!0,u=N+c,h=void 0}else b=!0}g=k}if(b&&l&&l(),f.length===0)return s;o&&o();let v=s.slice(0,f[0]);for(let k=0;k<f.length;++k){let N=f[k],A=f[k+1]||s.length;N===0?v=`
11
+ ${e}${s.slice(0,A)}`:(t===mt&&p[N]&&(v+=`${s[N]}\\`),v+=`
12
+ ${e}${s.slice(N+1,A)}`)}return v}a(al,"foldFlowLines");function Oi(s,e,t){let n=e,i=e+1,r=s[i];for(;r===" "||r===" ";)if(e<i+t)r=s[++e];else{do r=s[++e];while(r&&r!==`
13
+ `);n=e,i=e+1,r=s[i]}return n}a(Oi,"consumeMoreIndentedLines");Ce.FOLD_BLOCK=gs;Ce.FOLD_FLOW=ol;Ce.FOLD_QUOTED=mt;Ce.foldFlowLines=al});var Ie=y(Ti=>{"use strict";var R=L(),G=qi(),yt=a((s,e)=>({indentAtStart:e?s.indent.length:s.indentAtStart,lineWidth:s.options.lineWidth,minContentWidth:s.options.minContentWidth}),"getFoldOptions"),bt=a(s=>/^(%|---|\.\.\.)/m.test(s),"containsDocumentMarker");function ll(s,e,t){if(!e||e<0)return!1;let n=e-t,i=s.length;if(i<=n)return!1;for(let r=0,o=0;r<i;++r)if(s[r]===`
14
+ `){if(r-o>n)return!0;if(o=r+1,i-o<=n)return!1}return!0}a(ll,"lineLengthOverLimit");function Pe(s,e){let t=JSON.stringify(s);if(e.options.doubleQuotedAsJSON)return t;let{implicitKey:n}=e,i=e.options.doubleQuotedMinMultiLineLength,r=e.indent||(bt(s)?" ":""),o="",l=0;for(let c=0,f=t[c];f;f=t[++c])if(f===" "&&t[c+1]==="\\"&&t[c+2]==="n"&&(o+=t.slice(l,c)+"\\ ",c+=1,l=c,f="\\"),f==="\\")switch(t[c+1]){case"u":{o+=t.slice(l,c);let p=t.substr(c+2,4);switch(p){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:p.substr(0,2)==="00"?o+="\\x"+p.substr(2):o+=t.substr(c,6)}c+=5,l=c+1}break;case"n":if(n||t[c+2]==='"'||t.length<i)c+=1;else{for(o+=t.slice(l,c)+`
15
+
16
+ `;t[c+2]==="\\"&&t[c+3]==="n"&&t[c+4]!=='"';)o+=`
17
+ `,c+=2;o+=r,t[c+2]===" "&&(o+="\\"),c+=1,l=c+1}break;default:c+=1}return o=l?o+t.slice(l):t,n?o:G.foldFlowLines(o,r,G.FOLD_QUOTED,yt(e,!1))}a(Pe,"doubleQuotedString");function ys(s,e){if(e.options.singleQuote===!1||e.implicitKey&&s.includes(`
18
+ `)||/[ \t]\n|\n[ \t]/.test(s))return Pe(s,e);let t=e.indent||(bt(s)?" ":""),n="'"+s.replace(/'/g,"''").replace(/\n+/g,`$&
19
+ ${t}`)+"'";return e.implicitKey?n:G.foldFlowLines(n,t,G.FOLD_FLOW,yt(e,!1))}a(ys,"singleQuotedString");function me(s,e){let{singleQuote:t}=e.options,n;if(t===!1)n=Pe;else{let i=s.includes('"'),r=s.includes("'");i&&!r?n=ys:r&&!i?n=Pe:n=t?ys:Pe}return n(s,e)}a(me,"quotedString");var bs;try{bs=new RegExp(`(^|(?<!
20
+ ))
21
+ +(?!
22
+ |$)`,"g")}catch{bs=/\n+(?!\n|$)/g}function gt({comment:s,type:e,value:t},n,i,r){let{blockQuote:o,commentString:l,lineWidth:c}=n.options;if(!o||/\n[\t ]+$/.test(t))return me(t,n);let f=n.indent||(n.forceBlockIndent||bt(t)?" ":""),p=o==="literal"?!0:o==="folded"||e===R.Scalar.BLOCK_FOLDED?!1:e===R.Scalar.BLOCK_LITERAL?!0:!ll(t,c,f.length);if(!t)return p?`|
23
+ `:`>
24
+ `;let u,h;for(h=t.length;h>0;--h){let A=t[h-1];if(A!==`
25
+ `&&A!==" "&&A!==" ")break}let g=t.substring(h),b=g.indexOf(`
26
+ `);b===-1?u="-":t===g||b!==g.length-1?(u="+",r&&r()):u="",g&&(t=t.slice(0,-g.length),g[g.length-1]===`
27
+ `&&(g=g.slice(0,-1)),g=g.replace(bs,`$&${f}`));let d=!1,m,w=-1;for(m=0;m<t.length;++m){let A=t[m];if(A===" ")d=!0;else if(A===`
28
+ `)w=m;else break}let v=t.substring(0,w<m?w+1:m);v&&(t=t.substring(v.length),v=v.replace(/\n+/g,`$&${f}`));let N=(d?f?"2":"1":"")+u;if(s&&(N+=" "+l(s.replace(/ ?[\r\n]+/g," ")),i&&i()),!p){let A=t.replace(/\n+/g,`
29
+ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${f}`),E=!1,T=yt(n,!0);o!=="folded"&&e!==R.Scalar.BLOCK_FOLDED&&(T.onOverflow=()=>{E=!0});let S=G.foldFlowLines(`${v}${A}${g}`,f,G.FOLD_BLOCK,T);if(!E)return`>${N}
30
+ ${f}${S}`}return t=t.replace(/\n+/g,`$&${f}`),`|${N}
31
+ ${f}${v}${t}${g}`}a(gt,"blockString");function cl(s,e,t,n){let{type:i,value:r}=s,{actualString:o,implicitKey:l,indent:c,indentStep:f,inFlow:p}=e;if(l&&r.includes(`
32
+ `)||p&&/[[\]{},]/.test(r))return me(r,e);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(r))return l||p||!r.includes(`
33
+ `)?me(r,e):gt(s,e,t,n);if(!l&&!p&&i!==R.Scalar.PLAIN&&r.includes(`
34
+ `))return gt(s,e,t,n);if(bt(r)){if(c==="")return e.forceBlockIndent=!0,gt(s,e,t,n);if(l&&c===f)return me(r,e)}let u=r.replace(/\n+/g,`$&
35
+ ${c}`);if(o){let h=a(d=>d.default&&d.tag!=="tag:yaml.org,2002:str"&&d.test?.test(u),"test"),{compat:g,tags:b}=e.doc.schema;if(b.some(h)||g?.some(h))return me(r,e)}return l?u:G.foldFlowLines(u,c,G.FOLD_FLOW,yt(e,!1))}a(cl,"plainString");function fl(s,e,t,n){let{implicitKey:i,inFlow:r}=e,o=typeof s.value=="string"?s:Object.assign({},s,{value:String(s.value)}),{type:l}=s;l!==R.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(l=R.Scalar.QUOTE_DOUBLE);let c=a(p=>{switch(p){case R.Scalar.BLOCK_FOLDED:case R.Scalar.BLOCK_LITERAL:return i||r?me(o.value,e):gt(o,e,t,n);case R.Scalar.QUOTE_DOUBLE:return Pe(o.value,e);case R.Scalar.QUOTE_SINGLE:return ys(o.value,e);case R.Scalar.PLAIN:return cl(o,e,t,n);default:return null}},"_stringify"),f=c(l);if(f===null){let{defaultKeyType:p,defaultStringType:u}=e.options,h=i&&p||u;if(f=c(h),f===null)throw new Error(`Unsupported default string type ${h}`)}return f}a(fl,"stringifyString");Ti.stringifyString=fl});var Me=y(ws=>{"use strict";var ul=ct(),Q=O(),hl=_e(),dl=Ie();function pl(s,e){let t=Object.assign({blockQuote:!0,commentString:hl.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},s.schema.toStringOptions,e),n;switch(t.collectionStyle){case"block":n=!1;break;case"flow":n=!0;break;default:n=null}return{anchors:new Set,doc:s,flowCollectionPadding:t.flowCollectionPadding?" ":"",indent:"",indentStep:typeof t.indent=="number"?" ".repeat(t.indent):" ",inFlow:n,options:t}}a(pl,"createStringifyContext");function ml(s,e){if(e.tag){let i=s.filter(r=>r.tag===e.tag);if(i.length>0)return i.find(r=>r.format===e.format)??i[0]}let t,n;if(Q.isScalar(e)){n=e.value;let i=s.filter(r=>r.identify?.(n));if(i.length>1){let r=i.filter(o=>o.test);r.length>0&&(i=r)}t=i.find(r=>r.format===e.format)??i.find(r=>!r.format)}else n=e,t=s.find(i=>i.nodeClass&&n instanceof i.nodeClass);if(!t){let i=n?.constructor?.name??(n===null?"null":typeof n);throw new Error(`Tag not resolved for ${i} value`)}return t}a(ml,"getTagObject");function gl(s,e,{anchors:t,doc:n}){if(!n.directives)return"";let i=[],r=(Q.isScalar(s)||Q.isCollection(s))&&s.anchor;r&&ul.anchorIsValid(r)&&(t.add(r),i.push(`&${r}`));let o=s.tag??(e.default?null:e.tag);return o&&i.push(n.directives.tagString(o)),i.join(" ")}a(gl,"stringifyProps");function yl(s,e,t,n){if(Q.isPair(s))return s.toString(e,t,n);if(Q.isAlias(s)){if(e.doc.directives)return s.toString(e);if(e.resolvedAliases?.has(s))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(s):e.resolvedAliases=new Set([s]),s=s.resolve(e.doc)}let i,r=Q.isNode(s)?s:e.doc.createNode(s,{onTagObj:a(c=>i=c,"onTagObj")});i??(i=ml(e.doc.schema.tags,r));let o=gl(r,i,e);o.length>0&&(e.indentAtStart=(e.indentAtStart??0)+o.length+1);let l=typeof i.stringify=="function"?i.stringify(r,e,t,n):Q.isScalar(r)?dl.stringifyString(r,e,t,n):r.toString(e,t,n);return o?Q.isScalar(r)||l[0]==="{"||l[0]==="["?`${o} ${l}`:`${o}
36
+ ${e.indent}${l}`:l}a(yl,"stringify");ws.createStringifyContext=pl;ws.stringify=yl});var Pi=y(Ci=>{"use strict";var Y=O(),Li=L(),_i=Me(),$e=_e();function bl({key:s,value:e},t,n,i){let{allNullValues:r,doc:o,indent:l,indentStep:c,options:{commentString:f,indentSeq:p,simpleKeys:u}}=t,h=Y.isNode(s)&&s.comment||null;if(u){if(h)throw new Error("With simple keys, key nodes cannot have comments");if(Y.isCollection(s)||!Y.isNode(s)&&typeof s=="object"){let T="With simple keys, collection cannot be used as a key value";throw new Error(T)}}let g=!u&&(!s||h&&e==null&&!t.inFlow||Y.isCollection(s)||(Y.isScalar(s)?s.type===Li.Scalar.BLOCK_FOLDED||s.type===Li.Scalar.BLOCK_LITERAL:typeof s=="object"));t=Object.assign({},t,{allNullValues:!1,implicitKey:!g&&(u||!r),indent:l+c});let b=!1,d=!1,m=_i.stringify(s,t,()=>b=!0,()=>d=!0);if(!g&&!t.inFlow&&m.length>1024){if(u)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");g=!0}if(t.inFlow){if(r||e==null)return b&&n&&n(),m===""?"?":g?`? ${m}`:m}else if(r&&!u||e==null&&g)return m=`? ${m}`,h&&!b?m+=$e.lineComment(m,t.indent,f(h)):d&&i&&i(),m;b&&(h=null),g?(h&&(m+=$e.lineComment(m,t.indent,f(h))),m=`? ${m}
37
+ ${l}:`):(m=`${m}:`,h&&(m+=$e.lineComment(m,t.indent,f(h))));let w,v,k;Y.isNode(e)?(w=!!e.spaceBefore,v=e.commentBefore,k=e.comment):(w=!1,v=null,k=null,e&&typeof e=="object"&&(e=o.createNode(e))),t.implicitKey=!1,!g&&!h&&Y.isScalar(e)&&(t.indentAtStart=m.length+1),d=!1,!p&&c.length>=2&&!t.inFlow&&!g&&Y.isSeq(e)&&!e.flow&&!e.tag&&!e.anchor&&(t.indent=t.indent.substring(2));let N=!1,A=_i.stringify(e,t,()=>N=!0,()=>d=!0),E=" ";if(h||w||v){if(E=w?`
38
+ `:"",v){let T=f(v);E+=`
39
+ ${$e.indentComment(T,t.indent)}`}A===""&&!t.inFlow?E===`
40
+ `&&k&&(E=`
41
+
42
+ `):E+=`
43
+ ${t.indent}`}else if(!g&&Y.isCollection(e)){let T=A[0],S=A.indexOf(`
44
+ `),_=S!==-1,J=t.inFlow??e.flow??e.items.length===0;if(_||!J){let ce=!1;if(_&&(T==="&"||T==="!")){let C=A.indexOf(" ");T==="&"&&C!==-1&&C<S&&A[C+1]==="!"&&(C=A.indexOf(" ",C+1)),(C===-1||S<C)&&(ce=!0)}ce||(E=`
45
+ ${t.indent}`)}}else(A===""||A[0]===`
46
+ `)&&(E="");return m+=E+A,t.inFlow?N&&n&&n():k&&!N?m+=$e.lineComment(m,t.indent,f(k)):d&&i&&i(),m}a(bl,"stringifyPair");Ci.stringifyPair=bl});var vs=y(Ss=>{"use strict";var Ii=st("process");function wl(s,...e){s==="debug"&&console.log(...e)}a(wl,"debug");function Sl(s,e){(s==="debug"||s==="warn")&&(typeof Ii.emitWarning=="function"?Ii.emitWarning(e):console.warn(e))}a(Sl,"warn");Ss.debug=wl;Ss.warn=Sl});var Nt=y(kt=>{"use strict";var vt=O(),Mi=L(),wt="<<",St={identify:a(s=>s===wt||typeof s=="symbol"&&s.description===wt,"identify"),default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:a(()=>Object.assign(new Mi.Scalar(Symbol(wt)),{addToJSMap:$i}),"resolve"),stringify:a(()=>wt,"stringify")},vl=a((s,e)=>(St.identify(e)||vt.isScalar(e)&&(!e.type||e.type===Mi.Scalar.PLAIN)&&St.identify(e.value))&&s?.doc.schema.tags.some(t=>t.tag===St.tag&&t.default),"isMergeKey");function $i(s,e,t){let n=Di(s,t);if(vt.isSeq(n))for(let i of n.items)ks(s,e,i);else if(Array.isArray(n))for(let i of n)ks(s,e,i);else ks(s,e,n)}a($i,"addMergeToJSMap");function ks(s,e,t){let n=Di(s,t);if(!vt.isMap(n))throw new Error("Merge sources must be maps or map aliases");let i=n.toJSON(null,s,Map);for(let[r,o]of i)e instanceof Map?e.has(r)||e.set(r,o):e instanceof Set?e.add(r):Object.prototype.hasOwnProperty.call(e,r)||Object.defineProperty(e,r,{value:o,writable:!0,enumerable:!0,configurable:!0});return e}a(ks,"mergeValue");function Di(s,e){return s&&vt.isAlias(e)?e.resolve(s.doc,s):e}a(Di,"resolveAliasValue");kt.addMergeToJSMap=$i;kt.isMergeKey=vl;kt.merge=St});var As=y(ji=>{"use strict";var kl=vs(),Ri=Nt(),Nl=Me(),Bi=O(),Ns=V();function Al(s,e,{key:t,value:n}){if(Bi.isNode(t)&&t.addToJSMap)t.addToJSMap(s,e,n);else if(Ri.isMergeKey(s,t))Ri.addMergeToJSMap(s,e,n);else{let i=Ns.toJS(t,"",s);if(e instanceof Map)e.set(i,Ns.toJS(n,i,s));else if(e instanceof Set)e.add(i);else{let r=El(t,i,s),o=Ns.toJS(n,r,s);r in e?Object.defineProperty(e,r,{value:o,writable:!0,enumerable:!0,configurable:!0}):e[r]=o}}return e}a(Al,"addPairToJSMap");function El(s,e,t){if(e===null)return"";if(typeof e!="object")return String(e);if(Bi.isNode(s)&&t?.doc){let n=Nl.createStringifyContext(t.doc,{});n.anchors=new Set;for(let r of t.anchors.keys())n.anchors.add(r.anchor);n.inFlow=!0,n.inStringifyKey=!0;let i=s.toString(n);if(!t.mapKeyWarned){let r=JSON.stringify(i);r.length>40&&(r=r.substring(0,36)+'..."'),kl.warn(t.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${r}. Set mapAsMap: true to use object keys.`),t.mapKeyWarned=!0}return i}return JSON.stringify(e)}a(El,"stringifyKey");ji.addPairToJSMap=Al});var H=y(Es=>{"use strict";var Ki=Le(),Ol=Pi(),ql=As(),At=O();function Tl(s,e,t){let n=Ki.createNode(s,void 0,t),i=Ki.createNode(e,void 0,t);return new Et(n,i)}a(Tl,"createPair");var Et=class s{static{a(this,"Pair")}constructor(e,t=null){Object.defineProperty(this,At.NODE_TYPE,{value:At.PAIR}),this.key=e,this.value=t}clone(e){let{key:t,value:n}=this;return At.isNode(t)&&(t=t.clone(e)),At.isNode(n)&&(n=n.clone(e)),new s(t,n)}toJSON(e,t){let n=t?.mapAsMap?new Map:{};return ql.addPairToJSMap(t,n,this)}toString(e,t,n){return e?.doc?Ol.stringifyPair(this,e,t,n):JSON.stringify(this)}};Es.Pair=Et;Es.createPair=Tl});var Os=y(Ui=>{"use strict";var ie=O(),Fi=Me(),Ot=_e();function Ll(s,e,t){return(e.inFlow??s.flow?Cl:_l)(s,e,t)}a(Ll,"stringifyCollection");function _l({comment:s,items:e},t,{blockItemPrefix:n,flowChars:i,itemIndent:r,onChompKeep:o,onComment:l}){let{indent:c,options:{commentString:f}}=t,p=Object.assign({},t,{indent:r,type:null}),u=!1,h=[];for(let b=0;b<e.length;++b){let d=e[b],m=null;if(ie.isNode(d))!u&&d.spaceBefore&&h.push(""),qt(t,h,d.commentBefore,u),d.comment&&(m=d.comment);else if(ie.isPair(d)){let v=ie.isNode(d.key)?d.key:null;v&&(!u&&v.spaceBefore&&h.push(""),qt(t,h,v.commentBefore,u))}u=!1;let w=Fi.stringify(d,p,()=>m=null,()=>u=!0);m&&(w+=Ot.lineComment(w,r,f(m))),u&&m&&(u=!1),h.push(n+w)}let g;if(h.length===0)g=i.start+i.end;else{g=h[0];for(let b=1;b<h.length;++b){let d=h[b];g+=d?`
47
+ ${c}${d}`:`
48
+ `}}return s?(g+=`
49
+ `+Ot.indentComment(f(s),c),l&&l()):u&&o&&o(),g}a(_l,"stringifyBlockCollection");function Cl({items:s},e,{flowChars:t,itemIndent:n}){let{indent:i,indentStep:r,flowCollectionPadding:o,options:{commentString:l}}=e;n+=r;let c=Object.assign({},e,{indent:n,inFlow:!0,type:null}),f=!1,p=0,u=[];for(let b=0;b<s.length;++b){let d=s[b],m=null;if(ie.isNode(d))d.spaceBefore&&u.push(""),qt(e,u,d.commentBefore,!1),d.comment&&(m=d.comment);else if(ie.isPair(d)){let v=ie.isNode(d.key)?d.key:null;v&&(v.spaceBefore&&u.push(""),qt(e,u,v.commentBefore,!1),v.comment&&(f=!0));let k=ie.isNode(d.value)?d.value:null;k?(k.comment&&(m=k.comment),k.commentBefore&&(f=!0)):d.value==null&&v?.comment&&(m=v.comment)}m&&(f=!0);let w=Fi.stringify(d,c,()=>m=null);f||(f=u.length>p||w.includes(`
50
+ `)),b<s.length-1?w+=",":e.options.trailingComma&&(e.options.lineWidth>0&&(f||(f=u.reduce((v,k)=>v+k.length+2,2)+(w.length+2)>e.options.lineWidth)),f&&(w+=",")),m&&(w+=Ot.lineComment(w,n,l(m))),u.push(w),p=u.length}let{start:h,end:g}=t;if(u.length===0)return h+g;if(!f){let b=u.reduce((d,m)=>d+m.length+2,2);f=e.options.lineWidth>0&&b>e.options.lineWidth}if(f){let b=h;for(let d of u)b+=d?`
51
+ ${r}${i}${d}`:`
52
+ `;return`${b}
53
+ ${i}${g}`}else return`${h}${o}${u.join(" ")}${o}${g}`}a(Cl,"stringifyFlowCollection");function qt({indent:s,options:{commentString:e}},t,n,i){if(n&&i&&(n=n.replace(/^\n+/,"")),n){let r=Ot.indentComment(e(n),s);t.push(r.trimStart())}}a(qt,"addCommentBefore");Ui.stringifyCollection=Ll});var X=y(Ts=>{"use strict";var Pl=Os(),Il=As(),Ml=dt(),z=O(),Tt=H(),$l=L();function De(s,e){let t=z.isScalar(e)?e.value:e;for(let n of s)if(z.isPair(n)&&(n.key===e||n.key===t||z.isScalar(n.key)&&n.key.value===t))return n}a(De,"findPair");var qs=class extends Ml.Collection{static{a(this,"YAMLMap")}static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(z.MAP,e),this.items=[]}static from(e,t,n){let{keepUndefined:i,replacer:r}=n,o=new this(e),l=a((c,f)=>{if(typeof r=="function")f=r.call(t,c,f);else if(Array.isArray(r)&&!r.includes(c))return;(f!==void 0||i)&&o.items.push(Tt.createPair(c,f,n))},"add");if(t instanceof Map)for(let[c,f]of t)l(c,f);else if(t&&typeof t=="object")for(let c of Object.keys(t))l(c,t[c]);return typeof e.sortMapEntries=="function"&&o.items.sort(e.sortMapEntries),o}add(e,t){let n;z.isPair(e)?n=e:!e||typeof e!="object"||!("key"in e)?n=new Tt.Pair(e,e?.value):n=new Tt.Pair(e.key,e.value);let i=De(this.items,n.key),r=this.schema?.sortMapEntries;if(i){if(!t)throw new Error(`Key ${n.key} already set`);z.isScalar(i.value)&&$l.isScalarValue(n.value)?i.value.value=n.value:i.value=n.value}else if(r){let o=this.items.findIndex(l=>r(n,l)<0);o===-1?this.items.push(n):this.items.splice(o,0,n)}else this.items.push(n)}delete(e){let t=De(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let i=De(this.items,e)?.value;return(!t&&z.isScalar(i)?i.value:i)??void 0}has(e){return!!De(this.items,e)}set(e,t){this.add(new Tt.Pair(e,t),!0)}toJSON(e,t,n){let i=n?new n:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(i);for(let r of this.items)Il.addPairToJSMap(t,i,r);return i}toString(e,t,n){if(!e)return JSON.stringify(this);for(let i of this.items)if(!z.isPair(i))throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),Pl.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:n,onComment:t})}};Ts.YAMLMap=qs;Ts.findPair=De});var ge=y(xi=>{"use strict";var Dl=O(),Yi=X(),Rl={collection:"map",default:!0,nodeClass:Yi.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(s,e){return Dl.isMap(s)||e("Expected a mapping for this tag"),s},createNode:a((s,e,t)=>Yi.YAMLMap.from(s,e,t),"createNode")};xi.map=Rl});var Z=y(Ji=>{"use strict";var Bl=Le(),jl=Os(),Kl=dt(),_t=O(),Fl=L(),Ul=V(),Ls=class extends Kl.Collection{static{a(this,"YAMLSeq")}static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(_t.SEQ,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=Lt(e);return typeof t!="number"?!1:this.items.splice(t,1).length>0}get(e,t){let n=Lt(e);if(typeof n!="number")return;let i=this.items[n];return!t&&_t.isScalar(i)?i.value:i}has(e){let t=Lt(e);return typeof t=="number"&&t<this.items.length}set(e,t){let n=Lt(e);if(typeof n!="number")throw new Error(`Expected a valid index, not ${e}.`);let i=this.items[n];_t.isScalar(i)&&Fl.isScalarValue(t)?i.value=t:this.items[n]=t}toJSON(e,t){let n=[];t?.onCreate&&t.onCreate(n);let i=0;for(let r of this.items)n.push(Ul.toJS(r,String(i++),t));return n}toString(e,t,n){return e?jl.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:n,onComment:t}):JSON.stringify(this)}static from(e,t,n){let{replacer:i}=n,r=new this(e);if(t&&Symbol.iterator in Object(t)){let o=0;for(let l of t){if(typeof i=="function"){let c=t instanceof Set?l:String(o++);l=i.call(t,c,l)}r.items.push(Bl.createNode(l,void 0,n))}}return r}};function Lt(s){let e=_t.isScalar(s)?s.value:s;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}a(Lt,"asItemIndex");Ji.YAMLSeq=Ls});var ye=y(Wi=>{"use strict";var Yl=O(),Vi=Z(),xl={collection:"seq",default:!0,nodeClass:Vi.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(s,e){return Yl.isSeq(s)||e("Expected a sequence for this tag"),s},createNode:a((s,e,t)=>Vi.YAMLSeq.from(s,e,t),"createNode")};Wi.seq=xl});var Re=y(Gi=>{"use strict";var Jl=Ie(),Vl={identify:a(s=>typeof s=="string","identify"),default:!0,tag:"tag:yaml.org,2002:str",resolve:a(s=>s,"resolve"),stringify(s,e,t,n){return e=Object.assign({actualString:!0},e),Jl.stringifyString(s,e,t,n)}};Gi.string=Vl});var Ct=y(zi=>{"use strict";var Qi=L(),Hi={identify:a(s=>s==null,"identify"),createNode:a(()=>new Qi.Scalar(null),"createNode"),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:a(()=>new Qi.Scalar(null),"resolve"),stringify:a(({source:s},e)=>typeof s=="string"&&Hi.test.test(s)?s:e.options.nullStr,"stringify")};zi.nullTag=Hi});var _s=y(Zi=>{"use strict";var Wl=L(),Xi={identify:a(s=>typeof s=="boolean","identify"),default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:a(s=>new Wl.Scalar(s[0]==="t"||s[0]==="T"),"resolve"),stringify({source:s,value:e},t){if(s&&Xi.test.test(s)){let n=s[0]==="t"||s[0]==="T";if(e===n)return s}return e?t.options.trueStr:t.options.falseStr}};Zi.boolTag=Xi});var be=y(er=>{"use strict";function Gl({format:s,minFractionDigits:e,tag:t,value:n}){if(typeof n=="bigint")return String(n);let i=typeof n=="number"?n:Number(n);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let r=Object.is(n,-0)?"-0":JSON.stringify(n);if(!s&&e&&(!t||t==="tag:yaml.org,2002:float")&&/^-?\d/.test(r)&&!r.includes("e")){let o=r.indexOf(".");o<0&&(o=r.length,r+=".");let l=e-(r.length-o-1);for(;l-- >0;)r+="0"}return r}a(Gl,"stringifyNumber");er.stringifyNumber=Gl});var Ps=y(Pt=>{"use strict";var Ql=L(),Cs=be(),Hl={identify:a(s=>typeof s=="number","identify"),default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:a(s=>s.slice(-3).toLowerCase()==="nan"?NaN:s[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,"resolve"),stringify:Cs.stringifyNumber},zl={identify:a(s=>typeof s=="number","identify"),default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:a(s=>parseFloat(s),"resolve"),stringify(s){let e=Number(s.value);return isFinite(e)?e.toExponential():Cs.stringifyNumber(s)}},Xl={identify:a(s=>typeof s=="number","identify"),default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(s){let e=new Ql.Scalar(parseFloat(s)),t=s.indexOf(".");return t!==-1&&s[s.length-1]==="0"&&(e.minFractionDigits=s.length-t-1),e},stringify:Cs.stringifyNumber};Pt.float=Xl;Pt.floatExp=zl;Pt.floatNaN=Hl});var Ms=y(Mt=>{"use strict";var tr=be(),It=a(s=>typeof s=="bigint"||Number.isInteger(s),"intIdentify"),Is=a((s,e,t,{intAsBigInt:n})=>n?BigInt(s):parseInt(s.substring(e),t),"intResolve");function sr(s,e,t){let{value:n}=s;return It(n)&&n>=0?t+n.toString(e):tr.stringifyNumber(s)}a(sr,"intStringify");var Zl={identify:a(s=>It(s)&&s>=0,"identify"),default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:a((s,e,t)=>Is(s,2,8,t),"resolve"),stringify:a(s=>sr(s,8,"0o"),"stringify")},ec={identify:It,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:a((s,e,t)=>Is(s,0,10,t),"resolve"),stringify:tr.stringifyNumber},tc={identify:a(s=>It(s)&&s>=0,"identify"),default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:a((s,e,t)=>Is(s,2,16,t),"resolve"),stringify:a(s=>sr(s,16,"0x"),"stringify")};Mt.int=ec;Mt.intHex=tc;Mt.intOct=Zl});var ir=y(nr=>{"use strict";var sc=ge(),nc=Ct(),ic=ye(),rc=Re(),oc=_s(),$s=Ps(),Ds=Ms(),ac=[sc.map,ic.seq,rc.string,nc.nullTag,oc.boolTag,Ds.intOct,Ds.int,Ds.intHex,$s.floatNaN,$s.floatExp,$s.float];nr.schema=ac});var ar=y(or=>{"use strict";var lc=L(),cc=ge(),fc=ye();function rr(s){return typeof s=="bigint"||Number.isInteger(s)}a(rr,"intIdentify");var $t=a(({value:s})=>JSON.stringify(s),"stringifyJSON"),uc=[{identify:a(s=>typeof s=="string","identify"),default:!0,tag:"tag:yaml.org,2002:str",resolve:a(s=>s,"resolve"),stringify:$t},{identify:a(s=>s==null,"identify"),createNode:a(()=>new lc.Scalar(null),"createNode"),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:a(()=>null,"resolve"),stringify:$t},{identify:a(s=>typeof s=="boolean","identify"),default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:a(s=>s==="true","resolve"),stringify:$t},{identify:rr,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:a((s,e,{intAsBigInt:t})=>t?BigInt(s):parseInt(s,10),"resolve"),stringify:a(({value:s})=>rr(s)?s.toString():JSON.stringify(s),"stringify")},{identify:a(s=>typeof s=="number","identify"),default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:a(s=>parseFloat(s),"resolve"),stringify:$t}],hc={default:!0,tag:"",test:/^/,resolve(s,e){return e(`Unresolved plain scalar ${JSON.stringify(s)}`),s}},dc=[cc.map,fc.seq].concat(uc,hc);or.schema=dc});var Bs=y(lr=>{"use strict";var Be=st("buffer"),Rs=L(),pc=Ie(),mc={identify:a(s=>s instanceof Uint8Array,"identify"),default:!1,tag:"tag:yaml.org,2002:binary",resolve(s,e){if(typeof Be.Buffer=="function")return Be.Buffer.from(s,"base64");if(typeof atob=="function"){let t=atob(s.replace(/[\n\r]/g,"")),n=new Uint8Array(t.length);for(let i=0;i<t.length;++i)n[i]=t.charCodeAt(i);return n}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),s},stringify({comment:s,type:e,value:t},n,i,r){if(!t)return"";let o=t,l;if(typeof Be.Buffer=="function")l=o instanceof Be.Buffer?o.toString("base64"):Be.Buffer.from(o.buffer).toString("base64");else if(typeof btoa=="function"){let c="";for(let f=0;f<o.length;++f)c+=String.fromCharCode(o[f]);l=btoa(c)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e??(e=Rs.Scalar.BLOCK_LITERAL),e!==Rs.Scalar.QUOTE_DOUBLE){let c=Math.max(n.options.lineWidth-n.indent.length,n.options.minContentWidth),f=Math.ceil(l.length/c),p=new Array(f);for(let u=0,h=0;u<f;++u,h+=c)p[u]=l.substr(h,c);l=p.join(e===Rs.Scalar.BLOCK_LITERAL?`
54
+ `:" ")}return pc.stringifyString({comment:s,type:e,value:l},n,i,r)}};lr.binary=mc});var Bt=y(Rt=>{"use strict";var Dt=O(),js=H(),gc=L(),yc=Z();function cr(s,e){if(Dt.isSeq(s))for(let t=0;t<s.items.length;++t){let n=s.items[t];if(!Dt.isPair(n)){if(Dt.isMap(n)){n.items.length>1&&e("Each pair must have its own sequence indicator");let i=n.items[0]||new js.Pair(new gc.Scalar(null));if(n.commentBefore&&(i.key.commentBefore=i.key.commentBefore?`${n.commentBefore}
55
+ ${i.key.commentBefore}`:n.commentBefore),n.comment){let r=i.value??i.key;r.comment=r.comment?`${n.comment}
56
+ ${r.comment}`:n.comment}n=i}s.items[t]=Dt.isPair(n)?n:new js.Pair(n)}}else e("Expected a sequence for this tag");return s}a(cr,"resolvePairs");function fr(s,e,t){let{replacer:n}=t,i=new yc.YAMLSeq(s);i.tag="tag:yaml.org,2002:pairs";let r=0;if(e&&Symbol.iterator in Object(e))for(let o of e){typeof n=="function"&&(o=n.call(e,String(r++),o));let l,c;if(Array.isArray(o))if(o.length===2)l=o[0],c=o[1];else throw new TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){let f=Object.keys(o);if(f.length===1)l=f[0],c=o[l];else throw new TypeError(`Expected tuple with one key, not ${f.length} keys`)}else l=o;i.items.push(js.createPair(l,c,t))}return i}a(fr,"createPairs");var bc={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:cr,createNode:fr};Rt.createPairs=fr;Rt.pairs=bc;Rt.resolvePairs=cr});var Us=y(Fs=>{"use strict";var ur=O(),Ks=V(),je=X(),wc=Z(),hr=Bt(),re=class s extends wc.YAMLSeq{static{a(this,"YAMLOMap")}constructor(){super(),this.add=je.YAMLMap.prototype.add.bind(this),this.delete=je.YAMLMap.prototype.delete.bind(this),this.get=je.YAMLMap.prototype.get.bind(this),this.has=je.YAMLMap.prototype.has.bind(this),this.set=je.YAMLMap.prototype.set.bind(this),this.tag=s.tag}toJSON(e,t){if(!t)return super.toJSON(e);let n=new Map;t?.onCreate&&t.onCreate(n);for(let i of this.items){let r,o;if(ur.isPair(i)?(r=Ks.toJS(i.key,"",t),o=Ks.toJS(i.value,r,t)):r=Ks.toJS(i,"",t),n.has(r))throw new Error("Ordered maps must not include duplicate keys");n.set(r,o)}return n}static from(e,t,n){let i=hr.createPairs(e,t,n),r=new this;return r.items=i.items,r}};re.tag="tag:yaml.org,2002:omap";var Sc={collection:"seq",identify:a(s=>s instanceof Map,"identify"),nodeClass:re,default:!1,tag:"tag:yaml.org,2002:omap",resolve(s,e){let t=hr.resolvePairs(s,e),n=[];for(let{key:i}of t.items)ur.isScalar(i)&&(n.includes(i.value)?e(`Ordered maps must not include duplicate keys: ${i.value}`):n.push(i.value));return Object.assign(new re,t)},createNode:a((s,e,t)=>re.from(s,e,t),"createNode")};Fs.YAMLOMap=re;Fs.omap=Sc});var yr=y(Ys=>{"use strict";var dr=L();function pr({value:s,source:e},t){return e&&(s?mr:gr).test.test(e)?e:s?t.options.trueStr:t.options.falseStr}a(pr,"boolStringify");var mr={identify:a(s=>s===!0,"identify"),default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:a(()=>new dr.Scalar(!0),"resolve"),stringify:pr},gr={identify:a(s=>s===!1,"identify"),default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:a(()=>new dr.Scalar(!1),"resolve"),stringify:pr};Ys.falseTag=gr;Ys.trueTag=mr});var br=y(jt=>{"use strict";var vc=L(),xs=be(),kc={identify:a(s=>typeof s=="number","identify"),default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:a(s=>s.slice(-3).toLowerCase()==="nan"?NaN:s[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,"resolve"),stringify:xs.stringifyNumber},Nc={identify:a(s=>typeof s=="number","identify"),default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:a(s=>parseFloat(s.replace(/_/g,"")),"resolve"),stringify(s){let e=Number(s.value);return isFinite(e)?e.toExponential():xs.stringifyNumber(s)}},Ac={identify:a(s=>typeof s=="number","identify"),default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(s){let e=new vc.Scalar(parseFloat(s.replace(/_/g,""))),t=s.indexOf(".");if(t!==-1){let n=s.substring(t+1).replace(/_/g,"");n[n.length-1]==="0"&&(e.minFractionDigits=n.length)}return e},stringify:xs.stringifyNumber};jt.float=Ac;jt.floatExp=Nc;jt.floatNaN=kc});var Sr=y(Fe=>{"use strict";var wr=be(),Ke=a(s=>typeof s=="bigint"||Number.isInteger(s),"intIdentify");function Kt(s,e,t,{intAsBigInt:n}){let i=s[0];if((i==="-"||i==="+")&&(e+=1),s=s.substring(e).replace(/_/g,""),n){switch(t){case 2:s=`0b${s}`;break;case 8:s=`0o${s}`;break;case 16:s=`0x${s}`;break}let o=BigInt(s);return i==="-"?BigInt(-1)*o:o}let r=parseInt(s,t);return i==="-"?-1*r:r}a(Kt,"intResolve");function Js(s,e,t){let{value:n}=s;if(Ke(n)){let i=n.toString(e);return n<0?"-"+t+i.substr(1):t+i}return wr.stringifyNumber(s)}a(Js,"intStringify");var Ec={identify:Ke,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:a((s,e,t)=>Kt(s,2,2,t),"resolve"),stringify:a(s=>Js(s,2,"0b"),"stringify")},Oc={identify:Ke,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:a((s,e,t)=>Kt(s,1,8,t),"resolve"),stringify:a(s=>Js(s,8,"0"),"stringify")},qc={identify:Ke,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:a((s,e,t)=>Kt(s,0,10,t),"resolve"),stringify:wr.stringifyNumber},Tc={identify:Ke,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:a((s,e,t)=>Kt(s,2,16,t),"resolve"),stringify:a(s=>Js(s,16,"0x"),"stringify")};Fe.int=qc;Fe.intBin=Ec;Fe.intHex=Tc;Fe.intOct=Oc});var Ws=y(Vs=>{"use strict";var Yt=O(),Ft=H(),Ut=X(),oe=class s extends Ut.YAMLMap{static{a(this,"YAMLSet")}constructor(e){super(e),this.tag=s.tag}add(e){let t;Yt.isPair(e)?t=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?t=new Ft.Pair(e.key,null):t=new Ft.Pair(e,null),Ut.findPair(this.items,t.key)||this.items.push(t)}get(e,t){let n=Ut.findPair(this.items,e);return!t&&Yt.isPair(n)?Yt.isScalar(n.key)?n.key.value:n.key:n}set(e,t){if(typeof t!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let n=Ut.findPair(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new Ft.Pair(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw new Error("Set items must all have null values")}static from(e,t,n){let{replacer:i}=n,r=new this(e);if(t&&Symbol.iterator in Object(t))for(let o of t)typeof i=="function"&&(o=i.call(t,o,o)),r.items.push(Ft.createPair(o,null,n));return r}};oe.tag="tag:yaml.org,2002:set";var Lc={collection:"map",identify:a(s=>s instanceof Set,"identify"),nodeClass:oe,default:!1,tag:"tag:yaml.org,2002:set",createNode:a((s,e,t)=>oe.from(s,e,t),"createNode"),resolve(s,e){if(Yt.isMap(s)){if(s.hasAllNullValues(!0))return Object.assign(new oe,s);e("Set items must all have null values")}else e("Expected a mapping for this tag");return s}};Vs.YAMLSet=oe;Vs.set=Lc});var Qs=y(xt=>{"use strict";var _c=be();function Gs(s,e){let t=s[0],n=t==="-"||t==="+"?s.substring(1):s,i=a(o=>e?BigInt(o):Number(o),"num"),r=n.replace(/_/g,"").split(":").reduce((o,l)=>o*i(60)+i(l),i(0));return t==="-"?i(-1)*r:r}a(Gs,"parseSexagesimal");function vr(s){let{value:e}=s,t=a(o=>o,"num");if(typeof e=="bigint")t=a(o=>BigInt(o),"num");else if(isNaN(e)||!isFinite(e))return _c.stringifyNumber(s);let n="";e<0&&(n="-",e*=t(-1));let i=t(60),r=[e%i];return e<60?r.unshift(0):(e=(e-r[0])/i,r.unshift(e%i),e>=60&&(e=(e-r[0])/i,r.unshift(e))),n+r.map(o=>String(o).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}a(vr,"stringifySexagesimal");var Cc={identify:a(s=>typeof s=="bigint"||Number.isInteger(s),"identify"),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:a((s,e,{intAsBigInt:t})=>Gs(s,t),"resolve"),stringify:vr},Pc={identify:a(s=>typeof s=="number","identify"),default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:a(s=>Gs(s,!1),"resolve"),stringify:vr},kr={identify:a(s=>s instanceof Date,"identify"),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(s){let e=s.match(kr.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,t,n,i,r,o,l]=e.map(Number),c=e[7]?Number((e[7]+"00").substr(1,3)):0,f=Date.UTC(t,n-1,i,r||0,o||0,l||0,c),p=e[8];if(p&&p!=="Z"){let u=Gs(p,!1);Math.abs(u)<30&&(u*=60),f-=6e4*u}return new Date(f)},stringify:a(({value:s})=>s?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??"","stringify")};xt.floatTime=Pc;xt.intTime=Cc;xt.timestamp=kr});var Er=y(Ar=>{"use strict";var Ic=ge(),Mc=Ct(),$c=ye(),Dc=Re(),Rc=Bs(),Nr=yr(),Hs=br(),Jt=Sr(),Bc=Nt(),jc=Us(),Kc=Bt(),Fc=Ws(),zs=Qs(),Uc=[Ic.map,$c.seq,Dc.string,Mc.nullTag,Nr.trueTag,Nr.falseTag,Jt.intBin,Jt.intOct,Jt.int,Jt.intHex,Hs.floatNaN,Hs.floatExp,Hs.float,Rc.binary,Bc.merge,jc.omap,Kc.pairs,Fc.set,zs.intTime,zs.floatTime,zs.timestamp];Ar.schema=Uc});var $r=y(en=>{"use strict";var Lr=ge(),Yc=Ct(),_r=ye(),xc=Re(),Jc=_s(),Xs=Ps(),Zs=Ms(),Vc=ir(),Wc=ar(),Cr=Bs(),Ue=Nt(),Pr=Us(),Ir=Bt(),Or=Er(),Mr=Ws(),Vt=Qs(),qr=new Map([["core",Vc.schema],["failsafe",[Lr.map,_r.seq,xc.string]],["json",Wc.schema],["yaml11",Or.schema],["yaml-1.1",Or.schema]]),Tr={binary:Cr.binary,bool:Jc.boolTag,float:Xs.float,floatExp:Xs.floatExp,floatNaN:Xs.floatNaN,floatTime:Vt.floatTime,int:Zs.int,intHex:Zs.intHex,intOct:Zs.intOct,intTime:Vt.intTime,map:Lr.map,merge:Ue.merge,null:Yc.nullTag,omap:Pr.omap,pairs:Ir.pairs,seq:_r.seq,set:Mr.set,timestamp:Vt.timestamp},Gc={"tag:yaml.org,2002:binary":Cr.binary,"tag:yaml.org,2002:merge":Ue.merge,"tag:yaml.org,2002:omap":Pr.omap,"tag:yaml.org,2002:pairs":Ir.pairs,"tag:yaml.org,2002:set":Mr.set,"tag:yaml.org,2002:timestamp":Vt.timestamp};function Qc(s,e,t){let n=qr.get(e);if(n&&!s)return t&&!n.includes(Ue.merge)?n.concat(Ue.merge):n.slice();let i=n;if(!i)if(Array.isArray(s))i=[];else{let r=Array.from(qr.keys()).filter(o=>o!=="yaml11").map(o=>JSON.stringify(o)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${r} or define customTags array`)}if(Array.isArray(s))for(let r of s)i=i.concat(r);else typeof s=="function"&&(i=s(i.slice()));return t&&(i=i.concat(Ue.merge)),i.reduce((r,o)=>{let l=typeof o=="string"?Tr[o]:o;if(!l){let c=JSON.stringify(o),f=Object.keys(Tr).map(p=>JSON.stringify(p)).join(", ");throw new Error(`Unknown custom tag ${c}; use one of ${f}`)}return r.includes(l)||r.push(l),r},[])}a(Qc,"getTags");en.coreKnownTags=Gc;en.getTags=Qc});var nn=y(Dr=>{"use strict";var tn=O(),Hc=ge(),zc=ye(),Xc=Re(),Wt=$r(),Zc=a((s,e)=>s.key<e.key?-1:s.key>e.key?1:0,"sortMapEntriesByKey"),sn=class s{static{a(this,"Schema")}constructor({compat:e,customTags:t,merge:n,resolveKnownTags:i,schema:r,sortMapEntries:o,toStringDefaults:l}){this.compat=Array.isArray(e)?Wt.getTags(e,"compat"):e?Wt.getTags(null,e):null,this.name=typeof r=="string"&&r||"core",this.knownTags=i?Wt.coreKnownTags:{},this.tags=Wt.getTags(t,this.name,n),this.toStringOptions=l??null,Object.defineProperty(this,tn.MAP,{value:Hc.map}),Object.defineProperty(this,tn.SCALAR,{value:Xc.string}),Object.defineProperty(this,tn.SEQ,{value:zc.seq}),this.sortMapEntries=typeof o=="function"?o:o===!0?Zc:null}clone(){let e=Object.create(s.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}};Dr.Schema=sn});var Br=y(Rr=>{"use strict";var ef=O(),rn=Me(),Ye=_e();function tf(s,e){let t=[],n=e.directives===!0;if(e.directives!==!1&&s.directives){let c=s.directives.toString(s);c?(t.push(c),n=!0):s.directives.docStart&&(n=!0)}n&&t.push("---");let i=rn.createStringifyContext(s,e),{commentString:r}=i.options;if(s.commentBefore){t.length!==1&&t.unshift("");let c=r(s.commentBefore);t.unshift(Ye.indentComment(c,""))}let o=!1,l=null;if(s.contents){if(ef.isNode(s.contents)){if(s.contents.spaceBefore&&n&&t.push(""),s.contents.commentBefore){let p=r(s.contents.commentBefore);t.push(Ye.indentComment(p,""))}i.forceBlockIndent=!!s.comment,l=s.contents.comment}let c=l?void 0:()=>o=!0,f=rn.stringify(s.contents,i,()=>l=null,c);l&&(f+=Ye.lineComment(f,"",r(l))),(f[0]==="|"||f[0]===">")&&t[t.length-1]==="---"?t[t.length-1]=`--- ${f}`:t.push(f)}else t.push(rn.stringify(s.contents,i));if(s.directives?.docEnd)if(s.comment){let c=r(s.comment);c.includes(`
57
+ `)?(t.push("..."),t.push(Ye.indentComment(c,""))):t.push(`... ${c}`)}else t.push("...");else{let c=s.comment;c&&o&&(c=c.replace(/^\n+/,"")),c&&((!o||l)&&t[t.length-1]!==""&&t.push(""),t.push(Ye.indentComment(r(c),"")))}return t.join(`
58
+ `)+`
59
+ `}a(tf,"stringifyDocument");Rr.stringifyDocument=tf});var xe=y(jr=>{"use strict";var sf=Te(),we=dt(),D=O(),nf=H(),rf=V(),of=nn(),af=Br(),on=ct(),lf=cs(),cf=Le(),an=ls(),ln=class s{static{a(this,"Document")}constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,D.NODE_TYPE,{value:D.DOC});let i=null;typeof t=="function"||Array.isArray(t)?i=t:n===void 0&&t&&(n=t,t=void 0);let r=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},n);this.options=r;let{version:o}=r;n?._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new an.Directives({version:o}),this.setSchema(o,n),this.contents=e===void 0?null:this.createNode(e,i,n)}clone(){let e=Object.create(s.prototype,{[D.NODE_TYPE]:{value:D.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=D.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){Se(this.contents)&&this.contents.add(e)}addIn(e,t){Se(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let n=on.anchorNames(this);e.anchor=!t||n.has(t)?on.findNewAnchor(t||"a",n):t}return new sf.Alias(e.anchor)}createNode(e,t,n){let i;if(typeof t=="function")e=t.call({"":e},"",e),i=t;else if(Array.isArray(t)){let m=a(v=>typeof v=="number"||v instanceof String||v instanceof Number,"keyToStr"),w=t.filter(m).map(String);w.length>0&&(t=t.concat(w)),i=t}else n===void 0&&t&&(n=t,t=void 0);let{aliasDuplicateObjects:r,anchorPrefix:o,flow:l,keepUndefined:c,onTagObj:f,tag:p}=n??{},{onAnchor:u,setAnchors:h,sourceObjects:g}=on.createNodeAnchors(this,o||"a"),b={aliasDuplicateObjects:r??!0,keepUndefined:c??!1,onAnchor:u,onTagObj:f,replacer:i,schema:this.schema,sourceObjects:g},d=cf.createNode(e,p,b);return l&&D.isCollection(d)&&(d.flow=!0),h(),d}createPair(e,t,n={}){let i=this.createNode(e,null,n),r=this.createNode(t,null,n);return new nf.Pair(i,r)}delete(e){return Se(this.contents)?this.contents.delete(e):!1}deleteIn(e){return we.isEmptyPath(e)?this.contents==null?!1:(this.contents=null,!0):Se(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return D.isCollection(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return we.isEmptyPath(e)?!t&&D.isScalar(this.contents)?this.contents.value:this.contents:D.isCollection(this.contents)?this.contents.getIn(e,t):void 0}has(e){return D.isCollection(this.contents)?this.contents.has(e):!1}hasIn(e){return we.isEmptyPath(e)?this.contents!==void 0:D.isCollection(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=we.collectionFromPath(this.schema,[e],t):Se(this.contents)&&this.contents.set(e,t)}setIn(e,t){we.isEmptyPath(e)?this.contents=t:this.contents==null?this.contents=we.collectionFromPath(this.schema,Array.from(e),t):Se(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e=="number"&&(e=String(e));let n;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new an.Directives({version:"1.1"}),n={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new an.Directives({version:e}),n={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,n=null;break;default:{let i=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${i}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(n)this.schema=new of.Schema(Object.assign(n,t));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:i,onAnchor:r,reviver:o}={}){let l={anchors:new Map,doc:this,keep:!e,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100},c=rf.toJS(this.contents,t??"",l);if(typeof r=="function")for(let{count:f,res:p}of l.anchors.values())r(p,f);return typeof o=="function"?lf.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 af.stringifyDocument(this,e)}};function Se(s){if(D.isCollection(s))return!0;throw new Error("Expected a YAML collection as document contents")}a(Se,"assertCollection");jr.Document=ln});var We=y(Ve=>{"use strict";var Je=class extends Error{static{a(this,"YAMLError")}constructor(e,t,n,i){super(),this.name=e,this.code=n,this.message=i,this.pos=t}},cn=class extends Je{static{a(this,"YAMLParseError")}constructor(e,t,n){super("YAMLParseError",e,t,n)}},fn=class extends Je{static{a(this,"YAMLWarning")}constructor(e,t,n){super("YAMLWarning",e,t,n)}},ff=a((s,e)=>t=>{if(t.pos[0]===-1)return;t.linePos=t.pos.map(l=>e.linePos(l));let{line:n,col:i}=t.linePos[0];t.message+=` at line ${n}, column ${i}`;let r=i-1,o=s.substring(e.lineStarts[n-1],e.lineStarts[n]).replace(/[\n\r]+$/,"");if(r>=60&&o.length>80){let l=Math.min(r-39,o.length-79);o="\u2026"+o.substring(l),r-=l-1}if(o.length>80&&(o=o.substring(0,79)+"\u2026"),n>1&&/^ *$/.test(o.substring(0,r))){let l=s.substring(e.lineStarts[n-2],e.lineStarts[n-1]);l.length>80&&(l=l.substring(0,79)+`\u2026
60
+ `),o=l+o}if(/[^ ]/.test(o)){let l=1,c=t.linePos[1];c?.line===n&&c.col>i&&(l=Math.max(1,Math.min(c.col-i,80-r)));let f=" ".repeat(r)+"^".repeat(l);t.message+=`:
61
+
62
+ ${o}
63
+ ${f}
64
+ `}},"prettifyError");Ve.YAMLError=Je;Ve.YAMLParseError=cn;Ve.YAMLWarning=fn;Ve.prettifyError=ff});var Ge=y(Kr=>{"use strict";function uf(s,{flow:e,indicator:t,next:n,offset:i,onError:r,parentIndent:o,startOnNewline:l}){let c=!1,f=l,p=l,u="",h="",g=!1,b=!1,d=null,m=null,w=null,v=null,k=null,N=null,A=null;for(let S of s)switch(b&&(S.type!=="space"&&S.type!=="newline"&&S.type!=="comma"&&r(S.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),b=!1),d&&(f&&S.type!=="comment"&&S.type!=="newline"&&r(d,"TAB_AS_INDENT","Tabs are not allowed as indentation"),d=null),S.type){case"space":!e&&(t!=="doc-start"||n?.type!=="flow-collection")&&S.source.includes(" ")&&(d=S),p=!0;break;case"comment":{p||r(S,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let _=S.source.substring(1)||" ";u?u+=h+_:u=_,h="",f=!1;break}case"newline":f?u?u+=S.source:(!N||t!=="seq-item-ind")&&(c=!0):h+=S.source,f=!0,g=!0,(m||w)&&(v=S),p=!0;break;case"anchor":m&&r(S,"MULTIPLE_ANCHORS","A node can have at most one anchor"),S.source.endsWith(":")&&r(S.offset+S.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),m=S,A??(A=S.offset),f=!1,p=!1,b=!0;break;case"tag":{w&&r(S,"MULTIPLE_TAGS","A node can have at most one tag"),w=S,A??(A=S.offset),f=!1,p=!1,b=!0;break}case t:(m||w)&&r(S,"BAD_PROP_ORDER",`Anchors and tags must be after the ${S.source} indicator`),N&&r(S,"UNEXPECTED_TOKEN",`Unexpected ${S.source} in ${e??"collection"}`),N=S,f=t==="seq-item-ind"||t==="explicit-key-ind",p=!1;break;case"comma":if(e){k&&r(S,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),k=S,f=!1,p=!1;break}default:r(S,"UNEXPECTED_TOKEN",`Unexpected ${S.type} token`),f=!1,p=!1}let E=s[s.length-1],T=E?E.offset+E.source.length:i;return b&&n&&n.type!=="space"&&n.type!=="newline"&&n.type!=="comma"&&(n.type!=="scalar"||n.source!=="")&&r(n.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),d&&(f&&d.indent<=o||n?.type==="block-map"||n?.type==="block-seq")&&r(d,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:k,found:N,spaceBefore:c,comment:u,hasNewline:g,anchor:m,tag:w,newlineAfterProp:v,end:T,start:A??T}}a(uf,"resolveProps");Kr.resolveProps=uf});var Gt=y(Fr=>{"use strict";function un(s){if(!s)return null;switch(s.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(s.source.includes(`
65
+ `))return!0;if(s.end){for(let e of s.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(let e of s.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(un(e.key)||un(e.value))return!0}return!1;default:return!0}}a(un,"containsNewline");Fr.containsNewline=un});var hn=y(Ur=>{"use strict";var hf=Gt();function df(s,e,t){if(e?.type==="flow-collection"){let n=e.end[0];n.indent===s&&(n.source==="]"||n.source==="}")&&hf.containsNewline(e)&&t(n,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}a(df,"flowIndentCheck");Ur.flowIndentCheck=df});var dn=y(xr=>{"use strict";var Yr=O();function pf(s,e,t){let{uniqueKeys:n}=s.options;if(n===!1)return!1;let i=typeof n=="function"?n:(r,o)=>r===o||Yr.isScalar(r)&&Yr.isScalar(o)&&r.value===o.value;return e.some(r=>i(r.key,t))}a(pf,"mapIncludes");xr.mapIncludes=pf});var Hr=y(Qr=>{"use strict";var Jr=H(),mf=X(),Vr=Ge(),gf=Gt(),Wr=hn(),yf=dn(),Gr="All mapping items must start at the same column";function bf({composeNode:s,composeEmptyNode:e},t,n,i,r){let o=r?.nodeClass??mf.YAMLMap,l=new o(t.schema);t.atRoot&&(t.atRoot=!1);let c=n.offset,f=null;for(let p of n.items){let{start:u,key:h,sep:g,value:b}=p,d=Vr.resolveProps(u,{indicator:"explicit-key-ind",next:h??g?.[0],offset:c,onError:i,parentIndent:n.indent,startOnNewline:!0}),m=!d.found;if(m){if(h&&(h.type==="block-seq"?i(c,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in h&&h.indent!==n.indent&&i(c,"BAD_INDENT",Gr)),!d.anchor&&!d.tag&&!g){f=d.end,d.comment&&(l.comment?l.comment+=`
66
+ `+d.comment:l.comment=d.comment);continue}(d.newlineAfterProp||gf.containsNewline(h))&&i(h??u[u.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else d.found?.indent!==n.indent&&i(c,"BAD_INDENT",Gr);t.atKey=!0;let w=d.end,v=h?s(t,h,d,i):e(t,w,u,null,d,i);t.schema.compat&&Wr.flowIndentCheck(n.indent,h,i),t.atKey=!1,yf.mapIncludes(t,l.items,v)&&i(w,"DUPLICATE_KEY","Map keys must be unique");let k=Vr.resolveProps(g??[],{indicator:"map-value-ind",next:b,offset:v.range[2],onError:i,parentIndent:n.indent,startOnNewline:!h||h.type==="block-scalar"});if(c=k.end,k.found){m&&(b?.type==="block-map"&&!k.hasNewline&&i(c,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),t.options.strict&&d.start<k.found.offset-1024&&i(v.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let N=b?s(t,b,k,i):e(t,c,g,null,k,i);t.schema.compat&&Wr.flowIndentCheck(n.indent,b,i),c=N.range[2];let A=new Jr.Pair(v,N);t.options.keepSourceTokens&&(A.srcToken=p),l.items.push(A)}else{m&&i(v.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),k.comment&&(v.comment?v.comment+=`
67
+ `+k.comment:v.comment=k.comment);let N=new Jr.Pair(v);t.options.keepSourceTokens&&(N.srcToken=p),l.items.push(N)}}return f&&f<c&&i(f,"IMPOSSIBLE","Map comment with trailing content"),l.range=[n.offset,c,f??c],l}a(bf,"resolveBlockMap");Qr.resolveBlockMap=bf});var Xr=y(zr=>{"use strict";var wf=Z(),Sf=Ge(),vf=hn();function kf({composeNode:s,composeEmptyNode:e},t,n,i,r){let o=r?.nodeClass??wf.YAMLSeq,l=new o(t.schema);t.atRoot&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let c=n.offset,f=null;for(let{start:p,value:u}of n.items){let h=Sf.resolveProps(p,{indicator:"seq-item-ind",next:u,offset:c,onError:i,parentIndent:n.indent,startOnNewline:!0});if(!h.found)if(h.anchor||h.tag||u)u?.type==="block-seq"?i(h.end,"BAD_INDENT","All sequence items must start at the same column"):i(c,"MISSING_CHAR","Sequence item without - indicator");else{f=h.end,h.comment&&(l.comment=h.comment);continue}let g=u?s(t,u,h,i):e(t,h.end,p,null,h,i);t.schema.compat&&vf.flowIndentCheck(n.indent,u,i),c=g.range[2],l.items.push(g)}return l.range=[n.offset,c,f??c],l}a(kf,"resolveBlockSeq");zr.resolveBlockSeq=kf});var ve=y(Zr=>{"use strict";function Nf(s,e,t,n){let i="";if(s){let r=!1,o="";for(let l of s){let{source:c,type:f}=l;switch(f){case"space":r=!0;break;case"comment":{t&&!r&&n(l,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let p=c.substring(1)||" ";i?i+=o+p:i=p,o="";break}case"newline":i&&(o+=c),r=!0;break;default:n(l,"UNEXPECTED_TOKEN",`Unexpected ${f} at node end`)}e+=c.length}}return{comment:i,offset:e}}a(Nf,"resolveEnd");Zr.resolveEnd=Nf});var no=y(so=>{"use strict";var Af=O(),Ef=H(),eo=X(),Of=Z(),qf=ve(),to=Ge(),Tf=Gt(),Lf=dn(),pn="Block collections are not allowed within flow collections",mn=a(s=>s&&(s.type==="block-map"||s.type==="block-seq"),"isBlock");function _f({composeNode:s,composeEmptyNode:e},t,n,i,r){let o=n.start.source==="{",l=o?"flow map":"flow sequence",c=r?.nodeClass??(o?eo.YAMLMap:Of.YAMLSeq),f=new c(t.schema);f.flow=!0;let p=t.atRoot;p&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let u=n.offset+n.start.source.length;for(let m=0;m<n.items.length;++m){let w=n.items[m],{start:v,key:k,sep:N,value:A}=w,E=to.resolveProps(v,{flow:l,indicator:"explicit-key-ind",next:k??N?.[0],offset:u,onError:i,parentIndent:n.indent,startOnNewline:!1});if(!E.found){if(!E.anchor&&!E.tag&&!N&&!A){m===0&&E.comma?i(E.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${l}`):m<n.items.length-1&&i(E.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${l}`),E.comment&&(f.comment?f.comment+=`
68
+ `+E.comment:f.comment=E.comment),u=E.end;continue}!o&&t.options.strict&&Tf.containsNewline(k)&&i(k,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(m===0)E.comma&&i(E.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${l}`);else if(E.comma||i(E.start,"MISSING_CHAR",`Missing , between ${l} items`),E.comment){let T="";e:for(let S of v)switch(S.type){case"comma":case"space":break;case"comment":T=S.source.substring(1);break e;default:break e}if(T){let S=f.items[f.items.length-1];Af.isPair(S)&&(S=S.value??S.key),S.comment?S.comment+=`
69
+ `+T:S.comment=T,E.comment=E.comment.substring(T.length+1)}}if(!o&&!N&&!E.found){let T=A?s(t,A,E,i):e(t,E.end,N,null,E,i);f.items.push(T),u=T.range[2],mn(A)&&i(T.range,"BLOCK_IN_FLOW",pn)}else{t.atKey=!0;let T=E.end,S=k?s(t,k,E,i):e(t,T,v,null,E,i);mn(k)&&i(S.range,"BLOCK_IN_FLOW",pn),t.atKey=!1;let _=to.resolveProps(N??[],{flow:l,indicator:"map-value-ind",next:A,offset:S.range[2],onError:i,parentIndent:n.indent,startOnNewline:!1});if(_.found){if(!o&&!E.found&&t.options.strict){if(N)for(let C of N){if(C===_.found)break;if(C.type==="newline"){i(C,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}E.start<_.found.offset-1024&&i(_.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else A&&("source"in A&&A.source?.[0]===":"?i(A,"MISSING_CHAR",`Missing space after : in ${l}`):i(_.start,"MISSING_CHAR",`Missing , or : between ${l} items`));let J=A?s(t,A,_,i):_.found?e(t,_.end,N,null,_,i):null;J?mn(A)&&i(J.range,"BLOCK_IN_FLOW",pn):_.comment&&(S.comment?S.comment+=`
70
+ `+_.comment:S.comment=_.comment);let ce=new Ef.Pair(S,J);if(t.options.keepSourceTokens&&(ce.srcToken=w),o){let C=f;Lf.mapIncludes(t,C.items,S)&&i(T,"DUPLICATE_KEY","Map keys must be unique"),C.items.push(ce)}else{let C=new eo.YAMLMap(t.schema);C.flow=!0,C.items.push(ce);let Un=(J??S).range;C.range=[S.range[0],Un[1],Un[2]],f.items.push(C)}u=J?J.range[2]:_.end}}let h=o?"}":"]",[g,...b]=n.end,d=u;if(g?.source===h)d=g.offset+g.source.length;else{let m=l[0].toUpperCase()+l.substring(1),w=p?`${m} must end with a ${h}`:`${m} in block collection must be sufficiently indented and end with a ${h}`;i(u,p?"MISSING_CHAR":"BAD_INDENT",w),g&&g.source.length!==1&&b.unshift(g)}if(b.length>0){let m=qf.resolveEnd(b,d,t.options.strict,i);m.comment&&(f.comment?f.comment+=`
71
+ `+m.comment:f.comment=m.comment),f.range=[n.offset,d,m.offset]}else f.range=[n.offset,d,d];return f}a(_f,"resolveFlowCollection");so.resolveFlowCollection=_f});var ro=y(io=>{"use strict";var Cf=O(),Pf=L(),If=X(),Mf=Z(),$f=Hr(),Df=Xr(),Rf=no();function gn(s,e,t,n,i,r){let o=t.type==="block-map"?$f.resolveBlockMap(s,e,t,n,r):t.type==="block-seq"?Df.resolveBlockSeq(s,e,t,n,r):Rf.resolveFlowCollection(s,e,t,n,r),l=o.constructor;return i==="!"||i===l.tagName?(o.tag=l.tagName,o):(i&&(o.tag=i),o)}a(gn,"resolveCollection");function Bf(s,e,t,n,i){let r=n.tag,o=r?e.directives.tagName(r.source,h=>i(r,"TAG_RESOLVE_FAILED",h)):null;if(t.type==="block-seq"){let{anchor:h,newlineAfterProp:g}=n,b=h&&r?h.offset>r.offset?h:r:h??r;b&&(!g||g.offset<b.offset)&&i(b,"MISSING_CHAR","Missing newline after block sequence props")}let l=t.type==="block-map"?"map":t.type==="block-seq"?"seq":t.start.source==="{"?"map":"seq";if(!r||!o||o==="!"||o===If.YAMLMap.tagName&&l==="map"||o===Mf.YAMLSeq.tagName&&l==="seq")return gn(s,e,t,i,o);let c=e.schema.tags.find(h=>h.tag===o&&h.collection===l);if(!c){let h=e.schema.knownTags[o];if(h?.collection===l)e.schema.tags.push(Object.assign({},h,{default:!1})),c=h;else return h?i(r,"BAD_COLLECTION_TYPE",`${h.tag} used for ${l} collection, but expects ${h.collection??"scalar"}`,!0):i(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0),gn(s,e,t,i,o)}let f=gn(s,e,t,i,o,c),p=c.resolve?.(f,h=>i(r,"TAG_RESOLVE_FAILED",h),e.options)??f,u=Cf.isNode(p)?p:new Pf.Scalar(p);return u.range=f.range,u.tag=o,c?.format&&(u.format=c.format),u}a(Bf,"composeCollection");io.composeCollection=Bf});var bn=y(oo=>{"use strict";var yn=L();function jf(s,e,t){let n=e.offset,i=Kf(e,s.options.strict,t);if(!i)return{value:"",type:null,comment:"",range:[n,n,n]};let r=i.mode===">"?yn.Scalar.BLOCK_FOLDED:yn.Scalar.BLOCK_LITERAL,o=e.source?Ff(e.source):[],l=o.length;for(let d=o.length-1;d>=0;--d){let m=o[d][1];if(m===""||m==="\r")l=d;else break}if(l===0){let d=i.chomp==="+"&&o.length>0?`
72
+ `.repeat(Math.max(1,o.length-1)):"",m=n+i.length;return e.source&&(m+=e.source.length),{value:d,type:r,comment:i.comment,range:[n,m,m]}}let c=e.indent+i.indent,f=e.offset+i.length,p=0;for(let d=0;d<l;++d){let[m,w]=o[d];if(w===""||w==="\r")i.indent===0&&m.length>c&&(c=m.length);else{m.length<c&&t(f+m.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),i.indent===0&&(c=m.length),p=d,c===0&&!s.atRoot&&t(f,"BAD_INDENT","Block scalar values in collections must be indented");break}f+=m.length+w.length+1}for(let d=o.length-1;d>=l;--d)o[d][0].length>c&&(l=d+1);let u="",h="",g=!1;for(let d=0;d<p;++d)u+=o[d][0].slice(c)+`
73
+ `;for(let d=p;d<l;++d){let[m,w]=o[d];f+=m.length+w.length+1;let v=w[w.length-1]==="\r";if(v&&(w=w.slice(0,-1)),w&&m.length<c){let N=`Block scalar lines must not be less indented than their ${i.indent?"explicit indentation indicator":"first line"}`;t(f-w.length-(v?2:1),"BAD_INDENT",N),m=""}r===yn.Scalar.BLOCK_LITERAL?(u+=h+m.slice(c)+w,h=`
74
+ `):m.length>c||w[0]===" "?(h===" "?h=`
75
+ `:!g&&h===`
76
+ `&&(h=`
77
+
78
+ `),u+=h+m.slice(c)+w,h=`
79
+ `,g=!0):w===""?h===`
80
+ `?u+=`
81
+ `:h=`
82
+ `:(u+=h+w,h=" ",g=!1)}switch(i.chomp){case"-":break;case"+":for(let d=l;d<o.length;++d)u+=`
83
+ `+o[d][0].slice(c);u[u.length-1]!==`
84
+ `&&(u+=`
85
+ `);break;default:u+=`
86
+ `}let b=n+i.length+e.source.length;return{value:u,type:r,comment:i.comment,range:[n,b,b]}}a(jf,"resolveBlockScalar");function Kf({offset:s,props:e},t,n){if(e[0].type!=="block-scalar-header")return n(e[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:i}=e[0],r=i[0],o=0,l="",c=-1;for(let h=1;h<i.length;++h){let g=i[h];if(!l&&(g==="-"||g==="+"))l=g;else{let b=Number(g);!o&&b?o=b:c===-1&&(c=s+h)}}c!==-1&&n(c,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${i}`);let f=!1,p="",u=i.length;for(let h=1;h<e.length;++h){let g=e[h];switch(g.type){case"space":f=!0;case"newline":u+=g.source.length;break;case"comment":t&&!f&&n(g,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),u+=g.source.length,p=g.source.substring(1);break;case"error":n(g,"UNEXPECTED_TOKEN",g.message),u+=g.source.length;break;default:{let b=`Unexpected token in block scalar header: ${g.type}`;n(g,"UNEXPECTED_TOKEN",b);let d=g.source;d&&typeof d=="string"&&(u+=d.length)}}}return{mode:r,indent:o,chomp:l,comment:p,length:u}}a(Kf,"parseBlockScalarHeader");function Ff(s){let e=s.split(/\n( *)/),t=e[0],n=t.match(/^( *)/),r=[n?.[1]?[n[1],t.slice(n[1].length)]:["",t]];for(let o=1;o<e.length;o+=2)r.push([e[o],e[o+1]]);return r}a(Ff,"splitLines");oo.resolveBlockScalar=jf});var Sn=y(lo=>{"use strict";var wn=L(),Uf=ve();function Yf(s,e,t){let{offset:n,type:i,source:r,end:o}=s,l,c,f=a((h,g,b)=>t(n+h,g,b),"_onError");switch(i){case"scalar":l=wn.Scalar.PLAIN,c=xf(r,f);break;case"single-quoted-scalar":l=wn.Scalar.QUOTE_SINGLE,c=Jf(r,f);break;case"double-quoted-scalar":l=wn.Scalar.QUOTE_DOUBLE,c=Vf(r,f);break;default:return t(s,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${i}`),{value:"",type:null,comment:"",range:[n,n+r.length,n+r.length]}}let p=n+r.length,u=Uf.resolveEnd(o,p,e,t);return{value:c,type:l,comment:u.comment,range:[n,p,u.offset]}}a(Yf,"resolveFlowScalar");function xf(s,e){let t="";switch(s[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 ${s[0]}`;break}case"@":case"`":{t=`reserved character ${s[0]}`;break}}return t&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${t}`),ao(s)}a(xf,"plainValue");function Jf(s,e){return(s[s.length-1]!=="'"||s.length===1)&&e(s.length,"MISSING_CHAR","Missing closing 'quote"),ao(s.slice(1,-1)).replace(/''/g,"'")}a(Jf,"singleQuotedValue");function ao(s){let e=/(.*?)\r?\n/sy,t=e.exec(s);if(!t)return s;let n,i;try{n=new RegExp("(?<![ ])[ ]+$"),i=new RegExp("^[ ]+|(?<![ ])[ ]+$","g")}catch{n=/[ \t]+$/,i=/^[ \t]+|[ \t]+$/g}let r=t[1].replace(n,""),o=" ",l=e.lastIndex;for(;t=e.exec(s);){let f=t[1].replace(i,"");f===""?o===`
87
+ `?r+=o:o=`
88
+ `:(r+=o+f,o=" "),l=e.lastIndex}let c=/[ \t]*(.*)/sy;return c.lastIndex=l,t=c.exec(s),r+o+(t?.[1]??"")}a(ao,"unfoldLines");function Vf(s,e){let t="";for(let n=1;n<s.length-1;++n){let i=s[n];if(!(i==="\r"&&s[n+1]===`
89
+ `))if(i===`
90
+ `){let{fold:r,offset:o}=Wf(s,n);t+=r,n=o}else if(i==="\\"){let r=s[++n],o=Gf[r];if(o)t+=o;else if(r===`
91
+ `)for(r=s[n+1];r===" "||r===" ";)r=s[++n+1];else if(r==="\r"&&s[n+1]===`
92
+ `)for(r=s[++n+1];r===" "||r===" ";)r=s[++n+1];else if(r==="x"||r==="u"||r==="U"){let l=r==="x"?2:r==="u"?4:8;t+=Qf(s,n+1,l,e),n+=l}else{let l=s.substr(n-1,2);e(n-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${l}`),t+=l}}else if(i===" "||i===" "){let r=n,o=s[n+1];for(;o===" "||o===" ";)o=s[++n+1];o!==`
93
+ `&&!(o==="\r"&&s[n+2]===`
94
+ `)&&(t+=n>r?s.slice(r,n+1):i)}else t+=i}return(s[s.length-1]!=='"'||s.length===1)&&e(s.length,"MISSING_CHAR",'Missing closing "quote'),t}a(Vf,"doubleQuotedValue");function Wf(s,e){let t="",n=s[e+1];for(;(n===" "||n===" "||n===`
95
+ `||n==="\r")&&!(n==="\r"&&s[e+2]!==`
96
+ `);)n===`
97
+ `&&(t+=`
98
+ `),e+=1,n=s[e+1];return t||(t=" "),{fold:t,offset:e}}a(Wf,"foldNewline");var Gf={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
99
+ `,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function Qf(s,e,t,n){let i=s.substr(e,t),o=i.length===t&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;try{return String.fromCodePoint(o)}catch{let l=s.substr(e-2,t+2);return n(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${l}`),l}}a(Qf,"parseCharCode");lo.resolveFlowScalar=Yf});var uo=y(fo=>{"use strict";var ae=O(),co=L(),Hf=bn(),zf=Sn();function Xf(s,e,t,n){let{value:i,type:r,comment:o,range:l}=e.type==="block-scalar"?Hf.resolveBlockScalar(s,e,n):zf.resolveFlowScalar(e,s.options.strict,n),c=t?s.directives.tagName(t.source,u=>n(t,"TAG_RESOLVE_FAILED",u)):null,f;s.options.stringKeys&&s.atKey?f=s.schema[ae.SCALAR]:c?f=Zf(s.schema,i,c,t,n):e.type==="scalar"?f=eu(s,i,e,n):f=s.schema[ae.SCALAR];let p;try{let u=f.resolve(i,h=>n(t??e,"TAG_RESOLVE_FAILED",h),s.options);p=ae.isScalar(u)?u:new co.Scalar(u)}catch(u){let h=u instanceof Error?u.message:String(u);n(t??e,"TAG_RESOLVE_FAILED",h),p=new co.Scalar(i)}return p.range=l,p.source=i,r&&(p.type=r),c&&(p.tag=c),f.format&&(p.format=f.format),o&&(p.comment=o),p}a(Xf,"composeScalar");function Zf(s,e,t,n,i){if(t==="!")return s[ae.SCALAR];let r=[];for(let l of s.tags)if(!l.collection&&l.tag===t)if(l.default&&l.test)r.push(l);else return l;for(let l of r)if(l.test?.test(e))return l;let o=s.knownTags[t];return o&&!o.collection?(s.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(i(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${t}`,t!=="tag:yaml.org,2002:str"),s[ae.SCALAR])}a(Zf,"findScalarTagByName");function eu({atKey:s,directives:e,schema:t},n,i,r){let o=t.tags.find(l=>(l.default===!0||s&&l.default==="key")&&l.test?.test(n))||t[ae.SCALAR];if(t.compat){let l=t.compat.find(c=>c.default&&c.test?.test(n))??t[ae.SCALAR];if(o.tag!==l.tag){let c=e.tagString(o.tag),f=e.tagString(l.tag),p=`Value may be parsed as either ${c} or ${f}`;r(i,"TAG_RESOLVE_FAILED",p,!0)}}return o}a(eu,"findScalarTagByTest");fo.composeScalar=Xf});var po=y(ho=>{"use strict";function tu(s,e,t){if(e){t??(t=e.length);for(let n=t-1;n>=0;--n){let i=e[n];switch(i.type){case"space":case"comment":case"newline":s-=i.source.length;continue}for(i=e[++n];i?.type==="space";)s+=i.source.length,i=e[++n];break}}return s}a(tu,"emptyScalarPosition");ho.emptyScalarPosition=tu});var yo=y(kn=>{"use strict";var su=Te(),nu=O(),iu=ro(),mo=uo(),ru=ve(),ou=po(),au={composeNode:go,composeEmptyNode:vn};function go(s,e,t,n){let i=s.atKey,{spaceBefore:r,comment:o,anchor:l,tag:c}=t,f,p=!0;switch(e.type){case"alias":f=lu(s,e,n),(l||c)&&n(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":f=mo.composeScalar(s,e,c,n),l&&(f.anchor=l.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{f=iu.composeCollection(au,s,e,t,n),l&&(f.anchor=l.source.substring(1))}catch(u){let h=u instanceof Error?u.message:String(u);n(e,"RESOURCE_EXHAUSTION",h)}break;default:{let u=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;n(e,"UNEXPECTED_TOKEN",u),p=!1}}return f??(f=vn(s,e.offset,void 0,null,t,n)),l&&f.anchor===""&&n(l,"BAD_ALIAS","Anchor cannot be an empty string"),i&&s.options.stringKeys&&(!nu.isScalar(f)||typeof f.value!="string"||f.tag&&f.tag!=="tag:yaml.org,2002:str")&&n(c??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),r&&(f.spaceBefore=!0),o&&(e.type==="scalar"&&e.source===""?f.comment=o:f.commentBefore=o),s.options.keepSourceTokens&&p&&(f.srcToken=e),f}a(go,"composeNode");function vn(s,e,t,n,{spaceBefore:i,comment:r,anchor:o,tag:l,end:c},f){let p={type:"scalar",offset:ou.emptyScalarPosition(e,t,n),indent:-1,source:""},u=mo.composeScalar(s,p,l,f);return o&&(u.anchor=o.source.substring(1),u.anchor===""&&f(o,"BAD_ALIAS","Anchor cannot be an empty string")),i&&(u.spaceBefore=!0),r&&(u.comment=r,u.range[2]=c),u}a(vn,"composeEmptyNode");function lu({options:s},{offset:e,source:t,end:n},i){let r=new su.Alias(t.substring(1));r.source===""&&i(e,"BAD_ALIAS","Alias cannot be an empty string"),r.source.endsWith(":")&&i(e+t.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let o=e+t.length,l=ru.resolveEnd(n,o,s.strict,i);return r.range=[e,o,l.offset],l.comment&&(r.comment=l.comment),r}a(lu,"composeAlias");kn.composeEmptyNode=vn;kn.composeNode=go});var So=y(wo=>{"use strict";var cu=xe(),bo=yo(),fu=ve(),uu=Ge();function hu(s,e,{offset:t,start:n,value:i,end:r},o){let l=Object.assign({_directives:e},s),c=new cu.Document(void 0,l),f={atKey:!1,atRoot:!0,directives:c.directives,options:c.options,schema:c.schema},p=uu.resolveProps(n,{indicator:"doc-start",next:i??r?.[0],offset:t,onError:o,parentIndent:0,startOnNewline:!0});p.found&&(c.directives.docStart=!0,i&&(i.type==="block-map"||i.type==="block-seq")&&!p.hasNewline&&o(p.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),c.contents=i?bo.composeNode(f,i,p,o):bo.composeEmptyNode(f,p.end,n,null,p,o);let u=c.contents.range[2],h=fu.resolveEnd(r,u,!1,o);return h.comment&&(c.comment=h.comment),c.range=[t,u,h.offset],c}a(hu,"composeDoc");wo.composeDoc=hu});var An=y(No=>{"use strict";var du=st("process"),pu=ls(),mu=xe(),Qe=We(),vo=O(),gu=So(),yu=ve();function He(s){if(typeof s=="number")return[s,s+1];if(Array.isArray(s))return s.length===2?s:[s[0],s[1]];let{offset:e,source:t}=s;return[e,e+(typeof t=="string"?t.length:1)]}a(He,"getErrorPos");function ko(s){let e="",t=!1,n=!1;for(let i=0;i<s.length;++i){let r=s[i];switch(r[0]){case"#":e+=(e===""?"":n?`
100
+
101
+ `:`
102
+ `)+(r.substring(1)||" "),t=!0,n=!1;break;case"%":s[i+1]?.[0]!=="#"&&(i+=1),t=!1;break;default:t||(n=!0),t=!1}}return{comment:e,afterEmptyLine:n}}a(ko,"parsePrelude");var Nn=class{static{a(this,"Composer")}constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(t,n,i,r)=>{let o=He(t);r?this.warnings.push(new Qe.YAMLWarning(o,n,i)):this.errors.push(new Qe.YAMLParseError(o,n,i))},this.directives=new pu.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,t){let{comment:n,afterEmptyLine:i}=ko(this.prelude);if(n){let r=e.contents;if(t)e.comment=e.comment?`${e.comment}
103
+ ${n}`:n;else if(i||e.directives.docStart||!r)e.commentBefore=n;else if(vo.isCollection(r)&&!r.flow&&r.items.length>0){let o=r.items[0];vo.isPair(o)&&(o=o.key);let l=o.commentBefore;o.commentBefore=l?`${n}
104
+ ${l}`:n}else{let o=r.commentBefore;r.commentBefore=o?`${n}
105
+ ${o}`:n}}if(t){for(let r=0;r<this.errors.length;++r)e.errors.push(this.errors[r]);for(let r=0;r<this.warnings.length;++r)e.warnings.push(this.warnings[r])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:ko(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,n=-1){for(let i of e)yield*this.next(i);yield*this.end(t,n)}*next(e){switch(du.env.LOG_STREAM&&console.dir(e,{depth:null}),e.type){case"directive":this.directives.add(e.source,(t,n,i)=>{let r=He(e);r[0]+=t,this.onError(r,"BAD_DIRECTIVE",n,i)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let t=gu.composeDoc(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{let t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,n=new Qe.YAMLParseError(He(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case"doc-end":{if(!this.doc){let n="Unexpected doc-end without preceding document";this.errors.push(new Qe.YAMLParseError(He(e),"UNEXPECTED_TOKEN",n));break}this.doc.directives.docEnd=!0;let t=yu.resolveEnd(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let n=this.doc.comment;this.doc.comment=n?`${n}
106
+ ${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new Qe.YAMLParseError(He(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let n=Object.assign({_directives:this.directives},this.options),i=new mu.Document(void 0,n);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),i.range=[0,t,t],this.decorate(i,!1),yield i}}};No.Composer=Nn});var Oo=y(Qt=>{"use strict";var bu=bn(),wu=Sn(),Su=We(),Ao=Ie();function vu(s,e=!0,t){if(s){let n=a((i,r,o)=>{let l=typeof i=="number"?i:Array.isArray(i)?i[0]:i.offset;if(t)t(l,r,o);else throw new Su.YAMLParseError([l,l+1],r,o)},"_onError");switch(s.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return wu.resolveFlowScalar(s,e,n);case"block-scalar":return bu.resolveBlockScalar({options:{strict:e}},s,n)}}return null}a(vu,"resolveAsScalar");function ku(s,e){let{implicitKey:t=!1,indent:n,inFlow:i=!1,offset:r=-1,type:o="PLAIN"}=e,l=Ao.stringifyString({type:o,value:s},{implicitKey:t,indent:n>0?" ".repeat(n):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}}),c=e.end??[{type:"newline",offset:-1,indent:n,source:`
107
+ `}];switch(l[0]){case"|":case">":{let f=l.indexOf(`
108
+ `),p=l.substring(0,f),u=l.substring(f+1)+`
109
+ `,h=[{type:"block-scalar-header",offset:r,indent:n,source:p}];return Eo(h,c)||h.push({type:"newline",offset:-1,indent:n,source:`
110
+ `}),{type:"block-scalar",offset:r,indent:n,props:h,source:u}}case'"':return{type:"double-quoted-scalar",offset:r,indent:n,source:l,end:c};case"'":return{type:"single-quoted-scalar",offset:r,indent:n,source:l,end:c};default:return{type:"scalar",offset:r,indent:n,source:l,end:c}}}a(ku,"createScalarToken");function Nu(s,e,t={}){let{afterKey:n=!1,implicitKey:i=!1,inFlow:r=!1,type:o}=t,l="indent"in s?s.indent:null;if(n&&typeof l=="number"&&(l+=2),!o)switch(s.type){case"single-quoted-scalar":o="QUOTE_SINGLE";break;case"double-quoted-scalar":o="QUOTE_DOUBLE";break;case"block-scalar":{let f=s.props[0];if(f.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o=f.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:o="PLAIN"}let c=Ao.stringifyString({type:o,value:e},{implicitKey:i||l===null,indent:l!==null&&l>0?" ".repeat(l):"",inFlow:r,options:{blockQuote:!0,lineWidth:-1}});switch(c[0]){case"|":case">":Au(s,c);break;case'"':En(s,c,"double-quoted-scalar");break;case"'":En(s,c,"single-quoted-scalar");break;default:En(s,c,"scalar")}}a(Nu,"setScalarValue");function Au(s,e){let t=e.indexOf(`
111
+ `),n=e.substring(0,t),i=e.substring(t+1)+`
112
+ `;if(s.type==="block-scalar"){let r=s.props[0];if(r.type!=="block-scalar-header")throw new Error("Invalid block scalar header");r.source=n,s.source=i}else{let{offset:r}=s,o="indent"in s?s.indent:-1,l=[{type:"block-scalar-header",offset:r,indent:o,source:n}];Eo(l,"end"in s?s.end:void 0)||l.push({type:"newline",offset:-1,indent:o,source:`
113
+ `});for(let c of Object.keys(s))c!=="type"&&c!=="offset"&&delete s[c];Object.assign(s,{type:"block-scalar",indent:o,props:l,source:i})}}a(Au,"setBlockScalarValue");function Eo(s,e){if(e)for(let t of e)switch(t.type){case"space":case"comment":s.push(t);break;case"newline":return s.push(t),!0}return!1}a(Eo,"addEndtoBlockProps");function En(s,e,t){switch(s.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":s.type=t,s.source=e;break;case"block-scalar":{let n=s.props.slice(1),i=e.length;s.props[0].type==="block-scalar-header"&&(i-=s.props[0].source.length);for(let r of n)r.offset+=i;delete s.props,Object.assign(s,{type:t,source:e,end:n});break}case"block-map":case"block-seq":{let i={type:"newline",offset:s.offset+e.length,indent:s.indent,source:`
114
+ `};delete s.items,Object.assign(s,{type:t,source:e,end:[i]});break}default:{let n="indent"in s?s.indent:-1,i="end"in s&&Array.isArray(s.end)?s.end.filter(r=>r.type==="space"||r.type==="comment"||r.type==="newline"):[];for(let r of Object.keys(s))r!=="type"&&r!=="offset"&&delete s[r];Object.assign(s,{type:t,indent:n,source:e,end:i})}}}a(En,"setFlowScalarValue");Qt.createScalarToken=ku;Qt.resolveAsScalar=vu;Qt.setScalarValue=Nu});var To=y(qo=>{"use strict";var Eu=a(s=>"type"in s?zt(s):Ht(s),"stringify");function zt(s){switch(s.type){case"block-scalar":{let e="";for(let t of s.props)e+=zt(t);return e+s.source}case"block-map":case"block-seq":{let e="";for(let t of s.items)e+=Ht(t);return e}case"flow-collection":{let e=s.start.source;for(let t of s.items)e+=Ht(t);for(let t of s.end)e+=t.source;return e}case"document":{let e=Ht(s);if(s.end)for(let t of s.end)e+=t.source;return e}default:{let e=s.source;if("end"in s&&s.end)for(let t of s.end)e+=t.source;return e}}}a(zt,"stringifyToken");function Ht({start:s,key:e,sep:t,value:n}){let i="";for(let r of s)i+=r.source;if(e&&(i+=zt(e)),t)for(let r of t)i+=r.source;return n&&(i+=zt(n)),i}a(Ht,"stringifyItem");qo.stringify=Eu});var Po=y(Co=>{"use strict";var On=Symbol("break visit"),Ou=Symbol("skip children"),Lo=Symbol("remove item");function le(s,e){"type"in s&&s.type==="document"&&(s={start:s.start,value:s.value}),_o(Object.freeze([]),s,e)}a(le,"visit");le.BREAK=On;le.SKIP=Ou;le.REMOVE=Lo;le.itemAtPath=(s,e)=>{let t=s;for(let[n,i]of e){let r=t?.[n];if(r&&"items"in r)t=r.items[i];else return}return t};le.parentCollection=(s,e)=>{let t=le.itemAtPath(s,e.slice(0,-1)),n=e[e.length-1][0],i=t?.[n];if(i&&"items"in i)return i;throw new Error("Parent collection not found")};function _o(s,e,t){let n=t(e,s);if(typeof n=="symbol")return n;for(let i of["key","value"]){let r=e[i];if(r&&"items"in r){for(let o=0;o<r.items.length;++o){let l=_o(Object.freeze(s.concat([[i,o]])),r.items[o],t);if(typeof l=="number")o=l-1;else{if(l===On)return On;l===Lo&&(r.items.splice(o,1),o-=1)}}typeof n=="function"&&i==="key"&&(n=n(e,s))}}return typeof n=="function"?n(e,s):n}a(_o,"_visit");Co.visit=le});var Xt=y($=>{"use strict";var qn=Oo(),qu=To(),Tu=Po(),Tn="\uFEFF",Ln="",_n="",Cn="",Lu=a(s=>!!s&&"items"in s,"isCollection"),_u=a(s=>!!s&&(s.type==="scalar"||s.type==="single-quoted-scalar"||s.type==="double-quoted-scalar"||s.type==="block-scalar"),"isScalar");function Cu(s){switch(s){case Tn:return"<BOM>";case Ln:return"<DOC>";case _n:return"<FLOW_END>";case Cn:return"<SCALAR>";default:return JSON.stringify(s)}}a(Cu,"prettyToken");function Pu(s){switch(s){case Tn:return"byte-order-mark";case Ln:return"doc-mode";case _n:return"flow-error-end";case Cn:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
115
+ `:case`\r
116
+ `: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(s[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}a(Pu,"tokenType");$.createScalarToken=qn.createScalarToken;$.resolveAsScalar=qn.resolveAsScalar;$.setScalarValue=qn.setScalarValue;$.stringify=qu.stringify;$.visit=Tu.visit;$.BOM=Tn;$.DOCUMENT=Ln;$.FLOW_END=_n;$.SCALAR=Cn;$.isCollection=Lu;$.isScalar=_u;$.prettyToken=Cu;$.tokenType=Pu});var Mn=y(Mo=>{"use strict";var ze=Xt();function B(s){switch(s){case void 0:case" ":case`
117
+ `:case"\r":case" ":return!0;default:return!1}}a(B,"isEmpty");var Io=new Set("0123456789ABCDEFabcdef"),Iu=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Zt=new Set(",[]{}"),Mu=new Set(` ,[]{}
118
+ \r `),Pn=a(s=>!s||Mu.has(s),"isNotAnchorChar"),In=class{static{a(this,"Lexer")}constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let n=this.next??"stream";for(;n&&(t||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t===" "||t===" ";)t=this.buffer[++e];return!t||t==="#"||t===`
119
+ `?!0:t==="\r"?this.buffer[e+1]===`
120
+ `:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let n=0;for(;t===" ";)t=this.buffer[++n+e];if(t==="\r"){let i=this.buffer[n+e+1];if(i===`
121
+ `||!i&&!this.atEnd)return e+n+1}return t===`
122
+ `||n>=this.indentNext||!t&&!this.atEnd?e+n:-1}if(t==="-"||t==="."){let n=this.buffer.substr(e,3);if((n==="---"||n==="...")&&B(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(`
123
+ `,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]===ze.BOM&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let t=e.length,n=e.indexOf("#");for(;n!==-1;){let r=e[n-1];if(r===" "||r===" "){t=n-1;break}else n=e.indexOf("#",n+1)}for(;;){let r=e[t-1];if(r===" "||r===" ")t-=1;else break}let i=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-i),this.pushNewline(),"stream"}if(this.atLineEnd()){let t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),"stream"}return yield ze.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==="...")&&B(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&&!B(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===":")&&B(t)){let n=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=n,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(Pn),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,n=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=n=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);let i=this.getLine();if(i===null)return this.setNext("flow");if((n!==-1&&n<this.indentNext&&i[0]!=="#"||n===0&&(i.startsWith("---")||i.startsWith("..."))&&B(i[3]))&&!(n===this.indentNext-1&&this.flowLevel===1&&(i[0]==="]"||i[0]==="}")))return this.flowLevel=0,yield ze.FLOW_END,yield*this.parseLineStart();let r=0;for(;i[r]===",";)r+=yield*this.pushCount(1),r+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(r+=yield*this.pushIndicators(),i[r]){case void 0:return"flow";case"#":return yield*this.pushCount(i.length-r),"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(Pn),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let o=this.charAt(1);if(this.flowKey||B(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 r=0;for(;this.buffer[t-1-r]==="\\";)r+=1;if(r%2===0)break;t=this.buffer.indexOf('"',t+1)}let n=this.buffer.substring(0,t),i=n.indexOf(`
124
+ `,this.pos);if(i!==-1){for(;i!==-1;){let r=this.continueScalar(i+1);if(r===-1)break;i=n.indexOf(`
125
+ `,r)}i!==-1&&(t=i-(n[i-1]==="\r"?2:1))}if(t===-1){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let t=this.buffer[++e];if(t==="+")this.blockScalarKeep=!0;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if(t!=="-")break}return yield*this.pushUntil(t=>B(t)||t==="#")}*parseBlockScalar(){let e=this.pos-1,t=0,n;e:for(let r=this.pos;n=this.buffer[r];++r)switch(n){case" ":t+=1;break;case`
126
+ `:e=r,t=0;break;case"\r":{let o=this.buffer[r+1];if(!o&&!this.atEnd)return this.setNext("block-scalar");if(o===`
127
+ `)break}default:break e}if(!n&&!this.atEnd)return this.setNext("block-scalar");if(t>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=t:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let r=this.continueScalar(e+1);if(r===-1)break;e=this.buffer.indexOf(`
128
+ `,r)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let i=e+1;for(n=this.buffer[i];n===" ";)n=this.buffer[++i];if(n===" "){for(;n===" "||n===" "||n==="\r"||n===`
129
+ `;)n=this.buffer[++i];e=i-1}else if(!this.blockScalarKeep)do{let r=e-1,o=this.buffer[r];o==="\r"&&(o=this.buffer[--r]);let l=r;for(;o===" ";)o=this.buffer[--r];if(o===`
130
+ `&&r>=this.pos&&r+1+t>l)e=r;else break}while(!0);return yield ze.SCALAR,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,n=this.pos-1,i;for(;i=this.buffer[++n];)if(i===":"){let r=this.buffer[n+1];if(B(r)||e&&Zt.has(r))break;t=n}else if(B(i)){let r=this.buffer[n+1];if(i==="\r"&&(r===`
131
+ `?(n+=1,i=`
132
+ `,r=this.buffer[n+1]):t=n),r==="#"||e&&Zt.has(r))break;if(i===`
133
+ `){let o=this.continueScalar(n+1);if(o===-1)break;n=Math.max(n,o-2)}}else{if(e&&Zt.has(i))break;t=n}return!i&&!this.atEnd?this.setNext("plain-scalar"):(yield ze.SCALAR,yield*this.pushToIndex(t+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){let n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(t&&(yield""),0)}*pushIndicators(){let e=0;e:for(;;){switch(this.charAt(0)){case"!":e+=yield*this.pushTag(),e+=yield*this.pushSpaces(!0);continue e;case"&":e+=yield*this.pushUntil(Pn),e+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{let t=this.flowLevel>0,n=this.charAt(1);if(B(n)||t&&Zt.has(n)){t?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,e+=yield*this.pushCount(1),e+=yield*this.pushSpaces(!0);continue e}}}break e}return e}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,t=this.buffer[e];for(;!B(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(Iu.has(t))t=this.buffer[++e];else if(t==="%"&&Io.has(this.buffer[e+1])&&Io.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===`
134
+ `?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
135
+ `?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,n;do n=this.buffer[++t];while(n===" "||e&&n===" ");let i=t-this.pos;return i>0&&(yield this.buffer.substr(this.pos,i),this.pos=t),i}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}};Mo.Lexer=In});var Dn=y($o=>{"use strict";var $n=class{static{a(this,"LineCounter")}constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t<n;){let r=t+n>>1;this.lineStarts[r]<e?t=r+1:n=r}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};let i=this.lineStarts[t-1];return{line:t,col:e-i+1}}}};$o.LineCounter=$n});var Bn=y(Ko=>{"use strict";var $u=st("process"),Do=Xt(),Du=Mn();function ee(s,e){for(let t=0;t<s.length;++t)if(s[t].type===e)return!0;return!1}a(ee,"includesToken");function Ro(s){for(let e=0;e<s.length;++e)switch(s[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}a(Ro,"findNonEmptyIndex");function jo(s){switch(s?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}a(jo,"isFlowToken");function es(s){switch(s.type){case"document":return s.start;case"block-map":{let e=s.items[s.items.length-1];return e.sep??e.start}case"block-seq":return s.items[s.items.length-1].start;default:return[]}}a(es,"getPrevProps");function ke(s){if(s.length===0)return[];let e=s.length;e:for(;--e>=0;)switch(s[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;s[++e]?.type==="space";);return s.splice(e,s.length)}a(ke,"getFirstKeyStartProps");function ts(s,e){if(e.length<1e5)Array.prototype.push.apply(s,e);else for(let t=0;t<e.length;++t)s.push(e[t])}a(ts,"arrayPushArray");function Bo(s){if(s.start.type==="flow-seq-start")for(let e of s.items)e.sep&&!e.value&&!ee(e.start,"explicit-key-ind")&&!ee(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,jo(e.value)?e.value.end?ts(e.value.end,e.sep):e.value.end=e.sep:ts(e.start,e.sep),delete e.sep)}a(Bo,"fixFlowSeqItems");var Rn=class{static{a(this,"Parser")}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 Du.Lexer,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let n of this.lexer.lex(e,t))yield*this.next(n);t||(yield*this.end())}*next(e){if(this.source=e,$u.env.LOG_TOKENS&&console.log("|",Do.prettyToken(e)),this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=Do.tokenType(e);if(t)if(t==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{let n=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:n,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type==="doc-end"&&e?.type!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let t=e??this.stack.pop();if(!t)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield t;else{let n=this.peek(1);switch(t.type==="block-scalar"?t.indent="indent"in n?n.indent:0:t.type==="flow-collection"&&n.type==="document"&&(t.indent=0),t.type==="flow-collection"&&Bo(t),n.type){case"document":n.value=t;break;case"block-scalar":n.props.push(t);break;case"block-map":{let i=n.items[n.items.length-1];if(i.value){n.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}else if(i.sep)i.value=t;else{Object.assign(i,{key:t,sep:[]}),this.onKeyLine=!i.explicitKey;return}break}case"block-seq":{let i=n.items[n.items.length-1];i.value?n.items.push({start:[],value:t}):i.value=t;break}case"flow-collection":{let i=n.items[n.items.length-1];!i||i.value?n.items.push({start:[],key:t,sep:[]}):i.sep?i.value=t:Object.assign(i,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((n.type==="document"||n.type==="block-map"||n.type==="block-seq")&&(t.type==="block-map"||t.type==="block-seq")){let i=t.items[t.items.length-1];i&&!i.sep&&!i.value&&i.start.length>0&&Ro(i.start)===-1&&(t.indent===0||i.start.every(r=>r.type!=="comment"||r.indent<t.indent))&&(n.type==="document"?n.end=i.start:n.items.push({start:i.start}),t.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{let e={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":{Ro(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=es(this.peek(2)),n=ke(t),i;e.end?(i=e.end,i.push(this.sourceToken),delete e.end):i=[this.sourceToken];let r={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:i}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=r}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(`
136
+ `)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
137
+ `,t)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){let n="end"in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type==="comment"?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){let i=e.items[e.items.length-2]?.value?.end;if(Array.isArray(i)){ts(i,t.start),i.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let n=!this.onKeyLine&&this.indent===e.indent,i=n&&(t.sep||t.explicitKey)&&this.type!=="seq-item-ind",r=[];if(i&&t.sep&&!t.value){let o=[];for(let l=0;l<t.sep.length;++l){let c=t.sep[l];switch(c.type){case"newline":o.push(l);break;case"space":break;case"comment":c.indent>e.indent&&(o.length=0);break;default:o.length=0}}o.length>=2&&(r=t.sep.splice(o[1]))}switch(this.type){case"anchor":case"tag":i||t.value?(r.push(this.sourceToken),e.items.push({start:r}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"explicit-key-ind":!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):i||t.value?(r.push(this.sourceToken),e.items.push({start:r,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(ee(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]});else if(jo(t.key)&&!ee(t.sep,"newline")){let o=ke(t.start),l=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:l,sep:c}]})}else r.length>0?t.sep=t.sep.concat(r,this.sourceToken):t.sep.push(this.sourceToken);else if(ee(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let o=ke(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||i?e.items.push({start:r,key:null,sep:[this.sourceToken]}):ee(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let o=this.flowScalar(this.type);i||t.value?(e.items.push({start:r,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&&!ee(t.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else n&&e.items.push({start:r});this.stack.push(o);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){let n="end"in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type==="comment"?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){let i=e.items[e.items.length-2]?.value?.end;if(Array.isArray(i)){ts(i,t.start),i.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;t.value||ee(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){let n=this.startBlockValue(e);if(n){this.stack.push(n);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if(this.type==="flow-error-end"){let n;do yield*this.pop(),n=this.peek(1);while(n?.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case"map-value-ind":!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let i=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:i,sep:[]}):t.sep?this.stack.push(i):Object.assign(t,{key:i,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}let n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{let n=this.peek(2);if(n.type==="block-map"&&(this.type==="map-value-ind"&&n.indent===e.indent||this.type==="newline"&&!n.items[n.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&n.type!=="flow-collection"){let i=es(n),r=ke(i);Bo(e);let o=e.end.splice(1,e.end.length);o.push(this.sourceToken);let l={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:r,key:e,sep:o}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=l}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let t=this.source.indexOf(`
138
+ `)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
139
+ `,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=es(e),n=ke(t);return n.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let t=es(e),n=ke(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!=="comment"||this.indent<=t?!1:e.every(n=>n.type==="newline"||n.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};Ko.Parser=Rn});var Jo=y(Ze=>{"use strict";var Fo=An(),Ru=xe(),Xe=We(),Bu=vs(),ju=O(),Ku=Dn(),Uo=Bn();function Yo(s){let e=s.prettyErrors!==!1;return{lineCounter:s.lineCounter||e&&new Ku.LineCounter||null,prettyErrors:e}}a(Yo,"parseOptions");function Fu(s,e={}){let{lineCounter:t,prettyErrors:n}=Yo(e),i=new Uo.Parser(t?.addNewLine),r=new Fo.Composer(e),o=Array.from(r.compose(i.parse(s)));if(n&&t)for(let l of o)l.errors.forEach(Xe.prettifyError(s,t)),l.warnings.forEach(Xe.prettifyError(s,t));return o.length>0?o:Object.assign([],{empty:!0},r.streamInfo())}a(Fu,"parseAllDocuments");function xo(s,e={}){let{lineCounter:t,prettyErrors:n}=Yo(e),i=new Uo.Parser(t?.addNewLine),r=new Fo.Composer(e),o=null;for(let l of r.compose(i.parse(s),!0,s.length))if(!o)o=l;else if(o.options.logLevel!=="silent"){o.errors.push(new Xe.YAMLParseError(l.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return n&&t&&(o.errors.forEach(Xe.prettifyError(s,t)),o.warnings.forEach(Xe.prettifyError(s,t))),o}a(xo,"parseDocument");function Uu(s,e,t){let n;typeof e=="function"?n=e:t===void 0&&e&&typeof e=="object"&&(t=e);let i=xo(s,t);if(!i)return null;if(i.warnings.forEach(r=>Bu.warn(i.options.logLevel,r)),i.errors.length>0){if(i.options.logLevel!=="silent")throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:n},t))}a(Uu,"parse");function Yu(s,e,t){let n=null;if(typeof e=="function"||Array.isArray(e)?n=e:t===void 0&&e&&(t=e),typeof t=="string"&&(t=t.length),typeof t=="number"){let i=Math.round(t);t=i<1?void 0:i>8?{indent:8}:{indent:i}}if(s===void 0){let{keepUndefined:i}=t??e??{};if(!i)return}return ju.isDocument(s)&&!n?s.toString(t):new Ru.Document(s,n,t).toString(t)}a(Yu,"stringify");Ze.parse=Uu;Ze.parseAllDocuments=Fu;Ze.parseDocument=xo;Ze.stringify=Yu});var Wo=y(q=>{"use strict";var xu=An(),Ju=xe(),Vu=nn(),jn=We(),Wu=Te(),te=O(),Gu=H(),Qu=L(),Hu=X(),zu=Z(),Xu=Xt(),Zu=Mn(),eh=Dn(),th=Bn(),ss=Jo(),Vo=Ae();q.Composer=xu.Composer;q.Document=Ju.Document;q.Schema=Vu.Schema;q.YAMLError=jn.YAMLError;q.YAMLParseError=jn.YAMLParseError;q.YAMLWarning=jn.YAMLWarning;q.Alias=Wu.Alias;q.isAlias=te.isAlias;q.isCollection=te.isCollection;q.isDocument=te.isDocument;q.isMap=te.isMap;q.isNode=te.isNode;q.isPair=te.isPair;q.isScalar=te.isScalar;q.isSeq=te.isSeq;q.Pair=Gu.Pair;q.Scalar=Qu.Scalar;q.YAMLMap=Hu.YAMLMap;q.YAMLSeq=zu.YAMLSeq;q.CST=Xu;q.Lexer=Zu.Lexer;q.LineCounter=eh.LineCounter;q.Parser=th.Parser;q.parse=ss.parse;q.parseAllDocuments=ss.parseAllDocuments;q.parseDocument=ss.parseDocument;q.stringify=ss.stringify;q.visit=Vo.visit;q.visitAsync=Vo.visitAsync});import{execFile as lh}from"node:child_process";import{realpathSync as Xo}from"node:fs";import{mkdir as ch,readFile as fh,rename as uh,rm as hh,writeFile as dh}from"node:fs/promises";import{homedir as ph}from"node:os";import tt from"node:path";import x from"node:process";import{fileURLToPath as mh}from"node:url";import{promisify as gh}from"node:util";function Yn(s){return s instanceof Error||Object.prototype.toString.call(s)==="[object Error]"}a(Yn,"isError");function fe(s){try{return Yn(s)&&typeof s.message=="string"&&s.message!==""?s.message:String(s)}catch{return"[unstringifiable value]"}}a(fe,"describeError");function la(s,e){return xn(s)&&s.code===e}a(la,"isErrorCode");function nt(s){return la(s,"ENOENT")}a(nt,"isEnoent");function F(s){return xn(s)&&!Array.isArray(s)}a(F,"isRecord");function xn(s){return typeof s=="object"&&s!==null}a(xn,"isObject");import{execFile as ca}from"node:child_process";import{promisify as fa}from"node:util";function ue(s,e){let t=new Error(`${s}: ${fe(e)}`,{cause:e});return typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(t,ue),t}a(ue,"chainError");var ua=fa(ca);async function Jn(s){try{let{stdout:e}=await ua("git",["-C",s,"branch","--show-current"]);return e.trim()}catch(e){throw ue("Could not resolve current branch (is this a git repository?)",e)}}a(Jn,"resolveCurrentBranch");function Vn(s){let e=s.trim().replaceAll("/","-");for(;e.endsWith("-");)e=e.slice(0,-1);return e}a(Vn,"sanitizeBranch");import{execFileSync as ha}from"node:child_process";import Wn from"node:process";function Gn(s={}){let{cwd:e}=s;if(e!=null&&e!=="")return e;let t=s.startDir??Wn.cwd(),n=pa(t);return"root"in n?n.root:(Wn.stderr.write(`resolve-project-root: git could not resolve the repository root (${n.failure}); anchoring at ${t}. Repo-relative paths may be wrong if the working directory changed.
140
+ `),t)}a(Gn,"resolveProjectRoot");function da(s){let e=F(s)?s.stderr:void 0;return typeof e=="string"&&e.trim()!==""?e.trim():s instanceof Error?s.message:String(s)}a(da,"describeGitFailure");function pa(s){try{let t=ha("git",["-C",s,"rev-parse","--show-toplevel"],{encoding:"utf8",stdio:["ignore","pipe","pipe"]}).trim();return t===""?{failure:"git returned an empty working-tree root"}:{root:t}}catch(e){return{failure:da(e)}}}a(pa,"tryGitToplevel");import it from"node:path";function Hn(s){let e=s.replace(/\.git$/,""),t=/^[^@]+@[^:]+:(?<path>.+)$/.exec(e);if(t?.groups?.path!==void 0)return Qn(t.groups.path);let n=/^https?:\/\/[^/]+\/(?<path>.+)$/.exec(e);return n?.groups?.path!==void 0?Qn(n.groups.path):null}a(Hn,"parseRemoteToOwnerRepo");function Qn(s){let e=s.split("/").filter(t=>t.length>0);return e.length<2?null:e.slice(-2).join("/")}a(Qn,"takeOwnerRepo");var ma=/(?<ticketId>[A-Za-z]{2,}-[0-9]+)(?:\.(?<revisit>[0-9]+))?/,ga=/^(?<ticketId>[0-9]+)(?:\.(?<revisit>[0-9]+))?/;function Xn(s){let e=ma.exec(s)?.groups;if(e?.ticketId!==void 0)return zn(e.ticketId.toUpperCase(),e.revisit);let t=ga.exec(s)?.groups;if(t?.ticketId!==void 0)return zn(t.ticketId,t.revisit)}a(Xn,"parseTicketRef");function zn(s,e){return{ticketId:s,...e!==void 0&&{revisit:Number(e)}}}a(zn,"composeTicketRef");var ya=/^[0-9]+$/,Zn=/^PR-[0-9]+$/;function ei(s){let e=Xn(s.branchName);if(e===void 0)return{ticket_id:null,ticket_ref:null};if(!ya.test(e.ticketId))return{ticket_id:e.ticketId,ticket_ref:e.ticketId};let t=s.ticketRefPrefix;if(t==="#")return{ticket_id:e.ticketId,ticket_ref:`#${e.ticketId}`};if(t!==void 0&&t!==""){let n=`${t}${e.ticketId}`;return{ticket_id:n,ticket_ref:n}}return{ticket_id:e.ticketId,ticket_ref:e.ticketId}}a(ei,"extractTicketId");function ti(s){return s===null||!Zn.test(s)?null:s.slice(3)}a(ti,"extractPrNumber");function si(s){return s!==null&&Zn.test(s)}a(si,"isPrIdentifier");var ba="github",wa="~/ai-artifacts",is="origin",Sa="main",va=Object.freeze({chats:"chats",devlogs:"devlogs",plans:"plans"}),ka=Object.freeze({github:{host:"github.com",prPath:"pull"},bitbucket:{host:"bitbucket.org",prPath:"pull-requests"}});function ni(s){let{preferences:e,branchName:t,cwd:n,home:i,now:r,remoteUrl:o=null}=s,l=e.project?.ticket_ref_prefix,c=ei(l===void 0?{branchName:t}:{branchName:t,ticketRefPrefix:l}),f=e.project?.slug??e.repository?.slug??it.basename(n),p=e.scm??ba,u=e.repository?.default_remote?.name??is,h=e.repository?.default_remote?.default_branch??Sa,g=`${u}/${h}`,b=e.artifacts?.base_dir??wa,d=Na(b,n,i),m={...va},w=e.artifacts?.paths;if(w!==void 0)for(let[A,E]of Object.entries(w))m[A]=E;let{ticketBaseUrl:v,ticketUrl:k}=Aa(e,c.ticket_id),N=Oa(p,c.ticket_id,o);return{ticket_id:c.ticket_id,ticket_ref:c.ticket_ref,project_slug:f,scm:p,default_branch:g,branch_name:t,artifact_base_dir:d,artifact_paths:m,created_at:qa(r),ticket_url:k,ticket_base_url:v,pr_url:N}}a(ni,"composeManifest");function Na(s,e,t){let n=s;return s==="~"?n=t:s.startsWith("~/")&&(n=it.join(t,s.slice(2))),it.isAbsolute(n)?n:it.resolve(e,n)}a(Na,"resolveArtifactBaseDir");function Aa(s,e){let t=s.ticket?.base_url??null,n=t!==null&&e!==null&&!si(e)?Ea(t,e):null;return{ticketBaseUrl:t,ticketUrl:n}}a(Aa,"resolveTicketUrls");function Ea(s,e){return`${s.replace(/\/+$/,"")}/${e}`}a(Ea,"joinTicketUrl");function Oa(s,e,t){let n=ti(e);if(n===null||t===null)return null;let i=Hn(t);if(i===null)return null;let{host:r,prPath:o}=ka[s];return`https://${r}/${i}/${o}/${n}`}a(Oa,"resolvePrUrl");function qa(s){return s.toISOString().replace(/\.\d{3}Z$/,"Z")}a(qa,"formatIsoUtc");import{readFile as sh}from"node:fs/promises";import{homedir as nh}from"node:os";import Go from"node:path";import ih from"node:process";var Ho=aa(Wo(),1);async function zo(s){let e=s.home??nh(),t=Go.join(s.cwd,".agents","preferences.yaml"),n=Go.join(e,".agents","preferences.yaml"),i=await Qo(t),r=await Qo(n),o=rh(r?.value,i?.value),l=oh(o),c={...i!==null&&{project:t},...r!==null&&{global:n}};return{preferences:l,sources:c}}a(zo,"readPreferences");async function Qo(s){let e;try{e=await sh(s,"utf8")}catch(n){if(nt(n))return null;throw n}let t;try{t=(0,Ho.parse)(e)}catch(n){throw ue(`${s}: malformed YAML`,n)}return{value:t??{}}}a(Qo,"readOptionalYaml");function rh(s,e){let t={};if(F(s))for(let[n,i]of Object.entries(s))t[n]=i;if(F(e))for(let[n,i]of Object.entries(e))t[n]=i;return t}a(rh,"mergeTopLevel");function oh(s){let e={},t=s.scm??s.platform;if(t!==void 0&&(s.scm===void 0&&ih.stderr.write(`preferences: the top-level 'platform' key is deprecated; rename it to 'scm'.
141
+ `),e.scm=ah(t)),s.project!==void 0){let n=Ne(s.project,"project"),i={};n.slug!==void 0&&(i.slug=se(n.slug,"project.slug")),n.ticket_ref_prefix!==void 0&&(i.ticket_ref_prefix=se(n.ticket_ref_prefix,"project.ticket_ref_prefix")),e.project=i}if(s.repository!==void 0){let n=Ne(s.repository,"repository"),i={};if(n.slug!==void 0&&(i.slug=se(n.slug,"repository.slug")),n.default_remote!==void 0){let r=Ne(n.default_remote,"repository.default_remote"),o={};r.name!==void 0&&(o.name=se(r.name,"repository.default_remote.name")),r.default_branch!==void 0&&(o.default_branch=se(r.default_branch,"repository.default_remote.default_branch")),i.default_remote=o}e.repository=i}if(s.artifacts!==void 0){let n=Ne(s.artifacts,"artifacts"),i={};if(n.base_dir!==void 0&&(i.base_dir=se(n.base_dir,"artifacts.base_dir")),n.paths!==void 0){let r=Ne(n.paths,"artifacts.paths"),o={};for(let[l,c]of Object.entries(r))o[l]=se(c,`artifacts.paths.${l}`);i.paths=o}e.artifacts=i}if(s.ticket!==void 0){let n=Ne(s.ticket,"ticket"),i={};n.base_url!==void 0&&(i.base_url=se(n.base_url,"ticket.base_url")),e.ticket=i}return e}a(oh,"projectPreferences");function ah(s){if(s==="github"||s==="bitbucket")return s;throw new Error(`preferences: 'scm' must be "github" or "bitbucket" (got ${Kn(s)})`)}a(ah,"expectScm");function se(s,e){if(typeof s=="string")return s;throw new Error(`preferences: '${e}' must be a string (got ${Kn(s)})`)}a(se,"expectString");function Ne(s,e){if(F(s))return s;throw new Error(`preferences: '${e}' must be an object (got ${Kn(s)})`)}a(Ne,"expectRecord");function Kn(s){if(typeof s=="string")return JSON.stringify(s);try{return JSON.stringify(s)}catch{return String(s)}}a(Kn,"formatValue");var yh=gh(lh),Fn=["ticket_url","pr_url"];async function bh(){try{let s=Lh(x.argv.slice(2)),e=Gn({cwd:s.cwd}),t=s.branch??await Jn(e),n=await wh({cwd:e,branch:t,now:new Date,mutations:s.mutations,...s.home!==null&&{home:s.home}});x.stdout.write(`${JSON.stringify(n,null,2)}
142
+ `)}catch(s){let e=fe(s);x.stderr.write(`derive-session-context: ${e}
143
+ `),x.exit(1)}}a(bh,"main");async function wh(s){if(s.branch===""||s.branch==="HEAD")throw new Error("Detached HEAD: This script requires an active branch. Create or check out a branch first.");let e=s.home??ph(),t=Vn(s.branch),n=tt.join(s.cwd,".agents",`${t}.branch-manifest.json`),i=tt.join(s.cwd,".agents",`${t}.manifest.json`),r=s.mutations??[],o=await Zo(n)??await Zo(i),l=await kh({cwd:s.cwd,home:e,branch:s.branch,now:s.now}),c=o?.record===void 0?{}:Oh(o.record,l),{seeded:f,explicitUrls:p}=Nh(l,Sh(c,r),r),u=vh(f,p,o?.record),h=`${JSON.stringify(u,null,2)}
144
+ `,g=o?.path===n?o.text:void 0;return h!==g&&await qh(n,h),u}a(wh,"deriveSessionContext");function Sh(s,e){let t=s;for(let n of e)t={...t,[n.field]:n.value};return t}a(Sh,"applyMutations");function vh(s,e,t){let n=typeof t?.created_at=="string"?t.created_at:s.created_at;return{...s,created_at:n,ticket_url:ea("ticket_url",s,e),pr_url:ea("pr_url",s,e),explicit_urls:e}}a(vh,"buildManifest");async function kh(s){let e=await zo({cwd:s.cwd,home:s.home}),t=e.preferences.repository?.default_remote?.name??is,n=await Th(s.cwd,t);return ni({preferences:e.preferences,branchName:s.branch,cwd:s.cwd,home:s.home,now:s.now,remoteUrl:n})}a(kh,"composeFromPreferences");function Nh(s,e,t){if(!Ah(s))return{seeded:s,explicitUrls:e};for(let n of Fn){let i=e[n];if(i==null)continue;let r=t.some(o=>o.field===n&&o.value!==null);x.stderr.write(r?`derive-session-context: refusing to store ${n} on default branch ${s.branch_name}
145
+ `:`derive-session-context: cleared ${n} stored on default branch ${s.branch_name}
146
+ `)}return{seeded:{...s,ticket_url:null,pr_url:null},explicitUrls:{}}}a(Nh,"enforceDefaultBranchInvariant");function Ah(s){let{default_branch:e,branch_name:t}=s,n=e.indexOf("/");return(n===-1?e:e.slice(n+1))===t}a(Ah,"isOnDefaultBranch");function Eh(s){return s===null||typeof s=="string"}a(Eh,"isStringOrNull");function Oh(s,e){let t={};if(Object.hasOwn(s,"explicit_urls")){let n=s.explicit_urls;if(!F(n))return t;for(let i of Fn){let r=n[i];Object.hasOwn(n,i)&&Eh(r)&&(t={...t,[i]:r})}return t}for(let n of Fn){let i=s[n];typeof i=="string"&&i!==e[n]&&(t={...t,[n]:i})}return t}a(Oh,"readExplicitUrls");async function Zo(s){let e;try{e=await fh(s,"utf8")}catch(n){if(nt(n))return null;throw n}let t;try{t=JSON.parse(e)}catch{return x.stderr.write(`derive-session-context: warning: prior manifest at ${s} is corrupt; stored URLs not carried forward
147
+ `),{path:s,text:e,record:void 0}}return{path:s,text:e,record:F(t)?t:void 0}}a(Zo,"readPriorManifest");function ea(s,e,t){return Object.hasOwn(t,s)?t[s]??null:e[s]??null}a(ea,"resolveStoredUrl");async function qh(s,e){let t=tt.dirname(s);await ch(t,{recursive:!0});let n=tt.join(t,`.${tt.basename(s)}.${x.pid}.${Date.now()}.tmp`);try{await dh(n,e,"utf8"),await uh(n,s)}catch(i){throw await hh(n,{force:!0}),i}}a(qh,"writeManifest");async function Th(s,e){try{let{stdout:t}=await yh("git",["-C",s,"remote","get-url",e]),n=t.trim();return n.length>0?n:null}catch{return null}}a(Th,"resolveRemoteUrl");function Lh(s){let e=null,t=null,n=null,i=[];for(let r=0;r<s.length;r+=1){let o=s[r];if(o!==void 0)if(o==="--branch")e=et(s,r,"--branch"),r+=1;else if(o.startsWith("--branch="))e=o.slice(9);else if(o==="--cwd")t=et(s,r,"--cwd"),r+=1;else if(o.startsWith("--cwd="))t=o.slice(6);else if(o==="--home")n=et(s,r,"--home"),r+=1;else if(o.startsWith("--home="))n=o.slice(7);else if(o==="--set-ticket-url")i.push({field:"ticket_url",value:et(s,r,"--set-ticket-url")}),r+=1;else if(o.startsWith("--set-ticket-url="))i.push({field:"ticket_url",value:o.slice(17)});else if(o==="--set-pr-url")i.push({field:"pr_url",value:et(s,r,"--set-pr-url")}),r+=1;else if(o.startsWith("--set-pr-url="))i.push({field:"pr_url",value:o.slice(13)});else if(o==="--clear-ticket-url")i.push({field:"ticket_url",value:null});else if(o==="--clear-pr-url")i.push({field:"pr_url",value:null});else throw new Error(`unknown argument: ${o}`)}return{branch:e,cwd:t,home:n,mutations:i}}a(Lh,"parseArgs");function et(s,e,t){let n=s[e+1];if(n===void 0||n.startsWith("--"))throw new Error(`${t} requires a value`);return n}a(et,"consumeValue");_h()&&await bh();function _h(){let s=x.argv[1];if(s===void 0)return!1;try{return Xo(mh(import.meta.url))===Xo(s)}catch(e){let t=fe(e);return x.stderr.write(`derive-session-context: warning: could not determine entry point: ${t}
148
+ `),!0}}a(_h,"isMain");export{wh as deriveSessionContext,Lh as parseArgs};