forked from pixijs/pixijs
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cli.js
2 lines (2 loc) · 29.4 KB
/
cli.js
1
2
module.exports=function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={i:d,l:!1,exports:{}};return a[d].call(e.exports,e,e.exports,b),e.l=!0,e.exports}var c={};return b.m=a,b.c=c,b.d=function(a,c,d){b.o(a,c)||Object.defineProperty(a,c,{configurable:!1,enumerable:!0,get:d})},b.r=function(a){Object.defineProperty(a,'__esModule',{value:!0})},b.n=function(a){var c=a&&a.__esModule?function(){return a['default']}:function(){return a};return b.d(c,'a',c),c},b.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},b.p='',b(b.s=27)}([function(a,b,c){'use strict';function d(a){const b=Array(a[0].length).fill(0);for(const c of a)c.forEach((a,c)=>{const d=e(a).length;b[c]<d&&(b[c]=d)});return b}Object.defineProperty(b,'__esModule',{value:!0});const e=c(15);class f extends Error{constructor(){super(...arguments),this.pretty=!0}}b.CommandError=f,b.dasherizeOption=(a)=>1===a.length?'-'+a:'--'+a,b.printTable=function(a){const b=d(a);for(const c of a){let a=' ';c.forEach((c,d)=>{a+=c;const f=b[d]-e(c).length;a+=' '.repeat(f+2)}),console.log(a)}}},function(a,b,c){'use strict';function d(a,b){b=b||{};const c=k?k.level:0;a.level=b.level===void 0?c:b.level,a.enabled='enabled'in b?b.enabled:0<a.level}function e(a){if(!this||!(this instanceof e)||this.template){const b={};return d(b,a),b.template=function(){const a=[].slice.call(arguments);return h.apply(null,[b.template].concat(a))},Object.setPrototypeOf(b,e.prototype),Object.setPrototypeOf(b.template,b),b.template.constructor=e,b.template}d(this,a)}function f(a,b,c){const d=function(){return g.apply(d,arguments)};d._styles=a,d._empty=b;const e=this;return Object.defineProperty(d,'level',{enumerable:!0,get(){return e.level},set(a){e.level=a}}),Object.defineProperty(d,'enabled',{enumerable:!0,get(){return e.enabled},set(a){e.enabled=a}}),d.hasGrey=this.hasGrey||'gray'===c||'grey'===c,d.__proto__=q,d}function g(){const b=arguments,c=b.length;let d=arguments[0]+'';if(0===c)return'';if(1<c)for(let e=1;e<c;e++)d+=' '+b[e];if(!this.enabled||0>=this.level||!d)return this._empty?'':d;const a=j.dim.open;m&&this.hasGrey&&(j.dim.open='');for(const a of this._styles.slice().reverse())d=a.open+d.replace(a.closeRe,a.open)+a.close,d=d.replace(/\r?\n/g,`${a.close}$&${a.open}`);return j.dim.open=a,d}function h(a,b){if(!Array.isArray(b))return[].slice.call(arguments,1).join(' ');const c=[].slice.call(arguments,2),d=[b.raw[0]];for(let e=1;e<b.length;e++)d.push((c[e-1]+'').replace(/[{}\\]/g,'\\$&')),d.push(b.raw[e]+'');return l(a,d.join(''))}const i=c(25),j=c(24),k=c(19),l=c(16),m=!(process.env.TERM||'').toLowerCase().startsWith('xterm'),n=['ansi','ansi','ansi256','ansi16m'],o=new Set(['gray']),p=Object.create(null);m&&(j.blue.open='\x1B[94m');for(const d of Object.keys(j))j[d].closeRe=new RegExp(i(j[d].close),'g'),p[d]={get(){const a=j[d];return f.call(this,this._styles?this._styles.concat(a):[a],this._empty,d)}};p.visible={get(){return f.call(this,this._styles||[],!0,'visible')}},j.color.closeRe=new RegExp(i(j.color.close),'g');for(const d of Object.keys(j.color.ansi))o.has(d)||(p[d]={get(){const a=this.level;return function(){const b=j.color[n[a]][d].apply(null,arguments),c={open:b,close:j.color.close,closeRe:j.color.closeRe};return f.call(this,this._styles?this._styles.concat(c):[c],this._empty,d)}}});j.bgColor.closeRe=new RegExp(i(j.bgColor.close),'g');for(const d of Object.keys(j.bgColor.ansi)){if(o.has(d))continue;const a='bg'+d[0].toUpperCase()+d.slice(1);p[a]={get(){const a=this.level;return function(){const b=j.bgColor[n[a]][d].apply(null,arguments),c={open:b,close:j.bgColor.close,closeRe:j.bgColor.closeRe};return f.call(this,this._styles?this._styles.concat(c):[c],this._empty,d)}}}}const q=Object.defineProperties(()=>{},p);Object.defineProperties(e.prototype,p),a.exports=e(),a.exports.supportsColor=k,a.exports.default=a.exports},function(a,b,c){'use strict';Object.defineProperty(b,'__esModule',{value:!0});const d=c(9);b.openDesktop=function(a=''){const b=Object.assign({},process.env);return delete b.ELECTRON_RUN_AS_NODE,a='x-github-client://'+a,d.spawn('cmd',['/c','start',a],{env:b})}},function(a,b,c){'use strict';function d(a){return c(13)(`./${a}.ts`)}Object.defineProperty(b,'__esModule',{value:!0}),b.commands={};for(const e of['clone','help','open']){const a=d(e);a.name||(a.name=e),b.commands[a.name]=a}},function(a,b,c){function d(a,b){return h(a[0]-b[0],2)+h(a[1]-b[1],2)+h(a[2]-b[2],2)}var e=Math.round,f=Math.PI,j=Math.floor,h=Math.pow,i=Math.max,n=Math.min,g=c(21),k={};for(var l in g)g.hasOwnProperty(l)&&(k[g[l]]=l);var m=a.exports={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']}};for(var o in m)if(m.hasOwnProperty(o)){if(!('channels'in m[o]))throw new Error('missing channels property: '+o);if(!('labels'in m[o]))throw new Error('missing channel labels property: '+o);if(m[o].labels.length!==m[o].channels)throw new Error('channel and label counts mismatch: '+o);var p=m[o].channels,q=m[o].labels;delete m[o].channels,delete m[o].labels,Object.defineProperty(m[o],'channels',{value:p}),Object.defineProperty(m[o],'labels',{value:q})}m.rgb.hsl=function(a){var c,d,e,f=a[0]/255,h=a[1]/255,g=a[2]/255,b=n(f,h,g),j=i(f,h,g),k=j-b;return j===b?c=0:f===j?c=(h-g)/k:h===j?c=2+(g-f)/k:g===j&&(c=4+(f-h)/k),c=n(60*c,360),0>c&&(c+=360),e=(b+j)/2,d=j===b?0:.5>=e?k/(j+b):k/(2-j-b),[c,100*d,100*e]},m.rgb.hsv=function(a){var c,d,e,f=a[0],h=a[1],g=a[2],b=n(f,h,g),j=i(f,h,g),k=j-b;return d=0===j?0:1e3*(k/j)/10,j===b?c=0:f===j?c=(h-g)/k:h===j?c=2+(g-f)/k:g===j&&(c=4+(f-h)/k),c=n(60*c,360),0>c&&(c+=360),e=1e3*(j/255)/10,[c,d,e]},m.rgb.hwb=function(a){var c=a[0],d=a[1],e=a[2],b=m.rgb.hsl(a)[0],f=1/255*n(c,n(d,e));return e=1-1/255*i(c,i(d,e)),[b,100*f,100*e]},m.rgb.cmyk=function(a){var d,c,e,f,h=a[0]/255,i=a[1]/255,g=a[2]/255;return f=n(1-h,1-i,1-g),d=(1-h-f)/(1-f)||0,c=(1-i-f)/(1-f)||0,e=(1-g-f)/(1-f)||0,[100*d,100*c,100*e,100*f]},m.rgb.keyword=function(a){var b=k[a];if(b)return b;var c,e=Infinity;for(var f in g)if(g.hasOwnProperty(f)){var h=g[f],i=d(a,h);i<e&&(e=i,c=f)}return c},m.keyword.rgb=function(a){return g[a]},m.rgb.xyz=function(a){var c=a[0]/255,d=a[1]/255,e=a[2]/255;c=.04045<c?h((c+.055)/1.055,2.4):c/12.92,d=.04045<d?h((d+.055)/1.055,2.4):d/12.92,e=.04045<e?h((e+.055)/1.055,2.4):e/12.92;var b=.4124*c+.3576*d+.1805*e,f=.2126*c+.7152*d+.0722*e,g=.0193*c+.1192*d+.9505*e;return[100*b,100*f,100*g]},m.rgb.lab=function(c){var d,e,a,b=m.rgb.xyz(c),f=b[0],g=b[1],i=b[2];return f/=95.047,g/=100,i/=108.883,f=.008856<f?h(f,1/3):7.787*f+16/116,g=.008856<g?h(g,1/3):7.787*g+16/116,i=.008856<i?h(i,1/3):7.787*i+16/116,d=116*g-16,e=500*(f-g),a=200*(g-i),[d,e,a]},m.hsl.rgb=function(a){var b,c,d,e,f,g=a[0]/360,h=a[1]/100,j=a[2]/100;if(0==h)return f=255*j,[f,f,f];c=.5>j?j*(1+h):j+h-j*h,b=2*j-c,e=[0,0,0];for(var k=0;3>k;k++)d=g+1/3*-(k-1),0>d&&d++,1<d&&d--,f=1>6*d?b+6*(c-b)*d:1>2*d?c:2>3*d?b+6*((c-b)*(2/3-d)):b,e[k]=255*f;return e},m.hsl.hsv=function(a){var b,c,d=a[0],e=a[1]/100,f=a[2]/100,g=e,h=i(f,.01);return f*=2,e*=1>=f?f:2-f,g*=1>=h?h:2-h,c=(f+e)/2,b=0==f?2*g/(h+g):2*e/(f+e),[d,100*b,100*c]},m.hsv.rgb=function(a){var b=a[0]/60,c=a[1]/100,d=a[2]/100,e=j(b)%6,g=b-j(b),f=255*d*(1-c),h=255*d*(1-c*g),i=255*d*(1-c*(1-g));return d*=255,0==e?[d,i,f]:1==e?[h,d,f]:2==e?[f,d,i]:3==e?[f,h,d]:4==e?[i,f,d]:5==e?[d,f,h]:void 0},m.hsv.hsl=function(a){var b,c,d,e=a[0],f=a[1]/100,g=a[2]/100,h=i(g,.01);return d=(2-f)*g,b=(2-f)*h,c=f*h,c/=1>=b?b:2-b,c=c||0,d/=2,[e,100*c,100*d]},m.hwb.rgb=function(a){var c,d,e,f,i=a[0]/360,h=a[1]/100,k=a[2]/100,l=h+k;1<l&&(h/=l,k/=l),c=j(6*i),d=1-k,e=6*i-c,0!=(1&c)&&(e=1-e),f=h+e*(d-h);var m,n,g;switch(c){default:case 6:case 0:m=d,n=f,g=h;break;case 1:m=f,n=d,g=h;break;case 2:m=h,n=d,g=f;break;case 3:m=h,n=f,g=d;break;case 4:m=f,n=h,g=d;break;case 5:m=d,n=h,g=f;}return[255*m,255*n,255*g]},m.cmyk.rgb=function(a){var d,e,f,b=a[0]/100,c=a[1]/100,g=a[2]/100,h=a[3]/100;return d=1-n(1,b*(1-h)+h),e=1-n(1,c*(1-h)+h),f=1-n(1,g*(1-h)+h),[255*d,255*e,255*f]},m.xyz.rgb=function(a){var c,d,e,b=a[0]/100,f=a[1]/100,g=a[2]/100;return c=3.2406*b+-1.5372*f+-.4986*g,d=-.9689*b+1.8758*f+.0415*g,e=.0557*b+-.204*f+1.057*g,c=.0031308<c?1.055*h(c,1/2.4)-.055:12.92*c,d=.0031308<d?1.055*h(d,1/2.4)-.055:12.92*d,e=.0031308<e?1.055*h(e,1/2.4)-.055:12.92*e,c=n(i(0,c),1),d=n(i(0,d),1),e=n(i(0,e),1),[255*c,255*d,255*e]},m.xyz.lab=function(c){var d,e,a,b=c[0],f=c[1],g=c[2];return b/=95.047,f/=100,g/=108.883,b=.008856<b?h(b,1/3):7.787*b+16/116,f=.008856<f?h(f,1/3):7.787*f+16/116,g=.008856<g?h(g,1/3):7.787*g+16/116,d=116*f-16,e=500*(b-f),a=200*(f-g),[d,e,a]},m.lab.xyz=function(c){var d,e,f,g=c[0],i=c[1],a=c[2];e=(g+16)/116,d=i/500+e,f=e-a/200;var b=h(e,3),j=h(d,3),k=h(f,3);return e=.008856<b?b:(e-16/116)/7.787,d=.008856<j?j:(d-16/116)/7.787,f=.008856<k?k:(f-16/116)/7.787,d*=95.047,e*=100,f*=108.883,[d,e,f]},m.lab.lch=function(d){var e,g,h,c=d[0],i=d[1],a=d[2];return e=Math.atan2(a,i),g=360*e/2/f,0>g&&(g+=360),h=Math.sqrt(i*i+a*a),[c,h,g]},m.lch.lab=function(d){var e,a,b,g=d[0],i=d[1],c=d[2];return b=2*(c/360)*f,e=i*Math.cos(b),a=i*Math.sin(b),[g,e,a]},m.rgb.ansi16=function(a){var c=a[0],d=a[1],f=a[2],b=1 in arguments?arguments[1]:m.rgb.hsv(a)[2];if(b=e(b/50),0===b)return 30;var g=30+(e(f/255)<<2|e(d/255)<<1|e(c/255));return 2===b&&(g+=60),g},m.hsv.ansi16=function(a){return m.rgb.ansi16(m.hsv.rgb(a),a[2])},m.rgb.ansi256=function(a){var c=a[0],d=a[1],f=a[2];if(c===d&&d===f)return 8>c?16:248<c?231:e(24*((c-8)/247))+232;var b=16+36*e(5*(c/255))+6*e(5*(d/255))+e(5*(f/255));return b},m.ansi16.rgb=function(a){var c=a%10;if(0==c||7==c)return 50<a&&(c+=3.5),c=255*(c/10.5),[c,c,c];var d=.5*(~~(50<a)+1),e=255*((1&c)*d),f=255*((1&c>>1)*d),g=255*((1&c>>2)*d);return[e,f,g]},m.ansi256.rgb=function(a){if(232<=a){var d=10*(a-232)+8;return[d,d,d]}a-=16;var c,e=255*(j(a/36)/5),f=255*(j((c=a%36)/6)/5),g=255*(c%6/5);return[e,f,g]},m.rgb.hex=function(a){var b=((255&e(a[0]))<<16)+((255&e(a[1]))<<8)+(255&e(a[2])),c=b.toString(16).toUpperCase();return'000000'.substring(c.length)+c},m.hex.rgb=function(a){var b=a.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!b)return[0,0,0];var c=b[0];3===b[0].length&&(c=c.split('').map(function(a){return a+a}).join(''));var d=parseInt(c,16);return[255&d>>16,255&d>>8,255&d]},m.rgb.hcg=function(a){var c,d,e=a[0]/255,f=a[1]/255,g=a[2]/255,b=i(i(e,f),g),h=n(n(e,f),g),j=b-h;return c=1>j?h/(1-j):0,d=0>=j?0:b===e?(f-g)/j%6:b===f?2+(g-e)/j:4+(e-f)/j+4,d/=6,d%=1,[360*d,100*j,100*c]},m.hsl.hcg=function(a){var b=a[1]/100,d=a[2]/100,e=1,c=0;return e=.5>d?2*b*d:2*b*(1-d),1>e&&(c=(d-.5*e)/(1-e)),[a[0],100*e,100*c]},m.hsv.hcg=function(a){var b=a[1]/100,d=a[2]/100,e=b*d,c=0;return 1>e&&(c=(d-e)/(1-e)),[a[0],100*e,100*c]},m.hcg.rgb=function(a){var b=a[0]/360,d=a[1]/100,c=a[2]/100;if(0==d)return[255*c,255*c,255*c];var e=[0,0,0],f=6*(b%1),g=f%1,h=1-g,i=0;switch(j(f)){case 0:e[0]=1,e[1]=g,e[2]=0;break;case 1:e[0]=h,e[1]=1,e[2]=0;break;case 2:e[0]=0,e[1]=1,e[2]=g;break;case 3:e[0]=0,e[1]=h,e[2]=1;break;case 4:e[0]=g,e[1]=0,e[2]=1;break;default:e[0]=1,e[1]=0,e[2]=h;}return i=(1-d)*c,[255*(d*e[0]+i),255*(d*e[1]+i),255*(d*e[2]+i)]},m.hcg.hsv=function(a){var b=a[1]/100,c=a[2]/100,d=b+c*(1-b),e=0;return 0<d&&(e=b/d),[a[0],100*e,100*d]},m.hcg.hsl=function(a){var b=a[1]/100,c=a[2]/100,d=c*(1-b)+.5*b,e=0;return 0<d&&.5>d?e=b/(2*d):.5<=d&&1>d&&(e=b/(2*(1-d))),[a[0],100*e,100*d]},m.hcg.hwb=function(a){var b=a[1]/100,c=a[2]/100,d=b+c*(1-b);return[a[0],100*(d-b),100*(1-d)]},m.hwb.hcg=function(a){var d=a[1]/100,e=a[2]/100,b=1-e,f=b-d,c=0;return 1>f&&(c=(b-f)/(1-f)),[a[0],100*f,100*c]},m.apple.rgb=function(a){return[255*(a[0]/65535),255*(a[1]/65535),255*(a[2]/65535)]},m.rgb.apple=function(a){return[65535*(a[0]/255),65535*(a[1]/255),65535*(a[2]/255)]},m.gray.rgb=function(a){return[255*(a[0]/100),255*(a[0]/100),255*(a[0]/100)]},m.gray.hsl=m.gray.hsv=function(a){return[0,0,a[0]]},m.gray.hwb=function(a){return[0,100,a[0]]},m.gray.cmyk=function(a){return[0,0,0,a[0]]},m.gray.lab=function(a){return[a[0],0,0]},m.gray.hex=function(a){var b=255&e(255*(a[0]/100)),c=((b<<16)+(b<<8)+b).toString(16).toUpperCase();return'000000'.substring(c.length)+c},m.rgb.gray=function(a){var b=(a[0]+a[1]+a[2])/3;return[100*(b/255)]}},function(a,b){'use strict';function c(a){for(const{protocol:b,regex:c}of d){const d=a.match(c);if(!d)continue;const e=d[1],f=d[2],g=d[3];if(e)return{protocol:b,hostname:e,owner:f,name:g}}return null}Object.defineProperty(b,'__esModule',{value:!0});const d=[{protocol:'https',regex:/^https?:\/\/(?:.+@)?(.+)\/(.+)\/(.+?)(?:\/|.git\/?)?$/},{protocol:'ssh',regex:/^git@(.+):(.+)\/(.+?)(?:\/|.git)?$/},{protocol:'ssh',regex:/^git:(.+)\/(.+)\/(.+?)(?:\/|.git)?$/},{protocol:'ssh',regex:/^ssh:\/\/git@(.+)\/(.+)\/(.+?)(?:\/|.git)?$/}];b.parseRemote=c,b.parseRepositoryIdentifier=function(a){const b=c(a);if(b){const{owner:a,name:c,hostname:d}=b;if(a&&c)return{owner:a,name:c,hostname:d}}const d=a.split('/');if(2===d.length&&0<d[0].length&&0<d[1].length){const a=d[0],b=d[1];return{owner:a,name:b,hostname:null}}return null}},function(a){a.exports=require('path')},function(a,b,c){'use strict';const d=c(1),e=c(6),f=c(2),g=c(5),h={command:'open <path>',aliases:['<path>'],description:'Open a git repository in GitHub Desktop',args:[{name:'path',description:'The path to the repository to open',type:'string',required:!1}],handler({_:[a]}){if(!a)return void f.openDesktop();if(null!=g.parseRemote(a))console.log(`\nYou cannot open a remote URL in GitHub Desktop\n`+`Use \`${d.default.bold(`git clone `+a)}\``+` instead to initiate the clone`);else{const b=e.resolve(process.cwd(),a),c=`openLocalRepo/${encodeURIComponent(b)}`;f.openDesktop(c)}}};a.exports=h},function(a,b,c){'use strict';function d(){console.log(f.default.underline('Commands:'));const a=[];for(const b of Object.keys(g.commands)){const c=g.commands[b];a.push([f.default.bold(c.command),c.description])}h.printTable(a),console.log(`\nRun ${f.default.bold(`github help ${f.default.gray('<command>')}`)} for details about each command`)}function e(a,b){if(!b)return console.log(`Unrecognized command: ${f.default.bold.red.underline(a)}`),void d();if(console.log(`${f.default.gray('github')} ${b.command}`),b.aliases)for(const a of b.aliases)console.log(f.default.gray(`github ${a}`));console.log();const[c,e]=b.description.split('\n',1);console.log(f.default.bold(c)),e&&console.log(e);const{options:g,args:i}=b;g&&(console.log(f.default.underline('\nOptions:')),h.printTable(Object.keys(g).map((a)=>[a,g[a]]).map(([a,b])=>[[a,...(b.aliases||[])].map(h.dasherizeOption).map((a)=>f.default.bold.blue(a)).join(f.default.gray(', ')),b.description,f.default.gray(`[${f.default.underline(b.type)}]`)]))),i&&i.length&&(console.log(f.default.underline('\nArguments:')),h.printTable(i.map((a)=>[(a.required?f.default.bold:f.default).blue(a.name),a.required?f.default.gray('(required)'):'',a.description,f.default.gray(`[${f.default.underline(a.type)}]`)])))}const f=c(1),g=c(3),h=c(0),i={command:'help [command]',description:'Show the help page for a command',handler({_:[a]}){a?e(a,g.commands[a]):d()}};a.exports=i},function(a){a.exports=require('child_process')},function(a){a.exports=require('url')},function(a){a.exports=require('querystring')},function(a,b,c){'use strict';const d=c(11),e=c(10),f=c(0),g=c(2),h={command:'clone <url|slug>',description:'Clone a repository',args:[{name:'url|slug',required:!0,description:'The URL or the GitHub owner/name alias to clone',type:'string'}],options:{branch:{type:'string',aliases:['b'],description:'The branch to checkout after cloning'}},handler({_:[b],branch:a}){if(!b)throw new f.CommandError('Clone URL must be specified');try{const a=new e.URL(b);a.toString()}catch(a){b=`https://github.com/${b}`}const c=`openRepo/${b}?${d.stringify({branch:a})}`;g.openDesktop(c)}};a.exports=h},function(a,b,c){function d(a){var b=e(a),d=c(b);return d}function e(a){var b=f[a];if(!(b+1)){var c=new Error('Cannot find module "'+a+'".');throw c.code='MODULE_NOT_FOUND',c}return b}var f={"./clone.ts":12,"./help.ts":8,"./open.ts":7};d.keys=function(){return Object.keys(f)},d.resolve=e,a.exports=d,d.id=13},function(a){'use strict';a.exports=()=>{return /[\u001B\u009B][[\]()#;?]*(?:(?:(?:[a-zA-Z\d]*(?:;[a-zA-Z\d]*)*)?\u0007)|(?:(?:\d{1,4}(?:;\d{0,4})*)?[\dA-PRZcf-ntqry=><~]))/g}},function(a,b,c){'use strict';const d=c(14);a.exports=(a)=>'string'==typeof a?a.replace(d(),''):a},function(a){'use strict';function b(a){return'u'===a[0]&&5===a.length||'x'===a[0]&&3===a.length?String.fromCharCode(parseInt(a.slice(1),16)):j.get(a)||a}function c(a,c){const d=[],e=c.trim().split(/\s*,\s*/g);let f;for(const g of e)if(!isNaN(g))d.push(+g);else if(f=g.match(h))d.push(f[2].replace(i,(a,c,d)=>c?b(c):d));else throw new Error(`Invalid Chalk template style argument: ${g} (in style '${a}')`);return d}function d(a){g.lastIndex=0;const b=[];for(let d;null!==(d=g.exec(a));){const a=d[1];if(d[2]){const e=c(a,d[2]);b.push([a].concat(e))}else b.push([a])}return b}function e(a,b){const c={};for(const d of b)for(const a of d.styles)c[a[0]]=d.inverse?null:a.slice(1);let d=a;for(const e of Object.keys(c))if(Array.isArray(c[e])){if(!(e in d))throw new Error(`Unknown Chalk style: ${e}`);d=0<c[e].length?d[e].apply(d,c[e]):d[e]}return d}const f=/(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,g=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,h=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,i=/\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi,j=new Map([['n','\n'],['r','\r'],['t','\t'],['b','\b'],['f','\f'],['v','\x0B'],['0','\0'],['\\','\\'],['e','\x1B'],['a','\x07']]);a.exports=(a,c)=>{const g=[],h=[];let i=[];if(c.replace(f,(c,f,j,k,l,m)=>{if(f)i.push(b(f));else if(k){const b=i.join('');i=[],h.push(0===g.length?b:e(a,g)(b)),g.push({inverse:j,styles:d(k)})}else if(l){if(0===g.length)throw new Error('Found extraneous } in Chalk template literal');h.push(e(a,g)(i.join(''))),i=[],g.pop()}else i.push(m)}),h.push(i.join('')),0<g.length){const a=`Chalk template literal is missing ${g.length} closing bracket${1===g.length?'':'s'} (\`}\`)`;throw new Error(a)}return h.join('')}},function(a){'use strict';a.exports=function(a,b){b=b||process.argv;var c=b.indexOf('--'),d=/^-{1,2}/.test(a)?'':'--',e=b.indexOf(d+a);return-1!==e&&(!(-1!==c)||e<c)}},function(a){a.exports=require('os')},function(a,b,c){'use strict';const d=c(18),e=c(17),f=process.env;let g=(()=>{if(e('no-color')||e('no-colors')||e('color=false'))return 0;if(e('color=16m')||e('color=full')||e('color=truecolor'))return 3;if(e('color=256'))return 2;if(e('color')||e('colors')||e('color=true')||e('color=always'))return 1;if(process.stdout&&!process.stdout.isTTY)return 0;{const a=d.release().split('.');return 8<=+process.versions.node.split('.')[0]&&10<=+a[0]&&10586<=+a[2]?2:1}if('CI'in f)return['TRAVIS','CIRCLECI','APPVEYOR','GITLAB_CI'].some((a)=>a in f)||'codeship'===f.CI_NAME?1:0;if('TEAMCITY_VERSION'in f)return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(f.TEAMCITY_VERSION)?1:0;if('TERM_PROGRAM'in f){const a=parseInt((f.TERM_PROGRAM_VERSION||'').split('.')[0],10);switch(f.TERM_PROGRAM){case'iTerm.app':return 3<=a?3:2;case'Hyper':return 3;case'Apple_Terminal':return 2;}}return /-256(color)?$/i.test(f.TERM)?2:/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(f.TERM)?1:'COLORTERM'in f?1:'dumb'===f.TERM?0:0})();'FORCE_COLOR'in f&&(g=0===parseInt(f.FORCE_COLOR,10)?0:g||1),a.exports=process&&((a)=>0!==a&&{level:a,hasBasic:!0,has256:2<=a,has16m:3<=a})(g)},function(a,b,c){function d(){for(var a={},b=j.length,c=0;c<b;c++)a[j[c]]={distance:-1,parent:null};return a}function e(a){var b=d(),c=[a];for(b[a].distance=0;c.length;)for(var e=c.pop(),f=Object.keys(h[e]),g=f.length,j=0;j<g;j++){var i=f[j],k=b[i];-1===k.distance&&(k.distance=b[e].distance+1,k.parent=e,c.unshift(i))}return b}function f(a,b){return function(c){return b(a(c))}}function g(a,b){for(var c=[b[a].parent,a],d=h[b[a].parent][a],e=b[a].parent;b[e].parent;)c.unshift(b[e].parent),d=f(h[b[e].parent][e],d),e=b[e].parent;return d.conversion=c,d}var h=c(4),j=Object.keys(h);a.exports=function(a){for(var b=e(a),c={},d=Object.keys(b),f=d.length,h=0;h<f;h++){var i=d[h],j=b[i];null!==j.parent&&(c[i]=g(i,b))}return c}},function(a){'use strict';a.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]}},function(a,b,c){function d(a){var b=function(b){return void 0===b||null===b?b:(1<arguments.length&&(b=Array.prototype.slice.call(arguments)),a(b))};return'conversion'in a&&(b.conversion=a.conversion),b}function e(a){var b=function(b){if(void 0===b||null===b)return b;1<arguments.length&&(b=Array.prototype.slice.call(arguments));var c=a(b);if('object'==typeof c)for(var d=c.length,e=0;e<d;e++)c[e]=Math.round(c[e]);return c};return'conversion'in a&&(b.conversion=a.conversion),b}var f=c(4),g=c(20),h={},i=Object.keys(f);i.forEach(function(a){h[a]={},Object.defineProperty(h[a],'channels',{value:f[a].channels}),Object.defineProperty(h[a],'labels',{value:f[a].labels});var b=g(a),c=Object.keys(b);c.forEach(function(c){var f=b[c];h[a][c]=e(f),h[a][c].raw=d(f)})}),a.exports=h},function(a){a.exports=function(a){return a.webpackPolyfill||(a.deprecate=function(){},a.paths=[],!a.children&&(a.children=[]),Object.defineProperty(a,'loaded',{enumerable:!0,get:function(){return a.l}}),Object.defineProperty(a,'id',{enumerable:!0,get:function(){return a.i}}),a.webpackPolyfill=1),a}},function(a,b,c){'use strict';(function(a){function b(){const a=new Map,b={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],gray:[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]}};b.color.grey=b.color.gray;for(const c of Object.keys(b)){const d=b[c];for(const c of Object.keys(d)){const e=d[c];b[c]={open:`\u001B[${e[0]}m`,close:`\u001B[${e[1]}m`},d[c]=b[c],a.set(e[0],e[1])}Object.defineProperty(b,c,{value:d,enumerable:!1}),Object.defineProperty(b,'codes',{value:a,enumerable:!1})}const c=(a,c,d)=>[a,c,d];b.color.close='\x1B[39m',b.bgColor.close='\x1B[49m',b.color.ansi={},b.color.ansi256={},b.color.ansi16m={rgb:g(c,0)},b.bgColor.ansi={},b.bgColor.ansi256={},b.bgColor.ansi16m={rgb:g(c,10)};for(const a of Object.keys(d)){if('object'!=typeof d[a])continue;const c=d[a];'ansi16'in c&&(b.color.ansi[a]=e(c.ansi16,0),b.bgColor.ansi[a]=e(c.ansi16,10)),'ansi256'in c&&(b.color.ansi256[a]=f(c.ansi256,0),b.bgColor.ansi256[a]=f(c.ansi256,10)),'rgb'in c&&(b.color.ansi16m[a]=g(c.rgb,0),b.bgColor.ansi16m[a]=g(c.rgb,10))}return b}const d=c(22),e=(a,b)=>function(){const c=a.apply(d,arguments);return`\u001B[${c+b}m`},f=(a,b)=>function(){const c=a.apply(d,arguments);return`\u001B[${38+b};5;${c}m`},g=(a,b)=>function(){const c=a.apply(d,arguments);return`\u001B[${38+b};2;${c[0]};${c[1]};${c[2]}m`};Object.defineProperty(a,'exports',{enumerable:!0,get:b})}).call(this,c(23)(a))},function(a){'use strict';var b=/[|\\{}()[\]^$+*?.]/g;a.exports=function(a){if('string'!=typeof a)throw new TypeError('Expected a string');return a.replace(b,'\\$&')}},function(a){'use strict';function b(a){return'boolean'==typeof a}function c(a){return Array.isArray(a)?a:null==a?[]:[a]}function d(a){return null==a||!0===a?'':a+''}function e(a){return'false'!==a&&!!a}function f(a){return!b(a)&&+a||a}function g(a,b){if(0===b.length)return b;let c,d=0,e=b.length,f=[];for(;d<e;d++)c=b[d],f.push(c),void 0!==a[c]&&(f=f.concat(a[c]));return f}function h(a,b,c,g){return-1===c.indexOf(a)?-1===g.indexOf(a)?f(b):e(b):d(b)}const j=/\s|=/,l=/^-{1,2}/,m=/^--no-/i;a.exports=function(a,d){a=a||[],d=d||{},d.string=c(d.string),d.boolean=c(d.boolean);const e={};let f,k,i,n,o,p,q;if(void 0!==d.alias)for(f in d.alias)for(e[f]=c(d.alias[f]),p=e[f].length,k=0;k<p;k++)for(n=e[f][k],e[n]=[f],i=0;i<p;i++)n!==e[f][i]&&e[n].push(e[f][i]);if(void 0!==d.default)for(f in d.default)q=typeof d.default[f],d[q]=(d[q]||[]).concat(f);d.string=g(e,d.string),d.boolean=g(e,d.boolean);let r=0;const s={_:[]};for(;void 0!==a[r];){let g=1;const i=a[r];if('--'===i){s._=s._.concat(a.slice(r+1));break}else if(!l.test(i))s._.push(i);else if(m.test(i))s[i.replace(m,'')]=!1;else{let m;const n=i.split(j),o=45!==n[0].charCodeAt(1),q=n[0].substr(o?1:2);p=q.length;const t=o?q[p-1]:q;if(void 0!==d.unknown&&void 0===e[t])return d.unknown(n[0]);if(1<n.length?m=n[1]:(m=a[r+1]||!0,l.test(m)?m=!0:g=2),o&&1<p)for(k=p-1;k--;)f=q[k],s[f]=h(f,!0,d.string,d.boolean);const u=h(t,m,d.string,d.boolean);s[t]=void 0===s[t]?u:c(s[t]).concat(u),b(u)&&!b(m)&&'true'!==m&&'false'!==m&&s._.push(m)}r+=g}if(void 0!==d.default)for(f in d.default)void 0===s[f]&&(s[f]=d.default[f]);for(f in s)if(void 0!==e[f])for(o=s[f],p=e[f].length,k=0;k<p;k++)s[e[f][k]]=o;return s}},function(a,b,c){'use strict';function d(a){console.log(h.default.bgBlack.red('ERR!'),a.message),a.stack&&!a.pretty&&console.log(h.default.gray(a.stack))}function e(a){const b=j.commands[a],c={alias:{},boolean:[],default:{},string:[]};if(b.options){for(const a of Object.keys(b.options)){const d=b.options[a];switch(d.aliases&&(c.alias[a]=d.aliases),d.hasOwnProperty('default')&&(c.default[a]=d.default),d.type){case'string':c.string.push(a);break;case'boolean':c.boolean.push(a);}}c.unknown=b.unknownOptionHandler}const d=g(k,c);if(b.options)for(const a of Object.keys(d)){if(!(a in b.options))continue;const c=d[a],e=b.options[a].type;if(typeof c!==e)throw new i.CommandError(`Value passed to flag ${i.dasherizeOption(a)} was of type ${typeof c}, but was expected to be of type ${e}`)}b.handler(d,k)}function f(a){return Object.prototype.hasOwnProperty.call(j.commands,a)}Object.defineProperty(b,'__esModule',{value:!0});const g=c(26),h=c(1),i=c(0),j=c(3);let k=process.argv.slice(2);k[0]||(k[0]='.');const l=k[0];k=k.slice(1),function a(b){try{if(f(b))e(b);else if(b.startsWith('--'))a(b.slice(2));else try{k.unshift(l),e('open')}catch(a){d(a),k=[],e('help')}}catch(a){d(a),k=[b],e('help')}}(l),console.log()}]);
//# sourceMappingURL=cli.js.map