@webquark/core 1.1.0 → 1.1.1-dev.1

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 (209) hide show
  1. package/dist/browser/components/q-syntax-view.d.ts +1 -0
  2. package/dist/browser/components/q-syntax-view.js +1 -0
  3. package/dist/browser/webquark.css +1 -1
  4. package/dist/playground/assets/reel-motion.webm +0 -0
  5. package/dist/playground/build/{p-846dc838.entry.js → p-014c2f4a.entry.js} +1 -1
  6. package/dist/playground/build/{p-0182e114.entry.js → p-0389577c.entry.js} +1 -1
  7. package/dist/playground/build/p-041e17c1.entry.js +1 -0
  8. package/dist/playground/build/p-0479c571.entry.js +1 -0
  9. package/dist/playground/build/{p-17b9713f.entry.js → p-0ebca9be.entry.js} +1 -1
  10. package/dist/playground/build/{p-0a2c52de.entry.js → p-1bf375f7.entry.js} +2 -2
  11. package/dist/playground/build/{p-e2721e77.entry.js → p-20dc3ab5.entry.js} +1 -1
  12. package/dist/playground/build/p-28d3348f.entry.js +1 -0
  13. package/dist/playground/build/p-35c177d3.entry.js +1 -0
  14. package/dist/playground/build/{p-f4d23ffe.entry.js → p-3a60086d.entry.js} +1 -1
  15. package/dist/playground/build/{p-e723a7ae.entry.js → p-3ab798aa.entry.js} +1 -1
  16. package/dist/playground/build/{p-15bad9ef.entry.js → p-3b580baf.entry.js} +1 -1
  17. package/dist/playground/build/{p-4609c362.entry.js → p-3b65f787.entry.js} +1 -1
  18. package/dist/playground/build/{p-9f99de41.css → p-45f6e9ec.css} +1 -1
  19. package/dist/playground/build/p-4bf610f8.entry.js +1 -0
  20. package/dist/playground/build/{p-f51e1098.entry.js → p-4d30227e.entry.js} +1 -1
  21. package/dist/playground/build/p-4de536ae.entry.js +1 -0
  22. package/dist/playground/build/{p-3daafc56.entry.js → p-4e4d70c9.entry.js} +1 -1
  23. package/dist/playground/build/p-4efeb7c9.entry.js +1 -0
  24. package/dist/playground/build/{p-a314bc21.entry.js → p-51b3d71b.entry.js} +1 -1
  25. package/dist/playground/build/p-778b6bbb.entry.js +1 -0
  26. package/dist/playground/build/{p-a66550da.entry.js → p-7da78b2f.entry.js} +1 -1
  27. package/dist/playground/build/{p-fe14f038.entry.js → p-7f8f986b.entry.js} +1 -1
  28. package/dist/playground/build/{p-e0943d41.entry.js → p-8253c742.entry.js} +1 -1
  29. package/dist/playground/build/{p-a2334abe.entry.js → p-9a1ddeb7.entry.js} +1 -1
  30. package/dist/playground/build/{p-CArIPzJU.js → p-B610wOGe.js} +1 -1
  31. package/dist/playground/build/p-BxxU73QQ.js +1 -0
  32. package/dist/playground/build/p-CIMzZPQO.js +3 -0
  33. package/dist/playground/build/p-CfR85WgM.js +13 -0
  34. package/dist/playground/build/{p-DDUED8LT.js → p-D8p28N9s.js} +1 -1
  35. package/dist/playground/build/{p-BDsIecIx.js → p-DbzjRzhu.js} +1 -1
  36. package/dist/playground/build/{p-BOdNg0jc.js → p-DeOEN0si.js} +1 -1
  37. package/dist/playground/build/p-a2b1de23.entry.js +1 -0
  38. package/dist/playground/build/{p-dbcf7592.entry.js → p-a55edc17.entry.js} +1 -1
  39. package/dist/playground/build/p-a8808020.entry.js +1 -0
  40. package/dist/playground/build/{p-9a76cd71.entry.js → p-b1084b3c.entry.js} +1 -1
  41. package/dist/playground/build/{p-a2ff1b64.entry.js → p-b6c4dff4.entry.js} +1 -1
  42. package/dist/playground/build/{p-b21ad707.entry.js → p-b962e950.entry.js} +1 -1
  43. package/dist/playground/build/{p-5b584d3c.entry.js → p-bc369cd6.entry.js} +1 -1
  44. package/dist/playground/build/p-c119a8ea.entry.js +1 -0
  45. package/dist/playground/build/{p-85131314.entry.js → p-c6b77e9a.entry.js} +1 -1
  46. package/dist/playground/build/{p-84b350a3.entry.js → p-ca1c03b4.entry.js} +1 -1
  47. package/dist/playground/build/{p-b8fdef4f.entry.js → p-ce436162.entry.js} +1 -1
  48. package/dist/playground/build/{p-86c05afd.entry.js → p-d0a47a7c.entry.js} +1 -1
  49. package/dist/playground/build/{p-222405b8.entry.js → p-e1fbc8fc.entry.js} +1 -1
  50. package/dist/playground/build/{p-44bbe12f.entry.js → p-e32833ce.entry.js} +1 -1
  51. package/dist/playground/build/{p-d86bd51d.entry.js → p-e369a4aa.entry.js} +1 -1
  52. package/dist/playground/build/p-e4430c61.entry.js +1 -0
  53. package/dist/playground/build/{p-aa342e81.entry.js → p-e9c0052b.entry.js} +1 -1
  54. package/dist/playground/build/{p-852e88ae.entry.js → p-f5c4ca18.entry.js} +1 -1
  55. package/dist/playground/build/{p-d4788321.entry.js → p-f6683126.entry.js} +1 -1
  56. package/dist/playground/build/{p-Dnz3WmdX.js → p-ojSDiptZ.js} +1 -1
  57. package/dist/playground/build/webquark.css +1 -1
  58. package/dist/playground/build/webquark.esm.js +1 -1
  59. package/dist/playground/css/base.css +17 -44
  60. package/dist/playground/formatters/prettier/LICENSE +7 -0
  61. package/dist/playground/formatters/prettier/THIRD-PARTY-NOTICES.md +7941 -0
  62. package/dist/playground/formatters/prettier/html-fragment.mjs +1 -0
  63. package/dist/playground/formatters/prettier/html-fragment.mjs.gz +0 -0
  64. package/dist/playground/formatters/prettier/languages/angular.mjs +1 -0
  65. package/dist/playground/formatters/prettier/languages/angular.mjs.gz +0 -0
  66. package/dist/playground/formatters/prettier/languages/css.mjs +1 -0
  67. package/dist/playground/formatters/prettier/languages/css.mjs.gz +0 -0
  68. package/dist/playground/formatters/prettier/languages/flow.mjs +1 -0
  69. package/dist/playground/formatters/prettier/languages/flow.mjs.gz +0 -0
  70. package/dist/playground/formatters/prettier/languages/graphql.mjs +1 -0
  71. package/dist/playground/formatters/prettier/languages/graphql.mjs.gz +0 -0
  72. package/dist/playground/formatters/prettier/languages/handlebars.mjs +1 -0
  73. package/dist/playground/formatters/prettier/languages/handlebars.mjs.gz +0 -0
  74. package/dist/playground/formatters/prettier/languages/html.mjs +1 -0
  75. package/dist/playground/formatters/prettier/languages/html.mjs.gz +0 -0
  76. package/dist/playground/formatters/prettier/languages/javascript.mjs +1 -0
  77. package/dist/playground/formatters/prettier/languages/javascript.mjs.gz +0 -0
  78. package/dist/playground/formatters/prettier/languages/json-stringify.mjs +1 -0
  79. package/dist/playground/formatters/prettier/languages/json-stringify.mjs.gz +0 -0
  80. package/dist/playground/formatters/prettier/languages/json.mjs +1 -0
  81. package/dist/playground/formatters/prettier/languages/json.mjs.gz +0 -0
  82. package/dist/playground/formatters/prettier/languages/json5.mjs +1 -0
  83. package/dist/playground/formatters/prettier/languages/json5.mjs.gz +0 -0
  84. package/dist/playground/formatters/prettier/languages/jsonc.mjs +1 -0
  85. package/dist/playground/formatters/prettier/languages/jsonc.mjs.gz +0 -0
  86. package/dist/playground/formatters/prettier/languages/jsx.mjs +1 -0
  87. package/dist/playground/formatters/prettier/languages/jsx.mjs.gz +0 -0
  88. package/dist/playground/formatters/prettier/languages/less.mjs +1 -0
  89. package/dist/playground/formatters/prettier/languages/less.mjs.gz +0 -0
  90. package/dist/playground/formatters/prettier/languages/lwc.mjs +1 -0
  91. package/dist/playground/formatters/prettier/languages/lwc.mjs.gz +0 -0
  92. package/dist/playground/formatters/prettier/languages/markdown.mjs +1 -0
  93. package/dist/playground/formatters/prettier/languages/markdown.mjs.gz +0 -0
  94. package/dist/playground/formatters/prettier/languages/mdx.mjs +1 -0
  95. package/dist/playground/formatters/prettier/languages/mdx.mjs.gz +0 -0
  96. package/dist/playground/formatters/prettier/languages/mjml.mjs +1 -0
  97. package/dist/playground/formatters/prettier/languages/mjml.mjs.gz +0 -0
  98. package/dist/playground/formatters/prettier/languages/postcss.mjs +1 -0
  99. package/dist/playground/formatters/prettier/languages/postcss.mjs.gz +0 -0
  100. package/dist/playground/formatters/prettier/languages/scss.mjs +1 -0
  101. package/dist/playground/formatters/prettier/languages/scss.mjs.gz +0 -0
  102. package/dist/playground/formatters/prettier/languages/tsx.mjs +1 -0
  103. package/dist/playground/formatters/prettier/languages/tsx.mjs.gz +0 -0
  104. package/dist/playground/formatters/prettier/languages/typescript.mjs +1 -0
  105. package/dist/playground/formatters/prettier/languages/typescript.mjs.gz +0 -0
  106. package/dist/playground/formatters/prettier/languages/vue.mjs +1 -0
  107. package/dist/playground/formatters/prettier/languages/vue.mjs.gz +0 -0
  108. package/dist/playground/formatters/prettier/languages/yaml.mjs +1 -0
  109. package/dist/playground/formatters/prettier/languages/yaml.mjs.gz +0 -0
  110. package/dist/playground/formatters/prettier/manifest.json +87 -0
  111. package/dist/playground/formatters/prettier/plugins/acorn.mjs +17 -0
  112. package/dist/playground/formatters/prettier/plugins/acorn.mjs.gz +0 -0
  113. package/dist/playground/formatters/prettier/plugins/angular.mjs +7 -0
  114. package/dist/playground/formatters/prettier/plugins/angular.mjs.gz +0 -0
  115. package/dist/playground/formatters/prettier/plugins/babel.mjs +16 -0
  116. package/dist/playground/formatters/prettier/plugins/babel.mjs.gz +0 -0
  117. package/dist/playground/formatters/prettier/plugins/estree.mjs +44 -0
  118. package/dist/playground/formatters/prettier/plugins/estree.mjs.gz +0 -0
  119. package/dist/playground/formatters/prettier/plugins/flow.mjs +7 -0
  120. package/dist/playground/formatters/prettier/plugins/flow.mjs.gz +0 -0
  121. package/dist/playground/formatters/prettier/plugins/glimmer.mjs +37 -0
  122. package/dist/playground/formatters/prettier/plugins/glimmer.mjs.gz +0 -0
  123. package/dist/playground/formatters/prettier/plugins/graphql.mjs +17 -0
  124. package/dist/playground/formatters/prettier/plugins/graphql.mjs.gz +0 -0
  125. package/dist/playground/formatters/prettier/plugins/html.mjs +25 -0
  126. package/dist/playground/formatters/prettier/plugins/html.mjs.gz +0 -0
  127. package/dist/playground/formatters/prettier/plugins/markdown.mjs +70 -0
  128. package/dist/playground/formatters/prettier/plugins/markdown.mjs.gz +0 -0
  129. package/dist/playground/formatters/prettier/plugins/meriyah.mjs +9 -0
  130. package/dist/playground/formatters/prettier/plugins/meriyah.mjs.gz +0 -0
  131. package/dist/playground/formatters/prettier/plugins/postcss.mjs +62 -0
  132. package/dist/playground/formatters/prettier/plugins/postcss.mjs.gz +0 -0
  133. package/dist/playground/formatters/prettier/plugins/typescript.mjs +22 -0
  134. package/dist/playground/formatters/prettier/plugins/typescript.mjs.gz +0 -0
  135. package/dist/playground/formatters/prettier/plugins/yaml.mjs +150 -0
  136. package/dist/playground/formatters/prettier/plugins/yaml.mjs.gz +0 -0
  137. package/dist/playground/formatters/prettier/runtime.d.mts +2 -0
  138. package/dist/playground/formatters/prettier/runtime.mjs +1 -0
  139. package/dist/playground/formatters/prettier/runtime.mjs.gz +0 -0
  140. package/dist/playground/formatters/prettier/standalone.mjs +29 -0
  141. package/dist/playground/formatters/prettier/standalone.mjs.gz +0 -0
  142. package/dist/playground/index.html +1 -1
  143. package/dist/playground/playground/components.manifest.json +54 -44
  144. package/dist/playground/playground/consumer.html +27 -0
  145. package/dist/playground/playground/specs/q-accordion.sandbox.json +38 -0
  146. package/dist/playground/playground/specs/q-alert.sandbox.json +95 -0
  147. package/dist/playground/playground/specs/q-avatar.sandbox.json +39 -6
  148. package/dist/playground/playground/specs/q-banner.sandbox.json +66 -0
  149. package/dist/playground/playground/specs/q-button.sandbox.json +115 -15
  150. package/dist/playground/playground/specs/q-card.sandbox.json +50 -9
  151. package/dist/playground/playground/specs/q-carousel.sandbox.json +109 -6
  152. package/dist/playground/playground/specs/q-chip.sandbox.json +29 -2
  153. package/dist/playground/playground/specs/q-control-group.sandbox.json +11 -1
  154. package/dist/playground/playground/specs/q-conversation-bubble.sandbox.json +13 -2
  155. package/dist/playground/playground/specs/q-data-table.sandbox.json +137 -12
  156. package/dist/playground/playground/specs/q-dialog.sandbox.json +62 -5
  157. package/dist/playground/playground/specs/q-divider.sandbox.json +1 -1
  158. package/dist/playground/playground/specs/q-dropdown.sandbox.json +176 -20
  159. package/dist/playground/playground/specs/q-form.sandbox.json +66 -1
  160. package/dist/playground/playground/specs/q-grid.sandbox.json +37 -1
  161. package/dist/playground/playground/specs/q-icon.sandbox.json +62 -23
  162. package/dist/playground/playground/specs/q-image-comparison.sandbox.json +41 -5
  163. package/dist/playground/playground/specs/q-inline.sandbox.json +41 -0
  164. package/dist/playground/playground/specs/q-input.sandbox.json +71 -5
  165. package/dist/playground/playground/specs/q-link.sandbox.json +213 -17
  166. package/dist/playground/playground/specs/q-map.sandbox.json +434 -28
  167. package/dist/playground/playground/specs/q-media.sandbox.json +85 -0
  168. package/dist/playground/playground/specs/q-navbar.sandbox.json +378 -29
  169. package/dist/playground/playground/specs/q-pagination.sandbox.json +89 -0
  170. package/dist/playground/playground/specs/q-panel.sandbox.json +63 -2
  171. package/dist/playground/playground/specs/q-progress.sandbox.json +37 -11
  172. package/dist/playground/playground/specs/q-quantity-selector.sandbox.json +15 -3
  173. package/dist/playground/playground/specs/q-radio-group.sandbox.json +94 -14
  174. package/dist/playground/playground/specs/q-reel.sandbox.json +22 -5
  175. package/dist/playground/playground/specs/q-scrollable.sandbox.json +16 -0
  176. package/dist/playground/playground/specs/q-section.sandbox.json +69 -0
  177. package/dist/playground/playground/specs/q-sidepanel.sandbox.json +271 -12
  178. package/dist/playground/playground/specs/q-slider.sandbox.json +104 -1
  179. package/dist/playground/playground/specs/q-stack.sandbox.json +13 -2
  180. package/dist/playground/playground/specs/q-step-diagram-item.sandbox.json +101 -0
  181. package/dist/playground/playground/specs/q-step-diagram.sandbox.json +29 -1
  182. package/dist/playground/playground/specs/q-syntax-box.sandbox.json +85 -8
  183. package/dist/playground/playground/specs/q-syntax-view.sandbox.json +45 -0
  184. package/dist/playground/playground/specs/q-tabs.sandbox.json +164 -0
  185. package/dist/playground/playground/specs/q-textarea.sandbox.json +45 -1
  186. package/dist/playground/playground/specs/q-thumbnail.sandbox.json +67 -0
  187. package/dist/playground/playground/specs/q-toast.sandbox.json +19 -8
  188. package/dist/playground/playground/specs/q-toggle.sandbox.json +22 -2
  189. package/dist/playground/playground/specs/q-toolbar.sandbox.json +55 -0
  190. package/dist/playground/playground/specs/q-tooltip.sandbox.json +18 -2
  191. package/dist/playground/playground.js +3737 -1764
  192. package/dist/playground/presets.html +58 -37
  193. package/dist/playground/views/tooling/tooling.html +5 -5
  194. package/package.json +3 -3
  195. package/dist/playground/build/p-048103e0.entry.js +0 -1
  196. package/dist/playground/build/p-0baf478a.entry.js +0 -1
  197. package/dist/playground/build/p-2eaa3a9f.entry.js +0 -1
  198. package/dist/playground/build/p-65fe9cac.entry.js +0 -1
  199. package/dist/playground/build/p-8c5b2706.entry.js +0 -1
  200. package/dist/playground/build/p-923527f0.entry.js +0 -1
  201. package/dist/playground/build/p-Bj2RJb2E.js +0 -1
  202. package/dist/playground/build/p-DoGM9gsC.js +0 -3
  203. package/dist/playground/build/p-a0d97367.entry.js +0 -1
  204. package/dist/playground/build/p-a16bd8d5.entry.js +0 -13
  205. package/dist/playground/build/p-a3e1096d.entry.js +0 -1
  206. package/dist/playground/build/p-b1c771fb.entry.js +0 -1
  207. package/dist/playground/build/p-b45ca926.entry.js +0 -1
  208. package/dist/playground/build/p-ca1c516e.js +0 -1
  209. package/dist/playground/build/p-eb800d1e.entry.js +0 -1
