gant-core 0.2.5 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli/acorn.js +2 -0
- package/lib/cli/angular.js +2 -0
- package/lib/cli/babel.js +2 -0
- package/lib/cli/config/index.js +1 -1
- package/lib/cli/create/module/index.js +2 -2
- package/lib/cli/estree.js +2 -0
- package/lib/cli/flow.js +2 -0
- package/lib/cli/glimmer.js +2 -0
- package/lib/cli/graphql.js +2 -0
- package/lib/cli/html.js +2 -0
- package/lib/cli/i18n/index.js +2 -2
- package/lib/cli/index.js +1 -1
- package/lib/cli/markdown.js +2 -0
- package/lib/cli/meriyah.js +2 -0
- package/lib/cli/postcss.js +2 -0
- package/lib/cli/typescript.js +2 -0
- package/lib/cli/utils/getJavascriptfile.js +1 -9
- package/lib/cli/utils/index.js +1 -1
- package/lib/cli/webpack/config/default.config.js +1 -1
- package/lib/cli/webpack/config/production.config.js +1 -13
- package/lib/cli/webpack/plugins/index.js +1 -1
- package/lib/cli/yaml.js +2 -0
- package/lib/types/index.d.ts +1 -0
- package/package.json +35 -39
- package/rollup.config.js +2 -3
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";require("fs"),require("path"),require("
|
|
2
|
+
"use strict";require("fs"),require("path"),require("../../utils/index.js"),require("../../utils/getJavascriptfile.js");
|
package/lib/cli/yaml.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),a=(e,n)=>{for(var r in n)t(e,r,{get:n[r],enumerable:!0})},l=(o,a,l)=>(l=null!=o?e(i(o)):{},((e,i,o,a)=>{if(i&&"object"==typeof i||"function"==typeof i)for(let l of r(i))!s.call(e,l)&&l!==o&&t(e,l,{get:()=>i[l],enumerable:!(a=n(i,l))||a.enumerable});return e})(!a&&o&&o.__esModule?l:t(l,"default",{value:o,enumerable:!0}),o)),c=o((e=>{var t={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"};function r(e){let t=[0],n=e.indexOf("\n");for(;-1!==n;)n+=1,t.push(n),n=e.indexOf("\n",n);return t}function i(e){let t,n;return"string"==typeof e?(t=r(e),n=e):(Array.isArray(e)&&(e=e[0]),e&&e.context&&(e.lineStarts||(e.lineStarts=r(e.context.src)),t=e.lineStarts,n=e.context.src)),{lineStarts:t,src:n}}function s(e,t){if("number"!=typeof e||e<0)return null;let{lineStarts:n,src:r}=i(t);if(!n||!r||e>r.length)return null;for(let t=0;t<n.length;++t){let r=n[t];if(e<r)return{line:t,col:e-n[t-1]+1};if(e===r)return{line:t+1,col:1}}let s=n.length;return{line:s,col:e-n[s-1]+1}}function o({start:e,end:t},n,r=80){let s=function(e,t){let{lineStarts:n,src:r}=i(t);if(!n||!(e>=1)||e>n.length)return null;let s=n[e-1],o=n[e];for(;o&&o>s&&"\n"===r[o-1];)--o;return r.slice(s,o)}(e.line,n);if(!s)return null;let{col:o}=e;if(s.length>r)if(o<=r-10)s=s.substr(0,r-1)+"…";else{let e=Math.round(r/2);s.length>o+e&&(s=s.substr(0,o+e-1)+"…"),o-=s.length-r,s="…"+s.substr(1-r)}let a=1,l="";return t&&(t.line===e.line&&o+(t.col-e.col)<=r+1?a=t.col-e.col:(a=Math.min(s.length+1,r)-o,l="…")),`${s}\n${o>1?" ".repeat(o-1):""}${"^".repeat(a)}${l}`}var a=class e{static copy(t){return new e(t.start,t.end)}constructor(e,t){this.start=e,this.end=t||e}isEmpty(){return"number"!=typeof this.start||!this.end||this.end<=this.start}setOrigRange(e,t){let{start:n,end:r}=this;if(0===e.length||r<=e[0])return this.origStart=n,this.origEnd=r,t;let i=t;for(;i<e.length&&!(e[i]>n);)++i;this.origStart=n+i;let s=i;for(;i<e.length&&!(e[i]>=r);)++i;return this.origEnd=r+i,s}},l=class e{static addStringTerminator(t,n,r){if("\n"===r[r.length-1])return r;let i=e.endOfWhiteSpace(t,n);return i>=t.length||"\n"===t[i]?r+"\n":r}static atDocumentBoundary(e,n,r){let i=e[n];if(!i)return!0;let s=e[n-1];if(s&&"\n"!==s)return!1;if(r){if(i!==r)return!1}else if(i!==t.DIRECTIVES_END&&i!==t.DOCUMENT_END)return!1;let o=e[n+1],a=e[n+2];if(o!==i||a!==i)return!1;let l=e[n+3];return!l||"\n"===l||"\t"===l||" "===l}static endOfIdentifier(e,t){let n=e[t],r="<"===n,i=r?["\n","\t"," ",">"]:["\n","\t"," ","[","]","{","}",","];for(;n&&-1===i.indexOf(n);)n=e[t+=1];return r&&">"===n&&(t+=1),t}static endOfIndent(e,t){let n=e[t];for(;" "===n;)n=e[t+=1];return t}static endOfLine(e,t){let n=e[t];for(;n&&"\n"!==n;)n=e[t+=1];return t}static endOfWhiteSpace(e,t){let n=e[t];for(;"\t"===n||" "===n;)n=e[t+=1];return t}static startOfLine(e,t){let n=e[t-1];if("\n"===n)return t;for(;n&&"\n"!==n;)n=e[t-=1];return t+1}static endOfBlockIndent(t,n,r){let i=e.endOfIndent(t,r);if(i>r+n)return i;{let n=e.endOfWhiteSpace(t,i),r=t[n];if(!r||"\n"===r)return n}return null}static atBlank(e,t,n){let r=e[t];return"\n"===r||"\t"===r||" "===r||n&&!r}static nextNodeIsIndented(e,t,n){return!(!e||t<0)&&(t>0||n&&"-"===e)}static normalizeOffset(t,n){let r=t[n];return r?"\n"!==r&&"\n"===t[n-1]?n-1:e.endOfWhiteSpace(t,n):n}static foldNewline(t,n,r){let i=0,s=!1,o="",a=t[n+1];for(;" "===a||"\t"===a||"\n"===a;){switch(a){case"\n":i=0,n+=1,o+="\n";break;case"\t":i<=r&&(s=!0),n=e.endOfWhiteSpace(t,n+2)-1;break;case" ":i+=1,n+=1}a=t[n+1]}return o||(o=" "),a&&i<=r&&(s=!0),{fold:o,offset:n,error:s}}constructor(e,t,n){Object.defineProperty(this,"context",{value:n||null,writable:!0}),this.error=null,this.range=null,this.valueRange=null,this.props=t||[],this.type=e,this.value=null}getPropValue(e,t,n){if(!this.context)return null;let{src:r}=this.context,i=this.props[e];return i&&r[i.start]===t?r.slice(i.start+(n?1:0),i.end):null}get anchor(){for(let e=0;e<this.props.length;++e){let n=this.getPropValue(e,t.ANCHOR,!0);if(null!=n)return n}return null}get comment(){let e=[];for(let n=0;n<this.props.length;++n){let r=this.getPropValue(n,t.COMMENT,!0);null!=r&&e.push(r)}return e.length>0?e.join("\n"):null}commentHasRequiredWhitespace(t){let{src:n}=this.context;if(this.header&&t===this.header.end||!this.valueRange)return!1;let{end:r}=this.valueRange;return t!==r||e.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]===t.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]!==t.COMMENT)return!0}return!1}get includesTrailingLines(){return!1}get jsonLike(){return-1!==[n.FLOW_MAP,n.FLOW_SEQ,n.QUOTE_DOUBLE,n.QUOTE_SINGLE].indexOf(this.type)}get rangeAsLinePos(){if(!this.range||!this.context)return;let e=s(this.range.start,this.context.root);return e?{start:e,end:s(this.range.end,this.context.root)}:void 0}get rawValue(){if(!this.valueRange||!this.context)return null;let{start:e,end:t}=this.valueRange;return this.context.src.slice(e,t)}get tag(){for(let e=0;e<this.props.length;++e){let n=this.getPropValue(e,t.TAG,!1);if(null!=n){if("<"===n[1])return{verbatim:n.slice(2,-1)};{let[e,t,r]=n.match(/^(.*!)([^!]*)$/);return{handle:t,suffix:r}}}}return null}get valueRangeContainsNewline(){if(!this.valueRange||!this.context)return!1;let{start:e,end:t}=this.valueRange,{src:n}=this.context;for(let r=e;r<t;++r)if("\n"===n[r])return!0;return!1}parseComment(n){let{src:r}=this.context;if(r[n]===t.COMMENT){let t=e.endOfLine(r,n+1),i=new a(n,t);return this.props.push(i),t}return n}setOrigRanges(e,t){return this.range&&(t=this.range.setOrigRange(e,t)),this.valueRange&&this.valueRange.setOrigRange(e,t),this.props.forEach((n=>n.setOrigRange(e,t))),t}toString(){let{context:{src:t},range:n,value:r}=this;if(null!=r)return r;let i=t.slice(n.start,n.end);return e.addStringTerminator(t,n.end,i)}},c=class extends Error{constructor(e,t,n){if(!(n&&t instanceof l))throw new Error(`Invalid arguments for new ${e}`);super(),this.name=e,this.message=n,this.source=t}makePretty(){if(!this.source)return;this.nodeType=this.source.type;let e=this.source.context&&this.source.context.root;if("number"==typeof this.offset){this.range=new a(this.offset,this.offset+1);let t=e&&s(this.offset,e);if(t){let e={line:t.line,col:t.col+1};this.linePos={start:t,end:e}}delete this.offset}else this.range=this.source.range,this.linePos=this.source.rangeAsLinePos;if(this.linePos){let{line:t,col:n}=this.linePos.start;this.message+=` at line ${t}, column ${n}`;let r=e&&o(this.linePos,e);r&&(this.message+=`:\n\n${r}\n`)}delete this.source}},u=class extends c{constructor(e,t){super("YAMLSemanticError",e,t)}};e.Char=t,e.Node=l,e.PlainValue=class e extends l{static endOfLine(e,t,n){let r=e[t],i=t;for(;r&&"\n"!==r&&(!n||"["!==r&&"]"!==r&&"{"!==r&&"}"!==r&&","!==r);){let t=e[i+1];if(":"===r&&(!t||"\n"===t||"\t"===t||" "===t||n&&","===t)||(" "===r||"\t"===r)&&"#"===t)break;i+=1,r=t}return i}get strValue(){if(!this.valueRange||!this.context)return null;let{start:e,end:t}=this.valueRange,{src:n}=this.context,r=n[t-1];for(;e<t&&("\n"===r||"\t"===r||" "===r);)r=n[--t-1];let i="";for(let r=e;r<t;++r){let e=n[r];if("\n"===e){let{fold:e,offset:t}=l.foldNewline(n,r,-1);i+=e,r=t}else if(" "===e||"\t"===e){let s=r,o=n[r+1];for(;r<t&&(" "===o||"\t"===o);)r+=1,o=n[r+1];"\n"!==o&&(i+=r>s?n.slice(s,r+1):e)}else i+=e}let s=n[e];switch(s){case"\t":return{errors:[new u(this,"Plain value cannot start with a tab character")],str:i};case"@":case"`":return{errors:[new u(this,`Plain value cannot start with reserved character ${s}`)],str:i};default:return i}}parseBlockValue(t){let{indent:n,inFlow:r,src:i}=this.context,s=t,o=t;for(let t=i[s];"\n"===t&&!l.atDocumentBoundary(i,s+1);t=i[s]){let t=l.endOfBlockIndent(i,n,s+1);if(null===t||"#"===i[t])break;"\n"===i[t]?s=t:(o=e.endOfLine(i,t,r),s=o)}return this.valueRange.isEmpty()&&(this.valueRange.start=t),this.valueRange.end=o,o}parse(t,n){this.context=t;let{inFlow:r,src:i}=t,s=n,o=i[s];return o&&"#"!==o&&"\n"!==o&&(s=e.endOfLine(i,n,r)),this.valueRange=new a(n,s),s=l.endOfWhiteSpace(i,s),s=this.parseComment(s),(!this.hasComment||this.valueRange.isEmpty())&&(s=this.parseBlockValue(s)),s}},e.Range=a,e.Type=n,e.YAMLError=c,e.YAMLReferenceError=class extends c{constructor(e,t){super("YAMLReferenceError",e,t)}},e.YAMLSemanticError=u,e.YAMLSyntaxError=class extends c{constructor(e,t){super("YAMLSyntaxError",e,t)}},e.YAMLWarning=class extends c{constructor(e,t){super("YAMLWarning",e,t)}},e._defineProperty=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.defaultTagPrefix="tag:yaml.org,2002:",e.defaultTags={MAP:"tag:yaml.org,2002:map",SEQ:"tag:yaml.org,2002:seq",STR:"tag:yaml.org,2002:str"}})),u=o((e=>{var t=c(),n=class extends t.Node{constructor(){super(t.Type.BLANK_LINE)}get includesTrailingLines(){return!0}parse(e,n){return this.context=e,this.range=new t.Range(n,n+1),n+1}},r=class extends t.Node{constructor(e,t){super(e,t),this.node=null}get includesTrailingLines(){return!!this.node&&this.node.includesTrailingLines}parse(e,r){this.context=e;let{parseNode:i,src:s}=e,{atLineStart:o,lineStart:a}=e;!o&&this.type===t.Type.SEQ_ITEM&&(this.error=new t.YAMLSemanticError(this,"Sequence items must not have preceding content on the same line"));let l=o?r-a:e.indent,c=t.Node.endOfWhiteSpace(s,r+1),u=s[c],f="#"===u,p=[],d=null;for(;"\n"===u||"#"===u;){if("#"===u){let e=t.Node.endOfLine(s,c+1);p.push(new t.Range(c,e)),c=e}else{o=!0,a=c+1,"\n"===s[t.Node.endOfWhiteSpace(s,a)]&&0===p.length&&(d=new n,a=d.parse({src:s},a)),c=t.Node.endOfIndent(s,a)}u=s[c]}if(t.Node.nextNodeIsIndented(u,c-(a+l),this.type!==t.Type.SEQ_ITEM)?this.node=i({atLineStart:o,inCollection:!1,indent:l,lineStart:a,parent:this},c):u&&a>r+1&&(c=a-1),this.node){if(d){let t=e.parent.items||e.parent.contents;t&&t.push(d)}p.length&&Array.prototype.push.apply(this.props,p),c=this.node.range.end}else if(f){let e=p[0];this.props.push(e),c=e.end}else c=t.Node.endOfLine(s,r+1);let h=this.node?this.node.valueRange.end:c;return this.valueRange=new t.Range(r,h),c}setOrigRanges(e,t){return t=super.setOrigRanges(e,t),this.node?this.node.setOrigRanges(e,t):t}toString(){let{context:{src:e},node:n,range:r,value:i}=this;if(null!=i)return i;let s=n?e.slice(r.start,n.range.start)+String(n):e.slice(r.start,r.end);return t.Node.addStringTerminator(e,r.end,s)}},i=class extends t.Node{constructor(){super(t.Type.COMMENT)}parse(e,n){this.context=e;let r=this.parseComment(n);return this.range=new t.Range(n,r),r}};function s(e){let n=e;for(;n instanceof r;)n=n.node;if(!(n instanceof o))return null;let i=n.items.length,s=-1;for(let e=i-1;e>=0;--e){let r=n.items[e];if(r.type===t.Type.COMMENT){let{indent:t,lineStart:n}=r.context;if(t>0&&r.range.start>=n+t)break;s=e}else{if(r.type!==t.Type.BLANK_LINE)break;s=e}}if(-1===s)return null;let a=n.items.splice(s,i-s),l=a[0].range.start;for(;n.range.end=l,n.valueRange&&n.valueRange.end>l&&(n.valueRange.end=l),n!==e;)n=n.context.parent;return a}var o=class e extends t.Node{static nextContentHasIndent(n,r,i){let s=t.Node.endOfLine(n,r)+1,o=n[r=t.Node.endOfWhiteSpace(n,s)];return!!o&&(r>=s+i||("#"===o||"\n"===o)&&e.nextContentHasIndent(n,r,i))}constructor(e){super(e.type===t.Type.SEQ_ITEM?t.Type.SEQ:t.Type.MAP);for(let t=e.props.length-1;t>=0;--t)if(e.props[t].start<e.context.lineStart){this.props=e.props.slice(0,t+1),e.props=e.props.slice(t+1);let n=e.props[0]||e.valueRange;e.range.start=n.start;break}this.items=[e];let n=s(e);n&&Array.prototype.push.apply(this.items,n)}get includesTrailingLines(){return this.items.length>0}parse(r,o){this.context=r;let{parseNode:a,src:l}=r,c=t.Node.startOfLine(l,o),u=this.items[0];u.context.parent=this,this.valueRange=t.Range.copy(u.valueRange);let f=u.range.start-u.context.lineStart,p=o;p=t.Node.normalizeOffset(l,p);let d=l[p],h=t.Node.endOfWhiteSpace(l,c)===p,m=!1;for(;d;){for(;"\n"===d||"#"===d;){if(h&&"\n"===d&&!m){let e=new n;if(p=e.parse({src:l},p),this.valueRange.end=p,p>=l.length){d=null;break}this.items.push(e),p-=1}else if("#"===d){if(p<c+f&&!e.nextContentHasIndent(l,p,f))return p;let t=new i;if(p=t.parse({indent:f,lineStart:c,src:l},p),this.items.push(t),this.valueRange.end=p,p>=l.length){d=null;break}}if(c=p+1,p=t.Node.endOfIndent(l,c),t.Node.atBlank(l,p)){let e=t.Node.endOfWhiteSpace(l,p),n=l[e];(!n||"\n"===n||"#"===n)&&(p=e)}d=l[p],h=!0}if(!d)break;if(p!==c+f&&(h||":"!==d)){if(p<c+f){c>o&&(p=c);break}if(!this.error){let e="All collection items must start at the same column";this.error=new t.YAMLSyntaxError(this,e)}}if(u.type===t.Type.SEQ_ITEM){if("-"!==d){c>o&&(p=c);break}}else if("-"===d&&!this.error){let e=l[p+1];if(!e||"\n"===e||"\t"===e||" "===e){let e="A collection cannot be both a mapping and a sequence";this.error=new t.YAMLSyntaxError(this,e)}}let r=a({atLineStart:h,inCollection:!0,indent:f,lineStart:c,parent:this},p);if(!r)return p;if(this.items.push(r),this.valueRange.end=r.valueRange.end,p=t.Node.normalizeOffset(l,r.range.end),d=l[p],h=!1,m=r.includesTrailingLines,d){let e=p-1,t=l[e];for(;" "===t||"\t"===t;)t=l[--e];"\n"===t&&(c=e+1,h=!0)}let g=s(r);g&&Array.prototype.push.apply(this.items,g)}return p}setOrigRanges(e,t){return t=super.setOrigRanges(e,t),this.items.forEach((n=>{t=n.setOrigRanges(e,t)})),t}toString(){let{context:{src:e},items:n,range:r,value:i}=this;if(null!=i)return i;let s=e.slice(r.start,n[0].range.start)+String(n[0]);for(let e=1;e<n.length;++e){let t=n[e],{atLineStart:r,indent:i}=t.context;if(r)for(let e=0;e<i;++e)s+=" ";s+=String(t)}return t.Node.addStringTerminator(e,r.end,s)}},a=class extends t.Node{constructor(){super(t.Type.DIRECTIVE),this.name=null}get parameters(){let e=this.rawValue;return e?e.trim().split(/[ \t]+/):[]}parseName(e){let{src:t}=this.context,n=e,r=t[n];for(;r&&"\n"!==r&&"\t"!==r&&" "!==r;)r=t[n+=1];return this.name=t.slice(e,n),n}parseParameters(e){let{src:n}=this.context,r=e,i=n[r];for(;i&&"\n"!==i&&"#"!==i;)i=n[r+=1];return this.valueRange=new t.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 t.Range(n,r),r}},l=class e extends t.Node{static startCommentOrEndBlankLine(e,n){let r=t.Node.endOfWhiteSpace(e,n),i=e[r];return"#"===i||"\n"===i?r:n}constructor(){super(t.Type.DOCUMENT),this.directives=null,this.contents=null,this.directivesEndMarker=null,this.documentEndMarker=null}parseDirectives(r){let{src:s}=this.context;this.directives=[];let o=!0,l=!1,c=r;for(;!t.Node.atDocumentBoundary(s,c,t.Char.DIRECTIVES_END);)switch(c=e.startCommentOrEndBlankLine(s,c),s[c]){case"\n":if(o){let e=new n;c=e.parse({src:s},c),c<s.length&&this.directives.push(e)}else c+=1,o=!0;break;case"#":{let e=new i;c=e.parse({src:s},c),this.directives.push(e),o=!1}break;case"%":{let e=new a;c=e.parse({parent:this,src:s},c),this.directives.push(e),l=!0,o=!1}break;default:return l?this.error=new t.YAMLSemanticError(this,"Missing directives-end indicator line"):this.directives.length>0&&(this.contents=this.directives,this.directives=[]),c}return s[c]?(this.directivesEndMarker=new t.Range(c,c+3),c+3):(l?this.error=new t.YAMLSemanticError(this,"Missing directives-end indicator line"):this.directives.length>0&&(this.contents=this.directives,this.directives=[]),c)}parseContents(r){let{parseNode:o,src:a}=this.context;this.contents||(this.contents=[]);let l=r;for(;"-"===a[l-1];)l-=1;let c=t.Node.endOfWhiteSpace(a,r),u=l===r;for(this.valueRange=new t.Range(c);!t.Node.atDocumentBoundary(a,c,t.Char.DOCUMENT_END);){switch(a[c]){case"\n":if(u){let e=new n;c=e.parse({src:a},c),c<a.length&&this.contents.push(e)}else c+=1,u=!0;l=c;break;case"#":{let e=new i;c=e.parse({src:a},c),this.contents.push(e),u=!1}break;default:{let e=t.Node.endOfIndent(a,c),n=o({atLineStart:u,indent:-1,inFlow:!1,inCollection:!1,lineStart:l,parent:this},e);if(!n)return this.valueRange.end=e;this.contents.push(n),c=n.range.end,u=!1;let r=s(n);r&&Array.prototype.push.apply(this.contents,r)}}c=e.startCommentOrEndBlankLine(a,c)}if(this.valueRange.end=c,a[c]&&(this.documentEndMarker=new t.Range(c,c+3),c+=3,a[c])){if(c=t.Node.endOfWhiteSpace(a,c),"#"===a[c]){let e=new i;c=e.parse({src:a},c),this.contents.push(e)}switch(a[c]){case"\n":c+=1;break;case void 0:break;default:this.error=new t.YAMLSyntaxError(this,"Document end marker line cannot have a non-comment suffix")}}return c}parse(e,t){e.root=this,this.context=e;let{src:n}=e,r=65279===n.charCodeAt(t)?t+1:t;return r=this.parseDirectives(r),r=this.parseContents(r),r}setOrigRanges(e,t){return t=super.setOrigRanges(e,t),this.directives.forEach((n=>{t=n.setOrigRanges(e,t)})),this.directivesEndMarker&&(t=this.directivesEndMarker.setOrigRange(e,t)),this.contents.forEach((n=>{t=n.setOrigRanges(e,t)})),this.documentEndMarker&&(t=this.documentEndMarker.setOrigRange(e,t)),t}toString(){let{contents:e,directives:n,value:r}=this;if(null!=r)return r;let i=n.join("");return e.length>0&&((n.length>0||e[0].type===t.Type.COMMENT)&&(i+="---\n"),i+=e.join("")),"\n"!==i[i.length-1]&&(i+="\n"),i}},u=class extends t.Node{parse(e,n){this.context=e;let{src:r}=e,i=t.Node.endOfIdentifier(r,n+1);return this.valueRange=new t.Range(n+1,i),i=t.Node.endOfWhiteSpace(r,i),i=this.parseComment(i),i}},f="CLIP",p="KEEP",d="STRIP",h=class extends t.Node{constructor(e,t){super(e,t),this.blockIndent=null,this.chomping=f,this.header=null}get includesTrailingLines(){return this.chomping===p}get strValue(){if(!this.valueRange||!this.context)return null;let{start:e,end:n}=this.valueRange,{indent:r,src:i}=this.context;if(this.valueRange.isEmpty())return"";let s=null,o=i[n-1];for(;"\n"===o||"\t"===o||" "===o;){if(n-=1,n<=e){if(this.chomping===p)break;return""}"\n"===o&&(s=n),o=i[n-1]}let a=n+1;s&&(this.chomping===p?(a=s,n=this.valueRange.end):n=s);let l=r+this.blockIndent,c=this.type===t.Type.BLOCK_FOLDED,u=!0,f="",h="",m=!1;for(let r=e;r<n;++r){for(let e=0;e<l&&" "===i[r];++e)r+=1;let e=i[r];if("\n"===e)"\n"===h?f+="\n":h="\n";else{let s=t.Node.endOfLine(i,r),o=i.slice(r,s);r=s,c&&(" "===e||"\t"===e)&&r<a?(" "===h?h="\n":!m&&!u&&"\n"===h&&(h="\n\n"),f+=h+o,h=s<n&&i[s]||"",m=!0):(f+=h+o,h=c&&r<a?" ":"\n",m=!1),u&&""!==o&&(u=!1)}}return this.chomping===d?f:f+"\n"}parseBlockHeader(e){let{src:n}=this.context,r=e+1,i="";for(;;){let s=n[r];switch(s){case"-":this.chomping=d;break;case"+":this.chomping=p;break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":i+=s;break;default:return this.blockIndent=Number(i)||null,this.header=new t.Range(e,r),r}r+=1}}parseBlockValue(e){let{indent:n,src:r}=this.context,i=!!this.blockIndent,s=e,o=e,a=1;for(let e=r[s];"\n"===e&&(s+=1,!t.Node.atDocumentBoundary(r,s));e=r[s]){let e=t.Node.endOfBlockIndent(r,n,s);if(null===e)break;let l=r[e],c=e-(s+n);if(this.blockIndent){if(l&&"\n"!==l&&c<this.blockIndent){if("#"===r[e])break;if(!this.error){let e="Block scalars must not be less indented than their "+(i?"explicit indentation indicator":"first line");this.error=new t.YAMLSemanticError(this,e)}}}else if("\n"!==r[e]){if(c<a){let e="Block scalars with more-indented leading empty lines must use an explicit indentation indicator";this.error=new t.YAMLSemanticError(this,e)}this.blockIndent=c}else c>a&&(a=c);s="\n"===r[e]?e:o=t.Node.endOfLine(r,e)}return this.chomping!==p&&(s=r[o]?o+1:o),this.valueRange=new t.Range(e+1,s),s}parse(e,n){this.context=e;let{src:r}=e,i=this.parseBlockHeader(n);return i=t.Node.endOfWhiteSpace(r,i),i=this.parseComment(i),i=this.parseBlockValue(i),i}setOrigRanges(e,t){return t=super.setOrigRanges(e,t),this.header?this.header.setOrigRange(e,t):t}},m=class extends t.Node{constructor(e,t){super(e,t),this.items=null}prevNodeIsJsonLike(e=this.items.length){let n=this.items[e-1];return!!n&&(n.jsonLike||n.type===t.Type.COMMENT&&this.prevNodeIsJsonLike(e-1))}parse(e,r){this.context=e;let{parseNode:s,src:o}=e,{indent:a,lineStart:l}=e,c=o[r];this.items=[{char:c,offset:r}];let u=t.Node.endOfWhiteSpace(o,r+1);for(c=o[u];c&&"]"!==c&&"}"!==c;){switch(c){case"\n":if(l=u+1,"\n"===o[t.Node.endOfWhiteSpace(o,l)]){let e=new n;l=e.parse({src:o},l),this.items.push(e)}if(u=t.Node.endOfIndent(o,l),u<=l+a&&(c=o[u],u<l+a||"]"!==c&&"}"!==c)){let e="Insufficient indentation in flow collection";this.error=new t.YAMLSemanticError(this,e)}break;case",":this.items.push({char:c,offset:u}),u+=1;break;case"#":{let e=new i;u=e.parse({src:o},u),this.items.push(e)}break;case"?":case":":{let e=o[u+1];if("\n"===e||"\t"===e||" "===e||","===e||":"===c&&this.prevNodeIsJsonLike()){this.items.push({char:c,offset:u}),u+=1;break}}default:{let e=s({atLineStart:!1,inCollection:!1,inFlow:!0,indent:-1,lineStart:l,parent:this},u);if(!e)return this.valueRange=new t.Range(r,u),u;this.items.push(e),u=t.Node.normalizeOffset(o,e.range.end)}}u=t.Node.endOfWhiteSpace(o,u),c=o[u]}return this.valueRange=new t.Range(r,u+1),c&&(this.items.push({char:c,offset:u}),u=t.Node.endOfWhiteSpace(o,u+1),u=this.parseComment(u)),u}setOrigRanges(e,n){return n=super.setOrigRanges(e,n),this.items.forEach((r=>{if(r instanceof t.Node)n=r.setOrigRanges(e,n);else if(0===e.length)r.origOffset=r.offset;else{let t=n;for(;t<e.length&&!(e[t]>r.offset);)++t;r.origOffset=r.offset+t,n=t}})),n}toString(){let{context:{src:e},items:n,range:r,value:i}=this;if(null!=i)return i;let s=n.filter((e=>e instanceof t.Node)),o="",a=r.start;return s.forEach((t=>{let n=e.slice(a,t.range.start);a=t.range.end,o+=n+String(t),"\n"===o[o.length-1]&&"\n"!==e[a-1]&&"\n"===e[a]&&(a+=1)})),o+=e.slice(a,r.end),t.Node.addStringTerminator(e,r.end,o)}},g=class e extends t.Node{static endOfQuote(e,t){let n=e[t];for(;n&&'"'!==n;)n=e[t+="\\"===n?2:1];return t+1}get strValue(){if(!this.valueRange||!this.context)return null;let e=[],{start:n,end:r}=this.valueRange,{indent:i,src:s}=this.context;'"'!==s[r-1]&&e.push(new t.YAMLSyntaxError(this,'Missing closing "quote'));let o="";for(let a=n+1;a<r-1;++a){let n=s[a];if("\n"===n){t.Node.atDocumentBoundary(s,a+1)&&e.push(new t.YAMLSemanticError(this,"Document boundary indicators are not allowed within string values"));let{fold:n,offset:r,error:l}=t.Node.foldNewline(s,a,i);o+=n,a=r,l&&e.push(new t.YAMLSemanticError(this,"Multi-line double-quoted string needs to be sufficiently indented"))}else if("\\"===n)switch(a+=1,s[a]){case"0":o+="\0";break;case"a":o+="";break;case"b":o+="\b";break;case"e":o+="";break;case"f":o+="\f";break;case"n":o+="\n";break;case"r":o+="\r";break;case"t":case"\t":o+="\t";break;case"v":o+="\v";break;case"N":o+="
";break;case"_":o+=" ";break;case"L":o+="\u2028";break;case"P":o+="\u2029";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"\n":for(;" "===s[a+1]||"\t"===s[a+1];)a+=1;break;default:e.push(new t.YAMLSyntaxError(this,`Invalid escape sequence ${s.substr(a-1,2)}`)),o+="\\"+s[a]}else if(" "===n||"\t"===n){let e=a,t=s[a+1];for(;" "===t||"\t"===t;)a+=1,t=s[a+1];"\n"!==t&&(o+=a>e?s.slice(e,a+1):n)}else o+=n}return e.length>0?{errors:e,str:o}:o}parseCharCode(e,n,r){let{src:i}=this.context,s=i.substr(e,n),o=s.length===n&&/^[0-9a-fA-F]+$/.test(s)?parseInt(s,16):NaN;return isNaN(o)?(r.push(new t.YAMLSyntaxError(this,`Invalid escape sequence ${i.substr(e-2,n+2)}`)),i.substr(e-2,n+2)):String.fromCodePoint(o)}parse(n,r){this.context=n;let{src:i}=n,s=e.endOfQuote(i,r+1);return this.valueRange=new t.Range(r,s),s=t.Node.endOfWhiteSpace(i,s),s=this.parseComment(s),s}},y=class e extends t.Node{static endOfQuote(e,t){let n=e[t];for(;n;)if("'"===n){if("'"!==e[t+1])break;n=e[t+=2]}else n=e[t+=1];return t+1}get strValue(){if(!this.valueRange||!this.context)return null;let e=[],{start:n,end:r}=this.valueRange,{indent:i,src:s}=this.context;"'"!==s[r-1]&&e.push(new t.YAMLSyntaxError(this,"Missing closing 'quote"));let o="";for(let a=n+1;a<r-1;++a){let n=s[a];if("\n"===n){t.Node.atDocumentBoundary(s,a+1)&&e.push(new t.YAMLSemanticError(this,"Document boundary indicators are not allowed within string values"));let{fold:n,offset:r,error:l}=t.Node.foldNewline(s,a,i);o+=n,a=r,l&&e.push(new t.YAMLSemanticError(this,"Multi-line single-quoted string needs to be sufficiently indented"))}else if("'"===n)o+=n,a+=1,"'"!==s[a]&&e.push(new t.YAMLSyntaxError(this,"Unescaped single quote? This should not happen."));else if(" "===n||"\t"===n){let e=a,t=s[a+1];for(;" "===t||"\t"===t;)a+=1,t=s[a+1];"\n"!==t&&(o+=a>e?s.slice(e,a+1):n)}else o+=n}return e.length>0?{errors:e,str:o}:o}parse(n,r){this.context=n;let{src:i}=n,s=e.endOfQuote(i,r+1);return this.valueRange=new t.Range(r,s),s=t.Node.endOfWhiteSpace(i,s),s=this.parseComment(s),s}};var v=class e{static parseType(e,n,r){switch(e[n]){case"*":return t.Type.ALIAS;case">":return t.Type.BLOCK_FOLDED;case"|":return t.Type.BLOCK_LITERAL;case"{":return t.Type.FLOW_MAP;case"[":return t.Type.FLOW_SEQ;case"?":return!r&&t.Node.atBlank(e,n+1,!0)?t.Type.MAP_KEY:t.Type.PLAIN;case":":return!r&&t.Node.atBlank(e,n+1,!0)?t.Type.MAP_VALUE:t.Type.PLAIN;case"-":return!r&&t.Node.atBlank(e,n+1,!0)?t.Type.SEQ_ITEM:t.Type.PLAIN;case'"':return t.Type.QUOTE_DOUBLE;case"'":return t.Type.QUOTE_SINGLE;default:return t.Type.PLAIN}}constructor(n={},{atLineStart:i,inCollection:s,inFlow:a,indent:l,lineStart:c,parent:f}={}){t._defineProperty(this,"parseNode",((n,i)=>{if(t.Node.atDocumentBoundary(this.src,i))return null;let s=new e(this,n),{props:a,type:l,valueStart:c}=s.parseProps(i),f=function(e,n){switch(e){case t.Type.ALIAS:return new u(e,n);case t.Type.BLOCK_FOLDED:case t.Type.BLOCK_LITERAL:return new h(e,n);case t.Type.FLOW_MAP:case t.Type.FLOW_SEQ:return new m(e,n);case t.Type.MAP_KEY:case t.Type.MAP_VALUE:case t.Type.SEQ_ITEM:return new r(e,n);case t.Type.COMMENT:case t.Type.PLAIN:return new t.PlainValue(e,n);case t.Type.QUOTE_DOUBLE:return new g(e,n);case t.Type.QUOTE_SINGLE:return new y(e,n);default:return null}}(l,a),p=f.parse(s,c);if(f.range=new t.Range(i,p),p<=i&&(f.error=new Error("Node#parse consumed no characters"),f.error.parseEnd=p,f.error.source=f,f.range.end=i+1),s.nodeStartsCollection(f)){!f.error&&!s.atLineStart&&s.parent.type===t.Type.DOCUMENT&&(f.error=new t.YAMLSyntaxError(f,"Block collection must not have preceding content here (e.g. directives-end indicator)"));let n=new o(f);return p=n.parse(new e(s),p),n.range=new t.Range(i,p),n}return f})),this.atLineStart=i??(n.atLineStart||!1),this.inCollection=s??(n.inCollection||!1),this.inFlow=a??(n.inFlow||!1),this.indent=l??n.indent,this.lineStart=c??n.lineStart,this.parent=f??(n.parent||{}),this.root=n.root,this.src=n.src}nodeStartsCollection(e){let{inCollection:n,inFlow:i,src:s}=this;if(n||i)return!1;if(e instanceof r)return!0;let o=e.range.end;return"\n"!==s[o]&&"\n"!==s[o-1]&&(o=t.Node.endOfWhiteSpace(s,o),":"===s[o])}parseProps(n){let{inFlow:r,parent:i,src:s}=this,o=[],a=!1,l=s[n=this.atLineStart?t.Node.endOfIndent(s,n):t.Node.endOfWhiteSpace(s,n)];for(;l===t.Char.ANCHOR||l===t.Char.COMMENT||l===t.Char.TAG||"\n"===l;){if("\n"===l){let e,r=n;do{e=r+1,r=t.Node.endOfIndent(s,e)}while("\n"===s[r]);let o=r-(e+this.indent),l=i.type===t.Type.SEQ_ITEM&&i.context.atLineStart;if("#"!==s[r]&&!t.Node.nextNodeIsIndented(s[r],o,!l))break;this.atLineStart=!0,this.lineStart=e,a=!1,n=r}else if(l===t.Char.COMMENT){let e=t.Node.endOfLine(s,n+1);o.push(new t.Range(n,e)),n=e}else{let e=t.Node.endOfIdentifier(s,n+1);l===t.Char.TAG&&","===s[e]&&/^[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+,\d\d\d\d(-\d\d){0,2}\/\S/.test(s.slice(n+1,e+13))&&(e=t.Node.endOfIdentifier(s,e+5)),o.push(new t.Range(n,e)),a=!0,n=t.Node.endOfWhiteSpace(s,e)}l=s[n]}return a&&":"===l&&t.Node.atBlank(s,n+1,!0)&&(n-=1),{props:o,type:e.parseType(s,n,r),valueStart:n}}};e.parse=function(e){let t=[];-1!==e.indexOf("\r")&&(e=e.replace(/\r\n?/g,((e,n)=>(e.length>1&&t.push(n),"\n"))));let n=[],r=0;do{let t=new l,i=new v({src:e});r=t.parse(i,r),n.push(t)}while(r<e.length);return n.setOrigRanges=()=>{if(0===t.length)return!1;for(let e=1;e<t.length;++e)t[e]-=e;let e=0;for(let r=0;r<n.length;++r)e=n[r].setOrigRanges(t,e);return t.splice(0,t.length),!0},n.toString=()=>n.join("...\n"),n}})),f=o((e=>{var t=c();function n(e,t,n){return n?-1===n.indexOf("\n")?`${e} #${n}`:`${e}\n`+n.replace(/^/gm,`${t||""}#`):e}var r=class{};function i(e,t,n){if(Array.isArray(e))return e.map(((e,t)=>i(e,String(t),n)));if(e&&"function"==typeof e.toJSON){let r=n&&n.anchors&&n.anchors.get(e);r&&(n.onCreate=e=>{r.res=e,delete n.onCreate});let i=e.toJSON(t,n);return r&&n.onCreate&&n.onCreate(i),i}return n&&n.keep||"bigint"!=typeof e?e:Number(e)}var s=class extends r{constructor(e){super(),this.value=e}toJSON(e,t){return t&&t.keep?this.value:i(this.value,e,t)}toString(){return String(this.value)}};function o(e,t,n){let r=n;for(let e=t.length-1;e>=0;--e){let n=t[e];if(Number.isInteger(n)&&n>=0){let e=[];e[n]=r,r=e}else{let e={};Object.defineProperty(e,n,{value:r,writable:!0,enumerable:!0,configurable:!0}),r=e}}return e.createNode(r,!1)}var a=e=>null==e||"object"==typeof e&&e[Symbol.iterator]().next().done,l=class e extends r{constructor(e){super(),t._defineProperty(this,"items",[]),this.schema=e}addIn(t,n){if(a(t))this.add(n);else{let[r,...i]=t,s=this.get(r,!0);if(s instanceof e)s.addIn(i,n);else{if(void 0!==s||!this.schema)throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`);this.set(r,o(this.schema,i,n))}}}deleteIn([t,...n]){if(0===n.length)return this.delete(t);let r=this.get(t,!0);if(r instanceof e)return r.deleteIn(n);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn([t,...n],r){let i=this.get(t,!0);return 0===n.length?!r&&i instanceof s?i.value:i:i instanceof e?i.getIn(n,r):void 0}hasAllNullValues(){return this.items.every((e=>{if(!e||"PAIR"!==e.type)return!1;let t=e.value;return null==t||t instanceof s&&null==t.value&&!t.commentBefore&&!t.comment&&!t.tag}))}hasIn([t,...n]){if(0===n.length)return this.has(t);let r=this.get(t,!0);return r instanceof e&&r.hasIn(n)}setIn([t,...n],r){if(0===n.length)this.set(t,r);else{let i=this.get(t,!0);if(i instanceof e)i.setIn(n,r);else{if(void 0!==i||!this.schema)throw new Error(`Expected YAML collection at ${t}. Remaining path: ${n}`);this.set(t,o(this.schema,n,r))}}}toJSON(){return null}toString(r,{blockItem:i,flowChars:s,isMap:o,itemIndent:a},l,c){let{indent:u,indentStep:f,stringify:p}=r,d=this.type===t.Type.FLOW_MAP||this.type===t.Type.FLOW_SEQ||r.inFlow;d&&(a+=f);let h=o&&this.hasAllNullValues();r=Object.assign({},r,{allNullValues:h,indent:a,inFlow:d,type:null});let m,g=!1,y=!1,v=this.items.reduce(((e,t,i)=>{let s;t&&(!g&&t.spaceBefore&&e.push({type:"comment",str:""}),t.commentBefore&&t.commentBefore.match(/^.*$/gm).forEach((t=>{e.push({type:"comment",str:`#${t}`})})),t.comment&&(s=t.comment),d&&(!g&&t.spaceBefore||t.commentBefore||t.comment||t.key&&(t.key.commentBefore||t.key.comment)||t.value&&(t.value.commentBefore||t.value.comment))&&(y=!0)),g=!1;let o=p(t,r,(()=>s=null),(()=>g=!0));return d&&!y&&o.includes("\n")&&(y=!0),d&&i<this.items.length-1&&(o+=","),o=n(o,a,s),g&&(s||d)&&(g=!1),e.push({type:"item",str:o}),e}),[]);if(0===v.length)m=s.start+s.end;else if(d){let{start:t,end:n}=s,r=v.map((e=>e.str));if(y||r.reduce(((e,t)=>e+t.length+2),2)>e.maxFlowStringSingleLineLength){m=t;for(let e of r)m+=e?`\n${f}${u}${e}`:"\n";m+=`\n${u}${n}`}else m=`${t} ${r.join(" ")} ${n}`}else{let e=v.map(i);m=e.shift();for(let t of e)m+=t?`\n${u}${t}`:"\n"}return this.comment?(m+="\n"+this.comment.replace(/^/gm,`${u}#`),l&&l()):g&&c&&c(),m}};function u(e){let t=e instanceof s?e.value:e;return t&&"string"==typeof t&&(t=Number(t)),Number.isInteger(t)&&t>=0?t:null}t._defineProperty(l,"maxFlowStringSingleLineLength",60);var f=class extends l{add(e){this.items.push(e)}delete(e){let t=u(e);return"number"==typeof t&&this.items.splice(t,1).length>0}get(e,t){let n=u(e);if("number"!=typeof n)return;let r=this.items[n];return!t&&r instanceof s?r.value:r}has(e){let t=u(e);return"number"==typeof t&&t<this.items.length}set(e,t){let n=u(e);if("number"!=typeof n)throw new Error(`Expected a valid index, not ${e}.`);this.items[n]=t}toJSON(e,t){let n=[];t&&t.onCreate&&t.onCreate(n);let r=0;for(let e of this.items)n.push(i(e,String(r++),t));return n}toString(e,t,n){return e?super.toString(e,{blockItem:e=>"comment"===e.type?e.str:`- ${e.str}`,flowChars:{start:"[",end:"]"},isMap:!1,itemIndent:(e.indent||"")+" "},t,n):JSON.stringify(this)}},p=class e extends r{constructor(t,n=null){super(),this.key=t,this.value=n,this.type=e.Type.PAIR}get commentBefore(){return this.key instanceof r?this.key.commentBefore:void 0}set commentBefore(e){if(null==this.key&&(this.key=new s(null)),!(this.key instanceof r)){throw new Error("Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node.")}this.key.commentBefore=e}addToJSMap(e,t){let n=i(this.key,"",e);if(t instanceof Map){let r=i(this.value,n,e);t.set(n,r)}else if(t instanceof Set)t.add(n);else{let s=((e,t,n)=>null===t?"":"object"!=typeof t?String(t):e instanceof r&&n&&n.doc?e.toString({anchors:Object.create(null),doc:n.doc,indent:"",indentStep:n.indentStep,inFlow:!0,inStringifyKey:!0,stringify:n.stringify}):JSON.stringify(t))(this.key,n,e),o=i(this.value,s,e);s in t?Object.defineProperty(t,s,{value:o,writable:!0,enumerable:!0,configurable:!0}):t[s]=o}return t}toJSON(e,t){let n=t&&t.mapAsMap?new Map:{};return this.addToJSMap(t,n)}toString(e,i,o){if(!e||!e.doc)return JSON.stringify(this);let{indent:a,indentSeq:c,simpleKeys:u}=e.doc.options,{key:p,value:d}=this,h=p instanceof r&&p.comment;if(u){if(h)throw new Error("With simple keys, key nodes cannot have comments");if(p instanceof l){throw new Error("With simple keys, collection cannot be used as a key value")}}let m=!u&&(!p||h||(p instanceof r?p instanceof l||p.type===t.Type.BLOCK_FOLDED||p.type===t.Type.BLOCK_LITERAL:"object"==typeof p)),{doc:g,indent:y,indentStep:v,stringify:E}=e;e=Object.assign({},e,{implicitKey:!m,indent:y+v});let S=!1,b=E(p,e,(()=>h=null),(()=>S=!0));if(b=n(b,e.indent,h),!m&&b.length>1024){if(u)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");m=!0}if(e.allNullValues&&!u)return this.comment?(b=n(b,e.indent,this.comment),i&&i()):S&&!h&&o&&o(),e.inFlow&&!m?b:`? ${b}`;b=m?`? ${b}\n${y}:`:`${b}:`,this.comment&&(b=n(b,e.indent,this.comment),i&&i());let w="",O=null;if(d instanceof r){if(d.spaceBefore&&(w="\n"),d.commentBefore){w+=`\n${d.commentBefore.replace(/^/gm,`${e.indent}#`)}`}O=d.comment}else d&&"object"==typeof d&&(d=g.schema.createNode(d,!0));e.implicitKey=!1,!m&&!this.comment&&d instanceof s&&(e.indentAtStart=b.length+1),S=!1,!c&&a>=2&&!e.inFlow&&!m&&d instanceof f&&d.type!==t.Type.FLOW_SEQ&&!d.tag&&!g.anchors.getName(d)&&(e.indent=e.indent.substr(2));let N=E(d,e,(()=>O=null),(()=>S=!0)),A=" ";return w||this.comment?A=`${w}\n${e.indent}`:!m&&d instanceof l?(!("["===N[0]||"{"===N[0])||N.includes("\n"))&&(A=`\n${e.indent}`):"\n"===N[0]&&(A=""),S&&!O&&o&&o(),n(b+A+N,e.indent,O)}};t._defineProperty(p,"Type",{PAIR:"PAIR",MERGE_PAIR:"MERGE_PAIR"});var d=(e,t)=>{if(e instanceof h){let n=t.get(e.source);return n.count*n.aliasCount}if(e instanceof l){let n=0;for(let r of e.items){let e=d(r,t);e>n&&(n=e)}return n}if(e instanceof p){let n=d(e.key,t),r=d(e.value,t);return Math.max(n,r)}return 1},h=class e extends r{static stringify({range:e,source:t},{anchors:n,doc:r,implicitKey:i,inStringifyKey:s}){let o=Object.keys(n).find((e=>n[e]===t));if(!o&&s&&(o=r.anchors.getName(t)||r.anchors.newName()),o)return`*${o}${i?" ":""}`;let a=r.anchors.getName(t)?"Alias node must be after source node":"Source node not found for alias node";throw new Error(`${a} [${e}]`)}constructor(e){super(),this.source=e,this.type=t.Type.ALIAS}set tag(e){throw new Error("Alias nodes cannot have tags")}toJSON(e,n){if(!n)return i(this.source,e,n);let{anchors:r,maxAliasCount:s}=n,o=r.get(this.source);if(!o||void 0===o.res){let e="This should not happen: Alias anchor was not resolved?";throw this.cstNode?new t.YAMLReferenceError(this.cstNode,e):new ReferenceError(e)}if(s>=0&&(o.count+=1,0===o.aliasCount&&(o.aliasCount=d(this.source,r)),o.count*o.aliasCount>s)){let e="Excessive alias count indicates a resource exhaustion attack";throw this.cstNode?new t.YAMLReferenceError(this.cstNode,e):new ReferenceError(e)}return o.res}toString(t){return e.stringify(this,t)}};function m(e,t){let n=t instanceof s?t.value:t;for(let r of e)if(r instanceof p&&(r.key===t||r.key===n||r.key&&r.key.value===n))return r}t._defineProperty(h,"default",!0);var g=class extends l{add(e,t){e?e instanceof p||(e=new p(e.key||e,e.value)):e=new p(e);let n=m(this.items,e.key),r=this.schema&&this.schema.sortMapEntries;if(n){if(!t)throw new Error(`Key ${e.key} already set`);n.value=e.value}else if(r){let t=this.items.findIndex((t=>r(e,t)<0));-1===t?this.items.push(e):this.items.splice(t,0,e)}else this.items.push(e)}delete(e){let t=m(this.items,e);return!!t&&this.items.splice(this.items.indexOf(t),1).length>0}get(e,t){let n=m(this.items,e),r=n&&n.value;return!t&&r instanceof s?r.value:r}has(e){return!!m(this.items,e)}set(e,t){this.add(new p(e,t),!0)}toJSON(e,t,n){let r=n?new n:t&&t.mapAsMap?new Map:{};t&&t.onCreate&&t.onCreate(r);for(let e of this.items)e.addToJSMap(t,r);return r}toString(e,t,n){if(!e)return JSON.stringify(this);for(let e of this.items)if(!(e instanceof p))throw new Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return super.toString(e,{blockItem:e=>e.str,flowChars:{start:"{",end:"}"},isMap:!0,itemIndent:e.indent||""},t,n)}},y=class extends p{constructor(e){if(e instanceof p){let t=e.value;t instanceof f||(t=new f,t.items.push(e.value),t.range=e.value.range),super(e.key,t),this.range=e.range}else super(new s("<<"),new f);this.type=p.Type.MERGE_PAIR}addToJSMap(e,t){for(let{source:n}of this.value.items){if(!(n instanceof g))throw new Error("Merge sources must be maps");let r=n.toJSON(null,e,Map);for(let[e,n]of r)t instanceof Map?t.has(e)||t.set(e,n):t instanceof Set?t.add(e):Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0})}return t}toString(e,t){let n=this.value;if(n.items.length>1)return super.toString(e,t);this.value=n.items[0];let r=super.toString(e,t);return this.value=n,r}},v={defaultType:t.Type.BLOCK_LITERAL,lineWidth:76},E={defaultType:t.Type.PLAIN,doubleQuoted:{jsonEncoding:!1,minMultiLineLength:40},fold:{lineWidth:80,minContentWidth:20}};function S(e,t,n){for(let{format:n,test:r,resolve:i}of t)if(r){let t=e.match(r);if(t){let e=i.apply(null,t);return e instanceof s||(e=new s(e)),n&&(e.format=n),e}}return n&&(e=n(e)),new s(e)}var b="flow",w="block",O="quoted",N=(e,t)=>{let n=e[t+1];for(;" "===n||"\t"===n;){do{n=e[t+=1]}while(n&&"\n"!==n);n=e[t+1]}return t};function A(e,t,n,{indentAtStart:r,lineWidth:i=80,minContentWidth:s=20,onFold:o,onOverflow:a}){if(!i||i<0)return e;let l=Math.max(1+s,1+i-t.length);if(e.length<=l)return e;let c=[],u={},f=i-t.length;"number"==typeof r&&(r>i-Math.max(2,s)?c.push(0):f=i-r);let p,d,h=!1,m=-1,g=-1,y=-1;n===w&&(m=N(e,m),-1!==m&&(f=m+l));for(let t;t=e[m+=1];){if(n===O&&"\\"===t){switch(g=m,e[m+1]){case"x":m+=3;break;case"u":m+=5;break;case"U":m+=9;break;default:m+=1}y=m}if("\n"===t)n===w&&(m=N(e,m)),f=m+l,p=void 0;else{if(" "===t&&d&&" "!==d&&"\n"!==d&&"\t"!==d){let t=e[m+1];t&&" "!==t&&"\n"!==t&&"\t"!==t&&(p=m)}if(m>=f)if(p)c.push(p),f=p+l,p=void 0;else if(n===O){for(;" "===d||"\t"===d;)d=t,t=e[m+=1],h=!0;let n=m>y+1?m-2:g-1;if(u[n])return e;c.push(n),u[n]=!0,f=n+l,p=void 0}else h=!0}d=t}if(h&&a&&a(),0===c.length)return e;o&&o();let v=e.slice(0,c[0]);for(let r=0;r<c.length;++r){let i=c[r],s=c[r+1]||e.length;0===i?v=`\n${t}${e.slice(0,s)}`:(n===O&&u[i]&&(v+=`${e[i]}\\`),v+=`\n${t}${e.slice(i+1,s)}`)}return v}var L=({indentAtStart:e})=>e?Object.assign({indentAtStart:e},E.fold):E.fold,M=e=>/^(%|---|\.\.\.)/m.test(e);function T(e,t){let{implicitKey:n}=t,{jsonEncoding:r,minMultiLineLength:i}=E.doubleQuoted,s=JSON.stringify(e);if(r)return s;let o=t.indent||(M(e)?" ":""),a="",l=0;for(let e=0,t=s[e];t;t=s[++e])if(" "===t&&"\\"===s[e+1]&&"n"===s[e+2]&&(a+=s.slice(l,e)+"\\ ",e+=1,l=e,t="\\"),"\\"===t)switch(s[e+1]){case"u":{a+=s.slice(l,e);let t=s.substr(e+2,4);switch(t){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:"00"===t.substr(0,2)?a+="\\x"+t.substr(2):a+=s.substr(e,6)}e+=5,l=e+1}break;case"n":if(n||'"'===s[e+2]||s.length<i)e+=1;else{for(a+=s.slice(l,e)+"\n\n";"\\"===s[e+2]&&"n"===s[e+3]&&'"'!==s[e+4];)a+="\n",e+=2;a+=o," "===s[e+2]&&(a+="\\"),e+=1,l=e+1}break;default:e+=1}return a=l?a+s.slice(l):s,n?a:A(a,o,O,L(t))}function x(e,t){if(t.implicitKey){if(/\n/.test(e))return T(e,t)}else if(/[ \t]\n|\n[ \t]/.test(e))return T(e,t);let n=t.indent||(M(e)?" ":""),r="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&\n${n}`)+"'";return t.implicitKey?r:A(r,n,b,L(t))}function k({comment:e,type:n,value:r},i,s,o){if(/\n[\t ]+$/.test(r)||/^\s*$/.test(r))return T(r,i);let a=i.indent||(i.forceBlockIndent||M(r)?" ":""),l=a?"2":"1",c=n!==t.Type.BLOCK_FOLDED&&(n===t.Type.BLOCK_LITERAL||!function(e,t,n){if(!t||t<0)return!1;let r=t-n,i=e.length;if(i<=r)return!1;for(let t=0,n=0;t<i;++t)if("\n"===e[t]){if(t-n>r)return!0;if(n=t+1,i-n<=r)return!1}return!0}(r,E.fold.lineWidth,a.length)),u=c?"|":">";if(!r)return u+"\n";let f="",p="";if(r=r.replace(/[\n\t ]*$/,(e=>{let t=e.indexOf("\n");return-1===t?u+="-":(r===e||t!==e.length-1)&&(u+="+",o&&o()),p=e.replace(/\n$/,""),""})).replace(/^[\n ]*/,(e=>{-1!==e.indexOf(" ")&&(u+=l);let t=e.match(/ +$/);return t?(f=e.slice(0,-t[0].length),t[0]):(f=e,"")})),p&&(p=p.replace(/\n+(?!\n|$)/g,`$&${a}`)),f&&(f=f.replace(/\n+/g,`$&${a}`)),e&&(u+=" #"+e.replace(/ ?[\r\n]+/g," "),s&&s()),!r)return`${u}${l}\n${a}${p}`;if(c)return r=r.replace(/\n+/g,`$&${a}`),`${u}\n${a}${f}${r}${p}`;r=r.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${a}`);let d=A(`${f}${r}${p}`,a,w,E.fold);return`${u}\n${a}${d}`}function C(e,n){let r,i,s;switch(n.type){case t.Type.FLOW_MAP:r="}",i="flow map";break;case t.Type.FLOW_SEQ:r="]",i="flow sequence";break;default:return void e.push(new t.YAMLSemanticError(n,"Not a flow collection!?"))}for(let e=n.items.length-1;e>=0;--e){let r=n.items[e];if(!r||r.type!==t.Type.COMMENT){s=r;break}}if(s&&s.char!==r){let o,a=`Expected ${i} to end with ${r}`;"number"==typeof s.offset?(o=new t.YAMLSemanticError(n,a),o.offset=s.offset+1):(o=new t.YAMLSemanticError(s,a),s.range&&s.range.end&&(o.offset=s.range.end-s.range.start)),e.push(o)}}function I(e,n){let r=n.context.src[n.range.start-1];if("\n"!==r&&"\t"!==r&&" "!==r){let r="Comments must be separated from other tokens by white space characters";e.push(new t.YAMLSemanticError(n,r))}}function $(e,n){let r=String(n),i=r.substr(0,8)+"..."+r.substr(-8);return new t.YAMLSemanticError(e,`The "${i}" key is too long`)}function P(e,t){for(let{afterKey:n,before:r,comment:i}of t){let t=e.items[r];t?(n&&t.value&&(t=t.value),void 0===i?(n||!t.commentBefore)&&(t.spaceBefore=!0):t.commentBefore?t.commentBefore+="\n"+i:t.commentBefore=i):void 0!==i&&(e.comment?e.comment+="\n"+i:e.comment=i)}}function R(e,t){let n=t.strValue;return n?"string"==typeof n?n:(n.errors.forEach((n=>{n.source||(n.source=t),e.errors.push(n)})),n.str):""}function _(e,n){let{tag:r,type:i}=n,s=!1;if(r){let{handle:i,suffix:o,verbatim:a}=r;if(a){if("!"!==a&&"!!"!==a)return a;let r=`Verbatim tags aren't resolved, so ${a} is invalid.`;e.errors.push(new t.YAMLSemanticError(n,r))}else if("!"!==i||o)try{return function(e,n){let{handle:r,suffix:i}=n.tag,s=e.tagPrefixes.find((e=>e.handle===r));if(!s){let i=e.getDefaults().tagPrefixes;if(i&&(s=i.find((e=>e.handle===r))),!s)throw new t.YAMLSemanticError(n,`The ${r} tag handle is non-default and was not declared.`)}if(!i)throw new t.YAMLSemanticError(n,`The ${r} tag has no suffix.`);if("!"===r&&"1.0"===(e.version||e.options.version)){if("^"===i[0])return e.warnings.push(new t.YAMLWarning(n,"YAML 1.0 ^ tag expansion is not supported")),i;if(/[:/]/.test(i)){let e=i.match(/^([a-z0-9-]+)\/(.*)/i);return e?`tag:${e[1]}.yaml.org,2002:${e[2]}`:`tag:${i}`}}return s.prefix+decodeURIComponent(i)}(e,n)}catch(t){e.errors.push(t)}else s=!0}switch(i){case t.Type.BLOCK_FOLDED:case t.Type.BLOCK_LITERAL:case t.Type.QUOTE_DOUBLE:case t.Type.QUOTE_SINGLE:return t.defaultTags.STR;case t.Type.FLOW_MAP:case t.Type.MAP:return t.defaultTags.MAP;case t.Type.FLOW_SEQ:case t.Type.SEQ:return t.defaultTags.SEQ;case t.Type.PLAIN:return s?t.defaultTags.STR:null;default:return null}}function Y(e,t,n){let{tags:r}=e.schema,i=[];for(let o of r)if(o.tag===n){if(!o.test){let n=o.resolve(e,t);return n instanceof l?n:new s(n)}i.push(o)}let o=R(e,t);return"string"==typeof o&&i.length>0?S(o,i,r.scalarFallback):null}function B(e,n,r){try{let t=Y(e,n,r);if(t)return r&&n.tag&&(t.tag=r),t}catch(t){return t.source||(t.source=n),e.errors.push(t),null}try{let i=function({type:e}){switch(e){case t.Type.FLOW_MAP:case t.Type.MAP:return t.defaultTags.MAP;case t.Type.FLOW_SEQ:case t.Type.SEQ:return t.defaultTags.SEQ;default:return t.defaultTags.STR}}(n);if(!i)throw new Error(`The tag ${r} is unavailable`);let s=`The tag ${r} is unavailable, falling back to ${i}`;e.warnings.push(new t.YAMLWarning(n,s));let o=Y(e,n,i);return o.tag=r,o}catch(r){let i=new t.YAMLReferenceError(n,r.message);return i.stack=r.stack,e.errors.push(i),null}}var D=e=>{if(!e)return!1;let{type:n}=e;return n===t.Type.MAP_KEY||n===t.Type.MAP_VALUE||n===t.Type.SEQ_ITEM};function F(e,n){if(!n)return null;n.error&&e.errors.push(n.error);let{comments:r,hasAnchor:i,hasTag:s}=function(e,n){let r={before:[],after:[]},i=!1,s=!1,o=D(n.context.parent)?n.context.parent.props.concat(n.props):n.props;for(let{start:a,end:l}of o)switch(n.context.src[a]){case t.Char.COMMENT:{if(!n.commentHasRequiredWhitespace(a)){let r="Comments must be separated from other tokens by white space characters";e.push(new t.YAMLSemanticError(n,r))}let{header:i,valueRange:s}=n;(s&&(a>s.start||i&&a>i.start)?r.after:r.before).push(n.context.src.slice(a+1,l));break}case t.Char.ANCHOR:if(i){let r="A node can have at most one anchor";e.push(new t.YAMLSemanticError(n,r))}i=!0;break;case t.Char.TAG:if(s){let r="A node can have at most one tag";e.push(new t.YAMLSemanticError(n,r))}s=!0}return{comments:r,hasAnchor:i,hasTag:s}}(e.errors,n);if(i){let{anchors:t}=e,r=n.anchor,i=t.getNode(r);i&&(t.map[t.newName(r)]=i),t.map[r]=n}if(n.type===t.Type.ALIAS&&(i||s)){let r="An alias node must not specify any properties";e.errors.push(new t.YAMLSemanticError(n,r))}let o=function(e,n){let{anchors:r,errors:i,schema:s}=e;if(n.type===t.Type.ALIAS){let e=n.rawValue,s=r.getNode(e);if(!s){let r=`Aliased anchor not found: ${e}`;return i.push(new t.YAMLReferenceError(n,r)),null}let o=new h(s);return r._cstAliases.push(o),o}let o=_(e,n);if(o)return B(e,n,o);if(n.type!==t.Type.PLAIN){let e=`Failed to resolve ${n.type} node here`;return i.push(new t.YAMLSyntaxError(n,e)),null}try{return S(R(e,n),s.tags,s.tags.scalarFallback)}catch(e){return e.source||(e.source=n),i.push(e),null}}(e,n);if(o){o.range=[n.range.start,n.range.end],e.options.keepCstNodes&&(o.cstNode=n),e.options.keepNodeTypes&&(o.type=n.type);let t=r.before.join("\n");t&&(o.commentBefore=o.commentBefore?`${o.commentBefore}\n${t}`:t);let i=r.after.join("\n");i&&(o.comment=o.comment?`${o.comment}\n${i}`:i)}return n.resolved=o}var W=({context:{lineStart:e,node:n,src:r},props:i})=>{if(0===i.length)return!1;let{start:s}=i[0];if(n&&s>n.valueRange.start||r[s]!==t.Char.COMMENT)return!1;for(let t=e;t<s;++t)if("\n"===r[t])return!1;return!0};function j(e,n){if(!W(e))return;let r=e.getPropValue(0,t.Char.COMMENT,!0),i=!1,s=n.value.commentBefore;if(s&&s.startsWith(r))n.value.commentBefore=s.substr(r.length+1),i=!0;else{let t=n.value.comment;!e.node&&t&&t.startsWith(r)&&(n.value.comment=t.substr(r.length+1),i=!0)}i&&(n.comment=r)}e.Alias=h,e.Collection=l,e.Merge=y,e.Node=r,e.Pair=p,e.Scalar=s,e.YAMLMap=g,e.YAMLSeq=f,e.addComment=n,e.binaryOptions=v,e.boolOptions={trueStr:"true",falseStr:"false"},e.findPair=m,e.intOptions={asBigInt:!1},e.isEmptyPath=a,e.nullOptions={nullStr:"null"},e.resolveMap=function(e,n){if(n.type!==t.Type.MAP&&n.type!==t.Type.FLOW_MAP){let r=`A ${n.type} node cannot be resolved as a mapping`;return e.errors.push(new t.YAMLSyntaxError(n,r)),null}let{comments:r,items:i}=n.type===t.Type.FLOW_MAP?function(e,n){let r,i=[],s=[],o=!1,a="{";for(let l=0;l<n.items.length;++l){let c=n.items[l];if("string"==typeof c.char){let{char:i,offset:u}=c;if("?"===i&&void 0===r&&!o){o=!0,a=":";continue}if(":"===i){if(void 0===r&&(r=null),":"===a){a=",";continue}}else if(o&&(void 0===r&&","!==i&&(r=null),o=!1),void 0!==r&&(s.push(new p(r)),r=void 0,","===i)){a=":";continue}if("}"===i){if(l===n.items.length-1)continue}else if(i===a){a=":";continue}let f=`Flow map contains an unexpected ${i}`,d=new t.YAMLSyntaxError(n,f);d.offset=u,e.errors.push(d)}else c.type===t.Type.BLANK_LINE?i.push({afterKey:!!r,before:s.length}):c.type===t.Type.COMMENT?(I(e.errors,c),i.push({afterKey:!!r,before:s.length,comment:c.comment})):void 0===r?(","===a&&e.errors.push(new t.YAMLSemanticError(c,"Separator , missing in flow map")),r=F(e,c)):(","!==a&&e.errors.push(new t.YAMLSemanticError(c,"Indicator : missing in flow map entry")),s.push(new p(r,F(e,c))),r=void 0,o=!1)}return C(e.errors,n),void 0!==r&&s.push(new p(r)),{comments:i,items:s}}(e,n):function(e,n){let r,i=[],s=[],o=null;for(let a=0;a<n.items.length;++a){let l=n.items[a];switch(l.type){case t.Type.BLANK_LINE:i.push({afterKey:!!r,before:s.length});break;case t.Type.COMMENT:i.push({afterKey:!!r,before:s.length,comment:l.comment});break;case t.Type.MAP_KEY:void 0!==r&&s.push(new p(r)),l.error&&e.errors.push(l.error),r=F(e,l.node),o=null;break;case t.Type.MAP_VALUE:{if(void 0===r&&(r=null),l.error&&e.errors.push(l.error),!l.context.atLineStart&&l.node&&l.node.type===t.Type.MAP&&!l.node.context.atLineStart){let n="Nested mappings are not allowed in compact mappings";e.errors.push(new t.YAMLSemanticError(l.node,n))}let i=l.node;if(!i&&l.props.length>0){i=new t.PlainValue(t.Type.PLAIN,[]),i.context={parent:l,src:l.context.src};let e=l.range.start+1;if(i.range={start:e,end:e},i.valueRange={start:e,end:e},"number"==typeof l.range.origStart){let e=l.range.origStart+1;i.range.origStart=i.range.origEnd=e,i.valueRange.origStart=i.valueRange.origEnd=e}}let a=new p(r,F(e,i));j(l,a),s.push(a),r&&"number"==typeof o&&l.range.start>o+1024&&e.errors.push($(n,r)),r=void 0,o=null}break;default:void 0!==r&&s.push(new p(r)),r=F(e,l),o=l.range.start,l.error&&e.errors.push(l.error);e:for(let r=a+1;;++r){let i=n.items[r];switch(i&&i.type){case t.Type.BLANK_LINE:case t.Type.COMMENT:continue e;case t.Type.MAP_VALUE:break e;default:{let n="Implicit map keys need to be followed by map values";e.errors.push(new t.YAMLSemanticError(l,n));break e}}}if(l.valueRangeContainsNewline){let n="Implicit map keys need to be on a single line";e.errors.push(new t.YAMLSemanticError(l,n))}}}return void 0!==r&&s.push(new p(r)),{comments:i,items:s}}(e,n),s=new g;s.items=i,P(s,r);let o=!1;for(let r=0;r<i.length;++r){let{key:s}=i[r];if(s instanceof l&&(o=!0),e.schema.merge&&s&&"<<"===s.value){i[r]=new y(i[r]);let s=i[r].value.items,o=null;s.some((e=>{if(e instanceof h){let{type:n}=e.source;return n!==t.Type.MAP&&n!==t.Type.FLOW_MAP&&(o="Merge nodes aliases can only point to maps")}return o="Merge nodes can only have Alias nodes as values"})),o&&e.errors.push(new t.YAMLSemanticError(n,o))}else for(let o=r+1;o<i.length;++o){let{key:r}=i[o];if(s===r||s&&r&&Object.prototype.hasOwnProperty.call(s,"value")&&s.value===r.value){let r=`Map keys must be unique; "${s}" is repeated`;e.errors.push(new t.YAMLSemanticError(n,r));break}}}if(o&&!e.options.mapAsMap){let r="Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.";e.warnings.push(new t.YAMLWarning(n,r))}return n.resolved=s,s},e.resolveNode=F,e.resolveSeq=function(e,n){if(n.type!==t.Type.SEQ&&n.type!==t.Type.FLOW_SEQ){let r=`A ${n.type} node cannot be resolved as a sequence`;return e.errors.push(new t.YAMLSyntaxError(n,r)),null}let{comments:r,items:i}=n.type===t.Type.FLOW_SEQ?function(e,n){let r,i=[],s=[],o=!1,a=null,l="[",c=null;for(let u=0;u<n.items.length;++u){let f=n.items[u];if("string"==typeof f.char){let{char:i,offset:d}=f;if(":"!==i&&(o||void 0!==r)&&(o&&void 0===r&&(r=l?s.pop():null),s.push(new p(r)),o=!1,r=void 0,a=null),i===l)l=null;else if(l||"?"!==i){if("["!==l&&":"===i&&void 0===r){if(","===l){if(r=s.pop(),r instanceof p){let r="Chaining flow sequence pairs is invalid",i=new t.YAMLSemanticError(n,r);i.offset=d,e.errors.push(i)}if(!o&&"number"==typeof a){let i=f.range?f.range.start:f.offset;i>a+1024&&e.errors.push($(n,r));let{src:s}=c.context;for(let n=a;n<i;++n)if("\n"===s[n]){let n="Implicit keys of flow sequence pairs need to be on a single line";e.errors.push(new t.YAMLSemanticError(c,n));break}}}else r=null;a=null,o=!1,l=null}else if("["===l||"]"!==i||u<n.items.length-1){let r=`Flow sequence contains an unexpected ${i}`,s=new t.YAMLSyntaxError(n,r);s.offset=d,e.errors.push(s)}}else o=!0}else if(f.type===t.Type.BLANK_LINE)i.push({before:s.length});else if(f.type===t.Type.COMMENT)I(e.errors,f),i.push({comment:f.comment,before:s.length});else{if(l){let n=`Expected a ${l} in flow sequence`;e.errors.push(new t.YAMLSemanticError(f,n))}let n=F(e,f);void 0===r?(s.push(n),c=f):(s.push(new p(r,n)),r=void 0),a=f.range.start,l=","}}return C(e.errors,n),void 0!==r&&s.push(new p(r)),{comments:i,items:s}}(e,n):function(e,n){let r=[],i=[];for(let s=0;s<n.items.length;++s){let o=n.items[s];switch(o.type){case t.Type.BLANK_LINE:r.push({before:i.length});break;case t.Type.COMMENT:r.push({comment:o.comment,before:i.length});break;case t.Type.SEQ_ITEM:if(o.error&&e.errors.push(o.error),i.push(F(e,o.node)),o.hasProps){let n="Sequence items cannot have tags or anchors before the - indicator";e.errors.push(new t.YAMLSemanticError(o,n))}break;default:o.error&&e.errors.push(o.error),e.errors.push(new t.YAMLSyntaxError(o,`Unexpected ${o.type} node in sequence`))}}return{comments:r,items:i}}(e,n),s=new f;if(s.items=i,P(s,r),!e.options.mapAsMap&&i.some((e=>e instanceof p&&e.key instanceof l))){let r="Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.";e.warnings.push(new t.YAMLWarning(n,r))}return n.resolved=s,s},e.resolveString=R,e.strOptions=E,e.stringifyNumber=function({format:e,minFractionDigits:t,tag:n,value:r}){if("bigint"==typeof r)return String(r);if(!isFinite(r))return isNaN(r)?".nan":r<0?"-.inf":".inf";let i=JSON.stringify(r);if(!e&&t&&(!n||"tag:yaml.org,2002:float"===n)&&/^\d/.test(i)){let e=i.indexOf(".");e<0&&(e=i.length,i+=".");let n=t-(i.length-e-1);for(;n-- >0;)i+="0"}return i},e.stringifyString=function(e,n,r,i){let{defaultType:s}=E,{implicitKey:o,inFlow:a}=n,{type:l,value:c}=e;"string"!=typeof c&&(c=String(c),e=Object.assign({},e,{value:c}));let u=s=>{switch(s){case t.Type.BLOCK_FOLDED:case t.Type.BLOCK_LITERAL:return k(e,n,r,i);case t.Type.QUOTE_DOUBLE:return T(c,n);case t.Type.QUOTE_SINGLE:return x(c,n);case t.Type.PLAIN:return function(e,n,r,i){let{comment:s,type:o,value:a}=e,{actualString:l,implicitKey:c,indent:u,inFlow:f}=n;if(c&&/[\n[\]{},]/.test(a)||f&&/[[\]{},]/.test(a))return T(a,n);if(!a||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a))return c||f||-1===a.indexOf("\n")?-1!==a.indexOf('"')&&-1===a.indexOf("'")?x(a,n):T(a,n):k(e,n,r,i);if(!c&&!f&&o!==t.Type.PLAIN&&-1!==a.indexOf("\n"))return k(e,n,r,i);if(""===u&&M(a))return n.forceBlockIndent=!0,k(e,n,r,i);let p=a.replace(/\n+/g,`$&\n${u}`);if(l){let{tags:e}=n.doc.schema;if("string"!=typeof S(p,e,e.scalarFallback).value)return T(a,n)}let d=c?p:A(p,u,b,L(n));return!s||f||-1===d.indexOf("\n")&&-1===s.indexOf("\n")?d:(r&&r(),function(e,t,n){return n?`#${n.replace(/[\s\S]^/gm,`$&${t}#`)}\n${t}${e}`:e}(d,u,s))}(e,n,r,i);default:return null}};(l!==t.Type.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f]/.test(c)||(o||a)&&(l===t.Type.BLOCK_FOLDED||l===t.Type.BLOCK_LITERAL))&&(l=t.Type.QUOTE_DOUBLE);let f=u(l);if(null===f&&(f=u(s),null===f))throw new Error(`Unsupported default string type ${s}`);return f},e.toJSON=i})),p=o((e=>{var t=c(),n=f(),r={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve:(e,r)=>{let i=n.resolveString(e,r);if("function"==typeof Buffer)return Buffer.from(i,"base64");if("function"==typeof atob){let e=atob(i.replace(/[\n\r]/g,"")),t=new Uint8Array(e.length);for(let n=0;n<e.length;++n)t[n]=e.charCodeAt(n);return t}{let n="This environment does not support reading binary tags; either Buffer or atob is required";return e.errors.push(new t.YAMLReferenceError(r,n)),null}},options:n.binaryOptions,stringify:({comment:e,type:r,value:i},s,o,a)=>{let l;if("function"==typeof Buffer)l=i instanceof Buffer?i.toString("base64"):Buffer.from(i.buffer).toString("base64");else{if("function"!=typeof btoa)throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");{let e="";for(let t=0;t<i.length;++t)e+=String.fromCharCode(i[t]);l=btoa(e)}}if(r||(r=n.binaryOptions.defaultType),r===t.Type.QUOTE_DOUBLE)i=l;else{let{lineWidth:e}=n.binaryOptions,s=Math.ceil(l.length/e),o=new Array(s);for(let t=0,n=0;t<s;++t,n+=e)o[t]=l.substr(n,e);i=o.join(r===t.Type.BLOCK_LITERAL?"\n":" ")}return n.stringifyString({comment:e,type:r,value:i},s,o,a)}};function i(e,r){let i=n.resolveSeq(e,r);for(let e=0;e<i.items.length;++e){let s=i.items[e];if(!(s instanceof n.Pair)){if(s instanceof n.YAMLMap){if(s.items.length>1){let e="Each pair must have its own sequence indicator";throw new t.YAMLSemanticError(r,e)}let e=s.items[0]||new n.Pair;s.commentBefore&&(e.commentBefore=e.commentBefore?`${s.commentBefore}\n${e.commentBefore}`:s.commentBefore),s.comment&&(e.comment=e.comment?`${s.comment}\n${e.comment}`:s.comment),s=e}i.items[e]=s instanceof n.Pair?s:new n.Pair(s)}}return i}function s(e,t,r){let i=new n.YAMLSeq(e);i.tag="tag:yaml.org,2002:pairs";for(let n of t){let t,s;if(Array.isArray(n)){if(2!==n.length)throw new TypeError(`Expected [key, value] tuple: ${n}`);t=n[0],s=n[1]}else if(n&&n instanceof Object){let e=Object.keys(n);if(1!==e.length)throw new TypeError(`Expected { key: value } tuple: ${n}`);t=e[0],s=n[t]}else t=n;let o=e.createPair(t,s,r);i.items.push(o)}return i}var o={default:!1,tag:"tag:yaml.org,2002:pairs",resolve:i,createNode:s},a=class e extends n.YAMLSeq{constructor(){super(),t._defineProperty(this,"add",n.YAMLMap.prototype.add.bind(this)),t._defineProperty(this,"delete",n.YAMLMap.prototype.delete.bind(this)),t._defineProperty(this,"get",n.YAMLMap.prototype.get.bind(this)),t._defineProperty(this,"has",n.YAMLMap.prototype.has.bind(this)),t._defineProperty(this,"set",n.YAMLMap.prototype.set.bind(this)),this.tag=e.tag}toJSON(e,t){let r=new Map;t&&t.onCreate&&t.onCreate(r);for(let e of this.items){let i,s;if(e instanceof n.Pair?(i=n.toJSON(e.key,"",t),s=n.toJSON(e.value,i,t)):i=n.toJSON(e,"",t),r.has(i))throw new Error("Ordered maps must not include duplicate keys");r.set(i,s)}return r}};t._defineProperty(a,"tag","tag:yaml.org,2002:omap");var l={identify:e=>e instanceof Map,nodeClass:a,default:!1,tag:"tag:yaml.org,2002:omap",resolve:function(e,r){let s=i(e,r),o=[];for(let{key:e}of s.items)if(e instanceof n.Scalar){if(o.includes(e.value)){let e="Ordered maps must not include duplicate keys";throw new t.YAMLSemanticError(r,e)}o.push(e.value)}return Object.assign(new a,s)},createNode:function(e,t,n){let r=s(e,t,n),i=new a;return i.items=r.items,i}},u=class e extends n.YAMLMap{constructor(){super(),this.tag=e.tag}add(e){let t=e instanceof n.Pair?e:new n.Pair(e);n.findPair(this.items,t.key)||this.items.push(t)}get(e,t){let r=n.findPair(this.items,e);return!t&&r instanceof n.Pair?r.key instanceof n.Scalar?r.key.value:r.key:r}set(e,t){if("boolean"!=typeof t)throw new Error("Expected boolean value for set(key, value) in a YAML set, not "+typeof t);let r=n.findPair(this.items,e);r&&!t?this.items.splice(this.items.indexOf(r),1):!r&&t&&this.items.push(new n.Pair(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues())return super.toString(e,t,n);throw new Error("Set items must all have null values")}};t._defineProperty(u,"tag","tag:yaml.org,2002:set");var p={identify:e=>e instanceof Set,nodeClass:u,default:!1,tag:"tag:yaml.org,2002:set",resolve:function(e,r){let i=n.resolveMap(e,r);if(!i.hasAllNullValues())throw new t.YAMLSemanticError(r,"Set items must all have null values");return Object.assign(new u,i)},createNode:function(e,t,n){let r=new u;for(let i of t)r.items.push(e.createPair(i,null,n));return r}},d=(e,t)=>{let n=t.split(":").reduce(((e,t)=>60*e+Number(t)),0);return"-"===e?-n:n},h=({value:e})=>{if(isNaN(e)||!isFinite(e))return n.stringifyNumber(e);let t="";e<0&&(t="-",e=Math.abs(e));let r=[e%60];return e<60?r.unshift(0):(e=Math.round((e-r[0])/60),r.unshift(e%60),e>=60&&(e=Math.round((e-r[0])/60),r.unshift(e))),t+r.map((e=>e<10?"0"+String(e):String(e))).join(":").replace(/000000\d*$/,"")},m={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/,resolve:(e,t,n)=>d(t,n.replace(/_/g,"")),stringify:h},g={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*)$/,resolve:(e,t,n)=>d(t,n.replace(/_/g,"")),stringify:h},y={identify:e=>e 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:(e,t,n,r,i,s,o,a,l)=>{a&&(a=(a+"00").substr(1,3));let c=Date.UTC(t,n-1,r,i||0,s||0,o||0,a||0);if(l&&"Z"!==l){let e=d(l[0],l.slice(1));Math.abs(e)<30&&(e*=60),c-=6e4*e}return new Date(c)},stringify:({value:e})=>e.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")};function v(e){let t={};return e?typeof YAML_SILENCE_DEPRECATION_WARNINGS<"u"?!YAML_SILENCE_DEPRECATION_WARNINGS:!t.YAML_SILENCE_DEPRECATION_WARNINGS:typeof YAML_SILENCE_WARNINGS<"u"?!YAML_SILENCE_WARNINGS:!t.YAML_SILENCE_WARNINGS}function E(e,t){v(!1)&&console.warn(t?`${t}: ${e}`:e)}var S={};e.binary=r,e.floatTime=g,e.intTime=m,e.omap=l,e.pairs=o,e.set=p,e.timestamp=y,e.warn=E,e.warnFileDeprecation=function(e){if(v(!0)){E(`The endpoint 'yaml/${e.replace(/.*yaml[/\\]/i,"").replace(/\.js$/,"").replace(/\\/g,"/")}' will be removed in a future release.`,"DeprecationWarning")}},e.warnOptionDeprecation=function(e,t){if(!S[e]&&v(!0)){S[e]=!0;let n=`The option '${e}' will be removed in a future release`;n+=t?`, use '${t}' instead.`:".",E(n,"DeprecationWarning")}}})),d=o((e=>{var t=c(),n=f(),r=p();var i={createNode:function(e,t,r){let i=new n.YAMLMap(e);if(t instanceof Map)for(let[n,s]of t)i.items.push(e.createPair(n,s,r));else if(t&&"object"==typeof t)for(let n of Object.keys(t))i.items.push(e.createPair(n,t[n],r));return"function"==typeof e.sortMapEntries&&i.items.sort(e.sortMapEntries),i},default:!0,nodeClass:n.YAMLMap,tag:"tag:yaml.org,2002:map",resolve:n.resolveMap};var s={createNode:function(e,t,r){let i=new n.YAMLSeq(e);if(t&&t[Symbol.iterator])for(let n of t){let t=e.createNode(n,r.wrapScalars,null,r);i.items.push(t)}return i},default:!0,nodeClass:n.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve:n.resolveSeq},o={identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:n.resolveString,stringify:(e,t,r,i)=>(t=Object.assign({actualString:!0},t),n.stringifyString(e,t,r,i)),options:n.strOptions},a=[i,s,o],l=e=>"bigint"==typeof e||Number.isInteger(e),u=(e,t,r)=>n.intOptions.asBigInt?BigInt(e):parseInt(t,r);function d(e,t,r){let{value:i}=e;return l(i)&&i>=0?r+i.toString(t):n.stringifyNumber(e)}var h={identify:e=>null==e,createNode:(e,t,r)=>r.wrapScalars?new n.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>null,options:n.nullOptions,stringify:()=>n.nullOptions.nullStr},m={identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>"t"===e[0]||"T"===e[0],options:n.boolOptions,stringify:({value:e})=>e?n.boolOptions.trueStr:n.boolOptions.falseStr},g={identify:e=>l(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o([0-7]+)$/,resolve:(e,t)=>u(e,t,8),options:n.intOptions,stringify:e=>d(e,8,"0o")},y={identify:l,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:e=>u(e,e,10),options:n.intOptions,stringify:n.stringifyNumber},v={identify:e=>l(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x([0-9a-fA-F]+)$/,resolve:(e,t)=>u(e,t,16),options:n.intOptions,stringify:e=>d(e,16,"0x")},E={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:(e,t)=>t?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:n.stringifyNumber},S={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify:({value:e})=>Number(e).toExponential()},b={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.([0-9]+)|[0-9]+\.([0-9]*))$/,resolve(e,t,r){let i=t||r,s=new n.Scalar(parseFloat(e));return i&&"0"===i[i.length-1]&&(s.minFractionDigits=i.length),s},stringify:n.stringifyNumber},w=a.concat([h,m,g,y,v,E,S,b]),O=e=>"bigint"==typeof e||Number.isInteger(e),N=({value:e})=>JSON.stringify(e),A=[i,s,{identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:n.resolveString,stringify:N},{identify:e=>null==e,createNode:(e,t,r)=>r.wrapScalars?new n.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:N},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:e=>"true"===e,stringify:N},{identify:O,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:e=>n.intOptions.asBigInt?BigInt(e):parseInt(e,10),stringify:({value:e})=>O(e)?e.toString():JSON.stringify(e)},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:N}];A.scalarFallback=e=>{throw new SyntaxError(`Unresolved plain scalar ${JSON.stringify(e)}`)};var L=({value:e})=>e?n.boolOptions.trueStr:n.boolOptions.falseStr,M=e=>"bigint"==typeof e||Number.isInteger(e);function T(e,t,r){let i=t.replace(/_/g,"");if(n.intOptions.asBigInt){switch(r){case 2:i=`0b${i}`;break;case 8:i=`0o${i}`;break;case 16:i=`0x${i}`}let t=BigInt(i);return"-"===e?BigInt(-1)*t:t}let s=parseInt(i,r);return"-"===e?-1*s:s}function x(e,t,r){let{value:i}=e;if(M(i)){let e=i.toString(t);return i<0?"-"+r+e.substr(1):r+e}return n.stringifyNumber(e)}var k=a.concat([{identify:e=>null==e,createNode:(e,t,r)=>r.wrapScalars?new n.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>null,options:n.nullOptions,stringify:()=>n.nullOptions.nullStr},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>!0,options:n.boolOptions,stringify:L},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:()=>!1,options:n.boolOptions,stringify:L},{identify:M,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^([-+]?)0b([0-1_]+)$/,resolve:(e,t,n)=>T(t,n,2),stringify:e=>x(e,2,"0b")},{identify:M,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^([-+]?)0([0-7_]+)$/,resolve:(e,t,n)=>T(t,n,8),stringify:e=>x(e,8,"0")},{identify:M,default:!0,tag:"tag:yaml.org,2002:int",test:/^([-+]?)([0-9][0-9_]*)$/,resolve:(e,t,n)=>T(t,n,10),stringify:n.stringifyNumber},{identify:M,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^([-+]?)0x([0-9a-fA-F_]+)$/,resolve:(e,t,n)=>T(t,n,16),stringify:e=>x(e,16,"0x")},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:(e,t)=>t?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:n.stringifyNumber},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?([0-9][0-9_]*)?(\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify:({value:e})=>Number(e).toExponential()},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.([0-9_]*)$/,resolve(e,t){let r=new n.Scalar(parseFloat(e.replace(/_/g,"")));if(t){let e=t.replace(/_/g,"");"0"===e[e.length-1]&&(r.minFractionDigits=e.length)}return r},stringify:n.stringifyNumber}],r.binary,r.omap,r.pairs,r.set,r.intTime,r.floatTime,r.timestamp),C={core:w,failsafe:a,json:A,yaml11:k},I={binary:r.binary,bool:m,float:b,floatExp:S,floatNaN:E,floatTime:r.floatTime,int:y,intHex:v,intOct:g,intTime:r.intTime,map:i,null:h,omap:r.omap,pairs:r.pairs,seq:s,set:r.set,timestamp:r.timestamp};function $(e,t,r){if(e instanceof n.Node)return e;let{defaultPrefix:o,onTagObj:a,prevObjects:l,schema:c,wrapScalars:u}=r;t&&t.startsWith("!!")&&(t=o+t.slice(2));let f=function(e,t,n){if(t){let e=n.filter((e=>e.tag===t)),r=e.find((e=>!e.format))||e[0];if(!r)throw new Error(`Tag ${t} not found`);return r}return n.find((t=>(t.identify&&t.identify(e)||t.class&&e instanceof t.class)&&!t.format))}(e,t,c.tags);if(!f){if("function"==typeof e.toJSON&&(e=e.toJSON()),!e||"object"!=typeof e)return u?new n.Scalar(e):e;f=e instanceof Map?i:e[Symbol.iterator]?s:i}a&&(a(f),delete r.onTagObj);let p={value:void 0,node:void 0};if(e&&"object"==typeof e&&l){let t=l.get(e);if(t){let e=new n.Alias(t);return r.aliasNodes.push(e),e}p.value=e,l.set(e,p)}return p.node=f.createNode?f.createNode(r.schema,e,r):u?new n.Scalar(e):e,t&&p.node instanceof n.Node&&(p.node.tag=t),p.node}var P=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0,R=class e{constructor({customTags:e,merge:t,schema:n,sortMapEntries:i,tags:s}){this.merge=!!t,this.name=n,this.sortMapEntries=!0===i?P:i||null,!e&&s&&r.warnOptionDeprecation("tags","customTags"),this.tags=function(e,t,n,r){let i=e[r.replace(/\W/g,"")];if(!i){let t=Object.keys(e).map((e=>JSON.stringify(e))).join(", ");throw new Error(`Unknown schema "${r}"; use one of ${t}`)}if(Array.isArray(n))for(let e of n)i=i.concat(e);else"function"==typeof n&&(i=n(i.slice()));for(let e=0;e<i.length;++e){let n=i[e];if("string"==typeof n){let r=t[n];if(!r){let e=Object.keys(t).map((e=>JSON.stringify(e))).join(", ");throw new Error(`Unknown custom tag "${n}"; use one of ${e}`)}i[e]=r}}return i}(C,I,e||s,n)}createNode(t,n,r,i){let s={defaultPrefix:e.defaultPrefix,schema:this,wrapScalars:n};return $(t,r,i?Object.assign(i,s):s)}createPair(e,t,r){r||(r={wrapScalars:!0});let i=this.createNode(e,r.wrapScalars,null,r),s=this.createNode(t,r.wrapScalars,null,r);return new n.Pair(i,s)}};t._defineProperty(R,"defaultPrefix",t.defaultTagPrefix),t._defineProperty(R,"defaultTags",t.defaultTags),e.Schema=R})),h=o((e=>{var t=c(),n=f(),r=d(),i={get binary(){return n.binaryOptions},set binary(e){Object.assign(n.binaryOptions,e)},get bool(){return n.boolOptions},set bool(e){Object.assign(n.boolOptions,e)},get int(){return n.intOptions},set int(e){Object.assign(n.intOptions,e)},get null(){return n.nullOptions},set null(e){Object.assign(n.nullOptions,e)},get str(){return n.strOptions},set str(e){Object.assign(n.strOptions,e)}},s={"1.0":{schema:"yaml-1.1",merge:!0,tagPrefixes:[{handle:"!",prefix:t.defaultTagPrefix},{handle:"!!",prefix:"tag:private.yaml.org,2002:"}]},1.1:{schema:"yaml-1.1",merge:!0,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:t.defaultTagPrefix}]},1.2:{schema:"core",merge:!1,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:t.defaultTagPrefix}]}};function o(e,t){if("1.0"===(e.version||e.options.version)){let e=t.match(/^tag:private\.yaml\.org,2002:([^:/]+)$/);if(e)return"!"+e[1];let n=t.match(/^tag:([a-zA-Z0-9-]+)\.yaml\.org,2002:(.*)/);return n?`!${n[1]}/${n[2]}`:`!${t.replace(/^tag:/,"")}`}let n=e.tagPrefixes.find((e=>0===t.indexOf(e.prefix)));if(!n){let r=e.getDefaults().tagPrefixes;n=r&&r.find((e=>0===t.indexOf(e.prefix)))}if(!n)return"!"===t[0]?t:`!<${t}>`;let r=t.substr(n.prefix.length).replace(/[!,[\]{}]/g,(e=>({"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"}[e])));return n.handle+r}function a(e,t,r,i){let s,{anchors:a,schema:l}=t.doc;if(!(e instanceof n.Node)){let t={aliasNodes:[],onTagObj:e=>s=e,prevObjects:new Map};e=l.createNode(e,!0,null,t);for(let e of t.aliasNodes){e.source=e.source.node;let t=a.getName(e.source);t||(t=a.newName(),a.map[t]=e.source)}}if(e instanceof n.Pair)return e.toString(t,r,i);s||(s=function(e,t){if(t instanceof n.Alias)return n.Alias;if(t.tag){let n=e.filter((e=>e.tag===t.tag));if(n.length>0)return n.find((e=>e.format===t.format))||n[0]}let r,i;if(t instanceof n.Scalar){i=t.value;let n=e.filter((e=>e.identify&&e.identify(i)||e.class&&i instanceof e.class));r=n.find((e=>e.format===t.format))||n.find((e=>!e.format))}else i=t,r=e.find((e=>e.nodeClass&&i instanceof e.nodeClass));if(!r){let e=i&&i.constructor?i.constructor.name:typeof i;throw new Error(`Tag not resolved for ${e} value`)}return r}(l.tags,e));let c=function(e,t,{anchors:n,doc:r}){let i=[],s=r.anchors.getName(e);return s&&(n[s]=e,i.push(`&${s}`)),e.tag?i.push(o(r,e.tag)):t.default||i.push(o(r,t.tag)),i.join(" ")}(e,s,t);c.length>0&&(t.indentAtStart=(t.indentAtStart||0)+c.length+1);let u="function"==typeof s.stringify?s.stringify(e,t,r,i):e instanceof n.Scalar?n.stringifyString(e,t,r,i):e.toString(t,r,i);return c?e instanceof n.Scalar||"{"===u[0]||"["===u[0]?`${c} ${u}`:`${c}\n${t.indent}${u}`:u}var l=class e{static validAnchorNode(e){return e instanceof n.Scalar||e instanceof n.YAMLSeq||e instanceof n.YAMLMap}constructor(e){t._defineProperty(this,"map",Object.create(null)),this.prefix=e}createAlias(e,t){return this.setAnchor(e,t),new n.Alias(e)}createMergePair(...e){let t=new n.Merge;return t.value.items=e.map((e=>{if(e instanceof n.Alias){if(e.source instanceof n.YAMLMap)return e}else if(e instanceof n.YAMLMap)return this.createAlias(e);throw new Error("Merge sources must be Map nodes or their Aliases")})),t}getName(e){let{map:t}=this;return Object.keys(t).find((n=>t[n]===e))}getNames(){return Object.keys(this.map)}getNode(e){return this.map[e]}newName(e){e||(e=this.prefix);let t=Object.keys(this.map);for(let n=1;;++n){let r=`${e}${n}`;if(!t.includes(r))return r}}resolveNodes(){let{map:e,_cstAliases:t}=this;Object.keys(e).forEach((t=>{e[t]=e[t].resolved})),t.forEach((e=>{e.source=e.source.resolved})),delete this._cstAliases}setAnchor(t,n){if(null!=t&&!e.validAnchorNode(t))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,i=t&&Object.keys(r).find((e=>r[e]===t));if(i){if(!n)return i;i!==n&&(delete r[i],r[n]=t)}else{if(!n){if(!t)return null;n=this.newName()}r[n]=t}return n}},u=(e,t)=>{if(e&&"object"==typeof e){let{tag:r}=e;e instanceof n.Collection?(r&&(t[r]=!0),e.items.forEach((e=>u(e,t)))):e instanceof n.Pair?(u(e.key,t),u(e.value,t)):e instanceof n.Scalar&&r&&(t[r]=!0)}return t};function p({tagPrefixes:e},n){let[r,i]=n.parameters;if(!r||!i){let e="Insufficient parameters given for %TAG directive";throw new t.YAMLSemanticError(n,e)}if(e.some((e=>e.handle===r))){let e="The %TAG directive must only be given at most once per handle in the same document.";throw new t.YAMLSemanticError(n,e)}return{handle:r,prefix:i}}function h(e,n){let[r]=n.parameters;if("YAML:1.0"===n.name&&(r="1.0"),!r){let e="Insufficient parameters given for %YAML directive";throw new t.YAMLSemanticError(n,e)}if(!s[r]){let i=`Document will be parsed as YAML ${e.version||e.options.version} rather than YAML ${r}`;e.warnings.push(new t.YAMLWarning(n,i))}return r}function m(e){if(e instanceof n.Collection)return!0;throw new Error("Expected a YAML collection as document contents")}var g=class e{constructor(e){this.anchors=new l(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 m(this.contents),this.contents.add(e)}addIn(e,t){m(this.contents),this.contents.addIn(e,t)}delete(e){return m(this.contents),this.contents.delete(e)}deleteIn(e){return n.isEmptyPath(e)?null!=this.contents&&(this.contents=null,!0):(m(this.contents),this.contents.deleteIn(e))}getDefaults(){return e.defaults[this.version]||e.defaults[this.options.version]||{}}get(e,t){return this.contents instanceof n.Collection?this.contents.get(e,t):void 0}getIn(e,t){return n.isEmptyPath(e)?!t&&this.contents instanceof n.Scalar?this.contents.value:this.contents:this.contents instanceof n.Collection?this.contents.getIn(e,t):void 0}has(e){return this.contents instanceof n.Collection&&this.contents.has(e)}hasIn(e){return n.isEmptyPath(e)?void 0!==this.contents:this.contents instanceof n.Collection&&this.contents.hasIn(e)}set(e,t){m(this.contents),this.contents.set(e,t)}setIn(e,t){n.isEmptyPath(e)?this.contents=t:(m(this.contents),this.contents.setIn(e,t))}setSchema(e,t){if(!e&&!t&&this.schema)return;"number"==typeof e&&(e=e.toFixed(1)),"1.0"===e||"1.1"===e||"1.2"===e?(this.version?this.version=e:this.options.version=e,delete this.options.schema):e&&"string"==typeof e&&(this.options.schema=e),Array.isArray(t)&&(this.options.customTags=t);let n=Object.assign({},this.getDefaults(),this.options);this.schema=new r.Schema(n)}parse(e,r){this.options.keepCstNodes&&(this.cstNode=e),this.options.keepNodeTypes&&(this.type="DOCUMENT");let{directives:i=[],contents:s=[],directivesEndMarker:o,error:a,valueRange:l}=e;if(a&&(a.source||(a.source=this),this.errors.push(a)),function(e,n,r){let i=[],s=!1;for(let r of n){let{comment:n,name:o}=r;switch(o){case"TAG":try{e.tagPrefixes.push(p(e,r))}catch(t){e.errors.push(t)}s=!0;break;case"YAML":case"YAML:1.0":if(e.version){let n="The %YAML directive must only be given at most once per document.";e.errors.push(new t.YAMLSemanticError(r,n))}try{e.version=h(e,r)}catch(t){e.errors.push(t)}s=!0;break;default:if(o){let n=`YAML only supports %TAG and %YAML directives, and not %${o}`;e.warnings.push(new t.YAMLWarning(r,n))}}n&&i.push(n)}if(r&&!s&&"1.1"===(e.version||r.version||e.options.version)){let t=({handle:e,prefix:t})=>({handle:e,prefix:t});e.tagPrefixes=r.tagPrefixes.map(t),e.version=r.version}e.commentBefore=i.join("\n")||null}(this,i,r),o&&(this.directivesEndMarker=!0),this.range=l?[l.start,l.end]:null,this.setSchema(),this.anchors._cstAliases=[],function(e,r){let i,s={before:[],after:[]},o=!1;for(let a of r)if(a.valueRange){if(void 0!==i){let n="Document contains trailing content not separated by a ... or --- line";e.errors.push(new t.YAMLSyntaxError(a,n));break}let r=n.resolveNode(e,a);o&&(r.spaceBefore=!0,o=!1),i=r}else null!==a.comment?(void 0===i?s.before:s.after).push(a.comment):a.type===t.Type.BLANK_LINE&&(o=!0,void 0===i&&s.before.length>0&&!e.commentBefore&&(e.commentBefore=s.before.join("\n"),s.before=[]));if(e.contents=i||null,i){let t=s.before.join("\n");if(t){let e=i instanceof n.Collection&&i.items[0]?i.items[0]:i;e.commentBefore=e.commentBefore?`${t}\n${e.commentBefore}`:t}e.comment=s.after.join("\n")||null}else e.comment=s.before.concat(s.after).join("\n")||null}(this,s),this.anchors.resolveNodes(),this.options.prettyErrors){for(let e of this.errors)e instanceof t.YAMLError&&e.makePretty();for(let e of this.warnings)e instanceof t.YAMLError&&e.makePretty()}return this}listNonDefaultTags(){return(e=>Object.keys(u(e,{})))(this.contents).filter((e=>0!==e.indexOf(r.Schema.defaultPrefix)))}setTagPrefix(e,t){if("!"!==e[0]||"!"!==e[e.length-1])throw new Error("Handle must start and end with !");if(t){let n=this.tagPrefixes.find((t=>t.handle===e));n?n.prefix=t:this.tagPrefixes.push({handle:e,prefix:t})}else this.tagPrefixes=this.tagPrefixes.filter((t=>t.handle!==e))}toJSON(e,t){let{keepBlobsInJSON:r,mapAsMap:i,maxAliasCount:s}=this.options,o=r&&("string"!=typeof e||!(this.contents instanceof n.Scalar)),l={doc:this,indentStep:" ",keep:o,mapAsMap:o&&!!i,maxAliasCount:s,stringify:a},c=Object.keys(this.anchors.map);c.length>0&&(l.anchors=new Map(c.map((e=>[this.anchors.map[e],{alias:[],aliasCount:0,count:1}]))));let u=n.toJSON(this.contents,e,l);if("function"==typeof t&&l.anchors)for(let{count:e,res:n}of l.anchors.values())t(n,e);return u}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 t=JSON.stringify(e);throw new Error(`"indent" option must be a positive integer, not ${t}`)}this.setSchema();let t=[],r=!1;if(this.version){let e="%YAML 1.2";"yaml-1.1"===this.schema.name&&("1.0"===this.version?e="%YAML:1.0":"1.1"===this.version&&(e="%YAML 1.1")),t.push(e),r=!0}let i=this.listNonDefaultTags();this.tagPrefixes.forEach((({handle:e,prefix:n})=>{i.some((e=>0===e.indexOf(n)))&&(t.push(`%TAG ${e} ${n}`),r=!0)})),(r||this.directivesEndMarker)&&t.push("---"),this.commentBefore&&((r||!this.directivesEndMarker)&&t.unshift(""),t.unshift(this.commentBefore.replace(/^/gm,"#")));let s={anchors:Object.create(null),doc:this,indent:"",indentStep:" ".repeat(e),stringify:a},o=!1,l=null;if(this.contents){this.contents instanceof n.Node&&(this.contents.spaceBefore&&(r||this.directivesEndMarker)&&t.push(""),this.contents.commentBefore&&t.push(this.contents.commentBefore.replace(/^/gm,"#")),s.forceBlockIndent=!!this.comment,l=this.contents.comment);let e=l?null:()=>o=!0,i=a(this.contents,s,(()=>l=null),e);t.push(n.addComment(i,"",l))}else void 0!==this.contents&&t.push(a(this.contents,s));return this.comment&&((!o||l)&&""!==t[t.length-1]&&t.push(""),t.push(this.comment.replace(/^/gm,"#"))),t.join("\n")+"\n"}};t._defineProperty(g,"defaults",s),e.Document=g,e.defaultOptions={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"},e.scalarOptions=i})),m=o((e=>{var t=u(),n=h(),r=d(),i=c(),s=p();f();var o=class extends n.Document{constructor(e){super(Object.assign({},n.defaultOptions,e))}};function a(e,n){let r=t.parse(e),s=new o(n).parse(r[0]);if(r.length>1){let e="Source contains multiple documents; please use YAML.parseAllDocuments()";s.errors.unshift(new i.YAMLSemanticError(r[1],e))}return s}var l={createNode:function(e,t=!0,i){void 0===i&&"string"==typeof t&&(i=t,t=!0);let s=Object.assign({},n.Document.defaults[n.defaultOptions.version],n.defaultOptions);return new r.Schema(s).createNode(e,t,i)},defaultOptions:n.defaultOptions,Document:o,parse:function(e,t){let n=a(e,t);if(n.warnings.forEach((e=>s.warn(e))),n.errors.length>0)throw n.errors[0];return n.toJSON()},parseAllDocuments:function(e,n){let r,i=[];for(let s of t.parse(e)){let e=new o(n);e.parse(s,r),i.push(e),r=e}return i},parseCST:t.parse,parseDocument:a,scalarOptions:n.scalarOptions,stringify:function(e,t){let n=new o(t);return n.contents=e,String(n)}};e.YAML=l})),g=o(((e,t)=>{t.exports=m().YAML})),y=o((e=>{var t=f(),n=c();e.findPair=t.findPair,e.parseMap=t.resolveMap,e.parseSeq=t.resolveSeq,e.stringifyNumber=t.stringifyNumber,e.stringifyString=t.stringifyString,e.toJSON=t.toJSON,e.Type=n.Type,e.YAMLError=n.YAMLError,e.YAMLReferenceError=n.YAMLReferenceError,e.YAMLSemanticError=n.YAMLSemanticError,e.YAMLSyntaxError=n.YAMLSyntaxError,e.YAMLWarning=n.YAMLWarning})),v={};a(v,{languages:()=>Ue,options:()=>Ve,parsers:()=>Qe,printers:()=>un});var E=(e,t,n,r)=>{if(!e||null!=t)return t.replaceAll?t.replaceAll(n,r):n.global?t.replace(n,r):t.split(n).join(r)},S="string",b="array",w="cursor",O="indent",N="align",A="trim",L="group",M="fill",T="if-break",x="indent-if-break",k="line-suffix",C="line-suffix-boundary",I="line",$="label",P="break-parent",R=new Set([w,O,N,A,L,M,T,x,k,C,I,$,P]);var _=function(e){if("string"==typeof e)return S;if(Array.isArray(e))return b;if(!e)return;let{type:t}=e;return R.has(t)?t:void 0};function Y(e){let t=null===e?"null":typeof e;if("string"!==t&&"object"!==t)return`Unexpected doc '${t}', \nExpected it to be 'string' or 'object'.`;if(_(e))throw new Error("doc is valid.");let n=Object.prototype.toString.call(e);if("[object Object]"!==n)return`Unexpected doc '${n}'.`;let r=(e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e))([...R].map((e=>`'${e}'`)));return`Unexpected doc.type '${e.type}'.\nExpected it to be ${r}.`}var B=class extends Error{name="InvalidDocError";constructor(e){super(Y(e)),this.doc=e}},D=()=>{};function F(e,t){return{type:N,contents:t,n:e}}function W(e,t={}){return D(t.expandedStates),{type:L,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function j(e){return F(Number.NEGATIVE_INFINITY,e)}function q(e){return F({type:"root"},e)}function U(e,t){return W(e[0],{...t,expandedStates:e})}function K(e){return{type:M,parts:e}}function V(e,t="",n={}){return{type:T,breakContents:e,flatContents:t,groupId:n.groupId}}var Q={type:P},J={type:I},H={type:I,soft:!0},G=[{type:I,hard:!0},Q],z=[{type:I,hard:!0,literal:!0},Q];function Z(e,t){let n=[];for(let r=0;r<t.length;r++)0!==r&&n.push(e),n.push(t[r]);return n}var X=(e,t,n)=>{if(!e||null!=t)return Array.isArray(t)||"string"==typeof t?t[n<0?t.length+n:n]:t.at(n)};function ee(e,t){if("string"==typeof e)return t(e);let n=new Map;return r(e);function r(e){if(n.has(e))return n.get(e);let i=function(e){switch(_(e)){case b:return t(e.map(r));case M:return t({...e,parts:e.parts.map(r)});case T:return t({...e,breakContents:r(e.breakContents),flatContents:r(e.flatContents)});case L:{let{expandedStates:n,contents:i}=e;return n?(n=n.map(r),i=n[0]):i=r(i),t({...e,contents:i,expandedStates:n})}case N:case O:case x:case $:case k:return t({...e,contents:r(e.contents)});case S:case w:case A:case C:case I:case P:return t(e);default:throw new B(e)}}(e);return n.set(e,i),i}}var te,ne=(te=" \t",(e,t,n)=>{let r=!(null==n||!n.backwards);if(!1===t)return!1;let{length:i}=e,s=t;for(;s>=0&&s<i;){let t=e.charAt(s);if(te instanceof RegExp){if(!te.test(t))return s}else if(!te.includes(t))return s;r?s--:s++}return(-1===s||s===i)&&s});var re=function(e,t,n){let r=!(null==n||!n.backwards);if(!1===t)return!1;let i=e.charAt(t);if(r){if("\r"===e.charAt(t-1)&&"\n"===i)return t-2;if("\n"===i||"\r"===i||"\u2028"===i||"\u2029"===i)return t-1}else{if("\r"===i&&"\n"===e.charAt(t+1))return t+2;if("\n"===i||"\r"===i||"\u2028"===i||"\u2029"===i)return t+1}return t};var ie=function(e,t){let n=t-1;return n=ne(e,n,{backwards:!0}),n=re(e,n,{backwards:!0}),n=ne(e,n,{backwards:!0}),n!==re(e,n,{backwards:!0})},se=class extends Error{name="UnexpectedNodeError";constructor(e,t,n="type"){super(`Unexpected ${t} node ${n}: ${JSON.stringify(e[n])}.`),this.node=e}};function oe(e,t){let{node:n}=e;if("root"===n.type&&t.filepath&&/(?:[/\\]|^)\.(?:prettier|stylelint|lintstaged)rc$/.test(t.filepath))return async e=>{let n=await e(t.originalText,{parser:"json"});return n?[n,G]:void 0}}oe.getVisitorKeys=()=>[];var ae=oe,le=null;function ce(e){if(null!==le&&(le.property,1)){let e=le;return le=ce.prototype=null,e}return le=ce.prototype=e??Object.create(null),new ce}for(let e=0;e<=10;e++)ce();var ue=function(e,t="type"){return function(e){ce(e)}(e),function(n){let r=n[t],i=e[r];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${r}'.`),{node:n});return i}},fe=Object.fromEntries(Object.entries({root:["children"],document:["head","body","children"],documentHead:["children"],documentBody:["children"],directive:[],alias:[],blockLiteral:[],blockFolded:["children"],plain:["children"],quoteSingle:[],quoteDouble:[],mapping:["children"],mappingItem:["key","value","children"],mappingKey:["content","children"],mappingValue:["content","children"],sequence:["children"],sequenceItem:["content","children"],flowMapping:["children"],flowMappingItem:["key","value","children"],flowSequence:["children"],flowSequenceItem:["content","children"],comment:[],tag:[],anchor:[]}).map((([e,t])=>[e,[...t,"anchor","tag","indicatorComment","leadingComments","middleComments","trailingComment","endComments"]]))),pe=ue(fe);function de(e){return e.position.start.offset}var he=function(e){return Array.isArray(e)&&e.length>0};function me(e,t){return"string"==typeof(null==e?void 0:e.type)&&(!t||t.includes(e.type))}function ge(e,t,n){return t("children"in e?{...e,children:e.children.map((n=>ge(n,t,e)))}:e,n)}function ye(e,t,n){Object.defineProperty(e,t,{get:n,enumerable:!1})}function ve(e){let{node:t}=e;switch(t.type){case"tag":case"anchor":case"comment":return!1}let n=e.stack.length;for(let t=1;t<n;t++){let n=e.stack[t],r=e.stack[t-1];if(Array.isArray(r)&&"number"==typeof n&&n!==r.length-1)return!1}return!0}function Ee(e){return he(e.children)?Ee(X(!1,e.children,-1)):e}function Se(e){return"prettier-ignore"===e.value.trim()}function be(e){return!he(e.children)&&!function(e){return we(e)||Oe(e)||Ne(e)||Ae(e)||Le(e)}(e)}function we(e){return he(null==e?void 0:e.leadingComments)}function Oe(e){return he(null==e?void 0:e.middleComments)}function Ne(e){return null==e?void 0:e.indicatorComment}function Ae(e){return null==e?void 0:e.trailingComment}function Le(e){return he(null==e?void 0:e.endComments)}function Me(e){let t,n=[];for(let r of e.split(/( +)/))" "!==r?" "===t?n.push(r):n.push((n.pop()||"")+r):void 0===t&&n.unshift(""),t=r;return" "===t&&n.push((n.pop()||"")+" "),""===n[0]&&(n.shift(),n.unshift(" "+(n.shift()||""))),n}function Te(e){if(!e)return!0;switch(e.type){case"plain":case"quoteDouble":case"quoteSingle":case"alias":case"flowMapping":case"flowSequence":return!0;default:return!1}}var xe=new WeakMap;function ke(e,t){let n,{node:r,root:i}=e;return xe.has(i)?n=xe.get(i):(n=new Set,xe.set(i,n)),n.has(r.position.end.line)||(n.add(r.position.end.line),!function(e,t){let n=0,r=t.length;for(let i=e.position.end.offset-1;i<r;i++){let e=t[i];if("\n"===e&&n++,1===n&&/\S/.test(e))return!1;if(2===n)return!0}return!1}(r,t)||Ce(e.parent))?"":H}function Ce(e){return Le(e)&&!me(e,["documentHead","documentBody","flowMapping","flowSequence"])}function Ie(e,t){return F(" ".repeat(e),t)}var $e=function(e,t,n){let{node:r}=e,i=e.ancestors.filter((e=>"sequence"===e.type||"mapping"===e.type)).length,s=ve(e),o=["blockFolded"===r.type?">":"|"];null!==r.indent&&o.push(r.indent.toString()),"clip"!==r.chomping&&o.push("keep"===r.chomping?"+":"-"),Ne(r)&&o.push(" ",t("indicatorComment"));let a=function(e,{parentIndent:t,isLastDescendant:n,options:r}){let i,s=e.position.start.line===e.position.end.line?"":r.originalText.slice(e.position.start.offset,e.position.end.offset).match(/^[^\n]*\n(.*)$/s)[1];if(null===e.indent){let e=s.match(/^(?<leadingSpace> *)[^\n\r ]/m);i=e?e.groups.leadingSpace.length:Number.POSITIVE_INFINITY}else i=e.indent-1+t;let o=s.split("\n").map((e=>e.slice(i)));return"preserve"===r.proseWrap||"blockLiteral"===e.type?a(o.map((e=>0===e.length?[]:[e]))):a(o.map((e=>0===e.length?[]:Me(e))).reduce(((e,t,n)=>0!==n&&o[n-1].length>0&&t.length>0&&!/^\s/.test(t[0])&&!/^\s|\s$/.test(X(!1,e,-1))?[...e.slice(0,-1),[...X(!1,e,-1),...t]]:[...e,t]),[]).map((e=>e.reduce(((e,t)=>e.length>0&&/\s$/.test(X(!1,e,-1))?[...e.slice(0,-1),X(!1,e,-1)+" "+t]:[...e,t]),[]))).map((e=>"never"===r.proseWrap?[e.join(" ")]:e)));function a(t){if("keep"===e.chomping)return 0===X(!1,t,-1).length?t.slice(0,-1):t;let r=0;for(let e=t.length-1;e>=0&&0===t[e].length;e--)r++;return 0===r?t:r>=2&&!n?t.slice(0,-(r-1)):t.slice(0,-r)}}(r,{parentIndent:i,isLastDescendant:s,options:n}),l=[];for(let[e,t]of a.entries())0===e&&l.push(G),l.push(K(Z(J,t))),e!==a.length-1?l.push(0===t.length?G:q(z)):"keep"===r.chomping&&s&&l.push(j(0===t.length?G:z));return null===r.indent?o.push(function(e){return F(-1,e)}(Ie(n.tabWidth,l))):o.push(j(Ie(r.indent-1+i,l))),o};function Pe(e,t,n){let{node:r}=e,i="flowMapping"===r.type,s=i?"{":"[",o=i?"}":"]",a=H;i&&r.children.length>0&&n.bracketSpacing&&(a=J);let l=X(!1,r.children,-1),c="flowMappingItem"===(null==l?void 0:l.type)&&be(l.key)&&be(l.value);return[s,Ie(n.tabWidth,[a,Re(e,t,n),"none"===n.trailingComma?"":V(","),Le(r)?[G,Z(G,e.map(t,"endComments"))]:""]),c?"":a,o]}function Re(e,t,n){return e.map((({isLast:r,node:i,next:s})=>[t(),r?"":[",",J,i.position.start.line!==s.position.start.line?ke(e,n.originalText):""]]),"children")}function _e(e,t){if(!e)return!0;switch(e.type){case"plain":case"quoteSingle":case"quoteDouble":break;case"alias":return!0;default:return!1}if("preserve"===t.proseWrap)return e.position.start.line===e.position.end.line;if(/\\$/m.test(t.originalText.slice(e.position.start.offset,e.position.end.offset)))return!1;switch(t.proseWrap){case"never":return!e.value.includes("\n");case"always":return!/[\n ]/.test(e.value);default:return!1}}var Ye=function(e,t,n){var r;let{node:i,parent:s}=e,{key:o,value:a}=i,l=be(o),c=be(a);if(l&&c)return": ";let u=t("key"),f=function(e){var t;return"alias"===(null==(t=e.key.content)?void 0:t.type)}(i)?" ":"";if(c)return"flowMappingItem"===i.type&&"flowMapping"===s.type?u:"mappingItem"===i.type&&_e(o.content,n)&&!Ae(o.content)&&"tag:yaml.org,2002:set"!==(null==(r=s.tag)?void 0:r.value)?[u,f,":"]:["? ",Ie(2,u)];let p=t("value");if(l)return[": ",Ie(2,p)];if(we(a)||!Te(o.content))return["? ",Ie(2,u),G,...e.map((()=>[t(),G]),"value","leadingComments"),": ",Ie(2,p)];if(function(e){if(!e)return!0;switch(e.type){case"plain":case"quoteDouble":case"quoteSingle":return e.position.start.line===e.position.end.line;case"alias":return!0;default:return!1}}(o.content)&&!we(o.content)&&!Oe(o.content)&&!Ae(o.content)&&!Le(o)&&!we(a.content)&&!Oe(a.content)&&!Le(a)&&_e(a.content,n))return[u,f,": ",p];let d=Symbol("mappingKey"),h=W([V("? "),W(Ie(2,u),{id:d})]),m=[G,": ",Ie(2,p)],g=[f,":"];we(a.content)||Le(a)&&a.content&&!me(a.content,["mapping","sequence"])||"mapping"===s.type&&Ae(o.content)&&Te(a.content)||me(a.content,["mapping","sequence"])&&null===a.content.tag&&null===a.content.anchor?g.push(G):a.content&&g.push(J),g.push(p);let y=Ie(n.tabWidth,g);return!_e(o.content,n)||we(o.content)||Oe(o.content)||Le(o)?U([[h,V(m,y,{groupId:d})]]):U([[u,y]])};function Be(e){switch(e.type){case"document":ye(e,"head",(()=>e.children[0])),ye(e,"body",(()=>e.children[1]));break;case"documentBody":case"sequenceItem":case"flowSequenceItem":case"mappingKey":case"mappingValue":ye(e,"content",(()=>e.children[0]));break;case"mappingItem":case"flowMappingItem":ye(e,"key",(()=>e.children[0])),ye(e,"value",(()=>e.children[1]))}return e}var De=function(e){return ge(e,Be)};function Fe(e,t){return Ae(e)||t&&(t.head.children.length>0||Le(t.head))}function We(e,t,n){let r=function(e,t,n){let r=t.split("\n").map(((e,t,n)=>0===t&&t===n.length-1?e:0!==t&&t!==n.length-1?e.trim():0===t?e.trimEnd():e.trimStart()));return"preserve"===n.proseWrap?r.map((e=>0===e.length?[]:[e])):r.map((e=>0===e.length?[]:Me(e))).reduce(((t,n,i)=>0!==i&&r[i-1].length>0&&n.length>0&&("quoteDouble"!==e||!X(!1,X(!1,t,-1),-1).endsWith("\\"))?[...t.slice(0,-1),[...X(!1,t,-1),...n]]:[...t,n]),[]).map((e=>"never"===n.proseWrap?[e.join(" ")]:e))}(e,t,n);return Z(G,r.map((e=>K(Z(J,e)))))}var je={preprocess:De,embed:ae,print:function(e,t,n){let{node:r}=e,i=[];"mappingValue"!==r.type&&we(r)&&i.push([Z(G,e.map(n,"leadingComments")),G]);let{tag:s,anchor:o}=r;s&&i.push(n("tag")),s&&o&&i.push(" "),o&&i.push(n("anchor"));let a="";return me(r,["mapping","sequence","comment","directive","mappingItem","sequenceItem"])&&!ve(e)&&(a=ke(e,t.originalText)),(s||o)&&(me(r,["sequence","mapping"])&&!Oe(r)?i.push(G):i.push(" ")),Oe(r)&&i.push([1===r.middleComments.length?"":G,Z(G,e.map(n,"middleComments")),G]),function(e){let{node:t}=e;if("documentBody"===t.type){let t=e.parent.head;return Le(t)&&Se(X(!1,t.endComments,-1))}return we(t)&&Se(X(!1,t.leadingComments,-1))}(e)?i.push(function(e,t=z){return ee(e,(e=>"string"==typeof e?Z(t,e.split("\n")):e))}(t.originalText.slice(r.position.start.offset,r.position.end.offset).trimEnd())):i.push(W(function(e,t,n){let{node:r}=e;switch(r.type){case"root":{let t=[];e.each((({node:e,next:r,isFirst:i})=>{i||t.push(G),t.push(n()),Fe(e,r)?(t.push(G,"..."),Ae(e)&&t.push(" ",n("trailingComment"))):r&&!Ae(r.head)&&t.push(G,"---")}),"children");let i=Ee(r);return(!me(i,["blockLiteral","blockFolded"])||"keep"!==i.chomping)&&t.push(G),t}case"document":{let i=[];return"head"===function(e,t){let n=e.node;if(e.isFirst&&/---(?:\s|$)/.test(t.originalText.slice(de(n),de(n)+4))||n.head.children.length>0||Le(n.head)||Ae(n.head))return"head";let r=e.next;return!Fe(n,r)&&(!!r&&"root")}(e,t)&&((r.head.children.length>0||r.head.endComments.length>0)&&i.push(n("head")),Ae(r.head)?i.push(["---"," ",n(["head","trailingComment"])]):i.push("---")),function(e){return e.body.children.length>0||Le(e.body)}(r)&&i.push(n("body")),Z(G,i)}case"documentHead":return Z(G,[...e.map(n,"children"),...e.map(n,"endComments")]);case"documentBody":{let{children:t,endComments:i}=r,s="";if(t.length>0&&i.length>0){let e=Ee(r);me(e,["blockFolded","blockLiteral"])?"keep"!==e.chomping&&(s=[G,G]):s=G}return[Z(G,e.map(n,"children")),s,Z(G,e.map(n,"endComments"))]}case"directive":return["%",Z(" ",[r.name,...r.parameters])];case"comment":return["#",r.value];case"alias":return["*",r.value];case"tag":return t.originalText.slice(r.position.start.offset,r.position.end.offset);case"anchor":return["&",r.value];case"plain":return We(r.type,t.originalText.slice(r.position.start.offset,r.position.end.offset),t);case"quoteDouble":case"quoteSingle":{let e="'",n='"',i=t.originalText.slice(r.position.start.offset+1,r.position.end.offset-1);if("quoteSingle"===r.type&&i.includes("\\")||"quoteDouble"===r.type&&/\\[^"]/.test(i)){let s="quoteDouble"===r.type?n:e;return[s,We(r.type,i,t),s]}if(i.includes(n))return[e,We(r.type,"quoteDouble"===r.type?E(!1,E(!1,i,'\\"',n),"'",e.repeat(2)):i,t),e];if(i.includes(e))return[n,We(r.type,"quoteSingle"===r.type?E(!1,i,"''",e):i,t),n];let s=t.singleQuote?e:n;return[s,We(r.type,i,t),s]}case"blockFolded":case"blockLiteral":return $e(e,n,t);case"mapping":case"sequence":return Z(G,e.map(n,"children"));case"sequenceItem":return["- ",Ie(2,r.content?n("content"):"")];case"mappingKey":case"mappingValue":return r.content?n("content"):"";case"mappingItem":case"flowMappingItem":return Ye(e,n,t);case"flowMapping":case"flowSequence":return Pe(e,n,t);case"flowSequenceItem":return n("content");default:throw new se(r,"YAML")}}(e,t,n))),Ae(r)&&!me(r,["document","documentHead"])&&i.push(function(e){return{type:k,contents:e}}(["mappingValue"!==r.type||r.content?" ":"","mappingKey"===e.parent.type&&"mapping"===e.getParentNode(2).type&&Te(r)?"":Q,n("trailingComment")])),Ce(r)&&i.push(Ie("sequenceItem"===r.type?2:0,[G,Z(G,e.map((({node:e})=>[ie(t.originalText,de(e))?G:"",n()]),"endComments"))])),i.push(a),i},massageAstNode:function(e,t){if(me(t))switch(delete t.position,t.type){case"comment":if(function(e){return/^\s*@(?:prettier|format)\s*$/.test(e)}(t.value))return null;break;case"quoteDouble":case"quoteSingle":t.type="quote"}},insertPragma:function(e){return`# @format\n\n${e}`},getVisitorKeys:pe},qe=je,Ue=[{linguistLanguageId:407,name:"YAML",type:"data",color:"#cb171e",tmScope:"source.yaml",aliases:["yml"],extensions:[".yml",".mir",".reek",".rviz",".sublime-syntax",".syntax",".yaml",".yaml-tmlanguage",".yaml.sed",".yml.mysql"],filenames:[".clang-format",".clang-tidy",".gemrc","CITATION.cff","glide.lock",".prettierrc",".stylelintrc",".lintstagedrc"],aceMode:"yaml",codemirrorMode:"yaml",codemirrorMimeType:"text/x-yaml",parsers:["yaml"],vscodeLanguageIds:["yaml","ansible","home-assistant"]}],Ke={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},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."}},Ve={bracketSpacing:Ke.bracketSpacing,singleQuote:Ke.singleQuote,proseWrap:Ke.proseWrap},Qe={};a(Qe,{yaml:()=>cn});var Je,He,Ge="\n",ze=function(){function e(e){this.length=e.length;for(var t=[0],n=0;n<e.length;)switch(e[n]){case Ge:n+=1,t.push(n);break;case"\r":e[n+=1]===Ge&&(n+=1),t.push(n);break;default:n++}this.offsets=t}return e.prototype.locationForIndex=function(e){if(e<0||e>this.length)return null;for(var t=0,n=this.offsets;n[t+1]<=e;)t++;return{line:t,column:e-n[t]}},e.prototype.indexForLocation=function(e){var t=e.line,n=e.column;return t<0||t>=this.offsets.length||n<0||n>this.lengthOfLine(t)?null:this.offsets[t]+n},e.prototype.lengthOfLine=function(e){var t=this.offsets[e];return(e===this.offsets.length-1?this.length:this.offsets[e+1])-t},e}();function Ze(e,t=null){"children"in e&&e.children.forEach((t=>Ze(t,e))),"anchor"in e&&e.anchor&&Ze(e.anchor,e),"tag"in e&&e.tag&&Ze(e.tag,e),"leadingComments"in e&&e.leadingComments.forEach((t=>Ze(t,e))),"middleComments"in e&&e.middleComments.forEach((t=>Ze(t,e))),"indicatorComment"in e&&e.indicatorComment&&Ze(e.indicatorComment,e),"trailingComment"in e&&e.trailingComment&&Ze(e.trailingComment,e),"endComments"in e&&e.endComments.forEach((t=>Ze(t,e))),Object.defineProperty(e,"_parent",{value:t,enumerable:!1})}function Xe(e){return`${e.line}:${e.column}`}function et(e){Ze(e);let t=function(e){let t=Array.from(new Array(e.position.end.line),(()=>({})));for(let n of e.comments)t[n.position.start.line-1].comment=n;return tt(t,e),t}(e),n=e.children.slice();e.comments.sort(((e,t)=>e.position.start.offset-t.position.end.offset)).filter((e=>!e._parent)).forEach((e=>{for(;n.length>1&&e.position.start.line>n[0].position.end.line;)n.shift();!function(e,t,n){let r=e.position.start.line,{trailingAttachableNode:i}=t[r-1];if(i){if(i.trailingComment)throw new Error(`Unexpected multiple trailing comment at ${Xe(e.position.start)}`);return Ze(e,i),void(i.trailingComment=e)}for(let i=r;i>=n.position.start.line;i--){let n,{trailingNode:s}=t[i-1];if(s)n=s;else{if(i===r||!t[i-1].comment)continue;n=t[i-1].comment._parent}if(("sequence"===n.type||"mapping"===n.type)&&(n=n.children[0]),"mappingItem"===n.type){let[e,t]=n.children;n=rt(e)?e:t}for(;;){if(nt(n,e))return Ze(e,n),void n.endComments.push(e);if(!n._parent)break;n=n._parent}break}for(let i=r+1;i<=n.position.end.line;i++){let{leadingAttachableNode:n}=t[i-1];if(n)return Ze(e,n),void n.leadingComments.push(e)}let s=n.children[1];Ze(e,s),s.endComments.push(e)}(e,t,n[0])}))}function tt(e,t){if(t.position.start.offset!==t.position.end.offset){if("leadingComments"in t){let{start:n}=t.position,{leadingAttachableNode:r}=e[n.line-1];(!r||n.column<r.position.start.column)&&(e[n.line-1].leadingAttachableNode=t)}if("trailingComment"in t&&t.position.end.column>1&&"document"!==t.type&&"documentHead"!==t.type){let{end:n}=t.position,{trailingAttachableNode:r}=e[n.line-1];(!r||n.column>=r.position.end.column)&&(e[n.line-1].trailingAttachableNode=t)}if("root"!==t.type&&"document"!==t.type&&"documentHead"!==t.type&&"documentBody"!==t.type){let{start:n,end:r}=t.position,i=[r.line].concat(n.line===r.line?[]:n.line);for(let n of i){let i=e[n-1].trailingNode;(!i||r.column>=i.position.end.column)&&(e[n-1].trailingNode=t)}}"children"in t&&t.children.forEach((t=>{tt(e,t)}))}}function nt(e,t){if(e.position.start.offset<t.position.start.offset&&e.position.end.offset>t.position.end.offset)switch(e.type){case"flowMapping":case"flowSequence":return 0===e.children.length||t.position.start.line>e.children[e.children.length-1].position.end.line}if(t.position.end.offset<e.position.end.offset)return!1;switch(e.type){case"sequenceItem":return t.position.start.column>e.position.start.column;case"mappingKey":case"mappingValue":return t.position.start.column>e._parent.position.start.column&&(0===e.children.length||1===e.children.length&&"blockFolded"!==e.children[0].type&&"blockLiteral"!==e.children[0].type)&&("mappingValue"===e.type||rt(e));default:return!1}}function rt(e){return e.position.start!==e.position.end&&(0===e.children.length||e.position.start.offset!==e.children[0].position.start.offset)}function it(e,t){return{type:e,position:t}}function st(e){switch(e.type){case"DOCUMENT":for(let t=e.contents.length-1;t>=0;t--)"BLANK_LINE"===e.contents[t].type?e.contents.splice(t,1):st(e.contents[t]);for(let t=e.directives.length-1;t>=0;t--)"BLANK_LINE"===e.directives[t].type&&e.directives.splice(t,1);break;case"FLOW_MAP":case"FLOW_SEQ":case"MAP":case"SEQ":for(let t=e.items.length-1;t>=0;t--){let n=e.items[t];"char"in n||("BLANK_LINE"===n.type?e.items.splice(t,1):st(n))}break;case"MAP_KEY":case"MAP_VALUE":case"SEQ_ITEM":e.node&&st(e.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(e.type)}`)}}function ot(e=null){return{trailingComment:e}}function at(){return{leadingComments:[],...ot()}}function lt(e,t){let n=e.cstNode;return function(e,t,n){return{...it("alias",e),...at(),...t,value:n}}(t.transformRange({origStart:n.valueRange.origStart-1,origEnd:n.valueRange.origEnd}),t.transformContent(e),n.rawValue)}function ct(e,t){return{...it("anchor",e),value:t}}function ut(e,t){return{...it("comment",e),value:t}}function ft(e,t){return{...it("tag",e),value:t}}function pt(e,t,n=(()=>!1)){let r=e.cstNode,i=[],s=null,o=null,a=null;for(let l of r.props){let c=t.text[l.origStart];switch(c){case Je.Tag:s=s||l,o=ft(t.transformRange(l),e.tag);break;case Je.Anchor:s=s||l,a=ct(t.transformRange(l),r.anchor);break;case Je.Comment:{let e=ut(t.transformRange(l),t.text.slice(l.origStart+1,l.origEnd));t.comments.push(e),!n(e)&&s&&s.origEnd<=l.origStart&&l.origEnd<=r.valueRange.origStart&&i.push(e);break}default:throw new Error(`Unexpected leading character ${JSON.stringify(c)}`)}}return function(e,t,n){return{anchor:t,tag:e,middleComments:n}}(o,a,i)}function dt(e,t){let n=e.cstNode,r="CLIP"===n.chomping?0:1,i=n.header.origEnd-n.header.origStart-1-r!=0,s=t.transformRange({origStart:n.header.origStart,origEnd:n.valueRange.origEnd}),o=null,a=pt(e,t,(e=>{if(!(s.start.offset<e.position.start.offset&&e.position.end.offset<s.end.offset))return!1;if(o)throw new Error(`Unexpected multiple indicator comments at ${Xe(e.position.start)}`);return o=e,!0}));return function(e,t,n,r,i,s){return{...it("blockValue",e),leadingComments:[],...t,chomping:n,indent:r,value:i,indicatorComment:s}}(s,a,He[n.chomping],i?n.blockIndent:null,n.strValue,o)}function ht(e,t){for(let n of e.props){let e=t.text[n.origStart];if(e!==Je.Comment)throw new Error(`Unexpected leading character ${JSON.stringify(e)}`);t.comments.push(ut(t.transformRange(n),t.text.slice(n.origStart+1,n.origEnd)))}}function mt(e,t){return ht(e,t),function(e,t,n){return{...it("directive",e),...at(),name:t,parameters:n}}(t.transformRange(e.range),e.name,e.parameters)}function gt(e,t){return{start:e,end:t}}function yt(e){return{start:e,end:e}}function vt(e=[]){return{endComments:e}}function Et(e,t,n){return{...it("documentBody",e),...vt(n),children:t?[t]:[]}}function St(e){return e[e.length-1]}function bt(e,t){let n=e.match(t);return n?n.index:-1}function wt(e,t,n){let r=e.cstNode,{comments:i,endComments:s,documentTrailingComment:o,documentHeadTrailingComment:a}=function(e,t,n){let r=[],i=[],s=[],o=[],a=!1;for(let i=e.contents.length-1;i>=0;i--){let l=e.contents[i];if("COMMENT"===l.type){let i=t.transformNode(l);n&&n.line===i.position.start.line?o.unshift(i):a?r.unshift(i):i.position.start.offset>=e.valueRange.origEnd?s.unshift(i):r.unshift(i)}else a=!0}if(s.length>1)throw new Error(`Unexpected multiple document trailing comments at ${Xe(s[1].position.start)}`);if(o.length>1)throw new Error(`Unexpected multiple documentHead trailing comments at ${Xe(o[1].position.start)}`);return{comments:r,endComments:i,documentTrailingComment:St(s)||null,documentHeadTrailingComment:St(o)||null}}(r,t,n),l=t.transformNode(e.contents),{position:c,documentEndPoint:u}=function(e,t,n){let r=bt(n.text.slice(e.valueRange.origEnd),/^\.\.\./),i=-1===r?e.valueRange.origEnd:Math.max(0,e.valueRange.origEnd-1);"\r"===n.text[i-1]&&i--;let s=n.transformRange({origStart:null!==t?t.position.start.offset:i,origEnd:i}),o=-1===r?s.end:n.transformOffset(e.valueRange.origEnd+3);return{position:s,documentEndPoint:o}}(r,l,t);return t.comments.push(...i,...s),{documentBody:Et(c,l,s),documentEndPoint:u,documentTrailingComment:o,documentHeadTrailingComment:a}}function Ot(e,t){let n=e.cstNode,{directives:r,comments:i,endComments:s}=function(e,t){let n=[],r=[],i=[],s=!1;for(let o=e.directives.length-1;o>=0;o--){let a=t.transformNode(e.directives[o]);"comment"===a.type?s?r.unshift(a):i.unshift(a):(s=!0,n.unshift(a))}return{directives:n,comments:r,endComments:i}}(n,t),{position:o,endMarkerPoint:a}=function(e,t,n){let r=bt(n.text.slice(0,e.valueRange.origStart),/---\s*$/);r>0&&!/[\r\n]/.test(n.text[r-1])&&(r=-1);let i=-1===r?{origStart:e.valueRange.origStart,origEnd:e.valueRange.origStart}:{origStart:r,origEnd:r+3};return 0!==t.length&&(i.origStart=t[0].position.start.offset),{position:n.transformRange(i),endMarkerPoint:-1===r?null:n.transformOffset(r)}}(n,r,t);return t.comments.push(...i,...s),{createDocumentHeadWithTrailingComment:e=>(e&&t.comments.push(e),function(e,t,n,r){return{...it("documentHead",e),...vt(n),...ot(r),children:t}}(o,r,s,e)),documentHeadEndMarkerPoint:a}}function Nt(e,t){let{createDocumentHeadWithTrailingComment:n,documentHeadEndMarkerPoint:r}=Ot(e,t),{documentBody:i,documentEndPoint:s,documentTrailingComment:o,documentHeadTrailingComment:a}=wt(e,t,r),l=n(a);return o&&t.comments.push(o),function(e,t,n,r){return{...it("document",e),...ot(r),children:[t,n]}}(gt(l.position.start,s),l,i,o)}function At(e,t,n){return{...it("flowCollection",e),...at(),...vt(),...t,children:n}}function Lt(e,t,n){return{...it("flowMappingItem",e),leadingComments:[],children:[t,n]}}function Mt(e,t){let n=[];for(let r of e)r&&"type"in r&&"COMMENT"===r.type?t.comments.push(t.transformNode(r)):n.push(r);return n}function Tt(e){let[t,n]=["?",":"].map((t=>{let n=e.find((e=>"char"in e&&e.char===t));return n?{origStart:n.origOffset,origEnd:n.origOffset+1}:null}));return{additionalKeyRange:t,additionalValueRange:n}}function xt(e,t){let n=t;return t=>e.slice(n,n=t)}function kt(e){let t=[],n=xt(e,1),r=!1;for(let i=1;i<e.length-1;i++){let s=e[i];"char"in s&&","===s.char?(t.push(n(i)),n(i+1),r=!1):r=!0}return r&&t.push(n(e.length-1)),t}function Ct(e,t){return{...it("mappingKey",e),...ot(),...vt(),children:t?[t]:[]}}function It(e,t){return{...it("mappingValue",e),...at(),...vt(),children:t?[t]:[]}}function $t(e,t,n,r,i){let s=t.transformNode(e.key),o=t.transformNode(e.value),a=s||r?Ct(t.transformRange({origStart:r?r.origStart:s.position.start.offset,origEnd:s?s.position.end.offset:r.origStart+1}),s):null,l=o||i?It(t.transformRange({origStart:i?i.origStart:o.position.start.offset,origEnd:o?o.position.end.offset:i.origStart+1}),o):null;return n(gt(a?a.position.start:l.position.start,l?l.position.end:a.position.end),a||Ct(yt(l.position.start),null),l||It(yt(a.position.end),null))}function Pt(e,t){let n=Mt(e.cstNode.items,t),r=kt(n),i=e.items.map(((e,n)=>{let i=r[n],{additionalKeyRange:s,additionalValueRange:o}=Tt(i);return $t(e,t,Lt,s,o)})),s=n[0],o=St(n);return function(e,t,n){return{...At(e,t,n),type:"flowMapping"}}(t.transformRange({origStart:s.origOffset,origEnd:o.origOffset+1}),t.transformContent(e),i)}function Rt(e,t){let n=Mt(e.cstNode.items,t),r=kt(n),i=e.items.map(((e,n)=>{if("PAIR"!==e.type){let n=t.transformNode(e);return function(e,t){return{...it("flowSequenceItem",e),children:[t]}}(gt(n.position.start,n.position.end),n)}{let i=r[n],{additionalKeyRange:s,additionalValueRange:o}=Tt(i);return $t(e,t,Lt,s,o)}})),s=n[0],o=St(n);return function(e,t,n){return{...At(e,t,n),type:"flowSequence"}}(t.transformRange({origStart:s.origOffset,origEnd:o.origOffset+1}),t.transformContent(e),i)}function _t(e,t,n){return{...it("mappingItem",e),leadingComments:[],children:[t,n]}}function Yt(e,t){let n=e.cstNode;n.items.filter((e=>"MAP_KEY"===e.type||"MAP_VALUE"===e.type)).forEach((e=>ht(e,t)));let r=function(e){let t=[],n=xt(e,0),r=!1;for(let i=0;i<e.length;i++)"MAP_VALUE"!==e[i].type?(r&&t.push(n(i)),r=!0):(t.push(n(i+1)),r=!1);return r&&t.push(n(1/0)),t}(Mt(n.items,t)),i=e.items.map(((e,n)=>{let i=r[n],[s,o]="MAP_VALUE"===i[0].type?[null,i[0].range]:[i[0].range,1===i.length?null:i[1].range];return $t(e,t,_t,s,o)}));return function(e,t,n){return{...it("mapping",e),leadingComments:[],...t,children:n}}(gt(i[0].position.start,St(i).position.end),t.transformContent(e),i)}function Bt(e,t,n){for(let r=t;r>=0;r--)if(n.test(e[r]))return r;return-1}function Dt(e,t){let n=e.cstNode;return function(e,t,n){return{...it("plain",e),...at(),...t,value:n}}(t.transformRange({origStart:n.valueRange.origStart,origEnd:Bt(t.text,n.valueRange.origEnd-1,/\S/)+1}),t.transformContent(e),n.strValue)}function Ft(e,t){let n=e.cstNode;return function(e,t,n){return{...it("quoteValue",e),...t,...at(),value:n}}(t.transformRange(n.valueRange),t.transformContent(e),n.strValue)}function Wt(e,t){let n=Mt(e.cstNode.items,t).map(((n,r)=>{ht(n,t);let i=t.transformNode(e.items[r]);return function(e,t){return{...it("sequenceItem",e),...at(),...vt(),children:t?[t]:[]}}(gt(t.transformOffset(n.valueRange.origStart),null===i?t.transformOffset(n.valueRange.origStart+1):i.position.end),i)}));return function(e,t,n){return{...it("sequence",e),leadingComments:[],...vt(),...t,children:n}}(gt(n[0].position.start,St(n).position.end),t.transformContent(e),n)}function jt(e,t){if(null===e||void 0===e.type&&null===e.value)return null;switch(e.type){case"ALIAS":return lt(e,t);case"BLOCK_FOLDED":return function(e,t){return function(e){return{...e,type:"blockFolded"}}(dt(e,t))}(e,t);case"BLOCK_LITERAL":return function(e,t){return function(e){return{...e,type:"blockLiteral"}}(dt(e,t))}(e,t);case"COMMENT":return function(e,t){return ut(t.transformRange(e.range),e.comment)}(e,t);case"DIRECTIVE":return mt(e,t);case"DOCUMENT":return Nt(e,t);case"FLOW_MAP":return Pt(e,t);case"FLOW_SEQ":return Rt(e,t);case"MAP":return Yt(e,t);case"PLAIN":return Dt(e,t);case"QUOTE_DOUBLE":return function(e,t){return function(e){return{...e,type:"quoteDouble"}}(Ft(e,t))}(e,t);case"QUOTE_SINGLE":return function(e,t){return function(e){return{...e,type:"quoteSingle"}}(Ft(e,t))}(e,t);case"SEQ":return Wt(e,t);default:throw new Error(`Unexpected node type ${e.type}`)}}function qt(e,t){let n=e.source.range||e.source.valueRange;return function(e,t,n){let r=new SyntaxError(e);return r.name="YAMLSyntaxError",r.source=t,r.position=n,r}(e.message,t.text,t.transformRange(n))}function Ut(e){if(!e.setOrigRanges()){let t=e=>function(e){return"number"==typeof e.start}(e)?(e.origStart=e.start,e.origEnd=e.end,!0):function(e){return"number"==typeof e.offset}(e)?(e.origOffset=e.offset,!0):void 0;e.forEach((e=>Kt(e,t)))}}function Kt(e,t){if(e&&"object"==typeof e&&!0!==t(e))for(let n of Object.keys(e)){if("context"===n||"error"===n)continue;let r=e[n];Array.isArray(r)?r.forEach((e=>Kt(e,t))):Kt(r,t)}}function Vt(e){if("children"in e){if(1===e.children.length){let t=e.children[0];if("plain"===t.type&&null===t.tag&&null===t.anchor&&""===t.value)return e.children.splice(0,1),e}e.children.forEach(Vt)}return e}function Qt(e,t,n,r){let i=t(e);return t=>{r(i,t)&&n(e,i=t)}}function Jt(e){if(null===e||!("children"in e))return;let t=e.children;if(t.forEach(Jt),"document"===e.type){let[t,n]=e.children;t.position.start.offset===t.position.end.offset?t.position.start=t.position.end=n.position.start:n.position.start.offset===n.position.end.offset&&(n.position.start=n.position.end=t.position.end)}let n=Qt(e.position,Ht,Gt,Xt),r=Qt(e.position,zt,Zt,en);"endComments"in e&&0!==e.endComments.length&&(n(e.endComments[0].position.start),r(St(e.endComments).position.end));let i=t.filter((e=>null!==e));if(0!==i.length){let e=i[0],t=St(i);n(e.position.start),r(t.position.end),"leadingComments"in e&&0!==e.leadingComments.length&&n(e.leadingComments[0].position.start),"tag"in e&&e.tag&&n(e.tag.position.start),"anchor"in e&&e.anchor&&n(e.anchor.position.start),"trailingComment"in t&&t.trailingComment&&r(t.trailingComment.position.end)}}function Ht(e){return e.start}function Gt(e,t){e.start=t}function zt(e){return e.end}function Zt(e,t){e.end=t}function Xt(e,t){return t.offset<e.offset}function en(e,t){return t.offset>e.offset}!function(e){e.Tag="!",e.Anchor="&",e.Comment="#"}(Je||(Je={})),function(e){e.CLIP="clip",e.STRIP="strip",e.KEEP="keep"}(He||(He={}));var tn=l(g(),1),nn=l(y(),1);nn.default.findPair,nn.default.toJSON,nn.default.parseMap,nn.default.parseSeq,nn.default.stringifyNumber,nn.default.stringifyString,nn.default.Type,nn.default.YAMLError,nn.default.YAMLReferenceError;var rn=nn.default.YAMLSemanticError;nn.default.YAMLSyntaxError,nn.default.YAMLWarning;var{Document:sn,parseCST:on}=tn.default;function an(e){let t=on(e);Ut(t);let n=t.map((e=>new sn({merge:!1,keepCstNodes:!0}).parse(e))),r=[],i={text:e,locator:new ze(e),comments:r,transformOffset:e=>function(e,t){e<0?e=0:e>t.text.length&&(e=t.text.length);let n=t.locator.locationForIndex(e);return function(e,t,n){return{offset:e,line:t,column:n}}(e,n.line+1,n.column+1)}(e,i),transformRange:e=>function(e,t){return gt(t.transformOffset(e.origStart),t.transformOffset(e.origEnd))}(e,i),transformNode:e=>jt(e,i),transformContent:e=>pt(e,i)};for(let e of n)for(let t of e.errors)if(!(t instanceof rn&&'Map keys must be unique; "<<" is repeated'===t.message))throw qt(t,i);n.forEach((e=>st(e.cstNode)));let s=function(e,t,n){return{...it("root",e),children:t,comments:n}}(i.transformRange({origStart:0,origEnd:i.text.length}),n.map(i.transformNode),r);return et(s),Jt(s),Vt(s),s}var ln=function(e,t){let n=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(n,t)};var cn={astFormat:"yaml",parse:function(e){try{let t=an(e);return delete t.comments,t}catch(e){throw null!=e&&e.position?ln(e.message,{loc:e.position,cause:e}):e}},hasPragma:function(e){return/^\s*#[^\S\n]*@(?:prettier|format)\s*?(?:\n|$)/.test(e)},locStart:de,locEnd:function(e){return e.position.end.offset}},un={yaml:qe},fn=v;exports.default=fn,exports.languages=Ue,exports.options=Ve,exports.parsers=Qe,exports.printers=un;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1710,6 +1710,7 @@ interface GantCustomConfig {
|
|
|
1710
1710
|
microServiceMap?: any;
|
|
1711
1711
|
customHistoryApiFallback?: boolean | connect_history_api_fallback.Options | undefined;
|
|
1712
1712
|
define?: any;
|
|
1713
|
+
provide?: Record<string, string | string[]>;
|
|
1713
1714
|
setting?: CONFIG_TYPE;
|
|
1714
1715
|
vue?: boolean;
|
|
1715
1716
|
compression?: boolean;
|
package/package.json
CHANGED
|
@@ -1,87 +1,83 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gant-core",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.6",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/core/index.js",
|
|
6
6
|
"types": "lib/types/index.d.ts",
|
|
7
7
|
"bin": {
|
|
8
8
|
"gant-cli": "bin/index.js"
|
|
9
9
|
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"build": "cross-env NODE_ENV=production rollup --config rollup.config.js",
|
|
12
|
+
"dev": "cross-env NODE_ENV=development rollup --config rollup.config.js --watch",
|
|
13
|
+
"tag-publish": "npm publish --registry=https://registry.npmjs.org/"
|
|
14
|
+
},
|
|
15
|
+
"author": "vvey",
|
|
16
|
+
"license": "ISC",
|
|
10
17
|
"devDependencies": {
|
|
11
|
-
"
|
|
18
|
+
"chokidar": "^3.6.0",
|
|
19
|
+
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.11",
|
|
12
20
|
"@rollup/plugin-alias": "^5.1.0",
|
|
13
21
|
"@rollup/plugin-commonjs": "^25.0.7",
|
|
14
22
|
"@rollup/plugin-json": "^6.1.0",
|
|
15
23
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
16
24
|
"@rollup/plugin-terser": "^0.4.4",
|
|
17
25
|
"@rollup/plugin-typescript": "^11.1.6",
|
|
18
|
-
"@root/walk": "^1.1.0",
|
|
19
26
|
"@types/ejs": "^3.1.5",
|
|
20
|
-
"@types/html-minifier-terser": "^7.0.2",
|
|
21
27
|
"@types/inquirer": "^9.0.7",
|
|
22
28
|
"@types/lodash-es": "^4.17.12",
|
|
23
29
|
"@types/node": "^20.11.16",
|
|
24
|
-
"@types/tmp": "^0.2.6",
|
|
25
|
-
"cli-progress": "^3.12.0",
|
|
26
|
-
"commander": "^11.1.0",
|
|
27
30
|
"compression-webpack-plugin": "^11.1.0",
|
|
28
|
-
"concurrently": "^9.0.1",
|
|
29
31
|
"cross-env": "^7.0.3",
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"html-webpack-tags-plugin": "^3.0.2",
|
|
34
|
-
"i18next": "^23.10.1",
|
|
35
|
-
"inquirer": "^9.2.14",
|
|
36
|
-
"lodash-es": "^4.17.21",
|
|
37
|
-
"md5-node": "^1.0.1",
|
|
38
|
-
"path": "^0.12.7",
|
|
39
|
-
"picocolors": "^1.0.0",
|
|
32
|
+
"css-minimizer-webpack-plugin": "^6.0.0",
|
|
33
|
+
"html-webpack-plugin": "^5.0.0",
|
|
34
|
+
"mini-css-extract-plugin": "^2.8.1",
|
|
40
35
|
"rollup": "^4.9.6",
|
|
41
36
|
"rollup-plugin-copy": "^3.5.0",
|
|
42
37
|
"rollup-plugin-dts": "^6.1.0",
|
|
43
38
|
"rollup-plugin-typescript2": "^0.36.0",
|
|
44
39
|
"terser-webpack-plugin": "^5.3.10",
|
|
45
|
-
"tmp": "^0.2.3",
|
|
46
40
|
"typescript": "^5.3.3",
|
|
47
|
-
"
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
"build": "cross-env NODE_ENV=production rollup --config rollup.config.js",
|
|
51
|
-
"dev": "cross-env NODE_ENV=development rollup --config rollup.config.js --watch",
|
|
52
|
-
"tag-publish": "npm publish --registry=https://registry.npmjs.org/"
|
|
41
|
+
"webpack": "^5.90.3",
|
|
42
|
+
"webpack-bundle-analyzer": "^4.10.1",
|
|
43
|
+
"webpack-dev-server": "^4.7.4"
|
|
53
44
|
},
|
|
54
|
-
"author": "vvey",
|
|
55
|
-
"license": "ISC",
|
|
56
45
|
"dependencies": {
|
|
57
|
-
"@
|
|
58
|
-
"@
|
|
46
|
+
"@ant-design/colors": "^7.0.2",
|
|
47
|
+
"@babel/core": "^7.26.0",
|
|
48
|
+
"@babel/plugin-transform-modules-commonjs": "^7.26.3",
|
|
49
|
+
"@babel/preset-env": "^7.26.0",
|
|
50
|
+
"@babel/register": "^7.25.9",
|
|
51
|
+
"@root/walk": "^1.1.0",
|
|
59
52
|
"axios": "^1.6.8",
|
|
60
|
-
"
|
|
53
|
+
"cli-progress": "^3.12.0",
|
|
54
|
+
"commander": "^11.1.0",
|
|
61
55
|
"css-loader": "^6.10.0",
|
|
62
|
-
"
|
|
63
|
-
"esbuild": "^0.20.1",
|
|
56
|
+
"ejs": "^3.1.9",
|
|
64
57
|
"file-loader": "^6.2.0",
|
|
58
|
+
"fs": "^0.0.1-security",
|
|
65
59
|
"html-loader": "^5.0.0",
|
|
66
|
-
"
|
|
60
|
+
"i18next": "^23.10.1",
|
|
61
|
+
"inquirer": "^9.2.14",
|
|
67
62
|
"less": "^4.2.0",
|
|
68
63
|
"less-loader": "^12.2.0",
|
|
69
64
|
"loader-utils": "^3.2.1",
|
|
70
|
-
"
|
|
65
|
+
"lodash-es": "^4.17.21",
|
|
66
|
+
"md5-node": "^1.0.1",
|
|
71
67
|
"mitt": "^3.0.1",
|
|
68
|
+
"path": "^0.12.7",
|
|
69
|
+
"picocolors": "^1.0.0",
|
|
72
70
|
"postcss": "^8.4.35",
|
|
73
71
|
"postcss-loader": "^8.1.1",
|
|
74
72
|
"postcss-preset-env": "^9.5.1",
|
|
75
73
|
"postcss-short": "^5.0.0",
|
|
76
74
|
"prettier": "^3.2.5",
|
|
77
75
|
"process": "^0.11.10",
|
|
78
|
-
"react-refresh": "^0.14.0",
|
|
79
76
|
"style-loader": "^3.3.4",
|
|
80
77
|
"swc-loader": "^0.2.6",
|
|
78
|
+
"ts-node": "^10.9.2",
|
|
79
|
+
"url": "^0.11.3",
|
|
81
80
|
"url-loader": "^4.1.1",
|
|
82
|
-
"vue-loader": "^17.4.2"
|
|
83
|
-
"webpack": "^5.90.3",
|
|
84
|
-
"webpack-bundle-analyzer": "^4.10.1",
|
|
85
|
-
"webpack-dev-server": "^4.7.4"
|
|
81
|
+
"vue-loader": "^17.4.2"
|
|
86
82
|
}
|
|
87
83
|
}
|
package/rollup.config.js
CHANGED
|
@@ -42,8 +42,6 @@ module.exports = [
|
|
|
42
42
|
},
|
|
43
43
|
},
|
|
44
44
|
external: [
|
|
45
|
-
'prettier',
|
|
46
|
-
'esbuild',
|
|
47
45
|
'webpack',
|
|
48
46
|
'webpack-dev-server',
|
|
49
47
|
'html-webpack-plugin',
|
|
@@ -51,8 +49,9 @@ module.exports = [
|
|
|
51
49
|
'mini-css-extract-plugin',
|
|
52
50
|
'webpack-bundle-analyzer',
|
|
53
51
|
'terser-webpack-plugin',
|
|
52
|
+
'@pmmmwh/react-refresh-webpack-plugin',
|
|
53
|
+
'compression-webpack-plugin',
|
|
54
54
|
'chokidar',
|
|
55
|
-
'concurrently',
|
|
56
55
|
],
|
|
57
56
|
plugins: [
|
|
58
57
|
...plugins,
|