@uniformdev/context 14.2.1-alpha.177 → 14.2.1-alpha.256
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/cli.js +28 -28
- package/dist/cli/cli.mjs +20 -20
- package/package.json +5 -5
- package/dist/chunk-A5FZYSIL.mjs +0 -76
- package/dist/chunk-FJWWKKCL.mjs +0 -307
- package/dist/chunk-YGARAHYJ.mjs +0 -11
- package/dist/types-ef0eef65.d.ts +0 -805
package/dist/cli/cli.mjs
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import{b as $i,d as He,e as rt,f as Wi,g as qe,h as Ye,i as Ge}from"../chunk-5UOAJNMX.mjs";import{a as _e,b as tt,c as Ui,i as w}from"../chunk-AFJ7PNM5.mjs";var ya=tt((Ln,bn)=>{w();var Pd=200,_i="__lodash_hash_undefined__",Zs=1,mr=2,ea=9007199254740991,fr="[object Arguments]",yi="[object Array]",ta="[object Boolean]",na="[object Date]",ra="[object Error]",ia="[object Function]",Fd="[object GeneratorFunction]",ur="[object Map]",oa="[object Number]",gn="[object Object]",Hs="[object Promise]",sa="[object RegExp]",dr="[object Set]",aa="[object String]",Ld="[object Symbol]",wi="[object WeakMap]",la="[object ArrayBuffer]",hr="[object DataView]",Dd="[object Float32Array]",Td="[object Float64Array]",Nd="[object Int8Array]",kd="[object Int16Array]",Rd="[object Int32Array]",Ud="[object Uint8Array]",$d="[object Uint8ClampedArray]",Wd="[object Uint16Array]",Bd="[object Uint32Array]",Hd=/[\\^$.*+?()[\]{}|]/g,qd=/^\[object .+?Constructor\]$/,Yd=/^(?:0|[1-9]\d*)$/,ie={};ie[Dd]=ie[Td]=ie[Nd]=ie[kd]=ie[Rd]=ie[Ud]=ie[$d]=ie[Wd]=ie[Bd]=!0;ie[fr]=ie[yi]=ie[la]=ie[ta]=ie[hr]=ie[na]=ie[ra]=ie[ia]=ie[ur]=ie[oa]=ie[gn]=ie[sa]=ie[dr]=ie[aa]=ie[wi]=!1;var ca=typeof global=="object"&&global&&global.Object===Object&&global,Gd=typeof self=="object"&&self&&self.Object===Object&&self,St=ca||Gd||Function("return this")(),fa=typeof Ln=="object"&&Ln&&!Ln.nodeType&&Ln,qs=fa&&typeof bn=="object"&&bn&&!bn.nodeType&&bn,zd=qs&&qs.exports===fa,Ys=zd&&ca.process,Gs=function(){try{return Ys&&Ys.binding("util")}catch(e){}}(),zs=Gs&&Gs.isTypedArray;function Vd(e,t){for(var n=-1,r=e?e.length:0;++n<r;)if(t(e[n],n,e))return!0;return!1}function Kd(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Qd(e){return function(t){return e(t)}}function Jd(e,t){return e==null?void 0:e[t]}function Ai(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch(n){}return t}function Xd(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}function Zd(e,t){return function(n){return e(t(n))}}function eh(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var th=Array.prototype,nh=Function.prototype,gr=Object.prototype,gi=St["__core-js_shared__"],Vs=function(){var e=/[^.]+$/.exec(gi&&gi.keys&&gi.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),ua=nh.toString,mt=gr.hasOwnProperty,Nn=gr.toString,rh=RegExp("^"+ua.call(mt).replace(Hd,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ks=St.Symbol,Qs=St.Uint8Array,ih=gr.propertyIsEnumerable,oh=th.splice,sh=Zd(Object.keys,Object),xi=yn(St,"DataView"),Dn=yn(St,"Map"),vi=yn(St,"Promise"),Ci=yn(St,"Set"),Oi=yn(St,"WeakMap"),Tn=yn(Object,"create"),ah=on(xi),lh=on(Dn),ch=on(vi),fh=on(Ci),uh=on(Oi),Js=Ks?Ks.prototype:void 0,bi=Js?Js.valueOf:void 0;function nn(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function dh(){this.__data__=Tn?Tn(null):{}}function hh(e){return this.has(e)&&delete this.__data__[e]}function ph(e){var t=this.__data__;if(Tn){var n=t[e];return n===_i?void 0:n}return mt.call(t,e)?t[e]:void 0}function mh(e){var t=this.__data__;return Tn?t[e]!==void 0:mt.call(t,e)}function gh(e,t){var n=this.__data__;return n[e]=Tn&&t===void 0?_i:t,this}nn.prototype.clear=dh;nn.prototype.delete=hh;nn.prototype.get=ph;nn.prototype.has=mh;nn.prototype.set=gh;function gt(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function bh(){this.__data__=[]}function yh(e){var t=this.__data__,n=br(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():oh.call(t,n,1),!0}function wh(e){var t=this.__data__,n=br(t,e);return n<0?void 0:t[n][1]}function Ah(e){return br(this.__data__,e)>-1}function xh(e,t){var n=this.__data__,r=br(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}gt.prototype.clear=bh;gt.prototype.delete=yh;gt.prototype.get=wh;gt.prototype.has=Ah;gt.prototype.set=xh;function rn(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function vh(){this.__data__={hash:new nn,map:new(Dn||gt),string:new nn}}function Ch(e){return yr(this,e).delete(e)}function Oh(e){return yr(this,e).get(e)}function Eh(e){return yr(this,e).has(e)}function _h(e,t){return yr(this,e).set(e,t),this}rn.prototype.clear=vh;rn.prototype.delete=Ch;rn.prototype.get=Oh;rn.prototype.has=Eh;rn.prototype.set=_h;function pr(e){var t=-1,n=e?e.length:0;for(this.__data__=new rn;++t<n;)this.add(e[t])}function Sh(e){return this.__data__.set(e,_i),this}function jh(e){return this.__data__.has(e)}pr.prototype.add=pr.prototype.push=Sh;pr.prototype.has=jh;function _t(e){this.__data__=new gt(e)}function Mh(){this.__data__=new gt}function Ih(e){return this.__data__.delete(e)}function Ph(e){return this.__data__.get(e)}function Fh(e){return this.__data__.has(e)}function Lh(e,t){var n=this.__data__;if(n instanceof gt){var r=n.__data__;if(!Dn||r.length<Pd-1)return r.push([e,t]),this;n=this.__data__=new rn(r)}return n.set(e,t),this}_t.prototype.clear=Mh;_t.prototype.delete=Ih;_t.prototype.get=Ph;_t.prototype.has=Fh;_t.prototype.set=Lh;function Dh(e,t){var n=Ei(e)||Gh(e)?Kd(e.length,String):[],r=n.length,i=!!r;for(var s in e)(t||mt.call(e,s))&&!(i&&(s=="length"||Bh(s,r)))&&n.push(s);return n}function br(e,t){for(var n=e.length;n--;)if(pa(e[n][0],t))return n;return-1}function Th(e){return Nn.call(e)}function da(e,t,n,r,i){return e===t?!0:e==null||t==null||!Si(e)&&!ji(t)?e!==e&&t!==t:Nh(e,t,da,n,r,i)}function Nh(e,t,n,r,i,s){var o=Ei(e),a=Ei(t),l=yi,f=yi;o||(l=Et(e),l=l==fr?gn:l),a||(f=Et(t),f=f==fr?gn:f);var u=l==gn&&!Ai(e),c=f==gn&&!Ai(t),d=l==f;if(d&&!u)return s||(s=new _t),o||Kh(e)?ha(e,t,n,r,i,s):$h(e,t,l,n,r,i,s);if(!(i&mr)){var p=u&&mt.call(e,"__wrapped__"),b=c&&mt.call(t,"__wrapped__");if(p||b){var g=p?e.value():e,m=b?t.value():t;return s||(s=new _t),n(g,m,r,i,s)}}return d?(s||(s=new _t),Wh(e,t,n,r,i,s)):!1}function kh(e){if(!Si(e)||qh(e))return!1;var t=ga(e)||Ai(e)?rh:qd;return t.test(on(e))}function Rh(e){return ji(e)&&ba(e.length)&&!!ie[Nn.call(e)]}function Uh(e){if(!Yh(e))return sh(e);var t=[];for(var n in Object(e))mt.call(e,n)&&n!="constructor"&&t.push(n);return t}function ha(e,t,n,r,i,s){var o=i&mr,a=e.length,l=t.length;if(a!=l&&!(o&&l>a))return!1;var f=s.get(e);if(f&&s.get(t))return f==t;var u=-1,c=!0,d=i&Zs?new pr:void 0;for(s.set(e,t),s.set(t,e);++u<a;){var p=e[u],b=t[u];if(r)var g=o?r(b,p,u,t,e,s):r(p,b,u,e,t,s);if(g!==void 0){if(g)continue;c=!1;break}if(d){if(!Vd(t,function(m,C){if(!d.has(C)&&(p===m||n(p,m,r,i,s)))return d.add(C)})){c=!1;break}}else if(!(p===b||n(p,b,r,i,s))){c=!1;break}}return s.delete(e),s.delete(t),c}function $h(e,t,n,r,i,s,o){switch(n){case hr:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case la:return!(e.byteLength!=t.byteLength||!r(new Qs(e),new Qs(t)));case ta:case na:case oa:return pa(+e,+t);case ra:return e.name==t.name&&e.message==t.message;case sa:case aa:return e==t+"";case ur:var a=Xd;case dr:var l=s&mr;if(a||(a=eh),e.size!=t.size&&!l)return!1;var f=o.get(e);if(f)return f==t;s|=Zs,o.set(e,t);var u=ha(a(e),a(t),r,i,s,o);return o.delete(e),u;case Ld:if(bi)return bi.call(e)==bi.call(t)}return!1}function Wh(e,t,n,r,i,s){var o=i&mr,a=Xs(e),l=a.length,f=Xs(t),u=f.length;if(l!=u&&!o)return!1;for(var c=l;c--;){var d=a[c];if(!(o?d in t:mt.call(t,d)))return!1}var p=s.get(e);if(p&&s.get(t))return p==t;var b=!0;s.set(e,t),s.set(t,e);for(var g=o;++c<l;){d=a[c];var m=e[d],C=t[d];if(r)var _=o?r(C,m,d,t,e,s):r(m,C,d,e,t,s);if(!(_===void 0?m===C||n(m,C,r,i,s):_)){b=!1;break}g||(g=d=="constructor")}if(b&&!g){var W=e.constructor,V=t.constructor;W!=V&&"constructor"in e&&"constructor"in t&&!(typeof W=="function"&&W instanceof W&&typeof V=="function"&&V instanceof V)&&(b=!1)}return s.delete(e),s.delete(t),b}function yr(e,t){var n=e.__data__;return Hh(t)?n[typeof t=="string"?"string":"hash"]:n.map}function yn(e,t){var n=Jd(e,t);return kh(n)?n:void 0}var Et=Th;(xi&&Et(new xi(new ArrayBuffer(1)))!=hr||Dn&&Et(new Dn)!=ur||vi&&Et(vi.resolve())!=Hs||Ci&&Et(new Ci)!=dr||Oi&&Et(new Oi)!=wi)&&(Et=function(e){var t=Nn.call(e),n=t==gn?e.constructor:void 0,r=n?on(n):void 0;if(r)switch(r){case ah:return hr;case lh:return ur;case ch:return Hs;case fh:return dr;case uh:return wi}return t});function Bh(e,t){return t=t==null?ea:t,!!t&&(typeof e=="number"||Yd.test(e))&&e>-1&&e%1==0&&e<t}function Hh(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function qh(e){return!!Vs&&Vs in e}function Yh(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||gr;return e===n}function on(e){if(e!=null){try{return ua.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function pa(e,t){return e===t||e!==e&&t!==t}function Gh(e){return zh(e)&&mt.call(e,"callee")&&(!ih.call(e,"callee")||Nn.call(e)==fr)}var Ei=Array.isArray;function ma(e){return e!=null&&ba(e.length)&&!ga(e)}function zh(e){return ji(e)&&ma(e)}function Vh(e,t,n){n=typeof n=="function"?n:void 0;var r=n?n(e,t):void 0;return r===void 0?da(e,t,n):!!r}function ga(e){var t=Si(e)?Nn.call(e):"";return t==ia||t==Fd}function ba(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=ea}function Si(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function ji(e){return!!e&&typeof e=="object"}var Kh=zs?Qd(zs):Rh;function Xs(e){return ma(e)?Dh(e):Uh(e)}bn.exports=Vh});var Ua=tt((Nb,Ra)=>{"use strict";w();Ra.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var Mi=tt((kb,Wa)=>{w();var kn=Ua(),$a={};for(let e of Object.keys(kn))$a[kn[e]]=e;var D={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};Wa.exports=D;for(let e of Object.keys(D)){if(!("channels"in D[e]))throw new Error("missing channels property: "+e);if(!("labels"in D[e]))throw new Error("missing channel labels property: "+e);if(D[e].labels.length!==D[e].channels)throw new Error("channel and label counts mismatch: "+e);let{channels:t,labels:n}=D[e];delete D[e].channels,delete D[e].labels,Object.defineProperty(D[e],"channels",{value:t}),Object.defineProperty(D[e],"labels",{value:n})}D.rgb.hsl=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),s=Math.max(t,n,r),o=s-i,a,l;s===i?a=0:t===s?a=(n-r)/o:n===s?a=2+(r-t)/o:r===s&&(a=4+(t-n)/o),a=Math.min(a*60,360),a<0&&(a+=360);let f=(i+s)/2;return s===i?l=0:f<=.5?l=o/(s+i):l=o/(2-s-i),[a,l*100,f*100]};D.rgb.hsv=function(e){let t,n,r,i,s,o=e[0]/255,a=e[1]/255,l=e[2]/255,f=Math.max(o,a,l),u=f-Math.min(o,a,l),c=function(d){return(f-d)/6/u+1/2};return u===0?(i=0,s=0):(s=u/f,t=c(o),n=c(a),r=c(l),o===f?i=r-n:a===f?i=1/3+t-r:l===f&&(i=2/3+n-t),i<0?i+=1:i>1&&(i-=1)),[i*360,s*100,f*100]};D.rgb.hwb=function(e){let t=e[0],n=e[1],r=e[2],i=D.rgb.hsl(e)[0],s=1/255*Math.min(t,Math.min(n,r));return r=1-1/255*Math.max(t,Math.max(n,r)),[i,s*100,r*100]};D.rgb.cmyk=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(1-t,1-n,1-r),s=(1-t-i)/(1-i)||0,o=(1-n-i)/(1-i)||0,a=(1-r-i)/(1-i)||0;return[s*100,o*100,a*100,i*100]};function bp(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}D.rgb.keyword=function(e){let t=$a[e];if(t)return t;let n=1/0,r;for(let i of Object.keys(kn)){let s=kn[i],o=bp(e,s);o<n&&(n=o,r=i)}return r};D.keyword.rgb=function(e){return kn[e]};D.rgb.xyz=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;let i=t*.4124+n*.3576+r*.1805,s=t*.2126+n*.7152+r*.0722,o=t*.0193+n*.1192+r*.9505;return[i*100,s*100,o*100]};D.rgb.lab=function(e){let t=D.rgb.xyz(e),n=t[0],r=t[1],i=t[2];n/=95.047,r/=100,i/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;let s=116*r-16,o=500*(n-r),a=200*(r-i);return[s,o,a]};D.hsl.rgb=function(e){let t=e[0]/360,n=e[1]/100,r=e[2]/100,i,s,o;if(n===0)return o=r*255,[o,o,o];r<.5?i=r*(1+n):i=r+n-r*n;let a=2*r-i,l=[0,0,0];for(let f=0;f<3;f++)s=t+1/3*-(f-1),s<0&&s++,s>1&&s--,6*s<1?o=a+(i-a)*6*s:2*s<1?o=i:3*s<2?o=a+(i-a)*(2/3-s)*6:o=a,l[f]=o*255;return l};D.hsl.hsv=function(e){let t=e[0],n=e[1]/100,r=e[2]/100,i=n,s=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,i*=s<=1?s:2-s;let o=(r+n)/2,a=r===0?2*i/(s+i):2*n/(r+n);return[t,a*100,o*100]};D.hsv.rgb=function(e){let t=e[0]/60,n=e[1]/100,r=e[2]/100,i=Math.floor(t)%6,s=t-Math.floor(t),o=255*r*(1-n),a=255*r*(1-n*s),l=255*r*(1-n*(1-s));switch(r*=255,i){case 0:return[r,l,o];case 1:return[a,r,o];case 2:return[o,r,l];case 3:return[o,a,r];case 4:return[l,o,r];case 5:return[r,o,a]}};D.hsv.hsl=function(e){let t=e[0],n=e[1]/100,r=e[2]/100,i=Math.max(r,.01),s,o;o=(2-n)*r;let a=(2-n)*i;return s=n*i,s/=a<=1?a:2-a,s=s||0,o/=2,[t,s*100,o*100]};D.hwb.rgb=function(e){let t=e[0]/360,n=e[1]/100,r=e[2]/100,i=n+r,s;i>1&&(n/=i,r/=i);let o=Math.floor(6*t),a=1-r;s=6*t-o,(o&1)!==0&&(s=1-s);let l=n+s*(a-n),f,u,c;switch(o){default:case 6:case 0:f=a,u=l,c=n;break;case 1:f=l,u=a,c=n;break;case 2:f=n,u=a,c=l;break;case 3:f=n,u=l,c=a;break;case 4:f=l,u=n,c=a;break;case 5:f=a,u=n,c=l;break}return[f*255,u*255,c*255]};D.cmyk.rgb=function(e){let t=e[0]/100,n=e[1]/100,r=e[2]/100,i=e[3]/100,s=1-Math.min(1,t*(1-i)+i),o=1-Math.min(1,n*(1-i)+i),a=1-Math.min(1,r*(1-i)+i);return[s*255,o*255,a*255]};D.xyz.rgb=function(e){let t=e[0]/100,n=e[1]/100,r=e[2]/100,i,s,o;return i=t*3.2406+n*-1.5372+r*-.4986,s=t*-.9689+n*1.8758+r*.0415,o=t*.0557+n*-.204+r*1.057,i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,i=Math.min(Math.max(0,i),1),s=Math.min(Math.max(0,s),1),o=Math.min(Math.max(0,o),1),[i*255,s*255,o*255]};D.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;let i=116*n-16,s=500*(t-n),o=200*(n-r);return[i,s,o]};D.lab.xyz=function(e){let t=e[0],n=e[1],r=e[2],i,s,o;s=(t+16)/116,i=n/500+s,o=s-r/200;let a=s**3,l=i**3,f=o**3;return s=a>.008856?a:(s-16/116)/7.787,i=l>.008856?l:(i-16/116)/7.787,o=f>.008856?f:(o-16/116)/7.787,i*=95.047,s*=100,o*=108.883,[i,s,o]};D.lab.lch=function(e){let t=e[0],n=e[1],r=e[2],i;i=Math.atan2(r,n)*360/2/Math.PI,i<0&&(i+=360);let o=Math.sqrt(n*n+r*r);return[t,o,i]};D.lch.lab=function(e){let t=e[0],n=e[1],i=e[2]/360*2*Math.PI,s=n*Math.cos(i),o=n*Math.sin(i);return[t,s,o]};D.rgb.ansi16=function(e,t=null){let[n,r,i]=e,s=t===null?D.rgb.hsv(e)[2]:t;if(s=Math.round(s/50),s===0)return 30;let o=30+(Math.round(i/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return s===2&&(o+=60),o};D.hsv.ansi16=function(e){return D.rgb.ansi16(D.hsv.rgb(e),e[2])};D.rgb.ansi256=function(e){let t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)};D.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];let n=(~~(e>50)+1)*.5,r=(t&1)*n*255,i=(t>>1&1)*n*255,s=(t>>2&1)*n*255;return[r,i,s]};D.ansi256.rgb=function(e){if(e>=232){let s=(e-232)*10+8;return[s,s,s]}e-=16;let t,n=Math.floor(e/36)/5*255,r=Math.floor((t=e%36)/6)/5*255,i=t%6/5*255;return[n,r,i]};D.rgb.hex=function(e){let n=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(n.length)+n};D.hex.rgb=function(e){let t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];t[0].length===3&&(n=n.split("").map(a=>a+a).join(""));let r=parseInt(n,16),i=r>>16&255,s=r>>8&255,o=r&255;return[i,s,o]};D.rgb.hcg=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.max(Math.max(t,n),r),s=Math.min(Math.min(t,n),r),o=i-s,a,l;return o<1?a=s/(1-o):a=0,o<=0?l=0:i===t?l=(n-r)/o%6:i===n?l=2+(r-t)/o:l=4+(t-n)/o,l/=6,l%=1,[l*360,o*100,a*100]};D.hsl.hcg=function(e){let t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n),i=0;return r<1&&(i=(n-.5*r)/(1-r)),[e[0],r*100,i*100]};D.hsv.hcg=function(e){let t=e[1]/100,n=e[2]/100,r=t*n,i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],r*100,i*100]};D.hcg.rgb=function(e){let t=e[0]/360,n=e[1]/100,r=e[2]/100;if(n===0)return[r*255,r*255,r*255];let i=[0,0,0],s=t%1*6,o=s%1,a=1-o,l=0;switch(Math.floor(s)){case 0:i[0]=1,i[1]=o,i[2]=0;break;case 1:i[0]=a,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=o;break;case 3:i[0]=0,i[1]=a,i[2]=1;break;case 4:i[0]=o,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=a}return l=(1-n)*r,[(n*i[0]+l)*255,(n*i[1]+l)*255,(n*i[2]+l)*255]};D.hcg.hsv=function(e){let t=e[1]/100,n=e[2]/100,r=t+n*(1-t),i=0;return r>0&&(i=t/r),[e[0],i*100,r*100]};D.hcg.hsl=function(e){let t=e[1]/100,r=e[2]/100*(1-t)+.5*t,i=0;return r>0&&r<.5?i=t/(2*r):r>=.5&&r<1&&(i=t/(2*(1-r))),[e[0],i*100,r*100]};D.hcg.hwb=function(e){let t=e[1]/100,n=e[2]/100,r=t+n*(1-t);return[e[0],(r-t)*100,(1-r)*100]};D.hwb.hcg=function(e){let t=e[1]/100,n=e[2]/100,r=1-n,i=r-t,s=0;return i<1&&(s=(r-i)/(1-i)),[e[0],i*100,s*100]};D.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};D.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};D.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};D.gray.hsl=function(e){return[0,0,e[0]]};D.gray.hsv=D.gray.hsl;D.gray.hwb=function(e){return[0,100,e[0]]};D.gray.cmyk=function(e){return[0,0,0,e[0]]};D.gray.lab=function(e){return[e[0],0,0]};D.gray.hex=function(e){let t=Math.round(e[0]/100*255)&255,r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r};D.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}});var Ha=tt((Rb,Ba)=>{w();var vr=Mi();function yp(){let e={},t=Object.keys(vr);for(let n=t.length,r=0;r<n;r++)e[t[r]]={distance:-1,parent:null};return e}function wp(e){let t=yp(),n=[e];for(t[e].distance=0;n.length;){let r=n.pop(),i=Object.keys(vr[r]);for(let s=i.length,o=0;o<s;o++){let a=i[o],l=t[a];l.distance===-1&&(l.distance=t[r].distance+1,l.parent=r,n.unshift(a))}}return t}function Ap(e,t){return function(n){return t(e(n))}}function xp(e,t){let n=[t[e].parent,e],r=vr[t[e].parent][e],i=t[e].parent;for(;t[i].parent;)n.unshift(t[i].parent),r=Ap(vr[t[i].parent][i],r),i=t[i].parent;return r.conversion=n,r}Ba.exports=function(e){let t=wp(e),n={},r=Object.keys(t);for(let i=r.length,s=0;s<i;s++){let o=r[s];t[o].parent!==null&&(n[o]=xp(o,t))}return n}});var Ya=tt((Ub,qa)=>{w();var Ii=Mi(),vp=Ha(),An={},Cp=Object.keys(Ii);function Op(e){let t=function(...n){let r=n[0];return r==null?r:(r.length>1&&(n=r),e(n))};return"conversion"in e&&(t.conversion=e.conversion),t}function Ep(e){let t=function(...n){let r=n[0];if(r==null)return r;r.length>1&&(n=r);let i=e(n);if(typeof i=="object")for(let s=i.length,o=0;o<s;o++)i[o]=Math.round(i[o]);return i};return"conversion"in e&&(t.conversion=e.conversion),t}Cp.forEach(e=>{An[e]={},Object.defineProperty(An[e],"channels",{value:Ii[e].channels}),Object.defineProperty(An[e],"labels",{value:Ii[e].labels});let t=vp(e);Object.keys(t).forEach(r=>{let i=t[r];An[e][r]=Ep(i),An[e][r].raw=Op(i)})});qa.exports=An});var Ja=tt(($b,Qa)=>{"use strict";w();var Ga=(e,t)=>(...n)=>`\x1B[${e(...n)+t}m`,za=(e,t)=>(...n)=>{let r=e(...n);return`\x1B[${38+t};5;${r}m`},Va=(e,t)=>(...n)=>{let r=e(...n);return`\x1B[${38+t};2;${r[0]};${r[1]};${r[2]}m`},Cr=e=>e,Ka=(e,t,n)=>[e,t,n],xn=(e,t,n)=>{Object.defineProperty(e,t,{get:()=>{let r=n();return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0}),r},enumerable:!0,configurable:!0})},Pi,vn=(e,t,n,r)=>{Pi===void 0&&(Pi=Ya());let i=r?10:0,s={};for(let[o,a]of Object.entries(Pi)){let l=o==="ansi16"?"ansi":o;o===t?s[l]=e(n,i):typeof a=="object"&&(s[l]=e(a[t],i))}return s};function _p(){let e=new Map,t={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};t.color.gray=t.color.blackBright,t.bgColor.bgGray=t.bgColor.bgBlackBright,t.color.grey=t.color.blackBright,t.bgColor.bgGrey=t.bgColor.bgBlackBright;for(let[n,r]of Object.entries(t)){for(let[i,s]of Object.entries(r))t[i]={open:`\x1B[${s[0]}m`,close:`\x1B[${s[1]}m`},r[i]=t[i],e.set(s[0],s[1]);Object.defineProperty(t,n,{value:r,enumerable:!1})}return Object.defineProperty(t,"codes",{value:e,enumerable:!1}),t.color.close="\x1B[39m",t.bgColor.close="\x1B[49m",xn(t.color,"ansi",()=>vn(Ga,"ansi16",Cr,!1)),xn(t.color,"ansi256",()=>vn(za,"ansi256",Cr,!1)),xn(t.color,"ansi16m",()=>vn(Va,"rgb",Ka,!1)),xn(t.bgColor,"ansi",()=>vn(Ga,"ansi16",Cr,!0)),xn(t.bgColor,"ansi256",()=>vn(za,"ansi256",Cr,!0)),xn(t.bgColor,"ansi16m",()=>vn(Va,"rgb",Ka,!0)),t}Object.defineProperty(Qa,"exports",{enumerable:!0,get:_p})});var Za=tt((Wb,Xa)=>{"use strict";w();Xa.exports=(e,t=process.argv)=>{let n=e.startsWith("-")?"":e.length===1?"-":"--",r=t.indexOf(n+e),i=t.indexOf("--");return r!==-1&&(i===-1||r<i)}});var nl=tt((Bb,tl)=>{"use strict";w();var Sp=_e("os"),el=_e("tty"),Xe=Za(),{env:Pe}=process,Ft;Xe("no-color")||Xe("no-colors")||Xe("color=false")||Xe("color=never")?Ft=0:(Xe("color")||Xe("colors")||Xe("color=true")||Xe("color=always"))&&(Ft=1);"FORCE_COLOR"in Pe&&(Pe.FORCE_COLOR==="true"?Ft=1:Pe.FORCE_COLOR==="false"?Ft=0:Ft=Pe.FORCE_COLOR.length===0?1:Math.min(parseInt(Pe.FORCE_COLOR,10),3));function Fi(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function Li(e,t){if(Ft===0)return 0;if(Xe("color=16m")||Xe("color=full")||Xe("color=truecolor"))return 3;if(Xe("color=256"))return 2;if(e&&!t&&Ft===void 0)return 0;let n=Ft||0;if(Pe.TERM==="dumb")return n;if(process.platform==="win32"){let r=Sp.release().split(".");return Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in Pe)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(r=>r in Pe)||Pe.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in Pe)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Pe.TEAMCITY_VERSION)?1:0;if(Pe.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Pe){let r=parseInt((Pe.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Pe.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Pe.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Pe.TERM)||"COLORTERM"in Pe?1:n}function jp(e){let t=Li(e,e&&e.isTTY);return Fi(t)}tl.exports={supportsColor:jp,stdout:Fi(Li(!0,el.isatty(1))),stderr:Fi(Li(!0,el.isatty(2)))}});var il=tt((Hb,rl)=>{"use strict";w();var Mp=(e,t,n)=>{let r=e.indexOf(t);if(r===-1)return e;let i=t.length,s=0,o="";do o+=e.substr(s,r-s)+t+n,s=r+i,r=e.indexOf(t,s);while(r!==-1);return o+=e.substr(s),o},Ip=(e,t,n,r)=>{let i=0,s="";do{let o=e[r-1]==="\r";s+=e.substr(i,(o?r-1:r)-i)+t+(o?`\r
|
1
|
+
import{b as $i,d as He,e as rt,f as Wi,g as qe,h as Ye,i as Ge}from"../chunk-5UOAJNMX.mjs";import{a as _e,b as tt,c as Ui,i as w}from"../chunk-AFJ7PNM5.mjs";var ya=tt((Ln,bn)=>{w();var Pd=200,_i="__lodash_hash_undefined__",Zs=1,mr=2,ea=9007199254740991,fr="[object Arguments]",yi="[object Array]",ta="[object Boolean]",na="[object Date]",ra="[object Error]",ia="[object Function]",Fd="[object GeneratorFunction]",ur="[object Map]",oa="[object Number]",gn="[object Object]",Hs="[object Promise]",sa="[object RegExp]",dr="[object Set]",aa="[object String]",Ld="[object Symbol]",wi="[object WeakMap]",la="[object ArrayBuffer]",hr="[object DataView]",Dd="[object Float32Array]",Td="[object Float64Array]",Nd="[object Int8Array]",kd="[object Int16Array]",Rd="[object Int32Array]",Ud="[object Uint8Array]",$d="[object Uint8ClampedArray]",Wd="[object Uint16Array]",Bd="[object Uint32Array]",Hd=/[\\^$.*+?()[\]{}|]/g,qd=/^\[object .+?Constructor\]$/,Yd=/^(?:0|[1-9]\d*)$/,ie={};ie[Dd]=ie[Td]=ie[Nd]=ie[kd]=ie[Rd]=ie[Ud]=ie[$d]=ie[Wd]=ie[Bd]=!0;ie[fr]=ie[yi]=ie[la]=ie[ta]=ie[hr]=ie[na]=ie[ra]=ie[ia]=ie[ur]=ie[oa]=ie[gn]=ie[sa]=ie[dr]=ie[aa]=ie[wi]=!1;var ca=typeof global=="object"&&global&&global.Object===Object&&global,Gd=typeof self=="object"&&self&&self.Object===Object&&self,St=ca||Gd||Function("return this")(),fa=typeof Ln=="object"&&Ln&&!Ln.nodeType&&Ln,qs=fa&&typeof bn=="object"&&bn&&!bn.nodeType&&bn,zd=qs&&qs.exports===fa,Ys=zd&&ca.process,Gs=function(){try{return Ys&&Ys.binding("util")}catch(e){}}(),zs=Gs&&Gs.isTypedArray;function Vd(e,t){for(var n=-1,r=e?e.length:0;++n<r;)if(t(e[n],n,e))return!0;return!1}function Kd(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Qd(e){return function(t){return e(t)}}function Jd(e,t){return e==null?void 0:e[t]}function Ai(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch(n){}return t}function Xd(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}function Zd(e,t){return function(n){return e(t(n))}}function eh(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var th=Array.prototype,nh=Function.prototype,gr=Object.prototype,gi=St["__core-js_shared__"],Vs=function(){var e=/[^.]+$/.exec(gi&&gi.keys&&gi.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),ua=nh.toString,mt=gr.hasOwnProperty,Nn=gr.toString,rh=RegExp("^"+ua.call(mt).replace(Hd,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ks=St.Symbol,Qs=St.Uint8Array,ih=gr.propertyIsEnumerable,oh=th.splice,sh=Zd(Object.keys,Object),xi=yn(St,"DataView"),Dn=yn(St,"Map"),vi=yn(St,"Promise"),Ci=yn(St,"Set"),Oi=yn(St,"WeakMap"),Tn=yn(Object,"create"),ah=on(xi),lh=on(Dn),ch=on(vi),fh=on(Ci),uh=on(Oi),Js=Ks?Ks.prototype:void 0,bi=Js?Js.valueOf:void 0;function nn(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function dh(){this.__data__=Tn?Tn(null):{}}function hh(e){return this.has(e)&&delete this.__data__[e]}function ph(e){var t=this.__data__;if(Tn){var n=t[e];return n===_i?void 0:n}return mt.call(t,e)?t[e]:void 0}function mh(e){var t=this.__data__;return Tn?t[e]!==void 0:mt.call(t,e)}function gh(e,t){var n=this.__data__;return n[e]=Tn&&t===void 0?_i:t,this}nn.prototype.clear=dh;nn.prototype.delete=hh;nn.prototype.get=ph;nn.prototype.has=mh;nn.prototype.set=gh;function gt(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function bh(){this.__data__=[]}function yh(e){var t=this.__data__,n=br(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():oh.call(t,n,1),!0}function wh(e){var t=this.__data__,n=br(t,e);return n<0?void 0:t[n][1]}function Ah(e){return br(this.__data__,e)>-1}function xh(e,t){var n=this.__data__,r=br(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}gt.prototype.clear=bh;gt.prototype.delete=yh;gt.prototype.get=wh;gt.prototype.has=Ah;gt.prototype.set=xh;function rn(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function vh(){this.__data__={hash:new nn,map:new(Dn||gt),string:new nn}}function Ch(e){return yr(this,e).delete(e)}function Oh(e){return yr(this,e).get(e)}function Eh(e){return yr(this,e).has(e)}function _h(e,t){return yr(this,e).set(e,t),this}rn.prototype.clear=vh;rn.prototype.delete=Ch;rn.prototype.get=Oh;rn.prototype.has=Eh;rn.prototype.set=_h;function pr(e){var t=-1,n=e?e.length:0;for(this.__data__=new rn;++t<n;)this.add(e[t])}function Sh(e){return this.__data__.set(e,_i),this}function jh(e){return this.__data__.has(e)}pr.prototype.add=pr.prototype.push=Sh;pr.prototype.has=jh;function _t(e){this.__data__=new gt(e)}function Mh(){this.__data__=new gt}function Ih(e){return this.__data__.delete(e)}function Ph(e){return this.__data__.get(e)}function Fh(e){return this.__data__.has(e)}function Lh(e,t){var n=this.__data__;if(n instanceof gt){var r=n.__data__;if(!Dn||r.length<Pd-1)return r.push([e,t]),this;n=this.__data__=new rn(r)}return n.set(e,t),this}_t.prototype.clear=Mh;_t.prototype.delete=Ih;_t.prototype.get=Ph;_t.prototype.has=Fh;_t.prototype.set=Lh;function Dh(e,t){var n=Ei(e)||Gh(e)?Kd(e.length,String):[],r=n.length,i=!!r;for(var s in e)(t||mt.call(e,s))&&!(i&&(s=="length"||Bh(s,r)))&&n.push(s);return n}function br(e,t){for(var n=e.length;n--;)if(pa(e[n][0],t))return n;return-1}function Th(e){return Nn.call(e)}function da(e,t,n,r,i){return e===t?!0:e==null||t==null||!Si(e)&&!ji(t)?e!==e&&t!==t:Nh(e,t,da,n,r,i)}function Nh(e,t,n,r,i,s){var o=Ei(e),a=Ei(t),l=yi,f=yi;o||(l=Et(e),l=l==fr?gn:l),a||(f=Et(t),f=f==fr?gn:f);var u=l==gn&&!Ai(e),c=f==gn&&!Ai(t),d=l==f;if(d&&!u)return s||(s=new _t),o||Kh(e)?ha(e,t,n,r,i,s):$h(e,t,l,n,r,i,s);if(!(i&mr)){var p=u&&mt.call(e,"__wrapped__"),b=c&&mt.call(t,"__wrapped__");if(p||b){var g=p?e.value():e,m=b?t.value():t;return s||(s=new _t),n(g,m,r,i,s)}}return d?(s||(s=new _t),Wh(e,t,n,r,i,s)):!1}function kh(e){if(!Si(e)||qh(e))return!1;var t=ga(e)||Ai(e)?rh:qd;return t.test(on(e))}function Rh(e){return ji(e)&&ba(e.length)&&!!ie[Nn.call(e)]}function Uh(e){if(!Yh(e))return sh(e);var t=[];for(var n in Object(e))mt.call(e,n)&&n!="constructor"&&t.push(n);return t}function ha(e,t,n,r,i,s){var o=i&mr,a=e.length,l=t.length;if(a!=l&&!(o&&l>a))return!1;var f=s.get(e);if(f&&s.get(t))return f==t;var u=-1,c=!0,d=i&Zs?new pr:void 0;for(s.set(e,t),s.set(t,e);++u<a;){var p=e[u],b=t[u];if(r)var g=o?r(b,p,u,t,e,s):r(p,b,u,e,t,s);if(g!==void 0){if(g)continue;c=!1;break}if(d){if(!Vd(t,function(m,C){if(!d.has(C)&&(p===m||n(p,m,r,i,s)))return d.add(C)})){c=!1;break}}else if(!(p===b||n(p,b,r,i,s))){c=!1;break}}return s.delete(e),s.delete(t),c}function $h(e,t,n,r,i,s,o){switch(n){case hr:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case la:return!(e.byteLength!=t.byteLength||!r(new Qs(e),new Qs(t)));case ta:case na:case oa:return pa(+e,+t);case ra:return e.name==t.name&&e.message==t.message;case sa:case aa:return e==t+"";case ur:var a=Xd;case dr:var l=s&mr;if(a||(a=eh),e.size!=t.size&&!l)return!1;var f=o.get(e);if(f)return f==t;s|=Zs,o.set(e,t);var u=ha(a(e),a(t),r,i,s,o);return o.delete(e),u;case Ld:if(bi)return bi.call(e)==bi.call(t)}return!1}function Wh(e,t,n,r,i,s){var o=i&mr,a=Xs(e),l=a.length,f=Xs(t),u=f.length;if(l!=u&&!o)return!1;for(var c=l;c--;){var d=a[c];if(!(o?d in t:mt.call(t,d)))return!1}var p=s.get(e);if(p&&s.get(t))return p==t;var b=!0;s.set(e,t),s.set(t,e);for(var g=o;++c<l;){d=a[c];var m=e[d],C=t[d];if(r)var _=o?r(C,m,d,t,e,s):r(m,C,d,e,t,s);if(!(_===void 0?m===C||n(m,C,r,i,s):_)){b=!1;break}g||(g=d=="constructor")}if(b&&!g){var B=e.constructor,q=t.constructor;B!=q&&"constructor"in e&&"constructor"in t&&!(typeof B=="function"&&B instanceof B&&typeof q=="function"&&q instanceof q)&&(b=!1)}return s.delete(e),s.delete(t),b}function yr(e,t){var n=e.__data__;return Hh(t)?n[typeof t=="string"?"string":"hash"]:n.map}function yn(e,t){var n=Jd(e,t);return kh(n)?n:void 0}var Et=Th;(xi&&Et(new xi(new ArrayBuffer(1)))!=hr||Dn&&Et(new Dn)!=ur||vi&&Et(vi.resolve())!=Hs||Ci&&Et(new Ci)!=dr||Oi&&Et(new Oi)!=wi)&&(Et=function(e){var t=Nn.call(e),n=t==gn?e.constructor:void 0,r=n?on(n):void 0;if(r)switch(r){case ah:return hr;case lh:return ur;case ch:return Hs;case fh:return dr;case uh:return wi}return t});function Bh(e,t){return t=t==null?ea:t,!!t&&(typeof e=="number"||Yd.test(e))&&e>-1&&e%1==0&&e<t}function Hh(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function qh(e){return!!Vs&&Vs in e}function Yh(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||gr;return e===n}function on(e){if(e!=null){try{return ua.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function pa(e,t){return e===t||e!==e&&t!==t}function Gh(e){return zh(e)&&mt.call(e,"callee")&&(!ih.call(e,"callee")||Nn.call(e)==fr)}var Ei=Array.isArray;function ma(e){return e!=null&&ba(e.length)&&!ga(e)}function zh(e){return ji(e)&&ma(e)}function Vh(e,t,n){n=typeof n=="function"?n:void 0;var r=n?n(e,t):void 0;return r===void 0?da(e,t,n):!!r}function ga(e){var t=Si(e)?Nn.call(e):"";return t==ia||t==Fd}function ba(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=ea}function Si(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function ji(e){return!!e&&typeof e=="object"}var Kh=zs?Qd(zs):Rh;function Xs(e){return ma(e)?Dh(e):Uh(e)}bn.exports=Vh});var Ua=tt((Nb,Ra)=>{"use strict";w();Ra.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var Mi=tt((kb,Wa)=>{w();var kn=Ua(),$a={};for(let e of Object.keys(kn))$a[kn[e]]=e;var T={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};Wa.exports=T;for(let e of Object.keys(T)){if(!("channels"in T[e]))throw new Error("missing channels property: "+e);if(!("labels"in T[e]))throw new Error("missing channel labels property: "+e);if(T[e].labels.length!==T[e].channels)throw new Error("channel and label counts mismatch: "+e);let{channels:t,labels:n}=T[e];delete T[e].channels,delete T[e].labels,Object.defineProperty(T[e],"channels",{value:t}),Object.defineProperty(T[e],"labels",{value:n})}T.rgb.hsl=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),s=Math.max(t,n,r),o=s-i,a,l;s===i?a=0:t===s?a=(n-r)/o:n===s?a=2+(r-t)/o:r===s&&(a=4+(t-n)/o),a=Math.min(a*60,360),a<0&&(a+=360);let f=(i+s)/2;return s===i?l=0:f<=.5?l=o/(s+i):l=o/(2-s-i),[a,l*100,f*100]};T.rgb.hsv=function(e){let t,n,r,i,s,o=e[0]/255,a=e[1]/255,l=e[2]/255,f=Math.max(o,a,l),u=f-Math.min(o,a,l),c=function(d){return(f-d)/6/u+1/2};return u===0?(i=0,s=0):(s=u/f,t=c(o),n=c(a),r=c(l),o===f?i=r-n:a===f?i=1/3+t-r:l===f&&(i=2/3+n-t),i<0?i+=1:i>1&&(i-=1)),[i*360,s*100,f*100]};T.rgb.hwb=function(e){let t=e[0],n=e[1],r=e[2],i=T.rgb.hsl(e)[0],s=1/255*Math.min(t,Math.min(n,r));return r=1-1/255*Math.max(t,Math.max(n,r)),[i,s*100,r*100]};T.rgb.cmyk=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(1-t,1-n,1-r),s=(1-t-i)/(1-i)||0,o=(1-n-i)/(1-i)||0,a=(1-r-i)/(1-i)||0;return[s*100,o*100,a*100,i*100]};function bp(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}T.rgb.keyword=function(e){let t=$a[e];if(t)return t;let n=1/0,r;for(let i of Object.keys(kn)){let s=kn[i],o=bp(e,s);o<n&&(n=o,r=i)}return r};T.keyword.rgb=function(e){return kn[e]};T.rgb.xyz=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;let i=t*.4124+n*.3576+r*.1805,s=t*.2126+n*.7152+r*.0722,o=t*.0193+n*.1192+r*.9505;return[i*100,s*100,o*100]};T.rgb.lab=function(e){let t=T.rgb.xyz(e),n=t[0],r=t[1],i=t[2];n/=95.047,r/=100,i/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;let s=116*r-16,o=500*(n-r),a=200*(r-i);return[s,o,a]};T.hsl.rgb=function(e){let t=e[0]/360,n=e[1]/100,r=e[2]/100,i,s,o;if(n===0)return o=r*255,[o,o,o];r<.5?i=r*(1+n):i=r+n-r*n;let a=2*r-i,l=[0,0,0];for(let f=0;f<3;f++)s=t+1/3*-(f-1),s<0&&s++,s>1&&s--,6*s<1?o=a+(i-a)*6*s:2*s<1?o=i:3*s<2?o=a+(i-a)*(2/3-s)*6:o=a,l[f]=o*255;return l};T.hsl.hsv=function(e){let t=e[0],n=e[1]/100,r=e[2]/100,i=n,s=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,i*=s<=1?s:2-s;let o=(r+n)/2,a=r===0?2*i/(s+i):2*n/(r+n);return[t,a*100,o*100]};T.hsv.rgb=function(e){let t=e[0]/60,n=e[1]/100,r=e[2]/100,i=Math.floor(t)%6,s=t-Math.floor(t),o=255*r*(1-n),a=255*r*(1-n*s),l=255*r*(1-n*(1-s));switch(r*=255,i){case 0:return[r,l,o];case 1:return[a,r,o];case 2:return[o,r,l];case 3:return[o,a,r];case 4:return[l,o,r];case 5:return[r,o,a]}};T.hsv.hsl=function(e){let t=e[0],n=e[1]/100,r=e[2]/100,i=Math.max(r,.01),s,o;o=(2-n)*r;let a=(2-n)*i;return s=n*i,s/=a<=1?a:2-a,s=s||0,o/=2,[t,s*100,o*100]};T.hwb.rgb=function(e){let t=e[0]/360,n=e[1]/100,r=e[2]/100,i=n+r,s;i>1&&(n/=i,r/=i);let o=Math.floor(6*t),a=1-r;s=6*t-o,(o&1)!==0&&(s=1-s);let l=n+s*(a-n),f,u,c;switch(o){default:case 6:case 0:f=a,u=l,c=n;break;case 1:f=l,u=a,c=n;break;case 2:f=n,u=a,c=l;break;case 3:f=n,u=l,c=a;break;case 4:f=l,u=n,c=a;break;case 5:f=a,u=n,c=l;break}return[f*255,u*255,c*255]};T.cmyk.rgb=function(e){let t=e[0]/100,n=e[1]/100,r=e[2]/100,i=e[3]/100,s=1-Math.min(1,t*(1-i)+i),o=1-Math.min(1,n*(1-i)+i),a=1-Math.min(1,r*(1-i)+i);return[s*255,o*255,a*255]};T.xyz.rgb=function(e){let t=e[0]/100,n=e[1]/100,r=e[2]/100,i,s,o;return i=t*3.2406+n*-1.5372+r*-.4986,s=t*-.9689+n*1.8758+r*.0415,o=t*.0557+n*-.204+r*1.057,i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,i=Math.min(Math.max(0,i),1),s=Math.min(Math.max(0,s),1),o=Math.min(Math.max(0,o),1),[i*255,s*255,o*255]};T.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;let i=116*n-16,s=500*(t-n),o=200*(n-r);return[i,s,o]};T.lab.xyz=function(e){let t=e[0],n=e[1],r=e[2],i,s,o;s=(t+16)/116,i=n/500+s,o=s-r/200;let a=s**3,l=i**3,f=o**3;return s=a>.008856?a:(s-16/116)/7.787,i=l>.008856?l:(i-16/116)/7.787,o=f>.008856?f:(o-16/116)/7.787,i*=95.047,s*=100,o*=108.883,[i,s,o]};T.lab.lch=function(e){let t=e[0],n=e[1],r=e[2],i;i=Math.atan2(r,n)*360/2/Math.PI,i<0&&(i+=360);let o=Math.sqrt(n*n+r*r);return[t,o,i]};T.lch.lab=function(e){let t=e[0],n=e[1],i=e[2]/360*2*Math.PI,s=n*Math.cos(i),o=n*Math.sin(i);return[t,s,o]};T.rgb.ansi16=function(e,t=null){let[n,r,i]=e,s=t===null?T.rgb.hsv(e)[2]:t;if(s=Math.round(s/50),s===0)return 30;let o=30+(Math.round(i/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return s===2&&(o+=60),o};T.hsv.ansi16=function(e){return T.rgb.ansi16(T.hsv.rgb(e),e[2])};T.rgb.ansi256=function(e){let t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)};T.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];let n=(~~(e>50)+1)*.5,r=(t&1)*n*255,i=(t>>1&1)*n*255,s=(t>>2&1)*n*255;return[r,i,s]};T.ansi256.rgb=function(e){if(e>=232){let s=(e-232)*10+8;return[s,s,s]}e-=16;let t,n=Math.floor(e/36)/5*255,r=Math.floor((t=e%36)/6)/5*255,i=t%6/5*255;return[n,r,i]};T.rgb.hex=function(e){let n=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(n.length)+n};T.hex.rgb=function(e){let t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];t[0].length===3&&(n=n.split("").map(a=>a+a).join(""));let r=parseInt(n,16),i=r>>16&255,s=r>>8&255,o=r&255;return[i,s,o]};T.rgb.hcg=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.max(Math.max(t,n),r),s=Math.min(Math.min(t,n),r),o=i-s,a,l;return o<1?a=s/(1-o):a=0,o<=0?l=0:i===t?l=(n-r)/o%6:i===n?l=2+(r-t)/o:l=4+(t-n)/o,l/=6,l%=1,[l*360,o*100,a*100]};T.hsl.hcg=function(e){let t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n),i=0;return r<1&&(i=(n-.5*r)/(1-r)),[e[0],r*100,i*100]};T.hsv.hcg=function(e){let t=e[1]/100,n=e[2]/100,r=t*n,i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],r*100,i*100]};T.hcg.rgb=function(e){let t=e[0]/360,n=e[1]/100,r=e[2]/100;if(n===0)return[r*255,r*255,r*255];let i=[0,0,0],s=t%1*6,o=s%1,a=1-o,l=0;switch(Math.floor(s)){case 0:i[0]=1,i[1]=o,i[2]=0;break;case 1:i[0]=a,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=o;break;case 3:i[0]=0,i[1]=a,i[2]=1;break;case 4:i[0]=o,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=a}return l=(1-n)*r,[(n*i[0]+l)*255,(n*i[1]+l)*255,(n*i[2]+l)*255]};T.hcg.hsv=function(e){let t=e[1]/100,n=e[2]/100,r=t+n*(1-t),i=0;return r>0&&(i=t/r),[e[0],i*100,r*100]};T.hcg.hsl=function(e){let t=e[1]/100,r=e[2]/100*(1-t)+.5*t,i=0;return r>0&&r<.5?i=t/(2*r):r>=.5&&r<1&&(i=t/(2*(1-r))),[e[0],i*100,r*100]};T.hcg.hwb=function(e){let t=e[1]/100,n=e[2]/100,r=t+n*(1-t);return[e[0],(r-t)*100,(1-r)*100]};T.hwb.hcg=function(e){let t=e[1]/100,n=e[2]/100,r=1-n,i=r-t,s=0;return i<1&&(s=(r-i)/(1-i)),[e[0],i*100,s*100]};T.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};T.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};T.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};T.gray.hsl=function(e){return[0,0,e[0]]};T.gray.hsv=T.gray.hsl;T.gray.hwb=function(e){return[0,100,e[0]]};T.gray.cmyk=function(e){return[0,0,0,e[0]]};T.gray.lab=function(e){return[e[0],0,0]};T.gray.hex=function(e){let t=Math.round(e[0]/100*255)&255,r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r};T.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}});var Ha=tt((Rb,Ba)=>{w();var vr=Mi();function yp(){let e={},t=Object.keys(vr);for(let n=t.length,r=0;r<n;r++)e[t[r]]={distance:-1,parent:null};return e}function wp(e){let t=yp(),n=[e];for(t[e].distance=0;n.length;){let r=n.pop(),i=Object.keys(vr[r]);for(let s=i.length,o=0;o<s;o++){let a=i[o],l=t[a];l.distance===-1&&(l.distance=t[r].distance+1,l.parent=r,n.unshift(a))}}return t}function Ap(e,t){return function(n){return t(e(n))}}function xp(e,t){let n=[t[e].parent,e],r=vr[t[e].parent][e],i=t[e].parent;for(;t[i].parent;)n.unshift(t[i].parent),r=Ap(vr[t[i].parent][i],r),i=t[i].parent;return r.conversion=n,r}Ba.exports=function(e){let t=wp(e),n={},r=Object.keys(t);for(let i=r.length,s=0;s<i;s++){let o=r[s];t[o].parent!==null&&(n[o]=xp(o,t))}return n}});var Ya=tt((Ub,qa)=>{w();var Ii=Mi(),vp=Ha(),An={},Cp=Object.keys(Ii);function Op(e){let t=function(...n){let r=n[0];return r==null?r:(r.length>1&&(n=r),e(n))};return"conversion"in e&&(t.conversion=e.conversion),t}function Ep(e){let t=function(...n){let r=n[0];if(r==null)return r;r.length>1&&(n=r);let i=e(n);if(typeof i=="object")for(let s=i.length,o=0;o<s;o++)i[o]=Math.round(i[o]);return i};return"conversion"in e&&(t.conversion=e.conversion),t}Cp.forEach(e=>{An[e]={},Object.defineProperty(An[e],"channels",{value:Ii[e].channels}),Object.defineProperty(An[e],"labels",{value:Ii[e].labels});let t=vp(e);Object.keys(t).forEach(r=>{let i=t[r];An[e][r]=Ep(i),An[e][r].raw=Op(i)})});qa.exports=An});var Ja=tt(($b,Qa)=>{"use strict";w();var Ga=(e,t)=>(...n)=>`\x1B[${e(...n)+t}m`,za=(e,t)=>(...n)=>{let r=e(...n);return`\x1B[${38+t};5;${r}m`},Va=(e,t)=>(...n)=>{let r=e(...n);return`\x1B[${38+t};2;${r[0]};${r[1]};${r[2]}m`},Cr=e=>e,Ka=(e,t,n)=>[e,t,n],xn=(e,t,n)=>{Object.defineProperty(e,t,{get:()=>{let r=n();return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0}),r},enumerable:!0,configurable:!0})},Pi,vn=(e,t,n,r)=>{Pi===void 0&&(Pi=Ya());let i=r?10:0,s={};for(let[o,a]of Object.entries(Pi)){let l=o==="ansi16"?"ansi":o;o===t?s[l]=e(n,i):typeof a=="object"&&(s[l]=e(a[t],i))}return s};function _p(){let e=new Map,t={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};t.color.gray=t.color.blackBright,t.bgColor.bgGray=t.bgColor.bgBlackBright,t.color.grey=t.color.blackBright,t.bgColor.bgGrey=t.bgColor.bgBlackBright;for(let[n,r]of Object.entries(t)){for(let[i,s]of Object.entries(r))t[i]={open:`\x1B[${s[0]}m`,close:`\x1B[${s[1]}m`},r[i]=t[i],e.set(s[0],s[1]);Object.defineProperty(t,n,{value:r,enumerable:!1})}return Object.defineProperty(t,"codes",{value:e,enumerable:!1}),t.color.close="\x1B[39m",t.bgColor.close="\x1B[49m",xn(t.color,"ansi",()=>vn(Ga,"ansi16",Cr,!1)),xn(t.color,"ansi256",()=>vn(za,"ansi256",Cr,!1)),xn(t.color,"ansi16m",()=>vn(Va,"rgb",Ka,!1)),xn(t.bgColor,"ansi",()=>vn(Ga,"ansi16",Cr,!0)),xn(t.bgColor,"ansi256",()=>vn(za,"ansi256",Cr,!0)),xn(t.bgColor,"ansi16m",()=>vn(Va,"rgb",Ka,!0)),t}Object.defineProperty(Qa,"exports",{enumerable:!0,get:_p})});var Za=tt((Wb,Xa)=>{"use strict";w();Xa.exports=(e,t=process.argv)=>{let n=e.startsWith("-")?"":e.length===1?"-":"--",r=t.indexOf(n+e),i=t.indexOf("--");return r!==-1&&(i===-1||r<i)}});var nl=tt((Bb,tl)=>{"use strict";w();var Sp=_e("os"),el=_e("tty"),Xe=Za(),{env:Pe}=process,Ft;Xe("no-color")||Xe("no-colors")||Xe("color=false")||Xe("color=never")?Ft=0:(Xe("color")||Xe("colors")||Xe("color=true")||Xe("color=always"))&&(Ft=1);"FORCE_COLOR"in Pe&&(Pe.FORCE_COLOR==="true"?Ft=1:Pe.FORCE_COLOR==="false"?Ft=0:Ft=Pe.FORCE_COLOR.length===0?1:Math.min(parseInt(Pe.FORCE_COLOR,10),3));function Fi(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function Li(e,t){if(Ft===0)return 0;if(Xe("color=16m")||Xe("color=full")||Xe("color=truecolor"))return 3;if(Xe("color=256"))return 2;if(e&&!t&&Ft===void 0)return 0;let n=Ft||0;if(Pe.TERM==="dumb")return n;if(process.platform==="win32"){let r=Sp.release().split(".");return Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in Pe)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(r=>r in Pe)||Pe.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in Pe)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Pe.TEAMCITY_VERSION)?1:0;if(Pe.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Pe){let r=parseInt((Pe.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Pe.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Pe.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Pe.TERM)||"COLORTERM"in Pe?1:n}function jp(e){let t=Li(e,e&&e.isTTY);return Fi(t)}tl.exports={supportsColor:jp,stdout:Fi(Li(!0,el.isatty(1))),stderr:Fi(Li(!0,el.isatty(2)))}});var il=tt((Hb,rl)=>{"use strict";w();var Mp=(e,t,n)=>{let r=e.indexOf(t);if(r===-1)return e;let i=t.length,s=0,o="";do o+=e.substr(s,r-s)+t+n,s=r+i,r=e.indexOf(t,s);while(r!==-1);return o+=e.substr(s),o},Ip=(e,t,n,r)=>{let i=0,s="";do{let o=e[r-1]==="\r";s+=e.substr(i,(o?r-1:r)-i)+t+(o?`\r
|
2
2
|
`:`
|
3
3
|
`)+n,i=r+1,r=e.indexOf(`
|
4
4
|
`,i)}while(r!==-1);return s+=e.substr(i),s};rl.exports={stringReplaceAll:Mp,stringEncaseCRLFWithFirstIndex:Ip}});var cl=tt((qb,ll)=>{"use strict";w();var Pp=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,ol=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,Fp=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,Lp=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,Dp=new Map([["n",`
|
@@ -8,11 +8,11 @@ import{b as $i,d as He,e as rt,f as Wi,g as qe,h as Ye,i as Ge}from"../chunk-5UO
|
|
8
8
|
`)}rowToString(t,n){return this.rasterize(t).forEach((r,i)=>{let s="";r.forEach((o,a)=>{let{width:l}=t[a],f=this.negatePadding(t[a]),u=o;f>Ue.stringWidth(o)&&(u+=" ".repeat(f-Ue.stringWidth(o))),t[a].align&&t[a].align!=="left"&&this.wrap&&(u=Wl[t[a].align](u,f),Ue.stringWidth(u)<f&&(u+=" ".repeat((l||0)-Ue.stringWidth(u)-1)));let c=t[a].padding||[0,0,0,0];c[Bn]&&(s+=" ".repeat(c[Bn])),s+=Bi(t[a],u,"| "),s+=u,s+=Bi(t[a],u," |"),c[Wn]&&(s+=" ".repeat(c[Wn])),i===0&&n.length>0&&(s=this.renderInline(s,n[n.length-1]))}),n.push({text:s.replace(/ +$/,""),span:t.span})}),n}renderInline(t,n){let r=t.match(/^ */),i=r?r[0].length:0,s=n.text,o=Ue.stringWidth(s.trimRight());return n.span?this.wrap?i<o?t:(n.hidden=!0,s.trimRight()+" ".repeat(i-o)+t.trimLeft()):(n.hidden=!0,s+t):t}rasterize(t){let n=[],r=this.columnWidths(t),i;return t.forEach((s,o)=>{s.width=r[o],this.wrap?i=Ue.wrap(s.text,this.negatePadding(s),{hard:!0}).split(`
|
9
9
|
`):i=s.text.split(`
|
10
10
|
`),s.border&&(i.unshift("."+"-".repeat(this.negatePadding(s)+2)+"."),i.push("'"+"-".repeat(this.negatePadding(s)+2)+"'")),s.padding&&(i.unshift(...new Array(s.padding[Bl]||0).fill("")),i.push(...new Array(s.padding[Hl]||0).fill(""))),i.forEach((a,l)=>{n[l]||n.push([]);let f=n[l];for(let u=0;u<o;u++)f[u]===void 0&&f.push("");f.push(a)})}),n}negatePadding(t){let n=t.width||0;return t.padding&&(n-=(t.padding[Bn]||0)+(t.padding[Wn]||0)),t.border&&(n-=4),n}columnWidths(t){if(!this.wrap)return t.map(o=>o.width||Ue.stringWidth(o.text));let n=t.length,r=this.width,i=t.map(o=>{if(o.width)return n--,r-=o.width,o.width}),s=n?Math.floor(r/n):0;return i.map((o,a)=>o===void 0?Math.max(s,ql(t[a])):o)}};function Bi(e,t,n){return e.border?/[.']-+[.']/.test(t)?"":t.trim().length!==0?n:" ":""}function ql(e){let t=e.padding||[],n=1+(t[Bn]||0)+(t[Wn]||0);return e.border?n+4:n}function Yl(){return typeof process=="object"&&process.stdout&&process.stdout.columns?process.stdout.columns:80}function Gl(e,t){e=e.trim();let n=Ue.stringWidth(e);return n<t?" ".repeat(t-n)+e:e}function zl(e,t){e=e.trim();let n=Ue.stringWidth(e);return n>=t?e:" ".repeat(t-n>>1)+e}var Ue;function qi(e,t){return Ue=t,new Hi({width:(e==null?void 0:e.width)||Yl(),wrap:e==null?void 0:e.wrap})}w();var Yi=new RegExp("\x1B(?:\\[(?:\\d+[ABCDEFGJKSTm]|\\d+;\\d+[Hfm]|\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)","g");function Fr(e){return e.replace(Yi,"")}function Gi(e,t){let[n,r]=e.match(Yi)||["",""];e=Fr(e);let i="";for(let s=0;s<e.length;s++)s!==0&&s%t===0&&(i+=`
|
11
|
-
`),i+=e.charAt(s);return n&&r&&(i=`${n}${i}${r}`),i}function Lr(e){return qi(e,{stringWidth:t=>[...t].length,stripAnsi:Fr,wrap:Gi})}w();import{dirname as zi,resolve as Vi}from"path";import{readdirSync as Vl,statSync as Kl}from"fs";function Ki(e,t){let n=Vi(".",e),r;for(Kl(n).isDirectory()||(n=zi(n));;){if(r=t(n,Vl(n)),r)return Vi(n,r);if(n=zi(r=n),r===n)break}}import{inspect as pc}from"util";import{readFileSync as mc}from"fs";import{fileURLToPath as gc}from"url";w();import{format as Xl}from"util";import{normalize as Zl,resolve as ec}from"path";w();function Wt(e){if(e!==e.toLowerCase()&&e!==e.toUpperCase()||(e=e.toLowerCase()),e.indexOf("-")===-1&&e.indexOf("_")===-1)return e;{let n="",r=!1,i=e.match(/^-+/);for(let s=i?i[0].length:0;s<e.length;s++){let o=e.charAt(s);r&&(r=!1,o=o.toUpperCase()),s!==0&&(o==="-"||o==="_")?r=!0:o!=="-"&&o!=="_"&&(n+=o)}return n}}function Hn(e,t){let n=e.toLowerCase();t=t||"-";let r="";for(let i=0;i<e.length;i++){let s=n.charAt(i),o=e.charAt(i);s!==o&&i>0?r+=`${t}${n.charAt(i)}`:r+=o}return r}function qn(e){return e==null?!1:typeof e=="number"||/^0x[0-9a-f]+$/i.test(e)?!0:/^0[^.]/.test(e)?!1:/^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(e)}w();w();function Qi(e){if(Array.isArray(e))return e.map(o=>typeof o!="string"?o+"":o);e=e.trim();let t=0,n=null,r=null,i=null,s=[];for(let o=0;o<e.length;o++){if(n=r,r=e.charAt(o),r===" "&&!i){n!==" "&&t++;continue}r===i?i=null:(r==="'"||r==='"')&&!i&&(i=r),s[t]||(s[t]=""),s[t]+=r}return s}w();var ze;(function(e){e.BOOLEAN="boolean",e.STRING="string",e.NUMBER="number",e.ARRAY="array"})(ze||(ze={}));var dt,Tr=class{constructor(t){dt=t}parse(t,n){let r=Object.assign({alias:void 0,array:void 0,boolean:void 0,config:void 0,configObjects:void 0,configuration:void 0,coerce:void 0,count:void 0,default:void 0,envPrefix:void 0,narg:void 0,normalize:void 0,string:void 0,number:void 0,__:void 0,key:void 0},n),i=Qi(t),s=typeof t=="string",o=Ql(Object.assign(Object.create(null),r.alias)),a=Object.assign({"boolean-negation":!0,"camel-case-expansion":!0,"combine-arrays":!1,"dot-notation":!0,"duplicate-arguments-array":!0,"flatten-duplicate-arrays":!0,"greedy-arrays":!0,"halt-at-non-option":!1,"nargs-eats-options":!1,"negation-prefix":"no-","parse-numbers":!0,"parse-positional-numbers":!0,"populate--":!1,"set-placeholder-key":!1,"short-option-groups":!0,"strip-aliased":!1,"strip-dashed":!1,"unknown-options-as-args":!1},r.configuration),l=Object.assign(Object.create(null),r.default),f=r.configObjects||[],u=r.envPrefix,c=a["populate--"],d=c?"--":"_",p=Object.create(null),b=Object.create(null),g=r.__||dt.format,m={aliases:Object.create(null),arrays:Object.create(null),bools:Object.create(null),strings:Object.create(null),numbers:Object.create(null),counts:Object.create(null),normalize:Object.create(null),configs:Object.create(null),nargs:Object.create(null),coercions:Object.create(null),keys:[]},C=/^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/,_=new RegExp("^--"+a["negation-prefix"]+"(.+)");[].concat(r.array||[]).filter(Boolean).forEach(function(y){let x=typeof y=="object"?y.key:y,S=Object.keys(y).map(function(v){return{boolean:"bools",string:"strings",number:"numbers"}[v]}).filter(Boolean).pop();S&&(m[S][x]=!0),m.arrays[x]=!0,m.keys.push(x)}),[].concat(r.boolean||[]).filter(Boolean).forEach(function(y){m.bools[y]=!0,m.keys.push(y)}),[].concat(r.string||[]).filter(Boolean).forEach(function(y){m.strings[y]=!0,m.keys.push(y)}),[].concat(r.number||[]).filter(Boolean).forEach(function(y){m.numbers[y]=!0,m.keys.push(y)}),[].concat(r.count||[]).filter(Boolean).forEach(function(y){m.counts[y]=!0,m.keys.push(y)}),[].concat(r.normalize||[]).filter(Boolean).forEach(function(y){m.normalize[y]=!0,m.keys.push(y)}),typeof r.narg=="object"&&Object.entries(r.narg).forEach(([y,x])=>{typeof x=="number"&&(m.nargs[y]=x,m.keys.push(y))}),typeof r.coerce=="object"&&Object.entries(r.coerce).forEach(([y,x])=>{typeof x=="function"&&(m.coercions[y]=x,m.keys.push(y))}),typeof r.config!="undefined"&&(Array.isArray(r.config)||typeof r.config=="string"?[].concat(r.config).filter(Boolean).forEach(function(y){m.configs[y]=!0}):typeof r.config=="object"&&Object.entries(r.config).forEach(([y,x])=>{(typeof x=="boolean"||typeof x=="function")&&(m.configs[y]=x)})),$t(r.key,o,r.default,m.arrays),Object.keys(l).forEach(function(y){(m.aliases[y]||[]).forEach(function(x){l[x]=l[y]})});let W=null;$n();let V=[],X=Object.assign(Object.create(null),{_:[]}),G={};for(let y=0;y<i.length;y++){let x=i[y],S=x.replace(/^-{3,}/,"---"),v,A,L,M,U,je;if(x!=="--"&&le(x))R(x);else if(S.match(/---+(=|$)/)){R(x);continue}else if(x.match(/^--.+=/)||!a["short-option-groups"]&&x.match(/^-.+=/))M=x.match(/^--?([^=]+)=([\s\S]*)$/),M!==null&&Array.isArray(M)&&M.length>=3&&(q(M[1],m.arrays)?y=te(y,M[1],i,M[2]):q(M[1],m.nargs)!==!1?y=J(y,M[1],i,M[2]):z(M[1],M[2],!0));else if(x.match(_)&&a["boolean-negation"])M=x.match(_),M!==null&&Array.isArray(M)&&M.length>=2&&(A=M[1],z(A,q(A,m.arrays)?[!1]:!1));else if(x.match(/^--.+/)||!a["short-option-groups"]&&x.match(/^-[^-]+/))M=x.match(/^--?(.+)/),M!==null&&Array.isArray(M)&&M.length>=2&&(A=M[1],q(A,m.arrays)?y=te(y,A,i):q(A,m.nargs)!==!1?y=J(y,A,i):(U=i[y+1],U!==void 0&&(!U.match(/^-/)||U.match(C))&&!q(A,m.bools)&&!q(A,m.counts)||/^(true|false)$/.test(U)?(z(A,U),y++):z(A,ce(A))));else if(x.match(/^-.\..+=/))M=x.match(/^-([^=]+)=([\s\S]*)$/),M!==null&&Array.isArray(M)&&M.length>=3&&z(M[1],M[2]);else if(x.match(/^-.\..+/)&&!x.match(C))U=i[y+1],M=x.match(/^-(.\..+)/),M!==null&&Array.isArray(M)&&M.length>=2&&(A=M[1],U!==void 0&&!U.match(/^-/)&&!q(A,m.bools)&&!q(A,m.counts)?(z(A,U),y++):z(A,ce(A)));else if(x.match(/^-[^-]+/)&&!x.match(C)){L=x.slice(1,-1).split(""),v=!1;for(let De=0;De<L.length;De++){if(U=x.slice(De+2),L[De+1]&&L[De+1]==="="){je=x.slice(De+3),A=L[De],q(A,m.arrays)?y=te(y,A,i,je):q(A,m.nargs)!==!1?y=J(y,A,i,je):z(A,je),v=!0;break}if(U==="-"){z(L[De],U);continue}if(/[A-Za-z]/.test(L[De])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(U)&&q(U,m.bools)===!1){z(L[De],U),v=!0;break}if(L[De+1]&&L[De+1].match(/\W/)){z(L[De],U),v=!0;break}else z(L[De],ce(L[De]))}A=x.slice(-1)[0],!v&&A!=="-"&&(q(A,m.arrays)?y=te(y,A,i):q(A,m.nargs)!==!1?y=J(y,A,i):(U=i[y+1],U!==void 0&&(!/^(-|--)[^-]/.test(U)||U.match(C))&&!q(A,m.bools)&&!q(A,m.counts)||/^(true|false)$/.test(U)?(z(A,U),y++):z(A,ce(A))))}else if(x.match(/^-[0-9]$/)&&x.match(C)&&q(x.slice(1),m.bools))A=x.slice(1),z(A,ce(A));else if(x==="--"){V=i.slice(y+1);break}else if(a["halt-at-non-option"]){V=i.slice(y);break}else R(x)}ee(X,!0),ee(X,!1),K(X),pe(),ae(X,m.aliases,l,!0),Ee(X),a["set-placeholder-key"]&&Ut(X),Object.keys(m.counts).forEach(function(y){ft(X,y.split("."))||z(y,0)}),c&&V.length&&(X[d]=[]),V.forEach(function(y){X[d].push(y)}),a["camel-case-expansion"]&&a["strip-dashed"]&&Object.keys(X).filter(y=>y!=="--"&&y.includes("-")).forEach(y=>{delete X[y]}),a["strip-aliased"]&&[].concat(...Object.keys(o).map(y=>o[y])).forEach(y=>{a["camel-case-expansion"]&&y.includes("-")&&delete X[y.split(".").map(x=>Wt(x)).join(".")],delete X[y]});function R(y){let x=B("_",y);(typeof x=="string"||typeof x=="number")&&X._.push(x)}function J(y,x,S,v){let A,L=q(x,m.nargs);if(L=typeof L!="number"||isNaN(L)?1:L,L===0)return et(v)||(W=Error(g("Argument unexpected for: %s",x))),z(x,ce(x)),y;let M=et(v)?0:1;if(a["nargs-eats-options"])S.length-(y+1)+M<L&&(W=Error(g("Not enough arguments following: %s",x))),M=L;else{for(A=y+1;A<S.length&&(!S[A].match(/^-[^0-9]/)||S[A].match(C)||le(S[A]));A++)M++;M<L&&(W=Error(g("Not enough arguments following: %s",x)))}let U=Math.min(M,L);for(!et(v)&&U>0&&(z(x,v),U--),A=y+1;A<U+y+1;A++)z(x,S[A]);return y+U}function te(y,x,S,v){let A=[],L=v||S[y+1],M=q(x,m.nargs);if(q(x,m.bools)&&!/^(true|false)$/.test(L))A.push(!0);else if(et(L)||et(v)&&/^-/.test(L)&&!C.test(L)&&!le(L)){if(l[x]!==void 0){let U=l[x];A=Array.isArray(U)?U:[U]}}else{et(v)||A.push(j(x,v,!0));for(let U=y+1;U<S.length&&!(!a["greedy-arrays"]&&A.length>0||M&&typeof M=="number"&&A.length>=M||(L=S[U],/^-/.test(L)&&!C.test(L)&&!le(L)));U++)y=U,A.push(j(x,L,s))}return typeof M=="number"&&(M&&A.length<M||isNaN(M)&&A.length===0)&&(W=Error(g("Not enough arguments following: %s",x))),z(x,A),y}function z(y,x,S=s){if(/-/.test(y)&&a["camel-case-expansion"]){let L=y.split(".").map(function(M){return Wt(M)}).join(".");I(y,L)}let v=j(y,x,S),A=y.split(".");ut(X,A,v),m.aliases[y]&&m.aliases[y].forEach(function(L){let M=L.split(".");ut(X,M,v)}),A.length>1&&a["dot-notation"]&&(m.aliases[A[0]]||[]).forEach(function(L){let M=L.split("."),U=[].concat(A);U.shift(),M=M.concat(U),(m.aliases[y]||[]).includes(M.join("."))||ut(X,M,v)}),q(y,m.normalize)&&!q(y,m.arrays)&&[y].concat(m.aliases[y]||[]).forEach(function(M){Object.defineProperty(G,M,{enumerable:!0,get(){return x},set(U){x=typeof U=="string"?dt.normalize(U):U}})})}function I(y,x){m.aliases[y]&&m.aliases[y].length||(m.aliases[y]=[x],p[x]=!0),m.aliases[x]&&m.aliases[x].length||I(x,y)}function j(y,x,S){S&&(x=Jl(x)),(q(y,m.bools)||q(y,m.counts))&&typeof x=="string"&&(x=x==="true");let v=Array.isArray(x)?x.map(function(A){return B(y,A)}):B(y,x);return q(y,m.counts)&&(et(v)||typeof v=="boolean")&&(v=Dr()),q(y,m.normalize)&&q(y,m.arrays)&&(Array.isArray(x)?v=x.map(A=>dt.normalize(A)):v=dt.normalize(x)),v}function B(y,x){return!a["parse-positional-numbers"]&&y==="_"||!q(y,m.strings)&&!q(y,m.bools)&&!Array.isArray(x)&&(qn(x)&&a["parse-numbers"]&&Number.isSafeInteger(Math.floor(parseFloat(`${x}`)))||!et(x)&&q(y,m.numbers))&&(x=Number(x)),x}function K(y){let x=Object.create(null);ae(x,m.aliases,l),Object.keys(m.configs).forEach(function(S){let v=y[S]||x[S];if(v)try{let A=null,L=dt.resolve(dt.cwd(),v),M=m.configs[S];if(typeof M=="function"){try{A=M(L)}catch(U){A=U}if(A instanceof Error){W=A;return}}else A=dt.require(L);ne(A)}catch(A){A.name==="PermissionDenied"?W=A:y[S]&&(W=Error(g("Invalid JSON config file: %s",v)))}})}function ne(y,x){Object.keys(y).forEach(function(S){let v=y[S],A=x?x+"."+S:S;typeof v=="object"&&v!==null&&!Array.isArray(v)&&a["dot-notation"]?ne(v,A):(!ft(X,A.split("."))||q(A,m.arrays)&&a["combine-arrays"])&&z(A,v)})}function pe(){typeof f!="undefined"&&f.forEach(function(y){ne(y)})}function ee(y,x){if(typeof u=="undefined")return;let S=typeof u=="string"?u:"",v=dt.env();Object.keys(v).forEach(function(A){if(S===""||A.lastIndexOf(S,0)===0){let L=A.split("__").map(function(M,U){return U===0&&(M=M.substring(S.length)),Wt(M)});(x&&m.configs[L.join(".")]||!x)&&!ft(y,L)&&z(L.join("."),v[A])}})}function Ee(y){let x,S=new Set;Object.keys(y).forEach(function(v){if(!S.has(v)&&(x=q(v,m.coercions),typeof x=="function"))try{let A=B(v,x(y[v]));[].concat(m.aliases[v]||[],v).forEach(L=>{S.add(L),y[L]=A})}catch(A){W=A}})}function Ut(y){return m.keys.forEach(x=>{~x.indexOf(".")||typeof y[x]=="undefined"&&(y[x]=void 0)}),y}function ae(y,x,S,v=!1){Object.keys(S).forEach(function(A){ft(y,A.split("."))||(ut(y,A.split("."),S[A]),v&&(b[A]=!0),(x[A]||[]).forEach(function(L){ft(y,L.split("."))||ut(y,L.split("."),S[A])}))})}function ft(y,x){let S=y;a["dot-notation"]||(x=[x.join(".")]),x.slice(0,-1).forEach(function(A){S=S[A]||{}});let v=x[x.length-1];return typeof S!="object"?!1:v in S}function ut(y,x,S){let v=y;a["dot-notation"]||(x=[x.join(".")]),x.slice(0,-1).forEach(function(je){je=Ji(je),typeof v=="object"&&v[je]===void 0&&(v[je]={}),typeof v[je]!="object"||Array.isArray(v[je])?(Array.isArray(v[je])?v[je].push({}):v[je]=[v[je],{}],v=v[je][v[je].length-1]):v=v[je]});let A=Ji(x[x.length-1]),L=q(x.join("."),m.arrays),M=Array.isArray(S),U=a["duplicate-arguments-array"];!U&&q(A,m.nargs)&&(U=!0,(!et(v[A])&&m.nargs[A]===1||Array.isArray(v[A])&&v[A].length===m.nargs[A])&&(v[A]=void 0)),S===Dr()?v[A]=Dr(v[A]):Array.isArray(v[A])?U&&L&&M?v[A]=a["flatten-duplicate-arrays"]?v[A].concat(S):(Array.isArray(v[A][0])?v[A]:[v[A]]).concat([S]):!U&&Boolean(L)===Boolean(M)?v[A]=S:v[A]=v[A].concat([S]):v[A]===void 0&&L?v[A]=M?S:[S]:U&&!(v[A]===void 0||q(A,m.counts)||q(A,m.bools))?v[A]=[v[A],S]:v[A]=S}function $t(...y){y.forEach(function(x){Object.keys(x||{}).forEach(function(S){m.aliases[S]||(m.aliases[S]=[].concat(o[S]||[]),m.aliases[S].concat(S).forEach(function(v){if(/-/.test(v)&&a["camel-case-expansion"]){let A=Wt(v);A!==S&&m.aliases[S].indexOf(A)===-1&&(m.aliases[S].push(A),p[A]=!0)}}),m.aliases[S].concat(S).forEach(function(v){if(v.length>1&&/[A-Z]/.test(v)&&a["camel-case-expansion"]){let A=Hn(v,"-");A!==S&&m.aliases[S].indexOf(A)===-1&&(m.aliases[S].push(A),p[A]=!0)}}),m.aliases[S].forEach(function(v){m.aliases[v]=[S].concat(m.aliases[S].filter(function(A){return v!==A}))}))})})}function q(y,x){let S=[].concat(m.aliases[y]||[],y),v=Object.keys(x),A=S.find(L=>v.includes(L));return A?x[A]:!1}function Pr(y){let x=Object.keys(m);return[].concat(x.map(v=>m[v])).some(function(v){return Array.isArray(v)?v.includes(y):v[y]})}function H(y,...x){return[].concat(...x).some(function(v){let A=y.match(v);return A&&Pr(A[1])})}function oe(y){if(y.match(C)||!y.match(/^-[^-]+/))return!1;let x=!0,S,v=y.slice(1).split("");for(let A=0;A<v.length;A++){if(S=y.slice(A+2),!Pr(v[A])){x=!1;break}if(v[A+1]&&v[A+1]==="="||S==="-"||/[A-Za-z]/.test(v[A])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(S)||v[A+1]&&v[A+1].match(/\W/))break}return x}function le(y){return a["unknown-options-as-args"]&&Z(y)}function Z(y){return y=y.replace(/^-{3,}/,"--"),y.match(C)||oe(y)?!1:!H(y,/^-+([^=]+?)=[\s\S]*$/,_,/^-+([^=]+?)$/,/^-+([^=]+?)-$/,/^-+([^=]+?\d+)$/,/^-+([^=]+?)\W+.*$/)}function ce(y){return!q(y,m.bools)&&!q(y,m.counts)&&`${y}`in l?l[y]:me(Ze(y))}function me(y){return{[ze.BOOLEAN]:!0,[ze.STRING]:"",[ze.NUMBER]:void 0,[ze.ARRAY]:[]}[y]}function Ze(y){let x=ze.BOOLEAN;return q(y,m.strings)?x=ze.STRING:q(y,m.numbers)?x=ze.NUMBER:q(y,m.bools)?x=ze.BOOLEAN:q(y,m.arrays)&&(x=ze.ARRAY),x}function et(y){return y===void 0}function $n(){Object.keys(m.counts).find(y=>q(y,m.arrays)?(W=Error(g("Invalid configuration: %s, opts.count excludes opts.array.",y)),!0):q(y,m.nargs)?(W=Error(g("Invalid configuration: %s, opts.count excludes opts.narg.",y)),!0):!1)}return{aliases:Object.assign({},m.aliases),argv:Object.assign(G,X),configuration:a,defaulted:Object.assign({},b),error:W,newAliases:Object.assign({},p)}}};function Ql(e){let t=[],n=Object.create(null),r=!0;for(Object.keys(e).forEach(function(i){t.push([].concat(e[i],i))});r;){r=!1;for(let i=0;i<t.length;i++)for(let s=i+1;s<t.length;s++)if(t[i].filter(function(a){return t[s].indexOf(a)!==-1}).length){t[i]=t[i].concat(t[s]),t.splice(s,1),r=!0;break}}return t.forEach(function(i){i=i.filter(function(o,a,l){return l.indexOf(o)===a});let s=i.pop();s!==void 0&&typeof s=="string"&&(n[s]=i)}),n}function Dr(e){return e!==void 0?e+1:1}function Ji(e){return e==="__proto__"?"___proto___":e}function Jl(e){return typeof e=="string"&&(e[0]==="'"||e[0]==='"')&&e[e.length-1]===e[0]?e.substring(1,e.length-1):e}import{readFileSync as tc}from"fs";var Xi=process&&process.env&&process.env.YARGS_MIN_NODE_VERSION?Number(process.env.YARGS_MIN_NODE_VERSION):12;if(process&&process.version&&Number(process.version.match(/v([^.]+)/)[1])<Xi)throw Error(`yargs parser supports a minimum Node.js version of ${Xi}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);var nc=process?process.env:{},Zi=new Tr({cwd:process.cwd,env:()=>nc,format:Xl,normalize:Zl,resolve:ec,require:e=>{if(typeof _e!="undefined")return _e(e);if(e.match(/\.json$/))return JSON.parse(tc(e,"utf8"));throw Error("only .json config files are supported in ESM")}}),On=function(t,n){return Zi.parse(t.slice(),n).argv};On.detailed=function(e,t){return Zi.parse(e.slice(),t)};On.camelCase=Wt;On.decamelize=Hn;On.looksLikeNumber=qn;var eo=On;import{basename as bc,dirname as yc,extname as wc,relative as Ac,resolve as so}from"path";w();function rc(){return ic()?0:1}function ic(){return oc()&&!process.defaultApp}function oc(){return!!process.versions.electron}function to(){return process.argv[rc()]}w();var re=class extends Error{constructor(t){super(t||"yargs error");this.name="YError",Error.captureStackTrace(this,re)}};w();w();import{readFileSync as sc,statSync as ac,writeFile as lc}from"fs";import{format as cc}from"util";import{resolve as fc}from"path";var no={fs:{readFileSync:sc,writeFile:lc},format:cc,resolve:fc,exists:e=>{try{return ac(e).isFile()}catch(t){return!1}}};w();var nt,ro=class{constructor(t){t=t||{},this.directory=t.directory||"./locales",this.updateFiles=typeof t.updateFiles=="boolean"?t.updateFiles:!0,this.locale=t.locale||"en",this.fallbackToLanguage=typeof t.fallbackToLanguage=="boolean"?t.fallbackToLanguage:!0,this.cache=Object.create(null),this.writeQueue=[]}__(...t){if(typeof arguments[0]!="string")return this._taggedLiteral(arguments[0],...arguments);let n=t.shift(),r=function(){};return typeof t[t.length-1]=="function"&&(r=t.pop()),r=r||function(){},this.cache[this.locale]||this._readLocaleFile(),!this.cache[this.locale][n]&&this.updateFiles?(this.cache[this.locale][n]=n,this._enqueueWrite({directory:this.directory,locale:this.locale,cb:r})):r(),nt.format.apply(nt.format,[this.cache[this.locale][n]||n].concat(t))}__n(){let t=Array.prototype.slice.call(arguments),n=t.shift(),r=t.shift(),i=t.shift(),s=function(){};typeof t[t.length-1]=="function"&&(s=t.pop()),this.cache[this.locale]||this._readLocaleFile();let o=i===1?n:r;this.cache[this.locale][n]&&(o=this.cache[this.locale][n][i===1?"one":"other"]),!this.cache[this.locale][n]&&this.updateFiles?(this.cache[this.locale][n]={one:n,other:r},this._enqueueWrite({directory:this.directory,locale:this.locale,cb:s})):s();let a=[o];return~o.indexOf("%d")&&a.push(i),nt.format.apply(nt.format,a.concat(t))}setLocale(t){this.locale=t}getLocale(){return this.locale}updateLocale(t){this.cache[this.locale]||this._readLocaleFile();for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(this.cache[this.locale][n]=t[n])}_taggedLiteral(t,...n){let r="";return t.forEach(function(i,s){let o=n[s+1];r+=i,typeof o!="undefined"&&(r+="%s")}),this.__.apply(this,[r].concat([].slice.call(n,1)))}_enqueueWrite(t){this.writeQueue.push(t),this.writeQueue.length===1&&this._processWriteQueue()}_processWriteQueue(){let t=this,n=this.writeQueue[0],r=n.directory,i=n.locale,s=n.cb,o=this._resolveLocaleFile(r,i),a=JSON.stringify(this.cache[i],null,2);nt.fs.writeFile(o,a,"utf-8",function(l){t.writeQueue.shift(),t.writeQueue.length>0&&t._processWriteQueue(),s(l)})}_readLocaleFile(){let t={},n=this._resolveLocaleFile(this.directory,this.locale);try{nt.fs.readFileSync&&(t=JSON.parse(nt.fs.readFileSync(n,"utf-8")))}catch(r){if(r instanceof SyntaxError&&(r.message="syntax error in "+n),r.code==="ENOENT")t={};else throw r}this.cache[this.locale]=t}_resolveLocaleFile(t,n){let r=nt.resolve(t,"./",n+".json");if(this.fallbackToLanguage&&!this._fileExistsSync(r)&&~n.lastIndexOf("_")){let i=nt.resolve(t,"./",n.split("_")[0]+".json");this._fileExistsSync(i)&&(r=i)}return r}_fileExistsSync(t){return nt.exists(t)}};function io(e,t){nt=t;let n=new ro(e);return{__:n.__.bind(n),__n:n.__n.bind(n),setLocale:n.setLocale.bind(n),getLocale:n.getLocale.bind(n),updateLocale:n.updateLocale.bind(n),locale:n.locale}}var uc=e=>io(e,no),oo=uc;var Cc={},xc="require is not supported by ESM",ao="loading a directory of commands is not supported yet for ESM",Yn;try{Yn=gc(Cc.url)}catch(e){Yn=process.cwd()}var vc=Yn.split("node_modules")[0],lo={assert:{notStrictEqual:dc,strictEqual:hc},cliui:Lr,findUp:Ki,getEnv:e=>process.env[e],inspect:pc,getCallerFile:()=>{throw new re(ao)},getProcessArgvBin:to,mainFilename:vc||process.cwd(),Parser:eo,path:{basename:bc,dirname:yc,extname:wc,relative:Ac,resolve:so},process:{argv:()=>process.argv,cwd:process.cwd,emitWarning:(e,t)=>process.emitWarning(e,t),execPath:()=>process.execPath,exit:process.exit,nextTick:process.nextTick,stdColumns:typeof process.stdout.columns!="undefined"?process.stdout.columns:null},readFileSync:mc,require:()=>{throw new re(xc)},requireDirectory:()=>{throw new re(ao)},stringWidth:e=>[...e].length,y18n:oo({directory:so(Yn,"../../../locales"),updateFiles:!1})};w();w();w();function Te(e,t,n,r){n.assert.notStrictEqual(e,t,r)}function Nr(e,t){t.assert.strictEqual(typeof e,"string")}function sn(e){return Object.keys(e)}w();function se(e){return!!e&&!!e.then&&typeof e.then=="function"}w();w();w();function bt(e){let n=e.replace(/\s{2,}/g," ").split(/\s+(?![^[]*]|[^<]*>)/),r=/\.*[\][<>]/g,i=n.shift();if(!i)throw new Error(`No command found in: ${e}`);let s={cmd:i.replace(r,""),demanded:[],optional:[]};return n.forEach((o,a)=>{let l=!1;o=o.replace(/\s/g,""),/\.+[\]>]/.test(o)&&a===n.length-1&&(l=!0),/^\[/.test(o)?s.optional.push({cmd:o.replace(r,"").split("|"),variadic:l}):s.demanded.push({cmd:o.replace(r,"").split("|"),variadic:l})}),s}var Oc=["first","second","third","fourth","fifth","sixth"];function P(e,t,n){function r(){return typeof e=="object"?[{demanded:[],optional:[]},e,t]:[bt(`cmd ${e}`),t,n]}try{let i=0,[s,o,a]=r(),l=[].slice.call(o);for(;l.length&&l[l.length-1]===void 0;)l.pop();let f=a||l.length;if(f<s.demanded.length)throw new re(`Not enough arguments provided. Expected ${s.demanded.length} but received ${l.length}.`);let u=s.demanded.length+s.optional.length;if(f>u)throw new re(`Too many arguments provided. Expected max ${u} but received ${f}.`);s.demanded.forEach(c=>{let d=l.shift(),p=co(d);c.cmd.filter(g=>g===p||g==="*").length===0&&fo(p,c.cmd,i),i+=1}),s.optional.forEach(c=>{if(l.length===0)return;let d=l.shift(),p=co(d);c.cmd.filter(g=>g===p||g==="*").length===0&&fo(p,c.cmd,i),i+=1})}catch(i){console.warn(i.stack)}}function co(e){return Array.isArray(e)?"array":e===null?"null":typeof e}function fo(e,t,n){throw new re(`Invalid ${Oc[n]||"manyith"} argument. Expected ${t.join(" or ")} but received ${e}.`)}var kr=class{constructor(t){this.globalMiddleware=[],this.frozens=[],this.yargs=t}addMiddleware(t,n,r=!0,i=!1){if(P("<array|function> [boolean] [boolean] [boolean]",[t,n,r],arguments.length),Array.isArray(t)){for(let s=0;s<t.length;s++){if(typeof t[s]!="function")throw Error("middleware must be a function");let o=t[s];o.applyBeforeValidation=n,o.global=r}Array.prototype.push.apply(this.globalMiddleware,t)}else if(typeof t=="function"){let s=t;s.applyBeforeValidation=n,s.global=r,s.mutates=i,this.globalMiddleware.push(t)}return this.yargs}addCoerceMiddleware(t,n){let r=this.yargs.getAliases();return this.globalMiddleware=this.globalMiddleware.filter(i=>{let s=[...r[n]||[],n];return i.option?!s.includes(i.option):!0}),t.option=n,this.addMiddleware(t,!0,!0,!0)}getMiddleware(){return this.globalMiddleware}freeze(){this.frozens.push([...this.globalMiddleware])}unfreeze(){let t=this.frozens.pop();t!==void 0&&(this.globalMiddleware=t)}reset(){this.globalMiddleware=this.globalMiddleware.filter(t=>t.global)}};function uo(e){return e?e.map(t=>(t.applyBeforeValidation=!1,t)):[]}function Bt(e,t,n,r){return n.reduce((i,s)=>{if(s.applyBeforeValidation!==r)return i;if(s.mutates){if(s.applied)return i;s.applied=!0}if(se(i))return i.then(o=>Promise.all([o,s(o,t)])).then(([o,a])=>Object.assign(o,a));{let o=s(i,t);return se(o)?o.then(a=>Object.assign(i,a)):Object.assign(i,o)}},e)}w();function Ht(e,t,n=r=>{throw r}){try{let r=Ec(e)?e():e;return se(r)?r.then(i=>t(i)):t(r)}catch(r){return n(r)}}function Ec(e){return typeof e=="function"}w();function Rr(e){if(typeof _e=="undefined")return null;for(let t=0,n=Object.keys(_e.cache),r;t<n.length;t++)if(r=_e.cache[n[t]],r.exports===e)return r;return null}var an=/(^\*)|(^\$0)/,po=class{constructor(t,n,r,i){this.requireCache=new Set,this.handlers={},this.aliasMap={},this.frozens=[],this.shim=i,this.usage=t,this.globalMiddleware=r,this.validation=n}addDirectory(t,n,r,i){i=i||{},typeof i.recurse!="boolean"&&(i.recurse=!1),Array.isArray(i.extensions)||(i.extensions=["js"]);let s=typeof i.visit=="function"?i.visit:o=>o;i.visit=(o,a,l)=>{let f=s(o,a,l);if(f){if(this.requireCache.has(a))return f;this.requireCache.add(a),this.addHandler(f)}return f},this.shim.requireDirectory({require:n,filename:r},t,i)}addHandler(t,n,r,i,s,o){let a=[],l=uo(s);if(i=i||(()=>{}),Array.isArray(t))if(_c(t))[t,...a]=t;else for(let f of t)this.addHandler(f);else if(jc(t)){let f=Array.isArray(t.command)||typeof t.command=="string"?t.command:this.moduleName(t);t.aliases&&(f=[].concat(f).concat(t.aliases)),this.addHandler(f,this.extractDesc(t),t.builder,t.handler,t.middlewares,t.deprecated);return}else if(ho(r)){this.addHandler([t].concat(a),n,r.builder,r.handler,r.middlewares,r.deprecated);return}if(typeof t=="string"){let f=bt(t);a=a.map(d=>bt(d).cmd);let u=!1,c=[f.cmd].concat(a).filter(d=>an.test(d)?(u=!0,!1):!0);c.length===0&&u&&c.push("$0"),u&&(f.cmd=c[0],a=c.slice(1),t=t.replace(an,f.cmd)),a.forEach(d=>{this.aliasMap[d]=f.cmd}),n!==!1&&this.usage.command(t,n,u,a,o),this.handlers[f.cmd]={original:t,description:n,handler:i,builder:r||{},middlewares:l,deprecated:o,demanded:f.demanded,optional:f.optional},u&&(this.defaultCommand=this.handlers[f.cmd])}}getCommandHandlers(){return this.handlers}getCommands(){return Object.keys(this.handlers).concat(Object.keys(this.aliasMap))}hasDefaultCommand(){return!!this.defaultCommand}runCommand(t,n,r,i,s,o){let a=this.handlers[t]||this.handlers[this.aliasMap[t]]||this.defaultCommand,l=n.getInternalMethods().getContext(),f=l.commands.slice(),u=!t;t&&(l.commands.push(t),l.fullCommands.push(a.original));let c=this.applyBuilderUpdateUsageAndParse(u,a,n,r.aliases,f,i,s,o);return se(c)?c.then(d=>this.applyMiddlewareAndGetResult(u,a,d.innerArgv,l,s,d.aliases,n)):this.applyMiddlewareAndGetResult(u,a,c.innerArgv,l,s,c.aliases,n)}applyBuilderUpdateUsageAndParse(t,n,r,i,s,o,a,l){let f=n.builder,u=r;if(Gn(f)){let c=f(r.getInternalMethods().reset(i),l);if(se(c))return c.then(d=>(u=go(d)?d:r,this.parseAndUpdateUsage(t,n,u,s,o,a)))}else Sc(f)&&(u=r.getInternalMethods().reset(i),Object.keys(n.builder).forEach(c=>{u.option(c,f[c])}));return this.parseAndUpdateUsage(t,n,u,s,o,a)}parseAndUpdateUsage(t,n,r,i,s,o){t&&r.getInternalMethods().getUsageInstance().unfreeze(),this.shouldUpdateUsage(r)&&r.getInternalMethods().getUsageInstance().usage(this.usageFromParentCommandsCommandHandler(i,n),n.description);let a=r.getInternalMethods().runYargsParserAndExecuteCommands(null,void 0,!0,s,o);return se(a)?a.then(l=>({aliases:r.parsed.aliases,innerArgv:l})):{aliases:r.parsed.aliases,innerArgv:a}}shouldUpdateUsage(t){return!t.getInternalMethods().getUsageInstance().getUsageDisabled()&&t.getInternalMethods().getUsageInstance().getUsage().length===0}usageFromParentCommandsCommandHandler(t,n){let r=an.test(n.original)?n.original.replace(an,"").trim():n.original,i=t.filter(s=>!an.test(s));return i.push(r),`$0 ${i.join(" ")}`}applyMiddlewareAndGetResult(t,n,r,i,s,o,a){let l={};if(s)return r;a.getInternalMethods().getHasOutput()||(l=this.populatePositionals(n,r,i,a));let f=this.globalMiddleware.getMiddleware().slice(0).concat(n.middlewares);if(r=Bt(r,a,f,!0),!a.getInternalMethods().getHasOutput()){let u=a.getInternalMethods().runValidation(o,l,a.parsed.error,t);r=Ht(r,c=>(u(c),c))}if(n.handler&&!a.getInternalMethods().getHasOutput()){a.getInternalMethods().setHasOutput();let u=!!a.getOptions().configuration["populate--"];a.getInternalMethods().postProcess(r,u,!1,!1),r=Bt(r,a,f,!1),r=Ht(r,c=>{let d=n.handler(c);return se(d)?d.then(()=>c):c}),t||a.getInternalMethods().getUsageInstance().cacheHelpMessage(),se(r)&&!a.getInternalMethods().hasParseCallback()&&r.catch(c=>{try{a.getInternalMethods().getUsageInstance().fail(null,c)}catch(d){}})}return t||(i.commands.pop(),i.fullCommands.pop()),r}populatePositionals(t,n,r,i){n._=n._.slice(r.commands.length);let s=t.demanded.slice(0),o=t.optional.slice(0),a={};for(this.validation.positionalCount(s.length,n._.length);s.length;){let l=s.shift();this.populatePositional(l,n,a)}for(;o.length;){let l=o.shift();this.populatePositional(l,n,a)}return n._=r.commands.concat(n._.map(l=>""+l)),this.postProcessPositionals(n,a,this.cmdToParseOptions(t.original),i),a}populatePositional(t,n,r){let i=t.cmd[0];t.variadic?r[i]=n._.splice(0).map(String):n._.length&&(r[i]=[String(n._.shift())])}cmdToParseOptions(t){let n={array:[],default:{},alias:{},demand:{}},r=bt(t);return r.demanded.forEach(i=>{let[s,...o]=i.cmd;i.variadic&&(n.array.push(s),n.default[s]=[]),n.alias[s]=o,n.demand[s]=!0}),r.optional.forEach(i=>{let[s,...o]=i.cmd;i.variadic&&(n.array.push(s),n.default[s]=[]),n.alias[s]=o}),n}postProcessPositionals(t,n,r,i){let s=Object.assign({},i.getOptions());s.default=Object.assign(r.default,s.default);for(let f of Object.keys(r.alias))s.alias[f]=(s.alias[f]||[]).concat(r.alias[f]);s.array=s.array.concat(r.array),s.config={};let o=[];if(Object.keys(n).forEach(f=>{n[f].map(u=>{s.configuration["unknown-options-as-args"]&&(s.key[f]=!0),o.push(`--${f}`),o.push(u)})}),!o.length)return;let a=Object.assign({},s.configuration,{"populate--":!1}),l=this.shim.Parser.detailed(o,Object.assign({},s,{configuration:a}));if(l.error)i.getInternalMethods().getUsageInstance().fail(l.error.message,l.error);else{let f=Object.keys(n);Object.keys(n).forEach(c=>{f.push(...l.aliases[c])});let u=i.getOptions().default;Object.keys(l.argv).forEach(c=>{f.includes(c)&&(n[c]||(n[c]=l.argv[c]),!Object.prototype.hasOwnProperty.call(u,c)&&Object.prototype.hasOwnProperty.call(t,c)&&Object.prototype.hasOwnProperty.call(l.argv,c)&&(Array.isArray(t[c])||Array.isArray(l.argv[c]))?t[c]=[].concat(t[c],l.argv[c]):t[c]=l.argv[c])})}}runDefaultBuilderOn(t){if(!this.defaultCommand)return;if(this.shouldUpdateUsage(t)){let r=an.test(this.defaultCommand.original)?this.defaultCommand.original:this.defaultCommand.original.replace(/^[^[\]<>]*/,"$0 ");t.getInternalMethods().getUsageInstance().usage(r,this.defaultCommand.description)}let n=this.defaultCommand.builder;if(Gn(n))return n(t,!0);ho(n)||Object.keys(n).forEach(r=>{t.option(r,n[r])})}moduleName(t){let n=Rr(t);if(!n)throw new Error(`No command name given for module: ${this.shim.inspect(t)}`);return this.commandFromFilename(n.filename)}commandFromFilename(t){return this.shim.path.basename(t,this.shim.path.extname(t))}extractDesc({describe:t,description:n,desc:r}){for(let i of[t,n,r]){if(typeof i=="string"||i===!1)return i;Te(i,!0,this.shim)}return!1}freeze(){this.frozens.push({handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand})}unfreeze(){let t=this.frozens.pop();Te(t,void 0,this.shim),{handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand}=t}reset(){return this.handlers={},this.aliasMap={},this.defaultCommand=void 0,this.requireCache=new Set,this}};function mo(e,t,n,r){return new po(e,t,n,r)}function ho(e){return typeof e=="object"&&!!e.builder&&typeof e.handler=="function"}function _c(e){return e.every(t=>typeof t=="string")}function Gn(e){return typeof e=="function"}function Sc(e){return typeof e=="object"}function jc(e){return typeof e=="object"&&!Array.isArray(e)}w();w();function yt(e={},t=()=>!0){let n={};return sn(e).forEach(r=>{t(r,e[r])&&(n[r]=e[r])}),n}w();function wt(e){typeof process!="undefined"&&[process.stdout,process.stderr].forEach(t=>{let n=t;n._handle&&n.isTTY&&typeof n._handle.setBlocking=="function"&&n._handle.setBlocking(e)})}function Mc(e){return typeof e=="boolean"}function yo(e,t){let n=t.y18n.__,r={},i=[];r.failFn=function(j){i.push(j)};let s=null,o=!0;r.showHelpOnFail=function(j=!0,B){function K(){return typeof j=="string"?[!0,j]:[j,B]}let[ne,pe]=K();return s=pe,o=ne,r};let a=!1;r.fail=function(j,B){let K=e.getInternalMethods().getLoggerInstance();if(i.length)for(let ne=i.length-1;ne>=0;--ne){let pe=i[ne];if(Mc(pe)){if(B)throw B;if(j)throw Error(j)}else pe(j,B,r)}else{if(e.getExitProcess()&&wt(!0),a||(a=!0,o&&(e.showHelp("error"),K.error()),(j||B)&&K.error(j||B),s&&((j||B)&&K.error(""),K.error(s))),B=B||new re(j),e.getExitProcess())return e.exit(1);if(e.getInternalMethods().hasParseCallback())return e.exit(1,B);throw B}};let l=[],f=!1;r.usage=(I,j)=>I===null?(f=!0,l=[],r):(f=!1,l.push([I,j||""]),r),r.getUsage=()=>l,r.getUsageDisabled=()=>f,r.getPositionalGroupName=()=>n("Positionals:");let u=[];r.example=(I,j)=>{u.push([I,j||""])};let c=[];r.command=function(j,B,K,ne,pe=!1){K&&(c=c.map(ee=>(ee[2]=!1,ee))),c.push([j,B||"",K,ne,pe])},r.getCommands=()=>c;let d={};r.describe=function(j,B){Array.isArray(j)?j.forEach(K=>{r.describe(K,B)}):typeof j=="object"?Object.keys(j).forEach(K=>{r.describe(K,j[K])}):d[j]=B},r.getDescriptions=()=>d;let p=[];r.epilog=I=>{p.push(I)};let b=!1,g;r.wrap=I=>{b=!0,g=I};function m(){return b||(g=J(),b=!0),g}let C="__yargsString__:";r.deferY18nLookup=I=>C+I,r.help=function(){if(V)return V;W();let j=e.customScriptName?e.$0:t.path.basename(e.$0),B=e.getDemandedOptions(),K=e.getDemandedCommands(),ne=e.getDeprecatedOptions(),pe=e.getGroups(),ee=e.getOptions(),Ee=[];Ee=Ee.concat(Object.keys(d)),Ee=Ee.concat(Object.keys(B)),Ee=Ee.concat(Object.keys(K)),Ee=Ee.concat(Object.keys(ee.default)),Ee=Ee.filter(G),Ee=Object.keys(Ee.reduce((H,oe)=>(oe!=="_"&&(H[oe]=!0),H),{}));let Ut=m(),ae=t.cliui({width:Ut,wrap:!!Ut});if(!f){if(l.length)l.forEach(H=>{ae.div({text:`${H[0].replace(/\$0/g,j)}`}),H[1]&&ae.div({text:`${H[1]}`,padding:[1,0,0,0]})}),ae.div();else if(c.length){let H=null;K._?H=`${j} <${n("command")}>
|
11
|
+
`),i+=e.charAt(s);return n&&r&&(i=`${n}${i}${r}`),i}function Lr(e){return qi(e,{stringWidth:t=>[...t].length,stripAnsi:Fr,wrap:Gi})}w();import{dirname as zi,resolve as Vi}from"path";import{readdirSync as Vl,statSync as Kl}from"fs";function Ki(e,t){let n=Vi(".",e),r;for(Kl(n).isDirectory()||(n=zi(n));;){if(r=t(n,Vl(n)),r)return Vi(n,r);if(n=zi(r=n),r===n)break}}import{inspect as pc}from"util";import{readFileSync as mc}from"fs";import{fileURLToPath as gc}from"url";w();import{format as Xl}from"util";import{normalize as Zl,resolve as ec}from"path";w();function Wt(e){if(e!==e.toLowerCase()&&e!==e.toUpperCase()||(e=e.toLowerCase()),e.indexOf("-")===-1&&e.indexOf("_")===-1)return e;{let n="",r=!1,i=e.match(/^-+/);for(let s=i?i[0].length:0;s<e.length;s++){let o=e.charAt(s);r&&(r=!1,o=o.toUpperCase()),s!==0&&(o==="-"||o==="_")?r=!0:o!=="-"&&o!=="_"&&(n+=o)}return n}}function Hn(e,t){let n=e.toLowerCase();t=t||"-";let r="";for(let i=0;i<e.length;i++){let s=n.charAt(i),o=e.charAt(i);s!==o&&i>0?r+=`${t}${n.charAt(i)}`:r+=o}return r}function qn(e){return e==null?!1:typeof e=="number"||/^0x[0-9a-f]+$/i.test(e)?!0:/^0[^.]/.test(e)?!1:/^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(e)}w();w();function Qi(e){if(Array.isArray(e))return e.map(o=>typeof o!="string"?o+"":o);e=e.trim();let t=0,n=null,r=null,i=null,s=[];for(let o=0;o<e.length;o++){if(n=r,r=e.charAt(o),r===" "&&!i){n!==" "&&t++;continue}r===i?i=null:(r==="'"||r==='"')&&!i&&(i=r),s[t]||(s[t]=""),s[t]+=r}return s}w();var ze;(function(e){e.BOOLEAN="boolean",e.STRING="string",e.NUMBER="number",e.ARRAY="array"})(ze||(ze={}));var dt,Tr=class{constructor(t){dt=t}parse(t,n){let r=Object.assign({alias:void 0,array:void 0,boolean:void 0,config:void 0,configObjects:void 0,configuration:void 0,coerce:void 0,count:void 0,default:void 0,envPrefix:void 0,narg:void 0,normalize:void 0,string:void 0,number:void 0,__:void 0,key:void 0},n),i=Qi(t),s=typeof t=="string",o=Ql(Object.assign(Object.create(null),r.alias)),a=Object.assign({"boolean-negation":!0,"camel-case-expansion":!0,"combine-arrays":!1,"dot-notation":!0,"duplicate-arguments-array":!0,"flatten-duplicate-arrays":!0,"greedy-arrays":!0,"halt-at-non-option":!1,"nargs-eats-options":!1,"negation-prefix":"no-","parse-numbers":!0,"parse-positional-numbers":!0,"populate--":!1,"set-placeholder-key":!1,"short-option-groups":!0,"strip-aliased":!1,"strip-dashed":!1,"unknown-options-as-args":!1},r.configuration),l=Object.assign(Object.create(null),r.default),f=r.configObjects||[],u=r.envPrefix,c=a["populate--"],d=c?"--":"_",p=Object.create(null),b=Object.create(null),g=r.__||dt.format,m={aliases:Object.create(null),arrays:Object.create(null),bools:Object.create(null),strings:Object.create(null),numbers:Object.create(null),counts:Object.create(null),normalize:Object.create(null),configs:Object.create(null),nargs:Object.create(null),coercions:Object.create(null),keys:[]},C=/^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/,_=new RegExp("^--"+a["negation-prefix"]+"(.+)");[].concat(r.array||[]).filter(Boolean).forEach(function(y){let x=typeof y=="object"?y.key:y,S=Object.keys(y).map(function(v){return{boolean:"bools",string:"strings",number:"numbers"}[v]}).filter(Boolean).pop();S&&(m[S][x]=!0),m.arrays[x]=!0,m.keys.push(x)}),[].concat(r.boolean||[]).filter(Boolean).forEach(function(y){m.bools[y]=!0,m.keys.push(y)}),[].concat(r.string||[]).filter(Boolean).forEach(function(y){m.strings[y]=!0,m.keys.push(y)}),[].concat(r.number||[]).filter(Boolean).forEach(function(y){m.numbers[y]=!0,m.keys.push(y)}),[].concat(r.count||[]).filter(Boolean).forEach(function(y){m.counts[y]=!0,m.keys.push(y)}),[].concat(r.normalize||[]).filter(Boolean).forEach(function(y){m.normalize[y]=!0,m.keys.push(y)}),typeof r.narg=="object"&&Object.entries(r.narg).forEach(([y,x])=>{typeof x=="number"&&(m.nargs[y]=x,m.keys.push(y))}),typeof r.coerce=="object"&&Object.entries(r.coerce).forEach(([y,x])=>{typeof x=="function"&&(m.coercions[y]=x,m.keys.push(y))}),typeof r.config!="undefined"&&(Array.isArray(r.config)||typeof r.config=="string"?[].concat(r.config).filter(Boolean).forEach(function(y){m.configs[y]=!0}):typeof r.config=="object"&&Object.entries(r.config).forEach(([y,x])=>{(typeof x=="boolean"||typeof x=="function")&&(m.configs[y]=x)})),$t(r.key,o,r.default,m.arrays),Object.keys(l).forEach(function(y){(m.aliases[y]||[]).forEach(function(x){l[x]=l[y]})});let B=null;$n();let q=[],X=Object.assign(Object.create(null),{_:[]}),z={};for(let y=0;y<i.length;y++){let x=i[y],S=x.replace(/^-{3,}/,"---"),v,A,D,M,$,je;if(x!=="--"&&le(x))U(x);else if(S.match(/---+(=|$)/)){U(x);continue}else if(x.match(/^--.+=/)||!a["short-option-groups"]&&x.match(/^-.+=/))M=x.match(/^--?([^=]+)=([\s\S]*)$/),M!==null&&Array.isArray(M)&&M.length>=3&&(Y(M[1],m.arrays)?y=te(y,M[1],i,M[2]):Y(M[1],m.nargs)!==!1?y=J(y,M[1],i,M[2]):V(M[1],M[2],!0));else if(x.match(_)&&a["boolean-negation"])M=x.match(_),M!==null&&Array.isArray(M)&&M.length>=2&&(A=M[1],V(A,Y(A,m.arrays)?[!1]:!1));else if(x.match(/^--.+/)||!a["short-option-groups"]&&x.match(/^-[^-]+/))M=x.match(/^--?(.+)/),M!==null&&Array.isArray(M)&&M.length>=2&&(A=M[1],Y(A,m.arrays)?y=te(y,A,i):Y(A,m.nargs)!==!1?y=J(y,A,i):($=i[y+1],$!==void 0&&(!$.match(/^-/)||$.match(C))&&!Y(A,m.bools)&&!Y(A,m.counts)||/^(true|false)$/.test($)?(V(A,$),y++):V(A,ce(A))));else if(x.match(/^-.\..+=/))M=x.match(/^-([^=]+)=([\s\S]*)$/),M!==null&&Array.isArray(M)&&M.length>=3&&V(M[1],M[2]);else if(x.match(/^-.\..+/)&&!x.match(C))$=i[y+1],M=x.match(/^-(.\..+)/),M!==null&&Array.isArray(M)&&M.length>=2&&(A=M[1],$!==void 0&&!$.match(/^-/)&&!Y(A,m.bools)&&!Y(A,m.counts)?(V(A,$),y++):V(A,ce(A)));else if(x.match(/^-[^-]+/)&&!x.match(C)){D=x.slice(1,-1).split(""),v=!1;for(let De=0;De<D.length;De++){if($=x.slice(De+2),D[De+1]&&D[De+1]==="="){je=x.slice(De+3),A=D[De],Y(A,m.arrays)?y=te(y,A,i,je):Y(A,m.nargs)!==!1?y=J(y,A,i,je):V(A,je),v=!0;break}if($==="-"){V(D[De],$);continue}if(/[A-Za-z]/.test(D[De])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test($)&&Y($,m.bools)===!1){V(D[De],$),v=!0;break}if(D[De+1]&&D[De+1].match(/\W/)){V(D[De],$),v=!0;break}else V(D[De],ce(D[De]))}A=x.slice(-1)[0],!v&&A!=="-"&&(Y(A,m.arrays)?y=te(y,A,i):Y(A,m.nargs)!==!1?y=J(y,A,i):($=i[y+1],$!==void 0&&(!/^(-|--)[^-]/.test($)||$.match(C))&&!Y(A,m.bools)&&!Y(A,m.counts)||/^(true|false)$/.test($)?(V(A,$),y++):V(A,ce(A))))}else if(x.match(/^-[0-9]$/)&&x.match(C)&&Y(x.slice(1),m.bools))A=x.slice(1),V(A,ce(A));else if(x==="--"){q=i.slice(y+1);break}else if(a["halt-at-non-option"]){q=i.slice(y);break}else U(x)}ee(X,!0),ee(X,!1),K(X),pe(),ae(X,m.aliases,l,!0),Ee(X),a["set-placeholder-key"]&&Ut(X),Object.keys(m.counts).forEach(function(y){ft(X,y.split("."))||V(y,0)}),c&&q.length&&(X[d]=[]),q.forEach(function(y){X[d].push(y)}),a["camel-case-expansion"]&&a["strip-dashed"]&&Object.keys(X).filter(y=>y!=="--"&&y.includes("-")).forEach(y=>{delete X[y]}),a["strip-aliased"]&&[].concat(...Object.keys(o).map(y=>o[y])).forEach(y=>{a["camel-case-expansion"]&&y.includes("-")&&delete X[y.split(".").map(x=>Wt(x)).join(".")],delete X[y]});function U(y){let x=F("_",y);(typeof x=="string"||typeof x=="number")&&X._.push(x)}function J(y,x,S,v){let A,D=Y(x,m.nargs);if(D=typeof D!="number"||isNaN(D)?1:D,D===0)return et(v)||(B=Error(g("Argument unexpected for: %s",x))),V(x,ce(x)),y;let M=et(v)?0:1;if(a["nargs-eats-options"])S.length-(y+1)+M<D&&(B=Error(g("Not enough arguments following: %s",x))),M=D;else{for(A=y+1;A<S.length&&(!S[A].match(/^-[^0-9]/)||S[A].match(C)||le(S[A]));A++)M++;M<D&&(B=Error(g("Not enough arguments following: %s",x)))}let $=Math.min(M,D);for(!et(v)&&$>0&&(V(x,v),$--),A=y+1;A<$+y+1;A++)V(x,S[A]);return y+$}function te(y,x,S,v){let A=[],D=v||S[y+1],M=Y(x,m.nargs);if(Y(x,m.bools)&&!/^(true|false)$/.test(D))A.push(!0);else if(et(D)||et(v)&&/^-/.test(D)&&!C.test(D)&&!le(D)){if(l[x]!==void 0){let $=l[x];A=Array.isArray($)?$:[$]}}else{et(v)||A.push(j(x,v,!0));for(let $=y+1;$<S.length&&!(!a["greedy-arrays"]&&A.length>0||M&&typeof M=="number"&&A.length>=M||(D=S[$],/^-/.test(D)&&!C.test(D)&&!le(D)));$++)y=$,A.push(j(x,D,s))}return typeof M=="number"&&(M&&A.length<M||isNaN(M)&&A.length===0)&&(B=Error(g("Not enough arguments following: %s",x))),V(x,A),y}function V(y,x,S=s){if(/-/.test(y)&&a["camel-case-expansion"]){let D=y.split(".").map(function(M){return Wt(M)}).join(".");I(y,D)}let v=j(y,x,S),A=y.split(".");ut(X,A,v),m.aliases[y]&&m.aliases[y].forEach(function(D){let M=D.split(".");ut(X,M,v)}),A.length>1&&a["dot-notation"]&&(m.aliases[A[0]]||[]).forEach(function(D){let M=D.split("."),$=[].concat(A);$.shift(),M=M.concat($),(m.aliases[y]||[]).includes(M.join("."))||ut(X,M,v)}),Y(y,m.normalize)&&!Y(y,m.arrays)&&[y].concat(m.aliases[y]||[]).forEach(function(M){Object.defineProperty(z,M,{enumerable:!0,get(){return x},set($){x=typeof $=="string"?dt.normalize($):$}})})}function I(y,x){m.aliases[y]&&m.aliases[y].length||(m.aliases[y]=[x],p[x]=!0),m.aliases[x]&&m.aliases[x].length||I(x,y)}function j(y,x,S){S&&(x=Jl(x)),(Y(y,m.bools)||Y(y,m.counts))&&typeof x=="string"&&(x=x==="true");let v=Array.isArray(x)?x.map(function(A){return F(y,A)}):F(y,x);return Y(y,m.counts)&&(et(v)||typeof v=="boolean")&&(v=Dr()),Y(y,m.normalize)&&Y(y,m.arrays)&&(Array.isArray(x)?v=x.map(A=>dt.normalize(A)):v=dt.normalize(x)),v}function F(y,x){return!a["parse-positional-numbers"]&&y==="_"||!Y(y,m.strings)&&!Y(y,m.bools)&&!Array.isArray(x)&&(qn(x)&&a["parse-numbers"]&&Number.isSafeInteger(Math.floor(parseFloat(`${x}`)))||!et(x)&&Y(y,m.numbers))&&(x=Number(x)),x}function K(y){let x=Object.create(null);ae(x,m.aliases,l),Object.keys(m.configs).forEach(function(S){let v=y[S]||x[S];if(v)try{let A=null,D=dt.resolve(dt.cwd(),v),M=m.configs[S];if(typeof M=="function"){try{A=M(D)}catch($){A=$}if(A instanceof Error){B=A;return}}else A=dt.require(D);ne(A)}catch(A){A.name==="PermissionDenied"?B=A:y[S]&&(B=Error(g("Invalid JSON config file: %s",v)))}})}function ne(y,x){Object.keys(y).forEach(function(S){let v=y[S],A=x?x+"."+S:S;typeof v=="object"&&v!==null&&!Array.isArray(v)&&a["dot-notation"]?ne(v,A):(!ft(X,A.split("."))||Y(A,m.arrays)&&a["combine-arrays"])&&V(A,v)})}function pe(){typeof f!="undefined"&&f.forEach(function(y){ne(y)})}function ee(y,x){if(typeof u=="undefined")return;let S=typeof u=="string"?u:"",v=dt.env();Object.keys(v).forEach(function(A){if(S===""||A.lastIndexOf(S,0)===0){let D=A.split("__").map(function(M,$){return $===0&&(M=M.substring(S.length)),Wt(M)});(x&&m.configs[D.join(".")]||!x)&&!ft(y,D)&&V(D.join("."),v[A])}})}function Ee(y){let x,S=new Set;Object.keys(y).forEach(function(v){if(!S.has(v)&&(x=Y(v,m.coercions),typeof x=="function"))try{let A=F(v,x(y[v]));[].concat(m.aliases[v]||[],v).forEach(D=>{S.add(D),y[D]=A})}catch(A){B=A}})}function Ut(y){return m.keys.forEach(x=>{~x.indexOf(".")||typeof y[x]=="undefined"&&(y[x]=void 0)}),y}function ae(y,x,S,v=!1){Object.keys(S).forEach(function(A){ft(y,A.split("."))||(ut(y,A.split("."),S[A]),v&&(b[A]=!0),(x[A]||[]).forEach(function(D){ft(y,D.split("."))||ut(y,D.split("."),S[A])}))})}function ft(y,x){let S=y;a["dot-notation"]||(x=[x.join(".")]),x.slice(0,-1).forEach(function(A){S=S[A]||{}});let v=x[x.length-1];return typeof S!="object"?!1:v in S}function ut(y,x,S){let v=y;a["dot-notation"]||(x=[x.join(".")]),x.slice(0,-1).forEach(function(je){je=Ji(je),typeof v=="object"&&v[je]===void 0&&(v[je]={}),typeof v[je]!="object"||Array.isArray(v[je])?(Array.isArray(v[je])?v[je].push({}):v[je]=[v[je],{}],v=v[je][v[je].length-1]):v=v[je]});let A=Ji(x[x.length-1]),D=Y(x.join("."),m.arrays),M=Array.isArray(S),$=a["duplicate-arguments-array"];!$&&Y(A,m.nargs)&&($=!0,(!et(v[A])&&m.nargs[A]===1||Array.isArray(v[A])&&v[A].length===m.nargs[A])&&(v[A]=void 0)),S===Dr()?v[A]=Dr(v[A]):Array.isArray(v[A])?$&&D&&M?v[A]=a["flatten-duplicate-arrays"]?v[A].concat(S):(Array.isArray(v[A][0])?v[A]:[v[A]]).concat([S]):!$&&Boolean(D)===Boolean(M)?v[A]=S:v[A]=v[A].concat([S]):v[A]===void 0&&D?v[A]=M?S:[S]:$&&!(v[A]===void 0||Y(A,m.counts)||Y(A,m.bools))?v[A]=[v[A],S]:v[A]=S}function $t(...y){y.forEach(function(x){Object.keys(x||{}).forEach(function(S){m.aliases[S]||(m.aliases[S]=[].concat(o[S]||[]),m.aliases[S].concat(S).forEach(function(v){if(/-/.test(v)&&a["camel-case-expansion"]){let A=Wt(v);A!==S&&m.aliases[S].indexOf(A)===-1&&(m.aliases[S].push(A),p[A]=!0)}}),m.aliases[S].concat(S).forEach(function(v){if(v.length>1&&/[A-Z]/.test(v)&&a["camel-case-expansion"]){let A=Hn(v,"-");A!==S&&m.aliases[S].indexOf(A)===-1&&(m.aliases[S].push(A),p[A]=!0)}}),m.aliases[S].forEach(function(v){m.aliases[v]=[S].concat(m.aliases[S].filter(function(A){return v!==A}))}))})})}function Y(y,x){let S=[].concat(m.aliases[y]||[],y),v=Object.keys(x),A=S.find(D=>v.includes(D));return A?x[A]:!1}function Pr(y){let x=Object.keys(m);return[].concat(x.map(v=>m[v])).some(function(v){return Array.isArray(v)?v.includes(y):v[y]})}function H(y,...x){return[].concat(...x).some(function(v){let A=y.match(v);return A&&Pr(A[1])})}function oe(y){if(y.match(C)||!y.match(/^-[^-]+/))return!1;let x=!0,S,v=y.slice(1).split("");for(let A=0;A<v.length;A++){if(S=y.slice(A+2),!Pr(v[A])){x=!1;break}if(v[A+1]&&v[A+1]==="="||S==="-"||/[A-Za-z]/.test(v[A])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(S)||v[A+1]&&v[A+1].match(/\W/))break}return x}function le(y){return a["unknown-options-as-args"]&&Z(y)}function Z(y){return y=y.replace(/^-{3,}/,"--"),y.match(C)||oe(y)?!1:!H(y,/^-+([^=]+?)=[\s\S]*$/,_,/^-+([^=]+?)$/,/^-+([^=]+?)-$/,/^-+([^=]+?\d+)$/,/^-+([^=]+?)\W+.*$/)}function ce(y){return!Y(y,m.bools)&&!Y(y,m.counts)&&`${y}`in l?l[y]:me(Ze(y))}function me(y){return{[ze.BOOLEAN]:!0,[ze.STRING]:"",[ze.NUMBER]:void 0,[ze.ARRAY]:[]}[y]}function Ze(y){let x=ze.BOOLEAN;return Y(y,m.strings)?x=ze.STRING:Y(y,m.numbers)?x=ze.NUMBER:Y(y,m.bools)?x=ze.BOOLEAN:Y(y,m.arrays)&&(x=ze.ARRAY),x}function et(y){return y===void 0}function $n(){Object.keys(m.counts).find(y=>Y(y,m.arrays)?(B=Error(g("Invalid configuration: %s, opts.count excludes opts.array.",y)),!0):Y(y,m.nargs)?(B=Error(g("Invalid configuration: %s, opts.count excludes opts.narg.",y)),!0):!1)}return{aliases:Object.assign({},m.aliases),argv:Object.assign(z,X),configuration:a,defaulted:Object.assign({},b),error:B,newAliases:Object.assign({},p)}}};function Ql(e){let t=[],n=Object.create(null),r=!0;for(Object.keys(e).forEach(function(i){t.push([].concat(e[i],i))});r;){r=!1;for(let i=0;i<t.length;i++)for(let s=i+1;s<t.length;s++)if(t[i].filter(function(a){return t[s].indexOf(a)!==-1}).length){t[i]=t[i].concat(t[s]),t.splice(s,1),r=!0;break}}return t.forEach(function(i){i=i.filter(function(o,a,l){return l.indexOf(o)===a});let s=i.pop();s!==void 0&&typeof s=="string"&&(n[s]=i)}),n}function Dr(e){return e!==void 0?e+1:1}function Ji(e){return e==="__proto__"?"___proto___":e}function Jl(e){return typeof e=="string"&&(e[0]==="'"||e[0]==='"')&&e[e.length-1]===e[0]?e.substring(1,e.length-1):e}import{readFileSync as tc}from"fs";var Xi=process&&process.env&&process.env.YARGS_MIN_NODE_VERSION?Number(process.env.YARGS_MIN_NODE_VERSION):12;if(process&&process.version&&Number(process.version.match(/v([^.]+)/)[1])<Xi)throw Error(`yargs parser supports a minimum Node.js version of ${Xi}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);var nc=process?process.env:{},Zi=new Tr({cwd:process.cwd,env:()=>nc,format:Xl,normalize:Zl,resolve:ec,require:e=>{if(typeof _e!="undefined")return _e(e);if(e.match(/\.json$/))return JSON.parse(tc(e,"utf8"));throw Error("only .json config files are supported in ESM")}}),On=function(t,n){return Zi.parse(t.slice(),n).argv};On.detailed=function(e,t){return Zi.parse(e.slice(),t)};On.camelCase=Wt;On.decamelize=Hn;On.looksLikeNumber=qn;var eo=On;import{basename as bc,dirname as yc,extname as wc,relative as Ac,resolve as so}from"path";w();function rc(){return ic()?0:1}function ic(){return oc()&&!process.defaultApp}function oc(){return!!process.versions.electron}function to(){return process.argv[rc()]}w();var re=class extends Error{constructor(t){super(t||"yargs error");this.name="YError",Error.captureStackTrace(this,re)}};w();w();import{readFileSync as sc,statSync as ac,writeFile as lc}from"fs";import{format as cc}from"util";import{resolve as fc}from"path";var no={fs:{readFileSync:sc,writeFile:lc},format:cc,resolve:fc,exists:e=>{try{return ac(e).isFile()}catch(t){return!1}}};w();var nt,ro=class{constructor(t){t=t||{},this.directory=t.directory||"./locales",this.updateFiles=typeof t.updateFiles=="boolean"?t.updateFiles:!0,this.locale=t.locale||"en",this.fallbackToLanguage=typeof t.fallbackToLanguage=="boolean"?t.fallbackToLanguage:!0,this.cache=Object.create(null),this.writeQueue=[]}__(...t){if(typeof arguments[0]!="string")return this._taggedLiteral(arguments[0],...arguments);let n=t.shift(),r=function(){};return typeof t[t.length-1]=="function"&&(r=t.pop()),r=r||function(){},this.cache[this.locale]||this._readLocaleFile(),!this.cache[this.locale][n]&&this.updateFiles?(this.cache[this.locale][n]=n,this._enqueueWrite({directory:this.directory,locale:this.locale,cb:r})):r(),nt.format.apply(nt.format,[this.cache[this.locale][n]||n].concat(t))}__n(){let t=Array.prototype.slice.call(arguments),n=t.shift(),r=t.shift(),i=t.shift(),s=function(){};typeof t[t.length-1]=="function"&&(s=t.pop()),this.cache[this.locale]||this._readLocaleFile();let o=i===1?n:r;this.cache[this.locale][n]&&(o=this.cache[this.locale][n][i===1?"one":"other"]),!this.cache[this.locale][n]&&this.updateFiles?(this.cache[this.locale][n]={one:n,other:r},this._enqueueWrite({directory:this.directory,locale:this.locale,cb:s})):s();let a=[o];return~o.indexOf("%d")&&a.push(i),nt.format.apply(nt.format,a.concat(t))}setLocale(t){this.locale=t}getLocale(){return this.locale}updateLocale(t){this.cache[this.locale]||this._readLocaleFile();for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(this.cache[this.locale][n]=t[n])}_taggedLiteral(t,...n){let r="";return t.forEach(function(i,s){let o=n[s+1];r+=i,typeof o!="undefined"&&(r+="%s")}),this.__.apply(this,[r].concat([].slice.call(n,1)))}_enqueueWrite(t){this.writeQueue.push(t),this.writeQueue.length===1&&this._processWriteQueue()}_processWriteQueue(){let t=this,n=this.writeQueue[0],r=n.directory,i=n.locale,s=n.cb,o=this._resolveLocaleFile(r,i),a=JSON.stringify(this.cache[i],null,2);nt.fs.writeFile(o,a,"utf-8",function(l){t.writeQueue.shift(),t.writeQueue.length>0&&t._processWriteQueue(),s(l)})}_readLocaleFile(){let t={},n=this._resolveLocaleFile(this.directory,this.locale);try{nt.fs.readFileSync&&(t=JSON.parse(nt.fs.readFileSync(n,"utf-8")))}catch(r){if(r instanceof SyntaxError&&(r.message="syntax error in "+n),r.code==="ENOENT")t={};else throw r}this.cache[this.locale]=t}_resolveLocaleFile(t,n){let r=nt.resolve(t,"./",n+".json");if(this.fallbackToLanguage&&!this._fileExistsSync(r)&&~n.lastIndexOf("_")){let i=nt.resolve(t,"./",n.split("_")[0]+".json");this._fileExistsSync(i)&&(r=i)}return r}_fileExistsSync(t){return nt.exists(t)}};function io(e,t){nt=t;let n=new ro(e);return{__:n.__.bind(n),__n:n.__n.bind(n),setLocale:n.setLocale.bind(n),getLocale:n.getLocale.bind(n),updateLocale:n.updateLocale.bind(n),locale:n.locale}}var uc=e=>io(e,no),oo=uc;var Cc={},xc="require is not supported by ESM",ao="loading a directory of commands is not supported yet for ESM",Yn;try{Yn=gc(Cc.url)}catch(e){Yn=process.cwd()}var vc=Yn.split("node_modules")[0],lo={assert:{notStrictEqual:dc,strictEqual:hc},cliui:Lr,findUp:Ki,getEnv:e=>process.env[e],inspect:pc,getCallerFile:()=>{throw new re(ao)},getProcessArgvBin:to,mainFilename:vc||process.cwd(),Parser:eo,path:{basename:bc,dirname:yc,extname:wc,relative:Ac,resolve:so},process:{argv:()=>process.argv,cwd:process.cwd,emitWarning:(e,t)=>process.emitWarning(e,t),execPath:()=>process.execPath,exit:process.exit,nextTick:process.nextTick,stdColumns:typeof process.stdout.columns!="undefined"?process.stdout.columns:null},readFileSync:mc,require:()=>{throw new re(xc)},requireDirectory:()=>{throw new re(ao)},stringWidth:e=>[...e].length,y18n:oo({directory:so(Yn,"../../../locales"),updateFiles:!1})};w();w();w();function Te(e,t,n,r){n.assert.notStrictEqual(e,t,r)}function Nr(e,t){t.assert.strictEqual(typeof e,"string")}function sn(e){return Object.keys(e)}w();function se(e){return!!e&&!!e.then&&typeof e.then=="function"}w();w();w();function bt(e){let n=e.replace(/\s{2,}/g," ").split(/\s+(?![^[]*]|[^<]*>)/),r=/\.*[\][<>]/g,i=n.shift();if(!i)throw new Error(`No command found in: ${e}`);let s={cmd:i.replace(r,""),demanded:[],optional:[]};return n.forEach((o,a)=>{let l=!1;o=o.replace(/\s/g,""),/\.+[\]>]/.test(o)&&a===n.length-1&&(l=!0),/^\[/.test(o)?s.optional.push({cmd:o.replace(r,"").split("|"),variadic:l}):s.demanded.push({cmd:o.replace(r,"").split("|"),variadic:l})}),s}var Oc=["first","second","third","fourth","fifth","sixth"];function P(e,t,n){function r(){return typeof e=="object"?[{demanded:[],optional:[]},e,t]:[bt(`cmd ${e}`),t,n]}try{let i=0,[s,o,a]=r(),l=[].slice.call(o);for(;l.length&&l[l.length-1]===void 0;)l.pop();let f=a||l.length;if(f<s.demanded.length)throw new re(`Not enough arguments provided. Expected ${s.demanded.length} but received ${l.length}.`);let u=s.demanded.length+s.optional.length;if(f>u)throw new re(`Too many arguments provided. Expected max ${u} but received ${f}.`);s.demanded.forEach(c=>{let d=l.shift(),p=co(d);c.cmd.filter(g=>g===p||g==="*").length===0&&fo(p,c.cmd,i),i+=1}),s.optional.forEach(c=>{if(l.length===0)return;let d=l.shift(),p=co(d);c.cmd.filter(g=>g===p||g==="*").length===0&&fo(p,c.cmd,i),i+=1})}catch(i){console.warn(i.stack)}}function co(e){return Array.isArray(e)?"array":e===null?"null":typeof e}function fo(e,t,n){throw new re(`Invalid ${Oc[n]||"manyith"} argument. Expected ${t.join(" or ")} but received ${e}.`)}var kr=class{constructor(t){this.globalMiddleware=[],this.frozens=[],this.yargs=t}addMiddleware(t,n,r=!0,i=!1){if(P("<array|function> [boolean] [boolean] [boolean]",[t,n,r],arguments.length),Array.isArray(t)){for(let s=0;s<t.length;s++){if(typeof t[s]!="function")throw Error("middleware must be a function");let o=t[s];o.applyBeforeValidation=n,o.global=r}Array.prototype.push.apply(this.globalMiddleware,t)}else if(typeof t=="function"){let s=t;s.applyBeforeValidation=n,s.global=r,s.mutates=i,this.globalMiddleware.push(t)}return this.yargs}addCoerceMiddleware(t,n){let r=this.yargs.getAliases();return this.globalMiddleware=this.globalMiddleware.filter(i=>{let s=[...r[n]||[],n];return i.option?!s.includes(i.option):!0}),t.option=n,this.addMiddleware(t,!0,!0,!0)}getMiddleware(){return this.globalMiddleware}freeze(){this.frozens.push([...this.globalMiddleware])}unfreeze(){let t=this.frozens.pop();t!==void 0&&(this.globalMiddleware=t)}reset(){this.globalMiddleware=this.globalMiddleware.filter(t=>t.global)}};function uo(e){return e?e.map(t=>(t.applyBeforeValidation=!1,t)):[]}function Bt(e,t,n,r){return n.reduce((i,s)=>{if(s.applyBeforeValidation!==r)return i;if(s.mutates){if(s.applied)return i;s.applied=!0}if(se(i))return i.then(o=>Promise.all([o,s(o,t)])).then(([o,a])=>Object.assign(o,a));{let o=s(i,t);return se(o)?o.then(a=>Object.assign(i,a)):Object.assign(i,o)}},e)}w();function Ht(e,t,n=r=>{throw r}){try{let r=Ec(e)?e():e;return se(r)?r.then(i=>t(i)):t(r)}catch(r){return n(r)}}function Ec(e){return typeof e=="function"}w();function Rr(e){if(typeof _e=="undefined")return null;for(let t=0,n=Object.keys(_e.cache),r;t<n.length;t++)if(r=_e.cache[n[t]],r.exports===e)return r;return null}var an=/(^\*)|(^\$0)/,po=class{constructor(t,n,r,i){this.requireCache=new Set,this.handlers={},this.aliasMap={},this.frozens=[],this.shim=i,this.usage=t,this.globalMiddleware=r,this.validation=n}addDirectory(t,n,r,i){i=i||{},typeof i.recurse!="boolean"&&(i.recurse=!1),Array.isArray(i.extensions)||(i.extensions=["js"]);let s=typeof i.visit=="function"?i.visit:o=>o;i.visit=(o,a,l)=>{let f=s(o,a,l);if(f){if(this.requireCache.has(a))return f;this.requireCache.add(a),this.addHandler(f)}return f},this.shim.requireDirectory({require:n,filename:r},t,i)}addHandler(t,n,r,i,s,o){let a=[],l=uo(s);if(i=i||(()=>{}),Array.isArray(t))if(_c(t))[t,...a]=t;else for(let f of t)this.addHandler(f);else if(jc(t)){let f=Array.isArray(t.command)||typeof t.command=="string"?t.command:this.moduleName(t);t.aliases&&(f=[].concat(f).concat(t.aliases)),this.addHandler(f,this.extractDesc(t),t.builder,t.handler,t.middlewares,t.deprecated);return}else if(ho(r)){this.addHandler([t].concat(a),n,r.builder,r.handler,r.middlewares,r.deprecated);return}if(typeof t=="string"){let f=bt(t);a=a.map(d=>bt(d).cmd);let u=!1,c=[f.cmd].concat(a).filter(d=>an.test(d)?(u=!0,!1):!0);c.length===0&&u&&c.push("$0"),u&&(f.cmd=c[0],a=c.slice(1),t=t.replace(an,f.cmd)),a.forEach(d=>{this.aliasMap[d]=f.cmd}),n!==!1&&this.usage.command(t,n,u,a,o),this.handlers[f.cmd]={original:t,description:n,handler:i,builder:r||{},middlewares:l,deprecated:o,demanded:f.demanded,optional:f.optional},u&&(this.defaultCommand=this.handlers[f.cmd])}}getCommandHandlers(){return this.handlers}getCommands(){return Object.keys(this.handlers).concat(Object.keys(this.aliasMap))}hasDefaultCommand(){return!!this.defaultCommand}runCommand(t,n,r,i,s,o){let a=this.handlers[t]||this.handlers[this.aliasMap[t]]||this.defaultCommand,l=n.getInternalMethods().getContext(),f=l.commands.slice(),u=!t;t&&(l.commands.push(t),l.fullCommands.push(a.original));let c=this.applyBuilderUpdateUsageAndParse(u,a,n,r.aliases,f,i,s,o);return se(c)?c.then(d=>this.applyMiddlewareAndGetResult(u,a,d.innerArgv,l,s,d.aliases,n)):this.applyMiddlewareAndGetResult(u,a,c.innerArgv,l,s,c.aliases,n)}applyBuilderUpdateUsageAndParse(t,n,r,i,s,o,a,l){let f=n.builder,u=r;if(Gn(f)){let c=f(r.getInternalMethods().reset(i),l);if(se(c))return c.then(d=>(u=go(d)?d:r,this.parseAndUpdateUsage(t,n,u,s,o,a)))}else Sc(f)&&(u=r.getInternalMethods().reset(i),Object.keys(n.builder).forEach(c=>{u.option(c,f[c])}));return this.parseAndUpdateUsage(t,n,u,s,o,a)}parseAndUpdateUsage(t,n,r,i,s,o){t&&r.getInternalMethods().getUsageInstance().unfreeze(!0),this.shouldUpdateUsage(r)&&r.getInternalMethods().getUsageInstance().usage(this.usageFromParentCommandsCommandHandler(i,n),n.description);let a=r.getInternalMethods().runYargsParserAndExecuteCommands(null,void 0,!0,s,o);return se(a)?a.then(l=>({aliases:r.parsed.aliases,innerArgv:l})):{aliases:r.parsed.aliases,innerArgv:a}}shouldUpdateUsage(t){return!t.getInternalMethods().getUsageInstance().getUsageDisabled()&&t.getInternalMethods().getUsageInstance().getUsage().length===0}usageFromParentCommandsCommandHandler(t,n){let r=an.test(n.original)?n.original.replace(an,"").trim():n.original,i=t.filter(s=>!an.test(s));return i.push(r),`$0 ${i.join(" ")}`}applyMiddlewareAndGetResult(t,n,r,i,s,o,a){let l={};if(s)return r;a.getInternalMethods().getHasOutput()||(l=this.populatePositionals(n,r,i,a));let f=this.globalMiddleware.getMiddleware().slice(0).concat(n.middlewares);if(r=Bt(r,a,f,!0),!a.getInternalMethods().getHasOutput()){let u=a.getInternalMethods().runValidation(o,l,a.parsed.error,t);r=Ht(r,c=>(u(c),c))}if(n.handler&&!a.getInternalMethods().getHasOutput()){a.getInternalMethods().setHasOutput();let u=!!a.getOptions().configuration["populate--"];a.getInternalMethods().postProcess(r,u,!1,!1),r=Bt(r,a,f,!1),r=Ht(r,c=>{let d=n.handler(c);return se(d)?d.then(()=>c):c}),t||a.getInternalMethods().getUsageInstance().cacheHelpMessage(),se(r)&&!a.getInternalMethods().hasParseCallback()&&r.catch(c=>{try{a.getInternalMethods().getUsageInstance().fail(null,c)}catch(d){}})}return t||(i.commands.pop(),i.fullCommands.pop()),r}populatePositionals(t,n,r,i){n._=n._.slice(r.commands.length);let s=t.demanded.slice(0),o=t.optional.slice(0),a={};for(this.validation.positionalCount(s.length,n._.length);s.length;){let l=s.shift();this.populatePositional(l,n,a)}for(;o.length;){let l=o.shift();this.populatePositional(l,n,a)}return n._=r.commands.concat(n._.map(l=>""+l)),this.postProcessPositionals(n,a,this.cmdToParseOptions(t.original),i),a}populatePositional(t,n,r){let i=t.cmd[0];t.variadic?r[i]=n._.splice(0).map(String):n._.length&&(r[i]=[String(n._.shift())])}cmdToParseOptions(t){let n={array:[],default:{},alias:{},demand:{}},r=bt(t);return r.demanded.forEach(i=>{let[s,...o]=i.cmd;i.variadic&&(n.array.push(s),n.default[s]=[]),n.alias[s]=o,n.demand[s]=!0}),r.optional.forEach(i=>{let[s,...o]=i.cmd;i.variadic&&(n.array.push(s),n.default[s]=[]),n.alias[s]=o}),n}postProcessPositionals(t,n,r,i){let s=Object.assign({},i.getOptions());s.default=Object.assign(r.default,s.default);for(let f of Object.keys(r.alias))s.alias[f]=(s.alias[f]||[]).concat(r.alias[f]);s.array=s.array.concat(r.array),s.config={};let o=[];if(Object.keys(n).forEach(f=>{n[f].map(u=>{s.configuration["unknown-options-as-args"]&&(s.key[f]=!0),o.push(`--${f}`),o.push(u)})}),!o.length)return;let a=Object.assign({},s.configuration,{"populate--":!1}),l=this.shim.Parser.detailed(o,Object.assign({},s,{configuration:a}));if(l.error)i.getInternalMethods().getUsageInstance().fail(l.error.message,l.error);else{let f=Object.keys(n);Object.keys(n).forEach(c=>{f.push(...l.aliases[c])});let u=i.getOptions().default;Object.keys(l.argv).forEach(c=>{f.includes(c)&&(n[c]||(n[c]=l.argv[c]),!Object.prototype.hasOwnProperty.call(u,c)&&Object.prototype.hasOwnProperty.call(t,c)&&Object.prototype.hasOwnProperty.call(l.argv,c)&&(Array.isArray(t[c])||Array.isArray(l.argv[c]))?t[c]=[].concat(t[c],l.argv[c]):t[c]=l.argv[c])})}}runDefaultBuilderOn(t){if(!this.defaultCommand)return;if(this.shouldUpdateUsage(t)){let r=an.test(this.defaultCommand.original)?this.defaultCommand.original:this.defaultCommand.original.replace(/^[^[\]<>]*/,"$0 ");t.getInternalMethods().getUsageInstance().usage(r,this.defaultCommand.description)}let n=this.defaultCommand.builder;if(Gn(n))return n(t,!0);ho(n)||Object.keys(n).forEach(r=>{t.option(r,n[r])})}moduleName(t){let n=Rr(t);if(!n)throw new Error(`No command name given for module: ${this.shim.inspect(t)}`);return this.commandFromFilename(n.filename)}commandFromFilename(t){return this.shim.path.basename(t,this.shim.path.extname(t))}extractDesc({describe:t,description:n,desc:r}){for(let i of[t,n,r]){if(typeof i=="string"||i===!1)return i;Te(i,!0,this.shim)}return!1}freeze(){this.frozens.push({handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand})}unfreeze(){let t=this.frozens.pop();Te(t,void 0,this.shim),{handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand}=t}reset(){return this.handlers={},this.aliasMap={},this.defaultCommand=void 0,this.requireCache=new Set,this}};function mo(e,t,n,r){return new po(e,t,n,r)}function ho(e){return typeof e=="object"&&!!e.builder&&typeof e.handler=="function"}function _c(e){return e.every(t=>typeof t=="string")}function Gn(e){return typeof e=="function"}function Sc(e){return typeof e=="object"}function jc(e){return typeof e=="object"&&!Array.isArray(e)}w();w();function yt(e={},t=()=>!0){let n={};return sn(e).forEach(r=>{t(r,e[r])&&(n[r]=e[r])}),n}w();function wt(e){typeof process!="undefined"&&[process.stdout,process.stderr].forEach(t=>{let n=t;n._handle&&n.isTTY&&typeof n._handle.setBlocking=="function"&&n._handle.setBlocking(e)})}function Mc(e){return typeof e=="boolean"}function yo(e,t){let n=t.y18n.__,r={},i=[];r.failFn=function(j){i.push(j)};let s=null,o=!0;r.showHelpOnFail=function(j=!0,F){function K(){return typeof j=="string"?[!0,j]:[j,F]}let[ne,pe]=K();return s=pe,o=ne,r};let a=!1;r.fail=function(j,F){let K=e.getInternalMethods().getLoggerInstance();if(i.length)for(let ne=i.length-1;ne>=0;--ne){let pe=i[ne];if(Mc(pe)){if(F)throw F;if(j)throw Error(j)}else pe(j,F,r)}else{if(e.getExitProcess()&&wt(!0),a||(a=!0,o&&(e.showHelp("error"),K.error()),(j||F)&&K.error(j||F),s&&((j||F)&&K.error(""),K.error(s))),F=F||new re(j),e.getExitProcess())return e.exit(1);if(e.getInternalMethods().hasParseCallback())return e.exit(1,F);throw F}};let l=[],f=!1;r.usage=(I,j)=>I===null?(f=!0,l=[],r):(f=!1,l.push([I,j||""]),r),r.getUsage=()=>l,r.getUsageDisabled=()=>f,r.getPositionalGroupName=()=>n("Positionals:");let u=[];r.example=(I,j)=>{u.push([I,j||""])};let c=[];r.command=function(j,F,K,ne,pe=!1){K&&(c=c.map(ee=>(ee[2]=!1,ee))),c.push([j,F||"",K,ne,pe])},r.getCommands=()=>c;let d={};r.describe=function(j,F){Array.isArray(j)?j.forEach(K=>{r.describe(K,F)}):typeof j=="object"?Object.keys(j).forEach(K=>{r.describe(K,j[K])}):d[j]=F},r.getDescriptions=()=>d;let p=[];r.epilog=I=>{p.push(I)};let b=!1,g;r.wrap=I=>{b=!0,g=I};function m(){return b||(g=J(),b=!0),g}let C="__yargsString__:";r.deferY18nLookup=I=>C+I,r.help=function(){if(q)return q;B();let j=e.customScriptName?e.$0:t.path.basename(e.$0),F=e.getDemandedOptions(),K=e.getDemandedCommands(),ne=e.getDeprecatedOptions(),pe=e.getGroups(),ee=e.getOptions(),Ee=[];Ee=Ee.concat(Object.keys(d)),Ee=Ee.concat(Object.keys(F)),Ee=Ee.concat(Object.keys(K)),Ee=Ee.concat(Object.keys(ee.default)),Ee=Ee.filter(z),Ee=Object.keys(Ee.reduce((H,oe)=>(oe!=="_"&&(H[oe]=!0),H),{}));let Ut=m(),ae=t.cliui({width:Ut,wrap:!!Ut});if(!f){if(l.length)l.forEach(H=>{ae.div({text:`${H[0].replace(/\$0/g,j)}`}),H[1]&&ae.div({text:`${H[1]}`,padding:[1,0,0,0]})}),ae.div();else if(c.length){let H=null;K._?H=`${j} <${n("command")}>
|
12
12
|
`:H=`${j} [${n("command")}]
|
13
|
-
`,ae.div(`${H}`)}}if(c.length>1||c.length===1&&!c[0][2]){ae.div(n("Commands:"));let H=e.getInternalMethods().getContext(),oe=H.commands.length?`${H.commands.join(" ")} `:"";e.getInternalMethods().getParserConfiguration()["sort-commands"]===!0&&(c=c.sort((Z,ce)=>Z[0].localeCompare(ce[0])));let le=j?`${j} `:"";c.forEach(Z=>{let ce=`${le}${oe}${Z[0].replace(/^\$0 ?/,"")}`;ae.span({text:ce,padding:[0,2,0,2],width:_(c,Ut,`${j}${oe}`)+4},{text:Z[1]});let me=[];Z[2]&&me.push(`[${n("default")}]`),Z[3]&&Z[3].length&&me.push(`[${n("aliases:")} ${Z[3].join(", ")}]`),Z[4]&&(typeof Z[4]=="string"?me.push(`[${n("deprecated: %s",Z[4])}]`):me.push(`[${n("deprecated")}]`)),me.length?ae.div({text:me.join(" "),padding:[0,0,0,2],align:"right"}):ae.div()}),ae.div()}let ft=(Object.keys(ee.alias)||[]).concat(Object.keys(e.parsed.newAliases)||[]);Ee=Ee.filter(H=>!e.parsed.newAliases[H]&&ft.every(oe=>(ee.alias[oe]||[]).indexOf(H)===-1));let ut=n("Options:");pe[ut]||(pe[ut]=[]),X(Ee,ee.alias,pe,ut);let $t=H=>/^--/.test(zn(H)),
|
13
|
+
`,ae.div(`${H}`)}}if(c.length>1||c.length===1&&!c[0][2]){ae.div(n("Commands:"));let H=e.getInternalMethods().getContext(),oe=H.commands.length?`${H.commands.join(" ")} `:"";e.getInternalMethods().getParserConfiguration()["sort-commands"]===!0&&(c=c.sort((Z,ce)=>Z[0].localeCompare(ce[0])));let le=j?`${j} `:"";c.forEach(Z=>{let ce=`${le}${oe}${Z[0].replace(/^\$0 ?/,"")}`;ae.span({text:ce,padding:[0,2,0,2],width:_(c,Ut,`${j}${oe}`)+4},{text:Z[1]});let me=[];Z[2]&&me.push(`[${n("default")}]`),Z[3]&&Z[3].length&&me.push(`[${n("aliases:")} ${Z[3].join(", ")}]`),Z[4]&&(typeof Z[4]=="string"?me.push(`[${n("deprecated: %s",Z[4])}]`):me.push(`[${n("deprecated")}]`)),me.length?ae.div({text:me.join(" "),padding:[0,0,0,2],align:"right"}):ae.div()}),ae.div()}let ft=(Object.keys(ee.alias)||[]).concat(Object.keys(e.parsed.newAliases)||[]);Ee=Ee.filter(H=>!e.parsed.newAliases[H]&&ft.every(oe=>(ee.alias[oe]||[]).indexOf(H)===-1));let ut=n("Options:");pe[ut]||(pe[ut]=[]),X(Ee,ee.alias,pe,ut);let $t=H=>/^--/.test(zn(H)),Y=Object.keys(pe).filter(H=>pe[H].length>0).map(H=>{let oe=pe[H].filter(z).map(le=>{if(ft.includes(le))return le;for(let Z=0,ce;(ce=ft[Z])!==void 0;Z++)if((ee.alias[ce]||[]).includes(le))return ce;return le});return{groupName:H,normalizedKeys:oe}}).filter(({normalizedKeys:H})=>H.length>0).map(({groupName:H,normalizedKeys:oe})=>{let le=oe.reduce((Z,ce)=>(Z[ce]=[ce].concat(ee.alias[ce]||[]).map(me=>H===r.getPositionalGroupName()?me:(/^[0-9]$/.test(me)?ee.boolean.includes(ce)?"-":"--":me.length>1?"--":"-")+me).sort((me,Ze)=>$t(me)===$t(Ze)?0:$t(me)?1:-1).join(", "),Z),{});return{groupName:H,normalizedKeys:oe,switches:le}});if(Y.filter(({groupName:H})=>H!==r.getPositionalGroupName()).some(({normalizedKeys:H,switches:oe})=>!H.every(le=>$t(oe[le])))&&Y.filter(({groupName:H})=>H!==r.getPositionalGroupName()).forEach(({normalizedKeys:H,switches:oe})=>{H.forEach(le=>{$t(oe[le])&&(oe[le]=Ic(oe[le],4))})}),Y.forEach(({groupName:H,normalizedKeys:oe,switches:le})=>{ae.div(H),oe.forEach(Z=>{let ce=le[Z],me=d[Z]||"",Ze=null;me.includes(C)&&(me=n(me.substring(C.length))),ee.boolean.includes(Z)&&(Ze=`[${n("boolean")}]`),ee.count.includes(Z)&&(Ze=`[${n("count")}]`),ee.string.includes(Z)&&(Ze=`[${n("string")}]`),ee.normalize.includes(Z)&&(Ze=`[${n("string")}]`),ee.array.includes(Z)&&(Ze=`[${n("array")}]`),ee.number.includes(Z)&&(Ze=`[${n("number")}]`);let et=y=>typeof y=="string"?`[${n("deprecated: %s",y)}]`:`[${n("deprecated")}]`,$n=[Z in ne?et(ne[Z]):null,Ze,Z in F?`[${n("required")}]`:null,ee.choices&&ee.choices[Z]?`[${n("choices:")} ${r.stringifiedValues(ee.choices[Z])}]`:null,U(ee.default[Z],ee.defaultDescription[Z])].filter(Boolean).join(" ");ae.span({text:zn(ce),padding:[0,2,0,2+bo(ce)],width:_(le,Ut)+4},me),$n?ae.div({text:$n,padding:[0,0,0,2],align:"right"}):ae.div()}),ae.div()}),u.length&&(ae.div(n("Examples:")),u.forEach(H=>{H[0]=H[0].replace(/\$0/g,j)}),u.forEach(H=>{H[1]===""?ae.div({text:H[0],padding:[0,2,0,2]}):ae.div({text:H[0],padding:[0,2,0,2],width:_(u,Ut)+4},{text:H[1]})}),ae.div()),p.length>0){let H=p.map(oe=>oe.replace(/\$0/g,j)).join(`
|
14
14
|
`);ae.div(`${H}
|
15
|
-
`)}return ae.toString().replace(/\s*$/,"")};function _(I,j,
|
15
|
+
`)}return ae.toString().replace(/\s*$/,"")};function _(I,j,F){let K=0;return Array.isArray(I)||(I=Object.values(I).map(ne=>[ne])),I.forEach(ne=>{K=Math.max(t.stringWidth(F?`${F} ${zn(ne[0])}`:zn(ne[0]))+bo(ne[0]),K)}),j&&(K=Math.min(K,parseInt((j*.5).toString(),10))),K}function B(){let I=e.getDemandedOptions(),j=e.getOptions();(Object.keys(j.alias)||[]).forEach(F=>{j.alias[F].forEach(K=>{d[K]&&r.describe(F,d[K]),K in I&&e.demandOption(F,I[K]),j.boolean.includes(K)&&e.boolean(F),j.count.includes(K)&&e.count(F),j.string.includes(K)&&e.string(F),j.normalize.includes(K)&&e.normalize(F),j.array.includes(K)&&e.array(F),j.number.includes(K)&&e.number(F)})})}let q;r.cacheHelpMessage=function(){q=this.help()},r.clearCachedHelpMessage=function(){q=void 0},r.hasCachedHelpMessage=function(){return!!q};function X(I,j,F,K){let ne=[],pe=null;return Object.keys(F).forEach(ee=>{ne=ne.concat(F[ee])}),I.forEach(ee=>{pe=[ee].concat(j[ee]),pe.some(Ee=>ne.indexOf(Ee)!==-1)||F[K].push(ee)}),ne}function z(I){return e.getOptions().hiddenOptions.indexOf(I)<0||e.parsed.argv[e.getOptions().showHiddenOpt]}r.showHelp=I=>{let j=e.getInternalMethods().getLoggerInstance();I||(I="error"),(typeof I=="function"?I:j[I])(r.help())},r.functionDescription=I=>{let j=I.name?t.Parser.decamelize(I.name,"-"):n("generated-value");return["(",j,")"].join("")},r.stringifiedValues=function(j,F){let K="",ne=F||", ",pe=[].concat(j);return!j||!pe.length||pe.forEach(ee=>{K.length&&(K+=ne),K+=JSON.stringify(ee)}),K};function U(I,j){let F=`[${n("default:")} `;if(I===void 0&&!j)return null;if(j)F+=j;else switch(typeof I){case"string":F+=`"${I}"`;break;case"object":F+=JSON.stringify(I);break;default:F+=I}return`${F}]`}function J(){return t.process.stdColumns?Math.min(80,t.process.stdColumns):80}let te=null;r.version=I=>{te=I},r.showVersion=I=>{let j=e.getInternalMethods().getLoggerInstance();I||(I="error"),(typeof I=="function"?I:j[I])(te)},r.reset=function(j){return s=null,a=!1,l=[],f=!1,p=[],u=[],c=[],d=yt(d,F=>!j[F]),r};let V=[];return r.freeze=function(){V.push({failMessage:s,failureOutput:a,usages:l,usageDisabled:f,epilogs:p,examples:u,commands:c,descriptions:d})},r.unfreeze=function(j=!1){let F=V.pop();!F||(j?(d={...F.descriptions,...d},c=[...F.commands,...c],l=[...F.usages,...l],u=[...F.examples,...u],p=[...F.epilogs,...p]):{failMessage:s,failureOutput:a,usages:l,usageDisabled:f,epilogs:p,examples:u,commands:c,descriptions:d}=F)},r}function Ur(e){return typeof e=="object"}function Ic(e,t){return Ur(e)?{text:e.text,indentation:e.indentation+t}:{text:e,indentation:t}}function bo(e){return Ur(e)?e.indentation:0}function zn(e){return Ur(e)?e.text:e}w();w();var wo=`###-begin-{{app_name}}-completions-###
|
16
16
|
#
|
17
17
|
# yargs command completion script
|
18
18
|
#
|
@@ -59,19 +59,19 @@ _{{app_name}}_yargs_completions()
|
|
59
59
|
}
|
60
60
|
compdef _{{app_name}}_yargs_completions {{app_name}}
|
61
61
|
###-end-{{app_name}}-completions-###
|
62
|
-
`;var xo=class{constructor(t,n,r,i){var s,o,a;this.yargs=t,this.usage=n,this.command=r,this.shim=i,this.completionKey="get-yargs-completions",this.aliases=null,this.customCompletionFunction=null,this.zshShell=(a=((s=this.shim.getEnv("SHELL"))===null||s===void 0?void 0:s.includes("zsh"))||((o=this.shim.getEnv("ZSH_NAME"))===null||o===void 0?void 0:o.includes("zsh")))!==null&&a!==void 0?a:!1}defaultCompletion(t,n,r,i){let s=this.command.getCommandHandlers();for(let a=0,l=t.length;a<l;++a)if(s[t[a]]&&s[t[a]].builder){let f=s[t[a]].builder;if(Gn(f)){let u=this.yargs.getInternalMethods().reset();return f(u,!0),u.argv}}let o=[];this.commandCompletions(o,t,r),this.optionCompletions(o,t,n,r),this.
|
62
|
+
`;var xo=class{constructor(t,n,r,i){var s,o,a;this.yargs=t,this.usage=n,this.command=r,this.shim=i,this.completionKey="get-yargs-completions",this.aliases=null,this.customCompletionFunction=null,this.indexAfterLastReset=0,this.zshShell=(a=((s=this.shim.getEnv("SHELL"))===null||s===void 0?void 0:s.includes("zsh"))||((o=this.shim.getEnv("ZSH_NAME"))===null||o===void 0?void 0:o.includes("zsh")))!==null&&a!==void 0?a:!1}defaultCompletion(t,n,r,i){let s=this.command.getCommandHandlers();for(let a=0,l=t.length;a<l;++a)if(s[t[a]]&&s[t[a]].builder){let f=s[t[a]].builder;if(Gn(f)){this.indexAfterLastReset=a+1;let u=this.yargs.getInternalMethods().reset();return f(u,!0),u.argv}}let o=[];this.commandCompletions(o,t,r),this.optionCompletions(o,t,n,r),this.choicesFromOptionsCompletions(o,t,n,r),this.choicesFromPositionalsCompletions(o,t,n,r),i(null,o)}commandCompletions(t,n,r){let i=this.yargs.getInternalMethods().getContext().commands;!r.match(/^-/)&&i[i.length-1]!==r&&!this.previousArgHasChoices(n)&&this.usage.getCommands().forEach(s=>{let o=bt(s[0]).cmd;if(n.indexOf(o)===-1)if(!this.zshShell)t.push(o);else{let a=s[1]||"";t.push(o.replace(/:/g,"\\:")+":"+a)}})}optionCompletions(t,n,r,i){if((i.match(/^-/)||i===""&&t.length===0)&&!this.previousArgHasChoices(n)){let s=this.yargs.getOptions(),o=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[];Object.keys(s.key).forEach(a=>{let l=!!s.configuration["boolean-negation"]&&s.boolean.includes(a);!o.includes(a)&&!this.argsContainKey(n,r,a,l)&&(this.completeOptionKey(a,t,i),l&&!!s.default[a]&&this.completeOptionKey(`no-${a}`,t,i))})}}choicesFromOptionsCompletions(t,n,r,i){if(this.previousArgHasChoices(n)){let s=this.getPreviousArgChoices(n);s&&s.length>0&&t.push(...s)}}choicesFromPositionalsCompletions(t,n,r,i){let s=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[],o=Math.max(this.indexAfterLastReset,this.yargs.getInternalMethods().getContext().commands.length+1),a=r._.slice(o),l=s[a.length-1];if(!l)return;let f=this.yargs.getOptions().choices[l]||[];for(let u of f)u.startsWith(i)&&t.push(u)}getPreviousArgChoices(t){if(t.length<1)return;let n=t[t.length-1],r="";if(!n.startsWith("-")&&t.length>1&&(r=n,n=t[t.length-2]),!n.startsWith("-"))return;let i=n.replace(/^-+/,""),s=this.yargs.getOptions(),o=[i,...this.yargs.getAliases()[i]||[]],a;for(let l of o)if(Object.prototype.hasOwnProperty.call(s.key,l)&&Array.isArray(s.choices[l])){a=s.choices[l];break}if(a)return a.filter(l=>!r||l.startsWith(r))}previousArgHasChoices(t){let n=this.getPreviousArgChoices(t);return n!==void 0&&n.length>0}argsContainKey(t,n,r,i){if(t.indexOf(`--${r}`)!==-1||i&&t.indexOf(`--no-${r}`)!==-1)return!0;if(this.aliases){for(let s of this.aliases[r])if(n[s]!==void 0)return!0}return!1}completeOptionKey(t,n,r){let i=this.usage.getDescriptions(),s=l=>/^--/.test(l),o=l=>/^[^0-9]$/.test(l),a=!s(r)&&o(t)?"-":"--";if(!this.zshShell)n.push(a+t);else{let l=i[t]||"";n.push(a+`${t.replace(/:/g,"\\:")}:${l.replace("__yargsString__:","")}`)}}customCompletion(t,n,r,i){if(Te(this.customCompletionFunction,null,this.shim),Fc(this.customCompletionFunction)){let s=this.customCompletionFunction(r,n);return se(s)?s.then(o=>{this.shim.process.nextTick(()=>{i(null,o)})}).catch(o=>{this.shim.process.nextTick(()=>{i(o,void 0)})}):i(null,s)}else return Lc(this.customCompletionFunction)?this.customCompletionFunction(r,n,(s=i)=>this.defaultCompletion(t,n,r,s),s=>{i(null,s)}):this.customCompletionFunction(r,n,s=>{i(null,s)})}getCompletion(t,n){let r=t.length?t[t.length-1]:"",i=this.yargs.parse(t,!0),s=this.customCompletionFunction?o=>this.customCompletion(t,o,r,n):o=>this.defaultCompletion(t,o,r,n);return se(i)?i.then(s):s(i)}generateCompletionScript(t,n){let r=this.zshShell?Ao:wo,i=this.shim.path.basename(t);return t.match(/\.js$/)&&(t=`./${t}`),r=r.replace(/{{app_name}}/g,i),r=r.replace(/{{completion_command}}/g,n),r.replace(/{{app_path}}/g,t)}registerFunction(t){this.customCompletionFunction=t}setParsed(t){this.aliases=t.aliases}};function vo(e,t,n,r){return new xo(e,t,n,r)}function Fc(e){return e.length<3}function Lc(e){return e.length>3}w();w();function Co(e,t){if(e.length===0)return t.length;if(t.length===0)return e.length;let n=[],r;for(r=0;r<=t.length;r++)n[r]=[r];let i;for(i=0;i<=e.length;i++)n[0][i]=i;for(r=1;r<=t.length;r++)for(i=1;i<=e.length;i++)t.charAt(r-1)===e.charAt(i-1)?n[r][i]=n[r-1][i-1]:r>1&&i>1&&t.charAt(r-2)===e.charAt(i-1)&&t.charAt(r-1)===e.charAt(i-2)?n[r][i]=n[r-2][i-2]+1:n[r][i]=Math.min(n[r-1][i-1]+1,Math.min(n[r][i-1]+1,n[r-1][i]+1));return n[t.length][e.length]}var Oo=["$0","--","_"];function Eo(e,t,n){let r=n.y18n.__,i=n.y18n.__n,s={};s.nonOptionCount=function(c){let d=e.getDemandedCommands(),b=c._.length+(c["--"]?c["--"].length:0)-e.getInternalMethods().getContext().commands.length;d._&&(b<d._.min||b>d._.max)&&(b<d._.min?d._.minMsg!==void 0?t.fail(d._.minMsg?d._.minMsg.replace(/\$0/g,b.toString()).replace(/\$1/,d._.min.toString()):null):t.fail(i("Not enough non-option arguments: got %s, need at least %s","Not enough non-option arguments: got %s, need at least %s",b,b.toString(),d._.min.toString())):b>d._.max&&(d._.maxMsg!==void 0?t.fail(d._.maxMsg?d._.maxMsg.replace(/\$0/g,b.toString()).replace(/\$1/,d._.max.toString()):null):t.fail(i("Too many non-option arguments: got %s, maximum of %s","Too many non-option arguments: got %s, maximum of %s",b,b.toString(),d._.max.toString()))))},s.positionalCount=function(c,d){d<c&&t.fail(i("Not enough non-option arguments: got %s, need at least %s","Not enough non-option arguments: got %s, need at least %s",d,d+"",c+""))},s.requiredArguments=function(c,d){let p=null;for(let b of Object.keys(d))(!Object.prototype.hasOwnProperty.call(c,b)||typeof c[b]=="undefined")&&(p=p||{},p[b]=d[b]);if(p){let b=[];for(let m of Object.keys(p)){let C=p[m];C&&b.indexOf(C)<0&&b.push(C)}let g=b.length?`
|
63
63
|
${b.join(`
|
64
|
-
`)}`:"";t.fail(i("Missing required argument: %s","Missing required arguments: %s",Object.keys(p).length,Object.keys(p).join(", ")+g))}},s.unknownArguments=function(c,d,p,b,g=!0){var m;let C=e.getInternalMethods().getCommandInstance().getCommands(),_=[],
|
64
|
+
`)}`:"";t.fail(i("Missing required argument: %s","Missing required arguments: %s",Object.keys(p).length,Object.keys(p).join(", ")+g))}},s.unknownArguments=function(c,d,p,b,g=!0){var m;let C=e.getInternalMethods().getCommandInstance().getCommands(),_=[],B=e.getInternalMethods().getContext();if(Object.keys(c).forEach(q=>{!Oo.includes(q)&&!Object.prototype.hasOwnProperty.call(p,q)&&!Object.prototype.hasOwnProperty.call(e.getInternalMethods().getParseContext(),q)&&!s.isValidAndSomeAliasIsNotNew(q,d)&&_.push(q)}),g&&(B.commands.length>0||C.length>0||b)&&c._.slice(B.commands.length).forEach(q=>{C.includes(""+q)||_.push(""+q)}),g){let X=((m=e.getDemandedCommands()._)===null||m===void 0?void 0:m.max)||0,z=B.commands.length+X;z<c._.length&&c._.slice(z).forEach(U=>{U=String(U),!B.commands.includes(U)&&!_.includes(U)&&_.push(U)})}_.length&&t.fail(i("Unknown argument: %s","Unknown arguments: %s",_.length,_.map(q=>q.trim()?q:`"${q}"`).join(", ")))},s.unknownCommands=function(c){let d=e.getInternalMethods().getCommandInstance().getCommands(),p=[],b=e.getInternalMethods().getContext();return(b.commands.length>0||d.length>0)&&c._.slice(b.commands.length).forEach(g=>{d.includes(""+g)||p.push(""+g)}),p.length>0?(t.fail(i("Unknown command: %s","Unknown commands: %s",p.length,p.join(", "))),!0):!1},s.isValidAndSomeAliasIsNotNew=function(c,d){if(!Object.prototype.hasOwnProperty.call(d,c))return!1;let p=e.parsed.newAliases;return[c,...d[c]].some(b=>!Object.prototype.hasOwnProperty.call(p,b)||!p[c])},s.limitedChoices=function(c){let d=e.getOptions(),p={};if(!Object.keys(d.choices).length)return;Object.keys(c).forEach(m=>{Oo.indexOf(m)===-1&&Object.prototype.hasOwnProperty.call(d.choices,m)&&[].concat(c[m]).forEach(C=>{d.choices[m].indexOf(C)===-1&&C!==void 0&&(p[m]=(p[m]||[]).concat(C))})});let b=Object.keys(p);if(!b.length)return;let g=r("Invalid values:");b.forEach(m=>{g+=`
|
65
65
|
${r("Argument: %s, Given: %s, Choices: %s",m,t.stringifiedValues(p[m]),t.stringifiedValues(d.choices[m]))}`}),t.fail(g)};let o={};s.implies=function(c,d){P("<string|object> [array|number|string]",[c,d],arguments.length),typeof c=="object"?Object.keys(c).forEach(p=>{s.implies(p,c[p])}):(e.global(c),o[c]||(o[c]=[]),Array.isArray(d)?d.forEach(p=>s.implies(c,p)):(Te(d,void 0,n),o[c].push(d)))},s.getImplied=function(){return o};function a(u,c){let d=Number(c);return c=isNaN(d)?c:d,typeof c=="number"?c=u._.length>=c:c.match(/^--no-.+/)?(c=c.match(/^--no-(.+)/)[1],c=!Object.prototype.hasOwnProperty.call(u,c)):c=Object.prototype.hasOwnProperty.call(u,c),c}s.implications=function(c){let d=[];if(Object.keys(o).forEach(p=>{let b=p;(o[p]||[]).forEach(g=>{let m=b,C=g;m=a(c,m),g=a(c,g),m&&!g&&d.push(` ${b} -> ${C}`)})}),d.length){let p=`${r("Implications failed:")}
|
66
|
-
`;d.forEach(b=>{p+=b}),t.fail(p)}};let l={};s.conflicts=function(c,d){P("<string|object> [array|string]",[c,d],arguments.length),typeof c=="object"?Object.keys(c).forEach(p=>{s.conflicts(p,c[p])}):(e.global(c),l[c]||(l[c]=[]),Array.isArray(d)?d.forEach(p=>s.conflicts(c,p)):l[c].push(d))},s.getConflicting=()=>l,s.conflicting=function(c){Object.keys(c).forEach(d=>{l[d]&&l[d].forEach(p=>{p&&c[d]!==void 0&&c[p]!==void 0&&t.fail(r("Arguments %s and %s are mutually exclusive",d,p))})}),e.getInternalMethods().getParserConfiguration()["strip-dashed"]&&Object.keys(l).forEach(d=>{l[d].forEach(p=>{p&&c[n.Parser.camelCase(d)]!==void 0&&c[n.Parser.camelCase(p)]!==void 0&&t.fail(r("Arguments %s and %s are mutually exclusive",d,p))})})},s.recommendCommands=function(c,d){d=d.sort((m,C)=>C.length-m.length);let b=null,g=1/0;for(let m=0,C;(C=d[m])!==void 0;m++){let _=Co(c,C);_<=3&&_<g&&(g=_,b=C)}b&&t.fail(r("Did you mean %s?",b))},s.reset=function(c){return o=yt(o,d=>!c[d]),l=yt(l,d=>!c[d]),s};let f=[];return s.freeze=function(){f.push({implied:o,conflicting:l})},s.unfreeze=function(){let c=f.pop();Te(c,void 0,n),{implied:o,conflicting:l}=c},s}w();var $r=[],En;function Vn(e,t,n,r){En=r;let i={};if(Object.prototype.hasOwnProperty.call(e,"extends")){if(typeof e.extends!="string")return i;let s=/\.json|\..*rc$/.test(e.extends),o=null;if(s)o=Tc(t,e.extends);else try{o=_e.resolve(e.extends)}catch(a){return e}Dc(o),$r.push(o),i=s?JSON.parse(En.readFileSync(o,"utf8")):_e(e.extends),delete e.extends,i=Vn(i,En.path.dirname(o),n,En)}return $r=[],n?_o(i,e):Object.assign({},i,e)}function Dc(e){if($r.indexOf(e)>-1)throw new re(`Circular extended configurations: '${e}'.`)}function Tc(e,t){return En.path.resolve(e,t)}function _o(e,t){let n={};function r(i){return i&&typeof i=="object"&&!Array.isArray(i)}Object.assign(n,e);for(let i of Object.keys(t))r(t[i])&&r(n[i])?n[i]=_o(e[i],t[i]):n[i]=t[i];return n}var F=function(e,t,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(e,n):i?i.value=n:t.set(e,n),n},h=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},ge,qt,_n,Ve,$e,Kn,At,Yt,Qn,Ke,Jn,Qe,it,We,Je,ln,Me,T,Xn,Zn,Be,Gt,cn,zt,xt,er,Y,Vt,Kt,Qt,Q,ot,fe;function qo(e){return(t=[],n=e.process.cwd(),r)=>{let i=new Yo(t,n,r,e);return Object.defineProperty(i,"argv",{get:()=>i.parse(),enumerable:!0}),i.help(),i.version(),i}}var So=Symbol("copyDoubleDash"),jo=Symbol("copyDoubleDash"),Wr=Symbol("deleteFromParserHintObject"),Mo=Symbol("emitWarning"),Io=Symbol("freeze"),Po=Symbol("getDollarZero"),Jt=Symbol("getParserConfiguration"),Br=Symbol("guessLocale"),Fo=Symbol("guessVersion"),Lo=Symbol("parsePositionalNumbers"),Hr=Symbol("pkgUp"),vt=Symbol("populateParserHintArray"),fn=Symbol("populateParserHintSingleValueDictionary"),qr=Symbol("populateParserHintArrayDictionary"),Yr=Symbol("populateParserHintDictionary"),Gr=Symbol("sanitizeKey"),zr=Symbol("setKey"),Vr=Symbol("unfreeze"),Do=Symbol("validateAsync"),To=Symbol("getCommandInstance"),No=Symbol("getContext"),ko=Symbol("getHasOutput"),Ro=Symbol("getLoggerInstance"),Uo=Symbol("getParseContext"),$o=Symbol("getUsageInstance"),Wo=Symbol("getValidationInstance"),tr=Symbol("hasParseCallback"),Xt=Symbol("postProcess"),Bo=Symbol("rebase"),Kr=Symbol("reset"),Sn=Symbol("runYargsParserAndExecuteCommands"),Qr=Symbol("runValidation"),Ho=Symbol("setHasOutput"),Zt=Symbol("kTrackManuallySetKeys"),Yo=class{constructor(t=[],n,r,i){this.customScriptName=!1,this.parsed=!1,ge.set(this,void 0),qt.set(this,void 0),_n.set(this,{commands:[],fullCommands:[]}),Ve.set(this,null),$e.set(this,null),Kn.set(this,"show-hidden"),At.set(this,null),Yt.set(this,!0),Qn.set(this,{}),Ke.set(this,!0),Jn.set(this,[]),Qe.set(this,void 0),it.set(this,{}),We.set(this,!1),Je.set(this,null),ln.set(this,void 0),Me.set(this,""),T.set(this,void 0),Xn.set(this,void 0),Zn.set(this,{}),Be.set(this,null),Gt.set(this,null),cn.set(this,{}),zt.set(this,{}),xt.set(this,void 0),er.set(this,!1),Y.set(this,void 0),Vt.set(this,!1),Kt.set(this,!1),Qt.set(this,!1),Q.set(this,void 0),ot.set(this,null),fe.set(this,void 0),F(this,Y,i,"f"),F(this,xt,t,"f"),F(this,qt,n,"f"),F(this,Xn,r,"f"),F(this,Qe,new kr(this),"f"),this.$0=this[Po](),this[Kr](),F(this,ge,h(this,ge,"f"),"f"),F(this,Q,h(this,Q,"f"),"f"),F(this,fe,h(this,fe,"f"),"f"),F(this,T,h(this,T,"f"),"f"),h(this,T,"f").showHiddenOpt=h(this,Kn,"f"),F(this,ln,this[jo](),"f")}addHelpOpt(t,n){let r="help";return P("[string|boolean] [string]",[t,n],arguments.length),h(this,Je,"f")&&(this[Wr](h(this,Je,"f")),F(this,Je,null,"f")),t===!1&&n===void 0?this:(F(this,Je,typeof t=="string"?t:r,"f"),this.boolean(h(this,Je,"f")),this.describe(h(this,Je,"f"),n||h(this,Q,"f").deferY18nLookup("Show help")),this)}help(t,n){return this.addHelpOpt(t,n)}addShowHiddenOpt(t,n){if(P("[string|boolean] [string]",[t,n],arguments.length),t===!1&&n===void 0)return this;let r=typeof t=="string"?t:h(this,Kn,"f");return this.boolean(r),this.describe(r,n||h(this,Q,"f").deferY18nLookup("Show hidden options")),h(this,T,"f").showHiddenOpt=r,this}showHidden(t,n){return this.addShowHiddenOpt(t,n)}alias(t,n){return P("<object|string|array> [string|array]",[t,n],arguments.length),this[qr](this.alias.bind(this),"alias",t,n),this}array(t){return P("<array|string>",[t],arguments.length),this[vt]("array",t),this[Zt](t),this}boolean(t){return P("<array|string>",[t],arguments.length),this[vt]("boolean",t),this[Zt](t),this}check(t,n){return P("<function> [boolean]",[t,n],arguments.length),this.middleware((r,i)=>Ht(()=>t(r,i.getOptions()),s=>(s?(typeof s=="string"||s instanceof Error)&&h(this,Q,"f").fail(s.toString(),s):h(this,Q,"f").fail(h(this,Y,"f").y18n.__("Argument check failed: %s",t.toString())),r),s=>(h(this,Q,"f").fail(s.message?s.message:s.toString(),s),r)),!1,n),this}choices(t,n){return P("<object|string|array> [string|array]",[t,n],arguments.length),this[qr](this.choices.bind(this),"choices",t,n),this}coerce(t,n){if(P("<object|string|array> [function]",[t,n],arguments.length),Array.isArray(t)){if(!n)throw new re("coerce callback must be provided");for(let r of t)this.coerce(r,n);return this}else if(typeof t=="object"){for(let r of Object.keys(t))this.coerce(r,t[r]);return this}if(!n)throw new re("coerce callback must be provided");return h(this,T,"f").key[t]=!0,h(this,Qe,"f").addCoerceMiddleware((r,i)=>{let s;return Ht(()=>(s=i.getAliases(),n(r[t])),o=>{if(r[t]=o,s[t])for(let a of s[t])r[a]=o;return r},o=>{throw new re(o.message)})},t),this}conflicts(t,n){return P("<string|object> [string|array]",[t,n],arguments.length),h(this,fe,"f").conflicts(t,n),this}config(t="config",n,r){return P("[object|string] [string|function] [function]",[t,n,r],arguments.length),typeof t=="object"&&!Array.isArray(t)?(t=Vn(t,h(this,qt,"f"),this[Jt]()["deep-merge-config"]||!1,h(this,Y,"f")),h(this,T,"f").configObjects=(h(this,T,"f").configObjects||[]).concat(t),this):(typeof n=="function"&&(r=n,n=void 0),this.describe(t,n||h(this,Q,"f").deferY18nLookup("Path to JSON config file")),(Array.isArray(t)?t:[t]).forEach(i=>{h(this,T,"f").config[i]=r||!0}),this)}completion(t,n,r){return P("[string] [string|boolean|function] [function]",[t,n,r],arguments.length),typeof n=="function"&&(r=n,n=void 0),F(this,$e,t||h(this,$e,"f")||"completion","f"),!n&&n!==!1&&(n="generate completion script"),this.command(h(this,$e,"f"),n),r&&h(this,Ve,"f").registerFunction(r),this}command(t,n,r,i,s,o){return P("<string|array|object> [string|boolean] [function|object] [function] [array] [boolean|string]",[t,n,r,i,s,o],arguments.length),h(this,ge,"f").addHandler(t,n,r,i,s,o),this}commands(t,n,r,i,s,o){return this.command(t,n,r,i,s,o)}commandDir(t,n){P("<string> [object]",[t,n],arguments.length);let r=h(this,Xn,"f")||h(this,Y,"f").require;return h(this,ge,"f").addDirectory(t,r,h(this,Y,"f").getCallerFile(),n),this}count(t){return P("<array|string>",[t],arguments.length),this[vt]("count",t),this[Zt](t),this}default(t,n,r){return P("<object|string|array> [*] [string]",[t,n,r],arguments.length),r&&(Nr(t,h(this,Y,"f")),h(this,T,"f").defaultDescription[t]=r),typeof n=="function"&&(Nr(t,h(this,Y,"f")),h(this,T,"f").defaultDescription[t]||(h(this,T,"f").defaultDescription[t]=h(this,Q,"f").functionDescription(n)),n=n.call()),this[fn](this.default.bind(this),"default",t,n),this}defaults(t,n,r){return this.default(t,n,r)}demandCommand(t=1,n,r,i){return P("[number] [number|string] [string|null|undefined] [string|null|undefined]",[t,n,r,i],arguments.length),typeof n!="number"&&(r=n,n=1/0),this.global("_",!1),h(this,T,"f").demandedCommands._={min:t,max:n,minMsg:r,maxMsg:i},this}demand(t,n,r){return Array.isArray(n)?(n.forEach(i=>{Te(r,!0,h(this,Y,"f")),this.demandOption(i,r)}),n=1/0):typeof n!="number"&&(r=n,n=1/0),typeof t=="number"?(Te(r,!0,h(this,Y,"f")),this.demandCommand(t,n,r,r)):Array.isArray(t)?t.forEach(i=>{Te(r,!0,h(this,Y,"f")),this.demandOption(i,r)}):typeof r=="string"?this.demandOption(t,r):(r===!0||typeof r=="undefined")&&this.demandOption(t),this}demandOption(t,n){return P("<object|string|array> [string]",[t,n],arguments.length),this[fn](this.demandOption.bind(this),"demandedOptions",t,n),this}deprecateOption(t,n){return P("<string> [string|boolean]",[t,n],arguments.length),h(this,T,"f").deprecatedOptions[t]=n,this}describe(t,n){return P("<object|string|array> [string]",[t,n],arguments.length),this[zr](t,!0),h(this,Q,"f").describe(t,n),this}detectLocale(t){return P("<boolean>",[t],arguments.length),F(this,Yt,t,"f"),this}env(t){return P("[string|boolean]",[t],arguments.length),t===!1?delete h(this,T,"f").envPrefix:h(this,T,"f").envPrefix=t||"",this}epilogue(t){return P("<string>",[t],arguments.length),h(this,Q,"f").epilog(t),this}epilog(t){return this.epilogue(t)}example(t,n){return P("<string|array> [string]",[t,n],arguments.length),Array.isArray(t)?t.forEach(r=>this.example(...r)):h(this,Q,"f").example(t,n),this}exit(t,n){F(this,We,!0,"f"),F(this,At,n,"f"),h(this,Ke,"f")&&h(this,Y,"f").process.exit(t)}exitProcess(t=!0){return P("[boolean]",[t],arguments.length),F(this,Ke,t,"f"),this}fail(t){if(P("<function|boolean>",[t],arguments.length),typeof t=="boolean"&&t!==!1)throw new re("Invalid first argument. Expected function or boolean 'false'");return h(this,Q,"f").failFn(t),this}getAliases(){return this.parsed?this.parsed.aliases:{}}async getCompletion(t,n){return P("<array> [function]",[t,n],arguments.length),n?h(this,Ve,"f").getCompletion(t,n):new Promise((r,i)=>{h(this,Ve,"f").getCompletion(t,(s,o)=>{s?i(s):r(o)})})}getDemandedOptions(){return P([],0),h(this,T,"f").demandedOptions}getDemandedCommands(){return P([],0),h(this,T,"f").demandedCommands}getDeprecatedOptions(){return P([],0),h(this,T,"f").deprecatedOptions}getDetectLocale(){return h(this,Yt,"f")}getExitProcess(){return h(this,Ke,"f")}getGroups(){return Object.assign({},h(this,it,"f"),h(this,zt,"f"))}getHelp(){if(F(this,We,!0,"f"),!h(this,Q,"f").hasCachedHelpMessage()){if(!this.parsed){let n=this[Sn](h(this,xt,"f"),void 0,void 0,0,!0);if(se(n))return n.then(()=>h(this,Q,"f").help())}let t=h(this,ge,"f").runDefaultBuilderOn(this);if(se(t))return t.then(()=>h(this,Q,"f").help())}return Promise.resolve(h(this,Q,"f").help())}getOptions(){return h(this,T,"f")}getStrict(){return h(this,Vt,"f")}getStrictCommands(){return h(this,Kt,"f")}getStrictOptions(){return h(this,Qt,"f")}global(t,n){return P("<string|array> [boolean]",[t,n],arguments.length),t=[].concat(t),n!==!1?h(this,T,"f").local=h(this,T,"f").local.filter(r=>t.indexOf(r)===-1):t.forEach(r=>{h(this,T,"f").local.includes(r)||h(this,T,"f").local.push(r)}),this}group(t,n){P("<string|array> <string>",[t,n],arguments.length);let r=h(this,zt,"f")[n]||h(this,it,"f")[n];h(this,zt,"f")[n]&&delete h(this,zt,"f")[n];let i={};return h(this,it,"f")[n]=(r||[]).concat(t).filter(s=>i[s]?!1:i[s]=!0),this}hide(t){return P("<string>",[t],arguments.length),h(this,T,"f").hiddenOptions.push(t),this}implies(t,n){return P("<string|object> [number|string|array]",[t,n],arguments.length),h(this,fe,"f").implies(t,n),this}locale(t){return P("[string]",[t],arguments.length),t?(F(this,Yt,!1,"f"),h(this,Y,"f").y18n.setLocale(t),this):(this[Br](),h(this,Y,"f").y18n.getLocale())}middleware(t,n,r){return h(this,Qe,"f").addMiddleware(t,!!n,r)}nargs(t,n){return P("<string|object|array> [number]",[t,n],arguments.length),this[fn](this.nargs.bind(this),"narg",t,n),this}normalize(t){return P("<array|string>",[t],arguments.length),this[vt]("normalize",t),this}number(t){return P("<array|string>",[t],arguments.length),this[vt]("number",t),this[Zt](t),this}option(t,n){if(P("<string|object> [object]",[t,n],arguments.length),typeof t=="object")Object.keys(t).forEach(r=>{this.options(r,t[r])});else{typeof n!="object"&&(n={}),this[Zt](t),h(this,ot,"f")&&(t==="version"||(n==null?void 0:n.alias)==="version")&&this[Mo](['"version" is a reserved word.',"Please do one of the following:",'- Disable version with `yargs.version(false)` if using "version" as an option',"- Use the built-in `yargs.version` method instead (if applicable)","- Use a different option key","https://yargs.js.org/docs/#api-reference-version"].join(`
|
67
|
-
`),void 0,"versionWarning"),h(this,
|
68
|
-
`,"f"),
|
69
|
-
`,"f"),F(this,Me,h(this,Me,"f")+t.join(" "),"f")}}}[Wr](t){sn(h(this,T,"f")).forEach(n=>{if((i=>i==="configObjects")(n))return;let r=h(this,T,"f")[n];Array.isArray(r)?r.includes(t)&&r.splice(r.indexOf(t),1):typeof r=="object"&&delete r[t]}),delete h(this,Q,"f").getDescriptions()[t]}[Mo](t,n,r){h(this,Qn,"f")[r]||(h(this,Y,"f").process.emitWarning(t,n),h(this,Qn,"f")[r]=!0)}[Io](){h(this,Jn,"f").push({options:h(this,T,"f"),configObjects:h(this,T,"f").configObjects.slice(0),exitProcess:h(this,Ke,"f"),groups:h(this,it,"f"),strict:h(this,Vt,"f"),strictCommands:h(this,Kt,"f"),strictOptions:h(this,Qt,"f"),completionCommand:h(this,$e,"f"),output:h(this,Me,"f"),exitError:h(this,At,"f"),hasOutput:h(this,We,"f"),parsed:this.parsed,parseFn:h(this,Be,"f"),parseContext:h(this,Gt,"f")}),h(this,Q,"f").freeze(),h(this,fe,"f").freeze(),h(this,ge,"f").freeze(),h(this,Qe,"f").freeze()}[Po](){let t="",n;return/\b(node|iojs|electron)(\.exe)?$/.test(h(this,Y,"f").process.argv()[0])?n=h(this,Y,"f").process.argv().slice(1,2):n=h(this,Y,"f").process.argv().slice(0,1),t=n.map(r=>{let i=this[Bo](h(this,qt,"f"),r);return r.match(/^(\/|([a-zA-Z]:)?\\)/)&&i.length<r.length?i:r}).join(" ").trim(),h(this,Y,"f").getEnv("_")&&h(this,Y,"f").getProcessArgvBin()===h(this,Y,"f").getEnv("_")&&(t=h(this,Y,"f").getEnv("_").replace(`${h(this,Y,"f").path.dirname(h(this,Y,"f").process.execPath())}/`,"")),t}[Jt](){return h(this,Zn,"f")}[Br](){if(!h(this,Yt,"f"))return;let t=h(this,Y,"f").getEnv("LC_ALL")||h(this,Y,"f").getEnv("LC_MESSAGES")||h(this,Y,"f").getEnv("LANG")||h(this,Y,"f").getEnv("LANGUAGE")||"en_US";this.locale(t.replace(/[.:].*/,""))}[Fo](){return this[Hr]().version||"unknown"}[Lo](t){let n=t["--"]?t["--"]:t._;for(let r=0,i;(i=n[r])!==void 0;r++)h(this,Y,"f").Parser.looksLikeNumber(i)&&Number.isSafeInteger(Math.floor(parseFloat(`${i}`)))&&(n[r]=Number(i));return t}[Hr](t){let n=t||"*";if(h(this,cn,"f")[n])return h(this,cn,"f")[n];let r={};try{let i=t||h(this,Y,"f").mainFilename;!t&&h(this,Y,"f").path.extname(i)&&(i=h(this,Y,"f").path.dirname(i));let s=h(this,Y,"f").findUp(i,(o,a)=>{if(a.includes("package.json"))return"package.json"});Te(s,void 0,h(this,Y,"f")),r=JSON.parse(h(this,Y,"f").readFileSync(s,"utf8"))}catch(i){}return h(this,cn,"f")[n]=r||{},h(this,cn,"f")[n]}[vt](t,n){n=[].concat(n),n.forEach(r=>{r=this[Gr](r),h(this,T,"f")[t].push(r)})}[fn](t,n,r,i){this[Yr](t,n,r,i,(s,o,a)=>{h(this,T,"f")[s][o]=a})}[qr](t,n,r,i){this[Yr](t,n,r,i,(s,o,a)=>{h(this,T,"f")[s][o]=(h(this,T,"f")[s][o]||[]).concat(a)})}[Yr](t,n,r,i,s){if(Array.isArray(r))r.forEach(o=>{t(o,i)});else if((o=>typeof o=="object")(r))for(let o of sn(r))t(o,r[o]);else s(n,this[Gr](r),i)}[Gr](t){return t==="__proto__"?"___proto___":t}[zr](t,n){return this[fn](this[zr].bind(this),"key",t,n),this}[Vr](){var t,n,r,i,s,o,a,l,f,u,c,d;let p=h(this,Jn,"f").pop();Te(p,void 0,h(this,Y,"f"));let b;t=this,n=this,r=this,i=this,s=this,o=this,a=this,l=this,f=this,u=this,c=this,d=this,{options:{set value(g){F(t,T,g,"f")}}.value,configObjects:b,exitProcess:{set value(g){F(n,Ke,g,"f")}}.value,groups:{set value(g){F(r,it,g,"f")}}.value,output:{set value(g){F(i,Me,g,"f")}}.value,exitError:{set value(g){F(s,At,g,"f")}}.value,hasOutput:{set value(g){F(o,We,g,"f")}}.value,parsed:this.parsed,strict:{set value(g){F(a,Vt,g,"f")}}.value,strictCommands:{set value(g){F(l,Kt,g,"f")}}.value,strictOptions:{set value(g){F(f,Qt,g,"f")}}.value,completionCommand:{set value(g){F(u,$e,g,"f")}}.value,parseFn:{set value(g){F(c,Be,g,"f")}}.value,parseContext:{set value(g){F(d,Gt,g,"f")}}.value}=p,h(this,T,"f").configObjects=b,h(this,Q,"f").unfreeze(),h(this,fe,"f").unfreeze(),h(this,ge,"f").unfreeze(),h(this,Qe,"f").unfreeze()}[Do](t,n){return Ht(n,r=>(t(r),r))}getInternalMethods(){return{getCommandInstance:this[To].bind(this),getContext:this[No].bind(this),getHasOutput:this[ko].bind(this),getLoggerInstance:this[Ro].bind(this),getParseContext:this[Uo].bind(this),getParserConfiguration:this[Jt].bind(this),getUsageInstance:this[$o].bind(this),getValidationInstance:this[Wo].bind(this),hasParseCallback:this[tr].bind(this),postProcess:this[Xt].bind(this),reset:this[Kr].bind(this),runValidation:this[Qr].bind(this),runYargsParserAndExecuteCommands:this[Sn].bind(this),setHasOutput:this[Ho].bind(this)}}[To](){return h(this,ge,"f")}[No](){return h(this,_n,"f")}[ko](){return h(this,We,"f")}[Ro](){return h(this,ln,"f")}[Uo](){return h(this,Gt,"f")||{}}[$o](){return h(this,Q,"f")}[Wo](){return h(this,fe,"f")}[tr](){return!!h(this,Be,"f")}[Xt](t,n,r,i){return r||se(t)||(n||(t=this[So](t)),(this[Jt]()["parse-positional-numbers"]||this[Jt]()["parse-positional-numbers"]===void 0)&&(t=this[Lo](t)),i&&(t=Bt(t,this,h(this,Qe,"f").getMiddleware(),!1))),t}[Kr](t={}){F(this,T,h(this,T,"f")||{},"f");let n={};n.local=h(this,T,"f").local||[],n.configObjects=h(this,T,"f").configObjects||[];let r={};n.local.forEach(o=>{r[o]=!0,(t[o]||[]).forEach(a=>{r[a]=!0})}),Object.assign(h(this,zt,"f"),Object.keys(h(this,it,"f")).reduce((o,a)=>{let l=h(this,it,"f")[a].filter(f=>!(f in r));return l.length>0&&(o[a]=l),o},{})),F(this,it,{},"f");let i=["array","boolean","string","skipValidation","count","normalize","number","hiddenOptions"],s=["narg","key","alias","default","defaultDescription","config","choices","demandedOptions","demandedCommands","deprecatedOptions"];return i.forEach(o=>{n[o]=(h(this,T,"f")[o]||[]).filter(a=>!r[a])}),s.forEach(o=>{n[o]=yt(h(this,T,"f")[o],a=>!r[a])}),n.envPrefix=h(this,T,"f").envPrefix,F(this,T,n,"f"),F(this,Q,h(this,Q,"f")?h(this,Q,"f").reset(r):yo(this,h(this,Y,"f")),"f"),F(this,fe,h(this,fe,"f")?h(this,fe,"f").reset(r):Eo(this,h(this,Q,"f"),h(this,Y,"f")),"f"),F(this,ge,h(this,ge,"f")?h(this,ge,"f").reset():mo(h(this,Q,"f"),h(this,fe,"f"),h(this,Qe,"f"),h(this,Y,"f")),"f"),h(this,Ve,"f")||F(this,Ve,vo(this,h(this,Q,"f"),h(this,ge,"f"),h(this,Y,"f")),"f"),h(this,Qe,"f").reset(),F(this,$e,null,"f"),F(this,Me,"","f"),F(this,At,null,"f"),F(this,We,!1,"f"),this.parsed=!1,this}[Bo](t,n){return h(this,Y,"f").path.relative(t,n)}[Sn](t,n,r,i=0,s=!1){let o=!!r||s;t=t||h(this,xt,"f"),h(this,T,"f").__=h(this,Y,"f").y18n.__,h(this,T,"f").configuration=this[Jt]();let a=!!h(this,T,"f").configuration["populate--"],l=Object.assign({},h(this,T,"f").configuration,{"populate--":!0}),f=h(this,Y,"f").Parser.detailed(t,Object.assign({},h(this,T,"f"),{configuration:{"parse-positional-numbers":!1,...l}})),u=Object.assign(f.argv,h(this,Gt,"f")),c,d=f.aliases,p=!1,b=!1;Object.keys(u).forEach(g=>{g===h(this,Je,"f")&&u[g]?p=!0:g===h(this,ot,"f")&&u[g]&&(b=!0)}),u.$0=this.$0,this.parsed=f,i===0&&h(this,Q,"f").clearCachedHelpMessage();try{if(this[Br](),n)return this[Xt](u,a,!!r,!1);h(this,Je,"f")&&[h(this,Je,"f")].concat(d[h(this,Je,"f")]||[]).filter(W=>W.length>1).includes(""+u._[u._.length-1])&&(u._.pop(),p=!0);let g=h(this,ge,"f").getCommands(),m=h(this,Ve,"f").completionKey in u,C=p||m||s;if(u._.length){if(g.length){let _;for(let W=i||0,V;u._[W]!==void 0;W++)if(V=String(u._[W]),g.includes(V)&&V!==h(this,$e,"f")){let X=h(this,ge,"f").runCommand(V,this,f,W+1,s,p||b||s);return this[Xt](X,a,!!r,!1)}else if(!_&&V!==h(this,$e,"f")){_=V;break}!h(this,ge,"f").hasDefaultCommand()&&h(this,er,"f")&&_&&!C&&h(this,fe,"f").recommendCommands(_,g)}h(this,$e,"f")&&u._.includes(h(this,$e,"f"))&&!m&&(h(this,Ke,"f")&&wt(!0),this.showCompletionScript(),this.exit(0))}if(h(this,ge,"f").hasDefaultCommand()&&!C){let _=h(this,ge,"f").runCommand(null,this,f,0,s,p||b||s);return this[Xt](_,a,!!r,!1)}if(m){h(this,Ke,"f")&&wt(!0),t=[].concat(t);let _=t.slice(t.indexOf(`--${h(this,Ve,"f").completionKey}`)+1);return h(this,Ve,"f").getCompletion(_,(W,V)=>{if(W)throw new re(W.message);(V||[]).forEach(X=>{h(this,ln,"f").log(X)}),this.exit(0)}),this[Xt](u,!a,!!r,!1)}if(h(this,We,"f")||(p?(h(this,Ke,"f")&&wt(!0),o=!0,this.showHelp("log"),this.exit(0)):b&&(h(this,Ke,"f")&&wt(!0),o=!0,h(this,Q,"f").showVersion("log"),this.exit(0))),!o&&h(this,T,"f").skipValidation.length>0&&(o=Object.keys(u).some(_=>h(this,T,"f").skipValidation.indexOf(_)>=0&&u[_]===!0)),!o){if(f.error)throw new re(f.error.message);if(!m){let _=this[Qr](d,{},f.error);r||(c=Bt(u,this,h(this,Qe,"f").getMiddleware(),!0)),c=this[Do](_,c!=null?c:u),se(c)&&!r&&(c=c.then(()=>Bt(u,this,h(this,Qe,"f").getMiddleware(),!1)))}}}catch(g){if(g instanceof re)h(this,Q,"f").fail(g.message,g);else throw g}return this[Xt](c!=null?c:u,a,!!r,!0)}[Qr](t,n,r,i){let s={...this.getDemandedOptions()};return o=>{if(r)throw new re(r.message);h(this,fe,"f").nonOptionCount(o),h(this,fe,"f").requiredArguments(o,s);let a=!1;h(this,Kt,"f")&&(a=h(this,fe,"f").unknownCommands(o)),h(this,Vt,"f")&&!a?h(this,fe,"f").unknownArguments(o,t,n,!!i):h(this,Qt,"f")&&h(this,fe,"f").unknownArguments(o,t,{},!1,!1),h(this,fe,"f").limitedChoices(o),h(this,fe,"f").implications(o),h(this,fe,"f").conflicting(o)}}[Ho](){F(this,We,!0,"f")}[Zt](t){if(typeof t=="string")h(this,T,"f").key[t]=!0;else for(let n of t)h(this,T,"f").key[n]=!0}};function go(e){return!!e&&typeof e.getInternalMethods=="function"}var Nc=qo(lo),Ne=Nc;w();w();import op from"isomorphic-unfetch";w();w();var kc=Object.create,nr=Object.defineProperty,Rc=Object.defineProperties,Uc=Object.getOwnPropertyDescriptor,$c=Object.getOwnPropertyDescriptors,Wc=Object.getOwnPropertyNames,Go=Object.getOwnPropertySymbols,Bc=Object.getPrototypeOf,Ko=Object.prototype.hasOwnProperty,Hc=Object.prototype.propertyIsEnumerable,zo=(e,t,n)=>t in e?nr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,qc=(e,t)=>{for(var n in t||(t={}))Ko.call(t,n)&&zo(e,n,t[n]);if(Go)for(var n of Go(t))Hc.call(t,n)&&zo(e,n,t[n]);return e},Yc=(e,t)=>Rc(e,$c(t)),Gc=e=>nr(e,"__esModule",{value:!0}),Vo=(e=>typeof _e!="undefined"?_e:typeof Proxy!="undefined"?new Proxy(e,{get:(t,n)=>(typeof _e!="undefined"?_e:t)[n]}):e)(function(e){if(typeof _e!="undefined")return _e.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')}),zc=(e,t)=>()=>(e&&(t=e(e=0)),t),st=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Vc=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Wc(t))!Ko.call(e,i)&&(n||i!=="default")&&nr(e,i,{get:()=>t[i],enumerable:!(r=Uc(t,i))||r.enumerable});return e},Jr=(e,t)=>Vc(Gc(nr(e!=null?kc(Bc(e)):{},"default",!t&&e&&e.__esModule?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e),Ie=zc(()=>{}),Kc=st((e,t)=>{"use strict";Ie(),t.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}}),Qo=st((e,t)=>{Ie();var n=Kc(),r={};for(let o of Object.keys(n))r[n[o]]=o;var i={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};t.exports=i;for(let o of Object.keys(i)){if(!("channels"in i[o]))throw new Error("missing channels property: "+o);if(!("labels"in i[o]))throw new Error("missing channel labels property: "+o);if(i[o].labels.length!==i[o].channels)throw new Error("channel and label counts mismatch: "+o);let{channels:a,labels:l}=i[o];delete i[o].channels,delete i[o].labels,Object.defineProperty(i[o],"channels",{value:a}),Object.defineProperty(i[o],"labels",{value:l})}i.rgb.hsl=function(o){let a=o[0]/255,l=o[1]/255,f=o[2]/255,u=Math.min(a,l,f),c=Math.max(a,l,f),d=c-u,p,b;c===u?p=0:a===c?p=(l-f)/d:l===c?p=2+(f-a)/d:f===c&&(p=4+(a-l)/d),p=Math.min(p*60,360),p<0&&(p+=360);let g=(u+c)/2;return c===u?b=0:g<=.5?b=d/(c+u):b=d/(2-c-u),[p,b*100,g*100]},i.rgb.hsv=function(o){let a,l,f,u,c,d=o[0]/255,p=o[1]/255,b=o[2]/255,g=Math.max(d,p,b),m=g-Math.min(d,p,b),C=function(_){return(g-_)/6/m+1/2};return m===0?(u=0,c=0):(c=m/g,a=C(d),l=C(p),f=C(b),d===g?u=f-l:p===g?u=1/3+a-f:b===g&&(u=2/3+l-a),u<0?u+=1:u>1&&(u-=1)),[u*360,c*100,g*100]},i.rgb.hwb=function(o){let a=o[0],l=o[1],f=o[2],u=i.rgb.hsl(o)[0],c=1/255*Math.min(a,Math.min(l,f));return f=1-1/255*Math.max(a,Math.max(l,f)),[u,c*100,f*100]},i.rgb.cmyk=function(o){let a=o[0]/255,l=o[1]/255,f=o[2]/255,u=Math.min(1-a,1-l,1-f),c=(1-a-u)/(1-u)||0,d=(1-l-u)/(1-u)||0,p=(1-f-u)/(1-u)||0;return[c*100,d*100,p*100,u*100]};function s(o,a){return(o[0]-a[0])**2+(o[1]-a[1])**2+(o[2]-a[2])**2}i.rgb.keyword=function(o){let a=r[o];if(a)return a;let l=1/0,f;for(let u of Object.keys(n)){let c=n[u],d=s(o,c);d<l&&(l=d,f=u)}return f},i.keyword.rgb=function(o){return n[o]},i.rgb.xyz=function(o){let a=o[0]/255,l=o[1]/255,f=o[2]/255;a=a>.04045?((a+.055)/1.055)**2.4:a/12.92,l=l>.04045?((l+.055)/1.055)**2.4:l/12.92,f=f>.04045?((f+.055)/1.055)**2.4:f/12.92;let u=a*.4124+l*.3576+f*.1805,c=a*.2126+l*.7152+f*.0722,d=a*.0193+l*.1192+f*.9505;return[u*100,c*100,d*100]},i.rgb.lab=function(o){let a=i.rgb.xyz(o),l=a[0],f=a[1],u=a[2];l/=95.047,f/=100,u/=108.883,l=l>.008856?l**(1/3):7.787*l+16/116,f=f>.008856?f**(1/3):7.787*f+16/116,u=u>.008856?u**(1/3):7.787*u+16/116;let c=116*f-16,d=500*(l-f),p=200*(f-u);return[c,d,p]},i.hsl.rgb=function(o){let a=o[0]/360,l=o[1]/100,f=o[2]/100,u,c,d;if(l===0)return d=f*255,[d,d,d];f<.5?u=f*(1+l):u=f+l-f*l;let p=2*f-u,b=[0,0,0];for(let g=0;g<3;g++)c=a+1/3*-(g-1),c<0&&c++,c>1&&c--,6*c<1?d=p+(u-p)*6*c:2*c<1?d=u:3*c<2?d=p+(u-p)*(2/3-c)*6:d=p,b[g]=d*255;return b},i.hsl.hsv=function(o){let a=o[0],l=o[1]/100,f=o[2]/100,u=l,c=Math.max(f,.01);f*=2,l*=f<=1?f:2-f,u*=c<=1?c:2-c;let d=(f+l)/2,p=f===0?2*u/(c+u):2*l/(f+l);return[a,p*100,d*100]},i.hsv.rgb=function(o){let a=o[0]/60,l=o[1]/100,f=o[2]/100,u=Math.floor(a)%6,c=a-Math.floor(a),d=255*f*(1-l),p=255*f*(1-l*c),b=255*f*(1-l*(1-c));switch(f*=255,u){case 0:return[f,b,d];case 1:return[p,f,d];case 2:return[d,f,b];case 3:return[d,p,f];case 4:return[b,d,f];case 5:return[f,d,p]}},i.hsv.hsl=function(o){let a=o[0],l=o[1]/100,f=o[2]/100,u=Math.max(f,.01),c,d;d=(2-l)*f;let p=(2-l)*u;return c=l*u,c/=p<=1?p:2-p,c=c||0,d/=2,[a,c*100,d*100]},i.hwb.rgb=function(o){let a=o[0]/360,l=o[1]/100,f=o[2]/100,u=l+f,c;u>1&&(l/=u,f/=u);let d=Math.floor(6*a),p=1-f;c=6*a-d,(d&1)!==0&&(c=1-c);let b=l+c*(p-l),g,m,C;switch(d){default:case 6:case 0:g=p,m=b,C=l;break;case 1:g=b,m=p,C=l;break;case 2:g=l,m=p,C=b;break;case 3:g=l,m=b,C=p;break;case 4:g=b,m=l,C=p;break;case 5:g=p,m=l,C=b;break}return[g*255,m*255,C*255]},i.cmyk.rgb=function(o){let a=o[0]/100,l=o[1]/100,f=o[2]/100,u=o[3]/100,c=1-Math.min(1,a*(1-u)+u),d=1-Math.min(1,l*(1-u)+u),p=1-Math.min(1,f*(1-u)+u);return[c*255,d*255,p*255]},i.xyz.rgb=function(o){let a=o[0]/100,l=o[1]/100,f=o[2]/100,u,c,d;return u=a*3.2406+l*-1.5372+f*-.4986,c=a*-.9689+l*1.8758+f*.0415,d=a*.0557+l*-.204+f*1.057,u=u>.0031308?1.055*u**(1/2.4)-.055:u*12.92,c=c>.0031308?1.055*c**(1/2.4)-.055:c*12.92,d=d>.0031308?1.055*d**(1/2.4)-.055:d*12.92,u=Math.min(Math.max(0,u),1),c=Math.min(Math.max(0,c),1),d=Math.min(Math.max(0,d),1),[u*255,c*255,d*255]},i.xyz.lab=function(o){let a=o[0],l=o[1],f=o[2];a/=95.047,l/=100,f/=108.883,a=a>.008856?a**(1/3):7.787*a+16/116,l=l>.008856?l**(1/3):7.787*l+16/116,f=f>.008856?f**(1/3):7.787*f+16/116;let u=116*l-16,c=500*(a-l),d=200*(l-f);return[u,c,d]},i.lab.xyz=function(o){let a=o[0],l=o[1],f=o[2],u,c,d;c=(a+16)/116,u=l/500+c,d=c-f/200;let p=c**3,b=u**3,g=d**3;return c=p>.008856?p:(c-16/116)/7.787,u=b>.008856?b:(u-16/116)/7.787,d=g>.008856?g:(d-16/116)/7.787,u*=95.047,c*=100,d*=108.883,[u,c,d]},i.lab.lch=function(o){let a=o[0],l=o[1],f=o[2],u;u=Math.atan2(f,l)*360/2/Math.PI,u<0&&(u+=360);let c=Math.sqrt(l*l+f*f);return[a,c,u]},i.lch.lab=function(o){let a=o[0],l=o[1],f=o[2]/360*2*Math.PI,u=l*Math.cos(f),c=l*Math.sin(f);return[a,u,c]},i.rgb.ansi16=function(o,a=null){let[l,f,u]=o,c=a===null?i.rgb.hsv(o)[2]:a;if(c=Math.round(c/50),c===0)return 30;let d=30+(Math.round(u/255)<<2|Math.round(f/255)<<1|Math.round(l/255));return c===2&&(d+=60),d},i.hsv.ansi16=function(o){return i.rgb.ansi16(i.hsv.rgb(o),o[2])},i.rgb.ansi256=function(o){let a=o[0],l=o[1],f=o[2];return a===l&&l===f?a<8?16:a>248?231:Math.round((a-8)/247*24)+232:16+36*Math.round(a/255*5)+6*Math.round(l/255*5)+Math.round(f/255*5)},i.ansi16.rgb=function(o){let a=o%10;if(a===0||a===7)return o>50&&(a+=3.5),a=a/10.5*255,[a,a,a];let l=(~~(o>50)+1)*.5,f=(a&1)*l*255,u=(a>>1&1)*l*255,c=(a>>2&1)*l*255;return[f,u,c]},i.ansi256.rgb=function(o){if(o>=232){let c=(o-232)*10+8;return[c,c,c]}o-=16;let a,l=Math.floor(o/36)/5*255,f=Math.floor((a=o%36)/6)/5*255,u=a%6/5*255;return[l,f,u]},i.rgb.hex=function(o){let a=(((Math.round(o[0])&255)<<16)+((Math.round(o[1])&255)<<8)+(Math.round(o[2])&255)).toString(16).toUpperCase();return"000000".substring(a.length)+a},i.hex.rgb=function(o){let a=o.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!a)return[0,0,0];let l=a[0];a[0].length===3&&(l=l.split("").map(p=>p+p).join(""));let f=parseInt(l,16),u=f>>16&255,c=f>>8&255,d=f&255;return[u,c,d]},i.rgb.hcg=function(o){let a=o[0]/255,l=o[1]/255,f=o[2]/255,u=Math.max(Math.max(a,l),f),c=Math.min(Math.min(a,l),f),d=u-c,p,b;return d<1?p=c/(1-d):p=0,d<=0?b=0:u===a?b=(l-f)/d%6:u===l?b=2+(f-a)/d:b=4+(a-l)/d,b/=6,b%=1,[b*360,d*100,p*100]},i.hsl.hcg=function(o){let a=o[1]/100,l=o[2]/100,f=l<.5?2*a*l:2*a*(1-l),u=0;return f<1&&(u=(l-.5*f)/(1-f)),[o[0],f*100,u*100]},i.hsv.hcg=function(o){let a=o[1]/100,l=o[2]/100,f=a*l,u=0;return f<1&&(u=(l-f)/(1-f)),[o[0],f*100,u*100]},i.hcg.rgb=function(o){let a=o[0]/360,l=o[1]/100,f=o[2]/100;if(l===0)return[f*255,f*255,f*255];let u=[0,0,0],c=a%1*6,d=c%1,p=1-d,b=0;switch(Math.floor(c)){case 0:u[0]=1,u[1]=d,u[2]=0;break;case 1:u[0]=p,u[1]=1,u[2]=0;break;case 2:u[0]=0,u[1]=1,u[2]=d;break;case 3:u[0]=0,u[1]=p,u[2]=1;break;case 4:u[0]=d,u[1]=0,u[2]=1;break;default:u[0]=1,u[1]=0,u[2]=p}return b=(1-l)*f,[(l*u[0]+b)*255,(l*u[1]+b)*255,(l*u[2]+b)*255]},i.hcg.hsv=function(o){let a=o[1]/100,l=o[2]/100,f=a+l*(1-a),u=0;return f>0&&(u=a/f),[o[0],u*100,f*100]},i.hcg.hsl=function(o){let a=o[1]/100,l=o[2]/100*(1-a)+.5*a,f=0;return l>0&&l<.5?f=a/(2*l):l>=.5&&l<1&&(f=a/(2*(1-l))),[o[0],f*100,l*100]},i.hcg.hwb=function(o){let a=o[1]/100,l=o[2]/100,f=a+l*(1-a);return[o[0],(f-a)*100,(1-f)*100]},i.hwb.hcg=function(o){let a=o[1]/100,l=o[2]/100,f=1-l,u=f-a,c=0;return u<1&&(c=(f-u)/(1-u)),[o[0],u*100,c*100]},i.apple.rgb=function(o){return[o[0]/65535*255,o[1]/65535*255,o[2]/65535*255]},i.rgb.apple=function(o){return[o[0]/255*65535,o[1]/255*65535,o[2]/255*65535]},i.gray.rgb=function(o){return[o[0]/100*255,o[0]/100*255,o[0]/100*255]},i.gray.hsl=function(o){return[0,0,o[0]]},i.gray.hsv=i.gray.hsl,i.gray.hwb=function(o){return[0,100,o[0]]},i.gray.cmyk=function(o){return[0,0,0,o[0]]},i.gray.lab=function(o){return[o[0],0,0]},i.gray.hex=function(o){let a=Math.round(o[0]/100*255)&255,l=((a<<16)+(a<<8)+a).toString(16).toUpperCase();return"000000".substring(l.length)+l},i.rgb.gray=function(o){return[(o[0]+o[1]+o[2])/3/255*100]}}),Qc=st((e,t)=>{Ie();var n=Qo();function r(){let a={},l=Object.keys(n);for(let f=l.length,u=0;u<f;u++)a[l[u]]={distance:-1,parent:null};return a}function i(a){let l=r(),f=[a];for(l[a].distance=0;f.length;){let u=f.pop(),c=Object.keys(n[u]);for(let d=c.length,p=0;p<d;p++){let b=c[p],g=l[b];g.distance===-1&&(g.distance=l[u].distance+1,g.parent=u,f.unshift(b))}}return l}function s(a,l){return function(f){return l(a(f))}}function o(a,l){let f=[l[a].parent,a],u=n[l[a].parent][a],c=l[a].parent;for(;l[c].parent;)f.unshift(l[c].parent),u=s(n[l[c].parent][c],u),c=l[c].parent;return u.conversion=f,u}t.exports=function(a){let l=i(a),f={},u=Object.keys(l);for(let c=u.length,d=0;d<c;d++){let p=u[d];l[p].parent!==null&&(f[p]=o(p,l))}return f}}),Jc=st((e,t)=>{Ie();var n=Qo(),r=Qc(),i={},s=Object.keys(n);function o(l){let f=function(...u){let c=u[0];return c==null?c:(c.length>1&&(u=c),l(u))};return"conversion"in l&&(f.conversion=l.conversion),f}function a(l){let f=function(...u){let c=u[0];if(c==null)return c;c.length>1&&(u=c);let d=l(u);if(typeof d=="object")for(let p=d.length,b=0;b<p;b++)d[b]=Math.round(d[b]);return d};return"conversion"in l&&(f.conversion=l.conversion),f}s.forEach(l=>{i[l]={},Object.defineProperty(i[l],"channels",{value:n[l].channels}),Object.defineProperty(i[l],"labels",{value:n[l].labels});let f=r(l);Object.keys(f).forEach(u=>{let c=f[u];i[l][u]=a(c),i[l][u].raw=o(c)})}),t.exports=i}),Xc=st((e,t)=>{"use strict";Ie();var n=(c,d)=>(...p)=>`\x1B[${c(...p)+d}m`,r=(c,d)=>(...p)=>{let b=c(...p);return`\x1B[${38+d};5;${b}m`},i=(c,d)=>(...p)=>{let b=c(...p);return`\x1B[${38+d};2;${b[0]};${b[1]};${b[2]}m`},s=c=>c,o=(c,d,p)=>[c,d,p],a=(c,d,p)=>{Object.defineProperty(c,d,{get:()=>{let b=p();return Object.defineProperty(c,d,{value:b,enumerable:!0,configurable:!0}),b},enumerable:!0,configurable:!0})},l,f=(c,d,p,b)=>{l===void 0&&(l=Jc());let g=b?10:0,m={};for(let[C,_]of Object.entries(l)){let W=C==="ansi16"?"ansi":C;C===d?m[W]=c(p,g):typeof _=="object"&&(m[W]=c(_[d],g))}return m};function u(){let c=new Map,d={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};d.color.gray=d.color.blackBright,d.bgColor.bgGray=d.bgColor.bgBlackBright,d.color.grey=d.color.blackBright,d.bgColor.bgGrey=d.bgColor.bgBlackBright;for(let[p,b]of Object.entries(d)){for(let[g,m]of Object.entries(b))d[g]={open:`\x1B[${m[0]}m`,close:`\x1B[${m[1]}m`},b[g]=d[g],c.set(m[0],m[1]);Object.defineProperty(d,p,{value:b,enumerable:!1})}return Object.defineProperty(d,"codes",{value:c,enumerable:!1}),d.color.close="\x1B[39m",d.bgColor.close="\x1B[49m",a(d.color,"ansi",()=>f(n,"ansi16",s,!1)),a(d.color,"ansi256",()=>f(r,"ansi256",s,!1)),a(d.color,"ansi16m",()=>f(i,"rgb",o,!1)),a(d.bgColor,"ansi",()=>f(n,"ansi16",s,!0)),a(d.bgColor,"ansi256",()=>f(r,"ansi256",s,!0)),a(d.bgColor,"ansi16m",()=>f(i,"rgb",o,!0)),d}Object.defineProperty(t,"exports",{enumerable:!0,get:u})}),Zc=st((e,t)=>{"use strict";Ie(),t.exports=(n,r=process.argv)=>{let i=n.startsWith("-")?"":n.length===1?"-":"--",s=r.indexOf(i+n),o=r.indexOf("--");return s!==-1&&(o===-1||s<o)}}),ef=st((e,t)=>{"use strict";Ie();var n=Vo("os"),r=Vo("tty"),i=Zc(),{env:s}=process,o;i("no-color")||i("no-colors")||i("color=false")||i("color=never")?o=0:(i("color")||i("colors")||i("color=true")||i("color=always"))&&(o=1),"FORCE_COLOR"in s&&(s.FORCE_COLOR==="true"?o=1:s.FORCE_COLOR==="false"?o=0:o=s.FORCE_COLOR.length===0?1:Math.min(parseInt(s.FORCE_COLOR,10),3));function a(u){return u===0?!1:{level:u,hasBasic:!0,has256:u>=2,has16m:u>=3}}function l(u,c){if(o===0)return 0;if(i("color=16m")||i("color=full")||i("color=truecolor"))return 3;if(i("color=256"))return 2;if(u&&!c&&o===void 0)return 0;let d=o||0;if(s.TERM==="dumb")return d;if(process.platform==="win32"){let p=n.release().split(".");return Number(p[0])>=10&&Number(p[2])>=10586?Number(p[2])>=14931?3:2:1}if("CI"in s)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(p=>p in s)||s.CI_NAME==="codeship"?1:d;if("TEAMCITY_VERSION"in s)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(s.TEAMCITY_VERSION)?1:0;if(s.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in s){let p=parseInt((s.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(s.TERM_PROGRAM){case"iTerm.app":return p>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(s.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(s.TERM)||"COLORTERM"in s?1:d}function f(u){let c=l(u,u&&u.isTTY);return a(c)}t.exports={supportsColor:f,stdout:a(l(!0,r.isatty(1))),stderr:a(l(!0,r.isatty(2)))}}),tf=st((e,t)=>{"use strict";Ie();var n=(i,s,o)=>{let a=i.indexOf(s);if(a===-1)return i;let l=s.length,f=0,u="";do u+=i.substr(f,a-f)+s+o,f=a+l,a=i.indexOf(s,f);while(a!==-1);return u+=i.substr(f),u},r=(i,s,o,a)=>{let l=0,f="";do{let u=i[a-1]==="\r";f+=i.substr(l,(u?a-1:a)-l)+s+(u?`\r
|
66
|
+
`;d.forEach(b=>{p+=b}),t.fail(p)}};let l={};s.conflicts=function(c,d){P("<string|object> [array|string]",[c,d],arguments.length),typeof c=="object"?Object.keys(c).forEach(p=>{s.conflicts(p,c[p])}):(e.global(c),l[c]||(l[c]=[]),Array.isArray(d)?d.forEach(p=>s.conflicts(c,p)):l[c].push(d))},s.getConflicting=()=>l,s.conflicting=function(c){Object.keys(c).forEach(d=>{l[d]&&l[d].forEach(p=>{p&&c[d]!==void 0&&c[p]!==void 0&&t.fail(r("Arguments %s and %s are mutually exclusive",d,p))})}),e.getInternalMethods().getParserConfiguration()["strip-dashed"]&&Object.keys(l).forEach(d=>{l[d].forEach(p=>{p&&c[n.Parser.camelCase(d)]!==void 0&&c[n.Parser.camelCase(p)]!==void 0&&t.fail(r("Arguments %s and %s are mutually exclusive",d,p))})})},s.recommendCommands=function(c,d){d=d.sort((m,C)=>C.length-m.length);let b=null,g=1/0;for(let m=0,C;(C=d[m])!==void 0;m++){let _=Co(c,C);_<=3&&_<g&&(g=_,b=C)}b&&t.fail(r("Did you mean %s?",b))},s.reset=function(c){return o=yt(o,d=>!c[d]),l=yt(l,d=>!c[d]),s};let f=[];return s.freeze=function(){f.push({implied:o,conflicting:l})},s.unfreeze=function(){let c=f.pop();Te(c,void 0,n),{implied:o,conflicting:l}=c},s}w();var $r=[],En;function Vn(e,t,n,r){En=r;let i={};if(Object.prototype.hasOwnProperty.call(e,"extends")){if(typeof e.extends!="string")return i;let s=/\.json|\..*rc$/.test(e.extends),o=null;if(s)o=Tc(t,e.extends);else try{o=_e.resolve(e.extends)}catch(a){return e}Dc(o),$r.push(o),i=s?JSON.parse(En.readFileSync(o,"utf8")):_e(e.extends),delete e.extends,i=Vn(i,En.path.dirname(o),n,En)}return $r=[],n?_o(i,e):Object.assign({},i,e)}function Dc(e){if($r.indexOf(e)>-1)throw new re(`Circular extended configurations: '${e}'.`)}function Tc(e,t){return En.path.resolve(e,t)}function _o(e,t){let n={};function r(i){return i&&typeof i=="object"&&!Array.isArray(i)}Object.assign(n,e);for(let i of Object.keys(t))r(t[i])&&r(n[i])?n[i]=_o(e[i],t[i]):n[i]=t[i];return n}var L=function(e,t,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(e,n):i?i.value=n:t.set(e,n),n},h=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},ge,qt,_n,Ve,$e,Kn,At,Yt,Qn,Ke,Jn,Qe,it,We,Je,ln,Me,N,Xn,Zn,Be,Gt,cn,zt,xt,er,G,Vt,Kt,Qt,Q,ot,fe;function qo(e){return(t=[],n=e.process.cwd(),r)=>{let i=new Yo(t,n,r,e);return Object.defineProperty(i,"argv",{get:()=>i.parse(),enumerable:!0}),i.help(),i.version(),i}}var So=Symbol("copyDoubleDash"),jo=Symbol("copyDoubleDash"),Wr=Symbol("deleteFromParserHintObject"),Mo=Symbol("emitWarning"),Io=Symbol("freeze"),Po=Symbol("getDollarZero"),Jt=Symbol("getParserConfiguration"),Br=Symbol("guessLocale"),Fo=Symbol("guessVersion"),Lo=Symbol("parsePositionalNumbers"),Hr=Symbol("pkgUp"),vt=Symbol("populateParserHintArray"),fn=Symbol("populateParserHintSingleValueDictionary"),qr=Symbol("populateParserHintArrayDictionary"),Yr=Symbol("populateParserHintDictionary"),Gr=Symbol("sanitizeKey"),zr=Symbol("setKey"),Vr=Symbol("unfreeze"),Do=Symbol("validateAsync"),To=Symbol("getCommandInstance"),No=Symbol("getContext"),ko=Symbol("getHasOutput"),Ro=Symbol("getLoggerInstance"),Uo=Symbol("getParseContext"),$o=Symbol("getUsageInstance"),Wo=Symbol("getValidationInstance"),tr=Symbol("hasParseCallback"),Xt=Symbol("postProcess"),Bo=Symbol("rebase"),Kr=Symbol("reset"),Sn=Symbol("runYargsParserAndExecuteCommands"),Qr=Symbol("runValidation"),Ho=Symbol("setHasOutput"),Zt=Symbol("kTrackManuallySetKeys"),Yo=class{constructor(t=[],n,r,i){this.customScriptName=!1,this.parsed=!1,ge.set(this,void 0),qt.set(this,void 0),_n.set(this,{commands:[],fullCommands:[]}),Ve.set(this,null),$e.set(this,null),Kn.set(this,"show-hidden"),At.set(this,null),Yt.set(this,!0),Qn.set(this,{}),Ke.set(this,!0),Jn.set(this,[]),Qe.set(this,void 0),it.set(this,{}),We.set(this,!1),Je.set(this,null),ln.set(this,void 0),Me.set(this,""),N.set(this,void 0),Xn.set(this,void 0),Zn.set(this,{}),Be.set(this,null),Gt.set(this,null),cn.set(this,{}),zt.set(this,{}),xt.set(this,void 0),er.set(this,!1),G.set(this,void 0),Vt.set(this,!1),Kt.set(this,!1),Qt.set(this,!1),Q.set(this,void 0),ot.set(this,null),fe.set(this,void 0),L(this,G,i,"f"),L(this,xt,t,"f"),L(this,qt,n,"f"),L(this,Xn,r,"f"),L(this,Qe,new kr(this),"f"),this.$0=this[Po](),this[Kr](),L(this,ge,h(this,ge,"f"),"f"),L(this,Q,h(this,Q,"f"),"f"),L(this,fe,h(this,fe,"f"),"f"),L(this,N,h(this,N,"f"),"f"),h(this,N,"f").showHiddenOpt=h(this,Kn,"f"),L(this,ln,this[jo](),"f")}addHelpOpt(t,n){let r="help";return P("[string|boolean] [string]",[t,n],arguments.length),h(this,Je,"f")&&(this[Wr](h(this,Je,"f")),L(this,Je,null,"f")),t===!1&&n===void 0?this:(L(this,Je,typeof t=="string"?t:r,"f"),this.boolean(h(this,Je,"f")),this.describe(h(this,Je,"f"),n||h(this,Q,"f").deferY18nLookup("Show help")),this)}help(t,n){return this.addHelpOpt(t,n)}addShowHiddenOpt(t,n){if(P("[string|boolean] [string]",[t,n],arguments.length),t===!1&&n===void 0)return this;let r=typeof t=="string"?t:h(this,Kn,"f");return this.boolean(r),this.describe(r,n||h(this,Q,"f").deferY18nLookup("Show hidden options")),h(this,N,"f").showHiddenOpt=r,this}showHidden(t,n){return this.addShowHiddenOpt(t,n)}alias(t,n){return P("<object|string|array> [string|array]",[t,n],arguments.length),this[qr](this.alias.bind(this),"alias",t,n),this}array(t){return P("<array|string>",[t],arguments.length),this[vt]("array",t),this[Zt](t),this}boolean(t){return P("<array|string>",[t],arguments.length),this[vt]("boolean",t),this[Zt](t),this}check(t,n){return P("<function> [boolean]",[t,n],arguments.length),this.middleware((r,i)=>Ht(()=>t(r,i.getOptions()),s=>(s?(typeof s=="string"||s instanceof Error)&&h(this,Q,"f").fail(s.toString(),s):h(this,Q,"f").fail(h(this,G,"f").y18n.__("Argument check failed: %s",t.toString())),r),s=>(h(this,Q,"f").fail(s.message?s.message:s.toString(),s),r)),!1,n),this}choices(t,n){return P("<object|string|array> [string|array]",[t,n],arguments.length),this[qr](this.choices.bind(this),"choices",t,n),this}coerce(t,n){if(P("<object|string|array> [function]",[t,n],arguments.length),Array.isArray(t)){if(!n)throw new re("coerce callback must be provided");for(let r of t)this.coerce(r,n);return this}else if(typeof t=="object"){for(let r of Object.keys(t))this.coerce(r,t[r]);return this}if(!n)throw new re("coerce callback must be provided");return h(this,N,"f").key[t]=!0,h(this,Qe,"f").addCoerceMiddleware((r,i)=>{let s;return Ht(()=>(s=i.getAliases(),n(r[t])),o=>{if(r[t]=o,s[t])for(let a of s[t])r[a]=o;return r},o=>{throw new re(o.message)})},t),this}conflicts(t,n){return P("<string|object> [string|array]",[t,n],arguments.length),h(this,fe,"f").conflicts(t,n),this}config(t="config",n,r){return P("[object|string] [string|function] [function]",[t,n,r],arguments.length),typeof t=="object"&&!Array.isArray(t)?(t=Vn(t,h(this,qt,"f"),this[Jt]()["deep-merge-config"]||!1,h(this,G,"f")),h(this,N,"f").configObjects=(h(this,N,"f").configObjects||[]).concat(t),this):(typeof n=="function"&&(r=n,n=void 0),this.describe(t,n||h(this,Q,"f").deferY18nLookup("Path to JSON config file")),(Array.isArray(t)?t:[t]).forEach(i=>{h(this,N,"f").config[i]=r||!0}),this)}completion(t,n,r){return P("[string] [string|boolean|function] [function]",[t,n,r],arguments.length),typeof n=="function"&&(r=n,n=void 0),L(this,$e,t||h(this,$e,"f")||"completion","f"),!n&&n!==!1&&(n="generate completion script"),this.command(h(this,$e,"f"),n),r&&h(this,Ve,"f").registerFunction(r),this}command(t,n,r,i,s,o){return P("<string|array|object> [string|boolean] [function|object] [function] [array] [boolean|string]",[t,n,r,i,s,o],arguments.length),h(this,ge,"f").addHandler(t,n,r,i,s,o),this}commands(t,n,r,i,s,o){return this.command(t,n,r,i,s,o)}commandDir(t,n){P("<string> [object]",[t,n],arguments.length);let r=h(this,Xn,"f")||h(this,G,"f").require;return h(this,ge,"f").addDirectory(t,r,h(this,G,"f").getCallerFile(),n),this}count(t){return P("<array|string>",[t],arguments.length),this[vt]("count",t),this[Zt](t),this}default(t,n,r){return P("<object|string|array> [*] [string]",[t,n,r],arguments.length),r&&(Nr(t,h(this,G,"f")),h(this,N,"f").defaultDescription[t]=r),typeof n=="function"&&(Nr(t,h(this,G,"f")),h(this,N,"f").defaultDescription[t]||(h(this,N,"f").defaultDescription[t]=h(this,Q,"f").functionDescription(n)),n=n.call()),this[fn](this.default.bind(this),"default",t,n),this}defaults(t,n,r){return this.default(t,n,r)}demandCommand(t=1,n,r,i){return P("[number] [number|string] [string|null|undefined] [string|null|undefined]",[t,n,r,i],arguments.length),typeof n!="number"&&(r=n,n=1/0),this.global("_",!1),h(this,N,"f").demandedCommands._={min:t,max:n,minMsg:r,maxMsg:i},this}demand(t,n,r){return Array.isArray(n)?(n.forEach(i=>{Te(r,!0,h(this,G,"f")),this.demandOption(i,r)}),n=1/0):typeof n!="number"&&(r=n,n=1/0),typeof t=="number"?(Te(r,!0,h(this,G,"f")),this.demandCommand(t,n,r,r)):Array.isArray(t)?t.forEach(i=>{Te(r,!0,h(this,G,"f")),this.demandOption(i,r)}):typeof r=="string"?this.demandOption(t,r):(r===!0||typeof r=="undefined")&&this.demandOption(t),this}demandOption(t,n){return P("<object|string|array> [string]",[t,n],arguments.length),this[fn](this.demandOption.bind(this),"demandedOptions",t,n),this}deprecateOption(t,n){return P("<string> [string|boolean]",[t,n],arguments.length),h(this,N,"f").deprecatedOptions[t]=n,this}describe(t,n){return P("<object|string|array> [string]",[t,n],arguments.length),this[zr](t,!0),h(this,Q,"f").describe(t,n),this}detectLocale(t){return P("<boolean>",[t],arguments.length),L(this,Yt,t,"f"),this}env(t){return P("[string|boolean]",[t],arguments.length),t===!1?delete h(this,N,"f").envPrefix:h(this,N,"f").envPrefix=t||"",this}epilogue(t){return P("<string>",[t],arguments.length),h(this,Q,"f").epilog(t),this}epilog(t){return this.epilogue(t)}example(t,n){return P("<string|array> [string]",[t,n],arguments.length),Array.isArray(t)?t.forEach(r=>this.example(...r)):h(this,Q,"f").example(t,n),this}exit(t,n){L(this,We,!0,"f"),L(this,At,n,"f"),h(this,Ke,"f")&&h(this,G,"f").process.exit(t)}exitProcess(t=!0){return P("[boolean]",[t],arguments.length),L(this,Ke,t,"f"),this}fail(t){if(P("<function|boolean>",[t],arguments.length),typeof t=="boolean"&&t!==!1)throw new re("Invalid first argument. Expected function or boolean 'false'");return h(this,Q,"f").failFn(t),this}getAliases(){return this.parsed?this.parsed.aliases:{}}async getCompletion(t,n){return P("<array> [function]",[t,n],arguments.length),n?h(this,Ve,"f").getCompletion(t,n):new Promise((r,i)=>{h(this,Ve,"f").getCompletion(t,(s,o)=>{s?i(s):r(o)})})}getDemandedOptions(){return P([],0),h(this,N,"f").demandedOptions}getDemandedCommands(){return P([],0),h(this,N,"f").demandedCommands}getDeprecatedOptions(){return P([],0),h(this,N,"f").deprecatedOptions}getDetectLocale(){return h(this,Yt,"f")}getExitProcess(){return h(this,Ke,"f")}getGroups(){return Object.assign({},h(this,it,"f"),h(this,zt,"f"))}getHelp(){if(L(this,We,!0,"f"),!h(this,Q,"f").hasCachedHelpMessage()){if(!this.parsed){let n=this[Sn](h(this,xt,"f"),void 0,void 0,0,!0);if(se(n))return n.then(()=>h(this,Q,"f").help())}let t=h(this,ge,"f").runDefaultBuilderOn(this);if(se(t))return t.then(()=>h(this,Q,"f").help())}return Promise.resolve(h(this,Q,"f").help())}getOptions(){return h(this,N,"f")}getStrict(){return h(this,Vt,"f")}getStrictCommands(){return h(this,Kt,"f")}getStrictOptions(){return h(this,Qt,"f")}global(t,n){return P("<string|array> [boolean]",[t,n],arguments.length),t=[].concat(t),n!==!1?h(this,N,"f").local=h(this,N,"f").local.filter(r=>t.indexOf(r)===-1):t.forEach(r=>{h(this,N,"f").local.includes(r)||h(this,N,"f").local.push(r)}),this}group(t,n){P("<string|array> <string>",[t,n],arguments.length);let r=h(this,zt,"f")[n]||h(this,it,"f")[n];h(this,zt,"f")[n]&&delete h(this,zt,"f")[n];let i={};return h(this,it,"f")[n]=(r||[]).concat(t).filter(s=>i[s]?!1:i[s]=!0),this}hide(t){return P("<string>",[t],arguments.length),h(this,N,"f").hiddenOptions.push(t),this}implies(t,n){return P("<string|object> [number|string|array]",[t,n],arguments.length),h(this,fe,"f").implies(t,n),this}locale(t){return P("[string]",[t],arguments.length),t?(L(this,Yt,!1,"f"),h(this,G,"f").y18n.setLocale(t),this):(this[Br](),h(this,G,"f").y18n.getLocale())}middleware(t,n,r){return h(this,Qe,"f").addMiddleware(t,!!n,r)}nargs(t,n){return P("<string|object|array> [number]",[t,n],arguments.length),this[fn](this.nargs.bind(this),"narg",t,n),this}normalize(t){return P("<array|string>",[t],arguments.length),this[vt]("normalize",t),this}number(t){return P("<array|string>",[t],arguments.length),this[vt]("number",t),this[Zt](t),this}option(t,n){if(P("<string|object> [object]",[t,n],arguments.length),typeof t=="object")Object.keys(t).forEach(r=>{this.options(r,t[r])});else{typeof n!="object"&&(n={}),this[Zt](t),h(this,ot,"f")&&(t==="version"||(n==null?void 0:n.alias)==="version")&&this[Mo](['"version" is a reserved word.',"Please do one of the following:",'- Disable version with `yargs.version(false)` if using "version" as an option',"- Use the built-in `yargs.version` method instead (if applicable)","- Use a different option key","https://yargs.js.org/docs/#api-reference-version"].join(`
|
67
|
+
`),void 0,"versionWarning"),h(this,N,"f").key[t]=!0,n.alias&&this.alias(t,n.alias);let r=n.deprecate||n.deprecated;r&&this.deprecateOption(t,r);let i=n.demand||n.required||n.require;i&&this.demand(t,i),n.demandOption&&this.demandOption(t,typeof n.demandOption=="string"?n.demandOption:void 0),n.conflicts&&this.conflicts(t,n.conflicts),"default"in n&&this.default(t,n.default),n.implies!==void 0&&this.implies(t,n.implies),n.nargs!==void 0&&this.nargs(t,n.nargs),n.config&&this.config(t,n.configParser),n.normalize&&this.normalize(t),n.choices&&this.choices(t,n.choices),n.coerce&&this.coerce(t,n.coerce),n.group&&this.group(t,n.group),(n.boolean||n.type==="boolean")&&(this.boolean(t),n.alias&&this.boolean(n.alias)),(n.array||n.type==="array")&&(this.array(t),n.alias&&this.array(n.alias)),(n.number||n.type==="number")&&(this.number(t),n.alias&&this.number(n.alias)),(n.string||n.type==="string")&&(this.string(t),n.alias&&this.string(n.alias)),(n.count||n.type==="count")&&this.count(t),typeof n.global=="boolean"&&this.global(t,n.global),n.defaultDescription&&(h(this,N,"f").defaultDescription[t]=n.defaultDescription),n.skipValidation&&this.skipValidation(t);let s=n.describe||n.description||n.desc;this.describe(t,s),n.hidden&&this.hide(t),n.requiresArg&&this.requiresArg(t)}return this}options(t,n){return this.option(t,n)}parse(t,n,r){P("[string|array] [function|boolean|object] [function]",[t,n,r],arguments.length),this[Io](),typeof t=="undefined"&&(t=h(this,xt,"f")),typeof n=="object"&&(L(this,Gt,n,"f"),n=r),typeof n=="function"&&(L(this,Be,n,"f"),n=!1),n||L(this,xt,t,"f"),h(this,Be,"f")&&L(this,Ke,!1,"f");let i=this[Sn](t,!!n),s=this.parsed;return h(this,Ve,"f").setParsed(this.parsed),se(i)?i.then(o=>(h(this,Be,"f")&&h(this,Be,"f").call(this,h(this,At,"f"),o,h(this,Me,"f")),o)).catch(o=>{throw h(this,Be,"f")&&h(this,Be,"f")(o,this.parsed.argv,h(this,Me,"f")),o}).finally(()=>{this[Vr](),this.parsed=s}):(h(this,Be,"f")&&h(this,Be,"f").call(this,h(this,At,"f"),i,h(this,Me,"f")),this[Vr](),this.parsed=s,i)}parseAsync(t,n,r){let i=this.parse(t,n,r);return se(i)?i:Promise.resolve(i)}parseSync(t,n,r){let i=this.parse(t,n,r);if(se(i))throw new re(".parseSync() must not be used with asynchronous builders, handlers, or middleware");return i}parserConfiguration(t){return P("<object>",[t],arguments.length),L(this,Zn,t,"f"),this}pkgConf(t,n){P("<string> [string]",[t,n],arguments.length);let r=null,i=this[Hr](n||h(this,qt,"f"));return i[t]&&typeof i[t]=="object"&&(r=Vn(i[t],n||h(this,qt,"f"),this[Jt]()["deep-merge-config"]||!1,h(this,G,"f")),h(this,N,"f").configObjects=(h(this,N,"f").configObjects||[]).concat(r)),this}positional(t,n){P("<string> <object>",[t,n],arguments.length);let r=["default","defaultDescription","implies","normalize","choices","conflicts","coerce","type","describe","desc","description","alias"];n=yt(n,(o,a)=>o==="type"&&!["string","number","boolean"].includes(a)?!1:r.includes(o));let i=h(this,_n,"f").fullCommands[h(this,_n,"f").fullCommands.length-1],s=i?h(this,ge,"f").cmdToParseOptions(i):{array:[],alias:{},default:{},demand:{}};return sn(s).forEach(o=>{let a=s[o];Array.isArray(a)?a.indexOf(t)!==-1&&(n[o]=!0):a[t]&&!(o in n)&&(n[o]=a[t])}),this.group(t,h(this,Q,"f").getPositionalGroupName()),this.option(t,n)}recommendCommands(t=!0){return P("[boolean]",[t],arguments.length),L(this,er,t,"f"),this}required(t,n,r){return this.demand(t,n,r)}require(t,n,r){return this.demand(t,n,r)}requiresArg(t){return P("<array|string|object> [number]",[t],arguments.length),typeof t=="string"&&h(this,N,"f").narg[t]?this:(this[fn](this.requiresArg.bind(this),"narg",t,NaN),this)}showCompletionScript(t,n){return P("[string] [string]",[t,n],arguments.length),t=t||this.$0,h(this,ln,"f").log(h(this,Ve,"f").generateCompletionScript(t,n||h(this,$e,"f")||"completion")),this}showHelp(t){if(P("[string|function]",[t],arguments.length),L(this,We,!0,"f"),!h(this,Q,"f").hasCachedHelpMessage()){if(!this.parsed){let r=this[Sn](h(this,xt,"f"),void 0,void 0,0,!0);if(se(r))return r.then(()=>{h(this,Q,"f").showHelp(t)}),this}let n=h(this,ge,"f").runDefaultBuilderOn(this);if(se(n))return n.then(()=>{h(this,Q,"f").showHelp(t)}),this}return h(this,Q,"f").showHelp(t),this}scriptName(t){return this.customScriptName=!0,this.$0=t,this}showHelpOnFail(t,n){return P("[boolean|string] [string]",[t,n],arguments.length),h(this,Q,"f").showHelpOnFail(t,n),this}showVersion(t){return P("[string|function]",[t],arguments.length),h(this,Q,"f").showVersion(t),this}skipValidation(t){return P("<array|string>",[t],arguments.length),this[vt]("skipValidation",t),this}strict(t){return P("[boolean]",[t],arguments.length),L(this,Vt,t!==!1,"f"),this}strictCommands(t){return P("[boolean]",[t],arguments.length),L(this,Kt,t!==!1,"f"),this}strictOptions(t){return P("[boolean]",[t],arguments.length),L(this,Qt,t!==!1,"f"),this}string(t){return P("<array|string>",[t],arguments.length),this[vt]("string",t),this[Zt](t),this}terminalWidth(){return P([],0),h(this,G,"f").process.stdColumns}updateLocale(t){return this.updateStrings(t)}updateStrings(t){return P("<object>",[t],arguments.length),L(this,Yt,!1,"f"),h(this,G,"f").y18n.updateLocale(t),this}usage(t,n,r,i){if(P("<string|null|undefined> [string|boolean] [function|object] [function]",[t,n,r,i],arguments.length),n!==void 0){if(Te(t,null,h(this,G,"f")),(t||"").match(/^\$0( |$)/))return this.command(t,n,r,i);throw new re(".usage() description must start with $0 if being used as alias for .command()")}else return h(this,Q,"f").usage(t),this}version(t,n,r){let i="version";if(P("[boolean|string] [string] [string]",[t,n,r],arguments.length),h(this,ot,"f")&&(this[Wr](h(this,ot,"f")),h(this,Q,"f").version(void 0),L(this,ot,null,"f")),arguments.length===0)r=this[Fo](),t=i;else if(arguments.length===1){if(t===!1)return this;r=t,t=i}else arguments.length===2&&(r=n,n=void 0);return L(this,ot,typeof t=="string"?t:i,"f"),n=n||h(this,Q,"f").deferY18nLookup("Show version number"),h(this,Q,"f").version(r||void 0),this.boolean(h(this,ot,"f")),this.describe(h(this,ot,"f"),n),this}wrap(t){return P("<number|null|undefined>",[t],arguments.length),h(this,Q,"f").wrap(t),this}[(ge=new WeakMap,qt=new WeakMap,_n=new WeakMap,Ve=new WeakMap,$e=new WeakMap,Kn=new WeakMap,At=new WeakMap,Yt=new WeakMap,Qn=new WeakMap,Ke=new WeakMap,Jn=new WeakMap,Qe=new WeakMap,it=new WeakMap,We=new WeakMap,Je=new WeakMap,ln=new WeakMap,Me=new WeakMap,N=new WeakMap,Xn=new WeakMap,Zn=new WeakMap,Be=new WeakMap,Gt=new WeakMap,cn=new WeakMap,zt=new WeakMap,xt=new WeakMap,er=new WeakMap,G=new WeakMap,Vt=new WeakMap,Kt=new WeakMap,Qt=new WeakMap,Q=new WeakMap,ot=new WeakMap,fe=new WeakMap,So)](t){if(!t._||!t["--"])return t;t._.push.apply(t._,t["--"]);try{delete t["--"]}catch(n){}return t}[jo](){return{log:(...t)=>{this[tr]()||console.log(...t),L(this,We,!0,"f"),h(this,Me,"f").length&&L(this,Me,h(this,Me,"f")+`
|
68
|
+
`,"f"),L(this,Me,h(this,Me,"f")+t.join(" "),"f")},error:(...t)=>{this[tr]()||console.error(...t),L(this,We,!0,"f"),h(this,Me,"f").length&&L(this,Me,h(this,Me,"f")+`
|
69
|
+
`,"f"),L(this,Me,h(this,Me,"f")+t.join(" "),"f")}}}[Wr](t){sn(h(this,N,"f")).forEach(n=>{if((i=>i==="configObjects")(n))return;let r=h(this,N,"f")[n];Array.isArray(r)?r.includes(t)&&r.splice(r.indexOf(t),1):typeof r=="object"&&delete r[t]}),delete h(this,Q,"f").getDescriptions()[t]}[Mo](t,n,r){h(this,Qn,"f")[r]||(h(this,G,"f").process.emitWarning(t,n),h(this,Qn,"f")[r]=!0)}[Io](){h(this,Jn,"f").push({options:h(this,N,"f"),configObjects:h(this,N,"f").configObjects.slice(0),exitProcess:h(this,Ke,"f"),groups:h(this,it,"f"),strict:h(this,Vt,"f"),strictCommands:h(this,Kt,"f"),strictOptions:h(this,Qt,"f"),completionCommand:h(this,$e,"f"),output:h(this,Me,"f"),exitError:h(this,At,"f"),hasOutput:h(this,We,"f"),parsed:this.parsed,parseFn:h(this,Be,"f"),parseContext:h(this,Gt,"f")}),h(this,Q,"f").freeze(),h(this,fe,"f").freeze(),h(this,ge,"f").freeze(),h(this,Qe,"f").freeze()}[Po](){let t="",n;return/\b(node|iojs|electron)(\.exe)?$/.test(h(this,G,"f").process.argv()[0])?n=h(this,G,"f").process.argv().slice(1,2):n=h(this,G,"f").process.argv().slice(0,1),t=n.map(r=>{let i=this[Bo](h(this,qt,"f"),r);return r.match(/^(\/|([a-zA-Z]:)?\\)/)&&i.length<r.length?i:r}).join(" ").trim(),h(this,G,"f").getEnv("_")&&h(this,G,"f").getProcessArgvBin()===h(this,G,"f").getEnv("_")&&(t=h(this,G,"f").getEnv("_").replace(`${h(this,G,"f").path.dirname(h(this,G,"f").process.execPath())}/`,"")),t}[Jt](){return h(this,Zn,"f")}[Br](){if(!h(this,Yt,"f"))return;let t=h(this,G,"f").getEnv("LC_ALL")||h(this,G,"f").getEnv("LC_MESSAGES")||h(this,G,"f").getEnv("LANG")||h(this,G,"f").getEnv("LANGUAGE")||"en_US";this.locale(t.replace(/[.:].*/,""))}[Fo](){return this[Hr]().version||"unknown"}[Lo](t){let n=t["--"]?t["--"]:t._;for(let r=0,i;(i=n[r])!==void 0;r++)h(this,G,"f").Parser.looksLikeNumber(i)&&Number.isSafeInteger(Math.floor(parseFloat(`${i}`)))&&(n[r]=Number(i));return t}[Hr](t){let n=t||"*";if(h(this,cn,"f")[n])return h(this,cn,"f")[n];let r={};try{let i=t||h(this,G,"f").mainFilename;!t&&h(this,G,"f").path.extname(i)&&(i=h(this,G,"f").path.dirname(i));let s=h(this,G,"f").findUp(i,(o,a)=>{if(a.includes("package.json"))return"package.json"});Te(s,void 0,h(this,G,"f")),r=JSON.parse(h(this,G,"f").readFileSync(s,"utf8"))}catch(i){}return h(this,cn,"f")[n]=r||{},h(this,cn,"f")[n]}[vt](t,n){n=[].concat(n),n.forEach(r=>{r=this[Gr](r),h(this,N,"f")[t].push(r)})}[fn](t,n,r,i){this[Yr](t,n,r,i,(s,o,a)=>{h(this,N,"f")[s][o]=a})}[qr](t,n,r,i){this[Yr](t,n,r,i,(s,o,a)=>{h(this,N,"f")[s][o]=(h(this,N,"f")[s][o]||[]).concat(a)})}[Yr](t,n,r,i,s){if(Array.isArray(r))r.forEach(o=>{t(o,i)});else if((o=>typeof o=="object")(r))for(let o of sn(r))t(o,r[o]);else s(n,this[Gr](r),i)}[Gr](t){return t==="__proto__"?"___proto___":t}[zr](t,n){return this[fn](this[zr].bind(this),"key",t,n),this}[Vr](){var t,n,r,i,s,o,a,l,f,u,c,d;let p=h(this,Jn,"f").pop();Te(p,void 0,h(this,G,"f"));let b;t=this,n=this,r=this,i=this,s=this,o=this,a=this,l=this,f=this,u=this,c=this,d=this,{options:{set value(g){L(t,N,g,"f")}}.value,configObjects:b,exitProcess:{set value(g){L(n,Ke,g,"f")}}.value,groups:{set value(g){L(r,it,g,"f")}}.value,output:{set value(g){L(i,Me,g,"f")}}.value,exitError:{set value(g){L(s,At,g,"f")}}.value,hasOutput:{set value(g){L(o,We,g,"f")}}.value,parsed:this.parsed,strict:{set value(g){L(a,Vt,g,"f")}}.value,strictCommands:{set value(g){L(l,Kt,g,"f")}}.value,strictOptions:{set value(g){L(f,Qt,g,"f")}}.value,completionCommand:{set value(g){L(u,$e,g,"f")}}.value,parseFn:{set value(g){L(c,Be,g,"f")}}.value,parseContext:{set value(g){L(d,Gt,g,"f")}}.value}=p,h(this,N,"f").configObjects=b,h(this,Q,"f").unfreeze(),h(this,fe,"f").unfreeze(),h(this,ge,"f").unfreeze(),h(this,Qe,"f").unfreeze()}[Do](t,n){return Ht(n,r=>(t(r),r))}getInternalMethods(){return{getCommandInstance:this[To].bind(this),getContext:this[No].bind(this),getHasOutput:this[ko].bind(this),getLoggerInstance:this[Ro].bind(this),getParseContext:this[Uo].bind(this),getParserConfiguration:this[Jt].bind(this),getUsageInstance:this[$o].bind(this),getValidationInstance:this[Wo].bind(this),hasParseCallback:this[tr].bind(this),postProcess:this[Xt].bind(this),reset:this[Kr].bind(this),runValidation:this[Qr].bind(this),runYargsParserAndExecuteCommands:this[Sn].bind(this),setHasOutput:this[Ho].bind(this)}}[To](){return h(this,ge,"f")}[No](){return h(this,_n,"f")}[ko](){return h(this,We,"f")}[Ro](){return h(this,ln,"f")}[Uo](){return h(this,Gt,"f")||{}}[$o](){return h(this,Q,"f")}[Wo](){return h(this,fe,"f")}[tr](){return!!h(this,Be,"f")}[Xt](t,n,r,i){return r||se(t)||(n||(t=this[So](t)),(this[Jt]()["parse-positional-numbers"]||this[Jt]()["parse-positional-numbers"]===void 0)&&(t=this[Lo](t)),i&&(t=Bt(t,this,h(this,Qe,"f").getMiddleware(),!1))),t}[Kr](t={}){L(this,N,h(this,N,"f")||{},"f");let n={};n.local=h(this,N,"f").local||[],n.configObjects=h(this,N,"f").configObjects||[];let r={};n.local.forEach(o=>{r[o]=!0,(t[o]||[]).forEach(a=>{r[a]=!0})}),Object.assign(h(this,zt,"f"),Object.keys(h(this,it,"f")).reduce((o,a)=>{let l=h(this,it,"f")[a].filter(f=>!(f in r));return l.length>0&&(o[a]=l),o},{})),L(this,it,{},"f");let i=["array","boolean","string","skipValidation","count","normalize","number","hiddenOptions"],s=["narg","key","alias","default","defaultDescription","config","choices","demandedOptions","demandedCommands","deprecatedOptions"];return i.forEach(o=>{n[o]=(h(this,N,"f")[o]||[]).filter(a=>!r[a])}),s.forEach(o=>{n[o]=yt(h(this,N,"f")[o],a=>!r[a])}),n.envPrefix=h(this,N,"f").envPrefix,L(this,N,n,"f"),L(this,Q,h(this,Q,"f")?h(this,Q,"f").reset(r):yo(this,h(this,G,"f")),"f"),L(this,fe,h(this,fe,"f")?h(this,fe,"f").reset(r):Eo(this,h(this,Q,"f"),h(this,G,"f")),"f"),L(this,ge,h(this,ge,"f")?h(this,ge,"f").reset():mo(h(this,Q,"f"),h(this,fe,"f"),h(this,Qe,"f"),h(this,G,"f")),"f"),h(this,Ve,"f")||L(this,Ve,vo(this,h(this,Q,"f"),h(this,ge,"f"),h(this,G,"f")),"f"),h(this,Qe,"f").reset(),L(this,$e,null,"f"),L(this,Me,"","f"),L(this,At,null,"f"),L(this,We,!1,"f"),this.parsed=!1,this}[Bo](t,n){return h(this,G,"f").path.relative(t,n)}[Sn](t,n,r,i=0,s=!1){let o=!!r||s;t=t||h(this,xt,"f"),h(this,N,"f").__=h(this,G,"f").y18n.__,h(this,N,"f").configuration=this[Jt]();let a=!!h(this,N,"f").configuration["populate--"],l=Object.assign({},h(this,N,"f").configuration,{"populate--":!0}),f=h(this,G,"f").Parser.detailed(t,Object.assign({},h(this,N,"f"),{configuration:{"parse-positional-numbers":!1,...l}})),u=Object.assign(f.argv,h(this,Gt,"f")),c,d=f.aliases,p=!1,b=!1;Object.keys(u).forEach(g=>{g===h(this,Je,"f")&&u[g]?p=!0:g===h(this,ot,"f")&&u[g]&&(b=!0)}),u.$0=this.$0,this.parsed=f,i===0&&h(this,Q,"f").clearCachedHelpMessage();try{if(this[Br](),n)return this[Xt](u,a,!!r,!1);h(this,Je,"f")&&[h(this,Je,"f")].concat(d[h(this,Je,"f")]||[]).filter(B=>B.length>1).includes(""+u._[u._.length-1])&&(u._.pop(),p=!0);let g=h(this,ge,"f").getCommands(),m=h(this,Ve,"f").completionKey in u,C=p||m||s;if(u._.length){if(g.length){let _;for(let B=i||0,q;u._[B]!==void 0;B++)if(q=String(u._[B]),g.includes(q)&&q!==h(this,$e,"f")){let X=h(this,ge,"f").runCommand(q,this,f,B+1,s,p||b||s);return this[Xt](X,a,!!r,!1)}else if(!_&&q!==h(this,$e,"f")){_=q;break}!h(this,ge,"f").hasDefaultCommand()&&h(this,er,"f")&&_&&!C&&h(this,fe,"f").recommendCommands(_,g)}h(this,$e,"f")&&u._.includes(h(this,$e,"f"))&&!m&&(h(this,Ke,"f")&&wt(!0),this.showCompletionScript(),this.exit(0))}if(h(this,ge,"f").hasDefaultCommand()&&!C){let _=h(this,ge,"f").runCommand(null,this,f,0,s,p||b||s);return this[Xt](_,a,!!r,!1)}if(m){h(this,Ke,"f")&&wt(!0),t=[].concat(t);let _=t.slice(t.indexOf(`--${h(this,Ve,"f").completionKey}`)+1);return h(this,Ve,"f").getCompletion(_,(B,q)=>{if(B)throw new re(B.message);(q||[]).forEach(X=>{h(this,ln,"f").log(X)}),this.exit(0)}),this[Xt](u,!a,!!r,!1)}if(h(this,We,"f")||(p?(h(this,Ke,"f")&&wt(!0),o=!0,this.showHelp("log"),this.exit(0)):b&&(h(this,Ke,"f")&&wt(!0),o=!0,h(this,Q,"f").showVersion("log"),this.exit(0))),!o&&h(this,N,"f").skipValidation.length>0&&(o=Object.keys(u).some(_=>h(this,N,"f").skipValidation.indexOf(_)>=0&&u[_]===!0)),!o){if(f.error)throw new re(f.error.message);if(!m){let _=this[Qr](d,{},f.error);r||(c=Bt(u,this,h(this,Qe,"f").getMiddleware(),!0)),c=this[Do](_,c!=null?c:u),se(c)&&!r&&(c=c.then(()=>Bt(u,this,h(this,Qe,"f").getMiddleware(),!1)))}}}catch(g){if(g instanceof re)h(this,Q,"f").fail(g.message,g);else throw g}return this[Xt](c!=null?c:u,a,!!r,!0)}[Qr](t,n,r,i){let s={...this.getDemandedOptions()};return o=>{if(r)throw new re(r.message);h(this,fe,"f").nonOptionCount(o),h(this,fe,"f").requiredArguments(o,s);let a=!1;h(this,Kt,"f")&&(a=h(this,fe,"f").unknownCommands(o)),h(this,Vt,"f")&&!a?h(this,fe,"f").unknownArguments(o,t,n,!!i):h(this,Qt,"f")&&h(this,fe,"f").unknownArguments(o,t,{},!1,!1),h(this,fe,"f").limitedChoices(o),h(this,fe,"f").implications(o),h(this,fe,"f").conflicting(o)}}[Ho](){L(this,We,!0,"f")}[Zt](t){if(typeof t=="string")h(this,N,"f").key[t]=!0;else for(let n of t)h(this,N,"f").key[n]=!0}};function go(e){return!!e&&typeof e.getInternalMethods=="function"}var Nc=qo(lo),Ne=Nc;w();w();import op from"isomorphic-unfetch";w();w();var kc=Object.create,nr=Object.defineProperty,Rc=Object.defineProperties,Uc=Object.getOwnPropertyDescriptor,$c=Object.getOwnPropertyDescriptors,Wc=Object.getOwnPropertyNames,Go=Object.getOwnPropertySymbols,Bc=Object.getPrototypeOf,Ko=Object.prototype.hasOwnProperty,Hc=Object.prototype.propertyIsEnumerable,zo=(e,t,n)=>t in e?nr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,qc=(e,t)=>{for(var n in t||(t={}))Ko.call(t,n)&&zo(e,n,t[n]);if(Go)for(var n of Go(t))Hc.call(t,n)&&zo(e,n,t[n]);return e},Yc=(e,t)=>Rc(e,$c(t)),Gc=e=>nr(e,"__esModule",{value:!0}),Vo=(e=>typeof _e!="undefined"?_e:typeof Proxy!="undefined"?new Proxy(e,{get:(t,n)=>(typeof _e!="undefined"?_e:t)[n]}):e)(function(e){if(typeof _e!="undefined")return _e.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')}),zc=(e,t)=>()=>(e&&(t=e(e=0)),t),st=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Vc=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Wc(t))!Ko.call(e,i)&&(n||i!=="default")&&nr(e,i,{get:()=>t[i],enumerable:!(r=Uc(t,i))||r.enumerable});return e},Jr=(e,t)=>Vc(Gc(nr(e!=null?kc(Bc(e)):{},"default",!t&&e&&e.__esModule?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e),Ie=zc(()=>{}),Kc=st((e,t)=>{"use strict";Ie(),t.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}}),Qo=st((e,t)=>{Ie();var n=Kc(),r={};for(let o of Object.keys(n))r[n[o]]=o;var i={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};t.exports=i;for(let o of Object.keys(i)){if(!("channels"in i[o]))throw new Error("missing channels property: "+o);if(!("labels"in i[o]))throw new Error("missing channel labels property: "+o);if(i[o].labels.length!==i[o].channels)throw new Error("channel and label counts mismatch: "+o);let{channels:a,labels:l}=i[o];delete i[o].channels,delete i[o].labels,Object.defineProperty(i[o],"channels",{value:a}),Object.defineProperty(i[o],"labels",{value:l})}i.rgb.hsl=function(o){let a=o[0]/255,l=o[1]/255,f=o[2]/255,u=Math.min(a,l,f),c=Math.max(a,l,f),d=c-u,p,b;c===u?p=0:a===c?p=(l-f)/d:l===c?p=2+(f-a)/d:f===c&&(p=4+(a-l)/d),p=Math.min(p*60,360),p<0&&(p+=360);let g=(u+c)/2;return c===u?b=0:g<=.5?b=d/(c+u):b=d/(2-c-u),[p,b*100,g*100]},i.rgb.hsv=function(o){let a,l,f,u,c,d=o[0]/255,p=o[1]/255,b=o[2]/255,g=Math.max(d,p,b),m=g-Math.min(d,p,b),C=function(_){return(g-_)/6/m+1/2};return m===0?(u=0,c=0):(c=m/g,a=C(d),l=C(p),f=C(b),d===g?u=f-l:p===g?u=1/3+a-f:b===g&&(u=2/3+l-a),u<0?u+=1:u>1&&(u-=1)),[u*360,c*100,g*100]},i.rgb.hwb=function(o){let a=o[0],l=o[1],f=o[2],u=i.rgb.hsl(o)[0],c=1/255*Math.min(a,Math.min(l,f));return f=1-1/255*Math.max(a,Math.max(l,f)),[u,c*100,f*100]},i.rgb.cmyk=function(o){let a=o[0]/255,l=o[1]/255,f=o[2]/255,u=Math.min(1-a,1-l,1-f),c=(1-a-u)/(1-u)||0,d=(1-l-u)/(1-u)||0,p=(1-f-u)/(1-u)||0;return[c*100,d*100,p*100,u*100]};function s(o,a){return(o[0]-a[0])**2+(o[1]-a[1])**2+(o[2]-a[2])**2}i.rgb.keyword=function(o){let a=r[o];if(a)return a;let l=1/0,f;for(let u of Object.keys(n)){let c=n[u],d=s(o,c);d<l&&(l=d,f=u)}return f},i.keyword.rgb=function(o){return n[o]},i.rgb.xyz=function(o){let a=o[0]/255,l=o[1]/255,f=o[2]/255;a=a>.04045?((a+.055)/1.055)**2.4:a/12.92,l=l>.04045?((l+.055)/1.055)**2.4:l/12.92,f=f>.04045?((f+.055)/1.055)**2.4:f/12.92;let u=a*.4124+l*.3576+f*.1805,c=a*.2126+l*.7152+f*.0722,d=a*.0193+l*.1192+f*.9505;return[u*100,c*100,d*100]},i.rgb.lab=function(o){let a=i.rgb.xyz(o),l=a[0],f=a[1],u=a[2];l/=95.047,f/=100,u/=108.883,l=l>.008856?l**(1/3):7.787*l+16/116,f=f>.008856?f**(1/3):7.787*f+16/116,u=u>.008856?u**(1/3):7.787*u+16/116;let c=116*f-16,d=500*(l-f),p=200*(f-u);return[c,d,p]},i.hsl.rgb=function(o){let a=o[0]/360,l=o[1]/100,f=o[2]/100,u,c,d;if(l===0)return d=f*255,[d,d,d];f<.5?u=f*(1+l):u=f+l-f*l;let p=2*f-u,b=[0,0,0];for(let g=0;g<3;g++)c=a+1/3*-(g-1),c<0&&c++,c>1&&c--,6*c<1?d=p+(u-p)*6*c:2*c<1?d=u:3*c<2?d=p+(u-p)*(2/3-c)*6:d=p,b[g]=d*255;return b},i.hsl.hsv=function(o){let a=o[0],l=o[1]/100,f=o[2]/100,u=l,c=Math.max(f,.01);f*=2,l*=f<=1?f:2-f,u*=c<=1?c:2-c;let d=(f+l)/2,p=f===0?2*u/(c+u):2*l/(f+l);return[a,p*100,d*100]},i.hsv.rgb=function(o){let a=o[0]/60,l=o[1]/100,f=o[2]/100,u=Math.floor(a)%6,c=a-Math.floor(a),d=255*f*(1-l),p=255*f*(1-l*c),b=255*f*(1-l*(1-c));switch(f*=255,u){case 0:return[f,b,d];case 1:return[p,f,d];case 2:return[d,f,b];case 3:return[d,p,f];case 4:return[b,d,f];case 5:return[f,d,p]}},i.hsv.hsl=function(o){let a=o[0],l=o[1]/100,f=o[2]/100,u=Math.max(f,.01),c,d;d=(2-l)*f;let p=(2-l)*u;return c=l*u,c/=p<=1?p:2-p,c=c||0,d/=2,[a,c*100,d*100]},i.hwb.rgb=function(o){let a=o[0]/360,l=o[1]/100,f=o[2]/100,u=l+f,c;u>1&&(l/=u,f/=u);let d=Math.floor(6*a),p=1-f;c=6*a-d,(d&1)!==0&&(c=1-c);let b=l+c*(p-l),g,m,C;switch(d){default:case 6:case 0:g=p,m=b,C=l;break;case 1:g=b,m=p,C=l;break;case 2:g=l,m=p,C=b;break;case 3:g=l,m=b,C=p;break;case 4:g=b,m=l,C=p;break;case 5:g=p,m=l,C=b;break}return[g*255,m*255,C*255]},i.cmyk.rgb=function(o){let a=o[0]/100,l=o[1]/100,f=o[2]/100,u=o[3]/100,c=1-Math.min(1,a*(1-u)+u),d=1-Math.min(1,l*(1-u)+u),p=1-Math.min(1,f*(1-u)+u);return[c*255,d*255,p*255]},i.xyz.rgb=function(o){let a=o[0]/100,l=o[1]/100,f=o[2]/100,u,c,d;return u=a*3.2406+l*-1.5372+f*-.4986,c=a*-.9689+l*1.8758+f*.0415,d=a*.0557+l*-.204+f*1.057,u=u>.0031308?1.055*u**(1/2.4)-.055:u*12.92,c=c>.0031308?1.055*c**(1/2.4)-.055:c*12.92,d=d>.0031308?1.055*d**(1/2.4)-.055:d*12.92,u=Math.min(Math.max(0,u),1),c=Math.min(Math.max(0,c),1),d=Math.min(Math.max(0,d),1),[u*255,c*255,d*255]},i.xyz.lab=function(o){let a=o[0],l=o[1],f=o[2];a/=95.047,l/=100,f/=108.883,a=a>.008856?a**(1/3):7.787*a+16/116,l=l>.008856?l**(1/3):7.787*l+16/116,f=f>.008856?f**(1/3):7.787*f+16/116;let u=116*l-16,c=500*(a-l),d=200*(l-f);return[u,c,d]},i.lab.xyz=function(o){let a=o[0],l=o[1],f=o[2],u,c,d;c=(a+16)/116,u=l/500+c,d=c-f/200;let p=c**3,b=u**3,g=d**3;return c=p>.008856?p:(c-16/116)/7.787,u=b>.008856?b:(u-16/116)/7.787,d=g>.008856?g:(d-16/116)/7.787,u*=95.047,c*=100,d*=108.883,[u,c,d]},i.lab.lch=function(o){let a=o[0],l=o[1],f=o[2],u;u=Math.atan2(f,l)*360/2/Math.PI,u<0&&(u+=360);let c=Math.sqrt(l*l+f*f);return[a,c,u]},i.lch.lab=function(o){let a=o[0],l=o[1],f=o[2]/360*2*Math.PI,u=l*Math.cos(f),c=l*Math.sin(f);return[a,u,c]},i.rgb.ansi16=function(o,a=null){let[l,f,u]=o,c=a===null?i.rgb.hsv(o)[2]:a;if(c=Math.round(c/50),c===0)return 30;let d=30+(Math.round(u/255)<<2|Math.round(f/255)<<1|Math.round(l/255));return c===2&&(d+=60),d},i.hsv.ansi16=function(o){return i.rgb.ansi16(i.hsv.rgb(o),o[2])},i.rgb.ansi256=function(o){let a=o[0],l=o[1],f=o[2];return a===l&&l===f?a<8?16:a>248?231:Math.round((a-8)/247*24)+232:16+36*Math.round(a/255*5)+6*Math.round(l/255*5)+Math.round(f/255*5)},i.ansi16.rgb=function(o){let a=o%10;if(a===0||a===7)return o>50&&(a+=3.5),a=a/10.5*255,[a,a,a];let l=(~~(o>50)+1)*.5,f=(a&1)*l*255,u=(a>>1&1)*l*255,c=(a>>2&1)*l*255;return[f,u,c]},i.ansi256.rgb=function(o){if(o>=232){let c=(o-232)*10+8;return[c,c,c]}o-=16;let a,l=Math.floor(o/36)/5*255,f=Math.floor((a=o%36)/6)/5*255,u=a%6/5*255;return[l,f,u]},i.rgb.hex=function(o){let a=(((Math.round(o[0])&255)<<16)+((Math.round(o[1])&255)<<8)+(Math.round(o[2])&255)).toString(16).toUpperCase();return"000000".substring(a.length)+a},i.hex.rgb=function(o){let a=o.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!a)return[0,0,0];let l=a[0];a[0].length===3&&(l=l.split("").map(p=>p+p).join(""));let f=parseInt(l,16),u=f>>16&255,c=f>>8&255,d=f&255;return[u,c,d]},i.rgb.hcg=function(o){let a=o[0]/255,l=o[1]/255,f=o[2]/255,u=Math.max(Math.max(a,l),f),c=Math.min(Math.min(a,l),f),d=u-c,p,b;return d<1?p=c/(1-d):p=0,d<=0?b=0:u===a?b=(l-f)/d%6:u===l?b=2+(f-a)/d:b=4+(a-l)/d,b/=6,b%=1,[b*360,d*100,p*100]},i.hsl.hcg=function(o){let a=o[1]/100,l=o[2]/100,f=l<.5?2*a*l:2*a*(1-l),u=0;return f<1&&(u=(l-.5*f)/(1-f)),[o[0],f*100,u*100]},i.hsv.hcg=function(o){let a=o[1]/100,l=o[2]/100,f=a*l,u=0;return f<1&&(u=(l-f)/(1-f)),[o[0],f*100,u*100]},i.hcg.rgb=function(o){let a=o[0]/360,l=o[1]/100,f=o[2]/100;if(l===0)return[f*255,f*255,f*255];let u=[0,0,0],c=a%1*6,d=c%1,p=1-d,b=0;switch(Math.floor(c)){case 0:u[0]=1,u[1]=d,u[2]=0;break;case 1:u[0]=p,u[1]=1,u[2]=0;break;case 2:u[0]=0,u[1]=1,u[2]=d;break;case 3:u[0]=0,u[1]=p,u[2]=1;break;case 4:u[0]=d,u[1]=0,u[2]=1;break;default:u[0]=1,u[1]=0,u[2]=p}return b=(1-l)*f,[(l*u[0]+b)*255,(l*u[1]+b)*255,(l*u[2]+b)*255]},i.hcg.hsv=function(o){let a=o[1]/100,l=o[2]/100,f=a+l*(1-a),u=0;return f>0&&(u=a/f),[o[0],u*100,f*100]},i.hcg.hsl=function(o){let a=o[1]/100,l=o[2]/100*(1-a)+.5*a,f=0;return l>0&&l<.5?f=a/(2*l):l>=.5&&l<1&&(f=a/(2*(1-l))),[o[0],f*100,l*100]},i.hcg.hwb=function(o){let a=o[1]/100,l=o[2]/100,f=a+l*(1-a);return[o[0],(f-a)*100,(1-f)*100]},i.hwb.hcg=function(o){let a=o[1]/100,l=o[2]/100,f=1-l,u=f-a,c=0;return u<1&&(c=(f-u)/(1-u)),[o[0],u*100,c*100]},i.apple.rgb=function(o){return[o[0]/65535*255,o[1]/65535*255,o[2]/65535*255]},i.rgb.apple=function(o){return[o[0]/255*65535,o[1]/255*65535,o[2]/255*65535]},i.gray.rgb=function(o){return[o[0]/100*255,o[0]/100*255,o[0]/100*255]},i.gray.hsl=function(o){return[0,0,o[0]]},i.gray.hsv=i.gray.hsl,i.gray.hwb=function(o){return[0,100,o[0]]},i.gray.cmyk=function(o){return[0,0,0,o[0]]},i.gray.lab=function(o){return[o[0],0,0]},i.gray.hex=function(o){let a=Math.round(o[0]/100*255)&255,l=((a<<16)+(a<<8)+a).toString(16).toUpperCase();return"000000".substring(l.length)+l},i.rgb.gray=function(o){return[(o[0]+o[1]+o[2])/3/255*100]}}),Qc=st((e,t)=>{Ie();var n=Qo();function r(){let a={},l=Object.keys(n);for(let f=l.length,u=0;u<f;u++)a[l[u]]={distance:-1,parent:null};return a}function i(a){let l=r(),f=[a];for(l[a].distance=0;f.length;){let u=f.pop(),c=Object.keys(n[u]);for(let d=c.length,p=0;p<d;p++){let b=c[p],g=l[b];g.distance===-1&&(g.distance=l[u].distance+1,g.parent=u,f.unshift(b))}}return l}function s(a,l){return function(f){return l(a(f))}}function o(a,l){let f=[l[a].parent,a],u=n[l[a].parent][a],c=l[a].parent;for(;l[c].parent;)f.unshift(l[c].parent),u=s(n[l[c].parent][c],u),c=l[c].parent;return u.conversion=f,u}t.exports=function(a){let l=i(a),f={},u=Object.keys(l);for(let c=u.length,d=0;d<c;d++){let p=u[d];l[p].parent!==null&&(f[p]=o(p,l))}return f}}),Jc=st((e,t)=>{Ie();var n=Qo(),r=Qc(),i={},s=Object.keys(n);function o(l){let f=function(...u){let c=u[0];return c==null?c:(c.length>1&&(u=c),l(u))};return"conversion"in l&&(f.conversion=l.conversion),f}function a(l){let f=function(...u){let c=u[0];if(c==null)return c;c.length>1&&(u=c);let d=l(u);if(typeof d=="object")for(let p=d.length,b=0;b<p;b++)d[b]=Math.round(d[b]);return d};return"conversion"in l&&(f.conversion=l.conversion),f}s.forEach(l=>{i[l]={},Object.defineProperty(i[l],"channels",{value:n[l].channels}),Object.defineProperty(i[l],"labels",{value:n[l].labels});let f=r(l);Object.keys(f).forEach(u=>{let c=f[u];i[l][u]=a(c),i[l][u].raw=o(c)})}),t.exports=i}),Xc=st((e,t)=>{"use strict";Ie();var n=(c,d)=>(...p)=>`\x1B[${c(...p)+d}m`,r=(c,d)=>(...p)=>{let b=c(...p);return`\x1B[${38+d};5;${b}m`},i=(c,d)=>(...p)=>{let b=c(...p);return`\x1B[${38+d};2;${b[0]};${b[1]};${b[2]}m`},s=c=>c,o=(c,d,p)=>[c,d,p],a=(c,d,p)=>{Object.defineProperty(c,d,{get:()=>{let b=p();return Object.defineProperty(c,d,{value:b,enumerable:!0,configurable:!0}),b},enumerable:!0,configurable:!0})},l,f=(c,d,p,b)=>{l===void 0&&(l=Jc());let g=b?10:0,m={};for(let[C,_]of Object.entries(l)){let B=C==="ansi16"?"ansi":C;C===d?m[B]=c(p,g):typeof _=="object"&&(m[B]=c(_[d],g))}return m};function u(){let c=new Map,d={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};d.color.gray=d.color.blackBright,d.bgColor.bgGray=d.bgColor.bgBlackBright,d.color.grey=d.color.blackBright,d.bgColor.bgGrey=d.bgColor.bgBlackBright;for(let[p,b]of Object.entries(d)){for(let[g,m]of Object.entries(b))d[g]={open:`\x1B[${m[0]}m`,close:`\x1B[${m[1]}m`},b[g]=d[g],c.set(m[0],m[1]);Object.defineProperty(d,p,{value:b,enumerable:!1})}return Object.defineProperty(d,"codes",{value:c,enumerable:!1}),d.color.close="\x1B[39m",d.bgColor.close="\x1B[49m",a(d.color,"ansi",()=>f(n,"ansi16",s,!1)),a(d.color,"ansi256",()=>f(r,"ansi256",s,!1)),a(d.color,"ansi16m",()=>f(i,"rgb",o,!1)),a(d.bgColor,"ansi",()=>f(n,"ansi16",s,!0)),a(d.bgColor,"ansi256",()=>f(r,"ansi256",s,!0)),a(d.bgColor,"ansi16m",()=>f(i,"rgb",o,!0)),d}Object.defineProperty(t,"exports",{enumerable:!0,get:u})}),Zc=st((e,t)=>{"use strict";Ie(),t.exports=(n,r=process.argv)=>{let i=n.startsWith("-")?"":n.length===1?"-":"--",s=r.indexOf(i+n),o=r.indexOf("--");return s!==-1&&(o===-1||s<o)}}),ef=st((e,t)=>{"use strict";Ie();var n=Vo("os"),r=Vo("tty"),i=Zc(),{env:s}=process,o;i("no-color")||i("no-colors")||i("color=false")||i("color=never")?o=0:(i("color")||i("colors")||i("color=true")||i("color=always"))&&(o=1),"FORCE_COLOR"in s&&(s.FORCE_COLOR==="true"?o=1:s.FORCE_COLOR==="false"?o=0:o=s.FORCE_COLOR.length===0?1:Math.min(parseInt(s.FORCE_COLOR,10),3));function a(u){return u===0?!1:{level:u,hasBasic:!0,has256:u>=2,has16m:u>=3}}function l(u,c){if(o===0)return 0;if(i("color=16m")||i("color=full")||i("color=truecolor"))return 3;if(i("color=256"))return 2;if(u&&!c&&o===void 0)return 0;let d=o||0;if(s.TERM==="dumb")return d;if(process.platform==="win32"){let p=n.release().split(".");return Number(p[0])>=10&&Number(p[2])>=10586?Number(p[2])>=14931?3:2:1}if("CI"in s)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(p=>p in s)||s.CI_NAME==="codeship"?1:d;if("TEAMCITY_VERSION"in s)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(s.TEAMCITY_VERSION)?1:0;if(s.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in s){let p=parseInt((s.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(s.TERM_PROGRAM){case"iTerm.app":return p>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(s.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(s.TERM)||"COLORTERM"in s?1:d}function f(u){let c=l(u,u&&u.isTTY);return a(c)}t.exports={supportsColor:f,stdout:a(l(!0,r.isatty(1))),stderr:a(l(!0,r.isatty(2)))}}),tf=st((e,t)=>{"use strict";Ie();var n=(i,s,o)=>{let a=i.indexOf(s);if(a===-1)return i;let l=s.length,f=0,u="";do u+=i.substr(f,a-f)+s+o,f=a+l,a=i.indexOf(s,f);while(a!==-1);return u+=i.substr(f),u},r=(i,s,o,a)=>{let l=0,f="";do{let u=i[a-1]==="\r";f+=i.substr(l,(u?a-1:a)-l)+s+(u?`\r
|
70
70
|
`:`
|
71
71
|
`)+o,l=a+1,a=i.indexOf(`
|
72
72
|
`,l)}while(a!==-1);return f+=i.substr(l),f};t.exports={stringReplaceAll:n,stringEncaseCRLFWithFirstIndex:r}}),nf=st((e,t)=>{"use strict";Ie();var n=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,r=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,i=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,s=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,o=new Map([["n",`
|
73
|
-
`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function a(c){let d=c[0]==="u",p=c[1]==="{";return d&&!p&&c.length===5||c[0]==="x"&&c.length===3?String.fromCharCode(parseInt(c.slice(1),16)):d&&p?String.fromCodePoint(parseInt(c.slice(2,-1),16)):o.get(c)||c}function l(c,d){let p=[],b=d.trim().split(/\s*,\s*/g),g;for(let m of b){let C=Number(m);if(!Number.isNaN(C))p.push(C);else if(g=m.match(i))p.push(g[2].replace(s,(_,
|
74
|
-
`);return I!==-1&&(
|
73
|
+
`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function a(c){let d=c[0]==="u",p=c[1]==="{";return d&&!p&&c.length===5||c[0]==="x"&&c.length===3?String.fromCharCode(parseInt(c.slice(1),16)):d&&p?String.fromCodePoint(parseInt(c.slice(2,-1),16)):o.get(c)||c}function l(c,d){let p=[],b=d.trim().split(/\s*,\s*/g),g;for(let m of b){let C=Number(m);if(!Number.isNaN(C))p.push(C);else if(g=m.match(i))p.push(g[2].replace(s,(_,B,q)=>B?a(B):q));else throw new Error(`Invalid Chalk template style argument: ${m} (in style '${c}')`)}return p}function f(c){r.lastIndex=0;let d=[],p;for(;(p=r.exec(c))!==null;){let b=p[1];if(p[2]){let g=l(b,p[2]);d.push([b].concat(g))}else d.push([b])}return d}function u(c,d){let p={};for(let g of d)for(let m of g.styles)p[m[0]]=g.inverse?null:m.slice(1);let b=c;for(let[g,m]of Object.entries(p))if(Array.isArray(m)){if(!(g in b))throw new Error(`Unknown Chalk style: ${g}`);b=m.length>0?b[g](...m):b[g]}return b}t.exports=(c,d)=>{let p=[],b=[],g=[];if(d.replace(n,(m,C,_,B,q,X)=>{if(C)g.push(a(C));else if(B){let z=g.join("");g=[],b.push(p.length===0?z:u(c,p)(z)),p.push({inverse:_,styles:f(B)})}else if(q){if(p.length===0)throw new Error("Found extraneous } in Chalk template literal");b.push(u(c,p)(g.join(""))),g=[],p.pop()}else g.push(X)}),b.push(g.join("")),p.length>0){let m=`Chalk template literal is missing ${p.length} closing bracket${p.length===1?"":"s"} (\`}\`)`;throw new Error(m)}return b.join("")}}),Xr=st((e,t)=>{"use strict";Ie();var n=Xc(),{stdout:r,stderr:i}=ef(),{stringReplaceAll:s,stringEncaseCRLFWithFirstIndex:o}=tf(),{isArray:a}=Array,l=["ansi","ansi","ansi256","ansi16m"],f=Object.create(null),u=(z,U={})=>{if(U.level&&!(Number.isInteger(U.level)&&U.level>=0&&U.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let J=r?r.level:0;z.level=U.level===void 0?J:U.level},c=class{constructor(z){return d(z)}},d=z=>{let U={};return u(U,z),U.template=(...J)=>q(U.template,...J),Object.setPrototypeOf(U,p.prototype),Object.setPrototypeOf(U.template,U),U.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},U.template.Instance=c,U.template};function p(z){return d(z)}for(let[z,U]of Object.entries(n))f[z]={get(){let J=C(this,m(U.open,U.close,this._styler),this._isEmpty);return Object.defineProperty(this,z,{value:J}),J}};f.visible={get(){let z=C(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:z}),z}};var b=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let z of b)f[z]={get(){let{level:U}=this;return function(...J){let te=m(n.color[l[U]][z](...J),n.color.close,this._styler);return C(this,te,this._isEmpty)}}};for(let z of b){let U="bg"+z[0].toUpperCase()+z.slice(1);f[U]={get(){let{level:J}=this;return function(...te){let V=m(n.bgColor[l[J]][z](...te),n.bgColor.close,this._styler);return C(this,V,this._isEmpty)}}}}var g=Object.defineProperties(()=>{},Yc(qc({},f),{level:{enumerable:!0,get(){return this._generator.level},set(z){this._generator.level=z}}})),m=(z,U,J)=>{let te,V;return J===void 0?(te=z,V=U):(te=J.openAll+z,V=U+J.closeAll),{open:z,close:U,openAll:te,closeAll:V,parent:J}},C=(z,U,J)=>{let te=(...V)=>a(V[0])&&a(V[0].raw)?_(te,q(te,...V)):_(te,V.length===1?""+V[0]:V.join(" "));return Object.setPrototypeOf(te,g),te._generator=z,te._styler=U,te._isEmpty=J,te},_=(z,U)=>{if(z.level<=0||!U)return z._isEmpty?"":U;let J=z._styler;if(J===void 0)return U;let{openAll:te,closeAll:V}=J;if(U.indexOf("\x1B")!==-1)for(;J!==void 0;)U=s(U,J.close,J.open),J=J.parent;let I=U.indexOf(`
|
74
|
+
`);return I!==-1&&(U=o(U,V,te,I)),te+U+V},B,q=(z,...U)=>{let[J]=U;if(!a(J)||!a(J.raw))return U.join(" ");let te=U.slice(1),V=[J.raw[0]];for(let I=1;I<J.length;I++)V.push(String(te[I-1]).replace(/[{}\\]/g,"\\$&"),String(J.raw[I]));return B===void 0&&(B=nf()),B(z,V.join(""))};Object.defineProperties(p.prototype,f);var X=p();X.supportsColor=r,X.stderr=p({level:i?i.level:0}),X.stderr.supportsColor=i,t.exports=X});import{existsSync as Jh,mkdirSync as Xh}from"fs";import{readdir as Zh,unlink as ep}from"fs/promises";import{extname as tp,join as wa}from"path";w();function ds(e){return typeof e=="undefined"||e===null}function rf(e){return typeof e=="object"&&e!==null}function of(e){return Array.isArray(e)?e:ds(e)?[]:[e]}function sf(e,t){var n,r,i,s;if(t)for(s=Object.keys(t),n=0,r=s.length;n<r;n+=1)i=s[n],e[i]=t[i];return e}function af(e,t){var n="",r;for(r=0;r<t;r+=1)n+=e;return n}function lf(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var cf=ds,ff=rf,uf=of,df=af,hf=lf,pf=sf,Se={isNothing:cf,isObject:ff,toArray:uf,repeat:df,isNegativeZero:hf,extend:pf};function hs(e,t){var n="",r=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(n+='in "'+e.mark.name+'" '),n+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(n+=`
|
75
75
|
|
76
76
|
`+e.mark.snippet),r+" "+n):r}function Mn(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=hs(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Mn.prototype=Object.create(Error.prototype);Mn.prototype.constructor=Mn;Mn.prototype.toString=function(t){return this.name+": "+hs(this,t)};var ke=Mn;function Zr(e,t,n,r,i){var s="",o="",a=Math.floor(i/2)-1;return r-t>a&&(s=" ... ",t=r-a+s.length),n-r>a&&(o=" ...",n=r+a-o.length),{str:s+e.slice(t,n).replace(/\t/g,"\u2192")+o,pos:r-t+s.length}}function ei(e,t){return Se.repeat(" ",t-e.length)+e}function mf(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var n=/\r?\n|\r|\0/g,r=[0],i=[],s,o=-1;s=n.exec(e.buffer);)i.push(s.index),r.push(s.index+s[0].length),e.position<=s.index&&o<0&&(o=r.length-2);o<0&&(o=r.length-1);var a="",l,f,u=Math.min(e.line+t.linesAfter,i.length).toString().length,c=t.maxLength-(t.indent+u+3);for(l=1;l<=t.linesBefore&&!(o-l<0);l++)f=Zr(e.buffer,r[o-l],i[o-l],e.position-(r[o]-r[o-l]),c),a=Se.repeat(" ",t.indent)+ei((e.line-l+1).toString(),u)+" | "+f.str+`
|
77
77
|
`+a;for(f=Zr(e.buffer,r[o],i[o],e.position,c),a+=Se.repeat(" ",t.indent)+ei((e.line+1).toString(),u)+" | "+f.str+`
|
@@ -79,15 +79,15 @@ ${b.join(`
|
|
79
79
|
`,l=1;l<=t.linesAfter&&!(o+l>=i.length);l++)f=Zr(e.buffer,r[o+l],i[o+l],e.position-(r[o]-r[o+l]),c),a+=Se.repeat(" ",t.indent)+ei((e.line+l+1).toString(),u)+" | "+f.str+`
|
80
80
|
`;return a.replace(/\n$/,"")}var gf=mf,bf=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],yf=["scalar","sequence","mapping"];function wf(e){var t={};return e!==null&&Object.keys(e).forEach(function(n){e[n].forEach(function(r){t[String(r)]=n})}),t}function Af(e,t){if(t=t||{},Object.keys(t).forEach(function(n){if(bf.indexOf(n)===-1)throw new ke('Unknown option "'+n+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(n){return n},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=wf(t.styleAliases||null),yf.indexOf(this.kind)===-1)throw new ke('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var Fe=Af;function Jo(e,t){var n=[];return e[t].forEach(function(r){var i=n.length;n.forEach(function(s,o){s.tag===r.tag&&s.kind===r.kind&&s.multi===r.multi&&(i=o)}),n[i]=r}),n}function xf(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,n;function r(i){i.multi?(e.multi[i.kind].push(i),e.multi.fallback.push(i)):e[i.kind][i.tag]=e.fallback[i.tag]=i}for(t=0,n=arguments.length;t<n;t+=1)arguments[t].forEach(r);return e}function ni(e){return this.extend(e)}ni.prototype.extend=function(t){var n=[],r=[];if(t instanceof Fe)r.push(t);else if(Array.isArray(t))r=r.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(n=n.concat(t.implicit)),t.explicit&&(r=r.concat(t.explicit));else throw new ke("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");n.forEach(function(s){if(!(s instanceof Fe))throw new ke("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(s.loadKind&&s.loadKind!=="scalar")throw new ke("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(s.multi)throw new ke("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),r.forEach(function(s){if(!(s instanceof Fe))throw new ke("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(ni.prototype);return i.implicit=(this.implicit||[]).concat(n),i.explicit=(this.explicit||[]).concat(r),i.compiledImplicit=Jo(i,"implicit"),i.compiledExplicit=Jo(i,"explicit"),i.compiledTypeMap=xf(i.compiledImplicit,i.compiledExplicit),i};var vf=ni,Cf=new Fe("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),Of=new Fe("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),Ef=new Fe("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),_f=new vf({explicit:[Cf,Of,Ef]});function Sf(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function jf(){return null}function Mf(e){return e===null}var If=new Fe("tag:yaml.org,2002:null",{kind:"scalar",resolve:Sf,construct:jf,predicate:Mf,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function Pf(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}function Ff(e){return e==="true"||e==="True"||e==="TRUE"}function Lf(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var Df=new Fe("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Pf,construct:Ff,predicate:Lf,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function Tf(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function Nf(e){return 48<=e&&e<=55}function kf(e){return 48<=e&&e<=57}function Rf(e){if(e===null)return!1;var t=e.length,n=0,r=!1,i;if(!t)return!1;if(i=e[n],(i==="-"||i==="+")&&(i=e[++n]),i==="0"){if(n+1===t)return!0;if(i=e[++n],i==="b"){for(n++;n<t;n++)if(i=e[n],i!=="_"){if(i!=="0"&&i!=="1")return!1;r=!0}return r&&i!=="_"}if(i==="x"){for(n++;n<t;n++)if(i=e[n],i!=="_"){if(!Tf(e.charCodeAt(n)))return!1;r=!0}return r&&i!=="_"}if(i==="o"){for(n++;n<t;n++)if(i=e[n],i!=="_"){if(!Nf(e.charCodeAt(n)))return!1;r=!0}return r&&i!=="_"}}if(i==="_")return!1;for(;n<t;n++)if(i=e[n],i!=="_"){if(!kf(e.charCodeAt(n)))return!1;r=!0}return!(!r||i==="_")}function Uf(e){var t=e,n=1,r;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),r=t[0],(r==="-"||r==="+")&&(r==="-"&&(n=-1),t=t.slice(1),r=t[0]),t==="0")return 0;if(r==="0"){if(t[1]==="b")return n*parseInt(t.slice(2),2);if(t[1]==="x")return n*parseInt(t.slice(2),16);if(t[1]==="o")return n*parseInt(t.slice(2),8)}return n*parseInt(t,10)}function $f(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Se.isNegativeZero(e)}var Wf=new Fe("tag:yaml.org,2002:int",{kind:"scalar",resolve:Rf,construct:Uf,predicate:$f,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Bf=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Hf(e){return!(e===null||!Bf.test(e)||e[e.length-1]==="_")}function qf(e){var t,n;return t=e.replace(/_/g,"").toLowerCase(),n=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?n===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:n*parseFloat(t,10)}var Yf=/^[-+]?[0-9]+e/;function Gf(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Se.isNegativeZero(e))return"-0.0";return n=e.toString(10),Yf.test(n)?n.replace("e",".e"):n}function zf(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Se.isNegativeZero(e))}var Vf=new Fe("tag:yaml.org,2002:float",{kind:"scalar",resolve:Hf,construct:qf,predicate:zf,represent:Gf,defaultStyle:"lowercase"}),Kf=_f.extend({implicit:[If,Df,Wf,Vf]}),Qf=Kf,ps=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),ms=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function Jf(e){return e===null?!1:ps.exec(e)!==null||ms.exec(e)!==null}function Xf(e){var t,n,r,i,s,o,a,l=0,f=null,u,c,d;if(t=ps.exec(e),t===null&&(t=ms.exec(e)),t===null)throw new Error("Date resolve error");if(n=+t[1],r=+t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(n,r,i));if(s=+t[4],o=+t[5],a=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(u=+t[10],c=+(t[11]||0),f=(u*60+c)*6e4,t[9]==="-"&&(f=-f)),d=new Date(Date.UTC(n,r,i,s,o,a,l)),f&&d.setTime(d.getTime()-f),d}function Zf(e){return e.toISOString()}var eu=new Fe("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Jf,construct:Xf,instanceOf:Date,represent:Zf});function tu(e){return e==="<<"||e===null}var nu=new Fe("tag:yaml.org,2002:merge",{kind:"scalar",resolve:tu}),ai=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
81
81
|
\r`;function ru(e){if(e===null)return!1;var t,n,r=0,i=e.length,s=ai;for(n=0;n<i;n++)if(t=s.indexOf(e.charAt(n)),!(t>64)){if(t<0)return!1;r+=6}return r%8===0}function iu(e){var t,n,r=e.replace(/[\r\n=]/g,""),i=r.length,s=ai,o=0,a=[];for(t=0;t<i;t++)t%4===0&&t&&(a.push(o>>16&255),a.push(o>>8&255),a.push(o&255)),o=o<<6|s.indexOf(r.charAt(t));return n=i%4*6,n===0?(a.push(o>>16&255),a.push(o>>8&255),a.push(o&255)):n===18?(a.push(o>>10&255),a.push(o>>2&255)):n===12&&a.push(o>>4&255),new Uint8Array(a)}function ou(e){var t="",n=0,r,i,s=e.length,o=ai;for(r=0;r<s;r++)r%3===0&&r&&(t+=o[n>>18&63],t+=o[n>>12&63],t+=o[n>>6&63],t+=o[n&63]),n=(n<<8)+e[r];return i=s%3,i===0?(t+=o[n>>18&63],t+=o[n>>12&63],t+=o[n>>6&63],t+=o[n&63]):i===2?(t+=o[n>>10&63],t+=o[n>>4&63],t+=o[n<<2&63],t+=o[64]):i===1&&(t+=o[n>>2&63],t+=o[n<<4&63],t+=o[64],t+=o[64]),t}function su(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var au=new Fe("tag:yaml.org,2002:binary",{kind:"scalar",resolve:ru,construct:iu,predicate:su,represent:ou}),lu=Object.prototype.hasOwnProperty,cu=Object.prototype.toString;function fu(e){if(e===null)return!0;var t=[],n,r,i,s,o,a=e;for(n=0,r=a.length;n<r;n+=1){if(i=a[n],o=!1,cu.call(i)!=="[object Object]")return!1;for(s in i)if(lu.call(i,s))if(!o)o=!0;else return!1;if(!o)return!1;if(t.indexOf(s)===-1)t.push(s);else return!1}return!0}function uu(e){return e!==null?e:[]}var du=new Fe("tag:yaml.org,2002:omap",{kind:"sequence",resolve:fu,construct:uu}),hu=Object.prototype.toString;function pu(e){if(e===null)return!0;var t,n,r,i,s,o=e;for(s=new Array(o.length),t=0,n=o.length;t<n;t+=1){if(r=o[t],hu.call(r)!=="[object Object]"||(i=Object.keys(r),i.length!==1))return!1;s[t]=[i[0],r[i[0]]]}return!0}function mu(e){if(e===null)return[];var t,n,r,i,s,o=e;for(s=new Array(o.length),t=0,n=o.length;t<n;t+=1)r=o[t],i=Object.keys(r),s[t]=[i[0],r[i[0]]];return s}var gu=new Fe("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:pu,construct:mu}),bu=Object.prototype.hasOwnProperty;function yu(e){if(e===null)return!0;var t,n=e;for(t in n)if(bu.call(n,t)&&n[t]!==null)return!1;return!0}function wu(e){return e!==null?e:{}}var Au=new Fe("tag:yaml.org,2002:set",{kind:"mapping",resolve:yu,construct:wu}),gs=Qf.extend({implicit:[eu,nu],explicit:[au,du,gu,Au]}),Ot=Object.prototype.hasOwnProperty,rr=1,bs=2,ys=3,ir=4,ti=1,xu=2,Xo=3,vu=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Cu=/[\x85\u2028\u2029]/,Ou=/[,\[\]\{\}]/,ws=/^(?:!|!!|![a-z\-]+!)$/i,As=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Zo(e){return Object.prototype.toString.call(e)}function at(e){return e===10||e===13}function tn(e){return e===9||e===32}function Re(e){return e===9||e===32||e===10||e===13}function dn(e){return e===44||e===91||e===93||e===123||e===125}function Eu(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function _u(e){return e===120?2:e===117?4:e===85?8:0}function Su(e){return 48<=e&&e<=57?e-48:-1}function es(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
|
82
|
-
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}function ju(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}var xs=new Array(256),vs=new Array(256);for(en=0;en<256;en++)xs[en]=es(en)?1:0,vs[en]=es(en);var en;function Mu(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||gs,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Cs(e,t){var n={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return n.snippet=gf(n),new ke(t,n)}function
|
83
|
-
`,t-1))}function Iu(e,t,n){var r,i,s,o,a,l,f,u,c=e.kind,d=e.result,p;if(p=e.input.charCodeAt(e.position),Re(p)||dn(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96||(p===63||p===45)&&(i=e.input.charCodeAt(e.position+1),Re(i)||n&&dn(i)))return!1;for(e.kind="scalar",e.result="",s=o=e.position,a=!1;p!==0;){if(p===58){if(i=e.input.charCodeAt(e.position+1),Re(i)||n&&dn(i))break}else if(p===35){if(r=e.input.charCodeAt(e.position-1),Re(r))break}else{if(e.position===e.lineStart&&lr(e)||n&&dn(p))break;if(at(p))if(l=e.line,f=e.lineStart,u=e.lineIndent,be(e,!1,-1),e.lineIndent>=t){a=!0,p=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=l,e.lineStart=f,e.lineIndent=u;break}}a&&(Ct(e,s,o,!1),ci(e,e.line-l),s=o=e.position,a=!1),tn(p)||(o=e.position+1),p=e.input.charCodeAt(++e.position)}return Ct(e,s,o,!1),e.result?!0:(e.kind=c,e.result=d,!1)}function Pu(e,t){var n,r,i;if(n=e.input.charCodeAt(e.position),n!==39)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(n=e.input.charCodeAt(e.position))!==0;)if(n===39)if(Ct(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),n===39)r=e.position,e.position++,i=e.position;else return!0;else at(n)?(Ct(e,r,i,!0),ci(e,be(e,!1,t)),r=i=e.position):e.position===e.lineStart&&lr(e)
|
82
|
+
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}function ju(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}var xs=new Array(256),vs=new Array(256);for(en=0;en<256;en++)xs[en]=es(en)?1:0,vs[en]=es(en);var en;function Mu(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||gs,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Cs(e,t){var n={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return n.snippet=gf(n),new ke(t,n)}function W(e,t){throw Cs(e,t)}function or(e,t){e.onWarning&&e.onWarning.call(null,Cs(e,t))}var ts={YAML:function(t,n,r){var i,s,o;t.version!==null&&W(t,"duplication of %YAML directive"),r.length!==1&&W(t,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]),i===null&&W(t,"ill-formed argument of the YAML directive"),s=parseInt(i[1],10),o=parseInt(i[2],10),s!==1&&W(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=o<2,o!==1&&o!==2&&or(t,"unsupported YAML version of the document")},TAG:function(t,n,r){var i,s;r.length!==2&&W(t,"TAG directive accepts exactly two arguments"),i=r[0],s=r[1],ws.test(i)||W(t,"ill-formed tag handle (first argument) of the TAG directive"),Ot.call(t.tagMap,i)&&W(t,'there is a previously declared suffix for "'+i+'" tag handle'),As.test(s)||W(t,"ill-formed tag prefix (second argument) of the TAG directive");try{s=decodeURIComponent(s)}catch(o){W(t,"tag prefix is malformed: "+s)}t.tagMap[i]=s}};function Ct(e,t,n,r){var i,s,o,a;if(t<n){if(a=e.input.slice(t,n),r)for(i=0,s=a.length;i<s;i+=1)o=a.charCodeAt(i),o===9||32<=o&&o<=1114111||W(e,"expected valid JSON character");else vu.test(a)&&W(e,"the stream contains non-printable characters");e.result+=a}}function ns(e,t,n,r){var i,s,o,a;for(Se.isObject(n)||W(e,"cannot merge mappings; the provided source object is unacceptable"),i=Object.keys(n),o=0,a=i.length;o<a;o+=1)s=i[o],Ot.call(t,s)||(t[s]=n[s],r[s]=!0)}function hn(e,t,n,r,i,s,o,a,l){var f,u;if(Array.isArray(i))for(i=Array.prototype.slice.call(i),f=0,u=i.length;f<u;f+=1)Array.isArray(i[f])&&W(e,"nested arrays are not supported inside keys"),typeof i=="object"&&Zo(i[f])==="[object Object]"&&(i[f]="[object Object]");if(typeof i=="object"&&Zo(i)==="[object Object]"&&(i="[object Object]"),i=String(i),t===null&&(t={}),r==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(f=0,u=s.length;f<u;f+=1)ns(e,t,s[f],n);else ns(e,t,s,n);else!e.json&&!Ot.call(n,i)&&Ot.call(t,i)&&(e.line=o||e.line,e.lineStart=a||e.lineStart,e.position=l||e.position,W(e,"duplicated mapping key")),i==="__proto__"?Object.defineProperty(t,i,{configurable:!0,enumerable:!0,writable:!0,value:s}):t[i]=s,delete n[i];return t}function li(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):W(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function be(e,t,n){for(var r=0,i=e.input.charCodeAt(e.position);i!==0;){for(;tn(i);)i===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),i=e.input.charCodeAt(++e.position);if(t&&i===35)do i=e.input.charCodeAt(++e.position);while(i!==10&&i!==13&&i!==0);if(at(i))for(li(e),i=e.input.charCodeAt(e.position),r++,e.lineIndent=0;i===32;)e.lineIndent++,i=e.input.charCodeAt(++e.position);else break}return n!==-1&&r!==0&&e.lineIndent<n&&or(e,"deficient indentation"),r}function lr(e){var t=e.position,n;return n=e.input.charCodeAt(t),!!((n===45||n===46)&&n===e.input.charCodeAt(t+1)&&n===e.input.charCodeAt(t+2)&&(t+=3,n=e.input.charCodeAt(t),n===0||Re(n)))}function ci(e,t){t===1?e.result+=" ":t>1&&(e.result+=Se.repeat(`
|
83
|
+
`,t-1))}function Iu(e,t,n){var r,i,s,o,a,l,f,u,c=e.kind,d=e.result,p;if(p=e.input.charCodeAt(e.position),Re(p)||dn(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96||(p===63||p===45)&&(i=e.input.charCodeAt(e.position+1),Re(i)||n&&dn(i)))return!1;for(e.kind="scalar",e.result="",s=o=e.position,a=!1;p!==0;){if(p===58){if(i=e.input.charCodeAt(e.position+1),Re(i)||n&&dn(i))break}else if(p===35){if(r=e.input.charCodeAt(e.position-1),Re(r))break}else{if(e.position===e.lineStart&&lr(e)||n&&dn(p))break;if(at(p))if(l=e.line,f=e.lineStart,u=e.lineIndent,be(e,!1,-1),e.lineIndent>=t){a=!0,p=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=l,e.lineStart=f,e.lineIndent=u;break}}a&&(Ct(e,s,o,!1),ci(e,e.line-l),s=o=e.position,a=!1),tn(p)||(o=e.position+1),p=e.input.charCodeAt(++e.position)}return Ct(e,s,o,!1),e.result?!0:(e.kind=c,e.result=d,!1)}function Pu(e,t){var n,r,i;if(n=e.input.charCodeAt(e.position),n!==39)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(n=e.input.charCodeAt(e.position))!==0;)if(n===39)if(Ct(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),n===39)r=e.position,e.position++,i=e.position;else return!0;else at(n)?(Ct(e,r,i,!0),ci(e,be(e,!1,t)),r=i=e.position):e.position===e.lineStart&&lr(e)?W(e,"unexpected end of the document within a single quoted scalar"):(e.position++,i=e.position);W(e,"unexpected end of the stream within a single quoted scalar")}function Fu(e,t){var n,r,i,s,o,a;if(a=e.input.charCodeAt(e.position),a!==34)return!1;for(e.kind="scalar",e.result="",e.position++,n=r=e.position;(a=e.input.charCodeAt(e.position))!==0;){if(a===34)return Ct(e,n,e.position,!0),e.position++,!0;if(a===92){if(Ct(e,n,e.position,!0),a=e.input.charCodeAt(++e.position),at(a))be(e,!1,t);else if(a<256&&xs[a])e.result+=vs[a],e.position++;else if((o=_u(a))>0){for(i=o,s=0;i>0;i--)a=e.input.charCodeAt(++e.position),(o=Eu(a))>=0?s=(s<<4)+o:W(e,"expected hexadecimal character");e.result+=ju(s),e.position++}else W(e,"unknown escape sequence");n=r=e.position}else at(a)?(Ct(e,n,r,!0),ci(e,be(e,!1,t)),n=r=e.position):e.position===e.lineStart&&lr(e)?W(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}W(e,"unexpected end of the stream within a double quoted scalar")}function Lu(e,t){var n=!0,r,i,s,o=e.tag,a,l=e.anchor,f,u,c,d,p,b=Object.create(null),g,m,C,_;if(_=e.input.charCodeAt(e.position),_===91)u=93,p=!1,a=[];else if(_===123)u=125,p=!0,a={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),_=e.input.charCodeAt(++e.position);_!==0;){if(be(e,!0,t),_=e.input.charCodeAt(e.position),_===u)return e.position++,e.tag=o,e.anchor=l,e.kind=p?"mapping":"sequence",e.result=a,!0;n?_===44&&W(e,"expected the node content, but found ','"):W(e,"missed comma between flow collection entries"),m=g=C=null,c=d=!1,_===63&&(f=e.input.charCodeAt(e.position+1),Re(f)&&(c=d=!0,e.position++,be(e,!0,t))),r=e.line,i=e.lineStart,s=e.position,pn(e,t,rr,!1,!0),m=e.tag,g=e.result,be(e,!0,t),_=e.input.charCodeAt(e.position),(d||e.line===r)&&_===58&&(c=!0,_=e.input.charCodeAt(++e.position),be(e,!0,t),pn(e,t,rr,!1,!0),C=e.result),p?hn(e,a,b,m,g,C,r,i,s):c?a.push(hn(e,null,b,m,g,C,r,i,s)):a.push(g),be(e,!0,t),_=e.input.charCodeAt(e.position),_===44?(n=!0,_=e.input.charCodeAt(++e.position)):n=!1}W(e,"unexpected end of the stream within a flow collection")}function Du(e,t){var n,r,i=ti,s=!1,o=!1,a=t,l=0,f=!1,u,c;if(c=e.input.charCodeAt(e.position),c===124)r=!1;else if(c===62)r=!0;else return!1;for(e.kind="scalar",e.result="";c!==0;)if(c=e.input.charCodeAt(++e.position),c===43||c===45)ti===i?i=c===43?Xo:xu:W(e,"repeat of a chomping mode identifier");else if((u=Su(c))>=0)u===0?W(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?W(e,"repeat of an indentation width identifier"):(a=t+u-1,o=!0);else break;if(tn(c)){do c=e.input.charCodeAt(++e.position);while(tn(c));if(c===35)do c=e.input.charCodeAt(++e.position);while(!at(c)&&c!==0)}for(;c!==0;){for(li(e),e.lineIndent=0,c=e.input.charCodeAt(e.position);(!o||e.lineIndent<a)&&c===32;)e.lineIndent++,c=e.input.charCodeAt(++e.position);if(!o&&e.lineIndent>a&&(a=e.lineIndent),at(c)){l++;continue}if(e.lineIndent<a){i===Xo?e.result+=Se.repeat(`
|
84
84
|
`,s?1+l:l):i===ti&&s&&(e.result+=`
|
85
85
|
`);break}for(r?tn(c)?(f=!0,e.result+=Se.repeat(`
|
86
86
|
`,s?1+l:l)):f?(f=!1,e.result+=Se.repeat(`
|
87
87
|
`,l+1)):l===0?s&&(e.result+=" "):e.result+=Se.repeat(`
|
88
88
|
`,l):e.result+=Se.repeat(`
|
89
|
-
`,s?1+l:l),s=!0,o=!0,l=0,n=e.position;!at(c)&&c!==0;)c=e.input.charCodeAt(++e.position);Ct(e,n,e.position,!1)}return!0}function rs(e,t){var n,r=e.tag,i=e.anchor,s=[],o,a=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine
|
90
|
-
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var n=new Mu(e,t),r=e.indexOf("\0");for(r!==-1&&(n.position=r
|
89
|
+
`,s?1+l:l),s=!0,o=!0,l=0,n=e.position;!at(c)&&c!==0;)c=e.input.charCodeAt(++e.position);Ct(e,n,e.position,!1)}return!0}function rs(e,t){var n,r=e.tag,i=e.anchor,s=[],o,a=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,W(e,"tab characters must not be used in indentation")),!(l!==45||(o=e.input.charCodeAt(e.position+1),!Re(o))));){if(a=!0,e.position++,be(e,!0,-1)&&e.lineIndent<=t){s.push(null),l=e.input.charCodeAt(e.position);continue}if(n=e.line,pn(e,t,ys,!1,!0),s.push(e.result),be(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&l!==0)W(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return a?(e.tag=r,e.anchor=i,e.kind="sequence",e.result=s,!0):!1}function Tu(e,t,n){var r,i,s,o,a,l,f=e.tag,u=e.anchor,c={},d=Object.create(null),p=null,b=null,g=null,m=!1,C=!1,_;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=c),_=e.input.charCodeAt(e.position);_!==0;){if(!m&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,W(e,"tab characters must not be used in indentation")),r=e.input.charCodeAt(e.position+1),s=e.line,(_===63||_===58)&&Re(r))_===63?(m&&(hn(e,c,d,p,b,null,o,a,l),p=b=g=null),C=!0,m=!0,i=!0):m?(m=!1,i=!0):W(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,_=r;else{if(o=e.line,a=e.lineStart,l=e.position,!pn(e,n,bs,!1,!0))break;if(e.line===s){for(_=e.input.charCodeAt(e.position);tn(_);)_=e.input.charCodeAt(++e.position);if(_===58)_=e.input.charCodeAt(++e.position),Re(_)||W(e,"a whitespace character is expected after the key-value separator within a block mapping"),m&&(hn(e,c,d,p,b,null,o,a,l),p=b=g=null),C=!0,m=!1,i=!1,p=e.tag,b=e.result;else if(C)W(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=f,e.anchor=u,!0}else if(C)W(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=f,e.anchor=u,!0}if((e.line===s||e.lineIndent>t)&&(m&&(o=e.line,a=e.lineStart,l=e.position),pn(e,t,ir,!0,i)&&(m?b=e.result:g=e.result),m||(hn(e,c,d,p,b,g,o,a,l),p=b=g=null),be(e,!0,-1),_=e.input.charCodeAt(e.position)),(e.line===s||e.lineIndent>t)&&_!==0)W(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return m&&hn(e,c,d,p,b,null,o,a,l),C&&(e.tag=f,e.anchor=u,e.kind="mapping",e.result=c),C}function Nu(e){var t,n=!1,r=!1,i,s,o;if(o=e.input.charCodeAt(e.position),o!==33)return!1;if(e.tag!==null&&W(e,"duplication of a tag property"),o=e.input.charCodeAt(++e.position),o===60?(n=!0,o=e.input.charCodeAt(++e.position)):o===33?(r=!0,i="!!",o=e.input.charCodeAt(++e.position)):i="!",t=e.position,n){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(s=e.input.slice(t,e.position),o=e.input.charCodeAt(++e.position)):W(e,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!Re(o);)o===33&&(r?W(e,"tag suffix cannot contain exclamation marks"):(i=e.input.slice(t-1,e.position+1),ws.test(i)||W(e,"named tag handle cannot contain such characters"),r=!0,t=e.position+1)),o=e.input.charCodeAt(++e.position);s=e.input.slice(t,e.position),Ou.test(s)&&W(e,"tag suffix cannot contain flow indicator characters")}s&&!As.test(s)&&W(e,"tag name cannot contain such characters: "+s);try{s=decodeURIComponent(s)}catch(a){W(e,"tag name is malformed: "+s)}return n?e.tag=s:Ot.call(e.tagMap,i)?e.tag=e.tagMap[i]+s:i==="!"?e.tag="!"+s:i==="!!"?e.tag="tag:yaml.org,2002:"+s:W(e,'undeclared tag handle "'+i+'"'),!0}function ku(e){var t,n;if(n=e.input.charCodeAt(e.position),n!==38)return!1;for(e.anchor!==null&&W(e,"duplication of an anchor property"),n=e.input.charCodeAt(++e.position),t=e.position;n!==0&&!Re(n)&&!dn(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&W(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function Ru(e){var t,n,r;if(r=e.input.charCodeAt(e.position),r!==42)return!1;for(r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Re(r)&&!dn(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&W(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),Ot.call(e.anchorMap,n)||W(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],be(e,!0,-1),!0}function pn(e,t,n,r,i){var s,o,a,l=1,f=!1,u=!1,c,d,p,b,g,m;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,s=o=a=ir===n||ys===n,r&&be(e,!0,-1)&&(f=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;Nu(e)||ku(e);)be(e,!0,-1)?(f=!0,a=s,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):a=!1;if(a&&(a=f||i),(l===1||ir===n)&&(rr===n||bs===n?g=t:g=t+1,m=e.position-e.lineStart,l===1?a&&(rs(e,m)||Tu(e,m,g))||Lu(e,g)?u=!0:(o&&Du(e,g)||Pu(e,g)||Fu(e,g)?u=!0:Ru(e)?(u=!0,(e.tag!==null||e.anchor!==null)&&W(e,"alias node should not have any properties")):Iu(e,g,rr===n)&&(u=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(u=a&&rs(e,m))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&W(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),c=0,d=e.implicitTypes.length;c<d;c+=1)if(b=e.implicitTypes[c],b.resolve(e.result)){e.result=b.construct(e.result),e.tag=b.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(Ot.call(e.typeMap[e.kind||"fallback"],e.tag))b=e.typeMap[e.kind||"fallback"][e.tag];else for(b=null,p=e.typeMap.multi[e.kind||"fallback"],c=0,d=p.length;c<d;c+=1)if(e.tag.slice(0,p[c].tag.length)===p[c].tag){b=p[c];break}b||W(e,"unknown tag !<"+e.tag+">"),e.result!==null&&b.kind!==e.kind&&W(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+b.kind+'", not "'+e.kind+'"'),b.resolve(e.result,e.tag)?(e.result=b.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):W(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||u}function Uu(e){var t=e.position,n,r,i,s=!1,o;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(o=e.input.charCodeAt(e.position))!==0&&(be(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(s=!0,o=e.input.charCodeAt(++e.position),n=e.position;o!==0&&!Re(o);)o=e.input.charCodeAt(++e.position);for(r=e.input.slice(n,e.position),i=[],r.length<1&&W(e,"directive name must not be less than one character in length");o!==0;){for(;tn(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!at(o));break}if(at(o))break;for(n=e.position;o!==0&&!Re(o);)o=e.input.charCodeAt(++e.position);i.push(e.input.slice(n,e.position))}o!==0&&li(e),Ot.call(ts,r)?ts[r](e,r,i):or(e,'unknown document directive "'+r+'"')}if(be(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,be(e,!0,-1)):s&&W(e,"directives end mark is expected"),pn(e,e.lineIndent-1,ir,!1,!0),be(e,!0,-1),e.checkLineBreaks&&Cu.test(e.input.slice(t,e.position))&&or(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&lr(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,be(e,!0,-1));return}if(e.position<e.length-1)W(e,"end of the stream or a document separator is expected");else return}function Os(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
|
90
|
+
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var n=new Mu(e,t),r=e.indexOf("\0");for(r!==-1&&(n.position=r,W(n,"null byte is not allowed in input")),n.input+="\0";n.input.charCodeAt(n.position)===32;)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)Uu(n);return n.documents}function $u(e,t,n){t!==null&&typeof t=="object"&&typeof n=="undefined"&&(n=t,t=null);var r=Os(e,n);if(typeof t!="function")return r;for(var i=0,s=r.length;i<s;i+=1)t(r[i])}function Wu(e,t){var n=Os(e,t);if(n.length!==0){if(n.length===1)return n[0];throw new ke("expected a single document in the stream, but found more")}}var Bu=$u,Hu=Wu,Es={loadAll:Bu,load:Hu},_s=Object.prototype.toString,Ss=Object.prototype.hasOwnProperty,fi=65279,qu=9,In=10,Yu=13,Gu=32,zu=33,Vu=34,ri=35,Ku=37,Qu=38,Ju=39,Xu=42,js=44,Zu=45,sr=58,ed=61,td=62,nd=63,rd=64,Ms=91,Is=93,id=96,Ps=123,od=124,Fs=125,Le={};Le[0]="\\0";Le[7]="\\a";Le[8]="\\b";Le[9]="\\t";Le[10]="\\n";Le[11]="\\v";Le[12]="\\f";Le[13]="\\r";Le[27]="\\e";Le[34]='\\"';Le[92]="\\\\";Le[133]="\\N";Le[160]="\\_";Le[8232]="\\L";Le[8233]="\\P";var sd=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],ad=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function ld(e,t){var n,r,i,s,o,a,l;if(t===null)return{};for(n={},r=Object.keys(t),i=0,s=r.length;i<s;i+=1)o=r[i],a=String(t[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),l=e.compiledTypeMap.fallback[o],l&&Ss.call(l.styleAliases,a)&&(a=l.styleAliases[a]),n[o]=a;return n}function cd(e){var t,n,r;if(t=e.toString(16).toUpperCase(),e<=255)n="x",r=2;else if(e<=65535)n="u",r=4;else if(e<=4294967295)n="U",r=8;else throw new ke("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+n+Se.repeat("0",r-t.length)+t}var fd=1,Pn=2;function ud(e){this.schema=e.schema||gs,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Se.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=ld(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?Pn:fd,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function is(e,t){for(var n=Se.repeat(" ",t),r=0,i=-1,s="",o,a=e.length;r<a;)i=e.indexOf(`
|
91
91
|
`,r),i===-1?(o=e.slice(r),r=a):(o=e.slice(r,i+1),r=i+1),o.length&&o!==`
|
92
92
|
`&&(s+=n),s+=o;return s}function ii(e,t){return`
|
93
93
|
`+Se.repeat(" ",e.indent*t)}function dd(e,t){var n,r,i;for(n=0,r=e.implicitTypes.length;n<r;n+=1)if(i=e.implicitTypes[n],i.resolve(t))return!0;return!1}function ar(e){return e===Gu||e===qu}function Fn(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==fi||65536<=e&&e<=1114111}function os(e){return Fn(e)&&e!==fi&&e!==Yu&&e!==In}function ss(e,t,n){var r=os(e),i=r&&!ar(e);return(n?r:r&&e!==js&&e!==Ms&&e!==Is&&e!==Ps&&e!==Fs)&&e!==ri&&!(t===sr&&!i)||os(t)&&!ar(t)&&e===ri||t===sr&&i}function hd(e){return Fn(e)&&e!==fi&&!ar(e)&&e!==Zu&&e!==nd&&e!==sr&&e!==js&&e!==Ms&&e!==Is&&e!==Ps&&e!==Fs&&e!==ri&&e!==Qu&&e!==Xu&&e!==zu&&e!==od&&e!==ed&&e!==td&&e!==Ju&&e!==Vu&&e!==Ku&&e!==rd&&e!==id}function pd(e){return!ar(e)&&e!==sr}function jn(e,t){var n=e.charCodeAt(t),r;return n>=55296&&n<=56319&&t+1<e.length&&(r=e.charCodeAt(t+1),r>=56320&&r<=57343)?(n-55296)*1024+r-56320+65536:n}function Ls(e){var t=/^\n* /;return t.test(e)}var Ds=1,oi=2,Ts=3,Ns=4,un=5;function md(e,t,n,r,i,s,o,a){var l,f=0,u=null,c=!1,d=!1,p=r!==-1,b=-1,g=hd(jn(e,0))&&pd(jn(e,e.length-1));if(t||o)for(l=0;l<e.length;f>=65536?l+=2:l++){if(f=jn(e,l),!Fn(f))return un;g=g&&ss(f,u,a),u=f}else{for(l=0;l<e.length;f>=65536?l+=2:l++){if(f=jn(e,l),f===In)c=!0,p&&(d=d||l-b-1>r&&e[b+1]!==" ",b=l);else if(!Fn(f))return un;g=g&&ss(f,u,a),u=f}d=d||p&&l-b-1>r&&e[b+1]!==" "}return!c&&!d?g&&!o&&!i(e)?Ds:s===Pn?un:oi:n>9&&Ls(e)?un:o?s===Pn?un:oi:d?Ns:Ts}function gd(e,t,n,r,i){e.dump=function(){if(t.length===0)return e.quotingType===Pn?'""':"''";if(!e.noCompatMode&&(sd.indexOf(t)!==-1||ad.test(t)))return e.quotingType===Pn?'"'+t+'"':"'"+t+"'";var s=e.indent*Math.max(1,n),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-s),a=r||e.flowLevel>-1&&n>=e.flowLevel;function l(f){return dd(e,f)}switch(md(t,a,e.indent,o,l,e.quotingType,e.forceQuotes&&!r,i)){case Ds:return t;case oi:return"'"+t.replace(/'/g,"''")+"'";case Ts:return"|"+as(t,e.indent)+ls(is(t,s));case Ns:return">"+as(t,e.indent)+ls(is(bd(t,o),s));case un:return'"'+yd(t)+'"';default:throw new ke("impossible error: invalid scalar style")}}()}function as(e,t){var n=Ls(e)?String(t):"",r=e[e.length-1]===`
|
@@ -102,11 +102,11 @@ ${b.join(`
|
|
102
102
|
`+e.slice(i,s),i=s+1),o=a;return l+=`
|
103
103
|
`,e.length-i>t&&o>i?l+=e.slice(i,o)+`
|
104
104
|
`+e.slice(o+1):l+=e.slice(i),l.slice(1)}function yd(e){for(var t="",n=0,r,i=0;i<e.length;n>=65536?i+=2:i++)n=jn(e,i),r=Le[n],!r&&Fn(n)?(t+=e[i],n>=65536&&(t+=e[i+1])):t+=r||cd(n);return t}function wd(e,t,n){var r="",i=e.tag,s,o,a;for(s=0,o=n.length;s<o;s+=1)a=n[s],e.replacer&&(a=e.replacer.call(n,String(s),a)),(ht(e,t,a,!1,!1)||typeof a=="undefined"&&ht(e,t,null,!1,!1))&&(r!==""&&(r+=","+(e.condenseFlow?"":" ")),r+=e.dump);e.tag=i,e.dump="["+r+"]"}function fs(e,t,n,r){var i="",s=e.tag,o,a,l;for(o=0,a=n.length;o<a;o+=1)l=n[o],e.replacer&&(l=e.replacer.call(n,String(o),l)),(ht(e,t+1,l,!0,!0,!1,!0)||typeof l=="undefined"&&ht(e,t+1,null,!0,!0,!1,!0))&&((!r||i!=="")&&(i+=ii(e,t)),e.dump&&In===e.dump.charCodeAt(0)?i+="-":i+="- ",i+=e.dump);e.tag=s,e.dump=i||"[]"}function Ad(e,t,n){var r="",i=e.tag,s=Object.keys(n),o,a,l,f,u;for(o=0,a=s.length;o<a;o+=1)u="",r!==""&&(u+=", "),e.condenseFlow&&(u+='"'),l=s[o],f=n[l],e.replacer&&(f=e.replacer.call(n,l,f)),ht(e,t,l,!1,!1)&&(e.dump.length>1024&&(u+="? "),u+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),ht(e,t,f,!1,!1)&&(u+=e.dump,r+=u));e.tag=i,e.dump="{"+r+"}"}function xd(e,t,n,r){var i="",s=e.tag,o=Object.keys(n),a,l,f,u,c,d;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys=="function")o.sort(e.sortKeys);else if(e.sortKeys)throw new ke("sortKeys must be a boolean or a function");for(a=0,l=o.length;a<l;a+=1)d="",(!r||i!=="")&&(d+=ii(e,t)),f=o[a],u=n[f],e.replacer&&(u=e.replacer.call(n,f,u)),ht(e,t+1,f,!0,!0,!0)&&(c=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,c&&(e.dump&&In===e.dump.charCodeAt(0)?d+="?":d+="? "),d+=e.dump,c&&(d+=ii(e,t)),ht(e,t+1,u,!0,c)&&(e.dump&&In===e.dump.charCodeAt(0)?d+=":":d+=": ",d+=e.dump,i+=d));e.tag=s,e.dump=i||"{}"}function us(e,t,n){var r,i,s,o,a,l;for(i=n?e.explicitTypes:e.implicitTypes,s=0,o=i.length;s<o;s+=1)if(a=i[s],(a.instanceOf||a.predicate)&&(!a.instanceOf||typeof t=="object"&&t instanceof a.instanceOf)&&(!a.predicate||a.predicate(t))){if(n?a.multi&&a.representName?e.tag=a.representName(t):e.tag=a.tag:e.tag="?",a.represent){if(l=e.styleMap[a.tag]||a.defaultStyle,_s.call(a.represent)==="[object Function]")r=a.represent(t,l);else if(Ss.call(a.represent,l))r=a.represent[l](t,l);else throw new ke("!<"+a.tag+'> tag resolver accepts not "'+l+'" style');e.dump=r}return!0}return!1}function ht(e,t,n,r,i,s,o){e.tag=null,e.dump=n,us(e,n,!1)||us(e,n,!0);var a=_s.call(e.dump),l=r,f;r&&(r=e.flowLevel<0||e.flowLevel>t);var u=a==="[object Object]"||a==="[object Array]",c,d;if(u&&(c=e.duplicates.indexOf(n),d=c!==-1),(e.tag!==null&&e.tag!=="?"||d||e.indent!==2&&t>0)&&(i=!1),d&&e.usedDuplicates[c])e.dump="*ref_"+c;else{if(u&&d&&!e.usedDuplicates[c]&&(e.usedDuplicates[c]=!0),a==="[object Object]")r&&Object.keys(e.dump).length!==0?(xd(e,t,e.dump,i),d&&(e.dump="&ref_"+c+e.dump)):(Ad(e,t,e.dump),d&&(e.dump="&ref_"+c+" "+e.dump));else if(a==="[object Array]")r&&e.dump.length!==0?(e.noArrayIndent&&!o&&t>0?fs(e,t-1,e.dump,i):fs(e,t,e.dump,i),d&&(e.dump="&ref_"+c+e.dump)):(wd(e,t,e.dump),d&&(e.dump="&ref_"+c+" "+e.dump));else if(a==="[object String]")e.tag!=="?"&&gd(e,e.dump,t,s,l);else{if(a==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new ke("unacceptable kind of an object to dump "+a)}e.tag!==null&&e.tag!=="?"&&(f=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?f="!"+f:f.slice(0,18)==="tag:yaml.org,2002:"?f="!!"+f.slice(18):f="!<"+f+">",e.dump=f+" "+e.dump)}return!0}function vd(e,t){var n=[],r=[],i,s;for(si(e,n,r),i=0,s=r.length;i<s;i+=1)t.duplicates.push(n[r[i]]);t.usedDuplicates=new Array(s)}function si(e,t,n){var r,i,s;if(e!==null&&typeof e=="object")if(i=t.indexOf(e),i!==-1)n.indexOf(i)===-1&&n.push(i);else if(t.push(e),Array.isArray(e))for(i=0,s=e.length;i<s;i+=1)si(e[i],t,n);else for(r=Object.keys(e),i=0,s=r.length;i<s;i+=1)si(e[r[i]],t,n)}function Cd(e,t){t=t||{};var n=new ud(t);n.noRefs||vd(e,n);var r=e;return n.replacer&&(r=n.replacer.call({"":r},"",r)),ht(n,0,r,!0,!0)?n.dump+`
|
105
|
-
`:""}var Od=Cd,Ed={dump:Od};function ui(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}var ks=Es.load,t0=Es.loadAll,Rs=Ed.dump;var n0=ui("safeLoad","load"),r0=ui("safeLoadAll","loadAll"),i0=ui("safeDump","dump");import{writeFileSync as np}from"fs";import{extname as Aa}from"path";import{readFileSync as rp}from"fs";import ip from"fs";w();function pt(){}pt.prototype={diff:function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=r.callback;typeof r=="function"&&(i=r,r={}),this.options=r;var s=this;function o(g){return i?(setTimeout(function(){i(void 0,g)},0),!0):g}t=this.castInput(t),n=this.castInput(n),t=this.removeEmpty(this.tokenize(t)),n=this.removeEmpty(this.tokenize(n));var a=n.length,l=t.length,f=1,u=a+l,c=[{newPos:-1,components:[]}],d=this.extractCommon(c[0],n,t,0);if(c[0].newPos+1>=a&&d+1>=l)return o([{value:this.join(n),count:n.length}]);function p(){for(var g=-1*f;g<=f;g+=2){var m=void 0,C=c[g-1],_=c[g+1],
|
106
|
-
${u==null?void 0:u.message}`)),u}}}return{objects:a(),deleteObject:async l=>{await ep(l)},writeObject:async l=>{ue(l.object,t,o(l.id))}}}Ie();function xa(e,t){if(!t&&!ip.existsSync(e))return{};let n=lt(e);if(typeof n!="object")throw new Error(`Package ${e} does not appear valid.`);return n}function va(e,t){ue(t,void 0,e)}Ie();async function de({source:e,target:t,compareContents:n=(a,l)=>(0,Ca.default)(a.object,l.object,(f,u,c)=>c==="created"||c==="modified"?!0:void 0),mode:r,allowEmptySource:i=!1,whatIf:s=!1,log:o=()=>{}}){var a,l;let f=new Map;for await(let d of t.objects)f.set(d.id,d);let u=[],c=!1;for await(let d of e.objects){c=!0;let p=d.id,b=f.get(p);if(b){if(!n(d,b)&&(r==="createOrUpdate"||r==="mirror")){let g=async(m,C)=>{var _;if(!s)try{await t.writeObject(m,C)}catch(
|
105
|
+
`:""}var Od=Cd,Ed={dump:Od};function ui(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}var ks=Es.load,t0=Es.loadAll,Rs=Ed.dump;var n0=ui("safeLoad","load"),r0=ui("safeLoadAll","loadAll"),i0=ui("safeDump","dump");import{writeFileSync as np}from"fs";import{extname as Aa}from"path";import{readFileSync as rp}from"fs";import ip from"fs";w();function pt(){}pt.prototype={diff:function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=r.callback;typeof r=="function"&&(i=r,r={}),this.options=r;var s=this;function o(g){return i?(setTimeout(function(){i(void 0,g)},0),!0):g}t=this.castInput(t),n=this.castInput(n),t=this.removeEmpty(this.tokenize(t)),n=this.removeEmpty(this.tokenize(n));var a=n.length,l=t.length,f=1,u=a+l,c=[{newPos:-1,components:[]}],d=this.extractCommon(c[0],n,t,0);if(c[0].newPos+1>=a&&d+1>=l)return o([{value:this.join(n),count:n.length}]);function p(){for(var g=-1*f;g<=f;g+=2){var m=void 0,C=c[g-1],_=c[g+1],B=(_?_.newPos:0)-g;C&&(c[g-1]=void 0);var q=C&&C.newPos+1<a,X=_&&0<=B&&B<l;if(!q&&!X){c[g]=void 0;continue}if(!q||X&&C.newPos<_.newPos?(m=Sd(_),s.pushComponent(m.components,void 0,!0)):(m=C,m.newPos++,s.pushComponent(m.components,!0,void 0)),B=s.extractCommon(m,n,t,g),m.newPos+1>=a&&B+1>=l)return o(_d(s,m.components,n,t,s.useLongestToken));c[g]=m}f++}if(i)(function g(){setTimeout(function(){if(f>u)return i();p()||g()},0)})();else for(;f<=u;){var b=p();if(b)return b}},pushComponent:function(t,n,r){var i=t[t.length-1];i&&i.added===n&&i.removed===r?t[t.length-1]={count:i.count+1,added:n,removed:r}:t.push({count:1,added:n,removed:r})},extractCommon:function(t,n,r,i){for(var s=n.length,o=r.length,a=t.newPos,l=a-i,f=0;a+1<s&&l+1<o&&this.equals(n[a+1],r[l+1]);)a++,l++,f++;return f&&t.components.push({count:f}),t.newPos=a,l},equals:function(t,n){return this.options.comparator?this.options.comparator(t,n):t===n||this.options.ignoreCase&&t.toLowerCase()===n.toLowerCase()},removeEmpty:function(t){for(var n=[],r=0;r<t.length;r++)t[r]&&n.push(t[r]);return n},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};function _d(e,t,n,r,i){for(var s=0,o=t.length,a=0,l=0;s<o;s++){var f=t[s];if(f.removed){if(f.value=e.join(r.slice(l,l+f.count)),l+=f.count,s&&t[s-1].added){var c=t[s-1];t[s-1]=t[s],t[s]=c}}else{if(!f.added&&i){var u=n.slice(a,a+f.count);u=u.map(function(p,b){var g=r[l+b];return g.length>p.length?g:p}),f.value=e.join(u)}else f.value=e.join(n.slice(a,a+f.count));a+=f.count,f.added||(l+=f.count)}}var d=t[o-1];return o>1&&typeof d.value=="string"&&(d.added||d.removed)&&e.equals("",d.value)&&(t[o-2].value+=d.value,t.pop()),t}function Sd(e){return{newPos:e.newPos,components:e.components.slice(0)}}var s0=new pt;var Us=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,$s=/\S/,Ws=new pt;Ws.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!$s.test(e)&&!$s.test(t)};Ws.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),n=0;n<t.length-1;n++)!t[n+1]&&t[n+2]&&Us.test(t[n])&&Us.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var pi=new pt;pi.tokenize=function(e){var t=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var r=0;r<n.length;r++){var i=n[r];r%2&&!this.options.newlineIsToken?t[t.length-1]+=i:(this.options.ignoreWhitespace&&(i=i.trim()),t.push(i))}return t};function mi(e,t,n){return pi.diff(e,t,n)}var jd=new pt;jd.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var Md=new pt;Md.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function cr(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?cr=function(t){return typeof t}:cr=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cr(e)}var Id=Object.prototype.toString,mn=new pt;mn.useLongestToken=!0;mn.tokenize=pi.tokenize;mn.castInput=function(e){var t=this.options,n=t.undefinedReplacement,r=t.stringifyReplacer,i=r===void 0?function(s,o){return typeof o=="undefined"?n:o}:r;return typeof e=="string"?e:JSON.stringify(di(e,null,null,i),i," ")};mn.equals=function(e,t){return pt.prototype.equals.call(mn,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function Bs(e,t,n){return mn.diff(e,t,n)}function di(e,t,n,r,i){t=t||[],n=n||[],r&&(e=r(i,e));var s;for(s=0;s<t.length;s+=1)if(t[s]===e)return n[s];var o;if(Id.call(e)==="[object Array]"){for(t.push(e),o=new Array(e.length),n.push(o),s=0;s<e.length;s+=1)o[s]=di(e[s],t,n,r,i);return t.pop(),n.pop(),o}if(e&&e.toJSON&&(e=e.toJSON()),cr(e)==="object"&&e!==null){t.push(e),o={},n.push(o);var a=[],l;for(l in e)e.hasOwnProperty(l)&&a.push(l);for(a.sort(),s=0;s<a.length;s+=1)l=a[s],o[l]=di(e[l],t,n,r,l);t.pop(),n.pop()}else o=e;return o}var hi=new pt;hi.tokenize=function(e){return e.slice()};hi.join=hi.removeEmpty=function(e){return e};var Ca=Ui(ya(),1);Ie();Ie();async function ye({objects:e,selectIdentifier:t,selectDisplayName:n=t,onSyncComplete:r}){let i=e.reduce((a,l)=>{let f=t(l);if(a[f])throw new Error(`Identifier ${f} was not unique.`);return a[f]={id:f,object:l,providerId:f,displayName:n(l)},a},{});async function*s(){for(let a of Object.values(i))yield a}function o(){return Object.entries(i).sort((a,l)=>a[0].localeCompare(l[0])).map(a=>a[1].object)}return{objects:s(),deleteObject:async a=>{delete i[a]},writeObject:async a=>{let l=t(a.object);i[l]=a},extractCurrent:o,onSyncComplete:r?a=>r(a,o()):void 0}}Ie();var Qh=Jr(Xr());Ie();function k(e){var t,n;return e.option("apiKey",{describe:"Uniform API key. Defaults to CANVAS_CLI_API_KEY or UNIFORM_API_KEY env. Supports dotenv.",default:(n=(t=process.env.CANVAS_CLI_API_KEY)!=null?t:process.env.UPM_CLI_API_KEY)!=null?n:process.env.UNIFORM_API_KEY,demandOption:!0,type:"string"}).option("apiHost",{describe:"Uniform host. Defaults to UNIFORM_CLI_BASE_URL env or https://uniform.app. Supports dotenv.",default:process.env.UNIFORM_CLI_BASE_URL||"https://uniform.app",demandOption:!0,type:"string"})}function R(e){var t,n,r;return e.option("project",{describe:"Uniform project ID. Defaults to UNIFORM_CLI_PROJECT_ID or UNIFORM_PROJECT_ID env. Supports dotenv.",default:(r=(n=(t=process.env.UNIFORM_CLI_PROJECT_ID)!=null?t:process.env.CANVAS_CLI_PROJECT_ID)!=null?n:process.env.UPM_CLI_PROJECT_ID)!=null?r:process.env.UNIFORM_PROJECT_ID,demandOption:!0,type:"string",alias:["p"]})}function we(e){return e.option("format",{alias:["f"],describe:"Output format",default:"yaml",choices:["yaml","json"],type:"string"}).option("filename",{alias:["o"],describe:"Output filename. If not specified, write to stdout.",type:"string"})}function Ae(e){var t;return e.option("diff",{describe:"Whether to show diffs in stdout. off = no diffs; update = on for updates; on = updates, creates, deletes. Can be set by UNIFORM_CLI_DIFF_MODE environment variable.",default:(t=process.env.UNIFORM_CLI_DIFF_MODE)!=null?t:"off",type:"string",choices:["off","update","on"],alias:["d"]})}function xe(e){let t=Aa(e);return t===".yaml"||t===".yml"||t===".json"}function ue(e,t,n){let r;if(n&&!t){let i=Aa(n);i===".yaml"||i===".yml"?t="yaml":i===".json"&&(t="json")}else if(!t)throw new Error("Format must be specified when no filename is passed");switch(t){case"json":r=JSON.stringify(e,null,2);break;case"yaml":r=Rs(e);break;default:throw new Error(`Unsupported format: ${t}`)}n?np(n,r,"utf8"):console.log(r)}function lt(e){let t=rp(e,"utf8");return ks(t,{filename:e,json:!0})}async function ve({directory:e,format:t="yaml",selectIdentifier:n,selectDisplayName:r=n}){Jh(e)||Xh(e,{recursive:!0});let i=await Zh(e,"utf-8"),s=new Set(i.filter(l=>{let f=tp(l);return f===".json"||f===".yaml"||f===".yml"})),o=l=>wa(e,`${l}.${t}`);async function*a(){for(let l of s){let f=wa(e,l);try{let u=await lt(f);yield{id:n(u),displayName:r(u),providerId:f,object:u}}catch(u){throw console.error(Qh.default.red(`Failed to read ${f}, data is likely invalid.
|
106
|
+
${u==null?void 0:u.message}`)),u}}}return{objects:a(),deleteObject:async l=>{await ep(l)},writeObject:async l=>{ue(l.object,t,o(l.id))}}}Ie();function xa(e,t){if(!t&&!ip.existsSync(e))return{};let n=lt(e);if(typeof n!="object")throw new Error(`Package ${e} does not appear valid.`);return n}function va(e,t){ue(t,void 0,e)}Ie();async function de({source:e,target:t,compareContents:n=(a,l)=>(0,Ca.default)(a.object,l.object,(f,u,c)=>c==="created"||c==="modified"?!0:void 0),mode:r,allowEmptySource:i=!1,whatIf:s=!1,log:o=()=>{}}){var a,l;let f=new Map;for await(let d of t.objects)f.set(d.id,d);let u=[],c=!1;for await(let d of e.objects){c=!0;let p=d.id,b=f.get(p);if(b){if(!n(d,b)&&(r==="createOrUpdate"||r==="mirror")){let g=async(m,C)=>{var _;if(!s)try{await t.writeObject(m,C)}catch(B){throw new wr(B,m)}o({action:"update",id:p,providerId:m.providerId,displayName:(_=m.displayName)!=null?_:m.providerId,whatIf:s,diff:Bs(C.object,m.object)})};u.push(g(d,b))}f.delete(p)}else{let g=async(m,C)=>{var _;if(!s)try{await t.writeObject(m)}catch(B){throw new wr(B,m)}o({action:"create",id:C,providerId:C,displayName:(_=m.displayName)!=null?_:m.providerId,whatIf:s,diff:mi("",JSON.stringify(m.object,null,2))})};u.push(g(d,p))}}if(await Promise.all(u),r==="mirror"){if(!c&&!i)throw new Error("Source is empty and mode is mirror. This would cause deletion of everything in the target, and most likely indicates an error in source definition.");let d=[];f.forEach(async p=>{let b=async g=>{var m;if(!s)try{await t.deleteObject(g.providerId)}catch(C){throw new wr(C,g)}o({action:"delete",id:g.id,providerId:g.providerId,displayName:(m=g.displayName)!=null?m:g.providerId,whatIf:s,diff:mi(JSON.stringify(g.object,null,2),"")})};d.push(b(p))}),await Promise.all(d)}await Promise.all([(a=e.onSyncComplete)==null?void 0:a.call(e,!1),(l=t.onSyncComplete)==null?void 0:l.call(t,!0)])}var wr=class extends Error{constructor(e,t){super(`Error syncing ${(n=t.displayName)!=null?n:t.providerId} (${t.providerId})
|
107
107
|
${e}`);var n;this.stack=void 0,Object.setPrototypeOf(this,wr.prototype)}};Ie();var wn=Jr(Xr());function he(e){let{diffMode:t="off",indent:n,prefix:r}=e!=null?e:{};return function({action:i,displayName:s,whatIf:o,diff:a}){let l="";switch(i){case"create":l=wn.default.green("[A]");break;case"update":l=wn.default.white("[U]");break;case"delete":l=wn.default.yellow("[D]");break}let f="";(t==="on"||t==="update"&&i==="update")&&(f=`
|
108
|
-
`+a.map(u=>u.added?wn.default.green(u.value):u.removed?wn.default.red(u.value):u.value).join("")),console.log(`${n!=null?n:""}${o?wn.default.gray("[WHATIF]"):""}${l}${r!=null?r:""} ${s}${f}`)}}var Oa={command:"get <id>",describe:"Fetch an aggregate",builder:e=>we(N(k(e.positional("id",{demandOption:!0,describe:"Aggregate public ID to fetch"})))),handler:async({apiHost:e,apiKey:t,id:n,format:r,project:i,filename:s})=>{let a=await new He({apiKey:t,apiHost:e,fetch:op,projectId:i}).get({aggregateId:n});a.aggregates.length===0?(console.error("Aggregate did not exist"),process.exit(1)):ue(a.aggregates[0],r,s)}};w();import sp from"isomorphic-unfetch";var Ea={command:"list",describe:"List aggregates",aliases:["ls"],builder:e=>we(N(k(e))),handler:async({apiHost:e,apiKey:t,format:n,filename:r,project:i})=>{let o=await new He({apiKey:t,apiHost:e,fetch:sp,projectId:i}).get({});ue(o.aggregates,n,r)}};w();import lp from"isomorphic-unfetch";w();var jt=e=>e.id,Mt=e=>`${e.name} (pid: ${e.id})`;w();function Ce(e,t){return xa(e,t)}function ct(e,t){va(e,t)}w();import ap from"p-limit";var Oe=ap(8);w();function Ar({client:e,type:t}){async function*n(){let i=(await e.get({type:t})).aggregates;for await(let s of i)yield{id:jt(s),displayName:Mt(s),providerId:s.id,object:s}}let r=[];return{objects:n(),deleteObject:async i=>{await e.remove({aggregateId:i})},writeObject:async i=>{await e.upsert({aggregate:i.object,skipInputs:!0}),r.push(i.object)},complete:async()=>{await Promise.all(r.map(i=>e.upsert({aggregate:i,skipInputs:!1})))}}}var _a={command:"pull <directory>",describe:"Pulls all aggregates to local files in a directory",builder:e=>N(k(Ae(e.positional("directory",{describe:"Directory to save the aggregates to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",type:"string"}).option("format",{alias:["f"],describe:"Output format",default:"yaml",choices:["yaml","json"],type:"string"}).option("what-if",{alias:["w"],describe:"What-if mode reports what would be done but changes no files",default:!1,type:"boolean"}).option("mode",{alias:["m"],describe:'What kind of changes can be made. "create" = create new files, update nothing. "createOrUpdate" = create new files, update existing, delete nothing. "mirror" = create, update, and delete to mirror state',choices:["create","createOrUpdate","mirror"],default:"mirror",type:"string"})))),handler:async({apiHost:e,apiKey:t,directory:n,format:r,mode:i,whatIf:s,project:o,diff:a})=>{var d;let l=new He({apiKey:t,apiHost:e,fetch:lp,projectId:o,limitPolicy:Oe}),f=Ar({client:l}),u;if(xe(n)){let p=Ce(n,!1);u=await ye({objects:(d=p.aggregates)!=null?d:[],selectIdentifier:jt,selectDisplayName:Mt,onSyncComplete:async(b,g)=>{p.aggregates=g,ct(n,p)}})}else u=await ve({directory:n,selectIdentifier:jt,selectDisplayName:Mt,format:r});await de({source:f,target:u,mode:i,whatIf:s,log:he({diffMode:a})})}};w();import cp from"isomorphic-unfetch";var Sa={command:"push <directory>",describe:"Pushes all aggregates from files in a directory or package to Uniform",builder:e=>N(k(Ae(e.positional("directory",{describe:"Directory to read the aggregates from. If a filename is used, a package will be read instead.",type:"string"}).option("what-if",{alias:["w"],describe:"What-if mode reports what would be done but changes nothing",default:!1,type:"boolean"}).option("mode",{alias:["m"],describe:'What kind of changes can be made. "create" = create new, update nothing. "createOrUpdate" = create new, update existing, delete nothing. "mirror" = create, update, and delete',choices:["create","createOrUpdate","mirror"],default:"mirror",type:"string"})))),handler:async({apiHost:e,apiKey:t,directory:n,mode:r,whatIf:i,project:s,diff:o})=>{var c;let a=new He({apiKey:t,apiHost:e,fetch:cp,projectId:s,limitPolicy:Oe}),l;if(xe(n)){let d=Ce(n,!0);l=await ye({objects:(c=d.aggregates)!=null?c:[],selectIdentifier:jt,selectDisplayName:Mt})}else l=await ve({directory:n,selectIdentifier:jt,selectDisplayName:Mt});let u=Ar({client:a});await de({source:l,target:u,mode:r,whatIf:i,log:he({diffMode:o})}),await u.complete()}};w();import fp from"isomorphic-unfetch";var ja={command:"remove <id>",aliases:["delete","rm"],describe:"Delete an aggregate",builder:e=>N(k(e.positional("id",{demandOption:!0,describe:"Aggregate public ID to delete"}))),handler:async({apiHost:e,apiKey:t,id:n,project:r})=>{await new He({apiKey:t,apiHost:e,fetch:fp,projectId:r}).remove({aggregateId:n})}};w();import up from"isomorphic-unfetch";var Ma={command:"update <filename>",aliases:["put"],describe:"Insert or update an aggregate",builder:e=>N(k(e.positional("filename",{demandOption:!0,describe:"Aggregate file to put"}))),handler:async({apiHost:e,apiKey:t,filename:n,project:r})=>{let i=new He({apiKey:t,apiHost:e,fetch:up,projectId:r}),s=lt(n);await i.upsert({aggregate:s})}};var Ia={command:"aggregate <command>",aliases:["agg","intent","audience"],describe:"Commands for Context aggregates (intents, audiences)",builder:e=>e.command(_a).command(Sa).command(Oa).command(ja).command(Ea).command(Ma).demandCommand(),handler:()=>{Ne.help()}};w();w();import dp from"isomorphic-unfetch";var Pa={command:"get <id>",describe:"Fetch an enrichment category and its values",builder:e=>we(N(k(e.positional("id",{demandOption:!0,describe:"Enrichment category public ID to fetch"})))),handler:async({apiHost:e,apiKey:t,id:n,format:r,project:i,filename:s})=>{var l,f;let a=(f=(l=await new rt({apiKey:t,apiHost:e,fetch:dp,projectId:i}).get())==null?void 0:l.enrichments)==null?void 0:f.filter(u=>u.id===n);a.length===0?(console.error("Enrichment did not exist"),process.exit(1)):ue(a[0],r,s)}};w();import hp from"isomorphic-unfetch";var Fa={command:"list",describe:"List enrichments",aliases:["ls"],builder:e=>we(N(k(e))),handler:async({apiHost:e,apiKey:t,format:n,filename:r,project:i})=>{let o=await new rt({apiKey:t,apiHost:e,fetch:hp,projectId:i}).get();ue(o.enrichments,n,r)}};w();import pp from"isomorphic-unfetch";w();var It=e=>e.id,Pt=e=>`${e.name} (pid: ${e.id})`;w();function xr({client:e}){async function*t(){let n=(await e.get()).enrichments;for await(let r of n)yield{id:It(r),displayName:Pt(r),providerId:r.id,object:r}}return{objects:t(),deleteObject:async n=>{await e.removeCategory({enrichmentId:n})},writeObject:async(n,r)=>{var o,a;await e.upsertCategory({enrichment:n.object});let i=La({categoryId:n.id,values:n.object.values}),s=La({categoryId:n.id,values:(a=(o=r==null?void 0:r.object)==null?void 0:o.values)!=null?a:[],client:e});await de({source:i,target:s,mode:"mirror",whatIf:!1,log:he({diffMode:"off",prefix:` ${n.displayName} value`,indent:"> "})})}}}var La=({client:e,categoryId:t,values:n})=>({objects:async function*(){for(let i of n)yield{id:i.id,providerId:i.id,object:i,displayName:`${i.value} (pid: ${i.id})`}}(),deleteObject:async i=>{if(!e)throw new Error("Provider is read only");await e.removeValue({enrichmentId:t,enrichmentValueId:i})},writeObject:async i=>{if(!e)throw new Error("Provider is read only");await e.upsertValue({enrichmentId:t,enrichmentValue:i.object})}});var Da={command:"pull <directory>",describe:"Pulls all enrichments to local files in a directory",builder:e=>N(k(Ae(e.positional("directory",{describe:"Directory to save the enrichments to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",type:"string"}).option("format",{alias:["f"],describe:"Output format",default:"yaml",choices:["yaml","json"],type:"string"}).option("what-if",{alias:["w"],describe:"What-if mode reports what would be done but changes no files",default:!1,type:"boolean"}).option("mode",{alias:["m"],describe:'What kind of changes can be made. "create" = create new files, update nothing. "createOrUpdate" = create new files, update existing, delete nothing. "mirror" = create, update, and delete to mirror state',choices:["create","createOrUpdate","mirror"],default:"mirror",type:"string"})))),handler:async({apiHost:e,apiKey:t,directory:n,format:r,mode:i,whatIf:s,project:o,diff:a})=>{var d;let l=new rt({apiKey:t,apiHost:e,fetch:pp,projectId:o,limitPolicy:Oe}),f=xr({client:l}),u;if(xe(n)){let p=Ce(n,!1);u=await ye({objects:(d=p.enrichments)!=null?d:[],selectIdentifier:It,selectDisplayName:Pt,onSyncComplete:async(b,g)=>{p.enrichments=g,ct(n,p)}})}else u=await ve({directory:n,selectIdentifier:It,selectDisplayName:Pt,format:r});await de({source:f,target:u,mode:i,whatIf:s,log:he({diffMode:a})})}};w();import mp from"isomorphic-unfetch";var Ta={command:"push <directory>",describe:"Pushes all enrichments from files in a directory or package to Uniform",builder:e=>N(k(Ae(e.positional("directory",{describe:"Directory to read the enrichments from. If a filename is used, a package will be read instead.",type:"string"}).option("what-if",{alias:["w"],describe:"What-if mode reports what would be done but changes nothing",default:!1,type:"boolean"}).option("mode",{alias:["m"],describe:'What kind of changes can be made. "create" = create new, update nothing. "createOrUpdate" = create new, update existing, delete nothing. "mirror" = create, update, and delete',choices:["create","createOrUpdate","mirror"],default:"mirror",type:"string"})))),handler:async({apiHost:e,apiKey:t,directory:n,mode:r,whatIf:i,project:s,diff:o})=>{var c;let a=new rt({apiKey:t,apiHost:e,fetch:mp,projectId:s,limitPolicy:Oe}),l;if(xe(n)){let d=Ce(n,!0);l=await ye({objects:(c=d.enrichments)!=null?c:[],selectIdentifier:It,selectDisplayName:Pt})}else l=await ve({directory:n,selectIdentifier:It,selectDisplayName:Pt});let u=xr({client:a});await de({source:l,target:u,mode:r,whatIf:i,log:he({diffMode:o})})}};w();import gp from"isomorphic-unfetch";var Na={command:"remove <id>",aliases:["delete","rm"],describe:"Delete an enrichment category and its values",builder:e=>N(k(e.positional("id",{demandOption:!0,describe:"Enrichment category public ID to delete"}))),handler:async({apiHost:e,apiKey:t,id:n,project:r})=>{await new rt({apiKey:t,apiHost:e,fetch:gp,projectId:r}).removeCategory({enrichmentId:n})}};var ka={command:"enrichment <command>",aliases:["enr"],describe:"Commands for Context enrichments",builder:e=>e.command(Da).command(Ta).command(Pa).command(Na).command(Fa).demandCommand(),handler:()=>{Ne.help()}};w();w();var Un=Ui(bl());import{writeFile as Wp}from"fs";import Bp from"isomorphic-unfetch";import{exit as Ri}from"process";var yl={command:"get [output]",aliases:["dl","download"],describe:"Download the Uniform Context manifest for a project",builder:e=>{var t,n,r;return e.option("apiKey",{alias:"k",demandOption:!0,string:!0,default:(t=process.env.UNIFORM_API_KEY)!=null?t:"",describe:"Uniform API key to use. Defaults to UNIFORM_API_KEY env if set."}).option("project",{describe:"Uniform project ID. Defaults to UCTX_CLI_PROJECT_ID or UNIFORM_PROJECT_ID env. Supports dotenv.",demandOption:!0,default:(r=(n=process.env.UCTX_CLI_PROJECT_ID)!=null?n:process.env.UNIFORM_PROJECT_ID)!=null?r:"",type:"string",alias:["p"]}).option("preview",{describe:"If set, fetches the unpublished preview manifest (The API key must have permission)",default:!1,type:"boolean",alias:["d"]}).option("output",{string:!0,alias:"o",default:process.env.UNIFORM_MANIFEST_PATH,describe:"Path to write manifest to. Defaults to UNIFORM_MANIFEST_PATH env if set."})},handler:async({apiKey:e,output:t,project:n,preview:r})=>{n||(console.error(Un.default.red("You must specify the project ID")),Ri(1));let i=Hp(),s=new Wi({apiHost:i,projectId:n,apiKey:e,fetch:Bp});try{let o=await s.get({preview:r}),a=JSON.stringify(o,null,2);t?Wp(t,a,l=>{l&&(console.error(`Error writing file to ${t}
|
109
|
-
`,l),Ri(1)),console.log(Un.default.green(`\u2705 ${t} has been updated from ${i}`))}):console.log(a)}catch(o){let a;o instanceof $i?(o.statusCode===403&&(a=`The API key ${e} did not have permissions to fetch the manifest. Ensure ${r?"Context > Read Drafts":"Context > Manifest > Read"} permissions are granted.`),a=o.message):a=o.toString(),console.error(Un.default.red("\u26A0 Error fetching Context manifest")),console.error(Un.default.gray(` \u2757 ${a}`)),Ri(1)}}},Hp=()=>process.env.UNIFORM_CLI_BASE_URL||"https://uniform.app";var wl={command:"manifest <command>",describe:"Commands for context manifests",aliases:["man"],builder:e=>e.command(yl).demandCommand(),handler:()=>{Ne.help()}};w();w();import qp from"isomorphic-unfetch";var Al={command:"get <id>",describe:"Fetch a quirk",builder:e=>we(N(k(e.positional("id",{demandOption:!0,describe:"Quirk public ID to fetch"})))),handler:async({apiHost:e,apiKey:t,id:n,format:r,project:i,filename:s})=>{let a=await new qe({apiKey:t,apiHost:e,fetch:qp,projectId:i}).get({quirkId:n,withIntegrations:!0});a.quirks.length===0?(console.error("Quirk did not exist"),process.exit(1)):ue(a.quirks[0],r,s)}};w();import Yp from"isomorphic-unfetch";var xl={command:"list",describe:"List quirks",aliases:["ls"],builder:e=>we(N(k(e.option("withIntegrations",{alias:["i"],describe:"Whether to include meta-quirks created by integrations in the list. Defaults to false.",type:"boolean"})))),handler:async({apiHost:e,apiKey:t,format:n,filename:r,project:i,withIntegrations:s})=>{let a=await new qe({apiKey:t,apiHost:e,fetch:Yp,projectId:i}).get({withIntegrations:s});ue(a.quirks,n,r)}};w();import Gp from"isomorphic-unfetch";w();var Lt=e=>e.id,Dt=e=>`${e.name} (pid: ${e.id})`;w();function jr({client:e}){async function*t(){let n=(await e.get({withIntegrations:!1})).quirks;for await(let r of n)yield{id:Lt(r),displayName:Dt(r),providerId:r.id,object:r}}return{objects:t(),deleteObject:async n=>{await e.remove({quirkId:n})},writeObject:async n=>{await e.upsert({quirk:n.object})}}}var vl={command:"pull <directory>",describe:"Pulls all quirks to local files in a directory",builder:e=>N(k(Ae(e.positional("directory",{describe:"Directory to save the quirks to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",type:"string"}).option("format",{alias:["f"],describe:"Output format",default:"yaml",choices:["yaml","json"],type:"string"}).option("what-if",{alias:["w"],describe:"What-if mode reports what would be done but changes no files",default:!1,type:"boolean"}).option("mode",{alias:["m"],describe:'What kind of changes can be made. "create" = create new files, update nothing. "createOrUpdate" = create new files, update existing, delete nothing. "mirror" = create, update, and delete to mirror state',choices:["create","createOrUpdate","mirror"],default:"mirror",type:"string"})))),handler:async({apiHost:e,apiKey:t,directory:n,format:r,mode:i,whatIf:s,project:o,diff:a})=>{var d;let l=new qe({apiKey:t,apiHost:e,fetch:Gp,projectId:o,limitPolicy:Oe}),f=jr({client:l}),u;if(xe(n)){let p=Ce(n,!1);u=await ye({objects:(d=p.quirks)!=null?d:[],selectIdentifier:Lt,selectDisplayName:Dt,onSyncComplete:async(b,g)=>{p.quirks=g,ct(n,p)}})}else u=await ve({directory:n,selectIdentifier:Lt,selectDisplayName:Dt,format:r});await de({source:f,target:u,mode:i,whatIf:s,log:he({diffMode:a})})}};w();import zp from"isomorphic-unfetch";var Cl={command:"push <directory>",describe:"Pushes all quirks from files in a directory or package to Uniform",builder:e=>N(k(Ae(e.positional("directory",{describe:"Directory to read the quirks from. If a filename is used, a package will be read instead.",type:"string"}).option("what-if",{alias:["w"],describe:"What-if mode reports what would be done but changes nothing",default:!1,type:"boolean"}).option("mode",{alias:["m"],describe:'What kind of changes can be made. "create" = create new, update nothing. "createOrUpdate" = create new, update existing, delete nothing. "mirror" = create, update, and delete',choices:["create","createOrUpdate","mirror"],default:"mirror",type:"string"})))),handler:async({apiHost:e,apiKey:t,directory:n,mode:r,whatIf:i,project:s,diff:o})=>{var c;let a=new qe({apiKey:t,apiHost:e,fetch:zp,projectId:s,limitPolicy:Oe}),l;if(xe(n)){let d=Ce(n,!0);l=await ye({objects:(c=d.quirks)!=null?c:[],selectIdentifier:Lt,selectDisplayName:Dt})}else l=await ve({directory:n,selectIdentifier:Lt,selectDisplayName:Dt});let u=jr({client:a});await de({source:l,target:u,mode:r,whatIf:i,log:he({diffMode:o})})}};w();import Vp from"isomorphic-unfetch";var Ol={command:"remove <id>",aliases:["delete","rm"],describe:"Delete a quirk",builder:e=>N(k(e.positional("id",{demandOption:!0,describe:"Quirk public ID to delete"}))),handler:async({apiHost:e,apiKey:t,id:n,project:r})=>{await new qe({apiKey:t,apiHost:e,fetch:Vp,projectId:r}).remove({quirkId:n})}};w();import Kp from"isomorphic-unfetch";var El={command:"update <filename>",aliases:["put"],describe:"Insert or update a quirk",builder:e=>N(k(e.positional("filename",{demandOption:!0,describe:"Quirk file to put"}))),handler:async({apiHost:e,apiKey:t,filename:n,project:r})=>{let i=new qe({apiKey:t,apiHost:e,fetch:Kp,projectId:r}),s=lt(n);await i.upsert({quirk:s})}};var _l={command:"quirk <command>",aliases:["qk"],describe:"Commands for Context quirks",builder:e=>e.command(vl).command(Cl).command(Al).command(Ol).command(xl).command(El).demandCommand(),handler:()=>{Ne.help()}};w();w();import Qp from"isomorphic-unfetch";var Sl={command:"get <id>",describe:"Fetch a signal",builder:e=>we(N(k(e.positional("id",{demandOption:!0,describe:"Signal public ID to fetch"})))),handler:async({apiHost:e,apiKey:t,id:n,format:r,project:i,filename:s})=>{let a=await new Ye({apiKey:t,apiHost:e,fetch:Qp,projectId:i}).get({signalId:n});a.signals.length===0?(console.error("Signal did not exist"),process.exit(1)):ue(a.signals[0],r,s)}};w();import Jp from"isomorphic-unfetch";var jl={command:"list",describe:"List signals",aliases:["ls"],builder:e=>we(N(k(e))),handler:async({apiHost:e,apiKey:t,format:n,filename:r,project:i})=>{let o=await new Ye({apiKey:t,apiHost:e,fetch:Jp,projectId:i}).get();ue(o.signals,n,r)}};w();import Xp from"isomorphic-unfetch";w();var Tt=e=>e.id,Nt=e=>`${e.name} (pid: ${e.id})`;w();function Mr({client:e}){async function*t(){let n=(await e.get()).signals;for await(let r of n)yield{id:Tt(r),displayName:Nt(r),providerId:r.id,object:r}}return{objects:t(),deleteObject:async n=>{await e.remove({signalId:n})},writeObject:async n=>{await e.upsert({signal:n.object})}}}var Ml={command:"pull <directory>",describe:"Pulls all signals to local files in a directory",builder:e=>N(k(Ae(e.positional("directory",{describe:"Directory to save the signals to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",type:"string"}).option("format",{alias:["f"],describe:"Output format",default:"yaml",choices:["yaml","json"],type:"string"}).option("what-if",{alias:["w"],describe:"What-if mode reports what would be done but changes no files",default:!1,type:"boolean"}).option("mode",{alias:["m"],describe:'What kind of changes can be made. "create" = create new files, update nothing. "createOrUpdate" = create new files, update existing, delete nothing. "mirror" = create, update, and delete to mirror state',choices:["create","createOrUpdate","mirror"],default:"mirror",type:"string"})))),handler:async({apiHost:e,apiKey:t,directory:n,format:r,mode:i,whatIf:s,project:o,diff:a})=>{var d;let l=new Ye({apiKey:t,apiHost:e,fetch:Xp,projectId:o,limitPolicy:Oe}),f=Mr({client:l}),u;if(xe(n)){let p=Ce(n,!1);u=await ye({objects:(d=p.signals)!=null?d:[],selectIdentifier:Tt,selectDisplayName:Nt,onSyncComplete:async(b,g)=>{p.signals=g,ct(n,p)}})}else u=await ve({directory:n,selectIdentifier:Tt,selectDisplayName:Nt,format:r});await de({source:f,target:u,mode:i,whatIf:s,log:he({diffMode:a})})}};w();import Zp from"isomorphic-unfetch";var Il={command:"push <directory>",describe:"Pushes all signals from files in a directory or package to Uniform",builder:e=>N(k(Ae(e.positional("directory",{describe:"Directory to read the signals from. If a filename is used, a package will be read instead.",type:"string"}).option("what-if",{alias:["w"],describe:"What-if mode reports what would be done but changes nothing",default:!1,type:"boolean"}).option("mode",{alias:["m"],describe:'What kind of changes can be made. "create" = create new, update nothing. "createOrUpdate" = create new, update existing, delete nothing. "mirror" = create, update, and delete',choices:["create","createOrUpdate","mirror"],default:"mirror",type:"string"})))),handler:async({apiHost:e,apiKey:t,directory:n,mode:r,whatIf:i,project:s,diff:o})=>{var c;let a=new Ye({apiKey:t,apiHost:e,fetch:Zp,projectId:s,limitPolicy:Oe}),l;if(xe(n)){let d=Ce(n,!0);l=await ye({objects:(c=d.signals)!=null?c:[],selectIdentifier:Tt,selectDisplayName:Nt})}else l=await ve({directory:n,selectIdentifier:Tt,selectDisplayName:Nt});let u=Mr({client:a});await de({source:l,target:u,mode:r,whatIf:i,log:he({diffMode:o})})}};w();import em from"isomorphic-unfetch";var Pl={command:"remove <id>",aliases:["delete","rm"],describe:"Delete a signal",builder:e=>N(k(e.positional("id",{demandOption:!0,describe:"Signal public ID to delete"}))),handler:async({apiHost:e,apiKey:t,id:n,project:r})=>{await new Ye({apiKey:t,apiHost:e,fetch:em,projectId:r}).remove({signalId:n})}};w();import tm from"isomorphic-unfetch";var Fl={command:"update <filename>",aliases:["put"],describe:"Insert or update a signal",builder:e=>N(k(e.positional("filename",{demandOption:!0,describe:"Signal file to put"}))),handler:async({apiHost:e,apiKey:t,filename:n,project:r})=>{let i=new Ye({apiKey:t,apiHost:e,fetch:tm,projectId:r}),s=lt(n);await i.upsert({signal:s})}};var Ll={command:"signal <command>",aliases:["sig"],describe:"Commands for Context signals",builder:e=>e.command(Ml).command(Il).command(Sl).command(Pl).command(jl).command(Fl).demandCommand(),handler:()=>{Ne.help()}};w();w();import nm from"isomorphic-unfetch";var Dl={command:"get <id>",describe:"Fetch a test",builder:e=>we(N(k(e.positional("id",{demandOption:!0,describe:"Test public ID to fetch"})))),handler:async({apiHost:e,apiKey:t,id:n,format:r,project:i,filename:s})=>{let a=await new Ge({apiKey:t,apiHost:e,fetch:nm,projectId:i}).get({testId:n});a.tests.length===0?(console.error("Test did not exist"),process.exit(1)):ue(a.tests[0],r,s)}};w();import rm from"isomorphic-unfetch";var Tl={command:"list",describe:"List tests",aliases:["ls"],builder:e=>we(N(k(e))),handler:async({apiHost:e,apiKey:t,format:n,filename:r,project:i})=>{let o=await new Ge({apiKey:t,apiHost:e,fetch:rm,projectId:i}).get();ue(o.tests,n,r)}};w();import im from"isomorphic-unfetch";w();var kt=e=>e.id,Rt=e=>`${e.name} (pid: ${e.id})`;w();function Ir({client:e}){async function*t(){let n=(await e.get()).tests;for await(let r of n)yield{id:kt(r),displayName:Rt(r),providerId:r.id,object:r}}return{objects:t(),deleteObject:async n=>{await e.remove({testId:n})},writeObject:async n=>{await e.upsert({test:n.object})}}}var Nl={command:"pull <directory>",describe:"Pulls all tests to local files in a directory",builder:e=>N(k(Ae(e.positional("directory",{describe:"Directory to save the tests to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",type:"string"}).option("format",{alias:["f"],describe:"Output format",default:"yaml",choices:["yaml","json"],type:"string"}).option("what-if",{alias:["w"],describe:"What-if mode reports what would be done but changes no files",default:!1,type:"boolean"}).option("mode",{alias:["m"],describe:'What kind of changes can be made. "create" = create new files, update nothing. "createOrUpdate" = create new files, update existing, delete nothing. "mirror" = create, update, and delete to mirror state',choices:["create","createOrUpdate","mirror"],default:"mirror",type:"string"})))),handler:async({apiHost:e,apiKey:t,directory:n,format:r,mode:i,whatIf:s,project:o,diff:a})=>{var d;let l=new Ge({apiKey:t,apiHost:e,fetch:im,projectId:o,limitPolicy:Oe}),f=Ir({client:l}),u;if(xe(n)){let p=Ce(n,!1);u=await ye({objects:(d=p.tests)!=null?d:[],selectIdentifier:kt,selectDisplayName:Rt,onSyncComplete:async(b,g)=>{p.tests=g,ct(n,p)}})}else u=await ve({directory:n,selectIdentifier:kt,selectDisplayName:Rt,format:r});await de({source:f,target:u,mode:i,whatIf:s,log:he({diffMode:a})})}};w();import om from"isomorphic-unfetch";var kl={command:"push <directory>",describe:"Pushes all tests from files in a directory or package to Uniform",builder:e=>N(k(Ae(e.positional("directory",{describe:"Directory to read the tests from. If a filename is used, a package will be read instead.",type:"string"}).option("what-if",{alias:["w"],describe:"What-if mode reports what would be done but changes nothing",default:!1,type:"boolean"}).option("mode",{alias:["m"],describe:'What kind of changes can be made. "create" = create new, update nothing. "createOrUpdate" = create new, update existing, delete nothing. "mirror" = create, update, and delete',choices:["create","createOrUpdate","mirror"],default:"mirror",type:"string"})))),handler:async({apiHost:e,apiKey:t,directory:n,mode:r,whatIf:i,project:s,diff:o})=>{var c;let a=new Ge({apiKey:t,apiHost:e,fetch:om,projectId:s,limitPolicy:Oe}),l;if(xe(n)){let d=Ce(n,!0);l=await ye({objects:(c=d.tests)!=null?c:[],selectIdentifier:kt,selectDisplayName:Rt})}else l=await ve({directory:n,selectIdentifier:kt,selectDisplayName:Rt});let u=Ir({client:a});await de({source:l,target:u,mode:r,whatIf:i,log:he({diffMode:o})})}};w();import sm from"isomorphic-unfetch";var Rl={command:"remove <id>",aliases:["delete","rm"],describe:"Delete a test",builder:e=>N(k(e.positional("id",{demandOption:!0,describe:"Test public ID to delete"}))),handler:async({apiHost:e,apiKey:t,id:n,project:r})=>{await new Ge({apiKey:t,apiHost:e,fetch:sm,projectId:r}).remove({testId:n})}};w();import am from"isomorphic-unfetch";var Ul={command:"update <filename>",aliases:["put"],describe:"Insert or update a test",builder:e=>N(k(e.positional("filename",{demandOption:!0,describe:"Test file to put"}))),handler:async({apiHost:e,apiKey:t,filename:n,project:r})=>{let i=new Ge({apiKey:t,apiHost:e,fetch:am,projectId:r}),s=lt(n);await i.upsert({test:s})}};var $l={command:"test <command>",describe:"Commands for Context A/B tests",builder:e=>e.command(Nl).command(kl).command(Dl).command(Rl).command(Tl).command(Ul).demandCommand(),handler:()=>{Ne.help()}};var LA={commands:[{command:"context <command>",aliases:["ctx"],describe:"Uniform Context commands",builder:e=>e.command(wl).command(Ll).command(ka).command(Ia).command(_l).command($l).demandCommand(),handler:()=>{Ne.showHelp()}}]};export{Ce as readContextPackage,LA as uniformCLI,ct as writeContextPackage};
|
108
|
+
`+a.map(u=>u.added?wn.default.green(u.value):u.removed?wn.default.red(u.value):u.value).join("")),console.log(`${n!=null?n:""}${o?wn.default.gray("[WHATIF]"):""}${l}${r!=null?r:""} ${s}${f}`)}}var Oa={command:"get <id>",describe:"Fetch an aggregate",builder:e=>we(k(R(e.positional("id",{demandOption:!0,describe:"Aggregate public ID to fetch"})))),handler:async({apiHost:e,apiKey:t,id:n,format:r,project:i,filename:s})=>{let a=await new He({apiKey:t,apiHost:e,fetch:op,projectId:i}).get({aggregateId:n});a.aggregates.length===0?(console.error("Aggregate did not exist"),process.exit(1)):ue(a.aggregates[0],r,s)}};w();import sp from"isomorphic-unfetch";var Ea={command:"list",describe:"List aggregates",aliases:["ls"],builder:e=>we(k(R(e))),handler:async({apiHost:e,apiKey:t,format:n,filename:r,project:i})=>{let o=await new He({apiKey:t,apiHost:e,fetch:sp,projectId:i}).get({});ue(o.aggregates,n,r)}};w();import lp from"isomorphic-unfetch";w();var jt=e=>e.id,Mt=e=>`${e.name} (pid: ${e.id})`;w();function Ce(e,t){return xa(e,t)}function ct(e,t){va(e,t)}w();import ap from"p-limit";var Oe=ap(8);w();function Ar({client:e,type:t}){async function*n(){let i=(await e.get({type:t})).aggregates;for await(let s of i)yield{id:jt(s),displayName:Mt(s),providerId:s.id,object:s}}let r=[];return{objects:n(),deleteObject:async i=>{await e.remove({aggregateId:i})},writeObject:async i=>{await e.upsert({aggregate:i.object,skipInputs:!0}),r.push(i.object)},complete:async()=>{await Promise.all(r.map(i=>e.upsert({aggregate:i,skipInputs:!1})))}}}var _a={command:"pull <directory>",describe:"Pulls all aggregates to local files in a directory",builder:e=>k(R(Ae(e.positional("directory",{describe:"Directory to save the aggregates to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",type:"string"}).option("format",{alias:["f"],describe:"Output format",default:"yaml",choices:["yaml","json"],type:"string"}).option("what-if",{alias:["w"],describe:"What-if mode reports what would be done but changes no files",default:!1,type:"boolean"}).option("mode",{alias:["m"],describe:'What kind of changes can be made. "create" = create new files, update nothing. "createOrUpdate" = create new files, update existing, delete nothing. "mirror" = create, update, and delete to mirror state',choices:["create","createOrUpdate","mirror"],default:"mirror",type:"string"})))),handler:async({apiHost:e,apiKey:t,directory:n,format:r,mode:i,whatIf:s,project:o,diff:a})=>{var d;let l=new He({apiKey:t,apiHost:e,fetch:lp,projectId:o,limitPolicy:Oe}),f=Ar({client:l}),u;if(xe(n)){let p=Ce(n,!1);u=await ye({objects:(d=p.aggregates)!=null?d:[],selectIdentifier:jt,selectDisplayName:Mt,onSyncComplete:async(b,g)=>{p.aggregates=g,ct(n,p)}})}else u=await ve({directory:n,selectIdentifier:jt,selectDisplayName:Mt,format:r});await de({source:f,target:u,mode:i,whatIf:s,log:he({diffMode:a})})}};w();import cp from"isomorphic-unfetch";var Sa={command:"push <directory>",describe:"Pushes all aggregates from files in a directory or package to Uniform",builder:e=>k(R(Ae(e.positional("directory",{describe:"Directory to read the aggregates from. If a filename is used, a package will be read instead.",type:"string"}).option("what-if",{alias:["w"],describe:"What-if mode reports what would be done but changes nothing",default:!1,type:"boolean"}).option("mode",{alias:["m"],describe:'What kind of changes can be made. "create" = create new, update nothing. "createOrUpdate" = create new, update existing, delete nothing. "mirror" = create, update, and delete',choices:["create","createOrUpdate","mirror"],default:"mirror",type:"string"})))),handler:async({apiHost:e,apiKey:t,directory:n,mode:r,whatIf:i,project:s,diff:o})=>{var c;let a=new He({apiKey:t,apiHost:e,fetch:cp,projectId:s,limitPolicy:Oe}),l;if(xe(n)){let d=Ce(n,!0);l=await ye({objects:(c=d.aggregates)!=null?c:[],selectIdentifier:jt,selectDisplayName:Mt})}else l=await ve({directory:n,selectIdentifier:jt,selectDisplayName:Mt});let u=Ar({client:a});await de({source:l,target:u,mode:r,whatIf:i,log:he({diffMode:o})}),await u.complete()}};w();import fp from"isomorphic-unfetch";var ja={command:"remove <id>",aliases:["delete","rm"],describe:"Delete an aggregate",builder:e=>k(R(e.positional("id",{demandOption:!0,describe:"Aggregate public ID to delete"}))),handler:async({apiHost:e,apiKey:t,id:n,project:r})=>{await new He({apiKey:t,apiHost:e,fetch:fp,projectId:r}).remove({aggregateId:n})}};w();import up from"isomorphic-unfetch";var Ma={command:"update <filename>",aliases:["put"],describe:"Insert or update an aggregate",builder:e=>k(R(e.positional("filename",{demandOption:!0,describe:"Aggregate file to put"}))),handler:async({apiHost:e,apiKey:t,filename:n,project:r})=>{let i=new He({apiKey:t,apiHost:e,fetch:up,projectId:r}),s=lt(n);await i.upsert({aggregate:s})}};var Ia={command:"aggregate <command>",aliases:["agg","intent","audience"],describe:"Commands for Context aggregates (intents, audiences)",builder:e=>e.command(_a).command(Sa).command(Oa).command(ja).command(Ea).command(Ma).demandCommand(),handler:()=>{Ne.help()}};w();w();import dp from"isomorphic-unfetch";var Pa={command:"get <id>",describe:"Fetch an enrichment category and its values",builder:e=>we(k(R(e.positional("id",{demandOption:!0,describe:"Enrichment category public ID to fetch"})))),handler:async({apiHost:e,apiKey:t,id:n,format:r,project:i,filename:s})=>{var l,f;let a=(f=(l=await new rt({apiKey:t,apiHost:e,fetch:dp,projectId:i}).get())==null?void 0:l.enrichments)==null?void 0:f.filter(u=>u.id===n);a.length===0?(console.error("Enrichment did not exist"),process.exit(1)):ue(a[0],r,s)}};w();import hp from"isomorphic-unfetch";var Fa={command:"list",describe:"List enrichments",aliases:["ls"],builder:e=>we(k(R(e))),handler:async({apiHost:e,apiKey:t,format:n,filename:r,project:i})=>{let o=await new rt({apiKey:t,apiHost:e,fetch:hp,projectId:i}).get();ue(o.enrichments,n,r)}};w();import pp from"isomorphic-unfetch";w();var It=e=>e.id,Pt=e=>`${e.name} (pid: ${e.id})`;w();function xr({client:e}){async function*t(){let n=(await e.get()).enrichments;for await(let r of n)yield{id:It(r),displayName:Pt(r),providerId:r.id,object:r}}return{objects:t(),deleteObject:async n=>{await e.removeCategory({enrichmentId:n})},writeObject:async(n,r)=>{var o,a;await e.upsertCategory({enrichment:n.object});let i=La({categoryId:n.id,values:n.object.values}),s=La({categoryId:n.id,values:(a=(o=r==null?void 0:r.object)==null?void 0:o.values)!=null?a:[],client:e});await de({source:i,target:s,mode:"mirror",whatIf:!1,log:he({diffMode:"off",prefix:` ${n.displayName} value`,indent:"> "})})}}}var La=({client:e,categoryId:t,values:n})=>({objects:async function*(){for(let i of n)yield{id:i.id,providerId:i.id,object:i,displayName:`${i.value} (pid: ${i.id})`}}(),deleteObject:async i=>{if(!e)throw new Error("Provider is read only");await e.removeValue({enrichmentId:t,enrichmentValueId:i})},writeObject:async i=>{if(!e)throw new Error("Provider is read only");await e.upsertValue({enrichmentId:t,enrichmentValue:i.object})}});var Da={command:"pull <directory>",describe:"Pulls all enrichments to local files in a directory",builder:e=>k(R(Ae(e.positional("directory",{describe:"Directory to save the enrichments to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",type:"string"}).option("format",{alias:["f"],describe:"Output format",default:"yaml",choices:["yaml","json"],type:"string"}).option("what-if",{alias:["w"],describe:"What-if mode reports what would be done but changes no files",default:!1,type:"boolean"}).option("mode",{alias:["m"],describe:'What kind of changes can be made. "create" = create new files, update nothing. "createOrUpdate" = create new files, update existing, delete nothing. "mirror" = create, update, and delete to mirror state',choices:["create","createOrUpdate","mirror"],default:"mirror",type:"string"})))),handler:async({apiHost:e,apiKey:t,directory:n,format:r,mode:i,whatIf:s,project:o,diff:a})=>{var d;let l=new rt({apiKey:t,apiHost:e,fetch:pp,projectId:o,limitPolicy:Oe}),f=xr({client:l}),u;if(xe(n)){let p=Ce(n,!1);u=await ye({objects:(d=p.enrichments)!=null?d:[],selectIdentifier:It,selectDisplayName:Pt,onSyncComplete:async(b,g)=>{p.enrichments=g,ct(n,p)}})}else u=await ve({directory:n,selectIdentifier:It,selectDisplayName:Pt,format:r});await de({source:f,target:u,mode:i,whatIf:s,log:he({diffMode:a})})}};w();import mp from"isomorphic-unfetch";var Ta={command:"push <directory>",describe:"Pushes all enrichments from files in a directory or package to Uniform",builder:e=>k(R(Ae(e.positional("directory",{describe:"Directory to read the enrichments from. If a filename is used, a package will be read instead.",type:"string"}).option("what-if",{alias:["w"],describe:"What-if mode reports what would be done but changes nothing",default:!1,type:"boolean"}).option("mode",{alias:["m"],describe:'What kind of changes can be made. "create" = create new, update nothing. "createOrUpdate" = create new, update existing, delete nothing. "mirror" = create, update, and delete',choices:["create","createOrUpdate","mirror"],default:"mirror",type:"string"})))),handler:async({apiHost:e,apiKey:t,directory:n,mode:r,whatIf:i,project:s,diff:o})=>{var c;let a=new rt({apiKey:t,apiHost:e,fetch:mp,projectId:s,limitPolicy:Oe}),l;if(xe(n)){let d=Ce(n,!0);l=await ye({objects:(c=d.enrichments)!=null?c:[],selectIdentifier:It,selectDisplayName:Pt})}else l=await ve({directory:n,selectIdentifier:It,selectDisplayName:Pt});let u=xr({client:a});await de({source:l,target:u,mode:r,whatIf:i,log:he({diffMode:o})})}};w();import gp from"isomorphic-unfetch";var Na={command:"remove <id>",aliases:["delete","rm"],describe:"Delete an enrichment category and its values",builder:e=>k(R(e.positional("id",{demandOption:!0,describe:"Enrichment category public ID to delete"}))),handler:async({apiHost:e,apiKey:t,id:n,project:r})=>{await new rt({apiKey:t,apiHost:e,fetch:gp,projectId:r}).removeCategory({enrichmentId:n})}};var ka={command:"enrichment <command>",aliases:["enr"],describe:"Commands for Context enrichments",builder:e=>e.command(Da).command(Ta).command(Pa).command(Na).command(Fa).demandCommand(),handler:()=>{Ne.help()}};w();w();var Un=Ui(bl());import{writeFile as Wp}from"fs";import Bp from"isomorphic-unfetch";import{exit as Ri}from"process";var yl={command:"get [output]",aliases:["dl","download"],describe:"Download the Uniform Context manifest for a project",builder:e=>{var t,n,r;return e.option("apiKey",{alias:"k",demandOption:!0,string:!0,default:(t=process.env.UNIFORM_API_KEY)!=null?t:"",describe:"Uniform API key to use. Defaults to UNIFORM_API_KEY env if set."}).option("project",{describe:"Uniform project ID. Defaults to UCTX_CLI_PROJECT_ID or UNIFORM_PROJECT_ID env. Supports dotenv.",demandOption:!0,default:(r=(n=process.env.UCTX_CLI_PROJECT_ID)!=null?n:process.env.UNIFORM_PROJECT_ID)!=null?r:"",type:"string",alias:["p"]}).option("preview",{describe:"If set, fetches the unpublished preview manifest (The API key must have permission)",default:!1,type:"boolean",alias:["d"]}).option("output",{string:!0,alias:"o",default:process.env.UNIFORM_MANIFEST_PATH,describe:"Path to write manifest to. Defaults to UNIFORM_MANIFEST_PATH env if set."})},handler:async({apiKey:e,output:t,project:n,preview:r})=>{n||(console.error(Un.default.red("You must specify the project ID")),Ri(1));let i=Hp(),s=new Wi({apiHost:i,projectId:n,apiKey:e,fetch:Bp});try{let o=await s.get({preview:r}),a=JSON.stringify(o,null,2);t?Wp(t,a,l=>{l&&(console.error(`Error writing file to ${t}
|
109
|
+
`,l),Ri(1)),console.log(Un.default.green(`\u2705 ${t} has been updated from ${i}`))}):console.log(a)}catch(o){let a;o instanceof $i?(o.statusCode===403&&(a=`The API key ${e} did not have permissions to fetch the manifest. Ensure ${r?"Context > Read Drafts":"Context > Manifest > Read"} permissions are granted.`),a=o.message):a=o.toString(),console.error(Un.default.red("\u26A0 Error fetching Context manifest")),console.error(Un.default.gray(` \u2757 ${a}`)),Ri(1)}}},Hp=()=>process.env.UNIFORM_CLI_BASE_URL||"https://uniform.app";var wl={command:"manifest <command>",describe:"Commands for context manifests",aliases:["man"],builder:e=>e.command(yl).demandCommand(),handler:()=>{Ne.help()}};w();w();import qp from"isomorphic-unfetch";var Al={command:"get <id>",describe:"Fetch a quirk",builder:e=>we(k(R(e.positional("id",{demandOption:!0,describe:"Quirk public ID to fetch"})))),handler:async({apiHost:e,apiKey:t,id:n,format:r,project:i,filename:s})=>{let a=await new qe({apiKey:t,apiHost:e,fetch:qp,projectId:i}).get({quirkId:n,withIntegrations:!0});a.quirks.length===0?(console.error("Quirk did not exist"),process.exit(1)):ue(a.quirks[0],r,s)}};w();import Yp from"isomorphic-unfetch";var xl={command:"list",describe:"List quirks",aliases:["ls"],builder:e=>we(k(R(e.option("withIntegrations",{alias:["i"],describe:"Whether to include meta-quirks created by integrations in the list. Defaults to false.",type:"boolean"})))),handler:async({apiHost:e,apiKey:t,format:n,filename:r,project:i,withIntegrations:s})=>{let a=await new qe({apiKey:t,apiHost:e,fetch:Yp,projectId:i}).get({withIntegrations:s});ue(a.quirks,n,r)}};w();import Gp from"isomorphic-unfetch";w();var Lt=e=>e.id,Dt=e=>`${e.name} (pid: ${e.id})`;w();function jr({client:e}){async function*t(){let n=(await e.get({withIntegrations:!1})).quirks;for await(let r of n)yield{id:Lt(r),displayName:Dt(r),providerId:r.id,object:r}}return{objects:t(),deleteObject:async n=>{await e.remove({quirkId:n})},writeObject:async n=>{await e.upsert({quirk:n.object})}}}var vl={command:"pull <directory>",describe:"Pulls all quirks to local files in a directory",builder:e=>k(R(Ae(e.positional("directory",{describe:"Directory to save the quirks to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",type:"string"}).option("format",{alias:["f"],describe:"Output format",default:"yaml",choices:["yaml","json"],type:"string"}).option("what-if",{alias:["w"],describe:"What-if mode reports what would be done but changes no files",default:!1,type:"boolean"}).option("mode",{alias:["m"],describe:'What kind of changes can be made. "create" = create new files, update nothing. "createOrUpdate" = create new files, update existing, delete nothing. "mirror" = create, update, and delete to mirror state',choices:["create","createOrUpdate","mirror"],default:"mirror",type:"string"})))),handler:async({apiHost:e,apiKey:t,directory:n,format:r,mode:i,whatIf:s,project:o,diff:a})=>{var d;let l=new qe({apiKey:t,apiHost:e,fetch:Gp,projectId:o,limitPolicy:Oe}),f=jr({client:l}),u;if(xe(n)){let p=Ce(n,!1);u=await ye({objects:(d=p.quirks)!=null?d:[],selectIdentifier:Lt,selectDisplayName:Dt,onSyncComplete:async(b,g)=>{p.quirks=g,ct(n,p)}})}else u=await ve({directory:n,selectIdentifier:Lt,selectDisplayName:Dt,format:r});await de({source:f,target:u,mode:i,whatIf:s,log:he({diffMode:a})})}};w();import zp from"isomorphic-unfetch";var Cl={command:"push <directory>",describe:"Pushes all quirks from files in a directory or package to Uniform",builder:e=>k(R(Ae(e.positional("directory",{describe:"Directory to read the quirks from. If a filename is used, a package will be read instead.",type:"string"}).option("what-if",{alias:["w"],describe:"What-if mode reports what would be done but changes nothing",default:!1,type:"boolean"}).option("mode",{alias:["m"],describe:'What kind of changes can be made. "create" = create new, update nothing. "createOrUpdate" = create new, update existing, delete nothing. "mirror" = create, update, and delete',choices:["create","createOrUpdate","mirror"],default:"mirror",type:"string"})))),handler:async({apiHost:e,apiKey:t,directory:n,mode:r,whatIf:i,project:s,diff:o})=>{var c;let a=new qe({apiKey:t,apiHost:e,fetch:zp,projectId:s,limitPolicy:Oe}),l;if(xe(n)){let d=Ce(n,!0);l=await ye({objects:(c=d.quirks)!=null?c:[],selectIdentifier:Lt,selectDisplayName:Dt})}else l=await ve({directory:n,selectIdentifier:Lt,selectDisplayName:Dt});let u=jr({client:a});await de({source:l,target:u,mode:r,whatIf:i,log:he({diffMode:o})})}};w();import Vp from"isomorphic-unfetch";var Ol={command:"remove <id>",aliases:["delete","rm"],describe:"Delete a quirk",builder:e=>k(R(e.positional("id",{demandOption:!0,describe:"Quirk public ID to delete"}))),handler:async({apiHost:e,apiKey:t,id:n,project:r})=>{await new qe({apiKey:t,apiHost:e,fetch:Vp,projectId:r}).remove({quirkId:n})}};w();import Kp from"isomorphic-unfetch";var El={command:"update <filename>",aliases:["put"],describe:"Insert or update a quirk",builder:e=>k(R(e.positional("filename",{demandOption:!0,describe:"Quirk file to put"}))),handler:async({apiHost:e,apiKey:t,filename:n,project:r})=>{let i=new qe({apiKey:t,apiHost:e,fetch:Kp,projectId:r}),s=lt(n);await i.upsert({quirk:s})}};var _l={command:"quirk <command>",aliases:["qk"],describe:"Commands for Context quirks",builder:e=>e.command(vl).command(Cl).command(Al).command(Ol).command(xl).command(El).demandCommand(),handler:()=>{Ne.help()}};w();w();import Qp from"isomorphic-unfetch";var Sl={command:"get <id>",describe:"Fetch a signal",builder:e=>we(k(R(e.positional("id",{demandOption:!0,describe:"Signal public ID to fetch"})))),handler:async({apiHost:e,apiKey:t,id:n,format:r,project:i,filename:s})=>{let a=await new Ye({apiKey:t,apiHost:e,fetch:Qp,projectId:i}).get({signalId:n});a.signals.length===0?(console.error("Signal did not exist"),process.exit(1)):ue(a.signals[0],r,s)}};w();import Jp from"isomorphic-unfetch";var jl={command:"list",describe:"List signals",aliases:["ls"],builder:e=>we(k(R(e))),handler:async({apiHost:e,apiKey:t,format:n,filename:r,project:i})=>{let o=await new Ye({apiKey:t,apiHost:e,fetch:Jp,projectId:i}).get();ue(o.signals,n,r)}};w();import Xp from"isomorphic-unfetch";w();var Tt=e=>e.id,Nt=e=>`${e.name} (pid: ${e.id})`;w();function Mr({client:e}){async function*t(){let n=(await e.get()).signals;for await(let r of n)yield{id:Tt(r),displayName:Nt(r),providerId:r.id,object:r}}return{objects:t(),deleteObject:async n=>{await e.remove({signalId:n})},writeObject:async n=>{await e.upsert({signal:n.object})}}}var Ml={command:"pull <directory>",describe:"Pulls all signals to local files in a directory",builder:e=>k(R(Ae(e.positional("directory",{describe:"Directory to save the signals to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",type:"string"}).option("format",{alias:["f"],describe:"Output format",default:"yaml",choices:["yaml","json"],type:"string"}).option("what-if",{alias:["w"],describe:"What-if mode reports what would be done but changes no files",default:!1,type:"boolean"}).option("mode",{alias:["m"],describe:'What kind of changes can be made. "create" = create new files, update nothing. "createOrUpdate" = create new files, update existing, delete nothing. "mirror" = create, update, and delete to mirror state',choices:["create","createOrUpdate","mirror"],default:"mirror",type:"string"})))),handler:async({apiHost:e,apiKey:t,directory:n,format:r,mode:i,whatIf:s,project:o,diff:a})=>{var d;let l=new Ye({apiKey:t,apiHost:e,fetch:Xp,projectId:o,limitPolicy:Oe}),f=Mr({client:l}),u;if(xe(n)){let p=Ce(n,!1);u=await ye({objects:(d=p.signals)!=null?d:[],selectIdentifier:Tt,selectDisplayName:Nt,onSyncComplete:async(b,g)=>{p.signals=g,ct(n,p)}})}else u=await ve({directory:n,selectIdentifier:Tt,selectDisplayName:Nt,format:r});await de({source:f,target:u,mode:i,whatIf:s,log:he({diffMode:a})})}};w();import Zp from"isomorphic-unfetch";var Il={command:"push <directory>",describe:"Pushes all signals from files in a directory or package to Uniform",builder:e=>k(R(Ae(e.positional("directory",{describe:"Directory to read the signals from. If a filename is used, a package will be read instead.",type:"string"}).option("what-if",{alias:["w"],describe:"What-if mode reports what would be done but changes nothing",default:!1,type:"boolean"}).option("mode",{alias:["m"],describe:'What kind of changes can be made. "create" = create new, update nothing. "createOrUpdate" = create new, update existing, delete nothing. "mirror" = create, update, and delete',choices:["create","createOrUpdate","mirror"],default:"mirror",type:"string"})))),handler:async({apiHost:e,apiKey:t,directory:n,mode:r,whatIf:i,project:s,diff:o})=>{var c;let a=new Ye({apiKey:t,apiHost:e,fetch:Zp,projectId:s,limitPolicy:Oe}),l;if(xe(n)){let d=Ce(n,!0);l=await ye({objects:(c=d.signals)!=null?c:[],selectIdentifier:Tt,selectDisplayName:Nt})}else l=await ve({directory:n,selectIdentifier:Tt,selectDisplayName:Nt});let u=Mr({client:a});await de({source:l,target:u,mode:r,whatIf:i,log:he({diffMode:o})})}};w();import em from"isomorphic-unfetch";var Pl={command:"remove <id>",aliases:["delete","rm"],describe:"Delete a signal",builder:e=>k(R(e.positional("id",{demandOption:!0,describe:"Signal public ID to delete"}))),handler:async({apiHost:e,apiKey:t,id:n,project:r})=>{await new Ye({apiKey:t,apiHost:e,fetch:em,projectId:r}).remove({signalId:n})}};w();import tm from"isomorphic-unfetch";var Fl={command:"update <filename>",aliases:["put"],describe:"Insert or update a signal",builder:e=>k(R(e.positional("filename",{demandOption:!0,describe:"Signal file to put"}))),handler:async({apiHost:e,apiKey:t,filename:n,project:r})=>{let i=new Ye({apiKey:t,apiHost:e,fetch:tm,projectId:r}),s=lt(n);await i.upsert({signal:s})}};var Ll={command:"signal <command>",aliases:["sig"],describe:"Commands for Context signals",builder:e=>e.command(Ml).command(Il).command(Sl).command(Pl).command(jl).command(Fl).demandCommand(),handler:()=>{Ne.help()}};w();w();import nm from"isomorphic-unfetch";var Dl={command:"get <id>",describe:"Fetch a test",builder:e=>we(k(R(e.positional("id",{demandOption:!0,describe:"Test public ID to fetch"})))),handler:async({apiHost:e,apiKey:t,id:n,format:r,project:i,filename:s})=>{let a=await new Ge({apiKey:t,apiHost:e,fetch:nm,projectId:i}).get({testId:n});a.tests.length===0?(console.error("Test did not exist"),process.exit(1)):ue(a.tests[0],r,s)}};w();import rm from"isomorphic-unfetch";var Tl={command:"list",describe:"List tests",aliases:["ls"],builder:e=>we(k(R(e))),handler:async({apiHost:e,apiKey:t,format:n,filename:r,project:i})=>{let o=await new Ge({apiKey:t,apiHost:e,fetch:rm,projectId:i}).get();ue(o.tests,n,r)}};w();import im from"isomorphic-unfetch";w();var kt=e=>e.id,Rt=e=>`${e.name} (pid: ${e.id})`;w();function Ir({client:e}){async function*t(){let n=(await e.get()).tests;for await(let r of n)yield{id:kt(r),displayName:Rt(r),providerId:r.id,object:r}}return{objects:t(),deleteObject:async n=>{await e.remove({testId:n})},writeObject:async n=>{await e.upsert({test:n.object})}}}var Nl={command:"pull <directory>",describe:"Pulls all tests to local files in a directory",builder:e=>k(R(Ae(e.positional("directory",{describe:"Directory to save the tests to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",type:"string"}).option("format",{alias:["f"],describe:"Output format",default:"yaml",choices:["yaml","json"],type:"string"}).option("what-if",{alias:["w"],describe:"What-if mode reports what would be done but changes no files",default:!1,type:"boolean"}).option("mode",{alias:["m"],describe:'What kind of changes can be made. "create" = create new files, update nothing. "createOrUpdate" = create new files, update existing, delete nothing. "mirror" = create, update, and delete to mirror state',choices:["create","createOrUpdate","mirror"],default:"mirror",type:"string"})))),handler:async({apiHost:e,apiKey:t,directory:n,format:r,mode:i,whatIf:s,project:o,diff:a})=>{var d;let l=new Ge({apiKey:t,apiHost:e,fetch:im,projectId:o,limitPolicy:Oe}),f=Ir({client:l}),u;if(xe(n)){let p=Ce(n,!1);u=await ye({objects:(d=p.tests)!=null?d:[],selectIdentifier:kt,selectDisplayName:Rt,onSyncComplete:async(b,g)=>{p.tests=g,ct(n,p)}})}else u=await ve({directory:n,selectIdentifier:kt,selectDisplayName:Rt,format:r});await de({source:f,target:u,mode:i,whatIf:s,log:he({diffMode:a})})}};w();import om from"isomorphic-unfetch";var kl={command:"push <directory>",describe:"Pushes all tests from files in a directory or package to Uniform",builder:e=>k(R(Ae(e.positional("directory",{describe:"Directory to read the tests from. If a filename is used, a package will be read instead.",type:"string"}).option("what-if",{alias:["w"],describe:"What-if mode reports what would be done but changes nothing",default:!1,type:"boolean"}).option("mode",{alias:["m"],describe:'What kind of changes can be made. "create" = create new, update nothing. "createOrUpdate" = create new, update existing, delete nothing. "mirror" = create, update, and delete',choices:["create","createOrUpdate","mirror"],default:"mirror",type:"string"})))),handler:async({apiHost:e,apiKey:t,directory:n,mode:r,whatIf:i,project:s,diff:o})=>{var c;let a=new Ge({apiKey:t,apiHost:e,fetch:om,projectId:s,limitPolicy:Oe}),l;if(xe(n)){let d=Ce(n,!0);l=await ye({objects:(c=d.tests)!=null?c:[],selectIdentifier:kt,selectDisplayName:Rt})}else l=await ve({directory:n,selectIdentifier:kt,selectDisplayName:Rt});let u=Ir({client:a});await de({source:l,target:u,mode:r,whatIf:i,log:he({diffMode:o})})}};w();import sm from"isomorphic-unfetch";var Rl={command:"remove <id>",aliases:["delete","rm"],describe:"Delete a test",builder:e=>k(R(e.positional("id",{demandOption:!0,describe:"Test public ID to delete"}))),handler:async({apiHost:e,apiKey:t,id:n,project:r})=>{await new Ge({apiKey:t,apiHost:e,fetch:sm,projectId:r}).remove({testId:n})}};w();import am from"isomorphic-unfetch";var Ul={command:"update <filename>",aliases:["put"],describe:"Insert or update a test",builder:e=>k(R(e.positional("filename",{demandOption:!0,describe:"Test file to put"}))),handler:async({apiHost:e,apiKey:t,filename:n,project:r})=>{let i=new Ge({apiKey:t,apiHost:e,fetch:am,projectId:r}),s=lt(n);await i.upsert({test:s})}};var $l={command:"test <command>",describe:"Commands for Context A/B tests",builder:e=>e.command(Nl).command(kl).command(Dl).command(Rl).command(Tl).command(Ul).demandCommand(),handler:()=>{Ne.help()}};var LA={commands:[{command:"context <command>",aliases:["ctx"],describe:"Uniform Context commands",builder:e=>e.command(wl).command(Ll).command(ka).command(Ia).command(_l).command($l).demandCommand(),handler:()=>{Ne.showHelp()}}]};export{Ce as readContextPackage,LA as uniformCLI,ct as writeContextPackage};
|
110
110
|
/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */
|
111
111
|
/**
|
112
112
|
* @fileoverview Main entrypoint for libraries using yargs-parser in Node.js
|