@uibot/design-md 0.18.1 → 0.20.0

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.
@@ -22,6 +22,18 @@ verbatim copy):
22
22
  The default generation path force-includes this id. UI Craft baseline (lane
23
23
  selection + hard bans) is injected separately and always-on.
24
24
 
25
+ ## Creation design guidance
26
+
27
+ Take a visual stance appropriate to the subject and audience. Choose one named direction,
28
+ one distinctive composition, deliberate typography roles and a consistent spacing scale.
29
+ Let the selected project brand/theme own colors and fonts. Keep surfaces mostly neutral
30
+ with a purposeful accent; use either a border or shadow consistently rather than both
31
+ on every card. Alternate dense and spacious sections according to content, not a repeated
32
+ grid template. Avoid default purple gradients, invented metrics and decorative logos.
33
+ Keep long copy readable, headings concise and CTAs specific. Design focus, empty, error
34
+ and success states as part of the page. Check narrow and wide layouts and reduced motion.
35
+ When updating a selected artifact, preserve its established direction unless redesign is requested.
36
+
25
37
  ## Why
26
38
 
27
39
  Generated UI clusters on a statistical mean: grey canvas, 8px radius, centered
package/dist/index.js CHANGED
@@ -1,75 +1,75 @@
1
1
  // @bun
2
- var Dl=Object.create;var{getPrototypeOf:ql,defineProperty:sn,getOwnPropertyNames:Rl}=Object;var rn=Object.prototype.hasOwnProperty;function Cl(e){return this[e]}var Ml,Pl,xl=(e,t,s)=>{var r=e!=null&&typeof e==="object";if(r){var n=t?Ml??=new WeakMap:Pl??=new WeakMap,i=n.get(e);if(i)return i}s=e!=null?Dl(ql(e)):{};let o=t||!e||!e.__esModule||!rn.call(e,"default")?sn(s,"default",{value:e,enumerable:!0}):s;if(e&&typeof e==="object"||typeof e==="function"){for(let a of Rl(e))if(!rn.call(o,a))sn(o,a,{get:Cl.bind(e,a),enumerable:!0})}if(r)n.set(e,o);return o};var m=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var pt=import.meta.require;var ve=m(function(RE,nn){var _l=Number.MAX_SAFE_INTEGER||9007199254740991,jl=["major","premajor","minor","preminor","patch","prepatch","prerelease"];nn.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:_l,RELEASE_TYPES:jl,SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var Pe=m(function(CE,on){var Fl=typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};on.exports=Fl});var Ne=m(function(H,an){var{MAX_SAFE_COMPONENT_LENGTH:ws,MAX_SAFE_BUILD_LENGTH:Bl,MAX_LENGTH:Ul}=ve(),Kl=Pe();H=an.exports={};var Vl=H.re=[],Gl=H.safeRe=[],b=H.src=[],Yl=H.safeSrc=[],S=H.t={},Jl=0,Es="[a-zA-Z0-9-]",Hl=[["\\s",1],["\\d",Ul],[Es,Bl]],Xl=(e)=>{for(let[t,s]of Hl)e=e.split(`${t}*`).join(`${t}{0,${s}}`).split(`${t}+`).join(`${t}{1,${s}}`);return e},A=(e,t,s)=>{let r=Xl(t),n=Jl++;Kl(e,n,t),S[e]=n,b[n]=t,Yl[n]=r,Vl[n]=new RegExp(t,s?"g":void 0),Gl[n]=new RegExp(r,s?"g":void 0)};A("NUMERICIDENTIFIER","0|[1-9]\\d*");A("NUMERICIDENTIFIERLOOSE","\\d+");A("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Es}*`);A("MAINVERSION",`(${b[S.NUMERICIDENTIFIER]})\\.(${b[S.NUMERICIDENTIFIER]})\\.(${b[S.NUMERICIDENTIFIER]})`);A("MAINVERSIONLOOSE",`(${b[S.NUMERICIDENTIFIERLOOSE]})\\.(${b[S.NUMERICIDENTIFIERLOOSE]})\\.(${b[S.NUMERICIDENTIFIERLOOSE]})`);A("PRERELEASEIDENTIFIER",`(?:${b[S.NONNUMERICIDENTIFIER]}|${b[S.NUMERICIDENTIFIER]})`);A("PRERELEASEIDENTIFIERLOOSE",`(?:${b[S.NONNUMERICIDENTIFIER]}|${b[S.NUMERICIDENTIFIERLOOSE]})`);A("PRERELEASE",`(?:-(${b[S.PRERELEASEIDENTIFIER]}(?:\\.${b[S.PRERELEASEIDENTIFIER]})*))`);A("PRERELEASELOOSE",`(?:-?(${b[S.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${b[S.PRERELEASEIDENTIFIERLOOSE]})*))`);A("BUILDIDENTIFIER",`${Es}+`);A("BUILD",`(?:\\+(${b[S.BUILDIDENTIFIER]}(?:\\.${b[S.BUILDIDENTIFIER]})*))`);A("FULLPLAIN",`v?${b[S.MAINVERSION]}${b[S.PRERELEASE]}?${b[S.BUILD]}?`);A("FULL",`^${b[S.FULLPLAIN]}$`);A("LOOSEPLAIN",`[v=\\s]*${b[S.MAINVERSIONLOOSE]}${b[S.PRERELEASELOOSE]}?${b[S.BUILD]}?`);A("LOOSE",`^${b[S.LOOSEPLAIN]}$`);A("GTLT","((?:<|>)?=?)");A("XRANGEIDENTIFIERLOOSE",`${b[S.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);A("XRANGEIDENTIFIER",`${b[S.NUMERICIDENTIFIER]}|x|X|\\*`);A("XRANGEPLAIN",`[v=\\s]*(${b[S.XRANGEIDENTIFIER]})(?:\\.(${b[S.XRANGEIDENTIFIER]})(?:\\.(${b[S.XRANGEIDENTIFIER]})(?:${b[S.PRERELEASE]})?${b[S.BUILD]}?)?)?`);A("XRANGEPLAINLOOSE",`[v=\\s]*(${b[S.XRANGEIDENTIFIERLOOSE]})(?:\\.(${b[S.XRANGEIDENTIFIERLOOSE]})(?:\\.(${b[S.XRANGEIDENTIFIERLOOSE]})(?:${b[S.PRERELEASELOOSE]})?${b[S.BUILD]}?)?)?`);A("XRANGE",`^${b[S.GTLT]}\\s*${b[S.XRANGEPLAIN]}$`);A("XRANGELOOSE",`^${b[S.GTLT]}\\s*${b[S.XRANGEPLAINLOOSE]}$`);A("COERCEPLAIN",`(^|[^\\d])(\\d{1,${ws}})(?:\\.(\\d{1,${ws}}))?(?:\\.(\\d{1,${ws}}))?`);A("COERCE",`${b[S.COERCEPLAIN]}(?:$|[^\\d])`);A("COERCEFULL",b[S.COERCEPLAIN]+`(?:${b[S.PRERELEASE]})?(?:${b[S.BUILD]})?(?:$|[^\\d])`);A("COERCERTL",b[S.COERCE],!0);A("COERCERTLFULL",b[S.COERCEFULL],!0);A("LONETILDE","(?:~>?)");A("TILDETRIM",`(\\s*)${b[S.LONETILDE]}\\s+`,!0);H.tildeTrimReplace="$1~";A("TILDE",`^${b[S.LONETILDE]}${b[S.XRANGEPLAIN]}$`);A("TILDELOOSE",`^${b[S.LONETILDE]}${b[S.XRANGEPLAINLOOSE]}$`);A("LONECARET","(?:\\^)");A("CARETTRIM",`(\\s*)${b[S.LONECARET]}\\s+`,!0);H.caretTrimReplace="$1^";A("CARET",`^${b[S.LONECARET]}${b[S.XRANGEPLAIN]}$`);A("CARETLOOSE",`^${b[S.LONECARET]}${b[S.XRANGEPLAINLOOSE]}$`);A("COMPARATORLOOSE",`^${b[S.GTLT]}\\s*(${b[S.LOOSEPLAIN]})$|^$`);A("COMPARATOR",`^${b[S.GTLT]}\\s*(${b[S.FULLPLAIN]})$|^$`);A("COMPARATORTRIM",`(\\s*)${b[S.GTLT]}\\s*(${b[S.LOOSEPLAIN]}|${b[S.XRANGEPLAIN]})`,!0);H.comparatorTrimReplace="$1$2$3";A("HYPHENRANGE",`^\\s*(${b[S.XRANGEPLAIN]})\\s+-\\s+(${b[S.XRANGEPLAIN]})\\s*$`);A("HYPHENRANGELOOSE",`^\\s*(${b[S.XRANGEPLAINLOOSE]})\\s+-\\s+(${b[S.XRANGEPLAINLOOSE]})\\s*$`);A("STAR","(<|>)?=?\\s*\\*");A("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");A("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var dt=m(function(ME,ln){var Wl=Object.freeze({loose:!0}),Ql=Object.freeze({}),zl=(e)=>{if(!e)return Ql;if(typeof e!=="object")return Wl;return e};ln.exports=zl});var vs=m(function(PE,fn){var cn=/^[0-9]+$/,un=(e,t)=>{if(typeof e==="number"&&typeof t==="number")return e===t?0:e<t?-1:1;let s=cn.test(e),r=cn.test(t);if(s&&r)e=+e,t=+t;return e===t?0:s&&!r?-1:r&&!s?1:e<t?-1:1},Zl=(e,t)=>un(t,e);fn.exports={compareIdentifiers:un,rcompareIdentifiers:Zl}});var x=m(function(xE,dn){var ht=Pe(),{MAX_LENGTH:pn,MAX_SAFE_INTEGER:mt}=ve(),{safeRe:gt,t:yt}=Ne(),ec=dt(),{compareIdentifiers:Ns}=vs(),tc=(e,t)=>{let s=t.split(".");if(s.length>e.length)return!1;for(let r=0;r<s.length;r++)if(Ns(e[r],s[r])!==0)return!1;return!0};class G{constructor(e,t){if(t=ec(t),e instanceof G)if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;else e=e.version;else if(typeof e!=="string")throw TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>pn)throw TypeError(`version is longer than ${pn} characters`);ht("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let s=e.trim().match(t.loose?gt[yt.LOOSE]:gt[yt.FULL]);if(!s)throw TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>mt||this.major<0)throw TypeError("Invalid major version");if(this.minor>mt||this.minor<0)throw TypeError("Invalid minor version");if(this.patch>mt||this.patch<0)throw TypeError("Invalid patch version");if(!s[4])this.prerelease=[];else this.prerelease=s[4].split(".").map((r)=>{if(/^[0-9]+$/.test(r)){let n=+r;if(n>=0&&n<mt)return n}return r});this.build=s[5]?s[5].split("."):[],this.format()}format(){if(this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length)this.version+=`-${this.prerelease.join(".")}`;return this.version}toString(){return this.version}compare(e){if(ht("SemVer.compare",this.version,this.options,e),!(e instanceof G)){if(typeof e==="string"&&e===this.version)return 0;e=new G(e,this.options)}if(e.version===this.version)return 0;return this.compareMain(e)||this.comparePre(e)}compareMain(e){if(!(e instanceof G))e=new G(e,this.options);if(this.major<e.major)return-1;if(this.major>e.major)return 1;if(this.minor<e.minor)return-1;if(this.minor>e.minor)return 1;if(this.patch<e.patch)return-1;if(this.patch>e.patch)return 1;return 0}comparePre(e){if(!(e instanceof G))e=new G(e,this.options);if(this.prerelease.length&&!e.prerelease.length)return-1;else if(!this.prerelease.length&&e.prerelease.length)return 1;else if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let s=this.prerelease[t],r=e.prerelease[t];if(ht("prerelease compare",t,s,r),s===void 0&&r===void 0)return 0;else if(r===void 0)return 1;else if(s===void 0)return-1;else if(s===r)continue;else return Ns(s,r)}while(++t)}compareBuild(e){if(!(e instanceof G))e=new G(e,this.options);let t=0;do{let s=this.build[t],r=e.build[t];if(ht("build compare",t,s,r),s===void 0&&r===void 0)return 0;else if(r===void 0)return 1;else if(s===void 0)return-1;else if(s===r)continue;else return Ns(s,r)}while(++t)}inc(e,t,s){if(e.startsWith("pre")){if(!t&&s===!1)throw Error("invalid increment argument: identifier is empty");if(t){let r=`-${t}`.match(this.options.loose?gt[yt.PRERELEASELOOSE]:gt[yt.PRERELEASE]);if(!r||r[1]!==t)throw Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,s);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,s);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,s),this.inc("pre",t,s);break;case"prerelease":if(this.prerelease.length===0)this.inc("patch",t,s);this.inc("pre",t,s);break;case"release":if(this.prerelease.length===0)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":if(this.minor!==0||this.patch!==0||this.prerelease.length===0)this.major++;this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":if(this.patch!==0||this.prerelease.length===0)this.minor++;this.patch=0,this.prerelease=[];break;case"patch":if(this.prerelease.length===0)this.patch++;this.prerelease=[];break;case"pre":{let r=Number(s)?1:0;if(this.prerelease.length===0)this.prerelease=[r];else{let n=this.prerelease.length;while(--n>=0)if(typeof this.prerelease[n]==="number")this.prerelease[n]++,n=-2;if(n===-1){if(t===this.prerelease.join(".")&&s===!1)throw Error("invalid increment argument: identifier already exists");this.prerelease.push(r)}}if(t){let n=[t,r];if(s===!1)n=[t];if(tc(this.prerelease,t)){let i=this.prerelease[t.split(".").length];if(isNaN(i))this.prerelease=n}else this.prerelease=n}break}default:throw Error(`invalid increment argument: ${e}`)}if(this.raw=this.format(),this.build.length)this.raw+=`+${this.build.join(".")}`;return this}}dn.exports=G});var te=m(function(_E,mn){var hn=x(),sc=(e,t,s=!1)=>{if(e instanceof hn)return e;try{return new hn(e,t)}catch(r){if(!s)return null;throw r}};mn.exports=sc});var yn=m(function(jE,gn){var rc=te(),nc=(e,t)=>{let s=rc(e,t);return s?s.version:null};gn.exports=nc});var Sn=m(function(FE,bn){var ic=te(),oc=(e,t)=>{let s=ic(e.trim().replace(/^[=v]+/,""),t);return s?s.version:null};bn.exports=oc});var vn=m(function(BE,En){var wn=x(),ac=(e,t,s,r,n)=>{if(typeof s==="string")n=r,r=s,s=void 0;try{return new wn(e instanceof wn?e.version:e,s).inc(t,r,n).version}catch(i){return null}};En.exports=ac});var kn=m(function(UE,On){var Nn=te(),lc=(e,t)=>{let s=Nn(e,null,!0),r=Nn(t,null,!0),n=s.compare(r);if(n===0)return null;let i=n>0,o=i?s:r,a=i?r:s,l=!!o.prerelease.length;if(!!a.prerelease.length&&!l){if(!a.patch&&!a.minor)return"major";if(a.compareMain(o)===0){if(a.minor&&!a.patch)return"minor";return"patch"}}let d=l?"pre":"";if(s.major!==r.major)return d+"major";if(s.minor!==r.minor)return d+"minor";if(s.patch!==r.patch)return d+"patch";return"prerelease"};On.exports=lc});var Ln=m(function(KE,An){var cc=x(),uc=(e,t)=>new cc(e,t).major;An.exports=uc});var In=m(function(VE,$n){var fc=x(),pc=(e,t)=>new fc(e,t).minor;$n.exports=pc});var Dn=m(function(GE,Tn){var dc=x(),hc=(e,t)=>new dc(e,t).patch;Tn.exports=hc});var Rn=m(function(YE,qn){var mc=te(),gc=(e,t)=>{let s=mc(e,t);return s&&s.prerelease.length?s.prerelease:null};qn.exports=gc});var B=m(function(JE,Mn){var Cn=x(),yc=(e,t,s)=>new Cn(e,s).compare(new Cn(t,s));Mn.exports=yc});var xn=m(function(HE,Pn){var bc=B(),Sc=(e,t,s)=>bc(t,e,s);Pn.exports=Sc});var jn=m(function(XE,_n){var wc=B(),Ec=(e,t)=>wc(e,t,!0);_n.exports=Ec});var bt=m(function(WE,Bn){var Fn=x(),vc=(e,t,s)=>{let r=new Fn(e,s),n=new Fn(t,s);return r.compare(n)||r.compareBuild(n)};Bn.exports=vc});var Kn=m(function(QE,Un){var Nc=bt(),Oc=(e,t)=>e.sort((s,r)=>Nc(s,r,t));Un.exports=Oc});var Gn=m(function(zE,Vn){var kc=bt(),Ac=(e,t)=>e.sort((s,r)=>kc(r,s,t));Vn.exports=Ac});var xe=m(function(ZE,Yn){var Lc=B(),$c=(e,t,s)=>Lc(e,t,s)>0;Yn.exports=$c});var St=m(function(e0,Jn){var Ic=B(),Tc=(e,t,s)=>Ic(e,t,s)<0;Jn.exports=Tc});var Os=m(function(t0,Hn){var Dc=B(),qc=(e,t,s)=>Dc(e,t,s)===0;Hn.exports=qc});var ks=m(function(s0,Xn){var Rc=B(),Cc=(e,t,s)=>Rc(e,t,s)!==0;Xn.exports=Cc});var wt=m(function(r0,Wn){var Mc=B(),Pc=(e,t,s)=>Mc(e,t,s)>=0;Wn.exports=Pc});var Et=m(function(n0,Qn){var xc=B(),_c=(e,t,s)=>xc(e,t,s)<=0;Qn.exports=_c});var As=m(function(i0,zn){var jc=Os(),Fc=ks(),Bc=xe(),Uc=wt(),Kc=St(),Vc=Et(),Gc=(e,t,s,r)=>{switch(t){case"===":if(typeof e==="object")e=e.version;if(typeof s==="object")s=s.version;return e===s;case"!==":if(typeof e==="object")e=e.version;if(typeof s==="object")s=s.version;return e!==s;case"":case"=":case"==":return jc(e,s,r);case"!=":return Fc(e,s,r);case">":return Bc(e,s,r);case">=":return Uc(e,s,r);case"<":return Kc(e,s,r);case"<=":return Vc(e,s,r);default:throw TypeError(`Invalid operator: ${t}`)}};zn.exports=Gc});var ei=m(function(o0,Zn){var Yc=x(),Jc=te(),{safeRe:vt,t:Nt}=Ne(),Hc=(e,t)=>{if(e instanceof Yc)return e;if(typeof e==="number")e=String(e);if(typeof e!=="string")return null;t=t||{};let s=null;if(!t.rtl)s=e.match(t.includePrerelease?vt[Nt.COERCEFULL]:vt[Nt.COERCE]);else{let l=t.includePrerelease?vt[Nt.COERCERTLFULL]:vt[Nt.COERCERTL],c;while((c=l.exec(e))&&(!s||s.index+s[0].length!==e.length)){if(!s||c.index+c[0].length!==s.index+s[0].length)s=c;l.lastIndex=c.index+c[1].length+c[2].length}l.lastIndex=-1}if(s===null)return null;let r=s[2],n=s[3]||"0",i=s[4]||"0",o=t.includePrerelease&&s[5]?`-${s[5]}`:"",a=t.includePrerelease&&s[6]?`+${s[6]}`:"";return Jc(`${r}.${n}.${i}${o}${a}`,t)};Zn.exports=Hc});var si=m(function(a0,ti){var Xc=te(),Wc=ve(),Qc=x(),zc=(e,t,s)=>{if(!Wc.RELEASE_TYPES.includes(t))return null;let r=Zc(e,s);return r&&eu(r,t)},Zc=(e,t)=>{let s=e instanceof Qc?e.version:e;return Xc(s,t)},eu=(e,t)=>{if(tu(t))return e.version;switch(e.prerelease=[],t){case"major":e.minor=0,e.patch=0;break;case"minor":e.patch=0;break}return e.format()},tu=(e)=>e.startsWith("pre");ti.exports=zc});var ii=m(function(l0,ni){class ri{constructor(){this.max=1000,this.map=new Map}get(e){let t=this.map.get(e);if(t===void 0)return;else return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){let r=this.map.keys().next().value;this.delete(r)}this.map.set(e,t)}return this}}ni.exports=ri});var U=m(function(c0,ci){var su=/\s+/g;class _e{constructor(e,t){if(t=nu(t),e instanceof _e)if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;else return new _e(e.raw,t);if(e instanceof Ls)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(su," "),this.set=this.raw.split("||").map((s)=>this.parseRange(s.trim())).filter((s)=>s.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let s=this.set[0];if(this.set=this.set.filter((r)=>!ai(r[0])),this.set.length===0)this.set=[s];else if(this.set.length>1){for(let r of this.set)if(r.length===1&&du(r[0])){this.set=[r];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e<this.set.length;e++){if(e>0)this.formatted+="||";let t=this.set[e];for(let s=0;s<t.length;s++){if(s>0)this.formatted+=" ";this.formatted+=t[s].toString().trim()}}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){e=e.replace(pu,"");let s=((this.options.includePrerelease&&uu)|(this.options.loose&&fu))+":"+e,r=oi.get(s);if(r)return r;let n=this.options.loose,i=n?j[_.HYPHENRANGELOOSE]:j[_.HYPHENRANGE];e=e.replace(i,Ou(this.options.includePrerelease)),D("hyphen replace",e),e=e.replace(j[_.COMPARATORTRIM],au),D("comparator trim",e),e=e.replace(j[_.TILDETRIM],lu),D("tilde trim",e),e=e.replace(j[_.CARETTRIM],cu),D("caret trim",e);let o=e.split(" ").map((d)=>hu(d,this.options)).join(" ").split(/\s+/).map((d)=>Nu(d,this.options));if(n)o=o.filter((d)=>(D("loose invalid filter",d,this.options),!!d.match(j[_.COMPARATORLOOSE])));D("range list",o);let a=new Map,l=o.map((d)=>new Ls(d,this.options));for(let d of l){if(ai(d))return[d];a.set(d.value,d)}if(a.size>1&&a.has(""))a.delete("");let c=[...a.values()];return oi.set(s,c),c}intersects(e,t){if(!(e instanceof _e))throw TypeError("a Range is required");return this.set.some((s)=>li(s,t)&&e.set.some((r)=>li(r,t)&&s.every((n)=>r.every((i)=>n.intersects(i,t)))))}test(e){if(!e)return!1;if(typeof e==="string")try{e=new iu(e,this.options)}catch(t){return!1}for(let t=0;t<this.set.length;t++)if(ku(this.set[t],e,this.options))return!0;return!1}}ci.exports=_e;var ru=ii(),oi=new ru,nu=dt(),Ls=je(),D=Pe(),iu=x(),{safeRe:j,src:ou,t:_,comparatorTrimReplace:au,tildeTrimReplace:lu,caretTrimReplace:cu}=Ne(),{FLAG_INCLUDE_PRERELEASE:uu,FLAG_LOOSE:fu}=ve(),pu=new RegExp(ou[_.BUILD],"g"),ai=(e)=>e.value==="<0.0.0-0",du=(e)=>e.value==="",li=(e,t)=>{let s=!0,r=e.slice(),n=r.pop();while(s&&r.length)s=r.every((i)=>n.intersects(i,t)),n=r.pop();return s},hu=(e,t)=>(e=e.replace(j[_.BUILD],""),D("comp",e,t),e=bu(e,t),D("caret",e),e=gu(e,t),D("tildes",e),e=wu(e,t),D("xrange",e),e=vu(e,t),D("stars",e),e),M=(e)=>!e||e.toLowerCase()==="x"||e==="*",mu=(e,t,s)=>M(e)&&!M(t)||M(t)&&s&&!M(s),gu=(e,t)=>e.trim().split(/\s+/).map((s)=>yu(s,t)).join(" "),yu=(e,t)=>{let s=t.loose?j[_.TILDELOOSE]:j[_.TILDE],r=t.includePrerelease?"-0":"";return e.replace(s,(n,i,o,a,l)=>{D("tilde",e,n,i,o,a,l);let c;if(M(i))c="";else if(M(o))c=`>=${i}.0.0${r} <${+i+1}.0.0-0`;else if(M(a))c=`>=${i}.${o}.0${r} <${i}.${+o+1}.0-0`;else if(l)D("replaceTilde pr",l),c=`>=${i}.${o}.${a}-${l} <${i}.${+o+1}.0-0`;else c=`>=${i}.${o}.${a} <${i}.${+o+1}.0-0`;return D("tilde return",c),c})},bu=(e,t)=>e.trim().split(/\s+/).map((s)=>Su(s,t)).join(" "),Su=(e,t)=>{D("caret",e,t);let s=t.loose?j[_.CARETLOOSE]:j[_.CARET],r=t.includePrerelease?"-0":"";return e.replace(s,(n,i,o,a,l)=>{D("caret",e,n,i,o,a,l);let c;if(M(i))c="";else if(M(o))c=`>=${i}.0.0${r} <${+i+1}.0.0-0`;else if(M(a))if(i==="0")c=`>=${i}.${o}.0${r} <${i}.${+o+1}.0-0`;else c=`>=${i}.${o}.0${r} <${+i+1}.0.0-0`;else if(l)if(D("replaceCaret pr",l),i==="0")if(o==="0")c=`>=${i}.${o}.${a}-${l} <${i}.${o}.${+a+1}-0`;else c=`>=${i}.${o}.${a}-${l} <${i}.${+o+1}.0-0`;else c=`>=${i}.${o}.${a}-${l} <${+i+1}.0.0-0`;else if(D("no pr"),i==="0")if(o==="0")c=`>=${i}.${o}.${a} <${i}.${o}.${+a+1}-0`;else c=`>=${i}.${o}.${a} <${i}.${+o+1}.0-0`;else c=`>=${i}.${o}.${a} <${+i+1}.0.0-0`;return D("caret return",c),c})},wu=(e,t)=>(D("replaceXRanges",e,t),e.split(/\s+/).map((s)=>Eu(s,t)).join(" ")),Eu=(e,t)=>{e=e.trim();let s=t.loose?j[_.XRANGELOOSE]:j[_.XRANGE];return e.replace(s,(r,n,i,o,a,l)=>{if(D("xRange",e,r,n,i,o,a,l),mu(i,o,a))return e;let c=M(i),d=c||M(o),f=d||M(a),u=f;if(n==="="&&u)n="";if(l=t.includePrerelease?"-0":"",c)if(n===">"||n==="<")r="<0.0.0-0";else r="*";else if(n&&u){if(d)o=0;if(a=0,n===">")if(n=">=",d)i=+i+1,o=0,a=0;else o=+o+1,a=0;else if(n==="<=")if(n="<",d)i=+i+1;else o=+o+1;if(n==="<")l="-0";r=`${n+i}.${o}.${a}${l}`}else if(d)r=`>=${i}.0.0${l} <${+i+1}.0.0-0`;else if(f)r=`>=${i}.${o}.0${l} <${i}.${+o+1}.0-0`;return D("xRange return",r),r})},vu=(e,t)=>(D("replaceStars",e,t),e.trim().replace(j[_.STAR],"")),Nu=(e,t)=>(D("replaceGTE0",e,t),e.trim().replace(j[t.includePrerelease?_.GTE0PRE:_.GTE0],"")),Ou=(e)=>(t,s,r,n,i,o,a,l,c,d,f,u)=>{if(M(r))s="";else if(M(n))s=`>=${r}.0.0${e?"-0":""}`;else if(M(i))s=`>=${r}.${n}.0${e?"-0":""}`;else if(o)s=`>=${s}`;else s=`>=${s}${e?"-0":""}`;if(M(c))l="";else if(M(d))l=`<${+c+1}.0.0-0`;else if(M(f))l=`<${c}.${+d+1}.0-0`;else if(u)l=`<=${c}.${d}.${f}-${u}`;else if(e)l=`<${c}.${d}.${+f+1}-0`;else l=`<=${l}`;return`${s} ${l}`.trim()},ku=(e,t,s)=>{for(let r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!s.includePrerelease){for(let r=0;r<e.length;r++){if(D(e[r].semver),e[r].semver===Ls.ANY)continue;if(e[r].semver.prerelease.length>0){let n=e[r].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}}return!1}return!0}});var je=m(function(u0,mi){var Fe=Symbol("SemVer ANY");class Ot{static get ANY(){return Fe}constructor(e,t){if(t=ui(t),e instanceof Ot)if(e.loose===!!t.loose)return e;else e=e.value;if(e=e.trim().split(/\s+/).join(" "),Is("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===Fe)this.value="";else this.value=this.operator+this.semver.version;Is("comp",this)}parse(e){let t=this.options.loose?fi[pi.COMPARATORLOOSE]:fi[pi.COMPARATOR],s=e.match(t);if(!s)throw TypeError(`Invalid comparator: ${e}`);if(this.operator=s[1]!==void 0?s[1]:"",this.operator==="=")this.operator="";if(!s[2])this.semver=Fe;else this.semver=new di(s[2],this.options.loose)}toString(){return this.value}test(e){if(Is("Comparator.test",e,this.options.loose),this.semver===Fe||e===Fe)return!0;if(typeof e==="string")try{e=new di(e,this.options)}catch(t){return!1}return $s(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof Ot))throw TypeError("a Comparator is required");if(this.operator===""){if(this.value==="")return!0;return new hi(e.value,t).test(this.value)}else if(e.operator===""){if(e.value==="")return!0;return new hi(this.value,t).test(e.semver)}if(t=ui(t),t.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0"))return!1;if(!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))return!1;if(this.operator.startsWith(">")&&e.operator.startsWith(">"))return!0;if(this.operator.startsWith("<")&&e.operator.startsWith("<"))return!0;if(this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("="))return!0;if($s(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))return!0;if($s(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">"))return!0;return!1}}mi.exports=Ot;var ui=dt(),{safeRe:fi,t:pi}=Ne(),$s=As(),Is=Pe(),di=x(),hi=U()});var Be=m(function(f0,gi){var Au=U(),Lu=(e,t,s)=>{try{t=new Au(t,s)}catch(r){return!1}return t.test(e)};gi.exports=Lu});var bi=m(function(p0,yi){var $u=U(),Iu=(e,t)=>new $u(e,t).set.map((s)=>s.map((r)=>r.value).join(" ").trim().split(" "));yi.exports=Iu});var wi=m(function(d0,Si){var Tu=x(),Du=U(),qu=(e,t,s)=>{let r=null,n=null,i=null;try{i=new Du(t,s)}catch(o){return null}return e.forEach((o)=>{if(i.test(o)){if(!r||n.compare(o)===-1)r=o,n=new Tu(r,s)}}),r};Si.exports=qu});var vi=m(function(h0,Ei){var Ru=x(),Cu=U(),Mu=(e,t,s)=>{let r=null,n=null,i=null;try{i=new Cu(t,s)}catch(o){return null}return e.forEach((o)=>{if(i.test(o)){if(!r||n.compare(o)===1)r=o,n=new Ru(r,s)}}),r};Ei.exports=Mu});var ki=m(function(m0,Oi){var Ts=x(),Pu=U(),Ni=xe(),xu=(e,t)=>{e=new Pu(e,t);let s=new Ts("0.0.0");if(e.test(s))return s;if(s=new Ts("0.0.0-0"),e.test(s))return s;s=null;for(let r=0;r<e.set.length;++r){let n=e.set[r],i=null;if(n.forEach((o)=>{let a=new Ts(o.semver.version);switch(o.operator){case">":if(a.prerelease.length===0)a.patch++;else a.prerelease.push(0);a.raw=a.format();case"":case">=":if(!i||Ni(a,i))i=a;break;case"<":case"<=":break;default:throw Error(`Unexpected operation: ${o.operator}`)}}),i&&(!s||Ni(s,i)))s=i}if(s&&e.test(s))return s;return null};Oi.exports=xu});var Li=m(function(g0,Ai){var _u=U(),ju=(e,t)=>{try{return new _u(e,t).range||"*"}catch(s){return null}};Ai.exports=ju});var kt=m(function(y0,Di){var Fu=x(),Ti=je(),{ANY:Bu}=Ti,Uu=U(),Ku=Be(),$i=xe(),Ii=St(),Vu=Et(),Gu=wt(),Yu=(e,t,s,r)=>{e=new Fu(e,r),t=new Uu(t,r);let n,i,o,a,l;switch(s){case">":n=$i,i=Vu,o=Ii,a=">",l=">=";break;case"<":n=Ii,i=Gu,o=$i,a="<",l="<=";break;default:throw TypeError('Must provide a hilo val of "<" or ">"')}if(Ku(e,t,r))return!1;for(let c=0;c<t.set.length;++c){let d=t.set[c],f=null,u=null;if(d.forEach((p)=>{if(p.semver===Bu)p=new Ti(">=0.0.0");if(f=f||p,u=u||p,n(p.semver,f.semver,r))f=p;else if(o(p.semver,u.semver,r))u=p}),f.operator===a||f.operator===l)return!1;if((!u.operator||u.operator===a)&&i(e,u.semver))return!1;else if(u.operator===l&&o(e,u.semver))return!1}return!0};Di.exports=Yu});var Ri=m(function(b0,qi){var Ju=kt(),Hu=(e,t,s)=>Ju(e,t,">",s);qi.exports=Hu});var Mi=m(function(S0,Ci){var Xu=kt(),Wu=(e,t,s)=>Xu(e,t,"<",s);Ci.exports=Wu});var _i=m(function(w0,xi){var Pi=U(),Qu=(e,t,s)=>(e=new Pi(e,s),t=new Pi(t,s),e.intersects(t,s));xi.exports=Qu});var Fi=m(function(E0,ji){var zu=Be(),Zu=B();ji.exports=(e,t,s)=>{let r=[],n=null,i=null,o=e.sort((d,f)=>Zu(d,f,s));for(let d of o)if(zu(d,t,s)){if(i=d,!n)n=d}else{if(i)r.push([n,i]);i=null,n=null}if(n)r.push([n,null]);let a=[];for(let[d,f]of r)if(d===f)a.push(d);else if(!f&&d===o[0])a.push("*");else if(!f)a.push(`>=${d}`);else if(d===o[0])a.push(`<=${f}`);else a.push(`${d} - ${f}`);let l=a.join(" || "),c=typeof t.raw==="string"?t.raw:String(t);return l.length<c.length?l:t}});var Yi=m(function(v0,Gi){var Bi=U(),Rs=je(),{ANY:Ds}=Rs,qs=Be(),Cs=B(),ef=(e,t,s={})=>{if(e===t)return!0;e=new Bi(e,s),t=new Bi(t,s);let r=!1;e:for(let n of e.set){for(let i of t.set){let o=sf(n,i,s);if(r=r||o!==null,o)continue e}if(r)return!1}return!0},tf=[new Rs(">=0.0.0-0")],Ui=[new Rs(">=0.0.0")],sf=(e,t,s)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===Ds)if(t.length===1&&t[0].semver===Ds)return!0;else if(s.includePrerelease)e=tf;else e=Ui;if(t.length===1&&t[0].semver===Ds)if(s.includePrerelease)return!0;else t=Ui;let r=new Set,n,i;for(let p of e)if(p.operator===">"||p.operator===">=")n=Ki(n,p,s);else if(p.operator==="<"||p.operator==="<=")i=Vi(i,p,s);else r.add(p.semver);if(r.size>1)return null;let o;if(n&&i){if(o=Cs(n.semver,i.semver,s),o>0)return null;else if(o===0&&(n.operator!==">="||i.operator!=="<="))return null}for(let p of r){if(n&&!qs(p,String(n),s))return null;if(i&&!qs(p,String(i),s))return null;for(let y of t)if(!qs(p,String(y),s))return!1;return!0}let a,l,c,d,f=i&&!s.includePrerelease&&i.semver.prerelease.length?i.semver:!1,u=n&&!s.includePrerelease&&n.semver.prerelease.length?n.semver:!1;if(f&&f.prerelease.length===1&&i.operator==="<"&&f.prerelease[0]===0)f=!1;for(let p of t){if(d=d||p.operator===">"||p.operator===">=",c=c||p.operator==="<"||p.operator==="<=",n){if(u){if(p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===u.major&&p.semver.minor===u.minor&&p.semver.patch===u.patch)u=!1}if(p.operator===">"||p.operator===">="){if(a=Ki(n,p,s),a===p&&a!==n)return!1}else if(n.operator===">="&&!p.test(n.semver))return!1}if(i){if(f){if(p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===f.major&&p.semver.minor===f.minor&&p.semver.patch===f.patch)f=!1}if(p.operator==="<"||p.operator==="<="){if(l=Vi(i,p,s),l===p&&l!==i)return!1}else if(i.operator==="<="&&!p.test(i.semver))return!1}if(!p.operator&&(i||n)&&o!==0)return!1}if(n&&c&&!i&&o!==0)return!1;if(i&&d&&!n&&o!==0)return!1;if(u||f)return!1;return!0},Ki=(e,t,s)=>{if(!e)return t;let r=Cs(e.semver,t.semver,s);return r>0?e:r<0?t:t.operator===">"&&e.operator===">="?t:e},Vi=(e,t,s)=>{if(!e)return t;let r=Cs(e.semver,t.semver,s);return r<0?e:r>0?t:t.operator==="<"&&e.operator==="<="?t:e};Gi.exports=ef});var Wi=m(function(N0,Xi){var Ms=Ne(),Ji=ve(),rf=x(),Hi=vs(),nf=te(),of=yn(),af=Sn(),lf=vn(),cf=kn(),uf=Ln(),ff=In(),pf=Dn(),df=Rn(),hf=B(),mf=xn(),gf=jn(),yf=bt(),bf=Kn(),Sf=Gn(),wf=xe(),Ef=St(),vf=Os(),Nf=ks(),Of=wt(),kf=Et(),Af=As(),Lf=ei(),$f=si(),If=je(),Tf=U(),Df=Be(),qf=bi(),Rf=wi(),Cf=vi(),Mf=ki(),Pf=Li(),xf=kt(),_f=Ri(),jf=Mi(),Ff=_i(),Bf=Fi(),Uf=Yi();Xi.exports={parse:nf,valid:of,clean:af,inc:lf,diff:cf,major:uf,minor:ff,patch:pf,prerelease:df,compare:hf,rcompare:mf,compareLoose:gf,compareBuild:yf,sort:bf,rsort:Sf,gt:wf,lt:Ef,eq:vf,neq:Nf,gte:Of,lte:kf,cmp:Af,coerce:Lf,truncate:$f,Comparator:If,Range:Tf,satisfies:Df,toComparators:qf,maxSatisfying:Rf,minSatisfying:Cf,minVersion:Mf,validRange:Pf,outside:xf,gtr:_f,ltr:jf,intersects:Ff,simplifyRange:Bf,subset:Uf,SemVer:rf,re:Ms.re,src:Ms.src,tokens:Ms.t,SEMVER_SPEC_VERSION:Ji.SEMVER_SPEC_VERSION,RELEASE_TYPES:Ji.RELEASE_TYPES,compareIdentifiers:Hi.compareIdentifiers,rcompareIdentifiers:Hi.rcompareIdentifiers}});var I=m(function(zf){var Ps=Symbol.for("yaml.alias"),eo=Symbol.for("yaml.document"),At=Symbol.for("yaml.map"),to=Symbol.for("yaml.pair"),xs=Symbol.for("yaml.scalar"),Lt=Symbol.for("yaml.seq"),Q=Symbol.for("yaml.node.type"),Gf=(e)=>!!e&&typeof e==="object"&&e[Q]===Ps,Yf=(e)=>!!e&&typeof e==="object"&&e[Q]===eo,Jf=(e)=>!!e&&typeof e==="object"&&e[Q]===At,Hf=(e)=>!!e&&typeof e==="object"&&e[Q]===to,so=(e)=>!!e&&typeof e==="object"&&e[Q]===xs,Xf=(e)=>!!e&&typeof e==="object"&&e[Q]===Lt;function ro(e){if(e&&typeof e==="object")switch(e[Q]){case At:case Lt:return!0}return!1}function Wf(e){if(e&&typeof e==="object")switch(e[Q]){case Ps:case At:case xs:case Lt:return!0}return!1}var Qf=(e)=>(so(e)||ro(e))&&!!e.anchor;zf.ALIAS=Ps;zf.DOC=eo;zf.MAP=At;zf.NODE_TYPE=Q;zf.PAIR=to;zf.SCALAR=xs;zf.SEQ=Lt;zf.hasAnchor=Qf;zf.isAlias=Gf;zf.isCollection=ro;zf.isDocument=Yf;zf.isMap=Jf;zf.isNode=Wf;zf.isPair=Hf;zf.isScalar=so;zf.isSeq=Xf});var Ue=m(function(mp){var P=I(),F=Symbol("break visit"),no=Symbol("skip children"),X=Symbol("remove node");function $t(e,t){let s=io(t);if(P.isDocument(e)){if(Oe(null,e.contents,s,Object.freeze([e]))===X)e.contents=null}else Oe(null,e,s,Object.freeze([]))}$t.BREAK=F;$t.SKIP=no;$t.REMOVE=X;function Oe(e,t,s,r){let n=oo(e,t,s,r);if(P.isNode(n)||P.isPair(n))return ao(e,r,n),Oe(e,n,s,r);if(typeof n!=="symbol"){if(P.isCollection(t)){r=Object.freeze(r.concat(t));for(let i=0;i<t.items.length;++i){let o=Oe(i,t.items[i],s,r);if(typeof o==="number")i=o-1;else if(o===F)return F;else if(o===X)t.items.splice(i,1),i-=1}}else if(P.isPair(t)){r=Object.freeze(r.concat(t));let i=Oe("key",t.key,s,r);if(i===F)return F;else if(i===X)t.key=null;let o=Oe("value",t.value,s,r);if(o===F)return F;else if(o===X)t.value=null}}return n}async function It(e,t){let s=io(t);if(P.isDocument(e)){if(await ke(null,e.contents,s,Object.freeze([e]))===X)e.contents=null}else await ke(null,e,s,Object.freeze([]))}It.BREAK=F;It.SKIP=no;It.REMOVE=X;async function ke(e,t,s,r){let n=await oo(e,t,s,r);if(P.isNode(n)||P.isPair(n))return ao(e,r,n),ke(e,n,s,r);if(typeof n!=="symbol"){if(P.isCollection(t)){r=Object.freeze(r.concat(t));for(let i=0;i<t.items.length;++i){let o=await ke(i,t.items[i],s,r);if(typeof o==="number")i=o-1;else if(o===F)return F;else if(o===X)t.items.splice(i,1),i-=1}}else if(P.isPair(t)){r=Object.freeze(r.concat(t));let i=await ke("key",t.key,s,r);if(i===F)return F;else if(i===X)t.key=null;let o=await ke("value",t.value,s,r);if(o===F)return F;else if(o===X)t.value=null}}return n}function io(e){if(typeof e==="object"&&(e.Collection||e.Node||e.Value))return Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e);return e}function oo(e,t,s,r){if(typeof s==="function")return s(e,t,r);if(P.isMap(t))return s.Map?.(e,t,r);if(P.isSeq(t))return s.Seq?.(e,t,r);if(P.isPair(t))return s.Pair?.(e,t,r);if(P.isScalar(t))return s.Scalar?.(e,t,r);if(P.isAlias(t))return s.Alias?.(e,t,r);return}function ao(e,t,s){let r=t[t.length-1];if(P.isCollection(r))r.items[e]=s;else if(P.isPair(r))if(e==="key")r.key=s;else r.value=s;else if(P.isDocument(r))r.contents=s;else{let n=P.isAlias(r)?"alias":"scalar";throw Error(`Cannot replace node with ${n} parent`)}}mp.visit=$t;mp.visitAsync=It});var _s=m(function(Ep){var lo=I(),bp=Ue(),Sp={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},wp=(e)=>e.replace(/[!,[\]{}]/g,(t)=>Sp[t]);class K{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},K.defaultYaml,e),this.tags=Object.assign({},K.defaultTags,t)}clone(){let e=new K(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new K(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:K.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},K.defaultTags);break}return e}add(e,t){if(this.atNextDocument)this.yaml={explicit:K.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},K.defaultTags),this.atNextDocument=!1;let s=e.trim().split(/[ \t]+/),r=s.shift();switch(r){case"%TAG":{if(s.length!==2){if(t(0,"%TAG directive should contain exactly two parts"),s.length<2)return!1}let[n,i]=s;return this.tags[n]=i,!0}case"%YAML":{if(this.yaml.explicit=!0,s.length!==1)return t(0,"%YAML directive should contain exactly one part"),!1;let[n]=s;if(n==="1.1"||n==="1.2")return this.yaml.version=n,!0;else{let i=/^\d+\.\d+$/.test(n);return t(6,`Unsupported YAML version ${n}`,i),!1}}default:return t(0,`Unknown directive ${r}`,!0),!1}}tagName(e,t){if(e==="!")return"!";if(e[0]!=="!")return t(`Not a valid tag: ${e}`),null;if(e[1]==="<"){let i=e.slice(2,-1);if(i==="!"||i==="!!")return t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null;if(e[e.length-1]!==">")t("Verbatim tags must end with a >");return i}let[,s,r]=e.match(/^(.*!)([^!]*)$/s);if(!r)t(`The ${e} tag has no suffix`);let n=this.tags[s];if(n)try{return n+decodeURIComponent(r)}catch(i){return t(String(i)),null}if(s==="!")return e;return t(`Could not resolve tag: ${e}`),null}tagString(e){for(let[t,s]of Object.entries(this.tags))if(e.startsWith(s))return t+wp(e.substring(s.length));return e[0]==="!"?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],s=Object.entries(this.tags),r;if(e&&s.length>0&&lo.isNode(e.contents)){let n={};bp.visit(e.contents,(i,o)=>{if(lo.isNode(o)&&o.tag)n[o.tag]=!0}),r=Object.keys(n)}else r=[];for(let[n,i]of s){if(n==="!!"&&i==="tag:yaml.org,2002:")continue;if(!e||r.some((o)=>o.startsWith(i)))t.push(`%TAG ${n} ${i}`)}return t.join(`
3
- `)}}K.defaultYaml={explicit:!1,version:"1.2"};K.defaultTags={"!!":"tag:yaml.org,2002:"};Ep.Directives=K});var Tt=m(function(Ap){var co=I(),Np=Ue();function Op(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let s=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw Error(s)}return!0}function uo(e){let t=new Set;return Np.visit(e,{Value(s,r){if(r.anchor)t.add(r.anchor)}}),t}function fo(e,t){for(let s=1;;++s){let r=`${e}${s}`;if(!t.has(r))return r}}function kp(e,t){let s=[],r=new Map,n=null;return{onAnchor:(i)=>{s.push(i),n??(n=uo(e));let o=fo(t,n);return n.add(o),o},setAnchors:()=>{for(let i of s){let o=r.get(i);if(typeof o==="object"&&o.anchor&&(co.isScalar(o.node)||co.isCollection(o.node)))o.node.anchor=o.anchor;else{let a=Error("Failed to resolve repeated object (this should not happen)");throw a.source=i,a}}},sourceObjects:r}}Ap.anchorIsValid=Op;Ap.anchorNames=uo;Ap.createNodeAnchors=kp;Ap.findNewAnchor=fo});var js=m(function(Dp){function Ke(e,t,s,r){if(r&&typeof r==="object")if(Array.isArray(r))for(let n=0,i=r.length;n<i;++n){let o=r[n],a=Ke(e,r,String(n),o);if(a===void 0)delete r[n];else if(a!==o)r[n]=a}else if(r instanceof Map)for(let n of Array.from(r.keys())){let i=r.get(n),o=Ke(e,r,n,i);if(o===void 0)r.delete(n);else if(o!==i)r.set(n,o)}else if(r instanceof Set)for(let n of Array.from(r)){let i=Ke(e,r,n,n);if(i===void 0)r.delete(n);else if(i!==n)r.delete(n),r.add(i)}else for(let[n,i]of Object.entries(r)){let o=Ke(e,r,n,i);if(o===void 0)delete r[n];else if(o!==i)r[n]=o}return e.call(t,s,r)}Dp.applyReviver=Ke});var se=m(function(Cp){var Rp=I();function po(e,t,s){if(Array.isArray(e))return e.map((r,n)=>po(r,String(n),s));if(e&&typeof e.toJSON==="function"){if(!s||!Rp.hasAnchor(e))return e.toJSON(t,s);let r={aliasCount:0,count:1,res:void 0};s.anchors.set(e,r),s.onCreate=(i)=>{r.res=i,delete s.onCreate};let n=e.toJSON(t,s);if(s.onCreate)s.onCreate(n);return n}if(typeof e==="bigint"&&!s?.keep)return Number(e);return e}Cp.toJS=po});var Dt=m(function(_p){var Pp=js(),ho=I(),xp=se();class mo{constructor(e){Object.defineProperty(this,ho.NODE_TYPE,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(this.range)e.range=this.range.slice();return e}toJS(e,{mapAsMap:t,maxAliasCount:s,onAnchor:r,reviver:n}={}){if(!ho.isDocument(e))throw TypeError("A document argument is required");let i={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof s==="number"?s:100},o=xp.toJS(this,"",i);if(typeof r==="function")for(let{count:a,res:l}of i.anchors.values())r(l,a);return typeof n==="function"?Pp.applyReviver(n,{"":o},"",o):o}}_p.NodeBase=mo});var Ve=m(function(Vp){var Fp=Tt(),Bp=Ue(),Ae=I(),Up=Dt(),Kp=se();class go extends Up.NodeBase{constructor(e){super(Ae.ALIAS);this.source=e,Object.defineProperty(this,"tag",{set(){throw Error("Alias nodes cannot have tags")}})}resolve(e,t){if(t?.maxAliasCount===0)throw ReferenceError("Alias resolution is disabled");let s;if(t?.aliasResolveCache)s=t.aliasResolveCache;else if(s=[],Bp.visit(e,{Node:(n,i)=>{if(Ae.isAlias(i)||Ae.hasAnchor(i))s.push(i)}}),t)t.aliasResolveCache=s;let r=void 0;for(let n of s){if(n===this)break;if(n.anchor===this.source)r=n}if(r&&t){let{anchors:n,doc:i,maxAliasCount:o}=t,a=n.get(r);if(!a)Kp.toJS(r,null,t),a=n.get(r);if(a?.res===void 0)throw ReferenceError("This should not happen: Alias anchor was not resolved?");if(o>=0){if(a.count+=1,a.aliasCount===0)a.aliasCount=qt(i,r,n);if(a.count*a.aliasCount>o)throw ReferenceError("Excessive alias count indicates a resource exhaustion attack")}}return r}toJSON(e,t){if(!t)return{source:this.source};let s=this.resolve(t.doc,t);if(!s){let r=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(r)}return t.anchors.get(s).res}toString(e,t,s){let r=`*${this.source}`;if(e){if(Fp.anchorIsValid(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let n=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(n)}if(e.implicitKey)return`${r} `}return r}}function qt(e,t,s){if(Ae.isAlias(t)){let r=t.resolve(e),n=s&&r&&s.get(r);return n?n.count*n.aliasCount:0}else if(Ae.isCollection(t)){let r=0;for(let n of t.items){let i=qt(e,n,s);if(i>r)r=i}return r}else if(Ae.isPair(t)){let r=qt(e,t.key,s),n=qt(e,t.value,s);return Math.max(r,n)}return 1}Vp.Alias=go});var q=m(function(Wp){var Yp=I(),Jp=Dt(),Hp=se(),Xp=(e)=>!e||typeof e!=="function"&&typeof e!=="object";class de extends Jp.NodeBase{constructor(e){super(Yp.SCALAR);this.value=e}toJSON(e,t){return t?.keep?this.value:Hp.toJS(this.value,e,t)}toString(){return String(this.value)}}de.BLOCK_FOLDED="BLOCK_FOLDED";de.BLOCK_LITERAL="BLOCK_LITERAL";de.PLAIN="PLAIN";de.QUOTE_DOUBLE="QUOTE_DOUBLE";de.QUOTE_SINGLE="QUOTE_SINGLE";Wp.Scalar=de;Wp.isScalarValue=Xp});var Ge=m(function(rd){var Zp=Ve(),he=I(),yo=q(),ed="tag:yaml.org,2002:";function td(e,t,s){if(t){let r=s.filter((i)=>i.tag===t),n=r.find((i)=>!i.format)??r[0];if(!n)throw Error(`Tag ${t} not found`);return n}return s.find((r)=>r.identify?.(e)&&!r.format)}function sd(e,t,s){if(he.isDocument(e))e=e.contents;if(he.isNode(e))return e;if(he.isPair(e)){let f=s.schema[he.MAP].createNode?.(s.schema,null,s);return f.items.push(e),f}if(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<"u"&&e instanceof BigInt)e=e.valueOf();let{aliasDuplicateObjects:r,onAnchor:n,onTagObj:i,schema:o,sourceObjects:a}=s,l=void 0;if(r&&e&&typeof e==="object")if(l=a.get(e),l)return l.anchor??(l.anchor=n(e)),new Zp.Alias(l.anchor);else l={anchor:null,node:null},a.set(e,l);if(t?.startsWith("!!"))t=ed+t.slice(2);let c=td(e,t,o.tags);if(!c){if(e&&typeof e.toJSON==="function")e=e.toJSON();if(!e||typeof e!=="object"){let f=new yo.Scalar(e);if(l)l.node=f;return f}c=e instanceof Map?o[he.MAP]:(Symbol.iterator in Object(e))?o[he.SEQ]:o[he.MAP]}if(i)i(c),delete s.onTagObj;let d=c?.createNode?c.createNode(s.schema,e,s):typeof c?.nodeClass?.from==="function"?c.nodeClass.from(s.schema,e,s):new yo.Scalar(e);if(t)d.tag=t;else if(!c.default)d.tag=c.tag;if(l)l.node=d;return d}rd.createNode=sd});var Rt=m(function(ad){var id=Ge(),W=I(),od=Dt();function Fs(e,t,s){let r=s;for(let n=t.length-1;n>=0;--n){let i=t[n];if(typeof i==="number"&&Number.isInteger(i)&&i>=0){let o=[];o[i]=r,r=o}else r=new Map([[i,r]])}return id.createNode(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}var bo=(e)=>e==null||typeof e==="object"&&!!e[Symbol.iterator]().next().done;class So extends od.NodeBase{constructor(e,t){super(e);Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(e)t.schema=e;if(t.items=t.items.map((s)=>W.isNode(s)||W.isPair(s)?s.clone(e):s),this.range)t.range=this.range.slice();return t}addIn(e,t){if(bo(e))this.add(t);else{let[s,...r]=e,n=this.get(s,!0);if(W.isCollection(n))n.addIn(r,t);else if(n===void 0&&this.schema)this.set(s,Fs(this.schema,r,t));else throw Error(`Expected YAML collection at ${s}. Remaining path: ${r}`)}}deleteIn(e){let[t,...s]=e;if(s.length===0)return this.delete(t);let r=this.get(t,!0);if(W.isCollection(r))return r.deleteIn(s);else throw Error(`Expected YAML collection at ${t}. Remaining path: ${s}`)}getIn(e,t){let[s,...r]=e,n=this.get(s,!0);if(r.length===0)return!t&&W.isScalar(n)?n.value:n;else return W.isCollection(n)?n.getIn(r,t):void 0}hasAllNullValues(e){return this.items.every((t)=>{if(!W.isPair(t))return!1;let s=t.value;return s==null||e&&W.isScalar(s)&&s.value==null&&!s.commentBefore&&!s.comment&&!s.tag})}hasIn(e){let[t,...s]=e;if(s.length===0)return this.has(t);let r=this.get(t,!0);return W.isCollection(r)?r.hasIn(s):!1}setIn(e,t){let[s,...r]=e;if(r.length===0)this.set(s,t);else{let n=this.get(s,!0);if(W.isCollection(n))n.setIn(r,t);else if(n===void 0&&this.schema)this.set(s,Fs(this.schema,r,t));else throw Error(`Expected YAML collection at ${s}. Remaining path: ${r}`)}}}ad.Collection=So;ad.collectionFromPath=Fs;ad.isEmptyPath=bo});var Ye=m(function(dd){var fd=(e)=>e.replace(/^(?!$)(?: $)?/gm,"#");function Bs(e,t){if(/^\n+$/.test(e))return e.substring(1);return t?e.replace(/^(?! *$)/gm,t):e}var pd=(e,t,s)=>e.endsWith(`
4
- `)?Bs(s,t):s.includes(`
2
+ var ql=Object.create;var{getPrototypeOf:Rl,defineProperty:nn,getOwnPropertyNames:Cl}=Object;var on=Object.prototype.hasOwnProperty;function Ml(e){return this[e]}var Pl,xl,_l=(e,t,s)=>{var r=e!=null&&typeof e==="object";if(r){var n=t?Pl??=new WeakMap:xl??=new WeakMap,i=n.get(e);if(i)return i}s=e!=null?ql(Rl(e)):{};let o=t||!e||!e.__esModule||!on.call(e,"default")?nn(s,"default",{value:e,enumerable:!0}):s;if(e&&typeof e==="object"||typeof e==="function"){for(let a of Cl(e))if(!on.call(o,a))nn(o,a,{get:Ml.bind(e,a),enumerable:!0})}if(r)n.set(e,o);return o};var m=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var dt=import.meta.require;var ve=m(function(RE,an){var jl=Number.MAX_SAFE_INTEGER||9007199254740991,Fl=["major","premajor","minor","preminor","patch","prepatch","prerelease"];an.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:jl,RELEASE_TYPES:Fl,SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var xe=m(function(CE,ln){var Bl=typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};ln.exports=Bl});var Ne=m(function(H,cn){var{MAX_SAFE_COMPONENT_LENGTH:Os,MAX_SAFE_BUILD_LENGTH:Ul,MAX_LENGTH:Kl}=ve(),Vl=xe();H=cn.exports={};var Gl=H.re=[],Yl=H.safeRe=[],b=H.src=[],Jl=H.safeSrc=[],S=H.t={},Hl=0,ks="[a-zA-Z0-9-]",Xl=[["\\s",1],["\\d",Kl],[ks,Ul]],Wl=(e)=>{for(let[t,s]of Xl)e=e.split(`${t}*`).join(`${t}{0,${s}}`).split(`${t}+`).join(`${t}{1,${s}}`);return e},A=(e,t,s)=>{let r=Wl(t),n=Hl++;Vl(e,n,t),S[e]=n,b[n]=t,Jl[n]=r,Gl[n]=new RegExp(t,s?"g":void 0),Yl[n]=new RegExp(r,s?"g":void 0)};A("NUMERICIDENTIFIER","0|[1-9]\\d*");A("NUMERICIDENTIFIERLOOSE","\\d+");A("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${ks}*`);A("MAINVERSION",`(${b[S.NUMERICIDENTIFIER]})\\.(${b[S.NUMERICIDENTIFIER]})\\.(${b[S.NUMERICIDENTIFIER]})`);A("MAINVERSIONLOOSE",`(${b[S.NUMERICIDENTIFIERLOOSE]})\\.(${b[S.NUMERICIDENTIFIERLOOSE]})\\.(${b[S.NUMERICIDENTIFIERLOOSE]})`);A("PRERELEASEIDENTIFIER",`(?:${b[S.NONNUMERICIDENTIFIER]}|${b[S.NUMERICIDENTIFIER]})`);A("PRERELEASEIDENTIFIERLOOSE",`(?:${b[S.NONNUMERICIDENTIFIER]}|${b[S.NUMERICIDENTIFIERLOOSE]})`);A("PRERELEASE",`(?:-(${b[S.PRERELEASEIDENTIFIER]}(?:\\.${b[S.PRERELEASEIDENTIFIER]})*))`);A("PRERELEASELOOSE",`(?:-?(${b[S.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${b[S.PRERELEASEIDENTIFIERLOOSE]})*))`);A("BUILDIDENTIFIER",`${ks}+`);A("BUILD",`(?:\\+(${b[S.BUILDIDENTIFIER]}(?:\\.${b[S.BUILDIDENTIFIER]})*))`);A("FULLPLAIN",`v?${b[S.MAINVERSION]}${b[S.PRERELEASE]}?${b[S.BUILD]}?`);A("FULL",`^${b[S.FULLPLAIN]}$`);A("LOOSEPLAIN",`[v=\\s]*${b[S.MAINVERSIONLOOSE]}${b[S.PRERELEASELOOSE]}?${b[S.BUILD]}?`);A("LOOSE",`^${b[S.LOOSEPLAIN]}$`);A("GTLT","((?:<|>)?=?)");A("XRANGEIDENTIFIERLOOSE",`${b[S.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);A("XRANGEIDENTIFIER",`${b[S.NUMERICIDENTIFIER]}|x|X|\\*`);A("XRANGEPLAIN",`[v=\\s]*(${b[S.XRANGEIDENTIFIER]})(?:\\.(${b[S.XRANGEIDENTIFIER]})(?:\\.(${b[S.XRANGEIDENTIFIER]})(?:${b[S.PRERELEASE]})?${b[S.BUILD]}?)?)?`);A("XRANGEPLAINLOOSE",`[v=\\s]*(${b[S.XRANGEIDENTIFIERLOOSE]})(?:\\.(${b[S.XRANGEIDENTIFIERLOOSE]})(?:\\.(${b[S.XRANGEIDENTIFIERLOOSE]})(?:${b[S.PRERELEASELOOSE]})?${b[S.BUILD]}?)?)?`);A("XRANGE",`^${b[S.GTLT]}\\s*${b[S.XRANGEPLAIN]}$`);A("XRANGELOOSE",`^${b[S.GTLT]}\\s*${b[S.XRANGEPLAINLOOSE]}$`);A("COERCEPLAIN",`(^|[^\\d])(\\d{1,${Os}})(?:\\.(\\d{1,${Os}}))?(?:\\.(\\d{1,${Os}}))?`);A("COERCE",`${b[S.COERCEPLAIN]}(?:$|[^\\d])`);A("COERCEFULL",b[S.COERCEPLAIN]+`(?:${b[S.PRERELEASE]})?(?:${b[S.BUILD]})?(?:$|[^\\d])`);A("COERCERTL",b[S.COERCE],!0);A("COERCERTLFULL",b[S.COERCEFULL],!0);A("LONETILDE","(?:~>?)");A("TILDETRIM",`(\\s*)${b[S.LONETILDE]}\\s+`,!0);H.tildeTrimReplace="$1~";A("TILDE",`^${b[S.LONETILDE]}${b[S.XRANGEPLAIN]}$`);A("TILDELOOSE",`^${b[S.LONETILDE]}${b[S.XRANGEPLAINLOOSE]}$`);A("LONECARET","(?:\\^)");A("CARETTRIM",`(\\s*)${b[S.LONECARET]}\\s+`,!0);H.caretTrimReplace="$1^";A("CARET",`^${b[S.LONECARET]}${b[S.XRANGEPLAIN]}$`);A("CARETLOOSE",`^${b[S.LONECARET]}${b[S.XRANGEPLAINLOOSE]}$`);A("COMPARATORLOOSE",`^${b[S.GTLT]}\\s*(${b[S.LOOSEPLAIN]})$|^$`);A("COMPARATOR",`^${b[S.GTLT]}\\s*(${b[S.FULLPLAIN]})$|^$`);A("COMPARATORTRIM",`(\\s*)${b[S.GTLT]}\\s*(${b[S.LOOSEPLAIN]}|${b[S.XRANGEPLAIN]})`,!0);H.comparatorTrimReplace="$1$2$3";A("HYPHENRANGE",`^\\s*(${b[S.XRANGEPLAIN]})\\s+-\\s+(${b[S.XRANGEPLAIN]})\\s*$`);A("HYPHENRANGELOOSE",`^\\s*(${b[S.XRANGEPLAINLOOSE]})\\s+-\\s+(${b[S.XRANGEPLAINLOOSE]})\\s*$`);A("STAR","(<|>)?=?\\s*\\*");A("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");A("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var ht=m(function(ME,un){var Ql=Object.freeze({loose:!0}),zl=Object.freeze({}),Zl=(e)=>{if(!e)return zl;if(typeof e!=="object")return Ql;return e};un.exports=Zl});var As=m(function(PE,dn){var fn=/^[0-9]+$/,pn=(e,t)=>{if(typeof e==="number"&&typeof t==="number")return e===t?0:e<t?-1:1;let s=fn.test(e),r=fn.test(t);if(s&&r)e=+e,t=+t;return e===t?0:s&&!r?-1:r&&!s?1:e<t?-1:1},ec=(e,t)=>pn(t,e);dn.exports={compareIdentifiers:pn,rcompareIdentifiers:ec}});var x=m(function(xE,mn){var mt=xe(),{MAX_LENGTH:hn,MAX_SAFE_INTEGER:gt}=ve(),{safeRe:yt,t:bt}=Ne(),tc=ht(),{compareIdentifiers:Ls}=As(),sc=(e,t)=>{let s=t.split(".");if(s.length>e.length)return!1;for(let r=0;r<s.length;r++)if(Ls(e[r],s[r])!==0)return!1;return!0};class G{constructor(e,t){if(t=tc(t),e instanceof G)if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;else e=e.version;else if(typeof e!=="string")throw TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>hn)throw TypeError(`version is longer than ${hn} characters`);mt("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let s=e.trim().match(t.loose?yt[bt.LOOSE]:yt[bt.FULL]);if(!s)throw TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>gt||this.major<0)throw TypeError("Invalid major version");if(this.minor>gt||this.minor<0)throw TypeError("Invalid minor version");if(this.patch>gt||this.patch<0)throw TypeError("Invalid patch version");if(!s[4])this.prerelease=[];else this.prerelease=s[4].split(".").map((r)=>{if(/^[0-9]+$/.test(r)){let n=+r;if(n>=0&&n<gt)return n}return r});this.build=s[5]?s[5].split("."):[],this.format()}format(){if(this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length)this.version+=`-${this.prerelease.join(".")}`;return this.version}toString(){return this.version}compare(e){if(mt("SemVer.compare",this.version,this.options,e),!(e instanceof G)){if(typeof e==="string"&&e===this.version)return 0;e=new G(e,this.options)}if(e.version===this.version)return 0;return this.compareMain(e)||this.comparePre(e)}compareMain(e){if(!(e instanceof G))e=new G(e,this.options);if(this.major<e.major)return-1;if(this.major>e.major)return 1;if(this.minor<e.minor)return-1;if(this.minor>e.minor)return 1;if(this.patch<e.patch)return-1;if(this.patch>e.patch)return 1;return 0}comparePre(e){if(!(e instanceof G))e=new G(e,this.options);if(this.prerelease.length&&!e.prerelease.length)return-1;else if(!this.prerelease.length&&e.prerelease.length)return 1;else if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let s=this.prerelease[t],r=e.prerelease[t];if(mt("prerelease compare",t,s,r),s===void 0&&r===void 0)return 0;else if(r===void 0)return 1;else if(s===void 0)return-1;else if(s===r)continue;else return Ls(s,r)}while(++t)}compareBuild(e){if(!(e instanceof G))e=new G(e,this.options);let t=0;do{let s=this.build[t],r=e.build[t];if(mt("build compare",t,s,r),s===void 0&&r===void 0)return 0;else if(r===void 0)return 1;else if(s===void 0)return-1;else if(s===r)continue;else return Ls(s,r)}while(++t)}inc(e,t,s){if(e.startsWith("pre")){if(!t&&s===!1)throw Error("invalid increment argument: identifier is empty");if(t){let r=`-${t}`.match(this.options.loose?yt[bt.PRERELEASELOOSE]:yt[bt.PRERELEASE]);if(!r||r[1]!==t)throw Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,s);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,s);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,s),this.inc("pre",t,s);break;case"prerelease":if(this.prerelease.length===0)this.inc("patch",t,s);this.inc("pre",t,s);break;case"release":if(this.prerelease.length===0)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":if(this.minor!==0||this.patch!==0||this.prerelease.length===0)this.major++;this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":if(this.patch!==0||this.prerelease.length===0)this.minor++;this.patch=0,this.prerelease=[];break;case"patch":if(this.prerelease.length===0)this.patch++;this.prerelease=[];break;case"pre":{let r=Number(s)?1:0;if(this.prerelease.length===0)this.prerelease=[r];else{let n=this.prerelease.length;while(--n>=0)if(typeof this.prerelease[n]==="number")this.prerelease[n]++,n=-2;if(n===-1){if(t===this.prerelease.join(".")&&s===!1)throw Error("invalid increment argument: identifier already exists");this.prerelease.push(r)}}if(t){let n=[t,r];if(s===!1)n=[t];if(sc(this.prerelease,t)){let i=this.prerelease[t.split(".").length];if(isNaN(i))this.prerelease=n}else this.prerelease=n}break}default:throw Error(`invalid increment argument: ${e}`)}if(this.raw=this.format(),this.build.length)this.raw+=`+${this.build.join(".")}`;return this}}mn.exports=G});var te=m(function(_E,yn){var gn=x(),rc=(e,t,s=!1)=>{if(e instanceof gn)return e;try{return new gn(e,t)}catch(r){if(!s)return null;throw r}};yn.exports=rc});var Sn=m(function(jE,bn){var nc=te(),ic=(e,t)=>{let s=nc(e,t);return s?s.version:null};bn.exports=ic});var En=m(function(FE,wn){var oc=te(),ac=(e,t)=>{let s=oc(e.trim().replace(/^[=v]+/,""),t);return s?s.version:null};wn.exports=ac});var On=m(function(BE,Nn){var vn=x(),lc=(e,t,s,r,n)=>{if(typeof s==="string")n=r,r=s,s=void 0;try{return new vn(e instanceof vn?e.version:e,s).inc(t,r,n).version}catch(i){return null}};Nn.exports=lc});var Ln=m(function(UE,An){var kn=te(),cc=(e,t)=>{let s=kn(e,null,!0),r=kn(t,null,!0),n=s.compare(r);if(n===0)return null;let i=n>0,o=i?s:r,a=i?r:s,l=!!o.prerelease.length;if(!!a.prerelease.length&&!l){if(!a.patch&&!a.minor)return"major";if(a.compareMain(o)===0){if(a.minor&&!a.patch)return"minor";return"patch"}}let d=l?"pre":"";if(s.major!==r.major)return d+"major";if(s.minor!==r.minor)return d+"minor";if(s.patch!==r.patch)return d+"patch";return"prerelease"};An.exports=cc});var In=m(function(KE,$n){var uc=x(),fc=(e,t)=>new uc(e,t).major;$n.exports=fc});var Dn=m(function(VE,Tn){var pc=x(),dc=(e,t)=>new pc(e,t).minor;Tn.exports=dc});var Rn=m(function(GE,qn){var hc=x(),mc=(e,t)=>new hc(e,t).patch;qn.exports=mc});var Mn=m(function(YE,Cn){var gc=te(),yc=(e,t)=>{let s=gc(e,t);return s&&s.prerelease.length?s.prerelease:null};Cn.exports=yc});var B=m(function(JE,xn){var Pn=x(),bc=(e,t,s)=>new Pn(e,s).compare(new Pn(t,s));xn.exports=bc});var jn=m(function(HE,_n){var Sc=B(),wc=(e,t,s)=>Sc(t,e,s);_n.exports=wc});var Bn=m(function(XE,Fn){var Ec=B(),vc=(e,t)=>Ec(e,t,!0);Fn.exports=vc});var St=m(function(WE,Kn){var Un=x(),Nc=(e,t,s)=>{let r=new Un(e,s),n=new Un(t,s);return r.compare(n)||r.compareBuild(n)};Kn.exports=Nc});var Gn=m(function(QE,Vn){var Oc=St(),kc=(e,t)=>e.sort((s,r)=>Oc(s,r,t));Vn.exports=kc});var Jn=m(function(zE,Yn){var Ac=St(),Lc=(e,t)=>e.sort((s,r)=>Ac(r,s,t));Yn.exports=Lc});var _e=m(function(ZE,Hn){var $c=B(),Ic=(e,t,s)=>$c(e,t,s)>0;Hn.exports=Ic});var wt=m(function(e0,Xn){var Tc=B(),Dc=(e,t,s)=>Tc(e,t,s)<0;Xn.exports=Dc});var $s=m(function(t0,Wn){var qc=B(),Rc=(e,t,s)=>qc(e,t,s)===0;Wn.exports=Rc});var Is=m(function(s0,Qn){var Cc=B(),Mc=(e,t,s)=>Cc(e,t,s)!==0;Qn.exports=Mc});var Et=m(function(r0,zn){var Pc=B(),xc=(e,t,s)=>Pc(e,t,s)>=0;zn.exports=xc});var vt=m(function(n0,Zn){var _c=B(),jc=(e,t,s)=>_c(e,t,s)<=0;Zn.exports=jc});var Ts=m(function(i0,ei){var Fc=$s(),Bc=Is(),Uc=_e(),Kc=Et(),Vc=wt(),Gc=vt(),Yc=(e,t,s,r)=>{switch(t){case"===":if(typeof e==="object")e=e.version;if(typeof s==="object")s=s.version;return e===s;case"!==":if(typeof e==="object")e=e.version;if(typeof s==="object")s=s.version;return e!==s;case"":case"=":case"==":return Fc(e,s,r);case"!=":return Bc(e,s,r);case">":return Uc(e,s,r);case">=":return Kc(e,s,r);case"<":return Vc(e,s,r);case"<=":return Gc(e,s,r);default:throw TypeError(`Invalid operator: ${t}`)}};ei.exports=Yc});var si=m(function(o0,ti){var Jc=x(),Hc=te(),{safeRe:Nt,t:Ot}=Ne(),Xc=(e,t)=>{if(e instanceof Jc)return e;if(typeof e==="number")e=String(e);if(typeof e!=="string")return null;t=t||{};let s=null;if(!t.rtl)s=e.match(t.includePrerelease?Nt[Ot.COERCEFULL]:Nt[Ot.COERCE]);else{let l=t.includePrerelease?Nt[Ot.COERCERTLFULL]:Nt[Ot.COERCERTL],c;while((c=l.exec(e))&&(!s||s.index+s[0].length!==e.length)){if(!s||c.index+c[0].length!==s.index+s[0].length)s=c;l.lastIndex=c.index+c[1].length+c[2].length}l.lastIndex=-1}if(s===null)return null;let r=s[2],n=s[3]||"0",i=s[4]||"0",o=t.includePrerelease&&s[5]?`-${s[5]}`:"",a=t.includePrerelease&&s[6]?`+${s[6]}`:"";return Hc(`${r}.${n}.${i}${o}${a}`,t)};ti.exports=Xc});var ii=m(function(a0,ni){var Wc=te(),ri=ve(),Qc=x(),zc=(e,t,s)=>{if(!ri.RELEASE_TYPES.includes(t))return null;let r=Zc(e,s);return r&&eu(r,t)},Zc=(e,t)=>{let s=e instanceof Qc?e.version:e;return Wc(s,t)},eu=(e,t)=>{if(tu(t))return e.version;switch(e.prerelease=[],t){case"major":e.minor=0,e.patch=0;break;case"minor":e.patch=0;break}return e.format()},tu=(e)=>e.startsWith("pre");ni.exports=zc});var li=m(function(l0,ai){class oi{constructor(){this.max=1000,this.map=new Map}get(e){let t=this.map.get(e);if(t===void 0)return;else return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){let r=this.map.keys().next().value;this.delete(r)}this.map.set(e,t)}return this}}ai.exports=oi});var U=m(function(c0,pi){var su=/\s+/g;class je{constructor(e,t){if(t=nu(t),e instanceof je)if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;else return new je(e.raw,t);if(e instanceof kt)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(su," "),this.set=this.raw.split("||").map((s)=>this.parseRange(s.trim())).filter((s)=>s.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let s=this.set[0];if(this.set=this.set.filter((r)=>!ui(r[0])),this.set.length===0)this.set=[s];else if(this.set.length>1){for(let r of this.set)if(r.length===1&&du(r[0])){this.set=[r];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e<this.set.length;e++){if(e>0)this.formatted+="||";let t=this.set[e];for(let s=0;s<t.length;s++){if(s>0)this.formatted+=" ";this.formatted+=t[s].toString().trim()}}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){e=e.replace(pu,"");let s=((this.options.includePrerelease&&uu)|(this.options.loose&&fu))+":"+e,r=ci.get(s);if(r)return r;let n=this.options.loose,i=n?j[_.HYPHENRANGELOOSE]:j[_.HYPHENRANGE];e=e.replace(i,Ou(this.options.includePrerelease)),D("hyphen replace",e),e=e.replace(j[_.COMPARATORTRIM],au),D("comparator trim",e),e=e.replace(j[_.TILDETRIM],lu),D("tilde trim",e),e=e.replace(j[_.CARETTRIM],cu),D("caret trim",e);let o=e.split(" ").map((d)=>hu(d,this.options)).join(" ").split(/\s+/).map((d)=>Nu(d,this.options));if(n)o=o.filter((d)=>(D("loose invalid filter",d,this.options),!!d.match(j[_.COMPARATORLOOSE])));D("range list",o);let a=new Map,l=o.map((d)=>new kt(d,this.options));for(let d of l){if(ui(d))return[d];a.set(d.value,d)}if(a.size>1&&a.has(""))a.delete("");let c=[...a.values()];return ci.set(s,c),c}intersects(e,t){if(!(e instanceof je))throw TypeError("a Range is required");return this.set.some((s)=>fi(s,t)&&e.set.some((r)=>fi(r,t)&&s.every((n)=>r.every((i)=>n.intersects(i,t)))))}test(e){if(!e)return!1;if(typeof e==="string")try{e=new iu(e,this.options)}catch(t){return!1}for(let t=0;t<this.set.length;t++)if(ku(this.set[t],e,this.options))return!0;return!1}}pi.exports=je;var ru=li(),ci=new ru,nu=ht(),kt=Fe(),D=xe(),iu=x(),{safeRe:j,src:ou,t:_,comparatorTrimReplace:au,tildeTrimReplace:lu,caretTrimReplace:cu}=Ne(),{FLAG_INCLUDE_PRERELEASE:uu,FLAG_LOOSE:fu}=ve(),pu=new RegExp(ou[_.BUILD],"g"),ui=(e)=>e.value==="<0.0.0-0",du=(e)=>e.value==="",fi=(e,t)=>{let s=!0,r=e.slice(),n=r.pop();while(s&&r.length)s=r.every((i)=>n.intersects(i,t)),n=r.pop();return s},hu=(e,t)=>(e=e.replace(j[_.BUILD],""),D("comp",e,t),e=bu(e,t),D("caret",e),e=gu(e,t),D("tildes",e),e=wu(e,t),D("xrange",e),e=vu(e,t),D("stars",e),e),M=(e)=>!e||e.toLowerCase()==="x"||e==="*",mu=(e,t,s)=>M(e)&&!M(t)||M(t)&&s&&!M(s),gu=(e,t)=>e.trim().split(/\s+/).map((s)=>yu(s,t)).join(" "),yu=(e,t)=>{let s=t.loose?j[_.TILDELOOSE]:j[_.TILDE],r=t.includePrerelease?"-0":"";return e.replace(s,(n,i,o,a,l)=>{D("tilde",e,n,i,o,a,l);let c;if(M(i))c="";else if(M(o))c=`>=${i}.0.0${r} <${+i+1}.0.0-0`;else if(M(a))c=`>=${i}.${o}.0${r} <${i}.${+o+1}.0-0`;else if(l)D("replaceTilde pr",l),c=`>=${i}.${o}.${a}-${l} <${i}.${+o+1}.0-0`;else c=`>=${i}.${o}.${a} <${i}.${+o+1}.0-0`;return D("tilde return",c),c})},bu=(e,t)=>e.trim().split(/\s+/).map((s)=>Su(s,t)).join(" "),Su=(e,t)=>{D("caret",e,t);let s=t.loose?j[_.CARETLOOSE]:j[_.CARET],r=t.includePrerelease?"-0":"";return e.replace(s,(n,i,o,a,l)=>{D("caret",e,n,i,o,a,l);let c;if(M(i))c="";else if(M(o))c=`>=${i}.0.0${r} <${+i+1}.0.0-0`;else if(M(a))if(i==="0")c=`>=${i}.${o}.0${r} <${i}.${+o+1}.0-0`;else c=`>=${i}.${o}.0${r} <${+i+1}.0.0-0`;else if(l)if(D("replaceCaret pr",l),i==="0")if(o==="0")c=`>=${i}.${o}.${a}-${l} <${i}.${o}.${+a+1}-0`;else c=`>=${i}.${o}.${a}-${l} <${i}.${+o+1}.0-0`;else c=`>=${i}.${o}.${a}-${l} <${+i+1}.0.0-0`;else if(D("no pr"),i==="0")if(o==="0")c=`>=${i}.${o}.${a} <${i}.${o}.${+a+1}-0`;else c=`>=${i}.${o}.${a} <${i}.${+o+1}.0-0`;else c=`>=${i}.${o}.${a} <${+i+1}.0.0-0`;return D("caret return",c),c})},wu=(e,t)=>(D("replaceXRanges",e,t),e.split(/\s+/).map((s)=>Eu(s,t)).join(" ")),Eu=(e,t)=>{e=e.trim();let s=t.loose?j[_.XRANGELOOSE]:j[_.XRANGE];return e.replace(s,(r,n,i,o,a,l)=>{if(D("xRange",e,r,n,i,o,a,l),mu(i,o,a))return e;let c=M(i),d=c||M(o),f=d||M(a),u=f;if(n==="="&&u)n="";if(l=t.includePrerelease?"-0":"",c)if(n===">"||n==="<")r="<0.0.0-0";else r="*";else if(n&&u){if(d)o=0;if(a=0,n===">")if(n=">=",d)i=+i+1,o=0,a=0;else o=+o+1,a=0;else if(n==="<=")if(n="<",d)i=+i+1;else o=+o+1;if(n==="<")l="-0";r=`${n+i}.${o}.${a}${l}`}else if(d)r=`>=${i}.0.0${l} <${+i+1}.0.0-0`;else if(f)r=`>=${i}.${o}.0${l} <${i}.${+o+1}.0-0`;return D("xRange return",r),r})},vu=(e,t)=>(D("replaceStars",e,t),e.trim().replace(j[_.STAR],"")),Nu=(e,t)=>(D("replaceGTE0",e,t),e.trim().replace(j[t.includePrerelease?_.GTE0PRE:_.GTE0],"")),Ou=(e)=>(t,s,r,n,i,o,a,l,c,d,f,u)=>{if(M(r))s="";else if(M(n))s=`>=${r}.0.0${e?"-0":""}`;else if(M(i))s=`>=${r}.${n}.0${e?"-0":""}`;else if(o)s=`>=${s}`;else s=`>=${s}${e?"-0":""}`;if(M(c))l="";else if(M(d))l=`<${+c+1}.0.0-0`;else if(M(f))l=`<${c}.${+d+1}.0-0`;else if(u)l=`<=${c}.${d}.${f}-${u}`;else if(e)l=`<${c}.${d}.${+f+1}-0`;else l=`<=${l}`;return`${s} ${l}`.trim()},ku=(e,t,s)=>{for(let r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!s.includePrerelease){for(let r=0;r<e.length;r++){if(D(e[r].semver),e[r].semver===kt.ANY)continue;if(e[r].semver.prerelease.length>0){let n=e[r].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}}return!1}return!0}});var Fe=m(function(u0,bi){var Be=Symbol("SemVer ANY");class At{static get ANY(){return Be}constructor(e,t){if(t=di(t),e instanceof At)if(e.loose===!!t.loose)return e;else e=e.value;if(e=e.trim().split(/\s+/).join(" "),qs("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===Be)this.value="";else this.value=this.operator+this.semver.version;qs("comp",this)}parse(e){let t=this.options.loose?hi[mi.COMPARATORLOOSE]:hi[mi.COMPARATOR],s=e.match(t);if(!s)throw TypeError(`Invalid comparator: ${e}`);if(this.operator=s[1]!==void 0?s[1]:"",this.operator==="=")this.operator="";if(!s[2])this.semver=Be;else this.semver=new gi(s[2],this.options.loose)}toString(){return this.value}test(e){if(qs("Comparator.test",e,this.options.loose),this.semver===Be||e===Be)return!0;if(typeof e==="string")try{e=new gi(e,this.options)}catch(t){return!1}return Ds(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof At))throw TypeError("a Comparator is required");if(this.operator===""){if(this.value==="")return!0;return new yi(e.value,t).test(this.value)}else if(e.operator===""){if(e.value==="")return!0;return new yi(this.value,t).test(e.semver)}if(t=di(t),t.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0"))return!1;if(!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))return!1;if(this.operator.startsWith(">")&&e.operator.startsWith(">"))return!0;if(this.operator.startsWith("<")&&e.operator.startsWith("<"))return!0;if(this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("="))return!0;if(Ds(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))return!0;if(Ds(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">"))return!0;return!1}}bi.exports=At;var di=ht(),{safeRe:hi,t:mi}=Ne(),Ds=Ts(),qs=xe(),gi=x(),yi=U()});var Ue=m(function(f0,Si){var Au=U(),Lu=(e,t,s)=>{try{t=new Au(t,s)}catch(r){return!1}return t.test(e)};Si.exports=Lu});var Ei=m(function(p0,wi){var $u=U(),Iu=(e,t)=>new $u(e,t).set.map((s)=>s.map((r)=>r.value).join(" ").trim().split(" "));wi.exports=Iu});var Ni=m(function(d0,vi){var Tu=x(),Du=U(),qu=(e,t,s)=>{let r=null,n=null,i=null;try{i=new Du(t,s)}catch(o){return null}return e.forEach((o)=>{if(i.test(o)){if(!r||n.compare(o)===-1)r=o,n=new Tu(r,s)}}),r};vi.exports=qu});var ki=m(function(h0,Oi){var Ru=x(),Cu=U(),Mu=(e,t,s)=>{let r=null,n=null,i=null;try{i=new Cu(t,s)}catch(o){return null}return e.forEach((o)=>{if(i.test(o)){if(!r||n.compare(o)===1)r=o,n=new Ru(r,s)}}),r};Oi.exports=Mu});var $i=m(function(m0,Li){var Rs=x(),Pu=U(),Ai=_e(),xu=(e,t)=>{e=new Pu(e,t);let s=new Rs("0.0.0");if(e.test(s))return s;if(s=new Rs("0.0.0-0"),e.test(s))return s;s=null;for(let r=0;r<e.set.length;++r){let n=e.set[r],i=null;if(n.forEach((o)=>{let a=new Rs(o.semver.version);switch(o.operator){case">":if(a.prerelease.length===0)a.patch++;else a.prerelease.push(0);a.raw=a.format();case"":case">=":if(!i||Ai(a,i))i=a;break;case"<":case"<=":break;default:throw Error(`Unexpected operation: ${o.operator}`)}}),i&&(!s||Ai(s,i)))s=i}if(s&&e.test(s))return s;return null};Li.exports=xu});var Ti=m(function(g0,Ii){var _u=U(),ju=(e,t)=>{try{return new _u(e,t).range||"*"}catch(s){return null}};Ii.exports=ju});var Lt=m(function(y0,Ci){var Fu=x(),Ri=Fe(),{ANY:Bu}=Ri,Uu=U(),Ku=Ue(),Di=_e(),qi=wt(),Vu=vt(),Gu=Et(),Yu=(e,t,s,r)=>{e=new Fu(e,r),t=new Uu(t,r);let n,i,o,a,l;switch(s){case">":n=Di,i=Vu,o=qi,a=">",l=">=";break;case"<":n=qi,i=Gu,o=Di,a="<",l="<=";break;default:throw TypeError('Must provide a hilo val of "<" or ">"')}if(Ku(e,t,r))return!1;for(let c=0;c<t.set.length;++c){let d=t.set[c],f=null,u=null;if(d.forEach((p)=>{if(p.semver===Bu)p=new Ri(">=0.0.0");if(f=f||p,u=u||p,n(p.semver,f.semver,r))f=p;else if(o(p.semver,u.semver,r))u=p}),f.operator===a||f.operator===l)return!1;if((!u.operator||u.operator===a)&&i(e,u.semver))return!1;else if(u.operator===l&&o(e,u.semver))return!1}return!0};Ci.exports=Yu});var Pi=m(function(b0,Mi){var Ju=Lt(),Hu=(e,t,s)=>Ju(e,t,">",s);Mi.exports=Hu});var _i=m(function(S0,xi){var Xu=Lt(),Wu=(e,t,s)=>Xu(e,t,"<",s);xi.exports=Wu});var Bi=m(function(w0,Fi){var ji=U(),Qu=(e,t,s)=>(e=new ji(e,s),t=new ji(t,s),e.intersects(t,s));Fi.exports=Qu});var Ki=m(function(E0,Ui){var zu=Ue(),Zu=B();Ui.exports=(e,t,s)=>{let r=[],n=null,i=null,o=e.sort((d,f)=>Zu(d,f,s));for(let d of o)if(zu(d,t,s)){if(i=d,!n)n=d}else{if(i)r.push([n,i]);i=null,n=null}if(n)r.push([n,null]);let a=[];for(let[d,f]of r)if(d===f)a.push(d);else if(!f&&d===o[0])a.push("*");else if(!f)a.push(`>=${d}`);else if(d===o[0])a.push(`<=${f}`);else a.push(`${d} - ${f}`);let l=a.join(" || "),c=typeof t.raw==="string"?t.raw:String(t);return l.length<c.length?l:t}});var Xi=m(function(v0,Hi){var Vi=U(),Ps=Fe(),{ANY:Cs}=Ps,Ms=Ue(),xs=B(),ef=(e,t,s={})=>{if(e===t)return!0;e=new Vi(e,s),t=new Vi(t,s);let r=!1;e:for(let n of e.set){for(let i of t.set){let o=sf(n,i,s);if(r=r||o!==null,o)continue e}if(r)return!1}return!0},tf=[new Ps(">=0.0.0-0")],Gi=[new Ps(">=0.0.0")],sf=(e,t,s)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===Cs)if(t.length===1&&t[0].semver===Cs)return!0;else if(s.includePrerelease)e=tf;else e=Gi;if(t.length===1&&t[0].semver===Cs)if(s.includePrerelease)return!0;else t=Gi;let r=new Set,n,i;for(let p of e)if(p.operator===">"||p.operator===">=")n=Yi(n,p,s);else if(p.operator==="<"||p.operator==="<=")i=Ji(i,p,s);else r.add(p.semver);if(r.size>1)return null;let o;if(n&&i){if(o=xs(n.semver,i.semver,s),o>0)return null;else if(o===0&&(n.operator!==">="||i.operator!=="<="))return null}for(let p of r){if(n&&!Ms(p,String(n),s))return null;if(i&&!Ms(p,String(i),s))return null;for(let y of t)if(!Ms(p,String(y),s))return!1;return!0}let a,l,c,d,f=i&&!s.includePrerelease&&i.semver.prerelease.length?i.semver:!1,u=n&&!s.includePrerelease&&n.semver.prerelease.length?n.semver:!1;if(f&&f.prerelease.length===1&&i.operator==="<"&&f.prerelease[0]===0)f=!1;for(let p of t){if(d=d||p.operator===">"||p.operator===">=",c=c||p.operator==="<"||p.operator==="<=",n){if(u){if(p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===u.major&&p.semver.minor===u.minor&&p.semver.patch===u.patch)u=!1}if(p.operator===">"||p.operator===">="){if(a=Yi(n,p,s),a===p&&a!==n)return!1}else if(n.operator===">="&&!p.test(n.semver))return!1}if(i){if(f){if(p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===f.major&&p.semver.minor===f.minor&&p.semver.patch===f.patch)f=!1}if(p.operator==="<"||p.operator==="<="){if(l=Ji(i,p,s),l===p&&l!==i)return!1}else if(i.operator==="<="&&!p.test(i.semver))return!1}if(!p.operator&&(i||n)&&o!==0)return!1}if(n&&c&&!i&&o!==0)return!1;if(i&&d&&!n&&o!==0)return!1;if(u||f)return!1;return!0},Yi=(e,t,s)=>{if(!e)return t;let r=xs(e.semver,t.semver,s);return r>0?e:r<0?t:t.operator===">"&&e.operator===">="?t:e},Ji=(e,t,s)=>{if(!e)return t;let r=xs(e.semver,t.semver,s);return r<0?e:r>0?t:t.operator==="<"&&e.operator==="<="?t:e};Hi.exports=ef});var Qi=m(function(N0,Wi){var Oe=Ne(),$t=ve(),rf=x(),It=As(),nf=te(),of=Sn(),af=En(),lf=On(),cf=Ln(),uf=In(),ff=Dn(),pf=Rn(),df=Mn(),hf=B(),mf=jn(),gf=Bn(),yf=St(),bf=Gn(),Sf=Jn(),wf=_e(),Ef=wt(),vf=$s(),Nf=Is(),Of=Et(),kf=vt(),Af=Ts(),Lf=si(),$f=ii(),If=Fe(),Tf=U(),Df=Ue(),qf=Ei(),Rf=Ni(),Cf=ki(),Mf=$i(),Pf=Ti(),xf=Lt(),_f=Pi(),jf=_i(),Ff=Bi(),Bf=Ki(),Uf=Xi();Wi.exports={parse:nf,valid:of,clean:af,inc:lf,diff:cf,major:uf,minor:ff,patch:pf,prerelease:df,compare:hf,rcompare:mf,compareLoose:gf,compareBuild:yf,sort:bf,rsort:Sf,gt:wf,lt:Ef,eq:vf,neq:Nf,gte:Of,lte:kf,cmp:Af,coerce:Lf,truncate:$f,Comparator:If,Range:Tf,satisfies:Df,toComparators:qf,maxSatisfying:Rf,minSatisfying:Cf,minVersion:Mf,validRange:Pf,outside:xf,gtr:_f,ltr:jf,intersects:Ff,simplifyRange:Bf,subset:Uf,SemVer:rf,re:Oe.re,src:Oe.src,tokens:Oe.t,SEMVER_SPEC_VERSION:$t.SEMVER_SPEC_VERSION,RELEASE_TYPES:$t.RELEASE_TYPES,compareIdentifiers:It.compareIdentifiers,rcompareIdentifiers:It.rcompareIdentifiers}});var I=m(function(zf){var _s=Symbol.for("yaml.alias"),to=Symbol.for("yaml.document"),Tt=Symbol.for("yaml.map"),so=Symbol.for("yaml.pair"),js=Symbol.for("yaml.scalar"),Dt=Symbol.for("yaml.seq"),Q=Symbol.for("yaml.node.type"),Gf=(e)=>!!e&&typeof e==="object"&&e[Q]===_s,Yf=(e)=>!!e&&typeof e==="object"&&e[Q]===to,Jf=(e)=>!!e&&typeof e==="object"&&e[Q]===Tt,Hf=(e)=>!!e&&typeof e==="object"&&e[Q]===so,ro=(e)=>!!e&&typeof e==="object"&&e[Q]===js,Xf=(e)=>!!e&&typeof e==="object"&&e[Q]===Dt;function no(e){if(e&&typeof e==="object")switch(e[Q]){case Tt:case Dt:return!0}return!1}function Wf(e){if(e&&typeof e==="object")switch(e[Q]){case _s:case Tt:case js:case Dt:return!0}return!1}var Qf=(e)=>(ro(e)||no(e))&&!!e.anchor;zf.ALIAS=_s;zf.DOC=to;zf.MAP=Tt;zf.NODE_TYPE=Q;zf.PAIR=so;zf.SCALAR=js;zf.SEQ=Dt;zf.hasAnchor=Qf;zf.isAlias=Gf;zf.isCollection=no;zf.isDocument=Yf;zf.isMap=Jf;zf.isNode=Wf;zf.isPair=Hf;zf.isScalar=ro;zf.isSeq=Xf});var Ke=m(function(mp){var P=I(),F=Symbol("break visit"),io=Symbol("skip children"),X=Symbol("remove node");function qt(e,t){let s=oo(t);if(P.isDocument(e)){if(ke(null,e.contents,s,Object.freeze([e]))===X)e.contents=null}else ke(null,e,s,Object.freeze([]))}qt.BREAK=F;qt.SKIP=io;qt.REMOVE=X;function ke(e,t,s,r){let n=ao(e,t,s,r);if(P.isNode(n)||P.isPair(n))return lo(e,r,n),ke(e,n,s,r);if(typeof n!=="symbol"){if(P.isCollection(t)){r=Object.freeze(r.concat(t));for(let i=0;i<t.items.length;++i){let o=ke(i,t.items[i],s,r);if(typeof o==="number")i=o-1;else if(o===F)return F;else if(o===X)t.items.splice(i,1),i-=1}}else if(P.isPair(t)){r=Object.freeze(r.concat(t));let i=ke("key",t.key,s,r);if(i===F)return F;else if(i===X)t.key=null;let o=ke("value",t.value,s,r);if(o===F)return F;else if(o===X)t.value=null}}return n}async function Rt(e,t){let s=oo(t);if(P.isDocument(e)){if(await Ae(null,e.contents,s,Object.freeze([e]))===X)e.contents=null}else await Ae(null,e,s,Object.freeze([]))}Rt.BREAK=F;Rt.SKIP=io;Rt.REMOVE=X;async function Ae(e,t,s,r){let n=await ao(e,t,s,r);if(P.isNode(n)||P.isPair(n))return lo(e,r,n),Ae(e,n,s,r);if(typeof n!=="symbol"){if(P.isCollection(t)){r=Object.freeze(r.concat(t));for(let i=0;i<t.items.length;++i){let o=await Ae(i,t.items[i],s,r);if(typeof o==="number")i=o-1;else if(o===F)return F;else if(o===X)t.items.splice(i,1),i-=1}}else if(P.isPair(t)){r=Object.freeze(r.concat(t));let i=await Ae("key",t.key,s,r);if(i===F)return F;else if(i===X)t.key=null;let o=await Ae("value",t.value,s,r);if(o===F)return F;else if(o===X)t.value=null}}return n}function oo(e){if(typeof e==="object"&&(e.Collection||e.Node||e.Value))return Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e);return e}function ao(e,t,s,r){if(typeof s==="function")return s(e,t,r);if(P.isMap(t))return s.Map?.(e,t,r);if(P.isSeq(t))return s.Seq?.(e,t,r);if(P.isPair(t))return s.Pair?.(e,t,r);if(P.isScalar(t))return s.Scalar?.(e,t,r);if(P.isAlias(t))return s.Alias?.(e,t,r);return}function lo(e,t,s){let r=t[t.length-1];if(P.isCollection(r))r.items[e]=s;else if(P.isPair(r))if(e==="key")r.key=s;else r.value=s;else if(P.isDocument(r))r.contents=s;else{let n=P.isAlias(r)?"alias":"scalar";throw Error(`Cannot replace node with ${n} parent`)}}mp.visit=qt;mp.visitAsync=Rt});var Fs=m(function(Ep){var co=I(),bp=Ke(),Sp={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},wp=(e)=>e.replace(/[!,[\]{}]/g,(t)=>Sp[t]);class K{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},K.defaultYaml,e),this.tags=Object.assign({},K.defaultTags,t)}clone(){let e=new K(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new K(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:K.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},K.defaultTags);break}return e}add(e,t){if(this.atNextDocument)this.yaml={explicit:K.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},K.defaultTags),this.atNextDocument=!1;let s=e.trim().split(/[ \t]+/),r=s.shift();switch(r){case"%TAG":{if(s.length!==2){if(t(0,"%TAG directive should contain exactly two parts"),s.length<2)return!1}let[n,i]=s;return this.tags[n]=i,!0}case"%YAML":{if(this.yaml.explicit=!0,s.length!==1)return t(0,"%YAML directive should contain exactly one part"),!1;let[n]=s;if(n==="1.1"||n==="1.2")return this.yaml.version=n,!0;else{let i=/^\d+\.\d+$/.test(n);return t(6,`Unsupported YAML version ${n}`,i),!1}}default:return t(0,`Unknown directive ${r}`,!0),!1}}tagName(e,t){if(e==="!")return"!";if(e[0]!=="!")return t(`Not a valid tag: ${e}`),null;if(e[1]==="<"){let i=e.slice(2,-1);if(i==="!"||i==="!!")return t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null;if(e[e.length-1]!==">")t("Verbatim tags must end with a >");return i}let[,s,r]=e.match(/^(.*!)([^!]*)$/s);if(!r)t(`The ${e} tag has no suffix`);let n=this.tags[s];if(n)try{return n+decodeURIComponent(r)}catch(i){return t(String(i)),null}if(s==="!")return e;return t(`Could not resolve tag: ${e}`),null}tagString(e){for(let[t,s]of Object.entries(this.tags))if(e.startsWith(s))return t+wp(e.substring(s.length));return e[0]==="!"?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],s=Object.entries(this.tags),r;if(e&&s.length>0&&co.isNode(e.contents)){let n={};bp.visit(e.contents,(i,o)=>{if(co.isNode(o)&&o.tag)n[o.tag]=!0}),r=Object.keys(n)}else r=[];for(let[n,i]of s){if(n==="!!"&&i==="tag:yaml.org,2002:")continue;if(!e||r.some((o)=>o.startsWith(i)))t.push(`%TAG ${n} ${i}`)}return t.join(`
3
+ `)}}K.defaultYaml={explicit:!1,version:"1.2"};K.defaultTags={"!!":"tag:yaml.org,2002:"};Ep.Directives=K});var Ct=m(function(Ap){var uo=I(),Np=Ke();function Op(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let s=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw Error(s)}return!0}function fo(e){let t=new Set;return Np.visit(e,{Value(s,r){if(r.anchor)t.add(r.anchor)}}),t}function po(e,t){for(let s=1;;++s){let r=`${e}${s}`;if(!t.has(r))return r}}function kp(e,t){let s=[],r=new Map,n=null;return{onAnchor:(i)=>{s.push(i),n??(n=fo(e));let o=po(t,n);return n.add(o),o},setAnchors:()=>{for(let i of s){let o=r.get(i);if(typeof o==="object"&&o.anchor&&(uo.isScalar(o.node)||uo.isCollection(o.node)))o.node.anchor=o.anchor;else{let a=Error("Failed to resolve repeated object (this should not happen)");throw a.source=i,a}}},sourceObjects:r}}Ap.anchorIsValid=Op;Ap.anchorNames=fo;Ap.createNodeAnchors=kp;Ap.findNewAnchor=po});var Bs=m(function(Dp){function Ve(e,t,s,r){if(r&&typeof r==="object")if(Array.isArray(r))for(let n=0,i=r.length;n<i;++n){let o=r[n],a=Ve(e,r,String(n),o);if(a===void 0)delete r[n];else if(a!==o)r[n]=a}else if(r instanceof Map)for(let n of Array.from(r.keys())){let i=r.get(n),o=Ve(e,r,n,i);if(o===void 0)r.delete(n);else if(o!==i)r.set(n,o)}else if(r instanceof Set)for(let n of Array.from(r)){let i=Ve(e,r,n,n);if(i===void 0)r.delete(n);else if(i!==n)r.delete(n),r.add(i)}else for(let[n,i]of Object.entries(r)){let o=Ve(e,r,n,i);if(o===void 0)delete r[n];else if(o!==i)r[n]=o}return e.call(t,s,r)}Dp.applyReviver=Ve});var se=m(function(Cp){var Rp=I();function ho(e,t,s){if(Array.isArray(e))return e.map((r,n)=>ho(r,String(n),s));if(e&&typeof e.toJSON==="function"){if(!s||!Rp.hasAnchor(e))return e.toJSON(t,s);let r={aliasCount:0,count:1,res:void 0};s.anchors.set(e,r),s.onCreate=(i)=>{r.res=i,delete s.onCreate};let n=e.toJSON(t,s);if(s.onCreate)s.onCreate(n);return n}if(typeof e==="bigint"&&!s?.keep)return Number(e);return e}Cp.toJS=ho});var Mt=m(function(_p){var Pp=Bs(),mo=I(),xp=se();class go{constructor(e){Object.defineProperty(this,mo.NODE_TYPE,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(this.range)e.range=this.range.slice();return e}toJS(e,{mapAsMap:t,maxAliasCount:s,onAnchor:r,reviver:n}={}){if(!mo.isDocument(e))throw TypeError("A document argument is required");let i={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof s==="number"?s:100},o=xp.toJS(this,"",i);if(typeof r==="function")for(let{count:a,res:l}of i.anchors.values())r(l,a);return typeof n==="function"?Pp.applyReviver(n,{"":o},"",o):o}}_p.NodeBase=go});var Ge=m(function(Vp){var Fp=Ct(),Bp=Ke(),Le=I(),Up=Mt(),Kp=se();class yo extends Up.NodeBase{constructor(e){super(Le.ALIAS);this.source=e,Object.defineProperty(this,"tag",{set(){throw Error("Alias nodes cannot have tags")}})}resolve(e,t){if(t?.maxAliasCount===0)throw ReferenceError("Alias resolution is disabled");let s;if(t?.aliasResolveCache)s=t.aliasResolveCache;else if(s=[],Bp.visit(e,{Node:(n,i)=>{if(Le.isAlias(i)||Le.hasAnchor(i))s.push(i)}}),t)t.aliasResolveCache=s;let r=void 0;for(let n of s){if(n===this)break;if(n.anchor===this.source)r=n}if(r&&t){let{anchors:n,doc:i,maxAliasCount:o}=t,a=n.get(r);if(!a)Kp.toJS(r,null,t),a=n.get(r);if(a?.res===void 0)throw ReferenceError("This should not happen: Alias anchor was not resolved?");if(o>=0){if(a.count+=1,a.aliasCount===0)a.aliasCount=Pt(i,r,n);if(a.count*a.aliasCount>o)throw ReferenceError("Excessive alias count indicates a resource exhaustion attack")}}return r}toJSON(e,t){if(!t)return{source:this.source};let s=this.resolve(t.doc,t);if(!s){let r=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(r)}return t.anchors.get(s).res}toString(e,t,s){let r=`*${this.source}`;if(e){if(Fp.anchorIsValid(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let n=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(n)}if(e.implicitKey)return`${r} `}return r}}function Pt(e,t,s){if(Le.isAlias(t)){let r=t.resolve(e),n=s&&r&&s.get(r);return n?n.count*n.aliasCount:0}else if(Le.isCollection(t)){let r=0;for(let n of t.items){let i=Pt(e,n,s);if(i>r)r=i}return r}else if(Le.isPair(t)){let r=Pt(e,t.key,s),n=Pt(e,t.value,s);return Math.max(r,n)}return 1}Vp.Alias=yo});var q=m(function(Wp){var Yp=I(),Jp=Mt(),Hp=se(),Xp=(e)=>!e||typeof e!=="function"&&typeof e!=="object";class de extends Jp.NodeBase{constructor(e){super(Yp.SCALAR);this.value=e}toJSON(e,t){return t?.keep?this.value:Hp.toJS(this.value,e,t)}toString(){return String(this.value)}}de.BLOCK_FOLDED="BLOCK_FOLDED";de.BLOCK_LITERAL="BLOCK_LITERAL";de.PLAIN="PLAIN";de.QUOTE_DOUBLE="QUOTE_DOUBLE";de.QUOTE_SINGLE="QUOTE_SINGLE";Wp.Scalar=de;Wp.isScalarValue=Xp});var Ye=m(function(rd){var Zp=Ge(),he=I(),bo=q(),ed="tag:yaml.org,2002:";function td(e,t,s){if(t){let r=s.filter((i)=>i.tag===t),n=r.find((i)=>!i.format)??r[0];if(!n)throw Error(`Tag ${t} not found`);return n}return s.find((r)=>r.identify?.(e)&&!r.format)}function sd(e,t,s){if(he.isDocument(e))e=e.contents;if(he.isNode(e))return e;if(he.isPair(e)){let f=s.schema[he.MAP].createNode?.(s.schema,null,s);return f.items.push(e),f}if(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<"u"&&e instanceof BigInt)e=e.valueOf();let{aliasDuplicateObjects:r,onAnchor:n,onTagObj:i,schema:o,sourceObjects:a}=s,l=void 0;if(r&&e&&typeof e==="object")if(l=a.get(e),l)return l.anchor??(l.anchor=n(e)),new Zp.Alias(l.anchor);else l={anchor:null,node:null},a.set(e,l);if(t?.startsWith("!!"))t=ed+t.slice(2);let c=td(e,t,o.tags);if(!c){if(e&&typeof e.toJSON==="function")e=e.toJSON();if(!e||typeof e!=="object"){let f=new bo.Scalar(e);if(l)l.node=f;return f}c=e instanceof Map?o[he.MAP]:(Symbol.iterator in Object(e))?o[he.SEQ]:o[he.MAP]}if(i)i(c),delete s.onTagObj;let d=c?.createNode?c.createNode(s.schema,e,s):typeof c?.nodeClass?.from==="function"?c.nodeClass.from(s.schema,e,s):new bo.Scalar(e);if(t)d.tag=t;else if(!c.default)d.tag=c.tag;if(l)l.node=d;return d}rd.createNode=sd});var xt=m(function(ad){var id=Ye(),W=I(),od=Mt();function Us(e,t,s){let r=s;for(let n=t.length-1;n>=0;--n){let i=t[n];if(typeof i==="number"&&Number.isInteger(i)&&i>=0){let o=[];o[i]=r,r=o}else r=new Map([[i,r]])}return id.createNode(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}var So=(e)=>e==null||typeof e==="object"&&!!e[Symbol.iterator]().next().done;class wo extends od.NodeBase{constructor(e,t){super(e);Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(e)t.schema=e;if(t.items=t.items.map((s)=>W.isNode(s)||W.isPair(s)?s.clone(e):s),this.range)t.range=this.range.slice();return t}addIn(e,t){if(So(e))this.add(t);else{let[s,...r]=e,n=this.get(s,!0);if(W.isCollection(n))n.addIn(r,t);else if(n===void 0&&this.schema)this.set(s,Us(this.schema,r,t));else throw Error(`Expected YAML collection at ${s}. Remaining path: ${r}`)}}deleteIn(e){let[t,...s]=e;if(s.length===0)return this.delete(t);let r=this.get(t,!0);if(W.isCollection(r))return r.deleteIn(s);else throw Error(`Expected YAML collection at ${t}. Remaining path: ${s}`)}getIn(e,t){let[s,...r]=e,n=this.get(s,!0);if(r.length===0)return!t&&W.isScalar(n)?n.value:n;else return W.isCollection(n)?n.getIn(r,t):void 0}hasAllNullValues(e){return this.items.every((t)=>{if(!W.isPair(t))return!1;let s=t.value;return s==null||e&&W.isScalar(s)&&s.value==null&&!s.commentBefore&&!s.comment&&!s.tag})}hasIn(e){let[t,...s]=e;if(s.length===0)return this.has(t);let r=this.get(t,!0);return W.isCollection(r)?r.hasIn(s):!1}setIn(e,t){let[s,...r]=e;if(r.length===0)this.set(s,t);else{let n=this.get(s,!0);if(W.isCollection(n))n.setIn(r,t);else if(n===void 0&&this.schema)this.set(s,Us(this.schema,r,t));else throw Error(`Expected YAML collection at ${s}. Remaining path: ${r}`)}}}ad.Collection=wo;ad.collectionFromPath=Us;ad.isEmptyPath=So});var Je=m(function(dd){var fd=(e)=>e.replace(/^(?!$)(?: $)?/gm,"#");function Ks(e,t){if(/^\n+$/.test(e))return e.substring(1);return t?e.replace(/^(?! *$)/gm,t):e}var pd=(e,t,s)=>e.endsWith(`
4
+ `)?Ks(s,t):s.includes(`
5
5
  `)?`
6
- `+Bs(s,t):(e.endsWith(" ")?"":" ")+s;dd.indentComment=Bs;dd.lineComment=pd;dd.stringifyComment=fd});var Eo=m(function(bd){function yd(e,t,s="flow",{indentAtStart:r,lineWidth:n=80,minContentWidth:i=20,onFold:o,onOverflow:a}={}){if(!n||n<0)return e;if(n<i)i=0;let l=Math.max(1+i,1+n-t.length);if(e.length<=l)return e;let c=[],d={},f=n-t.length;if(typeof r==="number")if(r>n-Math.max(2,i))c.push(0);else f=n-r;let u=void 0,p=void 0,y=!1,h=-1,g=-1,E=-1;if(s==="block"){if(h=wo(e,h,t.length),h!==-1)f=h+l}for(let N;N=e[h+=1];){if(s==="quoted"&&N==="\\"){switch(g=h,e[h+1]){case"x":h+=3;break;case"u":h+=5;break;case"U":h+=9;break;default:h+=1}E=h}if(N===`
7
- `){if(s==="block")h=wo(e,h,t.length);f=h+t.length+l,u=void 0}else{if(N===" "&&p&&p!==" "&&p!==`
6
+ `+Ks(s,t):(e.endsWith(" ")?"":" ")+s;dd.indentComment=Ks;dd.lineComment=pd;dd.stringifyComment=fd});var vo=m(function(bd){function yd(e,t,s="flow",{indentAtStart:r,lineWidth:n=80,minContentWidth:i=20,onFold:o,onOverflow:a}={}){if(!n||n<0)return e;if(n<i)i=0;let l=Math.max(1+i,1+n-t.length);if(e.length<=l)return e;let c=[],d={},f=n-t.length;if(typeof r==="number")if(r>n-Math.max(2,i))c.push(0);else f=n-r;let u=void 0,p=void 0,y=!1,h=-1,g=-1,E=-1;if(s==="block"){if(h=Eo(e,h,t.length),h!==-1)f=h+l}for(let N;N=e[h+=1];){if(s==="quoted"&&N==="\\"){switch(g=h,e[h+1]){case"x":h+=3;break;case"u":h+=5;break;case"U":h+=9;break;default:h+=1}E=h}if(N===`
7
+ `){if(s==="block")h=Eo(e,h,t.length);f=h+t.length+l,u=void 0}else{if(N===" "&&p&&p!==" "&&p!==`
8
8
  `&&p!=="\t"){let O=e[h+1];if(O&&O!==" "&&O!==`
9
9
  `&&O!=="\t")u=h}if(h>=f)if(u)c.push(u),f=u+l,u=void 0;else if(s==="quoted"){while(p===" "||p==="\t")p=N,N=e[h+=1],y=!0;let O=h>E+1?h-2:g-1;if(d[O])return e;c.push(O),d[O]=!0,f=O+l,u=void 0}else y=!0}p=N}if(y&&a)a();if(c.length===0)return e;if(o)o();let v=e.slice(0,c[0]);for(let N=0;N<c.length;++N){let O=c[N],k=c[N+1]||e.length;if(O===0)v=`
10
10
  ${t}${e.slice(0,k)}`;else{if(s==="quoted"&&d[O])v+=`${e[O]}\\`;v+=`
11
- ${t}${e.slice(O+1,k)}`}}return v}function wo(e,t,s){let r=t,n=t+1,i=e[n];while(i===" "||i==="\t")if(t<n+s)i=e[++t];else{do i=e[++t];while(i&&i!==`
12
- `);r=t,n=t+1,i=e[n]}return r}bd.FOLD_BLOCK="block";bd.FOLD_FLOW="flow";bd.FOLD_QUOTED="quoted";bd.foldFlowLines=yd});var He=m(function(Ad){var Y=q(),re=Eo(),Mt=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),Pt=(e)=>/^(%|---|\.\.\.)/m.test(e);function Nd(e,t,s){if(!t||t<0)return!1;let r=t-s,n=e.length;if(n<=r)return!1;for(let i=0,o=0;i<n;++i)if(e[i]===`
13
- `){if(i-o>r)return!0;if(o=i+1,n-o<=r)return!1}return!0}function Je(e,t){let s=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return s;let{implicitKey:r}=t,n=t.options.doubleQuotedMinMultiLineLength,i=t.indent||(Pt(e)?" ":""),o="",a=0;for(let l=0,c=s[l];c;c=s[++l]){if(c===" "&&s[l+1]==="\\"&&s[l+2]==="n")o+=s.slice(a,l)+"\\ ",l+=1,a=l,c="\\";if(c==="\\")switch(s[l+1]){case"u":{o+=s.slice(a,l);let d=s.substr(l+2,4);switch(d){case"0000":o+="\\0";break;case"0007":o+="\\a";break;case"000b":o+="\\v";break;case"001b":o+="\\e";break;case"0085":o+="\\N";break;case"00a0":o+="\\_";break;case"2028":o+="\\L";break;case"2029":o+="\\P";break;default:if(d.substr(0,2)==="00")o+="\\x"+d.substr(2);else o+=s.substr(l,6)}l+=5,a=l+1}break;case"n":if(r||s[l+2]==='"'||s.length<n)l+=1;else{o+=s.slice(a,l)+`
11
+ ${t}${e.slice(O+1,k)}`}}return v}function Eo(e,t,s){let r=t,n=t+1,i=e[n];while(i===" "||i==="\t")if(t<n+s)i=e[++t];else{do i=e[++t];while(i&&i!==`
12
+ `);r=t,n=t+1,i=e[n]}return r}bd.FOLD_BLOCK="block";bd.FOLD_FLOW="flow";bd.FOLD_QUOTED="quoted";bd.foldFlowLines=yd});var Xe=m(function(Ad){var Y=q(),re=vo(),jt=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),Ft=(e)=>/^(%|---|\.\.\.)/m.test(e);function Nd(e,t,s){if(!t||t<0)return!1;let r=t-s,n=e.length;if(n<=r)return!1;for(let i=0,o=0;i<n;++i)if(e[i]===`
13
+ `){if(i-o>r)return!0;if(o=i+1,n-o<=r)return!1}return!0}function He(e,t){let s=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return s;let{implicitKey:r}=t,n=t.options.doubleQuotedMinMultiLineLength,i=t.indent||(Ft(e)?" ":""),o="",a=0;for(let l=0,c=s[l];c;c=s[++l]){if(c===" "&&s[l+1]==="\\"&&s[l+2]==="n")o+=s.slice(a,l)+"\\ ",l+=1,a=l,c="\\";if(c==="\\")switch(s[l+1]){case"u":{o+=s.slice(a,l);let d=s.substr(l+2,4);switch(d){case"0000":o+="\\0";break;case"0007":o+="\\a";break;case"000b":o+="\\v";break;case"001b":o+="\\e";break;case"0085":o+="\\N";break;case"00a0":o+="\\_";break;case"2028":o+="\\L";break;case"2029":o+="\\P";break;default:if(d.substr(0,2)==="00")o+="\\x"+d.substr(2);else o+=s.substr(l,6)}l+=5,a=l+1}break;case"n":if(r||s[l+2]==='"'||s.length<n)l+=1;else{o+=s.slice(a,l)+`
14
14
 
15
15
  `;while(s[l+2]==="\\"&&s[l+3]==="n"&&s[l+4]!=='"')o+=`
16
- `,l+=2;if(o+=i,s[l+2]===" ")o+="\\";l+=1,a=l+1}break;default:l+=1}}return o=a?o+s.slice(a):s,r?o:re.foldFlowLines(o,i,re.FOLD_QUOTED,Mt(t,!1))}function Us(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
17
- `)||/[ \t]\n|\n[ \t]/.test(e))return Je(e,t);let s=t.indent||(Pt(e)?" ":""),r="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&
18
- ${s}`)+"'";return t.implicitKey?r:re.foldFlowLines(r,s,re.FOLD_FLOW,Mt(t,!1))}function Le(e,t){let{singleQuote:s}=t.options,r;if(s===!1)r=Je;else{let n=e.includes('"'),i=e.includes("'");if(n&&!i)r=Us;else if(i&&!n)r=Je;else r=s?Us:Je}return r(e,t)}var Ks;try{Ks=new RegExp(`(^|(?<!
16
+ `,l+=2;if(o+=i,s[l+2]===" ")o+="\\";l+=1,a=l+1}break;default:l+=1}}return o=a?o+s.slice(a):s,r?o:re.foldFlowLines(o,i,re.FOLD_QUOTED,jt(t,!1))}function Vs(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
17
+ `)||/[ \t]\n|\n[ \t]/.test(e))return He(e,t);let s=t.indent||(Ft(e)?" ":""),r="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&
18
+ ${s}`)+"'";return t.implicitKey?r:re.foldFlowLines(r,s,re.FOLD_FLOW,jt(t,!1))}function $e(e,t){let{singleQuote:s}=t.options,r;if(s===!1)r=He;else{let n=e.includes('"'),i=e.includes("'");if(n&&!i)r=Vs;else if(i&&!n)r=He;else r=s?Vs:He}return r(e,t)}var Gs;try{Gs=new RegExp(`(^|(?<!
19
19
  ))
20
20
  +(?!
21
- |$)`,"g")}catch{Ks=/\n+(?!\n|$)/g}function Ct({comment:e,type:t,value:s},r,n,i){let{blockQuote:o,commentString:a,lineWidth:l}=r.options;if(!o||/\n[\t ]+$/.test(s))return Le(s,r);let c=r.indent||(r.forceBlockIndent||Pt(s)?" ":""),d=o==="literal"?!0:o==="folded"||t===Y.Scalar.BLOCK_FOLDED?!1:t===Y.Scalar.BLOCK_LITERAL?!0:!Nd(s,l,c.length);if(!s)return d?`|
21
+ |$)`,"g")}catch{Gs=/\n+(?!\n|$)/g}function _t({comment:e,type:t,value:s},r,n,i){let{blockQuote:o,commentString:a,lineWidth:l}=r.options;if(!o||/\n[\t ]+$/.test(s))return $e(s,r);let c=r.indent||(r.forceBlockIndent||Ft(s)?" ":""),d=o==="literal"?!0:o==="folded"||t===Y.Scalar.BLOCK_FOLDED?!1:t===Y.Scalar.BLOCK_LITERAL?!0:!Nd(s,l,c.length);if(!s)return d?`|
22
22
  `:`>
23
23
  `;let f,u;for(u=s.length;u>0;--u){let k=s[u-1];if(k!==`
24
24
  `&&k!=="\t"&&k!==" ")break}let p=s.substring(u),y=p.indexOf(`
25
25
  `);if(y===-1)f="-";else if(s===p||y!==p.length-1){if(f="+",i)i()}else f="";if(p){if(s=s.slice(0,-p.length),p[p.length-1]===`
26
- `)p=p.slice(0,-1);p=p.replace(Ks,`$&${c}`)}let h=!1,g,E=-1;for(g=0;g<s.length;++g){let k=s[g];if(k===" ")h=!0;else if(k===`
26
+ `)p=p.slice(0,-1);p=p.replace(Gs,`$&${c}`)}let h=!1,g,E=-1;for(g=0;g<s.length;++g){let k=s[g];if(k===" ")h=!0;else if(k===`
27
27
  `)E=g;else break}let v=s.substring(0,E<g?E+1:g);if(v)s=s.substring(v.length),v=v.replace(/\n+/g,`$&${c}`);let O=(h?c?"2":"1":"")+f;if(e){if(O+=" "+a(e.replace(/ ?[\r\n]+/g," ")),n)n()}if(!d){let k=s.replace(/\n+/g,`
28
- $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`),L=!1,T=Mt(r,!0);if(o!=="folded"&&t!==Y.Scalar.BLOCK_FOLDED)T.onOverflow=()=>{L=!0};let w=re.foldFlowLines(`${v}${k}${p}`,c,re.FOLD_BLOCK,T);if(!L)return`>${O}
28
+ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`),L=!1,T=jt(r,!0);if(o!=="folded"&&t!==Y.Scalar.BLOCK_FOLDED)T.onOverflow=()=>{L=!0};let w=re.foldFlowLines(`${v}${k}${p}`,c,re.FOLD_BLOCK,T);if(!L)return`>${O}
29
29
  ${c}${w}`}return s=s.replace(/\n+/g,`$&${c}`),`|${O}
30
30
  ${c}${v}${s}${p}`}function Od(e,t,s,r){let{type:n,value:i}=e,{actualString:o,implicitKey:a,indent:l,indentStep:c,inFlow:d}=t;if(a&&i.includes(`
31
- `)||d&&/[[\]{},]/.test(i))return Le(i,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(i))return a||d||!i.includes(`
32
- `)?Le(i,t):Ct(e,t,s,r);if(!a&&!d&&n!==Y.Scalar.PLAIN&&i.includes(`
33
- `))return Ct(e,t,s,r);if(Pt(i)){if(l==="")return t.forceBlockIndent=!0,Ct(e,t,s,r);else if(a&&l===c)return Le(i,t)}let f=i.replace(/\n+/g,`$&
34
- ${l}`);if(o){let u=(h)=>h.default&&h.tag!=="tag:yaml.org,2002:str"&&h.test?.test(f),{compat:p,tags:y}=t.doc.schema;if(y.some(u)||p?.some(u))return Le(i,t)}return a?f:re.foldFlowLines(f,l,re.FOLD_FLOW,Mt(t,!1))}function kd(e,t,s,r){let{implicitKey:n,inFlow:i}=t,o=typeof e.value==="string"?e:Object.assign({},e,{value:String(e.value)}),{type:a}=e;if(a!==Y.Scalar.QUOTE_DOUBLE){if(/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value))a=Y.Scalar.QUOTE_DOUBLE}let l=(d)=>{switch(d){case Y.Scalar.BLOCK_FOLDED:case Y.Scalar.BLOCK_LITERAL:return n||i?Le(o.value,t):Ct(o,t,s,r);case Y.Scalar.QUOTE_DOUBLE:return Je(o.value,t);case Y.Scalar.QUOTE_SINGLE:return Us(o.value,t);case Y.Scalar.PLAIN:return Od(o,t,s,r);default:return null}},c=l(a);if(c===null){let{defaultKeyType:d,defaultStringType:f}=t.options,u=n&&d||f;if(c=l(u),c===null)throw Error(`Unsupported default string type ${u}`)}return c}Ad.stringifyString=kd});var Xe=m(function(Md){var $d=Tt(),ne=I(),Id=Ye(),Td=He();function Dd(e,t){let s=Object.assign({blockQuote:!0,commentString:Id.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,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t),r;switch(s.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:e,flowCollectionPadding:s.flowCollectionPadding?" ":"",indent:"",indentStep:typeof s.indent==="number"?" ".repeat(s.indent):" ",inFlow:r,options:s}}function qd(e,t){if(t.tag){let n=e.filter((i)=>i.tag===t.tag);if(n.length>0)return n.find((i)=>i.format===t.format)??n[0]}let s=void 0,r;if(ne.isScalar(t)){r=t.value;let n=e.filter((i)=>i.identify?.(r));if(n.length>1){let i=n.filter((o)=>o.test);if(i.length>0)n=i}s=n.find((i)=>i.format===t.format)??n.find((i)=>!i.format)}else r=t,s=e.find((n)=>n.nodeClass&&r instanceof n.nodeClass);if(!s){let n=r?.constructor?.name??(r===null?"null":typeof r);throw Error(`Tag not resolved for ${n} value`)}return s}function Rd(e,t,{anchors:s,doc:r}){if(!r.directives)return"";let n=[],i=(ne.isScalar(e)||ne.isCollection(e))&&e.anchor;if(i&&$d.anchorIsValid(i))s.add(i),n.push(`&${i}`);let o=e.tag??(t.default?null:t.tag);if(o)n.push(r.directives.tagString(o));return n.join(" ")}function Cd(e,t,s,r){if(ne.isPair(e))return e.toString(t,s,r);if(ne.isAlias(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw TypeError("Cannot stringify circular structure without alias nodes");else{if(t.resolvedAliases)t.resolvedAliases.add(e);else t.resolvedAliases=new Set([e]);e=e.resolve(t.doc)}}let n=void 0,i=ne.isNode(e)?e:t.doc.createNode(e,{onTagObj:(l)=>n=l});n??(n=qd(t.doc.schema.tags,i));let o=Rd(i,n,t);if(o.length>0)t.indentAtStart=(t.indentAtStart??0)+o.length+1;let a=typeof n.stringify==="function"?n.stringify(i,t,s,r):ne.isScalar(i)?Td.stringifyString(i,t,s,r):i.toString(t,s,r);if(!o)return a;return ne.isScalar(i)||a[0]==="{"||a[0]==="["?`${o} ${a}`:`${o}
35
- ${t.indent}${a}`}Md.createStringifyContext=Dd;Md.stringify=Cd});var Oo=m(function(jd){var z=I(),vo=q(),No=Xe(),We=Ye();function _d({key:e,value:t},s,r,n){let{allNullValues:i,doc:o,indent:a,indentStep:l,options:{commentString:c,indentSeq:d,simpleKeys:f}}=s,u=z.isNode(e)&&e.comment||null;if(f){if(u)throw Error("With simple keys, key nodes cannot have comments");if(z.isCollection(e)||!z.isNode(e)&&typeof e==="object")throw Error("With simple keys, collection cannot be used as a key value")}let p=!f&&(!e||u&&t==null&&!s.inFlow||z.isCollection(e)||(z.isScalar(e)?e.type===vo.Scalar.BLOCK_FOLDED||e.type===vo.Scalar.BLOCK_LITERAL:typeof e==="object"));s=Object.assign({},s,{allNullValues:!1,implicitKey:!p&&(f||!i),indent:a+l});let y=!1,h=!1,g=No.stringify(e,s,()=>y=!0,()=>h=!0);if(!p&&!s.inFlow&&g.length>1024){if(f)throw Error("With simple keys, single line scalar must not span more than 1024 characters");p=!0}if(s.inFlow){if(i||t==null){if(y&&r)r();return g===""?"?":p?`? ${g}`:g}}else if(i&&!f||t==null&&p){if(g=`? ${g}`,u&&!y)g+=We.lineComment(g,s.indent,c(u));else if(h&&n)n();return g}if(y)u=null;if(p){if(u)g+=We.lineComment(g,s.indent,c(u));g=`? ${g}
36
- ${a}:`}else if(g=`${g}:`,u)g+=We.lineComment(g,s.indent,c(u));let E,v,N;if(z.isNode(t))E=!!t.spaceBefore,v=t.commentBefore,N=t.comment;else if(E=!1,v=null,N=null,t&&typeof t==="object")t=o.createNode(t);if(s.implicitKey=!1,!p&&!u&&z.isScalar(t))s.indentAtStart=g.length+1;if(h=!1,!d&&l.length>=2&&!s.inFlow&&!p&&z.isSeq(t)&&!t.flow&&!t.tag&&!t.anchor)s.indent=s.indent.substring(2);let O=!1,k=No.stringify(t,s,()=>O=!0,()=>h=!0),L=" ";if(u||E||v){if(L=E?`
31
+ `)||d&&/[[\]{},]/.test(i))return $e(i,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(i))return a||d||!i.includes(`
32
+ `)?$e(i,t):_t(e,t,s,r);if(!a&&!d&&n!==Y.Scalar.PLAIN&&i.includes(`
33
+ `))return _t(e,t,s,r);if(Ft(i)){if(l==="")return t.forceBlockIndent=!0,_t(e,t,s,r);else if(a&&l===c)return $e(i,t)}let f=i.replace(/\n+/g,`$&
34
+ ${l}`);if(o){let u=(h)=>h.default&&h.tag!=="tag:yaml.org,2002:str"&&h.test?.test(f),{compat:p,tags:y}=t.doc.schema;if(y.some(u)||p?.some(u))return $e(i,t)}return a?f:re.foldFlowLines(f,l,re.FOLD_FLOW,jt(t,!1))}function kd(e,t,s,r){let{implicitKey:n,inFlow:i}=t,o=typeof e.value==="string"?e:Object.assign({},e,{value:String(e.value)}),{type:a}=e;if(a!==Y.Scalar.QUOTE_DOUBLE){if(/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value))a=Y.Scalar.QUOTE_DOUBLE}let l=(d)=>{switch(d){case Y.Scalar.BLOCK_FOLDED:case Y.Scalar.BLOCK_LITERAL:return n||i?$e(o.value,t):_t(o,t,s,r);case Y.Scalar.QUOTE_DOUBLE:return He(o.value,t);case Y.Scalar.QUOTE_SINGLE:return Vs(o.value,t);case Y.Scalar.PLAIN:return Od(o,t,s,r);default:return null}},c=l(a);if(c===null){let{defaultKeyType:d,defaultStringType:f}=t.options,u=n&&d||f;if(c=l(u),c===null)throw Error(`Unsupported default string type ${u}`)}return c}Ad.stringifyString=kd});var We=m(function(Md){var $d=Ct(),ne=I(),Id=Je(),Td=Xe();function Dd(e,t){let s=Object.assign({blockQuote:!0,commentString:Id.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,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t),r;switch(s.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:e,flowCollectionPadding:s.flowCollectionPadding?" ":"",indent:"",indentStep:typeof s.indent==="number"?" ".repeat(s.indent):" ",inFlow:r,options:s}}function qd(e,t){if(t.tag){let n=e.filter((i)=>i.tag===t.tag);if(n.length>0)return n.find((i)=>i.format===t.format)??n[0]}let s=void 0,r;if(ne.isScalar(t)){r=t.value;let n=e.filter((i)=>i.identify?.(r));if(n.length>1){let i=n.filter((o)=>o.test);if(i.length>0)n=i}s=n.find((i)=>i.format===t.format)??n.find((i)=>!i.format)}else r=t,s=e.find((n)=>n.nodeClass&&r instanceof n.nodeClass);if(!s){let n=r?.constructor?.name??(r===null?"null":typeof r);throw Error(`Tag not resolved for ${n} value`)}return s}function Rd(e,t,{anchors:s,doc:r}){if(!r.directives)return"";let n=[],i=(ne.isScalar(e)||ne.isCollection(e))&&e.anchor;if(i&&$d.anchorIsValid(i))s.add(i),n.push(`&${i}`);let o=e.tag??(t.default?null:t.tag);if(o)n.push(r.directives.tagString(o));return n.join(" ")}function Cd(e,t,s,r){if(ne.isPair(e))return e.toString(t,s,r);if(ne.isAlias(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw TypeError("Cannot stringify circular structure without alias nodes");else{if(t.resolvedAliases)t.resolvedAliases.add(e);else t.resolvedAliases=new Set([e]);e=e.resolve(t.doc)}}let n=void 0,i=ne.isNode(e)?e:t.doc.createNode(e,{onTagObj:(l)=>n=l});n??(n=qd(t.doc.schema.tags,i));let o=Rd(i,n,t);if(o.length>0)t.indentAtStart=(t.indentAtStart??0)+o.length+1;let a=typeof n.stringify==="function"?n.stringify(i,t,s,r):ne.isScalar(i)?Td.stringifyString(i,t,s,r):i.toString(t,s,r);if(!o)return a;return ne.isScalar(i)||a[0]==="{"||a[0]==="["?`${o} ${a}`:`${o}
35
+ ${t.indent}${a}`}Md.createStringifyContext=Dd;Md.stringify=Cd});var ko=m(function(jd){var z=I(),No=q(),Oo=We(),Qe=Je();function _d({key:e,value:t},s,r,n){let{allNullValues:i,doc:o,indent:a,indentStep:l,options:{commentString:c,indentSeq:d,simpleKeys:f}}=s,u=z.isNode(e)&&e.comment||null;if(f){if(u)throw Error("With simple keys, key nodes cannot have comments");if(z.isCollection(e)||!z.isNode(e)&&typeof e==="object")throw Error("With simple keys, collection cannot be used as a key value")}let p=!f&&(!e||u&&t==null&&!s.inFlow||z.isCollection(e)||(z.isScalar(e)?e.type===No.Scalar.BLOCK_FOLDED||e.type===No.Scalar.BLOCK_LITERAL:typeof e==="object"));s=Object.assign({},s,{allNullValues:!1,implicitKey:!p&&(f||!i),indent:a+l});let y=!1,h=!1,g=Oo.stringify(e,s,()=>y=!0,()=>h=!0);if(!p&&!s.inFlow&&g.length>1024){if(f)throw Error("With simple keys, single line scalar must not span more than 1024 characters");p=!0}if(s.inFlow){if(i||t==null){if(y&&r)r();return g===""?"?":p?`? ${g}`:g}}else if(i&&!f||t==null&&p){if(g=`? ${g}`,u&&!y)g+=Qe.lineComment(g,s.indent,c(u));else if(h&&n)n();return g}if(y)u=null;if(p){if(u)g+=Qe.lineComment(g,s.indent,c(u));g=`? ${g}
36
+ ${a}:`}else if(g=`${g}:`,u)g+=Qe.lineComment(g,s.indent,c(u));let E,v,N;if(z.isNode(t))E=!!t.spaceBefore,v=t.commentBefore,N=t.comment;else if(E=!1,v=null,N=null,t&&typeof t==="object")t=o.createNode(t);if(s.implicitKey=!1,!p&&!u&&z.isScalar(t))s.indentAtStart=g.length+1;if(h=!1,!d&&l.length>=2&&!s.inFlow&&!p&&z.isSeq(t)&&!t.flow&&!t.tag&&!t.anchor)s.indent=s.indent.substring(2);let O=!1,k=Oo.stringify(t,s,()=>O=!0,()=>h=!0),L=" ";if(u||E||v){if(L=E?`
37
37
  `:"",v){let T=c(v);L+=`
38
- ${We.indentComment(T,s.indent)}`}if(k===""&&!s.inFlow){if(L===`
38
+ ${Qe.indentComment(T,s.indent)}`}if(k===""&&!s.inFlow){if(L===`
39
39
  `&&N)L=`
40
40
 
41
41
  `}else L+=`
42
42
  ${s.indent}`}else if(!p&&z.isCollection(t)){let T=k[0],w=k.indexOf(`
43
43
  `),R=w!==-1,ee=s.inFlow??t.flow??t.items.length===0;if(R||!ee){let Ee=!1;if(R&&(T==="&"||T==="!")){let C=k.indexOf(" ");if(T==="&"&&C!==-1&&C<w&&k[C+1]==="!")C=k.indexOf(" ",C+1);if(C===-1||w<C)Ee=!0}if(!Ee)L=`
44
44
  ${s.indent}`}}else if(k===""||k[0]===`
45
- `)L="";if(g+=L+k,s.inFlow){if(O&&r)r()}else if(N&&!O)g+=We.lineComment(g,s.indent,c(N));else if(h&&n)n();return g}jd.stringifyPair=_d});var Vs=m(function(Kd){var ko=pt("process");function Bd(e,...t){if(e==="debug")console.log(...t)}function Ud(e,t){if(e==="debug"||e==="warn")if(typeof ko.emitWarning==="function")ko.emitWarning(t);else console.warn(t)}Kd.debug=Bd;Kd.warn=Ud});var Ft=m(function(Jd){var jt=I(),Ao=q(),xt="<<",_t={identify:(e)=>e===xt||typeof e==="symbol"&&e.description===xt,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new Ao.Scalar(Symbol(xt)),{addToJSMap:Lo}),stringify:()=>xt},Yd=(e,t)=>(_t.identify(t)||jt.isScalar(t)&&(!t.type||t.type===Ao.Scalar.PLAIN)&&_t.identify(t.value))&&e?.doc.schema.tags.some((s)=>s.tag===_t.tag&&s.default);function Lo(e,t,s){let r=$o(e,s);if(jt.isSeq(r))for(let n of r.items)Gs(e,t,n);else if(Array.isArray(r))for(let n of r)Gs(e,t,n);else Gs(e,t,r)}function Gs(e,t,s){let r=$o(e,s);if(!jt.isMap(r))throw Error("Merge sources must be maps or map aliases");let n=r.toJSON(null,e,Map);for(let[i,o]of n)if(t instanceof Map){if(!t.has(i))t.set(i,o)}else if(t instanceof Set)t.add(i);else if(!Object.prototype.hasOwnProperty.call(t,i))Object.defineProperty(t,i,{value:o,writable:!0,enumerable:!0,configurable:!0});return t}function $o(e,t){return e&&jt.isAlias(t)?t.resolve(e.doc,e):t}Jd.addMergeToJSMap=Lo;Jd.isMergeKey=Yd;Jd.merge=_t});var Js=m(function(th){var Qd=Vs(),Io=Ft(),zd=Xe(),To=I(),Ys=se();function Zd(e,t,{key:s,value:r}){if(To.isNode(s)&&s.addToJSMap)s.addToJSMap(e,t,r);else if(Io.isMergeKey(e,s))Io.addMergeToJSMap(e,t,r);else{let n=Ys.toJS(s,"",e);if(t instanceof Map)t.set(n,Ys.toJS(r,n,e));else if(t instanceof Set)t.add(n);else{let i=eh(s,n,e),o=Ys.toJS(r,i,e);if(i in t)Object.defineProperty(t,i,{value:o,writable:!0,enumerable:!0,configurable:!0});else t[i]=o}}return t}function eh(e,t,s){if(t===null)return"";if(typeof t!=="object")return String(t);if(To.isNode(e)&&s?.doc){let r=zd.createStringifyContext(s.doc,{});r.anchors=new Set;for(let i of s.anchors.keys())r.anchors.add(i.anchor);r.inFlow=!0,r.inStringifyKey=!0;let n=e.toString(r);if(!s.mapKeyWarned){let i=JSON.stringify(n);if(i.length>40)i=i.substring(0,36)+'..."';Qd.warn(s.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${i}. Set mapAsMap: true to use object keys.`),s.mapKeyWarned=!0}return n}return JSON.stringify(t)}th.addPairToJSMap=Zd});var ie=m(function(oh){var Do=Ge(),rh=Oo(),nh=Js(),Bt=I();function ih(e,t,s){let r=Do.createNode(e,void 0,s),n=Do.createNode(t,void 0,s);return new Ut(r,n)}class Ut{constructor(e,t=null){Object.defineProperty(this,Bt.NODE_TYPE,{value:Bt.PAIR}),this.key=e,this.value=t}clone(e){let{key:t,value:s}=this;if(Bt.isNode(t))t=t.clone(e);if(Bt.isNode(s))s=s.clone(e);return new Ut(t,s)}toJSON(e,t){let s=t?.mapAsMap?new Map:{};return nh.addPairToJSMap(t,s,this)}toString(e,t,s){return e?.doc?rh.stringifyPair(this,e,t,s):JSON.stringify(this)}}oh.Pair=Ut;oh.createPair=ih});var Hs=m(function(ph){var me=I(),qo=Xe(),Kt=Ye();function ch(e,t,s){return(t.inFlow??e.flow?fh:uh)(e,t,s)}function uh({comment:e,items:t},s,{blockItemPrefix:r,flowChars:n,itemIndent:i,onChompKeep:o,onComment:a}){let{indent:l,options:{commentString:c}}=s,d=Object.assign({},s,{indent:i,type:null}),f=!1,u=[];for(let y=0;y<t.length;++y){let h=t[y],g=null;if(me.isNode(h)){if(!f&&h.spaceBefore)u.push("");if(Vt(s,u,h.commentBefore,f),h.comment)g=h.comment}else if(me.isPair(h)){let v=me.isNode(h.key)?h.key:null;if(v){if(!f&&v.spaceBefore)u.push("");Vt(s,u,v.commentBefore,f)}}f=!1;let E=qo.stringify(h,d,()=>g=null,()=>f=!0);if(g)E+=Kt.lineComment(E,i,c(g));if(f&&g)f=!1;u.push(r+E)}let p;if(u.length===0)p=n.start+n.end;else{p=u[0];for(let y=1;y<u.length;++y){let h=u[y];p+=h?`
45
+ `)L="";if(g+=L+k,s.inFlow){if(O&&r)r()}else if(N&&!O)g+=Qe.lineComment(g,s.indent,c(N));else if(h&&n)n();return g}jd.stringifyPair=_d});var Ys=m(function(Kd){var Ao=dt("process");function Bd(e,...t){if(e==="debug")console.log(...t)}function Ud(e,t){if(e==="debug"||e==="warn")if(typeof Ao.emitWarning==="function")Ao.emitWarning(t);else console.warn(t)}Kd.debug=Bd;Kd.warn=Ud});var Vt=m(function(Jd){var Kt=I(),Lo=q(),Bt="<<",Ut={identify:(e)=>e===Bt||typeof e==="symbol"&&e.description===Bt,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new Lo.Scalar(Symbol(Bt)),{addToJSMap:$o}),stringify:()=>Bt},Yd=(e,t)=>(Ut.identify(t)||Kt.isScalar(t)&&(!t.type||t.type===Lo.Scalar.PLAIN)&&Ut.identify(t.value))&&e?.doc.schema.tags.some((s)=>s.tag===Ut.tag&&s.default);function $o(e,t,s){let r=Io(e,s);if(Kt.isSeq(r))for(let n of r.items)Js(e,t,n);else if(Array.isArray(r))for(let n of r)Js(e,t,n);else Js(e,t,r)}function Js(e,t,s){let r=Io(e,s);if(!Kt.isMap(r))throw Error("Merge sources must be maps or map aliases");let n=r.toJSON(null,e,Map);for(let[i,o]of n)if(t instanceof Map){if(!t.has(i))t.set(i,o)}else if(t instanceof Set)t.add(i);else if(!Object.prototype.hasOwnProperty.call(t,i))Object.defineProperty(t,i,{value:o,writable:!0,enumerable:!0,configurable:!0});return t}function Io(e,t){return e&&Kt.isAlias(t)?t.resolve(e.doc,e):t}Jd.addMergeToJSMap=$o;Jd.isMergeKey=Yd;Jd.merge=Ut});var Xs=m(function(th){var Qd=Ys(),To=Vt(),zd=We(),Do=I(),Hs=se();function Zd(e,t,{key:s,value:r}){if(Do.isNode(s)&&s.addToJSMap)s.addToJSMap(e,t,r);else if(To.isMergeKey(e,s))To.addMergeToJSMap(e,t,r);else{let n=Hs.toJS(s,"",e);if(t instanceof Map)t.set(n,Hs.toJS(r,n,e));else if(t instanceof Set)t.add(n);else{let i=eh(s,n,e),o=Hs.toJS(r,i,e);if(i in t)Object.defineProperty(t,i,{value:o,writable:!0,enumerable:!0,configurable:!0});else t[i]=o}}return t}function eh(e,t,s){if(t===null)return"";if(typeof t!=="object")return String(t);if(Do.isNode(e)&&s?.doc){let r=zd.createStringifyContext(s.doc,{});r.anchors=new Set;for(let i of s.anchors.keys())r.anchors.add(i.anchor);r.inFlow=!0,r.inStringifyKey=!0;let n=e.toString(r);if(!s.mapKeyWarned){let i=JSON.stringify(n);if(i.length>40)i=i.substring(0,36)+'..."';Qd.warn(s.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${i}. Set mapAsMap: true to use object keys.`),s.mapKeyWarned=!0}return n}return JSON.stringify(t)}th.addPairToJSMap=Zd});var ie=m(function(oh){var qo=Ye(),rh=ko(),nh=Xs(),Gt=I();function ih(e,t,s){let r=qo.createNode(e,void 0,s),n=qo.createNode(t,void 0,s);return new Yt(r,n)}class Yt{constructor(e,t=null){Object.defineProperty(this,Gt.NODE_TYPE,{value:Gt.PAIR}),this.key=e,this.value=t}clone(e){let{key:t,value:s}=this;if(Gt.isNode(t))t=t.clone(e);if(Gt.isNode(s))s=s.clone(e);return new Yt(t,s)}toJSON(e,t){let s=t?.mapAsMap?new Map:{};return nh.addPairToJSMap(t,s,this)}toString(e,t,s){return e?.doc?rh.stringifyPair(this,e,t,s):JSON.stringify(this)}}oh.Pair=Yt;oh.createPair=ih});var Ws=m(function(ph){var me=I(),Ro=We(),Jt=Je();function ch(e,t,s){return(t.inFlow??e.flow?fh:uh)(e,t,s)}function uh({comment:e,items:t},s,{blockItemPrefix:r,flowChars:n,itemIndent:i,onChompKeep:o,onComment:a}){let{indent:l,options:{commentString:c}}=s,d=Object.assign({},s,{indent:i,type:null}),f=!1,u=[];for(let y=0;y<t.length;++y){let h=t[y],g=null;if(me.isNode(h)){if(!f&&h.spaceBefore)u.push("");if(Ht(s,u,h.commentBefore,f),h.comment)g=h.comment}else if(me.isPair(h)){let v=me.isNode(h.key)?h.key:null;if(v){if(!f&&v.spaceBefore)u.push("");Ht(s,u,v.commentBefore,f)}}f=!1;let E=Ro.stringify(h,d,()=>g=null,()=>f=!0);if(g)E+=Jt.lineComment(E,i,c(g));if(f&&g)f=!1;u.push(r+E)}let p;if(u.length===0)p=n.start+n.end;else{p=u[0];for(let y=1;y<u.length;++y){let h=u[y];p+=h?`
46
46
  ${l}${h}`:`
47
47
  `}}if(e){if(p+=`
48
- `+Kt.indentComment(c(e),l),a)a()}else if(f&&o)o();return p}function fh({items:e},t,{flowChars:s,itemIndent:r}){let{indent:n,indentStep:i,flowCollectionPadding:o,options:{commentString:a}}=t;r+=i;let l=Object.assign({},t,{indent:r,inFlow:!0,type:null}),c=!1,d=0,f=[];for(let y=0;y<e.length;++y){let h=e[y],g=null;if(me.isNode(h)){if(h.spaceBefore)f.push("");if(Vt(t,f,h.commentBefore,!1),h.comment)g=h.comment}else if(me.isPair(h)){let v=me.isNode(h.key)?h.key:null;if(v){if(v.spaceBefore)f.push("");if(Vt(t,f,v.commentBefore,!1),v.comment)c=!0}let N=me.isNode(h.value)?h.value:null;if(N){if(N.comment)g=N.comment;if(N.commentBefore)c=!0}else if(h.value==null&&v?.comment)g=v.comment}if(g)c=!0;let E=qo.stringify(h,l,()=>g=null);if(c||(c=f.length>d||E.includes(`
49
- `)),y<e.length-1)E+=",";else if(t.options.trailingComma){if(t.options.lineWidth>0)c||(c=f.reduce((v,N)=>v+N.length+2,2)+(E.length+2)>t.options.lineWidth);if(c)E+=","}if(g)E+=Kt.lineComment(E,r,a(g));f.push(E),d=f.length}let{start:u,end:p}=s;if(f.length===0)return u+p;else{if(!c){let y=f.reduce((h,g)=>h+g.length+2,2);c=t.options.lineWidth>0&&y>t.options.lineWidth}if(c){let y=u;for(let h of f)y+=h?`
48
+ `+Jt.indentComment(c(e),l),a)a()}else if(f&&o)o();return p}function fh({items:e},t,{flowChars:s,itemIndent:r}){let{indent:n,indentStep:i,flowCollectionPadding:o,options:{commentString:a}}=t;r+=i;let l=Object.assign({},t,{indent:r,inFlow:!0,type:null}),c=!1,d=0,f=[];for(let y=0;y<e.length;++y){let h=e[y],g=null;if(me.isNode(h)){if(h.spaceBefore)f.push("");if(Ht(t,f,h.commentBefore,!1),h.comment)g=h.comment}else if(me.isPair(h)){let v=me.isNode(h.key)?h.key:null;if(v){if(v.spaceBefore)f.push("");if(Ht(t,f,v.commentBefore,!1),v.comment)c=!0}let N=me.isNode(h.value)?h.value:null;if(N){if(N.comment)g=N.comment;if(N.commentBefore)c=!0}else if(h.value==null&&v?.comment)g=v.comment}if(g)c=!0;let E=Ro.stringify(h,l,()=>g=null);if(c||(c=f.length>d||E.includes(`
49
+ `)),y<e.length-1)E+=",";else if(t.options.trailingComma){if(t.options.lineWidth>0)c||(c=f.reduce((v,N)=>v+N.length+2,2)+(E.length+2)>t.options.lineWidth);if(c)E+=","}if(g)E+=Jt.lineComment(E,r,a(g));f.push(E),d=f.length}let{start:u,end:p}=s;if(f.length===0)return u+p;else{if(!c){let y=f.reduce((h,g)=>h+g.length+2,2);c=t.options.lineWidth>0&&y>t.options.lineWidth}if(c){let y=u;for(let h of f)y+=h?`
50
50
  ${i}${n}${h}`:`
51
51
  `;return`${y}
52
- ${n}${p}`}else return`${u}${o}${f.join(" ")}${o}${p}`}}function Vt({indent:e,options:{commentString:t}},s,r,n){if(r&&n)r=r.replace(/^\n+/,"");if(r){let i=Kt.indentComment(t(r),e);s.push(i.trimStart())}}ph.stringifyCollection=ch});var ae=m(function(bh){var hh=Hs(),mh=Js(),gh=Rt(),oe=I(),Gt=ie(),yh=q();function Qe(e,t){let s=oe.isScalar(t)?t.value:t;for(let r of e)if(oe.isPair(r)){if(r.key===t||r.key===s)return r;if(oe.isScalar(r.key)&&r.key.value===s)return r}return}class Ro extends gh.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(oe.MAP,e);this.items=[]}static from(e,t,s){let{keepUndefined:r,replacer:n}=s,i=new this(e),o=(a,l)=>{if(typeof n==="function")l=n.call(t,a,l);else if(Array.isArray(n)&&!n.includes(a))return;if(l!==void 0||r)i.items.push(Gt.createPair(a,l,s))};if(t instanceof Map)for(let[a,l]of t)o(a,l);else if(t&&typeof t==="object")for(let a of Object.keys(t))o(a,t[a]);if(typeof e.sortMapEntries==="function")i.items.sort(e.sortMapEntries);return i}add(e,t){let s;if(oe.isPair(e))s=e;else if(!e||typeof e!=="object"||!("key"in e))s=new Gt.Pair(e,e?.value);else s=new Gt.Pair(e.key,e.value);let r=Qe(this.items,s.key),n=this.schema?.sortMapEntries;if(r){if(!t)throw Error(`Key ${s.key} already set`);if(oe.isScalar(r.value)&&yh.isScalarValue(s.value))r.value.value=s.value;else r.value=s.value}else if(n){let i=this.items.findIndex((o)=>n(s,o)<0);if(i===-1)this.items.push(s);else this.items.splice(i,0,s)}else this.items.push(s)}delete(e){let t=Qe(this.items,e);if(!t)return!1;return this.items.splice(this.items.indexOf(t),1).length>0}get(e,t){let r=Qe(this.items,e)?.value;return(!t&&oe.isScalar(r)?r.value:r)??void 0}has(e){return!!Qe(this.items,e)}set(e,t){this.add(new Gt.Pair(e,t),!0)}toJSON(e,t,s){let r=s?new s:t?.mapAsMap?new Map:{};if(t?.onCreate)t.onCreate(r);for(let n of this.items)mh.addPairToJSMap(t,r,n);return r}toString(e,t,s){if(!e)return JSON.stringify(this);for(let r of this.items)if(!oe.isPair(r))throw Error(`Map items must all be pairs; found ${JSON.stringify(r)} instead`);if(!e.allNullValues&&this.hasAllNullValues(!1))e=Object.assign({},e,{allNullValues:!0});return hh.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:s,onComment:t})}}bh.YAMLMap=Ro;bh.findPair=Qe});var $e=m(function(Nh){var Eh=I(),Co=ae(),vh={collection:"map",default:!0,nodeClass:Co.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(e,t){if(!Eh.isMap(e))t("Expected a mapping for this tag");return e},createNode:(e,t,s)=>Co.YAMLMap.from(e,t,s)};Nh.map=vh});var le=m(function(Th){var kh=Ge(),Ah=Hs(),Lh=Rt(),Jt=I(),$h=q(),Ih=se();class Mo extends Lh.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(Jt.SEQ,e);this.items=[]}add(e){this.items.push(e)}delete(e){let t=Yt(e);if(typeof t!=="number")return!1;return this.items.splice(t,1).length>0}get(e,t){let s=Yt(e);if(typeof s!=="number")return;let r=this.items[s];return!t&&Jt.isScalar(r)?r.value:r}has(e){let t=Yt(e);return typeof t==="number"&&t<this.items.length}set(e,t){let s=Yt(e);if(typeof s!=="number")throw Error(`Expected a valid index, not ${e}.`);let r=this.items[s];if(Jt.isScalar(r)&&$h.isScalarValue(t))r.value=t;else this.items[s]=t}toJSON(e,t){let s=[];if(t?.onCreate)t.onCreate(s);let r=0;for(let n of this.items)s.push(Ih.toJS(n,String(r++),t));return s}toString(e,t,s){if(!e)return JSON.stringify(this);return Ah.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:s,onComment:t})}static from(e,t,s){let{replacer:r}=s,n=new this(e);if(t&&Symbol.iterator in Object(t)){let i=0;for(let o of t){if(typeof r==="function"){let a=t instanceof Set?o:String(i++);o=r.call(t,a,o)}n.items.push(kh.createNode(o,void 0,s))}}return n}}function Yt(e){let t=Jt.isScalar(e)?e.value:e;if(t&&typeof t==="string")t=Number(t);return typeof t==="number"&&Number.isInteger(t)&&t>=0?t:null}Th.YAMLSeq=Mo});var Ie=m(function(Ch){var qh=I(),Po=le(),Rh={collection:"seq",default:!0,nodeClass:Po.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(e,t){if(!qh.isSeq(e))t("Expected a sequence for this tag");return e},createNode:(e,t,s)=>Po.YAMLSeq.from(e,t,s)};Ch.seq=Rh});var ze=m(function(_h){var Ph=He(),xh={identify:(e)=>typeof e==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:(e)=>e,stringify(e,t,s,r){return t=Object.assign({actualString:!0},t),Ph.stringifyString(e,t,s,r)}};_h.string=xh});var Ht=m(function(Fh){var xo=q(),_o={identify:(e)=>e==null,createNode:()=>new xo.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new xo.Scalar(null),stringify:({source:e},t)=>typeof e==="string"&&_o.test.test(e)?e:t.options.nullStr};Fh.nullTag=_o});var Xs=m(function(Kh){var Uh=q(),jo={identify:(e)=>typeof e==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:(e)=>new Uh.Scalar(e[0]==="t"||e[0]==="T"),stringify({source:e,value:t},s){if(e&&jo.test.test(e)){let r=e[0]==="t"||e[0]==="T";if(t===r)return e}return t?s.options.trueStr:s.options.falseStr}};Kh.boolTag=jo});var Te=m(function(Yh){function Gh({format:e,minFractionDigits:t,tag:s,value:r}){if(typeof r==="bigint")return String(r);let n=typeof r==="number"?r:Number(r);if(!isFinite(n))return isNaN(n)?".nan":n<0?"-.inf":".inf";let i=Object.is(r,-0)?"-0":JSON.stringify(r);if(!e&&t&&(!s||s==="tag:yaml.org,2002:float")&&/^-?\d/.test(i)&&!i.includes("e")){let o=i.indexOf(".");if(o<0)o=i.length,i+=".";let a=t-(i.length-o-1);while(a-- >0)i+="0"}return i}Yh.stringifyNumber=Gh});var Qs=m(function(zh){var Hh=q(),Ws=Te(),Xh={identify:(e)=>typeof e==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:(e)=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Ws.stringifyNumber},Wh={identify:(e)=>typeof e==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:(e)=>parseFloat(e),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():Ws.stringifyNumber(e)}},Qh={identify:(e)=>typeof e==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){let t=new Hh.Scalar(parseFloat(e)),s=e.indexOf(".");if(s!==-1&&e[e.length-1]==="0")t.minFractionDigits=e.length-s-1;return t},stringify:Ws.stringifyNumber};zh.float=Qh;zh.floatExp=Wh;zh.floatNaN=Xh});var Zs=m(function(im){var Fo=Te(),Xt=(e)=>typeof e==="bigint"||Number.isInteger(e),zs=(e,t,s,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(t),s);function Bo(e,t,s){let{value:r}=e;if(Xt(r)&&r>=0)return s+r.toString(t);return Fo.stringifyNumber(e)}var sm={identify:(e)=>Xt(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,s)=>zs(e,2,8,s),stringify:(e)=>Bo(e,8,"0o")},rm={identify:Xt,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,s)=>zs(e,0,10,s),stringify:Fo.stringifyNumber},nm={identify:(e)=>Xt(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,s)=>zs(e,2,16,s),stringify:(e)=>Bo(e,16,"0x")};im.int=rm;im.intHex=nm;im.intOct=sm});var Uo=m(function(mm){var cm=$e(),um=Ht(),fm=Ie(),pm=ze(),dm=Xs(),er=Qs(),tr=Zs(),hm=[cm.map,fm.seq,pm.string,um.nullTag,dm.boolTag,tr.intOct,tr.int,tr.intHex,er.floatNaN,er.floatExp,er.float];mm.schema=hm});var Vo=m(function(Nm){var ym=q(),bm=$e(),Sm=Ie();function Ko(e){return typeof e==="bigint"||Number.isInteger(e)}var Wt=({value:e})=>JSON.stringify(e),wm=[{identify:(e)=>typeof e==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:(e)=>e,stringify:Wt},{identify:(e)=>e==null,createNode:()=>new ym.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Wt},{identify:(e)=>typeof e==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:(e)=>e==="true",stringify:Wt},{identify:Ko,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:s})=>s?BigInt(e):parseInt(e,10),stringify:({value:e})=>Ko(e)?e.toString():JSON.stringify(e)},{identify:(e)=>typeof e==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:(e)=>parseFloat(e),stringify:Wt}],Em={default:!0,tag:"",test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}},vm=[bm.map,Sm.seq].concat(wm,Em);Nm.schema=vm});var rr=m(function(Lm){var Ze=pt("buffer"),sr=q(),km=He(),Am={identify:(e)=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if(typeof Ze.Buffer==="function")return Ze.Buffer.from(e,"base64");else if(typeof atob==="function"){let s=atob(e.replace(/[\n\r]/g,"")),r=new Uint8Array(s.length);for(let n=0;n<s.length;++n)r[n]=s.charCodeAt(n);return r}else return t("This environment does not support reading binary tags; either Buffer or atob is required"),e},stringify({comment:e,type:t,value:s},r,n,i){if(!s)return"";let o=s,a;if(typeof Ze.Buffer==="function")a=o instanceof Ze.Buffer?o.toString("base64"):Ze.Buffer.from(o.buffer).toString("base64");else if(typeof btoa==="function"){let l="";for(let c=0;c<o.length;++c)l+=String.fromCharCode(o[c]);a=btoa(l)}else throw Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(t??(t=sr.Scalar.BLOCK_LITERAL),t!==sr.Scalar.QUOTE_DOUBLE){let l=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),c=Math.ceil(a.length/l),d=Array(c);for(let f=0,u=0;f<c;++f,u+=l)d[f]=a.substr(u,l);a=d.join(t===sr.Scalar.BLOCK_LITERAL?`
53
- `:" ")}return km.stringifyString({comment:e,type:t,value:a},r,n,i)}};Lm.binary=Am});var zt=m(function(qm){var Qt=I(),nr=ie(),Im=q(),Tm=le();function Go(e,t){if(Qt.isSeq(e))for(let s=0;s<e.items.length;++s){let r=e.items[s];if(Qt.isPair(r))continue;else if(Qt.isMap(r)){if(r.items.length>1)t("Each pair must have its own sequence indicator");let n=r.items[0]||new nr.Pair(new Im.Scalar(null));if(r.commentBefore)n.key.commentBefore=n.key.commentBefore?`${r.commentBefore}
52
+ ${n}${p}`}else return`${u}${o}${f.join(" ")}${o}${p}`}}function Ht({indent:e,options:{commentString:t}},s,r,n){if(r&&n)r=r.replace(/^\n+/,"");if(r){let i=Jt.indentComment(t(r),e);s.push(i.trimStart())}}ph.stringifyCollection=ch});var ae=m(function(bh){var hh=Ws(),mh=Xs(),gh=xt(),oe=I(),Xt=ie(),yh=q();function ze(e,t){let s=oe.isScalar(t)?t.value:t;for(let r of e)if(oe.isPair(r)){if(r.key===t||r.key===s)return r;if(oe.isScalar(r.key)&&r.key.value===s)return r}return}class Co extends gh.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(oe.MAP,e);this.items=[]}static from(e,t,s){let{keepUndefined:r,replacer:n}=s,i=new this(e),o=(a,l)=>{if(typeof n==="function")l=n.call(t,a,l);else if(Array.isArray(n)&&!n.includes(a))return;if(l!==void 0||r)i.items.push(Xt.createPair(a,l,s))};if(t instanceof Map)for(let[a,l]of t)o(a,l);else if(t&&typeof t==="object")for(let a of Object.keys(t))o(a,t[a]);if(typeof e.sortMapEntries==="function")i.items.sort(e.sortMapEntries);return i}add(e,t){let s;if(oe.isPair(e))s=e;else if(!e||typeof e!=="object"||!("key"in e))s=new Xt.Pair(e,e?.value);else s=new Xt.Pair(e.key,e.value);let r=ze(this.items,s.key),n=this.schema?.sortMapEntries;if(r){if(!t)throw Error(`Key ${s.key} already set`);if(oe.isScalar(r.value)&&yh.isScalarValue(s.value))r.value.value=s.value;else r.value=s.value}else if(n){let i=this.items.findIndex((o)=>n(s,o)<0);if(i===-1)this.items.push(s);else this.items.splice(i,0,s)}else this.items.push(s)}delete(e){let t=ze(this.items,e);if(!t)return!1;return this.items.splice(this.items.indexOf(t),1).length>0}get(e,t){let r=ze(this.items,e)?.value;return(!t&&oe.isScalar(r)?r.value:r)??void 0}has(e){return!!ze(this.items,e)}set(e,t){this.add(new Xt.Pair(e,t),!0)}toJSON(e,t,s){let r=s?new s:t?.mapAsMap?new Map:{};if(t?.onCreate)t.onCreate(r);for(let n of this.items)mh.addPairToJSMap(t,r,n);return r}toString(e,t,s){if(!e)return JSON.stringify(this);for(let r of this.items)if(!oe.isPair(r))throw Error(`Map items must all be pairs; found ${JSON.stringify(r)} instead`);if(!e.allNullValues&&this.hasAllNullValues(!1))e=Object.assign({},e,{allNullValues:!0});return hh.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:s,onComment:t})}}bh.YAMLMap=Co;bh.findPair=ze});var Ie=m(function(Nh){var Eh=I(),Mo=ae(),vh={collection:"map",default:!0,nodeClass:Mo.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(e,t){if(!Eh.isMap(e))t("Expected a mapping for this tag");return e},createNode:(e,t,s)=>Mo.YAMLMap.from(e,t,s)};Nh.map=vh});var le=m(function(Th){var kh=Ye(),Ah=Ws(),Lh=xt(),Qt=I(),$h=q(),Ih=se();class Po extends Lh.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(Qt.SEQ,e);this.items=[]}add(e){this.items.push(e)}delete(e){let t=Wt(e);if(typeof t!=="number")return!1;return this.items.splice(t,1).length>0}get(e,t){let s=Wt(e);if(typeof s!=="number")return;let r=this.items[s];return!t&&Qt.isScalar(r)?r.value:r}has(e){let t=Wt(e);return typeof t==="number"&&t<this.items.length}set(e,t){let s=Wt(e);if(typeof s!=="number")throw Error(`Expected a valid index, not ${e}.`);let r=this.items[s];if(Qt.isScalar(r)&&$h.isScalarValue(t))r.value=t;else this.items[s]=t}toJSON(e,t){let s=[];if(t?.onCreate)t.onCreate(s);let r=0;for(let n of this.items)s.push(Ih.toJS(n,String(r++),t));return s}toString(e,t,s){if(!e)return JSON.stringify(this);return Ah.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:s,onComment:t})}static from(e,t,s){let{replacer:r}=s,n=new this(e);if(t&&Symbol.iterator in Object(t)){let i=0;for(let o of t){if(typeof r==="function"){let a=t instanceof Set?o:String(i++);o=r.call(t,a,o)}n.items.push(kh.createNode(o,void 0,s))}}return n}}function Wt(e){let t=Qt.isScalar(e)?e.value:e;if(t&&typeof t==="string")t=Number(t);return typeof t==="number"&&Number.isInteger(t)&&t>=0?t:null}Th.YAMLSeq=Po});var Te=m(function(Ch){var qh=I(),xo=le(),Rh={collection:"seq",default:!0,nodeClass:xo.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(e,t){if(!qh.isSeq(e))t("Expected a sequence for this tag");return e},createNode:(e,t,s)=>xo.YAMLSeq.from(e,t,s)};Ch.seq=Rh});var Ze=m(function(_h){var Ph=Xe(),xh={identify:(e)=>typeof e==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:(e)=>e,stringify(e,t,s,r){return t=Object.assign({actualString:!0},t),Ph.stringifyString(e,t,s,r)}};_h.string=xh});var zt=m(function(Fh){var _o=q(),jo={identify:(e)=>e==null,createNode:()=>new _o.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new _o.Scalar(null),stringify:({source:e},t)=>typeof e==="string"&&jo.test.test(e)?e:t.options.nullStr};Fh.nullTag=jo});var Qs=m(function(Kh){var Uh=q(),Fo={identify:(e)=>typeof e==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:(e)=>new Uh.Scalar(e[0]==="t"||e[0]==="T"),stringify({source:e,value:t},s){if(e&&Fo.test.test(e)){let r=e[0]==="t"||e[0]==="T";if(t===r)return e}return t?s.options.trueStr:s.options.falseStr}};Kh.boolTag=Fo});var De=m(function(Yh){function Gh({format:e,minFractionDigits:t,tag:s,value:r}){if(typeof r==="bigint")return String(r);let n=typeof r==="number"?r:Number(r);if(!isFinite(n))return isNaN(n)?".nan":n<0?"-.inf":".inf";let i=Object.is(r,-0)?"-0":JSON.stringify(r);if(!e&&t&&(!s||s==="tag:yaml.org,2002:float")&&/^-?\d/.test(i)&&!i.includes("e")){let o=i.indexOf(".");if(o<0)o=i.length,i+=".";let a=t-(i.length-o-1);while(a-- >0)i+="0"}return i}Yh.stringifyNumber=Gh});var Zs=m(function(zh){var Hh=q(),zs=De(),Xh={identify:(e)=>typeof e==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:(e)=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:zs.stringifyNumber},Wh={identify:(e)=>typeof e==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:(e)=>parseFloat(e),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():zs.stringifyNumber(e)}},Qh={identify:(e)=>typeof e==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){let t=new Hh.Scalar(parseFloat(e)),s=e.indexOf(".");if(s!==-1&&e[e.length-1]==="0")t.minFractionDigits=e.length-s-1;return t},stringify:zs.stringifyNumber};zh.float=Qh;zh.floatExp=Wh;zh.floatNaN=Xh});var tr=m(function(im){var Bo=De(),Zt=(e)=>typeof e==="bigint"||Number.isInteger(e),er=(e,t,s,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(t),s);function Uo(e,t,s){let{value:r}=e;if(Zt(r)&&r>=0)return s+r.toString(t);return Bo.stringifyNumber(e)}var sm={identify:(e)=>Zt(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,s)=>er(e,2,8,s),stringify:(e)=>Uo(e,8,"0o")},rm={identify:Zt,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,s)=>er(e,0,10,s),stringify:Bo.stringifyNumber},nm={identify:(e)=>Zt(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,s)=>er(e,2,16,s),stringify:(e)=>Uo(e,16,"0x")};im.int=rm;im.intHex=nm;im.intOct=sm});var Ko=m(function(mm){var cm=Ie(),um=zt(),fm=Te(),pm=Ze(),dm=Qs(),sr=Zs(),rr=tr(),hm=[cm.map,fm.seq,pm.string,um.nullTag,dm.boolTag,rr.intOct,rr.int,rr.intHex,sr.floatNaN,sr.floatExp,sr.float];mm.schema=hm});var Go=m(function(Nm){var ym=q(),bm=Ie(),Sm=Te();function Vo(e){return typeof e==="bigint"||Number.isInteger(e)}var es=({value:e})=>JSON.stringify(e),wm=[{identify:(e)=>typeof e==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:(e)=>e,stringify:es},{identify:(e)=>e==null,createNode:()=>new ym.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:es},{identify:(e)=>typeof e==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:(e)=>e==="true",stringify:es},{identify:Vo,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:s})=>s?BigInt(e):parseInt(e,10),stringify:({value:e})=>Vo(e)?e.toString():JSON.stringify(e)},{identify:(e)=>typeof e==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:(e)=>parseFloat(e),stringify:es}],Em={default:!0,tag:"",test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}},vm=[bm.map,Sm.seq].concat(wm,Em);Nm.schema=vm});var ir=m(function(Lm){var et=dt("buffer"),nr=q(),km=Xe(),Am={identify:(e)=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if(typeof et.Buffer==="function")return et.Buffer.from(e,"base64");else if(typeof atob==="function"){let s=atob(e.replace(/[\n\r]/g,"")),r=new Uint8Array(s.length);for(let n=0;n<s.length;++n)r[n]=s.charCodeAt(n);return r}else return t("This environment does not support reading binary tags; either Buffer or atob is required"),e},stringify({comment:e,type:t,value:s},r,n,i){if(!s)return"";let o=s,a;if(typeof et.Buffer==="function")a=o instanceof et.Buffer?o.toString("base64"):et.Buffer.from(o.buffer).toString("base64");else if(typeof btoa==="function"){let l="";for(let c=0;c<o.length;++c)l+=String.fromCharCode(o[c]);a=btoa(l)}else throw Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(t??(t=nr.Scalar.BLOCK_LITERAL),t!==nr.Scalar.QUOTE_DOUBLE){let l=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),c=Math.ceil(a.length/l),d=Array(c);for(let f=0,u=0;f<c;++f,u+=l)d[f]=a.substr(u,l);a=d.join(t===nr.Scalar.BLOCK_LITERAL?`
53
+ `:" ")}return km.stringifyString({comment:e,type:t,value:a},r,n,i)}};Lm.binary=Am});var ss=m(function(qm){var ts=I(),or=ie(),Im=q(),Tm=le();function Yo(e,t){if(ts.isSeq(e))for(let s=0;s<e.items.length;++s){let r=e.items[s];if(ts.isPair(r))continue;else if(ts.isMap(r)){if(r.items.length>1)t("Each pair must have its own sequence indicator");let n=r.items[0]||new or.Pair(new Im.Scalar(null));if(r.commentBefore)n.key.commentBefore=n.key.commentBefore?`${r.commentBefore}
54
54
  ${n.key.commentBefore}`:r.commentBefore;if(r.comment){let i=n.value??n.key;i.comment=i.comment?`${r.comment}
55
- ${i.comment}`:r.comment}r=n}e.items[s]=Qt.isPair(r)?r:new nr.Pair(r)}else t("Expected a sequence for this tag");return e}function Yo(e,t,s){let{replacer:r}=s,n=new Tm.YAMLSeq(e);n.tag="tag:yaml.org,2002:pairs";let i=0;if(t&&Symbol.iterator in Object(t))for(let o of t){if(typeof r==="function")o=r.call(t,String(i++),o);let a,l;if(Array.isArray(o))if(o.length===2)a=o[0],l=o[1];else throw TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){let c=Object.keys(o);if(c.length===1)a=c[0],l=o[a];else throw TypeError(`Expected tuple with one key, not ${c.length} keys`)}else a=o;n.items.push(nr.createPair(a,l,s))}return n}var Dm={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Go,createNode:Yo};qm.createPairs=Yo;qm.pairs=Dm;qm.resolvePairs=Go});var or=m(function(_m){var Jo=I(),ir=se(),et=ae(),Pm=le(),Ho=zt();class ge extends Pm.YAMLSeq{constructor(){super();this.add=et.YAMLMap.prototype.add.bind(this),this.delete=et.YAMLMap.prototype.delete.bind(this),this.get=et.YAMLMap.prototype.get.bind(this),this.has=et.YAMLMap.prototype.has.bind(this),this.set=et.YAMLMap.prototype.set.bind(this),this.tag=ge.tag}toJSON(e,t){if(!t)return super.toJSON(e);let s=new Map;if(t?.onCreate)t.onCreate(s);for(let r of this.items){let n,i;if(Jo.isPair(r))n=ir.toJS(r.key,"",t),i=ir.toJS(r.value,n,t);else n=ir.toJS(r,"",t);if(s.has(n))throw Error("Ordered maps must not include duplicate keys");s.set(n,i)}return s}static from(e,t,s){let r=Ho.createPairs(e,t,s),n=new this;return n.items=r.items,n}}ge.tag="tag:yaml.org,2002:omap";var xm={collection:"seq",identify:(e)=>e instanceof Map,nodeClass:ge,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){let s=Ho.resolvePairs(e,t),r=[];for(let{key:n}of s.items)if(Jo.isScalar(n))if(r.includes(n.value))t(`Ordered maps must not include duplicate keys: ${n.value}`);else r.push(n.value);return Object.assign(new ge,s)},createNode:(e,t,s)=>ge.from(e,t,s)};_m.YAMLOMap=ge;_m.omap=xm});var Zo=m(function(Bm){var Xo=q();function Wo({value:e,source:t},s){if(t&&(e?Qo:zo).test.test(t))return t;return e?s.options.trueStr:s.options.falseStr}var Qo={identify:(e)=>e===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new Xo.Scalar(!0),stringify:Wo},zo={identify:(e)=>e===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new Xo.Scalar(!1),stringify:Wo};Bm.falseTag=zo;Bm.trueTag=Qo});var ea=m(function(Hm){var Vm=q(),ar=Te(),Gm={identify:(e)=>typeof e==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:(e)=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:ar.stringifyNumber},Ym={identify:(e)=>typeof e==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:(e)=>parseFloat(e.replace(/_/g,"")),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():ar.stringifyNumber(e)}},Jm={identify:(e)=>typeof e==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){let t=new Vm.Scalar(parseFloat(e.replace(/_/g,""))),s=e.indexOf(".");if(s!==-1){let r=e.substring(s+1).replace(/_/g,"");if(r[r.length-1]==="0")t.minFractionDigits=r.length}return t},stringify:ar.stringifyNumber};Hm.float=Jm;Hm.floatExp=Ym;Hm.floatNaN=Gm});var sa=m(function(sg){var ta=Te(),tt=(e)=>typeof e==="bigint"||Number.isInteger(e);function Zt(e,t,s,{intAsBigInt:r}){let n=e[0];if(n==="-"||n==="+")t+=1;if(e=e.substring(t).replace(/_/g,""),r){switch(s){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`;break}let o=BigInt(e);return n==="-"?BigInt(-1)*o:o}let i=parseInt(e,s);return n==="-"?-1*i:i}function lr(e,t,s){let{value:r}=e;if(tt(r)){let n=r.toString(t);return r<0?"-"+s+n.substr(1):s+n}return ta.stringifyNumber(e)}var zm={identify:tt,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,s)=>Zt(e,2,2,s),stringify:(e)=>lr(e,2,"0b")},Zm={identify:tt,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,s)=>Zt(e,1,8,s),stringify:(e)=>lr(e,8,"0")},eg={identify:tt,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,s)=>Zt(e,0,10,s),stringify:ta.stringifyNumber},tg={identify:tt,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,s)=>Zt(e,2,16,s),stringify:(e)=>lr(e,16,"0x")};sg.int=eg;sg.intBin=zm;sg.intHex=tg;sg.intOct=Zm});var cr=m(function(lg){var ss=I(),es=ie(),ts=ae();class ye extends ts.YAMLMap{constructor(e){super(e);this.tag=ye.tag}add(e){let t;if(ss.isPair(e))t=e;else if(e&&typeof e==="object"&&"key"in e&&"value"in e&&e.value===null)t=new es.Pair(e.key,null);else t=new es.Pair(e,null);if(!ts.findPair(this.items,t.key))this.items.push(t)}get(e,t){let s=ts.findPair(this.items,e);return!t&&ss.isPair(s)?ss.isScalar(s.key)?s.key.value:s.key:s}set(e,t){if(typeof t!=="boolean")throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let s=ts.findPair(this.items,e);if(s&&!t)this.items.splice(this.items.indexOf(s),1);else if(!s&&t)this.items.push(new es.Pair(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,s){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,s);else throw Error("Set items must all have null values")}static from(e,t,s){let{replacer:r}=s,n=new this(e);if(t&&Symbol.iterator in Object(t))for(let i of t){if(typeof r==="function")i=r.call(t,i,i);n.items.push(es.createPair(i,null,s))}return n}}ye.tag="tag:yaml.org,2002:set";var ag={collection:"map",identify:(e)=>e instanceof Set,nodeClass:ye,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,s)=>ye.from(e,t,s),resolve(e,t){if(ss.isMap(e))if(e.hasAllNullValues(!0))return Object.assign(new ye,e);else t("Set items must all have null values");else t("Expected a mapping for this tag");return e}};lg.YAMLSet=ye;lg.set=ag});var fr=m(function(hg){var fg=Te();function ur(e,t){let s=e[0],r=s==="-"||s==="+"?e.substring(1):e,n=(o)=>t?BigInt(o):Number(o),i=r.replace(/_/g,"").split(":").reduce((o,a)=>o*n(60)+n(a),n(0));return s==="-"?n(-1)*i:i}function ra(e){let{value:t}=e,s=(o)=>o;if(typeof t==="bigint")s=(o)=>BigInt(o);else if(isNaN(t)||!isFinite(t))return fg.stringifyNumber(e);let r="";if(t<0)r="-",t*=s(-1);let n=s(60),i=[t%n];if(t<60)i.unshift(0);else if(t=(t-i[0])/n,i.unshift(t%n),t>=60)t=(t-i[0])/n,i.unshift(t);return r+i.map((o)=>String(o).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var pg={identify:(e)=>typeof e==="bigint"||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:s})=>ur(e,s),stringify:ra},dg={identify:(e)=>typeof e==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:(e)=>ur(e,!1),stringify:ra},na={identify:(e)=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){let t=e.match(na.test);if(!t)throw Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,s,r,n,i,o,a]=t.map(Number),l=t[7]?Number((t[7]+"00").substr(1,3)):0,c=Date.UTC(s,r-1,n,i||0,o||0,a||0,l),d=t[8];if(d&&d!=="Z"){let f=ur(d,!1);if(Math.abs(f)<30)f*=60;c-=60000*f}return new Date(c)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};hg.floatTime=dg;hg.intTime=pg;hg.timestamp=na});var oa=m(function($g){var bg=$e(),Sg=Ht(),wg=Ie(),Eg=ze(),vg=rr(),ia=Zo(),pr=ea(),rs=sa(),Ng=Ft(),Og=or(),kg=zt(),Ag=cr(),dr=fr(),Lg=[bg.map,wg.seq,Eg.string,Sg.nullTag,ia.trueTag,ia.falseTag,rs.intBin,rs.intOct,rs.int,rs.intHex,pr.floatNaN,pr.floatExp,pr.float,vg.binary,Ng.merge,Og.omap,kg.pairs,Ag.set,dr.intTime,dr.floatTime,dr.timestamp];$g.schema=Lg});var ga=m(function(xg){var ua=$e(),Tg=Ht(),fa=Ie(),Dg=ze(),qg=Xs(),hr=Qs(),mr=Zs(),Rg=Uo(),Cg=Vo(),pa=rr(),st=Ft(),da=or(),ha=zt(),aa=oa(),ma=cr(),ns=fr(),la=new Map([["core",Rg.schema],["failsafe",[ua.map,fa.seq,Dg.string]],["json",Cg.schema],["yaml11",aa.schema],["yaml-1.1",aa.schema]]),ca={binary:pa.binary,bool:qg.boolTag,float:hr.float,floatExp:hr.floatExp,floatNaN:hr.floatNaN,floatTime:ns.floatTime,int:mr.int,intHex:mr.intHex,intOct:mr.intOct,intTime:ns.intTime,map:ua.map,merge:st.merge,null:Tg.nullTag,omap:da.omap,pairs:ha.pairs,seq:fa.seq,set:ma.set,timestamp:ns.timestamp},Mg={"tag:yaml.org,2002:binary":pa.binary,"tag:yaml.org,2002:merge":st.merge,"tag:yaml.org,2002:omap":da.omap,"tag:yaml.org,2002:pairs":ha.pairs,"tag:yaml.org,2002:set":ma.set,"tag:yaml.org,2002:timestamp":ns.timestamp};function Pg(e,t,s){let r=la.get(t);if(r&&!e)return s&&!r.includes(st.merge)?r.concat(st.merge):r.slice();let n=r;if(!n)if(Array.isArray(e))n=[];else{let i=Array.from(la.keys()).filter((o)=>o!=="yaml11").map((o)=>JSON.stringify(o)).join(", ");throw Error(`Unknown schema "${t}"; use one of ${i} or define customTags array`)}if(Array.isArray(e))for(let i of e)n=n.concat(i);else if(typeof e==="function")n=e(n.slice());if(s)n=n.concat(st.merge);return n.reduce((i,o)=>{let a=typeof o==="string"?ca[o]:o;if(!a){let l=JSON.stringify(o),c=Object.keys(ca).map((d)=>JSON.stringify(d)).join(", ");throw Error(`Unknown custom tag ${l}; use one of ${c}`)}if(!i.includes(a))i.push(a);return i},[])}xg.coreKnownTags=Mg;xg.getTags=Pg});var br=m(function(Vg){var gr=I(),Fg=$e(),Bg=Ie(),Ug=ze(),is=ga(),Kg=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;class yr{constructor({compat:e,customTags:t,merge:s,resolveKnownTags:r,schema:n,sortMapEntries:i,toStringDefaults:o}){this.compat=Array.isArray(e)?is.getTags(e,"compat"):e?is.getTags(null,e):null,this.name=typeof n==="string"&&n||"core",this.knownTags=r?is.coreKnownTags:{},this.tags=is.getTags(t,this.name,s),this.toStringOptions=o??null,Object.defineProperty(this,gr.MAP,{value:Fg.map}),Object.defineProperty(this,gr.SCALAR,{value:Ug.string}),Object.defineProperty(this,gr.SEQ,{value:Bg.seq}),this.sortMapEntries=typeof i==="function"?i:i===!0?Kg:null}clone(){let e=Object.create(yr.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}Vg.Schema=yr});var ya=m(function(Hg){var Yg=I(),Sr=Xe(),rt=Ye();function Jg(e,t){let s=[],r=t.directives===!0;if(t.directives!==!1&&e.directives){let l=e.directives.toString(e);if(l)s.push(l),r=!0;else if(e.directives.docStart)r=!0}if(r)s.push("---");let n=Sr.createStringifyContext(e,t),{commentString:i}=n.options;if(e.commentBefore){if(s.length!==1)s.unshift("");let l=i(e.commentBefore);s.unshift(rt.indentComment(l,""))}let o=!1,a=null;if(e.contents){if(Yg.isNode(e.contents)){if(e.contents.spaceBefore&&r)s.push("");if(e.contents.commentBefore){let d=i(e.contents.commentBefore);s.push(rt.indentComment(d,""))}n.forceBlockIndent=!!e.comment,a=e.contents.comment}let l=a?void 0:()=>o=!0,c=Sr.stringify(e.contents,n,()=>a=null,l);if(a)c+=rt.lineComment(c,"",i(a));if((c[0]==="|"||c[0]===">")&&s[s.length-1]==="---")s[s.length-1]=`--- ${c}`;else s.push(c)}else s.push(Sr.stringify(e.contents,n));if(e.directives?.docEnd)if(e.comment){let l=i(e.comment);if(l.includes(`
56
- `))s.push("..."),s.push(rt.indentComment(l,""));else s.push(`... ${l}`)}else s.push("...");else{let l=e.comment;if(l&&o)l=l.replace(/^\n+/,"");if(l){if((!o||a)&&s[s.length-1]!=="")s.push("");s.push(rt.indentComment(i(l),""))}}return s.join(`
55
+ ${i.comment}`:r.comment}r=n}e.items[s]=ts.isPair(r)?r:new or.Pair(r)}else t("Expected a sequence for this tag");return e}function Jo(e,t,s){let{replacer:r}=s,n=new Tm.YAMLSeq(e);n.tag="tag:yaml.org,2002:pairs";let i=0;if(t&&Symbol.iterator in Object(t))for(let o of t){if(typeof r==="function")o=r.call(t,String(i++),o);let a,l;if(Array.isArray(o))if(o.length===2)a=o[0],l=o[1];else throw TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){let c=Object.keys(o);if(c.length===1)a=c[0],l=o[a];else throw TypeError(`Expected tuple with one key, not ${c.length} keys`)}else a=o;n.items.push(or.createPair(a,l,s))}return n}var Dm={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Yo,createNode:Jo};qm.createPairs=Jo;qm.pairs=Dm;qm.resolvePairs=Yo});var lr=m(function(_m){var Ho=I(),ar=se(),tt=ae(),Pm=le(),Xo=ss();class ge extends Pm.YAMLSeq{constructor(){super();this.add=tt.YAMLMap.prototype.add.bind(this),this.delete=tt.YAMLMap.prototype.delete.bind(this),this.get=tt.YAMLMap.prototype.get.bind(this),this.has=tt.YAMLMap.prototype.has.bind(this),this.set=tt.YAMLMap.prototype.set.bind(this),this.tag=ge.tag}toJSON(e,t){if(!t)return super.toJSON(e);let s=new Map;if(t?.onCreate)t.onCreate(s);for(let r of this.items){let n,i;if(Ho.isPair(r))n=ar.toJS(r.key,"",t),i=ar.toJS(r.value,n,t);else n=ar.toJS(r,"",t);if(s.has(n))throw Error("Ordered maps must not include duplicate keys");s.set(n,i)}return s}static from(e,t,s){let r=Xo.createPairs(e,t,s),n=new this;return n.items=r.items,n}}ge.tag="tag:yaml.org,2002:omap";var xm={collection:"seq",identify:(e)=>e instanceof Map,nodeClass:ge,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){let s=Xo.resolvePairs(e,t),r=[];for(let{key:n}of s.items)if(Ho.isScalar(n))if(r.includes(n.value))t(`Ordered maps must not include duplicate keys: ${n.value}`);else r.push(n.value);return Object.assign(new ge,s)},createNode:(e,t,s)=>ge.from(e,t,s)};_m.YAMLOMap=ge;_m.omap=xm});var ea=m(function(Bm){var Wo=q();function Qo({value:e,source:t},s){if(t&&(e?zo:Zo).test.test(t))return t;return e?s.options.trueStr:s.options.falseStr}var zo={identify:(e)=>e===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new Wo.Scalar(!0),stringify:Qo},Zo={identify:(e)=>e===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new Wo.Scalar(!1),stringify:Qo};Bm.falseTag=Zo;Bm.trueTag=zo});var ta=m(function(Hm){var Vm=q(),cr=De(),Gm={identify:(e)=>typeof e==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:(e)=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:cr.stringifyNumber},Ym={identify:(e)=>typeof e==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:(e)=>parseFloat(e.replace(/_/g,"")),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():cr.stringifyNumber(e)}},Jm={identify:(e)=>typeof e==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){let t=new Vm.Scalar(parseFloat(e.replace(/_/g,""))),s=e.indexOf(".");if(s!==-1){let r=e.substring(s+1).replace(/_/g,"");if(r[r.length-1]==="0")t.minFractionDigits=r.length}return t},stringify:cr.stringifyNumber};Hm.float=Jm;Hm.floatExp=Ym;Hm.floatNaN=Gm});var ra=m(function(sg){var sa=De(),st=(e)=>typeof e==="bigint"||Number.isInteger(e);function rs(e,t,s,{intAsBigInt:r}){let n=e[0];if(n==="-"||n==="+")t+=1;if(e=e.substring(t).replace(/_/g,""),r){switch(s){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`;break}let o=BigInt(e);return n==="-"?BigInt(-1)*o:o}let i=parseInt(e,s);return n==="-"?-1*i:i}function ur(e,t,s){let{value:r}=e;if(st(r)){let n=r.toString(t);return r<0?"-"+s+n.substr(1):s+n}return sa.stringifyNumber(e)}var zm={identify:st,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,s)=>rs(e,2,2,s),stringify:(e)=>ur(e,2,"0b")},Zm={identify:st,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,s)=>rs(e,1,8,s),stringify:(e)=>ur(e,8,"0")},eg={identify:st,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,s)=>rs(e,0,10,s),stringify:sa.stringifyNumber},tg={identify:st,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,s)=>rs(e,2,16,s),stringify:(e)=>ur(e,16,"0x")};sg.int=eg;sg.intBin=zm;sg.intHex=tg;sg.intOct=Zm});var fr=m(function(lg){var os=I(),ns=ie(),is=ae();class ye extends is.YAMLMap{constructor(e){super(e);this.tag=ye.tag}add(e){let t;if(os.isPair(e))t=e;else if(e&&typeof e==="object"&&"key"in e&&"value"in e&&e.value===null)t=new ns.Pair(e.key,null);else t=new ns.Pair(e,null);if(!is.findPair(this.items,t.key))this.items.push(t)}get(e,t){let s=is.findPair(this.items,e);return!t&&os.isPair(s)?os.isScalar(s.key)?s.key.value:s.key:s}set(e,t){if(typeof t!=="boolean")throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let s=is.findPair(this.items,e);if(s&&!t)this.items.splice(this.items.indexOf(s),1);else if(!s&&t)this.items.push(new ns.Pair(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,s){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,s);else throw Error("Set items must all have null values")}static from(e,t,s){let{replacer:r}=s,n=new this(e);if(t&&Symbol.iterator in Object(t))for(let i of t){if(typeof r==="function")i=r.call(t,i,i);n.items.push(ns.createPair(i,null,s))}return n}}ye.tag="tag:yaml.org,2002:set";var ag={collection:"map",identify:(e)=>e instanceof Set,nodeClass:ye,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,s)=>ye.from(e,t,s),resolve(e,t){if(os.isMap(e))if(e.hasAllNullValues(!0))return Object.assign(new ye,e);else t("Set items must all have null values");else t("Expected a mapping for this tag");return e}};lg.YAMLSet=ye;lg.set=ag});var dr=m(function(hg){var fg=De();function pr(e,t){let s=e[0],r=s==="-"||s==="+"?e.substring(1):e,n=(o)=>t?BigInt(o):Number(o),i=r.replace(/_/g,"").split(":").reduce((o,a)=>o*n(60)+n(a),n(0));return s==="-"?n(-1)*i:i}function na(e){let{value:t}=e,s=(o)=>o;if(typeof t==="bigint")s=(o)=>BigInt(o);else if(isNaN(t)||!isFinite(t))return fg.stringifyNumber(e);let r="";if(t<0)r="-",t*=s(-1);let n=s(60),i=[t%n];if(t<60)i.unshift(0);else if(t=(t-i[0])/n,i.unshift(t%n),t>=60)t=(t-i[0])/n,i.unshift(t);return r+i.map((o)=>String(o).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var pg={identify:(e)=>typeof e==="bigint"||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:s})=>pr(e,s),stringify:na},dg={identify:(e)=>typeof e==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:(e)=>pr(e,!1),stringify:na},ia={identify:(e)=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){let t=e.match(ia.test);if(!t)throw Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,s,r,n,i,o,a]=t.map(Number),l=t[7]?Number((t[7]+"00").substr(1,3)):0,c=Date.UTC(s,r-1,n,i||0,o||0,a||0,l),d=t[8];if(d&&d!=="Z"){let f=pr(d,!1);if(Math.abs(f)<30)f*=60;c-=60000*f}return new Date(c)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};hg.floatTime=dg;hg.intTime=pg;hg.timestamp=ia});var aa=m(function($g){var bg=Ie(),Sg=zt(),wg=Te(),Eg=Ze(),vg=ir(),oa=ea(),hr=ta(),as=ra(),Ng=Vt(),Og=lr(),kg=ss(),Ag=fr(),mr=dr(),Lg=[bg.map,wg.seq,Eg.string,Sg.nullTag,oa.trueTag,oa.falseTag,as.intBin,as.intOct,as.int,as.intHex,hr.floatNaN,hr.floatExp,hr.float,vg.binary,Ng.merge,Og.omap,kg.pairs,Ag.set,mr.intTime,mr.floatTime,mr.timestamp];$g.schema=Lg});var ya=m(function(xg){var fa=Ie(),Tg=zt(),pa=Te(),Dg=Ze(),qg=Qs(),gr=Zs(),yr=tr(),Rg=Ko(),Cg=Go(),da=ir(),rt=Vt(),ha=lr(),ma=ss(),la=aa(),ga=fr(),ls=dr(),ca=new Map([["core",Rg.schema],["failsafe",[fa.map,pa.seq,Dg.string]],["json",Cg.schema],["yaml11",la.schema],["yaml-1.1",la.schema]]),ua={binary:da.binary,bool:qg.boolTag,float:gr.float,floatExp:gr.floatExp,floatNaN:gr.floatNaN,floatTime:ls.floatTime,int:yr.int,intHex:yr.intHex,intOct:yr.intOct,intTime:ls.intTime,map:fa.map,merge:rt.merge,null:Tg.nullTag,omap:ha.omap,pairs:ma.pairs,seq:pa.seq,set:ga.set,timestamp:ls.timestamp},Mg={"tag:yaml.org,2002:binary":da.binary,"tag:yaml.org,2002:merge":rt.merge,"tag:yaml.org,2002:omap":ha.omap,"tag:yaml.org,2002:pairs":ma.pairs,"tag:yaml.org,2002:set":ga.set,"tag:yaml.org,2002:timestamp":ls.timestamp};function Pg(e,t,s){let r=ca.get(t);if(r&&!e)return s&&!r.includes(rt.merge)?r.concat(rt.merge):r.slice();let n=r;if(!n)if(Array.isArray(e))n=[];else{let i=Array.from(ca.keys()).filter((o)=>o!=="yaml11").map((o)=>JSON.stringify(o)).join(", ");throw Error(`Unknown schema "${t}"; use one of ${i} or define customTags array`)}if(Array.isArray(e))for(let i of e)n=n.concat(i);else if(typeof e==="function")n=e(n.slice());if(s)n=n.concat(rt.merge);return n.reduce((i,o)=>{let a=typeof o==="string"?ua[o]:o;if(!a){let l=JSON.stringify(o),c=Object.keys(ua).map((d)=>JSON.stringify(d)).join(", ");throw Error(`Unknown custom tag ${l}; use one of ${c}`)}if(!i.includes(a))i.push(a);return i},[])}xg.coreKnownTags=Mg;xg.getTags=Pg});var wr=m(function(Vg){var br=I(),Fg=Ie(),Bg=Te(),Ug=Ze(),cs=ya(),Kg=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;class Sr{constructor({compat:e,customTags:t,merge:s,resolveKnownTags:r,schema:n,sortMapEntries:i,toStringDefaults:o}){this.compat=Array.isArray(e)?cs.getTags(e,"compat"):e?cs.getTags(null,e):null,this.name=typeof n==="string"&&n||"core",this.knownTags=r?cs.coreKnownTags:{},this.tags=cs.getTags(t,this.name,s),this.toStringOptions=o??null,Object.defineProperty(this,br.MAP,{value:Fg.map}),Object.defineProperty(this,br.SCALAR,{value:Ug.string}),Object.defineProperty(this,br.SEQ,{value:Bg.seq}),this.sortMapEntries=typeof i==="function"?i:i===!0?Kg:null}clone(){let e=Object.create(Sr.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}Vg.Schema=Sr});var ba=m(function(Hg){var Yg=I(),Er=We(),nt=Je();function Jg(e,t){let s=[],r=t.directives===!0;if(t.directives!==!1&&e.directives){let l=e.directives.toString(e);if(l)s.push(l),r=!0;else if(e.directives.docStart)r=!0}if(r)s.push("---");let n=Er.createStringifyContext(e,t),{commentString:i}=n.options;if(e.commentBefore){if(s.length!==1)s.unshift("");let l=i(e.commentBefore);s.unshift(nt.indentComment(l,""))}let o=!1,a=null;if(e.contents){if(Yg.isNode(e.contents)){if(e.contents.spaceBefore&&r)s.push("");if(e.contents.commentBefore){let d=i(e.contents.commentBefore);s.push(nt.indentComment(d,""))}n.forceBlockIndent=!!e.comment,a=e.contents.comment}let l=a?void 0:()=>o=!0,c=Er.stringify(e.contents,n,()=>a=null,l);if(a)c+=nt.lineComment(c,"",i(a));if((c[0]==="|"||c[0]===">")&&s[s.length-1]==="---")s[s.length-1]=`--- ${c}`;else s.push(c)}else s.push(Er.stringify(e.contents,n));if(e.directives?.docEnd)if(e.comment){let l=i(e.comment);if(l.includes(`
56
+ `))s.push("..."),s.push(nt.indentComment(l,""));else s.push(`... ${l}`)}else s.push("...");else{let l=e.comment;if(l&&o)l=l.replace(/^\n+/,"");if(l){if((!o||a)&&s[s.length-1]!=="")s.push("");s.push(nt.indentComment(i(l),""))}}return s.join(`
57
57
  `)+`
58
- `}Hg.stringifyDocument=Jg});var nt=m(function(ry){var Wg=Ve(),De=Rt(),V=I(),Qg=ie(),zg=se(),Zg=br(),ey=ya(),wr=Tt(),ty=js(),sy=Ge(),Er=_s();class vr{constructor(e,t,s){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,V.NODE_TYPE,{value:V.DOC});let r=null;if(typeof t==="function"||Array.isArray(t))r=t;else if(s===void 0&&t)s=t,t=void 0;let n=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},s);this.options=n;let{version:i}=n;if(s?._directives){if(this.directives=s._directives.atDocument(),this.directives.yaml.explicit)i=this.directives.yaml.version}else this.directives=new Er.Directives({version:i});this.setSchema(i,s),this.contents=e===void 0?null:this.createNode(e,r,s)}clone(){let e=Object.create(vr.prototype,{[V.NODE_TYPE]:{value:V.DOC}});if(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();if(e.schema=this.schema.clone(),e.contents=V.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range)e.range=this.range.slice();return e}add(e){if(qe(this.contents))this.contents.add(e)}addIn(e,t){if(qe(this.contents))this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let s=wr.anchorNames(this);e.anchor=!t||s.has(t)?wr.findNewAnchor(t||"a",s):t}return new Wg.Alias(e.anchor)}createNode(e,t,s){let r=void 0;if(typeof t==="function")e=t.call({"":e},"",e),r=t;else if(Array.isArray(t)){let h=(E)=>typeof E==="number"||E instanceof String||E instanceof Number,g=t.filter(h).map(String);if(g.length>0)t=t.concat(g);r=t}else if(s===void 0&&t)s=t,t=void 0;let{aliasDuplicateObjects:n,anchorPrefix:i,flow:o,keepUndefined:a,onTagObj:l,tag:c}=s??{},{onAnchor:d,setAnchors:f,sourceObjects:u}=wr.createNodeAnchors(this,i||"a"),p={aliasDuplicateObjects:n??!0,keepUndefined:a??!1,onAnchor:d,onTagObj:l,replacer:r,schema:this.schema,sourceObjects:u},y=sy.createNode(e,c,p);if(o&&V.isCollection(y))y.flow=!0;return f(),y}createPair(e,t,s={}){let r=this.createNode(e,null,s),n=this.createNode(t,null,s);return new Qg.Pair(r,n)}delete(e){return qe(this.contents)?this.contents.delete(e):!1}deleteIn(e){if(De.isEmptyPath(e)){if(this.contents==null)return!1;return this.contents=null,!0}return qe(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return V.isCollection(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){if(De.isEmptyPath(e))return!t&&V.isScalar(this.contents)?this.contents.value:this.contents;return V.isCollection(this.contents)?this.contents.getIn(e,t):void 0}has(e){return V.isCollection(this.contents)?this.contents.has(e):!1}hasIn(e){if(De.isEmptyPath(e))return this.contents!==void 0;return V.isCollection(this.contents)?this.contents.hasIn(e):!1}set(e,t){if(this.contents==null)this.contents=De.collectionFromPath(this.schema,[e],t);else if(qe(this.contents))this.contents.set(e,t)}setIn(e,t){if(De.isEmptyPath(e))this.contents=t;else if(this.contents==null)this.contents=De.collectionFromPath(this.schema,Array.from(e),t);else if(qe(this.contents))this.contents.setIn(e,t)}setSchema(e,t={}){if(typeof e==="number")e=String(e);let s;switch(e){case"1.1":if(this.directives)this.directives.yaml.version="1.1";else this.directives=new Er.Directives({version:"1.1"});s={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":if(this.directives)this.directives.yaml.version=e;else this.directives=new Er.Directives({version:e});s={resolveKnownTags:!0,schema:"core"};break;case null:if(this.directives)delete this.directives;s=null;break;default:{let r=JSON.stringify(e);throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${r}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(s)this.schema=new Zg.Schema(Object.assign(s,t));else throw Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:t,mapAsMap:s,maxAliasCount:r,onAnchor:n,reviver:i}={}){let o={anchors:new Map,doc:this,keep:!e,mapAsMap:s===!0,mapKeyWarned:!1,maxAliasCount:typeof r==="number"?r:100},a=zg.toJS(this.contents,t??"",o);if(typeof n==="function")for(let{count:l,res:c}of o.anchors.values())n(c,l);return typeof i==="function"?ty.applyReviver(i,{"":a},"",a):a}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let t=JSON.stringify(e.indent);throw Error(`"indent" option must be a positive integer, not ${t}`)}return ey.stringifyDocument(this,e)}}function qe(e){if(V.isCollection(e))return!0;throw Error("Expected a YAML collection as document contents")}ry.Document=vr});var it=m(function(oy){class os extends Error{constructor(e,t,s,r){super();this.name=e,this.code=s,this.message=r,this.pos=t}}class ba extends os{constructor(e,t,s){super("YAMLParseError",e,t,s)}}class Sa extends os{constructor(e,t,s){super("YAMLWarning",e,t,s)}}var iy=(e,t)=>(s)=>{if(s.pos[0]===-1)return;s.linePos=s.pos.map((a)=>t.linePos(a));let{line:r,col:n}=s.linePos[0];s.message+=` at line ${r}, column ${n}`;let i=n-1,o=e.substring(t.lineStarts[r-1],t.lineStarts[r]).replace(/[\n\r]+$/,"");if(i>=60&&o.length>80){let a=Math.min(i-39,o.length-79);o="\u2026"+o.substring(a),i-=a-1}if(o.length>80)o=o.substring(0,79)+"\u2026";if(r>1&&/^ *$/.test(o.substring(0,i))){let a=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);if(a.length>80)a=a.substring(0,79)+`\u2026
58
+ `}Hg.stringifyDocument=Jg});var it=m(function(ry){var Wg=Ge(),qe=xt(),V=I(),Qg=ie(),zg=se(),Zg=wr(),ey=ba(),vr=Ct(),ty=Bs(),sy=Ye(),Nr=Fs();class Or{constructor(e,t,s){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,V.NODE_TYPE,{value:V.DOC});let r=null;if(typeof t==="function"||Array.isArray(t))r=t;else if(s===void 0&&t)s=t,t=void 0;let n=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},s);this.options=n;let{version:i}=n;if(s?._directives){if(this.directives=s._directives.atDocument(),this.directives.yaml.explicit)i=this.directives.yaml.version}else this.directives=new Nr.Directives({version:i});this.setSchema(i,s),this.contents=e===void 0?null:this.createNode(e,r,s)}clone(){let e=Object.create(Or.prototype,{[V.NODE_TYPE]:{value:V.DOC}});if(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();if(e.schema=this.schema.clone(),e.contents=V.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range)e.range=this.range.slice();return e}add(e){if(Re(this.contents))this.contents.add(e)}addIn(e,t){if(Re(this.contents))this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let s=vr.anchorNames(this);e.anchor=!t||s.has(t)?vr.findNewAnchor(t||"a",s):t}return new Wg.Alias(e.anchor)}createNode(e,t,s){let r=void 0;if(typeof t==="function")e=t.call({"":e},"",e),r=t;else if(Array.isArray(t)){let h=(E)=>typeof E==="number"||E instanceof String||E instanceof Number,g=t.filter(h).map(String);if(g.length>0)t=t.concat(g);r=t}else if(s===void 0&&t)s=t,t=void 0;let{aliasDuplicateObjects:n,anchorPrefix:i,flow:o,keepUndefined:a,onTagObj:l,tag:c}=s??{},{onAnchor:d,setAnchors:f,sourceObjects:u}=vr.createNodeAnchors(this,i||"a"),p={aliasDuplicateObjects:n??!0,keepUndefined:a??!1,onAnchor:d,onTagObj:l,replacer:r,schema:this.schema,sourceObjects:u},y=sy.createNode(e,c,p);if(o&&V.isCollection(y))y.flow=!0;return f(),y}createPair(e,t,s={}){let r=this.createNode(e,null,s),n=this.createNode(t,null,s);return new Qg.Pair(r,n)}delete(e){return Re(this.contents)?this.contents.delete(e):!1}deleteIn(e){if(qe.isEmptyPath(e)){if(this.contents==null)return!1;return this.contents=null,!0}return Re(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return V.isCollection(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){if(qe.isEmptyPath(e))return!t&&V.isScalar(this.contents)?this.contents.value:this.contents;return V.isCollection(this.contents)?this.contents.getIn(e,t):void 0}has(e){return V.isCollection(this.contents)?this.contents.has(e):!1}hasIn(e){if(qe.isEmptyPath(e))return this.contents!==void 0;return V.isCollection(this.contents)?this.contents.hasIn(e):!1}set(e,t){if(this.contents==null)this.contents=qe.collectionFromPath(this.schema,[e],t);else if(Re(this.contents))this.contents.set(e,t)}setIn(e,t){if(qe.isEmptyPath(e))this.contents=t;else if(this.contents==null)this.contents=qe.collectionFromPath(this.schema,Array.from(e),t);else if(Re(this.contents))this.contents.setIn(e,t)}setSchema(e,t={}){if(typeof e==="number")e=String(e);let s;switch(e){case"1.1":if(this.directives)this.directives.yaml.version="1.1";else this.directives=new Nr.Directives({version:"1.1"});s={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":if(this.directives)this.directives.yaml.version=e;else this.directives=new Nr.Directives({version:e});s={resolveKnownTags:!0,schema:"core"};break;case null:if(this.directives)delete this.directives;s=null;break;default:{let r=JSON.stringify(e);throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${r}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(s)this.schema=new Zg.Schema(Object.assign(s,t));else throw Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:t,mapAsMap:s,maxAliasCount:r,onAnchor:n,reviver:i}={}){let o={anchors:new Map,doc:this,keep:!e,mapAsMap:s===!0,mapKeyWarned:!1,maxAliasCount:typeof r==="number"?r:100},a=zg.toJS(this.contents,t??"",o);if(typeof n==="function")for(let{count:l,res:c}of o.anchors.values())n(c,l);return typeof i==="function"?ty.applyReviver(i,{"":a},"",a):a}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let t=JSON.stringify(e.indent);throw Error(`"indent" option must be a positive integer, not ${t}`)}return ey.stringifyDocument(this,e)}}function Re(e){if(V.isCollection(e))return!0;throw Error("Expected a YAML collection as document contents")}ry.Document=Or});var ot=m(function(oy){class us extends Error{constructor(e,t,s,r){super();this.name=e,this.code=s,this.message=r,this.pos=t}}class Sa extends us{constructor(e,t,s){super("YAMLParseError",e,t,s)}}class wa extends us{constructor(e,t,s){super("YAMLWarning",e,t,s)}}var iy=(e,t)=>(s)=>{if(s.pos[0]===-1)return;s.linePos=s.pos.map((a)=>t.linePos(a));let{line:r,col:n}=s.linePos[0];s.message+=` at line ${r}, column ${n}`;let i=n-1,o=e.substring(t.lineStarts[r-1],t.lineStarts[r]).replace(/[\n\r]+$/,"");if(i>=60&&o.length>80){let a=Math.min(i-39,o.length-79);o="\u2026"+o.substring(a),i-=a-1}if(o.length>80)o=o.substring(0,79)+"\u2026";if(r>1&&/^ *$/.test(o.substring(0,i))){let a=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);if(a.length>80)a=a.substring(0,79)+`\u2026
59
59
  `;o=a+o}if(/[^ ]/.test(o)){let a=1,l=s.linePos[1];if(l?.line===r&&l.col>n)a=Math.max(1,Math.min(l.col-n,80-i));let c=" ".repeat(i)+"^".repeat(a);s.message+=`:
60
60
 
61
61
  ${o}
62
62
  ${c}
63
- `}};oy.YAMLError=os;oy.YAMLParseError=ba;oy.YAMLWarning=Sa;oy.prettifyError=iy});var ot=m(function(py){function fy(e,{flow:t,indicator:s,next:r,offset:n,onError:i,parentIndent:o,startOnNewline:a}){let l=!1,c=a,d=a,f="",u="",p=!1,y=!1,h=null,g=null,E=null,v=null,N=null,O=null,k=null;for(let w of e){if(y){if(w.type!=="space"&&w.type!=="newline"&&w.type!=="comma")i(w.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");y=!1}if(h){if(c&&w.type!=="comment"&&w.type!=="newline")i(h,"TAB_AS_INDENT","Tabs are not allowed as indentation");h=null}switch(w.type){case"space":if(!t&&(s!=="doc-start"||r?.type!=="flow-collection")&&w.source.includes("\t"))h=w;d=!0;break;case"comment":{if(!d)i(w,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let R=w.source.substring(1)||" ";if(!f)f=R;else f+=u+R;u="",c=!1;break}case"newline":if(c){if(f)f+=w.source;else if(!O||s!=="seq-item-ind")l=!0}else u+=w.source;if(c=!0,p=!0,g||E)v=w;d=!0;break;case"anchor":if(g)i(w,"MULTIPLE_ANCHORS","A node can have at most one anchor");if(w.source.endsWith(":"))i(w.offset+w.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0);g=w,k??(k=w.offset),c=!1,d=!1,y=!0;break;case"tag":{if(E)i(w,"MULTIPLE_TAGS","A node can have at most one tag");E=w,k??(k=w.offset),c=!1,d=!1,y=!0;break}case s:if(g||E)i(w,"BAD_PROP_ORDER",`Anchors and tags must be after the ${w.source} indicator`);if(O)i(w,"UNEXPECTED_TOKEN",`Unexpected ${w.source} in ${t??"collection"}`);O=w,c=s==="seq-item-ind"||s==="explicit-key-ind",d=!1;break;case"comma":if(t){if(N)i(w,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`);N=w,c=!1,d=!1;break}default:i(w,"UNEXPECTED_TOKEN",`Unexpected ${w.type} token`),c=!1,d=!1}}let L=e[e.length-1],T=L?L.offset+L.source.length:n;if(y&&r&&r.type!=="space"&&r.type!=="newline"&&r.type!=="comma"&&(r.type!=="scalar"||r.source!==""))i(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");if(h&&(c&&h.indent<=o||r?.type==="block-map"||r?.type==="block-seq"))i(h,"TAB_AS_INDENT","Tabs are not allowed as indentation");return{comma:N,found:O,spaceBefore:l,comment:f,hasNewline:p,anchor:g,tag:E,newlineAfterProp:v,end:T,start:k??T}}py.resolveProps=fy});var as=m(function(hy){function Nr(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes(`
64
- `))return!0;if(e.end){for(let t of e.end)if(t.type==="newline")return!0}return!1;case"flow-collection":for(let t of e.items){for(let s of t.start)if(s.type==="newline")return!0;if(t.sep){for(let s of t.sep)if(s.type==="newline")return!0}if(Nr(t.key)||Nr(t.value))return!0}return!1;default:return!0}}hy.containsNewline=Nr});var Or=m(function(by){var gy=as();function yy(e,t,s){if(t?.type==="flow-collection"){let r=t.end[0];if(r.indent===e&&(r.source==="]"||r.source==="}")&&gy.containsNewline(t))s(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}by.flowIndentCheck=yy});var kr=m(function(Ey){var wa=I();function wy(e,t,s){let{uniqueKeys:r}=e.options;if(r===!1)return!1;let n=typeof r==="function"?r:(i,o)=>i===o||wa.isScalar(i)&&wa.isScalar(o)&&i.value===o.value;return t.some((i)=>n(i.key,s))}Ey.mapIncludes=wy});var ka=m(function(Ly){var Ea=ie(),Ny=ae(),va=ot(),Oy=as(),Na=Or(),ky=kr(),Oa="All mapping items must start at the same column";function Ay({composeNode:e,composeEmptyNode:t},s,r,n,i){let a=new(i?.nodeClass??Ny.YAMLMap)(s.schema);if(s.atRoot)s.atRoot=!1;let l=r.offset,c=null;for(let d of r.items){let{start:f,key:u,sep:p,value:y}=d,h=va.resolveProps(f,{indicator:"explicit-key-ind",next:u??p?.[0],offset:l,onError:n,parentIndent:r.indent,startOnNewline:!0}),g=!h.found;if(g){if(u){if(u.type==="block-seq")n(l,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key");else if("indent"in u&&u.indent!==r.indent)n(l,"BAD_INDENT",Oa)}if(!h.anchor&&!h.tag&&!p){if(c=h.end,h.comment)if(a.comment)a.comment+=`
65
- `+h.comment;else a.comment=h.comment;continue}if(h.newlineAfterProp||Oy.containsNewline(u))n(u??f[f.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else if(h.found?.indent!==r.indent)n(l,"BAD_INDENT",Oa);s.atKey=!0;let E=h.end,v=u?e(s,u,h,n):t(s,E,f,null,h,n);if(s.schema.compat)Na.flowIndentCheck(r.indent,u,n);if(s.atKey=!1,ky.mapIncludes(s,a.items,v))n(E,"DUPLICATE_KEY","Map keys must be unique");let N=va.resolveProps(p??[],{indicator:"map-value-ind",next:y,offset:v.range[2],onError:n,parentIndent:r.indent,startOnNewline:!u||u.type==="block-scalar"});if(l=N.end,N.found){if(g){if(y?.type==="block-map"&&!N.hasNewline)n(l,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings");if(s.options.strict&&h.start<N.found.offset-1024)n(v.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key")}let O=y?e(s,y,N,n):t(s,l,p,null,N,n);if(s.schema.compat)Na.flowIndentCheck(r.indent,y,n);l=O.range[2];let k=new Ea.Pair(v,O);if(s.options.keepSourceTokens)k.srcToken=d;a.items.push(k)}else{if(g)n(v.range,"MISSING_CHAR","Implicit map keys need to be followed by map values");if(N.comment)if(v.comment)v.comment+=`
66
- `+N.comment;else v.comment=N.comment;let O=new Ea.Pair(v);if(s.options.keepSourceTokens)O.srcToken=d;a.items.push(O)}}if(c&&c<l)n(c,"IMPOSSIBLE","Map comment with trailing content");return a.range=[r.offset,l,c??l],a}Ly.resolveBlockMap=Ay});var Aa=m(function(Ry){var Iy=le(),Ty=ot(),Dy=Or();function qy({composeNode:e,composeEmptyNode:t},s,r,n,i){let a=new(i?.nodeClass??Iy.YAMLSeq)(s.schema);if(s.atRoot)s.atRoot=!1;if(s.atKey)s.atKey=!1;let l=r.offset,c=null;for(let{start:d,value:f}of r.items){let u=Ty.resolveProps(d,{indicator:"seq-item-ind",next:f,offset:l,onError:n,parentIndent:r.indent,startOnNewline:!0});if(!u.found)if(u.anchor||u.tag||f)if(f?.type==="block-seq")n(u.end,"BAD_INDENT","All sequence items must start at the same column");else n(l,"MISSING_CHAR","Sequence item without - indicator");else{if(c=u.end,u.comment)a.comment=u.comment;continue}let p=f?e(s,f,u,n):t(s,u.end,d,null,u,n);if(s.schema.compat)Dy.flowIndentCheck(r.indent,f,n);l=p.range[2],a.items.push(p)}return a.range=[r.offset,l,c??l],a}Ry.resolveBlockSeq=qy});var Re=m(function(Py){function My(e,t,s,r){let n="";if(e){let i=!1,o="";for(let a of e){let{source:l,type:c}=a;switch(c){case"space":i=!0;break;case"comment":{if(s&&!i)r(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let d=l.substring(1)||" ";if(!n)n=d;else n+=o+d;o="";break}case"newline":if(n)o+=l;i=!0;break;default:r(a,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}t+=l.length}}return{comment:n,offset:t}}Py.resolveEnd=My});var Ia=m(function(Gy){var _y=I(),jy=ie(),La=ae(),Fy=le(),By=Re(),$a=ot(),Uy=as(),Ky=kr(),Ar="Block collections are not allowed within flow collections",Lr=(e)=>e&&(e.type==="block-map"||e.type==="block-seq");function Vy({composeNode:e,composeEmptyNode:t},s,r,n,i){let o=r.start.source==="{",a=o?"flow map":"flow sequence",c=new(i?.nodeClass??(o?La.YAMLMap:Fy.YAMLSeq))(s.schema);c.flow=!0;let d=s.atRoot;if(d)s.atRoot=!1;if(s.atKey)s.atKey=!1;let f=r.offset+r.start.source.length;for(let g=0;g<r.items.length;++g){let E=r.items[g],{start:v,key:N,sep:O,value:k}=E,L=$a.resolveProps(v,{flow:a,indicator:"explicit-key-ind",next:N??O?.[0],offset:f,onError:n,parentIndent:r.indent,startOnNewline:!1});if(!L.found){if(!L.anchor&&!L.tag&&!O&&!k){if(g===0&&L.comma)n(L.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`);else if(g<r.items.length-1)n(L.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${a}`);if(L.comment)if(c.comment)c.comment+=`
63
+ `}};oy.YAMLError=us;oy.YAMLParseError=Sa;oy.YAMLWarning=wa;oy.prettifyError=iy});var at=m(function(py){function fy(e,{flow:t,indicator:s,next:r,offset:n,onError:i,parentIndent:o,startOnNewline:a}){let l=!1,c=a,d=a,f="",u="",p=!1,y=!1,h=null,g=null,E=null,v=null,N=null,O=null,k=null;for(let w of e){if(y){if(w.type!=="space"&&w.type!=="newline"&&w.type!=="comma")i(w.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");y=!1}if(h){if(c&&w.type!=="comment"&&w.type!=="newline")i(h,"TAB_AS_INDENT","Tabs are not allowed as indentation");h=null}switch(w.type){case"space":if(!t&&(s!=="doc-start"||r?.type!=="flow-collection")&&w.source.includes("\t"))h=w;d=!0;break;case"comment":{if(!d)i(w,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let R=w.source.substring(1)||" ";if(!f)f=R;else f+=u+R;u="",c=!1;break}case"newline":if(c){if(f)f+=w.source;else if(!O||s!=="seq-item-ind")l=!0}else u+=w.source;if(c=!0,p=!0,g||E)v=w;d=!0;break;case"anchor":if(g)i(w,"MULTIPLE_ANCHORS","A node can have at most one anchor");if(w.source.endsWith(":"))i(w.offset+w.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0);g=w,k??(k=w.offset),c=!1,d=!1,y=!0;break;case"tag":{if(E)i(w,"MULTIPLE_TAGS","A node can have at most one tag");E=w,k??(k=w.offset),c=!1,d=!1,y=!0;break}case s:if(g||E)i(w,"BAD_PROP_ORDER",`Anchors and tags must be after the ${w.source} indicator`);if(O)i(w,"UNEXPECTED_TOKEN",`Unexpected ${w.source} in ${t??"collection"}`);O=w,c=s==="seq-item-ind"||s==="explicit-key-ind",d=!1;break;case"comma":if(t){if(N)i(w,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`);N=w,c=!1,d=!1;break}default:i(w,"UNEXPECTED_TOKEN",`Unexpected ${w.type} token`),c=!1,d=!1}}let L=e[e.length-1],T=L?L.offset+L.source.length:n;if(y&&r&&r.type!=="space"&&r.type!=="newline"&&r.type!=="comma"&&(r.type!=="scalar"||r.source!==""))i(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");if(h&&(c&&h.indent<=o||r?.type==="block-map"||r?.type==="block-seq"))i(h,"TAB_AS_INDENT","Tabs are not allowed as indentation");return{comma:N,found:O,spaceBefore:l,comment:f,hasNewline:p,anchor:g,tag:E,newlineAfterProp:v,end:T,start:k??T}}py.resolveProps=fy});var fs=m(function(hy){function kr(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes(`
64
+ `))return!0;if(e.end){for(let t of e.end)if(t.type==="newline")return!0}return!1;case"flow-collection":for(let t of e.items){for(let s of t.start)if(s.type==="newline")return!0;if(t.sep){for(let s of t.sep)if(s.type==="newline")return!0}if(kr(t.key)||kr(t.value))return!0}return!1;default:return!0}}hy.containsNewline=kr});var Ar=m(function(by){var gy=fs();function yy(e,t,s){if(t?.type==="flow-collection"){let r=t.end[0];if(r.indent===e&&(r.source==="]"||r.source==="}")&&gy.containsNewline(t))s(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}by.flowIndentCheck=yy});var Lr=m(function(Ey){var Ea=I();function wy(e,t,s){let{uniqueKeys:r}=e.options;if(r===!1)return!1;let n=typeof r==="function"?r:(i,o)=>i===o||Ea.isScalar(i)&&Ea.isScalar(o)&&i.value===o.value;return t.some((i)=>n(i.key,s))}Ey.mapIncludes=wy});var Aa=m(function(Ly){var va=ie(),Ny=ae(),Na=at(),Oy=fs(),Oa=Ar(),ky=Lr(),ka="All mapping items must start at the same column";function Ay({composeNode:e,composeEmptyNode:t},s,r,n,i){let a=new(i?.nodeClass??Ny.YAMLMap)(s.schema);if(s.atRoot)s.atRoot=!1;let l=r.offset,c=null;for(let d of r.items){let{start:f,key:u,sep:p,value:y}=d,h=Na.resolveProps(f,{indicator:"explicit-key-ind",next:u??p?.[0],offset:l,onError:n,parentIndent:r.indent,startOnNewline:!0}),g=!h.found;if(g){if(u){if(u.type==="block-seq")n(l,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key");else if("indent"in u&&u.indent!==r.indent)n(l,"BAD_INDENT",ka)}if(!h.anchor&&!h.tag&&!p){if(c=h.end,h.comment)if(a.comment)a.comment+=`
65
+ `+h.comment;else a.comment=h.comment;continue}if(h.newlineAfterProp||Oy.containsNewline(u))n(u??f[f.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else if(h.found?.indent!==r.indent)n(l,"BAD_INDENT",ka);s.atKey=!0;let E=h.end,v=u?e(s,u,h,n):t(s,E,f,null,h,n);if(s.schema.compat)Oa.flowIndentCheck(r.indent,u,n);if(s.atKey=!1,ky.mapIncludes(s,a.items,v))n(E,"DUPLICATE_KEY","Map keys must be unique");let N=Na.resolveProps(p??[],{indicator:"map-value-ind",next:y,offset:v.range[2],onError:n,parentIndent:r.indent,startOnNewline:!u||u.type==="block-scalar"});if(l=N.end,N.found){if(g){if(y?.type==="block-map"&&!N.hasNewline)n(l,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings");if(s.options.strict&&h.start<N.found.offset-1024)n(v.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key")}let O=y?e(s,y,N,n):t(s,l,p,null,N,n);if(s.schema.compat)Oa.flowIndentCheck(r.indent,y,n);l=O.range[2];let k=new va.Pair(v,O);if(s.options.keepSourceTokens)k.srcToken=d;a.items.push(k)}else{if(g)n(v.range,"MISSING_CHAR","Implicit map keys need to be followed by map values");if(N.comment)if(v.comment)v.comment+=`
66
+ `+N.comment;else v.comment=N.comment;let O=new va.Pair(v);if(s.options.keepSourceTokens)O.srcToken=d;a.items.push(O)}}if(c&&c<l)n(c,"IMPOSSIBLE","Map comment with trailing content");return a.range=[r.offset,l,c??l],a}Ly.resolveBlockMap=Ay});var La=m(function(Ry){var Iy=le(),Ty=at(),Dy=Ar();function qy({composeNode:e,composeEmptyNode:t},s,r,n,i){let a=new(i?.nodeClass??Iy.YAMLSeq)(s.schema);if(s.atRoot)s.atRoot=!1;if(s.atKey)s.atKey=!1;let l=r.offset,c=null;for(let{start:d,value:f}of r.items){let u=Ty.resolveProps(d,{indicator:"seq-item-ind",next:f,offset:l,onError:n,parentIndent:r.indent,startOnNewline:!0});if(!u.found)if(u.anchor||u.tag||f)if(f?.type==="block-seq")n(u.end,"BAD_INDENT","All sequence items must start at the same column");else n(l,"MISSING_CHAR","Sequence item without - indicator");else{if(c=u.end,u.comment)a.comment=u.comment;continue}let p=f?e(s,f,u,n):t(s,u.end,d,null,u,n);if(s.schema.compat)Dy.flowIndentCheck(r.indent,f,n);l=p.range[2],a.items.push(p)}return a.range=[r.offset,l,c??l],a}Ry.resolveBlockSeq=qy});var Ce=m(function(Py){function My(e,t,s,r){let n="";if(e){let i=!1,o="";for(let a of e){let{source:l,type:c}=a;switch(c){case"space":i=!0;break;case"comment":{if(s&&!i)r(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let d=l.substring(1)||" ";if(!n)n=d;else n+=o+d;o="";break}case"newline":if(n)o+=l;i=!0;break;default:r(a,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}t+=l.length}}return{comment:n,offset:t}}Py.resolveEnd=My});var Ta=m(function(Gy){var _y=I(),jy=ie(),$a=ae(),Fy=le(),By=Ce(),Ia=at(),Uy=fs(),Ky=Lr(),$r="Block collections are not allowed within flow collections",Ir=(e)=>e&&(e.type==="block-map"||e.type==="block-seq");function Vy({composeNode:e,composeEmptyNode:t},s,r,n,i){let o=r.start.source==="{",a=o?"flow map":"flow sequence",c=new(i?.nodeClass??(o?$a.YAMLMap:Fy.YAMLSeq))(s.schema);c.flow=!0;let d=s.atRoot;if(d)s.atRoot=!1;if(s.atKey)s.atKey=!1;let f=r.offset+r.start.source.length;for(let g=0;g<r.items.length;++g){let E=r.items[g],{start:v,key:N,sep:O,value:k}=E,L=Ia.resolveProps(v,{flow:a,indicator:"explicit-key-ind",next:N??O?.[0],offset:f,onError:n,parentIndent:r.indent,startOnNewline:!1});if(!L.found){if(!L.anchor&&!L.tag&&!O&&!k){if(g===0&&L.comma)n(L.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`);else if(g<r.items.length-1)n(L.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${a}`);if(L.comment)if(c.comment)c.comment+=`
67
67
  `+L.comment;else c.comment=L.comment;f=L.end;continue}if(!o&&s.options.strict&&Uy.containsNewline(N))n(N,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(g===0){if(L.comma)n(L.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`)}else{if(!L.comma)n(L.start,"MISSING_CHAR",`Missing , between ${a} items`);if(L.comment){let T="";e:for(let w of v)switch(w.type){case"comma":case"space":break;case"comment":T=w.source.substring(1);break e;default:break e}if(T){let w=c.items[c.items.length-1];if(_y.isPair(w))w=w.value??w.key;if(w.comment)w.comment+=`
68
- `+T;else w.comment=T;L.comment=L.comment.substring(T.length+1)}}}if(!o&&!O&&!L.found){let T=k?e(s,k,L,n):t(s,L.end,O,null,L,n);if(c.items.push(T),f=T.range[2],Lr(k))n(T.range,"BLOCK_IN_FLOW",Ar)}else{s.atKey=!0;let T=L.end,w=N?e(s,N,L,n):t(s,T,v,null,L,n);if(Lr(N))n(w.range,"BLOCK_IN_FLOW",Ar);s.atKey=!1;let R=$a.resolveProps(O??[],{flow:a,indicator:"map-value-ind",next:k,offset:w.range[2],onError:n,parentIndent:r.indent,startOnNewline:!1});if(R.found){if(!o&&!L.found&&s.options.strict){if(O)for(let C of O){if(C===R.found)break;if(C.type==="newline"){n(C,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}if(L.start<R.found.offset-1024)n(R.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else if(k)if("source"in k&&k.source?.[0]===":")n(k,"MISSING_CHAR",`Missing space after : in ${a}`);else n(R.start,"MISSING_CHAR",`Missing , or : between ${a} items`);let ee=k?e(s,k,R,n):R.found?t(s,R.end,O,null,R,n):null;if(ee){if(Lr(k))n(ee.range,"BLOCK_IN_FLOW",Ar)}else if(R.comment)if(w.comment)w.comment+=`
69
- `+R.comment;else w.comment=R.comment;let Ee=new jy.Pair(w,ee);if(s.options.keepSourceTokens)Ee.srcToken=E;if(o){let C=c;if(Ky.mapIncludes(s,C.items,w))n(T,"DUPLICATE_KEY","Map keys must be unique");C.items.push(Ee)}else{let C=new La.YAMLMap(s.schema);C.flow=!0,C.items.push(Ee);let tn=(ee??w).range;C.range=[w.range[0],tn[1],tn[2]],c.items.push(C)}f=ee?ee.range[2]:R.end}}let u=o?"}":"]",[p,...y]=r.end,h=f;if(p?.source===u)h=p.offset+p.source.length;else{let g=a[0].toUpperCase()+a.substring(1),E=d?`${g} must end with a ${u}`:`${g} in block collection must be sufficiently indented and end with a ${u}`;if(n(f,d?"MISSING_CHAR":"BAD_INDENT",E),p&&p.source.length!==1)y.unshift(p)}if(y.length>0){let g=By.resolveEnd(y,h,s.options.strict,n);if(g.comment)if(c.comment)c.comment+=`
70
- `+g.comment;else c.comment=g.comment;c.range=[r.offset,h,g.offset]}else c.range=[r.offset,h,h];return c}Gy.resolveFlowCollection=Vy});var Ta=m(function(tb){var Jy=I(),Hy=q(),Xy=ae(),Wy=le(),Qy=ka(),zy=Aa(),Zy=Ia();function $r(e,t,s,r,n,i){let o=s.type==="block-map"?Qy.resolveBlockMap(e,t,s,r,i):s.type==="block-seq"?zy.resolveBlockSeq(e,t,s,r,i):Zy.resolveFlowCollection(e,t,s,r,i),a=o.constructor;if(n==="!"||n===a.tagName)return o.tag=a.tagName,o;if(n)o.tag=n;return o}function eb(e,t,s,r,n){let i=r.tag,o=!i?null:t.directives.tagName(i.source,(u)=>n(i,"TAG_RESOLVE_FAILED",u));if(s.type==="block-seq"){let{anchor:u,newlineAfterProp:p}=r,y=u&&i?u.offset>i.offset?u:i:u??i;if(y&&(!p||p.offset<y.offset))n(y,"MISSING_CHAR","Missing newline after block sequence props")}let a=s.type==="block-map"?"map":s.type==="block-seq"?"seq":s.start.source==="{"?"map":"seq";if(!i||!o||o==="!"||o===Xy.YAMLMap.tagName&&a==="map"||o===Wy.YAMLSeq.tagName&&a==="seq")return $r(e,t,s,n,o);let l=t.schema.tags.find((u)=>u.tag===o&&u.collection===a);if(!l){let u=t.schema.knownTags[o];if(u?.collection===a)t.schema.tags.push(Object.assign({},u,{default:!1})),l=u;else{if(u)n(i,"BAD_COLLECTION_TYPE",`${u.tag} used for ${a} collection, but expects ${u.collection??"scalar"}`,!0);else n(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0);return $r(e,t,s,n,o)}}let c=$r(e,t,s,n,o,l),d=l.resolve?.(c,(u)=>n(i,"TAG_RESOLVE_FAILED",u),t.options)??c,f=Jy.isNode(d)?d:new Hy.Scalar(d);if(f.range=c.range,f.tag=o,l?.format)f.format=l.format;return f}tb.composeCollection=eb});var Tr=m(function(ob){var Ir=q();function rb(e,t,s){let r=t.offset,n=nb(t,e.options.strict,s);if(!n)return{value:"",type:null,comment:"",range:[r,r,r]};let i=n.mode===">"?Ir.Scalar.BLOCK_FOLDED:Ir.Scalar.BLOCK_LITERAL,o=t.source?ib(t.source):[],a=o.length;for(let h=o.length-1;h>=0;--h){let g=o[h][1];if(g===""||g==="\r")a=h;else break}if(a===0){let h=n.chomp==="+"&&o.length>0?`
68
+ `+T;else w.comment=T;L.comment=L.comment.substring(T.length+1)}}}if(!o&&!O&&!L.found){let T=k?e(s,k,L,n):t(s,L.end,O,null,L,n);if(c.items.push(T),f=T.range[2],Ir(k))n(T.range,"BLOCK_IN_FLOW",$r)}else{s.atKey=!0;let T=L.end,w=N?e(s,N,L,n):t(s,T,v,null,L,n);if(Ir(N))n(w.range,"BLOCK_IN_FLOW",$r);s.atKey=!1;let R=Ia.resolveProps(O??[],{flow:a,indicator:"map-value-ind",next:k,offset:w.range[2],onError:n,parentIndent:r.indent,startOnNewline:!1});if(R.found){if(!o&&!L.found&&s.options.strict){if(O)for(let C of O){if(C===R.found)break;if(C.type==="newline"){n(C,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}if(L.start<R.found.offset-1024)n(R.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else if(k)if("source"in k&&k.source?.[0]===":")n(k,"MISSING_CHAR",`Missing space after : in ${a}`);else n(R.start,"MISSING_CHAR",`Missing , or : between ${a} items`);let ee=k?e(s,k,R,n):R.found?t(s,R.end,O,null,R,n):null;if(ee){if(Ir(k))n(ee.range,"BLOCK_IN_FLOW",$r)}else if(R.comment)if(w.comment)w.comment+=`
69
+ `+R.comment;else w.comment=R.comment;let Ee=new jy.Pair(w,ee);if(s.options.keepSourceTokens)Ee.srcToken=E;if(o){let C=c;if(Ky.mapIncludes(s,C.items,w))n(T,"DUPLICATE_KEY","Map keys must be unique");C.items.push(Ee)}else{let C=new $a.YAMLMap(s.schema);C.flow=!0,C.items.push(Ee);let rn=(ee??w).range;C.range=[w.range[0],rn[1],rn[2]],c.items.push(C)}f=ee?ee.range[2]:R.end}}let u=o?"}":"]",[p,...y]=r.end,h=f;if(p?.source===u)h=p.offset+p.source.length;else{let g=a[0].toUpperCase()+a.substring(1),E=d?`${g} must end with a ${u}`:`${g} in block collection must be sufficiently indented and end with a ${u}`;if(n(f,d?"MISSING_CHAR":"BAD_INDENT",E),p&&p.source.length!==1)y.unshift(p)}if(y.length>0){let g=By.resolveEnd(y,h,s.options.strict,n);if(g.comment)if(c.comment)c.comment+=`
70
+ `+g.comment;else c.comment=g.comment;c.range=[r.offset,h,g.offset]}else c.range=[r.offset,h,h];return c}Gy.resolveFlowCollection=Vy});var Da=m(function(tb){var Jy=I(),Hy=q(),Xy=ae(),Wy=le(),Qy=Aa(),zy=La(),Zy=Ta();function Tr(e,t,s,r,n,i){let o=s.type==="block-map"?Qy.resolveBlockMap(e,t,s,r,i):s.type==="block-seq"?zy.resolveBlockSeq(e,t,s,r,i):Zy.resolveFlowCollection(e,t,s,r,i),a=o.constructor;if(n==="!"||n===a.tagName)return o.tag=a.tagName,o;if(n)o.tag=n;return o}function eb(e,t,s,r,n){let i=r.tag,o=!i?null:t.directives.tagName(i.source,(u)=>n(i,"TAG_RESOLVE_FAILED",u));if(s.type==="block-seq"){let{anchor:u,newlineAfterProp:p}=r,y=u&&i?u.offset>i.offset?u:i:u??i;if(y&&(!p||p.offset<y.offset))n(y,"MISSING_CHAR","Missing newline after block sequence props")}let a=s.type==="block-map"?"map":s.type==="block-seq"?"seq":s.start.source==="{"?"map":"seq";if(!i||!o||o==="!"||o===Xy.YAMLMap.tagName&&a==="map"||o===Wy.YAMLSeq.tagName&&a==="seq")return Tr(e,t,s,n,o);let l=t.schema.tags.find((u)=>u.tag===o&&u.collection===a);if(!l){let u=t.schema.knownTags[o];if(u?.collection===a)t.schema.tags.push(Object.assign({},u,{default:!1})),l=u;else{if(u)n(i,"BAD_COLLECTION_TYPE",`${u.tag} used for ${a} collection, but expects ${u.collection??"scalar"}`,!0);else n(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0);return Tr(e,t,s,n,o)}}let c=Tr(e,t,s,n,o,l),d=l.resolve?.(c,(u)=>n(i,"TAG_RESOLVE_FAILED",u),t.options)??c,f=Jy.isNode(d)?d:new Hy.Scalar(d);if(f.range=c.range,f.tag=o,l?.format)f.format=l.format;return f}tb.composeCollection=eb});var qr=m(function(ob){var Dr=q();function rb(e,t,s){let r=t.offset,n=nb(t,e.options.strict,s);if(!n)return{value:"",type:null,comment:"",range:[r,r,r]};let i=n.mode===">"?Dr.Scalar.BLOCK_FOLDED:Dr.Scalar.BLOCK_LITERAL,o=t.source?ib(t.source):[],a=o.length;for(let h=o.length-1;h>=0;--h){let g=o[h][1];if(g===""||g==="\r")a=h;else break}if(a===0){let h=n.chomp==="+"&&o.length>0?`
71
71
  `.repeat(Math.max(1,o.length-1)):"",g=r+n.length;if(t.source)g+=t.source.length;return{value:h,type:i,comment:n.comment,range:[r,g,g]}}let l=t.indent+n.indent,c=t.offset+n.length,d=0;for(let h=0;h<a;++h){let[g,E]=o[h];if(E===""||E==="\r"){if(n.indent===0&&g.length>l)l=g.length}else{if(g.length<l)s(c+g.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator");if(n.indent===0)l=g.length;if(d=h,l===0&&!e.atRoot)s(c,"BAD_INDENT","Block scalar values in collections must be indented");break}c+=g.length+E.length+1}for(let h=o.length-1;h>=a;--h)if(o[h][0].length>l)a=h+1;let f="",u="",p=!1;for(let h=0;h<d;++h)f+=o[h][0].slice(l)+`
72
- `;for(let h=d;h<a;++h){let[g,E]=o[h];c+=g.length+E.length+1;let v=E[E.length-1]==="\r";if(v)E=E.slice(0,-1);if(E&&g.length<l){let O=`Block scalar lines must not be less indented than their ${n.indent?"explicit indentation indicator":"first line"}`;s(c-E.length-(v?2:1),"BAD_INDENT",O),g=""}if(i===Ir.Scalar.BLOCK_LITERAL)f+=u+g.slice(l)+E,u=`
72
+ `;for(let h=d;h<a;++h){let[g,E]=o[h];c+=g.length+E.length+1;let v=E[E.length-1]==="\r";if(v)E=E.slice(0,-1);if(E&&g.length<l){let O=`Block scalar lines must not be less indented than their ${n.indent?"explicit indentation indicator":"first line"}`;s(c-E.length-(v?2:1),"BAD_INDENT",O),g=""}if(i===Dr.Scalar.BLOCK_LITERAL)f+=u+g.slice(l)+E,u=`
73
73
  `;else if(g.length>l||E[0]==="\t"){if(u===" ")u=`
74
74
  `;else if(!p&&u===`
75
75
  `)u=`
@@ -82,7 +82,7 @@ ${c}
82
82
  `+o[h][0].slice(l);if(f[f.length-1]!==`
83
83
  `)f+=`
84
84
  `;break;default:f+=`
85
- `}let y=r+n.length+t.source.length;return{value:f,type:i,comment:n.comment,range:[r,y,y]}}function nb({offset:e,props:t},s,r){if(t[0].type!=="block-scalar-header")return r(t[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:n}=t[0],i=n[0],o=0,a="",l=-1;for(let u=1;u<n.length;++u){let p=n[u];if(!a&&(p==="-"||p==="+"))a=p;else{let y=Number(p);if(!o&&y)o=y;else if(l===-1)l=e+u}}if(l!==-1)r(l,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${n}`);let c=!1,d="",f=n.length;for(let u=1;u<t.length;++u){let p=t[u];switch(p.type){case"space":c=!0;case"newline":f+=p.source.length;break;case"comment":if(s&&!c)r(p,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");f+=p.source.length,d=p.source.substring(1);break;case"error":r(p,"UNEXPECTED_TOKEN",p.message),f+=p.source.length;break;default:{let y=`Unexpected token in block scalar header: ${p.type}`;r(p,"UNEXPECTED_TOKEN",y);let h=p.source;if(h&&typeof h==="string")f+=h.length}}}return{mode:i,indent:o,chomp:a,comment:d,length:f}}function ib(e){let t=e.split(/\n( *)/),s=t[0],r=s.match(/^( *)/),i=[r?.[1]?[r[1],s.slice(r[1].length)]:["",s]];for(let o=1;o<t.length;o+=2)i.push([t[o],t[o+1]]);return i}ob.resolveBlockScalar=rb});var qr=m(function(gb){var Dr=q(),lb=Re();function cb(e,t,s){let{offset:r,type:n,source:i,end:o}=e,a,l,c=(u,p,y)=>s(r+u,p,y);switch(n){case"scalar":a=Dr.Scalar.PLAIN,l=ub(i,c);break;case"single-quoted-scalar":a=Dr.Scalar.QUOTE_SINGLE,l=fb(i,c);break;case"double-quoted-scalar":a=Dr.Scalar.QUOTE_DOUBLE,l=pb(i,c);break;default:return s(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${n}`),{value:"",type:null,comment:"",range:[r,r+i.length,r+i.length]}}let d=r+i.length,f=lb.resolveEnd(o,d,t,s);return{value:l,type:a,comment:f.comment,range:[r,d,f.offset]}}function ub(e,t){let s="";switch(e[0]){case"\t":s="a tab character";break;case",":s="flow indicator character ,";break;case"%":s="directive indicator character %";break;case"|":case">":{s=`block scalar indicator ${e[0]}`;break}case"@":case"`":{s=`reserved character ${e[0]}`;break}}if(s)t(0,"BAD_SCALAR_START",`Plain value cannot start with ${s}`);return Da(e)}function fb(e,t){if(e[e.length-1]!=="'"||e.length===1)t(e.length,"MISSING_CHAR","Missing closing 'quote");return Da(e.slice(1,-1)).replace(/''/g,"'")}function Da(e){let t=/(.*?)\r?\n/sy,s=t.exec(e);if(!s)return e;let r,n;try{r=new RegExp("(?<![ \t])[ \t]+$"),n=new RegExp("^[ \t]+|(?<![ \t])[ \t]+$","g")}catch{r=/[ \t]+$/,n=/^[ \t]+|[ \t]+$/g}let i=s[1].replace(r,""),o=" ",a=t.lastIndex;while(s=t.exec(e)){let c=s[1].replace(n,"");if(c==="")if(o===`
85
+ `}let y=r+n.length+t.source.length;return{value:f,type:i,comment:n.comment,range:[r,y,y]}}function nb({offset:e,props:t},s,r){if(t[0].type!=="block-scalar-header")return r(t[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:n}=t[0],i=n[0],o=0,a="",l=-1;for(let u=1;u<n.length;++u){let p=n[u];if(!a&&(p==="-"||p==="+"))a=p;else{let y=Number(p);if(!o&&y)o=y;else if(l===-1)l=e+u}}if(l!==-1)r(l,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${n}`);let c=!1,d="",f=n.length;for(let u=1;u<t.length;++u){let p=t[u];switch(p.type){case"space":c=!0;case"newline":f+=p.source.length;break;case"comment":if(s&&!c)r(p,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");f+=p.source.length,d=p.source.substring(1);break;case"error":r(p,"UNEXPECTED_TOKEN",p.message),f+=p.source.length;break;default:{let y=`Unexpected token in block scalar header: ${p.type}`;r(p,"UNEXPECTED_TOKEN",y);let h=p.source;if(h&&typeof h==="string")f+=h.length}}}return{mode:i,indent:o,chomp:a,comment:d,length:f}}function ib(e){let t=e.split(/\n( *)/),s=t[0],r=s.match(/^( *)/),i=[r?.[1]?[r[1],s.slice(r[1].length)]:["",s]];for(let o=1;o<t.length;o+=2)i.push([t[o],t[o+1]]);return i}ob.resolveBlockScalar=rb});var Cr=m(function(gb){var Rr=q(),lb=Ce();function cb(e,t,s){let{offset:r,type:n,source:i,end:o}=e,a,l,c=(u,p,y)=>s(r+u,p,y);switch(n){case"scalar":a=Rr.Scalar.PLAIN,l=ub(i,c);break;case"single-quoted-scalar":a=Rr.Scalar.QUOTE_SINGLE,l=fb(i,c);break;case"double-quoted-scalar":a=Rr.Scalar.QUOTE_DOUBLE,l=pb(i,c);break;default:return s(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${n}`),{value:"",type:null,comment:"",range:[r,r+i.length,r+i.length]}}let d=r+i.length,f=lb.resolveEnd(o,d,t,s);return{value:l,type:a,comment:f.comment,range:[r,d,f.offset]}}function ub(e,t){let s="";switch(e[0]){case"\t":s="a tab character";break;case",":s="flow indicator character ,";break;case"%":s="directive indicator character %";break;case"|":case">":{s=`block scalar indicator ${e[0]}`;break}case"@":case"`":{s=`reserved character ${e[0]}`;break}}if(s)t(0,"BAD_SCALAR_START",`Plain value cannot start with ${s}`);return qa(e)}function fb(e,t){if(e[e.length-1]!=="'"||e.length===1)t(e.length,"MISSING_CHAR","Missing closing 'quote");return qa(e.slice(1,-1)).replace(/''/g,"'")}function qa(e){let t=/(.*?)\r?\n/sy,s=t.exec(e);if(!s)return e;let r,n;try{r=new RegExp("(?<![ \t])[ \t]+$"),n=new RegExp("^[ \t]+|(?<![ \t])[ \t]+$","g")}catch{r=/[ \t]+$/,n=/^[ \t]+|[ \t]+$/g}let i=s[1].replace(r,""),o=" ",a=t.lastIndex;while(s=t.exec(e)){let c=s[1].replace(n,"");if(c==="")if(o===`
86
86
  `)i+=o;else o=`
87
87
  `;else i+=o+c,o=" ";a=t.lastIndex}let l=/[ \t]*(.*)/sy;return l.lastIndex=a,s=l.exec(e),i+o+(s?.[1]??"")}function pb(e,t){let s="";for(let r=1;r<e.length-1;++r){let n=e[r];if(n==="\r"&&e[r+1]===`
88
88
  `)continue;if(n===`
@@ -95,50 +95,50 @@ ${c}
95
95
  `)break;if(r===`
96
96
  `)s+=`
97
97
  `;t+=1,r=e[t+1]}if(!s)s=" ";return{fold:s,offset:t}}var hb={"0":"\x00",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
98
- `,r:"\r",t:"\t",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function mb(e,t,s,r){let n=e.substr(t,s),o=n.length===s&&/^[0-9a-fA-F]+$/.test(n)?parseInt(n,16):NaN;try{return String.fromCodePoint(o)}catch{let a=e.substr(t-2,s+2);return r(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}}gb.resolveFlowScalar=cb});var Ra=m(function(Nb){var be=I(),qa=q(),bb=Tr(),Sb=qr();function wb(e,t,s,r){let{value:n,type:i,comment:o,range:a}=t.type==="block-scalar"?bb.resolveBlockScalar(e,t,r):Sb.resolveFlowScalar(t,e.options.strict,r),l=s?e.directives.tagName(s.source,(f)=>r(s,"TAG_RESOLVE_FAILED",f)):null,c;if(e.options.stringKeys&&e.atKey)c=e.schema[be.SCALAR];else if(l)c=Eb(e.schema,n,l,s,r);else if(t.type==="scalar")c=vb(e,n,t,r);else c=e.schema[be.SCALAR];let d;try{let f=c.resolve(n,(u)=>r(s??t,"TAG_RESOLVE_FAILED",u),e.options);d=be.isScalar(f)?f:new qa.Scalar(f)}catch(f){let u=f instanceof Error?f.message:String(f);r(s??t,"TAG_RESOLVE_FAILED",u),d=new qa.Scalar(n)}if(d.range=a,d.source=n,i)d.type=i;if(l)d.tag=l;if(c.format)d.format=c.format;if(o)d.comment=o;return d}function Eb(e,t,s,r,n){if(s==="!")return e[be.SCALAR];let i=[];for(let a of e.tags)if(!a.collection&&a.tag===s)if(a.default&&a.test)i.push(a);else return a;for(let a of i)if(a.test?.test(t))return a;let o=e.knownTags[s];if(o&&!o.collection)return e.tags.push(Object.assign({},o,{default:!1,test:void 0})),o;return n(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${s}`,s!=="tag:yaml.org,2002:str"),e[be.SCALAR]}function vb({atKey:e,directives:t,schema:s},r,n,i){let o=s.tags.find((a)=>(a.default===!0||e&&a.default==="key")&&a.test?.test(r))||s[be.SCALAR];if(s.compat){let a=s.compat.find((l)=>l.default&&l.test?.test(r))??s[be.SCALAR];if(o.tag!==a.tag){let l=t.tagString(o.tag),c=t.tagString(a.tag),d=`Value may be parsed as either ${l} or ${c}`;i(n,"TAG_RESOLVE_FAILED",d,!0)}}return o}Nb.composeScalar=wb});var Ca=m(function(Ab){function kb(e,t,s){if(t){s??(s=t.length);for(let r=s-1;r>=0;--r){let n=t[r];switch(n.type){case"space":case"comment":case"newline":e-=n.source.length;continue}n=t[++r];while(n?.type==="space")e+=n.source.length,n=t[++r];break}}return e}Ab.emptyScalarPosition=kb});var xa=m(function(Mb){var $b=Ve(),Ib=I(),Tb=Ta(),Ma=Ra(),Db=Re(),qb=Ca(),Rb={composeNode:Pa,composeEmptyNode:Rr};function Pa(e,t,s,r){let n=e.atKey,{spaceBefore:i,comment:o,anchor:a,tag:l}=s,c,d=!0;switch(t.type){case"alias":if(c=Cb(e,t,r),a||l)r(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":if(c=Ma.composeScalar(e,t,l,r),a)c.anchor=a.source.substring(1);break;case"block-map":case"block-seq":case"flow-collection":try{if(c=Tb.composeCollection(Rb,e,t,s,r),a)c.anchor=a.source.substring(1)}catch(f){let u=f instanceof Error?f.message:String(f);r(t,"RESOURCE_EXHAUSTION",u)}break;default:{let f=t.type==="error"?t.message:`Unsupported token (type: ${t.type})`;r(t,"UNEXPECTED_TOKEN",f),d=!1}}if(c??(c=Rr(e,t.offset,void 0,null,s,r)),a&&c.anchor==="")r(a,"BAD_ALIAS","Anchor cannot be an empty string");if(n&&e.options.stringKeys&&(!Ib.isScalar(c)||typeof c.value!=="string"||c.tag&&c.tag!=="tag:yaml.org,2002:str"))r(l??t,"NON_STRING_KEY","With stringKeys, all keys must be strings");if(i)c.spaceBefore=!0;if(o)if(t.type==="scalar"&&t.source==="")c.comment=o;else c.commentBefore=o;if(e.options.keepSourceTokens&&d)c.srcToken=t;return c}function Rr(e,t,s,r,{spaceBefore:n,comment:i,anchor:o,tag:a,end:l},c){let d={type:"scalar",offset:qb.emptyScalarPosition(t,s,r),indent:-1,source:""},f=Ma.composeScalar(e,d,a,c);if(o){if(f.anchor=o.source.substring(1),f.anchor==="")c(o,"BAD_ALIAS","Anchor cannot be an empty string")}if(n)f.spaceBefore=!0;if(i)f.comment=i,f.range[2]=l;return f}function Cb({options:e},{offset:t,source:s,end:r},n){let i=new $b.Alias(s.substring(1));if(i.source==="")n(t,"BAD_ALIAS","Alias cannot be an empty string");if(i.source.endsWith(":"))n(t+s.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let o=t+s.length,a=Db.resolveEnd(r,o,e.strict,n);if(i.range=[t,o,a.offset],a.comment)i.comment=a.comment;return i}Mb.composeEmptyNode=Rr;Mb.composeNode=Pa});var ja=m(function(Ub){var _b=nt(),_a=xa(),jb=Re(),Fb=ot();function Bb(e,t,{offset:s,start:r,value:n,end:i},o){let a=Object.assign({_directives:t},e),l=new _b.Document(void 0,a),c={atKey:!1,atRoot:!0,directives:l.directives,options:l.options,schema:l.schema},d=Fb.resolveProps(r,{indicator:"doc-start",next:n??i?.[0],offset:s,onError:o,parentIndent:0,startOnNewline:!0});if(d.found){if(l.directives.docStart=!0,n&&(n.type==="block-map"||n.type==="block-seq")&&!d.hasNewline)o(d.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")}l.contents=n?_a.composeNode(c,n,d,o):_a.composeEmptyNode(c,d.end,r,null,d,o);let f=l.contents.range[2],u=jb.resolveEnd(i,f,!1,o);if(u.comment)l.comment=u.comment;return l.range=[s,f,u.offset],l}Ub.composeDoc=Bb});var Cr=m(function(Xb){var Vb=pt("process"),Gb=_s(),Yb=nt(),at=it(),Fa=I(),Jb=ja(),Hb=Re();function lt(e){if(typeof e==="number")return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];let{offset:t,source:s}=e;return[t,t+(typeof s==="string"?s.length:1)]}function Ba(e){let t="",s=!1,r=!1;for(let n=0;n<e.length;++n){let i=e[n];switch(i[0]){case"#":t+=(t===""?"":r?`
98
+ `,r:"\r",t:"\t",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function mb(e,t,s,r){let n=e.substr(t,s),o=n.length===s&&/^[0-9a-fA-F]+$/.test(n)?parseInt(n,16):NaN;try{return String.fromCodePoint(o)}catch{let a=e.substr(t-2,s+2);return r(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}}gb.resolveFlowScalar=cb});var Ca=m(function(Nb){var be=I(),Ra=q(),bb=qr(),Sb=Cr();function wb(e,t,s,r){let{value:n,type:i,comment:o,range:a}=t.type==="block-scalar"?bb.resolveBlockScalar(e,t,r):Sb.resolveFlowScalar(t,e.options.strict,r),l=s?e.directives.tagName(s.source,(f)=>r(s,"TAG_RESOLVE_FAILED",f)):null,c;if(e.options.stringKeys&&e.atKey)c=e.schema[be.SCALAR];else if(l)c=Eb(e.schema,n,l,s,r);else if(t.type==="scalar")c=vb(e,n,t,r);else c=e.schema[be.SCALAR];let d;try{let f=c.resolve(n,(u)=>r(s??t,"TAG_RESOLVE_FAILED",u),e.options);d=be.isScalar(f)?f:new Ra.Scalar(f)}catch(f){let u=f instanceof Error?f.message:String(f);r(s??t,"TAG_RESOLVE_FAILED",u),d=new Ra.Scalar(n)}if(d.range=a,d.source=n,i)d.type=i;if(l)d.tag=l;if(c.format)d.format=c.format;if(o)d.comment=o;return d}function Eb(e,t,s,r,n){if(s==="!")return e[be.SCALAR];let i=[];for(let a of e.tags)if(!a.collection&&a.tag===s)if(a.default&&a.test)i.push(a);else return a;for(let a of i)if(a.test?.test(t))return a;let o=e.knownTags[s];if(o&&!o.collection)return e.tags.push(Object.assign({},o,{default:!1,test:void 0})),o;return n(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${s}`,s!=="tag:yaml.org,2002:str"),e[be.SCALAR]}function vb({atKey:e,directives:t,schema:s},r,n,i){let o=s.tags.find((a)=>(a.default===!0||e&&a.default==="key")&&a.test?.test(r))||s[be.SCALAR];if(s.compat){let a=s.compat.find((l)=>l.default&&l.test?.test(r))??s[be.SCALAR];if(o.tag!==a.tag){let l=t.tagString(o.tag),c=t.tagString(a.tag),d=`Value may be parsed as either ${l} or ${c}`;i(n,"TAG_RESOLVE_FAILED",d,!0)}}return o}Nb.composeScalar=wb});var Ma=m(function(Ab){function kb(e,t,s){if(t){s??(s=t.length);for(let r=s-1;r>=0;--r){let n=t[r];switch(n.type){case"space":case"comment":case"newline":e-=n.source.length;continue}n=t[++r];while(n?.type==="space")e+=n.source.length,n=t[++r];break}}return e}Ab.emptyScalarPosition=kb});var _a=m(function(Mb){var $b=Ge(),Ib=I(),Tb=Da(),Pa=Ca(),Db=Ce(),qb=Ma(),Rb={composeNode:xa,composeEmptyNode:Mr};function xa(e,t,s,r){let n=e.atKey,{spaceBefore:i,comment:o,anchor:a,tag:l}=s,c,d=!0;switch(t.type){case"alias":if(c=Cb(e,t,r),a||l)r(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":if(c=Pa.composeScalar(e,t,l,r),a)c.anchor=a.source.substring(1);break;case"block-map":case"block-seq":case"flow-collection":try{if(c=Tb.composeCollection(Rb,e,t,s,r),a)c.anchor=a.source.substring(1)}catch(f){let u=f instanceof Error?f.message:String(f);r(t,"RESOURCE_EXHAUSTION",u)}break;default:{let f=t.type==="error"?t.message:`Unsupported token (type: ${t.type})`;r(t,"UNEXPECTED_TOKEN",f),d=!1}}if(c??(c=Mr(e,t.offset,void 0,null,s,r)),a&&c.anchor==="")r(a,"BAD_ALIAS","Anchor cannot be an empty string");if(n&&e.options.stringKeys&&(!Ib.isScalar(c)||typeof c.value!=="string"||c.tag&&c.tag!=="tag:yaml.org,2002:str"))r(l??t,"NON_STRING_KEY","With stringKeys, all keys must be strings");if(i)c.spaceBefore=!0;if(o)if(t.type==="scalar"&&t.source==="")c.comment=o;else c.commentBefore=o;if(e.options.keepSourceTokens&&d)c.srcToken=t;return c}function Mr(e,t,s,r,{spaceBefore:n,comment:i,anchor:o,tag:a,end:l},c){let d={type:"scalar",offset:qb.emptyScalarPosition(t,s,r),indent:-1,source:""},f=Pa.composeScalar(e,d,a,c);if(o){if(f.anchor=o.source.substring(1),f.anchor==="")c(o,"BAD_ALIAS","Anchor cannot be an empty string")}if(n)f.spaceBefore=!0;if(i)f.comment=i,f.range[2]=l;return f}function Cb({options:e},{offset:t,source:s,end:r},n){let i=new $b.Alias(s.substring(1));if(i.source==="")n(t,"BAD_ALIAS","Alias cannot be an empty string");if(i.source.endsWith(":"))n(t+s.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let o=t+s.length,a=Db.resolveEnd(r,o,e.strict,n);if(i.range=[t,o,a.offset],a.comment)i.comment=a.comment;return i}Mb.composeEmptyNode=Mr;Mb.composeNode=xa});var Fa=m(function(Ub){var _b=it(),ja=_a(),jb=Ce(),Fb=at();function Bb(e,t,{offset:s,start:r,value:n,end:i},o){let a=Object.assign({_directives:t},e),l=new _b.Document(void 0,a),c={atKey:!1,atRoot:!0,directives:l.directives,options:l.options,schema:l.schema},d=Fb.resolveProps(r,{indicator:"doc-start",next:n??i?.[0],offset:s,onError:o,parentIndent:0,startOnNewline:!0});if(d.found){if(l.directives.docStart=!0,n&&(n.type==="block-map"||n.type==="block-seq")&&!d.hasNewline)o(d.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")}l.contents=n?ja.composeNode(c,n,d,o):ja.composeEmptyNode(c,d.end,r,null,d,o);let f=l.contents.range[2],u=jb.resolveEnd(i,f,!1,o);if(u.comment)l.comment=u.comment;return l.range=[s,f,u.offset],l}Ub.composeDoc=Bb});var Pr=m(function(Xb){var Vb=dt("process"),Gb=Fs(),Yb=it(),lt=ot(),Ba=I(),Jb=Fa(),Hb=Ce();function ct(e){if(typeof e==="number")return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];let{offset:t,source:s}=e;return[t,t+(typeof s==="string"?s.length:1)]}function Ua(e){let t="",s=!1,r=!1;for(let n=0;n<e.length;++n){let i=e[n];switch(i[0]){case"#":t+=(t===""?"":r?`
99
99
 
100
100
  `:`
101
- `)+(i.substring(1)||" "),s=!0,r=!1;break;case"%":if(e[n+1]?.[0]!=="#")n+=1;s=!1;break;default:if(!s)r=!0;s=!1}}return{comment:t,afterEmptyLine:r}}class Ua{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(t,s,r,n)=>{let i=lt(t);if(n)this.warnings.push(new at.YAMLWarning(i,s,r));else this.errors.push(new at.YAMLParseError(i,s,r))},this.directives=new Gb.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,t){let{comment:s,afterEmptyLine:r}=Ba(this.prelude);if(s){let n=e.contents;if(t)e.comment=e.comment?`${e.comment}
102
- ${s}`:s;else if(r||e.directives.docStart||!n)e.commentBefore=s;else if(Fa.isCollection(n)&&!n.flow&&n.items.length>0){let i=n.items[0];if(Fa.isPair(i))i=i.key;let o=i.commentBefore;i.commentBefore=o?`${s}
101
+ `)+(i.substring(1)||" "),s=!0,r=!1;break;case"%":if(e[n+1]?.[0]!=="#")n+=1;s=!1;break;default:if(!s)r=!0;s=!1}}return{comment:t,afterEmptyLine:r}}class Ka{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(t,s,r,n)=>{let i=ct(t);if(n)this.warnings.push(new lt.YAMLWarning(i,s,r));else this.errors.push(new lt.YAMLParseError(i,s,r))},this.directives=new Gb.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,t){let{comment:s,afterEmptyLine:r}=Ua(this.prelude);if(s){let n=e.contents;if(t)e.comment=e.comment?`${e.comment}
102
+ ${s}`:s;else if(r||e.directives.docStart||!n)e.commentBefore=s;else if(Ba.isCollection(n)&&!n.flow&&n.items.length>0){let i=n.items[0];if(Ba.isPair(i))i=i.key;let o=i.commentBefore;i.commentBefore=o?`${s}
103
103
  ${o}`:s}else{let i=n.commentBefore;n.commentBefore=i?`${s}
104
- ${i}`:s}}if(t){for(let n=0;n<this.errors.length;++n)e.errors.push(this.errors[n]);for(let n=0;n<this.warnings.length;++n)e.warnings.push(this.warnings[n])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Ba(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,s=-1){for(let r of e)yield*this.next(r);yield*this.end(t,s)}*next(e){if(Vb.env.LOG_STREAM)console.dir(e,{depth:null});switch(e.type){case"directive":this.directives.add(e.source,(t,s,r)=>{let n=lt(e);n[0]+=t,this.onError(n,"BAD_DIRECTIVE",s,r)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let t=Jb.composeDoc(this.options,this.directives,e,this.onError);if(this.atDirectives&&!t.directives.docStart)this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line");if(this.decorate(t,!1),this.doc)yield this.doc;this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{let t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,s=new at.YAMLParseError(lt(e),"UNEXPECTED_TOKEN",t);if(this.atDirectives||!this.doc)this.errors.push(s);else this.doc.errors.push(s);break}case"doc-end":{if(!this.doc){this.errors.push(new at.YAMLParseError(lt(e),"UNEXPECTED_TOKEN","Unexpected doc-end without preceding document"));break}this.doc.directives.docEnd=!0;let t=Hb.resolveEnd(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let s=this.doc.comment;this.doc.comment=s?`${s}
105
- ${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new at.YAMLParseError(lt(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let s=Object.assign({_directives:this.directives},this.options),r=new Yb.Document(void 0,s);if(this.atDirectives)this.onError(t,"MISSING_CHAR","Missing directives-end indicator line");r.range=[0,t,t],this.decorate(r,!1),yield r}}}Xb.Composer=Ua});var Ga=m(function(nS){var Qb=Tr(),zb=qr(),Zb=it(),Ka=He();function eS(e,t=!0,s){if(e){let r=(n,i,o)=>{let a=typeof n==="number"?n:Array.isArray(n)?n[0]:n.offset;if(s)s(a,i,o);else throw new Zb.YAMLParseError([a,a+1],i,o)};switch(e.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return zb.resolveFlowScalar(e,t,r);case"block-scalar":return Qb.resolveBlockScalar({options:{strict:t}},e,r)}}return null}function tS(e,t){let{implicitKey:s=!1,indent:r,inFlow:n=!1,offset:i=-1,type:o="PLAIN"}=t,a=Ka.stringifyString({type:o,value:e},{implicitKey:s,indent:r>0?" ".repeat(r):"",inFlow:n,options:{blockQuote:!0,lineWidth:-1}}),l=t.end??[{type:"newline",offset:-1,indent:r,source:`
104
+ ${i}`:s}}if(t){for(let n=0;n<this.errors.length;++n)e.errors.push(this.errors[n]);for(let n=0;n<this.warnings.length;++n)e.warnings.push(this.warnings[n])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Ua(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,s=-1){for(let r of e)yield*this.next(r);yield*this.end(t,s)}*next(e){if(Vb.env.LOG_STREAM)console.dir(e,{depth:null});switch(e.type){case"directive":this.directives.add(e.source,(t,s,r)=>{let n=ct(e);n[0]+=t,this.onError(n,"BAD_DIRECTIVE",s,r)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let t=Jb.composeDoc(this.options,this.directives,e,this.onError);if(this.atDirectives&&!t.directives.docStart)this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line");if(this.decorate(t,!1),this.doc)yield this.doc;this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{let t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,s=new lt.YAMLParseError(ct(e),"UNEXPECTED_TOKEN",t);if(this.atDirectives||!this.doc)this.errors.push(s);else this.doc.errors.push(s);break}case"doc-end":{if(!this.doc){this.errors.push(new lt.YAMLParseError(ct(e),"UNEXPECTED_TOKEN","Unexpected doc-end without preceding document"));break}this.doc.directives.docEnd=!0;let t=Hb.resolveEnd(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let s=this.doc.comment;this.doc.comment=s?`${s}
105
+ ${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new lt.YAMLParseError(ct(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let s=Object.assign({_directives:this.directives},this.options),r=new Yb.Document(void 0,s);if(this.atDirectives)this.onError(t,"MISSING_CHAR","Missing directives-end indicator line");r.range=[0,t,t],this.decorate(r,!1),yield r}}}Xb.Composer=Ka});var Ya=m(function(nS){var Qb=qr(),zb=Cr(),Zb=ot(),Va=Xe();function eS(e,t=!0,s){if(e){let r=(n,i,o)=>{let a=typeof n==="number"?n:Array.isArray(n)?n[0]:n.offset;if(s)s(a,i,o);else throw new Zb.YAMLParseError([a,a+1],i,o)};switch(e.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return zb.resolveFlowScalar(e,t,r);case"block-scalar":return Qb.resolveBlockScalar({options:{strict:t}},e,r)}}return null}function tS(e,t){let{implicitKey:s=!1,indent:r,inFlow:n=!1,offset:i=-1,type:o="PLAIN"}=t,a=Va.stringifyString({type:o,value:e},{implicitKey:s,indent:r>0?" ".repeat(r):"",inFlow:n,options:{blockQuote:!0,lineWidth:-1}}),l=t.end??[{type:"newline",offset:-1,indent:r,source:`
106
106
  `}];switch(a[0]){case"|":case">":{let c=a.indexOf(`
107
107
  `),d=a.substring(0,c),f=a.substring(c+1)+`
108
- `,u=[{type:"block-scalar-header",offset:i,indent:r,source:d}];if(!Va(u,l))u.push({type:"newline",offset:-1,indent:r,source:`
109
- `});return{type:"block-scalar",offset:i,indent:r,props:u,source:f}}case'"':return{type:"double-quoted-scalar",offset:i,indent:r,source:a,end:l};case"'":return{type:"single-quoted-scalar",offset:i,indent:r,source:a,end:l};default:return{type:"scalar",offset:i,indent:r,source:a,end:l}}}function sS(e,t,s={}){let{afterKey:r=!1,implicitKey:n=!1,inFlow:i=!1,type:o}=s,a="indent"in e?e.indent:null;if(r&&typeof a==="number")a+=2;if(!o)switch(e.type){case"single-quoted-scalar":o="QUOTE_SINGLE";break;case"double-quoted-scalar":o="QUOTE_DOUBLE";break;case"block-scalar":{let c=e.props[0];if(c.type!=="block-scalar-header")throw Error("Invalid block scalar header");o=c.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:o="PLAIN"}let l=Ka.stringifyString({type:o,value:t},{implicitKey:n||a===null,indent:a!==null&&a>0?" ".repeat(a):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}});switch(l[0]){case"|":case">":rS(e,l);break;case'"':Mr(e,l,"double-quoted-scalar");break;case"'":Mr(e,l,"single-quoted-scalar");break;default:Mr(e,l,"scalar")}}function rS(e,t){let s=t.indexOf(`
108
+ `,u=[{type:"block-scalar-header",offset:i,indent:r,source:d}];if(!Ga(u,l))u.push({type:"newline",offset:-1,indent:r,source:`
109
+ `});return{type:"block-scalar",offset:i,indent:r,props:u,source:f}}case'"':return{type:"double-quoted-scalar",offset:i,indent:r,source:a,end:l};case"'":return{type:"single-quoted-scalar",offset:i,indent:r,source:a,end:l};default:return{type:"scalar",offset:i,indent:r,source:a,end:l}}}function sS(e,t,s={}){let{afterKey:r=!1,implicitKey:n=!1,inFlow:i=!1,type:o}=s,a="indent"in e?e.indent:null;if(r&&typeof a==="number")a+=2;if(!o)switch(e.type){case"single-quoted-scalar":o="QUOTE_SINGLE";break;case"double-quoted-scalar":o="QUOTE_DOUBLE";break;case"block-scalar":{let c=e.props[0];if(c.type!=="block-scalar-header")throw Error("Invalid block scalar header");o=c.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:o="PLAIN"}let l=Va.stringifyString({type:o,value:t},{implicitKey:n||a===null,indent:a!==null&&a>0?" ".repeat(a):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}});switch(l[0]){case"|":case">":rS(e,l);break;case'"':xr(e,l,"double-quoted-scalar");break;case"'":xr(e,l,"single-quoted-scalar");break;default:xr(e,l,"scalar")}}function rS(e,t){let s=t.indexOf(`
110
110
  `),r=t.substring(0,s),n=t.substring(s+1)+`
111
- `;if(e.type==="block-scalar"){let i=e.props[0];if(i.type!=="block-scalar-header")throw Error("Invalid block scalar header");i.source=r,e.source=n}else{let{offset:i}=e,o="indent"in e?e.indent:-1,a=[{type:"block-scalar-header",offset:i,indent:o,source:r}];if(!Va(a,"end"in e?e.end:void 0))a.push({type:"newline",offset:-1,indent:o,source:`
112
- `});for(let l of Object.keys(e))if(l!=="type"&&l!=="offset")delete e[l];Object.assign(e,{type:"block-scalar",indent:o,props:a,source:n})}}function Va(e,t){if(t)for(let s of t)switch(s.type){case"space":case"comment":e.push(s);break;case"newline":return e.push(s),!0}return!1}function Mr(e,t,s){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=s,e.source=t;break;case"block-scalar":{let r=e.props.slice(1),n=t.length;if(e.props[0].type==="block-scalar-header")n-=e.props[0].source.length;for(let i of r)i.offset+=n;delete e.props,Object.assign(e,{type:s,source:t,end:r});break}case"block-map":case"block-seq":{let n={type:"newline",offset:e.offset+t.length,indent:e.indent,source:`
113
- `};delete e.items,Object.assign(e,{type:s,source:t,end:[n]});break}default:{let r="indent"in e?e.indent:-1,n="end"in e&&Array.isArray(e.end)?e.end.filter((i)=>i.type==="space"||i.type==="comment"||i.type==="newline"):[];for(let i of Object.keys(e))if(i!=="type"&&i!=="offset")delete e[i];Object.assign(e,{type:s,indent:r,source:t,end:n})}}}nS.createScalarToken=tS;nS.resolveAsScalar=eS;nS.setScalarValue=sS});var Ya=m(function(cS){var lS=(e)=>("type"in e)?cs(e):ls(e);function cs(e){switch(e.type){case"block-scalar":{let t="";for(let s of e.props)t+=cs(s);return t+e.source}case"block-map":case"block-seq":{let t="";for(let s of e.items)t+=ls(s);return t}case"flow-collection":{let t=e.start.source;for(let s of e.items)t+=ls(s);for(let s of e.end)t+=s.source;return t}case"document":{let t=ls(e);if(e.end)for(let s of e.end)t+=s.source;return t}default:{let t=e.source;if("end"in e&&e.end)for(let s of e.end)t+=s.source;return t}}}function ls({start:e,key:t,sep:s,value:r}){let n="";for(let i of e)n+=i.source;if(t)n+=cs(t);if(s)for(let i of s)n+=i.source;if(r)n+=cs(r);return n}cS.stringify=lS});var Xa=m(function(pS){var Pr=Symbol("break visit"),fS=Symbol("skip children"),Ja=Symbol("remove item");function Se(e,t){if("type"in e&&e.type==="document")e={start:e.start,value:e.value};Ha(Object.freeze([]),e,t)}Se.BREAK=Pr;Se.SKIP=fS;Se.REMOVE=Ja;Se.itemAtPath=(e,t)=>{let s=e;for(let[r,n]of t){let i=s?.[r];if(i&&"items"in i)s=i.items[n];else return}return s};Se.parentCollection=(e,t)=>{let s=Se.itemAtPath(e,t.slice(0,-1)),r=t[t.length-1][0],n=s?.[r];if(n&&"items"in n)return n;throw Error("Parent collection not found")};function Ha(e,t,s){let r=s(t,e);if(typeof r==="symbol")return r;for(let n of["key","value"]){let i=t[n];if(i&&"items"in i){for(let o=0;o<i.items.length;++o){let a=Ha(Object.freeze(e.concat([[n,o]])),i.items[o],s);if(typeof a==="number")o=a-1;else if(a===Pr)return Pr;else if(a===Ja)i.items.splice(o,1),o-=1}if(typeof r==="function"&&n==="key")r=r(t,e)}}return typeof r==="function"?r(t,e):r}pS.visit=Se});var us=m(function(wS){var xr=Ga(),hS=Ya(),mS=Xa(),_r="\uFEFF",jr="\x02",Fr="\x18",Br="\x1F",gS=(e)=>!!e&&("items"in e),yS=(e)=>!!e&&(e.type==="scalar"||e.type==="single-quoted-scalar"||e.type==="double-quoted-scalar"||e.type==="block-scalar");function bS(e){switch(e){case _r:return"<BOM>";case jr:return"<DOC>";case Fr:return"<FLOW_END>";case Br:return"<SCALAR>";default:return JSON.stringify(e)}}function SS(e){switch(e){case _r:return"byte-order-mark";case jr:return"doc-mode";case Fr:return"flow-error-end";case Br:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
111
+ `;if(e.type==="block-scalar"){let i=e.props[0];if(i.type!=="block-scalar-header")throw Error("Invalid block scalar header");i.source=r,e.source=n}else{let{offset:i}=e,o="indent"in e?e.indent:-1,a=[{type:"block-scalar-header",offset:i,indent:o,source:r}];if(!Ga(a,"end"in e?e.end:void 0))a.push({type:"newline",offset:-1,indent:o,source:`
112
+ `});for(let l of Object.keys(e))if(l!=="type"&&l!=="offset")delete e[l];Object.assign(e,{type:"block-scalar",indent:o,props:a,source:n})}}function Ga(e,t){if(t)for(let s of t)switch(s.type){case"space":case"comment":e.push(s);break;case"newline":return e.push(s),!0}return!1}function xr(e,t,s){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=s,e.source=t;break;case"block-scalar":{let r=e.props.slice(1),n=t.length;if(e.props[0].type==="block-scalar-header")n-=e.props[0].source.length;for(let i of r)i.offset+=n;delete e.props,Object.assign(e,{type:s,source:t,end:r});break}case"block-map":case"block-seq":{let n={type:"newline",offset:e.offset+t.length,indent:e.indent,source:`
113
+ `};delete e.items,Object.assign(e,{type:s,source:t,end:[n]});break}default:{let r="indent"in e?e.indent:-1,n="end"in e&&Array.isArray(e.end)?e.end.filter((i)=>i.type==="space"||i.type==="comment"||i.type==="newline"):[];for(let i of Object.keys(e))if(i!=="type"&&i!=="offset")delete e[i];Object.assign(e,{type:s,indent:r,source:t,end:n})}}}nS.createScalarToken=tS;nS.resolveAsScalar=eS;nS.setScalarValue=sS});var Ja=m(function(cS){var lS=(e)=>("type"in e)?ds(e):ps(e);function ds(e){switch(e.type){case"block-scalar":{let t="";for(let s of e.props)t+=ds(s);return t+e.source}case"block-map":case"block-seq":{let t="";for(let s of e.items)t+=ps(s);return t}case"flow-collection":{let t=e.start.source;for(let s of e.items)t+=ps(s);for(let s of e.end)t+=s.source;return t}case"document":{let t=ps(e);if(e.end)for(let s of e.end)t+=s.source;return t}default:{let t=e.source;if("end"in e&&e.end)for(let s of e.end)t+=s.source;return t}}}function ps({start:e,key:t,sep:s,value:r}){let n="";for(let i of e)n+=i.source;if(t)n+=ds(t);if(s)for(let i of s)n+=i.source;if(r)n+=ds(r);return n}cS.stringify=lS});var Wa=m(function(pS){var _r=Symbol("break visit"),fS=Symbol("skip children"),Ha=Symbol("remove item");function Se(e,t){if("type"in e&&e.type==="document")e={start:e.start,value:e.value};Xa(Object.freeze([]),e,t)}Se.BREAK=_r;Se.SKIP=fS;Se.REMOVE=Ha;Se.itemAtPath=(e,t)=>{let s=e;for(let[r,n]of t){let i=s?.[r];if(i&&"items"in i)s=i.items[n];else return}return s};Se.parentCollection=(e,t)=>{let s=Se.itemAtPath(e,t.slice(0,-1)),r=t[t.length-1][0],n=s?.[r];if(n&&"items"in n)return n;throw Error("Parent collection not found")};function Xa(e,t,s){let r=s(t,e);if(typeof r==="symbol")return r;for(let n of["key","value"]){let i=t[n];if(i&&"items"in i){for(let o=0;o<i.items.length;++o){let a=Xa(Object.freeze(e.concat([[n,o]])),i.items[o],s);if(typeof a==="number")o=a-1;else if(a===_r)return _r;else if(a===Ha)i.items.splice(o,1),o-=1}if(typeof r==="function"&&n==="key")r=r(t,e)}}return typeof r==="function"?r(t,e):r}pS.visit=Se});var hs=m(function(wS){var jr=Ya(),hS=Ja(),mS=Wa(),Fr="\uFEFF",Br="\x02",Ur="\x18",Kr="\x1F",gS=(e)=>!!e&&("items"in e),yS=(e)=>!!e&&(e.type==="scalar"||e.type==="single-quoted-scalar"||e.type==="double-quoted-scalar"||e.type==="block-scalar");function bS(e){switch(e){case Fr:return"<BOM>";case Br:return"<DOC>";case Ur:return"<FLOW_END>";case Kr:return"<SCALAR>";default:return JSON.stringify(e)}}function SS(e){switch(e){case Fr:return"byte-order-mark";case Br:return"doc-mode";case Ur:return"flow-error-end";case Kr:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
114
114
  `:case`\r
115
- `: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(e[0]){case" ":case"\t":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}wS.createScalarToken=xr.createScalarToken;wS.resolveAsScalar=xr.resolveAsScalar;wS.setScalarValue=xr.setScalarValue;wS.stringify=hS.stringify;wS.visit=mS.visit;wS.BOM=_r;wS.DOCUMENT=jr;wS.FLOW_END=Fr;wS.SCALAR=Br;wS.isCollection=gS;wS.isScalar=yS;wS.prettyToken=bS;wS.tokenType=SS});var Kr=m(function(PS){var ct=us();function J(e){switch(e){case void 0:case" ":case`
116
- `:case"\r":case"\t":return!0;default:return!1}}var Wa=new Set("0123456789ABCDEFabcdef"),CS=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),fs=new Set(",[]{}"),MS=new Set(` ,[]{}
117
- \r `),Ur=(e)=>!e||MS.has(e);class Qa{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,t=!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=!t;let s=this.next??"stream";while(s&&(t||this.hasChars(1)))s=yield*this.parseNext(s)}atLineEnd(){let e=this.pos,t=this.buffer[e];while(t===" "||t==="\t")t=this.buffer[++e];if(!t||t==="#"||t===`
115
+ `: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(e[0]){case" ":case"\t":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}wS.createScalarToken=jr.createScalarToken;wS.resolveAsScalar=jr.resolveAsScalar;wS.setScalarValue=jr.setScalarValue;wS.stringify=hS.stringify;wS.visit=mS.visit;wS.BOM=Fr;wS.DOCUMENT=Br;wS.FLOW_END=Ur;wS.SCALAR=Kr;wS.isCollection=gS;wS.isScalar=yS;wS.prettyToken=bS;wS.tokenType=SS});var Gr=m(function(PS){var ut=hs();function J(e){switch(e){case void 0:case" ":case`
116
+ `:case"\r":case"\t":return!0;default:return!1}}var Qa=new Set("0123456789ABCDEFabcdef"),CS=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),ms=new Set(",[]{}"),MS=new Set(` ,[]{}
117
+ \r `),Vr=(e)=>!e||MS.has(e);class za{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,t=!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=!t;let s=this.next??"stream";while(s&&(t||this.hasChars(1)))s=yield*this.parseNext(s)}atLineEnd(){let e=this.pos,t=this.buffer[e];while(t===" "||t==="\t")t=this.buffer[++e];if(!t||t==="#"||t===`
118
118
  `)return!0;if(t==="\r")return this.buffer[e+1]===`
119
119
  `;return!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let s=0;while(t===" ")t=this.buffer[++s+e];if(t==="\r"){let r=this.buffer[s+e+1];if(r===`
120
120
  `||!r&&!this.atEnd)return e+s+1}return t===`
121
121
  `||s>=this.indentNext||!t&&!this.atEnd?e+s:-1}if(t==="-"||t==="."){let s=this.buffer.substr(e,3);if((s==="---"||s==="...")&&J(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;if(typeof e!=="number"||e!==-1&&e<this.pos)e=this.buffer.indexOf(`
122
- `,this.pos),this.lineEndPos=e;if(e===-1)return this.atEnd?this.buffer.substring(this.pos):null;if(this.buffer[e-1]==="\r")e-=1;return 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]===ct.BOM)yield*this.pushCount(1),e=e.substring(1);if(e[0]==="%"){let t=e.length,s=e.indexOf("#");while(s!==-1){let n=e[s-1];if(n===" "||n==="\t"){t=s-1;break}else s=e.indexOf("#",s+1)}while(!0){let n=e[t-1];if(n===" "||n==="\t")t-=1;else break}let r=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-r),this.pushNewline(),"stream"}if(this.atLineEnd()){let t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),"stream"}return yield ct.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 t=this.peek(3);if((t==="---"||t==="...")&&J(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,t==="---"?"doc":"stream"}if(this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!J(this.charAt(1)))this.indentNext=this.indentValue;return yield*this.parseBlockStart()}*parseBlockStart(){let[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&J(t)){let s=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=s,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);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(Ur),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,s=-1;do{if(e=yield*this.pushNewline(),e>0)t=yield*this.pushSpaces(!1),this.indentValue=s=t;else t=0;t+=yield*this.pushSpaces(!0)}while(e+t>0);let r=this.getLine();if(r===null)return this.setNext("flow");if(s!==-1&&s<this.indentNext&&r[0]!=="#"||s===0&&(r.startsWith("---")||r.startsWith("..."))&&J(r[3])){if(!(s===this.indentNext-1&&this.flowLevel===1&&(r[0]==="]"||r[0]==="}")))return this.flowLevel=0,yield ct.FLOW_END,yield*this.parseLineStart()}let n=0;while(r[n]===",")n+=yield*this.pushCount(1),n+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(n+=yield*this.pushIndicators(),r[n]){case void 0:return"flow";case"#":return yield*this.pushCount(r.length-n),"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(Ur),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let i=this.charAt(1);if(this.flowKey||J(i)||i===",")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),t=this.buffer.indexOf(e,this.pos+1);if(e==="'")while(t!==-1&&this.buffer[t+1]==="'")t=this.buffer.indexOf("'",t+2);else while(t!==-1){let n=0;while(this.buffer[t-1-n]==="\\")n+=1;if(n%2===0)break;t=this.buffer.indexOf('"',t+1)}let s=this.buffer.substring(0,t),r=s.indexOf(`
122
+ `,this.pos),this.lineEndPos=e;if(e===-1)return this.atEnd?this.buffer.substring(this.pos):null;if(this.buffer[e-1]==="\r")e-=1;return 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]===ut.BOM)yield*this.pushCount(1),e=e.substring(1);if(e[0]==="%"){let t=e.length,s=e.indexOf("#");while(s!==-1){let n=e[s-1];if(n===" "||n==="\t"){t=s-1;break}else s=e.indexOf("#",s+1)}while(!0){let n=e[t-1];if(n===" "||n==="\t")t-=1;else break}let r=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-r),this.pushNewline(),"stream"}if(this.atLineEnd()){let t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),"stream"}return yield ut.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 t=this.peek(3);if((t==="---"||t==="...")&&J(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,t==="---"?"doc":"stream"}if(this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!J(this.charAt(1)))this.indentNext=this.indentValue;return yield*this.parseBlockStart()}*parseBlockStart(){let[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&J(t)){let s=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=s,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);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(Vr),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,s=-1;do{if(e=yield*this.pushNewline(),e>0)t=yield*this.pushSpaces(!1),this.indentValue=s=t;else t=0;t+=yield*this.pushSpaces(!0)}while(e+t>0);let r=this.getLine();if(r===null)return this.setNext("flow");if(s!==-1&&s<this.indentNext&&r[0]!=="#"||s===0&&(r.startsWith("---")||r.startsWith("..."))&&J(r[3])){if(!(s===this.indentNext-1&&this.flowLevel===1&&(r[0]==="]"||r[0]==="}")))return this.flowLevel=0,yield ut.FLOW_END,yield*this.parseLineStart()}let n=0;while(r[n]===",")n+=yield*this.pushCount(1),n+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(n+=yield*this.pushIndicators(),r[n]){case void 0:return"flow";case"#":return yield*this.pushCount(r.length-n),"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(Vr),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let i=this.charAt(1);if(this.flowKey||J(i)||i===",")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),t=this.buffer.indexOf(e,this.pos+1);if(e==="'")while(t!==-1&&this.buffer[t+1]==="'")t=this.buffer.indexOf("'",t+2);else while(t!==-1){let n=0;while(this.buffer[t-1-n]==="\\")n+=1;if(n%2===0)break;t=this.buffer.indexOf('"',t+1)}let s=this.buffer.substring(0,t),r=s.indexOf(`
123
123
  `,this.pos);if(r!==-1){while(r!==-1){let n=this.continueScalar(r+1);if(n===-1)break;r=s.indexOf(`
124
124
  `,n)}if(r!==-1)t=r-(s[r-1]==="\r"?2:1)}if(t===-1){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;while(!0){let t=this.buffer[++e];if(t==="+")this.blockScalarKeep=!0;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if(t!=="-")break}return yield*this.pushUntil((t)=>J(t)||t==="#")}*parseBlockScalar(){let e=this.pos-1,t=0,s;e:for(let n=this.pos;s=this.buffer[n];++n)switch(s){case" ":t+=1;break;case`
125
125
  `:e=n,t=0;break;case"\r":{let i=this.buffer[n+1];if(!i&&!this.atEnd)return this.setNext("block-scalar");if(i===`
126
126
  `)break}default:break e}if(!s&&!this.atEnd)return this.setNext("block-scalar");if(t>=this.indentNext){if(this.blockScalarIndent===-1)this.indentNext=t;else this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let n=this.continueScalar(e+1);if(n===-1)break;e=this.buffer.indexOf(`
127
127
  `,n)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let r=e+1;s=this.buffer[r];while(s===" ")s=this.buffer[++r];if(s==="\t"){while(s==="\t"||s===" "||s==="\r"||s===`
128
128
  `)s=this.buffer[++r];e=r-1}else if(!this.blockScalarKeep)do{let n=e-1,i=this.buffer[n];if(i==="\r")i=this.buffer[--n];let o=n;while(i===" ")i=this.buffer[--n];if(i===`
129
- `&&n>=this.pos&&n+1+t>o)e=n;else break}while(!0);return yield ct.SCALAR,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,s=this.pos-1,r;while(r=this.buffer[++s])if(r===":"){let n=this.buffer[s+1];if(J(n)||e&&fs.has(n))break;t=s}else if(J(r)){let n=this.buffer[s+1];if(r==="\r")if(n===`
129
+ `&&n>=this.pos&&n+1+t>o)e=n;else break}while(!0);return yield ut.SCALAR,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,s=this.pos-1,r;while(r=this.buffer[++s])if(r===":"){let n=this.buffer[s+1];if(J(n)||e&&ms.has(n))break;t=s}else if(J(r)){let n=this.buffer[s+1];if(r==="\r")if(n===`
130
130
  `)s+=1,r=`
131
- `,n=this.buffer[s+1];else t=s;if(n==="#"||e&&fs.has(n))break;if(r===`
132
- `){let i=this.continueScalar(s+1);if(i===-1)break;s=Math.max(s,i-2)}}else{if(e&&fs.has(r))break;t=s}if(!r&&!this.atEnd)return this.setNext("plain-scalar");return yield ct.SCALAR,yield*this.pushToIndex(t+1,!0),e?"flow":"doc"}*pushCount(e){if(e>0)return yield this.buffer.substr(this.pos,e),this.pos+=e,e;return 0}*pushToIndex(e,t){let s=this.buffer.slice(this.pos,e);if(s)return yield s,this.pos+=s.length,s.length;else if(t)yield"";return 0}*pushIndicators(){let e=0;e:while(!0){switch(this.charAt(0)){case"!":e+=yield*this.pushTag(),e+=yield*this.pushSpaces(!0);continue e;case"&":e+=yield*this.pushUntil(Ur),e+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{let t=this.flowLevel>0,s=this.charAt(1);if(J(s)||t&&fs.has(s)){if(!t)this.indentNext=this.indentValue+1;else if(this.flowKey)this.flowKey=!1;e+=yield*this.pushCount(1),e+=yield*this.pushSpaces(!0);continue e}}}break e}return e}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,t=this.buffer[e];while(!J(t)&&t!==">")t=this.buffer[++e];return yield*this.pushToIndex(t===">"?e+1:e,!1)}else{let e=this.pos+1,t=this.buffer[e];while(t)if(CS.has(t))t=this.buffer[++e];else if(t==="%"&&Wa.has(this.buffer[e+1])&&Wa.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];if(e===`
131
+ `,n=this.buffer[s+1];else t=s;if(n==="#"||e&&ms.has(n))break;if(r===`
132
+ `){let i=this.continueScalar(s+1);if(i===-1)break;s=Math.max(s,i-2)}}else{if(e&&ms.has(r))break;t=s}if(!r&&!this.atEnd)return this.setNext("plain-scalar");return yield ut.SCALAR,yield*this.pushToIndex(t+1,!0),e?"flow":"doc"}*pushCount(e){if(e>0)return yield this.buffer.substr(this.pos,e),this.pos+=e,e;return 0}*pushToIndex(e,t){let s=this.buffer.slice(this.pos,e);if(s)return yield s,this.pos+=s.length,s.length;else if(t)yield"";return 0}*pushIndicators(){let e=0;e:while(!0){switch(this.charAt(0)){case"!":e+=yield*this.pushTag(),e+=yield*this.pushSpaces(!0);continue e;case"&":e+=yield*this.pushUntil(Vr),e+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{let t=this.flowLevel>0,s=this.charAt(1);if(J(s)||t&&ms.has(s)){if(!t)this.indentNext=this.indentValue+1;else if(this.flowKey)this.flowKey=!1;e+=yield*this.pushCount(1),e+=yield*this.pushSpaces(!0);continue e}}}break e}return e}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,t=this.buffer[e];while(!J(t)&&t!==">")t=this.buffer[++e];return yield*this.pushToIndex(t===">"?e+1:e,!1)}else{let e=this.pos+1,t=this.buffer[e];while(t)if(CS.has(t))t=this.buffer[++e];else if(t==="%"&&Qa.has(this.buffer[e+1])&&Qa.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];if(e===`
133
133
  `)return yield*this.pushCount(1);else if(e==="\r"&&this.charAt(1)===`
134
- `)return yield*this.pushCount(2);else return 0}*pushSpaces(e){let t=this.pos-1,s;do s=this.buffer[++t];while(s===" "||e&&s==="\t");let r=t-this.pos;if(r>0)yield this.buffer.substr(this.pos,r),this.pos=t;return r}*pushUntil(e){let t=this.pos,s=this.buffer[t];while(!e(s))s=this.buffer[++t];return yield*this.pushToIndex(t,!1)}}PS.Lexer=Qa});var Vr=m(function(_S){class za{constructor(){this.lineStarts=[],this.addNewLine=(e)=>this.lineStarts.push(e),this.linePos=(e)=>{let t=0,s=this.lineStarts.length;while(t<s){let n=t+s>>1;if(this.lineStarts[n]<e)t=n+1;else s=n}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};let r=this.lineStarts[t-1];return{line:t,col:e-r+1}}}}_S.LineCounter=za});var Gr=m(function(US){var FS=pt("process"),Za=us(),BS=Kr();function ce(e,t){for(let s=0;s<e.length;++s)if(e[s].type===t)return!0;return!1}function el(e){for(let t=0;t<e.length;++t)switch(e[t].type){case"space":case"comment":case"newline":break;default:return t}return-1}function sl(e){switch(e?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function ps(e){switch(e.type){case"document":return e.start;case"block-map":{let t=e.items[e.items.length-1];return t.sep??t.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function Ce(e){if(e.length===0)return[];let t=e.length;e:while(--t>=0)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}while(e[++t]?.type==="space");return e.splice(t,e.length)}function ds(e,t){if(t.length<1e5)Array.prototype.push.apply(e,t);else for(let s=0;s<t.length;++s)e.push(t[s])}function tl(e){if(e.start.type==="flow-seq-start"){for(let t of e.items)if(t.sep&&!t.value&&!ce(t.start,"explicit-key-ind")&&!ce(t.sep,"map-value-ind")){if(t.key)t.value=t.key;if(delete t.key,sl(t.value))if(t.value.end)ds(t.value.end,t.sep);else t.value.end=t.sep;else ds(t.start,t.sep);delete t.sep}}}class rl{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 BS.Lexer,this.onNewLine=e}*parse(e,t=!1){if(this.onNewLine&&this.offset===0)this.onNewLine(0);for(let s of this.lexer.lex(e,t))yield*this.next(s);if(!t)yield*this.end()}*next(e){if(this.source=e,FS.env.LOG_TOKENS)console.log("|",Za.prettyToken(e));if(this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=Za.tokenType(e);if(!t){let s=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:s,source:e}),this.offset+=e.length}else if(t==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":if(this.atNewLine=!0,this.indent=0,this.onNewLine)this.onNewLine(this.offset+e.length);break;case"space":if(this.atNewLine&&e[0]===" ")this.indent+=e.length;break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":if(this.atNewLine)this.indent+=e.length;break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}}*end(){while(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"){while(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 t=e??this.stack.pop();if(!t)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield t;else{let s=this.peek(1);if(t.type==="block-scalar")t.indent="indent"in s?s.indent:0;else if(t.type==="flow-collection"&&s.type==="document")t.indent=0;if(t.type==="flow-collection")tl(t);switch(s.type){case"document":s.value=t;break;case"block-scalar":s.props.push(t);break;case"block-map":{let r=s.items[s.items.length-1];if(r.value){s.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}else if(r.sep)r.value=t;else{Object.assign(r,{key:t,sep:[]}),this.onKeyLine=!r.explicitKey;return}break}case"block-seq":{let r=s.items[s.items.length-1];if(r.value)s.items.push({start:[],value:t});else r.value=t;break}case"flow-collection":{let r=s.items[s.items.length-1];if(!r||r.value)s.items.push({start:[],key:t,sep:[]});else if(r.sep)r.value=t;else Object.assign(r,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((s.type==="document"||s.type==="block-map"||s.type==="block-seq")&&(t.type==="block-map"||t.type==="block-seq")){let r=t.items[t.items.length-1];if(r&&!r.sep&&!r.value&&r.start.length>0&&el(r.start)===-1&&(t.indent===0||r.start.every((n)=>n.type!=="comment"||n.indent<t.indent))){if(s.type==="document")s.end=r.start;else s.items.push({start:r.start});t.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:[]};if(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":{if(el(e.start)!==-1)yield*this.pop(),yield*this.step();else e.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}let t=this.startBlockValue(e);if(t)this.stack.push(t);else 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 t=ps(this.peek(2)),s=Ce(t),r;if(e.end)r=e.end,r.push(this.sourceToken),delete e.end;else r=[this.sourceToken];let n={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:s,key:e,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=n}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 t=this.source.indexOf(`
134
+ `)return yield*this.pushCount(2);else return 0}*pushSpaces(e){let t=this.pos-1,s;do s=this.buffer[++t];while(s===" "||e&&s==="\t");let r=t-this.pos;if(r>0)yield this.buffer.substr(this.pos,r),this.pos=t;return r}*pushUntil(e){let t=this.pos,s=this.buffer[t];while(!e(s))s=this.buffer[++t];return yield*this.pushToIndex(t,!1)}}PS.Lexer=za});var Yr=m(function(_S){class Za{constructor(){this.lineStarts=[],this.addNewLine=(e)=>this.lineStarts.push(e),this.linePos=(e)=>{let t=0,s=this.lineStarts.length;while(t<s){let n=t+s>>1;if(this.lineStarts[n]<e)t=n+1;else s=n}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};let r=this.lineStarts[t-1];return{line:t,col:e-r+1}}}}_S.LineCounter=Za});var Jr=m(function(US){var FS=dt("process"),el=hs(),BS=Gr();function ce(e,t){for(let s=0;s<e.length;++s)if(e[s].type===t)return!0;return!1}function tl(e){for(let t=0;t<e.length;++t)switch(e[t].type){case"space":case"comment":case"newline":break;default:return t}return-1}function rl(e){switch(e?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function gs(e){switch(e.type){case"document":return e.start;case"block-map":{let t=e.items[e.items.length-1];return t.sep??t.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function Me(e){if(e.length===0)return[];let t=e.length;e:while(--t>=0)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}while(e[++t]?.type==="space");return e.splice(t,e.length)}function ys(e,t){if(t.length<1e5)Array.prototype.push.apply(e,t);else for(let s=0;s<t.length;++s)e.push(t[s])}function sl(e){if(e.start.type==="flow-seq-start"){for(let t of e.items)if(t.sep&&!t.value&&!ce(t.start,"explicit-key-ind")&&!ce(t.sep,"map-value-ind")){if(t.key)t.value=t.key;if(delete t.key,rl(t.value))if(t.value.end)ys(t.value.end,t.sep);else t.value.end=t.sep;else ys(t.start,t.sep);delete t.sep}}}class nl{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 BS.Lexer,this.onNewLine=e}*parse(e,t=!1){if(this.onNewLine&&this.offset===0)this.onNewLine(0);for(let s of this.lexer.lex(e,t))yield*this.next(s);if(!t)yield*this.end()}*next(e){if(this.source=e,FS.env.LOG_TOKENS)console.log("|",el.prettyToken(e));if(this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=el.tokenType(e);if(!t){let s=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:s,source:e}),this.offset+=e.length}else if(t==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":if(this.atNewLine=!0,this.indent=0,this.onNewLine)this.onNewLine(this.offset+e.length);break;case"space":if(this.atNewLine&&e[0]===" ")this.indent+=e.length;break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":if(this.atNewLine)this.indent+=e.length;break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}}*end(){while(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"){while(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 t=e??this.stack.pop();if(!t)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield t;else{let s=this.peek(1);if(t.type==="block-scalar")t.indent="indent"in s?s.indent:0;else if(t.type==="flow-collection"&&s.type==="document")t.indent=0;if(t.type==="flow-collection")sl(t);switch(s.type){case"document":s.value=t;break;case"block-scalar":s.props.push(t);break;case"block-map":{let r=s.items[s.items.length-1];if(r.value){s.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}else if(r.sep)r.value=t;else{Object.assign(r,{key:t,sep:[]}),this.onKeyLine=!r.explicitKey;return}break}case"block-seq":{let r=s.items[s.items.length-1];if(r.value)s.items.push({start:[],value:t});else r.value=t;break}case"flow-collection":{let r=s.items[s.items.length-1];if(!r||r.value)s.items.push({start:[],key:t,sep:[]});else if(r.sep)r.value=t;else Object.assign(r,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((s.type==="document"||s.type==="block-map"||s.type==="block-seq")&&(t.type==="block-map"||t.type==="block-seq")){let r=t.items[t.items.length-1];if(r&&!r.sep&&!r.value&&r.start.length>0&&tl(r.start)===-1&&(t.indent===0||r.start.every((n)=>n.type!=="comment"||n.indent<t.indent))){if(s.type==="document")s.end=r.start;else s.items.push({start:r.start});t.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:[]};if(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":{if(tl(e.start)!==-1)yield*this.pop(),yield*this.step();else e.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}let t=this.startBlockValue(e);if(t)this.stack.push(t);else 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 t=gs(this.peek(2)),s=Me(t),r;if(e.end)r=e.end,r.push(this.sourceToken),delete e.end;else r=[this.sourceToken];let n={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:s,key:e,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=n}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 t=this.source.indexOf(`
135
135
  `)+1;while(t!==0)this.onNewLine(this.offset+t),t=this.source.indexOf(`
136
- `,t)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){let s="end"in t.value?t.value.end:void 0;if((Array.isArray(s)?s[s.length-1]:void 0)?.type==="comment")s?.push(this.sourceToken);else e.items.push({start:[this.sourceToken]})}else if(t.sep)t.sep.push(this.sourceToken);else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){let r=e.items[e.items.length-2]?.value?.end;if(Array.isArray(r)){ds(r,t.start),r.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let s=!this.onKeyLine&&this.indent===e.indent,r=s&&(t.sep||t.explicitKey)&&this.type!=="seq-item-ind",n=[];if(r&&t.sep&&!t.value){let i=[];for(let o=0;o<t.sep.length;++o){let a=t.sep[o];switch(a.type){case"newline":i.push(o);break;case"space":break;case"comment":if(a.indent>e.indent)i.length=0;break;default:i.length=0}}if(i.length>=2)n=t.sep.splice(i[1])}switch(this.type){case"anchor":case"tag":if(r||t.value)n.push(this.sourceToken),e.items.push({start:n}),this.onKeyLine=!0;else if(t.sep)t.sep.push(this.sourceToken);else t.start.push(this.sourceToken);return;case"explicit-key-ind":if(!t.sep&&!t.explicitKey)t.start.push(this.sourceToken),t.explicitKey=!0;else if(r||t.value)n.push(this.sourceToken),e.items.push({start:n,explicitKey:!0});else 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(t.explicitKey)if(!t.sep)if(ce(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let i=Ce(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]})}else if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(ce(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,key:null,sep:[this.sourceToken]}]});else if(sl(t.key)&&!ce(t.sep,"newline")){let i=Ce(t.start),{key:o,sep:a}=t;a.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:o,sep:a}]})}else if(n.length>0)t.sep=t.sep.concat(n,this.sourceToken);else t.sep.push(this.sourceToken);else if(!t.sep)Object.assign(t,{key:null,sep:[this.sourceToken]});else if(t.value||r)e.items.push({start:n,key:null,sep:[this.sourceToken]});else if(ce(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]});else t.sep.push(this.sourceToken);this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let i=this.flowScalar(this.type);if(r||t.value)e.items.push({start:n,key:i,sep:[]}),this.onKeyLine=!0;else if(t.sep)this.stack.push(i);else Object.assign(t,{key:i,sep:[]}),this.onKeyLine=!0;return}default:{let i=this.startBlockValue(e);if(i){if(i.type==="block-seq"){if(!t.explicitKey&&t.sep&&!ce(t.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 if(s)e.items.push({start:n});this.stack.push(i);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){let s="end"in t.value?t.value.end:void 0;if((Array.isArray(s)?s[s.length-1]:void 0)?.type==="comment")s?.push(this.sourceToken);else e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){let r=e.items[e.items.length-2]?.value?.end;if(Array.isArray(r)){ds(r,t.start),r.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;if(t.value||ce(t.start,"seq-item-ind"))e.items.push({start:[this.sourceToken]});else t.start.push(this.sourceToken);return}if(this.indent>e.indent){let s=this.startBlockValue(e);if(s){this.stack.push(s);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if(this.type==="flow-error-end"){let s;do yield*this.pop(),s=this.peek(1);while(s?.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":if(!t||t.sep)e.items.push({start:[this.sourceToken]});else t.start.push(this.sourceToken);return;case"map-value-ind":if(!t||t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else Object.assign(t,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":if(!t||t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else t.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let r=this.flowScalar(this.type);if(!t||t.value)e.items.push({start:[],key:r,sep:[]});else if(t.sep)this.stack.push(r);else Object.assign(t,{key:r,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}let s=this.startBlockValue(e);if(s)this.stack.push(s);else yield*this.pop(),yield*this.step()}else{let s=this.peek(2);if(s.type==="block-map"&&(this.type==="map-value-ind"&&s.indent===e.indent||this.type==="newline"&&!s.items[s.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&s.type!=="flow-collection"){let r=ps(s),n=Ce(r);tl(e);let i=e.end.splice(1,e.end.length);i.push(this.sourceToken);let o={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:i}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let t=this.source.indexOf(`
136
+ `,t)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){let s="end"in t.value?t.value.end:void 0;if((Array.isArray(s)?s[s.length-1]:void 0)?.type==="comment")s?.push(this.sourceToken);else e.items.push({start:[this.sourceToken]})}else if(t.sep)t.sep.push(this.sourceToken);else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){let r=e.items[e.items.length-2]?.value?.end;if(Array.isArray(r)){ys(r,t.start),r.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let s=!this.onKeyLine&&this.indent===e.indent,r=s&&(t.sep||t.explicitKey)&&this.type!=="seq-item-ind",n=[];if(r&&t.sep&&!t.value){let i=[];for(let o=0;o<t.sep.length;++o){let a=t.sep[o];switch(a.type){case"newline":i.push(o);break;case"space":break;case"comment":if(a.indent>e.indent)i.length=0;break;default:i.length=0}}if(i.length>=2)n=t.sep.splice(i[1])}switch(this.type){case"anchor":case"tag":if(r||t.value)n.push(this.sourceToken),e.items.push({start:n}),this.onKeyLine=!0;else if(t.sep)t.sep.push(this.sourceToken);else t.start.push(this.sourceToken);return;case"explicit-key-ind":if(!t.sep&&!t.explicitKey)t.start.push(this.sourceToken),t.explicitKey=!0;else if(r||t.value)n.push(this.sourceToken),e.items.push({start:n,explicitKey:!0});else 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(t.explicitKey)if(!t.sep)if(ce(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let i=Me(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]})}else if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(ce(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,key:null,sep:[this.sourceToken]}]});else if(rl(t.key)&&!ce(t.sep,"newline")){let i=Me(t.start),{key:o,sep:a}=t;a.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:o,sep:a}]})}else if(n.length>0)t.sep=t.sep.concat(n,this.sourceToken);else t.sep.push(this.sourceToken);else if(!t.sep)Object.assign(t,{key:null,sep:[this.sourceToken]});else if(t.value||r)e.items.push({start:n,key:null,sep:[this.sourceToken]});else if(ce(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]});else t.sep.push(this.sourceToken);this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let i=this.flowScalar(this.type);if(r||t.value)e.items.push({start:n,key:i,sep:[]}),this.onKeyLine=!0;else if(t.sep)this.stack.push(i);else Object.assign(t,{key:i,sep:[]}),this.onKeyLine=!0;return}default:{let i=this.startBlockValue(e);if(i){if(i.type==="block-seq"){if(!t.explicitKey&&t.sep&&!ce(t.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 if(s)e.items.push({start:n});this.stack.push(i);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){let s="end"in t.value?t.value.end:void 0;if((Array.isArray(s)?s[s.length-1]:void 0)?.type==="comment")s?.push(this.sourceToken);else e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){let r=e.items[e.items.length-2]?.value?.end;if(Array.isArray(r)){ys(r,t.start),r.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;if(t.value||ce(t.start,"seq-item-ind"))e.items.push({start:[this.sourceToken]});else t.start.push(this.sourceToken);return}if(this.indent>e.indent){let s=this.startBlockValue(e);if(s){this.stack.push(s);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if(this.type==="flow-error-end"){let s;do yield*this.pop(),s=this.peek(1);while(s?.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":if(!t||t.sep)e.items.push({start:[this.sourceToken]});else t.start.push(this.sourceToken);return;case"map-value-ind":if(!t||t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else Object.assign(t,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":if(!t||t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else t.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let r=this.flowScalar(this.type);if(!t||t.value)e.items.push({start:[],key:r,sep:[]});else if(t.sep)this.stack.push(r);else Object.assign(t,{key:r,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}let s=this.startBlockValue(e);if(s)this.stack.push(s);else yield*this.pop(),yield*this.step()}else{let s=this.peek(2);if(s.type==="block-map"&&(this.type==="map-value-ind"&&s.indent===e.indent||this.type==="newline"&&!s.items[s.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&s.type!=="flow-collection"){let r=gs(s),n=Me(r);sl(e);let i=e.end.splice(1,e.end.length);i.push(this.sourceToken);let o={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:i}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let t=this.source.indexOf(`
137
137
  `)+1;while(t!==0)this.onNewLine(this.offset+t),t=this.source.indexOf(`
138
- `,t)+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 t=ps(e),s=Ce(t);return s.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let t=ps(e),s=Ce(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){if(this.type!=="comment")return!1;if(this.indent<=t)return!1;return e.every((s)=>s.type==="newline"||s.type==="space")}*documentEnd(e){if(this.type!=="doc-mode"){if(e.end)e.end.push(this.sourceToken);else e.end=[this.sourceToken];if(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;case"space":case"comment":default:if(e.end)e.end.push(this.sourceToken);else e.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}}US.Parser=rl});var ll=m(function(QS){var nl=Cr(),VS=nt(),ut=it(),GS=Vs(),YS=I(),JS=Vr(),il=Gr();function ol(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new JS.LineCounter||null,prettyErrors:t}}function HS(e,t={}){let{lineCounter:s,prettyErrors:r}=ol(t),n=new il.Parser(s?.addNewLine),i=new nl.Composer(t),o=Array.from(i.compose(n.parse(e)));if(r&&s)for(let a of o)a.errors.forEach(ut.prettifyError(e,s)),a.warnings.forEach(ut.prettifyError(e,s));if(o.length>0)return o;return Object.assign([],{empty:!0},i.streamInfo())}function al(e,t={}){let{lineCounter:s,prettyErrors:r}=ol(t),n=new il.Parser(s?.addNewLine),i=new nl.Composer(t),o=null;for(let a of i.compose(n.parse(e),!0,e.length))if(!o)o=a;else if(o.options.logLevel!=="silent"){o.errors.push(new ut.YAMLParseError(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}if(r&&s)o.errors.forEach(ut.prettifyError(e,s)),o.warnings.forEach(ut.prettifyError(e,s));return o}function XS(e,t,s){let r=void 0;if(typeof t==="function")r=t;else if(s===void 0&&t&&typeof t==="object")s=t;let n=al(e,s);if(!n)return null;if(n.warnings.forEach((i)=>GS.warn(n.options.logLevel,i)),n.errors.length>0)if(n.options.logLevel!=="silent")throw n.errors[0];else n.errors=[];return n.toJS(Object.assign({reviver:r},s))}function WS(e,t,s){let r=null;if(typeof t==="function"||Array.isArray(t))r=t;else if(s===void 0&&t)s=t;if(typeof s==="string")s=s.length;if(typeof s==="number"){let n=Math.round(s);s=n<1?void 0:n>8?{indent:8}:{indent:n}}if(e===void 0){let{keepUndefined:n}=s??t??{};if(!n)return}if(YS.isDocument(e)&&!r)return e.toString(s);return new VS.Document(e,r,s).toString(s)}QS.parse=XS;QS.parseAllDocuments=HS;QS.parseDocument=al;QS.stringify=WS});var Kf=xl(Wi(),1);function Qi(e){return e}function zi(e){return e}function Vf(e){return e}function Zi(e){return Vf({id:`designMd:source:${e.id}`,type:"designMd:source",description:`Design-md: ${e.title}`,contribution:e})}import{existsSync as iE,readdirSync as oE}from"fs";import{join as aE}from"path";import{readFileSync as nE}from"fs";var sw=Cr(),rw=nt(),nw=br(),Yr=it(),iw=Ve(),ue=I(),ow=ie(),aw=q(),lw=ae(),cw=le(),Uv=us(),uw=Kr(),fw=Vr(),pw=Gr(),hs=ll(),cl=Ue();var dw=sw.Composer,hw=rw.Document,mw=nw.Schema,{YAMLError:gw,YAMLParseError:yw,YAMLWarning:bw}=Yr,Sw=iw.Alias,{isAlias:ww,isCollection:Ew,isDocument:vw,isMap:Nw,isNode:Ow,isPair:kw,isScalar:Aw,isSeq:Lw}=ue,$w=ow.Pair,Iw=aw.Scalar,Tw=lw.YAMLMap,Dw=cw.YAMLSeq;var qw=uw.Lexer,Rw=fw.LineCounter,Cw=pw.Parser,{parse:ft,parseAllDocuments:Mw,parseDocument:Pw,stringify:xw}=hs,{visit:_w,visitAsync:jw}=cl;var ul=["auto","user","override"];function ms(e){return typeof e==="string"&&e.trim()?e.trim():void 0}function Fw(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function fe(e){let t=e.match(/^---\r?\n([\s\S]*?)\r?\n---\r?\n?([\s\S]*)$/);if(!t)return{meta:"",body:e.trim()};return{meta:(t[1]??"").trim(),body:(t[2]??"").trim()}}function Me(e){let{meta:t}=fe(e);if(!t)throw Error("design-md file is missing YAML frontmatter");let s=ft(t);if(!s||typeof s!=="object")throw Error("design-md frontmatter must be a YAML object");let r=typeof s.title==="string"?s.title.trim():"",n=typeof s.name==="string"?s.name.trim():"",i=r||n;if(!i)throw Error("design-md frontmatter must include a non-empty 'title' or 'name' field");let o=ms(s.id)??ms(s.slug)??Fw(i);if(!o)throw Error("design-md frontmatter must include a non-empty 'id' field");let a={id:o,title:i,category:ms(s.category)??"general",tags:Array.isArray(s.tags)?s.tags:[],origin:typeof s.origin==="string"?s.origin:"local"};if(n)a.name=n;if(typeof s.version==="string"&&s.version.trim())a.version=s.version.trim();let l=ms(s.description);if(l)a.description=l;if(typeof s.sourceUrl==="string")a.sourceUrl=s.sourceUrl;if(Array.isArray(s.exemptRules)){let c=s.exemptRules.filter((d)=>typeof d==="string"&&d.trim().length>0);if(c.length>0)a.exemptRules=c.map((d)=>d.trim())}if(Array.isArray(s.extractedTokens))a.extractedTokens=s.extractedTokens;if(typeof s.layer==="string")if(ul.includes(s.layer))a.layer=s.layer;else console.warn(`[design-md] ignoring invalid layer "${s.layer}" on id="${a.id}"; expected one of ${ul.join("|")}`);return a}var dl=["Overview","Colors","Typography","Layout","Elevation & Depth","Shapes","Components","Do's and Don'ts"],Bw={overview:"Overview","brand & style":"Overview","visual theme & atmosphere":"Overview","visual theme":"Overview",colors:"Colors","color palette & roles":"Colors","color palette":"Colors",typography:"Typography","typography rules":"Typography","typographic architecture":"Typography",layout:"Layout","layout & spacing":"Layout","layout principles":"Layout","elevation & depth":"Elevation & Depth",elevation:"Elevation & Depth","depth & elevation":"Elevation & Depth",shapes:"Shapes",components:"Components","component stylings":"Components","component behaviors":"Components","do's and don'ts":"Do's and Don'ts","dos and don'ts":"Do's and Don'ts","anti-patterns":"Do's and Don'ts","anti-patterns (banned)":"Do's and Don'ts"},Uw=["colors","typography","rounded","spacing","components"],Kw=["themes","forbidden"],hl=new Set([...Uw,...Kw]),Vw=new Set(["fontFamily","fontSize","fontWeight","lineHeight","letterSpacing","fontFeature","fontVariation"]),Gw=new Set(["backgroundColor","textColor","typography","rounded","padding","size","height","width"]),fl=/^-?\d*\.?\d+(px|em|rem)$/,ml=/^\{([\w-]+(?:\.[\w-]+)+)\}$/,Yw=/^(rgba?|hsla?|hwb|lab|lch|oklab|oklch|color|color-mix)\(.+\)$/i,Jw=/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,Hw=/^[a-z]+$/i;function gl(e){let t=e.replace(/^\d+\.\s*/,"").replace(/[\u2018\u2019]/g,"'").trim().toLowerCase();return Bw[t]}function Z(e){return e&&typeof e==="object"&&!Array.isArray(e)?e:{}}function gs(e){return Object.fromEntries(Object.entries(Z(e)).flatMap(([t,s])=>typeof s==="string"||typeof s==="number"?[[t,String(s)]]:[]))}function pl(e){return Array.isArray(e)?e.filter((t)=>typeof t==="string"&&t.trim().length>0):[]}function Xw(e){return[...e.matchAll(/^```ya?ml[^\n]*\n([\s\S]*?)^```/gim)].map((t)=>t[1]??"")}function yl(e){let{meta:t,body:s}=fe(e),r=[],n=[];for(let[i,o]of[t,...Xw(s)].entries()){if(!o.trim())continue;let a;try{a=Z(ft(o))}catch(l){if(i===0)r.push({severity:"error",message:`frontmatter is not valid YAML: ${l.message}`});continue}if(i===0||Object.keys(a).some((l)=>hl.has(l)))n.push(a)}return{sources:n,issues:r}}function Ww(e){let t={};for(let[s,r]of Object.entries(Z(e)))if(typeof r==="string")t[s]={fontFamily:r};else{let n={};for(let[i,o]of Object.entries(Z(r)))if(Vw.has(i)&&(typeof o==="string"||typeof o==="number"))n[i]=o;t[s]=n}return t}function ys(e){let{sources:t}=yl(e),s=Object.assign({},...t);if(!Object.keys(s).some((l)=>hl.has(l)))return;let r={colors:gs(s.colors),typography:Ww(s.typography),rounded:gs(s.rounded),spacing:Object.fromEntries(Object.entries(Z(s.spacing)).flatMap(([l,c])=>typeof c==="string"||typeof c==="number"?[[l,c]]:[])),components:Object.fromEntries(Object.entries(Z(s.components)).map(([l,c])=>[l,gs(c)]))},n=Object.fromEntries(Object.entries(Z(s.themes)).map(([l,c])=>[l,gs(c)]));if(Object.keys(n).length)r.themes=n;let i=Z(s.forbidden),o=pl(i.colors),a=pl(i.fonts);if(o.length||a.length)r.forbidden={colors:o,fonts:a};return r}function Qw(e){let t=e.trim();return Jw.test(t)||Yw.test(t)||Hw.test(t)||ml.test(t)}function zw(e,t){let s=e;for(let r of t.split("."))if(s=Z(s)[r],s===void 0)return;return s}function Zw(e){let{body:t}=fe(e),{sources:s,issues:r}=yl(e),n=new Set;for(let u of s)for(let p of Object.keys(u)){if(n.has(p))r.push({severity:"error",message:`top-level key "${p}" is declared twice`,path:p});n.add(p)}let i=[...t.replace(/^```[\s\S]*?^```/gm,"").matchAll(/^##\s+(.+?)\s*$/gm)].map((u)=>u[1]??""),o=new Set,a=-1;for(let u of i){let p=gl(u),y=p??u.trim().toLowerCase();if(o.has(y))r.push({severity:"error",message:`section "${u}" appears twice`});if(o.add(y),!p)continue;let h=dl.indexOf(p);if(h<a)r.push({severity:"warning",message:`section "${u}" is out of order`});a=Math.max(a,h)}let l=Object.assign({},...s),c=ys(e);if(!c)return r;let d=(u,p,y)=>{let h=ml.exec(u.trim())?.[1];if(!h)return!1;let g=zw(l,h);if(g===void 0)r.push({severity:"warning",message:`reference {${h}} does not resolve`,path:p});else if(y&&typeof g==="object")r.push({severity:"warning",message:`reference {${h}} points at a group`,path:p});return!0};if(Object.keys(c.colors).length&&!("primary"in c.colors))r.push({severity:"warning",message:"colors has no primary",path:"colors"});let f=[["colors",c.colors],...Object.entries(c.themes??{}).map(([u,p])=>[`themes.${u}`,p])];for(let[u,p]of f)for(let[y,h]of Object.entries(p)){let g=`${u}.${y}`;if(!d(h,g,!0)&&!Qw(h))r.push({severity:"warning",message:`"${h}" is not a CSS color`,path:g})}for(let[u,p]of Object.entries(c.typography))for(let y of["fontSize","letterSpacing"]){let h=p[y];if(h!==void 0&&!d(String(h),`typography.${u}.${y}`,!0)&&!fl.test(String(h)))r.push({severity:"warning",message:`"${h}" is not a px/em/rem dimension`,path:`typography.${u}.${y}`})}for(let[u,p]of Object.entries(c.rounded))if(!d(p,`rounded.${u}`,!0)&&!fl.test(p))r.push({severity:"warning",message:`"${p}" is not a px/em/rem dimension`,path:`rounded.${u}`});for(let[u,p]of Object.entries(c.components))for(let[y,h]of Object.entries(p)){let g=`components.${u}.${y}`;if(!Gw.has(y))r.push({severity:"warning",message:`unknown component property "${y}"`,path:g});d(h,g,!1)}return r}function bl(e){let t=["Visual contract (DESIGN.md tokens):"],s=Object.keys(e.colors);if(s.length)t.push(`- Colors: use CSS variables ${s.map((o)=>`var(--${o})`).join(", ")}; no one-off hex.`);let r=Object.keys(e.themes??{});if(r.length)t.push(`- Themes: switch with html[data-theme] = ${r.map((o)=>`"${o}"`).join(" | ")} (first is default).`);let n=[...new Set(Object.values(e.typography).flatMap((o)=>o.fontFamily?[o.fontFamily]:[]))];if(n.length)t.push(`- Fonts: ${n.join("; ")}.`);let i=Object.entries(e.rounded);if(i.length)t.push(`- Radius scale: ${i.map(([o,a])=>`${o} ${a}`).join(", ")}.`);if(e.forbidden?.colors.length)t.push(`- Never use these colors: ${e.forbidden.colors.join(", ")}.`);if(e.forbidden?.fonts.length)t.push(`- Never set these fonts as the only family: ${e.forbidden.fonts.join(", ")}.`);return t.join(`
139
- `)}var eE=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","ui-sans-serif","ui-serif","ui-monospace","ui-rounded","emoji","math","fangsong"]);function tE(e,t){let s=[],r=e.toLowerCase();for(let o of t.forbidden?.colors??[]){let a=o.trim().toLowerCase();if(a&&r.includes(a))s.push({rule:"forbidden-color",detail:o})}let n=new Set((t.forbidden?.fonts??[]).map((o)=>o.toLowerCase()));for(let o of e.matchAll(/font-family\s*:\s*([^;}{]+)/gi)){let a=(o[1]??"").split(",").map((c)=>c.trim().replace(/^['"]|['"]$/g,"")).filter((c)=>c&&!eE.has(c.toLowerCase())),l=a.length===1?a[0]??"":"";if(l&&n.has(l.toLowerCase()))s.push({rule:"forbidden-font",detail:l})}let i=Object.keys(t.colors);if(i.length&&!i.some((o)=>e.includes(`var(--${o})`)))s.push({rule:"tokens-unused",detail:`none of ${i.map((o)=>`var(--${o})`).join(", ")} is used`});return s}function sE(e){let t=e.body.trim();return e.tokens?`${bl(e.tokens)}
138
+ `,t)+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 t=gs(e),s=Me(t);return s.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let t=gs(e),s=Me(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){if(this.type!=="comment")return!1;if(this.indent<=t)return!1;return e.every((s)=>s.type==="newline"||s.type==="space")}*documentEnd(e){if(this.type!=="doc-mode"){if(e.end)e.end.push(this.sourceToken);else e.end=[this.sourceToken];if(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;case"space":case"comment":default:if(e.end)e.end.push(this.sourceToken);else e.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}}US.Parser=nl});var cl=m(function(QS){var il=Pr(),VS=it(),ft=ot(),GS=Ys(),YS=I(),JS=Yr(),ol=Jr();function al(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new JS.LineCounter||null,prettyErrors:t}}function HS(e,t={}){let{lineCounter:s,prettyErrors:r}=al(t),n=new ol.Parser(s?.addNewLine),i=new il.Composer(t),o=Array.from(i.compose(n.parse(e)));if(r&&s)for(let a of o)a.errors.forEach(ft.prettifyError(e,s)),a.warnings.forEach(ft.prettifyError(e,s));if(o.length>0)return o;return Object.assign([],{empty:!0},i.streamInfo())}function ll(e,t={}){let{lineCounter:s,prettyErrors:r}=al(t),n=new ol.Parser(s?.addNewLine),i=new il.Composer(t),o=null;for(let a of i.compose(n.parse(e),!0,e.length))if(!o)o=a;else if(o.options.logLevel!=="silent"){o.errors.push(new ft.YAMLParseError(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}if(r&&s)o.errors.forEach(ft.prettifyError(e,s)),o.warnings.forEach(ft.prettifyError(e,s));return o}function XS(e,t,s){let r=void 0;if(typeof t==="function")r=t;else if(s===void 0&&t&&typeof t==="object")s=t;let n=ll(e,s);if(!n)return null;if(n.warnings.forEach((i)=>GS.warn(n.options.logLevel,i)),n.errors.length>0)if(n.options.logLevel!=="silent")throw n.errors[0];else n.errors=[];return n.toJS(Object.assign({reviver:r},s))}function WS(e,t,s){let r=null;if(typeof t==="function"||Array.isArray(t))r=t;else if(s===void 0&&t)s=t;if(typeof s==="string")s=s.length;if(typeof s==="number"){let n=Math.round(s);s=n<1?void 0:n>8?{indent:8}:{indent:n}}if(e===void 0){let{keepUndefined:n}=s??t??{};if(!n)return}if(YS.isDocument(e)&&!r)return e.toString(s);return new VS.Document(e,r,s).toString(s)}QS.parse=XS;QS.parseAllDocuments=HS;QS.parseDocument=ll;QS.stringify=WS});var Kf=_l(Qi(),1);function zi(e){return e}function Zi(e){return e}function Vf(e){return e}function eo(e){return Vf({id:`designMd:source:${e.id}`,type:"designMd:source",description:`Design-md: ${e.title}`,contribution:e})}import{existsSync as iE,readdirSync as oE}from"fs";import{join as aE}from"path";import{readFileSync as nE}from"fs";var sw=Pr(),rw=it(),nw=wr(),Hr=ot(),iw=Ge(),ue=I(),ow=ie(),aw=q(),lw=ae(),cw=le(),Uv=hs(),uw=Gr(),fw=Yr(),pw=Jr(),bs=cl(),ul=Ke();var dw=sw.Composer,hw=rw.Document,mw=nw.Schema,{YAMLError:gw,YAMLParseError:yw,YAMLWarning:bw}=Hr,Sw=iw.Alias,{isAlias:ww,isCollection:Ew,isDocument:vw,isMap:Nw,isNode:Ow,isPair:kw,isScalar:Aw,isSeq:Lw}=ue,$w=ow.Pair,Iw=aw.Scalar,Tw=lw.YAMLMap,Dw=cw.YAMLSeq;var qw=uw.Lexer,Rw=fw.LineCounter,Cw=pw.Parser,{parse:pt,parseAllDocuments:Mw,parseDocument:Pw,stringify:xw}=bs,{visit:_w,visitAsync:jw}=ul;var fl=["auto","user","override"];function Ss(e){return typeof e==="string"&&e.trim()?e.trim():void 0}function Fw(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function fe(e){let t=e.match(/^---\r?\n([\s\S]*?)\r?\n---\r?\n?([\s\S]*)$/);if(!t)return{meta:"",body:e.trim()};return{meta:(t[1]??"").trim(),body:(t[2]??"").trim()}}function Pe(e){let{meta:t}=fe(e);if(!t)throw Error("design-md file is missing YAML frontmatter");let s=pt(t);if(!s||typeof s!=="object")throw Error("design-md frontmatter must be a YAML object");let r=typeof s.title==="string"?s.title.trim():"",n=typeof s.name==="string"?s.name.trim():"",i=r||n;if(!i)throw Error("design-md frontmatter must include a non-empty 'title' or 'name' field");let o=Ss(s.id)??Ss(s.slug)??Fw(i);if(!o)throw Error("design-md frontmatter must include a non-empty 'id' field");let a={id:o,title:i,category:Ss(s.category)??"general",tags:Array.isArray(s.tags)?s.tags:[],origin:typeof s.origin==="string"?s.origin:"local"};if(n)a.name=n;if(typeof s.version==="string"&&s.version.trim())a.version=s.version.trim();let l=Ss(s.description);if(l)a.description=l;if(typeof s.sourceUrl==="string")a.sourceUrl=s.sourceUrl;if(Array.isArray(s.exemptRules)){let c=s.exemptRules.filter((d)=>typeof d==="string"&&d.trim().length>0);if(c.length>0)a.exemptRules=c.map((d)=>d.trim())}if(Array.isArray(s.extractedTokens))a.extractedTokens=s.extractedTokens;if(typeof s.layer==="string")if(fl.includes(s.layer))a.layer=s.layer;else console.warn(`[design-md] ignoring invalid layer "${s.layer}" on id="${a.id}"; expected one of ${fl.join("|")}`);return a}var hl=["Overview","Colors","Typography","Layout","Elevation & Depth","Shapes","Components","Do's and Don'ts"],Bw={overview:"Overview","brand & style":"Overview","visual theme & atmosphere":"Overview","visual theme":"Overview",colors:"Colors","color palette & roles":"Colors","color palette":"Colors",typography:"Typography","typography rules":"Typography","typographic architecture":"Typography",layout:"Layout","layout & spacing":"Layout","layout principles":"Layout","elevation & depth":"Elevation & Depth",elevation:"Elevation & Depth","depth & elevation":"Elevation & Depth",shapes:"Shapes",components:"Components","component stylings":"Components","component behaviors":"Components","do's and don'ts":"Do's and Don'ts","dos and don'ts":"Do's and Don'ts","anti-patterns":"Do's and Don'ts","anti-patterns (banned)":"Do's and Don'ts"},Uw=["colors","typography","rounded","spacing","components"],Kw=["themes","forbidden"],ml=new Set([...Uw,...Kw]),Vw=new Set(["fontFamily","fontSize","fontWeight","lineHeight","letterSpacing","fontFeature","fontVariation"]),Gw=new Set(["backgroundColor","textColor","typography","rounded","padding","size","height","width"]),pl=/^-?\d*\.?\d+(px|em|rem)$/,gl=/^\{([\w-]+(?:\.[\w-]+)+)\}$/,Yw=/^(rgba?|hsla?|hwb|lab|lch|oklab|oklch|color|color-mix)\(.+\)$/i,Jw=/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,Hw=/^[a-z]+$/i;function yl(e){let t=e.replace(/^\d+\.\s*/,"").replace(/[\u2018\u2019]/g,"'").trim().toLowerCase();return Bw[t]}function Z(e){return e&&typeof e==="object"&&!Array.isArray(e)?e:{}}function ws(e){return Object.fromEntries(Object.entries(Z(e)).flatMap(([t,s])=>typeof s==="string"||typeof s==="number"?[[t,String(s)]]:[]))}function dl(e){return Array.isArray(e)?e.filter((t)=>typeof t==="string"&&t.trim().length>0):[]}function Xw(e){return[...e.matchAll(/^```ya?ml[^\n]*\n([\s\S]*?)^```/gim)].map((t)=>t[1]??"")}function bl(e){let{meta:t,body:s}=fe(e),r=[],n=[];for(let[i,o]of[t,...Xw(s)].entries()){if(!o.trim())continue;let a;try{a=Z(pt(o))}catch(l){if(i===0)r.push({severity:"error",message:`frontmatter is not valid YAML: ${l.message}`});continue}if(i===0||Object.keys(a).some((l)=>ml.has(l)))n.push(a)}return{sources:n,issues:r}}function Ww(e){let t={};for(let[s,r]of Object.entries(Z(e)))if(typeof r==="string")t[s]={fontFamily:r};else{let n={};for(let[i,o]of Object.entries(Z(r)))if(Vw.has(i)&&(typeof o==="string"||typeof o==="number"))n[i]=o;t[s]=n}return t}function Es(e){let{sources:t}=bl(e),s=Object.assign({},...t);if(!Object.keys(s).some((l)=>ml.has(l)))return;let r={colors:ws(s.colors),typography:Ww(s.typography),rounded:ws(s.rounded),spacing:Object.fromEntries(Object.entries(Z(s.spacing)).flatMap(([l,c])=>typeof c==="string"||typeof c==="number"?[[l,c]]:[])),components:Object.fromEntries(Object.entries(Z(s.components)).map(([l,c])=>[l,ws(c)]))},n=Object.fromEntries(Object.entries(Z(s.themes)).map(([l,c])=>[l,ws(c)]));if(Object.keys(n).length)r.themes=n;let i=Z(s.forbidden),o=dl(i.colors),a=dl(i.fonts);if(o.length||a.length)r.forbidden={colors:o,fonts:a};return r}function Qw(e){let t=e.trim();return Jw.test(t)||Yw.test(t)||Hw.test(t)||gl.test(t)}function zw(e,t){let s=e;for(let r of t.split("."))if(s=Z(s)[r],s===void 0)return;return s}function Zw(e){let{body:t}=fe(e),{sources:s,issues:r}=bl(e),n=new Set;for(let u of s)for(let p of Object.keys(u)){if(n.has(p))r.push({severity:"error",message:`top-level key "${p}" is declared twice`,path:p});n.add(p)}let i=[...t.replace(/^```[\s\S]*?^```/gm,"").matchAll(/^##\s+(.+?)\s*$/gm)].map((u)=>u[1]??""),o=new Set,a=-1;for(let u of i){let p=yl(u),y=p??u.trim().toLowerCase();if(o.has(y))r.push({severity:"error",message:`section "${u}" appears twice`});if(o.add(y),!p)continue;let h=hl.indexOf(p);if(h<a)r.push({severity:"warning",message:`section "${u}" is out of order`});a=Math.max(a,h)}let l=Object.assign({},...s),c=Es(e);if(!c)return r;let d=(u,p,y)=>{let h=gl.exec(u.trim())?.[1];if(!h)return!1;let g=zw(l,h);if(g===void 0)r.push({severity:"warning",message:`reference {${h}} does not resolve`,path:p});else if(y&&typeof g==="object")r.push({severity:"warning",message:`reference {${h}} points at a group`,path:p});return!0};if(Object.keys(c.colors).length&&!("primary"in c.colors))r.push({severity:"warning",message:"colors has no primary",path:"colors"});let f=[["colors",c.colors],...Object.entries(c.themes??{}).map(([u,p])=>[`themes.${u}`,p])];for(let[u,p]of f)for(let[y,h]of Object.entries(p)){let g=`${u}.${y}`;if(!d(h,g,!0)&&!Qw(h))r.push({severity:"warning",message:`"${h}" is not a CSS color`,path:g})}for(let[u,p]of Object.entries(c.typography))for(let y of["fontSize","letterSpacing"]){let h=p[y];if(h!==void 0&&!d(String(h),`typography.${u}.${y}`,!0)&&!pl.test(String(h)))r.push({severity:"warning",message:`"${h}" is not a px/em/rem dimension`,path:`typography.${u}.${y}`})}for(let[u,p]of Object.entries(c.rounded))if(!d(p,`rounded.${u}`,!0)&&!pl.test(p))r.push({severity:"warning",message:`"${p}" is not a px/em/rem dimension`,path:`rounded.${u}`});for(let[u,p]of Object.entries(c.components))for(let[y,h]of Object.entries(p)){let g=`components.${u}.${y}`;if(!Gw.has(y))r.push({severity:"warning",message:`unknown component property "${y}"`,path:g});d(h,g,!1)}return r}function Sl(e){let t=["Visual contract (DESIGN.md tokens):"],s=Object.keys(e.colors);if(s.length)t.push(`- Colors: use CSS variables ${s.map((o)=>`var(--${o})`).join(", ")}; no one-off hex.`);let r=Object.keys(e.themes??{});if(r.length)t.push(`- Themes: switch with html[data-theme] = ${r.map((o)=>`"${o}"`).join(" | ")} (first is default).`);let n=[...new Set(Object.values(e.typography).flatMap((o)=>o.fontFamily?[o.fontFamily]:[]))];if(n.length)t.push(`- Fonts: ${n.join("; ")}.`);let i=Object.entries(e.rounded);if(i.length)t.push(`- Radius scale: ${i.map(([o,a])=>`${o} ${a}`).join(", ")}.`);if(e.forbidden?.colors.length)t.push(`- Never use these colors: ${e.forbidden.colors.join(", ")}.`);if(e.forbidden?.fonts.length)t.push(`- Never set these fonts as the only family: ${e.forbidden.fonts.join(", ")}.`);return t.join(`
139
+ `)}var eE=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","ui-sans-serif","ui-serif","ui-monospace","ui-rounded","emoji","math","fangsong"]);function tE(e,t){let s=[],r=e.toLowerCase();for(let o of t.forbidden?.colors??[]){let a=o.trim().toLowerCase();if(a&&r.includes(a))s.push({rule:"forbidden-color",detail:o})}let n=new Set((t.forbidden?.fonts??[]).map((o)=>o.toLowerCase()));for(let o of e.matchAll(/font-family\s*:\s*([^;}{]+)/gi)){let a=(o[1]??"").split(",").map((c)=>c.trim().replace(/^['"]|['"]$/g,"")).filter((c)=>c&&!eE.has(c.toLowerCase())),l=a.length===1?a[0]??"":"";if(l&&n.has(l.toLowerCase()))s.push({rule:"forbidden-font",detail:l})}let i=Object.keys(t.colors);if(i.length&&!i.some((o)=>e.includes(`var(--${o})`)))s.push({rule:"tokens-unused",detail:`none of ${i.map((o)=>`var(--${o})`).join(", ")} is used`});return s}function sE(e){let t=e.body.trim();return e.tokens?`${Sl(e.tokens)}
140
140
 
141
- ${t}`:t}var rE=[{pattern:/`?(--[\w-]+)`?\s*:\s*([#\w()%., ]+)/g,group:"css-var"},{pattern:/`?([\w-]+(?:Color|Bg|Text|Border|Shadow|Radius|Font|Size|Space))`?\s*[=:]\s*["']?([^"'\n,]+)["']?/gi,group:"token"}];function Jr(e){let t=new Set,s=[];for(let{pattern:r,group:n}of rE){let i=new RegExp(r.source,r.flags),o;while((o=i.exec(e))!==null){let a=(o[1]??"").trim(),l=(o[2]??"").trim(),c=`${a}:${l}`;if(!t.has(c))t.add(c),s.push({name:a,value:l,group:n})}}return s}function we(e){let t=nE(e,"utf-8"),{body:s}=fe(t),r=Me(t),n=ys(t),i=r.extractedTokens??(n&&Object.keys(n.colors).length?Object.entries(n.colors).map(([a,l])=>({name:a,value:l,group:"color"})):Jr(s)),o={id:r.id,title:r.title,category:r.category,tags:r.tags??[],origin:r.origin??"local",body:s,filePath:e};if(r.sourceUrl)o.sourceUrl=r.sourceUrl;if(r.description)o.description=r.description;if(n)o.tokens=n;if(r.exemptRules)o.exemptRules=r.exemptRules;if(r.layer)o.layer=r.layer;if(i.length>0)o.extractedTokens=i;return o}function Hr(e){if(!iE(e))return[];let t=[];function s(r){for(let n of oE(r,{withFileTypes:!0})){let i=aE(r,n.name);if(n.isDirectory())s(i);else if(n.isFile()&&n.name.endsWith(".md"))try{t.push(we(i))}catch(o){console.warn(`[design-md] skipping ${i}: ${o.message}`)}}}return s(e),t}var Sl={auto:1,user:2,override:3};class bs{entries=new Map;add(e,t){let s=t?.layer??"user",r=this.entries.get(e.id);if(r){let n=r.layer??"user";if(Sl[s]<Sl[n])return}this.entries.set(e.id,{...e,layer:s})}addAll(e,t){for(let s of e)this.add(s,t)}get(e){return this.entries.get(e)}list(){return[...this.entries.values()]}size(){return this.entries.size}remove(e){return this.entries.delete(e)}}function lE(e){return Math.ceil(e.length/4)}var cE=/[\u3400-\u9FFF\uF900-\uFAFF]+/g;function wl(e){let t=e.toLowerCase(),s=new Set(t.split(/[\s,;/|+_\-\uFF0C\uFF1B\u3001\u3002\uFF1A:()\uFF08\uFF09]+/).filter(Boolean));for(let r of t.match(cE)??[]){if(r.length===1)s.add(r);for(let n=0;n+2<=r.length;n+=1)s.add(r.slice(n,n+2))}return s}var uE=/[\u3400-\u9FFF\uF900-\uFAFF]/;function fE(e){return e.length>=3||e.length===2&&uE.test(e)}function pE(e,t){let s=0;if(t.ids&&t.ids.includes(e.id))s+=100;if(t.category&&e.category===t.category)s+=10;if(t.tags&&t.tags.length>0){let r=new Set(e.tags.map((n)=>n.toLowerCase()));for(let n of t.tags)if(r.has(n.toLowerCase()))s+=3}if(t.intent){let r=wl(t.intent),n=wl([e.title,e.category,...e.tags].join(" "));for(let i of r)if(fE(i)&&n.has(i))s+=2}return s}function dE(e){return!e.category&&(!e.tags||e.tags.length===0)&&(!e.ids||e.ids.length===0)&&!e.intent}class Ss{registry;constructor(e){this.registry=e}select(e){let t=e.maxEntries??3,s=e.maxTokens??1/0,r=this.registry.list(),n=dE(e)?r:r.map((a)=>({entry:a,score:pE(a,e)})).filter(({score:a})=>a>0).sort((a,l)=>l.score-a.score).map(({entry:a})=>a),i=[],o=0;for(let a of n){if(i.length>=t)break;let l=lE(a.body);if(o+l>s)continue;i.push(a),o+=l}return i}}import{existsSync as El,readFileSync as vl}from"fs";import{join as Nl,resolve as Ol}from"path";var Xr="project";function Wr(e){return Nl(e,"DESIGN.md")}function hE(e){return`# ${e.trim()||"project"} DESIGN
141
+ ${t}`:t}var rE=[{pattern:/`?(--[\w-]+)`?\s*:\s*([#\w()%., ]+)/g,group:"css-var"},{pattern:/`?([\w-]+(?:Color|Bg|Text|Border|Shadow|Radius|Font|Size|Space))`?\s*[=:]\s*["']?([^"'\n,]+)["']?/gi,group:"token"}];function Xr(e){let t=new Set,s=[];for(let{pattern:r,group:n}of rE){let i=new RegExp(r.source,r.flags),o;while((o=i.exec(e))!==null){let a=(o[1]??"").trim(),l=(o[2]??"").trim(),c=`${a}:${l}`;if(!t.has(c))t.add(c),s.push({name:a,value:l,group:n})}}return s}function we(e){let t=nE(e,"utf-8"),{body:s}=fe(t),r=Pe(t),n=Es(t),i=r.extractedTokens??(n&&Object.keys(n.colors).length?Object.entries(n.colors).map(([a,l])=>({name:a,value:l,group:"color"})):Xr(s)),o={id:r.id,title:r.title,category:r.category,tags:r.tags??[],origin:r.origin??"local",body:s,filePath:e};if(r.sourceUrl)o.sourceUrl=r.sourceUrl;if(r.description)o.description=r.description;if(n)o.tokens=n;if(r.exemptRules)o.exemptRules=r.exemptRules;if(r.layer)o.layer=r.layer;if(i.length>0)o.extractedTokens=i;return o}function Wr(e){if(!iE(e))return[];let t=[];function s(r){for(let n of oE(r,{withFileTypes:!0})){let i=aE(r,n.name);if(n.isDirectory())s(i);else if(n.isFile()&&n.name.endsWith(".md"))try{t.push(we(i))}catch(o){console.warn(`[design-md] skipping ${i}: ${o.message}`)}}}return s(e),t}var wl={auto:1,user:2,override:3};class vs{entries=new Map;add(e,t){let s=t?.layer??"user",r=this.entries.get(e.id);if(r){let n=r.layer??"user";if(wl[s]<wl[n])return}this.entries.set(e.id,{...e,layer:s})}addAll(e,t){for(let s of e)this.add(s,t)}get(e){return this.entries.get(e)}list(){return[...this.entries.values()]}size(){return this.entries.size}remove(e){return this.entries.delete(e)}}function lE(e){return Math.ceil(e.length/4)}var cE=/[\u3400-\u9FFF\uF900-\uFAFF]+/g;function El(e){let t=e.toLowerCase(),s=new Set(t.split(/[\s,;/|+_\-\uFF0C\uFF1B\u3001\u3002\uFF1A:()\uFF08\uFF09]+/).filter(Boolean));for(let r of t.match(cE)??[]){if(r.length===1)s.add(r);for(let n=0;n+2<=r.length;n+=1)s.add(r.slice(n,n+2))}return s}var uE=/[\u3400-\u9FFF\uF900-\uFAFF]/;function fE(e){return e.length>=3||e.length===2&&uE.test(e)}function pE(e,t){let s=0;if(t.ids&&t.ids.includes(e.id))s+=100;if(t.category&&e.category===t.category)s+=10;if(t.tags&&t.tags.length>0){let r=new Set(e.tags.map((n)=>n.toLowerCase()));for(let n of t.tags)if(r.has(n.toLowerCase()))s+=3}if(t.intent){let r=El(t.intent),n=El([e.title,e.category,...e.tags].join(" "));for(let i of r)if(fE(i)&&n.has(i))s+=2}return s}function dE(e){return!e.category&&(!e.tags||e.tags.length===0)&&(!e.ids||e.ids.length===0)&&!e.intent}class Ns{registry;constructor(e){this.registry=e}select(e){let t=e.maxEntries??3,s=e.maxTokens??1/0,r=this.registry.list(),n=dE(e)?r:r.map((a)=>({entry:a,score:pE(a,e)})).filter(({score:a})=>a>0).sort((a,l)=>l.score-a.score).map(({entry:a})=>a),i=[],o=0;for(let a of n){if(i.length>=t)break;let l=lE(a.body);if(o+l>s)continue;i.push(a),o+=l}return i}}import{existsSync as vl,readFileSync as Nl}from"fs";import{join as Ol,resolve as kl}from"path";var Qr="project";function zr(e){return Ol(e,"DESIGN.md")}function hE(e){return`# ${e.trim()||"project"} DESIGN
142
142
 
143
143
  Per-project visual contract. Owned by this consumer. UIBot house seeds
144
144
  (\`frontend-principles\`, \`control-console\`) are generation defaults only;
@@ -195,7 +195,7 @@ Page title 20px. Body 14px. Helper \u2265 12px. No marketing display serif.
195
195
  - No purple-gradient SaaS, ALL-CAPS chrome eyebrows, or emoji as icons.
196
196
  - No unscoped \`html, body, *\` CSS. Scope tokens to the product root.
197
197
  - No second design system beside this file.
198
- `}function kl(e){let t=Wr(e);if(!El(t))return;let s=vl(t,"utf8");if(!s.trim())return;if(/^---\r?\n/.test(s))try{let r=we(t);return{...r,id:Xr,layer:"user",tags:r.tags.includes("project")?r.tags:[...r.tags,"project"]}}catch{}return{id:Xr,title:"Project Design",category:"general",tags:["project"],origin:"local",layer:"user",body:s.trim(),filePath:t}}function mE(e){let t=[],s=new Set;for(let r of e){let n=r.trim();if(!n)continue;let i=Ol(n);if(s.has(i))continue;s.add(i),t.push(i);let o=kl(i);if(o)return{entry:o,path:o.filePath??Wr(i),tried:t}}return{path:null,tried:t}}function gE(e){let t=[];if(e.projectRoot)t.push(e.projectRoot);if(e.linkedConsumerRoot)t.push(e.linkedConsumerRoot);if(e.cwd)t.push(e.cwd);if(e.agentRootDir)t.push(e.agentRootDir);return t}function yE(e){let t=Nl(e,".uibot","link.json");if(!El(t))return;try{let s=JSON.parse(vl(t,"utf8"));if(typeof s.consumerRoot!=="string"||!s.consumerRoot.trim())return;return Ol(s.consumerRoot.trim())}catch{return}}import{fileURLToPath as bE}from"url";import{existsSync as SE,readdirSync as wE}from"fs";import{join as EE}from"path";var Qr=bE(new URL("../content",import.meta.url));function Al(e=Qr){if(!SE(e))return[];let t=[];for(let s of wE(e).sort()){if(s.startsWith("_")||!s.endsWith(".design.md"))continue;try{t.push(we(EE(e,s)))}catch(r){console.warn(`[design-md] skipping seed ${s}: ${r.message}`)}}return t}function vE(e,t=Qr){let s=Al(t);for(let r of s)e.add(r,{layer:r.layer??"auto"});return s}import{mkdirSync as Ll,writeFileSync as NE}from"fs";import{dirname as OE,join as kE}from"path";var zr=65536,AE=/^github:([^/]+)\/([^/@]+)(?:\/(.+))?$/i;async function $l(e,t=globalThis.fetch){let s=e.trim(),r=AE.exec(s);if(r){let n=r[1],i=r[2],o=(r[3]??"").replace(/^\/+|\/+$/g,""),a=`https://api.github.com/repos/${n}/${i}/contents`+(o?`/${o}`:""),l=await t(a,{headers:{accept:"application/vnd.github+json","user-agent":"uibot-design-md-sync"}});if(!l.ok)throw Error(`Failed to list github:${n}/${i}${o?"/"+o:""} (HTTP ${l.status})`);let c=await l.json(),d=Array.isArray(c)?c:[c],f=[];for(let u of d){if(!u||typeof u!=="object")continue;let p=u;if(p.type==="file"&&p.name&&Il(p.name)&&p.download_url)f.push(p.download_url)}if(f.length===0)throw Error(`No *.design.md / design markdown files found at github:${n}/${i}`+(o?`/${o}`:""));return{kind:"github",label:`github:${n}/${i}${o?"/"+o:""}`,fileUrls:f}}if(/^https?:\/\//i.test(s))return{kind:"url",label:s,fileUrls:[s]};throw Error(`Unsupported --from value "${e}". Use github:owner/repo[/path] or an https:// URL.`)}function Il(e){let t=e.toLowerCase();return t.endsWith(".design.md")||t.endsWith(".md")&&!t.startsWith("readme")}function Tl(e,t){let{meta:s,body:r}=fe(e);if(!s)return`---
198
+ `}function Al(e){let t=zr(e);if(!vl(t))return;let s=Nl(t,"utf8");if(!s.trim())return;if(/^---\r?\n/.test(s))try{let r=we(t);return{...r,id:Qr,layer:"user",tags:r.tags.includes("project")?r.tags:[...r.tags,"project"]}}catch{}return{id:Qr,title:"Project Design",category:"general",tags:["project"],origin:"local",layer:"user",body:s.trim(),filePath:t}}function mE(e){let t=[],s=new Set;for(let r of e){let n=r.trim();if(!n)continue;let i=kl(n);if(s.has(i))continue;s.add(i),t.push(i);let o=Al(i);if(o)return{entry:o,path:o.filePath??zr(i),tried:t}}return{path:null,tried:t}}function gE(e){let t=[];if(e.projectRoot)t.push(e.projectRoot);if(e.linkedConsumerRoot)t.push(e.linkedConsumerRoot);if(e.cwd)t.push(e.cwd);if(e.agentRootDir)t.push(e.agentRootDir);return t}function yE(e){let t=Ol(e,".uibot","link.json");if(!vl(t))return;try{let s=JSON.parse(Nl(t,"utf8"));if(typeof s.consumerRoot!=="string"||!s.consumerRoot.trim())return;return kl(s.consumerRoot.trim())}catch{return}}import{fileURLToPath as bE}from"url";import{existsSync as SE,readdirSync as wE}from"fs";import{join as EE}from"path";var Zr=bE(new URL("../content",import.meta.url));function Ll(e=Zr){if(!SE(e))return[];let t=[];for(let s of wE(e).sort()){if(s.startsWith("_")||!s.endsWith(".design.md"))continue;try{t.push(we(EE(e,s)))}catch(r){console.warn(`[design-md] skipping seed ${s}: ${r.message}`)}}return t}function vE(e,t=Zr){let s=Ll(t);for(let r of s)e.add(r,{layer:r.layer??"auto"});return s}import{mkdirSync as $l,writeFileSync as NE}from"fs";import{dirname as OE,join as kE}from"path";var en=65536,AE=/^github:([^/]+)\/([^/@]+)(?:\/(.+))?$/i;async function Il(e,t=globalThis.fetch){let s=e.trim(),r=AE.exec(s);if(r){let n=r[1],i=r[2],o=(r[3]??"").replace(/^\/+|\/+$/g,""),a=`https://api.github.com/repos/${n}/${i}/contents`+(o?`/${o}`:""),l=await t(a,{headers:{accept:"application/vnd.github+json","user-agent":"uibot-design-md-sync"}});if(!l.ok)throw Error(`Failed to list github:${n}/${i}${o?"/"+o:""} (HTTP ${l.status})`);let c=await l.json(),d=Array.isArray(c)?c:[c],f=[];for(let u of d){if(!u||typeof u!=="object")continue;let p=u;if(p.type==="file"&&p.name&&Tl(p.name)&&p.download_url)f.push(p.download_url)}if(f.length===0)throw Error(`No *.design.md / design markdown files found at github:${n}/${i}`+(o?`/${o}`:""));return{kind:"github",label:`github:${n}/${i}${o?"/"+o:""}`,fileUrls:f}}if(/^https?:\/\//i.test(s))return{kind:"url",label:s,fileUrls:[s]};throw Error(`Unsupported --from value "${e}". Use github:owner/repo[/path] or an https:// URL.`)}function Tl(e){let t=e.toLowerCase();return t.endsWith(".design.md")||t.endsWith(".md")&&!t.startsWith("readme")}function Dl(e,t){let{meta:s,body:r}=fe(e);if(!s)return`---
199
199
  sourceUrl: ${JSON.stringify(t.sourceUrl)}
200
200
  license: ${JSON.stringify(t.license)}
201
201
  ---
@@ -205,6 +205,6 @@ ${n.join(`
205
205
  ---
206
206
  ${r?r+(r.endsWith(`
207
207
  `)?"":`
208
- `):""}`}async function LE(e){let t=e.fetchImpl??globalThis.fetch,s=e.defaultLicense??"UNKNOWN",r=[],n=0,i=0,o;try{o=await $l(e.from,t)}catch(a){return{ok:!1,written:0,skipped:0,files:[],error:a instanceof Error?a.message:String(a)}}if(!e.dryRun)Ll(e.outDir,{recursive:!0});for(let a of o.fileUrls){let l;try{let y=await t(a,{headers:{"user-agent":"uibot-design-md-sync"}});if(!y.ok){i+=1,r.push({id:a,path:"",sourceUrl:a,status:"skipped",reason:`HTTP ${y.status}`});continue}l=await y.text()}catch(y){return{ok:!1,written:n,skipped:i,files:r,error:`Network failure fetching ${a}: ${y instanceof Error?y.message:String(y)}`}}let c=new TextEncoder().encode(l).byteLength;if(c>zr){i+=1,r.push({id:a,path:"",sourceUrl:a,status:"skipped",reason:`exceeds ${zr} bytes (${c})`});continue}let d=Tl(l,{sourceUrl:a,license:s}),f;try{f=Me(d).id}catch(y){i+=1,r.push({id:a,path:"",sourceUrl:a,status:"skipped",reason:y instanceof Error?y.message:"invalid frontmatter"});continue}let u=`${f}.design.md`,p=kE(e.outDir,u);if(e.dryRun){r.push({id:f,path:p,sourceUrl:a,status:"dry-run"}),n+=1;continue}Ll(OE(p),{recursive:!0}),NE(p,d,"utf8"),n+=1,r.push({id:f,path:p,sourceUrl:a,status:"written"})}return{ok:!0,written:n,skipped:i,files:r}}function Zr(e){let t=["---"];if(t.push(`id: ${pe(e.id)}`),t.push(`title: ${pe(e.title)}`),t.push(`category: ${pe(e.category)}`),e.tags?.length)t.push(`tags: [${e.tags.map((s)=>pe(s)).join(", ")}]`);if(e.origin)t.push(`origin: ${pe(e.origin)}`);if(e.sourceUrl)t.push(`sourceUrl: ${pe(e.sourceUrl)}`);if(e.exemptRules?.length)t.push(`exemptRules: [${e.exemptRules.map((s)=>pe(s)).join(", ")}]`);if(e.layer)t.push(`layer: ${pe(e.layer)}`);return t.push("---"),t.push(""),t.push(e.body?.trimEnd()??""),t.push(""),t.join(`
209
- `)}function $E(e){let t={};for(let s of e.list())t[s.id]=Zr(s);return t}function IE(e){let t=Zr(e),s=Me(t);if(s.id!==e.id)throw Error(`round-trip id mismatch: ${s.id} \u2260 ${e.id}`);if(s.title!==e.title)throw Error("round-trip title mismatch");if(s.category!==e.category)throw Error("round-trip category mismatch");if(e.layer&&s.layer!==e.layer)throw Error(`round-trip layer mismatch: ${s.layer} \u2260 ${e.layer}`)}function pe(e){if(/^[\w.-]+$/.test(e))return e;return JSON.stringify(e)}class en{options;constructor(e){this.options=e}recordFailure(e){let t=this.options.now?.()??new Date().toISOString();this.options.reflectionStore.append({skillId:this.options.designMdId,trigger:e.trigger,timestamp:t,reflection:e.reflection,...e.context?{context:e.context}:{}})}async proposeRewrite(){let e=this.options.registry.get(this.options.designMdId);if(!e)return null;let t=this.options.reflectionLimit??10,s=this.options.reflectionStore.recent(this.options.designMdId,t),r=DE(s),n=await this.options.generateImprovedBody({designMdId:this.options.designMdId,currentBody:e.body,failureContext:r});return{designMdId:this.options.designMdId,baseVersion:e.layer??"user",proposedBody:n,reflectionCount:s.length,generatedAt:this.options.now?.()??new Date().toISOString()}}applyOverride(e){let t=this.options.registry.get(this.options.designMdId);if(!t)return null;let s={...t,body:e.proposedBody};return this.options.registry.add(s,{layer:"override"}),this.options.registry.get(this.options.designMdId)??null}}function TE(e){return new en(e)}function DE(e){if(e.length===0)return"(no prior reflections)";return e.map((t,s)=>`${s+1}. [${t.trigger} \xB7 ${t.timestamp}] ${t.reflection}`).join(`
210
- `)}function LN(e={}){let t=e.dir??`${process.cwd()}/.uibot/design-md`,s=new bs;s.addAll(Hr(t));let r=zi({manifest:Qi({pluginId:"uibot.design-md",version:"0.1.0",displayName:"UIBot Design-MD",description:"Loads `.md` design system style guides from the filesystem and registers them as designMd:source capabilities.",sdkRange:"^0.1.0",engineRange:"^0.1.0",capabilities:s.list().map((n)=>({id:`designMd:source:${n.id}`,type:"designMd:source",description:`Design-md: ${n.title} (${n.category})`})),permissions:[]}),register(n){for(let i of s.list())n.addCapability(Zi(i))}});return Object.assign(r,{registry:s,createSelector(){return new Ss(s)}})}export{Qr as DESIGN_MD_CONTENT_DIR,dl as DESIGN_MD_SECTIONS,en as DesignMdEvolutionAdapter,bs as DesignMdRegistry,Ss as DesignMdSelectorImpl,zr as MAX_DESIGN_MD_BYTES,Xr as PROJECT_DESIGN_MD_ID,IE as assertSerializeRoundTrip,gl as canonicalDesignMdSection,tE as checkHtmlAgainstDesign,TE as createDesignMdEvolutionAdapter,LN as createUIBotDesignMdPlugin,gE as defaultProjectDesignRoots,sE as designMdGuideText,bl as designTokensInstruction,$E as exportDesignMdRegistry,Jr as extractTokensFromBody,Tl as injectAttribution,Il as isDesignMdName,Zw as lintDesignMd,Al as loadBundledDesignMdContent,we as loadDesignMdFile,kl as loadProjectDesignMd,mE as loadProjectDesignMdFromRoots,ys as parseDesignMdTokens,Wr as projectDesignMdPath,hE as projectDesignMdTemplate,yE as readLinkedConsumerRoot,$l as resolveRemoteSource,Hr as scanDesignMdDir,vE as seedDesignMdRegistry,Zr as serializeDesignMdFile,LE as syncDesignMdFromRemote};
208
+ `):""}`}async function LE(e){let t=e.fetchImpl??globalThis.fetch,s=e.defaultLicense??"UNKNOWN",r=[],n=0,i=0,o;try{o=await Il(e.from,t)}catch(a){return{ok:!1,written:0,skipped:0,files:[],error:a instanceof Error?a.message:String(a)}}if(!e.dryRun)$l(e.outDir,{recursive:!0});for(let a of o.fileUrls){let l;try{let y=await t(a,{headers:{"user-agent":"uibot-design-md-sync"}});if(!y.ok){i+=1,r.push({id:a,path:"",sourceUrl:a,status:"skipped",reason:`HTTP ${y.status}`});continue}l=await y.text()}catch(y){return{ok:!1,written:n,skipped:i,files:r,error:`Network failure fetching ${a}: ${y instanceof Error?y.message:String(y)}`}}let c=new TextEncoder().encode(l).byteLength;if(c>en){i+=1,r.push({id:a,path:"",sourceUrl:a,status:"skipped",reason:`exceeds ${en} bytes (${c})`});continue}let d=Dl(l,{sourceUrl:a,license:s}),f;try{f=Pe(d).id}catch(y){i+=1,r.push({id:a,path:"",sourceUrl:a,status:"skipped",reason:y instanceof Error?y.message:"invalid frontmatter"});continue}let u=`${f}.design.md`,p=kE(e.outDir,u);if(e.dryRun){r.push({id:f,path:p,sourceUrl:a,status:"dry-run"}),n+=1;continue}$l(OE(p),{recursive:!0}),NE(p,d,"utf8"),n+=1,r.push({id:f,path:p,sourceUrl:a,status:"written"})}return{ok:!0,written:n,skipped:i,files:r}}function tn(e){let t=["---"];if(t.push(`id: ${pe(e.id)}`),t.push(`title: ${pe(e.title)}`),t.push(`category: ${pe(e.category)}`),e.tags?.length)t.push(`tags: [${e.tags.map((s)=>pe(s)).join(", ")}]`);if(e.origin)t.push(`origin: ${pe(e.origin)}`);if(e.sourceUrl)t.push(`sourceUrl: ${pe(e.sourceUrl)}`);if(e.exemptRules?.length)t.push(`exemptRules: [${e.exemptRules.map((s)=>pe(s)).join(", ")}]`);if(e.layer)t.push(`layer: ${pe(e.layer)}`);return t.push("---"),t.push(""),t.push(e.body?.trimEnd()??""),t.push(""),t.join(`
209
+ `)}function $E(e){let t={};for(let s of e.list())t[s.id]=tn(s);return t}function IE(e){let t=tn(e),s=Pe(t);if(s.id!==e.id)throw Error(`round-trip id mismatch: ${s.id} \u2260 ${e.id}`);if(s.title!==e.title)throw Error("round-trip title mismatch");if(s.category!==e.category)throw Error("round-trip category mismatch");if(e.layer&&s.layer!==e.layer)throw Error(`round-trip layer mismatch: ${s.layer} \u2260 ${e.layer}`)}function pe(e){if(/^[\w.-]+$/.test(e))return e;return JSON.stringify(e)}class sn{options;constructor(e){this.options=e}recordFailure(e){let t=this.options.now?.()??new Date().toISOString();this.options.reflectionStore.append({skillId:this.options.designMdId,trigger:e.trigger,timestamp:t,reflection:e.reflection,...e.context?{context:e.context}:{}})}async proposeRewrite(){let e=this.options.registry.get(this.options.designMdId);if(!e)return null;let t=this.options.reflectionLimit??10,s=this.options.reflectionStore.recent(this.options.designMdId,t),r=DE(s),n=await this.options.generateImprovedBody({designMdId:this.options.designMdId,currentBody:e.body,failureContext:r});return{designMdId:this.options.designMdId,baseVersion:e.layer??"user",proposedBody:n,reflectionCount:s.length,generatedAt:this.options.now?.()??new Date().toISOString()}}applyOverride(e){let t=this.options.registry.get(this.options.designMdId);if(!t)return null;let s={...t,body:e.proposedBody};return this.options.registry.add(s,{layer:"override"}),this.options.registry.get(this.options.designMdId)??null}}function TE(e){return new sn(e)}function DE(e){if(e.length===0)return"(no prior reflections)";return e.map((t,s)=>`${s+1}. [${t.trigger} \xB7 ${t.timestamp}] ${t.reflection}`).join(`
210
+ `)}function LN(e={}){let t=e.dir??`${process.cwd()}/.uibot/design-md`,s=new vs;s.addAll(Wr(t));let r=Zi({manifest:zi({pluginId:"uibot.design-md",version:"0.1.0",displayName:"UIBot Design-MD",description:"Loads `.md` design system style guides from the filesystem and registers them as designMd:source capabilities.",sdkRange:"^0.1.0",engineRange:"^0.1.0",capabilities:s.list().map((n)=>({id:`designMd:source:${n.id}`,type:"designMd:source",description:`Design-md: ${n.title} (${n.category})`})),permissions:[]}),register(n){for(let i of s.list())n.addCapability(eo(i))}});return Object.assign(r,{registry:s,createSelector(){return new Ns(s)}})}export{Zr as DESIGN_MD_CONTENT_DIR,hl as DESIGN_MD_SECTIONS,sn as DesignMdEvolutionAdapter,vs as DesignMdRegistry,Ns as DesignMdSelectorImpl,en as MAX_DESIGN_MD_BYTES,Qr as PROJECT_DESIGN_MD_ID,IE as assertSerializeRoundTrip,yl as canonicalDesignMdSection,tE as checkHtmlAgainstDesign,TE as createDesignMdEvolutionAdapter,LN as createUIBotDesignMdPlugin,gE as defaultProjectDesignRoots,sE as designMdGuideText,Sl as designTokensInstruction,$E as exportDesignMdRegistry,Xr as extractTokensFromBody,Dl as injectAttribution,Tl as isDesignMdName,Zw as lintDesignMd,Ll as loadBundledDesignMdContent,we as loadDesignMdFile,Al as loadProjectDesignMd,mE as loadProjectDesignMdFromRoots,Es as parseDesignMdTokens,zr as projectDesignMdPath,hE as projectDesignMdTemplate,yE as readLinkedConsumerRoot,Il as resolveRemoteSource,Wr as scanDesignMdDir,vE as seedDesignMdRegistry,tn as serializeDesignMdFile,LE as syncDesignMdFromRemote};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uibot/design-md",
3
- "version": "0.18.1",
3
+ "version": "0.20.0",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -28,12 +28,12 @@
28
28
  "access": "public"
29
29
  },
30
30
  "dependencies": {
31
- "@uibot/contracts": "^0.18.1",
32
- "@uibot/plugin-sdk": "^0.18.1",
31
+ "@uibot/contracts": "^0.20.0",
32
+ "@uibot/plugin-sdk": "^0.20.0",
33
33
  "yaml": "2.9.1"
34
34
  },
35
35
  "devDependencies": {
36
- "@uibot/design-md-importer": "^0.18.1"
36
+ "@uibot/design-md-importer": "^0.20.0"
37
37
  },
38
38
  "scripts": {
39
39
  "build": "rm -rf dist && bun build --minify ./src/index.ts --outdir ./dist --format esm --target bun && bun x tsc -p tsconfig.json",