@jixo/cli 0.21.0 → 0.21.2
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/bundle/acorn-BoNAepQd.js +15 -0
- package/bundle/angular-pDmFHCFc.js +2 -0
- package/bundle/babel-CxK7_76E.js +15 -0
- package/bundle/estree-CfdzwKX-.js +36 -0
- package/bundle/flow-CGeR1fbg.js +19 -0
- package/bundle/glimmer-CX3iu1jj.js +29 -0
- package/bundle/graphql-C32NbEjQ.js +29 -0
- package/bundle/html-BYSSlHHY.js +23 -0
- package/bundle/index.js +327 -4649
- package/bundle/markdown-DiTmrgL1.js +63 -0
- package/bundle/meriyah-DM8jkzWU.js +4 -0
- package/bundle/postcss-Au71UEeZ.js +54 -0
- package/bundle/typescript-Dn4uCwAY.js +20 -0
- package/bundle/yaml-D6G3z4bP.js +160 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +13 -17
- package/dist/cli.js.map +1 -1
- package/package.json +2 -1
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=e=>{throw TypeError(e)},s=(e,n,r)=>n in e?t(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r,c=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),l=(e,n)=>{for(var r in n)t(e,r,{get:n[r],enumerable:!0})},u=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(let c of r(i))!a.call(e,c)&&c!==o&&t(e,c,{get:()=>i[c],enumerable:!(s=n(i,c))||s.enumerable});return e},d=(n,r,a)=>(a=n==null?{}:e(i(n)),u(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),f=(e,t,n)=>s(e,typeof t==`symbol`?t:t+``,n),p=(e,t,n)=>t.has(e)||o(`Cannot `+n),m=(e,t,n)=>(p(e,t,`read from private field`),n?n.call(e):t.get(e)),h=(e,t,n)=>t.has(e)?o(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),g=(e,t,n,r)=>(p(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),_=(e,t,n)=>(p(e,t,`access private method`),n),v=c(e=>{"use strict";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`},r=`tag:yaml.org,2002:`,i={MAP:`tag:yaml.org,2002:map`,SEQ:`tag:yaml.org,2002:seq`,STR:`tag:yaml.org,2002:str`};function a(e){let t=[0],n=e.indexOf(`
|
|
2
|
+
`);for(;n!==-1;)n+=1,t.push(n),n=e.indexOf(`
|
|
3
|
+
`,n);return t}function o(e){let t,n;return typeof e==`string`?(t=a(e),n=e):(Array.isArray(e)&&(e=e[0]),e&&e.context&&(e.lineStarts||=a(e.context.src),t=e.lineStarts,n=e.context.src)),{lineStarts:t,src:n}}function s(e,t){if(typeof e!=`number`||e<0)return null;let{lineStarts:n,src:r}=o(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 i=n.length;return{line:i,col:e-n[i-1]+1}}function c(e,t){let{lineStarts:n,src:r}=o(t);if(!n||!(e>=1)||e>n.length)return null;let i=n[e-1],a=n[e];for(;a&&a>i&&r[a-1]===`
|
|
4
|
+
`;)--a;return r.slice(i,a)}function l({start:e,end:t},n,r=80){let i=c(e.line,n);if(!i)return null;let{col:a}=e;if(i.length>r)if(a<=r-10)i=i.substr(0,r-1)+`…`;else{let e=Math.round(r/2);i.length>a+e&&(i=i.substr(0,a+e-1)+`…`),a-=i.length-r,i=`…`+i.substr(1-r)}let o=1,s=``;t&&(t.line===e.line&&a+(t.col-e.col)<=r+1?o=t.col-e.col:(o=Math.min(i.length+1,r)-a,s=`…`));let l=a>1?` `.repeat(a-1):``,u=`^`.repeat(o);return`${i}
|
|
5
|
+
${l}${u}${s}`}var u=class e{static copy(t){return new e(t.start,t.end)}constructor(e,t){this.start=e,this.end=t||e}isEmpty(){return typeof this.start!=`number`||!this.end||this.end<=this.start}setOrigRange(e,t){let{start:n,end:r}=this;if(e.length===0||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 a=i;for(;i<e.length&&!(e[i]>=r);)++i;return this.origEnd=r+i,a}},d=class e{static addStringTerminator(t,n,r){if(r[r.length-1]===`
|
|
6
|
+
`)return r;let i=e.endOfWhiteSpace(t,n);return i>=t.length||t[i]===`
|
|
7
|
+
`?r+`
|
|
8
|
+
`:r}static atDocumentBoundary(e,n,r){let i=e[n];if(!i)return!0;let a=e[n-1];if(a&&a!==`
|
|
9
|
+
`)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],s=e[n+2];if(o!==i||s!==i)return!1;let c=e[n+3];return!c||c===`
|
|
10
|
+
`||c===` `||c===` `}static endOfIdentifier(e,t){let n=e[t],r=n===`<`,i=r?[`
|
|
11
|
+
`,` `,` `,`>`]:[`
|
|
12
|
+
`,` `,` `,`[`,`]`,`{`,`}`,`,`];for(;n&&i.indexOf(n)===-1;)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!==`
|
|
13
|
+
`;)n=e[t+=1];return t}static endOfWhiteSpace(e,t){let n=e[t];for(;n===` `||n===` `;)n=e[t+=1];return t}static startOfLine(e,t){let n=e[t-1];if(n===`
|
|
14
|
+
`)return t;for(;n&&n!==`
|
|
15
|
+
`;)n=e[--t];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||r===`
|
|
16
|
+
`)return n}return null}static atBlank(e,t,n){let r=e[t];return r===`
|
|
17
|
+
`||r===` `||r===` `||n&&!r}static nextNodeIsIndented(e,t,n){return!e||t<0?!1:t>0?!0:n&&e===`-`}static normalizeOffset(t,n){let r=t[n];return r?r!==`
|
|
18
|
+
`&&t[n-1]===`
|
|
19
|
+
`?n-1:e.endOfWhiteSpace(t,n):n}static foldNewline(t,n,r){let i=0,a=!1,o=``,s=t[n+1];for(;s===` `||s===` `||s===`
|
|
20
|
+
`;){switch(s){case`
|
|
21
|
+
`:i=0,n+=1,o+=`
|
|
22
|
+
`;break;case` `:i<=r&&(a=!0),n=e.endOfWhiteSpace(t,n+2)-1;break;case` `:i+=1,n+=1;break}s=t[n+1]}return o||=` `,s&&i<=r&&(a=!0),{fold:o,offset:n,error:a}}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(n!=null)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);r!=null&&e.push(r)}return e.length>0?e.join(`
|
|
23
|
+
`):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[n.FLOW_MAP,n.FLOW_SEQ,n.QUOTE_DOUBLE,n.QUOTE_SINGLE].indexOf(this.type)!==-1}get rangeAsLinePos(){if(!this.range||!this.context)return;let e=s(this.range.start,this.context.root);if(!e)return;let t=s(this.range.end,this.context.root);return{start:e,end:t}}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(n!=null){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[r]===`
|
|
24
|
+
`)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 u(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(r!=null)return r;let i=t.slice(n.start,n.end);return e.addStringTerminator(t,n.end,i)}},f=class extends Error{constructor(e,t,n){if(!n||!(t instanceof d))throw 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(typeof this.offset==`number`){this.range=new u(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&&l(this.linePos,e);r&&(this.message+=`:
|
|
25
|
+
|
|
26
|
+
${r}
|
|
27
|
+
`)}delete this.source}},p=class extends f{constructor(e,t){super(`YAMLReferenceError`,e,t)}},m=class extends f{constructor(e,t){super(`YAMLSemanticError`,e,t)}},h=class extends f{constructor(e,t){super(`YAMLSyntaxError`,e,t)}},g=class extends f{constructor(e,t){super(`YAMLWarning`,e,t)}};function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var v=class e extends d{static endOfLine(e,t,n){let r=e[t],i=t;for(;r&&r!==`
|
|
28
|
+
`&&!(n&&(r===`[`||r===`]`||r===`{`||r===`}`||r===`,`));){let t=e[i+1];if(r===`:`&&(!t||t===`
|
|
29
|
+
`||t===` `||t===` `||n&&t===`,`)||(r===` `||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&&(r===`
|
|
30
|
+
`||r===` `||r===` `);)r=n[--t-1];let i=``;for(let r=e;r<t;++r){let e=n[r];if(e===`
|
|
31
|
+
`){let{fold:e,offset:t}=d.foldNewline(n,r,-1);i+=e,r=t}else if(e===` `||e===` `){let a=r,o=n[r+1];for(;r<t&&(o===` `||o===` `);)r+=1,o=n[r+1];o!==`
|
|
32
|
+
`&&(i+=r>a?n.slice(a,r+1):e)}else i+=e}let a=n[e];switch(a){case` `:{let e=`Plain value cannot start with a tab character`;return{errors:[new m(this,e)],str:i}}case`@`:case"`":{let e=`Plain value cannot start with reserved character ${a}`;return{errors:[new m(this,e)],str:i}}default:return i}}parseBlockValue(t){let{indent:n,inFlow:r,src:i}=this.context,a=t,o=t;for(let t=i[a];t===`
|
|
33
|
+
`&&!d.atDocumentBoundary(i,a+1);t=i[a]){let t=d.endOfBlockIndent(i,n,a+1);if(t===null||i[t]===`#`)break;i[t]===`
|
|
34
|
+
`?a=t:(o=e.endOfLine(i,t,r),a=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,a=n,o=i[a];return o&&o!==`#`&&o!==`
|
|
35
|
+
`&&(a=e.endOfLine(i,n,r)),this.valueRange=new u(n,a),a=d.endOfWhiteSpace(i,a),a=this.parseComment(a),(!this.hasComment||this.valueRange.isEmpty())&&(a=this.parseBlockValue(a)),a}};e.Char=t,e.Node=d,e.PlainValue=v,e.Range=u,e.Type=n,e.YAMLError=f,e.YAMLReferenceError=p,e.YAMLSemanticError=m,e.YAMLSyntaxError=h,e.YAMLWarning=g,e._defineProperty=_,e.defaultTagPrefix=r,e.defaultTags=i}),y=c(e=>{"use strict";var t=v(),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:a}=e,{atLineStart:o,lineStart:s}=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 c=o?r-s:e.indent,l=t.Node.endOfWhiteSpace(a,r+1),u=a[l],d=u===`#`,f=[],p=null;for(;u===`
|
|
36
|
+
`||u===`#`;){if(u===`#`){let e=t.Node.endOfLine(a,l+1);f.push(new t.Range(l,e)),l=e}else{o=!0,s=l+1;let e=t.Node.endOfWhiteSpace(a,s);a[e]===`
|
|
37
|
+
`&&f.length===0&&(p=new n,s=p.parse({src:a},s)),l=t.Node.endOfIndent(a,s)}u=a[l]}if(t.Node.nextNodeIsIndented(u,l-(s+c),this.type!==t.Type.SEQ_ITEM)?this.node=i({atLineStart:o,inCollection:!1,indent:c,lineStart:s,parent:this},l):u&&s>r+1&&(l=s-1),this.node){if(p){let t=e.parent.items||e.parent.contents;t&&t.push(p)}f.length&&Array.prototype.push.apply(this.props,f),l=this.node.range.end}else if(d){let e=f[0];this.props.push(e),l=e.end}else l=t.Node.endOfLine(a,r+1);let m=this.node?this.node.valueRange.end:l;return this.valueRange=new t.Range(r,m),l}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(i!=null)return i;let a=n?e.slice(r.start,n.range.start)+String(n):e.slice(r.start,r.end);return t.Node.addStringTerminator(e,r.end,a)}},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 a(e){let n=e;for(;n instanceof r;)n=n.node;if(!(n instanceof o))return null;let i=n.items.length,a=-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;a=e}else if(r.type===t.Type.BLANK_LINE)a=e;else break}if(a===-1)return null;let s=n.items.splice(a,i-a),c=s[0].range.start;for(;n.range.end=c,n.valueRange&&n.valueRange.end>c&&(n.valueRange.end=c),n!==e;)n=n.context.parent;return s}var o=class e extends t.Node{static nextContentHasIndent(n,r,i){let a=t.Node.endOfLine(n,r)+1;r=t.Node.endOfWhiteSpace(n,a);let o=n[r];return o?r>=a+i?!0:o!==`#`&&o!==`
|
|
38
|
+
`?!1:e.nextContentHasIndent(n,r,i):!1}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=a(e);n&&Array.prototype.push.apply(this.items,n)}get includesTrailingLines(){return this.items.length>0}parse(r,o){this.context=r;let{parseNode:s,src:c}=r,l=t.Node.startOfLine(c,o),u=this.items[0];u.context.parent=this,this.valueRange=t.Range.copy(u.valueRange);let d=u.range.start-u.context.lineStart,f=o;f=t.Node.normalizeOffset(c,f);let p=c[f],m=t.Node.endOfWhiteSpace(c,l)===f,h=!1;for(;p;){for(;p===`
|
|
39
|
+
`||p===`#`;){if(m&&p===`
|
|
40
|
+
`&&!h){let e=new n;if(f=e.parse({src:c},f),this.valueRange.end=f,f>=c.length){p=null;break}this.items.push(e),--f}else if(p===`#`){if(f<l+d&&!e.nextContentHasIndent(c,f,d))return f;let t=new i;if(f=t.parse({indent:d,lineStart:l,src:c},f),this.items.push(t),this.valueRange.end=f,f>=c.length){p=null;break}}if(l=f+1,f=t.Node.endOfIndent(c,l),t.Node.atBlank(c,f)){let e=t.Node.endOfWhiteSpace(c,f),n=c[e];(!n||n===`
|
|
41
|
+
`||n===`#`)&&(f=e)}p=c[f],m=!0}if(!p)break;if(f!==l+d&&(m||p!==`:`)){if(f<l+d){l>o&&(f=l);break}else 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(p!==`-`){l>o&&(f=l);break}}else if(p===`-`&&!this.error){let e=c[f+1];if(!e||e===`
|
|
42
|
+
`||e===` `||e===` `){let e=`A collection cannot be both a mapping and a sequence`;this.error=new t.YAMLSyntaxError(this,e)}}let r=s({atLineStart:m,inCollection:!0,indent:d,lineStart:l,parent:this},f);if(!r)return f;if(this.items.push(r),this.valueRange.end=r.valueRange.end,f=t.Node.normalizeOffset(c,r.range.end),p=c[f],m=!1,h=r.includesTrailingLines,p){let e=f-1,t=c[e];for(;t===` `||t===` `;)t=c[--e];t===`
|
|
43
|
+
`&&(l=e+1,m=!0)}let g=a(r);g&&Array.prototype.push.apply(this.items,g)}return f}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(i!=null)return i;let a=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)a+=` `;a+=String(t)}return t.Node.addStringTerminator(e,r.end,a)}},s=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&&r!==`
|
|
44
|
+
`&&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&&i!==`
|
|
45
|
+
`&&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}},c=class e extends t.Node{static startCommentOrEndBlankLine(e,n){let r=t.Node.endOfWhiteSpace(e,n),i=e[r];return i===`#`||i===`
|
|
46
|
+
`?r:n}constructor(){super(t.Type.DOCUMENT),this.directives=null,this.contents=null,this.directivesEndMarker=null,this.documentEndMarker=null}parseDirectives(r){let{src:a}=this.context;this.directives=[];let o=!0,c=!1,l=r;for(;!t.Node.atDocumentBoundary(a,l,t.Char.DIRECTIVES_END);)switch(l=e.startCommentOrEndBlankLine(a,l),a[l]){case`
|
|
47
|
+
`:if(o){let e=new n;l=e.parse({src:a},l),l<a.length&&this.directives.push(e)}else l+=1,o=!0;break;case`#`:{let e=new i;l=e.parse({src:a},l),this.directives.push(e),o=!1}break;case`%`:{let e=new s;l=e.parse({parent:this,src:a},l),this.directives.push(e),c=!0,o=!1}break;default:return c?this.error=new t.YAMLSemanticError(this,`Missing directives-end indicator line`):this.directives.length>0&&(this.contents=this.directives,this.directives=[]),l}return a[l]?(this.directivesEndMarker=new t.Range(l,l+3),l+3):(c?this.error=new t.YAMLSemanticError(this,`Missing directives-end indicator line`):this.directives.length>0&&(this.contents=this.directives,this.directives=[]),l)}parseContents(r){let{parseNode:o,src:s}=this.context;this.contents||=[];let c=r;for(;s[c-1]===`-`;)--c;let l=t.Node.endOfWhiteSpace(s,r),u=c===r;for(this.valueRange=new t.Range(l);!t.Node.atDocumentBoundary(s,l,t.Char.DOCUMENT_END);){switch(s[l]){case`
|
|
48
|
+
`:if(u){let e=new n;l=e.parse({src:s},l),l<s.length&&this.contents.push(e)}else l+=1,u=!0;c=l;break;case`#`:{let e=new i;l=e.parse({src:s},l),this.contents.push(e),u=!1}break;default:{let e=t.Node.endOfIndent(s,l),n=o({atLineStart:u,indent:-1,inFlow:!1,inCollection:!1,lineStart:c,parent:this},e);if(!n)return this.valueRange.end=e;this.contents.push(n),l=n.range.end,u=!1;let r=a(n);r&&Array.prototype.push.apply(this.contents,r)}}l=e.startCommentOrEndBlankLine(s,l)}if(this.valueRange.end=l,s[l]&&(this.documentEndMarker=new t.Range(l,l+3),l+=3,s[l])){if(l=t.Node.endOfWhiteSpace(s,l),s[l]===`#`){let e=new i;l=e.parse({src:s},l),this.contents.push(e)}switch(s[l]){case`
|
|
49
|
+
`:l+=1;break;case void 0:break;default:this.error=new t.YAMLSyntaxError(this,`Document end marker line cannot have a non-comment suffix`)}}return l}parse(e,t){e.root=this,this.context=e;let{src:n}=e,r=n.charCodeAt(t)===65279?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(r!=null)return r;let i=n.join(``);return e.length>0&&((n.length>0||e[0].type===t.Type.COMMENT)&&(i+=`---
|
|
50
|
+
`),i+=e.join(``)),i[i.length-1]!==`
|
|
51
|
+
`&&(i+=`
|
|
52
|
+
`),i}},l=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}},u={CLIP:`CLIP`,KEEP:`KEEP`,STRIP:`STRIP`},d=class extends t.Node{constructor(e,t){super(e,t),this.blockIndent=null,this.chomping=u.CLIP,this.header=null}get includesTrailingLines(){return this.chomping===u.KEEP}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 a=null,o=i[n-1];for(;o===`
|
|
53
|
+
`||o===` `||o===` `;){if(--n,n<=e){if(this.chomping===u.KEEP)break;return``}o===`
|
|
54
|
+
`&&(a=n),o=i[n-1]}let s=n+1;a&&(this.chomping===u.KEEP?(s=a,n=this.valueRange.end):n=a);let c=r+this.blockIndent,l=this.type===t.Type.BLOCK_FOLDED,d=!0,f=``,p=``,m=!1;for(let r=e;r<n;++r){for(let e=0;e<c&&i[r]===` `;++e)r+=1;let e=i[r];if(e===`
|
|
55
|
+
`)p===`
|
|
56
|
+
`?f+=`
|
|
57
|
+
`:p=`
|
|
58
|
+
`;else{let a=t.Node.endOfLine(i,r),o=i.slice(r,a);r=a,l&&(e===` `||e===` `)&&r<s?(p===` `?p=`
|
|
59
|
+
`:!m&&!d&&p===`
|
|
60
|
+
`&&(p=`
|
|
61
|
+
|
|
62
|
+
`),f+=p+o,p=a<n&&i[a]||``,m=!0):(f+=p+o,p=l&&r<s?` `:`
|
|
63
|
+
`,m=!1),d&&o!==``&&(d=!1)}}return this.chomping===u.STRIP?f:f+`
|
|
64
|
+
`}parseBlockHeader(e){let{src:n}=this.context,r=e+1,i=``;for(;;){let a=n[r];switch(a){case`-`:this.chomping=u.STRIP;break;case`+`:this.chomping=u.KEEP;break;case`0`:case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:i+=a;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,a=e,o=e,s=1;for(let e=r[a];e===`
|
|
65
|
+
`&&(a+=1,!t.Node.atDocumentBoundary(r,a));e=r[a]){let e=t.Node.endOfBlockIndent(r,n,a);if(e===null)break;let c=r[e],l=e-(a+n);if(this.blockIndent){if(c&&c!==`
|
|
66
|
+
`&&l<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(r[e]!==`
|
|
67
|
+
`){if(l<s){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=l}else l>s&&(s=l);a=r[e]===`
|
|
68
|
+
`?e:o=t.Node.endOfLine(r,e)}return this.chomping!==u.KEEP&&(a=r[o]?o+1:o),this.valueRange=new t.Range(e+1,a),a}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}},f=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:a,src:o}=e,{indent:s,lineStart:c}=e,l=o[r];this.items=[{char:l,offset:r}];let u=t.Node.endOfWhiteSpace(o,r+1);for(l=o[u];l&&l!==`]`&&l!==`}`;){switch(l){case`
|
|
69
|
+
`:{c=u+1;let e=t.Node.endOfWhiteSpace(o,c);if(o[e]===`
|
|
70
|
+
`){let e=new n;c=e.parse({src:o},c),this.items.push(e)}if(u=t.Node.endOfIndent(o,c),u<=c+s&&(l=o[u],u<c+s||l!==`]`&&l!==`}`)){let e=`Insufficient indentation in flow collection`;this.error=new t.YAMLSemanticError(this,e)}}break;case`,`:this.items.push({char:l,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(e===`
|
|
71
|
+
`||e===` `||e===` `||e===`,`||l===`:`&&this.prevNodeIsJsonLike()){this.items.push({char:l,offset:u}),u+=1;break}}default:{let e=a({atLineStart:!1,inCollection:!1,inFlow:!0,indent:-1,lineStart:c,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),l=o[u]}return this.valueRange=new t.Range(r,u+1),l&&(this.items.push({char:l,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(e.length===0)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(i!=null)return i;let a=n.filter(e=>e instanceof t.Node),o=``,s=r.start;return a.forEach(t=>{let n=e.slice(s,t.range.start);s=t.range.end,o+=n+String(t),o[o.length-1]===`
|
|
72
|
+
`&&e[s-1]!==`
|
|
73
|
+
`&&e[s]===`
|
|
74
|
+
`&&(s+=1)}),o+=e.slice(s,r.end),t.Node.addStringTerminator(e,r.end,o)}},p=class e extends t.Node{static endOfQuote(e,t){let n=e[t];for(;n&&n!==`"`;)t+=n===`\\`?2:1,n=e[t];return t+1}get strValue(){if(!this.valueRange||!this.context)return null;let e=[],{start:n,end:r}=this.valueRange,{indent:i,src:a}=this.context;a[r-1]!==`"`&&e.push(new t.YAMLSyntaxError(this,`Missing closing "quote`));let o=``;for(let s=n+1;s<r-1;++s){let n=a[s];if(n===`
|
|
75
|
+
`){t.Node.atDocumentBoundary(a,s+1)&&e.push(new t.YAMLSemanticError(this,`Document boundary indicators are not allowed within string values`));let{fold:n,offset:r,error:c}=t.Node.foldNewline(a,s,i);o+=n,s=r,c&&e.push(new t.YAMLSemanticError(this,`Multi-line double-quoted string needs to be sufficiently indented`))}else if(n===`\\`)switch(s+=1,a[s]){case`0`:o+=`\0`;break;case`a`:o+=`\x07`;break;case`b`:o+=`\b`;break;case`e`:o+=`\x1B`;break;case`f`:o+=`\f`;break;case`n`:o+=`
|
|
76
|
+
`;break;case`r`:o+=`\r`;break;case`t`:o+=` `;break;case`v`:o+=`\v`;break;case`N`:o+=`
`;break;case`_`:o+=`\xA0`;break;case`L`:o+=`\u2028`;break;case`P`:o+=`\u2029`;break;case` `:o+=` `;break;case`"`:o+=`"`;break;case`/`:o+=`/`;break;case`\\`:o+=`\\`;break;case` `:o+=` `;break;case`x`:o+=this.parseCharCode(s+1,2,e),s+=2;break;case`u`:o+=this.parseCharCode(s+1,4,e),s+=4;break;case`U`:o+=this.parseCharCode(s+1,8,e),s+=8;break;case`
|
|
77
|
+
`:for(;a[s+1]===` `||a[s+1]===` `;)s+=1;break;default:e.push(new t.YAMLSyntaxError(this,`Invalid escape sequence ${a.substr(s-1,2)}`)),o+=`\\`+a[s]}else if(n===` `||n===` `){let e=s,t=a[s+1];for(;t===` `||t===` `;)s+=1,t=a[s+1];t!==`
|
|
78
|
+
`&&(o+=s>e?a.slice(e,s+1):n)}else o+=n}return e.length>0?{errors:e,str:o}:o}parseCharCode(e,n,r){let{src:i}=this.context,a=i.substr(e,n),o=a.length===n&&/^[0-9a-fA-F]+$/.test(a)?parseInt(a,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,a=e.endOfQuote(i,r+1);return this.valueRange=new t.Range(r,a),a=t.Node.endOfWhiteSpace(i,a),a=this.parseComment(a),a}},m=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:a}=this.context;a[r-1]!==`'`&&e.push(new t.YAMLSyntaxError(this,`Missing closing 'quote`));let o=``;for(let s=n+1;s<r-1;++s){let n=a[s];if(n===`
|
|
79
|
+
`){t.Node.atDocumentBoundary(a,s+1)&&e.push(new t.YAMLSemanticError(this,`Document boundary indicators are not allowed within string values`));let{fold:n,offset:r,error:c}=t.Node.foldNewline(a,s,i);o+=n,s=r,c&&e.push(new t.YAMLSemanticError(this,`Multi-line single-quoted string needs to be sufficiently indented`))}else if(n===`'`)o+=n,s+=1,a[s]!==`'`&&e.push(new t.YAMLSyntaxError(this,`Unescaped single quote? This should not happen.`));else if(n===` `||n===` `){let e=s,t=a[s+1];for(;t===` `||t===` `;)s+=1,t=a[s+1];t!==`
|
|
80
|
+
`&&(o+=s>e?a.slice(e,s+1):n)}else o+=n}return e.length>0?{errors:e,str:o}:o}parse(n,r){this.context=n;let{src:i}=n,a=e.endOfQuote(i,r+1);return this.valueRange=new t.Range(r,a),a=t.Node.endOfWhiteSpace(i,a),a=this.parseComment(a),a}};function h(e,n){switch(e){case t.Type.ALIAS:return new l(e,n);case t.Type.BLOCK_FOLDED:case t.Type.BLOCK_LITERAL:return new d(e,n);case t.Type.FLOW_MAP:case t.Type.FLOW_SEQ:return new f(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 p(e,n);case t.Type.QUOTE_SINGLE:return new m(e,n);default:return null}}var g=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:r,inCollection:i,inFlow:a,indent:s,lineStart:c,parent:l}={}){t._defineProperty(this,`parseNode`,(n,r)=>{if(t.Node.atDocumentBoundary(this.src,r))return null;let i=new e(this,n),{props:a,type:s,valueStart:c}=i.parseProps(r),l=h(s,a),u=l.parse(i,c);if(l.range=new t.Range(r,u),u<=r&&(l.error=Error(`Node#parse consumed no characters`),l.error.parseEnd=u,l.error.source=l,l.range.end=r+1),i.nodeStartsCollection(l)){!l.error&&!i.atLineStart&&i.parent.type===t.Type.DOCUMENT&&(l.error=new t.YAMLSyntaxError(l,`Block collection must not have preceding content here (e.g. directives-end indicator)`));let n=new o(l);return u=n.parse(new e(i),u),n.range=new t.Range(r,u),n}return l}),this.atLineStart=r??(n.atLineStart||!1),this.inCollection=i??(n.inCollection||!1),this.inFlow=a??(n.inFlow||!1),this.indent=s??n.indent,this.lineStart=c??n.lineStart,this.parent=l??(n.parent||{}),this.root=n.root,this.src=n.src}nodeStartsCollection(e){let{inCollection:n,inFlow:i,src:a}=this;if(n||i)return!1;if(e instanceof r)return!0;let o=e.range.end;return a[o]===`
|
|
81
|
+
`||a[o-1]===`
|
|
82
|
+
`?!1:(o=t.Node.endOfWhiteSpace(a,o),a[o]===`:`)}parseProps(n){let{inFlow:r,parent:i,src:a}=this,o=[],s=!1;n=this.atLineStart?t.Node.endOfIndent(a,n):t.Node.endOfWhiteSpace(a,n);let c=a[n];for(;c===t.Char.ANCHOR||c===t.Char.COMMENT||c===t.Char.TAG||c===`
|
|
83
|
+
`;){if(c===`
|
|
84
|
+
`){let e=n,r;do r=e+1,e=t.Node.endOfIndent(a,r);while(a[e]===`
|
|
85
|
+
`);let o=e-(r+this.indent),c=i.type===t.Type.SEQ_ITEM&&i.context.atLineStart;if(a[e]!==`#`&&!t.Node.nextNodeIsIndented(a[e],o,!c))break;this.atLineStart=!0,this.lineStart=r,s=!1,n=e}else if(c===t.Char.COMMENT){let e=t.Node.endOfLine(a,n+1);o.push(new t.Range(n,e)),n=e}else{let e=t.Node.endOfIdentifier(a,n+1);c===t.Char.TAG&&a[e]===`,`&&/^[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+,\d\d\d\d(-\d\d){0,2}\/\S/.test(a.slice(n+1,e+13))&&(e=t.Node.endOfIdentifier(a,e+5)),o.push(new t.Range(n,e)),s=!0,n=t.Node.endOfWhiteSpace(a,e)}c=a[n]}s&&c===`:`&&t.Node.atBlank(a,n+1,!0)&&--n;let l=e.parseType(a,n,r);return{props:o,type:l,valueStart:n}}};function _(e){let t=[];e.indexOf(`\r`)!==-1&&(e=e.replace(/\r\n?/g,(e,n)=>(e.length>1&&t.push(n),`
|
|
86
|
+
`)));let n=[],r=0;do{let t=new c,i=new g({src:e});r=t.parse(i,r),n.push(t)}while(r<e.length);return n.setOrigRanges=()=>{if(t.length===0)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(`...
|
|
87
|
+
`),n}e.parse=_}),b=c(e=>{"use strict";var t=v();function n(e,t,n){return n?`#${n.replace(/[\s\S]^/gm,`$&${t}#`)}
|
|
88
|
+
${t}${e}`:e}function r(e,t,n){return n?n.indexOf(`
|
|
89
|
+
`)===-1?`${e} #${n}`:`${e}
|
|
90
|
+
`+n.replace(/^/gm,`${t||``}#`):e}var i=class{};function a(e,t,n){if(Array.isArray(e))return e.map((e,t)=>a(e,String(t),n));if(e&&typeof e.toJSON==`function`){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)&&typeof e==`bigint`?Number(e):e}var o=class extends i{constructor(e){super(),this.value=e}toJSON(e,t){return t&&t.keep?this.value:a(this.value,e,t)}toString(){return String(this.value)}};function s(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 c=e=>e==null||typeof e==`object`&&e[Symbol.iterator]().next().done,l=class e extends i{constructor(e){super(),t._defineProperty(this,`items`,[]),this.schema=e}addIn(t,n){if(c(t))this.add(n);else{let[r,...i]=t,a=this.get(r,!0);if(a instanceof e)a.addIn(i,n);else if(a===void 0&&this.schema)this.set(r,s(this.schema,i,n));else throw Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}}deleteIn([t,...n]){if(n.length===0)return this.delete(t);let r=this.get(t,!0);if(r instanceof e)return r.deleteIn(n);throw Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn([t,...n],r){let i=this.get(t,!0);return n.length===0?!r&&i instanceof o?i.value:i:i instanceof e?i.getIn(n,r):void 0}hasAllNullValues(){return this.items.every(e=>{if(!e||e.type!==`PAIR`)return!1;let t=e.value;return t==null||t instanceof o&&t.value==null&&!t.commentBefore&&!t.comment&&!t.tag})}hasIn([t,...n]){if(n.length===0)return this.has(t);let r=this.get(t,!0);return r instanceof e?r.hasIn(n):!1}setIn([t,...n],r){if(n.length===0)this.set(t,r);else{let i=this.get(t,!0);if(i instanceof e)i.setIn(n,r);else if(i===void 0&&this.schema)this.set(t,s(this.schema,n,r));else throw Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}}toJSON(){return null}toString(n,{blockItem:i,flowChars:a,isMap:o,itemIndent:s},c,l){let{indent:u,indentStep:d,stringify:f}=n,p=this.type===t.Type.FLOW_MAP||this.type===t.Type.FLOW_SEQ||n.inFlow;p&&(s+=d);let m=o&&this.hasAllNullValues();n=Object.assign({},n,{allNullValues:m,indent:s,inFlow:p,type:null});let h=!1,g=!1,_=this.items.reduce((e,t,i)=>{let a;t&&(!h&&t.spaceBefore&&e.push({type:`comment`,str:``}),t.commentBefore&&t.commentBefore.match(/^.*$/gm).forEach(t=>{e.push({type:`comment`,str:`#${t}`})}),t.comment&&(a=t.comment),p&&(!h&&t.spaceBefore||t.commentBefore||t.comment||t.key&&(t.key.commentBefore||t.key.comment)||t.value&&(t.value.commentBefore||t.value.comment))&&(g=!0)),h=!1;let o=f(t,n,()=>a=null,()=>h=!0);return p&&!g&&o.includes(`
|
|
91
|
+
`)&&(g=!0),p&&i<this.items.length-1&&(o+=`,`),o=r(o,s,a),h&&(a||p)&&(h=!1),e.push({type:`item`,str:o}),e},[]),v;if(_.length===0)v=a.start+a.end;else if(p){let{start:t,end:n}=a,r=_.map(e=>e.str);if(g||r.reduce((e,t)=>e+t.length+2,2)>e.maxFlowStringSingleLineLength){v=t;for(let e of r)v+=e?`
|
|
92
|
+
${d}${u}${e}`:`
|
|
93
|
+
`;v+=`
|
|
94
|
+
${u}${n}`}else v=`${t} ${r.join(` `)} ${n}`}else{let e=_.map(i);v=e.shift();for(let t of e)v+=t?`
|
|
95
|
+
${u}${t}`:`
|
|
96
|
+
`}return this.comment?(v+=`
|
|
97
|
+
`+this.comment.replace(/^/gm,`${u}#`),c&&c()):h&&l&&l(),v}};t._defineProperty(l,`maxFlowStringSingleLineLength`,60);function u(e){let t=e instanceof o?e.value:e;return t&&typeof t==`string`&&(t=Number(t)),Number.isInteger(t)&&t>=0?t:null}var d=class extends l{add(e){this.items.push(e)}delete(e){let t=u(e);return typeof t==`number`?this.items.splice(t,1).length>0:!1}get(e,t){let n=u(e);if(typeof n!=`number`)return;let r=this.items[n];return!t&&r instanceof o?r.value:r}has(e){let t=u(e);return typeof t==`number`&&t<this.items.length}set(e,t){let n=u(e);if(typeof n!=`number`)throw 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(a(e,String(r++),t));return n}toString(e,t,n){return e?super.toString(e,{blockItem:e=>e.type===`comment`?e.str:`- ${e.str}`,flowChars:{start:`[`,end:`]`},isMap:!1,itemIndent:(e.indent||``)+` `},t,n):JSON.stringify(this)}},f=(e,t,n)=>t===null?``:typeof t==`object`?e instanceof i&&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):String(t),p=class e extends i{constructor(t,n=null){super(),this.key=t,this.value=n,this.type=e.Type.PAIR}get commentBefore(){return this.key instanceof i?this.key.commentBefore:void 0}set commentBefore(e){if(this.key??=new o(null),this.key instanceof i)this.key.commentBefore=e;else{let e=`Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node.`;throw Error(e)}}addToJSMap(e,t){let n=a(this.key,``,e);if(t instanceof Map){let r=a(this.value,n,e);t.set(n,r)}else if(t instanceof Set)t.add(n);else{let r=f(this.key,n,e),i=a(this.value,r,e);r in t?Object.defineProperty(t,r,{value:i,writable:!0,enumerable:!0,configurable:!0}):t[r]=i}return t}toJSON(e,t){let n=t&&t.mapAsMap?new Map:{};return this.addToJSMap(t,n)}toString(e,n,a){if(!e||!e.doc)return JSON.stringify(this);let{indent:s,indentSeq:c,simpleKeys:u}=e.doc.options,{key:f,value:p}=this,m=f instanceof i&&f.comment;if(u){if(m)throw Error(`With simple keys, key nodes cannot have comments`);if(f instanceof l){let e=`With simple keys, collection cannot be used as a key value`;throw Error(e)}}let h=!u&&(!f||m||(f instanceof i?f instanceof l||f.type===t.Type.BLOCK_FOLDED||f.type===t.Type.BLOCK_LITERAL:typeof f==`object`)),{doc:g,indent:_,indentStep:v,stringify:y}=e;e=Object.assign({},e,{implicitKey:!h,indent:_+v});let b=!1,x=y(f,e,()=>m=null,()=>b=!0);if(x=r(x,e.indent,m),!h&&x.length>1024){if(u)throw Error(`With simple keys, single line scalar must not span more than 1024 characters`);h=!0}if(e.allNullValues&&!u)return this.comment?(x=r(x,e.indent,this.comment),n&&n()):b&&!m&&a&&a(),e.inFlow&&!h?x:`? ${x}`;x=h?`? ${x}
|
|
98
|
+
${_}:`:`${x}:`,this.comment&&(x=r(x,e.indent,this.comment),n&&n());let S=``,C=null;if(p instanceof i){if(p.spaceBefore&&(S=`
|
|
99
|
+
`),p.commentBefore){let t=p.commentBefore.replace(/^/gm,`${e.indent}#`);S+=`
|
|
100
|
+
${t}`}C=p.comment}else p&&typeof p==`object`&&(p=g.schema.createNode(p,!0));e.implicitKey=!1,!h&&!this.comment&&p instanceof o&&(e.indentAtStart=x.length+1),b=!1,!c&&s>=2&&!e.inFlow&&!h&&p instanceof d&&p.type!==t.Type.FLOW_SEQ&&!p.tag&&!g.anchors.getName(p)&&(e.indent=e.indent.substr(2));let w=y(p,e,()=>C=null,()=>b=!0),T=` `;return S||this.comment?T=`${S}
|
|
101
|
+
${e.indent}`:!h&&p instanceof l?(!(w[0]===`[`||w[0]===`{`)||w.includes(`
|
|
102
|
+
`))&&(T=`
|
|
103
|
+
${e.indent}`):w[0]===`
|
|
104
|
+
`&&(T=``),b&&!C&&a&&a(),r(x+T+w,e.indent,C)}};t._defineProperty(p,`Type`,{PAIR:`PAIR`,MERGE_PAIR:`MERGE_PAIR`});var m=(e,t)=>{if(e instanceof h){let n=t.get(e.source);return n.count*n.aliasCount}else if(e instanceof l){let n=0;for(let r of e.items){let e=m(r,t);e>n&&(n=e)}return n}else if(e instanceof p){let n=m(e.key,t),r=m(e.value,t);return Math.max(n,r)}return 1},h=class e extends i{static stringify({range:e,source:t},{anchors:n,doc:r,implicitKey:i,inStringifyKey:a}){let o=Object.keys(n).find(e=>n[e]===t);if(!o&&a&&(o=r.anchors.getName(t)||r.anchors.newName()),o)return`*${o}${i?` `:``}`;let s=r.anchors.getName(t)?`Alias node must be after source node`:`Source node not found for alias node`;throw Error(`${s} [${e}]`)}constructor(e){super(),this.source=e,this.type=t.Type.ALIAS}set tag(e){throw Error(`Alias nodes cannot have tags`)}toJSON(e,n){if(!n)return a(this.source,e,n);let{anchors:r,maxAliasCount:i}=n,o=r.get(this.source);if(!o||o.res===void 0){let e=`This should not happen: Alias anchor was not resolved?`;throw this.cstNode?new t.YAMLReferenceError(this.cstNode,e):ReferenceError(e)}if(i>=0&&(o.count+=1,o.aliasCount===0&&(o.aliasCount=m(this.source,r)),o.count*o.aliasCount>i)){let e=`Excessive alias count indicates a resource exhaustion attack`;throw this.cstNode?new t.YAMLReferenceError(this.cstNode,e):ReferenceError(e)}return o.res}toString(t){return e.stringify(this,t)}};t._defineProperty(h,`default`,!0);function g(e,t){let n=t instanceof o?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}var _=class extends l{add(e,t){e?e instanceof p||(e=new p(e.key||e,e.value)):e=new p(e);let n=g(this.items,e.key),r=this.schema&&this.schema.sortMapEntries;if(n)if(t)n.value=e.value;else throw Error(`Key ${e.key} already set`);else if(r){let t=this.items.findIndex(t=>r(e,t)<0);t===-1?this.items.push(e):this.items.splice(t,0,e)}else this.items.push(e)}delete(e){let t=g(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let n=g(this.items,e),r=n&&n.value;return!t&&r instanceof o?r.value:r}has(e){return!!g(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 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=`<<`,b=class extends p{constructor(e){if(e instanceof p){let t=e.value;t instanceof d||(t=new d,t.items.push(e.value),t.range=e.value.range),super(e.key,t),this.range=e.range}else super(new o(y),new d);this.type=p.Type.MERGE_PAIR}addToJSMap(e,t){for(let{source:n}of this.value.items){if(!(n instanceof _))throw 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}},x={defaultType:t.Type.BLOCK_LITERAL,lineWidth:76},S={trueStr:`true`,falseStr:`false`},C={asBigInt:!1},w={nullStr:`null`},T={defaultType:t.Type.PLAIN,doubleQuoted:{jsonEncoding:!1,minMultiLineLength:40},fold:{lineWidth:80,minContentWidth:20}};function E(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 o||(e=new o(e)),n&&(e.format=n),e}}return n&&(e=n(e)),new o(e)}var ee=`flow`,te=`block`,D=`quoted`,O=(e,t)=>{let n=e[t+1];for(;n===` `||n===` `;){do n=e[t+=1];while(n&&n!==`
|
|
105
|
+
`);n=e[t+1]}return t};function k(e,t,n,{indentAtStart:r,lineWidth:i=80,minContentWidth:a=20,onFold:o,onOverflow:s}){if(!i||i<0)return e;let c=Math.max(1+a,1+i-t.length);if(e.length<=c)return e;let l=[],u={},d=i-t.length;typeof r==`number`&&(r>i-Math.max(2,a)?l.push(0):d=i-r);let f,p,m=!1,h=-1,g=-1,_=-1;n===te&&(h=O(e,h),h!==-1&&(d=h+c));for(let t;t=e[h+=1];){if(n===D&&t===`\\`){switch(g=h,e[h+1]){case`x`:h+=3;break;case`u`:h+=5;break;case`U`:h+=9;break;default:h+=1}_=h}if(t===`
|
|
106
|
+
`)n===te&&(h=O(e,h)),d=h+c,f=void 0;else{if(t===` `&&p&&p!==` `&&p!==`
|
|
107
|
+
`&&p!==` `){let t=e[h+1];t&&t!==` `&&t!==`
|
|
108
|
+
`&&t!==` `&&(f=h)}if(h>=d)if(f)l.push(f),d=f+c,f=void 0;else if(n===D){for(;p===` `||p===` `;)p=t,t=e[h+=1],m=!0;let n=h>_+1?h-2:g-1;if(u[n])return e;l.push(n),u[n]=!0,d=n+c,f=void 0}else m=!0}p=t}if(m&&s&&s(),l.length===0)return e;o&&o();let v=e.slice(0,l[0]);for(let r=0;r<l.length;++r){let i=l[r],a=l[r+1]||e.length;i===0?v=`
|
|
109
|
+
${t}${e.slice(0,a)}`:(n===D&&u[i]&&(v+=`${e[i]}\\`),v+=`
|
|
110
|
+
${t}${e.slice(i+1,a)}`)}return v}var A=({indentAtStart:e})=>e?Object.assign({indentAtStart:e},T.fold):T.fold,j=e=>/^(%|---|\.\.\.)/m.test(e);function ne(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(e[t]===`
|
|
111
|
+
`){if(t-n>r)return!0;if(n=t+1,i-n<=r)return!1}return!0}function M(e,t){let{implicitKey:n}=t,{jsonEncoding:r,minMultiLineLength:i}=T.doubleQuoted,a=JSON.stringify(e);if(r)return a;let o=t.indent||(j(e)?` `:``),s=``,c=0;for(let e=0,t=a[e];t;t=a[++e])if(t===` `&&a[e+1]===`\\`&&a[e+2]===`n`&&(s+=a.slice(c,e)+`\\ `,e+=1,c=e,t=`\\`),t===`\\`)switch(a[e+1]){case`u`:{s+=a.slice(c,e);let t=a.substr(e+2,4);switch(t){case`0000`:s+=`\\0`;break;case`0007`:s+=`\\a`;break;case`000b`:s+=`\\v`;break;case`001b`:s+=`\\e`;break;case`0085`:s+=`\\N`;break;case`00a0`:s+=`\\_`;break;case`2028`:s+=`\\L`;break;case`2029`:s+=`\\P`;break;default:t.substr(0,2)===`00`?s+=`\\x`+t.substr(2):s+=a.substr(e,6)}e+=5,c=e+1}break;case`n`:if(n||a[e+2]===`"`||a.length<i)e+=1;else{for(s+=a.slice(c,e)+`
|
|
112
|
+
|
|
113
|
+
`;a[e+2]===`\\`&&a[e+3]===`n`&&a[e+4]!==`"`;)s+=`
|
|
114
|
+
`,e+=2;s+=o,a[e+2]===` `&&(s+=`\\`),e+=1,c=e+1}break;default:e+=1}return s=c?s+a.slice(c):a,n?s:k(s,o,D,A(t))}function N(e,t){if(t.implicitKey){if(/\n/.test(e))return M(e,t)}else if(/[ \t]\n|\n[ \t]/.test(e))return M(e,t);let n=t.indent||(j(e)?` `:``),r=`'`+e.replace(/'/g,`''`).replace(/\n+/g,`$&
|
|
115
|
+
${n}`)+`'`;return t.implicitKey?r:k(r,n,ee,A(t))}function P({comment:e,type:n,value:r},i,a,o){if(/\n[\t ]+$/.test(r)||/^\s*$/.test(r))return M(r,i);let s=i.indent||(i.forceBlockIndent||j(r)?` `:``),c=s?`2`:`1`,l=n===t.Type.BLOCK_FOLDED?!1:n===t.Type.BLOCK_LITERAL?!0:!ne(r,T.fold.lineWidth,s.length),u=l?`|`:`>`;if(!r)return u+`
|
|
116
|
+
`;let d=``,f=``;if(r=r.replace(/[\n\t ]*$/,e=>{let t=e.indexOf(`
|
|
117
|
+
`);return t===-1?u+=`-`:(r===e||t!==e.length-1)&&(u+=`+`,o&&o()),f=e.replace(/\n$/,``),``}).replace(/^[\n ]*/,e=>{e.indexOf(` `)!==-1&&(u+=c);let t=e.match(/ +$/);return t?(d=e.slice(0,-t[0].length),t[0]):(d=e,``)}),f&&=f.replace(/\n+(?!\n|$)/g,`$&${s}`),d&&=d.replace(/\n+/g,`$&${s}`),e&&(u+=` #`+e.replace(/ ?[\r\n]+/g,` `),a&&a()),!r)return`${u}${c}
|
|
118
|
+
${s}${f}`;if(l)return r=r.replace(/\n+/g,`$&${s}`),`${u}
|
|
119
|
+
${s}${d}${r}${f}`;r=r.replace(/\n+/g,`
|
|
120
|
+
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\n+/g,`$&${s}`);let p=k(`${d}${r}${f}`,s,te,T.fold);return`${u}
|
|
121
|
+
${s}${p}`}function re(e,r,i,a){let{comment:o,type:s,value:c}=e,{actualString:l,implicitKey:u,indent:d,inFlow:f}=r;if(u&&/[\n[\]{},]/.test(c)||f&&/[[\]{},]/.test(c))return M(c,r);if(!c||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(c))return u||f||c.indexOf(`
|
|
122
|
+
`)===-1?c.indexOf(`"`)!==-1&&c.indexOf(`'`)===-1?N(c,r):M(c,r):P(e,r,i,a);if(!u&&!f&&s!==t.Type.PLAIN&&c.indexOf(`
|
|
123
|
+
`)!==-1)return P(e,r,i,a);if(d===``&&j(c))return r.forceBlockIndent=!0,P(e,r,i,a);let p=c.replace(/\n+/g,`$&
|
|
124
|
+
${d}`);if(l){let{tags:e}=r.doc.schema;if(typeof E(p,e,e.scalarFallback).value!=`string`)return M(c,r)}let m=u?p:k(p,d,ee,A(r));return o&&!f&&(m.indexOf(`
|
|
125
|
+
`)!==-1||o.indexOf(`
|
|
126
|
+
`)!==-1)?(i&&i(),n(m,d,o)):m}function ie(e,n,r,i){let{defaultType:a}=T,{implicitKey:o,inFlow:s}=n,{type:c,value:l}=e;typeof l!=`string`&&(l=String(l),e=Object.assign({},e,{value:l}));let u=a=>{switch(a){case t.Type.BLOCK_FOLDED:case t.Type.BLOCK_LITERAL:return P(e,n,r,i);case t.Type.QUOTE_DOUBLE:return M(l,n);case t.Type.QUOTE_SINGLE:return N(l,n);case t.Type.PLAIN:return re(e,n,r,i);default:return null}};(c!==t.Type.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f]/.test(l)||(o||s)&&(c===t.Type.BLOCK_FOLDED||c===t.Type.BLOCK_LITERAL))&&(c=t.Type.QUOTE_DOUBLE);let d=u(c);if(d===null&&(d=u(a),d===null))throw Error(`Unsupported default string type ${a}`);return d}function ae({format:e,minFractionDigits:t,tag:n,value:r}){if(typeof r==`bigint`)return String(r);if(!isFinite(r))return isNaN(r)?`.nan`:r<0?`-.inf`:`.inf`;let i=JSON.stringify(r);if(!e&&t&&(!n||n===`tag:yaml.org,2002:float`)&&/^\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}function oe(e,n){let r,i;switch(n.type){case t.Type.FLOW_MAP:r=`}`,i=`flow map`;break;case t.Type.FLOW_SEQ:r=`]`,i=`flow sequence`;break;default:e.push(new t.YAMLSemanticError(n,`Not a flow collection!?`));return}let a;for(let e=n.items.length-1;e>=0;--e){let r=n.items[e];if(!r||r.type!==t.Type.COMMENT){a=r;break}}if(a&&a.char!==r){let o=`Expected ${i} to end with ${r}`,s;typeof a.offset==`number`?(s=new t.YAMLSemanticError(n,o),s.offset=a.offset+1):(s=new t.YAMLSemanticError(a,o),a.range&&a.range.end&&(s.offset=a.range.end-a.range.start)),e.push(s)}}function F(e,n){let r=n.context.src[n.range.start-1];if(r!==`
|
|
127
|
+
`&&r!==` `&&r!==` `){let r=`Comments must be separated from other tokens by white space characters`;e.push(new t.YAMLSemanticError(n,r))}}function se(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 ce(e,t){for(let{afterKey:n,before:r,comment:i}of t){let t=e.items[r];t?(n&&t.value&&(t=t.value),i===void 0?(n||!t.commentBefore)&&(t.spaceBefore=!0):t.commentBefore?t.commentBefore+=`
|
|
128
|
+
`+i:t.commentBefore=i):i!==void 0&&(e.comment?e.comment+=`
|
|
129
|
+
`+i:e.comment=i)}}function le(e,t){let n=t.strValue;return n?typeof n==`string`?n:(n.errors.forEach(n=>{n.source||=t,e.errors.push(n)}),n.str):``}function ue(e,n){let{handle:r,suffix:i}=n.tag,a=e.tagPrefixes.find(e=>e.handle===r);if(!a){let i=e.getDefaults().tagPrefixes;if(i&&(a=i.find(e=>e.handle===r)),!a)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===`!`&&(e.version||e.options.version)===`1.0`){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 a.prefix+decodeURIComponent(i)}function I(e,n){let{tag:r,type:i}=n,a=!1;if(r){let{handle:i,suffix:o,verbatim:s}=r;if(s){if(s!==`!`&&s!==`!!`)return s;let r=`Verbatim tags aren't resolved, so ${s} is invalid.`;e.errors.push(new t.YAMLSemanticError(n,r))}else if(i===`!`&&!o)a=!0;else try{return ue(e,n)}catch(t){e.errors.push(t)}}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 a?t.defaultTags.STR:null;default:return null}}function de(e,t,n){let{tags:r}=e.schema,i=[];for(let a of r)if(a.tag===n)if(a.test)i.push(a);else{let n=a.resolve(e,t);return n instanceof l?n:new o(n)}let a=le(e,t);return typeof a==`string`&&i.length>0?E(a,i,r.scalarFallback):null}function fe({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}}function pe(e,n,r){try{let t=de(e,n,r);if(t)return r&&n.tag&&(t.tag=r),t}catch(t){return t.source||=n,e.errors.push(t),null}try{let i=fe(n);if(!i)throw Error(`The tag ${r} is unavailable`);let a=`The tag ${r} is unavailable, falling back to ${i}`;e.warnings.push(new t.YAMLWarning(n,a));let o=de(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 me=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 he(e,n){let r={before:[],after:[]},i=!1,a=!1,o=me(n.context.parent)?n.context.parent.props.concat(n.props):n.props;for(let{start:s,end:c}of o)switch(n.context.src[s]){case t.Char.COMMENT:{if(!n.commentHasRequiredWhitespace(s)){let r=`Comments must be separated from other tokens by white space characters`;e.push(new t.YAMLSemanticError(n,r))}let{header:i,valueRange:a}=n;(a&&(s>a.start||i&&s>i.start)?r.after:r.before).push(n.context.src.slice(s+1,c));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(a){let r=`A node can have at most one tag`;e.push(new t.YAMLSemanticError(n,r))}a=!0;break}return{comments:r,hasAnchor:i,hasTag:a}}function ge(e,n){let{anchors:r,errors:i,schema:a}=e;if(n.type===t.Type.ALIAS){let e=n.rawValue,a=r.getNode(e);if(!a){let r=`Aliased anchor not found: ${e}`;return i.push(new t.YAMLReferenceError(n,r)),null}let o=new h(a);return r._cstAliases.push(o),o}let o=I(e,n);if(o)return pe(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{let t=le(e,n);return E(t,a.tags,a.tags.scalarFallback)}catch(e){return e.source||=n,i.push(e),null}}function L(e,n){if(!n)return null;n.error&&e.errors.push(n.error);let{comments:r,hasAnchor:i,hasTag:a}=he(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||a)){let r=`An alias node must not specify any properties`;e.errors.push(new t.YAMLSemanticError(n,r))}let o=ge(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(`
|
|
130
|
+
`);t&&(o.commentBefore=o.commentBefore?`${o.commentBefore}
|
|
131
|
+
${t}`:t);let i=r.after.join(`
|
|
132
|
+
`);i&&(o.comment=o.comment?`${o.comment}
|
|
133
|
+
${i}`:i)}return n.resolved=o}function _e(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?be(e,n):ye(e,n),a=new _;a.items=i,ce(a,r);let o=!1;for(let r=0;r<i.length;++r){let{key:a}=i[r];if(a instanceof l&&(o=!0),e.schema.merge&&a&&a.value===y){i[r]=new b(i[r]);let a=i[r].value.items,o=null;a.some(e=>{if(e instanceof h){let{type:n}=e.source;return n===t.Type.MAP||n===t.Type.FLOW_MAP?!1: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(a===r||a&&r&&Object.prototype.hasOwnProperty.call(a,`value`)&&a.value===r.value){let r=`Map keys must be unique; "${a}" 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=a,a}var ve=({context:{lineStart:e,node:n,src:r},props:i})=>{if(i.length===0)return!1;let{start:a}=i[0];if(n&&a>n.valueRange.start||r[a]!==t.Char.COMMENT)return!1;for(let t=e;t<a;++t)if(r[t]===`
|
|
134
|
+
`)return!1;return!0};function R(e,n){if(!ve(e))return;let r=e.getPropValue(0,t.Char.COMMENT,!0),i=!1,a=n.value.commentBefore;if(a&&a.startsWith(r))n.value.commentBefore=a.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)}function ye(e,n){let r=[],i=[],a,o=null;for(let s=0;s<n.items.length;++s){let c=n.items[s];switch(c.type){case t.Type.BLANK_LINE:r.push({afterKey:!!a,before:i.length});break;case t.Type.COMMENT:r.push({afterKey:!!a,before:i.length,comment:c.comment});break;case t.Type.MAP_KEY:a!==void 0&&i.push(new p(a)),c.error&&e.errors.push(c.error),a=L(e,c.node),o=null;break;case t.Type.MAP_VALUE:{if(a===void 0&&(a=null),c.error&&e.errors.push(c.error),!c.context.atLineStart&&c.node&&c.node.type===t.Type.MAP&&!c.node.context.atLineStart){let n=`Nested mappings are not allowed in compact mappings`;e.errors.push(new t.YAMLSemanticError(c.node,n))}let r=c.node;if(!r&&c.props.length>0){r=new t.PlainValue(t.Type.PLAIN,[]),r.context={parent:c,src:c.context.src};let e=c.range.start+1;if(r.range={start:e,end:e},r.valueRange={start:e,end:e},typeof c.range.origStart==`number`){let e=c.range.origStart+1;r.range.origStart=r.range.origEnd=e,r.valueRange.origStart=r.valueRange.origEnd=e}}let s=new p(a,L(e,r));R(c,s),i.push(s),a&&typeof o==`number`&&c.range.start>o+1024&&e.errors.push(se(n,a)),a=void 0,o=null}break;default:a!==void 0&&i.push(new p(a)),a=L(e,c),o=c.range.start,c.error&&e.errors.push(c.error);e:for(let r=s+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(c,n));break e}}}if(c.valueRangeContainsNewline){let n=`Implicit map keys need to be on a single line`;e.errors.push(new t.YAMLSemanticError(c,n))}}}return a!==void 0&&i.push(new p(a)),{comments:r,items:i}}function be(e,n){let r=[],i=[],a,o=!1,s=`{`;for(let c=0;c<n.items.length;++c){let l=n.items[c];if(typeof l.char==`string`){let{char:r,offset:u}=l;if(r===`?`&&a===void 0&&!o){o=!0,s=`:`;continue}if(r===`:`){if(a===void 0&&(a=null),s===`:`){s=`,`;continue}}else if(o&&(a===void 0&&r!==`,`&&(a=null),o=!1),a!==void 0&&(i.push(new p(a)),a=void 0,r===`,`)){s=`:`;continue}if(r===`}`){if(c===n.items.length-1)continue}else if(r===s){s=`:`;continue}let d=`Flow map contains an unexpected ${r}`,f=new t.YAMLSyntaxError(n,d);f.offset=u,e.errors.push(f)}else l.type===t.Type.BLANK_LINE?r.push({afterKey:!!a,before:i.length}):l.type===t.Type.COMMENT?(F(e.errors,l),r.push({afterKey:!!a,before:i.length,comment:l.comment})):a===void 0?(s===`,`&&e.errors.push(new t.YAMLSemanticError(l,`Separator , missing in flow map`)),a=L(e,l)):(s!==`,`&&e.errors.push(new t.YAMLSemanticError(l,`Indicator : missing in flow map entry`)),i.push(new p(a,L(e,l))),a=void 0,o=!1)}return oe(e.errors,n),a!==void 0&&i.push(new p(a)),{comments:r,items:i}}function xe(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?Ce(e,n):Se(e,n),a=new d;if(a.items=i,ce(a,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=a,a}function Se(e,n){let r=[],i=[];for(let a=0;a<n.items.length;++a){let o=n.items[a];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(L(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}}function Ce(e,n){let r=[],i=[],a=!1,o,s=null,c=`[`,l=null;for(let u=0;u<n.items.length;++u){let d=n.items[u];if(typeof d.char==`string`){let{char:r,offset:f}=d;if(r!==`:`&&(a||o!==void 0)&&(a&&o===void 0&&(o=c?i.pop():null),i.push(new p(o)),a=!1,o=void 0,s=null),r===c)c=null;else if(!c&&r===`?`)a=!0;else if(c!==`[`&&r===`:`&&o===void 0){if(c===`,`){if(o=i.pop(),o instanceof p){let r=`Chaining flow sequence pairs is invalid`,i=new t.YAMLSemanticError(n,r);i.offset=f,e.errors.push(i)}if(!a&&typeof s==`number`){let r=d.range?d.range.start:d.offset;r>s+1024&&e.errors.push(se(n,o));let{src:i}=l.context;for(let n=s;n<r;++n)if(i[n]===`
|
|
135
|
+
`){let n=`Implicit keys of flow sequence pairs need to be on a single line`;e.errors.push(new t.YAMLSemanticError(l,n));break}}}else o=null;s=null,a=!1,c=null}else if(c===`[`||r!==`]`||u<n.items.length-1){let i=`Flow sequence contains an unexpected ${r}`,a=new t.YAMLSyntaxError(n,i);a.offset=f,e.errors.push(a)}}else if(d.type===t.Type.BLANK_LINE)r.push({before:i.length});else if(d.type===t.Type.COMMENT)F(e.errors,d),r.push({comment:d.comment,before:i.length});else{if(c){let n=`Expected a ${c} in flow sequence`;e.errors.push(new t.YAMLSemanticError(d,n))}let n=L(e,d);o===void 0?(i.push(n),l=d):(i.push(new p(o,n)),o=void 0),s=d.range.start,c=`,`}}return oe(e.errors,n),o!==void 0&&i.push(new p(o)),{comments:r,items:i}}e.Alias=h,e.Collection=l,e.Merge=b,e.Node=i,e.Pair=p,e.Scalar=o,e.YAMLMap=_,e.YAMLSeq=d,e.addComment=r,e.binaryOptions=x,e.boolOptions=S,e.findPair=g,e.intOptions=C,e.isEmptyPath=c,e.nullOptions=w,e.resolveMap=_e,e.resolveNode=L,e.resolveSeq=xe,e.resolveString=le,e.strOptions=T,e.stringifyNumber=ae,e.stringifyString=ie,e.toJSON=a}),x=c(e=>{"use strict";var t=v(),n=b(),r={identify:e=>e instanceof Uint8Array,default:!1,tag:`tag:yaml.org,2002:binary`,resolve:(e,r)=>{let i=n.resolveString(e,r);if(typeof Buffer==`function`)return Buffer.from(i,`base64`);if(typeof atob==`function`){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}else{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},a,o,s)=>{let c;if(typeof Buffer==`function`)c=i instanceof Buffer?i.toString(`base64`):Buffer.from(i.buffer).toString(`base64`);else if(typeof btoa==`function`){let e=``;for(let t=0;t<i.length;++t)e+=String.fromCharCode(i[t]);c=btoa(e)}else throw Error(`This environment does not support writing binary tags; either Buffer or btoa is required`);if(r||=n.binaryOptions.defaultType,r===t.Type.QUOTE_DOUBLE)i=c;else{let{lineWidth:e}=n.binaryOptions,a=Math.ceil(c.length/e),o=Array(a);for(let t=0,n=0;t<a;++t,n+=e)o[t]=c.substr(n,e);i=o.join(r===t.Type.BLOCK_LITERAL?`
|
|
136
|
+
`:` `)}return n.stringifyString({comment:e,type:r,value:i},a,o,s)}};function i(e,r){let i=n.resolveSeq(e,r);for(let e=0;e<i.items.length;++e){let a=i.items[e];if(!(a instanceof n.Pair)){if(a instanceof n.YAMLMap){if(a.items.length>1){let e=`Each pair must have its own sequence indicator`;throw new t.YAMLSemanticError(r,e)}let e=a.items[0]||new n.Pair;a.commentBefore&&(e.commentBefore=e.commentBefore?`${a.commentBefore}
|
|
137
|
+
${e.commentBefore}`:a.commentBefore),a.comment&&(e.comment=e.comment?`${a.comment}
|
|
138
|
+
${e.comment}`:a.comment),a=e}i.items[e]=a instanceof n.Pair?a:new n.Pair(a)}}return i}function a(e,t,r){let i=new n.YAMLSeq(e);i.tag=`tag:yaml.org,2002:pairs`;for(let n of t){let t,a;if(Array.isArray(n))if(n.length===2)t=n[0],a=n[1];else throw TypeError(`Expected [key, value] tuple: ${n}`);else if(n&&n instanceof Object){let e=Object.keys(n);if(e.length===1)t=e[0],a=n[t];else throw TypeError(`Expected { key: value } tuple: ${n}`)}else t=n;let o=e.createPair(t,a,r);i.items.push(o)}return i}var o={default:!1,tag:`tag:yaml.org,2002:pairs`,resolve:i,createNode:a},s=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,a;if(e instanceof n.Pair?(i=n.toJSON(e.key,``,t),a=n.toJSON(e.value,i,t)):i=n.toJSON(e,``,t),r.has(i))throw Error(`Ordered maps must not include duplicate keys`);r.set(i,a)}return r}};t._defineProperty(s,`tag`,`tag:yaml.org,2002:omap`);function c(e,r){let a=i(e,r),o=[];for(let{key:e}of a.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)}else o.push(e.value);return Object.assign(new s,a)}function l(e,t,n){let r=a(e,t,n),i=new s;return i.items=r.items,i}var u={identify:e=>e instanceof Map,nodeClass:s,default:!1,tag:`tag:yaml.org,2002:omap`,resolve:c,createNode:l},d=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(typeof t!=`boolean`)throw 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 Error(`Set items must all have null values`)}};t._defineProperty(d,`tag`,`tag:yaml.org,2002:set`);function f(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 d,i)}function p(e,t,n){let r=new d;for(let i of t)r.items.push(e.createPair(i,null,n));return r}var m={identify:e=>e instanceof Set,nodeClass:d,default:!1,tag:`tag:yaml.org,2002:set`,resolve:f,createNode:p},h=(e,t)=>{let n=t.split(`:`).reduce((e,t)=>e*60+Number(t),0);return e===`-`?-n:n},g=({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*$/,``)},_={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:int`,format:`TIME`,test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/,resolve:(e,t,n)=>h(t,n.replace(/_/g,``)),stringify:g},y={identify:e=>typeof e==`number`,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)=>h(t,n.replace(/_/g,``)),stringify:g},x={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,a,o,s,c)=>{s&&=(s+`00`).substr(1,3);let l=Date.UTC(t,n-1,r,i||0,a||0,o||0,s||0);if(c&&c!==`Z`){let e=h(c[0],c.slice(1));Math.abs(e)<30&&(e*=60),l-=6e4*e}return new Date(l)},stringify:({value:e})=>e.toISOString().replace(/((T00:00)?:00)?\.000Z$/,``)};function S(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 C(e,t){S(!1)&&console.warn(t?`${t}: ${e}`:e)}function w(e){if(S(!0)){let t=e.replace(/.*yaml[/\\]/i,``).replace(/\.js$/,``).replace(/\\/g,`/`);C(`The endpoint 'yaml/${t}' will be removed in a future release.`,`DeprecationWarning`)}}var T={};function E(e,t){if(!T[e]&&S(!0)){T[e]=!0;let n=`The option '${e}' will be removed in a future release`;n+=t?`, use '${t}' instead.`:`.`,C(n,`DeprecationWarning`)}}e.binary=r,e.floatTime=y,e.intTime=_,e.omap=u,e.pairs=o,e.set=m,e.timestamp=x,e.warn=C,e.warnFileDeprecation=w,e.warnOptionDeprecation=E}),S=c(e=>{"use strict";var t=v(),n=b(),r=x();function i(e,t,r){let i=new n.YAMLMap(e);if(t instanceof Map)for(let[n,a]of t)i.items.push(e.createPair(n,a,r));else if(t&&typeof t==`object`)for(let n of Object.keys(t))i.items.push(e.createPair(n,t[n],r));return typeof e.sortMapEntries==`function`&&i.items.sort(e.sortMapEntries),i}var a={createNode:i,default:!0,nodeClass:n.YAMLMap,tag:`tag:yaml.org,2002:map`,resolve:n.resolveMap};function o(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}var s={createNode:o,default:!0,nodeClass:n.YAMLSeq,tag:`tag:yaml.org,2002:seq`,resolve:n.resolveSeq},c={identify:e=>typeof e==`string`,default:!0,tag:`tag:yaml.org,2002:str`,resolve:n.resolveString,stringify(e,t,r,i){return t=Object.assign({actualString:!0},t),n.stringifyString(e,t,r,i)},options:n.strOptions},l=[a,s,c],u=e=>typeof e==`bigint`||Number.isInteger(e),d=(e,t,r)=>n.intOptions.asBigInt?BigInt(e):parseInt(t,r);function f(e,t,r){let{value:i}=e;return u(i)&&i>=0?r+i.toString(t):n.stringifyNumber(e)}var p={identify:e=>e==null,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=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>e[0]===`t`||e[0]===`T`,options:n.boolOptions,stringify:({value:e})=>e?n.boolOptions.trueStr:n.boolOptions.falseStr},h={identify:e=>u(e)&&e>=0,default:!0,tag:`tag:yaml.org,2002:int`,format:`OCT`,test:/^0o([0-7]+)$/,resolve:(e,t)=>d(e,t,8),options:n.intOptions,stringify:e=>f(e,8,`0o`)},g={identify:u,default:!0,tag:`tag:yaml.org,2002:int`,test:/^[-+]?[0-9]+$/,resolve:e=>d(e,e,10),options:n.intOptions,stringify:n.stringifyNumber},_={identify:e=>u(e)&&e>=0,default:!0,tag:`tag:yaml.org,2002:int`,format:`HEX`,test:/^0x([0-9a-fA-F]+)$/,resolve:(e,t)=>d(e,t,16),options:n.intOptions,stringify:e=>f(e,16,`0x`)},y={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:(e,t)=>t?NaN:e[0]===`-`?-1/0:1/0,stringify:n.stringifyNumber},S={identify:e=>typeof e==`number`,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()},C={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^[-+]?(?:\.([0-9]+)|[0-9]+\.([0-9]*))$/,resolve(e,t,r){let i=t||r,a=new n.Scalar(parseFloat(e));return i&&i[i.length-1]===`0`&&(a.minFractionDigits=i.length),a},stringify:n.stringifyNumber},w=l.concat([p,m,h,g,_,y,S,C]),T=e=>typeof e==`bigint`||Number.isInteger(e),E=({value:e})=>JSON.stringify(e),ee=[a,s,{identify:e=>typeof e==`string`,default:!0,tag:`tag:yaml.org,2002:str`,resolve:n.resolveString,stringify:E},{identify:e=>e==null,createNode:(e,t,r)=>r.wrapScalars?new n.Scalar(null):null,default:!0,tag:`tag:yaml.org,2002:null`,test:/^null$/,resolve:()=>null,stringify:E},{identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^true|false$/,resolve:e=>e===`true`,stringify:E},{identify:T,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})=>T(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:E}];ee.scalarFallback=e=>{throw SyntaxError(`Unresolved plain scalar ${JSON.stringify(e)}`)};var te=({value:e})=>e?n.boolOptions.trueStr:n.boolOptions.falseStr,D=e=>typeof e==`bigint`||Number.isInteger(e);function O(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}`;break}let t=BigInt(i);return e===`-`?BigInt(-1)*t:t}let a=parseInt(i,r);return e===`-`?-1*a:a}function k(e,t,r){let{value:i}=e;if(D(i)){let e=i.toString(t);return i<0?`-`+r+e.substr(1):r+e}return n.stringifyNumber(e)}var A=l.concat([{identify:e=>e==null,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=>typeof e==`boolean`,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:te},{identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:()=>!1,options:n.boolOptions,stringify:te},{identify:D,default:!0,tag:`tag:yaml.org,2002:int`,format:`BIN`,test:/^([-+]?)0b([0-1_]+)$/,resolve:(e,t,n)=>O(t,n,2),stringify:e=>k(e,2,`0b`)},{identify:D,default:!0,tag:`tag:yaml.org,2002:int`,format:`OCT`,test:/^([-+]?)0([0-7_]+)$/,resolve:(e,t,n)=>O(t,n,8),stringify:e=>k(e,8,`0`)},{identify:D,default:!0,tag:`tag:yaml.org,2002:int`,test:/^([-+]?)([0-9][0-9_]*)$/,resolve:(e,t,n)=>O(t,n,10),stringify:n.stringifyNumber},{identify:D,default:!0,tag:`tag:yaml.org,2002:int`,format:`HEX`,test:/^([-+]?)0x([0-9a-fA-F_]+)$/,resolve:(e,t,n)=>O(t,n,16),stringify:e=>k(e,16,`0x`)},{identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:(e,t)=>t?NaN:e[0]===`-`?-1/0:1/0,stringify:n.stringifyNumber},{identify:e=>typeof e==`number`,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=>typeof e==`number`,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,``);e[e.length-1]===`0`&&(r.minFractionDigits=e.length)}return r},stringify:n.stringifyNumber}],r.binary,r.omap,r.pairs,r.set,r.intTime,r.floatTime,r.timestamp),j={core:w,failsafe:l,json:ee,yaml11:A},ne={binary:r.binary,bool:m,float:C,floatExp:S,floatNaN:y,floatTime:r.floatTime,int:g,intHex:_,intOct:h,intTime:r.intTime,map:a,null:p,omap:r.omap,pairs:r.pairs,seq:s,set:r.set,timestamp:r.timestamp};function M(e,t,n){if(t){let e=n.filter(e=>e.tag===t),r=e.find(e=>!e.format)||e[0];if(!r)throw Error(`Tag ${t} not found`);return r}return n.find(t=>(t.identify&&t.identify(e)||t.class&&e instanceof t.class)&&!t.format)}function N(e,t,r){if(e instanceof n.Node)return e;let{defaultPrefix:i,onTagObj:o,prevObjects:c,schema:l,wrapScalars:u}=r;t&&t.startsWith(`!!`)&&(t=i+t.slice(2));let d=M(e,t,l.tags);if(!d){if(typeof e.toJSON==`function`&&(e=e.toJSON()),!e||typeof e!=`object`)return u?new n.Scalar(e):e;d=e instanceof Map?a:e[Symbol.iterator]?s:a}o&&(o(d),delete r.onTagObj);let f={value:void 0,node:void 0};if(e&&typeof e==`object`&&c){let t=c.get(e);if(t){let e=new n.Alias(t);return r.aliasNodes.push(e),e}f.value=e,c.set(e,f)}return f.node=d.createNode?d.createNode(r.schema,e,r):u?new n.Scalar(e):e,t&&f.node instanceof n.Node&&(f.node.tag=t),f.node}function P(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 Error(`Unknown schema "${r}"; use one of ${t}`)}if(Array.isArray(n))for(let e of n)i=i.concat(e);else typeof n==`function`&&(i=n(i.slice()));for(let e=0;e<i.length;++e){let n=i[e];if(typeof n==`string`){let r=t[n];if(!r){let e=Object.keys(t).map(e=>JSON.stringify(e)).join(`, `);throw Error(`Unknown custom tag "${n}"; use one of ${e}`)}i[e]=r}}return i}var re=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0,ie=class e{constructor({customTags:e,merge:t,schema:n,sortMapEntries:i,tags:a}){this.merge=!!t,this.name=n,this.sortMapEntries=i===!0?re:i||null,!e&&a&&r.warnOptionDeprecation(`tags`,`customTags`),this.tags=P(j,ne,e||a,n)}createNode(t,n,r,i){let a={defaultPrefix:e.defaultPrefix,schema:this,wrapScalars:n},o=i?Object.assign(i,a):a;return N(t,r,o)}createPair(e,t,r){r||={wrapScalars:!0};let i=this.createNode(e,r.wrapScalars,null,r),a=this.createNode(t,r.wrapScalars,null,r);return new n.Pair(i,a)}};t._defineProperty(ie,`defaultPrefix`,t.defaultTagPrefix),t._defineProperty(ie,`defaultTags`,t.defaultTags),e.Schema=ie}),C=c(e=>{"use strict";var t=v(),n=b(),r=S(),i={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`},a={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)}},o={"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 s(e,t){if((e.version||e.options.version)===`1.0`){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=>t.indexOf(e.prefix)===0);if(!n){let r=e.getDefaults().tagPrefixes;n=r&&r.find(e=>t.indexOf(e.prefix)===0)}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 c(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 Error(`Tag not resolved for ${e} value`)}return r}function l(e,t,{anchors:n,doc:r}){let i=[],a=r.anchors.getName(e);return a&&(n[a]=e,i.push(`&${a}`)),e.tag?i.push(s(r,e.tag)):t.default||i.push(s(r,t.tag)),i.join(` `)}function u(e,t,r,i){let{anchors:a,schema:o}=t.doc,s;if(!(e instanceof n.Node)){let t={aliasNodes:[],onTagObj:e=>s=e,prevObjects:new Map};e=o.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||=c(o.tags,e);let u=l(e,s,t);u.length>0&&(t.indentAtStart=(t.indentAtStart||0)+u.length+1);let d=typeof s.stringify==`function`?s.stringify(e,t,r,i):e instanceof n.Scalar?n.stringifyString(e,t,r,i):e.toString(t,r,i);return u?e instanceof n.Scalar||d[0]===`{`||d[0]===`[`?`${u} ${d}`:`${u}
|
|
139
|
+
${t.indent}${d}`:d}var d=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 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||=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(t!=null&&!e.validAnchorNode(t))throw Error(`Anchors may only be set for Scalar, Seq and Map nodes`);if(n&&/[\x00-\x19\s,[\]{}]/.test(n))throw 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)i!==n&&(delete r[i],r[n]=t);else return i;else{if(!n){if(!t)return null;n=this.newName()}r[n]=t}return n}},f=(e,t)=>{if(e&&typeof e==`object`){let{tag:r}=e;e instanceof n.Collection?(r&&(t[r]=!0),e.items.forEach(e=>f(e,t))):e instanceof n.Pair?(f(e.key,t),f(e.value,t)):e instanceof n.Scalar&&r&&(t[r]=!0)}return t},p=e=>Object.keys(f(e,{}));function m(e,r){let i={before:[],after:[]},a,o=!1;for(let s of r)if(s.valueRange){if(a!==void 0){let n=`Document contains trailing content not separated by a ... or --- line`;e.errors.push(new t.YAMLSyntaxError(s,n));break}let r=n.resolveNode(e,s);o&&(r.spaceBefore=!0,o=!1),a=r}else s.comment===null?s.type===t.Type.BLANK_LINE&&(o=!0,a===void 0&&i.before.length>0&&!e.commentBefore&&(e.commentBefore=i.before.join(`
|
|
140
|
+
`),i.before=[])):(a===void 0?i.before:i.after).push(s.comment);if(e.contents=a||null,!a)e.comment=i.before.concat(i.after).join(`
|
|
141
|
+
`)||null;else{let t=i.before.join(`
|
|
142
|
+
`);if(t){let e=a instanceof n.Collection&&a.items[0]?a.items[0]:a;e.commentBefore=e.commentBefore?`${t}
|
|
143
|
+
${e.commentBefore}`:t}e.comment=i.after.join(`
|
|
144
|
+
`)||null}}function h({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 g(e,n){let[r]=n.parameters;if(n.name===`YAML:1.0`&&(r=`1.0`),!r){let e=`Insufficient parameters given for %YAML directive`;throw new t.YAMLSemanticError(n,e)}if(!o[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 _(e,n,r){let i=[],a=!1;for(let r of n){let{comment:n,name:o}=r;switch(o){case`TAG`:try{e.tagPrefixes.push(h(e,r))}catch(t){e.errors.push(t)}a=!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=g(e,r)}catch(t){e.errors.push(t)}a=!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&&!a&&(e.version||r.version||e.options.version)===`1.1`){let t=({handle:e,prefix:t})=>({handle:e,prefix:t});e.tagPrefixes=r.tagPrefixes.map(t),e.version=r.version}e.commentBefore=i.join(`
|
|
145
|
+
`)||null}function y(e){if(e instanceof n.Collection)return!0;throw Error(`Expected a YAML collection as document contents`)}var x=class e{constructor(e){this.anchors=new d(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 y(this.contents),this.contents.add(e)}addIn(e,t){y(this.contents),this.contents.addIn(e,t)}delete(e){return y(this.contents),this.contents.delete(e)}deleteIn(e){return n.isEmptyPath(e)?this.contents==null?!1:(this.contents=null,!0):(y(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):!1}hasIn(e){return n.isEmptyPath(e)?this.contents!==void 0:this.contents instanceof n.Collection?this.contents.hasIn(e):!1}set(e,t){y(this.contents),this.contents.set(e,t)}setIn(e,t){n.isEmptyPath(e)?this.contents=t:(y(this.contents),this.contents.setIn(e,t))}setSchema(e,t){if(!e&&!t&&this.schema)return;typeof e==`number`&&(e=e.toFixed(1)),e===`1.0`||e===`1.1`||e===`1.2`?(this.version?this.version=e:this.options.version=e,delete this.options.schema):e&&typeof e==`string`&&(this.options.schema=e),Array.isArray(t)&&(this.options.customTags=t);let n=Object.assign({},this.getDefaults(),this.options);this.schema=new r.Schema(n)}parse(e,n){this.options.keepCstNodes&&(this.cstNode=e),this.options.keepNodeTypes&&(this.type=`DOCUMENT`);let{directives:r=[],contents:i=[],directivesEndMarker:a,error:o,valueRange:s}=e;if(o&&(o.source||=this,this.errors.push(o)),_(this,r,n),a&&(this.directivesEndMarker=!0),this.range=s?[s.start,s.end]:null,this.setSchema(),this.anchors._cstAliases=[],m(this,i),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 p(this.contents).filter(e=>e.indexOf(r.Schema.defaultPrefix)!==0)}setTagPrefix(e,t){if(e[0]!==`!`||e[e.length-1]!==`!`)throw 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:a}=this.options,o=r&&(typeof e!=`string`||!(this.contents instanceof n.Scalar)),s={doc:this,indentStep:` `,keep:o,mapAsMap:o&&!!i,maxAliasCount:a,stringify:u},c=Object.keys(this.anchors.map);c.length>0&&(s.anchors=new Map(c.map(e=>[this.anchors.map[e],{alias:[],aliasCount:0,count:1}])));let l=n.toJSON(this.contents,e,s);if(typeof t==`function`&&s.anchors)for(let{count:e,res:n}of s.anchors.values())t(n,e);return l}toString(){if(this.errors.length>0)throw Error(`Document with errors cannot be stringified`);let e=this.options.indent;if(!Number.isInteger(e)||e<=0){let t=JSON.stringify(e);throw Error(`"indent" option must be a positive integer, not ${t}`)}this.setSchema();let t=[],r=!1;if(this.version){let e=`%YAML 1.2`;this.schema.name===`yaml-1.1`&&(this.version===`1.0`?e=`%YAML:1.0`:this.version===`1.1`&&(e=`%YAML 1.1`)),t.push(e),r=!0}let i=this.listNonDefaultTags();this.tagPrefixes.forEach(({handle:e,prefix:n})=>{i.some(e=>e.indexOf(n)===0)&&(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 a={anchors:Object.create(null),doc:this,indent:``,indentStep:` `.repeat(e),stringify:u},o=!1,s=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,`#`)),a.forceBlockIndent=!!this.comment,s=this.contents.comment);let e=s?null:()=>o=!0,i=u(this.contents,a,()=>s=null,e);t.push(n.addComment(i,``,s))}else this.contents!==void 0&&t.push(u(this.contents,a));return this.comment&&((!o||s)&&t[t.length-1]!==``&&t.push(``),t.push(this.comment.replace(/^/gm,`#`))),t.join(`
|
|
146
|
+
`)+`
|
|
147
|
+
`}};t._defineProperty(x,`defaults`,o),e.Document=x,e.defaultOptions=i,e.scalarOptions=a}),w=c(e=>{"use strict";var t=y(),n=C(),r=S(),i=v(),a=x();b();function o(e,t=!0,i){i===void 0&&typeof t==`string`&&(i=t,t=!0);let a=Object.assign({},n.Document.defaults[n.defaultOptions.version],n.defaultOptions);return new r.Schema(a).createNode(e,t,i)}var s=class extends n.Document{constructor(e){super(Object.assign({},n.defaultOptions,e))}};function c(e,n){let r=[],i;for(let a of t.parse(e)){let e=new s(n);e.parse(a,i),r.push(e),i=e}return r}function l(e,n){let r=t.parse(e),a=new s(n).parse(r[0]);if(r.length>1){let e=`Source contains multiple documents; please use YAML.parseAllDocuments()`;a.errors.unshift(new i.YAMLSemanticError(r[1],e))}return a}function u(e,t){let n=l(e,t);if(n.warnings.forEach(e=>a.warn(e)),n.errors.length>0)throw n.errors[0];return n.toJSON()}function d(e,t){let n=new s(t);return n.contents=e,String(n)}var f={createNode:o,defaultOptions:n.defaultOptions,Document:s,parse:u,parseAllDocuments:c,parseCST:t.parse,parseDocument:l,scalarOptions:n.scalarOptions,stringify:d};e.YAML=f}),T=c((e,t)=>{t.exports=w().YAML}),E=c(e=>{"use strict";var t=b(),n=v();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}),ee={};l(ee,{__parsePrettierYamlConfig:()=>Zr,languages:()=>Qt,options:()=>tn,parsers:()=>nn,printers:()=>Yr});var te=(e,t,n,r)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(n,r):n.global?t.replace(n,r):t.split(n).join(r)},D=te,O=`string`,k=`array`,A=`cursor`,j=`indent`,ne=`align`,M=`trim`,N=`group`,P=`fill`,re=`if-break`,ie=`indent-if-break`,ae=`line-suffix`,oe=`line-suffix-boundary`,F=`line`,se=`label`,ce=`break-parent`,le=new Set([A,j,ne,M,N,P,re,ie,ae,oe,F,se,ce]),ue=(e,t,n)=>{if(!(e&&t==null))return Array.isArray(t)||typeof t==`string`?t[n<0?t.length+n:n]:t.at(n)},I=ue;function de(e){if(typeof e==`string`)return O;if(Array.isArray(e))return k;if(!e)return;let{type:t}=e;if(le.has(t))return t}var fe=de,pe=e=>new Intl.ListFormat(`en-US`,{type:`disjunction`}).format(e);function me(e){let t=e===null?`null`:typeof e;if(t!==`string`&&t!==`object`)return`Unexpected doc '${t}',
|
|
148
|
+
Expected it to be 'string' or 'object'.`;if(fe(e))throw Error(`doc is valid.`);let n=Object.prototype.toString.call(e);if(n!==`[object Object]`)return`Unexpected doc '${n}'.`;let r=pe([...le].map(e=>`'${e}'`));return`Unexpected doc.type '${e.type}'.
|
|
149
|
+
Expected it to be ${r}.`}var he=class extends Error{name=`InvalidDocError`;constructor(e){super(me(e)),this.doc=e}},ge=he;function L(e,t){if(typeof e==`string`)return t(e);let n=new Map;return r(e);function r(e){if(n.has(e))return n.get(e);let t=i(e);return n.set(e,t),t}function i(e){switch(fe(e)){case k:return t(e.map(r));case P:return t({...e,parts:e.parts.map(r)});case re:return t({...e,breakContents:r(e.breakContents),flatContents:r(e.flatContents)});case N:{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 ne:case j:case ie:case se:case ae:return t({...e,contents:r(e.contents)});case O:case A:case M:case oe:case F:case ce:return t(e);default:throw new ge(e)}}}function _e(e,t=Fe){return L(e,e=>typeof e==`string`?B(t,e.split(`
|
|
150
|
+
`)):e)}var ve=()=>{},R=ve,ye=ve,be=ve;function xe(e,t){return R(t),{type:ne,contents:t,n:e}}function Se(e,t={}){return R(e),ye(t.expandedStates,!0),{type:N,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function Ce(e){return xe(-1/0,e)}function we(e){return xe({type:`root`},e)}function Te(e){return xe(-1,e)}function Ee(e,t){return Se(e[0],{...t,expandedStates:e})}function De(e){return be(e),{type:P,parts:e}}function Oe(e,t=``,n={}){return R(e),t!==``&&R(t),{type:re,breakContents:e,flatContents:t,groupId:n.groupId}}function ke(e){return R(e),{type:ae,contents:e}}var Ae={type:ce},je={type:F,hard:!0},Me={type:F,hard:!0,literal:!0},Ne={type:F},Pe={type:F,soft:!0},z=[je,Ae],Fe=[Me,Ae];function B(e,t){R(e),ye(t);let n=[];for(let r=0;r<t.length;r++)r!==0&&n.push(e),n.push(t[r]);return n}function Ie(e){return(t,n,r)=>{let i=!!(r!=null&&r.backwards);if(n===!1)return!1;let{length:a}=t,o=n;for(;o>=0&&o<a;){let n=t.charAt(o);if(e instanceof RegExp){if(!e.test(n))return o}else if(!e.includes(n))return o;i?o--:o++}return o===-1||o===a?o:!1}}Ie(/\s/u);var Le=Ie(` `);Ie(`,; `),Ie(/[^\n\r]/u);function Re(e,t,n){let r=!!(n!=null&&n.backwards);if(t===!1)return!1;let i=e.charAt(t);if(r){if(e.charAt(t-1)===`\r`&&i===`
|
|
151
|
+
`)return t-2;if(i===`
|
|
152
|
+
`||i===`\r`||i===`\u2028`||i===`\u2029`)return t-1}else{if(i===`\r`&&e.charAt(t+1)===`
|
|
153
|
+
`)return t+2;if(i===`
|
|
154
|
+
`||i===`\r`||i===`\u2028`||i===`\u2029`)return t+1}return t}var ze=Re;function Be(e,t){let n=t-1;n=Le(e,n,{backwards:!0}),n=ze(e,n,{backwards:!0}),n=Le(e,n,{backwards:!0});let r=ze(e,n,{backwards:!0});return n!==r}var Ve=Be,He=class extends Error{name=`UnexpectedNodeError`;constructor(e,t,n=`type`){super(`Unexpected ${t} node ${n}: ${JSON.stringify(e[n])}.`),this.node=e}},Ue=He;function We(e,t){let{node:n}=e;if(n.type===`root`&&t.filepath&&/(?:[/\\]|^)\.(?:prettier|stylelint|lintstaged)rc$/u.test(t.filepath))return async e=>{let n=await e(t.originalText,{parser:`json`});return n?[n,z]:void 0}}We.getVisitorKeys=()=>[];var Ge=We,Ke=null;function qe(e){if(Ke!==null&&typeof Ke.property){let e=Ke;return Ke=qe.prototype=null,e}return Ke=qe.prototype=e??Object.create(null),new qe}var Je=10;for(let e=0;e<=Je;e++)qe();function Ye(e){return qe(e)}function Xe(e,t=`type`){Ye(e);function n(n){let r=n[t],i=e[r];if(!Array.isArray(i))throw Object.assign(Error(`Missing visitor keys for '${r}'.`),{node:n});return i}return n}var Ze=Xe,Qe=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`]])),$e=Qe,et=Ze($e),tt=et;function nt(e){return e.position.start.offset}function rt(e){return e.position.end.offset}var it=`format`,at=/^\s*#[^\S\n]*@(?:noformat|noprettier)\s*?(?:\n|$)/u,ot=/^\s*#[^\S\n]*@(?:format|prettier)\s*?(?:\n|$)/u,st=/^\s*@(?:format|prettier)\s*$/u;function ct(e){return st.test(e)}function lt(e){return ot.test(e)}function ut(e){return at.test(e)}function dt(e){return`# @${it}
|
|
155
|
+
|
|
156
|
+
${e}`}function ft(e){return Array.isArray(e)&&e.length>0}var pt=ft;function V(e,t){return typeof e?.type==`string`&&(!t||t.includes(e.type))}function mt(e,t,n){return t(`children`in e?{...e,children:e.children.map(n=>mt(n,t,e))}:e,n)}function ht(e,t,n){Object.defineProperty(e,t,{get:n,enumerable:!1})}function gt(e,t){let n=0,r=t.length;for(let i=e.position.end.offset-1;i<r;i++){let e=t[i];if(e===`
|
|
157
|
+
`&&n++,n===1&&/\S/u.test(e))return!1;if(n===2)return!0}return!1}function _t(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)&&typeof n==`number`&&n!==r.length-1)return!1}return!0}function vt(e){return pt(e.children)?vt(I(!1,e.children,-1)):e}function yt(e){return e.value.trim()===`prettier-ignore`}function bt(e){let{node:t}=e;if(t.type===`documentBody`){let t=e.parent.head;return G(t)&&yt(I(!1,t.endComments,-1))}return H(t)&&yt(I(!1,t.leadingComments,-1))}function xt(e){return!pt(e.children)&&!St(e)}function St(e){return H(e)||U(e)||Ct(e)||W(e)||G(e)}function H(e){return pt(e?.leadingComments)}function U(e){return pt(e?.middleComments)}function Ct(e){return e?.indicatorComment}function W(e){return e?.trailingComment}function G(e){return pt(e?.endComments)}function wt(e){let t=[],n;for(let r of e.split(/( +)/u))r===` `?n===void 0&&t.unshift(``):n===` `?t.push(r):t.push((t.pop()||``)+r),n=r;return n===` `&&t.push((t.pop()||``)+` `),t[0]===``&&(t.shift(),t.unshift(` `+(t.shift()||``))),t}function Tt(e,t,n){let r=t.split(`
|
|
158
|
+
`).map((e,t,n)=>t===0&&t===n.length-1?e:t!==0&&t!==n.length-1?e.trim():t===0?e.trimEnd():e.trimStart());return n.proseWrap===`preserve`?r.map(e=>e.length===0?[]:[e]):r.map(e=>e.length===0?[]:wt(e)).reduce((t,n,i)=>i!==0&&r[i-1].length>0&&n.length>0&&!(e===`quoteDouble`&&I(!1,I(!1,t,-1),-1).endsWith(`\\`))?[...t.slice(0,-1),[...I(!1,t,-1),...n]]:[...t,n],[]).map(e=>n.proseWrap===`never`?[e.join(` `)]:e)}function Et(e,{parentIndent:t,isLastDescendant:n,options:r}){let i=e.position.start.line===e.position.end.line?``:r.originalText.slice(e.position.start.offset,e.position.end.offset).match(/^[^\n]*\n(.*)$/su)[1],a;if(e.indent===null){let e=i.match(/^(?<leadingSpace> *)[^\n\r ]/mu);a=e?e.groups.leadingSpace.length:1/0}else a=e.indent-1+t;let o=i.split(`
|
|
159
|
+
`).map(e=>e.slice(a));if(r.proseWrap===`preserve`||e.type===`blockLiteral`)return s(o.map(e=>e.length===0?[]:[e]));return s(o.map(e=>e.length===0?[]:wt(e)).reduce((e,t,n)=>n!==0&&o[n-1].length>0&&t.length>0&&!/^\s/u.test(t[0])&&!/^\s|\s$/u.test(I(!1,e,-1))?[...e.slice(0,-1),[...I(!1,e,-1),...t]]:[...e,t],[]).map(e=>e.reduce((e,t)=>e.length>0&&/\s$/u.test(I(!1,e,-1))?[...e.slice(0,-1),I(!1,e,-1)+` `+t]:[...e,t],[])).map(e=>r.proseWrap===`never`?[e.join(` `)]:e));function s(t){if(e.chomping===`keep`)return I(!1,t,-1).length===0?t.slice(0,-1):t;let r=0;for(let e=t.length-1;e>=0&&t[e].length===0;e--)r++;return r===0?t:r>=2&&!n?t.slice(0,-(r-1)):t.slice(0,-r)}}function Dt(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 Ot=new WeakMap;function kt(e,t){let{node:n,root:r}=e,i;return Ot.has(r)?i=Ot.get(r):(i=new Set,Ot.set(r,i)),!i.has(n.position.end.line)&&(i.add(n.position.end.line),gt(n,t)&&!At(e.parent))?Pe:``}function At(e){return G(e)&&!V(e,[`documentHead`,`documentBody`,`flowMapping`,`flowSequence`])}function K(e,t){return xe(` `.repeat(e),t)}function jt(e,t,n){let{node:r}=e,i=e.ancestors.filter(e=>e.type===`sequence`||e.type===`mapping`).length,a=_t(e),o=[r.type===`blockFolded`?`>`:`|`];r.indent!==null&&o.push(r.indent.toString()),r.chomping!==`clip`&&o.push(r.chomping===`keep`?`+`:`-`),Ct(r)&&o.push(` `,n(`indicatorComment`));let s=Et(r,{parentIndent:i,isLastDescendant:a,options:t}),c=[];for(let[e,t]of s.entries())e===0&&c.push(z),c.push(De(B(Ne,t))),e===s.length-1?r.chomping===`keep`&&a&&c.push(Ce(t.length===0?z:Fe)):c.push(t.length===0?z:we(Fe));return r.indent===null?o.push(Te(K(t.tabWidth,c))):o.push(Ce(K(r.indent-1+i,c))),o}var Mt=jt;function Nt(e,t,n){let{node:r}=e,i=r.type===`flowMapping`,a=i?`{`:`[`,o=i?`}`:`]`,s=Pe;i&&r.children.length>0&&t.bracketSpacing&&(s=Ne);let c=I(!1,r.children,-1),l=c?.type===`flowMappingItem`&&xt(c.key)&&xt(c.value);return[a,K(t.tabWidth,[s,Pt(e,t,n),t.trailingComma===`none`?``:Oe(`,`),G(r)?[z,B(z,e.map(n,`endComments`))]:``]),l?``:s,o]}function Pt(e,t,n){return e.map(({isLast:r,node:i,next:a})=>[n(),r?``:[`,`,Ne,i.position.start.line===a.position.start.line?``:kt(e,t.originalText)]],`children`)}function Ft(e,t,n){var r;let{node:i,parent:a}=e,{key:o,value:s}=i,c=xt(o),l=xt(s);if(c&&l)return`: `;let u=n(`key`),d=Lt(i)?` `:``;if(l)return i.type===`flowMappingItem`&&a.type===`flowMapping`?u:i.type===`mappingItem`&&It(o.content,t)&&!W(o.content)&&(r=a.tag)?.value!==`tag:yaml.org,2002:set`?[u,d,`:`]:[`? `,K(2,u)];let f=n(`value`);if(c)return[`: `,K(2,f)];if(H(s)||!Dt(o.content))return[`? `,K(2,u),z,...e.map(()=>[n(),z],`value`,`leadingComments`),`: `,K(2,f)];if(Rt(o.content)&&!H(o.content)&&!U(o.content)&&!W(o.content)&&!G(o)&&!H(s.content)&&!U(s.content)&&!G(s)&&It(s.content,t))return[u,d,`: `,f];let p=Symbol(`mappingKey`),m=Se([Oe(`? `),Se(K(2,u),{id:p})]),h=[z,`: `,K(2,f)],g=[d,`:`];G(s)&&s.content&&V(s.content,[`flowMapping`,`flowSequence`])&&s.content.children.length===0?g.push(` `):H(s.content)||G(s)&&s.content&&!V(s.content,[`mapping`,`sequence`])||a.type===`mapping`&&W(o.content)&&Dt(s.content)||V(s.content,[`mapping`,`sequence`])&&s.content.tag===null&&s.content.anchor===null?g.push(z):s.content?g.push(Ne):W(s)&&g.push(` `),g.push(f);let _=K(t.tabWidth,g);return It(o.content,t)&&!H(o.content)&&!U(o.content)&&!G(o)?Ee([[u,_]]):Ee([[m,Oe(h,_,{groupId:p})]])}function It(e,t){if(!e)return!0;switch(e.type){case`plain`:case`quoteSingle`:case`quoteDouble`:break;case`alias`:return!0;default:return!1}if(t.proseWrap===`preserve`)return e.position.start.line===e.position.end.line;if(/\\$/mu.test(t.originalText.slice(e.position.start.offset,e.position.end.offset)))return!1;switch(t.proseWrap){case`never`:return!e.value.includes(`
|
|
160
|
+
`);case`always`:return!/[\n ]/u.test(e.value);default:return!1}}function Lt(e){var t;return(t=e.key.content)?.type===`alias`}function Rt(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}}var zt=Ft;function Bt(e){return mt(e,Vt)}function Vt(e){switch(e.type){case`document`:ht(e,`head`,()=>e.children[0]),ht(e,`body`,()=>e.children[1]);break;case`documentBody`:case`sequenceItem`:case`flowSequenceItem`:case`mappingKey`:case`mappingValue`:ht(e,`content`,()=>e.children[0]);break;case`mappingItem`:case`flowMappingItem`:ht(e,`key`,()=>e.children[0]),ht(e,`value`,()=>e.children[1]);break}return e}var Ht=Bt;function Ut(e,t,n){let{node:r}=e,i=[];r.type!==`mappingValue`&&H(r)&&i.push([B(z,e.map(n,`leadingComments`)),z]);let{tag:a,anchor:o}=r;a&&i.push(n(`tag`)),a&&o&&i.push(` `),o&&i.push(n(`anchor`));let s=``;return V(r,[`mapping`,`sequence`,`comment`,`directive`,`mappingItem`,`sequenceItem`])&&!_t(e)&&(s=kt(e,t.originalText)),(a||o)&&(V(r,[`sequence`,`mapping`])&&!U(r)?i.push(z):i.push(` `)),U(r)&&i.push([r.middleComments.length===1?``:z,B(z,e.map(n,`middleComments`)),z]),bt(e)?i.push(_e(t.originalText.slice(r.position.start.offset,r.position.end.offset).trimEnd())):i.push(Se(Wt(e,t,n))),W(r)&&!V(r,[`document`,`documentHead`])&&i.push(ke([r.type===`mappingValue`&&!r.content?``:` `,e.parent.type===`mappingKey`&&e.getParentNode(2).type===`mapping`&&Dt(r)?``:Ae,n(`trailingComment`)])),At(r)&&i.push(K(r.type===`sequenceItem`?2:0,[z,B(z,e.map(({node:e})=>[Ve(t.originalText,nt(e))?z:``,n()],`endComments`))])),i.push(s),i}function Wt(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(z),t.push(n()),Kt(e,r)?(t.push(z,`...`),W(e)&&t.push(` `,n(`trailingComment`))):r&&!W(r.head)&&t.push(z,`---`)},`children`);let i=vt(r);return(!V(i,[`blockLiteral`,`blockFolded`])||i.chomping!==`keep`)&&t.push(z),t}case`document`:{let i=[];return qt(e,t)===`head`&&((r.head.children.length>0||r.head.endComments.length>0)&&i.push(n(`head`)),W(r.head)?i.push([`---`,` `,n([`head`,`trailingComment`])]):i.push(`---`)),Gt(r)&&i.push(n(`body`)),B(z,i)}case`documentHead`:return B(z,[...e.map(n,`children`),...e.map(n,`endComments`)]);case`documentBody`:{let{children:t,endComments:i}=r,a=``;if(t.length>0&&i.length>0){let e=vt(r);V(e,[`blockFolded`,`blockLiteral`])?e.chomping!==`keep`&&(a=[z,z]):a=z}return[B(z,e.map(n,`children`)),a,B(z,e.map(n,`endComments`))]}case`directive`:return[`%`,B(` `,[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 Jt(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(r.type===`quoteSingle`&&i.includes(`\\`)||r.type===`quoteDouble`&&/\\[^"]/u.test(i)){let a=r.type===`quoteDouble`?n:e;return[a,Jt(r.type,i,t),a]}if(i.includes(n))return[e,Jt(r.type,r.type===`quoteDouble`?D(!1,D(!1,i,String.raw`\"`,n),`'`,e.repeat(2)):i,t),e];if(i.includes(e))return[n,Jt(r.type,r.type===`quoteSingle`?D(!1,i,`''`,e):i,t),n];let a=t.singleQuote?e:n;return[a,Jt(r.type,i,t),a]}case`blockFolded`:case`blockLiteral`:return Mt(e,t,n);case`mapping`:case`sequence`:return B(z,e.map(n,`children`));case`sequenceItem`:return[`- `,K(2,r.content?n(`content`):``)];case`mappingKey`:case`mappingValue`:return r.content?n(`content`):``;case`mappingItem`:case`flowMappingItem`:return zt(e,t,n);case`flowMapping`:return Nt(e,t,n);case`flowSequence`:return Nt(e,t,n);case`flowSequenceItem`:return n(`content`);default:throw new Ue(r,`YAML`)}}function Gt(e){return e.body.children.length>0||G(e.body)}function Kt(e,t){return W(e)||t&&(t.head.children.length>0||G(t.head))}function qt(e,t){let n=e.node;if(e.isFirst&&/---(?:\s|$)/u.test(t.originalText.slice(nt(n),nt(n)+4))||n.head.children.length>0||G(n.head)||W(n.head))return`head`;let r=e.next;return Kt(n,r)?!1:r?`root`:!1}function Jt(e,t,n){let r=Tt(e,t,n);return B(z,r.map(e=>De(B(Ne,e))))}function Yt(e,t){if(V(e))switch(e.type){case`comment`:if(ct(e.value))return null;break;case`quoteDouble`:case`quoteSingle`:t.type=`quote`;break}}Yt.ignoredProperties=new Set([`position`]);var Xt={preprocess:Ht,embed:Ge,print:Ut,massageAstNode:Yt,insertPragma:dt,getVisitorKeys:tt},Zt=Xt,Qt=[{name:`YAML`,type:`data`,extensions:[`.yml`,`.mir`,`.reek`,`.rviz`,`.sublime-syntax`,`.syntax`,`.yaml`,`.yaml-tmlanguage`,`.yaml.sed`,`.yml.mysql`],tmScope:`source.yaml`,aceMode:`yaml`,aliases:[`yml`],codemirrorMode:`yaml`,codemirrorMimeType:`text/x-yaml`,filenames:[`.clang-format`,`.clang-tidy`,`.clangd`,`.gemrc`,`CITATION.cff`,`glide.lock`,`pixi.lock`,`.prettierrc`,`.stylelintrc`,`.lintstagedrc`],parsers:[`yaml`],vscodeLanguageIds:[`yaml`,`ansible`,`dockercompose`,`github-actions-workflow`,`home-assistant`],linguistLanguageId:407}],$t={bracketSpacing:{category:`Common`,type:`boolean`,default:!0,description:`Print spaces between brackets.`,oppositeDescription:`Do not print spaces between brackets.`},objectWrap:{category:`Common`,type:`choice`,default:`preserve`,description:`How to wrap object literals.`,choices:[{value:`preserve`,description:`Keep as multi-line, if there is a newline between the opening brace and first property.`},{value:`collapse`,description:`Fit to a single line when possible.`}]},singleQuote:{category:`Common`,type:`boolean`,default:!1,description:`Use single quotes instead of double quotes.`},proseWrap:{category:`Common`,type:`choice`,default:`preserve`,description:`How to wrap prose.`,choices:[{value:`always`,description:`Wrap prose if it exceeds the print width.`},{value:`never`,description:`Do not wrap prose.`},{value:`preserve`,description:`Wrap prose as-is.`}]},bracketSameLine:{category:`Common`,type:`boolean`,default:!1,description:`Put > of opening tags on the last line instead of on a new line.`},singleAttributePerLine:{category:`Common`,type:`boolean`,default:!1,description:`Enforce single attribute per line in HTML, Vue and JSX.`}},en={bracketSpacing:$t.bracketSpacing,singleQuote:$t.singleQuote,proseWrap:$t.proseWrap},tn=en,nn={};l(nn,{yaml:()=>Jr});var rn=d(T(),1),q=d(E(),1);q.default.findPair,q.default.toJSON,q.default.parseMap,q.default.parseSeq,q.default.stringifyNumber,q.default.stringifyString,q.default.Type,q.default.YAMLError,q.default.YAMLReferenceError;var an=q.default.YAMLSemanticError;q.default.YAMLSyntaxError,q.default.YAMLWarning;function J(e,t=null){`children`in e&&e.children.forEach(t=>J(t,e)),`anchor`in e&&e.anchor&&J(e.anchor,e),`tag`in e&&e.tag&&J(e.tag,e),`leadingComments`in e&&e.leadingComments.forEach(t=>J(t,e)),`middleComments`in e&&e.middleComments.forEach(t=>J(t,e)),`indicatorComment`in e&&e.indicatorComment&&J(e.indicatorComment,e),`trailingComment`in e&&e.trailingComment&&J(e.trailingComment,e),`endComments`in e&&e.endComments.forEach(t=>J(t,e)),Object.defineProperty(e,`_parent`,{value:t,enumerable:!1})}function on(e){return`${e.line}:${e.column}`}function sn(e){J(e);let t=cn(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();un(e,t,n[0])})}function cn(e){let t=Array.from(Array(e.position.end.line),()=>({}));for(let n of e.comments)t[n.position.start.line-1].comment=n;return ln(t,e),t}function ln(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&&t.type!==`document`&&t.type!==`documentHead`){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(t.type!==`root`&&t.type!==`document`&&t.type!==`documentHead`&&t.type!==`documentBody`){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=>{ln(e,t)})}}function un(e,t,n){let r=e.position.start.line,{trailingAttachableNode:i}=t[r-1];if(i){if(i.trailingComment)throw Error(`Unexpected multiple trailing comment at ${on(e.position.start)}`);J(e,i),i.trailingComment=e;return}for(let i=r;i>=n.position.start.line;i--){let{trailingNode:n}=t[i-1],a;if(n)a=n;else if(i!==r&&t[i-1].comment)a=t[i-1].comment._parent;else continue;if((a.type===`sequence`||a.type===`mapping`)&&(a=a.children[0]),a.type===`mappingItem`){let[e,t]=a.children;a=fn(e)?e:t}for(;;){if(dn(a,e)){J(e,a),a.endComments.push(e);return}if(!a._parent)break;a=a._parent}break}for(let i=r+1;i<=n.position.end.line;i++){let{leadingAttachableNode:n}=t[i-1];if(n){J(e,n),n.leadingComments.push(e);return}}let a=n.children[1];J(e,a),a.endComments.push(e)}function dn(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 e.children.length===0||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&&(e.children.length===0||e.children.length===1&&e.children[0].type!==`blockFolded`&&e.children[0].type!==`blockLiteral`)&&(e.type===`mappingValue`||fn(e));default:return!1}}function fn(e){return e.position.start!==e.position.end&&(e.children.length===0||e.position.start.offset!==e.children[0].position.start.offset)}function Y(e,t){return{type:e,position:t}}function pn(e,t,n){return{...Y(`root`,e),children:t,comments:n}}function mn(e){switch(e.type){case`DOCUMENT`:for(let t=e.contents.length-1;t>=0;t--)e.contents[t].type===`BLANK_LINE`?e.contents.splice(t,1):mn(e.contents[t]);for(let t=e.directives.length-1;t>=0;t--)e.directives[t].type===`BLANK_LINE`&&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||(n.type===`BLANK_LINE`?e.items.splice(t,1):mn(n))}break;case`MAP_KEY`:case`MAP_VALUE`:case`SEQ_ITEM`:e.node&&mn(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 Error(`Unexpected node type ${JSON.stringify(e.type)}`)}}function X(e,t){return{start:e,end:t}}function hn(e){return{start:e,end:e}}var gn;(function(e){e.Tag=`!`,e.Anchor=`&`,e.Comment=`#`})(gn||={});function _n(e,t){return{...Y(`anchor`,e),value:t}}function vn(e,t){return{...Y(`comment`,e),value:t}}function yn(e,t,n){return{anchor:t,tag:e,middleComments:n}}function bn(e,t){return{...Y(`tag`,e),value:t}}function xn(e,t,n=()=>!1){let r=e.cstNode,i=[],a=null,o=null,s=null;for(let c of r.props){let l=t.text[c.origStart];switch(l){case gn.Tag:a||=c,o=bn(t.transformRange(c),e.tag);break;case gn.Anchor:a||=c,s=_n(t.transformRange(c),r.anchor);break;case gn.Comment:{let e=vn(t.transformRange(c),t.text.slice(c.origStart+1,c.origEnd));t.comments.push(e),!n(e)&&a&&a.origEnd<=c.origStart&&c.origEnd<=r.valueRange.origStart&&i.push(e);break}default:throw Error(`Unexpected leading character ${JSON.stringify(l)}`)}}return yn(o,s,i)}function Sn(){return{leadingComments:[]}}function Cn(e=null){return{trailingComment:e}}function Z(){return{...Sn(),...Cn()}}function wn(e,t,n){return{...Y(`alias`,e),...Z(),...t,value:n}}function Tn(e,t){let n=e.cstNode;return wn(t.transformRange({origStart:n.valueRange.origStart-1,origEnd:n.valueRange.origEnd}),t.transformContent(e),n.rawValue)}function En(e){return{...e,type:`blockFolded`}}function Dn(e,t,n,r,i,a){return{...Y(`blockValue`,e),...Sn(),...t,chomping:n,indent:r,value:i,indicatorComment:a}}var On;(function(e){e.CLIP=`clip`,e.STRIP=`strip`,e.KEEP=`keep`})(On||={});function kn(e,t){let n=e.cstNode,r=1,i=n.chomping===`CLIP`?0:1,a=n.header.origEnd-n.header.origStart-r-i!==0,o=t.transformRange({origStart:n.header.origStart,origEnd:n.valueRange.origEnd}),s=null,c=xn(e,t,e=>{if(!(o.start.offset<e.position.start.offset&&e.position.end.offset<o.end.offset))return!1;if(s)throw Error(`Unexpected multiple indicator comments at ${on(e.position.start)}`);return s=e,!0});return Dn(o,c,On[n.chomping],a?n.blockIndent:null,n.strValue,s)}function An(e,t){return En(kn(e,t))}function jn(e){return{...e,type:`blockLiteral`}}function Mn(e,t){return jn(kn(e,t))}function Nn(e,t){return vn(t.transformRange(e.range),e.comment)}function Pn(e,t,n){return{...Y(`directive`,e),...Z(),name:t,parameters:n}}function Fn(e,t){for(let n of e.props){let e=t.text[n.origStart];switch(e){case gn.Comment:t.comments.push(vn(t.transformRange(n),t.text.slice(n.origStart+1,n.origEnd)));break;default:throw Error(`Unexpected leading character ${JSON.stringify(e)}`)}}}function In(e,t){return Fn(e,t),Pn(t.transformRange(e.range),e.name,e.parameters)}function Ln(e,t,n,r){return{...Y(`document`,e),...Cn(r),children:[t,n]}}function Q(e=[]){return{endComments:e}}function Rn(e,t,n){return{...Y(`documentBody`,e),...Q(n),children:t?[t]:[]}}function $(e){return e[e.length-1]}function zn(e,t){let n=e.match(t);return n?n.index:-1}function Bn(e,t,n){let r=e.cstNode,{comments:i,endComments:a,documentTrailingComment:o,documentHeadTrailingComment:s}=Vn(r,t,n),c=t.transformNode(e.contents),{position:l,documentEndPoint:u}=Hn(r,c,t);return t.comments.push(...i,...a),{documentBody:Rn(l,c,a),documentEndPoint:u,documentTrailingComment:o,documentHeadTrailingComment:s}}function Vn(e,t,n){let r=[],i=[],a=[],o=[],s=!1;for(let i=e.contents.length-1;i>=0;i--){let c=e.contents[i];if(c.type===`COMMENT`){let i=t.transformNode(c);n&&n.line===i.position.start.line?o.unshift(i):s?r.unshift(i):i.position.start.offset>=e.valueRange.origEnd?a.unshift(i):r.unshift(i)}else s=!0}if(a.length>1)throw Error(`Unexpected multiple document trailing comments at ${on(a[1].position.start)}`);if(o.length>1)throw Error(`Unexpected multiple documentHead trailing comments at ${on(o[1].position.start)}`);return{comments:r,endComments:i,documentTrailingComment:$(a)||null,documentHeadTrailingComment:$(o)||null}}function Hn(e,t,n){let r=zn(n.text.slice(e.valueRange.origEnd),/^\.\.\./),i=r===-1?e.valueRange.origEnd:Math.max(0,e.valueRange.origEnd-1);n.text[i-1]===`\r`&&i--;let a=n.transformRange({origStart:t===null?i:t.position.start.offset,origEnd:i}),o=r===-1?a.end:n.transformOffset(e.valueRange.origEnd+3);return{position:a,documentEndPoint:o}}function Un(e,t,n,r){return{...Y(`documentHead`,e),...Q(n),...Cn(r),children:t}}function Wn(e,t){let n=e.cstNode,{directives:r,comments:i,endComments:a}=Gn(n,t),{position:o,endMarkerPoint:s}=Kn(n,r,t);return t.comments.push(...i,...a),{createDocumentHeadWithTrailingComment:e=>(e&&t.comments.push(e),Un(o,r,a,e)),documentHeadEndMarkerPoint:s}}function Gn(e,t){let n=[],r=[],i=[],a=!1;for(let o=e.directives.length-1;o>=0;o--){let s=t.transformNode(e.directives[o]);s.type===`comment`?a?r.unshift(s):i.unshift(s):(a=!0,n.unshift(s))}return{directives:n,comments:r,endComments:i}}function Kn(e,t,n){let r=zn(n.text.slice(0,e.valueRange.origStart),/---\s*$/);r>0&&!/[\r\n]/.test(n.text[r-1])&&(r=-1);let i=r===-1?{origStart:e.valueRange.origStart,origEnd:e.valueRange.origStart}:{origStart:r,origEnd:r+3};return t.length!==0&&(i.origStart=t[0].position.start.offset),{position:n.transformRange(i),endMarkerPoint:r===-1?null:n.transformOffset(r)}}function qn(e,t){let{createDocumentHeadWithTrailingComment:n,documentHeadEndMarkerPoint:r}=Wn(e,t),{documentBody:i,documentEndPoint:a,documentTrailingComment:o,documentHeadTrailingComment:s}=Bn(e,t,r),c=n(s);return o&&t.comments.push(o),Ln(X(c.position.start,a),c,i,o)}function Jn(e,t,n){return{...Y(`flowCollection`,e),...Z(),...Q(),...t,children:n}}function Yn(e,t,n){return{...Jn(e,t,n),type:`flowMapping`}}function Xn(e,t,n){return{...Y(`flowMappingItem`,e),...Sn(),children:[t,n]}}function Zn(e,t){let n=[];for(let r of e)r&&`type`in r&&r.type===`COMMENT`?t.comments.push(t.transformNode(r)):n.push(r);return n}function Qn(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 $n(e,t){let n=t;return t=>e.slice(n,n=t)}function er(e){let t=[],n=$n(e,1),r=!1;for(let i=1;i<e.length-1;i++){let a=e[i];if(`char`in a&&a.char===`,`){t.push(n(i)),n(i+1),r=!1;continue}r=!0}return r&&t.push(n(e.length-1)),t}function tr(e,t){return{...Y(`mappingKey`,e),...Cn(),...Q(),children:t?[t]:[]}}function nr(e,t){return{...Y(`mappingValue`,e),...Z(),...Q(),children:t?[t]:[]}}function rr(e,t,n,r,i){let a=t.transformNode(e.key),o=t.transformNode(e.value),s=a||r?tr(t.transformRange({origStart:r?r.origStart:a.position.start.offset,origEnd:a?a.position.end.offset:r.origStart+1}),a):null,c=o||i?nr(t.transformRange({origStart:i?i.origStart:o.position.start.offset,origEnd:o?o.position.end.offset:i.origStart+1}),o):null;return n(X(s?s.position.start:c.position.start,c?c.position.end:s.position.end),s||tr(hn(c.position.start),null),c||nr(hn(s.position.end),null))}function ir(e,t){let n=Zn(e.cstNode.items,t),r=er(n),i=e.items.map((e,n)=>{let i=r[n],{additionalKeyRange:a,additionalValueRange:o}=Qn(i);return rr(e,t,Xn,a,o)}),a=n[0],o=$(n);return Yn(t.transformRange({origStart:a.origOffset,origEnd:o.origOffset+1}),t.transformContent(e),i)}function ar(e,t,n){return{...Jn(e,t,n),type:`flowSequence`}}function or(e,t){return{...Y(`flowSequenceItem`,e),children:[t]}}function sr(e,t){let n=Zn(e.cstNode.items,t),r=er(n),i=e.items.map((e,n)=>{if(e.type!==`PAIR`){let n=t.transformNode(e);return or(X(n.position.start,n.position.end),n)}else{let i=r[n],{additionalKeyRange:a,additionalValueRange:o}=Qn(i);return rr(e,t,Xn,a,o)}}),a=n[0],o=$(n);return ar(t.transformRange({origStart:a.origOffset,origEnd:o.origOffset+1}),t.transformContent(e),i)}function cr(e,t,n){return{...Y(`mapping`,e),...Sn(),...t,children:n}}function lr(e,t,n){return{...Y(`mappingItem`,e),...Sn(),children:[t,n]}}function ur(e,t){let n=e.cstNode;n.items.filter(e=>e.type===`MAP_KEY`||e.type===`MAP_VALUE`).forEach(e=>Fn(e,t));let r=Zn(n.items,t),i=dr(r),a=e.items.map((e,n)=>{let r=i[n],[a,o]=r[0].type===`MAP_VALUE`?[null,r[0].range]:[r[0].range,r.length===1?null:r[1].range];return rr(e,t,lr,a,o)});return cr(X(a[0].position.start,$(a).position.end),t.transformContent(e),a)}function dr(e){let t=[],n=$n(e,0),r=!1;for(let i=0;i<e.length;i++){if(e[i].type===`MAP_VALUE`){t.push(n(i+1)),r=!1;continue}r&&t.push(n(i)),r=!0}return r&&t.push(n(1/0)),t}function fr(e,t,n){return{...Y(`plain`,e),...Z(),...t,value:n}}function pr(e,t,n){for(let r=t;r>=0;r--)if(n.test(e[r]))return r;return-1}function mr(e,t){let n=e.cstNode;return fr(t.transformRange({origStart:n.valueRange.origStart,origEnd:pr(t.text,n.valueRange.origEnd-1,/\S/)+1}),t.transformContent(e),n.strValue)}function hr(e){return{...e,type:`quoteDouble`}}function gr(e,t,n){return{...Y(`quoteValue`,e),...t,...Z(),value:n}}function _r(e,t){let n=e.cstNode;return gr(t.transformRange(n.valueRange),t.transformContent(e),n.strValue)}function vr(e,t){return hr(_r(e,t))}function yr(e){return{...e,type:`quoteSingle`}}function br(e,t){return yr(_r(e,t))}function xr(e,t,n){return{...Y(`sequence`,e),...Sn(),...Q(),...t,children:n}}function Sr(e,t){return{...Y(`sequenceItem`,e),...Z(),...Q(),children:t?[t]:[]}}function Cr(e,t){let n=Zn(e.cstNode.items,t).map((n,r)=>{Fn(n,t);let i=t.transformNode(e.items[r]);return Sr(X(t.transformOffset(n.valueRange.origStart),i===null?t.transformOffset(n.valueRange.origStart+1):i.position.end),i)});return xr(X(n[0].position.start,$(n).position.end),t.transformContent(e),n)}function wr(e,t){if(e===null||e.type===void 0&&e.value===null)return null;switch(e.type){case`ALIAS`:return Tn(e,t);case`BLOCK_FOLDED`:return An(e,t);case`BLOCK_LITERAL`:return Mn(e,t);case`COMMENT`:return Nn(e,t);case`DIRECTIVE`:return In(e,t);case`DOCUMENT`:return qn(e,t);case`FLOW_MAP`:return ir(e,t);case`FLOW_SEQ`:return sr(e,t);case`MAP`:return ur(e,t);case`PLAIN`:return mr(e,t);case`QUOTE_DOUBLE`:return vr(e,t);case`QUOTE_SINGLE`:return br(e,t);case`SEQ`:return Cr(e,t);default:throw Error(`Unexpected node type ${e.type}`)}}var Tr,Er,Dr,Or,kr,Ar,jr=class{constructor(e,t){h(this,Or),f(this,`text`),f(this,`comments`,[]),h(this,Er),h(this,Dr),this.text=t,g(this,Er,e)}setOrigRanges(){if(!m(this,Er).setOrigRanges())for(let e of m(this,Er))e.setOrigRanges([],0)}transformOffset(e){return _(this,Or,kr).call(this,{origStart:e,origEnd:e}).start}transformRange(e){let{start:t,end:n}=_(this,Or,kr).call(this,e);return X(t,n)}transformNode(e){return wr(e,this)}transformContent(e){return xn(e,this)}};Er=new WeakMap,Dr=new WeakMap,Or=new WeakSet,kr=function(e){if(!Tr){let[e]=m(this,Er),t=Object.getPrototypeOf(Object.getPrototypeOf(e));Tr=Object.getOwnPropertyDescriptor(t,`rangeAsLinePos`).get}m(this,Dr)??g(this,Dr,{root:{context:{src:this.text}}});let{start:{line:t,col:n},end:{line:r,col:i}}=Tr.call({range:{start:_(this,Or,Ar).call(this,e.origStart),end:_(this,Or,Ar).call(this,e.origEnd)},context:m(this,Dr)});return{start:{offset:e.origStart,line:t,column:n},end:{offset:e.origEnd,line:r,column:i}}},Ar=function(e){return e<0?0:e>this.text.length?this.text.length:e};var Mr=jr;function Nr(e,t,n){let r=SyntaxError(e);return r.name=`YAMLSyntaxError`,r.source=t,r.position=n,r}function Pr(e,t){let n=e.source.range||e.source.valueRange;return Nr(e.message,t.text,t.transformRange(n))}function Fr(e){if(`children`in e){if(e.children.length===1){let t=e.children[0];if(t.type===`plain`&&t.tag===null&&t.anchor===null&&t.value===``)return e.children.splice(0,1),e}e.children.forEach(Fr)}return e}function Ir(e,t,n,r){let i=t(e);return t=>{r(i,t)&&n(e,i=t)}}function Lr(e){if(e===null||!(`children`in e))return;let t=e.children;if(t.forEach(Lr),e.type===`document`){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=Ir(e.position,Rr,zr,Hr),r=Ir(e.position,Br,Vr,Ur);`endComments`in e&&e.endComments.length!==0&&(n(e.endComments[0].position.start),r($(e.endComments).position.end));let i=t.filter(e=>e!==null);if(i.length!==0){let e=i[0],t=$(i);n(e.position.start),r(t.position.end),`leadingComments`in e&&e.leadingComments.length!==0&&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 Rr(e){return e.start}function zr(e,t){e.start=t}function Br(e){return e.end}function Vr(e,t){e.end=t}function Hr(e,t){return t.offset<e.offset}function Ur(e,t){return t.offset>e.offset}function Wr(e){let t=rn.default.parseCST(e),n=new Mr(t,e);n.setOrigRanges();let r=t.map(e=>new rn.default.Document({merge:!1,keepCstNodes:!0}).parse(e));for(let e of r)for(let t of e.errors)if(!(t instanceof an&&t.message===`Map keys must be unique; "<<" is repeated`))throw Pr(t,n);r.forEach(e=>mn(e.cstNode));let i=pn(n.transformRange({origStart:0,origEnd:e.length}),r.map(e=>n.transformNode(e)),n.comments);return sn(i),Lr(i),Fr(i),i}function Gr(e,t){let n=SyntaxError(e+` (`+t.loc.start.line+`:`+t.loc.start.column+`)`);return Object.assign(n,t)}var Kr=Gr;function qr(e){try{let t=Wr(e);return delete t.comments,t}catch(e){throw e!=null&&e.position?Kr(e.message,{loc:e.position,cause:e}):e}}var Jr={astFormat:`yaml`,parse:qr,hasPragma:lt,hasIgnorePragma:ut,locStart:nt,locEnd:rt},Yr={yaml:Zt},Xr=d(T(),1),Zr=Xr.default.parse,Qr=ee;export{Zr as __parsePrettierYamlConfig,Qr as default,Qt as languages,tn as options,nn as parsers,Yr as printers};
|
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,MAAM,GAAU,OAAM,MAAM,EAAiB,
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,MAAM,GAAU,OAAM,MAAM,EAAiB,kBAmBzD,CAAC"}
|
package/dist/cli.js
CHANGED
|
@@ -1,26 +1,22 @@
|
|
|
1
1
|
process.removeAllListeners("warning");
|
|
2
2
|
import { import_meta_ponyfill } from "import-meta-ponyfill";
|
|
3
|
-
import fs from "node:fs";
|
|
4
|
-
import path from "node:path";
|
|
5
|
-
import { fileURLToPath } from "node:url";
|
|
6
3
|
import yargs from "yargs";
|
|
7
4
|
import { hideBin } from "yargs/helpers";
|
|
8
5
|
import packageJson from "../package.json" with { type: "json" };
|
|
6
|
+
import { applyCommand } from "./commands/apply.js";
|
|
7
|
+
import { genCommand } from "./commands/gen.js";
|
|
8
|
+
import { googleAistudioCommand } from "./commands/google-aistudio.js";
|
|
9
9
|
export const runCli = async (args = process.argv) => {
|
|
10
|
-
let cli = yargs(hideBin(args))
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
cli = cli.command(commandModule[key]);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
10
|
+
let cli = yargs(hideBin(args))
|
|
11
|
+
// jixo cli
|
|
12
|
+
.scriptName("jixo")
|
|
13
|
+
.version(packageJson.version)
|
|
14
|
+
.demandCommand(1, "You need at least one command before moving on")
|
|
15
|
+
.strict()
|
|
16
|
+
.help()
|
|
17
|
+
.command(applyCommand)
|
|
18
|
+
.command(genCommand)
|
|
19
|
+
.command(googleAistudioCommand);
|
|
24
20
|
const argv = await cli.parse();
|
|
25
21
|
// 如果没有命令被执行,显示帮助信息
|
|
26
22
|
if (argv._.length === 0) {
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,kBAAkB,CAAC,SAAS,CAAC,CAAC;AACtC,OAAO,EAAC,oBAAoB,EAAC,MAAM,sBAAsB,CAAC;AAC1D,OAAO,
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,kBAAkB,CAAC,SAAS,CAAC,CAAC;AACtC,OAAO,EAAC,oBAAoB,EAAC,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,OAAO,EAAC,MAAM,eAAe,CAAC;AACtC,OAAO,WAAW,MAAM,iBAAiB,CAAC,OAAM,IAAI,EAAE,MAAM,EAAC,CAAC;AAC9D,OAAO,EAAC,YAAY,EAAC,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAC,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAC,qBAAqB,EAAC,MAAM,+BAA+B,CAAC;AAEpE,MAAM,CAAC,MAAM,MAAM,GAAG,KAAK,EAAE,OAAiB,OAAO,CAAC,IAAI,EAAE,EAAE;IAC5D,IAAI,GAAG,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC5B,WAAW;SACV,UAAU,CAAC,MAAM,CAAC;SAClB,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC;SAC5B,aAAa,CAAC,CAAC,EAAE,gDAAgD,CAAC;SAClE,MAAM,EAAE;SACR,IAAI,EAAE;SACN,OAAO,CAAC,YAAY,CAAC;SACrB,OAAO,CAAC,UAAU,CAAC;SACnB,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAElC,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,KAAK,EAAE,CAAC;IAE/B,mBAAmB;IACnB,IAAI,IAAI,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxB,GAAG,CAAC,QAAQ,EAAE,CAAC;QACf,OAAO,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACzE,CAAC;AACH,CAAC,CAAC;AAEF,IAAI,oBAAoB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC;IAC3C,MAAM,EAAE,CAAC;AACX,CAAC","sourcesContent":["process.removeAllListeners(\"warning\");\nimport {import_meta_ponyfill} from \"import-meta-ponyfill\";\nimport yargs from \"yargs\";\nimport {hideBin} from \"yargs/helpers\";\nimport packageJson from \"../package.json\" with {type: \"json\"};\nimport {applyCommand} from \"./commands/apply.js\";\nimport {genCommand} from \"./commands/gen.js\";\nimport {googleAistudioCommand} from \"./commands/google-aistudio.js\";\n\nexport const runCli = async (args: string[] = process.argv) => {\n let cli = yargs(hideBin(args))\n // jixo cli\n .scriptName(\"jixo\")\n .version(packageJson.version)\n .demandCommand(1, \"You need at least one command before moving on\")\n .strict()\n .help()\n .command(applyCommand)\n .command(genCommand)\n .command(googleAistudioCommand);\n\n const argv = await cli.parse();\n\n // 如果没有命令被执行,显示帮助信息\n if (argv._.length === 0) {\n cli.showHelp();\n console.log(\" \" + \"─\".repeat(Math.max(4, process.stdout.columns - 2)));\n }\n};\n\nif (import_meta_ponyfill(import.meta).main) {\n runCli();\n}\n"]}
|