UNPKG

@proofgeist/kit

Version:

Create web application with the ProofKit stack

129 lines (126 loc) 121 kB
import"./chunk-FEIY7W7S.js";var zn=Object.create,St=Object.defineProperty,er=Object.getOwnPropertyDescriptor,tr=Object.getOwnPropertyNames,nr=Object.getPrototypeOf,rr=Object.prototype.hasOwnProperty,Le=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),qt=(t,e)=>{for(var n in e)St(t,n,{get:e[n],enumerable:!0})},ir=(t,e,n,l)=>{if(e&&typeof e=="object"||typeof e=="function")for(let g of tr(e))!rr.call(t,g)&&g!==n&&St(t,g,{get:()=>e[g],enumerable:!(l=er(e,g))||l.enumerable});return t},Kt=(t,e,n)=>(n=t!=null?zn(nr(t)):{},ir(e||!t||!t.__esModule?St(n,"default",{value:t,enumerable:!0}):n,t)),Ie=Le(t=>{"use strict";var e={ANCHOR:"&",COMMENT:"#",TAG:"!",DIRECTIVES_END:"-",DOCUMENT_END:"."},n={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"},l="tag:yaml.org,2002:",g={MAP:"tag:yaml.org,2002:map",SEQ:"tag:yaml.org,2002:seq",STR:"tag:yaml.org,2002:str"};function E(c){let i=[0],r=c.indexOf(` `);for(;r!==-1;)r+=1,i.push(r),r=c.indexOf(` `,r);return i}function b(c){let i,r;return typeof c=="string"?(i=E(c),r=c):(Array.isArray(c)&&(c=c[0]),c&&c.context&&(c.lineStarts||(c.lineStarts=E(c.context.src)),i=c.lineStarts,r=c.context.src)),{lineStarts:i,src:r}}function L(c,i){if(typeof c!="number"||c<0)return null;let{lineStarts:r,src:s}=b(i);if(!r||!s||c>s.length)return null;for(let p=0;p<r.length;++p){let u=r[p];if(c<u)return{line:p,col:c-r[p-1]+1};if(c===u)return{line:p+1,col:1}}let o=r.length;return{line:o,col:c-r[o-1]+1}}function M(c,i){let{lineStarts:r,src:s}=b(i);if(!r||!(c>=1)||c>r.length)return null;let o=r[c-1],p=r[c];for(;p&&p>o&&s[p-1]===` `;)--p;return s.slice(o,p)}function I({start:c,end:i},r,s=80){let o=M(c.line,r);if(!o)return null;let{col:p}=c;if(o.length>s)if(p<=s-10)o=o.substr(0,s-1)+"\u2026";else{let C=Math.round(s/2);o.length>p+C&&(o=o.substr(0,p+C-1)+"\u2026"),p-=o.length-s,o="\u2026"+o.substr(1-s)}let u=1,h="";i&&(i.line===c.line&&p+(i.col-c.col)<=s+1?u=i.col-c.col:(u=Math.min(o.length+1,s)-p,h="\u2026"));let v=p>1?" ".repeat(p-1):"",O="^".repeat(u);return`${o} ${v}${O}${h}`}var P=class Ut{static copy(i){return new Ut(i.start,i.end)}constructor(i,r){this.start=i,this.end=r||i}isEmpty(){return typeof this.start!="number"||!this.end||this.end<=this.start}setOrigRange(i,r){let{start:s,end:o}=this;if(i.length===0||o<=i[0])return this.origStart=s,this.origEnd=o,r;let p=r;for(;p<i.length&&!(i[p]>s);)++p;this.origStart=s+p;let u=p;for(;p<i.length&&!(i[p]>=o);)++p;return this.origEnd=o+p,u}},Q=class Ne{static addStringTerminator(i,r,s){if(s[s.length-1]===` `)return s;let o=Ne.endOfWhiteSpace(i,r);return o>=i.length||i[o]===` `?s+` `:s}static atDocumentBoundary(i,r,s){let o=i[r];if(!o)return!0;let p=i[r-1];if(p&&p!==` `)return!1;if(s){if(o!==s)return!1}else if(o!==e.DIRECTIVES_END&&o!==e.DOCUMENT_END)return!1;let u=i[r+1],h=i[r+2];if(u!==o||h!==o)return!1;let v=i[r+3];return!v||v===` `||v===" "||v===" "}static endOfIdentifier(i,r){let s=i[r],o=s==="<",p=o?[` `," "," ",">"]:[` `," "," ","[","]","{","}",","];for(;s&&p.indexOf(s)===-1;)s=i[r+=1];return o&&s===">"&&(r+=1),r}static endOfIndent(i,r){let s=i[r];for(;s===" ";)s=i[r+=1];return r}static endOfLine(i,r){let s=i[r];for(;s&&s!==` `;)s=i[r+=1];return r}static endOfWhiteSpace(i,r){let s=i[r];for(;s===" "||s===" ";)s=i[r+=1];return r}static startOfLine(i,r){let s=i[r-1];if(s===` `)return r;for(;s&&s!==` `;)s=i[r-=1];return r+1}static endOfBlockIndent(i,r,s){let o=Ne.endOfIndent(i,s);if(o>s+r)return o;{let p=Ne.endOfWhiteSpace(i,o),u=i[p];if(!u||u===` `)return p}return null}static atBlank(i,r,s){let o=i[r];return o===` `||o===" "||o===" "||s&&!o}static nextNodeIsIndented(i,r,s){return!i||r<0?!1:r>0?!0:s&&i==="-"}static normalizeOffset(i,r){let s=i[r];return s?s!==` `&&i[r-1]===` `?r-1:Ne.endOfWhiteSpace(i,r):r}static foldNewline(i,r,s){let o=0,p=!1,u="",h=i[r+1];for(;h===" "||h===" "||h===` `;){switch(h){case` `:o=0,r+=1,u+=` `;break;case" ":o<=s&&(p=!0),r=Ne.endOfWhiteSpace(i,r+2)-1;break;case" ":o+=1,r+=1;break}h=i[r+1]}return u||(u=" "),h&&o<=s&&(p=!0),{fold:u,offset:r,error:p}}constructor(i,r,s){Object.defineProperty(this,"context",{value:s||null,writable:!0}),this.error=null,this.range=null,this.valueRange=null,this.props=r||[],this.type=i,this.value=null}getPropValue(i,r,s){if(!this.context)return null;let{src:o}=this.context,p=this.props[i];return p&&o[p.start]===r?o.slice(p.start+(s?1:0),p.end):null}get anchor(){for(let i=0;i<this.props.length;++i){let r=this.getPropValue(i,e.ANCHOR,!0);if(r!=null)return r}return null}get comment(){let i=[];for(let r=0;r<this.props.length;++r){let s=this.getPropValue(r,e.COMMENT,!0);s!=null&&i.push(s)}return i.length>0?i.join(` `):null}commentHasRequiredWhitespace(i){let{src:r}=this.context;if(this.header&&i===this.header.end||!this.valueRange)return!1;let{end:s}=this.valueRange;return i!==s||Ne.atBlank(r,s-1)}get hasComment(){if(this.context){let{src:i}=this.context;for(let r=0;r<this.props.length;++r)if(i[this.props[r].start]===e.COMMENT)return!0}return!1}get hasProps(){if(this.context){let{src:i}=this.context;for(let r=0;r<this.props.length;++r)if(i[this.props[r].start]!==e.COMMENT)return!0}return!1}get includesTrailingLines(){return!1}get jsonLike(){return[n.FLOW_MAP,n.FLOW_SEQ,n.QUOTE_DOUBLE,n.QUOTE_SINGLE].indexOf(this.type)!==-1}get rangeAsLinePos(){if(!this.range||!this.context)return;let i=L(this.range.start,this.context.root);if(!i)return;let r=L(this.range.end,this.context.root);return{start:i,end:r}}get rawValue(){if(!this.valueRange||!this.context)return null;let{start:i,end:r}=this.valueRange;return this.context.src.slice(i,r)}get tag(){for(let i=0;i<this.props.length;++i){let r=this.getPropValue(i,e.TAG,!1);if(r!=null){if(r[1]==="<")return{verbatim:r.slice(2,-1)};{let[s,o,p]=r.match(/^(.*!)([^!]*)$/);return{handle:o,suffix:p}}}}return null}get valueRangeContainsNewline(){if(!this.valueRange||!this.context)return!1;let{start:i,end:r}=this.valueRange,{src:s}=this.context;for(let o=i;o<r;++o)if(s[o]===` `)return!0;return!1}parseComment(i){let{src:r}=this.context;if(r[i]===e.COMMENT){let s=Ne.endOfLine(r,i+1),o=new P(i,s);return this.props.push(o),s}return i}setOrigRanges(i,r){return this.range&&(r=this.range.setOrigRange(i,r)),this.valueRange&&this.valueRange.setOrigRange(i,r),this.props.forEach(s=>s.setOrigRange(i,r)),r}toString(){let{context:{src:i},range:r,value:s}=this;if(s!=null)return s;let o=i.slice(r.start,r.end);return Ne.addStringTerminator(i,r.end,o)}},ne=class extends Error{constructor(c,i,r){if(!r||!(i instanceof Q))throw new Error(`Invalid arguments for new ${c}`);super(),this.name=c,this.message=r,this.source=i}makePretty(){if(!this.source)return;this.nodeType=this.source.type;let c=this.source.context&&this.source.context.root;if(typeof this.offset=="number"){this.range=new P(this.offset,this.offset+1);let i=c&&L(this.offset,c);if(i){let r={line:i.line,col:i.col+1};this.linePos={start:i,end:r}}delete this.offset}else this.range=this.source.range,this.linePos=this.source.rangeAsLinePos;if(this.linePos){let{line:i,col:r}=this.linePos.start;this.message+=` at line ${i}, column ${r}`;let s=c&&I(this.linePos,c);s&&(this.message+=`: ${s} `)}delete this.source}},j=class extends ne{constructor(c,i){super("YAMLReferenceError",c,i)}},G=class extends ne{constructor(c,i){super("YAMLSemanticError",c,i)}},U=class extends ne{constructor(c,i){super("YAMLSyntaxError",c,i)}},Z=class extends ne{constructor(c,i){super("YAMLWarning",c,i)}};function ae(c,i,r){return i in c?Object.defineProperty(c,i,{value:r,enumerable:!0,configurable:!0,writable:!0}):c[i]=r,c}var T=class ut extends Q{static endOfLine(i,r,s){let o=i[r],p=r;for(;o&&o!==` `&&!(s&&(o==="["||o==="]"||o==="{"||o==="}"||o===","));){let u=i[p+1];if(o===":"&&(!u||u===` `||u===" "||u===" "||s&&u===",")||(o===" "||o===" ")&&u==="#")break;p+=1,o=u}return p}get strValue(){if(!this.valueRange||!this.context)return null;let{start:i,end:r}=this.valueRange,{src:s}=this.context,o=s[r-1];for(;i<r&&(o===` `||o===" "||o===" ");)o=s[--r-1];let p="";for(let h=i;h<r;++h){let v=s[h];if(v===` `){let{fold:O,offset:C}=Q.foldNewline(s,h,-1);p+=O,h=C}else if(v===" "||v===" "){let O=h,C=s[h+1];for(;h<r&&(C===" "||C===" ");)h+=1,C=s[h+1];C!==` `&&(p+=h>O?s.slice(O,h+1):v)}else p+=v}let u=s[i];switch(u){case" ":{let h="Plain value cannot start with a tab character";return{errors:[new G(this,h)],str:p}}case"@":case"`":{let h=`Plain value cannot start with reserved character ${u}`;return{errors:[new G(this,h)],str:p}}default:return p}}parseBlockValue(i){let{indent:r,inFlow:s,src:o}=this.context,p=i,u=i;for(let h=o[p];h===` `&&!Q.atDocumentBoundary(o,p+1);h=o[p]){let v=Q.endOfBlockIndent(o,r,p+1);if(v===null||o[v]==="#")break;o[v]===` `?p=v:(u=ut.endOfLine(o,v,s),p=u)}return this.valueRange.isEmpty()&&(this.valueRange.start=i),this.valueRange.end=u,u}parse(i,r){this.context=i;let{inFlow:s,src:o}=i,p=r,u=o[p];return u&&u!=="#"&&u!==` `&&(p=ut.endOfLine(o,r,s)),this.valueRange=new P(r,p),p=Q.endOfWhiteSpace(o,p),p=this.parseComment(p),(!this.hasComment||this.valueRange.isEmpty())&&(p=this.parseBlockValue(p)),p}};t.Char=e,t.Node=Q,t.PlainValue=T,t.Range=P,t.Type=n,t.YAMLError=ne,t.YAMLReferenceError=j,t.YAMLSemanticError=G,t.YAMLSyntaxError=U,t.YAMLWarning=Z,t._defineProperty=ae,t.defaultTagPrefix=l,t.defaultTags=g}),sr=Le(t=>{"use strict";var e=Ie(),n=class extends e.Node{constructor(){super(e.Type.BLANK_LINE)}get includesTrailingLines(){return!0}parse(T,c){return this.context=T,this.range=new e.Range(c,c+1),c+1}},l=class extends e.Node{constructor(T,c){super(T,c),this.node=null}get includesTrailingLines(){return!!this.node&&this.node.includesTrailingLines}parse(T,c){this.context=T;let{parseNode:i,src:r}=T,{atLineStart:s,lineStart:o}=T;!s&&this.type===e.Type.SEQ_ITEM&&(this.error=new e.YAMLSemanticError(this,"Sequence items must not have preceding content on the same line"));let p=s?c-o:T.indent,u=e.Node.endOfWhiteSpace(r,c+1),h=r[u],v=h==="#",O=[],C=null;for(;h===` `||h==="#";){if(h==="#"){let F=e.Node.endOfLine(r,u+1);O.push(new e.Range(u,F)),u=F}else{s=!0,o=u+1;let F=e.Node.endOfWhiteSpace(r,o);r[F]===` `&&O.length===0&&(C=new n,o=C.parse({src:r},o)),u=e.Node.endOfIndent(r,o)}h=r[u]}if(e.Node.nextNodeIsIndented(h,u-(o+p),this.type!==e.Type.SEQ_ITEM)?this.node=i({atLineStart:s,inCollection:!1,indent:p,lineStart:o,parent:this},u):h&&o>c+1&&(u=o-1),this.node){if(C){let F=T.parent.items||T.parent.contents;F&&F.push(C)}O.length&&Array.prototype.push.apply(this.props,O),u=this.node.range.end}else if(v){let F=O[0];this.props.push(F),u=F.end}else u=e.Node.endOfLine(r,c+1);let _=this.node?this.node.valueRange.end:u;return this.valueRange=new e.Range(c,_),u}setOrigRanges(T,c){return c=super.setOrigRanges(T,c),this.node?this.node.setOrigRanges(T,c):c}toString(){let{context:{src:T},node:c,range:i,value:r}=this;if(r!=null)return r;let s=c?T.slice(i.start,c.range.start)+String(c):T.slice(i.start,i.end);return e.Node.addStringTerminator(T,i.end,s)}},g=class extends e.Node{constructor(){super(e.Type.COMMENT)}parse(T,c){this.context=T;let i=this.parseComment(c);return this.range=new e.Range(c,i),i}};function E(T){let c=T;for(;c instanceof l;)c=c.node;if(!(c instanceof b))return null;let i=c.items.length,r=-1;for(let p=i-1;p>=0;--p){let u=c.items[p];if(u.type===e.Type.COMMENT){let{indent:h,lineStart:v}=u.context;if(h>0&&u.range.start>=v+h)break;r=p}else if(u.type===e.Type.BLANK_LINE)r=p;else break}if(r===-1)return null;let s=c.items.splice(r,i-r),o=s[0].range.start;for(;c.range.end=o,c.valueRange&&c.valueRange.end>o&&(c.valueRange.end=o),c!==T;)c=c.context.parent;return s}var b=class ft extends e.Node{static nextContentHasIndent(c,i,r){let s=e.Node.endOfLine(c,i)+1;i=e.Node.endOfWhiteSpace(c,s);let o=c[i];return o?i>=s+r?!0:o!=="#"&&o!==` `?!1:ft.nextContentHasIndent(c,i,r):!1}constructor(c){super(c.type===e.Type.SEQ_ITEM?e.Type.SEQ:e.Type.MAP);for(let r=c.props.length-1;r>=0;--r)if(c.props[r].start<c.context.lineStart){this.props=c.props.slice(0,r+1),c.props=c.props.slice(r+1);let s=c.props[0]||c.valueRange;c.range.start=s.start;break}this.items=[c];let i=E(c);i&&Array.prototype.push.apply(this.items,i)}get includesTrailingLines(){return this.items.length>0}parse(c,i){this.context=c;let{parseNode:r,src:s}=c,o=e.Node.startOfLine(s,i),p=this.items[0];p.context.parent=this,this.valueRange=e.Range.copy(p.valueRange);let u=p.range.start-p.context.lineStart,h=i;h=e.Node.normalizeOffset(s,h);let v=s[h],O=e.Node.endOfWhiteSpace(s,o)===h,C=!1;for(;v;){for(;v===` `||v==="#";){if(O&&v===` `&&!C){let B=new n;if(h=B.parse({src:s},h),this.valueRange.end=h,h>=s.length){v=null;break}this.items.push(B),h-=1}else if(v==="#"){if(h<o+u&&!ft.nextContentHasIndent(s,h,u))return h;let B=new g;if(h=B.parse({indent:u,lineStart:o,src:s},h),this.items.push(B),this.valueRange.end=h,h>=s.length){v=null;break}}if(o=h+1,h=e.Node.endOfIndent(s,o),e.Node.atBlank(s,h)){let B=e.Node.endOfWhiteSpace(s,h),q=s[B];(!q||q===` `||q==="#")&&(h=B)}v=s[h],O=!0}if(!v)break;if(h!==o+u&&(O||v!==":")){if(h<o+u){o>i&&(h=o);break}else if(!this.error){let B="All collection items must start at the same column";this.error=new e.YAMLSyntaxError(this,B)}}if(p.type===e.Type.SEQ_ITEM){if(v!=="-"){o>i&&(h=o);break}}else if(v==="-"&&!this.error){let B=s[h+1];if(!B||B===` `||B===" "||B===" "){let q="A collection cannot be both a mapping and a sequence";this.error=new e.YAMLSyntaxError(this,q)}}let _=r({atLineStart:O,inCollection:!0,indent:u,lineStart:o,parent:this},h);if(!_)return h;if(this.items.push(_),this.valueRange.end=_.valueRange.end,h=e.Node.normalizeOffset(s,_.range.end),v=s[h],O=!1,C=_.includesTrailingLines,v){let B=h-1,q=s[B];for(;q===" "||q===" ";)q=s[--B];q===` `&&(o=B+1,O=!0)}let F=E(_);F&&Array.prototype.push.apply(this.items,F)}return h}setOrigRanges(c,i){return i=super.setOrigRanges(c,i),this.items.forEach(r=>{i=r.setOrigRanges(c,i)}),i}toString(){let{context:{src:c},items:i,range:r,value:s}=this;if(s!=null)return s;let o=c.slice(r.start,i[0].range.start)+String(i[0]);for(let p=1;p<i.length;++p){let u=i[p],{atLineStart:h,indent:v}=u.context;if(h)for(let O=0;O<v;++O)o+=" ";o+=String(u)}return e.Node.addStringTerminator(c,r.end,o)}},L=class extends e.Node{constructor(){super(e.Type.DIRECTIVE),this.name=null}get parameters(){let T=this.rawValue;return T?T.trim().split(/[ \t]+/):[]}parseName(T){let{src:c}=this.context,i=T,r=c[i];for(;r&&r!==` `&&r!==" "&&r!==" ";)r=c[i+=1];return this.name=c.slice(T,i),i}parseParameters(T){let{src:c}=this.context,i=T,r=c[i];for(;r&&r!==` `&&r!=="#";)r=c[i+=1];return this.valueRange=new e.Range(T,i),i}parse(T,c){this.context=T;let i=this.parseName(c+1);return i=this.parseParameters(i),i=this.parseComment(i),this.range=new e.Range(c,i),i}},M=class pt extends e.Node{static startCommentOrEndBlankLine(c,i){let r=e.Node.endOfWhiteSpace(c,i),s=c[r];return s==="#"||s===` `?r:i}constructor(){super(e.Type.DOCUMENT),this.directives=null,this.contents=null,this.directivesEndMarker=null,this.documentEndMarker=null}parseDirectives(c){let{src:i}=this.context;this.directives=[];let r=!0,s=!1,o=c;for(;!e.Node.atDocumentBoundary(i,o,e.Char.DIRECTIVES_END);)switch(o=pt.startCommentOrEndBlankLine(i,o),i[o]){case` `:if(r){let p=new n;o=p.parse({src:i},o),o<i.length&&this.directives.push(p)}else o+=1,r=!0;break;case"#":{let p=new g;o=p.parse({src:i},o),this.directives.push(p),r=!1}break;case"%":{let p=new L;o=p.parse({parent:this,src:i},o),this.directives.push(p),s=!0,r=!1}break;default:return s?this.error=new e.YAMLSemanticError(this,"Missing directives-end indicator line"):this.directives.length>0&&(this.contents=this.directives,this.directives=[]),o}return i[o]?(this.directivesEndMarker=new e.Range(o,o+3),o+3):(s?this.error=new e.YAMLSemanticError(this,"Missing directives-end indicator line"):this.directives.length>0&&(this.contents=this.directives,this.directives=[]),o)}parseContents(c){let{parseNode:i,src:r}=this.context;this.contents||(this.contents=[]);let s=c;for(;r[s-1]==="-";)s-=1;let o=e.Node.endOfWhiteSpace(r,c),p=s===c;for(this.valueRange=new e.Range(o);!e.Node.atDocumentBoundary(r,o,e.Char.DOCUMENT_END);){switch(r[o]){case` `:if(p){let u=new n;o=u.parse({src:r},o),o<r.length&&this.contents.push(u)}else o+=1,p=!0;s=o;break;case"#":{let u=new g;o=u.parse({src:r},o),this.contents.push(u),p=!1}break;default:{let u=e.Node.endOfIndent(r,o),h=i({atLineStart:p,indent:-1,inFlow:!1,inCollection:!1,lineStart:s,parent:this},u);if(!h)return this.valueRange.end=u;this.contents.push(h),o=h.range.end,p=!1;let v=E(h);v&&Array.prototype.push.apply(this.contents,v)}}o=pt.startCommentOrEndBlankLine(r,o)}if(this.valueRange.end=o,r[o]&&(this.documentEndMarker=new e.Range(o,o+3),o+=3,r[o])){if(o=e.Node.endOfWhiteSpace(r,o),r[o]==="#"){let u=new g;o=u.parse({src:r},o),this.contents.push(u)}switch(r[o]){case` `:o+=1;break;case void 0:break;default:this.error=new e.YAMLSyntaxError(this,"Document end marker line cannot have a non-comment suffix")}}return o}parse(c,i){c.root=this,this.context=c;let{src:r}=c,s=r.charCodeAt(i)===65279?i+1:i;return s=this.parseDirectives(s),s=this.parseContents(s),s}setOrigRanges(c,i){return i=super.setOrigRanges(c,i),this.directives.forEach(r=>{i=r.setOrigRanges(c,i)}),this.directivesEndMarker&&(i=this.directivesEndMarker.setOrigRange(c,i)),this.contents.forEach(r=>{i=r.setOrigRanges(c,i)}),this.documentEndMarker&&(i=this.documentEndMarker.setOrigRange(c,i)),i}toString(){let{contents:c,directives:i,value:r}=this;if(r!=null)return r;let s=i.join("");return c.length>0&&((i.length>0||c[0].type===e.Type.COMMENT)&&(s+=`--- `),s+=c.join("")),s[s.length-1]!==` `&&(s+=` `),s}},I=class extends e.Node{parse(T,c){this.context=T;let{src:i}=T,r=e.Node.endOfIdentifier(i,c+1);return this.valueRange=new e.Range(c+1,r),r=e.Node.endOfWhiteSpace(i,r),r=this.parseComment(r),r}},P={CLIP:"CLIP",KEEP:"KEEP",STRIP:"STRIP"},Q=class extends e.Node{constructor(T,c){super(T,c),this.blockIndent=null,this.chomping=P.CLIP,this.header=null}get includesTrailingLines(){return this.chomping===P.KEEP}get strValue(){if(!this.valueRange||!this.context)return null;let{start:T,end:c}=this.valueRange,{indent:i,src:r}=this.context;if(this.valueRange.isEmpty())return"";let s=null,o=r[c-1];for(;o===` `||o===" "||o===" ";){if(c-=1,c<=T){if(this.chomping===P.KEEP)break;return""}o===` `&&(s=c),o=r[c-1]}let p=c+1;s&&(this.chomping===P.KEEP?(p=s,c=this.valueRange.end):c=s);let u=i+this.blockIndent,h=this.type===e.Type.BLOCK_FOLDED,v=!0,O="",C="",_=!1;for(let F=T;F<c;++F){for(let q=0;q<u&&r[F]===" ";++q)F+=1;let B=r[F];if(B===` `)C===` `?O+=` `:C=` `;else{let q=e.Node.endOfLine(r,F),oe=r.slice(F,q);F=q,h&&(B===" "||B===" ")&&F<p?(C===" "?C=` `:!_&&!v&&C===` `&&(C=` `),O+=C+oe,C=q<c&&r[q]||"",_=!0):(O+=C+oe,C=h&&F<p?" ":` `,_=!1),v&&oe!==""&&(v=!1)}}return this.chomping===P.STRIP?O:O+` `}parseBlockHeader(T){let{src:c}=this.context,i=T+1,r="";for(;;){let s=c[i];switch(s){case"-":this.chomping=P.STRIP;break;case"+":this.chomping=P.KEEP;break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":r+=s;break;default:return this.blockIndent=Number(r)||null,this.header=new e.Range(T,i),i}i+=1}}parseBlockValue(T){let{indent:c,src:i}=this.context,r=!!this.blockIndent,s=T,o=T,p=1;for(let u=i[s];u===` `&&(s+=1,!e.Node.atDocumentBoundary(i,s));u=i[s]){let h=e.Node.endOfBlockIndent(i,c,s);if(h===null)break;let v=i[h],O=h-(s+c);if(this.blockIndent){if(v&&v!==` `&&O<this.blockIndent){if(i[h]==="#")break;if(!this.error){let C=`Block scalars must not be less indented than their ${r?"explicit indentation indicator":"first line"}`;this.error=new e.YAMLSemanticError(this,C)}}}else if(i[h]!==` `){if(O<p){let C="Block scalars with more-indented leading empty lines must use an explicit indentation indicator";this.error=new e.YAMLSemanticError(this,C)}this.blockIndent=O}else O>p&&(p=O);i[h]===` `?s=h:s=o=e.Node.endOfLine(i,h)}return this.chomping!==P.KEEP&&(s=i[o]?o+1:o),this.valueRange=new e.Range(T+1,s),s}parse(T,c){this.context=T;let{src:i}=T,r=this.parseBlockHeader(c);return r=e.Node.endOfWhiteSpace(i,r),r=this.parseComment(r),r=this.parseBlockValue(r),r}setOrigRanges(T,c){return c=super.setOrigRanges(T,c),this.header?this.header.setOrigRange(T,c):c}},ne=class extends e.Node{constructor(T,c){super(T,c),this.items=null}prevNodeIsJsonLike(T=this.items.length){let c=this.items[T-1];return!!c&&(c.jsonLike||c.type===e.Type.COMMENT&&this.prevNodeIsJsonLike(T-1))}parse(T,c){this.context=T;let{parseNode:i,src:r}=T,{indent:s,lineStart:o}=T,p=r[c];this.items=[{char:p,offset:c}];let u=e.Node.endOfWhiteSpace(r,c+1);for(p=r[u];p&&p!=="]"&&p!=="}";){switch(p){case` `:{o=u+1;let h=e.Node.endOfWhiteSpace(r,o);if(r[h]===` `){let v=new n;o=v.parse({src:r},o),this.items.push(v)}if(u=e.Node.endOfIndent(r,o),u<=o+s&&(p=r[u],u<o+s||p!=="]"&&p!=="}")){let v="Insufficient indentation in flow collection";this.error=new e.YAMLSemanticError(this,v)}}break;case",":this.items.push({char:p,offset:u}),u+=1;break;case"#":{let h=new g;u=h.parse({src:r},u),this.items.push(h)}break;case"?":case":":{let h=r[u+1];if(h===` `||h===" "||h===" "||h===","||p===":"&&this.prevNodeIsJsonLike()){this.items.push({char:p,offset:u}),u+=1;break}}default:{let h=i({atLineStart:!1,inCollection:!1,inFlow:!0,indent:-1,lineStart:o,parent:this},u);if(!h)return this.valueRange=new e.Range(c,u),u;this.items.push(h),u=e.Node.normalizeOffset(r,h.range.end)}}u=e.Node.endOfWhiteSpace(r,u),p=r[u]}return this.valueRange=new e.Range(c,u+1),p&&(this.items.push({char:p,offset:u}),u=e.Node.endOfWhiteSpace(r,u+1),u=this.parseComment(u)),u}setOrigRanges(T,c){return c=super.setOrigRanges(T,c),this.items.forEach(i=>{if(i instanceof e.Node)c=i.setOrigRanges(T,c);else if(T.length===0)i.origOffset=i.offset;else{let r=c;for(;r<T.length&&!(T[r]>i.offset);)++r;i.origOffset=i.offset+r,c=r}}),c}toString(){let{context:{src:T},items:c,range:i,value:r}=this;if(r!=null)return r;let s=c.filter(u=>u instanceof e.Node),o="",p=i.start;return s.forEach(u=>{let h=T.slice(p,u.range.start);p=u.range.end,o+=h+String(u),o[o.length-1]===` `&&T[p-1]!==` `&&T[p]===` `&&(p+=1)}),o+=T.slice(p,i.end),e.Node.addStringTerminator(T,i.end,o)}},j=class Vt extends e.Node{static endOfQuote(c,i){let r=c[i];for(;r&&r!=='"';)i+=r==="\\"?2:1,r=c[i];return i+1}get strValue(){if(!this.valueRange||!this.context)return null;let c=[],{start:i,end:r}=this.valueRange,{indent:s,src:o}=this.context;o[r-1]!=='"'&&c.push(new e.YAMLSyntaxError(this,'Missing closing "quote'));let p="";for(let u=i+1;u<r-1;++u){let h=o[u];if(h===` `){e.Node.atDocumentBoundary(o,u+1)&&c.push(new e.YAMLSemanticError(this,"Document boundary indicators are not allowed within string values"));let{fold:v,offset:O,error:C}=e.Node.foldNewline(o,u,s);p+=v,u=O,C&&c.push(new e.YAMLSemanticError(this,"Multi-line double-quoted string needs to be sufficiently indented"))}else if(h==="\\")switch(u+=1,o[u]){case"0":p+="\0";break;case"a":p+="\x07";break;case"b":p+="\b";break;case"e":p+="\x1B";break;case"f":p+="\f";break;case"n":p+=` `;break;case"r":p+="\r";break;case"t":p+=" ";break;case"v":p+="\v";break;case"N":p+="\x85";break;case"_":p+="\xA0";break;case"L":p+="\u2028";break;case"P":p+="\u2029";break;case" ":p+=" ";break;case'"':p+='"';break;case"/":p+="/";break;case"\\":p+="\\";break;case" ":p+=" ";break;case"x":p+=this.parseCharCode(u+1,2,c),u+=2;break;case"u":p+=this.parseCharCode(u+1,4,c),u+=4;break;case"U":p+=this.parseCharCode(u+1,8,c),u+=8;break;case` `:for(;o[u+1]===" "||o[u+1]===" ";)u+=1;break;default:c.push(new e.YAMLSyntaxError(this,`Invalid escape sequence ${o.substr(u-1,2)}`)),p+="\\"+o[u]}else if(h===" "||h===" "){let v=u,O=o[u+1];for(;O===" "||O===" ";)u+=1,O=o[u+1];O!==` `&&(p+=u>v?o.slice(v,u+1):h)}else p+=h}return c.length>0?{errors:c,str:p}:p}parseCharCode(c,i,r){let{src:s}=this.context,o=s.substr(c,i),p=o.length===i&&/^[0-9a-fA-F]+$/.test(o)?parseInt(o,16):NaN;return isNaN(p)?(r.push(new e.YAMLSyntaxError(this,`Invalid escape sequence ${s.substr(c-2,i+2)}`)),s.substr(c-2,i+2)):String.fromCodePoint(p)}parse(c,i){this.context=c;let{src:r}=c,s=Vt.endOfQuote(r,i+1);return this.valueRange=new e.Range(i,s),s=e.Node.endOfWhiteSpace(r,s),s=this.parseComment(s),s}},G=class Qt extends e.Node{static endOfQuote(c,i){let r=c[i];for(;r;)if(r==="'"){if(c[i+1]!=="'")break;r=c[i+=2]}else r=c[i+=1];return i+1}get strValue(){if(!this.valueRange||!this.context)return null;let c=[],{start:i,end:r}=this.valueRange,{indent:s,src:o}=this.context;o[r-1]!=="'"&&c.push(new e.YAMLSyntaxError(this,"Missing closing 'quote"));let p="";for(let u=i+1;u<r-1;++u){let h=o[u];if(h===` `){e.Node.atDocumentBoundary(o,u+1)&&c.push(new e.YAMLSemanticError(this,"Document boundary indicators are not allowed within string values"));let{fold:v,offset:O,error:C}=e.Node.foldNewline(o,u,s);p+=v,u=O,C&&c.push(new e.YAMLSemanticError(this,"Multi-line single-quoted string needs to be sufficiently indented"))}else if(h==="'")p+=h,u+=1,o[u]!=="'"&&c.push(new e.YAMLSyntaxError(this,"Unescaped single quote? This should not happen."));else if(h===" "||h===" "){let v=u,O=o[u+1];for(;O===" "||O===" ";)u+=1,O=o[u+1];O!==` `&&(p+=u>v?o.slice(v,u+1):h)}else p+=h}return c.length>0?{errors:c,str:p}:p}parse(c,i){this.context=c;let{src:r}=c,s=Qt.endOfQuote(r,i+1);return this.valueRange=new e.Range(i,s),s=e.Node.endOfWhiteSpace(r,s),s=this.parseComment(s),s}};function U(T,c){switch(T){case e.Type.ALIAS:return new I(T,c);case e.Type.BLOCK_FOLDED:case e.Type.BLOCK_LITERAL:return new Q(T,c);case e.Type.FLOW_MAP:case e.Type.FLOW_SEQ:return new ne(T,c);case e.Type.MAP_KEY:case e.Type.MAP_VALUE:case e.Type.SEQ_ITEM:return new l(T,c);case e.Type.COMMENT:case e.Type.PLAIN:return new e.PlainValue(T,c);case e.Type.QUOTE_DOUBLE:return new j(T,c);case e.Type.QUOTE_SINGLE:return new G(T,c);default:return null}}var Z=class Ge{static parseType(c,i,r){switch(c[i]){case"*":return e.Type.ALIAS;case">":return e.Type.BLOCK_FOLDED;case"|":return e.Type.BLOCK_LITERAL;case"{":return e.Type.FLOW_MAP;case"[":return e.Type.FLOW_SEQ;case"?":return!r&&e.Node.atBlank(c,i+1,!0)?e.Type.MAP_KEY:e.Type.PLAIN;case":":return!r&&e.Node.atBlank(c,i+1,!0)?e.Type.MAP_VALUE:e.Type.PLAIN;case"-":return!r&&e.Node.atBlank(c,i+1,!0)?e.Type.SEQ_ITEM:e.Type.PLAIN;case'"':return e.Type.QUOTE_DOUBLE;case"'":return e.Type.QUOTE_SINGLE;default:return e.Type.PLAIN}}constructor(c={},{atLineStart:i,inCollection:r,inFlow:s,indent:o,lineStart:p,parent:u}={}){e._defineProperty(this,"parseNode",(h,v)=>{if(e.Node.atDocumentBoundary(this.src,v))return null;let O=new Ge(this,h),{props:C,type:_,valueStart:F}=O.parseProps(v),B=U(_,C),q=B.parse(O,F);if(B.range=new e.Range(v,q),q<=v&&(B.error=new Error("Node#parse consumed no characters"),B.error.parseEnd=q,B.error.source=B,B.range.end=v+1),O.nodeStartsCollection(B)){!B.error&&!O.atLineStart&&O.parent.type===e.Type.DOCUMENT&&(B.error=new e.YAMLSyntaxError(B,"Block collection must not have preceding content here (e.g. directives-end indicator)"));let oe=new b(B);return q=oe.parse(new Ge(O),q),oe.range=new e.Range(v,q),oe}return B}),this.atLineStart=i??(c.atLineStart||!1),this.inCollection=r??(c.inCollection||!1),this.inFlow=s??(c.inFlow||!1),this.indent=o??c.indent,this.lineStart=p??c.lineStart,this.parent=u??(c.parent||{}),this.root=c.root,this.src=c.src}nodeStartsCollection(c){let{inCollection:i,inFlow:r,src:s}=this;if(i||r)return!1;if(c instanceof l)return!0;let o=c.range.end;return s[o]===` `||s[o-1]===` `?!1:(o=e.Node.endOfWhiteSpace(s,o),s[o]===":")}parseProps(c){let{inFlow:i,parent:r,src:s}=this,o=[],p=!1;c=this.atLineStart?e.Node.endOfIndent(s,c):e.Node.endOfWhiteSpace(s,c);let u=s[c];for(;u===e.Char.ANCHOR||u===e.Char.COMMENT||u===e.Char.TAG||u===` `;){if(u===` `){let v=c,O;do O=v+1,v=e.Node.endOfIndent(s,O);while(s[v]===` `);let C=v-(O+this.indent),_=r.type===e.Type.SEQ_ITEM&&r.context.atLineStart;if(s[v]!=="#"&&!e.Node.nextNodeIsIndented(s[v],C,!_))break;this.atLineStart=!0,this.lineStart=O,p=!1,c=v}else if(u===e.Char.COMMENT){let v=e.Node.endOfLine(s,c+1);o.push(new e.Range(c,v)),c=v}else{let v=e.Node.endOfIdentifier(s,c+1);u===e.Char.TAG&&s[v]===","&&/^[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+,\d\d\d\d(-\d\d){0,2}\/\S/.test(s.slice(c+1,v+13))&&(v=e.Node.endOfIdentifier(s,v+5)),o.push(new e.Range(c,v)),p=!0,c=e.Node.endOfWhiteSpace(s,v)}u=s[c]}p&&u===":"&&e.Node.atBlank(s,c+1,!0)&&(c-=1);let h=Ge.parseType(s,c,i);return{props:o,type:h,valueStart:c}}};function ae(T){let c=[];T.indexOf("\r")!==-1&&(T=T.replace(/\r\n?/g,(s,o)=>(s.length>1&&c.push(o),` `)));let i=[],r=0;do{let s=new M,o=new Z({src:T});r=s.parse(o,r),i.push(s)}while(r<T.length);return i.setOrigRanges=()=>{if(c.length===0)return!1;for(let o=1;o<c.length;++o)c[o]-=o;let s=0;for(let o=0;o<i.length;++o)s=i[o].setOrigRanges(c,s);return c.splice(0,c.length),!0},i.toString=()=>i.join(`... `),i}t.parse=ae}),Ue=Le(t=>{"use strict";var e=Ie();function n(f,a,d){return d?`#${d.replace(/[\s\S]^/gm,`$&${a}#`)} ${a}${f}`:f}function l(f,a,d){return d?d.indexOf(` `)===-1?`${f} #${d}`:`${f} `+d.replace(/^/gm,`${a||""}#`):f}var g=class{};function E(f,a,d){if(Array.isArray(f))return f.map((m,y)=>E(m,String(y),d));if(f&&typeof f.toJSON=="function"){let m=d&&d.anchors&&d.anchors.get(f);m&&(d.onCreate=S=>{m.res=S,delete d.onCreate});let y=f.toJSON(a,d);return m&&d.onCreate&&d.onCreate(y),y}return(!d||!d.keep)&&typeof f=="bigint"?Number(f):f}var b=class extends g{constructor(f){super(),this.value=f}toJSON(f,a){return a&&a.keep?this.value:E(this.value,f,a)}toString(){return String(this.value)}};function L(f,a,d){let m=d;for(let y=a.length-1;y>=0;--y){let S=a[y];if(Number.isInteger(S)&&S>=0){let N=[];N[S]=m,m=N}else{let N={};Object.defineProperty(N,S,{value:m,writable:!0,enumerable:!0,configurable:!0}),m=N}}return f.createNode(m,!1)}var M=f=>f==null||typeof f=="object"&&f[Symbol.iterator]().next().done,I=class Ce extends g{constructor(a){super(),e._defineProperty(this,"items",[]),this.schema=a}addIn(a,d){if(M(a))this.add(d);else{let[m,...y]=a,S=this.get(m,!0);if(S instanceof Ce)S.addIn(y,d);else if(S===void 0&&this.schema)this.set(m,L(this.schema,y,d));else throw new Error(`Expected YAML collection at ${m}. Remaining path: ${y}`)}}deleteIn([a,...d]){if(d.length===0)return this.delete(a);let m=this.get(a,!0);if(m instanceof Ce)return m.deleteIn(d);throw new Error(`Expected YAML collection at ${a}. Remaining path: ${d}`)}getIn([a,...d],m){let y=this.get(a,!0);return d.length===0?!m&&y instanceof b?y.value:y:y instanceof Ce?y.getIn(d,m):void 0}hasAllNullValues(){return this.items.every(a=>{if(!a||a.type!=="PAIR")return!1;let d=a.value;return d==null||d instanceof b&&d.value==null&&!d.commentBefore&&!d.comment&&!d.tag})}hasIn([a,...d]){if(d.length===0)return this.has(a);let m=this.get(a,!0);return m instanceof Ce?m.hasIn(d):!1}setIn([a,...d],m){if(d.length===0)this.set(a,m);else{let y=this.get(a,!0);if(y instanceof Ce)y.setIn(d,m);else if(y===void 0&&this.schema)this.set(a,L(this.schema,d,m));else throw new Error(`Expected YAML collection at ${a}. Remaining path: ${d}`)}}toJSON(){return null}toString(a,{blockItem:d,flowChars:m,isMap:y,itemIndent:S},N,A){let{indent:x,indentStep:k,stringify:R}=a,W=this.type===e.Type.FLOW_MAP||this.type===e.Type.FLOW_SEQ||a.inFlow;W&&(S+=k);let re=y&&this.hasAllNullValues();a=Object.assign({},a,{allNullValues:re,indent:S,inFlow:W,type:null});let V=!1,ie=!1,J=this.items.reduce((ce,X,se)=>{let ee;X&&(!V&&X.spaceBefore&&ce.push({type:"comment",str:""}),X.commentBefore&&X.commentBefore.match(/^.*$/gm).forEach(Xn=>{ce.push({type:"comment",str:`#${Xn}`})}),X.comment&&(ee=X.comment),W&&(!V&&X.spaceBefore||X.commentBefore||X.comment||X.key&&(X.key.commentBefore||X.key.comment)||X.value&&(X.value.commentBefore||X.value.comment))&&(ie=!0)),V=!1;let ue=R(X,a,()=>ee=null,()=>V=!0);return W&&!ie&&ue.includes(` `)&&(ie=!0),W&&se<this.items.length-1&&(ue+=","),ue=l(ue,S,ee),V&&(ee||W)&&(V=!1),ce.push({type:"item",str:ue}),ce},[]),te;if(J.length===0)te=m.start+m.end;else if(W){let{start:ce,end:X}=m,se=J.map(ee=>ee.str);if(ie||se.reduce((ee,ue)=>ee+ue.length+2,2)>Ce.maxFlowStringSingleLineLength){te=ce;for(let ee of se)te+=ee?` ${k}${x}${ee}`:` `;te+=` ${x}${X}`}else te=`${ce} ${se.join(" ")} ${X}`}else{let ce=J.map(d);te=ce.shift();for(let X of ce)te+=X?` ${x}${X}`:` `}return this.comment?(te+=` `+this.comment.replace(/^/gm,`${x}#`),N&&N()):V&&A&&A(),te}};e._defineProperty(I,"maxFlowStringSingleLineLength",60);function P(f){let a=f instanceof b?f.value:f;return a&&typeof a=="string"&&(a=Number(a)),Number.isInteger(a)&&a>=0?a:null}var Q=class extends I{add(f){this.items.push(f)}delete(f){let a=P(f);return typeof a!="number"?!1:this.items.splice(a,1).length>0}get(f,a){let d=P(f);if(typeof d!="number")return;let m=this.items[d];return!a&&m instanceof b?m.value:m}has(f){let a=P(f);return typeof a=="number"&&a<this.items.length}set(f,a){let d=P(f);if(typeof d!="number")throw new Error(`Expected a valid index, not ${f}.`);this.items[d]=a}toJSON(f,a){let d=[];a&&a.onCreate&&a.onCreate(d);let m=0;for(let y of this.items)d.push(E(y,String(m++),a));return d}toString(f,a,d){return f?super.toString(f,{blockItem:m=>m.type==="comment"?m.str:`- ${m.str}`,flowChars:{start:"[",end:"]"},isMap:!1,itemIndent:(f.indent||"")+" "},a,d):JSON.stringify(this)}},ne=(f,a,d)=>a===null?"":typeof a!="object"?String(a):f instanceof g&&d&&d.doc?f.toString({anchors:Object.create(null),doc:d.doc,indent:"",indentStep:d.indentStep,inFlow:!0,inStringifyKey:!0,stringify:d.stringify}):JSON.stringify(a),j=class Jt extends g{constructor(a,d=null){super(),this.key=a,this.value=d,this.type=Jt.Type.PAIR}get commentBefore(){return this.key instanceof g?this.key.commentBefore:void 0}set commentBefore(a){if(this.key==null&&(this.key=new b(null)),this.key instanceof g)this.key.commentBefore=a;else{let d="Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node.";throw new Error(d)}}addToJSMap(a,d){let m=E(this.key,"",a);if(d instanceof Map){let y=E(this.value,m,a);d.set(m,y)}else if(d instanceof Set)d.add(m);else{let y=ne(this.key,m,a),S=E(this.value,y,a);y in d?Object.defineProperty(d,y,{value:S,writable:!0,enumerable:!0,configurable:!0}):d[y]=S}return d}toJSON(a,d){let m=d&&d.mapAsMap?new Map:{};return this.addToJSMap(d,m)}toString(a,d,m){if(!a||!a.doc)return JSON.stringify(this);let{indent:y,indentSeq:S,simpleKeys:N}=a.doc.options,{key:A,value:x}=this,k=A instanceof g&&A.comment;if(N){if(k)throw new Error("With simple keys, key nodes cannot have comments");if(A instanceof I){let ue="With simple keys, collection cannot be used as a key value";throw new Error(ue)}}let R=!N&&(!A||k||(A instanceof g?A instanceof I||A.type===e.Type.BLOCK_FOLDED||A.type===e.Type.BLOCK_LITERAL:typeof A=="object")),{doc:W,indent:re,indentStep:V,stringify:ie}=a;a=Object.assign({},a,{implicitKey:!R,indent:re+V});let J=!1,te=ie(A,a,()=>k=null,()=>J=!0);if(te=l(te,a.indent,k),!R&&te.length>1024){if(N)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");R=!0}if(a.allNullValues&&!N)return this.comment?(te=l(te,a.indent,this.comment),d&&d()):J&&!k&&m&&m(),a.inFlow&&!R?te:`? ${te}`;te=R?`? ${te} ${re}:`:`${te}:`,this.comment&&(te=l(te,a.indent,this.comment),d&&d());let ce="",X=null;if(x instanceof g){if(x.spaceBefore&&(ce=` `),x.commentBefore){let ue=x.commentBefore.replace(/^/gm,`${a.indent}#`);ce+=` ${ue}`}X=x.comment}else x&&typeof x=="object"&&(x=W.schema.createNode(x,!0));a.implicitKey=!1,!R&&!this.comment&&x instanceof b&&(a.indentAtStart=te.length+1),J=!1,!S&&y>=2&&!a.inFlow&&!R&&x instanceof Q&&x.type!==e.Type.FLOW_SEQ&&!x.tag&&!W.anchors.getName(x)&&(a.indent=a.indent.substr(2));let se=ie(x,a,()=>X=null,()=>J=!0),ee=" ";return ce||this.comment?ee=`${ce} ${a.indent}`:!R&&x instanceof I?(!(se[0]==="["||se[0]==="{")||se.includes(` `))&&(ee=` ${a.indent}`):se[0]===` `&&(ee=""),J&&!X&&m&&m(),l(te+ee+se,a.indent,X)}};e._defineProperty(j,"Type",{PAIR:"PAIR",MERGE_PAIR:"MERGE_PAIR"});var G=(f,a)=>{if(f instanceof U){let d=a.get(f.source);return d.count*d.aliasCount}else if(f instanceof I){let d=0;for(let m of f.items){let y=G(m,a);y>d&&(d=y)}return d}else if(f instanceof j){let d=G(f.key,a),m=G(f.value,a);return Math.max(d,m)}return 1},U=class Ht extends g{static stringify({range:a,source:d},{anchors:m,doc:y,implicitKey:S,inStringifyKey:N}){let A=Object.keys(m).find(k=>m[k]===d);if(!A&&N&&(A=y.anchors.getName(d)||y.anchors.newName()),A)return`*${A}${S?" ":""}`;let x=y.anchors.getName(d)?"Alias node must be after source node":"Source node not found for alias node";throw new Error(`${x} [${a}]`)}constructor(a){super(),this.source=a,this.type=e.Type.ALIAS}set tag(a){throw new Error("Alias nodes cannot have tags")}toJSON(a,d){if(!d)return E(this.source,a,d);let{anchors:m,maxAliasCount:y}=d,S=m.get(this.source);if(!S||S.res===void 0){let N="This should not happen: Alias anchor was not resolved?";throw this.cstNode?new e.YAMLReferenceError(this.cstNode,N):new ReferenceError(N)}if(y>=0&&(S.count+=1,S.aliasCount===0&&(S.aliasCount=G(this.source,m)),S.count*S.aliasCount>y)){let N="Excessive alias count indicates a resource exhaustion attack";throw this.cstNode?new e.YAMLReferenceError(this.cstNode,N):new ReferenceError(N)}return S.res}toString(a){return Ht.stringify(this,a)}};e._defineProperty(U,"default",!0);function Z(f,a){let d=a instanceof b?a.value:a;for(let m of f)if(m instanceof j&&(m.key===a||m.key===d||m.key&&m.key.value===d))return m}var ae=class extends I{add(f,a){f?f instanceof j||(f=new j(f.key||f,f.value)):f=new j(f);let d=Z(this.items,f.key),m=this.schema&&this.schema.sortMapEntries;if(d)if(a)d.value=f.value;else throw new Error(`Key ${f.key} already set`);else if(m){let y=this.items.findIndex(S=>m(f,S)<0);y===-1?this.items.push(f):this.items.splice(y,0,f)}else this.items.push(f)}delete(f){let a=Z(this.items,f);return a?this.items.splice(this.items.indexOf(a),1).length>0:!1}get(f,a){let d=Z(this.items,f),m=d&&d.value;return!a&&m instanceof b?m.value:m}has(f){return!!Z(this.items,f)}set(f,a){this.add(new j(f,a),!0)}toJSON(f,a,d){let m=d?new d:a&&a.mapAsMap?new Map:{};a&&a.onCreate&&a.onCreate(m);for(let y of this.items)y.addToJSMap(a,m);return m}toString(f,a,d){if(!f)return JSON.stringify(this);for(let m of this.items)if(!(m instanceof j))throw new Error(`Map items must all be pairs; found ${JSON.stringify(m)} instead`);return super.toString(f,{blockItem:m=>m.str,flowChars:{start:"{",end:"}"},isMap:!0,itemIndent:f.indent||""},a,d)}},T="<<",c=class extends j{constructor(f){if(f instanceof j){let a=f.value;a instanceof Q||(a=new Q,a.items.push(f.value),a.range=f.value.range),super(f.key,a),this.range=f.range}else super(new b(T),new Q);this.type=j.Type.MERGE_PAIR}addToJSMap(f,a){for(let{source:d}of this.value.items){if(!(d instanceof ae))throw new Error("Merge sources must be maps");let m=d.toJSON(null,f,Map);for(let[y,S]of m)a instanceof Map?a.has(y)||a.set(y,S):a instanceof Set?a.add(y):Object.prototype.hasOwnProperty.call(a,y)||Object.defineProperty(a,y,{value:S,writable:!0,enumerable:!0,configurable:!0})}return a}toString(f,a){let d=this.value;if(d.items.length>1)return super.toString(f,a);this.value=d.items[0];let m=super.toString(f,a);return this.value=d,m}},i={defaultType:e.Type.BLOCK_LITERAL,lineWidth:76},r={trueStr:"true",falseStr:"false"},s={asBigInt:!1},o={nullStr:"null"},p={defaultType:e.Type.PLAIN,doubleQuoted:{jsonEncoding:!1,minMultiLineLength:40},fold:{lineWidth:80,minContentWidth:20}};function u(f,a,d){for(let{format:m,test:y,resolve:S}of a)if(y){let N=f.match(y);if(N){let A=S.apply(null,N);return A instanceof b||(A=new b(A)),m&&(A.format=m),A}}return d&&(f=d(f)),new b(f)}var h="flow",v="block",O="quoted",C=(f,a)=>{let d=f[a+1];for(;d===" "||d===" ";){do d=f[a+=1];while(d&&d!==` `);d=f[a+1]}return a};function _(f,a,d,{indentAtStart:m,lineWidth:y=80,minContentWidth:S=20,onFold:N,onOverflow:A}){if(!y||y<0)return f;let x=Math.max(1+S,1+y-a.length);if(f.length<=x)return f;let k=[],R={},W=y-a.length;typeof m=="number"&&(m>y-Math.max(2,S)?k.push(0):W=y-m);let re,V,ie=!1,J=-1,te=-1,ce=-1;d===v&&(J=C(f,J),J!==-1&&(W=J+x));for(let se;se=f[J+=1];){if(d===O&&se==="\\"){switch(te=J,f[J+1]){case"x":J+=3;break;case"u":J+=5;break;case"U":J+=9;break;default:J+=1}ce=J}if(se===` `)d===v&&(J=C(f,J)),W=J+x,re=void 0;else{if(se===" "&&V&&V!==" "&&V!==` `&&V!==" "){let ee=f[J+1];ee&&ee!==" "&&ee!==` `&&ee!==" "&&(re=J)}if(J>=W)if(re)k.push(re),W=re+x,re=void 0;else if(d===O){for(;V===" "||V===" ";)V=se,se=f[J+=1],ie=!0;let ee=J>ce+1?J-2:te-1;if(R[ee])return f;k.push(ee),R[ee]=!0,W=ee+x,re=void 0}else ie=!0}V=se}if(ie&&A&&A(),k.length===0)return f;N&&N();let X=f.slice(0,k[0]);for(let se=0;se<k.length;++se){let ee=k[se],ue=k[se+1]||f.length;ee===0?X=` ${a}${f.slice(0,ue)}`:(d===O&&R[ee]&&(X+=`${f[ee]}\\`),X+=` ${a}${f.slice(ee+1,ue)}`)}return X}var F=({indentAtStart:f})=>f?Object.assign({indentAtStart:f},p.fold):p.fold,B=f=>/^(%|---|\.\.\.)/m.test(f);function q(f,a,d){if(!a||a<0)return!1;let m=a-d,y=f.length;if(y<=m)return!1;for(let S=0,N=0;S<y;++S)if(f[S]===` `){if(S-N>m)return!0;if(N=S+1,y-N<=m)return!1}return!0}function oe(f,a){let{implicitKey:d}=a,{jsonEncoding:m,minMultiLineLength:y}=p.doubleQuoted,S=JSON.stringify(f);if(m)return S;let N=a.indent||(B(f)?" ":""),A="",x=0;for(let k=0,R=S[k];R;R=S[++k])if(R===" "&&S[k+1]==="\\"&&S[k+2]==="n"&&(A+=S.slice(x,k)+"\\ ",k+=1,x=k,R="\\"),R==="\\")switch(S[k+1]){case"u":{A+=S.slice(x,k);let W=S.substr(k+2,4);switch(W){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:W.substr(0,2)==="00"?A+="\\x"+W.substr(2):A+=S.substr(k,6)}k+=5,x=k+1}break;case"n":if(d||S[k+2]==='"'||S.length<y)k+=1;else{for(A+=S.slice(x,k)+` `;S[k+2]==="\\"&&S[k+3]==="n"&&S[k+4]!=='"';)A+=` `,k+=2;A+=N,S[k+2]===" "&&(A+="\\"),k+=1,x=k+1}break;default:k+=1}return A=x?A+S.slice(x):S,d?A:_(A,N,O,F(a))}function de(f,a){if(a.implicitKey){if(/\n/.test(f))return oe(f,a)}else if(/[ \t]\n|\n[ \t]/.test(f))return oe(f,a);let d=a.indent||(B(f)?" ":""),m="'"+f.replace(/'/g,"''").replace(/\n+/g,`$& ${d}`)+"'";return a.implicitKey?m:_(m,d,h,F(a))}function ve({comment:f,type:a,value:d},m,y,S){if(/\n[\t ]+$/.test(d)||/^\s*$/.test(d))return oe(d,m);let N=m.indent||(m.forceBlockIndent||B(d)?" ":""),A=N?"2":"1",x=a===e.Type.BLOCK_FOLDED?!1:a===e.Type.BLOCK_LITERAL?!0:!q(d,p.fold.lineWidth,N.length),k=x?"|":">";if(!d)return k+` `;let R="",W="";if(d=d.replace(/[\n\t ]*$/,V=>{let ie=V.indexOf(` `);return ie===-1?k+="-":(d===V||ie!==V.length-1)&&(k+="+",S&&S()),W=V.replace(/\n$/,""),""}).replace(/^[\n ]*/,V=>{V.indexOf(" ")!==-1&&(k+=A);let ie=V.match(/ +$/);return ie?(R=V.slice(0,-ie[0].length),ie[0]):(R=V,"")}),W&&(W=W.replace(/\n+(?!\n|$)/g,`$&${N}`)),R&&(R=R.replace(/\n+/g,`$&${N}`)),f&&(k+=" #"+f.replace(/ ?[\r\n]+/g," "),y&&y()),!d)return`${k}${A} ${N}${W}`;if(x)return d=d.replace(/\n+/g,`$&${N}`),`${k} ${N}${R}${d}${W}`;d=d.replace(/\n+/g,` $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${N}`);let re=_(`${R}${d}${W}`,N,v,p.fold);return`${k} ${N}${re}`}function w(f,a,d,m){let{comment:y,type:S,value:N}=f,{actualString:A,implicitKey:x,indent:k,inFlow:R}=a;if(x&&/[\n[\]{},]/.test(N)||R&&/[[\]{},]/.test(N))return oe(N,a);if(!N||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(N))return x||R||N.indexOf(` `)===-1?N.indexOf('"')!==-1&&N.indexOf("'")===-1?de(N,a):oe(N,a):ve(f,a,d,m);if(!x&&!R&&S!==e.Type.PLAIN&&N.indexOf(` `)!==-1)return ve(f,a,d,m);if(k===""&&B(N))return a.forceBlockIndent=!0,ve(f,a,d,m);let W=N.replace(/\n+/g,`$& ${k}`);if(A){let{tags:V}=a.doc.schema;if(typeof u(W,V,V.scalarFallback).value!="string")return oe(N,a)}let re=x?W:_(W,k,h,F(a));return y&&!R&&(re.indexOf(` `)!==-1||y.indexOf(` `)!==-1)?(d&&d(),n(re,k,y)):re}function $(f,a,d,m){let{defaultType:y}=p,{implicitKey:S,inFlow:N}=a,{type:A,value:x}=f;typeof x!="string"&&(x=String(x),f=Object.assign({},f,{value:x}));let k=W=>{switch(W){case e.Type.BLOCK_FOLDED:case e.Type.BLOCK_LITERAL:return ve(f,a,d,m);case e.Type.QUOTE_DOUBLE:return oe(x,a);case e.Type.QUOTE_SINGLE:return de(x,a);case e.Type.PLAIN:return w(f,a,d,m);default:return null}};(A!==e.Type.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f]/.test(x)||(S||N)&&(A===e.Type.BLOCK_FOLDED||A===e.Type.BLOCK_LITERAL))&&(A=e.Type.QUOTE_DOUBLE);let R=k(A);if(R===null&&(R=k(y),R===null))throw new Error(`Unsupported default string type ${y}`);return R}function D({format:f,minFractionDigits:a,tag:d,value:m}){if(typeof m=="bigint")return String(m);if(!isFinite(m))return isNaN(m)?".nan":m<0?"-.inf":".inf";let y=JSON.stringify(m);if(!f&&a&&(!d||d==="tag:yaml.org,2002:float")&&/^\d/.test(y)){let S=y.indexOf(".");S<0&&(S=y.length,y+=".");let N=a-(y.length-S-1);for(;N-- >0;)y+="0"}return y}function Y(f,a){let d,m;switch(a.type){case e.Type.FLOW_MAP:d="}",m="flow map";break;case e.Type.FLOW_SEQ:d="]",m="flow sequence";break;default:f.push(new e.YAMLSemanticError(a,"Not a flow collection!?"));return}let y;for(let S=a.items.length-1;S>=0;--S){let N=a.items[S];if(!N||N.type!==e.Type.COMMENT){y=N;break}}if(y&&y.char!==d){let S=`Expected ${m} to end with ${d}`,N;typeof y.offset=="number"?(N=new e.YAMLSemanticError(a,S),N.offset=y.offset+1):(N=new e.YAMLSemanticError(y,S),y.range&&y.range.end&&(N.offset=y.range.end-y.range.start)),f.push(N)}}function K(f,a){let d=a.context.src[a.range.start-1];if(d!==` `&&d!==" "&&d!==" "){let m="Comments must be separated from other tokens by white space characters";f.push(new e.YAMLSemanticError(a,m))}}function H(f,a){let d=String(a),m=d.substr(0,8)+"..."+d.substr(-8);return new e.YAMLSemanticError(f,`The "${m}" key is too long`)}function he(f,a){for(let{afterKey:d,before:m,comment:y}of a){let S=f.items[m];S?(d&&S.value&&(S=S.value),y===void 0?(d||!S.commentBefore)&&(S.spaceBefore=!0):S.commentBefore?S.commentBefore+=` `+y:S.commentBefore=y):y!==void 0&&(f.comment?f.comment+=` `+y:f.comment=y)}}function we(f,a){let d=a.strValue;return d?typeof d=="string"?d:(d.errors.forEach(m=>{m.source||(m.source=a),f.errors.push(m)}),d.str):""}function Oe(f,a){let{handle:d,suffix:m}=a.tag,y=f.tagPrefixes.find(S=>S.handle===d);if(!y){let S=f.getDefaults().tagPrefixes;if(S&&(y=S.find(N=>N.handle===d)),!y)throw new e.YAMLSemanticError(a,`The ${d} tag handle is non-default and was not declared.`)}if(!m)throw new e.YAMLSemanticError(a,`The ${d} tag has no suffix.`);if(d==="!"&&(f.version||f.options.version)==="1.0"){if(m[0]==="^")return f.warnings.push(new e.YAMLWarning(a,"YAML 1.0 ^ tag expansion is not supported")),m;if(/[:/]/.test(m)){let S=m.match(/^([a-z0-9-]+)\/(.*)/i);return S?`tag:${S[1]}.yaml.org,2002:${S[2]}`:`tag:${m}`}}return y.prefix+decodeURIComponent(m)}function Se(f,a){let{tag:d,type:m}=a,y=!1;if(d){let{handle:S,suffix:N,verbatim:A}=d;if(A){if(A!=="!"&&A!=="!!")return A;let x=`Verbatim tags aren't resolved, so ${A} is invalid.`;f.errors.push(new e.YAMLSemanticError(a,x))}else if(S==="!"&&!N)y=!0;else try{return Oe(f,a)}catch(x){f.errors.push(x)}}switch(m){case e.Type.BLOCK_FOLDED:case e.Type.BLOCK_LITERAL:case e.Type.QUOTE_DOUBLE:case e.Type.QUOTE_SINGLE:return e.defaultTags.STR;case e.Type.FLOW_MAP:case e.Type.MAP:return e.defaultTags.MAP;case e.Type.FLOW_SEQ:case e.Type.SEQ:return e.defaultTags.SEQ;case e.Type.PLAIN:return y?e.defaultTags.STR:null;default:return null}}function Fe(f,a,d){let{tags:m}=f.schema,y=[];for(let N of m)if(N.tag===d)if(N.test)y.push(N);else{let A=N.resolve(f,a);return A instanceof I?A:new b(A)}let S=we(f,a);return typeof S=="string"&&y.length>0?u(S,y,m.scalarFallback):null}function Je({type:f}){switch(f){case e.Type.FLOW_MAP:case e.Type.MAP:return e.defaultTags.MAP;case e.Type.FLOW_SEQ:case e.Type.SEQ:return e.defaultTags.SEQ;default:return e.defaultTags.STR}}function Fn(f,a,d){try{let m=Fe(f,a,d);if(m)return d&&a.tag&&(m.tag=d),m}catch(m){return m.source||(m.source=a),f.errors.push(m),null}try{let m=Je(a);if(!m)throw new Error(`The tag ${d} is unavailable`);let y=`The tag ${d} is unavailable, falling back to ${m}`;f.warnings.push(new e.YAMLWarning(a,y));let S=Fe(f,a,m);return S.tag=d,S}catch(m){let y=new e.YAMLReferenceError(a,m.message);return y.stack=m.stack,f.errors.push(y),null}}var Wn=f=>{if(!f)return!1;let{type:a}=f;return a===e.Type.MAP_KEY||a===e.Type.MAP_VALUE||a===e.Type.SEQ_ITEM};function jn(f,a){let d={before:[],after:[]},m=!1,y=!1,S=Wn(a.context.parent)?a.context.parent.props.concat(a.props):a.props;for(let{start:N,end:A}of S)switch(a.context.src[N]){case e.Char.COMMENT:{if(!a.commentHasRequiredWhitespace(N)){let R="Comments must be separated from other tokens by white space characters";f.push(new e.YAMLSemanticError(a,R))}let{header:x,valueRange:k}=a;(k&&(N>k.start||x&&N>x.start)?d.after:d.before).push(a.context.src.slice(N+1,A));break}case e.Char.ANCHOR:if(m){let x="A node can have at most one anchor";f.push(new e.YAMLSemanticError(a,x))}m=!0;break;case e.Char.TAG:if(y){let x="A node can have at most one tag";f.push(new e.YAMLSemanticError(a,x))}y=!0;break}return{comments:d,hasAnchor:m,hasTag:y}}function qn(f,a){let{anchors:d,errors:m,schema:y}=f;if(a.type===e.Type.ALIAS){let N=a.rawValue,A=d.getNode(N);if(!A){let k=`Aliased anchor not found: ${N}`;return m.push(new e.YAMLReferenceError(a,k)),null}let x=new U(A);return d._cstAliases.push(x),x}let S=Se(f,a);if(S)return Fn(f,a,S);if(a.type!==e.Type.PLAIN){let N=`Failed to resolve ${a.type} node here`;return m.push(new e.YAMLSyntaxError(a,N)),null}try{let N=we(f,a);return u(N,y.tags,y.tags.scalarFallback)}catch(N){return N.source||(N.source=a),m.push(N),null}}function Me(f,a){if(!a)return null;a.error&&f.errors.push(a.error);let{comments:d,hasAnchor:m,hasTag:y}=jn(f.errors,a);if(m){let{anchors:N}=f,A=a.anchor,x=N.getNode(A);x&&(N.map[N.newName(A)]=x),N.map[A]=a}if(a.type===e.Type.ALIAS&&(m||y)){let N