(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.yaml=e()}})(function(){"use strict";var Mi=Object.create;var mt=Object.defineProperty;var ki=Object.getOwnPropertyDescriptor;var Pi=Object.getOwnPropertyNames;var vi=Object.getPrototypeOf,Ii=Object.prototype.hasOwnProperty;var ne=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),sr=(t,e)=>{for(var n in e)mt(t,n,{get:e[n],enumerable:!0})},ir=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Pi(e))!Ii.call(t,s)&&s!==n&&mt(t,s,{get:()=>e[s],enumerable:!(r=ki(e,s))||r.enumerable});return t};var or=(t,e,n)=>(n=t!=null?Mi(vi(t)):{},ir(e||!t||!t.__esModule?mt(n,"default",{value:t,enumerable:!0}):n,t)),_i=t=>ir(mt({},"__esModule",{value:!0}),t);var ce=ne(B=>{"use strict";var ie={ANCHOR:"&",COMMENT:"#",TAG:"!",DIRECTIVES_END:"-",DOCUMENT_END:"."},st={ALIAS:"ALIAS",BLANK_LINE:"BLANK_LINE",BLOCK_FOLDED:"BLOCK_FOLDED",BLOCK_LITERAL:"BLOCK_LITERAL",COMMENT:"COMMENT",DIRECTIVE:"DIRECTIVE",DOCUMENT:"DOCUMENT",FLOW_MAP:"FLOW_MAP",FLOW_SEQ:"FLOW_SEQ",MAP:"MAP",MAP_KEY:"MAP_KEY",MAP_VALUE:"MAP_VALUE",PLAIN:"PLAIN",QUOTE_DOUBLE:"QUOTE_DOUBLE",QUOTE_SINGLE:"QUOTE_SINGLE",SEQ:"SEQ",SEQ_ITEM:"SEQ_ITEM"},po="tag:yaml.org,2002:",mo={MAP:"tag:yaml.org,2002:map",SEQ:"tag:yaml.org,2002:seq",STR:"tag:yaml.org,2002:str"};function Wr(t){let e=[0],n=t.indexOf(`
`);for(;n!==-1;)n+=1,e.push(n),n=t.indexOf(`
`,n);return e}function Kr(t){let e,n;return typeof t=="string"?(e=Wr(t),n=t):(Array.isArray(t)&&(t=t[0]),t&&t.context&&(t.lineStarts||(t.lineStarts=Wr(t.context.src)),e=t.lineStarts,n=t.context.src)),{lineStarts:e,src:n}}function Sn(t,e){if(typeof t!="number"||t<0)return null;let{lineStarts:n,src:r}=Kr(e);if(!n||!r||t>r.length)return null;for(let i=0;i<n.length;++i){let o=n[i];if(t<o)return{line:i,col:t-n[i-1]+1};if(t===o)return{line:i+1,col:1}}let s=n.length;return{line:s,col:t-n[s-1]+1}}function ho(t,e){let{lineStarts:n,src:r}=Kr(e);if(!n||!(t>=1)||t>n.length)return null;let s=n[t-1],i=n[t];for(;i&&i>s&&r[i-1]===`
`;)--i;return r.slice(s,i)}function go({start:t,end:e},n,r=80){let s=ho(t.line,n);if(!s)return null;let{col:i}=t;if(s.length>r)if(i<=r-10)s=s.substr(0,r-1)+"\u2026";else{let f=Math.round(r/2);s.length>i+f&&(s=s.substr(0,i+f-1)+"\u2026"),i-=s.length-r,s="\u2026"+s.substr(1-r)}let o=1,a="";e&&(e.line===t.line&&i+(e.col-t.col)<=r+1?o=e.col-t.col:(o=Math.min(s.length+1,r)-i,a="\u2026"));let c=i>1?" ".repeat(i-1):"",l="^".repeat(o);return`${s}
${c}${l}${a}`}var xe=class t{static copy(e){return new t(e.start,e.end)}constructor(e,n){this.start=e,this.end=n||e}isEmpty(){return typeof this.start!="number"||!this.end||this.end<=this.start}setOrigRange(e,n){let{start:r,end:s}=this;if(e.length===0||s<=e[0])return this.origStart=r,this.origEnd=s,n;let i=n;for(;i<e.length&&!(e[i]>r);)++i;this.origStart=r+i;let o=i;for(;i<e.length&&!(e[i]>=s);)++i;return this.origEnd=s+i,o}},oe=class t{static addStringTerminator(e,n,r){if(r[r.length-1]===`
`)return r;let s=t.endOfWhiteSpace(e,n);return s>=e.length||e[s]===`
`?r+`
`:r}static atDocumentBoundary(e,n,r){let s=e[n];if(!s)return!0;let i=e[n-1];if(i&&i!==`
`)return!1;if(r){if(s!==r)return!1}else if(s!==ie.DIRECTIVES_END&&s!==ie.DOCUMENT_END)return!1;let o=e[n+1],a=e[n+2];if(o!==s||a!==s)return!1;let c=e[n+3];return!c||c===`
`||c==="	"||c===" "}static endOfIdentifier(e,n){let r=e[n],s=r==="<",i=s?[`
`,"	"," ",">"]:[`
`,"	"," ","[","]","{","}",","];for(;r&&i.indexOf(r)===-1;)r=e[n+=1];return s&&r===">"&&(n+=1),n}static endOfIndent(e,n){let r=e[n];for(;r===" ";)r=e[n+=1];return n}static endOfLine(e,n){let r=e[n];for(;r&&r!==`
`;)r=e[n+=1];return n}static endOfWhiteSpace(e,n){let r=e[n];for(;r==="	"||r===" ";)r=e[n+=1];return n}static startOfLine(e,n){let r=e[n-1];if(r===`
`)return n;for(;r&&r!==`
`;)r=e[n-=1];return n+1}static endOfBlockIndent(e,n,r){let s=t.endOfIndent(e,r);if(s>r+n)return s;{let i=t.endOfWhiteSpace(e,s),o=e[i];if(!o||o===`
`)return i}return null}static atBlank(e,n,r){let s=e[n];return s===`
`||s==="	"||s===" "||r&&!s}static nextNodeIsIndented(e,n,r){return!e||n<0?!1:n>0?!0:r&&e==="-"}static normalizeOffset(e,n){let r=e[n];return r?r!==`
`&&e[n-1]===`
`?n-1:t.endOfWhiteSpace(e,n):n}static foldNewline(e,n,r){let s=0,i=!1,o="",a=e[n+1];for(;a===" "||a==="	"||a===`
`;){switch(a){case`
`:s=0,n+=1,o+=`
`;break;case"	":s<=r&&(i=!0),n=t.endOfWhiteSpace(e,n+2)-1;break;case" ":s+=1,n+=1;break}a=e[n+1]}return o||(o=" "),a&&s<=r&&(i=!0),{fold:o,offset:n,error:i}}constructor(e,n,r){Object.defineProperty(this,"context",{value:r||null,writable:!0}),this.error=null,this.range=null,this.valueRange=null,this.props=n||[],this.type=e,this.value=null}getPropValue(e,n,r){if(!this.context)return null;let{src:s}=this.context,i=this.props[e];return i&&s[i.start]===n?s.slice(i.start+(r?1:0),i.end):null}get anchor(){for(let e=0;e<this.props.length;++e){let n=this.getPropValue(e,ie.ANCHOR,!0);if(n!=null)return n}return null}get comment(){let e=[];for(let n=0;n<this.props.length;++n){let r=this.getPropValue(n,ie.COMMENT,!0);r!=null&&e.push(r)}return e.length>0?e.join(`
`):null}commentHasRequiredWhitespace(e){let{src:n}=this.context;if(this.header&&e===this.header.end||!this.valueRange)return!1;let{end:r}=this.valueRange;return e!==r||t.atBlank(n,r-1)}get hasComment(){if(this.context){let{src:e}=this.context;for(let n=0;n<this.props.length;++n)if(e[this.props[n].start]===ie.COMMENT)return!0}return!1}get hasProps(){if(this.context){let{src:e}=this.context;for(let n=0;n<this.props.length;++n)if(e[this.props[n].start]!==ie.COMMENT)return!0}return!1}get includesTrailingLines(){return!1}get jsonLike(){return[st.FLOW_MAP,st.FLOW_SEQ,st.QUOTE_DOUBLE,st.QUOTE_SINGLE].indexOf(this.type)!==-1}get rangeAsLinePos(){if(!this.range||!this.context)return;let e=Sn(this.range.start,this.context.root);if(!e)return;let n=Sn(this.range.end,this.context.root);return{start:e,end:n}}get rawValue(){if(!this.valueRange||!this.context)return null;let{start:e,end:n}=this.valueRange;return this.context.src.slice(e,n)}get tag(){for(let e=0;e<this.props.length;++e){let n=this.getPropValue(e,ie.TAG,!1);if(n!=null){if(n[1]==="<")return{verbatim:n.slice(2,-1)};{let[r,s,i]=n.match(/^(.*!)([^!]*)$/);return{handle:s,suffix:i}}}}return null}get valueRangeContainsNewline(){if(!this.valueRange||!this.context)return!1;let{start:e,end:n}=this.valueRange,{src:r}=this.context;for(let s=e;s<n;++s)if(r[s]===`
`)return!0;return!1}parseComment(e){let{src:n}=this.context;if(n[e]===ie.COMMENT){let r=t.endOfLine(n,e+1),s=new xe(e,r);return this.props.push(s),r}return e}setOrigRanges(e,n){return this.range&&(n=this.range.setOrigRange(e,n)),this.valueRange&&this.valueRange.setOrigRange(e,n),this.props.forEach(r=>r.setOrigRange(e,n)),n}toString(){let{context:{src:e},range:n,value:r}=this;if(r!=null)return r;let s=e.slice(n.start,n.end);return t.addStringTerminator(e,n.end,s)}},ge=class extends Error{constructor(e,n,r){if(!r||!(n instanceof oe))throw new Error(`Invalid arguments for new ${e}`);super(),this.name=e,this.message=r,this.source=n}makePretty(){if(!this.source)return;this.nodeType=this.source.type;let e=this.source.context&&this.source.context.root;if(typeof this.offset=="number"){this.range=new xe(this.offset,this.offset+1);let n=e&&Sn(this.offset,e);if(n){let r={line:n.line,col:n.col+1};this.linePos={start:n,end:r}}delete this.offset}else this.range=this.source.range,this.linePos=this.source.rangeAsLinePos;if(this.linePos){let{line:n,col:r}=this.linePos.start;this.message+=` at line ${n}, column ${r}`;let s=e&&go(this.linePos,e);s&&(this.message+=`:

${s}
`)}delete this.source}},wn=class extends ge{constructor(e,n){super("YAMLReferenceError",e,n)}},it=class extends ge{constructor(e,n){super("YAMLSemanticError",e,n)}},bn=class extends ge{constructor(e,n){super("YAMLSyntaxError",e,n)}},Nn=class extends ge{constructor(e,n){super("YAMLWarning",e,n)}};function yo(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var On=class t extends oe{static endOfLine(e,n,r){let s=e[n],i=n;for(;s&&s!==`
`&&!(r&&(s==="["||s==="]"||s==="{"||s==="}"||s===","));){let o=e[i+1];if(s===":"&&(!o||o===`
`||o==="	"||o===" "||r&&o===",")||(s===" "||s==="	")&&o==="#")break;i+=1,s=o}return i}get strValue(){if(!this.valueRange||!this.context)return null;let{start:e,end:n}=this.valueRange,{src:r}=this.context,s=r[n-1];for(;e<n&&(s===`
`||s==="	"||s===" ");)s=r[--n-1];let i="";for(let a=e;a<n;++a){let c=r[a];if(c===`
`){let{fold:l,offset:f}=oe.foldNewline(r,a,-1);i+=l,a=f}else if(c===" "||c==="	"){let l=a,f=r[a+1];for(;a<n&&(f===" "||f==="	");)a+=1,f=r[a+1];f!==`
`&&(i+=a>l?r.slice(l,a+1):c)}else i+=c}let o=r[e];switch(o){case"	":{let a="Plain value cannot start with a tab character";return{errors:[new it(this,a)],str:i}}case"@":case"`":{let a=`Plain value cannot start with reserved character ${o}`;return{errors:[new it(this,a)],str:i}}default:return i}}parseBlockValue(e){let{indent:n,inFlow:r,src:s}=this.context,i=e,o=e;for(let a=s[i];a===`
`&&!oe.atDocumentBoundary(s,i+1);a=s[i]){let c=oe.endOfBlockIndent(s,n,i+1);if(c===null||s[c]==="#")break;s[c]===`
`?i=c:(o=t.endOfLine(s,c,r),i=o)}return this.valueRange.isEmpty()&&(this.valueRange.start=e),this.valueRange.end=o,o}parse(e,n){this.context=e;let{inFlow:r,src:s}=e,i=n,o=s[i];return o&&o!=="#"&&o!==`
`&&(i=t.endOfLine(s,n,r)),this.valueRange=new xe(n,i),i=oe.endOfWhiteSpace(s,i),i=this.parseComment(i),(!this.hasComment||this.valueRange.isEmpty())&&(i=this.parseBlockValue(i)),i}};B.Char=ie;B.Node=oe;B.PlainValue=On;B.Range=xe;B.Type=st;B.YAMLError=ge;B.YAMLReferenceError=wn;B.YAMLSemanticError=it;B.YAMLSyntaxError=bn;B.YAMLWarning=Nn;B._defineProperty=yo;B.defaultTagPrefix=po;B.defaultTags=mo});var Qr=ne(jr=>{"use strict";var u=ce(),Ee=class extends u.Node{constructor(){super(u.Type.BLANK_LINE)}get includesTrailingLines(){return!0}parse(e,n){return this.context=e,this.range=new u.Range(n,n+1),n+1}},ot=class extends u.Node{constructor(e,n){super(e,n),this.node=null}get includesTrailingLines(){return!!this.node&&this.node.includesTrailingLines}parse(e,n){this.context=e;let{parseNode:r,src:s}=e,{atLineStart:i,lineStart:o}=e;!i&&this.type===u.Type.SEQ_ITEM&&(this.error=new u.YAMLSemanticError(this,"Sequence items must not have preceding content on the same line"));let a=i?n-o:e.indent,c=u.Node.endOfWhiteSpace(s,n+1),l=s[c],f=l==="#",m=[],g=null;for(;l===`
`||l==="#";){if(l==="#"){let h=u.Node.endOfLine(s,c+1);m.push(new u.Range(c,h)),c=h}else{i=!0,o=c+1;let h=u.Node.endOfWhiteSpace(s,o);s[h]===`
`&&m.length===0&&(g=new Ee,o=g.parse({src:s},o)),c=u.Node.endOfIndent(s,o)}l=s[c]}if(u.Node.nextNodeIsIndented(l,c-(o+a),this.type!==u.Type.SEQ_ITEM)?this.node=r({atLineStart:i,inCollection:!1,indent:a,lineStart:o,parent:this},c):l&&o>n+1&&(c=o-1),this.node){if(g){let h=e.parent.items||e.parent.contents;h&&h.push(g)}m.length&&Array.prototype.push.apply(this.props,m),c=this.node.range.end}else if(f){let h=m[0];this.props.push(h),c=h.end}else c=u.Node.endOfLine(s,n+1);let y=this.node?this.node.valueRange.end:c;return this.valueRange=new u.Range(n,y),c}setOrigRanges(e,n){return n=super.setOrigRanges(e,n),this.node?this.node.setOrigRanges(e,n):n}toString(){let{context:{src:e},node:n,range:r,value:s}=this;if(s!=null)return s;let i=n?e.slice(r.start,n.range.start)+String(n):e.slice(r.start,r.end);return u.Node.addStringTerminator(e,r.end,i)}},ye=class extends u.Node{constructor(){super(u.Type.COMMENT)}parse(e,n){this.context=e;let r=this.parseComment(n);return this.range=new u.Range(n,r),r}};function An(t){let e=t;for(;e instanceof ot;)e=e.node;if(!(e instanceof _t))return null;let n=e.items.length,r=-1;for(let o=n-1;o>=0;--o){let a=e.items[o];if(a.type===u.Type.COMMENT){let{indent:c,lineStart:l}=a.context;if(c>0&&a.range.start>=l+c)break;r=o}else if(a.type===u.Type.BLANK_LINE)r=o;else break}if(r===-1)return null;let s=e.items.splice(r,n-r),i=s[0].range.start;for(;e.range.end=i,e.valueRange&&e.valueRange.end>i&&(e.valueRange.end=i),e!==t;)e=e.context.parent;return s}var _t=class t extends u.Node{static nextContentHasIndent(e,n,r){let s=u.Node.endOfLine(e,n)+1;n=u.Node.endOfWhiteSpace(e,s);let i=e[n];return i?n>=s+r?!0:i!=="#"&&i!==`
`?!1:t.nextContentHasIndent(e,n,r):!1}constructor(e){super(e.type===u.Type.SEQ_ITEM?u.Type.SEQ:u.Type.MAP);for(let r=e.props.length-1;r>=0;--r)if(e.props[r].start<e.context.lineStart){this.props=e.props.slice(0,r+1),e.props=e.props.slice(r+1);let s=e.props[0]||e.valueRange;e.range.start=s.start;break}this.items=[e];let n=An(e);n&&Array.prototype.push.apply(this.items,n)}get includesTrailingLines(){return this.items.length>0}parse(e,n){this.context=e;let{parseNode:r,src:s}=e,i=u.Node.startOfLine(s,n),o=this.items[0];o.context.parent=this,this.valueRange=u.Range.copy(o.valueRange);let a=o.range.start-o.context.lineStart,c=n;c=u.Node.normalizeOffset(s,c);let l=s[c],f=u.Node.endOfWhiteSpace(s,i)===c,m=!1;for(;l;){for(;l===`
`||l==="#";){if(f&&l===`
`&&!m){let h=new Ee;if(c=h.parse({src:s},c),this.valueRange.end=c,c>=s.length){l=null;break}this.items.push(h),c-=1}else if(l==="#"){if(c<i+a&&!t.nextContentHasIndent(s,c,a))return c;let h=new ye;if(c=h.parse({indent:a,lineStart:i,src:s},c),this.items.push(h),this.valueRange.end=c,c>=s.length){l=null;break}}if(i=c+1,c=u.Node.endOfIndent(s,i),u.Node.atBlank(s,c)){let h=u.Node.endOfWhiteSpace(s,c),d=s[h];(!d||d===`
`||d==="#")&&(c=h)}l=s[c],f=!0}if(!l)break;if(c!==i+a&&(f||l!==":")){if(c<i+a){i>n&&(c=i);break}else if(!this.error){let h="All collection items must start at the same column";this.error=new u.YAMLSyntaxError(this,h)}}if(o.type===u.Type.SEQ_ITEM){if(l!=="-"){i>n&&(c=i);break}}else if(l==="-"&&!this.error){let h=s[c+1];if(!h||h===`
`||h==="	"||h===" "){let d="A collection cannot be both a mapping and a sequence";this.error=new u.YAMLSyntaxError(this,d)}}let g=r({atLineStart:f,inCollection:!0,indent:a,lineStart:i,parent:this},c);if(!g)return c;if(this.items.push(g),this.valueRange.end=g.valueRange.end,c=u.Node.normalizeOffset(s,g.range.end),l=s[c],f=!1,m=g.includesTrailingLines,l){let h=c-1,d=s[h];for(;d===" "||d==="	";)d=s[--h];d===`
`&&(i=h+1,f=!0)}let y=An(g);y&&Array.prototype.push.apply(this.items,y)}return c}setOrigRanges(e,n){return n=super.setOrigRanges(e,n),this.items.forEach(r=>{n=r.setOrigRanges(e,n)}),n}toString(){let{context:{src:e},items:n,range:r,value:s}=this;if(s!=null)return s;let i=e.slice(r.start,n[0].range.start)+String(n[0]);for(let o=1;o<n.length;++o){let a=n[o],{atLineStart:c,indent:l}=a.context;if(c)for(let f=0;f<l;++f)i+=" ";i+=String(a)}return u.Node.addStringTerminator(e,r.end,i)}},Ln=class extends u.Node{constructor(){super(u.Type.DIRECTIVE),this.name=null}get parameters(){let e=this.rawValue;return e?e.trim().split(/[ \t]+/):[]}parseName(e){let{src:n}=this.context,r=e,s=n[r];for(;s&&s!==`
`&&s!=="	"&&s!==" ";)s=n[r+=1];return this.name=n.slice(e,r),r}parseParameters(e){let{src:n}=this.context,r=e,s=n[r];for(;s&&s!==`
`&&s!=="#";)s=n[r+=1];return this.valueRange=new u.Range(e,r),r}parse(e,n){this.context=e;let r=this.parseName(n+1);return r=this.parseParameters(r),r=this.parseComment(r),this.range=new u.Range(n,r),r}},Tn=class t extends u.Node{static startCommentOrEndBlankLine(e,n){let r=u.Node.endOfWhiteSpace(e,n),s=e[r];return s==="#"||s===`
`?r:n}constructor(){super(u.Type.DOCUMENT),this.directives=null,this.contents=null,this.directivesEndMarker=null,this.documentEndMarker=null}parseDirectives(e){let{src:n}=this.context;this.directives=[];let r=!0,s=!1,i=e;for(;!u.Node.atDocumentBoundary(n,i,u.Char.DIRECTIVES_END);)switch(i=t.startCommentOrEndBlankLine(n,i),n[i]){case`
`:if(r){let o=new Ee;i=o.parse({src:n},i),i<n.length&&this.directives.push(o)}else i+=1,r=!0;break;case"#":{let o=new ye;i=o.parse({src:n},i),this.directives.push(o),r=!1}break;case"%":{let o=new Ln;i=o.parse({parent:this,src:n},i),this.directives.push(o),s=!0,r=!1}break;default:return s?this.error=new u.YAMLSemanticError(this,"Missing directives-end indicator line"):this.directives.length>0&&(this.contents=this.directives,this.directives=[]),i}return n[i]?(this.directivesEndMarker=new u.Range(i,i+3),i+3):(s?this.error=new u.YAMLSemanticError(this,"Missing directives-end indicator line"):this.directives.length>0&&(this.contents=this.directives,this.directives=[]),i)}parseContents(e){let{parseNode:n,src:r}=this.context;this.contents||(this.contents=[]);let s=e;for(;r[s-1]==="-";)s-=1;let i=u.Node.endOfWhiteSpace(r,e),o=s===e;for(this.valueRange=new u.Range(i);!u.Node.atDocumentBoundary(r,i,u.Char.DOCUMENT_END);){switch(r[i]){case`
`:if(o){let a=new Ee;i=a.parse({src:r},i),i<r.length&&this.contents.push(a)}else i+=1,o=!0;s=i;break;case"#":{let a=new ye;i=a.parse({src:r},i),this.contents.push(a),o=!1}break;default:{let a=u.Node.endOfIndent(r,i),l=n({atLineStart:o,indent:-1,inFlow:!1,inCollection:!1,lineStart:s,parent:this},a);if(!l)return this.valueRange.end=a;this.contents.push(l),i=l.range.end,o=!1;let f=An(l);f&&Array.prototype.push.apply(this.contents,f)}}i=t.startCommentOrEndBlankLine(r,i)}if(this.valueRange.end=i,r[i]&&(this.documentEndMarker=new u.Range(i,i+3),i+=3,r[i])){if(i=u.Node.endOfWhiteSpace(r,i),r[i]==="#"){let a=new ye;i=a.parse({src:r},i),this.contents.push(a)}switch(r[i]){case`
`:i+=1;break;case void 0:break;default:this.error=new u.YAMLSyntaxError(this,"Document end marker line cannot have a non-comment suffix")}}return i}parse(e,n){e.root=this,this.context=e;let{src:r}=e,s=r.charCodeAt(n)===65279?n+1:n;return s=this.parseDirectives(s),s=this.parseContents(s),s}setOrigRanges(e,n){return n=super.setOrigRanges(e,n),this.directives.forEach(r=>{n=r.setOrigRanges(e,n)}),this.directivesEndMarker&&(n=this.directivesEndMarker.setOrigRange(e,n)),this.contents.forEach(r=>{n=r.setOrigRanges(e,n)}),this.documentEndMarker&&(n=this.documentEndMarker.setOrigRange(e,n)),n}toString(){let{contents:e,directives:n,value:r}=this;if(r!=null)return r;let s=n.join("");return e.length>0&&((n.length>0||e[0].type===u.Type.COMMENT)&&(s+=`---
`),s+=e.join("")),s[s.length-1]!==`
`&&(s+=`
`),s}},Cn=class extends u.Node{parse(e,n){this.context=e;let{src:r}=e,s=u.Node.endOfIdentifier(r,n+1);return this.valueRange=new u.Range(n+1,s),s=u.Node.endOfWhiteSpace(r,s),s=this.parseComment(s),s}},le={CLIP:"CLIP",KEEP:"KEEP",STRIP:"STRIP"},Mn=class extends u.Node{constructor(e,n){super(e,n),this.blockIndent=null,this.chomping=le.CLIP,this.header=null}get includesTrailingLines(){return this.chomping===le.KEEP}get strValue(){if(!this.valueRange||!this.context)return null;let{start:e,end:n}=this.valueRange,{indent:r,src:s}=this.context;if(this.valueRange.isEmpty())return"";let i=null,o=s[n-1];for(;o===`
`||o==="	"||o===" ";){if(n-=1,n<=e){if(this.chomping===le.KEEP)break;return""}o===`
`&&(i=n),o=s[n-1]}let a=n+1;i&&(this.chomping===le.KEEP?(a=i,n=this.valueRange.end):n=i);let c=r+this.blockIndent,l=this.type===u.Type.BLOCK_FOLDED,f=!0,m="",g="",y=!1;for(let h=e;h<n;++h){for(let w=0;w<c&&s[h]===" ";++w)h+=1;let d=s[h];if(d===`
`)g===`
`?m+=`
`:g=`
`;else{let w=u.Node.endOfLine(s,h),P=s.slice(h,w);h=w,l&&(d===" "||d==="	")&&h<a?(g===" "?g=`
`:!y&&!f&&g===`
`&&(g=`

`),m+=g+P,g=w<n&&s[w]||"",y=!0):(m+=g+P,g=l&&h<a?" ":`
`,y=!1),f&&P!==""&&(f=!1)}}return this.chomping===le.STRIP?m:m+`
`}parseBlockHeader(e){let{src:n}=this.context,r=e+1,s="";for(;;){let i=n[r];switch(i){case"-":this.chomping=le.STRIP;break;case"+":this.chomping=le.KEEP;break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":s+=i;break;default:return this.blockIndent=Number(s)||null,this.header=new u.Range(e,r),r}r+=1}}parseBlockValue(e){let{indent:n,src:r}=this.context,s=!!this.blockIndent,i=e,o=e,a=1;for(let c=r[i];c===`
`&&(i+=1,!u.Node.atDocumentBoundary(r,i));c=r[i]){let l=u.Node.endOfBlockIndent(r,n,i);if(l===null)break;let f=r[l],m=l-(i+n);if(this.blockIndent){if(f&&f!==`
`&&m<this.blockIndent){if(r[l]==="#")break;if(!this.error){let y=`Block scalars must not be less indented than their ${s?"explicit indentation indicator":"first line"}`;this.error=new u.YAMLSemanticError(this,y)}}}else if(r[l]!==`
`){if(m<a){let g="Block scalars with more-indented leading empty lines must use an explicit indentation indicator";this.error=new u.YAMLSemanticError(this,g)}this.blockIndent=m}else m>a&&(a=m);r[l]===`
`?i=l:i=o=u.Node.endOfLine(r,l)}return this.chomping!==le.KEEP&&(i=r[o]?o+1:o),this.valueRange=new u.Range(e+1,i),i}parse(e,n){this.context=e;let{src:r}=e,s=this.parseBlockHeader(n);return s=u.Node.endOfWhiteSpace(r,s),s=this.parseComment(s),s=this.parseBlockValue(s),s}setOrigRanges(e,n){return n=super.setOrigRanges(e,n),this.header?this.header.setOrigRange(e,n):n}},kn=class extends u.Node{constructor(e,n){super(e,n),this.items=null}prevNodeIsJsonLike(e=this.items.length){let n=this.items[e-1];return!!n&&(n.jsonLike||n.type===u.Type.COMMENT&&this.prevNodeIsJsonLike(e-1))}parse(e,n){this.context=e;let{parseNode:r,src:s}=e,{indent:i,lineStart:o}=e,a=s[n];this.items=[{char:a,offset:n}];let c=u.Node.endOfWhiteSpace(s,n+1);for(a=s[c];a&&a!=="]"&&a!=="}";){switch(a){case`
`:{o=c+1;let l=u.Node.endOfWhiteSpace(s,o);if(s[l]===`
`){let f=new Ee;o=f.parse({src:s},o),this.items.push(f)}if(c=u.Node.endOfIndent(s,o),c<=o+i&&(a=s[c],c<o+i||a!=="]"&&a!=="}")){let f="Insufficient indentation in flow collection";this.error=new u.YAMLSemanticError(this,f)}}break;case",":this.items.push({char:a,offset:c}),c+=1;break;case"#":{let l=new ye;c=l.parse({src:s},c),this.items.push(l)}break;case"?":case":":{let l=s[c+1];if(l===`
`||l==="	"||l===" "||l===","||a===":"&&this.prevNodeIsJsonLike()){this.items.push({char:a,offset:c}),c+=1;break}}default:{let l=r({atLineStart:!1,inCollection:!1,inFlow:!0,indent:-1,lineStart:o,parent:this},c);if(!l)return this.valueRange=new u.Range(n,c),c;this.items.push(l),c=u.Node.normalizeOffset(s,l.range.end)}}c=u.Node.endOfWhiteSpace(s,c),a=s[c]}return this.valueRange=new u.Range(n,c+1),a&&(this.items.push({char:a,offset:c}),c=u.Node.endOfWhiteSpace(s,c+1),c=this.parseComment(c)),c}setOrigRanges(e,n){return n=super.setOrigRanges(e,n),this.items.forEach(r=>{if(r instanceof u.Node)n=r.setOrigRanges(e,n);else if(e.length===0)r.origOffset=r.offset;else{let s=n;for(;s<e.length&&!(e[s]>r.offset);)++s;r.origOffset=r.offset+s,n=s}}),n}toString(){let{context:{src:e},items:n,range:r,value:s}=this;if(s!=null)return s;let i=n.filter(c=>c instanceof u.Node),o="",a=r.start;return i.forEach(c=>{let l=e.slice(a,c.range.start);a=c.range.end,o+=l+String(c),o[o.length-1]===`
`&&e[a-1]!==`
`&&e[a]===`
`&&(a+=1)}),o+=e.slice(a,r.end),u.Node.addStringTerminator(e,r.end,o)}},Pn=class t extends u.Node{static endOfQuote(e,n){let r=e[n];for(;r&&r!=='"';)n+=r==="\\"?2:1,r=e[n];return n+1}get strValue(){if(!this.valueRange||!this.context)return null;let e=[],{start:n,end:r}=this.valueRange,{indent:s,src:i}=this.context;i[r-1]!=='"'&&e.push(new u.YAMLSyntaxError(this,'Missing closing "quote'));let o="";for(let a=n+1;a<r-1;++a){let c=i[a];if(c===`
`){u.Node.atDocumentBoundary(i,a+1)&&e.push(new u.YAMLSemanticError(this,"Document boundary indicators are not allowed within string values"));let{fold:l,offset:f,error:m}=u.Node.foldNewline(i,a,s);o+=l,a=f,m&&e.push(new u.YAMLSemanticError(this,"Multi-line double-quoted string needs to be sufficiently indented"))}else if(c==="\\")switch(a+=1,i[a]){case"0":o+="\0";break;case"a":o+="\x07";break;case"b":o+="\b";break;case"e":o+="\x1B";break;case"f":o+="\f";break;case"n":o+=`
`;break;case"r":o+="\r";break;case"t":o+="	";break;case"v":o+="\v";break;case"N":o+="\x85";break;case"_":o+="\xA0";break;case"L":o+="\u2028";break;case"P":o+="\u2029";break;case" ":o+=" ";break;case'"':o+='"';break;case"/":o+="/";break;case"\\":o+="\\";break;case"	":o+="	";break;case"x":o+=this.parseCharCode(a+1,2,e),a+=2;break;case"u":o+=this.parseCharCode(a+1,4,e),a+=4;break;case"U":o+=this.parseCharCode(a+1,8,e),a+=8;break;case`
`:for(;i[a+1]===" "||i[a+1]==="	";)a+=1;break;default:e.push(new u.YAMLSyntaxError(this,`Invalid escape sequence ${i.substr(a-1,2)}`)),o+="\\"+i[a]}else if(c===" "||c==="	"){let l=a,f=i[a+1];for(;f===" "||f==="	";)a+=1,f=i[a+1];f!==`
`&&(o+=a>l?i.slice(l,a+1):c)}else o+=c}return e.length>0?{errors:e,str:o}:o}parseCharCode(e,n,r){let{src:s}=this.context,i=s.substr(e,n),a=i.length===n&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;return isNaN(a)?(r.push(new u.YAMLSyntaxError(this,`Invalid escape sequence ${s.substr(e-2,n+2)}`)),s.substr(e-2,n+2)):String.fromCodePoint(a)}parse(e,n){this.context=e;let{src:r}=e,s=t.endOfQuote(r,n+1);return this.valueRange=new u.Range(n,s),s=u.Node.endOfWhiteSpace(r,s),s=this.parseComment(s),s}},vn=class t extends u.Node{static endOfQuote(e,n){let r=e[n];for(;r;)if(r==="'"){if(e[n+1]!=="'")break;r=e[n+=2]}else r=e[n+=1];return n+1}get strValue(){if(!this.valueRange||!this.context)return null;let e=[],{start:n,end:r}=this.valueRange,{indent:s,src:i}=this.context;i[r-1]!=="'"&&e.push(new u.YAMLSyntaxError(this,"Missing closing 'quote"));let o="";for(let a=n+1;a<r-1;++a){let c=i[a];if(c===`
`){u.Node.atDocumentBoundary(i,a+1)&&e.push(new u.YAMLSemanticError(this,"Document boundary indicators are not allowed within string values"));let{fold:l,offset:f,error:m}=u.Node.foldNewline(i,a,s);o+=l,a=f,m&&e.push(new u.YAMLSemanticError(this,"Multi-line single-quoted string needs to be sufficiently indented"))}else if(c==="'")o+=c,a+=1,i[a]!=="'"&&e.push(new u.YAMLSyntaxError(this,"Unescaped single quote? This should not happen."));else if(c===" "||c==="	"){let l=a,f=i[a+1];for(;f===" "||f==="	";)a+=1,f=i[a+1];f!==`
`&&(o+=a>l?i.slice(l,a+1):c)}else o+=c}return e.length>0?{errors:e,str:o}:o}parse(e,n){this.context=e;let{src:r}=e,s=t.endOfQuote(r,n+1);return this.valueRange=new u.Range(n,s),s=u.Node.endOfWhiteSpace(r,s),s=this.parseComment(s),s}};function Eo(t,e){switch(t){case u.Type.ALIAS:return new Cn(t,e);case u.Type.BLOCK_FOLDED:case u.Type.BLOCK_LITERAL:return new Mn(t,e);case u.Type.FLOW_MAP:case u.Type.FLOW_SEQ:return new kn(t,e);case u.Type.MAP_KEY:case u.Type.MAP_VALUE:case u.Type.SEQ_ITEM:return new ot(t,e);case u.Type.COMMENT:case u.Type.PLAIN:return new u.PlainValue(t,e);case u.Type.QUOTE_DOUBLE:return new Pn(t,e);case u.Type.QUOTE_SINGLE:return new vn(t,e);default:return null}}var In=class t{static parseType(e,n,r){switch(e[n]){case"*":return u.Type.ALIAS;case">":return u.Type.BLOCK_FOLDED;case"|":return u.Type.BLOCK_LITERAL;case"{":return u.Type.FLOW_MAP;case"[":return u.Type.FLOW_SEQ;case"?":return!r&&u.Node.atBlank(e,n+1,!0)?u.Type.MAP_KEY:u.Type.PLAIN;case":":return!r&&u.Node.atBlank(e,n+1,!0)?u.Type.MAP_VALUE:u.Type.PLAIN;case"-":return!r&&u.Node.atBlank(e,n+1,!0)?u.Type.SEQ_ITEM:u.Type.PLAIN;case'"':return u.Type.QUOTE_DOUBLE;case"'":return u.Type.QUOTE_SINGLE;default:return u.Type.PLAIN}}constructor(e={},{atLineStart:n,inCollection:r,inFlow:s,indent:i,lineStart:o,parent:a}={}){u._defineProperty(this,"parseNode",(c,l)=>{if(u.Node.atDocumentBoundary(this.src,l))return null;let f=new t(this,c),{props:m,type:g,valueStart:y}=f.parseProps(l),h=Eo(g,m),d=h.parse(f,y);if(h.range=new u.Range(l,d),d<=l&&(h.error=new Error("Node#parse consumed no characters"),h.error.parseEnd=d,h.error.source=h,h.range.end=l+1),f.nodeStartsCollection(h)){!h.error&&!f.atLineStart&&f.parent.type===u.Type.DOCUMENT&&(h.error=new u.YAMLSyntaxError(h,"Block collection must not have preceding content here (e.g. directives-end indicator)"));let w=new _t(h);return d=w.parse(new t(f),d),w.range=new u.Range(l,d),w}return h}),this.atLineStart=n??(e.atLineStart||!1),this.inCollection=r??(e.inCollection||!1),this.inFlow=s??(e.inFlow||!1),this.indent=i??e.indent,this.lineStart=o??e.lineStart,this.parent=a??(e.parent||{}),this.root=e.root,this.src=e.src}nodeStartsCollection(e){let{inCollection:n,inFlow:r,src:s}=this;if(n||r)return!1;if(e instanceof ot)return!0;let i=e.range.end;return s[i]===`
`||s[i-1]===`
`?!1:(i=u.Node.endOfWhiteSpace(s,i),s[i]===":")}parseProps(e){let{inFlow:n,parent:r,src:s}=this,i=[],o=!1;e=this.atLineStart?u.Node.endOfIndent(s,e):u.Node.endOfWhiteSpace(s,e);let a=s[e];for(;a===u.Char.ANCHOR||a===u.Char.COMMENT||a===u.Char.TAG||a===`
`;){if(a===`
`){let l=e,f;do f=l+1,l=u.Node.endOfIndent(s,f);while(s[l]===`
`);let m=l-(f+this.indent),g=r.type===u.Type.SEQ_ITEM&&r.context.atLineStart;if(s[l]!=="#"&&!u.Node.nextNodeIsIndented(s[l],m,!g))break;this.atLineStart=!0,this.lineStart=f,o=!1,e=l}else if(a===u.Char.COMMENT){let l=u.Node.endOfLine(s,e+1);i.push(new u.Range(e,l)),e=l}else{let l=u.Node.endOfIdentifier(s,e+1);a===u.Char.TAG&&s[l]===","&&/^[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+,\d\d\d\d(-\d\d){0,2}\/\S/.test(s.slice(e+1,l+13))&&(l=u.Node.endOfIdentifier(s,l+5)),i.push(new u.Range(e,l)),o=!0,e=u.Node.endOfWhiteSpace(s,l)}a=s[e]}o&&a===":"&&u.Node.atBlank(s,e+1,!0)&&(e-=1);let c=t.parseType(s,e,n);return{props:i,type:c,valueStart:e}}};function So(t){let e=[];t.indexOf("\r")!==-1&&(t=t.replace(/\r\n?/g,(s,i)=>(s.length>1&&e.push(i),`
`)));let n=[],r=0;do{let s=new Tn,i=new In({src:t});r=s.parse(i,r),n.push(s)}while(r<t.length);return n.setOrigRanges=()=>{if(e.length===0)return!1;for(let i=1;i<e.length;++i)e[i]-=i;let s=0;for(let i=0;i<n.length;++i)s=n[i].setOrigRanges(e,s);return e.splice(0,e.length),!0},n.toString=()=>n.join(`...
`),n}jr.parse=So});var De=ne(M=>{"use strict";var p=ce();function wo(t,e,n){return n?`#${n.replace(/[\s\S]^/gm,`$&${e}#`)}
${e}${t}`:t}function Re(t,e,n){return n?n.indexOf(`
`)===-1?`${t} #${n}`:`${t}
`+n.replace(/^/gm,`${e||""}#`):t}var j=class{};function fe(t,e,n){if(Array.isArray(t))return t.map((r,s)=>fe(r,String(s),n));if(t&&typeof t.toJSON=="function"){let r=n&&n.anchors&&n.anchors.get(t);r&&(n.onCreate=i=>{r.res=i,delete n.onCreate});let s=t.toJSON(e,n);return r&&n.onCreate&&n.onCreate(s),s}return(!n||!n.keep)&&typeof t=="bigint"?Number(t):t}var x=class extends j{constructor(e){super(),this.value=e}toJSON(e,n){return n&&n.keep?this.value:fe(this.value,e,n)}toString(){return String(this.value)}};function Gr(t,e,n){let r=n;for(let s=e.length-1;s>=0;--s){let i=e[s];if(Number.isInteger(i)&&i>=0){let o=[];o[i]=r,r=o}else{let o={};Object.defineProperty(o,i,{value:r,writable:!0,enumerable:!0,configurable:!0}),r=o}}return t.createNode(r,!1)}var Xr=t=>t==null||typeof t=="object"&&t[Symbol.iterator]().next().done,Q=class t extends j{constructor(e){super(),p._defineProperty(this,"items",[]),this.schema=e}addIn(e,n){if(Xr(e))this.add(n);else{let[r,...s]=e,i=this.get(r,!0);if(i instanceof t)i.addIn(s,n);else if(i===void 0&&this.schema)this.set(r,Gr(this.schema,s,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${s}`)}}deleteIn([e,...n]){if(n.length===0)return this.delete(e);let r=this.get(e,!0);if(r instanceof t)return r.deleteIn(n);throw new Error(`Expected YAML collection at ${e}. Remaining path: ${n}`)}getIn([e,...n],r){let s=this.get(e,!0);return n.length===0?!r&&s instanceof x?s.value:s:s instanceof t?s.getIn(n,r):void 0}hasAllNullValues(){return this.items.every(e=>{if(!e||e.type!=="PAIR")return!1;let n=e.value;return n==null||n instanceof x&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn([e,...n]){if(n.length===0)return this.has(e);let r=this.get(e,!0);return r instanceof t?r.hasIn(n):!1}setIn([e,...n],r){if(n.length===0)this.set(e,r);else{let s=this.get(e,!0);if(s instanceof t)s.setIn(n,r);else if(s===void 0&&this.schema)this.set(e,Gr(this.schema,n,r));else throw new Error(`Expected YAML collection at ${e}. Remaining path: ${n}`)}}toJSON(){return null}toString(e,{blockItem:n,flowChars:r,isMap:s,itemIndent:i},o,a){let{indent:c,indentStep:l,stringify:f}=e,m=this.type===p.Type.FLOW_MAP||this.type===p.Type.FLOW_SEQ||e.inFlow;m&&(i+=l);let g=s&&this.hasAllNullValues();e=Object.assign({},e,{allNullValues:g,indent:i,inFlow:m,type:null});let y=!1,h=!1,d=this.items.reduce((P,A,C)=>{let L;A&&(!y&&A.spaceBefore&&P.push({type:"comment",str:""}),A.commentBefore&&A.commentBefore.match(/^.*$/gm).forEach(Ci=>{P.push({type:"comment",str:`#${Ci}`})}),A.comment&&(L=A.comment),m&&(!y&&A.spaceBefore||A.commentBefore||A.comment||A.key&&(A.key.commentBefore||A.key.comment)||A.value&&(A.value.commentBefore||A.value.comment))&&(h=!0)),y=!1;let R=f(A,e,()=>L=null,()=>y=!0);return m&&!h&&R.includes(`
`)&&(h=!0),m&&C<this.items.length-1&&(R+=","),R=Re(R,i,L),y&&(L||m)&&(y=!1),P.push({type:"item",str:R}),P},[]),w;if(d.length===0)w=r.start+r.end;else if(m){let{start:P,end:A}=r,C=d.map(L=>L.str);if(h||C.reduce((L,R)=>L+R.length+2,2)>t.maxFlowStringSingleLineLength){w=P;for(let L of C)w+=L?`
${l}${c}${L}`:`
`;w+=`
${c}${A}`}else w=`${P} ${C.join(" ")} ${A}`}else{let P=d.map(n);w=P.shift();for(let A of P)w+=A?`
${c}${A}`:`
`}return this.comment?(w+=`
`+this.comment.replace(/^/gm,`${c}#`),o&&o()):y&&a&&a(),w}};p._defineProperty(Q,"maxFlowStringSingleLineLength",60);function xt(t){let e=t instanceof x?t.value:t;return e&&typeof e=="string"&&(e=Number(e)),Number.isInteger(e)&&e>=0?e:null}var ue=class extends Q{add(e){this.items.push(e)}delete(e){let n=xt(e);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(e,n){let r=xt(e);if(typeof r!="number")return;let s=this.items[r];return!n&&s instanceof x?s.value:s}has(e){let n=xt(e);return typeof n=="number"&&n<this.items.length}set(e,n){let r=xt(e);if(typeof r!="number")throw new Error(`Expected a valid index, not ${e}.`);this.items[r]=n}toJSON(e,n){let r=[];n&&n.onCreate&&n.onCreate(r);let s=0;for(let i of this.items)r.push(fe(i,String(s++),n));return r}toString(e,n,r){return e?super.toString(e,{blockItem:s=>s.type==="comment"?s.str:`- ${s.str}`,flowChars:{start:"[",end:"]"},isMap:!1,itemIndent:(e.indent||"")+"  "},n,r):JSON.stringify(this)}},bo=(t,e,n)=>e===null?"":typeof e!="object"?String(e):t instanceof j&&n&&n.doc?t.toString({anchors:Object.create(null),doc:n.doc,indent:"",indentStep:n.indentStep,inFlow:!0,inStringifyKey:!0,stringify:n.stringify}):JSON.stringify(e),T=class t extends j{constructor(e,n=null){super(),this.key=e,this.value=n,this.type=t.Type.PAIR}get commentBefore(){return this.key instanceof j?this.key.commentBefore:void 0}set commentBefore(e){if(this.key==null&&(this.key=new x(null)),this.key instanceof j)this.key.commentBefore=e;else{let n="Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node.";throw new Error(n)}}addToJSMap(e,n){let r=fe(this.key,"",e);if(n instanceof Map){let s=fe(this.value,r,e);n.set(r,s)}else if(n instanceof Set)n.add(r);else{let s=bo(this.key,r,e),i=fe(this.value,s,e);s in n?Object.defineProperty(n,s,{value:i,writable:!0,enumerable:!0,configurable:!0}):n[s]=i}return n}toJSON(e,n){let r=n&&n.mapAsMap?new Map:{};return this.addToJSMap(n,r)}toString(e,n,r){if(!e||!e.doc)return JSON.stringify(this);let{indent:s,indentSeq:i,simpleKeys:o}=e.doc.options,{key:a,value:c}=this,l=a instanceof j&&a.comment;if(o){if(l)throw new Error("With simple keys, key nodes cannot have comments");if(a instanceof Q){let R="With simple keys, collection cannot be used as a key value";throw new Error(R)}}let f=!o&&(!a||l||(a instanceof j?a instanceof Q||a.type===p.Type.BLOCK_FOLDED||a.type===p.Type.BLOCK_LITERAL:typeof a=="object")),{doc:m,indent:g,indentStep:y,stringify:h}=e;e=Object.assign({},e,{implicitKey:!f,indent:g+y});let d=!1,w=h(a,e,()=>l=null,()=>d=!0);if(w=Re(w,e.indent,l),!f&&w.length>1024){if(o)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");f=!0}if(e.allNullValues&&!o)return this.comment?(w=Re(w,e.indent,this.comment),n&&n()):d&&!l&&r&&r(),e.inFlow&&!f?w:`? ${w}`;w=f?`? ${w}
${g}:`:`${w}:`,this.comment&&(w=Re(w,e.indent,this.comment),n&&n());let P="",A=null;if(c instanceof j){if(c.spaceBefore&&(P=`
`),c.commentBefore){let R=c.commentBefore.replace(/^/gm,`${e.indent}#`);P+=`
${R}`}A=c.comment}else c&&typeof c=="object"&&(c=m.schema.createNode(c,!0));e.implicitKey=!1,!f&&!this.comment&&c instanceof x&&(e.indentAtStart=w.length+1),d=!1,!i&&s>=2&&!e.inFlow&&!f&&c instanceof ue&&c.type!==p.Type.FLOW_SEQ&&!c.tag&&!m.anchors.getName(c)&&(e.indent=e.indent.substr(2));let C=h(c,e,()=>A=null,()=>d=!0),L=" ";return P||this.comment?L=`${P}
${e.indent}`:!f&&c instanceof Q?(!(C[0]==="["||C[0]==="{")||C.includes(`
`))&&(L=`
${e.indent}`):C[0]===`
`&&(L=""),d&&!A&&r&&r(),Re(w+L+C,e.indent,A)}};p._defineProperty(T,"Type",{PAIR:"PAIR",MERGE_PAIR:"MERGE_PAIR"});var Rt=(t,e)=>{if(t instanceof we){let n=e.get(t.source);return n.count*n.aliasCount}else if(t instanceof Q){let n=0;for(let r of t.items){let s=Rt(r,e);s>n&&(n=s)}return n}else if(t instanceof T){let n=Rt(t.key,e),r=Rt(t.value,e);return Math.max(n,r)}return 1},we=class t extends j{static stringify({range:e,source:n},{anchors:r,doc:s,implicitKey:i,inStringifyKey:o}){let a=Object.keys(r).find(l=>r[l]===n);if(!a&&o&&(a=s.anchors.getName(n)||s.anchors.newName()),a)return`*${a}${i?" ":""}`;let c=s.anchors.getName(n)?"Alias node must be after source node":"Source node not found for alias node";throw new Error(`${c} [${e}]`)}constructor(e){super(),this.source=e,this.type=p.Type.ALIAS}set tag(e){throw new Error("Alias nodes cannot have tags")}toJSON(e,n){if(!n)return fe(this.source,e,n);let{anchors:r,maxAliasCount:s}=n,i=r.get(this.source);if(!i||i.res===void 0){let o="This should not happen: Alias anchor was not resolved?";throw this.cstNode?new p.YAMLReferenceError(this.cstNode,o):new ReferenceError(o)}if(s>=0&&(i.count+=1,i.aliasCount===0&&(i.aliasCount=Rt(this.source,r)),i.count*i.aliasCount>s)){let o="Excessive alias count indicates a resource exhaustion attack";throw this.cstNode?new p.YAMLReferenceError(this.cstNode,o):new ReferenceError(o)}return i.res}toString(e){return t.stringify(this,e)}};p._defineProperty(we,"default",!0);function at(t,e){let n=e instanceof x?e.value:e;for(let r of t)if(r instanceof T&&(r.key===e||r.key===n||r.key&&r.key.value===n))return r}var ct=class extends Q{add(e,n){e?e instanceof T||(e=new T(e.key||e,e.value)):e=new T(e);let r=at(this.items,e.key),s=this.schema&&this.schema.sortMapEntries;if(r)if(n)r.value=e.value;else throw new Error(`Key ${e.key} already set`);else if(s){let i=this.items.findIndex(o=>s(e,o)<0);i===-1?this.items.push(e):this.items.splice(i,0,e)}else this.items.push(e)}delete(e){let n=at(this.items,e);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(e,n){let r=at(this.items,e),s=r&&r.value;return!n&&s instanceof x?s.value:s}has(e){return!!at(this.items,e)}set(e,n){this.add(new T(e,n),!0)}toJSON(e,n,r){let s=r?new r:n&&n.mapAsMap?new Map:{};n&&n.onCreate&&n.onCreate(s);for(let i of this.items)i.addToJSMap(n,s);return s}toString(e,n,r){if(!e)return JSON.stringify(this);for(let s of this.items)if(!(s instanceof T))throw new Error(`Map items must all be pairs; found ${JSON.stringify(s)} instead`);return super.toString(e,{blockItem:s=>s.str,flowChars:{start:"{",end:"}"},isMap:!0,itemIndent:e.indent||""},n,r)}},zr="<<",Yt=class extends T{constructor(e){if(e instanceof T){let n=e.value;n instanceof ue||(n=new ue,n.items.push(e.value),n.range=e.value.range),super(e.key,n),this.range=e.range}else super(new x(zr),new ue);this.type=T.Type.MERGE_PAIR}addToJSMap(e,n){for(let{source:r}of this.value.items){if(!(r instanceof ct))throw new Error("Merge sources must be maps");let s=r.toJSON(null,e,Map);for(let[i,o]of s)n instanceof Map?n.has(i)||n.set(i,o):n instanceof Set?n.add(i):Object.prototype.hasOwnProperty.call(n,i)||Object.defineProperty(n,i,{value:o,writable:!0,enumerable:!0,configurable:!0})}return n}toString(e,n){let r=this.value;if(r.items.length>1)return super.toString(e,n);this.value=r.items[0];let s=super.toString(e,n);return this.value=r,s}},No={defaultType:p.Type.BLOCK_LITERAL,lineWidth:76},Oo={trueStr:"true",falseStr:"false"},Ao={asBigInt:!1},Lo={nullStr:"null"},be={defaultType:p.Type.PLAIN,doubleQuoted:{jsonEncoding:!1,minMultiLineLength:40},fold:{lineWidth:80,minContentWidth:20}};function xn(t,e,n){for(let{format:r,test:s,resolve:i}of e)if(s){let o=t.match(s);if(o){let a=i.apply(null,o);return a instanceof x||(a=new x(a)),r&&(a.format=r),a}}return n&&(t=n(t)),new x(t)}var Zr="flow",_n="block",Dt="quoted",Hr=(t,e)=>{let n=t[e+1];for(;n===" "||n==="	";){do n=t[e+=1];while(n&&n!==`
`);n=t[e+1]}return e};function Bt(t,e,n,{indentAtStart:r,lineWidth:s=80,minContentWidth:i=20,onFold:o,onOverflow:a}){if(!s||s<0)return t;let c=Math.max(1+i,1+s-e.length);if(t.length<=c)return t;let l=[],f={},m=s-e.length;typeof r=="number"&&(r>s-Math.max(2,i)?l.push(0):m=s-r);let g,y,h=!1,d=-1,w=-1,P=-1;n===_n&&(d=Hr(t,d),d!==-1&&(m=d+c));for(let C;C=t[d+=1];){if(n===Dt&&C==="\\"){switch(w=d,t[d+1]){case"x":d+=3;break;case"u":d+=5;break;case"U":d+=9;break;default:d+=1}P=d}if(C===`
`)n===_n&&(d=Hr(t,d)),m=d+c,g=void 0;else{if(C===" "&&y&&y!==" "&&y!==`
`&&y!=="	"){let L=t[d+1];L&&L!==" "&&L!==`
`&&L!=="	"&&(g=d)}if(d>=m)if(g)l.push(g),m=g+c,g=void 0;else if(n===Dt){for(;y===" "||y==="	";)y=C,C=t[d+=1],h=!0;let L=d>P+1?d-2:w-1;if(f[L])return t;l.push(L),f[L]=!0,m=L+c,g=void 0}else h=!0}y=C}if(h&&a&&a(),l.length===0)return t;o&&o();let A=t.slice(0,l[0]);for(let C=0;C<l.length;++C){let L=l[C],R=l[C+1]||t.length;L===0?A=`
${e}${t.slice(0,R)}`:(n===Dt&&f[L]&&(A+=`${t[L]}\\`),A+=`
${e}${t.slice(L+1,R)}`)}return A}var Rn=({indentAtStart:t})=>t?Object.assign({indentAtStart:t},be.fold):be.fold,Ft=t=>/^(%|---|\.\.\.)/m.test(t);function To(t,e,n){if(!e||e<0)return!1;let r=e-n,s=t.length;if(s<=r)return!1;for(let i=0,o=0;i<s;++i)if(t[i]===`
`){if(i-o>r)return!0;if(o=i+1,s-o<=r)return!1}return!0}function Se(t,e){let{implicitKey:n}=e,{jsonEncoding:r,minMultiLineLength:s}=be.doubleQuoted,i=JSON.stringify(t);if(r)return i;let o=e.indent||(Ft(t)?"  ":""),a="",c=0;for(let l=0,f=i[l];f;f=i[++l])if(f===" "&&i[l+1]==="\\"&&i[l+2]==="n"&&(a+=i.slice(c,l)+"\\ ",l+=1,c=l,f="\\"),f==="\\")switch(i[l+1]){case"u":{a+=i.slice(c,l);let m=i.substr(l+2,4);switch(m){case"0000":a+="\\0";break;case"0007":a+="\\a";break;case"000b":a+="\\v";break;case"001b":a+="\\e";break;case"0085":a+="\\N";break;case"00a0":a+="\\_";break;case"2028":a+="\\L";break;case"2029":a+="\\P";break;default:m.substr(0,2)==="00"?a+="\\x"+m.substr(2):a+=i.substr(l,6)}l+=5,c=l+1}break;case"n":if(n||i[l+2]==='"'||i.length<s)l+=1;else{for(a+=i.slice(c,l)+`

`;i[l+2]==="\\"&&i[l+3]==="n"&&i[l+4]!=='"';)a+=`
`,l+=2;a+=o,i[l+2]===" "&&(a+="\\"),l+=1,c=l+1}break;default:l+=1}return a=c?a+i.slice(c):i,n?a:Bt(a,o,Dt,Rn(e))}function es(t,e){if(e.implicitKey){if(/\n/.test(t))return Se(t,e)}else if(/[ \t]\n|\n[ \t]/.test(t))return Se(t,e);let n=e.indent||(Ft(t)?"  ":""),r="'"+t.replace(/'/g,"''").replace(/\n+/g,`$&
${n}`)+"'";return e.implicitKey?r:Bt(r,n,Zr,Rn(e))}function $t({comment:t,type:e,value:n},r,s,i){if(/\n[\t ]+$/.test(n)||/^\s*$/.test(n))return Se(n,r);let o=r.indent||(r.forceBlockIndent||Ft(n)?"  ":""),a=o?"2":"1",c=e===p.Type.BLOCK_FOLDED?!1:e===p.Type.BLOCK_LITERAL?!0:!To(n,be.fold.lineWidth,o.length),l=c?"|":">";if(!n)return l+`
`;let f="",m="";if(n=n.replace(/[\n\t ]*$/,y=>{let h=y.indexOf(`
`);return h===-1?l+="-":(n===y||h!==y.length-1)&&(l+="+",i&&i()),m=y.replace(/\n$/,""),""}).replace(/^[\n ]*/,y=>{y.indexOf(" ")!==-1&&(l+=a);let h=y.match(/ +$/);return h?(f=y.slice(0,-h[0].length),h[0]):(f=y,"")}),m&&(m=m.replace(/\n+(?!\n|$)/g,`$&${o}`)),f&&(f=f.replace(/\n+/g,`$&${o}`)),t&&(l+=" #"+t.replace(/ ?[\r\n]+/g," "),s&&s()),!n)return`${l}${a}
${o}${m}`;if(c)return n=n.replace(/\n+/g,`$&${o}`),`${l}
${o}${f}${n}${m}`;n=n.replace(/\n+/g,`
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${o}`);let g=Bt(`${f}${n}${m}`,o,_n,be.fold);return`${l}
${o}${g}`}function Co(t,e,n,r){let{comment:s,type:i,value:o}=t,{actualString:a,implicitKey:c,indent:l,inFlow:f}=e;if(c&&/[\n[\]{},]/.test(o)||f&&/[[\]{},]/.test(o))return Se(o,e);if(!o||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o))return c||f||o.indexOf(`
`)===-1?o.indexOf('"')!==-1&&o.indexOf("'")===-1?es(o,e):Se(o,e):$t(t,e,n,r);if(!c&&!f&&i!==p.Type.PLAIN&&o.indexOf(`
`)!==-1)return $t(t,e,n,r);if(l===""&&Ft(o))return e.forceBlockIndent=!0,$t(t,e,n,r);let m=o.replace(/\n+/g,`$&
${l}`);if(a){let{tags:y}=e.doc.schema;if(typeof xn(m,y,y.scalarFallback).value!="string")return Se(o,e)}let g=c?m:Bt(m,l,Zr,Rn(e));return s&&!f&&(g.indexOf(`
`)!==-1||s.indexOf(`
`)!==-1)?(n&&n(),wo(g,l,s)):g}function Mo(t,e,n,r){let{defaultType:s}=be,{implicitKey:i,inFlow:o}=e,{type:a,value:c}=t;typeof c!="string"&&(c=String(c),t=Object.assign({},t,{value:c}));let l=m=>{switch(m){case p.Type.BLOCK_FOLDED:case p.Type.BLOCK_LITERAL:return $t(t,e,n,r);case p.Type.QUOTE_DOUBLE:return Se(c,e);case p.Type.QUOTE_SINGLE:return es(c,e);case p.Type.PLAIN:return Co(t,e,n,r);default:return null}};(a!==p.Type.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f]/.test(c)||(i||o)&&(a===p.Type.BLOCK_FOLDED||a===p.Type.BLOCK_LITERAL))&&(a=p.Type.QUOTE_DOUBLE);let f=l(a);if(f===null&&(f=l(s),f===null))throw new Error(`Unsupported default string type ${s}`);return f}function ko({format:t,minFractionDigits:e,tag:n,value:r}){if(typeof r=="bigint")return String(r);if(!isFinite(r))return isNaN(r)?".nan":r<0?"-.inf":".inf";let s=JSON.stringify(r);if(!t&&e&&(!n||n==="tag:yaml.org,2002:float")&&/^\d/.test(s)){let i=s.indexOf(".");i<0&&(i=s.length,s+=".");let o=e-(s.length-i-1);for(;o-- >0;)s+="0"}return s}function ts(t,e){let n,r;switch(e.type){case p.Type.FLOW_MAP:n="}",r="flow map";break;case p.Type.FLOW_SEQ:n="]",r="flow sequence";break;default:t.push(new p.YAMLSemanticError(e,"Not a flow collection!?"));return}let s;for(let i=e.items.length-1;i>=0;--i){let o=e.items[i];if(!o||o.type!==p.Type.COMMENT){s=o;break}}if(s&&s.char!==n){let i=`Expected ${r} to end with ${n}`,o;typeof s.offset=="number"?(o=new p.YAMLSemanticError(e,i),o.offset=s.offset+1):(o=new p.YAMLSemanticError(s,i),s.range&&s.range.end&&(o.offset=s.range.end-s.range.start)),t.push(o)}}function ns(t,e){let n=e.context.src[e.range.start-1];if(n!==`
`&&n!=="	"&&n!==" "){let r="Comments must be separated from other tokens by white space characters";t.push(new p.YAMLSemanticError(e,r))}}function rs(t,e){let n=String(e),r=n.substr(0,8)+"..."+n.substr(-8);return new p.YAMLSemanticError(t,`The "${r}" key is too long`)}function ss(t,e){for(let{afterKey:n,before:r,comment:s}of e){let i=t.items[r];i?(n&&i.value&&(i=i.value),s===void 0?(n||!i.commentBefore)&&(i.spaceBefore=!0):i.commentBefore?i.commentBefore+=`
`+s:i.commentBefore=s):s!==void 0&&(t.comment?t.comment+=`
`+s:t.comment=s)}}function Dn(t,e){let n=e.strValue;return n?typeof n=="string"?n:(n.errors.forEach(r=>{r.source||(r.source=e),t.errors.push(r)}),n.str):""}function Po(t,e){let{handle:n,suffix:r}=e.tag,s=t.tagPrefixes.find(i=>i.handle===n);if(!s){let i=t.getDefaults().tagPrefixes;if(i&&(s=i.find(o=>o.handle===n)),!s)throw new p.YAMLSemanticError(e,`The ${n} tag handle is non-default and was not declared.`)}if(!r)throw new p.YAMLSemanticError(e,`The ${n} tag has no suffix.`);if(n==="!"&&(t.version||t.options.version)==="1.0"){if(r[0]==="^")return t.warnings.push(new p.YAMLWarning(e,"YAML 1.0 ^ tag expansion is not supported")),r;if(/[:/]/.test(r)){let i=r.match(/^([a-z0-9-]+)\/(.*)/i);return i?`tag:${i[1]}.yaml.org,2002:${i[2]}`:`tag:${r}`}}return s.prefix+decodeURIComponent(r)}function vo(t,e){let{tag:n,type:r}=e,s=!1;if(n){let{handle:i,suffix:o,verbatim:a}=n;if(a){if(a!=="!"&&a!=="!!")return a;let c=`Verbatim tags aren't resolved, so ${a} is invalid.`;t.errors.push(new p.YAMLSemanticError(e,c))}else if(i==="!"&&!o)s=!0;else try{return Po(t,e)}catch(c){t.errors.push(c)}}switch(r){case p.Type.BLOCK_FOLDED:case p.Type.BLOCK_LITERAL:case p.Type.QUOTE_DOUBLE:case p.Type.QUOTE_SINGLE:return p.defaultTags.STR;case p.Type.FLOW_MAP:case p.Type.MAP:return p.defaultTags.MAP;case p.Type.FLOW_SEQ:case p.Type.SEQ:return p.defaultTags.SEQ;case p.Type.PLAIN:return s?p.defaultTags.STR:null;default:return null}}function Jr(t,e,n){let{tags:r}=t.schema,s=[];for(let o of r)if(o.tag===n)if(o.test)s.push(o);else{let a=o.resolve(t,e);return a instanceof Q?a:new x(a)}let i=Dn(t,e);return typeof i=="string"&&s.length>0?xn(i,s,r.scalarFallback):null}function Io({type:t}){switch(t){case p.Type.FLOW_MAP:case p.Type.MAP:return p.defaultTags.MAP;case p.Type.FLOW_SEQ:case p.Type.SEQ:return p.defaultTags.SEQ;default:return p.defaultTags.STR}}function _o(t,e,n){try{let r=Jr(t,e,n);if(r)return n&&e.tag&&(r.tag=n),r}catch(r){return r.source||(r.source=e),t.errors.push(r),null}try{let r=Io(e);if(!r)throw new Error(`The tag ${n} is unavailable`);let s=`The tag ${n} is unavailable, falling back to ${r}`;t.warnings.push(new p.YAMLWarning(e,s));let i=Jr(t,e,r);return i.tag=n,i}catch(r){let s=new p.YAMLReferenceError(e,r.message);return s.stack=r.stack,t.errors.push(s),null}}var xo=t=>{if(!t)return!1;let{type:e}=t;return e===p.Type.MAP_KEY||e===p.Type.MAP_VALUE||e===p.Type.SEQ_ITEM};function Ro(t,e){let n={before:[],after:[]},r=!1,s=!1,i=xo(e.context.parent)?e.context.parent.props.concat(e.props):e.props;for(let{start:o,end:a}of i)switch(e.context.src[o]){case p.Char.COMMENT:{if(!e.commentHasRequiredWhitespace(o)){let m="Comments must be separated from other tokens by white space characters";t.push(new p.YAMLSemanticError(e,m))}let{header:c,valueRange:l}=e;(l&&(o>l.start||c&&o>c.start)?n.after:n.before).push(e.context.src.slice(o+1,a));break}case p.Char.ANCHOR:if(r){let c="A node can have at most one anchor";t.push(new p.YAMLSemanticError(e,c))}r=!0;break;case p.Char.TAG:if(s){let c="A node can have at most one tag";t.push(new p.YAMLSemanticError(e,c))}s=!0;break}return{comments:n,hasAnchor:r,hasTag:s}}function Do(t,e){let{anchors:n,errors:r,schema:s}=t;if(e.type===p.Type.ALIAS){let o=e.rawValue,a=n.getNode(o);if(!a){let l=`Aliased anchor not found: ${o}`;return r.push(new p.YAMLReferenceError(e,l)),null}let c=new we(a);return n._cstAliases.push(c),c}let i=vo(t,e);if(i)return _o(t,e,i);if(e.type!==p.Type.PLAIN){let o=`Failed to resolve ${e.type} node here`;return r.push(new p.YAMLSyntaxError(e,o)),null}try{let o=Dn(t,e);return xn(o,s.tags,s.tags.scalarFallback)}catch(o){return o.source||(o.source=e),r.push(o),null}}function pe(t,e){if(!e)return null;e.error&&t.errors.push(e.error);let{comments:n,hasAnchor:r,hasTag:s}=Ro(t.errors,e);if(r){let{anchors:o}=t,a=e.anchor,c=o.getNode(a);c&&(o.map[o.newName(a)]=c),o.map[a]=e}if(e.type===p.Type.ALIAS&&(r||s)){let o="An alias node must not specify any properties";t.errors.push(new p.YAMLSemanticError(e,o))}let i=Do(t,e);if(i){i.range=[e.range.start,e.range.end],t.options.keepCstNodes&&(i.cstNode=e),t.options.keepNodeTypes&&(i.type=e.type);let o=n.before.join(`
`);o&&(i.commentBefore=i.commentBefore?`${i.commentBefore}
${o}`:o);let a=n.after.join(`
`);a&&(i.comment=i.comment?`${i.comment}
${a}`:a)}return e.resolved=i}function $o(t,e){if(e.type!==p.Type.MAP&&e.type!==p.Type.FLOW_MAP){let o=`A ${e.type} node cannot be resolved as a mapping`;return t.errors.push(new p.YAMLSyntaxError(e,o)),null}let{comments:n,items:r}=e.type===p.Type.FLOW_MAP?qo(t,e):Fo(t,e),s=new ct;s.items=r,ss(s,n);let i=!1;for(let o=0;o<r.length;++o){let{key:a}=r[o];if(a instanceof Q&&(i=!0),t.schema.merge&&a&&a.value===zr){r[o]=new Yt(r[o]);let c=r[o].value.items,l=null;c.some(f=>{if(f instanceof we){let{type:m}=f.source;return m===p.Type.MAP||m===p.Type.FLOW_MAP?!1:l="Merge nodes aliases can only point to maps"}return l="Merge nodes can only have Alias nodes as values"}),l&&t.errors.push(new p.YAMLSemanticError(e,l))}else for(let c=o+1;c<r.length;++c){let{key:l}=r[c];if(a===l||a&&l&&Object.prototype.hasOwnProperty.call(a,"value")&&a.value===l.value){let f=`Map keys must be unique; "${a}" is repeated`;t.errors.push(new p.YAMLSemanticError(e,f));break}}}if(i&&!t.options.mapAsMap){let o="Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.";t.warnings.push(new p.YAMLWarning(e,o))}return e.resolved=s,s}var Yo=({context:{lineStart:t,node:e,src:n},props:r})=>{if(r.length===0)return!1;let{start:s}=r[0];if(e&&s>e.valueRange.start||n[s]!==p.Char.COMMENT)return!1;for(let i=t;i<s;++i)if(n[i]===`
`)return!1;return!0};function Bo(t,e){if(!Yo(t))return;let n=t.getPropValue(0,p.Char.COMMENT,!0),r=!1,s=e.value.commentBefore;if(s&&s.startsWith(n))e.value.commentBefore=s.substr(n.length+1),r=!0;else{let i=e.value.comment;!t.node&&i&&i.startsWith(n)&&(e.value.comment=i.substr(n.length+1),r=!0)}r&&(e.comment=n)}function Fo(t,e){let n=[],r=[],s,i=null;for(let o=0;o<e.items.length;++o){let a=e.items[o];switch(a.type){case p.Type.BLANK_LINE:n.push({afterKey:!!s,before:r.length});break;case p.Type.COMMENT:n.push({afterKey:!!s,before:r.length,comment:a.comment});break;case p.Type.MAP_KEY:s!==void 0&&r.push(new T(s)),a.error&&t.errors.push(a.error),s=pe(t,a.node),i=null;break;case p.Type.MAP_VALUE:{if(s===void 0&&(s=null),a.error&&t.errors.push(a.error),!a.context.atLineStart&&a.node&&a.node.type===p.Type.MAP&&!a.node.context.atLineStart){let f="Nested mappings are not allowed in compact mappings";t.errors.push(new p.YAMLSemanticError(a.node,f))}let c=a.node;if(!c&&a.props.length>0){c=new p.PlainValue(p.Type.PLAIN,[]),c.context={parent:a,src:a.context.src};let f=a.range.start+1;if(c.range={start:f,end:f},c.valueRange={start:f,end:f},typeof a.range.origStart=="number"){let m=a.range.origStart+1;c.range.origStart=c.range.origEnd=m,c.valueRange.origStart=c.valueRange.origEnd=m}}let l=new T(s,pe(t,c));Bo(a,l),r.push(l),s&&typeof i=="number"&&a.range.start>i+1024&&t.errors.push(rs(e,s)),s=void 0,i=null}break;default:s!==void 0&&r.push(new T(s)),s=pe(t,a),i=a.range.start,a.error&&t.errors.push(a.error);e:for(let c=o+1;;++c){let l=e.items[c];switch(l&&l.type){case p.Type.BLANK_LINE:case p.Type.COMMENT:continue e;case p.Type.MAP_VALUE:break e;default:{let f="Implicit map keys need to be followed by map values";t.errors.push(new p.YAMLSemanticError(a,f));break e}}}if(a.valueRangeContainsNewline){let c="Implicit map keys need to be on a single line";t.errors.push(new p.YAMLSemanticError(a,c))}}}return s!==void 0&&r.push(new T(s)),{comments:n,items:r}}function qo(t,e){let n=[],r=[],s,i=!1,o="{";for(let a=0;a<e.items.length;++a){let c=e.items[a];if(typeof c.char=="string"){let{char:l,offset:f}=c;if(l==="?"&&s===void 0&&!i){i=!0,o=":";continue}if(l===":"){if(s===void 0&&(s=null),o===":"){o=",";continue}}else if(i&&(s===void 0&&l!==","&&(s=null),i=!1),s!==void 0&&(r.push(new T(s)),s=void 0,l===",")){o=":";continue}if(l==="}"){if(a===e.items.length-1)continue}else if(l===o){o=":";continue}let m=`Flow map contains an unexpected ${l}`,g=new p.YAMLSyntaxError(e,m);g.offset=f,t.errors.push(g)}else c.type===p.Type.BLANK_LINE?n.push({afterKey:!!s,before:r.length}):c.type===p.Type.COMMENT?(ns(t.errors,c),n.push({afterKey:!!s,before:r.length,comment:c.comment})):s===void 0?(o===","&&t.errors.push(new p.YAMLSemanticError(c,"Separator , missing in flow map")),s=pe(t,c)):(o!==","&&t.errors.push(new p.YAMLSemanticError(c,"Indicator : missing in flow map entry")),r.push(new T(s,pe(t,c))),s=void 0,i=!1)}return ts(t.errors,e),s!==void 0&&r.push(new T(s)),{comments:n,items:r}}function Uo(t,e){if(e.type!==p.Type.SEQ&&e.type!==p.Type.FLOW_SEQ){let i=`A ${e.type} node cannot be resolved as a sequence`;return t.errors.push(new p.YAMLSyntaxError(e,i)),null}let{comments:n,items:r}=e.type===p.Type.FLOW_SEQ?Wo(t,e):Vo(t,e),s=new ue;if(s.items=r,ss(s,n),!t.options.mapAsMap&&r.some(i=>i instanceof T&&i.key instanceof Q)){let i="Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.";t.warnings.push(new p.YAMLWarning(e,i))}return e.resolved=s,s}function Vo(t,e){let n=[],r=[];for(let s=0;s<e.items.length;++s){let i=e.items[s];switch(i.type){case p.Type.BLANK_LINE:n.push({before:r.length});break;case p.Type.COMMENT:n.push({comment:i.comment,before:r.length});break;case p.Type.SEQ_ITEM:if(i.error&&t.errors.push(i.error),r.push(pe(t,i.node)),i.hasProps){let o="Sequence items cannot have tags or anchors before the - indicator";t.errors.push(new p.YAMLSemanticError(i,o))}break;default:i.error&&t.errors.push(i.error),t.errors.push(new p.YAMLSyntaxError(i,`Unexpected ${i.type} node in sequence`))}}return{comments:n,items:r}}function Wo(t,e){let n=[],r=[],s=!1,i,o=null,a="[",c=null;for(let l=0;l<e.items.length;++l){let f=e.items[l];if(typeof f.char=="string"){let{char:m,offset:g}=f;if(m!==":"&&(s||i!==void 0)&&(s&&i===void 0&&(i=a?r.pop():null),r.push(new T(i)),s=!1,i=void 0,o=null),m===a)a=null;else if(!a&&m==="?")s=!0;else if(a!=="["&&m===":"&&i===void 0){if(a===","){if(i=r.pop(),i instanceof T){let y="Chaining flow sequence pairs is invalid",h=new p.YAMLSemanticError(e,y);h.offset=g,t.errors.push(h)}if(!s&&typeof o=="number"){let y=f.range?f.range.start:f.offset;y>o+1024&&t.errors.push(rs(e,i));let{src:h}=c.context;for(let d=o;d<y;++d)if(h[d]===`
`){let w="Implicit keys of flow sequence pairs need to be on a single line";t.errors.push(new p.YAMLSemanticError(c,w));break}}}else i=null;o=null,s=!1,a=null}else if(a==="["||m!=="]"||l<e.items.length-1){let y=`Flow sequence contains an unexpected ${m}`,h=new p.YAMLSyntaxError(e,y);h.offset=g,t.errors.push(h)}}else if(f.type===p.Type.BLANK_LINE)n.push({before:r.length});else if(f.type===p.Type.COMMENT)ns(t.errors,f),n.push({comment:f.comment,before:r.length});else{if(a){let g=`Expected a ${a} in flow sequence`;t.errors.push(new p.YAMLSemanticError(f,g))}let m=pe(t,f);i===void 0?(r.push(m),c=f):(r.push(new T(i,m)),i=void 0),o=f.range.start,a=","}}return ts(t.errors,e),i!==void 0&&r.push(new T(i)),{comments:n,items:r}}M.Alias=we;M.Collection=Q;M.Merge=Yt;M.Node=j;M.Pair=T;M.Scalar=x;M.YAMLMap=ct;M.YAMLSeq=ue;M.addComment=Re;M.binaryOptions=No;M.boolOptions=Oo;M.findPair=at;M.intOptions=Ao;M.isEmptyPath=Xr;M.nullOptions=Lo;M.resolveMap=$o;M.resolveNode=pe;M.resolveSeq=Uo;M.resolveString=Dn;M.strOptions=be;M.stringifyNumber=ko;M.stringifyString=Mo;M.toJSON=fe});var Fn=ne(ee=>{"use strict";var G=ce(),O=De(),Ko={identify:t=>t instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve:(t,e)=>{let n=O.resolveString(t,e);if(typeof Buffer=="function")return Buffer.from(n,"base64");if(typeof atob=="function"){let r=atob(n.replace(/[\n\r]/g,"")),s=new Uint8Array(r.length);for(let i=0;i<r.length;++i)s[i]=r.charCodeAt(i);return s}else{let r="This environment does not support reading binary tags; either Buffer or atob is required";return t.errors.push(new G.YAMLReferenceError(e,r)),null}},options:O.binaryOptions,stringify:({comment:t,type:e,value:n},r,s,i)=>{let o;if(typeof Buffer=="function")o=n instanceof Buffer?n.toString("base64"):Buffer.from(n.buffer).toString("base64");else if(typeof btoa=="function"){let a="";for(let c=0;c<n.length;++c)a+=String.fromCharCode(n[c]);o=btoa(a)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e||(e=O.binaryOptions.defaultType),e===G.Type.QUOTE_DOUBLE)n=o;else{let{lineWidth:a}=O.binaryOptions,c=Math.ceil(o.length/a),l=new Array(c);for(let f=0,m=0;f<c;++f,m+=a)l[f]=o.substr(m,a);n=l.join(e===G.Type.BLOCK_LITERAL?`
`:" ")}return O.stringifyString({comment:t,type:e,value:n},r,s,i)}};function os(t,e){let n=O.resolveSeq(t,e);for(let r=0;r<n.items.length;++r){let s=n.items[r];if(!(s instanceof O.Pair)){if(s instanceof O.YAMLMap){if(s.items.length>1){let o="Each pair must have its own sequence indicator";throw new G.YAMLSemanticError(e,o)}let i=s.items[0]||new O.Pair;s.commentBefore&&(i.commentBefore=i.commentBefore?`${s.commentBefore}
${i.commentBefore}`:s.commentBefore),s.comment&&(i.comment=i.comment?`${s.comment}
${i.comment}`:s.comment),s=i}n.items[r]=s instanceof O.Pair?s:new O.Pair(s)}}return n}function as(t,e,n){let r=new O.YAMLSeq(t);r.tag="tag:yaml.org,2002:pairs";for(let s of e){let i,o;if(Array.isArray(s))if(s.length===2)i=s[0],o=s[1];else throw new TypeError(`Expected [key, value] tuple: ${s}`);else if(s&&s instanceof Object){let c=Object.keys(s);if(c.length===1)i=c[0],o=s[i];else throw new TypeError(`Expected { key: value } tuple: ${s}`)}else i=s;let a=t.createPair(i,o,n);r.items.push(a)}return r}var jo={default:!1,tag:"tag:yaml.org,2002:pairs",resolve:os,createNode:as},$e=class t extends O.YAMLSeq{constructor(){super(),G._defineProperty(this,"add",O.YAMLMap.prototype.add.bind(this)),G._defineProperty(this,"delete",O.YAMLMap.prototype.delete.bind(this)),G._defineProperty(this,"get",O.YAMLMap.prototype.get.bind(this)),G._defineProperty(this,"has",O.YAMLMap.prototype.has.bind(this)),G._defineProperty(this,"set",O.YAMLMap.prototype.set.bind(this)),this.tag=t.tag}toJSON(e,n){let r=new Map;n&&n.onCreate&&n.onCreate(r);for(let s of this.items){let i,o;if(s instanceof O.Pair?(i=O.toJSON(s.key,"",n),o=O.toJSON(s.value,i,n)):i=O.toJSON(s,"",n),r.has(i))throw new Error("Ordered maps must not include duplicate keys");r.set(i,o)}return r}};G._defineProperty($e,"tag","tag:yaml.org,2002:omap");function Qo(t,e){let n=os(t,e),r=[];for(let{key:s}of n.items)if(s instanceof O.Scalar)if(r.includes(s.value)){let i="Ordered maps must not include duplicate keys";throw new G.YAMLSemanticError(e,i)}else r.push(s.value);return Object.assign(new $e,n)}function Go(t,e,n){let r=as(t,e,n),s=new $e;return s.items=r.items,s}var Ho={identify:t=>t instanceof Map,nodeClass:$e,default:!1,tag:"tag:yaml.org,2002:omap",resolve:Qo,createNode:Go},Ye=class t extends O.YAMLMap{constructor(){super(),this.tag=t.tag}add(e){let n=e instanceof O.Pair?e:new O.Pair(e);O.findPair(this.items,n.key)||this.items.push(n)}get(e,n){let r=O.findPair(this.items,e);return!n&&r instanceof O.Pair?r.key instanceof O.Scalar?r.key.value:r.key:r}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 r=O.findPair(this.items,e);r&&!n?this.items.splice(this.items.indexOf(r),1):!r&&n&&this.items.push(new O.Pair(e))}toJSON(e,n){return super.toJSON(e,n,Set)}toString(e,n,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues())return super.toString(e,n,r);throw new Error("Set items must all have null values")}};G._defineProperty(Ye,"tag","tag:yaml.org,2002:set");function Jo(t,e){let n=O.resolveMap(t,e);if(!n.hasAllNullValues())throw new G.YAMLSemanticError(e,"Set items must all have null values");return Object.assign(new Ye,n)}function Xo(t,e,n){let r=new Ye;for(let s of e)r.items.push(t.createPair(s,null,n));return r}var zo={identify:t=>t instanceof Set,nodeClass:Ye,default:!1,tag:"tag:yaml.org,2002:set",resolve:Jo,createNode:Xo},$n=(t,e)=>{let n=e.split(":").reduce((r,s)=>r*60+Number(s),0);return t==="-"?-n:n},cs=({value:t})=>{if(isNaN(t)||!isFinite(t))return O.stringifyNumber(t);let e="";t<0&&(e="-",t=Math.abs(t));let n=[t%60];return t<60?n.unshift(0):(t=Math.round((t-n[0])/60),n.unshift(t%60),t>=60&&(t=Math.round((t-n[0])/60),n.unshift(t))),e+n.map(r=>r<10?"0"+String(r):String(r)).join(":").replace(/000000\d*$/,"")},Zo={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/,resolve:(t,e,n)=>$n(e,n.replace(/_/g,"")),stringify:cs},ea={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*)$/,resolve:(t,e,n)=>$n(e,n.replace(/_/g,"")),stringify:cs},ta={identify:t=>t instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^(?:([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?)$"),resolve:(t,e,n,r,s,i,o,a,c)=>{a&&(a=(a+"00").substr(1,3));let l=Date.UTC(e,n-1,r,s||0,i||0,o||0,a||0);if(c&&c!=="Z"){let f=$n(c[0],c.slice(1));Math.abs(f)<30&&(f*=60),l-=6e4*f}return new Date(l)},stringify:({value:t})=>t.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")};function Yn(t){let e={};return t?typeof YAML_SILENCE_DEPRECATION_WARNINGS<"u"?!YAML_SILENCE_DEPRECATION_WARNINGS:!e.YAML_SILENCE_DEPRECATION_WARNINGS:typeof YAML_SILENCE_WARNINGS<"u"?!YAML_SILENCE_WARNINGS:!e.YAML_SILENCE_WARNINGS}function Bn(t,e){Yn(!1)&&console.warn(e?`${e}: ${t}`:t)}function na(t){if(Yn(!0)){let e=t.replace(/.*yaml[/\\]/i,"").replace(/\.js$/,"").replace(/\\/g,"/");Bn(`The endpoint 'yaml/${e}' will be removed in a future release.`,"DeprecationWarning")}}var is={};function ra(t,e){if(!is[t]&&Yn(!0)){is[t]=!0;let n=`The option '${t}' will be removed in a future release`;n+=e?`, use '${e}' instead.`:".",Bn(n,"DeprecationWarning")}}ee.binary=Ko;ee.floatTime=ea;ee.intTime=Zo;ee.omap=Ho;ee.pairs=jo;ee.set=zo;ee.timestamp=ta;ee.warn=Bn;ee.warnFileDeprecation=na;ee.warnOptionDeprecation=ra});var Wn=ne(bs=>{"use strict";var Vt=ce(),E=De(),$=Fn();function sa(t,e,n){let r=new E.YAMLMap(t);if(e instanceof Map)for(let[s,i]of e)r.items.push(t.createPair(s,i,n));else if(e&&typeof e=="object")for(let s of Object.keys(e))r.items.push(t.createPair(s,e[s],n));return typeof t.sortMapEntries=="function"&&r.items.sort(t.sortMapEntries),r}var ft={createNode:sa,default:!0,nodeClass:E.YAMLMap,tag:"tag:yaml.org,2002:map",resolve:E.resolveMap};function ia(t,e,n){let r=new E.YAMLSeq(t);if(e&&e[Symbol.iterator])for(let s of e){let i=t.createNode(s,n.wrapScalars,null,n);r.items.push(i)}return r}var Wt={createNode:ia,default:!0,nodeClass:E.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve:E.resolveSeq},oa={identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:E.resolveString,stringify(t,e,n,r){return e=Object.assign({actualString:!0},e),E.stringifyString(t,e,n,r)},options:E.strOptions},Un=[ft,Wt,oa],Kt=t=>typeof t=="bigint"||Number.isInteger(t),Vn=(t,e,n)=>E.intOptions.asBigInt?BigInt(t):parseInt(e,n);function us(t,e,n){let{value:r}=t;return Kt(r)&&r>=0?n+r.toString(e):E.stringifyNumber(t)}var ps={identify:t=>t==null,createNode:(t,e,n)=>n.wrapScalars?new E.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>null,options:E.nullOptions,stringify:()=>E.nullOptions.nullStr},ms={identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>t[0]==="t"||t[0]==="T",options:E.boolOptions,stringify:({value:t})=>t?E.boolOptions.trueStr:E.boolOptions.falseStr},hs={identify:t=>Kt(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o([0-7]+)$/,resolve:(t,e)=>Vn(t,e,8),options:E.intOptions,stringify:t=>us(t,8,"0o")},ds={identify:Kt,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:t=>Vn(t,t,10),options:E.intOptions,stringify:E.stringifyNumber},gs={identify:t=>Kt(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x([0-9a-fA-F]+)$/,resolve:(t,e)=>Vn(t,e,16),options:E.intOptions,stringify:t=>us(t,16,"0x")},ys={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:(t,e)=>e?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:E.stringifyNumber},Es={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t),stringify:({value:t})=>Number(t).toExponential()},Ss={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.([0-9]+)|[0-9]+\.([0-9]*))$/,resolve(t,e,n){let r=e||n,s=new E.Scalar(parseFloat(t));return r&&r[r.length-1]==="0"&&(s.minFractionDigits=r.length),s},stringify:E.stringifyNumber},aa=Un.concat([ps,ms,hs,ds,gs,ys,Es,Ss]),ls=t=>typeof t=="bigint"||Number.isInteger(t),qt=({value:t})=>JSON.stringify(t),ws=[ft,Wt,{identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:E.resolveString,stringify:qt},{identify:t=>t==null,createNode:(t,e,n)=>n.wrapScalars?new E.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:qt},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:t=>t==="true",stringify:qt},{identify:ls,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:t=>E.intOptions.asBigInt?BigInt(t):parseInt(t,10),stringify:({value:t})=>ls(t)?t.toString():JSON.stringify(t)},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:t=>parseFloat(t),stringify:qt}];ws.scalarFallback=t=>{throw new SyntaxError(`Unresolved plain scalar ${JSON.stringify(t)}`)};var fs=({value:t})=>t?E.boolOptions.trueStr:E.boolOptions.falseStr,lt=t=>typeof t=="bigint"||Number.isInteger(t);function Ut(t,e,n){let r=e.replace(/_/g,"");if(E.intOptions.asBigInt){switch(n){case 2:r=`0b${r}`;break;case 8:r=`0o${r}`;break;case 16:r=`0x${r}`;break}let i=BigInt(r);return t==="-"?BigInt(-1)*i:i}let s=parseInt(r,n);return t==="-"?-1*s:s}function qn(t,e,n){let{value:r}=t;if(lt(r)){let s=r.toString(e);return r<0?"-"+n+s.substr(1):n+s}return E.stringifyNumber(t)}var ca=Un.concat([{identify:t=>t==null,createNode:(t,e,n)=>n.wrapScalars?new E.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>null,options:E.nullOptions,stringify:()=>E.nullOptions.nullStr},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>!0,options:E.boolOptions,stringify:fs},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:()=>!1,options:E.boolOptions,stringify:fs},{identify:lt,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^([-+]?)0b([0-1_]+)$/,resolve:(t,e,n)=>Ut(e,n,2),stringify:t=>qn(t,2,"0b")},{identify:lt,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^([-+]?)0([0-7_]+)$/,resolve:(t,e,n)=>Ut(e,n,8),stringify:t=>qn(t,8,"0")},{identify:lt,default:!0,tag:"tag:yaml.org,2002:int",test:/^([-+]?)([0-9][0-9_]*)$/,resolve:(t,e,n)=>Ut(e,n,10),stringify:E.stringifyNumber},{identify:lt,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^([-+]?)0x([0-9a-fA-F_]+)$/,resolve:(t,e,n)=>Ut(e,n,16),stringify:t=>qn(t,16,"0x")},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:(t,e)=>e?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:E.stringifyNumber},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?([0-9][0-9_]*)?(\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t.replace(/_/g,"")),stringify:({value:t})=>Number(t).toExponential()},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.([0-9_]*)$/,resolve(t,e){let n=new E.Scalar(parseFloat(t.replace(/_/g,"")));if(e){let r=e.replace(/_/g,"");r[r.length-1]==="0"&&(n.minFractionDigits=r.length)}return n},stringify:E.stringifyNumber}],$.binary,$.omap,$.pairs,$.set,$.intTime,$.floatTime,$.timestamp),la={core:aa,failsafe:Un,json:ws,yaml11:ca},fa={binary:$.binary,bool:ms,float:Ss,floatExp:Es,floatNaN:ys,floatTime:$.floatTime,int:ds,intHex:gs,intOct:hs,intTime:$.intTime,map:ft,null:ps,omap:$.omap,pairs:$.pairs,seq:Wt,set:$.set,timestamp:$.timestamp};function ua(t,e,n){if(e){let r=n.filter(i=>i.tag===e),s=r.find(i=>!i.format)||r[0];if(!s)throw new Error(`Tag ${e} not found`);return s}return n.find(r=>(r.identify&&r.identify(t)||r.class&&t instanceof r.class)&&!r.format)}function pa(t,e,n){if(t instanceof E.Node)return t;let{defaultPrefix:r,onTagObj:s,prevObjects:i,schema:o,wrapScalars:a}=n;e&&e.startsWith("!!")&&(e=r+e.slice(2));let c=ua(t,e,o.tags);if(!c){if(typeof t.toJSON=="function"&&(t=t.toJSON()),!t||typeof t!="object")return a?new E.Scalar(t):t;c=t instanceof Map?ft:t[Symbol.iterator]?Wt:ft}s&&(s(c),delete n.onTagObj);let l={value:void 0,node:void 0};if(t&&typeof t=="object"&&i){let f=i.get(t);if(f){let m=new E.Alias(f);return n.aliasNodes.push(m),m}l.value=t,i.set(t,l)}return l.node=c.createNode?c.createNode(n.schema,t,n):a?new E.Scalar(t):t,e&&l.node instanceof E.Node&&(l.node.tag=e),l.node}function ma(t,e,n,r){let s=t[r.replace(/\W/g,"")];if(!s){let i=Object.keys(t).map(o=>JSON.stringify(o)).join(", ");throw new Error(`Unknown schema "${r}"; use one of ${i}`)}if(Array.isArray(n))for(let i of n)s=s.concat(i);else typeof n=="function"&&(s=n(s.slice()));for(let i=0;i<s.length;++i){let o=s[i];if(typeof o=="string"){let a=e[o];if(!a){let c=Object.keys(e).map(l=>JSON.stringify(l)).join(", ");throw new Error(`Unknown custom tag "${o}"; use one of ${c}`)}s[i]=a}}return s}var ha=(t,e)=>t.key<e.key?-1:t.key>e.key?1:0,ut=class t{constructor({customTags:e,merge:n,schema:r,sortMapEntries:s,tags:i}){this.merge=!!n,this.name=r,this.sortMapEntries=s===!0?ha:s||null,!e&&i&&$.warnOptionDeprecation("tags","customTags"),this.tags=ma(la,fa,e||i,r)}createNode(e,n,r,s){let i={defaultPrefix:t.defaultPrefix,schema:this,wrapScalars:n},o=s?Object.assign(s,i):i;return pa(e,r,o)}createPair(e,n,r){r||(r={wrapScalars:!0});let s=this.createNode(e,r.wrapScalars,null,r),i=this.createNode(n,r.wrapScalars,null,r);return new E.Pair(s,i)}};Vt._defineProperty(ut,"defaultPrefix",Vt.defaultTagPrefix);Vt._defineProperty(ut,"defaultTags",Vt.defaultTags);bs.Schema=ut});var Ls=ne(Ht=>{"use strict";var Y=ce(),S=De(),Ns=Wn(),da={anchorPrefix:"a",customTags:null,indent:2,indentSeq:!0,keepCstNodes:!1,keepNodeTypes:!0,keepBlobsInJSON:!0,mapAsMap:!1,maxAliasCount:100,prettyErrors:!1,simpleKeys:!1,version:"1.2"},ga={get binary(){return S.binaryOptions},set binary(t){Object.assign(S.binaryOptions,t)},get bool(){return S.boolOptions},set bool(t){Object.assign(S.boolOptions,t)},get int(){return S.intOptions},set int(t){Object.assign(S.intOptions,t)},get null(){return S.nullOptions},set null(t){Object.assign(S.nullOptions,t)},get str(){return S.strOptions},set str(t){Object.assign(S.strOptions,t)}},As={"1.0":{schema:"yaml-1.1",merge:!0,tagPrefixes:[{handle:"!",prefix:Y.defaultTagPrefix},{handle:"!!",prefix:"tag:private.yaml.org,2002:"}]},1.1:{schema:"yaml-1.1",merge:!0,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:Y.defaultTagPrefix}]},1.2:{schema:"core",merge:!1,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:Y.defaultTagPrefix}]}};function Os(t,e){if((t.version||t.options.version)==="1.0"){let s=e.match(/^tag:private\.yaml\.org,2002:([^:/]+)$/);if(s)return"!"+s[1];let i=e.match(/^tag:([a-zA-Z0-9-]+)\.yaml\.org,2002:(.*)/);return i?`!${i[1]}/${i[2]}`:`!${e.replace(/^tag:/,"")}`}let n=t.tagPrefixes.find(s=>e.indexOf(s.prefix)===0);if(!n){let s=t.getDefaults().tagPrefixes;n=s&&s.find(i=>e.indexOf(i.prefix)===0)}if(!n)return e[0]==="!"?e:`!<${e}>`;let r=e.substr(n.prefix.length).replace(/[!,[\]{}]/g,s=>({"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"})[s]);return n.handle+r}function ya(t,e){if(e instanceof S.Alias)return S.Alias;if(e.tag){let s=t.filter(i=>i.tag===e.tag);if(s.length>0)return s.find(i=>i.format===e.format)||s[0]}let n,r;if(e instanceof S.Scalar){r=e.value;let s=t.filter(i=>i.identify&&i.identify(r)||i.class&&r instanceof i.class);n=s.find(i=>i.format===e.format)||s.find(i=>!i.format)}else r=e,n=t.find(s=>s.nodeClass&&r instanceof s.nodeClass);if(!n){let s=r&&r.constructor?r.constructor.name:typeof r;throw new Error(`Tag not resolved for ${s} value`)}return n}function Ea(t,e,{anchors:n,doc:r}){let s=[],i=r.anchors.getName(t);return i&&(n[i]=t,s.push(`&${i}`)),t.tag?s.push(Os(r,t.tag)):e.default||s.push(Os(r,e.tag)),s.join(" ")}function jt(t,e,n,r){let{anchors:s,schema:i}=e.doc,o;if(!(t instanceof S.Node)){let l={aliasNodes:[],onTagObj:f=>o=f,prevObjects:new Map};t=i.createNode(t,!0,null,l);for(let f of l.aliasNodes){f.source=f.source.node;let m=s.getName(f.source);m||(m=s.newName(),s.map[m]=f.source)}}if(t instanceof S.Pair)return t.toString(e,n,r);o||(o=ya(i.tags,t));let a=Ea(t,o,e);a.length>0&&(e.indentAtStart=(e.indentAtStart||0)+a.length+1);let c=typeof o.stringify=="function"?o.stringify(t,e,n,r):t instanceof S.Scalar?S.stringifyString(t,e,n,r):t.toString(e,n,r);return a?t instanceof S.Scalar||c[0]==="{"||c[0]==="["?`${a} ${c}`:`${a}
${e.indent}${c}`:c}var Kn=class t{static validAnchorNode(e){return e instanceof S.Scalar||e instanceof S.YAMLSeq||e instanceof S.YAMLMap}constructor(e){Y._defineProperty(this,"map",Object.create(null)),this.prefix=e}createAlias(e,n){return this.setAnchor(e,n),new S.Alias(e)}createMergePair(...e){let n=new S.Merge;return n.value.items=e.map(r=>{if(r instanceof S.Alias){if(r.source instanceof S.YAMLMap)return r}else if(r instanceof S.YAMLMap)return this.createAlias(r);throw new Error("Merge sources must be Map nodes or their Aliases")}),n}getName(e){let{map:n}=this;return Object.keys(n).find(r=>n[r]===e)}getNames(){return Object.keys(this.map)}getNode(e){return this.map[e]}newName(e){e||(e=this.prefix);let n=Object.keys(this.map);for(let r=1;;++r){let s=`${e}${r}`;if(!n.includes(s))return s}}resolveNodes(){let{map:e,_cstAliases:n}=this;Object.keys(e).forEach(r=>{e[r]=e[r].resolved}),n.forEach(r=>{r.source=r.source.resolved}),delete this._cstAliases}setAnchor(e,n){if(e!=null&&!t.validAnchorNode(e))throw new Error("Anchors may only be set for Scalar, Seq and Map nodes");if(n&&/[\x00-\x19\s,[\]{}]/.test(n))throw new Error("Anchor names must not contain whitespace or control characters");let{map:r}=this,s=e&&Object.keys(r).find(i=>r[i]===e);if(s)if(n)s!==n&&(delete r[s],r[n]=e);else return s;else{if(!n){if(!e)return null;n=this.newName()}r[n]=e}return n}},Qt=(t,e)=>{if(t&&typeof t=="object"){let{tag:n}=t;t instanceof S.Collection?(n&&(e[n]=!0),t.items.forEach(r=>Qt(r,e))):t instanceof S.Pair?(Qt(t.key,e),Qt(t.value,e)):t instanceof S.Scalar&&n&&(e[n]=!0)}return e},Sa=t=>Object.keys(Qt(t,{}));function wa(t,e){let n={before:[],after:[]},r,s=!1;for(let i of e)if(i.valueRange){if(r!==void 0){let a="Document contains trailing content not separated by a ... or --- line";t.errors.push(new Y.YAMLSyntaxError(i,a));break}let o=S.resolveNode(t,i);s&&(o.spaceBefore=!0,s=!1),r=o}else i.comment!==null?(r===void 0?n.before:n.after).push(i.comment):i.type===Y.Type.BLANK_LINE&&(s=!0,r===void 0&&n.before.length>0&&!t.commentBefore&&(t.commentBefore=n.before.join(`
`),n.before=[]));if(t.contents=r||null,!r)t.comment=n.before.concat(n.after).join(`
`)||null;else{let i=n.before.join(`
`);if(i){let o=r instanceof S.Collection&&r.items[0]?r.items[0]:r;o.commentBefore=o.commentBefore?`${i}
${o.commentBefore}`:i}t.comment=n.after.join(`
`)||null}}function ba({tagPrefixes:t},e){let[n,r]=e.parameters;if(!n||!r){let s="Insufficient parameters given for %TAG directive";throw new Y.YAMLSemanticError(e,s)}if(t.some(s=>s.handle===n)){let s="The %TAG directive must only be given at most once per handle in the same document.";throw new Y.YAMLSemanticError(e,s)}return{handle:n,prefix:r}}function Na(t,e){let[n]=e.parameters;if(e.name==="YAML:1.0"&&(n="1.0"),!n){let r="Insufficient parameters given for %YAML directive";throw new Y.YAMLSemanticError(e,r)}if(!As[n]){let s=`Document will be parsed as YAML ${t.version||t.options.version} rather than YAML ${n}`;t.warnings.push(new Y.YAMLWarning(e,s))}return n}function Oa(t,e,n){let r=[],s=!1;for(let i of e){let{comment:o,name:a}=i;switch(a){case"TAG":try{t.tagPrefixes.push(ba(t,i))}catch(c){t.errors.push(c)}s=!0;break;case"YAML":case"YAML:1.0":if(t.version){let c="The %YAML directive must only be given at most once per document.";t.errors.push(new Y.YAMLSemanticError(i,c))}try{t.version=Na(t,i)}catch(c){t.errors.push(c)}s=!0;break;default:if(a){let c=`YAML only supports %TAG and %YAML directives, and not %${a}`;t.warnings.push(new Y.YAMLWarning(i,c))}}o&&r.push(o)}if(n&&!s&&(t.version||n.version||t.options.version)==="1.1"){let i=({handle:o,prefix:a})=>({handle:o,prefix:a});t.tagPrefixes=n.tagPrefixes.map(i),t.version=n.version}t.commentBefore=r.join(`
`)||null}function Be(t){if(t instanceof S.Collection)return!0;throw new Error("Expected a YAML collection as document contents")}var Gt=class t{constructor(e){this.anchors=new Kn(e.anchorPrefix),this.commentBefore=null,this.comment=null,this.contents=null,this.directivesEndMarker=null,this.errors=[],this.options=e,this.schema=null,this.tagPrefixes=[],this.version=null,this.warnings=[]}add(e){return Be(this.contents),this.contents.add(e)}addIn(e,n){Be(this.contents),this.contents.addIn(e,n)}delete(e){return Be(this.contents),this.contents.delete(e)}deleteIn(e){return S.isEmptyPath(e)?this.contents==null?!1:(this.contents=null,!0):(Be(this.contents),this.contents.deleteIn(e))}getDefaults(){return t.defaults[this.version]||t.defaults[this.options.version]||{}}get(e,n){return this.contents instanceof S.Collection?this.contents.get(e,n):void 0}getIn(e,n){return S.isEmptyPath(e)?!n&&this.contents instanceof S.Scalar?this.contents.value:this.contents:this.contents instanceof S.Collection?this.contents.getIn(e,n):void 0}has(e){return this.contents instanceof S.Collection?this.contents.has(e):!1}hasIn(e){return S.isEmptyPath(e)?this.contents!==void 0:this.contents instanceof S.Collection?this.contents.hasIn(e):!1}set(e,n){Be(this.contents),this.contents.set(e,n)}setIn(e,n){S.isEmptyPath(e)?this.contents=n:(Be(this.contents),this.contents.setIn(e,n))}setSchema(e,n){if(!e&&!n&&this.schema)return;typeof e=="number"&&(e=e.toFixed(1)),e==="1.0"||e==="1.1"||e==="1.2"?(this.version?this.version=e:this.options.version=e,delete this.options.schema):e&&typeof e=="string"&&(this.options.schema=e),Array.isArray(n)&&(this.options.customTags=n);let r=Object.assign({},this.getDefaults(),this.options);this.schema=new Ns.Schema(r)}parse(e,n){this.options.keepCstNodes&&(this.cstNode=e),this.options.keepNodeTypes&&(this.type="DOCUMENT");let{directives:r=[],contents:s=[],directivesEndMarker:i,error:o,valueRange:a}=e;if(o&&(o.source||(o.source=this),this.errors.push(o)),Oa(this,r,n),i&&(this.directivesEndMarker=!0),this.range=a?[a.start,a.end]:null,this.setSchema(),this.anchors._cstAliases=[],wa(this,s),this.anchors.resolveNodes(),this.options.prettyErrors){for(let c of this.errors)c instanceof Y.YAMLError&&c.makePretty();for(let c of this.warnings)c instanceof Y.YAMLError&&c.makePretty()}return this}listNonDefaultTags(){return Sa(this.contents).filter(e=>e.indexOf(Ns.Schema.defaultPrefix)!==0)}setTagPrefix(e,n){if(e[0]!=="!"||e[e.length-1]!=="!")throw new Error("Handle must start and end with !");if(n){let r=this.tagPrefixes.find(s=>s.handle===e);r?r.prefix=n:this.tagPrefixes.push({handle:e,prefix:n})}else this.tagPrefixes=this.tagPrefixes.filter(r=>r.handle!==e)}toJSON(e,n){let{keepBlobsInJSON:r,mapAsMap:s,maxAliasCount:i}=this.options,o=r&&(typeof e!="string"||!(this.contents instanceof S.Scalar)),a={doc:this,indentStep:"  ",keep:o,mapAsMap:o&&!!s,maxAliasCount:i,stringify:jt},c=Object.keys(this.anchors.map);c.length>0&&(a.anchors=new Map(c.map(f=>[this.anchors.map[f],{alias:[],aliasCount:0,count:1}])));let l=S.toJSON(this.contents,e,a);if(typeof n=="function"&&a.anchors)for(let{count:f,res:m}of a.anchors.values())n(m,f);return l}toString(){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");let e=this.options.indent;if(!Number.isInteger(e)||e<=0){let c=JSON.stringify(e);throw new Error(`"indent" option must be a positive integer, not ${c}`)}this.setSchema();let n=[],r=!1;if(this.version){let c="%YAML 1.2";this.schema.name==="yaml-1.1"&&(this.version==="1.0"?c="%YAML:1.0":this.version==="1.1"&&(c="%YAML 1.1")),n.push(c),r=!0}let s=this.listNonDefaultTags();this.tagPrefixes.forEach(({handle:c,prefix:l})=>{s.some(f=>f.indexOf(l)===0)&&(n.push(`%TAG ${c} ${l}`),r=!0)}),(r||this.directivesEndMarker)&&n.push("---"),this.commentBefore&&((r||!this.directivesEndMarker)&&n.unshift(""),n.unshift(this.commentBefore.replace(/^/gm,"#")));let i={anchors:Object.create(null),doc:this,indent:"",indentStep:" ".repeat(e),stringify:jt},o=!1,a=null;if(this.contents){this.contents instanceof S.Node&&(this.contents.spaceBefore&&(r||this.directivesEndMarker)&&n.push(""),this.contents.commentBefore&&n.push(this.contents.commentBefore.replace(/^/gm,"#")),i.forceBlockIndent=!!this.comment,a=this.contents.comment);let c=a?null:()=>o=!0,l=jt(this.contents,i,()=>a=null,c);n.push(S.addComment(l,"",a))}else this.contents!==void 0&&n.push(jt(this.contents,i));return this.comment&&((!o||a)&&n[n.length-1]!==""&&n.push(""),n.push(this.comment.replace(/^/gm,"#"))),n.join(`
`)+`
`}};Y._defineProperty(Gt,"defaults",As);Ht.Document=Gt;Ht.defaultOptions=da;Ht.scalarOptions=ga});var Ms=ne(Cs=>{"use strict";var jn=Qr(),Ne=Ls(),Aa=Wn(),La=ce(),Ta=Fn();De();function Ca(t,e=!0,n){n===void 0&&typeof e=="string"&&(n=e,e=!0);let r=Object.assign({},Ne.Document.defaults[Ne.defaultOptions.version],Ne.defaultOptions);return new Aa.Schema(r).createNode(t,e,n)}var Fe=class extends Ne.Document{constructor(e){super(Object.assign({},Ne.defaultOptions,e))}};function Ma(t,e){let n=[],r;for(let s of jn.parse(t)){let i=new Fe(e);i.parse(s,r),n.push(i),r=i}return n}function Ts(t,e){let n=jn.parse(t),r=new Fe(e).parse(n[0]);if(n.length>1){let s="Source contains multiple documents; please use YAML.parseAllDocuments()";r.errors.unshift(new La.YAMLSemanticError(n[1],s))}return r}function ka(t,e){let n=Ts(t,e);if(n.warnings.forEach(r=>Ta.warn(r)),n.errors.length>0)throw n.errors[0];return n.toJSON()}function Pa(t,e){let n=new Fe(e);return n.contents=t,String(n)}var va={createNode:Ca,defaultOptions:Ne.defaultOptions,Document:Fe,parse:ka,parseAllDocuments:Ma,parseCST:jn.parse,parseDocument:Ts,scalarOptions:Ne.scalarOptions,stringify:Pa};Cs.YAML=va});var Ps=ne((Af,ks)=>{ks.exports=Ms().YAML});var vs=ne(H=>{"use strict";var qe=De(),Ue=ce();H.findPair=qe.findPair;H.parseMap=qe.resolveMap;H.parseSeq=qe.resolveSeq;H.stringifyNumber=qe.stringifyNumber;H.stringifyString=qe.stringifyString;H.toJSON=qe.toJSON;H.Type=Ue.Type;H.YAMLError=Ue.YAMLError;H.YAMLReferenceError=Ue.YAMLReferenceError;H.YAMLSemanticError=Ue.YAMLSemanticError;H.YAMLSyntaxError=Ue.YAMLSyntaxError;H.YAMLWarning=Ue.YAMLWarning});var Ja={};sr(Ja,{languages:()=>Ur,options:()=>Vr,parsers:()=>rr,printers:()=>Ha});var ht=(t,e)=>(n,r,...s)=>n|1&&r==null?void 0:(e.call(r)??r[t]).apply(r,s);function xi(t){return this[t<0?this.length+t:t]}var Ri=ht("at",function(){if(Array.isArray(this)||typeof this=="string")return xi}),D=Ri;var Di=String.prototype.replaceAll??function(t,e){return t.global?this.replace(t,e):this.split(t).join(e)},$i=ht("replaceAll",function(){if(typeof this=="string")return Di}),dt=$i;var Yi=()=>{},je=Yi;var Qe="string",Ge="array",gt="cursor",yt="indent",Ae="align",Et="trim",Le="group",Te="fill",Ce="if-break",St="indent-if-break",Me="line-suffix",wt="line-suffix-boundary",re="line",bt="label",ke="break-parent",Nt=new Set([gt,yt,Ae,Et,Le,Te,Ce,St,Me,wt,re,bt,ke]);function Bi(t){if(typeof t=="string")return Qe;if(Array.isArray(t))return Ge;if(!t)return;let{type:e}=t;if(Nt.has(e))return e}var Ot=Bi;var Fi=t=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(t);function qi(t){let e=t===null?"null":typeof t;if(e!=="string"&&e!=="object")return`Unexpected doc '${e}', 
Expected it to be 'string' or 'object'.`;if(Ot(t))throw new Error("doc is valid.");let n=Object.prototype.toString.call(t);if(n!=="[object Object]")return`Unexpected doc '${n}'.`;let r=Fi([...Nt].map(s=>`'${s}'`));return`Unexpected doc.type '${t.type}'.
Expected it to be ${r}.`}var on=class extends Error{name="InvalidDocError";constructor(e){super(qi(e)),this.doc=e}},ar=on;function Ui(t,e){if(typeof t=="string")return e(t);let n=new Map;return r(t);function r(i){if(n.has(i))return n.get(i);let o=s(i);return n.set(i,o),o}function s(i){switch(Ot(i)){case Ge:return e(i.map(r));case Te:return e({...i,parts:i.parts.map(r)});case Ce:return e({...i,breakContents:r(i.breakContents),flatContents:r(i.flatContents)});case Le:{let{expandedStates:o,contents:a}=i;return o?(o=o.map(r),a=o[0]):a=r(a),e({...i,contents:a,expandedStates:o})}case Ae:case yt:case St:case bt:case Me:return e({...i,contents:r(i.contents)});case Qe:case gt:case Et:case wt:case re:case ke:return e(i);default:throw new ar(i)}}}function cr(t,e=He){return Ui(t,n=>typeof n=="string"?v(e,n.split(`
`)):n)}var Z=je,At=je,lr=je,fr=je;function Je(t,e){return fr(t),Z(e),{type:Ae,contents:e,n:t}}function an(t){return Je(Number.NEGATIVE_INFINITY,t)}function ur(t){return Je({type:"root"},t)}function pr(t){return Je(-1,t)}var Xe={type:ke};function Lt(t){return lr(t),{type:Te,parts:t}}function Pe(t,e={}){return Z(t),At(e.expandedStates,!0),{type:Le,id:e.id,contents:t,break:!!e.shouldBreak,expandedStates:e.expandedStates}}function cn(t,e){return Pe(t[0],{...e,expandedStates:t})}function ze(t,e="",n={}){return Z(t),e!==""&&Z(e),{type:Ce,breakContents:t,flatContents:e,groupId:n.groupId}}function v(t,e){Z(t),At(e);let n=[];for(let r=0;r<e.length;r++)r!==0&&n.push(t),n.push(e[r]);return n}var se={type:re},Tt={type:re,soft:!0},Vi={type:re,hard:!0},N=[Vi,Xe],Wi={type:re,hard:!0,literal:!0},He=[Wi,Xe];function mr(t){return Z(t),{type:Me,contents:t}}function Ct(t){return(e,n,r)=>{let s=!!r?.backwards;if(n===!1)return!1;let{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;s?o--:o++}return o===-1||o===i?o:!1}}var rl=Ct(/\s/u),ln=Ct(" 	"),sl=Ct(",; 	"),il=Ct(/[^\n\r]/u);var hr=t=>t===`
`||t==="\r"||t==="\u2028"||t==="\u2029";function Ki(t,e,n){let r=!!n?.backwards;if(e===!1)return!1;let s=t.charAt(e);if(r){if(t.charAt(e-1)==="\r"&&s===`
`)return e-2;if(hr(s))return e-1}else{if(s==="\r"&&t.charAt(e+1)===`
`)return e+2;if(hr(s))return e+1}return e}var fn=Ki;function ji(t,e){let n=e-1;n=ln(t,n,{backwards:!0}),n=fn(t,n,{backwards:!0}),n=ln(t,n,{backwards:!0});let r=fn(t,n,{backwards:!0});return n!==r}var un=ji;var pn=class extends Error{name="UnexpectedNodeError";constructor(e,n,r="type"){super(`Unexpected ${n} node ${r}: ${JSON.stringify(e[r])}.`),this.node=e}},dr=pn;var gr="format";var yr=/^\s*#[^\S\n]*@(?:noformat|noprettier)\s*?(?:\n|$)/u,Er=/^\s*#[^\S\n]*@(?:format|prettier)\s*?(?:\n|$)/u,Sr=/^\s*@(?:format|prettier)\s*$/u;var wr=t=>Sr.test(t),br=t=>Er.test(t),Nr=t=>yr.test(t),Or=t=>`# @${gr}

${t}`;function Ar(t,e){switch(t.type){case"comment":if(wr(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}}Ar.ignoredProperties=new Set(["position"]);var Lr=Ar;function Tr(t,e){let{node:n}=t;if(n.type==="root"&&e.filepath&&/(?:[/\\]|^)\.(?:prettier|stylelint|lintstaged)rc$/u.test(e.filepath))return async r=>{let s=await r(e.originalText,{parser:"json"});return s?[s,N]:void 0}}Tr.getVisitorKeys=()=>[];var Cr=Tr;var Ze=null;function et(t){if(Ze!==null&&typeof Ze.property){let e=Ze;return Ze=et.prototype=null,e}return Ze=et.prototype=t??Object.create(null),new et}var Qi=10;for(let t=0;t<=Qi;t++)et();function mn(t){return et(t)}function Gi(t,e="type"){mn(t);function n(r){let s=r[e],i=t[s];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${s}'.`),{node:r});return i}return n}var Mr=Gi;var k=[["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"]],kr={root:k[0],document:["head","body","children","anchor","tag","indicatorComment","leadingComments","middleComments","trailingComment","endComments"],documentHead:k[0],documentBody:k[0],directive:k[1],alias:k[1],blockLiteral:k[1],blockFolded:k[0],plain:k[0],quoteSingle:k[1],quoteDouble:k[1],mapping:k[0],mappingItem:k[2],mappingKey:k[3],mappingValue:k[3],sequence:k[0],sequenceItem:k[3],flowMapping:k[0],flowMappingItem:k[2],flowSequence:k[0],flowSequenceItem:k[3],comment:k[1],tag:k[4],anchor:k[4]};var Hi=Mr(kr),Pr=Hi;var tt=t=>t.position.start.offset,vr=t=>t.position.end.offset;function Ji(t){return Array.isArray(t)&&t.length>0}var ve=Ji;function W(t,e){return typeof t?.type=="string"&&e.includes(t.type)}function hn(t,e,n){return e("children"in t?{...t,children:t.children.map(r=>hn(r,e,t))}:t,n)}function Ie(t,e,n){Object.defineProperty(t,e,{get:n,enumerable:!1})}function _r(t,e){let n=0,r=e.length;for(let s=t.position.end.offset-1;s<r;s++){let i=e[s];if(i===`
`&&n++,n===1&&/\S/u.test(i))return!1;if(n===2)return!0}return!1}function Mt(t){let{node:e}=t;switch(e.type){case"tag":case"anchor":case"comment":return!1}let n=t.stack.length;for(let r=1;r<n;r++){let s=t.stack[r],i=t.stack[r-1];if(Array.isArray(i)&&typeof s=="number"&&s!==i.length-1)return!1}return!0}function kt(t){return ve(t.children)?kt(D(0,t.children,-1)):t}function Ir(t){return t.value.trim()==="prettier-ignore"}function xr(t){let{node:e}=t;if(e.type==="documentBody"){let n=t.parent.head;return I(n)&&Ir(D(0,n.endComments,-1))}return te(e)&&Ir(D(0,e.leadingComments,-1))}function _e(t){return!ve(t.children)&&!Xi(t)}function Xi(t){return te(t)||ae(t)||dn(t)||K(t)||I(t)}function te(t){return ve(t?.leadingComments)}function ae(t){return ve(t?.middleComments)}function dn(t){return t?.indicatorComment}function K(t){return t?.trailingComment}function I(t){return ve(t?.endComments)}function Rr(t){return t?t.split(/(?<!^| ) (?! |$)/u):[]}function Dr(t,e,n){let r=e.split(`
`).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 r.map(i=>i?[i]:[]);let s=[];for(let[i,o]of r.entries()){let a=Rr(o);i>0&&r[i-1].length>0&&a.length>0&&!(t==="quoteDouble"&&D(0,D(0,s,-1),-1).endsWith("\\"))?s[s.length-1]=[...D(0,s,-1),...a]:s.push(a)}return n.proseWrap==="never"?s.map(i=>[i.join(" ")]):s}function $r(t,{parentIndent:e,isLastDescendant:n,options:r}){let s=t.position.start.line===t.position.end.line?"":r.originalText.slice(t.position.start.offset,t.position.end.offset).match(/^[^\n]*\n(.*)$/su)[1],i;if(t.indent===null){let l=s.match(/^(?<leadingSpace> *)[^\n\r ]/mu);i=l?l.groups.leadingSpace.length:Number.POSITIVE_INFINITY}else i=t.indent-1+e;let o=s.split(`
`).map(l=>l.slice(i));if(r.proseWrap==="preserve"||t.type==="blockLiteral")return c(o.map(l=>l?[l]:[]));let a=[];for(let[l,f]of o.entries()){let m=Rr(f);l>0&&m.length>0&&o[l-1].length>0&&!/^\s/u.test(m[0])&&!/^\s|\s$/u.test(D(0,a,-1))?a[a.length-1]=[...D(0,a,-1),...m]:a.push(m)}return a=a.map(l=>{let f=[];for(let m of l)f.length>0&&/\s$/u.test(D(0,f,-1))?f[f.length-1]+=" "+m:f.push(m);return f}),r.proseWrap==="never"&&(a=a.map(l=>[l.join(" ")])),c(a);function c(l){if(t.chomping==="keep")return D(0,l,-1).length===0?l.slice(0,-1):l;let f=0;for(let m=l.length-1;m>=0&&l[m].length===0;m--)f++;return f===0?l:f>=2&&!n?l.slice(0,-(f-1)):l.slice(0,-f)}}function nt(t){if(!t)return!0;switch(t.type){case"plain":case"quoteDouble":case"quoteSingle":case"alias":case"flowMapping":case"flowSequence":return!0;default:return!1}}var gn=new WeakMap;function Pt(t,e){let{node:n,root:r}=t,s;return gn.has(r)?s=gn.get(r):(s=new Set,gn.set(r,s)),!s.has(n.position.end.line)&&(s.add(n.position.end.line),_r(n,e)&&!yn(t.parent))?Tt:""}function yn(t){return I(t)&&!W(t,["documentHead","documentBody","flowMapping","flowSequence"])}function _(t,e){return Je(" ".repeat(t),e)}function zi(t,e,n){let{node:r}=t,s=t.ancestors.filter(l=>l.type==="sequence"||l.type==="mapping").length,i=Mt(t),o=[r.type==="blockFolded"?">":"|"];r.indent!==null&&o.push(r.indent.toString()),r.chomping!=="clip"&&o.push(r.chomping==="keep"?"+":"-"),dn(r)&&o.push(" ",n("indicatorComment"));let a=$r(r,{parentIndent:s,isLastDescendant:i,options:e}),c=[];for(let[l,f]of a.entries())l===0&&c.push(N),c.push(Lt(v(se,f))),l!==a.length-1?c.push(f.length===0?N:ur(He)):r.chomping==="keep"&&i&&c.push(an(f.length===0?N:He));return r.indent===null?o.push(pr(_(e.tabWidth,c))):o.push(an(_(r.indent-1+s,c))),o}var Yr=zi;function vt(t,e,n){let{node:r}=t,s=r.type==="flowMapping",i=s?"{":"[",o=s?"}":"]",a=Tt;s&&r.children.length>0&&e.bracketSpacing&&(a=se);let c=D(0,r.children,-1),l=c?.type==="flowMappingItem"&&_e(c.key)&&_e(c.value);return[i,_(e.tabWidth,[a,Zi(t,e,n),e.trailingComma==="none"?"":ze(","),I(r)?[N,v(N,t.map(n,"endComments"))]:""]),l?"":a,o]}function Zi(t,e,n){return t.map(({isLast:r,node:s,next:i})=>[n(),r?"":[",",se,s.position.start.line!==i.position.start.line?Pt(t,e.originalText):""]],"children")}function eo(t,e,n){let{node:r,parent:s}=t,{key:i,value:o}=r,a=_e(i),c=_e(o);if(a&&c)return": ";let l=n("key"),f=to(r)?" ":"";if(c)return r.type==="flowMappingItem"&&s.type==="flowMapping"?l:r.type==="mappingItem"&&En(i.content,e)&&!K(i.content)&&s.tag?.value!=="tag:yaml.org,2002:set"?[l,f,":"]:["? ",_(2,l)];let m=n("value");if(a)return[": ",_(2,m)];if(te(o)||!nt(i.content))return["? ",_(2,l),N,...t.map(()=>[n(),N],"value","leadingComments"),": ",_(2,m)];if(no(i.content)&&!te(i.content)&&!ae(i.content)&&!K(i.content)&&!I(i)&&!te(o.content)&&!ae(o.content)&&!I(o)&&En(o.content,e))return[l,f,": ",m];let g=Symbol("mappingKey"),y=Pe([ze("? "),Pe(_(2,l),{id:g})]),h=[N,": ",_(2,m)],d=[f,":"];I(o)&&o.content&&W(o.content,["flowMapping","flowSequence"])&&o.content.children.length===0?d.push(" "):te(o.content)||I(o)&&o.content&&!W(o.content,["mapping","sequence"])||s.type==="mapping"&&K(i.content)&&nt(o.content)||W(o.content,["mapping","sequence"])&&o.content.tag===null&&o.content.anchor===null?d.push(N):o.content?d.push(se):K(o)&&d.push(" "),d.push(m);let w=_(e.tabWidth,d);return En(i.content,e)&&!te(i.content)&&!ae(i.content)&&!K(i.content)&&!I(i)?cn([[l,w]]):cn([[y,ze(h,w,{groupId:g})]])}function En(t,e){if(!t)return!0;switch(t.type){case"plain":case"quoteSingle":case"quoteDouble":break;case"alias":return!0;default:return!1}if(e.proseWrap==="preserve")return t.position.start.line===t.position.end.line;if(/\\$/mu.test(e.originalText.slice(t.position.start.offset,t.position.end.offset)))return!1;switch(e.proseWrap){case"never":return!t.value.includes(`
`);case"always":return!/[\n ]/u.test(t.value);default:return!1}}function to(t){return t.key.content?.type==="alias"}function no(t){if(!t)return!0;switch(t.type){case"plain":case"quoteDouble":case"quoteSingle":return t.position.start.line===t.position.end.line;case"alias":return!0;default:return!1}}var Br=eo;function ro(t){return hn(t,so)}function so(t){switch(t.type){case"document":Ie(t,"head",()=>t.children[0]),Ie(t,"body",()=>t.children[1]);break;case"documentBody":case"sequenceItem":case"flowSequenceItem":case"mappingKey":case"mappingValue":Ie(t,"content",()=>t.children[0]);break;case"mappingItem":case"flowMappingItem":Ie(t,"key",()=>t.children[0]),Ie(t,"value",()=>t.children[1]);break}return t}var Fr=ro;function io(t,e,n){let{node:r}=t,s=[];r.type!=="mappingValue"&&te(r)&&s.push([v(N,t.map(n,"leadingComments")),N]);let{tag:i,anchor:o}=r;i&&s.push(n("tag")),i&&o&&s.push(" "),o&&s.push(n("anchor"));let a="";return W(r,["mapping","sequence","comment","directive","mappingItem","sequenceItem"])&&!Mt(t)&&(a=Pt(t,e.originalText)),(i||o)&&(W(r,["sequence","mapping"])&&!ae(r)?s.push(N):s.push(" ")),ae(r)&&s.push([r.middleComments.length===1?"":N,v(N,t.map(n,"middleComments")),N]),xr(t)?s.push(cr(e.originalText.slice(r.position.start.offset,r.position.end.offset).trimEnd())):s.push(Pe(oo(t,e,n))),K(r)&&!W(r,["document","documentHead"])&&s.push(mr([r.type==="mappingValue"&&!r.content?"":" ",t.parent.type==="mappingKey"&&t.getParentNode(2).type==="mapping"&&nt(r)?"":Xe,n("trailingComment")])),yn(r)&&s.push(_(r.type==="sequenceItem"?2:0,[N,v(N,t.map(({node:c})=>[un(e.originalText,tt(c))?N:"",n()],"endComments"))])),s.push(a),s}function oo(t,e,n){let{node:r}=t;switch(r.type){case"root":{let s=kt(r),i=!(W(s,["blockLiteral","blockFolded"])&&s.chomping==="keep"),o=[];return t.each(({node:a,isFirst:c})=>{c||o.push(N),o.push(n()),co(t)&&(i&&o.push(N),o.push("..."),K(a)&&o.push(" ",n("trailingComment")))},"children"),i&&o.push(N),o}case"document":{let s=[];return lo(t)&&((r.head.children.length>0||r.head.endComments.length>0)&&s.push(n("head")),K(r.head)?s.push(["---"," ",n(["head","trailingComment"])]):s.push("---")),ao(r)&&s.push(n("body")),v(N,s)}case"documentHead":return v(N,[...t.map(n,"children"),...t.map(n,"endComments")]);case"documentBody":{let{children:s,endComments:i}=r,o="";if(s.length>0&&i.length>0){let a=kt(r);if(W(a,["blockFolded","blockLiteral"]))a.chomping!=="keep"&&(o=[N,N]);else{let c=D(0,s,-1);o=W(c,["mapping"])&&un(e.originalText,tt(i[0]))?[N,N]:N}}return[v(N,t.map(n,"children")),o,v(N,t.map(n,"endComments"))]}case"directive":return["%",v(" ",[r.name,...r.parameters])];case"comment":return["#",r.value];case"alias":return["*",r.value];case"tag":return e.originalText.slice(r.position.start.offset,r.position.end.offset);case"anchor":return["&",r.value];case"plain":return rt(r.type,e.originalText.slice(r.position.start.offset,r.position.end.offset),e);case"quoteDouble":case"quoteSingle":{let o=e.originalText.slice(r.position.start.offset+1,r.position.end.offset-1);if(r.type==="quoteSingle"&&o.includes("\\")||r.type==="quoteDouble"&&/\\[^"]/u.test(o)){let c=r.type==="quoteDouble"?'"':"'";return[c,rt(r.type,o,e),c]}if(o.includes('"'))return["'",rt(r.type,r.type==="quoteDouble"?dt(0,dt(0,o,'\\"','"'),"'","'".repeat(2)):o,e),"'"];if(o.includes("'"))return['"',rt(r.type,r.type==="quoteSingle"?dt(0,o,"''","'"):o,e),'"'];let a=e.singleQuote?"'":'"';return[a,rt(r.type,o,e),a]}case"blockFolded":case"blockLiteral":return Yr(t,e,n);case"mapping":case"sequence":return v(N,t.map(n,"children"));case"sequenceItem":return["- ",_(2,r.content?n("content"):"")];case"mappingKey":case"mappingValue":return r.content?n("content"):"";case"mappingItem":case"flowMappingItem":return Br(t,e,n);case"flowMapping":return vt(t,e,n);case"flowSequence":return vt(t,e,n);case"flowSequenceItem":return n("content");default:throw new dr(r,"YAML")}}function ao(t){return t.body.children.length>0||I(t.body)}function co(t){let e=t.node;if(e.documentEndMarker||K(e))return!0;if(t.isLast)return!1;let n=t.next;return n.head.children.length>0||I(n.head)}function lo(t){let e=t.node;return e.directivesEndMarker||e.head.children.length>0||I(e.head)||K(e.head)}function rt(t,e,n){let r=Dr(t,e,n);return v(N,r.map(s=>Lt(v(se,s))))}var fo={preprocess:Fr,embed:Cr,print:io,massageAstNode:Lr,insertPragma:Or,getVisitorKeys:Pr},qr=fo;var Ur=[{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",".gemrc","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 It={bracketSpacing:{category:"Common",type:"boolean",default:!0,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:!1,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:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}};var uo={bracketSpacing:It.bracketSpacing,singleQuote:It.singleQuote,proseWrap:It.proseWrap},Vr=uo;var rr={};sr(rr,{yaml:()=>Ga});var nr=or(Ps(),1);var J=or(vs(),1),Tf=J.default.findPair,Cf=J.default.toJSON,Mf=J.default.parseMap,kf=J.default.parseSeq,Pf=J.default.stringifyNumber,vf=J.default.stringifyString,If=J.default.Type,_f=J.default.YAMLError,xf=J.default.YAMLReferenceError,Is=J.default.YAMLSemanticError,Rf=J.default.YAMLSyntaxError,Df=J.default.YAMLWarning;function F(t,e=null){"children"in t&&t.children.forEach(n=>F(n,t)),"anchor"in t&&t.anchor&&F(t.anchor,t),"tag"in t&&t.tag&&F(t.tag,t),"leadingComments"in t&&t.leadingComments.forEach(n=>F(n,t)),"middleComments"in t&&t.middleComments.forEach(n=>F(n,t)),"indicatorComment"in t&&t.indicatorComment&&F(t.indicatorComment,t),"trailingComment"in t&&t.trailingComment&&F(t.trailingComment,t),"endComments"in t&&t.endComments.forEach(n=>F(n,t)),Object.defineProperty(t,"_parent",{value:e,enumerable:!1})}function Oe(t){return`${t.line}:${t.column}`}function _s(t){F(t);let e=Ia(t),n=t.children.slice();t.comments.sort((r,s)=>r.position.start.offset-s.position.end.offset).filter(r=>!r._parent).forEach(r=>{for(;n.length>1&&r.position.start.line>n[0].position.end.line;)n.shift();_a(r,e,n[0])})}function Ia(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 xs(e,t),e}function xs(t,e){if(e.position.start.offset!==e.position.end.offset){if("leadingComments"in e){let{start:n}=e.position,{leadingAttachableNode:r}=t[n.line-1];(!r||n.column<r.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:r}=t[n.line-1];(!r||n.column>=r.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:r}=e.position,s=[r.line].concat(n.line===r.line?[]:n.line);for(let i of s){let o=t[i-1].trailingNode;(!o||r.column>=o.position.end.column)&&(t[i-1].trailingNode=e)}}"children"in e&&e.children.forEach(n=>{xs(t,n)})}}function _a(t,e,n){let r=t.position.start.line,{trailingAttachableNode:s}=e[r-1];if(s){if(s.trailingComment)throw new Error(`Unexpected multiple trailing comment at ${Oe(t.position.start)}`);F(t,s),s.trailingComment=t;return}for(let o=r;o>=n.position.start.line;o--){let{trailingNode:a}=e[o-1],c;if(a)c=a;else if(o!==r&&e[o-1].comment)c=e[o-1].comment._parent;else continue;if((c.type==="sequence"||c.type==="mapping")&&(c=c.children[0]),c.type==="mappingItem"){let[l,f]=c.children;c=Rs(l)?l:f}for(;;){if(xa(c,t)){F(t,c),c.endComments.push(t);return}if(!c._parent)break;c=c._parent}break}for(let o=r+1;o<=n.position.end.line;o++){let{leadingAttachableNode:a}=e[o-1];if(a){F(t,a),a.leadingComments.push(t);return}}let i=n.children[1];F(t,i),i.endComments.push(t)}function xa(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!1;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"||Rs(t));default:return!1}}function Rs(t){return t.position.start!==t.position.end&&(t.children.length===0||t.position.start.offset!==t.children[0].position.start.offset)}function b(t,e){return{type:t,position:e}}function Ds(t,e,n){return{...b("root",t),children:e,comments:n}}function pt(t){switch(t.type){case"DOCUMENT":for(let e=t.contents.length-1;e>=0;e--)t.contents[e].type==="BLANK_LINE"?t.contents.splice(e,1):pt(t.contents[e]);for(let e=t.directives.length-1;e>=0;e--)t.directives[e].type==="BLANK_LINE"&&t.directives.splice(e,1);break;case"FLOW_MAP":case"FLOW_SEQ":case"MAP":case"SEQ":for(let e=t.items.length-1;e>=0;e--){let n=t.items[e];"char"in n||(n.type==="BLANK_LINE"?t.items.splice(e,1):pt(n))}break;case"MAP_KEY":case"MAP_VALUE":case"SEQ_ITEM":t.node&&pt(t.node);break;case"ALIAS":case"BLANK_LINE":case"BLOCK_FOLDED":case"BLOCK_LITERAL":case"COMMENT":case"DIRECTIVE":case"PLAIN":case"QUOTE_DOUBLE":case"QUOTE_SINGLE":break;default:throw new Error(`Unexpected node type ${JSON.stringify(t.type)}`)}}function X(t,e){return{start:t,end:e}}function Qn(t){return{start:t,end:t}}var me;(function(t){t.Tag="!",t.Anchor="&",t.Comment="#"})(me||(me={}));function $s(t,e){return{...b("anchor",t),value:e}}function Ve(t,e){return{...b("comment",t),value:e}}function Ys(t,e,n){return{anchor:e,tag:t,middleComments:n}}function Bs(t,e){return{...b("tag",t),value:e}}function Jt(t,e,n=()=>!1){let r=t.cstNode,s=[],i=null,o=null,a=null;for(let c of r.props){let l=e.text[c.origStart];switch(l){case me.Tag:i=i||c,o=Bs(e.transformRange(c),t.tag);break;case me.Anchor:i=i||c,a=$s(e.transformRange(c),r.anchor);break;case me.Comment:{let f=Ve(e.transformRange(c),e.text.slice(c.origStart+1,c.origEnd));e.comments.push(f),!n(f)&&i&&i.origEnd<=c.origStart&&c.origEnd<=r.valueRange.origStart&&s.push(f);break}default:throw new Error(`Unexpected leading character ${JSON.stringify(l)}`)}}return Ys(o,a,s)}function z(){return{leadingComments:[]}}function he(t=null){return{trailingComment:t}}function q(){return{...z(),...he()}}function Fs(t,e,n){return{...b("alias",t),...q(),...e,value:n}}function qs(t,e){let n=t.cstNode;return Fs(e.transformRange({origStart:n.valueRange.origStart-1,origEnd:n.valueRange.origEnd}),e.transformContent(t),n.rawValue)}function Us(t){return{...t,type:"blockFolded"}}function Vs(t,e,n,r,s,i){return{...b("blockValue",t),...z(),...e,chomping:n,indent:r,value:s,indicatorComment:i}}var Gn;(function(t){t.CLIP="clip",t.STRIP="strip",t.KEEP="keep"})(Gn||(Gn={}));function Xt(t,e){let n=t.cstNode,r=1,s=n.chomping==="CLIP"?0:1,o=n.header.origEnd-n.header.origStart-r-s!==0,a=e.transformRange({origStart:n.header.origStart,origEnd:n.valueRange.origEnd}),c=null,l=Jt(t,e,f=>{if(!(a.start.offset<f.position.start.offset&&f.position.end.offset<a.end.offset))return!1;if(c)throw new Error(`Unexpected multiple indicator comments at ${Oe(f.position.start)}`);return c=f,!0});return Vs(a,l,Gn[n.chomping],o?n.blockIndent:null,n.strValue,c)}function Ws(t,e){return Us(Xt(t,e))}function Ks(t){return{...t,type:"blockLiteral"}}function js(t,e){return Ks(Xt(t,e))}function Qs(t,e){return Ve(e.transformRange(t.range),t.comment)}function Gs(t,e,n){return{...b("directive",t),...q(),name:e,parameters:n}}function We(t,e){for(let n of t.props){let r=e.text[n.origStart];switch(r){case me.Comment:e.comments.push(Ve(e.transformRange(n),e.text.slice(n.origStart+1,n.origEnd)));break;default:throw new Error(`Unexpected leading character ${JSON.stringify(r)}`)}}}function Hs(t,e){return We(t,e),Gs(e.transformRange(t.range),t.name,t.parameters)}function Js(t,e,n,r,s,i){return{...b("document",t),...he(i),directivesEndMarker:e,documentEndMarker:n,children:[r,s]}}function U(t=[]){return{endComments:t}}function Xs(t,e,n){return{...b("documentBody",t),...U(n),children:e?[e]:[]}}function V(t){return t[t.length-1]}function zt(t,e){let n=t.match(e);return n?n.index:-1}function zs(t,e,n){let r=t.cstNode,{comments:s,endComments:i,documentTrailingComment:o,documentHeadTrailingComment:a}=Ra(r,e,n),c=e.transformNode(t.contents),{position:l,documentEndPoint:f}=Da(r,c,e);return e.comments.push(...s,...i),{documentBody:Xs(l,c,i),documentEndPoint:f,documentTrailingComment:o,documentHeadTrailingComment:a}}function Ra(t,e,n){let r=[],s=[],i=[],o=[],a=!1;for(let c=t.contents.length-1;c>=0;c--){let l=t.contents[c];if(l.type==="COMMENT"){let f=e.transformNode(l);n&&n.line===f.position.start.line?o.unshift(f):a?r.unshift(f):f.position.start.offset>=t.valueRange.origEnd?i.unshift(f):r.unshift(f)}else a=!0}if(i.length>1)throw new Error(`Unexpected multiple document trailing comments at ${Oe(i[1].position.start)}`);if(o.length>1)throw new Error(`Unexpected multiple documentHead trailing comments at ${Oe(o[1].position.start)}`);return{comments:r,endComments:s,documentTrailingComment:V(i)||null,documentHeadTrailingComment:V(o)||null}}function Da(t,e,n){let r=zt(n.text.slice(t.valueRange.origEnd),/^\.\.\./),s=r===-1?t.valueRange.origEnd:Math.max(0,t.valueRange.origEnd-1);n.text[s-1]==="\r"&&s--;let i=n.transformRange({origStart:e!==null?e.position.start.offset:s,origEnd:s}),o=r===-1?i.end:n.transformOffset(t.valueRange.origEnd+3);return{position:i,documentEndPoint:o}}function Zs(t,e,n,r){return{...b("documentHead",t),...U(n),...he(r),children:e}}function ei(t,e){let n=t.cstNode,{directives:r,comments:s,endComments:i}=$a(n,e),{position:o,documentEndMarkererPoint:a}=Ya(n,r,e);return e.comments.push(...s,...i),{createDocumentHeadWithTrailingComment:l=>(l&&e.comments.push(l),Zs(o,r,i,l)),documentHeadEndMarkerPoint:a}}function $a(t,e){let n=[],r=[],s=[],i=!1;for(let o=t.directives.length-1;o>=0;o--){let a=e.transformNode(t.directives[o]);a.type==="comment"?i?r.unshift(a):s.unshift(a):(i=!0,n.unshift(a))}return{directives:n,comments:r,endComments:s}}function Ya(t,e,n){let r=zt(n.text.slice(0,t.valueRange.origStart),/---\s*$/);r>0&&!/[\r\n]/.test(n.text[r-1])&&(r=-1);let s=r===-1?{origStart:t.valueRange.origStart,origEnd:t.valueRange.origStart}:{origStart:r,origEnd:r+3};return e.length!==0&&(s.origStart=e[0].position.start.offset),{position:n.transformRange(s),documentEndMarkererPoint:r===-1?null:n.transformOffset(r)}}function ti(t,e){let{createDocumentHeadWithTrailingComment:n,documentHeadEndMarkerPoint:r}=ei(t,e),{documentBody:s,documentEndPoint:i,documentTrailingComment:o,documentHeadTrailingComment:a}=zs(t,e,r),c=n(a);o&&e.comments.push(o);let l=t.cstNode;return Js(X(c.position.start,i),!!l.directivesEndMarker,!!l.documentEndMarker,c,s,o)}function Zt(t,e,n){return{...b("flowCollection",t),...q(),...U(),...e,children:n}}function ni(t,e,n){return{...Zt(t,e,n),type:"flowMapping"}}function en(t,e,n){return{...b("flowMappingItem",t),...z(),children:[e,n]}}function de(t,e){let n=[];for(let r of t)r&&"type"in r&&r.type==="COMMENT"?e.comments.push(e.transformNode(r)):n.push(r);return n}function tn(t){let[e,n]=["?",":"].map(r=>{let s=t.find(i=>"char"in i&&i.char===r);return s?{origStart:s.origOffset,origEnd:s.origOffset+1}:null});return{additionalKeyRange:e,additionalValueRange:n}}function nn(t,e){let n=e;return r=>t.slice(n,n=r)}function rn(t){let e=[],n=nn(t,1),r=!1;for(let s=1;s<t.length-1;s++){let i=t[s];if("char"in i&&i.char===","){e.push(n(s)),n(s+1),r=!1;continue}r=!0}return r&&e.push(n(t.length-1)),e}function Hn(t,e){return{...b("mappingKey",t),...he(),...U(),children:e?[e]:[]}}function Jn(t,e){return{...b("mappingValue",t),...q(),...U(),children:e?[e]:[]}}function Ke(t,e,n,r,s){let i=e.transformNode(t.key),o=e.transformNode(t.value),a=i||r?Hn(e.transformRange({origStart:r?r.origStart:i.position.start.offset,origEnd:i?i.position.end.offset:r.origStart+1}),i):null,c=o||s?Jn(e.transformRange({origStart:s?s.origStart:o.position.start.offset,origEnd:o?o.position.end.offset:s.origStart+1}),o):null;return n(X(a?a.position.start:c.position.start,c?c.position.end:a.position.end),a||Hn(Qn(c.position.start),null),c||Jn(Qn(a.position.end),null))}function ri(t,e){let n=de(t.cstNode.items,e),r=rn(n),s=t.items.map((a,c)=>{let l=r[c],{additionalKeyRange:f,additionalValueRange:m}=tn(l);return Ke(a,e,en,f,m)}),i=n[0],o=V(n);return ni(e.transformRange({origStart:i.origOffset,origEnd:o.origOffset+1}),e.transformContent(t),s)}function si(t,e,n){return{...Zt(t,e,n),type:"flowSequence"}}function ii(t,e){return{...b("flowSequenceItem",t),children:[e]}}function oi(t,e){let n=de(t.cstNode.items,e),r=rn(n),s=t.items.map((a,c)=>{if(a.type!=="PAIR"){let l=e.transformNode(a);return ii(X(l.position.start,l.position.end),l)}else{let l=r[c],{additionalKeyRange:f,additionalValueRange:m}=tn(l);return Ke(a,e,en,f,m)}}),i=n[0],o=V(n);return si(e.transformRange({origStart:i.origOffset,origEnd:o.origOffset+1}),e.transformContent(t),s)}function ai(t,e,n){return{...b("mapping",t),...z(),...e,children:n}}function ci(t,e,n){return{...b("mappingItem",t),...z(),children:[e,n]}}function li(t,e){let n=t.cstNode;n.items.filter(o=>o.type==="MAP_KEY"||o.type==="MAP_VALUE").forEach(o=>We(o,e));let r=de(n.items,e),s=Ba(r),i=t.items.map((o,a)=>{let c=s[a],[l,f]=c[0].type==="MAP_VALUE"?[null,c[0].range]:[c[0].range,c.length===1?null:c[1].range];return Ke(o,e,ci,l,f)});return ai(X(i[0].position.start,V(i).position.end),e.transformContent(t),i)}function Ba(t){let e=[],n=nn(t,0),r=!1;for(let s=0;s<t.length;s++){if(t[s].type==="MAP_VALUE"){e.push(n(s+1)),r=!1;continue}r&&e.push(n(s)),r=!0}return r&&e.push(n(1/0)),e}function fi(t,e,n){return{...b("plain",t),...q(),...e,value:n}}function ui(t,e,n){for(let r=e;r>=0;r--)if(n.test(t[r]))return r;return-1}function pi(t,e){let n=t.cstNode;return fi(e.transformRange({origStart:n.valueRange.origStart,origEnd:ui(e.text,n.valueRange.origEnd-1,/\S/)+1}),e.transformContent(t),n.strValue)}function mi(t){return{...t,type:"quoteDouble"}}function hi(t,e,n){return{...b("quoteValue",t),...e,...q(),value:n}}function sn(t,e){let n=t.cstNode;return hi(e.transformRange(n.valueRange),e.transformContent(t),n.strValue)}function di(t,e){return mi(sn(t,e))}function gi(t){return{...t,type:"quoteSingle"}}function yi(t,e){return gi(sn(t,e))}function Ei(t,e,n){return{...b("sequence",t),...z(),...U(),...e,children:n}}function Si(t,e){return{...b("sequenceItem",t),...q(),...U(),children:e?[e]:[]}}function wi(t,e){let r=de(t.cstNode.items,e).map((s,i)=>{We(s,e);let o=e.transformNode(t.items[i]);return Si(X(e.transformOffset(s.valueRange.origStart),o===null?e.transformOffset(s.valueRange.origStart+1):o.position.end),o)});return Ei(X(r[0].position.start,V(r).position.end),e.transformContent(t),r)}function bi(t,e){if(t===null||t.type===void 0&&t.value===null)return null;switch(t.type){case"ALIAS":return qs(t,e);case"BLOCK_FOLDED":return Ws(t,e);case"BLOCK_LITERAL":return js(t,e);case"COMMENT":return Qs(t,e);case"DIRECTIVE":return Hs(t,e);case"DOCUMENT":return ti(t,e);case"FLOW_MAP":return ri(t,e);case"FLOW_SEQ":return oi(t,e);case"MAP":return li(t,e);case"PLAIN":return pi(t,e);case"QUOTE_DOUBLE":return di(t,e);case"QUOTE_SINGLE":return yi(t,e);case"SEQ":return wi(t,e);default:throw new Error(`Unexpected node type ${t.type}`)}}var Xn,zn=class{text;comments=[];#e;#t;constructor(e,n){this.text=n,this.#e=e}setOrigRanges(){if(!this.#e.setOrigRanges())for(let e of this.#e)e.setOrigRanges([],0)}#n(e){if(!Xn){let[o]=this.#e,a=Object.getPrototypeOf(Object.getPrototypeOf(o));Xn=Object.getOwnPropertyDescriptor(a,"rangeAsLinePos").get}if(this.#t??(this.#t={root:{context:{src:this.text}}}),this.text===""&&e.origStart===0&&e.origEnd===0)return{start:{offset:0,line:1,column:1},end:{offset:0,line:1,column:1}};let{start:{line:n,col:r},end:{line:s,col:i}}=Xn.call({range:{start:this.#r(e.origStart),end:this.#r(e.origEnd)},context:this.#t});return{start:{offset:e.origStart,line:n,column:r},end:{offset:e.origEnd,line:s,column:i}}}#r(e){return e<0?0:e>this.text.length?this.text.length:e}transformOffset(e){return this.#n({origStart:e,origEnd:e}).start}transformRange(e){let{start:n,end:r}=this.#n(e);return X(n,r)}transformNode(e){return bi(e,this)}transformContent(e){return Jt(e,this)}},Ni=zn;function Oi(t,e,n){let r=new SyntaxError(t);return r.name="YAMLSyntaxError",r.source=e,r.position=n,r}function Ai(t,e){let n=t.source.range||t.source.valueRange;return Oi(t.message,e.text,e.transformRange(n))}function Zn(t){if("children"in t){if(t.children.length===1){let e=t.children[0];if(e.type==="plain"&&e.tag===null&&e.anchor===null&&e.value==="")return t.children.splice(0,1),t}t.children.forEach(Zn)}return t}function er(t,e,n,r){let s=e(t);return i=>{r(s,i)&&n(t,s=i)}}function tr(t){if(t===null||!("children"in t))return;let e=t.children;if(e.forEach(tr),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=er(t.position,Fa,qa,Wa),r=er(t.position,Ua,Va,Ka);"endComments"in t&&t.endComments.length!==0&&(n(t.endComments[0].position.start),r(V(t.endComments).position.end));let s=e.filter(i=>i!==null);if(s.length!==0){let i=s[0],o=V(s);n(i.position.start),r(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&&r(o.trailingComment.position.end)}}function Fa(t){return t.start}function qa(t,e){t.start=e}function Ua(t){return t.end}function Va(t,e){t.end=e}function Wa(t,e){return e.offset<t.offset}function Ka(t,e){return e.offset>t.offset}function Li(t){let e=nr.default.parseCST(t),n=new Ni(e,t);n.setOrigRanges();let r=e.map(i=>new nr.default.Document({merge:!1,keepCstNodes:!0}).parse(i));for(let i of r)for(let o of i.errors)if(!(o instanceof Is&&o.message==='Map keys must be unique; "<<" is repeated'))throw Ai(o,n);r.forEach(i=>pt(i.cstNode));let s=Ds(n.transformRange({origStart:0,origEnd:t.length}),r.map(i=>n.transformNode(i)),n.comments);return _s(s),tr(s),Zn(s),s}function ja(t,e){let n=new SyntaxError(t+" ("+e.loc.start.line+":"+e.loc.start.column+")");return Object.assign(n,e)}var Ti=ja;function Qa(t){try{let e=Li(t);return delete e.comments,e}catch(e){throw e?.position?Ti(e.message,{loc:e.position,cause:e}):e}}var Ga={astFormat:"yaml",parse:Qa,hasPragma:br,hasIgnorePragma:Nr,locStart:tt,locEnd:vr};var Ha={yaml:qr};return _i(Ja);});