UNPKG

wocwin-vp-cli

Version:

Vue项目脚手架工具

1 lines 266 kB
"use strict";var e=require("node:events"),a=require("node:child_process"),i=require("node:path"),n=require("node:fs"),o=require("node:process"),s=require("node:util"),t=require("node:stream"),r=require("node:http"),c=require("node:https"),p=require("node:url"),l=require("node:crypto"),u=require("node:assert"),m=require("node:tty"),d=require("node:os"),h=require("node:zlib");function f(e,a,i,n){return new(i||(i=Promise))((function(o,s){function t(e){try{c(n.next(e))}catch(e){s(e)}}function r(e){try{c(n.throw(e))}catch(e){s(e)}}function c(e){var a;e.done?o(e.value):(a=e.value,a instanceof i?a:new i((function(e){e(a)}))).then(t,r)}c((n=n.apply(e,a||[])).next())}))}function x(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}"function"==typeof SuppressedError&&SuppressedError;var v={exports:{}},b={},g={};let y=class extends Error{constructor(e,a,i){super(i),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=a,this.exitCode=e,this.nestedError=void 0}};g.CommanderError=y,g.InvalidArgumentError=class extends y{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};const{InvalidArgumentError:w}=g;b.Argument=class{constructor(e,a){switch(this.description=a||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e}this._name.length>3&&"..."===this._name.slice(-3)&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(e,a){return a!==this.defaultValue&&Array.isArray(a)?a.concat(e):[e]}default(e,a){return this.defaultValue=e,this.defaultValueDescription=a,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(e,a)=>{if(!this.argChoices.includes(e))throw new w(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(e,a):e},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}},b.humanReadableArgName=function(e){const a=e.name()+(!0===e.variadic?"...":"");return e.required?"<"+a+">":"["+a+"]"};var _={},k={};const{humanReadableArgName:O}=b;k.Help=class{constructor(){this.helpWidth=void 0,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}visibleCommands(e){const a=e.commands.filter((e=>!e._hidden));if(e._hasImplicitHelpCommand()){const[,i,n]=e._helpCommandnameAndArgs.match(/([^ ]+) *(.*)/),o=e.createCommand(i).helpOption(!1);o.description(e._helpCommandDescription),n&&o.arguments(n),a.push(o)}return this.sortSubcommands&&a.sort(((e,a)=>e.name().localeCompare(a.name()))),a}compareOptions(e,a){const i=e=>e.short?e.short.replace(/^-/,""):e.long.replace(/^--/,"");return i(e).localeCompare(i(a))}visibleOptions(e){const a=e.options.filter((e=>!e.hidden)),i=e._hasHelpOption&&e._helpShortFlag&&!e._findOption(e._helpShortFlag),n=e._hasHelpOption&&!e._findOption(e._helpLongFlag);if(i||n){let o;o=i?n?e.createOption(e._helpFlags,e._helpDescription):e.createOption(e._helpShortFlag,e._helpDescription):e.createOption(e._helpLongFlag,e._helpDescription),a.push(o)}return this.sortOptions&&a.sort(this.compareOptions),a}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];const a=[];for(let i=e.parent;i;i=i.parent){const e=i.options.filter((e=>!e.hidden));a.push(...e)}return this.sortOptions&&a.sort(this.compareOptions),a}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach((a=>{a.description=a.description||e._argsDescription[a.name()]||""})),e.registeredArguments.find((e=>e.description))?e.registeredArguments:[]}subcommandTerm(e){const a=e.registeredArguments.map((e=>O(e))).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(a?" "+a:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,a){return a.visibleCommands(e).reduce(((e,i)=>Math.max(e,a.subcommandTerm(i).length)),0)}longestOptionTermLength(e,a){return a.visibleOptions(e).reduce(((e,i)=>Math.max(e,a.optionTerm(i).length)),0)}longestGlobalOptionTermLength(e,a){return a.visibleGlobalOptions(e).reduce(((e,i)=>Math.max(e,a.optionTerm(i).length)),0)}longestArgumentTermLength(e,a){return a.visibleArguments(e).reduce(((e,i)=>Math.max(e,a.argumentTerm(i).length)),0)}commandUsage(e){let a=e._name;e._aliases[0]&&(a=a+"|"+e._aliases[0]);let i="";for(let a=e.parent;a;a=a.parent)i=a.name()+" "+i;return i+a+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){const a=[];if(e.argChoices&&a.push(`choices: ${e.argChoices.map((e=>JSON.stringify(e))).join(", ")}`),void 0!==e.defaultValue){(e.required||e.optional||e.isBoolean()&&"boolean"==typeof e.defaultValue)&&a.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`)}return void 0!==e.presetArg&&e.optional&&a.push(`preset: ${JSON.stringify(e.presetArg)}`),void 0!==e.envVar&&a.push(`env: ${e.envVar}`),a.length>0?`${e.description} (${a.join(", ")})`:e.description}argumentDescription(e){const a=[];if(e.argChoices&&a.push(`choices: ${e.argChoices.map((e=>JSON.stringify(e))).join(", ")}`),void 0!==e.defaultValue&&a.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),a.length>0){const i=`(${a.join(", ")})`;return e.description?`${e.description} ${i}`:i}return e.description}formatHelp(e,a){const i=a.padWidth(e,a),n=a.helpWidth||80;function o(e,o){if(o){const s=`${e.padEnd(i+2)}${o}`;return a.wrap(s,n-2,i+2)}return e}function s(e){return e.join("\n").replace(/^/gm," ".repeat(2))}let t=[`Usage: ${a.commandUsage(e)}`,""];const r=a.commandDescription(e);r.length>0&&(t=t.concat([a.wrap(r,n,0),""]));const c=a.visibleArguments(e).map((e=>o(a.argumentTerm(e),a.argumentDescription(e))));c.length>0&&(t=t.concat(["Arguments:",s(c),""]));const p=a.visibleOptions(e).map((e=>o(a.optionTerm(e),a.optionDescription(e))));if(p.length>0&&(t=t.concat(["Options:",s(p),""])),this.showGlobalOptions){const i=a.visibleGlobalOptions(e).map((e=>o(a.optionTerm(e),a.optionDescription(e))));i.length>0&&(t=t.concat(["Global Options:",s(i),""]))}const l=a.visibleCommands(e).map((e=>o(a.subcommandTerm(e),a.subcommandDescription(e))));return l.length>0&&(t=t.concat(["Commands:",s(l),""])),t.join("\n")}padWidth(e,a){return Math.max(a.longestOptionTermLength(e,a),a.longestGlobalOptionTermLength(e,a),a.longestSubcommandTermLength(e,a),a.longestArgumentTermLength(e,a))}wrap(e,a,i,n=40){const o=new RegExp("[\\n][ \\f\\t\\v   -    \ufeff]+");if(e.match(o))return e;const s=a-i;if(s<n)return e;const t=e.slice(0,i),r=e.slice(i).replace("\r\n","\n"),c=" ".repeat(i),p="\\s​",l=new RegExp(`\n|.{1,${s-1}}([${p}]|$)|[^${p}]+?([${p}]|$)`,"g");return t+(r.match(l)||[]).map(((e,a)=>"\n"===e?"":(a>0?c:"")+e.trimEnd())).join("\n")}};var E={};const{InvalidArgumentError:j}=g;function A(e){let a,i;const n=e.split(/[ |,]+/);return n.length>1&&!/^[[<]/.test(n[1])&&(a=n.shift()),i=n.shift(),!a&&/^-[^-]$/.test(i)&&(a=i,i=void 0),{shortFlag:a,longFlag:i}}E.Option=class{constructor(e,a){this.flags=e,this.description=a||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;const i=A(e);this.short=i.shortFlag,this.long=i.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0}default(e,a){return this.defaultValue=e,this.defaultValueDescription=a,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let a=e;return"string"==typeof e&&(a={[e]:!0}),this.implied=Object.assign(this.implied||{},a),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_concatValue(e,a){return a!==this.defaultValue&&Array.isArray(a)?a.concat(e):[e]}choices(e){return this.argChoices=e.slice(),this.parseArg=(e,a)=>{if(!this.argChoices.includes(e))throw new j(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(e,a):e},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.name().replace(/^no-/,"").split("-").reduce(((e,a)=>e+a[0].toUpperCase()+a.slice(1)))}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},E.splitOptionFlags=A,E.DualOptions=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach((e=>{e.negate?this.negativeOptions.set(e.attributeName(),e):this.positiveOptions.set(e.attributeName(),e)})),this.negativeOptions.forEach(((e,a)=>{this.positiveOptions.has(a)&&this.dualOptions.add(a)}))}valueFromOption(e,a){const i=a.attributeName();if(!this.dualOptions.has(i))return!0;const n=this.negativeOptions.get(i).presetArg,o=void 0!==n&&n;return a.negate===(o===e)}};var C={};C.suggestSimilar=function(e,a){if(!a||0===a.length)return"";a=Array.from(new Set(a));const i=e.startsWith("--");i&&(e=e.slice(2),a=a.map((e=>e.slice(2))));let n=[],o=3;return a.forEach((a=>{if(a.length<=1)return;const i=function(e,a){if(Math.abs(e.length-a.length)>3)return Math.max(e.length,a.length);const i=[];for(let a=0;a<=e.length;a++)i[a]=[a];for(let e=0;e<=a.length;e++)i[0][e]=e;for(let n=1;n<=a.length;n++)for(let o=1;o<=e.length;o++){let s=1;s=e[o-1]===a[n-1]?0:1,i[o][n]=Math.min(i[o-1][n]+1,i[o][n-1]+1,i[o-1][n-1]+s),o>1&&n>1&&e[o-1]===a[n-2]&&e[o-2]===a[n-1]&&(i[o][n]=Math.min(i[o][n],i[o-2][n-2]+1))}return i[e.length][a.length]}(e,a),s=Math.max(e.length,a.length);(s-i)/s>.4&&(i<o?(o=i,n=[a]):i===o&&n.push(a))})),n.sort(((e,a)=>e.localeCompare(a))),i&&(n=n.map((e=>`--${e}`))),n.length>1?`\n(Did you mean one of ${n.join(", ")}?)`:1===n.length?`\n(Did you mean ${n[0]}?)`:""};const S=e.EventEmitter,R=a,T=i,F=n,P=o,{Argument:z,humanReadableArgName:L}=b,{CommanderError:q}=g,{Help:U}=k,{Option:N,splitOptionFlags:B,DualOptions:D}=E,{suggestSimilar:I}=C;function H(e,a){e._hasHelpOption&&a.find((a=>a===e._helpLongFlag||a===e._helpShortFlag))&&(e.outputHelp(),e._exit(0,"commander.helpDisplayed","(outputHelp)"))}function $(e){return e.map((e=>{if(!e.startsWith("--inspect"))return e;let a,i,n="127.0.0.1",o="9229";return null!==(i=e.match(/^(--inspect(-brk)?)$/))?a=i[1]:null!==(i=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))?(a=i[1],/^\d+$/.test(i[3])?o=i[3]:n=i[3]):null!==(i=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))&&(a=i[1],n=i[3],o=i[4]),a&&"0"!==o?`${a}=${n}:${parseInt(o)+1}`:e}))}_.Command=class e extends S{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!0,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._outputConfiguration={writeOut:e=>P.stdout.write(e),writeErr:e=>P.stderr.write(e),getOutHelpWidth:()=>P.stdout.isTTY?P.stdout.columns:void 0,getErrHelpWidth:()=>P.stderr.isTTY?P.stderr.columns:void 0,outputError:(e,a)=>a(e)},this._hidden=!1,this._hasHelpOption=!0,this._helpFlags="-h, --help",this._helpDescription="display help for command",this._helpShortFlag="-h",this._helpLongFlag="--help",this._addImplicitHelpCommand=void 0,this._helpCommandName="help",this._helpCommandnameAndArgs="help [command]",this._helpCommandDescription="display help for command",this._helpConfiguration={}}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._hasHelpOption=e._hasHelpOption,this._helpFlags=e._helpFlags,this._helpDescription=e._helpDescription,this._helpShortFlag=e._helpShortFlag,this._helpLongFlag=e._helpLongFlag,this._helpCommandName=e._helpCommandName,this._helpCommandnameAndArgs=e._helpCommandnameAndArgs,this._helpCommandDescription=e._helpCommandDescription,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}_getCommandAndAncestors(){const e=[];for(let a=this;a;a=a.parent)e.push(a);return e}command(e,a,i){let n=a,o=i;"object"==typeof n&&null!==n&&(o=n,n=null),o=o||{};const[,s,t]=e.match(/([^ ]+) *(.*)/),r=this.createCommand(s);return n&&(r.description(n),r._executableHandler=!0),o.isDefault&&(this._defaultCommandName=r._name),r._hidden=!(!o.noHelp&&!o.hidden),r._executableFile=o.executableFile||null,t&&r.arguments(t),this.commands.push(r),r.parent=this,r.copyInheritedSettings(this),n?this:r}createCommand(a){return new e(a)}createHelp(){return Object.assign(new U,this.configureHelp())}configureHelp(e){return void 0===e?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return void 0===e?this._outputConfiguration:(Object.assign(this._outputConfiguration,e),this)}showHelpAfterError(e=!0){return"string"!=typeof e&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,a){if(!e._name)throw new Error("Command passed to .addCommand() must have a name\n- specify the name in Command constructor or using .name()");return(a=a||{}).isDefault&&(this._defaultCommandName=e._name),(a.noHelp||a.hidden)&&(e._hidden=!0),this.commands.push(e),e.parent=this,this}createArgument(e,a){return new z(e,a)}argument(e,a,i,n){const o=this.createArgument(e,a);return"function"==typeof i?o.default(n).argParser(i):o.default(i),this.addArgument(o),this}arguments(e){return e.trim().split(/ +/).forEach((e=>{this.argument(e)})),this}addArgument(e){const a=this.registeredArguments.slice(-1)[0];if(a&&a.variadic)throw new Error(`only the last argument can be variadic '${a.name()}'`);if(e.required&&void 0!==e.defaultValue&&void 0===e.parseArg)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this.registeredArguments.push(e),this}addHelpCommand(e,a){return!1===e?this._addImplicitHelpCommand=!1:(this._addImplicitHelpCommand=!0,"string"==typeof e&&(this._helpCommandName=e.split(" ")[0],this._helpCommandnameAndArgs=e),this._helpCommandDescription=a||this._helpCommandDescription),this}_hasImplicitHelpCommand(){return void 0===this._addImplicitHelpCommand?this.commands.length&&!this._actionHandler&&!this._findCommand("help"):this._addImplicitHelpCommand}hook(e,a){const i=["preSubcommand","preAction","postAction"];if(!i.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.\nExpecting one of '${i.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(a):this._lifeCycleHooks[e]=[a],this}exitOverride(e){return this._exitCallback=e||(e=>{if("commander.executeSubCommandAsync"!==e.code)throw e}),this}_exit(e,a,i){this._exitCallback&&this._exitCallback(new q(e,a,i)),P.exit(e)}action(e){return this._actionHandler=a=>{const i=this.registeredArguments.length,n=a.slice(0,i);return this._storeOptionsAsProperties?n[i]=this:n[i]=this.opts(),n.push(this),e.apply(this,n)},this}createOption(e,a){return new N(e,a)}_callParseArg(e,a,i,n){try{return e.parseArg(a,i)}catch(e){if("commander.invalidArgument"===e.code){const a=`${n} ${e.message}`;this.error(a,{exitCode:e.exitCode,code:e.code})}throw e}}addOption(e){const a=e.name(),i=e.attributeName();if(e.negate){const a=e.long.replace(/^--no-/,"--");this._findOption(a)||this.setOptionValueWithSource(i,void 0===e.defaultValue||e.defaultValue,"default")}else void 0!==e.defaultValue&&this.setOptionValueWithSource(i,e.defaultValue,"default");this.options.push(e);const n=(a,n,o)=>{null==a&&void 0!==e.presetArg&&(a=e.presetArg);const s=this.getOptionValue(i);null!==a&&e.parseArg?a=this._callParseArg(e,a,s,n):null!==a&&e.variadic&&(a=e._concatValue(a,s)),null==a&&(a=!e.negate&&(!(!e.isBoolean()&&!e.optional)||"")),this.setOptionValueWithSource(i,a,o)};return this.on("option:"+a,(a=>{const i=`error: option '${e.flags}' argument '${a}' is invalid.`;n(a,i,"cli")})),e.envVar&&this.on("optionEnv:"+a,(a=>{const i=`error: option '${e.flags}' value '${a}' from env '${e.envVar}' is invalid.`;n(a,i,"env")})),this}_optionEx(e,a,i,n,o){if("object"==typeof a&&a instanceof N)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");const s=this.createOption(a,i);if(s.makeOptionMandatory(!!e.mandatory),"function"==typeof n)s.default(o).argParser(n);else if(n instanceof RegExp){const e=n;n=(a,i)=>{const n=e.exec(a);return n?n[0]:i},s.default(o).argParser(n)}else s.default(n);return this.addOption(s)}option(e,a,i,n){return this._optionEx({},e,a,i,n)}requiredOption(e,a,i,n){return this._optionEx({mandatory:!0},e,a,i,n)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){if(this._passThroughOptions=!!e,this.parent&&e&&!this.parent._enablePositionalOptions)throw new Error("passThroughOptions can not be used without turning on enablePositionalOptions for parent command(s)");return this}storeOptionsAsProperties(e=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");return this._storeOptionsAsProperties=!!e,this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,a){return this.setOptionValueWithSource(e,a,void 0)}setOptionValueWithSource(e,a,i){return this._storeOptionsAsProperties?this[e]=a:this._optionValues[e]=a,this._optionValueSources[e]=i,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let a;return this._getCommandAndAncestors().forEach((i=>{void 0!==i.getOptionValueSource(e)&&(a=i.getOptionValueSource(e))})),a}_prepareUserArgs(e,a){if(void 0!==e&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");let i;switch(a=a||{},void 0===e&&(e=P.argv,P.versions&&P.versions.electron&&(a.from="electron")),this.rawArgs=e.slice(),a.from){case void 0:case"node":this._scriptPath=e[1],i=e.slice(2);break;case"electron":P.defaultApp?(this._scriptPath=e[1],i=e.slice(2)):i=e.slice(1);break;case"user":i=e.slice(0);break;default:throw new Error(`unexpected parse option { from: '${a.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",i}parse(e,a){const i=this._prepareUserArgs(e,a);return this._parseCommand([],i),this}async parseAsync(e,a){const i=this._prepareUserArgs(e,a);return await this._parseCommand([],i),this}_executeSubCommand(e,a){a=a.slice();let i=!1;const n=[".js",".ts",".tsx",".mjs",".cjs"];function o(e,a){const i=T.resolve(e,a);if(F.existsSync(i))return i;if(n.includes(T.extname(a)))return;const o=n.find((e=>F.existsSync(`${i}${e}`)));return o?`${i}${o}`:void 0}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let s,t=e._executableFile||`${this._name}-${e._name}`,r=this._executableDir||"";if(this._scriptPath){let e;try{e=F.realpathSync(this._scriptPath)}catch(a){e=this._scriptPath}r=T.resolve(T.dirname(e),r)}if(r){let a=o(r,t);if(!a&&!e._executableFile&&this._scriptPath){const i=T.basename(this._scriptPath,T.extname(this._scriptPath));i!==this._name&&(a=o(r,`${i}-${e._name}`))}t=a||t}if(i=n.includes(T.extname(t)),"win32"!==P.platform?i?(a.unshift(t),a=$(P.execArgv).concat(a),s=R.spawn(P.argv[0],a,{stdio:"inherit"})):s=R.spawn(t,a,{stdio:"inherit"}):(a.unshift(t),a=$(P.execArgv).concat(a),s=R.spawn(P.execPath,a,{stdio:"inherit"})),!s.killed){["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach((e=>{P.on(e,(()=>{!1===s.killed&&null===s.exitCode&&s.kill(e)}))}))}const c=this._exitCallback;c?s.on("close",(()=>{c(new q(P.exitCode||0,"commander.executeSubCommandAsync","(close)"))})):s.on("close",P.exit.bind(P)),s.on("error",(a=>{if("ENOENT"===a.code){const a=r?`searched for local subcommand relative to directory '${r}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",i=`'${t}' does not exist\n - if '${e._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead\n - if the default executable name is not suitable, use the executableFile option to supply a custom name or path\n - ${a}`;throw new Error(i)}if("EACCES"===a.code)throw new Error(`'${t}' not executable`);if(c){const e=new q(1,"commander.executeSubCommandAsync","(error)");e.nestedError=a,c(e)}else P.exit(1)})),this.runningCommand=s}_dispatchSubcommand(e,a,i){const n=this._findCommand(e);let o;return n||this.help({error:!0}),o=this._chainOrCallSubCommandHook(o,n,"preSubcommand"),o=this._chainOrCall(o,(()=>{if(!n._executableHandler)return n._parseCommand(a,i);this._executeSubCommand(n,a.concat(i))})),o}_dispatchHelpCommand(e){e||this.help();const a=this._findCommand(e);return a&&!a._executableHandler&&a.help(),this._dispatchSubcommand(e,[],[this._helpLongFlag||this._helpShortFlag])}_checkNumberOfArguments(){this.registeredArguments.forEach(((e,a)=>{e.required&&null==this.args[a]&&this.missingArgument(e.name())})),this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic||this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){const e=(e,a,i)=>{let n=a;if(null!==a&&e.parseArg){const o=`error: command-argument value '${a}' is invalid for argument '${e.name()}'.`;n=this._callParseArg(e,a,i,o)}return n};this._checkNumberOfArguments();const a=[];this.registeredArguments.forEach(((i,n)=>{let o=i.defaultValue;i.variadic?n<this.args.length?(o=this.args.slice(n),i.parseArg&&(o=o.reduce(((a,n)=>e(i,n,a)),i.defaultValue))):void 0===o&&(o=[]):n<this.args.length&&(o=this.args[n],i.parseArg&&(o=e(i,o,i.defaultValue))),a[n]=o})),this.processedArgs=a}_chainOrCall(e,a){return e&&e.then&&"function"==typeof e.then?e.then((()=>a())):a()}_chainOrCallHooks(e,a){let i=e;const n=[];return this._getCommandAndAncestors().reverse().filter((e=>void 0!==e._lifeCycleHooks[a])).forEach((e=>{e._lifeCycleHooks[a].forEach((a=>{n.push({hookedCommand:e,callback:a})}))})),"postAction"===a&&n.reverse(),n.forEach((e=>{i=this._chainOrCall(i,(()=>e.callback(e.hookedCommand,this)))})),i}_chainOrCallSubCommandHook(e,a,i){let n=e;return void 0!==this._lifeCycleHooks[i]&&this._lifeCycleHooks[i].forEach((e=>{n=this._chainOrCall(n,(()=>e(this,a)))})),n}_parseCommand(e,a){const i=this.parseOptions(a);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(i.operands),a=i.unknown,this.args=e.concat(a),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),a);if(this._hasImplicitHelpCommand()&&e[0]===this._helpCommandName)return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return H(this,a),this._dispatchSubcommand(this._defaultCommandName,e,a);!this.commands.length||0!==this.args.length||this._actionHandler||this._defaultCommandName||this.help({error:!0}),H(this,i.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();const n=()=>{i.unknown.length>0&&this.unknownOption(i.unknown[0])},o=`command:${this.name()}`;if(this._actionHandler){let i;return n(),this._processArguments(),i=this._chainOrCallHooks(i,"preAction"),i=this._chainOrCall(i,(()=>this._actionHandler(this.processedArgs))),this.parent&&(i=this._chainOrCall(i,(()=>{this.parent.emit(o,e,a)}))),i=this._chainOrCallHooks(i,"postAction"),i}if(this.parent&&this.parent.listenerCount(o))n(),this._processArguments(),this.parent.emit(o,e,a);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,a);this.listenerCount("command:*")?this.emit("command:*",e,a):this.commands.length?this.unknownCommand():(n(),this._processArguments())}else this.commands.length?(n(),this.help({error:!0})):(n(),this._processArguments())}_findCommand(e){if(e)return this.commands.find((a=>a._name===e||a._aliases.includes(e)))}_findOption(e){return this.options.find((a=>a.is(e)))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach((e=>{e.options.forEach((a=>{a.mandatory&&void 0===e.getOptionValue(a.attributeName())&&e.missingMandatoryOptionValue(a)}))}))}_checkForConflictingLocalOptions(){const e=this.options.filter((e=>{const a=e.attributeName();return void 0!==this.getOptionValue(a)&&"default"!==this.getOptionValueSource(a)})),a=e.filter((e=>e.conflictsWith.length>0));a.forEach((a=>{const i=e.find((e=>a.conflictsWith.includes(e.attributeName())));i&&this._conflictingOption(a,i)}))}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach((e=>{e._checkForConflictingLocalOptions()}))}parseOptions(e){const a=[],i=[];let n=a;const o=e.slice();function s(e){return e.length>1&&"-"===e[0]}let t=null;for(;o.length;){const e=o.shift();if("--"===e){n===i&&n.push(e),n.push(...o);break}if(!t||s(e)){if(t=null,s(e)){const a=this._findOption(e);if(a){if(a.required){const e=o.shift();void 0===e&&this.optionMissingArgument(a),this.emit(`option:${a.name()}`,e)}else if(a.optional){let e=null;o.length>0&&!s(o[0])&&(e=o.shift()),this.emit(`option:${a.name()}`,e)}else this.emit(`option:${a.name()}`);t=a.variadic?a:null;continue}}if(e.length>2&&"-"===e[0]&&"-"!==e[1]){const a=this._findOption(`-${e[1]}`);if(a){a.required||a.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${a.name()}`,e.slice(2)):(this.emit(`option:${a.name()}`),o.unshift(`-${e.slice(2)}`));continue}}if(/^--[^=]+=/.test(e)){const a=e.indexOf("="),i=this._findOption(e.slice(0,a));if(i&&(i.required||i.optional)){this.emit(`option:${i.name()}`,e.slice(a+1));continue}}if(s(e)&&(n=i),(this._enablePositionalOptions||this._passThroughOptions)&&0===a.length&&0===i.length){if(this._findCommand(e)){a.push(e),o.length>0&&i.push(...o);break}if(e===this._helpCommandName&&this._hasImplicitHelpCommand()){a.push(e),o.length>0&&a.push(...o);break}if(this._defaultCommandName){i.push(e),o.length>0&&i.push(...o);break}}if(this._passThroughOptions){n.push(e),o.length>0&&n.push(...o);break}n.push(e)}else this.emit(`option:${t.name()}`,e)}return{operands:a,unknown:i}}opts(){if(this._storeOptionsAsProperties){const e={},a=this.options.length;for(let i=0;i<a;i++){const a=this.options[i].attributeName();e[a]=a===this._versionOptionName?this._version:this[a]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce(((e,a)=>Object.assign(e,a.opts())),{})}error(e,a){this._outputConfiguration.outputError(`${e}\n`,this._outputConfiguration.writeErr),"string"==typeof this._showHelpAfterError?this._outputConfiguration.writeErr(`${this._showHelpAfterError}\n`):this._showHelpAfterError&&(this._outputConfiguration.writeErr("\n"),this.outputHelp({error:!0}));const i=a||{},n=i.exitCode||1,o=i.code||"commander.error";this._exit(n,o,e)}_parseOptionsEnv(){this.options.forEach((e=>{if(e.envVar&&e.envVar in P.env){const a=e.attributeName();(void 0===this.getOptionValue(a)||["default","config","env"].includes(this.getOptionValueSource(a)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,P.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}}))}_parseOptionsImplied(){const e=new D(this.options),a=e=>void 0!==this.getOptionValue(e)&&!["default","implied"].includes(this.getOptionValueSource(e));this.options.filter((i=>void 0!==i.implied&&a(i.attributeName())&&e.valueFromOption(this.getOptionValue(i.attributeName()),i))).forEach((e=>{Object.keys(e.implied).filter((e=>!a(e))).forEach((a=>{this.setOptionValueWithSource(a,e.implied[a],"implied")}))}))}missingArgument(e){const a=`error: missing required argument '${e}'`;this.error(a,{code:"commander.missingArgument"})}optionMissingArgument(e){const a=`error: option '${e.flags}' argument missing`;this.error(a,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){const a=`error: required option '${e.flags}' not specified`;this.error(a,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,a){const i=e=>{const a=e.attributeName(),i=this.getOptionValue(a),n=this.options.find((e=>e.negate&&a===e.attributeName())),o=this.options.find((e=>!e.negate&&a===e.attributeName()));return n&&(void 0===n.presetArg&&!1===i||void 0!==n.presetArg&&i===n.presetArg)?n:o||e},n=e=>{const a=i(e),n=a.attributeName();return"env"===this.getOptionValueSource(n)?`environment variable '${a.envVar}'`:`option '${a.flags}'`},o=`error: ${n(e)} cannot be used with ${n(a)}`;this.error(o,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let a="";if(e.startsWith("--")&&this._showSuggestionAfterError){let i=[],n=this;do{const e=n.createHelp().visibleOptions(n).filter((e=>e.long)).map((e=>e.long));i=i.concat(e),n=n.parent}while(n&&!n._enablePositionalOptions);a=I(e,i)}const i=`error: unknown option '${e}'${a}`;this.error(i,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;const a=this.registeredArguments.length,i=1===a?"":"s",n=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${a} argument${i} but got ${e.length}.`;this.error(n,{code:"commander.excessArguments"})}unknownCommand(){const e=this.args[0];let a="";if(this._showSuggestionAfterError){const i=[];this.createHelp().visibleCommands(this).forEach((e=>{i.push(e.name()),e.alias()&&i.push(e.alias())})),a=I(e,i)}const i=`error: unknown command '${e}'${a}`;this.error(i,{code:"commander.unknownCommand"})}version(e,a,i){if(void 0===e)return this._version;this._version=e,a=a||"-V, --version",i=i||"output the version number";const n=this.createOption(a,i);return this._versionOptionName=n.attributeName(),this.options.push(n),this.on("option:"+n.name(),(()=>{this._outputConfiguration.writeOut(`${e}\n`),this._exit(0,"commander.version",e)})),this}description(e,a){return void 0===e&&void 0===a?this._description:(this._description=e,a&&(this._argsDescription=a),this)}summary(e){return void 0===e?this._summary:(this._summary=e,this)}alias(e){if(void 0===e)return this._aliases[0];let a=this;if(0!==this.commands.length&&this.commands[this.commands.length-1]._executableHandler&&(a=this.commands[this.commands.length-1]),e===a._name)throw new Error("Command alias can't be the same as its name");return a._aliases.push(e),this}aliases(e){return void 0===e?this._aliases:(e.forEach((e=>this.alias(e))),this)}usage(e){if(void 0===e){if(this._usage)return this._usage;const e=this.registeredArguments.map((e=>L(e)));return[].concat(this.options.length||this._hasHelpOption?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?e:[]).join(" ")}return this._usage=e,this}name(e){return void 0===e?this._name:(this._name=e,this)}nameFromFilename(e){return this._name=T.basename(e,T.extname(e)),this}executableDir(e){return void 0===e?this._executableDir:(this._executableDir=e,this)}helpInformation(e){const a=this.createHelp();return void 0===a.helpWidth&&(a.helpWidth=e&&e.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth()),a.formatHelp(this,a)}_getHelpContext(e){const a={error:!!(e=e||{}).error};let i;return i=a.error?e=>this._outputConfiguration.writeErr(e):e=>this._outputConfiguration.writeOut(e),a.write=e.write||i,a.command=this,a}outputHelp(e){let a;"function"==typeof e&&(a=e,e=void 0);const i=this._getHelpContext(e);this._getCommandAndAncestors().reverse().forEach((e=>e.emit("beforeAllHelp",i))),this.emit("beforeHelp",i);let n=this.helpInformation(i);if(a&&(n=a(n),"string"!=typeof n&&!Buffer.isBuffer(n)))throw new Error("outputHelp callback must return a string or a Buffer");i.write(n),this._helpLongFlag&&this.emit(this._helpLongFlag),this.emit("afterHelp",i),this._getCommandAndAncestors().forEach((e=>e.emit("afterAllHelp",i)))}helpOption(e,a){if("boolean"==typeof e)return this._hasHelpOption=e,this;this._helpFlags=e||this._helpFlags,this._helpDescription=a||this._helpDescription;const i=B(this._helpFlags);return this._helpShortFlag=i.shortFlag,this._helpLongFlag=i.longFlag,this}help(e){this.outputHelp(e);let a=P.exitCode||0;0===a&&e&&"function"!=typeof e&&e.error&&(a=1),this._exit(a,"commander.help","(outputHelp)")}addHelpText(e,a){const i=["beforeAll","before","after","afterAll"];if(!i.includes(e))throw new Error(`Unexpected value for position to addHelpText.\nExpecting one of '${i.join("', '")}'`);const n=`${e}Help`;return this.on(n,(e=>{let i;i="function"==typeof a?a({error:e.error,command:e.command}):a,i&&e.write(`${i}\n`)})),this}},function(e,a){const{Argument:i}=b,{Command:n}=_,{CommanderError:o,InvalidArgumentError:s}=g,{Help:t}=k,{Option:r}=E;(a=e.exports=new n).program=a,a.Command=n,a.Option=r,a.Argument=i,a.Help=t,a.CommanderError=o,a.InvalidArgumentError=s,a.InvalidOptionArgumentError=s}(v,v.exports);var M=x(v.exports);const{program:V,createCommand:W,createArgument:G,createOption:J,CommanderError:K,InvalidArgumentError:Y,InvalidOptionArgumentError:X,Command:Q,Argument:Z,Option:ee,Help:ae}=M;var ie="0.0.3";function ne(e,a){return function(){return e.apply(a,arguments)}}const{toString:oe}=Object.prototype,{getPrototypeOf:se}=Object,te=(re=Object.create(null),e=>{const a=oe.call(e);return re[a]||(re[a]=a.slice(8,-1).toLowerCase())});var re;const ce=e=>(e=e.toLowerCase(),a=>te(a)===e),pe=e=>a=>typeof a===e,{isArray:le}=Array,ue=pe("undefined");const me=ce("ArrayBuffer");const de=pe("string"),he=pe("function"),fe=pe("number"),xe=e=>null!==e&&"object"==typeof e,ve=e=>{if("object"!==te(e))return!1;const a=se(e);return!(null!==a&&a!==Object.prototype&&null!==Object.getPrototypeOf(a)||Symbol.toStringTag in e||Symbol.iterator in e)},be=ce("Date"),ge=ce("File"),ye=ce("Blob"),we=ce("FileList"),_e=ce("URLSearchParams"),[ke,Oe,Ee,je]=["ReadableStream","Request","Response","Headers"].map(ce);function Ae(e,a,{allOwnKeys:i=!1}={}){if(null==e)return;let n,o;if("object"!=typeof e&&(e=[e]),le(e))for(n=0,o=e.length;n<o;n++)a.call(null,e[n],n,e);else{const o=i?Object.getOwnPropertyNames(e):Object.keys(e),s=o.length;let t;for(n=0;n<s;n++)t=o[n],a.call(null,e[t],t,e)}}function Ce(e,a){a=a.toLowerCase();const i=Object.keys(e);let n,o=i.length;for(;o-- >0;)if(n=i[o],a===n.toLowerCase())return n;return null}const Se="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,Re=e=>!ue(e)&&e!==Se;const Te=(e=>a=>e&&a instanceof e)("undefined"!=typeof Uint8Array&&se(Uint8Array)),Fe=ce("HTMLFormElement"),Pe=(({hasOwnProperty:e})=>(a,i)=>e.call(a,i))(Object.prototype),ze=ce("RegExp"),Le=(e,a)=>{const i=Object.getOwnPropertyDescriptors(e),n={};Ae(i,((i,o)=>{let s;!1!==(s=a(i,o,e))&&(n[o]=s||i)})),Object.defineProperties(e,n)};const qe=ce("AsyncFunction"),Ue=(Ne="function"==typeof setImmediate,Be=he(Se.postMessage),Ne?setImmediate:Be?(De=`axios@${Math.random()}`,Ie=[],Se.addEventListener("message",(({source:e,data:a})=>{e===Se&&a===De&&Ie.length&&Ie.shift()()}),!1),e=>{Ie.push(e),Se.postMessage(De,"*")}):e=>setTimeout(e));var Ne,Be,De,Ie;const He="undefined"!=typeof queueMicrotask?queueMicrotask.bind(Se):"undefined"!=typeof process&&process.nextTick||Ue;var $e={isArray:le,isArrayBuffer:me,isBuffer:function(e){return null!==e&&!ue(e)&&null!==e.constructor&&!ue(e.constructor)&&he(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let a;return e&&("function"==typeof FormData&&e instanceof FormData||he(e.append)&&("formdata"===(a=te(e))||"object"===a&&he(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let a;return a="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&me(e.buffer),a},isString:de,isNumber:fe,isBoolean:e=>!0===e||!1===e,isObject:xe,isPlainObject:ve,isReadableStream:ke,isRequest:Oe,isResponse:Ee,isHeaders:je,isUndefined:ue,isDate:be,isFile:ge,isBlob:ye,isRegExp:ze,isFunction:he,isStream:e=>xe(e)&&he(e.pipe),isURLSearchParams:_e,isTypedArray:Te,isFileList:we,forEach:Ae,merge:function e(){const{caseless:a}=Re(this)&&this||{},i={},n=(n,o)=>{const s=a&&Ce(i,o)||o;ve(i[s])&&ve(n)?i[s]=e(i[s],n):ve(n)?i[s]=e({},n):le(n)?i[s]=n.slice():i[s]=n};for(let e=0,a=arguments.length;e<a;e++)arguments[e]&&Ae(arguments[e],n);return i},extend:(e,a,i,{allOwnKeys:n}={})=>(Ae(a,((a,n)=>{i&&he(a)?e[n]=ne(a,i):e[n]=a}),{allOwnKeys:n}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,a,i,n)=>{e.prototype=Object.create(a.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:a.prototype}),i&&Object.assign(e.prototype,i)},toFlatObject:(e,a,i,n)=>{let o,s,t;const r={};if(a=a||{},null==e)return a;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)t=o[s],n&&!n(t,e,a)||r[t]||(a[t]=e[t],r[t]=!0);e=!1!==i&&se(e)}while(e&&(!i||i(e,a))&&e!==Object.prototype);return a},kindOf:te,kindOfTest:ce,endsWith:(e,a,i)=>{e=String(e),(void 0===i||i>e.length)&&(i=e.length),i-=a.length;const n=e.indexOf(a,i);return-1!==n&&n===i},toArray:e=>{if(!e)return null;if(le(e))return e;let a=e.length;if(!fe(a))return null;const i=new Array(a);for(;a-- >0;)i[a]=e[a];return i},forEachEntry:(e,a)=>{const i=(e&&e[Symbol.iterator]).call(e);let n;for(;(n=i.next())&&!n.done;){const i=n.value;a.call(e,i[0],i[1])}},matchAll:(e,a)=>{let i;const n=[];for(;null!==(i=e.exec(a));)n.push(i);return n},isHTMLForm:Fe,hasOwnProperty:Pe,hasOwnProp:Pe,reduceDescriptors:Le,freezeMethods:e=>{Le(e,((a,i)=>{if(he(e)&&-1!==["arguments","caller","callee"].indexOf(i))return!1;const n=e[i];he(n)&&(a.enumerable=!1,"writable"in a?a.writable=!1:a.set||(a.set=()=>{throw Error("Can not rewrite read-only method '"+i+"'")}))}))},toObjectSet:(e,a)=>{const i={},n=e=>{e.forEach((e=>{i[e]=!0}))};return le(e)?n(e):n(String(e).split(a)),i},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,a,i){return a.toUpperCase()+i})),noop:()=>{},toFiniteNumber:(e,a)=>null!=e&&Number.isFinite(e=+e)?e:a,findKey:Ce,global:Se,isContextDefined:Re,isSpecCompliantForm:function(e){return!!(e&&he(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const a=new Array(10),i=(e,n)=>{if(xe(e)){if(a.indexOf(e)>=0)return;if(!("toJSON"in e)){a[n]=e;const o=le(e)?[]:{};return Ae(e,((e,a)=>{const s=i(e,n+1);!ue(s)&&(o[a]=s)})),a[n]=void 0,o}}return e};return i(e,0)},isAsyncFn:qe,isThenable:e=>e&&(xe(e)||he(e))&&he(e.then)&&he(e.catch),setImmediate:Ue,asap:He};function Me(e,a,i,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",a&&(this.code=a),i&&(this.config=i),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}$e.inherits(Me,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:$e.toJSONObject(this.config),code:this.code,status:this.status}}});const Ve=Me.prototype,We={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{We[e]={value:e}})),Object.defineProperties(Me,We),Object.defineProperty(Ve,"isAxiosError",{value:!0}),Me.from=(e,a,i,n,o,s)=>{const t=Object.create(Ve);return $e.toFlatObject(e,t,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),Me.call(t,e.message,a,i,n,o),t.cause=e,t.name=e.name,s&&Object.assign(t,s),t};var Ge=t.Stream,Je=Ke;function Ke(){this.source=null,this.dataSize=0,this.maxDataSize=1048576,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}s.inherits(Ke,Ge),Ke.create=function(e,a){var i=new this;for(var n in a=a||{})i[n]=a[n];i.source=e;var o=e.emit;return e.emit=function(){return i._handleEmit(arguments),o.apply(e,arguments)},e.on("error",(function(){})),i.pauseStream&&e.pause(),i},Object.defineProperty(Ke.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}}),Ke.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)},Ke.prototype.resume=function(){this._released||this.release(),this.source.resume()},Ke.prototype.pause=function(){this.source.pause()},Ke.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]},Ke.prototype.pipe=function(){var e=Ge.prototype.pipe.apply(this,arguments);return this.resume(),e},Ke.prototype._handleEmit=function(e){this._released?this.emit.apply(this,e):("data"===e[0]&&(this.dataSize+=e[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(e))},Ke.prototype._checkIfMaxDataSizeExceeded=function(){if(!(this._maxDataSizeExceeded||this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(e))}};var Ye=s,Xe=t.Stream,Qe=Je,Ze=ea;function ea(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2097152,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}Ye.inherits(ea,Xe),ea.create=function(e){var a=new this;for(var i in e=e||{})a[i]=e[i];return a},ea.isStreamLike=function(e){return"function"!=typeof e&&"string"!=typeof e&&"boolean"!=typeof e&&"number"!=typeof e&&!Buffer.isBuffer(e)},ea.prototype.append=function(e){if(ea.isStreamLike(e)){if(!(e instanceof Qe)){var a=Qe.create(e,{maxDataSize:1/0,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this)),e=a}this._handleErrors(e),this.pauseStreams&&e.pause()}return this._streams.push(e),this},ea.prototype.pipe=function(e,a){return Xe.prototype.pipe.call(this,e,a),this.resume(),e},ea.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop)this._pendingNext=!0;else{this._insideLoop=!0;try{do{this._pendingNext=!1,this._realGetNext()}while(this._pendingNext)}finally{this._insideLoop=!1}}},ea.prototype._realGetNext=function(){var e=this._streams.shift();void 0!==e?"function"==typeof e?e(function(e){ea.isStreamLike(e)&&(e.on("data",this._checkDataSize.bind(this)),this._handleErrors(e)),this._pipeNext(e)}.bind(this)):this._pipeNext(e):this.end()},ea.prototype._pipeNext=function(e){if(this._currentStream=e,ea.isStreamLike(e))return e.on("end",this._getNext.bind(this)),void e.pipe(this,{end:!1});var a=e;this.write(a),this._getNext()},ea.prototype._handleErrors=function(e){var a=this;e.on("error",(function(e){a._emitError(e)}))},ea.prototype.write=function(e){this.emit("data",e)},ea.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&"function"==typeof this._currentStream.pause&&this._currentStream.pause(),this.emit("pause"))},ea.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&"function"==typeof this._currentStream.resume&&this._currentStream.resume(),this.emit("resume")},ea.prototype.end=function(){this._reset(),this.emit("end")},ea.prototype.destroy=function(){this._reset(),this.emit("close")},ea.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null},ea.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}},ea.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach((function(a){a.dataSize&&(e.dataSize+=a.dataSize)})),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)},ea.prototype._emitError=function(e){this._reset(),this.emit("error",e)};var aa={},ia={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/3gpp-ims+xml":{source:"iana",compressible:!0},"application/3gpphal+json":{source:"iana",compressible:!0},"application/3gpphalforms+json":{source:"iana",compressible:!0},"application/a2l":{source:"iana"},"application/ace+cbor":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:!0},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/alto-updatestreamcontrol+json":{source:"iana",compressible:!0},"application/alto-updatestreamparams+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/at+jwt":{source:"iana"},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:!0,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:!0,extensions:["atomdeleted"]},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:!0,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:!0,extensions:["dwd"]},"application/atsc-dynamic-event-message":{source:"iana"},"application/atsc-held+xml":{source:"iana",compressible:!0,extensions:["held"]},"application/atsc-rdt+json":{source:"iana",compressible:!0},"application/atsc-rsat+xml":{source:"iana",compressible:!0,extensions:["rsat"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:!0},"application/bacnet-xdd+zip":{source:"iana",compressible:!1},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana",compressible:!0,extensions:["xcs"]},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/captive+json":{source:"iana",compressible:!0},"application/cbor":{source:"iana"},"application/cbor-seq":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:!0},"application/ccxml+xml":{source:"iana",compressible:!0,extensions:["ccxml"]},"application/cdfx+xml":{source:"iana",compressible:!0,extensions:["cdfx"]},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:!0},"application/cellml+xml":{source:"iana",compressible:!0},"application/cfw":{source:"iana"},"application/city+json":{source:"iana",compressible:!0},"application/clr":{source:"iana"},"application/clue+xml":{source:"iana",compressible:!0},"application/clue_info+xml":{source:"iana",compressible:!0},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:!0},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:!0},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:!0,extensions:["cpl"]},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:!0},"application/cstadata+xml":{source:"iana",compressible:!0},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"app