@@ -0,0 +1,150 @@
1
+ var vo=Object.defineProperty;var Xt=(t,e)=>{for(var n in e)vo(t,n,{get:e[n],enumerable:true})};var Po={};Xt(Po,{__parsePrettierYamlConfig:()=>dl,languages:()=>Br,options:()=>Rr,parsers:()=>tr,printers:()=>hl});var zt=(t,e)=>(n,s,...r)=>n|1&&s==null?undefined:(e.call(s)??s[t]).apply(s,r);function Do(t){return this[t<0?this.length+t:t]}var xo=zt("at",function(){if(Array.isArray(this)||typeof this=="string")return Do}),G=xo;var Mo=String.prototype.replaceAll??function(t,e){return t.global?this.replace(t,e):this.split(t).join(e)},$o=zt("replaceAll",function(){if(typeof this=="string")return Mo}),Zt=$o;var Bo=()=>{},kt=Bo;var St="string",Et="array",en="cursor",tn="indent",Ge="align",Qe="trim",We="group",He="fill",Je="if-break",nn="indent-if-break",Xe="line-suffix",sn="line-suffix-boundary",ke="line",rn="label",ze="break-parent",on=new Set([en,tn,Ge,Qe,We,He,Je,nn,Xe,sn,ke,rn,ze]);function an(t,e,n){if(!t.has(e)){let s=n(e);t.set(e,s)}return t.get(e)}function Ro(t){if(typeof t=="string")return St;if(Array.isArray(t))return Et;if(!t)return;let{type:e}=t;if(on.has(e))return e}var ln=Ro;var qo=(t)=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(t);function Fo(t){let e=t===null?"null":typeof t;if(e!=="string"&&e!=="object")return`Unexpected doc '${e}',
2
+ Expected it to be 'string' or 'object'.`;if(ln(t))throw new Error("doc is valid.");let n=Object.prototype.toString.call(t);if(n!=="[object Object]")return`Unexpected doc '${n}'.`;let s=qo([...on].map((r)=>`'${r}'`));return`Unexpected doc.type '${t.type}'.
3
+ Expected it to be ${s}.`}var cs=class extends Error{name="InvalidDocError";constructor(e){super(Fo(e)),this.doc=e}},sr=cs;function Ko(t,e){if(typeof t=="string")return e(t);let n=new Map;return s(t);function s(i){return an(n,i,r)}function r(i){switch(ln(i)){case Et:return e(i.map(s));case He:return e({...i,parts:i.parts.map(s)});case Je:return e({...i,breakContents:s(i.breakContents),flatContents:s(i.flatContents)});case We:{let{expandedStates:o,contents:a}=i;return o?(o=o.map(s),a=o[0]):a=s(a),e({...i,contents:a,expandedStates:o})}case Ge:case tn:case nn:case rn:case Xe:return e({...i,contents:s(i.contents)});case St:case en:case Qe:case sn:case ke:case ze:return e(i);default:throw new sr(i)}}}function rr(t,e=Se){return Ko(t,(n)=>typeof n=="string"?q(e,n.split(`
4
+ `)):n)}var re=kt,cn=kt,ir=kt,or=kt;function Ct(t,e){return or(t),re(e),{type:Ge,contents:e,n:t}}function fs(t){return Ct(Number.NEGATIVE_INFINITY,t)}function Nt(t){return Ct({type:"root"},t)}function ar(t){return Ct(-1,t)}var At={type:ze};function fn(t){return ir(t),{type:He,parts:t}}function Ze(t,e={}){return re(t),cn(e.expandedStates,true),{type:We,id:e.id,contents:t,break:!!e.shouldBreak,expandedStates:e.expandedStates}}function us(t,e){return Ze(t[0],{...e,expandedStates:t})}function Tt(t,e="",n={}){return re(t),e!==""&&re(e),{type:Je,breakContents:t,flatContents:e,groupId:n.groupId}}function q(t,e){re(t),cn(e);let n=[];for(let s=0;s<e.length;s++)s!==0&&n.push(t),n.push(e[s]);return n}var Ee={type:ke},un={type:ke,soft:true},Yo={type:ke,hard:true},O=[Yo,At],Uo={type:ke,hard:true,literal:true},Se=[Uo,At];function lr(t){return re(t),{type:Xe,contents:t}}var cr={type:Qe};function pn(t){return(e,n,s)=>{if(n===false)return false;let r=!!s?.backwards,{length:i}=e,o=n;for(;o>=0&&o<i;){let a=e.charAt(o);if(t instanceof RegExp){if(!t.test(a))return o}else if(!t.includes(a))return o;r?o--:o++}return o===-1||o===i?o:false}}var Tc=pn(/\s/),ps=pn(" \t"),Oc=pn(",; \t"),_c=pn(/[^\n\r]/);var fr=(t)=>t===`
5
+ `||t==="\r"||t==="\u2028"||t==="\u2029";function jo(t,e,n){if(e===false)return false;let s=!!n?.backwards,r=t.charAt(e);if(s){if(t.charAt(e-1)==="\r"&&r===`
6
+ `)return e-2;if(fr(r))return e-1}else{if(r==="\r"&&t.charAt(e+1)===`
7
+ `)return e+2;if(fr(r))return e+1}return e}var ms=jo;function Vo(t,e){let n=e-1;n=ps(t,n,{backwards:true}),n=ms(t,n,{backwards:true}),n=ps(t,n,{backwards:true});let s=ms(t,n,{backwards:true});return n!==s}var hs=Vo;var ds=class extends Error{name="UnexpectedNodeError";constructor(e,n,s="type"){super(`Unexpected ${n} node ${s}: ${JSON.stringify(e[s])}.`),this.node=e}},ur=ds;function pr(t,e){let{node:n}=t;if(n.type==="root"&&e.filepath&&/(?:[/\\]|^)\.(?:prettier|stylelint|lintstaged)rc$/.test(e.filepath))return async(s)=>{let r=await s(e.originalText,{parser:"json"});return r?[r,O]:undefined}}pr.getVisitorKeys=()=>[];var mr=pr;var Ot=null;function _t(t){if(Ot!==null&&typeof Ot.property){let e=Ot;return Ot=_t.prototype=null,e}return Ot=_t.prototype=t??Object.create(null),new _t}var Go=10;for(let t=0;t<=Go;t++)_t();function gs(t){return _t(t)}function Qo(t,e="type"){gs(t);function n(s){let r=s[e],i=t[r];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${r}'.`),{node:s});return i}return n}var hr=Qo;var P=[["children","anchor","tag","indicatorComment","leadingComments","middleComments","trailingComment","endComments"],["anchor","tag","indicatorComment","leadingComments","middleComments","trailingComment","endComments"],["key","value","children","anchor","tag","indicatorComment","leadingComments","middleComments","trailingComment","endComments"],["content","children","anchor","tag","indicatorComment","leadingComments","middleComments","trailingComment","endComments"],["indicatorComment","leadingComments","middleComments","trailingComment","endComments"]],dr={root:P[0],document:["head","body","children","anchor","tag","indicatorComment","leadingComments","middleComments","trailingComment","endComments"],documentHead:P[0],documentBody:P[0],directive:P[1],alias:P[1],blockLiteral:P[1],blockFolded:P[0],plain:P[0],quoteSingle:P[1],quoteDouble:P[1],mapping:P[0],mappingItem:P[2],mappingKey:P[3],mappingValue:P[3],sequence:P[0],sequenceItem:P[3],flowMapping:P[0],flowMappingItem:P[2],flowSequence:P[0],flowSequenceItem:P[3],comment:P[1],tag:P[4],anchor:P[4]};var Wo=hr(dr),gr=Wo;var Ye=(t)=>t.position.start.offset,yr=(t)=>t.position.end.offset;var br="format";var wr=/^\s*#[^\S\n]*@(?:noformat|noprettier)\s*?(?:\n|$)/,kr=/^\s*#[^\S\n]*@(?:format|prettier)\s*?(?:\n|$)/,Sr=/^\s*@(?:format|prettier)\s*$/;var Er=(t)=>Sr.test(t),Cr=(t)=>kr.test(t),Nr=(t)=>wr.test(t),Ar=(t)=>`# @${br}
8
+
9
+ ${t}`;function ys(t,e){switch(t.type){case"comment":if(Er(t.value))return null;break;case"quoteDouble":case"quoteSingle":e.type="quote";break;case"document":e.directivesEndMarker||delete e.directivesEndMarker,e.documentEndMarker||delete e.documentEndMarker;break}}ys.ignoredProperties=new Set(["position"]);function Ho(t){return Array.isArray(t)&&t.length>0}var et=Ho;function F(t,e){return typeof t?.type=="string"&&e.includes(t.type)}function bs(t,e,n){return e("children"in t?{...t,children:t.children.map((s)=>bs(s,e,t))}:t,n)}function tt(t,e,n){Object.defineProperty(t,e,{get:n,enumerable:false})}function Or(t,e){let n=0,s=e.length;for(let r=t.position.end.offset-1;r<s;r++){let i=e[r];if(i===`
10
+ `&&n++,n===1&&/\S/.test(i))return false;if(n===2)return true}return false}function mn(t){let{node:e}=t;switch(e.type){case"tag":case"anchor":case"comment":return false}let n=t.stack.length;for(let s=1;s<n;s++){let r=t.stack[s],i=t.stack[s-1];if(Array.isArray(i)&&typeof r=="number"&&r!==i.length-1)return false}return true}function nt(t){return et(t.children)?nt(G(0,t.children,-1)):t}function Tr(t){return t.value.trim()==="prettier-ignore"}function _r(t){let{node:e}=t;if(e.type==="documentBody"){let n=t.parent.head;return Y(n)&&Tr(G(0,n.endComments,-1))}return pe(e)&&Tr(G(0,e.leadingComments,-1))}function st(t){return!et(t.children)&&!Jo(t)}function Jo(t){return pe(t)||ve(t)||ws(t)||z(t)||Y(t)}function pe(t){return et(t?.leadingComments)}function ve(t){return et(t?.middleComments)}function ws(t){return t?.indicatorComment}function z(t){return t?.trailingComment}function Y(t){return et(t?.endComments)}function Ir(t){return t?t.split(/(?<!^| ) (?! |$)/):[]}function Lr(t,e,n){let s=e.split(`
11
+ `).map((i,o,a)=>o===0&&o===a.length-1?i:o!==0&&o!==a.length-1?i.trim():o===0?i.trimEnd():i.trimStart());if(n.proseWrap==="preserve")return s.map((i)=>i?[i]:[]);let r=[];for(let[i,o]of s.entries()){let a=Ir(o);i>0&&s[i-1].length>0&&a.length>0&&!(t==="quoteDouble"&&G(0,G(0,r,-1),-1).endsWith("\\"))?r[r.length-1]=[...G(0,r,-1),...a]:r.push(a)}return n.proseWrap==="never"?r.map((i)=>[i.join(" ")]):r}function Pr(t,{parentIndent:e,isLastDescendant:n,options:s}){let r=t.position.start.line===t.position.end.line?"":s.originalText.slice(t.position.start.offset,t.position.end.offset).match(/^[^\n]*\n(.*)$/s)[1];if(r==="")return[];let i;if(t.indent===null){let c=r.match(/^(?<leadingSpace> *)[^\n\r ]/m);i=c?c.groups.leadingSpace.length:Number.POSITIVE_INFINITY}else i=t.indent-1+e;let o=r.split(`
12
+ `).map((c)=>c.slice(i));if(s.proseWrap==="preserve"||t.type==="blockLiteral")return l(o.map((c)=>c?[c]:[]));let a=[];for(let[c,u]of o.entries()){let f=Ir(u);c>0&&f.length>0&&o[c-1].length>0&&!/^\s/.test(f[0])&&!/^\s|\s$/.test(G(0,a,-1))?a[a.length-1]=[...G(0,a,-1),...f]:a.push(f)}return a=a.map((c)=>{let u=[];for(let f of c)u.length>0&&/\s$/.test(G(0,u,-1))?u[u.length-1]+=" "+f:u.push(f);return u}),s.proseWrap==="never"&&(a=a.map((c)=>c.length===0?c:[c.join(" ")])),l(a);function l(c){if(t.chomping==="keep")return r.endsWith(`
13
+ `)&&G(0,c,-1).length===0?c.slice(0,-1):c;let u=0;for(let f=c.length-1;f>=0&&c[f].length===0;f--)u++;return u===0?c:u>=2&&!n?c.slice(0,-(u-1)):c.slice(0,-u)}}function Ue(t){return/[ \t]+\n*$/.test(t.value)}function hn(t){let e=nt(t);return F(e,["blockLiteral","blockFolded"])&&Ue(e)}function It(t){if(!t)return true;switch(t.type){case"plain":case"quoteDouble":case"quoteSingle":case"alias":case"flowMapping":case"flowSequence":return true;default:return false}}var Xo=new WeakMap,vr=(t)=>an(Xo,t.root,()=>new Set),ks=(t,e=t.node)=>{vr(t).add(e.position.end.offset)},zo=(t,e=t.node)=>vr(t).has(e.position.end.offset);function dn(t,e){if(!zo(t)){ks(t);let{node:n}=t;if(Or(n,e)&&!Ss(t.parent))return un}return""}function Ss(t){return Y(t)&&!F(t,["documentHead","documentBody","flowMapping","flowSequence"])}function U(t,e){return Ct(" ".repeat(t),e)}function Zo(t,e,n){let{node:s}=t,r=t.ancestors.filter((c)=>c.type==="sequence"||c.type==="mapping").length,i=mn(t),o=[s.type==="blockFolded"?">":"|"];s.indent!==null&&o.push(s.indent.toString()),s.chomping!=="clip"&&o.push(s.chomping==="keep"?"+":"-"),ws(s)&&o.push(" ",n("indicatorComment"));let a=Pr(s,{parentIndent:r,isLastDescendant:i,options:e}),l=[];for(let[c,u]of a.entries())c===0&&l.push(O),l.push(fn(q(Ee,u))),c!==a.length-1?l.push(u.length===0?O:Nt(Se)):i&&(s.chomping==="keep"||Ue(s))?l.push(fs(u.length===0?O:Se)):u.length===0&&Ue(s)&&l.push(cr);return s.indent===null?o.push(ar(U(e.tabWidth,l))):o.push(fs(U(s.indent-1+r,l))),o}var Dr=Zo;function gn(t,e,n){let{node:s}=t,r=s.type==="flowMapping",i=r?"{":"[",o=r?"}":"]",a=un;r&&s.children.length>0&&e.bracketSpacing&&(a=Ee);let l=G(0,s.children,-1),c=l?.type==="flowMappingItem"&&st(l.key)&&st(l.value);return[i,U(e.tabWidth,[a,ea(t,e,n),e.trailingComma==="none"?"":Tt(","),Y(s)?[O,q(O,t.map(n,"endComments"))]:""]),c?"":a,o]}function ea(t,e,n){return t.map(({isLast:s,node:r,next:i})=>[n(),s?"":[",",Ee,r.position.start.line!==i.position.start.line?dn(t,e.originalText):""]],"children")}function ta(t,e,n){let{node:s,parent:r}=t,{key:i,value:o}=s,a=st(i),l=st(o);if(a&&l)return": ";let c=n("key"),u=na(s)?" ":"";if(l)return s.type==="flowMappingItem"&&r.type==="flowMapping"?c:s.type==="mappingItem"&&yn(i.content,e)&&!z(i.content)&&r.tag?.value!=="tag:yaml.org,2002:set"?[c,u,":"]:["? ",U(2,c)];let f=n("value");if(a)return[": ",U(2,f)];if(pe(o)||!It(i.content))return["? ",U(2,c),O,...t.map(()=>[n(),O],"value","leadingComments"),": ",U(2,f)];if(sa(i.content)&&!pe(i.content)&&!ve(i.content)&&!z(i.content)&&!Y(i)&&!pe(o.content)&&!ve(o.content)&&!Y(o)&&yn(o.content,e)&&yn(i.content,e))return[c,u,": ",f];let p=Symbol("mappingKey"),h=Ze([Tt("? "),Ze(U(2,c),{id:p})]),g=[O,": ",U(2,f)],m=[u,":"];Y(o)&&o.content&&F(o.content,["flowMapping","flowSequence"])&&o.content.children.length===0?m.push(" "):pe(o.content)||Y(o)&&o.content&&!F(o.content,["mapping","sequence"])||r.type==="mapping"&&z(i.content)&&It(o.content)||F(o.content,["mapping","sequence"])&&o.content.tag===null&&o.content.anchor===null?m.push(O):o.content?m.push(Ee):z(o)&&m.push(" "),m.push(f);let d=U(e.tabWidth,m);return yn(i.content,e)&&!pe(i.content)&&!ve(i.content)&&!z(i.content)&&!Y(i)?us([[c,d]]):us([[h,Tt(g,d,{groupId:p})]])}function yn(t,e){if(!t)return true;switch(t.type){case"plain":case"quoteSingle":case"quoteDouble":break;case"alias":return true;default:return false}if(e.proseWrap==="preserve")return t.position.start.line===t.position.end.line;if(/\\$/m.test(e.originalText.slice(t.position.start.offset,t.position.end.offset)))return false;switch(e.proseWrap){case"never":return!t.value.includes(`
14
+ `);case"always":return!/[\n ]/.test(t.value);default:return false}}function na(t){return t.key.content?.type==="alias"}function sa(t){if(!t)return true;switch(t.type){case"plain":case"quoteDouble":case"quoteSingle":return t.position.start.line===t.position.end.line;case"alias":return true;default:return false}}var xr=ta;function ra(t){return bs(t,ia)}function ia(t){switch(t.type){case"document":tt(t,"head",()=>t.children[0]),tt(t,"body",()=>t.children[1]);break;case"documentBody":case"sequenceItem":case"flowSequenceItem":case"mappingKey":case"mappingValue":tt(t,"content",()=>t.children[0]);break;case"mappingItem":case"flowMappingItem":tt(t,"key",()=>t.children[0]),tt(t,"value",()=>t.children[1]);break}return t}var Mr=ra;function oa(t,e,n){let{node:s}=t,r=[];s.type!=="mappingValue"&&pe(s)&&r.push([q(O,t.map(n,"leadingComments")),O]);let i=["tag","anchor"].filter((a)=>s[a]);i.length>1&&i.sort((a,l)=>Ye(s[a])-Ye(s[l]));for(let[a,l]of i.entries())a>0&&r.push(" "),r.push(n(l));let o="";return F(s,["mapping","sequence","comment","directive","mappingItem","sequenceItem"])&&!mn(t)&&(o=dn(t,e.originalText)),i.length>0&&(F(s,["sequence","mapping"])&&!ve(s)?r.push(O):r.push(" ")),ve(s)&&r.push([s.middleComments.length===1?"":O,q(O,t.map(n,"middleComments")),O]),_r(t)?r.push(rr(e.originalText.slice(s.position.start.offset,s.position.end.offset).trimEnd())):r.push(Ze(aa(t,e,n))),z(s)&&!F(s,["document","documentHead"])&&r.push(lr([s.type==="mappingValue"&&!s.content?"":" ",t.parent.type==="mappingKey"&&t.getParentNode(2).type==="mapping"&&It(s)?"":At,n("trailingComment")])),Ss(s)&&r.push(U(s.type==="sequenceItem"?2:0,[hn(s)?Nt(Se):O,q(O,t.map(({node:a})=>[hs(e.originalText,Ye(a))?O:"",n()],"endComments"))])),F(s,["mappingItem","sequenceItem"])&&!t.isLast&&hn(s)&&r.push(Nt(Se)),r.push(o),r}function aa(t,e,n){let{node:s}=t;switch(s.type){case"root":{let r=nt(s),i=F(r,["blockLiteral","blockFolded"])&&r.chomping==="keep",a=!(i||F(r,["blockLiteral","blockFolded"])&&Ue(r)),l=[],c=false,u=false;return t.each(({node:f,isFirst:p,isLast:h})=>{!p&&!u&&l.push(O),l.push(n());let g=nt(f),m=F(g,["blockLiteral","blockFolded"])&&(Ue(g)||h&&g.chomping==="keep");m&&!h&&l.push(Se);let d=ca(t);c=d,d&&(m||l.push(O),l.push("..."),z(f)&&l.push(" ",n("trailingComment"))),u=m&&!d},"children"),(a||c&&!i)&&l.push(O),l}case"document":{let r=[];return fa(t)&&((s.head.children.length>0||s.head.endComments.length>0)&&r.push(n("head")),z(s.head)?r.push(["---"," ",n(["head","trailingComment"])]):r.push("---")),la(s)&&r.push(n("body")),q(O,r)}case"documentHead":return q(O,[...t.map(n,"children"),...t.map(n,"endComments")]);case"documentBody":{let{children:r,endComments:i}=s,o="";if(r.length>0&&i.length>0){let a=nt(s);if(F(a,["blockFolded","blockLiteral"]))a.chomping!=="keep"&&(o=[O,O]);else{let l=G(0,r,-1),c=F(l,["mapping"])&&hs(e.originalText,Ye(i[0]));c&&ks(t,l),o=c?[O,O]:O}}return[q(O,t.map(n,"children")),o,q(O,t.map(n,"endComments"))]}case"directive":return["%",q(" ",[s.name,...s.parameters])];case"comment":return["#",s.value];case"alias":return["*",s.value];case"tag":return e.originalText.slice(s.position.start.offset,s.position.end.offset);case"anchor":return["&",s.value];case"plain":return Lt(s.type,e.originalText.slice(s.position.start.offset,s.position.end.offset),e);case"quoteDouble":case"quoteSingle":{let o=e.originalText.slice(s.position.start.offset+1,s.position.end.offset-1);if(s.type==="quoteSingle"&&o.includes("\\")||s.type==="quoteDouble"&&/\\[^"]/.test(o)){let l=s.type==="quoteDouble"?'"':"'";return[l,Lt(s.type,o,e),l]}if(o.includes('"'))return["'",Lt(s.type,s.type==="quoteDouble"?Zt(0,Zt(0,o,"\\\"",'"'),"'","'".repeat(2)):o,e),"'"];if(o.includes("'"))return['"',Lt(s.type,s.type==="quoteSingle"?Zt(0,o,"''","'"):o,e),'"'];let a=e.singleQuote?"'":'"';return[a,Lt(s.type,o,e),a]}case"blockFolded":case"blockLiteral":return Dr(t,e,n);case"mapping":case"sequence":return t.map(({node:r,isLast:i})=>[n(),!i&&!hn(r)?O:""],"children");case"sequenceItem":return["- ",U(2,s.content?n("content"):"")];case"mappingKey":case"mappingValue":return s.content?n("content"):"";case"mappingItem":case"flowMappingItem":return xr(t,e,n);case"flowMapping":return gn(t,e,n);case"flowSequence":return gn(t,e,n);case"flowSequenceItem":return n("content");default:throw new ur(s,"YAML")}}function la(t){return t.body.children.length>0||Y(t.body)}function ca(t){let e=t.node;if(e.documentEndMarker||z(e))return true;if(t.isLast)return false;let n=t.next;return n.head.children.length>0||Y(n.head)}function fa(t){let e=t.node;return e.directivesEndMarker||e.head.children.length>0||Y(e.head)||z(e.head)}function Lt(t,e,n){let s=Lr(t,e,n);return q(O,s.map((r)=>fn(q(Ee,r))))}var ua={preprocess:Mr,embed:mr,print:oa,massageAstNode:ys,insertPragma:Ar,getVisitorKeys:gr},$r=ua;var Br=[{name:"YAML",type:"data",aceMode:"yaml",extensions:[".yml",".mir",".reek",".rviz",".sublime-syntax",".syntax",".yaml",".yaml-tmlanguage",".yaml.sed",".yml.mysql"],filenames:[".clang-format",".clang-tidy",".clangd",".eslintrc",".gemrc",".releaserc","CITATION.cff","glide.lock","pixi.lock",".prettierrc",".stylelintrc",".lintstagedrc"],tmScope:"source.yaml",aliases:["yml"],codemirrorMode:"yaml",codemirrorMimeType:"text/x-yaml",parsers:["yaml"],vscodeLanguageIds:["yaml","ansible","dockercompose","github-actions-workflow","home-assistant"],linguistLanguageId:407}];var bn={bracketSpacing:{category:"Common",type:"boolean",default:true,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},objectWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap object literals.",choices:[{value:"preserve",description:"Keep as multi-line, if there is a newline between the opening brace and first property."},{value:"collapse",description:"Fit to a single line when possible."}]},singleQuote:{category:"Common",type:"boolean",default:false,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:false,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:false,description:"Enforce single attribute per line in HTML, Vue and JSX."}};var pa={bracketSpacing:bn.bracketSpacing,singleQuote:bn.singleQuote,proseWrap:bn.proseWrap},Rr=pa;var tr={};Xt(tr,{yaml:()=>ml});var Pt=class extends SyntaxError{name="YAMLSyntaxError";code;source;position;constructor(t,e){super(e.message,{cause:e}),this.cause??(this.cause=e),this.code=e.code,this.source=t.text,this.position=t.transformRange(e.pos)}};function W(t,e=null){"children"in t&&t.children.forEach((n)=>W(n,t)),"anchor"in t&&t.anchor&&W(t.anchor,t),"tag"in t&&t.tag&&W(t.tag,t);"leadingComments"in t&&t.leadingComments.forEach((n)=>W(n,t)),"middleComments"in t&&t.middleComments.forEach((n)=>W(n,t)),"indicatorComment"in t&&t.indicatorComment&&W(t.indicatorComment,t),"trailingComment"in t&&t.trailingComment&&W(t.trailingComment,t),"endComments"in t&&t.endComments.forEach((n)=>W(n,t)),Object.defineProperty(t,"_parent",{value:e,enumerable:false})}function De(t){return`${t.line}:${t.column}`}function qr(t){W(t);let e=ma(t),n=t.children.slice();t.comments.filter((s)=>!s._parent).forEach((s)=>{for(;n.length>1&&s.position.start.line>n[0].position.end.line;)n.shift();ha(s,e,n[0])})}function ma(t){let e=Array.from(new Array(t.position.end.line),()=>({}));for(let n of t.comments)e[n.position.start.line-1].comment=n;return Fr(e,t),e}function Fr(t,e){if(e.position.start.offset!==e.position.end.offset){if("leadingComments"in e){let{start:n}=e.position,{leadingAttachableNode:s}=t[n.line-1];(!s||n.column<s.position.start.column)&&(t[n.line-1].leadingAttachableNode=e)}if("trailingComment"in e&&e.position.end.column>1&&e.type!=="document"&&e.type!=="documentHead"){let{end:n}=e.position,{trailingAttachableNode:s}=t[n.line-1];(!s||n.column>=s.position.end.column)&&(t[n.line-1].trailingAttachableNode=e)}if(e.type!=="root"&&e.type!=="document"&&e.type!=="documentHead"&&e.type!=="documentBody"){let{start:n,end:s}=e.position,r=[s.line].concat(n.line===s.line?[]:n.line);for(let i of r){let o=t[i-1].trailingNode;(!o||s.column>=o.position.end.column)&&(t[i-1].trailingNode=e)}}"children"in e&&e.children.forEach((n)=>{Fr(t,n)})}}function ha(t,e,n){let s=t.position.start.line,{trailingAttachableNode:r}=e[s-1];if(r){if(r.trailingComment)throw new Error(`Unexpected multiple trailing comment at ${De(t.position.start)}`);W(t,r),r.trailingComment=t;return}for(let o=s;o>=n.position.start.line;o--){let{trailingNode:a}=e[o-1],l;if(a)l=a;else if(o!==s&&e[o-1].comment)l=e[o-1].comment._parent;else continue;if((l.type==="sequence"||l.type==="mapping")&&(l=l.children[0]),l.type==="mappingItem"){let[c,u]=l.children;l=Kr(c)?c:u}for(;;){if(da(l,t)){W(t,l),l.endComments.push(t);return}if(!l._parent)break;l=l._parent}break}for(let o=s+1;o<=n.position.end.line;o++){let{leadingAttachableNode:a}=e[o-1];if(a){W(t,a),a.leadingComments.push(t);return}}let i=n.children[1];W(t,i),i.endComments.push(t)}function da(t,e){if(t.position.start.offset<e.position.start.offset&&t.position.end.offset>e.position.end.offset)switch(t.type){case"flowMapping":case"flowSequence":return t.children.length===0||e.position.start.line>t.children[t.children.length-1].position.end.line}if(e.position.end.offset<t.position.end.offset)return false;switch(t.type){case"sequenceItem":return e.position.start.column>t.position.start.column;case"mappingKey":case"mappingValue":return e.position.start.column>t._parent.position.start.column&&(t.children.length===0||t.children.length===1&&t.children[0].type!=="blockFolded"&&t.children[0].type!=="blockLiteral")&&(t.type==="mappingValue"||Kr(t));default:return false}}function Kr(t){return t.position.start!==t.position.end&&(t.children.length===0||t.position.start.offset!==t.children[0].position.start.offset)}function Yr(t,e,n){return{type:"root",position:t,children:e,comments:n}}function Z(t,e){return{start:t,end:e}}function Ur(t){return{start:t,end:t}}function jr(t,e){return{type:"comment",position:e.transformRange([t.offset,t.offset+t.source.length]),value:t.source.slice(1)}}function Vr(t,e){return{type:"anchor",position:t,value:e}}function Gr(t,e,n){return{anchor:e,tag:t,middleComments:n}}function Qr(t,e){return{type:"tag",position:t,value:e}}function Wr(t,e,n){let s=[],r=null,i=null,o=null;for(let a of e){let l=[a.offset,a.offset+a.source.length];switch(a.type){case"tag":{r??(r=l);let c=t.tag??a.source.slice(a.source.startsWith("!!")?2:1);c==="!"&&(c="tag:yaml.org,2002:str"),i=Qr(n.transformRange(l),c)}break;case"anchor":r??(r=l),o=Vr(n.transformRange(l),t.anchor);break;case"comment":{let c=n.transformComment(a);r&&r[0]<=l[0]&&l[1]<=t.range[0]&&s.push(c);break}default:throw new Error(`Unexpected content property token type: ${a.type}`)}}return Gr(i,o,s)}function Hr(t,e,n){return{type:"alias",position:t,leadingComments:[],trailingComment:null,...e,value:n}}function*R(...t){for(let e of t)if(e)for(let n of e)ga(n)||(yield n)}function ga(t){return t.type==="space"||t.type==="newline"}function Ce(t){return t.type==="comment"||t.type==="tag"||t.type==="anchor"}function D(t,e){let n=[];for(let s of R(t))s.type==="comment"?e.transformComment(s):n.push(s);return n}function Jr(t,e,n){let s=t.srcToken;for(let r of D(s.end,e))throw new Error(`Unexpected token type in alias end: ${r.type}`);return Hr(e.transformRange(t.range),e.transformContentProperties(t,n.tokens),t.source)}function Xr(t){return{...t,type:"blockFolded"}}function zr(t,e,n,s,r,i){return{type:"blockValue",position:t,leadingComments:[],...e,chomping:n,indent:s,value:r,indicatorComment:i}}function wn(t,e,n,s){let r=null,i=null;for(let l of R(e.props))if(l.type==="comment")i=n.transformComment(l);else if(l.type==="block-scalar-header")r=l;else throw new Error(`Unexpected token type in block value end: ${l.type}`);if(!r)throw new Error("Expected block scalar header token");let o=ya(r.source),a=n.transformRange(t.range);return zr(a,n.transformContentProperties(t,s.tokens),o.chomping,o.indent,t.source,i)}function ya(t){let e=/([+-]?)(\d*)([+-]?)$/u.exec(t),n=null,s="clip";if(e){n=e[2]?Number(e[2]):null;let r=e[3]||e[1];s=r==="+"?"keep":r==="-"?"strip":"clip"}return{chomping:s,indent:n}}function Zr(t,e,n){let s=t.srcToken;if(!s||s.type!=="block-scalar")throw new Error("Expected block scalar srcToken");return Xr(wn(t,s,e,n))}function ei(t){return{...t,type:"blockLiteral"}}function ti(t,e,n){let s=t.srcToken;if(!s||s.type!=="block-scalar")throw new Error("Expected block scalar srcToken");return ei(wn(t,s,e,n))}function kn(t,e,n){return{type:"flowCollection",position:t,leadingComments:[],trailingComment:null,endComments:[],...e,children:n}}function ni(t,e,n){return{...kn(t,e,n),type:"flowMapping"}}function vt(t,e,n){return{type:"flowMappingItem",position:t,leadingComments:[],children:[e,n]}}function si(t,e){return{type:"mappingKey",position:t,trailingComment:null,endComments:[],children:e?[e]:[]}}function Es(t,e){return{type:"mappingValue",position:t,leadingComments:[],trailingComment:null,endComments:[],children:e?[e]:[]}}function Ne(t,e,n,s){var r;let i=[],o=null;for(let h of R(e.start)){if(Ce(h)){i.push(h);continue}if(h.type==="explicit-key-ind"){o=h;continue}if(h.type==="comma")continue;throw new Error(`Unexpected token type in collection item start: ${h.type}`)}let a=[],l=null;for(let h of R(e.sep)){if(Ce(h)){a.push(h);continue}if(h.type==="map-value-ind"){l=h;continue}throw new Error(`Unexpected token type in collection item sep: ${h.type}`)}let c=o?.offset??((r=e.key)===null||r===undefined?undefined:r.offset)??l?.offset??e.value.offset,u=[c,e.key?t.key.range[1]:o?o.offset+o.source.length:c],f=null;if(t.value){var p;let h=l?.offset??((p=e.value)===null||p===undefined?undefined:p.offset)??t.value.range[0];f=[h,e.value?t.value.range[1]:l?l.offset+l.source.length:h]}return ba(t,n,s,{range:u,props:{tokens:i}},{range:f,props:{tokens:a}})}function ba(t,e,n,s,r){let i=null;Dt(t.key,s.props)?D(s.props.tokens,e):i=e.transformNode(t.key,s.props);let o=null;Dt(t.value,r.props)?D(r.props.tokens,e):o=e.transformNode(t.value,r.props);let a=si(e.transformRange([s.range?s.range[0]:i.position.start.offset,i?i.position.end.offset:s.range[1]]),i),l=o||r.range?Es(e.transformRange([r.range?r.range[0]:o.position.start.offset,o?o.position.end.offset:r.range[0]+1]),o):null;return n(Z(a.position.start,l?l.position.end:a.position.end),a,l||Es(Ur(a.position.end),null))}function ri(t,e,n){let s=t.srcToken;if(!s||s.type!=="flow-collection")throw new Error("Expected flow-collection CST node for flow map");let r=t.items.map((o,a)=>{let l=s.items[a];return Ne(o,l,e,vt)});if(t.items.length<s.items.length)for(let o=t.items.length;o<s.items.length;o++){let a=s.items[o];for(let l of D(a.start,e)){if(l.type==="comma")continue;throw new Error(`Unexpected token type in collection item start: ${l.type}`)}}let i=null;for(let o of D(s.end,e)){if(o.type==="flow-map-end"){i=o;continue}throw new Error(`Unexpected token type in flow map end: ${o.type}`)}if(!i)throw new Error("Expected flow-map-end token");return ni(e.transformRange([s.start.offset,i.offset+i.source.length]),e.transformContentProperties(t,n.tokens),r)}function ii(t,e,n){return{...kn(t,e,n),type:"flowSequence"}}function oi(t,e){return{type:"flowSequenceItem",position:t,children:[e]}}function ie(t){return t[t.length-1]}var Js={};Xt(Js,{Alias:()=>de,CST:()=>Qs,Composer:()=>Ie,Document:()=>ye,Lexer:()=>bt,LineCounter:()=>Fe,Pair:()=>v,Parser:()=>Le,Scalar:()=>y,Schema:()=>mt,YAMLError:()=>dt,YAMLMap:()=>x,YAMLParseError:()=>te,YAMLSeq:()=>K,YAMLWarning:()=>gt,isAlias:()=>H,isCollection:()=>I,isDocument:()=>ne,isMap:()=>j,isNode:()=>_,isPair:()=>T,isScalar:()=>C,isSeq:()=>J,parse:()=>no,parseAllDocuments:()=>to,parseDocument:()=>Hs,stringify:()=>so,visit:()=>ae,visitAsync:()=>xt});var Sn=Symbol.for("yaml.alias"),En=Symbol.for("yaml.document"),oe=Symbol.for("yaml.map"),Cs=Symbol.for("yaml.pair"),ee=Symbol.for("yaml.scalar"),Ae=Symbol.for("yaml.seq"),Q=Symbol.for("yaml.node.type"),H=(t)=>!!t&&typeof t=="object"&&t[Q]===Sn,ne=(t)=>!!t&&typeof t=="object"&&t[Q]===En,j=(t)=>!!t&&typeof t=="object"&&t[Q]===oe,T=(t)=>!!t&&typeof t=="object"&&t[Q]===Cs,C=(t)=>!!t&&typeof t=="object"&&t[Q]===ee,J=(t)=>!!t&&typeof t=="object"&&t[Q]===Ae;function I(t){if(t&&typeof t=="object")switch(t[Q]){case oe:case Ae:return true}return false}function _(t){if(t&&typeof t=="object")switch(t[Q]){case Sn:case oe:case ee:case Ae:return true}return false}var Cn=(t)=>(C(t)||I(t))&&!!t.anchor;var X=Symbol("break visit"),ai=Symbol("skip children"),me=Symbol("remove node");function ae(t,e){let n=li(e);ne(t)?rt(null,t.contents,n,Object.freeze([t]))===me&&(t.contents=null):rt(null,t,n,Object.freeze([]))}ae.BREAK=X;ae.SKIP=ai;ae.REMOVE=me;function rt(t,e,n,s){let r=ci(t,e,n,s);if(_(r)||T(r))return fi(t,s,r),rt(t,r,n,s);if(typeof r!="symbol"){if(I(e)){s=Object.freeze(s.concat(e));for(let i=0;i<e.items.length;++i){let o=rt(i,e.items[i],n,s);if(typeof o=="number")i=o-1;else{if(o===X)return X;o===me&&(e.items.splice(i,1),i-=1)}}}else if(T(e)){s=Object.freeze(s.concat(e));let i=rt("key",e.key,n,s);if(i===X)return X;i===me&&(e.key=null);let o=rt("value",e.value,n,s);if(o===X)return X;o===me&&(e.value=null)}}return r}async function xt(t,e){let n=li(e);ne(t)?await it(null,t.contents,n,Object.freeze([t]))===me&&(t.contents=null):await it(null,t,n,Object.freeze([]))}xt.BREAK=X;xt.SKIP=ai;xt.REMOVE=me;async function it(t,e,n,s){let r=await ci(t,e,n,s);if(_(r)||T(r))return fi(t,s,r),it(t,r,n,s);if(typeof r!="symbol"){if(I(e)){s=Object.freeze(s.concat(e));for(let i=0;i<e.items.length;++i){let o=await it(i,e.items[i],n,s);if(typeof o=="number")i=o-1;else{if(o===X)return X;o===me&&(e.items.splice(i,1),i-=1)}}}else if(T(e)){s=Object.freeze(s.concat(e));let i=await it("key",e.key,n,s);if(i===X)return X;i===me&&(e.key=null);let o=await it("value",e.value,n,s);if(o===X)return X;o===me&&(e.value=null)}}return r}function li(t){return typeof t=="object"&&(t.Collection||t.Node||t.Value)?Object.assign({Alias:t.Node,Map:t.Node,Scalar:t.Node,Seq:t.Node},t.Value&&{Map:t.Value,Scalar:t.Value,Seq:t.Value},t.Collection&&{Map:t.Collection,Seq:t.Collection},t):t}function ci(t,e,n,s){if(typeof n=="function")return n(t,e,s);if(j(e))return n.Map?.(t,e,s);if(J(e))return n.Seq?.(t,e,s);if(T(e))return n.Pair?.(t,e,s);if(C(e))return n.Scalar?.(t,e,s);if(H(e))return n.Alias?.(t,e,s)}function fi(t,e,n){let s=e[e.length-1];if(I(s))s.items[t]=n;else if(T(s))t==="key"?s.key=n:s.value=n;else if(ne(s))s.contents=n;else{let r=H(s)?"alias":"scalar";throw new Error(`Cannot replace node with ${r} parent`)}}var wa={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},ka=(t)=>t.replace(/[!,[\]{}]/g,(e)=>wa[e]),he=class t{constructor(e,n){this.docStart=null,this.docEnd=false,this.yaml=Object.assign({},t.defaultYaml,e),this.tags=Object.assign({},t.defaultTags,n)}clone(){let e=new t(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new t(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=true;break;case"1.2":this.atNextDocument=false,this.yaml={explicit:t.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},t.defaultTags);break}return e}add(e,n){this.atNextDocument&&(this.yaml={explicit:t.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},t.defaultTags),this.atNextDocument=false);let s=e.trim().split(/[ \t]+/),r=s.shift();switch(r){case"%TAG":{if(s.length!==2&&(n(0,"%TAG directive should contain exactly two parts"),s.length<2))return false;let[i,o]=s;return this.tags[i]=o,true}case"%YAML":{if(this.yaml.explicit=true,s.length!==1)return n(0,"%YAML directive should contain exactly one part"),false;let[i]=s;if(i==="1.1"||i==="1.2")return this.yaml.version=i,true;{let o=/^\d+\.\d+$/.test(i);return n(6,`Unsupported YAML version ${i}`,o),false}}default:return n(0,`Unknown directive ${r}`,true),false}}tagName(e,n){if(e==="!")return"!";if(e[0]!=="!")return n(`Not a valid tag: ${e}`),null;if(e[1]==="<"){let o=e.slice(2,-1);return o==="!"||o==="!!"?(n(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&n("Verbatim tags must end with a >"),o)}let[,s,r]=e.match(/^(.*!)([^!]*)$/s);r||n(`The ${e} tag has no suffix`);let i=this.tags[s];if(i)try{return i+decodeURIComponent(r)}catch(o){return n(String(o)),null}return s==="!"?e:(n(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[n,s]of Object.entries(this.tags))if(e.startsWith(s))return n+ka(e.substring(s.length));return e[0]==="!"?e:`!<${e}>`}toString(e){let n=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],s=Object.entries(this.tags),r;if(e&&s.length>0&&_(e.contents)){let i={};ae(e.contents,(o,a)=>{_(a)&&a.tag&&(i[a.tag]=true)}),r=Object.keys(i)}else r=[];for(let[i,o]of s)i==="!!"&&o==="tag:yaml.org,2002:"||(!e||r.some((a)=>a.startsWith(o)))&&n.push(`%TAG ${i} ${o}`);return n.join(`
15
+ `)}};he.defaultYaml={explicit:false,version:"1.2"};he.defaultTags={"!!":"tag:yaml.org,2002:"};function Nn(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){let n=`Anchor must not contain whitespace or control characters: ${JSON.stringify(t)}`;throw new Error(n)}return true}function Ns(t){let e=new Set;return ae(t,{Value(n,s){s.anchor&&e.add(s.anchor)}}),e}function As(t,e){for(let n=1;;++n){let s=`${t}${n}`;if(!e.has(s))return s}}function ui(t,e){let n=[],s=new Map,r=null;return{onAnchor:(i)=>{n.push(i),r??(r=Ns(t));let o=As(e,r);return r.add(o),o},setAnchors:()=>{for(let i of n){let o=s.get(i);if(typeof o=="object"&&o.anchor&&(C(o.node)||I(o.node)))o.node.anchor=o.anchor;else{let a=new Error("Failed to resolve repeated object (this should not happen)");throw a.source=i,a}}},sourceObjects:s}}function xe(t,e,n,s){if(s&&typeof s=="object")if(Array.isArray(s))for(let r=0,i=s.length;r<i;++r){let o=s[r],a=xe(t,s,String(r),o);a===undefined?delete s[r]:a!==o&&(s[r]=a)}else if(s instanceof Map)for(let r of Array.from(s.keys())){let i=s.get(r),o=xe(t,s,r,i);o===undefined?s.delete(r):o!==i&&s.set(r,o)}else if(s instanceof Set)for(let r of Array.from(s)){let i=xe(t,s,r,r);i===undefined?s.delete(r):i!==r&&(s.delete(r),s.add(i))}else for(let[r,i]of Object.entries(s)){let o=xe(t,s,r,i);o===undefined?delete s[r]:o!==i&&(s[r]=o)}return t.call(e,n,s)}function B(t,e,n){if(Array.isArray(t))return t.map((s,r)=>B(s,String(r),n));if(t&&typeof t.toJSON=="function"){if(!n||!Cn(t))return t.toJSON(e,n);let s={aliasCount:0,count:1,res:undefined};n.anchors.set(t,s),n.onCreate=(i)=>{s.res=i,delete n.onCreate};let r=t.toJSON(e,n);return n.onCreate&&n.onCreate(r),r}return typeof t=="bigint"&&!n?.keep?Number(t):t}var Me=class{constructor(e){Object.defineProperty(this,Q,{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:n,maxAliasCount:s,onAnchor:r,reviver:i}={}){if(!ne(e))throw new TypeError("A document argument is required");let o={anchors:new Map,doc:e,keep:true,mapAsMap:n===true,mapKeyWarned:false,maxAliasCount:typeof s=="number"?s:100},a=B(this,"",o);if(typeof r=="function")for(let{count:l,res:c}of o.anchors.values())r(c,l);return typeof i=="function"?xe(i,{"":a},"",a):a}};var de=class extends Me{constructor(e){super(Sn),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,n){if(n?.maxAliasCount===0)throw new ReferenceError("Alias resolution is disabled");let s;n?.aliasResolveCache?s=n.aliasResolveCache:(s=[],ae(e,{Node:(i,o)=>{(H(o)||Cn(o))&&s.push(o)}}),n&&(n.aliasResolveCache=s));let r;for(let i of s){if(i===this)break;i.anchor===this.source&&(r=i)}if(r&&n){let{anchors:i,doc:o,maxAliasCount:a}=n,l=i.get(r);if(l||(B(r,null,n),l=i.get(r)),l?.res===undefined){let c="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(c)}if(a>=0&&(l.count+=1,l.aliasCount===0&&(l.aliasCount=An(o,r,i)),l.count*l.aliasCount>a)){let c="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(c)}}return r}toJSON(e,n){if(!n)return{source:this.source};let s=this.resolve(n.doc,n);if(!s){let r=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(r)}return n.anchors.get(s).res}toString(e,n,s){let r=`*${this.source}`;if(e){if(Nn(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let i=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(i)}if(e.implicitKey)return`${r} `}return r}};function An(t,e,n){if(H(e)){let s=e.resolve(t),r=n&&s&&n.get(s);return r?r.count*r.aliasCount:0}else if(I(e)){let s=0;for(let r of e.items){let i=An(t,r,n);i>s&&(s=i)}return s}else if(T(e)){let s=An(t,e.key,n),r=An(t,e.value,n);return Math.max(s,r)}return 1}var Tn=(t)=>!t||typeof t!="function"&&typeof t!="object",y=class extends Me{constructor(e){super(ee),this.value=e}toJSON(e,n){return n?.keep?this.value:B(this.value,e,n)}toString(){return String(this.value)}};y.BLOCK_FOLDED="BLOCK_FOLDED";y.BLOCK_LITERAL="BLOCK_LITERAL";y.PLAIN="PLAIN";y.QUOTE_DOUBLE="QUOTE_DOUBLE";y.QUOTE_SINGLE="QUOTE_SINGLE";var Sa="tag:yaml.org,2002:";function Ea(t,e,n){if(e){let s=n.filter((i)=>i.tag===e),r=s.find((i)=>!i.format)??s[0];if(!r)throw new Error(`Tag ${e} not found`);return r}return n.find((s)=>s.identify?.(t)&&!s.format)}function Te(t,e,n){if(ne(t)&&(t=t.contents),_(t))return t;if(T(t)){let f=n.schema[oe].createNode?.(n.schema,null,n);return f.items.push(t),f}(t instanceof String||t instanceof Number||t instanceof Boolean||typeof BigInt<"u"&&t instanceof BigInt)&&(t=t.valueOf());let{aliasDuplicateObjects:s,onAnchor:r,onTagObj:i,schema:o,sourceObjects:a}=n,l;if(s&&t&&typeof t=="object"){if(l=a.get(t),l)return l.anchor??(l.anchor=r(t)),new de(l.anchor);l={anchor:null,node:null},a.set(t,l)}e?.startsWith("!!")&&(e=Sa+e.slice(2));let c=Ea(t,e,o.tags);if(!c){if(t&&typeof t.toJSON=="function"&&(t=t.toJSON()),!t||typeof t!="object"){let f=new y(t);return l&&(l.node=f),f}c=t instanceof Map?o[oe]:(Symbol.iterator in Object(t))?o[Ae]:o[oe]}i&&(i(c),delete n.onTagObj);let u=c?.createNode?c.createNode(n.schema,t,n):typeof c?.nodeClass?.from=="function"?c.nodeClass.from(n.schema,t,n):new y(t);return e?u.tag=e:c.default||(u.tag=c.tag),l&&(l.node=u),u}function Mt(t,e,n){let s=n;for(let r=e.length-1;r>=0;--r){let i=e[r];if(typeof i=="number"&&Number.isInteger(i)&&i>=0){let o=[];o[i]=s,s=o}else s=new Map([[i,s]])}return Te(s,undefined,{aliasDuplicateObjects:false,keepUndefined:false,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:t,sourceObjects:new Map})}var at=(t)=>t==null||typeof t=="object"&&!!t[Symbol.iterator]().next().done,ot=class extends Me{constructor(e,n){super(e),Object.defineProperty(this,"schema",{value:n,configurable:true,enumerable:false,writable:true})}clone(e){let n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(n.schema=e),n.items=n.items.map((s)=>_(s)||T(s)?s.clone(e):s),this.range&&(n.range=this.range.slice()),n}addIn(e,n){if(at(e))this.add(n);else{let[s,...r]=e,i=this.get(s,true);if(I(i))i.addIn(r,n);else if(i===undefined&&this.schema)this.set(s,Mt(this.schema,r,n));else throw new Error(`Expected YAML collection at ${s}. Remaining path: ${r}`)}}deleteIn(e){let[n,...s]=e;if(s.length===0)return this.delete(n);let r=this.get(n,true);if(I(r))return r.deleteIn(s);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${s}`)}getIn(e,n){let[s,...r]=e,i=this.get(s,true);return r.length===0?!n&&C(i)?i.value:i:I(i)?i.getIn(r,n):undefined}hasAllNullValues(e){return this.items.every((n)=>{if(!T(n))return false;let s=n.value;return s==null||e&&C(s)&&s.value==null&&!s.commentBefore&&!s.comment&&!s.tag})}hasIn(e){let[n,...s]=e;if(s.length===0)return this.has(n);let r=this.get(n,true);return I(r)?r.hasIn(s):false}setIn(e,n){let[s,...r]=e;if(r.length===0)this.set(s,n);else{let i=this.get(s,true);if(I(i))i.setIn(r,n);else if(i===undefined&&this.schema)this.set(s,Mt(this.schema,r,n));else throw new Error(`Expected YAML collection at ${s}. Remaining path: ${r}`)}}};var pi=(t)=>t.replace(/^(?!$)(?: $)?/gm,"#");function se(t,e){return/^\n+$/.test(t)?t.substring(1):e?t.replace(/^(?! *$)/gm,e):t}var ge=(t,e,n)=>t.endsWith(`
16
+ `)?se(n,e):n.includes(`
17
+ `)?`
18
+ `+se(n,e):(t.endsWith(" ")?"":" ")+n;var Ts="flow",On="block",$t="quoted";function Bt(t,e,n="flow",{indentAtStart:s,lineWidth:r=80,minContentWidth:i=20,onFold:o,onOverflow:a}={}){if(!r||r<0)return t;r<i&&(i=0);let l=Math.max(1+i,1+r-e.length);if(t.length<=l)return t;let c=[],u={},f=r-e.length;typeof s=="number"&&(s>r-Math.max(2,i)?c.push(0):f=r-s);let p,h,g=false,m=-1,d=-1,w=-1;n===On&&(m=mi(t,m,e.length),m!==-1&&(f=m+l));for(let S;S=t[m+=1];){if(n===$t&&S==="\\"){switch(d=m,t[m+1]){case"x":m+=3;break;case"u":m+=5;break;case"U":m+=9;break;default:m+=1}w=m}if(S===`
19
+ `)n===On&&(m=mi(t,m,e.length)),f=m+e.length+l,p=undefined;else{if(S===" "&&h&&h!==" "&&h!==`
20
+ `&&h!=="\t"){let E=t[m+1];E&&E!==" "&&E!==`
21
+ `&&E!=="\t"&&(p=m)}if(m>=f)if(p)c.push(p),f=p+l,p=undefined;else if(n===$t){for(;h===" "||h==="\t";)h=S,S=t[m+=1],g=true;let E=m>w+1?m-2:d-1;if(u[E])return t;c.push(E),u[E]=true,f=E+l,p=undefined}else g=true}h=S}if(g&&a&&a(),c.length===0)return t;o&&o();let k=t.slice(0,c[0]);for(let S=0;S<c.length;++S){let E=c[S],N=c[S+1]||t.length;E===0?k=`
22
+ ${e}${t.slice(0,N)}`:(n===$t&&u[E]&&(k+=`${t[E]}\\`),k+=`
23
+ ${e}${t.slice(E+1,N)}`)}return k}function mi(t,e,n){let s=e,r=e+1,i=t[r];for(;i===" "||i==="\t";)if(e<r+n)i=t[++e];else{do i=t[++e];while(i&&i!==`
24
+ `);s=e,r=e+1,i=t[r]}return s}var In=(t,e)=>({indentAtStart:e?t.indent.length:t.indentAtStart,lineWidth:t.options.lineWidth,minContentWidth:t.options.minContentWidth}),Ln=(t)=>/^(%|---|\.\.\.)/m.test(t);function Ca(t,e,n){if(!e||e<0)return false;let s=e-n,r=t.length;if(r<=s)return false;for(let i=0,o=0;i<r;++i)if(t[i]===`
25
+ `){if(i-o>s)return true;if(o=i+1,r-o<=s)return false}return true}function Rt(t,e){let n=JSON.stringify(t);if(e.options.doubleQuotedAsJSON)return n;let{implicitKey:s}=e,r=e.options.doubleQuotedMinMultiLineLength,i=e.indent||(Ln(t)?" ":""),o="",a=0;for(let l=0,c=n[l];c;c=n[++l])if(c===" "&&n[l+1]==="\\"&&n[l+2]==="n"&&(o+=n.slice(a,l)+"\\ ",l+=1,a=l,c="\\"),c==="\\")switch(n[l+1]){case"u":{o+=n.slice(a,l);let u=n.substr(l+2,4);switch(u){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:u.substr(0,2)==="00"?o+="\\x"+u.substr(2):o+=n.substr(l,6)}l+=5,a=l+1}break;case"n":if(s||n[l+2]==='"'||n.length<r)l+=1;else{for(o+=n.slice(a,l)+`
26
+
27
+ `;n[l+2]==="\\"&&n[l+3]==="n"&&n[l+4]!=='"';)o+=`
28
+ `,l+=2;o+=i,n[l+2]===" "&&(o+="\\"),l+=1,a=l+1}break;default:l+=1}return o=a?o+n.slice(a):n,s?o:Bt(o,i,$t,In(e,false))}function Os(t,e){if(e.options.singleQuote===false||e.implicitKey&&t.includes(`
29
+ `)||/[ \t]\n|\n[ \t]/.test(t))return Rt(t,e);let n=e.indent||(Ln(t)?" ":""),s="'"+t.replace(/'/g,"''").replace(/\n+/g,`$&
30
+ ${n}`)+"'";return e.implicitKey?s:Bt(s,n,Ts,In(e,false))}function lt(t,e){let{singleQuote:n}=e.options,s;if(n===false)s=Rt;else{let r=t.includes('"'),i=t.includes("'");r&&!i?s=Os:i&&!r?s=Rt:s=n?Os:Rt}return s(t,e)}var _s;try{_s=new RegExp(`(^|(?<!
31
+ ))
32
+ +(?!
33
+ |$)`,"g")}catch{_s=/\n+(?!\n|$)/g}function _n({comment:t,type:e,value:n},s,r,i){let{blockQuote:o,commentString:a,lineWidth:l}=s.options;if(!o||/\n[\t ]+$/.test(n))return lt(n,s);let c=s.indent||(s.forceBlockIndent||Ln(n)?" ":""),u=o==="literal"?true:o==="folded"||e===y.BLOCK_FOLDED?false:e===y.BLOCK_LITERAL?true:!Ca(n,l,c.length);if(!n)return u?`|
34
+ `:`>
35
+ `;let f,p;for(p=n.length;p>0;--p){let N=n[p-1];if(N!==`
36
+ `&&N!=="\t"&&N!==" ")break}let h=n.substring(p),g=h.indexOf(`
37
+ `);g===-1?f="-":n===h||g!==h.length-1?(f="+",i&&i()):f="",h&&(n=n.slice(0,-h.length),h[h.length-1]===`
38
+ `&&(h=h.slice(0,-1)),h=h.replace(_s,`$&${c}`));let m=false,d,w=-1;for(d=0;d<n.length;++d){let N=n[d];if(N===" ")m=true;else if(N===`
39
+ `)w=d;else break}let k=n.substring(0,w<d?w+1:d);k&&(n=n.substring(k.length),k=k.replace(/\n+/g,`$&${c}`));let E=(m?c?"2":"1":"")+f;if(t&&(E+=" "+a(t.replace(/ ?[\r\n]+/g," ")),r&&r()),!u){let N=n.replace(/\n+/g,`
40
+ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`),A=false,L=In(s,true);o!=="folded"&&e!==y.BLOCK_FOLDED&&(L.onOverflow=()=>{A=true});let b=Bt(`${k}${N}${h}`,c,On,L);if(!A)return`>${E}
41
+ ${c}${b}`}return n=n.replace(/\n+/g,`$&${c}`),`|${E}
42
+ ${c}${k}${n}${h}`}function Na(t,e,n,s){let{type:r,value:i}=t,{actualString:o,implicitKey:a,indent:l,indentStep:c,inFlow:u}=e;if(a&&i.includes(`
43
+ `)||u&&/[[\]{},]/.test(i))return lt(i,e);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(i))return a||u||!i.includes(`
44
+ `)?lt(i,e):_n(t,e,n,s);if(!a&&!u&&r!==y.PLAIN&&i.includes(`
45
+ `))return _n(t,e,n,s);if(Ln(i)){if(l==="")return e.forceBlockIndent=true,_n(t,e,n,s);if(a&&l===c)return lt(i,e)}let f=i.replace(/\n+/g,`$&
46
+ ${l}`);if(o){let p=(m)=>m.default&&m.tag!=="tag:yaml.org,2002:str"&&m.test?.test(f),{compat:h,tags:g}=e.doc.schema;if(g.some(p)||h?.some(p))return lt(i,e)}return a?f:Bt(f,l,Ts,In(e,false))}function Oe(t,e,n,s){let{implicitKey:r,inFlow:i}=e,o=typeof t.value=="string"?t:Object.assign({},t,{value:String(t.value)}),{type:a}=t;a!==y.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(a=y.QUOTE_DOUBLE);let l=(u)=>{switch(u){case y.BLOCK_FOLDED:case y.BLOCK_LITERAL:return r||i?lt(o.value,e):_n(o,e,n,s);case y.QUOTE_DOUBLE:return Rt(o.value,e);case y.QUOTE_SINGLE:return Os(o.value,e);case y.PLAIN:return Na(o,e,n,s);default:return null}},c=l(a);if(c===null){let{defaultKeyType:u,defaultStringType:f}=e.options,p=r&&u||f;if(c=l(p),c===null)throw new Error(`Unsupported default string type ${p}`)}return c}function Pn(t,e){let n=Object.assign({blockQuote:true,commentString:pi,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:false,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:true,indentSeq:true,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:false,singleQuote:null,trailingComma:false,trueStr:"true",verifyAliasOrder:true},t.schema.toStringOptions,e),s;switch(n.collectionStyle){case"block":s=false;break;case"flow":s=true;break;default:s=null}return{anchors:new Set,doc:t,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:typeof n.indent=="number"?" ".repeat(n.indent):" ",inFlow:s,options:n}}function Aa(t,e){if(e.tag){let r=t.filter((i)=>i.tag===e.tag);if(r.length>0)return r.find((i)=>i.format===e.format)??r[0]}let n,s;if(C(e)){s=e.value;let r=t.filter((i)=>i.identify?.(s));if(r.length>1){let i=r.filter((o)=>o.test);i.length>0&&(r=i)}n=r.find((i)=>i.format===e.format)??r.find((i)=>!i.format)}else s=e,n=t.find((r)=>r.nodeClass&&s instanceof r.nodeClass);if(!n){let r=s?.constructor?.name??(s===null?"null":typeof s);throw new Error(`Tag not resolved for ${r} value`)}return n}function Ta(t,e,{anchors:n,doc:s}){if(!s.directives)return"";let r=[],i=(C(t)||I(t))&&t.anchor;i&&Nn(i)&&(n.add(i),r.push(`&${i}`));let o=t.tag??(e.default?null:e.tag);return o&&r.push(s.directives.tagString(o)),r.join(" ")}function _e(t,e,n,s){if(T(t))return t.toString(e,n,s);if(H(t)){if(e.doc.directives)return t.toString(e);if(e.resolvedAliases?.has(t))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(t):e.resolvedAliases=new Set([t]),t=t.resolve(e.doc)}let r,i=_(t)?t:e.doc.createNode(t,{onTagObj:(l)=>r=l});r??(r=Aa(e.doc.schema.tags,i));let o=Ta(i,r,e);o.length>0&&(e.indentAtStart=(e.indentAtStart??0)+o.length+1);let a=typeof r.stringify=="function"?r.stringify(i,e,n,s):C(i)?Oe(i,e,n,s):i.toString(e,n,s);return o?C(i)||a[0]==="{"||a[0]==="["?`${o} ${a}`:`${o}
47
+ ${e.indent}${a}`:a}function hi({key:t,value:e},n,s,r){let{allNullValues:i,doc:o,indent:a,indentStep:l,options:{commentString:c,indentSeq:u,simpleKeys:f}}=n,p=_(t)&&t.comment||null;if(f){if(p)throw new Error("With simple keys, key nodes cannot have comments");if(I(t)||!_(t)&&typeof t=="object"){let L="With simple keys, collection cannot be used as a key value";throw new Error(L)}}let h=!f&&(!t||p&&e==null&&!n.inFlow||I(t)||(C(t)?t.type===y.BLOCK_FOLDED||t.type===y.BLOCK_LITERAL:typeof t=="object"));n=Object.assign({},n,{allNullValues:false,implicitKey:!h&&(f||!i),indent:a+l});let g=false,m=false,d=_e(t,n,()=>g=true,()=>m=true);if(!h&&!n.inFlow&&d.length>1024){if(f)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");h=true}if(n.inFlow){if(i||e==null)return g&&s&&s(),d===""?"?":h?`? ${d}`:d}else if(i&&!f||e==null&&h)return d=`? ${d}`,p&&!g?d+=ge(d,n.indent,c(p)):m&&r&&r(),d;g&&(p=null),h?(p&&(d+=ge(d,n.indent,c(p))),d=`? ${d}
48
+ ${a}:`):(d=`${d}:`,p&&(d+=ge(d,n.indent,c(p))));let w,k,S;_(e)?(w=!!e.spaceBefore,k=e.commentBefore,S=e.comment):(w=false,k=null,S=null,e&&typeof e=="object"&&(e=o.createNode(e))),n.implicitKey=false,!h&&!p&&C(e)&&(n.indentAtStart=d.length+1),m=false,!u&&l.length>=2&&!n.inFlow&&!h&&J(e)&&!e.flow&&!e.tag&&!e.anchor&&(n.indent=n.indent.substring(2));let E=false,N=_e(e,n,()=>E=true,()=>m=true),A=" ";if(p||w||k){if(A=w?`
49
+ `:"",k){let L=c(k);A+=`
50
+ ${se(L,n.indent)}`}N===""&&!n.inFlow?A===`
51
+ `&&S&&(A=`
52
+
53
+ `):A+=`
54
+ ${n.indent}`}else if(!h&&I(e)){let L=N[0],b=N.indexOf(`
55
+ `),M=b!==-1,Pe=n.inFlow??e.flow??e.items.length===0;if(M||!Pe){let Ve=false;if(M&&(L==="&"||L==="!")){let $=N.indexOf(" ");L==="&"&&$!==-1&&$<b&&N[$+1]==="!"&&($=N.indexOf(" ",$+1)),($===-1||b<$)&&(Ve=true)}Ve||(A=`
56
+ ${n.indent}`)}}else(N===""||N[0]===`
57
+ `)&&(A="");return d+=A+N,n.inFlow?E&&s&&s():S&&!E?d+=ge(d,n.indent,c(S)):m&&r&&r(),d}function vn(t,e){(t==="debug"||t==="warn")&&console.warn(e)}var Dn="<<",le={identify:(t)=>t===Dn||typeof t=="symbol"&&t.description===Dn,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new y(Symbol(Dn)),{addToJSMap:Ls}),stringify:()=>Dn},di=(t,e)=>(le.identify(e)||C(e)&&(!e.type||e.type===y.PLAIN)&&le.identify(e.value))&&t?.doc.schema.tags.some((n)=>n.tag===le.tag&&n.default);function Ls(t,e,n){let s=gi(t,n);if(J(s))for(let r of s.items)Is(t,e,r);else if(Array.isArray(s))for(let r of s)Is(t,e,r);else Is(t,e,s)}function Is(t,e,n){let s=gi(t,n);if(!j(s))throw new Error("Merge sources must be maps or map aliases");let r=s.toJSON(null,t,Map);for(let[i,o]of r)e instanceof Map?e.has(i)||e.set(i,o):e instanceof Set?e.add(i):Object.prototype.hasOwnProperty.call(e,i)||Object.defineProperty(e,i,{value:o,writable:true,enumerable:true,configurable:true});return e}function gi(t,e){return t&&H(e)?e.resolve(t.doc,t):e}function xn(t,e,{key:n,value:s}){if(_(n)&&n.addToJSMap)n.addToJSMap(t,e,s);else if(di(t,n))Ls(t,e,s);else{let r=B(n,"",t);if(e instanceof Map)e.set(r,B(s,r,t));else if(e instanceof Set)e.add(r);else{let i=Oa(n,r,t),o=B(s,i,t);i in e?Object.defineProperty(e,i,{value:o,writable:true,enumerable:true,configurable:true}):e[i]=o}}return e}function Oa(t,e,n){if(e===null)return"";if(typeof e!="object")return String(e);if(_(t)&&n?.doc){let s=Pn(n.doc,{});s.anchors=new Set;for(let i of n.anchors.keys())s.anchors.add(i.anchor);s.inFlow=true,s.inStringifyKey=true;let r=t.toString(s);if(!n.mapKeyWarned){let i=JSON.stringify(r);i.length>40&&(i=i.substring(0,36)+'..."'),vn(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${i}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=true}return r}return JSON.stringify(e)}function ct(t,e,n){let s=Te(t,undefined,n),r=Te(e,undefined,n);return new v(s,r)}var v=class t{constructor(e,n=null){Object.defineProperty(this,Q,{value:Cs}),this.key=e,this.value=n}clone(e){let{key:n,value:s}=this;return _(n)&&(n=n.clone(e)),_(s)&&(s=s.clone(e)),new t(n,s)}toJSON(e,n){let s=n?.mapAsMap?new Map:{};return xn(n,s,this)}toString(e,n,s){return e?.doc?hi(this,e,n,s):JSON.stringify(this)}};function $n(t,e,n){return(e.inFlow??t.flow?Ia:_a)(t,e,n)}function _a({comment:t,items:e},n,{blockItemPrefix:s,flowChars:r,itemIndent:i,onChompKeep:o,onComment:a}){let{indent:l,options:{commentString:c}}=n,u=Object.assign({},n,{indent:i,type:null}),f=false,p=[];for(let g=0;g<e.length;++g){let m=e[g],d=null;if(_(m))!f&&m.spaceBefore&&p.push(""),Mn(n,p,m.commentBefore,f),m.comment&&(d=m.comment);else if(T(m)){let k=_(m.key)?m.key:null;k&&(!f&&k.spaceBefore&&p.push(""),Mn(n,p,k.commentBefore,f))}f=false;let w=_e(m,u,()=>d=null,()=>f=true);d&&(w+=ge(w,i,c(d))),f&&d&&(f=false),p.push(s+w)}let h;if(p.length===0)h=r.start+r.end;else{h=p[0];for(let g=1;g<p.length;++g){let m=p[g];h+=m?`
58
+ ${l}${m}`:`
59
+ `}}return t?(h+=`
60
+ `+se(c(t),l),a&&a()):f&&o&&o(),h}function Ia({items:t},e,{flowChars:n,itemIndent:s}){let{indent:r,indentStep:i,flowCollectionPadding:o,options:{commentString:a}}=e;s+=i;let l=Object.assign({},e,{indent:s,inFlow:true,type:null}),c=false,u=0,f=[];for(let g=0;g<t.length;++g){let m=t[g],d=null;if(_(m))m.spaceBefore&&f.push(""),Mn(e,f,m.commentBefore,false),m.comment&&(d=m.comment);else if(T(m)){let k=_(m.key)?m.key:null;k&&(k.spaceBefore&&f.push(""),Mn(e,f,k.commentBefore,false),k.comment&&(c=true));let S=_(m.value)?m.value:null;S?(S.comment&&(d=S.comment),S.commentBefore&&(c=true)):m.value==null&&k?.comment&&(d=k.comment)}d&&(c=true);let w=_e(m,l,()=>d=null);c||(c=f.length>u||w.includes(`
61
+ `)),g<t.length-1?w+=",":e.options.trailingComma&&(e.options.lineWidth>0&&(c||(c=f.reduce((k,S)=>k+S.length+2,2)+(w.length+2)>e.options.lineWidth)),c&&(w+=",")),d&&(w+=ge(w,s,a(d))),f.push(w),u=f.length}let{start:p,end:h}=n;if(f.length===0)return p+h;if(!c){let g=f.reduce((m,d)=>m+d.length+2,2);c=e.options.lineWidth>0&&g>e.options.lineWidth}if(c){let g=p;for(let m of f)g+=m?`
62
+ ${i}${r}${m}`:`
63
+ `;return`${g}
64
+ ${r}${h}`}else return`${p}${o}${f.join(" ")}${o}${h}`}function Mn({indent:t,options:{commentString:e}},n,s,r){if(s&&r&&(s=s.replace(/^\n+/,"")),s){let i=se(e(s),t);n.push(i.trimStart())}}function $e(t,e){let n=C(e)?e.value:e;for(let s of t)if(T(s)&&(s.key===e||s.key===n||C(s.key)&&s.key.value===n))return s}var x=class extends ot{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(oe,e),this.items=[]}static from(e,n,s){let{keepUndefined:r,replacer:i}=s,o=new this(e),a=(l,c)=>{if(typeof i=="function")c=i.call(n,l,c);else if(Array.isArray(i)&&!i.includes(l))return;(c!==undefined||r)&&o.items.push(ct(l,c,s))};if(n instanceof Map)for(let[l,c]of n)a(l,c);else if(n&&typeof n=="object")for(let l of Object.keys(n))a(l,n[l]);return typeof e.sortMapEntries=="function"&&o.items.sort(e.sortMapEntries),o}add(e,n){let s;T(e)?s=e:!e||typeof e!="object"||!("key"in e)?s=new v(e,e?.value):s=new v(e.key,e.value);let r=$e(this.items,s.key),i=this.schema?.sortMapEntries;if(r){if(!n)throw new Error(`Key ${s.key} already set`);C(r.value)&&Tn(s.value)?r.value.value=s.value:r.value=s.value}else if(i){let o=this.items.findIndex((a)=>i(s,a)<0);o===-1?this.items.push(s):this.items.splice(o,0,s)}else this.items.push(s)}delete(e){let n=$e(this.items,e);return n?this.items.splice(this.items.indexOf(n),1).length>0:false}get(e,n){let r=$e(this.items,e)?.value;return(!n&&C(r)?r.value:r)??undefined}has(e){return!!$e(this.items,e)}set(e,n){this.add(new v(e,n),true)}toJSON(e,n,s){let r=s?new s:n?.mapAsMap?new Map:{};n?.onCreate&&n.onCreate(r);for(let i of this.items)xn(n,r,i);return r}toString(e,n,s){if(!e)return JSON.stringify(this);for(let r of this.items)if(!T(r))throw new Error(`Map items must all be pairs; found ${JSON.stringify(r)} instead`);return!e.allNullValues&&this.hasAllNullValues(false)&&(e=Object.assign({},e,{allNullValues:true})),$n(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:s,onComment:n})}};var ce={collection:"map",default:true,nodeClass:x,tag:"tag:yaml.org,2002:map",resolve(t,e){return j(t)||e("Expected a mapping for this tag"),t},createNode:(t,e,n)=>x.from(t,e,n)};var K=class extends ot{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(Ae,e),this.items=[]}add(e){this.items.push(e)}delete(e){let n=Bn(e);return typeof n!="number"?false:this.items.splice(n,1).length>0}get(e,n){let s=Bn(e);if(typeof s!="number")return;let r=this.items[s];return!n&&C(r)?r.value:r}has(e){let n=Bn(e);return typeof n=="number"&&n<this.items.length}set(e,n){let s=Bn(e);if(typeof s!="number")throw new Error(`Expected a valid index, not ${e}.`);let r=this.items[s];C(r)&&Tn(n)?r.value=n:this.items[s]=n}toJSON(e,n){let s=[];n?.onCreate&&n.onCreate(s);let r=0;for(let i of this.items)s.push(B(i,String(r++),n));return s}toString(e,n,s){return e?$n(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:s,onComment:n}):JSON.stringify(this)}static from(e,n,s){let{replacer:r}=s,i=new this(e);if(n&&Symbol.iterator in Object(n)){let o=0;for(let a of n){if(typeof r=="function"){let l=n instanceof Set?a:String(o++);a=r.call(n,l,a)}i.items.push(Te(a,undefined,s))}}return i}};function Bn(t){let e=C(t)?t.value:t;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}var fe={collection:"seq",default:true,nodeClass:K,tag:"tag:yaml.org,2002:seq",resolve(t,e){return J(t)||e("Expected a sequence for this tag"),t},createNode:(t,e,n)=>K.from(t,e,n)};var Be={identify:(t)=>typeof t=="string",default:true,tag:"tag:yaml.org,2002:str",resolve:(t)=>t,stringify(t,e,n,s){return e=Object.assign({actualString:true},e),Oe(t,e,n,s)}};var je={identify:(t)=>t==null,createNode:()=>new y(null),default:true,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new y(null),stringify:({source:t},e)=>typeof t=="string"&&je.test.test(t)?t:e.options.nullStr};var qt={identify:(t)=>typeof t=="boolean",default:true,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:(t)=>new y(t[0]==="t"||t[0]==="T"),stringify({source:t,value:e},n){if(t&&qt.test.test(t)){let s=t[0]==="t"||t[0]==="T";if(e===s)return t}return e?n.options.trueStr:n.options.falseStr}};function V({format:t,minFractionDigits:e,tag:n,value:s}){if(typeof s=="bigint")return String(s);let r=typeof s=="number"?s:Number(s);if(!isFinite(r))return isNaN(r)?".nan":r<0?"-.inf":".inf";let i=Object.is(s,-0)?"-0":JSON.stringify(s);if(!t&&e&&(!n||n==="tag:yaml.org,2002:float")&&/^-?\d/.test(i)&&!i.includes("e")){let o=i.indexOf(".");o<0&&(o=i.length,i+=".");let a=e-(i.length-o-1);for(;a-- >0;)i+="0"}return i}var Rn={identify:(t)=>typeof t=="number",default:true,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:(t)=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:V},qn={identify:(t)=>typeof t=="number",default:true,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:(t)=>parseFloat(t),stringify(t){let e=Number(t.value);return isFinite(e)?e.toExponential():V(t)}},Fn={identify:(t)=>typeof t=="number",default:true,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(t){let e=new y(parseFloat(t)),n=t.indexOf(".");return n!==-1&&t[t.length-1]==="0"&&(e.minFractionDigits=t.length-n-1),e},stringify:V};var Kn=(t)=>typeof t=="bigint"||Number.isInteger(t),Ps=(t,e,n,{intAsBigInt:s})=>s?BigInt(t):parseInt(t.substring(e),n);function yi(t,e,n){let{value:s}=t;return Kn(s)&&s>=0?n+s.toString(e):V(t)}var Yn={identify:(t)=>Kn(t)&&t>=0,default:true,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(t,e,n)=>Ps(t,2,8,n),stringify:(t)=>yi(t,8,"0o")},Un={identify:Kn,default:true,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(t,e,n)=>Ps(t,0,10,n),stringify:V},jn={identify:(t)=>Kn(t)&&t>=0,default:true,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(t,e,n)=>Ps(t,2,16,n),stringify:(t)=>yi(t,16,"0x")};var bi=[ce,fe,Be,je,qt,Yn,Un,jn,Rn,qn,Fn];function wi(t){return typeof t=="bigint"||Number.isInteger(t)}var Vn=({value:t})=>JSON.stringify(t),La=[{identify:(t)=>typeof t=="string",default:true,tag:"tag:yaml.org,2002:str",resolve:(t)=>t,stringify:Vn},{identify:(t)=>t==null,createNode:()=>new y(null),default:true,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Vn},{identify:(t)=>typeof t=="boolean",default:true,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:(t)=>t==="true",stringify:Vn},{identify:wi,default:true,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(t,e,{intAsBigInt:n})=>n?BigInt(t):parseInt(t,10),stringify:({value:t})=>wi(t)?t.toString():JSON.stringify(t)},{identify:(t)=>typeof t=="number",default:true,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:(t)=>parseFloat(t),stringify:Vn}],Pa={default:true,tag:"",test:/^/,resolve(t,e){return e(`Unresolved plain scalar ${JSON.stringify(t)}`),t}},ki=[ce,fe].concat(La,Pa);var Ft={identify:(t)=>t instanceof Uint8Array,default:false,tag:"tag:yaml.org,2002:binary",resolve(t,e){if(typeof atob=="function"){let n=atob(t.replace(/[\n\r]/g,"")),s=new Uint8Array(n.length);for(let r=0;r<n.length;++r)s[r]=n.charCodeAt(r);return s}else return t},stringify({comment:t,type:e,value:n},s,r,i){if(!n)return"";let o=n,a;if(typeof btoa=="function"){let l="";for(let c=0;c<o.length;++c)l+=String.fromCharCode(o[c]);a=btoa(l)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e??(e=y.BLOCK_LITERAL),e!==y.QUOTE_DOUBLE){let l=Math.max(s.options.lineWidth-s.indent.length,s.options.minContentWidth),c=Math.ceil(a.length/l),u=new Array(c);for(let f=0,p=0;f<c;++f,p+=l)u[f]=a.substr(p,l);a=u.join(e===y.BLOCK_LITERAL?`
65
+ `:" ")}return Oe({comment:t,type:e,value:a},s,r,i)}};function vs(t,e){if(J(t))for(let n=0;n<t.items.length;++n){let s=t.items[n];if(!T(s)){if(j(s)){s.items.length>1&&e("Each pair must have its own sequence indicator");let r=s.items[0]||new v(new y(null));if(s.commentBefore&&(r.key.commentBefore=r.key.commentBefore?`${s.commentBefore}
66
+ ${r.key.commentBefore}`:s.commentBefore),s.comment){let i=r.value??r.key;i.comment=i.comment?`${s.comment}
67
+ ${i.comment}`:s.comment}s=r}t.items[n]=T(s)?s:new v(s)}}else e("Expected a sequence for this tag");return t}function Ds(t,e,n){let{replacer:s}=n,r=new K(t);r.tag="tag:yaml.org,2002:pairs";let i=0;if(e&&Symbol.iterator in Object(e))for(let o of e){typeof s=="function"&&(o=s.call(e,String(i++),o));let a,l;if(Array.isArray(o))if(o.length===2)a=o[0],l=o[1];else throw new TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){let c=Object.keys(o);if(c.length===1)a=c[0],l=o[a];else throw new TypeError(`Expected tuple with one key, not ${c.length} keys`)}else a=o;r.items.push(ct(a,l,n))}return r}var Kt={collection:"seq",default:false,tag:"tag:yaml.org,2002:pairs",resolve:vs,createNode:Ds};var ft=class t extends K{constructor(){super(),this.add=x.prototype.add.bind(this),this.delete=x.prototype.delete.bind(this),this.get=x.prototype.get.bind(this),this.has=x.prototype.has.bind(this),this.set=x.prototype.set.bind(this),this.tag=t.tag}toJSON(e,n){if(!n)return super.toJSON(e);let s=new Map;n?.onCreate&&n.onCreate(s);for(let r of this.items){let i,o;if(T(r)?(i=B(r.key,"",n),o=B(r.value,i,n)):i=B(r,"",n),s.has(i))throw new Error("Ordered maps must not include duplicate keys");s.set(i,o)}return s}static from(e,n,s){let r=Ds(e,n,s),i=new this;return i.items=r.items,i}};ft.tag="tag:yaml.org,2002:omap";var Yt={collection:"seq",identify:(t)=>t instanceof Map,nodeClass:ft,default:false,tag:"tag:yaml.org,2002:omap",resolve(t,e){let n=vs(t,e),s=[];for(let{key:r}of n.items)C(r)&&(s.includes(r.value)?e(`Ordered maps must not include duplicate keys: ${r.value}`):s.push(r.value));return Object.assign(new ft,n)},createNode:(t,e,n)=>ft.from(t,e,n)};function Si({value:t,source:e},n){return e&&(t?xs:Ms).test.test(e)?e:t?n.options.trueStr:n.options.falseStr}var xs={identify:(t)=>t===true,default:true,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new y(true),stringify:Si},Ms={identify:(t)=>t===false,default:true,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new y(false),stringify:Si};var Ei={identify:(t)=>typeof t=="number",default:true,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:(t)=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:V},Ci={identify:(t)=>typeof t=="number",default:true,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:(t)=>parseFloat(t.replace(/_/g,"")),stringify(t){let e=Number(t.value);return isFinite(e)?e.toExponential():V(t)}},Ni={identify:(t)=>typeof t=="number",default:true,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){let e=new y(parseFloat(t.replace(/_/g,""))),n=t.indexOf(".");if(n!==-1){let s=t.substring(n+1).replace(/_/g,"");s[s.length-1]==="0"&&(e.minFractionDigits=s.length)}return e},stringify:V};var Ut=(t)=>typeof t=="bigint"||Number.isInteger(t);function Gn(t,e,n,{intAsBigInt:s}){let r=t[0];if((r==="-"||r==="+")&&(e+=1),t=t.substring(e).replace(/_/g,""),s){switch(n){case 2:t=`0b${t}`;break;case 8:t=`0o${t}`;break;case 16:t=`0x${t}`;break}let o=BigInt(t);return r==="-"?BigInt(-1)*o:o}let i=parseInt(t,n);return r==="-"?-1*i:i}function $s(t,e,n){let{value:s}=t;if(Ut(s)){let r=s.toString(e);return s<0?"-"+n+r.substr(1):n+r}return V(t)}var Ai={identify:Ut,default:true,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(t,e,n)=>Gn(t,2,2,n),stringify:(t)=>$s(t,2,"0b")},Ti={identify:Ut,default:true,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(t,e,n)=>Gn(t,1,8,n),stringify:(t)=>$s(t,8,"0")},Oi={identify:Ut,default:true,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(t,e,n)=>Gn(t,0,10,n),stringify:V},_i={identify:Ut,default:true,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(t,e,n)=>Gn(t,2,16,n),stringify:(t)=>$s(t,16,"0x")};var ut=class t extends x{constructor(e){super(e),this.tag=t.tag}add(e){let n;T(e)?n=e:e&&typeof e=="object"&&("key"in e)&&("value"in e)&&e.value===null?n=new v(e.key,null):n=new v(e,null),$e(this.items,n.key)||this.items.push(n)}get(e,n){let s=$e(this.items,e);return!n&&T(s)?C(s.key)?s.key.value:s.key:s}set(e,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);let s=$e(this.items,e);s&&!n?this.items.splice(this.items.indexOf(s),1):!s&&n&&this.items.push(new v(e))}toJSON(e,n){return super.toJSON(e,n,Set)}toString(e,n,s){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(true))return super.toString(Object.assign({},e,{allNullValues:true}),n,s);throw new Error("Set items must all have null values")}static from(e,n,s){let{replacer:r}=s,i=new this(e);if(n&&Symbol.iterator in Object(n))for(let o of n)typeof r=="function"&&(o=r.call(n,o,o)),i.items.push(ct(o,null,s));return i}};ut.tag="tag:yaml.org,2002:set";var jt={collection:"map",identify:(t)=>t instanceof Set,nodeClass:ut,default:false,tag:"tag:yaml.org,2002:set",createNode:(t,e,n)=>ut.from(t,e,n),resolve(t,e){if(j(t)){if(t.hasAllNullValues(true))return Object.assign(new ut,t);e("Set items must all have null values")}else e("Expected a mapping for this tag");return t}};function Bs(t,e){let n=t[0],s=n==="-"||n==="+"?t.substring(1):t,r=(o)=>e?BigInt(o):Number(o),i=s.replace(/_/g,"").split(":").reduce((o,a)=>o*r(60)+r(a),r(0));return n==="-"?r(-1)*i:i}function Ii(t){let{value:e}=t,n=(o)=>o;if(typeof e=="bigint")n=(o)=>BigInt(o);else if(isNaN(e)||!isFinite(e))return V(t);let s="";e<0&&(s="-",e*=n(-1));let r=n(60),i=[e%r];return e<60?i.unshift(0):(e=(e-i[0])/r,i.unshift(e%r),e>=60&&(e=(e-i[0])/r,i.unshift(e))),s+i.map((o)=>String(o).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var Qn={identify:(t)=>typeof t=="bigint"||Number.isInteger(t),default:true,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(t,e,{intAsBigInt:n})=>Bs(t,n),stringify:Ii},Wn={identify:(t)=>typeof t=="number",default:true,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:(t)=>Bs(t,false),stringify:Ii},pt={identify:(t)=>t instanceof Date,default:true,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(t){let e=t.match(pt.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,n,s,r,i,o,a]=e.map(Number),l=e[7]?Number((e[7]+"00").substr(1,3)):0,c=Date.UTC(n,s-1,r,i||0,o||0,a||0,l),u=e[8];if(u&&u!=="Z"){let f=Bs(u,false);Math.abs(f)<30&&(f*=60),c-=60000*f}return new Date(c)},stringify:({value:t})=>t?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};var Rs=[ce,fe,Be,je,xs,Ms,Ai,Ti,Oi,_i,Ei,Ci,Ni,Ft,le,Yt,Kt,jt,Qn,Wn,pt];var Li=new Map([["core",bi],["failsafe",[ce,fe,Be]],["json",ki],["yaml11",Rs],["yaml-1.1",Rs]]),Pi={binary:Ft,bool:qt,float:Fn,floatExp:qn,floatNaN:Rn,floatTime:Wn,int:Un,intHex:jn,intOct:Yn,intTime:Qn,map:ce,merge:le,null:je,omap:Yt,pairs:Kt,seq:fe,set:jt,timestamp:pt},vi={"tag:yaml.org,2002:binary":Ft,"tag:yaml.org,2002:merge":le,"tag:yaml.org,2002:omap":Yt,"tag:yaml.org,2002:pairs":Kt,"tag:yaml.org,2002:set":jt,"tag:yaml.org,2002:timestamp":pt};function Hn(t,e,n){let s=Li.get(e);if(s&&!t)return n&&!s.includes(le)?s.concat(le):s.slice();let r=s;if(!r)if(Array.isArray(t))r=[];else{let i=Array.from(Li.keys()).filter((o)=>o!=="yaml11").map((o)=>JSON.stringify(o)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${i} or define customTags array`)}if(Array.isArray(t))for(let i of t)r=r.concat(i);else typeof t=="function"&&(r=t(r.slice()));return n&&(r=r.concat(le)),r.reduce((i,o)=>{let a=typeof o=="string"?Pi[o]:o;if(!a){let l=JSON.stringify(o),c=Object.keys(Pi).map((u)=>JSON.stringify(u)).join(", ");throw new Error(`Unknown custom tag ${l}; use one of ${c}`)}return i.includes(a)||i.push(a),i},[])}var va=(t,e)=>t.key<e.key?-1:t.key>e.key?1:0,mt=class t{constructor({compat:e,customTags:n,merge:s,resolveKnownTags:r,schema:i,sortMapEntries:o,toStringDefaults:a}){this.compat=Array.isArray(e)?Hn(e,"compat"):e?Hn(null,e):null,this.name=typeof i=="string"&&i||"core",this.knownTags=r?vi:{},this.tags=Hn(n,this.name,s),this.toStringOptions=a??null,Object.defineProperty(this,oe,{value:ce}),Object.defineProperty(this,ee,{value:Be}),Object.defineProperty(this,Ae,{value:fe}),this.sortMapEntries=typeof o=="function"?o:o===true?va:null}clone(){let e=Object.create(t.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}};function Di(t,e){let n=[],s=e.directives===true;if(e.directives!==false&&t.directives){let l=t.directives.toString(t);l?(n.push(l),s=true):t.directives.docStart&&(s=true)}s&&n.push("---");let r=Pn(t,e),{commentString:i}=r.options;if(t.commentBefore){n.length!==1&&n.unshift("");let l=i(t.commentBefore);n.unshift(se(l,""))}let o=false,a=null;if(t.contents){if(_(t.contents)){if(t.contents.spaceBefore&&s&&n.push(""),t.contents.commentBefore){let u=i(t.contents.commentBefore);n.push(se(u,""))}r.forceBlockIndent=!!t.comment,a=t.contents.comment}let l=a?undefined:()=>o=true,c=_e(t.contents,r,()=>a=null,l);a&&(c+=ge(c,"",i(a))),(c[0]==="|"||c[0]===">")&&n[n.length-1]==="---"?n[n.length-1]=`--- ${c}`:n.push(c)}else n.push(_e(t.contents,r));if(t.directives?.docEnd)if(t.comment){let l=i(t.comment);l.includes(`
68
+ `)?(n.push("..."),n.push(se(l,""))):n.push(`... ${l}`)}else n.push("...");else{let l=t.comment;l&&o&&(l=l.replace(/^\n+/,"")),l&&((!o||a)&&n[n.length-1]!==""&&n.push(""),n.push(se(i(l),"")))}return n.join(`
69
+ `)+`
70
+ `}var ye=class t{constructor(e,n,s){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Q,{value:En});let r=null;typeof n=="function"||Array.isArray(n)?r=n:s===undefined&&n&&(s=n,n=undefined);let i=Object.assign({intAsBigInt:false,keepSourceTokens:false,logLevel:"warn",prettyErrors:true,strict:true,stringKeys:false,uniqueKeys:true,version:"1.2"},s);this.options=i;let{version:o}=i;s?._directives?(this.directives=s._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new he({version:o}),this.setSchema(o,s),this.contents=e===undefined?null:this.createNode(e,r,s)}clone(){let e=Object.create(t.prototype,{[Q]:{value:En}});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=_(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){ht(this.contents)&&this.contents.add(e)}addIn(e,n){ht(this.contents)&&this.contents.addIn(e,n)}createAlias(e,n){if(!e.anchor){let s=Ns(this);e.anchor=!n||s.has(n)?As(n||"a",s):n}return new de(e.anchor)}createNode(e,n,s){let r;if(typeof n=="function")e=n.call({"":e},"",e),r=n;else if(Array.isArray(n)){let d=(k)=>typeof k=="number"||k instanceof String||k instanceof Number,w=n.filter(d).map(String);w.length>0&&(n=n.concat(w)),r=n}else s===undefined&&n&&(s=n,n=undefined);let{aliasDuplicateObjects:i,anchorPrefix:o,flow:a,keepUndefined:l,onTagObj:c,tag:u}=s??{},{onAnchor:f,setAnchors:p,sourceObjects:h}=ui(this,o||"a"),g={aliasDuplicateObjects:i??true,keepUndefined:l??false,onAnchor:f,onTagObj:c,replacer:r,schema:this.schema,sourceObjects:h},m=Te(e,u,g);return a&&I(m)&&(m.flow=true),p(),m}createPair(e,n,s={}){let r=this.createNode(e,null,s),i=this.createNode(n,null,s);return new v(r,i)}delete(e){return ht(this.contents)?this.contents.delete(e):false}deleteIn(e){return at(e)?this.contents==null?false:(this.contents=null,true):ht(this.contents)?this.contents.deleteIn(e):false}get(e,n){return I(this.contents)?this.contents.get(e,n):undefined}getIn(e,n){return at(e)?!n&&C(this.contents)?this.contents.value:this.contents:I(this.contents)?this.contents.getIn(e,n):undefined}has(e){return I(this.contents)?this.contents.has(e):false}hasIn(e){return at(e)?this.contents!==undefined:I(this.contents)?this.contents.hasIn(e):false}set(e,n){this.contents==null?this.contents=Mt(this.schema,[e],n):ht(this.contents)&&this.contents.set(e,n)}setIn(e,n){at(e)?this.contents=n:this.contents==null?this.contents=Mt(this.schema,Array.from(e),n):ht(this.contents)&&this.contents.setIn(e,n)}setSchema(e,n={}){typeof e=="number"&&(e=String(e));let s;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new he({version:"1.1"}),s={resolveKnownTags:false,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new he({version:e}),s={resolveKnownTags:true,schema:"core"};break;case null:this.directives&&delete this.directives,s=null;break;default:{let r=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${r}`)}}if(n.schema instanceof Object)this.schema=n.schema;else if(s)this.schema=new mt(Object.assign(s,n));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:n,mapAsMap:s,maxAliasCount:r,onAnchor:i,reviver:o}={}){let a={anchors:new Map,doc:this,keep:!e,mapAsMap:s===true,mapKeyWarned:false,maxAliasCount:typeof r=="number"?r:100},l=B(this.contents,n??"",a);if(typeof i=="function")for(let{count:c,res:u}of a.anchors.values())i(u,c);return typeof o=="function"?xe(o,{"":l},"",l):l}toJSON(e,n){return this.toJS({json:true,jsonArg:e,mapAsMap:false,onAnchor:n})}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 n=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${n}`)}return Di(this,e)}};function ht(t){if(I(t))return true;throw new Error("Expected a YAML collection as document contents")}var dt=class extends Error{constructor(e,n,s,r){super(),this.name=e,this.code=s,this.message=r,this.pos=n}},te=class extends dt{constructor(e,n,s){super("YAMLParseError",e,n,s)}},gt=class extends dt{constructor(e,n,s){super("YAMLWarning",e,n,s)}},Vt=(t,e)=>(n)=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map((a)=>e.linePos(a));let{line:s,col:r}=n.linePos[0];n.message+=` at line ${s}, column ${r}`;let i=r-1,o=t.substring(e.lineStarts[s-1],e.lineStarts[s]).replace(/[\n\r]+$/,"");if(i>=60&&o.length>80){let a=Math.min(i-39,o.length-79);o="…"+o.substring(a),i-=a-1}if(o.length>80&&(o=o.substring(0,79)+"…"),s>1&&/^ *$/.test(o.substring(0,i))){let a=t.substring(e.lineStarts[s-2],e.lineStarts[s-1]);a.length>80&&(a=a.substring(0,79)+`…
71
+ `),o=a+o}if(/[^ ]/.test(o)){let a=1,l=n.linePos[1];l?.line===s&&l.col>r&&(a=Math.max(1,Math.min(l.col-r,80-i)));let c=" ".repeat(i)+"^".repeat(a);n.message+=`:
72
+
73
+ ${o}
74
+ ${c}
75
+ `}};function be(t,{flow:e,indicator:n,next:s,offset:r,onError:i,parentIndent:o,startOnNewline:a}){let l=false,c=a,u=a,f="",p="",h=false,g=false,m=null,d=null,w=null,k=null,S=null,E=null,N=null;for(let b of t)switch(g&&(b.type!=="space"&&b.type!=="newline"&&b.type!=="comma"&&i(b.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),g=false),m&&(c&&b.type!=="comment"&&b.type!=="newline"&&i(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),m=null),b.type){case"space":!e&&(n!=="doc-start"||s?.type!=="flow-collection")&&b.source.includes("\t")&&(m=b),u=true;break;case"comment":{u||i(b,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let M=b.source.substring(1)||" ";f?f+=p+M:f=M,p="",c=false;break}case"newline":c?f?f+=b.source:(!E||n!=="seq-item-ind")&&(l=true):p+=b.source,c=true,h=true,(d||w)&&(k=b),u=true;break;case"anchor":d&&i(b,"MULTIPLE_ANCHORS","A node can have at most one anchor"),b.source.endsWith(":")&&i(b.offset+b.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",true),d=b,N??(N=b.offset),c=false,u=false,g=true;break;case"tag":{w&&i(b,"MULTIPLE_TAGS","A node can have at most one tag"),w=b,N??(N=b.offset),c=false,u=false,g=true;break}case n:(d||w)&&i(b,"BAD_PROP_ORDER",`Anchors and tags must be after the ${b.source} indicator`),E&&i(b,"UNEXPECTED_TOKEN",`Unexpected ${b.source} in ${e??"collection"}`),E=b,c=n==="seq-item-ind"||n==="explicit-key-ind",u=false;break;case"comma":if(e){S&&i(b,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),S=b,c=false,u=false;break}default:i(b,"UNEXPECTED_TOKEN",`Unexpected ${b.type} token`),c=false,u=false}let A=t[t.length-1],L=A?A.offset+A.source.length:r;return g&&s&&s.type!=="space"&&s.type!=="newline"&&s.type!=="comma"&&(s.type!=="scalar"||s.source!=="")&&i(s.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),m&&(c&&m.indent<=o||s?.type==="block-map"||s?.type==="block-seq")&&i(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:S,found:E,spaceBefore:l,comment:f,hasNewline:h,anchor:d,tag:w,newlineAfterProp:k,end:L,start:N??L}}function Re(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes(`
76
+ `))return true;if(t.end){for(let e of t.end)if(e.type==="newline")return true}return false;case"flow-collection":for(let e of t.items){for(let n of e.start)if(n.type==="newline")return true;if(e.sep){for(let n of e.sep)if(n.type==="newline")return true}if(Re(e.key)||Re(e.value))return true}return false;default:return true}}function Gt(t,e,n){if(e?.type==="flow-collection"){let s=e.end[0];s.indent===t&&(s.source==="]"||s.source==="}")&&Re(e)&&n(s,"BAD_INDENT","Flow end indicator should be more indented than parent",true)}}function Jn(t,e,n){let{uniqueKeys:s}=t.options;if(s===false)return false;let r=typeof s=="function"?s:(i,o)=>i===o||C(i)&&C(o)&&i.value===o.value;return e.some((i)=>r(i.key,n))}var xi="All mapping items must start at the same column";function Mi({composeNode:t,composeEmptyNode:e},n,s,r,i){let o=i?.nodeClass??x,a=new o(n.schema);n.atRoot&&(n.atRoot=false);let l=s.offset,c=null;for(let u of s.items){let{start:f,key:p,sep:h,value:g}=u,m=be(f,{indicator:"explicit-key-ind",next:p??h?.[0],offset:l,onError:r,parentIndent:s.indent,startOnNewline:true}),d=!m.found;if(d){if(p&&(p.type==="block-seq"?r(l,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):("indent"in p)&&p.indent!==s.indent&&r(l,"BAD_INDENT",xi)),!m.anchor&&!m.tag&&!h){c=m.end,m.comment&&(a.comment?a.comment+=`
77
+ `+m.comment:a.comment=m.comment);continue}(m.newlineAfterProp||Re(p))&&r(p??f[f.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else m.found?.indent!==s.indent&&r(l,"BAD_INDENT",xi);n.atKey=true;let w=m.end,k=p?t(n,p,m,r):e(n,w,f,null,m,r);n.schema.compat&&Gt(s.indent,p,r),n.atKey=false,Jn(n,a.items,k)&&r(w,"DUPLICATE_KEY","Map keys must be unique");let S=be(h??[],{indicator:"map-value-ind",next:g,offset:k.range[2],onError:r,parentIndent:s.indent,startOnNewline:!p||p.type==="block-scalar"});if(l=S.end,S.found){d&&(g?.type==="block-map"&&!S.hasNewline&&r(l,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&m.start<S.found.offset-1024&&r(k.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let E=g?t(n,g,S,r):e(n,l,h,null,S,r);n.schema.compat&&Gt(s.indent,g,r),l=E.range[2];let N=new v(k,E);n.options.keepSourceTokens&&(N.srcToken=u),a.items.push(N)}else{d&&r(k.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),S.comment&&(k.comment?k.comment+=`
78
+ `+S.comment:k.comment=S.comment);let E=new v(k);n.options.keepSourceTokens&&(E.srcToken=u),a.items.push(E)}}return c&&c<l&&r(c,"IMPOSSIBLE","Map comment with trailing content"),a.range=[s.offset,l,c??l],a}function $i({composeNode:t,composeEmptyNode:e},n,s,r,i){let o=i?.nodeClass??K,a=new o(n.schema);n.atRoot&&(n.atRoot=false),n.atKey&&(n.atKey=false);let l=s.offset,c=null;for(let{start:u,value:f}of s.items){let p=be(u,{indicator:"seq-item-ind",next:f,offset:l,onError:r,parentIndent:s.indent,startOnNewline:true});if(!p.found)if(p.anchor||p.tag||f)f?.type==="block-seq"?r(p.end,"BAD_INDENT","All sequence items must start at the same column"):r(l,"MISSING_CHAR","Sequence item without - indicator");else{c=p.end,p.comment&&(a.comment=p.comment);continue}let h=f?t(n,f,p,r):e(n,p.end,u,null,p,r);n.schema.compat&&Gt(s.indent,f,r),l=h.range[2],a.items.push(h)}return a.range=[s.offset,l,c??l],a}function we(t,e,n,s){let r="";if(t){let i=false,o="";for(let a of t){let{source:l,type:c}=a;switch(c){case"space":i=true;break;case"comment":{n&&!i&&s(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let u=l.substring(1)||" ";r?r+=o+u:r=u,o="";break}case"newline":r&&(o+=l),i=true;break;default:s(a,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}e+=l.length}}return{comment:r,offset:e}}var qs="Block collections are not allowed within flow collections",Fs=(t)=>t&&(t.type==="block-map"||t.type==="block-seq");function Bi({composeNode:t,composeEmptyNode:e},n,s,r,i){let o=s.start.source==="{",a=o?"flow map":"flow sequence",l=i?.nodeClass??(o?x:K),c=new l(n.schema);c.flow=true;let u=n.atRoot;u&&(n.atRoot=false),n.atKey&&(n.atKey=false);let f=s.offset+s.start.source.length;for(let d=0;d<s.items.length;++d){let w=s.items[d],{start:k,key:S,sep:E,value:N}=w,A=be(k,{flow:a,indicator:"explicit-key-ind",next:S??E?.[0],offset:f,onError:r,parentIndent:s.indent,startOnNewline:false});if(!A.found){if(!A.anchor&&!A.tag&&!E&&!N){d===0&&A.comma?r(A.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`):d<s.items.length-1&&r(A.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${a}`),A.comment&&(c.comment?c.comment+=`
79
+ `+A.comment:c.comment=A.comment),f=A.end;continue}!o&&n.options.strict&&Re(S)&&r(S,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(d===0)A.comma&&r(A.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`);else if(A.comma||r(A.start,"MISSING_CHAR",`Missing , between ${a} items`),A.comment){let L="";e:for(let b of k)switch(b.type){case"comma":case"space":break;case"comment":L=b.source.substring(1);break e;default:break e}if(L){let b=c.items[c.items.length-1];T(b)&&(b=b.value??b.key),b.comment?b.comment+=`
80
+ `+L:b.comment=L,A.comment=A.comment.substring(L.length+1)}}if(!o&&!E&&!A.found){let L=N?t(n,N,A,r):e(n,A.end,E,null,A,r);c.items.push(L),f=L.range[2],Fs(N)&&r(L.range,"BLOCK_IN_FLOW",qs)}else{n.atKey=true;let L=A.end,b=S?t(n,S,A,r):e(n,L,k,null,A,r);Fs(S)&&r(b.range,"BLOCK_IN_FLOW",qs),n.atKey=false;let M=be(E??[],{flow:a,indicator:"map-value-ind",next:N,offset:b.range[2],onError:r,parentIndent:s.indent,startOnNewline:false});if(M.found){if(!o&&!A.found&&n.options.strict){if(E)for(let $ of E){if($===M.found)break;if($.type==="newline"){r($,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}A.start<M.found.offset-1024&&r(M.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else N&&("source"in N&&N.source?.[0]===":"?r(N,"MISSING_CHAR",`Missing space after : in ${a}`):r(M.start,"MISSING_CHAR",`Missing , or : between ${a} items`));let Pe=N?t(n,N,M,r):M.found?e(n,M.end,E,null,M,r):null;Pe?Fs(N)&&r(Pe.range,"BLOCK_IN_FLOW",qs):M.comment&&(b.comment?b.comment+=`
81
+ `+M.comment:b.comment=M.comment);let Ve=new v(b,Pe);if(n.options.keepSourceTokens&&(Ve.srcToken=w),o){let $=c;Jn(n,$.items,b)&&r(L,"DUPLICATE_KEY","Map keys must be unique"),$.items.push(Ve)}else{let $=new x(n.schema);$.flow=true,$.items.push(Ve);let nr=(Pe??b).range;$.range=[b.range[0],nr[1],nr[2]],c.items.push($)}f=Pe?Pe.range[2]:M.end}}let p=o?"}":"]",[h,...g]=s.end,m=f;if(h?.source===p)m=h.offset+h.source.length;else{let d=a[0].toUpperCase()+a.substring(1),w=u?`${d} must end with a ${p}`:`${d} in block collection must be sufficiently indented and end with a ${p}`;r(f,u?"MISSING_CHAR":"BAD_INDENT",w),h&&h.source.length!==1&&g.unshift(h)}if(g.length>0){let d=we(g,m,n.options.strict,r);d.comment&&(c.comment?c.comment+=`
82
+ `+d.comment:c.comment=d.comment),c.range=[s.offset,m,d.offset]}else c.range=[s.offset,m,m];return c}function Ks(t,e,n,s,r,i){let o=n.type==="block-map"?Mi(t,e,n,s,i):n.type==="block-seq"?$i(t,e,n,s,i):Bi(t,e,n,s,i),a=o.constructor;return r==="!"||r===a.tagName?(o.tag=a.tagName,o):(r&&(o.tag=r),o)}function Ri(t,e,n,s,r){let i=s.tag,o=i?e.directives.tagName(i.source,(p)=>r(i,"TAG_RESOLVE_FAILED",p)):null;if(n.type==="block-seq"){let{anchor:p,newlineAfterProp:h}=s,g=p&&i?p.offset>i.offset?p:i:p??i;g&&(!h||h.offset<g.offset)&&r(g,"MISSING_CHAR","Missing newline after block sequence props")}let a=n.type==="block-map"?"map":n.type==="block-seq"?"seq":n.start.source==="{"?"map":"seq";if(!i||!o||o==="!"||o===x.tagName&&a==="map"||o===K.tagName&&a==="seq")return Ks(t,e,n,r,o);let l=e.schema.tags.find((p)=>p.tag===o&&p.collection===a);if(!l){let p=e.schema.knownTags[o];if(p?.collection===a)e.schema.tags.push(Object.assign({},p,{default:false})),l=p;else return p?r(i,"BAD_COLLECTION_TYPE",`${p.tag} used for ${a} collection, but expects ${p.collection??"scalar"}`,true):r(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,true),Ks(t,e,n,r,o)}let c=Ks(t,e,n,r,o,l),u=l.resolve?.(c,(p)=>r(i,"TAG_RESOLVE_FAILED",p),e.options)??c,f=_(u)?u:new y(u);return f.range=c.range,f.tag=o,l?.format&&(f.format=l.format),f}function Xn(t,e,n){let s=e.offset,r=Da(e,t.options.strict,n);if(!r)return{value:"",type:null,comment:"",range:[s,s,s]};let i=r.mode===">"?y.BLOCK_FOLDED:y.BLOCK_LITERAL,o=e.source?xa(e.source):[],a=o.length;for(let m=o.length-1;m>=0;--m){let d=o[m][1];if(d===""||d==="\r")a=m;else break}if(a===0){let m=r.chomp==="+"&&o.length>0?`
83
+ `.repeat(Math.max(1,o.length-1)):"",d=s+r.length;return e.source&&(d+=e.source.length),{value:m,type:i,comment:r.comment,range:[s,d,d]}}let l=e.indent+r.indent,c=e.offset+r.length,u=0;for(let m=0;m<a;++m){let[d,w]=o[m];if(w===""||w==="\r")r.indent===0&&d.length>l&&(l=d.length);else{d.length<l&&n(c+d.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),r.indent===0&&(l=d.length),u=m,l===0&&!t.atRoot&&n(c,"BAD_INDENT","Block scalar values in collections must be indented");break}c+=d.length+w.length+1}for(let m=o.length-1;m>=a;--m)o[m][0].length>l&&(a=m+1);let f="",p="",h=false;for(let m=0;m<u;++m)f+=o[m][0].slice(l)+`
84
+ `;for(let m=u;m<a;++m){let[d,w]=o[m];c+=d.length+w.length+1;let k=w[w.length-1]==="\r";if(k&&(w=w.slice(0,-1)),w&&d.length<l){let E=`Block scalar lines must not be less indented than their ${r.indent?"explicit indentation indicator":"first line"}`;n(c-w.length-(k?2:1),"BAD_INDENT",E),d=""}i===y.BLOCK_LITERAL?(f+=p+d.slice(l)+w,p=`
85
+ `):d.length>l||w[0]==="\t"?(p===" "?p=`
86
+ `:!h&&p===`
87
+ `&&(p=`
88
+
89
+ `),f+=p+d.slice(l)+w,p=`
90
+ `,h=true):w===""?p===`
91
+ `?f+=`
92
+ `:p=`
93
+ `:(f+=p+w,p=" ",h=false)}switch(r.chomp){case"-":break;case"+":for(let m=a;m<o.length;++m)f+=`
94
+ `+o[m][0].slice(l);f[f.length-1]!==`
95
+ `&&(f+=`
96
+ `);break;default:f+=`
97
+ `}let g=s+r.length+e.source.length;return{value:f,type:i,comment:r.comment,range:[s,g,g]}}function Da({offset:t,props:e},n,s){if(e[0].type!=="block-scalar-header")return s(e[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:r}=e[0],i=r[0],o=0,a="",l=-1;for(let p=1;p<r.length;++p){let h=r[p];if(!a&&(h==="-"||h==="+"))a=h;else{let g=Number(h);!o&&g?o=g:l===-1&&(l=t+p)}}l!==-1&&s(l,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${r}`);let c=false,u="",f=r.length;for(let p=1;p<e.length;++p){let h=e[p];switch(h.type){case"space":c=true;case"newline":f+=h.source.length;break;case"comment":n&&!c&&s(h,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),f+=h.source.length,u=h.source.substring(1);break;case"error":s(h,"UNEXPECTED_TOKEN",h.message),f+=h.source.length;break;default:{let g=`Unexpected token in block scalar header: ${h.type}`;s(h,"UNEXPECTED_TOKEN",g);let m=h.source;m&&typeof m=="string"&&(f+=m.length)}}}return{mode:i,indent:o,chomp:a,comment:u,length:f}}function xa(t){let e=t.split(/\n( *)/),n=e[0],s=n.match(/^( *)/),i=[s?.[1]?[s[1],n.slice(s[1].length)]:["",n]];for(let o=1;o<e.length;o+=2)i.push([e[o],e[o+1]]);return i}function zn(t,e,n){let{offset:s,type:r,source:i,end:o}=t,a,l,c=(p,h,g)=>n(s+p,h,g);switch(r){case"scalar":a=y.PLAIN,l=Ma(i,c);break;case"single-quoted-scalar":a=y.QUOTE_SINGLE,l=$a(i,c);break;case"double-quoted-scalar":a=y.QUOTE_DOUBLE,l=Ba(i,c);break;default:return n(t,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${r}`),{value:"",type:null,comment:"",range:[s,s+i.length,s+i.length]}}let u=s+i.length,f=we(o,u,e,n);return{value:l,type:a,comment:f.comment,range:[s,u,f.offset]}}function Ma(t,e){let n="";switch(t[0]){case"\t":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":{n=`block scalar indicator ${t[0]}`;break}case"@":case"`":{n=`reserved character ${t[0]}`;break}}return n&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`),qi(t)}function $a(t,e){return(t[t.length-1]!=="'"||t.length===1)&&e(t.length,"MISSING_CHAR","Missing closing 'quote"),qi(t.slice(1,-1)).replace(/''/g,"'")}function qi(t){let e=/(.*?)\r?\n/sy,n=e.exec(t);if(!n)return t;let s,r;try{s=new RegExp("(?<![ \t])[ \t]+$"),r=new RegExp("^[ \t]+|(?<![ \t])[ \t]+$","g")}catch{s=/[ \t]+$/,r=/^[ \t]+|[ \t]+$/g}let i=n[1].replace(s,""),o=" ",a=e.lastIndex;for(;n=e.exec(t);){let c=n[1].replace(r,"");c===""?o===`
98
+ `?i+=o:o=`
99
+ `:(i+=o+c,o=" "),a=e.lastIndex}let l=/[ \t]*(.*)/sy;return l.lastIndex=a,n=l.exec(t),i+o+(n?.[1]??"")}function Ba(t,e){let n="";for(let s=1;s<t.length-1;++s){let r=t[s];if(!(r==="\r"&&t[s+1]===`
100
+ `))if(r===`
101
+ `){let{fold:i,offset:o}=Ra(t,s);n+=i,s=o}else if(r==="\\"){let i=t[++s],o=qa[i];if(o)n+=o;else if(i===`
102
+ `)for(i=t[s+1];i===" "||i==="\t";)i=t[++s+1];else if(i==="\r"&&t[s+1]===`
103
+ `)for(i=t[++s+1];i===" "||i==="\t";)i=t[++s+1];else if(i==="x"||i==="u"||i==="U"){let a=i==="x"?2:i==="u"?4:8;n+=Fa(t,s+1,a,e),s+=a}else{let a=t.substr(s-1,2);e(s-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),n+=a}}else if(r===" "||r==="\t"){let i=s,o=t[s+1];for(;o===" "||o==="\t";)o=t[++s+1];o!==`
104
+ `&&!(o==="\r"&&t[s+2]===`
105
+ `)&&(n+=s>i?t.slice(i,s+1):r)}else n+=r}return(t[t.length-1]!=='"'||t.length===1)&&e(t.length,"MISSING_CHAR",'Missing closing "quote'),n}function Ra(t,e){let n="",s=t[e+1];for(;(s===" "||s==="\t"||s===`
106
+ `||s==="\r")&&!(s==="\r"&&t[e+2]!==`
107
+ `);)s===`
108
+ `&&(n+=`
109
+ `),e+=1,s=t[e+1];return n||(n=" "),{fold:n,offset:e}}var qa={0:"\x00",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
110
+ `,r:"\r",t:"\t",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function Fa(t,e,n,s){let r=t.substr(e,n),o=r.length===n&&/^[0-9a-fA-F]+$/.test(r)?parseInt(r,16):NaN;try{return String.fromCodePoint(o)}catch{let a=t.substr(e-2,n+2);return s(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}}function Ys(t,e,n,s){let{value:r,type:i,comment:o,range:a}=e.type==="block-scalar"?Xn(t,e,s):zn(e,t.options.strict,s),l=n?t.directives.tagName(n.source,(f)=>s(n,"TAG_RESOLVE_FAILED",f)):null,c;t.options.stringKeys&&t.atKey?c=t.schema[ee]:l?c=Ka(t.schema,r,l,n,s):e.type==="scalar"?c=Ya(t,r,e,s):c=t.schema[ee];let u;try{let f=c.resolve(r,(p)=>s(n??e,"TAG_RESOLVE_FAILED",p),t.options);u=C(f)?f:new y(f)}catch(f){let p=f instanceof Error?f.message:String(f);s(n??e,"TAG_RESOLVE_FAILED",p),u=new y(r)}return u.range=a,u.source=r,i&&(u.type=i),l&&(u.tag=l),c.format&&(u.format=c.format),o&&(u.comment=o),u}function Ka(t,e,n,s,r){if(n==="!")return t[ee];let i=[];for(let a of t.tags)if(!a.collection&&a.tag===n)if(a.default&&a.test)i.push(a);else return a;for(let a of i)if(a.test?.test(e))return a;let o=t.knownTags[n];return o&&!o.collection?(t.tags.push(Object.assign({},o,{default:false,test:undefined})),o):(r(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,n!=="tag:yaml.org,2002:str"),t[ee])}function Ya({atKey:t,directives:e,schema:n},s,r,i){let o=n.tags.find((a)=>(a.default===true||t&&a.default==="key")&&a.test?.test(s))||n[ee];if(n.compat){let a=n.compat.find((l)=>l.default&&l.test?.test(s))??n[ee];if(o.tag!==a.tag){let l=e.tagString(o.tag),c=e.tagString(a.tag),u=`Value may be parsed as either ${l} or ${c}`;i(r,"TAG_RESOLVE_FAILED",u,true)}}return o}function Fi(t,e,n){if(e){n??(n=e.length);for(let s=n-1;s>=0;--s){let r=e[s];switch(r.type){case"space":case"comment":case"newline":t-=r.source.length;continue}for(r=e[++s];r?.type==="space";)t+=r.source.length,r=e[++s];break}}return t}var Ua={composeNode:Us,composeEmptyNode:Zn};function Us(t,e,n,s){let r=t.atKey,{spaceBefore:i,comment:o,anchor:a,tag:l}=n,c,u=true;switch(e.type){case"alias":c=ja(t,e,s),(a||l)&&s(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":c=Ys(t,e,l,s),a&&(c.anchor=a.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{c=Ri(Ua,t,e,n,s),a&&(c.anchor=a.source.substring(1))}catch(f){let p=f instanceof Error?f.message:String(f);s(e,"RESOURCE_EXHAUSTION",p)}break;default:{let f=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;s(e,"UNEXPECTED_TOKEN",f),u=false}}return c??(c=Zn(t,e.offset,undefined,null,n,s)),a&&c.anchor===""&&s(a,"BAD_ALIAS","Anchor cannot be an empty string"),r&&t.options.stringKeys&&(!C(c)||typeof c.value!="string"||c.tag&&c.tag!=="tag:yaml.org,2002:str")&&s(l??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),i&&(c.spaceBefore=true),o&&(e.type==="scalar"&&e.source===""?c.comment=o:c.commentBefore=o),t.options.keepSourceTokens&&u&&(c.srcToken=e),c}function Zn(t,e,n,s,{spaceBefore:r,comment:i,anchor:o,tag:a,end:l},c){let u={type:"scalar",offset:Fi(e,n,s),indent:-1,source:""},f=Ys(t,u,a,c);return o&&(f.anchor=o.source.substring(1),f.anchor===""&&c(o,"BAD_ALIAS","Anchor cannot be an empty string")),r&&(f.spaceBefore=true),i&&(f.comment=i,f.range[2]=l),f}function ja({options:t},{offset:e,source:n,end:s},r){let i=new de(n.substring(1));i.source===""&&r(e,"BAD_ALIAS","Alias cannot be an empty string"),i.source.endsWith(":")&&r(e+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",true);let o=e+n.length,a=we(s,o,t.strict,r);return i.range=[e,o,a.offset],a.comment&&(i.comment=a.comment),i}function Ki(t,e,{offset:n,start:s,value:r,end:i},o){let a=Object.assign({_directives:e},t),l=new ye(undefined,a),c={atKey:false,atRoot:true,directives:l.directives,options:l.options,schema:l.schema},u=be(s,{indicator:"doc-start",next:r??i?.[0],offset:n,onError:o,parentIndent:0,startOnNewline:true});u.found&&(l.directives.docStart=true,r&&(r.type==="block-map"||r.type==="block-seq")&&!u.hasNewline&&o(u.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),l.contents=r?Us(c,r,u,o):Zn(c,u.end,s,null,u,o);let f=l.contents.range[2],p=we(i,f,false,o);return p.comment&&(l.comment=p.comment),l.range=[n,f,p.offset],l}function Qt(t){if(typeof t=="number")return[t,t+1];if(Array.isArray(t))return t.length===2?t:[t[0],t[1]];let{offset:e,source:n}=t;return[e,e+(typeof n=="string"?n.length:1)]}function Yi(t){let e="",n=false,s=false;for(let r=0;r<t.length;++r){let i=t[r];switch(i[0]){case"#":e+=(e===""?"":s?`
111
+
112
+ `:`
113
+ `)+(i.substring(1)||" "),n=true,s=false;break;case"%":t[r+1]?.[0]!=="#"&&(r+=1),n=false;break;default:n||(s=true),n=false}}return{comment:e,afterEmptyLine:s}}var Ie=class{constructor(e={}){this.doc=null,this.atDirectives=false,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(n,s,r,i)=>{let o=Qt(n);i?this.warnings.push(new gt(o,s,r)):this.errors.push(new te(o,s,r))},this.directives=new he({version:e.version||"1.2"}),this.options=e}decorate(e,n){let{comment:s,afterEmptyLine:r}=Yi(this.prelude);if(s){let i=e.contents;if(n)e.comment=e.comment?`${e.comment}
114
+ ${s}`:s;else if(r||e.directives.docStart||!i)e.commentBefore=s;else if(I(i)&&!i.flow&&i.items.length>0){let o=i.items[0];T(o)&&(o=o.key);let a=o.commentBefore;o.commentBefore=a?`${s}
115
+ ${a}`:s}else{let o=i.commentBefore;i.commentBefore=o?`${s}
116
+ ${o}`:s}}if(n){for(let i=0;i<this.errors.length;++i)e.errors.push(this.errors[i]);for(let i=0;i<this.warnings.length;++i)e.warnings.push(this.warnings[i])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Yi(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,n=false,s=-1){for(let r of e)yield*this.next(r);yield*this.end(n,s)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(n,s,r)=>{let i=Qt(e);i[0]+=n,this.onError(i,"BAD_DIRECTIVE",s,r)}),this.prelude.push(e.source),this.atDirectives=true;break;case"document":{let n=Ki(this.options,this.directives,e,this.onError);this.atDirectives&&!n.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(n,false),this.doc&&(yield this.doc),this.doc=n,this.atDirectives=false;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{let n=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,s=new te(Qt(e),"UNEXPECTED_TOKEN",n);this.atDirectives||!this.doc?this.errors.push(s):this.doc.errors.push(s);break}case"doc-end":{if(!this.doc){let s="Unexpected doc-end without preceding document";this.errors.push(new te(Qt(e),"UNEXPECTED_TOKEN",s));break}this.doc.directives.docEnd=true;let n=we(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,true),n.comment){let s=this.doc.comment;this.doc.comment=s?`${s}
117
+ ${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.push(new te(Qt(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=false,n=-1){if(this.doc)this.decorate(this.doc,true),yield this.doc,this.doc=null;else if(e){let s=Object.assign({_directives:this.directives},this.options),r=new ye(undefined,s);this.atDirectives&&this.onError(n,"MISSING_CHAR","Missing directives-end indicator line"),r.range=[0,n,n],this.decorate(r,false),yield r}}};var Qs={};Xt(Qs,{BOM:()=>Wt,DOCUMENT:()=>Ht,FLOW_END:()=>Jt,SCALAR:()=>yt,createScalarToken:()=>ji,isCollection:()=>Qa,isScalar:()=>Wa,prettyToken:()=>Ha,resolveAsScalar:()=>Ui,setScalarValue:()=>Vi,stringify:()=>Qi,tokenType:()=>Gs,visit:()=>qe});function Ui(t,e=true,n){if(t){let s=(r,i,o)=>{let a=typeof r=="number"?r:Array.isArray(r)?r[0]:r.offset;if(n)n(a,i,o);else throw new te([a,a+1],i,o)};switch(t.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return zn(t,e,s);case"block-scalar":return Xn({options:{strict:e}},t,s)}}return null}function ji(t,e){let{implicitKey:n=false,indent:s,inFlow:r=false,offset:i=-1,type:o="PLAIN"}=e,a=Oe({type:o,value:t},{implicitKey:n,indent:s>0?" ".repeat(s):"",inFlow:r,options:{blockQuote:true,lineWidth:-1}}),l=e.end??[{type:"newline",offset:-1,indent:s,source:`
118
+ `}];switch(a[0]){case"|":case">":{let c=a.indexOf(`
119
+ `),u=a.substring(0,c),f=a.substring(c+1)+`
120
+ `,p=[{type:"block-scalar-header",offset:i,indent:s,source:u}];return Gi(p,l)||p.push({type:"newline",offset:-1,indent:s,source:`
121
+ `}),{type:"block-scalar",offset:i,indent:s,props:p,source:f}}case'"':return{type:"double-quoted-scalar",offset:i,indent:s,source:a,end:l};case"'":return{type:"single-quoted-scalar",offset:i,indent:s,source:a,end:l};default:return{type:"scalar",offset:i,indent:s,source:a,end:l}}}function Vi(t,e,n={}){let{afterKey:s=false,implicitKey:r=false,inFlow:i=false,type:o}=n,a="indent"in t?t.indent:null;if(s&&typeof a=="number"&&(a+=2),!o)switch(t.type){case"single-quoted-scalar":o="QUOTE_SINGLE";break;case"double-quoted-scalar":o="QUOTE_DOUBLE";break;case"block-scalar":{let c=t.props[0];if(c.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o=c.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:o="PLAIN"}let l=Oe({type:o,value:e},{implicitKey:r||a===null,indent:a!==null&&a>0?" ".repeat(a):"",inFlow:i,options:{blockQuote:true,lineWidth:-1}});switch(l[0]){case"|":case">":Va(t,l);break;case'"':js(t,l,"double-quoted-scalar");break;case"'":js(t,l,"single-quoted-scalar");break;default:js(t,l,"scalar")}}function Va(t,e){let n=e.indexOf(`
122
+ `),s=e.substring(0,n),r=e.substring(n+1)+`
123
+ `;if(t.type==="block-scalar"){let i=t.props[0];if(i.type!=="block-scalar-header")throw new Error("Invalid block scalar header");i.source=s,t.source=r}else{let{offset:i}=t,o="indent"in t?t.indent:-1,a=[{type:"block-scalar-header",offset:i,indent:o,source:s}];Gi(a,"end"in t?t.end:undefined)||a.push({type:"newline",offset:-1,indent:o,source:`
124
+ `});for(let l of Object.keys(t))l!=="type"&&l!=="offset"&&delete t[l];Object.assign(t,{type:"block-scalar",indent:o,props:a,source:r})}}function Gi(t,e){if(e)for(let n of e)switch(n.type){case"space":case"comment":t.push(n);break;case"newline":return t.push(n),true}return false}function js(t,e,n){switch(t.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":t.type=n,t.source=e;break;case"block-scalar":{let s=t.props.slice(1),r=e.length;t.props[0].type==="block-scalar-header"&&(r-=t.props[0].source.length);for(let i of s)i.offset+=r;delete t.props,Object.assign(t,{type:n,source:e,end:s});break}case"block-map":case"block-seq":{let r={type:"newline",offset:t.offset+e.length,indent:t.indent,source:`
125
+ `};delete t.items,Object.assign(t,{type:n,source:e,end:[r]});break}default:{let s="indent"in t?t.indent:-1,r="end"in t&&Array.isArray(t.end)?t.end.filter((i)=>i.type==="space"||i.type==="comment"||i.type==="newline"):[];for(let i of Object.keys(t))i!=="type"&&i!=="offset"&&delete t[i];Object.assign(t,{type:n,indent:s,source:e,end:r})}}}var Qi=(t)=>("type"in t)?ts(t):es(t);function ts(t){switch(t.type){case"block-scalar":{let e="";for(let n of t.props)e+=ts(n);return e+t.source}case"block-map":case"block-seq":{let e="";for(let n of t.items)e+=es(n);return e}case"flow-collection":{let e=t.start.source;for(let n of t.items)e+=es(n);for(let n of t.end)e+=n.source;return e}case"document":{let e=es(t);if(t.end)for(let n of t.end)e+=n.source;return e}default:{let e=t.source;if("end"in t&&t.end)for(let n of t.end)e+=n.source;return e}}}function es({start:t,key:e,sep:n,value:s}){let r="";for(let i of t)r+=i.source;if(e&&(r+=ts(e)),n)for(let i of n)r+=i.source;return s&&(r+=ts(s)),r}var Vs=Symbol("break visit"),Ga=Symbol("skip children"),Wi=Symbol("remove item");function qe(t,e){"type"in t&&t.type==="document"&&(t={start:t.start,value:t.value}),Hi(Object.freeze([]),t,e)}qe.BREAK=Vs;qe.SKIP=Ga;qe.REMOVE=Wi;qe.itemAtPath=(t,e)=>{let n=t;for(let[s,r]of e){let i=n?.[s];if(i&&"items"in i)n=i.items[r];else return}return n};qe.parentCollection=(t,e)=>{let n=qe.itemAtPath(t,e.slice(0,-1)),s=e[e.length-1][0],r=n?.[s];if(r&&"items"in r)return r;throw new Error("Parent collection not found")};function Hi(t,e,n){let s=n(e,t);if(typeof s=="symbol")return s;for(let r of["key","value"]){let i=e[r];if(i&&"items"in i){for(let o=0;o<i.items.length;++o){let a=Hi(Object.freeze(t.concat([[r,o]])),i.items[o],n);if(typeof a=="number")o=a-1;else{if(a===Vs)return Vs;a===Wi&&(i.items.splice(o,1),o-=1)}}typeof s=="function"&&r==="key"&&(s=s(e,t))}}return typeof s=="function"?s(e,t):s}var Wt="\uFEFF",Ht="\x02",Jt="\x18",yt="\x1F",Qa=(t)=>!!t&&("items"in t),Wa=(t)=>!!t&&(t.type==="scalar"||t.type==="single-quoted-scalar"||t.type==="double-quoted-scalar"||t.type==="block-scalar");function Ha(t){switch(t){case Wt:return"<BOM>";case Ht:return"<DOC>";case Jt:return"<FLOW_END>";case yt:return"<SCALAR>";default:return JSON.stringify(t)}}function Gs(t){switch(t){case Wt:return"byte-order-mark";case Ht:return"doc-mode";case Jt:return"flow-error-end";case yt:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
126
+ `:case`\r
127
+ `:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(t[0]){case" ":case"\t":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}function ue(t){switch(t){case undefined:case" ":case`
128
+ `:case"\r":case"\t":return true;default:return false}}var Ji=new Set("0123456789ABCDEFabcdef"),Ja=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),ns=new Set(",[]{}"),Xa=new Set(` ,[]{}
129
+ \r `),Ws=(t)=>!t||Xa.has(t),bt=class{constructor(){this.atEnd=false,this.blockScalarIndent=-1,this.blockScalarKeep=false,this.buffer="",this.flowKey=false,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,n=false){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=!n;let s=this.next??"stream";for(;s&&(n||this.hasChars(1));)s=yield*this.parseNext(s)}atLineEnd(){let e=this.pos,n=this.buffer[e];for(;n===" "||n==="\t";)n=this.buffer[++e];return!n||n==="#"||n===`
130
+ `?true:n==="\r"?this.buffer[e+1]===`
131
+ `:false}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let n=this.buffer[e];if(this.indentNext>0){let s=0;for(;n===" ";)n=this.buffer[++s+e];if(n==="\r"){let r=this.buffer[s+e+1];if(r===`
132
+ `||!r&&!this.atEnd)return e+s+1}return n===`
133
+ `||s>=this.indentNext||!n&&!this.atEnd?e+s:-1}if(n==="-"||n==="."){let s=this.buffer.substr(e,3);if((s==="---"||s==="...")&&ue(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(`
134
+ `,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]===Wt&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let n=e.length,s=e.indexOf("#");for(;s!==-1;){let i=e[s-1];if(i===" "||i==="\t"){n=s-1;break}else s=e.indexOf("#",s+1)}for(;;){let i=e[n-1];if(i===" "||i==="\t")n-=1;else break}let r=(yield*this.pushCount(n))+(yield*this.pushSpaces(true));return yield*this.pushCount(e.length-r),this.pushNewline(),"stream"}if(this.atLineEnd()){let n=yield*this.pushSpaces(true);return yield*this.pushCount(e.length-n),yield*this.pushNewline(),"stream"}return yield Ht,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 n=this.peek(3);if((n==="---"||n==="...")&&ue(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,n==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(false),this.indentNext>this.indentValue&&!ue(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,n]=this.peek(2);if(!n&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&ue(n)){let s=(yield*this.pushCount(1))+(yield*this.pushSpaces(true));return this.indentNext=this.indentValue+1,this.indentValue+=s,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(true);let e=this.getLine();if(e===null)return this.setNext("doc");let n=yield*this.pushIndicators();switch(e[n]){case"#":yield*this.pushCount(e.length-n);case undefined:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=false,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(Ws),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return n+=yield*this.parseBlockScalarHeader(),n+=yield*this.pushSpaces(true),yield*this.pushCount(e.length-n),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,n,s=-1;do e=yield*this.pushNewline(),e>0?(n=yield*this.pushSpaces(false),this.indentValue=s=n):n=0,n+=yield*this.pushSpaces(true);while(e+n>0);let r=this.getLine();if(r===null)return this.setNext("flow");if((s!==-1&&s<this.indentNext&&r[0]!=="#"||s===0&&(r.startsWith("---")||r.startsWith("..."))&&ue(r[3]))&&!(s===this.indentNext-1&&this.flowLevel===1&&(r[0]==="]"||r[0]==="}")))return this.flowLevel=0,yield Jt,yield*this.parseLineStart();let i=0;for(;r[i]===",";)i+=yield*this.pushCount(1),i+=yield*this.pushSpaces(true),this.flowKey=false;switch(i+=yield*this.pushIndicators(),r[i]){case undefined:return"flow";case"#":return yield*this.pushCount(r.length-i),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=false,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=true,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(Ws),"flow";case'"':case"'":return this.flowKey=true,yield*this.parseQuotedScalar();case":":{let o=this.charAt(1);if(this.flowKey||ue(o)||o===",")return this.flowKey=false,yield*this.pushCount(1),yield*this.pushSpaces(true),"flow"}default:return this.flowKey=false,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),n=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;n!==-1&&this.buffer[n+1]==="'";)n=this.buffer.indexOf("'",n+2);else for(;n!==-1;){let i=0;for(;this.buffer[n-1-i]==="\\";)i+=1;if(i%2===0)break;n=this.buffer.indexOf('"',n+1)}let s=this.buffer.substring(0,n),r=s.indexOf(`
135
+ `,this.pos);if(r!==-1){for(;r!==-1;){let i=this.continueScalar(r+1);if(i===-1)break;r=s.indexOf(`
136
+ `,i)}r!==-1&&(n=r-(s[r-1]==="\r"?2:1))}if(n===-1){if(!this.atEnd)return this.setNext("quoted-scalar");n=this.buffer.length}return yield*this.pushToIndex(n+1,false),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=false;let e=this.pos;for(;;){let n=this.buffer[++e];if(n==="+")this.blockScalarKeep=true;else if(n>"0"&&n<="9")this.blockScalarIndent=Number(n)-1;else if(n!=="-")break}return yield*this.pushUntil((n)=>ue(n)||n==="#")}*parseBlockScalar(){let e=this.pos-1,n=0,s;e:for(let i=this.pos;s=this.buffer[i];++i)switch(s){case" ":n+=1;break;case`
137
+ `:e=i,n=0;break;case"\r":{let o=this.buffer[i+1];if(!o&&!this.atEnd)return this.setNext("block-scalar");if(o===`
138
+ `)break}default:break e}if(!s&&!this.atEnd)return this.setNext("block-scalar");if(n>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=n:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let i=this.continueScalar(e+1);if(i===-1)break;e=this.buffer.indexOf(`
139
+ `,i)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let r=e+1;for(s=this.buffer[r];s===" ";)s=this.buffer[++r];if(s==="\t"){for(;s==="\t"||s===" "||s==="\r"||s===`
140
+ `;)s=this.buffer[++r];e=r-1}else if(!this.blockScalarKeep)do{let i=e-1,o=this.buffer[i];o==="\r"&&(o=this.buffer[--i]);let a=i;for(;o===" ";)o=this.buffer[--i];if(o===`
141
+ `&&i>=this.pos&&i+1+n>a)e=i;else break}while(true);return yield yt,yield*this.pushToIndex(e+1,true),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,n=this.pos-1,s=this.pos-1,r;for(;r=this.buffer[++s];)if(r===":"){let i=this.buffer[s+1];if(ue(i)||e&&ns.has(i))break;n=s}else if(ue(r)){let i=this.buffer[s+1];if(r==="\r"&&(i===`
142
+ `?(s+=1,r=`
143
+ `,i=this.buffer[s+1]):n=s),i==="#"||e&&ns.has(i))break;if(r===`
144
+ `){let o=this.continueScalar(s+1);if(o===-1)break;s=Math.max(s,o-2)}}else{if(e&&ns.has(r))break;n=s}return!r&&!this.atEnd?this.setNext("plain-scalar"):(yield yt,yield*this.pushToIndex(n+1,true),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,n){let s=this.buffer.slice(this.pos,e);return s?(yield s,this.pos+=s.length,s.length):(n&&(yield""),0)}*pushIndicators(){let e=0;e:for(;;){switch(this.charAt(0)){case"!":e+=yield*this.pushTag(),e+=yield*this.pushSpaces(true);continue e;case"&":e+=yield*this.pushUntil(Ws),e+=yield*this.pushSpaces(true);continue e;case"-":case"?":case":":{let n=this.flowLevel>0,s=this.charAt(1);if(ue(s)||n&&ns.has(s)){n?this.flowKey&&(this.flowKey=false):this.indentNext=this.indentValue+1,e+=yield*this.pushCount(1),e+=yield*this.pushSpaces(true);continue e}}}break e}return e}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,n=this.buffer[e];for(;!ue(n)&&n!==">";)n=this.buffer[++e];return yield*this.pushToIndex(n===">"?e+1:e,false)}else{let e=this.pos+1,n=this.buffer[e];for(;n;)if(Ja.has(n))n=this.buffer[++e];else if(n==="%"&&Ji.has(this.buffer[e+1])&&Ji.has(this.buffer[e+2]))n=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,false)}}*pushNewline(){let e=this.buffer[this.pos];return e===`
145
+ `?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
146
+ `?yield*this.pushCount(2):0}*pushSpaces(e){let n=this.pos-1,s;do s=this.buffer[++n];while(s===" "||e&&s==="\t");let r=n-this.pos;return r>0&&(yield this.buffer.substr(this.pos,r),this.pos=n),r}*pushUntil(e){let n=this.pos,s=this.buffer[n];for(;!e(s);)s=this.buffer[++n];return yield*this.pushToIndex(n,false)}};var Fe=class{constructor(){this.lineStarts=[],this.addNewLine=(e)=>this.lineStarts.push(e),this.linePos=(e)=>{let n=0,s=this.lineStarts.length;for(;n<s;){let i=n+s>>1;this.lineStarts[i]<e?n=i+1:s=i}if(this.lineStarts[n]===e)return{line:n+1,col:1};if(n===0)return{line:0,col:e};let r=this.lineStarts[n-1];return{line:n,col:e-r+1}}}};function Ke(t,e){for(let n=0;n<t.length;++n)if(t[n].type===e)return true;return false}function Xi(t){for(let e=0;e<t.length;++e)switch(t[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function Zi(t){switch(t?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return true;default:return false}}function ss(t){switch(t.type){case"document":return t.start;case"block-map":{let e=t.items[t.items.length-1];return e.sep??e.start}case"block-seq":return t.items[t.items.length-1].start;default:return[]}}function wt(t){if(t.length===0)return[];let e=t.length;e:for(;--e>=0;)switch(t[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;t[++e]?.type==="space";);return t.splice(e,t.length)}function rs(t,e){if(e.length<1e5)Array.prototype.push.apply(t,e);else for(let n=0;n<e.length;++n)t.push(e[n])}function zi(t){if(t.start.type==="flow-seq-start")for(let e of t.items)e.sep&&!e.value&&!Ke(e.start,"explicit-key-ind")&&!Ke(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,Zi(e.value)?e.value.end?rs(e.value.end,e.sep):e.value.end=e.sep:rs(e.start,e.sep),delete e.sep)}var Le=class{constructor(e){this.atNewLine=true,this.atScalar=false,this.indent=0,this.offset=0,this.onKeyLine=false,this.stack=[],this.source="",this.type="",this.lexer=new bt,this.onNewLine=e}*parse(e,n=false){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let s of this.lexer.lex(e,n))yield*this.next(s);n||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=false,yield*this.step(),this.offset+=e.length;return}let n=Gs(e);if(n)if(n==="scalar")this.atNewLine=false,this.atScalar=true,this.type="scalar";else{switch(this.type=n,yield*this.step(),n){case"newline":this.atNewLine=true,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=false}this.offset+=e.length}else{let s=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:s,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 n=e??this.stack.pop();if(!n)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield n;else{let s=this.peek(1);switch(n.type==="block-scalar"?n.indent="indent"in s?s.indent:0:n.type==="flow-collection"&&s.type==="document"&&(n.indent=0),n.type==="flow-collection"&&zi(n),s.type){case"document":s.value=n;break;case"block-scalar":s.props.push(n);break;case"block-map":{let r=s.items[s.items.length-1];if(r.value){s.items.push({start:[],key:n,sep:[]}),this.onKeyLine=true;return}else if(r.sep)r.value=n;else{Object.assign(r,{key:n,sep:[]}),this.onKeyLine=!r.explicitKey;return}break}case"block-seq":{let r=s.items[s.items.length-1];r.value?s.items.push({start:[],value:n}):r.value=n;break}case"flow-collection":{let r=s.items[s.items.length-1];!r||r.value?s.items.push({start:[],key:n,sep:[]}):r.sep?r.value=n:Object.assign(r,{key:n,sep:[]});return}default:yield*this.pop(),yield*this.pop(n)}if((s.type==="document"||s.type==="block-map"||s.type==="block-seq")&&(n.type==="block-map"||n.type==="block-seq")){let r=n.items[n.items.length-1];r&&!r.sep&&!r.value&&r.start.length>0&&Xi(r.start)===-1&&(n.indent===0||r.start.every((i)=>i.type!=="comment"||i.indent<n.indent))&&(s.type==="document"?s.end=r.start:s.items.push({start:r.start}),n.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":{Xi(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 n=this.startBlockValue(e);n?this.stack.push(n):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 n=ss(this.peek(2)),s=wt(n),r;e.end?(r=e.end,r.push(this.sourceToken),delete e.end):r=[this.sourceToken];let i={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:s,key:e,sep:r}]};this.onKeyLine=true,this.stack[this.stack.length-1]=i}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=true,this.indent=0,this.onNewLine){let n=this.source.indexOf(`
147
+ `)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
148
+ `,n)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let n=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=false,n.value){let s="end"in n.value?n.value.end:undefined;(Array.isArray(s)?s[s.length-1]:undefined)?.type==="comment"?s?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)e.items.push({start:[this.sourceToken]});else if(n.sep)n.sep.push(this.sourceToken);else{if(this.atIndentedComment(n.start,e.indent)){let r=e.items[e.items.length-2]?.value?.end;if(Array.isArray(r)){rs(r,n.start),r.push(this.sourceToken),e.items.pop();return}}n.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let s=!this.onKeyLine&&this.indent===e.indent,r=s&&(n.sep||n.explicitKey)&&this.type!=="seq-item-ind",i=[];if(r&&n.sep&&!n.value){let o=[];for(let a=0;a<n.sep.length;++a){let l=n.sep[a];switch(l.type){case"newline":o.push(a);break;case"space":break;case"comment":l.indent>e.indent&&(o.length=0);break;default:o.length=0}}o.length>=2&&(i=n.sep.splice(o[1]))}switch(this.type){case"anchor":case"tag":r||n.value?(i.push(this.sourceToken),e.items.push({start:i}),this.onKeyLine=true):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"explicit-key-ind":!n.sep&&!n.explicitKey?(n.start.push(this.sourceToken),n.explicitKey=true):r||n.value?(i.push(this.sourceToken),e.items.push({start:i,explicitKey:true})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:true}]}),this.onKeyLine=true;return;case"map-value-ind":if(n.explicitKey)if(n.sep)if(n.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Ke(n.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]});else if(Zi(n.key)&&!Ke(n.sep,"newline")){let o=wt(n.start),{key:a,sep:l}=n;l.push(this.sourceToken),delete n.key,delete n.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:a,sep:l}]})}else i.length>0?n.sep=n.sep.concat(i,this.sourceToken):n.sep.push(this.sourceToken);else if(Ke(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{let o=wt(n.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]})}else n.sep?n.value||r?e.items.push({start:i,key:null,sep:[this.sourceToken]}):Ke(n.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});this.onKeyLine=true;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let o=this.flowScalar(this.type);r||n.value?(e.items.push({start:i,key:o,sep:[]}),this.onKeyLine=true):n.sep?this.stack.push(o):(Object.assign(n,{key:o,sep:[]}),this.onKeyLine=true);return}default:{let o=this.startBlockValue(e);if(o){if(o.type==="block-seq"){if(!n.explicitKey&&n.sep&&!Ke(n.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 s&&e.items.push({start:i});this.stack.push(o);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let n=e.items[e.items.length-1];switch(this.type){case"newline":if(n.value){let s="end"in n.value?n.value.end:undefined;(Array.isArray(s)?s[s.length-1]:undefined)?.type==="comment"?s?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(n.start,e.indent)){let r=e.items[e.items.length-2]?.value?.end;if(Array.isArray(r)){rs(r,n.start),r.push(this.sourceToken),e.items.pop();return}}n.start.push(this.sourceToken)}return;case"anchor":case"tag":if(n.value||this.indent<=e.indent)break;n.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;n.value||Ke(n.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return}if(this.indent>e.indent){let s=this.startBlockValue(e);if(s){this.stack.push(s);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let n=e.items[e.items.length-1];if(this.type==="flow-error-end"){let s;do yield*this.pop(),s=this.peek(1);while(s?.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!n||n.sep?e.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return;case"map-value-ind":!n||n.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!n||n.value?e.items.push({start:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let r=this.flowScalar(this.type);!n||n.value?e.items.push({start:[],key:r,sep:[]}):n.sep?this.stack.push(r):Object.assign(n,{key:r,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}let s=this.startBlockValue(e);s?this.stack.push(s):(yield*this.pop(),yield*this.step())}else{let s=this.peek(2);if(s.type==="block-map"&&(this.type==="map-value-ind"&&s.indent===e.indent||this.type==="newline"&&!s.items[s.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&s.type!=="flow-collection"){let r=ss(s),i=wt(r);zi(e);let o=e.end.splice(1,e.end.length);o.push(this.sourceToken);let a={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:i,key:e,sep:o}]};this.onKeyLine=true,this.stack[this.stack.length-1]=a}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let n=this.source.indexOf(`
149
+ `)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
150
+ `,n)+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=true;let n=ss(e),s=wt(n);return s.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,explicitKey:true}]}}case"map-value-ind":{this.onKeyLine=true;let n=ss(e),s=wt(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,n){return this.type!=="comment"||this.indent<=n?false:e.every((s)=>s.type==="newline"||s.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=false;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};function eo(t){let e=t.prettyErrors!==false;return{lineCounter:t.lineCounter||e&&new Fe||null,prettyErrors:e}}function to(t,e={}){let{lineCounter:n,prettyErrors:s}=eo(e),r=new Le(n?.addNewLine),i=new Ie(e),o=Array.from(i.compose(r.parse(t)));if(s&&n)for(let a of o)a.errors.forEach(Vt(t,n)),a.warnings.forEach(Vt(t,n));return o.length>0?o:Object.assign([],{empty:true},i.streamInfo())}function Hs(t,e={}){let{lineCounter:n,prettyErrors:s}=eo(e),r=new Le(n?.addNewLine),i=new Ie(e),o=null;for(let a of i.compose(r.parse(t),true,t.length))if(!o)o=a;else if(o.options.logLevel!=="silent"){o.errors.push(new te(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return s&&n&&(o.errors.forEach(Vt(t,n)),o.warnings.forEach(Vt(t,n))),o}function no(t,e,n){let s;typeof e=="function"?s=e:n===undefined&&e&&typeof e=="object"&&(n=e);let r=Hs(t,n);if(!r)return null;if(r.warnings.forEach((i)=>vn(r.options.logLevel,i)),r.errors.length>0){if(r.options.logLevel!=="silent")throw r.errors[0];r.errors=[]}return r.toJS(Object.assign({reviver:s},n))}function so(t,e,n){let s=null;if(typeof e=="function"||Array.isArray(e)?s=e:n===undefined&&e&&(n=e),typeof n=="string"&&(n=n.length),typeof n=="number"){let r=Math.round(n);n=r<1?undefined:r>8?{indent:8}:{indent:r}}if(t===undefined){let{keepUndefined:r}=n??e??{};if(!r)return}return ne(t)&&!s?t.toString(n):new ye(t,s,n).toString(n)}var ro=Js;function io(t,e,n){let s=t.srcToken;if(!s||s.type!=="flow-collection")throw new Error("Expected flow-collection CST node for flow sequence");let r=t.items.map((o,a)=>{let l=s.items[a];if(za(o,l)){let c=ie(o.items);return Ne(c,l,e,vt)}if(T(o))return Ne(o,l,e,vt);{let c=[];for(let f of R(l.start)){if(Ce(f)){c.push(f);continue}if(f.type==="comma")continue;throw new Error(`Unexpected token type in sequence item start: ${f.type}`)}let u=e.transformNode(o,{tokens:c});return oi(Z(u.position.start,u.position.end),u)}});if(t.items.length<s.items.length)for(let o=t.items.length;o<s.items.length;o++){let a=s.items[o];for(let l of D(a.start,e)){if(l.type==="comma")continue;throw new Error(`Unexpected token type in collection item start: ${l.type}`)}}let i=null;for(let o of R(s.end)){if(o.type==="comment"){e.transformComment(o);continue}if(o.type==="flow-seq-end"){i=o;continue}throw new Error(`Unexpected token type in flow seq end: ${o.type}`)}if(!i)throw new Error("Expected flow-seq-end token");return ii(e.transformRange([s.start.offset,i.offset+i.source.length]),e.transformContentProperties(t,n.tokens),r)}function za(t,e){if(t.srcToken)return false;if(!j(t))return false;return t.items.length!==1?false:t.items[0].srcToken===e}function os(t,e,n){return{type:"mapping",position:t,leadingComments:[],...e,children:n}}function as(t,e,n){return{type:"mappingItem",position:t,leadingComments:[],children:[e,n]}}function oo(t,e,n){let s=t.srcToken;if(!s||s.type!=="block-map")throw new Error("Expected block mapping srcToken");let r=t.items.map((i,o)=>{let a=s.items[o];return Ne(i,a,e,as)});if(t.items.length<s.items.length)for(let i=t.items.length;i<s.items.length;i++){let o=s.items[i];for(let a of D(o.start,e))throw new Error(`Unexpected token type in collection item start: ${a.type}`)}return os(Z(r[0].position.start,ie(r).position.end),e.transformContentProperties(t,n.tokens),r)}function Xs(t,e,n){return{type:"plain",position:t,leadingComments:[],trailingComment:null,...e,value:n}}function ao(t,e,n){for(let s=e;s>=0;s--)if(n.test(t[s]))return s;return-1}function lo(t,e,n){if(t.range[0]===t.range[1]){let r=ao(e.text,t.range[0]-1,/\S/u)+1;return Xs(e.transformRange([r,r]),e.transformContentProperties(t,n.tokens),"")}let s=t.srcToken;if(!s||s.type!=="scalar")throw new Error("Expected plain scalar srcToken");for(let r of D(s.end,e))throw new Error(`Unexpected token type in plain scalar end: ${r.type}`);return Xs(e.transformRange(t.range),e.transformContentProperties(t,n.tokens),t.source)}function co(t){return{...t,type:"quoteDouble"}}function fo(t,e,n){return{type:"quoteValue",position:t,...e,leadingComments:[],trailingComment:null,value:n}}function ls(t,e,n,s){for(let r of D(e.end,n))throw new Error(`Unexpected token type in quote value end: ${r.type}`);return fo(n.transformRange(t.range),n.transformContentProperties(t,s.tokens),t.source)}function uo(t,e,n){let s=t.srcToken;if(!s||s.type!=="double-quoted-scalar")throw new Error("Expected double-quoted scalar srcToken");return co(ls(t,s,e,n))}function po(t){return{...t,type:"quoteSingle"}}function mo(t,e,n){let s=t.srcToken;if(!s||s.type!=="single-quoted-scalar")throw new Error("Expected single-quoted scalar srcToken");return po(ls(t,s,e,n))}function ho(t,e,n){return{type:"sequence",position:t,leadingComments:[],endComments:[],...e,children:n}}function go(t,e){return{type:"sequenceItem",position:t,leadingComments:[],trailingComment:null,endComments:[],children:e?[e]:[]}}function yo(t,e,n){let s=t.srcToken;if(!s||s.type!=="block-seq")throw new Error("Expected block sequence srcToken");let r=t.items.map((i,o)=>{let a=s.items[o],l=[],c=null;for(let f of R(a.start)){if(Ce(f)){l.push(f);continue}if(f.type==="seq-item-ind"){c=f;continue}throw new Error(`Unexpected token type in sequence item start: ${f.type}`)}let u=Za(i,e,{tokens:l});return go(Z(c?e.transformOffset(c.offset):u.position.start,u?.position.end??e.transformOffset(c.offset+c.source.length)),u)});if(t.items.length<s.items.length)for(let i=t.items.length;i<s.items.length;i++){let o=s.items[i];for(let a of D(o.start,e))throw new Error(`Unexpected token type in collection item start: ${a.type}`)}return ho(Z(r[0].position.start,ie(r).position.end),e.transformContentProperties(t,n.tokens),r)}function Za(t,e,n){if(!T(t))return Dt(t,n)?(D(n.tokens,e),null):e.transformNode(t,n);let s=t.srcToken,r=Ne(t,s,e,as);return os(r.position,e.transformContentProperties(t.key,n.tokens),[r])}function bo(t,e,n){if(t==null)return null;if(H(t))return Jr(t,e,n);if(j(t))return t.flow?ri(t,e,n):oo(t,e,n);if(J(t))return t.flow?io(t,e,n):yo(t,e,n);if(C(t)){switch(t.type){case"BLOCK_FOLDED":return Zr(t,e,n);case"BLOCK_LITERAL":return ti(t,e,n);case"PLAIN":return lo(t,e,n);case"QUOTE_DOUBLE":return uo(t,e,n);case"QUOTE_SINGLE":return mo(t,e,n)}throw new Error(`Unexpected scalar type: ${t.type}`)}throw new Error("Unexpected unknown node type")}function Dt(t,e){return!t||t.range[0]===t.range[1]&&e.tokens.every((n)=>n.type==="comment")}var wo=class{text;comments=[];#e;constructor(t,e){this.text=t,this.#e=e}transformOffset(t){let{line:e,col:n}=this.#e.linePos(t);return{line:e,column:n,offset:t}}transformRange(t){let[e,n]=t.map((s)=>this.transformOffset(s));return Z(e,n)}transformNode(t,e){return bo(t,this,e)}transformComment(t){let e=jr(t,this);return this.comments.push(e),e}transformContentProperties(t,e){return Wr(t,e,this)}};function ko(t,e,n,s,r,i){return{type:"document",position:t,trailingComment:i,directivesEndMarker:e,documentEndMarker:n,children:[s,r]}}function So(t,e,n){return{type:"documentBody",position:t,endComments:n,children:e?[e]:[]}}function Eo(t,e,n){for(let s=e;s<t.length;s++)if(n.test(t[s]))return s;return null}function Co(t,e,n,s,r,i,o){let{documentTrailingComment:a,endComments:l,propTokens:c}=el(e,n,r,i,o),u=s.contents&&(s.contents.range[0]<s.contents.range[1]||c.some((g)=>g.type==="tag"||g.type==="anchor")),f=u?o.transformNode(s.contents,{tokens:c}):null;if(!u)for(let g of D(c,o))throw new Error(`Unexpected token type in empty document body: ${g.type}`);let{position:p,documentEndPoint:h}=tl(t,s,f,i,o);return{documentBody:So(p,f,l),documentEndPoint:h,documentTrailingComment:a}}function el(t,e,n,s,r){let i=[],o=[],a=[];for(let c of t){if(Ce(c)){a.push(c);continue}throw new Error(`Unexpected token type: ${c.type}`)}for(let c of D(n,r))throw new Error(`Unexpected token type: ${c.type}`);let l=s?r.transformOffset(s.offset):null;if(e)for(let c of R(e.end,s?.end)){if(c.type==="comment"){let u=r.transformComment(c);l?l.line===u.position.start.line?o.push(u):u.position.start.line<l.line&&i.push(u):i.push(u);continue}throw new Error(`Unexpected token type: ${c.type}`)}if(o.length>1)throw new Error(`Unexpected multiple document trailing comments at ${De(o[1].position.start)}`);return{propTokens:a,endComments:i,documentTrailingComment:ie(o)||null}}function tl(t,e,n,s,r){let i=s?Math.max(0,s.offset-1):Eo(r.text,e.range[2],/\S/u)??r.text.length;r.text[i-1]==="\r"&&i--;let o=n!==null?n.position.start.offset:i;if(t){let l=t.offset+t.source.length+1;o<l&&l<=i&&(o=l)}let a=r.transformRange([o,i]);return{position:a,documentEndPoint:s?r.transformOffset(s.offset+s.source.length):a.end}}function No(t,e,n,s){return{type:"documentHead",position:t,endComments:n,trailingComment:s,children:e}}function Ao(t,e,n){return{type:"directive",position:t,leadingComments:[],trailingComment:null,name:e,parameters:n}}function To(t,e){let n=t.source.trim().split(/[\t ]+/),s=n.shift().replace(/^%/,"");return Ao(e.transformRange([t.offset,t.offset+t.source.length]),s,n)}function Oo(t,e,n,s){let{directives:r,endCommentCandidates:i}=nl(t,s),o=[],a=null;if(e){for(let u of R(e.start))if(o.push(u),!a&&u.type==="doc-start"){for(let f of o)if(f.type==="comment"){let p=s.transformComment(f);i.push(p)}o=[],a=u}}let l=sl(r,n,a,s),c=null;if(a&&o.length>0){let u=o[0];u.type==="comment"&&s.transformOffset(u.offset).line===l.end.line&&(c=s.transformComment(u),o.shift())}return{documentHead:No(l,r,a?i:[],c),docStart:a,tokensBeforeBody:o}}function nl(t,e){let n=[],s=[],r=null;for(let i of t)if(i.type==="comment"){let o=e.transformComment(i);r&&r.position.end.line===o.position.start.line&&!r.trailingComment?(r.trailingComment=o,r.position.end=o.position.end):s.push(o)}else{let o=To(i,e);n.push(o),r=o,s=[]}return{directives:n,endCommentCandidates:s}}function sl(t,e,n,s){let r=n?[n.offset,n.offset+n.source.length]:e.contents?[e.contents.range[0],e.contents.range[0]]:[e.range[0],e.range[0]];return t.length!==0&&(r[0]=t[0].position.start.offset),s.transformRange(r)}function _o(t,e){let{documentHead:n,tokensBeforeBody:s,docStart:r}=Oo(t.tokensBeforeBody,t.cstNode,t.node,e),{documentBody:i,documentEndPoint:o,documentTrailingComment:a}=Co(r,s,t.cstNode,t.node,t.tokensAfterBody,t.documentEnd,e);return ko(Z(n.position.start,o),!!r,!!t.documentEnd,n,i,a)}function Io(t,e,n){if(t.length===0)return[];let s=[],r=[],i=[],o=null,a=(l)=>{let c={tokensBeforeBody:[...i,...r],cstNode:l,node:t[s.length],tokensAfterBody:[],documentEnd:null};return s.push(c),i.length=0,r.length=0,c};for(let l of R(e)){if(l.type==="document"){if(s.length>=t.length)throw new Error(`Unexpected 'document' token at ${De(n.transformOffset(l.offset))}`);o=a(l);continue}if(l.type==="comment"){r.push(l);continue}if(l.type==="directive"){i.push(...r,l),r.length=0;continue}if(l.type==="doc-end"){if(!o||o.documentEnd)throw new Error(`Unexpected 'doc-end' token at ${De(n.transformOffset(l.offset))}`);o.tokensAfterBody=[...r],r.length=0,o.documentEnd=l;continue}}if(i.length>0){let[l]=i;throw new Error(`Unexpected '${l.type}' token at ${De(n.transformOffset(l.offset))}`)}return r.length>0&&(o||(o=a(null)),r.length>0&&(o.tokensAfterBody.push(...r),r.length=0)),s.map((l)=>_o(l,n))}function zs(t,e,n,s){let r=e(t);return(i)=>{s(r,i)&&n(t,r=i)}}function Zs(t){if(t===null||!("children"in t))return;let e=t.children;if(e.forEach(Zs),t.type==="document"){let[i,o]=t.children;i.position.start.offset===i.position.end.offset?i.position.start=i.position.end=o.position.start:o.position.start.offset===o.position.end.offset&&(o.position.start=o.position.end=i.position.end)}let n=zs(t.position,rl,il,ll),s=zs(t.position,ol,al,cl);"endComments"in t&&t.endComments.length!==0&&(n(t.endComments[0].position.start),s(ie(t.endComments).position.end));let r=e.filter((i)=>i!==null);if(r.length!==0){let i=r[0],o=ie(r);n(i.position.start),s(o.position.end),"leadingComments"in i&&i.leadingComments.length!==0&&n(i.leadingComments[0].position.start),"tag"in i&&i.tag&&n(i.tag.position.start),"anchor"in i&&i.anchor&&n(i.anchor.position.start),"trailingComment"in o&&o.trailingComment&&s(o.trailingComment.position.end)}}function rl(t){return t.start}function il(t,e){t.start=e}function ol(t){return t.end}function al(t,e){t.end=e}function ll(t,e){return e.offset<t.offset}function cl(t,e){return e.offset>t.offset}function er(t,e){let n=new Fe,s=new wo(t,n),r=new Le(n.addNewLine),i=new Ie({keepSourceTokens:true,uniqueKeys:e?.uniqueKeys,lineCounter:n,merge:true}),o=[],a=[...r.parse(t)];for(let f of i.compose(a,true,t.length)){let{errors:p}=f;if(p.length>0)throw new Pt(s,p[0]);o.push(f)}let l=Io(o,a,s),c=s.comments.sort((f,p)=>f.position.start.offset-p.position.end.offset),u=Yr(s.transformRange([0,t.length]),l,c);return qr(u),Zs(u),u}function fl(t,e){let n=new SyntaxError(t+" ("+e.loc.start.line+":"+e.loc.start.column+")");return Object.assign(n,e)}var Lo=fl;var ul={uniqueKeys:false};function pl(t){let e;try{e=er(t,ul)}catch(n){throw n instanceof Pt?Lo(n.message,{loc:n.position,cause:n}):n}return delete e.comments,e}var ml={astFormat:"yaml",parse:pl,hasPragma:Cr,hasIgnorePragma:Nr,locStart:Ye,locEnd:yr};var hl={yaml:$r};var dl=ro.parse;export{dl as __parsePrettierYamlConfig,Po as default,Br as languages,Rr as options,tr as parsers,hl as printers};
@@ -0,0 +1,2 @@
1
+ export function loadFormatter(language: string): Promise<(code: string) => Promise<string>>;
2
+ export function formatSource(code: string, language: string): Promise<string>;
@@ -0,0 +1 @@
1
+ const loaders={html:()=>import("./html-fragment.mjs"),javascript:()=>import("./languages/javascript.mjs"),css:()=>import("./languages/css.mjs"),json:()=>import("./languages/json.mjs"),typescript:()=>import("./languages/typescript.mjs"),jsx:()=>import("./languages/jsx.mjs"),tsx:()=>import("./languages/tsx.mjs"),flow:()=>import("./languages/flow.mjs"),json5:()=>import("./languages/json5.mjs"),jsonc:()=>import("./languages/jsonc.mjs"),"json-stringify":()=>import("./languages/json-stringify.mjs"),postcss:()=>import("./languages/postcss.mjs"),less:()=>import("./languages/less.mjs"),scss:()=>import("./languages/scss.mjs"),angular:()=>import("./languages/angular.mjs"),vue:()=>import("./languages/vue.mjs"),lwc:()=>import("./languages/lwc.mjs"),mjml:()=>import("./languages/mjml.mjs"),handlebars:()=>import("./languages/handlebars.mjs"),graphql:()=>import("./languages/graphql.mjs"),markdown:()=>import("./languages/markdown.mjs"),mdx:()=>import("./languages/mdx.mjs"),yaml:()=>import("./languages/yaml.mjs")};export async function loadFormatter(language){if(!Object.hasOwn(loaders,language))throw new RangeError("Unsupported formatter language: "+language);return(await loaders[language]()).formatSource}export async function formatSource(code,language){const format=await loadFormatter(language);return format(code)}