UNPKG

create-wmr

Version:

Create a new WMR project in seconds

2 lines 110 kB
#!/usr/bin/env node const e=require("path"),t=require("fs");function r(e){return null==e?[]:Array.isArray(e)?e:[e]}function n(e,t,r,n){var s,i=e[t],o=~n.string.indexOf(t)?null==r||!0===r?"":String(r):"boolean"==typeof r?r:~n.boolean.indexOf(t)?"false"!==r&&("true"===r||(e._.push(0*(s=+r)==0?s:r),!!r)):0*(s=+r)==0?s:r;e[t]=null==i?o:Array.isArray(i)?i.concat(o):[i,o]}const s="__default__",i="\n";function o(e){if(!e.length)return"";let t=function(e){let t=0,r=0,n=0,s=e.length;if(s)for(;s--;)r=e[s].length,r>t&&(n=s,t=r);return e[n].length}(e.map(e=>e[0]))+4;return e.map(e=>e[0]+" ".repeat(t-e[0].length)+e[1]+(null==e[2]?"":` (default ${e[2]})`))}function a(e){return e}function l(e,t,r){if(!t||!t.length)return"";let n=0,s="";for(s+="\n "+e;n<t.length;n++)s+="\n "+r(t[n]);return s+i}var c=function(e,t,r,n){let c="",u=t[r],f="$ "+e,h=t.__all__,p=e=>`${f} ${e}`.replace(/\s+/g," "),d=[["-h, --help","Displays this message"]];if(r===s&&d.unshift(["-v, --version","Displays current version"]),u.options=(u.options||[]).concat(h.options,d),u.options.length>0&&(u.usage+=" [options]"),c+=l("Description",u.describe,a),c+=l("Usage",[u.usage],p),n||r!==s)n||r===s||(c+=l("Aliases",u.alibi,p));else{let e,r=/^__/,n="",s=[];for(e in t)"string"==typeof t[e]||r.test(e)||s.push([e,(t[e].describe||[""])[0]])<3&&(n+=`\n ${f} ${e} --help`);c+=l("Available Commands",o(s),a),c+="\n For more info, run any command with the `--help` flag"+n+i}return c+=l("Options",o(u.options),a),c+=l("Examples",u.examples.map(p),a),c},u=function(e,t,r=1){let n=l("ERROR",[t],a);n+=`\n Run \`$ ${e} --help\` for more info.\n`,console.error(n),process.exit(r)},f=function(e){return(e||"").split(/^-{1,2}|,|\s+-{1,2}|\s+/).filter(Boolean)},h=function(e){return(e||"").replace(/([.?!])\s*(?=[A-Z])/g,"$1|").split("|")},p="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function d(e,t,r){return e(r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&r.path)}},r.exports),r.exports}function g(e){return e&&e.default||e}const m=g({__proto__:null,default:function(e,t){t=t||{};var s,i,o,a,l,c={_:[]},u=0,f=0,h=0,p=(e=e||[]).length;const d=void 0!==t.alias,g=void 0!==t.unknown,m=void 0!==t.default;if(t.alias=t.alias||{},t.string=r(t.string),t.boolean=r(t.boolean),d)for(s in t.alias)for(i=t.alias[s]=r(t.alias[s]),u=0;u<i.length;u++)(t.alias[i[u]]=i.concat(s)).splice(u,1);for(u=t.boolean.length;u-- >0;)for(f=(i=t.alias[t.boolean[u]]||[]).length;f-- >0;)t.boolean.push(i[f]);for(u=t.string.length;u-- >0;)for(f=(i=t.alias[t.string[u]]||[]).length;f-- >0;)t.string.push(i[f]);if(m)for(s in t.default)if(a=typeof t.default[s],i=t.alias[s]=t.alias[s]||[],void 0!==t[a])for(t[a].push(s),u=0;u<i.length;u++)t[a].push(i[u]);const b=g?Object.keys(t.alias):[];for(u=0;u<p;u++){if("--"===(o=e[u])){c._=c._.concat(e.slice(++u));break}for(f=0;f<o.length&&45===o.charCodeAt(f);f++);if(0===f)c._.push(o);else if("no-"===o.substring(f,f+3)){if(a=o.substring(f+3),g&&!~b.indexOf(a))return t.unknown(o);c[a]=!1}else{for(h=f+1;h<o.length&&61!==o.charCodeAt(h);h++);for(a=o.substring(f,h),l=o.substring(++h)||u+1===p||45===(""+e[u+1]).charCodeAt(0)||e[++u],i=2===f?[a]:a,h=0;h<i.length;h++){if(a=i[h],g&&!~b.indexOf(a))return t.unknown("-".repeat(f)+a);n(c,a,h+1<i.length||l,t)}}}if(m)for(s in t.default)void 0===c[s]&&(c[s]=t.default[s]);if(d)for(s in c)for(i=t.alias[s]||[];i.length>0;)c[i.shift()]=c[s];return c}}),b="__default__";class v{constructor(e,t){let[r,...n]=e.split(/\s+/);t=t||n.length>0,this.bin=r,this.ver="0.0.0",this.default="",this.tree={},this.command("__all__"),this.command([b].concat(t?n:"<command>").join(" ")),this.single=t,this.curr=""}command(e,t,r={}){if(this.single)throw new Error('Disable "single" mode to add commands');let n=[],s=[],i=/(\[|<)/;if(e.split(/\s+/).forEach(e=>{(i.test(e.charAt(0))?s:n).push(e)}),n=n.join(" "),n in this.tree)throw new Error("Command already exists: "+n);return n.includes("__")||s.unshift(n),s=s.join(" "),this.curr=n,r.default&&(this.default=n),this.tree[n]={usage:s,alibi:[],options:[],alias:{},default:{},examples:[]},r.alias&&this.alias(r.alias),t&&this.describe(t),this}describe(e){return this.tree[this.curr||b].describe=Array.isArray(e)?e:h(e),this}alias(...e){if(this.single)throw new Error('Cannot call `alias()` in "single" mode');if(!this.curr)throw new Error("Cannot call `alias()` before defining a command");return(this.tree[this.curr].alibi=this.tree[this.curr].alibi.concat(...e)).forEach(e=>this.tree[e]=this.curr),this}option(e,t,r){let n=this.tree[this.curr||"__all__"],[s,i]=f(e);if(i&&i.length>1&&([s,i]=[i,s]),e="--"+s,i&&i.length>0){e=`-${i}, ${e}`;let t=n.alias[i];n.alias[i]=(t||[]).concat(s)}let o=[e,t||""];return void 0!==r?(o.push(r),n.default[s]=r):i||(n.default[s]=void 0),n.options.push(o),this}action(e){return this.tree[this.curr||b].handler=e,this}example(e){return this.tree[this.curr||b].examples.push(e),this}version(e){return this.ver=e,this}parse(e,t={}){e=e.slice();let r,n,s,i,o=2,a=m(e.slice(o),{alias:{h:"help",v:"version"}}),l=this.single,c=this.bin,f="";if(l)i=this.tree[b];else{let t,l=1,h=a._.length+1;for(;l<h;l++)if(r=a._.slice(0,l).join(" "),t=this.tree[r],"string"==typeof t)n=(f=t).split(" "),e.splice(e.indexOf(a._[0]),l,...n),l+=n.length-l;else if(t)f=r;else if(f)break;if(i=this.tree[f],s=void 0===i,s)if(this.default)f=this.default,i=this.tree[f],e.unshift(f),o++;else if(r)return u(c,"Invalid command: "+r)}if(a.help)return this.help(!l&&!s&&f);if(a.version)return this._version();if(!l&&void 0===i)return u(c,"No command specified.");let h=this.tree.__all__;t.alias=Object.assign(h.alias,i.alias,t.alias),t.default=Object.assign(h.default,i.default,t.default),r=f.split(" "),n=e.indexOf(r[0],2),~n&&e.splice(n,r.length);let p=m(e.slice(o),t);if(!p||"string"==typeof p)return u(c,p||"Parsed unknown option flag(s)!");let d=i.usage.split(/\s+/),g=d.filter(e=>"<"===e.charAt(0)),v=p._.splice(0,g.length);if(v.length<g.length)return f&&(c+=" "+f),u(c,"Insufficient arguments!");d.filter(e=>"["===e.charAt(0)).forEach(e=>{v.push(p._.shift())}),v.push(p);let _=i.handler;return t.lazy?{args:v,name:f,handler:_}:_.apply(null,v)}help(e){console.log(c(this.bin,this.tree,e||b,this.single))}_version(){console.log(`${this.bin}, ${this.ver}`)}}var _={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]};const y={};for(const e of Object.keys(_))y[_[e]]=e;const w={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"]}};var x=w;for(const e of Object.keys(w)){if(!("channels"in w[e]))throw new Error("missing channels property: "+e);if(!("labels"in w[e]))throw new Error("missing channel labels property: "+e);if(w[e].labels.length!==w[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:r}=w[e];delete w[e].channels,delete w[e].labels,Object.defineProperty(w[e],"channels",{value:t}),Object.defineProperty(w[e],"labels",{value:r})}function E(e){const t=function(){const e={},t=Object.keys(x);for(let r=t.length,n=0;n<r;n++)e[t[n]]={distance:-1,parent:null};return e}(),r=[e];for(t[e].distance=0;r.length;){const e=r.pop(),n=Object.keys(x[e]);for(let s=n.length,i=0;i<s;i++){const s=n[i],o=t[s];-1===o.distance&&(o.distance=t[e].distance+1,o.parent=e,r.unshift(s))}}return t}function k(e,t){return function(r){return t(e(r))}}function j(e,t){const r=[t[e].parent,e];let n=x[t[e].parent][e],s=t[e].parent;for(;t[s].parent;)r.unshift(t[s].parent),n=k(x[t[s].parent][s],n),s=t[s].parent;return n.conversion=r,n}w.rgb.hsl=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,s=Math.min(t,r,n),i=Math.max(t,r,n),o=i-s;let a,l;i===s?a=0:t===i?a=(r-n)/o:r===i?a=2+(n-t)/o:n===i&&(a=4+(t-r)/o),a=Math.min(60*a,360),a<0&&(a+=360);const c=(s+i)/2;return l=i===s?0:c<=.5?o/(i+s):o/(2-i-s),[a,100*l,100*c]},w.rgb.hsv=function(e){let t,r,n,s,i;const o=e[0]/255,a=e[1]/255,l=e[2]/255,c=Math.max(o,a,l),u=c-Math.min(o,a,l),f=function(e){return(c-e)/6/u+.5};return 0===u?(s=0,i=0):(i=u/c,t=f(o),r=f(a),n=f(l),o===c?s=n-r:a===c?s=1/3+t-n:l===c&&(s=2/3+r-t),s<0?s+=1:s>1&&(s-=1)),[360*s,100*i,100*c]},w.rgb.hwb=function(e){const t=e[0],r=e[1];let n=e[2];const s=w.rgb.hsl(e)[0],i=1/255*Math.min(t,Math.min(r,n));return n=1-1/255*Math.max(t,Math.max(r,n)),[s,100*i,100*n]},w.rgb.cmyk=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,s=Math.min(1-t,1-r,1-n);return[100*((1-t-s)/(1-s)||0),100*((1-r-s)/(1-s)||0),100*((1-n-s)/(1-s)||0),100*s]},w.rgb.keyword=function(e){const t=y[e];if(t)return t;let r,n=1/0;for(const t of Object.keys(_)){const o=(i=_[t],((s=e)[0]-i[0])**2+(s[1]-i[1])**2+(s[2]-i[2])**2);o<n&&(n=o,r=t)}var s,i;return r},w.keyword.rgb=function(e){return _[e]},w.rgb.xyz=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92;return[100*(.4124*t+.3576*r+.1805*n),100*(.2126*t+.7152*r+.0722*n),100*(.0193*t+.1192*r+.9505*n)]},w.rgb.lab=function(e){const t=w.rgb.xyz(e);let r=t[0],n=t[1],s=t[2];r/=95.047,n/=100,s/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,s=s>.008856?s**(1/3):7.787*s+16/116;return[116*n-16,500*(r-n),200*(n-s)]},w.hsl.rgb=function(e){const t=e[0]/360,r=e[1]/100,n=e[2]/100;let s,i,o;if(0===r)return o=255*n,[o,o,o];s=n<.5?n*(1+r):n+r-n*r;const a=2*n-s,l=[0,0,0];for(let e=0;e<3;e++)i=t+1/3*-(e-1),i<0&&i++,i>1&&i--,o=6*i<1?a+6*(s-a)*i:2*i<1?s:3*i<2?a+(s-a)*(2/3-i)*6:a,l[e]=255*o;return l},w.hsl.hsv=function(e){const t=e[0];let r=e[1]/100,n=e[2]/100,s=r;const i=Math.max(n,.01);n*=2,r*=n<=1?n:2-n,s*=i<=1?i:2-i;return[t,100*(0===n?2*s/(i+s):2*r/(n+r)),100*((n+r)/2)]},w.hsv.rgb=function(e){const t=e[0]/60,r=e[1]/100;let n=e[2]/100;const s=Math.floor(t)%6,i=t-Math.floor(t),o=255*n*(1-r),a=255*n*(1-r*i),l=255*n*(1-r*(1-i));switch(n*=255,s){case 0:return[n,l,o];case 1:return[a,n,o];case 2:return[o,n,l];case 3:return[o,a,n];case 4:return[l,o,n];case 5:return[n,o,a]}},w.hsv.hsl=function(e){const t=e[0],r=e[1]/100,n=e[2]/100,s=Math.max(n,.01);let i,o;o=(2-r)*n;const a=(2-r)*s;return i=r*s,i/=a<=1?a:2-a,i=i||0,o/=2,[t,100*i,100*o]},w.hwb.rgb=function(e){const t=e[0]/360;let r=e[1]/100,n=e[2]/100;const s=r+n;let i;s>1&&(r/=s,n/=s);const o=Math.floor(6*t),a=1-n;i=6*t-o,0!=(1&o)&&(i=1-i);const l=r+i*(a-r);let c,u,f;switch(o){default:case 6:case 0:c=a,u=l,f=r;break;case 1:c=l,u=a,f=r;break;case 2:c=r,u=a,f=l;break;case 3:c=r,u=l,f=a;break;case 4:c=l,u=r,f=a;break;case 5:c=a,u=r,f=l}return[255*c,255*u,255*f]},w.cmyk.rgb=function(e){const t=e[0]/100,r=e[1]/100,n=e[2]/100,s=e[3]/100;return[255*(1-Math.min(1,t*(1-s)+s)),255*(1-Math.min(1,r*(1-s)+s)),255*(1-Math.min(1,n*(1-s)+s))]},w.xyz.rgb=function(e){const t=e[0]/100,r=e[1]/100,n=e[2]/100;let s,i,o;return s=3.2406*t+-1.5372*r+-.4986*n,i=-.9689*t+1.8758*r+.0415*n,o=.0557*t+-.204*r+1.057*n,s=s>.0031308?1.055*s**(1/2.4)-.055:12.92*s,i=i>.0031308?1.055*i**(1/2.4)-.055:12.92*i,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,s=Math.min(Math.max(0,s),1),i=Math.min(Math.max(0,i),1),o=Math.min(Math.max(0,o),1),[255*s,255*i,255*o]},w.xyz.lab=function(e){let t=e[0],r=e[1],n=e[2];t/=95.047,r/=100,n/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;return[116*r-16,500*(t-r),200*(r-n)]},w.lab.xyz=function(e){let t,r,n;r=(e[0]+16)/116,t=e[1]/500+r,n=r-e[2]/200;const s=r**3,i=t**3,o=n**3;return r=s>.008856?s:(r-16/116)/7.787,t=i>.008856?i:(t-16/116)/7.787,n=o>.008856?o:(n-16/116)/7.787,t*=95.047,r*=100,n*=108.883,[t,r,n]},w.lab.lch=function(e){const t=e[0],r=e[1],n=e[2];let s;s=360*Math.atan2(n,r)/2/Math.PI,s<0&&(s+=360);return[t,Math.sqrt(r*r+n*n),s]},w.lch.lab=function(e){const t=e[0],r=e[1],n=e[2]/360*2*Math.PI;return[t,r*Math.cos(n),r*Math.sin(n)]},w.rgb.ansi16=function(e,t=null){const[r,n,s]=e;let i=null===t?w.rgb.hsv(e)[2]:t;if(i=Math.round(i/50),0===i)return 30;let o=30+(Math.round(s/255)<<2|Math.round(n/255)<<1|Math.round(r/255));return 2===i&&(o+=60),o},w.hsv.ansi16=function(e){return w.rgb.ansi16(w.hsv.rgb(e),e[2])},w.rgb.ansi256=function(e){const t=e[0],r=e[1],n=e[2];if(t===r&&r===n)return t<8?16:t>248?231:Math.round((t-8)/247*24)+232;return 16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)},w.ansi16.rgb=function(e){let t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const r=.5*(1+~~(e>50));return[(1&t)*r*255,(t>>1&1)*r*255,(t>>2&1)*r*255]},w.ansi256.rgb=function(e){if(e>=232){const t=10*(e-232)+8;return[t,t,t]}let t;e-=16;return[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},w.rgb.hex=function(e){const t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},w.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let r=t[0];3===t[0].length&&(r=r.split("").map(e=>e+e).join(""));const n=parseInt(r,16);return[n>>16&255,n>>8&255,255&n]},w.rgb.hcg=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,s=Math.max(Math.max(t,r),n),i=Math.min(Math.min(t,r),n),o=s-i;let a,l;return a=o<1?i/(1-o):0,l=o<=0?0:s===t?(r-n)/o%6:s===r?2+(n-t)/o:4+(t-r)/o,l/=6,l%=1,[360*l,100*o,100*a]},w.hsl.hcg=function(e){const t=e[1]/100,r=e[2]/100,n=r<.5?2*t*r:2*t*(1-r);let s=0;return n<1&&(s=(r-.5*n)/(1-n)),[e[0],100*n,100*s]},w.hsv.hcg=function(e){const t=e[1]/100,r=e[2]/100,n=t*r;let s=0;return n<1&&(s=(r-n)/(1-n)),[e[0],100*n,100*s]},w.hcg.rgb=function(e){const t=e[0]/360,r=e[1]/100,n=e[2]/100;if(0===r)return[255*n,255*n,255*n];const s=[0,0,0],i=t%1*6,o=i%1,a=1-o;let l=0;switch(Math.floor(i)){case 0:s[0]=1,s[1]=o,s[2]=0;break;case 1:s[0]=a,s[1]=1,s[2]=0;break;case 2:s[0]=0,s[1]=1,s[2]=o;break;case 3:s[0]=0,s[1]=a,s[2]=1;break;case 4:s[0]=o,s[1]=0,s[2]=1;break;default:s[0]=1,s[1]=0,s[2]=a}return l=(1-r)*n,[255*(r*s[0]+l),255*(r*s[1]+l),255*(r*s[2]+l)]},w.hcg.hsv=function(e){const t=e[1]/100,r=t+e[2]/100*(1-t);let n=0;return r>0&&(n=t/r),[e[0],100*n,100*r]},w.hcg.hsl=function(e){const t=e[1]/100,r=e[2]/100*(1-t)+.5*t;let n=0;return r>0&&r<.5?n=t/(2*r):r>=.5&&r<1&&(n=t/(2*(1-r))),[e[0],100*n,100*r]},w.hcg.hwb=function(e){const t=e[1]/100,r=t+e[2]/100*(1-t);return[e[0],100*(r-t),100*(1-r)]},w.hwb.hcg=function(e){const t=e[1]/100,r=1-e[2]/100,n=r-t;let s=0;return n<1&&(s=(r-n)/(1-n)),[e[0],100*n,100*s]},w.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},w.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},w.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},w.gray.hsl=function(e){return[0,0,e[0]]},w.gray.hsv=w.gray.hsl,w.gray.hwb=function(e){return[0,100,e[0]]},w.gray.cmyk=function(e){return[0,0,0,e[0]]},w.gray.lab=function(e){return[e[0],0,0]},w.gray.hex=function(e){const t=255&Math.round(e[0]/100*255),r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r},w.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};const O={};Object.keys(x).forEach(e=>{O[e]={},Object.defineProperty(O[e],"channels",{value:x[e].channels}),Object.defineProperty(O[e],"labels",{value:x[e].labels});const t=function(e){const t=E(e),r={},n=Object.keys(t);for(let e=n.length,s=0;s<e;s++){const e=n[s];null!==t[e].parent&&(r[e]=j(e,t))}return r}(e);Object.keys(t).forEach(r=>{const n=t[r];O[e][r]=function(e){const t=function(...t){const r=t[0];if(null==r)return r;r.length>1&&(t=r);const n=e(t);if("object"==typeof n)for(let e=n.length,t=0;t<e;t++)n[t]=Math.round(n[t]);return n};return"conversion"in e&&(t.conversion=e.conversion),t}(n),O[e][r].raw=function(e){const t=function(...t){const r=t[0];return null==r?r:(r.length>1&&(t=r),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(n)})});var S=O,T=d((function(e){const t=(e,t)=>(...r)=>`[${e(...r)+t}m`,r=(e,t)=>(...r)=>{const n=e(...r);return`[${38+t};5;${n}m`},n=(e,t)=>(...r)=>{const n=e(...r);return`[${38+t};2;${n[0]};${n[1]};${n[2]}m`},s=e=>e,i=(e,t,r)=>[e,t,r],o=(e,t,r)=>{Object.defineProperty(e,t,{get:()=>{const n=r();return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0}),n},enumerable:!0,configurable:!0})};let a;const l=(e,t,r,n)=>{void 0===a&&(a=S);const s=n?10:0,i={};for(const[n,o]of Object.entries(a)){const a="ansi16"===n?"ansi":n;n===t?i[a]=e(r,s):"object"==typeof o&&(i[a]=e(o[t],s))}return i};Object.defineProperty(e,"exports",{enumerable:!0,get:function(){const e=new Map,a={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]}};a.color.gray=a.color.blackBright,a.bgColor.bgGray=a.bgColor.bgBlackBright,a.color.grey=a.color.blackBright,a.bgColor.bgGrey=a.bgColor.bgBlackBright;for(const[t,r]of Object.entries(a)){for(const[t,n]of Object.entries(r))a[t]={open:`[${n[0]}m`,close:`[${n[1]}m`},r[t]=a[t],e.set(n[0],n[1]);Object.defineProperty(a,t,{value:r,enumerable:!1})}return Object.defineProperty(a,"codes",{value:e,enumerable:!1}),a.color.close="",a.bgColor.close="",o(a.color,"ansi",()=>l(t,"ansi16",s,!1)),o(a.color,"ansi256",()=>l(r,"ansi256",s,!1)),o(a.color,"ansi16m",()=>l(n,"rgb",i,!1)),o(a.bgColor,"ansi",()=>l(t,"ansi16",s,!0)),o(a.bgColor,"ansi256",()=>l(r,"ansi256",s,!0)),o(a.bgColor,"ansi16m",()=>l(n,"rgb",i,!0)),a}})})),I=(e,t=process.argv)=>{const r=e.startsWith("-")?"":1===e.length?"-":"--",n=t.indexOf(r+e),s=t.indexOf("--");return-1!==n&&(-1===s||n<s)};const C=require("os"),P=require("tty"),{env:M}=process;let A;function B(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function $(e,t){if(0===A)return 0;if(I("color=16m")||I("color=full")||I("color=truecolor"))return 3;if(I("color=256"))return 2;if(e&&!t&&void 0===A)return 0;const r=A||0;if("dumb"===M.TERM)return r;if("win32"===process.platform){const e=C.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in M)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(e=>e in M)||"codeship"===M.CI_NAME?1:r;if("TEAMCITY_VERSION"in M)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(M.TEAMCITY_VERSION)?1:0;if("truecolor"===M.COLORTERM)return 3;if("TERM_PROGRAM"in M){const e=parseInt((M.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(M.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(M.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(M.TERM)||"COLORTERM"in M?1:r}I("no-color")||I("no-colors")||I("color=false")||I("color=never")?A=0:(I("color")||I("colors")||I("color=true")||I("color=always"))&&(A=1),"FORCE_COLOR"in M&&(A="true"===M.FORCE_COLOR?1:"false"===M.FORCE_COLOR?0:0===M.FORCE_COLOR.length?1:Math.min(parseInt(M.FORCE_COLOR,10),3));var R={supportsColor:function(e){return B($(e,e&&e.isTTY))},stdout:B($(!0,P.isatty(1))),stderr:B($(!0,P.isatty(2)))};var L={stringReplaceAll:(e,t,r)=>{let n=e.indexOf(t);if(-1===n)return e;const s=t.length;let i=0,o="";do{o+=e.substr(i,n-i)+t+r,i=n+s,n=e.indexOf(t,i)}while(-1!==n);return o+=e.substr(i),o},stringEncaseCRLFWithFirstIndex:(e,t,r,n)=>{let s=0,i="";do{const o="\r"===e[n-1];i+=e.substr(s,(o?n-1:n)-s)+t+(o?"\r\n":"\n")+r,s=n+1,n=e.indexOf("\n",s)}while(-1!==n);return i+=e.substr(s),i}};const q=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,N=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,F=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,G=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,D=new Map([["n","\n"],["r","\r"],["t","\t"],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e",""],["a",""]]);function U(e){const t="u"===e[0],r="{"===e[1];return t&&!r&&5===e.length||"x"===e[0]&&3===e.length?String.fromCharCode(parseInt(e.slice(1),16)):t&&r?String.fromCodePoint(parseInt(e.slice(2,-1),16)):D.get(e)||e}function V(e,t){const r=[],n=t.trim().split(/\s*,\s*/g);let s;for(const t of n){const n=Number(t);if(Number.isNaN(n)){if(!(s=t.match(F)))throw new Error(`Invalid Chalk template style argument: ${t} (in style '${e}')`);r.push(s[2].replace(G,(e,t,r)=>t?U(t):r))}else r.push(n)}return r}function W(e){N.lastIndex=0;const t=[];let r;for(;null!==(r=N.exec(e));){const e=r[1];if(r[2]){const n=V(e,r[2]);t.push([e].concat(n))}else t.push([e])}return t}function Y(e,t){const r={};for(const e of t)for(const t of e.styles)r[t[0]]=e.inverse?null:t.slice(1);let n=e;for(const[e,t]of Object.entries(r))if(Array.isArray(t)){if(!(e in n))throw new Error("Unknown Chalk style: "+e);n=t.length>0?n[e](...t):n[e]}return n}var z=(e,t)=>{const r=[],n=[];let s=[];if(t.replace(q,(t,i,o,a,l,c)=>{if(i)s.push(U(i));else if(a){const t=s.join("");s=[],n.push(0===r.length?t:Y(e,r)(t)),r.push({inverse:o,styles:W(a)})}else if(l){if(0===r.length)throw new Error("Found extraneous } in Chalk template literal");n.push(Y(e,r)(s.join(""))),s=[],r.pop()}else s.push(c)}),n.push(s.join("")),r.length>0){const e=`Chalk template literal is missing ${r.length} closing bracket${1===r.length?"":"s"} (\`}\`)`;throw new Error(e)}return n.join("")};const{stdout:H,stderr:X}=R,{stringReplaceAll:Z,stringEncaseCRLFWithFirstIndex:K}=L,{isArray:Q}=Array,J=["ansi","ansi","ansi256","ansi16m"],ee=Object.create(null);class te{constructor(e){return re(e)}}const re=e=>{const t={};return((e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");const r=H?H.level:0;e.level=void 0===t.level?r:t.level})(t,e),t.template=(...e)=>ue(t.template,...e),Object.setPrototypeOf(t,ne.prototype),Object.setPrototypeOf(t.template,t),t.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},t.template.Instance=te,t.template};function ne(e){return re(e)}for(const[e,t]of Object.entries(T))ee[e]={get(){const r=ae(this,oe(t.open,t.close,this._styler),this._isEmpty);return Object.defineProperty(this,e,{value:r}),r}};ee.visible={get(){const e=ae(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:e}),e}};const se=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(const e of se)ee[e]={get(){const{level:t}=this;return function(...r){const n=oe(T.color[J[t]][e](...r),T.color.close,this._styler);return ae(this,n,this._isEmpty)}}};for(const e of se){ee["bg"+e[0].toUpperCase()+e.slice(1)]={get(){const{level:t}=this;return function(...r){const n=oe(T.bgColor[J[t]][e](...r),T.bgColor.close,this._styler);return ae(this,n,this._isEmpty)}}}}const ie=Object.defineProperties(()=>{},{...ee,level:{enumerable:!0,get(){return this._generator.level},set(e){this._generator.level=e}}}),oe=(e,t,r)=>{let n,s;return void 0===r?(n=e,s=t):(n=r.openAll+e,s=t+r.closeAll),{open:e,close:t,openAll:n,closeAll:s,parent:r}},ae=(e,t,r)=>{const n=(...e)=>Q(e[0])&&Q(e[0].raw)?le(n,ue(n,...e)):le(n,1===e.length?""+e[0]:e.join(" "));return Object.setPrototypeOf(n,ie),n._generator=e,n._styler=t,n._isEmpty=r,n},le=(e,t)=>{if(e.level<=0||!t)return e._isEmpty?"":t;let r=e._styler;if(void 0===r)return t;const{openAll:n,closeAll:s}=r;if(-1!==t.indexOf(""))for(;void 0!==r;)t=Z(t,r.close,r.open),r=r.parent;const i=t.indexOf("\n");return-1!==i&&(t=K(t,s,n,i)),n+t+s};let ce;const ue=(e,...t)=>{const[r]=t;if(!Q(r)||!Q(r.raw))return t.join(" ");const n=t.slice(1),s=[r.raw[0]];for(let e=1;e<r.length;e++)s.push(String(n[e-1]).replace(/[{}\\]/g,"\\$&"),String(r.raw[e]));return void 0===ce&&(ce=z),ce(e,s.join(""))};Object.defineProperties(ne.prototype,ee);const fe=ne();fe.supportsColor=H,fe.stderr=ne({level:X?X.level:0}),fe.stderr.supportsColor=X;var he=fe;const pe=(e,t)=>{for(const r of Reflect.ownKeys(t))Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));return e};var de=pe,ge=pe;de.default=ge;const me=new WeakMap,be=(e,t={})=>{if("function"!=typeof e)throw new TypeError("Expected a function");let r,n=0;const s=e.displayName||e.name||"<anonymous>",i=function(...o){if(me.set(i,++n),1===n)r=e.apply(this,o),e=null;else if(!0===t.throw)throw new Error(`Function \`${s}\` can only be called once`);return r};return de(i,e),me.set(i,n),i};var ve=be,_e=be;ve.default=_e,ve.callCount=e=>{if(!me.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return me.get(e)};var ye,we=d((function(e){e.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")})),xe=require("assert"),Ee=we,ke=/^win/i.test(process.platform),je=require("events");"function"!=typeof je&&(je=je.EventEmitter),process.__signal_exit_emitter__?ye=process.__signal_exit_emitter__:((ye=process.__signal_exit_emitter__=new je).count=0,ye.emitted={}),ye.infinite||(ye.setMaxListeners(1/0),ye.infinite=!0);var Oe=function(e,t){xe.equal(typeof e,"function","a callback must be provided for exit handler"),!1===Me&&Ae();var r="exit";t&&t.alwaysLast&&(r="afterexit");return ye.on(r,e),function(){ye.removeListener(r,e),0===ye.listeners("exit").length&&0===ye.listeners("afterexit").length&&Te()}},Se=Te;function Te(){Me&&(Me=!1,Ee.forEach((function(e){try{process.removeListener(e,Ce[e])}catch(e){}})),process.emit=Re,process.reallyExit=Be,ye.count-=1)}function Ie(e,t,r){ye.emitted[e]||(ye.emitted[e]=!0,ye.emit(e,t,r))}var Ce={};Ee.forEach((function(e){Ce[e]=function(){process.listeners(e).length===ye.count&&(Te(),Ie("exit",null,e),Ie("afterexit",null,e),ke&&"SIGHUP"===e&&(e="SIGINT"),process.kill(process.pid,e))}}));var Pe=Ae,Me=!1;function Ae(){Me||(Me=!0,ye.count+=1,Ee=Ee.filter((function(e){try{return process.on(e,Ce[e]),!0}catch(e){return!1}})),process.emit=Le,process.reallyExit=$e)}var Be=process.reallyExit;function $e(e){process.exitCode=e||0,Ie("exit",process.exitCode,null),Ie("afterexit",process.exitCode,null),Be.call(process,process.exitCode)}var Re=process.emit;function Le(e,t){if("exit"===e){void 0!==t&&(process.exitCode=t);var r=Re.apply(this,arguments);return Ie("exit",process.exitCode,null),Ie("afterexit",process.exitCode,null),r}return Re.apply(this,arguments)}Oe.unload=Se,Oe.signals=function(){return Ee},Oe.load=Pe;var qe=ve(()=>{Oe(()=>{process.stderr.write("[?25h")},{alwaysLast:!0})}),Ne=d((function(e,t){let r=!1;t.show=(e=process.stderr)=>{e.isTTY&&(r=!1,e.write("[?25h"))},t.hide=(e=process.stderr)=>{e.isTTY&&(qe(),r=!0,e.write("[?25l"))},t.toggle=(e,n)=>{void 0!==e&&(r=e),r?t.show(n):t.hide(n)}})),Fe={interval:80,frames:["⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏"]},Ge={interval:80,frames:["⣾","⣽","⣻","⢿","⡿","⣟","⣯","⣷"]},De={interval:80,frames:["⠋","⠙","⠚","⠞","⠖","⠦","⠴","⠲","⠳","⠓"]},Ue={interval:80,frames:["⠄","⠆","⠇","⠋","⠙","⠸","⠰","⠠","⠰","⠸","⠙","⠋","⠇","⠆"]},Ve={interval:80,frames:["⠋","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋"]},We={interval:80,frames:["⠁","⠉","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠤","⠄","⠄","⠤","⠴","⠲","⠒","⠂","⠂","⠒","⠚","⠙","⠉","⠁"]},Ye={interval:80,frames:["⠈","⠉","⠋","⠓","⠒","⠐","⠐","⠒","⠖","⠦","⠤","⠠","⠠","⠤","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋","⠉","⠈"]},ze={interval:80,frames:["⠁","⠁","⠉","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠤","⠄","⠄","⠤","⠠","⠠","⠤","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋","⠉","⠈","⠈"]},He={interval:80,frames:["⢹","⢺","⢼","⣸","⣇","⡧","⡗","⡏"]},Xe={interval:80,frames:["⢄","⢂","⢁","⡁","⡈","⡐","⡠"]},Ze={interval:100,frames:["⠁","⠂","⠄","⡀","⢀","⠠","⠐","⠈"]},Ke={interval:80,frames:["⢀⠀","⡀⠀","⠄⠀","⢂⠀","⡂⠀","⠅⠀","⢃⠀","⡃⠀","⠍⠀","⢋⠀","⡋⠀","⠍⠁","⢋⠁","⡋⠁","⠍⠉","⠋⠉","⠋⠉","⠉⠙","⠉⠙","⠉⠩","⠈⢙","⠈⡙","⢈⠩","⡀⢙","⠄⡙","⢂⠩","⡂⢘","⠅⡘","⢃⠨","⡃⢐","⠍⡐","⢋⠠","⡋⢀","⠍⡁","⢋⠁","⡋⠁","⠍⠉","⠋⠉","⠋⠉","⠉⠙","⠉⠙","⠉⠩","⠈⢙","⠈⡙","⠈⠩","⠀⢙","⠀⡙","⠀⠩","⠀⢘","⠀⡘","⠀⠨","⠀⢐","⠀⡐","⠀⠠","⠀⢀","⠀⡀"]},Qe={interval:80,frames:["⠀","⠁","⠂","⠃","⠄","⠅","⠆","⠇","⡀","⡁","⡂","⡃","⡄","⡅","⡆","⡇","⠈","⠉","⠊","⠋","⠌","⠍","⠎","⠏","⡈","⡉","⡊","⡋","⡌","⡍","⡎","⡏","⠐","⠑","⠒","⠓","⠔","⠕","⠖","⠗","⡐","⡑","⡒","⡓","⡔","⡕","⡖","⡗","⠘","⠙","⠚","⠛","⠜","⠝","⠞","⠟","⡘","⡙","⡚","⡛","⡜","⡝","⡞","⡟","⠠","⠡","⠢","⠣","⠤","⠥","⠦","⠧","⡠","⡡","⡢","⡣","⡤","⡥","⡦","⡧","⠨","⠩","⠪","⠫","⠬","⠭","⠮","⠯","⡨","⡩","⡪","⡫","⡬","⡭","⡮","⡯","⠰","⠱","⠲","⠳","⠴","⠵","⠶","⠷","⡰","⡱","⡲","⡳","⡴","⡵","⡶","⡷","⠸","⠹","⠺","⠻","⠼","⠽","⠾","⠿","⡸","⡹","⡺","⡻","⡼","⡽","⡾","⡿","⢀","⢁","⢂","⢃","⢄","⢅","⢆","⢇","⣀","⣁","⣂","⣃","⣄","⣅","⣆","⣇","⢈","⢉","⢊","⢋","⢌","⢍","⢎","⢏","⣈","⣉","⣊","⣋","⣌","⣍","⣎","⣏","⢐","⢑","⢒","⢓","⢔","⢕","⢖","⢗","⣐","⣑","⣒","⣓","⣔","⣕","⣖","⣗","⢘","⢙","⢚","⢛","⢜","⢝","⢞","⢟","⣘","⣙","⣚","⣛","⣜","⣝","⣞","⣟","⢠","⢡","⢢","⢣","⢤","⢥","⢦","⢧","⣠","⣡","⣢","⣣","⣤","⣥","⣦","⣧","⢨","⢩","⢪","⢫","⢬","⢭","⢮","⢯","⣨","⣩","⣪","⣫","⣬","⣭","⣮","⣯","⢰","⢱","⢲","⢳","⢴","⢵","⢶","⢷","⣰","⣱","⣲","⣳","⣴","⣵","⣶","⣷","⢸","⢹","⢺","⢻","⢼","⢽","⢾","⢿","⣸","⣹","⣺","⣻","⣼","⣽","⣾","⣿"]},Je={interval:130,frames:["-","\\","|","/"]},et={interval:100,frames:["⠂","-","–","—","–","-"]},tt={interval:100,frames:["┤","┘","┴","└","├","┌","┬","┐"]},rt={interval:400,frames:[". ",".. ","..."," "]},nt={interval:200,frames:[". ",".. ","..."," .."," ."," "]},st={interval:70,frames:["✶","✸","✹","✺","✹","✷"]},it={interval:80,frames:["+","x","*"]},ot={interval:70,frames:["_","_","_","-","`","`","'","´","-","_","_","_"]},at={interval:100,frames:["☱","☲","☴"]},lt={interval:120,frames:["▁","▃","▄","▅","▆","▇","▆","▅","▄","▃"]},ct={interval:120,frames:["▏","▎","▍","▌","▋","▊","▉","▊","▋","▌","▍","▎"]},ut={interval:140,frames:[" ",".","o","O","@","*"," "]},ft={interval:120,frames:[".","o","O","°","O","o","."]},ht={interval:100,frames:["▓","▒","░"]},pt={interval:120,frames:["⠁","⠂","⠄","⠂"]},dt={interval:120,frames:["▖","▘","▝","▗"]},gt={interval:100,frames:["▌","▀","▐","▄"]},mt={interval:50,frames:["◢","◣","◤","◥"]},bt={interval:100,frames:["◜","◠","◝","◞","◡","◟"]},vt={interval:120,frames:["◡","⊙","◠"]},_t={interval:180,frames:["◰","◳","◲","◱"]},yt={interval:120,frames:["◴","◷","◶","◵"]},wt={interval:50,frames:["◐","◓","◑","◒"]},xt={interval:100,frames:["╫","╪"]},Et={interval:250,frames:["⊶","⊷"]},kt={interval:80,frames:["▫","▪"]},jt={interval:120,frames:["□","■"]},Ot={interval:100,frames:["■","□","▪","▫"]},St={interval:100,frames:["▮","▯"]},Tt={interval:300,frames:["ဝ","၀"]},It={interval:80,frames:["⦾","⦿"]},Ct={interval:100,frames:["◍","◌"]},Pt={interval:100,frames:["◉","◎"]},Mt={interval:100,frames:["㊂","㊀","㊁"]},At={interval:50,frames:["⧇","⧆"]},Bt={interval:120,frames:["☗","☖"]},$t={interval:80,frames:["=","*","-"]},Rt={interval:100,frames:["←","↖","↑","↗","→","↘","↓","↙"]},Lt={interval:80,frames:["⬆️ ","↗️ ","➡️ ","↘️ ","⬇️ ","↙️ ","⬅️ ","↖️ "]},qt={interval:120,frames:["▹▹▹▹▹","▸▹▹▹▹","▹▸▹▹▹","▹▹▸▹▹","▹▹▹▸▹","▹▹▹▹▸"]},Nt={interval:80,frames:["[ ]","[= ]","[== ]","[=== ]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},Ft={interval:80,frames:["( ● )","( ● )","( ● )","( ● )","( ●)","( ● )","( ● )","( ● )","( ● )","(● )"]},Gt={interval:200,frames:["😄 ","😝 "]},Dt={interval:300,frames:["🙈 ","🙈 ","🙉 ","🙊 "]},Ut={interval:100,frames:["💛 ","💙 ","💜 ","💚 ","❤️ "]},Vt={interval:100,frames:["🕛 ","🕐 ","🕑 ","🕒 ","🕓 ","🕔 ","🕕 ","🕖 ","🕗 ","🕘 ","🕙 ","🕚 "]},Wt={interval:180,frames:["🌍 ","🌎 ","🌏 "]},Yt={interval:17,frames:["█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","███▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","████▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁","███████▁▁▁▁▁▁▁▁▁▁▁▁▁","████████▁▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","██████████▁▁▁▁▁▁▁▁▁▁","███████████▁▁▁▁▁▁▁▁▁","█████████████▁▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁▁██████████████▁▁▁▁","▁▁▁██████████████▁▁▁","▁▁▁▁█████████████▁▁▁","▁▁▁▁██████████████▁▁","▁▁▁▁██████████████▁▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁▁██████████████","▁▁▁▁▁▁██████████████","▁▁▁▁▁▁▁█████████████","▁▁▁▁▁▁▁█████████████","▁▁▁▁▁▁▁▁████████████","▁▁▁▁▁▁▁▁████████████","▁▁▁▁▁▁▁▁▁███████████","▁▁▁▁▁▁▁▁▁███████████","▁▁▁▁▁▁▁▁▁▁██████████","▁▁▁▁▁▁▁▁▁▁██████████","▁▁▁▁▁▁▁▁▁▁▁▁████████","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁██████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","███▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","████▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","██████▁▁▁▁▁▁▁▁▁▁▁▁▁█","████████▁▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","███████████▁▁▁▁▁▁▁▁▁","████████████▁▁▁▁▁▁▁▁","████████████▁▁▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁▁▁█████████████▁▁▁▁","▁▁▁▁▁████████████▁▁▁","▁▁▁▁▁████████████▁▁▁","▁▁▁▁▁▁███████████▁▁▁","▁▁▁▁▁▁▁▁█████████▁▁▁","▁▁▁▁▁▁▁▁█████████▁▁▁","▁▁▁▁▁▁▁▁▁█████████▁▁","▁▁▁▁▁▁▁▁▁█████████▁▁","▁▁▁▁▁▁▁▁▁▁█████████▁","▁▁▁▁▁▁▁▁▁▁▁████████▁","▁▁▁▁▁▁▁▁▁▁▁████████▁","▁▁▁▁▁▁▁▁▁▁▁▁███████▁","▁▁▁▁▁▁▁▁▁▁▁▁███████▁","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁"]},zt={interval:80,frames:["🌑 ","🌒 ","🌓 ","🌔 ","🌕 ","🌖 ","🌗 ","🌘 "]},Ht={interval:140,frames:["🚶 ","🏃 "]},Xt={interval:80,frames:["▐⠂ ▌","▐⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂▌","▐ ⠠▌","▐ ⡀▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐⠠ ▌"]},Zt={interval:120,frames:["▐|\\____________▌","▐_|\\___________▌","▐__|\\__________▌","▐___|\\_________▌","▐____|\\________▌","▐_____|\\_______▌","▐______|\\______▌","▐_______|\\_____▌","▐________|\\____▌","▐_________|\\___▌","▐__________|\\__▌","▐___________|\\_▌","▐____________|\\▌","▐____________/|▌","▐___________/|_▌","▐__________/|__▌","▐_________/|___▌","▐________/|____▌","▐_______/|_____▌","▐______/|______▌","▐_____/|_______▌","▐____/|________▌","▐___/|_________▌","▐__/|__________▌","▐_/|___________▌","▐/|____________▌"]},Kt={interval:100,frames:["d","q","p","b"]},Qt={interval:100,frames:["☀️ ","☀️ ","☀️ ","🌤 ","⛅️ ","🌥 ","☁️ ","🌧 ","🌨 ","🌧 ","🌨 ","🌧 ","🌨 ","⛈ ","🌨 ","🌧 ","🌨 ","☁️ ","🌥 ","⛅️ ","🌤 ","☀️ ","☀️ "]},Jt={interval:400,frames:["🌲","🎄"]},er={interval:80,frames:["، ","′ "," ´ "," ‾ "," ⸌"," ⸊"," |"," ⁎"," ⁕"," ෴ "," ⁓"," "," "," "]},tr={interval:125,frames:["∙∙∙","●∙∙","∙●∙","∙∙●","∙∙∙"]},rr={interval:150,frames:["-","=","≡"]},nr={interval:80,frames:["ρββββββ","βρβββββ","ββρββββ","βββρβββ","ββββρββ","βββββρβ","ββββββρ"]},sr={interval:80,frames:["▰▱▱▱▱▱▱","▰▰▱▱▱▱▱","▰▰▰▱▱▱▱","▰▰▰▰▱▱▱","▰▰▰▰▰▱▱","▰▰▰▰▰▰▱","▰▰▰▰▰▰▰","▰▱▱▱▱▱▱"]};const ir=g({__proto__:null,dots:Fe,dots2:Ge,dots3:De,dots4:Ue,dots5:Ve,dots6:We,dots7:Ye,dots8:ze,dots9:He,dots10:Xe,dots11:Ze,dots12:Ke,dots8Bit:Qe,line:Je,line2:et,pipe:tt,simpleDots:rt,simpleDotsScrolling:nt,star:st,star2:it,flip:ot,hamburger:at,growVertical:lt,growHorizontal:ct,balloon:ut,balloon2:ft,noise:ht,bounce:pt,boxBounce:dt,boxBounce2:gt,triangle:mt,arc:bt,circle:vt,squareCorners:_t,circleQuarters:yt,circleHalves:wt,squish:xt,toggle:Et,toggle2:kt,toggle3:jt,toggle4:Ot,toggle5:St,toggle6:Tt,toggle7:It,toggle8:Ct,toggle9:Pt,toggle10:Mt,toggle11:At,toggle12:Bt,toggle13:$t,arrow:Rt,arrow2:Lt,arrow3:qt,bouncingBar:Nt,bouncingBall:Ft,smiley:Gt,monkey:Dt,hearts:Ut,clock:Vt,earth:Wt,material:Yt,moon:zt,runner:Ht,pong:Xt,shark:Zt,dqpb:Kt,weather:Qt,christmas:Jt,grenade:er,point:tr,layer:rr,betaWave:nr,aesthetic:sr,default:{dots:Fe,dots2:Ge,dots3:De,dots4:Ue,dots5:Ve,dots6:We,dots7:Ye,dots8:ze,dots9:He,dots10:Xe,dots11:Ze,dots12:Ke,dots8Bit:Qe,line:Je,line2:et,pipe:tt,simpleDots:rt,simpleDotsScrolling:nt,star:st,star2:it,flip:ot,hamburger:at,growVertical:lt,growHorizontal:ct,balloon:ut,balloon2:ft,noise:ht,bounce:pt,boxBounce:dt,boxBounce2:gt,triangle:mt,arc:bt,circle:vt,squareCorners:_t,circleQuarters:yt,circleHalves:wt,squish:xt,toggle:Et,toggle2:kt,toggle3:jt,toggle4:Ot,toggle5:St,toggle6:Tt,toggle7:It,toggle8:Ct,toggle9:Pt,toggle10:Mt,toggle11:At,toggle12:Bt,toggle13:$t,arrow:Rt,arrow2:Lt,arrow3:qt,bouncingBar:Nt,bouncingBall:Ft,smiley:Gt,monkey:Dt,hearts:Ut,clock:Vt,earth:Wt,material:Yt,moon:zt,runner:Ht,pong:Xt,shark:Zt,dqpb:Kt,weather:Qt,christmas:Jt,grenade:er,point:tr,layer:rr,betaWave:nr,aesthetic:sr}}),or=Object.assign({},ir),ar=Object.keys(or);Object.defineProperty(or,"random",{get(){const e=Math.floor(Math.random()*ar.length),t=ar[e];return or[t]}});var lr=or,cr=or;lr.default=cr;const ur="win32"!==process.platform||process.env.CI||"xterm-256color"===process.env.TERM,fr={info:he.blue("ℹ"),success:he.green("✔"),warning:he.yellow("⚠"),error:he.red("✖")},hr={info:he.blue("i"),success:he.green("√"),warning:he.yellow("‼"),error:he.red("×")};var pr=ur?fr:hr,dr=e=>"string"==typeof e?e.replace((({onlyFirst:e=!1}={})=>{const t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")})(),""):e,gr=d((function(e){var t=function(){function e(t,n,s,i){"object"==typeof n&&(s=n.depth,i=n.prototype,n.filter,n=n.circular);var o=[],a=[],l="undefined"!=typeof Buffer;return void 0===n&&(n=!0),void 0===s&&(s=1/0),function t(s,c){if(null===s)return null;if(0==c)return s;var u,f;if("object"!=typeof s)return s;if(e.__isArray(s))u=[];else if(e.__isRegExp(s))u=new RegExp(s.source,r(s)),s.lastIndex&&(u.lastIndex=s.lastIndex);else if(e.__isDate(s))u=new Date(s.getTime());else{if(l&&Buffer.isBuffer(s))return u=Buffer.allocUnsafe?Buffer.allocUnsafe(s.length):new Buffer(s.length),s.copy(u),u;void 0===i?(f=Object.getPrototypeOf(s),u=Object.create(f)):(u=Object.create(i),f=i)}if(n){var h=o.indexOf(s);if(-1!=h)return a[h];o.push(s),a.push(u)}for(var p in s){var d;f&&(d=Object.getOwnPropertyDescriptor(f,p)),d&&null==d.set||(u[p]=t(s[p],c-1))}return u}(t,s)}function t(e){return Object.prototype.toString.call(e)}function r(e){var t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),t}return e.clonePrototype=function(e){if(null===e)return null;var t=function(){};return t.prototype=e,new t},e.__objToStr=t,e.__isDate=function(e){return"object"==typeof e&&"[object Date]"===t(e)},e.__isArray=function(e){return"object"==typeof e&&"[object Array]"===t(e)},e.__isRegExp=function(e){return"object"==typeof e&&"[object RegExp]"===t(e)},e.__getRegExpFlags=r,e}();e.exports&&(e.exports=t)})),mr=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531],[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],br={nul:0,control:0},vr=function(e){return _r(e,br)};function _r(e,t){if("string"!=typeof e)return yr(e,t);for(var r=0,n=0;n<e.length;n++){var s=yr(e.charCodeAt(n),t);if(s<0)return-1;r+=s}return r}function yr(e,t){return 0===e?t.nul:e<32||e>=127&&e<160?t.control:function(e){var t,r=0,n=mr.length-1;if(e<mr[0][0]||e>mr[n][1])return!1;for(;n>=r;)if(t=Math.floor((r+n)/2),e>mr[t][1])r=t+1;else{if(!(e<mr[t][0]))return!0;n=t-1}return!1}(e)?0:1+(e>=4352&&(e<=4447||9001==e||9002==e||e>=11904&&e<=42191&&12351!=e||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65135||e>=65280&&e<=65376||e>=65504&&e<=65510||e>=131072&&e<=196605||e>=196608&&e<=262141))}vr.config=function(e){return e=function(e,t){return e=e||{},Object.keys(t).forEach((function(r){void 0===e[r]&&(e[r]=gr(t[r]))})),e}(e||{},br),function(t){return _r(t,e)}};const wr=require("stream");var xr=wr.Readable,Er=wr,kr=wr.Writable,jr=wr.Duplex,Or=wr.Transform,Sr=wr.PassThrough,Tr=wr.finished,Ir=wr.pipeline;xr.Stream=Er,xr.Writable=kr,xr.Duplex=jr,xr.Transform=Or,xr.PassThrough=Sr,xr.finished=Tr,xr.pipeline=Ir;var Cr=require("util").inherits;const{Buffer:Pr}=require("buffer"),Mr=Symbol.for("BufferList");function Ar(e){if(!(this instanceof Ar))return new Ar(e);Ar._init.call(this,e)}Ar._init=function(e){Object.defineProperty(this,Mr,{value:!0}),this._bufs=[],this.length=0,e&&this.append(e)},Ar.prototype._new=function(e){return new Ar(e)},Ar.prototype._offset=function(e){if(0===e)return[0,0];let t=0;for(let r=0;r<this._bufs.length;r++){const n=t+this._bufs[r].length;if(e<n||r===this._bufs.length-1)return[r,e-t];t=n}},Ar.prototype._reverseOffset=function(e){const t=e[0];let r=e[1];for(let e=0;e<t;e++)r+=this._bufs[e].length;return r},Ar.prototype.get=function(e){if(e>this.length||e<0)return;const t=this._offset(e);return this._bufs[t[0]][t[1]]},Ar.prototype.slice=function(e,t){return"number"==typeof e&&e<0&&(e+=this.length),"number"==typeof t&&t<0&&(t+=this.length),this.copy(null,0,e,t)},Ar.prototype.copy=function(e,t,r,n){if(("number"!=typeof r||r<0)&&(r=0),("number"!=typeof n||n>this.length)&&(n=this.length),r>=this.length)return e||Pr.alloc(0);if(n<=0)return e||Pr.alloc(0);const s=!!e,i=this._offset(r),o=n-r;let a=o,l=s&&t||0,c=i[1];if(0===r&&n===this.length){if(!s)return 1===this._bufs.length?this._bufs[0]:Pr.concat(this._bufs,this.length);for(let t=0;t<this._bufs.length;t++)this._bufs[t].copy(e,l),l+=this._bufs[t].length;return e}if(a<=this._bufs[i[0]].length-c)return s?this._bufs[i[0]].copy(e,t,c,c+a):this._bufs[i[0]].slice(c,c+a);s||(e=Pr.allocUnsafe(o));for(let t=i[0];t<this._bufs.length;t++){const r=this._bufs[t].length-c;if(!(a>r)){this._bufs[t].copy(e,l,c,c+a),l+=r;break}this._bufs[t].copy(e,l,c),l+=r,a-=r,c&&(c=0)}return e.length>l?e.slice(0,l):e},Ar.prototype.shallowSlice=function(e,t){if(e=e||0,t="number"!=typeof t?this.length:t,e<0&&(e+=this.length),t<0&&(t+=this.length),e===t)return this._new();const r=this._offset(e),n=this._offset(t),s=this._bufs.slice(r[0],n[0]+1);return 0===n[1]?s.pop():s[s.length-1]=s[s.length-1].slice(0,n[1]),0!==r[1]&&(s[0]=s[0].slice(r[1])),this._new(s)},Ar.prototype.toString=function(e,t,r){return this.slice(t,r).toString(e)},Ar.prototype.consume=function(e){if(e=Math.trunc(e),Number.isNaN(e)||e<=0)return this;for(;this._bufs.length;){if(!(e>=this._bufs[0].length)){this._bufs[0]=this._bufs[0].slice(e),this.length-=e;break}e-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift()}return this},Ar.prototype.duplicate=function(){const e=this._new();for(let t=0;t<this._bufs.length;t++)e.append(this._bufs[t]);return e},Ar.prototype.append=function(e){if(null==e)return this;if(e.buffer)this._appendBuffer(Pr.from(e.buffer,e.byteOffset,e.byteLength));else if(Array.isArray(e))for(let t=0;t<e.length;t++)this.append(e[t]);else if(this._isBufferList(e))for(let t=0;t<e._bufs.length;t++)this.append(e._bufs[t]);else"number"==typeof e&&(e=e.toString()),this._appendBuffer(Pr.from(e));return this},Ar.prototype._appendBuffer=function(e){this._bufs.push(e),this.length+=e.length},Ar.prototype.indexOf=function(e,t,r){if(void 0===r&&"string"==typeof t&&(r=t,t=void 0),"function"==typeof e||Array.isArray(e))throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');if("number"==typeof e?e=Pr.from([e]):"string"==typeof e?e=Pr.from(e,r):this._isBufferList(e)?e=e.slice():Array.isArray(e.buffer)?e=Pr.from(e.buffer,e.byteOffset,e.byteLength):Pr.isBuffer(e)||(e=Pr.from(e)),t=Number(t||0),isNaN(t)&&(t=0),t<0&&(t=this.length+t),t<0&&(t=0),0===e.length)return t>this.length?this.length:t;const n=this._offset(t);let s=n[0],i=n[1];for(;s<this._bufs.length;s++){const t=this._bufs[s];for(;i<t.length;){if(t.length-i>=e.length){const r=t.indexOf(e,i);if(-1!==r)return this._reverseOffset([s,r]);i=t.length-e.length+1}else{con