@noormdev/cli 1.0.0-alpha.8 → 1.0.0-alpha.9
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/dist/chunk-AIFVPC72.js +9 -0
- package/dist/chunk-CTFIMWJ7.js +8 -0
- package/dist/chunk-GQBL2JPZ.js +2 -0
- package/dist/chunk-I3AZKE2V.js +208 -0
- package/dist/chunk-PJYMXUBP.js +2 -0
- package/dist/connection-BXEZV3EG.js +2 -0
- package/dist/engine-BWPHMMXT.js +2 -0
- package/dist/index.js +920 -393
- package/dist/storage-YJUXROPC.js +2 -0
- package/package.json +2 -2
- package/scripts/postinstall.js +1 -1
- package/dist/chunk-ZVSL653B.js +0 -214
- package/dist/engine-OB3KW3J3.js +0 -2
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import{c as xe,i as ce}from"./chunk-CTFIMWJ7.js";import{a as Gt,c as F,e as ql}from"./chunk-UR6MHSHU.js";var T=F(G=>{"use strict";var br=Symbol.for("yaml.alias"),$s=Symbol.for("yaml.document"),un=Symbol.for("yaml.map"),Ms=Symbol.for("yaml.pair"),Cr=Symbol.for("yaml.scalar"),on=Symbol.for("yaml.seq"),pe=Symbol.for("yaml.node.type"),Ac=t=>!!t&&typeof t=="object"&&t[pe]===br,bc=t=>!!t&&typeof t=="object"&&t[pe]===$s,Cc=t=>!!t&&typeof t=="object"&&t[pe]===un,Sc=t=>!!t&&typeof t=="object"&&t[pe]===Ms,js=t=>!!t&&typeof t=="object"&&t[pe]===Cr,Fc=t=>!!t&&typeof t=="object"&&t[pe]===on;function Ks(t){if(t&&typeof t=="object")switch(t[pe]){case un:case on:return!0}return!1}function _c(t){if(t&&typeof t=="object")switch(t[pe]){case br:case un:case Cr:case on:return!0}return!1}var wc=t=>(js(t)||Ks(t))&&!!t.anchor;G.ALIAS=br;G.DOC=$s;G.MAP=un;G.NODE_TYPE=pe;G.PAIR=Ms;G.SCALAR=Cr;G.SEQ=on;G.hasAnchor=wc;G.isAlias=Ac;G.isCollection=Ks;G.isDocument=bc;G.isMap=Cc;G.isNode=_c;G.isPair=Sc;G.isScalar=js;G.isSeq=Fc});var ct=F(Sr=>{"use strict";var J=T(),W=Symbol("break visit"),Vs=Symbol("skip children"),ue=Symbol("remove node");function an(t,e){let n=Us(e);J.isDocument(t)?Ye(null,t.contents,n,Object.freeze([t]))===ue&&(t.contents=null):Ye(null,t,n,Object.freeze([]))}an.BREAK=W;an.SKIP=Vs;an.REMOVE=ue;function Ye(t,e,n,r){let i=Js(t,e,n,r);if(J.isNode(i)||J.isPair(i))return Ys(t,r,i),Ye(t,i,n,r);if(typeof i!="symbol"){if(J.isCollection(e)){r=Object.freeze(r.concat(e));for(let s=0;s<e.items.length;++s){let u=Ye(s,e.items[s],n,r);if(typeof u=="number")s=u-1;else{if(u===W)return W;u===ue&&(e.items.splice(s,1),s-=1)}}}else if(J.isPair(e)){r=Object.freeze(r.concat(e));let s=Ye("key",e.key,n,r);if(s===W)return W;s===ue&&(e.key=null);let u=Ye("value",e.value,n,r);if(u===W)return W;u===ue&&(e.value=null)}}return i}async function ln(t,e){let n=Us(e);J.isDocument(t)?await Ge(null,t.contents,n,Object.freeze([t]))===ue&&(t.contents=null):await Ge(null,t,n,Object.freeze([]))}ln.BREAK=W;ln.SKIP=Vs;ln.REMOVE=ue;async function Ge(t,e,n,r){let i=await Js(t,e,n,r);if(J.isNode(i)||J.isPair(i))return Ys(t,r,i),Ge(t,i,n,r);if(typeof i!="symbol"){if(J.isCollection(e)){r=Object.freeze(r.concat(e));for(let s=0;s<e.items.length;++s){let u=await Ge(s,e.items[s],n,r);if(typeof u=="number")s=u-1;else{if(u===W)return W;u===ue&&(e.items.splice(s,1),s-=1)}}}else if(J.isPair(e)){r=Object.freeze(r.concat(e));let s=await Ge("key",e.key,n,r);if(s===W)return W;s===ue&&(e.key=null);let u=await Ge("value",e.value,n,r);if(u===W)return W;u===ue&&(e.value=null)}}return i}function Us(t){return typeof t=="object"&&(t.Collection||t.Node||t.Value)?Object.assign({Alias:t.Node,Map:t.Node,Scalar:t.Node,Seq:t.Node},t.Value&&{Map:t.Value,Scalar:t.Value,Seq:t.Value},t.Collection&&{Map:t.Collection,Seq:t.Collection},t):t}function Js(t,e,n,r){if(typeof n=="function")return n(t,e,r);if(J.isMap(e))return n.Map?.(t,e,r);if(J.isSeq(e))return n.Seq?.(t,e,r);if(J.isPair(e))return n.Pair?.(t,e,r);if(J.isScalar(e))return n.Scalar?.(t,e,r);if(J.isAlias(e))return n.Alias?.(t,e,r)}function Ys(t,e,n){let r=e[e.length-1];if(J.isCollection(r))r.items[t]=n;else if(J.isPair(r))t==="key"?r.key=n:r.value=n;else if(J.isDocument(r))r.contents=n;else{let i=J.isAlias(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}Sr.visit=an;Sr.visitAsync=ln});var Fr=F(Hs=>{"use strict";var Gs=T(),vc=ct(),Bc={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},Nc=t=>t.replace(/[!,[\]{}]/g,e=>Bc[e]),ft=class t{constructor(e,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},t.defaultYaml,e),this.tags=Object.assign({},t.defaultTags,n)}clone(){let e=new t(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new t(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:t.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},t.defaultTags);break}return e}add(e,n){this.atNextDocument&&(this.yaml={explicit:t.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},t.defaultTags),this.atNextDocument=!1);let r=e.trim().split(/[ \t]+/),i=r.shift();switch(i){case"%TAG":{if(r.length!==2&&(n(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;let[s,u]=r;return this.tags[s]=u,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return n(0,"%YAML directive should contain exactly one part"),!1;let[s]=r;if(s==="1.1"||s==="1.2")return this.yaml.version=s,!0;{let u=/^\d+\.\d+$/.test(s);return n(6,`Unsupported YAML version ${s}`,u),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(e,n){if(e==="!")return"!";if(e[0]!=="!")return n(`Not a valid tag: ${e}`),null;if(e[1]==="<"){let u=e.slice(2,-1);return u==="!"||u==="!!"?(n(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&n("Verbatim tags must end with a >"),u)}let[,r,i]=e.match(/^(.*!)([^!]*)$/s);i||n(`The ${e} tag has no suffix`);let s=this.tags[r];if(s)try{return s+decodeURIComponent(i)}catch(u){return n(String(u)),null}return r==="!"?e:(n(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[n,r]of Object.entries(this.tags))if(e.startsWith(r))return n+Nc(e.substring(r.length));return e[0]==="!"?e:`!<${e}>`}toString(e){let n=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags),i;if(e&&r.length>0&&Gs.isNode(e.contents)){let s={};vc.visit(e.contents,(u,o)=>{Gs.isNode(o)&&o.tag&&(s[o.tag]=!0)}),i=Object.keys(s)}else i=[];for(let[s,u]of r)s==="!!"&&u==="tag:yaml.org,2002:"||(!e||i.some(o=>o.startsWith(u)))&&n.push(`%TAG ${s} ${u}`);return n.join(`
|
|
3
|
+
`)}};ft.defaultYaml={explicit:!1,version:"1.2"};ft.defaultTags={"!!":"tag:yaml.org,2002:"};Hs.Directives=ft});var cn=F(ht=>{"use strict";var Ws=T(),Oc=ct();function Ic(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){let n=`Anchor must not contain whitespace or control characters: ${JSON.stringify(t)}`;throw new Error(n)}return!0}function zs(t){let e=new Set;return Oc.visit(t,{Value(n,r){r.anchor&&e.add(r.anchor)}}),e}function Qs(t,e){for(let n=1;;++n){let r=`${t}${n}`;if(!e.has(r))return r}}function Tc(t,e){let n=[],r=new Map,i=null;return{onAnchor:s=>{n.push(s),i??(i=zs(t));let u=Qs(e,i);return i.add(u),u},setAnchors:()=>{for(let s of n){let u=r.get(s);if(typeof u=="object"&&u.anchor&&(Ws.isScalar(u.node)||Ws.isCollection(u.node)))u.node.anchor=u.anchor;else{let o=new Error("Failed to resolve repeated object (this should not happen)");throw o.source=s,o}}},sourceObjects:r}}ht.anchorIsValid=Ic;ht.anchorNames=zs;ht.createNodeAnchors=Tc;ht.findNewAnchor=Qs});var _r=F(Xs=>{"use strict";function dt(t,e,n,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let i=0,s=r.length;i<s;++i){let u=r[i],o=dt(t,r,String(i),u);o===void 0?delete r[i]:o!==u&&(r[i]=o)}else if(r instanceof Map)for(let i of Array.from(r.keys())){let s=r.get(i),u=dt(t,r,i,s);u===void 0?r.delete(i):u!==s&&r.set(i,u)}else if(r instanceof Set)for(let i of Array.from(r)){let s=dt(t,r,i,i);s===void 0?r.delete(i):s!==i&&(r.delete(i),r.add(s))}else for(let[i,s]of Object.entries(r)){let u=dt(t,r,i,s);u===void 0?delete r[i]:u!==s&&(r[i]=u)}return t.call(e,n,r)}Xs.applyReviver=dt});var Ae=F(eu=>{"use strict";var kc=T();function Zs(t,e,n){if(Array.isArray(t))return t.map((r,i)=>Zs(r,String(i),n));if(t&&typeof t.toJSON=="function"){if(!n||!kc.hasAnchor(t))return t.toJSON(e,n);let r={aliasCount:0,count:1,res:void 0};n.anchors.set(t,r),n.onCreate=s=>{r.res=s,delete n.onCreate};let i=t.toJSON(e,n);return n.onCreate&&n.onCreate(i),i}return typeof t=="bigint"&&!n?.keep?Number(t):t}eu.toJS=Zs});var fn=F(nu=>{"use strict";var xc=_r(),tu=T(),Lc=Ae(),wr=class{constructor(e){Object.defineProperty(this,tu.NODE_TYPE,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:n,maxAliasCount:r,onAnchor:i,reviver:s}={}){if(!tu.isDocument(e))throw new TypeError("A document argument is required");let u={anchors:new Map,doc:e,keep:!0,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},o=Lc.toJS(this,"",u);if(typeof i=="function")for(let{count:a,res:l}of u.anchors.values())i(l,a);return typeof s=="function"?xc.applyReviver(s,{"":o},"",o):o}};nu.NodeBase=wr});var pt=F(ru=>{"use strict";var qc=cn(),Pc=ct(),He=T(),Rc=fn(),$c=Ae(),vr=class extends Rc.NodeBase{constructor(e){super(He.ALIAS),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,n){let r;n?.aliasResolveCache?r=n.aliasResolveCache:(r=[],Pc.visit(e,{Node:(s,u)=>{(He.isAlias(u)||He.hasAnchor(u))&&r.push(u)}}),n&&(n.aliasResolveCache=r));let i;for(let s of r){if(s===this)break;s.anchor===this.source&&(i=s)}return i}toJSON(e,n){if(!n)return{source:this.source};let{anchors:r,doc:i,maxAliasCount:s}=n,u=this.resolve(i,n);if(!u){let a=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(a)}let o=r.get(u);if(o||($c.toJS(u,null,n),o=r.get(u)),o?.res===void 0){let a="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(a)}if(s>=0&&(o.count+=1,o.aliasCount===0&&(o.aliasCount=hn(i,u,r)),o.count*o.aliasCount>s)){let a="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(a)}return o.res}toString(e,n,r){let i=`*${this.source}`;if(e){if(qc.anchorIsValid(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(s)}if(e.implicitKey)return`${i} `}return i}};function hn(t,e,n){if(He.isAlias(e)){let r=e.resolve(t),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}else if(He.isCollection(e)){let r=0;for(let i of e.items){let s=hn(t,i,n);s>r&&(r=s)}return r}else if(He.isPair(e)){let r=hn(t,e.key,n),i=hn(t,e.value,n);return Math.max(r,i)}return 1}ru.Alias=vr});var V=F(Br=>{"use strict";var Mc=T(),jc=fn(),Kc=Ae(),Vc=t=>!t||typeof t!="function"&&typeof t!="object",be=class extends jc.NodeBase{constructor(e){super(Mc.SCALAR),this.value=e}toJSON(e,n){return n?.keep?this.value:Kc.toJS(this.value,e,n)}toString(){return String(this.value)}};be.BLOCK_FOLDED="BLOCK_FOLDED";be.BLOCK_LITERAL="BLOCK_LITERAL";be.PLAIN="PLAIN";be.QUOTE_DOUBLE="QUOTE_DOUBLE";be.QUOTE_SINGLE="QUOTE_SINGLE";Br.Scalar=be;Br.isScalarValue=Vc});var mt=F(su=>{"use strict";var Uc=pt(),Re=T(),iu=V(),Jc="tag:yaml.org,2002:";function Yc(t,e,n){if(e){let r=n.filter(s=>s.tag===e),i=r.find(s=>!s.format)??r[0];if(!i)throw new Error(`Tag ${e} not found`);return i}return n.find(r=>r.identify?.(t)&&!r.format)}function Gc(t,e,n){if(Re.isDocument(t)&&(t=t.contents),Re.isNode(t))return t;if(Re.isPair(t)){let c=n.schema[Re.MAP].createNode?.(n.schema,null,n);return c.items.push(t),c}(t instanceof String||t instanceof Number||t instanceof Boolean||typeof BigInt<"u"&&t instanceof BigInt)&&(t=t.valueOf());let{aliasDuplicateObjects:r,onAnchor:i,onTagObj:s,schema:u,sourceObjects:o}=n,a;if(r&&t&&typeof t=="object"){if(a=o.get(t),a)return a.anchor??(a.anchor=i(t)),new Uc.Alias(a.anchor);a={anchor:null,node:null},o.set(t,a)}e?.startsWith("!!")&&(e=Jc+e.slice(2));let l=Yc(t,e,u.tags);if(!l){if(t&&typeof t.toJSON=="function"&&(t=t.toJSON()),!t||typeof t!="object"){let c=new iu.Scalar(t);return a&&(a.node=c),c}l=t instanceof Map?u[Re.MAP]:Symbol.iterator in Object(t)?u[Re.SEQ]:u[Re.MAP]}s&&(s(l),delete n.onTagObj);let d=l?.createNode?l.createNode(n.schema,t,n):typeof l?.nodeClass?.from=="function"?l.nodeClass.from(n.schema,t,n):new iu.Scalar(t);return e?d.tag=e:l.default||(d.tag=l.tag),a&&(a.node=d),d}su.createNode=Gc});var pn=F(dn=>{"use strict";var Hc=mt(),oe=T(),Wc=fn();function Nr(t,e,n){let r=n;for(let i=e.length-1;i>=0;--i){let s=e[i];if(typeof s=="number"&&Number.isInteger(s)&&s>=0){let u=[];u[s]=r,r=u}else r=new Map([[s,r]])}return Hc.createNode(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:t,sourceObjects:new Map})}var uu=t=>t==null||typeof t=="object"&&!!t[Symbol.iterator]().next().done,Or=class extends Wc.NodeBase{constructor(e,n){super(e),Object.defineProperty(this,"schema",{value:n,configurable:!0,enumerable:!1,writable:!0})}clone(e){let n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(n.schema=e),n.items=n.items.map(r=>oe.isNode(r)||oe.isPair(r)?r.clone(e):r),this.range&&(n.range=this.range.slice()),n}addIn(e,n){if(uu(e))this.add(n);else{let[r,...i]=e,s=this.get(r,!0);if(oe.isCollection(s))s.addIn(i,n);else if(s===void 0&&this.schema)this.set(r,Nr(this.schema,i,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}}deleteIn(e){let[n,...r]=e;if(r.length===0)return this.delete(n);let i=this.get(n,!0);if(oe.isCollection(i))return i.deleteIn(r);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}getIn(e,n){let[r,...i]=e,s=this.get(r,!0);return i.length===0?!n&&oe.isScalar(s)?s.value:s:oe.isCollection(s)?s.getIn(i,n):void 0}hasAllNullValues(e){return this.items.every(n=>{if(!oe.isPair(n))return!1;let r=n.value;return r==null||e&&oe.isScalar(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(e){let[n,...r]=e;if(r.length===0)return this.has(n);let i=this.get(n,!0);return oe.isCollection(i)?i.hasIn(r):!1}setIn(e,n){let[r,...i]=e;if(i.length===0)this.set(r,n);else{let s=this.get(r,!0);if(oe.isCollection(s))s.setIn(i,n);else if(s===void 0&&this.schema)this.set(r,Nr(this.schema,i,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}}};dn.Collection=Or;dn.collectionFromPath=Nr;dn.isEmptyPath=uu});var gt=F(mn=>{"use strict";var zc=t=>t.replace(/^(?!$)(?: $)?/gm,"#");function Ir(t,e){return/^\n+$/.test(t)?t.substring(1):e?t.replace(/^(?! *$)/gm,e):t}var Qc=(t,e,n)=>t.endsWith(`
|
|
4
|
+
`)?Ir(n,e):n.includes(`
|
|
5
|
+
`)?`
|
|
6
|
+
`+Ir(n,e):(t.endsWith(" ")?"":" ")+n;mn.indentComment=Ir;mn.lineComment=Qc;mn.stringifyComment=zc});var au=F(Dt=>{"use strict";var Xc="flow",Tr="block",gn="quoted";function Zc(t,e,n="flow",{indentAtStart:r,lineWidth:i=80,minContentWidth:s=20,onFold:u,onOverflow:o}={}){if(!i||i<0)return t;i<s&&(s=0);let a=Math.max(1+s,1+i-e.length);if(t.length<=a)return t;let l=[],d={},c=i-e.length;typeof r=="number"&&(r>i-Math.max(2,s)?l.push(0):c=i-r);let h,m,y=!1,f=-1,p=-1,g=-1;n===Tr&&(f=ou(t,f,e.length),f!==-1&&(c=f+a));for(let A;A=t[f+=1];){if(n===gn&&A==="\\"){switch(p=f,t[f+1]){case"x":f+=3;break;case"u":f+=5;break;case"U":f+=9;break;default:f+=1}g=f}if(A===`
|
|
7
|
+
`)n===Tr&&(f=ou(t,f,e.length)),c=f+e.length+a,h=void 0;else{if(A===" "&&m&&m!==" "&&m!==`
|
|
8
|
+
`&&m!==" "){let C=t[f+1];C&&C!==" "&&C!==`
|
|
9
|
+
`&&C!==" "&&(h=f)}if(f>=c)if(h)l.push(h),c=h+a,h=void 0;else if(n===gn){for(;m===" "||m===" ";)m=A,A=t[f+=1],y=!0;let C=f>g+1?f-2:p-1;if(d[C])return t;l.push(C),d[C]=!0,c=C+a,h=void 0}else y=!0}m=A}if(y&&o&&o(),l.length===0)return t;u&&u();let E=t.slice(0,l[0]);for(let A=0;A<l.length;++A){let C=l[A],S=l[A+1]||t.length;C===0?E=`
|
|
10
|
+
${e}${t.slice(0,S)}`:(n===gn&&d[C]&&(E+=`${t[C]}\\`),E+=`
|
|
11
|
+
${e}${t.slice(C+1,S)}`)}return E}function ou(t,e,n){let r=e,i=e+1,s=t[i];for(;s===" "||s===" ";)if(e<i+n)s=t[++e];else{do s=t[++e];while(s&&s!==`
|
|
12
|
+
`);r=e,i=e+1,s=t[i]}return r}Dt.FOLD_BLOCK=Tr;Dt.FOLD_FLOW=Xc;Dt.FOLD_QUOTED=gn;Dt.foldFlowLines=Zc});var Et=F(lu=>{"use strict";var re=V(),Ce=au(),yn=(t,e)=>({indentAtStart:e?t.indent.length:t.indentAtStart,lineWidth:t.options.lineWidth,minContentWidth:t.options.minContentWidth}),En=t=>/^(%|---|\.\.\.)/m.test(t);function ef(t,e,n){if(!e||e<0)return!1;let r=e-n,i=t.length;if(i<=r)return!1;for(let s=0,u=0;s<i;++s)if(t[s]===`
|
|
13
|
+
`){if(s-u>r)return!0;if(u=s+1,i-u<=r)return!1}return!0}function yt(t,e){let n=JSON.stringify(t);if(e.options.doubleQuotedAsJSON)return n;let{implicitKey:r}=e,i=e.options.doubleQuotedMinMultiLineLength,s=e.indent||(En(t)?" ":""),u="",o=0;for(let a=0,l=n[a];l;l=n[++a])if(l===" "&&n[a+1]==="\\"&&n[a+2]==="n"&&(u+=n.slice(o,a)+"\\ ",a+=1,o=a,l="\\"),l==="\\")switch(n[a+1]){case"u":{u+=n.slice(o,a);let d=n.substr(a+2,4);switch(d){case"0000":u+="\\0";break;case"0007":u+="\\a";break;case"000b":u+="\\v";break;case"001b":u+="\\e";break;case"0085":u+="\\N";break;case"00a0":u+="\\_";break;case"2028":u+="\\L";break;case"2029":u+="\\P";break;default:d.substr(0,2)==="00"?u+="\\x"+d.substr(2):u+=n.substr(a,6)}a+=5,o=a+1}break;case"n":if(r||n[a+2]==='"'||n.length<i)a+=1;else{for(u+=n.slice(o,a)+`
|
|
14
|
+
|
|
15
|
+
`;n[a+2]==="\\"&&n[a+3]==="n"&&n[a+4]!=='"';)u+=`
|
|
16
|
+
`,a+=2;u+=s,n[a+2]===" "&&(u+="\\"),a+=1,o=a+1}break;default:a+=1}return u=o?u+n.slice(o):n,r?u:Ce.foldFlowLines(u,s,Ce.FOLD_QUOTED,yn(e,!1))}function kr(t,e){if(e.options.singleQuote===!1||e.implicitKey&&t.includes(`
|
|
17
|
+
`)||/[ \t]\n|\n[ \t]/.test(t))return yt(t,e);let n=e.indent||(En(t)?" ":""),r="'"+t.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
18
|
+
${n}`)+"'";return e.implicitKey?r:Ce.foldFlowLines(r,n,Ce.FOLD_FLOW,yn(e,!1))}function We(t,e){let{singleQuote:n}=e.options,r;if(n===!1)r=yt;else{let i=t.includes('"'),s=t.includes("'");i&&!s?r=kr:s&&!i?r=yt:r=n?kr:yt}return r(t,e)}var xr;try{xr=new RegExp(`(^|(?<!
|
|
19
|
+
))
|
|
20
|
+
+(?!
|
|
21
|
+
|$)`,"g")}catch{xr=/\n+(?!\n|$)/g}function Dn({comment:t,type:e,value:n},r,i,s){let{blockQuote:u,commentString:o,lineWidth:a}=r.options;if(!u||/\n[\t ]+$/.test(n))return We(n,r);let l=r.indent||(r.forceBlockIndent||En(n)?" ":""),d=u==="literal"?!0:u==="folded"||e===re.Scalar.BLOCK_FOLDED?!1:e===re.Scalar.BLOCK_LITERAL?!0:!ef(n,a,l.length);if(!n)return d?`|
|
|
22
|
+
`:`>
|
|
23
|
+
`;let c,h;for(h=n.length;h>0;--h){let S=n[h-1];if(S!==`
|
|
24
|
+
`&&S!==" "&&S!==" ")break}let m=n.substring(h),y=m.indexOf(`
|
|
25
|
+
`);y===-1?c="-":n===m||y!==m.length-1?(c="+",s&&s()):c="",m&&(n=n.slice(0,-m.length),m[m.length-1]===`
|
|
26
|
+
`&&(m=m.slice(0,-1)),m=m.replace(xr,`$&${l}`));let f=!1,p,g=-1;for(p=0;p<n.length;++p){let S=n[p];if(S===" ")f=!0;else if(S===`
|
|
27
|
+
`)g=p;else break}let E=n.substring(0,g<p?g+1:p);E&&(n=n.substring(E.length),E=E.replace(/\n+/g,`$&${l}`));let C=(f?l?"2":"1":"")+c;if(t&&(C+=" "+o(t.replace(/ ?[\r\n]+/g," ")),i&&i()),!d){let S=n.replace(/\n+/g,`
|
|
28
|
+
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${l}`),w=!1,L=yn(r,!0);u!=="folded"&&e!==re.Scalar.BLOCK_FOLDED&&(L.onOverflow=()=>{w=!0});let _=Ce.foldFlowLines(`${E}${S}${m}`,l,Ce.FOLD_BLOCK,L);if(!w)return`>${C}
|
|
29
|
+
${l}${_}`}return n=n.replace(/\n+/g,`$&${l}`),`|${C}
|
|
30
|
+
${l}${E}${n}${m}`}function tf(t,e,n,r){let{type:i,value:s}=t,{actualString:u,implicitKey:o,indent:a,indentStep:l,inFlow:d}=e;if(o&&s.includes(`
|
|
31
|
+
`)||d&&/[[\]{},]/.test(s))return We(s,e);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(s))return o||d||!s.includes(`
|
|
32
|
+
`)?We(s,e):Dn(t,e,n,r);if(!o&&!d&&i!==re.Scalar.PLAIN&&s.includes(`
|
|
33
|
+
`))return Dn(t,e,n,r);if(En(s)){if(a==="")return e.forceBlockIndent=!0,Dn(t,e,n,r);if(o&&a===l)return We(s,e)}let c=s.replace(/\n+/g,`$&
|
|
34
|
+
${a}`);if(u){let h=f=>f.default&&f.tag!=="tag:yaml.org,2002:str"&&f.test?.test(c),{compat:m,tags:y}=e.doc.schema;if(y.some(h)||m?.some(h))return We(s,e)}return o?c:Ce.foldFlowLines(c,a,Ce.FOLD_FLOW,yn(e,!1))}function nf(t,e,n,r){let{implicitKey:i,inFlow:s}=e,u=typeof t.value=="string"?t:Object.assign({},t,{value:String(t.value)}),{type:o}=t;o!==re.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(u.value)&&(o=re.Scalar.QUOTE_DOUBLE);let a=d=>{switch(d){case re.Scalar.BLOCK_FOLDED:case re.Scalar.BLOCK_LITERAL:return i||s?We(u.value,e):Dn(u,e,n,r);case re.Scalar.QUOTE_DOUBLE:return yt(u.value,e);case re.Scalar.QUOTE_SINGLE:return kr(u.value,e);case re.Scalar.PLAIN:return tf(u,e,n,r);default:return null}},l=a(o);if(l===null){let{defaultKeyType:d,defaultStringType:c}=e.options,h=i&&d||c;if(l=a(h),l===null)throw new Error(`Unsupported default string type ${h}`)}return l}lu.stringifyString=nf});var At=F(Lr=>{"use strict";var rf=cn(),Se=T(),sf=gt(),uf=Et();function of(t,e){let n=Object.assign({blockQuote:!0,commentString:sf.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},t.schema.toStringOptions,e),r;switch(n.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:t,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:typeof n.indent=="number"?" ".repeat(n.indent):" ",inFlow:r,options:n}}function af(t,e){if(e.tag){let i=t.filter(s=>s.tag===e.tag);if(i.length>0)return i.find(s=>s.format===e.format)??i[0]}let n,r;if(Se.isScalar(e)){r=e.value;let i=t.filter(s=>s.identify?.(r));if(i.length>1){let s=i.filter(u=>u.test);s.length>0&&(i=s)}n=i.find(s=>s.format===e.format)??i.find(s=>!s.format)}else r=e,n=t.find(i=>i.nodeClass&&r instanceof i.nodeClass);if(!n){let i=r?.constructor?.name??(r===null?"null":typeof r);throw new Error(`Tag not resolved for ${i} value`)}return n}function lf(t,e,{anchors:n,doc:r}){if(!r.directives)return"";let i=[],s=(Se.isScalar(t)||Se.isCollection(t))&&t.anchor;s&&rf.anchorIsValid(s)&&(n.add(s),i.push(`&${s}`));let u=t.tag??(e.default?null:e.tag);return u&&i.push(r.directives.tagString(u)),i.join(" ")}function cf(t,e,n,r){if(Se.isPair(t))return t.toString(e,n,r);if(Se.isAlias(t)){if(e.doc.directives)return t.toString(e);if(e.resolvedAliases?.has(t))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(t):e.resolvedAliases=new Set([t]),t=t.resolve(e.doc)}let i,s=Se.isNode(t)?t:e.doc.createNode(t,{onTagObj:a=>i=a});i??(i=af(e.doc.schema.tags,s));let u=lf(s,i,e);u.length>0&&(e.indentAtStart=(e.indentAtStart??0)+u.length+1);let o=typeof i.stringify=="function"?i.stringify(s,e,n,r):Se.isScalar(s)?uf.stringifyString(s,e,n,r):s.toString(e,n,r);return u?Se.isScalar(s)||o[0]==="{"||o[0]==="["?`${u} ${o}`:`${u}
|
|
35
|
+
${e.indent}${o}`:o}Lr.createStringifyContext=of;Lr.stringify=cf});var du=F(hu=>{"use strict";var me=T(),cu=V(),fu=At(),bt=gt();function ff({key:t,value:e},n,r,i){let{allNullValues:s,doc:u,indent:o,indentStep:a,options:{commentString:l,indentSeq:d,simpleKeys:c}}=n,h=me.isNode(t)&&t.comment||null;if(c){if(h)throw new Error("With simple keys, key nodes cannot have comments");if(me.isCollection(t)||!me.isNode(t)&&typeof t=="object"){let L="With simple keys, collection cannot be used as a key value";throw new Error(L)}}let m=!c&&(!t||h&&e==null&&!n.inFlow||me.isCollection(t)||(me.isScalar(t)?t.type===cu.Scalar.BLOCK_FOLDED||t.type===cu.Scalar.BLOCK_LITERAL:typeof t=="object"));n=Object.assign({},n,{allNullValues:!1,implicitKey:!m&&(c||!s),indent:o+a});let y=!1,f=!1,p=fu.stringify(t,n,()=>y=!0,()=>f=!0);if(!m&&!n.inFlow&&p.length>1024){if(c)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");m=!0}if(n.inFlow){if(s||e==null)return y&&r&&r(),p===""?"?":m?`? ${p}`:p}else if(s&&!c||e==null&&m)return p=`? ${p}`,h&&!y?p+=bt.lineComment(p,n.indent,l(h)):f&&i&&i(),p;y&&(h=null),m?(h&&(p+=bt.lineComment(p,n.indent,l(h))),p=`? ${p}
|
|
36
|
+
${o}:`):(p=`${p}:`,h&&(p+=bt.lineComment(p,n.indent,l(h))));let g,E,A;me.isNode(e)?(g=!!e.spaceBefore,E=e.commentBefore,A=e.comment):(g=!1,E=null,A=null,e&&typeof e=="object"&&(e=u.createNode(e))),n.implicitKey=!1,!m&&!h&&me.isScalar(e)&&(n.indentAtStart=p.length+1),f=!1,!d&&a.length>=2&&!n.inFlow&&!m&&me.isSeq(e)&&!e.flow&&!e.tag&&!e.anchor&&(n.indent=n.indent.substring(2));let C=!1,S=fu.stringify(e,n,()=>C=!0,()=>f=!0),w=" ";if(h||g||E){if(w=g?`
|
|
37
|
+
`:"",E){let L=l(E);w+=`
|
|
38
|
+
${bt.indentComment(L,n.indent)}`}S===""&&!n.inFlow?w===`
|
|
39
|
+
`&&A&&(w=`
|
|
40
|
+
|
|
41
|
+
`):w+=`
|
|
42
|
+
${n.indent}`}else if(!m&&me.isCollection(e)){let L=S[0],_=S.indexOf(`
|
|
43
|
+
`),M=_!==-1,se=n.inFlow??e.flow??e.items.length===0;if(M||!se){let O=!1;if(M&&(L==="&"||L==="!")){let $=S.indexOf(" ");L==="&"&&$!==-1&&$<_&&S[$+1]==="!"&&($=S.indexOf(" ",$+1)),($===-1||_<$)&&(O=!0)}O||(w=`
|
|
44
|
+
${n.indent}`)}}else(S===""||S[0]===`
|
|
45
|
+
`)&&(w="");return p+=w+S,n.inFlow?C&&r&&r():A&&!C?p+=bt.lineComment(p,n.indent,l(A)):f&&i&&i(),p}hu.stringifyPair=ff});var Pr=F(qr=>{"use strict";var pu=Gt("process");function hf(t,...e){t==="debug"&&console.log(...e)}function df(t,e){(t==="debug"||t==="warn")&&(typeof pu.emitWarning=="function"?pu.emitWarning(e):console.warn(e))}qr.debug=hf;qr.warn=df});var Sn=F(Cn=>{"use strict";var Ct=T(),mu=V(),An="<<",bn={identify:t=>t===An||typeof t=="symbol"&&t.description===An,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new mu.Scalar(Symbol(An)),{addToJSMap:gu}),stringify:()=>An},pf=(t,e)=>(bn.identify(e)||Ct.isScalar(e)&&(!e.type||e.type===mu.Scalar.PLAIN)&&bn.identify(e.value))&&t?.doc.schema.tags.some(n=>n.tag===bn.tag&&n.default);function gu(t,e,n){if(n=t&&Ct.isAlias(n)?n.resolve(t.doc):n,Ct.isSeq(n))for(let r of n.items)Rr(t,e,r);else if(Array.isArray(n))for(let r of n)Rr(t,e,r);else Rr(t,e,n)}function Rr(t,e,n){let r=t&&Ct.isAlias(n)?n.resolve(t.doc):n;if(!Ct.isMap(r))throw new Error("Merge sources must be maps or map aliases");let i=r.toJSON(null,t,Map);for(let[s,u]of i)e instanceof Map?e.has(s)||e.set(s,u):e instanceof Set?e.add(s):Object.prototype.hasOwnProperty.call(e,s)||Object.defineProperty(e,s,{value:u,writable:!0,enumerable:!0,configurable:!0});return e}Cn.addMergeToJSMap=gu;Cn.isMergeKey=pf;Cn.merge=bn});var Mr=F(Eu=>{"use strict";var mf=Pr(),Du=Sn(),gf=At(),yu=T(),$r=Ae();function Df(t,e,{key:n,value:r}){if(yu.isNode(n)&&n.addToJSMap)n.addToJSMap(t,e,r);else if(Du.isMergeKey(t,n))Du.addMergeToJSMap(t,e,r);else{let i=$r.toJS(n,"",t);if(e instanceof Map)e.set(i,$r.toJS(r,i,t));else if(e instanceof Set)e.add(i);else{let s=yf(n,i,t),u=$r.toJS(r,s,t);s in e?Object.defineProperty(e,s,{value:u,writable:!0,enumerable:!0,configurable:!0}):e[s]=u}}return e}function yf(t,e,n){if(e===null)return"";if(typeof e!="object")return String(e);if(yu.isNode(t)&&n?.doc){let r=gf.createStringifyContext(n.doc,{});r.anchors=new Set;for(let s of n.anchors.keys())r.anchors.add(s.anchor);r.inFlow=!0,r.inStringifyKey=!0;let i=t.toString(r);if(!n.mapKeyWarned){let s=JSON.stringify(i);s.length>40&&(s=s.substring(0,36)+'..."'),mf.warn(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${s}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return i}return JSON.stringify(e)}Eu.addPairToJSMap=Df});var Fe=F(jr=>{"use strict";var Au=mt(),Ef=du(),Af=Mr(),Fn=T();function bf(t,e,n){let r=Au.createNode(t,void 0,n),i=Au.createNode(e,void 0,n);return new _n(r,i)}var _n=class t{constructor(e,n=null){Object.defineProperty(this,Fn.NODE_TYPE,{value:Fn.PAIR}),this.key=e,this.value=n}clone(e){let{key:n,value:r}=this;return Fn.isNode(n)&&(n=n.clone(e)),Fn.isNode(r)&&(r=r.clone(e)),new t(n,r)}toJSON(e,n){let r=n?.mapAsMap?new Map:{};return Af.addPairToJSMap(n,r,this)}toString(e,n,r){return e?.doc?Ef.stringifyPair(this,e,n,r):JSON.stringify(this)}};jr.Pair=_n;jr.createPair=bf});var Kr=F(Cu=>{"use strict";var $e=T(),bu=At(),wn=gt();function Cf(t,e,n){return(e.inFlow??t.flow?Ff:Sf)(t,e,n)}function Sf({comment:t,items:e},n,{blockItemPrefix:r,flowChars:i,itemIndent:s,onChompKeep:u,onComment:o}){let{indent:a,options:{commentString:l}}=n,d=Object.assign({},n,{indent:s,type:null}),c=!1,h=[];for(let y=0;y<e.length;++y){let f=e[y],p=null;if($e.isNode(f))!c&&f.spaceBefore&&h.push(""),vn(n,h,f.commentBefore,c),f.comment&&(p=f.comment);else if($e.isPair(f)){let E=$e.isNode(f.key)?f.key:null;E&&(!c&&E.spaceBefore&&h.push(""),vn(n,h,E.commentBefore,c))}c=!1;let g=bu.stringify(f,d,()=>p=null,()=>c=!0);p&&(g+=wn.lineComment(g,s,l(p))),c&&p&&(c=!1),h.push(r+g)}let m;if(h.length===0)m=i.start+i.end;else{m=h[0];for(let y=1;y<h.length;++y){let f=h[y];m+=f?`
|
|
46
|
+
${a}${f}`:`
|
|
47
|
+
`}}return t?(m+=`
|
|
48
|
+
`+wn.indentComment(l(t),a),o&&o()):c&&u&&u(),m}function Ff({items:t},e,{flowChars:n,itemIndent:r}){let{indent:i,indentStep:s,flowCollectionPadding:u,options:{commentString:o}}=e;r+=s;let a=Object.assign({},e,{indent:r,inFlow:!0,type:null}),l=!1,d=0,c=[];for(let y=0;y<t.length;++y){let f=t[y],p=null;if($e.isNode(f))f.spaceBefore&&c.push(""),vn(e,c,f.commentBefore,!1),f.comment&&(p=f.comment);else if($e.isPair(f)){let E=$e.isNode(f.key)?f.key:null;E&&(E.spaceBefore&&c.push(""),vn(e,c,E.commentBefore,!1),E.comment&&(l=!0));let A=$e.isNode(f.value)?f.value:null;A?(A.comment&&(p=A.comment),A.commentBefore&&(l=!0)):f.value==null&&E?.comment&&(p=E.comment)}p&&(l=!0);let g=bu.stringify(f,a,()=>p=null);y<t.length-1&&(g+=","),p&&(g+=wn.lineComment(g,r,o(p))),!l&&(c.length>d||g.includes(`
|
|
49
|
+
`))&&(l=!0),c.push(g),d=c.length}let{start:h,end:m}=n;if(c.length===0)return h+m;if(!l){let y=c.reduce((f,p)=>f+p.length+2,2);l=e.options.lineWidth>0&&y>e.options.lineWidth}if(l){let y=h;for(let f of c)y+=f?`
|
|
50
|
+
${s}${i}${f}`:`
|
|
51
|
+
`;return`${y}
|
|
52
|
+
${i}${m}`}else return`${h}${u}${c.join(" ")}${u}${m}`}function vn({indent:t,options:{commentString:e}},n,r,i){if(r&&i&&(r=r.replace(/^\n+/,"")),r){let s=wn.indentComment(e(r),t);n.push(s.trimStart())}}Cu.stringifyCollection=Cf});var we=F(Ur=>{"use strict";var _f=Kr(),wf=Mr(),vf=pn(),_e=T(),Bn=Fe(),Bf=V();function St(t,e){let n=_e.isScalar(e)?e.value:e;for(let r of t)if(_e.isPair(r)&&(r.key===e||r.key===n||_e.isScalar(r.key)&&r.key.value===n))return r}var Vr=class extends vf.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(_e.MAP,e),this.items=[]}static from(e,n,r){let{keepUndefined:i,replacer:s}=r,u=new this(e),o=(a,l)=>{if(typeof s=="function")l=s.call(n,a,l);else if(Array.isArray(s)&&!s.includes(a))return;(l!==void 0||i)&&u.items.push(Bn.createPair(a,l,r))};if(n instanceof Map)for(let[a,l]of n)o(a,l);else if(n&&typeof n=="object")for(let a of Object.keys(n))o(a,n[a]);return typeof e.sortMapEntries=="function"&&u.items.sort(e.sortMapEntries),u}add(e,n){let r;_e.isPair(e)?r=e:!e||typeof e!="object"||!("key"in e)?r=new Bn.Pair(e,e?.value):r=new Bn.Pair(e.key,e.value);let i=St(this.items,r.key),s=this.schema?.sortMapEntries;if(i){if(!n)throw new Error(`Key ${r.key} already set`);_e.isScalar(i.value)&&Bf.isScalarValue(r.value)?i.value.value=r.value:i.value=r.value}else if(s){let u=this.items.findIndex(o=>s(r,o)<0);u===-1?this.items.push(r):this.items.splice(u,0,r)}else this.items.push(r)}delete(e){let n=St(this.items,e);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(e,n){let i=St(this.items,e)?.value;return(!n&&_e.isScalar(i)?i.value:i)??void 0}has(e){return!!St(this.items,e)}set(e,n){this.add(new Bn.Pair(e,n),!0)}toJSON(e,n,r){let i=r?new r:n?.mapAsMap?new Map:{};n?.onCreate&&n.onCreate(i);for(let s of this.items)wf.addPairToJSMap(n,i,s);return i}toString(e,n,r){if(!e)return JSON.stringify(this);for(let i of this.items)if(!_e.isPair(i))throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),_f.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:r,onComment:n})}};Ur.YAMLMap=Vr;Ur.findPair=St});var ze=F(Fu=>{"use strict";var Nf=T(),Su=we(),Of={collection:"map",default:!0,nodeClass:Su.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(t,e){return Nf.isMap(t)||e("Expected a mapping for this tag"),t},createNode:(t,e,n)=>Su.YAMLMap.from(t,e,n)};Fu.map=Of});var ve=F(_u=>{"use strict";var If=mt(),Tf=Kr(),kf=pn(),On=T(),xf=V(),Lf=Ae(),Jr=class extends kf.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(On.SEQ,e),this.items=[]}add(e){this.items.push(e)}delete(e){let n=Nn(e);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(e,n){let r=Nn(e);if(typeof r!="number")return;let i=this.items[r];return!n&&On.isScalar(i)?i.value:i}has(e){let n=Nn(e);return typeof n=="number"&&n<this.items.length}set(e,n){let r=Nn(e);if(typeof r!="number")throw new Error(`Expected a valid index, not ${e}.`);let i=this.items[r];On.isScalar(i)&&xf.isScalarValue(n)?i.value=n:this.items[r]=n}toJSON(e,n){let r=[];n?.onCreate&&n.onCreate(r);let i=0;for(let s of this.items)r.push(Lf.toJS(s,String(i++),n));return r}toString(e,n,r){return e?Tf.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:r,onComment:n}):JSON.stringify(this)}static from(e,n,r){let{replacer:i}=r,s=new this(e);if(n&&Symbol.iterator in Object(n)){let u=0;for(let o of n){if(typeof i=="function"){let a=n instanceof Set?o:String(u++);o=i.call(n,a,o)}s.items.push(If.createNode(o,void 0,r))}}return s}};function Nn(t){let e=On.isScalar(t)?t.value:t;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}_u.YAMLSeq=Jr});var Qe=F(vu=>{"use strict";var qf=T(),wu=ve(),Pf={collection:"seq",default:!0,nodeClass:wu.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(t,e){return qf.isSeq(t)||e("Expected a sequence for this tag"),t},createNode:(t,e,n)=>wu.YAMLSeq.from(t,e,n)};vu.seq=Pf});var Ft=F(Bu=>{"use strict";var Rf=Et(),$f={identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify(t,e,n,r){return e=Object.assign({actualString:!0},e),Rf.stringifyString(t,e,n,r)}};Bu.string=$f});var In=F(Iu=>{"use strict";var Nu=V(),Ou={identify:t=>t==null,createNode:()=>new Nu.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new Nu.Scalar(null),stringify:({source:t},e)=>typeof t=="string"&&Ou.test.test(t)?t:e.options.nullStr};Iu.nullTag=Ou});var Yr=F(ku=>{"use strict";var Mf=V(),Tu={identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new Mf.Scalar(t[0]==="t"||t[0]==="T"),stringify({source:t,value:e},n){if(t&&Tu.test.test(t)){let r=t[0]==="t"||t[0]==="T";if(e===r)return t}return e?n.options.trueStr:n.options.falseStr}};ku.boolTag=Tu});var Xe=F(xu=>{"use strict";function jf({format:t,minFractionDigits:e,tag:n,value:r}){if(typeof r=="bigint")return String(r);let i=typeof r=="number"?r:Number(r);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let s=Object.is(r,-0)?"-0":JSON.stringify(r);if(!t&&e&&(!n||n==="tag:yaml.org,2002:float")&&/^\d/.test(s)){let u=s.indexOf(".");u<0&&(u=s.length,s+=".");let o=e-(s.length-u-1);for(;o-- >0;)s+="0"}return s}xu.stringifyNumber=jf});var Hr=F(Tn=>{"use strict";var Kf=V(),Gr=Xe(),Vf={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Gr.stringifyNumber},Uf={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t),stringify(t){let e=Number(t.value);return isFinite(e)?e.toExponential():Gr.stringifyNumber(t)}},Jf={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(t){let e=new Kf.Scalar(parseFloat(t)),n=t.indexOf(".");return n!==-1&&t[t.length-1]==="0"&&(e.minFractionDigits=t.length-n-1),e},stringify:Gr.stringifyNumber};Tn.float=Jf;Tn.floatExp=Uf;Tn.floatNaN=Vf});var zr=F(xn=>{"use strict";var Lu=Xe(),kn=t=>typeof t=="bigint"||Number.isInteger(t),Wr=(t,e,n,{intAsBigInt:r})=>r?BigInt(t):parseInt(t.substring(e),n);function qu(t,e,n){let{value:r}=t;return kn(r)&&r>=0?n+r.toString(e):Lu.stringifyNumber(t)}var Yf={identify:t=>kn(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(t,e,n)=>Wr(t,2,8,n),stringify:t=>qu(t,8,"0o")},Gf={identify:kn,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(t,e,n)=>Wr(t,0,10,n),stringify:Lu.stringifyNumber},Hf={identify:t=>kn(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(t,e,n)=>Wr(t,2,16,n),stringify:t=>qu(t,16,"0x")};xn.int=Gf;xn.intHex=Hf;xn.intOct=Yf});var Ru=F(Pu=>{"use strict";var Wf=ze(),zf=In(),Qf=Qe(),Xf=Ft(),Zf=Yr(),Qr=Hr(),Xr=zr(),e0=[Wf.map,Qf.seq,Xf.string,zf.nullTag,Zf.boolTag,Xr.intOct,Xr.int,Xr.intHex,Qr.floatNaN,Qr.floatExp,Qr.float];Pu.schema=e0});var ju=F(Mu=>{"use strict";var t0=V(),n0=ze(),r0=Qe();function $u(t){return typeof t=="bigint"||Number.isInteger(t)}var Ln=({value:t})=>JSON.stringify(t),i0=[{identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify:Ln},{identify:t=>t==null,createNode:()=>new t0.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Ln},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:t=>t==="true",stringify:Ln},{identify:$u,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(t,e,{intAsBigInt:n})=>n?BigInt(t):parseInt(t,10),stringify:({value:t})=>$u(t)?t.toString():JSON.stringify(t)},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:t=>parseFloat(t),stringify:Ln}],s0={default:!0,tag:"",test:/^/,resolve(t,e){return e(`Unresolved plain scalar ${JSON.stringify(t)}`),t}},u0=[n0.map,r0.seq].concat(i0,s0);Mu.schema=u0});var ei=F(Ku=>{"use strict";var _t=Gt("buffer"),Zr=V(),o0=Et(),a0={identify:t=>t instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(t,e){if(typeof _t.Buffer=="function")return _t.Buffer.from(t,"base64");if(typeof atob=="function"){let n=atob(t.replace(/[\n\r]/g,"")),r=new Uint8Array(n.length);for(let i=0;i<n.length;++i)r[i]=n.charCodeAt(i);return r}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),t},stringify({comment:t,type:e,value:n},r,i,s){if(!n)return"";let u=n,o;if(typeof _t.Buffer=="function")o=u instanceof _t.Buffer?u.toString("base64"):_t.Buffer.from(u.buffer).toString("base64");else if(typeof btoa=="function"){let a="";for(let l=0;l<u.length;++l)a+=String.fromCharCode(u[l]);o=btoa(a)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e??(e=Zr.Scalar.BLOCK_LITERAL),e!==Zr.Scalar.QUOTE_DOUBLE){let a=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),l=Math.ceil(o.length/a),d=new Array(l);for(let c=0,h=0;c<l;++c,h+=a)d[c]=o.substr(h,a);o=d.join(e===Zr.Scalar.BLOCK_LITERAL?`
|
|
53
|
+
`:" ")}return o0.stringifyString({comment:t,type:e,value:o},r,i,s)}};Ku.binary=a0});var Rn=F(Pn=>{"use strict";var qn=T(),ti=Fe(),l0=V(),c0=ve();function Vu(t,e){if(qn.isSeq(t))for(let n=0;n<t.items.length;++n){let r=t.items[n];if(!qn.isPair(r)){if(qn.isMap(r)){r.items.length>1&&e("Each pair must have its own sequence indicator");let i=r.items[0]||new ti.Pair(new l0.Scalar(null));if(r.commentBefore&&(i.key.commentBefore=i.key.commentBefore?`${r.commentBefore}
|
|
54
|
+
${i.key.commentBefore}`:r.commentBefore),r.comment){let s=i.value??i.key;s.comment=s.comment?`${r.comment}
|
|
55
|
+
${s.comment}`:r.comment}r=i}t.items[n]=qn.isPair(r)?r:new ti.Pair(r)}}else e("Expected a sequence for this tag");return t}function Uu(t,e,n){let{replacer:r}=n,i=new c0.YAMLSeq(t);i.tag="tag:yaml.org,2002:pairs";let s=0;if(e&&Symbol.iterator in Object(e))for(let u of e){typeof r=="function"&&(u=r.call(e,String(s++),u));let o,a;if(Array.isArray(u))if(u.length===2)o=u[0],a=u[1];else throw new TypeError(`Expected [key, value] tuple: ${u}`);else if(u&&u instanceof Object){let l=Object.keys(u);if(l.length===1)o=l[0],a=u[o];else throw new TypeError(`Expected tuple with one key, not ${l.length} keys`)}else o=u;i.items.push(ti.createPair(o,a,n))}return i}var f0={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Vu,createNode:Uu};Pn.createPairs=Uu;Pn.pairs=f0;Pn.resolvePairs=Vu});var ii=F(ri=>{"use strict";var Ju=T(),ni=Ae(),wt=we(),h0=ve(),Yu=Rn(),Me=class t extends h0.YAMLSeq{constructor(){super(),this.add=wt.YAMLMap.prototype.add.bind(this),this.delete=wt.YAMLMap.prototype.delete.bind(this),this.get=wt.YAMLMap.prototype.get.bind(this),this.has=wt.YAMLMap.prototype.has.bind(this),this.set=wt.YAMLMap.prototype.set.bind(this),this.tag=t.tag}toJSON(e,n){if(!n)return super.toJSON(e);let r=new Map;n?.onCreate&&n.onCreate(r);for(let i of this.items){let s,u;if(Ju.isPair(i)?(s=ni.toJS(i.key,"",n),u=ni.toJS(i.value,s,n)):s=ni.toJS(i,"",n),r.has(s))throw new Error("Ordered maps must not include duplicate keys");r.set(s,u)}return r}static from(e,n,r){let i=Yu.createPairs(e,n,r),s=new this;return s.items=i.items,s}};Me.tag="tag:yaml.org,2002:omap";var d0={collection:"seq",identify:t=>t instanceof Map,nodeClass:Me,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,e){let n=Yu.resolvePairs(t,e),r=[];for(let{key:i}of n.items)Ju.isScalar(i)&&(r.includes(i.value)?e(`Ordered maps must not include duplicate keys: ${i.value}`):r.push(i.value));return Object.assign(new Me,n)},createNode:(t,e,n)=>Me.from(t,e,n)};ri.YAMLOMap=Me;ri.omap=d0});var Qu=F(si=>{"use strict";var Gu=V();function Hu({value:t,source:e},n){return e&&(t?Wu:zu).test.test(e)?e:t?n.options.trueStr:n.options.falseStr}var Wu={identify:t=>t===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new Gu.Scalar(!0),stringify:Hu},zu={identify:t=>t===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new Gu.Scalar(!1),stringify:Hu};si.falseTag=zu;si.trueTag=Wu});var Xu=F($n=>{"use strict";var p0=V(),ui=Xe(),m0={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:ui.stringifyNumber},g0={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t.replace(/_/g,"")),stringify(t){let e=Number(t.value);return isFinite(e)?e.toExponential():ui.stringifyNumber(t)}},D0={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){let e=new p0.Scalar(parseFloat(t.replace(/_/g,""))),n=t.indexOf(".");if(n!==-1){let r=t.substring(n+1).replace(/_/g,"");r[r.length-1]==="0"&&(e.minFractionDigits=r.length)}return e},stringify:ui.stringifyNumber};$n.float=D0;$n.floatExp=g0;$n.floatNaN=m0});var eo=F(Bt=>{"use strict";var Zu=Xe(),vt=t=>typeof t=="bigint"||Number.isInteger(t);function Mn(t,e,n,{intAsBigInt:r}){let i=t[0];if((i==="-"||i==="+")&&(e+=1),t=t.substring(e).replace(/_/g,""),r){switch(n){case 2:t=`0b${t}`;break;case 8:t=`0o${t}`;break;case 16:t=`0x${t}`;break}let u=BigInt(t);return i==="-"?BigInt(-1)*u:u}let s=parseInt(t,n);return i==="-"?-1*s:s}function oi(t,e,n){let{value:r}=t;if(vt(r)){let i=r.toString(e);return r<0?"-"+n+i.substr(1):n+i}return Zu.stringifyNumber(t)}var y0={identify:vt,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(t,e,n)=>Mn(t,2,2,n),stringify:t=>oi(t,2,"0b")},E0={identify:vt,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(t,e,n)=>Mn(t,1,8,n),stringify:t=>oi(t,8,"0")},A0={identify:vt,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(t,e,n)=>Mn(t,0,10,n),stringify:Zu.stringifyNumber},b0={identify:vt,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(t,e,n)=>Mn(t,2,16,n),stringify:t=>oi(t,16,"0x")};Bt.int=A0;Bt.intBin=y0;Bt.intHex=b0;Bt.intOct=E0});var li=F(ai=>{"use strict";var Vn=T(),jn=Fe(),Kn=we(),je=class t extends Kn.YAMLMap{constructor(e){super(e),this.tag=t.tag}add(e){let n;Vn.isPair(e)?n=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?n=new jn.Pair(e.key,null):n=new jn.Pair(e,null),Kn.findPair(this.items,n.key)||this.items.push(n)}get(e,n){let r=Kn.findPair(this.items,e);return!n&&Vn.isPair(r)?Vn.isScalar(r.key)?r.key.value:r.key:r}set(e,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);let r=Kn.findPair(this.items,e);r&&!n?this.items.splice(this.items.indexOf(r),1):!r&&n&&this.items.push(new jn.Pair(e))}toJSON(e,n){return super.toJSON(e,n,Set)}toString(e,n,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),n,r);throw new Error("Set items must all have null values")}static from(e,n,r){let{replacer:i}=r,s=new this(e);if(n&&Symbol.iterator in Object(n))for(let u of n)typeof i=="function"&&(u=i.call(n,u,u)),s.items.push(jn.createPair(u,null,r));return s}};je.tag="tag:yaml.org,2002:set";var C0={collection:"map",identify:t=>t instanceof Set,nodeClass:je,default:!1,tag:"tag:yaml.org,2002:set",createNode:(t,e,n)=>je.from(t,e,n),resolve(t,e){if(Vn.isMap(t)){if(t.hasAllNullValues(!0))return Object.assign(new je,t);e("Set items must all have null values")}else e("Expected a mapping for this tag");return t}};ai.YAMLSet=je;ai.set=C0});var fi=F(Un=>{"use strict";var S0=Xe();function ci(t,e){let n=t[0],r=n==="-"||n==="+"?t.substring(1):t,i=u=>e?BigInt(u):Number(u),s=r.replace(/_/g,"").split(":").reduce((u,o)=>u*i(60)+i(o),i(0));return n==="-"?i(-1)*s:s}function to(t){let{value:e}=t,n=u=>u;if(typeof e=="bigint")n=u=>BigInt(u);else if(isNaN(e)||!isFinite(e))return S0.stringifyNumber(t);let r="";e<0&&(r="-",e*=n(-1));let i=n(60),s=[e%i];return e<60?s.unshift(0):(e=(e-s[0])/i,s.unshift(e%i),e>=60&&(e=(e-s[0])/i,s.unshift(e))),r+s.map(u=>String(u).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var F0={identify:t=>typeof t=="bigint"||Number.isInteger(t),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(t,e,{intAsBigInt:n})=>ci(t,n),stringify:to},_0={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:t=>ci(t,!1),stringify:to},no={identify:t=>t instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(t){let e=t.match(no.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,n,r,i,s,u,o]=e.map(Number),a=e[7]?Number((e[7]+"00").substr(1,3)):0,l=Date.UTC(n,r-1,i,s||0,u||0,o||0,a),d=e[8];if(d&&d!=="Z"){let c=ci(d,!1);Math.abs(c)<30&&(c*=60),l-=6e4*c}return new Date(l)},stringify:({value:t})=>t?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};Un.floatTime=_0;Un.intTime=F0;Un.timestamp=no});var so=F(io=>{"use strict";var w0=ze(),v0=In(),B0=Qe(),N0=Ft(),O0=ei(),ro=Qu(),hi=Xu(),Jn=eo(),I0=Sn(),T0=ii(),k0=Rn(),x0=li(),di=fi(),L0=[w0.map,B0.seq,N0.string,v0.nullTag,ro.trueTag,ro.falseTag,Jn.intBin,Jn.intOct,Jn.int,Jn.intHex,hi.floatNaN,hi.floatExp,hi.float,O0.binary,I0.merge,T0.omap,k0.pairs,x0.set,di.intTime,di.floatTime,di.timestamp];io.schema=L0});var go=F(gi=>{"use strict";var lo=ze(),q0=In(),co=Qe(),P0=Ft(),R0=Yr(),pi=Hr(),mi=zr(),$0=Ru(),M0=ju(),fo=ei(),Nt=Sn(),ho=ii(),po=Rn(),uo=so(),mo=li(),Yn=fi(),oo=new Map([["core",$0.schema],["failsafe",[lo.map,co.seq,P0.string]],["json",M0.schema],["yaml11",uo.schema],["yaml-1.1",uo.schema]]),ao={binary:fo.binary,bool:R0.boolTag,float:pi.float,floatExp:pi.floatExp,floatNaN:pi.floatNaN,floatTime:Yn.floatTime,int:mi.int,intHex:mi.intHex,intOct:mi.intOct,intTime:Yn.intTime,map:lo.map,merge:Nt.merge,null:q0.nullTag,omap:ho.omap,pairs:po.pairs,seq:co.seq,set:mo.set,timestamp:Yn.timestamp},j0={"tag:yaml.org,2002:binary":fo.binary,"tag:yaml.org,2002:merge":Nt.merge,"tag:yaml.org,2002:omap":ho.omap,"tag:yaml.org,2002:pairs":po.pairs,"tag:yaml.org,2002:set":mo.set,"tag:yaml.org,2002:timestamp":Yn.timestamp};function K0(t,e,n){let r=oo.get(e);if(r&&!t)return n&&!r.includes(Nt.merge)?r.concat(Nt.merge):r.slice();let i=r;if(!i)if(Array.isArray(t))i=[];else{let s=Array.from(oo.keys()).filter(u=>u!=="yaml11").map(u=>JSON.stringify(u)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${s} or define customTags array`)}if(Array.isArray(t))for(let s of t)i=i.concat(s);else typeof t=="function"&&(i=t(i.slice()));return n&&(i=i.concat(Nt.merge)),i.reduce((s,u)=>{let o=typeof u=="string"?ao[u]:u;if(!o){let a=JSON.stringify(u),l=Object.keys(ao).map(d=>JSON.stringify(d)).join(", ");throw new Error(`Unknown custom tag ${a}; use one of ${l}`)}return s.includes(o)||s.push(o),s},[])}gi.coreKnownTags=j0;gi.getTags=K0});var Ei=F(Do=>{"use strict";var Di=T(),V0=ze(),U0=Qe(),J0=Ft(),Gn=go(),Y0=(t,e)=>t.key<e.key?-1:t.key>e.key?1:0,yi=class t{constructor({compat:e,customTags:n,merge:r,resolveKnownTags:i,schema:s,sortMapEntries:u,toStringDefaults:o}){this.compat=Array.isArray(e)?Gn.getTags(e,"compat"):e?Gn.getTags(null,e):null,this.name=typeof s=="string"&&s||"core",this.knownTags=i?Gn.coreKnownTags:{},this.tags=Gn.getTags(n,this.name,r),this.toStringOptions=o??null,Object.defineProperty(this,Di.MAP,{value:V0.map}),Object.defineProperty(this,Di.SCALAR,{value:J0.string}),Object.defineProperty(this,Di.SEQ,{value:U0.seq}),this.sortMapEntries=typeof u=="function"?u:u===!0?Y0:null}clone(){let e=Object.create(t.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}};Do.Schema=yi});var Eo=F(yo=>{"use strict";var G0=T(),Ai=At(),Ot=gt();function H0(t,e){let n=[],r=e.directives===!0;if(e.directives!==!1&&t.directives){let a=t.directives.toString(t);a?(n.push(a),r=!0):t.directives.docStart&&(r=!0)}r&&n.push("---");let i=Ai.createStringifyContext(t,e),{commentString:s}=i.options;if(t.commentBefore){n.length!==1&&n.unshift("");let a=s(t.commentBefore);n.unshift(Ot.indentComment(a,""))}let u=!1,o=null;if(t.contents){if(G0.isNode(t.contents)){if(t.contents.spaceBefore&&r&&n.push(""),t.contents.commentBefore){let d=s(t.contents.commentBefore);n.push(Ot.indentComment(d,""))}i.forceBlockIndent=!!t.comment,o=t.contents.comment}let a=o?void 0:()=>u=!0,l=Ai.stringify(t.contents,i,()=>o=null,a);o&&(l+=Ot.lineComment(l,"",s(o))),(l[0]==="|"||l[0]===">")&&n[n.length-1]==="---"?n[n.length-1]=`--- ${l}`:n.push(l)}else n.push(Ai.stringify(t.contents,i));if(t.directives?.docEnd)if(t.comment){let a=s(t.comment);a.includes(`
|
|
56
|
+
`)?(n.push("..."),n.push(Ot.indentComment(a,""))):n.push(`... ${a}`)}else n.push("...");else{let a=t.comment;a&&u&&(a=a.replace(/^\n+/,"")),a&&((!u||o)&&n[n.length-1]!==""&&n.push(""),n.push(Ot.indentComment(s(a),"")))}return n.join(`
|
|
57
|
+
`)+`
|
|
58
|
+
`}yo.stringifyDocument=H0});var It=F(Ao=>{"use strict";var W0=pt(),Ze=pn(),ee=T(),z0=Fe(),Q0=Ae(),X0=Ei(),Z0=Eo(),bi=cn(),eh=_r(),th=mt(),Ci=Fr(),Si=class t{constructor(e,n,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,ee.NODE_TYPE,{value:ee.DOC});let i=null;typeof n=="function"||Array.isArray(n)?i=n:r===void 0&&n&&(r=n,n=void 0);let s=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=s;let{version:u}=s;r?._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(u=this.directives.yaml.version)):this.directives=new Ci.Directives({version:u}),this.setSchema(u,r),this.contents=e===void 0?null:this.createNode(e,i,r)}clone(){let e=Object.create(t.prototype,{[ee.NODE_TYPE]:{value:ee.DOC}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=ee.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){et(this.contents)&&this.contents.add(e)}addIn(e,n){et(this.contents)&&this.contents.addIn(e,n)}createAlias(e,n){if(!e.anchor){let r=bi.anchorNames(this);e.anchor=!n||r.has(n)?bi.findNewAnchor(n||"a",r):n}return new W0.Alias(e.anchor)}createNode(e,n,r){let i;if(typeof n=="function")e=n.call({"":e},"",e),i=n;else if(Array.isArray(n)){let p=E=>typeof E=="number"||E instanceof String||E instanceof Number,g=n.filter(p).map(String);g.length>0&&(n=n.concat(g)),i=n}else r===void 0&&n&&(r=n,n=void 0);let{aliasDuplicateObjects:s,anchorPrefix:u,flow:o,keepUndefined:a,onTagObj:l,tag:d}=r??{},{onAnchor:c,setAnchors:h,sourceObjects:m}=bi.createNodeAnchors(this,u||"a"),y={aliasDuplicateObjects:s??!0,keepUndefined:a??!1,onAnchor:c,onTagObj:l,replacer:i,schema:this.schema,sourceObjects:m},f=th.createNode(e,d,y);return o&&ee.isCollection(f)&&(f.flow=!0),h(),f}createPair(e,n,r={}){let i=this.createNode(e,null,r),s=this.createNode(n,null,r);return new z0.Pair(i,s)}delete(e){return et(this.contents)?this.contents.delete(e):!1}deleteIn(e){return Ze.isEmptyPath(e)?this.contents==null?!1:(this.contents=null,!0):et(this.contents)?this.contents.deleteIn(e):!1}get(e,n){return ee.isCollection(this.contents)?this.contents.get(e,n):void 0}getIn(e,n){return Ze.isEmptyPath(e)?!n&&ee.isScalar(this.contents)?this.contents.value:this.contents:ee.isCollection(this.contents)?this.contents.getIn(e,n):void 0}has(e){return ee.isCollection(this.contents)?this.contents.has(e):!1}hasIn(e){return Ze.isEmptyPath(e)?this.contents!==void 0:ee.isCollection(this.contents)?this.contents.hasIn(e):!1}set(e,n){this.contents==null?this.contents=Ze.collectionFromPath(this.schema,[e],n):et(this.contents)&&this.contents.set(e,n)}setIn(e,n){Ze.isEmptyPath(e)?this.contents=n:this.contents==null?this.contents=Ze.collectionFromPath(this.schema,Array.from(e),n):et(this.contents)&&this.contents.setIn(e,n)}setSchema(e,n={}){typeof e=="number"&&(e=String(e));let r;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new Ci.Directives({version:"1.1"}),r={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new Ci.Directives({version:e}),r={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{let i=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${i}`)}}if(n.schema instanceof Object)this.schema=n.schema;else if(r)this.schema=new X0.Schema(Object.assign(r,n));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:n,mapAsMap:r,maxAliasCount:i,onAnchor:s,reviver:u}={}){let o={anchors:new Map,doc:this,keep:!e,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100},a=Q0.toJS(this.contents,n??"",o);if(typeof s=="function")for(let{count:l,res:d}of o.anchors.values())s(d,l);return typeof u=="function"?eh.applyReviver(u,{"":a},"",a):a}toJSON(e,n){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:n})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let n=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${n}`)}return Z0.stringifyDocument(this,e)}};function et(t){if(ee.isCollection(t))return!0;throw new Error("Expected a YAML collection as document contents")}Ao.Document=Si});var xt=F(kt=>{"use strict";var Tt=class extends Error{constructor(e,n,r,i){super(),this.name=e,this.code=r,this.message=i,this.pos=n}},Fi=class extends Tt{constructor(e,n,r){super("YAMLParseError",e,n,r)}},_i=class extends Tt{constructor(e,n,r){super("YAMLWarning",e,n,r)}},nh=(t,e)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(o=>e.linePos(o));let{line:r,col:i}=n.linePos[0];n.message+=` at line ${r}, column ${i}`;let s=i-1,u=t.substring(e.lineStarts[r-1],e.lineStarts[r]).replace(/[\n\r]+$/,"");if(s>=60&&u.length>80){let o=Math.min(s-39,u.length-79);u="\u2026"+u.substring(o),s-=o-1}if(u.length>80&&(u=u.substring(0,79)+"\u2026"),r>1&&/^ *$/.test(u.substring(0,s))){let o=t.substring(e.lineStarts[r-2],e.lineStarts[r-1]);o.length>80&&(o=o.substring(0,79)+`\u2026
|
|
59
|
+
`),u=o+u}if(/[^ ]/.test(u)){let o=1,a=n.linePos[1];a?.line===r&&a.col>i&&(o=Math.max(1,Math.min(a.col-i,80-s)));let l=" ".repeat(s)+"^".repeat(o);n.message+=`:
|
|
60
|
+
|
|
61
|
+
${u}
|
|
62
|
+
${l}
|
|
63
|
+
`}};kt.YAMLError=Tt;kt.YAMLParseError=Fi;kt.YAMLWarning=_i;kt.prettifyError=nh});var Lt=F(bo=>{"use strict";function rh(t,{flow:e,indicator:n,next:r,offset:i,onError:s,parentIndent:u,startOnNewline:o}){let a=!1,l=o,d=o,c="",h="",m=!1,y=!1,f=null,p=null,g=null,E=null,A=null,C=null,S=null;for(let _ of t)switch(y&&(_.type!=="space"&&_.type!=="newline"&&_.type!=="comma"&&s(_.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),y=!1),f&&(l&&_.type!=="comment"&&_.type!=="newline"&&s(f,"TAB_AS_INDENT","Tabs are not allowed as indentation"),f=null),_.type){case"space":!e&&(n!=="doc-start"||r?.type!=="flow-collection")&&_.source.includes(" ")&&(f=_),d=!0;break;case"comment":{d||s(_,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let M=_.source.substring(1)||" ";c?c+=h+M:c=M,h="",l=!1;break}case"newline":l?c?c+=_.source:(!C||n!=="seq-item-ind")&&(a=!0):h+=_.source,l=!0,m=!0,(p||g)&&(E=_),d=!0;break;case"anchor":p&&s(_,"MULTIPLE_ANCHORS","A node can have at most one anchor"),_.source.endsWith(":")&&s(_.offset+_.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),p=_,S??(S=_.offset),l=!1,d=!1,y=!0;break;case"tag":{g&&s(_,"MULTIPLE_TAGS","A node can have at most one tag"),g=_,S??(S=_.offset),l=!1,d=!1,y=!0;break}case n:(p||g)&&s(_,"BAD_PROP_ORDER",`Anchors and tags must be after the ${_.source} indicator`),C&&s(_,"UNEXPECTED_TOKEN",`Unexpected ${_.source} in ${e??"collection"}`),C=_,l=n==="seq-item-ind"||n==="explicit-key-ind",d=!1;break;case"comma":if(e){A&&s(_,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),A=_,l=!1,d=!1;break}default:s(_,"UNEXPECTED_TOKEN",`Unexpected ${_.type} token`),l=!1,d=!1}let w=t[t.length-1],L=w?w.offset+w.source.length:i;return y&&r&&r.type!=="space"&&r.type!=="newline"&&r.type!=="comma"&&(r.type!=="scalar"||r.source!=="")&&s(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),f&&(l&&f.indent<=u||r?.type==="block-map"||r?.type==="block-seq")&&s(f,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:A,found:C,spaceBefore:a,comment:c,hasNewline:m,anchor:p,tag:g,newlineAfterProp:E,end:L,start:S??L}}bo.resolveProps=rh});var Hn=F(Co=>{"use strict";function wi(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes(`
|
|
64
|
+
`))return!0;if(t.end){for(let e of t.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(let e of t.items){for(let n of e.start)if(n.type==="newline")return!0;if(e.sep){for(let n of e.sep)if(n.type==="newline")return!0}if(wi(e.key)||wi(e.value))return!0}return!1;default:return!0}}Co.containsNewline=wi});var vi=F(So=>{"use strict";var ih=Hn();function sh(t,e,n){if(e?.type==="flow-collection"){let r=e.end[0];r.indent===t&&(r.source==="]"||r.source==="}")&&ih.containsNewline(e)&&n(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}So.flowIndentCheck=sh});var Bi=F(_o=>{"use strict";var Fo=T();function uh(t,e,n){let{uniqueKeys:r}=t.options;if(r===!1)return!1;let i=typeof r=="function"?r:(s,u)=>s===u||Fo.isScalar(s)&&Fo.isScalar(u)&&s.value===u.value;return e.some(s=>i(s.key,n))}_o.mapIncludes=uh});var Io=F(Oo=>{"use strict";var wo=Fe(),oh=we(),vo=Lt(),ah=Hn(),Bo=vi(),lh=Bi(),No="All mapping items must start at the same column";function ch({composeNode:t,composeEmptyNode:e},n,r,i,s){let u=s?.nodeClass??oh.YAMLMap,o=new u(n.schema);n.atRoot&&(n.atRoot=!1);let a=r.offset,l=null;for(let d of r.items){let{start:c,key:h,sep:m,value:y}=d,f=vo.resolveProps(c,{indicator:"explicit-key-ind",next:h??m?.[0],offset:a,onError:i,parentIndent:r.indent,startOnNewline:!0}),p=!f.found;if(p){if(h&&(h.type==="block-seq"?i(a,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in h&&h.indent!==r.indent&&i(a,"BAD_INDENT",No)),!f.anchor&&!f.tag&&!m){l=f.end,f.comment&&(o.comment?o.comment+=`
|
|
65
|
+
`+f.comment:o.comment=f.comment);continue}(f.newlineAfterProp||ah.containsNewline(h))&&i(h??c[c.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else f.found?.indent!==r.indent&&i(a,"BAD_INDENT",No);n.atKey=!0;let g=f.end,E=h?t(n,h,f,i):e(n,g,c,null,f,i);n.schema.compat&&Bo.flowIndentCheck(r.indent,h,i),n.atKey=!1,lh.mapIncludes(n,o.items,E)&&i(g,"DUPLICATE_KEY","Map keys must be unique");let A=vo.resolveProps(m??[],{indicator:"map-value-ind",next:y,offset:E.range[2],onError:i,parentIndent:r.indent,startOnNewline:!h||h.type==="block-scalar"});if(a=A.end,A.found){p&&(y?.type==="block-map"&&!A.hasNewline&&i(a,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&f.start<A.found.offset-1024&&i(E.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let C=y?t(n,y,A,i):e(n,a,m,null,A,i);n.schema.compat&&Bo.flowIndentCheck(r.indent,y,i),a=C.range[2];let S=new wo.Pair(E,C);n.options.keepSourceTokens&&(S.srcToken=d),o.items.push(S)}else{p&&i(E.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),A.comment&&(E.comment?E.comment+=`
|
|
66
|
+
`+A.comment:E.comment=A.comment);let C=new wo.Pair(E);n.options.keepSourceTokens&&(C.srcToken=d),o.items.push(C)}}return l&&l<a&&i(l,"IMPOSSIBLE","Map comment with trailing content"),o.range=[r.offset,a,l??a],o}Oo.resolveBlockMap=ch});var ko=F(To=>{"use strict";var fh=ve(),hh=Lt(),dh=vi();function ph({composeNode:t,composeEmptyNode:e},n,r,i,s){let u=s?.nodeClass??fh.YAMLSeq,o=new u(n.schema);n.atRoot&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let a=r.offset,l=null;for(let{start:d,value:c}of r.items){let h=hh.resolveProps(d,{indicator:"seq-item-ind",next:c,offset:a,onError:i,parentIndent:r.indent,startOnNewline:!0});if(!h.found)if(h.anchor||h.tag||c)c?.type==="block-seq"?i(h.end,"BAD_INDENT","All sequence items must start at the same column"):i(a,"MISSING_CHAR","Sequence item without - indicator");else{l=h.end,h.comment&&(o.comment=h.comment);continue}let m=c?t(n,c,h,i):e(n,h.end,d,null,h,i);n.schema.compat&&dh.flowIndentCheck(r.indent,c,i),a=m.range[2],o.items.push(m)}return o.range=[r.offset,a,l??a],o}To.resolveBlockSeq=ph});var tt=F(xo=>{"use strict";function mh(t,e,n,r){let i="";if(t){let s=!1,u="";for(let o of t){let{source:a,type:l}=o;switch(l){case"space":s=!0;break;case"comment":{n&&!s&&r(o,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let d=a.substring(1)||" ";i?i+=u+d:i=d,u="";break}case"newline":i&&(u+=a),s=!0;break;default:r(o,"UNEXPECTED_TOKEN",`Unexpected ${l} at node end`)}e+=a.length}}return{comment:i,offset:e}}xo.resolveEnd=mh});var Ro=F(Po=>{"use strict";var gh=T(),Dh=Fe(),Lo=we(),yh=ve(),Eh=tt(),qo=Lt(),Ah=Hn(),bh=Bi(),Ni="Block collections are not allowed within flow collections",Oi=t=>t&&(t.type==="block-map"||t.type==="block-seq");function Ch({composeNode:t,composeEmptyNode:e},n,r,i,s){let u=r.start.source==="{",o=u?"flow map":"flow sequence",a=s?.nodeClass??(u?Lo.YAMLMap:yh.YAMLSeq),l=new a(n.schema);l.flow=!0;let d=n.atRoot;d&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let c=r.offset+r.start.source.length;for(let p=0;p<r.items.length;++p){let g=r.items[p],{start:E,key:A,sep:C,value:S}=g,w=qo.resolveProps(E,{flow:o,indicator:"explicit-key-ind",next:A??C?.[0],offset:c,onError:i,parentIndent:r.indent,startOnNewline:!1});if(!w.found){if(!w.anchor&&!w.tag&&!C&&!S){p===0&&w.comma?i(w.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${o}`):p<r.items.length-1&&i(w.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${o}`),w.comment&&(l.comment?l.comment+=`
|
|
67
|
+
`+w.comment:l.comment=w.comment),c=w.end;continue}!u&&n.options.strict&&Ah.containsNewline(A)&&i(A,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(p===0)w.comma&&i(w.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${o}`);else if(w.comma||i(w.start,"MISSING_CHAR",`Missing , between ${o} items`),w.comment){let L="";e:for(let _ of E)switch(_.type){case"comma":case"space":break;case"comment":L=_.source.substring(1);break e;default:break e}if(L){let _=l.items[l.items.length-1];gh.isPair(_)&&(_=_.value??_.key),_.comment?_.comment+=`
|
|
68
|
+
`+L:_.comment=L,w.comment=w.comment.substring(L.length+1)}}if(!u&&!C&&!w.found){let L=S?t(n,S,w,i):e(n,w.end,C,null,w,i);l.items.push(L),c=L.range[2],Oi(S)&&i(L.range,"BLOCK_IN_FLOW",Ni)}else{n.atKey=!0;let L=w.end,_=A?t(n,A,w,i):e(n,L,E,null,w,i);Oi(A)&&i(_.range,"BLOCK_IN_FLOW",Ni),n.atKey=!1;let M=qo.resolveProps(C??[],{flow:o,indicator:"map-value-ind",next:S,offset:_.range[2],onError:i,parentIndent:r.indent,startOnNewline:!1});if(M.found){if(!u&&!w.found&&n.options.strict){if(C)for(let $ of C){if($===M.found)break;if($.type==="newline"){i($,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}w.start<M.found.offset-1024&&i(M.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else S&&("source"in S&&S.source?.[0]===":"?i(S,"MISSING_CHAR",`Missing space after : in ${o}`):i(M.start,"MISSING_CHAR",`Missing , or : between ${o} items`));let se=S?t(n,S,M,i):M.found?e(n,M.end,C,null,M,i):null;se?Oi(S)&&i(se.range,"BLOCK_IN_FLOW",Ni):M.comment&&(_.comment?_.comment+=`
|
|
69
|
+
`+M.comment:_.comment=M.comment);let O=new Dh.Pair(_,se);if(n.options.keepSourceTokens&&(O.srcToken=g),u){let $=l;bh.mapIncludes(n,$.items,_)&&i(L,"DUPLICATE_KEY","Map keys must be unique"),$.items.push(O)}else{let $=new Lo.YAMLMap(n.schema);$.flow=!0,$.items.push(O);let v=(se??_).range;$.range=[_.range[0],v[1],v[2]],l.items.push($)}c=se?se.range[2]:M.end}}let h=u?"}":"]",[m,...y]=r.end,f=c;if(m?.source===h)f=m.offset+m.source.length;else{let p=o[0].toUpperCase()+o.substring(1),g=d?`${p} must end with a ${h}`:`${p} in block collection must be sufficiently indented and end with a ${h}`;i(c,d?"MISSING_CHAR":"BAD_INDENT",g),m&&m.source.length!==1&&y.unshift(m)}if(y.length>0){let p=Eh.resolveEnd(y,f,n.options.strict,i);p.comment&&(l.comment?l.comment+=`
|
|
70
|
+
`+p.comment:l.comment=p.comment),l.range=[r.offset,f,p.offset]}else l.range=[r.offset,f,f];return l}Po.resolveFlowCollection=Ch});var Mo=F($o=>{"use strict";var Sh=T(),Fh=V(),_h=we(),wh=ve(),vh=Io(),Bh=ko(),Nh=Ro();function Ii(t,e,n,r,i,s){let u=n.type==="block-map"?vh.resolveBlockMap(t,e,n,r,s):n.type==="block-seq"?Bh.resolveBlockSeq(t,e,n,r,s):Nh.resolveFlowCollection(t,e,n,r,s),o=u.constructor;return i==="!"||i===o.tagName?(u.tag=o.tagName,u):(i&&(u.tag=i),u)}function Oh(t,e,n,r,i){let s=r.tag,u=s?e.directives.tagName(s.source,h=>i(s,"TAG_RESOLVE_FAILED",h)):null;if(n.type==="block-seq"){let{anchor:h,newlineAfterProp:m}=r,y=h&&s?h.offset>s.offset?h:s:h??s;y&&(!m||m.offset<y.offset)&&i(y,"MISSING_CHAR","Missing newline after block sequence props")}let o=n.type==="block-map"?"map":n.type==="block-seq"?"seq":n.start.source==="{"?"map":"seq";if(!s||!u||u==="!"||u===_h.YAMLMap.tagName&&o==="map"||u===wh.YAMLSeq.tagName&&o==="seq")return Ii(t,e,n,i,u);let a=e.schema.tags.find(h=>h.tag===u&&h.collection===o);if(!a){let h=e.schema.knownTags[u];if(h?.collection===o)e.schema.tags.push(Object.assign({},h,{default:!1})),a=h;else return h?i(s,"BAD_COLLECTION_TYPE",`${h.tag} used for ${o} collection, but expects ${h.collection??"scalar"}`,!0):i(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${u}`,!0),Ii(t,e,n,i,u)}let l=Ii(t,e,n,i,u,a),d=a.resolve?.(l,h=>i(s,"TAG_RESOLVE_FAILED",h),e.options)??l,c=Sh.isNode(d)?d:new Fh.Scalar(d);return c.range=l.range,c.tag=u,a?.format&&(c.format=a.format),c}$o.composeCollection=Oh});var ki=F(jo=>{"use strict";var Ti=V();function Ih(t,e,n){let r=e.offset,i=Th(e,t.options.strict,n);if(!i)return{value:"",type:null,comment:"",range:[r,r,r]};let s=i.mode===">"?Ti.Scalar.BLOCK_FOLDED:Ti.Scalar.BLOCK_LITERAL,u=e.source?kh(e.source):[],o=u.length;for(let f=u.length-1;f>=0;--f){let p=u[f][1];if(p===""||p==="\r")o=f;else break}if(o===0){let f=i.chomp==="+"&&u.length>0?`
|
|
71
|
+
`.repeat(Math.max(1,u.length-1)):"",p=r+i.length;return e.source&&(p+=e.source.length),{value:f,type:s,comment:i.comment,range:[r,p,p]}}let a=e.indent+i.indent,l=e.offset+i.length,d=0;for(let f=0;f<o;++f){let[p,g]=u[f];if(g===""||g==="\r")i.indent===0&&p.length>a&&(a=p.length);else{p.length<a&&n(l+p.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),i.indent===0&&(a=p.length),d=f,a===0&&!t.atRoot&&n(l,"BAD_INDENT","Block scalar values in collections must be indented");break}l+=p.length+g.length+1}for(let f=u.length-1;f>=o;--f)u[f][0].length>a&&(o=f+1);let c="",h="",m=!1;for(let f=0;f<d;++f)c+=u[f][0].slice(a)+`
|
|
72
|
+
`;for(let f=d;f<o;++f){let[p,g]=u[f];l+=p.length+g.length+1;let E=g[g.length-1]==="\r";if(E&&(g=g.slice(0,-1)),g&&p.length<a){let C=`Block scalar lines must not be less indented than their ${i.indent?"explicit indentation indicator":"first line"}`;n(l-g.length-(E?2:1),"BAD_INDENT",C),p=""}s===Ti.Scalar.BLOCK_LITERAL?(c+=h+p.slice(a)+g,h=`
|
|
73
|
+
`):p.length>a||g[0]===" "?(h===" "?h=`
|
|
74
|
+
`:!m&&h===`
|
|
75
|
+
`&&(h=`
|
|
76
|
+
|
|
77
|
+
`),c+=h+p.slice(a)+g,h=`
|
|
78
|
+
`,m=!0):g===""?h===`
|
|
79
|
+
`?c+=`
|
|
80
|
+
`:h=`
|
|
81
|
+
`:(c+=h+g,h=" ",m=!1)}switch(i.chomp){case"-":break;case"+":for(let f=o;f<u.length;++f)c+=`
|
|
82
|
+
`+u[f][0].slice(a);c[c.length-1]!==`
|
|
83
|
+
`&&(c+=`
|
|
84
|
+
`);break;default:c+=`
|
|
85
|
+
`}let y=r+i.length+e.source.length;return{value:c,type:s,comment:i.comment,range:[r,y,y]}}function Th({offset:t,props:e},n,r){if(e[0].type!=="block-scalar-header")return r(e[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:i}=e[0],s=i[0],u=0,o="",a=-1;for(let h=1;h<i.length;++h){let m=i[h];if(!o&&(m==="-"||m==="+"))o=m;else{let y=Number(m);!u&&y?u=y:a===-1&&(a=t+h)}}a!==-1&&r(a,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${i}`);let l=!1,d="",c=i.length;for(let h=1;h<e.length;++h){let m=e[h];switch(m.type){case"space":l=!0;case"newline":c+=m.source.length;break;case"comment":n&&!l&&r(m,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),c+=m.source.length,d=m.source.substring(1);break;case"error":r(m,"UNEXPECTED_TOKEN",m.message),c+=m.source.length;break;default:{let y=`Unexpected token in block scalar header: ${m.type}`;r(m,"UNEXPECTED_TOKEN",y);let f=m.source;f&&typeof f=="string"&&(c+=f.length)}}}return{mode:s,indent:u,chomp:o,comment:d,length:c}}function kh(t){let e=t.split(/\n( *)/),n=e[0],r=n.match(/^( *)/),s=[r?.[1]?[r[1],n.slice(r[1].length)]:["",n]];for(let u=1;u<e.length;u+=2)s.push([e[u],e[u+1]]);return s}jo.resolveBlockScalar=Ih});var Li=F(Vo=>{"use strict";var xi=V(),xh=tt();function Lh(t,e,n){let{offset:r,type:i,source:s,end:u}=t,o,a,l=(h,m,y)=>n(r+h,m,y);switch(i){case"scalar":o=xi.Scalar.PLAIN,a=qh(s,l);break;case"single-quoted-scalar":o=xi.Scalar.QUOTE_SINGLE,a=Ph(s,l);break;case"double-quoted-scalar":o=xi.Scalar.QUOTE_DOUBLE,a=Rh(s,l);break;default:return n(t,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${i}`),{value:"",type:null,comment:"",range:[r,r+s.length,r+s.length]}}let d=r+s.length,c=xh.resolveEnd(u,d,e,n);return{value:a,type:o,comment:c.comment,range:[r,d,c.offset]}}function qh(t,e){let n="";switch(t[0]){case" ":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":{n=`block scalar indicator ${t[0]}`;break}case"@":case"`":{n=`reserved character ${t[0]}`;break}}return n&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`),Ko(t)}function Ph(t,e){return(t[t.length-1]!=="'"||t.length===1)&&e(t.length,"MISSING_CHAR","Missing closing 'quote"),Ko(t.slice(1,-1)).replace(/''/g,"'")}function Ko(t){let e,n;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
|
|
86
|
+
`,"sy"),n=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
|
87
|
+
`,"sy")}catch{e=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=e.exec(t);if(!r)return t;let i=r[1],s=" ",u=e.lastIndex;for(n.lastIndex=u;r=n.exec(t);)r[1]===""?s===`
|
|
88
|
+
`?i+=s:s=`
|
|
89
|
+
`:(i+=s+r[1],s=" "),u=n.lastIndex;let o=/[ \t]*(.*)/sy;return o.lastIndex=u,r=o.exec(t),i+s+(r?.[1]??"")}function Rh(t,e){let n="";for(let r=1;r<t.length-1;++r){let i=t[r];if(!(i==="\r"&&t[r+1]===`
|
|
90
|
+
`))if(i===`
|
|
91
|
+
`){let{fold:s,offset:u}=$h(t,r);n+=s,r=u}else if(i==="\\"){let s=t[++r],u=Mh[s];if(u)n+=u;else if(s===`
|
|
92
|
+
`)for(s=t[r+1];s===" "||s===" ";)s=t[++r+1];else if(s==="\r"&&t[r+1]===`
|
|
93
|
+
`)for(s=t[++r+1];s===" "||s===" ";)s=t[++r+1];else if(s==="x"||s==="u"||s==="U"){let o={x:2,u:4,U:8}[s];n+=jh(t,r+1,o,e),r+=o}else{let o=t.substr(r-1,2);e(r-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${o}`),n+=o}}else if(i===" "||i===" "){let s=r,u=t[r+1];for(;u===" "||u===" ";)u=t[++r+1];u!==`
|
|
94
|
+
`&&!(u==="\r"&&t[r+2]===`
|
|
95
|
+
`)&&(n+=r>s?t.slice(s,r+1):i)}else n+=i}return(t[t.length-1]!=='"'||t.length===1)&&e(t.length,"MISSING_CHAR",'Missing closing "quote'),n}function $h(t,e){let n="",r=t[e+1];for(;(r===" "||r===" "||r===`
|
|
96
|
+
`||r==="\r")&&!(r==="\r"&&t[e+2]!==`
|
|
97
|
+
`);)r===`
|
|
98
|
+
`&&(n+=`
|
|
99
|
+
`),e+=1,r=t[e+1];return n||(n=" "),{fold:n,offset:e}}var Mh={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
|
|
100
|
+
`,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function jh(t,e,n,r){let i=t.substr(e,n),u=i.length===n&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;if(isNaN(u)){let o=t.substr(e-2,n+2);return r(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${o}`),o}return String.fromCodePoint(u)}Vo.resolveFlowScalar=Lh});var Yo=F(Jo=>{"use strict";var Ke=T(),Uo=V(),Kh=ki(),Vh=Li();function Uh(t,e,n,r){let{value:i,type:s,comment:u,range:o}=e.type==="block-scalar"?Kh.resolveBlockScalar(t,e,r):Vh.resolveFlowScalar(e,t.options.strict,r),a=n?t.directives.tagName(n.source,c=>r(n,"TAG_RESOLVE_FAILED",c)):null,l;t.options.stringKeys&&t.atKey?l=t.schema[Ke.SCALAR]:a?l=Jh(t.schema,i,a,n,r):e.type==="scalar"?l=Yh(t,i,e,r):l=t.schema[Ke.SCALAR];let d;try{let c=l.resolve(i,h=>r(n??e,"TAG_RESOLVE_FAILED",h),t.options);d=Ke.isScalar(c)?c:new Uo.Scalar(c)}catch(c){let h=c instanceof Error?c.message:String(c);r(n??e,"TAG_RESOLVE_FAILED",h),d=new Uo.Scalar(i)}return d.range=o,d.source=i,s&&(d.type=s),a&&(d.tag=a),l.format&&(d.format=l.format),u&&(d.comment=u),d}function Jh(t,e,n,r,i){if(n==="!")return t[Ke.SCALAR];let s=[];for(let o of t.tags)if(!o.collection&&o.tag===n)if(o.default&&o.test)s.push(o);else return o;for(let o of s)if(o.test?.test(e))return o;let u=t.knownTags[n];return u&&!u.collection?(t.tags.push(Object.assign({},u,{default:!1,test:void 0})),u):(i(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,n!=="tag:yaml.org,2002:str"),t[Ke.SCALAR])}function Yh({atKey:t,directives:e,schema:n},r,i,s){let u=n.tags.find(o=>(o.default===!0||t&&o.default==="key")&&o.test?.test(r))||n[Ke.SCALAR];if(n.compat){let o=n.compat.find(a=>a.default&&a.test?.test(r))??n[Ke.SCALAR];if(u.tag!==o.tag){let a=e.tagString(u.tag),l=e.tagString(o.tag),d=`Value may be parsed as either ${a} or ${l}`;s(i,"TAG_RESOLVE_FAILED",d,!0)}}return u}Jo.composeScalar=Uh});var Ho=F(Go=>{"use strict";function Gh(t,e,n){if(e){n??(n=e.length);for(let r=n-1;r>=0;--r){let i=e[r];switch(i.type){case"space":case"comment":case"newline":t-=i.source.length;continue}for(i=e[++r];i?.type==="space";)t+=i.source.length,i=e[++r];break}}return t}Go.emptyScalarPosition=Gh});var Qo=F(Pi=>{"use strict";var Hh=pt(),Wh=T(),zh=Mo(),Wo=Yo(),Qh=tt(),Xh=Ho(),Zh={composeNode:zo,composeEmptyNode:qi};function zo(t,e,n,r){let i=t.atKey,{spaceBefore:s,comment:u,anchor:o,tag:a}=n,l,d=!0;switch(e.type){case"alias":l=ed(t,e,r),(o||a)&&r(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":l=Wo.composeScalar(t,e,a,r),o&&(l.anchor=o.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":l=zh.composeCollection(Zh,t,e,n,r),o&&(l.anchor=o.source.substring(1));break;default:{let c=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;r(e,"UNEXPECTED_TOKEN",c),l=qi(t,e.offset,void 0,null,n,r),d=!1}}return o&&l.anchor===""&&r(o,"BAD_ALIAS","Anchor cannot be an empty string"),i&&t.options.stringKeys&&(!Wh.isScalar(l)||typeof l.value!="string"||l.tag&&l.tag!=="tag:yaml.org,2002:str")&&r(a??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),s&&(l.spaceBefore=!0),u&&(e.type==="scalar"&&e.source===""?l.comment=u:l.commentBefore=u),t.options.keepSourceTokens&&d&&(l.srcToken=e),l}function qi(t,e,n,r,{spaceBefore:i,comment:s,anchor:u,tag:o,end:a},l){let d={type:"scalar",offset:Xh.emptyScalarPosition(e,n,r),indent:-1,source:""},c=Wo.composeScalar(t,d,o,l);return u&&(c.anchor=u.source.substring(1),c.anchor===""&&l(u,"BAD_ALIAS","Anchor cannot be an empty string")),i&&(c.spaceBefore=!0),s&&(c.comment=s,c.range[2]=a),c}function ed({options:t},{offset:e,source:n,end:r},i){let s=new Hh.Alias(n.substring(1));s.source===""&&i(e,"BAD_ALIAS","Alias cannot be an empty string"),s.source.endsWith(":")&&i(e+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let u=e+n.length,o=Qh.resolveEnd(r,u,t.strict,i);return s.range=[e,u,o.offset],o.comment&&(s.comment=o.comment),s}Pi.composeEmptyNode=qi;Pi.composeNode=zo});var ea=F(Zo=>{"use strict";var td=It(),Xo=Qo(),nd=tt(),rd=Lt();function id(t,e,{offset:n,start:r,value:i,end:s},u){let o=Object.assign({_directives:e},t),a=new td.Document(void 0,o),l={atKey:!1,atRoot:!0,directives:a.directives,options:a.options,schema:a.schema},d=rd.resolveProps(r,{indicator:"doc-start",next:i??s?.[0],offset:n,onError:u,parentIndent:0,startOnNewline:!0});d.found&&(a.directives.docStart=!0,i&&(i.type==="block-map"||i.type==="block-seq")&&!d.hasNewline&&u(d.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),a.contents=i?Xo.composeNode(l,i,d,u):Xo.composeEmptyNode(l,d.end,r,null,d,u);let c=a.contents.range[2],h=nd.resolveEnd(s,c,!1,u);return h.comment&&(a.comment=h.comment),a.range=[n,c,h.offset],a}Zo.composeDoc=id});var $i=F(ra=>{"use strict";var sd=Gt("process"),ud=Fr(),od=It(),qt=xt(),ta=T(),ad=ea(),ld=tt();function Pt(t){if(typeof t=="number")return[t,t+1];if(Array.isArray(t))return t.length===2?t:[t[0],t[1]];let{offset:e,source:n}=t;return[e,e+(typeof n=="string"?n.length:1)]}function na(t){let e="",n=!1,r=!1;for(let i=0;i<t.length;++i){let s=t[i];switch(s[0]){case"#":e+=(e===""?"":r?`
|
|
101
|
+
|
|
102
|
+
`:`
|
|
103
|
+
`)+(s.substring(1)||" "),n=!0,r=!1;break;case"%":t[i+1]?.[0]!=="#"&&(i+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:e,afterEmptyLine:r}}var Ri=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(n,r,i,s)=>{let u=Pt(n);s?this.warnings.push(new qt.YAMLWarning(u,r,i)):this.errors.push(new qt.YAMLParseError(u,r,i))},this.directives=new ud.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,n){let{comment:r,afterEmptyLine:i}=na(this.prelude);if(r){let s=e.contents;if(n)e.comment=e.comment?`${e.comment}
|
|
104
|
+
${r}`:r;else if(i||e.directives.docStart||!s)e.commentBefore=r;else if(ta.isCollection(s)&&!s.flow&&s.items.length>0){let u=s.items[0];ta.isPair(u)&&(u=u.key);let o=u.commentBefore;u.commentBefore=o?`${r}
|
|
105
|
+
${o}`:r}else{let u=s.commentBefore;s.commentBefore=u?`${r}
|
|
106
|
+
${u}`:r}}n?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:na(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,n=!1,r=-1){for(let i of e)yield*this.next(i);yield*this.end(n,r)}*next(e){switch(sd.env.LOG_STREAM&&console.dir(e,{depth:null}),e.type){case"directive":this.directives.add(e.source,(n,r,i)=>{let s=Pt(e);s[0]+=n,this.onError(s,"BAD_DIRECTIVE",r,i)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let n=ad.composeDoc(this.options,this.directives,e,this.onError);this.atDirectives&&!n.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(n,!1),this.doc&&(yield this.doc),this.doc=n,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{let n=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,r=new qt.YAMLParseError(Pt(e),"UNEXPECTED_TOKEN",n);this.atDirectives||!this.doc?this.errors.push(r):this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){let r="Unexpected doc-end without preceding document";this.errors.push(new qt.YAMLParseError(Pt(e),"UNEXPECTED_TOKEN",r));break}this.doc.directives.docEnd=!0;let n=ld.resolveEnd(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),n.comment){let r=this.doc.comment;this.doc.comment=r?`${r}
|
|
107
|
+
${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.push(new qt.YAMLParseError(Pt(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,n=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let r=Object.assign({_directives:this.directives},this.options),i=new od.Document(void 0,r);this.atDirectives&&this.onError(n,"MISSING_CHAR","Missing directives-end indicator line"),i.range=[0,n,n],this.decorate(i,!1),yield i}}};ra.Composer=Ri});var ua=F(Wn=>{"use strict";var cd=ki(),fd=Li(),hd=xt(),ia=Et();function dd(t,e=!0,n){if(t){let r=(i,s,u)=>{let o=typeof i=="number"?i:Array.isArray(i)?i[0]:i.offset;if(n)n(o,s,u);else throw new hd.YAMLParseError([o,o+1],s,u)};switch(t.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return fd.resolveFlowScalar(t,e,r);case"block-scalar":return cd.resolveBlockScalar({options:{strict:e}},t,r)}}return null}function pd(t,e){let{implicitKey:n=!1,indent:r,inFlow:i=!1,offset:s=-1,type:u="PLAIN"}=e,o=ia.stringifyString({type:u,value:t},{implicitKey:n,indent:r>0?" ".repeat(r):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}}),a=e.end??[{type:"newline",offset:-1,indent:r,source:`
|
|
108
|
+
`}];switch(o[0]){case"|":case">":{let l=o.indexOf(`
|
|
109
|
+
`),d=o.substring(0,l),c=o.substring(l+1)+`
|
|
110
|
+
`,h=[{type:"block-scalar-header",offset:s,indent:r,source:d}];return sa(h,a)||h.push({type:"newline",offset:-1,indent:r,source:`
|
|
111
|
+
`}),{type:"block-scalar",offset:s,indent:r,props:h,source:c}}case'"':return{type:"double-quoted-scalar",offset:s,indent:r,source:o,end:a};case"'":return{type:"single-quoted-scalar",offset:s,indent:r,source:o,end:a};default:return{type:"scalar",offset:s,indent:r,source:o,end:a}}}function md(t,e,n={}){let{afterKey:r=!1,implicitKey:i=!1,inFlow:s=!1,type:u}=n,o="indent"in t?t.indent:null;if(r&&typeof o=="number"&&(o+=2),!u)switch(t.type){case"single-quoted-scalar":u="QUOTE_SINGLE";break;case"double-quoted-scalar":u="QUOTE_DOUBLE";break;case"block-scalar":{let l=t.props[0];if(l.type!=="block-scalar-header")throw new Error("Invalid block scalar header");u=l.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:u="PLAIN"}let a=ia.stringifyString({type:u,value:e},{implicitKey:i||o===null,indent:o!==null&&o>0?" ".repeat(o):"",inFlow:s,options:{blockQuote:!0,lineWidth:-1}});switch(a[0]){case"|":case">":gd(t,a);break;case'"':Mi(t,a,"double-quoted-scalar");break;case"'":Mi(t,a,"single-quoted-scalar");break;default:Mi(t,a,"scalar")}}function gd(t,e){let n=e.indexOf(`
|
|
112
|
+
`),r=e.substring(0,n),i=e.substring(n+1)+`
|
|
113
|
+
`;if(t.type==="block-scalar"){let s=t.props[0];if(s.type!=="block-scalar-header")throw new Error("Invalid block scalar header");s.source=r,t.source=i}else{let{offset:s}=t,u="indent"in t?t.indent:-1,o=[{type:"block-scalar-header",offset:s,indent:u,source:r}];sa(o,"end"in t?t.end:void 0)||o.push({type:"newline",offset:-1,indent:u,source:`
|
|
114
|
+
`});for(let a of Object.keys(t))a!=="type"&&a!=="offset"&&delete t[a];Object.assign(t,{type:"block-scalar",indent:u,props:o,source:i})}}function sa(t,e){if(e)for(let n of e)switch(n.type){case"space":case"comment":t.push(n);break;case"newline":return t.push(n),!0}return!1}function Mi(t,e,n){switch(t.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":t.type=n,t.source=e;break;case"block-scalar":{let r=t.props.slice(1),i=e.length;t.props[0].type==="block-scalar-header"&&(i-=t.props[0].source.length);for(let s of r)s.offset+=i;delete t.props,Object.assign(t,{type:n,source:e,end:r});break}case"block-map":case"block-seq":{let i={type:"newline",offset:t.offset+e.length,indent:t.indent,source:`
|
|
115
|
+
`};delete t.items,Object.assign(t,{type:n,source:e,end:[i]});break}default:{let r="indent"in t?t.indent:-1,i="end"in t&&Array.isArray(t.end)?t.end.filter(s=>s.type==="space"||s.type==="comment"||s.type==="newline"):[];for(let s of Object.keys(t))s!=="type"&&s!=="offset"&&delete t[s];Object.assign(t,{type:n,indent:r,source:e,end:i})}}}Wn.createScalarToken=pd;Wn.resolveAsScalar=dd;Wn.setScalarValue=md});var aa=F(oa=>{"use strict";var Dd=t=>"type"in t?Qn(t):zn(t);function Qn(t){switch(t.type){case"block-scalar":{let e="";for(let n of t.props)e+=Qn(n);return e+t.source}case"block-map":case"block-seq":{let e="";for(let n of t.items)e+=zn(n);return e}case"flow-collection":{let e=t.start.source;for(let n of t.items)e+=zn(n);for(let n of t.end)e+=n.source;return e}case"document":{let e=zn(t);if(t.end)for(let n of t.end)e+=n.source;return e}default:{let e=t.source;if("end"in t&&t.end)for(let n of t.end)e+=n.source;return e}}}function zn({start:t,key:e,sep:n,value:r}){let i="";for(let s of t)i+=s.source;if(e&&(i+=Qn(e)),n)for(let s of n)i+=s.source;return r&&(i+=Qn(r)),i}oa.stringify=Dd});var ha=F(fa=>{"use strict";var ji=Symbol("break visit"),yd=Symbol("skip children"),la=Symbol("remove item");function Ve(t,e){"type"in t&&t.type==="document"&&(t={start:t.start,value:t.value}),ca(Object.freeze([]),t,e)}Ve.BREAK=ji;Ve.SKIP=yd;Ve.REMOVE=la;Ve.itemAtPath=(t,e)=>{let n=t;for(let[r,i]of e){let s=n?.[r];if(s&&"items"in s)n=s.items[i];else return}return n};Ve.parentCollection=(t,e)=>{let n=Ve.itemAtPath(t,e.slice(0,-1)),r=e[e.length-1][0],i=n?.[r];if(i&&"items"in i)return i;throw new Error("Parent collection not found")};function ca(t,e,n){let r=n(e,t);if(typeof r=="symbol")return r;for(let i of["key","value"]){let s=e[i];if(s&&"items"in s){for(let u=0;u<s.items.length;++u){let o=ca(Object.freeze(t.concat([[i,u]])),s.items[u],n);if(typeof o=="number")u=o-1;else{if(o===ji)return ji;o===la&&(s.items.splice(u,1),u-=1)}}typeof r=="function"&&i==="key"&&(r=r(e,t))}}return typeof r=="function"?r(e,t):r}fa.visit=Ve});var Xn=F(z=>{"use strict";var Ki=ua(),Ed=aa(),Ad=ha(),Vi="\uFEFF",Ui="",Ji="",Yi="",bd=t=>!!t&&"items"in t,Cd=t=>!!t&&(t.type==="scalar"||t.type==="single-quoted-scalar"||t.type==="double-quoted-scalar"||t.type==="block-scalar");function Sd(t){switch(t){case Vi:return"<BOM>";case Ui:return"<DOC>";case Ji:return"<FLOW_END>";case Yi:return"<SCALAR>";default:return JSON.stringify(t)}}function Fd(t){switch(t){case Vi:return"byte-order-mark";case Ui:return"doc-mode";case Ji:return"flow-error-end";case Yi:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
|
|
116
|
+
`:case`\r
|
|
117
|
+
`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(t[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}z.createScalarToken=Ki.createScalarToken;z.resolveAsScalar=Ki.resolveAsScalar;z.setScalarValue=Ki.setScalarValue;z.stringify=Ed.stringify;z.visit=Ad.visit;z.BOM=Vi;z.DOCUMENT=Ui;z.FLOW_END=Ji;z.SCALAR=Yi;z.isCollection=bd;z.isScalar=Cd;z.prettyToken=Sd;z.tokenType=Fd});var Wi=F(pa=>{"use strict";var Rt=Xn();function ie(t){switch(t){case void 0:case" ":case`
|
|
118
|
+
`:case"\r":case" ":return!0;default:return!1}}var da=new Set("0123456789ABCDEFabcdef"),_d=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Zn=new Set(",[]{}"),wd=new Set(` ,[]{}
|
|
119
|
+
\r `),Gi=t=>!t||wd.has(t),Hi=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,n=!1){if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!n;let r=this.next??"stream";for(;r&&(n||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let e=this.pos,n=this.buffer[e];for(;n===" "||n===" ";)n=this.buffer[++e];return!n||n==="#"||n===`
|
|
120
|
+
`?!0:n==="\r"?this.buffer[e+1]===`
|
|
121
|
+
`:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let n=this.buffer[e];if(this.indentNext>0){let r=0;for(;n===" ";)n=this.buffer[++r+e];if(n==="\r"){let i=this.buffer[r+e+1];if(i===`
|
|
122
|
+
`||!i&&!this.atEnd)return e+r+1}return n===`
|
|
123
|
+
`||r>=this.indentNext||!n&&!this.atEnd?e+r:-1}if(n==="-"||n==="."){let r=this.buffer.substr(e,3);if((r==="---"||r==="...")&&ie(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
|
|
124
|
+
`,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===Rt.BOM&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let n=e.length,r=e.indexOf("#");for(;r!==-1;){let s=e[r-1];if(s===" "||s===" "){n=r-1;break}else r=e.indexOf("#",r+1)}for(;;){let s=e[n-1];if(s===" "||s===" ")n-=1;else break}let i=(yield*this.pushCount(n))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-i),this.pushNewline(),"stream"}if(this.atLineEnd()){let n=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-n),yield*this.pushNewline(),"stream"}return yield Rt.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let n=this.peek(3);if((n==="---"||n==="...")&&ie(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,n==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!ie(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,n]=this.peek(2);if(!n&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&ie(n)){let r=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=r,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext("doc");let n=yield*this.pushIndicators();switch(e[n]){case"#":yield*this.pushCount(e.length-n);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(Gi),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return n+=yield*this.parseBlockScalarHeader(),n+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-n),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,n,r=-1;do e=yield*this.pushNewline(),e>0?(n=yield*this.pushSpaces(!1),this.indentValue=r=n):n=0,n+=yield*this.pushSpaces(!0);while(e+n>0);let i=this.getLine();if(i===null)return this.setNext("flow");if((r!==-1&&r<this.indentNext&&i[0]!=="#"||r===0&&(i.startsWith("---")||i.startsWith("..."))&&ie(i[3]))&&!(r===this.indentNext-1&&this.flowLevel===1&&(i[0]==="]"||i[0]==="}")))return this.flowLevel=0,yield Rt.FLOW_END,yield*this.parseLineStart();let s=0;for(;i[s]===",";)s+=yield*this.pushCount(1),s+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(s+=yield*this.pushIndicators(),i[s]){case void 0:return"flow";case"#":return yield*this.pushCount(i.length-s),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(Gi),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let u=this.charAt(1);if(this.flowKey||ie(u)||u===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),n=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;n!==-1&&this.buffer[n+1]==="'";)n=this.buffer.indexOf("'",n+2);else for(;n!==-1;){let s=0;for(;this.buffer[n-1-s]==="\\";)s+=1;if(s%2===0)break;n=this.buffer.indexOf('"',n+1)}let r=this.buffer.substring(0,n),i=r.indexOf(`
|
|
125
|
+
`,this.pos);if(i!==-1){for(;i!==-1;){let s=this.continueScalar(i+1);if(s===-1)break;i=r.indexOf(`
|
|
126
|
+
`,s)}i!==-1&&(n=i-(r[i-1]==="\r"?2:1))}if(n===-1){if(!this.atEnd)return this.setNext("quoted-scalar");n=this.buffer.length}return yield*this.pushToIndex(n+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let n=this.buffer[++e];if(n==="+")this.blockScalarKeep=!0;else if(n>"0"&&n<="9")this.blockScalarIndent=Number(n)-1;else if(n!=="-")break}return yield*this.pushUntil(n=>ie(n)||n==="#")}*parseBlockScalar(){let e=this.pos-1,n=0,r;e:for(let s=this.pos;r=this.buffer[s];++s)switch(r){case" ":n+=1;break;case`
|
|
127
|
+
`:e=s,n=0;break;case"\r":{let u=this.buffer[s+1];if(!u&&!this.atEnd)return this.setNext("block-scalar");if(u===`
|
|
128
|
+
`)break}default:break e}if(!r&&!this.atEnd)return this.setNext("block-scalar");if(n>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=n:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let s=this.continueScalar(e+1);if(s===-1)break;e=this.buffer.indexOf(`
|
|
129
|
+
`,s)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let i=e+1;for(r=this.buffer[i];r===" ";)r=this.buffer[++i];if(r===" "){for(;r===" "||r===" "||r==="\r"||r===`
|
|
130
|
+
`;)r=this.buffer[++i];e=i-1}else if(!this.blockScalarKeep)do{let s=e-1,u=this.buffer[s];u==="\r"&&(u=this.buffer[--s]);let o=s;for(;u===" ";)u=this.buffer[--s];if(u===`
|
|
131
|
+
`&&s>=this.pos&&s+1+n>o)e=s;else break}while(!0);return yield Rt.SCALAR,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,n=this.pos-1,r=this.pos-1,i;for(;i=this.buffer[++r];)if(i===":"){let s=this.buffer[r+1];if(ie(s)||e&&Zn.has(s))break;n=r}else if(ie(i)){let s=this.buffer[r+1];if(i==="\r"&&(s===`
|
|
132
|
+
`?(r+=1,i=`
|
|
133
|
+
`,s=this.buffer[r+1]):n=r),s==="#"||e&&Zn.has(s))break;if(i===`
|
|
134
|
+
`){let u=this.continueScalar(r+1);if(u===-1)break;r=Math.max(r,u-2)}}else{if(e&&Zn.has(i))break;n=r}return!i&&!this.atEnd?this.setNext("plain-scalar"):(yield Rt.SCALAR,yield*this.pushToIndex(n+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,n){let r=this.buffer.slice(this.pos,e);return r?(yield r,this.pos+=r.length,r.length):(n&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(Gi))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{let e=this.flowLevel>0,n=this.charAt(1);if(ie(n)||e&&Zn.has(n))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,n=this.buffer[e];for(;!ie(n)&&n!==">";)n=this.buffer[++e];return yield*this.pushToIndex(n===">"?e+1:e,!1)}else{let e=this.pos+1,n=this.buffer[e];for(;n;)if(_d.has(n))n=this.buffer[++e];else if(n==="%"&&da.has(this.buffer[e+1])&&da.has(this.buffer[e+2]))n=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===`
|
|
135
|
+
`?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
|
|
136
|
+
`?yield*this.pushCount(2):0}*pushSpaces(e){let n=this.pos-1,r;do r=this.buffer[++n];while(r===" "||e&&r===" ");let i=n-this.pos;return i>0&&(yield this.buffer.substr(this.pos,i),this.pos=n),i}*pushUntil(e){let n=this.pos,r=this.buffer[n];for(;!e(r);)r=this.buffer[++n];return yield*this.pushToIndex(n,!1)}};pa.Lexer=Hi});var Qi=F(ma=>{"use strict";var zi=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let n=0,r=this.lineStarts.length;for(;n<r;){let s=n+r>>1;this.lineStarts[s]<e?n=s+1:r=s}if(this.lineStarts[n]===e)return{line:n+1,col:1};if(n===0)return{line:0,col:e};let i=this.lineStarts[n-1];return{line:n,col:e-i+1}}}};ma.LineCounter=zi});var Zi=F(Aa=>{"use strict";var vd=Gt("process"),ga=Xn(),Bd=Wi();function Be(t,e){for(let n=0;n<t.length;++n)if(t[n].type===e)return!0;return!1}function Da(t){for(let e=0;e<t.length;++e)switch(t[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function Ea(t){switch(t?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function er(t){switch(t.type){case"document":return t.start;case"block-map":{let e=t.items[t.items.length-1];return e.sep??e.start}case"block-seq":return t.items[t.items.length-1].start;default:return[]}}function nt(t){if(t.length===0)return[];let e=t.length;e:for(;--e>=0;)switch(t[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;t[++e]?.type==="space";);return t.splice(e,t.length)}function ya(t){if(t.start.type==="flow-seq-start")for(let e of t.items)e.sep&&!e.value&&!Be(e.start,"explicit-key-ind")&&!Be(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,Ea(e.value)?e.value.end?Array.prototype.push.apply(e.value.end,e.sep):e.value.end=e.sep:Array.prototype.push.apply(e.start,e.sep),delete e.sep)}var Xi=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new Bd.Lexer,this.onNewLine=e}*parse(e,n=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let r of this.lexer.lex(e,n))yield*this.next(r);n||(yield*this.end())}*next(e){if(this.source=e,vd.env.LOG_TOKENS&&console.log("|",ga.prettyToken(e)),this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let n=ga.tokenType(e);if(n)if(n==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=n,yield*this.step(),n){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{let r=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:r,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type==="doc-end"&&e?.type!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let n=e??this.stack.pop();if(!n)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield n;else{let r=this.peek(1);switch(n.type==="block-scalar"?n.indent="indent"in r?r.indent:0:n.type==="flow-collection"&&r.type==="document"&&(n.indent=0),n.type==="flow-collection"&&ya(n),r.type){case"document":r.value=n;break;case"block-scalar":r.props.push(n);break;case"block-map":{let i=r.items[r.items.length-1];if(i.value){r.items.push({start:[],key:n,sep:[]}),this.onKeyLine=!0;return}else if(i.sep)i.value=n;else{Object.assign(i,{key:n,sep:[]}),this.onKeyLine=!i.explicitKey;return}break}case"block-seq":{let i=r.items[r.items.length-1];i.value?r.items.push({start:[],value:n}):i.value=n;break}case"flow-collection":{let i=r.items[r.items.length-1];!i||i.value?r.items.push({start:[],key:n,sep:[]}):i.sep?i.value=n:Object.assign(i,{key:n,sep:[]});return}default:yield*this.pop(),yield*this.pop(n)}if((r.type==="document"||r.type==="block-map"||r.type==="block-seq")&&(n.type==="block-map"||n.type==="block-seq")){let i=n.items[n.items.length-1];i&&!i.sep&&!i.value&&i.start.length>0&&Da(i.start)===-1&&(n.indent===0||i.start.every(s=>s.type!=="comment"||s.indent<n.indent))&&(r.type==="document"?r.end=i.start:r.items.push({start:i.start}),n.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{let e={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":{Da(e.start)!==-1?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}let n=this.startBlockValue(e);n?this.stack.push(n):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type==="map-value-ind"){let n=er(this.peek(2)),r=nt(n),i;e.end?(i=e.end,i.push(this.sourceToken),delete e.end):i=[this.sourceToken];let s={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:r,key:e,sep:i}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=s}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let n=this.source.indexOf(`
|
|
137
|
+
`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
|
|
138
|
+
`,n)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let n=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,n.value){let r="end"in n.value?n.value.end:void 0;(Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment"?r?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)e.items.push({start:[this.sourceToken]});else if(n.sep)n.sep.push(this.sourceToken);else{if(this.atIndentedComment(n.start,e.indent)){let i=e.items[e.items.length-2]?.value?.end;if(Array.isArray(i)){Array.prototype.push.apply(i,n.start),i.push(this.sourceToken),e.items.pop();return}}n.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let r=!this.onKeyLine&&this.indent===e.indent,i=r&&(n.sep||n.explicitKey)&&this.type!=="seq-item-ind",s=[];if(i&&n.sep&&!n.value){let u=[];for(let o=0;o<n.sep.length;++o){let a=n.sep[o];switch(a.type){case"newline":u.push(o);break;case"space":break;case"comment":a.indent>e.indent&&(u.length=0);break;default:u.length=0}}u.length>=2&&(s=n.sep.splice(u[1]))}switch(this.type){case"anchor":case"tag":i||n.value?(s.push(this.sourceToken),e.items.push({start:s}),this.onKeyLine=!0):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"explicit-key-ind":!n.sep&&!n.explicitKey?(n.start.push(this.sourceToken),n.explicitKey=!0):i||n.value?(s.push(this.sourceToken),e.items.push({start:s,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(n.explicitKey)if(n.sep)if(n.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Be(n.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]});else if(Ea(n.key)&&!Be(n.sep,"newline")){let u=nt(n.start),o=n.key,a=n.sep;a.push(this.sourceToken),delete n.key,delete n.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:u,key:o,sep:a}]})}else s.length>0?n.sep=n.sep.concat(s,this.sourceToken):n.sep.push(this.sourceToken);else if(Be(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{let u=nt(n.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:u,key:null,sep:[this.sourceToken]}]})}else n.sep?n.value||i?e.items.push({start:s,key:null,sep:[this.sourceToken]}):Be(n.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let u=this.flowScalar(this.type);i||n.value?(e.items.push({start:s,key:u,sep:[]}),this.onKeyLine=!0):n.sep?this.stack.push(u):(Object.assign(n,{key:u,sep:[]}),this.onKeyLine=!0);return}default:{let u=this.startBlockValue(e);if(u){if(u.type==="block-seq"){if(!n.explicitKey&&n.sep&&!Be(n.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else r&&e.items.push({start:s});this.stack.push(u);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let n=e.items[e.items.length-1];switch(this.type){case"newline":if(n.value){let r="end"in n.value?n.value.end:void 0;(Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment"?r?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(n.start,e.indent)){let i=e.items[e.items.length-2]?.value?.end;if(Array.isArray(i)){Array.prototype.push.apply(i,n.start),i.push(this.sourceToken),e.items.pop();return}}n.start.push(this.sourceToken)}return;case"anchor":case"tag":if(n.value||this.indent<=e.indent)break;n.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;n.value||Be(n.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return}if(this.indent>e.indent){let r=this.startBlockValue(e);if(r){this.stack.push(r);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let n=e.items[e.items.length-1];if(this.type==="flow-error-end"){let r;do yield*this.pop(),r=this.peek(1);while(r?.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!n||n.sep?e.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return;case"map-value-ind":!n||n.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!n||n.value?e.items.push({start:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let i=this.flowScalar(this.type);!n||n.value?e.items.push({start:[],key:i,sep:[]}):n.sep?this.stack.push(i):Object.assign(n,{key:i,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}let r=this.startBlockValue(e);r?this.stack.push(r):(yield*this.pop(),yield*this.step())}else{let r=this.peek(2);if(r.type==="block-map"&&(this.type==="map-value-ind"&&r.indent===e.indent||this.type==="newline"&&!r.items[r.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&r.type!=="flow-collection"){let i=er(r),s=nt(i);ya(e);let u=e.end.splice(1,e.end.length);u.push(this.sourceToken);let o={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:s,key:e,sep:u}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let n=this.source.indexOf(`
|
|
139
|
+
`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
|
|
140
|
+
`,n)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let n=er(e),r=nt(n);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let n=er(e),r=nt(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,n){return this.type!=="comment"||this.indent<=n?!1:e.every(r=>r.type==="newline"||r.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};Aa.Parser=Xi});var _a=F(Mt=>{"use strict";var ba=$i(),Nd=It(),$t=xt(),Od=Pr(),Id=T(),Td=Qi(),Ca=Zi();function Sa(t){let e=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||e&&new Td.LineCounter||null,prettyErrors:e}}function kd(t,e={}){let{lineCounter:n,prettyErrors:r}=Sa(e),i=new Ca.Parser(n?.addNewLine),s=new ba.Composer(e),u=Array.from(s.compose(i.parse(t)));if(r&&n)for(let o of u)o.errors.forEach($t.prettifyError(t,n)),o.warnings.forEach($t.prettifyError(t,n));return u.length>0?u:Object.assign([],{empty:!0},s.streamInfo())}function Fa(t,e={}){let{lineCounter:n,prettyErrors:r}=Sa(e),i=new Ca.Parser(n?.addNewLine),s=new ba.Composer(e),u=null;for(let o of s.compose(i.parse(t),!0,t.length))if(!u)u=o;else if(u.options.logLevel!=="silent"){u.errors.push(new $t.YAMLParseError(o.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&n&&(u.errors.forEach($t.prettifyError(t,n)),u.warnings.forEach($t.prettifyError(t,n))),u}function xd(t,e,n){let r;typeof e=="function"?r=e:n===void 0&&e&&typeof e=="object"&&(n=e);let i=Fa(t,n);if(!i)return null;if(i.warnings.forEach(s=>Od.warn(i.options.logLevel,s)),i.errors.length>0){if(i.options.logLevel!=="silent")throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:r},n))}function Ld(t,e,n){let r=null;if(typeof e=="function"||Array.isArray(e)?r=e:n===void 0&&e&&(n=e),typeof n=="string"&&(n=n.length),typeof n=="number"){let i=Math.round(n);n=i<1?void 0:i>8?{indent:8}:{indent:i}}if(t===void 0){let{keepUndefined:i}=n??e??{};if(!i)return}return Id.isDocument(t)&&!r?t.toString(n):new Nd.Document(t,r,n).toString(n)}Mt.parse=xd;Mt.parseAllDocuments=kd;Mt.parseDocument=Fa;Mt.stringify=Ld});var va=F(x=>{"use strict";var qd=$i(),Pd=It(),Rd=Ei(),es=xt(),$d=pt(),Ne=T(),Md=Fe(),jd=V(),Kd=we(),Vd=ve(),Ud=Xn(),Jd=Wi(),Yd=Qi(),Gd=Zi(),tr=_a(),wa=ct();x.Composer=qd.Composer;x.Document=Pd.Document;x.Schema=Rd.Schema;x.YAMLError=es.YAMLError;x.YAMLParseError=es.YAMLParseError;x.YAMLWarning=es.YAMLWarning;x.Alias=$d.Alias;x.isAlias=Ne.isAlias;x.isCollection=Ne.isCollection;x.isDocument=Ne.isDocument;x.isMap=Ne.isMap;x.isNode=Ne.isNode;x.isPair=Ne.isPair;x.isScalar=Ne.isScalar;x.isSeq=Ne.isSeq;x.Pair=Md.Pair;x.Scalar=jd.Scalar;x.YAMLMap=Kd.YAMLMap;x.YAMLSeq=Vd.YAMLSeq;x.CST=Ud;x.Lexer=Jd.Lexer;x.LineCounter=Yd.LineCounter;x.Parser=Gd.Parser;x.parse=tr.parse;x.parseAllDocuments=tr.parseAllDocuments;x.parseDocument=tr.parseDocument;x.stringify=tr.stringify;x.visit=wa.visit;x.visitAsync=wa.visitAsync});import{readFile as qg}from"fs/promises";import*as vs from"fs";import*as Z from"path";var Xt=class extends Error{constructor(t){super(t),this.name="Eta Error"}},Bs=class extends Xt{constructor(t){super(t),this.name="EtaParser Error"}},Pl=class extends Xt{constructor(t){super(t),this.name="EtaRuntime Error"}},pr=class extends Xt{constructor(t){super(t),this.name="EtaFileResolution Error"}},Rl=class extends Xt{constructor(t){super(t),this.name="EtaNameResolution Error"}};function ut(t,e,n){let r=e.slice(0,n).split(/\n/),i=r.length,s=r[i-1].length+1;throw t+=" at line "+i+" col "+s+`:
|
|
141
|
+
|
|
142
|
+
`+e.split(/\n/)[i-1]+`
|
|
143
|
+
`+Array(s).join(" ")+"^",new Bs(t)}function $l(t,e,n,r){let i=e.split(`
|
|
144
|
+
`),s=Math.max(n-3,0),u=Math.min(i.length,n+3),o=r,a=i.slice(s,u).map((d,c)=>{let h=c+s+1;return(h===n?" >> ":" ")+h+"| "+d}).join(`
|
|
145
|
+
`),l=new Pl((o?o+":"+n+`
|
|
146
|
+
`:"line "+n+`
|
|
147
|
+
`)+a+`
|
|
148
|
+
|
|
149
|
+
`+t.message);throw l.name=t.name,l.cause=t,l}function Ml(t){let e="";try{e=vs.readFileSync(t,"utf8")}catch(n){throw n?.code==="ENOENT"?new pr(`Could not find template: ${t}`):n}return e}function jl(t,e){let n="",r=this.config.views;if(!r)throw new pr("Views directory is not defined");let i=e?.filepath,s=this.config.defaultExtension===void 0?".eta":this.config.defaultExtension,u=JSON.stringify({filename:i,path:t,views:this.config.views});if(t+=Z.extname(t)?"":s,i){if(this.config.cacheFilepaths&&this.filepathCache[u])return this.filepathCache[u];if(Vl.exec(t)?.length){let o=t.replace(/^\/*|^\\*/,"");n=Z.join(r,o)}else n=Z.join(Z.dirname(i),t)}else n=Z.join(r,t);if(Kl(r,n))return i&&this.config.cacheFilepaths&&(this.filepathCache[u]=n),n;throw new pr(`Template '${t}' is not in the views directory`)}function Kl(t,e){let n=Z.relative(t,e);return n&&!n.startsWith("..")&&!Z.isAbsolute(n)}var Vl=/^\\|^\//,Ul=(async()=>{}).constructor;function Jl(t,e){let n=this.config,r=e?.async?Ul:Function;try{return new r(n.varName,"options",this.compileToString.call(this,t,e))}catch(i){throw i instanceof SyntaxError?new Bs(`Bad template syntax
|
|
150
|
+
|
|
151
|
+
`+i.message+`
|
|
152
|
+
`+Array(i.message.length+1).join("=")+`
|
|
153
|
+
`+this.compileToString.call(this,t,e)+`
|
|
154
|
+
`):i}}function Yl(t,e){let n=this.config,r=e?.async,i=this.compileBody,s=this.parse.call(this,t),u=`${n.functionHeader}
|
|
155
|
+
let include = (__eta_t, __eta_d) => this.render(__eta_t, {...${n.varName}, ...(__eta_d ?? {})}, options);
|
|
156
|
+
let includeAsync = (__eta_t, __eta_d) => this.renderAsync(__eta_t, {...${n.varName}, ...(__eta_d ?? {})}, options);
|
|
157
|
+
|
|
158
|
+
let __eta = {res: "", e: this.config.escapeFunction, f: this.config.filterFunction${n.debug?', line: 1, templateStr: "'+t.replace(/\\|"/g,"\\$&").replace(/\r\n|\n|\r/g,"\\n")+'"':""}};
|
|
159
|
+
|
|
160
|
+
function layout(path, data) {
|
|
161
|
+
__eta.layout = path;
|
|
162
|
+
__eta.layoutData = data;
|
|
163
|
+
}${n.debug?"try {":""}${n.useWith?"with("+n.varName+"||{}){":""}
|
|
164
|
+
|
|
165
|
+
function ${n.outputFunctionName}(s){__eta.res+=s;}
|
|
166
|
+
|
|
167
|
+
${i.call(this,s)}
|
|
168
|
+
if (__eta.layout) {
|
|
169
|
+
__eta.res = ${r?"await includeAsync":"include"} (__eta.layout, {...${n.varName}, body: __eta.res, ...__eta.layoutData});
|
|
170
|
+
}
|
|
171
|
+
${n.useWith?"}":""}${n.debug?"} catch (e) { this.RuntimeErr(e, __eta.templateStr, __eta.line, options.filepath) }":""}
|
|
172
|
+
return __eta.res;
|
|
173
|
+
`;if(n.plugins)for(let o=0;o<n.plugins.length;o++){let a=n.plugins[o];a.processFnString&&(u=a.processFnString(u,n))}return u}function Gl(t){let e=this.config,n=0,r=t.length,i="";for(;n<r;n++){let s=t[n];if(typeof s=="string")i+="__eta.res+='"+s+`'
|
|
174
|
+
`;else{let u=s.t,o=s.val||"";e.debug&&(i+="__eta.line="+s.lineNo+`
|
|
175
|
+
`),u==="r"?(e.autoFilter&&(o="__eta.f("+o+")"),i+="__eta.res+="+o+`
|
|
176
|
+
`):u==="i"?(e.autoFilter&&(o="__eta.f("+o+")"),e.autoEscape&&(o="__eta.e("+o+")"),i+="__eta.res+="+o+`
|
|
177
|
+
`):u==="e"&&(i+=o+`
|
|
178
|
+
`)}}return i}function Hl(t,e,n,r){let i,s;return Array.isArray(e.autoTrim)?(i=e.autoTrim[1],s=e.autoTrim[0]):i=s=e.autoTrim,(n||n===!1)&&(i=n),(r||r===!1)&&(s=r),!s&&!i?t:i==="slurp"&&s==="slurp"?t.trim():(i==="_"||i==="slurp"?t=t.trimStart():(i==="-"||i==="nl")&&(t=t.replace(/^(?:\r\n|\n|\r)/,"")),s==="_"||s==="slurp"?t=t.trimEnd():(s==="-"||s==="nl")&&(t=t.replace(/(?:\r\n|\n|\r)$/,"")),t)}var Wl={"&":"&","<":"<",">":">",'"':""","'":"'"};function zl(t){return Wl[t]}function Ql(t){let e=String(t);return/[&<>"']/.test(e)?e.replace(/[&<>"']/g,zl):e}var _s={autoEscape:!0,autoFilter:!1,autoTrim:[!1,"nl"],cache:!1,cacheFilepaths:!0,debug:!1,escapeFunction:Ql,filterFunction:t=>String(t),outputFunctionName:"output",functionHeader:"",parse:{exec:"",interpolate:"=",raw:"~"},plugins:[],rmWhitespace:!1,tags:["<%","%>"],useWith:!1,varName:"it",defaultExtension:".eta"},Ht=/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})*}|(?!\${)[^\\`])*`/g,Wt=/'(?:\\[\s\w"'\\`]|[^\n\r'\\])*?'/g,zt=/"(?:\\[\s\w"'\\`]|[^\n\r"\\])*?"/g;function Qt(t){return t.replace(/[.*+\-?^${}()|[\]\\]/g,"\\$&")}function Xl(t,e){return t.slice(0,e).split(`
|
|
179
|
+
`).length}function Zl(t){let e=this.config,n=[],r=!1,i=0,s=e.parse;if(e.plugins)for(let c=0;c<e.plugins.length;c++){let h=e.plugins[c];h.processTemplate&&(t=h.processTemplate(t,e))}e.rmWhitespace&&(t=t.replace(/[\r\n]+/g,`
|
|
180
|
+
`).replace(/^\s+|\s+$/gm,"")),Ht.lastIndex=0,Wt.lastIndex=0,zt.lastIndex=0;function u(c,h){c&&(c=Hl(c,e,r,h),c&&(c=c.replace(/\\|'/g,"\\$&").replace(/\r\n|\n|\r/g,"\\n"),n.push(c)))}let o=[s.exec,s.interpolate,s.raw].reduce((c,h)=>c&&h?c+"|"+Qt(h):h?Qt(h):c,""),a=new RegExp(Qt(e.tags[0])+"(-|_)?\\s*("+o+")?\\s*","g"),l=new RegExp("'|\"|`|\\/\\*|(\\s*(-|_)?"+Qt(e.tags[1])+")","g"),d;for(;d=a.exec(t);){let c=t.slice(i,d.index);i=d[0].length+d.index;let h=d[1],m=d[2]||"";u(c,h),l.lastIndex=i;let y,f=!1;for(;y=l.exec(t);)if(y[1]){let p=t.slice(i,y.index);a.lastIndex=i=l.lastIndex,r=y[2],f={t:m===s.exec?"e":m===s.raw?"r":m===s.interpolate?"i":"",val:p};break}else{let p=y[0];if(p==="/*"){let g=t.indexOf("*/",l.lastIndex);g===-1&&ut("unclosed comment",t,y.index),l.lastIndex=g}else p==="'"?(Wt.lastIndex=y.index,Wt.exec(t)?l.lastIndex=Wt.lastIndex:ut("unclosed string",t,y.index)):p==='"'?(zt.lastIndex=y.index,zt.exec(t)?l.lastIndex=zt.lastIndex:ut("unclosed string",t,y.index)):p==="`"&&(Ht.lastIndex=y.index,Ht.exec(t)?l.lastIndex=Ht.lastIndex:ut("unclosed string",t,y.index))}f?(e.debug&&(f.lineNo=Xl(t,d.index)),n.push(f)):ut("unclosed tag",t,d.index)}if(u(t.slice(i,t.length),!1),e.plugins)for(let c=0;c<e.plugins.length;c++){let h=e.plugins[c];h.processAST&&(n=h.processAST(n,e))}return n}function Ns(t,e){let n=e?.async?this.templatesAsync:this.templatesSync;if(this.resolvePath&&this.readFile&&!t.startsWith("@")){let r=e.filepath,i=n.get(r);if(this.config.cache&&i)return i;{let s=this.readFile(r),u=this.compile(s,e);return this.config.cache&&n.define(r,u),u}}else{let r=n.get(t);if(r)return r;throw new Rl(`Failed to get template '${t}'`)}}function Os(t,e,n){let r,i={...n,async:!1};return typeof t=="string"?(this.resolvePath&&this.readFile&&!t.startsWith("@")&&(i.filepath=this.resolvePath(t,i)),r=Ns.call(this,t,i)):r=t,r.call(this,e,i)}function Is(t,e,n){let r,i={...n,async:!0};typeof t=="string"?(this.resolvePath&&this.readFile&&!t.startsWith("@")&&(i.filepath=this.resolvePath(t,i)),r=Ns.call(this,t,i)):r=t;let s=r.call(this,e,i);return Promise.resolve(s)}function ec(t,e){let n=this.compile(t,{async:!1});return Os.call(this,n,e)}function tc(t,e){let n=this.compile(t,{async:!0});return Is.call(this,n,e)}var ws=class{constructor(t){this.cache=t}define(t,e){this.cache[t]=e}get(t){return this.cache[t]}remove(t){delete this.cache[t]}reset(){this.cache={}}load(t){this.cache={...this.cache,...t}}},nc=class{constructor(t){t?this.config={..._s,...t}:this.config={..._s}}config;RuntimeErr=$l;compile=Jl;compileToString=Yl;compileBody=Gl;parse=Zl;render=Os;renderAsync=Is;renderString=ec;renderStringAsync=tc;filepathCache={};templatesSync=new ws({});templatesAsync=new ws({});resolvePath=null;readFile=null;configure(t){this.config={...this.config,...t}}withConfig(t){return{...this,config:{...this.config,...t}}}loadTemplate(t,e,n){if(typeof e=="string")(n?.async?this.templatesAsync:this.templatesSync).define(t,this.compile(e,n));else{let r=this.templatesSync;(e.constructor.name==="AsyncFunction"||n?.async)&&(r=this.templatesAsync),r.define(t,e)}}},Ts=class extends nc{readFile=Ml;resolvePath=jl};var ks=".tmpl",Zt="$helpers",xs=[".ts",".js",".mjs"];import dr from"path";import{readdir as kg}from"fs/promises";import en from"path";import{stat as ic}from"fs/promises";import{pathToFileURL as rc}from"url";async function Le(t){let r=await import(`${rc(t).href}?t=${Date.now()}`);return r.default!==void 0?r.default:r}async function sc(t,e){let n=[],r=en.resolve(t),i=en.resolve(e);for(;r.startsWith(i);){let s=await uc(r);s&&n.unshift(s);let u=en.dirname(r);if(u===r)break;r=u}return n}async function uc(t){for(let e of xs){let n=en.join(t,`${Zt}${e}`),[r]=await xe(()=>ic(n));if(r?.isFile())return n}return null}async function Ls(t,e){let n=await sc(t,e),r={};for(let i of n){let[s,u]=await xe(()=>Le(i));if(u){ce.emit("error",{source:"template",error:u,context:{filepath:i,operation:"load-helpers"}});continue}if(s&&typeof s=="object"){let o=s,a=Object.keys(o).length;Object.assign(r,o),ce.emit("template:helpers",{filepath:i,count:a})}}return r}import pp from"path";import{readFile as Ec}from"fs/promises";var oc=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,ac=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,lc=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,mr={Space_Separator:oc,ID_Start:ac,ID_Continue:lc},j={isSpaceSeparator(t){return typeof t=="string"&&mr.Space_Separator.test(t)},isIdStartChar(t){return typeof t=="string"&&(t>="a"&&t<="z"||t>="A"&&t<="Z"||t==="$"||t==="_"||mr.ID_Start.test(t))},isIdContinueChar(t){return typeof t=="string"&&(t>="a"&&t<="z"||t>="A"&&t<="Z"||t>="0"&&t<="9"||t==="$"||t==="_"||t==="\u200C"||t==="\u200D"||mr.ID_Continue.test(t))},isDigit(t){return typeof t=="string"&&/[0-9]/.test(t)},isHexDigit(t){return typeof t=="string"&&/[0-9A-Fa-f]/.test(t)}},Dr,H,he,nn,Ee,ne,Y,Ar,at,cc=function(e,n){Dr=String(e),H="start",he=[],nn=0,Ee=1,ne=0,Y=void 0,Ar=void 0,at=void 0;do Y=fc(),pc[H]();while(Y.type!=="eof");return typeof n=="function"?yr({"":at},"",n):at};function yr(t,e,n){let r=t[e];if(r!=null&&typeof r=="object")if(Array.isArray(r))for(let i=0;i<r.length;i++){let s=String(i),u=yr(r,s,n);u===void 0?delete r[s]:Object.defineProperty(r,s,{value:u,writable:!0,enumerable:!0,configurable:!0})}else for(let i in r){let s=yr(r,i,n);s===void 0?delete r[i]:Object.defineProperty(r,i,{value:s,writable:!0,enumerable:!0,configurable:!0})}return n.call(t,e,r)}var N,B,ot,fe,I;function fc(){for(N="default",B="",ot=!1,fe=1;;){I=de();let t=Ps[N]();if(t)return t}}function de(){if(Dr[nn])return String.fromCodePoint(Dr.codePointAt(nn))}function D(){let t=de();return t===`
|
|
181
|
+
`?(Ee++,ne=0):t?ne+=t.length:ne++,t&&(nn+=t.length),t}var Ps={default(){switch(I){case" ":case"\v":case"\f":case" ":case"\xA0":case"\uFEFF":case`
|
|
182
|
+
`:case"\r":case"\u2028":case"\u2029":D();return;case"/":D(),N="comment";return;case void 0:return D(),P("eof")}if(j.isSpaceSeparator(I)){D();return}return Ps[H]()},comment(){switch(I){case"*":D(),N="multiLineComment";return;case"/":D(),N="singleLineComment";return}throw R(D())},multiLineComment(){switch(I){case"*":D(),N="multiLineCommentAsterisk";return;case void 0:throw R(D())}D()},multiLineCommentAsterisk(){switch(I){case"*":D();return;case"/":D(),N="default";return;case void 0:throw R(D())}D(),N="multiLineComment"},singleLineComment(){switch(I){case`
|
|
183
|
+
`:case"\r":case"\u2028":case"\u2029":D(),N="default";return;case void 0:return D(),P("eof")}D()},value(){switch(I){case"{":case"[":return P("punctuator",D());case"n":return D(),qe("ull"),P("null",null);case"t":return D(),qe("rue"),P("boolean",!0);case"f":return D(),qe("alse"),P("boolean",!1);case"-":case"+":D()==="-"&&(fe=-1),N="sign";return;case".":B=D(),N="decimalPointLeading";return;case"0":B=D(),N="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":B=D(),N="decimalInteger";return;case"I":return D(),qe("nfinity"),P("numeric",1/0);case"N":return D(),qe("aN"),P("numeric",NaN);case'"':case"'":ot=D()==='"',B="",N="string";return}throw R(D())},identifierNameStartEscape(){if(I!=="u")throw R(D());D();let t=Er();switch(t){case"$":case"_":break;default:if(!j.isIdStartChar(t))throw qs();break}B+=t,N="identifierName"},identifierName(){switch(I){case"$":case"_":case"\u200C":case"\u200D":B+=D();return;case"\\":D(),N="identifierNameEscape";return}if(j.isIdContinueChar(I)){B+=D();return}return P("identifier",B)},identifierNameEscape(){if(I!=="u")throw R(D());D();let t=Er();switch(t){case"$":case"_":case"\u200C":case"\u200D":break;default:if(!j.isIdContinueChar(t))throw qs();break}B+=t,N="identifierName"},sign(){switch(I){case".":B=D(),N="decimalPointLeading";return;case"0":B=D(),N="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":B=D(),N="decimalInteger";return;case"I":return D(),qe("nfinity"),P("numeric",fe*(1/0));case"N":return D(),qe("aN"),P("numeric",NaN)}throw R(D())},zero(){switch(I){case".":B+=D(),N="decimalPoint";return;case"e":case"E":B+=D(),N="decimalExponent";return;case"x":case"X":B+=D(),N="hexadecimal";return}return P("numeric",fe*0)},decimalInteger(){switch(I){case".":B+=D(),N="decimalPoint";return;case"e":case"E":B+=D(),N="decimalExponent";return}if(j.isDigit(I)){B+=D();return}return P("numeric",fe*Number(B))},decimalPointLeading(){if(j.isDigit(I)){B+=D(),N="decimalFraction";return}throw R(D())},decimalPoint(){switch(I){case"e":case"E":B+=D(),N="decimalExponent";return}if(j.isDigit(I)){B+=D(),N="decimalFraction";return}return P("numeric",fe*Number(B))},decimalFraction(){switch(I){case"e":case"E":B+=D(),N="decimalExponent";return}if(j.isDigit(I)){B+=D();return}return P("numeric",fe*Number(B))},decimalExponent(){switch(I){case"+":case"-":B+=D(),N="decimalExponentSign";return}if(j.isDigit(I)){B+=D(),N="decimalExponentInteger";return}throw R(D())},decimalExponentSign(){if(j.isDigit(I)){B+=D(),N="decimalExponentInteger";return}throw R(D())},decimalExponentInteger(){if(j.isDigit(I)){B+=D();return}return P("numeric",fe*Number(B))},hexadecimal(){if(j.isHexDigit(I)){B+=D(),N="hexadecimalInteger";return}throw R(D())},hexadecimalInteger(){if(j.isHexDigit(I)){B+=D();return}return P("numeric",fe*Number(B))},string(){switch(I){case"\\":D(),B+=hc();return;case'"':if(ot)return D(),P("string",B);B+=D();return;case"'":if(!ot)return D(),P("string",B);B+=D();return;case`
|
|
184
|
+
`:case"\r":throw R(D());case"\u2028":case"\u2029":mc(I);break;case void 0:throw R(D())}B+=D()},start(){switch(I){case"{":case"[":return P("punctuator",D())}N="value"},beforePropertyName(){switch(I){case"$":case"_":B=D(),N="identifierName";return;case"\\":D(),N="identifierNameStartEscape";return;case"}":return P("punctuator",D());case'"':case"'":ot=D()==='"',N="string";return}if(j.isIdStartChar(I)){B+=D(),N="identifierName";return}throw R(D())},afterPropertyName(){if(I===":")return P("punctuator",D());throw R(D())},beforePropertyValue(){N="value"},afterPropertyValue(){switch(I){case",":case"}":return P("punctuator",D())}throw R(D())},beforeArrayValue(){if(I==="]")return P("punctuator",D());N="value"},afterArrayValue(){switch(I){case",":case"]":return P("punctuator",D())}throw R(D())},end(){throw R(D())}};function P(t,e){return{type:t,value:e,line:Ee,column:ne}}function qe(t){for(let e of t){if(de()!==e)throw R(D());D()}}function hc(){switch(de()){case"b":return D(),"\b";case"f":return D(),"\f";case"n":return D(),`
|
|
185
|
+
`;case"r":return D(),"\r";case"t":return D()," ";case"v":return D(),"\v";case"0":if(D(),j.isDigit(de()))throw R(D());return"\0";case"x":return D(),dc();case"u":return D(),Er();case`
|
|
186
|
+
`:case"\u2028":case"\u2029":return D(),"";case"\r":return D(),de()===`
|
|
187
|
+
`&&D(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw R(D());case void 0:throw R(D())}return D()}function dc(){let t="",e=de();if(!j.isHexDigit(e)||(t+=D(),e=de(),!j.isHexDigit(e)))throw R(D());return t+=D(),String.fromCodePoint(parseInt(t,16))}function Er(){let t="",e=4;for(;e-- >0;){let n=de();if(!j.isHexDigit(n))throw R(D());t+=D()}return String.fromCodePoint(parseInt(t,16))}var pc={start(){if(Y.type==="eof")throw Pe();gr()},beforePropertyName(){switch(Y.type){case"identifier":case"string":Ar=Y.value,H="afterPropertyName";return;case"punctuator":tn();return;case"eof":throw Pe()}},afterPropertyName(){if(Y.type==="eof")throw Pe();H="beforePropertyValue"},beforePropertyValue(){if(Y.type==="eof")throw Pe();gr()},beforeArrayValue(){if(Y.type==="eof")throw Pe();if(Y.type==="punctuator"&&Y.value==="]"){tn();return}gr()},afterPropertyValue(){if(Y.type==="eof")throw Pe();switch(Y.value){case",":H="beforePropertyName";return;case"}":tn()}},afterArrayValue(){if(Y.type==="eof")throw Pe();switch(Y.value){case",":H="beforeArrayValue";return;case"]":tn()}},end(){}};function gr(){let t;switch(Y.type){case"punctuator":switch(Y.value){case"{":t={};break;case"[":t=[];break}break;case"null":case"boolean":case"numeric":case"string":t=Y.value;break}if(at===void 0)at=t;else{let e=he[he.length-1];Array.isArray(e)?e.push(t):Object.defineProperty(e,Ar,{value:t,writable:!0,enumerable:!0,configurable:!0})}if(t!==null&&typeof t=="object")he.push(t),Array.isArray(t)?H="beforeArrayValue":H="beforePropertyName";else{let e=he[he.length-1];e==null?H="end":Array.isArray(e)?H="afterArrayValue":H="afterPropertyValue"}}function tn(){he.pop();let t=he[he.length-1];t==null?H="end":Array.isArray(t)?H="afterArrayValue":H="afterPropertyValue"}function R(t){return rn(t===void 0?`JSON5: invalid end of input at ${Ee}:${ne}`:`JSON5: invalid character '${Rs(t)}' at ${Ee}:${ne}`)}function Pe(){return rn(`JSON5: invalid end of input at ${Ee}:${ne}`)}function qs(){return ne-=5,rn(`JSON5: invalid identifier character at ${Ee}:${ne}`)}function mc(t){console.warn(`JSON5: '${Rs(t)}' in strings is not valid ECMAScript; consider escaping`)}function Rs(t){let e={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(e[t])return e[t];if(t<" "){let n=t.charCodeAt(0).toString(16);return"\\x"+("00"+n).substring(n.length)}return t}function rn(t){let e=new SyntaxError(t);return e.lineNumber=Ee,e.columnNumber=ne,e}var gc=function(e,n,r){let i=[],s="",u,o,a="",l;if(n!=null&&typeof n=="object"&&!Array.isArray(n)&&(r=n.space,l=n.quote,n=n.replacer),typeof n=="function")o=n;else if(Array.isArray(n)){u=[];for(let f of n){let p;typeof f=="string"?p=f:(typeof f=="number"||f instanceof String||f instanceof Number)&&(p=String(f)),p!==void 0&&u.indexOf(p)<0&&u.push(p)}}return r instanceof Number?r=Number(r):r instanceof String&&(r=String(r)),typeof r=="number"?r>0&&(r=Math.min(10,Math.floor(r)),a=" ".substr(0,r)):typeof r=="string"&&(a=r.substr(0,10)),d("",{"":e});function d(f,p){let g=p[f];switch(g!=null&&(typeof g.toJSON5=="function"?g=g.toJSON5(f):typeof g.toJSON=="function"&&(g=g.toJSON(f))),o&&(g=o.call(p,f,g)),g instanceof Number?g=Number(g):g instanceof String?g=String(g):g instanceof Boolean&&(g=g.valueOf()),g){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof g=="string")return c(g,!1);if(typeof g=="number")return String(g);if(typeof g=="object")return Array.isArray(g)?y(g):h(g)}function c(f){let p={"'":.1,'"':.2},g={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"},E="";for(let C=0;C<f.length;C++){let S=f[C];switch(S){case"'":case'"':p[S]++,E+=S;continue;case"\0":if(j.isDigit(f[C+1])){E+="\\x00";continue}}if(g[S]){E+=g[S];continue}if(S<" "){let w=S.charCodeAt(0).toString(16);E+="\\x"+("00"+w).substring(w.length);continue}E+=S}let A=l||Object.keys(p).reduce((C,S)=>p[C]<p[S]?C:S);return E=E.replace(new RegExp(A,"g"),g[A]),A+E+A}function h(f){if(i.indexOf(f)>=0)throw TypeError("Converting circular structure to JSON5");i.push(f);let p=s;s=s+a;let g=u||Object.keys(f),E=[];for(let C of g){let S=d(C,f);if(S!==void 0){let w=m(C)+":";a!==""&&(w+=" "),w+=S,E.push(w)}}let A;if(E.length===0)A="{}";else{let C;if(a==="")C=E.join(","),A="{"+C+"}";else{let S=`,
|
|
188
|
+
`+s;C=E.join(S),A=`{
|
|
189
|
+
`+s+C+`,
|
|
190
|
+
`+p+"}"}}return i.pop(),s=p,A}function m(f){if(f.length===0)return c(f,!0);let p=String.fromCodePoint(f.codePointAt(0));if(!j.isIdStartChar(p))return c(f,!0);for(let g=p.length;g<f.length;g++)if(!j.isIdContinueChar(String.fromCodePoint(f.codePointAt(g))))return c(f,!0);return f}function y(f){if(i.indexOf(f)>=0)throw TypeError("Converting circular structure to JSON5");i.push(f);let p=s;s=s+a;let g=[];for(let A=0;A<f.length;A++){let C=d(String(A),f);g.push(C!==void 0?C:"null")}let E;if(g.length===0)E="[]";else if(a==="")E="["+g.join(",")+"]";else{let A=`,
|
|
191
|
+
`+s,C=g.join(A);E=`[
|
|
192
|
+
`+s+C+`,
|
|
193
|
+
`+p+"]"}return i.pop(),s=p,E}},Dc={parse:cc,stringify:gc},yc=Dc,lt=yc;async function sn(t){let e=await Ec(t,"utf-8");return lt.parse(e)}var Ba=ql(va(),1);import{readFile as Hd}from"fs/promises";async function nr(t){let e=await Hd(t,"utf-8");return(0,Ba.parse)(e)}import{readFile as np}from"fs/promises";var k=class t extends Error{constructor(e,n,r,...i){Array.isArray(n)&&(n=n.join(" ").trim()),super(n),Error.captureStackTrace!==void 0&&Error.captureStackTrace(this,t),this.code=e;for(let s of i)for(let u in s){let o=s[u];this[u]=Buffer.isBuffer(o)?o.toString(r.encoding):o==null?o:JSON.parse(JSON.stringify(o))}}};var Na=function(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)};var rr=function(t){let e=[];for(let n=0,r=t.length;n<r;n++){let i=t[n];if(i==null||i===!1)e[n]={disabled:!0};else if(typeof i=="string")e[n]={name:i};else if(Na(i)){if(typeof i.name!="string")throw new k("CSV_OPTION_COLUMNS_MISSING_NAME",["Option columns missing name:",`property "name" is required at position ${n}`,"when column is an object literal"]);e[n]=i}else throw new k("CSV_INVALID_COLUMN_DEFINITION",["Invalid column definition:","expect a string or a literal object,",`got ${JSON.stringify(i)} at position ${n}`])}return e};var ts=class{constructor(e=100){this.size=e,this.length=0,this.buf=Buffer.allocUnsafe(e)}prepend(e){if(Buffer.isBuffer(e)){let n=this.length+e.length;if(n>=this.size&&(this.resize(),n>=this.size))throw Error("INVALID_BUFFER_STATE");let r=this.buf;this.buf=Buffer.allocUnsafe(this.size),e.copy(this.buf,0),r.copy(this.buf,e.length),this.length+=e.length}else{let n=this.length++;n===this.size&&this.resize();let r=this.clone();this.buf[0]=e,r.copy(this.buf,1,0,n)}}append(e){let n=this.length++;n===this.size&&this.resize(),this.buf[n]=e}clone(){return Buffer.from(this.buf.slice(0,this.length))}resize(){let e=this.length;this.size=this.size*2;let n=Buffer.allocUnsafe(this.size);this.buf.copy(n,0,0,e),this.buf=n}toString(e){return e?this.buf.slice(0,this.length).toString(e):Uint8Array.prototype.slice.call(this.buf.slice(0,this.length))}toJSON(){return this.toString("utf8")}reset(){this.length=0}},ns=ts;var Wd=12,zd=13,Qd=10,Xd=32,Zd=9,Oa=function(t){return{bomSkipped:!1,bufBytesStart:0,castField:t.cast_function,commenting:!1,error:void 0,enabled:t.from_line===1,escaping:!1,escapeIsQuote:Buffer.isBuffer(t.escape)&&Buffer.isBuffer(t.quote)&&Buffer.compare(t.escape,t.quote)===0,expectedRecordLength:Array.isArray(t.columns)?t.columns.length:void 0,field:new ns(20),firstLineToHeaders:t.cast_first_line_to_header,needMoreDataSize:Math.max(t.comment!==null?t.comment.length:0,...t.delimiter.map(e=>e.length),t.quote!==null?t.quote.length:0),previousBuf:void 0,quoting:!1,stop:!1,rawBuffer:new ns(100),record:[],recordHasError:!1,record_length:0,recordDelimiterMaxLength:t.record_delimiter.length===0?0:Math.max(...t.record_delimiter.map(e=>e.length)),trimChars:[Buffer.from(" ",t.encoding)[0],Buffer.from(" ",t.encoding)[0]],wasQuoting:!1,wasRowDelimiter:!1,timchars:[Buffer.from(Buffer.from([zd],"utf8").toString(),t.encoding),Buffer.from(Buffer.from([Qd],"utf8").toString(),t.encoding),Buffer.from(Buffer.from([Wd],"utf8").toString(),t.encoding),Buffer.from(Buffer.from([Xd],"utf8").toString(),t.encoding),Buffer.from(Buffer.from([Zd],"utf8").toString(),t.encoding)]}};var Ia=function(t){return t.replace(/([A-Z])/g,function(e,n){return"_"+n.toLowerCase()})};var rs=function(t){let e={};for(let r in t)e[Ia(r)]=t[r];if(e.encoding===void 0||e.encoding===!0)e.encoding="utf8";else if(e.encoding===null||e.encoding===!1)e.encoding=null;else if(typeof e.encoding!="string"&&e.encoding!==null)throw new k("CSV_INVALID_OPTION_ENCODING",["Invalid option encoding:","encoding must be a string or null to return a buffer,",`got ${JSON.stringify(e.encoding)}`],e);if(e.bom===void 0||e.bom===null||e.bom===!1)e.bom=!1;else if(e.bom!==!0)throw new k("CSV_INVALID_OPTION_BOM",["Invalid option bom:","bom must be true,",`got ${JSON.stringify(e.bom)}`],e);if(e.cast_function=null,e.cast===void 0||e.cast===null||e.cast===!1||e.cast==="")e.cast=void 0;else if(typeof e.cast=="function")e.cast_function=e.cast,e.cast=!0;else if(e.cast!==!0)throw new k("CSV_INVALID_OPTION_CAST",["Invalid option cast:","cast must be true or a function,",`got ${JSON.stringify(e.cast)}`],e);if(e.cast_date===void 0||e.cast_date===null||e.cast_date===!1||e.cast_date==="")e.cast_date=!1;else if(e.cast_date===!0)e.cast_date=function(r){let i=Date.parse(r);return isNaN(i)?r:new Date(i)};else if(typeof e.cast_date!="function")throw new k("CSV_INVALID_OPTION_CAST_DATE",["Invalid option cast_date:","cast_date must be true or a function,",`got ${JSON.stringify(e.cast_date)}`],e);if(e.cast_first_line_to_header=void 0,e.columns===!0)e.cast_first_line_to_header=void 0;else if(typeof e.columns=="function")e.cast_first_line_to_header=e.columns,e.columns=!0;else if(Array.isArray(e.columns))e.columns=rr(e.columns);else if(e.columns===void 0||e.columns===null||e.columns===!1)e.columns=!1;else throw new k("CSV_INVALID_OPTION_COLUMNS",["Invalid option columns:","expect an array, a function or true,",`got ${JSON.stringify(e.columns)}`],e);if(e.group_columns_by_name===void 0||e.group_columns_by_name===null||e.group_columns_by_name===!1)e.group_columns_by_name=!1;else{if(e.group_columns_by_name!==!0)throw new k("CSV_INVALID_OPTION_GROUP_COLUMNS_BY_NAME",["Invalid option group_columns_by_name:","expect an boolean,",`got ${JSON.stringify(e.group_columns_by_name)}`],e);if(e.columns===!1)throw new k("CSV_INVALID_OPTION_GROUP_COLUMNS_BY_NAME",["Invalid option group_columns_by_name:","the `columns` mode must be activated."],e)}if(e.comment===void 0||e.comment===null||e.comment===!1||e.comment==="")e.comment=null;else if(typeof e.comment=="string"&&(e.comment=Buffer.from(e.comment,e.encoding)),!Buffer.isBuffer(e.comment))throw new k("CSV_INVALID_OPTION_COMMENT",["Invalid option comment:","comment must be a buffer or a string,",`got ${JSON.stringify(e.comment)}`],e);if(e.comment_no_infix===void 0||e.comment_no_infix===null||e.comment_no_infix===!1)e.comment_no_infix=!1;else if(e.comment_no_infix!==!0)throw new k("CSV_INVALID_OPTION_COMMENT",["Invalid option comment_no_infix:","value must be a boolean,",`got ${JSON.stringify(e.comment_no_infix)}`],e);let n=JSON.stringify(e.delimiter);if(Array.isArray(e.delimiter)||(e.delimiter=[e.delimiter]),e.delimiter.length===0)throw new k("CSV_INVALID_OPTION_DELIMITER",["Invalid option delimiter:","delimiter must be a non empty string or buffer or array of string|buffer,",`got ${n}`],e);if(e.delimiter=e.delimiter.map(function(r){if(r==null||r===!1)return Buffer.from(",",e.encoding);if(typeof r=="string"&&(r=Buffer.from(r,e.encoding)),!Buffer.isBuffer(r)||r.length===0)throw new k("CSV_INVALID_OPTION_DELIMITER",["Invalid option delimiter:","delimiter must be a non empty string or buffer or array of string|buffer,",`got ${n}`],e);return r}),e.escape===void 0||e.escape===!0?e.escape=Buffer.from('"',e.encoding):typeof e.escape=="string"?e.escape=Buffer.from(e.escape,e.encoding):(e.escape===null||e.escape===!1)&&(e.escape=null),e.escape!==null&&!Buffer.isBuffer(e.escape))throw new Error(`Invalid Option: escape must be a buffer, a string or a boolean, got ${JSON.stringify(e.escape)}`);if(e.from===void 0||e.from===null)e.from=1;else if(typeof e.from=="string"&&/\d+/.test(e.from)&&(e.from=parseInt(e.from)),Number.isInteger(e.from)){if(e.from<0)throw new Error(`Invalid Option: from must be a positive integer, got ${JSON.stringify(t.from)}`)}else throw new Error(`Invalid Option: from must be an integer, got ${JSON.stringify(e.from)}`);if(e.from_line===void 0||e.from_line===null)e.from_line=1;else if(typeof e.from_line=="string"&&/\d+/.test(e.from_line)&&(e.from_line=parseInt(e.from_line)),Number.isInteger(e.from_line)){if(e.from_line<=0)throw new Error(`Invalid Option: from_line must be a positive integer greater than 0, got ${JSON.stringify(t.from_line)}`)}else throw new Error(`Invalid Option: from_line must be an integer, got ${JSON.stringify(t.from_line)}`);if(e.ignore_last_delimiters===void 0||e.ignore_last_delimiters===null)e.ignore_last_delimiters=!1;else if(typeof e.ignore_last_delimiters=="number")e.ignore_last_delimiters=Math.floor(e.ignore_last_delimiters),e.ignore_last_delimiters===0&&(e.ignore_last_delimiters=!1);else if(typeof e.ignore_last_delimiters!="boolean")throw new k("CSV_INVALID_OPTION_IGNORE_LAST_DELIMITERS",["Invalid option `ignore_last_delimiters`:","the value must be a boolean value or an integer,",`got ${JSON.stringify(e.ignore_last_delimiters)}`],e);if(e.ignore_last_delimiters===!0&&e.columns===!1)throw new k("CSV_IGNORE_LAST_DELIMITERS_REQUIRES_COLUMNS",["The option `ignore_last_delimiters`","requires the activation of the `columns` option"],e);if(e.info===void 0||e.info===null||e.info===!1)e.info=!1;else if(e.info!==!0)throw new Error(`Invalid Option: info must be true, got ${JSON.stringify(e.info)}`);if(e.max_record_size===void 0||e.max_record_size===null||e.max_record_size===!1)e.max_record_size=0;else if(!(Number.isInteger(e.max_record_size)&&e.max_record_size>=0))if(typeof e.max_record_size=="string"&&/\d+/.test(e.max_record_size))e.max_record_size=parseInt(e.max_record_size);else throw new Error(`Invalid Option: max_record_size must be a positive integer, got ${JSON.stringify(e.max_record_size)}`);if(e.objname===void 0||e.objname===null||e.objname===!1)e.objname=void 0;else if(Buffer.isBuffer(e.objname)){if(e.objname.length===0)throw new Error("Invalid Option: objname must be a non empty buffer");e.encoding===null||(e.objname=e.objname.toString(e.encoding))}else if(typeof e.objname=="string"){if(e.objname.length===0)throw new Error("Invalid Option: objname must be a non empty string")}else if(typeof e.objname!="number")throw new Error(`Invalid Option: objname must be a string or a buffer, got ${e.objname}`);if(e.objname!==void 0){if(typeof e.objname=="number"){if(e.columns!==!1)throw Error("Invalid Option: objname index cannot be combined with columns or be defined as a field")}else if(e.columns===!1)throw Error("Invalid Option: objname field must be combined with columns or be defined as an index")}if(e.on_record===void 0||e.on_record===null)e.on_record=void 0;else if(typeof e.on_record!="function")throw new k("CSV_INVALID_OPTION_ON_RECORD",["Invalid option `on_record`:","expect a function,",`got ${JSON.stringify(e.on_record)}`],e);if(e.on_skip!==void 0&&e.on_skip!==null&&typeof e.on_skip!="function")throw new Error(`Invalid Option: on_skip must be a function, got ${JSON.stringify(e.on_skip)}`);if(e.quote===null||e.quote===!1||e.quote==="")e.quote=null;else if(e.quote===void 0||e.quote===!0?e.quote=Buffer.from('"',e.encoding):typeof e.quote=="string"&&(e.quote=Buffer.from(e.quote,e.encoding)),!Buffer.isBuffer(e.quote))throw new Error(`Invalid Option: quote must be a buffer or a string, got ${JSON.stringify(e.quote)}`);if(e.raw===void 0||e.raw===null||e.raw===!1)e.raw=!1;else if(e.raw!==!0)throw new Error(`Invalid Option: raw must be true, got ${JSON.stringify(e.raw)}`);if(e.record_delimiter===void 0)e.record_delimiter=[];else if(typeof e.record_delimiter=="string"||Buffer.isBuffer(e.record_delimiter)){if(e.record_delimiter.length===0)throw new k("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a non empty string or buffer,",`got ${JSON.stringify(e.record_delimiter)}`],e);e.record_delimiter=[e.record_delimiter]}else if(!Array.isArray(e.record_delimiter))throw new k("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a string, a buffer or array of string|buffer,",`got ${JSON.stringify(e.record_delimiter)}`],e);if(e.record_delimiter=e.record_delimiter.map(function(r,i){if(typeof r!="string"&&!Buffer.isBuffer(r))throw new k("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a string, a buffer or array of string|buffer",`at index ${i},`,`got ${JSON.stringify(r)}`],e);if(r.length===0)throw new k("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a non empty string or buffer",`at index ${i},`,`got ${JSON.stringify(r)}`],e);return typeof r=="string"&&(r=Buffer.from(r,e.encoding)),r}),typeof e.relax_column_count!="boolean")if(e.relax_column_count===void 0||e.relax_column_count===null)e.relax_column_count=!1;else throw new Error(`Invalid Option: relax_column_count must be a boolean, got ${JSON.stringify(e.relax_column_count)}`);if(typeof e.relax_column_count_less!="boolean")if(e.relax_column_count_less===void 0||e.relax_column_count_less===null)e.relax_column_count_less=!1;else throw new Error(`Invalid Option: relax_column_count_less must be a boolean, got ${JSON.stringify(e.relax_column_count_less)}`);if(typeof e.relax_column_count_more!="boolean")if(e.relax_column_count_more===void 0||e.relax_column_count_more===null)e.relax_column_count_more=!1;else throw new Error(`Invalid Option: relax_column_count_more must be a boolean, got ${JSON.stringify(e.relax_column_count_more)}`);if(typeof e.relax_quotes!="boolean")if(e.relax_quotes===void 0||e.relax_quotes===null)e.relax_quotes=!1;else throw new Error(`Invalid Option: relax_quotes must be a boolean, got ${JSON.stringify(e.relax_quotes)}`);if(typeof e.skip_empty_lines!="boolean")if(e.skip_empty_lines===void 0||e.skip_empty_lines===null)e.skip_empty_lines=!1;else throw new Error(`Invalid Option: skip_empty_lines must be a boolean, got ${JSON.stringify(e.skip_empty_lines)}`);if(typeof e.skip_records_with_empty_values!="boolean")if(e.skip_records_with_empty_values===void 0||e.skip_records_with_empty_values===null)e.skip_records_with_empty_values=!1;else throw new Error(`Invalid Option: skip_records_with_empty_values must be a boolean, got ${JSON.stringify(e.skip_records_with_empty_values)}`);if(typeof e.skip_records_with_error!="boolean")if(e.skip_records_with_error===void 0||e.skip_records_with_error===null)e.skip_records_with_error=!1;else throw new Error(`Invalid Option: skip_records_with_error must be a boolean, got ${JSON.stringify(e.skip_records_with_error)}`);if(e.rtrim===void 0||e.rtrim===null||e.rtrim===!1)e.rtrim=!1;else if(e.rtrim!==!0)throw new Error(`Invalid Option: rtrim must be a boolean, got ${JSON.stringify(e.rtrim)}`);if(e.ltrim===void 0||e.ltrim===null||e.ltrim===!1)e.ltrim=!1;else if(e.ltrim!==!0)throw new Error(`Invalid Option: ltrim must be a boolean, got ${JSON.stringify(e.ltrim)}`);if(e.trim===void 0||e.trim===null||e.trim===!1)e.trim=!1;else if(e.trim!==!0)throw new Error(`Invalid Option: trim must be a boolean, got ${JSON.stringify(e.trim)}`);if(e.trim===!0&&t.ltrim!==!1?e.ltrim=!0:e.ltrim!==!0&&(e.ltrim=!1),e.trim===!0&&t.rtrim!==!1?e.rtrim=!0:e.rtrim!==!0&&(e.rtrim=!1),e.to===void 0||e.to===null)e.to=-1;else if(e.to!==-1)if(typeof e.to=="string"&&/\d+/.test(e.to)&&(e.to=parseInt(e.to)),Number.isInteger(e.to)){if(e.to<=0)throw new Error(`Invalid Option: to must be a positive integer greater than 0, got ${JSON.stringify(t.to)}`)}else throw new Error(`Invalid Option: to must be an integer, got ${JSON.stringify(t.to)}`);if(e.to_line===void 0||e.to_line===null)e.to_line=-1;else if(e.to_line!==-1)if(typeof e.to_line=="string"&&/\d+/.test(e.to_line)&&(e.to_line=parseInt(e.to_line)),Number.isInteger(e.to_line)){if(e.to_line<=0)throw new Error(`Invalid Option: to_line must be a positive integer greater than 0, got ${JSON.stringify(t.to_line)}`)}else throw new Error(`Invalid Option: to_line must be an integer, got ${JSON.stringify(t.to_line)}`);return e};var Ta=function(t){return t.every(e=>e==null||e.toString&&e.toString().trim()==="")},ep=13,tp=10,rt={utf8:Buffer.from([239,187,191]),utf16le:Buffer.from([255,254])},ka=function(t={}){let e={bytes:0,comment_lines:0,empty_lines:0,invalid_field_length:0,lines:1,records:0},n=rs(t);return{info:e,original_options:t,options:n,state:Oa(n),__needMoreData:function(r,i,s){if(s)return!1;let{encoding:u,escape:o,quote:a}=this.options,{quoting:l,needMoreDataSize:d,recordDelimiterMaxLength:c}=this.state,h=i-r-1,m=Math.max(d,c===0?Buffer.from(`\r
|
|
194
|
+
`,u).length:c,l?(o===null?0:o.length)+a.length:0,l?a.length+c:0);return h<m},parse:function(r,i,s,u){let{bom:o,comment_no_infix:a,encoding:l,from_line:d,ltrim:c,max_record_size:h,raw:m,relax_quotes:y,rtrim:f,skip_empty_lines:p,to:g,to_line:E}=this.options,{comment:A,escape:C,quote:S,record_delimiter:w}=this.options,{bomSkipped:L,previousBuf:_,rawBuffer:M,escapeIsQuote:se}=this.state,O;if(_===void 0)if(r===void 0){u();return}else O=r;else _!==void 0&&r===void 0?O=_:O=Buffer.concat([_,r]);if(L===!1)if(o===!1)this.state.bomSkipped=!0;else if(O.length<3){if(i===!1){this.state.previousBuf=O;return}}else{for(let K in rt)if(rt[K].compare(O,0,rt[K].length)===0){let ye=rt[K].length;this.state.bufBytesStart+=ye,O=O.slice(ye);let Jt=rs({...this.original_options,encoding:K});for(let U in Jt)this.options[U]=Jt[U];({comment:A,escape:C,quote:S}=this.options);break}this.state.bomSkipped=!0}let $=O.length,v;for(v=0;v<$&&!this.__needMoreData(v,$,i);v++){if(this.state.wasRowDelimiter===!0&&(this.info.lines++,this.state.wasRowDelimiter=!1),E!==-1&&this.info.lines>E){this.state.stop=!0,u();return}this.state.quoting===!1&&w.length===0&&this.__autoDiscoverRecordDelimiter(O,v)&&(w=this.options.record_delimiter);let K=O[v];if(m===!0&&M.append(K),(K===ep||K===tp)&&this.state.wasRowDelimiter===!1&&(this.state.wasRowDelimiter=!0),this.state.escaping===!0)this.state.escaping=!1;else{if(C!==null&&this.state.quoting===!0&&this.__isEscape(O,v,K)&&v+C.length<$)if(se){if(this.__isQuote(O,v+C.length)){this.state.escaping=!0,v+=C.length-1;continue}}else{this.state.escaping=!0,v+=C.length-1;continue}if(this.state.commenting===!1&&this.__isQuote(O,v))if(this.state.quoting===!0){let U=O[v+S.length],Te=f&&this.__isCharTrimable(O,v+S.length),le=A!==null&&this.__compareBytes(A,O,v+S.length,U),ke=this.__isDelimiter(O,v+S.length,U),Yt=w.length===0?this.__autoDiscoverRecordDelimiter(O,v+S.length):this.__isRecordDelimiter(U,O,v+S.length);if(C!==null&&this.__isEscape(O,v,K)&&this.__isQuote(O,v+C.length))v+=C.length-1;else if(!U||ke||Yt||le||Te){this.state.quoting=!1,this.state.wasQuoting=!0,v+=S.length-1;continue}else if(y===!1){let Fs=this.__error(new k("CSV_INVALID_CLOSING_QUOTE",["Invalid Closing Quote:",`got "${String.fromCharCode(U)}"`,`at line ${this.info.lines}`,"instead of delimiter, record delimiter, trimable character","(if activated) or comment"],this.options,this.__infoField()));if(Fs!==void 0)return Fs}else this.state.quoting=!1,this.state.wasQuoting=!0,this.state.field.prepend(S),v+=S.length-1}else if(this.state.field.length!==0){if(y===!1){let U=this.__infoField(),Te=Object.keys(rt).map(ke=>rt[ke].equals(this.state.field.toString())?ke:!1).filter(Boolean)[0],le=this.__error(new k("INVALID_OPENING_QUOTE",["Invalid Opening Quote:",`a quote is found on field ${JSON.stringify(U.column)} at line ${U.lines}, value is ${JSON.stringify(this.state.field.toString(l))}`,Te?`(${Te} bom)`:void 0],this.options,U,{field:this.state.field}));if(le!==void 0)return le}}else{this.state.quoting=!0,v+=S.length-1;continue}if(this.state.quoting===!1){let U=this.__isRecordDelimiter(K,O,v);if(U!==0){if(this.state.commenting&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0)this.info.comment_lines++;else{if(this.state.enabled===!1&&this.info.lines+(this.state.wasRowDelimiter===!0?1:0)>=d){this.state.enabled=!0,this.__resetField(),this.__resetRecord(),v+=U-1;continue}if(p===!0&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0){this.info.empty_lines++,v+=U-1;continue}this.info.bytes=this.state.bufBytesStart+v;let ke=this.__onField();if(ke!==void 0)return ke;this.info.bytes=this.state.bufBytesStart+v+U;let Yt=this.__onRecord(s);if(Yt!==void 0)return Yt;if(g!==-1&&this.info.records>=g){this.state.stop=!0,u();return}}this.state.commenting=!1,v+=U-1;continue}if(this.state.commenting)continue;if(A!==null&&(a===!1||this.state.record.length===0&&this.state.field.length===0)&&this.__compareBytes(A,O,v,K)!==0){this.state.commenting=!0;continue}let Te=this.__isDelimiter(O,v,K);if(Te!==0){this.info.bytes=this.state.bufBytesStart+v;let le=this.__onField();if(le!==void 0)return le;v+=Te-1;continue}}}if(this.state.commenting===!1&&h!==0&&this.state.record_length+this.state.field.length>h)return this.__error(new k("CSV_MAX_RECORD_SIZE",["Max Record Size:","record exceed the maximum number of tolerated bytes",`of ${h}`,`at line ${this.info.lines}`],this.options,this.__infoField()));let ye=c===!1||this.state.quoting===!0||this.state.field.length!==0||!this.__isCharTrimable(O,v),Jt=f===!1||this.state.wasQuoting===!1;if(ye===!0&&Jt===!0)this.state.field.append(K);else{if(f===!0&&!this.__isCharTrimable(O,v))return this.__error(new k("CSV_NON_TRIMABLE_CHAR_AFTER_CLOSING_QUOTE",["Invalid Closing Quote:","found non trimable byte after quote",`at line ${this.info.lines}`],this.options,this.__infoField()));ye===!1&&(v+=this.__isCharTrimable(O,v)-1);continue}}if(i===!0)if(this.state.quoting===!0){let K=this.__error(new k("CSV_QUOTE_NOT_CLOSED",["Quote Not Closed:",`the parsing is finished with an opening quote at line ${this.info.lines}`],this.options,this.__infoField()));if(K!==void 0)return K}else if(this.state.wasQuoting===!0||this.state.record.length!==0||this.state.field.length!==0){this.info.bytes=this.state.bufBytesStart+v;let K=this.__onField();if(K!==void 0)return K;let ye=this.__onRecord(s);if(ye!==void 0)return ye}else this.state.wasRowDelimiter===!0?this.info.empty_lines++:this.state.commenting===!0&&this.info.comment_lines++;else this.state.bufBytesStart+=v,this.state.previousBuf=O.slice(v);this.state.wasRowDelimiter===!0&&(this.info.lines++,this.state.wasRowDelimiter=!1)},__onRecord:function(r){let{columns:i,group_columns_by_name:s,encoding:u,info:o,from:a,relax_column_count:l,relax_column_count_less:d,relax_column_count_more:c,raw:h,skip_records_with_empty_values:m}=this.options,{enabled:y,record:f}=this.state;if(y===!1)return this.__resetRecord();let p=f.length;if(i===!0){if(m===!0&&Ta(f)){this.__resetRecord();return}return this.__firstLineToColumns(f)}if(i===!1&&this.info.records===0&&(this.state.expectedRecordLength=p),p!==this.state.expectedRecordLength){let g=i===!1?new k("CSV_RECORD_INCONSISTENT_FIELDS_LENGTH",["Invalid Record Length:",`expect ${this.state.expectedRecordLength},`,`got ${p} on line ${this.info.lines}`],this.options,this.__infoField(),{record:f}):new k("CSV_RECORD_INCONSISTENT_COLUMNS",["Invalid Record Length:",`columns length is ${i.length},`,`got ${p} on line ${this.info.lines}`],this.options,this.__infoField(),{record:f});if(l===!0||d===!0&&p<this.state.expectedRecordLength||c===!0&&p>this.state.expectedRecordLength)this.info.invalid_field_length++,this.state.error=g;else{let E=this.__error(g);if(E)return E}}if(m===!0&&Ta(f)){this.__resetRecord();return}if(this.state.recordHasError===!0){this.__resetRecord(),this.state.recordHasError=!1;return}if(this.info.records++,a===1||this.info.records>=a){let{objname:g}=this.options;if(i!==!1){let E={};for(let A=0,C=f.length;A<C;A++)i[A]===void 0||i[A].disabled||(s===!0&&E[i[A].name]!==void 0?Array.isArray(E[i[A].name])?E[i[A].name]=E[i[A].name].concat(f[A]):E[i[A].name]=[E[i[A].name],f[A]]:E[i[A].name]=f[A]);if(h===!0||o===!0){let A=Object.assign({record:E},h===!0?{raw:this.state.rawBuffer.toString(u)}:{},o===!0?{info:this.__infoRecord()}:{}),C=this.__push(g===void 0?A:[E[g],A],r);if(C)return C}else{let A=this.__push(g===void 0?E:[E[g],E],r);if(A)return A}}else if(h===!0||o===!0){let E=Object.assign({record:f},h===!0?{raw:this.state.rawBuffer.toString(u)}:{},o===!0?{info:this.__infoRecord()}:{}),A=this.__push(g===void 0?E:[f[g],E],r);if(A)return A}else{let E=this.__push(g===void 0?f:[f[g],f],r);if(E)return E}}this.__resetRecord()},__firstLineToColumns:function(r){let{firstLineToHeaders:i}=this.state;try{let s=i===void 0?r:i.call(null,r);if(!Array.isArray(s))return this.__error(new k("CSV_INVALID_COLUMN_MAPPING",["Invalid Column Mapping:","expect an array from column function,",`got ${JSON.stringify(s)}`],this.options,this.__infoField(),{headers:s}));let u=rr(s);this.state.expectedRecordLength=u.length,this.options.columns=u,this.__resetRecord();return}catch(s){return s}},__resetRecord:function(){this.options.raw===!0&&this.state.rawBuffer.reset(),this.state.error=void 0,this.state.record=[],this.state.record_length=0},__onField:function(){let{cast:r,encoding:i,rtrim:s,max_record_size:u}=this.options,{enabled:o,wasQuoting:a}=this.state;if(o===!1)return this.__resetField();let l=this.state.field.toString(i);if(s===!0&&a===!1&&(l=l.trimRight()),r===!0){let[d,c]=this.__cast(l);if(d!==void 0)return d;l=c}this.state.record.push(l),u!==0&&typeof l=="string"&&(this.state.record_length+=l.length),this.__resetField()},__resetField:function(){this.state.field.reset(),this.state.wasQuoting=!1},__push:function(r,i){let{on_record:s}=this.options;if(s!==void 0){let u=this.__infoRecord();try{r=s.call(null,r,u)}catch(o){return o}if(r==null)return}i(r)},__cast:function(r){let{columns:i,relax_column_count:s}=this.options;if(Array.isArray(i)===!0&&s&&this.options.columns.length<=this.state.record.length)return[void 0,void 0];if(this.state.castField!==null)try{let o=this.__infoField();return[void 0,this.state.castField.call(null,r,o)]}catch(o){return[o]}if(this.__isFloat(r))return[void 0,parseFloat(r)];if(this.options.cast_date!==!1){let o=this.__infoField();return[void 0,this.options.cast_date.call(null,r,o)]}return[void 0,r]},__isCharTrimable:function(r,i){return((u,o)=>{let{timchars:a}=this.state;e:for(let l=0;l<a.length;l++){let d=a[l];for(let c=0;c<d.length;c++)if(d[c]!==u[o+c])continue e;return d.length}return 0})(r,i)},__isFloat:function(r){return r-parseFloat(r)+1>=0},__compareBytes:function(r,i,s,u){if(r[0]!==u)return 0;let o=r.length;for(let a=1;a<o;a++)if(r[a]!==i[s+a])return 0;return o},__isDelimiter:function(r,i,s){let{delimiter:u,ignore_last_delimiters:o}=this.options;if(o===!0&&this.state.record.length===this.options.columns.length-1)return 0;if(o!==!1&&typeof o=="number"&&this.state.record.length===o-1)return 0;e:for(let a=0;a<u.length;a++){let l=u[a];if(l[0]===s){for(let d=1;d<l.length;d++)if(l[d]!==r[i+d])continue e;return l.length}}return 0},__isRecordDelimiter:function(r,i,s){let{record_delimiter:u}=this.options,o=u.length;e:for(let a=0;a<o;a++){let l=u[a],d=l.length;if(l[0]===r){for(let c=1;c<d;c++)if(l[c]!==i[s+c])continue e;return l.length}}return 0},__isEscape:function(r,i,s){let{escape:u}=this.options;if(u===null)return!1;let o=u.length;if(u[0]===s){for(let a=0;a<o;a++)if(u[a]!==r[i+a])return!1;return!0}return!1},__isQuote:function(r,i){let{quote:s}=this.options;if(s===null)return!1;let u=s.length;for(let o=0;o<u;o++)if(s[o]!==r[i+o])return!1;return!0},__autoDiscoverRecordDelimiter:function(r,i){let{encoding:s}=this.options,u=[Buffer.from(`\r
|
|
195
|
+
`,s),Buffer.from(`
|
|
196
|
+
`,s),Buffer.from("\r",s)];e:for(let o=0;o<u.length;o++){let a=u[o].length;for(let l=0;l<a;l++)if(u[o][l]!==r[i+l])continue e;return this.options.record_delimiter.push(u[o]),this.state.recordDelimiterMaxLength=u[o].length,u[o].length}return 0},__error:function(r){let{encoding:i,raw:s,skip_records_with_error:u}=this.options,o=typeof r=="string"?new Error(r):r;if(u){if(this.state.recordHasError=!0,this.options.on_skip!==void 0)try{this.options.on_skip(o,s?this.state.rawBuffer.toString(i):void 0)}catch(a){return a}return}else return o},__infoDataSet:function(){return{...this.info,columns:this.options.columns}},__infoRecord:function(){let{columns:r,raw:i,encoding:s}=this.options;return{...this.__infoDataSet(),error:this.state.error,header:r===!0,index:this.state.record.length,raw:i?this.state.rawBuffer.toString(s):void 0}},__infoField:function(){let{columns:r}=this.options,i=Array.isArray(r);return{...this.__infoRecord(),column:i===!0?r.length>this.state.record.length?r[this.state.record.length].name:null:this.state.record.length,quoting:this.state.wasQuoting}}}};var xa=function(t,e={}){typeof t=="string"&&(t=Buffer.from(t));let n=e&&e.objname?{}:[],r=ka(e),i=o=>{r.options.objname===void 0?n.push(o):n[o[0]]=o[1]},s=()=>{},u=r.parse(t,!0,i,s);if(u!==void 0)throw u;return n};async function is(t){let e=await np(t,"utf-8");return xa(e,{columns:!0,skip_empty_lines:!0,trim:!0})}import{readFile as rp}from"fs/promises";async function ss(t){return rp(t,"utf-8")}import{createReadStream as Va,readFileSync as ap}from"fs";import{createGunzip as lp}from"zlib";import{gunzipSync as cp}from"zlib";import{createInterface as fp}from"readline";import{PassThrough as hp}from"stream";import dp from"path";var ty={json:!0,binary:!0,vector:!0,array:!0,custom:!0},us={RAW:".dt",COMPRESSED:".dtz",ENCRYPTED:".dtzx"};import{createCipheriv as ip,createDecipheriv as sp,randomBytes as La,pbkdf2Sync as qa}from"crypto";var Pa="aes-256-gcm",up=16,op=32,Ra=16,$a=32,Ma=1e5,ja="sha256";function iy(t,e){let n=La(op),r=La(up),i=qa(e,n,Ma,$a,ja),s=ip(Pa,i,r,{authTagLength:Ra}),u=Buffer.concat([s.update(t),s.final()]),o=s.getAuthTag();return{salt:n.toString("base64"),iv:r.toString("base64"),authTag:o.toString("base64"),ciphertext:u.toString("base64")}}function Ka(t,e){let n=Buffer.from(t.salt,"base64"),r=Buffer.from(t.iv,"base64"),i=Buffer.from(t.authTag,"base64"),s=Buffer.from(t.ciphertext,"base64"),u=qa(e,n,Ma,$a,ja),o=sp(Pa,u,r,{authTagLength:Ra});return o.setAuthTag(i),Buffer.concat([o.update(s),o.final()])}var ir=class{#e;#r;#i;#t=null;#s=null;#n=null;constructor(e){this.#e=e.filepath,this.#r=e.passphrase,this.#i=dp.extname(e.filepath).toLowerCase()}get schema(){return this.#t}async open(){let e=this.#u();this.#n=e;let r=fp({input:e,crlfDelay:1/0})[Symbol.asyncIterator](),i=await r.next();if(i.done||!i.value)throw new Error("Empty .dt file \u2014 no schema line");if(this.#t=lt.parse(i.value),this.#t.v!==1)throw new Error(`Unsupported .dt format version: ${this.#t.v}`);this.#s=this.#o(r)}async*rows(){if(!this.#s)throw new Error("Reader not opened \u2014 call open() first");yield*this.#s}close(){this.#n&&(this.#n.destroy(),this.#n=null)}#u(){if(this.#i===us.ENCRYPTED){if(!this.#r)throw new Error("Passphrase required for .dtzx files");let e=ap(this.#e,"utf8"),n=JSON.parse(e),r=Ka(n,this.#r),i=cp(r),s=new hp;return s.end(i),s}if(this.#i===us.COMPRESSED){let e=Va(this.#e),n=lp();return e.pipe(n),n}return Va(this.#e,{encoding:"utf8"})}async*#o(e){for await(let n of{[Symbol.asyncIterator]:()=>e}){let r=n.trim();r.length!==0&&(yield lt.parse(r))}}};async function sr(t){let e=new ir({filepath:t});await e.open();let n=e.schema;if(!n)throw new Error(`Failed to read .dt schema from: ${t}`);let r=n.columns.map(s=>s.name),i=[];for await(let s of e.rows()){let u={};for(let o=0;o<r.length;o++)u[r[o]]=s[o]??null;i.push(u)}return e.close(),i}var Ua={".json":sn,".json5":sn,".yaml":nr,".yml":nr,".csv":is,".js":Le,".mjs":Le,".ts":Le,".sql":ss,".dt":sr,".dtz":sr};function Ja(t){return t in Ua}function mp(t){return Ua[t]}async function os(t){let e=pp.extname(t).toLowerCase(),n=mp(e);if(!n)throw new Error(`No loader registered for extension: ${e}`);return n(t)}function ls(){return ls=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},ls.apply(this,arguments)}function gp(t,e){return Ep(t)||bp(t,e)||Sp()}function Dp(t){return yp(t)||Ap(t)||Cp()}function yp(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}function Ep(t){if(Array.isArray(t))return t}function Ap(t){if(Symbol.iterator in Object(t)||Object.prototype.toString.call(t)==="[object Arguments]")return Array.from(t)}function bp(t,e){if(Symbol.iterator in Object(t)||Object.prototype.toString.call(t)==="[object Arguments]"){var n=[],r=!0,i=!1,s=void 0;try{for(var u=t[Symbol.iterator](),o;!(r=(o=u.next()).done)&&(n.push(o.value),!(e&&n.length===e));r=!0);}catch(a){i=!0,s=a}finally{try{!r&&u.return!=null&&u.return()}finally{if(i)throw s}}return n}}function Cp(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function Sp(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function q(t){return t==null}function Xa(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return q(t)?e:!!t}function Vt(t){return typeof t=="string"}function b(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return q(t)?e:Vt(t)?t:String(t)}function ds(t,e){var n=b(t),r=Xa(e);return n===""?"":(r&&(n=n.toLowerCase()),n.substr(0,1).toUpperCase()+n.substr(1))}function cr(t){var e=b(t,"");return e.toLowerCase()}var ps="\\d",fr="\\s\\uFEFF\\xA0",Oe="\\uD800-\\uDBFF",Ie="\\uDC00-\\uDFFF",Je="\\u0300-\\u036F\\u1AB0-\\u1AFF\\u1DC0-\\u1DFF\\u20D0-\\u20FF\\uFE20-\\uFE2F",Za="\\0-\\u02FF\\u0370-\\u1AAF\\u1B00-\\u1DBF\\u1E00-\\u20CF\\u2100-\\uD7FF\\uE000-\\uFE1F\\uFE30-\\uFFFF",ms=new RegExp("(["+Za+"]|["+Oe+"]["+Ie+"]|["+Oe+"](?!["+Ie+"])|(?:[^"+Oe+"]|^)["+Ie+"])(["+Je+"]+)","g"),el=new RegExp("(["+Oe+"])(["+Ie+"])","g"),cs=new RegExp("((?:["+Za+"]|["+Oe+"]["+Ie+"]|["+Oe+"](?!["+Ie+"])|(?:[^"+Oe+"]|^)["+Ie+"])(?:["+Je+"]+))|(["+Oe+"]["+Ie+"])|([\\n\\r\\u2028\\u2029])|(.)","g"),Fp=new RegExp("["+fr+"]"),_p=new RegExp("^["+fr+"]+"),wp=new RegExp("["+fr+"]+$"),vp=new RegExp("^"+ps+"+$"),Bp=/[-[\]{}()*+!<=:?./\\^$|#,]/g,tl=/[^A-Za-z0-9]/g,Np=/[<>&"'`]/g,Op=/(%{1,2})(?:(\d+)\$)?(\+)?([ 0]|'.{1})?(-)?(\d+)?(?:\.(\d+))?([bcdiouxXeEfgGs])?/g,Ip=/\.?0+$/g,Tp=/<([A-Za-z0-9]+)>/g,kp="\\u2000-\\u206F",xp="\\x00-\\x2F\\x3A-\\x40\\x5B-\\x60\\x7b-\\xBF\\xD7\\xF7",Lp="\\u2700-\\u27BF",or="a-z\\xB5\\xDF-\\xF6\\xF8-\\xFF\\u0101\\u0103\\u0105\\u0107\\u0109\\u010B\\u010D\\u010F\\u0111\\u0113\\u0115\\u0117\\u0119\\u011B\\u011D\\u011F\\u0121\\u0123\\u0125\\u0127\\u0129\\u012B\\u012D\\u012F\\u0131\\u0133\\u0135\\u0137\\u0138\\u013A\\u013C\\u013E\\u0140\\u0142\\u0144\\u0146\\u0148\\u0149\\u014B\\u014D\\u014F\\u0151\\u0153\\u0155\\u0157\\u0159\\u015B\\u015D\\u015F\\u0161\\u0163\\u0165\\u0167\\u0169\\u016B\\u016D\\u016F\\u0171\\u0173\\u0175\\u0177\\u017A\\u017C\\u017E-\\u0180\\u0183\\u0185\\u0188\\u018C\\u018D\\u0192\\u0195\\u0199-\\u019B\\u019E\\u01A1\\u01A3\\u01A5\\u01A8\\u01AA\\u01AB\\u01AD\\u01B0\\u01B4\\u01B6\\u01B9\\u01BA\\u01BD-\\u01BF\\u01C6\\u01C9\\u01CC\\u01CE\\u01D0\\u01D2\\u01D4\\u01D6\\u01D8\\u01DA\\u01DC\\u01DD\\u01DF\\u01E1\\u01E3\\u01E5\\u01E7\\u01E9\\u01EB\\u01ED\\u01EF\\u01F0\\u01F3\\u01F5\\u01F9\\u01FB\\u01FD\\u01FF\\u0201\\u0203\\u0205\\u0207\\u0209\\u020B\\u020D\\u020F\\u0211\\u0213\\u0215\\u0217\\u0219\\u021B\\u021D\\u021F\\u0221\\u0223\\u0225\\u0227\\u0229\\u022B\\u022D\\u022F\\u0231\\u0233-\\u0239\\u023C\\u023F\\u0240\\u0242\\u0247\\u0249\\u024B\\u024D\\u024F",ar="\\x41-\\x5a\\xc0-\\xd6\\xd8-\\xde\\u0100\\u0102\\u0104\\u0106\\u0108\\u010a\\u010c\\u010e\\u0110\\u0112\\u0114\\u0116\\u0118\\u011a\\u011c\\u011e\\u0120\\u0122\\u0124\\u0126\\u0128\\u012a\\u012c\\u012e\\u0130\\u0132\\u0134\\u0136\\u0139\\u013b\\u013d\\u013f\\u0141\\u0143\\u0145\\u0147\\u014a\\u014c\\u014e\\u0150\\u0152\\u0154\\u0156\\u0158\\u015a\\u015c\\u015e\\u0160\\u0162\\u0164\\u0166\\u0168\\u016a\\u016c\\u016e\\u0170\\u0172\\u0174\\u0176\\u0178\\u0179\\u017b\\u017d\\u0181\\u0182\\u0184\\u0186\\u0187\\u0189-\\u018b\\u018e-\\u0191\\u0193\\u0194\\u0196-\\u0198\\u019c\\u019d\\u019f\\u01a0\\u01a2\\u01a4\\u01a6\\u01a7\\u01a9\\u01ac\\u01ae\\u01af\\u01b1-\\u01b3\\u01b5\\u01b7\\u01b8\\u01bc\\u01c4\\u01c5\\u01c7\\u01c8\\u01ca\\u01cb\\u01cd\\u01cf\\u01d1\\u01d3\\u01d5\\u01d7\\u01d9\\u01db\\u01de\\u01e0\\u01e2\\u01e4\\u01e6\\u01e8\\u01ea\\u01ec\\u01ee\\u01f1\\u01f2\\u01f4\\u01f6-\\u01f8\\u01fa\\u01fc\\u01fe\\u0200\\u0202\\u0204\\u0206\\u0208\\u020a\\u020c\\u020e\\u0210\\u0212\\u0214\\u0216\\u0218\\u021a\\u021c\\u021e\\u0220\\u0222\\u0224\\u0226\\u0228\\u022a\\u022c\\u022e\\u0230\\u0232\\u023a\\u023b\\u023d\\u023e\\u0241\\u0243-\\u0246\\u0248\\u024a\\u024c\\u024e",gs=new RegExp("(?:["+ar+"]["+Je+"]*)?(?:["+or+"]["+Je+"]*)+|(?:["+ar+"]["+Je+"]*)+(?!["+or+"])|["+ps+"]+|["+Lp+"]|[^"+xp+kp+fr+"]+","g"),Ds=/[A-Z\xC0-\xD6\xD8-\xDE]?[a-z\xDF-\xF6\xF8-\xFF]+|[A-Z\xC0-\xD6\xD8-\xDE]+(?![a-z\xDF-\xF6\xF8-\xFF])|\d+/g,qp=new RegExp("^(?:["+or+ar+"]["+Je+"]*)+$"),Pp=new RegExp("^((?:["+or+ar+"]["+Je+"]*)|["+ps+"])+$"),ys=/^[\x01-\xFF]*$/;function st(t,e){return t??e}function ge(t){return q(t)?null:Vt(t)?t:String(t)}function Ut(t,e,n){var r=b(t),i;if(q(e))i=ys.test(r)?Ds:gs;else if(e instanceof RegExp)i=e;else{var s=ge(st(n,""));i=new RegExp(ge(e),s)}return st(r.match(i),[])}function Rp(t,e){return e===0?cr(t):ds(t,!0)}function $p(t){var e=b(t);return e===""?"":Ut(e).map(Rp).join("")}function Mp(t){var e=b(t);return e===""?"":e.substr(0,1).toLowerCase()+e.substr(1)}function nl(t){var e=b(t);return e===""?"":Ut(e).map(cr).join("-")}function jp(t){var e=b(t);return e===""?"":Ut(e).map(cr).join("_")}function Kp(t){var e=b(t);return e.toUpperCase()}function Vp(t){var e=b(t);return e.split("").reduce(Up,"")}function Up(t,e){var n=e.toLowerCase(),r=e.toUpperCase();return t+(e===n?r:n)}function Jp(t,e){var n=b(t),r=Array.isArray(e)?e:[],i=ys.test(n)?Ds:gs;return n.replace(i,function(s,u){var o=u>0&&r.indexOf(n[u-1])>=0;return o?s.toLowerCase():ds(s,!0)})}function te(t,e,n){return t<=e?e:t>=n?n:t}var ae=9007199254740991;function Q(t){return t===1/0?ae:t===-1/0?-ae:~~t}function rl(t,e,n){var r=b(t),i=q(e)?r.length:te(Q(e),0,ae),s=b(n,"...");return i>=r.length?r:r.substr(0,e-s.length)+s}function Yp(t,e){var n=b(t);return n.charAt(e)}var il=55296,Gp=56319,sl=56320,Hp=57343;function Wp(t){return t>=il&&t<=Gp}function zp(t){return t>=sl&&t<=Hp}function Qp(t,e){return(t-il)*1024+e-sl+65536}function De(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return q(t)?e:typeof t=="number"?t:Number(t)}function ul(t,e){return t!==t?e:t}function ol(t,e){var n=b(t),r=n.length,i=De(e);if(i=ul(i,0),!(i<0||i>=r)){var s=n.charCodeAt(i),u;return Wp(s)&&r>i+1&&(u=n.charCodeAt(i+1),zp(u))?Qp(s,u):s}}function Xp(t,e){var n=b(t),r=q(e)?1:te(Q(e),0,ae);return n.length<=r?n:n.substr(0,r)}function Zp(t,e){var n=b(t),r=De(e),i,s=0;for(r=ul(r,0);(i=cs.exec(n))!==null;){if(s===r)return cs.lastIndex=0,i[0];s++}return""}function em(t,e){var n=b(t),r=q(e)?1:te(Q(e),0,ae);return n.length<=r?n:n.substr(n.length-r,r)}function tm(t,e,n){var r=b(t),i=q(e)?r.length:te(Q(e),0,ae),s=b(n,"...");if(i>=r.length)return r;var u=ys.test(r)?Ds:gs,o=0;return r.replace(u,function(a,l){var d=l+a.length;d<=i-s.length&&(o=d)}),r.substr(0,o)+s}function nm(t,e,n){return b(t).slice(e,n)}function rm(t,e,n){return b(t).substr(e,n)}function im(t,e,n){return b(t).substring(e,n)}function sm(t){return b(t).length}function um(t){return b(t).replace(ms,"*").replace(el,"*").length}function om(t,e){var n=b(t),r=b(e),i=r.length,s=0,u=0;if(n===""||r==="")return s;do u=n.indexOf(r,u),u!==-1&&(s++,u+=i);while(u!==-1);return s}var am=Array.prototype.reduce;function lm(t,e,n){var r=b(t);if(r===""||typeof e!="function")return 0;var i=e.bind(n);return am.call(r,function(s,u,o){return i(u,o,r)?s+1:s},0)}function cm(t,e,n){return Ut(t,e,n).length}function hr(){this.index=0}hr.prototype.increment=function(){this.index++};hr.prototype.incrementOnEmptyPosition=function(t){q(t)&&this.increment()};hr.prototype.getIndexByPosition=function(t){return q(t)?this.index:t-1};var fm="i",al="b",ll="c",hm="d",cl="o",dm="u",fl="x",hl="X",dl="e",pl="E",ml="f",gl="g",Es="G",pm="s",mm="'",Ya="+",gm="-",Dm="%%",ym=2,Em=8,Ga=16;function Dl(t,e){for(var n=b(t),r=q(e)?1:te(Q(e),0,ae),i="";r;)r&1&&(i+=n),r>1&&(n+=n),r>>=1;return i}function lr(t,e){var n=Q(e/t.length),r=e%t.length;return Dl(t,n+r).substr(0,e)}function yl(t,e,n){var r=b(t),i=q(e)?0:te(Q(e),0,ae),s=b(n," ");return i<=r.length?r:lr(s,i-r.length)+r}function El(t,e,n){var r=b(t),i=q(e)?0:te(Q(e),0,ae),s=b(n," ");return i<=r.length?r:r+lr(s,i-r.length)}function Am(t,e){var n=e.width;if(q(n)||t.length>=n)return t;var r=e.alignmentSpecifier===gm?El:yl;return r(t,n,e.getPaddingCharacter())}function Al(t,e,n){return n.signSpecifier===Ya&&t>=0&&(e=Ya+e),e}function bm(t,e){var n=parseFloat(t),r;isNaN(n)&&(n=0);var i=De(e.precision,6);switch(e.typeSpecifier){case ml:r=n.toFixed(i);break;case dl:r=n.toExponential(i);break;case pl:r=n.toExponential(i).toUpperCase();break;case gl:case Es:r=Cm(n,i,e);break}return r=Al(n,r,e),b(r)}function Cm(t,e,n){if(t===0)return"0";var r=e===0?1:e,i=t.toPrecision(r).replace(Ip,"");return n.typeSpecifier===Es&&(i=i.toUpperCase()),i}function Sm(t,e){var n=parseInt(t);switch(isNaN(n)&&(n=0),n=n>>>0,e.typeSpecifier){case ll:n=String.fromCharCode(n);break;case al:n=n.toString(ym);break;case cl:n=n.toString(Em);break;case fl:n=n.toString(Ga);break;case hl:n=n.toString(Ga).toUpperCase();break}return b(n)}function Fm(t,e){var n=parseInt(t);return isNaN(n)&&(n=0),Al(n,ge(n),e)}function _m(t,e){var n=t,r=e.precision;return!q(r)&&n.length>r&&(n=rl(n,r,"")),n}function wm(t,e){var n;switch(e.typeSpecifier){case pm:n=_m;break;case hm:case fm:n=Fm;break;case ll:case al:case cl:case fl:case hl:case dm:n=Sm;break;case ml:case dl:case pl:case gl:case Es:n=bm;break}var r=n(t,e);return Am(r,e)}function As(t){this.percent=t.percent,this.signSpecifier=t.signSpecifier,this.paddingSpecifier=t.paddingSpecifier,this.alignmentSpecifier=t.alignmentSpecifier,this.width=t.width,this.precision=t.precision,this.typeSpecifier=t.typeSpecifier}As.prototype.isPercentLiteral=function(){return Dm===this.percent};As.prototype.getPaddingCharacter=function(){var t=st(this.paddingSpecifier," ");return t.length===2&&t[0]===mm&&(t=t[1]),t};function vm(t,e,n){if(q(n.typeSpecifier))throw new Error("sprintf(): Unknown type specifier");if(t>e-1)throw new Error("sprintf(): Too few arguments");if(t<0)throw new Error("sprintf(): Argument number must be greater than zero")}function Bm(t,e,n,r,i,s,u,o,a,l,d){var c=new As({percent:r,signSpecifier:s,paddingSpecifier:u,alignmentSpecifier:o,width:De(a,null),precision:De(l,null),typeSpecifier:d});if(c.isPercentLiteral())return n.slice(1);var h=t.getIndexByPosition(i);return t.incrementOnEmptyPosition(i),vm(h,e.length,c),wm(e[h],c)}function bl(t){var e=b(t);if(e==="")return e;for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var s=Bm.bind(void 0,new hr,r);return e.replace(Op,s)}function Nm(t,e){return bl.apply(void 0,[t].concat(Dp(st(e,[]))))}var Om={"<":"<",">":">","&":"&",'"':""","'":"'","`":"`"};function Im(t){return Om[t]}function Tm(t){return b(t).replace(Np,Im)}function km(t){return b(t).replace(Bp,"\\$&")}var Cl={"<":/(<)|(�*3c;)|(�*60;)/gi,">":/(>)|(�*3e;)|(�*62;)/gi,"&":/(&)|(�*26;)|(�*38;)/gi,'"':/(")|(�*22;)|(�*34;)/gi,"'":/(�*27;)|(�*39;)/gi,"`":/(�*60;)|(�*96;)/gi},xm=Object.keys(Cl);function Lm(t,e){return t.replace(Cl[e],e)}function qm(t){var e=b(t);return xm.reduce(Lm,e)}function Pm(t,e,n){var r=b(t);return r.indexOf(e,n)}function Rm(t,e,n){var r=b(t);return r.lastIndexOf(e,n)}function $m(t,e,n){var r=b(t),i=q(n)?0:te(Q(n),0,r.length),s=r.substr(i).search(e);return s!==-1&&!isNaN(i)&&(s+=i),s}function Mm(t,e,n){var r=b(t),i=b(e),s=De(n);return s<0||s>r.length||i===""?r:r.slice(0,s)+i+r.slice(s)}var Ha={3:"\u039E\u03BE",8:"\u0398\u03B8",A:"A\xC0\xC1\xC2\xC3\xC4\xC5\u0100\u0102\u0104\u01CD\u01DE\u01E0\u01FA\u0200\u0202\u0226\u023A\u0386\u0391\u0410",B:"B\u0181\u0182\u0243\u0392\u0411",C:"C\xC7\u0106\u0108\u010A\u010C\u0187\u023B\u0426",D:"D\u010E\u0110\u0189\u018A\u018B\xD0\u0394\u0414",E:"E\xC8\xC9\xCA\xCB\u0112\u0114\u0116\u0118\u011A\u018E\u0190\u0204\u0206\u0228\u0388\u0395\u0415\u042D",F:"F\u0191\u03A6\u0424",G:"G\u011C\u011E\u0120\u0122\u0193\u01E4\u01E6\u01F4\u0393\u0413\u0490",H:"H\u0124\u0126\u021E\u0389\u0397\u0425",I:"I\xCC\xCD\xCE\xCF\u0128\u012A\u012C\u012E\u0130\u0197\u01CF\u0208\u020A\u038A\u0399\u03AA\u0406\u0418",J:"J\u0134\u0248\u0419",K:"K\u0136\u0198\u01E8\u039A\u041A",L:"L\u0139\u013B\u013D\u013F\u0141\u023D\u039B\u041B",M:"M\u019C\u039C\u041C",N:"N\xD1\u0143\u0145\u0147\u019D\u01F8\u0220\u039D\u041D",O:"O\xD2\xD3\xD4\xD5\xD6\xD8\u014C\u014E\u0150\u0186\u019F\u01A0\u01D1\u01EA\u01EC\u01FE\u020C\u020E\u022A\u022C\u022E\u0230\u038C\u039F\u041E",P:"P\u01A4\u03A0\u041F",Q:"Q\u024A",R:"R\u0154\u0156\u0158\u0210\u0212\u024C\u03A1\u0420",S:"S\u015A\u015C\u015E\u0160\u0218\u03A3\u0421",T:"T\u0162\u0164\u0166\u01AC\u01AE\u021A\u023E\u03A4\u0422",U:"U\xD9\xDA\xDB\xDC\u0168\u016A\u016C\u016E\u0170\u0172\u01AF\u01D3\u01D5\u01D7\u01D9\u01DB\u0214\u0216\u0244\u0423\u042A",V:"V\u01B2\u0245\u0412",W:"W\u0174\u038F\u03A9",X:"X\u03A7",Y:"Y\xDD\u0176\u0178\u01B3\u0232\u024E\u038E\u03A5\u03AB\u042B",Z:"Z\u0179\u017B\u017D\u01B5\u0224\u0396\u0417",a:"a\xE0\xE1\xE2\xE3\xE4\xE5\u0101\u0103\u0105\u01CE\u01DF\u01E1\u01FB\u0201\u0203\u0227\u0250\u03AC\u03B1\u0430",b:"b\u0180\u0183\u0253\u03B2\u0431",c:"c\xE7\u0107\u0109\u010B\u010D\u0188\u023C\u0446",d:"d\u010F\u0111\u018C\u0256\u0257\xF0\u03B4\u0434",e:"e\xE8\xE9\xEA\xEB\u0113\u0115\u0117\u0119\u011B\u01DD\u0205\u0207\u0229\u0247\u025B\u03AD\u03B5\u0435\u044D",f:"f\u0192\u03C6\u0444",g:"g\u011D\u011F\u0121\u0123\u01E5\u01E7\u01F5\u0260\u03B3\u0433\u0491",h:"h\u0125\u0127\u021F\u0265\u03AE\u03B7\u0445",i:"i\xEC\xED\xEE\xEF\u0129\u012B\u012D\u012F\u0131\u01D0\u0209\u020B\u0268\u0390\u03AF\u03B9\u03CA\u0438\u0456",j:"j\u0135\u01F0\u0249\u0439",k:"k\u0137\u0199\u01E9\u03BA\u043A",l:"l\u013A\u013C\u013E\u0140\u0142\u017F\u019A\u026B\u03BB\u043B",m:"m\u026F\u0271\u03BC\u043C",n:"n\xF1\u0144\u0146\u0148\u0149\u019E\u01F9\u0272\u03BD\u043D",o:"o\xF2\xF3\xF4\xF5\xF6\xF8\u014D\u014F\u0151\u01A1\u01D2\u01EB\u01ED\u01FF\u020D\u020F\u022B\u022D\u022F\u0231\u0254\u0275\u03BF\u03CC\u043E",p:"p\u01A5\u03C0\u043F",q:"q\u024B",r:"r\u0155\u0157\u0159\u0211\u0213\u024D\u027D\u03C1\u0440",s:"s\xDF\u015B\u015D\u015F\u0161\u0219\u023F\u03C2\u03C3\u0441",t:"t\u0163\u0165\u0167\u01AD\u021B\u0288\u03C4\u0442",u:"u\xF9\xFA\xFB\xFC\u0169\u016B\u016D\u016F\u0171\u0173\u01B0\u01D4\u01D6\u01D8\u01DA\u01DC\u0215\u0217\u0289\u0443\u044A",v:"v\u028B\u028C\u0432",w:"w\u0175\u03C9\u03CE",x:"x\u03C7",y:"y\xFD\xFF\u0177\u01B4\u0233\u024F\u03B0\u03C5\u03CB\u03CD\u044B",z:"z\u017A\u017C\u017E\u01B6\u0225\u0240\u03B6\u0437",OE:"\x8C\u0152",oe:"\x9C\u0153",AE:"\xC6\u01E2\u01FC",ae:"\xE6\u01E3\u01FD",hv:"\u0195",OI:"\u01A2",oi:"\u01A3",DZ:"\u01C4\u01F1",Dz:"\u01C5\u01F2",dz:"\u01C6\u01F3",LJ:"\u01C7",Lj:"\u01C8",lj:"\u01C9",NJ:"\u01CA",Nj:"\u01CB",nj:"\u01CC",OU:"\u0222",ou:"\u0223",TH:"\xDE",th:"\xFE",PS:"\u03A8",ps:"\u03C8",Yo:"\u0401",Ye:"\u0404",Yi:"\u0407",Zh:"\u0416",Ch:"\u0427",Sh:"\u0428\u0429","":"\u042A\u042C\u044C",Yu:"\u042E",Ya:"\u042F",zh:"\u0436",ch:"\u0447",sh:"\u0448\u0449",yu:"\u044E",ya:"\u044F",yo:"\u0451",ye:"\u0454",yi:"\u0457"},jt=null;function jm(){return jt!==null||(jt={},Object.keys(Ha).forEach(function(t){for(var e=Ha[t],n=0;n<e.length;n++){var r=e[n];jt[r]=t}})),jt}function Km(t){var e=jm()[t];return e||t}function Vm(t,e){return e}function Sl(t){var e=b(t);return e===""?"":e.replace(tl,Km).replace(ms,Vm)}function Um(t,e,n){var r=b(t),i=q(e)?0:te(Q(e),0,ae),s=b(n," ");if(i<=r.length)return r;var u=i-r.length,o=Q(u/2),a=u%2;return lr(s,o)+r+lr(s,o+a)}function Jm(t,e,n){var r=b(t);return r.replace(e,n)}function Fl(t,e,n){var r=b(t);if(e instanceof RegExp){if(e.flags.indexOf("g")===-1)throw new TypeError("search argument is a non-global regular expression");return r.replace(e,n)}var i=b(e),s=typeof n=="function";s||(n=b(n));var u=i.length;if(u===0)return Fl(t,/(?:)/g,n);for(var o=u>1?u:1,a=[],l=r.indexOf(i,0);l!==-1;)a.push(l),l=r.indexOf(i,l+o);for(var d=0,c="",h=0;h<a.length;h++){var m=a[h],y=n;s&&(y=b(n.call(void 0,i,m,r))),c+=r.slice(d,m)+y,d=m+u}return d<r.length&&(c+=r.slice(d)),c}function Ym(t){var e=b(t);return e.split("").reverse().join("")}function _l(t){var e=b(t);e=e.replace(ms,function(i,s,u){return _l(u)+s}).replace(el,"$2$1");for(var n="",r=e.length;r--;)n+=e.charAt(r);return n}function Gm(t){var e=b(t);if(e==="")return"";var n=Sl(e).replace(tl,"-");return nl(n)}function Hm(t,e,n,r){var i=b(t),s=b(r),u=De(e);u<0?(u=i.length+u,u<0&&(u=0)):u>i.length&&(u=i.length);var o=De(n,i.length-u);return o<0&&(o=0),i.slice(0,u)+s+i.slice(u+o)}function Wm(t,e,n){var r=b(t),i,s;if(Vt(e)&&Vt(n))i=e.split(""),s=n.split("");else{var u=zm(st(e,{})),o=gp(u,2);i=o[0],s=o[1]}var a=i.length;if(a===0)return r;for(var l="",d=s.length,c=0;c<r.length;c++){for(var h=!1,m=void 0,y=0;y<a&&y<d;y++){var f=i[y];if(r.substr(c,f.length)===f){h=!0,m=s[y],c=c+f.length-1;break}}l+=h?m:r[c]}return l}function zm(t){var e=Object.keys(t),n=e.sort(Qm).map(function(r){return t[r]});return[e,n]}function Qm(t,e){return t.length===e.length?0:t.length<e.length?1:-1}function bs(t,e,n){var r=b(t),i=ge(e);return i===null?!1:i===""?!0:(n=q(n)?0:te(Q(n),0,r.length),r.indexOf(i,n)!==-1)}var Xm=Array.prototype.reduce;function wl(t,e){var n=b(t);if(e===""||n==="")return n;var r=ge(e);if(q(r))return n.replace(_p,"");var i=!0;return Xm.call(n,function(s,u){return i&&bs(r,u)?s:(i=!1,s+u)},"")}var Zm=Array.prototype.reduceRight;function vl(t,e){var n=b(t);if(e===""||n==="")return n;var r=ge(e);if(q(r))return n.replace(wp,"");var i=!0;return Zm.call(n,function(s,u){return i&&bs(r,u)?s:(i=!1,u+s)},"")}function eg(t,e){var n=b(t);if(e===""||n==="")return n;var r=ge(e);return q(r)?n.trim():vl(wl(n,r),r)}var tg="width",ng="newLine",rg="indent",ig="cut";function sg(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=b(t),r=ug(e),i=r.width,s=r.newLine,u=r.indent,o=r.cut;if(n===""||i<=0)return u;for(var a=n.length,l=n.substring.bind(n),d=0,c="";a-d>i;){if(n[d]===" "){d++;continue}var h=n.lastIndexOf(" ",i+d);h>=d?(c+=u+l(d,h)+s,d=h+1):o?(c+=u+l(d,i+d)+s,d+=i):(h=n.indexOf(" ",i+d),h>=0?(c+=u+l(d,h)+s,d=h+1):(c+=u+l(d),d=a))}return d<a&&(c+=u+l(d)),c}function ug(t){return{width:De(t[tg],75),newLine:b(t[ng],`
|
|
197
|
+
`),indent:b(t[rg],""),cut:Xa(t[ig],!1)}}function og(t,e,n){if(q(e))return!1;var r=b(t),i=b(e);if(i==="")return!0;n=q(n)?r.length:te(Q(n),0,r.length),n-=i.length;var s=r.indexOf(i,n);return s!==-1&&s===n}function Cs(t){var e=b(t);return qp.test(e)}function ag(t){var e=b(t);return Pp.test(e)}function lg(t){var e=b(t);return e.trim().length===0}function cg(t){var e=b(t);return vp.test(e)}function fg(t){var e=b(t);return e.length===0}function hg(t){var e=b(t);return Cs(e)&&e.toLowerCase()===e}function dg(t){var e=typeof t=="object"&&!q(t)?Number(t):t;return(typeof e=="number"||typeof e=="string")&&!isNaN(e-parseFloat(e))}function pg(t){var e=b(t);return Cs(e)&&e.toUpperCase()===e}function mg(t,e,n){var r=b(t),i=b(n),s;if(!(e instanceof RegExp)){if(s=ge(e),s===null)return!1;e=new RegExp(s,i)}return e.test(r)}function gg(t,e,n){var r=b(t),i=ge(e);return i===null?!1:i===""?!0:(n=q(n)?0:te(Q(n),0,r.length),r.substr(n,i.length)===i)}function Dg(t){var e=b(t);return e.split("")}function yg(t){for(var e=b(t),n=e.length,r=[],i=0,s;i<n;)s=ol(e,i),r.push(s),i+=s>65535?2:1;return r}function Eg(t){var e=b(t);return st(e.match(cs),[])}function Ag(t,e,n){var r=b(t);return r.split(e,n)}var bg="\uFEFF";function Cg(t){var e=b(t);return e===""?"":e[0]===bg?e.substring(1):e}function Sg(t,e,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=0;r&&(i=-e.length+1);var s=t.substr(n+i,e.length);return s.toLowerCase()===e}function Fg(t){for(var e=[],n;(n=Tp.exec(t))!==null;)e.push(n[1]);return e}var Wa=0,za=1,as=2;function _g(t){for(var e=Wa,n="",r=0;e!==as;){var i=t[r++].toLowerCase();switch(i){case"<":break;case">":e=as;break;default:Fp.test(i)?e===za&&(e=as):(e===Wa&&(e=za),i!=="/"&&(n+=i));break}}return n}var Kt=0,Ue=1,ur=2,Qa=3;function wg(t,e,n){if(t=b(t),t==="")return"";if(!Array.isArray(e)){var r=b(e);e=r===""?[]:Fg(r)}for(var i=b(n),s=t.length,u=e.length>0,o=Sg.bind(null,t),a=Kt,l=0,d="",c="",h=null,m=0;m<s;m++){var y=t[m],f=!1;switch(y){case"<":if(h)break;if(o("< ",m,!1)){f=!0;break}if(a===Kt){f=!0,a=Ue;break}if(a===Ue){l++;break}f=!0;break;case"!":if(a===Ue&&o("<!",m)){a=ur;break}f=!0;break;case"-":if(a===ur&&o("!--",m)){a=Qa;break}f=!0;break;case'"':case"'":a===Ue&&(h===y?h=null:h||(h=y)),f=!0;break;case"E":case"e":if(a===ur&&o("doctype",m)){a=Ue;break}f=!0;break;case">":if(l>0){l--;break}if(h)break;if(a===Ue){if(h=null,a=Kt,u){c+=">";var p=_g(c);e.indexOf(p.toLowerCase())!==-1?d+=c:d+=i,c=""}else d+=i;break}if(a===ur||a===Qa&&o("-->",m)){h=null,a=Kt,c="";break}f=!0;break;default:f=!0}if(f)switch(a){case Kt:d+=y;break;case Ue:u&&(c+=y);break}}return d}var it=null;function vg(){return it!==null||(typeof global=="object"&&global.Object===Object?it=global:typeof self=="object"&&self.Object===Object?it=self:it=new Function("return this")()),it}var fs=vg(),Bg=fs.v;function Ng(){return this===fs.v&&(fs.v=Bg),this}var Og="1.4.0",hs={camelCase:$p,capitalize:ds,decapitalize:Mp,kebabCase:nl,lowerCase:cr,snakeCase:jp,swapCase:Vp,titleCase:Jp,upperCase:Kp,count:sm,countGraphemes:um,countSubstrings:om,countWhere:lm,countWords:cm,escapeHtml:Tm,escapeRegExp:km,unescapeHtml:qm,sprintf:bl,vprintf:Nm,indexOf:Pm,lastIndexOf:Rm,search:$m,charAt:Yp,codePointAt:ol,first:Xp,graphemeAt:Zp,last:em,prune:tm,slice:nm,substr:rm,substring:im,truncate:rl,insert:Mm,latinise:Sl,pad:Um,padLeft:yl,padRight:El,repeat:Dl,replace:Jm,replaceAll:Fl,reverse:Ym,reverseGrapheme:_l,slugify:Gm,splice:Hm,tr:Wm,trim:eg,trimLeft:wl,trimRight:vl,wordWrap:sg,endsWith:og,includes:bs,isAlpha:Cs,isAlphaDigit:ag,isBlank:lg,isDigit:cg,isEmpty:fg,isLowerCase:hg,isNumeric:dg,isString:Vt,isUpperCase:pg,matches:mg,startsWith:gg,chars:Dg,codePoints:yg,graphemes:Eg,split:Ag,words:Ut,stripBom:Cg,stripTags:wg,noConflict:Ng,version:Og};function X(t,e){this._wrappedValue=t,this._explicitChain=e}X.prototype.value=function(){return this._wrappedValue};X.prototype.valueOf=function(){return this.value()};X.prototype.toJSON=function(){return this.value()};X.prototype.toString=function(){return String(this.value())};X.prototype.chain=function(){return new X(this._wrappedValue,!0)};X.prototype.thru=function(t){return typeof t=="function"?new X(t(this._wrappedValue),this._explicitChain):this};X.prototype._explicitChain=!0;function Ig(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=t.apply(void 0,[this._wrappedValue].concat(n));return this._explicitChain||typeof i=="string"?new X(i,this._explicitChain):i}}Object.keys(hs).forEach(function(t){X.prototype[t]=Ig(hs[t])});function Tg(t){return new X(t,!0)}function Bl(t){return new X(t,!1)}ls(Bl,hs,{chain:Tg});var Nl=Bl;import Ol from"path";function Il(t){let e=Ol.extname(t),n=Ol.basename(t,e);return Nl.camelCase(n)}function Ss(t){return t.replace(/'/g,"''")}function Tl(t){return t===null?"NULL":`'${Ss(String(t))}'`}function kl(){return crypto.randomUUID()}function xl(){return new Date().toISOString()}async function Ll(t,e={}){let n=dr.dirname(t),r=e.projectRoot??process.cwd(),i=await Ls(n,r),s=await xg(n),u="config"in s;return{...i,...s,...u?{}:{config:e.config},secrets:e.secrets??{},globalSecrets:e.globalSecrets??{},env:process.env,include:Lg(n,r,e),escape:Ss,quote:Tl,json:a=>JSON.stringify(a),now:xl,uuid:kl}}async function xg(t){let e={},[n,r]=await xe(()=>kg(t,{withFileTypes:!0}));if(r||!n)return ce.emit("error",{source:"template",error:r??new Error("Failed to read directory"),context:{dir:t,operation:"scan-data-files"}}),e;for(let i of n){if(!i.isFile()||i.name.startsWith(Zt)||i.name.endsWith(".tmpl"))continue;let s=dr.extname(i.name).toLowerCase();if(!Ja(s)||s===".sql")continue;let u=dr.join(t,i.name),o=Il(i.name),[a,l]=await xe(()=>os(u));if(l){ce.emit("error",{source:"template",error:l,context:{filepath:u,operation:"load-data-file"}});continue}e[o]=a,ce.emit("template:load",{filepath:u,format:s})}return e}function Lg(t,e,n){return async r=>{let i=dr.resolve(t,r);if(!i.startsWith(e))throw new Error(`Include path escapes project root: ${r}`);if(i.endsWith(".tmpl")){let{processFile:o}=await import("./engine-BWPHMMXT.js");return(await o(i,n)).sql}let[s,u]=await xe(()=>os(i));if(u)throw new Error(`Failed to include '${r}': ${u.message}`);return typeof s=="string"?s:JSON.stringify(s)}}var Pg=new Ts({tags:["{%","%}"],varName:"$",autoEscape:!1,useWith:!1,cache:!1});function Rg(t){return t.endsWith(ks)}async function $g(t,e){return Pg.renderStringAsync(t,e)}async function Mg(t,e={}){let n=await qg(t,"utf-8");if(!Rg(t))return{sql:n,isTemplate:!1};let r=performance.now(),i=await Ll(t,e),s=await $g(n,i),u=performance.now()-r;return ce.emit("template:render",{filepath:t,durationMs:u}),{sql:s,isTemplate:!0,durationMs:u}}async function zy(t,e={}){let n=[];for(let r of t){let i=await Mg(r,e);n.push(i)}return n}export{va as a,lt as b,ty as c,us as d,iy as e,ir as f,Nl as g,Ll as h,Pg as i,Rg as j,$g as k,Mg as l,zy as m};
|
|
198
|
+
/*! Bundled license information:
|
|
199
|
+
|
|
200
|
+
voca/es/index.js:
|
|
201
|
+
(*!
|
|
202
|
+
* Voca string library 1.4.1
|
|
203
|
+
* https://vocajs.pages.dev
|
|
204
|
+
*
|
|
205
|
+
* Copyright Dmitri Pavlutin and other contributors
|
|
206
|
+
* Released under the MIT license
|
|
207
|
+
*)
|
|
208
|
+
*/
|